@zyzgroup/core-web 0.1.10 → 0.1.12

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.
Files changed (147) hide show
  1. package/dist/better.css +0 -8
  2. package/dist/theme.css +32 -0
  3. package/dist/zyzgroup_core_web.iife.js +23 -25
  4. package/dist/zyzgroup_core_web.iife.js.map +1 -1
  5. package/dist/zyzgroup_core_web.js +10368 -8472
  6. package/dist/zyzgroup_core_web.js.map +1 -1
  7. package/dist/zyzgroup_core_web.umd.cjs +23 -25
  8. package/dist/zyzgroup_core_web.umd.cjs.map +1 -1
  9. package/package.json +1 -1
  10. package/types/animate/_YZAnimate.d.ts +0 -78
  11. package/types/animate/_YZAnimate.d.ts.map +1 -1
  12. package/types/canvas/YZCanvas.d.ts +4 -5
  13. package/types/canvas/YZCanvas.d.ts.map +1 -1
  14. package/types/color.d.ts +114 -0
  15. package/types/color.d.ts.map +1 -0
  16. package/types/dom/index.d.ts +0 -1
  17. package/types/dom/index.d.ts.map +1 -1
  18. package/types/env.d.ts +1 -0
  19. package/types/env.d.ts.map +1 -1
  20. package/types/hooks/index.d.ts +8 -3
  21. package/types/hooks/index.d.ts.map +1 -1
  22. package/types/hooks/onDocumentReady.d.ts +3 -0
  23. package/types/hooks/onDocumentReady.d.ts.map +1 -0
  24. package/types/hooks/useDragDrop.d.ts.map +1 -1
  25. package/types/hooks/useElement.d.ts +1 -1
  26. package/types/hooks/useElement.d.ts.map +1 -1
  27. package/types/hooks/useElementEventBus.d.ts +67 -0
  28. package/types/hooks/useElementEventBus.d.ts.map +1 -0
  29. package/types/hooks/useEventListener.d.ts +1 -1
  30. package/types/hooks/useEventListener.d.ts.map +1 -1
  31. package/types/hooks/useFeRouteChange.d.ts +9 -0
  32. package/types/hooks/useFeRouteChange.d.ts.map +1 -0
  33. package/types/hooks/useHotKey.d.ts +1 -1
  34. package/types/hooks/useHotKey.d.ts.map +1 -1
  35. package/types/hooks/useHotKeyFile.d.ts.map +1 -1
  36. package/types/hooks/useIntersection.d.ts +3 -0
  37. package/types/hooks/useIntersection.d.ts.map +1 -0
  38. package/types/hooks/useLoadImage.d.ts +1 -1
  39. package/types/hooks/useLoadImage.d.ts.map +1 -1
  40. package/types/hooks/useMedia.d.ts +1 -1
  41. package/types/hooks/useMouse.d.ts +32 -0
  42. package/types/hooks/useMouse.d.ts.map +1 -0
  43. package/types/hooks/useMutation.d.ts +1 -4
  44. package/types/hooks/useMutation.d.ts.map +1 -1
  45. package/types/hooks/usePressDownMove.d.ts +13 -0
  46. package/types/hooks/usePressDownMove.d.ts.map +1 -0
  47. package/types/hooks/usePull.d.ts +4 -0
  48. package/types/hooks/usePull.d.ts.map +1 -0
  49. package/types/hooks/useResize.d.ts +2 -4
  50. package/types/hooks/useResize.d.ts.map +1 -1
  51. package/types/hooks/useSafeArea.d.ts +5 -4
  52. package/types/hooks/useSafeArea.d.ts.map +1 -1
  53. package/types/hooks/useScroll.d.ts +1 -5
  54. package/types/hooks/useScroll.d.ts.map +1 -1
  55. package/types/hooks/useStyle.d.ts.map +1 -1
  56. package/types/hooks/useTheme.d.ts +2 -0
  57. package/types/hooks/useTheme.d.ts.map +1 -1
  58. package/types/hooks/useVisible.d.ts +12 -5
  59. package/types/hooks/useVisible.d.ts.map +1 -1
  60. package/types/hooks/useWindow.d.ts +0 -15
  61. package/types/hooks/useWindow.d.ts.map +1 -1
  62. package/types/index.d.ts +1 -1
  63. package/types/math/{core/BufferAttribute.d.ts → BufferAttribute.d.ts} +4 -11
  64. package/types/math/BufferAttribute.d.ts.map +1 -0
  65. package/types/math/{core/Cylindrical.d.ts → Cylindrical.d.ts} +1 -1
  66. package/types/math/Cylindrical.d.ts.map +1 -0
  67. package/types/math/{core/Euler.d.ts → Euler.d.ts} +5 -7
  68. package/types/math/Euler.d.ts.map +1 -0
  69. package/types/math/Matrix.d.ts +210 -93
  70. package/types/math/Matrix.d.ts.map +1 -1
  71. package/types/math/{core/Quaternion.d.ts → Quaternion.d.ts} +7 -7
  72. package/types/math/Quaternion.d.ts.map +1 -0
  73. package/types/math/{core/Spherical.d.ts → Spherical.d.ts} +1 -1
  74. package/types/math/Spherical.d.ts.map +1 -0
  75. package/types/math/{core/SphericalHarmonics3.d.ts → SphericalHarmonics3.d.ts} +1 -1
  76. package/types/math/SphericalHarmonics3.d.ts.map +1 -0
  77. package/types/math/Vector.d.ts +202 -0
  78. package/types/math/Vector.d.ts.map +1 -0
  79. package/types/math/_core/Frustum.d.ts +1 -0
  80. package/types/math/_core/Frustum.d.ts.map +1 -0
  81. package/types/math/{core → _core}/constants.d.ts +0 -5
  82. package/types/math/_core/constants.d.ts.map +1 -0
  83. package/types/math/core/Box2.d.ts +1 -1
  84. package/types/math/core/Box2.d.ts.map +1 -1
  85. package/types/math/core/Box3.d.ts +7 -7
  86. package/types/math/core/Box3.d.ts.map +1 -1
  87. package/types/math/core/Line3.d.ts +2 -2
  88. package/types/math/core/Line3.d.ts.map +1 -1
  89. package/types/math/core/Object3D.d.ts +8 -6
  90. package/types/math/core/Object3D.d.ts.map +1 -1
  91. package/types/math/core/Plane.d.ts +5 -6
  92. package/types/math/core/Plane.d.ts.map +1 -1
  93. package/types/math/core/Ray.d.ts +2 -2
  94. package/types/math/core/Ray.d.ts.map +1 -1
  95. package/types/math/core/Sphere.d.ts +4 -4
  96. package/types/math/core/Sphere.d.ts.map +1 -1
  97. package/types/math/core/Triangle.d.ts +4 -5
  98. package/types/math/core/Triangle.d.ts.map +1 -1
  99. package/types/math/index.d.ts +2 -0
  100. package/types/math/index.d.ts.map +1 -1
  101. package/types/math/line/PathD.d.ts +3 -3
  102. package/types/math/line/PathD.d.ts.map +1 -1
  103. package/types/math/shapes/Ring.d.ts.map +1 -1
  104. package/types/position.d.ts +0 -11
  105. package/types/position.d.ts.map +1 -1
  106. package/types/svg/YZSVG.d.ts +3 -5
  107. package/types/svg/YZSVG.d.ts.map +1 -1
  108. package/types/wxJSSDK.d.ts.map +1 -1
  109. package/types/dom/DOMEventBus.d.ts +0 -119
  110. package/types/dom/DOMEventBus.d.ts.map +0 -1
  111. package/types/hooks/useEmit.d.ts +0 -6
  112. package/types/hooks/useEmit.d.ts.map +0 -1
  113. package/types/hooks/useHistoryRouter.d.ts +0 -5
  114. package/types/hooks/useHistoryRouter.d.ts.map +0 -1
  115. package/types/math/core/BufferAttribute.d.ts.map +0 -1
  116. package/types/math/core/Color.d.ts +0 -59
  117. package/types/math/core/Color.d.ts.map +0 -1
  118. package/types/math/core/ColorManagement.d.ts +0 -20
  119. package/types/math/core/ColorManagement.d.ts.map +0 -1
  120. package/types/math/core/Cylindrical.d.ts.map +0 -1
  121. package/types/math/core/Euler.d.ts.map +0 -1
  122. package/types/math/core/Frustum.d.ts +0 -21
  123. package/types/math/core/Frustum.d.ts.map +0 -1
  124. package/types/math/core/Matrix.d.ts +0 -16
  125. package/types/math/core/Matrix.d.ts.map +0 -1
  126. package/types/math/core/Matrix2.d.ts +0 -19
  127. package/types/math/core/Matrix2.d.ts.map +0 -1
  128. package/types/math/core/Matrix3.d.ts +0 -46
  129. package/types/math/core/Matrix3.d.ts.map +0 -1
  130. package/types/math/core/Matrix4.d.ts +0 -66
  131. package/types/math/core/Matrix4.d.ts.map +0 -1
  132. package/types/math/core/Quaternion.d.ts.map +0 -1
  133. package/types/math/core/Spherical.d.ts.map +0 -1
  134. package/types/math/core/SphericalHarmonics3.d.ts.map +0 -1
  135. package/types/math/core/Vector.d.ts +0 -19
  136. package/types/math/core/Vector.d.ts.map +0 -1
  137. package/types/math/core/Vector2.d.ts +0 -66
  138. package/types/math/core/Vector2.d.ts.map +0 -1
  139. package/types/math/core/Vector3.d.ts +0 -80
  140. package/types/math/core/Vector3.d.ts.map +0 -1
  141. package/types/math/core/Vector4.d.ts +0 -64
  142. package/types/math/core/Vector4.d.ts.map +0 -1
  143. package/types/math/core/constants.d.ts.map +0 -1
  144. package/types/math/core/index.d.ts +0 -9
  145. package/types/math/core/index.d.ts.map +0 -1
  146. package/types/theme.d.ts +0 -57
  147. package/types/theme.d.ts.map +0 -1
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@zyzgroup/core-web",
3
3
  "private": false,
4
- "version": "0.1.10",
4
+ "version": "0.1.12",
5
5
  "sideEffects": false,
6
6
  "type": "module",
7
7
  "browser": {
@@ -1,79 +1 @@
1
- import { type EasingFunction, type InterpolationFunction, Tween } from "./tween";
2
- import { SupportedEaseNameToCubicBezier } from "./tween/BezierEasing";
3
- import { DOMEventBus } from "../dom";
4
- export type YZAnimateAttributes = {
5
- attributeName: string | string[];
6
- values: any[];
7
- immediate?: boolean;
8
- };
9
- export type YZAnimateOptions = {
10
- easeName?: SupportedEaseNameToCubicBezier;
11
- begin?: number;
12
- dur?: number;
13
- repeatCount?: number | "infinite";
14
- direction?: "normal" | "reverse";
15
- fill?: "freeze" | "remove";
16
- keyTimes?: number[];
17
- realKeyTimes?: number[];
18
- keySplines?: [number, number, number, number][];
19
- calcMode?: "linear" | "discrete" | "paced" | "spline";
20
- onComplete?: () => void;
21
- };
22
- export type YZToCSSAnimateOptions = Omit<YZAnimateOptions, "keyTimes" | "realKeyTimes" | "keySplines" | "calcMode">;
23
- export type YZAnimateRawObject = {
24
- el: HTMLElement;
25
- app: DOMEventBus;
26
- originAttrs: Record<string, string>;
27
- };
28
- export type YZAnimateObject = YZAnimateRawObject & Required<YZAnimateAttributes> & Required<YZAnimateOptions>;
29
- export type TweenOptions = {
30
- duration?: number;
31
- delay?: number;
32
- easeFunction?: EasingFunction;
33
- interpolationFunction?: InterpolationFunction;
34
- repeat?: number | typeof Infinity;
35
- yoyo?: boolean;
36
- precision?: number;
37
- onStart?: (currentValue: Record<string, any>) => void;
38
- onUpdate?: (currentValue: Record<string, any>, elapsed: number) => void;
39
- onComplete?: (currentValue: Record<string, any>) => void;
40
- };
41
- export declare class YZAnimate {
42
- [index: string]: any;
43
- objects: YZAnimateRawObject[];
44
- animateObjects: YZAnimateObject[];
45
- private currentAnimateName?;
46
- constructor();
47
- fromDOM(elements: HTMLElement | HTMLElement[]): this;
48
- static toTween(fromValues: Record<string, any>, toValues: Record<string, any>, options?: TweenOptions): {
49
- tween: Tween<Record<string, any>>;
50
- startAuto: (getCurrentTime?: () => number) => void;
51
- };
52
- static toTweenGroup(tweens: Tween<Record<string, any>>[] | Tween<Record<string, any>>, options?: {
53
- onGroupStart?: () => void;
54
- onGroupUpdate?: () => void;
55
- onGroupComplete?: () => void;
56
- }): (getCurrentTime?: () => number) => void;
57
- static toTweenCSS(el: HTMLElement, fromValues: Record<string, any>, toValues: Record<string, any>, options?: TweenOptions): {
58
- tween: Tween<Record<string, any>>;
59
- startAuto: (getCurrentTime?: () => number) => void;
60
- };
61
- addAnimateObject(attributes?: YZAnimateAttributes, animateOptions?: YZAnimateOptions, objectIndex?: number, isStart?: boolean): this;
62
- resetAnimateObjects(getPrevAttributs: (prevRawObject: YZAnimateRawObject) => YZAnimateAttributes | void, getCurrentAttributs: (currentRawObject: YZAnimateRawObject) => YZAnimateAttributes | void, getNextAttributs: (nextRawObject: YZAnimateRawObject) => YZAnimateAttributes | void, getOtherAttributs: (otherRawObject: YZAnimateRawObject) => YZAnimateAttributes | void, animateOptions?: YZAnimateOptions, animateObjectIndex?: number): void;
63
- toCSS(animateName: string, ...args: any[]): void;
64
- slideLeft(animateOptions?: YZToCSSAnimateOptions, animateObjectIndex?: number): void;
65
- slideRight(animateOptions?: YZToCSSAnimateOptions, animateObjectIndex?: number): void;
66
- slideDown(animateOptions?: YZToCSSAnimateOptions, animateObjectIndex?: number): void;
67
- slideUp(animateOptions?: YZToCSSAnimateOptions, animateObjectIndex?: number): void;
68
- flipLeft(animateOptions?: YZToCSSAnimateOptions, animateObjectIndex?: number): void;
69
- flipRight(animateOptions?: YZToCSSAnimateOptions, animateObjectIndex?: number): void;
70
- flipDown(animateOptions?: YZToCSSAnimateOptions, animateObjectIndex?: number): void;
71
- flipUp(animateOptions?: YZToCSSAnimateOptions, animateObjectIndex?: number): void;
72
- popIn(animateOptions?: YZToCSSAnimateOptions, animateObjectIndex?: number): void;
73
- popOut(animateOptions?: YZToCSSAnimateOptions, animateObjectIndex?: number): void;
74
- rotate(animateOptions?: YZToCSSAnimateOptions & {
75
- degree?: number;
76
- }, animateObjectIndex?: number): void;
77
- }
78
- export default YZAnimate;
79
1
  //# sourceMappingURL=_YZAnimate.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"_YZAnimate.d.ts","sourceRoot":"","sources":["../../src/animate/_YZAnimate.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,qBAAqB,EAC1B,KAAK,EACN,MAAM,SAAS,CAAC;AACjB,OAAO,EAEL,8BAA8B,EAC/B,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AA4BrC,MAAM,MAAM,mBAAmB,GAAG;IAEhC,aAAa,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAEjC,MAAM,EAAE,GAAG,EAAE,CAAC;IACd,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAOF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,CAAC,EAAE,8BAA8B,CAAC;IAE1C,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb,WAAW,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC;IAElC,SAAS,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;IAEjC,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAE3B,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IAEpB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IAExB,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC;IAEhD,QAAQ,CAAC,EAAE,QAAQ,GAAG,UAAU,GAAG,OAAO,GAAG,QA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,EAAE,kBAAkB,KAC/B,mBAAmB,GAAG,IAAI,EAC/B,cAAc,GAAE,gBAA0C,EAC1D,kBAAkB,SAA0B;IAkF9C,KAAK,CAAC,WAAW,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE;IAgHzC,SAAS,CACP,cAAc,GAAE,qBAA+C,EAC/D,kBAAkB,SAA0B;IAgD9C,UAAU,CACR,cAAc,GAAE,qBAA+C,EAC/D,kBAAkB,SAA0B;IAgD9C,SAAS,CACP,cAAc,GAAE,qBAA+C,EAC/D,kBAAkB,SAA0B;IAgD9C,OAAO,CACL,cAAc,GAAE,qBAA+C,EAC/D,kBAAkB,SAA0B;IAgD9C,QAAQ,CACN,cAAc,GAAE,qBAA+C,EAC/D,kBAAkB,SAA0B;IAoC9C,SAAS,CACP,cAAc,GAAE,qBAA+C,EAC/D,kBAAkB,SAA0B;IAoC9C,QAAQ,CACN,cAAc,GAAE,qBAA+C,EAC/D,kBAAkB,SAA0B;IAoC9C,MAAM,CACJ,cAAc,GAAE,qBAA+C,EAC/D,kBAAkB,SAA0B;IAoC9C,KAAK,CACH,cAAc,GAAE,qBAA+C,EAC/D,kBAAkB,SAA0B;IAkC9C,MAAM,CACJ,cAAc,GAAE,qBAA+C,EAC/D,kBAAkB,SAA0B;IAkC9C,MAAM,CACJ,cAAc,GAAE,qBAAqB,GAAG;QACtC,MAAM,CAAC,EAAE,MAAM,CAAC;KACS,EAC3B,kBAAkB,SAA0B;CA8C/C;AAED,eAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"_YZAnimate.d.ts","sourceRoot":"","sources":["../../src/animate/_YZAnimate.ts"],"names":[],"mappings":""}
@@ -1,16 +1,15 @@
1
- import { DOMEventBus } from "../dom";
2
1
  import YZCanvasContext from "./YZCanvasContext";
3
2
  import { Shape } from "../math";
3
+ import { ElementEventBusController } from "../hooks";
4
4
  export declare class YZCanvas {
5
- app: DOMEventBus;
5
+ controller: ElementEventBusController;
6
6
  ctx: YZCanvasContext;
7
7
  shapes: Shape[];
8
- isMouseDown: boolean;
9
8
  currentMouseInShape?: Shape;
10
9
  currentEnableDragMouseInShape?: Shape;
11
10
  dragDx: number;
12
11
  dragDy: number;
13
- constructor(app: DOMEventBus, enableCustomContext?: boolean);
12
+ constructor(controller: ElementEventBusController, enableCustomContext?: boolean);
14
13
  setCursor(): void;
15
14
  transformCtxBaseOnShape(shape: Shape): void;
16
15
  _addDrawShape(shape: Shape): void;
@@ -19,7 +18,7 @@ export declare class YZCanvas {
19
18
  brushSize?: number;
20
19
  brushDensity?: number;
21
20
  brushColor?: string;
22
- }): () => void;
21
+ }): void;
23
22
  }
24
23
  export default YZCanvas;
25
24
  //# sourceMappingURL=YZCanvas.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"YZCanvas.d.ts","sourceRoot":"","sources":["../../src/canvas/YZCanvas.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AACrC,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,KAAK,EAAwB,MAAM,SAAS,CAAC;AAEtD,qBAAa,QAAQ;IACnB,GAAG,EAAE,WAAW,CAAC;IACjB,GAAG,EAAE,eAAe,CAAC;IAErB,MAAM,EAAE,KAAK,EAAE,CAAM;IAErB,WAAW,UAAS;IACpB,mBAAmB,CAAC,EAAE,KAAK,CAAC;IAC5B,6BAA6B,CAAC,EAAE,KAAK,CAAC;IAGtC,MAAM,SAAK;IACX,MAAM,SAAK;gBAGT,GAAG,EAAE,WAAW,EAChB,mBAAmB,UAAQ;IAmD7B,SAAS;IAcT,uBAAuB,CAAC,KAAK,EAAE,KAAK;IAWpC,aAAa,CAAC,KAAK,EAAE,KAAK;IAU1B,IAAI,CAAC,MAAM,GAAE,KAAK,GAAG,KAAK,EAAO;IA6HjC,iBAAiB,CACf,IAAI,GAAE,MAAM,GAAG,OAAgB,EAC/B,OAAO,CAAC,EAAE;QACR,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,UAAU,CAAC,EAAE,MAAM,CAAC;KACrB,GACA,MAAM,IAAI;CAwDd;AAED,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"YZCanvas.d.ts","sourceRoot":"","sources":["../../src/canvas/YZCanvas.ts"],"names":[],"mappings":"AAEA,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,KAAK,EAAwB,MAAM,SAAS,CAAC;AACtD,OAAO,EAAoB,yBAAyB,EAAE,MAAM,UAAU,CAAC;AAEvE,qBAAa,QAAQ;IACnB,UAAU,EAAE,yBAAyB,CAAC;IACtC,GAAG,EAAE,eAAe,CAAC;IAErB,MAAM,EAAE,KAAK,EAAE,CAAM;IACrB,mBAAmB,CAAC,EAAE,KAAK,CAAC;IAC5B,6BAA6B,CAAC,EAAE,KAAK,CAAC;IAGtC,MAAM,SAAK;IACX,MAAM,SAAK;gBAGT,UAAU,EAAE,yBAAyB,EACrC,mBAAmB,UAAQ;IAkD7B,SAAS;IAcT,uBAAuB,CAAC,KAAK,EAAE,KAAK;IAWpC,aAAa,CAAC,KAAK,EAAE,KAAK;IAU1B,IAAI,CAAC,MAAM,GAAE,KAAK,GAAG,KAAK,EAAO;IAkIjC,iBAAiB,CACf,IAAI,GAAE,MAAM,GAAG,OAAgB,EAC/B,OAAO,CAAC,EAAE;QACR,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,UAAU,CAAC,EAAE,MAAM,CAAC;KACrB;CA0DJ;AAED,eAAe,QAAQ,CAAC"}
@@ -0,0 +1,114 @@
1
+ import { BufferAttribute, Matrix3, Vector3 } from "./math";
2
+ export declare class Color {
3
+ static NAMES: Record<string, number>;
4
+ private _color;
5
+ constructor(color?: any, forceAlpha?: number);
6
+ get color(): any;
7
+ set color(color: any);
8
+ setColor(color: any): this;
9
+ set(color: any): this;
10
+ get r(): any;
11
+ set r(v: any);
12
+ get g(): any;
13
+ set g(v: any);
14
+ get b(): any;
15
+ set b(v: any);
16
+ get a(): any;
17
+ set a(a: any);
18
+ setAlpha(a: any): this;
19
+ setFromVector3(v: Vector3): this;
20
+ applyMatrix3(m: Matrix3): this;
21
+ fromBufferAttribute(attribute: BufferAttribute, index: number): this;
22
+ fromArray(array: number[], offset?: number): this;
23
+ toArray(array?: number[], offset?: number): number[];
24
+ toRGBString(): string;
25
+ toHexString(): string;
26
+ toString(): string;
27
+ toColorSpaceString(colorSpace?: string): string;
28
+ [Symbol.iterator](): Generator<any, void, unknown>;
29
+ clone(): Color;
30
+ copy(c: Color): this;
31
+ copySRGBToLinear(color: Color): this;
32
+ copyLinearToSRGB(color: Color): this;
33
+ convertSRGBToLinear(): this;
34
+ convertLinearToSRGB(): this;
35
+ equals(c: Color): boolean;
36
+ add(color: Color): this;
37
+ addColors(color1: Color, color2: Color): this;
38
+ addScalar(s: number): this;
39
+ setScalar(scalar: number): this;
40
+ sub(color: Color): this;
41
+ multiply(color: Color): this;
42
+ multiplyScalar(s: number): this;
43
+ opposite(bw?: boolean, blackColor?: string, whiteColor?: string): this;
44
+ lighten(t: number): this;
45
+ darken(t: number): this;
46
+ lerp(color: Color, t: number): this;
47
+ lerpColors(start: Color, end: Color, t: number): this;
48
+ static gradient(start: string, end: string, t: number): string;
49
+ static random(): string;
50
+ static nextIndex: number;
51
+ static next(startIndex?: number): string;
52
+ setColorName(style: string): this;
53
+ static getColors(): string[];
54
+ setRGB(r: number, g: number, b: number, a?: number): this;
55
+ get rgb(): {
56
+ r: any;
57
+ g: any;
58
+ b: any;
59
+ a: any;
60
+ };
61
+ setHEX(hex: number): this;
62
+ get hex(): number;
63
+ setHSL(_h: number, _s: number, _l: number, a?: number): this;
64
+ getHSL(target?: Color): {
65
+ h: number;
66
+ s: number;
67
+ l: number;
68
+ a: any;
69
+ };
70
+ offsetHSL(h: number, s: number, l: number): this;
71
+ lerpHSL(color: Color, t: number): this;
72
+ setHSV(_h: number, _s: number, _v: number, a?: number): this;
73
+ getHSV(target?: Color): {
74
+ h: number;
75
+ s: number;
76
+ v: number;
77
+ a: any;
78
+ };
79
+ }
80
+ export declare const __color: Color;
81
+ export declare function SRGBToLinear(c: number): number;
82
+ export declare function LinearToSRGB(c: number): number;
83
+ export declare const NoColorSpace = "";
84
+ export declare const SRGBColorSpace = "srgb";
85
+ export declare const LinearSRGBColorSpace = "srgb-linear";
86
+ export declare const LinearTransfer = "linear";
87
+ export declare const SRGBTransfer = "srgb";
88
+ export declare const ColorManagement: {
89
+ enabled: boolean;
90
+ workingColorSpace: string;
91
+ spaces: Record<string, Record<string, any>>;
92
+ convert: (color: Color, sourceColorSpace: string, targetColorSpace: string) => Color;
93
+ fromWorkingColorSpace: (color: Color, targetColorSpace: string) => Color;
94
+ toWorkingColorSpace: (color: Color, sourceColorSpace: string) => Color;
95
+ getPrimaries: (colorSpace: string) => any;
96
+ getTransfer: (colorSpace: string) => any;
97
+ getLuminanceCoefficients: (this: any, target: Color, colorSpace?: any) => Color;
98
+ define: (colorSpaces: Record<string, Record<string, any>>) => void;
99
+ _getMatrix: (targetMatrix: Matrix3, sourceColorSpace: string, targetColorSpace: string) => Matrix3;
100
+ _getDrawingBufferColorSpace: (colorSpace: string) => any;
101
+ _getUnpackColorSpace: (this: any, colorSpace?: any) => any;
102
+ };
103
+ export declare const ControlsColorPattern: {
104
+ backgroundColor: string;
105
+ numberColor: string;
106
+ booleanColor: string;
107
+ stringColor: string;
108
+ functionColor: string;
109
+ saveRowColor: string;
110
+ buttonColor: string;
111
+ borderColor: string;
112
+ inputColor: string;
113
+ };
114
+ //# sourceMappingURL=color.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"color.d.ts","sourceRoot":"","sources":["../src/color.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AA6K3D,qBAAa,KAAK;IAChB,MAAM,CAAC,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@
1
- export * from "./DOMEventBus";
2
1
  export * from "./DOMVideo";
3
2
  export * from "./DOMParse";
4
3
  export * from "./parseCSS";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/dom/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/dom/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC"}
package/types/env.d.ts CHANGED
@@ -14,6 +14,7 @@ export function isAliBrowser(): boolean;
14
14
  export function isWxMiniProgram(): boolean | RegExpMatchArray;
15
15
  export function isAliMiniProgram(): false | RegExpMatchArray | null;
16
16
  export function isNative(value: any): boolean;
17
+ export function isTouchSupport(): boolean;
17
18
  export function getOperatingSystem(): string;
18
19
  export function getBrowserClientVersion(): string;
19
20
  export const isIE: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../src/env.js"],"names":[],"mappings":"AAyBA,+DAwBC;AAED,6DAmBC;AAED,2CAyBC;AAkCD,0CAEC;AAED,sCAEC;AAED,iCAEC;AAED,mCAEC;AAED,wCAEC;AAED,qCAEC;AAED,oCAEC;AAED,qDAoBC;AAiBD,uCAEC;AAED,wCAEC;AAGD,8DAKC;AAGD,oEAEC;AAmED,8CAEC;AAxRM,6CAmBN;AA4EM,kDA8BN;AAoDD,2BAAwD;AAKxD,4BAEU;AACV,6BAEU;AACV,6BAEU;AAuBV,kCAA2D;AAC3D,gCAAuD;AACvD,iCAAyD;AAEzD;;;EAKc;AAEd,mCAaK;AAEL,kCACkE;AAElE,oCAgBK;AAQC,yCAOC;AAEP,gCAAqD"}
1
+ {"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../src/env.js"],"names":[],"mappings":"AAyBA,+DAwBC;AAED,6DAmBC;AAED,2CAyBC;AAkCD,0CAEC;AAED,sCAEC;AAED,iCAEC;AAED,mCAEC;AAED,wCAEC;AAED,qCAEC;AAED,oCAEC;AAED,qDAoBC;AAiBD,uCAEC;AAED,wCAEC;AAGD,8DAKC;AAGD,oEAEC;AAmED,8CAEC;AAED,0CAMC;AAhSM,6CAmBN;AA4EM,kDA8BN;AAoDD,2BAAwD;AAKxD,4BAEU;AACV,6BAEU;AACV,6BAEU;AAuBV,kCAA2D;AAC3D,gCAAuD;AACvD,iCAAyD;AAEzD;;;EAKc;AAEd,mCAaK;AAEL,kCACkE;AAElE,oCAgBK;AAQC,yCAOC;AAEP,gCAAqD"}
@@ -4,17 +4,22 @@ export * from "./useSessionStorage";
4
4
  export * from "./useIndexDB";
5
5
  export * from "./useEventListener";
6
6
  export * from "./useFireEvent";
7
- export * from "./useEmit";
8
7
  export * from "./useDragDrop";
8
+ export * from "./useMouse";
9
+ export * from "./useElementEventBus";
10
+ export * from "./usePressDownMove";
11
+ export * from "./usePull";
9
12
  export * from "./useMedia";
10
13
  export * from "./useTheme";
11
14
  export * from "./useWindow";
15
+ export * from "./onDocumentReady";
16
+ export * from "./useFeRouteChange";
12
17
  export * from "./useSafeArea";
13
- export * from "./useHistoryRouter";
14
18
  export * from "./useScroll";
15
- export * from "./useResize";
16
19
  export * from "./useVisible";
20
+ export * from "./useResize";
17
21
  export * from "./useMutation";
22
+ export * from "./useIntersection";
18
23
  export * from "./useSelectFile";
19
24
  export * from "./useHotKey";
20
25
  export * from "./useHotKeyFile";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAE7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,c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C3B,cAAc,YAAY,CAAC;AAE3B,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AAEnC,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAE7B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAElC,cAAc,iBAAiB,CAAC;AAEhC,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAEhC,cAAc,gBAAgB,CAAC;AAE/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAE3B,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAE7B,cAAc,cAAc,CAAC;AAE7B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAElC,cAAc,uBAAuB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export declare function onDocumentReady(cb: () => void): () => void;
2
+ export declare function onBeforeUnload(cb: (e: BeforeUnloadEvent) => void): () => void;
3
+ //# sourceMappingURL=onDocumentReady.d.ts.map
@@ -0,0 +1 @@
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 +1 @@
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,CA8DZ"}
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"}
@@ -33,7 +33,7 @@ export declare function useElement(el: AnyElement): {
33
33
  getInnerText: () => string;
34
34
  remove: () => void;
35
35
  };
36
- export declare function createFragment(html: string): DocumentFragment;
36
+ export declare function createFragment(html: string, convert?: boolean): DocumentFragment;
37
37
  export declare function createElement(tagName: string): HTMLElement;
38
38
  export declare function createElementNS(name: string): HTMLElement;
39
39
  export declare function createTextNode(data: string): Text;
@@ -1 +1 @@
1
- {"version":3,"file":"useElement.d.ts","sourceRoot":"","sources":["../../src/hooks/useElement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAkB5D,wBAAgB,UAAU,CAAC,EAAE,EAAE,UAAU;;;;;kBAqBd,MAAM;;;;oBAwBrB,GAAG,SACH,UAAU,GAAG,IAAI,OACnB,UAAU,EAAE;yBAQY,GAAG;sBAgBf,UAAU;;;;wBAsBR,MAAM;;;;;4BAoBO,GAAG;yBAIN,GAAG;wBAIJ,GAAG;0BAID,GAAG;2BAIF,GAAG,iBAAiB,MAAM;+BAStB,GAAG,gBAAgB,MAAM;kCAYtB,GAAG,WAAW,OAAO;mBAOpD,MAAM,GAAG,UAAU,WAErB,QAAQ,GACR,aAAa,GACb,SAAS,GACT,OAAO,GACP,QAAQ,GACR,aAAa;iBASG,GAAG,QAAQ,MAAM,GAAG,UAAU;kBAY7B,GAAG;iBAIb,MAAM;;;EA2BtB;AAKD,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,gBAAgB,CAU7D;AAED,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,eAE5C;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,eAE3C;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,QAE1C;AAyBD,wBAAgB,aAAa,CAAC,EAAE,EAAE,OAAO;;EAexC"}
1
+ {"version":3,"file":"useElement.d.ts","sourceRoot":"","sources":["../../src/hooks/useElement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAkB5D,wBAAgB,UAAU,CAAC,EAAE,EAAE,UAAU;;;;;kBAqBd,MAAM;;;;oBAwBrB,GAAG,SACH,UAAU,GAAG,IAAI,OACnB,UAAU,EAAE;yBAQY,GAAG;sBAgBf,UAAU;;;;wBAsBR,MAAM;;;;;4BAoBO,GAAG;yBAIN,GAAG;wBAIJ,GAAG;0BAID,GAAG;2BAIF,GAAG,iBAAiB,MAAM;+BAStB,GAAG,gBAAgB,MAAM;kCAYtB,GAAG,WAAW,OAAO;mBAOpD,MAAM,GAAG,UAAU,WAErB,QAAQ,GACR,aAAa,GACb,SAAS,GACT,OAAO,GACP,QAAQ,GACR,aAAa;iBASG,GAAG,QAAQ,MAAM,GAAG,UAAU;kBAY7B,GAAG;iBAIb,MAAM;;;EA2BtB;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;AAyBD,wBAAgB,aAAa,CAAC,EAAE,EAAE,OAAO;;EAexC"}
@@ -0,0 +1,67 @@
1
+ import { EventBus, EventBusListeners } from "@zyzgroup/core-common";
2
+ export interface ElementEventBusListeners extends EventBusListeners {
3
+ mouseDown(e: MouseEvent): void;
4
+ mouseUp(e: MouseEvent): void;
5
+ mouseMove(e: MouseEvent): void;
6
+ mouseOver(e: MouseEvent): void;
7
+ mouseOut(e: MouseEvent): void;
8
+ mouseEnter(e: MouseEvent): void;
9
+ mouseLeave(e: MouseEvent): void;
10
+ mouseClick(e: MouseEvent): void;
11
+ mouseDoubleClick(e: MouseEvent): void;
12
+ mouseWheel(e: WheelEvent): void;
13
+ mouseContextMenu(e: MouseEvent): void;
14
+ touchStart(e: TouchEvent): void;
15
+ touchEnd(e: TouchEvent): void;
16
+ touchCancel(e: TouchEvent): void;
17
+ touchMove(e: TouchEvent): void;
18
+ pointerDown(e: PointerEvent): void;
19
+ pointerUp(e: PointerEvent): void;
20
+ pointerCancel(e: PointerEvent): void;
21
+ pointerMove(e: PointerEvent): void;
22
+ pan(e: HammerInput): void;
23
+ panStart(e: HammerInput): void;
24
+ panMove(e: HammerInput): void;
25
+ panEnd(e: HammerInput): void;
26
+ panCancel(e: HammerInput): void;
27
+ panLeft(e: HammerInput): void;
28
+ panRight(e: HammerInput): void;
29
+ panUp(e: HammerInput): void;
30
+ panDown(e: HammerInput): void;
31
+ pinch(e: HammerInput): void;
32
+ press(e: HammerInput): void;
33
+ rotate(e: HammerInput): void;
34
+ swipe(e: HammerInput): void;
35
+ swipeLeft(e: HammerInput): void;
36
+ swipeRight(e: HammerInput): void;
37
+ swipeUp(e: HammerInput): void;
38
+ swipeDown(e: HammerInput): void;
39
+ tap(e: HammerInput): void;
40
+ tapOutSide(e: Event): void;
41
+ transitionstart(e: TransitionEvent): void;
42
+ transitionend(e: TransitionEvent): void;
43
+ animationstart(e: AnimationEvent): void;
44
+ animationend(e: AnimationEvent): void;
45
+ resize: (rect: DOMRect) => void;
46
+ }
47
+ export type ElementEventBus = EventBus<ElementEventBusListeners>;
48
+ export type ElementEventBusController = ReturnType<typeof useElementEventBus>;
49
+ export declare function useElementEventBus(el?: HTMLElement): {
50
+ el: HTMLElement;
51
+ readonly rect: {
52
+ width: number;
53
+ height: number;
54
+ x: number;
55
+ y: number;
56
+ bottom: number;
57
+ left: number;
58
+ right: number;
59
+ top: number;
60
+ toJSON(): any;
61
+ };
62
+ mousePoint: import("./useMouse").MousePoint;
63
+ eb: EventBus<ElementEventBusListeners>;
64
+ start: () => Promise<void>;
65
+ end: () => void;
66
+ };
67
+ //# sourceMappingURL=useElementEventBus.d.ts.map
@@ -0,0 +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;AAcpE,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,CAAC;IAC9B,UAAU,CAAC,CAAC,EAAE,UAAU,GAAG,IAAI,CAAC;IAChC,UAAU,CAAC,CAAC,EAAE,UAAU,GAAG,IAAI,CAAC;IAChC,UAAU,CAAC,CAAC,EAAE,UAAU,GAAG,IAAI,CAAC;IAChC,gBAAgB,CAAC,CAAC,EAAE,UAAU,GAAG,IAAI,CAAC;IACtC,UAAU,CAAC,CAAC,EAAE,UAAU,GAAG,IAAI,CAAC;IAChC,gBAAgB,CAAC,CAAC,EAAE,UAAU,GAAG,IAAI,CAAC;IAEtC,UAAU,CAAC,CAAC,EAAE,UAAU,GAAG,IAAI,CAAC;IAChC,QAAQ,CAAC,CAAC,EAAE,UAAU,GAAG,IAAI,CAAC;IAC9B,WAAW,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W,GAAG,IAAI,CAAC;IAGhC,GAAG,CAAC,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;IAG1B,UAAU,CAAC,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC;IAE3B,eAAe,CAAC,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;IAC1C,aAAa,CAAC,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;IACxC,cAAc,CAAC,CAAC,EAAE,cAAc,GAAG,IAAI,CAAC;IACxC,YAAY,CAAC,CAAC,EAAE,cAAc,GAAG,IAAI,CAAC;IAEtC,MAAM,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CACjC;AAED,MAAM,MAAM,eAAe,GAAG,QAAQ,CAAC,wBAAwB,CAAC,CAAC;AAEjE,MAAM,MAAM,yBAAyB,GAAG,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9E,wBAAgB,kBAAkB,CAAC,EAAE,GAAE,WAAsC;;;;;;;;;;;;;;;;;EAkT5E"}
@@ -1,4 +1,4 @@
1
1
  type EventMap = GlobalEventHandlersEventMap & ElementEventMap & HTMLElementEventMap & DocumentEventMap & WindowEventHandlersEventMap & WindowEventMap & MediaQueryListEventMap;
2
- export declare function useEventListener<K extends keyof EventMap>(target: EventTarget | any, event: K, handler: (e: EventMap[K]) => void | Promise<void>, useCapture?: boolean): () => void;
2
+ export declare function useEventListener<K extends keyof EventMap>(target: EventTarget | any, event: K | "mousewheel" | "DOMMouseScroll", handler: (e: EventMap[K]) => void | Promise<void>, useCapture?: boolean): () => void;
3
3
  export {};
4
4
  //# sourceMappingURL=useEventListener.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useEventListener.d.ts","sourceRoot":"","sources":["../../src/hooks/useEventListener.ts"],"names":[],"mappings":"AAAA,KAAK,QAAQ,GAAG,2BAA2B,GACzC,eAAe,GACf,mBAAmB,GACnB,gBAAgB,GAChB,2BAA2B,GAC3B,cAAc,GACd,sBAAsB,CAAC;AAEzB,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,MAAM,QAAQ,EACvD,MAAM,EAAE,WAAW,GAAG,GAAG,EACzB,KAAK,EAAE,CAAC,EACR,OAAO,EAAE,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,EAGjD,UAAU,UAAQ,GACjB,MAAM,IAAI,CAkBZ"}
1
+ {"version":3,"file":"useEventListener.d.ts","sourceRoot":"","sources":["../../src/hooks/useEventListener.ts"],"names":[],"mappings":"AAAA,KAAK,QAAQ,GAAG,2BAA2B,GACzC,eAAe,GACf,mBAAmB,GACnB,gBAAgB,GAChB,2BAA2B,GAC3B,cAAc,GACd,sBAAsB,CAAC;AAEzB,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,MAAM,QAAQ,EACvD,MAAM,EAAE,WAAW,GAAG,GAAG,EACzB,KAAK,EAAE,CAAC,GAAG,YAAY,GAAG,gBAAgB,EAC1C,OAAO,EAAE,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,EAGjD,UAAU,UAAQ,GACjB,MAAM,IAAI,CAkBZ"}
@@ -0,0 +1,9 @@
1
+ export declare const useFeRouteChange: {
2
+ onUrlChange: (cb: (...v: any[]) => void) => () => void;
3
+ onHashChange: (cb: (hash: any) => void) => () => void;
4
+ goto: (url: string, state?: any) => void;
5
+ replace: (url: string, state?: any) => void;
6
+ onPopState: (cb: (state: any) => void) => () => void;
7
+ };
8
+ export declare function useHistoryRouter(routes: Record<string, () => void>): () => void;
9
+ //# sourceMappingURL=useFeRouteChange.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useFeRouteChange.d.ts","sourceRoot":"","sources":["../../src/hooks/useFeRouteChange.ts"],"names":[],"mappings":"AAuBA,eAAO,MAAM,gBAAgB;sBACT,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,KAAK,IAAI;uBAOpB,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI;gBAQ1B,MAAM,UAAS,GAAG;mBAIf,MAAM,UAAS,GAAG;qBAGhB,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI;CAMtC,CAAC;AAEF,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,IAAI,CAAC,cAKlE"}
@@ -6,7 +6,7 @@ export interface HotKeyOptions {
6
6
  target?: EventTarget;
7
7
  }
8
8
  export declare function useHotKey(options: HotKeyOptions, keydownCb: () => Promise<void> | void, keyupCb?: () => Promise<void> | void): {
9
- hotKeys: string[];
9
+ hotKeys: (options: HotKeyOptions) => string[];
10
10
  destroy: () => void;
11
11
  pause: () => boolean;
12
12
  resume: () => boolean;
@@ -1 +1 @@
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;AAkCD,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;;;;;EA8CrC;AAED,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;CAiBzB,CAAC;AAKF,wBAAgB,UAAU,CAAC,CAAC,EAAE,aAAa,+BAQ1C"}
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 +1 @@
1
- {"version":3,"file":"useHotKeyFile.d.ts","sourceRoot":"","sources":["../../src/hooks/useHotKeyFile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAY,MAAM,uBAAuB,CAAC;AACpE,OAAO,EAAE,KAAK,aAAa,EAAa,MAAM,aAAa,CAAC;AAK5D,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"}
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"}
@@ -0,0 +1,3 @@
1
+ import { type AnyElement } from "@zyzgroup/core-common";
2
+ export declare function useIntersection(el: AnyElement, cb: (entries: IntersectionObserverEntry[], observer: IntersectionObserver) => void, options?: IntersectionObserverInit): Promise<() => void>;
3
+ //# sourceMappingURL=useIntersection.d.ts.map
@@ -0,0 +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;AAExD,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"}
@@ -5,5 +5,5 @@ export interface RawImageInfo {
5
5
  element: HTMLImageElement;
6
6
  imageData?: ImageData;
7
7
  }
8
- export declare function useLoadImage(url: string | Blob, ms?: number): Promise<RawImageInfo>;
8
+ export declare function useLoadImage(url: string | Blob | File, ms?: number): Promise<RawImageInfo>;
9
9
  //# sourceMappingURL=useLoadImage.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useLoadImage.d.ts","sourceRoot":"","sources":["../../src/hooks/useLoadImage.ts"],"names":[],"mappings":"AAcA,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;AAID,wBAAsB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,EAAE,EAAE,SAAQ,yBAsChE"}
1
+ {"version":3,"file":"useLoadImage.d.ts","sourceRoot":"","sources":["../../src/hooks/useLoadImage.ts"],"names":[],"mappings":"AAcA,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;AAID,wBAAsB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,EAAE,EAAE,SAAQ,yBAsCvE"}
@@ -1,4 +1,4 @@
1
1
  export declare function useMedia(query?: string): {
2
- value: any;
2
+ value: boolean;
3
3
  };
4
4
  //# sourceMappingURL=useMedia.d.ts.map
@@ -0,0 +1,32 @@
1
+ import { AnyElement } from "@zyzgroup/core-common";
2
+ export type MousePoint = {
3
+ x: number;
4
+ y: number;
5
+ dx: number;
6
+ dy: number;
7
+ dStartX: number;
8
+ dStartY: number;
9
+ isDown: boolean;
10
+ };
11
+ export declare function useMousePoint(): {
12
+ mousePoint: MousePoint;
13
+ setStartMousePoint: (p: {
14
+ x: number;
15
+ y: number;
16
+ }, isDown?: boolean) => void;
17
+ setCurrentMousePoint: (p: {
18
+ x: number;
19
+ y: number;
20
+ }, isDown?: boolean) => void;
21
+ };
22
+ export type MousePointEvent = MouseEvent | Touch | PointerEvent | HammerInput;
23
+ export declare function getMousePositionInViewport(ev: MousePointEvent): {
24
+ x: number;
25
+ y: number;
26
+ };
27
+ export declare function getMousePositionInPage(ev: MousePointEvent): HammerPoint;
28
+ export declare function getMousePositionInElement(ev: MousePointEvent, element?: AnyElement): {
29
+ x: number;
30
+ y: number;
31
+ };
32
+ //# sourceMappingURL=useMouse.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useMouse.d.ts","sourceRoot":"","sources":["../../src/hooks/useMouse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAOnD,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;8BAUQ;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,WAAW,OAAO;EAcvE;AAID,MAAM,MAAM,eAAe,GAAG,UAAU,GAAG,KAAK,GAAG,YAAY,GAAG,WAAW,CAAC;AAE9E,wBAAgB,0BAA0B,CAAC,EAAE,EAAE,eAAe;;;EAa7D;AAED,wBAAgB,sBAAsB,CAAC,EAAE,EAAE,eAAe,eAezD;AAED,wBAAgB,yBAAyB,CACvC,EAAE,EAAE,eAAe,EACnB,OAAO,CAAC,EAAE,UAAU;;;EAuCrB"}
@@ -1,6 +1,3 @@
1
1
  import { type AnyElement } from "@zyzgroup/core-common";
2
- export declare function useMutation(target: AnyElement): {
3
- on: (cb: (records: MutationRecord[], observer: MutationObserver) => void) => () => void;
4
- destroy: () => void;
5
- };
2
+ export declare function useMutation(el: AnyElement | Document, cb: (records: MutationRecord[], observer: MutationObserver) => void): Promise<() => void>;
6
3
  //# sourceMappingURL=useMutation.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useMutation.d.ts","sourceRoot":"","sources":["../../src/hooks/useMutation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAGxD,wBAAgB,WAAW,CAAC,MAAM,EAAE,UAAU;aAiBpC,CAAC,OAAO,EAAE,cAAc,EAAE,EAAE,QAAQ,EAAE,gBAAgB,KAAK,IAAI;;EAWxE"}
1
+ {"version":3,"file":"useMutation.d.ts","sourceRoot":"","sources":["../../src/hooks/useMutation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAExD,wBAAsB,WAAW,CAC/B,EAAE,EAAE,UAAU,GAAG,QAAQ,EACzB,EAAE,EAAE,CAAC,OAAO,EAAE,cAAc,EAAE,EAAE,QAAQ,EAAE,gBAAgB,KAAK,IAAI,iBAE1C,IAAI,EAe9B"}
@@ -0,0 +1,13 @@
1
+ import { ElementEventBusController } from "./useElementEventBus";
2
+ import { MousePointEvent } from "./useMouse";
3
+ type Options = {
4
+ start?: (e: MousePointEvent) => void;
5
+ move?: (e: MousePointEvent) => void;
6
+ end?: (e: MousePointEvent) => void;
7
+ };
8
+ export declare function usePressDownMove(controller: ElementEventBusController, options?: Options): () => void;
9
+ export declare function usePressDownMoveWithPointer(controller: ElementEventBusController, options?: Options): () => void;
10
+ export declare function usePressDownMoveWithMouse(controller: ElementEventBusController, options?: Options): () => void;
11
+ export declare function usePressDownMoveWithTouch(controller: ElementEventBusController, options?: Options): () => void;
12
+ export {};
13
+ //# sourceMappingURL=usePressDownMove.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePressDownMove.d.ts","sourceRoot":"","sources":["../../src/hooks/usePressDownMove.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAG7C,KAAK,OAAO,GAAG;IACb,KAAK,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,4 @@
1
+ import { ElementEventBusController } from "./useElementEventBus";
2
+ export declare function usePullDown(controller: ElementEventBusController, cb: () => void, distance?: number): () => void;
3
+ export declare function usePullUp(controller: ElementEventBusController, cb: () => void, distance?: number): () => void;
4
+ //# sourceMappingURL=usePull.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePull.d.ts","sourceRoot":"","sources":["../../src/hooks/usePull.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AAIjE,wBAAgB,WAAW,CACzB,UAAU,EAAE,yBAAyB,EACrC,EAAE,EAAE,MAAM,IAAI,EACd,QAAQ,SAAK,cAiBd;AAGD,wBAAgB,SAAS,CACvB,UAAU,EAAE,yBAAyB,EACrC,EAAE,EAAE,MAAM,IAAI,EACd,QAAQ,SAAK,cAiBd"}
@@ -1,6 +1,4 @@
1
1
  import { type AnyElement } from "@zyzgroup/core-common";
2
- export declare function useResize(target: AnyElement): {
3
- on: (cb: (width: number, height: number) => void) => () => void;
4
- destroy: () => void;
5
- };
2
+ export declare function useResize(el: AnyElement, cb: (r: DOMRect) => void): Promise<() => void>;
3
+ export declare function useWindowResize(cb: (width: number, height: number) => void): () => void;
6
4
  //# sourceMappingURL=useResize.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useResize.d.ts","sourceRoot":"","sources":["../../src/hooks/useResize.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAGxD,wBAAgB,SAAS,CAAC,MAAM,EAAE,UAAU;aAY/B,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI;;EAUnD"}
1
+ {"version":3,"file":"useResize.d.ts","sourceRoot":"","sources":["../../src/hooks/useResize.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAGxD,wBAAsB,SAAS,CAAC,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,IAAI,iBAC7C,IAAI,EAa9B;AAED,wBAAgB,eAAe,CAAC,EAAE,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,cAW1E"}