@usefy/usefy 0.0.19 → 0.0.20

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/index.d.mts CHANGED
@@ -11,3 +11,4 @@ export { InitialValue as SessionStorageInitialValue, UseSessionStorageOptions, U
11
11
  export { ClickOutsideEvent, MouseEventType, OnClickOutsideHandler, RefTarget, TouchEventType, UseOnClickOutsideOptions, useOnClickOutside } from '@usefy/use-on-click-outside';
12
12
  export { EventTargetType, UseEventListenerOptions, useEventListener } from '@usefy/use-event-listener';
13
13
  export { TimeFormat, TimeUnit, UseTimerOptions, UseTimerReturn, useTimer } from '@usefy/use-timer';
14
+ export { UseUnmountOptions, useUnmount } from '@usefy/use-unmount';
package/dist/index.d.ts CHANGED
@@ -11,3 +11,4 @@ export { InitialValue as SessionStorageInitialValue, UseSessionStorageOptions, U
11
11
  export { ClickOutsideEvent, MouseEventType, OnClickOutsideHandler, RefTarget, TouchEventType, UseOnClickOutsideOptions, useOnClickOutside } from '@usefy/use-on-click-outside';
12
12
  export { EventTargetType, UseEventListenerOptions, useEventListener } from '@usefy/use-event-listener';
13
13
  export { TimeFormat, TimeUnit, UseTimerOptions, UseTimerReturn, useTimer } from '@usefy/use-timer';
14
+ export { UseUnmountOptions, useUnmount } from '@usefy/use-unmount';
package/dist/index.js CHANGED
@@ -32,7 +32,8 @@ __export(index_exports, {
32
32
  useThrottle: () => import_use_throttle.useThrottle,
33
33
  useThrottleCallback: () => import_use_throttle_callback.useThrottleCallback,
34
34
  useTimer: () => import_use_timer.useTimer,
35
- useToggle: () => import_use_toggle.useToggle
35
+ useToggle: () => import_use_toggle.useToggle,
36
+ useUnmount: () => import_use_unmount.useUnmount
36
37
  });
37
38
  module.exports = __toCommonJS(index_exports);
38
39
  var import_use_click_any_where = require("@usefy/use-click-any-where");
@@ -48,6 +49,7 @@ var import_use_session_storage = require("@usefy/use-session-storage");
48
49
  var import_use_on_click_outside = require("@usefy/use-on-click-outside");
49
50
  var import_use_event_listener = require("@usefy/use-event-listener");
50
51
  var import_use_timer = require("@usefy/use-timer");
52
+ var import_use_unmount = require("@usefy/use-unmount");
51
53
  // Annotate the CommonJS export names for ESM import in node:
52
54
  0 && (module.exports = {
53
55
  useClickAnyWhere,
@@ -62,6 +64,7 @@ var import_use_timer = require("@usefy/use-timer");
62
64
  useThrottle,
63
65
  useThrottleCallback,
64
66
  useTimer,
65
- useToggle
67
+ useToggle,
68
+ useUnmount
66
69
  });
67
70
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["// Re-export all hooks from individual packages\n\n// useClickAnyWhere\nexport {\n useClickAnyWhere,\n type UseClickAnyWhereOptions,\n type ClickAnyWhereHandler,\n} from \"@usefy/use-click-any-where\";\n\n// useCopyToClipboard\nexport {\n useCopyToClipboard,\n type UseCopyToClipboardOptions,\n type UseCopyToClipboardReturn,\n type CopyFn,\n} from \"@usefy/use-copy-to-clipboard\";\n\n// useCounter\nexport { useCounter } from \"@usefy/use-counter\";\n\n// useToggle\nexport { useToggle, type UseToggleReturn } from \"@usefy/use-toggle\";\n\n// useDebounce\nexport { useDebounce, type UseDebounceOptions } from \"@usefy/use-debounce\";\n\n// useDebounceCallback\nexport {\n useDebounceCallback,\n type UseDebounceCallbackOptions,\n type DebouncedFunction,\n} from \"@usefy/use-debounce-callback\";\n\n// useThrottle\nexport { useThrottle, type UseThrottleOptions } from \"@usefy/use-throttle\";\n\n// useThrottleCallback\nexport {\n useThrottleCallback,\n type UseThrottleCallbackOptions,\n type ThrottledFunction,\n} from \"@usefy/use-throttle-callback\";\n\n// useLocalStorage\nexport {\n useLocalStorage,\n type UseLocalStorageOptions,\n type UseLocalStorageReturn,\n type InitialValue,\n} from \"@usefy/use-local-storage\";\n\n// useSessionStorage\nexport {\n useSessionStorage,\n type UseSessionStorageOptions,\n type UseSessionStorageReturn,\n type InitialValue as SessionStorageInitialValue,\n} from \"@usefy/use-session-storage\";\n\n// useOnClickOutside\nexport {\n useOnClickOutside,\n type UseOnClickOutsideOptions,\n type OnClickOutsideHandler,\n type ClickOutsideEvent,\n type RefTarget,\n type MouseEventType,\n type TouchEventType,\n} from \"@usefy/use-on-click-outside\";\n\n// useEventListener\nexport {\n useEventListener,\n type UseEventListenerOptions,\n type EventTargetType,\n} from \"@usefy/use-event-listener\";\n\n// useTimer\nexport {\n useTimer,\n type TimeUnit,\n type TimeFormat,\n type UseTimerOptions,\n type UseTimerReturn,\n} from \"@usefy/use-timer\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,iCAIO;AAGP,mCAKO;AAGP,yBAA2B;AAG3B,wBAAgD;AAGhD,0BAAqD;AAGrD,mCAIO;AAGP,0BAAqD;AAGrD,mCAIO;AAGP,+BAKO;AAGP,iCAKO;AAGP,kCAQO;AAGP,gCAIO;AAGP,uBAMO;","names":[]}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["// Re-export all hooks from individual packages\n\n// useClickAnyWhere\nexport {\n useClickAnyWhere,\n type UseClickAnyWhereOptions,\n type ClickAnyWhereHandler,\n} from \"@usefy/use-click-any-where\";\n\n// useCopyToClipboard\nexport {\n useCopyToClipboard,\n type UseCopyToClipboardOptions,\n type UseCopyToClipboardReturn,\n type CopyFn,\n} from \"@usefy/use-copy-to-clipboard\";\n\n// useCounter\nexport { useCounter } from \"@usefy/use-counter\";\n\n// useToggle\nexport { useToggle, type UseToggleReturn } from \"@usefy/use-toggle\";\n\n// useDebounce\nexport { useDebounce, type UseDebounceOptions } from \"@usefy/use-debounce\";\n\n// useDebounceCallback\nexport {\n useDebounceCallback,\n type UseDebounceCallbackOptions,\n type DebouncedFunction,\n} from \"@usefy/use-debounce-callback\";\n\n// useThrottle\nexport { useThrottle, type UseThrottleOptions } from \"@usefy/use-throttle\";\n\n// useThrottleCallback\nexport {\n useThrottleCallback,\n type UseThrottleCallbackOptions,\n type ThrottledFunction,\n} from \"@usefy/use-throttle-callback\";\n\n// useLocalStorage\nexport {\n useLocalStorage,\n type UseLocalStorageOptions,\n type UseLocalStorageReturn,\n type InitialValue,\n} from \"@usefy/use-local-storage\";\n\n// useSessionStorage\nexport {\n useSessionStorage,\n type UseSessionStorageOptions,\n type UseSessionStorageReturn,\n type InitialValue as SessionStorageInitialValue,\n} from \"@usefy/use-session-storage\";\n\n// useOnClickOutside\nexport {\n useOnClickOutside,\n type UseOnClickOutsideOptions,\n type OnClickOutsideHandler,\n type ClickOutsideEvent,\n type RefTarget,\n type MouseEventType,\n type TouchEventType,\n} from \"@usefy/use-on-click-outside\";\n\n// useEventListener\nexport {\n useEventListener,\n type UseEventListenerOptions,\n type EventTargetType,\n} from \"@usefy/use-event-listener\";\n\n// useTimer\nexport {\n useTimer,\n type TimeUnit,\n type TimeFormat,\n type UseTimerOptions,\n type UseTimerReturn,\n} from \"@usefy/use-timer\";\n\n// useUnmount\nexport { useUnmount, type UseUnmountOptions } from \"@usefy/use-unmount\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,iCAIO;AAGP,mCAKO;AAGP,yBAA2B;AAG3B,wBAAgD;AAGhD,0BAAqD;AAGrD,mCAIO;AAGP,0BAAqD;AAGrD,mCAIO;AAGP,+BAKO;AAGP,iCAKO;AAGP,kCAQO;AAGP,gCAIO;AAGP,uBAMO;AAGP,yBAAmD;","names":[]}
package/dist/index.mjs CHANGED
@@ -30,6 +30,7 @@ import {
30
30
  import {
31
31
  useTimer
32
32
  } from "@usefy/use-timer";
33
+ import { useUnmount } from "@usefy/use-unmount";
33
34
  export {
34
35
  useClickAnyWhere,
35
36
  useCopyToClipboard,
@@ -43,6 +44,7 @@ export {
43
44
  useThrottle,
44
45
  useThrottleCallback,
45
46
  useTimer,
46
- useToggle
47
+ useToggle,
48
+ useUnmount
47
49
  };
48
50
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["// Re-export all hooks from individual packages\n\n// useClickAnyWhere\nexport {\n useClickAnyWhere,\n type UseClickAnyWhereOptions,\n type ClickAnyWhereHandler,\n} from \"@usefy/use-click-any-where\";\n\n// useCopyToClipboard\nexport {\n useCopyToClipboard,\n type UseCopyToClipboardOptions,\n type UseCopyToClipboardReturn,\n type CopyFn,\n} from \"@usefy/use-copy-to-clipboard\";\n\n// useCounter\nexport { useCounter } from \"@usefy/use-counter\";\n\n// useToggle\nexport { useToggle, type UseToggleReturn } from \"@usefy/use-toggle\";\n\n// useDebounce\nexport { useDebounce, type UseDebounceOptions } from \"@usefy/use-debounce\";\n\n// useDebounceCallback\nexport {\n useDebounceCallback,\n type UseDebounceCallbackOptions,\n type DebouncedFunction,\n} from \"@usefy/use-debounce-callback\";\n\n// useThrottle\nexport { useThrottle, type UseThrottleOptions } from \"@usefy/use-throttle\";\n\n// useThrottleCallback\nexport {\n useThrottleCallback,\n type UseThrottleCallbackOptions,\n type ThrottledFunction,\n} from \"@usefy/use-throttle-callback\";\n\n// useLocalStorage\nexport {\n useLocalStorage,\n type UseLocalStorageOptions,\n type UseLocalStorageReturn,\n type InitialValue,\n} from \"@usefy/use-local-storage\";\n\n// useSessionStorage\nexport {\n useSessionStorage,\n type UseSessionStorageOptions,\n type UseSessionStorageReturn,\n type InitialValue as SessionStorageInitialValue,\n} from \"@usefy/use-session-storage\";\n\n// useOnClickOutside\nexport {\n useOnClickOutside,\n type UseOnClickOutsideOptions,\n type OnClickOutsideHandler,\n type ClickOutsideEvent,\n type RefTarget,\n type MouseEventType,\n type TouchEventType,\n} from \"@usefy/use-on-click-outside\";\n\n// useEventListener\nexport {\n useEventListener,\n type UseEventListenerOptions,\n type EventTargetType,\n} from \"@usefy/use-event-listener\";\n\n// useTimer\nexport {\n useTimer,\n type TimeUnit,\n type TimeFormat,\n type UseTimerOptions,\n type UseTimerReturn,\n} from \"@usefy/use-timer\";\n"],"mappings":";AAGA;AAAA,EACE;AAAA,OAGK;AAGP;AAAA,EACE;AAAA,OAIK;AAGP,SAAS,kBAAkB;AAG3B,SAAS,iBAAuC;AAGhD,SAAS,mBAA4C;AAGrD;AAAA,EACE;AAAA,OAGK;AAGP,SAAS,mBAA4C;AAGrD;AAAA,EACE;AAAA,OAGK;AAGP;AAAA,EACE;AAAA,OAIK;AAGP;AAAA,EACE;AAAA,OAIK;AAGP;AAAA,EACE;AAAA,OAOK;AAGP;AAAA,EACE;AAAA,OAGK;AAGP;AAAA,EACE;AAAA,OAKK;","names":[]}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["// Re-export all hooks from individual packages\n\n// useClickAnyWhere\nexport {\n useClickAnyWhere,\n type UseClickAnyWhereOptions,\n type ClickAnyWhereHandler,\n} from \"@usefy/use-click-any-where\";\n\n// useCopyToClipboard\nexport {\n useCopyToClipboard,\n type UseCopyToClipboardOptions,\n type UseCopyToClipboardReturn,\n type CopyFn,\n} from \"@usefy/use-copy-to-clipboard\";\n\n// useCounter\nexport { useCounter } from \"@usefy/use-counter\";\n\n// useToggle\nexport { useToggle, type UseToggleReturn } from \"@usefy/use-toggle\";\n\n// useDebounce\nexport { useDebounce, type UseDebounceOptions } from \"@usefy/use-debounce\";\n\n// useDebounceCallback\nexport {\n useDebounceCallback,\n type UseDebounceCallbackOptions,\n type DebouncedFunction,\n} from \"@usefy/use-debounce-callback\";\n\n// useThrottle\nexport { useThrottle, type UseThrottleOptions } from \"@usefy/use-throttle\";\n\n// useThrottleCallback\nexport {\n useThrottleCallback,\n type UseThrottleCallbackOptions,\n type ThrottledFunction,\n} from \"@usefy/use-throttle-callback\";\n\n// useLocalStorage\nexport {\n useLocalStorage,\n type UseLocalStorageOptions,\n type UseLocalStorageReturn,\n type InitialValue,\n} from \"@usefy/use-local-storage\";\n\n// useSessionStorage\nexport {\n useSessionStorage,\n type UseSessionStorageOptions,\n type UseSessionStorageReturn,\n type InitialValue as SessionStorageInitialValue,\n} from \"@usefy/use-session-storage\";\n\n// useOnClickOutside\nexport {\n useOnClickOutside,\n type UseOnClickOutsideOptions,\n type OnClickOutsideHandler,\n type ClickOutsideEvent,\n type RefTarget,\n type MouseEventType,\n type TouchEventType,\n} from \"@usefy/use-on-click-outside\";\n\n// useEventListener\nexport {\n useEventListener,\n type UseEventListenerOptions,\n type EventTargetType,\n} from \"@usefy/use-event-listener\";\n\n// useTimer\nexport {\n useTimer,\n type TimeUnit,\n type TimeFormat,\n type UseTimerOptions,\n type UseTimerReturn,\n} from \"@usefy/use-timer\";\n\n// useUnmount\nexport { useUnmount, type UseUnmountOptions } from \"@usefy/use-unmount\";\n"],"mappings":";AAGA;AAAA,EACE;AAAA,OAGK;AAGP;AAAA,EACE;AAAA,OAIK;AAGP,SAAS,kBAAkB;AAG3B,SAAS,iBAAuC;AAGhD,SAAS,mBAA4C;AAGrD;AAAA,EACE;AAAA,OAGK;AAGP,SAAS,mBAA4C;AAGrD;AAAA,EACE;AAAA,OAGK;AAGP;AAAA,EACE;AAAA,OAIK;AAGP;AAAA,EACE;AAAA,OAIK;AAGP;AAAA,EACE;AAAA,OAOK;AAGP;AAAA,EACE;AAAA,OAGK;AAGP;AAAA,EACE;AAAA,OAKK;AAGP,SAAS,kBAA0C;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@usefy/usefy",
3
- "version": "0.0.19",
3
+ "version": "0.0.20",
4
4
  "description": "A collection of useful React hooks",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -17,19 +17,20 @@
17
17
  ],
18
18
  "sideEffects": false,
19
19
  "dependencies": {
20
- "@usefy/use-click-any-where": "0.0.19",
21
- "@usefy/use-copy-to-clipboard": "0.0.19",
22
- "@usefy/use-counter": "0.0.19",
23
- "@usefy/use-toggle": "0.0.19",
24
- "@usefy/use-debounce": "0.0.19",
25
- "@usefy/use-debounce-callback": "0.0.19",
26
- "@usefy/use-throttle": "0.0.19",
27
- "@usefy/use-throttle-callback": "0.0.19",
28
- "@usefy/use-local-storage": "0.0.19",
29
- "@usefy/use-session-storage": "0.0.19",
30
- "@usefy/use-on-click-outside": "0.0.19",
31
- "@usefy/use-event-listener": "0.0.19",
32
- "@usefy/use-timer": "0.0.19"
20
+ "@usefy/use-click-any-where": "0.0.20",
21
+ "@usefy/use-copy-to-clipboard": "0.0.20",
22
+ "@usefy/use-counter": "0.0.20",
23
+ "@usefy/use-toggle": "0.0.20",
24
+ "@usefy/use-debounce": "0.0.20",
25
+ "@usefy/use-debounce-callback": "0.0.20",
26
+ "@usefy/use-throttle": "0.0.20",
27
+ "@usefy/use-throttle-callback": "0.0.20",
28
+ "@usefy/use-local-storage": "0.0.20",
29
+ "@usefy/use-session-storage": "0.0.20",
30
+ "@usefy/use-on-click-outside": "0.0.20",
31
+ "@usefy/use-event-listener": "0.0.20",
32
+ "@usefy/use-timer": "0.0.20",
33
+ "@usefy/use-unmount": "0.0.20"
33
34
  },
34
35
  "peerDependencies": {
35
36
  "react": "^18.0.0 || ^19.0.0"