@zyzgroup/core-web 0.1.52 → 0.1.54
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 +19 -20
- package/dist/zyzgroup_core_web.iife.js.map +1 -1
- package/dist/zyzgroup_core_web.js +16639 -14264
- package/dist/zyzgroup_core_web.js.map +1 -1
- package/dist/zyzgroup_core_web.umd.cjs +19 -20
- package/dist/zyzgroup_core_web.umd.cjs.map +1 -1
- package/package.json +1 -1
- package/types/canvas/YZCanvas.d.ts +0 -23
- package/types/canvas/YZCanvas.d.ts.map +1 -1
- package/types/canvas/index.d.ts +0 -1
- package/types/canvas/index.d.ts.map +1 -1
- package/types/hooks/index.d.ts +20 -40
- package/types/hooks/index.d.ts.map +1 -1
- package/types/hooks/useActionChannel.d.ts +18 -0
- package/types/hooks/useActionChannel.d.ts.map +1 -0
- package/types/hooks/useAttribute.d.ts +2 -0
- package/types/hooks/useAttribute.d.ts.map +1 -1
- package/types/hooks/useCoords.d.ts +1 -1
- package/types/hooks/useCoords.d.ts.map +1 -1
- package/types/hooks/useDraw/Shape.d.ts +313 -0
- package/types/hooks/useDraw/Shape.d.ts.map +1 -0
- package/types/hooks/useDraw/canvas/CustomCanvasContext.d.ts +102 -0
- package/types/hooks/useDraw/canvas/CustomCanvasContext.d.ts.map +1 -0
- package/types/hooks/useDraw/canvas/YZCanvasContext.d.ts +84 -0
- package/types/hooks/useDraw/canvas/YZCanvasContext.d.ts.map +1 -0
- package/types/hooks/useDraw/canvas/index.d.ts +3 -0
- package/types/hooks/useDraw/canvas/index.d.ts.map +1 -0
- package/types/hooks/useDraw/index.d.ts +4 -0
- package/types/hooks/useDraw/index.d.ts.map +1 -0
- package/types/hooks/useDraw/line/Arc.d.ts +25 -0
- package/types/hooks/useDraw/line/Arc.d.ts.map +1 -0
- package/types/hooks/useDraw/line/CubicBezier.d.ts +62 -0
- package/types/hooks/useDraw/line/CubicBezier.d.ts.map +1 -0
- package/types/hooks/useDraw/line/L.d.ts +33 -0
- package/types/hooks/useDraw/line/L.d.ts.map +1 -0
- package/types/hooks/useDraw/line/PathD.d.ts +66 -0
- package/types/hooks/useDraw/line/PathD.d.ts.map +1 -0
- package/types/hooks/useDraw/line/QuadraticBezier.d.ts +30 -0
- package/types/hooks/useDraw/line/QuadraticBezier.d.ts.map +1 -0
- package/types/hooks/useDraw/line/index.d.ts +6 -0
- package/types/hooks/useDraw/line/index.d.ts.map +1 -0
- package/types/hooks/useDraw/shapes/ArrowShape.d.ts +11 -0
- package/types/hooks/useDraw/shapes/ArrowShape.d.ts.map +1 -0
- package/types/hooks/useDraw/shapes/BallShape.d.ts +86 -0
- package/types/hooks/useDraw/shapes/BallShape.d.ts.map +1 -0
- package/types/hooks/useDraw/shapes/CrossShape.d.ts +7 -0
- package/types/hooks/useDraw/shapes/CrossShape.d.ts.map +1 -0
- package/types/hooks/useDraw/shapes/FoxShape.d.ts +11 -0
- package/types/hooks/useDraw/shapes/FoxShape.d.ts.map +1 -0
- package/types/hooks/useDraw/shapes/HeartShape.d.ts +15 -0
- package/types/hooks/useDraw/shapes/HeartShape.d.ts.map +1 -0
- package/types/hooks/useDraw/shapes/HeartVariantShape.d.ts +15 -0
- package/types/hooks/useDraw/shapes/HeartVariantShape.d.ts.map +1 -0
- package/types/hooks/useDraw/shapes/LineShape.d.ts +27 -0
- package/types/hooks/useDraw/shapes/LineShape.d.ts.map +1 -0
- package/types/hooks/useDraw/shapes/RabbitShape.d.ts +9 -0
- package/types/hooks/useDraw/shapes/RabbitShape.d.ts.map +1 -0
- package/types/hooks/useDraw/shapes/RectShape.d.ts +31 -0
- package/types/hooks/useDraw/shapes/RectShape.d.ts.map +1 -0
- package/types/hooks/useDraw/shapes/SegmentShapeCombo.d.ts +23 -0
- package/types/hooks/useDraw/shapes/SegmentShapeCombo.d.ts.map +1 -0
- package/types/hooks/useDraw/shapes/ShipShapeCombo.d.ts +12 -0
- package/types/hooks/useDraw/shapes/ShipShapeCombo.d.ts.map +1 -0
- package/types/hooks/useDraw/shapes/SliderShapeCombo.d.ts +21 -0
- package/types/hooks/useDraw/shapes/SliderShapeCombo.d.ts.map +1 -0
- package/types/hooks/useDraw/shapes/StarShape.d.ts +13 -0
- package/types/hooks/useDraw/shapes/StarShape.d.ts.map +1 -0
- package/types/hooks/useDraw/shapes/TreeShapeCombo.d.ts +7 -0
- package/types/hooks/useDraw/shapes/TreeShapeCombo.d.ts.map +1 -0
- package/types/hooks/useDraw/shapes/index.d.ts +15 -0
- package/types/hooks/useDraw/shapes/index.d.ts.map +1 -0
- package/types/hooks/useDraw/svg/SVGParse.d.ts +16 -0
- package/types/hooks/useDraw/svg/SVGParse.d.ts.map +1 -0
- package/types/hooks/useDraw/svg/SVGUtil.d.ts +17 -0
- package/types/hooks/useDraw/svg/SVGUtil.d.ts.map +1 -0
- package/types/hooks/useDraw/svg/index.d.ts +4 -0
- package/types/hooks/useDraw/svg/index.d.ts.map +1 -0
- package/types/hooks/useDraw/svg/line2c.d.ts +5 -0
- package/types/hooks/useDraw/svg/line2c.d.ts.map +1 -0
- package/types/hooks/useDraw/useDraw.d.ts +19 -0
- package/types/hooks/useDraw/useDraw.d.ts.map +1 -0
- package/types/hooks/useElement.d.ts +79 -38
- package/types/hooks/useElement.d.ts.map +1 -1
- package/types/hooks/useElementEventBus.d.ts +21 -1
- package/types/hooks/useElementEventBus.d.ts.map +1 -1
- package/types/hooks/useElementEvents.d.ts +226 -0
- package/types/hooks/useElementEvents.d.ts.map +1 -0
- package/types/hooks/useEventListener.d.ts +9 -4
- package/types/hooks/useEventListener.d.ts.map +1 -1
- package/types/hooks/useIntersection.d.ts +2 -0
- package/types/hooks/useIntersection.d.ts.map +1 -1
- package/types/hooks/useMatchMedia.d.ts +3 -0
- package/types/hooks/useMatchMedia.d.ts.map +1 -0
- package/types/hooks/useMessageChannel.d.ts +17 -0
- package/types/hooks/useMessageChannel.d.ts.map +1 -0
- package/types/hooks/useResize.d.ts.map +1 -1
- package/types/hooks/useStyle.d.ts +1 -1
- package/types/hooks/useStyle.d.ts.map +1 -1
- package/types/hooks/useTheme.d.ts +4 -3
- package/types/hooks/useTheme.d.ts.map +1 -1
- package/types/hooks/useVisible.d.ts +5 -9
- package/types/hooks/useVisible.d.ts.map +1 -1
- package/types/index.d.ts +0 -1
- package/types/index.d.ts.map +1 -1
- package/types/math/BufferAttribute.d.ts +0 -15
- package/types/math/BufferAttribute.d.ts.map +1 -1
- package/types/math/index.d.ts +0 -4
- package/types/math/index.d.ts.map +1 -1
- package/types/math/line/PathD.d.ts.map +1 -1
- package/types/math/math.d.ts +0 -1
- package/types/math/math.d.ts.map +1 -1
- package/types/svg/YZSVG.d.ts +0 -34
- package/types/svg/YZSVG.d.ts.map +1 -1
- package/types/svg/index.d.ts +0 -1
- package/types/svg/index.d.ts.map +1 -1
- package/types/hooks/onDocumentReady.d.ts +0 -3
- package/types/hooks/onDocumentReady.d.ts.map +0 -1
- package/types/hooks/useClass.d.ts +0 -6
- package/types/hooks/useClass.d.ts.map +0 -1
- package/types/hooks/useClickA.d.ts +0 -2
- package/types/hooks/useClickA.d.ts.map +0 -1
- package/types/hooks/useClipboard.d.ts +0 -2
- package/types/hooks/useClipboard.d.ts.map +0 -1
- package/types/hooks/useDisplay.d.ts +0 -5
- package/types/hooks/useDisplay.d.ts.map +0 -1
- package/types/hooks/useDragDrop.d.ts +0 -12
- package/types/hooks/useDragDrop.d.ts.map +0 -1
- package/types/hooks/useFireEvent.d.ts +0 -7
- package/types/hooks/useFireEvent.d.ts.map +0 -1
- package/types/hooks/useHotKey.d.ts +0 -33
- package/types/hooks/useHotKey.d.ts.map +0 -1
- package/types/hooks/useHotKeyFile.d.ts +0 -8
- package/types/hooks/useHotKeyFile.d.ts.map +0 -1
- package/types/hooks/useIframe.d.ts +0 -2
- package/types/hooks/useIframe.d.ts.map +0 -1
- package/types/hooks/useLoadImage.d.ts +0 -9
- package/types/hooks/useLoadImage.d.ts.map +0 -1
- package/types/hooks/useLoadLink.d.ts +0 -3
- package/types/hooks/useLoadLink.d.ts.map +0 -1
- package/types/hooks/useLoadScript.d.ts +0 -2
- package/types/hooks/useLoadScript.d.ts.map +0 -1
- package/types/hooks/useMedia.d.ts +0 -4
- package/types/hooks/useMedia.d.ts.map +0 -1
- package/types/hooks/useMouse.d.ts +0 -32
- package/types/hooks/useMouse.d.ts.map +0 -1
- package/types/hooks/useObjectURL.d.ts +0 -3
- package/types/hooks/useObjectURL.d.ts.map +0 -1
- package/types/hooks/usePressDownMove.d.ts +0 -13
- package/types/hooks/usePressDownMove.d.ts.map +0 -1
- package/types/hooks/usePull.d.ts +0 -4
- package/types/hooks/usePull.d.ts.map +0 -1
- package/types/hooks/useRunInSandbox.d.ts +0 -2
- package/types/hooks/useRunInSandbox.d.ts.map +0 -1
- package/types/hooks/useScroll.d.ts +0 -4
- package/types/hooks/useScroll.d.ts.map +0 -1
- package/types/hooks/useSelectFile.d.ts +0 -18
- package/types/hooks/useSelectFile.d.ts.map +0 -1
- package/types/hooks/useVibrate.d.ts +0 -2
- package/types/hooks/useVibrate.d.ts.map +0 -1
- package/types/hooks/useWindow.d.ts +0 -5
- package/types/hooks/useWindow.d.ts.map +0 -1
- package/types/position.d.ts +0 -65
- package/types/position.d.ts.map +0 -1
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ShapeCombo, ShapeComboOptions, ShapeOptions } from "../Shape";
|
|
2
|
+
export type SegmentShapeComboOptions = {
|
|
3
|
+
segmentWidth: number;
|
|
4
|
+
segmentHeight: number;
|
|
5
|
+
segmentCornerRadius?: number;
|
|
6
|
+
} & ShapeComboOptions;
|
|
7
|
+
export declare class SegmentShapeCombo extends ShapeCombo {
|
|
8
|
+
width: number;
|
|
9
|
+
height: number;
|
|
10
|
+
cornerRadius: number;
|
|
11
|
+
constructor(options: SegmentShapeComboOptions, commonChildShapeOptions?: ShapeOptions);
|
|
12
|
+
protected cloneShapeCombo(): SegmentShapeCombo;
|
|
13
|
+
getBoundingClientRectCenter(): {
|
|
14
|
+
x: number;
|
|
15
|
+
y: number;
|
|
16
|
+
};
|
|
17
|
+
getPin(): {
|
|
18
|
+
x: number;
|
|
19
|
+
y: number;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
export default SegmentShapeCombo;
|
|
23
|
+
//# sourceMappingURL=SegmentShapeCombo.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SegmentShapeCombo.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useDraw/shapes/SegmentShapeCombo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAKvE,MAAM,MAAM,wBAAwB,GAAG;IACrC,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B,GAAG,iBAAiB,CAAC;AAEtB,qBAAa,iBAAkB,SAAQ,UAAU;IAC/C,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;gBAGnB,OAAO,EAAE,wBAAwB,EACjC,uBAAuB,CAAC,EAAE,YAAY;IAsDxC,SAAS,CAAC,eAAe,IAAI,iBAAiB;IAcvC,2BAA2B;;;;IAQlC,MAAM;;;;CAOP;AAED,eAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ShapeCombo, ShapeComboOptions, ShapeOptions } from "../Shape";
|
|
2
|
+
export type ShipShapeComboOptions = {
|
|
3
|
+
showFlame?: boolean;
|
|
4
|
+
} & ShapeComboOptions;
|
|
5
|
+
export declare class ShipShapeCombo extends ShapeCombo {
|
|
6
|
+
constructor(options?: ShipShapeComboOptions, commonChildShapeOptions?: ShapeOptions);
|
|
7
|
+
protected cloneShapeCombo(): ShipShapeCombo;
|
|
8
|
+
set showFlame(v: boolean);
|
|
9
|
+
get showFlame(): boolean;
|
|
10
|
+
}
|
|
11
|
+
export default ShipShapeCombo;
|
|
12
|
+
//# sourceMappingURL=ShipShapeCombo.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ShipShapeCombo.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useDraw/shapes/ShipShapeCombo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,UAAU,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAE9E,MAAM,MAAM,qBAAqB,GAAG;IAClC,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,GAAG,iBAAiB,CAAC;AAEtB,qBAAa,cAAe,SAAQ,UAAU;gBAE1C,OAAO,CAAC,EAAE,qBAAqB,EAC/B,uBAAuB,CAAC,EAAE,YAAY;IAkCxC,SAAS,CAAC,eAAe,IAAI,cAAc;IAW3C,IAAW,SAAS,CAAC,CAAC,EAAE,OAAO,EAE9B;IACD,IAAW,SAAS,IAAI,OAAO,CAE9B;CACF;AAED,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Subject } from "rxjs";
|
|
2
|
+
import { ShapeCombo, ShapeComboOptions, ShapeOptions } from "../Shape";
|
|
3
|
+
export type SliderShapeComboOptions = {
|
|
4
|
+
sliderMin?: number;
|
|
5
|
+
sliderMax?: number;
|
|
6
|
+
sliderStep?: number;
|
|
7
|
+
sliderDefaultValue?: number;
|
|
8
|
+
sliderWidth?: number;
|
|
9
|
+
sliderHeight?: number;
|
|
10
|
+
sliderBackgroundColor?: string;
|
|
11
|
+
sliderForegroundColor?: string;
|
|
12
|
+
} & ShapeComboOptions;
|
|
13
|
+
export declare class SliderShapeCombo extends ShapeCombo {
|
|
14
|
+
value$: Subject<number>;
|
|
15
|
+
subscription: any;
|
|
16
|
+
constructor(options?: SliderShapeComboOptions, commonChildShapeOptions?: ShapeOptions);
|
|
17
|
+
destroy(): void;
|
|
18
|
+
protected cloneShapeCombo(): SliderShapeCombo;
|
|
19
|
+
}
|
|
20
|
+
export default SliderShapeCombo;
|
|
21
|
+
//# sourceMappingURL=SliderShapeCombo.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SliderShapeCombo.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useDraw/shapes/SliderShapeCombo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAE/B,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAKvE,MAAM,MAAM,uBAAuB,GAAG;IACpC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC,GAAG,iBAAiB,CAAC;AAEtB,qBAAa,gBAAiB,SAAQ,UAAU;IACvC,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,CAAyB;IAEhD,YAAY,EAAE,GAAG,CAAC;gBAGvB,OAAO,CAAC,EAAE,uBAAuB,EACjC,uBAAuB,CAAC,EAAE,YAAY;IAyFjC,OAAO;IAKd,SAAS,CAAC,eAAe,IAAI,gBAAgB;CAO9C;AAED,eAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Shape, ShapeOptions } from "../Shape";
|
|
2
|
+
import { SVGParsedPathData } from "../svg";
|
|
3
|
+
export type StarShapeOptions = {
|
|
4
|
+
starR?: number;
|
|
5
|
+
} & ShapeOptions;
|
|
6
|
+
export declare class StarShape extends Shape {
|
|
7
|
+
r: number;
|
|
8
|
+
constructor(options?: StarShapeOptions);
|
|
9
|
+
protected cloneShape(): StarShape;
|
|
10
|
+
toSVGPathData(): SVGParsedPathData[];
|
|
11
|
+
}
|
|
12
|
+
export default StarShape;
|
|
13
|
+
//# sourceMappingURL=StarShape.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StarShape.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useDraw/shapes/StarShape.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AAI3C,MAAM,MAAM,gBAAgB,GAAG;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,GAAG,YAAY,CAAC;AAEjB,qBAAa,SAAU,SAAQ,KAAK;IAClC,CAAC,EAAE,MAAM,CAAC;gBAEE,OAAO,CAAC,EAAE,gBAAgB;IAKtC,SAAS,CAAC,UAAU,IAAI,SAAS;IAQ1B,aAAa,IAAI,iBAAiB,EAAE;CAW5C;AAED,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ShapeCombo, ShapeComboOptions, ShapeOptions } from "../Shape";
|
|
2
|
+
export declare class TreeShapeCombo extends ShapeCombo {
|
|
3
|
+
constructor(options?: ShapeComboOptions, commonChildShapeOptions?: ShapeOptions);
|
|
4
|
+
protected cloneShapeCombo(): TreeShapeCombo;
|
|
5
|
+
}
|
|
6
|
+
export default TreeShapeCombo;
|
|
7
|
+
//# sourceMappingURL=TreeShapeCombo.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TreeShapeCombo.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useDraw/shapes/TreeShapeCombo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAGvE,qBAAa,cAAe,SAAQ,UAAU;gBAE1C,OAAO,CAAC,EAAE,iBAAiB,EAC3B,uBAAuB,CAAC,EAAE,YAAY;IAwCxC,SAAS,CAAC,eAAe,IAAI,cAAc;CAO5C;AAED,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export * from "./LineShape";
|
|
2
|
+
export * from "./TreeShapeCombo";
|
|
3
|
+
export * from "./BallShape";
|
|
4
|
+
export * from "./ArrowShape";
|
|
5
|
+
export * from "./RectShape";
|
|
6
|
+
export * from "./HeartShape";
|
|
7
|
+
export * from "./HeartVariantShape";
|
|
8
|
+
export * from "./StarShape";
|
|
9
|
+
export * from "./FoxShape";
|
|
10
|
+
export * from "./RabbitShape";
|
|
11
|
+
export * from "./CrossShape";
|
|
12
|
+
export * from "./ShipShapeCombo";
|
|
13
|
+
export * from "./SegmentShapeCombo";
|
|
14
|
+
export * from "./SliderShapeCombo";
|
|
15
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useDraw/shapes/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { DOMParse } from "../../../dom";
|
|
2
|
+
export declare class SVGParse extends DOMParse {
|
|
3
|
+
currentItem: Record<string, string>;
|
|
4
|
+
items: Record<string, string>[];
|
|
5
|
+
groups: Record<string, string>[];
|
|
6
|
+
globalStyles: Record<string, string[]>;
|
|
7
|
+
grad: Record<string, any>;
|
|
8
|
+
idtops: Record<string, string>;
|
|
9
|
+
text: string;
|
|
10
|
+
constructor(sourceString: string);
|
|
11
|
+
parse(): Record<string, string>[];
|
|
12
|
+
processAttrs(tagname: string, attrs: Record<string, string>): void;
|
|
13
|
+
addToItems(): void;
|
|
14
|
+
}
|
|
15
|
+
export default SVGParse;
|
|
16
|
+
//# sourceMappingURL=SVGParse.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SVGParse.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useDraw/svg/SVGParse.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAY,MAAM,cAAc,CAAC;AAOlD,qBAAa,QAAS,SAAQ,QAAQ;IACpC,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAM;IACzC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAM;IAErC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAM;IAEtC,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAM;IAE5C,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAM;IAC/B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAM;IACpC,IAAI,SAAM;gBAEE,YAAY,EAAE,MAAM;IAkJhC,KAAK;IAKL,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IA4J3D,UAAU;CAGX;AAED,eAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export type SVGParsedPathData = [command: string, ...args: number[]];
|
|
2
|
+
export declare const SVGParsedPathArgsLength: Record<string, number>;
|
|
3
|
+
export declare function createSVGElement(tagName?: string, attrs?: Record<string, string>): SVGGeometryElement;
|
|
4
|
+
export declare function createSvgPath(d: string, id?: string): SVGPathElement;
|
|
5
|
+
export declare function downloadFromSVGElement(svgContainer: SVGElement, name?: string): void;
|
|
6
|
+
export declare function downloadFromSVGString(svgString: string, name?: string): void;
|
|
7
|
+
export declare function getSVGRawStringFromElement(el: HTMLElement): string;
|
|
8
|
+
export declare function isSVGPath(str: string): boolean;
|
|
9
|
+
export declare function SVGPathDataToD(path: SVGParsedPathData[]): string;
|
|
10
|
+
export declare function parseSVGPath(path: string): SVGParsedPathData[];
|
|
11
|
+
export declare function absolutizeSVGPath(path: SVGParsedPathData[]): SVGParsedPathData[];
|
|
12
|
+
export declare function relativeSVGPath(path: SVGParsedPathData[]): SVGParsedPathData[];
|
|
13
|
+
export declare function normalizeSVGPath(path: SVGParsedPathData[]): SVGParsedPathData[];
|
|
14
|
+
export declare function catmullRom2bezier(crp: number[]): SVGParsedPathData[];
|
|
15
|
+
export declare function zvhToLSVGPath(path: SVGParsedPathData[]): SVGParsedPathData[];
|
|
16
|
+
export declare function longhandSVGPath(path: SVGParsedPathData[]): SVGParsedPathData[];
|
|
17
|
+
//# sourceMappingURL=SVGUtil.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SVGUtil.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useDraw/svg/SVGUtil.ts"],"names":[],"mappings":"AAOA,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC;AAErE,eAAO,MAAM,uBAAuB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAY1D,CAAC;AAYF,wBAAgB,gBAAgB,CAC9B,OAAO,SAAS,EAChB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC7B,kBAAkB,CAUpB;AAED,wBAAgB,aAAa,CAAC,CAAC,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,MAAM,GAAG,cAAc,CAGpE;AAED,wBAAgB,sBAAsB,CACpC,YAAY,EAAE,UAAU,EACxB,IAAI,SAAU,QAMf;AAED,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,SAAU,QAEtE;AAED,wBAAgB,0BAA0B,CAAC,EAAE,EAAE,WAAW,UAEzD;AAMD,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,WAQpC;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,iBAAiB,EAAE,GAAG,MAAM,CAmBhE;AAGD,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,iBAAiB,EAAE,CAwC9D;AAGD,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,iBAAiB,EAAE,GACxB,iBAAiB,EAAE,CAsDrB;AAED,wBAAgB,eAAe,CAC7B,IAAI,EAAE,iBAAiB,EAAE,GACxB,iBAAiB,EAAE,CAwDrB;AAID,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,iBAAiB,EAAE,GACxB,iBAAiB,EAAE,CA+GrB;AAID,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,iBAAiB,EAAE,CAkDpE;AAGD,wBAAgB,aAAa,CAAC,IAAI,EAAE,iBAAiB,EAAE,GAAG,iBAAiB,EAAE,CAmC5E;AAID,wBAAgB,eAAe,CAC7B,IAAI,EAAE,iBAAiB,EAAE,GACxB,iBAAiB,EAAE,CA2BrB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useDraw/svg/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare function a2c(x1: number, y1: number, x2: number, y2: number, fa: number, fs: number, rx: number, ry: number, phi: number): number[][];
|
|
2
|
+
export declare function a2c2(x1: number, y1: number, rx: number, ry: number, angle: number, large_arc_flag: number, sweep_flag: number, x2: number, y2: number, recursive?: number[]): number[][];
|
|
3
|
+
export declare function q2c(x1: number, y1: number, cx: number, cy: number, x2: number, y2: number): number[];
|
|
4
|
+
export declare function l2c(x1: number, y1: number, x2: number, y2: number): number[];
|
|
5
|
+
//# sourceMappingURL=line2c.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"line2c.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useDraw/svg/line2c.ts"],"names":[],"mappings":"AAyJA,wBAAgB,GAAG,CACjB,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,GAAG,EAAE,MAAM,cAoFZ;AAID,wBAAgB,IAAI,CAClB,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,MAAM,EACb,cAAc,EAAE,MAAM,EACtB,UAAU,EAAE,MAAM,EAClB,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,SAAS,CAAC,EAAE,MAAM,EAAE,GACnB,MAAM,EAAE,EAAE,CAuGZ;AAED,wBAAgB,GAAG,CACjB,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,YAUX;AAED,wBAAgB,GAAG,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,YAEjE"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { HTMLEventObservable } from "../useEventListener";
|
|
2
|
+
import { Shape, ShapeCombo } from "./Shape";
|
|
3
|
+
export type DrawShape = Shape | ShapeCombo;
|
|
4
|
+
export type DrawType = "svg" | "canvas";
|
|
5
|
+
export type DrawContext = ReturnType<typeof useDraw>;
|
|
6
|
+
export declare function useDraw(PARENT_EL?: HTMLEventObservable, type?: DrawType): {
|
|
7
|
+
rect: {
|
|
8
|
+
x: number;
|
|
9
|
+
y: number;
|
|
10
|
+
width: number;
|
|
11
|
+
height: number;
|
|
12
|
+
};
|
|
13
|
+
mousePoint: import("../useElementEvents").MousePoint;
|
|
14
|
+
shapes: Shape[];
|
|
15
|
+
draw: (...ss: DrawShape[]) => void;
|
|
16
|
+
unsubscribe: () => void;
|
|
17
|
+
downloadSVG: () => void;
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=useDraw.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDraw.d.ts","sourceRoot":"","sources":["../../../src/hooks/useDraw/useDraw.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAQ1D,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAM5C,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,UAAU,CAAC;AAE3C,MAAM,MAAM,QAAQ,GAAG,KAAK,GAAG,QAAQ,CAAC;AAExC,MAAM,MAAM,WAAW,GAAG,UAAU,CAAC,OAAO,OAAO,CAAC,CAAC;AAErD,wBAAgB,OAAO,CACrB,SAAS,GAAE,mBAA8C,EACzD,IAAI,GAAE,QAAmB;;;;;;;;;kBA6FJ,SAAS,EAAE;;;EAoNjC"}
|
|
@@ -1,43 +1,84 @@
|
|
|
1
|
-
import { AnyElement,
|
|
2
|
-
export declare function
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
1
|
+
import { AnyElement, ReadInBrowserEnum } from "@zyzgroup/core-common";
|
|
2
|
+
export declare function createObjectURL(blob: File | Blob | MediaSource): string;
|
|
3
|
+
export declare function revokeObjectURL(url: string): void;
|
|
4
|
+
export declare function onDocumentReady(cb: () => void): () => void;
|
|
5
|
+
export declare function onBeforeUnload(cb: (e: BeforeUnloadEvent) => void): () => void;
|
|
6
|
+
export declare function useLoadScript(url: string, ms?: number): Promise<unknown>;
|
|
7
|
+
export declare function useClickA(blobOrUrl: Blob | string, fileName: string): void;
|
|
8
|
+
export declare function useLoadLink(url: string, parent?: HTMLHeadElement, ms?: number): Promise<unknown>;
|
|
9
|
+
export declare function waitForStyleSheetsLoaded(): Promise<void>;
|
|
10
|
+
export interface RawImageInfo {
|
|
11
|
+
width: number;
|
|
12
|
+
height: number;
|
|
13
|
+
aspectRatio: number;
|
|
14
|
+
element: HTMLImageElement;
|
|
15
|
+
imageData?: ImageData;
|
|
16
|
+
}
|
|
17
|
+
export declare function useLoadImage(url: string | Blob | File, ms?: number): Promise<RawImageInfo>;
|
|
18
|
+
export declare function useSelectFile<T extends string | ArrayBuffer>(readType?: ReadInBrowserEnum, accepts?: string[]): Promise<{
|
|
19
|
+
type: string;
|
|
20
|
+
name: string;
|
|
21
|
+
size: number;
|
|
22
|
+
data: T;
|
|
23
|
+
}>;
|
|
24
|
+
export declare function useSelectFileImage(accepts?: string[]): Promise<Error | {
|
|
25
|
+
type: string;
|
|
26
|
+
name: string;
|
|
27
|
+
size: number;
|
|
28
|
+
data: ArrayBuffer;
|
|
29
|
+
width: number;
|
|
30
|
+
height: number;
|
|
31
|
+
aspectRatio: number;
|
|
32
|
+
imageData: ImageData | undefined;
|
|
33
|
+
}>;
|
|
34
|
+
export declare function getSelectedText(): string;
|
|
35
|
+
export declare function setWindowTitle(title: string): void;
|
|
36
|
+
export declare function vibrate(ms?: number): void;
|
|
37
|
+
export declare function useClipboard(text: string): Promise<boolean | void>;
|
|
38
|
+
export declare function scrollTo(x: 0, y: 0): void;
|
|
39
|
+
export declare function setManualScroll(): () => void;
|
|
40
|
+
export declare function isRootEl(el: AnyElement): boolean;
|
|
41
|
+
export declare const isActiveEl: (el: AnyElement) => any;
|
|
42
|
+
export declare const getRemSize: () => number;
|
|
43
|
+
export declare function rem2px(rem: number): number;
|
|
44
|
+
export declare function getEmSize(el: AnyElement): number;
|
|
45
|
+
export declare const nearestElement: (el: AnyElement) => AnyElement;
|
|
46
|
+
export declare const parent: (el: AnyElement) => HTMLElement | null;
|
|
47
|
+
export declare const parents: (node: AnyElement | null, ps?: AnyElement[]) => AnyElement[];
|
|
48
|
+
export declare function scrollParent(el: AnyElement): Element | SVGElement;
|
|
49
|
+
export declare const containsChild: (el: AnyElement, child: AnyElement) => boolean;
|
|
50
|
+
export declare const siblings: (el: AnyElement) => any[];
|
|
51
|
+
export declare const nextElementSibling: (el: AnyElement) => Element | null;
|
|
52
|
+
export declare const previousElementSibling: (el: AnyElement) => Element | null;
|
|
53
|
+
export declare const closest: (el: AnyElement, selector: string) => Element | null;
|
|
54
|
+
export declare const shadowRoot: (el: AnyElement) => ShadowRoot | null;
|
|
55
|
+
export declare const isInput: (el: AnyElement) => boolean;
|
|
56
|
+
export declare const isSelect: (el: AnyElement) => boolean;
|
|
57
|
+
export declare const isTextArea: (el: AnyElement) => boolean;
|
|
58
|
+
export declare const isInputCheckbox: (el: AnyElement) => boolean;
|
|
59
|
+
export declare const isInputRadio: (el: AnyElement) => boolean;
|
|
60
|
+
export declare const isInputText: (el: AnyElement) => boolean;
|
|
61
|
+
export declare const isInputNumber: (el: AnyElement) => boolean;
|
|
62
|
+
export declare function changeSelected(el: AnyElement, selectedValue: string): void;
|
|
63
|
+
export declare function changeRadioChecked(el: AnyElement, checkedValue: string): void;
|
|
64
|
+
export declare function changeCheckboxChecked(el: AnyElement, checked: boolean): void;
|
|
65
|
+
export declare const insert: (el: AnyElement, html: string | AnyElement, method?: "append" | "appendChild" | "prepend" | "after" | "before" | "replaceWith") => void;
|
|
66
|
+
export declare const html: (el: AnyElement, html: string | AnyElement) => void;
|
|
67
|
+
export declare const empty: (el: AnyElement) => void;
|
|
68
|
+
export declare const text: (el: AnyElement, text: string) => void;
|
|
69
|
+
export declare const getInnerText: (el: AnyElement) => string;
|
|
70
|
+
export declare const remove: (el: AnyElement) => void;
|
|
71
|
+
export declare function toggleElDisplay(el: AnyElement, force?: boolean): void;
|
|
72
|
+
export declare function showEl(el: AnyElement): void;
|
|
73
|
+
export declare function hideEl(el: AnyElement): void;
|
|
74
|
+
export declare function toggleClass(el: AnyElement, className: string, act?: "toggle" | "add" | "remove"): void;
|
|
75
|
+
export declare function addClass(el: AnyElement, className: string): void;
|
|
76
|
+
export declare function removeClass(el: AnyElement, className: string): void;
|
|
77
|
+
export declare function hasClass(el: AnyElement, className: string): boolean;
|
|
36
78
|
export declare function createFragment(html: string, convert?: boolean): DocumentFragment;
|
|
37
79
|
export declare function createElement(tagName: string): HTMLElement;
|
|
38
80
|
export declare function createElementNS(name: string): HTMLElement;
|
|
39
81
|
export declare function createTextNode(data: string): Text;
|
|
40
|
-
export declare function
|
|
41
|
-
|
|
42
|
-
};
|
|
82
|
+
export declare function iframePostMessage(message: any, targetOrigin?: string): void;
|
|
83
|
+
export declare function useRunInSandbox(code: string): void;
|
|
43
84
|
//# sourceMappingURL=useElement.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useElement.d.ts","sourceRoot":"","sources":["../../src/hooks/useElement.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useElement.d.ts","sourceRoot":"","sources":["../../src/hooks/useElement.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,UAAU,EAIV,iBAAiB,EAElB,MAAM,uBAAuB,CAAC;AA4C/B,wBAAgB,eAAe,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,WAAW,UAE9D;AAED,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,QAE1C;AAKD,wBAAgB,eAAe,CAAC,EAAE,EAAE,MAAM,IAAI,cAuB7C;AAED,wBAAgB,cAAc,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,iBAAiB,KAAK,IAAI,cAIhE;AAED,wBAAsB,aAAa,CACjC,GAAG,EAAE,MAAM,EACX,EAAE,SAAQ,oBAiCX;AAED,wBAAgB,SAAS,CAAC,SAAS,EAAE,IAAI,GAAG,MAAM,EAAE,QAAQ,EAAE,MAAM,QAanE;AAID,wBAAsB,WAAW,CAC/B,GAAG,EAAE,MAAM,EACX,MAAM,kBAA2C,EACjD,EAAE,SAAQ,oBAmCX;AAGD,wBAAgB,wBAAwB,kBAsBvC;AAWD,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,gBAAgB,CAAC;IAC1B,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB;AAOD,wBAAsB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,EAAE,EAAE,SAAQ,yBAsCvE;AAED,wBAAsB,aAAa,CAAC,CAAC,SAAS,MAAM,GAAG,WAAW,EAChE,QAAQ,GAAE,iBAA0C,EACpD,OAAO,GAAE,MAAM,EAAU;;;;;GAW1B;AAED,wBAAsB,kBAAkB,CAAC,OAAO,GAAE,MAAM,EAAg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E,UAAU,QAEpC;AAED,wBAAgB,WAAW,CACzB,EAAE,EAAE,UAAU,EACd,SAAS,EAAE,MAAM,EACjB,GAAG,GAAE,QAAQ,GAAG,KAAK,GAAG,QAAmB,QAiD5C;AAED,wBAAgB,QAAQ,CAAC,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,QAEzD;AAED,wBAAgB,WAAW,CAAC,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,QAE5D;AAED,wBAAgB,QAAQ,CAAC,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAKnE;AAKD,wBAAgB,cAAc,CAC5B,IAAI,EAAE,MAAM,EACZ,OAAO,UAAQ,GACd,gBAAgB,CAYlB;AAED,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,eAE5C;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,eAE3C;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,QAE1C;AAkCD,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,GAAG,EACZ,YAAY,SAAsC,QAYnD;AAGD,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,QAmB3C"}
|
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
import { EventBus, EventBusListeners } from "@zyzgroup/core-common";
|
|
2
|
+
import { MousePointEvent } from "./useElementEvents";
|
|
3
|
+
type MousePoint = {
|
|
4
|
+
x: number;
|
|
5
|
+
y: number;
|
|
6
|
+
dx: number;
|
|
7
|
+
dy: number;
|
|
8
|
+
dStartX: number;
|
|
9
|
+
dStartY: number;
|
|
10
|
+
isDown: boolean;
|
|
11
|
+
};
|
|
2
12
|
export interface ElementEventBusListeners extends EventBusListeners {
|
|
3
13
|
mouseDown(e: MouseEvent): void;
|
|
4
14
|
mouseUp(e: MouseEvent): void;
|
|
@@ -61,9 +71,19 @@ export declare function useElementEventBus(el?: HTMLElement): {
|
|
|
61
71
|
top: number;
|
|
62
72
|
toJSON(): any;
|
|
63
73
|
};
|
|
64
|
-
mousePoint:
|
|
74
|
+
mousePoint: MousePoint;
|
|
65
75
|
eb: EventBus<ElementEventBusListeners>;
|
|
66
76
|
start: () => Promise<void>;
|
|
67
77
|
end: () => void;
|
|
68
78
|
};
|
|
79
|
+
type Options = {
|
|
80
|
+
start?: (e: MousePointEvent) => void;
|
|
81
|
+
move?: (e: MousePointEvent) => void;
|
|
82
|
+
end?: (e: MousePointEvent) => void;
|
|
83
|
+
};
|
|
84
|
+
export declare function usePressDownMove(controller: ElementEventBusController, options?: Options): () => void;
|
|
85
|
+
export declare function usePressDownMoveWithPointer(controller: ElementEventBusController, options?: Options): () => void;
|
|
86
|
+
export declare function usePressDownMoveWithMouse(controller: ElementEventBusController, options?: Options): () => void;
|
|
87
|
+
export declare function usePressDownMoveWithTouch(controller: ElementEventBusController, options?: Options): () => void;
|
|
88
|
+
export {};
|
|
69
89
|
//# sourceMappingURL=useElementEventBus.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useElementEventBus.d.ts","sourceRoot":"","sources":["../../src/hooks/useElementEventBus.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"useElementEventBus.d.ts","sourceRoot":"","sources":["../../src/hooks/useElementEventBus.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAGpE,OAAO,EAAE,eAAe,EAA6B,MAAM,oBAAoB,CAAC;AAYhF,KAAK,UAAU,GAAG;IAChB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,OAAO,CAAC;CACj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