@nativescript/canvas 2.0.0-alpha.23 → 2.0.0-alpha.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Canvas/common.d.ts +199 -25
- package/Canvas/common.js +624 -489
- package/Canvas/common.js.map +1 -1
- package/Canvas/index.android.js +19 -9
- package/Canvas/index.android.js.map +1 -1
- package/Canvas/index.ios.js +13 -12
- package/Canvas/index.ios.js.map +1 -1
- package/Canvas2D/CanvasRenderingContext2D/index.d.ts +0 -1
- package/Canvas2D/CanvasRenderingContext2D/index.js +9 -121
- package/Canvas2D/CanvasRenderingContext2D/index.js.map +1 -1
- package/WebGL/WebGLExtensions/index.d.ts +4 -3
- package/WebGL/WebGLExtensions/index.js +10 -3
- package/WebGL/WebGLExtensions/index.js.map +1 -1
- package/WebGL/WebGLRenderingContext/index.d.ts +15 -15
- package/WebGL/WebGLRenderingContext/index.js +15 -277
- package/WebGL/WebGLRenderingContext/index.js.map +1 -1
- package/WebGL2/WebGL2RenderingContext/index.js +0 -86
- package/WebGL2/WebGL2RenderingContext/index.js.map +1 -1
- package/package.json +1 -1
- package/platforms/android/canvas-release.aar +0 -0
- package/platforms/ios/CanvasNative.xcframework/Info.plist +5 -5
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/CanvasNative +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/CanvasNative-Swift.h +2 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.abi.json +1035 -83
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.private.swiftinterface +2 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.swiftinterface +2 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/DWARF/CanvasNative +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/CanvasNative +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/CanvasNative-Swift.h +4 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/arm64-apple-ios-simulator.swiftsourceinfo +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.abi.json +1035 -83
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +2 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftinterface +2 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.abi.json +1035 -83
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +2 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +2 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/_CodeSignature/CodeResources +22 -22
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/DWARF/CanvasNative +0 -0
package/Canvas/common.d.ts
CHANGED
|
@@ -3,22 +3,169 @@ import { CanvasRenderingContext } from '../common';
|
|
|
3
3
|
export interface ICanvasBase {
|
|
4
4
|
on(eventName: 'ready', callback: (data: any) => void, thisArg?: any): void;
|
|
5
5
|
}
|
|
6
|
-
|
|
6
|
+
interface EventOptions {
|
|
7
|
+
bubbles?: boolean;
|
|
8
|
+
cancelable?: boolean;
|
|
9
|
+
composed?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare class Event {
|
|
7
12
|
readonly type: string;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
13
|
+
readonly bubbles: boolean;
|
|
14
|
+
readonly cancelable: boolean;
|
|
15
|
+
readonly composed: boolean;
|
|
16
|
+
readonly timeStamp: number;
|
|
17
|
+
constructor(type: string, options: EventOptions);
|
|
11
18
|
preventDefault(): void;
|
|
12
19
|
stopPropagation(): void;
|
|
13
20
|
}
|
|
14
|
-
|
|
21
|
+
interface UIEventOptions extends EventOptions {
|
|
22
|
+
detail?: number;
|
|
23
|
+
view?: any;
|
|
24
|
+
sourceCapabilities?: any;
|
|
25
|
+
}
|
|
26
|
+
export declare class UIEvent extends Event {
|
|
27
|
+
readonly detail: number;
|
|
28
|
+
readonly view: any;
|
|
29
|
+
readonly sourceCapabilities?: any;
|
|
30
|
+
constructor(type: 'load' | 'unload' | 'abort' | 'error' | 'select', options?: UIEventOptions);
|
|
31
|
+
}
|
|
32
|
+
interface MouseEventOptions extends UIEventOptions {
|
|
33
|
+
screenX?: number;
|
|
34
|
+
screenY?: number;
|
|
35
|
+
clientX?: number;
|
|
36
|
+
clientY?: number;
|
|
37
|
+
ctrlKey?: boolean;
|
|
38
|
+
shiftKey?: boolean;
|
|
39
|
+
altKey?: boolean;
|
|
40
|
+
metaKey?: boolean;
|
|
41
|
+
button?: number;
|
|
42
|
+
buttons?: number;
|
|
43
|
+
relatedTarget?: any;
|
|
44
|
+
region?: any;
|
|
45
|
+
movementX?: number;
|
|
46
|
+
movementY?: number;
|
|
47
|
+
pageX?: number;
|
|
48
|
+
pageY?: number;
|
|
49
|
+
}
|
|
50
|
+
export declare class MouseEvent extends UIEvent {
|
|
51
|
+
readonly screenX: number;
|
|
52
|
+
readonly screenY: number;
|
|
53
|
+
readonly clientX: number;
|
|
54
|
+
readonly clientY: number;
|
|
55
|
+
readonly ctrlKey: boolean;
|
|
56
|
+
readonly shiftKey: boolean;
|
|
57
|
+
readonly altKey: boolean;
|
|
58
|
+
readonly metaKey: boolean;
|
|
59
|
+
readonly button: number;
|
|
60
|
+
readonly buttons: number;
|
|
61
|
+
readonly relatedTarget: any;
|
|
62
|
+
readonly region: any;
|
|
63
|
+
readonly movementX: number;
|
|
64
|
+
readonly movementY: number;
|
|
65
|
+
readonly pageX: number;
|
|
66
|
+
readonly pageY: number;
|
|
67
|
+
constructor(type: 'dblclick' | 'mousedown' | 'mouseenter' | 'mouseleave' | 'mousemove' | 'mouseout' | 'mouseover' | 'mouseup', options?: MouseEventOptions);
|
|
68
|
+
}
|
|
69
|
+
interface PointerEventOptions extends MouseEventOptions {
|
|
70
|
+
pointerId?: number;
|
|
71
|
+
width?: number;
|
|
72
|
+
height?: number;
|
|
73
|
+
pressure?: number;
|
|
74
|
+
tangentialPressure?: number;
|
|
75
|
+
pointerType?: 'mouse' | 'touch' | 'pen';
|
|
76
|
+
tiltX?: number;
|
|
77
|
+
tiltY?: number;
|
|
78
|
+
twist?: number;
|
|
79
|
+
isPrimary?: boolean;
|
|
80
|
+
}
|
|
81
|
+
export declare class PointerEvent extends MouseEvent {
|
|
15
82
|
readonly type: string;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
83
|
+
readonly pointerType: string;
|
|
84
|
+
readonly pointerId: number;
|
|
85
|
+
readonly width: number;
|
|
86
|
+
readonly height: number;
|
|
87
|
+
readonly pressure: number;
|
|
88
|
+
readonly tangentialPressure: number;
|
|
89
|
+
readonly tiltX?: number;
|
|
90
|
+
readonly tiltY?: number;
|
|
91
|
+
readonly twist?: number;
|
|
92
|
+
readonly isPrimary?: boolean;
|
|
93
|
+
constructor(type: 'pointerover' | 'pointerenter' | 'pointerdown' | 'pointermove' | 'pointerrawupdate' | 'pointerup' | 'pointercancel' | 'pointerout' | 'pointerleave' | 'gotpointercapture' | 'lostpointercapture', options?: PointerEventOptions);
|
|
19
94
|
preventDefault(): void;
|
|
20
95
|
stopPropagation(): void;
|
|
21
96
|
}
|
|
97
|
+
interface TouchOptions {
|
|
98
|
+
identifier: number;
|
|
99
|
+
target: any;
|
|
100
|
+
clientX?: number;
|
|
101
|
+
clientY?: number;
|
|
102
|
+
screenX?: number;
|
|
103
|
+
screenY?: number;
|
|
104
|
+
pageX?: number;
|
|
105
|
+
pageY?: number;
|
|
106
|
+
radiusX?: number;
|
|
107
|
+
radiusY?: number;
|
|
108
|
+
rotationAngle?: number;
|
|
109
|
+
force?: number;
|
|
110
|
+
}
|
|
111
|
+
export declare class Touch {
|
|
112
|
+
readonly identifier: number;
|
|
113
|
+
readonly target: any;
|
|
114
|
+
readonly clientX: number;
|
|
115
|
+
readonly clientY: number;
|
|
116
|
+
readonly screenX: number;
|
|
117
|
+
readonly screenY: number;
|
|
118
|
+
readonly pageX: number;
|
|
119
|
+
readonly pageY: number;
|
|
120
|
+
readonly radiusX: number;
|
|
121
|
+
readonly radiusY: number;
|
|
122
|
+
readonly rotationAngle: number;
|
|
123
|
+
readonly force: number;
|
|
124
|
+
constructor(options: TouchOptions);
|
|
125
|
+
preventDefault(): void;
|
|
126
|
+
stopPropagation(): void;
|
|
127
|
+
}
|
|
128
|
+
export declare class TouchList {
|
|
129
|
+
private _list;
|
|
130
|
+
static fromList(list: Touch[]): TouchList;
|
|
131
|
+
static empty(): TouchList;
|
|
132
|
+
item(index: number): Touch;
|
|
133
|
+
get length(): number;
|
|
134
|
+
}
|
|
135
|
+
interface TouchEventOptions extends UIEventOptions {
|
|
136
|
+
touches?: TouchList;
|
|
137
|
+
targetTouches?: TouchList;
|
|
138
|
+
changedTouches?: Touch[];
|
|
139
|
+
ctrlKey?: boolean;
|
|
140
|
+
shiftKey?: boolean;
|
|
141
|
+
altKey?: boolean;
|
|
142
|
+
metaKey?: boolean;
|
|
143
|
+
}
|
|
144
|
+
export declare class TouchEvent extends UIEvent {
|
|
145
|
+
readonly touches: TouchList;
|
|
146
|
+
readonly targetTouches: TouchList;
|
|
147
|
+
readonly changedTouches: Touch[];
|
|
148
|
+
readonly ctrlKey: boolean;
|
|
149
|
+
readonly shiftKey: boolean;
|
|
150
|
+
readonly altKey: boolean;
|
|
151
|
+
readonly metaKey: boolean;
|
|
152
|
+
constructor(type: 'touchstart' | 'touchend' | 'touchmove' | 'touchcancel', options?: TouchEventOptions);
|
|
153
|
+
preventDefault(): void;
|
|
154
|
+
stopPropagation(): void;
|
|
155
|
+
}
|
|
156
|
+
interface WheelEventOptions extends UIEventOptions {
|
|
157
|
+
deltaX?: number;
|
|
158
|
+
deltaY?: number;
|
|
159
|
+
deltaZ?: number;
|
|
160
|
+
deltaMode?: number;
|
|
161
|
+
}
|
|
162
|
+
export declare class WheelEvent extends UIEvent {
|
|
163
|
+
readonly deltaX?: number;
|
|
164
|
+
readonly deltaY?: number;
|
|
165
|
+
readonly deltaZ?: number;
|
|
166
|
+
readonly deltaMode?: number;
|
|
167
|
+
constructor(type: 'wheel', options?: WheelEventOptions);
|
|
168
|
+
}
|
|
22
169
|
export declare const ignorePixelScalingProperty: Property<CanvasBase, boolean>;
|
|
23
170
|
export declare const upscaleProperty: Property<CanvasBase, boolean>;
|
|
24
171
|
export declare abstract class CanvasBase extends View implements ICanvasBase {
|
|
@@ -27,17 +174,50 @@ export declare abstract class CanvasBase extends View implements ICanvasBase {
|
|
|
27
174
|
upscaleProperty: boolean;
|
|
28
175
|
_isCustom: boolean;
|
|
29
176
|
_classList: Set<any>;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
177
|
+
_pointerMoveCallbacks: Set<any>;
|
|
178
|
+
_pointerUpCallbacks: Set<any>;
|
|
179
|
+
_pointerDownCallbacks: Set<any>;
|
|
180
|
+
_pointerCancelCallbacks: Set<any>;
|
|
181
|
+
_mouseMoveCallbacks: Set<any>;
|
|
182
|
+
_mouseUpCallbacks: Set<any>;
|
|
183
|
+
_mouseDownCallbacks: Set<any>;
|
|
184
|
+
_mouseCancelCallbacks: Set<any>;
|
|
185
|
+
_mouseWheelCallbacks: Set<any>;
|
|
186
|
+
_touchStartCallbacks: Set<(TouchEvent: any) => void>;
|
|
187
|
+
_touchEndCallbacks: Set<(TouchEvent: any) => void>;
|
|
188
|
+
_touchMoveCallbacks: Set<(TouchEvent: any) => void>;
|
|
189
|
+
_touchCancelCallbacks: Set<(TouchEvent: any) => void>;
|
|
190
|
+
_touches: Touch[];
|
|
191
|
+
_touchesById: Touch[];
|
|
192
|
+
_lastPointerEventById: {
|
|
193
|
+
pointerId: number;
|
|
194
|
+
x: number;
|
|
195
|
+
y: number;
|
|
196
|
+
}[];
|
|
38
197
|
protected constructor();
|
|
39
198
|
addEventListener(arg: string, callback: any, thisArg?: any): void;
|
|
40
199
|
removeEventListener(arg: string, callback: any, thisArg?: any): void;
|
|
200
|
+
_moveCallback(pointers: {
|
|
201
|
+
ptrId: number;
|
|
202
|
+
x: number;
|
|
203
|
+
y: number;
|
|
204
|
+
}[]): void;
|
|
205
|
+
_upCallback(ptrId: any, x: any, y: any): void;
|
|
206
|
+
_downCallback(ptrId: any, x: any, y: any): void;
|
|
207
|
+
_cancelCallback(ptrid: any, x: any, y: any): void;
|
|
208
|
+
_pinchCallback(data: {
|
|
209
|
+
event: string;
|
|
210
|
+
deltaX: number;
|
|
211
|
+
deltaY: number;
|
|
212
|
+
deltaMode: number;
|
|
213
|
+
pointers: {
|
|
214
|
+
ptrId: number;
|
|
215
|
+
x: number;
|
|
216
|
+
y: number;
|
|
217
|
+
}[];
|
|
218
|
+
isInProgress: boolean;
|
|
219
|
+
}): void;
|
|
220
|
+
_handleEvents(event: any): void;
|
|
41
221
|
get classList(): Set<any>;
|
|
42
222
|
get _realSize(): {
|
|
43
223
|
width: number;
|
|
@@ -59,13 +239,7 @@ export declare abstract class CanvasBase extends View implements ICanvasBase {
|
|
|
59
239
|
left: number;
|
|
60
240
|
};
|
|
61
241
|
private getSize;
|
|
62
|
-
setPointerCapture(): void;
|
|
63
|
-
releasePointerCapture(): void;
|
|
64
|
-
__ensureGestures(): void;
|
|
65
|
-
__unregisterGestures(): void;
|
|
66
|
-
_pointerCountFromEvent(event: any): number;
|
|
67
|
-
_positionsFromEvent(event: any): any[];
|
|
68
|
-
_touchEvent(event: any): void;
|
|
69
|
-
_createTouchEvent(name: any, extraData: any): any;
|
|
70
|
-
_createPointerEvent(name: any, extraData: any): any;
|
|
242
|
+
setPointerCapture(id: any): void;
|
|
243
|
+
releasePointerCapture(id: any): void;
|
|
71
244
|
}
|
|
245
|
+
export {};
|