juststore 1.0.0 → 1.0.1
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/utils.d.ts +4 -4
- package/package.json +2 -2
package/dist/utils.d.ts
CHANGED
|
@@ -5,11 +5,11 @@ type AtomLike<T> = Pick<Atom<T> | ValueState<T>, 'use' | 'set' | 'value'>;
|
|
|
5
5
|
type ReadOnlyAtomLike<T> = Pick<Atom<T> | ValueState<T>, 'use' | 'value'>;
|
|
6
6
|
type RenderProps<State extends ReadOnlyAtomLike<unknown>> = {
|
|
7
7
|
state: State;
|
|
8
|
-
children: (value:
|
|
8
|
+
children: (value: State['value']) => React.ReactNode;
|
|
9
9
|
};
|
|
10
10
|
type RenderWithUpdateProps<State extends AtomLike<unknown>> = {
|
|
11
11
|
state: State;
|
|
12
|
-
children: (value:
|
|
12
|
+
children: (value: State['value'], update: (value: StoreSetStateValue<State['value']>) => void) => React.ReactNode;
|
|
13
13
|
};
|
|
14
14
|
/**
|
|
15
15
|
* Renders the provided children function with the current value from the state.
|
|
@@ -46,6 +46,6 @@ declare function RenderWithUpdate<State extends AtomLike<unknown>>({ state, chil
|
|
|
46
46
|
*/
|
|
47
47
|
declare function Conditional<State extends ReadOnlyAtomLike<unknown>>({ state, on, children }: {
|
|
48
48
|
state: State;
|
|
49
|
-
on: (value:
|
|
50
|
-
children: (value:
|
|
49
|
+
on: (value: State['value']) => boolean;
|
|
50
|
+
children: (value: State['value']) => React.ReactNode;
|
|
51
51
|
}): import("react").ReactNode;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "juststore",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "A small, expressive, and type-safe state management library for React.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"scripts": {
|
|
28
28
|
"build": "bun --bun tsc",
|
|
29
29
|
"typecheck": "bun --bun tsc --noEmit",
|
|
30
|
-
"lint": "bun --bun biome",
|
|
30
|
+
"lint": "bun --bun biome check",
|
|
31
31
|
"format": "bun --bun biome format --write",
|
|
32
32
|
"format:check": "bun --bun biome format",
|
|
33
33
|
"prepublishOnly": "bun run build",
|