@nativescript/canvas-svg 2.0.0-beta.16
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/Elements/Circle.d.ts +11 -0
- package/Elements/Circle.js +21 -0
- package/Elements/Circle.js.map +1 -0
- package/Elements/ClipPath.d.ts +4 -0
- package/Elements/ClipPath.js +9 -0
- package/Elements/ClipPath.js.map +1 -0
- package/Elements/Defs.d.ts +4 -0
- package/Elements/Defs.js +9 -0
- package/Elements/Defs.js.map +1 -0
- package/Elements/Ellipse.d.ts +13 -0
- package/Elements/Ellipse.js +26 -0
- package/Elements/Ellipse.js.map +1 -0
- package/Elements/G.d.ts +7 -0
- package/Elements/G.js +9 -0
- package/Elements/G.js.map +1 -0
- package/Elements/Image.d.ts +11 -0
- package/Elements/Image.js +40 -0
- package/Elements/Image.js.map +1 -0
- package/Elements/Line.d.ts +13 -0
- package/Elements/Line.js +26 -0
- package/Elements/Line.js.map +1 -0
- package/Elements/LinearGradient.d.ts +10 -0
- package/Elements/LinearGradient.js +13 -0
- package/Elements/LinearGradient.js.map +1 -0
- package/Elements/Path.d.ts +7 -0
- package/Elements/Path.js +14 -0
- package/Elements/Path.js.map +1 -0
- package/Elements/Pattern.d.ts +4 -0
- package/Elements/Pattern.js +9 -0
- package/Elements/Pattern.js.map +1 -0
- package/Elements/Polygon.d.ts +7 -0
- package/Elements/Polygon.js +14 -0
- package/Elements/Polygon.js.map +1 -0
- package/Elements/Polyline.d.ts +7 -0
- package/Elements/Polyline.js +14 -0
- package/Elements/Polyline.js.map +1 -0
- package/Elements/Rect.d.ts +8 -0
- package/Elements/Rect.js +13 -0
- package/Elements/Rect.js.map +1 -0
- package/Elements/SVG.d.ts +32 -0
- package/Elements/SVG.js +205 -0
- package/Elements/SVG.js.map +1 -0
- package/Elements/SVGItem.d.ts +7 -0
- package/Elements/SVGItem.js +16 -0
- package/Elements/SVGItem.js.map +1 -0
- package/Elements/Stop.d.ts +5 -0
- package/Elements/Stop.js +9 -0
- package/Elements/Stop.js.map +1 -0
- package/Elements/Symbol.d.ts +4 -0
- package/Elements/Symbol.js +9 -0
- package/Elements/Symbol.js.map +1 -0
- package/Elements/Text.d.ts +14 -0
- package/Elements/Text.js +26 -0
- package/Elements/Text.js.map +1 -0
- package/Elements/Use.d.ts +4 -0
- package/Elements/Use.js +9 -0
- package/Elements/Use.js.map +1 -0
- package/Elements/index.d.ts +18 -0
- package/Elements/index.js +19 -0
- package/Elements/index.js.map +1 -0
- package/LICENSE +201 -0
- package/README.md +13 -0
- package/common.d.ts +24 -0
- package/common.js +90 -0
- package/common.js.map +1 -0
- package/index.android.d.ts +14 -0
- package/index.android.js +86 -0
- package/index.android.js.map +1 -0
- package/index.d.ts +5 -0
- package/index.ios.d.ts +16 -0
- package/index.ios.js +93 -0
- package/index.ios.js.map +1 -0
- package/package.json +41 -0
- package/platforms/android/canvassvg-release.aar +0 -0
- package/platforms/ios/CanvasSVG.xcframework/Info.plist +48 -0
- package/platforms/ios/CanvasSVG.xcframework/ios-arm64/CanvasSVG.framework/CanvasSVG +0 -0
- package/platforms/ios/CanvasSVG.xcframework/ios-arm64/CanvasSVG.framework/Headers/CanvasSVG.h +17 -0
- package/platforms/ios/CanvasSVG.xcframework/ios-arm64/CanvasSVG.framework/Headers/CanvasSVGHelper.h +18 -0
- package/platforms/ios/CanvasSVG.xcframework/ios-arm64/CanvasSVG.framework/Headers/canvas_svg.h +27 -0
- package/platforms/ios/CanvasSVG.xcframework/ios-arm64/CanvasSVG.framework/Info.plist +0 -0
- package/platforms/ios/CanvasSVG.xcframework/ios-arm64/CanvasSVG.framework/Modules/CanvasSVG.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo +0 -0
- package/platforms/ios/CanvasSVG.xcframework/ios-arm64/CanvasSVG.framework/Modules/CanvasSVG.swiftmodule/arm64-apple-ios.abi.json +645 -0
- package/platforms/ios/CanvasSVG.xcframework/ios-arm64/CanvasSVG.framework/Modules/CanvasSVG.swiftmodule/arm64-apple-ios.private.swiftinterface +30 -0
- package/platforms/ios/CanvasSVG.xcframework/ios-arm64/CanvasSVG.framework/Modules/CanvasSVG.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/platforms/ios/CanvasSVG.xcframework/ios-arm64/CanvasSVG.framework/Modules/CanvasSVG.swiftmodule/arm64-apple-ios.swiftinterface +30 -0
- package/platforms/ios/CanvasSVG.xcframework/ios-arm64/CanvasSVG.framework/Modules/module.modulemap +6 -0
- package/platforms/ios/CanvasSVG.xcframework/ios-arm64/dSYMs/CanvasSVG.framework.dSYM/Contents/Info.plist +20 -0
- package/platforms/ios/CanvasSVG.xcframework/ios-arm64/dSYMs/CanvasSVG.framework.dSYM/Contents/Resources/DWARF/CanvasSVG +0 -0
- package/platforms/ios/CanvasSVG.xcframework/ios-arm64/dSYMs/CanvasSVG.framework.dSYM/Contents/Resources/Relocations/aarch64/CanvasSVG.yml +77 -0
- package/platforms/ios/CanvasSVG.xcframework/ios-arm64_x86_64-simulator/CanvasSVG.framework/CanvasSVG +0 -0
- package/platforms/ios/CanvasSVG.xcframework/ios-arm64_x86_64-simulator/CanvasSVG.framework/Headers/CanvasSVG.h +17 -0
- package/platforms/ios/CanvasSVG.xcframework/ios-arm64_x86_64-simulator/CanvasSVG.framework/Headers/CanvasSVGHelper.h +18 -0
- package/platforms/ios/CanvasSVG.xcframework/ios-arm64_x86_64-simulator/CanvasSVG.framework/Headers/canvas_svg.h +27 -0
- package/platforms/ios/CanvasSVG.xcframework/ios-arm64_x86_64-simulator/CanvasSVG.framework/Info.plist +0 -0
- package/platforms/ios/CanvasSVG.xcframework/ios-arm64_x86_64-simulator/CanvasSVG.framework/Modules/CanvasSVG.swiftmodule/Project/arm64-apple-ios-simulator.swiftsourceinfo +0 -0
- package/platforms/ios/CanvasSVG.xcframework/ios-arm64_x86_64-simulator/CanvasSVG.framework/Modules/CanvasSVG.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo +0 -0
- package/platforms/ios/CanvasSVG.xcframework/ios-arm64_x86_64-simulator/CanvasSVG.framework/Modules/CanvasSVG.swiftmodule/arm64-apple-ios-simulator.abi.json +645 -0
- package/platforms/ios/CanvasSVG.xcframework/ios-arm64_x86_64-simulator/CanvasSVG.framework/Modules/CanvasSVG.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +30 -0
- package/platforms/ios/CanvasSVG.xcframework/ios-arm64_x86_64-simulator/CanvasSVG.framework/Modules/CanvasSVG.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
- package/platforms/ios/CanvasSVG.xcframework/ios-arm64_x86_64-simulator/CanvasSVG.framework/Modules/CanvasSVG.swiftmodule/arm64-apple-ios-simulator.swiftinterface +30 -0
- package/platforms/ios/CanvasSVG.xcframework/ios-arm64_x86_64-simulator/CanvasSVG.framework/Modules/CanvasSVG.swiftmodule/x86_64-apple-ios-simulator.abi.json +645 -0
- package/platforms/ios/CanvasSVG.xcframework/ios-arm64_x86_64-simulator/CanvasSVG.framework/Modules/CanvasSVG.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +30 -0
- package/platforms/ios/CanvasSVG.xcframework/ios-arm64_x86_64-simulator/CanvasSVG.framework/Modules/CanvasSVG.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
- package/platforms/ios/CanvasSVG.xcframework/ios-arm64_x86_64-simulator/CanvasSVG.framework/Modules/CanvasSVG.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +30 -0
- package/platforms/ios/CanvasSVG.xcframework/ios-arm64_x86_64-simulator/CanvasSVG.framework/Modules/module.modulemap +6 -0
- package/platforms/ios/CanvasSVG.xcframework/ios-arm64_x86_64-simulator/CanvasSVG.framework/_CodeSignature/CodeResources +278 -0
- package/platforms/ios/CanvasSVG.xcframework/ios-arm64_x86_64-simulator/dSYMs/CanvasSVG.framework.dSYM/Contents/Info.plist +20 -0
- package/platforms/ios/CanvasSVG.xcframework/ios-arm64_x86_64-simulator/dSYMs/CanvasSVG.framework.dSYM/Contents/Resources/DWARF/CanvasSVG +0 -0
- package/platforms/ios/CanvasSVG.xcframework/ios-arm64_x86_64-simulator/dSYMs/CanvasSVG.framework.dSYM/Contents/Resources/Relocations/aarch64/CanvasSVG.yml +78 -0
- package/platforms/ios/CanvasSVG.xcframework/ios-arm64_x86_64-simulator/dSYMs/CanvasSVG.framework.dSYM/Contents/Resources/Relocations/x86_64/CanvasSVG.yml +64 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Property } from '@nativescript/core';
|
|
2
|
+
import { SVGItem } from './SVGItem';
|
|
3
|
+
export declare const cxProperty: Property<Circle, any>;
|
|
4
|
+
export declare const cyProperty: Property<Circle, any>;
|
|
5
|
+
export declare const rProperty: Property<Circle, any>;
|
|
6
|
+
export declare class Circle extends SVGItem {
|
|
7
|
+
cx: any;
|
|
8
|
+
cy: any;
|
|
9
|
+
r: any;
|
|
10
|
+
constructor();
|
|
11
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Property } from '@nativescript/core';
|
|
2
|
+
import { SVGItem } from './SVGItem';
|
|
3
|
+
import { DOMParser } from 'xmldom';
|
|
4
|
+
export const cxProperty = new Property({
|
|
5
|
+
name: 'cx',
|
|
6
|
+
});
|
|
7
|
+
export const cyProperty = new Property({
|
|
8
|
+
name: 'cy',
|
|
9
|
+
});
|
|
10
|
+
export const rProperty = new Property({
|
|
11
|
+
name: 'r',
|
|
12
|
+
});
|
|
13
|
+
export class Circle extends SVGItem {
|
|
14
|
+
constructor() {
|
|
15
|
+
super();
|
|
16
|
+
this._dom = new DOMParser().parseFromString('<circle></circle>');
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
cxProperty.register(Circle);
|
|
20
|
+
cyProperty.register(Circle);
|
|
21
|
+
//# sourceMappingURL=Circle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Circle.js","sourceRoot":"","sources":["../../../../packages/canvas-svg/Elements/Circle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACnC,MAAM,CAAC,MAAM,UAAU,GAAG,IAAI,QAAQ,CAAc;IACnD,IAAI,EAAE,IAAI;CACV,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,UAAU,GAAG,IAAI,QAAQ,CAAc;IACnD,IAAI,EAAE,IAAI;CACV,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,SAAS,GAAG,IAAI,QAAQ,CAAc;IAClD,IAAI,EAAE,GAAG;CACT,CAAC,CAAC;AAEH,MAAM,OAAO,MAAO,SAAQ,OAAO;IAIlC;QACC,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,IAAI,GAAG,IAAI,SAAS,EAAE,CAAC,eAAe,CAAC,mBAAmB,CAAC,CAAC;IAClE,CAAC;CACD;AAED,UAAU,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AAC5B,UAAU,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { SVGItem } from './SVGItem';
|
|
2
|
+
import { DOMParser } from '@xmldom/xmldom';
|
|
3
|
+
export class ClipPath extends SVGItem {
|
|
4
|
+
constructor() {
|
|
5
|
+
super();
|
|
6
|
+
this._dom = new DOMParser().parseFromString('<clip-path></clip-path>');
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=ClipPath.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ClipPath.js","sourceRoot":"","sources":["../../../../packages/canvas-svg/Elements/ClipPath.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C,MAAM,OAAO,QAAS,SAAQ,OAAO;IACpC;QACC,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,IAAI,GAAG,IAAI,SAAS,EAAE,CAAC,eAAe,CAAC,yBAAyB,CAAC,CAAC;IACxE,CAAC;CACD"}
|
package/Elements/Defs.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Defs.js","sourceRoot":"","sources":["../../../../packages/canvas-svg/Elements/Defs.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C,MAAM,OAAO,IAAK,SAAQ,OAAO;IAChC;QACC,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,IAAI,GAAG,IAAI,SAAS,EAAE,CAAC,eAAe,CAAC,cAAc,CAAC,CAAC;IAC7D,CAAC;CACD"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Property } from '@nativescript/core';
|
|
2
|
+
import { SVGItem } from './SVGItem';
|
|
3
|
+
export declare const cxProperty: Property<Ellipse, any>;
|
|
4
|
+
export declare const cyProperty: Property<Ellipse, any>;
|
|
5
|
+
export declare const rxProperty: Property<Ellipse, any>;
|
|
6
|
+
export declare const ryProperty: Property<Ellipse, any>;
|
|
7
|
+
export declare class Ellipse extends SVGItem {
|
|
8
|
+
cx: any;
|
|
9
|
+
cy: any;
|
|
10
|
+
rx: any;
|
|
11
|
+
ry: any;
|
|
12
|
+
constructor();
|
|
13
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Property } from '@nativescript/core';
|
|
2
|
+
import { SVGItem } from './SVGItem';
|
|
3
|
+
export const cxProperty = new Property({
|
|
4
|
+
name: 'cx'
|
|
5
|
+
});
|
|
6
|
+
export const cyProperty = new Property({
|
|
7
|
+
name: 'cy'
|
|
8
|
+
});
|
|
9
|
+
export const rxProperty = new Property({
|
|
10
|
+
name: 'rx'
|
|
11
|
+
});
|
|
12
|
+
export const ryProperty = new Property({
|
|
13
|
+
name: 'ry'
|
|
14
|
+
});
|
|
15
|
+
import { DOMParser } from '@xmldom/xmldom';
|
|
16
|
+
export class Ellipse extends SVGItem {
|
|
17
|
+
constructor() {
|
|
18
|
+
super();
|
|
19
|
+
this._dom = new DOMParser().parseFromString('<ellipse></ellipse>');
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
cxProperty.register(Ellipse);
|
|
23
|
+
cyProperty.register(Ellipse);
|
|
24
|
+
rxProperty.register(Ellipse);
|
|
25
|
+
ryProperty.register(Ellipse);
|
|
26
|
+
//# sourceMappingURL=Ellipse.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Ellipse.js","sourceRoot":"","sources":["../../../../packages/canvas-svg/Elements/Ellipse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,MAAM,CAAC,MAAM,UAAU,GAAG,IAAI,QAAQ,CAAe;IACpD,IAAI,EAAE,IAAI;CACV,CAAC,CAAC;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,IAAI,QAAQ,CAAe;IACpD,IAAI,EAAE,IAAI;CACV,CAAC,CAAC;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,IAAI,QAAQ,CAAe;IACpD,IAAI,EAAE,IAAI;CACV,CAAC,CAAC;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,IAAI,QAAQ,CAAe;IACpD,IAAI,EAAE,IAAI;CACV,CAAC,CAAC;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C,MAAM,OAAO,OAAQ,SAAQ,OAAO;IAMnC;QACC,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,IAAI,GAAG,IAAI,SAAS,EAAE,CAAC,eAAe,CAAC,qBAAqB,CAAC,CAAC;IACpE,CAAC;CACD;AAED,UAAU,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;AAC7B,UAAU,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;AAC7B,UAAU,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;AAC7B,UAAU,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC"}
|
package/Elements/G.d.ts
ADDED
package/Elements/G.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"G.js","sourceRoot":"","sources":["../../../../packages/canvas-svg/Elements/G.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C,MAAM,OAAO,CAAE,SAAQ,OAAO;IAK7B;QACC,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,IAAI,GAAG,IAAI,SAAS,EAAE,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC;IACxD,CAAC;CACD"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
var _Image_loadedSrc;
|
|
2
|
+
// import { ImageAsset } from "@nativescript/canvas";
|
|
3
|
+
import { SVGItem } from './SVGItem';
|
|
4
|
+
const b64Extensions = {
|
|
5
|
+
'/': 'jpg',
|
|
6
|
+
i: 'png',
|
|
7
|
+
R: 'gif',
|
|
8
|
+
U: 'webp'
|
|
9
|
+
};
|
|
10
|
+
function b64WithoutPrefix(b64) {
|
|
11
|
+
return b64.split(',')[1];
|
|
12
|
+
}
|
|
13
|
+
function getMIMEforBase64String(b64) {
|
|
14
|
+
let input = b64;
|
|
15
|
+
if (b64.includes(',')) {
|
|
16
|
+
input = b64WithoutPrefix(b64);
|
|
17
|
+
}
|
|
18
|
+
const first = input.charAt(0);
|
|
19
|
+
const mime = b64Extensions[first];
|
|
20
|
+
if (!mime) {
|
|
21
|
+
throw new Error('Unknown Base64 MIME type: ' + b64);
|
|
22
|
+
}
|
|
23
|
+
return mime;
|
|
24
|
+
}
|
|
25
|
+
import { DOMParser } from '@xmldom/xmldom';
|
|
26
|
+
export class Image extends SVGItem {
|
|
27
|
+
// @ts-ignore
|
|
28
|
+
// #asset = new ImageAsset();
|
|
29
|
+
constructor() {
|
|
30
|
+
super();
|
|
31
|
+
this.xlink = {};
|
|
32
|
+
this.x = 0;
|
|
33
|
+
this.y = 0;
|
|
34
|
+
// @ts-ignore
|
|
35
|
+
_Image_loadedSrc.set(this, void 0);
|
|
36
|
+
this._dom = new DOMParser().parseFromString('<image></image>');
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
_Image_loadedSrc = new WeakMap();
|
|
40
|
+
//# sourceMappingURL=Image.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Image.js","sourceRoot":"","sources":["../../../../packages/canvas-svg/Elements/Image.ts"],"names":[],"mappings":";AAAA,qDAAqD;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,MAAM,aAAa,GAAG;IACrB,GAAG,EAAE,KAAK;IACV,CAAC,EAAE,KAAK;IACR,CAAC,EAAE,KAAK;IACR,CAAC,EAAE,MAAM;CACT,CAAC;AAEF,SAAS,gBAAgB,CAAC,GAAG;IAC5B,OAAO,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;AAC1B,CAAC;AAED,SAAS,sBAAsB,CAAC,GAAG;IAClC,IAAI,KAAK,GAAG,GAAG,CAAC;IAChB,IAAI,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;QACtB,KAAK,GAAG,gBAAgB,CAAC,GAAG,CAAC,CAAC;KAC9B;IACD,MAAM,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IAC9B,MAAM,IAAI,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC;IAClC,IAAI,CAAC,IAAI,EAAE;QACV,MAAM,IAAI,KAAK,CAAC,4BAA4B,GAAG,GAAG,CAAC,CAAC;KACpD;IACD,OAAO,IAAI,CAAC;AACb,CAAC;AAED,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C,MAAM,OAAO,KAAM,SAAQ,OAAO;IAOjC,aAAa;IACb,6BAA6B;IAE7B;QACC,KAAK,EAAE,CAAC;QAVT,UAAK,GAAsB,EAAE,CAAC;QAE9B,MAAC,GAAQ,CAAC,CAAC;QACX,MAAC,GAAQ,CAAC,CAAC;QACX,aAAa;QACb,mCAAmB;QAMlB,IAAI,CAAC,IAAI,GAAG,IAAI,SAAS,EAAE,CAAC,eAAe,CAAC,iBAAiB,CAAC,CAAC;IAChE,CAAC;CACD"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Property } from '@nativescript/core';
|
|
2
|
+
import { SVGItem } from './SVGItem';
|
|
3
|
+
export declare const x1Property: Property<Line, any>;
|
|
4
|
+
export declare const y1Property: Property<Line, any>;
|
|
5
|
+
export declare const x2Property: Property<Line, any>;
|
|
6
|
+
export declare const y2Property: Property<Line, any>;
|
|
7
|
+
export declare class Line extends SVGItem {
|
|
8
|
+
x1: any;
|
|
9
|
+
y1: any;
|
|
10
|
+
x2: any;
|
|
11
|
+
y2: any;
|
|
12
|
+
constructor();
|
|
13
|
+
}
|
package/Elements/Line.js
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Property } from '@nativescript/core';
|
|
2
|
+
import { SVGItem } from './SVGItem';
|
|
3
|
+
export const x1Property = new Property({
|
|
4
|
+
name: 'x1'
|
|
5
|
+
});
|
|
6
|
+
export const y1Property = new Property({
|
|
7
|
+
name: 'y1'
|
|
8
|
+
});
|
|
9
|
+
export const x2Property = new Property({
|
|
10
|
+
name: 'x2'
|
|
11
|
+
});
|
|
12
|
+
export const y2Property = new Property({
|
|
13
|
+
name: 'y2'
|
|
14
|
+
});
|
|
15
|
+
import { DOMParser } from '@xmldom/xmldom';
|
|
16
|
+
export class Line extends SVGItem {
|
|
17
|
+
constructor() {
|
|
18
|
+
super();
|
|
19
|
+
this._dom = new DOMParser().parseFromString('<line></line>');
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
x1Property.register(Line);
|
|
23
|
+
x2Property.register(Line);
|
|
24
|
+
y1Property.register(Line);
|
|
25
|
+
y2Property.register(Line);
|
|
26
|
+
//# sourceMappingURL=Line.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Line.js","sourceRoot":"","sources":["../../../../packages/canvas-svg/Elements/Line.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,MAAM,CAAC,MAAM,UAAU,GAAG,IAAI,QAAQ,CAAY;IACjD,IAAI,EAAE,IAAI;CACV,CAAC,CAAC;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,IAAI,QAAQ,CAAY;IACjD,IAAI,EAAE,IAAI;CACV,CAAC,CAAC;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,IAAI,QAAQ,CAAY;IACjD,IAAI,EAAE,IAAI;CACV,CAAC,CAAC;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,IAAI,QAAQ,CAAY;IACjD,IAAI,EAAE,IAAI;CACV,CAAC,CAAC;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C,MAAM,OAAO,IAAK,SAAQ,OAAO;IAMhC;QACC,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,IAAI,GAAG,IAAI,SAAS,EAAE,CAAC,eAAe,CAAC,eAAe,CAAC,CAAC;IAC9D,CAAC;CACD;AAED,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;AAC1B,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;AAC1B,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;AAC1B,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { SVGItem } from './SVGItem';
|
|
2
|
+
import { DOMParser } from '@xmldom/xmldom';
|
|
3
|
+
export class LinearGradient extends SVGItem {
|
|
4
|
+
constructor() {
|
|
5
|
+
super();
|
|
6
|
+
this.x1 = '0%';
|
|
7
|
+
this.y1 = '0%';
|
|
8
|
+
this.x2 = '100%';
|
|
9
|
+
this.y2 = '0%';
|
|
10
|
+
this._dom = new DOMParser().parseFromString('<linear-gradient></linear-gradient>');
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=LinearGradient.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LinearGradient.js","sourceRoot":"","sources":["../../../../packages/canvas-svg/Elements/LinearGradient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C,MAAM,OAAO,cAAe,SAAQ,OAAO;IAS1C;QACC,KAAK,EAAE,CAAC;QART,OAAE,GAAQ,IAAI,CAAC;QACf,OAAE,GAAQ,IAAI,CAAC;QACf,OAAE,GAAQ,MAAM,CAAC;QACjB,OAAE,GAAQ,IAAI,CAAC;QAMd,IAAI,CAAC,IAAI,GAAG,IAAI,SAAS,EAAE,CAAC,eAAe,CAAC,qCAAqC,CAAC,CAAC;IACpF,CAAC;CACD"}
|
package/Elements/Path.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Property } from '@nativescript/core';
|
|
2
|
+
import { SVGItem } from './SVGItem';
|
|
3
|
+
export const dProperty = new Property({
|
|
4
|
+
name: 'd'
|
|
5
|
+
});
|
|
6
|
+
import { DOMParser } from '@xmldom/xmldom';
|
|
7
|
+
export class Path extends SVGItem {
|
|
8
|
+
constructor() {
|
|
9
|
+
super();
|
|
10
|
+
this._dom = new DOMParser().parseFromString('<path></path>');
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
dProperty.register(Path);
|
|
14
|
+
//# sourceMappingURL=Path.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Path.js","sourceRoot":"","sources":["../../../../packages/canvas-svg/Elements/Path.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,MAAM,CAAC,MAAM,SAAS,GAAG,IAAI,QAAQ,CAAe;IACnD,IAAI,EAAE,GAAG;CACT,CAAC,CAAC;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C,MAAM,OAAO,IAAK,SAAQ,OAAO;IAGhC;QACC,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,IAAI,GAAG,IAAI,SAAS,EAAE,CAAC,eAAe,CAAC,eAAe,CAAC,CAAC;IAC9D,CAAC;CACD;AAED,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { SVGItem } from './SVGItem';
|
|
2
|
+
import { DOMParser } from '@xmldom/xmldom';
|
|
3
|
+
export class Pattern extends SVGItem {
|
|
4
|
+
constructor() {
|
|
5
|
+
super();
|
|
6
|
+
this._dom = new DOMParser().parseFromString('<pattern></pattern>');
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=Pattern.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Pattern.js","sourceRoot":"","sources":["../../../../packages/canvas-svg/Elements/Pattern.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C,MAAM,OAAO,OAAQ,SAAQ,OAAO;IACnC;QACC,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,IAAI,GAAG,IAAI,SAAS,EAAE,CAAC,eAAe,CAAC,qBAAqB,CAAC,CAAC;IACpE,CAAC;CACD"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Property } from '@nativescript/core';
|
|
2
|
+
import { SVGItem } from './SVGItem';
|
|
3
|
+
export const pointsProperty = new Property({
|
|
4
|
+
name: 'points'
|
|
5
|
+
});
|
|
6
|
+
import { DOMParser } from '@xmldom/xmldom';
|
|
7
|
+
export class Polygon extends SVGItem {
|
|
8
|
+
constructor() {
|
|
9
|
+
super();
|
|
10
|
+
this._dom = new DOMParser().parseFromString('<polygon></polygon>');
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
pointsProperty.register(Polygon);
|
|
14
|
+
//# sourceMappingURL=Polygon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Polygon.js","sourceRoot":"","sources":["../../../../packages/canvas-svg/Elements/Polygon.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,QAAQ,CAAe;IACxD,IAAI,EAAE,QAAQ;CACd,CAAC,CAAC;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C,MAAM,OAAO,OAAQ,SAAQ,OAAO;IAGnC;QACC,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,IAAI,GAAG,IAAI,SAAS,EAAE,CAAC,eAAe,CAAC,qBAAqB,CAAC,CAAC;IACpE,CAAC;CACD;AAED,cAAc,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Property } from '@nativescript/core/ui/core/view';
|
|
2
|
+
import { SVGItem } from './SVGItem';
|
|
3
|
+
export const pointsProperty = new Property({
|
|
4
|
+
name: 'points'
|
|
5
|
+
});
|
|
6
|
+
import { DOMParser } from '@xmldom/xmldom';
|
|
7
|
+
export class Polyline extends SVGItem {
|
|
8
|
+
constructor() {
|
|
9
|
+
super();
|
|
10
|
+
this._dom = new DOMParser().parseFromString('<polyline></polyline>');
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
pointsProperty.register(Polyline);
|
|
14
|
+
//# sourceMappingURL=Polyline.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Polyline.js","sourceRoot":"","sources":["../../../../packages/canvas-svg/Elements/Polyline.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,QAAQ,CAAgB;IACzD,IAAI,EAAE,QAAQ;CACd,CAAC,CAAC;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C,MAAM,OAAO,QAAS,SAAQ,OAAO;IAGpC;QACC,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,IAAI,GAAG,IAAI,SAAS,EAAE,CAAC,eAAe,CAAC,uBAAuB,CAAC,CAAC;IACtE,CAAC;CACD;AAED,cAAc,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC"}
|
package/Elements/Rect.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { SVGItem } from './SVGItem';
|
|
2
|
+
import { DOMParser } from '@xmldom/xmldom';
|
|
3
|
+
export class Rect extends SVGItem {
|
|
4
|
+
constructor() {
|
|
5
|
+
super();
|
|
6
|
+
this.x = 0;
|
|
7
|
+
this.y = 0;
|
|
8
|
+
this.rx = 0;
|
|
9
|
+
this.ry = 0;
|
|
10
|
+
this._dom = new DOMParser().parseFromString('<rect></rect>');
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=Rect.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Rect.js","sourceRoot":"","sources":["../../../../packages/canvas-svg/Elements/Rect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C,MAAM,OAAO,IAAK,SAAQ,OAAO;IAMhC;QACC,KAAK,EAAE,CAAC;QANT,MAAC,GAAQ,CAAC,CAAC;QACX,MAAC,GAAQ,CAAC,CAAC;QACX,OAAE,GAAQ,CAAC,CAAC;QACZ,OAAE,GAAQ,CAAC,CAAC;QAIX,IAAI,CAAC,IAAI,GAAG,IAAI,SAAS,EAAE,CAAC,eAAe,CAAC,eAAe,CAAC,CAAC;IAC9D,CAAC;CACD"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { View, Style, CssProperty, Property } from '@nativescript/core';
|
|
2
|
+
export declare const strokeProperty: CssProperty<Style, any>;
|
|
3
|
+
export declare const strokeWidthProperty: CssProperty<Style, number>;
|
|
4
|
+
export declare const fillProperty: CssProperty<Style, any>;
|
|
5
|
+
export declare const fillRuleProperty: CssProperty<Style, any>;
|
|
6
|
+
export declare const fillOpacityProperty: CssProperty<Style, any>;
|
|
7
|
+
export declare const stopColorProperty: CssProperty<Style, any>;
|
|
8
|
+
export declare const strokeLinecapProperty: CssProperty<Style, any>;
|
|
9
|
+
export declare const strokeLinejoinProperty: CssProperty<Style, any>;
|
|
10
|
+
export declare const strokeMiterlimitProperty: CssProperty<Style, any>;
|
|
11
|
+
export declare const srcProperty: any;
|
|
12
|
+
export declare const syncProperty: Property<Svg, boolean>;
|
|
13
|
+
import { SVGItem } from './SVGItem';
|
|
14
|
+
export declare class Svg extends View {
|
|
15
|
+
static readyEvent: string;
|
|
16
|
+
_dom: any;
|
|
17
|
+
_serializer: any;
|
|
18
|
+
_svg: any;
|
|
19
|
+
src: string;
|
|
20
|
+
__children: any[];
|
|
21
|
+
__attachedToDom: boolean;
|
|
22
|
+
constructor();
|
|
23
|
+
onLayout(left: number, top: number, right: number, bottom: number): void;
|
|
24
|
+
onMeasure(widthMeasureSpec: number, heightMeasureSpec: number): void;
|
|
25
|
+
__redraw(): void;
|
|
26
|
+
onLoaded(): void;
|
|
27
|
+
onUnloaded(): void;
|
|
28
|
+
createNativeView(): Object;
|
|
29
|
+
initNativeView(): void;
|
|
30
|
+
addChild(view: SVGItem): void;
|
|
31
|
+
removeChild(view: SVGItem): void;
|
|
32
|
+
}
|