@yakocloud/state-vocab 1.0.2 → 1.0.4

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 (2) hide show
  1. package/README.md +3 -3
  2. package/package.json +2 -1
package/README.md CHANGED
@@ -10,7 +10,7 @@ Most state managers treat persistence as an afterthought — you manage state fi
10
10
 
11
11
  ```ts
12
12
  // declare once — works everywhere
13
- const storage = createRouter({
13
+ const storage = setupStorage({
14
14
  theme: defineState({ storage: localStorage, defaultValue: 'Dark' }),
15
15
  session: defineState({ storage: sessionStorage }),
16
16
  inMemory: defineState({ defaultValue: 0 }),
@@ -61,7 +61,7 @@ const [birthday, setBirthday] = storage.personal.birthday.useState()
61
61
  // ^? Date | null
62
62
  ```
63
63
 
64
- If you rename or restructure a node in `createRouter`, TypeScript immediately flags every broken reference across the codebase.
64
+ If you rename or restructure a node in `setupStorage`, TypeScript immediately flags every broken reference across the codebase.
65
65
 
66
66
  **Custom serialization per node.** Dates, Maps, class instances — define `serialize`/`deserialize` once and the hook handles the rest transparently.
67
67
 
@@ -72,7 +72,7 @@ defineState({
72
72
  })
73
73
  ```
74
74
 
75
- **Minimal API surface.** Three exports: `defineState`, `createRouter`, `StorageProvider`. No actions, reducers, selectors, or stores to configure.
75
+ **Minimal API surface.** Three exports: `defineState`, `setupStorage`, `StorageProvider`. No actions, reducers, selectors, or stores to configure.
76
76
 
77
77
  ## Installation
78
78
 
package/package.json CHANGED
@@ -1,9 +1,10 @@
1
1
  {
2
2
  "name": "@yakocloud/state-vocab",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "main": "dist/state-vocab.cjs.js",
5
5
  "module": "dist/state-vocab.es.js",
6
6
  "types": "dist/types/index.d.ts",
7
+ "license": "MIT",
7
8
  "files": [
8
9
  "dist"
9
10
  ],