functype-react 1.2.1 → 1.3.0
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":"useTask.js","names":[],"sources":["../../src/async/useTask.ts"],"sourcesContent":["\"use client\"\n\nimport { createCancellationTokenSource, Task, type Throwable } from \"functype\"\nimport { useCallback, useEffect, useReducer, useRef } from \"react\"\n\nimport type { TaskState } from \"./TaskState\"\n\ntype Action<E, A> =\n | { readonly type: \"PENDING\" }\n | { readonly type: \"SUCCESS\"; readonly value: A }\n | { readonly type: \"FAILURE\"; readonly error: E }\n\nfunction reducer<E, A>(_state: TaskState<E, A>, action: Action<E, A>): TaskState<E, A> {\n if (action.type === \"PENDING\") return { _tag: \"Pending\" }\n if (action.type === \"SUCCESS\") return { _tag: \"Success\", value: action.value }\n return { _tag: \"Failure\", error: action.error }\n}\n\nexport type UseTaskResult<E, A> = TaskState<E, A> & {\n readonly isIdle: boolean\n readonly isPending: boolean\n readonly isSuccess: boolean\n readonly isFailure: boolean\n refetch: () => void\n}\n\n/**\n * Run an async operation tied to a React component's lifecycle.\n *\n * - Returns a discriminated `TaskState<Throwable, A>` plus boolean flags and\n * a `refetch` trigger.\n * - The `task` callback receives an `AbortSignal` wired to a cancellation\n * token that fires when the component unmounts or `deps` change. Pass the\n * signal to `fetch` (or any abortable API) to cancel in-flight work.\n * - StrictMode-safe: the cleanup fn cancels the token and discards any\n * late-arriving result.\n */\nexport function useTask<A>(\n task: (signal: AbortSignal) => Promise<A> | A,\n deps: ReadonlyArray<unknown>,\n): UseTaskResult<Throwable, A> {\n const [state, dispatch] = useReducer(reducer<Throwable, A>, { _tag: \"Idle\" })\n const [refetchTick, forceRefetch] = useReducer((n: number) => n + 1, 0)\n const taskRef = useRef(task)\n taskRef.current = task\n\n useEffect(() => {\n const cancelled = { value: false }\n const tokenSource = createCancellationTokenSource()\n dispatch({ type: \"PENDING\" })\n\n void Task<A>()\n .Async<A>(() => taskRef.current(tokenSource.token.signal) as Promise<A>, undefined, undefined, tokenSource.token)\n .then((outcome) => {\n if (cancelled.value) return\n if (outcome.isOk()) {\n dispatch({ type: \"SUCCESS\", value: outcome.value as A })\n } else {\n dispatch({ type: \"FAILURE\", error: outcome.error as Throwable })\n }\n })\n\n return () => {\n cancelled.value = true\n tokenSource.cancel()\n }\n }, [...deps, refetchTick])\n\n const refetch = useCallback(() => forceRefetch(), [])\n\n return {\n ...state,\n isIdle: state._tag === \"Idle\",\n isPending: state._tag === \"Pending\",\n isSuccess: state._tag === \"Success\",\n isFailure: state._tag === \"Failure\",\n refetch,\n }\n}\n"],"mappings":"+JAYA,SAAS,EAAc,EAAyB,EAAuC,CAGrF,OAFI,EAAO,OAAS,UAAkB,CAAE,KAAM,SAAU,EACpD,EAAO,OAAS,UAAkB,CAAE,KAAM,UAAW,MAAO,EAAO,KAAM,EACtE,CAAE,KAAM,UAAW,MAAO,EAAO,KAAM,CAChD,CAqBA,SAAgB,EACd,EACA,EAC6B,CAC7B,GAAM,CAAC,EAAO,GAAY,EAAW,EAAuB,CAAE,KAAM,MAAO,CAAC,EACtE,CAAC,EAAa,GAAgB,EAAY,GAAc,EAAI,EAAG,CAAC,EAChE,EAAU,EAAO,CAAI,EAC3B,EAAQ,QAAU,EAElB,MAAgB,CACd,IAAM,EAAY,CAAE,MAAO,EAAM,EAC3B,EAAc,EAA8B,EAclD,OAbA,EAAS,CAAE,KAAM,SAAU,CAAC,EAE5B,EAAa,
|
|
1
|
+
{"version":3,"file":"useTask.js","names":[],"sources":["../../src/async/useTask.ts"],"sourcesContent":["\"use client\"\n\nimport { createCancellationTokenSource, Task, type Throwable } from \"functype\"\nimport { useCallback, useEffect, useReducer, useRef } from \"react\"\n\nimport type { TaskState } from \"./TaskState\"\n\ntype Action<E, A> =\n | { readonly type: \"PENDING\" }\n | { readonly type: \"SUCCESS\"; readonly value: A }\n | { readonly type: \"FAILURE\"; readonly error: E }\n\nfunction reducer<E, A>(_state: TaskState<E, A>, action: Action<E, A>): TaskState<E, A> {\n if (action.type === \"PENDING\") return { _tag: \"Pending\" }\n if (action.type === \"SUCCESS\") return { _tag: \"Success\", value: action.value }\n return { _tag: \"Failure\", error: action.error }\n}\n\nexport type UseTaskResult<E, A> = TaskState<E, A> & {\n readonly isIdle: boolean\n readonly isPending: boolean\n readonly isSuccess: boolean\n readonly isFailure: boolean\n refetch: () => void\n}\n\n/**\n * Run an async operation tied to a React component's lifecycle.\n *\n * - Returns a discriminated `TaskState<Throwable, A>` plus boolean flags and\n * a `refetch` trigger.\n * - The `task` callback receives an `AbortSignal` wired to a cancellation\n * token that fires when the component unmounts or `deps` change. Pass the\n * signal to `fetch` (or any abortable API) to cancel in-flight work.\n * - StrictMode-safe: the cleanup fn cancels the token and discards any\n * late-arriving result.\n */\nexport function useTask<A>(\n task: (signal: AbortSignal) => Promise<A> | A,\n deps: ReadonlyArray<unknown>,\n): UseTaskResult<Throwable, A> {\n const [state, dispatch] = useReducer(reducer<Throwable, A>, { _tag: \"Idle\" })\n const [refetchTick, forceRefetch] = useReducer((n: number) => n + 1, 0)\n const taskRef = useRef(task)\n taskRef.current = task\n\n useEffect(() => {\n const cancelled = { value: false }\n const tokenSource = createCancellationTokenSource()\n dispatch({ type: \"PENDING\" })\n\n void Task<A>()\n .Async<A>(() => taskRef.current(tokenSource.token.signal) as Promise<A>, undefined, undefined, tokenSource.token)\n .then((outcome) => {\n if (cancelled.value) return\n if (outcome.isOk()) {\n dispatch({ type: \"SUCCESS\", value: outcome.value as A })\n } else {\n dispatch({ type: \"FAILURE\", error: outcome.error as Throwable })\n }\n })\n\n return () => {\n cancelled.value = true\n tokenSource.cancel()\n }\n }, [...deps, refetchTick])\n\n const refetch = useCallback(() => forceRefetch(), [])\n\n return {\n ...state,\n isIdle: state._tag === \"Idle\",\n isPending: state._tag === \"Pending\",\n isSuccess: state._tag === \"Success\",\n isFailure: state._tag === \"Failure\",\n refetch,\n }\n}\n"],"mappings":"+JAYA,SAAS,EAAc,EAAyB,EAAuC,CAGrF,OAFI,EAAO,OAAS,UAAkB,CAAE,KAAM,SAAU,EACpD,EAAO,OAAS,UAAkB,CAAE,KAAM,UAAW,MAAO,EAAO,KAAM,EACtE,CAAE,KAAM,UAAW,MAAO,EAAO,KAAM,CAChD,CAqBA,SAAgB,EACd,EACA,EAC6B,CAC7B,GAAM,CAAC,EAAO,GAAY,EAAW,EAAuB,CAAE,KAAM,MAAO,CAAC,EACtE,CAAC,EAAa,GAAgB,EAAY,GAAc,EAAI,EAAG,CAAC,EAChE,EAAU,EAAO,CAAI,EAC3B,EAAQ,QAAU,EAElB,MAAgB,CACd,IAAM,EAAY,CAAE,MAAO,EAAM,EAC3B,EAAc,EAA8B,EAclD,OAbA,EAAS,CAAE,KAAM,SAAU,CAAC,EAE5B,EAAa,CAAC,CACX,UAAe,EAAQ,QAAQ,EAAY,MAAM,MAAM,EAAiB,IAAA,GAAW,IAAA,GAAW,EAAY,KAAK,CAAC,CAChH,KAAM,GAAY,CACb,EAAU,QACV,EAAQ,KAAK,EACf,EAAS,CAAE,KAAM,UAAW,MAAO,EAAQ,KAAW,CAAC,EAEvD,EAAS,CAAE,KAAM,UAAW,MAAO,EAAQ,KAAmB,CAAC,EAEnE,CAAC,MAEU,CACX,EAAU,MAAQ,GAClB,EAAY,OAAO,CACrB,CACF,EAAG,CAAC,GAAG,EAAM,CAAW,CAAC,EAEzB,IAAM,EAAU,MAAkB,EAAa,EAAG,CAAC,CAAC,EAEpD,MAAO,CACL,GAAG,EACH,OAAQ,EAAM,OAAS,OACvB,UAAW,EAAM,OAAS,UAC1B,UAAW,EAAM,OAAS,UAC1B,UAAW,EAAM,OAAS,UAC1B,SACF,CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTaskPromise.js","names":[],"sources":["../../src/async/useTaskPromise.ts"],"sourcesContent":["\"use client\"\n\nimport { createCancellationTokenSource, Task, type TaskOutcome } from \"functype\"\nimport { useMemo, useRef } from \"react\"\n\n/**\n * Returns a `Promise<TaskOutcome<A>>` that is stable across renders with the\n * same `deps`. Intended for consumers of React 19's `use()` hook — providing\n * a new promise reference on each render would infinite-suspend.\n *\n * The `task` callback is read through a ref, so the latest closure is invoked\n * even if it isn't included in `deps`. Encode in `deps` whatever semantically\n * changes the task's result.\n */\nexport function useTaskPromise<A>(\n task: (signal: AbortSignal) => Promise<A> | A,\n deps: ReadonlyArray<unknown>,\n): Promise<TaskOutcome<A>> {\n const taskRef = useRef(task)\n taskRef.current = task\n\n return useMemo(() => {\n const tokenSource = createCancellationTokenSource()\n return Task<A>().Async<A>(\n () => taskRef.current(tokenSource.token.signal) as Promise<A>,\n undefined,\n undefined,\n tokenSource.token,\n )\n }, deps)\n}\n"],"mappings":"4HAcA,SAAgB,EACd,EACA,EACyB,CACzB,IAAM,EAAU,EAAO,CAAI,EAG3B,MAFA,GAAQ,QAAU,EAEX,MAAc,CACnB,IAAM,EAAc,EAA8B,EAClD,OAAO,EAAQ,
|
|
1
|
+
{"version":3,"file":"useTaskPromise.js","names":[],"sources":["../../src/async/useTaskPromise.ts"],"sourcesContent":["\"use client\"\n\nimport { createCancellationTokenSource, Task, type TaskOutcome } from \"functype\"\nimport { useMemo, useRef } from \"react\"\n\n/**\n * Returns a `Promise<TaskOutcome<A>>` that is stable across renders with the\n * same `deps`. Intended for consumers of React 19's `use()` hook — providing\n * a new promise reference on each render would infinite-suspend.\n *\n * The `task` callback is read through a ref, so the latest closure is invoked\n * even if it isn't included in `deps`. Encode in `deps` whatever semantically\n * changes the task's result.\n */\nexport function useTaskPromise<A>(\n task: (signal: AbortSignal) => Promise<A> | A,\n deps: ReadonlyArray<unknown>,\n): Promise<TaskOutcome<A>> {\n const taskRef = useRef(task)\n taskRef.current = task\n\n return useMemo(() => {\n const tokenSource = createCancellationTokenSource()\n return Task<A>().Async<A>(\n () => taskRef.current(tokenSource.token.signal) as Promise<A>,\n undefined,\n undefined,\n tokenSource.token,\n )\n }, deps)\n}\n"],"mappings":"4HAcA,SAAgB,EACd,EACA,EACyB,CACzB,IAAM,EAAU,EAAO,CAAI,EAG3B,MAFA,GAAQ,QAAU,EAEX,MAAc,CACnB,IAAM,EAAc,EAA8B,EAClD,OAAO,EAAQ,CAAC,CAAC,UACT,EAAQ,QAAQ,EAAY,MAAM,MAAM,EAC9C,IAAA,GACA,IAAA,GACA,EAAY,KACd,CACF,EAAG,CAAI,CACT"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useStableCallback.js","names":[],"sources":["../../src/hooks/useStableCallback.ts"],"sourcesContent":["\"use client\"\n/* eslint-disable functype/prefer-option, functype/prefer-fold -- React hooks must accept idiomatic optional params and use ref-init sentinels; wrapping in Option would change the public API shape consumers expect. */\n\nimport { type DependencyList, useCallback, useRef } from \"react\"\n\nimport { type Eq, referenceEq } from \"./eq\"\n\n/**\n * Like `useCallback`, but only returns a new function when *some* dep has\n * changed under the supplied (or default) comparator.\n */\nexport function useStableCallback<F extends (...args: never[]) => unknown>(\n callback: F,\n deps: DependencyList,\n eqs?: ReadonlyArray<Eq<unknown> | undefined>,\n): F {\n const prev = useRef<DependencyList | null>(null)\n const tick = useRef(0)\n\n if (prev.current === null) {\n prev.current = deps\n tick.current += 1\n } else {\n const stale = prev.current\n const changed = deps.some((d, i) => {\n const cmp = eqs?.[i] ?? referenceEq\n return !cmp(stale[i], d)\n })\n if (changed) {\n prev.current = deps\n tick.current += 1\n }\n }\n\n return useCallback(callback, [tick.current]) as F\n}\n"],"mappings":"mGAWA,SAAgB,EACd,EACA,EACA,EACG,CACH,IAAM,EAAO,EAA8B,IAAI,EACzC,EAAO,EAAO,CAAC,EAErB,GAAI,EAAK,UAAY,KACnB,EAAK,QAAU,EACf,EAAK,SAAW,MACX,CACL,IAAM,EAAQ,EAAK,QACH,EAAK,MAAM,EAAG,IAErB,EADK,IAAM,IAAM,
|
|
1
|
+
{"version":3,"file":"useStableCallback.js","names":[],"sources":["../../src/hooks/useStableCallback.ts"],"sourcesContent":["\"use client\"\n/* eslint-disable functype/prefer-option, functype/prefer-fold -- React hooks must accept idiomatic optional params and use ref-init sentinels; wrapping in Option would change the public API shape consumers expect. */\n\nimport { type DependencyList, useCallback, useRef } from \"react\"\n\nimport { type Eq, referenceEq } from \"./eq\"\n\n/**\n * Like `useCallback`, but only returns a new function when *some* dep has\n * changed under the supplied (or default) comparator.\n */\nexport function useStableCallback<F extends (...args: never[]) => unknown>(\n callback: F,\n deps: DependencyList,\n eqs?: ReadonlyArray<Eq<unknown> | undefined>,\n): F {\n const prev = useRef<DependencyList | null>(null)\n const tick = useRef(0)\n\n if (prev.current === null) {\n prev.current = deps\n tick.current += 1\n } else {\n const stale = prev.current\n const changed = deps.some((d, i) => {\n const cmp = eqs?.[i] ?? referenceEq\n return !cmp(stale[i], d)\n })\n if (changed) {\n prev.current = deps\n tick.current += 1\n }\n }\n\n return useCallback(callback, [tick.current]) as F\n}\n"],"mappings":"mGAWA,SAAgB,EACd,EACA,EACA,EACG,CACH,IAAM,EAAO,EAA8B,IAAI,EACzC,EAAO,EAAO,CAAC,EAErB,GAAI,EAAK,UAAY,KACnB,EAAK,QAAU,EACf,EAAK,SAAW,MACX,CACL,IAAM,EAAQ,EAAK,QACH,EAAK,MAAM,EAAG,IAErB,EADK,IAAM,IAAM,EAAA,CACZ,EAAM,GAAI,CAAC,CAEf,IACR,EAAK,QAAU,EACf,EAAK,SAAW,EAEpB,CAEA,OAAO,EAAY,EAAU,CAAC,EAAK,OAAO,CAAC,CAC7C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useStableEffect.js","names":[],"sources":["../../src/hooks/useStableEffect.ts"],"sourcesContent":["\"use client\"\n/* eslint-disable functype/prefer-option, functype/prefer-fold -- React hooks must accept idiomatic optional params and use ref-init sentinels; wrapping in Option would change the public API shape consumers expect. */\n\nimport { type DependencyList, type EffectCallback, useEffect, useRef } from \"react\"\n\nimport { type Eq, referenceEq } from \"./eq\"\n\n/**\n * Like `useEffect`, but re-runs only when *some* dep has changed under the\n * supplied (or default) comparator. The `eqs` array is aligned positionally\n * with `deps`; missing entries fall back to `referenceEq`.\n *\n * Useful when deps include functype ADTs (`Option`, `Either`, etc.) whose\n * structural identity is what matters, but whose references churn every render.\n */\nexport function useStableEffect(\n effect: EffectCallback,\n deps: DependencyList,\n eqs?: ReadonlyArray<Eq<unknown> | undefined>,\n): void {\n const prev = useRef<DependencyList | null>(null)\n const tick = useRef(0)\n\n if (prev.current === null) {\n prev.current = deps\n tick.current += 1\n } else {\n const stale = prev.current\n const changed = deps.some((d, i) => {\n const cmp = eqs?.[i] ?? referenceEq\n return !cmp(stale[i], d)\n })\n if (changed) {\n prev.current = deps\n tick.current += 1\n }\n }\n\n useEffect(effect, [tick.current])\n}\n"],"mappings":"iGAeA,SAAgB,EACd,EACA,EACA,EACM,CACN,IAAM,EAAO,EAA8B,IAAI,EACzC,EAAO,EAAO,CAAC,EAErB,GAAI,EAAK,UAAY,KACnB,EAAK,QAAU,EACf,EAAK,SAAW,MACX,CACL,IAAM,EAAQ,EAAK,QACH,EAAK,MAAM,EAAG,IAErB,EADK,IAAM,IAAM,
|
|
1
|
+
{"version":3,"file":"useStableEffect.js","names":[],"sources":["../../src/hooks/useStableEffect.ts"],"sourcesContent":["\"use client\"\n/* eslint-disable functype/prefer-option, functype/prefer-fold -- React hooks must accept idiomatic optional params and use ref-init sentinels; wrapping in Option would change the public API shape consumers expect. */\n\nimport { type DependencyList, type EffectCallback, useEffect, useRef } from \"react\"\n\nimport { type Eq, referenceEq } from \"./eq\"\n\n/**\n * Like `useEffect`, but re-runs only when *some* dep has changed under the\n * supplied (or default) comparator. The `eqs` array is aligned positionally\n * with `deps`; missing entries fall back to `referenceEq`.\n *\n * Useful when deps include functype ADTs (`Option`, `Either`, etc.) whose\n * structural identity is what matters, but whose references churn every render.\n */\nexport function useStableEffect(\n effect: EffectCallback,\n deps: DependencyList,\n eqs?: ReadonlyArray<Eq<unknown> | undefined>,\n): void {\n const prev = useRef<DependencyList | null>(null)\n const tick = useRef(0)\n\n if (prev.current === null) {\n prev.current = deps\n tick.current += 1\n } else {\n const stale = prev.current\n const changed = deps.some((d, i) => {\n const cmp = eqs?.[i] ?? referenceEq\n return !cmp(stale[i], d)\n })\n if (changed) {\n prev.current = deps\n tick.current += 1\n }\n }\n\n useEffect(effect, [tick.current])\n}\n"],"mappings":"iGAeA,SAAgB,EACd,EACA,EACA,EACM,CACN,IAAM,EAAO,EAA8B,IAAI,EACzC,EAAO,EAAO,CAAC,EAErB,GAAI,EAAK,UAAY,KACnB,EAAK,QAAU,EACf,EAAK,SAAW,MACX,CACL,IAAM,EAAQ,EAAK,QACH,EAAK,MAAM,EAAG,IAErB,EADK,IAAM,IAAM,EAAA,CACZ,EAAM,GAAI,CAAC,CAEf,IACR,EAAK,QAAU,EACf,EAAK,SAAW,EAEpB,CAEA,EAAU,EAAQ,CAAC,EAAK,OAAO,CAAC,CAClC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useStableMemo.js","names":[],"sources":["../../src/hooks/useStableMemo.ts"],"sourcesContent":["\"use client\"\n/* eslint-disable functype/prefer-option, functype/prefer-fold -- React hooks must accept idiomatic optional params and use ref-init sentinels; wrapping in Option would change the public API shape consumers expect. */\n\nimport { type DependencyList, useMemo, useRef } from \"react\"\n\nimport { type Eq, referenceEq } from \"./eq\"\n\n/**\n * Like `useMemo`, but recomputes only when *some* dep has changed under the\n * supplied (or default) comparator. The `eqs` array is aligned positionally\n * with `deps`; missing entries fall back to `referenceEq`.\n */\nexport function useStableMemo<A>(\n factory: () => A,\n deps: DependencyList,\n eqs?: ReadonlyArray<Eq<unknown> | undefined>,\n): A {\n const prev = useRef<DependencyList | null>(null)\n const tick = useRef(0)\n\n if (prev.current === null) {\n prev.current = deps\n tick.current += 1\n } else {\n const stale = prev.current\n const changed = deps.some((d, i) => {\n const cmp = eqs?.[i] ?? referenceEq\n return !cmp(stale[i], d)\n })\n if (changed) {\n prev.current = deps\n tick.current += 1\n }\n }\n\n return useMemo(factory, [tick.current])\n}\n"],"mappings":"+FAYA,SAAgB,EACd,EACA,EACA,EACG,CACH,IAAM,EAAO,EAA8B,IAAI,EACzC,EAAO,EAAO,CAAC,EAErB,GAAI,EAAK,UAAY,KACnB,EAAK,QAAU,EACf,EAAK,SAAW,MACX,CACL,IAAM,EAAQ,EAAK,QACH,EAAK,MAAM,EAAG,IAErB,EADK,IAAM,IAAM,
|
|
1
|
+
{"version":3,"file":"useStableMemo.js","names":[],"sources":["../../src/hooks/useStableMemo.ts"],"sourcesContent":["\"use client\"\n/* eslint-disable functype/prefer-option, functype/prefer-fold -- React hooks must accept idiomatic optional params and use ref-init sentinels; wrapping in Option would change the public API shape consumers expect. */\n\nimport { type DependencyList, useMemo, useRef } from \"react\"\n\nimport { type Eq, referenceEq } from \"./eq\"\n\n/**\n * Like `useMemo`, but recomputes only when *some* dep has changed under the\n * supplied (or default) comparator. The `eqs` array is aligned positionally\n * with `deps`; missing entries fall back to `referenceEq`.\n */\nexport function useStableMemo<A>(\n factory: () => A,\n deps: DependencyList,\n eqs?: ReadonlyArray<Eq<unknown> | undefined>,\n): A {\n const prev = useRef<DependencyList | null>(null)\n const tick = useRef(0)\n\n if (prev.current === null) {\n prev.current = deps\n tick.current += 1\n } else {\n const stale = prev.current\n const changed = deps.some((d, i) => {\n const cmp = eqs?.[i] ?? referenceEq\n return !cmp(stale[i], d)\n })\n if (changed) {\n prev.current = deps\n tick.current += 1\n }\n }\n\n return useMemo(factory, [tick.current])\n}\n"],"mappings":"+FAYA,SAAgB,EACd,EACA,EACA,EACG,CACH,IAAM,EAAO,EAA8B,IAAI,EACzC,EAAO,EAAO,CAAC,EAErB,GAAI,EAAK,UAAY,KACnB,EAAK,QAAU,EACf,EAAK,SAAW,MACX,CACL,IAAM,EAAQ,EAAK,QACH,EAAK,MAAM,EAAG,IAErB,EADK,IAAM,IAAM,EAAA,CACZ,EAAM,GAAI,CAAC,CAEf,IACR,EAAK,QAAU,EACf,EAAK,SAAW,EAEpB,CAEA,OAAO,EAAQ,EAAS,CAAC,EAAK,OAAO,CAAC,CACxC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "functype-react",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "React bindings for functype — ADT-aware hooks and exhaustive pattern matching components",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"functype",
|
|
@@ -40,15 +40,15 @@
|
|
|
40
40
|
"@testing-library/jest-dom": "^6.9.1",
|
|
41
41
|
"@testing-library/react": "^16.3.2",
|
|
42
42
|
"@types/node": "^24.12.4",
|
|
43
|
-
"@types/react": "^19.2.
|
|
43
|
+
"@types/react": "^19.2.16",
|
|
44
44
|
"@types/react-dom": "^19.2.3",
|
|
45
45
|
"fast-check": "^4.8.0",
|
|
46
46
|
"jsdom": "^26.1.0",
|
|
47
|
-
"react": "^19.2.
|
|
48
|
-
"react-dom": "^19.2.
|
|
49
|
-
"ts-builds": "^2.8.
|
|
47
|
+
"react": "^19.2.7",
|
|
48
|
+
"react-dom": "^19.2.7",
|
|
49
|
+
"ts-builds": "^2.8.2",
|
|
50
50
|
"tsdown": "^0.22.1",
|
|
51
|
-
"functype": "^1.
|
|
51
|
+
"functype": "^1.3.0"
|
|
52
52
|
},
|
|
53
53
|
"type": "module",
|
|
54
54
|
"main": "./dist/index.js",
|