Skip to content

Commit 0ccf0bf

Browse files
committed
chore: bump all
1 parent dfcee2b commit 0ccf0bf

File tree

7 files changed

+57
-62
lines changed

7 files changed

+57
-62
lines changed

package.json

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -32,28 +32,27 @@
3232
"@angular/platform-browser": "~10.1.0",
3333
"@angular/platform-browser-dynamic": "~10.1.0",
3434
"@angular/router": "~10.1.0",
35-
"@commitlint/cli": "^9.1.2",
36-
"@commitlint/config-conventional": "^9.1.2",
35+
"@commitlint/cli": "^13.2.0",
36+
"@commitlint/config-conventional": "^13.2.0",
3737
"@nativescript/angular": "10.1.0",
38-
"@nativescript/core": "7.0.0",
39-
"@nativescript/types-android": "7.0.1",
40-
"@nativescript/types-ios": "7.0.1",
41-
"@nativescript/webpack": "3.0.1",
42-
"@types/node": "^14.6.4",
43-
"@typescript-eslint/eslint-plugin": "4.0.1",
44-
"@typescript-eslint/parser": "4.0.1",
45-
"eslint": "7.8.1",
46-
"eslint-config-prettier": "^7.2.0",
47-
"eslint-plugin-prettier": "^3.3.1",
48-
"husky": "^4.2.5",
49-
"lerna": "^3.22.1",
38+
"@nativescript/core": "8.1.3",
39+
"@nativescript/types-android": "8.1.0",
40+
"@nativescript/types-ios": "8.1.1",
41+
"@nativescript/webpack": "5.0.0",
42+
"@types/node": "^16.10.2",
43+
"@typescript-eslint/eslint-plugin": "4.33.0",
44+
"@typescript-eslint/parser": "4.33.0",
45+
"eslint": "7.32.0",
46+
"eslint-config-prettier": "^8.3.0",
47+
"eslint-plugin-prettier": "^4.0.0",
48+
"husky": "^7.0.2",
49+
"lerna": "^4.0.0",
5050
"ng-packagr": "~10.1.0",
51-
"npm-watch": "^0.7.0",
52-
"prettier": "^2.2.1",
53-
"prompt": "^1.0.0",
51+
"prettier": "^2.4.1",
52+
"prompt": "^1.2.0",
5453
"rimraf": "^3.0.2",
55-
"ts-patch": "^1.3.0",
56-
"typescript": "~3.9.7"
54+
"ts-patch": "^1.4.4",
55+
"typescript": "~4.4.3"
5756
},
5857
"repository": {
5958
"type": "git",

src/shapes/circle.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { PercentLength, Utils } from '@nativescript/core';
1+
import { CoreTypes, PercentLength, Utils } from '@nativescript/core';
22
import { Canvas } from '../canvas';
33
import Rectangle from './rectangle';
44
import { percentLengthProperty } from './shape';
@@ -8,8 +8,12 @@ export default class Circle extends Rectangle {
88
const availableWidth = Utils.layout.toDevicePixels(canvas.getWidth());
99
const availableHeight = Utils.layout.toDevicePixels(canvas.getHeight());
1010

11-
canvas.drawCircle(Utils.layout.toDeviceIndependentPixels(PercentLength.toDevicePixels(this.left, 0, availableWidth)),
12-
Utils.layout.toDeviceIndependentPixels(PercentLength.toDevicePixels(this.top, 0, availableHeight)), Utils.layout.toDeviceIndependentPixels(PercentLength.toDevicePixels(this.radius, 0, availableWidth)), this.paint);
11+
canvas.drawCircle(
12+
Utils.layout.toDeviceIndependentPixels(PercentLength.toDevicePixels(this.left, 0, availableWidth)),
13+
Utils.layout.toDeviceIndependentPixels(PercentLength.toDevicePixels(this.top, 0, availableHeight)),
14+
Utils.layout.toDeviceIndependentPixels(PercentLength.toDevicePixels(this.radius, 0, availableWidth)),
15+
this.paint
16+
);
1317
}
14-
@percentLengthProperty radius: PercentLength = 0;
18+
@percentLengthProperty radius: CoreTypes.PercentLengthType = 0;
1519
}

src/shapes/index.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,4 @@ import Rectangle from './rectangle';
55
import Shape from './shape';
66
import Text from './text';
77

8-
export {
9-
Arc,
10-
Circle,
11-
Line,
12-
Rectangle,
13-
Shape,
14-
Text
15-
};
8+
export { Arc, Circle, Line, Rectangle, Shape, Text };

src/shapes/line.ts

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
1-
import { layout } from '@nativescript/core/utils/utils';
1+
import { CoreTypes } from '@nativescript/core';
22
import { PercentLength } from '@nativescript/core/ui/styling/style-properties';
3+
import { layout } from '@nativescript/core/utils/utils';
34
import { Canvas, Style } from '../canvas';
45
import Rectangle from './rectangle';
56
import { percentLengthProperty } from './shape';
67

78
export default class Line extends Rectangle {
8-
constructor() {
9-
super();
10-
this.paintStyle = Style.STROKE;
11-
}
9+
paintStyle = Style.STROKE;
1210
drawOnCanvas(canvas: Canvas) {
1311
const availableWidth = layout.toDevicePixels(canvas.getWidth());
1412
const availableHeight = layout.toDevicePixels(canvas.getHeight());
@@ -20,8 +18,8 @@ export default class Line extends Rectangle {
2018
this.paint
2119
);
2220
}
23-
@percentLengthProperty({ nonPaintProp: true }) startX: PercentLength = 0;
24-
@percentLengthProperty({ nonPaintProp: true }) startY: PercentLength = 0;
25-
@percentLengthProperty({ nonPaintProp: true }) stopX: PercentLength = 0;
26-
@percentLengthProperty({ nonPaintProp: true }) stopY: PercentLength = 0;
21+
@percentLengthProperty({ nonPaintProp: true }) startX: CoreTypes.PercentLengthType = 0;
22+
@percentLengthProperty({ nonPaintProp: true }) startY: CoreTypes.PercentLengthType = 0;
23+
@percentLengthProperty({ nonPaintProp: true }) stopX: CoreTypes.PercentLengthType = 0;
24+
@percentLengthProperty({ nonPaintProp: true }) stopY: CoreTypes.PercentLengthType = 0;
2725
}

src/shapes/rectangle.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
import { Length, PercentLength, zeroLength } from '@nativescript/core/ui/styling/style-properties';
1+
import { CoreTypes } from '@nativescript/core';
2+
import { PercentLength } from '@nativescript/core/ui/styling/style-properties';
23
import { layout } from '@nativescript/core/utils/utils';
34
import { Canvas, Rect, RectF, createRectF } from '../canvas';
4-
import Shape, { lengthProperty, numberProperty, percentLengthProperty } from './shape';
5+
import Shape, { numberProperty, percentLengthProperty } from './shape';
56

67
export { Rect, RectF };
78
export default class Rectangle extends Shape {
@@ -14,8 +15,8 @@ export default class Rectangle extends Shape {
1415
}
1516
}
1617

17-
@percentLengthProperty left: PercentLength = 0;
18-
@percentLengthProperty top: PercentLength = 0;
18+
@percentLengthProperty left: CoreTypes.PercentLengthType = 0;
19+
@percentLengthProperty top: CoreTypes.PercentLengthType = 0;
1920
@numberProperty borderRadius: number;
2021
getRect(canvas: Canvas) {
2122
const availableWidth = layout.toDevicePixels(canvas.getWidth());

src/shapes/shape.ts

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* eslint-disable no-redeclare */
2-
import { Color, HorizontalAlignment, Length, Observable, PercentLength, Utils, VerticalAlignment, Visibility } from '@nativescript/core';
2+
import { Color, CoreTypes, Length, Observable, PercentLength, Utils } from '@nativescript/core';
33
import { booleanConverter } from '@nativescript/core/ui/core/view-base';
44
import { Canvas, CanvasView, Cap, Join, Paint, PorterDuffXfermode, Style } from '../canvas';
55
import { parseCap, parseDashEffect, parseJoin, parseShadow, parseType } from '../utils';
@@ -41,7 +41,7 @@ function parseThickness(value: string) {
4141
top,
4242
right,
4343
bottom,
44-
left,
44+
left
4545
};
4646
} else {
4747
return value;
@@ -105,15 +105,15 @@ function shapePropertyGenerator(target: Object, key: string | symbol, options?:
105105
get: createGetter(key, options),
106106
set: createSetter(key, options),
107107
enumerable: true,
108-
configurable: true,
108+
configurable: true
109109
});
110110

111111
// for svelte!
112112
Object.defineProperty(target, key.toString().toLowerCase(), {
113113
get: createGetter(key, options),
114114
set: createSetter(key, options),
115115
enumerable: true,
116-
configurable: true,
116+
configurable: true
117117
});
118118
}
119119
// export function shapeProperty(target: any, k?, desc?: PropertyDescriptor): any;
@@ -217,23 +217,23 @@ export default abstract class Shape extends Observable {
217217
@booleanProperty({ paintGetterName: 'isAntiAlias', paintSetterName: 'setAntiAlias' }) antiAlias: boolean;
218218
@colorProperty({
219219
converter: parseShadow,
220-
paintSetter: applyShadow,
220+
paintSetter: applyShadow
221221
})
222222
shadow: Shadow;
223-
@stringProperty({ nonPaintProp: true }) visibility: Visibility = 'visible';
224-
@stringProperty({ nonPaintProp: true }) horizontalAlignment: HorizontalAlignment & 'middle';
225-
@stringProperty({ nonPaintProp: true }) verticalAlignment: VerticalAlignment & 'center';
223+
@stringProperty({ nonPaintProp: true }) visibility: CoreTypes.VisibilityType = 'visible';
224+
@stringProperty({ nonPaintProp: true }) horizontalAlignment: CoreTypes.HorizontalAlignmentType & 'middle';
225+
@stringProperty({ nonPaintProp: true }) verticalAlignment: CoreTypes.VerticalAlignmentType & 'center';
226226

227-
@percentLengthProperty({ nonPaintProp: true }) width: PercentLength;
228-
@percentLengthProperty({ nonPaintProp: true }) height: PercentLength;
227+
@percentLengthProperty({ nonPaintProp: true }) width: CoreTypes.PercentLengthType;
228+
@percentLengthProperty({ nonPaintProp: true }) height: CoreTypes.PercentLengthType;
229229

230-
@percentLengthProperty({ nonPaintProp: true }) paddingLeft: PercentLength;
231-
@percentLengthProperty({ nonPaintProp: true }) paddingRight: PercentLength;
232-
@percentLengthProperty({ nonPaintProp: true }) paddingBottom: PercentLength;
233-
@percentLengthProperty({ nonPaintProp: true }) paddingTop: PercentLength;
230+
@percentLengthProperty({ nonPaintProp: true }) paddingLeft: CoreTypes.PercentLengthType;
231+
@percentLengthProperty({ nonPaintProp: true }) paddingRight: CoreTypes.PercentLengthType;
232+
@percentLengthProperty({ nonPaintProp: true }) paddingBottom: CoreTypes.PercentLengthType;
233+
@percentLengthProperty({ nonPaintProp: true }) paddingTop: CoreTypes.PercentLengthType;
234234

235-
@percentLengthProperty({ nonPaintProp: true }) translateX: PercentLength = 0;
236-
@percentLengthProperty({ nonPaintProp: true }) translateY: PercentLength = 0;
235+
@percentLengthProperty({ nonPaintProp: true }) translateX: CoreTypes.PercentLengthType = 0;
236+
@percentLengthProperty({ nonPaintProp: true }) translateY: CoreTypes.PercentLengthType = 0;
237237
@numberProperty({ nonPaintProp: true }) rotate: number = 0;
238238
@numberProperty({ nonPaintProp: true }) originX: number = 0;
239239
@numberProperty({ nonPaintProp: true }) originY: number = 0;

tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@
2828
"@nativescript-community/ui-canvas/*": ["src/*"],
2929
"*": ["node_modules/*"]
3030
},
31-
"plugins": [{ "transform": "./node_modules/@nativescript/webpack/transformers/ns-transform-native-classes.js", "type": "raw" }]
31+
"plugins": [{ "transform": "@nativescript/webpack/dist/transformers/NativeClass", "type": "raw" }]
3232
},
3333
"include": ["src/**/*", "./references.d.ts"],
3434
"exclude": ["node_modules", "platforms", "src/angular/**/*"],
35-
"compileOnSave": false,
35+
"compileOnSave": false
3636
}

0 commit comments

Comments
 (0)