@zyzgroup/core-web 0.1.51 → 0.1.52
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 -17
- package/dist/zyzgroup_core_web.iife.js.map +1 -1
- package/dist/zyzgroup_core_web.js +4111 -2952
- package/dist/zyzgroup_core_web.js.map +1 -1
- package/dist/zyzgroup_core_web.umd.cjs +19 -17
- package/dist/zyzgroup_core_web.umd.cjs.map +1 -1
- package/package.json +1 -1
- package/types/hooks/index.d.ts +2 -1
- package/types/hooks/index.d.ts.map +1 -1
- package/types/hooks/useCoords.d.ts +6 -0
- package/types/hooks/useCoords.d.ts.map +1 -0
- package/types/hooks/useEventListener.d.ts +2 -0
- package/types/hooks/useEventListener.d.ts.map +1 -1
- package/types/hooks/useFeRouteChange.d.ts +5 -8
- package/types/hooks/useFeRouteChange.d.ts.map +1 -1
- package/types/hooks/useMutation.d.ts +2 -0
- package/types/hooks/useMutation.d.ts.map +1 -1
- package/types/hooks/useResize.d.ts +6 -0
- package/types/hooks/useResize.d.ts.map +1 -1
- package/types/hooks/useSafeArea.d.ts +7 -6
- package/types/hooks/useSafeArea.d.ts.map +1 -1
- package/types/hooks/useTimestampValue.d.ts.map +1 -1
- package/types/hooks/useLocation.d.ts +0 -2
- package/types/hooks/useLocation.d.ts.map +0 -1
package/package.json
CHANGED
package/types/hooks/index.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export * from "./useMouse";
|
|
|
10
10
|
export * from "./useElementEventBus";
|
|
11
11
|
export * from "./usePressDownMove";
|
|
12
12
|
export * from "./usePull";
|
|
13
|
+
export * from "./useFeRouteChange";
|
|
13
14
|
export * from "./useMedia";
|
|
14
15
|
export * from "./useTheme";
|
|
15
16
|
export * from "./useWindow";
|
|
@@ -39,7 +40,7 @@ export * from "./useDisplay";
|
|
|
39
40
|
export * from "./useElement";
|
|
40
41
|
export * from "./useIframe";
|
|
41
42
|
export * from "./useClipboard";
|
|
42
|
-
export * from "./
|
|
43
|
+
export * from "./useCoords";
|
|
43
44
|
export * from "./useVibrate";
|
|
44
45
|
export * from "./useRunInSandbox";
|
|
45
46
|
export * from "./useLocale/useLocale";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,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,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,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,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,WAAW,CAAC;AAC1B,cAAc,oBAAoB,CAAC;AAEnC,cAAc,YAAY,CAAC;AAC3B,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,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAElC,cAAc,uBAAuB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCoords.d.ts","sourceRoot":"","sources":["../../src/hooks/useCoords.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAElC,wBAAgB,UAAU,CACxB,OAAO,GAAE,eAIR,GACA,UAAU,CAAC;IACZ,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC,CAuBD"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { Observable } from "rxjs";
|
|
1
2
|
type EventMap = GlobalEventHandlersEventMap & ElementEventMap & HTMLElementEventMap & DocumentEventMap & WindowEventHandlersEventMap & WindowEventMap & MediaQueryListEventMap;
|
|
2
3
|
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;
|
|
4
|
+
export declare function useEvent$<K extends keyof EventMap>(target: EventTarget | any, event: K | "mousewheel" | "DOMMouseScroll", useCapture?: boolean): Observable<EventMap[K]>;
|
|
3
5
|
export {};
|
|
4
6
|
//# 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,GAAG,YAAY,GAAG,gBAAgB,EAC1C,OAAO,EAAE,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"useEventListener.d.ts","sourceRoot":"","sources":["../../src/hooks/useEventListener.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,MAAM,MAAM,CAAC;AAE7C,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,EACjD,UAAU,UAAQ,GACjB,MAAM,IAAI,CAkBZ;AAED,wBAAgB,SAAS,CAAC,CAAC,SAAS,MAAM,QAAQ,EAChD,MAAM,EAAE,WAAW,GAAG,GAAG,EACzB,KAAK,EAAE,CAAC,GAAG,YAAY,GAAG,gBAAgB,EAC1C,UAAU,UAAQ,GACjB,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAGzB"}
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
onPopState: (cb: (state: any) => void) => () => void;
|
|
7
|
-
};
|
|
8
|
-
export declare function useHistoryRouter(routes: Record<string, () => void>): () => void;
|
|
1
|
+
import { Observable } from "rxjs";
|
|
2
|
+
export declare function useLocation$(): Observable<Location>;
|
|
3
|
+
export declare function useUrlChange$(): Observable<string>;
|
|
4
|
+
export declare function useHashChange$(): Observable<string>;
|
|
5
|
+
export declare function usePopStateChange$(): Observable<any>;
|
|
9
6
|
//# sourceMappingURL=useFeRouteChange.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFeRouteChange.d.ts","sourceRoot":"","sources":["../../src/hooks/useFeRouteChange.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useFeRouteChange.d.ts","sourceRoot":"","sources":["../../src/hooks/useFeRouteChange.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAKlC,wBAAgB,YAAY,IAAI,UAAU,CAAC,QAAQ,CAAC,CAKnD;AAED,wBAAgB,aAAa,IAAI,UAAU,CAAC,MAAM,CAAC,CAMlD;AAED,wBAAgB,cAAc,IAAI,UAAU,CAAC,MAAM,CAAC,CAQnD;AAKD,wBAAgB,kBAAkB,IAAI,UAAU,CAAC,GAAG,CAAC,CAMpD"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { Observable } from "rxjs";
|
|
1
2
|
import { type AnyElement } from "@zyzgroup/core-common";
|
|
2
3
|
export declare function useMutation(el: AnyElement | Document, cb: (records: MutationRecord[], observer: MutationObserver) => void): Promise<() => void>;
|
|
4
|
+
export declare function useMutation$(el: AnyElement | Document, options?: MutationObserverInit): Observable<MutationRecord[]>;
|
|
3
5
|
//# 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;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"}
|
|
1
|
+
{"version":3,"file":"useMutation.d.ts","sourceRoot":"","sources":["../../src/hooks/useMutation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAClC,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;AAED,wBAAgB,YAAY,CAC1B,EAAE,EAAE,UAAU,GAAG,QAAQ,EACzB,OAAO,GAAE,oBAIR,GACA,UAAU,CAAC,cAAc,EAAE,CAAC,CAU9B"}
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
+
import { Observable } from "rxjs";
|
|
1
2
|
import { type AnyElement } from "@zyzgroup/core-common";
|
|
2
3
|
export declare function useResize(el: AnyElement, cb: (r: DOMRect) => void): Promise<() => void>;
|
|
4
|
+
export declare function useResize$(el?: AnyElement, options?: ResizeObserverOptions): Observable<DOMRect>;
|
|
3
5
|
export declare function useWindowResize(cb: (width: number, height: number) => void): () => void;
|
|
6
|
+
export declare function useWindowResize$(): Observable<{
|
|
7
|
+
width: number;
|
|
8
|
+
height: number;
|
|
9
|
+
}>;
|
|
4
10
|
//# 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,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"}
|
|
1
|
+
{"version":3,"file":"useResize.d.ts","sourceRoot":"","sources":["../../src/hooks/useResize.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAElC,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,UAAU,CACxB,EAAE,GAAE,UAAqC,EACzC,OAAO,CAAC,EAAE,qBAAqB,GAC9B,UAAU,CAAC,OAAO,CAAC,CAerB;AAED,wBAAgB,eAAe,CAAC,EAAE,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,cAW1E;AAED,wBAAgB,gBAAgB,IAAI,UAAU,CAAC;IAC7C,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC,CAgBD"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { Observable } from "rxjs";
|
|
2
|
+
export declare function useSafeArea$(): Observable<{
|
|
3
|
+
bottom: string;
|
|
4
|
+
top: string;
|
|
5
|
+
right: string;
|
|
6
|
+
left: string;
|
|
7
|
+
}>;
|
|
7
8
|
//# sourceMappingURL=useSafeArea.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSafeArea.d.ts","sourceRoot":"","sources":["../../src/hooks/useSafeArea.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useSafeArea.d.ts","sourceRoot":"","sources":["../../src/hooks/useSafeArea.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAkB,MAAM,MAAM,CAAC;AAoDlD,wBAAgB,YAAY,IAAI,UAAU,CAAC;IACzC,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd,CAAC,CAaD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTimestampValue.d.ts","sourceRoot":"","sources":["../../src/hooks/useTimestampValue.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useTimestampValue.d.ts","sourceRoot":"","sources":["../../src/hooks/useTimestampValue.ts"],"names":[],"mappings":"AAOA,wBAAgB,iBAAiB,CAC/B,SAAS,EAAE,GAAG,EACd,OAAO,CAAC,EAAE;IACR,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;;;;;aA+BU,GAAG;EAEf"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useLocation.d.ts","sourceRoot":"","sources":["../../src/hooks/useLocation.ts"],"names":[],"mappings":"AAAA,wBAAgB,WAAW,qBAiB1B"}
|