@dxos/effect-atom-solid 0.11.0 → 0.12.0-next-2be9f24c465d98f4bd186aa03ece788902e6c17a

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.
Files changed (49) hide show
  1. package/dist/lib/index.mjs +34 -25
  2. package/dist/lib/index.mjs.map +1 -1
  3. package/dist/types/src/hooks/useAtom.d.ts +3 -3
  4. package/dist/types/src/hooks/useAtom.d.ts.map +1 -1
  5. package/dist/types/src/hooks/useAtomInitialValues.d.ts +1 -1
  6. package/dist/types/src/hooks/useAtomInitialValues.d.ts.map +1 -1
  7. package/dist/types/src/hooks/useAtomMount.d.ts +1 -1
  8. package/dist/types/src/hooks/useAtomMount.d.ts.map +1 -1
  9. package/dist/types/src/hooks/useAtomRef.d.ts +1 -1
  10. package/dist/types/src/hooks/useAtomRef.d.ts.map +1 -1
  11. package/dist/types/src/hooks/useAtomRefresh.d.ts +1 -1
  12. package/dist/types/src/hooks/useAtomRefresh.d.ts.map +1 -1
  13. package/dist/types/src/hooks/useAtomResource.d.ts +4 -4
  14. package/dist/types/src/hooks/useAtomResource.d.ts.map +1 -1
  15. package/dist/types/src/hooks/useAtomSet.d.ts +7 -7
  16. package/dist/types/src/hooks/useAtomSet.d.ts.map +1 -1
  17. package/dist/types/src/hooks/useAtomSubscribe.d.ts +1 -1
  18. package/dist/types/src/hooks/useAtomSubscribe.d.ts.map +1 -1
  19. package/dist/types/src/hooks/useAtomSuspense.d.ts +3 -3
  20. package/dist/types/src/hooks/useAtomSuspense.d.ts.map +1 -1
  21. package/dist/types/src/hooks/useAtomValue.d.ts +1 -1
  22. package/dist/types/src/hooks/useAtomValue.d.ts.map +1 -1
  23. package/dist/types/src/index.d.ts +6 -6
  24. package/dist/types/src/index.d.ts.map +1 -1
  25. package/dist/types/src/registry.d.ts +7 -7
  26. package/dist/types/src/registry.d.ts.map +1 -1
  27. package/dist/types/tsconfig.tsbuildinfo +1 -1
  28. package/package.json +7 -6
  29. package/src/hooks/useAtom.test.tsx +1 -1
  30. package/src/hooks/useAtom.ts +3 -3
  31. package/src/hooks/useAtomInitialValues.test.tsx +1 -1
  32. package/src/hooks/useAtomInitialValues.ts +1 -1
  33. package/src/hooks/useAtomMount.ts +1 -1
  34. package/src/hooks/useAtomRef.ts +1 -1
  35. package/src/hooks/useAtomRefresh.test.tsx +1 -1
  36. package/src/hooks/useAtomRefresh.ts +1 -1
  37. package/src/hooks/useAtomResource.test.tsx +1 -1
  38. package/src/hooks/useAtomResource.ts +5 -5
  39. package/src/hooks/useAtomSet.test.tsx +1 -1
  40. package/src/hooks/useAtomSet.ts +11 -9
  41. package/src/hooks/useAtomSubscribe.test.tsx +1 -1
  42. package/src/hooks/useAtomSubscribe.ts +1 -1
  43. package/src/hooks/useAtomSuspense.test.tsx +4 -4
  44. package/src/hooks/useAtomSuspense.ts +3 -3
  45. package/src/hooks/useAtomValue.test.tsx +1 -1
  46. package/src/hooks/useAtomValue.ts +2 -2
  47. package/src/index.ts +6 -6
  48. package/src/registry.test.tsx +4 -4
  49. package/src/registry.ts +13 -11
@@ -1,11 +1,11 @@
1
- import * as AtomModule from "@effect-atom/atom/Atom";
2
- import * as Registry from "@effect-atom/atom/Registry";
3
- import * as Result from "@effect-atom/atom/Result";
4
- import * as AtomRef from "@effect-atom/atom/AtomRef";
5
- import * as AtomHttpApi from "@effect-atom/atom/AtomHttpApi";
6
- import * as AtomRpc from "@effect-atom/atom/AtomRpc";
1
+ import * as AtomModule from "effect/unstable/reactivity/Atom";
2
+ import * as AtomRegistry from "effect/unstable/reactivity/AtomRegistry";
3
+ import * as Result from "effect/unstable/reactivity/AsyncResult";
4
+ import * as AtomRef from "effect/unstable/reactivity/AtomRef";
5
+ import * as AtomHttpApi from "effect/unstable/reactivity/AtomHttpApi";
6
+ import * as AtomRpc from "effect/unstable/reactivity/AtomRpc";
7
7
  import { createContext, createEffect, createMemo, createResource, createSignal, onCleanup, useContext } from "solid-js";
8
- import * as GlobalValue from "effect/GlobalValue";
8
+ import { GlobalValue } from "@dxos/effect";
9
9
  import * as Cause from "effect/Cause";
10
10
  import * as Effect from "effect/Effect";
11
11
  import * as Exit from "effect/Exit";
@@ -13,7 +13,7 @@ import * as Exit from "effect/Exit";
13
13
  /**
14
14
  * Default registry instance
15
15
  */
16
- var defaultRegistry = GlobalValue.globalValue("@effect-atom/atom-solid/defaultRegistry", () => Registry.make());
16
+ var defaultRegistry = GlobalValue.globalValue("@dxos/effect-atom-solid/defaultRegistry", () => AtomRegistry.make());
17
17
  /**
18
18
  * Solid context for the atom registry
19
19
  */
@@ -25,7 +25,7 @@ var useRegistry = () => {
25
25
  return useContext(RegistryContext);
26
26
  };
27
27
  function RegistryProvider(props) {
28
- const registry = props.registry ?? Registry.make({
28
+ const registry = props.registry ?? AtomRegistry.make({
29
29
  scheduleTask: props.scheduleTask,
30
30
  initialValues: props.initialValues,
31
31
  timeoutResolution: props.timeoutResolution,
@@ -60,9 +60,10 @@ function useAtomValue(atom, f) {
60
60
  createEffect(() => {
61
61
  const currentAtom = resolvedAtom();
62
62
  setValue(() => registry.get(currentAtom));
63
- onCleanup(registry.subscribe(currentAtom, (nextValue) => {
63
+ const unsubscribe = registry.subscribe(currentAtom, (nextValue) => {
64
64
  setValue(() => nextValue);
65
- }, { immediate: true }));
65
+ }, { immediate: true });
66
+ onCleanup(unsubscribe);
66
67
  });
67
68
  return value;
68
69
  }
@@ -75,7 +76,7 @@ var flattenExit = (exit) => {
75
76
  function createSetAtom(registry, atom, options) {
76
77
  if (options?.mode === "promise" || options?.mode === "promiseExit") return ((value) => {
77
78
  registry.set(atom, value);
78
- const promise = Effect.runPromiseExit(Registry.getResult(registry, atom, { suspendOnWaiting: true }));
79
+ const promise = Effect.runPromiseExit(AtomRegistry.getResult(registry, atom, { suspendOnWaiting: true }));
79
80
  return options.mode === "promise" ? promise.then(flattenExit) : promise;
80
81
  });
81
82
  return ((value) => {
@@ -88,7 +89,8 @@ function createSetAtom(registry, atom, options) {
88
89
  */
89
90
  function useAtomSet(atom, options) {
90
91
  const registry = useRegistry();
91
- onCleanup(registry.mount(atom));
92
+ const unmount = registry.mount(atom);
93
+ onCleanup(unmount);
92
94
  return createSetAtom(registry, atom, options);
93
95
  }
94
96
  //#endregion
@@ -100,9 +102,10 @@ function useAtomSet(atom, options) {
100
102
  function useAtom(atom, options) {
101
103
  const registry = useRegistry();
102
104
  const [value, setValue] = createSignal(registry.get(atom));
103
- onCleanup(registry.subscribe(atom, (nextValue) => {
105
+ const unsubscribe = registry.subscribe(atom, (nextValue) => {
104
106
  setValue(() => nextValue);
105
- }, { immediate: true }));
107
+ }, { immediate: true });
108
+ onCleanup(unsubscribe);
106
109
  return [value, createSetAtom(registry, atom, options)];
107
110
  }
108
111
  //#endregion
@@ -111,7 +114,8 @@ function useAtom(atom, options) {
111
114
  * Hook to mount an atom without reading its value
112
115
  */
113
116
  function useAtomMount(atom) {
114
- onCleanup(useRegistry().mount(atom));
117
+ const unmount = useRegistry().mount(atom);
118
+ onCleanup(unmount);
115
119
  }
116
120
  //#endregion
117
121
  //#region src/hooks/useAtomRefresh.ts
@@ -120,7 +124,8 @@ function useAtomMount(atom) {
120
124
  */
121
125
  function useAtomRefresh(atom) {
122
126
  const registry = useRegistry();
123
- onCleanup(registry.mount(atom));
127
+ const unmount = registry.mount(atom);
128
+ onCleanup(unmount);
124
129
  return () => registry.refresh(atom);
125
130
  }
126
131
  //#endregion
@@ -129,7 +134,8 @@ function useAtomRefresh(atom) {
129
134
  * Hook to subscribe to atom changes with a callback
130
135
  */
131
136
  function useAtomSubscribe(atom, f, options) {
132
- onCleanup(useRegistry().subscribe(atom, f, options));
137
+ const unsubscribe = useRegistry().subscribe(atom, f, options);
138
+ onCleanup(unsubscribe);
133
139
  }
134
140
  //#endregion
135
141
  //#region src/hooks/useAtomRef.ts
@@ -138,9 +144,10 @@ function useAtomSubscribe(atom, f, options) {
138
144
  */
139
145
  function useAtomRef(ref) {
140
146
  const [value, setValue] = createSignal(ref.value);
141
- onCleanup(ref.subscribe((next) => {
147
+ const unsubscribe = ref.subscribe((next) => {
142
148
  setValue(() => next);
143
- }));
149
+ });
150
+ onCleanup(unsubscribe);
144
151
  return value;
145
152
  }
146
153
  /**
@@ -164,9 +171,10 @@ function useAtomRefPropValue(ref, prop) {
164
171
  function useAtomResource(atom) {
165
172
  const registry = useRegistry();
166
173
  const [result, setResult] = createSignal(registry.get(atom));
167
- onCleanup(registry.subscribe(atom, (nextValue) => {
174
+ const unsubscribe = registry.subscribe(atom, (nextValue) => {
168
175
  setResult(() => nextValue);
169
- }, { immediate: true }));
176
+ }, { immediate: true });
177
+ onCleanup(unsubscribe);
170
178
  return {
171
179
  value: createMemo(() => {
172
180
  const r = result();
@@ -206,11 +214,12 @@ function useAtomSuspense(atom) {
206
214
  });
207
215
  });
208
216
  });
209
- onCleanup(registry.subscribe(atom, (next) => {
217
+ const unsubscribe = registry.subscribe(atom, (next) => {
210
218
  if (next._tag === "Success") mutate(() => next.value);
211
219
  else if (next._tag === "Failure") refetch();
212
220
  else if (next._tag === "Initial" || next.waiting) refetch();
213
- }));
221
+ });
222
+ onCleanup(unsubscribe);
214
223
  return () => {
215
224
  const value = data();
216
225
  if (value === void 0) {}
@@ -227,6 +236,6 @@ function useAtomInitialValues(initialValues) {
227
236
  for (const [atom, value] of initialValues) registry.set(atom, value);
228
237
  }
229
238
  //#endregion
230
- export { AtomModule as Atom, AtomHttpApi, AtomRef, AtomRpc, Registry, RegistryContext, RegistryProvider, Result, createSetAtom, defaultRegistry, useAtom, useAtomInitialValues, useAtomMount, useAtomRef, useAtomRefProp, useAtomRefPropValue, useAtomRefresh, useAtomResource, useAtomSet, useAtomSubscribe, useAtomSuspense, useAtomValue, useRegistry };
239
+ export { AtomModule as Atom, AtomHttpApi, AtomRef, AtomRpc, AtomRegistry as Registry, RegistryContext, RegistryProvider, Result, createSetAtom, defaultRegistry, useAtom, useAtomInitialValues, useAtomMount, useAtomRef, useAtomRefProp, useAtomRefPropValue, useAtomRefresh, useAtomResource, useAtomSet, useAtomSubscribe, useAtomSuspense, useAtomValue, useRegistry };
231
240
 
232
241
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../../src/registry.ts","../../src/hooks/useAtomValue.ts","../../src/hooks/useAtomSet.ts","../../src/hooks/useAtom.ts","../../src/hooks/useAtomMount.ts","../../src/hooks/useAtomRefresh.ts","../../src/hooks/useAtomSubscribe.ts","../../src/hooks/useAtomRef.ts","../../src/hooks/useAtomResource.ts","../../src/hooks/useAtomSuspense.ts","../../src/hooks/useAtomInitialValues.ts"],"sourcesContent":["//\n// Copyright 2025 DXOS.org\n//\n\nimport type * as Atom from '@effect-atom/atom/Atom';\nimport * as Registry from '@effect-atom/atom/Registry';\nimport * as GlobalValue from 'effect/GlobalValue';\nimport { type Context, createContext, onCleanup, useContext } from 'solid-js';\n\n/**\n * Default registry instance\n */\nexport const defaultRegistry: Registry.Registry = GlobalValue.globalValue(\n '@effect-atom/atom-solid/defaultRegistry',\n () => Registry.make(),\n);\n\n/**\n * Solid context for the atom registry\n */\nexport const RegistryContext: Context<Registry.Registry> = createContext<Registry.Registry>(defaultRegistry);\n\n/**\n * Get the current registry from context\n */\nexport const useRegistry = (): Registry.Registry => {\n return useContext(RegistryContext);\n};\n\n/**\n * Provider component for custom registry\n */\nexport interface RegistryProviderProps {\n children: any;\n registry?: Registry.Registry;\n initialValues?: Iterable<readonly [Atom.Atom<any>, any]>;\n scheduleTask?: (f: () => void) => void;\n timeoutResolution?: number;\n defaultIdleTTL?: number;\n}\n\nexport function RegistryProvider(props: RegistryProviderProps) {\n const registry =\n props.registry ??\n Registry.make({\n scheduleTask: props.scheduleTask,\n initialValues: props.initialValues,\n timeoutResolution: props.timeoutResolution,\n defaultIdleTTL: props.defaultIdleTTL ?? 400,\n });\n\n onCleanup(() => {\n // Delay disposal to allow for component re-mounting\n const timeout = setTimeout(() => {\n registry.dispose();\n }, 500);\n return () => clearTimeout(timeout);\n });\n\n return RegistryContext.Provider({\n value: registry,\n get children() {\n return props.children;\n },\n });\n}\n","//\n// Copyright 2025 DXOS.org\n//\n\nimport type * as Atom from '@effect-atom/atom/Atom';\nimport * as AtomModule from '@effect-atom/atom/Atom';\nimport { type Accessor, createEffect, createMemo, createSignal, onCleanup } from 'solid-js';\n\nimport { useRegistry } from '../registry';\n\n/**\n * A value that may be a static value or a reactive accessor.\n */\ntype MaybeAccessor<T> = T | Accessor<T>;\n\n/**\n * Resolves a MaybeAccessor to its value.\n */\nconst access = <T>(value: MaybeAccessor<T>): T => (typeof value === 'function' ? (value as Accessor<T>)() : value);\n\n/**\n * Hook to read the value of an atom.\n * The returned accessor will update whenever the atom's value changes.\n * The atom parameter can be reactive (MaybeAccessor) - if the atom changes,\n * the hook will automatically unsubscribe from the old atom and subscribe to the new one.\n */\nexport function useAtomValue<A>(atom: MaybeAccessor<Atom.Atom<A>>): Accessor<A>;\nexport function useAtomValue<A, B>(atom: MaybeAccessor<Atom.Atom<A>>, f: (a: A) => B): Accessor<B>;\nexport function useAtomValue<A>(atom: MaybeAccessor<Atom.Atom<A>>, f?: (a: A) => A): Accessor<A> {\n const registry = useRegistry();\n\n // Resolve the atom reactively and apply mapping if provided.\n const resolvedAtom = createMemo(() => {\n const a = access(atom);\n return f ? AtomModule.map(a, f) : a;\n });\n\n const [value, setValue] = createSignal<A>(registry.get(resolvedAtom()));\n\n // Subscribe to atom changes reactively - re-subscribes when atom changes.\n createEffect(() => {\n const currentAtom = resolvedAtom();\n setValue(() => registry.get(currentAtom));\n\n const unsubscribe = registry.subscribe(\n currentAtom,\n (nextValue) => {\n setValue(() => nextValue);\n },\n { immediate: true },\n );\n\n onCleanup(unsubscribe);\n });\n\n return value;\n}\n","//\n// Copyright 2025 DXOS.org\n//\n\nimport type * as Atom from '@effect-atom/atom/Atom';\nimport * as Registry from '@effect-atom/atom/Registry';\nimport type * as Result from '@effect-atom/atom/Result';\nimport * as Cause from 'effect/Cause';\nimport * as Effect from 'effect/Effect';\nimport * as Exit from 'effect/Exit';\nimport { onCleanup } from 'solid-js';\n\nimport { useRegistry } from '../registry';\n\nconst flattenExit = <A, E>(exit: Exit.Exit<A, E>): A => {\n if (Exit.isSuccess(exit)) {\n return exit.value;\n }\n throw Cause.squash(exit.cause);\n};\n\nexport type SetAtomFn<R, W, Mode extends 'value' | 'promise' | 'promiseExit'> = 'promise' extends Mode\n ? (value: W) => Promise<Result.Result.Success<R>>\n : 'promiseExit' extends Mode\n ? (value: W) => Promise<Exit.Exit<Result.Result.Success<R>, Result.Result.Failure<R>>>\n : (value: W | ((value: R) => W)) => void;\n\nexport function createSetAtom<R, W, Mode extends 'value' | 'promise' | 'promiseExit' = never>(\n registry: Registry.Registry,\n atom: Atom.Writable<R, W>,\n options?: {\n readonly mode?: ([R] extends [Result.Result<any, any>] ? Mode : 'value') | undefined;\n },\n): SetAtomFn<R, W, Mode> {\n if (options?.mode === 'promise' || options?.mode === 'promiseExit') {\n return ((value: W) => {\n registry.set(atom, value);\n const promise = Effect.runPromiseExit(\n Registry.getResult(registry, atom as Atom.Atom<Result.Result<any, any>>, { suspendOnWaiting: true }),\n );\n return options!.mode === 'promise' ? promise.then(flattenExit) : promise;\n }) as SetAtomFn<R, W, Mode>;\n }\n return ((value: W | ((value: R) => W)) => {\n registry.set(atom, typeof value === 'function' ? (value as any)(registry.get(atom)) : value);\n }) as SetAtomFn<R, W, Mode>;\n}\n\n/**\n * Hook to get a setter function for an atom\n * Also mounts the atom in the registry\n */\nexport function useAtomSet<R, W, Mode extends 'value' | 'promise' | 'promiseExit' = never>(\n atom: Atom.Writable<R, W>,\n options?: {\n readonly mode?: ([R] extends [Result.Result<any, any>] ? Mode : 'value') | undefined;\n },\n): SetAtomFn<R, W, Mode> {\n const registry = useRegistry();\n\n // Mount the atom\n const unmount = registry.mount(atom);\n onCleanup(unmount);\n\n return createSetAtom(registry, atom, options);\n}\n","//\n// Copyright 2025 DXOS.org\n//\n\nimport type * as Atom from '@effect-atom/atom/Atom';\nimport type * as Result from '@effect-atom/atom/Result';\nimport { type Accessor, createSignal, onCleanup } from 'solid-js';\n\nimport { useRegistry } from '../registry';\nimport { type SetAtomFn, createSetAtom } from './useAtomSet';\n\n/**\n * Hook to both read and write an atom\n * Returns a tuple of [value accessor, setter function]\n */\nexport function useAtom<R, W, Mode extends 'value' | 'promise' | 'promiseExit' = never>(\n atom: Atom.Writable<R, W>,\n options?: {\n readonly mode?: ([R] extends [Result.Result<any, any>] ? Mode : 'value') | undefined;\n },\n): readonly [Accessor<R>, SetAtomFn<R, W, Mode>] {\n const registry = useRegistry();\n\n const [value, setValue] = createSignal<R>(registry.get(atom));\n\n // Subscribe to atom changes\n const unsubscribe = registry.subscribe(\n atom,\n (nextValue) => {\n setValue(() => nextValue);\n },\n { immediate: true },\n );\n\n onCleanup(unsubscribe);\n\n return [value, createSetAtom(registry, atom, options)] as const;\n}\n","//\n// Copyright 2025 DXOS.org\n//\n\nimport type * as Atom from '@effect-atom/atom/Atom';\nimport { onCleanup } from 'solid-js';\n\nimport { useRegistry } from '../registry';\n\n/**\n * Hook to mount an atom without reading its value\n */\nexport function useAtomMount<A>(atom: Atom.Atom<A>): void {\n const registry = useRegistry();\n const unmount = registry.mount(atom);\n onCleanup(unmount);\n}\n","//\n// Copyright 2025 DXOS.org\n//\n\nimport type * as Atom from '@effect-atom/atom/Atom';\nimport { onCleanup } from 'solid-js';\n\nimport { useRegistry } from '../registry';\n\n/**\n * Hook to get a refresh function for an atom\n */\nexport function useAtomRefresh<A>(atom: Atom.Atom<A>): () => void {\n const registry = useRegistry();\n\n const unmount = registry.mount(atom);\n onCleanup(unmount);\n\n return () => registry.refresh(atom);\n}\n","//\n// Copyright 2025 DXOS.org\n//\n\nimport type * as Atom from '@effect-atom/atom/Atom';\nimport { onCleanup } from 'solid-js';\n\nimport { useRegistry } from '../registry';\n\n/**\n * Hook to subscribe to atom changes with a callback\n */\nexport function useAtomSubscribe<A>(\n atom: Atom.Atom<A>,\n f: (value: A) => void,\n options?: { readonly immediate?: boolean },\n): void {\n const registry = useRegistry();\n\n const unsubscribe = registry.subscribe(atom, f, options);\n onCleanup(unsubscribe);\n}\n","//\n// Copyright 2025 DXOS.org\n//\n\nimport type * as AtomRef from '@effect-atom/atom/AtomRef';\nimport { type Accessor, createMemo, createSignal, onCleanup } from 'solid-js';\n\n/**\n * Hook to read an AtomRef value\n */\nexport function useAtomRef<A>(ref: AtomRef.ReadonlyRef<A>): Accessor<A> {\n const [value, setValue] = createSignal<A>(ref.value);\n\n const unsubscribe = ref.subscribe((next) => {\n setValue(() => next);\n });\n\n onCleanup(unsubscribe);\n\n return value;\n}\n\n/**\n * Hook to get a prop accessor from an AtomRef\n */\nexport function useAtomRefProp<A, K extends keyof A>(ref: AtomRef.AtomRef<A>, prop: K): AtomRef.AtomRef<A[K]> {\n return createMemo(() => ref.prop(prop))();\n}\n\n/**\n * Hook to read a prop value from an AtomRef\n */\nexport function useAtomRefPropValue<A, K extends keyof A>(ref: AtomRef.AtomRef<A>, prop: K): Accessor<A[K]> {\n return useAtomRef(useAtomRefProp(ref, prop));\n}\n","//\n// Copyright 2025 DXOS.org\n//\n\nimport type * as Atom from '@effect-atom/atom/Atom';\nimport type * as Result from '@effect-atom/atom/Result';\nimport * as Cause from 'effect/Cause';\nimport { type Accessor, createMemo, createSignal, onCleanup } from 'solid-js';\n\nimport { useRegistry } from '../registry';\n\n/**\n * Resource-like hook for atoms that contain Result values\n * Automatically handles loading and error states\n */\nexport function useAtomResource<A, E>(\n atom: Atom.Atom<Result.Result<A, E>>,\n): {\n value: Accessor<A | undefined>;\n error: Accessor<E | undefined>;\n loading: Accessor<boolean>;\n result: Accessor<Result.Result<A, E>>;\n} {\n const registry = useRegistry();\n const [result, setResult] = createSignal<Result.Result<A, E>>(registry.get(atom));\n\n const unsubscribe = registry.subscribe(\n atom,\n (nextValue) => {\n setResult(() => nextValue);\n },\n { immediate: true },\n );\n\n onCleanup(unsubscribe);\n\n const value = createMemo(() => {\n const r = result();\n return r._tag === 'Success' ? r.value : undefined;\n });\n\n const error = createMemo(() => {\n const r = result();\n return r._tag === 'Failure' ? (Cause.squash(r.cause) as E) : undefined;\n });\n\n const loading = createMemo(() => {\n const r = result();\n return r._tag === 'Initial' || r.waiting;\n });\n\n return {\n value,\n error,\n loading,\n result,\n };\n}\n","//\n// Copyright 2025 DXOS.org\n//\n\nimport type * as Atom from '@effect-atom/atom/Atom';\nimport type * as Result from '@effect-atom/atom/Result';\nimport { createResource, onCleanup } from 'solid-js';\n\nimport { useRegistry } from '../registry';\n\n/**\n * Hook to read an atom value with Suspense support\n */\nexport function useAtomSuspense<A, E>(atom: Atom.Atom<Result.Result<A, E>>): () => A {\n const registry = useRegistry();\n\n const [data, { mutate, refetch }] = createResource(async () => {\n // Check if we already have a value\n const current = registry.get(atom);\n if (current._tag === 'Success') {\n return current.value;\n }\n if (current._tag === 'Failure') {\n throw current.cause;\n }\n\n // Wait for the next success or failure\n return new Promise<A>((resolve, reject) => {\n const unsubscribe = registry.subscribe(atom, (next) => {\n if (next._tag === 'Success') {\n unsubscribe();\n resolve(next.value);\n } else if (next._tag === 'Failure') {\n unsubscribe();\n reject(next.cause);\n }\n });\n // Note: We might want to handle cancellation if the resource is disposed?\n // But creating a promise that leaks isn't great.\n // Ideally we tie this to the component, but the promise itself is localized.\n });\n });\n\n // Subscribe to updates to keep the resource fresh\n const unsubscribe = registry.subscribe(atom, (next) => {\n if (next._tag === 'Success') {\n mutate(() => next.value);\n } else if (next._tag === 'Failure') {\n // If we encounter a failure, we trigger a refetch which will hit the fetcher\n // and throw the error (reject the promise)\n // Or we could try to mutate error state?\n // createResource doesn't have a direct 'setError'.\n // Refetching is the safe bet to re-enter the promise/error flow.\n void refetch();\n } else if (next._tag === 'Initial' || (next as any).waiting) {\n // If we go back to loading, refetch to suspend\n void refetch();\n }\n });\n\n onCleanup(unsubscribe);\n\n return () => {\n const value = data();\n if (value === undefined) {\n // This case handles when the resource is loading initially\n // createResource reads undefined (or initial value) when loading if strict mode isn't on for types,\n // but wrapping it ensures we signal \"read\" to Suspense.\n // However, data() itself should trigger Suspense if loading.\n // We assume standard Suspense behavior.\n }\n return value as A;\n };\n}\n","//\n// Copyright 2025 DXOS.org\n//\n\nimport type * as Atom from '@effect-atom/atom/Atom';\n\nimport { useRegistry } from '../registry';\n\n/**\n * Hook to initialize atoms with values\n */\nexport function useAtomInitialValues(initialValues: Iterable<readonly [Atom.Writable<any, any>, any]>): void {\n const registry = useRegistry();\n\n for (const [atom, value] of initialValues) {\n registry.set(atom, value);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;AAYA,IAAa,kBAAqC,YAAY,YAC5D,iDACM,SAAS,KAAK,CACtB;;;;AAKA,IAAa,kBAA8C,cAAiC,eAAe;;;;AAK3G,IAAa,oBAAuC;CAClD,OAAO,WAAW,eAAe;AACnC;AAcA,SAAgB,iBAAiB,OAA8B;CAC7D,MAAM,WACJ,MAAM,YACN,SAAS,KAAK;EACZ,cAAc,MAAM;EACpB,eAAe,MAAM;EACrB,mBAAmB,MAAM;EACzB,gBAAgB,MAAM,kBAAkB;CAC1C,CAAC;CAEH,gBAAgB;EAEd,MAAM,UAAU,iBAAiB;GAC/B,SAAS,QAAQ;EACnB,GAAG,GAAG;EACN,aAAa,aAAa,OAAO;CACnC,CAAC;CAED,OAAO,gBAAgB,SAAS;EAC9B,OAAO;EACP,IAAI,WAAW;GACb,OAAO,MAAM;EACf;CACF,CAAC;AACH;;;;;;AC/CA,IAAM,UAAa,UAAgC,OAAO,UAAU,aAAc,MAAsB,IAAI;AAU5G,SAAgB,aAAgB,MAAmC,GAA8B;CAC/F,MAAM,WAAW,YAAY;CAG7B,MAAM,eAAe,iBAAiB;EACpC,MAAM,IAAI,OAAO,IAAI;EACrB,OAAO,IAAI,WAAW,IAAI,GAAG,CAAC,IAAI;CACpC,CAAC;CAED,MAAM,CAAC,OAAO,YAAY,aAAgB,SAAS,IAAI,aAAa,CAAC,CAAC;CAG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,CAAC,MAAM,EAAE,QAAQ,aAAa,eAAe,YAAY;EAE7D,MAAM,UAAU,SAAS,IAAI,IAAI;EACjC,IAAI,QAAQ,SAAS,WACnB,OAAO,QAAQ;EAEjB,IAAI,QAAQ,SAAS,WACnB,MAAM,QAAQ;EAIhB,OAAO,IAAI,SAAY,SAAS,WAAW;GACzC,MAAM,cAAc,SAAS,UAAU,OAAO,SAAS;IACrD,IAAI,KAAK,SAAS,WAAW;KAC3B,YAAY;KACZ,QAAQ,KAAK,KAAK;IACpB,OAAO,IAAI,KAAK,SAAS,WAAW;KAClC,YAAY;KACZ,OAAO,KAAK,KAAK;IACnB;GACF,CAAC;EAIH,CAAC;CACH,CAAC;CAmBD,UAhBoB,SAAS,UAAU,OAAO,SAAS;EACrD,IAAI,KAAK,SAAS,WAChB,aAAa,KAAK,KAAK;OAClB,IAAI,KAAK,SAAS,WAMvB,QAAa;OACR,IAAI,KAAK,SAAS,aAAc,KAAa,SAElD,QAAa;CAEjB,CAEU,CAAW;CAErB,aAAa;EACX,MAAM,QAAQ,KAAK;EACnB,IAAI,UAAU,KAAA,GAAW,CAMzB;EACA,OAAO;CACT;AACF;;;;;;AC9DA,SAAgB,qBAAqB,eAAwE;CAC3G,MAAM,WAAW,YAAY;CAE7B,KAAK,MAAM,CAAC,MAAM,UAAU,eAC1B,SAAS,IAAI,MAAM,KAAK;AAE5B"}
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../../src/registry.ts","../../src/hooks/useAtomValue.ts","../../src/hooks/useAtomSet.ts","../../src/hooks/useAtom.ts","../../src/hooks/useAtomMount.ts","../../src/hooks/useAtomRefresh.ts","../../src/hooks/useAtomSubscribe.ts","../../src/hooks/useAtomRef.ts","../../src/hooks/useAtomResource.ts","../../src/hooks/useAtomSuspense.ts","../../src/hooks/useAtomInitialValues.ts"],"sourcesContent":["//\n// Copyright 2025 DXOS.org\n//\n\nimport type * as Atom from 'effect/unstable/reactivity/Atom';\nimport * as AtomRegistry from 'effect/unstable/reactivity/AtomRegistry';\nimport { type Context, createContext, onCleanup, useContext } from 'solid-js';\n\nimport { GlobalValue } from '@dxos/effect';\n\n/**\n * Default registry instance\n */\nexport const defaultRegistry: AtomRegistry.AtomRegistry = GlobalValue.globalValue(\n '@dxos/effect-atom-solid/defaultRegistry',\n () => AtomRegistry.make(),\n);\n\n/**\n * Solid context for the atom registry\n */\nexport const RegistryContext: Context<AtomRegistry.AtomRegistry> =\n createContext<AtomRegistry.AtomRegistry>(defaultRegistry);\n\n/**\n * Get the current registry from context\n */\nexport const useRegistry = (): AtomRegistry.AtomRegistry => {\n return useContext(RegistryContext);\n};\n\n/**\n * Provider component for custom registry\n */\nexport interface RegistryProviderProps {\n children: any;\n registry?: AtomRegistry.AtomRegistry;\n initialValues?: Iterable<readonly [Atom.Atom<any>, any]>;\n scheduleTask?: (f: () => void) => () => void;\n timeoutResolution?: number;\n defaultIdleTTL?: number;\n}\n\nexport function RegistryProvider(props: RegistryProviderProps) {\n const registry =\n props.registry ??\n AtomRegistry.make({\n scheduleTask: props.scheduleTask,\n initialValues: props.initialValues,\n timeoutResolution: props.timeoutResolution,\n defaultIdleTTL: props.defaultIdleTTL ?? 400,\n });\n\n onCleanup(() => {\n // Delay disposal to allow for component re-mounting\n const timeout = setTimeout(() => {\n registry.dispose();\n }, 500);\n return () => clearTimeout(timeout);\n });\n\n return RegistryContext.Provider({\n value: registry,\n get children() {\n return props.children;\n },\n });\n}\n","//\n// Copyright 2025 DXOS.org\n//\n\nimport type * as Atom from 'effect/unstable/reactivity/Atom';\nimport * as AtomModule from 'effect/unstable/reactivity/Atom';\nimport { type Accessor, createEffect, createMemo, createSignal, onCleanup } from 'solid-js';\n\nimport { useRegistry } from '../registry';\n\n/**\n * A value that may be a static value or a reactive accessor.\n */\ntype MaybeAccessor<T> = T | Accessor<T>;\n\n/**\n * Resolves a MaybeAccessor to its value.\n */\nconst access = <T>(value: MaybeAccessor<T>): T => (typeof value === 'function' ? (value as Accessor<T>)() : value);\n\n/**\n * Hook to read the value of an atom.\n * The returned accessor will update whenever the atom's value changes.\n * The atom parameter can be reactive (MaybeAccessor) - if the atom changes,\n * the hook will automatically unsubscribe from the old atom and subscribe to the new one.\n */\nexport function useAtomValue<A>(atom: MaybeAccessor<Atom.Atom<A>>): Accessor<A>;\nexport function useAtomValue<A, B>(atom: MaybeAccessor<Atom.Atom<A>>, f: (a: A) => B): Accessor<B>;\nexport function useAtomValue<A>(atom: MaybeAccessor<Atom.Atom<A>>, f?: (a: A) => A): Accessor<A> {\n const registry = useRegistry();\n\n // Resolve the atom reactively and apply mapping if provided.\n const resolvedAtom = createMemo(() => {\n const a = access(atom);\n return f ? AtomModule.map(a, f) : a;\n });\n\n const [value, setValue] = createSignal<A>(registry.get(resolvedAtom()));\n\n // Subscribe to atom changes reactively - re-subscribes when atom changes.\n createEffect(() => {\n const currentAtom = resolvedAtom();\n setValue(() => registry.get(currentAtom));\n\n const unsubscribe = registry.subscribe(\n currentAtom,\n (nextValue) => {\n setValue(() => nextValue);\n },\n { immediate: true },\n );\n\n onCleanup(unsubscribe);\n });\n\n return value;\n}\n","//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Cause from 'effect/Cause';\nimport * as Effect from 'effect/Effect';\nimport * as Exit from 'effect/Exit';\nimport type * as AsyncResult from 'effect/unstable/reactivity/AsyncResult';\nimport type * as Atom from 'effect/unstable/reactivity/Atom';\nimport * as AtomRegistry from 'effect/unstable/reactivity/AtomRegistry';\nimport { onCleanup } from 'solid-js';\n\nimport { useRegistry } from '../registry';\n\nconst flattenExit = <A, E>(exit: Exit.Exit<A, E>): A => {\n if (Exit.isSuccess(exit)) {\n return exit.value;\n }\n throw Cause.squash(exit.cause);\n};\n\nexport type SetAtomFn<R, W, Mode extends 'value' | 'promise' | 'promiseExit'> = 'promise' extends Mode\n ? (value: W) => Promise<AsyncResult.AsyncResult.Success<R>>\n : 'promiseExit' extends Mode\n ? (value: W) => Promise<Exit.Exit<AsyncResult.AsyncResult.Success<R>, AsyncResult.AsyncResult.Failure<R>>>\n : (value: W | ((value: R) => W)) => void;\n\nexport function createSetAtom<R, W, Mode extends 'value' | 'promise' | 'promiseExit' = never>(\n registry: AtomRegistry.AtomRegistry,\n atom: Atom.Writable<R, W>,\n options?: {\n readonly mode?: ([R] extends [AsyncResult.AsyncResult<any, any>] ? Mode : 'value') | undefined;\n },\n): SetAtomFn<R, W, Mode> {\n if (options?.mode === 'promise' || options?.mode === 'promiseExit') {\n return ((value: W) => {\n registry.set(atom, value);\n const promise = Effect.runPromiseExit(\n AtomRegistry.getResult(registry, atom as Atom.Atom<AsyncResult.AsyncResult<any, any>>, {\n suspendOnWaiting: true,\n }),\n );\n return options!.mode === 'promise' ? promise.then(flattenExit) : promise;\n }) as SetAtomFn<R, W, Mode>;\n }\n return ((value: W | ((value: R) => W)) => {\n registry.set(atom, typeof value === 'function' ? (value as any)(registry.get(atom)) : value);\n }) as SetAtomFn<R, W, Mode>;\n}\n\n/**\n * Hook to get a setter function for an atom\n * Also mounts the atom in the registry\n */\nexport function useAtomSet<R, W, Mode extends 'value' | 'promise' | 'promiseExit' = never>(\n atom: Atom.Writable<R, W>,\n options?: {\n readonly mode?: ([R] extends [AsyncResult.AsyncResult<any, any>] ? Mode : 'value') | undefined;\n },\n): SetAtomFn<R, W, Mode> {\n const registry = useRegistry();\n\n // Mount the atom\n const unmount = registry.mount(atom);\n onCleanup(unmount);\n\n return createSetAtom(registry, atom, options);\n}\n","//\n// Copyright 2025 DXOS.org\n//\n\nimport type * as AsyncResult from 'effect/unstable/reactivity/AsyncResult';\nimport type * as Atom from 'effect/unstable/reactivity/Atom';\nimport { type Accessor, createSignal, onCleanup } from 'solid-js';\n\nimport { useRegistry } from '../registry';\nimport { type SetAtomFn, createSetAtom } from './useAtomSet';\n\n/**\n * Hook to both read and write an atom\n * Returns a tuple of [value accessor, setter function]\n */\nexport function useAtom<R, W, Mode extends 'value' | 'promise' | 'promiseExit' = never>(\n atom: Atom.Writable<R, W>,\n options?: {\n readonly mode?: ([R] extends [AsyncResult.AsyncResult<any, any>] ? Mode : 'value') | undefined;\n },\n): readonly [Accessor<R>, SetAtomFn<R, W, Mode>] {\n const registry = useRegistry();\n\n const [value, setValue] = createSignal<R>(registry.get(atom));\n\n // Subscribe to atom changes\n const unsubscribe = registry.subscribe(\n atom,\n (nextValue) => {\n setValue(() => nextValue);\n },\n { immediate: true },\n );\n\n onCleanup(unsubscribe);\n\n return [value, createSetAtom(registry, atom, options)] as const;\n}\n","//\n// Copyright 2025 DXOS.org\n//\n\nimport type * as Atom from 'effect/unstable/reactivity/Atom';\nimport { onCleanup } from 'solid-js';\n\nimport { useRegistry } from '../registry';\n\n/**\n * Hook to mount an atom without reading its value\n */\nexport function useAtomMount<A>(atom: Atom.Atom<A>): void {\n const registry = useRegistry();\n const unmount = registry.mount(atom);\n onCleanup(unmount);\n}\n","//\n// Copyright 2025 DXOS.org\n//\n\nimport type * as Atom from 'effect/unstable/reactivity/Atom';\nimport { onCleanup } from 'solid-js';\n\nimport { useRegistry } from '../registry';\n\n/**\n * Hook to get a refresh function for an atom\n */\nexport function useAtomRefresh<A>(atom: Atom.Atom<A>): () => void {\n const registry = useRegistry();\n\n const unmount = registry.mount(atom);\n onCleanup(unmount);\n\n return () => registry.refresh(atom);\n}\n","//\n// Copyright 2025 DXOS.org\n//\n\nimport type * as Atom from 'effect/unstable/reactivity/Atom';\nimport { onCleanup } from 'solid-js';\n\nimport { useRegistry } from '../registry';\n\n/**\n * Hook to subscribe to atom changes with a callback\n */\nexport function useAtomSubscribe<A>(\n atom: Atom.Atom<A>,\n f: (value: A) => void,\n options?: { readonly immediate?: boolean },\n): void {\n const registry = useRegistry();\n\n const unsubscribe = registry.subscribe(atom, f, options);\n onCleanup(unsubscribe);\n}\n","//\n// Copyright 2025 DXOS.org\n//\n\nimport type * as AtomRef from 'effect/unstable/reactivity/AtomRef';\nimport { type Accessor, createMemo, createSignal, onCleanup } from 'solid-js';\n\n/**\n * Hook to read an AtomRef value\n */\nexport function useAtomRef<A>(ref: AtomRef.ReadonlyRef<A>): Accessor<A> {\n const [value, setValue] = createSignal<A>(ref.value);\n\n const unsubscribe = ref.subscribe((next) => {\n setValue(() => next);\n });\n\n onCleanup(unsubscribe);\n\n return value;\n}\n\n/**\n * Hook to get a prop accessor from an AtomRef\n */\nexport function useAtomRefProp<A, K extends keyof A>(ref: AtomRef.AtomRef<A>, prop: K): AtomRef.AtomRef<A[K]> {\n return createMemo(() => ref.prop(prop))();\n}\n\n/**\n * Hook to read a prop value from an AtomRef\n */\nexport function useAtomRefPropValue<A, K extends keyof A>(ref: AtomRef.AtomRef<A>, prop: K): Accessor<A[K]> {\n return useAtomRef(useAtomRefProp(ref, prop));\n}\n","//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Cause from 'effect/Cause';\nimport type * as AsyncResult from 'effect/unstable/reactivity/AsyncResult';\nimport type * as Atom from 'effect/unstable/reactivity/Atom';\nimport { type Accessor, createMemo, createSignal, onCleanup } from 'solid-js';\n\nimport { useRegistry } from '../registry';\n\n/**\n * Resource-like hook for atoms that contain Result values\n * Automatically handles loading and error states\n */\nexport function useAtomResource<A, E>(\n atom: Atom.Atom<AsyncResult.AsyncResult<A, E>>,\n): {\n value: Accessor<A | undefined>;\n error: Accessor<E | undefined>;\n loading: Accessor<boolean>;\n result: Accessor<AsyncResult.AsyncResult<A, E>>;\n} {\n const registry = useRegistry();\n const [result, setResult] = createSignal<AsyncResult.AsyncResult<A, E>>(registry.get(atom));\n\n const unsubscribe = registry.subscribe(\n atom,\n (nextValue) => {\n setResult(() => nextValue);\n },\n { immediate: true },\n );\n\n onCleanup(unsubscribe);\n\n const value = createMemo(() => {\n const r = result();\n return r._tag === 'Success' ? r.value : undefined;\n });\n\n const error = createMemo(() => {\n const r = result();\n return r._tag === 'Failure' ? (Cause.squash(r.cause) as E) : undefined;\n });\n\n const loading = createMemo(() => {\n const r = result();\n return r._tag === 'Initial' || r.waiting;\n });\n\n return {\n value,\n error,\n loading,\n result,\n };\n}\n","//\n// Copyright 2025 DXOS.org\n//\n\nimport type * as AsyncResult from 'effect/unstable/reactivity/AsyncResult';\nimport type * as Atom from 'effect/unstable/reactivity/Atom';\nimport { createResource, onCleanup } from 'solid-js';\n\nimport { useRegistry } from '../registry';\n\n/**\n * Hook to read an atom value with Suspense support\n */\nexport function useAtomSuspense<A, E>(atom: Atom.Atom<AsyncResult.AsyncResult<A, E>>): () => A {\n const registry = useRegistry();\n\n const [data, { mutate, refetch }] = createResource(async () => {\n // Check if we already have a value\n const current = registry.get(atom);\n if (current._tag === 'Success') {\n return current.value;\n }\n if (current._tag === 'Failure') {\n throw current.cause;\n }\n\n // Wait for the next success or failure\n return new Promise<A>((resolve, reject) => {\n const unsubscribe = registry.subscribe(atom, (next) => {\n if (next._tag === 'Success') {\n unsubscribe();\n resolve(next.value);\n } else if (next._tag === 'Failure') {\n unsubscribe();\n reject(next.cause);\n }\n });\n // Note: We might want to handle cancellation if the resource is disposed?\n // But creating a promise that leaks isn't great.\n // Ideally we tie this to the component, but the promise itself is localized.\n });\n });\n\n // Subscribe to updates to keep the resource fresh\n const unsubscribe = registry.subscribe(atom, (next) => {\n if (next._tag === 'Success') {\n mutate(() => next.value);\n } else if (next._tag === 'Failure') {\n // If we encounter a failure, we trigger a refetch which will hit the fetcher\n // and throw the error (reject the promise)\n // Or we could try to mutate error state?\n // createResource doesn't have a direct 'setError'.\n // Refetching is the safe bet to re-enter the promise/error flow.\n void refetch();\n } else if (next._tag === 'Initial' || (next as any).waiting) {\n // If we go back to loading, refetch to suspend\n void refetch();\n }\n });\n\n onCleanup(unsubscribe);\n\n return () => {\n const value = data();\n if (value === undefined) {\n // This case handles when the resource is loading initially\n // createResource reads undefined (or initial value) when loading if strict mode isn't on for types,\n // but wrapping it ensures we signal \"read\" to Suspense.\n // However, data() itself should trigger Suspense if loading.\n // We assume standard Suspense behavior.\n }\n return value as A;\n };\n}\n","//\n// Copyright 2025 DXOS.org\n//\n\nimport type * as Atom from 'effect/unstable/reactivity/Atom';\n\nimport { useRegistry } from '../registry';\n\n/**\n * Hook to initialize atoms with values\n */\nexport function useAtomInitialValues(initialValues: Iterable<readonly [Atom.Writable<any, any>, any]>): void {\n const registry = useRegistry();\n\n for (const [atom, value] of initialValues) {\n registry.set(atom, value);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;AAaA,IAAa,kBAA6C,YAAY,YACpE,iDACM,aAAa,KAAK,CAC1B;;;;AAKA,IAAa,kBACX,cAAyC,eAAe;;;;AAK1D,IAAa,oBAA+C;CAC1D,OAAO,WAAW,eAAe;AACnC;AAcA,SAAgB,iBAAiB,OAA8B;CAC7D,MAAM,WACJ,MAAM,YACN,aAAa,KAAK;EAChB,cAAc,MAAM;EACpB,eAAe,MAAM;EACrB,mBAAmB,MAAM;EACzB,gBAAgB,MAAM,kBAAkB;CAC1C,CAAC;CAEH,gBAAgB;EAEd,MAAM,UAAU,iBAAiB;GAC/B,SAAS,QAAQ;EACnB,GAAG,GAAG;EACN,aAAa,aAAa,OAAO;CACnC,CAAC;CAED,OAAO,gBAAgB,SAAS;EAC9B,OAAO;EACP,IAAI,WAAW;GACb,OAAO,MAAM;EACf;CACF,CAAC;AACH;;;;;;ACjDA,IAAM,UAAa,UAAgC,OAAO,UAAU,aAAc,MAAsB,IAAI;AAU5G,SAAgB,aAAgB,MAAmC,GAA8B;CAC/F,MAAM,WAAW,YAAY;CAG7B,MAAM,eAAe,iBAAiB;EACpC,MAAM,IAAI,OAAO,IAAI;EACrB,OAAO,IAAI,WAAW,IAAI,GAAG,CAAC,IAAI;CACpC,CAAC;CAED,MAAM,CAAC,OAAO,YAAY,aAAgB,SAAS,IAAI,aAAa,CAAC,CAAC;CAGtE,mBAAmB;EACjB,MAAM,cAAc,aAAa;EACjC,eAAe,SAAS,IAAI,WAAW,CAAC;EAExC,MAAM,cAAc,SAAS,UAC3B,cACC,cAAc;GACb,eAAe,SAAS;EAC1B,GACA,EAAE,WAAW,KAAK,CACpB;EAEA,UAAU,WAA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AE7D,MAAM,UAAU,SAAS,IAAI,IAAI;EACjC,IAAI,QAAQ,SAAS,WACnB,OAAO,QAAQ;EAEjB,IAAI,QAAQ,SAAS,WACnB,MAAM,QAAQ;EAIhB,OAAO,IAAI,SAAY,SAAS,WAAW;GACzC,MAAM,cAAc,SAAS,UAAU,OAAO,SAAS;IACrD,IAAI,KAAK,SAAS,WAAW;KAC3B,YAAY;KACZ,QAAQ,KAAK,KAAK;IACpB,OAAO,IAAI,KAAK,SAAS,WAAW;KAClC,YAAY;KACZ,OAAO,KAAK,KAAK;IACnB;GACF,CAAC;EAIH,CAAC;CACH,CAAC;CAGD,MAAM,cAAc,SAAS,UAAU,OAAO,SAAS;EACrD,IAAI,KAAK,SAAS,WAChB,aAAa,KAAK,KAAK;OAClB,IAAI,KAAK,SAAS,WAMvB,QAAa;OACR,IAAI,KAAK,SAAS,aAAc,KAAa,SAElD,QAAa;CAEjB,CAAC;CAED,UAAU,WAAW;CAErB,aAAa;EACX,MAAM,QAAQ,KAAK;EACnB,IAAI,UAAU,KAAA,GAAW,CAMzB;EACA,OAAO;CACT;AACF;;;;;;AC9DA,SAAgB,qBAAqB,eAAwE;CAC3G,MAAM,WAAW,YAAY;CAE7B,KAAK,MAAM,CAAC,MAAM,UAAU,eAC1B,SAAS,IAAI,MAAM,KAAK;AAE5B"}
@@ -1,5 +1,5 @@
1
- import type * as Atom from '@effect-atom/atom/Atom';
2
- import type * as Result from '@effect-atom/atom/Result';
1
+ import type * as AsyncResult from 'effect/unstable/reactivity/AsyncResult';
2
+ import type * as Atom from 'effect/unstable/reactivity/Atom';
3
3
  import { type Accessor } from 'solid-js';
4
4
  import { type SetAtomFn } from './useAtomSet';
5
5
  /**
@@ -7,6 +7,6 @@ import { type SetAtomFn } from './useAtomSet';
7
7
  * Returns a tuple of [value accessor, setter function]
8
8
  */
9
9
  export declare function useAtom<R, W, Mode extends 'value' | 'promise' | 'promiseExit' = never>(atom: Atom.Writable<R, W>, options?: {
10
- readonly mode?: ([R] extends [Result.Result<any, any>] ? Mode : 'value') | undefined;
10
+ readonly mode?: ([R] extends [AsyncResult.AsyncResult<any, any>] ? Mode : 'value') | undefined;
11
11
  }): readonly [Accessor<R>, SetAtomFn<R, W, Mode>];
12
12
  //# sourceMappingURL=useAtom.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useAtom.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useAtom.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,IAAI,MAAM,wBAAwB,CAAC;AACpD,OAAO,KAAK,KAAK,MAAM,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,KAAK,QAAQ,EAA2B,MAAM,UAAU,CAAC;AAGlE,OAAO,EAAE,KAAK,SAAS,EAAiB,MAAM,cAAc,CAAC;AAE7D;;;GAGG;AACH,wBAAgB,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,SAAS,OAAO,GAAG,SAAS,GAAG,aAAa,GAAG,KAAK,EACpF,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,EACzB,OAAO,CAAC,EAAE;IACR,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,GAAG,IAAI,GAAG,OAAO,CAAC,GAAG,SAAS,CAAC;CACtF,GACA,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC,CAiB/C"}
1
+ {"version":3,"file":"useAtom.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useAtom.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,WAAW,MAAM,wCAAwC,CAAC;AAC3E,OAAO,KAAK,KAAK,IAAI,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,KAAK,QAAQ,EAA2B,MAAM,UAAU,CAAC;AAGlE,OAAO,EAAE,KAAK,SAAS,EAAiB,MAAM,cAAc,CAAC;AAE7D;;;GAGG;AACH,wBAAgB,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,SAAS,OAAO,GAAG,SAAS,GAAG,aAAa,GAAG,KAAK,EACpF,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,EACzB,OAAO,CAAC,EAAE;IACR,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,WAAW,CAAC,WAAW,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,GAAG,IAAI,GAAG,OAAO,CAAC,GAAG,SAAS,CAAC;CAChG,GACA,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC,CAiB/C"}
@@ -1,4 +1,4 @@
1
- import type * as Atom from '@effect-atom/atom/Atom';
1
+ import type * as Atom from 'effect/unstable/reactivity/Atom';
2
2
  /**
3
3
  * Hook to initialize atoms with values
4
4
  */
@@ -1 +1 @@
1
- {"version":3,"file":"useAtomInitialValues.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useAtomInitialValues.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,IAAI,MAAM,wBAAwB,CAAC;AAIpD;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,aAAa,EAAE,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC,GAAG,IAAI,CAM3G"}
1
+ {"version":3,"file":"useAtomInitialValues.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useAtomInitialValues.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,IAAI,MAAM,iCAAiC,CAAC;AAI7D;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,aAAa,EAAE,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC,GAAG,IAAI,CAM3G"}
@@ -1,4 +1,4 @@
1
- import type * as Atom from '@effect-atom/atom/Atom';
1
+ import type * as Atom from 'effect/unstable/reactivity/Atom';
2
2
  /**
3
3
  * Hook to mount an atom without reading its value
4
4
  */
@@ -1 +1 @@
1
- {"version":3,"file":"useAtomMount.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useAtomMount.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,IAAI,MAAM,wBAAwB,CAAC;AAKpD;;GAEG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,CAIxD"}
1
+ {"version":3,"file":"useAtomMount.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useAtomMount.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,IAAI,MAAM,iCAAiC,CAAC;AAK7D;;GAEG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,CAIxD"}
@@ -1,4 +1,4 @@
1
- import type * as AtomRef from '@effect-atom/atom/AtomRef';
1
+ import type * as AtomRef from 'effect/unstable/reactivity/AtomRef';
2
2
  import { type Accessor } from 'solid-js';
3
3
  /**
4
4
  * Hook to read an AtomRef value
@@ -1 +1 @@
1
- {"version":3,"file":"useAtomRef.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useAtomRef.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,OAAO,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,KAAK,QAAQ,EAAuC,MAAM,UAAU,CAAC;AAE9E;;GAEG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,GAAG,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC,CAA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"}
@@ -1,4 +1,4 @@
1
- import type * as Atom from '@effect-atom/atom/Atom';
1
+ import type * as Atom from 'effect/unstable/reactivity/Atom';
2
2
  /**
3
3
  * Hook to get a refresh function for an atom
4
4
  */
@@ -1 +1 @@
1
- {"version":3,"file":"useAtomRefresh.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useAtomRefresh.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,IAAI,MAAM,wBAAwB,CAAC;AAKpD;;GAEG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,MAAM,IAAI,CAOhE"}
1
+ {"version":3,"file":"useAtomRefresh.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useAtomRefresh.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,IAAI,MAAM,iCAAiC,CAAC;AAK7D;;GAEG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,MAAM,IAAI,CAOhE"}
@@ -1,14 +1,14 @@
1
- import type * as Atom from '@effect-atom/atom/Atom';
2
- import type * as Result from '@effect-atom/atom/Result';
1
+ import type * as AsyncResult from 'effect/unstable/reactivity/AsyncResult';
2
+ import type * as Atom from 'effect/unstable/reactivity/Atom';
3
3
  import { type Accessor } from 'solid-js';
4
4
  /**
5
5
  * Resource-like hook for atoms that contain Result values
6
6
  * Automatically handles loading and error states
7
7
  */
8
- export declare function useAtomResource<A, E>(atom: Atom.Atom<Result.Result<A, E>>): {
8
+ export declare function useAtomResource<A, E>(atom: Atom.Atom<AsyncResult.AsyncResult<A, E>>): {
9
9
  value: Accessor<A | undefined>;
10
10
  error: Accessor<E | undefined>;
11
11
  loading: Accessor<boolean>;
12
- result: Accessor<Result.Result<A, E>>;
12
+ result: Accessor<AsyncResult.AsyncResult<A, E>>;
13
13
  };
14
14
  //# sourceMappingURL=useAtomResource.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useAtomResource.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useAtomResource.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,IAAI,MAAM,wBAAwB,CAAC;AACpD,OAAO,KAAK,KAAK,MAAM,MAAM,0BAA0B,CAAC;AAExD,OAAO,EAAE,KAAK,QAAQ,EAAuC,MAAM,UAAU,CAAC;AAI9E;;;GAGG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,CAAC,EAClC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GACnC;IACD,KAAK,EAAE,QAAQ,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC;IAC/B,KAAK,EAAE,QAAQ,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC;IAC/B,OAAO,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;IAC3B,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;CACvC,CAmCA"}
1
+ {"version":3,"file":"useAtomResource.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useAtomResource.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,KAAK,WAAW,MAAM,wCAAwC,CAAC;AAC3E,OAAO,KAAK,KAAK,IAAI,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,KAAK,QAAQ,EAAuC,MAAM,UAAU,CAAC;AAI9E;;;GAGG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,CAAC,EAClC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAC7C;IACD,KAAK,EAAE,QAAQ,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC;IAC/B,KAAK,EAAE,QAAQ,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC;IAC/B,OAAO,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;IAC3B,MAAM,EAAE,QAAQ,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;CACjD,CAmCA"}
@@ -1,16 +1,16 @@
1
- import type * as Atom from '@effect-atom/atom/Atom';
2
- import * as Registry from '@effect-atom/atom/Registry';
3
- import type * as Result from '@effect-atom/atom/Result';
4
1
  import * as Exit from 'effect/Exit';
5
- export type SetAtomFn<R, W, Mode extends 'value' | 'promise' | 'promiseExit'> = 'promise' extends Mode ? (value: W) => Promise<Result.Result.Success<R>> : 'promiseExit' extends Mode ? (value: W) => Promise<Exit.Exit<Result.Result.Success<R>, Result.Result.Failure<R>>> : (value: W | ((value: R) => W)) => void;
6
- export declare function createSetAtom<R, W, Mode extends 'value' | 'promise' | 'promiseExit' = never>(registry: Registry.Registry, atom: Atom.Writable<R, W>, options?: {
7
- readonly mode?: ([R] extends [Result.Result<any, any>] ? Mode : 'value') | undefined;
2
+ import type * as AsyncResult from 'effect/unstable/reactivity/AsyncResult';
3
+ import type * as Atom from 'effect/unstable/reactivity/Atom';
4
+ import * as AtomRegistry from 'effect/unstable/reactivity/AtomRegistry';
5
+ export type SetAtomFn<R, W, Mode extends 'value' | 'promise' | 'promiseExit'> = 'promise' extends Mode ? (value: W) => Promise<AsyncResult.AsyncResult.Success<R>> : 'promiseExit' extends Mode ? (value: W) => Promise<Exit.Exit<AsyncResult.AsyncResult.Success<R>, AsyncResult.AsyncResult.Failure<R>>> : (value: W | ((value: R) => W)) => void;
6
+ export declare function createSetAtom<R, W, Mode extends 'value' | 'promise' | 'promiseExit' = never>(registry: AtomRegistry.AtomRegistry, atom: Atom.Writable<R, W>, options?: {
7
+ readonly mode?: ([R] extends [AsyncResult.AsyncResult<any, any>] ? Mode : 'value') | undefined;
8
8
  }): SetAtomFn<R, W, Mode>;
9
9
  /**
10
10
  * Hook to get a setter function for an atom
11
11
  * Also mounts the atom in the registry
12
12
  */
13
13
  export declare function useAtomSet<R, W, Mode extends 'value' | 'promise' | 'promiseExit' = never>(atom: Atom.Writable<R, W>, options?: {
14
- readonly mode?: ([R] extends [Result.Result<any, any>] ? Mode : 'value') | undefined;
14
+ readonly mode?: ([R] extends [AsyncResult.AsyncResult<any, any>] ? Mode : 'value') | undefined;
15
15
  }): SetAtomFn<R, W, Mode>;
16
16
  //# sourceMappingURL=useAtomSet.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useAtomSet.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useAtomSet.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,IAAI,MAAM,wBAAwB,CAAC;AACpD,OAAO,KAAK,QAAQ,MAAM,4BAA4B,CAAC;AACvD,OAAO,KAAK,KAAK,MAAM,MAAM,0BAA0B,CAAC;AAGxD,OAAO,KAAK,IAAI,MAAM,aAAa,CAAC;AAYpC,MAAM,MAAM,SAAS,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,SAAS,OAAO,GAAG,SAAS,GAAG,aAAa,IAAI,SAAS,SAAS,IAAI,GAClG,CAAC,KAAK,EAAE,CAAC,KAAK,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,GAC/C,aAAa,SAAS,IAAI,GACxB,CAAC,KAAK,EAAE,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,GACpF,CAAC,KAAK,EAAE,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,IAAI,CAAC;AAE7C,wBAAgB,aAAa,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,SAAS,OAAO,GAAG,SAAS,GAAG,aAAa,GAAG,KAAK,EAC1F,QAAQ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AAG,SAAS,CAAC;CAChG,GACA,SAAS,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,CAQvB"}
@@ -1,4 +1,4 @@
1
- import type * as Atom from '@effect-atom/atom/Atom';
1
+ import type * as Atom from 'effect/unstable/reactivity/Atom';
2
2
  /**
3
3
  * Hook to subscribe to atom changes with a callback
4
4
  */
@@ -1 +1 @@
1
- {"version":3,"file":"useAtomSubscribe.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useAtomSubscribe.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,IAAI,MAAM,wBAAwB,CAAC;AAKpD;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAChC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAClB,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,EACrB,OAAO,CAAC,EAAE;IAAE,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAA;CAAE,GACzC,IAAI,CAKN"}
1
+ {"version":3,"file":"useAtomSubscribe.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useAtomSubscribe.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,IAAI,MAAM,iCAAiC,CAAC;AAK7D;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAChC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAClB,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,EACrB,OAAO,CAAC,EAAE;IAAE,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAA;CAAE,GACzC,IAAI,CAKN"}
@@ -1,7 +1,7 @@
1
- import type * as Atom from '@effect-atom/atom/Atom';
2
- import type * as Result from '@effect-atom/atom/Result';
1
+ import type * as AsyncResult from 'effect/unstable/reactivity/AsyncResult';
2
+ import type * as Atom from 'effect/unstable/reactivity/Atom';
3
3
  /**
4
4
  * Hook to read an atom value with Suspense support
5
5
  */
6
- export declare function useAtomSuspense<A, E>(atom: Atom.Atom<Result.Result<A, E>>): () => A;
6
+ export declare function useAtomSuspense<A, E>(atom: Atom.Atom<AsyncResult.AsyncResult<A, E>>): () => A;
7
7
  //# sourceMappingURL=useAtomSuspense.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useAtomSuspense.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useAtomSuspense.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,IAAI,MAAM,wBAAwB,CAAC;AACpD,OAAO,KAAK,KAAK,MAAM,MAAM,0BAA0B,CAAC;AAKxD;;GAEG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CA4DnF"}
1
+ {"version":3,"file":"useAtomSuspense.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useAtomSuspense.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,WAAW,MAAM,wCAAwC,CAAC;AAC3E,OAAO,KAAK,KAAK,IAAI,MAAM,iCAAiC,CAAC;AAK7D;;GAEG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CA4D7F"}
@@ -1,4 +1,4 @@
1
- import type * as Atom from '@effect-atom/atom/Atom';
1
+ import type * as Atom from 'effect/unstable/reactivity/Atom';
2
2
  import { type Accessor } from 'solid-js';
3
3
  /**
4
4
  * A value that may be a static value or a reactive accessor.
@@ -1 +1 @@
1
- {"version":3,"file":"useAtomValue.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useAtomValue.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,IAAI,MAAM,wBA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atom';
2
- export * as Registry from '@effect-atom/atom/Registry';
3
- export * as Result from '@effect-atom/atom/Result';
4
- export * as AtomRef from '@effect-atom/atom/AtomRef';
5
- export * as AtomHttpApi from '@effect-atom/atom/AtomHttpApi';
6
- export * as AtomRpc from '@effect-atom/atom/AtomRpc';
1
+ export * as Atom from 'effect/unstable/reactivity/Atom';
2
+ export * as Registry from 'effect/unstable/reactivity/AtomRegistry';
3
+ export * as Result from 'effect/unstable/reactivity/AsyncResult';
4
+ export * as AtomRef from 'effect/unstable/reactivity/AtomRef';
5
+ export * as AtomHttpApi from 'effect/unstable/reactivity/AtomHttpApi';
6
+ export * as AtomRpc from 'effect/unstable/reactivity/AtomRpc';
7
7
  export * from './hooks';
8
8
  export * from './registry';
9
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,IAAI,MAAM,wBAAwB,CAAC;AAC/C,OAAO,KAAK,QAAQ,MAAM,4BAA4B,CAAC;AACvD,OAAO,KAAK,MAAM,MAAM,0BAA0B,CAAC;AACnD,OAAO,KAAK,OAAO,MAAM,2BAA2B,CAAC;AACrD,OAAO,KAAK,WAAW,MAAM,+BAA+B,CAAC;AAC7D,OAAO,KAAK,OAAO,MAAM,2BAA2B,CAAC;AAErD,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,IAAI,MAAM,iCAAiC,CAAC;AACxD,OAAO,KAAK,QAAQ,MAAM,yCAAyC,CAAC;AACpE,OAAO,KAAK,MAAM,MAAM,wCAAwC,CAAC;AACjE,OAAO,KAAK,OAAO,MAAM,oCAAoC,CAAC;AAC9D,OAAO,KAAK,WAAW,MAAM,wCAAwC,CAAC;AACtE,OAAO,KAAK,OAAO,MAAM,oCAAoC,CAAC;AAE9D,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC"}
@@ -1,26 +1,26 @@
1
- import type * as Atom from '@effect-atom/atom/Atom';
2
- import * as Registry from '@effect-atom/atom/Registry';
1
+ import type * as Atom from 'effect/unstable/reactivity/Atom';
2
+ import * as AtomRegistry from 'effect/unstable/reactivity/AtomRegistry';
3
3
  import { type Context } from 'solid-js';
4
4
  /**
5
5
  * Default registry instance
6
6
  */
7
- export declare const defaultRegistry: Registry.Registry;
7
+ export declare const defaultRegistry: AtomRegistry.AtomRegistry;
8
8
  /**
9
9
  * Solid context for the atom registry
10
10
  */
11
- export declare const RegistryContext: Context<Registry.Registry>;
11
+ export declare const RegistryContext: Context<AtomRegistry.AtomRegistry>;
12
12
  /**
13
13
  * Get the current registry from context
14
14
  */
15
- export declare const useRegistry: () => Registry.Registry;
15
+ export declare const useRegistry: () => AtomRegistry.AtomRegistry;
16
16
  /**
17
17
  * Provider component for custom registry
18
18
  */
19
19
  export interface RegistryProviderProps {
20
20
  children: any;
21
- registry?: Registry.Registry;
21
+ registry?: AtomRegistry.AtomRegistry;
22
22
  initialValues?: Iterable<readonly [Atom.Atom<any>, any]>;
23
- scheduleTask?: (f: () => void) => void;
23
+ scheduleTask?: (f: () => void) => () => void;
24
24
  timeoutResolution?: number;
25
25
  defaultIdleTTL?: number;
26
26
  }
@@ -1 +1 @@
1
- {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../src/registry.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,IAAI,MAAM,wBAAwB,CAAC;AACpD,OAAO,KAAK,QAAQ,MAAM,4BAA4B,CAAC;AAEvD,OAAO,EAAE,KAAK,OAAO,EAAwC,MAAM,UAAU,CAAC;AAE9E;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,QAGtC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAqD,CAAC;AA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