@zyzgroup/core-web 0.0.8 → 0.0.10
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/dist/zyzgroup_core_web.iife.js +9 -3
- package/dist/zyzgroup_core_web.iife.js.map +1 -1
- package/dist/zyzgroup_core_web.js +8324 -4506
- package/dist/zyzgroup_core_web.js.map +1 -1
- package/dist/zyzgroup_core_web.umd.cjs +9 -3
- package/dist/zyzgroup_core_web.umd.cjs.map +1 -1
- package/package.json +1 -1
- package/types/DOMKeyboardKeyCode.d.ts.map +1 -1
- package/types/animate.d.ts.map +1 -1
- package/types/canvas/canvas2svg.d.ts +104 -0
- package/types/canvas/canvas2svg.d.ts.map +1 -0
- package/types/canvas/index.d.ts +67 -0
- package/types/canvas/index.d.ts.map +1 -0
- package/types/canvas/shapes/arrow.d.ts +9 -0
- package/types/canvas/shapes/arrow.d.ts.map +1 -0
- package/types/canvas/shapes/ball.d.ts +22 -0
- package/types/canvas/shapes/ball.d.ts.map +1 -0
- package/types/canvas/shapes/ball3d.d.ts +21 -0
- package/types/canvas/shapes/ball3d.d.ts.map +1 -0
- package/types/canvas/shapes/box.d.ts +16 -0
- package/types/canvas/shapes/box.d.ts.map +1 -0
- package/types/canvas/shapes/light.d.ts +9 -0
- package/types/canvas/shapes/light.d.ts.map +1 -0
- package/types/canvas/shapes/line.d.ts +21 -0
- package/types/canvas/shapes/line.d.ts.map +1 -0
- package/types/canvas/shapes/point3d.d.ts +20 -0
- package/types/canvas/shapes/point3d.d.ts.map +1 -0
- package/types/canvas/shapes/segment.d.ts +20 -0
- package/types/canvas/shapes/segment.d.ts.map +1 -0
- package/types/canvas/shapes/shapes.d.ts +6 -0
- package/types/canvas/shapes/shapes.d.ts.map +1 -0
- package/types/canvas/shapes/ship.d.ts +10 -0
- package/types/canvas/shapes/ship.d.ts.map +1 -0
- package/types/canvas/shapes/slider.d.ts +24 -0
- package/types/canvas/shapes/slider.d.ts.map +1 -0
- package/types/canvas/shapes/tree.d.ts +15 -0
- package/types/canvas/shapes/tree.d.ts.map +1 -0
- package/types/canvas/shapes/triangle-light.d.ts +16 -0
- package/types/canvas/shapes/triangle-light.d.ts.map +1 -0
- package/types/canvas/shapes/triangle.d.ts +13 -0
- package/types/canvas/shapes/triangle.d.ts.map +1 -0
- package/types/dom.d.ts +21 -21
- package/types/dom.d.ts.map +1 -1
- package/types/env.d.ts +10 -0
- package/types/env.d.ts.map +1 -1
- package/types/file.d.ts +1 -10
- package/types/file.d.ts.map +1 -1
- package/types/image.d.ts +47 -41
- package/types/image.d.ts.map +1 -1
- package/types/index.d.ts +5 -2
- package/types/index.d.ts.map +1 -1
- package/types/localstorage.d.ts +2 -1
- package/types/localstorage.d.ts.map +1 -1
- package/types/position.d.ts +10 -6
- package/types/position.d.ts.map +1 -1
- package/types/scrollparent.d.ts +2 -0
- package/types/scrollparent.d.ts.map +1 -0
- package/types/sprite-math/index.d.ts.map +1 -1
- package/types/sprite-math/matrix.d.ts +10 -10
- package/types/sprite-math/matrix.d.ts.map +1 -1
- package/types/sprite-math/vector.d.ts +4 -4
- package/types/sprite-math/vector.d.ts.map +1 -1
- package/types/url.d.ts +3 -2
- package/types/url.d.ts.map +1 -1
- package/types/video.d.ts +5 -0
- package/types/video.d.ts.map +1 -0
- package/types/visual_util.d.ts +86 -0
- package/types/visual_util.d.ts.map +1 -0
- package/types/mouse.d.ts +0 -2
- package/types/mouse.d.ts.map +0 -1
- package/types/theme.d.ts +0 -2
- package/types/theme.d.ts.map +0 -1
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DOMKeyboardKeyCode.d.ts","sourceRoot":"","sources":["../src/DOMKeyboardKeyCode.ts"],"names":[],"mappings":"AAAA,qBAAa,kBAAkB;WACf,QAAQ,CAAC,KAAK,EAAE,aAAa,GAAG;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE;WAiB7D,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM;WAqBlC,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAa7C,OAAO,CAAC,MAAM,CAAC,UAAU,
|
|
1
|
+
{"version":3,"file":"DOMKeyboardKeyCode.d.ts","sourceRoot":"","sources":["../src/DOMKeyboardKeyCode.ts"],"names":[],"mappings":"AAAA,qBAAa,kBAAkB;WACf,QAAQ,CAAC,KAAK,EAAE,aAAa,GAAG;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE;WAiB7D,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM;WAqBlC,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAa7C,OAAO,CAAC,MAAM,CAAC,UAAU,CAyGvB;IAEF,OAAO,CAAC,MAAM,CAAC,UAAU,CAyGvB;CACH"}
|
package/types/animate.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"animate.d.ts","sourceRoot":"","sources":["../src/animate.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"animate.d.ts","sourceRoot":"","sources":["../src/animate.ts"],"names":[],"mappings":"AA4BA,eAAO,MAAM,YAAY,0BACA,MAAM,MAAM,MAAM,KAAK,IAAI,SAOnD,CAAC;AAEF,eAAO,MAAM,aAAa,aACd,MAAM,gBAET,wBAAwB,gBACf,MAAM,MAChB,MAAM,KACP,IAAI,SAQV,CAAC"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
declare const STYLES: Record<string, {
|
|
2
|
+
svgAttr?: string;
|
|
3
|
+
canvas?: string | number | string[] | number[];
|
|
4
|
+
svg?: string | number | null;
|
|
5
|
+
apply?: string;
|
|
6
|
+
}>;
|
|
7
|
+
declare class CustomCanvasGradient {
|
|
8
|
+
__root: SVGElement;
|
|
9
|
+
__ctx: CustomCanvasContext;
|
|
10
|
+
constructor(gradientNode: SVGElement, ctx: CustomCanvasContext);
|
|
11
|
+
addColorStop(offset: number, color: string): void;
|
|
12
|
+
}
|
|
13
|
+
declare class CustomCanvasPattern {
|
|
14
|
+
__root: SVGElement;
|
|
15
|
+
__ctx: CustomCanvasContext;
|
|
16
|
+
constructor(pattern: SVGElement, ctx: CustomCanvasContext);
|
|
17
|
+
}
|
|
18
|
+
declare class CustomCanvasContext {
|
|
19
|
+
[index: keyof typeof STYLES]: any;
|
|
20
|
+
__document: Document;
|
|
21
|
+
__canvas: HTMLCanvasElement;
|
|
22
|
+
__ctx: CanvasRenderingContext2D;
|
|
23
|
+
width: number;
|
|
24
|
+
height: number;
|
|
25
|
+
__styleStack: Record<string, any>[];
|
|
26
|
+
__groupStack: SVGElement[];
|
|
27
|
+
__rootSVG: SVGElement;
|
|
28
|
+
__ids: Record<string, string>;
|
|
29
|
+
__SVGdefs: SVGDefsElement;
|
|
30
|
+
__currentElement: SVGElement;
|
|
31
|
+
__currentElementsToStyle: {
|
|
32
|
+
element: SVGElement;
|
|
33
|
+
children: SVGElement[];
|
|
34
|
+
} | null;
|
|
35
|
+
constructor({ canvas, width, height, enableMirroring }: {
|
|
36
|
+
canvas?: HTMLCanvasElement;
|
|
37
|
+
width?: number;
|
|
38
|
+
height?: number;
|
|
39
|
+
enableMirroring?: boolean;
|
|
40
|
+
});
|
|
41
|
+
__setDefaultStyles(): void;
|
|
42
|
+
__getStyleState(): Record<string, any>;
|
|
43
|
+
__applyStyleState(styleState: Record<string, any>): void;
|
|
44
|
+
__createElement(elementName: string, properties?: Record<string, any>, resetFill?: boolean): SVGElement;
|
|
45
|
+
__applyStyleToCurrentElement(type: "fill" | "stroke"): void;
|
|
46
|
+
__closestGroupOrSvg(node?: SVGElement | null): SVGElement;
|
|
47
|
+
getSerializedSvg(fixNamedEntities: boolean): string;
|
|
48
|
+
getSvg(): SVGElement;
|
|
49
|
+
save(): void;
|
|
50
|
+
restore(): void;
|
|
51
|
+
__addTransform(t: string): void;
|
|
52
|
+
scale(x: number, y?: number): void;
|
|
53
|
+
rotate(angle: number): void;
|
|
54
|
+
translate(x: number, y: number): void;
|
|
55
|
+
transform(a: number, b: number, c: number, d: number, e: number, f: number): void;
|
|
56
|
+
beginPath(): void;
|
|
57
|
+
__applyCurrentDefaultPath(): void;
|
|
58
|
+
__addPathCommand(command: string): void;
|
|
59
|
+
moveTo(x: number, y: number): void;
|
|
60
|
+
closePath(): void;
|
|
61
|
+
lineTo(x: number, y: number): void;
|
|
62
|
+
bezierCurveTo(cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, y: number): void;
|
|
63
|
+
quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): void;
|
|
64
|
+
normalize(vector: [number, number]): number[];
|
|
65
|
+
arcTo(x1: number, y1: number, x2: number, y2: number, radius: number): void;
|
|
66
|
+
stroke(): void;
|
|
67
|
+
fill(): void;
|
|
68
|
+
rect(x: number, y: number, width: number, height: number): void;
|
|
69
|
+
fillRect(x: number, y: number, width: number, height: number): void;
|
|
70
|
+
strokeRect(x: number, y: number, width: number, height: number): void;
|
|
71
|
+
__clearCanvas(): void;
|
|
72
|
+
clearRect(x: number, y: number, width: number, height: number): void;
|
|
73
|
+
createLinearGradient(x1: number, y1: number, x2: number, y2: number): CustomCanvasGradient;
|
|
74
|
+
createRadialGradient(x0: number, y0: number, r0: number, x1: number, y1: number, r1: number): CustomCanvasGradient;
|
|
75
|
+
__parseFont(): {
|
|
76
|
+
style: string;
|
|
77
|
+
size: string;
|
|
78
|
+
family: string;
|
|
79
|
+
weight: string;
|
|
80
|
+
decoration: string;
|
|
81
|
+
href: null;
|
|
82
|
+
};
|
|
83
|
+
__wrapTextLink(font: {
|
|
84
|
+
href: string | null;
|
|
85
|
+
}, element: HTMLElement): HTMLElement | SVGElement;
|
|
86
|
+
__applyText(text: string, x: number, y: number, action: "stroke" | "fill"): void;
|
|
87
|
+
fillText(text: string, x: number, y: number): void;
|
|
88
|
+
strokeText(text: string, x: number, y: number): void;
|
|
89
|
+
measureText(text: string): TextMetrics;
|
|
90
|
+
arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, counterClockwise?: number): void;
|
|
91
|
+
clip(): void;
|
|
92
|
+
drawImage(...args: any[]): void;
|
|
93
|
+
createPattern(image: HTMLImageElement | HTMLCanvasElement | CustomCanvasContext, repetition: number): CustomCanvasPattern;
|
|
94
|
+
setLineDash(dashArray: number[]): void;
|
|
95
|
+
drawFocusRing(): void;
|
|
96
|
+
createImageData(): void;
|
|
97
|
+
getImageData(): void;
|
|
98
|
+
putImageData(): void;
|
|
99
|
+
globalCompositeOperation(): void;
|
|
100
|
+
setTransform(): void;
|
|
101
|
+
}
|
|
102
|
+
export declare const C2S: typeof CustomCanvasContext;
|
|
103
|
+
export {};
|
|
104
|
+
//# sourceMappingURL=canvas2svg.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"canvas2svg.d.ts","sourceRoot":"","sources":["../../src/canvas/canvas2svg.ts"],"names":[],"mappings":"AAqGA,QAAA,MAAM,MAAM,EAAE,MAAM,CAClB,MAAM,EACN;IACE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM,EAAE,CAAC;IAC/C,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAwEF,CAAC;AAEF,cAAM,oBAAoB;IACxB,MAAM,EAAE,UAAU,CAAC;IACnB,KAAK,EAAE,mBAAmB,CAAC;gBACf,YAAY,EAAE,UAAU,EAAE,GAAG,EAAE,mBAAmB;IAQ9D,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;CAwB3C;AAED,cAAM,mBAAmB;IACvB,MAAM,EAAE,UAAU,CAAC;IACnB,KAAK,EAAE,mBAAmB,CAAC;gBACf,OAAO,EAAE,UAAU,EAAE,GAAG,EAAE,mBAAmB;C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AAG,EAAE;IAyGxB,aAAa,CACX,KAAK,EAAE,gBAAgB,GAAG,iBAAiB,GAAG,mBAAmB,EACjE,UAAU,EAAE,MAAM;IA4CpB,WAAW,CAAC,SAAS,EAAE,MAAM,EAAE;IAQ/B,aAAa;IAGb,eAAe;IAGf,YAAY;IAGZ,YAAY;IAGZ,wBAAwB;IAGxB,YAAY;CAGb;AAED,eAAO,MAAM,GAAG,4BAAsB,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
export * from "./canvas2svg";
|
|
2
|
+
export * from "./shapes/shapes";
|
|
3
|
+
export * from "./shapes/arrow";
|
|
4
|
+
export * from "./shapes/ball";
|
|
5
|
+
export * from "./shapes/ball3d";
|
|
6
|
+
export * from "./shapes/box";
|
|
7
|
+
export * from "./shapes/light";
|
|
8
|
+
export * from "./shapes/line";
|
|
9
|
+
export * from "./shapes/point3d";
|
|
10
|
+
export * from "./shapes/ship";
|
|
11
|
+
export * from "./shapes/slider";
|
|
12
|
+
export * from "./shapes/triangle";
|
|
13
|
+
export * from "./shapes/triangle-light";
|
|
14
|
+
export * from "./shapes/tree";
|
|
15
|
+
export * from "./shapes/segment";
|
|
16
|
+
import { VisualPoint, VisualRect, VisualPointerEvent, VisualKeyboardEvent } from "../visual_util";
|
|
17
|
+
export declare class CanvasPath {
|
|
18
|
+
canvas: HTMLCanvasElement;
|
|
19
|
+
context: CanvasRenderingContext2D;
|
|
20
|
+
mouse: VisualPointerEvent;
|
|
21
|
+
keyboard: VisualKeyboardEvent;
|
|
22
|
+
constructor(canvas: HTMLCanvasElement);
|
|
23
|
+
getMouseRotation(p: VisualPoint): number;
|
|
24
|
+
followMouse(p: VisualPoint, speed: number): VisualPoint;
|
|
25
|
+
followMouseWithAcceleration(p: VisualPoint & {
|
|
26
|
+
vx: number;
|
|
27
|
+
vy: number;
|
|
28
|
+
ax?: number;
|
|
29
|
+
ay?: number;
|
|
30
|
+
}, force?: number): VisualPoint & {
|
|
31
|
+
vx: number;
|
|
32
|
+
vy: number;
|
|
33
|
+
ax?: number | undefined;
|
|
34
|
+
ay?: number | undefined;
|
|
35
|
+
};
|
|
36
|
+
getMouseDistance(p: VisualPoint): number;
|
|
37
|
+
clearRect(): this;
|
|
38
|
+
lineWidth(lineWidth: number): this;
|
|
39
|
+
fillStyle(style: string | CanvasGradient | CanvasPattern): this;
|
|
40
|
+
fill(): this;
|
|
41
|
+
strokeStyle(style: string | CanvasGradient | CanvasPattern): this;
|
|
42
|
+
stroke(): this;
|
|
43
|
+
createLinearGradient(p0: VisualPoint, p1: VisualPoint, colorStops: Record<number, string>): CanvasGradient;
|
|
44
|
+
createRadialGradient(p0: Required<VisualPoint>, p1: Required<VisualPoint>, colorStops: Record<number, string>): CanvasGradient;
|
|
45
|
+
moveTo(p: VisualPoint): void;
|
|
46
|
+
closePath(): void;
|
|
47
|
+
lineTo(p0: VisualPoint, p1: VisualPoint): void;
|
|
48
|
+
drawMouseMoveLine(): void;
|
|
49
|
+
drawMouseMoveBrushLine({ brush_size, brush_density, brush_color }?: {
|
|
50
|
+
brush_size: number;
|
|
51
|
+
brush_density: number;
|
|
52
|
+
brush_color: string;
|
|
53
|
+
}): void;
|
|
54
|
+
quadraticCurveTo(startPoint: VisualPoint, controlPoint: VisualPoint, endPoint: VisualPoint): void;
|
|
55
|
+
drawQuadraticCurveLine(points: VisualPoint[]): Error | undefined;
|
|
56
|
+
quadraticThroughCurveTo(startPoint: VisualPoint, controlPoint: VisualPoint, endPoint: VisualPoint): void;
|
|
57
|
+
drawQuadraticThroughCurveLine(points: VisualPoint[]): Error | undefined;
|
|
58
|
+
drawQuadraticThroughCurveLineBetter(points: VisualPoint[]): Error | undefined;
|
|
59
|
+
fillRect(rect: VisualRect): void;
|
|
60
|
+
drawImage(element: HTMLOrSVGImageElement | HTMLVideoElement | HTMLCanvasElement | ImageBitmap | OffscreenCanvas, dx?: number, dy?: number): void;
|
|
61
|
+
getImageData(rect?: VisualRect, settings?: ImageDataSettings): ImageData;
|
|
62
|
+
putImageData(imageData: ImageData, dx?: number, dy?: number): void;
|
|
63
|
+
drawShape(shape: {
|
|
64
|
+
draw: (context: CanvasRenderingContext2D) => void;
|
|
65
|
+
}): void;
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/canvas/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC;AACxC,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AAEjC,OAAO,EACL,WAAW,EACX,UAAU,EACV,kBAAkB,EAClB,mBAAmB,EAQpB,MAAM,gBAAgB,CAAC;AAExB,qBAAa,UAAU;IACrB,MAAM,EAAE,iBAAiB,CAAC;IAC1B,OAAO,EAAE,wBAAwB,CAAC;IAClC,KAAK,EAAE,kBAAkB,CAAC;IAC1B,QAAQ,EAAE,mBAAmB,CAAC;gBAElB,MAAM,EAAE,iBAAiB;IAYrC,gBAAgB,CAAC,CAAC,EAAE,WAAW;IAI/B,WAAW,CAAC,CAAC,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM;IAQzC,2BAA2B,CACzB,CAAC,EAAE,WAAW,GAAG;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAC;QAAC,EAAE,CAAC,EAAE,MAAM,CAAC;QAAC,EAAE,CAAC,EAAE,MAAM,CAAA;KAAE,EACrE,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R,YAAY,CACV,IAAI,GAAE,UAKL,EACD,QAAQ,CAAC,EAAE,iBAAiB;IAW9B,YAAY,CAAC,SAAS,EAAE,SAAS,EAAE,EAAE,SAAI,EAAE,EAAE,SAAI;IAIjD,SAAS,CAAC,KAAK,EAAE;QAAE,IAAI,EAAE,CAAC,OAAO,EAAE,wBAAwB,KAAK,IAAI,CAAA;KAAE;CAGvE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"arrow.d.ts","sourceRoot":"","sources":["../../../src/canvas/shapes/arrow.js"],"names":[],"mappings":"AAAA;IACE,uEAKC;IAJC,UAAU;IACV,UAAU;IACV,cAAkB;IAClB,iBAAwB;IAG1B,yBAmBC;CACF"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export class Ball {
|
|
2
|
+
constructor(radius?: number, color?: string);
|
|
3
|
+
x: number;
|
|
4
|
+
y: number;
|
|
5
|
+
radius: number;
|
|
6
|
+
vx: number;
|
|
7
|
+
vy: number;
|
|
8
|
+
mass: number;
|
|
9
|
+
rotation: number;
|
|
10
|
+
scaleX: number;
|
|
11
|
+
scaleY: number;
|
|
12
|
+
color: string | number;
|
|
13
|
+
lineWidth: number;
|
|
14
|
+
draw(context: any): void;
|
|
15
|
+
getBounds(): {
|
|
16
|
+
x: number;
|
|
17
|
+
y: number;
|
|
18
|
+
width: number;
|
|
19
|
+
height: number;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=ball.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ball.d.ts","sourceRoot":"","sources":["../../../src/canvas/shapes/ball.js"],"names":[],"mappings":"AAEA;IACE,6CAYC;IAXC,UAAU;IACV,UAAU;IACV,eAAoB;IACpB,WAAW;IACX,WAAW;IACX,aAAa;IACb,iBAAiB;IACjB,eAAe;IACf,eAAe;IACf,uBAA8B;IAC9B,kBAAkB;IAGpB,yBAgBC;IAED;;;;;MAOC;CACF"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export class Ball3d {
|
|
2
|
+
constructor(radius?: number, color?: string);
|
|
3
|
+
x: number;
|
|
4
|
+
y: number;
|
|
5
|
+
xpos: number;
|
|
6
|
+
ypos: number;
|
|
7
|
+
zpos: number;
|
|
8
|
+
radius: number;
|
|
9
|
+
vx: number;
|
|
10
|
+
vy: number;
|
|
11
|
+
vz: number;
|
|
12
|
+
mass: number;
|
|
13
|
+
rotation: number;
|
|
14
|
+
scaleX: number;
|
|
15
|
+
scaleY: number;
|
|
16
|
+
color: string | number;
|
|
17
|
+
lineWidth: number;
|
|
18
|
+
visible: boolean;
|
|
19
|
+
draw(context: any): void;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=ball3d.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ball3d.d.ts","sourceRoot":"","sources":["../../../src/canvas/shapes/ball3d.js"],"names":[],"mappings":"AAEA;IACE,6CAiBC;IAhBC,UAAU;IACV,UAAU;IACV,aAAa;IACb,aAAa;IACb,aAAa;IACb,eAAoB;IACpB,WAAW;IACX,WAAW;IACX,WAAW;IACX,aAAa;IACb,iBAAiB;IACjB,eAAe;IACf,eAAe;IACf,uBAA8B;IAC9B,kBAAkB;IAClB,iBAAmB;IAGrB,yBAiBC;CACF"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export class Box {
|
|
2
|
+
constructor(width?: number, height?: number, color?: string);
|
|
3
|
+
x: number;
|
|
4
|
+
y: number;
|
|
5
|
+
width: number;
|
|
6
|
+
height: number;
|
|
7
|
+
vx: number;
|
|
8
|
+
vy: number;
|
|
9
|
+
rotation: number;
|
|
10
|
+
scaleX: number;
|
|
11
|
+
scaleY: number;
|
|
12
|
+
color: string | number;
|
|
13
|
+
lineWidth: number;
|
|
14
|
+
draw(context: any): void;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=box.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"box.d.ts","sourceRoot":"","sources":["../../../src/canvas/shapes/box.js"],"names":[],"mappings":"AAEA;IACE,6DAYC;IAXC,UAAU;IACV,UAAU;IACV,cAAkB;IAClB,eAAoB;IACpB,WAAW;IACX,WAAW;IACX,iBAAiB;IACjB,eAAe;IACf,eAAe;IACf,uBAA8B;IAC9B,kBAAkB;IAGpB,yBAgBC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"light.d.ts","sourceRoot":"","sources":["../../../src/canvas/shapes/light.js"],"names":[],"mappings":"AAAA;IACE,qDAKC;IAJC,OAAmC;IACnC,OAAmC;IACnC,OAAmC;IACnC,gBAA2D;IAE7D,4BAEC;CACF"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export class Line {
|
|
2
|
+
constructor(x1: any, y1: any, x2: any, y2: any);
|
|
3
|
+
x: number;
|
|
4
|
+
y: number;
|
|
5
|
+
x1: any;
|
|
6
|
+
y1: any;
|
|
7
|
+
x2: any;
|
|
8
|
+
y2: any;
|
|
9
|
+
rotation: number;
|
|
10
|
+
scaleX: number;
|
|
11
|
+
scaleY: number;
|
|
12
|
+
lineWidth: number;
|
|
13
|
+
draw(context: any): void;
|
|
14
|
+
getBounds(): {
|
|
15
|
+
x: number;
|
|
16
|
+
y: number;
|
|
17
|
+
width: number;
|
|
18
|
+
height: number;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=line.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"line.d.ts","sourceRoot":"","sources":["../../../src/canvas/shapes/line.js"],"names":[],"mappings":"AAAA;IACE,gDAWC;IAVC,UAAU;IACV,UAAU;IACV,QAAmC;IACnC,QAAmC;IACnC,QAAmC;IACnC,QAAmC;IACnC,iBAAiB;IACjB,eAAe;IACf,eAAe;IACf,kBAAkB;IAGpB,yBAaC;IAED;;;;;MA0BC;CACF"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export class Point3d {
|
|
2
|
+
constructor(x: any, y: any, z: any);
|
|
3
|
+
x: any;
|
|
4
|
+
y: any;
|
|
5
|
+
z: any;
|
|
6
|
+
fl: number;
|
|
7
|
+
vpX: number;
|
|
8
|
+
vpY: number;
|
|
9
|
+
cX: number;
|
|
10
|
+
cY: number;
|
|
11
|
+
cZ: number;
|
|
12
|
+
setVanishingPoint(vpX: any, vpY: any): void;
|
|
13
|
+
setCenter(cX: any, cY: any, cZ: any): void;
|
|
14
|
+
rotateX(angleX: any): void;
|
|
15
|
+
rotateY(angleY: any): void;
|
|
16
|
+
rotateZ(angleZ: any): void;
|
|
17
|
+
getScreenX(): number;
|
|
18
|
+
getScreenY(): number;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=point3d.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"point3d.d.ts","sourceRoot":"","sources":["../../../src/canvas/shapes/point3d.js"],"names":[],"mappings":"AAAA;IACE,oCAUC;IATC,OAAgC;IAChC,OAAgC;IAChC,OAAgC;IAChC,WAAa;IACb,YAAY;IACZ,YAAY;IACZ,WAAW;IACX,WAAW;IACX,WAAW;IAGb,4CAGC;IAED,2CAIC;IAED,2BAOC;IAED,2BAOC;IAED,2BAOC;IAED,qBAGC;IAED,qBAGC;CACF"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export class Segment {
|
|
2
|
+
constructor(width: any, height: any, color: any);
|
|
3
|
+
x: number;
|
|
4
|
+
y: number;
|
|
5
|
+
width: any;
|
|
6
|
+
height: any;
|
|
7
|
+
vx: number;
|
|
8
|
+
vy: number;
|
|
9
|
+
rotation: number;
|
|
10
|
+
scaleX: number;
|
|
11
|
+
scaleY: number;
|
|
12
|
+
color: string | number;
|
|
13
|
+
lineWidth: number;
|
|
14
|
+
draw(context: any): void;
|
|
15
|
+
getPin(): {
|
|
16
|
+
x: number;
|
|
17
|
+
y: number;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=segment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"segment.d.ts","sourceRoot":"","sources":["../../../src/canvas/shapes/segment.js"],"names":[],"mappings":"AAEA;IACE,iDAYC;IAXC,UAAU;IACV,UAAU;IACV,WAAkB;IAClB,YAAoB;IACpB,WAAW;IACX,WAAW;IACX,iBAAiB;IACjB,eAAe;IACf,eAAe;IACf,uBAAgE;IAChE,kBAAkB;IAGpB,yBAqCC;IAED;;;MAKC;CACF"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export function roundedRect(ctx: any, x: any, y: any, width: any, height: any, radius: any): void;
|
|
2
|
+
export function drawSpirograph(ctx: any, R: any, r: any, O: any): void;
|
|
3
|
+
export function drawStar(ctx: any, r: any): void;
|
|
4
|
+
export function dynamicStrokeLine(ctx: any, startX: any, startY: any, width: any, height: any): void;
|
|
5
|
+
export function smileFace(ctx: any): void;
|
|
6
|
+
//# sourceMappingURL=shapes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shapes.d.ts","sourceRoot":"","sources":["../../../src/canvas/shapes/shapes.js"],"names":[],"mappings":"AACO,kGAYN;AAEM,uEAoBN;AAEM,iDAeN;AAGM,qGAiBN;AAEM,0CAUN"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ship.d.ts","sourceRoot":"","sources":["../../../src/canvas/shapes/ship.js"],"names":[],"mappings":"AAAA;IAEI,UAAU;IACV,UAAU;IACV,cAAe;IACf,eAAgB;IAChB,iBAAiB;IACjB,mBAAsB;IAGxB,yBAuBC;CACF"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export class Slider {
|
|
2
|
+
constructor(min: any, max: any, value: any);
|
|
3
|
+
min: any;
|
|
4
|
+
max: any;
|
|
5
|
+
value: any;
|
|
6
|
+
onchange: any;
|
|
7
|
+
x: number;
|
|
8
|
+
y: number;
|
|
9
|
+
width: number;
|
|
10
|
+
height: number;
|
|
11
|
+
backColor: string;
|
|
12
|
+
backBorderColor: string;
|
|
13
|
+
backWidth: number;
|
|
14
|
+
backX: number;
|
|
15
|
+
handleColor: string;
|
|
16
|
+
handleBorderColor: string;
|
|
17
|
+
handleHeight: number;
|
|
18
|
+
handleY: number;
|
|
19
|
+
draw(context: any): void;
|
|
20
|
+
updateValue(): void;
|
|
21
|
+
updatePosition(): void;
|
|
22
|
+
captureMouse(element: any): void;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=slider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slider.d.ts","sourceRoot":"","sources":["../../../src/canvas/shapes/slider.js"],"names":[],"mappings":"AAEA;IACE,4CAsBC;IArBC,SAAsC;IACtC,SAAwC;IACxC,WAA8C;IAC9C,cAAoB;IAEpB,UAAU;IACV,UAAU;IACV,cAAe;IACf,eAAiB;IAEjB,kBAA0B;IAC1B,wBAAgC;IAChC,kBAAkB;IAClB,cAAgD;IAEhD,oBAA4B;IAC5B,0BAAkC;IAClC,qBAAqB;IACrB,gBAAgB;IAKlB,yBAoBC;IAED,oBAUC;IAED,uBAMC;IAED,iCAuCC;CACF"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export class Tree {
|
|
2
|
+
x: number;
|
|
3
|
+
y: number;
|
|
4
|
+
xpos: number;
|
|
5
|
+
ypos: number;
|
|
6
|
+
zpos: number;
|
|
7
|
+
scaleX: number;
|
|
8
|
+
scaleY: number;
|
|
9
|
+
color: string;
|
|
10
|
+
alpha: number;
|
|
11
|
+
lineWidth: number;
|
|
12
|
+
branch: number[];
|
|
13
|
+
draw(context: any): void;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=tree.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tree.d.ts","sourceRoot":"","sources":["../../../src/canvas/shapes/tree.js"],"names":[],"mappings":"AAEA;IAEI,UAAU;IACV,UAAU;IACV,aAAa;IACb,aAAa;IACb,aAAa;IACb,eAAe;IACf,eAAe;IACf,cAAsB;IACtB,cAAc;IACd,kBAAkB;IAClB,iBAAgB;IAYlB,yBAgBC;CACF"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export class TriangleLight {
|
|
2
|
+
constructor(a: any, b: any, c: any, color: any);
|
|
3
|
+
pointA: any;
|
|
4
|
+
pointB: any;
|
|
5
|
+
pointC: any;
|
|
6
|
+
color: string | number;
|
|
7
|
+
lineWidth: number;
|
|
8
|
+
alpha: number;
|
|
9
|
+
light: any;
|
|
10
|
+
draw(context: any): void;
|
|
11
|
+
getDepth(): number;
|
|
12
|
+
isBackface(): boolean;
|
|
13
|
+
getAdjustedColor(): string | number;
|
|
14
|
+
getLightFactor(): number;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=triangle-light.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"triangle-light.d.ts","sourceRoot":"","sources":["../../../src/canvas/shapes/triangle-light.js"],"names":[],"mappings":"AAEA;IACE,gDAQC;IAPC,YAAe;IACf,YAAe;IACf,YAAe;IACf,uBAAgE;IAChE,kBAAkB;IAClB,cAAc;IACd,WAAiB;IAGnB,yBAiBC;IAED,mBAEC;IAED,sBAMC;IAED,oCAUC;IAED,yBA6BC;CACF"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export class Triangle {
|
|
2
|
+
constructor(a: any, b: any, c: any, color: any);
|
|
3
|
+
pointA: any;
|
|
4
|
+
pointB: any;
|
|
5
|
+
pointC: any;
|
|
6
|
+
color: string | number;
|
|
7
|
+
lineWidth: number;
|
|
8
|
+
alpha: number;
|
|
9
|
+
draw(context: any): void;
|
|
10
|
+
getDepth(): number;
|
|
11
|
+
isBackface(): boolean;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=triangle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"triangle.d.ts","sourceRoot":"","sources":["../../../src/canvas/shapes/triangle.js"],"names":[],"mappings":"AAEA;IACE,gDAOC;IANC,YAAe;IACf,YAAe;IACf,YAAe;IACf,uBAAgE;IAChE,kBAAkB;IAClB,cAAc;IAGhB,yBAoBC;IAED,mBAEC;IAED,sBAMC;CACF"}
|
package/types/dom.d.ts
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export function
|
|
9
|
-
export function
|
|
10
|
-
export
|
|
11
|
-
export
|
|
12
|
-
export
|
|
13
|
-
export function
|
|
14
|
-
export function
|
|
15
|
-
export function
|
|
16
|
-
export function
|
|
17
|
-
export function
|
|
18
|
-
export function
|
|
19
|
-
export function
|
|
20
|
-
export
|
|
21
|
-
export function
|
|
1
|
+
export declare const copyToClipboard: (text: string) => Promise<void>;
|
|
2
|
+
export declare const getSelectedText: () => string | undefined;
|
|
3
|
+
export declare const isElementFocus: (ele: HTMLElement) => boolean;
|
|
4
|
+
export declare const siblings: (ele: HTMLElement) => any[];
|
|
5
|
+
export declare const isTabInView: () => boolean;
|
|
6
|
+
export declare const navigateBack: () => void;
|
|
7
|
+
export declare const navigateBack2: () => void;
|
|
8
|
+
export declare function loadScript(src: string): void;
|
|
9
|
+
export declare function lazyloadImages(): () => void;
|
|
10
|
+
export declare const waitForStyleSheetsLoaded: () => Promise<void>;
|
|
11
|
+
export declare const getTextWidth: (text: string, fontSize: number, fontWeight?: number) => number;
|
|
12
|
+
export declare const getFixedWidthText: (text: string, width: number, fontSize?: number, fontWeight?: number, isNeedEllipsis?: boolean) => string;
|
|
13
|
+
export declare function htmlIncodeOrDecode(rawContent: string, type?: "encode" | "decode"): string;
|
|
14
|
+
export declare function compileTemplate(template: string): string;
|
|
15
|
+
export declare function addEventListener(element: any, type: string, handler: EventListenerOrEventListenerObject): void;
|
|
16
|
+
export declare function removeEventListener(element: any, type: string, handler: EventListenerOrEventListenerObject): void;
|
|
17
|
+
export declare function stopPropagation(event: Event): void;
|
|
18
|
+
export declare function preventDefault(event: Event): void;
|
|
19
|
+
export declare function getTarget(event: Event): EventTarget | null;
|
|
20
|
+
export declare const clickEvent: string;
|
|
21
|
+
export declare function getMouseButton(event: MouseEvent): number | undefined;
|
|
22
22
|
//# sourceMappingURL=dom.d.ts.map
|
package/types/dom.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dom.d.ts","sourceRoot":"","sources":["../src/dom.
|
|
1
|
+
{"version":3,"file":"dom.d.ts","sourceRoot":"","sources":["../src/dom.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,eAAe,SAAU,MAAM,kBACP,CAAC;AAEtC,eAAO,MAAM,eAAe,0BAA0C,CAAC;AAEvE,eAAO,MAAM,cAAc,QAAS,WAAW,YACf,CAAC;AAEjC,eAAO,MAAM,QAAQ,QAAS,WAAW,UAGJ,CAAC;AAEtC,eAAO,MAAM,WAAW,eAAyB,CAAC;AAElD,eAAO,MAAM,YAAY,YAAuB,CAAC;AACjD,eAAO,MAAM,aAAa,YAAuB,CAAC;AAElD,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,QAQrC;AAMD,wBAAgB,cAAc,eAa7B;AAOD,eAAO,MAAM,wBAAwB,qBAqBjC,CAAC;AAQL,eAAO,MAAM,YAAY,SACjB,MAAM,YACF,MAAM,gCAejB,CAAC;AAUF,eAAO,MAAM,iBAAiB,SACtB,MAAM,SACL,MAAM,6EAsCd,CAAC;AAEF,wBAAgB,kBAAkB,CAChC,UAAU,EAAE,MAAM,EAClB,IAAI,GAAE,QAAQ,GAAG,QAAmB,UAmBrC;AAED,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,UAuB/C;AAED,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,GAAG,EACZ,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,kCAAkC,QAY5C;AAED,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,GAAG,EACZ,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,kCAAkC,QAS5C;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,KAAK,QAM3C;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,KAAK,QAM1C;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE,KAAK,sBAErC;AAED,eAAO,MAAM,UAAU,QAGV,CAAC;AAMd,wBAAgB,cAAc,CAAC,KAAK,EAAE,UAAU,sBAkB/C"}
|
package/types/env.d.ts
CHANGED
|
@@ -5,11 +5,21 @@ export function isAppleDevice(): number;
|
|
|
5
5
|
export function isAndroid(): boolean;
|
|
6
6
|
export function isMobile(): boolean;
|
|
7
7
|
export function isDarkMode(): boolean;
|
|
8
|
+
export function getInternetExplorerVersion(): number;
|
|
8
9
|
export function getOperatingSystem(): string;
|
|
9
10
|
export function getOperatingSystemVersion(): string;
|
|
10
11
|
export function getBrowserClient(): string;
|
|
11
12
|
export function getBrowserClientVersion(): string;
|
|
12
13
|
export function getUserGeolocationPromise(): Promise<any>;
|
|
14
|
+
export const isIE: boolean;
|
|
13
15
|
export const isBrowser: boolean;
|
|
14
16
|
export const isNode: boolean;
|
|
17
|
+
export const hasDocument: boolean;
|
|
18
|
+
export const hasWindow: boolean;
|
|
19
|
+
export const hasHistory: boolean;
|
|
20
|
+
export const hasProcess: boolean;
|
|
21
|
+
export const isBrowserSupportFileAPI: false | {
|
|
22
|
+
new (blobParts?: BlobPart[] | undefined, options?: BlobPropertyBag | undefined): Blob;
|
|
23
|
+
prototype: Blob;
|
|
24
|
+
};
|
|
15
25
|
//# sourceMappingURL=env.d.ts.map
|
package/types/env.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../src/env.js"],"names":[],"mappings":"AAqHA,0CAEC;AAED,sCAEC;AAED,iCAEC;AAED,wCAEC;AAED,qCAEC;AAED,oCAEC;AAED,sCAMC;
|
|
1
|
+
{"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../src/env.js"],"names":[],"mappings":"AAqHA,0CAEC;AAED,sCAEC;AAED,iCAEC;AAED,wCAEC;AAED,qCAEC;AAED,oCAEC;AAED,sCAMC;AAED,qDAwBC;AA3KM,6CAiBN;AAEM,oDAyBN;AAEM,2CAgBN;AAEM,kDA8BN;AAEM,0DAiBN;AA4DD,2BAAwD;AAExD,gCAC6D;AAE7D,6BAGgC;AAEhC,kCAA2D;AAC3D,gCAAuD;AACvD,iCAAyD;AACzD,iCAAyD;AACzD;;;EAKc"}
|
package/types/file.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export declare function getFileType(file: File): Promise<unknown>;
|
|
1
2
|
export declare function handleInputFiles(el: HTMLInputElement, cb: (files: FileList | null) => any): void;
|
|
2
3
|
export declare function handleDragAndDropFiles(dropZoneEl: HTMLElement, cb: (files: FileList | null) => any): void;
|
|
3
4
|
export declare const selectFile: (accepts?: string[], multiple?: boolean) => Promise<File[]>;
|
|
@@ -6,14 +7,4 @@ export interface FileHandler {
|
|
|
6
7
|
}
|
|
7
8
|
export declare const readeFile: <T extends string | ArrayBuffer | null>(fileHandler: FileHandler) => Promise<T>;
|
|
8
9
|
export declare const getFileExtension: (file: File | string) => string;
|
|
9
|
-
export declare const isImage: (file: File) => boolean;
|
|
10
|
-
export declare const isVideo: (file: File) => boolean;
|
|
11
|
-
export declare const isAudio: (file: File) => boolean;
|
|
12
|
-
export declare const isWordDocument: (file: File) => boolean;
|
|
13
|
-
export declare const isExcelDocument: (file: File) => boolean;
|
|
14
|
-
export declare const isPowerPointDocument: (file: File) => boolean;
|
|
15
|
-
export declare const isJsonDocument: (file: File) => boolean;
|
|
16
|
-
export declare const isXmlDocument: (file: File) => boolean;
|
|
17
|
-
export declare function getFileType(file: File): Promise<unknown>;
|
|
18
|
-
export declare function fn2ObjectURL(fn: (...args: any[]) => any): string;
|
|
19
10
|
//# sourceMappingURL=file.d.ts.map
|
package/types/file.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../src/file.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../src/file.ts"],"names":[],"mappings":"AAWA,wBAAgB,WAAW,CAAC,IAAI,EAAE,IAAI,oBA+BrC;AAKD,wBAAgB,gBAAgB,CAC9B,EAAE,EAAE,gBAAgB,EACpB,EAAE,EAAE,CAAC,KAAK,EAAE,QAAQ,GAAG,IAAI,KAAK,GAAG,QASpC;AAED,wBAAgB,sBAAsB,CACpC,UAAU,EAAE,WAAW,EACvB,EAAE,EAAE,CAAC,KAAK,EAAE,QAAQ,GAAG,IAAI,KAAK,GAAG,QAqBpC;AASD,eAAO,MAAM,UAAU,aACZ,MAAM,EAAE,aACN,OAAO,KACjB,QAAQ,IAAI,EAAE,CA8ChB,CAAC;AAEF,MAAM,WAAW,WAAW;IAC1B,CAAC,UAAU,EAAE,UAAU,GAAG,IAAI,CAAC;CAChC;AACD,eAAO,MAAM,SAAS,uDACP,WAAW,eAsBzB,CAAC;AAQF,eAAO,MAAM,gBAAgB,SAAU,IAAI,GAAG,MAAM,KAAG,MAQtD,CAAC"}
|