@mantine/hooks 6.0.12 → 6.0.14
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-window-event.js","sources":["../../src/use-window-event/use-window-event.ts"],"sourcesContent":["import { useEffect } from 'react';\n\nexport function useWindowEvent<K extends string>(\n type: K,\n listener: K extends keyof WindowEventMap\n ? (this: Window, ev: WindowEventMap[K]) => void\n : (this: Window, ev: CustomEvent) => void,\n options?: boolean | AddEventListenerOptions\n) {\n useEffect(() => {\n window.addEventListener(type, listener, options);\n return () => window.removeEventListener(type, listener, options);\n }, [type, listener]);\n}\n"],"names":["useEffect"],"mappings":";;;;;;AACO,SAAS,cAAc,CAAC,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE;AACxD,EAAEA,eAAS,CAAC,MAAM;AAClB,IAAI,MAAM,CAAC,gBAAgB,CAAC,IAAI,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;AACrD,IAAI,OAAO,MAAM,MAAM,CAAC,mBAAmB,CAAC,IAAI,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;AACrE,GAAG,EAAE,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC;AACvB;;;;"}
|
|
1
|
+
{"version":3,"file":"use-window-event.js","sources":["../../src/use-window-event/use-window-event.ts"],"sourcesContent":["import { useEffect } from 'react';\n\nexport function useWindowEvent<K extends string = keyof WindowEventMap>(\n type: K,\n listener: K extends keyof WindowEventMap\n ? (this: Window, ev: WindowEventMap[K]) => void\n : (this: Window, ev: CustomEvent) => void,\n options?: boolean | AddEventListenerOptions\n) {\n useEffect(() => {\n window.addEventListener(type, listener, options);\n return () => window.removeEventListener(type, listener, options);\n }, [type, listener]);\n}\n"],"names":["useEffect"],"mappings":";;;;;;AACO,SAAS,cAAc,CAAC,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE;AACxD,EAAEA,eAAS,CAAC,MAAM;AAClB,IAAI,MAAM,CAAC,gBAAgB,CAAC,IAAI,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;AACrD,IAAI,OAAO,MAAM,MAAM,CAAC,mBAAmB,CAAC,IAAI,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;AACrE,GAAG,EAAE,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC;AACvB;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-window-event.js","sources":["../../src/use-window-event/use-window-event.ts"],"sourcesContent":["import { useEffect } from 'react';\n\nexport function useWindowEvent<K extends string>(\n type: K,\n listener: K extends keyof WindowEventMap\n ? (this: Window, ev: WindowEventMap[K]) => void\n : (this: Window, ev: CustomEvent) => void,\n options?: boolean | AddEventListenerOptions\n) {\n useEffect(() => {\n window.addEventListener(type, listener, options);\n return () => window.removeEventListener(type, listener, options);\n }, [type, listener]);\n}\n"],"names":[],"mappings":";;AACO,SAAS,cAAc,CAAC,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE;AACxD,EAAE,SAAS,CAAC,MAAM;AAClB,IAAI,MAAM,CAAC,gBAAgB,CAAC,IAAI,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;AACrD,IAAI,OAAO,MAAM,MAAM,CAAC,mBAAmB,CAAC,IAAI,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;AACrE,GAAG,EAAE,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC;AACvB;;;;"}
|
|
1
|
+
{"version":3,"file":"use-window-event.js","sources":["../../src/use-window-event/use-window-event.ts"],"sourcesContent":["import { useEffect } from 'react';\n\nexport function useWindowEvent<K extends string = keyof WindowEventMap>(\n type: K,\n listener: K extends keyof WindowEventMap\n ? (this: Window, ev: WindowEventMap[K]) => void\n : (this: Window, ev: CustomEvent) => void,\n options?: boolean | AddEventListenerOptions\n) {\n useEffect(() => {\n window.addEventListener(type, listener, options);\n return () => window.removeEventListener(type, listener, options);\n }, [type, listener]);\n}\n"],"names":[],"mappings":";;AACO,SAAS,cAAc,CAAC,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE;AACxD,EAAE,SAAS,CAAC,MAAM;AAClB,IAAI,MAAM,CAAC,gBAAgB,CAAC,IAAI,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;AACrD,IAAI,OAAO,MAAM,MAAM,CAAC,mBAAmB,CAAC,IAAI,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;AACrE,GAAG,EAAE,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC;AACvB;;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare function useWindowEvent<K extends string>(type: K, listener: K extends keyof WindowEventMap ? (this: Window, ev: WindowEventMap[K]) => void : (this: Window, ev: CustomEvent) => void, options?: boolean | AddEventListenerOptions): void;
|
|
1
|
+
export declare function useWindowEvent<K extends string = keyof WindowEventMap>(type: K, listener: K extends keyof WindowEventMap ? (this: Window, ev: WindowEventMap[K]) => void : (this: Window, ev: CustomEvent) => void, options?: boolean | AddEventListenerOptions): void;
|
|
2
2
|
//# sourceMappingURL=use-window-event.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-window-event.d.ts","sourceRoot":"","sources":["../../src/use-window-event/use-window-event.ts"],"names":[],"mappings":"AAEA,wBAAgB,cAAc,CAAC,CAAC,SAAS,MAAM,
|
|
1
|
+
{"version":3,"file":"use-window-event.d.ts","sourceRoot":"","sources":["../../src/use-window-event/use-window-event.ts"],"names":[],"mappings":"AAEA,wBAAgB,cAAc,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,cAAc,EACpE,IAAI,EAAE,CAAC,EACP,QAAQ,EAAE,CAAC,SAAS,MAAM,cAAc,GACpC,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,cAAc,CAAC,CAAC,CAAC,KAAK,IAAI,GAC7C,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,WAAW,KAAK,IAAI,EAC3C,OAAO,CAAC,EAAE,OAAO,GAAG,uBAAuB,QAM5C"}
|