@zyzgroup/core-web 0.1.52 → 0.1.53
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 +17220 -15504
- 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 +223 -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 +61 -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 +58 -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/BallShape.d.ts +89 -0
- package/types/hooks/useDraw/shapes/BallShape.d.ts.map +1 -0
- package/types/hooks/useDraw/shapes/LineShape.d.ts +20 -0
- package/types/hooks/useDraw/shapes/LineShape.d.ts.map +1 -0
- package/types/hooks/useDraw/shapes/TreeShapeCombo.d.ts +6 -0
- package/types/hooks/useDraw/shapes/TreeShapeCombo.d.ts.map +1 -0
- package/types/hooks/useDraw/shapes/index.d.ts +4 -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 +18 -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 +12 -1
- package/types/hooks/useElementEventBus.d.ts.map +1 -1
- package/types/hooks/useElementEvents.d.ts +218 -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/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/index.d.ts +0 -4
- package/types/math/index.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
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { EventBus, EventBusListeners } from "@zyzgroup/core-common";
|
|
2
|
+
import { MousePoint, MousePointEvent } from "./useElementEvents";
|
|
2
3
|
export interface ElementEventBusListeners extends EventBusListeners {
|
|
3
4
|
mouseDown(e: MouseEvent): void;
|
|
4
5
|
mouseUp(e: MouseEvent): void;
|
|
@@ -61,9 +62,19 @@ export declare function useElementEventBus(el?: HTMLElement): {
|
|
|
61
62
|
top: number;
|
|
62
63
|
toJSON(): any;
|
|
63
64
|
};
|
|
64
|
-
mousePoint:
|
|
65
|
+
mousePoint: MousePoint;
|
|
65
66
|
eb: EventBus<ElementEventBusListeners>;
|
|
66
67
|
start: () => Promise<void>;
|
|
67
68
|
end: () => void;
|
|
68
69
|
};
|
|
70
|
+
type Options = {
|
|
71
|
+
start?: (e: MousePointEvent) => void;
|
|
72
|
+
move?: (e: MousePointEvent) => void;
|
|
73
|
+
end?: (e: MousePointEvent) => void;
|
|
74
|
+
};
|
|
75
|
+
export declare function usePressDownMove(controller: ElementEventBusController, options?: Options): () => void;
|
|
76
|
+
export declare function usePressDownMoveWithPointer(controller: ElementEventBusController, options?: Options): () => void;
|
|
77
|
+
export declare function usePressDownMoveWithMouse(controller: ElementEventBusController, options?: Options): () => void;
|
|
78
|
+
export declare function usePressDownMoveWithTouch(controller: ElementEventBusController, options?: Options): () => void;
|
|
79
|
+
export {};
|
|
69
80
|
//# 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,EACL,UAAU,EACV,eAAe,EAEhB,MAAM,oBAAoB,CAAC;AA4D5B,MAAM,WAAW,wBAAyB,SAAQ,iBAAiB;IACjE,SAAS,CAAC,CAAC,EAAE,UAAU,GAAG,IAAI,CAAC;IAC/B,OAAO,CAAC,CAAC,EAAE,UAAU,GAAG,IAAI,CAAC;IAC7B,SAAS,CAAC,CAAC,EAAE,UAAU,GAAG,IAAI,CAAC;IAC/B,SAAS,CAAC,CAAC,EAAE,UAAU,GAAG,IAAI,CAAC;IAC/B,QAAQ,CAAC,CAAC,EAAE,UAAU,GAAG,IAAI,C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K,CAAC,EAAE,CAAC,CAAC,EAAE,eAAe,KAAK,IAAI,CAAC;IACrC,IAAI,CAAC,EAAE,CAAC,CAAC,EAAE,eAAe,KAAK,IAAI,CAAC;IACpC,GAAG,CAAC,EAAE,CAAC,CAAC,EAAE,eAAe,KAAK,IAAI,CAAC;CACpC,CAAC;AAEF,wBAAgB,gBAAgB,CAC9B,UAAU,EAAE,yBAAyB,EACrC,OAAO,CAAC,EAAE,OAAO,GAChB,MAAM,IAAI,CAOZ;AAED,wBAAgB,2BAA2B,CACzC,UAAU,EAAE,yBAAyB,EACrC,OAAO,CAAC,EAAE,OAAO,GAChB,MAAM,IAAI,CA8BZ;AAED,wBAAgB,yBAAyB,CACvC,UAAU,EAAE,yBAAyB,EACrC,OAAO,CAAC,EAAE,OAAO,GAChB,MAAM,IAAI,CA4BZ;AAED,wBAAgB,yBAAyB,CACvC,UAAU,EAAE,yBAAyB,EACrC,OAAO,CAAC,EAAE,OAAO,GAChB,MAAM,IAAI,CAiCZ"}
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
import { AnyElement, ReadInBrowserEnum } from "@zyzgroup/core-common";
|
|
2
|
+
import { Observable } from "rxjs";
|
|
3
|
+
import { HTMLEventObservable } from "./useEventListener";
|
|
4
|
+
export type MousePoint = {
|
|
5
|
+
x: number;
|
|
6
|
+
y: number;
|
|
7
|
+
dx: number;
|
|
8
|
+
dy: number;
|
|
9
|
+
dStartX: number;
|
|
10
|
+
dStartY: number;
|
|
11
|
+
isDown: boolean;
|
|
12
|
+
};
|
|
13
|
+
export declare function useMousePoint(): {
|
|
14
|
+
mousePoint: MousePoint;
|
|
15
|
+
setStartMousePoint: (p: {
|
|
16
|
+
x: number;
|
|
17
|
+
y: number;
|
|
18
|
+
}, isDown?: boolean) => void;
|
|
19
|
+
setCurrentMousePoint: (p: {
|
|
20
|
+
x: number;
|
|
21
|
+
y: number;
|
|
22
|
+
}, isDown?: boolean) => void;
|
|
23
|
+
};
|
|
24
|
+
export declare function mouseMove$(el?: HTMLEventObservable, useCapture?: boolean): Observable<MouseEvent>;
|
|
25
|
+
export declare function mouseDown$(el?: HTMLEventObservable, useCapture?: boolean): Observable<MouseEvent>;
|
|
26
|
+
export declare function mouseUp$(el?: HTMLEventObservable, useCapture?: boolean): Observable<MouseEvent>;
|
|
27
|
+
export declare function mouseOver$(el?: HTMLEventObservable, useCapture?: boolean): Observable<MouseEvent>;
|
|
28
|
+
export declare function mouseOut$(el?: HTMLEventObservable, useCapture?: boolean): Observable<MouseEvent>;
|
|
29
|
+
export declare function mouseEnter$(el?: HTMLEventObservable, useCapture?: boolean): Observable<MouseEvent>;
|
|
30
|
+
export declare function mouseLeave$(el?: HTMLEventObservable, useCapture?: boolean): Observable<MouseEvent>;
|
|
31
|
+
export declare function mouseClick$(el?: HTMLEventObservable, useCapture?: boolean): Observable<MouseEvent>;
|
|
32
|
+
export declare function mouseDoubleClick$(el?: HTMLEventObservable, useCapture?: boolean): Observable<MouseEvent>;
|
|
33
|
+
export declare function mouseWheel$(el?: HTMLEventObservable, useCapture?: boolean): Observable<MouseEvent>;
|
|
34
|
+
export declare function mouseContextMenu$(el?: HTMLEventObservable, useCapture?: boolean): Observable<MouseEvent>;
|
|
35
|
+
export declare function touchMove$(el?: HTMLEventObservable, useCapture?: boolean): Observable<TouchEvent>;
|
|
36
|
+
export declare function touchStart$(el?: HTMLEventObservable, useCapture?: boolean): Observable<TouchEvent>;
|
|
37
|
+
export declare function touchEnd$(el?: HTMLEventObservable, useCapture?: boolean): Observable<TouchEvent>;
|
|
38
|
+
export declare function touchCancel$(el?: HTMLEventObservable, useCapture?: boolean): Observable<TouchEvent>;
|
|
39
|
+
export declare function pointerMove$(el?: HTMLEventObservable, useCapture?: boolean): Observable<PointerEvent>;
|
|
40
|
+
export declare function pointerDown$(el?: HTMLEventObservable, useCapture?: boolean): Observable<PointerEvent>;
|
|
41
|
+
export declare function pointerUp$(el?: HTMLEventObservable, useCapture?: boolean): Observable<PointerEvent>;
|
|
42
|
+
export declare function pointerCancel$(el?: HTMLEventObservable, useCapture?: boolean): Observable<PointerEvent>;
|
|
43
|
+
export declare function pan$(el?: HTMLEventObservable): Observable<HammerInput>;
|
|
44
|
+
export declare function panMove$(el?: HTMLEventObservable): Observable<HammerInput>;
|
|
45
|
+
export declare function panStart$(el?: HTMLEventObservable): Observable<HammerInput>;
|
|
46
|
+
export declare function panEnd$(el?: HTMLEventObservable): Observable<HammerInput>;
|
|
47
|
+
export declare function panCancel$(el?: HTMLEventObservable): Observable<HammerInput>;
|
|
48
|
+
export declare function panLeft$(el?: HTMLEventObservable): Observable<HammerInput>;
|
|
49
|
+
export declare function panRight$(el?: HTMLEventObservable): Observable<HammerInput>;
|
|
50
|
+
export declare function panUp$(el?: HTMLEventObservable): Observable<HammerInput>;
|
|
51
|
+
export declare function panDown$(el?: HTMLEventObservable): Observable<HammerInput>;
|
|
52
|
+
export declare function pinch$(el?: HTMLEventObservable): Observable<HammerInput>;
|
|
53
|
+
export declare function pinchIn$(el?: HTMLEventObservable): Observable<HammerInput>;
|
|
54
|
+
export declare function pinchOut$(el?: HTMLEventObservable): Observable<HammerInput>;
|
|
55
|
+
export declare function press$(el?: HTMLEventObservable): Observable<HammerInput>;
|
|
56
|
+
export declare function rotate$(el?: HTMLEventObservable): Observable<HammerInput>;
|
|
57
|
+
export declare function swipe$(el?: HTMLEventObservable): Observable<HammerInput>;
|
|
58
|
+
export declare function swipeLeft$(el?: HTMLEventObservable): Observable<HammerInput>;
|
|
59
|
+
export declare function swipeRight$(el?: HTMLEventObservable): Observable<HammerInput>;
|
|
60
|
+
export declare function swipeUp$(el?: HTMLEventObservable): Observable<HammerInput>;
|
|
61
|
+
export declare function swipeDown$(el?: HTMLEventObservable): Observable<HammerInput>;
|
|
62
|
+
export declare function tap$(el?: HTMLEventObservable): Observable<HammerInput>;
|
|
63
|
+
export declare function tapOutSide$(el?: HTMLEventObservable): Observable<HammerInput>;
|
|
64
|
+
export declare function transitionStart$(el?: HTMLEventObservable, useCapture?: boolean): Observable<TransitionEvent>;
|
|
65
|
+
export declare function transitionEnd$(el?: HTMLEventObservable, useCapture?: boolean): Observable<TransitionEvent>;
|
|
66
|
+
export declare function animationStart$(el?: HTMLEventObservable, useCapture?: boolean): Observable<AnimationEvent>;
|
|
67
|
+
export declare function animationEnd$(el?: HTMLEventObservable, useCapture?: boolean): Observable<AnimationEvent>;
|
|
68
|
+
export declare function drag$(el?: HTMLEventObservable, useCapture?: boolean): Observable<DragEvent>;
|
|
69
|
+
export declare function dragStart$(el?: HTMLEventObservable, useCapture?: boolean): Observable<DragEvent>;
|
|
70
|
+
export declare function dragEnd$(el?: HTMLEventObservable, useCapture?: boolean): Observable<DragEvent>;
|
|
71
|
+
export declare function drop$(el?: HTMLEventObservable, useCapture?: boolean): Observable<DragEvent>;
|
|
72
|
+
export declare function dragEnter$(el?: HTMLEventObservable, useCapture?: boolean): Observable<DragEvent>;
|
|
73
|
+
export declare function dragLeave$(el?: HTMLEventObservable, useCapture?: boolean): Observable<DragEvent>;
|
|
74
|
+
export declare function dragOver$(el?: HTMLEventObservable, useCapture?: boolean): Observable<DragEvent>;
|
|
75
|
+
export declare function keyDown$(el?: HTMLEventObservable, useCapture?: boolean): Observable<KeyboardEvent>;
|
|
76
|
+
export declare function keyUp$(el?: HTMLEventObservable, useCapture?: boolean): Observable<KeyboardEvent>;
|
|
77
|
+
export declare function keyPress$(el?: HTMLEventObservable, useCapture?: boolean): Observable<KeyboardEvent>;
|
|
78
|
+
type MousePointMoveOptions = {
|
|
79
|
+
start?: (e: MousePointEvent, mp: MousePoint) => void;
|
|
80
|
+
end?: (e: MousePointEvent, mp: MousePoint) => void;
|
|
81
|
+
useMousePoint?: ReturnType<typeof useMousePoint>;
|
|
82
|
+
};
|
|
83
|
+
export declare function useMouseMovePoint$(el?: HTMLElement, options?: Pick<MousePointMoveOptions, "useMousePoint">): Observable<MousePoint>;
|
|
84
|
+
export declare function useMouseDownMovePoint$(el?: HTMLElement, options?: MousePointMoveOptions): Observable<MousePoint>;
|
|
85
|
+
export declare function useTouchDownMovePoint$(el?: HTMLElement, options?: MousePointMoveOptions): Observable<MousePoint>;
|
|
86
|
+
export declare function usePointerDownMovePoint$(el?: HTMLElement, options?: MousePointMoveOptions): Observable<MousePoint>;
|
|
87
|
+
export declare function useMouseAndPointerDownMovePoint$(el?: HTMLElement, options?: MousePointMoveOptions): Observable<MousePoint>;
|
|
88
|
+
export declare function usePull$(el: HTMLElement): Observable<number>;
|
|
89
|
+
export declare function useDraggable(el: HTMLElement, options?: {
|
|
90
|
+
onStart?: (e: DragEvent) => void;
|
|
91
|
+
onDrag?: (e: DragEvent) => void;
|
|
92
|
+
onEnd?: (e: DragEvent) => void;
|
|
93
|
+
}): () => void;
|
|
94
|
+
export declare function useDrop(el: HTMLElement, options?: {
|
|
95
|
+
onEnter?: (e: DragEvent) => void;
|
|
96
|
+
onLeave?: (e: DragEvent) => void;
|
|
97
|
+
onOver?: (e: DragEvent) => void;
|
|
98
|
+
onDrop?: (e: DragEvent, files: File[]) => void;
|
|
99
|
+
}): () => void;
|
|
100
|
+
export declare function useScroll$(time?: number): Observable<Event>;
|
|
101
|
+
export declare function useWindowVisible$(): Observable<boolean>;
|
|
102
|
+
export declare function getScreenPosition(): {
|
|
103
|
+
screenWidth: number;
|
|
104
|
+
screenHeight: number;
|
|
105
|
+
screenX: number;
|
|
106
|
+
screenY: number;
|
|
107
|
+
};
|
|
108
|
+
export declare function getDocumentElementPosition(): {
|
|
109
|
+
clientWidth: number;
|
|
110
|
+
clientHeight: number;
|
|
111
|
+
clientTop: number;
|
|
112
|
+
clientLeft: number;
|
|
113
|
+
scrollWidth: number;
|
|
114
|
+
scrollHeight: number;
|
|
115
|
+
scrollTop: number;
|
|
116
|
+
scrollLeft: number;
|
|
117
|
+
offsetWidth: number;
|
|
118
|
+
offsetHeight: number;
|
|
119
|
+
offsetTop: number;
|
|
120
|
+
offsetLeft: number;
|
|
121
|
+
offsetParent: Element | null;
|
|
122
|
+
};
|
|
123
|
+
export declare function getBodyPosition(): {
|
|
124
|
+
clientWidth: number;
|
|
125
|
+
clientHeight: number;
|
|
126
|
+
clientTop: number;
|
|
127
|
+
clientLeft: number;
|
|
128
|
+
scrollWidth: number;
|
|
129
|
+
scrollHeight: number;
|
|
130
|
+
scrollTop: number;
|
|
131
|
+
scrollLeft: number;
|
|
132
|
+
offsetWidth: number;
|
|
133
|
+
offsetHeight: number;
|
|
134
|
+
offsetTop: number;
|
|
135
|
+
offsetLeft: number;
|
|
136
|
+
offsetParent: Element | null;
|
|
137
|
+
};
|
|
138
|
+
export declare function getViewportSize(): {
|
|
139
|
+
width: number;
|
|
140
|
+
height: number;
|
|
141
|
+
};
|
|
142
|
+
export declare function getPageSize(): {
|
|
143
|
+
width: number;
|
|
144
|
+
height: number;
|
|
145
|
+
};
|
|
146
|
+
export declare function getElementPositionInPage(el: HTMLElement | SVGElement | Element): {
|
|
147
|
+
x: number;
|
|
148
|
+
y: number;
|
|
149
|
+
width: number;
|
|
150
|
+
height: number;
|
|
151
|
+
};
|
|
152
|
+
export declare function getElementPositionInPage2(el: HTMLElement): {
|
|
153
|
+
x: number;
|
|
154
|
+
y: number;
|
|
155
|
+
width: number;
|
|
156
|
+
height: number;
|
|
157
|
+
};
|
|
158
|
+
export declare function getElementPositionInViewport(el: HTMLElement): DOMRect;
|
|
159
|
+
export declare function getRelativeBoundingClientRect(child: HTMLElement): {
|
|
160
|
+
x: number;
|
|
161
|
+
y: number;
|
|
162
|
+
width: number;
|
|
163
|
+
height: number;
|
|
164
|
+
};
|
|
165
|
+
export declare function getVerticalScrollPercentInPage(): number;
|
|
166
|
+
export type MousePointEvent = MouseEvent | Touch | PointerEvent | HammerInput;
|
|
167
|
+
export declare function getMousePositionInViewport(ev: MousePointEvent): {
|
|
168
|
+
x: number;
|
|
169
|
+
y: number;
|
|
170
|
+
};
|
|
171
|
+
export declare function getMousePositionInPage(ev: MousePointEvent): HammerPoint;
|
|
172
|
+
export declare function getMousePositionInElement(ev: MousePointEvent, element?: AnyElement): {
|
|
173
|
+
x: number;
|
|
174
|
+
y: number;
|
|
175
|
+
};
|
|
176
|
+
export declare function getMouseButton(event: MouseEvent): number | undefined;
|
|
177
|
+
export declare const CommonKeyCode: {
|
|
178
|
+
BACKSPACE: number;
|
|
179
|
+
TAB: number;
|
|
180
|
+
COMMA: number;
|
|
181
|
+
DELETE: number;
|
|
182
|
+
END: number;
|
|
183
|
+
ENTER: number;
|
|
184
|
+
ESCAPE: number;
|
|
185
|
+
HOME: number;
|
|
186
|
+
LEFT: number;
|
|
187
|
+
UP: number;
|
|
188
|
+
DOWN: number;
|
|
189
|
+
PAGE_DOWN: number;
|
|
190
|
+
PAGE_UP: number;
|
|
191
|
+
PERIOD: number;
|
|
192
|
+
RIGHT: number;
|
|
193
|
+
SPACE: number;
|
|
194
|
+
};
|
|
195
|
+
export declare function getKeyCode(e: KeyboardEvent): string | number | undefined;
|
|
196
|
+
export interface HotKeyOptions {
|
|
197
|
+
keys: string[];
|
|
198
|
+
ctrl?: boolean;
|
|
199
|
+
shift?: boolean;
|
|
200
|
+
alt?: boolean;
|
|
201
|
+
target?: EventTarget;
|
|
202
|
+
}
|
|
203
|
+
export declare function useHotKeyDown$(options: HotKeyOptions): Observable<void>;
|
|
204
|
+
export declare function useHotKeyUp$(options: HotKeyOptions): Observable<void>;
|
|
205
|
+
export declare function useHotKeyFile$(hotKeyOptions?: HotKeyOptions, type?: ReadInBrowserEnum): Observable<{
|
|
206
|
+
type: string;
|
|
207
|
+
name: string;
|
|
208
|
+
size: number;
|
|
209
|
+
data: string | ArrayBuffer;
|
|
210
|
+
}>;
|
|
211
|
+
export declare function useHotKeyFile(hotKeyOptions?: HotKeyOptions, type?: ReadInBrowserEnum): Promise<{
|
|
212
|
+
type: string;
|
|
213
|
+
name: string;
|
|
214
|
+
size: number;
|
|
215
|
+
data: string | ArrayBuffer;
|
|
216
|
+
}>;
|
|
217
|
+
export {};
|
|
218
|
+
//# sourceMappingURL=useElementEvents.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useElementEvents.d.ts","sourceRoot":"","sources":["../../src/hooks/useElementEvents.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAS,MAAM,uBAAuB,CAAC;AAC7E,OAAO,EAEL,UAAU,EASX,MAAM,MAAM,CAAC;AAed,OAAO,EAEL,mBAAmB,EAGpB,MAAM,oBAAoB,CAAC;AAW5B,MAAM,MAAM,UAAU,GAAG;IACvB,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;CACjB,CAAC;AAEF,wBAAgB,aAAa;;4BAyBpB;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,WAClB,OAAO;8BAYQ;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,WAAW,OAAO;EAYvE;AAGD,wBAAgB,UAAU,CACxB,EAAE,GAAE,mBAA8C,EAClD,UAAU,UAAQ,GACjB,UAAU,CAAC,UAAU,CAAC,CAExB;AACD,wBAAgB,UAAU,CACxB,EAAE,GAAE,mBAA8C,EAClD,UAAU,UAAQ,GACjB,UAAU,CAAC,UAAU,CAAC,CAExB;AACD,wBAAgB,QAAQ,CACtB,EAAE,GAAE,mBAA8C,EAClD,UAAU,UAAQ,GACjB,UAAU,CAAC,UAAU,CAAC,CAExB;AACD,wBAAgB,UAAU,CACxB,EAAE,GAAE,mBAA8C,EAClD,UAAU,UAAQ,GACjB,UAAU,CAAC,UAAU,CAAC,CAExB;AACD,wBAAgB,SAAS,CACvB,EAAE,GAAE,mBAA8C,EAClD,UAAU,UAAQ,GACjB,UAAU,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AW,aAAa;IAC5B,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AAsBD,wBAAgB,cAAc,CAAC,OAAO,EAAE,aAAa,GAAG,UAAU,CAAC,IAAI,CAAC,CASvE;AAGD,wBAAgB,YAAY,CAAC,OAAO,EAAE,aAAa,GAAG,UAAU,CAAC,IAAI,CAAC,CASrE;AAGD,wBAAgB,cAAc,CAC5B,aAAa,GAAE,aAA+B,EAC9C,IAAI,GAAE,iBAA0C;;;;;GAYjD;AAGD,wBAAsB,aAAa,CACjC,aAAa,GAAE,aAA+B,EAC9C,IAAI,GAAE,iBAA0C;;;;;GAGjD"}
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { Observable } from "rxjs";
|
|
2
|
-
type EventMap = GlobalEventHandlersEventMap & ElementEventMap & HTMLElementEventMap & DocumentEventMap & WindowEventHandlersEventMap & WindowEventMap & MediaQueryListEventMap;
|
|
3
|
-
export
|
|
4
|
-
export declare function
|
|
5
|
-
export
|
|
2
|
+
export type EventMap = GlobalEventHandlersEventMap & ElementEventMap & HTMLElementEventMap & DocumentEventMap & WindowEventHandlersEventMap & WindowEventMap & MediaQueryListEventMap;
|
|
3
|
+
export type HTMLEventObservable = EventTarget | HTMLElement | SVGElement | SVGSVGElement | HTMLCanvasElement | any;
|
|
4
|
+
export declare function useEventListener<K extends keyof EventMap>(target: HTMLEventObservable, event: K | "mousewheel" | "DOMMouseScroll", handler: (e: EventMap[K]) => void | Promise<void>, useCapture?: boolean): () => void;
|
|
5
|
+
export declare function useEvent$<K extends keyof EventMap>(target: HTMLEventObservable, event: K | "mousewheel" | "DOMMouseScroll", useCapture?: boolean): Observable<EventMap[K]>;
|
|
6
|
+
export declare function preventDefault(e: Event): void;
|
|
7
|
+
export declare function cancelBubble(e: Event): void;
|
|
8
|
+
export declare function fireEvent(target: HTMLEventObservable, eventName: string, options?: MouseEventInit | KeyboardEventInit | TouchEventInit | PointerEventInit | DragEventInit | EventInit | CustomEventInit): void;
|
|
9
|
+
export declare function simulateMouseEventFromTouch(event: TouchEvent, eventName: string): MouseEvent;
|
|
10
|
+
export declare function isEventSupported(nodeName: any, eventName: string): boolean;
|
|
6
11
|
//# sourceMappingURL=useEventListener.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useEventListener.d.ts","sourceRoot":"","sources":["../../src/hooks/useEventListener.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,MAAM,MAAM,CAAC;AAE7C,
|
|
1
|
+
{"version":3,"file":"useEventListener.d.ts","sourceRoot":"","sources":["../../src/hooks/useEventListener.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,MAAM,MAAM,CAAC;AAE7C,MAAM,MAAM,QAAQ,GAAG,2BAA2B,GAChD,eAAe,GACf,mBAAmB,GACnB,gBAAgB,GAChB,2BAA2B,GAC3B,cAAc,GACd,sBAAsB,CAAC;AAKzB,MAAM,MAAM,mBAAmB,GAC3B,WAAW,GACX,WAAW,GACX,UAAU,GACV,aAAa,GACb,iBAAiB,GACjB,GAAG,CAAC;AAER,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,MAAM,QAAQ,EACvD,MAAM,EAAE,mBAAmB,EAC3B,KAAK,EAAE,CAAC,GAAG,YAAY,GAAG,gBAAgB,EAC1C,OAAO,EAAE,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,EACjD,UAAU,UAAQ,GACjB,MAAM,IAAI,CAkBZ;AAED,wBAAgB,SAAS,CAAC,CAAC,SAAS,MAAM,QAAQ,EAChD,MAAM,EAAE,mBAAmB,EAC3B,KAAK,EAAE,CAAC,GAAG,YAAY,GAAG,gBAAgB,EAC1C,UAAU,UAAQ,GACjB,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAGzB;AAGD,wBAAgB,cAAc,CAAC,CAAC,EAAE,KAAK,QAUtC;AAID,wBAAgB,YAAY,CAAC,CAAC,EAAE,KAAK,QAUpC;AA6CD,wBAAgB,SAAS,CACvB,MAAM,EAAE,mBAAmB,EAC3B,SAAS,EAAE,MAAM,EACjB,OAAO,GACH,cAAc,GACd,iBAAiB,GACjB,cAAc,GACd,gBAAgB,GAChB,aAAa,GACb,SAAS,GACT,eAGH,QA2CF;AAED,wBAAgB,2BAA2B,CACzC,KAAK,EAAE,UAAU,EACjB,SAAS,EAAE,MAAM,GAChB,UAAU,CAkBZ;AAOD,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAU1E"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
import { type AnyElement } from "@zyzgroup/core-common";
|
|
2
|
+
import { Observable } from "rxjs";
|
|
2
3
|
export declare function useIntersection(el: AnyElement, cb: (entries: IntersectionObserverEntry[], observer: IntersectionObserver) => void, options?: IntersectionObserverInit): Promise<() => void>;
|
|
4
|
+
export declare function useIntersection$(el: AnyElement, options?: IntersectionObserverInit): Observable<IntersectionObserverEntry[]>;
|
|
3
5
|
//# sourceMappingURL=useIntersection.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useIntersection.d.ts","sourceRoot":"","sources":["../../src/hooks/useIntersection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"useIntersection.d.ts","sourceRoot":"","sources":["../../src/hooks/useIntersection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAElC,wBAAsB,eAAe,CACnC,EAAE,EAAE,UAAU,EACd,EAAE,EAAE,CACF,OAAO,EAAE,yBAAyB,EAAE,EACpC,QAAQ,EAAE,oBAAoB,KAC3B,IAAI,EACT,OAAO,GAAE,wBAGR,iBAEwB,IAAI,EAkC9B;AAED,wBAAgB,gBAAgB,CAC9B,EAAE,EAAE,UAAU,EACd,OAAO,GAAE,wBAGR,GACA,UAAU,CAAC,yBAAyB,EAAE,CAAC,CA6BzC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useMatchMedia.d.ts","sourceRoot":"","sources":["../../src/hooks/useMatchMedia.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAQlC,wBAAgB,cAAc,CAC5B,KAAK,SAAiC,GACrC,UAAU,CAAC,OAAO,CAAC,CAOrB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type AnyElement } from "@zyzgroup/core-common";
|
|
2
2
|
export declare function getStyle(el: AnyElement | any, prop?: string, pseudo?: string): any;
|
|
3
|
-
export declare function setStyle(el: HTMLElement | any, prop: string | Record<string, string>, value?: string): void;
|
|
3
|
+
export declare function setStyle(el: HTMLElement | any, prop: string | Record<string, string | CanvasGradient>, value?: string): void;
|
|
4
4
|
export declare function atomReadStyles(el: HTMLElement | any): Record<string, string>;
|
|
5
5
|
export declare function atomReadStyle(el: HTMLElement | any, prop: string, pseudo?: string): string;
|
|
6
6
|
export declare function atomWriteStyle(el: HTMLElement | any, prop: string | Record<string, string>, value?: string): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useStyle.d.ts","sourceRoot":"","sources":["../../src/hooks/useStyle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,KAAK,UAAU,EAAW,MAAM,uBAAuB,CAAC;AAsD1E,wBAAgB,QAAQ,CACtB,EAAE,EAAE,UAAU,GAAG,GAAG,EACpB,IAAI,CAAC,EAAE,MAAM,EACb,MAAM,CAAC,EAAE,MAA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,EAAE,UAAU,EACd,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAChC,WAAW,GAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAM,GACpC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CA6NxB"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { Observable } from "rxjs";
|
|
1
2
|
export type ThemeType = "dark" | "light";
|
|
2
|
-
export declare function setTheme(t: ThemeType):
|
|
3
|
-
export declare function
|
|
4
|
-
export declare function
|
|
3
|
+
export declare function setTheme(t: ThemeType): ThemeType;
|
|
4
|
+
export declare function toggleTheme(): ThemeType;
|
|
5
|
+
export declare function getTheme$(): Observable<ThemeType>;
|
|
5
6
|
export declare function getCSSVar(name: string, defaultValue?: string): string;
|
|
6
7
|
export declare function setCSSVar(name: string, value: string): void;
|
|
7
8
|
//# sourceMappingURL=useTheme.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTheme.d.ts","sourceRoot":"","sources":["../../src/hooks/useTheme.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useTheme.d.ts","sourceRoot":"","sources":["../../src/hooks/useTheme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAA0B,MAAM,MAAM,CAAC;AAS1D,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,OAAO,CAAC;AASzC,wBAAgB,QAAQ,CAAC,CAAC,EAAE,SAAS,GAAG,SAAS,CAehD;AAED,wBAAgB,WAAW,IAAI,SAAS,CAEvC;AAED,wBAAgB,SAAS,IAAI,UAAU,CAAC,SAAS,CAAC,CAiBjD;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,YAAY,SAAK,GAAG,MAAM,CAKjE;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAG3D"}
|
|
@@ -1,14 +1,10 @@
|
|
|
1
|
+
import { Observable } from "rxjs";
|
|
1
2
|
import { type AnyElement } from "@zyzgroup/core-common";
|
|
2
|
-
export declare function useVisibleSimple(el: AnyElement, options?: {
|
|
3
|
+
export declare function useVisibleSimple$(el: AnyElement, options?: {
|
|
3
4
|
root?: HTMLElement;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}): () => void;
|
|
7
|
-
export declare function useVisible(el: AnyElement, options: {
|
|
5
|
+
}): Observable<boolean>;
|
|
6
|
+
export declare function useVisible$(el: AnyElement, options?: {
|
|
8
7
|
threshold?: number;
|
|
9
8
|
root?: HTMLElement;
|
|
10
|
-
|
|
11
|
-
onHide?: () => void;
|
|
12
|
-
}): Promise<() => void>;
|
|
13
|
-
export declare function useWindowVisible(cb: (isShow: boolean) => void): () => void;
|
|
9
|
+
}): Observable<boolean>;
|
|
14
10
|
//# sourceMappingURL=useVisible.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useVisible.d.ts","sourceRoot":"","sources":["../../src/hooks/useVisible.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"useVisible.d.ts","sourceRoot":"","sources":["../../src/hooks/useVisible.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAwC,MAAM,MAAM,CAAC;AACxE,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAIxD,wBAAgB,iBAAiB,CAC/B,EAAE,EAAE,UAAU,EACd,OAAO,CAAC,EAAE;IAAE,IAAI,CAAC,EAAE,WAAW,CAAA;CAAE,GAC/B,UAAU,CAAC,OAAO,CAAC,CAcrB;AAED,wBAAgB,WAAW,CACzB,EAAE,EAAE,UAAU,EACd,OAAO,CAAC,EAAE;IACR,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,WAAW,CAAC;CACpB,GACA,UAAU,CAAC,OAAO,CAAC,CAoBrB"}
|
package/types/index.d.ts
CHANGED
package/types/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AAEvB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AAExB,cAAc,mBAAmB,CAAC;AAClC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AAEvB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AAExB,cAAc,mBAAmB,CAAC;AAClC,cAAc,OAAO,CAAC;AACtB,cAAc,OAAO,CAAC;AACtB,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC;AACtB,cAAc,aAAa,CAAC;AAE5B,cAAc,YAAY,CAAC;AAC3B,cAAc,oBAAoB,CAAC;AAEnC,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AAExB,cAAc,UAAU,CAAC;AAEzB,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAE1B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAE9B,cAAc,aAAa,CAAC;AAE5B,cAAc,cAAc,CAAC"}
|
package/types/math/index.d.ts
CHANGED
|
@@ -2,8 +2,4 @@ export * from "./math";
|
|
|
2
2
|
export * from "./Vector";
|
|
3
3
|
export * from "./Matrix";
|
|
4
4
|
export * from "./BufferAttribute";
|
|
5
|
-
export * from "./Shape";
|
|
6
|
-
export * from "./ShapeGroup";
|
|
7
|
-
export * from "./ShapeCombo";
|
|
8
|
-
export * from "./shapes/";
|
|
9
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/math/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,mBAAmB,CAAC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/math/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,mBAAmB,CAAC"}
|
package/types/svg/YZSVG.d.ts
CHANGED
|
@@ -1,35 +1 @@
|
|
|
1
|
-
import { ElementEventBusController, useElement } from "../hooks";
|
|
2
|
-
import { Shape } from "../math";
|
|
3
|
-
export declare class YZSVG {
|
|
4
|
-
controller: ElementEventBusController;
|
|
5
|
-
rootEl: SVGSVGElement;
|
|
6
|
-
ue: ReturnType<typeof useElement>;
|
|
7
|
-
shapes: Shape[];
|
|
8
|
-
currentMouseInShape?: Shape;
|
|
9
|
-
currentEnableDragMouseInShape?: Shape;
|
|
10
|
-
dragDx: number;
|
|
11
|
-
dragDy: number;
|
|
12
|
-
constructor(controller: ElementEventBusController, forceWidth?: number, forceHeight?: number);
|
|
13
|
-
setCursor(): void;
|
|
14
|
-
setSize(width: number, height: number): this;
|
|
15
|
-
download(): void;
|
|
16
|
-
_addDrawShape(shape: Shape): void;
|
|
17
|
-
path(shapes: Shape | Shape[]): void;
|
|
18
|
-
delete(shapes: Shape | Shape[]): void;
|
|
19
|
-
clear(): void;
|
|
20
|
-
attr(s: Shape | SVGElement): Record<string, string>;
|
|
21
|
-
attr(s: Shape | SVGElement, name: string): string;
|
|
22
|
-
attr(s: Shape | SVGElement, name: string, value: string): this;
|
|
23
|
-
attr(s: Shape | SVGElement, name: Record<string, string>): this;
|
|
24
|
-
circle(cx: number, cy: number, radius: number): void;
|
|
25
|
-
circleEl(cx: number, cy: number, radius: number): SVGElement;
|
|
26
|
-
ellipse(cx: number, cy: number, rx: number, ry: number): void;
|
|
27
|
-
ellipseEl(cx: number, cy: number, rx: number, ry: number): SVGElement;
|
|
28
|
-
rect(x: number, y: number, width: number, height: number): void;
|
|
29
|
-
rectEl(x: number, y: number, width: number, height: number): SVGElement;
|
|
30
|
-
image(src: string, x: number, y: number, width: number, height: number): void;
|
|
31
|
-
text(text: string, x: number, y: number, attrs?: Record<string, string>): SVGElement;
|
|
32
|
-
textWithTspan(text: string, x: number, y: number, attrs?: Record<string, string>): SVGElement;
|
|
33
|
-
}
|
|
34
|
-
export default YZSVG;
|
|
35
1
|
//# sourceMappingURL=YZSVG.d.ts.map
|
package/types/svg/YZSVG.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"YZSVG.d.ts","sourceRoot":"","sources":["../../src/svg/YZSVG.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"YZSVG.d.ts","sourceRoot":"","sources":["../../src/svg/YZSVG.ts"],"names":[],"mappings":""}
|
package/types/svg/index.d.ts
CHANGED
package/types/svg/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/svg/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/svg/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"onDocumentReady.d.ts","sourceRoot":"","sources":["../../src/hooks/onDocumentReady.ts"],"names":[],"mappings":"AAKA,wBAAgB,eAAe,CAAC,EAAE,EAAE,MAAM,IAAI,SAE1B,IAAI,CAiBvB;AAED,wBAAgB,cAAc,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,iBAAiB,KAAK,IAAI,cAIhE"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { type AnyElement } from "@zyzgroup/core-common";
|
|
2
|
-
export declare function toggleClass(el: AnyElement, className: string, act?: "toggle" | "add" | "remove"): void;
|
|
3
|
-
export declare function addClass(el: AnyElement, className: string): void;
|
|
4
|
-
export declare function removeClass(el: AnyElement, className: string): void;
|
|
5
|
-
export declare function hasClass(el: AnyElement, className: string): boolean;
|
|
6
|
-
//# sourceMappingURL=useClass.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useClass.d.ts","sourceRoot":"","sources":["../../src/hooks/useClass.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAGxD,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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useClickA.d.ts","sourceRoot":"","sources":["../../src/hooks/useClickA.ts"],"names":[],"mappings":"AAAA,wBAAgB,SAAS,CAAC,SAAS,EAAE,IAAI,GAAG,MAAM,EAAE,QAAQ,EAAE,MAAM,QAanE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useClipboard.d.ts","sourceRoot":"","sources":["../../src/hooks/useClipboard.ts"],"names":[],"mappings":"AAAA,wBAAsB,YAAY,CAAC,IAAI,EAAE,MAAM,2BAiB9C"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { type AnyElement } from "@zyzgroup/core-common";
|
|
2
|
-
export declare function toggleElDisplay(el: AnyElement, force?: boolean): void;
|
|
3
|
-
export declare function showEl(el: AnyElement): void;
|
|
4
|
-
export declare function hideEl(el: AnyElement): void;
|
|
5
|
-
//# sourceMappingURL=useDisplay.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useDisplay.d.ts","sourceRoot":"","sources":["../../src/hooks/useDisplay.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAIxD,wBAAgB,eAAe,CAAC,EAAE,EAAE,UAAU,EAAE,KAAK,CAAC,EAAE,OAAO,QAS9D;AAED,wBAAgB,MAAM,CAAC,EAAE,EAAE,UAAU,QAUpC;AAED,wBAAgB,MAAM,CAAC,EAAE,EAAE,UAAU,QAEpC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export declare function useDraggable(el: HTMLElement, options?: {
|
|
2
|
-
onStart?: (e: DragEvent) => void;
|
|
3
|
-
onDrag?: (e: DragEvent) => void;
|
|
4
|
-
onEnd?: (e: DragEvent) => void;
|
|
5
|
-
}): () => void;
|
|
6
|
-
export declare function useDrop(el: HTMLElement, options?: {
|
|
7
|
-
onEnter?: (e: DragEvent) => void;
|
|
8
|
-
onOver?: (e: DragEvent) => void;
|
|
9
|
-
onLeave?: (e: DragEvent) => void;
|
|
10
|
-
onDrop?: (e: DragEvent, files: File[]) => void;
|
|
11
|
-
}): () => void;
|
|
12
|
-
//# sourceMappingURL=useDragDrop.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useDragDrop.d.ts","sourceRoot":"","sources":["../../src/hooks/useDragDrop.ts"],"names":[],"mappings":"AAKA,wBAAgB,YAAY,CAC1B,EAAE,EAAE,WAAW,EACf,OAAO,CAAC,EAAE;IACR,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,SAAS,KAAK,IAAI,CAAC;IACjC,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,SAAS,KAAK,IAAI,CAAC;IAChC,KAAK,CAAC,EAAE,CAAC,CAAC,EAAE,SAAS,KAAK,IAAI,CAAC;CAChC,GACA,MAAM,IAAI,CA6CZ;AAGD,wBAAgB,OAAO,CACrB,EAAE,EAAE,WAAW,EACf,OAAO,CAAC,EAAE;IACR,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,SAAS,KAAK,IAAI,CAAC;IACjC,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,SAAS,KAAK,IAAI,CAAC;IAChC,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,SAAS,KAAK,IAAI,CAAC;IACjC,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,IAAI,CAAC;CAChD,GACA,MAAM,IAAI,CA+DZ"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export declare function useFireEvent(target: EventTarget | any, eventName: string, options?: MouseEventInit | KeyboardEventInit | TouchEventInit | PointerEventInit | DragEventInit | EventInit | CustomEventInit): void;
|
|
2
|
-
export declare function simulateMouseEventFromTouch(event: TouchEvent, eventName: string): MouseEvent;
|
|
3
|
-
export declare function preventDefault(e: Event): void;
|
|
4
|
-
export declare function cancelBubble(e: Event): void;
|
|
5
|
-
export declare function isEventSupported(nodeName: any, eventName: string): boolean;
|
|
6
|
-
export declare function getMouseButton(event: MouseEvent): number | undefined;
|
|
7
|
-
//# sourceMappingURL=useFireEvent.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useFireEvent.d.ts","sourceRoot":"","sources":["../../src/hooks/useFireEvent.ts"],"names":[],"mappings":"AA6CA,wBAAgB,YAAY,CAC1B,MAAM,EAAE,WAAW,GAAG,GAAG,EACzB,SAAS,EAAE,MAAM,EACjB,OAAO,GACH,cAAc,GACd,iBAAiB,GACjB,cAAc,GACd,gBAAgB,GAChB,aAAa,GACb,SAAS,GACT,eAGH,QA2CF;AAED,wBAAgB,2BAA2B,CACzC,KAAK,EAAE,UAAU,EACjB,SAAS,EAAE,MAAM,GAChB,UAAU,CAkBZ;AAED,wBAAgB,cAAc,CAAC,CAAC,EAAE,KAAK,QAStC;AAED,wBAAgB,YAAY,CAAC,CAAC,EAAE,KAAK,QASpC;AAOD,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAU1E;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,UAAU,sBAkB/C"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
export interface HotKeyOptions {
|
|
2
|
-
keys: string[];
|
|
3
|
-
ctrl?: boolean;
|
|
4
|
-
shift?: boolean;
|
|
5
|
-
alt?: boolean;
|
|
6
|
-
target?: EventTarget;
|
|
7
|
-
}
|
|
8
|
-
export declare function useHotKey(options: HotKeyOptions, keydownCb: () => Promise<void> | void, keyupCb?: () => Promise<void> | void): {
|
|
9
|
-
hotKeys: (options: HotKeyOptions) => string[];
|
|
10
|
-
destroy: () => void;
|
|
11
|
-
pause: () => boolean;
|
|
12
|
-
resume: () => boolean;
|
|
13
|
-
};
|
|
14
|
-
export declare const CommonKeyCode: {
|
|
15
|
-
BACKSPACE: number;
|
|
16
|
-
TAB: number;
|
|
17
|
-
COMMA: number;
|
|
18
|
-
DELETE: number;
|
|
19
|
-
END: number;
|
|
20
|
-
ENTER: number;
|
|
21
|
-
ESCAPE: number;
|
|
22
|
-
HOME: number;
|
|
23
|
-
LEFT: number;
|
|
24
|
-
UP: number;
|
|
25
|
-
DOWN: number;
|
|
26
|
-
PAGE_DOWN: number;
|
|
27
|
-
PAGE_UP: number;
|
|
28
|
-
PERIOD: number;
|
|
29
|
-
RIGHT: number;
|
|
30
|
-
SPACE: number;
|
|
31
|
-
};
|
|
32
|
-
export declare function getKeyCode(e: KeyboardEvent): string | number | undefined;
|
|
33
|
-
//# sourceMappingURL=useHotKey.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useHotKey.d.ts","sourceRoot":"","sources":["../../src/hooks/useHotKey.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AAkBD,wBAAgB,SAAS,CACvB,OAAO,EAAE,aAAa,EACtB,SAAS,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,EACrC,OAAO,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI;uBAsCN,aAAa,KAAG,MAAM,EAAE;;;;EAsBvD;AAED,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;CAiBzB,CAAC;AAEF,wBAAgB,UAAU,CAAC,CAAC,EAAE,aAAa,+BAQ1C"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ReadInBrowserEnum } from "@zyzgroup/core-common";
|
|
2
|
-
import { type HotKeyOptions } from "./useHotKey";
|
|
3
|
-
export declare function useHotKeyFileOnce(hotKeyOptions?: HotKeyOptions, type?: ReadInBrowserEnum): Promise<any>;
|
|
4
|
-
export declare function useHotKeyFileLoop(hotKeyOptions?: HotKeyOptions, type?: ReadInBrowserEnum): {
|
|
5
|
-
on: (cb: (file: string | ArrayBuffer) => void) => void;
|
|
6
|
-
off: (cb: (file: string | ArrayBuffer) => void) => void;
|
|
7
|
-
};
|
|
8
|
-
//# sourceMappingURL=useHotKeyFile.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useHotKeyFile.d.ts","sourceRoot":"","sources":["../../src/hooks/useHotKeyFile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,iBAAiB,EAAY,MAAM,uBAAuB,CAAC;AAC9E,OAAO,EAAE,KAAK,aAAa,EAAa,MAAM,aAAa,CAAC;AAI5D,wBAAsB,iBAAiB,CACrC,aAAa,GAAE,aAA+B,EAC9C,IAAI,GAAE,iBAA0C,gBAkBjD;AAGD,wBAAgB,iBAAiB,CAC/B,aAAa,GAAE,aAA+B,EAC9C,IAAI,GAAE,iBAA0C;aAmBrC,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,KAAK,IAAI;cAGnC,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,KAAK,IAAI;EAIjD"}
|