storion 0.11.2 โ†’ 0.11.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.
package/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
  <h1 align="center">Storion</h1>
6
6
 
7
7
  <p align="center">
8
- <strong>State management that gets out of your way</strong>
8
+ <strong>State management that just works</strong>
9
9
  </p>
10
10
 
11
11
  <p align="center">
@@ -16,16 +16,14 @@
16
16
  </p>
17
17
 
18
18
  <p align="center">
19
- <a href="https://linq2js.github.io/storion/"><strong>๐Ÿ“š Documentation</strong></a> ยท
19
+ <a href="https://linq2js.github.io/storion/"><strong>๐Ÿ“š Docs</strong></a> ยท
20
20
  <a href="https://linq2js.github.io/storion/demos.html">Demos</a> ยท
21
21
  <a href="https://linq2js.github.io/storion/api/store.html">API</a> ยท
22
- <a href="https://linq2js.github.io/storion/guide/getting-started.html">Getting Started</a>
22
+ <a href="https://linq2js.github.io/storion/guide/getting-started.html">Get Started</a>
23
23
  </p>
24
24
 
25
25
  ---
26
26
 
27
- ## The Simplest Counter You'll Ever Write
28
-
29
27
  ```tsx
30
28
  import { create } from "storion/react";
31
29
 
@@ -38,45 +36,45 @@ const [_, useCounter] = create({
38
36
  });
39
37
 
40
38
  function Counter() {
41
- const { count, inc, dec } = useCounter((s, a) => ({ count: s.count, ...a }));
39
+ const { count, inc } = useCounter((s, a) => ({ count: s.count, ...a }));
42
40
  return <button onClick={inc}>{count}</button>;
43
41
  }
44
42
  ```
45
43
 
46
- **That's it.** No Provider. No boilerplate. No ceremony.
44
+ **No Provider. No boilerplate. It just works.**
47
45
 
48
46
  ---
49
47
 
50
- ## Why Storion?
48
+ ## Features
51
49
 
52
- | Pain Point | Storion's Answer |
53
- | ------------------------- | ----------------------------------------------- |
54
- | ๐Ÿคฏ Too much boilerplate | One `create()` call. Done. |
55
- | ๐ŸŒ Unnecessary re-renders | Auto-tracks what you read, updates only that |
56
- | ๐Ÿ˜ต Complex async handling | Built-in loading states, cancellation, Suspense |
57
- | ๐Ÿ”ง Provider hell | Optional. Use it when you need it |
58
- | ๐Ÿ“ฆ Bundle anxiety | ~4KB gzipped. Seriously. |
50
+ | Feature | Description |
51
+ | -------------------- | -------------------------------------------- |
52
+ | ๐ŸŽฏ **Auto-tracking** | Read state โ†’ subscribed automatically |
53
+ | โšก **Fine-grained** | Only changed state triggers re-renders |
54
+ | ๐Ÿ”’ **Type-safe** | Full TypeScript inference, zero manual types |
55
+ | ๐ŸŒŠ **Async-first** | Loading states, error handling, Suspense |
56
+ | ๐Ÿ› ๏ธ **DevTools** | Time-travel debugging built-in |
57
+ | ๐Ÿ“ฆ **~4KB** | Tiny bundle, no compromises |
59
58
 
60
59
  ---
61
60
 
62
- ## Features at a Glance
61
+ ## Install
63
62
 
64
- ```
65
- โœฆ Auto-tracking Read state โ†’ automatically subscribed
66
- โœฆ Fine-grained Change count? Only Counter re-renders
67
- โœฆ Type-safe Full inference, zero manual types
68
- โœฆ Async-first Loading, error, stale states built-in
69
- โœฆ DevTools Time-travel debugging included
70
- โœฆ Scalable From counter to enterprise, same API
63
+ ```bash
64
+ npm install storion
71
65
  ```
72
66
 
73
67
  ---
74
68
 
75
- ## Growing With You
69
+ ## Usage
70
+
71
+ ### Single Store
76
72
 
77
- **Start simple:**
73
+ For isolated features, widgets, or prototypes:
78
74
 
79
75
  ```tsx
76
+ import { create } from "storion/react";
77
+
80
78
  const [_, useAuth] = create({
81
79
  state: { user: null },
82
80
  setup: ({ state }) => ({
@@ -90,49 +88,99 @@ const [_, useAuth] = create({
90
88
  });
91
89
  ```
92
90
 
93
- **Add async when ready:**
91
+ ### Multiple Stores
92
+
93
+ For apps with shared state (auth, cart, users):
94
94
 
95
95
  ```tsx
96
- const [_, useUsers] = create({
97
- state: { users: async.stale([]) },
98
- setup: ({ focus }) => {
99
- const query = async(focus("users"), (ctx) =>
100
- fetch("/api/users", { signal: ctx.signal }).then((r) => r.json())
101
- );
102
- return { fetch: query.dispatch, refresh: query.refresh };
96
+ import { store, container, StoreProvider, useStore } from "storion/react";
97
+
98
+ const authStore = store({
99
+ name: "auth",
100
+ state: { user: null },
101
+ setup: ({ state }) => ({
102
+ login: (user) => {
103
+ state.user = user;
104
+ },
105
+ logout: () => {
106
+ state.user = null;
107
+ },
108
+ }),
109
+ });
110
+
111
+ const cartStore = store({
112
+ name: "cart",
113
+ state: { items: [] },
114
+ setup: ({ state, get }) => {
115
+ const [auth] = get(authStore); // Cross-store access
116
+ return {
117
+ add: (item) => {
118
+ state.items.push(item);
119
+ },
120
+ clear: () => {
121
+ state.items = [];
122
+ },
123
+ };
103
124
  },
104
125
  });
126
+
127
+ const app = container();
128
+
129
+ function App() {
130
+ return (
131
+ <StoreProvider container={app}>
132
+ <Shop />
133
+ </StoreProvider>
134
+ );
135
+ }
136
+
137
+ function Shop() {
138
+ const { items, add } = useStore(({ get }) => {
139
+ const [state, actions] = get(cartStore);
140
+ return { items: state.items, add: actions.add };
141
+ });
142
+ // ...
143
+ }
105
144
  ```
106
145
 
107
- **Scale to multi-store apps:**
146
+ ### Async Data
108
147
 
109
148
  ```tsx
110
- // When you need shared containers, dependency injection, middleware...
111
- <StoreProvider>
112
- <App />
113
- </StoreProvider>
149
+ import { store } from "storion/react";
150
+ import { async } from "storion/async";
151
+
152
+ const usersStore = store({
153
+ name: "users",
154
+ state: { users: async.fresh([]) },
155
+ setup: ({ focus }) => {
156
+ const query = async(focus("users"), async (ctx) => {
157
+ const res = await fetch("/api/users", { signal: ctx.signal });
158
+ return res.json();
159
+ });
160
+ return { fetch: query.dispatch, refresh: query.refresh };
161
+ },
162
+ });
114
163
  ```
115
164
 
116
165
  ---
117
166
 
118
- ## Documentation
119
-
120
- ๐Ÿ“š **[Full Documentation](https://linq2js.github.io/storion/)** โ€” Everything you need
167
+ ## When to Use What
121
168
 
122
- - [Getting Started](https://linq2js.github.io/storion/guide/getting-started.html) โ€” 5 min setup
123
- - [Core Concepts](https://linq2js.github.io/storion/guide/core-concepts.html) โ€” How it works
124
- - [Async State](https://linq2js.github.io/storion/guide/async.html) โ€” Loading states made easy
125
- - [API Reference](https://linq2js.github.io/storion/api/store.html) โ€” Every function documented
126
- - [Live Demos](https://linq2js.github.io/storion/demos.html) โ€” See it in action
169
+ | Scenario | Use |
170
+ | --------------------- | --------------------------- |
171
+ | Single feature/widget | `create()` |
172
+ | Multiple stores | `store()` + `container()` |
173
+ | Testing with mocks | `container()` + `app.set()` |
174
+ | Persistence | `app.use(persist())` |
127
175
 
128
176
  ---
129
177
 
130
- ## License
178
+ ## Documentation
131
179
 
132
- MIT ยฉ [linq2js](https://github.com/linq2js)
180
+ ๐Ÿ“š **[Full Docs](https://linq2js.github.io/storion/)** โ€” [Get Started](https://linq2js.github.io/storion/guide/getting-started.html) ยท [Core Concepts](https://linq2js.github.io/storion/guide/core-concepts.html) ยท [Async](https://linq2js.github.io/storion/guide/async.html) ยท [API](https://linq2js.github.io/storion/api/store.html) ยท [Demos](https://linq2js.github.io/storion/demos.html)
133
181
 
134
182
  ---
135
183
 
136
- <p align="center">
137
- <sub>Built with โค๏ธ for developers who value simplicity</sub>
138
- </p>
184
+ ## License
185
+
186
+ MIT ยฉ [linq2js](https://github.com/linq2js)
@@ -1,5 +1,5 @@
1
- import { r as retryStrategy } from "../effect-BfoYEdFF.js";
2
- import { d, A, b, a, c, i } from "../effect-BfoYEdFF.js";
1
+ import { r as retryStrategy } from "../effect-B7Iv8NQf.js";
2
+ import { d, A, b, a, c, i } from "../effect-B7Iv8NQf.js";
3
3
  function retry(retriesOrStrategyOrOptions) {
4
4
  const options = typeof retriesOrStrategyOrOptions === "number" ? { retries: retriesOrStrategyOrOptions } : typeof retriesOrStrategyOrOptions === "string" ? { delay: retriesOrStrategyOrOptions } : retriesOrStrategyOrOptions ?? {};
5
5
  const retries = options.retries ?? 3;
@@ -2287,6 +2287,33 @@ function pool(createItem, optionsOrInitial) {
2287
2287
  const keyOf = options == null ? void 0 : options.keyOf;
2288
2288
  const keyEquality = (options == null ? void 0 : options.equality) && !keyOf ? resolveEquality(options.equality) : null;
2289
2289
  const shouldAutoDispose = !!(options == null ? void 0 : options.autoDispose);
2290
+ const onAdded = emitter();
2291
+ const onRemoved = emitter();
2292
+ const dispatchEvent = (event) => {
2293
+ if (event.type === "add") {
2294
+ onAdded.emit(event);
2295
+ } else {
2296
+ onRemoved.emit(event);
2297
+ }
2298
+ };
2299
+ function on(listener) {
2300
+ const unsubscribeAdded = onAdded.on(listener);
2301
+ const unsubscribeRemoved = onRemoved.on(listener);
2302
+ return () => {
2303
+ unsubscribeAdded();
2304
+ unsubscribeRemoved();
2305
+ };
2306
+ }
2307
+ if (options == null ? void 0 : options.onAdded) {
2308
+ onAdded.on(options.onAdded);
2309
+ }
2310
+ if (options == null ? void 0 : options.onRemoved) {
2311
+ onRemoved.on(options.onRemoved);
2312
+ }
2313
+ if (options == null ? void 0 : options.onChanged) {
2314
+ onAdded.on(options.onChanged);
2315
+ onRemoved.on(options.onChanged);
2316
+ }
2290
2317
  if (keyOf) {
2291
2318
  const map2 = /* @__PURE__ */ new Map();
2292
2319
  for (const [k, v] of initial ?? []) {
@@ -2298,6 +2325,11 @@ function pool(createItem, optionsOrInitial) {
2298
2325
  if (entry) return entry.value;
2299
2326
  const value = createItem(key);
2300
2327
  map2.set(hash, { key, value });
2328
+ dispatchEvent({
2329
+ key,
2330
+ value,
2331
+ type: "add"
2332
+ });
2301
2333
  return value;
2302
2334
  };
2303
2335
  return Object.assign(get22, {
@@ -2310,22 +2342,38 @@ function pool(createItem, optionsOrInitial) {
2310
2342
  get: get22,
2311
2343
  set(key, value) {
2312
2344
  const hash = keyOf(key);
2313
- if (shouldAutoDispose) {
2314
- const existing = map2.get(hash);
2315
- if (existing && existing.value !== value) {
2316
- tryDispose(existing.value);
2317
- }
2345
+ const existing = map2.get(hash);
2346
+ const isNew = !existing;
2347
+ if (shouldAutoDispose && existing && existing.value !== value) {
2348
+ tryDispose(existing.value);
2349
+ }
2350
+ if (existing && existing.value !== value) {
2351
+ dispatchEvent({
2352
+ key: existing.key,
2353
+ value: existing.value,
2354
+ type: "remove"
2355
+ });
2318
2356
  }
2319
2357
  map2.set(hash, { key, value });
2358
+ if (isNew || (existing == null ? void 0 : existing.value) !== value) {
2359
+ dispatchEvent({ key, value, type: "add" });
2360
+ }
2320
2361
  return this;
2321
2362
  },
2322
2363
  size() {
2323
2364
  return map2.size;
2324
2365
  },
2325
2366
  clear() {
2326
- if (shouldAutoDispose) {
2367
+ if (shouldAutoDispose || onAdded.size > 0 || onRemoved.size > 0) {
2327
2368
  for (const entry of map2.values()) {
2328
- tryDispose(entry.value);
2369
+ if (shouldAutoDispose) {
2370
+ tryDispose(entry.value);
2371
+ }
2372
+ dispatchEvent({
2373
+ key: entry.key,
2374
+ value: entry.value,
2375
+ type: "remove"
2376
+ });
2329
2377
  }
2330
2378
  }
2331
2379
  map2.clear();
@@ -2333,9 +2381,16 @@ function pool(createItem, optionsOrInitial) {
2333
2381
  },
2334
2382
  delete(key) {
2335
2383
  const hash = keyOf(key);
2336
- if (shouldAutoDispose) {
2337
- const entry = map2.get(hash);
2338
- if (entry) tryDispose(entry.value);
2384
+ const entry = map2.get(hash);
2385
+ if (entry) {
2386
+ if (shouldAutoDispose) {
2387
+ tryDispose(entry.value);
2388
+ }
2389
+ dispatchEvent({
2390
+ key: entry.key,
2391
+ value: entry.value,
2392
+ type: "remove"
2393
+ });
2339
2394
  }
2340
2395
  map2.delete(hash);
2341
2396
  return this;
@@ -2349,7 +2404,8 @@ function pool(createItem, optionsOrInitial) {
2349
2404
  *entries() {
2350
2405
  for (const entry of map2.values())
2351
2406
  yield [entry.key, entry.value];
2352
- }
2407
+ },
2408
+ on
2353
2409
  });
2354
2410
  }
2355
2411
  const map = new Map(initial ?? []);
@@ -2367,6 +2423,11 @@ function pool(createItem, optionsOrInitial) {
2367
2423
  }
2368
2424
  const value = createItem(key);
2369
2425
  map.set(key, value);
2426
+ dispatchEvent({
2427
+ key,
2428
+ value,
2429
+ type: "add"
2430
+ });
2370
2431
  return value;
2371
2432
  };
2372
2433
  return Object.assign(get2, {
@@ -2386,15 +2447,32 @@ function pool(createItem, optionsOrInitial) {
2386
2447
  set(key, value) {
2387
2448
  const existingKey = findKey(key);
2388
2449
  if (existingKey !== void 0) {
2389
- if (shouldAutoDispose) {
2390
- const existing = map.get(existingKey);
2391
- if (existing !== value) {
2392
- tryDispose(existing);
2393
- }
2450
+ const existing = map.get(existingKey);
2451
+ if (shouldAutoDispose && existing !== void 0 && existing !== value) {
2452
+ tryDispose(existing);
2453
+ }
2454
+ if (existing !== void 0 && existing !== value) {
2455
+ dispatchEvent({
2456
+ key: existingKey,
2457
+ value: existing,
2458
+ type: "remove"
2459
+ });
2394
2460
  }
2395
2461
  map.set(existingKey, value);
2462
+ if (existing === void 0 || existing !== value) {
2463
+ dispatchEvent({
2464
+ key: existingKey,
2465
+ value,
2466
+ type: "add"
2467
+ });
2468
+ }
2396
2469
  } else {
2397
2470
  map.set(key, value);
2471
+ dispatchEvent({
2472
+ key,
2473
+ value,
2474
+ type: "add"
2475
+ });
2398
2476
  }
2399
2477
  return this;
2400
2478
  },
@@ -2404,9 +2482,16 @@ function pool(createItem, optionsOrInitial) {
2404
2482
  },
2405
2483
  /** Remove all items */
2406
2484
  clear() {
2407
- if (shouldAutoDispose) {
2408
- for (const value of map.values()) {
2409
- tryDispose(value);
2485
+ if (shouldAutoDispose || onAdded.size > 0 || onRemoved.size > 0) {
2486
+ for (const [key, value] of map.entries()) {
2487
+ if (shouldAutoDispose) {
2488
+ tryDispose(value);
2489
+ }
2490
+ dispatchEvent({
2491
+ key,
2492
+ value,
2493
+ type: "remove"
2494
+ });
2410
2495
  }
2411
2496
  }
2412
2497
  map.clear();
@@ -2416,8 +2501,16 @@ function pool(createItem, optionsOrInitial) {
2416
2501
  delete(key) {
2417
2502
  const existingKey = findKey(key);
2418
2503
  if (existingKey !== void 0) {
2419
- if (shouldAutoDispose) {
2420
- tryDispose(map.get(existingKey));
2504
+ const value = map.get(existingKey);
2505
+ if (value !== void 0) {
2506
+ if (shouldAutoDispose) {
2507
+ tryDispose(value);
2508
+ }
2509
+ dispatchEvent({
2510
+ key: existingKey,
2511
+ value,
2512
+ type: "remove"
2513
+ });
2421
2514
  }
2422
2515
  map.delete(existingKey);
2423
2516
  }
@@ -2434,7 +2527,8 @@ function pool(createItem, optionsOrInitial) {
2434
2527
  /** Iterate over [key, value] pairs */
2435
2528
  entries() {
2436
2529
  return map.entries();
2437
- }
2530
+ },
2531
+ on
2438
2532
  });
2439
2533
  }
2440
2534
  function store(options) {
package/dist/pool.d.ts CHANGED
@@ -26,6 +26,13 @@ export interface Pool<TKey, TValue> {
26
26
  values(): IterableIterator<TValue>;
27
27
  /** Iterate over [key, value] pairs. */
28
28
  entries(): IterableIterator<[TKey, TValue]>;
29
+ /** Subscribe to changes in the pool. */
30
+ on(listener: (event: PoolChangeEvent<TKey, TValue, "add" | "remove">) => void): VoidFunction;
31
+ }
32
+ export interface PoolChangeEvent<TKey, TValue, TType extends "add" | "remove"> {
33
+ key: TKey;
34
+ value: TValue;
35
+ type: TType;
29
36
  }
30
37
  export interface PoolOptions<TKey, TValue> {
31
38
  initial?: readonly [TKey, TValue][];
@@ -52,6 +59,18 @@ export interface PoolOptions<TKey, TValue> {
52
59
  * Automatically call dispose method of the item when it is removed from the pool.
53
60
  */
54
61
  autoDispose?: AutoDisposeOptions | boolean;
62
+ /**
63
+ * Called when an item is added to the pool.
64
+ */
65
+ onAdded?: (event: PoolChangeEvent<TKey, TValue, "add">) => void;
66
+ /**
67
+ * Called when an item is removed from the pool.
68
+ */
69
+ onRemoved?: (event: PoolChangeEvent<TKey, TValue, "remove">) => void;
70
+ /**
71
+ * Called when an item is added or removed from the pool.
72
+ */
73
+ onChanged?: (event: PoolChangeEvent<TKey, TValue, "add" | "remove">) => void;
55
74
  }
56
75
  /**
57
76
  * Lazy-instantiation Map wrapper.
@@ -1 +1 @@
1
- {"version":3,"file":"pool.d.ts","sourceRoot":"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AmBG;AACH,wBAAgB,IAAI,CAAC,MAAM,EAAE,IAAI,GAAG,OAAO,EACzC,UAAU,EAAE,CAAC,GAAG,EAAE,IAAI,KAAK,MAAM,EACjC,gBAAgB,CAAC,EAAE,WAAW,CAAC,IAAI,EAAE,MAAM,CAAC,GAAG,SAAS,CAAC,IAAI,EAAE,MAAM,CAAC,EAAE,GACvE,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC,CA+SpB"}
@@ -4,8 +4,8 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
4
4
  import { memo, useRef, useMemo, createElement, createContext, useContext, useId, useReducer, useState, useEffect, useLayoutEffect, forwardRef } from "react";
5
5
  import { container } from "../storion.js";
6
6
  import { append, applyExcept, applyFor, clamp, decrement, disposalGroup, divide, forStores, getNamedGroup, increment, list, map, merge, multiply, prepend, reset, resolver, toggle, trigger, withMeta } from "../storion.js";
7
- import { P as ProviderMissingError, w as withHooks, e as AsyncFunctionError, t as tryStabilize, s as strictEqual, S as ScopedOutsideSelectorError, f as storeTuple, g as isSpec, h as STORION_TYPE, j as dev, k as resolveEquality, l as store } from "../effect-BfoYEdFF.js";
8
- import { E, H, I, L, C, z, B, y, n, x, o, q, m, p, D, v, u } from "../effect-BfoYEdFF.js";
7
+ import { P as ProviderMissingError, w as withHooks, e as AsyncFunctionError, t as tryStabilize, s as strictEqual, S as ScopedOutsideSelectorError, f as storeTuple, g as isSpec, h as STORION_TYPE, j as dev, k as resolveEquality, l as store } from "../effect-B7Iv8NQf.js";
8
+ import { E, H, I, L, C, z, B, y, n, x, o, q, m, p, D, v, u } from "../effect-B7Iv8NQf.js";
9
9
  import { e as emitter } from "../emitter-j4rC71vY.js";
10
10
  import { jsx } from "react/jsx-runtime";
11
11
  import { m as m2 } from "../meta-40r-AZfe.js";
package/dist/storion.js CHANGED
@@ -1,5 +1,5 @@
1
- import { F as tryDispose, g as isSpec, u as untrack, h as STORION_TYPE, n as batch, G as unwrapFn, v as shallowEqual, k as resolveEquality } from "./effect-BfoYEdFF.js";
2
- import { e, E, H, I, L, C, P, z, B, y, x, o, q, m, p, D, l, s } from "./effect-BfoYEdFF.js";
1
+ import { F as tryDispose, g as isSpec, u as untrack, h as STORION_TYPE, n as batch, G as unwrapFn, v as shallowEqual, k as resolveEquality } from "./effect-B7Iv8NQf.js";
2
+ import { e, E, H, I, L, C, P, z, B, y, x, o, q, m, p, D, l, s } from "./effect-B7Iv8NQf.js";
3
3
  import { e as emitter } from "./emitter-j4rC71vY.js";
4
4
  import { m as m2 } from "./meta-40r-AZfe.js";
5
5
  function createMetaQuery(entries) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "storion",
3
- "version": "0.11.2",
3
+ "version": "0.11.4",
4
4
  "description": "Reactive stores for modern apps. Type-safe. Auto-tracked. Effortlessly composable",
5
5
  "type": "module",
6
6
  "main": "./dist/storion.js",