@cyclone-ui/state 0.0.25 → 0.0.27
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/CHANGELOG.md +20 -0
- package/dist/base/atoms/atom-with-broadcast.cjs +1 -2
- package/dist/base/atoms/atom-with-broadcast.d.cts +0 -2
- package/dist/base/atoms/atom-with-broadcast.d.cts.map +1 -1
- package/dist/base/atoms/atom-with-broadcast.d.mts +0 -2
- package/dist/base/atoms/atom-with-broadcast.mjs +1 -2
- package/dist/base/atoms/atom-with-compare.cjs +1 -2
- package/dist/base/atoms/atom-with-compare.d.cts +0 -2
- package/dist/base/atoms/atom-with-compare.d.cts.map +1 -1
- package/dist/base/atoms/atom-with-compare.d.mts +0 -2
- package/dist/base/atoms/atom-with-compare.mjs +1 -2
- package/dist/base/atoms/atom-with-debounce.cjs +1 -2
- package/dist/base/atoms/atom-with-debounce.d.cts +0 -2
- package/dist/base/atoms/atom-with-debounce.d.cts.map +1 -1
- package/dist/base/atoms/atom-with-debounce.d.mts +0 -2
- package/dist/base/atoms/atom-with-debounce.mjs +1 -2
- package/dist/base/atoms/atom-with-effect.cjs +1 -2
- package/dist/base/atoms/atom-with-effect.d.cts +0 -2
- package/dist/base/atoms/atom-with-effect.d.cts.map +1 -1
- package/dist/base/atoms/atom-with-effect.d.mts +0 -2
- package/dist/base/atoms/atom-with-effect.mjs +1 -2
- package/dist/base/atoms/atom-with-listeners.cjs +1 -2
- package/dist/base/atoms/atom-with-listeners.d.cts +0 -2
- package/dist/base/atoms/atom-with-listeners.d.cts.map +1 -1
- package/dist/base/atoms/atom-with-listeners.d.mts +0 -2
- package/dist/base/atoms/atom-with-listeners.mjs +1 -2
- package/dist/base/atoms/atom-with-pending.cjs +1 -2
- package/dist/base/atoms/atom-with-pending.d.cts +0 -2
- package/dist/base/atoms/atom-with-pending.d.cts.map +1 -1
- package/dist/base/atoms/atom-with-pending.d.mts +0 -2
- package/dist/base/atoms/atom-with-pending.mjs +1 -2
- package/dist/base/atoms/atom-with-refresh-and-default.cjs +1 -2
- package/dist/base/atoms/atom-with-refresh-and-default.d.cts +0 -2
- package/dist/base/atoms/atom-with-refresh-and-default.d.cts.map +1 -1
- package/dist/base/atoms/atom-with-refresh-and-default.d.mts +0 -2
- package/dist/base/atoms/atom-with-refresh-and-default.mjs +1 -2
- package/dist/base/atoms/atom-with-refresh.cjs +1 -2
- package/dist/base/atoms/atom-with-refresh.d.cts +0 -2
- package/dist/base/atoms/atom-with-refresh.d.cts.map +1 -1
- package/dist/base/atoms/atom-with-refresh.d.mts +0 -2
- package/dist/base/atoms/atom-with-refresh.mjs +1 -2
- package/dist/base/atoms/atom-with-toggle.cjs +1 -2
- package/dist/base/atoms/atom-with-toggle.d.cts +0 -2
- package/dist/base/atoms/atom-with-toggle.d.cts.map +1 -1
- package/dist/base/atoms/atom-with-toggle.d.mts +0 -2
- package/dist/base/atoms/atom-with-toggle.mjs +1 -2
- package/dist/base/atoms/atom-with-web-storage.cjs +1 -2
- package/dist/base/atoms/atom-with-web-storage.d.cts +0 -2
- package/dist/base/atoms/atom-with-web-storage.d.cts.map +1 -1
- package/dist/base/atoms/atom-with-web-storage.d.mts +0 -2
- package/dist/base/atoms/atom-with-web-storage.mjs +1 -2
- package/dist/base/atoms/atom-with-wrapper.cjs +1 -2
- package/dist/base/atoms/atom-with-wrapper.d.cts +0 -2
- package/dist/base/atoms/atom-with-wrapper.d.cts.map +1 -1
- package/dist/base/atoms/atom-with-wrapper.d.mts +0 -2
- package/dist/base/atoms/atom-with-wrapper.mjs +1 -2
- package/dist/base/atoms/base-atom.cjs +1 -2
- package/dist/base/atoms/base-atom.mjs +1 -2
- package/dist/base/hooks/use-atom-effect.cjs +1 -2
- package/dist/base/hooks/use-atom-effect.d.cts +0 -2
- package/dist/base/hooks/use-atom-effect.d.cts.map +1 -1
- package/dist/base/hooks/use-atom-effect.d.mts +0 -2
- package/dist/base/hooks/use-atom-effect.mjs +1 -2
- package/dist/base/hooks/use-hydrate-molecule.cjs +1 -2
- package/dist/base/hooks/use-hydrate-molecule.d.cts +0 -2
- package/dist/base/hooks/use-hydrate-molecule.d.cts.map +1 -1
- package/dist/base/hooks/use-hydrate-molecule.d.mts +0 -2
- package/dist/base/hooks/use-hydrate-molecule.mjs +1 -2
- package/dist/base/hooks/use-prepare-atoms.cjs +1 -2
- package/dist/base/hooks/use-prepare-atoms.d.cts +0 -2
- package/dist/base/hooks/use-prepare-atoms.d.cts.map +1 -1
- package/dist/base/hooks/use-prepare-atoms.d.mts +0 -2
- package/dist/base/hooks/use-prepare-atoms.mjs +1 -2
- package/dist/base/hooks/use-sync-molecule.cjs +1 -2
- package/dist/base/hooks/use-sync-molecule.d.cts +0 -2
- package/dist/base/hooks/use-sync-molecule.d.cts.map +1 -1
- package/dist/base/hooks/use-sync-molecule.d.mts +0 -2
- package/dist/base/hooks/use-sync-molecule.mjs +1 -2
- package/dist/base/utilities/create-molecule.cjs +1 -2
- package/dist/base/utilities/create-molecule.d.cts +0 -2
- package/dist/base/utilities/create-molecule.d.cts.map +1 -1
- package/dist/base/utilities/create-molecule.d.mts +0 -2
- package/dist/base/utilities/create-molecule.mjs +1 -2
- package/dist/base/utilities/create-web-storage.cjs +1 -2
- package/dist/base/utilities/create-web-storage.d.cts +0 -2
- package/dist/base/utilities/create-web-storage.d.cts.map +1 -1
- package/dist/base/utilities/create-web-storage.d.mts +0 -2
- package/dist/base/utilities/create-web-storage.mjs +1 -2
- package/dist/base/utilities/debounce.cjs +1 -2
- package/dist/base/utilities/debounce.d.cts +0 -2
- package/dist/base/utilities/debounce.d.cts.map +1 -1
- package/dist/base/utilities/debounce.d.mts +0 -2
- package/dist/base/utilities/debounce.mjs +1 -2
- package/dist/base/utilities/is-atom.cjs +1 -2
- package/dist/base/utilities/is-atom.mjs +1 -2
- package/dist/base/utilities/set-atom-debug.cjs +1 -2
- package/dist/base/utilities/set-atom-debug.d.cts +0 -2
- package/dist/base/utilities/set-atom-debug.d.cts.map +1 -1
- package/dist/base/utilities/set-atom-debug.d.mts +0 -2
- package/dist/base/utilities/set-atom-debug.mjs +1 -2
- package/dist/form/atoms/atom-with-field.cjs +1 -2
- package/dist/form/atoms/atom-with-field.mjs +1 -2
- package/dist/form/atoms/atom-with-messages.cjs +1 -2
- package/dist/form/atoms/atom-with-messages.mjs +1 -2
- package/dist/form/hooks/use-field-actions.cjs +1 -2
- package/dist/form/hooks/use-field-actions.d.cts +0 -2
- package/dist/form/hooks/use-field-actions.d.cts.map +1 -1
- package/dist/form/hooks/use-field-actions.d.mts +0 -2
- package/dist/form/hooks/use-field-actions.mjs +1 -2
- package/dist/form/hooks/use-field-ref.cjs +1 -2
- package/dist/form/hooks/use-field-ref.d.cts +0 -2
- package/dist/form/hooks/use-field-ref.d.cts.map +1 -1
- package/dist/form/hooks/use-field-ref.d.mts +0 -2
- package/dist/form/hooks/use-field-ref.mjs +1 -2
- package/dist/form/hooks/use-form-actions.cjs +1 -2
- package/dist/form/hooks/use-form-actions.d.cts +0 -2
- package/dist/form/hooks/use-form-actions.d.cts.map +1 -1
- package/dist/form/hooks/use-form-actions.d.mts +0 -2
- package/dist/form/hooks/use-form-actions.mjs +1 -2
- package/dist/form/molecules/field-molecule.cjs +1 -2
- package/dist/form/molecules/field-molecule.d.cts +0 -2
- package/dist/form/molecules/field-molecule.d.cts.map +1 -1
- package/dist/form/molecules/field-molecule.d.mts +0 -2
- package/dist/form/molecules/field-molecule.mjs +1 -2
- package/dist/form/molecules/form-molecule.cjs +1 -2
- package/dist/form/molecules/form-molecule.d.cts +0 -2
- package/dist/form/molecules/form-molecule.d.cts.map +1 -1
- package/dist/form/molecules/form-molecule.d.mts +0 -2
- package/dist/form/molecules/form-molecule.mjs +1 -2
- package/dist/form/providers/FieldProvider.cjs +1 -2
- package/dist/form/providers/FieldProvider.d.cts +0 -2
- package/dist/form/providers/FieldProvider.d.cts.map +1 -1
- package/dist/form/providers/FieldProvider.d.mts +0 -2
- package/dist/form/providers/FieldProvider.mjs +1 -2
- package/dist/form/providers/FormProvider.cjs +1 -2
- package/dist/form/providers/FormProvider.d.cts +0 -2
- package/dist/form/providers/FormProvider.d.cts.map +1 -1
- package/dist/form/providers/FormProvider.d.mts +0 -2
- package/dist/form/providers/FormProvider.mjs +1 -2
- package/dist/form/types.cjs +1 -2
- package/dist/form/types.d.cts +0 -2
- package/dist/form/types.d.cts.map +1 -1
- package/dist/form/types.d.mts +0 -2
- package/dist/form/types.mjs +1 -2
- package/dist/form/utilities/abort-error.cjs +1 -2
- package/dist/form/utilities/abort-error.d.cts +0 -2
- package/dist/form/utilities/abort-error.d.cts.map +1 -1
- package/dist/form/utilities/abort-error.d.mts +0 -2
- package/dist/form/utilities/abort-error.mjs +1 -2
- package/dist/form/utilities/is-validation-results.cjs +1 -2
- package/dist/form/utilities/is-validation-results.d.cts +0 -2
- package/dist/form/utilities/is-validation-results.d.cts.map +1 -1
- package/dist/form/utilities/is-validation-results.d.mts +0 -2
- package/dist/form/utilities/is-validation-results.mjs +1 -2
- package/dist/form/utilities/validators.cjs +1 -2
- package/dist/form/utilities/validators.d.cts +0 -2
- package/dist/form/utilities/validators.d.cts.map +1 -1
- package/dist/form/utilities/validators.d.mts +0 -2
- package/dist/form/utilities/validators.mjs +1 -2
- package/dist/message/components/MessageViewport.cjs +1 -2
- package/dist/message/components/MessageViewport.d.cts +0 -2
- package/dist/message/components/MessageViewport.d.cts.map +1 -1
- package/dist/message/components/MessageViewport.d.mts +0 -2
- package/dist/message/components/MessageViewport.mjs +1 -2
- package/dist/message/hooks/use-message-actions.cjs +1 -2
- package/dist/message/hooks/use-message-actions.d.cts +0 -2
- package/dist/message/hooks/use-message-actions.d.cts.map +1 -1
- package/dist/message/hooks/use-message-actions.d.mts +0 -2
- package/dist/message/hooks/use-message-actions.mjs +1 -2
- package/dist/message/providers/MessageProvider.cjs +1 -2
- package/dist/message/providers/MessageProvider.d.cts +0 -2
- package/dist/message/providers/MessageProvider.d.cts.map +1 -1
- package/dist/message/providers/MessageProvider.d.mts +0 -2
- package/dist/message/providers/MessageProvider.mjs +1 -2
- package/dist/message/types.d.cts +0 -2
- package/dist/message/types.d.cts.map +1 -1
- package/dist/message/types.d.mts +0 -2
- package/dist/theme/hooks/use-theme-actions.cjs +1 -2
- package/dist/theme/hooks/use-theme-actions.d.cts +0 -2
- package/dist/theme/hooks/use-theme-actions.d.cts.map +1 -1
- package/dist/theme/hooks/use-theme-actions.d.mts +0 -2
- package/dist/theme/hooks/use-theme-actions.mjs +1 -2
- package/dist/theme/hooks/use-theme-store.cjs +1 -2
- package/dist/theme/hooks/use-theme-store.d.cts +0 -2
- package/dist/theme/hooks/use-theme-store.d.cts.map +1 -1
- package/dist/theme/hooks/use-theme-store.d.mts +0 -2
- package/dist/theme/hooks/use-theme-store.mjs +1 -2
- package/dist/theme/molecules/theme-molecule.cjs +1 -2
- package/dist/theme/molecules/theme-molecule.d.cts +0 -2
- package/dist/theme/molecules/theme-molecule.d.cts.map +1 -1
- package/dist/theme/molecules/theme-molecule.d.mts +0 -2
- package/dist/theme/molecules/theme-molecule.mjs +1 -2
- package/dist/theme/providers/ThemeProvider.cjs +1 -2
- package/dist/theme/providers/ThemeProvider.d.cts +0 -2
- package/dist/theme/providers/ThemeProvider.d.cts.map +1 -1
- package/dist/theme/providers/ThemeProvider.d.mts +0 -2
- package/dist/theme/providers/ThemeProvider.mjs +1 -2
- package/dist/theme/types.d.cts +0 -2
- package/dist/theme/types.d.cts.map +1 -1
- package/dist/theme/types.d.mts +0 -2
- package/dist/theme/utilities/theme-helpers.cjs +1 -2
- package/dist/theme/utilities/theme-helpers.d.cts +0 -2
- package/dist/theme/utilities/theme-helpers.d.cts.map +1 -1
- package/dist/theme/utilities/theme-helpers.d.mts +0 -2
- package/dist/theme/utilities/theme-helpers.mjs +1 -2
- package/dist/types.d.cts +0 -2
- package/dist/types.d.cts.map +1 -1
- package/dist/types.d.mts +0 -2
- package/package.json +10 -10
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,26 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog for Cyclone UI - State
|
|
4
4
|
|
|
5
|
+
## [0.0.26](https://github.com/storm-software/cyclone-ui/releases/tag/state%400.0.26) (10/22/2026)
|
|
6
|
+
|
|
7
|
+
### Bug Fixes
|
|
8
|
+
|
|
9
|
+
- **tokens:** Update token structure to better allow customizations ([7f23eb61](https://github.com/storm-software/cyclone-ui/commit/7f23eb61))
|
|
10
|
+
|
|
11
|
+
### Updated Dependencies
|
|
12
|
+
|
|
13
|
+
- Updated **helpers** to **v0.3.25**
|
|
14
|
+
|
|
15
|
+
## [0.0.25](https://github.com/storm-software/cyclone-ui/releases/tag/state%400.0.25) (10/19/2026)
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
- **monorepo:** Resolve maps tile build issue and storybook theme reference ([cac26891](https://github.com/storm-software/cyclone-ui/commit/cac26891))
|
|
20
|
+
|
|
21
|
+
### Updated Dependencies
|
|
22
|
+
|
|
23
|
+
- Updated **helpers** to **v0.3.24**
|
|
24
|
+
|
|
5
25
|
## [0.0.24](https://github.com/storm-software/cyclone-ui/releases/tag/state%400.0.24) (10/19/2026)
|
|
6
26
|
|
|
7
27
|
### Updated Dependencies
|
|
@@ -2,7 +2,7 @@ const require_is_atom = require("../utilities/is-atom.cjs");
|
|
|
2
2
|
const require_base_atom = require("./base-atom.cjs");
|
|
3
3
|
let _stryke_type_checks_is_function = require("@stryke/type-checks/is-function");
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/base/atoms/atom-with-broadcast.ts
|
|
6
6
|
/**
|
|
7
7
|
* Creates an atom that broadcasts its value to other tabs/windows using the BroadcastChannel API.
|
|
8
8
|
*
|
|
@@ -41,5 +41,4 @@ function atomWithBroadcast(key, initialValueOrAtom) {
|
|
|
41
41
|
});
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
//#endregion
|
|
45
44
|
exports.atomWithBroadcast = atomWithBroadcast;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { PrimitiveAtom, SetStateAction, WritableAtom } from "jotai";
|
|
2
|
-
//#region src/base/atoms/atom-with-broadcast.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* Creates an atom that broadcasts its value to other tabs/windows using the BroadcastChannel API.
|
|
5
4
|
*
|
|
@@ -8,6 +7,5 @@ import { PrimitiveAtom, SetStateAction, WritableAtom } from "jotai";
|
|
|
8
7
|
* @returns An atom that broadcasts its value to other tabs/windows using the BroadcastChannel API.
|
|
9
8
|
*/
|
|
10
9
|
declare function atomWithBroadcast<TValue>(key: string, initialValueOrAtom: PrimitiveAtom<TValue> | TValue | WritableAtom<TValue, [SetStateAction<TValue>], void>): WritableAtom<TValue, [SetStateAction<TValue>], void>;
|
|
11
|
-
//#endregion
|
|
12
10
|
export { atomWithBroadcast };
|
|
13
11
|
//# sourceMappingURL=atom-with-broadcast.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"atom-with-broadcast.d.cts","names":[],"sources":["../../../src/base/atoms/atom-with-broadcast.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"atom-with-broadcast.d.cts","names":[],"sources":["../../../src/base/atoms/atom-with-broadcast.ts"],"mappings":";;;;;;;;iBA8BgB,kBAAkB,QAChC,aACA,oBACI,cAAc,UACd,SACA,aAAa,SAAS,eAAe,kBAAe,aAAA,SAAA,eAAA"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { PrimitiveAtom, SetStateAction, WritableAtom } from "jotai";
|
|
2
|
-
//#region src/base/atoms/atom-with-broadcast.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* Creates an atom that broadcasts its value to other tabs/windows using the BroadcastChannel API.
|
|
5
4
|
*
|
|
@@ -8,6 +7,5 @@ import { PrimitiveAtom, SetStateAction, WritableAtom } from "jotai";
|
|
|
8
7
|
* @returns An atom that broadcasts its value to other tabs/windows using the BroadcastChannel API.
|
|
9
8
|
*/
|
|
10
9
|
declare function atomWithBroadcast<TValue>(key: string, initialValueOrAtom: PrimitiveAtom<TValue> | TValue | WritableAtom<TValue, [SetStateAction<TValue>], void>): WritableAtom<TValue, [SetStateAction<TValue>], void>;
|
|
11
|
-
//#endregion
|
|
12
10
|
export { atomWithBroadcast };
|
|
13
11
|
//# sourceMappingURL=atom-with-broadcast.d.mts.map
|
|
@@ -2,7 +2,7 @@ import { isAtom } from "../utilities/is-atom.mjs";
|
|
|
2
2
|
import { baseAtom } from "./base-atom.mjs";
|
|
3
3
|
import { isFunction } from "@stryke/type-checks/is-function";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/base/atoms/atom-with-broadcast.ts
|
|
6
6
|
/**
|
|
7
7
|
* Creates an atom that broadcasts its value to other tabs/windows using the BroadcastChannel API.
|
|
8
8
|
*
|
|
@@ -41,6 +41,5 @@ function atomWithBroadcast(key, initialValueOrAtom) {
|
|
|
41
41
|
});
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
//#endregion
|
|
45
44
|
export { atomWithBroadcast };
|
|
46
45
|
//# sourceMappingURL=atom-with-broadcast.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
let jotai_utils = require("jotai/utils");
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/base/atoms/atom-with-compare.ts
|
|
4
4
|
function atomWithCompare(initialValue, areEqual) {
|
|
5
5
|
return (0, jotai_utils.atomWithReducer)(initialValue, (prev, next) => {
|
|
6
6
|
if (areEqual(prev, next)) return prev;
|
|
@@ -8,5 +8,4 @@ function atomWithCompare(initialValue, areEqual) {
|
|
|
8
8
|
});
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
//#endregion
|
|
12
11
|
exports.atomWithCompare = atomWithCompare;
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
//#region src/base/atoms/atom-with-compare.d.ts
|
|
2
1
|
declare function atomWithCompare<TValue>(initialValue: TValue, areEqual: (prev: TValue, next: TValue) => boolean): import("jotai").WritableAtom<TValue, [TValue], void>;
|
|
3
|
-
//#endregion
|
|
4
2
|
export { atomWithCompare };
|
|
5
3
|
//# sourceMappingURL=atom-with-compare.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"atom-with-compare.d.cts","names":[],"sources":["../../../src/base/atoms/atom-with-compare.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"atom-with-compare.d.cts","names":[],"sources":["../../../src/base/atoms/atom-with-compare.ts"],"mappings":"A,iBAoBgB,gBAAgB,QAC9B,cAAc,QACd,WAAW,MAAM,QAAQ,MAAM,qCAAkB,aAAA,SAAA"}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
//#region src/base/atoms/atom-with-compare.d.ts
|
|
2
1
|
declare function atomWithCompare<TValue>(initialValue: TValue, areEqual: (prev: TValue, next: TValue) => boolean): import("jotai").WritableAtom<TValue, [TValue], void>;
|
|
3
|
-
//#endregion
|
|
4
2
|
export { atomWithCompare };
|
|
5
3
|
//# sourceMappingURL=atom-with-compare.d.mts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { atomWithReducer } from "jotai/utils";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/base/atoms/atom-with-compare.ts
|
|
4
4
|
function atomWithCompare(initialValue, areEqual) {
|
|
5
5
|
return atomWithReducer(initialValue, (prev, next) => {
|
|
6
6
|
if (areEqual(prev, next)) return prev;
|
|
@@ -8,6 +8,5 @@ function atomWithCompare(initialValue, areEqual) {
|
|
|
8
8
|
});
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
//#endregion
|
|
12
11
|
export { atomWithCompare };
|
|
13
12
|
//# sourceMappingURL=atom-with-compare.mjs.map
|
|
@@ -4,7 +4,7 @@ const require_atom_with_wrapper = require("./atom-with-wrapper.cjs");
|
|
|
4
4
|
let _stryke_type_checks_is_function = require("@stryke/type-checks/is-function");
|
|
5
5
|
let jotai_utils = require("jotai/utils");
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
// src/base/atoms/atom-with-debounce.ts
|
|
8
8
|
function atomWithDebounce(initialValueOrAtom, debounceMs = 500, shouldDebounceOnReset = false) {
|
|
9
9
|
const prevTimeoutAtom = require_base_atom.baseAtom(void 0);
|
|
10
10
|
const initialValueAtom = require_is_atom.isAtom(initialValueOrAtom) ? initialValueOrAtom : require_atom_with_wrapper.atomWithWrapper(initialValueOrAtom);
|
|
@@ -48,5 +48,4 @@ function atomWithDebounce(initialValueOrAtom, debounceMs = 500, shouldDebounceOn
|
|
|
48
48
|
};
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
//#endregion
|
|
52
51
|
exports.atomWithDebounce = atomWithDebounce;
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { Atom, PrimitiveAtom, SetStateAction, WritableAtom } from "jotai";
|
|
2
2
|
import { RESET } from "jotai/utils";
|
|
3
|
-
//#region src/base/atoms/atom-with-debounce.d.ts
|
|
4
3
|
declare function atomWithDebounce<TValue = unknown>(initialValueOrAtom: Atom<TValue> | PrimitiveAtom<TValue> | TValue | WritableAtom<TValue, [SetStateAction<TValue> | typeof RESET], void>, debounceMs?: number, shouldDebounceOnReset?: boolean): {
|
|
5
4
|
clearTimeoutAtom: WritableAtom<null, [], void>;
|
|
6
5
|
currentValueAtom: Atom<TValue>;
|
|
7
6
|
debouncedValueAtom: WritableAtom<TValue, [SetStateAction<TValue> | typeof RESET], void>;
|
|
8
7
|
isDebouncingAtom: PrimitiveAtom<boolean>;
|
|
9
8
|
};
|
|
10
|
-
//#endregion
|
|
11
9
|
export { atomWithDebounce };
|
|
12
10
|
//# sourceMappingURL=atom-with-debounce.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"atom-with-debounce.d.cts","names":[],"sources":["../../../src/base/atoms/atom-with-debounce.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"atom-with-debounce.d.cts","names":[],"sources":["../../../src/base/atoms/atom-with-debounce.ts"],"mappings":";;iBA2BgB,iBAAiB,kBAC/B,oBACI,KAAK,UACL,cAAc,UACd,SACA,aAAa,SAAS,eAAe,iBAAiB,eAC1D,qBACA;EAEA,kBAAkB;EAClB,kBAAkB,KAAK;EACvB,oBAAoB,aAClB,SACC,eAAe,iBAAiB;EAGnC,kBAAkB"}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { RESET } from "jotai/utils";
|
|
2
2
|
import { Atom, PrimitiveAtom, SetStateAction, WritableAtom } from "jotai";
|
|
3
|
-
//#region src/base/atoms/atom-with-debounce.d.ts
|
|
4
3
|
declare function atomWithDebounce<TValue = unknown>(initialValueOrAtom: Atom<TValue> | PrimitiveAtom<TValue> | TValue | WritableAtom<TValue, [SetStateAction<TValue> | typeof RESET], void>, debounceMs?: number, shouldDebounceOnReset?: boolean): {
|
|
5
4
|
clearTimeoutAtom: WritableAtom<null, [], void>;
|
|
6
5
|
currentValueAtom: Atom<TValue>;
|
|
7
6
|
debouncedValueAtom: WritableAtom<TValue, [SetStateAction<TValue> | typeof RESET], void>;
|
|
8
7
|
isDebouncingAtom: PrimitiveAtom<boolean>;
|
|
9
8
|
};
|
|
10
|
-
//#endregion
|
|
11
9
|
export { atomWithDebounce };
|
|
12
10
|
//# sourceMappingURL=atom-with-debounce.d.mts.map
|
|
@@ -4,7 +4,7 @@ import { atomWithWrapper } from "./atom-with-wrapper.mjs";
|
|
|
4
4
|
import { isFunction } from "@stryke/type-checks/is-function";
|
|
5
5
|
import { RESET } from "jotai/utils";
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
// src/base/atoms/atom-with-debounce.ts
|
|
8
8
|
function atomWithDebounce(initialValueOrAtom, debounceMs = 500, shouldDebounceOnReset = false) {
|
|
9
9
|
const prevTimeoutAtom = baseAtom(void 0);
|
|
10
10
|
const initialValueAtom = isAtom(initialValueOrAtom) ? initialValueOrAtom : atomWithWrapper(initialValueOrAtom);
|
|
@@ -48,6 +48,5 @@ function atomWithDebounce(initialValueOrAtom, debounceMs = 500, shouldDebounceOn
|
|
|
48
48
|
};
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
//#endregion
|
|
52
51
|
export { atomWithDebounce };
|
|
53
52
|
//# sourceMappingURL=atom-with-debounce.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
let jotai_vanilla = require("jotai/vanilla");
|
|
2
2
|
let _stryke_helpers_is_equal = require("@stryke/helpers/is-equal");
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/base/atoms/atom-with-effect.ts
|
|
5
5
|
function atomWithEffect(effect) {
|
|
6
6
|
const refreshAtom = (0, jotai_vanilla.atom)(0);
|
|
7
7
|
const refAtom = (0, jotai_vanilla.atom)(() => ({
|
|
@@ -119,5 +119,4 @@ function atomWithEffect(effect) {
|
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
121
|
|
|
122
|
-
//#endregion
|
|
123
122
|
exports.atomWithEffect = atomWithEffect;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Atom, Getter, Setter } from "jotai/vanilla";
|
|
2
|
-
//#region src/base/atoms/atom-with-effect.d.ts
|
|
3
2
|
type Cleanup = () => void;
|
|
4
3
|
type GetterWithPeek = Getter & {
|
|
5
4
|
peek: Getter;
|
|
@@ -9,6 +8,5 @@ type SetterWithRecurse = Setter & {
|
|
|
9
8
|
};
|
|
10
9
|
type EffectCallback = (get: GetterWithPeek, set: SetterWithRecurse) => void | Cleanup;
|
|
11
10
|
declare function atomWithEffect(effect: EffectCallback): Atom<void>;
|
|
12
|
-
//#endregion
|
|
13
11
|
export { EffectCallback, atomWithEffect };
|
|
14
12
|
//# sourceMappingURL=atom-with-effect.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"atom-with-effect.d.cts","names":[],"sources":["../../../src/base/atoms/atom-with-effect.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"atom-with-effect.d.cts","names":[],"sources":["../../../src/base/atoms/atom-with-effect.ts"],"mappings":";KAwBK;KACA,iBAAiB;EAAW,MAAM;;KAClC,oBAAoB;EAAW,SAAS;;KAcjC,kBACV,KAAK,gBACL,KAAK,6BACK;iBAEI,eAAe,QAAQ,iBAAiB"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Atom, Getter, Setter } from "jotai/vanilla";
|
|
2
|
-
//#region src/base/atoms/atom-with-effect.d.ts
|
|
3
2
|
type Cleanup = () => void;
|
|
4
3
|
type GetterWithPeek = Getter & {
|
|
5
4
|
peek: Getter;
|
|
@@ -9,6 +8,5 @@ type SetterWithRecurse = Setter & {
|
|
|
9
8
|
};
|
|
10
9
|
type EffectCallback = (get: GetterWithPeek, set: SetterWithRecurse) => void | Cleanup;
|
|
11
10
|
declare function atomWithEffect(effect: EffectCallback): Atom<void>;
|
|
12
|
-
//#endregion
|
|
13
11
|
export { EffectCallback, atomWithEffect };
|
|
14
12
|
//# sourceMappingURL=atom-with-effect.d.mts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { atom } from "jotai/vanilla";
|
|
2
2
|
import { isEqual } from "@stryke/helpers/is-equal";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/base/atoms/atom-with-effect.ts
|
|
5
5
|
function atomWithEffect(effect) {
|
|
6
6
|
const refreshAtom = atom(0);
|
|
7
7
|
const refAtom = atom(() => ({
|
|
@@ -116,6 +116,5 @@ function atomWithEffect(effect) {
|
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
-
//#endregion
|
|
120
119
|
export { atomWithEffect };
|
|
121
120
|
//# sourceMappingURL=atom-with-effect.mjs.map
|
|
@@ -3,7 +3,7 @@ const require_base_atom = require("./base-atom.cjs");
|
|
|
3
3
|
let jotai = require("jotai");
|
|
4
4
|
let react = require("react");
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
// src/base/atoms/atom-with-listeners.ts
|
|
7
7
|
/**
|
|
8
8
|
* Creates an atom that broadcasts its value to other tabs/windows using the BroadcastChannel API.
|
|
9
9
|
*
|
|
@@ -32,5 +32,4 @@ function atomWithListeners(initialValue) {
|
|
|
32
32
|
return [anAtom, useListener];
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
//#endregion
|
|
36
35
|
exports.atomWithListeners = atomWithListeners;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Getter, SetStateAction, Setter, WritableAtom } from "jotai/vanilla";
|
|
2
|
-
//#region src/base/atoms/atom-with-listeners.d.ts
|
|
3
2
|
type Callback<Value> = (get: Getter, set: Setter, newVal: Value, prevVal: Value) => void;
|
|
4
3
|
/**
|
|
5
4
|
* Creates an atom that broadcasts its value to other tabs/windows using the BroadcastChannel API.
|
|
@@ -8,6 +7,5 @@ type Callback<Value> = (get: Getter, set: Setter, newVal: Value, prevVal: Value)
|
|
|
8
7
|
* @returns An atom that broadcasts its value to other tabs/windows using the BroadcastChannel API.
|
|
9
8
|
*/
|
|
10
9
|
declare function atomWithListeners<TValue>(initialValue: TValue | WritableAtom<TValue, any, Promise<void> | void>): readonly [WritableAtom<TValue, [arg: SetStateAction<TValue>], void>, (callback: Callback<TValue>) => void];
|
|
11
|
-
//#endregion
|
|
12
10
|
export { Callback, atomWithListeners };
|
|
13
11
|
//# sourceMappingURL=atom-with-listeners.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"atom-with-listeners.d.cts","names":[],"sources":["../../../src/base/atoms/atom-with-listeners.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"atom-with-listeners.d.cts","names":[],"sources":["../../../src/base/atoms/atom-with-listeners.ts"],"mappings":";KA6BY,SAAS,UACnB,KAAK,QACL,KAAK,QACL,QAAQ,OACR,SAAS;;;;;;;iBASK,kBAAkB,QAChC,cAAc,SAAS,aAAa,aAAa,kCAAqB,aAAA,SAAA,KAAA,eAAA,kBAAA,UAkBvC,SAAS"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Getter, SetStateAction, Setter, WritableAtom } from "jotai/vanilla";
|
|
2
|
-
//#region src/base/atoms/atom-with-listeners.d.ts
|
|
3
2
|
type Callback<Value> = (get: Getter, set: Setter, newVal: Value, prevVal: Value) => void;
|
|
4
3
|
/**
|
|
5
4
|
* Creates an atom that broadcasts its value to other tabs/windows using the BroadcastChannel API.
|
|
@@ -8,6 +7,5 @@ type Callback<Value> = (get: Getter, set: Setter, newVal: Value, prevVal: Value)
|
|
|
8
7
|
* @returns An atom that broadcasts its value to other tabs/windows using the BroadcastChannel API.
|
|
9
8
|
*/
|
|
10
9
|
declare function atomWithListeners<TValue>(initialValue: TValue | WritableAtom<TValue, any, Promise<void> | void>): readonly [WritableAtom<TValue, [arg: SetStateAction<TValue>], void>, (callback: Callback<TValue>) => void];
|
|
11
|
-
//#endregion
|
|
12
10
|
export { Callback, atomWithListeners };
|
|
13
11
|
//# sourceMappingURL=atom-with-listeners.d.mts.map
|
|
@@ -3,7 +3,7 @@ import { baseAtom } from "./base-atom.mjs";
|
|
|
3
3
|
import { useSetAtom } from "jotai";
|
|
4
4
|
import { useEffect } from "react";
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
// src/base/atoms/atom-with-listeners.ts
|
|
7
7
|
/**
|
|
8
8
|
* Creates an atom that broadcasts its value to other tabs/windows using the BroadcastChannel API.
|
|
9
9
|
*
|
|
@@ -32,6 +32,5 @@ function atomWithListeners(initialValue) {
|
|
|
32
32
|
return [anAtom, useListener];
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
//#endregion
|
|
36
35
|
export { atomWithListeners };
|
|
37
36
|
//# sourceMappingURL=atom-with-listeners.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const require_base_atom = require("./base-atom.cjs");
|
|
2
2
|
let _stryke_helpers_noop = require("@stryke/helpers/noop");
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/base/atoms/atom-with-pending.ts
|
|
5
5
|
const pendingPromise = new Promise(_stryke_helpers_noop.noop);
|
|
6
6
|
/**
|
|
7
7
|
* Creates an atom that always returns a pending promise.
|
|
@@ -10,5 +10,4 @@ const pendingPromise = new Promise(_stryke_helpers_noop.noop);
|
|
|
10
10
|
*/
|
|
11
11
|
const atomWithPending = () => require_base_atom.baseAtom(pendingPromise);
|
|
12
12
|
|
|
13
|
-
//#endregion
|
|
14
13
|
exports.atomWithPending = atomWithPending;
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { WithInitialValue } from "../../types.cjs";
|
|
2
2
|
import { PrimitiveAtom } from "jotai";
|
|
3
|
-
//#region src/base/atoms/atom-with-pending.d.ts
|
|
4
3
|
/**
|
|
5
4
|
* Creates an atom that always returns a pending promise.
|
|
6
5
|
*
|
|
7
6
|
* @returns An atom that always returns a pending promise.
|
|
8
7
|
*/
|
|
9
8
|
declare const atomWithPending: <Value>() => PrimitiveAtom<Value> & WithInitialValue<Value>;
|
|
10
|
-
//#endregion
|
|
11
9
|
export { atomWithPending };
|
|
12
10
|
//# sourceMappingURL=atom-with-pending.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"atom-with-pending.d.cts","names":[],"sources":["../../../src/base/atoms/atom-with-pending.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"atom-with-pending.d.cts","names":[],"sources":["../../../src/base/atoms/atom-with-pending.ts"],"mappings":";;;;;;;cA8Ba,kBAAmB,YAAU,cAAc,SACtD,iBAAiB"}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { WithInitialValue } from "../../types.mjs";
|
|
2
2
|
import { PrimitiveAtom } from "jotai";
|
|
3
|
-
//#region src/base/atoms/atom-with-pending.d.ts
|
|
4
3
|
/**
|
|
5
4
|
* Creates an atom that always returns a pending promise.
|
|
6
5
|
*
|
|
7
6
|
* @returns An atom that always returns a pending promise.
|
|
8
7
|
*/
|
|
9
8
|
declare const atomWithPending: <Value>() => PrimitiveAtom<Value> & WithInitialValue<Value>;
|
|
10
|
-
//#endregion
|
|
11
9
|
export { atomWithPending };
|
|
12
10
|
//# sourceMappingURL=atom-with-pending.d.mts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { baseAtom } from "./base-atom.mjs";
|
|
2
2
|
import { noop } from "@stryke/helpers/noop";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/base/atoms/atom-with-pending.ts
|
|
5
5
|
const pendingPromise = new Promise(noop);
|
|
6
6
|
/**
|
|
7
7
|
* Creates an atom that always returns a pending promise.
|
|
@@ -10,6 +10,5 @@ const pendingPromise = new Promise(noop);
|
|
|
10
10
|
*/
|
|
11
11
|
const atomWithPending = () => baseAtom(pendingPromise);
|
|
12
12
|
|
|
13
|
-
//#endregion
|
|
14
13
|
export { atomWithPending };
|
|
15
14
|
//# sourceMappingURL=atom-with-pending.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_base_atom = require("./base-atom.cjs");
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/base/atoms/atom-with-refresh-and-default.ts
|
|
4
4
|
const atomWithRefreshAndDefault = (refreshAtom, getDefault) => {
|
|
5
5
|
const overwrittenAtom = require_base_atom.baseAtom(null);
|
|
6
6
|
return require_base_atom.baseAtom((get) => {
|
|
@@ -15,5 +15,4 @@ const atomWithRefreshAndDefault = (refreshAtom, getDefault) => {
|
|
|
15
15
|
});
|
|
16
16
|
};
|
|
17
17
|
|
|
18
|
-
//#endregion
|
|
19
18
|
exports.atomWithRefreshAndDefault = atomWithRefreshAndDefault;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { Getter, PrimitiveAtom } from "jotai";
|
|
2
|
-
//#region src/base/atoms/atom-with-refresh-and-default.d.ts
|
|
3
2
|
declare const atomWithRefreshAndDefault: <TValue>(refreshAtom: PrimitiveAtom<number>, getDefault: (get: Getter) => TValue) => import("jotai").WritableAtom<TValue, [update: TValue], void>;
|
|
4
|
-
//#endregion
|
|
5
3
|
export { atomWithRefreshAndDefault };
|
|
6
4
|
//# sourceMappingURL=atom-with-refresh-and-default.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"atom-with-refresh-and-default.d.cts","names":[],"sources":["../../../src/base/atoms/atom-with-refresh-and-default.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"atom-with-refresh-and-default.d.cts","names":[],"sources":["../../../src/base/atoms/atom-with-refresh-and-default.ts"],"mappings":";cAqBa,4BAA6B,QACxC,aAAa,uBACb,aAAa,KAAK,WAAW,2BAAM,aAAA,SAAA,QAAA"}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { Getter, PrimitiveAtom } from "jotai";
|
|
2
|
-
//#region src/base/atoms/atom-with-refresh-and-default.d.ts
|
|
3
2
|
declare const atomWithRefreshAndDefault: <TValue>(refreshAtom: PrimitiveAtom<number>, getDefault: (get: Getter) => TValue) => import("jotai").WritableAtom<TValue, [update: TValue], void>;
|
|
4
|
-
//#endregion
|
|
5
3
|
export { atomWithRefreshAndDefault };
|
|
6
4
|
//# sourceMappingURL=atom-with-refresh-and-default.d.mts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { baseAtom } from "./base-atom.mjs";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/base/atoms/atom-with-refresh-and-default.ts
|
|
4
4
|
const atomWithRefreshAndDefault = (refreshAtom, getDefault) => {
|
|
5
5
|
const overwrittenAtom = baseAtom(null);
|
|
6
6
|
return baseAtom((get) => {
|
|
@@ -15,6 +15,5 @@ const atomWithRefreshAndDefault = (refreshAtom, getDefault) => {
|
|
|
15
15
|
});
|
|
16
16
|
};
|
|
17
17
|
|
|
18
|
-
//#endregion
|
|
19
18
|
export { atomWithRefreshAndDefault };
|
|
20
19
|
//# sourceMappingURL=atom-with-refresh-and-default.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_base_atom = require("./base-atom.cjs");
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/base/atoms/atom-with-refresh.ts
|
|
4
4
|
function atomWithRefresh(fn) {
|
|
5
5
|
const refreshCounter = require_base_atom.baseAtom(0);
|
|
6
6
|
return require_base_atom.baseAtom((get) => {
|
|
@@ -9,5 +9,4 @@ function atomWithRefresh(fn) {
|
|
|
9
9
|
}, (_, set) => set(refreshCounter, (i) => i + 1));
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
//#endregion
|
|
13
12
|
exports.atomWithRefresh = atomWithRefresh;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { Getter } from "jotai";
|
|
2
|
-
//#region src/base/atoms/atom-with-refresh.d.ts
|
|
3
2
|
declare function atomWithRefresh<TValue>(fn: (get: Getter) => TValue): import("jotai").WritableAtom<TValue, [], void>;
|
|
4
|
-
//#endregion
|
|
5
3
|
export { atomWithRefresh };
|
|
6
4
|
//# sourceMappingURL=atom-with-refresh.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"atom-with-refresh.d.cts","names":[],"sources":["../../../src/base/atoms/atom-with-refresh.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"atom-with-refresh.d.cts","names":[],"sources":["../../../src/base/atoms/atom-with-refresh.ts"],"mappings":";iBAqBgB,gBAAgB,QAAQ,KAAK,KAAK,WAAW,yBAAM,aAAA"}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { Getter } from "jotai";
|
|
2
|
-
//#region src/base/atoms/atom-with-refresh.d.ts
|
|
3
2
|
declare function atomWithRefresh<TValue>(fn: (get: Getter) => TValue): import("jotai").WritableAtom<TValue, [], void>;
|
|
4
|
-
//#endregion
|
|
5
3
|
export { atomWithRefresh };
|
|
6
4
|
//# sourceMappingURL=atom-with-refresh.d.mts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { baseAtom } from "./base-atom.mjs";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/base/atoms/atom-with-refresh.ts
|
|
4
4
|
function atomWithRefresh(fn) {
|
|
5
5
|
const refreshCounter = baseAtom(0);
|
|
6
6
|
return baseAtom((get) => {
|
|
@@ -9,6 +9,5 @@ function atomWithRefresh(fn) {
|
|
|
9
9
|
}, (_, set) => set(refreshCounter, (i) => i + 1));
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
//#endregion
|
|
13
12
|
export { atomWithRefresh };
|
|
14
13
|
//# sourceMappingURL=atom-with-refresh.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_base_atom = require("./base-atom.cjs");
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/base/atoms/atom-with-toggle.ts
|
|
4
4
|
function atomWithToggle(initialValue) {
|
|
5
5
|
const anAtom = require_base_atom.baseAtom(initialValue, (get, set, nextValue) => {
|
|
6
6
|
const update = nextValue ?? !get(anAtom);
|
|
@@ -9,5 +9,4 @@ function atomWithToggle(initialValue) {
|
|
|
9
9
|
return anAtom;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
//#endregion
|
|
13
12
|
exports.atomWithToggle = atomWithToggle;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { WritableAtom } from "jotai";
|
|
2
|
-
//#region src/base/atoms/atom-with-toggle.d.ts
|
|
3
2
|
declare function atomWithToggle(initialValue?: boolean): WritableAtom<boolean, [boolean | undefined], void>;
|
|
4
|
-
//#endregion
|
|
5
3
|
export { atomWithToggle };
|
|
6
4
|
//# sourceMappingURL=atom-with-toggle.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"atom-with-toggle.d.cts","names":[],"sources":["../../../src/base/atoms/atom-with-toggle.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"atom-with-toggle.d.cts","names":[],"sources":["../../../src/base/atoms/atom-with-toggle.ts"],"mappings":";iBAqBgB,eACd,yBACC"}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { WritableAtom } from "jotai";
|
|
2
|
-
//#region src/base/atoms/atom-with-toggle.d.ts
|
|
3
2
|
declare function atomWithToggle(initialValue?: boolean): WritableAtom<boolean, [boolean | undefined], void>;
|
|
4
|
-
//#endregion
|
|
5
3
|
export { atomWithToggle };
|
|
6
4
|
//# sourceMappingURL=atom-with-toggle.d.mts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { baseAtom } from "./base-atom.mjs";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/base/atoms/atom-with-toggle.ts
|
|
4
4
|
function atomWithToggle(initialValue) {
|
|
5
5
|
const anAtom = baseAtom(initialValue, (get, set, nextValue) => {
|
|
6
6
|
const update = nextValue ?? !get(anAtom);
|
|
@@ -9,6 +9,5 @@ function atomWithToggle(initialValue) {
|
|
|
9
9
|
return anAtom;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
//#endregion
|
|
13
12
|
export { atomWithToggle };
|
|
14
13
|
//# sourceMappingURL=atom-with-toggle.mjs.map
|
|
@@ -7,7 +7,7 @@ const require_create_web_storage = require("../utilities/create-web-storage.cjs"
|
|
|
7
7
|
let _stryke_type_checks_is_function = require("@stryke/type-checks/is-function");
|
|
8
8
|
let jotai_utils = require("jotai/utils");
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
// src/base/atoms/atom-with-web-storage.ts
|
|
11
11
|
const getWebStorage = () => require_create_web_storage.createWebStorage(() => localStorage);
|
|
12
12
|
/**
|
|
13
13
|
* Creates an atom that persists its state in external storage and sends a broadcast message to other tabs/windows when the state changes.
|
|
@@ -43,6 +43,5 @@ function atomWithWebStorage(key, initialValueOrAtom, webStorage = getWebStorage(
|
|
|
43
43
|
});
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
//#endregion
|
|
47
46
|
exports.atomWithWebStorage = atomWithWebStorage;
|
|
48
47
|
exports.getWebStorage = getWebStorage;
|
|
@@ -2,7 +2,6 @@ import { PrimitiveAtom, WritableAtom } from "jotai";
|
|
|
2
2
|
import { atomWithStorage } from "jotai/utils";
|
|
3
3
|
import { AsyncStorage, SyncStorage } from "jotai/vanilla/utils/atomWithStorage";
|
|
4
4
|
import { SetStateAction as SetStateAction$1 } from "react";
|
|
5
|
-
//#region src/base/atoms/atom-with-web-storage.d.ts
|
|
6
5
|
declare const getWebStorage: <TValue>() => AsyncStorage<TValue> | SyncStorage<TValue>;
|
|
7
6
|
/**
|
|
8
7
|
* Creates an atom that persists its state in external storage and sends a broadcast message to other tabs/windows when the state changes.
|
|
@@ -15,6 +14,5 @@ declare const getWebStorage: <TValue>() => AsyncStorage<TValue> | SyncStorage<TV
|
|
|
15
14
|
declare function atomWithWebStorage<TValue>(key: string, initialValueOrAtom: PrimitiveAtom<TValue> | TValue | WritableAtom<TValue, [SetStateAction$1<TValue>], void>, webStorage?: AsyncStorage<TValue> | SyncStorage<TValue>, options?: {
|
|
16
15
|
debounceMs?: number;
|
|
17
16
|
} & Parameters<typeof atomWithStorage>[3]): WritableAtom<TValue, [SetStateAction$1<TValue>], void>;
|
|
18
|
-
//#endregion
|
|
19
17
|
export { atomWithWebStorage, getWebStorage };
|
|
20
18
|
//# sourceMappingURL=atom-with-web-storage.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"atom-with-web-storage.d.cts","names":["SetStateAction"],"sources":["../../../src/base/atoms/atom-with-web-storage.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"atom-with-web-storage.d.cts","names":["SetStateAction"],"sources":["../../../src/base/atoms/atom-with-web-storage.ts"],"mappings":";;;;cAiCa,gBAAiB,aAC5B,aAAa,UAAU,YAAY;;;;;;;;;iBAWrB,mBAAmB,QACjC,aACA,oBACI,cAAc,UACd,SACA,aAAa,SAASA,iBAAe,iBACzC,aACE,aAAa,UAAU,YAAY,SACrC;EAAY;IAAwB,kBAAkB,sBACrD,aAAa,SAASA,iBAAe"}
|
|
@@ -2,7 +2,6 @@ import { atomWithStorage } from "jotai/utils";
|
|
|
2
2
|
import { PrimitiveAtom, WritableAtom } from "jotai";
|
|
3
3
|
import { SetStateAction as SetStateAction$1 } from "react";
|
|
4
4
|
import { AsyncStorage, SyncStorage } from "jotai/vanilla/utils/atomWithStorage";
|
|
5
|
-
//#region src/base/atoms/atom-with-web-storage.d.ts
|
|
6
5
|
declare const getWebStorage: <TValue>() => AsyncStorage<TValue> | SyncStorage<TValue>;
|
|
7
6
|
/**
|
|
8
7
|
* Creates an atom that persists its state in external storage and sends a broadcast message to other tabs/windows when the state changes.
|
|
@@ -15,6 +14,5 @@ declare const getWebStorage: <TValue>() => AsyncStorage<TValue> | SyncStorage<TV
|
|
|
15
14
|
declare function atomWithWebStorage<TValue>(key: string, initialValueOrAtom: PrimitiveAtom<TValue> | TValue | WritableAtom<TValue, [SetStateAction$1<TValue>], void>, webStorage?: AsyncStorage<TValue> | SyncStorage<TValue>, options?: {
|
|
16
15
|
debounceMs?: number;
|
|
17
16
|
} & Parameters<typeof atomWithStorage>[3]): WritableAtom<TValue, [SetStateAction$1<TValue>], void>;
|
|
18
|
-
//#endregion
|
|
19
17
|
export { atomWithWebStorage, getWebStorage };
|
|
20
18
|
//# sourceMappingURL=atom-with-web-storage.d.mts.map
|