@dxos/effect-atom-solid 0.0.0 → 0.8.4-main.03d5cd7b56
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/browser/index.mjs +263 -0
- package/dist/lib/browser/index.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -0
- package/dist/lib/node-esm/index.mjs +265 -0
- package/dist/lib/node-esm/index.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -0
- package/dist/types/src/hooks/index.d.ts +11 -0
- package/dist/types/src/hooks/index.d.ts.map +1 -0
- package/dist/types/src/hooks/useAtom.d.ts +12 -0
- package/dist/types/src/hooks/useAtom.d.ts.map +1 -0
- package/dist/types/src/hooks/useAtom.test.d.ts +2 -0
- package/dist/types/src/hooks/useAtom.test.d.ts.map +1 -0
- package/dist/types/src/hooks/useAtomInitialValues.d.ts +6 -0
- package/dist/types/src/hooks/useAtomInitialValues.d.ts.map +1 -0
- package/dist/types/src/hooks/useAtomInitialValues.test.d.ts +2 -0
- package/dist/types/src/hooks/useAtomInitialValues.test.d.ts.map +1 -0
- package/dist/types/src/hooks/useAtomMount.d.ts +6 -0
- package/dist/types/src/hooks/useAtomMount.d.ts.map +1 -0
- package/dist/types/src/hooks/useAtomRef.d.ts +15 -0
- package/dist/types/src/hooks/useAtomRef.d.ts.map +1 -0
- package/dist/types/src/hooks/useAtomRefresh.d.ts +6 -0
- package/dist/types/src/hooks/useAtomRefresh.d.ts.map +1 -0
- package/dist/types/src/hooks/useAtomRefresh.test.d.ts +2 -0
- package/dist/types/src/hooks/useAtomRefresh.test.d.ts.map +1 -0
- package/dist/types/src/hooks/useAtomResource.d.ts +14 -0
- package/dist/types/src/hooks/useAtomResource.d.ts.map +1 -0
- package/dist/types/src/hooks/useAtomResource.test.d.ts +2 -0
- package/dist/types/src/hooks/useAtomResource.test.d.ts.map +1 -0
- package/dist/types/src/hooks/useAtomSet.d.ts +16 -0
- package/dist/types/src/hooks/useAtomSet.d.ts.map +1 -0
- package/dist/types/src/hooks/useAtomSet.test.d.ts +2 -0
- package/dist/types/src/hooks/useAtomSet.test.d.ts.map +1 -0
- package/dist/types/src/hooks/useAtomSubscribe.d.ts +8 -0
- package/dist/types/src/hooks/useAtomSubscribe.d.ts.map +1 -0
- package/dist/types/src/hooks/useAtomSubscribe.test.d.ts +2 -0
- package/dist/types/src/hooks/useAtomSubscribe.test.d.ts.map +1 -0
- package/dist/types/src/hooks/useAtomSuspense.d.ts +7 -0
- package/dist/types/src/hooks/useAtomSuspense.d.ts.map +1 -0
- package/dist/types/src/hooks/useAtomSuspense.test.d.ts +2 -0
- package/dist/types/src/hooks/useAtomSuspense.test.d.ts.map +1 -0
- package/dist/types/src/hooks/useAtomValue.d.ts +16 -0
- package/dist/types/src/hooks/useAtomValue.d.ts.map +1 -0
- package/dist/types/src/hooks/useAtomValue.test.d.ts +2 -0
- package/dist/types/src/hooks/useAtomValue.test.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +9 -0
- package/dist/types/src/index.d.ts.map +1 -0
- package/dist/types/src/registry.d.ts +28 -0
- package/dist/types/src/registry.d.ts.map +1 -0
- package/dist/types/src/registry.test.d.ts +2 -0
- package/dist/types/src/registry.test.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -0
- package/package.json +12 -11
- package/src/hooks/useAtom.test.tsx +0 -1
- package/src/hooks/useAtom.ts +0 -1
- package/src/hooks/useAtomInitialValues.test.tsx +0 -1
- package/src/hooks/useAtomRefresh.test.tsx +0 -1
- package/src/hooks/useAtomResource.test.tsx +0 -1
- package/src/hooks/useAtomSet.test.tsx +0 -1
- package/src/hooks/useAtomSet.ts +3 -1
- package/src/hooks/useAtomSubscribe.test.tsx +0 -1
- package/src/hooks/useAtomSuspense.test.tsx +0 -1
- package/src/hooks/useAtomValue.test.tsx +0 -1
|
@@ -7,7 +7,6 @@ import { fireEvent, render, waitFor } from '@solidjs/testing-library';
|
|
|
7
7
|
import { beforeEach, describe, expect, test } from 'vitest';
|
|
8
8
|
|
|
9
9
|
import { defaultRegistry } from '../registry';
|
|
10
|
-
|
|
11
10
|
import { useAtomRefresh } from './useAtomRefresh';
|
|
12
11
|
import { useAtomValue } from './useAtomValue';
|
|
13
12
|
|
|
@@ -7,7 +7,6 @@ import { fireEvent, render, waitFor } from '@solidjs/testing-library';
|
|
|
7
7
|
import { beforeEach, describe, expect, test } from 'vitest';
|
|
8
8
|
|
|
9
9
|
import { defaultRegistry } from '../registry';
|
|
10
|
-
|
|
11
10
|
import { useAtomSet } from './useAtomSet';
|
|
12
11
|
import { useAtomValue } from './useAtomValue';
|
|
13
12
|
|
package/src/hooks/useAtomSet.ts
CHANGED
|
@@ -13,7 +13,9 @@ import { onCleanup } from 'solid-js';
|
|
|
13
13
|
import { useRegistry } from '../registry';
|
|
14
14
|
|
|
15
15
|
const flattenExit = <A, E>(exit: Exit.Exit<A, E>): A => {
|
|
16
|
-
if (Exit.isSuccess(exit))
|
|
16
|
+
if (Exit.isSuccess(exit)) {
|
|
17
|
+
return exit.value;
|
|
18
|
+
}
|
|
17
19
|
throw Cause.squash(exit.cause);
|
|
18
20
|
};
|
|
19
21
|
|
|
@@ -7,7 +7,6 @@ import { fireEvent, render, waitFor } from '@solidjs/testing-library';
|
|
|
7
7
|
import { beforeEach, describe, expect, test } from 'vitest';
|
|
8
8
|
|
|
9
9
|
import { defaultRegistry } from '../registry';
|
|
10
|
-
|
|
11
10
|
import { useAtomSet } from './useAtomSet';
|
|
12
11
|
import { useAtomSubscribe } from './useAtomSubscribe';
|
|
13
12
|
|
|
@@ -7,7 +7,6 @@ import { fireEvent, render, waitFor } from '@solidjs/testing-library';
|
|
|
7
7
|
import { beforeEach, describe, expect, test } from 'vitest';
|
|
8
8
|
|
|
9
9
|
import { defaultRegistry } from '../registry';
|
|
10
|
-
|
|
11
10
|
import { useAtomValue } from './useAtomValue';
|
|
12
11
|
|
|
13
12
|
describe('useAtomValue', () => {
|