foxact 0.3.5 → 0.3.7
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/breadcrumbs/index.cjs +1 -0
- package/breadcrumbs/index.d.ts +31 -0
- package/breadcrumbs/index.mjs +1 -0
- package/create-breadcrumbs/index.cjs +1 -0
- package/create-breadcrumbs/index.d.ts +1 -0
- package/create-breadcrumbs/index.mjs +1 -0
- package/create-context-reducer/index.cjs +1 -1
- package/create-context-reducer/index.mjs +1 -1
- package/create-context-state/index.cjs +1 -1
- package/create-context-state/index.mjs +1 -1
- package/create-local-storage-state/index.cjs +1 -1
- package/create-local-storage-state/index.mjs +1 -1
- package/create-magic-portal/index.cjs +1 -1
- package/create-magic-portal/index.mjs +1 -1
- package/create-session-storage-state/index.cjs +1 -1
- package/create-session-storage-state/index.mjs +1 -1
- package/create-storage-hook/index.cjs +1 -1
- package/create-storage-hook/index.mjs +1 -1
- package/create-storage-state-factory/index.cjs +1 -1
- package/create-storage-state-factory/index.mjs +1 -1
- package/current-year/index.cjs +1 -1
- package/current-year/index.mjs +1 -1
- package/magic-portal/index.cjs +1 -1
- package/magic-portal/index.mjs +1 -1
- package/package.json +178 -160
- package/sizes.json +1 -1
- package/use-fast-click/index.cjs +1 -1
- package/use-fast-click/index.mjs +1 -1
- package/use-local-storage/index.cjs +1 -1
- package/use-local-storage/index.mjs +1 -1
- package/use-media-query/index.cjs +1 -1
- package/use-media-query/index.mjs +1 -1
- package/use-readonly-search-params/index.cjs +1 -1
- package/use-readonly-search-params/index.mjs +1 -1
- package/use-resizing/index.cjs +1 -0
- package/use-resizing/index.d.ts +9 -0
- package/use-resizing/index.mjs +1 -0
- package/use-session-storage/index.cjs +1 -1
- package/use-session-storage/index.mjs +1 -1
- package/use-state-with-deps/index.cjs +1 -1
- package/use-state-with-deps/index.mjs +1 -1
- package/use-url-hash-state/index.cjs +1 -1
- package/use-url-hash-state/index.mjs +1 -1
- package/email-protection/index.cjs +0 -2
- package/email-protection/index.d.ts +0 -27
- package/email-protection/index.mjs +0 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime");require("client-only");var r=require("react"),t=require("../magic-portal/index.cjs");exports.createBreadcrumbs=function(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"(Anonymous)";const o=r.createContext([]),[u,c,i]=t.createMagicPortal(n);function s(t){let{title:n,href:u,meta:c,children:i}=t;const s=r.useContext(o),a=r.useMemo(()=>[...s,{title:n,href:u,meta:c}],[s,n,u,c]);return e.jsx(o.Provider,{value:a,children:i})}function a(t){const{title:n,meta:u}=t,c=r.useContext(o),s=r.useMemo(()=>[...c,{title:n,meta:u}],[c,n,u]),{children:a}=t,l=r.isValidElement(a)?a:a(s);return e.jsx(o.Provider,{value:s,children:e.jsx(i,{children:l})})}return"production"!==process.env.NODE_ENV&&(s.displayName=n+".BreadcrumbSegment"),"production"!==process.env.NODE_ENV&&(a.displayName=n+".BreadcrumbCurrent"),[u,c,s,a,function(){return r.useContext(o)}]};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
interface BreadcrumbItemData<T = unknown> {
|
|
2
|
+
title: string;
|
|
3
|
+
href?: string;
|
|
4
|
+
meta?: T;
|
|
5
|
+
}
|
|
6
|
+
interface BreadcrumbItemProps<T = unknown> {
|
|
7
|
+
title: string;
|
|
8
|
+
href: string;
|
|
9
|
+
meta?: T;
|
|
10
|
+
children: React.ReactNode;
|
|
11
|
+
}
|
|
12
|
+
interface BreadcrumbPageProps<T = unknown> {
|
|
13
|
+
title: string;
|
|
14
|
+
meta?: T;
|
|
15
|
+
children: ((items: Array<BreadcrumbItemData<T>>) => React.ReactNode) | React.ReactElement;
|
|
16
|
+
}
|
|
17
|
+
type BreadcrumbPortalTargetProps<E extends React.ElementType = 'div'> = Omit<React.ComponentPropsWithoutRef<E>, 'children' | 'ref'> & {
|
|
18
|
+
as?: E | null;
|
|
19
|
+
ssrFallback?: React.ReactNode | null;
|
|
20
|
+
};
|
|
21
|
+
/** @see https://foxact.skk.moe/breadcrumbs */
|
|
22
|
+
declare function createBreadcrumbs<T = unknown>(name?: string): [
|
|
23
|
+
BreadcrumbProvider: React.ComponentType<React.PropsWithChildren>,
|
|
24
|
+
BreadcrumbPortalTarget: <E extends React.ElementType = 'div'>(props: BreadcrumbPortalTargetProps<E>) => React.ReactNode,
|
|
25
|
+
BreadcrumbSegment: (props: BreadcrumbItemProps<T>) => React.ReactNode,
|
|
26
|
+
BreadcrumbCurrent: (props: BreadcrumbPageProps<T>) => React.ReactNode | null,
|
|
27
|
+
useBreadcrumbs: () => Array<BreadcrumbItemData<T>>
|
|
28
|
+
];
|
|
29
|
+
|
|
30
|
+
export { createBreadcrumbs };
|
|
31
|
+
export type { BreadcrumbItemData, BreadcrumbItemProps, BreadcrumbPageProps, BreadcrumbPortalTargetProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as r}from"react/jsx-runtime";import"client-only";import{useContext as e,useMemo as n,isValidElement as t,createContext as o}from"react";import{createMagicPortal as c}from"../magic-portal/index.mjs";function i(){let i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"(Anonymous)";const u=o([]),[m,a,d]=c(i);function l(t){let{title:o,href:c,meta:i,children:m}=t;const a=e(u),d=n(()=>[...a,{title:o,href:c,meta:i}],[a,o,c,i]);return r(u.Provider,{value:d,children:m})}function s(o){const{title:c,meta:i}=o,m=e(u),a=n(()=>[...m,{title:c,meta:i}],[m,c,i]),{children:l}=o,s=t(l)?l:l(a);return r(u.Provider,{value:a,children:r(d,{children:s})})}return"production"!==process.env.NODE_ENV&&(l.displayName=i+".BreadcrumbSegment"),"production"!==process.env.NODE_ENV&&(s.displayName=i+".BreadcrumbCurrent"),[m,a,l,s,function(){return e(u)}]}export{i as createBreadcrumbs};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var r=require("../breadcrumbs/index.cjs");exports.createBreadcrumbs=r.createBreadcrumbs;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { BreadcrumbItemData, BreadcrumbItemProps, BreadcrumbPageProps, BreadcrumbPortalTargetProps, createBreadcrumbs } from '../breadcrumbs/index.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{createBreadcrumbs}from"../breadcrumbs/index.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("../context-reducer/index.cjs");
|
|
1
|
+
"use strict";var e=require("../context-reducer/index.cjs");exports.createContextReducer=e.createContextReducer;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{createContextReducer}from"../context-reducer/index.mjs";
|
|
1
|
+
export{createContextReducer}from"../context-reducer/index.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var t=require("../context-state/index.cjs");exports.createContextState=t.createContextState;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{createContextState}from"../context-state/index.mjs";
|
|
1
|
+
export{createContextState}from"../context-state/index.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require("client-only");
|
|
1
|
+
"use strict";require("client-only");const e=require("../create-storage-state-factory/index.cjs").createStorageStateFactory("localStorage");exports.createLocalStorageState=e;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"client-only";import{createStorageStateFactory as
|
|
1
|
+
import"client-only";import{createStorageStateFactory as t}from"../create-storage-state-factory/index.mjs";const e=t("localStorage");export{e as createLocalStorageState};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var r=require("../magic-portal/index.cjs");exports.createMagicPortal=r.createMagicPortal;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{createMagicPortal}from"../magic-portal/index.mjs";
|
|
1
|
+
export{createMagicPortal}from"../magic-portal/index.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require("client-only");
|
|
1
|
+
"use strict";require("client-only");const e=require("../create-storage-state-factory/index.cjs").createStorageStateFactory("sessionStorage");exports.createSessionStorageState=e;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"client-only";import{createStorageStateFactory as
|
|
1
|
+
import"client-only";import{createStorageStateFactory as t}from"../create-storage-state-factory/index.mjs";const e=t("sessionStorage");export{e as createSessionStorageState};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require("client-only");var e=require("react"),t=require("../noop/index.cjs"),
|
|
1
|
+
"use strict";require("client-only");var e=require("react"),t=require("../noop/index.cjs"),n=require("../use-isomorphic-layout-effect/index.cjs"),r=require("../no-ssr/index.cjs"),o=require("../chunks/index.b9dLwVor.cjs"),i=require("../chunks/index.BtiK5_Nn.cjs");exports.createStorage=function(a){const s="localStorage"===a?"foxact-use-local-storage":"foxact-use-session-storage",l="localStorage"===a?"foxact/use-local-storage":"foxact/use-session-storage";function c(){throw r.noSSRError("[".concat(l,"] cannot be used on the server without a serverValue"))}const u="u"<typeof window?t.noop:e=>{window.dispatchEvent(new CustomEvent(s,{detail:e}))},d="u"<typeof window?t.noop:(e,t)=>{try{window[a].setItem(e,t)}catch(e){console.warn("[".concat(l,"] Failed to set value to ").concat(a,", it might be blocked"))}finally{u(e)}},w="u"<typeof window?t.noop:e=>{try{window[a].removeItem(e)}catch(e){console.warn("[".concat(l,"] Failed to remove value from ").concat(a,", it might be blocked"))}finally{u(e)}},f=e=>{if("u"<typeof window)return null;try{return window[a].getItem(e)}catch(e){return console.warn("[".concat(l,"] Failed to get value from ").concat(a,", it might be blocked")),null}},v=function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{raw:!1,serializer:JSON.stringify,deserializer:JSON.parse};const r=n.raw?o.t:n.serializer,a=n.raw?o.t:n.deserializer;return e.useCallback(e=>{try{let n;if(i.n(e)){const r=f(t),o=null===r?null:a(r);n=e(o)}else n=e;null===n?w(t):d(t,r(n))}catch(e){console.warn(e)}},[t,r,a])};function g(r,i){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{raw:!1,serializer:JSON.stringify,deserializer:JSON.parse};const l=e.useCallback(e=>{if("u"<typeof window)return t.noop;const n=t=>{"key"in t&&t.key!==r||e()},o=t=>{t.detail===r&&e()};return window.addEventListener("storage",n),window.addEventListener(s,o),()=>{window.removeEventListener("storage",n),window.removeEventListener(s,o)}},[r]),u=a.raw?o.t:a.serializer,w=a.raw?o.t:a.deserializer,v=void 0===i?c:()=>u(i),g=e.useSyncExternalStore(l,()=>f(r),v),y=e.useMemo(()=>null===g?null:w(g),[g,w]);return n.useLayoutEffect(()=>{null===f(r)&&void 0!==i&&d(r,u(i))},[r,u,i]),null===y?void 0===i?null:i:y}return{useStorageValue:g,useSetStorage:v,useStorage:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{raw:!1,serializer:JSON.stringify,deserializer:JSON.parse};return[g(e,t,n),v(e,n)]}}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"client-only";import{useCallback as e,useSyncExternalStore as t,useMemo as o}from"react";import{noop as
|
|
1
|
+
import"client-only";import{useCallback as e,useSyncExternalStore as t,useMemo as o}from"react";import{noop as n}from"../noop/index.mjs";import{useLayoutEffect as r}from"../use-isomorphic-layout-effect/index.mjs";import{noSSRError as i}from"../no-ssr/index.mjs";import{t as a}from"../chunks/index.D0KaUCcV.mjs";import{n as l}from"../chunks/index.C9-3oDdv.mjs";function s(s){const c="localStorage"===s?"foxact-use-local-storage":"foxact-use-session-storage",u="localStorage"===s?"foxact/use-local-storage":"foxact/use-session-storage";function d(){throw i("[".concat(u,"] cannot be used on the server without a serverValue"))}const w="u"<typeof window?n:e=>{window.dispatchEvent(new CustomEvent(c,{detail:e}))},f="u"<typeof window?n:(e,t)=>{try{window[s].setItem(e,t)}catch(e){console.warn("[".concat(u,"] Failed to set value to ").concat(s,", it might be blocked"))}finally{w(e)}},m="u"<typeof window?n:e=>{try{window[s].removeItem(e)}catch(e){console.warn("[".concat(u,"] Failed to remove value from ").concat(s,", it might be blocked"))}finally{w(e)}},g=e=>{if("u"<typeof window)return null;try{return window[s].getItem(e)}catch(e){return console.warn("[".concat(u,"] Failed to get value from ").concat(s,", it might be blocked")),null}},v=function(t){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{raw:!1,serializer:JSON.stringify,deserializer:JSON.parse};const n=o.raw?a:o.serializer,r=o.raw?a:o.deserializer;return e(e=>{try{let o;if(l(e)){const n=g(t),i=null===n?null:r(n);o=e(i)}else o=e;null===o?m(t):f(t,n(o))}catch(e){console.warn(e)}},[t,n,r])};function p(i,l){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{raw:!1,serializer:JSON.stringify,deserializer:JSON.parse};const u=e(e=>{if("u"<typeof window)return n;const t=t=>{"key"in t&&t.key!==i||e()},o=t=>{t.detail===i&&e()};return window.addEventListener("storage",t),window.addEventListener(c,o),()=>{window.removeEventListener("storage",t),window.removeEventListener(c,o)}},[i]),w=s.raw?a:s.serializer,m=s.raw?a:s.deserializer,v=t(u,()=>g(i),void 0===l?d:()=>w(l)),p=o(()=>null===v?null:m(v),[v,m]);return r(()=>{null===g(i)&&void 0!==l&&f(i,w(l))},[i,w,l]),null===p?void 0===l?null:l:p}return{useStorageValue:p,useSetStorage:v,useStorage:function(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{raw:!1,serializer:JSON.stringify,deserializer:JSON.parse};return[p(e,t,o),v(e,o)]}}}export{s as createStorage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("../create-storage-hook/index.cjs");
|
|
1
|
+
"use strict";var e=require("../create-storage-hook/index.cjs");exports.createStorageStateFactory=function(r){return function(t,a){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{raw:!1,serializer:JSON.stringify,deserializer:JSON.parse};const{useStorage:s,useStorageValue:i,useSetStorage:n}=e.createStorage(r);return[()=>s(t,a,o),()=>i(t,a,o),()=>n(t,o)]}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createStorage as e}from"../create-storage-hook/index.mjs";
|
|
1
|
+
import{createStorage as e}from"../create-storage-hook/index.mjs";function r(r){return function(t,o){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{raw:!1,serializer:JSON.stringify,deserializer:JSON.parse};const{useStorage:i,useStorageValue:n,useSetStorage:s}=e(r);return[()=>i(t,o,a),()=>n(t,o,a),()=>s(t,a)]}}export{r as createStorageStateFactory};
|
package/current-year/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
"use strict";var e=require("react/jsx-runtime"),r=require("react"),t=require("../use-isomorphic-layout-effect/index.cjs");
|
|
2
|
+
"use strict";var e=require("react/jsx-runtime"),r=require("react"),t=require("../use-isomorphic-layout-effect/index.cjs");const u=r.memo(function(u){let{defaultYear:n,...i}=u;"u"<typeof window&&void 0===n&&console.warn('[foxact/current-year] "defaultYear" is required during the server-side rendering.');const[s,a]=r.useState(()=>n||new Date().getFullYear());return t.useIsomorphicLayoutEffect(()=>{a(new Date().getFullYear())},[]),e.jsx("span",{...i,children:s})});exports.CurrentYear=u;
|
package/current-year/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{jsx as e}from"react/jsx-runtime";import{memo as r,useState as t}from"react";import{useIsomorphicLayoutEffect as n}from"../use-isomorphic-layout-effect/index.mjs";
|
|
2
|
+
import{jsx as e}from"react/jsx-runtime";import{memo as r,useState as t}from"react";import{useIsomorphicLayoutEffect as n}from"../use-isomorphic-layout-effect/index.mjs";const o=r(function(r){let{defaultYear:o,...i}=r;"u"<typeof window&&void 0===o&&console.warn('[foxact/current-year] "defaultYear" is required during the server-side rendering.');const[a,u]=t(()=>o||new Date().getFullYear());return n(()=>{u(new Date().getFullYear())},[]),e("span",{...i,children:a})});export{o as CurrentYear};
|
package/magic-portal/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("react/jsx-runtime");require("client-only");var
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime");require("client-only");var t=require("react-dom"),r=require("../context-state/index.cjs"),n=require("../no-ssr/index.cjs"),o=require("react");exports.createMagicPortal=function(){let c=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"(Anoymous)";const[l,a,i]=r.createContextState(null);function s(t){let{as:r,ssrFallback:o=null,...l}=t;null!=o&&n.noSSR();const a=i();return e.jsx(r||"div",{...c?{"data-foxact-magic-portal-target":c}:{},ref:a,...l})}function u(t){const{ssrFallback:r=null}=t;return null!=r?e.jsx(o.Suspense,{fallback:r,children:e.jsx(s,{...t})}):e.jsx(s,{...t})}function d(e){let{children:r}=e;const n=a();return"u"<typeof window||!n?null:t.createPortal(r,n)}function p(t){let{children:r}=t;return e.jsx(l,{children:r})}return"production"!==process.env.NODE_ENV&&(u.displayName=c+".PortalTarget"),"production"!==process.env.NODE_ENV&&(d.displayName=c+".PortalContent"),"production"!==process.env.NODE_ENV&&(p.displayName=c+".PortalProvider"),[p,u,d]};
|
package/magic-portal/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as t}from"react/jsx-runtime";import"client-only";import{createPortal as o}from"react-dom";import{createContextState as r}from"../context-state/index.mjs";import{noSSR as n}from"../no-ssr/index.mjs";import{Suspense as e}from"react";
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import"client-only";import{createPortal as o}from"react-dom";import{createContextState as r}from"../context-state/index.mjs";import{noSSR as n}from"../no-ssr/index.mjs";import{Suspense as e}from"react";function l(){let l=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"(Anoymous)";const[i,c,a]=r(null);function u(o){let{as:r,ssrFallback:e=null,...i}=o;null!=e&&n();const c=a();return t(r||"div",{...l?{"data-foxact-magic-portal-target":l}:{},ref:c,...i})}function m(o){const{ssrFallback:r=null}=o;return null!=r?t(e,{fallback:r,children:t(u,{...o})}):t(u,{...o})}function s(t){let{children:r}=t;const n=c();return"u"<typeof window||!n?null:o(r,n)}function p(o){let{children:r}=o;return t(i,{children:r})}return"production"!==process.env.NODE_ENV&&(m.displayName=l+".PortalTarget"),"production"!==process.env.NODE_ENV&&(s.displayName=l+".PortalContent"),"production"!==process.env.NODE_ENV&&(p.displayName=l+".PortalProvider"),[p,m,s]}export{l as createMagicPortal};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "foxact",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.7",
|
|
4
4
|
"description": "React Hooks/Utils done right. For browser, SSR, and React Server Components.",
|
|
5
5
|
"homepage": "https://foxact.skk.moe",
|
|
6
6
|
"repository": {
|
|
@@ -52,14 +52,14 @@
|
|
|
52
52
|
"exports": {
|
|
53
53
|
"./package.json": "./package.json",
|
|
54
54
|
"./sizes.json": "./sizes.json",
|
|
55
|
-
"./
|
|
56
|
-
"types": "./
|
|
55
|
+
"./breadcrumbs": {
|
|
56
|
+
"types": "./breadcrumbs/index.d.ts",
|
|
57
57
|
"import": {
|
|
58
|
-
"types": "./
|
|
59
|
-
"default": "./
|
|
58
|
+
"types": "./breadcrumbs/index.d.ts",
|
|
59
|
+
"default": "./breadcrumbs/index.mjs"
|
|
60
60
|
},
|
|
61
|
-
"require": "./
|
|
62
|
-
"default": "./
|
|
61
|
+
"require": "./breadcrumbs/index.cjs",
|
|
62
|
+
"default": "./breadcrumbs/index.cjs"
|
|
63
63
|
},
|
|
64
64
|
"./context-reducer": {
|
|
65
65
|
"types": "./context-reducer/index.d.ts",
|
|
@@ -70,6 +70,24 @@
|
|
|
70
70
|
"require": "./context-reducer/index.cjs",
|
|
71
71
|
"default": "./context-reducer/index.cjs"
|
|
72
72
|
},
|
|
73
|
+
"./context-state": {
|
|
74
|
+
"types": "./context-state/index.d.ts",
|
|
75
|
+
"import": {
|
|
76
|
+
"types": "./context-state/index.d.ts",
|
|
77
|
+
"default": "./context-state/index.mjs"
|
|
78
|
+
},
|
|
79
|
+
"require": "./context-state/index.cjs",
|
|
80
|
+
"default": "./context-state/index.cjs"
|
|
81
|
+
},
|
|
82
|
+
"./create-context-reducer": {
|
|
83
|
+
"types": "./create-context-reducer/index.d.ts",
|
|
84
|
+
"import": {
|
|
85
|
+
"types": "./create-context-reducer/index.d.ts",
|
|
86
|
+
"default": "./create-context-reducer/index.mjs"
|
|
87
|
+
},
|
|
88
|
+
"require": "./create-context-reducer/index.cjs",
|
|
89
|
+
"default": "./create-context-reducer/index.cjs"
|
|
90
|
+
},
|
|
73
91
|
"./create-context-state": {
|
|
74
92
|
"types": "./create-context-state/index.d.ts",
|
|
75
93
|
"import": {
|
|
@@ -79,6 +97,24 @@
|
|
|
79
97
|
"require": "./create-context-state/index.cjs",
|
|
80
98
|
"default": "./create-context-state/index.cjs"
|
|
81
99
|
},
|
|
100
|
+
"./compose-context-provider": {
|
|
101
|
+
"types": "./compose-context-provider/index.d.ts",
|
|
102
|
+
"import": {
|
|
103
|
+
"types": "./compose-context-provider/index.d.ts",
|
|
104
|
+
"default": "./compose-context-provider/index.mjs"
|
|
105
|
+
},
|
|
106
|
+
"require": "./compose-context-provider/index.cjs",
|
|
107
|
+
"default": "./compose-context-provider/index.cjs"
|
|
108
|
+
},
|
|
109
|
+
"./create-breadcrumbs": {
|
|
110
|
+
"types": "./create-breadcrumbs/index.d.ts",
|
|
111
|
+
"import": {
|
|
112
|
+
"types": "./create-breadcrumbs/index.d.ts",
|
|
113
|
+
"default": "./create-breadcrumbs/index.mjs"
|
|
114
|
+
},
|
|
115
|
+
"require": "./create-breadcrumbs/index.cjs",
|
|
116
|
+
"default": "./create-breadcrumbs/index.cjs"
|
|
117
|
+
},
|
|
82
118
|
"./create-fixed-array": {
|
|
83
119
|
"types": "./create-fixed-array/index.d.ts",
|
|
84
120
|
"import": {
|
|
@@ -88,41 +124,41 @@
|
|
|
88
124
|
"require": "./create-fixed-array/index.cjs",
|
|
89
125
|
"default": "./create-fixed-array/index.cjs"
|
|
90
126
|
},
|
|
91
|
-
"./create-
|
|
92
|
-
"types": "./create-
|
|
127
|
+
"./create-magic-portal": {
|
|
128
|
+
"types": "./create-magic-portal/index.d.ts",
|
|
93
129
|
"import": {
|
|
94
|
-
"types": "./create-
|
|
95
|
-
"default": "./create-
|
|
130
|
+
"types": "./create-magic-portal/index.d.ts",
|
|
131
|
+
"default": "./create-magic-portal/index.mjs"
|
|
96
132
|
},
|
|
97
|
-
"require": "./create-
|
|
98
|
-
"default": "./create-
|
|
133
|
+
"require": "./create-magic-portal/index.cjs",
|
|
134
|
+
"default": "./create-magic-portal/index.cjs"
|
|
99
135
|
},
|
|
100
|
-
"./create-
|
|
101
|
-
"types": "./create-
|
|
136
|
+
"./create-stackless-error": {
|
|
137
|
+
"types": "./create-stackless-error/index.d.ts",
|
|
102
138
|
"import": {
|
|
103
|
-
"types": "./create-
|
|
104
|
-
"default": "./create-
|
|
139
|
+
"types": "./create-stackless-error/index.d.ts",
|
|
140
|
+
"default": "./create-stackless-error/index.mjs"
|
|
105
141
|
},
|
|
106
|
-
"require": "./create-
|
|
107
|
-
"default": "./create-
|
|
142
|
+
"require": "./create-stackless-error/index.cjs",
|
|
143
|
+
"default": "./create-stackless-error/index.cjs"
|
|
108
144
|
},
|
|
109
|
-
"./
|
|
110
|
-
"types": "./
|
|
145
|
+
"./create-session-storage-state": {
|
|
146
|
+
"types": "./create-session-storage-state/index.d.ts",
|
|
111
147
|
"import": {
|
|
112
|
-
"types": "./
|
|
113
|
-
"default": "./
|
|
148
|
+
"types": "./create-session-storage-state/index.d.ts",
|
|
149
|
+
"default": "./create-session-storage-state/index.mjs"
|
|
114
150
|
},
|
|
115
|
-
"require": "./
|
|
116
|
-
"default": "./
|
|
151
|
+
"require": "./create-session-storage-state/index.cjs",
|
|
152
|
+
"default": "./create-session-storage-state/index.cjs"
|
|
117
153
|
},
|
|
118
|
-
"./create-
|
|
119
|
-
"types": "./create-
|
|
154
|
+
"./create-storage-hook": {
|
|
155
|
+
"types": "./create-storage-hook/index.d.ts",
|
|
120
156
|
"import": {
|
|
121
|
-
"types": "./create-
|
|
122
|
-
"default": "./create-
|
|
157
|
+
"types": "./create-storage-hook/index.d.ts",
|
|
158
|
+
"default": "./create-storage-hook/index.mjs"
|
|
123
159
|
},
|
|
124
|
-
"require": "./create-
|
|
125
|
-
"default": "./create-
|
|
160
|
+
"require": "./create-storage-hook/index.cjs",
|
|
161
|
+
"default": "./create-storage-hook/index.cjs"
|
|
126
162
|
},
|
|
127
163
|
"./create-storage-state-factory": {
|
|
128
164
|
"types": "./create-storage-state-factory/index.d.ts",
|
|
@@ -133,6 +169,15 @@
|
|
|
133
169
|
"require": "./create-storage-state-factory/index.cjs",
|
|
134
170
|
"default": "./create-storage-state-factory/index.cjs"
|
|
135
171
|
},
|
|
172
|
+
"./fetch-jsonp": {
|
|
173
|
+
"types": "./fetch-jsonp/index.d.ts",
|
|
174
|
+
"import": {
|
|
175
|
+
"types": "./fetch-jsonp/index.d.ts",
|
|
176
|
+
"default": "./fetch-jsonp/index.mjs"
|
|
177
|
+
},
|
|
178
|
+
"require": "./fetch-jsonp/index.cjs",
|
|
179
|
+
"default": "./fetch-jsonp/index.cjs"
|
|
180
|
+
},
|
|
136
181
|
"./current-year": {
|
|
137
182
|
"types": "./current-year/index.d.ts",
|
|
138
183
|
"import": {
|
|
@@ -142,23 +187,23 @@
|
|
|
142
187
|
"require": "./current-year/index.cjs",
|
|
143
188
|
"default": "./current-year/index.cjs"
|
|
144
189
|
},
|
|
145
|
-
"./create-
|
|
146
|
-
"types": "./create-
|
|
190
|
+
"./create-local-storage-state": {
|
|
191
|
+
"types": "./create-local-storage-state/index.d.ts",
|
|
147
192
|
"import": {
|
|
148
|
-
"types": "./create-
|
|
149
|
-
"default": "./create-
|
|
193
|
+
"types": "./create-local-storage-state/index.d.ts",
|
|
194
|
+
"default": "./create-local-storage-state/index.mjs"
|
|
150
195
|
},
|
|
151
|
-
"require": "./create-
|
|
152
|
-
"default": "./create-
|
|
196
|
+
"require": "./create-local-storage-state/index.cjs",
|
|
197
|
+
"default": "./create-local-storage-state/index.cjs"
|
|
153
198
|
},
|
|
154
|
-
"./
|
|
155
|
-
"types": "./
|
|
199
|
+
"./is-safari": {
|
|
200
|
+
"types": "./is-safari/index.d.ts",
|
|
156
201
|
"import": {
|
|
157
|
-
"types": "./
|
|
158
|
-
"default": "./
|
|
202
|
+
"types": "./is-safari/index.d.ts",
|
|
203
|
+
"default": "./is-safari/index.mjs"
|
|
159
204
|
},
|
|
160
|
-
"require": "./
|
|
161
|
-
"default": "./
|
|
205
|
+
"require": "./is-safari/index.cjs",
|
|
206
|
+
"default": "./is-safari/index.cjs"
|
|
162
207
|
},
|
|
163
208
|
"./invariant": {
|
|
164
209
|
"types": "./invariant/index.d.ts",
|
|
@@ -169,24 +214,6 @@
|
|
|
169
214
|
"require": "./invariant/index.cjs",
|
|
170
215
|
"default": "./invariant/index.cjs"
|
|
171
216
|
},
|
|
172
|
-
"./fetch-jsonp": {
|
|
173
|
-
"types": "./fetch-jsonp/index.d.ts",
|
|
174
|
-
"import": {
|
|
175
|
-
"types": "./fetch-jsonp/index.d.ts",
|
|
176
|
-
"default": "./fetch-jsonp/index.mjs"
|
|
177
|
-
},
|
|
178
|
-
"require": "./fetch-jsonp/index.cjs",
|
|
179
|
-
"default": "./fetch-jsonp/index.cjs"
|
|
180
|
-
},
|
|
181
|
-
"./is-safari": {
|
|
182
|
-
"types": "./is-safari/index.d.ts",
|
|
183
|
-
"import": {
|
|
184
|
-
"types": "./is-safari/index.d.ts",
|
|
185
|
-
"default": "./is-safari/index.mjs"
|
|
186
|
-
},
|
|
187
|
-
"require": "./is-safari/index.cjs",
|
|
188
|
-
"default": "./is-safari/index.cjs"
|
|
189
|
-
},
|
|
190
217
|
"./magic-portal": {
|
|
191
218
|
"types": "./magic-portal/index.d.ts",
|
|
192
219
|
"import": {
|
|
@@ -196,24 +223,6 @@
|
|
|
196
223
|
"require": "./magic-portal/index.cjs",
|
|
197
224
|
"default": "./magic-portal/index.cjs"
|
|
198
225
|
},
|
|
199
|
-
"./merge-refs": {
|
|
200
|
-
"types": "./merge-refs/index.d.ts",
|
|
201
|
-
"import": {
|
|
202
|
-
"types": "./merge-refs/index.d.ts",
|
|
203
|
-
"default": "./merge-refs/index.mjs"
|
|
204
|
-
},
|
|
205
|
-
"require": "./merge-refs/index.cjs",
|
|
206
|
-
"default": "./merge-refs/index.cjs"
|
|
207
|
-
},
|
|
208
|
-
"./noop": {
|
|
209
|
-
"types": "./noop/index.d.ts",
|
|
210
|
-
"import": {
|
|
211
|
-
"types": "./noop/index.d.ts",
|
|
212
|
-
"default": "./noop/index.mjs"
|
|
213
|
-
},
|
|
214
|
-
"require": "./noop/index.cjs",
|
|
215
|
-
"default": "./noop/index.cjs"
|
|
216
|
-
},
|
|
217
226
|
"./no-ssr": {
|
|
218
227
|
"types": "./no-ssr/index.d.ts",
|
|
219
228
|
"import": {
|
|
@@ -223,6 +232,15 @@
|
|
|
223
232
|
"require": "./no-ssr/index.cjs",
|
|
224
233
|
"default": "./no-ssr/index.cjs"
|
|
225
234
|
},
|
|
235
|
+
"./merge-refs": {
|
|
236
|
+
"types": "./merge-refs/index.d.ts",
|
|
237
|
+
"import": {
|
|
238
|
+
"types": "./merge-refs/index.d.ts",
|
|
239
|
+
"default": "./merge-refs/index.mjs"
|
|
240
|
+
},
|
|
241
|
+
"require": "./merge-refs/index.cjs",
|
|
242
|
+
"default": "./merge-refs/index.cjs"
|
|
243
|
+
},
|
|
226
244
|
"./noop-component": {
|
|
227
245
|
"types": "./noop-component/index.d.ts",
|
|
228
246
|
"import": {
|
|
@@ -232,6 +250,15 @@
|
|
|
232
250
|
"require": "./noop-component/index.cjs",
|
|
233
251
|
"default": "./noop-component/index.cjs"
|
|
234
252
|
},
|
|
253
|
+
"./noop": {
|
|
254
|
+
"types": "./noop/index.d.ts",
|
|
255
|
+
"import": {
|
|
256
|
+
"types": "./noop/index.d.ts",
|
|
257
|
+
"default": "./noop/index.mjs"
|
|
258
|
+
},
|
|
259
|
+
"require": "./noop/index.cjs",
|
|
260
|
+
"default": "./noop/index.cjs"
|
|
261
|
+
},
|
|
235
262
|
"./nullthrow": {
|
|
236
263
|
"types": "./nullthrow/index.d.ts",
|
|
237
264
|
"import": {
|
|
@@ -295,15 +322,6 @@
|
|
|
295
322
|
"require": "./use/index.cjs",
|
|
296
323
|
"default": "./use/index.cjs"
|
|
297
324
|
},
|
|
298
|
-
"./use-array": {
|
|
299
|
-
"types": "./use-array/index.d.ts",
|
|
300
|
-
"import": {
|
|
301
|
-
"types": "./use-array/index.d.ts",
|
|
302
|
-
"default": "./use-array/index.mjs"
|
|
303
|
-
},
|
|
304
|
-
"require": "./use-array/index.cjs",
|
|
305
|
-
"default": "./use-array/index.cjs"
|
|
306
|
-
},
|
|
307
325
|
"./use-abortable-effect": {
|
|
308
326
|
"types": "./use-abortable-effect/index.d.ts",
|
|
309
327
|
"import": {
|
|
@@ -313,6 +331,15 @@
|
|
|
313
331
|
"require": "./use-abortable-effect/index.cjs",
|
|
314
332
|
"default": "./use-abortable-effect/index.cjs"
|
|
315
333
|
},
|
|
334
|
+
"./use-array": {
|
|
335
|
+
"types": "./use-array/index.d.ts",
|
|
336
|
+
"import": {
|
|
337
|
+
"types": "./use-array/index.d.ts",
|
|
338
|
+
"default": "./use-array/index.mjs"
|
|
339
|
+
},
|
|
340
|
+
"require": "./use-array/index.cjs",
|
|
341
|
+
"default": "./use-array/index.cjs"
|
|
342
|
+
},
|
|
316
343
|
"./use-clipboard": {
|
|
317
344
|
"types": "./use-clipboard/index.d.ts",
|
|
318
345
|
"import": {
|
|
@@ -322,15 +349,6 @@
|
|
|
322
349
|
"require": "./use-clipboard/index.cjs",
|
|
323
350
|
"default": "./use-clipboard/index.cjs"
|
|
324
351
|
},
|
|
325
|
-
"./use-component-will-receive-update": {
|
|
326
|
-
"types": "./use-component-will-receive-update/index.d.ts",
|
|
327
|
-
"import": {
|
|
328
|
-
"types": "./use-component-will-receive-update/index.d.ts",
|
|
329
|
-
"default": "./use-component-will-receive-update/index.mjs"
|
|
330
|
-
},
|
|
331
|
-
"require": "./use-component-will-receive-update/index.cjs",
|
|
332
|
-
"default": "./use-component-will-receive-update/index.cjs"
|
|
333
|
-
},
|
|
334
352
|
"./use-composition-input": {
|
|
335
353
|
"types": "./use-composition-input/index.d.ts",
|
|
336
354
|
"import": {
|
|
@@ -340,14 +358,14 @@
|
|
|
340
358
|
"require": "./use-composition-input/index.cjs",
|
|
341
359
|
"default": "./use-composition-input/index.cjs"
|
|
342
360
|
},
|
|
343
|
-
"./use-
|
|
344
|
-
"types": "./use-
|
|
361
|
+
"./use-component-will-receive-update": {
|
|
362
|
+
"types": "./use-component-will-receive-update/index.d.ts",
|
|
345
363
|
"import": {
|
|
346
|
-
"types": "./use-
|
|
347
|
-
"default": "./use-
|
|
364
|
+
"types": "./use-component-will-receive-update/index.d.ts",
|
|
365
|
+
"default": "./use-component-will-receive-update/index.mjs"
|
|
348
366
|
},
|
|
349
|
-
"require": "./use-
|
|
350
|
-
"default": "./use-
|
|
367
|
+
"require": "./use-component-will-receive-update/index.cjs",
|
|
368
|
+
"default": "./use-component-will-receive-update/index.cjs"
|
|
351
369
|
},
|
|
352
370
|
"./use-debounced-state": {
|
|
353
371
|
"types": "./use-debounced-state/index.d.ts",
|
|
@@ -358,6 +376,15 @@
|
|
|
358
376
|
"require": "./use-debounced-state/index.cjs",
|
|
359
377
|
"default": "./use-debounced-state/index.cjs"
|
|
360
378
|
},
|
|
379
|
+
"./use-debounced-value": {
|
|
380
|
+
"types": "./use-debounced-value/index.d.ts",
|
|
381
|
+
"import": {
|
|
382
|
+
"types": "./use-debounced-value/index.d.ts",
|
|
383
|
+
"default": "./use-debounced-value/index.mjs"
|
|
384
|
+
},
|
|
385
|
+
"require": "./use-debounced-value/index.cjs",
|
|
386
|
+
"default": "./use-debounced-value/index.cjs"
|
|
387
|
+
},
|
|
361
388
|
"./use-error-boundary": {
|
|
362
389
|
"types": "./use-error-boundary/index.d.ts",
|
|
363
390
|
"import": {
|
|
@@ -367,6 +394,15 @@
|
|
|
367
394
|
"require": "./use-error-boundary/index.cjs",
|
|
368
395
|
"default": "./use-error-boundary/index.cjs"
|
|
369
396
|
},
|
|
397
|
+
"./use-is-client": {
|
|
398
|
+
"types": "./use-is-client/index.d.ts",
|
|
399
|
+
"import": {
|
|
400
|
+
"types": "./use-is-client/index.d.ts",
|
|
401
|
+
"default": "./use-is-client/index.mjs"
|
|
402
|
+
},
|
|
403
|
+
"require": "./use-is-client/index.cjs",
|
|
404
|
+
"default": "./use-is-client/index.cjs"
|
|
405
|
+
},
|
|
370
406
|
"./use-fast-click": {
|
|
371
407
|
"types": "./use-fast-click/index.d.ts",
|
|
372
408
|
"import": {
|
|
@@ -385,24 +421,6 @@
|
|
|
385
421
|
"require": "./use-intersection/index.cjs",
|
|
386
422
|
"default": "./use-intersection/index.cjs"
|
|
387
423
|
},
|
|
388
|
-
"./use-is-online": {
|
|
389
|
-
"types": "./use-is-online/index.d.ts",
|
|
390
|
-
"import": {
|
|
391
|
-
"types": "./use-is-online/index.d.ts",
|
|
392
|
-
"default": "./use-is-online/index.mjs"
|
|
393
|
-
},
|
|
394
|
-
"require": "./use-is-online/index.cjs",
|
|
395
|
-
"default": "./use-is-online/index.cjs"
|
|
396
|
-
},
|
|
397
|
-
"./use-is-client": {
|
|
398
|
-
"types": "./use-is-client/index.d.ts",
|
|
399
|
-
"import": {
|
|
400
|
-
"types": "./use-is-client/index.d.ts",
|
|
401
|
-
"default": "./use-is-client/index.mjs"
|
|
402
|
-
},
|
|
403
|
-
"require": "./use-is-client/index.cjs",
|
|
404
|
-
"default": "./use-is-client/index.cjs"
|
|
405
|
-
},
|
|
406
424
|
"./use-isomorphic-layout-effect": {
|
|
407
425
|
"types": "./use-isomorphic-layout-effect/index.d.ts",
|
|
408
426
|
"import": {
|
|
@@ -412,14 +430,14 @@
|
|
|
412
430
|
"require": "./use-isomorphic-layout-effect/index.cjs",
|
|
413
431
|
"default": "./use-isomorphic-layout-effect/index.cjs"
|
|
414
432
|
},
|
|
415
|
-
"./use-
|
|
416
|
-
"types": "./use-
|
|
433
|
+
"./use-is-online": {
|
|
434
|
+
"types": "./use-is-online/index.d.ts",
|
|
417
435
|
"import": {
|
|
418
|
-
"types": "./use-
|
|
419
|
-
"default": "./use-
|
|
436
|
+
"types": "./use-is-online/index.d.ts",
|
|
437
|
+
"default": "./use-is-online/index.mjs"
|
|
420
438
|
},
|
|
421
|
-
"require": "./use-
|
|
422
|
-
"default": "./use-
|
|
439
|
+
"require": "./use-is-online/index.cjs",
|
|
440
|
+
"default": "./use-is-online/index.cjs"
|
|
423
441
|
},
|
|
424
442
|
"./use-local-storage": {
|
|
425
443
|
"types": "./use-local-storage/index.d.ts",
|
|
@@ -430,6 +448,15 @@
|
|
|
430
448
|
"require": "./use-local-storage/index.cjs",
|
|
431
449
|
"default": "./use-local-storage/index.cjs"
|
|
432
450
|
},
|
|
451
|
+
"./use-map": {
|
|
452
|
+
"types": "./use-map/index.d.ts",
|
|
453
|
+
"import": {
|
|
454
|
+
"types": "./use-map/index.d.ts",
|
|
455
|
+
"default": "./use-map/index.mjs"
|
|
456
|
+
},
|
|
457
|
+
"require": "./use-map/index.cjs",
|
|
458
|
+
"default": "./use-map/index.cjs"
|
|
459
|
+
},
|
|
433
460
|
"./use-media-query": {
|
|
434
461
|
"types": "./use-media-query/index.d.ts",
|
|
435
462
|
"import": {
|
|
@@ -457,14 +484,14 @@
|
|
|
457
484
|
"require": "./use-readonly-search-params/index.cjs",
|
|
458
485
|
"default": "./use-readonly-search-params/index.cjs"
|
|
459
486
|
},
|
|
460
|
-
"./use-
|
|
461
|
-
"types": "./use-
|
|
487
|
+
"./use-resizing": {
|
|
488
|
+
"types": "./use-resizing/index.d.ts",
|
|
462
489
|
"import": {
|
|
463
|
-
"types": "./use-
|
|
464
|
-
"default": "./use-
|
|
490
|
+
"types": "./use-resizing/index.d.ts",
|
|
491
|
+
"default": "./use-resizing/index.mjs"
|
|
465
492
|
},
|
|
466
|
-
"require": "./use-
|
|
467
|
-
"default": "./use-
|
|
493
|
+
"require": "./use-resizing/index.cjs",
|
|
494
|
+
"default": "./use-resizing/index.cjs"
|
|
468
495
|
},
|
|
469
496
|
"./use-retimer": {
|
|
470
497
|
"types": "./use-retimer/index.d.ts",
|
|
@@ -475,6 +502,15 @@
|
|
|
475
502
|
"require": "./use-retimer/index.cjs",
|
|
476
503
|
"default": "./use-retimer/index.cjs"
|
|
477
504
|
},
|
|
505
|
+
"./use-session-storage": {
|
|
506
|
+
"types": "./use-session-storage/index.d.ts",
|
|
507
|
+
"import": {
|
|
508
|
+
"types": "./use-session-storage/index.d.ts",
|
|
509
|
+
"default": "./use-session-storage/index.mjs"
|
|
510
|
+
},
|
|
511
|
+
"require": "./use-session-storage/index.cjs",
|
|
512
|
+
"default": "./use-session-storage/index.cjs"
|
|
513
|
+
},
|
|
478
514
|
"./use-set": {
|
|
479
515
|
"types": "./use-set/index.d.ts",
|
|
480
516
|
"import": {
|
|
@@ -502,15 +538,6 @@
|
|
|
502
538
|
"require": "./use-stable-handler-only-when-you-know-what-you-are-doing-or-you-will-be-fired/index.cjs",
|
|
503
539
|
"default": "./use-stable-handler-only-when-you-know-what-you-are-doing-or-you-will-be-fired/index.cjs"
|
|
504
540
|
},
|
|
505
|
-
"./use-typescript-happy-callback": {
|
|
506
|
-
"types": "./use-typescript-happy-callback/index.d.ts",
|
|
507
|
-
"import": {
|
|
508
|
-
"types": "./use-typescript-happy-callback/index.d.ts",
|
|
509
|
-
"default": "./use-typescript-happy-callback/index.mjs"
|
|
510
|
-
},
|
|
511
|
-
"require": "./use-typescript-happy-callback/index.cjs",
|
|
512
|
-
"default": "./use-typescript-happy-callback/index.cjs"
|
|
513
|
-
},
|
|
514
541
|
"./use-state-with-deps": {
|
|
515
542
|
"types": "./use-state-with-deps/index.d.ts",
|
|
516
543
|
"import": {
|
|
@@ -529,6 +556,15 @@
|
|
|
529
556
|
"require": "./use-uncontrolled/index.cjs",
|
|
530
557
|
"default": "./use-uncontrolled/index.cjs"
|
|
531
558
|
},
|
|
559
|
+
"./use-typescript-happy-callback": {
|
|
560
|
+
"types": "./use-typescript-happy-callback/index.d.ts",
|
|
561
|
+
"import": {
|
|
562
|
+
"types": "./use-typescript-happy-callback/index.d.ts",
|
|
563
|
+
"default": "./use-typescript-happy-callback/index.mjs"
|
|
564
|
+
},
|
|
565
|
+
"require": "./use-typescript-happy-callback/index.cjs",
|
|
566
|
+
"default": "./use-typescript-happy-callback/index.cjs"
|
|
567
|
+
},
|
|
532
568
|
"./use-url-hash-state": {
|
|
533
569
|
"types": "./use-url-hash-state/index.d.ts",
|
|
534
570
|
"import": {
|
|
@@ -537,24 +573,6 @@
|
|
|
537
573
|
},
|
|
538
574
|
"require": "./use-url-hash-state/index.cjs",
|
|
539
575
|
"default": "./use-url-hash-state/index.cjs"
|
|
540
|
-
},
|
|
541
|
-
"./create-storage-hook": {
|
|
542
|
-
"types": "./create-storage-hook/index.d.ts",
|
|
543
|
-
"import": {
|
|
544
|
-
"types": "./create-storage-hook/index.d.ts",
|
|
545
|
-
"default": "./create-storage-hook/index.mjs"
|
|
546
|
-
},
|
|
547
|
-
"require": "./create-storage-hook/index.cjs",
|
|
548
|
-
"default": "./create-storage-hook/index.cjs"
|
|
549
|
-
},
|
|
550
|
-
"./create-session-storage-state": {
|
|
551
|
-
"types": "./create-session-storage-state/index.d.ts",
|
|
552
|
-
"import": {
|
|
553
|
-
"types": "./create-session-storage-state/index.d.ts",
|
|
554
|
-
"default": "./create-session-storage-state/index.mjs"
|
|
555
|
-
},
|
|
556
|
-
"require": "./create-session-storage-state/index.cjs",
|
|
557
|
-
"default": "./create-session-storage-state/index.cjs"
|
|
558
576
|
}
|
|
559
577
|
}
|
|
560
578
|
}
|
package/sizes.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"total":{"raw":
|
|
1
|
+
{"total":{"raw":26735,"gzip":16359,"br":0},"exports":{"create-context-reducer":{"raw":63,"gzip":74,"br":64},"create-context-state":{"raw":59,"gzip":72,"br":59},"breadcrumbs":{"raw":879,"gzip":467,"br":395},"context-reducer":{"raw":557,"gzip":332,"br":319},"create-breadcrumbs":{"raw":56,"gzip":68,"br":52},"compose-context-provider":{"raw":177,"gzip":155,"br":122},"create-magic-portal":{"raw":57,"gzip":71,"br":53},"context-state":{"raw":402,"gzip":259,"br":218},"create-fixed-array":{"raw":452,"gzip":282,"br":248},"create-storage-state-factory":{"raw":364,"gzip":248,"br":197},"create-storage-hook":{"raw":2418,"gzip":955,"br":834},"fetch-jsonp":{"raw":890,"gzip":546,"br":429},"create-stackless-error":{"raw":278,"gzip":198,"br":162},"create-session-storage-state":{"raw":173,"gzip":138,"br":108},"create-local-storage-state":{"raw":169,"gzip":138,"br":111},"is-safari":{"raw":233,"gzip":164,"br":119},"current-year":{"raw":508,"gzip":348,"br":283},"no-ssr":{"raw":338,"gzip":267,"br":219},"invariant":{"raw":178,"gzip":156,"br":118},"noop-component":{"raw":142,"gzip":130,"br":111},"magic-portal":{"raw":1013,"gzip":517,"br":445},"noop":{"raw":33,"gzip":53,"br":37},"nullthrow":{"raw":187,"gzip":163,"br":121},"merge-refs":{"raw":525,"gzip":280,"br":235},"types":{"raw":0,"gzip":20,"br":1},"open-new-tab":{"raw":335,"gzip":255,"br":187},"typescript-happy-forward-ref":{"raw":119,"gzip":103,"br":80},"request-idle-callback":{"raw":392,"gzip":221,"br":171},"use":{"raw":298,"gzip":197,"br":160},"rem":{"raw":823,"gzip":395,"br":350},"use-abortable-effect":{"raw":215,"gzip":170,"br":144},"use-array":{"raw":334,"gzip":243,"br":206},"use-component-will-receive-update":{"raw":216,"gzip":188,"br":154},"use-composition-input":{"raw":470,"gzip":286,"br":241},"use-error-boundary":{"raw":252,"gzip":195,"br":165},"use-debounced-state":{"raw":401,"gzip":280,"br":242},"use-debounced-value":{"raw":553,"gzip":358,"br":320},"use-is-client":{"raw":204,"gzip":153,"br":121},"use-isomorphic-layout-effect":{"raw":169,"gzip":137,"br":110},"use-fast-click":{"raw":499,"gzip":350,"br":284},"use-clipboard":{"raw":2723,"gzip":1332,"br":1140},"use-local-storage":{"raw":192,"gzip":143,"br":114},"use-is-online":{"raw":370,"gzip":258,"br":220},"use-map":{"raw":384,"gzip":256,"br":220},"use-intersection":{"raw":1363,"gzip":716,"br":654},"use-retimer":{"raw":194,"gzip":166,"br":127},"use-page-visibility":{"raw":359,"gzip":263,"br":210},"use-media-query":{"raw":604,"gzip":380,"br":315},"use-readonly-search-params":{"raw":1120,"gzip":573,"br":477},"use-session-storage":{"raw":198,"gzip":141,"br":118},"use-resizing":{"raw":511,"gzip":334,"br":294},"use-set":{"raw":368,"gzip":247,"br":211},"use-singleton":{"raw":149,"gzip":135,"br":116},"use-uncontrolled":{"raw":388,"gzip":273,"br":230},"use-state-with-deps":{"raw":747,"gzip":479,"br":418},"use-stable-handler-only-when-you-know-what-you-are-doing-or-you-will-be-fired":{"raw":450,"gzip":318,"br":249},"use-typescript-happy-callback":{"raw":107,"gzip":102,"br":77},"use-url-hash-state":{"raw":1077,"gzip":611,"br":536}}}
|
package/use-fast-click/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("react"),
|
|
1
|
+
"use strict";var e=require("react"),t=require("../use-media-query/index.cjs");exports.useFastClick=function(n){const o=e.useCallback(e=>{("mousedown"!==e.type||0===e.button)&&("development"!==process.env.NODE_ENV||e.currentTarget instanceof HTMLDivElement||e.currentTarget instanceof HTMLButtonElement||console.warn('[foxact/use-fast-click] You should only use "useFastClick" on <div /> or <button /> elements'),n(e))},[n]);return t.useMediaQuery("(pointer: coarse)",!1)?{onClick:o}:{onMouseDown:o}};
|
package/use-fast-click/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useCallback as e}from"react";import{useMediaQuery as o}from"../use-media-query/index.mjs";
|
|
1
|
+
import{useCallback as e}from"react";import{useMediaQuery as o}from"../use-media-query/index.mjs";function t(t){const n=e(e=>{("mousedown"!==e.type||0===e.button)&&("development"!==process.env.NODE_ENV||e.currentTarget instanceof HTMLDivElement||e.currentTarget instanceof HTMLButtonElement||console.warn('[foxact/use-fast-click] You should only use "useFastClick" on <div /> or <button /> elements'),t(e))},[t]);return o("(pointer: coarse)",!1)?{onClick:n}:{onMouseDown:n}}export{t as useFastClick};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require("client-only");
|
|
1
|
+
"use strict";require("client-only");const{useStorage:e,useSetStorage:t}=require("../create-storage-hook/index.cjs").createStorage("localStorage");exports.useLocalStorage=e,exports.useSetLocalStorage=t;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"client-only";import{createStorage as e}from"../create-storage-hook/index.mjs";
|
|
1
|
+
import"client-only";import{createStorage as e}from"../create-storage-hook/index.mjs";const{useStorage:o,useSetStorage:t}=e("localStorage");export{o as useLocalStorage,t as useSetLocalStorage};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
"use strict";var e=require("../no-ssr/index.cjs"),r=require("../noop/index.cjs"),t=require("react"),n=require("event-target-bus");
|
|
2
|
+
"use strict";var e=require("../no-ssr/index.cjs"),r=require("../noop/index.cjs"),t=require("react"),n=require("event-target-bus");const o=new Map;function u(){throw e.noSSRError("useMediaQuery cannot be used on the server without a serverValue")}exports.useMediaQuery=function(e,i){const a=t.useCallback(t=>(function(e,t){if("u"<typeof window)return r.noop;let u=o.get(e);return u||(u=n.createEventTargetBus(window.matchMedia(e),"change"),o.set(e,u)),u.on(t)})(e,t),[e]);return t.useSyncExternalStore(a,()=>"u"<typeof window?null!=i&&i:window.matchMedia(e).matches,void 0===i?u:()=>i)};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{noSSRError as e}from"../no-ssr/index.mjs";import{noop as t}from"../noop/index.mjs";import{useCallback as o,useSyncExternalStore as
|
|
2
|
+
import{noSSRError as e}from"../no-ssr/index.mjs";import{noop as t}from"../noop/index.mjs";import{useCallback as o,useSyncExternalStore as n}from"react";import{createEventTargetBus as r}from"event-target-bus";const i=new Map;function u(){throw e("useMediaQuery cannot be used on the server without a serverValue")}function a(e,a){return n(o(o=>(function(e,o){if("u"<typeof window)return t;let n=i.get(e);return n||(n=r(window.matchMedia(e),"change"),i.set(e,n)),n.on(o)})(e,o),[e]),()=>"u"<typeof window?null!=a&&a:window.matchMedia(e).matches,void 0===a?u:()=>a)}export{a as useMediaQuery};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("event-target-bus"),r=require("../no-ssr/index.cjs"),n=require("../noop/index.cjs"),a=require("react");
|
|
1
|
+
"use strict";var e=require("event-target-bus"),r=require("../no-ssr/index.cjs"),n=require("../noop/index.cjs"),a=require("react");class t extends Error{constructor(){var e;super("[foxact/use-readonly-search-params] Method unavailable on `ReadonlyURLSearchParams`"),(e="name")in this?Object.defineProperty(this,e,{value:"ReadonlyURLSearchParamsError",enumerable:!0,configurable:!0,writable:!0}):this[e]="ReadonlyURLSearchParamsError"}}class o extends URLSearchParams{append(){throw new t}delete(){throw new t}set(){throw new t}sort(){throw new t}}let s=null;function u(r){return"u"<typeof window?n.noop:(null!=s||(s=e.createEventTargetBus(window,"popstate")),s.on(r))}let l=null,c=null;function i(){return"u"<typeof window?new o:window.location.search===l&&null!==c?c:c=new o(l=window.location.search)}function w(){throw r.noSSRError('[foxact] useReadonlySearchParams cannot be used on the server without a "getServerDefaultValue" function')}exports.ReadonlyURLSearchParams=o,exports.useReadonlySearchParams=function(e){return a.useSyncExternalStore(u,i,null==e?w:()=>{const r=e();return r instanceof o?r:new o(r)})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createEventTargetBus as e}from"event-target-bus";import{noSSRError as r}from"../no-ssr/index.mjs";import{noop as n}from"../noop/index.mjs";import{useSyncExternalStore as o}from"react";
|
|
1
|
+
import{createEventTargetBus as e}from"event-target-bus";import{noSSRError as r}from"../no-ssr/index.mjs";import{noop as n}from"../noop/index.mjs";import{useSyncExternalStore as o}from"react";class a extends Error{constructor(){var e;super("[foxact/use-readonly-search-params] Method unavailable on `ReadonlyURLSearchParams`"),(e="name")in this?Object.defineProperty(this,e,{value:"ReadonlyURLSearchParamsError",enumerable:!0,configurable:!0,writable:!0}):this[e]="ReadonlyURLSearchParamsError"}}class t extends URLSearchParams{append(){throw new a}delete(){throw new a}set(){throw new a}sort(){throw new a}}let s=null;function l(r){return"u"<typeof window?n:(null!=s||(s=e(window,"popstate")),s.on(r))}let u=null,c=null;function i(){return"u"<typeof window?new t:window.location.search===u&&null!==c?c:c=new t(u=window.location.search)}function w(){throw r('[foxact] useReadonlySearchParams cannot be used on the server without a "getServerDefaultValue" function')}function d(e){return o(l,i,null==e?w:()=>{const r=e();return r instanceof t?r:new t(r)})}export{t as ReadonlyURLSearchParams,d as useReadonlySearchParams};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";require("client-only");var e=require("react"),r=require("../use-debounced-state/index.cjs");exports.useResizing=function(){let{timeout:n=150,leading:u=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const[t,c,s]=r.useDebouncedState(!1,n,!1),i=e.useRef(null),l=e.useRef(!0);return[t,e.useCallback(e=>{i.current&&(i.current.disconnect(),i.current=null),s(!1),l.current=!0,e&&(i.current=new ResizeObserver(()=>{(!l.current||(l.current=!1,u))&&(s(!0),c(!1))}),i.current.observe(e))},[u,s,c])]};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
interface UseResizingOptions {
|
|
2
|
+
timeout?: number;
|
|
3
|
+
leading?: boolean;
|
|
4
|
+
}
|
|
5
|
+
/** @see https://foxact.skk.moe/use-resizing */
|
|
6
|
+
declare function useResizing({ timeout, leading }?: UseResizingOptions): [isResizing: boolean, refCallback: React.RefCallback<Element>];
|
|
7
|
+
|
|
8
|
+
export { useResizing };
|
|
9
|
+
export type { UseResizingOptions };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"client-only";import{useRef as e,useCallback as r}from"react";import{useDebouncedState as n}from"../use-debounced-state/index.mjs";function t(){let{timeout:t=150,leading:c=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const[u,o,i]=n(!1,t,!1),s=e(null),l=e(!0);return[u,r(e=>{s.current&&(s.current.disconnect(),s.current=null),i(!1),l.current=!0,e&&(s.current=new ResizeObserver(()=>{(!l.current||(l.current=!1,c))&&(i(!0),o(!1))}),s.current.observe(e))},[c,i,o])]}export{t as useResizing};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require("client-only");
|
|
1
|
+
"use strict";require("client-only");const{useStorage:e,useSetStorage:s}=require("../create-storage-hook/index.cjs").createStorage("sessionStorage");exports.useSessionStorage=e,exports.useSetSessionStorage=s;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"client-only";import{createStorage as e}from"../create-storage-hook/index.mjs";
|
|
1
|
+
import"client-only";import{createStorage as e}from"../create-storage-hook/index.mjs";const{useStorage:o,useSetStorage:s}=e("sessionStorage");export{o as useSessionStorage,s as useSetSessionStorage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var t=require("react"),e=require("../use-isomorphic-layout-effect/index.cjs");function s(t,e){Object.defineProperty(t.t,e,{get:()=>(t.d[e]=!0,t.s[e]),enumerable:!0})}function c(t){return{state:t.s,tracked:t.d}}const n=Object.prototype.hasOwnProperty;exports.useStateWithDeps=function(r){const[{inst:u},o]=t.useState(()=>{const t={s:r,d:{},t:{},u:!1};for(const e in r)n.call(r,e)&&s(t,e);return{inst:t}}),i=t.useCallback(t=>{const e="function"==typeof t?t(u.s):t;let c=!1;for(const t in e)n.call(e,t)&&(n.call(u.t,t)||s(u,t),!Object.is(u.s[t],e[t])&&(u.s[t]=e[t],u.d[t]&&(c=!0)));c&&!u.u&&o({inst:u})},[u]);return e.useLayoutEffect(()=>(u.u=!1,()=>{u.u=!0})),"production"!==process.env.NODE_ENV&&t.useDebugValue(u,c),[u.t,i]};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useState as t,useCallback as e,useDebugValue as o}from"react";import{useLayoutEffect as n}from"../use-isomorphic-layout-effect/index.mjs";
|
|
1
|
+
import{useState as t,useCallback as e,useDebugValue as o}from"react";import{useLayoutEffect as n}from"../use-isomorphic-layout-effect/index.mjs";function r(t,e){Object.defineProperty(t.t,e,{get:()=>(t.d[e]=!0,t.s[e]),enumerable:!0})}function s(t){return{state:t.s,tracked:t.d}}const c=Object.prototype.hasOwnProperty;function i(i){const[{inst:u},f]=t(()=>{const t={s:i,d:{},t:{},u:!1};for(const e in i)c.call(i,e)&&r(t,e);return{inst:t}}),p=e(t=>{const e="function"==typeof t?t(u.s):t;let o=!1;for(const t in e)c.call(e,t)&&(c.call(u.t,t)||r(u,t),!Object.is(u.s[t],e[t])&&(u.s[t]=e[t],u.d[t]&&(o=!0)));o&&!u.u&&f({inst:u})},[u]);return n(()=>(u.u=!1,()=>{u.u=!0})),"production"!==process.env.NODE_ENV&&o(u,s),[u.t,p]}export{i as useStateWithDeps};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require("client-only");var e=require("react"),r=require("../noop/index.cjs"),n=require("../no-ssr/index.cjs"),t=require("../chunks/index.b9dLwVor.cjs"),s=require("../chunks/index.BtiK5_Nn.cjs"),l=require("event-target-bus");
|
|
1
|
+
"use strict";require("client-only");var e=require("react"),r=require("../noop/index.cjs"),n=require("../no-ssr/index.cjs"),t=require("../chunks/index.b9dLwVor.cjs"),s=require("../chunks/index.BtiK5_Nn.cjs"),l=require("event-target-bus");let a=null;const i=e=>"u"<typeof window?r.noop:(null!=a||(a=l.createEventTargetBus(window,"hashchange")),a.on(e));function o(){throw n.noSSRError("useUrlHashState cannot be used on the server without a serverValue")}exports.unstable_useUrlHashState=function(r,n){var l;let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{raw:!1,serializer:t.t,deserializer:t.t};const u=a.raw?t.t:a.serializer,c=a.raw?t.t:a.deserializer,h=void 0===n?o:()=>u(n),d=e.useSyncExternalStore(i,()=>new URLSearchParams(location.hash.slice(1)).get(r),h),w=e.useMemo(()=>null===d?null!=n?n:null:c(d),[n,c,d]),S=e.useCallback(e=>{const t=location.hash,l=new URLSearchParams(t.slice(1)),a=s.n(e)?e(w):e;a===n||null===a?l.delete(r):l.set(r,u(a));const i=l.toString();t!==i&&(location.hash=i)},[n,w,r,u]);return[null!=(l=null!=w?w:n)?l:null,S]};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"client-only";import{useSyncExternalStore as e,useMemo as
|
|
1
|
+
import"client-only";import{useSyncExternalStore as e,useMemo as n,useCallback as r}from"react";import{noop as t}from"../noop/index.mjs";import{noSSRError as o}from"../no-ssr/index.mjs";import{t as l}from"../chunks/index.D0KaUCcV.mjs";import{n as s}from"../chunks/index.C9-3oDdv.mjs";import{createEventTargetBus as a}from"event-target-bus";let i=null;const u=e=>"u"<typeof window?t:(null!=i||(i=a(window,"hashchange")),i.on(e));function h(){throw o("useUrlHashState cannot be used on the server without a serverValue")}function c(t,o){var a;let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{raw:!1,serializer:l,deserializer:l};const c=i.raw?l:i.serializer,m=i.raw?l:i.deserializer,d=e(u,()=>new URLSearchParams(location.hash.slice(1)).get(t),void 0===o?h:()=>c(o)),w=n(()=>null===d?null!=o?o:null:m(d),[o,m,d]),p=r(e=>{const n=location.hash,r=new URLSearchParams(n.slice(1)),l=s(e)?e(w):e;l===o||null===l?r.delete(t):r.set(t,c(l));const a=r.toString();n!==a&&(location.hash=a)},[o,w,t,c]);return[null!=(a=null!=w?w:o)?a:null,p]}export{c as unstable_useUrlHashState};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
"use strict";var e=require("react"),t=require("../noop/index.cjs");const o=e.memo(o=>{let{mailbox:r,domain:n}=o;const[a]=e.useState(()=>Math.random().toString(36).slice(2)+"[at]"+n.replace(/\./g,"[dot]"));return e.useSyncExternalStore(t.noop,()=>r+"@"+n,()=>a)});"production"!==process.env.NODE_ENV&&(o.displayName="EmailProtection"),exports.EmailProtection=o;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import * as react from 'react';
|
|
2
|
-
|
|
3
|
-
interface EmailProtectionProps {
|
|
4
|
-
/**
|
|
5
|
-
* The mailbox name.
|
|
6
|
-
* If the desired E-Mail addresses are "hello@example.com", then the mailbox name is "hello".
|
|
7
|
-
*
|
|
8
|
-
* By passing the mailbox name and domain separately, the scrapper won't be able to find the
|
|
9
|
-
* mail address even if they scan JavaScript files.
|
|
10
|
-
*/
|
|
11
|
-
mailbox: string;
|
|
12
|
-
/**
|
|
13
|
-
* The domain name.
|
|
14
|
-
* If the desired E-Mail addresses are "hello@example.com", then the domain name is "example.com".
|
|
15
|
-
*
|
|
16
|
-
* By passing the mailbox name and domain separately, the scrapper won't be able to find the
|
|
17
|
-
* mail address even if they scan JavaScript files.
|
|
18
|
-
*/
|
|
19
|
-
domain: string;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* @see https://foxact.skk.moe/email-protection
|
|
23
|
-
*
|
|
24
|
-
*/
|
|
25
|
-
declare const EmailProtection: react.MemoExoticComponent<({ mailbox, domain }: Readonly<EmailProtectionProps>) => React.ReactNode>;
|
|
26
|
-
|
|
27
|
-
export { EmailProtection };
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import{memo as o,useState as t,useSyncExternalStore as r}from"react";import{noop as e}from"../noop/index.mjs";const i=o(o=>{let{mailbox:i,domain:n}=o;const[a]=t(()=>Math.random().toString(36).slice(2)+"[at]"+n.replace(/\./g,"[dot]"));return r(e,()=>i+"@"+n,()=>a)});"production"!==process.env.NODE_ENV&&(i.displayName="EmailProtection");export{i as EmailProtection};
|