juststore 1.1.2 → 1.2.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/LICENSE +21 -661
- package/README.md +146 -168
- package/dist/atom.d.ts +1 -1
- package/dist/form.d.ts +1 -1
- package/dist/form.js +38 -20
- package/dist/impl.d.ts +1 -1
- package/dist/impl.js +1 -1
- package/dist/kv_store.d.ts +1 -1
- package/dist/kv_store.js +10 -2
- package/dist/memory.d.ts +1 -1
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js +1 -1
- package/package.json +61 -60
package/dist/memory.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { FieldValues } from './path';
|
|
2
2
|
import type { State, ValueState } from './types';
|
|
3
|
-
export { createMemoryStore,
|
|
3
|
+
export { createMemoryStore, type MemoryStore, useMemoryStore };
|
|
4
4
|
/**
|
|
5
5
|
* A component local store with React bindings.
|
|
6
6
|
*
|
package/dist/utils.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Atom } from './atom';
|
|
2
2
|
import type { StoreSetStateValue, ValueState } from './types';
|
|
3
|
-
export {
|
|
3
|
+
export { Conditional, ConditionalRender, Render, RenderWithUpdate };
|
|
4
4
|
type AtomLike<T> = Pick<Atom<T> | ValueState<T>, 'use' | 'set' | 'value'>;
|
|
5
5
|
type ReadOnlyAtomLike<T> = Pick<Atom<T> | ValueState<T>, 'use' | 'useCompute' | 'value'>;
|
|
6
6
|
type RenderProps<State extends ReadOnlyAtomLike<unknown>> = {
|
package/dist/utils.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Activity, useCallback } from 'react';
|
|
3
|
-
export {
|
|
3
|
+
export { Conditional, ConditionalRender, Render, RenderWithUpdate };
|
|
4
4
|
/**
|
|
5
5
|
* Renders the provided children function with the current value from the state.
|
|
6
6
|
*
|
package/package.json
CHANGED
|
@@ -1,62 +1,63 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
2
|
+
"name": "juststore",
|
|
3
|
+
"version": "1.2.1",
|
|
4
|
+
"description": "A small, expressive, and type-safe state management library for React.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"hooks",
|
|
7
|
+
"react",
|
|
8
|
+
"react hooks",
|
|
9
|
+
"state",
|
|
10
|
+
"state management",
|
|
11
|
+
"store",
|
|
12
|
+
"typescript"
|
|
13
|
+
],
|
|
14
|
+
"homepage": "https://github.com/yusing/juststore",
|
|
15
|
+
"bugs": {
|
|
16
|
+
"url": "https://github.com/yusing/juststore/issues"
|
|
17
|
+
},
|
|
18
|
+
"license": "AGPL-3.0-only",
|
|
19
|
+
"author": "Yusing",
|
|
20
|
+
"repository": {
|
|
21
|
+
"type": "git",
|
|
22
|
+
"url": "git+https://github.com/yusing/juststore.git"
|
|
23
|
+
},
|
|
24
|
+
"files": [
|
|
25
|
+
"dist"
|
|
26
|
+
],
|
|
27
|
+
"type": "module",
|
|
28
|
+
"sideEffects": false,
|
|
29
|
+
"main": "dist/index.js",
|
|
30
|
+
"types": "dist/index.d.ts",
|
|
31
|
+
"exports": {
|
|
32
|
+
".": {
|
|
33
|
+
"types": "./dist/index.d.ts",
|
|
34
|
+
"import": "./dist/index.js"
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"scripts": {
|
|
38
|
+
"build": "bun --bun tsc",
|
|
39
|
+
"format": "oxfmt --write",
|
|
40
|
+
"format:check": "oxfmt",
|
|
41
|
+
"lint": "oxlint",
|
|
42
|
+
"prepare": "husky",
|
|
43
|
+
"prepublishOnly": "bun run build",
|
|
44
|
+
"typecheck": "bun --bun tsc --noEmit"
|
|
45
|
+
},
|
|
46
|
+
"dependencies": {
|
|
47
|
+
"change-case": "^5.4.4",
|
|
48
|
+
"react-fast-compare": "^3.2.2"
|
|
49
|
+
},
|
|
50
|
+
"devDependencies": {
|
|
51
|
+
"@eslint/js": "^10.0.1",
|
|
52
|
+
"@types/node": "^25.5.0",
|
|
53
|
+
"@types/react": "^19.2.14",
|
|
54
|
+
"husky": "^9.1.7",
|
|
55
|
+
"oxfmt": "^0.42.0",
|
|
56
|
+
"oxlint": "^1.57.0",
|
|
57
|
+
"react": "^19.2.4",
|
|
58
|
+
"typescript": "^6.0.2"
|
|
59
|
+
},
|
|
60
|
+
"peerDependencies": {
|
|
61
|
+
"react": ">=18.0.0"
|
|
62
|
+
}
|
|
62
63
|
}
|