storion 0.11.2 โ†’ 0.11.3

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-QvO_JK_q.js";
2
+ import { d, A, b, a, c, i } from "../effect-QvO_JK_q.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,25 @@ 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
+ if (options == null ? void 0 : options.onAdded) {
2300
+ onAdded.on(options.onAdded);
2301
+ }
2302
+ if (options == null ? void 0 : options.onRemoved) {
2303
+ onRemoved.on(options.onRemoved);
2304
+ }
2305
+ if (options == null ? void 0 : options.onChanged) {
2306
+ onAdded.on(options.onChanged);
2307
+ onRemoved.on(options.onChanged);
2308
+ }
2290
2309
  if (keyOf) {
2291
2310
  const map2 = /* @__PURE__ */ new Map();
2292
2311
  for (const [k, v] of initial ?? []) {
@@ -2298,6 +2317,11 @@ function pool(createItem, optionsOrInitial) {
2298
2317
  if (entry) return entry.value;
2299
2318
  const value = createItem(key);
2300
2319
  map2.set(hash, { key, value });
2320
+ dispatchEvent({
2321
+ key,
2322
+ value,
2323
+ type: "add"
2324
+ });
2301
2325
  return value;
2302
2326
  };
2303
2327
  return Object.assign(get22, {
@@ -2310,22 +2334,38 @@ function pool(createItem, optionsOrInitial) {
2310
2334
  get: get22,
2311
2335
  set(key, value) {
2312
2336
  const hash = keyOf(key);
2313
- if (shouldAutoDispose) {
2314
- const existing = map2.get(hash);
2315
- if (existing && existing.value !== value) {
2316
- tryDispose(existing.value);
2317
- }
2337
+ const existing = map2.get(hash);
2338
+ const isNew = !existing;
2339
+ if (shouldAutoDispose && existing && existing.value !== value) {
2340
+ tryDispose(existing.value);
2341
+ }
2342
+ if (existing && existing.value !== value) {
2343
+ dispatchEvent({
2344
+ key: existing.key,
2345
+ value: existing.value,
2346
+ type: "remove"
2347
+ });
2318
2348
  }
2319
2349
  map2.set(hash, { key, value });
2350
+ if (isNew || (existing == null ? void 0 : existing.value) !== value) {
2351
+ dispatchEvent({ key, value, type: "add" });
2352
+ }
2320
2353
  return this;
2321
2354
  },
2322
2355
  size() {
2323
2356
  return map2.size;
2324
2357
  },
2325
2358
  clear() {
2326
- if (shouldAutoDispose) {
2359
+ if (shouldAutoDispose || onAdded.size > 0 || onRemoved.size > 0) {
2327
2360
  for (const entry of map2.values()) {
2328
- tryDispose(entry.value);
2361
+ if (shouldAutoDispose) {
2362
+ tryDispose(entry.value);
2363
+ }
2364
+ dispatchEvent({
2365
+ key: entry.key,
2366
+ value: entry.value,
2367
+ type: "remove"
2368
+ });
2329
2369
  }
2330
2370
  }
2331
2371
  map2.clear();
@@ -2333,9 +2373,16 @@ function pool(createItem, optionsOrInitial) {
2333
2373
  },
2334
2374
  delete(key) {
2335
2375
  const hash = keyOf(key);
2336
- if (shouldAutoDispose) {
2337
- const entry = map2.get(hash);
2338
- if (entry) tryDispose(entry.value);
2376
+ const entry = map2.get(hash);
2377
+ if (entry) {
2378
+ if (shouldAutoDispose) {
2379
+ tryDispose(entry.value);
2380
+ }
2381
+ dispatchEvent({
2382
+ key: entry.key,
2383
+ value: entry.value,
2384
+ type: "remove"
2385
+ });
2339
2386
  }
2340
2387
  map2.delete(hash);
2341
2388
  return this;
@@ -2367,6 +2414,11 @@ function pool(createItem, optionsOrInitial) {
2367
2414
  }
2368
2415
  const value = createItem(key);
2369
2416
  map.set(key, value);
2417
+ dispatchEvent({
2418
+ key,
2419
+ value,
2420
+ type: "add"
2421
+ });
2370
2422
  return value;
2371
2423
  };
2372
2424
  return Object.assign(get2, {
@@ -2386,15 +2438,32 @@ function pool(createItem, optionsOrInitial) {
2386
2438
  set(key, value) {
2387
2439
  const existingKey = findKey(key);
2388
2440
  if (existingKey !== void 0) {
2389
- if (shouldAutoDispose) {
2390
- const existing = map.get(existingKey);
2391
- if (existing !== value) {
2392
- tryDispose(existing);
2393
- }
2441
+ const existing = map.get(existingKey);
2442
+ if (shouldAutoDispose && existing !== void 0 && existing !== value) {
2443
+ tryDispose(existing);
2444
+ }
2445
+ if (existing !== void 0 && existing !== value) {
2446
+ dispatchEvent({
2447
+ key: existingKey,
2448
+ value: existing,
2449
+ type: "remove"
2450
+ });
2394
2451
  }
2395
2452
  map.set(existingKey, value);
2453
+ if (existing === void 0 || existing !== value) {
2454
+ dispatchEvent({
2455
+ key: existingKey,
2456
+ value,
2457
+ type: "add"
2458
+ });
2459
+ }
2396
2460
  } else {
2397
2461
  map.set(key, value);
2462
+ dispatchEvent({
2463
+ key,
2464
+ value,
2465
+ type: "add"
2466
+ });
2398
2467
  }
2399
2468
  return this;
2400
2469
  },
@@ -2404,9 +2473,16 @@ function pool(createItem, optionsOrInitial) {
2404
2473
  },
2405
2474
  /** Remove all items */
2406
2475
  clear() {
2407
- if (shouldAutoDispose) {
2408
- for (const value of map.values()) {
2409
- tryDispose(value);
2476
+ if (shouldAutoDispose || onAdded.size > 0 || onRemoved.size > 0) {
2477
+ for (const [key, value] of map.entries()) {
2478
+ if (shouldAutoDispose) {
2479
+ tryDispose(value);
2480
+ }
2481
+ dispatchEvent({
2482
+ key,
2483
+ value,
2484
+ type: "remove"
2485
+ });
2410
2486
  }
2411
2487
  }
2412
2488
  map.clear();
@@ -2416,8 +2492,16 @@ function pool(createItem, optionsOrInitial) {
2416
2492
  delete(key) {
2417
2493
  const existingKey = findKey(key);
2418
2494
  if (existingKey !== void 0) {
2419
- if (shouldAutoDispose) {
2420
- tryDispose(map.get(existingKey));
2495
+ const value = map.get(existingKey);
2496
+ if (value !== void 0) {
2497
+ if (shouldAutoDispose) {
2498
+ tryDispose(value);
2499
+ }
2500
+ dispatchEvent({
2501
+ key: existingKey,
2502
+ value,
2503
+ type: "remove"
2504
+ });
2421
2505
  }
2422
2506
  map.delete(existingKey);
2423
2507
  }
package/dist/pool.d.ts CHANGED
@@ -27,6 +27,11 @@ export interface Pool<TKey, TValue> {
27
27
  /** Iterate over [key, value] pairs. */
28
28
  entries(): IterableIterator<[TKey, TValue]>;
29
29
  }
30
+ export interface PoolChangeEvent<TKey, TValue, TType extends "add" | "remove"> {
31
+ key: TKey;
32
+ value: TValue;
33
+ type: TType;
34
+ }
30
35
  export interface PoolOptions<TKey, TValue> {
31
36
  initial?: readonly [TKey, TValue][];
32
37
  /**
@@ -52,6 +57,18 @@ export interface PoolOptions<TKey, TValue> {
52
57
  * Automatically call dispose method of the item when it is removed from the pool.
53
58
  */
54
59
  autoDispose?: AutoDisposeOptions | boolean;
60
+ /**
61
+ * Called when an item is added to the pool.
62
+ */
63
+ onAdded?: (event: PoolChangeEvent<TKey, TValue, "add">) => void;
64
+ /**
65
+ * Called when an item is removed from the pool.
66
+ */
67
+ onRemoved?: (event: PoolChangeEvent<TKey, TValue, "remove">) => void;
68
+ /**
69
+ * Called when an item is added or removed from the pool.
70
+ */
71
+ onChanged?: (event: PoolChangeEvent<TKey, TValue, "add" | "remove">) => void;
55
72
  }
56
73
  /**
57
74
  * Lazy-instantiation Map wrapper.
@@ -1 +1 @@
1
- {"version":3,"file":"pool.d.ts","sourceRoot":"","sources":["../src/pool.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAEvD;;;GAGG;AACH,MAAM,WAAW,IAAI,CAAC,IAAI,EAAE,MAAM;IAChC,CAAC,GAAG,EAAE,IAAI,GAAG,MAAM,CAAC;IACpB,qEAAqE;IACrE,GAAG,CAAC,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,GAAG,IAAI,CAAC;IACvD,kDAAkD;IAClD,GAAG,CAAC,GAAG,EAAE,IAAI,GAAG,OAAO,CAAC;IACxB,oEAAoE;IACpE,GAAG,CAAC,GAAG,EAAE,IAAI,GAAG,MAAM,CAAC;IACvB,yCAAyC;IACzC,GAAG,CAAC,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,mCAAmC;IACnC,IAAI,IAAI,MAAM,CAAC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AEvC;;OAEG;IACH,WAAW,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC;IAE3C;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,KAAK,IAAI,CAAC;IAEhE;;OAEG;IACH,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,KAAK,IAAI,CAAC;IAErE;;OAEG;IACH,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,GAAG,QAAQ,CAAC,KAAK,IAAI,CAAC;CAC9E;AAED;;;;;;;;;;;;;;;;;;;GAmBG;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,CAiSpB"}
@@ -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-QvO_JK_q.js";
8
+ import { E, H, I, L, C, z, B, y, n, x, o, q, m, p, D, v, u } from "../effect-QvO_JK_q.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-QvO_JK_q.js";
2
+ import { e, E, H, I, L, C, P, z, B, y, x, o, q, m, p, D, l, s } from "./effect-QvO_JK_q.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.3",
4
4
  "description": "Reactive stores for modern apps. Type-safe. Auto-tracked. Effortlessly composable",
5
5
  "type": "module",
6
6
  "main": "./dist/storion.js",