From b543127a2cf6f68182a511416751df5084faf7c7 Mon Sep 17 00:00:00 2001 From: codeBelt Date: Mon, 16 Nov 2026 20:36:56 -0600 Subject: [PATCH 001/169] feat(core)!: transactions, subtree subscriptions and immutable stored snapshots Phase 1 of the 1.0 preparation. - Store methods and array operations run as transactions. Versions still advance per write, but synchronous subscribers are notified once when the outermost call returns. An unshift on 5,000 rows with one synchronous subscriber drops from about 7.7 s to about 18 ms. - subscribe() on a nested proxy observes that subtree only. The sibling notifications kept for pre-0.11 compatibility are gone, along with the path-observer bookkeeping in ownership.ts. - Each subscribe() call is an independent registration. - A snapshot assigned into a store is held by reference and stays frozen, including one read through React's tracking proxy. - Dense arrays are snapshotted by index instead of by key enumeration. - Export PROXYABLE so a class can opt into nested reactivity. BREAKING CHANGE: synchronous subscribers no longer observe each write made inside a store method or array operation; a subscription to a nested proxy no longer fires for sibling changes; subscribing one callback twice now yields two subscriptions. Co-Authored-By: Claude Fable 5.2 --- .../src/core/core.ownership.test.ts | 21 +- .../src/core/core.snapshotValues.test.ts | 180 +++++++++++++++ packages/classy-store/src/core/core.test.ts | 28 ++- .../src/core/core.transactions.test.ts | 210 ++++++++++++++++++ packages/classy-store/src/core/core.ts | 145 +++++++++--- packages/classy-store/src/core/ownership.ts | 60 +---- .../hooks/useClassyStore/useClassyStore.ts | 3 +- .../snapshotTargetCache.test.ts | 8 +- .../trackedProxyCache/trackedProxyCache.ts | 20 ++ packages/classy-store/src/index.ts | 1 + .../classy-store/src/snapshot/snapshot.ts | 10 +- packages/classy-store/src/storeRuntime.ts | 3 + .../src/utils/internal/internal.ts | 20 +- 13 files changed, 598 insertions(+), 111 deletions(-) create mode 100644 packages/classy-store/src/core/core.snapshotValues.test.ts create mode 100644 packages/classy-store/src/core/core.transactions.test.ts create mode 100644 packages/classy-store/src/frameworks/react/utils/trackedProxyCache/trackedProxyCache.ts diff --git a/packages/classy-store/src/core/core.ownership.test.ts b/packages/classy-store/src/core/core.ownership.test.ts index 2e78ce82..6376e527 100644 --- a/packages/classy-store/src/core/core.ownership.test.ts +++ b/packages/classy-store/src/core/core.ownership.test.ts @@ -75,7 +75,7 @@ describe('shared proxy ownership', () => { expect(retained.config.currency).toBe('USD'); }); - test('a nested child follows its current sibling scope and detaches cleanly', () => { + test('a child subscription observes its own subtree across owner changes', () => { const from = createClassyStore<{box?: {row: {n: number}}; other: number}>({ box: {row: {n: 0}}, other: 0, @@ -90,33 +90,30 @@ describe('shared proxy ownership', () => { const stop = subscribe(row, changed, {sync: true}); to.box = box; delete from.box; - changed.mockClear(); from.other++; - expect(changed).not.toHaveBeenCalled(); to.other++; - expect(changed).toHaveBeenCalledTimes(1); + expect(changed).not.toHaveBeenCalled(); row.n++; - expect(changed).toHaveBeenCalledTimes(2); + expect(changed).toHaveBeenCalledTimes(1); stop(); row.n++; - expect(changed).toHaveBeenCalledTimes(2); + expect(changed).toHaveBeenCalledTimes(1); }); - test('promoting a child to a root narrows existing descendant subscriptions', async () => { + test('promoting a child to a root leaves descendant subscriptions on their subtree', async () => { const outer = createClassyStore({editor: {row: {n: 0}, tab: 0}, other: 0}); const changed = mock(() => {}); const stop = subscribe(outer.editor.row, changed); outer.other++; await Promise.resolve(); - expect(changed).toHaveBeenCalledTimes(1); + expect(changed).not.toHaveBeenCalled(); const editor = createClassyStore(outer.editor); - outer.other++; - await Promise.resolve(); - expect(changed).toHaveBeenCalledTimes(1); editor.tab++; + await Promise.resolve(); + expect(changed).not.toHaveBeenCalled(); editor.row.n++; await Promise.resolve(); - expect(changed).toHaveBeenCalledTimes(2); + expect(changed).toHaveBeenCalledTimes(1); stop(); }); diff --git a/packages/classy-store/src/core/core.snapshotValues.test.ts b/packages/classy-store/src/core/core.snapshotValues.test.ts new file mode 100644 index 00000000..313719e9 --- /dev/null +++ b/packages/classy-store/src/core/core.snapshotValues.test.ts @@ -0,0 +1,180 @@ +import {describe, expect, mock, test} from 'bun:test'; +import {createProxy} from 'proxy-compare'; +import {TrackedProxyCache} from '../frameworks/react/utils/trackedProxyCache/trackedProxyCache'; +import {PROXYABLE} from '../index'; +import {snapshot} from '../snapshot/snapshot'; +import {createClassyStore, identityOf, subscribe, unwrap} from './core'; + +type Todo = {id: number; done: boolean}; + +describe('snapshots kept in a store', () => { + test('a snapshot assigned into a store is held by reference and stays frozen', () => { + const store = createClassyStore({ + todos: [{id: 1, done: false}] as Todo[], + selected: null as Todo | null, + }); + const row = snapshot(store).todos[0] as Todo; + + store.selected = row; + + expect(store.selected).toBe(row); + expect(Object.isFrozen(store.selected)).toBe(true); + // The store reuses it as-is, so structural sharing is kept. + expect(snapshot(store).selected).toBe(row); + expect(() => { + (store.selected as Todo).done = true; + }).toThrow(TypeError); + expect(store.todos[0].done).toBe(false); + }); + + test('replacing a stored snapshot notifies and later edits to its source do not leak in', () => { + const store = createClassyStore({ + draft: {text: 'a'}, + saved: null as {text: string} | null, + }); + const listener = mock(() => {}); + subscribe(store, listener, {sync: true}); + + store.saved = snapshot(store).draft as {text: string}; + expect(listener).toHaveBeenCalledTimes(1); + + store.draft.text = 'b'; + expect(store.saved?.text).toBe('a'); + expect(snapshot(store).saved?.text).toBe('a'); + }); + + test('a snapshot present in the initial state is not proxied', () => { + const source = createClassyStore({config: {theme: 'dark'}}); + const config = snapshot(source).config; + const store = createClassyStore({config}); + expect(store.config).toBe(config); + }); + + test('a tracked read handed back to a store is stored as its snapshot', () => { + class Row { + static [PROXYABLE] = true; + done = false; + constructor(readonly id: number) {} + } + const store = createClassyStore({ + plain: [{id: 1, done: false}] as Todo[], + classes: [new Row(1)], + selected: null as unknown, + }); + const snap = snapshot(store); + // What React's auto-tracked hook hands to a component. + const tracked = createProxy(snap, new WeakMap(), new TrackedProxyCache()); + + store.selected = tracked.plain[0]; + expect(store.selected).toBe(snap.plain[0]); + + store.selected = tracked.classes[0]; + expect(store.selected).toBe(snap.classes[0]); + }); +}); + +describe('identity helpers', () => { + test('unwrap strips a store proxy and a tracking proxy, nothing else', () => { + const raw = {row: {id: 1}}; + const store = createClassyStore(raw); + const snap = snapshot(store); + const tracked = createProxy(snap, new WeakMap(), new TrackedProxyCache()); + + expect(unwrap(store)).toBe(raw); + expect(unwrap(store.row)).toBe(raw.row); + expect(unwrap(tracked.row)).toBe(snap.row); + expect(unwrap(snap.row)).toBe(snap.row); + expect(unwrap(raw.row)).toBe(raw.row); + expect(unwrap(7)).toBe(7); + expect(unwrap(null)).toBeNull(); + }); + + test('identityOf is the same for the raw object, its proxy, snapshots and tracked reads', () => { + const raw = {row: {id: 1}}; + const store = createClassyStore(raw); + const first = snapshot(store); + store.row.id = 2; + const second = snapshot(store); + const tracked = createProxy(second, new WeakMap(), new TrackedProxyCache()); + + expect(first.row).not.toBe(second.row); + for (const view of [ + raw.row, + store.row, + first.row, + second.row, + tracked.row, + ]) { + expect(identityOf(view)).toBe(raw.row); + } + expect(identityOf('key')).toBe('key'); + expect(Number.isNaN(identityOf(Number.NaN))).toBe(true); + }); +}); + +describe('PROXYABLE', () => { + test('a class that opts in is reactive when nested, and keeps its prototype in snapshots', () => { + class Todo { + static [PROXYABLE] = true; + done = false; + constructor(public title: string) {} + + get label() { + return `${this.done ? '[x]' : '[ ]'} ${this.title}`; + } + + toggle() { + this.done = !this.done; + } + } + class Opaque { + done = false; + } + const store = createClassyStore({ + todos: [new Todo('write')], + opaque: new Opaque(), + }); + const listener = mock(() => {}); + subscribe(store, listener, {sync: true}); + + store.todos[0].toggle(); + expect(listener).toHaveBeenCalledTimes(1); + const snap = snapshot(store); + expect(snap.todos[0]).toBeInstanceOf(Todo); + expect(snap.todos[0].label).toBe('[x] write'); + + // A class that does not opt in stays an opaque value. + store.opaque.done = true; + expect(listener).toHaveBeenCalledTimes(1); + }); +}); + +describe('array snapshots', () => { + test('a sparse array keeps its holes, later elements and length', () => { + const items: unknown[] = [{id: 0}, 1]; + items[5] = {id: 5}; + items.length = 9; + const store = createClassyStore({items}); + + const snap = snapshot(store).items; + + expect(snap.length).toBe(9); + expect(Object.keys(snap)).toEqual(['0', '1', '5']); + expect(snap[5]).toEqual({id: 5}); + expect(Object.isFrozen(snap[0])).toBe(true); + expect(2 in snap).toBe(false); + }); + + test('a trailing hole spanning billions of slots costs no length-sized scan', () => { + const items: number[] = [1, 2]; + items.length = 2 ** 32 - 1; + const store = createClassyStore({items}); + + const started = performance.now(); + const snap = snapshot(store).items; + + expect(performance.now() - started).toBeLessThan(250); + expect(snap.length).toBe(2 ** 32 - 1); + expect(Object.keys(snap)).toEqual(['0', '1']); + }); +}); diff --git a/packages/classy-store/src/core/core.test.ts b/packages/classy-store/src/core/core.test.ts index 0abe338e..917d23c5 100644 --- a/packages/classy-store/src/core/core.test.ts +++ b/packages/classy-store/src/core/core.test.ts @@ -353,18 +353,42 @@ describe('createClassyStore() — core reactivity', () => { expect(listener).toHaveBeenCalledTimes(1); }); - it('subscribe on a child proxy fires when a sibling mutates', async () => { + it('subscribe on a child proxy observes only that subtree', async () => { const s = createClassyStore({user: {name: 'Alice'}, count: 0}); const listener = mock(() => {}); subscribe(s.user, listener); s.count = 1; await flush(); + expect(listener).not.toHaveBeenCalled(); - // Listener was added to root, so it fires for any mutation in the tree. + s.user.name = 'Bob'; + await flush(); expect(listener).toHaveBeenCalledTimes(1); }); + it('registers the same callback independently on each call', async () => { + const s = createClassyStore({count: 0}); + const listener = mock(() => {}); + const first = subscribe(s, listener); + const second = subscribe(s, listener); + + s.count = 1; + await flush(); + expect(listener).toHaveBeenCalledTimes(2); + + first(); + first(); // Releasing twice must not release the other registration. + s.count = 2; + await flush(); + expect(listener).toHaveBeenCalledTimes(3); + + second(); + s.count = 3; + await flush(); + expect(listener).toHaveBeenCalledTimes(3); + }); + it('unsubscribe from child proxy stops notifications', async () => { const s = createClassyStore({user: {name: 'Alice'}}); const listener = mock(() => {}); diff --git a/packages/classy-store/src/core/core.transactions.test.ts b/packages/classy-store/src/core/core.transactions.test.ts new file mode 100644 index 00000000..5a0733fc --- /dev/null +++ b/packages/classy-store/src/core/core.transactions.test.ts @@ -0,0 +1,210 @@ +import {describe, expect, mock, test} from 'bun:test'; +import {snapshot} from '../snapshot/snapshot'; +import {createClassyStore, subscribe} from './core'; + +type Row = {id: number}; + +const rows = (count: number): Row[] => + Array.from({length: count}, (_, index) => ({id: (index * 7919) % count})); + +describe('transactions', () => { + test('a store method notifies synchronous subscribers once, after it returns', () => { + class Cart { + items: number[] = []; + total = 0; + + add(price: number) { + this.items.push(price); + this.total += price; + } + } + const store = createClassyStore(new Cart()); + const seen: number[] = []; + subscribe(store, () => seen.push(snapshot(store).total), {sync: true}); + + store.add(5); + + // One notification, and it never observes the half-applied state. + expect(seen).toEqual([5]); + expect(snapshot(store).items).toEqual([5]); + }); + + test('direct writes outside a method still notify one by one', () => { + const store = createClassyStore({a: 0, b: 0}); + const listener = mock(() => {}); + subscribe(store, listener, {sync: true}); + + store.a = 1; + store.b = 1; + + expect(listener).toHaveBeenCalledTimes(2); + }); + + test.each([ + ['unshift', (items: Row[]) => items.unshift({id: -1})], + ['splice', (items: Row[]) => items.splice(0, 1)], + ['sort', (items: Row[]) => items.sort((a, b) => a.id - b.id)], + ['reverse', (items: Row[]) => items.reverse()], + ['fill', (items: Row[]) => items.fill({id: 0})], + ['copyWithin', (items: Row[]) => items.copyWithin(0, 1)], + [ + 'forEach that edits every row', + (items: Row[]) => + items.forEach((row) => { + row.id += 1; + }), + ], + ] as const)( + '%s on a large array is one synchronous notification', + (_name, run) => { + const store = createClassyStore({items: rows(500)}); + const listener = mock(() => { + snapshot(store); + }); + subscribe(store, listener, {sync: true}); + + run(store.items); + + expect(listener).toHaveBeenCalledTimes(1); + }, + ); + + test('a plain loop of row writes outside any method notifies per write', () => { + const store = createClassyStore({items: rows(5)}); + const listener = mock(() => {}); + subscribe(store, listener, {sync: true}); + + for (const row of store.items) row.id += 1; + + expect(listener).toHaveBeenCalledTimes(5); + }); + + test('nested calls notify once, when the outermost call returns', () => { + class Board { + cells = [0, 0, 0]; + moves = 0; + + mark(index: number) { + this.cells[index] = 1; + this.moves++; + } + + markAll() { + this.cells.forEach((_, index) => { + this.mark(index); + }); + } + } + const store = createClassyStore(new Board()); + const listener = mock(() => {}); + subscribe(store, listener, {sync: true}); + + store.markAll(); + + expect(listener).toHaveBeenCalledTimes(1); + expect(store.moves).toBe(3); + }); + + test('a method that throws still reports the writes it made', () => { + class Form { + step = 0; + + advance() { + this.step++; + throw new Error('validation failed'); + } + } + const store = createClassyStore(new Form()); + const listener = mock(() => {}); + subscribe(store, listener, {sync: true}); + + expect(() => store.advance()).toThrow('validation failed'); + expect(listener).toHaveBeenCalledTimes(1); + expect(store.step).toBe(1); + + // The failed call left no transaction open. + store.step = 5; + expect(listener).toHaveBeenCalledTimes(2); + }); + + test('an async method is a transaction only up to its first await', async () => { + class Loader { + loading = false; + data: string | null = null; + attempts = 0; + + async load() { + this.loading = true; + this.attempts++; + await Promise.resolve(); + this.data = 'ready'; + this.loading = false; + } + } + const store = createClassyStore(new Loader()); + const listener = mock(() => {}); + subscribe(store, listener, {sync: true}); + + const pending = store.load(); + expect(listener).toHaveBeenCalledTimes(1); + await pending; + expect(listener).toHaveBeenCalledTimes(3); + }); + + test('a subscriber may call a store method while being notified', () => { + class Counter { + count = 0; + echo = 0; + + increment() { + this.count++; + } + + mirror() { + this.echo = this.count; + } + } + const store = createClassyStore(new Counter()); + subscribe( + store, + () => { + if (store.echo !== store.count) store.mirror(); + }, + {sync: true}, + ); + + store.increment(); + + expect(store.echo).toBe(1); + }); + + test('batched subscribers still receive one notification per microtask', async () => { + class Counter { + count = 0; + + bump() { + this.count++; + this.count++; + } + } + const store = createClassyStore(new Counter()); + const listener = mock(() => {}); + subscribe(store, listener); + + store.bump(); + store.bump(); + await Promise.resolve(); + + expect(listener).toHaveBeenCalledTimes(1); + }); + + test('a class stored as data stays constructible', () => { + class Model { + constructor(readonly name: string) {} + } + const store = createClassyStore({Model}); + const instance = new store.Model('row'); + expect(instance).toBeInstanceOf(Model); + expect(instance.name).toBe('row'); + }); +}); diff --git a/packages/classy-store/src/core/core.ts b/packages/classy-store/src/core/core.ts index 5ff48b65..8163f30c 100644 --- a/packages/classy-store/src/core/core.ts +++ b/packages/classy-store/src/core/core.ts @@ -13,6 +13,43 @@ import {StoreInternal} from './ownership'; const internalsMap = new WeakMap(); const targetNodes = new WeakMap(); +/** Maps every frozen snapshot → the raw object it was built from. */ +const snapshotSources = new WeakMap(); + +/** Maps a React tracking proxy → the frozen snapshot it wraps. */ +const trackedSnapshots = new WeakMap(); + +/** @internal Record a frozen snapshot so the store recognises it later. */ +export function registerSnapshot(snap: object, target: object): void { + snapshotSources.set(snap, target); +} + +/** @internal Record a render-tracking proxy created over a snapshot. */ +export function registerTrackingProxy(proxy: object, snap: object): void { + trackedSnapshots.set(proxy, snap); +} + +/** + * @internal Strip a store proxy or a tracking proxy, leaving the object it + * wraps: the raw target for live state, the frozen snapshot for tracked reads. + */ +export function unwrap(value: T): T { + if (typeof value !== 'object' || value === null) return value; + const internal = internalsMap.get(value); + if (internal) return internal.target as T; + return (trackedSnapshots.get(value) ?? value) as T; +} + +/** + * @internal One identity for a raw object, its store proxy, every snapshot of + * it, and tracked reads of those snapshots. Primitives are their own identity. + */ +export function identityOf(value: unknown): unknown { + const raw = unwrap(value); + if (typeof raw !== 'object' || raw === null) return raw; + return snapshotSources.get(raw) ?? raw; +} + // ── Dependency tracking for computed getters ────────────────────────────────── /** @@ -179,17 +216,17 @@ export function getInternal(proxy: object): StoreInternal { function notifyMutation(internal: StoreInternal): void { const owners = internal.ancestors(); // Invalidate every path before any synchronous subscriber reads a snapshot. - let recipients = owners; - for (const node of owners) { - node.version++; - const scoped = node.scopedSubscribers; - if (scoped?.size) { - if (recipients === owners) recipients = new Set(owners); - for (const child of scoped) recipients.add(child); + for (const node of owners) node.version++; + if (transactionDepth) { + // Inside a store method or array operation: tell synchronous subscribers + // once, when the outermost call returns. + for (const node of owners) { + if (node.syncListeners.size) pendingSync.add(node); } + } else { + deliver(owners, 'syncListeners'); } - deliver(recipients, 'syncListeners'); - for (const node of recipients) { + for (const node of owners) { if (!node.batchedListeners.size) continue; if (!pendingNotifications.size) queueMicrotask(flushNotifications); pendingNotifications.add(node); @@ -198,6 +235,42 @@ function notifyMutation(internal: StoreInternal): void { const pendingNotifications = new Set(); +// ── Transactions ────────────────────────────────────────────────────────────── + +let transactionDepth = 0; +const pendingSync = new Set(); + +/** + * Run one store method or array operation as a transaction. Versions advance + * with every write, so reads inside the call are current, but synchronous + * subscribers hear about it once, after the outermost call returns or throws. + * A sort of n rows is then one notification rather than n. + */ +function runTransaction(run: () => T): T { + transactionDepth++; + try { + return run(); + } finally { + if (--transactionDepth === 0 && pendingSync.size) { + const owners = new Set(pendingSync); + pendingSync.clear(); + deliver(owners, 'syncListeners'); + } + } +} + +/** Bind a method to its proxy and run each call as a transaction. */ +function transactional( + method: (...args: unknown[]) => unknown, + receiver: object, +): (...args: unknown[]) => unknown { + return function (...args: unknown[]) { + // A class stored as data stays constructible, as a bound function would. + if (new.target) return Reflect.construct(method, args); + return runTransaction(() => Reflect.apply(method, receiver, args)); + }; +} + function flushNotifications(): void { const owners = new Set(pendingNotifications); pendingNotifications.clear(); @@ -208,10 +281,9 @@ function deliver( owners: Set, kind: 'syncListeners' | 'batchedListeners', ): void { - const listeners = new Set<() => void>(); - for (const node of owners) { - for (const listener of node[kind].values()) listeners.add(listener); - } + // Copy first: a listener may subscribe or unsubscribe during delivery. + const listeners: (() => void)[] = []; + for (const node of owners) listeners.push(...node[kind]); for (const listener of listeners) { try { listener(); @@ -228,6 +300,8 @@ function linkChild( pending?: StoreInternal[], ): StoreInternal | undefined { if (typeof value !== 'object' || value === null) return; + // A snapshot kept in a store stays an immutable value, held by reference. + if (snapshotSources.has(value)) return; const child = internalsMap.get(value) ?? (canProxy(value) ? createNode(value, pending) : undefined); @@ -260,8 +334,13 @@ function createNode(target: object, pending?: StoreInternal[]): StoreInternal { >(); const proxy = new Proxy(target, { - set(_target, prop, value, receiver) { + set(_target, prop, incoming, receiver) { internal.resumeScope(); + // Store the snapshot itself, never the render-tracking proxy around it. + const value: unknown = + typeof incoming === 'object' && incoming !== null + ? (trackedSnapshots.get(incoming) ?? incoming) + : incoming; const descriptor = findPropertyDescriptor(_target, prop); if (descriptor && !('value' in descriptor)) { // Setters perform their own writes. Use the proxy as `this` so nested @@ -330,15 +409,15 @@ function createNode(target: object, pending?: StoreInternal[]): StoreInternal { const value = Reflect.get(_target, prop); - // 2. Methods: bind to the proxy so `this.prop = x` goes through SET trap. + // 2. Methods: bind to the proxy so `this.prop = x` goes through SET trap, + // and run each call as one transaction. if (typeof value === 'function') { + const method = value as (...args: unknown[]) => unknown; // Array prototype methods should not be cached the same way as class methods. - if (Array.isArray(_target)) { - return value.bind(receiver); - } + if (Array.isArray(_target)) return transactional(method, receiver); const cached = boundMethods.get(prop); if (cached) return cached; - const bound = (value as (...args: unknown[]) => unknown).bind(receiver); + const bound = transactional(method, receiver); boundMethods.set(prop, bound); return bound; } @@ -403,18 +482,20 @@ function createNode(target: object, pending?: StoreInternal[]): StoreInternal { */ export function createClassyStore(instance: T): T { const node = createNode(instance); - node.markAsRoot(); + node.isStoreRoot = true; node.resumeScope(); return node.proxy as T; } /** - * Subscribe to store changes. By default, the callback fires once per batched - * mutation turn (coalesced via `queueMicrotask`). Pass `{sync: true}` to notify - * immediately after each mutation. + * Subscribe to changes in a store, or in the subtree under one of its nested + * proxies. By default, the callback fires once per batched mutation turn + * (coalesced via `queueMicrotask`). Pass `{sync: true}` to be notified in the + * same call stack: after each direct write, and once after each store method + * or array operation. * - * @param proxy - A reactive proxy created by `createClassyStore()`. - * @param callback - Invoked when the store changes. + * @param proxy - A reactive proxy created by `createClassyStore()`, or a nested proxy read from one. + * @param callback - Invoked when that proxy's subtree changes. * @param options - Controls subscriber notification timing. * @returns An unsubscribe function. Call it to stop receiving notifications. */ @@ -427,17 +508,11 @@ export function subscribe( const listeners = options?.sync ? internal.syncListeners : internal.batchedListeners; - // Anchor delivery on the observed proxy. Child registrations additionally - // follow their current roots for sibling notifications. - if (!listeners.has(callback)) { - listeners.set(callback, () => callback()); - internal.refreshSubscriptionScope(); - } + // One entry per call: registering a callback twice gives two subscriptions. + const listener = () => callback(); + listeners.add(listener); return () => { - if (listeners.delete(callback)) { - internal.refreshSubscriptionScope(); - internal.suspendIfDetached(); - } + if (listeners.delete(listener)) internal.suspendIfDetached(); }; } diff --git a/packages/classy-store/src/core/ownership.ts b/packages/classy-store/src/core/ownership.ts index 0b49fdfd..69843a39 100644 --- a/packages/classy-store/src/core/ownership.ts +++ b/packages/classy-store/src/core/ownership.ts @@ -6,12 +6,10 @@ type ParentReference = {deref(): StoreInternal | undefined}; export class StoreInternal { version = 0; isStoreRoot = false; - readonly batchedListeners = new Map<() => void, () => void>(); - readonly syncListeners = new Map<() => void, () => void>(); - // A subscribed child observes siblings within each nearest root. Keep its - // current paths alive and update the routes when a parent edge changes. - private subscriptionPath?: Set; - private pathObservers?: Set; + // Each subscribe() call owns one entry, so the same callback can be + // registered more than once and released independently. + readonly batchedListeners = new Set<() => void>(); + readonly syncListeners = new Set<() => void>(); readonly computedCache = new Map(); readonly childInternals = new Map(); readonly parents = new Map(); @@ -29,11 +27,6 @@ export class StoreInternal { readonly proxy: object, ) {} - get scopedSubscribers(): ReadonlySet | undefined { - if (this.isStoreRoot || !this.parents.size) return this.pathObservers; - return undefined; - } - attach(key: string | symbol, child: StoreInternal): void { if (this.childInternals.get(key) === child) return; this.detach(key); @@ -58,7 +51,6 @@ export class StoreInternal { child.parentCleanup?.register(this, this.reference, this.reference); } child.parents.set(this.reference, count + 1); - if (!count && !child.isStoreRoot) child.ownershipChanged(); } // A single-owner node has at most one stale reference. Start collecting @@ -92,7 +84,6 @@ export class StoreInternal { } child.parents.delete(this.reference); child.parentCleanup?.unregister(this.reference); - if (!child.isStoreRoot) child.ownershipChanged(); } private canSuspend(): boolean { @@ -101,8 +92,7 @@ export class StoreInternal { !this.parents.size && !this.isStoreRoot && !this.syncListeners.size && - !this.batchedListeners.size && - !this.pathObservers?.size + !this.batchedListeners.size ); } @@ -165,46 +155,10 @@ export class StoreInternal { scope.resume(); } - markAsRoot(): void { - if (this.isStoreRoot) return; - this.isStoreRoot = true; - this.ownershipChanged(); - } - - private ownershipChanged(): void { - if (this.pathObservers?.size) { - for (const child of [...this.pathObservers]) - child.refreshSubscriptionScope(); - } - } - - refreshSubscriptionScope(): void { - const previous = this.subscriptionPath; - const needsScope = - !this.isStoreRoot && - (this.syncListeners.size || this.batchedListeners.size); - const next = needsScope ? this.ancestors(true) : undefined; - this.subscriptionPath = next; - if (next) { - for (const owner of next) { - owner.pathObservers ??= new Set(); - owner.pathObservers.add(this); - } - } - if (previous) { - for (const owner of previous) { - if (!next?.has(owner)) { - owner.pathObservers?.delete(this); - owner.suspendIfDetached(); - } - } - } - } - - ancestors(stopAtStoreRoots = false): Set { + /** This node and every container that currently owns it, up to each root. */ + ancestors(): Set { const visited = new Set([this]); for (const node of visited) { - if (stopAtStoreRoots && node.isStoreRoot) continue; for (const reference of node.parents.keys()) { const parent = reference.deref(); if (parent) visited.add(parent); diff --git a/packages/classy-store/src/frameworks/react/hooks/useClassyStore/useClassyStore.ts b/packages/classy-store/src/frameworks/react/hooks/useClassyStore/useClassyStore.ts index 88d02311..f504b503 100644 --- a/packages/classy-store/src/frameworks/react/hooks/useClassyStore/useClassyStore.ts +++ b/packages/classy-store/src/frameworks/react/hooks/useClassyStore/useClassyStore.ts @@ -9,6 +9,7 @@ import { } from '../../../../storeRuntime'; import type {Snapshot} from '../../../../types'; import {SnapshotTargetCache} from '../../utils/snapshotTargetCache/snapshotTargetCache'; +import {TrackedProxyCache} from '../../utils/trackedProxyCache/trackedProxyCache'; import {TrackingReadMap} from '../../utils/trackingReadMap/trackingReadMap'; import type { EqualityFn, @@ -89,7 +90,7 @@ export function useClassyStore( // Weak keys release old dependencies as their snapshots become unreachable. const committedReads = useRef(new WeakMap()).current; const affected = new TrackingReadMap(committedReads); - const proxyCache = useRef(new WeakMap()).current; + const proxyCache = useRef(new TrackedProxyCache()).current; let previousAutoSnapshot: Snapshot | undefined; const getSnapshot = (): Snapshot | S => { if (getSelectedSnapshot) return getSelectedSnapshot(); diff --git a/packages/classy-store/src/frameworks/react/utils/snapshotTargetCache/snapshotTargetCache.test.ts b/packages/classy-store/src/frameworks/react/utils/snapshotTargetCache/snapshotTargetCache.test.ts index efee8d30..9a1b9a11 100644 --- a/packages/classy-store/src/frameworks/react/utils/snapshotTargetCache/snapshotTargetCache.test.ts +++ b/packages/classy-store/src/frameworks/react/utils/snapshotTargetCache/snapshotTargetCache.test.ts @@ -46,14 +46,20 @@ describe('SnapshotTargetCache', () => { return descriptors(target); }); try { + let backingCopy: object | undefined; for (let index = 0; index < 1000; index += 1) { const reads = new WeakMap(); const proxyCache = new WeakMap(); const tracked = createProxy(source, reads, proxyCache, cache); expect(tracked.items[index].value).toBe(index); expect(createProxy(source, reads, proxyCache, cache)).toBe(tracked); + // Every reader shares one backing copy of the list. + const [, copy] = cache.get(items) as [object, object]; + backingCopy ??= copy; + expect(copy).toBe(backingCopy); } - expect(listScans).toBe(1); + // A dense list is copied by index: no key or descriptor scan at all. + expect(listScans).toBe(0); } finally { descriptorSpy.mockRestore(); namesSpy.mockRestore(); diff --git a/packages/classy-store/src/frameworks/react/utils/trackedProxyCache/trackedProxyCache.ts b/packages/classy-store/src/frameworks/react/utils/trackedProxyCache/trackedProxyCache.ts new file mode 100644 index 00000000..02a042c6 --- /dev/null +++ b/packages/classy-store/src/frameworks/react/utils/trackedProxyCache/trackedProxyCache.ts @@ -0,0 +1,20 @@ +import {registerTrackingProxy} from '../../../../storeRuntime'; + +/** + * A hook's proxy cache that also tells the store which snapshot each tracking + * proxy wraps. The store can then recognise a tracked value handed back to it, + * for example `store.selected = snap.rows[0]`, and keep the snapshot instead. + */ +export class TrackedProxyCache extends WeakMap { + override set(snapshotObject: object, entry: unknown): this { + // proxy-compare 3 caches [handler, state], and the state holds the proxy + // it has just created. Read it generically, not by its private field name. + const state = (entry as [unknown, Record])[1]; + for (const value of Object.values(state)) { + if (typeof value === 'object' && value !== null) { + registerTrackingProxy(value, snapshotObject); + } + } + return super.set(snapshotObject, entry); + } +} diff --git a/packages/classy-store/src/index.ts b/packages/classy-store/src/index.ts index 03cb5d07..67793046 100644 --- a/packages/classy-store/src/index.ts +++ b/packages/classy-store/src/index.ts @@ -8,3 +8,4 @@ export {createClassyStore, snapshot, subscribe} from './storeRuntime'; export type {Snapshot, SubscribeOptions} from './types'; export {shallowEqual} from './utils/equality/equality'; +export {PROXYABLE} from './utils/internal/internal'; diff --git a/packages/classy-store/src/snapshot/snapshot.ts b/packages/classy-store/src/snapshot/snapshot.ts index da5a611c..afd3c51d 100644 --- a/packages/classy-store/src/snapshot/snapshot.ts +++ b/packages/classy-store/src/snapshot/snapshot.ts @@ -1,5 +1,5 @@ import {markToTrack} from 'proxy-compare'; -import {getInternal} from '../core/core'; +import {getInternal, registerSnapshot} from '../core/core'; import type {StoreInternal} from '../core/ownership'; import type {Snapshot} from '../types'; import {mapOwnArrayElements} from '../utils/internal/internal'; @@ -253,8 +253,11 @@ function createSnapshotRecursive( let snap: Record | unknown[]; if (Array.isArray(target)) { - snap = mapOwnArrayElements(target, (value, key) => - snapshotValue(value, internal, key, inProgress), + // Only objects can be child nodes; primitives need no key lookup. + snap = mapOwnArrayElements(target, (value, index) => + typeof value === 'object' && value !== null + ? snapshotValue(value, internal, String(index), inProgress) + : value, ); } else { // Preserve the prototype chain and install memoized getters on the snapshot. @@ -277,6 +280,7 @@ function createSnapshotRecursive( markSnapshotForTracking(snap); Object.freeze(snap); + registerSnapshot(snap, target); // Cache AFTER populating + freezing. The reference is stable. snapshotCache.set(target, [internal.version, snap]); inProgress.delete(target); diff --git a/packages/classy-store/src/storeRuntime.ts b/packages/classy-store/src/storeRuntime.ts index 8dd788c3..e80fc94c 100644 --- a/packages/classy-store/src/storeRuntime.ts +++ b/packages/classy-store/src/storeRuntime.ts @@ -4,7 +4,10 @@ export { createClassyStore, getInternal, getVersion, + identityOf, + registerTrackingProxy, subscribe, + unwrap, } from './core/core'; export {hydrationSnapshots} from './frameworks/react/utils/hydrationSnapshots/hydrationSnapshots'; export {originalSnapshotAccessor, snapshot} from './snapshot/snapshot'; diff --git a/packages/classy-store/src/utils/internal/internal.ts b/packages/classy-store/src/utils/internal/internal.ts index a15ca42b..3a6b73d7 100644 --- a/packages/classy-store/src/utils/internal/internal.ts +++ b/packages/classy-store/src/utils/internal/internal.ts @@ -17,12 +17,24 @@ export function getArrayIndex(key: string | symbol): number | undefined { /** Visit only present indices, including non-enumerable ones. Keep trailing holes. */ export function mapOwnArrayElements( source: readonly T[], - project: (value: T, key: string) => U, + project: (value: T, index: number) => U, ): U[] { - const result = new Array(source.length); + const length = source.length; + const result = new Array(length); + // Nearly every array is dense: walk it by index up to the first hole. A + // sparse array reaches its first hole within its populated count, so a + // trailing hole spanning billions of slots still costs no length-sized scan. + // `in` is an order of magnitude cheaper here than an own-property check. + let index = 0; + for (; index < length && index in source; index++) { + result[index] = project(source[index], index); + } + if (index === length) return result; for (const key of Object.getOwnPropertyNames(source)) { - const index = getArrayIndex(key); - if (index !== undefined) result[index] = project(source[index], key); + const later = getArrayIndex(key); + if (later !== undefined && later > index) { + result[later] = project(source[later], later); + } } return result; } From 836c3a1a852422f0a68e6ef2259c48d2642db882 Mon Sep 17 00:00:00 2001 From: codeBelt Date: Mon, 16 Nov 2026 20:44:24 -0600 Subject: [PATCH 002/169] feat(utils)!: per-field hydration, stricter equality and identity-based collections Phase 2 of the 1.0 preparation. persist - Hydration is per field. A stored field is restored unless that same field was edited locally while the read was in flight; an edit to any other field no longer discards the stored record. - Background saves wait for an in-flight read, so a local edit cannot overwrite the stored record with defaults before it is restored. - Stored data from another schema version is ignored unless `migrate` is given. A record with no version counts as version 0. withHistory - Undo and redo delete top-level fields that the restored entry lacks. - undo() first records an edit made in the same tick, so it steps back over that edit and redo can return to it. - Fields whose snapshot is unchanged are left alone, keeping their identity. shallowEqual - Values with different prototypes are never equal. Dates compare by instant, Map and Set one level deep. An object with no enumerable keys is equal to another only when both are plain records. devtools - Returns a handle with dispose(), like persist and withHistory. - No longer augments the global Window type in the published declarations. collections - Keys and set values are compared by identity, so an object matches whether it is given raw, as a store proxy or as a snapshot. - Live and snapshot lookups scan the raw backing array. A get() on a 10,000-entry map inside a store drops from about 3.7 ms to about 0.06 ms. - set() on an existing key keeps the stored key and updates in place. BREAKING CHANGE: devtools() returns {dispose} instead of a function; persist no longer applies stored state whose version differs when no migrate is configured; shallowEqual returns false for values it previously treated as equal (different prototypes, different dates, maps or sets). Co-Authored-By: Claude Fable 5.2 --- .../collections/collections.identity.test.ts | 203 +++++++++++ .../src/collections/collections.ts | 61 +++- packages/classy-store/src/core/core.ts | 5 + .../frameworks/react/react.utilities.test.tsx | 4 +- packages/classy-store/src/storeRuntime.ts | 1 + .../src/utils/devtools/devtools.test.ts | 17 +- .../src/utils/devtools/devtools.ts | 46 +-- .../src/utils/equality/equality.test.ts | 72 ++++ .../src/utils/equality/equality.ts | 37 +- .../src/utils/history/history.restore.test.ts | 133 ++++++++ .../classy-store/src/utils/history/history.ts | 106 +++--- packages/classy-store/src/utils/index.ts | 2 +- .../utils/persist/persist.hydration.test.ts | 315 ++++++++++++++++++ .../classy-store/src/utils/persist/persist.ts | 156 +++++---- 14 files changed, 1007 insertions(+), 151 deletions(-) create mode 100644 packages/classy-store/src/collections/collections.identity.test.ts create mode 100644 packages/classy-store/src/utils/history/history.restore.test.ts create mode 100644 packages/classy-store/src/utils/persist/persist.hydration.test.ts diff --git a/packages/classy-store/src/collections/collections.identity.test.ts b/packages/classy-store/src/collections/collections.identity.test.ts new file mode 100644 index 00000000..079d47c7 --- /dev/null +++ b/packages/classy-store/src/collections/collections.identity.test.ts @@ -0,0 +1,203 @@ +import {describe, expect, mock, spyOn, test} from 'bun:test'; +import {createProxy, isChanged} from 'proxy-compare'; +import {createClassyStore, subscribe} from '../core/core'; +import {TrackedProxyCache} from '../frameworks/react/utils/trackedProxyCache/trackedProxyCache'; +import {snapshot} from '../snapshot/snapshot'; +import {reactiveMap, reactiveSet} from './collections'; + +type User = {id: number; name: string}; + +describe('reactive collections inside a store — object members', () => { + test('a map finds, replaces and deletes an entry by the same raw object key', () => { + const key = {id: 1}; + const store = createClassyStore({users: reactiveMap()}); + + store.users.set(key, 'Ada'); + store.users.set(key, 'Grace'); + + expect(store.users.size).toBe(1); + expect(store.users.has(key)).toBe(true); + expect(store.users.get(key)).toBe('Grace'); + expect(store.users.delete(key)).toBe(true); + expect(store.users.size).toBe(0); + }); + + test('a set holds each raw object once and can remove it again', () => { + const tag = {label: 'urgent'}; + const store = createClassyStore({tags: reactiveSet()}); + + store.tags.add(tag); + store.tags.add(tag); + + expect(store.tags.size).toBe(1); + expect(store.tags.has(tag)).toBe(true); + expect(store.tags.delete(tag)).toBe(true); + expect(store.tags.has(tag)).toBe(false); + }); + + test('the raw object, its store proxy and its snapshots are one key', () => { + const ada: User = {id: 1, name: 'Ada'}; + const store = createClassyStore({ + users: [ada], + selected: reactiveSet(), + notes: reactiveMap(), + }); + store.selected.add(store.users[0]); // Added through its proxy… + store.notes.set(ada, 'first'); // …and through the raw object. + + const snap = snapshot(store); + for (const view of [ada, store.users[0], snap.users[0] as User]) { + expect(store.selected.has(view)).toBe(true); + expect(store.notes.get(view)).toBe('first'); + // The same lookups work on the frozen snapshot. + expect(snap.selected.has(view)).toBe(true); + expect(snap.notes.get(view)).toBe('first'); + } + expect(store.selected.has({id: 1, name: 'Ada'})).toBe(false); + + store.notes.set(snap.users[0] as User, 'second'); + expect(store.notes.size).toBe(1); + // Updating keeps the key that was first stored. + expect(snapshot(store).notes.keys().next().value).toBe( + snapshot(store).users[0] as User, + ); + }); + + test('an older snapshot of a member still identifies it after it changes', () => { + const store = createClassyStore({ + users: [{id: 1, name: 'Ada'}] as User[], + selected: reactiveSet(), + }); + store.selected.add(store.users[0]); + const before = snapshot(store).users[0] as User; + + store.users[0].name = 'Grace'; + + expect(snapshot(store).users[0]).not.toBe(before); + expect(store.selected.has(before)).toBe(true); + expect(snapshot(store).selected.has(before)).toBe(true); + }); + + test('a value read from a map is live state', () => { + const store = createClassyStore({ + users: reactiveMap([['a', {id: 1, name: 'Ada'}]]), + }); + const listener = mock(() => {}); + subscribe(store, listener, {sync: true}); + + const user = store.users.get('a') as User; + user.name = 'Grace'; + + expect(listener).toHaveBeenCalledTimes(1); + expect(snapshot(store).users.get('a')?.name).toBe('Grace'); + }); + + test('setting the value a key already has changes nothing', () => { + const store = createClassyStore({ + settings: reactiveMap([['size', 12]]), + }); + const listener = mock(() => {}); + subscribe(store, listener, {sync: true}); + const before = snapshot(store); + + store.settings.set('size', 12); + + expect(listener).not.toHaveBeenCalled(); + expect(snapshot(store)).toBe(before); + }); + + test('NaN is a usable key and value', () => { + const store = createClassyStore({ + map: reactiveMap(), + set: reactiveSet(), + }); + store.map.set(Number.NaN, 'nan'); + store.set.add(Number.NaN); + store.set.add(Number.NaN); + expect(store.map.get(Number.NaN)).toBe('nan'); + expect(store.set.size).toBe(1); + }); +}); + +describe('reactive collections — lookup cost', () => { + const entries = (count: number): [string, number][] => + Array.from({length: count}, (_, index) => [`key${index}`, index]); + + /** Property reads that go through a store proxy during `run`. */ + function proxiedReads(run: () => void): number { + const reflectGet = Reflect.get; + let reads = 0; + const spy = spyOn(Reflect, 'get').mockImplementation((( + ...args: Parameters + ) => { + reads++; + return reflectGet(...args); + }) as typeof Reflect.get); + try { + run(); + } finally { + spy.mockRestore(); + } + return reads; + } + + test('a live lookup does not walk the entries through the proxy', () => { + const small = createClassyStore({map: reactiveMap(entries(10))}); + const large = createClassyStore({map: reactiveMap(entries(2000))}); + + const smallReads = proxiedReads(() => { + expect(small.map.get('key9')).toBe(9); + expect(small.map.has('missing')).toBe(false); + }); + const largeReads = proxiedReads(() => { + expect(large.map.get('key1999')).toBe(1999); + expect(large.map.has('missing')).toBe(false); + }); + + // The proxy work is the same handful of reads whatever the size. + expect(largeReads).toBe(smallReads); + expect(largeReads).toBeLessThan(20); + }); + + test('a set lookup does not walk the items through the proxy', () => { + const items = Array.from({length: 2000}, (_, index) => index); + const store = createClassyStore({set: reactiveSet(items)}); + + const reads = proxiedReads(() => { + expect(store.set.has(1999)).toBe(true); + expect(store.set.has(-1)).toBe(false); + }); + + expect(reads).toBeLessThan(20); + }); +}); + +describe('reactive collections — tracked reads in a component', () => { + test('a lookup records the entries it compared, so a replaced key is noticed', () => { + const a = {id: 'a'}; + const b = {id: 'b'}; + const shared = {label: 'same value'}; + const store = createClassyStore({map: reactiveMap()}); + store.map.set(a, shared); + const before = snapshot(store); + const affected = new WeakMap(); + const tracked = createProxy(before, affected, new TrackedProxyCache()); + + expect(tracked.map.get(a)).toEqual(shared); + expect(tracked.map.has(b)).toBe(false); + + // Same length, same value object, different key. + store.map.delete(a); + store.map.set(b, shared); + const after = snapshot(store); + const afterTracked = createProxy( + after, + new WeakMap(), + new TrackedProxyCache(), + ); + expect(afterTracked.map.get(a)).toBeUndefined(); + expect(afterTracked.map.has(b)).toBe(true); + + expect(isChanged(before, after, affected)).toBe(true); + }); +}); diff --git a/packages/classy-store/src/collections/collections.ts b/packages/classy-store/src/collections/collections.ts index d2f04e53..31183934 100644 --- a/packages/classy-store/src/collections/collections.ts +++ b/packages/classy-store/src/collections/collections.ts @@ -1,5 +1,37 @@ +import {identityOf, isTrackingProxy, unwrap} from '../storeRuntime'; import {PROXYABLE} from '../utils/internal/internal'; +// ── Lookup ──────────────────────────────────────────────────────────────────── + +/** + * Find a key (map) or value (set) in a backing array. + * + * Members are compared by identity, so an object matches whether it is given + * raw, as a store proxy, or as a snapshot of the same object; primitives use + * `Object.is`. Live state and plain snapshots are scanned on the raw array, + * with no proxy work per entry. A tracked read in a React component still goes + * entry by entry through its proxy, so that the component records what it + * compared. + */ +function indexOfMember( + backing: readonly unknown[], + member: unknown, + keyed: boolean, +): number { + const wanted = identityOf(member); + const source = isTrackingProxy(backing) ? backing : unwrap(backing); + for (let index = 0; index < source.length; index++) { + const entry = source[index]; + const candidate = keyed ? (entry as readonly unknown[])[0] : entry; + const identity = + typeof candidate === 'object' && candidate !== null + ? identityOf(candidate) + : candidate; + if (Object.is(identity, wanted)) return index; + } + return -1; +} + // ── ReactiveMap ─────────────────────────────────────────────────────────────── /** @@ -45,31 +77,35 @@ export class ReactiveMap { /** Returns the value for `key`, or `undefined`. O(n) linear scan. */ get(key: K): V | undefined { - const entry = this._entries.find(([k]) => Object.is(k, key)); - return entry ? entry[1] : undefined; + const entries = this._entries; + const index = indexOfMember(entries, key, true); + // Read the hit through `entries`: a live value comes back reactive. + return index === -1 ? undefined : entries[index][1]; } /** Returns `true` if `key` exists. O(n) linear scan. */ has(key: K): boolean { - return this._entries.some(([k]) => Object.is(k, key)); + return indexOfMember(this._entries, key, true) !== -1; } - /** Sets `key` to `value`. Updates in-place if key exists, appends otherwise. */ + /** Sets `key` to `value`. Keeps the existing key and position if present, appends otherwise. */ set(key: K, value: V): this { - const index = this._entries.findIndex(([k]) => Object.is(k, key)); + const entries = this._entries; + const index = indexOfMember(entries, key, true); if (index !== -1) { - this._entries[index] = [key, value]; + entries[index][1] = value; } else { - this._entries.push([key, value]); + entries.push([key, value]); } return this; } /** Removes the entry for `key`. Returns `true` if found. */ delete(key: K): boolean { - const index = this._entries.findIndex(([k]) => Object.is(k, key)); + const entries = this._entries; + const index = indexOfMember(entries, key, true); if (index === -1) return false; - this._entries.splice(index, 1); + entries.splice(index, 1); return true; } @@ -193,7 +229,7 @@ export class ReactiveSet { /** Returns `true` if `value` exists. O(n) linear scan. */ has(value: T): boolean { - return this._items.some((item) => Object.is(item, value)); + return indexOfMember(this._items, value, false) !== -1; } /** Adds `value` if not already present (no-op for duplicates). */ @@ -206,9 +242,10 @@ export class ReactiveSet { /** Removes `value`. Returns `true` if found. */ delete(value: T): boolean { - const index = this._items.findIndex((item) => Object.is(item, value)); + const items = this._items; + const index = indexOfMember(items, value, false); if (index === -1) return false; - this._items.splice(index, 1); + items.splice(index, 1); return true; } diff --git a/packages/classy-store/src/core/core.ts b/packages/classy-store/src/core/core.ts index 8163f30c..54f9425b 100644 --- a/packages/classy-store/src/core/core.ts +++ b/packages/classy-store/src/core/core.ts @@ -29,6 +29,11 @@ export function registerTrackingProxy(proxy: object, snap: object): void { trackedSnapshots.set(proxy, snap); } +/** @internal Whether a value is a render-tracking proxy over a snapshot. */ +export function isTrackingProxy(value: object): boolean { + return trackedSnapshots.has(value); +} + /** * @internal Strip a store proxy or a tracking proxy, leaving the object it * wraps: the raw target for live state, the frozen snapshot for tracked reads. diff --git a/packages/classy-store/src/frameworks/react/react.utilities.test.tsx b/packages/classy-store/src/frameworks/react/react.utilities.test.tsx index adbc5f69..754b1ef2 100644 --- a/packages/classy-store/src/frameworks/react/react.utilities.test.tsx +++ b/packages/classy-store/src/frameworks/react/react.utilities.test.tsx @@ -118,7 +118,7 @@ describe('core and React utility happy paths', () => { test('sends edits to DevTools and renders time-travel state in React', async () => { const extension = installDevtools(); const store = createClassyStore({count: 0}); - cleanups.push(devtools(store)); + cleanups.push(devtools(store).dispose); const container = document.createElement('div'); document.body.appendChild(container); const root = createRoot(container); @@ -215,7 +215,7 @@ describe('core and React utility happy paths', () => { cleanups.push(persistence.dispose); await persistence.hydrated; const history = withHistory(store); - cleanups.push(history.dispose, devtools(store)); + cleanups.push(history.dispose, devtools(store).dispose); store.count = 1; await flush(); diff --git a/packages/classy-store/src/storeRuntime.ts b/packages/classy-store/src/storeRuntime.ts index e80fc94c..ac93bb6a 100644 --- a/packages/classy-store/src/storeRuntime.ts +++ b/packages/classy-store/src/storeRuntime.ts @@ -5,6 +5,7 @@ export { getInternal, getVersion, identityOf, + isTrackingProxy, registerTrackingProxy, subscribe, unwrap, diff --git a/packages/classy-store/src/utils/devtools/devtools.test.ts b/packages/classy-store/src/utils/devtools/devtools.test.ts index eb56ea21..726eb9ec 100644 --- a/packages/classy-store/src/utils/devtools/devtools.test.ts +++ b/packages/classy-store/src/utils/devtools/devtools.test.ts @@ -64,11 +64,11 @@ describe('devtools', () => { } const store = createClassyStore(new Store()); - const dispose = devtools(store); + const handle = devtools(store); - // Should not throw and return a function - expect(typeof dispose).toBe('function'); - dispose(); // noop + // Should not throw and return an inert handle + expect(typeof handle.dispose).toBe('function'); + handle.dispose(); // noop }); it('returns a noop when enabled is false', () => { @@ -81,10 +81,10 @@ describe('devtools', () => { } const store = createClassyStore(new Store()); - const dispose = devtools(store, {enabled: false}); + const handle = devtools(store, {enabled: false}); expect(ext.connect).not.toHaveBeenCalled(); - dispose(); + handle.dispose(); }); it('connects with a custom name and sends init state', () => { @@ -404,13 +404,14 @@ describe('devtools', () => { } const store = createClassyStore(new Store()); - const dispose = devtools(store); + const handle = devtools(store); store.count = 1; await tick(); expect(conn.send).toHaveBeenCalledTimes(1); - dispose(); + handle.dispose(); + handle.dispose(); // Disposing twice disconnects once. store.count = 2; await tick(); diff --git a/packages/classy-store/src/utils/devtools/devtools.ts b/packages/classy-store/src/utils/devtools/devtools.ts index 1954d827..cc5544a1 100644 --- a/packages/classy-store/src/utils/devtools/devtools.ts +++ b/packages/classy-store/src/utils/devtools/devtools.ts @@ -19,21 +19,24 @@ type DevToolsExtension = { connect: (options?: {name?: string}) => DevToolsConnection; }; -declare global { - interface Window { - __REDUX_DEVTOOLS_EXTENSION__?: DevToolsExtension; - } -} +// Read the extension through a local type. Declaring it on the global `Window` +// would reach every consumer's program and can clash with their own typings. +type DevToolsHost = {__REDUX_DEVTOOLS_EXTENSION__?: DevToolsExtension}; // ── Options ────────────────────────────────────────────────────────────────── export type DevtoolsOptions = { /** Display name in the DevTools panel. Defaults to `'ClassyStore'`. */ name?: string; - /** Set to `false` to disable the integration (returns a noop). Defaults to `true`. */ + /** Set to `false` to disable the integration (returns an inert handle). Defaults to `true`. */ enabled?: boolean; }; +export type DevtoolsHandle = { + /** Disconnect from DevTools and stop observing the store. Safe to call repeatedly. */ + dispose: () => void; +}; + // ── Implementation ─────────────────────────────────────────────────────────── /** @@ -45,24 +48,21 @@ export type DevtoolsOptions = { * * @param proxyStore - A reactive proxy created by `createClassyStore()`. * @param options - Optional configuration. - * @returns A dispose function that disconnects from DevTools and unsubscribes. + * @returns A handle whose `dispose()` disconnects from DevTools and unsubscribes. */ export function devtools( proxyStore: T, options?: DevtoolsOptions, -): () => void { +): DevtoolsHandle { const {name = 'ClassyStore', enabled = true} = options ?? {}; + const extension = + enabled && typeof window !== 'undefined' + ? (window as unknown as DevToolsHost).__REDUX_DEVTOOLS_EXTENSION__ + : undefined; // Guard: no extension or disabled - if ( - !enabled || - typeof window === 'undefined' || - !window.__REDUX_DEVTOOLS_EXTENSION__ - ) { - return () => {}; - } - - const extension = window.__REDUX_DEVTOOLS_EXTENSION__; + if (!extension) return {dispose() {}}; + const connection = extension.connect({name}); // Send initial state @@ -112,9 +112,13 @@ export function devtools( } }); - // Return dispose function - return () => { - unsubscribeFromStore(); - devToolsUnsub(); + let disposed = false; + return { + dispose() { + if (disposed) return; + disposed = true; + unsubscribeFromStore(); + devToolsUnsub(); + }, }; } diff --git a/packages/classy-store/src/utils/equality/equality.test.ts b/packages/classy-store/src/utils/equality/equality.test.ts index 08a7cccc..39de0caf 100644 --- a/packages/classy-store/src/utils/equality/equality.test.ts +++ b/packages/classy-store/src/utils/equality/equality.test.ts @@ -173,4 +173,76 @@ describe('shallowEqual', () => { it('handles objects with symbol-like string keys', () => { expect(shallowEqual({'Symbol(foo)': 1}, {'Symbol(foo)': 1})).toBe(true); }); + + it('compares dates by the instant they hold', () => { + expect(shallowEqual(new Date(0), new Date(0))).toBe(true); + expect(shallowEqual(new Date(0), new Date(1e12))).toBe(false); + expect(shallowEqual(new Date(Number.NaN), new Date(Number.NaN))).toBe(true); + }); + + it('compares maps by size, keys and values one level deep', () => { + const shared = {id: 1}; + expect(shallowEqual(new Map([[1, shared]]), new Map([[1, shared]]))).toBe( + true, + ); + expect(shallowEqual(new Map([[1, 1]]), new Map([[2, 2]]))).toBe(false); + expect(shallowEqual(new Map([[1, 1]]), new Map([[1, 2]]))).toBe(false); + expect(shallowEqual(new Map([[1, {id: 1}]]), new Map([[1, {id: 1}]]))).toBe( + false, + ); + expect( + shallowEqual( + new Map([[1, undefined]]), + new Map([[2, undefined]]), + ), + ).toBe(false); + expect(shallowEqual(new Map(), new Map())).toBe(true); + }); + + it('compares sets by size and membership', () => { + expect(shallowEqual(new Set([1, 2]), new Set([2, 1]))).toBe(true); + expect(shallowEqual(new Set([1]), new Set([2]))).toBe(false); + expect(shallowEqual(new Set([1]), new Set([1, 2]))).toBe(false); + }); + + it('never equates values with different prototypes', () => { + class Point { + x = 1; + } + class Size { + x = 1; + } + expect(shallowEqual(new Point() as unknown, new Size() as unknown)).toBe( + false, + ); + expect(shallowEqual(new Point() as unknown, {x: 1} as unknown)).toBe(false); + expect(shallowEqual(new Map() as unknown, new Set() as unknown)).toBe( + false, + ); + expect(shallowEqual(Object.create(null) as unknown, {} as unknown)).toBe( + false, + ); + }); + + it('compares class instances of one class by their own fields', () => { + class Point { + constructor( + public x: number, + public y: number, + ) {} + } + expect(shallowEqual(new Point(1, 2), new Point(1, 2))).toBe(true); + expect(shallowEqual(new Point(1, 2), new Point(1, 3))).toBe(false); + }); + + it('does not equate opaque objects whose state it cannot see', () => { + class Empty {} + expect(shallowEqual(/a/, /b/)).toBe(false); + expect(shallowEqual(/a/, /a/)).toBe(false); + expect(shallowEqual(new Error('a'), new Error('b'))).toBe(false); + expect(shallowEqual(Promise.resolve(1), Promise.resolve(2))).toBe(false); + expect(shallowEqual(new Empty(), new Empty())).toBe(false); + // Records and arrays with nothing in them hide nothing. + expect(shallowEqual(Object.create(null), Object.create(null))).toBe(true); + }); }); diff --git a/packages/classy-store/src/utils/equality/equality.ts b/packages/classy-store/src/utils/equality/equality.ts index 094a8db6..9b21e8b2 100644 --- a/packages/classy-store/src/utils/equality/equality.ts +++ b/packages/classy-store/src/utils/equality/equality.ts @@ -1,4 +1,4 @@ -import {getArrayIndex} from '../internal/internal'; +import {getArrayIndex, isPlainObject} from '../internal/internal'; function remainingIndices(array: readonly unknown[], after: number): string[] { return Object.getOwnPropertyNames(array).filter((key) => { @@ -8,12 +8,18 @@ function remainingIndices(array: readonly unknown[], after: number): string[] { } /** - * Shallow-equal comparison for objects and arrays. - * Useful as a custom `isEqual` for `useClassyStore` selectors that return objects/arrays. + * Shallow-equal comparison: the two values, or their contents one level deep. + * Useful as a custom `isEqual` for `useClassyStore` selectors that return a new + * object, array, or collection on each call. * - * - Primitives compared with `Object.is`. + * - Primitives and identical references compared with `Object.is`. + * - Values with different prototypes are never equal. * - Arrays: length, occupied indices, and element-wise `Object.is`. - * - Objects: key count + value-wise `Object.is`. + * - `Date`: the same instant. `Map` and `Set`: same size and same members, + * with map values compared by `Object.is`. + * - Other objects: key count + value-wise `Object.is` over enumerable string + * keys. An object with no such keys is equal to another only when both are + * plain records, since its state cannot be seen from here. */ export function shallowEqual(a: T, b: T): boolean { if (Object.is(a, b)) return true; @@ -25,6 +31,25 @@ export function shallowEqual(a: T, b: T): boolean { ) { return false; } + if (Object.getPrototypeOf(a) !== Object.getPrototypeOf(b)) return false; + + if (a instanceof Date) { + return b instanceof Date && Object.is(a.getTime(), b.getTime()); + } + if (a instanceof Map) { + if (!(b instanceof Map) || a.size !== b.size) return false; + for (const [key, value] of a) { + if (!b.has(key) || !Object.is(value, b.get(key))) return false; + } + return true; + } + if (a instanceof Set) { + if (!(b instanceof Set) || a.size !== b.size) return false; + for (const value of a) { + if (!b.has(value)) return false; + } + return true; + } let keysA: string[]; let keysB: string[]; @@ -46,6 +71,8 @@ export function shallowEqual(a: T, b: T): boolean { if (Array.isArray(b)) return false; keysA = Object.keys(a); keysB = Object.keys(b); + // A RegExp, an Error, a Promise: nothing here says whether they match. + if (!keysA.length && !keysB.length) return isPlainObject(a); } if (keysA.length !== keysB.length) return false; diff --git a/packages/classy-store/src/utils/history/history.restore.test.ts b/packages/classy-store/src/utils/history/history.restore.test.ts new file mode 100644 index 00000000..3ac49bd9 --- /dev/null +++ b/packages/classy-store/src/utils/history/history.restore.test.ts @@ -0,0 +1,133 @@ +import {describe, expect, it, mock} from 'bun:test'; +import {createClassyStore, subscribe} from '../../core/core'; +import {snapshot} from '../../snapshot/snapshot'; +import {withHistory} from './history'; + +const flush = () => new Promise((resolve) => setTimeout(resolve, 0)); + +describe('withHistory() — restoring state', () => { + it('undo removes a top-level field that was added after the entry', async () => { + const store = createClassyStore({} as Record); + const history = withHistory(store); + store.a = 1; + await flush(); + store.b = 2; + await flush(); + + history.undo(); + expect(snapshot(store)).toEqual({a: 1}); + history.undo(); + expect(snapshot(store)).toEqual({}); + history.redo(); + history.redo(); + expect(snapshot(store)).toEqual({a: 1, b: 2}); + }); + + it('undo leaves methods and getters in place when removing added fields', async () => { + class Form { + [field: string]: unknown; + name = ''; + + get filled() { + return this.name.length > 0; + } + + rename(name: string) { + this.name = name; + } + } + const store = createClassyStore(new Form()); + const history = withHistory(store); + store.extra = 'temporary'; + await flush(); + + history.undo(); + + expect('extra' in store).toBe(false); + store.rename('Ada'); + expect(store.filled).toBe(true); + }); + + it('undo right after an edit steps back over that edit', async () => { + const store = createClassyStore({value: 0}); + const history = withHistory(store); + store.value = 1; + await flush(); + + store.value = 2; + history.undo(); // The edit to 2 has not been recorded by a notification yet. + + expect(store.value).toBe(1); + expect(history.canRedo).toBe(true); + await flush(); + // The pending notification for that edit must not add a second entry. + history.redo(); + expect(store.value).toBe(2); + expect(history.canRedo).toBe(false); + history.undo(); + history.undo(); + expect(store.value).toBe(0); + expect(history.canUndo).toBe(false); + }); + + it('undo with only an unrecorded edit returns to the initial state', () => { + const store = createClassyStore({value: 0}); + const history = withHistory(store); + + store.value = 5; + history.undo(); + + expect(store.value).toBe(0); + history.redo(); + expect(store.value).toBe(5); + }); + + it('undo while paused does not record the unrecorded edit', async () => { + const store = createClassyStore({value: 0}); + const history = withHistory(store); + store.value = 1; + await flush(); + history.pause(); + + store.value = 9; + history.undo(); + + expect(store.value).toBe(0); + history.redo(); + expect(store.value).toBe(1); + expect(history.canRedo).toBe(false); + }); + + it('undo and redo keep the identity of branches they do not change', async () => { + const store = createClassyStore({count: 0, big: {list: [1, 2, 3]}}); + const history = withHistory(store); + const big = snapshot(store).big; + store.count = 1; + await flush(); + + const bigListener = mock(() => {}); + subscribe(store.big, bigListener, {sync: true}); + history.undo(); + expect(store.count).toBe(0); + expect(snapshot(store).big).toBe(big); + history.redo(); + expect(store.count).toBe(1); + expect(snapshot(store).big).toBe(big); + expect(bigListener).not.toHaveBeenCalled(); + }); + + it('undo still restores a branch that did change', async () => { + const store = createClassyStore({count: 0, big: {list: [1, 2, 3]}}); + const history = withHistory(store); + store.big.list.push(4); + await flush(); + + history.undo(); + expect(store.big.list).toEqual([1, 2, 3]); + history.redo(); + expect(store.big.list).toEqual([1, 2, 3, 4]); + // The restored branch is live state again, not a frozen snapshot. + store.big.list.push(5); + expect(store.big.list).toEqual([1, 2, 3, 4, 5]); + }); +}); diff --git a/packages/classy-store/src/utils/history/history.ts b/packages/classy-store/src/utils/history/history.ts index e4f7fccc..8f690c21 100644 --- a/packages/classy-store/src/utils/history/history.ts +++ b/packages/classy-store/src/utils/history/history.ts @@ -1,4 +1,4 @@ -import {snapshot, subscribe} from '../../storeRuntime'; +import {getVersion, snapshot, subscribe} from '../../storeRuntime'; import type {Snapshot} from '../../types'; import {cloneSnapshotValue} from '../cloneSnapshot/cloneSnapshot'; import {findGetterDescriptor} from '../internal/internal'; @@ -76,41 +76,46 @@ export function withHistory( isDisposed: disposed, }); - /** - * Apply a snapshot's data properties back to the store proxy. - * Skips getters and methods — same pattern as `persist`. - */ + const live = proxyStore as Record; + // The store revision that the entry under the pointer describes. + let recordedVersion = getVersion(proxyStore); + + /** Getters and methods are behavior, not state; restoring leaves them alone. */ + function isData(key: string): boolean { + return ( + !findGetterDescriptor(proxyStore, key)?.get && + typeof live[key] !== 'function' + ); + } + + /** Make the store's data fields match a recorded snapshot. */ function applySnapshot(snap: Snapshot): void { - const snapRecord = snap as Record; + const recorded = snap as Record; + const current = snapshot(proxyStore) as Record; const clones = new WeakMap(); - for (const key of Object.keys(snapRecord)) { - // Skip getters - if (findGetterDescriptor(proxyStore, key)?.get) continue; - // Skip methods - if (typeof (proxyStore as Record)[key] === 'function') { + // A field added after this snapshot was taken did not exist in it. + for (const key of Object.keys(current)) { + if (!Object.hasOwn(recorded, key) && isData(key)) delete live[key]; + } + for (const key of Object.keys(recorded)) { + if (!isData(key)) continue; + // An untouched branch still has this exact snapshot. Leaving it alone + // keeps its identity, so selectors reading it stay quiet. + if (Object.hasOwn(current, key) && Object.is(current[key], recorded[key])) continue; - } - (proxyStore as Record)[key] = cloneSnapshotValue( - snapRecord[key], - clones, - ); + live[key] = cloneSnapshotValue(recorded[key], clones); } } - // Subscribe to store mutations - const unsubscribeFromStore = subscribe(proxyStore, () => { - if (paused || restoring > 0 || disposed) return; - - const snap = snapshot(proxyStore); - + /** Append the store's current state as the newest history entry. */ + function record(): void { // Truncate any redo entries after the current pointer if (pointer < history.length - 1) { history.length = pointer + 1; } - // Push new snapshot - history.push(snap); + history.push(snapshot(proxyStore)); pointer = history.length - 1; // Enforce limit by shifting from front @@ -118,37 +123,48 @@ export function withHistory( history.shift(); pointer = history.length - 1; } + recordedVersion = getVersion(proxyStore); + } + + /** Move to another entry without recording the move itself. */ + function restore(target: number): void { + pointer = target; + restoring++; + try { + applySnapshot(history[pointer]); + } finally { + recordedVersion = getVersion(proxyStore); + // The store's batched notification for this restore runs first. + queueMicrotask(() => { + restoring--; + }); + status.update(readStatus()); + } + } + + // Subscribe to store mutations + const unsubscribeFromStore = subscribe(proxyStore, () => { + if (paused || restoring > 0 || disposed) return; + // undo() may already have recorded this revision ahead of the notification. + if (getVersion(proxyStore) === recordedVersion) return; + record(); status.update(readStatus()); }); const handle: HistoryHandle = { ...status.source, undo() { - if (disposed || pointer <= 0) return; - pointer--; - restoring++; - try { - applySnapshot(history[pointer]); - } finally { - queueMicrotask(() => { - restoring--; - }); - status.update(readStatus()); - } + if (disposed) return; + // An edit made in this same tick has not been recorded yet. Record it + // first, so that undo steps back over it and redo can return to it. + if (!paused && getVersion(proxyStore) !== recordedVersion) record(); + if (pointer <= 0) return; + restore(pointer - 1); }, redo() { if (disposed || pointer >= history.length - 1) return; - pointer++; - restoring++; - try { - applySnapshot(history[pointer]); - } finally { - queueMicrotask(() => { - restoring--; - }); - status.update(readStatus()); - } + restore(pointer + 1); }, get canUndo() { diff --git a/packages/classy-store/src/utils/index.ts b/packages/classy-store/src/utils/index.ts index d08d22aa..0702a709 100644 --- a/packages/classy-store/src/utils/index.ts +++ b/packages/classy-store/src/utils/index.ts @@ -7,7 +7,7 @@ */ export type {SubscribeOptions} from '../types'; -export type {DevtoolsOptions} from './devtools/devtools'; +export type {DevtoolsHandle, DevtoolsOptions} from './devtools/devtools'; export {devtools} from './devtools/devtools'; export type { HistoryHandle, diff --git a/packages/classy-store/src/utils/persist/persist.hydration.test.ts b/packages/classy-store/src/utils/persist/persist.hydration.test.ts new file mode 100644 index 00000000..cbe6d7c0 --- /dev/null +++ b/packages/classy-store/src/utils/persist/persist.hydration.test.ts @@ -0,0 +1,315 @@ +import {afterEach, describe, expect, mock, test} from 'bun:test'; +import {createClassyStore} from '../../core/core'; +import {persist} from './persist'; +import type {PersistHandle} from './persist.types'; + +function deferred() { + let resolve!: (value: T) => void; + const promise = new Promise((resolvePromise) => { + resolve = resolvePromise; + }); + return {promise, resolve}; +} + +const tick = () => new Promise((resolve) => setTimeout(resolve, 0)); +const stored = (state: Record, version = 0) => + JSON.stringify({version, state}); +const handles: PersistHandle[] = []; +afterEach(() => { + for (const handle of handles.splice(0)) handle.dispose(); +}); + +/** Storage whose read stays pending until the test releases it. */ +function slowStorage(initial: string | null) { + const read = deferred(); + let saved = initial; + const writes: string[] = []; + return { + release: () => read.resolve(saved), + writes, + get saved() { + return saved; + }, + storage: { + getItem: () => read.promise, + setItem: (_name: string, value: string) => { + saved = value; + writes.push(value); + }, + removeItem: mock(() => { + saved = null; + }), + }, + }; +} + +describe('persist hydration with local edits', () => { + test('an edit to an unrelated field does not discard or overwrite stored data', async () => { + const slow = slowStorage(stored({theme: 'dark', fontSize: 20})); + const store = createClassyStore({ + theme: 'light', + fontSize: 12, + loading: false, + }); + const handle = persist(store, { + name: 'settings', + storage: slow.storage, + properties: ['theme', 'fontSize'], + }); + handles.push(handle); + + store.loading = true; // Start-up state that is not even persisted. + await tick(); + // The record must survive until the read can restore it. + expect(slow.writes).toEqual([]); + + slow.release(); + await handle.hydrated; + await tick(); + + expect(store.theme).toBe('dark'); + expect(store.fontSize).toBe(20); + expect(store.loading).toBe(true); + expect(JSON.parse(slow.saved as string).state).toEqual({ + theme: 'dark', + fontSize: 20, + }); + }); + + test('synchronous storage: an edit in the same tick as persist() keeps stored data', async () => { + let saved: string | null = stored({theme: 'dark', fontSize: 20}); + const store = createClassyStore({ + theme: 'light', + fontSize: 12, + lastOpened: 0, + }); + const handle = persist(store, { + name: 'settings', + properties: ['theme', 'fontSize'], + storage: { + getItem: () => saved, + setItem: (_name, value) => { + saved = value; + }, + removeItem: () => { + saved = null; + }, + }, + }); + handles.push(handle); + store.lastOpened = 123; + + await handle.hydrated; + await tick(); + + expect(store.theme).toBe('dark'); + expect(store.fontSize).toBe(20); + expect(JSON.parse(saved as string).state).toEqual({ + theme: 'dark', + fontSize: 20, + }); + }); + + test('only the field edited during the read keeps its local value', async () => { + const slow = slowStorage(stored({theme: 'dark', fontSize: 20})); + const store = createClassyStore({theme: 'light', fontSize: 12}); + const handle = persist(store, {name: 'settings', storage: slow.storage}); + handles.push(handle); + + store.fontSize = 16; + await tick(); + slow.release(); + await handle.hydrated; + await tick(); + + expect(store.theme).toBe('dark'); + expect(store.fontSize).toBe(16); + // The save issued after the read holds both the restored and the edited field. + expect(slow.writes).toHaveLength(1); + expect(JSON.parse(slow.saved as string).state).toEqual({ + theme: 'dark', + fontSize: 16, + }); + }); + + test('a nested edit keeps that whole field and restores the others', async () => { + const slow = slowStorage( + stored({profile: {name: 'Stored', age: 40}, theme: 'dark'}), + ); + const store = createClassyStore({ + profile: {name: 'Default', age: 0}, + theme: 'light', + }); + const handle = persist(store, {name: 'user', storage: slow.storage}); + handles.push(handle); + + store.profile.name = 'Typed'; + slow.release(); + await handle.hydrated; + + expect(store.profile).toEqual({name: 'Typed', age: 0}); + expect(store.theme).toBe('dark'); + }); + + test('an edit made while a debounced save is pending is saved after the read', async () => { + const slow = slowStorage(stored({theme: 'dark', fontSize: 20})); + const store = createClassyStore({theme: 'light', fontSize: 12}); + const handle = persist(store, { + name: 'settings', + storage: slow.storage, + debounce: 5, + }); + handles.push(handle); + + store.fontSize = 16; + await tick(); // Arms the debounce while the read is still pending. + slow.release(); + await handle.hydrated; + expect(slow.writes).toEqual([]); + + await new Promise((resolve) => setTimeout(resolve, 20)); + expect(slow.writes).toHaveLength(1); + expect(JSON.parse(slow.saved as string).state).toEqual({ + theme: 'dark', + fontSize: 16, + }); + }); + + test('a read that finds nothing still saves the edit made while it was pending', async () => { + const slow = slowStorage(null); + const store = createClassyStore({count: 0}); + const handle = persist(store, {name: 'draft', storage: slow.storage}); + handles.push(handle); + + store.count = 3; + await tick(); + expect(slow.writes).toEqual([]); + slow.release(); + await handle.hydrated; + await tick(); + + expect(JSON.parse(slow.saved as string).state).toEqual({count: 3}); + }); + + test('clear() during the read cancels the save an earlier edit asked for', async () => { + const slow = slowStorage(stored({count: 1})); + const store = createClassyStore({count: 0}); + const handle = persist(store, {name: 'draft', storage: slow.storage}); + handles.push(handle); + + store.count = 3; + await tick(); + await handle.clear(); + slow.release(); + await handle.hydrated; + await tick(); + + expect(slow.storage.removeItem).toHaveBeenCalledTimes(1); + expect(slow.writes).toEqual([]); + expect(store.count).toBe(3); + }); + + test('plain hydration with no local edit writes nothing back', async () => { + const slow = slowStorage(stored({count: 5})); + const store = createClassyStore({count: 0}); + const handle = persist(store, {name: 'draft', storage: slow.storage}); + handles.push(handle); + + slow.release(); + await handle.hydrated; + await tick(); + + expect(store.count).toBe(5); + expect(slow.writes).toEqual([]); + }); +}); + +describe('persist schema versions', () => { + function syncStorage(initial: string) { + let saved: string | null = initial; + return { + get saved() { + return saved; + }, + storage: { + getItem: () => saved, + setItem: (_name: string, value: string) => { + saved = value; + }, + removeItem: () => { + saved = null; + }, + }, + }; + } + + test('stored data from another version is ignored when there is no migrate', async () => { + const backing = syncStorage(stored({theme: {name: 'dark'}}, 1)); + const onError = mock(() => {}); + const store = createClassyStore({theme: 'light'}); + const handle = persist(store, { + name: 'settings', + storage: backing.storage, + version: 2, + onError, + }); + handles.push(handle); + + await handle.hydrated; + + expect(store.theme).toBe('light'); + expect(onError).not.toHaveBeenCalled(); + expect(handle.getSnapshot().lastError).toBeNull(); + // The old record is left alone until the next save replaces it. + expect(JSON.parse(backing.saved as string).version).toBe(1); + + store.theme = 'solarized'; + await tick(); + expect(JSON.parse(backing.saved as string)).toEqual({ + version: 2, + state: {theme: 'solarized'}, + }); + }); + + test('migrate receives the stored state and its version', async () => { + const backing = syncStorage(stored({theme: {name: 'dark'}}, 1)); + const store = createClassyStore({theme: 'light'}); + const handle = persist(store, { + name: 'settings', + storage: backing.storage, + version: 2, + migrate: (state, oldVersion) => ({ + theme: `${(state.theme as {name: string}).name}@${oldVersion}`, + }), + }); + handles.push(handle); + + await handle.hydrated; + + expect(store.theme).toBe('dark@1'); + }); + + test('a record without a version counts as version 0', async () => { + const record = JSON.stringify({state: {theme: 'dark'}}); + const current = createClassyStore({theme: 'light'}); + const sameVersion = persist(current, { + name: 'settings', + storage: syncStorage(record).storage, + }); + const migrate = mock((state: Record) => state); + const newer = createClassyStore({theme: 'light'}); + const otherVersion = persist(newer, { + name: 'settings', + storage: syncStorage(record).storage, + version: 1, + migrate, + }); + handles.push(sameVersion, otherVersion); + + await Promise.all([sameVersion.hydrated, otherVersion.hydrated]); + + expect(current.theme).toBe('dark'); + expect(newer.theme).toBe('dark'); + expect(migrate).toHaveBeenCalledWith({theme: 'dark'}, 0); + }); +}); diff --git a/packages/classy-store/src/utils/persist/persist.ts b/packages/classy-store/src/utils/persist/persist.ts index ae751af5..1d40a4c4 100644 --- a/packages/classy-store/src/utils/persist/persist.ts +++ b/packages/classy-store/src/utils/persist/persist.ts @@ -121,6 +121,9 @@ export function persist( let hydratedFlag = false; let expiredFlag = false; let hydrationRequest = 0; + // Reads in flight, and whether a local edit asked to be saved meanwhile. + let reading = 0; + let saveAfterRead = false; let storageQueue: Promise | undefined; let skipAutoSaveVersion: number | undefined; let clearedVersion: number | undefined; @@ -228,37 +231,57 @@ export function persist( await enqueueStorageMutation(() => storage.setItem(name, json), 'write'); } - /** Schedule a debounced write (or write immediately if debounce is 0). */ - function scheduleWrite(): void { - if (disposed) return; - // A preceding subscriber can edit during a batch, scheduling a second - // notification for a revision this handle has already queued for saving. - const current = getVersion(proxyStore); - if (current === skipAutoSaveVersion || current === clearedVersion) return; - skipAutoSaveVersion = current; + /** Save in the background, unless a read has yet to deliver stored data. */ + function autoSave(): void { + // Writing now would replace the stored record with defaults before the + // read can restore it. Save the merged state once the read settles. + if (reading) { + saveAfterRead = true; + return; + } + // Background writes already report failures through status and onError. + void writeToStorage().catch(() => {}); + } + /** Write after the configured debounce (or immediately if it is 0). */ + function queueAutoSave(): void { if (debounceMs <= 0) { - // Background writes already report failures through status and onError. - void writeToStorage().catch(() => {}); + autoSave(); return; } - if (debounceTimer !== null) { clearTimeout(debounceTimer); } debounceTimer = setTimeout(() => { debounceTimer = null; - void writeToStorage().catch(() => {}); + autoSave(); }, debounceMs); } + /** Schedule a save for a store notification. */ + function scheduleWrite(): void { + if (disposed) return; + // A preceding subscriber can edit during a batch, scheduling a second + // notification for a revision this handle has already queued for saving. + const current = getVersion(proxyStore); + if (current === skipAutoSaveVersion || current === clearedVersion) return; + skipAutoSaveVersion = current; + queueAutoSave(); + } + // ── Restore logic ────────────────────────────────────────────────────── /** * Parse a raw JSON string from storage, apply migration and transforms, * and merge the result into the store proxy. Returns whether data expired. + * + * `baseline` is the state the stored data is restored over. A field that no + * longer matches it was edited locally in the meantime and keeps that edit. */ - function applyPersistedState(raw: string): boolean { + function applyPersistedState( + raw: string, + baseline = snapshot(proxyStore) as Record, + ): boolean { const envelope = JSON.parse(raw) as PersistEnvelope; if ( @@ -279,15 +302,21 @@ export function persist( return true; } - const startVersion = getVersion(proxyStore); - const baseline = snapshot(proxyStore) as Record; let {state} = envelope; - // Version migration. - if (migrate && envelope.version !== version) { - state = migrate(state, envelope.version); + // Data stored under another schema version is usable only through + // `migrate`. Without one, the store keeps its current state. A record + // with no version counts as the default, version 0. + const storedVersion = + typeof envelope.version === 'number' ? envelope.version : 0; + if (storedVersion !== version) { + if (!migrate) return false; + state = migrate(state, storedVersion); } + const startVersion = getVersion(proxyStore); + const current = snapshot(proxyStore) as Record; + // Per-property deserialize transforms. for (const key of Object.keys(state)) { const transform = transformMap.get(key); @@ -302,7 +331,7 @@ export function persist( typeof merge === 'function' ? merge( state, - Object.fromEntries(propKeys.map((key) => [key, baseline[key]])), + Object.fromEntries(propKeys.map((key) => [key, current[key]])), ) : state; const pending = new Set( @@ -325,7 +354,9 @@ export function persist( } try { - if (getVersion(proxyStore) !== startVersion) discardEditedFields(); + // The cached snapshot keeps its identity until something changes, so + // this also covers edits made by `migrate`, a transform or `merge`. + if (snapshot(proxyStore) !== baseline) discardEditedFields(); for (const key of pending) { pending.delete(key); const before = getVersion(proxyStore); @@ -353,50 +384,59 @@ export function persist( /** Read from storage and apply to the store. */ async function hydrateFromStorage(): Promise { const request = ++hydrationRequest; - const storeVersion = getVersion(proxyStore); - const isCurrent = () => - !disposed && - request === hydrationRequest && - storeVersion === getVersion(proxyStore); - let raw: string | null; + // Stored fields are restored over this state. A field edited after this + // point keeps its newer local value; every other field is still restored. + const baseline = snapshot(proxyStore) as Record; + const isCurrent = () => !disposed && request === hydrationRequest; + reading++; try { - // A read requested after save()/clear() observes those operations' results. - if (storageQueue) await storageQueue; - if (!isCurrent()) return; - raw = await storage.getItem(name); - } catch (error) { - if (isCurrent()) fail(error, 'read'); - return; - } - // Cleanup, a newer request, or a local edit can supersede an in-flight read. - // Obsolete data must not replace current state or clear newer stored data. - if (!isCurrent()) return; - if (raw !== null) { - // A debounced local write may be pending from a mutation issued before - // we got around to hydrating; the freshly-loaded state would be - // overwritten when that timer fires. Cancel it before applying. - if (debounceTimer !== null) { - clearTimeout(debounceTimer); - debounceTimer = null; - } - let expired: boolean; + let raw: string | null; try { - expired = applyPersistedState(raw); + // A read requested after save()/clear() observes those operations' results. + if (storageQueue) await storageQueue; + if (!isCurrent()) return; + raw = await storage.getItem(name); } catch (error) { - fail(error, 'parse'); + if (isCurrent()) fail(error, 'read'); + return; } - if (expired && clearOnExpire) { - const removal = enqueueStorageMutation( - () => storage.removeItem(name), - 'remove', - ); - status.update(readStatus()); - await removal; + // Cleanup or a newer request can supersede an in-flight read. Obsolete + // data must not replace current state or clear newer stored data. + if (!isCurrent()) return; + if (raw !== null) { + // A debounced local write may be pending from a mutation issued + // before the data arrived. Fold it into the save that follows the read. + if (debounceTimer !== null) { + clearTimeout(debounceTimer); + debounceTimer = null; + saveAfterRead = true; + } + let expired: boolean; + try { + expired = applyPersistedState(raw, baseline); + } catch (error) { + fail(error, 'parse'); + } + if (expired && clearOnExpire) { + const removal = enqueueStorageMutation( + () => storage.removeItem(name), + 'remove', + ); + status.update(readStatus()); + await removal; + } else { + succeeded(); + } } else { succeeded(); } - } else { - succeeded(); + } finally { + reading--; + // Local edits made during the read are saved together with what it restored. + if (!reading && saveAfterRead) { + saveAfterRead = false; + if (!disposed) queueAutoSave(); + } } } @@ -486,6 +526,7 @@ export function persist( async save() { assertActive(); // Cancel pending debounce and write immediately. + saveAfterRead = false; if (debounceTimer !== null) { clearTimeout(debounceTimer); debounceTimer = null; @@ -496,6 +537,7 @@ export function persist( async clear() { assertActive(); hydrationRequest++; + saveAfterRead = false; clearedVersion = getVersion(proxyStore); if (debounceTimer !== null) { clearTimeout(debounceTimer); From e34e5ddc412c38136e9cd9e9778efec2658aa658 Mon Sep 17 00:00:00 2001 From: codeBelt Date: Mon, 16 Nov 2026 20:46:23 -0600 Subject: [PATCH 003/169] feat(adapters)!: rename injectStore to injectClassyStore and widen the Solid peer range Phase 3 of the 1.0 preparation. - Angular: injectStore is now injectClassyStore, matching createClassyStore and useClassyStore. Source, tests, the Angular example and the docs that name it are updated. - Solid: accept solid-js ^2.0.0-rc.18 instead of exactly rc.18. The adapter unit tests and the Solid example typecheck and build were run at rc.18 and at rc.23, the newest release candidate; development now uses rc.23. - Tests read the DevTools extension through a local type, as the library does, now that nothing is declared on the global Window. BREAKING CHANGE: `injectStore` from `@codebelt/classy-store/angular` is renamed to `injectClassyStore`. Co-Authored-By: Claude Fable 5.2 --- CLAUDE.md | 2 +- README.md | 2 +- bun.lock | 42 +++++++++---------- examples/angular/src/app/app.component.ts | 4 +- examples/solid/package.json | 4 +- package.json | 4 +- packages/classy-store/package.json | 8 ++-- .../src/frameworks/angular/angular.test.ts | 30 +++++++------ .../src/frameworks/angular/angular.ts | 12 +++++- .../frameworks/react/react.utilities.test.tsx | 27 +++++++----- .../angularCompatibility/consumer.types.ts | 6 +-- .../components/angularForm/AngularForm.ts | 4 +- .../tests/next/checkBoundaries.mjs | 2 +- website/content/docs/ABOUT.md | 2 +- website/content/docs/ANGULAR.md | 8 ++-- website/content/docs/API_REFERENCE.md | 4 +- 16 files changed, 91 insertions(+), 70 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index f510353a..f6713039 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -21,7 +21,7 @@ packages/classy-store/src/ │ ├── vue/vue.ts # Vue: useClassyStore() → ShallowRef> (onUnmounted cleanup) │ ├── svelte/svelte.ts # Svelte: toSvelteStore() → ClassyReadable> │ ├── solid/solid.ts # Solid: useClassyStore() → () => Snapshot signal (onCleanup) -│ └── angular/angular.ts # Angular: injectStore() → Signal> (DestroyRef) +│ └── angular/angular.ts # Angular: injectClassyStore() → Signal> (DestroyRef) └── utils/ ├── index.ts # Utils barrel: persist, devtools, subscribeKey, withHistory ├── persist/persist.ts # persist() — storage, transforms, versioning, cross-tab sync, TTL diff --git a/README.md b/README.md index 2d63d1c6..acb3c47e 100644 --- a/README.md +++ b/README.md @@ -134,7 +134,7 @@ Most components only need `useClassyStore(store)` to render application data. Us ## Angular 22 integration The `/angular` adapter supports **all stable Angular 22 releases** (`^22.0.0`). -The library and example pin the Angular framework to `22.2.6`. Call `injectStore(store)` +The library and example pin the Angular framework to `22.2.6`. Call `injectClassyStore(store)` in a live Angular injection context to get a readonly snapshot signal. Store writes update the signal and dependent computed reads immediately; Angular schedules rendering, including in zoneless applications. The subscription is diff --git a/bun.lock b/bun.lock index 7e7abddd..fa0b181c 100644 --- a/bun.lock +++ b/bun.lock @@ -54,8 +54,8 @@ "version": "0.0.0", "dependencies": { "@codebelt/classy-store": "workspace:*", - "@solidjs/web": "2.0.0-rc.18", - "solid-js": "2.0.0-rc.18", + "@solidjs/web": "2.0.0-rc.23", + "solid-js": "2.0.0-rc.23", }, "devDependencies": { "@solidjs/vite-plugin": "3.0.0-next.51", @@ -104,8 +104,8 @@ "@babel/core": "7.29.7", "@happy-dom/global-registrator": "21.0.4", "@playwright/test": "1.65.1", - "@solidjs/compiler": "2.0.0-rc.18", - "@solidjs/web": "2.0.0-rc.18", + "@solidjs/compiler": "2.0.0-rc.23", + "@solidjs/web": "2.0.0-rc.23", "@types/bun": "1.4.4", "@types/react": "19.3.0", "@types/react-dom": "19.3.0", @@ -113,7 +113,7 @@ "react": "19.3.1", "react-compiler-runtime": "1.0.0", "react-dom": "19.3.1", - "solid-js": "2.0.0-rc.18", + "solid-js": "2.0.0-rc.23", "svelte": "5.57.3", "tsdown": "0.23.7", "typescript": "7.0.2", @@ -122,7 +122,7 @@ "peerDependencies": { "@angular/core": "^22.0.0", "react": "^18.0.0 || ^19.0.0", - "solid-js": "2.0.0-rc.18", + "solid-js": "^2.0.0-rc.18", "svelte": "^4.0.0 || ^5.0.0", "vue": "^3.2.0", }, @@ -139,8 +139,8 @@ "sharp", ], "overrides": { - "@solidjs/babel-plugin": "2.0.0-rc.18", - "@solidjs/compiler": "2.0.0-rc.18", + "@solidjs/babel-plugin": "2.0.0-rc.23", + "@solidjs/compiler": "2.0.0-rc.23", }, "packages": { "@alloc/quick-lru": ["@alloc/quick-lru@5.2.0", "", {}, "sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw=="], @@ -633,27 +633,27 @@ "@schematics/angular": ["@schematics/angular@22.2.7", "", { "dependencies": { "@angular-devkit/core": "22.2.7", "@angular-devkit/schematics": "22.2.7", "jsonc-parser": "3.3.1", "oxc-parser": "0.156.0", "typescript": "6.0.3" } }, "sha512-cdwLAc0m6mWZ3HA0VHqulUKItviExnENQwDQ01f9lQS9bTAWBEkg7Pgua+3BijMUEE5sf/kamqCdwaKPUn1uXQ=="], - "@solidjs/babel-plugin": ["@solidjs/babel-plugin@2.0.0-rc.18", "", { "dependencies": { "@babel/helper-module-imports": "7.18.6", "@babel/plugin-syntax-jsx": "^7.18.6", "@babel/types": "^7.20.7", "html-entities": "2.3.3", "parse5": "^7.1.2" }, "peerDependencies": { "@babel/core": "^7.20.12", "@tsrx/core": "0.1.63" }, "optionalPeers": ["@tsrx/core"] }, "sha512-jgwUfRB9jZrIaFxjgzbr6Di7H+jSVEk7j+ZtYHLWSTuF1UnRct6wrfrGQOU9B9WQZa8fR0KWNkdLlb6zfqfeZw=="], + "@solidjs/babel-plugin": ["@solidjs/babel-plugin@2.0.0-rc.23", "", { "dependencies": { "@babel/helper-module-imports": "7.18.6", "@babel/plugin-syntax-jsx": "^7.18.6", "@babel/types": "^7.20.7", "html-entities": "2.3.3", "parse5": "^7.1.2" }, "peerDependencies": { "@babel/core": "^7.20.12 || ^8.0.0", "@tsrx/core": "0.1.63" }, "optionalPeers": ["@tsrx/core"] }, "sha512-XSPVTf6DtyCTfQM0wE1i0b/Go4ou027KukwJRsIr0zWUjdKIIfmqYiILp0jDHouHqYrKyxwgEX3scNCmsKOrrg=="], - "@solidjs/compiler": ["@solidjs/compiler@2.0.0-rc.18", "", { "optionalDependencies": { "@solidjs/compiler-darwin-arm64": "2.0.0-rc.18", "@solidjs/compiler-darwin-x64": "2.0.0-rc.18", "@solidjs/compiler-linux-arm64-gnu": "2.0.0-rc.18", "@solidjs/compiler-linux-x64-gnu": "2.0.0-rc.18", "@solidjs/compiler-wasm32-wasi": "2.0.0-rc.18", "@solidjs/compiler-win32-x64-msvc": "2.0.0-rc.18" } }, "sha512-I9wQy6RQeOeDvbxDxco+hlDIK5UBxnVNdBEc2LnaC+bkSZwQX7S5ebAohPGhxfsEChLD++u9A8NBkFd9vSVM7A=="], + "@solidjs/compiler": ["@solidjs/compiler@2.0.0-rc.23", "", { "optionalDependencies": { "@solidjs/compiler-darwin-arm64": "2.0.0-rc.23", "@solidjs/compiler-darwin-x64": "2.0.0-rc.23", "@solidjs/compiler-linux-arm64-gnu": "2.0.0-rc.23", "@solidjs/compiler-linux-x64-gnu": "2.0.0-rc.23", "@solidjs/compiler-wasm32-wasi": "2.0.0-rc.23", "@solidjs/compiler-win32-x64-msvc": "2.0.0-rc.23" } }, "sha512-a62s1nkGrfivp9hPDpq73Wk6baiP3QMYW39708fdXRyXdP9AQrsmZMbxDD909z7RyNtH6zpXw9p88h7FBEKoUw=="], - "@solidjs/compiler-darwin-arm64": ["@solidjs/compiler-darwin-arm64@2.0.0-rc.18", "", { "os": "darwin", "cpu": "arm64" }, "sha512-QXbaI9bCW4WGd3s5ZJIzI8quMTaMaWryoq/u9PD42apGCX1Md3B/foFU7UiW7jq51YHaRWCkf1iQkd8Ee5GI7w=="], + "@solidjs/compiler-darwin-arm64": ["@solidjs/compiler-darwin-arm64@2.0.0-rc.23", "", { "os": "darwin", "cpu": "arm64" }, "sha512-a+BPw0rZXyw8O0c0/YkRSPrhfjVJVTHSNx4yCNI3XiTFkST6VrP8TfbvBeIEbr5sbw4cINUwrT3Dd3I2uglkpQ=="], - "@solidjs/compiler-darwin-x64": ["@solidjs/compiler-darwin-x64@2.0.0-rc.18", "", { "os": "darwin", "cpu": "x64" }, "sha512-Y6x899jJWsnTwoQqqpWyjMp+/Dz35fPXUHQKrcQesbUajXWsljPY+dT6XLDMpEILrMSxyyBPQ9lmRTRE7nJLGQ=="], + "@solidjs/compiler-darwin-x64": ["@solidjs/compiler-darwin-x64@2.0.0-rc.23", "", { "os": "darwin", "cpu": "x64" }, "sha512-ceLPfv02OAJonmLj+HJ+cE7RHjnBspzAHqVEdJ+ukm4Rs3Xs7TC4hLnaugdNs+gGkeFSNxe+1N8tVWL0WqJlIg=="], - "@solidjs/compiler-linux-arm64-gnu": ["@solidjs/compiler-linux-arm64-gnu@2.0.0-rc.18", "", { "os": "linux", "cpu": "arm64" }, "sha512-bs7rXGsC+1rVk5WadxOyaxdux8Mx2vjEUdX8UnhTQc37uCHBCI5mLuYICoFX9qXdINZK9H8VrkgT2WJxVN6ypQ=="], + "@solidjs/compiler-linux-arm64-gnu": ["@solidjs/compiler-linux-arm64-gnu@2.0.0-rc.23", "", { "os": "linux", "cpu": "arm64", "libc": "glibc" }, "sha512-1jG51VqVFqle8OYBYd2VAeer5emLVh5cUB1CsDBbu93BzY+/OkXTyTnZ1MB25lFZu69iToUYWYsGqNeNbjUtfg=="], - "@solidjs/compiler-linux-x64-gnu": ["@solidjs/compiler-linux-x64-gnu@2.0.0-rc.18", "", { "os": "linux", "cpu": "x64" }, "sha512-91+hS2M3HJdZQ/b44XJnFhpSjO9JdmAefwIQPz+iBvbkafNW6yvVjkiCd+BKZ106tJ1HtHnbj2OSQwH7+cxhyw=="], + "@solidjs/compiler-linux-x64-gnu": ["@solidjs/compiler-linux-x64-gnu@2.0.0-rc.23", "", { "os": "linux", "cpu": "x64", "libc": "glibc" }, "sha512-mSqX8UPxKntFcmyPMPd6Jf3JlbF2EEHWbcEKMvpl//UgSvq19Yq+j/3xYlBd3qO56f6l96zsIC+xRo6i0HRcXg=="], - "@solidjs/compiler-wasm32-wasi": ["@solidjs/compiler-wasm32-wasi@2.0.0-rc.18", "", { "dependencies": { "@emnapi/core": "1.11.3", "@emnapi/runtime": "1.11.3", "@napi-rs/wasm-runtime": "^1.1.6" } }, "sha512-5JuKtcdNjVUBgkz2lyTuVen4K7/3ASwaJg6vp7zbnsM2ZapcQXzlIhP3zee8FBBhGgvdgbf18L+u2B3H6T88DQ=="], + "@solidjs/compiler-wasm32-wasi": ["@solidjs/compiler-wasm32-wasi@2.0.0-rc.23", "", { "dependencies": { "@emnapi/core": "1.11.3", "@emnapi/runtime": "1.11.3", "@napi-rs/wasm-runtime": "^1.1.6" } }, "sha512-glCDnNEi3s195EOMZTirjxX4vU5h33crjkeV+OKgZIkfXwFQENJUJS9tXcjPpbFBBN+wzeG9nUuWmW0595aWAQ=="], - "@solidjs/compiler-win32-x64-msvc": ["@solidjs/compiler-win32-x64-msvc@2.0.0-rc.18", "", { "os": "win32", "cpu": "x64" }, "sha512-DOfsflkkvZ4XRzcgKPTpthdtDB4syTr+8ci6ZZkcfexi2TaxiWROIP7heMFlBBYrSYINW8ct6eOjgkFUom4kqQ=="], + "@solidjs/compiler-win32-x64-msvc": ["@solidjs/compiler-win32-x64-msvc@2.0.0-rc.23", "", { "os": "win32", "cpu": "x64" }, "sha512-d77HGp13AFB3yLRJBR8prbP0cOWV/I4VR0U33Qn2ADEXEA0W+wZAicL0Wq2hKic8jJzQuDejHtz/dfhN2cFXqA=="], - "@solidjs/signals": ["@solidjs/signals@2.0.0-rc.18", "", {}, "sha512-pzYahnM93EpDN4xZF1EefdjPE6Buuu/90/kiaLOjUFhPd3H0W6J9R8lIF+kkD1Z78LW1OTHciRY5MCqpYj5iSQ=="], + "@solidjs/signals": ["@solidjs/signals@2.0.0-rc.23", "", {}, "sha512-LqN64hjib5akPOm9+1NxxqqFU/3xYe0Le4jYJdvElnkuPLhgdm7DBGr1BgYENkPfJ/b+N4bvqSiN2z/u6kPSaA=="], "@solidjs/vite-plugin": ["@solidjs/vite-plugin@3.0.0-next.51", "", { "dependencies": { "@ampproject/remapping": "^2.3.0", "@babel/core": "^7.23.3", "@solidjs/babel-plugin": "^2.0.0-rc.16", "@solidjs/compiler": "^2.0.0-rc.16", "@types/babel__core": "^7.20.4", "merge-anything": "^5.1.7", "vitefu": "^1.0.4" }, "peerDependencies": { "@solidjs/start-devtools": "^1.0.0-next.2", "@solidjs/web": "^2.0.0-rc.16", "@testing-library/jest-dom": "^5.16.6 || ^5.17.0 || ^6.0.0 || ^7.0.0", "solid-js": "^2.0.0-rc.16", "vite": "^8.0.0 || ^9.0.0" }, "optionalPeers": ["@solidjs/start-devtools", "@testing-library/jest-dom"] }, "sha512-ffpFNYX1z3mGjr95nM3hwo0R3P489FjVnYP5YCOorw+N8grCo+Ay1hGx68H00n5OAC7uGd/7B4GsU1HnA/VU0A=="], - "@solidjs/web": ["@solidjs/web@2.0.0-rc.18", "", { "dependencies": { "seroval": "1.7.0", "seroval-plugins": "1.7.0" }, "peerDependencies": { "solid-js": "^2.0.0-rc.18" } }, "sha512-qtxuskii4N/gMipmg94yfPSJ0djwVWF+Elrdhtdb/8ZThvPc6RI/edY6guEMwdx7OADa1f9cQ0MwQe7kDW+Vwg=="], + "@solidjs/web": ["@solidjs/web@2.0.0-rc.23", "", { "dependencies": { "csstype": "^3.1.0", "seroval": "^1.8.0", "seroval-plugins": "^1.8.0" }, "peerDependencies": { "solid-js": "^2.0.0-rc.23" } }, "sha512-8OtRNh7p6hYy6Zhoi4WWVKN9UB3bWbtDLrmITVOcO0GGnB5r7nthAoM/7/xPS5Qa0rTC3AymlUap3ZVdPJhbVw=="], "@standard-schema/spec": ["@standard-schema/spec@1.1.0", "", {}, "sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w=="], @@ -1287,9 +1287,9 @@ "semver": ["semver@7.8.5", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA=="], - "seroval": ["seroval@1.7.0", "", {}, "sha512-FU+LUkmDzWNsJ6oubZFN3dGPKny53DRhPJG6nftEaXDL8MIn19+kEE1Gvc+63Go+qPOwVUlKIdKhsu2HN6tksw=="], + "seroval": ["seroval@1.8.1", "", {}, "sha512-7z9x1flFYfZBz+LfDkXNfm5UIhZJ/97ASaV8Q1wctoVkeqVfv+tLPsWebeMXBNw6XprvwxDE5wC5Ylqmr+iSrA=="], - "seroval-plugins": ["seroval-plugins@1.7.0", "", { "peerDependencies": { "seroval": "^1.0" } }, "sha512-WM4rArfPtLZriTuxC5DBvNulEwAaRcjNe/dkMOEesOcuvXf5nEwKf5Bw3AT92WHohqcc45+57GdtsCuBTI0mjw=="], + "seroval-plugins": ["seroval-plugins@1.8.0", "", { "peerDependencies": { "seroval": "^1.8.0" } }, "sha512-96vBb12rDvPPwdKUgWw1op3fGq8AVBFOr0IllbnM72yR5J9WWXF18cQ4g1XfDO7HCyh2dt70P3XdtyRayP8FWg=="], "sharp": ["sharp@0.35.5", "", { "dependencies": { "@img/colour": "^1.1.0", "detect-libc": "^2.1.2", "semver": "^7.8.5" }, "optionalDependencies": { "@img/sharp-darwin-arm64": "0.35.5", "@img/sharp-darwin-x64": "0.35.5", "@img/sharp-freebsd-wasm32": "0.35.5", "@img/sharp-libvips-darwin-arm64": "1.3.4", "@img/sharp-libvips-darwin-x64": "1.3.4", "@img/sharp-libvips-linux-arm": "1.3.4", "@img/sharp-libvips-linux-arm64": "1.3.4", "@img/sharp-libvips-linux-ppc64": "1.3.4", "@img/sharp-libvips-linux-riscv64": "1.3.4", "@img/sharp-libvips-linux-s390x": "1.3.4", "@img/sharp-libvips-linux-x64": "1.3.4", "@img/sharp-libvips-linuxmusl-arm64": "1.3.4", "@img/sharp-libvips-linuxmusl-x64": "1.3.4", "@img/sharp-linux-arm": "0.35.5", "@img/sharp-linux-arm64": "0.35.5", "@img/sharp-linux-ppc64": "0.35.5", "@img/sharp-linux-riscv64": "0.35.5", "@img/sharp-linux-s390x": "0.35.5", "@img/sharp-linux-x64": "0.35.5", "@img/sharp-linuxmusl-arm64": "0.35.5", "@img/sharp-linuxmusl-x64": "0.35.5", "@img/sharp-webcontainers-wasm32": "0.35.5", "@img/sharp-win32-arm64": "0.35.5", "@img/sharp-win32-ia32": "0.35.5", "@img/sharp-win32-x64": "0.35.5" }, "peerDependencies": { "@types/node": "*" }, "optionalPeers": ["@types/node"] }, "sha512-Ywn4OnzGukp7CDMrp08RQ50YKmuwG47brZgIVPTvBaaAfQlRlygrRqSrxdCiL9M+LlzLBiJ68IR1QqvzHyjC7g=="], @@ -1303,7 +1303,7 @@ "slice-ansi": ["slice-ansi@9.0.1", "", { "dependencies": { "ansi-styles": "^6.2.3", "is-fullwidth-code-point": "^5.1.0" } }, "sha512-aBY19bn/XA+hKOKX0qL7Z0UfdBsbQvc9hn993U8ALUjzxCvDcuZqLoRXjGJrUARWAlwMnsRVD9sw2AFNOYvalA=="], - "solid-js": ["solid-js@2.0.0-rc.18", "", { "dependencies": { "@solidjs/signals": "^2.0.0-rc.18", "csstype": "^3.1.0", "seroval": "1.7.0", "seroval-plugins": "1.7.0" } }, "sha512-g4KjUQUjfqvqHYnBddN5nVAF7DFcDjtuH+NeDu/26vx6SlSDiqBJS8jsNag6VpdKAnfK8oLfphogEhXtM4UOyw=="], + "solid-js": ["solid-js@2.0.0-rc.23", "", { "dependencies": { "@solidjs/signals": "^2.0.0-rc.23", "seroval": "^1.8.0", "seroval-plugins": "^1.8.0" } }, "sha512-PZgcbOpm1OgX9y68Z73GXpbUxgZqS+F/5MQjfTEa8u5D2qS/lXvD3IeGQuHG+QWActJTZg7XwF+AP7fEp9JIzw=="], "source-map": ["source-map@0.6.1", "", {}, "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="], diff --git a/examples/angular/src/app/app.component.ts b/examples/angular/src/app/app.component.ts index b4cf12c1..53526ad9 100644 --- a/examples/angular/src/app/app.component.ts +++ b/examples/angular/src/app/app.component.ts @@ -1,5 +1,5 @@ import {ChangeDetectionStrategy, Component, computed} from '@angular/core'; -import {injectStore} from '@codebelt/classy-store/angular'; +import {injectClassyStore} from '@codebelt/classy-store/angular'; import {counterStore, history} from '../store'; @Component({ @@ -53,7 +53,7 @@ import {counterStore, history} from '../store'; `, }) export class AppComponent { - readonly snap = injectStore(counterStore); + readonly snap = injectClassyStore(counterStore); readonly summary = computed( () => `${this.snap().label}: ${this.snap().enabled ? 'enabled' : 'disabled'}`, diff --git a/examples/solid/package.json b/examples/solid/package.json index 0adbbe94..a436d144 100644 --- a/examples/solid/package.json +++ b/examples/solid/package.json @@ -12,8 +12,8 @@ }, "dependencies": { "@codebelt/classy-store": "workspace:*", - "@solidjs/web": "2.0.0-rc.18", - "solid-js": "2.0.0-rc.18" + "@solidjs/web": "2.0.0-rc.23", + "solid-js": "2.0.0-rc.23" }, "devDependencies": { "@solidjs/vite-plugin": "3.0.0-next.51", diff --git a/package.json b/package.json index 6e9e10b2..74ec7456 100644 --- a/package.json +++ b/package.json @@ -6,8 +6,8 @@ "examples/*" ], "overrides": { - "@solidjs/babel-plugin": "2.0.0-rc.18", - "@solidjs/compiler": "2.0.0-rc.18" + "@solidjs/babel-plugin": "2.0.0-rc.23", + "@solidjs/compiler": "2.0.0-rc.23" }, "scripts": { "---------- Dev --------------------------------------------------------": "", diff --git a/packages/classy-store/package.json b/packages/classy-store/package.json index 39fce02e..29e2e602 100644 --- a/packages/classy-store/package.json +++ b/packages/classy-store/package.json @@ -142,7 +142,7 @@ "vue": "^3.2.0", "svelte": "^4.0.0 || ^5.0.0", "@angular/core": "^22.0.0", - "solid-js": "2.0.0-rc.18" + "solid-js": "^2.0.0-rc.18" }, "peerDependenciesMeta": { "react": { @@ -166,8 +166,8 @@ "@babel/core": "7.29.7", "@happy-dom/global-registrator": "21.0.4", "@playwright/test": "1.65.1", - "@solidjs/compiler": "2.0.0-rc.18", - "@solidjs/web": "2.0.0-rc.18", + "@solidjs/compiler": "2.0.0-rc.23", + "@solidjs/web": "2.0.0-rc.23", "@types/bun": "1.4.4", "@types/react": "19.3.0", "@types/react-dom": "19.3.0", @@ -175,7 +175,7 @@ "react": "19.3.1", "react-compiler-runtime": "1.0.0", "react-dom": "19.3.1", - "solid-js": "2.0.0-rc.18", + "solid-js": "2.0.0-rc.23", "svelte": "5.57.3", "tsdown": "0.23.7", "typescript": "7.0.2", diff --git a/packages/classy-store/src/frameworks/angular/angular.test.ts b/packages/classy-store/src/frameworks/angular/angular.test.ts index 5c6d21ff..6c1f069f 100644 --- a/packages/classy-store/src/frameworks/angular/angular.test.ts +++ b/packages/classy-store/src/frameworks/angular/angular.test.ts @@ -9,7 +9,7 @@ import { } from '@angular/core'; import {createClassyStore, getInternal, subscribe} from '../../core/core'; import {snapshot} from '../../snapshot/snapshot'; -import {injectStore} from './angular'; +import {injectClassyStore} from './angular'; function withInjector(fn: () => T) { const injector = Injector.create({providers: []}); @@ -29,16 +29,16 @@ function expectNoListeners(store: object) { expect(getInternal(store).batchedListeners.size).toBe(0); } -describe('angular injectStore', () => { +describe('angular injectClassyStore', () => { it('rejects non-store objects', () => { - expect(() => withInjector(() => injectStore({count: 0}))).toThrow( + expect(() => withInjector(() => injectClassyStore({count: 0}))).toThrow( /not a store proxy/, ); }); it('requires an injection context without leaking a listener', () => { const store = createClassyStore({count: 0}); - expect(() => injectStore(store)).toThrow(/injection context/i); + expect(() => injectClassyStore(store)).toThrow(/injection context/i); expectNoListeners(store); }); @@ -47,14 +47,16 @@ describe('angular injectStore', () => { const injector = Injector.create({providers: []}); runInInjectionContext(injector, () => { injector.destroy(); - expect(() => injectStore(store)).toThrow(/destroyed/i); + expect(() => injectClassyStore(store)).toThrow(/destroyed/i); }); expectNoListeners(store); }); it('returns a readonly signal with the current immutable snapshot', () => { const store = createClassyStore({count: 11, nested: {label: 'Initial'}}); - const {result: state, destroy} = withInjector(() => injectStore(store)); + const {result: state, destroy} = withInjector(() => + injectClassyStore(store), + ); try { expect(isSignal(state)).toBe(true); expect('set' in state).toBe(false); @@ -76,7 +78,9 @@ describe('angular injectStore', () => { const store = createClassyStore(new Counter()); const callback = mock(() => {}); const stop = subscribe(store, callback); - const {result: state, destroy} = withInjector(() => injectStore(store)); + const {result: state, destroy} = withInjector(() => + injectClassyStore(store), + ); const total = computed(() => state().doubled + 1); try { expect(total()).toBe(1); @@ -96,8 +100,8 @@ describe('angular injectStore', () => { it('cleans up independent consumers and reads current state on remount', async () => { const store = createClassyStore({count: 0}); - const first = withInjector(() => injectStore(store)); - const second = withInjector(() => injectStore(store)); + const first = withInjector(() => injectClassyStore(store)); + const second = withInjector(() => injectClassyStore(store)); store.count = 1; first.destroy(); try { @@ -110,7 +114,7 @@ describe('angular injectStore', () => { second.destroy(); } expectNoListeners(store); - const remounted = withInjector(() => injectStore(store)); + const remounted = withInjector(() => injectClassyStore(store)); expect(remounted.result().count).toBe(2); remounted.destroy(); expectNoListeners(store); @@ -120,7 +124,9 @@ describe('angular injectStore', () => { const store = createClassyStore({count: 0}); const injector = Injector.create({providers: []}); const stop = subscribe(store, () => injector.destroy(), {sync: true}); - const state = runInInjectionContext(injector, () => injectStore(store)); + const state = runInInjectionContext(injector, () => + injectClassyStore(store), + ); try { store.count = 1; await Promise.resolve(); @@ -137,7 +143,7 @@ describe('angular injectStore', () => { inject(DestroyRef).onDestroy(() => { store.count = 1; }); - return injectStore(store); + return injectClassyStore(store); }); destroy(); await Promise.resolve(); diff --git a/packages/classy-store/src/frameworks/angular/angular.ts b/packages/classy-store/src/frameworks/angular/angular.ts index efd6b754..2bb07568 100644 --- a/packages/classy-store/src/frameworks/angular/angular.ts +++ b/packages/classy-store/src/frameworks/angular/angular.ts @@ -2,13 +2,21 @@ import {DestroyRef, inject, type Signal, signal} from '@angular/core'; import {getInternal, snapshot, subscribe} from '../../storeRuntime'; import type {Snapshot} from '../../types'; -export function injectStore( +/** + * Read immutable snapshots as a readonly signal inside an Angular injection + * context, such as a component field initializer or constructor. The signal + * updates synchronously; Angular schedules rendering as usual. The injection + * context's `DestroyRef` owns subscription cleanup. + */ +export function injectClassyStore( proxyStore: T, ): Signal> { getInternal(proxyStore); const destroyRef = inject(DestroyRef); if (destroyRef.destroyed) { - throw new Error('injectStore requires a live Angular injection context.'); + throw new Error( + 'injectClassyStore requires a live Angular injection context.', + ); } const state = signal(snapshot(proxyStore)); diff --git a/packages/classy-store/src/frameworks/react/react.utilities.test.tsx b/packages/classy-store/src/frameworks/react/react.utilities.test.tsx index 754b1ef2..52366073 100644 --- a/packages/classy-store/src/frameworks/react/react.utilities.test.tsx +++ b/packages/classy-store/src/frameworks/react/react.utilities.test.tsx @@ -18,23 +18,33 @@ import {UtilityValue} from './testHelpers/utilityValue/UtilityValue'; const flush = () => new Promise((resolve) => setTimeout(resolve, 0)); const cleanups: Array<() => void> = []; -let previousExtension: Window['__REDUX_DEVTOOLS_EXTENSION__']; + +// The library reads the extension through a local type and declares nothing +// on the global `Window`; the test does the same. +type DevtoolsListener = (message: { + type: string; + payload?: {type?: string}; + state?: string; +}) => void; +type DevtoolsHost = {__REDUX_DEVTOOLS_EXTENSION__?: {connect: () => unknown}}; +const devtoolsHost = window as unknown as DevtoolsHost; +let previousExtension: DevtoolsHost['__REDUX_DEVTOOLS_EXTENSION__']; function disposeAll() { for (const cleanup of cleanups.splice(0).reverse()) cleanup(); } beforeEach(() => { - previousExtension = window.__REDUX_DEVTOOLS_EXTENSION__; + previousExtension = devtoolsHost.__REDUX_DEVTOOLS_EXTENSION__; }); afterEach(async () => { disposeAll(); await flush(); if (previousExtension) { - window.__REDUX_DEVTOOLS_EXTENSION__ = previousExtension; + devtoolsHost.__REDUX_DEVTOOLS_EXTENSION__ = previousExtension; } else { - delete window.__REDUX_DEVTOOLS_EXTENSION__; + delete devtoolsHost.__REDUX_DEVTOOLS_EXTENSION__; } }); @@ -53,22 +63,19 @@ function createStorage() { } function installDevtools() { - type Extension = NonNullable; - type Connection = ReturnType; - type Listener = Parameters[0]; - let listener: Listener | undefined; + let listener: DevtoolsListener | undefined; const unsubscribe = mock(() => { listener = undefined; }); const connection = { init: mock((_state: unknown) => {}), send: mock((_action: string | {type: string}, _state: unknown) => {}), - subscribe: (nextListener: Listener) => { + subscribe: (nextListener: DevtoolsListener) => { listener = nextListener; return unsubscribe; }, }; - window.__REDUX_DEVTOOLS_EXTENSION__ = {connect: () => connection}; + devtoolsHost.__REDUX_DEVTOOLS_EXTENSION__ = {connect: () => connection}; return { connection, unsubscribe, diff --git a/packages/classy-store/tests/angularCompatibility/consumer.types.ts b/packages/classy-store/tests/angularCompatibility/consumer.types.ts index 2872992c..9010439c 100644 --- a/packages/classy-store/tests/angularCompatibility/consumer.types.ts +++ b/packages/classy-store/tests/angularCompatibility/consumer.types.ts @@ -5,7 +5,7 @@ import { type Signal, } from '@angular/core'; import {createClassyStore, type Snapshot} from '@codebelt/classy-store'; -import {injectStore} from '@codebelt/classy-store/angular'; +import {injectClassyStore} from '@codebelt/classy-store/angular'; class Counter { count = 0; @@ -16,12 +16,12 @@ class Counter { const store = createClassyStore(new Counter()); const injector = Injector.create({providers: []}); const state: Signal> = runInInjectionContext(injector, () => - injectStore(store), + injectClassyStore(store), ); const doubled: Signal = computed(() => state().count * 2); void doubled; // @ts-expect-error Snapshot fields are readonly. state().count = 2; -// @ts-expect-error injectStore does not expose a writable signal. +// @ts-expect-error injectClassyStore does not expose a writable signal. state.set({count: 2}); injector.destroy(); diff --git a/packages/classy-store/tests/browser/angular/components/angularForm/AngularForm.ts b/packages/classy-store/tests/browser/angular/components/angularForm/AngularForm.ts index 1af0bda9..dd2f65a1 100644 --- a/packages/classy-store/tests/browser/angular/components/angularForm/AngularForm.ts +++ b/packages/classy-store/tests/browser/angular/components/angularForm/AngularForm.ts @@ -4,7 +4,7 @@ import { computed, effect, } from '@angular/core'; -import {injectStore} from '@codebelt/classy-store/angular'; +import {injectClassyStore} from '@codebelt/classy-store/angular'; import {formStore, probe} from '../../angular.store'; @Component({ @@ -22,7 +22,7 @@ import {formStore, probe} from '../../angular.store'; `, }) export class AngularForm { - readonly state = injectStore(formStore); + readonly state = injectClassyStore(formStore); readonly uppercase = computed(() => this.state().text.toUpperCase()); readonly summary = computed( () => `${this.state().text}:${this.state().doubled}:${this.uppercase()}`, diff --git a/packages/classy-store/tests/next/checkBoundaries.mjs b/packages/classy-store/tests/next/checkBoundaries.mjs index b0379e28..38e33b87 100644 --- a/packages/classy-store/tests/next/checkBoundaries.mjs +++ b/packages/classy-store/tests/next/checkBoundaries.mjs @@ -102,7 +102,7 @@ function runProbe(mode, serverCondition) { await Promise.resolve(); stop(); history.dispose(); - utils.devtools(first)(); + utils.devtools(first).dispose(); assert.equal(calls, 1); assert.equal(core.snapshot(first).count, 2); assert.equal(core.snapshot(second).count, 10); diff --git a/website/content/docs/ABOUT.md b/website/content/docs/ABOUT.md index c7f42c45..e6b65ece 100644 --- a/website/content/docs/ABOUT.md +++ b/website/content/docs/ABOUT.md @@ -37,7 +37,7 @@ I wanted state management that feels like writing plain TypeScript. - **A class is the store.** Define fields, methods, and getters — that's your state, your actions, and your derived values. The class _is_ the type. TypeScript infers everything automatically. - **Getters are computed values.** Write `get filtered()` to derive a cached value from store fields such as `this.items` and `this.filter`. -- **Framework bindings that feel native.** React's `useClassyStore`, Vue's `useClassyStore` (shallow ref), Svelte's `toSvelteStore`, Solid's `useClassyStore` (signal getter), Angular's `injectStore` — each integration matches the framework's reactive idioms. +- **Framework bindings that feel native.** React's `useClassyStore`, Vue's `useClassyStore` (shallow ref), Svelte's `toSvelteStore`, Solid's `useClassyStore` (signal getter), Angular's `injectClassyStore` — each integration matches the framework's reactive idioms. - **Call methods directly.** `todoStore.addTodo('Buy milk')` — a real object with real methods, callable from anywhere. - **Filter React store updates.** Selectors and automatic tracking can skip subscription-driven renders for unchanged data. diff --git a/website/content/docs/ANGULAR.md b/website/content/docs/ANGULAR.md index aef7420f..a05bc9d9 100644 --- a/website/content/docs/ANGULAR.md +++ b/website/content/docs/ANGULAR.md @@ -18,7 +18,7 @@ the normal source suite also runs in Firefox and WebKit. ## Signals, inputs, and lists -Call `injectStore(store)` in an Angular injection context, such as a component +Call `injectClassyStore(store)` in an Angular injection context, such as a component field initializer, constructor, or provider factory. It returns a readonly `Signal>`. Read `state()` in templates and Angular `computed()` functions; write through the original store or its methods. @@ -26,7 +26,7 @@ functions; write through the original store or its methods. ```ts import {ChangeDetectionStrategy, Component, computed} from '@angular/core'; import {createClassyStore} from '@codebelt/classy-store'; -import {injectStore} from '@codebelt/classy-store/angular'; +import {injectClassyStore} from '@codebelt/classy-store/angular'; class FormStore { text = 'Hello'; @@ -67,7 +67,7 @@ const formStore = createClassyStore(new FormStore()); `, }) export class FormComponent { - readonly state = injectStore(formStore); + readonly state = injectClassyStore(formStore); readonly uppercase = computed(() => this.state().text.toUpperCase()); setText(event: Event) { @@ -117,7 +117,7 @@ registering a listener. Destroyed consumers ignore pending notifications, including destruction during an in-progress store notification. To migrate, update your Angular packages to the same stable Angular 22 release -and use its compatible TypeScript toolchain. The `injectStore(store)` signature and `/angular` import +and use its compatible TypeScript toolchain. The `injectClassyStore(store)` signature and `/angular` import path are unchanged. Signal reads now update immediately rather than waiting for the core subscription microtask. There is no adapter timing option. diff --git a/website/content/docs/API_REFERENCE.md b/website/content/docs/API_REFERENCE.md index 4561a151..8d673ad3 100644 --- a/website/content/docs/API_REFERENCE.md +++ b/website/content/docs/API_REFERENCE.md @@ -37,7 +37,7 @@ Import from the entry that owns the API. Core, collections, and utilities do not | `@codebelt/classy-store/vue` | `useClassyStore` | — | | `@codebelt/classy-store/svelte` | `toSvelteStore` | `ClassyReadable` | | `@codebelt/classy-store/solid` | `useClassyStore` | — | -| `@codebelt/classy-store/angular` | `injectStore` | — | +| `@codebelt/classy-store/angular` | `injectClassyStore` | — | ESM and CommonJS callers using the same package installation can pass stores between them. For example, a utility loaded with `require('@codebelt/classy-store/utils')` @@ -63,7 +63,7 @@ computed values or DOM. The adapter does not call it automatically, and ordinary core subscriptions stay batched. See the [Solid 2 guide](./SOLID.md) for pinned packages, inputs, keyed lists, and migration from Solid 1. -Angular's `injectStore(store)` supports **all stable Angular 22 releases** +Angular's `injectClassyStore(store)` supports **all stable Angular 22 releases** (`^22.0.0`). It requires a live injection context and returns a readonly signal. Store writes update the signal and dependent computed reads immediately; Angular schedules effects and rendering, From 669406ca5ffc3c5bd28ee6427ec60809033e0017 Mon Sep 17 00:00:00 2001 From: codeBelt Date: Mon, 16 Nov 2026 20:48:29 -0600 Subject: [PATCH 004/169] test: add a seeded randomized test, React regressions and export type tests Phase 4 of the 1.0 preparation. - core.fuzz.test.ts: 60 seeds x 300 random operations (aliasing rows across lists, detaching, retaining, reattaching, sorting, truncating, store methods). After each one the snapshot must equal the live data, a visible change must produce a new root snapshot and a sync notification, and live and snapshot getters must match a fresh computation. - react.transactions.test.tsx: an in-place array operation on a long list builds one list snapshot and renders once; a multi-field store method never renders a half-applied state; a row taken from a rendered list is stored as an immutable snapshot in both hook modes; a Date selection with shallowEqual re-renders; auto-tracked collection lookups re-render when the looked-up key appears. - types.exports.test.ts: signatures of the public entry points, PROXYABLE as a static class key, and every utility returning a handle. Temporarily disabling transactions, version propagation to owners, or parent unlinking makes these tests fail. Co-Authored-By: Claude Fable 5.2 --- .../classy-store/src/core/core.fuzz.test.ts | 227 +++++++++++++++++ .../react/react.transactions.test.tsx | 239 ++++++++++++++++++ .../classy-store/src/types.exports.test.ts | 97 +++++++ 3 files changed, 563 insertions(+) create mode 100644 packages/classy-store/src/core/core.fuzz.test.ts create mode 100644 packages/classy-store/src/frameworks/react/react.transactions.test.tsx create mode 100644 packages/classy-store/src/types.exports.test.ts diff --git a/packages/classy-store/src/core/core.fuzz.test.ts b/packages/classy-store/src/core/core.fuzz.test.ts new file mode 100644 index 00000000..84669eae --- /dev/null +++ b/packages/classy-store/src/core/core.fuzz.test.ts @@ -0,0 +1,227 @@ +import {describe, expect, test} from 'bun:test'; +import {snapshot} from '../snapshot/snapshot'; +import {createClassyStore, subscribe} from './core'; + +// Differential test. After every random operation: +// - the frozen snapshot holds exactly the live data, +// - a visible change produced a new root snapshot and a sync notification, +// - memoized getters, live and on the snapshot, match a fresh computation. +// Rows are aliased across lists, detached, retained, edited and reattached, +// which is where stale caches and missed owner links would show up. + +/** Deterministic PRNG (mulberry32), so a failure names a seed that replays. */ +function random(seed: number): () => number { + let state = seed >>> 0; + return () => { + state = (state + 0x6d2b79f5) | 0; + let mixed = Math.imul(state ^ (state >>> 15), 1 | state); + mixed = (mixed + Math.imul(mixed ^ (mixed >>> 7), 61 | mixed)) ^ mixed; + return ((mixed ^ (mixed >>> 14)) >>> 0) / 4294967296; + }; +} + +type Leaf = {v: number}; + +class Root { + a: Leaf[] = []; + b: Leaf[] = []; + dict: Record = {}; + slot: Leaf | null = null; + n = 0; + + get sumA() { + return this.a.reduce((total, row) => total + row.v, 0); + } + + get dictSize() { + return Object.keys(this.dict).length; + } + + get slotPlusN() { + return (this.slot?.v ?? 0) + this.n; + } + + get combined() { + return this.sumA + this.dictSize + this.slotPlusN; + } + + bump() { + this.n++; + for (const row of this.a) row.v++; + } +} + +// Readonly, so that both the live store and a frozen snapshot fit. +type View = { + readonly a: readonly Readonly[]; + readonly b: readonly Readonly[]; + readonly dict: Readonly>>; + readonly slot: Readonly | null; + readonly n: number; +}; +type Getters = Pick; + +const data = (view: View) => + JSON.stringify({ + a: view.a, + b: view.b, + dict: view.dict, + slot: view.slot, + n: view.n, + }); + +const getters = (view: Getters) => + JSON.stringify({ + sumA: view.sumA, + dictSize: view.dictSize, + slotPlusN: view.slotPlusN, + combined: view.combined, + }); + +function expectedGetters(view: View): string { + const sumA = view.a.reduce((total, row) => total + row.v, 0); + const dictSize = Object.keys(view.dict).length; + const slotPlusN = (view.slot?.v ?? 0) + view.n; + return JSON.stringify({ + sumA, + dictSize, + slotPlusN, + combined: sumA + dictSize + slotPlusN, + }); +} + +/** Run one seed. Returns a description of the first divergence, if any. */ +function runSeed(seed: number, steps: number): string | undefined { + const next = random(seed); + const int = (bound: number) => Math.floor(next() * bound); + const store = createClassyStore(new Root()); + let notified = 0; + subscribe(store, () => notified++, {sync: true}); + const retained: Leaf[] = []; // Proxies kept by "user code", possibly detached. + let counter = 0; + const fresh = (): Leaf => ({v: ++counter}); + const history: string[] = []; + + for (let step = 0; step < steps; step++) { + const before = data(store); + const beforeSnapshot = snapshot(store); + const beforeNotified = notified; + const list = next() < 0.5 ? store.a : store.b; + const operation = int(19); + let name = ''; + switch (operation) { + case 0: + name = 'push'; + list.push(fresh()); + break; + case 1: + name = 'pop'; + list.pop(); + break; + case 2: + name = 'unshift'; + list.unshift(fresh()); + break; + case 3: + name = 'splice'; + list.splice( + int(list.length + 1), + int(3), + ...(next() < 0.5 ? [fresh()] : []), + ); + break; + case 4: + name = 'sort'; + list.sort((x, y) => y.v - x.v); + break; + case 5: + name = 'reverse'; + list.reverse(); + break; + case 6: + name = 'truncate'; + list.length = int(list.length + 1); + break; + case 7: + name = 'edit row'; + if (list.length) list[int(list.length)].v = ++counter; + break; + case 8: + name = 'replace list with a filtered copy'; + if (next() < 0.5) store.a = store.a.filter(() => next() < 0.7); + else store.b = store.b.filter(() => next() < 0.7); + break; + case 9: + name = 'alias a row across lists'; + if (store.a.length) store.b.push(store.a[int(store.a.length)]); + break; + case 10: + name = 'alias a row into the slot'; + store.slot = list.length ? list[int(list.length)] : null; + break; + case 11: + name = 'alias a row into the dict'; + if (list.length) store.dict[`k${int(5)}`] = list[int(list.length)]; + break; + case 12: + name = 'delete a dict key'; + delete store.dict[`k${int(5)}`]; + break; + case 13: + name = 'retain a row'; + if (list.length) retained.push(list[int(list.length)]); + break; + case 14: + name = 'edit a retained row'; + if (retained.length) retained[int(retained.length)].v = ++counter; + break; + case 15: + name = 'reattach a retained row'; + if (retained.length) list.push(retained[int(retained.length)]); + break; + case 16: + name = 'edit the slot'; + if (store.slot) store.slot.v = ++counter; + break; + case 17: { + name = 'swap the lists'; + const held = store.a; + store.a = store.b; + store.b = held; + break; + } + default: + name = 'store method'; + store.bump(); + } + history.push(name); + + const after = data(store); + const current = snapshot(store); + const problems: string[] = []; + if (data(current) !== after) problems.push('snapshot data is stale'); + if (before !== after && current === beforeSnapshot) + problems.push('root snapshot kept its identity after a visible change'); + if (before !== after && notified === beforeNotified) + problems.push('no sync notification for a visible change'); + if (getters(store) !== expectedGetters(store)) + problems.push('a live getter is stale'); + if (getters(current) !== expectedGetters(store)) + problems.push('a snapshot getter is stale'); + if (problems.length) { + return `seed ${seed}, step ${step}, after "${name}": ${problems.join('; ')}. Last operations: ${history.slice(-10).join(', ')}`; + } + } + return undefined; +} + +describe('core — randomized differential test', () => { + test('snapshots, notifications and getters stay consistent under random edits', () => { + const failures: string[] = []; + for (let seed = 1; seed <= 60; seed++) { + const failure = runSeed(seed, 300); + if (failure) failures.push(failure); + } + expect(failures).toEqual([]); + }); +}); diff --git a/packages/classy-store/src/frameworks/react/react.transactions.test.tsx b/packages/classy-store/src/frameworks/react/react.transactions.test.tsx new file mode 100644 index 00000000..e50f2af3 --- /dev/null +++ b/packages/classy-store/src/frameworks/react/react.transactions.test.tsx @@ -0,0 +1,239 @@ +import {afterEach, beforeEach, describe, expect, it, spyOn} from 'bun:test'; +import {act, type ReactNode} from 'react'; +import {createRoot, type Root} from 'react-dom/client'; +import {reactiveMap} from '../../collections/collections'; +import {createClassyStore} from '../../core/core'; +import {shallowEqual} from '../../utils/equality/equality'; +import {useClassyStore} from './react'; + +// ── Test harness ──────────────────────────────────────────────────────────── + +let container: HTMLDivElement; +const roots = new Set(); + +beforeEach(() => { + container = document.createElement('div'); + document.body.appendChild(container); +}); + +afterEach(() => { + act(() => { + for (const root of roots) root.unmount(); + }); + roots.clear(); + container.remove(); +}); + +function render(element: ReactNode): void { + const root = createRoot(container); + roots.add(root); + act(() => { + root.render(element); + }); +} + +type Row = {id: number; done: boolean}; + +const rows = (count: number): Row[] => + Array.from({length: count}, (_, index) => ({ + id: (index * 7919) % count, + done: false, + })); + +// ── Tests ─────────────────────────────────────────────────────────────────── + +describe('useClassyStore — transactions', () => { + it.each([ + ['unshift', (items: Row[]) => items.unshift({id: -1, done: false})], + ['sort', (items: Row[]) => items.sort((a, b) => a.id - b.id)], + ['reverse', (items: Row[]) => items.reverse()], + ['splice', (items: Row[]) => items.splice(0, 1)], + ] as const)( + '%s on a long list builds one snapshot and renders once', + (_name, run) => { + const store = createClassyStore({items: rows(400)}); + let renders = 0; + function First() { + renders++; + const first = useClassyStore(store, (state) => state.items[0]?.id); + return {first}; + } + render(); + const rendersBefore = renders; + // Every rebuilt snapshot of the list is frozen exactly once. + let buildsOfList = 0; + const originalFreeze = Object.freeze; + const freezeSpy = spyOn(Object, 'freeze').mockImplementation((( + value: unknown, + ) => { + if (Array.isArray(value) && value.length >= 399) buildsOfList++; + return originalFreeze(value); + }) as typeof Object.freeze); + + try { + act(() => { + run(store.items); + }); + } finally { + freezeSpy.mockRestore(); + } + + expect(buildsOfList).toBe(1); + expect(renders - rendersBefore).toBeLessThanOrEqual(1); + expect(container.textContent).toBe(String(store.items[0].id)); + }, + ); + + it('a store method that writes many fields renders its consumer once', () => { + class Form { + first = ''; + last = ''; + touched = 0; + + fill(first: string, last: string) { + this.first = first; + this.touched++; + this.last = last; + this.touched++; + } + } + const store = createClassyStore(new Form()); + const seen: string[] = []; + function Name() { + const snap = useClassyStore(store); + const text = `${snap.first} ${snap.last} (${snap.touched})`; + seen.push(text); + return {text}; + } + render(); + + act(() => { + store.fill('Ada', 'Lovelace'); + }); + + // No render ever shows the half-filled form. + expect(seen).toEqual([' (0)', 'Ada Lovelace (2)']); + }); + + it('a controlled input still updates within the event that changed it', () => { + const store = createClassyStore({text: 'ab'}); + function Field() { + const text = useClassyStore(store, (state) => state.text); + return ( + { + store.text = event.target.value; + }} + /> + ); + } + render(); + const input = container.querySelector('input') as HTMLInputElement; + + act(() => { + store.text = 'axb'; + }); + + expect(input.value).toBe('axb'); + }); +}); + +describe('useClassyStore — values handed back to the store', () => { + it.each([ + ['selector', false], + ['auto-tracked', true], + ] as const)( + 'a row from a rendered list (%s) is stored as an immutable snapshot', + (_mode, tracked) => { + const store = createClassyStore({ + todos: [{id: 1, done: false}] as Row[], + selected: null as Row | null, + }); + let select: () => void = () => {}; + function List() { + const selected = useClassyStore(store, (state) => state.todos); + const snap = useClassyStore(store); + const todos = tracked ? snap.todos : selected; + select = () => { + store.selected = todos[0] as Row; + }; + return {todos.length}; + } + render(); + + act(() => { + select(); + }); + + const stored = store.selected as Row; + expect(Object.isFrozen(stored)).toBe(true); + expect(stored).toEqual({id: 1, done: false}); + // Editing goes through the live row, not the stored snapshot. + expect(() => { + stored.done = true; + }).toThrow(TypeError); + act(() => { + store.todos[0].done = true; + }); + expect(store.selected?.done).toBe(false); + }, + ); +}); + +describe('useClassyStore — shallowEqual selections', () => { + it('re-renders when a selected Date is replaced by a different instant', () => { + const store = createClassyStore({due: new Date(0)}); + let renders = 0; + function Due() { + renders++; + const due = useClassyStore(store, (state) => state.due, { + isEqual: shallowEqual, + }); + return {due.toISOString()}; + } + render(); + + act(() => { + store.due = new Date(86_400_000); + }); + expect(container.textContent).toBe('1970-01-02T00:00:00.000Z'); + const afterChange = renders; + + // The same instant in a new Date object is still equal. + act(() => { + store.due = new Date(86_400_000); + }); + expect(renders).toBe(afterChange); + }); +}); + +describe('useClassyStore — reactive collections', () => { + it('an auto-tracked lookup re-renders when the looked-up key appears', () => { + const store = createClassyStore({ + users: reactiveMap([['a', 'Ada']]), + }); + function Lookup() { + const snap = useClassyStore(store); + return ( + + {snap.users.get('a')}/{snap.users.get('b') ?? 'none'}/ + {String(snap.users.has('c'))} + + ); + } + render(); + expect(container.textContent).toBe('Ada/none/false'); + + act(() => { + store.users.set('b', 'Bob'); + }); + expect(container.textContent).toBe('Ada/Bob/false'); + + act(() => { + store.users.delete('a'); + store.users.set('c', 'Cy'); + }); + expect(container.textContent).toBe('/Bob/true'); + }); +}); diff --git a/packages/classy-store/src/types.exports.test.ts b/packages/classy-store/src/types.exports.test.ts new file mode 100644 index 00000000..e762e856 --- /dev/null +++ b/packages/classy-store/src/types.exports.test.ts @@ -0,0 +1,97 @@ +import {describe, expect, expectTypeOf, test} from 'bun:test'; +import type {Signal} from '@angular/core'; +import {reactiveMap} from './collections/index'; +import {injectClassyStore} from './frameworks/angular/angular'; +import { + createClassyStore, + PROXYABLE, + type Snapshot, + shallowEqual, + snapshot, + subscribe, +} from './index'; +import { + type DevtoolsHandle, + devtools, + type HistoryHandle, + type PersistHandle, + persist, + subscribeKey, + withHistory, +} from './utils/index'; + +describe('public entry point types', () => { + test('the core entry exports its functions with stable signatures', () => { + const store = createClassyStore({count: 0, user: {name: 'Ada'}}); + + expectTypeOf(store).toEqualTypeOf<{count: number; user: {name: string}}>(); + expectTypeOf(snapshot(store)).toEqualTypeOf< + Snapshot<{count: number; user: {name: string}}> + >(); + expectTypeOf(subscribe(store, () => {})).toEqualTypeOf<() => void>(); + expectTypeOf(subscribe(store.user, () => {}, {sync: true})).toEqualTypeOf< + () => void + >(); + expectTypeOf(shallowEqual).toEqualTypeOf<(a: T, b: T) => boolean>(); + }); + + test('PROXYABLE is a symbol that a class can use as a static key', () => { + class Todo { + static [PROXYABLE] = true; + done = false; + } + // A unique symbol, so it can be a computed class member. + expectTypeOf(PROXYABLE).toMatchTypeOf(); + expect(typeof PROXYABLE).toBe('symbol'); + + const store = createClassyStore({todos: [new Todo()]}); + expectTypeOf(snapshot(store).todos[0].done).toEqualTypeOf(); + expect(() => { + // @ts-expect-error A snapshot of an opted-in class is readonly. + snapshot(store).todos[0].done = true; + }).toThrow(TypeError); + }); + + test('every utility returns a handle with dispose()', () => { + const store = createClassyStore({count: 0}); + const storage = { + getItem: () => null, + setItem: () => {}, + removeItem: () => {}, + }; + const handles = [ + devtools(store, {enabled: false}), + withHistory(store), + persist(store, {name: 'types', storage, skipHydration: true}), + ]; + + expectTypeOf( + devtools(store, {enabled: false}), + ).toEqualTypeOf(); + expectTypeOf().toEqualTypeOf<() => void>(); + expectTypeOf().toEqualTypeOf<() => void>(); + expectTypeOf().toEqualTypeOf<() => void>(); + // @ts-expect-error devtools() no longer returns a bare dispose function. + expectTypeOf(devtools(store, {enabled: false})).toBeCallableWith(); + for (const handle of handles) handle.dispose(); + }); + + test('subscribeKey reports the readonly value of the watched key', () => { + const store = createClassyStore({ + tags: ['a'], + users: reactiveMap(), + }); + const stop = subscribeKey(store, 'tags', (value, previous) => { + expectTypeOf(value).toEqualTypeOf(); + expectTypeOf(previous).toEqualTypeOf(); + }); + expectTypeOf(stop).toEqualTypeOf<() => void>(); + stop(); + }); + + test('injectClassyStore returns a readonly signal of the snapshot', () => { + expectTypeOf(injectClassyStore<{count: number}>).returns.toEqualTypeOf< + Signal> + >(); + }); +}); From 7d10d2b7dfd132b9c0775bab2da14e84074abe31 Mon Sep 17 00:00:00 2001 From: codeBelt Date: Mon, 16 Nov 2026 20:49:53 -0600 Subject: [PATCH 005/169] build: verify the published package shape and add the 1.0 changeset Phase 5 of the 1.0 preparation. - Add check:package, which runs publint --strict and arethetypeswrong on the packed tarball, and run it in CI after the build. Both pass for the node16 (CJS and ESM) and bundler resolutions. The legacy node10 resolution cannot resolve subpath exports and is not supported. - Declare engines.node >= 20 and export ./package.json. - Add a major changeset so the Changesets release PR produces 1.0.0. Co-Authored-By: Claude Fable 5.2 --- .changeset/stable-one.md | 24 +++++ .github/workflows/ci.yml | 2 + bun.lock | 152 ++++++++++++++++++++++++++--- package.json | 1 + packages/classy-store/package.json | 11 ++- 5 files changed, 174 insertions(+), 16 deletions(-) create mode 100644 .changeset/stable-one.md diff --git a/.changeset/stable-one.md b/.changeset/stable-one.md new file mode 100644 index 00000000..2deb16c2 --- /dev/null +++ b/.changeset/stable-one.md @@ -0,0 +1,24 @@ +--- +"@codebelt/classy-store": major +--- + +Release 1.0.0, the first stable version. The public API and its behavior are now covered by semantic versioning. See the [1.0 upgrade guide](https://codebelt.github.io/classy-store/docs/UPGRADING_1_0) for before/after examples of every breaking change. + +**Breaking changes** + +- Store methods and array operations are transactions. Synchronous subscribers, including every framework adapter, are notified once when the outermost call returns instead of once per property write. A `sort` or `unshift` on a long list is now one notification and one snapshot. +- `subscribe()` on a nested proxy observes only that proxy's subtree. It no longer fires for sibling changes. +- Each `subscribe()` call is an independent registration; subscribing the same callback twice yields two subscriptions. +- A snapshot assigned into a store stays an immutable snapshot, held by reference, including one read through React's auto-tracked hook. +- `persist`: hydration is per field. A stored field is restored unless that same field was edited locally while the read was in flight, and a local edit can no longer overwrite the stored record before it is restored. Stored data whose version differs is ignored unless `migrate` is provided. +- `shallowEqual` returns `false` for values with different prototypes, compares dates by instant and maps and sets one level deep, and no longer treats arbitrary key-less objects as equal. +- `devtools()` returns a handle with `dispose()` instead of a function, and no longer declares anything on the global `Window` type. +- Angular: `injectStore` is renamed `injectClassyStore`. + +**Other changes** + +- `withHistory`: undo and redo remove top-level fields that the restored entry lacks, `undo()` steps back over an edit made in the same tick, and unchanged fields keep their identity. +- Reactive collections compare keys and values by identity, so a plain object works as a key whether it is given raw, as a store proxy or as a snapshot. Lookups scan the raw backing array. +- `PROXYABLE` is exported so a class can opt into nested reactivity with `static [PROXYABLE] = true`. +- The Solid peer range is `^2.0.0-rc.18` (preview while Solid 2 is in release candidates). +- The package declares `engines.node >= 20` and exports `./package.json`. diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 718003b0..005430f4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,6 +20,8 @@ jobs: # Packed-consumer typechecks resolve the package's generated declarations. - run: bun run build - run: bun run typecheck + - name: Published package shape (publint, arethetypeswrong) + run: bun run --filter @codebelt/classy-store check:package - name: Solid 2 example production build run: bun run --filter classy-store-solid-example build - name: Angular 22 example production build diff --git a/bun.lock b/bun.lock index fa0b181c..b066f621 100644 --- a/bun.lock +++ b/bun.lock @@ -101,6 +101,7 @@ "@angular/compiler": "22.2.6", "@angular/core": "22.2.6", "@angular/platform-browser": "22.2.6", + "@arethetypeswrong/cli": "0.18.5", "@babel/core": "7.29.7", "@happy-dom/global-registrator": "21.0.4", "@playwright/test": "1.65.1", @@ -110,6 +111,7 @@ "@types/react": "19.3.0", "@types/react-dom": "19.3.0", "babel-plugin-react-compiler": "1.0.0", + "publint": "0.3.25", "react": "19.3.1", "react-compiler-runtime": "1.0.0", "react-dom": "19.3.1", @@ -147,6 +149,8 @@ "@ampproject/remapping": ["@ampproject/remapping@2.3.0", "", { "dependencies": { "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.24" } }, "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw=="], + "@andrewbranch/untar.js": ["@andrewbranch/untar.js@1.0.4", "", {}, "sha512-pVXSwPsLuw8IGLo2Di0EaOfsk+ntVvpkk942J/sHYIkwvtKUakEcPh7HBgZ6tuimgzKSEHgCvO4XgQ05DEbwDw=="], + "@angular-devkit/architect": ["@angular-devkit/architect@0.2202.7", "", { "dependencies": { "@angular-devkit/core": "22.2.7", "rxjs": "7.8.2" }, "bin": { "architect": "bin/cli.js" } }, "sha512-l8apKEojW8WB5pqhK+BkO7+DZSCLNpvP+JBdBzDYagrtkKbtr1AKPuAE/2sVvlBE8SXyNCp3CX9gTtkk2q40mw=="], "@angular-devkit/core": ["@angular-devkit/core@22.2.7", "", { "dependencies": { "ajv": "8.20.0", "ajv-formats": "3.0.1", "jsonc-parser": "3.3.1", "picomatch": "4.0.7", "rxjs": "7.8.2", "source-map": "0.8.0" }, "peerDependencies": { "chokidar": "^5.0.0" }, "optionalPeers": ["chokidar"] }, "sha512-cchZAMsV4d76RDZBlWzPhYxM/Hb6bmq71oUngdrwehMbBbdQu3W9C2tGlvxuPxbRKru9ZlUa14YVXQ0+QnhFtw=="], @@ -167,6 +171,10 @@ "@angular/platform-browser": ["@angular/platform-browser@22.2.6", "", { "dependencies": { "tslib": "^2.3.0" }, "peerDependencies": { "@angular/animations": "22.2.6", "@angular/common": "22.2.6", "@angular/core": "22.2.6" }, "optionalPeers": ["@angular/animations"] }, "sha512-xXSgdnnLLv/3aEC/pqyrUd0xlyYURGZG2HR3sOIN3bsIoctGFvzA5iwt/GEKpIDA1rn+NnKNLK/EKQaPA4YZEw=="], + "@arethetypeswrong/cli": ["@arethetypeswrong/cli@0.18.5", "", { "dependencies": { "@arethetypeswrong/core": "0.18.5", "chalk": "^4.1.2", "cli-table3": "^0.6.3", "commander": "^10.0.1", "marked": "^9.1.2", "marked-terminal": "^7.1.0", "semver": "^7.5.4" }, "bin": { "attw": "./dist/index.js" } }, "sha512-gM+8vRsQOD/Uc7EnBedUhkG5OCsDWE4uoak5QvomGpMpaky0Eh41p04nIMgrWb8EOmqZUJGc6zz9hsP6E56R7g=="], + + "@arethetypeswrong/core": ["@arethetypeswrong/core@0.18.5", "", { "dependencies": { "@andrewbranch/untar.js": "^1.0.3", "@loaderkit/resolve": "^1.0.2", "cjs-module-lexer": "^1.2.3", "fflate": "^0.8.3", "lru-cache": "^11.0.1", "semver": "^7.5.4", "typescript": "5.6.1-rc", "validate-npm-package-name": "^5.0.0" } }, "sha512-9ytjzGwxjm9Uz7I9avfbt5vlQt6uk9uRRESzJjqrznl6WKvI6dwYTo+vJ3U02Wrq/mR3iql/PzhvHhKdJIAjDQ=="], + "@babel/code-frame": ["@babel/code-frame@7.29.7", "", { "dependencies": { "@babel/helper-validator-identifier": "^7.29.7", "js-tokens": "^4.0.0", "picocolors": "^1.1.1" } }, "sha512-Aup7aUOfpbAUg2ROOJN6Iw5f9DMBlzu0mIkm/malLQFN/YQgO48wCj0Kxa3sEHJvPVFg7siR+qRInwXd2qhQKw=="], "@babel/compat-data": ["@babel/compat-data@7.29.7", "", {}, "sha512-locTkQyKvwIEgBzVrn8693ebc97F2U8ZHjbXwDXJ5Fn2TCpNwTlKcaKLkdHop5c/icOFE7qt7Q9JC5hnKNa6Gg=="], @@ -227,6 +235,8 @@ "@biomejs/cli-win32-x64": ["@biomejs/cli-win32-x64@2.6.8", "", { "os": "win32", "cpu": "x64" }, "sha512-cD6HvGczZUiAYsY8s2TxxXj2AHFzEdMomvVJfEjzOjBM45nGqIDfBpbtvwGQzDCN8X2yKKk9u1jnDZisT2nxIg=="], + "@braidai/lang": ["@braidai/lang@1.1.2", "", {}, "sha512-qBcknbBufNHlui137Hft8xauQMTZDKdophmLFv05r2eNmdIv/MlPuP4TdUknHG68UdWLgVZwgxVe735HzJNIwA=="], + "@bufbuild/protobuf": ["@bufbuild/protobuf@2.16.0", "", {}, "sha512-FWa0sPlqYGJgpTs6OxBRcL/AW4JT0OIO+W1ajerluoTVh8CV0B7XM1qsNCRgnkSCkRCgOICKHRQlY17jrsm0+Q=="], "@changesets/apply-release-plan": ["@changesets/apply-release-plan@7.1.1", "", { "dependencies": { "@changesets/config": "^3.1.4", "@changesets/get-version-range-type": "^0.4.0", "@changesets/git": "^3.0.4", "@changesets/should-skip-package": "^0.1.2", "@changesets/types": "^6.1.0", "@manypkg/get-packages": "^1.1.3", "detect-indent": "^6.0.0", "fs-extra": "^7.0.1", "lodash.startcase": "^4.4.0", "outdent": "^0.5.0", "prettier": "^2.7.1", "resolve-from": "^5.0.0", "semver": "^7.5.3" } }, "sha512-9qPCm/rLx/xoOFXIHGB229+4GOL76S4MC+7tyOuTsR6+1jYlfFDQORdvwR5hDA6y4FL2BPt3qpbcQIS+dW85LA=="], @@ -269,6 +279,8 @@ "@codebelt/classy-store": ["@codebelt/classy-store@workspace:packages/classy-store"], + "@colors/colors": ["@colors/colors@1.5.0", "", {}, "sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ=="], + "@emnapi/core": ["@emnapi/core@1.11.3", "", { "dependencies": { "@emnapi/wasi-threads": "1.2.3", "tslib": "^2.4.0" } }, "sha512-zLpS5asjEb7lq8jYLq37N6XKaE41DIexlY1rF/z4/tIl3wo13Sqm28fRyfIsKZD+NZ8mM5RoKkpW/rBcuoSZSg=="], "@emnapi/runtime": ["@emnapi/runtime@1.11.3", "", { "dependencies": { "tslib": "^2.4.0" } }, "sha512-Xz4Tpyki7XyrpbUK1jR1AhdAdaXyhhY4lZ3neLodmhpuWfy2PAQN5B46sAiU4liOXGLkHypn/qU+jvfWSCYYLA=="], @@ -443,6 +455,8 @@ "@lmdb/lmdb-win32-x64": ["@lmdb/lmdb-win32-x64@3.5.6", "", { "os": "win32", "cpu": "x64" }, "sha512-1g7G0knRX2iV/voDu54yxrGqw5Dk0w2oIYb7dgJq8IkOi+m7wbD8Q3QpPFjh0C01G58S88dqGn03len6UPCXsg=="], + "@loaderkit/resolve": ["@loaderkit/resolve@1.0.6", "", { "dependencies": { "@braidai/lang": "^1.0.0" } }, "sha512-G8FdIoF5CypfwmD9rl8BXod5HDn8JqB0CCNBXDTaRZ+yRYhARrrSToX1zg1zy9jX3zLqigsELwhT4gNtkdQAUg=="], + "@manypkg/find-root": ["@manypkg/find-root@1.1.0", "", { "dependencies": { "@babel/runtime": "^7.5.5", "@types/node": "^12.7.1", "find-up": "^4.1.0", "fs-extra": "^8.1.0" } }, "sha512-mki5uBvhHzO8kYYix/WRy2WX8S3B5wdVSc9D6KcU5lQNglP2yt58/VfLuAK49glRXChosY8ap2oJ1qgma3GUVA=="], "@manypkg/get-packages": ["@manypkg/get-packages@1.1.3", "", { "dependencies": { "@babel/runtime": "^7.5.5", "@changesets/types": "^4.0.1", "@manypkg/find-root": "^1.1.0", "fs-extra": "^8.1.0", "globby": "^11.0.0", "read-yaml-file": "^1.1.0" } }, "sha512-fo+QhuU3qE/2TQMQmbVMqaQ6EWbMhi4ABWP+O4AM1NqPBuy0OrApV5LO6BrrgnhtAHS2NH6RrVk9OL181tTi8A=="], @@ -595,6 +609,8 @@ "@playwright/test": ["@playwright/test@1.65.1", "", { "dependencies": { "playwright": "1.65.1" }, "bin": { "playwright": "cli.js" } }, "sha512-y+NCIRm2LvY4slUVWvGh1nujJ8RF/hEisIsq2mtUPgdQC4L701bq5hZGMhrpeXjACvwvO9tj5dJqhvM6TP9lbw=="], + "@publint/pack": ["@publint/pack@0.1.7", "", { "dependencies": { "tinyexec": "^1.3.0" } }, "sha512-4EDEmvxWtgsCnnVeBvtFIFZtUhPPt1+bA9JrSwU4Sa//6oKtzCSlGGXYJr44OD9aGISymbieJ4mCKHUygUDU+g=="], + "@quansync/fs": ["@quansync/fs@1.0.0", "", { "dependencies": { "quansync": "^1.0.0" } }, "sha512-4TJ3DFtlf1L5LDMaM6CanJ/0lckGNtJcMjQ1NAV6zDmA0tEHKZtxNKin8EgPaVX1YzljbxckyT2tJrpQKAtngQ=="], "@rolldown/binding-android-arm-eabi": ["@rolldown/binding-android-arm-eabi@1.3.2", "", { "os": "android", "cpu": "arm" }, "sha512-kqR2xcygEx3WwDY69LsKeyf7SVmx4yzMtKZRknyaHieVJdRvvnAM97L0Gq6tUFc9T2YXcW/Ghij2+Um6He0LTw=="], @@ -633,6 +649,8 @@ "@schematics/angular": ["@schematics/angular@22.2.7", "", { "dependencies": { "@angular-devkit/core": "22.2.7", "@angular-devkit/schematics": "22.2.7", "jsonc-parser": "3.3.1", "oxc-parser": "0.156.0", "typescript": "6.0.3" } }, "sha512-cdwLAc0m6mWZ3HA0VHqulUKItviExnENQwDQ01f9lQS9bTAWBEkg7Pgua+3BijMUEE5sf/kamqCdwaKPUn1uXQ=="], + "@sindresorhus/is": ["@sindresorhus/is@4.6.0", "", {}, "sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw=="], + "@solidjs/babel-plugin": ["@solidjs/babel-plugin@2.0.0-rc.23", "", { "dependencies": { "@babel/helper-module-imports": "7.18.6", "@babel/plugin-syntax-jsx": "^7.18.6", "@babel/types": "^7.20.7", "html-entities": "2.3.3", "parse5": "^7.1.2" }, "peerDependencies": { "@babel/core": "^7.20.12 || ^8.0.0", "@tsrx/core": "0.1.63" }, "optionalPeers": ["@tsrx/core"] }, "sha512-XSPVTf6DtyCTfQM0wE1i0b/Go4ou027KukwJRsIr0zWUjdKIIfmqYiILp0jDHouHqYrKyxwgEX3scNCmsKOrrg=="], "@solidjs/compiler": ["@solidjs/compiler@2.0.0-rc.23", "", { "optionalDependencies": { "@solidjs/compiler-darwin-arm64": "2.0.0-rc.23", "@solidjs/compiler-darwin-x64": "2.0.0-rc.23", "@solidjs/compiler-linux-arm64-gnu": "2.0.0-rc.23", "@solidjs/compiler-linux-x64-gnu": "2.0.0-rc.23", "@solidjs/compiler-wasm32-wasi": "2.0.0-rc.23", "@solidjs/compiler-win32-x64-msvc": "2.0.0-rc.23" } }, "sha512-a62s1nkGrfivp9hPDpq73Wk6baiP3QMYW39708fdXRyXdP9AQrsmZMbxDD909z7RyNtH6zpXw9p88h7FBEKoUw=="], @@ -821,9 +839,11 @@ "ansi-escapes": ["ansi-escapes@7.3.0", "", { "dependencies": { "environment": "^1.0.0" } }, "sha512-BvU8nYgGQBxcmMuEeUEmNTvrMVjJNSH7RgW24vXexN4Ven6qCvy4TntnvlnwnMLTVlcRQQdbRY8NKnaIoeWDNg=="], - "ansi-regex": ["ansi-regex@5.0.1", "", {}, "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ=="], + "ansi-regex": ["ansi-regex@6.6.0", "", {}, "sha512-XZ5apbzreCbXSKwPjJstu8R0zOi247w3XYwWxtwBXgpZrCyc1Ka7p9/xY0A9/diMewmHbEKz+FIraWaEWjlN5g=="], + + "ansi-styles": ["ansi-styles@4.3.0", "", { "dependencies": { "color-convert": "^2.0.1" } }, "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg=="], - "ansi-styles": ["ansi-styles@6.2.3", "", {}, "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg=="], + "any-promise": ["any-promise@1.3.0", "", {}, "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A=="], "argparse": ["argparse@2.0.1", "", {}, "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q=="], @@ -857,7 +877,9 @@ "caniuse-lite": ["caniuse-lite@1.0.30001791", "", {}, "sha512-yk0l/YSrOnFZk3UROpDLQD9+kC1l4meK/wed583AXrzoarMGJcbRi2Q4RaUYbKxYAsZ8sWmaSa/DsLmdBeI1vQ=="], - "chalk": ["chalk@5.6.2", "", {}, "sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA=="], + "chalk": ["chalk@4.1.2", "", { "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" } }, "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA=="], + + "char-regex": ["char-regex@1.0.2", "", {}, "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw=="], "chardet": ["chardet@2.1.1", "", {}, "sha512-PsezH1rqdV9VvyNhxxOW32/d75r01NY7TQCmOqomRo15ZSOKbpTFVsfjghxo6JloQUCGnH4k1LGu0R4yCLlWQQ=="], @@ -865,6 +887,8 @@ "ci-info": ["ci-info@3.9.0", "", {}, "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ=="], + "cjs-module-lexer": ["cjs-module-lexer@1.4.3", "", {}, "sha512-9z8TZaGM1pfswYeXrUpzPrkx8UnWYdhJclsiYMm6x/w5+nN+8Tf/LnAgfLGQCm59qAOxU8WwHEq2vNwF6i4j+Q=="], + "classy-store-angular-example": ["classy-store-angular-example@workspace:examples/angular"], "classy-store-nextjs-example": ["classy-store-nextjs-example@workspace:examples/nextjs"], @@ -877,8 +901,12 @@ "cli-cursor": ["cli-cursor@5.0.0", "", { "dependencies": { "restore-cursor": "^5.0.0" } }, "sha512-aCj4O5wKyszjMmDT4tZj93kxyydN/K5zPWSCe6/0AV/AA1pqe5ZBIw0a2ZfPQV7lL5/yb5HsUreJ6UFAF1tEQw=="], + "cli-highlight": ["cli-highlight@2.1.11", "", { "dependencies": { "chalk": "^4.0.0", "highlight.js": "^10.7.1", "mz": "^2.4.0", "parse5": "^5.1.1", "parse5-htmlparser2-tree-adapter": "^6.0.0", "yargs": "^16.0.0" }, "bin": { "highlight": "bin/highlight" } }, "sha512-9KDcoEVwyUXrjcJNvHD0NFc/hiwe/WPVYIleQh2O1N2Zro5gWJZ/K+3DGn8w8P/F6FxOgzyC5bxDyHIgCSPhGg=="], + "cli-spinners": ["cli-spinners@3.4.0", "", {}, "sha512-bXfOC4QcT1tKXGorxL3wbJm6XJPDqEnij2gQ2m7ESQuE+/z9YFIWnl/5RpTiKWbMq3EVKR4fRLJGn6DVfu0mpw=="], + "cli-table3": ["cli-table3@0.6.5", "", { "dependencies": { "string-width": "^4.2.0" }, "optionalDependencies": { "@colors/colors": "1.5.0" } }, "sha512-+W/5efTR7y5HRD7gACw9yQjqMVvEMLBHmboM/kPWam+H+Hmyrgjh6YncVKK122YZkXrLudzTuAukUw9FnMf7IQ=="], + "cli-truncate": ["cli-truncate@6.1.1", "", { "dependencies": { "slice-ansi": "^9.0.0", "string-width": "^8.2.0" } }, "sha512-06p9vyLahLa4zkGcgsGxU6iEkSOiuI4fhCH6Emhe2lPAcoUv73n72DnODsnHA+5wwXGnV0n9M9/qOQJSjYhFhw=="], "cli-width": ["cli-width@4.1.0", "", {}, "sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ=="], @@ -889,8 +917,14 @@ "clsx": ["clsx@2.1.1", "", {}, "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA=="], + "color-convert": ["color-convert@2.0.1", "", { "dependencies": { "color-name": "~1.1.4" } }, "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ=="], + + "color-name": ["color-name@1.1.4", "", {}, "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="], + "colorjs.io": ["colorjs.io@0.7.1", "", {}, "sha512-LY7OHnJZxHwT5UlzNa9bbhHHDbzB6yE5+3MIPwJEQKRvSCt/T4G7epsj+9j2BExUIIfXFIJGsIXUKdfrK9Q5tA=="], + "commander": ["commander@10.0.1", "", {}, "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug=="], + "convert-source-map": ["convert-source-map@2.0.0", "", {}, "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg=="], "cross-spawn": ["cross-spawn@7.0.6", "", { "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", "which": "^2.0.1" } }, "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA=="], @@ -931,7 +965,9 @@ "electron-to-chromium": ["electron-to-chromium@1.5.348", "", {}, "sha512-QC2X59nRlycQQMc4ZXjSVBX+tSgJfgRtcrYHbIZLgOV2dCvefoQGegLR7lLXKgpPpSuVmJU19LMzGrSa2C7k3Q=="], - "emoji-regex": ["emoji-regex@10.6.0", "", {}, "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A=="], + "emoji-regex": ["emoji-regex@8.0.0", "", {}, "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="], + + "emojilib": ["emojilib@2.4.0", "", {}, "sha512-5U0rVMU5Y2n2+ykNLQqMoqklN9ICBT/KsvC1Gz6vqHbz2AXXGkG+Pm5rMWk/8Vjrr/mY9985Hi8DYzn1F09Nyw=="], "empathic": ["empathic@2.1.0", "", {}, "sha512-AnfC1ATldl49/cvZdLPDjBfrRNwbDO05aibiOtzQu3qtlbJtomNLhF30HEtn/7iBz50dlMECqATo3fG0LrdEgw=="], @@ -973,6 +1009,8 @@ "fdir": ["fdir@6.5.0", "", { "peerDependencies": { "picomatch": "^3 || ^4" }, "optionalPeers": ["picomatch"] }, "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg=="], + "fflate": ["fflate@0.8.3", "", {}, "sha512-tbZNuJrLwGUp3zshBtdy4W+ORxZuIh8a5ilyIEQDC5rY1f3U20JMry0Ll3WBzU58EZKsEuJFXhb5gwv8CsPvgA=="], + "fill-range": ["fill-range@7.1.1", "", { "dependencies": { "to-regex-range": "^5.0.1" } }, "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg=="], "find-up": ["find-up@4.1.0", "", { "dependencies": { "locate-path": "^5.0.0", "path-exists": "^4.0.0" } }, "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw=="], @@ -1001,6 +1039,8 @@ "has-flag": ["has-flag@4.0.0", "", {}, "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ=="], + "highlight.js": ["highlight.js@10.7.3", "", {}, "sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A=="], + "hookable": ["hookable@6.1.2", "", {}, "sha512-+abwxtiEA52GCVIsQqut3S/uKTbUwYIp4Pe/vv+6py5XiXBCqMZHg6pA6Y5qhgLSEys0/cYuPbO0z1QFj5ZCmg=="], "hosted-git-info": ["hosted-git-info@10.1.1", "", { "dependencies": { "lru-cache": "^11.1.0" } }, "sha512-DeOnSPAvOndYKfw075gt8yZzQ7S2hNztw34zBTfhIzLhmBTswIBg5/y+pqu/VD5cYWm5goAFTusDmUEmKZ0PEQ=="], @@ -1025,7 +1065,7 @@ "is-extglob": ["is-extglob@2.1.1", "", {}, "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ=="], - "is-fullwidth-code-point": ["is-fullwidth-code-point@5.1.0", "", { "dependencies": { "get-east-asian-width": "^1.3.1" } }, "sha512-5XHYaSyiqADb4RnZ1Bdad6cPp8Toise4TzEjcOYDHZkTCbKgiUl7WTUCpNWHuxmDt91wnsZBc9xinNzopv3JMQ=="], + "is-fullwidth-code-point": ["is-fullwidth-code-point@3.0.0", "", {}, "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg=="], "is-glob": ["is-glob@4.0.3", "", { "dependencies": { "is-extglob": "^2.1.1" } }, "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg=="], @@ -1099,10 +1139,14 @@ "log-update": ["log-update@8.0.0", "", { "dependencies": { "ansi-escapes": "^7.3.0", "cli-cursor": "^5.0.0", "slice-ansi": "^9.0.0", "string-width": "^8.2.0", "strip-ansi": "^7.2.0", "wrap-ansi": "^10.0.0" } }, "sha512-lddSgOt3bPASrylL54ZSpy8nBHns+vBVSoILlVOx+dei300pnLRN958rj/EdlVLKuWlSESU3qdnDZdAI7FXYGg=="], - "lru-cache": ["lru-cache@5.1.1", "", { "dependencies": { "yallist": "^3.0.2" } }, "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w=="], + "lru-cache": ["lru-cache@11.5.3", "", {}, "sha512-U4N8FgzmWxc8k1VH8Kr6lQg18U7Fjvby6wXHVRX/ZZ7IwWbRMgrRbP0Wrb5q5NVinryp4SQampHKdvtecItxUg=="], "magic-string": ["magic-string@0.30.21", "", { "dependencies": { "@jridgewell/sourcemap-codec": "^1.5.5" } }, "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ=="], + "marked": ["marked@9.1.6", "", { "bin": { "marked": "bin/marked.js" } }, "sha512-jcByLnIFkd5gSXZmjNvS1TlmRhCXZjIzHYlaGkPlLIekG55JDR2Z4va9tZwCiP+/RDERiNhMOFu01xd6O5ct1Q=="], + + "marked-terminal": ["marked-terminal@7.3.1", "", { "dependencies": { "ansi-escapes": "^7.3.0", "ansi-regex": "^6.4.0", "chalk": "^5.6.2", "cli-highlight": "^2.1.11", "cli-table3": "^0.6.5", "node-emoji": "^2.2.0", "supports-hyperlinks": "^3.2.0" }, "peerDependencies": { "marked": ">=1 <19" } }, "sha512-B1eKs5mRiacjHHMlex1zn0zkVomz2/KWjD/dyA8WRQTXk2d15OzVjiK/iuPfvDFB27Gvr8p/u6MYgU0NY/O45w=="], + "merge-anything": ["merge-anything@5.1.7", "", { "dependencies": { "is-what": "^4.1.8" } }, "sha512-eRtbOb1N5iyH0tkQDAoQ4Ipsp/5qSR79Dzrz8hEPxRX10RWWR/iQXdoKmBSRCThY1Fh5EhISDtpSc93fpxUniQ=="], "merge2": ["merge2@1.4.1", "", {}, "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg=="], @@ -1125,12 +1169,16 @@ "mute-stream": ["mute-stream@3.0.0", "", {}, "sha512-dkEJPVvun4FryqBmZ5KhDo0K9iDXAwn08tMLDinNdRBNPcYEDiWYysLcc6k3mjTMlbP9KyylvRpd4wFtwrT9rw=="], + "mz": ["mz@2.7.0", "", { "dependencies": { "any-promise": "^1.0.0", "object-assign": "^4.0.1", "thenify-all": "^1.0.0" } }, "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q=="], + "nanoid": ["nanoid@3.3.20", "", { "bin": { "nanoid": "bin/nanoid.cjs" } }, "sha512-uKdg2G3GNCKQn9byYOpxbGqrT2fGO5KRt5J/8b3pok8rT6qxGWF6hxMyJiEYtAf+FVyYuD9hRaDqX5uPFYJ4ZQ=="], "next": ["next@16.4.6", "", { "dependencies": { "@next/env": "16.4.6", "@swc/helpers": "0.5.23", "baseline-browser-mapping": "^2.9.19", "caniuse-lite": "^1.0.30001579", "postcss": "8.5.23", "styled-jsx": "5.1.6" }, "optionalDependencies": { "@next/swc-darwin-arm64": "16.4.6", "@next/swc-darwin-x64": "16.4.6", "@next/swc-linux-arm64-gnu": "16.4.6", "@next/swc-linux-arm64-musl": "16.4.6", "@next/swc-linux-x64-gnu": "16.4.6", "@next/swc-linux-x64-musl": "16.4.6", "@next/swc-win32-arm64-msvc": "16.4.6", "@next/swc-win32-x64-msvc": "16.4.6", "sharp": "^0.35.5" }, "peerDependencies": { "@opentelemetry/api": "^1.1.0", "@playwright/test": "^1.51.1", "babel-plugin-react-compiler": "*", "react": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0", "react-dom": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0", "sass": "^1.3.0" }, "optionalPeers": ["@opentelemetry/api", "@playwright/test", "babel-plugin-react-compiler", "sass"], "bin": { "next": "dist/bin/next" } }, "sha512-QZJiYhaZLJMo2KpkQGQIwvmd79WVsAWeYIU554a8d7zArS3si/IRy3lBNV/rtYhE70oLwdLYhPAXLPx8HwcwtA=="], "node-addon-api": ["node-addon-api@6.1.0", "", {}, "sha512-+eawOlIgy680F0kBzPUNFhMZGtJ1YmqM6l4+Crf4IkImjYrO/mqPwRMh352g23uIaQKFItcQ64I7KMaJxHgAVA=="], + "node-emoji": ["node-emoji@2.2.0", "", { "dependencies": { "@sindresorhus/is": "^4.6.0", "char-regex": "^1.0.2", "emojilib": "^2.4.0", "skin-tone": "^2.0.0" } }, "sha512-Z3lTE9pLaJF47NyMhd4ww1yFTAP8YhYI8SleJiHzM46Fgpm5cnNzSl9XfzFNqbaz+VlJrIj3fXQ4DeN1Rjm6cw=="], + "node-fetch": ["node-fetch@2.7.0", "", { "dependencies": { "whatwg-url": "^5.0.0" }, "peerDependencies": { "encoding": "^0.1.0" }, "optionalPeers": ["encoding"] }, "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A=="], "node-gyp-build-optional-packages": ["node-gyp-build-optional-packages@5.2.2", "", { "dependencies": { "detect-libc": "^2.0.1" }, "bin": { "node-gyp-build-optional-packages": "bin.js", "node-gyp-build-optional-packages-optional": "optional.js", "node-gyp-build-optional-packages-test": "build-test.js" } }, "sha512-s+w+rBWnpTMwSFbaE0UXsRlg7hU4FjekKU4eyAih5T8nJuNZT1nNsskXpxmeqSK9UzkBl6UgRlnKc8hz8IEqOw=="], @@ -1141,6 +1189,8 @@ "nth-check": ["nth-check@3.0.1", "", { "dependencies": { "boolbase": "^2.0.0" } }, "sha512-GX0gsdbGVCgnRgbeGaubfjpBXyYRWOOCVeYh08bSQvDZqxz5ndXs1OTfAt/h36G1xvI94YIspsI0sVFqAV9+RQ=="], + "object-assign": ["object-assign@4.1.1", "", {}, "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg=="], + "obug": ["obug@3.0.0", "", {}, "sha512-5vvB5+W7ePv+p3uqxi+RcW1XAzLW0/hxt3/4X4Lc4qHudzOhmBiBwOY6DRob4WnanAEGvNcLjF+KNOufrUoEQw=="], "onetime": ["onetime@7.0.0", "", { "dependencies": { "mimic-function": "^5.0.0" } }, "sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ=="], @@ -1169,6 +1219,8 @@ "parse5-html-rewriting-stream": ["parse5-html-rewriting-stream@8.0.1", "", { "dependencies": { "entities": "^8.0.0", "parse5": "^8.0.0", "parse5-sax-parser": "^8.0.0" } }, "sha512-NaRku2aMpUN1Sh1Gyk1KWUh2A7EJx2c6qYzvwsPtqhoHoaURshdrceYK3LunVCm3WHhm6FS7Vcczbvdh3/UIVw=="], + "parse5-htmlparser2-tree-adapter": ["parse5-htmlparser2-tree-adapter@6.0.1", "", { "dependencies": { "parse5": "^6.0.1" } }, "sha512-qPuWvbLgvDGilKc5BoicRovlT4MtYT6JfJyBOMDsKoiT+GiuP5qyrPCnR9HcPECIJJmZh5jRndyNThnhhb/vlA=="], + "parse5-sax-parser": ["parse5-sax-parser@8.0.0", "", { "dependencies": { "parse5": "^8.0.0" } }, "sha512-/dQ8UzHZwnrzs3EvDj6IkKrD/jIZyTlB+8XrHJvcjNgRdmWruNdN9i9RK/JtxakmlUdPwKubKPTCqvbTgzGhrw=="], "path-browserify": ["path-browserify@1.0.1", "", {}, "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g=="], @@ -1205,6 +1257,8 @@ "proxy-compare": ["proxy-compare@3.0.1", "", {}, "sha512-V9plBAt3qjMlS1+nC8771KNf6oJ12gExvaxnNzN/9yVRLdTv/lc+oJlnSzrdYDAvBfTStPCoiaCOTmTs0adv7Q=="], + "publint": ["publint@0.3.25", "", { "dependencies": { "@publint/pack": "^0.1.7", "package-manager-detector": "^1.8.0", "picocolors": "^1.1.1", "sade": "^1.8.1" }, "bin": { "publint": "./src/cli.js" } }, "sha512-WMMbn/d7JqRlfXQL/JUI4n5skC8cJ5WVr8/wT5mmiYWkUdENkZr1I5rgs2+dQPVRgoJd+JRYtB46MTsuDylw9g=="], + "quansync": ["quansync@0.2.11", "", {}, "sha512-AifT7QEbW9Nri4tAwR5M/uzpBuqfZf+zwaEM/QkzEjj7NBuFD2rBuy0K3dE+8wltbezDV7JMA0WfnCPYRSYbXA=="], "queue-microtask": ["queue-microtask@1.2.3", "", {}, "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A=="], @@ -1221,6 +1275,8 @@ "reflect-metadata": ["reflect-metadata@0.2.2", "", {}, "sha512-urBwgfrvVP/eAyXx4hluJivBKzuEbSQs9rKWCrCkbSxNv8mxPcUZKeuoF3Uy4mJl3Lwprp6yy5/39VWigZ4K6Q=="], + "require-directory": ["require-directory@2.1.1", "", {}, "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q=="], + "require-from-string": ["require-from-string@2.0.2", "", {}, "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw=="], "resolve-from": ["resolve-from@5.0.0", "", {}, "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw=="], @@ -1299,6 +1355,8 @@ "signal-exit": ["signal-exit@4.1.0", "", {}, "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw=="], + "skin-tone": ["skin-tone@2.0.0", "", { "dependencies": { "unicode-emoji-modifier-base": "^1.0.0" } }, "sha512-kUMbT1oBJCpgrnKoSr0o6wPtvRWT9W9UKvGLwfJYO2WuahZRHOpEyL1ckyMGgMWh0UdpmaoFqKKD29WTomNEGA=="], + "slash": ["slash@3.0.0", "", {}, "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q=="], "slice-ansi": ["slice-ansi@9.0.1", "", { "dependencies": { "ansi-styles": "^6.2.3", "is-fullwidth-code-point": "^5.1.0" } }, "sha512-aBY19bn/XA+hKOKX0qL7Z0UfdBsbQvc9hn993U8ALUjzxCvDcuZqLoRXjGJrUARWAlwMnsRVD9sw2AFNOYvalA=="], @@ -1317,7 +1375,7 @@ "stdin-discarder": ["stdin-discarder@0.3.2", "", {}, "sha512-eCPu1qRxPVkl5605OTWF8Wz40b4Mf45NY5LQmVPQ599knfs5QhASUm9GbJ5BDMDOXgrnh0wyEdvzmL//YMlw0A=="], - "string-width": ["string-width@8.3.0", "", { "dependencies": { "get-east-asian-width": "^1.5.0", "strip-ansi": "^7.1.2" } }, "sha512-ZbmZM0JCihQN91dWnxoipT2KOEyHqEyfRXUyjuRhW8b/xnqPDoq4gWEVApTVa9db2wN8mmoikgFBbjh71+cGeQ=="], + "string-width": ["string-width@4.2.3", "", { "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", "strip-ansi": "^6.0.1" } }, "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g=="], "strip-ansi": ["strip-ansi@6.0.1", "", { "dependencies": { "ansi-regex": "^5.0.1" } }, "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A=="], @@ -1325,7 +1383,9 @@ "styled-jsx": ["styled-jsx@5.1.6", "", { "dependencies": { "client-only": "0.0.1" }, "peerDependencies": { "react": ">= 16.8.0 || 17.x.x || ^18.0.0-0 || ^19.0.0-0" } }, "sha512-qSVyDTeMotdvQYoHWLNGwRFJHC+i+ZvdBRYosOFgC+Wg1vx4frN2/RG/NA7SYqqvKNLf39P2LSRA2pu6n0XYZA=="], - "supports-color": ["supports-color@8.1.1", "", { "dependencies": { "has-flag": "^4.0.0" } }, "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q=="], + "supports-color": ["supports-color@7.2.0", "", { "dependencies": { "has-flag": "^4.0.0" } }, "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw=="], + + "supports-hyperlinks": ["supports-hyperlinks@3.2.0", "", { "dependencies": { "has-flag": "^4.0.0", "supports-color": "^7.0.0" } }, "sha512-zFObLMyZeEwzAoKCyu1B91U79K2t7ApXuQfo8OuxwXLDgcKxuwM+YvcbIhm6QWqz7mHUH1TVytR1PwVVjEuMig=="], "svelte": ["svelte@5.57.3", "", { "dependencies": { "@jridgewell/remapping": "^2.3.5", "@jridgewell/sourcemap-codec": "^1.6.0", "@sveltejs/acorn-typescript": "^1.0.13", "@types/estree": "^1.0.9", "acorn": "^8.18.0", "aria-query": "5.3.1", "axobject-query": "^4.1.0", "clsx": "^2.1.1", "devalue": "^5.9.2", "esm-env": "^1.2.1", "esrap": "^2.3.6", "is-reference": "^3.0.3", "locate-character": "^3.0.0", "magic-string": "^0.30.11", "zimmerframe": "^1.1.2" } }, "sha512-5mAftM3SoDV9X0zdF386F9p2pv8iKOwi/KfBS1XnBAkVCKFzVOLHUoa8iGWAt4buoicLmyWVRpuuD5wplXOQsg=="], @@ -1339,6 +1399,10 @@ "term-size": ["term-size@2.2.1", "", {}, "sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg=="], + "thenify": ["thenify@3.3.1", "", { "dependencies": { "any-promise": "^1.0.0" } }, "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw=="], + + "thenify-all": ["thenify-all@1.6.0", "", { "dependencies": { "thenify": ">= 3.1.0 < 4" } }, "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA=="], + "tinyexec": ["tinyexec@1.3.1", "", {}, "sha512-GCvB3aoys96IuDFBMcTB46JOR6mdMtAToqwiW8JlWhsoh1mhHi/xn9ss/Dg7N555GiJyEt2qzoG/NHCwM6h1EA=="], "tinyglobby": ["tinyglobby@0.2.17", "", { "dependencies": { "fdir": "^6.5.0", "picomatch": "^4.0.4" } }, "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g=="], @@ -1359,11 +1423,13 @@ "undici-types": ["undici-types@8.9.0", "", {}, "sha512-KTDyRTYX8sWmKXAikPHHSyc63CRPETMctyjKFupcC6OBLXT3xsN0e9aF7m+mIXutFWpUXuedtowG7iLOzp0kQg=="], + "unicode-emoji-modifier-base": ["unicode-emoji-modifier-base@1.0.0", "", {}, "sha512-yLSH4py7oFH3oG/9K+XWrz1pSi3dfUrWEnInbxMfArOfc1+33BlGPQtLsOYwvdMy11AwUBetYuaRxSPqgkq+8g=="], + "universalify": ["universalify@0.1.2", "", {}, "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg=="], "update-browserslist-db": ["update-browserslist-db@1.2.3", "", { "dependencies": { "escalade": "^3.2.0", "picocolors": "^1.1.1" }, "peerDependencies": { "browserslist": ">= 4.21.0" }, "bin": { "update-browserslist-db": "cli.js" } }, "sha512-Js0m9cx+qOgDxo0eMiFGEueWztz+d4+M3rGlmKPT+T4IS/jP4ylw3Nwpu6cpTTP8R1MAC1kF4VbdLt3ARf209w=="], - "validate-npm-package-name": ["validate-npm-package-name@8.0.0", "", {}, "sha512-SCv6OOV6Xj2/3cXy3dGmADluJTNcL3o7hZAglNPTe+WYuEuvxgJzxPrSDLZhF+CwyQOubqgecjMmTJGMVLWjYQ=="], + "validate-npm-package-name": ["validate-npm-package-name@5.0.1", "", {}, "sha512-OljLrQ9SQdOUqTaQxqL5dEfZWrXExyyWsozYlAWFawPVNuD83igl7uJD2RTkNMbniIYgt8l81eCJGIdQF7avLQ=="], "varint": ["varint@6.0.0", "", {}, "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg=="], @@ -1429,8 +1495,12 @@ "@angular/compiler-cli/typescript": ["typescript@6.0.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw=="], + "@arethetypeswrong/core/typescript": ["typescript@5.6.1-rc", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-E3b2+1zEFu84jB0YQi9BORDjz9+jGbwwy1Zi3G0LUNw7a7cePUrHMRNy8aPh53nXpkFGVHSxIZo5vKTfYaFiBQ=="], + "@babel/core/semver": ["semver@6.3.1", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA=="], + "@babel/helper-compilation-targets/lru-cache": ["lru-cache@5.1.1", "", { "dependencies": { "yallist": "^3.0.2" } }, "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w=="], + "@babel/helper-compilation-targets/semver": ["semver@6.3.1", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA=="], "@babel/helper-module-imports/@babel/traverse": ["@babel/traverse@7.29.10", "", { "dependencies": { "@babel/code-frame": "^7.29.7", "@babel/generator": "^7.29.8", "@babel/helper-globals": "^7.29.7", "@babel/parser": "^7.29.9", "@babel/template": "^7.29.7", "@babel/types": "^7.29.8", "debug": "^4.3.1" } }, "sha512-B3lYAs2nkKskbgQ1nfy8Ma9ao9Q1rntTAQHrzzyDuj+TSO+X3le6PfWwqDvodsb+OumE10eMFfuMCTQSQ5iuIQ=="], @@ -1535,6 +1605,12 @@ "classy-store-vue-example/typescript": ["typescript@5.9.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw=="], + "cli-highlight/parse5": ["parse5@5.1.1", "", {}, "sha512-ugq4DFI0Ptb+WWjAdOK16+u/nHfiIrcE+sh8kZMaM0WllQKLI9rOUq6c2b7cwPkXdzfQESqvoqK6ug7U/Yyzug=="], + + "cli-highlight/yargs": ["yargs@16.2.2", "", { "dependencies": { "cliui": "^7.0.2", "escalade": "^3.1.1", "get-caller-file": "^2.0.5", "require-directory": "^2.1.1", "string-width": "^4.2.0", "y18n": "^5.0.5", "yargs-parser": "^20.2.2" } }, "sha512-Nt9ZJjXTv5R8MHbqby/wXQ6Gi0Bb3TcYZkR1bzuL4yB2OxWPkXknz513gEF0GoA6tn00UpbPvERW8rzCuWCA6w=="], + + "cli-truncate/string-width": ["string-width@8.3.0", "", { "dependencies": { "get-east-asian-width": "^1.5.0", "strip-ansi": "^7.1.2" } }, "sha512-ZbmZM0JCihQN91dWnxoipT2KOEyHqEyfRXUyjuRhW8b/xnqPDoq4gWEVApTVa9db2wN8mmoikgFBbjh71+cGeQ=="], + "cliui/string-width": ["string-width@7.2.0", "", { "dependencies": { "emoji-regex": "^10.3.0", "get-east-asian-width": "^1.0.0", "strip-ansi": "^7.1.0" } }, "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ=="], "cliui/strip-ansi": ["strip-ansi@7.2.0", "", { "dependencies": { "ansi-regex": "^6.2.2" } }, "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w=="], @@ -1543,27 +1619,45 @@ "dom-serializer/entities": ["entities@8.1.0", "", {}, "sha512-kxL7msIffSuh9aaFAMD7rxAIuTRMAHMeBtgHW2yUdWw732ZNh4MehkF2gdjvtdmikkaIP9bFDDJOPlsvm7avrA=="], - "hosted-git-info/lru-cache": ["lru-cache@11.5.3", "", {}, "sha512-U4N8FgzmWxc8k1VH8Kr6lQg18U7Fjvby6wXHVRX/ZZ7IwWbRMgrRbP0Wrb5q5NVinryp4SQampHKdvtecItxUg=="], - "htmlparser2/entities": ["entities@8.1.0", "", {}, "sha512-kxL7msIffSuh9aaFAMD7rxAIuTRMAHMeBtgHW2yUdWw732ZNh4MehkF2gdjvtdmikkaIP9bFDDJOPlsvm7avrA=="], "is-reference/@types/estree": ["@types/estree@1.0.8", "", {}, "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w=="], + "log-update/string-width": ["string-width@8.3.0", "", { "dependencies": { "get-east-asian-width": "^1.5.0", "strip-ansi": "^7.1.2" } }, "sha512-ZbmZM0JCihQN91dWnxoipT2KOEyHqEyfRXUyjuRhW8b/xnqPDoq4gWEVApTVa9db2wN8mmoikgFBbjh71+cGeQ=="], + "log-update/strip-ansi": ["strip-ansi@7.2.0", "", { "dependencies": { "ansi-regex": "^6.2.2" } }, "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w=="], + "marked-terminal/chalk": ["chalk@5.6.2", "", {}, "sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA=="], + "micromatch/picomatch": ["picomatch@2.3.2", "", {}, "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA=="], "next/postcss": ["postcss@8.5.23", "", { "dependencies": { "nanoid": "^3.3.16", "picocolors": "^1.1.1", "source-map-js": "^1.2.1" } }, "sha512-g50586zr4bZmwFiTlflMu8E0bDTb5I5gertgwAKmsdUlTQIhZtunzUlD1WSzwcVWPoAVpsrA6vlfCD7oXvRwgg=="], + "npm-package-arg/validate-npm-package-name": ["validate-npm-package-name@8.0.0", "", {}, "sha512-SCv6OOV6Xj2/3cXy3dGmADluJTNcL3o7hZAglNPTe+WYuEuvxgJzxPrSDLZhF+CwyQOubqgecjMmTJGMVLWjYQ=="], + + "ora/chalk": ["chalk@5.6.2", "", {}, "sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA=="], + + "ora/string-width": ["string-width@8.3.0", "", { "dependencies": { "get-east-asian-width": "^1.5.0", "strip-ansi": "^7.1.2" } }, "sha512-ZbmZM0JCihQN91dWnxoipT2KOEyHqEyfRXUyjuRhW8b/xnqPDoq4gWEVApTVa9db2wN8mmoikgFBbjh71+cGeQ=="], + "oxc-parser/@oxc-project/types": ["@oxc-project/types@0.156.0", "", {}, "sha512-1Duyg48TdJNdyhEB8Xn1L36bT9Pv6GUtlKjHxOys8xkaF/rQq3XJE+bAurSK/AgIz5mGFsb77cn9Pb20+WCScw=="], "parse5/entities": ["entities@8.1.0", "", {}, "sha512-kxL7msIffSuh9aaFAMD7rxAIuTRMAHMeBtgHW2yUdWw732ZNh4MehkF2gdjvtdmikkaIP9bFDDJOPlsvm7avrA=="], "parse5-html-rewriting-stream/entities": ["entities@8.1.0", "", {}, "sha512-kxL7msIffSuh9aaFAMD7rxAIuTRMAHMeBtgHW2yUdWw732ZNh4MehkF2gdjvtdmikkaIP9bFDDJOPlsvm7avrA=="], + "parse5-htmlparser2-tree-adapter/parse5": ["parse5@6.0.1", "", {}, "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw=="], + + "publint/package-manager-detector": ["package-manager-detector@1.9.0", "", {}, "sha512-zAMfbta9nPA8AKkA4WdmNAT8R8s6Dk0/xwPsqNnRidMFcLo1YkLuPDTgs2f64XdzS8vbLNnoJ+uUIkgbz7oRHA=="], + "read-yaml-file/js-yaml": ["js-yaml@3.15.2", "", { "dependencies": { "argparse": "^1.0.7", "esprima": "^4.0.0" }, "bin": { "js-yaml": "bin/js-yaml.js" } }, "sha512-6EuL879VkRA+1Cz578mKMiKvjPNEuk6+r1JaFzoSWejZmtf7xWbIyw1e3KkxlkzTIt9Taw6JBhEppG7utc1P+w=="], - "string-width/strip-ansi": ["strip-ansi@7.2.0", "", { "dependencies": { "ansi-regex": "^6.2.2" } }, "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w=="], + "sass-embedded/supports-color": ["supports-color@8.1.1", "", { "dependencies": { "has-flag": "^4.0.0" } }, "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q=="], + + "slice-ansi/ansi-styles": ["ansi-styles@6.2.3", "", {}, "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg=="], + + "slice-ansi/is-fullwidth-code-point": ["is-fullwidth-code-point@5.1.0", "", { "dependencies": { "get-east-asian-width": "^1.3.1" } }, "sha512-5XHYaSyiqADb4RnZ1Bdad6cPp8Toise4TzEjcOYDHZkTCbKgiUl7WTUCpNWHuxmDt91wnsZBc9xinNzopv3JMQ=="], + + "strip-ansi/ansi-regex": ["ansi-regex@5.0.1", "", {}, "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ=="], "unconfig-core/quansync": ["quansync@1.0.0", "", {}, "sha512-5xZacEEufv3HSTPQuchrvV6soaiACMFnq1H8wkVioctoH3TRha9Sz66lOxRwPK/qZj7HPiSveih9yAyh98gvqA=="], @@ -1571,6 +1665,12 @@ "vite/rolldown": ["rolldown@1.2.19", "", { "dependencies": { "@oxc-project/types": "=0.156.0", "@rolldown/pluginutils": "^1.0.0" }, "optionalDependencies": { "@rolldown/binding-android-arm-eabi": "1.2.19", "@rolldown/binding-android-arm64": "1.2.19", "@rolldown/binding-darwin-arm64": "1.2.19", "@rolldown/binding-darwin-x64": "1.2.19", "@rolldown/binding-freebsd-x64": "1.2.19", "@rolldown/binding-linux-arm-gnueabihf": "1.2.19", "@rolldown/binding-linux-arm64-gnu": "1.2.19", "@rolldown/binding-linux-arm64-musl": "1.2.19", "@rolldown/binding-linux-ppc64-gnu": "1.2.19", "@rolldown/binding-linux-s390x-gnu": "1.2.19", "@rolldown/binding-linux-x64-gnu": "1.2.19", "@rolldown/binding-linux-x64-musl": "1.2.19", "@rolldown/binding-openharmony-arm64": "1.2.19", "@rolldown/binding-wasm32-wasi": "1.2.19", "@rolldown/binding-win32-arm64-msvc": "1.2.19", "@rolldown/binding-win32-x64-msvc": "1.2.19" }, "bin": { "rolldown": "./bin/cli.mjs" } }, "sha512-QIiV1J9d0pzN4jeeTH4sjPy0AZ6cAy2cG0ExeoE1+U8Rvj+hR3gYkokx0YbeUNGlZqiQJJ2utcETe0oKXwzsuA=="], + "wrap-ansi/ansi-styles": ["ansi-styles@6.2.3", "", {}, "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg=="], + + "wrap-ansi/string-width": ["string-width@8.3.0", "", { "dependencies": { "get-east-asian-width": "^1.5.0", "strip-ansi": "^7.1.2" } }, "sha512-ZbmZM0JCihQN91dWnxoipT2KOEyHqEyfRXUyjuRhW8b/xnqPDoq4gWEVApTVa9db2wN8mmoikgFBbjh71+cGeQ=="], + + "yargs/string-width": ["string-width@8.3.0", "", { "dependencies": { "get-east-asian-width": "^1.5.0", "strip-ansi": "^7.1.2" } }, "sha512-ZbmZM0JCihQN91dWnxoipT2KOEyHqEyfRXUyjuRhW8b/xnqPDoq4gWEVApTVa9db2wN8mmoikgFBbjh71+cGeQ=="], + "@angular/compiler-cli/@babel/core/@babel/code-frame": ["@babel/code-frame@8.0.6", "", { "dependencies": { "@babel/helper-validator-identifier": "^8.0.6", "js-tokens": "^10.0.0" } }, "sha512-uMHhvmDmwFiLuiozaoRYTZHqMFuu3fem/X9JY78lohAuLoh8LSGGC8JqUzo2cVuBsBxkjMZNk56CE7ock8Xxkw=="], "@angular/compiler-cli/@babel/core/@babel/generator": ["@babel/generator@8.0.6", "", { "dependencies": { "@babel/parser": "^8.0.6", "@babel/types": "^8.0.6", "@jridgewell/gen-mapping": "0.4.0-beta.0", "@jridgewell/trace-mapping": "^0.3.31", "@types/jsesc": "^2.5.0", "jsesc": "^3.0.2" } }, "sha512-/pcanjdRsonCexCuxgGD8fKnBLLzk2i9uM4kmcmGyyev2R5YDs+rafMYZ89RvaGY1mW8T7C5au0TyYaEeHBGng=="], @@ -1623,13 +1723,23 @@ "classy-store-svelte-example/svelte-check/chokidar": ["chokidar@4.0.3", "", { "dependencies": { "readdirp": "^4.0.1" } }, "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA=="], + "cli-highlight/yargs/cliui": ["cliui@7.0.4", "", { "dependencies": { "string-width": "^4.2.0", "strip-ansi": "^6.0.0", "wrap-ansi": "^7.0.0" } }, "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ=="], + + "cli-highlight/yargs/yargs-parser": ["yargs-parser@20.2.9", "", {}, "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w=="], + + "cli-truncate/string-width/strip-ansi": ["strip-ansi@7.2.0", "", { "dependencies": { "ansi-regex": "^6.2.2" } }, "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w=="], + + "cliui/string-width/emoji-regex": ["emoji-regex@10.6.0", "", {}, "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A=="], + "cliui/strip-ansi/ansi-regex": ["ansi-regex@6.2.2", "", {}, "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg=="], + "cliui/wrap-ansi/ansi-styles": ["ansi-styles@6.2.3", "", {}, "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg=="], + "log-update/strip-ansi/ansi-regex": ["ansi-regex@6.2.2", "", {}, "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg=="], - "read-yaml-file/js-yaml/argparse": ["argparse@1.0.10", "", { "dependencies": { "sprintf-js": "~1.0.2" } }, "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg=="], + "ora/string-width/strip-ansi": ["strip-ansi@7.2.0", "", { "dependencies": { "ansi-regex": "^6.2.2" } }, "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w=="], - "string-width/strip-ansi/ansi-regex": ["ansi-regex@6.2.2", "", {}, "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg=="], + "read-yaml-file/js-yaml/argparse": ["argparse@1.0.10", "", { "dependencies": { "sprintf-js": "~1.0.2" } }, "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg=="], "vite/rolldown/@oxc-project/types": ["@oxc-project/types@0.156.0", "", {}, "sha512-1Duyg48TdJNdyhEB8Xn1L36bT9Pv6GUtlKjHxOys8xkaF/rQq3XJE+bAurSK/AgIz5mGFsb77cn9Pb20+WCScw=="], @@ -1665,6 +1775,10 @@ "vite/rolldown/@rolldown/binding-win32-x64-msvc": ["@rolldown/binding-win32-x64-msvc@1.2.19", "", { "os": "win32", "cpu": "x64" }, "sha512-y/sqRRc6d7hECzOFc5n3LSeqctmIp9mMjY1Kq4s14uLPd/LZ4z7i1zrW6fMtp2mPeuQIC4e6ULMcwQzMomqQag=="], + "wrap-ansi/string-width/strip-ansi": ["strip-ansi@7.2.0", "", { "dependencies": { "ansi-regex": "^6.2.2" } }, "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w=="], + + "yargs/string-width/strip-ansi": ["strip-ansi@7.2.0", "", { "dependencies": { "ansi-regex": "^6.2.2" } }, "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w=="], + "@angular/compiler-cli/@babel/core/@babel/code-frame/@babel/helper-validator-identifier": ["@babel/helper-validator-identifier@8.0.6", "", {}, "sha512-HYx0YmuchRxRSpnjvcNffnPS8DCauKNmnumIuHG3jnQAVewRA7kfJGwF13ayEpSZs7s4R/oBH4eppuXcAQd5JQ=="], "@angular/compiler-cli/@babel/core/@babel/code-frame/js-tokens": ["js-tokens@10.0.0", "", {}, "sha512-lM/UBzQmfJRo9ABXbPWemivdCW8V2G8FHaHdypQaIy523snUjog0W71ayWXTjiR+ixeMyVHN2XcpnTd/liPg/Q=="], @@ -1739,10 +1853,20 @@ "classy-store-svelte-example/svelte-check/chokidar/readdirp": ["readdirp@4.1.2", "", {}, "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg=="], + "cli-highlight/yargs/cliui/wrap-ansi": ["wrap-ansi@7.0.0", "", { "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", "strip-ansi": "^6.0.0" } }, "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q=="], + + "cli-truncate/string-width/strip-ansi/ansi-regex": ["ansi-regex@6.2.2", "", {}, "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg=="], + + "ora/string-width/strip-ansi/ansi-regex": ["ansi-regex@6.2.2", "", {}, "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg=="], + "vite/rolldown/@rolldown/binding-wasm32-wasi/@emnapi/core": ["@emnapi/core@2.0.0-beta.2", "", { "dependencies": { "@emnapi/wasi-threads": "2.2.0", "tslib": "^2.4.0" } }, "sha512-MzCVoWtcg4Pm2B3je5mMvYMvj3MmBKw+fU7vbsJc9/iT8ip6/eYIHo/Dsm/mr+wsHB6SEyJDuxB09Yy6r/8+4A=="], "vite/rolldown/@rolldown/binding-wasm32-wasi/@emnapi/runtime": ["@emnapi/runtime@2.0.0-beta.2", "", { "dependencies": { "tslib": "^2.4.0" } }, "sha512-JcrSPzPvZuNZvJqPTF9Fw25LbOJ8avzFVlaf2grmH4Cku0oGP47tRgqPZadcfj3YoZMHkFVnCYFbQM8I+i5QEw=="], + "wrap-ansi/string-width/strip-ansi/ansi-regex": ["ansi-regex@6.2.2", "", {}, "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg=="], + + "yargs/string-width/strip-ansi/ansi-regex": ["ansi-regex@6.2.2", "", {}, "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg=="], + "classy-store-angular-example/@angular/build/@babel/core/@babel/code-frame/@babel/helper-validator-identifier": ["@babel/helper-validator-identifier@8.0.6", "", {}, "sha512-HYx0YmuchRxRSpnjvcNffnPS8DCauKNmnumIuHG3jnQAVewRA7kfJGwF13ayEpSZs7s4R/oBH4eppuXcAQd5JQ=="], "classy-store-angular-example/@angular/build/@babel/core/@babel/code-frame/js-tokens": ["js-tokens@10.0.0", "", {}, "sha512-lM/UBzQmfJRo9ABXbPWemivdCW8V2G8FHaHdypQaIy523snUjog0W71ayWXTjiR+ixeMyVHN2XcpnTd/liPg/Q=="], diff --git a/package.json b/package.json index 74ec7456..93dfef79 100644 --- a/package.json +++ b/package.json @@ -27,6 +27,7 @@ "---------- Lint --------------------------------------------------------": "", "lint": "biome check", "lint:fix": "biome check --write", + "check:package": "bun run build && bun run --filter @codebelt/classy-store check:package", "typecheck": "bun run --filter @codebelt/classy-store typecheck && bun run --filter @codebelt/classy-store typecheck:scoping && bun run --filter classy-store-svelte-example check:integration && bun run --filter classy-store-vue-example check:integration && bun run --filter classy-store-solid-example typecheck && bun run --filter classy-store-solid-example check:integration && bun run --filter classy-store-angular-example typecheck && bun run --filter classy-store-angular-example check:integration", "---------- Release (Changesets) ----------------------------------------": "", "changeset": "changeset", diff --git a/packages/classy-store/package.json b/packages/classy-store/package.json index 29e2e602..3cfe1f35 100644 --- a/packages/classy-store/package.json +++ b/packages/classy-store/package.json @@ -8,6 +8,9 @@ "directory": "packages/classy-store" }, "type": "module", + "engines": { + "node": ">=20" + }, "main": "./dist/index.cjs", "module": "./dist/index.mjs", "types": "./dist/index.d.mts", @@ -105,7 +108,8 @@ "types": "./dist/frameworks/solid/solid.d.cts", "default": "./dist/frameworks/solid/solid.cjs" } - } + }, + "./package.json": "./package.json" }, "imports": { "#store-runtime": { @@ -131,6 +135,7 @@ "---------- Lint --------------------------------------------------------": "", "typecheck": "tsc --noEmit && tsc --project tests/browser/tsconfig.json --noEmit && tsc --project tests/compiler/tsconfig.json --noEmit && tsc --project tests/performance/tsconfig.json --noEmit && tsc --project tests/memory/tsconfig.json --noEmit && tsc --project tests/next/tsconfig.json --noEmit && tsc --project tests/angularCompatibility/tsconfig.json --noEmit && tsc --project tests/frameworkCompatibility/tsconfig.json --noEmit", "typecheck:scoping": "tsc --project tests/tsconfig.scoping.json --noEmit", + "check:package": "publint --strict && attw --pack . --profile node16", "prepack": "cp ../../README.md .", "-----------------------------------------------------------------------": "" }, @@ -181,7 +186,9 @@ "typescript": "7.0.2", "vue": "3.5.45", "@angular/platform-browser": "22.2.6", - "@angular/compiler": "22.2.6" + "@angular/compiler": "22.2.6", + "@arethetypeswrong/cli": "0.18.5", + "publint": "0.3.25" }, "keywords": [ "classy-store", From 04fe30fa7d8e69d5d5db97c01bc3cbc075bb416b Mon Sep 17 00:00:00 2001 From: codeBelt Date: Mon, 16 Nov 2026 20:55:16 -0600 Subject: [PATCH 006/169] docs: 1.0 upgrade guide and documentation for the new behavior Phase 6 of the 1.0 preparation. - Add UPGRADING_1_0.md with a before/after for every breaking change, the changes that need no edit, framework and package support, and what is unchanged. Link it from the README, the docs landing page and the sidebar. - Tutorial: replace the batching section with "Batching and transactions", and add sections on reactive nested classes (PROXYABLE), snapshots stored in a store, and getters appearing as own fields on snapshots. - API reference: subscribe scope and registrations, shallowEqual rules, the devtools handle, PROXYABLE, withHistory restoration, transactions. - Architecture: a Transactions section, updated method binding and nested state notes, file tree and performance table. - Persist tutorial and architecture: per-field hydration, deferred saves and the version rule. History, collections, devtools, Solid, Svelte, subscribeKey and SSR pages updated to match. - CLAUDE.md: current layout, measured bundle size, transactions and other key facts, and the package-check command. Co-Authored-By: Claude Fable 5.2 --- CLAUDE.md | 40 ++-- README.md | 35 +-- website/content/docs/API_REFERENCE.md | 86 +++++-- website/content/docs/ARCHITECTURE.md | 52 +++-- website/content/docs/DEVTOOLS_TUTORIAL.md | 40 ++-- website/content/docs/HISTORY_TUTORIAL.md | 21 +- website/content/docs/PERSIST_ARCHITECTURE.md | 29 ++- website/content/docs/PERSIST_TUTORIAL.md | 29 ++- .../docs/REACTIVE_COLLECTIONS_TUTORIAL.md | 7 +- website/content/docs/REACT_SSR.md | 2 +- website/content/docs/SOLID.md | 18 +- .../content/docs/SUBSCRIBE_KEY_TUTORIAL.md | 2 +- website/content/docs/SVELTE.md | 2 +- website/content/docs/TUTORIAL.md | 70 ++++-- website/content/docs/UPGRADING_1_0.md | 219 ++++++++++++++++++ website/content/docs/index.md | 18 +- website/content/docs/meta.json | 1 + 17 files changed, 520 insertions(+), 151 deletions(-) create mode 100644 website/content/docs/UPGRADING_1_0.md diff --git a/CLAUDE.md b/CLAUDE.md index f6713039..55314340 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -4,31 +4,39 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co ## What This Library Is -`@codebelt/classy-store` is a class-based reactive state management library (~2.3 KB gzipped) for React, Vue, Svelte, Solid, and Angular. You define state as a plain TypeScript class, wrap it with `createClassyStore()`, and get a reactive proxy back. Class getters become automatically memoized computed values. ES6 Proxy intercepts mutations, batches them via `queueMicrotask`, and notifies framework-specific bindings via immutable snapshots with structural sharing. +`@codebelt/classy-store` is a class-based reactive state management library (core about 3.5 KB minified and gzipped; about 4.8 KB with the React hooks) for React, Vue, Svelte, Solid, and Angular. You define state as a plain TypeScript class, wrap it with `createClassyStore()`, and get a reactive proxy back. Class getters become automatically memoized computed values. ES6 Proxy intercepts mutations and notifies subscribers through immutable snapshots with structural sharing: framework bindings synchronously, ordinary subscribers batched via `queueMicrotask`. ## Monorepo Layout ``` packages/classy-store/src/ -├── core/core.ts # Layer 1: Write Proxy — createClassyStore(), subscribe() +├── index.ts # Main entry: createClassyStore, snapshot, subscribe, shallowEqual, PROXYABLE +├── storeRuntime.ts # Runtime shared by every entry and both module formats (#store-runtime) +├── types.ts # Public Snapshot, SubscribeOptions +├── core/core.ts # Layer 1: Write Proxy — createClassyStore(), subscribe(), transactions, computed getters +├── core/ownership.ts # StoreInternal: one node per object, parent links, detached subtrees +├── core/core.types.ts # DepEntry, ComputedEntry ├── snapshot/snapshot.ts # Layer 2: Immutable snapshots — snapshot(), structural sharing -├── types.ts # Snapshot, StoreInternal, DepEntry, ComputedEntry -├── index.ts # Main barrel: createClassyStore, snapshot, subscribe, shallowEqual ├── collections/collections.ts # ReactiveMap and ReactiveSet (array-backed Map/Set emulation) -├── collections/index.ts # Collections barrel: reactiveMap, reactiveSet, ReactiveMap, ReactiveSet +├── collections/index.ts # Collections entry: reactiveMap, reactiveSet, ReactiveMap, ReactiveSet ├── frameworks/ -│ ├── react/react.ts # Layer 3 (React): useClassyStore(), useLocalStore() via useSyncExternalStore -│ ├── vue/vue.ts # Vue: useClassyStore() → ShallowRef> (onUnmounted cleanup) +│ ├── react/react.ts # Layer 3 (React): client entry re-exporting the hooks +│ ├── react/server.ts # Server-safe entry: prepareStoreForHydration() +│ ├── react/hooks/ # useClassyStore, useLocalStore, useHistoryStatus, usePersistStatus +│ ├── react/utils/ # createStoreHook, tracking caches used by the auto-tracked hook +│ ├── vue/vue.ts # Vue: useClassyStore() → Ref> (effect-scope cleanup) │ ├── svelte/svelte.ts # Svelte: toSvelteStore() → ClassyReadable> -│ ├── solid/solid.ts # Solid: useClassyStore() → () => Snapshot signal (onCleanup) +│ ├── solid/solid.ts # Solid 2: useClassyStore() → () => Snapshot (owner cleanup) │ └── angular/angular.ts # Angular: injectClassyStore() → Signal> (DestroyRef) └── utils/ - ├── index.ts # Utils barrel: persist, devtools, subscribeKey, withHistory + ├── index.ts # Utils entry: persist, devtools, subscribeKey, withHistory ├── persist/persist.ts # persist() — storage, transforms, versioning, cross-tab sync, TTL ├── devtools/devtools.ts # devtools() — Redux DevTools integration, time-travel ├── history/history.ts # withHistory() — undo/redo via snapshot stack, pause/resume ├── subscribe-key/subscribe-key.ts # subscribeKey() — single-property subscription ├── equality/equality.ts # shallowEqual + ├── cloneSnapshot/ # Mutable copies of snapshots, used by persist and history + ├── utilityStatus/ # Status publisher behind the persist and history handles └── internal/internal.ts # isPlainObject, canProxy, findGetterDescriptor, PROXYABLE website/ # Fumadocs static site (Next.js) @@ -51,6 +59,7 @@ bun run test # Run all tests (Bun test runner, uses happy-dom for React bun run lint # Check with Biome linter bun run lint:fix # Auto-fix Biome lint issues bun run typecheck # TypeScript type check without emit +bun run check:package # Build, then publint + arethetypeswrong on the packed tarball bun run checkall # lint + test + typecheck (full CI check) bun run docs:dev # Start Fumadocs at http://localhost:3000 @@ -69,7 +78,7 @@ bun run typecheck # TypeScript type check without emit ### Test helper pattern -Because mutations are batched via `queueMicrotask`, tests must flush the microtask queue before asserting on subscriber calls: +Ordinary subscriptions are batched via `queueMicrotask`, so tests must flush the microtask queue before asserting on subscriber calls. A `{sync: true}` subscription can be asserted immediately: ```typescript const flush = () => new Promise((resolve) => setTimeout(resolve, 0)); @@ -86,7 +95,7 @@ it('notifies on mutation', async () => { ## Code Style -Enforced by Biome 2.4.0 (`biome.json` at repo root): +Enforced by Biome (`biome.json` at repo root; the version is pinned in the root `package.json`): - 2-space indentation, single quotes, no bracket spacing - `noUnusedImports` is an error @@ -95,10 +104,15 @@ Enforced by Biome 2.4.0 (`biome.json` at repo root): ## Key Technical Facts - **No arrow function methods:** Arrow function properties (`increment = () => {}`) have `this` lexically bound to the raw instance. `.bind()` is a no-op on arrow functions, so the GET trap cannot rebind `this` to the proxy. Mutations inside arrow functions bypass the SET trap entirely — no notifications, no reactivity. Always use prototype methods (`increment() {}`). -- **Batching:** mutations are coalesced via `queueMicrotask`. Multiple synchronous writes (including array `push` which triggers multiple SET traps) produce a single subscriber notification. +- **Batching:** ordinary subscribers are coalesced via `queueMicrotask`. Multiple synchronous writes (including array `push` which triggers multiple SET traps) produce a single notification. +- **Transactions:** `{sync: true}` subscribers, which is every framework binding, are notified once per direct write, and once per store method or array-method call, when the outermost call returns. Versions still bump on every write, so reads inside the call are current. Without this an in-place `sort` or `unshift` notifies once per moved element and each notification rebuilds the list snapshot. +- **Subscription scope:** `subscribe(node)` observes that node's subtree only. Each call is its own registration. +- **Snapshots are values:** a frozen snapshot assigned into a store is kept by reference and never proxied, including one read through React's tracking proxy. - **Internal state:** stored in a `WeakMap` — never on the user's object. Allows GC when a store is dereferenced. - **Non-proxyable types:** `Date`, `RegExp`, native `Map`, and native `Set` are treated as opaque values (internal slots can't be intercepted by Proxy). Use `reactiveMap()` and `reactiveSet()` for Map/Set semantics. Replace Date instances entirely to trigger updates. -- **Extending reactive types:** a class can opt into deep proxying by setting `static [PROXYABLE] = true` (the `PROXYABLE` symbol is exported from `utils/internal`). `ReactiveMap` and `ReactiveSet` use this. +- **Extending reactive types:** a class can opt into deep proxying by setting `static [PROXYABLE] = true` (the `PROXYABLE` symbol is exported from the main entry). `ReactiveMap` and `ReactiveSet` use this. +- **Collection identity:** reactive collections match members with `identityOf()`, which is the same for a raw object, its store proxy and every snapshot of it. Lookups scan the raw backing array except for tracked reads in a React component. +- **Typecheck with the package script:** run `bun run typecheck`, not `bunx tsc`; the latter can resolve a different TypeScript and miss errors. - **`persist()` exclusions:** getters (detected by walking the prototype chain with `Object.getOwnPropertyDescriptor`) and methods (`typeof value === 'function'`) are automatically excluded from persistence. Only own data properties are saved. - **Computed memoization:** two layers — the write proxy caches getter results keyed on dependency versions/values; the snapshot layer adds cross-snapshot caching using structural sharing reference equality. - **Structural sharing:** unchanged sub-trees reuse the previous frozen snapshot reference. This makes `Object.is` comparisons in selectors efficient without `shallowEqual`. diff --git a/README.md b/README.md index acb3c47e..9b4a1c18 100644 --- a/README.md +++ b/README.md @@ -12,13 +12,16 @@ Visit the **[Documentation Website](https://codebelt.github.io/classy-store/)** for tutorials, API reference, and examples. -## Upgrading to 0.11.0 +## Upgrading to 1.0 -Applications upgrading from 0.10.x can keep their existing public imports. For behavior changes and framework support, see the [0.11.0 release notes](https://codebelt.github.io/classy-store/docs/UPGRADING_0_11). +1.0 is the first stable release: the public API and its behavior now follow semantic versioning. Coming from 0.11.x, read the [1.0 upgrade guide](https://codebelt.github.io/classy-store/docs/UPGRADING_1_0). The changes most likely to need an edit are: -When upgrading from 0.7.x, replace persistence `unsubscribe()` with `dispose()`, handle rejected promises from explicit persistence operations, and import hydration preparation from `@codebelt/classy-store/react/server`. The `useHistoryStatus` and `usePersistStatus` hooks keep utility metadata reactive in React. +- `devtools(store)` returns a handle; call `handle.dispose()` instead of calling the result. +- Angular's `injectStore` is now `injectClassyStore`. +- `subscribe()` on a nested proxy observes only that proxy's subtree. +- `persist` ignores stored data whose `version` differs unless you provide `migrate`. -See the [0.8.0 upgrade guide](https://codebelt.github.io/classy-store/docs/UPGRADING_0_8) for the removal of `getVersion` and migration examples. If upgrading from 0.6.x or earlier, also read the [0.7.0 upgrade guide](https://codebelt.github.io/classy-store/docs/UPGRADING_0_7). +Coming from an older release, apply the earlier guides first: [0.11.0](https://codebelt.github.io/classy-store/docs/UPGRADING_0_11), [0.8.0](https://codebelt.github.io/classy-store/docs/UPGRADING_0_8) and [0.7.0](https://codebelt.github.io/classy-store/docs/UPGRADING_0_7). ## 🚀 Features @@ -76,7 +79,8 @@ store proxy and read render data through the hook. Nested plain objects, arrays, and the library's reactive collections support deep updates. Native `Date`, `Map`, `Set`, and other nested class instances remain opaque: -replace their property to notify subscribers. Snapshots freeze copied state, but +replace their property to notify subscribers. A class of your own can opt into deep +updates with `static [PROXYABLE] = true`. Snapshots freeze copied state, but retain opaque values by reference. Keep computed getters pure and based on store property reads; changes to time or external variables do not invalidate their cache. @@ -117,7 +121,7 @@ return ( ); ``` -Ordinary `subscribe(store, listener)` callbacks still batch in a microtask. React batches renders within event handlers, while selectors can run after each mutation. +Ordinary `subscribe(store, listener)` callbacks still batch in a microtask. A store method or an array operation such as `sort` is one transaction: React is notified once when it returns, however many fields it wrote. A write made outside a method notifies on its own, so keep loops of writes inside a store method. For server-rendered React apps, call `prepareStoreForHydration(store)` from `@codebelt/classy-store/react/server` on matching server/client stores before persistence starts. Delayed Suspense boundaries then hydrate from the original data and catch up to live state. See the [SSR guide](https://codebelt.github.io/classy-store/docs/REACT_SSR). @@ -144,8 +148,9 @@ for inputs, keyed lists, cleanup, and migration requirements. ## Solid 2 integration -The `/solid` adapter is **in preview** and targets **Solid 2.0.0-rc.18 only**; Solid 1 is no longer -supported. Pin `solid-js` and the browser renderer `@solidjs/web` to that exact +The `/solid` adapter is **in preview** while Solid 2 is in release candidates. It accepts +`solid-js@^2.0.0-rc.18` and is developed against `2.0.0-rc.23`; Solid 1 is not +supported. Keep `solid-js` and the browser renderer `@solidjs/web` on the same release candidate. `useClassyStore(store)` returns an immutable snapshot accessor and requires a live component or `createRoot()` owner for automatic cleanup. @@ -165,13 +170,13 @@ bun add @codebelt/classy-store Framework peers are optional; install only what your application uses. -| Framework | Supported peer range | -| --------------- | -------------------------------- | -| React | `^18.0.0 \|\| ^19.0.0` | -| Vue | `^3.2.0` | -| Svelte | `^4.0.0 \|\| ^5.0.0` | -| Angular | `^22.0.0` | -| Solid (preview) | `2.0.0-rc.18` (exact prerelease) | +| Framework | Supported peer range | +| --------------- | ----------------------------------- | +| React | `^18.0.0 \|\| ^19.0.0` | +| Vue | `^3.2.0` | +| Svelte | `^4.0.0 \|\| ^5.0.0` | +| Angular | `^22.0.0` | +| Solid (preview) | `^2.0.0-rc.18` (release candidates) | Use matching `react` and `react-dom` versions for React applications. These ranges exclude untested future majors. Development dependency pins are separate diff --git a/website/content/docs/API_REFERENCE.md b/website/content/docs/API_REFERENCE.md index 8d673ad3..a1f12c6c 100644 --- a/website/content/docs/API_REFERENCE.md +++ b/website/content/docs/API_REFERENCE.md @@ -27,17 +27,17 @@ persistence handle. They do not create those handles or subscribe to store data. Import from the entry that owns the API. Core, collections, and utilities do not depend on React. -| Import path | Runtime exports | Public types | -| ------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `@codebelt/classy-store` | `createClassyStore`, `snapshot`, `subscribe`, `shallowEqual` | `Snapshot`, `SubscribeOptions` | -| `@codebelt/classy-store/react` | `useClassyStore`, `useLocalStore`, `createStoreHook`, `useHistoryStatus`, `usePersistStatus` | `UseClassyStoreSelectorOptions` | -| `@codebelt/classy-store/react/server` | `prepareStoreForHydration` | — | -| `@codebelt/classy-store/collections` | `reactiveMap`, `reactiveSet` | `ReactiveMap`, `ReactiveSet` | -| `@codebelt/classy-store/utils` | `persist`, `withHistory`, `subscribeKey`, `devtools` | `PersistOptions`, `PersistHandle`, `PersistStatus`, `PersistOperation`, `PropertyTransform`, `StorageAdapter`, `HistoryOptions`, `HistoryHandle`, `HistoryStatus`, `DevtoolsOptions`, `SubscribeOptions` | -| `@codebelt/classy-store/vue` | `useClassyStore` | — | -| `@codebelt/classy-store/svelte` | `toSvelteStore` | `ClassyReadable` | -| `@codebelt/classy-store/solid` | `useClassyStore` | — | -| `@codebelt/classy-store/angular` | `injectClassyStore` | — | +| Import path | Runtime exports | Public types | +| ------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `@codebelt/classy-store` | `createClassyStore`, `snapshot`, `subscribe`, `shallowEqual`, `PROXYABLE` | `Snapshot`, `SubscribeOptions` | +| `@codebelt/classy-store/react` | `useClassyStore`, `useLocalStore`, `createStoreHook`, `useHistoryStatus`, `usePersistStatus` | `UseClassyStoreSelectorOptions` | +| `@codebelt/classy-store/react/server` | `prepareStoreForHydration` | — | +| `@codebelt/classy-store/collections` | `reactiveMap`, `reactiveSet` | `ReactiveMap`, `ReactiveSet` | +| `@codebelt/classy-store/utils` | `persist`, `withHistory`, `subscribeKey`, `devtools` | `PersistOptions`, `PersistHandle`, `PersistStatus`, `PersistOperation`, `PropertyTransform`, `StorageAdapter`, `HistoryOptions`, `HistoryHandle`, `HistoryStatus`, `DevtoolsOptions`, `DevtoolsHandle`, `SubscribeOptions` | +| `@codebelt/classy-store/vue` | `useClassyStore` | — | +| `@codebelt/classy-store/svelte` | `toSvelteStore` | `ClassyReadable` | +| `@codebelt/classy-store/solid` | `useClassyStore` | — | +| `@codebelt/classy-store/angular` | `injectClassyStore` | — | ESM and CommonJS callers using the same package installation can pass stores between them. For example, a utility loaded with `require('@codebelt/classy-store/utils')` @@ -55,13 +55,13 @@ context. React's selector and auto-tracking modes are specific to `/react`. Read the [Svelte guide](./SVELTE.md) or [Vue guide](./VUE.md) for input handling, timing, and cleanup. -Solid's `useClassyStore(store)` targets **Solid 2.0.0-rc.18 only**. It requires a +Solid's `useClassyStore(store)` is in preview and accepts the Solid 2 release candidates from `2.0.0-rc.18` (`^2.0.0-rc.18`). It requires a live component or `createRoot()` owner and disposes its subscription with that owner. Store notifications reach its signal synchronously; Solid 2 retains its native batching. Call Solid's `flush()` when imperative code needs current computed values or DOM. The adapter does not call it automatically, and ordinary -core subscriptions stay batched. See the [Solid 2 guide](./SOLID.md) for pinned -packages, inputs, keyed lists, and migration from Solid 1. +core subscriptions stay batched. See the [Solid 2 guide](./SOLID.md) for supported +versions, inputs, keyed lists, and migration from Solid 1. Angular's `injectClassyStore(store)` supports **all stable Angular 22 releases** (`^22.0.0`). It requires a live @@ -74,15 +74,16 @@ See the [Angular guide](./ANGULAR.md) for inputs, keyed lists, and migration. ### `createClassyStore(instance)` -Wraps a class instance or plain object in a reactive proxy. Passing the same instance or its store proxy again returns the existing proxy. Mutations notify framework adapters synchronously. Ordinary subscribers receive a batched notification in a microtask. +Wraps a class instance or plain object in a reactive proxy. Passing the same instance or its store proxy again returns the existing proxy. Mutations notify framework adapters synchronously: once per direct write, and once per store method or array operation. Ordinary subscribers receive a batched notification in a microtask. ```typescript const myStore = createClassyStore(new MyClass()); ``` -- **Prototype methods** are automatically bound so `this` mutations go through the proxy; arrow-function fields cannot be rebound +- **Prototype methods** are automatically bound so `this` mutations go through the proxy; arrow-function fields cannot be rebound. Each call is a [transaction](./TUTORIAL.md#batching-and-transactions): synchronous subscribers are notified once, after the outermost call returns - **Getters** cache results from the store properties they read. Initialize optional fields used in getters, including fields whose initial value is `undefined`. A live getter that reads an absent field recomputes on subsequent reads -- **Nested plain objects, arrays, and reactive collections** share a single proxy per object. Retained rows stay reactive after reordering or filtering. A separately created store embedded by its proxy stays reactive too. Ordinary nested class instances remain opaque +- **Nested plain objects, arrays, and reactive collections** share a single proxy per object. Retained rows stay reactive after reordering or filtering. A separately created store embedded by its proxy stays reactive too. Ordinary nested class instances remain opaque; a class opts in with [`static [PROXYABLE] = true`](#proxyable) +- **Snapshots** assigned into a store are kept by reference as immutable values and are not proxied Keep the returned proxy as the mutable store. Writes to the original instance or raw nested objects bypass notifications and snapshot invalidation. See the @@ -151,7 +152,7 @@ return ( React subscriptions always notify synchronously, including selector, auto-tracked, and bound hooks. There is no React `sync` option. This lets React observe controlled-field changes during the input event and preserve caret position. Ordinary `subscribe()` callbacks remain batched. -When upgrading from 0.6.x, remove the React hook's `sync` option and imports of `UseClassyStoreOptions`. Selector options still support `isEqual`. Selectors can observe each write to a store even when React batches the resulting renders. [0.7.0 upgrade guide](./UPGRADING_0_7.md) +When upgrading from 0.6.x, remove the React hook's `sync` option and imports of `UseClassyStoreOptions`. Selector options still support `isEqual`. Selectors run after each direct write to a store and once after each store method or array operation, even when React batches the resulting renders. [0.7.0 upgrade guide](./UPGRADING_0_7.md) ### `useHistoryStatus(history)` @@ -321,9 +322,11 @@ const snap = snapshot(myStore); ### `subscribe(store, callback, options?)` -Returns an unsubscribe function. By default, consecutive writes before the scheduled microtask runs produce one callback during that microtask. Pass `{sync: true}` to notify immediately after each mutation. +Returns an unsubscribe function. By default, consecutive writes before the scheduled microtask runs produce one callback during that microtask. Pass `{sync: true}` to be notified in the same call stack: after each direct write, and once after each store method or array operation. -A subscription to a store created by `createClassyStore()` observes its own subtree, even when another store contains it. A subscription to a child proxy also observes siblings within its nearest owning stores. Moving that child updates its subscription scope automatically. +A subscription observes the subtree of the proxy it is given. Pass a store to observe all of it, or a nested proxy such as `store.user` to observe only that object and what it contains; a change to a sibling field does not notify it. The subscription follows the object itself, so it keeps working when the object moves to another field or another store. + +Each call is its own registration. Subscribing the same callback twice produces two notifications per change, and each returned function removes only its own registration. ```typescript import {subscribe} from '@codebelt/classy-store'; @@ -347,12 +350,39 @@ unsubSync(); ### `shallowEqual(a, b)` -Use `shallowEqual` for selectors returning arrays or plain records with enumerable data fields. It compares primitives with `Object.is` and arrays by length, occupied indices, and element values. A hole differs from an explicit `undefined` element. Comparing an array with a record returns `false`. +Use `shallowEqual` for selectors that return a new array, record, or collection on each call. It compares primitives with `Object.is` and arrays by length, occupied indices, and element values. A hole differs from an explicit `undefined` element. + +Two values with different prototypes are never equal, so an array never equals a record and a class instance never equals a plain object with the same fields. Within one kind: -For records it compares enumerable string-key counts, then checks each key from the first record for own membership and an `Object.is`-equal value in the second. If keys differ in enumerability, the result can depend on argument order. Symbol keys, prototypes, and the contents of native maps, sets, and dates fall outside this comparison. +- **Records and class instances** compare enumerable string-key counts, then each key from the first for own membership and an `Object.is`-equal value in the second. If keys differ in enumerability, the result can depend on argument order. Symbol keys are not compared. +- **`Date`** values are equal when they hold the same instant. +- **`Map`** and **`Set`** are equal when they have the same size and members; map values are compared with `Object.is`. +- **Any other object with no enumerable keys**, such as a `RegExp`, an `Error` or a `Promise`, is equal only to itself, because its state is not visible to the comparison. [Compare selectors with shallowEqual →](/examples/shallow-equal/) +### `PROXYABLE` + +A symbol that lets a class of your own be deeply reactive when its instances are nested in a store. Without it, a nested class instance is an opaque value, like a `Date`. + +```typescript +import {createClassyStore, PROXYABLE} from '@codebelt/classy-store'; + +class Todo { + static [PROXYABLE] = true; + done = false; + + toggle() { + this.done = !this.done; + } +} + +const store = createClassyStore({todos: [new Todo()]}); +store.todos[0].toggle(); // notifies subscribers of `store` +``` + +Instances are proxied like plain objects, their getters are memoized, and their snapshots keep the class prototype. The class passed to `createClassyStore()` itself needs no marker. [Reactive nested classes](./TUTORIAL.md#reactive-nested-classes) + ### `reactiveMap(initial?)` Creates a reactive Map-like collection backed by a plain array. Use inside a `createClassyStore()` for full reactivity. Import from `@codebelt/classy-store/collections`. @@ -481,9 +511,14 @@ Connect a store to Redux DevTools for state inspection and time-travel debugging ```typescript import {devtools} from '@codebelt/classy-store/utils'; -const disconnect = devtools(myStore, {name: 'MyStore'}); +const connection = devtools(myStore, {name: 'MyStore'}); + +// When the connection is no longer needed: +connection.dispose(); ``` +Returns a `DevtoolsHandle`. `dispose()` disconnects from the extension and stops observing the store; calling it again does nothing. When the extension is missing or `enabled` is `false`, the handle is inert. + > See the [DevTools Tutorial](./DEVTOOLS_TUTORIAL.md). ### `subscribeKey(store, key, callback, options?)` @@ -502,7 +537,7 @@ const unsub = subscribeKey(store, 'theme', (value, prev) => { ### `withHistory(store, options?)` -Adds undo and redo with a bounded history of snapshots. Recording uses a batched subscription, so consecutive writes in the same turn produce one entry. +Adds undo and redo with a bounded history of snapshots. Recording uses a batched subscription, so consecutive writes in the same turn produce one entry. `undo()` first records an edit that has not been recorded yet, so it always steps back over the latest change. ```typescript import {createClassyStore} from '@codebelt/classy-store'; @@ -511,12 +546,13 @@ import {withHistory} from '@codebelt/classy-store/utils'; const store = createClassyStore({count: 0}); const history = withHistory(store, {limit: 100}); store.count = 1; -await Promise.resolve(); // let the recording subscription run history.undo(); // count is 0 history.redo(); // count is 1 history.dispose(); ``` +Restoring an entry makes the store's data fields match it: changed fields are replaced with mutable copies, top-level fields the entry does not have are deleted, and unchanged fields are left untouched, so selectors reading them do not re-run. + > See the [withHistory Tutorial](./HISTORY_TUTORIAL.md). ## React Compiler compatibility diff --git a/website/content/docs/ARCHITECTURE.md b/website/content/docs/ARCHITECTURE.md index 5c182a64..b1fbfb23 100644 --- a/website/content/docs/ARCHITECTURE.md +++ b/website/content/docs/ARCHITECTURE.md @@ -82,6 +82,9 @@ packages/classy-store/ │ │ ├── core.types.ts # Computed dependency types │ │ ├── ownership.ts # Shared nodes, parent links, detached subtrees │ │ ├── core.computed.test.ts # Write-proxy getter memoization +│ │ ├── core.transactions.test.ts # One notification per method or array call +│ │ ├── core.snapshotValues.test.ts # Snapshots kept in a store; identity helpers +│ │ ├── core.fuzz.test.ts # Seeded randomized differential test │ │ └── core.ownership.test.ts # Child ownership and subscription cleanup │ ├── snapshot/ │ │ ├── snapshot.ts # Immutable snapshots and structural sharing @@ -103,6 +106,7 @@ packages/classy-store/ │ │ │ ├── createStoreHook/ # Bound store hook factory │ │ │ ├── hydrationSnapshots/ # Shared captured snapshots, held by weak keys │ │ │ ├── snapshotTargetCache/ # Shared tracking targets +│ │ │ ├── trackedProxyCache/ # Tells the store which snapshot a tracking proxy wraps │ │ │ └── trackingReadMap/ # Render-local and committed dependency reads │ │ ├── testHelpers/ # React fixtures │ │ └── react.*.test.tsx # Integration tests grouped by behavior @@ -197,8 +201,8 @@ child versions identify edits to shared rows made while it was detached. **GET trap (priority order):** 1. **Memoized getter detection** — walk prototype chain with `Object.getOwnPropertyDescriptor`. If a getter is found, call `evaluateComputed()` which checks dependency validity and returns the cached result or re-evaluates with dependency tracking. -2. **Method binding** — bind function values to the proxy so `this.count++` in methods goes through the SET trap. Object methods reuse a cached binding. Array method reads create a fresh binding. -3. **Nested state** — if `canProxy()` accepts it (plain object, array, or a class such as the library's reactive collections using the internal opt-in), return its canonical child proxy. Record a dependency if a getter is currently being tracked. +2. **Method binding** — wrap function values so they run with the proxy as `this`, which sends `this.count++` in methods through the SET trap, and so each call is a [transaction](#transactions). Object methods reuse a cached wrapper. Array method reads create a fresh one. +3. **Nested state** — if `canProxy()` accepts it (plain object, array, or a class that opts in with the exported `PROXYABLE` symbol, as the library's reactive collections do), return its canonical child proxy. A frozen snapshot is never proxied: it is returned as the immutable value it is. Record a dependency if a getter is currently being tracked. 4. **Primitives and opaque values** — return as-is and record a value dependency when a getter is being tracked. **DELETE trap:** Attempt `Reflect.deleteProperty` first. On success, detach the child, clear the bound-method cache, bump versions, and notify. A failed deletion preserves the connection. @@ -215,7 +219,21 @@ store.items.push('a') // initially empty array → flushNotifications delivers the batched callbacks ``` -Subscribers opt into immediate timing with `{sync: true}`. Each mutation delivers once per matching registration after version propagation. Two successive mutations deliver twice. React's store-reading hooks use this timing so `useSyncExternalStore` can observe a controlled input's new value during its event. Selectors can run after each mutation, and React schedules the renders. +Subscribers opt into immediate timing with `{sync: true}`. A direct write delivers once per matching registration after version propagation; two successive direct writes deliver twice. React's store-reading hooks use this timing so `useSyncExternalStore` can observe a controlled input's new value during its event, and React schedules the renders. + +### Transactions + +A call to a store method, or to any array method on store state, runs as a transaction. The GET trap returns each function wrapped so that the call increments a depth counter. While the counter is above zero, a mutation still bumps every owner's version at once, so reads inside the call are current, but owners with synchronous listeners are collected in a pending set instead of being notified. When the outermost call returns or throws, the set is delivered once. + +``` +store.items.unshift(row) // 5,000 rows, one mounted consumer + → depth 0 → 1 + → 5,001 SET traps, each bumping owner versions and adding owners to pendingSync + → depth 1 → 0: deliver synchronous listeners once + → the consumer reads one new snapshot of the list +``` + +Without this, each of those writes notified the consumer, and each notification rebuilt the list snapshot: quadratic work for one call. Batched listeners are unaffected; they were already coalesced by the microtask. Writes after an `await` in an async method happen after its call returned, so they are outside the transaction. The Svelte adapter also uses synchronous notifications to satisfy the readable store contract. It subscribes before delivering the initial snapshot so mutations @@ -233,7 +251,7 @@ with `ownedWrite: true`, allowing external store notifications while an owner is active. Solid schedules its own reactive work; the adapter never calls `flush()`. A live owner is required before subscribing. Owner cleanup marks delivery inactive before removing the listener, and callbacks also check disposal during notification. -The adapter targets the exact `2.0.0-rc.18` prerelease; see the [Solid guide](./SOLID.md). +The adapter accepts Solid `^2.0.0-rc.18` and is developed against `2.0.0-rc.23`; see the [Solid guide](./SOLID.md). The Angular adapter also uses synchronous notifications, keeping its readonly snapshot signal and dependent computed reads current. Angular schedules its own @@ -575,16 +593,16 @@ No special handling is needed — three mechanisms in the existing design make i ## Performance Characteristics -| Operation | Complexity | Notes | -| ---------------------------- | ------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| Data property read | Prototype lookup and proxy lookup | Getter detection walks the prototype chain and existing child proxies are reused | -| Property write | Depends on the changed ownership graph | Includes indexing new subtrees, detaching old ones, refreshing subscription paths, and visiting owners | -| Notification | Visited owners, scoped registrations, and callback work | Synchronous listeners run per mutation. Snapshot, selector, and render costs are additional | -| Getter (cache hit) | Depends on recorded dependencies | Nested computed dependencies are validated recursively | -| Getter (cache miss) | Validation plus getter execution | A stale entry may require dependency checks before the getter runs | -| Snapshot (cache hit) | O(1) for an active node | A detached subtree can first reconnect child links and compare saved versions | -| Snapshot (cache miss) | Proportional to visited fields/elements | Rebuilds changed containers and scans their entries; unchanged child snapshots are reused | -| Snapshot getter (same snap) | O(1) | Per-snapshot cache hit | -| Snapshot getter (cross-snap) | Depends on the dependency chain | Each direct read is compared with `Object.is`. Reading another getter can validate its dependencies or run its body | -| Selector equality | O(1) for primitives | `Object.is` check | -| Auto-track diff | Depends on tracked operations | Nested reads, enumeration, and whole-node comparisons can require more work | +| Operation | Complexity | Notes | +| ---------------------------- | --------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | +| Data property read | Prototype lookup and proxy lookup | Getter detection walks the prototype chain and existing child proxies are reused | +| Property write | Depends on the changed ownership graph | Includes indexing new subtrees, detaching old ones, and visiting owners | +| Notification | Visited owners and callback work | Synchronous listeners run once per direct write and once per method or array call. Snapshot, selector, and render costs are additional | +| Getter (cache hit) | Depends on recorded dependencies | Nested computed dependencies are validated recursively | +| Getter (cache miss) | Validation plus getter execution | A stale entry may require dependency checks before the getter runs | +| Snapshot (cache hit) | O(1) for an active node | A detached subtree can first reconnect child links and compare saved versions | +| Snapshot (cache miss) | Proportional to visited fields/elements | Rebuilds changed containers and scans their entries; unchanged child snapshots are reused | +| Snapshot getter (same snap) | O(1) | Per-snapshot cache hit | +| Snapshot getter (cross-snap) | Depends on the dependency chain | Each direct read is compared with `Object.is`. Reading another getter can validate its dependencies or run its body | +| Selector equality | O(1) for primitives | `Object.is` check | +| Auto-track diff | Depends on tracked operations | Nested reads, enumeration, and whole-node comparisons can require more work | diff --git a/website/content/docs/DEVTOOLS_TUTORIAL.md b/website/content/docs/DEVTOOLS_TUTORIAL.md index 16dfdd0c..0a311444 100644 --- a/website/content/docs/DEVTOOLS_TUTORIAL.md +++ b/website/content/docs/DEVTOOLS_TUTORIAL.md @@ -51,7 +51,7 @@ export const counterStore = createClassyStore(new CounterStore()); ```ts import {devtools} from '@codebelt/classy-store/utils'; -const disconnect = devtools(counterStore, {name: 'CounterStore'}); +const connection = devtools(counterStore, {name: 'CounterStore'}); ``` Open the Redux DevTools panel in your browser. Select `CounterStore` to inspect the initial snapshot, including `count: 0`, `step: 1`, and the computed `doubled` getter. @@ -82,7 +82,7 @@ Use a state/action jump in the DevTools timeline. The utility assigns the parsed ### 5. Disconnect when done ```ts -disconnect(); +connection.dispose(); ``` After disconnecting, mutations are no longer sent to DevTools and time-travel messages are ignored. @@ -98,14 +98,14 @@ function devtools( ### Options -| Option | Type | Default | Description | -| --------- | --------- | --------------- | ------------------------------------------ | -| `name` | `string` | `'ClassyStore'` | Display name in the DevTools panel | -| `enabled` | `boolean` | `true` | Set to `false` to disable (returns a noop) | +| Option | Type | Default | Description | +| --------- | --------- | --------------- | ---------------------------------------- | +| `name` | `string` | `'ClassyStore'` | Display name in the DevTools panel | +| `enabled` | `boolean` | `true` | Set to `false` to disable (inert handle) | ### Return value -A cleanup function `() => void` that removes the store subscription and DevTools message listener. It does not call an extension-level disconnect API or clear the panel's recorded history. +A `DevtoolsHandle`, the same shape of handle that `persist()` and `withHistory()` return. Its `dispose()` method removes the store subscription and DevTools message listener; calling it again does nothing. It does not call an extension-level disconnect API or clear the panel's recorded history. ## How It Works @@ -147,20 +147,20 @@ devtools(counterStore, { }); ``` -When `enabled` is `false`, `devtools()` returns a noop immediately. No DevTools connection or ongoing subscription is created. `import.meta.env.DEV` is a Vite example; use your application's build-time development flag in other environments. +When `enabled` is `false`, `devtools()` returns an inert handle immediately. No DevTools connection or ongoing subscription is created. `import.meta.env.DEV` is a Vite example; use your application's build-time development flag in other environments. ### Conditional connection Connect DevTools only when the extension is available: ```ts -const disconnect = devtools(counterStore, {name: 'CounterStore'}); +const connection = devtools(counterStore, {name: 'CounterStore'}); -// If the extension isn't installed, `disconnect` is a noop. +// If the extension isn't installed, `connection.dispose()` does nothing. // No errors, no warnings — the store works normally. ``` -`devtools()` checks for `window.__REDUX_DEVTOOLS_EXTENSION__` internally. If it's not available (missing extension, SSR, Node.js), it returns a noop without throwing. +`devtools()` checks for `window.__REDUX_DEVTOOLS_EXTENSION__` internally. If it's not available (missing extension, SSR, Node.js), it returns an inert handle without throwing. The library reads that global through its own type and declares nothing on `Window`, so it cannot clash with other DevTools typings in your project. ### Late disposal on unmount (React) @@ -170,8 +170,8 @@ import {devtools} from '@codebelt/classy-store/utils'; function App() { useEffect(() => { - const disconnect = devtools(counterStore, {name: 'CounterStore'}); - return () => disconnect(); + const connection = devtools(counterStore, {name: 'CounterStore'}); + return () => connection.dispose(); }, []); return ; @@ -211,10 +211,10 @@ storage restoration. The supported dispatch commands are `JUMP_TO_STATE` and ## Quick Reference -| What you want | How to do it | -| --------------------- | ----------------------------------------------------- | -| Connect a store | `devtools(store, {name: 'MyStore'})` | -| Disconnect | `const dispose = devtools(...); dispose()` | -| Disable in production | `enabled: import.meta.env.DEV` | -| Multiple stores | Call `devtools()` once per store with unique names | -| Use without extension | Works safely — returns a noop if extension is missing | +| What you want | How to do it | +| --------------------- | -------------------------------------------------------------- | +| Connect a store | `devtools(store, {name: 'MyStore'})` | +| Disconnect | `const connection = devtools(...); connection.dispose()` | +| Disable in production | `enabled: import.meta.env.DEV` | +| Multiple stores | Call `devtools()` once per store with unique names | +| Use without extension | Works safely — returns an inert handle if extension is missing | diff --git a/website/content/docs/HISTORY_TUTORIAL.md b/website/content/docs/HISTORY_TUTORIAL.md index bbbfe4be..dba2c912 100644 --- a/website/content/docs/HISTORY_TUTORIAL.md +++ b/website/content/docs/HISTORY_TUTORIAL.md @@ -151,19 +151,20 @@ function withHistory( 1. **Init:** captures an initial snapshot as `history[0]` and sets `pointer = 0`. 2. **Record:** on each `subscribe()` callback (when not paused), captures a new snapshot, truncates any redo entries after the current pointer, pushes the snapshot, and enforces the limit by shifting from the front. -3. **Undo:** decrements the pointer, suppresses recording during restoration, and applies `history[pointer]` back to the store proxy (skipping getters and methods). +3. **Undo:** if the store holds an edit that no notification has recorded yet, records it first. Then decrements the pointer, suppresses recording during restoration, and applies `history[pointer]` back to the store proxy (skipping getters and methods). 4. **Redo:** increments the pointer and restores `history[pointer]` with the same recording suppression. -5. **State restoration:** iterates the snapshot's own enumerable string keys. It skips keys that resolve to a getter or function on the live store, then assigns mutable copies of the remaining values through the proxy. Subscribers observe the resulting mutations. +5. **State restoration:** makes the store's data fields match the entry. Keys that resolve to a getter or function on the live store are skipped. A top-level field the entry does not have is deleted. A field whose current snapshot is the entry's own snapshot is left untouched, which keeps its identity and leaves selectors that read it quiet. Every other field is assigned a mutable copy through the proxy. Subscribers observe the resulting mutations. Undo and redo themselves do **not** create new history entries. Restoration does not change the explicit `isPaused` status set by `pause()` and `resume()`. -Restoration assigns snapshot fields back as mutable copies; it does not delete -top-level keys absent from the restored snapshot. Prefer a stable store shape, -and keep dynamically keyed data inside a declared object field. Opaque snapshot -leaves (for example native `Map`, `Set`, and `Date`) retain references, so use -replacement updates or reactive collections when those values need undo support. +Opaque snapshot leaves (for example native `Map`, `Set`, and `Date`) retain +references, so use replacement updates or reactive collections when those values +need undo support. -Wait for the batched notification before programmatically undoing a new edit. +Recording is batched, but you do not need to wait for it: calling `undo()` in the +same tick as an edit records that edit first and then steps back over it, and +`redo()` returns to it. While history is paused, edits are not recorded this way +either. After undo/redo, allow the restoration microtask to finish before making another edit that must be recorded. Separate user events naturally provide that boundary. @@ -343,14 +344,14 @@ import {devtools, withHistory} from '@codebelt/classy-store/utils'; const store = createClassyStore(new MyStore()); -const disconnect = devtools(store, {name: 'MyStore'}); +const connection = devtools(store, {name: 'MyStore'}); const history = withHistory(store); // DevTools receives batched updates, including undo/redo restores. // A DevTools jump mutates the same store and can create a history entry. // When the owner is torn down: -disconnect(); +connection.dispose(); history.dispose(); ``` diff --git a/website/content/docs/PERSIST_ARCHITECTURE.md b/website/content/docs/PERSIST_ARCHITECTURE.md index 6e9c1df0..a7decb3b 100644 --- a/website/content/docs/PERSIST_ARCHITECTURE.md +++ b/website/content/docs/PERSIST_ARCHITECTURE.md @@ -77,6 +77,8 @@ Each `persist()` call creates a closure with the following internal state: | `debounceTimer` | `ReturnType \| null` | Active debounce timer (cancelled on save/clear/dispose or accepted hydration) | | `storageQueue` | `Promise \| undefined` | Orders this handle's writes/removals and lets reads wait for prior operations | | `hydrationRequest` | `number` | Rejects read results superseded by newer requests or storage events | +| `reading` | `number` | Reads in flight; background saves wait while it is above zero | +| `saveAfterRead` | `boolean` | A local edit asked to be saved during a read; written once the read settles | | `skipAutoSaveVersion` | `number \| undefined` | Skips a restored or already scheduled revision | | `clearedVersion` | `number \| undefined` | Suppresses writes through the last clear, including remaining restore assignments | | `hydratedFlag` | `boolean` | Synchronous hydration status | @@ -157,10 +159,20 @@ Triggered in three scenarios: All three call the same `applyPersistedState(raw)` function: Async reads first wait for prior writes/removals. They capture a request number -and the store version, and only apply their result if both are still current and -the handle remains active. A newer read/save/clear/storage event changes the -request number; a local edit changes the store version. Obsolete results and -read errors are ignored. A restore records the revision attributable to its direct field assignments. +and a baseline snapshot of the store, and apply their result only if the request +is still current and the handle remains active. A newer read, an explicit +save/clear, or a storage event changes the request number. Obsolete results and +read errors are ignored. + +A local edit does not make a read obsolete. When the result arrives, each pending +field is compared with the baseline snapshot: a field whose presence or snapshot +identity changed was edited locally, including by a nested edit, and keeps its +local value; the others are restored. While any read is in flight, background +saves are deferred (`saveAfterRead`), so an edit cannot replace the stored record +with defaults before the read restores it. When the last read settles, one save +writes the merged state. `save()` and `clear()` cancel that deferred save. + +A restore records the revision attributable to its direct field assignments. The batched save skips that revision. Additional writes by synchronous or batched subscribers advance the revision and are saved. If a synchronous subscriber edits a pending top-level field, a snapshot comparison detects changes to its presence or value, including nested edits. The restore skips that field and continues applying the others. @@ -172,16 +184,17 @@ batched subscribers advance the revision and are saved. If a synchronous subscri set expiredFlag = true if clearOnExpire → storage.removeItem(name) return (skip hydration) -4. if envelope.version !== options.version AND migrate exists: - state = migrate(state, envelope.version) +4. if the stored version (0 when absent) !== options.version: + if no migrate → return without applying (stored data from another version is ignored) + state = migrate(state, storedVersion) 5. for each stored state key: if transform exists → state[key] = transform.deserialize(state[key]) -6. For a custom merge, build currentState from the baseline snapshot (only propKeys) +6. For a custom merge, build currentState from the store's current snapshot (only propKeys) 7. Apply merge strategy: 'shallow': apply the stored fields only custom function: merge(persistedState, currentState) 8. for each key in propKeys: - if key is present in mergedState and still pending → proxy[key] = cloneSnapshotValue(mergedState[key]) + if key is present in mergedState and unchanged since the baseline → proxy[key] = cloneSnapshotValue(mergedState[key]) (goes through SET trap → reactivity → batched notification) 9. Initial/manual read completion marks hydratedFlag and resolves hydrated. Storage-event application alone does not mark hydration settled. diff --git a/website/content/docs/PERSIST_TUTORIAL.md b/website/content/docs/PERSIST_TUTORIAL.md index 51e297f6..63a19fa0 100644 --- a/website/content/docs/PERSIST_TUTORIAL.md +++ b/website/content/docs/PERSIST_TUTORIAL.md @@ -283,10 +283,20 @@ state when requested and resolves after that write completes; a failed write reports through `onError` and does not block later writes. `rehydrate()` waits for writes/removals already requested through that handle. -If another read, save, clear, accepted storage event, or local mutation supersedes -an in-flight read, its result is ignored. In particular, typing while initial -async hydration is pending keeps the newer local state. An ignored read still -settles its promise; hydration completion does not guarantee that stored data won. +If another read, an explicit `save()` or `clear()`, or an accepted storage event +supersedes an in-flight read, its result is ignored. An ignored read still settles +its promise. + +A local edit does not supersede a read. Stored data is restored field by field: +a field you edited while the read was in flight keeps your newer value, including +when the edit was nested inside it, and every other stored field is still +restored. Typing into one field during a slow initial hydration therefore keeps +what you typed without losing the rest of the saved state. + +Background saves wait for the read as well. An edit made while the read is pending +is saved once the read settles, together with the fields it restored, so it can +never replace the stored record with default values first. Hydration completion +still does not guarantee that every stored field won. `clear()` cancels pending auto-saves and removes stored data after earlier issued writes finish. Later edits can persist again. `dispose()` skips queued writes @@ -442,9 +452,12 @@ persist(todoStore, { ``` Migration runs only when stored and configured versions differ. Without a -`migrate` callback, a version mismatch does not reject the payload. Validate the -versions and shapes your application accepts. Migration and hydration do not -automatically rewrite storage; a later save writes the configured version. +`migrate` callback, stored data from another version is ignored: the store keeps +its current state and no error is reported. Raising `version` without providing +`migrate` is therefore how you discard an old format. A stored record with no +`version` field counts as version `0`. Validate the versions and shapes your +`migrate` accepts. Migration and hydration do not automatically rewrite storage; +a later save writes the configured version. **Merge Strategies** @@ -568,7 +581,7 @@ try { An active handle reports failures through `onError` and status before rejecting with the original error. `PersistOperation` identifies the failing step. Reading storage uses `'read'`. Decoding JSON, deserializing properties, migrating, merging, and applying restored fields use `'parse'`. Serializing properties, encoding JSON, and writing storage use `'write'`. Removing data uses `'remove'`. Later queued saves can still run after a failure. `rehydrate()` also waits for expired-data removal when `clearOnExpire` is enabled and rejects if that removal fails. -An obsolete read superseded by a local edit or newer request is still ignored. Calls on a disposed handle reject; explicit queued writes cancelled by disposal also reject without invoking the adapter. Disposal errors do not invoke `onError` or publish more status. +An obsolete read superseded by a newer request, an explicit save or a clear is still ignored. Calls on a disposed handle reject; explicit queued writes cancelled by disposal also reject without invoking the adapter. Disposal errors do not invoke `onError` or publish more status. Handle rejected promises in DOM event handlers, for example `onClick={() => { void handle.save().catch(showError); }}`. Use `try`/`catch` inside an async handler when the UI also needs to show success. diff --git a/website/content/docs/REACTIVE_COLLECTIONS_TUTORIAL.md b/website/content/docs/REACTIVE_COLLECTIONS_TUTORIAL.md index 43175ac4..5c3dcf75 100644 --- a/website/content/docs/REACTIVE_COLLECTIONS_TUTORIAL.md +++ b/website/content/docs/REACTIVE_COLLECTIONS_TUTORIAL.md @@ -16,9 +16,10 @@ arrays internally and expose Map-like and Set-like methods. They are not native ## Collection behavior -- Reading `.size` takes constant time. Looking up, inserting, replacing, or deleting an entry can scan the backing array. Passing validated entries or values to the factory deduplicates the initial iterable in one pass. -- Prefer primitive map keys and set values. Objects read through a store can be proxied, and snapshots copy supported objects; their identity may differ from the original input object. -- Lookup methods use `Object.is`, which distinguishes `0` and `-0`. Initial iterables are deduplicated with native `Map`/`Set` semantics, which treat those two values as equal. Avoid depending on signed-zero keys. +- Reading `.size` takes constant time. Looking up, inserting, replacing, or deleting an entry scans the backing array, so each of those is linear in the collection's size. On live store state and on plain snapshots the scan reads the raw array directly. In a React component that reads the store without a selector, a lookup goes entry by entry through the tracking proxy so the component records what it compared; for a large collection, select the value with a selector instead. Passing validated entries or values to the factory deduplicates the initial iterable in one pass. +- Objects work as map keys and set values. A member is matched by identity, and the original object, its store proxy and any snapshot of it are the same identity. So `selected.has(todo)` gives the same answer whether `todo` came from the store, from a snapshot in a component, or is the object you first added. Two separate objects with equal fields are different members. +- `map.set(key, value)` on an existing key keeps the stored key and its position and replaces only the value. Setting the value it already has changes nothing and notifies no one. +- Primitive members use `Object.is`, which distinguishes `0` and `-0`. Initial iterables are deduplicated with native `Map`/`Set` semantics, which treat those two values as equal. Avoid depending on signed-zero keys. - Iterators copy the entry/value list when created. Later additions and removals do not change that list; referenced objects can still change. This differs from native live iterators. - Both collections expose `size`, `has`, `delete`, `clear`, `keys`, `values`, `entries`, `forEach`, and iteration with `for...of`. The map also exposes `get` and `set`. The set exposes `add`. diff --git a/website/content/docs/REACT_SSR.md b/website/content/docs/REACT_SSR.md index 9beed433..0da4661e 100644 --- a/website/content/docs/REACT_SSR.md +++ b/website/content/docs/REACT_SSR.md @@ -117,4 +117,4 @@ For example, suppose the server renders `Server: 1` and persistence restores `Sa Client-only apps need no preparation. `createRoot` reads current state even for a prepared store. Unprepared stores retain the existing behavior of reading current state for server rendering and hydration, so keep them unchanged until every consumer hydrates if you do not use preparation. Neither preparation nor hydration resets the live store; `snapshot(store)` continues to return current data. -React subscriptions notify synchronously by default, including after hydration. Ordinary `subscribe(store, listener)` callbacks remain batched. The React hooks do not have a `sync` option. A normal sequence of mutations in an event can be batched into one React commit, but selectors may run after each mutation; this is not a transaction API. +React subscriptions notify synchronously by default, including after hydration. Ordinary `subscribe(store, listener)` callbacks remain batched. The React hooks do not have a `sync` option. A store method or array operation is one transaction and notifies React once. Direct writes outside a method each notify React, which can still batch them into one commit. diff --git a/website/content/docs/SOLID.md b/website/content/docs/SOLID.md index a0d5ca80..407b6b71 100644 --- a/website/content/docs/SOLID.md +++ b/website/content/docs/SOLID.md @@ -1,11 +1,14 @@ --- title: "Solid 2 (preview)" -description: "Use the adapter with solid-js 2.0.0-rc.18 and a live Solid owner." +description: "Use the adapter with the Solid 2 release candidates and a live Solid owner." --- -The `/solid` adapter is **in preview** and targets **Solid 2.0.0-rc.18 only**. Solid 2 is a release -candidate, so pin this exact version. Solid 1 is no longer supported by this -adapter. The import and return shape stay the same: +The `/solid` adapter is **in preview** while Solid 2 is in release candidates. It +accepts `solid-js@^2.0.0-rc.18`; its tests and example ran at `2.0.0-rc.18` and run +today at `2.0.0-rc.23`. A later release candidate can change Solid's API, so the +adapter may need an update before Solid 2 is stable, and such an update can ship +in a minor release of this library. Solid 1 is not supported. The import and +return shape stay the same: ```typescript import {useClassyStore} from '@codebelt/classy-store/solid'; @@ -18,11 +21,12 @@ Install the runtime packages for a browser application: ```sh npm install @codebelt/classy-store -npm install --save-exact solid-js@2.0.0-rc.18 @solidjs/web@2.0.0-rc.18 +npm install --save-exact solid-js@2.0.0-rc.23 @solidjs/web@2.0.0-rc.23 ``` -The repository example uses `@solidjs/vite-plugin@3.0.0-next.51`, -`@solidjs/compiler@2.0.0-rc.18`, and Vite `8.3.8`. The Vite plugin requires +Keep `solid-js`, `@solidjs/web` and the compiler packages on the same release +candidate. The repository example uses `@solidjs/vite-plugin@3.0.0-next.51`, +`@solidjs/compiler@2.0.0-rc.23`, and Vite `8.3.8`. The Vite plugin requires Node.js 22.12 or later. Use `@solidjs/web` for DOM imports and `jsxImportSource: "@solidjs/web"` in TypeScript configuration. Replace the Solid 1 `vite-plugin-solid` package with `@solidjs/vite-plugin`. diff --git a/website/content/docs/SUBSCRIBE_KEY_TUTORIAL.md b/website/content/docs/SUBSCRIBE_KEY_TUTORIAL.md index 20e97c7f..36506f38 100644 --- a/website/content/docs/SUBSCRIBE_KEY_TUTORIAL.md +++ b/website/content/docs/SUBSCRIBE_KEY_TUTORIAL.md @@ -76,7 +76,7 @@ Subscribing captures the initial value. The callback receives current and previo Under the hood, `subscribeKey` wraps the existing `subscribe()` + `snapshot()` APIs: 1. Captures an initial snapshot and stores `snapshot[key]` as the previous value. -2. On each batched notification (or each mutation with `sync: true`), takes a new snapshot and compares `snapshot[key]` with the previous value via `Object.is()`. +2. On each batched notification (or, with `sync: true`, after each direct write and once after each store method or array operation), takes a new snapshot and compares `snapshot[key]` with the previous value via `Object.is()`. 3. If different, updates the stored previous value and calls the callback with `(currentValue, previousValue)`. Because `snapshot()` uses structural sharing, unchanged sub-trees return the same reference. This makes the `Object.is()` comparison efficient — no deep equality checks are needed. diff --git a/website/content/docs/SVELTE.md b/website/content/docs/SVELTE.md index 5e76cd85..534e0bcb 100644 --- a/website/content/docs/SVELTE.md +++ b/website/content/docs/SVELTE.md @@ -38,7 +38,7 @@ The component above uses Svelte 5 event syntax. In Svelte 4, use `on:click={() = ## Timing and cleanup Svelte's `toSvelteStore(store)` delivers the initial snapshot immediately and -notifies subscribers synchronously after each mutation. `$store` subscriptions +notifies subscribers synchronously: after each direct write, and once after each store method or array operation. `$store` subscriptions are cleaned up automatically when the component is destroyed; manual subscribers must call the returned unsubscribe function. Snapshots are readonly: update the original store or call its actions from input handlers instead of using diff --git a/website/content/docs/TUTORIAL.md b/website/content/docs/TUTORIAL.md index 8c23ead8..f0bc7f48 100644 --- a/website/content/docs/TUTORIAL.md +++ b/website/content/docs/TUTORIAL.md @@ -199,9 +199,11 @@ function NameInput() { If upgrading from 0.6.x, remove the React `sync` option and `UseClassyStoreOptions` imports. Keep `isEqual` if you use custom selector equality. The low-level `subscribe()` API retains its batching and optional `sync` setting. -## Batching +## Batching and transactions -Ordinary `subscribe()` callbacks batch notifications in a microtask. React subscriptions instead notify after each mutation. React batches the resulting renders within an event handler, so a method that updates several fields can commit their final state together. This is not a transaction: selectors and getters may run between writes. +Ordinary `subscribe()` callbacks batch notifications in a microtask. Framework adapters, including React's, are notified synchronously, so a controlled input sees its new value within the event that changed it. + +A store method is a transaction. Its writes take effect immediately, so the method reads its own changes, but synchronous subscribers are notified once, when the outermost method returns or throws. A selector or a component never observes the state halfway through a method. ```ts class FormStore { @@ -211,22 +213,24 @@ class FormStore { count = 0; submit(name: string, email: string) { - this.name = name; // immediately notifies React - this.email = email; // immediately notifies React - this.submitted = true; // React batches renders in an event handler - } + this.name = name; + this.email = email; + this.submitted = true; + } // React is notified once, here incrementMany(n: number) { for (let i = 0; i < n; i++) { - this.count++; // each write notifies React + this.count++; } - } + } // one notification, not n } ``` -For ordinary subscribers, `incrementMany(100)` produces one notification. React may check its selected value on every write; use efficient selectors and avoid depending on an exact render count outside an event handler. +Array methods called on store state work the same way: `store.items.sort()`, `unshift()`, `splice()` or a `forEach()` that edits every row is one notification and one new snapshot of the list, however many elements moved. -Mutations separated by `await` can commit separately, allowing loading and result states to appear — see [Async Patterns](#async-patterns) below. +A write made directly on the store outside any method, such as `store.count++` in an event handler, notifies by itself. A plain loop of such writes therefore notifies once per write, and each notification rebuilds the snapshots on the changed path. Put loops and multi-field updates in a store method. + +An `async` method is a transaction up to its first `await`. Each write after an `await` notifies on its own unless it happens inside another method call, which lets loading and result states appear separately. See [Async Patterns](#async-patterns) below. ## Snapshots @@ -382,7 +386,7 @@ How it works: ## Async Patterns -Async methods work naturally. React is notified as each field changes, and pending asynchronous work lets it commit the loading state before the result arrives. +Async methods work naturally. The writes before the first `await` are one transaction, and each write after an `await` notifies React on its own, so the loading state commits before the result arrives. ```ts class PostStore { @@ -628,11 +632,51 @@ counterStore.count; Nested native `Date`, `RegExp`, `Map`, and `Set` values, and arbitrary nested class instances, remain opaque. Replacing the field notifies subscribers; mutating the existing object does not. For observable collection operations, use `reactiveMap()` and `reactiveSet()`. For dates, a timestamp field works well. The root class passed to `createClassyStore()` is proxied; this does not make every class instance nested inside it reactive. +### Reactive nested classes + +A class of your own can opt into the same deep reactivity as plain objects by declaring `static [PROXYABLE] = true`. Its instances are then proxied wherever they appear in a store, their getters are memoized, and their snapshots keep the class prototype: + +```ts +import {createClassyStore, PROXYABLE} from '@codebelt/classy-store'; + +class Todo { + static [PROXYABLE] = true; + done = false; + + constructor(public title: string) {} + + toggle() { + this.done = !this.done; // notifies the store that holds this todo + } +} + +const todoStore = createClassyStore({todos: [new Todo('Write docs')]}); +todoStore.todos[0].toggle(); +``` + +The limits of the root class apply to these classes too: use prototype methods rather than arrow-function fields, and ordinary fields rather than `#private` ones. JSON does not keep a prototype, so persist such instances with a [property transform](./PERSIST_TUTORIAL.md). + +### Snapshots stored in a store + +A snapshot is an immutable value. If you assign one into a store, for example a row taken from a rendered list, the store keeps that frozen object by reference; it does not become live state, and writing to it throws a `TypeError`: + +```ts +const row = snapshot(todoStore).todos[0]; +todoStore.selected = row; // a frozen copy of the row as it was +todoStore.selected.done = true; // TypeError: the snapshot is read-only +``` + +To keep a reference that follows later edits, store the live object or its id instead: `todoStore.selected = todoStore.todos[0]`. To start an independent editable copy, clone the snapshot first, for example with `structuredClone(row)` for plain data. + +### Getters appear as own fields on snapshots + +On a snapshot, every getter of the class is installed as an enumerable own accessor, so `Object.keys(snapshot)`, object spread and `JSON.stringify(snapshot)` include computed values. The live store lists only its data fields. Pick the data fields explicitly when you need only stored state. + ### Set-then-revert and loop updates -React checks subscriptions after each write. Setting a field and reverting it in one event can still schedule rendering, even though the final displayed value is unchanged. Neither selector mode nor auto-tracked mode promises to avoid this work. +A write outside a store method notifies React by itself. Setting a field and reverting it with two such writes can still schedule rendering, even though the final displayed value is unchanged. Neither selector mode nor auto-tracked mode promises to avoid this work. -Likewise, a loop with a thousand writes sends a thousand synchronous React notifications. React can batch their renders within an event handler, but selectors may still run on each mutation. Ordinary `subscribe()` callbacks receive one microtask notification for that loop. For large updates, calculate the final value first when intermediate writes serve no purpose. +Likewise, a plain loop with a thousand direct writes sends a thousand synchronous notifications. Move the loop into a store method to make it one transaction and one notification. Ordinary `subscribe()` callbacks receive one microtask notification either way. ### Auto-tracked references diff --git a/website/content/docs/UPGRADING_1_0.md b/website/content/docs/UPGRADING_1_0.md new file mode 100644 index 00000000..9fe141a9 --- /dev/null +++ b/website/content/docs/UPGRADING_1_0.md @@ -0,0 +1,219 @@ +--- +title: "1.0 upgrade guide" +description: "Breaking changes and behavior changes when upgrading from 0.11.x to the first stable release." +--- + +1.0 is the first stable release. From here on the public API and its documented behavior follow semantic versioning. This guide lists everything that changed since 0.11.x, the code edits each change may need, and what stayed the same. + +If you are coming from an older release, apply the [0.11.0](./UPGRADING_0_11.md), [0.8.0](./UPGRADING_0_8.md) and [0.7.0](./UPGRADING_0_7.md) notes first. + +## At a glance + +Changes that can require an edit: + +| Change | What to do | +| ------------------------------------------------------------ | ---------------------------------------------------------------------- | +| `devtools()` returns a handle | Call `handle.dispose()` instead of calling the result | +| Angular `injectStore` renamed | Import and call `injectClassyStore` | +| `subscribe()` on a nested proxy no longer fires for siblings | Subscribe to the store itself if you relied on that | +| `persist` ignores another stored `version` without `migrate` | Provide `migrate` to keep reading old data | +| `shallowEqual` is stricter | Usually nothing; check selectors that compared unlike values | +| Sync subscribers hear once per method, not once per write | Usually nothing; remove code that relied on seeing intermediate states | + +Changes that need no edit: transactions for array operations, per-field hydration, history restoration, object keys in reactive collections, the new `PROXYABLE` export. + +## Store methods and array operations are transactions + +A call to a store method, or to an array method on store state, now notifies synchronous subscribers once, after the outermost call returns or throws. Before, each property write inside the call notified them. Every framework adapter subscribes synchronously, so this applies to React, Vue, Svelte, Solid and Angular alike. + +```ts +class Cart { + items: number[] = []; + total = 0; + + add(price: number) { + this.items.push(price); + this.total += price; + } +} + +const cart = createClassyStore(new Cart()); +subscribe(cart, listener, {sync: true}); + +cart.add(5); +// 0.11: listener ran after the push and again after the total changed +// 1.0: listener runs once, and never sees items updated but total stale +``` + +The practical effect is on lists. One `sort()`, `reverse()`, `unshift()` or `splice()` moves many elements, and each move used to notify every mounted consumer, which then rebuilt the list snapshot. With one mounted React component, `unshift` on 3,000 rows took about 2.4 seconds; it now takes a few milliseconds. + +What to check: + +- **Ordinary `subscribe()` callbacks are unchanged.** They were already batched into one microtask notification. +- **Direct writes outside a method still notify one by one.** `store.a = 1; store.b = 2` in an event handler is two notifications. A plain loop of direct writes notifies per write; move it into a store method to make it one transaction. +- **An `async` method is a transaction up to its first `await`.** Writes after an `await` notify individually, so loading and result states still render separately. +- **Reads inside a method are current.** Versions and snapshots update with every write; only the notification is deferred. + +## `subscribe()` on a nested proxy observes its subtree only + +In 0.11, a subscription to a nested proxy also fired when a sibling field in the owning store changed, a behavior kept from releases where every subscription was attached to the root. It now fires only for changes inside the object you passed. + +```ts +const store = createClassyStore({user: {name: 'Ada'}, count: 0}); +subscribe(store.user, listener); + +store.count++; // 0.11: listener ran. 1.0: it does not. +store.user.name = 'Grace'; // listener runs in both +``` + +If you relied on the old behavior, subscribe to the store: `subscribe(store, listener)`. The same applies to `useClassyStore(store.user)`, `subscribeKey`, `persist` and `withHistory` when given a nested proxy. + +## Each `subscribe()` call is its own registration + +Subscribing the same callback twice used to register it once, so the first unsubscribe silently removed both. Each call now registers separately and each returned function removes only its own registration. + +```ts +const first = subscribe(store, listener); +const second = subscribe(store, listener); +// 1.0: listener runs twice per change until one of them is released +first(); +// listener still runs once per change +``` + +## A snapshot assigned into a store stays a snapshot + +Assigning a snapshot object into a store, for example a row taken from a rendered list, used to wrap that frozen object in a store proxy. Reads worked, and the first write failed with `'set' on proxy: trap returned falsish`. The store now keeps the snapshot by reference as an immutable value, the way it keeps a `Date`. This also covers a value read through React's auto-tracked hook. + +```tsx +const todos = useClassyStore(todoStore, (state) => state.todos); +// in a click handler: +todoStore.selected = todos[0]; + +todoStore.selected.done = true; +// 1.0: TypeError, the stored snapshot is read-only +``` + +Choose what you mean: + +- **Follow the live row:** store the live object or its id, `todoStore.selected = todoStore.todos[0]`. +- **Edit an independent copy:** clone first, for example `structuredClone(todos[0])` for plain data. +- **Keep a frozen baseline** for comparison: assign the snapshot as before. It now costs nothing and keeps its identity. + +## `persist`: hydration is per field + +Before, any change to the store while the stored data was being read made the read obsolete. The stored data was discarded and the next automatic save replaced it with the store's current values, which were usually the defaults. That happened even when the edit was to a field that is not persisted, and with synchronous storage when the edit was in the same tick as `persist()`. + +Now a stored field is restored unless that same field was edited locally while the read was in flight, and automatic saves wait for the read to settle. + +```ts +const settings = createClassyStore({ + theme: 'light', + fontSize: 12, + loading: false, +}); +persist(settings, { + name: 'settings', + storage, + properties: ['theme', 'fontSize'], +}); +settings.loading = true; // start-up flag, set before the read completes + +// Stored: {theme: 'dark', fontSize: 20} +// 0.11: the store stayed light/12 and storage was overwritten with light/12 +// 1.0: the store becomes dark/20; storage is untouched +``` + +If the user edits `fontSize` during the read, `fontSize` keeps the edited value, `theme` is still restored, and one save after the read writes both. `save()` and `clear()` behave as before and still take precedence over an in-flight read. + +## `persist`: another stored version is ignored without `migrate` + +When the stored `version` differs from the configured one and no `migrate` is given, the stored data is now ignored and the store keeps its current state. Before, it was applied as it was, whatever its shape. No error is reported, and the old record stays in storage until the next save replaces it. + +```ts +persist(store, {name: 'settings', storage, version: 2}); +// A record saved with version 1 is no longer applied. + +persist(store, { + name: 'settings', + storage, + version: 2, + migrate: (state, oldVersion) => + oldVersion === 1 ? upgradeFromV1(state) : state, +}); +// Provide migrate to keep reading older records. +``` + +A record with no `version` field counts as version `0`. + +## `shallowEqual` is stricter + +`shallowEqual` compared only enumerable string keys, so it called any two objects without such keys equal: two different dates, two different maps, a `RegExp` and another `RegExp`. A selector returning a `Date` with `isEqual: shallowEqual` never re-rendered when the date was replaced. + +| Compared values | 0.11 | 1.0 | +| --------------------------------------------- | ------- | ------------------------------------- | +| Two `Date` objects | `true` | `true` only for the same instant | +| Two `Map` or two `Set` objects | `true` | `true` only for same size and members | +| Values with different prototypes | by keys | always `false` | +| Two `RegExp`, `Error`, `Promise`, empty class | `true` | `false` unless the same object | +| Plain records and arrays | by keys | unchanged | + +A plain object and a null-prototype object with the same keys have different prototypes and are no longer equal. + +## `devtools()` returns a handle + +`devtools()` returned a function. It now returns a handle with `dispose()`, like `persist()` and `withHistory()`. + +```ts +// 0.11 +const disconnect = devtools(store, {name: 'Store'}); +disconnect(); + +// 1.0 +const connection = devtools(store, {name: 'Store'}); +connection.dispose(); +``` + +In a React effect, return `() => connection.dispose()`. The published types also stop declaring `__REDUX_DEVTOOLS_EXTENSION__` on the global `Window`, which could conflict with other DevTools typings. If your code relied on that declaration, declare the property in your own project. + +## Angular: `injectStore` is `injectClassyStore` + +```ts +// 0.11 +import {injectStore} from '@codebelt/classy-store/angular'; +readonly state = injectStore(formStore); + +// 1.0 +import {injectClassyStore} from '@codebelt/classy-store/angular'; +readonly state = injectClassyStore(formStore); +``` + +The signature, return type and behavior are unchanged. + +## Changes that need no edit + +**`withHistory`** + +- Undo and redo now remove top-level fields that the restored entry does not have. Before, a field added after the entry survived the undo. +- `undo()` called in the same tick as an edit records that edit first and steps back over it. Before, it skipped one entry further back and lost the edit. You no longer need to wait for the batched notification. +- Fields that did not change between entries are left untouched, so their snapshots keep their identity and selectors reading them do not re-run. + +**Reactive collections** + +- Objects work as map keys and set values inside a store. A member is matched by identity, and the original object, its store proxy and any snapshot of it count as the same member. Before, `has()` returned `false` for the object you had just added and `add()` or `set()` appended duplicates. +- `map.set(key, value)` on an existing key keeps the stored key and position and replaces the value; setting the value it already has notifies no one. +- Lookups scan the raw backing array. `get()` on a 10,000-entry map inside a store went from about 3.7 ms to about 0.06 ms. + +**`PROXYABLE`** + +A class of your own can now be deeply reactive when nested in a store by declaring `static [PROXYABLE] = true`, with `PROXYABLE` imported from `@codebelt/classy-store`. See [reactive nested classes](./TUTORIAL.md#reactive-nested-classes). + +## Framework and package support + +- **Solid** stays in preview while Solid 2 is in release candidates. The peer range is now `^2.0.0-rc.18` instead of exactly `2.0.0-rc.18`; the adapter is developed against `2.0.0-rc.23`. +- **React** `^18.0.0 || ^19.0.0`, **Vue** `^3.2.0`, **Svelte** `^4.0.0 || ^5.0.0` and **Angular** `^22.0.0` are unchanged. +- The package declares `engines.node >= 20` and exports `./package.json`. +- TypeScript projects need `moduleResolution` set to `bundler`, `node16` or `nodenext` to resolve the subpath entries such as `@codebelt/classy-store/react`. The legacy `node` (node10) setting cannot resolve package `exports`; this was already the case in 0.x. + +## Unchanged + +`createClassyStore`, `snapshot`, `useClassyStore` in both modes, `createStoreHook`, `useLocalStore`, `prepareStoreForHydration`, `useHistoryStatus`, `usePersistStatus`, `subscribeKey`, `toSvelteStore`, the Vue and Solid `useClassyStore`, the `persist` and `withHistory` options and handles, and the persisted storage format. Records written by 0.11 are read by 1.0. diff --git a/website/content/docs/index.md b/website/content/docs/index.md index 2edb336f..45a740db 100644 --- a/website/content/docs/index.md +++ b/website/content/docs/index.md @@ -51,19 +51,19 @@ This shared instance is for a client-only app. For SSR or independent subtrees, ## Framework support and upgrades -For the upgrade from 0.10.x and framework support in 0.11.0, see the [0.11.0 release notes](./UPGRADING_0_11.md). +1.0 is the first stable release. Upgrading from 0.11.x? Read the [1.0 upgrade guide](./UPGRADING_1_0.md) for the breaking changes and the edits they need. -Upgrading from 0.7.x? Read the [0.8.0 upgrade guide](./UPGRADING_0_8.md) for public API changes and persistence error handling. From 0.6.x or earlier, also follow the [0.7.0 upgrade guide](./UPGRADING_0_7.md). +From an older release, apply the earlier notes first: [0.11.0](./UPGRADING_0_11.md), then [0.8.0](./UPGRADING_0_8.md) for public API changes and persistence error handling, and [0.7.0](./UPGRADING_0_7.md) from 0.6.x or earlier. All framework peer dependencies are optional — install only what your project uses: -| Framework | Peer Dependency | Import | -| ----------------- | ------------------------------ | -------------------------------- | -| React | `react ^18.0.0 \|\| ^19.0.0` | `@codebelt/classy-store/react` | -| Vue | `vue ^3.2.0` | `@codebelt/classy-store/vue` | -| Svelte | `svelte ^4.0.0 \|\| ^5.0.0` | `@codebelt/classy-store/svelte` | -| Solid 2 (preview) | `solid-js 2.0.0-rc.18` (exact) | `@codebelt/classy-store/solid` | -| Angular | `@angular/core ^22.0.0` | `@codebelt/classy-store/angular` | +| Framework | Peer Dependency | Import | +| ----------------- | ---------------------------- | -------------------------------- | +| React | `react ^18.0.0 \|\| ^19.0.0` | `@codebelt/classy-store/react` | +| Vue | `vue ^3.2.0` | `@codebelt/classy-store/vue` | +| Svelte | `svelte ^4.0.0 \|\| ^5.0.0` | `@codebelt/classy-store/svelte` | +| Solid 2 (preview) | `solid-js ^2.0.0-rc.18` | `@codebelt/classy-store/solid` | +| Angular | `@angular/core ^22.0.0` | `@codebelt/classy-store/angular` | These ranges include stable releases within the listed majors and exclude untested future majors. Solid remains pinned to its exact tested prerelease. diff --git a/website/content/docs/meta.json b/website/content/docs/meta.json index 67a437d4..545ce09d 100644 --- a/website/content/docs/meta.json +++ b/website/content/docs/meta.json @@ -20,6 +20,7 @@ "SUBSCRIBE_KEY_TUTORIAL", "DEVTOOLS_TUTORIAL", "---Upgrading---", + "UPGRADING_1_0", "UPGRADING_0_11", "UPGRADING_0_8", "UPGRADING_0_7", From 56182a5773ed4ac4935e59f78d43b2d65fde33a8 Mon Sep 17 00:00:00 2001 From: codeBelt Date: Tue, 17 Nov 2026 22:09:11 -0600 Subject: [PATCH 007/169] refactor(core): close transactions without a per-call closure Phase 7 of the 1.0 preparation (validation). The transaction wrapper allocated a closure for every method call. Count the depth inline and settle in a finally block instead. No behavior change. Validated on this branch: lint, 684 unit tests, build, the full monorepo typecheck, publint and arethetypeswrong, the cross-browser suite on Chromium, Firefox and WebKit, the React 18.0/18.3/19.0/19.3 packed consumers with and without React Compiler, Vue 3.2.0, Svelte 4.0.0 and 5.0.0, Angular 22.0.0 and 22.2.3, the packed Next.js consumer with the compiler off and on, the performance and memory smoke runs, and the docs site tests. Co-Authored-By: Claude Fable 5.2 --- packages/classy-store/src/core/core.ts | 36 +++++++++++++------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/packages/classy-store/src/core/core.ts b/packages/classy-store/src/core/core.ts index 54f9425b..fa4c6eed 100644 --- a/packages/classy-store/src/core/core.ts +++ b/packages/classy-store/src/core/core.ts @@ -245,26 +245,21 @@ const pendingNotifications = new Set(); let transactionDepth = 0; const pendingSync = new Set(); -/** - * Run one store method or array operation as a transaction. Versions advance - * with every write, so reads inside the call are current, but synchronous - * subscribers hear about it once, after the outermost call returns or throws. - * A sort of n rows is then one notification rather than n. - */ -function runTransaction(run: () => T): T { - transactionDepth++; - try { - return run(); - } finally { - if (--transactionDepth === 0 && pendingSync.size) { - const owners = new Set(pendingSync); - pendingSync.clear(); - deliver(owners, 'syncListeners'); - } +/** Close one transaction level; the outermost one notifies sync subscribers. */ +function settleTransaction(): void { + if (--transactionDepth === 0 && pendingSync.size) { + const owners = new Set(pendingSync); + pendingSync.clear(); + deliver(owners, 'syncListeners'); } } -/** Bind a method to its proxy and run each call as a transaction. */ +/** + * Bind a method to its proxy and run each call as a transaction. Versions + * advance with every write, so reads inside the call are current, but + * synchronous subscribers hear about it once, after the outermost call returns + * or throws. A sort of n rows is then one notification rather than n. + */ function transactional( method: (...args: unknown[]) => unknown, receiver: object, @@ -272,7 +267,12 @@ function transactional( return function (...args: unknown[]) { // A class stored as data stays constructible, as a bound function would. if (new.target) return Reflect.construct(method, args); - return runTransaction(() => Reflect.apply(method, receiver, args)); + transactionDepth++; + try { + return Reflect.apply(method, receiver, args); + } finally { + settleTransaction(); + } }; } From 96ca5b4119204522a4f0abef65d3901f517b07f4 Mon Sep 17 00:00:00 2001 From: codeBelt Date: Tue, 17 Nov 2026 22:14:06 -0600 Subject: [PATCH 008/169] chore(deps): update the Solid packages to 2.0.0 stable Solid 2.0.0 was published on 2026-11-17. Move development off the release candidates: - solid-js, @solidjs/web and @solidjs/compiler 2.0.0-rc.23 -> 2.0.0 - @solidjs/vite-plugin 3.0.0-next.51 -> 3.0.1 (Solid example) - Remove the root overrides. They held @solidjs/babel-plugin and @solidjs/compiler on one release candidate. The stable Vite plugin depends on @solidjs/compiler ^2.0.0 and makes the Babel plugin an optional peer, so nothing installs the Babel plugin any more and the compiler resolves to a single 2.0.0 copy without an override. Checked on 2.0.0: all 684 unit tests including the Solid adapter tests, the package typecheck, the Solid example typecheck, integration check and production build, and the Solid browser spec on Chromium, Firefox and WebKit (18 passed). Co-Authored-By: Claude Fable 5.2 --- bun.lock | 64 ++++++++---------------------- examples/solid/package.json | 6 +-- package.json | 4 -- packages/classy-store/package.json | 6 +-- 4 files changed, 23 insertions(+), 57 deletions(-) diff --git a/bun.lock b/bun.lock index b066f621..84277a83 100644 --- a/bun.lock +++ b/bun.lock @@ -54,11 +54,11 @@ "version": "0.0.0", "dependencies": { "@codebelt/classy-store": "workspace:*", - "@solidjs/web": "2.0.0-rc.23", - "solid-js": "2.0.0-rc.23", + "@solidjs/web": "2.0.0", + "solid-js": "2.0.0", }, "devDependencies": { - "@solidjs/vite-plugin": "3.0.0-next.51", + "@solidjs/vite-plugin": "3.0.1", "typescript": "^5.7.0", "vite": "8.3.8", }, @@ -105,8 +105,8 @@ "@babel/core": "7.29.7", "@happy-dom/global-registrator": "21.0.4", "@playwright/test": "1.65.1", - "@solidjs/compiler": "2.0.0-rc.23", - "@solidjs/web": "2.0.0-rc.23", + "@solidjs/compiler": "2.0.0", + "@solidjs/web": "2.0.0", "@types/bun": "1.4.4", "@types/react": "19.3.0", "@types/react-dom": "19.3.0", @@ -115,7 +115,7 @@ "react": "19.3.1", "react-compiler-runtime": "1.0.0", "react-dom": "19.3.1", - "solid-js": "2.0.0-rc.23", + "solid-js": "2.0.0", "svelte": "5.57.3", "tsdown": "0.23.7", "typescript": "7.0.2", @@ -140,10 +140,6 @@ "trustedDependencies": [ "sharp", ], - "overrides": { - "@solidjs/babel-plugin": "2.0.0-rc.23", - "@solidjs/compiler": "2.0.0-rc.23", - }, "packages": { "@alloc/quick-lru": ["@alloc/quick-lru@5.2.0", "", {}, "sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw=="], @@ -191,8 +187,6 @@ "@babel/helper-module-transforms": ["@babel/helper-module-transforms@7.29.14", "", { "dependencies": { "@babel/helper-module-imports": "^7.29.7", "@babel/helper-validator-identifier": "^7.29.7", "@babel/traverse": "^7.29.14" }, "peerDependencies": { "@babel/core": "^7.0.0" } }, "sha512-2XDvQVd9JESaOgGc4jT2/jquTAO7ppA5noTZQqH+MmZ89yjCzScLwtCPbWtkPZylL+TLWR49IwWmk+QkRR4GsA=="], - "@babel/helper-plugin-utils": ["@babel/helper-plugin-utils@7.29.7", "", {}, "sha512-G7sHYigPY17oO5SYWnfD/0MTBwVR781S/JI643e/JhUYgVgWE/61SoW3NH9KWUKyKq5LVh3npif99Wkt6j86Jw=="], - "@babel/helper-string-parser": ["@babel/helper-string-parser@7.29.14", "", {}, "sha512-CXvKMFvM80ihI7Vox9jb+kQjnyjESQNPM+vB7U0Zz6TWuZA+Z/FL0QPMH300h33qJtIx+REeBhXqWOPW48TcAQ=="], "@babel/helper-validator-identifier": ["@babel/helper-validator-identifier@7.29.7", "", {}, "sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg=="], @@ -203,8 +197,6 @@ "@babel/parser": ["@babel/parser@7.29.14", "", { "dependencies": { "@babel/types": "^7.29.14" }, "bin": "./bin/babel-parser.js" }, "sha512-VL220vXuyO2z3rNIQwY7ftj9UwpqOt+33sH+sBWkOekbsSR2g7EEMnOx24ZlCH0xOA3DM/33SifVFGbnJD8r/w=="], - "@babel/plugin-syntax-jsx": ["@babel/plugin-syntax-jsx@7.29.7", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.29.7" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-TSu8+mHCoEaaCDEZ0I3+6mvTBYR4PCxQwf2z9/r5Tbztv6NaLR3B9thGTTxX2WGuGHJqRiAbKPeGTJ5XWXVg6A=="], - "@babel/runtime": ["@babel/runtime@7.29.14", "", {}, "sha512-Y5tqevQaUAZhhj82BpYMNC1ssvLQTVAfwKdm8iy8qwmhvC2/CpcAu8OC+QEtjM7pMk7knx83u1Qj8gzkicyelw=="], "@babel/template": ["@babel/template@7.29.7", "", { "dependencies": { "@babel/code-frame": "^7.29.7", "@babel/parser": "^7.29.7", "@babel/types": "^7.29.7" } }, "sha512-puq+Gf35oI24FeN11LkoUQFqv9uwNeWpxXZi/Ji3rRIoKAzKnxRaZ+Gkj0vKS9ZCiTESfng1N9LyOyXvo+m+Gg=="], @@ -651,27 +643,25 @@ "@sindresorhus/is": ["@sindresorhus/is@4.6.0", "", {}, "sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw=="], - "@solidjs/babel-plugin": ["@solidjs/babel-plugin@2.0.0-rc.23", "", { "dependencies": { "@babel/helper-module-imports": "7.18.6", "@babel/plugin-syntax-jsx": "^7.18.6", "@babel/types": "^7.20.7", "html-entities": "2.3.3", "parse5": "^7.1.2" }, "peerDependencies": { "@babel/core": "^7.20.12 || ^8.0.0", "@tsrx/core": "0.1.63" }, "optionalPeers": ["@tsrx/core"] }, "sha512-XSPVTf6DtyCTfQM0wE1i0b/Go4ou027KukwJRsIr0zWUjdKIIfmqYiILp0jDHouHqYrKyxwgEX3scNCmsKOrrg=="], - - "@solidjs/compiler": ["@solidjs/compiler@2.0.0-rc.23", "", { "optionalDependencies": { "@solidjs/compiler-darwin-arm64": "2.0.0-rc.23", "@solidjs/compiler-darwin-x64": "2.0.0-rc.23", "@solidjs/compiler-linux-arm64-gnu": "2.0.0-rc.23", "@solidjs/compiler-linux-x64-gnu": "2.0.0-rc.23", "@solidjs/compiler-wasm32-wasi": "2.0.0-rc.23", "@solidjs/compiler-win32-x64-msvc": "2.0.0-rc.23" } }, "sha512-a62s1nkGrfivp9hPDpq73Wk6baiP3QMYW39708fdXRyXdP9AQrsmZMbxDD909z7RyNtH6zpXw9p88h7FBEKoUw=="], + "@solidjs/compiler": ["@solidjs/compiler@2.0.0", "", { "optionalDependencies": { "@solidjs/compiler-darwin-arm64": "2.0.0", "@solidjs/compiler-darwin-x64": "2.0.0", "@solidjs/compiler-linux-arm64-gnu": "2.0.0", "@solidjs/compiler-linux-x64-gnu": "2.0.0", "@solidjs/compiler-wasm32-wasi": "2.0.0", "@solidjs/compiler-win32-x64-msvc": "2.0.0" } }, "sha512-Spgqz1+eojQ2pDl4yajnajIjX/kSusjTK/6mC6Fm7sAZ3YBI0yP4/epRR1hV08TU3YAH4xLBmZ6wjb1zC134Sw=="], - "@solidjs/compiler-darwin-arm64": ["@solidjs/compiler-darwin-arm64@2.0.0-rc.23", "", { "os": "darwin", "cpu": "arm64" }, "sha512-a+BPw0rZXyw8O0c0/YkRSPrhfjVJVTHSNx4yCNI3XiTFkST6VrP8TfbvBeIEbr5sbw4cINUwrT3Dd3I2uglkpQ=="], + "@solidjs/compiler-darwin-arm64": ["@solidjs/compiler-darwin-arm64@2.0.0", "", { "os": "darwin", "cpu": "arm64" }, "sha512-pPHERRXgCcsfCsaC8sgK94uVlp4WGUcHTfMeBiAfme2amQ7vFn7dpjSD3TIVKY4jeYQTKjIKOYP0c5mqIR1LeA=="], - "@solidjs/compiler-darwin-x64": ["@solidjs/compiler-darwin-x64@2.0.0-rc.23", "", { "os": "darwin", "cpu": "x64" }, "sha512-ceLPfv02OAJonmLj+HJ+cE7RHjnBspzAHqVEdJ+ukm4Rs3Xs7TC4hLnaugdNs+gGkeFSNxe+1N8tVWL0WqJlIg=="], + "@solidjs/compiler-darwin-x64": ["@solidjs/compiler-darwin-x64@2.0.0", "", { "os": "darwin", "cpu": "x64" }, "sha512-Ndwy+pQs8v6BIfaAbQ+weu9HGBTM40HFCyu0XV2qX7U5XC+o+3fc4O6+8ZZyUzl+qvT6XU+wh2bQ6MI2lV+KBQ=="], - "@solidjs/compiler-linux-arm64-gnu": ["@solidjs/compiler-linux-arm64-gnu@2.0.0-rc.23", "", { "os": "linux", "cpu": "arm64", "libc": "glibc" }, "sha512-1jG51VqVFqle8OYBYd2VAeer5emLVh5cUB1CsDBbu93BzY+/OkXTyTnZ1MB25lFZu69iToUYWYsGqNeNbjUtfg=="], + "@solidjs/compiler-linux-arm64-gnu": ["@solidjs/compiler-linux-arm64-gnu@2.0.0", "", { "os": "linux", "cpu": "arm64", "libc": "glibc" }, "sha512-H/R9SUmuqd4P/IuuXTlRM1LhgUWe2EjLP3iMUo+L4IO1rmOSqfMUZp9h52eQnDsOdoIZCaKsw+b0qC5WooxDlg=="], - "@solidjs/compiler-linux-x64-gnu": ["@solidjs/compiler-linux-x64-gnu@2.0.0-rc.23", "", { "os": "linux", "cpu": "x64", "libc": "glibc" }, "sha512-mSqX8UPxKntFcmyPMPd6Jf3JlbF2EEHWbcEKMvpl//UgSvq19Yq+j/3xYlBd3qO56f6l96zsIC+xRo6i0HRcXg=="], + "@solidjs/compiler-linux-x64-gnu": ["@solidjs/compiler-linux-x64-gnu@2.0.0", "", { "os": "linux", "cpu": "x64", "libc": "glibc" }, "sha512-gafr9+2bP2sv2hRAvDgzab0mpQi4MiyWrie9bfYjadsK7qZKJBeMzEQCLNd4dTYlgirCj6Frzu2pfET7+ZUyNQ=="], - "@solidjs/compiler-wasm32-wasi": ["@solidjs/compiler-wasm32-wasi@2.0.0-rc.23", "", { "dependencies": { "@emnapi/core": "1.11.3", "@emnapi/runtime": "1.11.3", "@napi-rs/wasm-runtime": "^1.1.6" } }, "sha512-glCDnNEi3s195EOMZTirjxX4vU5h33crjkeV+OKgZIkfXwFQENJUJS9tXcjPpbFBBN+wzeG9nUuWmW0595aWAQ=="], + "@solidjs/compiler-wasm32-wasi": ["@solidjs/compiler-wasm32-wasi@2.0.0", "", { "dependencies": { "@emnapi/core": "1.11.3", "@emnapi/runtime": "1.11.3", "@napi-rs/wasm-runtime": "^1.1.6" } }, "sha512-JnF21DJ/jx5fghYKIB6ANihHMM4aWg4JFe5pFLGDvqSeURZJdJGjwyyxOv3siEMUdkBzVGHXotTsviTcRyB5hQ=="], - "@solidjs/compiler-win32-x64-msvc": ["@solidjs/compiler-win32-x64-msvc@2.0.0-rc.23", "", { "os": "win32", "cpu": "x64" }, "sha512-d77HGp13AFB3yLRJBR8prbP0cOWV/I4VR0U33Qn2ADEXEA0W+wZAicL0Wq2hKic8jJzQuDejHtz/dfhN2cFXqA=="], + "@solidjs/compiler-win32-x64-msvc": ["@solidjs/compiler-win32-x64-msvc@2.0.0", "", { "os": "win32", "cpu": "x64" }, "sha512-RkiUXt/LmJ1lk1fECa/iDVGCOv3UiwW5ocZgkhpayUviTSrceFjFHhiM9sFXq0at3kHI7Z8awN6zTaF5IStDAQ=="], - "@solidjs/signals": ["@solidjs/signals@2.0.0-rc.23", "", {}, "sha512-LqN64hjib5akPOm9+1NxxqqFU/3xYe0Le4jYJdvElnkuPLhgdm7DBGr1BgYENkPfJ/b+N4bvqSiN2z/u6kPSaA=="], + "@solidjs/signals": ["@solidjs/signals@2.0.0", "", {}, "sha512-jrcT6XTVvsYRpesRp0At/mSUnsWr6jiprK8C93Oat56B8n7X9BMSe58Rxl6qSZUhBN0L+sxm8GzeO7HdhBXvDw=="], - "@solidjs/vite-plugin": ["@solidjs/vite-plugin@3.0.0-next.51", "", { "dependencies": { "@ampproject/remapping": "^2.3.0", "@babel/core": "^7.23.3", "@solidjs/babel-plugin": "^2.0.0-rc.16", "@solidjs/compiler": "^2.0.0-rc.16", "@types/babel__core": "^7.20.4", "merge-anything": "^5.1.7", "vitefu": "^1.0.4" }, "peerDependencies": { "@solidjs/start-devtools": "^1.0.0-next.2", "@solidjs/web": "^2.0.0-rc.16", "@testing-library/jest-dom": "^5.16.6 || ^5.17.0 || ^6.0.0 || ^7.0.0", "solid-js": "^2.0.0-rc.16", "vite": "^8.0.0 || ^9.0.0" }, "optionalPeers": ["@solidjs/start-devtools", "@testing-library/jest-dom"] }, "sha512-ffpFNYX1z3mGjr95nM3hwo0R3P489FjVnYP5YCOorw+N8grCo+Ay1hGx68H00n5OAC7uGd/7B4GsU1HnA/VU0A=="], + "@solidjs/vite-plugin": ["@solidjs/vite-plugin@3.0.1", "", { "dependencies": { "@ampproject/remapping": "^2.3.0", "@solidjs/compiler": "^2.0.0", "magic-string": "^0.30.21", "merge-anything": "^5.1.7", "vitefu": "^1.0.4" }, "peerDependencies": { "@babel/core": "^7.23.3 || ^8.0.0", "@solidjs/babel-plugin": "^2.0.0", "@solidjs/start-devtools": "^1.0.0-next.2", "@solidjs/web": "^2.0.0", "@testing-library/jest-dom": "^5.16.6 || ^5.17.0 || ^6.0.0 || ^7.0.0", "solid-js": "^2.0.0", "vite": "^8.0.0 || ^9.0.0" }, "optionalPeers": ["@babel/core", "@solidjs/babel-plugin", "@solidjs/start-devtools", "@testing-library/jest-dom"] }, "sha512-dyRU4LJXhzEEgtF32AtUdjqaUuMVYTVLQvhYlT6HcYBvf10yIVmKgW9cg42b5YDxkl6BgAJ9o0OjUnAy3qKb9A=="], - "@solidjs/web": ["@solidjs/web@2.0.0-rc.23", "", { "dependencies": { "csstype": "^3.1.0", "seroval": "^1.8.0", "seroval-plugins": "^1.8.0" }, "peerDependencies": { "solid-js": "^2.0.0-rc.23" } }, "sha512-8OtRNh7p6hYy6Zhoi4WWVKN9UB3bWbtDLrmITVOcO0GGnB5r7nthAoM/7/xPS5Qa0rTC3AymlUap3ZVdPJhbVw=="], + "@solidjs/web": ["@solidjs/web@2.0.0", "", { "dependencies": { "csstype": "^3.1.0", "seroval": "^1.8.0", "seroval-plugins": "^1.8.0" }, "peerDependencies": { "solid-js": "^2.0.0" } }, "sha512-R0+JMCD6ukEXaID/sH5PVQe9bCIN9pRzJry+F6Sb6YvtlkAp9DEyVI7AeZYiV0cd6TSL98kpbCyLDiZnaAKGrA=="], "@standard-schema/spec": ["@standard-schema/spec@1.1.0", "", {}, "sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w=="], @@ -715,14 +705,6 @@ "@tybys/wasm-util": ["@tybys/wasm-util@0.10.4", "", { "dependencies": { "tslib": "^2.4.0" } }, "sha512-W3c4gRigFS0T/Ma4qIYF3GDAc5AQdHb1yL5znJT1Zv1YaD9Kitx656wBjvr19qbiosmZT8lWDM5BEMynUqX65A=="], - "@types/babel__core": ["@types/babel__core@7.20.5", "", { "dependencies": { "@babel/parser": "^7.20.7", "@babel/types": "^7.20.7", "@types/babel__generator": "*", "@types/babel__template": "*", "@types/babel__traverse": "*" } }, "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA=="], - - "@types/babel__generator": ["@types/babel__generator@7.27.0", "", { "dependencies": { "@babel/types": "^7.0.0" } }, "sha512-ufFd2Xi92OAVPYsy+P4n7/U7e68fex0+Ee8gSG9KX7eo084CWiQ4sdxktvdl0bOPupXtVJPY19zk6EwWqUQ8lg=="], - - "@types/babel__template": ["@types/babel__template@7.4.4", "", { "dependencies": { "@babel/parser": "^7.1.0", "@babel/types": "^7.0.0" } }, "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A=="], - - "@types/babel__traverse": ["@types/babel__traverse@7.28.0", "", { "dependencies": { "@babel/types": "^7.28.2" } }, "sha512-8PvcXf70gTDZBgt9ptxJ8elBeBjcLOAcOtoO/mPJjtji1+CdGbHgm77om1GrsPxsiE+uXIpNSK64UYaIwQXd4Q=="], - "@types/bun": ["@types/bun@1.4.4", "", { "dependencies": { "bun-types": "1.4.4" } }, "sha512-9wkRDXUXK124pEnAutE6n/l18j+i9GC5IAHK8TmX/2nlySETmky0OU6yL5U8pW1AoKh++AN9auDCr647BfurjQ=="], "@types/estree": ["@types/estree@1.0.10", "", {}, "sha512-lTyOMnOcmRBzdCv6/4zUZCrEhV0xrqQiUZBZtVcbmLHBXKLnN8q89v/wKRF/Q0HbwVsqbIG3o5HDoFl9sduM+g=="], @@ -1045,8 +1027,6 @@ "hosted-git-info": ["hosted-git-info@10.1.1", "", { "dependencies": { "lru-cache": "^11.1.0" } }, "sha512-DeOnSPAvOndYKfw075gt8yZzQ7S2hNztw34zBTfhIzLhmBTswIBg5/y+pqu/VD5cYWm5goAFTusDmUEmKZ0PEQ=="], - "html-entities": ["html-entities@2.3.3", "", {}, "sha512-DV5Ln36z34NNTDgnz0EWGBLZENelNAtkiFA4kyNOG2tDI6Mz1uSWiq1wAKdyjnJwyDiDO7Fa2SO1CTxPXL8VxA=="], - "htmlparser2": ["htmlparser2@12.0.0", "", { "dependencies": { "domelementtype": "^3.0.0", "domhandler": "^6.0.0", "domutils": "^4.0.2", "entities": "^8.0.0" } }, "sha512-Tz7u1i95/g2x2jz81+x0FBVhBhY5aRTvD3tXXdFaljuNdzDLJ8UGNRrTcj2cgQvAg3iW/h77Fz15nLW0L0CrZw=="], "https-proxy-agent": ["https-proxy-agent@9.1.0", "", { "dependencies": { "agent-base": "9.0.0", "debug": "^4.3.4", "proxy-agent-negotiate": "1.1.0" } }, "sha512-ag87y7cJJ9/3+GxFr8Oy4O5faDsGRGnBGsJj/YjOSsSx/5eadKLYTMPlzuR6obgoCDDm0abAAZitXXQkMOPSpA=="], @@ -1361,7 +1341,7 @@ "slice-ansi": ["slice-ansi@9.0.1", "", { "dependencies": { "ansi-styles": "^6.2.3", "is-fullwidth-code-point": "^5.1.0" } }, "sha512-aBY19bn/XA+hKOKX0qL7Z0UfdBsbQvc9hn993U8ALUjzxCvDcuZqLoRXjGJrUARWAlwMnsRVD9sw2AFNOYvalA=="], - "solid-js": ["solid-js@2.0.0-rc.23", "", { "dependencies": { "@solidjs/signals": "^2.0.0-rc.23", "seroval": "^1.8.0", "seroval-plugins": "^1.8.0" } }, "sha512-PZgcbOpm1OgX9y68Z73GXpbUxgZqS+F/5MQjfTEa8u5D2qS/lXvD3IeGQuHG+QWActJTZg7XwF+AP7fEp9JIzw=="], + "solid-js": ["solid-js@2.0.0", "", { "dependencies": { "@solidjs/signals": "^2.0.0", "seroval": "^1.8.0", "seroval-plugins": "^1.8.0" } }, "sha512-9zN4uH2OQeQAYbF4BmIzoaa+L5Hb8Dp6kkP6ZXobHQ1FZVICdmzREPDVDBJY7umzdAE8D6zbFfWhxGtagkyslA=="], "source-map": ["source-map@0.6.1", "", {}, "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="], @@ -1559,12 +1539,6 @@ "@schematics/angular/typescript": ["typescript@6.0.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw=="], - "@solidjs/babel-plugin/@babel/helper-module-imports": ["@babel/helper-module-imports@7.18.6", "", { "dependencies": { "@babel/types": "^7.18.6" } }, "sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA=="], - - "@solidjs/babel-plugin/parse5": ["parse5@7.3.0", "", { "dependencies": { "entities": "^6.0.0" } }, "sha512-IInvU7fabl34qmi9gY8XOVxhYyMyuH2xUNpb2q8/Y+7552KlejkRvqvD19nMoUW/uQGGbqNpA6Tufu5FL5BZgw=="], - - "@solidjs/vite-plugin/@babel/core": ["@babel/core@7.29.13", "", { "dependencies": { "@babel/code-frame": "^7.29.7", "@babel/generator": "^7.29.13", "@babel/helper-compilation-targets": "^7.29.13", "@babel/helper-module-transforms": "^7.29.13", "@babel/helpers": "^7.29.13", "@babel/parser": "^7.29.13", "@babel/template": "^7.29.7", "@babel/traverse": "^7.29.13", "@babel/types": "^7.29.11", "@jridgewell/remapping": "^2.3.5", "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", "json5": "^2.2.3", "semver": "^6.3.1" } }, "sha512-j1nvOQCZYSgp7HLmisnCXFTpVvFODiijQ9QHkORfGKWH6YDtskTEeCJS7eV545GZ9UBzrq0e2xsOd5QQ5PjIqw=="], - "@sveltejs/vite-plugin-svelte/magic-string": ["magic-string@1.4.1", "", { "dependencies": { "@jridgewell/sourcemap-codec": "^1.6.0" } }, "sha512-8lyCu36ErXR0J9uaGKlKQoiLZKmtI63YGLE8G2o9jyRPdr4X47LusSOwgOJOzcVtp81fTAAjxR7BwKz682Jhow=="], "@sveltejs/vite-plugin-svelte/obug": ["obug@2.2.1", "", {}, "sha512-XrsrhT5sybtKI6wakr2SPOlGZWWYbUXZ7a0jT8/QOeAPau+1X/bSegNe5YR75oJmEZQbKningirmGOEJCIk61Q=="], @@ -1705,10 +1679,6 @@ "@rolldown/binding-wasm32-wasi/@emnapi/core/@emnapi/wasi-threads": ["@emnapi/wasi-threads@2.2.0", "", { "dependencies": { "tslib": "^2.4.0" } }, "sha512-JP7OYH38Q7+pyTAe14raZHLQIK7BDKbdwji+Xi3pcd/6QkJYQH3SX4wu6EplGrGJWRepoNzedfm0G3B9Z4e9Rw=="], - "@solidjs/babel-plugin/parse5/entities": ["entities@6.0.1", "", {}, "sha512-aN97NXWF6AWBTahfVOIrB/NShkzi5H7F9r1s9mD3cDj4Ko5f2qhhVoYMibXF7GlLveb/D2ioWay8lxI97Ven3g=="], - - "@solidjs/vite-plugin/@babel/core/semver": ["semver@6.3.1", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA=="], - "babel-plugin-react-compiler/@babel/types/@babel/helper-string-parser": ["@babel/helper-string-parser@7.27.1", "", {}, "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA=="], "babel-plugin-react-compiler/@babel/types/@babel/helper-validator-identifier": ["@babel/helper-validator-identifier@7.28.5", "", {}, "sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q=="], diff --git a/examples/solid/package.json b/examples/solid/package.json index a436d144..aeec02aa 100644 --- a/examples/solid/package.json +++ b/examples/solid/package.json @@ -12,11 +12,11 @@ }, "dependencies": { "@codebelt/classy-store": "workspace:*", - "@solidjs/web": "2.0.0-rc.23", - "solid-js": "2.0.0-rc.23" + "@solidjs/web": "2.0.0", + "solid-js": "2.0.0" }, "devDependencies": { - "@solidjs/vite-plugin": "3.0.0-next.51", + "@solidjs/vite-plugin": "3.0.1", "typescript": "^5.7.0", "vite": "8.3.8" } diff --git a/package.json b/package.json index 93dfef79..86d85a12 100644 --- a/package.json +++ b/package.json @@ -5,10 +5,6 @@ "packages/*", "examples/*" ], - "overrides": { - "@solidjs/babel-plugin": "2.0.0-rc.23", - "@solidjs/compiler": "2.0.0-rc.23" - }, "scripts": { "---------- Dev --------------------------------------------------------": "", "dev": "bun run --filter @codebelt/classy-store dev", diff --git a/packages/classy-store/package.json b/packages/classy-store/package.json index 3cfe1f35..3e0efabc 100644 --- a/packages/classy-store/package.json +++ b/packages/classy-store/package.json @@ -171,8 +171,8 @@ "@babel/core": "7.29.7", "@happy-dom/global-registrator": "21.0.4", "@playwright/test": "1.65.1", - "@solidjs/compiler": "2.0.0-rc.23", - "@solidjs/web": "2.0.0-rc.23", + "@solidjs/compiler": "2.0.0", + "@solidjs/web": "2.0.0", "@types/bun": "1.4.4", "@types/react": "19.3.0", "@types/react-dom": "19.3.0", @@ -180,7 +180,7 @@ "react": "19.3.1", "react-compiler-runtime": "1.0.0", "react-dom": "19.3.1", - "solid-js": "2.0.0-rc.23", + "solid-js": "2.0.0", "svelte": "5.57.3", "tsdown": "0.23.7", "typescript": "7.0.2", From 965e945e526a087fcc3e5e31e9fdde089fbe6f6c Mon Sep 17 00:00:00 2001 From: codeBelt Date: Tue, 17 Nov 2026 22:15:30 -0600 Subject: [PATCH 009/169] feat(solid)!: require stable Solid 2 and drop the preview label Solid 2 is stable, so the adapter no longer needs to track release candidates. - Peer range: solid-js ^2.0.0-rc.18 -> ^2.0.0. The release candidates are no longer accepted. - README, Solid guide, API reference, architecture page, docs landing page and browser test notes: describe the adapter as supporting Solid 2 instead of being a preview that follows release candidates. - 1.0 upgrade guide and changeset: list the Solid requirement among the breaking changes. The adapter's code is unchanged; it passes its unit and browser tests on Solid 2.0.0. BREAKING CHANGE: `@codebelt/classy-store/solid` requires `solid-js@^2.0.0`. Projects on a Solid 2 release candidate must update `solid-js` and `@solidjs/web` to the stable release. Co-Authored-By: Claude Fable 5.2 --- .changeset/stable-one.md | 2 +- README.md | 22 +++++++++---------- bun.lock | 2 +- packages/classy-store/package.json | 2 +- packages/classy-store/tests/browser/README.md | 2 +- website/content/docs/API_REFERENCE.md | 2 +- website/content/docs/ARCHITECTURE.md | 2 +- website/content/docs/SOLID.md | 22 +++++++++---------- website/content/docs/UPGRADING_1_0.md | 3 ++- website/content/docs/index.md | 18 +++++++-------- 10 files changed, 38 insertions(+), 39 deletions(-) diff --git a/.changeset/stable-one.md b/.changeset/stable-one.md index 2deb16c2..bee820bb 100644 --- a/.changeset/stable-one.md +++ b/.changeset/stable-one.md @@ -14,11 +14,11 @@ Release 1.0.0, the first stable version. The public API and its behavior are now - `shallowEqual` returns `false` for values with different prototypes, compares dates by instant and maps and sets one level deep, and no longer treats arbitrary key-less objects as equal. - `devtools()` returns a handle with `dispose()` instead of a function, and no longer declares anything on the global `Window` type. - Angular: `injectStore` is renamed `injectClassyStore`. +- Solid: the adapter requires stable Solid 2 (`solid-js@^2.0.0`) and is no longer a preview. The release candidates are no longer accepted. **Other changes** - `withHistory`: undo and redo remove top-level fields that the restored entry lacks, `undo()` steps back over an edit made in the same tick, and unchanged fields keep their identity. - Reactive collections compare keys and values by identity, so a plain object works as a key whether it is given raw, as a store proxy or as a snapshot. Lookups scan the raw backing array. - `PROXYABLE` is exported so a class can opt into nested reactivity with `static [PROXYABLE] = true`. -- The Solid peer range is `^2.0.0-rc.18` (preview while Solid 2 is in release candidates). - The package declares `engines.node >= 20` and exports `./package.json`. diff --git a/README.md b/README.md index 9b4a1c18..6d02eabf 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,7 @@ Visit the **[Documentation Website](https://codebelt.github.io/classy-store/)** - Angular's `injectStore` is now `injectClassyStore`. - `subscribe()` on a nested proxy observes only that proxy's subtree. - `persist` ignores stored data whose `version` differs unless you provide `migrate`. +- The Solid adapter requires stable Solid 2 (`solid-js@^2.0.0`); update from the release candidates. Coming from an older release, apply the earlier guides first: [0.11.0](https://codebelt.github.io/classy-store/docs/UPGRADING_0_11), [0.8.0](https://codebelt.github.io/classy-store/docs/UPGRADING_0_8) and [0.7.0](https://codebelt.github.io/classy-store/docs/UPGRADING_0_7). @@ -148,10 +149,9 @@ for inputs, keyed lists, cleanup, and migration requirements. ## Solid 2 integration -The `/solid` adapter is **in preview** while Solid 2 is in release candidates. It accepts -`solid-js@^2.0.0-rc.18` and is developed against `2.0.0-rc.23`; Solid 1 is not -supported. Keep `solid-js` and the browser renderer `@solidjs/web` on the same -release candidate. `useClassyStore(store)` returns an immutable snapshot accessor +The `/solid` adapter supports **Solid 2** (`solid-js@^2.0.0`). Solid 1 and the Solid 2 +release candidates are not supported. Keep `solid-js` and the browser renderer +`@solidjs/web` on the same version. `useClassyStore(store)` returns an immutable snapshot accessor and requires a live component or `createRoot()` owner for automatic cleanup. Store changes reach Solid synchronously, while Solid 2 batches its reactive @@ -170,13 +170,13 @@ bun add @codebelt/classy-store Framework peers are optional; install only what your application uses. -| Framework | Supported peer range | -| --------------- | ----------------------------------- | -| React | `^18.0.0 \|\| ^19.0.0` | -| Vue | `^3.2.0` | -| Svelte | `^4.0.0 \|\| ^5.0.0` | -| Angular | `^22.0.0` | -| Solid (preview) | `^2.0.0-rc.18` (release candidates) | +| Framework | Supported peer range | +| --------- | ---------------------- | +| React | `^18.0.0 \|\| ^19.0.0` | +| Vue | `^3.2.0` | +| Svelte | `^4.0.0 \|\| ^5.0.0` | +| Angular | `^22.0.0` | +| Solid | `^2.0.0` | Use matching `react` and `react-dom` versions for React applications. These ranges exclude untested future majors. Development dependency pins are separate diff --git a/bun.lock b/bun.lock index 84277a83..125245c4 100644 --- a/bun.lock +++ b/bun.lock @@ -124,7 +124,7 @@ "peerDependencies": { "@angular/core": "^22.0.0", "react": "^18.0.0 || ^19.0.0", - "solid-js": "^2.0.0-rc.18", + "solid-js": "^2.0.0", "svelte": "^4.0.0 || ^5.0.0", "vue": "^3.2.0", }, diff --git a/packages/classy-store/package.json b/packages/classy-store/package.json index 3e0efabc..eeff5024 100644 --- a/packages/classy-store/package.json +++ b/packages/classy-store/package.json @@ -147,7 +147,7 @@ "vue": "^3.2.0", "svelte": "^4.0.0 || ^5.0.0", "@angular/core": "^22.0.0", - "solid-js": "^2.0.0-rc.18" + "solid-js": "^2.0.0" }, "peerDependenciesMeta": { "react": { diff --git a/packages/classy-store/tests/browser/README.md b/packages/classy-store/tests/browser/README.md index ebc174e5..39a20532 100644 --- a/packages/classy-store/tests/browser/README.md +++ b/packages/classy-store/tests/browser/README.md @@ -35,7 +35,7 @@ Run these cases with `bun run test:browser vue.spec.ts`; root `bun run typecheck checks its template through the Vue example's `check:integration` script using that example's Vue tooling and TypeScript installation. -The `/solid` fixture uses Solid 2.0.0-rc.18 and its native `@solidjs/compiler`. +The `/solid` fixture uses Solid 2.0.0 and its native `@solidjs/compiler`. Six cases cover caret editing, checkboxes, class getters and memos, native scheduling and explicit `flush()`, custom-key list identity, and component/root cleanup. The lifecycle case checks owner validation, nested and independent roots, diff --git a/website/content/docs/API_REFERENCE.md b/website/content/docs/API_REFERENCE.md index a1f12c6c..ca94d719 100644 --- a/website/content/docs/API_REFERENCE.md +++ b/website/content/docs/API_REFERENCE.md @@ -55,7 +55,7 @@ context. React's selector and auto-tracking modes are specific to `/react`. Read the [Svelte guide](./SVELTE.md) or [Vue guide](./VUE.md) for input handling, timing, and cleanup. -Solid's `useClassyStore(store)` is in preview and accepts the Solid 2 release candidates from `2.0.0-rc.18` (`^2.0.0-rc.18`). It requires a +Solid's `useClassyStore(store)` supports Solid 2 (`solid-js@^2.0.0`). It requires a live component or `createRoot()` owner and disposes its subscription with that owner. Store notifications reach its signal synchronously; Solid 2 retains its native batching. Call Solid's `flush()` when imperative code needs current diff --git a/website/content/docs/ARCHITECTURE.md b/website/content/docs/ARCHITECTURE.md index b1fbfb23..28c4900a 100644 --- a/website/content/docs/ARCHITECTURE.md +++ b/website/content/docs/ARCHITECTURE.md @@ -251,7 +251,7 @@ with `ownedWrite: true`, allowing external store notifications while an owner is active. Solid schedules its own reactive work; the adapter never calls `flush()`. A live owner is required before subscribing. Owner cleanup marks delivery inactive before removing the listener, and callbacks also check disposal during notification. -The adapter accepts Solid `^2.0.0-rc.18` and is developed against `2.0.0-rc.23`; see the [Solid guide](./SOLID.md). +The adapter supports Solid `^2.0.0`; see the [Solid guide](./SOLID.md). The Angular adapter also uses synchronous notifications, keeping its readonly snapshot signal and dependent computed reads current. Angular schedules its own diff --git a/website/content/docs/SOLID.md b/website/content/docs/SOLID.md index 407b6b71..608b6f03 100644 --- a/website/content/docs/SOLID.md +++ b/website/content/docs/SOLID.md @@ -1,14 +1,12 @@ --- -title: "Solid 2 (preview)" -description: "Use the adapter with the Solid 2 release candidates and a live Solid owner." +title: "Solid 2" +description: "Use the adapter with Solid 2 and a live Solid owner." --- -The `/solid` adapter is **in preview** while Solid 2 is in release candidates. It -accepts `solid-js@^2.0.0-rc.18`; its tests and example ran at `2.0.0-rc.18` and run -today at `2.0.0-rc.23`. A later release candidate can change Solid's API, so the -adapter may need an update before Solid 2 is stable, and such an update can ship -in a minor release of this library. Solid 1 is not supported. The import and -return shape stay the same: +The `/solid` adapter supports Solid 2 (`solid-js@^2.0.0`). Solid 1 is not +supported, and neither are the Solid 2 release candidates that earlier versions +of this library targeted: update `solid-js` and `@solidjs/web` to the stable +release. The import and return shape stay the same: ```typescript import {useClassyStore} from '@codebelt/classy-store/solid'; @@ -21,12 +19,12 @@ Install the runtime packages for a browser application: ```sh npm install @codebelt/classy-store -npm install --save-exact solid-js@2.0.0-rc.23 @solidjs/web@2.0.0-rc.23 +npm install solid-js @solidjs/web ``` -Keep `solid-js`, `@solidjs/web` and the compiler packages on the same release -candidate. The repository example uses `@solidjs/vite-plugin@3.0.0-next.51`, -`@solidjs/compiler@2.0.0-rc.23`, and Vite `8.3.8`. The Vite plugin requires +Keep `solid-js`, `@solidjs/web` and the compiler packages on the same version. +The repository example uses `@solidjs/vite-plugin@3.0.1`, which brings +`@solidjs/compiler@2.0.0`, and Vite `8.3.8`. The Vite plugin requires Node.js 22.12 or later. Use `@solidjs/web` for DOM imports and `jsxImportSource: "@solidjs/web"` in TypeScript configuration. Replace the Solid 1 `vite-plugin-solid` package with `@solidjs/vite-plugin`. diff --git a/website/content/docs/UPGRADING_1_0.md b/website/content/docs/UPGRADING_1_0.md index 9fe141a9..cb455afd 100644 --- a/website/content/docs/UPGRADING_1_0.md +++ b/website/content/docs/UPGRADING_1_0.md @@ -17,6 +17,7 @@ Changes that can require an edit: | Angular `injectStore` renamed | Import and call `injectClassyStore` | | `subscribe()` on a nested proxy no longer fires for siblings | Subscribe to the store itself if you relied on that | | `persist` ignores another stored `version` without `migrate` | Provide `migrate` to keep reading old data | +| The Solid adapter requires stable Solid 2 | Update `solid-js` and `@solidjs/web` to `^2.0.0` | | `shallowEqual` is stricter | Usually nothing; check selectors that compared unlike values | | Sync subscribers hear once per method, not once per write | Usually nothing; remove code that relied on seeing intermediate states | @@ -209,7 +210,7 @@ A class of your own can now be deeply reactive when nested in a store by declari ## Framework and package support -- **Solid** stays in preview while Solid 2 is in release candidates. The peer range is now `^2.0.0-rc.18` instead of exactly `2.0.0-rc.18`; the adapter is developed against `2.0.0-rc.23`. +- **Solid**: the adapter supports stable Solid 2 and is no longer a preview. The peer range is `^2.0.0` instead of exactly `2.0.0-rc.18`, which excludes the release candidates. Update `solid-js` and `@solidjs/web` to `2.0.0` or later; the adapter's `useClassyStore(store)` signature and behavior are unchanged. - **React** `^18.0.0 || ^19.0.0`, **Vue** `^3.2.0`, **Svelte** `^4.0.0 || ^5.0.0` and **Angular** `^22.0.0` are unchanged. - The package declares `engines.node >= 20` and exports `./package.json`. - TypeScript projects need `moduleResolution` set to `bundler`, `node16` or `nodenext` to resolve the subpath entries such as `@codebelt/classy-store/react`. The legacy `node` (node10) setting cannot resolve package `exports`; this was already the case in 0.x. diff --git a/website/content/docs/index.md b/website/content/docs/index.md index 45a740db..389f5edd 100644 --- a/website/content/docs/index.md +++ b/website/content/docs/index.md @@ -57,16 +57,16 @@ From an older release, apply the earlier notes first: [0.11.0](./UPGRADING_0_11. All framework peer dependencies are optional — install only what your project uses: -| Framework | Peer Dependency | Import | -| ----------------- | ---------------------------- | -------------------------------- | -| React | `react ^18.0.0 \|\| ^19.0.0` | `@codebelt/classy-store/react` | -| Vue | `vue ^3.2.0` | `@codebelt/classy-store/vue` | -| Svelte | `svelte ^4.0.0 \|\| ^5.0.0` | `@codebelt/classy-store/svelte` | -| Solid 2 (preview) | `solid-js ^2.0.0-rc.18` | `@codebelt/classy-store/solid` | -| Angular | `@angular/core ^22.0.0` | `@codebelt/classy-store/angular` | +| Framework | Peer Dependency | Import | +| --------- | ---------------------------- | -------------------------------- | +| React | `react ^18.0.0 \|\| ^19.0.0` | `@codebelt/classy-store/react` | +| Vue | `vue ^3.2.0` | `@codebelt/classy-store/vue` | +| Svelte | `svelte ^4.0.0 \|\| ^5.0.0` | `@codebelt/classy-store/svelte` | +| Solid 2 | `solid-js ^2.0.0` | `@codebelt/classy-store/solid` | +| Angular | `@angular/core ^22.0.0` | `@codebelt/classy-store/angular` | These ranges include stable releases within the listed majors and exclude -untested future majors. Solid remains pinned to its exact tested prerelease. +untested future majors. Solid 1 and the Solid 2 release candidates are not supported. Use matching React/React DOM versions. Development dependencies stay pinned independently of the supported consumer ranges. @@ -78,6 +78,6 @@ cleanup tests with each consumer's native compiler; CI runs them in Chromium. ## Choose a guide - [React tutorial](./TUTORIAL.md), [scoped stores](./REACT_SCOPING.md), [server rendering](./REACT_SSR.md), and [Next.js](./REACT_NEXT.md) -- [Vue](./VUE.md), [Svelte](./SVELTE.md), [Solid 2 preview](./SOLID.md), and [Angular](./ANGULAR.md) +- [Vue](./VUE.md), [Svelte](./SVELTE.md), [Solid 2](./SOLID.md), and [Angular](./ANGULAR.md) - [API reference](./API_REFERENCE.md) and [store patterns](./PATTERNS.md) - [Persistence](./PERSIST_TUTORIAL.md), [undo and redo](./HISTORY_TUTORIAL.md), [property subscriptions](./SUBSCRIBE_KEY_TUTORIAL.md), and [Redux DevTools](./DEVTOOLS_TUTORIAL.md) From fae8b1fee696323facfc089d8fa823e147df3d96 Mon Sep 17 00:00:00 2001 From: codeBelt Date: Tue, 17 Nov 2026 22:36:45 -0600 Subject: [PATCH 010/169] docs(solid): describe Solid 2 only Solid 2 is the supported version, so the documentation no longer mentions its release candidates, a preview status, or Solid 1. - README, Solid guide, API reference, docs landing page, 1.0 upgrade guide and the 1.0 changeset state the requirement as Solid 2 (`solid-js@^2.0.0`) without describing what came before. - The Solid guide opens with how to call the adapter instead of a migration note, and names `@solidjs/vite-plugin` as the Vite plugin. - The 0.11 release notes point to the Solid guide for the current requirement instead of repeating a superseded pin. The generated package changelog keeps its entries for earlier releases. Co-Authored-By: Claude Fable 5.2 --- .changeset/stable-one.md | 2 +- README.md | 14 +++++++------- website/content/docs/API_REFERENCE.md | 4 ++-- website/content/docs/SOLID.md | 11 +++++------ website/content/docs/UPGRADING_0_11.md | 2 +- website/content/docs/UPGRADING_1_0.md | 4 ++-- website/content/docs/index.md | 2 +- 7 files changed, 19 insertions(+), 20 deletions(-) diff --git a/.changeset/stable-one.md b/.changeset/stable-one.md index bee820bb..0e47c850 100644 --- a/.changeset/stable-one.md +++ b/.changeset/stable-one.md @@ -14,7 +14,7 @@ Release 1.0.0, the first stable version. The public API and its behavior are now - `shallowEqual` returns `false` for values with different prototypes, compares dates by instant and maps and sets one level deep, and no longer treats arbitrary key-less objects as equal. - `devtools()` returns a handle with `dispose()` instead of a function, and no longer declares anything on the global `Window` type. - Angular: `injectStore` is renamed `injectClassyStore`. -- Solid: the adapter requires stable Solid 2 (`solid-js@^2.0.0`) and is no longer a preview. The release candidates are no longer accepted. +- Solid: the adapter requires Solid 2 (`solid-js@^2.0.0`). **Other changes** diff --git a/README.md b/README.md index 6d02eabf..33e72856 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ Visit the **[Documentation Website](https://codebelt.github.io/classy-store/)** - Angular's `injectStore` is now `injectClassyStore`. - `subscribe()` on a nested proxy observes only that proxy's subtree. - `persist` ignores stored data whose `version` differs unless you provide `migrate`. -- The Solid adapter requires stable Solid 2 (`solid-js@^2.0.0`); update from the release candidates. +- The Solid adapter requires Solid 2 (`solid-js@^2.0.0`). Coming from an older release, apply the earlier guides first: [0.11.0](https://codebelt.github.io/classy-store/docs/UPGRADING_0_11), [0.8.0](https://codebelt.github.io/classy-store/docs/UPGRADING_0_8) and [0.7.0](https://codebelt.github.io/classy-store/docs/UPGRADING_0_7). @@ -149,16 +149,16 @@ for inputs, keyed lists, cleanup, and migration requirements. ## Solid 2 integration -The `/solid` adapter supports **Solid 2** (`solid-js@^2.0.0`). Solid 1 and the Solid 2 -release candidates are not supported. Keep `solid-js` and the browser renderer -`@solidjs/web` on the same version. `useClassyStore(store)` returns an immutable snapshot accessor -and requires a live component or `createRoot()` owner for automatic cleanup. +The `/solid` adapter supports **Solid 2** (`solid-js@^2.0.0`). Keep `solid-js` and +the browser renderer `@solidjs/web` on the same version. `useClassyStore(store)` +returns an immutable snapshot accessor and requires a live component or +`createRoot()` owner for automatic cleanup. Store changes reach Solid synchronously, while Solid 2 batches its reactive updates. Use Solid's `flush()` when imperative code needs updated computed values or DOM immediately. Ordinary core subscriptions remain batched. See the -[Solid 2 guide](https://codebelt.github.io/classy-store/docs/SOLID) for inputs, -keyed lists, ownership, and migration of the example toolchain. +[Solid 2 guide](https://codebelt.github.io/classy-store/docs/SOLID) for setup, +inputs, keyed lists, and ownership. ## 📦 Installation diff --git a/website/content/docs/API_REFERENCE.md b/website/content/docs/API_REFERENCE.md index ca94d719..2a9753ac 100644 --- a/website/content/docs/API_REFERENCE.md +++ b/website/content/docs/API_REFERENCE.md @@ -60,8 +60,8 @@ live component or `createRoot()` owner and disposes its subscription with that owner. Store notifications reach its signal synchronously; Solid 2 retains its native batching. Call Solid's `flush()` when imperative code needs current computed values or DOM. The adapter does not call it automatically, and ordinary -core subscriptions stay batched. See the [Solid 2 guide](./SOLID.md) for supported -versions, inputs, keyed lists, and migration from Solid 1. +core subscriptions stay batched. See the [Solid 2 guide](./SOLID.md) for setup, +inputs, keyed lists, and ownership. Angular's `injectClassyStore(store)` supports **all stable Angular 22 releases** (`^22.0.0`). It requires a live diff --git a/website/content/docs/SOLID.md b/website/content/docs/SOLID.md index 608b6f03..25b42220 100644 --- a/website/content/docs/SOLID.md +++ b/website/content/docs/SOLID.md @@ -3,10 +3,9 @@ title: "Solid 2" description: "Use the adapter with Solid 2 and a live Solid owner." --- -The `/solid` adapter supports Solid 2 (`solid-js@^2.0.0`). Solid 1 is not -supported, and neither are the Solid 2 release candidates that earlier versions -of this library targeted: update `solid-js` and `@solidjs/web` to the stable -release. The import and return shape stay the same: +The `/solid` adapter supports Solid 2 (`solid-js@^2.0.0`). Call +`useClassyStore(store)` in a component or a live `createRoot()`. It returns an +accessor for the store's current immutable snapshot: ```typescript import {useClassyStore} from '@codebelt/classy-store/solid'; @@ -26,8 +25,8 @@ Keep `solid-js`, `@solidjs/web` and the compiler packages on the same version. The repository example uses `@solidjs/vite-plugin@3.0.1`, which brings `@solidjs/compiler@2.0.0`, and Vite `8.3.8`. The Vite plugin requires Node.js 22.12 or later. Use `@solidjs/web` for DOM imports and -`jsxImportSource: "@solidjs/web"` in TypeScript configuration. Replace the -Solid 1 `vite-plugin-solid` package with `@solidjs/vite-plugin`. +`jsxImportSource: "@solidjs/web"` in TypeScript configuration, and +`@solidjs/vite-plugin` as the Vite plugin. ## Inputs, computed values, and lists diff --git a/website/content/docs/UPGRADING_0_11.md b/website/content/docs/UPGRADING_0_11.md index 02336929..18dff6de 100644 --- a/website/content/docs/UPGRADING_0_11.md +++ b/website/content/docs/UPGRADING_0_11.md @@ -7,7 +7,7 @@ Applications upgrading from 0.10.x can keep their existing store definitions and ## Framework support -**The Solid adapter is in preview.** Applications using `@codebelt/classy-store/solid` must pin `solid-js` to exactly `2.0.0-rc.18`. Browser applications must also pin `@solidjs/web` to `2.0.0-rc.18`. Check the adapter's peer requirement before upgrading Solid. [Solid integration guide](./SOLID.md) +**Solid.** Applications using `@codebelt/classy-store/solid` should check the adapter's peer requirement before upgrading Solid. The current requirement is in the [Solid integration guide](./SOLID.md). **Angular supports all stable 22.x releases** through the optional `@angular/core` peer range `^22.0.0`. The library's development dependencies and example use Angular `22.2.6`. Keep your application's Angular runtime and compiler packages on matching versions. [Angular integration guide](./ANGULAR.md) diff --git a/website/content/docs/UPGRADING_1_0.md b/website/content/docs/UPGRADING_1_0.md index cb455afd..adedc6f9 100644 --- a/website/content/docs/UPGRADING_1_0.md +++ b/website/content/docs/UPGRADING_1_0.md @@ -17,7 +17,7 @@ Changes that can require an edit: | Angular `injectStore` renamed | Import and call `injectClassyStore` | | `subscribe()` on a nested proxy no longer fires for siblings | Subscribe to the store itself if you relied on that | | `persist` ignores another stored `version` without `migrate` | Provide `migrate` to keep reading old data | -| The Solid adapter requires stable Solid 2 | Update `solid-js` and `@solidjs/web` to `^2.0.0` | +| The Solid adapter requires Solid 2 | Install `solid-js` and `@solidjs/web` `^2.0.0` | | `shallowEqual` is stricter | Usually nothing; check selectors that compared unlike values | | Sync subscribers hear once per method, not once per write | Usually nothing; remove code that relied on seeing intermediate states | @@ -210,7 +210,7 @@ A class of your own can now be deeply reactive when nested in a store by declari ## Framework and package support -- **Solid**: the adapter supports stable Solid 2 and is no longer a preview. The peer range is `^2.0.0` instead of exactly `2.0.0-rc.18`, which excludes the release candidates. Update `solid-js` and `@solidjs/web` to `2.0.0` or later; the adapter's `useClassyStore(store)` signature and behavior are unchanged. +- **Solid**: the adapter requires Solid 2. The peer range is `solid-js ^2.0.0`; install `solid-js` and `@solidjs/web` at `2.0.0` or later. The adapter's `useClassyStore(store)` signature and behavior are unchanged. - **React** `^18.0.0 || ^19.0.0`, **Vue** `^3.2.0`, **Svelte** `^4.0.0 || ^5.0.0` and **Angular** `^22.0.0` are unchanged. - The package declares `engines.node >= 20` and exports `./package.json`. - TypeScript projects need `moduleResolution` set to `bundler`, `node16` or `nodenext` to resolve the subpath entries such as `@codebelt/classy-store/react`. The legacy `node` (node10) setting cannot resolve package `exports`; this was already the case in 0.x. diff --git a/website/content/docs/index.md b/website/content/docs/index.md index 389f5edd..e577a93b 100644 --- a/website/content/docs/index.md +++ b/website/content/docs/index.md @@ -66,7 +66,7 @@ All framework peer dependencies are optional — install only what your project | Angular | `@angular/core ^22.0.0` | `@codebelt/classy-store/angular` | These ranges include stable releases within the listed majors and exclude -untested future majors. Solid 1 and the Solid 2 release candidates are not supported. +untested future majors. Use matching React/React DOM versions. Development dependencies stay pinned independently of the supported consumer ranges. From b201de9f1c7a00392b451c41c79e6006d8eed000 Mon Sep 17 00:00:00 2001 From: codeBelt Date: Tue, 17 Nov 2026 22:36:45 -0600 Subject: [PATCH 011/169] chore(deps): update the docs site, example TypeScript and CI Bun - Docs site: fumadocs-core and the fumadocs UI 16.19.4, fumadocs-mdx 15.6.3, mermaid 12.3.0, Tailwind 4.3.5, and patch updates to postcss, serve and the Node types. The site builds, typechecks and passes its 38 page tests. - Examples: TypeScript 7.0.2 for Solid, 6.0.3 for Vue and Svelte. Their TypeScript configs drop `baseUrl`, which TypeScript 7 removed and 6 deprecates; `paths` already resolve relative to each config. - CI: Bun 1.4.4. Left as they are, each for a tested or declared reason: - TypeScript stays on 6.0.3 in the Angular example (the Angular compiler requires >=6.0 <6.1) and cannot go past 6 in the Vue and Svelte examples (vue-tsc fails to load on 7; svelte-check accepts 5 or 6). - @babel/core stays on 7: with 8, babel-plugin-react-compiler 1.0.0 skips components with a compile error. - @changesets/cli 3 and @changesets/changelog-github 1 change the release commands this repository's workflow uses; that belongs in its own change after 1.0.0 is published. Co-Authored-By: Claude Fable 5.2 --- .github/workflows/ci.yml | 2 +- .github/workflows/docs.yml | 2 +- .github/workflows/react-compatibility.yml | 2 +- .github/workflows/react-next.yml | 2 +- .github/workflows/release.yml | 2 +- bun.lock | 12 +- examples/solid/package.json | 2 +- examples/solid/tsconfig.json | 1 - examples/svelte/package.json | 2 +- examples/svelte/tsconfig.json | 1 - examples/vue/package.json | 2 +- examples/vue/tsconfig.app.json | 1 - website/bun.lock | 178 +++++++++------------- website/package.json | 18 +-- 14 files changed, 91 insertions(+), 136 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 005430f4..94afcd22 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,7 +13,7 @@ jobs: node-version: "24" - uses: oven-sh/setup-bun@v2 with: - bun-version: "1.4.3" + bun-version: "1.4.4" - run: bun install --frozen-lockfile - run: bun run lint - run: bun run test diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index b30be12a..f11d7f91 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -26,7 +26,7 @@ jobs: node-version: "24" - uses: oven-sh/setup-bun@v2 with: - bun-version: "1.4.3" + bun-version: "1.4.4" - run: bun install --cwd website --frozen-lockfile - run: bun run docs:build - run: bunx playwright install --with-deps chromium diff --git a/.github/workflows/react-compatibility.yml b/.github/workflows/react-compatibility.yml index f68bb146..4452e4bf 100644 --- a/.github/workflows/react-compatibility.yml +++ b/.github/workflows/react-compatibility.yml @@ -18,7 +18,7 @@ jobs: node-version: "24" - uses: oven-sh/setup-bun@v2 with: - bun-version: "1.4.3" + bun-version: "1.4.4" - run: bun install --frozen-lockfile - run: bun run build - run: node packages/classy-store/tests/compatibility/runCompatibility.mjs "${{ matrix.react }}" diff --git a/.github/workflows/react-next.yml b/.github/workflows/react-next.yml index dc76f37e..101e2b1e 100644 --- a/.github/workflows/react-next.yml +++ b/.github/workflows/react-next.yml @@ -20,7 +20,7 @@ jobs: node-version: "24" - uses: oven-sh/setup-bun@v2 with: - bun-version: "1.4.3" + bun-version: "1.4.4" - run: bun install --frozen-lockfile - name: Use Ubuntu archive mirror for browser dependencies run: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 46826ef2..e91ce365 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,7 +21,7 @@ jobs: node-version: "24" - uses: oven-sh/setup-bun@v2 with: - bun-version: "1.4.3" + bun-version: "1.4.4" - run: bun install --frozen-lockfile - run: bun run build - name: Create Release PR or Detect Publishable Versions diff --git a/bun.lock b/bun.lock index 125245c4..5bf6cc18 100644 --- a/bun.lock +++ b/bun.lock @@ -59,7 +59,7 @@ }, "devDependencies": { "@solidjs/vite-plugin": "3.0.1", - "typescript": "^5.7.0", + "typescript": "^7.0.2", "vite": "8.3.8", }, }, @@ -73,7 +73,7 @@ "devDependencies": { "@sveltejs/vite-plugin-svelte": "7.3.1", "svelte-check": "4.7.8", - "typescript": "^5.7.0", + "typescript": "^6.0.3", "vite": "8.3.8", }, }, @@ -86,7 +86,7 @@ }, "devDependencies": { "@vitejs/plugin-vue": "6.0.11", - "typescript": "^5.7.0", + "typescript": "^6.0.3", "vite": "8.3.8", "vue-tsc": "3.3.14", }, @@ -1571,13 +1571,11 @@ "classy-store-angular-example/typescript": ["typescript@6.0.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw=="], - "classy-store-solid-example/typescript": ["typescript@5.9.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw=="], - "classy-store-svelte-example/svelte-check": ["svelte-check@4.7.8", "", { "dependencies": { "@jridgewell/trace-mapping": "^0.3.25", "@sveltejs/load-config": "^0.2.3", "chokidar": "^4.0.1", "fdir": "^6.2.0", "picocolors": "^1.0.0", "sade": "^1.7.4" }, "peerDependencies": { "svelte": "^4.0.0 || ^5.0.0-next.0", "typescript": "^5.0.0 || ^6.0.0" }, "bin": { "svelte-check": "bin/svelte-check" } }, "sha512-laZ49GFHZ3b0z2PWinJWL0syehc/PTR8aHaUaTiBkWJ+4Y38nhxjmXsSz7CbGa3VdKopViVbrBH3bGNqIAI0bQ=="], - "classy-store-svelte-example/typescript": ["typescript@5.9.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw=="], + "classy-store-svelte-example/typescript": ["typescript@6.0.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw=="], - "classy-store-vue-example/typescript": ["typescript@5.9.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw=="], + "classy-store-vue-example/typescript": ["typescript@6.0.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw=="], "cli-highlight/parse5": ["parse5@5.1.1", "", {}, "sha512-ugq4DFI0Ptb+WWjAdOK16+u/nHfiIrcE+sh8kZMaM0WllQKLI9rOUq6c2b7cwPkXdzfQESqvoqK6ug7U/Yyzug=="], diff --git a/examples/solid/package.json b/examples/solid/package.json index aeec02aa..11c0e79c 100644 --- a/examples/solid/package.json +++ b/examples/solid/package.json @@ -17,7 +17,7 @@ }, "devDependencies": { "@solidjs/vite-plugin": "3.0.1", - "typescript": "^5.7.0", + "typescript": "^7.0.2", "vite": "8.3.8" } } diff --git a/examples/solid/tsconfig.json b/examples/solid/tsconfig.json index cfedb9f8..4459435c 100644 --- a/examples/solid/tsconfig.json +++ b/examples/solid/tsconfig.json @@ -17,7 +17,6 @@ "noUnusedLocals": false, "noUnusedParameters": false, "noFallthroughCasesInSwitch": true, - "baseUrl": ".", "paths": { "@codebelt/classy-store": ["../../packages/classy-store/src/index.ts"], "@codebelt/classy-store/solid": [ diff --git a/examples/svelte/package.json b/examples/svelte/package.json index 3132ad3a..d774cd6d 100644 --- a/examples/svelte/package.json +++ b/examples/svelte/package.json @@ -17,7 +17,7 @@ "devDependencies": { "@sveltejs/vite-plugin-svelte": "7.3.1", "svelte-check": "4.7.8", - "typescript": "^5.7.0", + "typescript": "^6.0.3", "vite": "8.3.8" } } diff --git a/examples/svelte/tsconfig.json b/examples/svelte/tsconfig.json index 11488eb9..f36f4513 100644 --- a/examples/svelte/tsconfig.json +++ b/examples/svelte/tsconfig.json @@ -15,7 +15,6 @@ "noUnusedLocals": false, "noUnusedParameters": false, "noFallthroughCasesInSwitch": true, - "baseUrl": ".", "paths": { "@codebelt/classy-store": ["../../packages/classy-store/src/index.ts"], "@codebelt/classy-store/svelte": [ diff --git a/examples/vue/package.json b/examples/vue/package.json index af5c1d18..68c4efa5 100644 --- a/examples/vue/package.json +++ b/examples/vue/package.json @@ -15,7 +15,7 @@ }, "devDependencies": { "@vitejs/plugin-vue": "6.0.11", - "typescript": "^5.7.0", + "typescript": "^6.0.3", "vite": "8.3.8", "vue-tsc": "3.3.14" } diff --git a/examples/vue/tsconfig.app.json b/examples/vue/tsconfig.app.json index 89954675..efc1a689 100644 --- a/examples/vue/tsconfig.app.json +++ b/examples/vue/tsconfig.app.json @@ -17,7 +17,6 @@ "noUnusedParameters": false, "noFallthroughCasesInSwitch": true, "noUncheckedSideEffectImports": true, - "baseUrl": ".", "paths": { "@codebelt/classy-store": ["../../packages/classy-store/src/index.ts"], "@codebelt/classy-store/vue": [ diff --git a/website/bun.lock b/website/bun.lock index 72306422..3e72e0a5 100644 --- a/website/bun.lock +++ b/website/bun.lock @@ -6,10 +6,10 @@ "name": "website-fumadocs", "dependencies": { "@codebelt/classy-store": "0.11.0", - "fumadocs-core": "16.17.7", - "fumadocs-mdx": "15.4.9", - "fumadocs-ui": "npm:@fumadocs/base-ui@16.17.7", - "mermaid": "^12.2.0", + "fumadocs-core": "16.19.4", + "fumadocs-mdx": "15.6.3", + "fumadocs-ui": "npm:@fumadocs/base-ui@16.19.4", + "mermaid": "^12.3.0", "next": "16.4.6", "next-themes": "0.4.6", "react": "^19.3.1", @@ -17,14 +17,14 @@ }, "devDependencies": { "@playwright/test": "1.65.1", - "@tailwindcss/postcss": "^4.3.3", + "@tailwindcss/postcss": "^4.3.5", "@types/mdx": "^2.0.14", - "@types/node": "^26.6.5", + "@types/node": "^26.6.6", "@types/react": "^19.3.0", "@types/react-dom": "^19.3.0", - "postcss": "^8.5.31", - "serve": "^14.2.6", - "tailwindcss": "^4.3.3", + "postcss": "^8.5.33", + "serve": "^14.2.8", + "tailwindcss": "^4.3.5", "typescript": "^7.0.2", }, }, @@ -118,7 +118,7 @@ "@fuma-translate/react": ["@fuma-translate/react@1.0.2", "", { "peerDependencies": { "@types/react": "*", "react": "^19.2.0", "react-dom": "^19.2.0" }, "optionalPeers": ["@types/react"] }, "sha512-uOiOtBx3nRXR8Nu1GzBf1tApgF1FErDBTHxRIAQeyQdyOoZbrNRN6H4kDCWObY4qyGeGbHydG0DHzgeUgFDMIw=="], - "@fumadocs/tailwind": ["@fumadocs/tailwind@0.1.4", "", { "peerDependencies": { "tailwindcss": "^4.0.0" }, "optionalPeers": ["tailwindcss"] }, "sha512-1LAmuroJ6TJoQodyODRhMC9ThAkfrV2N5vZjaj4KKs+dpF2bs0d/2z0604iMKBLv2BKstR7zE9TUa/L0pxGnhA=="], + "@fumadocs/tailwind": ["@fumadocs/tailwind@0.1.5", "", { "peerDependencies": { "tailwindcss": "^4.0.0" }, "optionalPeers": ["tailwindcss"] }, "sha512-ohzmuLTfNNRvP6B/Xx31lWJ58xu40NcmI+6mc/jivYeOoofnmdxBKu5gCErTgOE/mUqyVv4GvYeqd9FhoLHphg=="], "@fumari/image-size": ["@fumari/image-size@0.1.1", "", {}, "sha512-iaiV2wyzJ4mW358NX4CX3yGit+WjKYzpaQ+rldK9BjL/5jFpeV6ruWnZVq7MEyMn3Gd0DLi8g/79NZAAQaGscw=="], @@ -214,19 +214,19 @@ "@playwright/test": ["@playwright/test@1.65.1", "", { "dependencies": { "playwright": "1.65.1" }, "bin": { "playwright": "cli.js" } }, "sha512-y+NCIRm2LvY4slUVWvGh1nujJ8RF/hEisIsq2mtUPgdQC4L701bq5hZGMhrpeXjACvwvO9tj5dJqhvM6TP9lbw=="], - "@shikijs/core": ["@shikijs/core@4.5.0", "", { "dependencies": { "@shikijs/primitive": "4.5.0", "@shikijs/types": "4.5.0", "@shikijs/vscode-textmate": "^10.0.2", "@types/hast": "^3.0.5", "hast-util-to-html": "^9.0.5" } }, "sha512-6CIgwq+bt2JZ3OSjb/nBkkwEf/CfpHcbam+Mg5Pllco7HAGRQ2/EFhZrrJtbyNTgKwknfVS+llsXGygiDGwJWw=="], + "@shikijs/core": ["@shikijs/core@4.6.0", "", { "dependencies": { "@shikijs/primitive": "4.6.0", "@shikijs/types": "4.6.0", "@shikijs/vscode-textmate": "^10.1.0", "@types/hast": "^3.0.5", "hast-util-to-html": "^9.0.6" } }, "sha512-bfd4OKgvoyXYiYmMRuleA656P4V7M/Du9lcTl38Ngm6KszMj7bq4J1IGZwSYR4c95Tv5UQALtYNWUwaI9UT3xw=="], - "@shikijs/engine-javascript": ["@shikijs/engine-javascript@4.5.0", "", { "dependencies": { "@shikijs/types": "4.5.0", "@shikijs/vscode-textmate": "^10.0.2", "oniguruma-to-es": "^4.3.6" } }, "sha512-Ed6UdEj84LyYkwnxM5CvSMWAD+id9ExTYri0/+x41U9zrgNifPSS9lZm0JqBP0VfYI8yr8tY5nbNq9+p9R0kFA=="], + "@shikijs/engine-javascript": ["@shikijs/engine-javascript@4.6.0", "", { "dependencies": { "@shikijs/types": "4.6.0", "@shikijs/vscode-textmate": "^10.1.0", "oniguruma-to-es": "^4.3.6" } }, "sha512-K0oqxFoL+kEMdz89mHLFO15Tsbv3kFZ6WR1cXZKMvLSc+oqaM00A6pyga1qSeXB22dP0tTiSApRcGBaKWsEccg=="], - "@shikijs/engine-oniguruma": ["@shikijs/engine-oniguruma@4.5.0", "", { "dependencies": { "@shikijs/types": "4.5.0", "@shikijs/vscode-textmate": "^10.0.2" } }, "sha512-dKVmbJecVdB9recl8a/CU4jdpNXyjJQrIcesIkpS70s5HS02ohpnCSpMUbotPnEUzbAcLQ+S4hwZYbkBBiTcJw=="], + "@shikijs/engine-oniguruma": ["@shikijs/engine-oniguruma@4.6.0", "", { "dependencies": { "@shikijs/types": "4.6.0", "@shikijs/vscode-textmate": "^10.1.0" } }, "sha512-aggd6Q7SuJOXNnsUbfG2XesxBJKBMAw/PDTUo9PyRjMaaJJ2dNrI+q0C+25ARXAK9yLHAlwxc9oRT2u68YKZ7w=="], - "@shikijs/langs": ["@shikijs/langs@4.5.0", "", { "dependencies": { "@shikijs/types": "4.5.0" } }, "sha512-wwBTqwduXSz0X4v9Qa2EWeFaYJEw1clCncWjoRNQRbVDu3SPRTRWucnouYapKj3b8Q+sk/41Vbc4B5c8nuYzLA=="], + "@shikijs/langs": ["@shikijs/langs@4.6.0", "", { "dependencies": { "@shikijs/types": "4.6.0" } }, "sha512-1yMEX3oCVV54LUq/ovfpRkDQoYDkcvjSWFFa/YLUDMiSoRzMi2uxLJYbv41ahT8Lu9lFMaa7hecd3Q39trqUyg=="], - "@shikijs/primitive": ["@shikijs/primitive@4.5.0", "", { "dependencies": { "@shikijs/types": "4.5.0", "@shikijs/vscode-textmate": "^10.0.2", "@types/hast": "^3.0.5" } }, "sha512-UM7ShlA8oz0OWxLLO8BmO9Ip6fVqdkt8yF0EH7nOCqHfrx1eEAzF0ZUVK7L+I8NEgeu1PEWSRlxaiPPeCb4iDg=="], + "@shikijs/primitive": ["@shikijs/primitive@4.6.0", "", { "dependencies": { "@shikijs/types": "4.6.0", "@shikijs/vscode-textmate": "^10.1.0", "@types/hast": "^3.0.5" } }, "sha512-c54+TQEo9ToqgfL/AU8FpjnV09+GA9Oa7M5ROkkXteZfp5XzpAJGXjjvZQFQioJOwm/w/6Z3lIzQstAkl8coag=="], - "@shikijs/themes": ["@shikijs/themes@4.5.0", "", { "dependencies": { "@shikijs/types": "4.5.0" } }, "sha512-zGb87H3UBbpuI4yoh5UguB1XbU+2BDU3kflM7UfZ+Cy2hWo9lBtqjSVK20gmLY6ukYl040hAypGXMgud9vul8Q=="], + "@shikijs/themes": ["@shikijs/themes@4.6.0", "", { "dependencies": { "@shikijs/types": "4.6.0" } }, "sha512-qHAVAs80RiGD+IRuH9G+JPDOEc9A/kHsng4EzCUCwB9bLzW6Z0y9WETh2YyCcADJBmfrIaJ1Jp7KBNP6FHkgtQ=="], - "@shikijs/types": ["@shikijs/types@4.5.0", "", { "dependencies": { "@shikijs/vscode-textmate": "^10.0.2", "@types/hast": "^3.0.5" } }, "sha512-drtPrtD8N0DENyD2cyt6Ajy+IWsiCLgMxODwLTpvH1UsN6a9jf90tNTPjqwHvA+0Lzu9e0txk8DjfqH1p9UJRw=="], + "@shikijs/types": ["@shikijs/types@4.6.0", "", { "dependencies": { "@shikijs/vscode-textmate": "^10.1.0", "@types/hast": "^3.0.5" } }, "sha512-+ENG1adsKt/X7cRYw1Nl7BEpBmPOjmQ7bR/eGmHuMlT8gtOFf3KEi5l31DJYyAWhW6Y6bjP1plU7FmaxWGENFw=="], "@shikijs/vscode-textmate": ["@shikijs/vscode-textmate@10.1.0", "", {}, "sha512-cVBuhDQjBZaNMTwBquYfPydrUP+E3hE6oYGasx8h6ZrODIM7/r+gxLDXdd66oszbrggZHEntdE6j+5gYIVyMWQ=="], @@ -234,35 +234,35 @@ "@swc/helpers": ["@swc/helpers@0.5.23", "", { "dependencies": { "tslib": "^2.8.0" } }, "sha512-5lSsMOTXURePglDfvuAQUqkGek9Hg2kksOYay2m0+XR++b2NWYL/4sWyuvVBIs8oKnJaxkdi9whaL/sqN13afw=="], - "@tailwindcss/node": ["@tailwindcss/node@4.3.3", "", { "dependencies": { "@jridgewell/remapping": "^2.3.5", "enhanced-resolve": "^5.24.1", "jiti": "^2.7.0", "lightningcss": "1.32.0", "magic-string": "^0.30.21", "source-map-js": "^1.2.1", "tailwindcss": "4.3.3" } }, "sha512-/T8IKEsf9VTU6tLjgC7+sv2mOPtQxzE2jMw7u4Tt40Tx+QSZxpzh95/H6cMKoja9XuW7iMdLJYBB0o9G1CaAgg=="], + "@tailwindcss/node": ["@tailwindcss/node@4.3.5", "", { "dependencies": { "@jridgewell/remapping": "^2.3.5", "enhanced-resolve": "^5.24.5", "jiti": "^2.7.0", "lightningcss": "1.33.0", "magic-string": "^1.1.0", "source-map-js": "^1.2.1", "tailwindcss": "4.3.5" } }, "sha512-yT53FzV4ke0cr/BguDxhWMpm5MJu1O2muzk+tKw6lKHjODAsYArBbWwFbJiaksfzFv1tpkO9QHGzmfs1hJT66g=="], - "@tailwindcss/oxide": ["@tailwindcss/oxide@4.3.3", "", { "optionalDependencies": { "@tailwindcss/oxide-android-arm64": "4.3.3", "@tailwindcss/oxide-darwin-arm64": "4.3.3", "@tailwindcss/oxide-darwin-x64": "4.3.3", "@tailwindcss/oxide-freebsd-x64": "4.3.3", "@tailwindcss/oxide-linux-arm-gnueabihf": "4.3.3", "@tailwindcss/oxide-linux-arm64-gnu": "4.3.3", "@tailwindcss/oxide-linux-arm64-musl": "4.3.3", "@tailwindcss/oxide-linux-x64-gnu": "4.3.3", "@tailwindcss/oxide-linux-x64-musl": "4.3.3", "@tailwindcss/oxide-wasm32-wasi": "4.3.3", "@tailwindcss/oxide-win32-arm64-msvc": "4.3.3", "@tailwindcss/oxide-win32-x64-msvc": "4.3.3" } }, "sha512-krXjAikiaFSPaK/FkAQT5UTx3VormQaiZ5hBFlJZ9UFQGB/rwg1MZIhHAG9smMQRTdyJxP6Qt5MwMtdyU5FWrA=="], + "@tailwindcss/oxide": ["@tailwindcss/oxide@4.3.5", "", { "optionalDependencies": { "@tailwindcss/oxide-android-arm64": "4.3.5", "@tailwindcss/oxide-darwin-arm64": "4.3.5", "@tailwindcss/oxide-darwin-x64": "4.3.5", "@tailwindcss/oxide-freebsd-x64": "4.3.5", "@tailwindcss/oxide-linux-arm-gnueabihf": "4.3.5", "@tailwindcss/oxide-linux-arm64-gnu": "4.3.5", "@tailwindcss/oxide-linux-arm64-musl": "4.3.5", "@tailwindcss/oxide-linux-x64-gnu": "4.3.5", "@tailwindcss/oxide-linux-x64-musl": "4.3.5", "@tailwindcss/oxide-wasm32-wasi": "4.3.5", "@tailwindcss/oxide-win32-arm64-msvc": "4.3.5", "@tailwindcss/oxide-win32-x64-msvc": "4.3.5" } }, "sha512-PynqGLZsZvwM9tqD/CUxkOIfyd6K5elZ2MooauzJryP/UqXYgi3yYbtt3N0Xe+MHV/eFKPFQCEfIKAqlAS1CBg=="], - "@tailwindcss/oxide-android-arm64": ["@tailwindcss/oxide-android-arm64@4.3.3", "", { "os": "android", "cpu": "arm64" }, "sha512-Y85A2gmPSkl5Ve5qR86GL4HT509cFqQh1aes9p3sSkyTPwt0Pppf3GkwGe4JPACcRYjgJIEhQgM6dBClnr0NYw=="], + "@tailwindcss/oxide-android-arm64": ["@tailwindcss/oxide-android-arm64@4.3.5", "", { "os": "android", "cpu": "arm64" }, "sha512-Se0z5xMqcSQanJD1IYmO0cGpK3iv0fp3ZsIT7xRJZ1Da5PghvNoc46zz4jIQn+aan3dV9T8AermFNN9QPmsh0Q=="], - "@tailwindcss/oxide-darwin-arm64": ["@tailwindcss/oxide-darwin-arm64@4.3.3", "", { "os": "darwin", "cpu": "arm64" }, "sha512-BiaWatpBcERQFDlOjRDpIVXuFK5PJez5SA4JMg6VYZdBYU+qKfV/vqjcIs+IYmtitf1xYQZTwXvU/8y4lfZUGw=="], + "@tailwindcss/oxide-darwin-arm64": ["@tailwindcss/oxide-darwin-arm64@4.3.5", "", { "os": "darwin", "cpu": "arm64" }, "sha512-UPrgTDuUbvmqGMZuCnmI3FKee/tYKzKdp00/kuB4oSGB213VYg8QTdF7lVhnPoBXq/mIfJ+ILoBFqNOboWcMwQ=="], - "@tailwindcss/oxide-darwin-x64": ["@tailwindcss/oxide-darwin-x64@4.3.3", "", { "os": "darwin", "cpu": "x64" }, "sha512-fAeUqfV5ndhxRwai8cXGzdLvul9utWOmeTkv69unv4ZXixjn61Z+p9lCWdwOwA3TYboG3BwdVuN/RDjhBRl0mw=="], + "@tailwindcss/oxide-darwin-x64": ["@tailwindcss/oxide-darwin-x64@4.3.5", "", { "os": "darwin", "cpu": "x64" }, "sha512-E+p7HEtjI0b8D7kbbWxH067cGui6d4c79COGko9fAPVE3rwc1E7ld2HFCbaG86AOGWS5VKQYqZOaf38ya4uxTQ=="], - "@tailwindcss/oxide-freebsd-x64": ["@tailwindcss/oxide-freebsd-x64@4.3.3", "", { "os": "freebsd", "cpu": "x64" }, "sha512-iyf5bV6+wnAlflVeEy7R25dupxTNECZN5QMI0qNT6eT+EgaGdZcKhGkr5SdoaWiLJ3spLqIY9VCeSGrwmtg4kw=="], + "@tailwindcss/oxide-freebsd-x64": ["@tailwindcss/oxide-freebsd-x64@4.3.5", "", { "os": "freebsd", "cpu": "x64" }, "sha512-yWEWcWyAG7rWOcTpJTjdhQ3pcaFY2h+0bqTRfgU3G2fz87ZU3AKdvdZKhslD+kyHnjBUWKvNdRYwIYC5dI1tIg=="], - "@tailwindcss/oxide-linux-arm-gnueabihf": ["@tailwindcss/oxide-linux-arm-gnueabihf@4.3.3", "", { "os": "linux", "cpu": "arm" }, "sha512-aAYUprJAJQWWbRrPvtjdroZ56Md+JM8pMiopS6xGEwDfLhqj+2ver2p4nU4Mb3CRqcMmNBjo8KkUgcxhkzVQGQ=="], + "@tailwindcss/oxide-linux-arm-gnueabihf": ["@tailwindcss/oxide-linux-arm-gnueabihf@4.3.5", "", { "os": "linux", "cpu": "arm" }, "sha512-WmeVjtJhZlr+smpqcdR2kQkkn6arHIJnUIBxTO2EJcTLGY1ecVXNo2hbSn8xc0IH2aEtys936iMWKGyj0GaKnA=="], - "@tailwindcss/oxide-linux-arm64-gnu": ["@tailwindcss/oxide-linux-arm64-gnu@4.3.3", "", { "os": "linux", "cpu": "arm64" }, "sha512-nDxldcEENOxZRzC2uu9jrutZdAAQtb+8WWDCSnWL1zvBk1+FN+x6MtDViPB5AJMfttVCUhehGWus3XBPgatM/w=="], + "@tailwindcss/oxide-linux-arm64-gnu": ["@tailwindcss/oxide-linux-arm64-gnu@4.3.5", "", { "os": "linux", "cpu": "arm64", "libc": "glibc" }, "sha512-DTCSyucc6ShMp1QMqV5R94Z7xlgNgUzkGmFF1rL5HH2Qjy4eSmEqy+YLGkqqYvWa4sILtgrBt1JjRKbneQtiFQ=="], - "@tailwindcss/oxide-linux-arm64-musl": ["@tailwindcss/oxide-linux-arm64-musl@4.3.3", "", { "os": "linux", "cpu": "arm64" }, "sha512-Md44bD6veX/PC5iyF8cDVnw4HBIANZepRZZ7a8DQOvkfo5WUBwcp6iAuCUz23u+4SUkhJlD3eL7hNdW8ezd/kA=="], + "@tailwindcss/oxide-linux-arm64-musl": ["@tailwindcss/oxide-linux-arm64-musl@4.3.5", "", { "os": "linux", "cpu": "arm64", "libc": "musl" }, "sha512-H9lsvO4x9E4nE4Hi8h7NHHw0O/kcVSu+iOyFHNGdYzazGgDjFHZbE6S3hQ8kMcbNXSBlMdNi67LV5EVqtpaJtw=="], - "@tailwindcss/oxide-linux-x64-gnu": ["@tailwindcss/oxide-linux-x64-gnu@4.3.3", "", { "os": "linux", "cpu": "x64" }, "sha512-tx7us1muwOKAKWao2v/GaafFeQboE6aj88vC6ziN2NCGcRm8gWUhwjzg+YdVB1e4boAtdtma4L43onunI6NS4w=="], + "@tailwindcss/oxide-linux-x64-gnu": ["@tailwindcss/oxide-linux-x64-gnu@4.3.5", "", { "os": "linux", "cpu": "x64", "libc": "glibc" }, "sha512-4uxQvtBvPuIdl13WfUBj9xMZHH14PtHZ8OZdtLmdyDtG66sCa1t599NZT+jagkUzRtWhuul1qRZQ1nAJscXN5g=="], - "@tailwindcss/oxide-linux-x64-musl": ["@tailwindcss/oxide-linux-x64-musl@4.3.3", "", { "os": "linux", "cpu": "x64" }, "sha512-SJxX60smvHgasZoBy11dX6YRjXJFovwWBoedhbQPOBzgFWBHGB+TVPWB9BxzR7TTxU8FQZAI2AyiNCMzFm8Img=="], + "@tailwindcss/oxide-linux-x64-musl": ["@tailwindcss/oxide-linux-x64-musl@4.3.5", "", { "os": "linux", "cpu": "x64", "libc": "musl" }, "sha512-0JQAzs7jwbA7O6+z/adU+Jk3AXwsu3npAhtr5escXS7TqEqWcaDV7qHuI+0Vy/KQRuVGnLQREcSJWYauyV3oqg=="], - "@tailwindcss/oxide-wasm32-wasi": ["@tailwindcss/oxide-wasm32-wasi@4.3.3", "", { "dependencies": { "@emnapi/core": "^1.11.1", "@emnapi/runtime": "^1.11.1", "@emnapi/wasi-threads": "^1.2.2", "@napi-rs/wasm-runtime": "^1.1.4", "@tybys/wasm-util": "^0.10.2", "tslib": "^2.8.1" }, "cpu": "none" }, "sha512-jx1+rPhY/5Ympkktd656HBWEBLxP7dH06losBLjjf5vgCODXvi9KhtftWcMIwTFIDqBr7cRnQkdLnAG+IOlGvQ=="], + "@tailwindcss/oxide-wasm32-wasi": ["@tailwindcss/oxide-wasm32-wasi@4.3.5", "", { "dependencies": { "@emnapi/core": "^1.11.3", "@emnapi/runtime": "^1.11.3", "@emnapi/wasi-threads": "^1.2.3", "@napi-rs/wasm-runtime": "^1.2.2", "@tybys/wasm-util": "^0.10.3", "tslib": "^2.8.1" } }, "sha512-OJhFmlEfdzMr+avACdi40RPtnkW0B6hXyxL/8r+tnEHBWZji36CYRjEXrrvgBmaYsD3oEOBqwYFRKsYvzFe7Bw=="], - "@tailwindcss/oxide-win32-arm64-msvc": ["@tailwindcss/oxide-win32-arm64-msvc@4.3.3", "", { "os": "win32", "cpu": "arm64" }, "sha512-3rc292Ca2ceK6Ulcc/bAVnTs/3nDtoPhyEKlgPv+yQJQi/JS/AMJlqzxvlDacL1nekbrcf6bTqp/jV4qgnPxNQ=="], + "@tailwindcss/oxide-win32-arm64-msvc": ["@tailwindcss/oxide-win32-arm64-msvc@4.3.5", "", { "os": "win32", "cpu": "arm64" }, "sha512-9o8jgthi+QE5eandnboiJT64VQfnIArfZzSTdgbhEK5aafdiu2jTW9Honi/mwYHxBZuH1vAC57IFyrh+0iK5Gg=="], - "@tailwindcss/oxide-win32-x64-msvc": ["@tailwindcss/oxide-win32-x64-msvc@4.3.3", "", { "os": "win32", "cpu": "x64" }, "sha512-yJ0pwIVc/nYeGoV02WtsN8KYyLQv7kyI2wDnkezyJlGGjkd4QLwDGAwl47YpPJeuI0M0ObaXGSPjvWDPeTPggw=="], + "@tailwindcss/oxide-win32-x64-msvc": ["@tailwindcss/oxide-win32-x64-msvc@4.3.5", "", { "os": "win32", "cpu": "x64" }, "sha512-XiKFfIy1RWe7qK4WqByxNW7Oz1/nkOy8o/BWhHminyV1PmpUd8Eedj5v2A8h2kpqeVlz6xRnwk9Fr/ZXNLcZfg=="], - "@tailwindcss/postcss": ["@tailwindcss/postcss@4.3.3", "", { "dependencies": { "@alloc/quick-lru": "^5.2.0", "@tailwindcss/node": "4.3.3", "@tailwindcss/oxide": "4.3.3", "postcss": "^8.5.16", "tailwindcss": "4.3.3" } }, "sha512-JTSZZGQi1AyKirbLN3azmjVzef92tcX7h+iSqPdaeStyFpGpDlKvvpxeOE8njhbUanbRwr3z8DyzhICWnMtQeg=="], + "@tailwindcss/postcss": ["@tailwindcss/postcss@4.3.5", "", { "dependencies": { "@alloc/quick-lru": "^5.2.0", "@tailwindcss/node": "4.3.5", "@tailwindcss/oxide": "4.3.5", "postcss": "^8.5.25", "tailwindcss": "4.3.5" } }, "sha512-FAV37Tlx9wBiT/hkfgVD0Q6CWsP2oUX3lf28nrfjW8+ksILjnpuFulUqWDfNR4/ZiEHHDRBX8DUTzD1Rys687A=="], "@types/d3": ["@types/d3@7.4.3", "", { "dependencies": { "@types/d3-array": "*", "@types/d3-axis": "*", "@types/d3-brush": "*", "@types/d3-chord": "*", "@types/d3-color": "*", "@types/d3-contour": "*", "@types/d3-delaunay": "*", "@types/d3-dispatch": "*", "@types/d3-drag": "*", "@types/d3-dsv": "*", "@types/d3-ease": "*", "@types/d3-fetch": "*", "@types/d3-force": "*", "@types/d3-format": "*", "@types/d3-geo": "*", "@types/d3-hierarchy": "*", "@types/d3-interpolate": "*", "@types/d3-path": "*", "@types/d3-polygon": "*", "@types/d3-quadtree": "*", "@types/d3-random": "*", "@types/d3-scale": "*", "@types/d3-scale-chromatic": "*", "@types/d3-selection": "*", "@types/d3-shape": "*", "@types/d3-time": "*", "@types/d3-time-format": "*", "@types/d3-timer": "*", "@types/d3-transition": "*", "@types/d3-zoom": "*" } }, "sha512-lZXZ9ckh5R8uiFVt8ogUNf+pIrK4EsWrx2Np75WvF/eTpJ0FMHNhjXk8CKEx/+gpHbNQyJWehbFaTvqmHWB3ww=="], @@ -342,7 +342,7 @@ "@types/ms": ["@types/ms@2.1.0", "", {}, "sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA=="], - "@types/node": ["@types/node@26.6.5", "", { "dependencies": { "undici-types": "~8.9.0" } }, "sha512-uMzsv9stDdofIZBx4UGh4Z9ZgXnGC9seRDscilBcTHAeOFk67MZg/k9bWVfO+bk4qZmG+l52hRnLwUiH2LnJTg=="], + "@types/node": ["@types/node@26.6.6", "", { "dependencies": { "undici-types": "~8.9.0" } }, "sha512-MzQj+8Kx3XI40OmUAE6Qoh58ZMNstNNMwn2nfd3qWsfe7nDNSqJNzes4njhz6AHwrSHOffSLwXU6yb474Q4aog=="], "@types/react": ["@types/react@19.3.0", "", { "dependencies": { "csstype": "^3.2.2" } }, "sha512-N0rFCuH9YoxG9/m61l9MfpJKfmLOVU0em7ipIz6TRgSSkvReLB9vL85GB+yr8Bs5leqpvg96JSwF4ZS1s4viQg=="], @@ -436,8 +436,6 @@ "ansi-styles": ["ansi-styles@6.2.3", "", {}, "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg=="], - "arch": ["arch@2.2.0", "", {}, "sha512-Of/R0wqp83cgHozfIYLbBMnej79U/SVGOOyuB3VVFv1NRM/PSFMK12x9KVtiYzJqmnU5WR2qp0Z5rHb7sWGnFQ=="], - "arg": ["arg@5.0.2", "", {}, "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg=="], "astring": ["astring@1.9.0", "", { "bin": { "astring": "bin/astring" } }, "sha512-LElXdjswlqjWrPpJFg1Fx4wpkOCxj1TDHlSV4PlaRxHGWko024xICaa97ZkMfs6DRKlCguiAI+rbXv5GWwXIkg=="], @@ -474,7 +472,7 @@ "chevrotain": ["chevrotain@13.2.0", "", { "dependencies": { "@chevrotain/cst-dts-gen": "13.2.0", "@chevrotain/gast": "13.2.0", "@chevrotain/regexp-to-ast": "13.2.0", "@chevrotain/types": "13.2.0", "@chevrotain/utils": "13.2.0" } }, "sha512-GTouk5YzgBxlTPCaDn5q0q2EJKkrYmnPF+HmF8v0Qo4r3iyPG7HJivkN1wthCXZcm3sIcZFpGTRovLPNdJNRCA=="], - "chokidar": ["chokidar@5.0.0", "", { "dependencies": { "readdirp": "^5.0.0" } }, "sha512-TQMmc3w+5AxjpL8iIiwebF73dRDF4fBIieAqGn9RGCWaEVwQ6Fb2cGe31Yns0RRIzii5goJ1Y7xbMwo1TxMplw=="], + "chokidar": ["chokidar@6.0.0", "", { "dependencies": { "readdirp": "^5.1.1" } }, "sha512-Ec2Z7wpcKBiMpR7DxteoqS/sq5G5d2A4fpxzPv6+fD7xNNdrTghn7L11YwV5EN1B3i72Erc3XVT5FkWIDx90+A=="], "class-variance-authority": ["class-variance-authority@0.7.1", "", { "dependencies": { "clsx": "^2.1.1" } }, "sha512-Ka+9Trutv7G8M6WT6SeiRWz792K5qEqIGEGzXKhAE6xOWAY6pPH8U+9IY3oCMv6kqTmLsv7Xh/2w2RigkePMsg=="], @@ -482,11 +480,9 @@ "client-only": ["client-only@0.0.1", "", {}, "sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA=="], - "clipboardy": ["clipboardy@3.0.0", "", { "dependencies": { "arch": "^2.2.0", "execa": "^5.1.1", "is-wsl": "^2.2.0" } }, "sha512-Su+uU5sr1jkUy1sGRpLKjKrvEOVXgSgiSInwa/qeID6aJ07yh+5NWc3h2QfjHjBnfX4LhtFcuAWKUsJ3r+fjbg=="], - "clsx": ["clsx@2.1.1", "", {}, "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA=="], - "cn": ["cn@0.4.0", "", { "bin": { "cn": "bin/cn.mjs" } }, "sha512-qOAeUhPwPzBxx6jaeQdo646XIKliKHc2j1ZF7Ngb1o0pJZKH5gq8FkA0aVdUdPFUDXNXyUCXpCtoJISo6dhizg=="], + "cn": ["cn@0.5.2", "", { "bin": { "cn": "bin/cn.mjs" } }, "sha512-wm10E6iuJ37rALOw3D+3cfaXXZSLNMh2uxpQn3dNICqfJM59yXqgbA9/9Iiz155j5kYNLdK6WreNdW3NQtx3OQ=="], "collapse-white-space": ["collapse-white-space@2.1.0", "", {}, "sha512-loKTxY1zCOuG4j9f6EPnuyyYkf58RnhhWTvRoZEokgB+WbdXehfjFviyOVYkqzEWz1Q5kRiZdBYS5SwxbQYwzw=="], @@ -500,7 +496,7 @@ "compressible": ["compressible@2.0.18", "", { "dependencies": { "mime-db": ">= 1.43.0 < 2" } }, "sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg=="], - "compression": ["compression@1.8.1", "", { "dependencies": { "bytes": "3.1.2", "compressible": "~2.0.18", "debug": "2.6.9", "negotiator": "~0.6.4", "on-headers": "~1.1.0", "safe-buffer": "5.2.1", "vary": "~1.1.2" } }, "sha512-9mAqGPHLakhCLeNyxPkK4xVo746zQ/czLH1Ky+vkitMnWfWZps8r0qXuwhwizagCRttsL4lfG4pIOvaWLpAP0w=="], + "compression": ["compression@1.8.2", "", { "dependencies": { "bytes": "3.1.2", "compressible": "~2.0.18", "debug": "2.6.9", "destroy": "1.2.0", "negotiator": "~0.6.4", "on-headers": "~1.1.0", "safe-buffer": "5.2.1", "vary": "~1.1.2" } }, "sha512-o8vI5RE5A6EVVOd9o41jKp41aJom+QTEO/Bx8MYNjexMo/Bv2WOjUfZr+aL0WnYSgymUy6zeguqLTsIhV0gMvQ=="], "compute-scroll-into-view": ["compute-scroll-into-view@3.1.1", "", {}, "sha512-VRhuHOLoKYOy4UbilLbUzbYg93XLjv2PncJC50EuTWPA3gaja1UjBsUP/D/9/juV3vQFr6XBEzn9KCAHdUvOHw=="], @@ -510,8 +506,6 @@ "cose-base": ["cose-base@1.0.3", "", { "dependencies": { "layout-base": "^1.0.0" } }, "sha512-s9whTXInMSgAp/NVXVNuVxVKzGH2qck3aQlVHxDCdAEPgtMKwc4Wq6/QKhgdEdgbLSi9rBTAcPoRa6JpiG4ksg=="], - "cross-spawn": ["cross-spawn@7.0.6", "", { "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", "which": "^2.0.1" } }, "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA=="], - "csstype": ["csstype@3.2.3", "", {}, "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ=="], "cytoscape": ["cytoscape@3.34.4", "", {}, "sha512-msY99tMY8iWTg+sIPGfSqDcPNOt4xcj+v/K/7qUFaCUxxlqnMkUYLBjRUzn9W5CU/R2hrmtJa5+UtovrEM2ctg=="], @@ -598,6 +592,8 @@ "dequal": ["dequal@2.0.3", "", {}, "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA=="], + "destroy": ["destroy@1.2.0", "", {}, "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg=="], + "detect-libc": ["detect-libc@2.1.2", "", {}, "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ=="], "detect-node-es": ["detect-node-es@1.1.0", "", {}, "sha512-ypdmJU/TbBby2Dxibuv7ZLW3Bs1QEmM7nHjEANfohJLvE0XVujisn1qPJcZxg+qDucsr+bP6fLD1rPS3AhJ7EQ=="], @@ -608,7 +604,7 @@ "eastasianwidth": ["eastasianwidth@0.2.0", "", {}, "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA=="], - "elkjs": ["elkjs@0.9.3", "", {}, "sha512-f/ZeWvW/BCXbhGEf1Ujp29EASo/lk1FDnETgNKwJrsVvGZhUWCZyg3xLJjAsxfOmt8KjswHmI5EwCQcPMpOYhQ=="], + "elkjs": ["elkjs@0.12.1", "", {}, "sha512-IhMYKHE4S2vtx0QrhBP3lYOIKDeIiJXBrdq9MGYkuB8ZHqhrBnHNfSUndjXFewrX1CPK8chwq+2NA0K0hliYuw=="], "emoji-regex": ["emoji-regex@9.2.2", "", {}, "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg=="], @@ -640,8 +636,6 @@ "estree-walker": ["estree-walker@3.0.3", "", { "dependencies": { "@types/estree": "^1.0.0" } }, "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g=="], - "execa": ["execa@5.1.1", "", { "dependencies": { "cross-spawn": "^7.0.3", "get-stream": "^6.0.0", "human-signals": "^2.1.0", "is-stream": "^2.0.0", "merge-stream": "^2.0.0", "npm-run-path": "^4.0.1", "onetime": "^5.1.2", "signal-exit": "^3.0.3", "strip-final-newline": "^2.0.0" } }, "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg=="], - "extend": ["extend@3.0.2", "", {}, "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g=="], "fast-deep-equal": ["fast-deep-equal@3.1.3", "", {}, "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q=="], @@ -650,18 +644,16 @@ "fdir": ["fdir@6.5.0", "", { "peerDependencies": { "picomatch": "^3 || ^4" }, "optionalPeers": ["picomatch"] }, "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg=="], - "framer-motion": ["framer-motion@14.4.0", "", { "dependencies": { "motion-dom": "14.4.0", "motion-utils": "14.1.1", "tslib": "^2.4.0" }, "peerDependencies": { "react": "^18.0.0 || ^19.0.0", "react-dom": "^18.0.0 || ^19.0.0" }, "optionalPeers": ["react", "react-dom"] }, "sha512-HtO1fxord2rnXYRyr1laG4uY7+OtgwDc9Szcg1wlMq/LF7BO3/S7a+KEo691U7pSi+i0ueRuRqaD1UaLEmZHuQ=="], + "framer-motion": ["framer-motion@14.14.0", "", { "dependencies": { "motion-dom": "14.14.0", "motion-utils": "14.7.0", "tslib": "^2.4.0" }, "peerDependencies": { "react": "^18.0.0 || ^19.0.0", "react-dom": "^18.0.0 || ^19.0.0", "remix": "^3.1.0" }, "optionalPeers": ["react", "react-dom", "remix"] }, "sha512-fidRX0VzkZdA9OovFiBSzJtt9/jLcJpna78Z+KCqQQZIWoIpN3tOhEXAhhAw/FObUUh+o3Y18yx1F4BP0mVJ8Q=="], - "fumadocs-core": ["fumadocs-core@16.17.7", "", { "dependencies": { "@fumari/image-size": "^0.1.1", "estree-util-value-to-estree": "^3.5.0", "github-slugger": "^2.0.0", "hast-util-from-dom": "^5.0.1", "hast-util-to-estree": "^3.1.3", "hast-util-to-jsx-runtime": "^2.3.6", "mdast-util-mdx": "^3.0.0", "micromark": "^4.0.2", "micromark-extension-gfm-table": "^2.1.2", "npm-to-yarn": "3.2.0", "remark": "^15.0.1", "remark-gfm": "^4.0.1", "remark-rehype": "^11.1.2", "scroll-into-view-if-needed": "^3.1.0", "shiki": "^4.5.0", "tinyglobby": "^0.2.17", "unified": "^11.0.5", "vfile": "^6.0.3", "yaml": "^2.9.1", "zbsearch": "^4.0.1" }, "peerDependencies": { "@mdx-js/mdx": "*", "@mixedbread/sdk": "0.x.x", "@modelcontextprotocol/server": "2.x.x", "@orama/core": "1.x.x", "@oramacloud/client": "2.x.x", "@tanstack/react-router": "1.x.x", "@types/estree-jsx": "*", "@types/hast": "*", "@types/mdast": "*", "@types/react": "*", "algoliasearch": "5.x.x", "flexsearch": "*", "lucide-react": "*", "meilisearch": ">=0.50.0 <1.0.0", "next": "16.x.x", "react": "^19.2.0", "react-dom": "^19.2.0", "react-router": "7.x.x || 8.x.x", "waku": "*", "zod": "4.x.x" }, "optionalPeers": ["@mdx-js/mdx", "@mixedbread/sdk", "@modelcontextprotocol/server", "@orama/core", "@oramacloud/client", "@tanstack/react-router", "@types/estree-jsx", "@types/hast", "@types/mdast", "@types/react", "algoliasearch", "flexsearch", "lucide-react", "meilisearch", "next", "react", "react-dom", "react-router", "waku", "zod"] }, "sha512-o8uR1JuFgAHrUSbX/hzThOsvW8tFXfV4vlrWf7VeFd+lbQsRqwr8R7gvs96Vwwzn5xSDfgg0boQalyv1llJAQQ=="], + "fumadocs-core": ["fumadocs-core@16.19.4", "", { "dependencies": { "@fumari/image-size": "^0.1.1", "acorn": "^8.19.0", "acorn-jsx": "^5.3.2", "estree-util-value-to-estree": "^3.5.0", "github-slugger": "^2.0.0", "hast-util-from-dom": "^5.0.1", "hast-util-to-estree": "^3.1.3", "mdast-util-mdx": "^3.0.0", "micromark": "^4.0.3", "micromark-extension-gfm-table": "^2.1.2", "npm-to-yarn": "3.2.0", "remark": "^15.0.1", "remark-gfm": "^4.0.1", "remark-rehype": "^11.1.2", "scroll-into-view-if-needed": "^3.1.0", "shiki": "^4.6.0", "tinyglobby": "^0.2.17", "unified": "^11.0.5", "vfile": "^6.0.3", "yaml": "^2.9.1", "zbsearch": "^4.0.2" }, "peerDependencies": { "@mdx-js/mdx": "*", "@mixedbread/sdk": "0.x.x", "@modelcontextprotocol/server": "2.x.x", "@orama/core": "1.x.x", "@oramacloud/client": "2.x.x", "@pierre/highlights": "0.x.x", "@tanstack/react-router": "1.x.x", "@types/estree-jsx": "*", "@types/hast": "*", "@types/mdast": "*", "@types/react": "*", "algoliasearch": "5.x.x", "flexsearch": "*", "lucide-react": "*", "meilisearch": ">=0.50.0 <1.0.0", "next": "16.x.x", "react": "^19.2.0", "react-dom": "^19.2.0", "react-router": "7.x.x || 8.x.x", "waku": "*", "zod": "4.x.x" }, "optionalPeers": ["@mdx-js/mdx", "@mixedbread/sdk", "@modelcontextprotocol/server", "@orama/core", "@oramacloud/client", "@pierre/highlights", "@tanstack/react-router", "@types/estree-jsx", "@types/hast", "@types/mdast", "@types/react", "algoliasearch", "flexsearch", "lucide-react", "meilisearch", "next", "react", "react-dom", "react-router", "waku", "zod"] }, "sha512-PRYjTrfIbp3clCIE4n0nhbkGnoDg61cDOQp0GNYtAMl7haBgVykaQhI5SRTS8/i6POfodSR6C5lJiAGBBH1eNA=="], - "fumadocs-mdx": ["fumadocs-mdx@15.4.9", "", { "dependencies": { "@mdx-js/mdx": "^3.1.1", "@standard-schema/spec": "^1.1.0", "chokidar": "^5.0.0", "esbuild": "^0.28.2", "estree-util-value-to-estree": "^3.5.0", "github-slugger": "^2.0.0", "magic-string": "^1.4.3", "mdast-util-mdx": "^3.0.0", "picocolors": "^1.1.1", "picomatch": "^4.0.7", "tinyexec": "^1.3.1", "tinyglobby": "^0.2.17", "unified": "^11.0.5", "unist-util-remove-position": "^5.0.0", "vfile": "^6.0.3", "yaml": "^2.9.1", "yuku-analyzer": "^0.19.0", "zod": "^4.6.7" }, "peerDependencies": { "@fumadocs/satteri": "0.x.x", "@types/mdast": "*", "@types/mdx": "*", "@types/react": "*", "fumadocs-core": "^16.17.0", "mdast-util-directive": "*", "next": "^15.3.0 || ^16.0.0", "react": "^19.2.0", "rolldown": "*", "satteri": "^0.10.5", "vite": "7.x.x || 8.x.x" }, "optionalPeers": ["@fumadocs/satteri", "@types/mdast", "@types/mdx", "@types/react", "mdast-util-directive", "next", "react", "rolldown", "satteri", "vite"], "bin": { "fumadocs-mdx": "./bin.js" } }, "sha512-vsZGzpGsWptlBAX8sWb7R87KIt9+3GhJa5GpkwJqBv/OaN9QGul34hJikKdq6C8pT2XOwKMB499lvj31JaHbGg=="], + "fumadocs-mdx": ["fumadocs-mdx@15.6.3", "", { "dependencies": { "@mdx-js/mdx": "^3.1.1", "@standard-schema/spec": "^1.1.0", "acorn": "^8.19.0", "acorn-jsx": "^5.3.2", "chokidar": "^6.0.0", "esbuild": "^0.28.2", "estree-util-value-to-estree": "^3.5.0", "github-slugger": "^2.0.0", "magic-string": "^1.4.5", "mdast-util-from-markdown": "^2.1.0", "mdast-util-mdx": "^3.0.0", "micromark-extension-mdxjs-esm": "^3.0.0", "picocolors": "^1.1.1", "picomatch": "^4.0.7", "tinyexec": "^1.3.1", "tinyglobby": "^0.2.17", "unified": "^11.0.5", "unist-util-remove-position": "^5.0.0", "vfile": "^6.0.3", "yaml": "^2.9.1", "yuku-analyzer": "^0.19.0", "zod": "^4.6.7" }, "peerDependencies": { "@fumadocs/satteri": "0.x.x", "@types/mdast": "*", "@types/mdx": "*", "@types/react": "*", "@vitejs/plugin-rsc": "^0.5.34", "fumadocs-core": "^16.18.3", "mdast-util-directive": "*", "next": "^15.3.0 || ^16.0.0", "react": "^19.2.0", "rolldown": "*", "satteri": "^0.11.7", "vite": "7.x.x || 8.x.x" }, "optionalPeers": ["@fumadocs/satteri", "@types/mdast", "@types/mdx", "@types/react", "@vitejs/plugin-rsc", "mdast-util-directive", "next", "react", "rolldown", "satteri", "vite"], "bin": { "fumadocs-mdx": "./bin.js" } }, "sha512-MPuuZNfczeuYON3g+gWQB+jtD4gGIx0hEikYVDAb/GL/JO6SFyCBH6xASg0OuWrcLyLrhqaei65HXBZQMQCTRw=="], - "fumadocs-ui": ["@fumadocs/base-ui@16.17.7", "", { "dependencies": { "@base-ui/react": "^1.8.0", "@fuma-translate/react": "^1.0.2", "@fumadocs/tailwind": "0.1.4", "class-variance-authority": "^0.7.1", "cn": "^0.4.0", "hast-util-to-jsx-runtime": "^2.3.6", "lucide-react": "^1.50.0", "motion": "^14.0.0", "next-themes": "^0.4.6", "react-remove-scroll": "^2.7.2", "scroll-into-view-if-needed": "^3.1.0", "shiki": "^4.5.0" }, "peerDependencies": { "@types/mdx": "*", "@types/react": "*", "fumadocs-core": "16.17.7", "next": "16.x.x", "react": "^19.2.0", "react-dom": "^19.2.0", "takumi-js": "*" }, "optionalPeers": ["@types/mdx", "@types/react", "next", "takumi-js"] }, "sha512-t9Am0mxPrGuAG9BeC/ACLhNbBtxXbc+JIbTTzr7j5apnCFRQSDxGaZT9/+BRWG6DqltnsccGqGB1x3kPz7WaYw=="], + "fumadocs-ui": ["@fumadocs/base-ui@16.19.4", "", { "dependencies": { "@base-ui/react": "^1.9.0", "@fuma-translate/react": "^1.0.2", "@fumadocs/tailwind": "0.1.5", "class-variance-authority": "^0.7.1", "cn": "^0.5.2", "lucide-react": "^1.71.0", "motion": "^14.12.0", "next-themes": "^0.4.6", "react-remove-scroll": "^2.7.2", "scroll-into-view-if-needed": "^3.1.0", "shiki": "^4.6.0" }, "peerDependencies": { "@types/mdx": "*", "@types/react": "*", "fumadocs-core": "16.19.4", "next": "16.x.x", "react": "^19.2.0", "react-dom": "^19.2.0", "takumi-js": "*" }, "optionalPeers": ["@types/mdx", "@types/react", "next", "takumi-js"] }, "sha512-S8CPsuyIjWErT9Ek8+y/tmq+DPrlTJ+1b1KphvmKyeNKHnpfFC9BEj/Gqrz4gj0aZLQH2Fwo73igMAgnOUDeEw=="], "get-nonce": ["get-nonce@1.0.1", "", {}, "sha512-FJhYRoDaiatfEkUK8HKlicmu/3SGFD51q3itKDGoSTysQJBnfOcxU5GxnhE1E6soB76MbT0MBtnKJuXyAx+96Q=="], - "get-stream": ["get-stream@6.0.1", "", {}, "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg=="], - "github-slugger": ["github-slugger@2.0.0", "", {}, "sha512-IaOQ9puYtjrkq7Y0Ygl9KDZnrf/aiUJYUpVf89y8kyaxbRG7Y1SrX/jaumrv81vc61+kiMempujsM3Yw7w5qcw=="], "graceful-fs": ["graceful-fs@4.2.11", "", {}, "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ=="], @@ -676,7 +668,7 @@ "hast-util-to-estree": ["hast-util-to-estree@3.1.3", "", { "dependencies": { "@types/estree": "^1.0.0", "@types/estree-jsx": "^1.0.0", "@types/hast": "^3.0.0", "comma-separated-tokens": "^2.0.0", "devlop": "^1.0.0", "estree-util-attach-comments": "^3.0.0", "estree-util-is-identifier-name": "^3.0.0", "hast-util-whitespace": "^3.0.0", "mdast-util-mdx-expression": "^2.0.0", "mdast-util-mdx-jsx": "^3.0.0", "mdast-util-mdxjs-esm": "^2.0.0", "property-information": "^7.0.0", "space-separated-tokens": "^2.0.0", "style-to-js": "^1.0.0", "unist-util-position": "^5.0.0", "zwitch": "^2.0.0" } }, "sha512-48+B/rJWAp0jamNbAAf9M7Uf//UVqAoMmgXhBdxTDJLGKY+LRnZ99qcG+Qjl5HfMpYNzS5v4EAwVEF34LeAj7w=="], - "hast-util-to-html": ["hast-util-to-html@9.0.5", "", { "dependencies": { "@types/hast": "^3.0.0", "@types/unist": "^3.0.0", "ccount": "^2.0.0", "comma-separated-tokens": "^2.0.0", "hast-util-whitespace": "^3.0.0", "html-void-elements": "^3.0.0", "mdast-util-to-hast": "^13.0.0", "property-information": "^7.0.0", "space-separated-tokens": "^2.0.0", "stringify-entities": "^4.0.0", "zwitch": "^2.0.4" } }, "sha512-OguPdidb+fbHQSU4Q4ZiLKnzWo8Wwsf5bZfbvu7//a9oTYoqD/fWpe96NuHkoS9h0ccGOTe0C4NGXdtS0iObOw=="], + "hast-util-to-html": ["hast-util-to-html@9.0.6", "", { "dependencies": { "@types/hast": "^3.0.0", "@types/unist": "^3.0.0", "ccount": "^2.0.0", "comma-separated-tokens": "^2.0.0", "hast-util-whitespace": "^3.0.0", "html-void-elements": "^3.0.0", "mdast-util-to-hast": "^13.0.0", "property-information": "^7.0.0", "space-separated-tokens": "^2.0.0", "stringify-entities": "^4.0.0", "zwitch": "^2.0.4" } }, "sha512-1SZUxCN3TtJAE7e2BQN2MBHsoZ1gnmi9GoCP5Di59CSWptIezSAW09yDZyVbanb78V9eCwrKqdQsjtfVTxYHWA=="], "hast-util-to-jsx-runtime": ["hast-util-to-jsx-runtime@2.3.6", "", { "dependencies": { "@types/estree": "^1.0.0", "@types/hast": "^3.0.0", "@types/unist": "^3.0.0", "comma-separated-tokens": "^2.0.0", "devlop": "^1.0.0", "estree-util-is-identifier-name": "^3.0.0", "hast-util-whitespace": "^3.0.0", "mdast-util-mdx-expression": "^2.0.0", "mdast-util-mdx-jsx": "^3.0.0", "mdast-util-mdxjs-esm": "^2.0.0", "property-information": "^7.0.0", "space-separated-tokens": "^2.0.0", "style-to-js": "^1.0.0", "unist-util-position": "^5.0.0", "vfile-message": "^4.0.0" } }, "sha512-zl6s8LwNyo1P9uw+XJGvZtdFF1GdAkOg8ujOw+4Pyb76874fLps4ueHXDhXWdk6YHQ6OgUtinliG7RsYvCbbBg=="], @@ -686,8 +678,6 @@ "html-void-elements": ["html-void-elements@3.0.0", "", {}, "sha512-bEqo66MRXsUGxWHV5IP0PUiAWwoEjba4VCzg0LjFJBpchPaTfyfCKTG6bc5F8ucKec3q5y6qOdGyYTSBEvhCrg=="], - "human-signals": ["human-signals@2.1.0", "", {}, "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw=="], - "iconv-lite": ["iconv-lite@0.6.3", "", { "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" } }, "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw=="], "import-meta-resolve": ["import-meta-resolve@4.2.0", "", {}, "sha512-Iqv2fzaTQN28s/FwZAoFq0ZSs/7hMAHJVX+w8PZl3cY19Pxk6jFFalxQoIfW2826i/fDLXv8IiEZRIT0lDuWcg=="], @@ -704,8 +694,6 @@ "is-decimal": ["is-decimal@2.0.1", "", {}, "sha512-AAB9hiomQs5DXWcRB1rqsxGUstbRroFOPPVAomNk/3XHR5JyEZChOyTWe2oayKnsSsr/kcGqF+z6yuH6HHpN0A=="], - "is-docker": ["is-docker@2.2.1", "", { "bin": { "is-docker": "cli.js" } }, "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ=="], - "is-fullwidth-code-point": ["is-fullwidth-code-point@3.0.0", "", {}, "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg=="], "is-hexadecimal": ["is-hexadecimal@2.0.1", "", {}, "sha512-DgZQp241c8oO6cA1SbTEWiXeoxV42vlcJxgH+B3hi1AiqqKruZR3ZGF8In3fj4+/y/7rHvlOZLZtgJ/4ttYGZg=="], @@ -714,12 +702,6 @@ "is-port-reachable": ["is-port-reachable@4.0.0", "", {}, "sha512-9UoipoxYmSk6Xy7QFgRv2HDyaysmgSG75TFQs6S+3pDM7ZhKTF/bskZV+0UlABHzKjNVhPjYCLfeZUEg1wXxig=="], - "is-stream": ["is-stream@2.0.1", "", {}, "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg=="], - - "is-wsl": ["is-wsl@2.2.0", "", { "dependencies": { "is-docker": "^2.0.0" } }, "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww=="], - - "isexe": ["isexe@2.0.0", "", {}, "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw=="], - "jiti": ["jiti@2.7.0", "", { "bin": { "jiti": "lib/jiti-cli.mjs" } }, "sha512-AC/7JofJvZGrrneWNaEnJeOLUx+JlGt7tNa0wZiRPT4MY1wmfKjt2+6O2p2uz2+skll8OZZmJMNqeke7kKbNgQ=="], "json-schema-traverse": ["json-schema-traverse@1.0.0", "", {}, "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug=="], @@ -730,37 +712,37 @@ "layout-base": ["layout-base@1.0.2", "", {}, "sha512-8h2oVEZNktL4BH2JCOI90iD1yXwL6iNW7KcCKT2QZgQJR2vbqDsldCTPRU9NifTCqHZci57XvQQ15YTu+sTYPg=="], - "lightningcss": ["lightningcss@1.32.0", "", { "dependencies": { "detect-libc": "^2.0.3" }, "optionalDependencies": { "lightningcss-android-arm64": "1.32.0", "lightningcss-darwin-arm64": "1.32.0", "lightningcss-darwin-x64": "1.32.0", "lightningcss-freebsd-x64": "1.32.0", "lightningcss-linux-arm-gnueabihf": "1.32.0", "lightningcss-linux-arm64-gnu": "1.32.0", "lightningcss-linux-arm64-musl": "1.32.0", "lightningcss-linux-x64-gnu": "1.32.0", "lightningcss-linux-x64-musl": "1.32.0", "lightningcss-win32-arm64-msvc": "1.32.0", "lightningcss-win32-x64-msvc": "1.32.0" } }, "sha512-NXYBzinNrblfraPGyrbPoD19C1h9lfI/1mzgWYvXUTe414Gz/X1FD2XBZSZM7rRTrMA8JL3OtAaGifrIKhQ5yQ=="], + "lightningcss": ["lightningcss@1.33.0", "", { "dependencies": { "detect-libc": "^2.0.3" }, "optionalDependencies": { "lightningcss-android-arm64": "1.33.0", "lightningcss-darwin-arm64": "1.33.0", "lightningcss-darwin-x64": "1.33.0", "lightningcss-freebsd-x64": "1.33.0", "lightningcss-linux-arm-gnueabihf": "1.33.0", "lightningcss-linux-arm64-gnu": "1.33.0", "lightningcss-linux-arm64-musl": "1.33.0", "lightningcss-linux-x64-gnu": "1.33.0", "lightningcss-linux-x64-musl": "1.33.0", "lightningcss-win32-arm64-msvc": "1.33.0", "lightningcss-win32-x64-msvc": "1.33.0" } }, "sha512-WkUDrojuJs0xkgGf2udWxa3yGBRxPtxUkB79i6aCZLRgc7PM8fZe9TosfPDcvEpQZbuFASnHYmRLBLUbmLOIIA=="], - "lightningcss-android-arm64": ["lightningcss-android-arm64@1.32.0", "", { "os": "android", "cpu": "arm64" }, "sha512-YK7/ClTt4kAK0vo6w3X+Pnm0D2cf2vPHbhOXdoNti1Ga0al1P4TBZhwjATvjNwLEBCnKvjJc2jQgHXH0NEwlAg=="], + "lightningcss-android-arm64": ["lightningcss-android-arm64@1.33.0", "", { "os": "android", "cpu": "arm64" }, "sha512-gEpRTalKdosp4Bb8qWtc2iOgE5SeIHlpS1up9bFq2wAyYhl1UdTObYiHe98zEM9SQvSoqQZ1IQD0JNpg3Ml5pg=="], - "lightningcss-darwin-arm64": ["lightningcss-darwin-arm64@1.32.0", "", { "os": "darwin", "cpu": "arm64" }, "sha512-RzeG9Ju5bag2Bv1/lwlVJvBE3q6TtXskdZLLCyfg5pt+HLz9BqlICO7LZM7VHNTTn/5PRhHFBSjk5lc4cmscPQ=="], + "lightningcss-darwin-arm64": ["lightningcss-darwin-arm64@1.33.0", "", { "os": "darwin", "cpu": "arm64" }, "sha512-Sciaz8eenNTKn9b3t7+xr0ipTp9YxKQY4npwQ3mrRuL0BAVHBLyZxofhaKBAVtzmtRZ/zTyo0/to4B1uWG/Djg=="], - "lightningcss-darwin-x64": ["lightningcss-darwin-x64@1.32.0", "", { "os": "darwin", "cpu": "x64" }, "sha512-U+QsBp2m/s2wqpUYT/6wnlagdZbtZdndSmut/NJqlCcMLTWp5muCrID+K5UJ6jqD2BFshejCYXniPDbNh73V8w=="], + "lightningcss-darwin-x64": ["lightningcss-darwin-x64@1.33.0", "", { "os": "darwin", "cpu": "x64" }, "sha512-Z5UPAxzrjlWNNyGy6i65cJzzvgJ5D3T6wMvs+gWpY9d7qRhANrxqAp6LhxIgZhWEw18RfJTGcRxjuLIBr+m8XQ=="], - "lightningcss-freebsd-x64": ["lightningcss-freebsd-x64@1.32.0", "", { "os": "freebsd", "cpu": "x64" }, "sha512-JCTigedEksZk3tHTTthnMdVfGf61Fky8Ji2E4YjUTEQX14xiy/lTzXnu1vwiZe3bYe0q+SpsSH/CTeDXK6WHig=="], + "lightningcss-freebsd-x64": ["lightningcss-freebsd-x64@1.33.0", "", { "os": "freebsd", "cpu": "x64" }, "sha512-QQM/Ti/hQajJwCY+RiWuCZ9sdtI/XQk7nDK5vC8kkdwixezOlDgvDx7+RT+QjK6FcFT4MpsuoBnHIo/O3StRRg=="], - "lightningcss-linux-arm-gnueabihf": ["lightningcss-linux-arm-gnueabihf@1.32.0", "", { "os": "linux", "cpu": "arm" }, "sha512-x6rnnpRa2GL0zQOkt6rts3YDPzduLpWvwAF6EMhXFVZXD4tPrBkEFqzGowzCsIWsPjqSK+tyNEODUBXeeVHSkw=="], + "lightningcss-linux-arm-gnueabihf": ["lightningcss-linux-arm-gnueabihf@1.33.0", "", { "os": "linux", "cpu": "arm" }, "sha512-N7FVBe6iS24MlM6R/4RBTxGhQheZGs7tiQ9U32UtF75NzP5Q7xWPRqLBCKxlRQRk3rY1jCIPLzx7WzOhuUIRLQ=="], - "lightningcss-linux-arm64-gnu": ["lightningcss-linux-arm64-gnu@1.32.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-0nnMyoyOLRJXfbMOilaSRcLH3Jw5z9HDNGfT/gwCPgaDjnx0i8w7vBzFLFR1f6CMLKF8gVbebmkUN3fa/kQJpQ=="], + "lightningcss-linux-arm64-gnu": ["lightningcss-linux-arm64-gnu@1.33.0", "", { "os": "linux", "cpu": "arm64", "libc": "glibc" }, "sha512-j2v/itmy4HlNxlc6voKXYgBqNi0Ng2LShg4z7GufpEgs05P+2suBVyi9I6YHq5uoVFx9ETin3eCEhLVyXGQnKg=="], - "lightningcss-linux-arm64-musl": ["lightningcss-linux-arm64-musl@1.32.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-UpQkoenr4UJEzgVIYpI80lDFvRmPVg6oqboNHfoH4CQIfNA+HOrZ7Mo7KZP02dC6LjghPQJeBsvXhJod/wnIBg=="], + "lightningcss-linux-arm64-musl": ["lightningcss-linux-arm64-musl@1.33.0", "", { "os": "linux", "cpu": "arm64", "libc": "musl" }, "sha512-yiO5ROMuYQgXbC60yjZU5CYSFZGKXL0HFATXt9mHJn1+zW55oCtMI9NfcVhYLMFDL7gV7oBPon/EmMMGg2OvtQ=="], - "lightningcss-linux-x64-gnu": ["lightningcss-linux-x64-gnu@1.32.0", "", { "os": "linux", "cpu": "x64" }, "sha512-V7Qr52IhZmdKPVr+Vtw8o+WLsQJYCTd8loIfpDaMRWGUZfBOYEJeyJIkqGIDMZPwPx24pUMfwSxxI8phr/MbOA=="], + "lightningcss-linux-x64-gnu": ["lightningcss-linux-x64-gnu@1.33.0", "", { "os": "linux", "cpu": "x64", "libc": "glibc" }, "sha512-ar+Ju7LmcN0Jo4FpL4hpFybwNG9/3A/Br5KW2n2jyODg3MEZXaDYADdemoNS+BDNfMgKvylJLj4S5tyRActuAg=="], - "lightningcss-linux-x64-musl": ["lightningcss-linux-x64-musl@1.32.0", "", { "os": "linux", "cpu": "x64" }, "sha512-bYcLp+Vb0awsiXg/80uCRezCYHNg1/l3mt0gzHnWV9XP1W5sKa5/TCdGWaR/zBM2PeF/HbsQv/j2URNOiVuxWg=="], + "lightningcss-linux-x64-musl": ["lightningcss-linux-x64-musl@1.33.0", "", { "os": "linux", "cpu": "x64", "libc": "musl" }, "sha512-RYiYbkokw0trfKqqzfF55lginwEPrD3OJDfTuJzFs1MK6iFnDenaz1fqLLtX4ITG3OktJQXOeTaw1awrBAlZPw=="], - "lightningcss-win32-arm64-msvc": ["lightningcss-win32-arm64-msvc@1.32.0", "", { "os": "win32", "cpu": "arm64" }, "sha512-8SbC8BR40pS6baCM8sbtYDSwEVQd4JlFTOlaD3gWGHfThTcABnNDBda6eTZeqbofalIJhFx0qKzgHJmcPTnGdw=="], + "lightningcss-win32-arm64-msvc": ["lightningcss-win32-arm64-msvc@1.33.0", "", { "os": "win32", "cpu": "arm64" }, "sha512-1K+MPfLSFVpphzpdbfkhlWk6wBrTObBzS2T6db10PNOZgR9GoVsAWzwNyuhUYYbTp23j+4RrncfujZ4uAzXvwA=="], - "lightningcss-win32-x64-msvc": ["lightningcss-win32-x64-msvc@1.32.0", "", { "os": "win32", "cpu": "x64" }, "sha512-Amq9B/SoZYdDi1kFrojnoqPLxYhQ4Wo5XiL8EVJrVsB8ARoC1PWW6VGtT0WKCemjy8aC+louJnjS7U18x3b06Q=="], + "lightningcss-win32-x64-msvc": ["lightningcss-win32-x64-msvc@1.33.0", "", { "os": "win32", "cpu": "x64" }, "sha512-OlEICDx/Xl0FqSp4bry8zFnCvGpig3Gl4gCquvYwHuqJKEC1+n9NgDniFvqHGmMv1ZkqDJrDqKKSykTDX+ehuA=="], "lodash-es": ["lodash-es@4.18.1", "", {}, "sha512-J8xewKD/Gk22OZbhpOVSwcs60zhd95ESDwezOFuA3/099925PdHJ7OFHNTGtajL3AlZkykD32HykiMo+BIBI8A=="], "longest-streak": ["longest-streak@3.1.0", "", {}, "sha512-9Ri+o0JYgehTaVBBDoMqIl8GXtbWg711O3srftcHhZ0dqnETqLaoIK0x17fUw9rFSlK/0NlsKe0Ahhyl5pXE2g=="], - "lucide-react": ["lucide-react@1.60.0", "", { "peerDependencies": { "@types/react": "*", "react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0" }, "optionalPeers": ["@types/react"] }, "sha512-UqxOW0FgAfDyb9VmjKb6/BkOzW6yfhf/QNboKtS2NDsscnNRW2CDzlyhbMKBQ1ontmcxuIDqHJ2AVgFR3NI+GA=="], + "lucide-react": ["lucide-react@1.74.0", "", { "peerDependencies": { "@types/react": "*", "react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0" }, "optionalPeers": ["@types/react"] }, "sha512-A1doIs/1fj1WnPbtIT7WRiM6Kvw5NUg+BtkoOh3Shpr4obwSDVt6WxCEcNH56EWprzuCoKle1OF0RqIkojwL1A=="], - "magic-string": ["magic-string@1.4.3", "", { "dependencies": { "@jridgewell/sourcemap-codec": "^1.6.0" } }, "sha512-z12OxmaPGE0F4xlpGdjuAUckipLpQlTAuAmyGhNoD7ODpYUzvDfvtxUbjM/jwznyP178oju/KDdyi220wNJ0RQ=="], + "magic-string": ["magic-string@1.4.5", "", { "dependencies": { "@jridgewell/sourcemap-codec": "^1.6.0" } }, "sha512-oLLC2+YvQUfAa+vxoufE/yc1icb87M9iXIRqAoR/2EhE/8cb3SF/+Gi0c2By1B+5Vz2e2vQtUvHiu1+63Znh+w=="], "markdown-extensions": ["markdown-extensions@2.0.0", "", {}, "sha512-o5vL7aDWatOTX8LzaS1WMoaoxIiLRQJuIKKe2wAw6IeULDHaqbiqiggmx+pKvZDb1Sj+pE46Sn1T7lCqfFtg1Q=="], @@ -800,9 +782,7 @@ "mdast-util-to-string": ["mdast-util-to-string@4.0.0", "", { "dependencies": { "@types/mdast": "^4.0.0" } }, "sha512-0H44vDimn51F0YwvxSJSm0eCDOJTRlmN0R1yBh4HLj9wiV1Dn0QoXGbvFAWj2hSItVTlCmBF1hqKlIyUBVFLPg=="], - "merge-stream": ["merge-stream@2.0.0", "", {}, "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w=="], - - "mermaid": ["mermaid@12.2.0", "", { "dependencies": { "@braintree/sanitize-url": "^7.1.2", "@iconify/utils": "^3.0.2", "@mermaid-js/parser": "^2.0.1", "@types/d3": "^7.4.3", "@upsetjs/venn.js": "^2.0.0", "chevrotain": "~13.2.0", "cytoscape": "^3.34.0", "cytoscape-cose-bilkent": "^4.1.0", "cytoscape-fcose": "^2.2.0", "d3": "^7.9.0", "d3-sankey": "^0.12.3", "dagre-d3-es": "7.0.14", "dayjs": "^1.11.21", "dompurify": "^3.4.12", "elkjs": "^0.9.3", "es-toolkit": "^1.45.1", "katex": "^0.18.0", "khroma": "^2.1.0", "marked": "^16.3.0", "roughjs": "^4.6.6", "stylis": "^4.3.6", "ts-dedent": "^2.2.0", "uuid": "^11.1.0 || ^12 || ^13 || ^14.0.0" } }, "sha512-w7nr/SFrLO7BaVTs3dQTvYSV6nYSBj0Yy9DjBhsIJtAcHqRzXSq4Pg32ujHZ/AdWsAMNEvvhbm5dt9E2tOiHzw=="], + "mermaid": ["mermaid@12.3.0", "", { "dependencies": { "@braintree/sanitize-url": "^7.1.2", "@iconify/utils": "^3.0.2", "@mermaid-js/parser": "^2.0.1", "@types/d3": "^7.4.3", "@upsetjs/venn.js": "^2.0.0", "chevrotain": "~13.2.0", "cytoscape": "^3.34.0", "cytoscape-cose-bilkent": "^4.1.0", "cytoscape-fcose": "^2.2.0", "d3": "^7.9.0", "d3-sankey": "^0.12.3", "dagre-d3-es": "7.0.14", "dayjs": "^1.11.21", "dompurify": "^3.4.17", "elkjs": "^0.12.0", "es-toolkit": "^1.45.1", "katex": "^0.18.0", "khroma": "^2.1.0", "marked": "^16.3.0", "roughjs": "^4.6.6", "stylis": "^4.3.6", "ts-dedent": "^2.2.0" } }, "sha512-4113TdXeLAsMruJ79OpFL5O8+LTFXhQqZ260rF3tgUmiNAtRm4Uume04I+65PRN6yZ69J4f8rVYWW8zRk65UYw=="], "micromark": ["micromark@4.0.3", "", { "dependencies": { "@types/debug": "^4.0.0", "debug": "^4.0.0", "decode-named-character-reference": "^1.0.0", "devlop": "^1.0.0", "micromark-core-commonmark": "^2.0.0", "micromark-factory-space": "^2.0.0", "micromark-util-character": "^2.0.0", "micromark-util-chunked": "^2.0.0", "micromark-util-combine-extensions": "^2.0.0", "micromark-util-decode-numeric-character-reference": "^2.0.0", "micromark-util-edit-map": "^1.0.0", "micromark-util-encode": "^2.0.0", "micromark-util-normalize-identifier": "^2.0.0", "micromark-util-resolve-all": "^2.0.0", "micromark-util-sanitize-uri": "^2.0.0", "micromark-util-subtokenize": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-oGYfQzHSG5dOMovQcJ3fyTmZlWAWpi0XA0sJwJs+i6OT88o1+Jtw/8z0CmdowSLxGhhFK89rQ/oXph/wN02PNw=="], @@ -880,17 +860,15 @@ "mime-types": ["mime-types@2.1.18", "", { "dependencies": { "mime-db": "~1.33.0" } }, "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ=="], - "mimic-fn": ["mimic-fn@2.1.0", "", {}, "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg=="], - "minimatch": ["minimatch@3.1.5", "", { "dependencies": { "brace-expansion": "^1.1.7" } }, "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w=="], "minimist": ["minimist@1.2.8", "", {}, "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA=="], - "motion": ["motion@14.4.0", "", { "dependencies": { "framer-motion": "14.4.0", "tslib": "^2.4.0" }, "peerDependencies": { "react": "^18.0.0 || ^19.0.0", "react-dom": "^18.0.0 || ^19.0.0" }, "optionalPeers": ["react", "react-dom"] }, "sha512-JJTIdeNjtF2zi/py0ndRKxQF+8z2pcDUgJYXul7zqbhMvyTLRsPFR9ifE/j4cFCpCMlehQVJkTwd7BZFiPKgQg=="], + "motion": ["motion@14.14.0", "", { "dependencies": { "framer-motion": "14.14.0", "tslib": "^2.4.0" }, "peerDependencies": { "react": "^18.0.0 || ^19.0.0", "react-dom": "^18.0.0 || ^19.0.0", "remix": "^3.1.0" }, "optionalPeers": ["react", "react-dom", "remix"] }, "sha512-a306U6sV5VKq1abtzKiinB+UQjiY88jrsvQzWORP3WPv/DFANyoYVlPbdnmJPMEbusyPXB4GyQJVANaq/pSIYQ=="], - "motion-dom": ["motion-dom@14.4.0", "", { "dependencies": { "motion-utils": "14.1.1" } }, "sha512-1q8RyHSdr5COpzrv3JgJ9XRjOO88ZN9CwflpkGgyO/SR/SNRP/dD6EU8SEo092kcKY34IzHC5diJPKrQRMA8lQ=="], + "motion-dom": ["motion-dom@14.14.0", "", { "dependencies": { "motion-utils": "14.7.0" } }, "sha512-IAxcKhYkuQA2W0Tlx1AvVgImfqEoF3/t3IovbPQJlYkefmGsmrXjn967lMII5VmFmLpQEab4+ZkHo/ijJ4Esig=="], - "motion-utils": ["motion-utils@14.1.1", "", {}, "sha512-3VvN5Uvf8B6qG+OfOui6Nht5EWp+vLuU3IqcAj7ItZGKqtmTjCebl5sGZF7/08gEHRnEl1AP/fIwbcEyVrcQGQ=="], + "motion-utils": ["motion-utils@14.7.0", "", {}, "sha512-woO0/Nb7ys75f94fjvQi/6leiHGvZUYkeHUPEZ3vxsV+9OpEVhkxp01x8MlRwX0zt31EqgXsKDAoBoJLC148Tw=="], "ms": ["ms@2.0.0", "", {}, "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A=="], @@ -902,14 +880,10 @@ "next-themes": ["next-themes@0.4.6", "", { "peerDependencies": { "react": "^16.8 || ^17 || ^18 || ^19 || ^19.0.0-rc", "react-dom": "^16.8 || ^17 || ^18 || ^19 || ^19.0.0-rc" } }, "sha512-pZvgD5L0IEvX5/9GWyHMf3m8BKiVQwsCMHfoFosXtXBMnaS0ZnIJ9ST4b4NqLVKDEm8QBxoNNGNaBv2JNF6XNA=="], - "npm-run-path": ["npm-run-path@4.0.1", "", { "dependencies": { "path-key": "^3.0.0" } }, "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw=="], - "npm-to-yarn": ["npm-to-yarn@3.2.0", "", {}, "sha512-K1HmQeZT2HrjpsR6KgqbN2FAXL2NrJJmNUSD9ck7HGTVu1JKXox8n9SB+tjbU8m8JGLF4OscrroPepew/L7/Xw=="], "on-headers": ["on-headers@1.1.0", "", {}, "sha512-737ZY3yNnXy37FHkQxPzt4UZ2UWPWiCZWLvFZ4fu5cueciegX0zGPnrlY6bwRg4FdQOe9YU8MkmJwGhoMybl8A=="], - "onetime": ["onetime@5.1.2", "", { "dependencies": { "mimic-fn": "^2.1.0" } }, "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg=="], - "oniguruma-parser": ["oniguruma-parser@0.12.2", "", {}, "sha512-6HVa5oIrgMC6aA6WF6XyyqbhRPJrKR02L20+2+zpDtO5QAzGHAUGw5TKQvwi5vctNnRHkJYmjAhRVQF2EKdTQw=="], "oniguruma-to-es": ["oniguruma-to-es@4.3.6", "", { "dependencies": { "oniguruma-parser": "^0.12.2", "regex": "^6.1.0", "regex-recursion": "^6.0.2" } }, "sha512-csuQ9x3Yr0cEIs/Zgx/OEt9iBw9vqIunAPQkx19R/fiMq2oGVTgcMqO/V3Ybqefr1TBvosI6jU539ksaBULJyA=="], @@ -922,8 +896,6 @@ "path-is-inside": ["path-is-inside@1.0.2", "", {}, "sha512-DUWJr3+ULp4zXmol/SZkFf3JGsS9/SIv+Y3Rt93/UjPpDpklB5f1er4O3POIbUuUJ3FXgqte2Q7SrU6zAqwk8w=="], - "path-key": ["path-key@3.1.1", "", {}, "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q=="], - "path-to-regexp": ["path-to-regexp@3.3.0", "", {}, "sha512-qyCH421YQPS2WFDxDjftfc1ZR5WKQzVzqsp4n9M2kQhVOo/ByahFoUNJfl58kOcEGfQ//7weFTDhm+ss8Ecxgw=="], "picocolors": ["picocolors@1.1.1", "", {}, "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA=="], @@ -938,7 +910,7 @@ "points-on-path": ["points-on-path@0.2.1", "", { "dependencies": { "path-data-parser": "0.1.0", "points-on-curve": "0.2.0" } }, "sha512-25ClnWWuw7JbWZcgqY/gJ4FQWadKxGWk+3kR/7kD0tCaDtPPMj7oHu2ToLaVhfpnHrZzYby2w6tUA0eOIuUg8g=="], - "postcss": ["postcss@8.5.31", "", { "dependencies": { "nanoid": "^3.3.20", "picocolors": "^1.1.1", "source-map-js": "^1.2.2" } }, "sha512-YUbWYCgErwnMAVkjUnYa+KlMBzGpHwiIt/DE7f0G33AuX2LH9UcTk6KgWxd3zRU+pN3u/C+Xl3EnMLM4Hea7Sg=="], + "postcss": ["postcss@8.5.33", "", { "dependencies": { "nanoid": "^3.3.20", "picocolors": "^1.1.1", "source-map-js": "^1.2.2" } }, "sha512-RVHEU9/Pp1Fnjr/MpAJsZoADukCKhfIi15OunEYiGktIkYLkPVvC1sioWolGDS7XByMTx9m/IGbro0Js13zhnQ=="], "property-information": ["property-information@7.2.0", "", {}, "sha512-IAtzIB6sUiWaJYrX9smp3V46pBGbBeLFRGdh25kg1334VcBlD8HzhPeNIWQH9zhGmo2itIe25EHt9dQP7G5hmg=="], @@ -1012,19 +984,13 @@ "semver": ["semver@7.8.5", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA=="], - "serve": ["serve@14.2.6", "", { "dependencies": { "@zeit/schemas": "2.36.0", "ajv": "8.18.0", "arg": "5.0.2", "boxen": "7.0.0", "chalk": "5.0.1", "chalk-template": "0.4.0", "clipboardy": "3.0.0", "compression": "1.8.1", "is-port-reachable": "4.0.0", "serve-handler": "6.1.7", "update-check": "1.5.4" }, "bin": { "serve": "build/main.js" } }, "sha512-QEjUSA+sD4Rotm1znR8s50YqA3kYpRGPmtd5GlFxbaL9n/FdUNbqMhxClqdditSk0LlZyA/dhud6XNRTOC9x2Q=="], + "serve": ["serve@14.2.8", "", { "dependencies": { "@zeit/schemas": "2.36.0", "ajv": "8.18.0", "arg": "5.0.2", "boxen": "7.0.0", "chalk": "5.0.1", "chalk-template": "0.4.0", "compression": "1.8.2", "is-port-reachable": "4.0.0", "serve-handler": "6.1.7", "tinyclip": "^0.1.12", "update-check": "1.5.4" }, "bin": { "serve": "build/main.js" } }, "sha512-7or7YqR3zXwHhiBGj40l9yODyQY146O+hXKaEAfQYQkcvHtMDdX95K96xr50qL9EjXScyYVJb1NIgVE8F0i5cA=="], "serve-handler": ["serve-handler@6.1.7", "", { "dependencies": { "bytes": "3.0.0", "content-disposition": "0.5.2", "mime-types": "2.1.18", "minimatch": "3.1.5", "path-is-inside": "1.0.2", "path-to-regexp": "3.3.0", "range-parser": "1.2.0" } }, "sha512-CinAq1xWb0vR3twAv9evEU8cNWkXCb9kd5ePAHUKJBkOsUpR1wt/CvGdeca7vqumL1U5cSaeVQ6zZMxiJ3yWsg=="], "sharp": ["sharp@0.35.5", "", { "dependencies": { "@img/colour": "^1.1.0", "detect-libc": "^2.1.2", "semver": "^7.8.5" }, "optionalDependencies": { "@img/sharp-darwin-arm64": "0.35.5", "@img/sharp-darwin-x64": "0.35.5", "@img/sharp-freebsd-wasm32": "0.35.5", "@img/sharp-libvips-darwin-arm64": "1.3.4", "@img/sharp-libvips-darwin-x64": "1.3.4", "@img/sharp-libvips-linux-arm": "1.3.4", "@img/sharp-libvips-linux-arm64": "1.3.4", "@img/sharp-libvips-linux-ppc64": "1.3.4", "@img/sharp-libvips-linux-riscv64": "1.3.4", "@img/sharp-libvips-linux-s390x": "1.3.4", "@img/sharp-libvips-linux-x64": "1.3.4", "@img/sharp-libvips-linuxmusl-arm64": "1.3.4", "@img/sharp-libvips-linuxmusl-x64": "1.3.4", "@img/sharp-linux-arm": "0.35.5", "@img/sharp-linux-arm64": "0.35.5", "@img/sharp-linux-ppc64": "0.35.5", "@img/sharp-linux-riscv64": "0.35.5", "@img/sharp-linux-s390x": "0.35.5", "@img/sharp-linux-x64": "0.35.5", "@img/sharp-linuxmusl-arm64": "0.35.5", "@img/sharp-linuxmusl-x64": "0.35.5", "@img/sharp-webcontainers-wasm32": "0.35.5", "@img/sharp-win32-arm64": "0.35.5", "@img/sharp-win32-ia32": "0.35.5", "@img/sharp-win32-x64": "0.35.5" }, "peerDependencies": { "@types/node": "*" }, "optionalPeers": ["@types/node"] }, "sha512-Ywn4OnzGukp7CDMrp08RQ50YKmuwG47brZgIVPTvBaaAfQlRlygrRqSrxdCiL9M+LlzLBiJ68IR1QqvzHyjC7g=="], - "shebang-command": ["shebang-command@2.0.0", "", { "dependencies": { "shebang-regex": "^3.0.0" } }, "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA=="], - - "shebang-regex": ["shebang-regex@3.0.0", "", {}, "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A=="], - - "shiki": ["shiki@4.5.0", "", { "dependencies": { "@shikijs/core": "4.5.0", "@shikijs/engine-javascript": "4.5.0", "@shikijs/engine-oniguruma": "4.5.0", "@shikijs/langs": "4.5.0", "@shikijs/themes": "4.5.0", "@shikijs/types": "4.5.0", "@shikijs/vscode-textmate": "^10.0.2", "@types/hast": "^3.0.5" } }, "sha512-OcRW72ngQvc+MSVWBRIovC/BTW589iUE/Vxav7VeM4RcY9MUjqB+IR6ILG1k9nuW6LiG/nct9uma4/MBtnZbmQ=="], - - "signal-exit": ["signal-exit@3.0.7", "", {}, "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ=="], + "shiki": ["shiki@4.6.0", "", { "dependencies": { "@shikijs/core": "4.6.0", "@shikijs/engine-javascript": "4.6.0", "@shikijs/engine-oniguruma": "4.6.0", "@shikijs/langs": "4.6.0", "@shikijs/themes": "4.6.0", "@shikijs/types": "4.6.0", "@shikijs/vscode-textmate": "^10.1.0", "@types/hast": "^3.0.5" } }, "sha512-imjLsVHgPuWhvpU3P+zOekvMYqnel7QmKsFC4Sn0fCuAvaaalBsxwKEsrU8Ko5BdFnZA6Go/8a0RzahS634UgA=="], "source-map": ["source-map@0.7.6", "", {}, "sha512-i5uvt8C3ikiWeNZSVZNWcfZPItFQOsYTUAOkcUPGd8DqDy1uOUikjt5dG+uRlwyvR108Fb9DOd4GvXfT0N2/uQ=="], @@ -1038,8 +1004,6 @@ "strip-ansi": ["strip-ansi@7.2.0", "", { "dependencies": { "ansi-regex": "^6.2.2" } }, "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w=="], - "strip-final-newline": ["strip-final-newline@2.0.0", "", {}, "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA=="], - "strip-json-comments": ["strip-json-comments@2.0.1", "", {}, "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ=="], "style-to-js": ["style-to-js@1.1.21", "", { "dependencies": { "style-to-object": "1.0.14" } }, "sha512-RjQetxJrrUJLQPHbLku6U/ocGtzyjbJMP9lCNK7Ag0CNh690nSH8woqWH9u16nMjYBAok+i7JO1NP2pOy8IsPQ=="], @@ -1052,10 +1016,12 @@ "supports-color": ["supports-color@7.2.0", "", { "dependencies": { "has-flag": "^4.0.0" } }, "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw=="], - "tailwindcss": ["tailwindcss@4.3.3", "", {}, "sha512-gOhV3P7ufE62QDGg1zVaTgCR+EtPv92k2nIhVcVKcLmxT1sUBsQGhnZj175j+MqRt4zLF7ic+sCYjfhxMxj7YQ=="], + "tailwindcss": ["tailwindcss@4.3.5", "", {}, "sha512-FcQk9BuffmEHJP2G0XmB2SplU1aLTI7j07Kunk+U74Ny+XiWOtzXz9aujFZ/avntw1e2cOv/3PkgzflQ7gX2vQ=="], "tapable": ["tapable@2.3.3", "", {}, "sha512-uxc/zpqFg6x7C8vOE7lh6Lbda8eEL9zmVm/PLeTPBRhh1xCgdWaQ+J1CUieGpIfm2HdtsUpRv+HshiasBMcc6A=="], + "tinyclip": ["tinyclip@0.1.15", "", {}, "sha512-uo33abH+Ays0xYaDysoBt494Hb3hsEczMpcC0MwFl773pazORx4fmvKhclhR1wonUbB6vvpRsvVMwnhfqeMc+A=="], + "tinyexec": ["tinyexec@1.3.1", "", {}, "sha512-GCvB3aoys96IuDFBMcTB46JOR6mdMtAToqwiW8JlWhsoh1mhHi/xn9ss/Dg7N555GiJyEt2qzoG/NHCwM6h1EA=="], "tinyglobby": ["tinyglobby@0.2.17", "", { "dependencies": { "fdir": "^6.5.0", "picomatch": "^4.0.4" } }, "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g=="], @@ -1098,8 +1064,6 @@ "use-sync-external-store": ["use-sync-external-store@1.7.0", "", { "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "sha512-6L+EeigHMQhdaIPNIFUKwfWJSwWFQ8gJbJ2DLOs5sDIegTwR9fRxvnM3uciHKjIZhFz+KAv2emhWMRvDmMcY8A=="], - "uuid": ["uuid@14.0.3", "", { "bin": { "uuid": "dist-node/bin/uuid" } }, "sha512-Sc5u1VVln93y1Xnz4R+CunOZc7R9LUcTmhj7Rc7Eg3HVcf7rVn2FOoa812fe0W8p3jD7xeoGSYbfqCGGH2B6xw=="], - "vary": ["vary@1.1.2", "", {}, "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg=="], "vfile": ["vfile@6.0.3", "", { "dependencies": { "@types/unist": "^3.0.0", "vfile-message": "^4.0.0" } }, "sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q=="], @@ -1108,8 +1072,6 @@ "web-namespaces": ["web-namespaces@2.0.1", "", {}, "sha512-bKr1DkiNa2krS7qxNtdrtHAmzuYGFQLiQ13TsorsdT6ULTkPLKuu5+GsFpDlg6JFjUTwX2DyhMPG2be8uPrqsQ=="], - "which": ["which@2.0.2", "", { "dependencies": { "isexe": "^2.0.0" }, "bin": { "node-which": "./bin/node-which" } }, "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA=="], - "widest-line": ["widest-line@4.0.1", "", { "dependencies": { "string-width": "^5.0.1" } }, "sha512-o0cyEG0e8GPzT4iGHphIOh0cJOV8fivsXxddQasHPHfoZf1ZexrfeA21w2NaEN1RHE+fXlfISmOE8R9N3u3Qig=="], "wrap-ansi": ["wrap-ansi@8.1.0", "", { "dependencies": { "ansi-styles": "^6.1.0", "string-width": "^5.0.1", "strip-ansi": "^7.0.1" } }, "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ=="], @@ -1122,14 +1084,12 @@ "yuku-core": ["yuku-core@0.19.0", "", { "dependencies": { "@yuku-toolchain/types": "^0.19.0" }, "optionalDependencies": { "@yuku-core/binding-android-arm64": "0.19.0", "@yuku-core/binding-darwin-arm64": "0.19.0", "@yuku-core/binding-darwin-x64": "0.19.0", "@yuku-core/binding-freebsd-x64": "0.19.0", "@yuku-core/binding-linux-arm-gnu": "0.19.0", "@yuku-core/binding-linux-arm-musl": "0.19.0", "@yuku-core/binding-linux-arm64-gnu": "0.19.0", "@yuku-core/binding-linux-arm64-musl": "0.19.0", "@yuku-core/binding-linux-x64-gnu": "0.19.0", "@yuku-core/binding-linux-x64-musl": "0.19.0", "@yuku-core/binding-win32-arm64": "0.19.0", "@yuku-core/binding-win32-x64": "0.19.0" } }, "sha512-kYK9e1XdfirNhkipzW0wmMcSWcVF/CWnuugodfVYRCUwvoBefweL9HzB96OiKEhsx78V5WbUxbJqlizMX869Qg=="], - "zbsearch": ["zbsearch@4.0.1", "", {}, "sha512-lmnEEnb93QQcNv7qARDr7jBVPxYdZbZ9XdZ0dbZ0qaOvGne4jJMW4fjwPfVaUKQXv3FNWvGbDwRDgyaSb1pc8w=="], + "zbsearch": ["zbsearch@4.0.4", "", {}, "sha512-uajYItKQcOP6f1z+XqzJSIx1jQPe7PbXajElh7r60KGc1MoSIn/hH9d++SvtkT78GXrZB4fah/e8Ts8jFh2CGw=="], "zod": ["zod@4.6.7", "", {}, "sha512-g8W2D2kU6a8untc053fX1uVBKzM7yqAxW/3zwk83+6RyF2+SKOuV+c0wBDhUwzV1PaGapmZH+rmcUzPf+3CGwg=="], "zwitch": ["zwitch@2.0.4", "", {}, "sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A=="], - "@tailwindcss/node/magic-string": ["magic-string@0.30.21", "", { "dependencies": { "@jridgewell/sourcemap-codec": "^1.5.5" } }, "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ=="], - "@tailwindcss/oxide-wasm32-wasi/@emnapi/core": ["@emnapi/core@1.11.3", "", { "dependencies": { "@emnapi/wasi-threads": "1.2.3", "tslib": "^2.4.0" }, "bundled": true }, "sha512-zLpS5asjEb7lq8jYLq37N6XKaE41DIexlY1rF/z4/tIl3wo13Sqm28fRyfIsKZD+NZ8mM5RoKkpW/rBcuoSZSg=="], "@tailwindcss/oxide-wasm32-wasi/@emnapi/runtime": ["@emnapi/runtime@1.11.3", "", { "dependencies": { "tslib": "^2.4.0" }, "bundled": true }, "sha512-Xz4Tpyki7XyrpbUK1jR1AhdAdaXyhhY4lZ3neLodmhpuWfy2PAQN5B46sAiU4liOXGLkHypn/qU+jvfWSCYYLA=="], diff --git a/website/package.json b/website/package.json index d5d8d2e9..cb6d7716 100644 --- a/website/package.json +++ b/website/package.json @@ -11,24 +11,24 @@ }, "dependencies": { "@codebelt/classy-store": "0.11.0", - "fumadocs-core": "16.17.7", - "fumadocs-mdx": "15.4.9", - "fumadocs-ui": "npm:@fumadocs/base-ui@16.17.7", - "mermaid": "^12.2.0", + "fumadocs-core": "16.19.4", + "fumadocs-mdx": "15.6.3", + "fumadocs-ui": "npm:@fumadocs/base-ui@16.19.4", + "mermaid": "^12.3.0", "next": "16.4.6", "next-themes": "0.4.6", "react": "^19.3.1", "react-dom": "^19.3.1" }, "devDependencies": { - "@tailwindcss/postcss": "^4.3.3", + "@tailwindcss/postcss": "^4.3.5", "@types/mdx": "^2.0.14", - "@types/node": "^26.6.5", + "@types/node": "^26.6.6", "@types/react": "^19.3.0", "@types/react-dom": "^19.3.0", - "postcss": "^8.5.31", - "serve": "^14.2.6", - "tailwindcss": "^4.3.3", + "postcss": "^8.5.33", + "serve": "^14.2.8", + "tailwindcss": "^4.3.5", "typescript": "^7.0.2", "@playwright/test": "1.65.1" } From c4cd8b4cf7cdb620fd5b0a295fb6450d76fba7f4 Mon Sep 17 00:00:00 2001 From: codeBelt Date: Tue, 17 Nov 2026 23:12:39 -0600 Subject: [PATCH 012/169] feat(core): add batch() for direct writes made outside a store method Store methods and array operations already run as transactions. A plain loop of direct writes outside any method still notified synchronous subscribers once per write, and each notification rebuilt the snapshots on the changed path: 5,000 pushes with one synchronous subscriber took about 9.6 s. batch(run) opens the same transaction around any callback and returns its result. The same loop inside batch() takes about 11 ms and notifies once. Calls nest with each other and with store methods; the outermost one notifies. Only the synchronous part of an async callback is covered. Tests cover grouping, nesting, several stores, a callback that throws, a callback with no effective write, an async callback, batched subscribers, a mounted React consumer, and the exported type. Co-Authored-By: Claude Fable 5.2 --- .../src/core/core.transactions.test.ts | 175 +++++++++++++++++- packages/classy-store/src/core/core.ts | 29 +++ .../react/react.transactions.test.tsx | 40 +++- packages/classy-store/src/index.ts | 2 +- packages/classy-store/src/storeRuntime.ts | 1 + .../classy-store/src/types.exports.test.ts | 4 + 6 files changed, 248 insertions(+), 3 deletions(-) diff --git a/packages/classy-store/src/core/core.transactions.test.ts b/packages/classy-store/src/core/core.transactions.test.ts index 5a0733fc..82257f77 100644 --- a/packages/classy-store/src/core/core.transactions.test.ts +++ b/packages/classy-store/src/core/core.transactions.test.ts @@ -1,6 +1,6 @@ import {describe, expect, mock, test} from 'bun:test'; import {snapshot} from '../snapshot/snapshot'; -import {createClassyStore, subscribe} from './core'; +import {batch, createClassyStore, subscribe} from './core'; type Row = {id: number}; @@ -208,3 +208,176 @@ describe('transactions', () => { expect(instance.name).toBe('row'); }); }); + +describe('batch()', () => { + test('a loop of direct writes is one synchronous notification', () => { + const store = createClassyStore({items: rows(3)}); + const lengths: number[] = []; + subscribe(store, () => lengths.push(snapshot(store).items.length), { + sync: true, + }); + + batch(() => { + for (let index = 0; index < 500; index++) { + store.items.push({id: index}); + } + }); + + // One notification, and it sees every write. + expect(lengths).toEqual([503]); + }); + + test('groups writes to several fields and never exposes a partial state', () => { + const store = createClassyStore({first: '', last: ''}); + const seen: string[] = []; + subscribe( + store, + () => { + const snap = snapshot(store); + seen.push(`${snap.first} ${snap.last}`); + }, + {sync: true}, + ); + + batch(() => { + store.first = 'Ada'; + store.last = 'Lovelace'; + }); + + expect(seen).toEqual(['Ada Lovelace']); + }); + + test('reads inside the batch are current', () => { + const store = createClassyStore({ + count: 0, + get doubled() { + return this.count * 2; + }, + }); + + batch(() => { + store.count = 2; + expect(store.doubled).toBe(4); + expect(snapshot(store).count).toBe(2); + }); + }); + + test('passes the return value through', () => { + const store = createClassyStore({count: 1}); + const result = batch(() => { + store.count++; + return store.count * 10; + }); + expect(result).toBe(20); + }); + + test('nested batches and store methods notify once, at the outermost batch', () => { + class Counter { + count = 0; + + increment() { + this.count++; + } + } + const store = createClassyStore(new Counter()); + const listener = mock(() => {}); + subscribe(store, listener, {sync: true}); + + batch(() => { + store.increment(); + batch(() => { + store.increment(); + store.count += 10; + }); + expect(listener).not.toHaveBeenCalled(); + }); + + expect(listener).toHaveBeenCalledTimes(1); + expect(store.count).toBe(12); + }); + + test('notifies each store that was written, once', () => { + const first = createClassyStore({value: 0}); + const second = createClassyStore({value: 0}); + const untouched = createClassyStore({value: 0}); + const onFirst = mock(() => {}); + const onSecond = mock(() => {}); + const onUntouched = mock(() => {}); + subscribe(first, onFirst, {sync: true}); + subscribe(second, onSecond, {sync: true}); + subscribe(untouched, onUntouched, {sync: true}); + + batch(() => { + first.value = 1; + second.value = 1; + first.value = 2; + }); + + expect(onFirst).toHaveBeenCalledTimes(1); + expect(onSecond).toHaveBeenCalledTimes(1); + expect(onUntouched).not.toHaveBeenCalled(); + }); + + test('a batch that throws still reports the writes it made, then rethrows', () => { + const store = createClassyStore({step: 0}); + const listener = mock(() => {}); + subscribe(store, listener, {sync: true}); + + expect(() => + batch(() => { + store.step = 1; + throw new Error('stop'); + }), + ).toThrow('stop'); + + expect(listener).toHaveBeenCalledTimes(1); + // The failed batch left no transaction open. + store.step = 2; + expect(listener).toHaveBeenCalledTimes(2); + }); + + test('a batch with no effective write notifies no one', () => { + const store = createClassyStore({count: 1}); + const listener = mock(() => {}); + subscribe(store, listener, {sync: true}); + + batch(() => { + store.count = 1; + }); + + expect(listener).not.toHaveBeenCalled(); + }); + + test('covers only the synchronous part of an async callback', async () => { + const store = createClassyStore({loading: false, data: ''}); + const listener = mock(() => {}); + subscribe(store, listener, {sync: true}); + + const pending = batch(async () => { + store.loading = true; + await Promise.resolve(); + store.data = 'ready'; + store.loading = false; + }); + + expect(listener).toHaveBeenCalledTimes(1); + await pending; + expect(listener).toHaveBeenCalledTimes(3); + }); + + test('batched subscribers still receive one notification per microtask', async () => { + const store = createClassyStore({count: 0}); + const listener = mock(() => {}); + subscribe(store, listener); + + batch(() => { + store.count++; + }); + batch(() => { + store.count++; + }); + await Promise.resolve(); + + expect(listener).toHaveBeenCalledTimes(1); + }); +}); diff --git a/packages/classy-store/src/core/core.ts b/packages/classy-store/src/core/core.ts index fa4c6eed..153b7d39 100644 --- a/packages/classy-store/src/core/core.ts +++ b/packages/classy-store/src/core/core.ts @@ -276,6 +276,35 @@ function transactional( }; } +/** + * Run several writes as one transaction. Use it for a loop or a group of direct + * writes made outside a store method: synchronous subscribers, which includes + * every framework binding, are notified once when `run` returns or throws, + * instead of once per write. Store methods and array operations are + * transactions already. Calls nest; the outermost one notifies. + * + * Only the synchronous part of `run` is covered. A write made after an `await` + * happens once `batch()` has already returned, and notifies on its own. + * + * @param run - Performs the writes. Its return value is passed through. + * @returns Whatever `run` returns. + * + * @example + * ```ts + * batch(() => { + * for (const row of rows) store.items.push(row); + * }); + * ``` + */ +export function batch(run: () => T): T { + transactionDepth++; + try { + return run(); + } finally { + settleTransaction(); + } +} + function flushNotifications(): void { const owners = new Set(pendingNotifications); pendingNotifications.clear(); diff --git a/packages/classy-store/src/frameworks/react/react.transactions.test.tsx b/packages/classy-store/src/frameworks/react/react.transactions.test.tsx index e50f2af3..cd65c073 100644 --- a/packages/classy-store/src/frameworks/react/react.transactions.test.tsx +++ b/packages/classy-store/src/frameworks/react/react.transactions.test.tsx @@ -2,7 +2,7 @@ import {afterEach, beforeEach, describe, expect, it, spyOn} from 'bun:test'; import {act, type ReactNode} from 'react'; import {createRoot, type Root} from 'react-dom/client'; import {reactiveMap} from '../../collections/collections'; -import {createClassyStore} from '../../core/core'; +import {batch, createClassyStore} from '../../core/core'; import {shallowEqual} from '../../utils/equality/equality'; import {useClassyStore} from './react'; @@ -139,6 +139,44 @@ describe('useClassyStore — transactions', () => { }); }); +describe('useClassyStore — batch()', () => { + it('a batched loop of direct writes builds one list snapshot and renders once', () => { + const store = createClassyStore({items: rows(400)}); + let renders = 0; + function Count() { + renders++; + const count = useClassyStore(store, (state) => state.items.length); + return {count}; + } + render(); + const rendersBefore = renders; + let buildsOfList = 0; + const originalFreeze = Object.freeze; + const freezeSpy = spyOn(Object, 'freeze').mockImplementation((( + value: unknown, + ) => { + if (Array.isArray(value) && value.length >= 400) buildsOfList++; + return originalFreeze(value); + }) as typeof Object.freeze); + + try { + act(() => { + batch(() => { + for (let index = 0; index < 200; index++) { + store.items.push({id: index, done: false}); + } + }); + }); + } finally { + freezeSpy.mockRestore(); + } + + expect(buildsOfList).toBe(1); + expect(renders - rendersBefore).toBe(1); + expect(container.textContent).toBe('600'); + }); +}); + describe('useClassyStore — values handed back to the store', () => { it.each([ ['selector', false], diff --git a/packages/classy-store/src/index.ts b/packages/classy-store/src/index.ts index 67793046..c98dc143 100644 --- a/packages/classy-store/src/index.ts +++ b/packages/classy-store/src/index.ts @@ -5,7 +5,7 @@ * * @module @codebelt/classy-store */ -export {createClassyStore, snapshot, subscribe} from './storeRuntime'; +export {batch, createClassyStore, snapshot, subscribe} from './storeRuntime'; export type {Snapshot, SubscribeOptions} from './types'; export {shallowEqual} from './utils/equality/equality'; export {PROXYABLE} from './utils/internal/internal'; diff --git a/packages/classy-store/src/storeRuntime.ts b/packages/classy-store/src/storeRuntime.ts index ac93bb6a..400807d2 100644 --- a/packages/classy-store/src/storeRuntime.ts +++ b/packages/classy-store/src/storeRuntime.ts @@ -1,6 +1,7 @@ // Both package formats resolve this peer-free entry through #store-runtime. export {createProxy, isChanged} from 'proxy-compare'; export { + batch, createClassyStore, getInternal, getVersion, diff --git a/packages/classy-store/src/types.exports.test.ts b/packages/classy-store/src/types.exports.test.ts index e762e856..48ec6502 100644 --- a/packages/classy-store/src/types.exports.test.ts +++ b/packages/classy-store/src/types.exports.test.ts @@ -3,6 +3,7 @@ import type {Signal} from '@angular/core'; import {reactiveMap} from './collections/index'; import {injectClassyStore} from './frameworks/angular/angular'; import { + batch, createClassyStore, PROXYABLE, type Snapshot, @@ -33,6 +34,9 @@ describe('public entry point types', () => { () => void >(); expectTypeOf(shallowEqual).toEqualTypeOf<(a: T, b: T) => boolean>(); + expectTypeOf(batch).toEqualTypeOf<(run: () => T) => T>(); + expectTypeOf(batch(() => store.count)).toEqualTypeOf(); + expectTypeOf(batch(async () => 'done')).toEqualTypeOf>(); }); test('PROXYABLE is a symbol that a class can use as a static key', () => { From 9c8bf069b57c9c7325252e25c24790774722ed9d Mon Sep 17 00:00:00 2001 From: codeBelt Date: Tue, 17 Nov 2026 23:12:39 -0600 Subject: [PATCH 013/169] docs: describe 1.0 on its own terms 1.0 is the first stable release, so the documentation no longer carries guidance for moving from earlier versions. - Remove the 0.7, 0.8, 0.11 and 1.0 upgrade guides and the Upgrading section of the docs sidebar. - Remove the README's upgrade section and the migration notes inside the API reference, tutorial, Angular guide and docs landing page. - Document batch(): an API reference section, the tutorial's batching and transactions section, the README and API tables, and the architecture page. - The 1.0 changeset keeps its list of breaking changes, which becomes the 1.0.0 changelog entry, but no longer links to an upgrade guide. It states the Node 22 minimum and the new batch() export. Co-Authored-By: Claude Fable 5.2 --- .changeset/stable-one.md | 5 +- CLAUDE.md | 10 +- README.md | 17 +- website/README.md | 4 +- website/content/docs/ANGULAR.md | 7 +- website/content/docs/API_REFERENCE.md | 26 ++- website/content/docs/ARCHITECTURE.md | 2 + website/content/docs/TUTORIAL.md | 18 +- website/content/docs/UPGRADING_0_11.md | 19 --- website/content/docs/UPGRADING_0_7.md | 114 ------------- website/content/docs/UPGRADING_0_8.md | 78 --------- website/content/docs/UPGRADING_1_0.md | 220 ------------------------- website/content/docs/index.md | 6 +- website/content/docs/meta.json | 5 - 14 files changed, 54 insertions(+), 477 deletions(-) delete mode 100644 website/content/docs/UPGRADING_0_11.md delete mode 100644 website/content/docs/UPGRADING_0_7.md delete mode 100644 website/content/docs/UPGRADING_0_8.md delete mode 100644 website/content/docs/UPGRADING_1_0.md diff --git a/.changeset/stable-one.md b/.changeset/stable-one.md index 0e47c850..96ab6171 100644 --- a/.changeset/stable-one.md +++ b/.changeset/stable-one.md @@ -2,7 +2,7 @@ "@codebelt/classy-store": major --- -Release 1.0.0, the first stable version. The public API and its behavior are now covered by semantic versioning. See the [1.0 upgrade guide](https://codebelt.github.io/classy-store/docs/UPGRADING_1_0) for before/after examples of every breaking change. +Release 1.0.0, the first stable version. The public API and its behavior are now covered by semantic versioning. **Breaking changes** @@ -20,5 +20,6 @@ Release 1.0.0, the first stable version. The public API and its behavior are now - `withHistory`: undo and redo remove top-level fields that the restored entry lacks, `undo()` steps back over an edit made in the same tick, and unchanged fields keep their identity. - Reactive collections compare keys and values by identity, so a plain object works as a key whether it is given raw, as a store proxy or as a snapshot. Lookups scan the raw backing array. +- `batch(run)` is exported to group direct writes made outside a store method into one synchronous notification. - `PROXYABLE` is exported so a class can opt into nested reactivity with `static [PROXYABLE] = true`. -- The package declares `engines.node >= 20` and exports `./package.json`. +- The package declares `engines.node >= 22` and exports `./package.json`. diff --git a/CLAUDE.md b/CLAUDE.md index 55314340..c0ed2605 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -10,7 +10,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co ``` packages/classy-store/src/ -├── index.ts # Main entry: createClassyStore, snapshot, subscribe, shallowEqual, PROXYABLE +├── index.ts # Main entry: createClassyStore, snapshot, subscribe, batch, shallowEqual, PROXYABLE ├── storeRuntime.ts # Runtime shared by every entry and both module formats (#store-runtime) ├── types.ts # Public Snapshot, SubscribeOptions ├── core/core.ts # Layer 1: Write Proxy — createClassyStore(), subscribe(), transactions, computed getters @@ -39,7 +39,7 @@ packages/classy-store/src/ ├── utilityStatus/ # Status publisher behind the persist and history handles └── internal/internal.ts # isPlainObject, canProxy, findGetterDescriptor, PROXYABLE -website/ # Fumadocs static site (Next.js) +website/ # Fumadocs static site (Next.js); a workspace member that runs the library built from this repository website/content/docs/ # .md source for all doc pages website/examples/ # Live React controls used by the MDX example pages website/public/ # Static assets and old demo bookmark redirect @@ -62,8 +62,8 @@ bun run typecheck # TypeScript type check without emit bun run check:package # Build, then publint + arethetypeswrong on the packed tarball bun run checkall # lint + test + typecheck (full CI check) -bun run docs:dev # Start Fumadocs at http://localhost:3000 -bun run docs:build # Export the GitHub Pages site to website/out/ +bun run docs:dev # Build the library, then start Fumadocs at http://localhost:3000 +bun run docs:build # Build the library, then export the GitHub Pages site to website/out/ ``` Run from `packages/classy-store/`: @@ -105,7 +105,7 @@ Enforced by Biome (`biome.json` at repo root; the version is pinned in the root - **No arrow function methods:** Arrow function properties (`increment = () => {}`) have `this` lexically bound to the raw instance. `.bind()` is a no-op on arrow functions, so the GET trap cannot rebind `this` to the proxy. Mutations inside arrow functions bypass the SET trap entirely — no notifications, no reactivity. Always use prototype methods (`increment() {}`). - **Batching:** ordinary subscribers are coalesced via `queueMicrotask`. Multiple synchronous writes (including array `push` which triggers multiple SET traps) produce a single notification. -- **Transactions:** `{sync: true}` subscribers, which is every framework binding, are notified once per direct write, and once per store method or array-method call, when the outermost call returns. Versions still bump on every write, so reads inside the call are current. Without this an in-place `sort` or `unshift` notifies once per moved element and each notification rebuilds the list snapshot. +- **Transactions:** `{sync: true}` subscribers, which is every framework binding, are notified once per direct write, and once per store method or array-method call, when the outermost call returns. Versions still bump on every write, so reads inside the call are current. Without this an in-place `sort` or `unshift` notifies once per moved element and each notification rebuilds the list snapshot. The exported `batch(run)` opens the same transaction around direct writes made outside a method. - **Subscription scope:** `subscribe(node)` observes that node's subtree only. Each call is its own registration. - **Snapshots are values:** a frozen snapshot assigned into a store is kept by reference and never proxied, including one read through React's tracking proxy. - **Internal state:** stored in a `WeakMap` — never on the user's object. Allows GC when a store is dereferenced. diff --git a/README.md b/README.md index 33e72856..e7697011 100644 --- a/README.md +++ b/README.md @@ -12,18 +12,6 @@ Visit the **[Documentation Website](https://codebelt.github.io/classy-store/)** for tutorials, API reference, and examples. -## Upgrading to 1.0 - -1.0 is the first stable release: the public API and its behavior now follow semantic versioning. Coming from 0.11.x, read the [1.0 upgrade guide](https://codebelt.github.io/classy-store/docs/UPGRADING_1_0). The changes most likely to need an edit are: - -- `devtools(store)` returns a handle; call `handle.dispose()` instead of calling the result. -- Angular's `injectStore` is now `injectClassyStore`. -- `subscribe()` on a nested proxy observes only that proxy's subtree. -- `persist` ignores stored data whose `version` differs unless you provide `migrate`. -- The Solid adapter requires Solid 2 (`solid-js@^2.0.0`). - -Coming from an older release, apply the earlier guides first: [0.11.0](https://codebelt.github.io/classy-store/docs/UPGRADING_0_11), [0.8.0](https://codebelt.github.io/classy-store/docs/UPGRADING_0_8) and [0.7.0](https://codebelt.github.io/classy-store/docs/UPGRADING_0_7). - ## 🚀 Features - **Class-Based**: Define state and logic using standard ES6 classes. @@ -99,6 +87,7 @@ property reads; changes to time or external variables do not invalidate their ca | Read state outside React or observe mutations | `snapshot(store)`, `subscribe(store, listener)`, `subscribeKey(store, key, listener)` | | Persist state, record history, or inspect it in DevTools | `persist(store, options)`, `withHistory(store)`, `devtools(store)` | | Track changes inside Map-like or Set-like collections | `reactiveMap()`, `reactiveSet()` | +| Group direct writes into one notification | `batch(run)` | | Compare selector results one level deep | `shallowEqual(previous, next)` | `useClassyStore` is the starting point for React components. The two status hooks @@ -122,7 +111,7 @@ return ( ); ``` -Ordinary `subscribe(store, listener)` callbacks still batch in a microtask. A store method or an array operation such as `sort` is one transaction: React is notified once when it returns, however many fields it wrote. A write made outside a method notifies on its own, so keep loops of writes inside a store method. +Ordinary `subscribe(store, listener)` callbacks still batch in a microtask. A store method or an array operation such as `sort` is one transaction: React is notified once when it returns, however many fields it wrote. A write made outside a method notifies on its own, so put a loop of writes in a store method or wrap it in `batch()`. For server-rendered React apps, call `prepareStoreForHydration(store)` from `@codebelt/classy-store/react/server` on matching server/client stores before persistence starts. Delayed Suspense boundaries then hydrate from the original data and catch up to live state. See the [SSR guide](https://codebelt.github.io/classy-store/docs/REACT_SSR). @@ -145,7 +134,7 @@ writes update the signal and dependent computed reads immediately; Angular schedules rendering, including in zoneless applications. The subscription is removed with its `DestroyRef` lifecycle. Ordinary core subscriptions remain batched. See the [Angular guide](https://codebelt.github.io/classy-store/docs/ANGULAR) -for inputs, keyed lists, cleanup, and migration requirements. +for inputs, keyed lists, and cleanup. ## Solid 2 integration diff --git a/website/README.md b/website/README.md index 096e3cf7..3aa11070 100644 --- a/website/README.md +++ b/website/README.md @@ -1,13 +1,13 @@ # Classy Store documentation -Edit pages in `website/content/docs/` and use `meta.json` there to order the sidebar. Set each page’s title and description in its frontmatter. Link between sources with relative Markdown links such as `./REACT_SSR.md`. Published paths and heading fragments are used by npm and earlier release notes. +Edit pages in `website/content/docs/` and use `meta.json` there to order the sidebar. Set each page’s title and description in its frontmatter. Link between sources with relative Markdown links such as `./REACT_SSR.md`. Published paths and heading fragments are linked from the npm README, so keep them stable. The homepage, docs, and interactive examples use one Next.js dev server and static export. Edit example pages in `website/content/examples/` and their live React controls in `website/examples/`. Code fences inside each example are highlighted at build time and share the guide theme. From the repository root: ```sh -bun install --cwd website --frozen-lockfile +bun install bun run docs:dev ``` diff --git a/website/content/docs/ANGULAR.md b/website/content/docs/ANGULAR.md index a05bc9d9..0704d011 100644 --- a/website/content/docs/ANGULAR.md +++ b/website/content/docs/ANGULAR.md @@ -104,7 +104,7 @@ When testing scheduled rendering, wait for `ApplicationRef.whenStable()` or `ComponentFixture.whenStable()` instead of masking scheduling with manual `detectChanges()` calls. -## Cleanup and migration +## Cleanup The subscription belongs to the injected `DestroyRef`. A component-scoped call unsubscribes when that component is destroyed; a service or provider factory @@ -116,11 +116,6 @@ Calls outside an injection context or after its destruction throw without registering a listener. Destroyed consumers ignore pending notifications, including destruction during an in-progress store notification. -To migrate, update your Angular packages to the same stable Angular 22 release -and use its compatible TypeScript toolchain. The `injectClassyStore(store)` signature and `/angular` import -path are unchanged. Signal reads now update immediately rather than waiting for -the core subscription microtask. There is no adapter timing option. - See the [Angular example](https://github.com/codeBelt/classy-store/tree/main/examples/angular) for a zoneless application with inputs, a class getter, Angular computed state, and keyed lists. Angular documents the diff --git a/website/content/docs/API_REFERENCE.md b/website/content/docs/API_REFERENCE.md index 2a9753ac..4d2ed2f3 100644 --- a/website/content/docs/API_REFERENCE.md +++ b/website/content/docs/API_REFERENCE.md @@ -17,6 +17,7 @@ description: "Public entry points, types, hooks, and utility signatures for Clas | Read state outside React or observe mutations | `snapshot(store)`, `subscribe(store, listener)`, `subscribeKey(store, key, listener)` | | Persist state, record history, or inspect it in DevTools | `persist(store, options)`, `withHistory(store)`, `devtools(store)` | | Track changes inside Map-like or Set-like collections | `reactiveMap()`, `reactiveSet()` | +| Group direct writes into one notification | `batch(run)` | | Compare selector results one level deep | `shallowEqual(previous, next)` | `useClassyStore` is the starting point for React components. The two status hooks @@ -29,7 +30,7 @@ Import from the entry that owns the API. Core, collections, and utilities do not | Import path | Runtime exports | Public types | | ------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `@codebelt/classy-store` | `createClassyStore`, `snapshot`, `subscribe`, `shallowEqual`, `PROXYABLE` | `Snapshot`, `SubscribeOptions` | +| `@codebelt/classy-store` | `createClassyStore`, `snapshot`, `subscribe`, `batch`, `shallowEqual`, `PROXYABLE` | `Snapshot`, `SubscribeOptions` | | `@codebelt/classy-store/react` | `useClassyStore`, `useLocalStore`, `createStoreHook`, `useHistoryStatus`, `usePersistStatus` | `UseClassyStoreSelectorOptions` | | `@codebelt/classy-store/react/server` | `prepareStoreForHydration` | — | | `@codebelt/classy-store/collections` | `reactiveMap`, `reactiveSet` | `ReactiveMap`, `ReactiveSet` | @@ -68,7 +69,7 @@ Angular's `injectClassyStore(store)` supports **all stable Angular 22 releases** injection context and returns a readonly signal. Store writes update the signal and dependent computed reads immediately; Angular schedules effects and rendering, including zoneless `OnPush` views. Cleanup follows the injected `DestroyRef`. -See the [Angular guide](./ANGULAR.md) for inputs, keyed lists, and migration. +See the [Angular guide](./ANGULAR.md) for inputs, keyed lists, and cleanup. ## API Reference @@ -152,7 +153,7 @@ return ( React subscriptions always notify synchronously, including selector, auto-tracked, and bound hooks. There is no React `sync` option. This lets React observe controlled-field changes during the input event and preserve caret position. Ordinary `subscribe()` callbacks remain batched. -When upgrading from 0.6.x, remove the React hook's `sync` option and imports of `UseClassyStoreOptions`. Selector options still support `isEqual`. Selectors run after each direct write to a store and once after each store method or array operation, even when React batches the resulting renders. [0.7.0 upgrade guide](./UPGRADING_0_7.md) +Selectors run after each direct write to a store and once after each store method or array operation, even when React batches the resulting renders. ### `useHistoryStatus(history)` @@ -348,6 +349,25 @@ unsub(); unsubSync(); ``` +### `batch(run)` + +Runs `run` and notifies synchronous subscribers once, when it returns or throws, instead of once per write. Every framework adapter subscribes synchronously, so this is what keeps a loop of direct writes from re-reading the store on each iteration. Returns whatever `run` returns. + +```typescript +import {batch} from '@codebelt/classy-store'; + +batch(() => { + for (const row of incoming) { + listStore.items.push(row); + } + listStore.loadedAt = Date.now(); +}); // subscribers are notified once, here +``` + +Store methods and array methods on store state are transactions already, so `batch()` is only needed for writes made directly on the store outside a method. Calls nest, including with store methods; the outermost one notifies. Reads inside the callback see every write made so far. + +Only the synchronous part of the callback is covered. In `batch(async () => { ... })`, a write after an `await` happens once `batch()` has already returned and notifies on its own. Ordinary `subscribe()` callbacks are batched in a microtask regardless. [Batching and transactions](./TUTORIAL.md#batching-and-transactions) + ### `shallowEqual(a, b)` Use `shallowEqual` for selectors that return a new array, record, or collection on each call. It compares primitives with `Object.is` and arrays by length, occupied indices, and element values. A hole differs from an explicit `undefined` element. diff --git a/website/content/docs/ARCHITECTURE.md b/website/content/docs/ARCHITECTURE.md index 28c4900a..27577e61 100644 --- a/website/content/docs/ARCHITECTURE.md +++ b/website/content/docs/ARCHITECTURE.md @@ -235,6 +235,8 @@ store.items.unshift(row) // 5,000 rows, one mounted consumer Without this, each of those writes notified the consumer, and each notification rebuilt the list snapshot: quadratic work for one call. Batched listeners are unaffected; they were already coalesced by the microtask. Writes after an `await` in an async method happen after its call returned, so they are outside the transaction. +The exported `batch(run)` opens the same transaction around any callback. It exists for writes made directly on a store outside a method, which would otherwise each notify on their own. + The Svelte adapter also uses synchronous notifications to satisfy the readable store contract. It subscribes before delivering the initial snapshot so mutations inside that first callback are observed, and removes the subscription if the diff --git a/website/content/docs/TUTORIAL.md b/website/content/docs/TUTORIAL.md index f0bc7f48..7aa49a24 100644 --- a/website/content/docs/TUTORIAL.md +++ b/website/content/docs/TUTORIAL.md @@ -197,8 +197,6 @@ function NameInput() { } ``` -If upgrading from 0.6.x, remove the React `sync` option and `UseClassyStoreOptions` imports. Keep `isEqual` if you use custom selector equality. The low-level `subscribe()` API retains its batching and optional `sync` setting. - ## Batching and transactions Ordinary `subscribe()` callbacks batch notifications in a microtask. Framework adapters, including React's, are notified synchronously, so a controlled input sees its new value within the event that changed it. @@ -228,7 +226,19 @@ class FormStore { Array methods called on store state work the same way: `store.items.sort()`, `unshift()`, `splice()` or a `forEach()` that edits every row is one notification and one new snapshot of the list, however many elements moved. -A write made directly on the store outside any method, such as `store.count++` in an event handler, notifies by itself. A plain loop of such writes therefore notifies once per write, and each notification rebuilds the snapshots on the changed path. Put loops and multi-field updates in a store method. +A write made directly on the store outside any method, such as `store.count++` in an event handler, notifies by itself. A plain loop of such writes therefore notifies once per write, and each notification rebuilds the snapshots on the changed path. Put loops and multi-field updates in a store method, or wrap them in `batch()` when the writes belong outside the store: + +```ts +import {batch} from '@codebelt/classy-store'; + +batch(() => { + for (const row of incoming) { + listStore.items.push(row); + } +}); // one notification, not one per row +``` + +`batch()` returns its callback's result and nests with store methods and with other batches; the outermost call notifies. An `async` method is a transaction up to its first `await`. Each write after an `await` notifies on its own unless it happens inside another method call, which lets loading and result states appear separately. See [Async Patterns](#async-patterns) below. @@ -676,7 +686,7 @@ On a snapshot, every getter of the class is installed as an enumerable own acces A write outside a store method notifies React by itself. Setting a field and reverting it with two such writes can still schedule rendering, even though the final displayed value is unchanged. Neither selector mode nor auto-tracked mode promises to avoid this work. -Likewise, a plain loop with a thousand direct writes sends a thousand synchronous notifications. Move the loop into a store method to make it one transaction and one notification. Ordinary `subscribe()` callbacks receive one microtask notification either way. +Likewise, a plain loop with a thousand direct writes sends a thousand synchronous notifications. Move the loop into a store method, or wrap it in `batch()`, to make it one transaction and one notification. Ordinary `subscribe()` callbacks receive one microtask notification either way. ### Auto-tracked references diff --git a/website/content/docs/UPGRADING_0_11.md b/website/content/docs/UPGRADING_0_11.md deleted file mode 100644 index 18dff6de..00000000 --- a/website/content/docs/UPGRADING_0_11.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -title: "0.11.0 release notes" -description: "Review framework support and behavior changes when upgrading from 0.10.x." ---- - -Applications upgrading from 0.10.x can keep their existing store definitions and public imports. This minor release supports React 18 and 19, Vue 3 starting at 3.2, Svelte 4 and 5, and Angular 22. The npm package includes the MIT license. - -## Framework support - -**Solid.** Applications using `@codebelt/classy-store/solid` should check the adapter's peer requirement before upgrading Solid. The current requirement is in the [Solid integration guide](./SOLID.md). - -**Angular supports all stable 22.x releases** through the optional `@angular/core` peer range `^22.0.0`. The library's development dependencies and example use Angular `22.2.6`. Keep your application's Angular runtime and compiler packages on matching versions. [Angular integration guide](./ANGULAR.md) - -## Changes since 0.10.x - -- Retained rows stay reactive after reordering or filtering. An edit to a shared object updates every owning path. Subscriptions follow a retained row across stores. An independently created editor keeps its own undo/redo history when embedded in a larger store. -- Snapshots preserve sparse array holes, own JSON `__proto__` keys, and object-literal getters. Nested writes made by class setters reach subscribers. `shallowEqual` distinguishes arrays from records and a missing array slot from an element containing `undefined`. -- Persistence preserves and saves subscriber edits to other selected fields during a restore, regardless of field declaration order. Calling `clear()` from a restore subscriber removes the stored data until a later local edit. Existing 0.10.x records use the same envelope. Keep your persistence schema version when only the library version changes. -- ESM and CommonJS callers can pass a store between entry points from the same installed copy, including when using history utilities or preparing React hydration. diff --git a/website/content/docs/UPGRADING_0_7.md b/website/content/docs/UPGRADING_0_7.md deleted file mode 100644 index 9a42c01b..00000000 --- a/website/content/docs/UPGRADING_0_7.md +++ /dev/null @@ -1,114 +0,0 @@ ---- -title: "Upgrading to 0.7.0" -description: "Migrate React subscriptions and persistence from 0.6.x and earlier." ---- - -This is the historical 0.7.0 upgrade guide. For the current API, also read [Upgrading to 0.8.0](./UPGRADING_0_8.md), which replaces persistence cleanup and removes duplicate exports. - -Version 0.7.0 focuses on core and React correctness, including controlled inputs, React Compiler, SSR, Next.js App Router, memory retention, and persistence. It includes React API and runtime changes that consumers upgrading from 0.6.x should review. - -## Remove React timing options - -React hooks now always subscribe synchronously. This keeps controlled inputs and their caret positions aligned with store updates. Remove `sync: true` and `sync: false` from both direct and bound hooks. - -Before, in 0.6.x: - -```tsx -const state = useClassyStore(store, {sync: true}); -const count = useClassyStore(store, (state) => state.count, {sync: true}); - -// useCounterStore was created with createStoreHook(store). -const boundState = useCounterStore({sync: true}); -const boundCount = useCounterStore((state) => state.count, {sync: true}); -``` - -After, in 0.7.0: - -```tsx -const state = useClassyStore(store); -const count = useClassyStore(store, (state) => state.count); - -const boundState = useCounterStore(); -const boundCount = useCounterStore((state) => state.count); -``` - -Auto-tracked hooks no longer accept an options argument, even an empty `{}`. Remove imports and annotations using the removed `UseClassyStoreOptions` type. Selector hooks still accept `UseClassyStoreSelectorOptions` with `isEqual`: - -In 0.6.x, a selector could use both options. - -```tsx -const selection = useClassyStore(store, selectSummary, { - sync: true, - isEqual: shallowEqual, -}); -``` - -In 0.7.0, keep the equality function. - -```tsx -const selection = useClassyStore(store, selectSummary, { - isEqual: shallowEqual, -}); -``` - -The same change applies to selector options passed to a bound hook. Existing calls without React timing options continue to work. - -Ordinary `subscribe(store, listener)` callbacks still batch in a microtask, and core subscriptions retain their `{sync: true}` option. React selectors can run after each individual mutation, even when React batches the resulting renders into one commit. Keep selectors pure and able to read intermediate state during a multi-property update; this release does not introduce atomic transactions. - -## Check the auto-tracking runtime requirement - -Auto-tracked React hooks (`useClassyStore(store)` and bound hooks without a selector) now require native `WeakRef` support from ES2021. Weak references let mounted consumers release obsolete snapshots and collection values. - -Check that every browser or server runtime running auto-tracked hooks supports `WeakRef`. Transpiling JavaScript does not supply native weak-reference behavior. If your supported runtime lacks it, use explicit selectors or retain 0.6.x until you can raise that runtime requirement. Selector hooks do not require `WeakRef`. - -React 18 and 19 remain covered by the package compatibility tests. React Compiler works with both selector and auto-tracked hooks; no compiler opt-out is required. - -## Prepare server-rendered stores before live updates - -Client-only apps do not need hydration preparation. For server-rendered apps where persistence or another update can run before every Suspense boundary hydrates, call `prepareStoreForHydration(store)` on server and client stores initialized from matching data, before rendering or starting persistence. - -```ts -import {createClassyStore} from '@codebelt/classy-store'; -import {prepareStoreForHydration} from '@codebelt/classy-store/react/server'; - -const store = prepareStoreForHydration( - createClassyStore(new ProfileStore(initialData)), -); -``` - -Create a separate store for each server request. The prepared snapshot is retained for that store's lifetime; use a new store for a new request or an intentional reset. See the [SSR guide](./REACT_SSR.md) and [typed context example](./REACT_SCOPING.md). - -The published `@codebelt/classy-store/react` entry now carries `use client`. In Next.js Server Components or other server-only modules, import preparation from `@codebelt/classy-store/react/server`. Hooks and the existing preparation export remain available from `/react` inside client modules and ordinary SSR. Pass serializable initial data across the Server Component boundary and construct the store inside a Client Provider; do not pass the store proxy across that boundary. See the [Next.js App Router guide](./REACT_NEXT.md). - -## Review persistence ordering and cleanup - -The stored JSON envelope has not changed, so upgrading the library alone does not require a persisted-data migration or a change to your application's persistence `version`. - -- Saves and removals requested through one persistence handle execute in request order. Each save captures the state when it is requested. -- Rehydration waits for that handle's prior writes and ignores read results superseded by a newer read, save, clear, local edit, or accepted storage event. -- `clear()` cancels pending auto-saves and removes storage after writes already requested. It does not reset the live store; a later edit can save again. -- `unsubscribe()` stops listeners and timers, ignores pending reads, and skips queued operations that have not started. It cannot cancel I/O already issued to an adapter. If you need a final save, await `handle.save()` before unsubscribing while the application is still running. -- Real browser tab synchronization ignores outdated storage events and avoids echo writes. Ordering is per handle; separate handles writing the same async storage key still need application or adapter coordination. - -See the [persistence guide](./PERSIST_TUTORIAL.md) for adapter, debounce, and cross-tab behavior. - -## Release notes - -### React integration - -- Synchronous React subscriptions fix controlled-input caret jumps without configuration; core subscriptions remain batched by default. -- Selector or equality-function changes refresh selections without requiring a store mutation. Concurrent and abandoned renders keep their tracking isolated. -- Auto-tracking preserves reads reused by React Compiler and memoized children. It can conservatively retain earlier reads until the relevant snapshot object's identity changes. -- `prepareStoreForHydration` and the `/react/server` entry support delayed and streamed hydration, including persistence updates before a boundary hydrates. -- Next.js App Router package boundaries, request isolation, navigation, refresh, and cleanup have production packed-package coverage with Compiler off and on. -- A typed context example covers independent and nested stores, keyed resets, and effect-owned persistence cleanup. - -### Core, utilities, and performance - -- Undo/redo and persistence restore mutable nested state while preserving reactive collection methods and recorded snapshots. -- Frozen snapshot backing copies are reused across auto-tracked consumers, reducing repeated work in large forms and lists. -- Detached child proxies, obsolete snapshot clones, and retired React selections can be released, including after collection replacement and array truncation. -- `Snapshot` preserves callable signatures for typed methods, overloads, and generic functions under strict TypeScript. -- Persistence orders asynchronous operations and rejects stale reads and storage events, with regression coverage for overlapping operations and real two-tab React inputs. - -Validation includes core/React tests, three-browser input tests, packed React 18/19 consumers, Compiler off/on, streaming hydration, Next.js, render-count budgets, and heap-snapshot checks. Persistence, history, DevTools, and reactive collections also have combined happy-path coverage and public TypeScript checks. diff --git a/website/content/docs/UPGRADING_0_8.md b/website/content/docs/UPGRADING_0_8.md deleted file mode 100644 index 1870620d..00000000 --- a/website/content/docs/UPGRADING_0_8.md +++ /dev/null @@ -1,78 +0,0 @@ ---- -title: "Upgrading to 0.8.0" -description: "Migrate persistence handles, hydration imports, and status subscriptions." ---- - -Version 0.8.0 adds observable history and persistence status and simplifies the public API. This pre-1.0 release includes breaking changes for consumers of 0.7.x. - -## Required updates - -| Previous usage | Use in 0.8.0 | -| --------------------------------------------------------------- | ------------------------------------------------------------------------------- | -| `persistence.unsubscribe()` | `persistence.dispose()` | -| Import `prepareStoreForHydration` from `/react` | Import it from `@codebelt/classy-store/react/server`, on both server and client | -| Import `getVersion` from the root entry | Use `subscribe()` for notifications or compare `snapshot()` references | -| Assume explicit persistence calls always resolve | Handle rejected promises from `save()`, `clear()`, and `rehydrate()` | -| Transform a property's value as a union of all store properties | Match `serialize` and `deserialize` to the property selected by `key` | - -## Dispose persistence handles - -In a 0.7.x effect, the cleanup called `persistence.unsubscribe()`. In 0.8.0, return this cleanup from the effect that created the handle. - -```ts -return () => persistence.dispose(); -``` - -Disposal is idempotent. It stops subscriptions and timers. Queued saves and removals that have yet to start reject, as do explicit calls made after disposal. A rehydration already waiting for a write or a read settles without applying its result. Storage I/O already issued can still finish. - -## Handle explicit persistence failures - -`save()`, `clear()`, and `rehydrate()` take no options. They report storage failures through `onError` and `lastError`, and reject their promises. Handle the promise even when an `onError` callback is configured: - -```ts -try { - await persistence.save(); - showSavedMessage(); -} catch (error) { - showSaveError(error); -} -``` - -Automatic writes and initial hydration handle reported failures internally. `hydrated` resolves once an attempt settles; `isHydrated` also means an attempt settled, including failure or a superseded read. Both stay settled during later reads; await `rehydrate()` for a specific new attempt. Check `persistence.getSnapshot().lastError` when the result matters. A failed operation does not prevent later queued writes from running. - -## Subscribe to utility status in React - -Use `useClassyStore(store)` for store data. Call the status hooks inside a component or custom hook when rendering metadata that changes independently of store data. - -```tsx -import {useHistoryStatus, usePersistStatus} from '@codebelt/classy-store/react'; -import type {HistoryHandle, PersistHandle} from '@codebelt/classy-store/utils'; - -function useEditorStatus(history: HistoryHandle, persistence: PersistHandle) { - const {canUndo, canRedo, isPaused} = useHistoryStatus(history); - const {isHydrated, isExpired, lastError} = usePersistStatus(persistence); - return {canUndo, canRedo, isPaused, isHydrated, isExpired, lastError}; -} -``` - -Pass stable handles. Both status snapshots include `isDisposed`. History pause state stays consistent when undo/redo finishes. - -Outside React, handles expose `getSnapshot()`, `getServerSnapshot()`, and `subscribe(listener)`. The function returned by `subscribe` removes that status listener; `dispose()` tears down the utility handle itself. The shared status source implementation is internal. Consumer types are `HistoryHandle`, `HistoryStatus`, `PersistHandle`, and `PersistStatus`, exported from `@codebelt/classy-store/utils`. - -During SSR and hydration, status hooks use the handle's initial status snapshot. Construct server and client handles with matching initial status. - -## Use the hydration entry on server and client - -```ts -import {prepareStoreForHydration} from '@codebelt/classy-store/react/server'; -``` - -The `/react` entry exports React hooks and `createStoreHook`. Hydration preparation is exported only from `/react/server`; its captured-snapshot behavior is unchanged. - -## Match persistence transforms to their property - -Transform serializers receive the selected property's readonly snapshot value. Deserializers receive `unknown` and must return that property's mutable value. Validate stored values before returning them. Transforms that mutate their snapshot input or return another property's type now fail TypeScript checks. - -Persistence status flags are readonly, matching their runtime getters. `PersistOperation` is exported from the utilities entry for typed error handlers. - -If upgrading from 0.6.x or earlier, also follow the [0.7.0 upgrade guide](./UPGRADING_0_7.md) for React timing options and the native `WeakRef` requirement. diff --git a/website/content/docs/UPGRADING_1_0.md b/website/content/docs/UPGRADING_1_0.md deleted file mode 100644 index adedc6f9..00000000 --- a/website/content/docs/UPGRADING_1_0.md +++ /dev/null @@ -1,220 +0,0 @@ ---- -title: "1.0 upgrade guide" -description: "Breaking changes and behavior changes when upgrading from 0.11.x to the first stable release." ---- - -1.0 is the first stable release. From here on the public API and its documented behavior follow semantic versioning. This guide lists everything that changed since 0.11.x, the code edits each change may need, and what stayed the same. - -If you are coming from an older release, apply the [0.11.0](./UPGRADING_0_11.md), [0.8.0](./UPGRADING_0_8.md) and [0.7.0](./UPGRADING_0_7.md) notes first. - -## At a glance - -Changes that can require an edit: - -| Change | What to do | -| ------------------------------------------------------------ | ---------------------------------------------------------------------- | -| `devtools()` returns a handle | Call `handle.dispose()` instead of calling the result | -| Angular `injectStore` renamed | Import and call `injectClassyStore` | -| `subscribe()` on a nested proxy no longer fires for siblings | Subscribe to the store itself if you relied on that | -| `persist` ignores another stored `version` without `migrate` | Provide `migrate` to keep reading old data | -| The Solid adapter requires Solid 2 | Install `solid-js` and `@solidjs/web` `^2.0.0` | -| `shallowEqual` is stricter | Usually nothing; check selectors that compared unlike values | -| Sync subscribers hear once per method, not once per write | Usually nothing; remove code that relied on seeing intermediate states | - -Changes that need no edit: transactions for array operations, per-field hydration, history restoration, object keys in reactive collections, the new `PROXYABLE` export. - -## Store methods and array operations are transactions - -A call to a store method, or to an array method on store state, now notifies synchronous subscribers once, after the outermost call returns or throws. Before, each property write inside the call notified them. Every framework adapter subscribes synchronously, so this applies to React, Vue, Svelte, Solid and Angular alike. - -```ts -class Cart { - items: number[] = []; - total = 0; - - add(price: number) { - this.items.push(price); - this.total += price; - } -} - -const cart = createClassyStore(new Cart()); -subscribe(cart, listener, {sync: true}); - -cart.add(5); -// 0.11: listener ran after the push and again after the total changed -// 1.0: listener runs once, and never sees items updated but total stale -``` - -The practical effect is on lists. One `sort()`, `reverse()`, `unshift()` or `splice()` moves many elements, and each move used to notify every mounted consumer, which then rebuilt the list snapshot. With one mounted React component, `unshift` on 3,000 rows took about 2.4 seconds; it now takes a few milliseconds. - -What to check: - -- **Ordinary `subscribe()` callbacks are unchanged.** They were already batched into one microtask notification. -- **Direct writes outside a method still notify one by one.** `store.a = 1; store.b = 2` in an event handler is two notifications. A plain loop of direct writes notifies per write; move it into a store method to make it one transaction. -- **An `async` method is a transaction up to its first `await`.** Writes after an `await` notify individually, so loading and result states still render separately. -- **Reads inside a method are current.** Versions and snapshots update with every write; only the notification is deferred. - -## `subscribe()` on a nested proxy observes its subtree only - -In 0.11, a subscription to a nested proxy also fired when a sibling field in the owning store changed, a behavior kept from releases where every subscription was attached to the root. It now fires only for changes inside the object you passed. - -```ts -const store = createClassyStore({user: {name: 'Ada'}, count: 0}); -subscribe(store.user, listener); - -store.count++; // 0.11: listener ran. 1.0: it does not. -store.user.name = 'Grace'; // listener runs in both -``` - -If you relied on the old behavior, subscribe to the store: `subscribe(store, listener)`. The same applies to `useClassyStore(store.user)`, `subscribeKey`, `persist` and `withHistory` when given a nested proxy. - -## Each `subscribe()` call is its own registration - -Subscribing the same callback twice used to register it once, so the first unsubscribe silently removed both. Each call now registers separately and each returned function removes only its own registration. - -```ts -const first = subscribe(store, listener); -const second = subscribe(store, listener); -// 1.0: listener runs twice per change until one of them is released -first(); -// listener still runs once per change -``` - -## A snapshot assigned into a store stays a snapshot - -Assigning a snapshot object into a store, for example a row taken from a rendered list, used to wrap that frozen object in a store proxy. Reads worked, and the first write failed with `'set' on proxy: trap returned falsish`. The store now keeps the snapshot by reference as an immutable value, the way it keeps a `Date`. This also covers a value read through React's auto-tracked hook. - -```tsx -const todos = useClassyStore(todoStore, (state) => state.todos); -// in a click handler: -todoStore.selected = todos[0]; - -todoStore.selected.done = true; -// 1.0: TypeError, the stored snapshot is read-only -``` - -Choose what you mean: - -- **Follow the live row:** store the live object or its id, `todoStore.selected = todoStore.todos[0]`. -- **Edit an independent copy:** clone first, for example `structuredClone(todos[0])` for plain data. -- **Keep a frozen baseline** for comparison: assign the snapshot as before. It now costs nothing and keeps its identity. - -## `persist`: hydration is per field - -Before, any change to the store while the stored data was being read made the read obsolete. The stored data was discarded and the next automatic save replaced it with the store's current values, which were usually the defaults. That happened even when the edit was to a field that is not persisted, and with synchronous storage when the edit was in the same tick as `persist()`. - -Now a stored field is restored unless that same field was edited locally while the read was in flight, and automatic saves wait for the read to settle. - -```ts -const settings = createClassyStore({ - theme: 'light', - fontSize: 12, - loading: false, -}); -persist(settings, { - name: 'settings', - storage, - properties: ['theme', 'fontSize'], -}); -settings.loading = true; // start-up flag, set before the read completes - -// Stored: {theme: 'dark', fontSize: 20} -// 0.11: the store stayed light/12 and storage was overwritten with light/12 -// 1.0: the store becomes dark/20; storage is untouched -``` - -If the user edits `fontSize` during the read, `fontSize` keeps the edited value, `theme` is still restored, and one save after the read writes both. `save()` and `clear()` behave as before and still take precedence over an in-flight read. - -## `persist`: another stored version is ignored without `migrate` - -When the stored `version` differs from the configured one and no `migrate` is given, the stored data is now ignored and the store keeps its current state. Before, it was applied as it was, whatever its shape. No error is reported, and the old record stays in storage until the next save replaces it. - -```ts -persist(store, {name: 'settings', storage, version: 2}); -// A record saved with version 1 is no longer applied. - -persist(store, { - name: 'settings', - storage, - version: 2, - migrate: (state, oldVersion) => - oldVersion === 1 ? upgradeFromV1(state) : state, -}); -// Provide migrate to keep reading older records. -``` - -A record with no `version` field counts as version `0`. - -## `shallowEqual` is stricter - -`shallowEqual` compared only enumerable string keys, so it called any two objects without such keys equal: two different dates, two different maps, a `RegExp` and another `RegExp`. A selector returning a `Date` with `isEqual: shallowEqual` never re-rendered when the date was replaced. - -| Compared values | 0.11 | 1.0 | -| --------------------------------------------- | ------- | ------------------------------------- | -| Two `Date` objects | `true` | `true` only for the same instant | -| Two `Map` or two `Set` objects | `true` | `true` only for same size and members | -| Values with different prototypes | by keys | always `false` | -| Two `RegExp`, `Error`, `Promise`, empty class | `true` | `false` unless the same object | -| Plain records and arrays | by keys | unchanged | - -A plain object and a null-prototype object with the same keys have different prototypes and are no longer equal. - -## `devtools()` returns a handle - -`devtools()` returned a function. It now returns a handle with `dispose()`, like `persist()` and `withHistory()`. - -```ts -// 0.11 -const disconnect = devtools(store, {name: 'Store'}); -disconnect(); - -// 1.0 -const connection = devtools(store, {name: 'Store'}); -connection.dispose(); -``` - -In a React effect, return `() => connection.dispose()`. The published types also stop declaring `__REDUX_DEVTOOLS_EXTENSION__` on the global `Window`, which could conflict with other DevTools typings. If your code relied on that declaration, declare the property in your own project. - -## Angular: `injectStore` is `injectClassyStore` - -```ts -// 0.11 -import {injectStore} from '@codebelt/classy-store/angular'; -readonly state = injectStore(formStore); - -// 1.0 -import {injectClassyStore} from '@codebelt/classy-store/angular'; -readonly state = injectClassyStore(formStore); -``` - -The signature, return type and behavior are unchanged. - -## Changes that need no edit - -**`withHistory`** - -- Undo and redo now remove top-level fields that the restored entry does not have. Before, a field added after the entry survived the undo. -- `undo()` called in the same tick as an edit records that edit first and steps back over it. Before, it skipped one entry further back and lost the edit. You no longer need to wait for the batched notification. -- Fields that did not change between entries are left untouched, so their snapshots keep their identity and selectors reading them do not re-run. - -**Reactive collections** - -- Objects work as map keys and set values inside a store. A member is matched by identity, and the original object, its store proxy and any snapshot of it count as the same member. Before, `has()` returned `false` for the object you had just added and `add()` or `set()` appended duplicates. -- `map.set(key, value)` on an existing key keeps the stored key and position and replaces the value; setting the value it already has notifies no one. -- Lookups scan the raw backing array. `get()` on a 10,000-entry map inside a store went from about 3.7 ms to about 0.06 ms. - -**`PROXYABLE`** - -A class of your own can now be deeply reactive when nested in a store by declaring `static [PROXYABLE] = true`, with `PROXYABLE` imported from `@codebelt/classy-store`. See [reactive nested classes](./TUTORIAL.md#reactive-nested-classes). - -## Framework and package support - -- **Solid**: the adapter requires Solid 2. The peer range is `solid-js ^2.0.0`; install `solid-js` and `@solidjs/web` at `2.0.0` or later. The adapter's `useClassyStore(store)` signature and behavior are unchanged. -- **React** `^18.0.0 || ^19.0.0`, **Vue** `^3.2.0`, **Svelte** `^4.0.0 || ^5.0.0` and **Angular** `^22.0.0` are unchanged. -- The package declares `engines.node >= 20` and exports `./package.json`. -- TypeScript projects need `moduleResolution` set to `bundler`, `node16` or `nodenext` to resolve the subpath entries such as `@codebelt/classy-store/react`. The legacy `node` (node10) setting cannot resolve package `exports`; this was already the case in 0.x. - -## Unchanged - -`createClassyStore`, `snapshot`, `useClassyStore` in both modes, `createStoreHook`, `useLocalStore`, `prepareStoreForHydration`, `useHistoryStatus`, `usePersistStatus`, `subscribeKey`, `toSvelteStore`, the Vue and Solid `useClassyStore`, the `persist` and `withHistory` options and handles, and the persisted storage format. Records written by 0.11 are read by 1.0. diff --git a/website/content/docs/index.md b/website/content/docs/index.md index e577a93b..8082bbd3 100644 --- a/website/content/docs/index.md +++ b/website/content/docs/index.md @@ -49,11 +49,7 @@ This shared instance is for a client-only app. For SSR or independent subtrees, [Open the reactivity example →](/examples/reactivity/) -## Framework support and upgrades - -1.0 is the first stable release. Upgrading from 0.11.x? Read the [1.0 upgrade guide](./UPGRADING_1_0.md) for the breaking changes and the edits they need. - -From an older release, apply the earlier notes first: [0.11.0](./UPGRADING_0_11.md), then [0.8.0](./UPGRADING_0_8.md) for public API changes and persistence error handling, and [0.7.0](./UPGRADING_0_7.md) from 0.6.x or earlier. +## Framework support All framework peer dependencies are optional — install only what your project uses: diff --git a/website/content/docs/meta.json b/website/content/docs/meta.json index 545ce09d..3e8456d2 100644 --- a/website/content/docs/meta.json +++ b/website/content/docs/meta.json @@ -19,11 +19,6 @@ "HISTORY_TUTORIAL", "SUBSCRIBE_KEY_TUTORIAL", "DEVTOOLS_TUTORIAL", - "---Upgrading---", - "UPGRADING_1_0", - "UPGRADING_0_11", - "UPGRADING_0_8", - "UPGRADING_0_7", "---Architecture---", "ARCHITECTURE", "PERSIST_ARCHITECTURE", From b18d772cdffbe3b08fa36d4e27bc8679cb1e2644 Mon Sep 17 00:00:00 2001 From: codeBelt Date: Tue, 17 Nov 2026 23:12:39 -0600 Subject: [PATCH 014/169] build: run the docs site on the workspace library and require Node 22 Docs site - website/ is now a workspace member and depends on the library with workspace:*, like the Next.js example. Its live examples run the code in this repository, so they match the documentation at merge time and need no manual update after a release. Its separate lockfile is gone. - docs:build and docs:dev build the library first; the Docs workflow installs from the root lockfile. - The site declares zod so that every package resolves one copy of the docs framework's core. Without it the workspace install produced two copies and the site's page types no longer resolved. - The devtools demo and its page use the handle that devtools() returns, and no longer rely on a global Window type. Node - engines.node is >=22, the oldest release line still maintained. The packed-consumer fixtures pass on Node 22.13 and 26.13 locally (and on 20.12, which is past end of life and not claimed). - The React compatibility workflow adds a Node 22 job. Examples - The root typecheck now covers the Next.js example and the docs site. - The Next.js example's API map lists transactions. Co-Authored-By: Claude Fable 5.2 --- .changeset/config.json | 1 + .github/workflows/docs.yml | 3 +- .github/workflows/react-compatibility.yml | 7 +- bun.lock | 809 +++++++++++- examples/nextjs/package.json | 3 +- .../src/components/features/FeatureMap.tsx | 6 + package.json | 9 +- packages/classy-store/package.json | 2 +- website/bun.lock | 1143 ----------------- website/content/examples/devtools.mdx | 4 +- .../examples/demos/devtools/DevtoolsDemo.tsx | 6 +- website/package.json | 5 +- 12 files changed, 832 insertions(+), 1166 deletions(-) delete mode 100644 website/bun.lock diff --git a/.changeset/config.json b/.changeset/config.json index 546785e5..a870da3f 100644 --- a/.changeset/config.json +++ b/.changeset/config.json @@ -14,6 +14,7 @@ "updateInternalDependencies": "patch", "ignore": [ "classy-store-angular-example", + "classy-store-docs", "classy-store-nextjs-example", "classy-store-solid-example", "classy-store-svelte-example", diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index f11d7f91..ec4e3a50 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -27,7 +27,8 @@ jobs: - uses: oven-sh/setup-bun@v2 with: bun-version: "1.4.4" - - run: bun install --cwd website --frozen-lockfile + - run: bun install --frozen-lockfile + # Builds the library first: the site runs the package from this repository. - run: bun run docs:build - run: bunx playwright install --with-deps chromium working-directory: website diff --git a/.github/workflows/react-compatibility.yml b/.github/workflows/react-compatibility.yml index 4452e4bf..71197595 100644 --- a/.github/workflows/react-compatibility.yml +++ b/.github/workflows/react-compatibility.yml @@ -11,11 +11,16 @@ jobs: fail-fast: false matrix: react: ["18.0.0", "18.3.1", "19.0.0", "19.3.1"] + node: ["24"] + # The package declares Node 22 as its minimum; prove it on one consumer. + include: + - react: "19.3.1" + node: "22" steps: - uses: actions/checkout@v6 - uses: actions/setup-node@v6 with: - node-version: "24" + node-version: ${{ matrix.node }} - uses: oven-sh/setup-bun@v2 with: bun-version: "1.4.4" diff --git a/bun.lock b/bun.lock index 5bf6cc18..0e075386 100644 --- a/bun.lock +++ b/bun.lock @@ -136,6 +136,33 @@ "vue", ], }, + "website": { + "name": "classy-store-docs", + "dependencies": { + "@codebelt/classy-store": "workspace:*", + "fumadocs-core": "16.19.4", + "fumadocs-mdx": "15.6.3", + "fumadocs-ui": "npm:@fumadocs/base-ui@16.19.4", + "mermaid": "^12.3.0", + "next": "16.4.6", + "next-themes": "0.4.6", + "react": "^19.3.1", + "react-dom": "^19.3.1", + }, + "devDependencies": { + "@playwright/test": "1.65.1", + "@tailwindcss/postcss": "^4.3.5", + "@types/mdx": "^2.0.14", + "@types/node": "^26.6.6", + "@types/react": "^19.3.0", + "@types/react-dom": "^19.3.0", + "postcss": "^8.5.33", + "serve": "^14.2.8", + "tailwindcss": "^4.3.5", + "typescript": "^7.0.2", + "zod": "^4.6.7", + }, + }, }, "trustedDependencies": [ "sharp", @@ -167,6 +194,8 @@ "@angular/platform-browser": ["@angular/platform-browser@22.2.6", "", { "dependencies": { "tslib": "^2.3.0" }, "peerDependencies": { "@angular/animations": "22.2.6", "@angular/common": "22.2.6", "@angular/core": "22.2.6" }, "optionalPeers": ["@angular/animations"] }, "sha512-xXSgdnnLLv/3aEC/pqyrUd0xlyYURGZG2HR3sOIN3bsIoctGFvzA5iwt/GEKpIDA1rn+NnKNLK/EKQaPA4YZEw=="], + "@antfu/install-pkg": ["@antfu/install-pkg@2.1.0", "", { "dependencies": { "package-manager-detector": "^1.8.0", "tinyexec": "^1.3.1" } }, "sha512-sdg9NxU3zR4Mnawfbc/x6GB5Wf17WYud5qOuEuxXjaKpYpMkISSJEjItGebXJ2bQ4DIcly4NYH23mtkGJjvKUw=="], + "@arethetypeswrong/cli": ["@arethetypeswrong/cli@0.18.5", "", { "dependencies": { "@arethetypeswrong/core": "0.18.5", "chalk": "^4.1.2", "cli-table3": "^0.6.3", "commander": "^10.0.1", "marked": "^9.1.2", "marked-terminal": "^7.1.0", "semver": "^7.5.4" }, "bin": { "attw": "./dist/index.js" } }, "sha512-gM+8vRsQOD/Uc7EnBedUhkG5OCsDWE4uoak5QvomGpMpaky0Eh41p04nIMgrWb8EOmqZUJGc6zz9hsP6E56R7g=="], "@arethetypeswrong/core": ["@arethetypeswrong/core@0.18.5", "", { "dependencies": { "@andrewbranch/untar.js": "^1.0.3", "@loaderkit/resolve": "^1.0.2", "cjs-module-lexer": "^1.2.3", "fflate": "^0.8.3", "lru-cache": "^11.0.1", "semver": "^7.5.4", "typescript": "5.6.1-rc", "validate-npm-package-name": "^5.0.0" } }, "sha512-9ytjzGwxjm9Uz7I9avfbt5vlQt6uk9uRRESzJjqrznl6WKvI6dwYTo+vJ3U02Wrq/mR3iql/PzhvHhKdJIAjDQ=="], @@ -205,6 +234,10 @@ "@babel/types": ["@babel/types@7.29.14", "", { "dependencies": { "@babel/helper-string-parser": "^7.29.14", "@babel/helper-validator-identifier": "^7.29.7" } }, "sha512-UjI/dKmwJwT9pOszJitq2G6EObZPnsZUfdCr92z2TlF3EZK9J3EdfOKUrCzHl6wFthbzwhzl1Soc/UIwxRiq6w=="], + "@base-ui/react": ["@base-ui/react@1.9.0", "", { "dependencies": { "@babel/runtime": "^7.29.7 || ^8.0.0", "@base-ui/utils": "0.5.0", "@floating-ui/react-dom": "^2.1.9", "@floating-ui/utils": "^0.2.12", "use-sync-external-store": "^1.7.0" }, "peerDependencies": { "@date-fns/tz": "^1.2.0", "@types/react": "^17 || ^18 || ^19", "date-fns": "^4.0.0", "react": "^17 || ^18 || ^19", "react-dom": "^17 || ^18 || ^19" }, "optionalPeers": ["@date-fns/tz", "@types/react", "date-fns"] }, "sha512-S8CSYosASBKtpL8SWUfS78rFElfLijiCgA7oHOK22jCJ95FULsYyKwBNFOgudt0RA+/7yNc7F81bOvQnRgbBiQ=="], + + "@base-ui/utils": ["@base-ui/utils@0.5.0", "", { "dependencies": { "@babel/runtime": "^7.29.7 || ^8.0.0", "@floating-ui/utils": "^0.2.12", "reselect": "^5.3.0", "use-sync-external-store": "^1.7.0" }, "peerDependencies": { "@types/react": "^17 || ^18 || ^19", "react": "^17 || ^18 || ^19", "react-dom": "^17 || ^18 || ^19" }, "optionalPeers": ["@types/react"] }, "sha512-dYGGcEttjkYiMoa5nHm8vLaJ2UcuTWxo3BFAwOYXeRg/q7UVVvA6cacEIXEs3FgBfK1CGtW1ptElqs7wsx+t9A=="], + "@biomejs/biome": ["@biomejs/biome@2.6.8", "", { "optionalDependencies": { "@biomejs/cli-android-arm64": "2.6.8", "@biomejs/cli-android-x64": "2.6.8", "@biomejs/cli-darwin-arm64": "2.6.8", "@biomejs/cli-darwin-x64": "2.6.8", "@biomejs/cli-linux-arm64": "2.6.8", "@biomejs/cli-linux-arm64-musl": "2.6.8", "@biomejs/cli-linux-x64": "2.6.8", "@biomejs/cli-linux-x64-musl": "2.6.8", "@biomejs/cli-win32-arm64": "2.6.8", "@biomejs/cli-win32-x64": "2.6.8" }, "bin": { "biome": "bin/biome" } }, "sha512-kqZUFvX6/aYQOmzfRN5ANcfNS9wLH4aHLWWP/dQKyhRZVoA6rdWszA7DGugFcxPbMiznUyVYyukVl+ExZN4PQA=="], "@biomejs/cli-android-arm64": ["@biomejs/cli-android-arm64@2.6.8", "", { "os": "android", "cpu": "arm64" }, "sha512-X4JKPLK85kfUTwuuaORFplnBfGjKkp62PsFhhcL7F/Tpltc7pyUofjlkkMnlZZLWsifFl7LNB8ngVrwJg1uo1Q=="], @@ -229,6 +262,8 @@ "@braidai/lang": ["@braidai/lang@1.1.2", "", {}, "sha512-qBcknbBufNHlui137Hft8xauQMTZDKdophmLFv05r2eNmdIv/MlPuP4TdUknHG68UdWLgVZwgxVe735HzJNIwA=="], + "@braintree/sanitize-url": ["@braintree/sanitize-url@7.1.2", "", {}, "sha512-jigsZK+sMF/cuiB7sERuo9V7N9jx+dhmHHnQyDSVdpZwVutaBu7WvNYqMDLSgFgfB30n452TP3vjDAvFC973mA=="], + "@bufbuild/protobuf": ["@bufbuild/protobuf@2.16.0", "", {}, "sha512-FWa0sPlqYGJgpTs6OxBRcL/AW4JT0OIO+W1ajerluoTVh8CV0B7XM1qsNCRgnkSCkRCgOICKHRQlY17jrsm0+Q=="], "@changesets/apply-release-plan": ["@changesets/apply-release-plan@7.1.1", "", { "dependencies": { "@changesets/config": "^3.1.4", "@changesets/get-version-range-type": "^0.4.0", "@changesets/git": "^3.0.4", "@changesets/should-skip-package": "^0.1.2", "@changesets/types": "^6.1.0", "@manypkg/get-packages": "^1.1.3", "detect-indent": "^6.0.0", "fs-extra": "^7.0.1", "lodash.startcase": "^4.4.0", "outdent": "^0.5.0", "prettier": "^2.7.1", "resolve-from": "^5.0.0", "semver": "^7.5.3" } }, "sha512-9qPCm/rLx/xoOFXIHGB229+4GOL76S4MC+7tyOuTsR6+1jYlfFDQORdvwR5hDA6y4FL2BPt3qpbcQIS+dW85LA=="], @@ -269,6 +304,16 @@ "@changesets/write": ["@changesets/write@0.4.0", "", { "dependencies": { "@changesets/types": "^6.1.0", "fs-extra": "^7.0.1", "human-id": "^4.1.1", "prettier": "^2.7.1" } }, "sha512-CdTLvIOPiCNuH71pyDu3rA+Q0n65cmAbXnwWH84rKGiFumFzkmHNT8KHTMEchcxN+Kl8I54xGUhJ7l3E7X396Q=="], + "@chevrotain/cst-dts-gen": ["@chevrotain/cst-dts-gen@13.2.0", "", { "dependencies": { "@chevrotain/gast": "13.2.0", "@chevrotain/types": "13.2.0" } }, "sha512-bA9dvWlhAUcHkNwU+8w9yiUxJPlj/Lm3VqS7MD+NbIR/7LmpNLuK/AWNFdCo/T3SK5ND0/UHf3IJvl/Jn/i6yg=="], + + "@chevrotain/gast": ["@chevrotain/gast@13.2.0", "", { "dependencies": { "@chevrotain/types": "13.2.0" } }, "sha512-bCARdAsG+eEbOveSXcOAC7pVxA04I1ionzeMOwIYf5NX7SaS7zgn4Dgug2BSqoL+iyKeMNSorQjsFSHJHsCNwg=="], + + "@chevrotain/regexp-to-ast": ["@chevrotain/regexp-to-ast@13.2.0", "", {}, "sha512-kxpUkLtiaK09ph+dib+Yvm+3sWSnuwlo25gqfKRgTPNmF6H7uW4gVkMjaRdtnN783S9sM6vUNWh9CsxYX4QwKw=="], + + "@chevrotain/types": ["@chevrotain/types@13.2.0", "", {}, "sha512-7qrYHRlKfWf2AvBfJi5eVOrKAkbxvMFsy/iIHTGIiApNcEecCaVIdR+mIQhyCBsTDJxBz4JWXHMo6krbhR9hVg=="], + + "@chevrotain/utils": ["@chevrotain/utils@13.2.0", "", {}, "sha512-SzKYY68rseOrb9KILVzPsl6SjkQtdWw01SRGB5aCVI5kFcHltQsOYV3JB0Ffst72DgkvHCyDQ0NLwxtmCCf97Q=="], + "@codebelt/classy-store": ["@codebelt/classy-store@workspace:packages/classy-store"], "@colors/colors": ["@colors/colors@1.5.0", "", {}, "sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ=="], @@ -331,10 +376,28 @@ "@esbuild/win32-x64": ["@esbuild/win32-x64@0.28.2", "", { "os": "win32", "cpu": "x64" }, "sha512-5ebpxr3nWMzrL/rnUI755Jkuee0bHL/Gq0WTF9lvcpv73wAp5eu8MfBUgWK9bhWvZjj7yX8etf/8tI8Ney695g=="], + "@floating-ui/core": ["@floating-ui/core@1.8.0", "", { "dependencies": { "@floating-ui/utils": "^0.2.12" } }, "sha512-0CIZ5itps/8x7BG8dEIhs53BvCUH2PCoogtakwRTut+Arm58sJooJ0AuZhLw2HJYIR5cMLNPBSS728sPho2khQ=="], + + "@floating-ui/dom": ["@floating-ui/dom@1.8.0", "", { "dependencies": { "@floating-ui/core": "^1.8.0", "@floating-ui/utils": "^0.2.12" } }, "sha512-yXSrzeHZBTZadLOlfyhCkJHNeLJnHRnRInwdZ40L7ZiaAtrBwoYlsDrX3v5zB1Utk7CLfzcOVnVVWoXEky7Ceg=="], + + "@floating-ui/react-dom": ["@floating-ui/react-dom@2.1.9", "", { "dependencies": { "@floating-ui/dom": "^1.8.0" }, "peerDependencies": { "react": ">=16.8.0", "react-dom": ">=16.8.0" } }, "sha512-JDjEFGCpImxDCA7JJKviA0M9+RtmJdj0m/NVU5IMgBK+AmZouAQQ7/+2GLH0GXXY0YMw9oXPB8hKdbPYg5QLYg=="], + + "@floating-ui/utils": ["@floating-ui/utils@0.2.12", "", {}, "sha512-HpCo8tmWzLVad5s2d19EhAz5zqrrQ6s69qd6moPMQvkOuSwDT1YgRfWSVuc4ennqrgv3OHppiOGMQ7oC13yIww=="], + + "@fuma-translate/react": ["@fuma-translate/react@1.0.2", "", { "peerDependencies": { "@types/react": "*", "react": "^19.2.0", "react-dom": "^19.2.0" }, "optionalPeers": ["@types/react"] }, "sha512-uOiOtBx3nRXR8Nu1GzBf1tApgF1FErDBTHxRIAQeyQdyOoZbrNRN6H4kDCWObY4qyGeGbHydG0DHzgeUgFDMIw=="], + + "@fumadocs/tailwind": ["@fumadocs/tailwind@0.1.5", "", { "peerDependencies": { "tailwindcss": "^4.0.0" }, "optionalPeers": ["tailwindcss"] }, "sha512-ohzmuLTfNNRvP6B/Xx31lWJ58xu40NcmI+6mc/jivYeOoofnmdxBKu5gCErTgOE/mUqyVv4GvYeqd9FhoLHphg=="], + + "@fumari/image-size": ["@fumari/image-size@0.1.1", "", {}, "sha512-iaiV2wyzJ4mW358NX4CX3yGit+WjKYzpaQ+rldK9BjL/5jFpeV6ruWnZVq7MEyMn3Gd0DLi8g/79NZAAQaGscw=="], + "@happy-dom/global-registrator": ["@happy-dom/global-registrator@21.0.4", "", { "dependencies": { "@types/node": ">=20.0.0", "happy-dom": "^21.0.4" } }, "sha512-Bbr0hW9hhDhBf3Jp0EyDlkCbFgbr0z2jd3BMKYOYW+fOkPM4Nx195GMXyCtRCGEgoNn6i09FabXrSkNFm2ONzg=="], "@harperfast/extended-iterable": ["@harperfast/extended-iterable@1.0.5", "", {}, "sha512-4ScXlphaKEa49RpHmqwATq9QI9aUTdWVYDlJkzxhsD7ShJP+pHCYLznMO9n/wREY8jPjRZ59wLJY6HM5yB5Gkw=="], + "@iconify/types": ["@iconify/types@2.0.0", "", {}, "sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg=="], + + "@iconify/utils": ["@iconify/utils@3.1.7", "", { "dependencies": { "@antfu/install-pkg": "^2.0.1", "@iconify/types": "^2.0.0", "import-meta-resolve": "^4.2.0" } }, "sha512-JZHlwdID+dy+lTgbYC8NEC4zeugqeYsc6jewvzb4c58kHauJn+X7rNwQjxz5p2qSjqaEeQoLkCIQ9v/H4PK0/w=="], + "@img/colour": ["@img/colour@1.1.0", "", {}, "sha512-Td76q7j57o/tLVdgS746cYARfSyxk8iEfRxewL9h4OMzYhbW4TAcppl0mT4eyqXddh6L/jwoM75mo7ixa/pCeQ=="], "@img/sharp-darwin-arm64": ["@img/sharp-darwin-arm64@0.35.5", "", { "optionalDependencies": { "@img/sharp-libvips-darwin-arm64": "1.3.4" }, "os": "darwin", "cpu": "arm64" }, "sha512-QRUlFQ0WxvdWyqqG/WtI3iupfD5rBzmCHXSdPsY91sAtVtTo7Q4cb6zOccZ3gqEqkr0f1As1ehLqmEpDsRf+lg=="], @@ -453,6 +516,10 @@ "@manypkg/get-packages": ["@manypkg/get-packages@1.1.3", "", { "dependencies": { "@babel/runtime": "^7.5.5", "@changesets/types": "^4.0.1", "@manypkg/find-root": "^1.1.0", "fs-extra": "^8.1.0", "globby": "^11.0.0", "read-yaml-file": "^1.1.0" } }, "sha512-fo+QhuU3qE/2TQMQmbVMqaQ6EWbMhi4ABWP+O4AM1NqPBuy0OrApV5LO6BrrgnhtAHS2NH6RrVk9OL181tTi8A=="], + "@mdx-js/mdx": ["@mdx-js/mdx@3.1.1", "", { "dependencies": { "@types/estree": "^1.0.0", "@types/estree-jsx": "^1.0.0", "@types/hast": "^3.0.0", "@types/mdx": "^2.0.0", "acorn": "^8.0.0", "collapse-white-space": "^2.0.0", "devlop": "^1.0.0", "estree-util-is-identifier-name": "^3.0.0", "estree-util-scope": "^1.0.0", "estree-walker": "^3.0.0", "hast-util-to-jsx-runtime": "^2.0.0", "markdown-extensions": "^2.0.0", "recma-build-jsx": "^1.0.0", "recma-jsx": "^1.0.0", "recma-stringify": "^1.0.0", "rehype-recma": "^1.0.0", "remark-mdx": "^3.0.0", "remark-parse": "^11.0.0", "remark-rehype": "^11.0.0", "source-map": "^0.7.0", "unified": "^11.0.0", "unist-util-position-from-estree": "^2.0.0", "unist-util-stringify-position": "^4.0.0", "unist-util-visit": "^5.0.0", "vfile": "^6.0.0" } }, "sha512-f6ZO2ifpwAQIpzGWaBQT2TXxPv6z3RBzQKpVftEWN78Vl/YweF1uwussDx8ECAXVtr3Rs89fKyG9YlzUs9DyGQ=="], + + "@mermaid-js/parser": ["@mermaid-js/parser@2.0.1", "", { "dependencies": { "@chevrotain/types": "~13.2.0" } }, "sha512-j37dj/h6p6pots1L7pLPPNuABEEu9WP4OYg9pW1g+nYG331j0+3canE9OagtYdytYvdSAMG+2fKU5cxep6LgjA=="], + "@modelcontextprotocol/core": ["@modelcontextprotocol/core@2.3.1", "", { "dependencies": { "zod": "^4.2.0" } }, "sha512-laVmIhPGpWi7rG9q+0UigblRN0Hws/Yjlb6qLFtVqryXVLkc4h+yN8z731POD2LnAGQlFe7/tXhUm7Bi0YB91g=="], "@modelcontextprotocol/server": ["@modelcontextprotocol/server@2.3.1", "", { "dependencies": { "@modelcontextprotocol/core": "2.3.1", "zod": "^4.2.0" } }, "sha512-e59MfWuSssj6DoQ96JCTqdW1AXT5/XtnTl0WWd6MU1Ka434fFUGGosCLJbGNySDhHGvxQWoRWK137FXYFkYNWw=="], @@ -641,6 +708,22 @@ "@schematics/angular": ["@schematics/angular@22.2.7", "", { "dependencies": { "@angular-devkit/core": "22.2.7", "@angular-devkit/schematics": "22.2.7", "jsonc-parser": "3.3.1", "oxc-parser": "0.156.0", "typescript": "6.0.3" } }, "sha512-cdwLAc0m6mWZ3HA0VHqulUKItviExnENQwDQ01f9lQS9bTAWBEkg7Pgua+3BijMUEE5sf/kamqCdwaKPUn1uXQ=="], + "@shikijs/core": ["@shikijs/core@4.6.0", "", { "dependencies": { "@shikijs/primitive": "4.6.0", "@shikijs/types": "4.6.0", "@shikijs/vscode-textmate": "^10.1.0", "@types/hast": "^3.0.5", "hast-util-to-html": "^9.0.6" } }, "sha512-bfd4OKgvoyXYiYmMRuleA656P4V7M/Du9lcTl38Ngm6KszMj7bq4J1IGZwSYR4c95Tv5UQALtYNWUwaI9UT3xw=="], + + "@shikijs/engine-javascript": ["@shikijs/engine-javascript@4.6.0", "", { "dependencies": { "@shikijs/types": "4.6.0", "@shikijs/vscode-textmate": "^10.1.0", "oniguruma-to-es": "^4.3.6" } }, "sha512-K0oqxFoL+kEMdz89mHLFO15Tsbv3kFZ6WR1cXZKMvLSc+oqaM00A6pyga1qSeXB22dP0tTiSApRcGBaKWsEccg=="], + + "@shikijs/engine-oniguruma": ["@shikijs/engine-oniguruma@4.6.0", "", { "dependencies": { "@shikijs/types": "4.6.0", "@shikijs/vscode-textmate": "^10.1.0" } }, "sha512-aggd6Q7SuJOXNnsUbfG2XesxBJKBMAw/PDTUo9PyRjMaaJJ2dNrI+q0C+25ARXAK9yLHAlwxc9oRT2u68YKZ7w=="], + + "@shikijs/langs": ["@shikijs/langs@4.6.0", "", { "dependencies": { "@shikijs/types": "4.6.0" } }, "sha512-1yMEX3oCVV54LUq/ovfpRkDQoYDkcvjSWFFa/YLUDMiSoRzMi2uxLJYbv41ahT8Lu9lFMaa7hecd3Q39trqUyg=="], + + "@shikijs/primitive": ["@shikijs/primitive@4.6.0", "", { "dependencies": { "@shikijs/types": "4.6.0", "@shikijs/vscode-textmate": "^10.1.0", "@types/hast": "^3.0.5" } }, "sha512-c54+TQEo9ToqgfL/AU8FpjnV09+GA9Oa7M5ROkkXteZfp5XzpAJGXjjvZQFQioJOwm/w/6Z3lIzQstAkl8coag=="], + + "@shikijs/themes": ["@shikijs/themes@4.6.0", "", { "dependencies": { "@shikijs/types": "4.6.0" } }, "sha512-qHAVAs80RiGD+IRuH9G+JPDOEc9A/kHsng4EzCUCwB9bLzW6Z0y9WETh2YyCcADJBmfrIaJ1Jp7KBNP6FHkgtQ=="], + + "@shikijs/types": ["@shikijs/types@4.6.0", "", { "dependencies": { "@shikijs/vscode-textmate": "^10.1.0", "@types/hast": "^3.0.5" } }, "sha512-+ENG1adsKt/X7cRYw1Nl7BEpBmPOjmQ7bR/eGmHuMlT8gtOFf3KEi5l31DJYyAWhW6Y6bjP1plU7FmaxWGENFw=="], + + "@shikijs/vscode-textmate": ["@shikijs/vscode-textmate@10.1.0", "", {}, "sha512-cVBuhDQjBZaNMTwBquYfPydrUP+E3hE6oYGasx8h6ZrODIM7/r+gxLDXdd66oszbrggZHEntdE6j+5gYIVyMWQ=="], + "@sindresorhus/is": ["@sindresorhus/is@4.6.0", "", {}, "sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw=="], "@solidjs/compiler": ["@solidjs/compiler@2.0.0", "", { "optionalDependencies": { "@solidjs/compiler-darwin-arm64": "2.0.0", "@solidjs/compiler-darwin-x64": "2.0.0", "@solidjs/compiler-linux-arm64-gnu": "2.0.0", "@solidjs/compiler-linux-x64-gnu": "2.0.0", "@solidjs/compiler-wasm32-wasi": "2.0.0", "@solidjs/compiler-win32-x64-msvc": "2.0.0" } }, "sha512-Spgqz1+eojQ2pDl4yajnajIjX/kSusjTK/6mC6Fm7sAZ3YBI0yP4/epRR1hV08TU3YAH4xLBmZ6wjb1zC134Sw=="], @@ -707,18 +790,98 @@ "@types/bun": ["@types/bun@1.4.4", "", { "dependencies": { "bun-types": "1.4.4" } }, "sha512-9wkRDXUXK124pEnAutE6n/l18j+i9GC5IAHK8TmX/2nlySETmky0OU6yL5U8pW1AoKh++AN9auDCr647BfurjQ=="], + "@types/d3": ["@types/d3@7.4.3", "", { "dependencies": { "@types/d3-array": "*", "@types/d3-axis": "*", "@types/d3-brush": "*", "@types/d3-chord": "*", "@types/d3-color": "*", "@types/d3-contour": "*", "@types/d3-delaunay": "*", "@types/d3-dispatch": "*", "@types/d3-drag": "*", "@types/d3-dsv": "*", "@types/d3-ease": "*", "@types/d3-fetch": "*", "@types/d3-force": "*", "@types/d3-format": "*", "@types/d3-geo": "*", "@types/d3-hierarchy": "*", "@types/d3-interpolate": "*", "@types/d3-path": "*", "@types/d3-polygon": "*", "@types/d3-quadtree": "*", "@types/d3-random": "*", "@types/d3-scale": "*", "@types/d3-scale-chromatic": "*", "@types/d3-selection": "*", "@types/d3-shape": "*", "@types/d3-time": "*", "@types/d3-time-format": "*", "@types/d3-timer": "*", "@types/d3-transition": "*", "@types/d3-zoom": "*" } }, "sha512-lZXZ9ckh5R8uiFVt8ogUNf+pIrK4EsWrx2Np75WvF/eTpJ0FMHNhjXk8CKEx/+gpHbNQyJWehbFaTvqmHWB3ww=="], + + "@types/d3-array": ["@types/d3-array@3.2.2", "", {}, "sha512-hOLWVbm7uRza0BYXpIIW5pxfrKe0W+D5lrFiAEYR+pb6w3N2SwSMaJbXdUfSEv+dT4MfHBLtn5js0LAWaO6otw=="], + + "@types/d3-axis": ["@types/d3-axis@3.0.6", "", { "dependencies": { "@types/d3-selection": "*" } }, "sha512-pYeijfZuBd87T0hGn0FO1vQ/cgLk6E1ALJjfkC0oJ8cbwkZl3TpgS8bVBLZN+2jjGgg38epgxb2zmoGtSfvgMw=="], + + "@types/d3-brush": ["@types/d3-brush@3.0.6", "", { "dependencies": { "@types/d3-selection": "*" } }, "sha512-nH60IZNNxEcrh6L1ZSMNA28rj27ut/2ZmI3r96Zd+1jrZD++zD3LsMIjWlvg4AYrHn/Pqz4CF3veCxGjtbqt7A=="], + + "@types/d3-chord": ["@types/d3-chord@3.0.6", "", {}, "sha512-LFYWWd8nwfwEmTZG9PfQxd17HbNPksHBiJHaKuY1XeqscXacsS2tyoo6OdRsjf+NQYeB6XrNL3a25E3gH69lcg=="], + + "@types/d3-color": ["@types/d3-color@3.1.3", "", {}, "sha512-iO90scth9WAbmgv7ogoq57O9YpKmFBbmoEoCHDB2xMBY0+/KVrqAaCDyCE16dUspeOvIxFFRI+0sEtqDqy2b4A=="], + + "@types/d3-contour": ["@types/d3-contour@3.0.6", "", { "dependencies": { "@types/d3-array": "*", "@types/geojson": "*" } }, "sha512-BjzLgXGnCWjUSYGfH1cpdo41/hgdWETu4YxpezoztawmqsvCeep+8QGfiY6YbDvfgHz/DkjeIkkZVJavB4a3rg=="], + + "@types/d3-delaunay": ["@types/d3-delaunay@6.0.4", "", {}, "sha512-ZMaSKu4THYCU6sV64Lhg6qjf1orxBthaC161plr5KuPHo3CNm8DTHiLw/5Eq2b6TsNP0W0iJrUOFscY6Q450Hw=="], + + "@types/d3-dispatch": ["@types/d3-dispatch@3.0.7", "", {}, "sha512-5o9OIAdKkhN1QItV2oqaE5KMIiXAvDWBDPrD85e58Qlz1c1kI/J0NcqbEG88CoTwJrYe7ntUCVfeUl2UJKbWgA=="], + + "@types/d3-drag": ["@types/d3-drag@3.0.7", "", { "dependencies": { "@types/d3-selection": "*" } }, "sha512-HE3jVKlzU9AaMazNufooRJ5ZpWmLIoc90A37WU2JMmeq28w1FQqCZswHZ3xR+SuxYftzHq6WU6KJHvqxKzTxxQ=="], + + "@types/d3-dsv": ["@types/d3-dsv@3.0.7", "", {}, "sha512-n6QBF9/+XASqcKK6waudgL0pf/S5XHPPI8APyMLLUHd8NqouBGLsU8MgtO7NINGtPBtk9Kko/W4ea0oAspwh9g=="], + + "@types/d3-ease": ["@types/d3-ease@3.0.2", "", {}, "sha512-NcV1JjO5oDzoK26oMzbILE6HW7uVXOHLQvHshBUW4UMdZGfiY6v5BeQwh9a9tCzv+CeefZQHJt5SRgK154RtiA=="], + + "@types/d3-fetch": ["@types/d3-fetch@3.0.7", "", { "dependencies": { "@types/d3-dsv": "*" } }, "sha512-fTAfNmxSb9SOWNB9IoG5c8Hg6R+AzUHDRlsXsDZsNp6sxAEOP0tkP3gKkNSO/qmHPoBFTxNrjDprVHDQDvo5aA=="], + + "@types/d3-force": ["@types/d3-force@3.0.10", "", {}, "sha512-ZYeSaCF3p73RdOKcjj+swRlZfnYpK1EbaDiYICEEp5Q6sUiqFaFQ9qgoshp5CzIyyb/yD09kD9o2zEltCexlgw=="], + + "@types/d3-format": ["@types/d3-format@3.0.4", "", {}, "sha512-fALi2aI6shfg7vM5KiR1wNJnZ7r6UuggVqtDA+xiEdPZQwy/trcQaHnwShLuLdta2rTymCNpxYTiMZX/e09F4g=="], + + "@types/d3-geo": ["@types/d3-geo@3.1.1", "", { "dependencies": { "@types/geojson": "*" } }, "sha512-65Emv9fQiQQqphLlRkuQ5ypPsOmWPhtBGCMv61JDPEPMvsx+gzhGf74yw1a78xFKPj6zw4AgQICJoQv0vK9M2w=="], + + "@types/d3-hierarchy": ["@types/d3-hierarchy@3.1.7", "", {}, "sha512-tJFtNoYBtRtkNysX1Xq4sxtjK8YgoWUNpIiUee0/jHGRwqvzYxkq0hGVbbOGSz+JgFxxRu4K8nb3YpG3CMARtg=="], + + "@types/d3-interpolate": ["@types/d3-interpolate@3.0.4", "", { "dependencies": { "@types/d3-color": "*" } }, "sha512-mgLPETlrpVV1YRJIglr4Ez47g7Yxjl1lj7YKsiMCb27VJH9W8NVM6Bb9d8kkpG/uAQS5AmbA48q2IAolKKo1MA=="], + + "@types/d3-path": ["@types/d3-path@3.1.1", "", {}, "sha512-VMZBYyQvbGmWyWVea0EHs/BwLgxc+MKi1zLDCONksozI4YJMcTt8ZEuIR4Sb1MMTE8MMW49v0IwI5+b7RmfWlg=="], + + "@types/d3-polygon": ["@types/d3-polygon@3.0.2", "", {}, "sha512-ZuWOtMaHCkN9xoeEMr1ubW2nGWsp4nIql+OPQRstu4ypeZ+zk3YKqQT0CXVe/PYqrKpZAi+J9mTs05TKwjXSRA=="], + + "@types/d3-quadtree": ["@types/d3-quadtree@3.0.6", "", {}, "sha512-oUzyO1/Zm6rsxKRHA1vH0NEDG58HrT5icx/azi9MF1TWdtttWl0UIUsjEQBBh+SIkrpd21ZjEv7ptxWys1ncsg=="], + + "@types/d3-random": ["@types/d3-random@3.0.4", "", {}, "sha512-UHYId5WTCx4L4YNel7NU00XUXXgvgpgZOvp10PuvsQENjMDXhh2RyFc0KBjO7B45ne4Ha1yVH7ii0vnzKkuzWA=="], + + "@types/d3-scale": ["@types/d3-scale@4.0.9", "", { "dependencies": { "@types/d3-time": "*" } }, "sha512-dLmtwB8zkAeO/juAMfnV+sItKjlsw2lKdZVVy6LRr0cBmegxSABiLEpGVmSJJ8O08i4+sGR6qQtb6WtuwJdvVw=="], + + "@types/d3-scale-chromatic": ["@types/d3-scale-chromatic@3.1.0", "", {}, "sha512-iWMJgwkK7yTRmWqRB5plb1kadXyQ5Sj8V/zYlFGMUBbIPKQScw+Dku9cAAMgJG+z5GYDoMjWGLVOvjghDEFnKQ=="], + + "@types/d3-selection": ["@types/d3-selection@3.0.12", "", {}, "sha512-Qe/KWYhEiIIxGs7HrAAjMfShxKldx19SJtr5zu53f3afPsdZNz7HHtdTLXo/kqeiWNXVycI24kSnfzBYkTzpgw=="], + + "@types/d3-shape": ["@types/d3-shape@3.2.0", "", { "dependencies": { "@types/d3-path": "*" } }, "sha512-kVd74ta9eof3eJOvbNd1vGKS/XERRyQbT26Og63hIsvDO84cjD5gEOhsXf26w3FSoNlPVz84DOFcKv/oou+fMw=="], + + "@types/d3-time": ["@types/d3-time@3.0.4", "", {}, "sha512-yuzZug1nkAAaBlBBikKZTgzCeA+k1uy4ZFwWANOfKw5z5LRhV0gNA7gNkKm7HoK+HRN0wX3EkxGk0fpbWhmB7g=="], + + "@types/d3-time-format": ["@types/d3-time-format@4.0.3", "", {}, "sha512-5xg9rC+wWL8kdDj153qZcsJ0FWiFt0J5RB6LYUNZjwSnesfblqrI/bJ1wBdJ8OQfncgbJG5+2F+qfqnqyzYxyg=="], + + "@types/d3-timer": ["@types/d3-timer@3.0.2", "", {}, "sha512-Ps3T8E8dZDam6fUyNiMkekK3XUsaUEik+idO9/YjPtfj2qruF8tFBXS7XhtE4iIXBLxhmLjP3SXpLhVf21I9Lw=="], + + "@types/d3-transition": ["@types/d3-transition@3.0.9", "", { "dependencies": { "@types/d3-selection": "*" } }, "sha512-uZS5shfxzO3rGlu0cC3bjmMFKsXv+SmZZcgp0KD22ts4uGXp5EVYGzu/0YdwZeKmddhcAccYtREJKkPfXkZuCg=="], + + "@types/d3-zoom": ["@types/d3-zoom@3.0.9", "", { "dependencies": { "@types/d3-interpolate": "*", "@types/d3-selection": "*" } }, "sha512-0sE1406XBYJGiqD3AusTl9ZqC//2mIXix51tbom25gDCA8ri4xnSZg28CaSE8Srl6FClqABUKfsn0qghgdepMA=="], + + "@types/debug": ["@types/debug@4.1.13", "", { "dependencies": { "@types/ms": "*" } }, "sha512-KSVgmQmzMwPlmtljOomayoR89W4FynCAi3E8PPs7vmDVPe84hT+vGPKkJfThkmXs0x0jAaa9U8uW8bbfyS2fWw=="], + "@types/estree": ["@types/estree@1.0.10", "", {}, "sha512-lTyOMnOcmRBzdCv6/4zUZCrEhV0xrqQiUZBZtVcbmLHBXKLnN8q89v/wKRF/Q0HbwVsqbIG3o5HDoFl9sduM+g=="], + "@types/estree-jsx": ["@types/estree-jsx@1.0.5", "", { "dependencies": { "@types/estree": "*" } }, "sha512-52CcUVNFyfb1A2ALocQw/Dd1BQFNmSdkuC3BkZ6iqhdMfQz7JWOFRuJFloOzjk+6WijU56m9oKXFAXc7o3Towg=="], + "@types/gensync": ["@types/gensync@1.0.5", "", {}, "sha512-MbsRCT7mTikHwKZ0X+LVUTLRrZZRLipTuXEO9qOYO+zmjMVk81axyClMROf6uoPD9MRVu46bx8zoR0Ad9q3NAg=="], + "@types/geojson": ["@types/geojson@7946.0.16", "", {}, "sha512-6C8nqWur3j98U6+lXDfTUWIfgvZU+EumvpHKcYjujKH7woYyLj2sUmff0tRhrqM7BohUw7Pz3ZB1jj2gW9Fvmg=="], + + "@types/hast": ["@types/hast@3.0.5", "", { "dependencies": { "@types/unist": "*" } }, "sha512-rp/ezSWaD1m44dPKICGhiskI13nVr7qTloFwDa/IYkhhf5nzwP+zIQcIJh3WIFSBOy/H1PzB40jPjMDksN4F+g=="], + "@types/jsesc": ["@types/jsesc@2.5.1", "", {}, "sha512-9VN+6yxLOPLOav+7PwjZbxiID2bVaeq0ED4qSQmdQTdjnXJSaCVKTR58t15oqH1H5t8Ng2ZX1SabJVoN9Q34bw=="], + "@types/mdast": ["@types/mdast@4.0.4", "", { "dependencies": { "@types/unist": "*" } }, "sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA=="], + + "@types/mdx": ["@types/mdx@2.0.14", "", {}, "sha512-T48PeuJtvLosNTPVhfnIp3i/n3a4g4Bad7YCq5k64D4u7NwDrAotikQ+5+sjtUvBmxCMlbo3dVL+C2dP0rWHzg=="], + + "@types/ms": ["@types/ms@2.1.0", "", {}, "sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA=="], + "@types/node": ["@types/node@26.6.6", "", { "dependencies": { "undici-types": "~8.9.0" } }, "sha512-MzQj+8Kx3XI40OmUAE6Qoh58ZMNstNNMwn2nfd3qWsfe7nDNSqJNzes4njhz6AHwrSHOffSLwXU6yb474Q4aog=="], "@types/react": ["@types/react@19.3.0", "", { "dependencies": { "csstype": "^3.2.2" } }, "sha512-N0rFCuH9YoxG9/m61l9MfpJKfmLOVU0em7ipIz6TRgSSkvReLB9vL85GB+yr8Bs5leqpvg96JSwF4ZS1s4viQg=="], "@types/react-dom": ["@types/react-dom@19.3.0", "", { "peerDependencies": { "@types/react": "^19.3.0" } }, "sha512-ZI7bU42mZXXKHn/qNLEw2IrbiINU7X5+vfgdixBHkCNpYWXjKgfQ/P+uyGb5CjOLB9UcnTeg3rylQtV2hym44Q=="], + "@types/trusted-types": ["@types/trusted-types@2.0.7", "", {}, "sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw=="], + + "@types/unist": ["@types/unist@3.0.3", "", {}, "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q=="], + "@types/whatwg-mimetype": ["@types/whatwg-mimetype@3.0.2", "", {}, "sha512-c2AKvDT8ToxLIOUlN51gTiHXflsfIFisS4pO7pDPoKouJCESkhZnEy623gwP9laCy5lnLDAw1vAzu2vM2YLOrA=="], "@types/ws": ["@types/ws@8.18.1", "", { "dependencies": { "@types/node": "*" } }, "sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg=="], @@ -763,6 +926,10 @@ "@typescript/typescript-win32-x64": ["@typescript/typescript-win32-x64@7.0.2", "", { "os": "win32", "cpu": "x64" }, "sha512-0BQ3HkAHHlKLSp1qRvf3SUhGpGsDuhB/jgFw75guyqbxJqEaS0Cw/VFO8i2nHglJUzQCRtMMR/IBAKE3ETMC4g=="], + "@ungap/structured-clone": ["@ungap/structured-clone@1.4.0", "", {}, "sha512-1mEZtMKPM09vDmQt5y7YvmN2+DFTP7Tg0EWXdic8/C6VRnpb33e4ghisCIE3WZjsE2N8mf+QV1Zqh7ZFYLWInQ=="], + + "@upsetjs/venn.js": ["@upsetjs/venn.js@2.0.0", "", { "optionalDependencies": { "d3-selection": "^3.0.0", "d3-transition": "^3.0.1" } }, "sha512-WbBhLrooyePuQ1VZxrJjtLvTc4NVfpOyKx0sKqioq9bX1C1m7Jgykkn8gLrtwumBioXIqam8DLxp88Adbue6Hw=="], + "@vitejs/plugin-basic-ssl": ["@vitejs/plugin-basic-ssl@2.3.0", "", { "peerDependencies": { "vite": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, "sha512-bdyo8rB3NnQbikdMpHaML9Z1OZPBu6fFOBo+OtxsBlvMJtysWskmBcnbIDhUqgC8tcxNv/a+BcV5U+2nQMm1OQ=="], "@vitejs/plugin-vue": ["@vitejs/plugin-vue@6.0.11", "", { "dependencies": { "@rolldown/pluginutils": "^1.0.1" }, "peerDependencies": { "vite": "^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0", "vue": "^3.2.25 || ^3.6.0-rc.15" } }, "sha512-m48lskIUJGlB6qUiYhDMI8nd2ngeidz2U4nKTjqI13cFMu5rH8JeEILPkDtK9Fk/TjBA2pkj8AlbenqDaKu+ww=="], @@ -795,6 +962,30 @@ "@vue/shared": ["@vue/shared@3.5.45", "", {}, "sha512-ue9fgHmVNPlP7iW3+cxoBX/Cnlw53dHlVSw0JKGY6z1lObg8pHoj928M2nzG4/yVsMZ3NaRZ2s2z61uC16NDwQ=="], + "@yuku-core/binding-android-arm64": ["@yuku-core/binding-android-arm64@0.19.0", "", { "os": "android", "cpu": "arm64" }, "sha512-wdL2XmTiZixAOaHk9Z0JJZ8u9Qm8d333Zjpc6gaxXFX+UR5BlsfxZ7a2+2Rm71pamppsPYGUGFq2oVLbh6DISw=="], + + "@yuku-core/binding-darwin-arm64": ["@yuku-core/binding-darwin-arm64@0.19.0", "", { "os": "darwin", "cpu": "arm64" }, "sha512-7sNJa6XJhyetnTy64jw3NEi4YgUcezHk1G5GH9FSvXAuC8wIlbaOwT9lgq5qo5sspjrZJQlBR1TWflP49uRpMw=="], + + "@yuku-core/binding-darwin-x64": ["@yuku-core/binding-darwin-x64@0.19.0", "", { "os": "darwin", "cpu": "x64" }, "sha512-pTC7dYEc59isdyizc3nsuyFNBu2LU5wMYZ1be6UMr59PY/AJNtO1aBLWV0MgL/z7C1nv/2sX4TNjGgKLoeevJw=="], + + "@yuku-core/binding-freebsd-x64": ["@yuku-core/binding-freebsd-x64@0.19.0", "", { "os": "freebsd", "cpu": "x64" }, "sha512-xrZjF6XOEwyLOiDIfrwDdRCS6ghxcJeirNC1KivQhVcUwlRonaU79S3/Uiyx3lBylPnT8qKJ3/aMT+H52nGTJQ=="], + + "@yuku-core/binding-linux-arm-gnu": ["@yuku-core/binding-linux-arm-gnu@0.19.0", "", { "os": "linux", "cpu": "arm", "libc": "glibc" }, "sha512-0OyIH53C0I1CbADHn9FSdCfX5qbpeLwJhmOVhonFJNYheybOnkSJ50qGMfTJIb8y5zrwqvLs7FVBvz6Fk8maZg=="], + + "@yuku-core/binding-linux-arm-musl": ["@yuku-core/binding-linux-arm-musl@0.19.0", "", { "os": "linux", "cpu": "arm", "libc": "musl" }, "sha512-z/iPfkCOCSXE34VXNt0uP1ORSW+4mEa9b5CiJcWZeqZH08g49bFU/jRM2T04f+Wpw5mJ6HIzNBiojxeAbrHjeg=="], + + "@yuku-core/binding-linux-arm64-gnu": ["@yuku-core/binding-linux-arm64-gnu@0.19.0", "", { "os": "linux", "cpu": "arm64", "libc": "glibc" }, "sha512-jLNTi+gzaRwBJ+gwhCJ+rDb5dmx/8hEBx93UWd7hjMSqPTL1D1wvVSvXVAldV5kALvju7b0/m51EHEhs4+I1fA=="], + + "@yuku-core/binding-linux-arm64-musl": ["@yuku-core/binding-linux-arm64-musl@0.19.0", "", { "os": "linux", "cpu": "arm64", "libc": "musl" }, "sha512-YwyPIdW/rN2Fmv0MTFWi47FaB3F9g+2b+sJISyAw83Yd60RWH4T3Nx6XkAHHVN+uKJNBAd6So7/BVihSiFYvuQ=="], + + "@yuku-core/binding-linux-x64-gnu": ["@yuku-core/binding-linux-x64-gnu@0.19.0", "", { "os": "linux", "cpu": "x64", "libc": "glibc" }, "sha512-/vskaAXVX3ESR43FiTdfiYS7z1b9uoQJwVQ/0RgUHgN2sWoAyCZs+aX4CgU7eKGIHTVfp9VFwv+c+2XchYiEtQ=="], + + "@yuku-core/binding-linux-x64-musl": ["@yuku-core/binding-linux-x64-musl@0.19.0", "", { "os": "linux", "cpu": "x64", "libc": "musl" }, "sha512-FuXL5igeSKib9Rye02TdH+D6SQezTyGxIATMu1Qsn/QywrzwpGl35OLpS2C1x5vpGLeVE2XgiLd5mVPFHmIglQ=="], + + "@yuku-core/binding-win32-arm64": ["@yuku-core/binding-win32-arm64@0.19.0", "", { "os": "win32", "cpu": "arm64" }, "sha512-YuJAe7zEKT1Xa7LuHlhGJpPnYQeVtvo0rZvNjJRqkH0hQGOw4C8QeP30Tg5VKGzZfo2x8CjhjEhKt4TmLwfmdg=="], + + "@yuku-core/binding-win32-x64": ["@yuku-core/binding-win32-x64@0.19.0", "", { "os": "win32", "cpu": "x64" }, "sha512-o8iY/mXwlRkedp0LNTr4+TEfXTPQwoNZmv6k+1WIAd1ZXEn8xJJTBCtB0osaVvdZo/x/cNmV16UrWrrGpM5Mvw=="], + "@yuku-toolchain/darwin-arm64": ["@yuku-toolchain/darwin-arm64@0.28.1", "", { "os": "darwin", "cpu": "arm64" }, "sha512-xMtZUwiGvJH90ogLjRrnG5+YEhinKti8qMPF18bd5z0ahSoaHWyBoe16evT7cSUxid0JEaZvh6H3daDPwDw4+g=="], "@yuku-toolchain/darwin-x64": ["@yuku-toolchain/darwin-x64@0.28.1", "", { "os": "darwin", "cpu": "x64" }, "sha512-aI60ScUkZgVEX5GHZfpiAAfTb9e7L6NUxfSU7Ucn+34GyrtswvBapEntbYKPzUuy5ubtVcD9vSWgptm/mlyTxQ=="], @@ -803,20 +994,28 @@ "@yuku-toolchain/linux-x64": ["@yuku-toolchain/linux-x64@0.28.1", "", { "os": "linux", "cpu": "x64" }, "sha512-lEWh0UkCr195bQj4DNlpww/B7hPeuotE0hpKbC2oz4STHqYxCEoaMzNOf9vr5Ydjwr9egEDepA0XRsu5xP+z8w=="], + "@yuku-toolchain/types": ["@yuku-toolchain/types@0.19.0", "", {}, "sha512-tFkNbsP4WXX9UMUC5syJGdK9dPMLK0PPaIuXCcCYH75sZ8MrebfBZ2XvCILRTw8AgLivSSCfDa4R67iYBDa4Kg=="], + "@yuku-toolchain/win32-arm64": ["@yuku-toolchain/win32-arm64@0.28.1", "", { "os": "win32", "cpu": "arm64" }, "sha512-CUiumoJIwNiH9Utm5SbG5GaEaJRUatEXgG5HcPj2yEWh4kxTmEbigB346C3HEmtc+zbRLY0T0XsFO5RGSZaj2A=="], "@yuku-toolchain/win32-x64": ["@yuku-toolchain/win32-x64@0.28.1", "", { "os": "win32", "cpu": "x64" }, "sha512-CSTUi/ya58q2PuWTpk//BNSpXgOz7ol45T+SDuU7QfD/vN1FcLjSh99KDQzLf4AbIy43ORUw5UFehhfMGPNj9w=="], + "@zeit/schemas": ["@zeit/schemas@2.36.0", "", {}, "sha512-7kjMwcChYEzMKjeex9ZFXkt1AyNov9R5HZtjBKVsmVpw7pa7ZtlCGvCBC2vnnXctaYN+aRI61HjIqeetZW5ROg=="], + "acorn": ["acorn@8.19.0", "", { "bin": { "acorn": "bin/acorn" } }, "sha512-oJlA3XiRm7Cyk6qFD2Jn8ak9B7jSy0qy00ADO3+8dpT0LSjFihQYv4C02LFCSYJV3Q37xYwwRy5m+IpIiUzqWw=="], + "acorn-jsx": ["acorn-jsx@5.3.2", "", { "peerDependencies": { "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ=="], + "agent-base": ["agent-base@9.0.0", "", {}, "sha512-TQf59BsZnytt8GdJKLPfUZ54g/iaUL2OWDSFCCvMOhsHduDQxO8xC4PNeyIkVcA5KwL2phPSv0douC0fgWzmnA=="], - "ajv": ["ajv@8.20.0", "", { "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", "json-schema-traverse": "^1.0.0", "require-from-string": "^2.0.2" } }, "sha512-Thbli+OlOj+iMPYFBVBfJ3OmCAnaSyNn4M1vz9T6Gka5Jt9ba/HIR56joy65tY6kx/FCF5VXNB819Y7/GUrBGA=="], + "ajv": ["ajv@8.18.0", "", { "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", "json-schema-traverse": "^1.0.0", "require-from-string": "^2.0.2" } }, "sha512-PlXPeEWMXMZ7sPYOHqmDyCJzcfNrUr3fGNKtezX14ykXOEIvyK81d+qydx89KY5O71FKMPaQ2vBfBFI5NHR63A=="], "ajv-formats": ["ajv-formats@3.0.1", "", { "dependencies": { "ajv": "^8.0.0" } }, "sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ=="], "alien-signals": ["alien-signals@3.2.1", "", {}, "sha512-I8FjmltrfnDFoZedi5CG8DghVYNhzb/Ijluz7tCSJH0xpd0484Kowhbb1XDYOxfJpU1p5wnM2X54dA+IfGyD1g=="], + "ansi-align": ["ansi-align@3.0.1", "", { "dependencies": { "string-width": "^4.1.0" } }, "sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w=="], + "ansi-colors": ["ansi-colors@4.1.3", "", {}, "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw=="], "ansi-escapes": ["ansi-escapes@7.3.0", "", { "dependencies": { "environment": "^1.0.0" } }, "sha512-BvU8nYgGQBxcmMuEeUEmNTvrMVjJNSH7RgW24vXexN4Ven6qCvy4TntnvlnwnMLTVlcRQQdbRY8NKnaIoeWDNg=="], @@ -827,16 +1026,24 @@ "any-promise": ["any-promise@1.3.0", "", {}, "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A=="], + "arg": ["arg@5.0.2", "", {}, "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg=="], + "argparse": ["argparse@2.0.1", "", {}, "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q=="], "aria-query": ["aria-query@5.3.1", "", {}, "sha512-Z/ZeOgVl7bcSYZ/u/rh0fOpvEpq//LZmdbkXyc7syVzjPAhfOa9ebsdTSjEBDU4vs5nC98Kfduj1uFo0qyET3g=="], "array-union": ["array-union@2.1.0", "", {}, "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw=="], + "astring": ["astring@1.9.0", "", { "bin": { "astring": "bin/astring" } }, "sha512-LElXdjswlqjWrPpJFg1Fx4wpkOCxj1TDHlSV4PlaRxHGWko024xICaa97ZkMfs6DRKlCguiAI+rbXv5GWwXIkg=="], + "axobject-query": ["axobject-query@4.1.0", "", {}, "sha512-qIj0G9wZbMGNLjLmg1PT6v2mE9AH2zlnADJD/2tC6E00hgmhUOfEB6greHPAfLRSufHqROIUTkw6E+M3lH0PTQ=="], "babel-plugin-react-compiler": ["babel-plugin-react-compiler@1.0.0", "", { "dependencies": { "@babel/types": "^7.26.0" } }, "sha512-Ixm8tFfoKKIPYdCCKYTsqv+Fd4IJ0DQqMyEimo+pxUOMUR9cVPlwTrFt9Avu+3cb6Zp3mAzl+t1MrG2fxxKsxw=="], + "bail": ["bail@2.0.2", "", {}, "sha512-0xO6mYd7JB2YesxDKplafRpsiOzPt9V02ddPCLbY1xYGPOX24NTyN50qnUxgCPcSoYMhKpAuBTjQoRZCAkUDRw=="], + + "balanced-match": ["balanced-match@1.0.2", "", {}, "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="], + "baseline-browser-mapping": ["baseline-browser-mapping@2.10.25", "", { "bin": { "baseline-browser-mapping": "dist/cli.cjs" } }, "sha512-QO/VHsXCQdnzADMfmkeOPvHdIAkoB7i0/rGjINPJEetLx75hNttVWGQ/jycHUDP9zZ9rupbm60WRxcwViB0MiA=="], "beasties": ["beasties@0.5.4", "", { "dependencies": { "css-select": "^7.0.0", "css-what": "^8.0.0", "dom-serializer": "^3.0.0", "domhandler": "^6.0.0", "htmlparser2": "^12.0.0", "picocolors": "^1.1.1", "postcss": "^8.4.49", "postcss-media-query-parser": "^0.2.3", "postcss-safe-parser": "^7.0.1" } }, "sha512-8/lOOjT+PElYCnaUbmhgd3Uad5R1VTQ4Wg0k4rK8bX04m5WEqHNmnlLy3Q/lJ7dk25XA+72gayzc/skTfKKpcA=="], @@ -845,6 +1052,10 @@ "boolbase": ["boolbase@2.0.0", "", {}, "sha512-DkVaaQHymRhpYEYo9x1oo7Q7B0Y6KJUsjm3c9eTyFDby4MHLBTwZ6ZDWBel5zrYxj1WsZgC5oLpiz+93MluXeA=="], + "boxen": ["boxen@7.0.0", "", { "dependencies": { "ansi-align": "^3.0.1", "camelcase": "^7.0.0", "chalk": "^5.0.1", "cli-boxes": "^3.0.0", "string-width": "^5.1.2", "type-fest": "^2.13.0", "widest-line": "^4.0.1", "wrap-ansi": "^8.0.1" } }, "sha512-j//dBVuyacJbvW+tvZ9HuH03fZ46QcaKvvhZickZqtB271DxJ7SNRSNxrV/dZX0085m7hISRZWbzWlJvx/rHSg=="], + + "brace-expansion": ["brace-expansion@1.1.22", "", { "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, "sha512-CKLDTuSsN0+r1ThM0WkzzBI7dnPI6xEGfa/JnVYIK9JNBA1N1NyPwXVHor//NKD/y3sDxp764sZdLhFK7pH8XQ=="], + "braces": ["braces@3.0.3", "", { "dependencies": { "fill-range": "^7.1.1" } }, "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA=="], "browserslist": ["browserslist@4.28.2", "", { "dependencies": { "baseline-browser-mapping": "^2.10.12", "caniuse-lite": "^1.0.30001782", "electron-to-chromium": "^1.5.328", "node-releases": "^2.0.36", "update-browserslist-db": "^1.2.3" }, "bin": { "browserslist": "cli.js" } }, "sha512-48xSriZYYg+8qXna9kwqjIVzuQxi+KYWp2+5nCYnYKPTr0LvD89Jqk2Or5ogxz0NUMfIjhh2lIUX/LyX9B4oIg=="], @@ -855,24 +1066,46 @@ "bun-types": ["bun-types@1.4.4", "", { "dependencies": { "@types/node": "*", "undici-types": "*" } }, "sha512-yjrJh5oGX7mMPKGd19YXyIjmEuj4G4zNC30bs7PM9Az7NQ3ndF3j6hbeRdvJTRQEhJ/FYQwW0a2moweEi2hMxQ=="], + "bytes": ["bytes@3.1.2", "", {}, "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg=="], + "cac": ["cac@7.1.0", "", {}, "sha512-LMDU/U2yA4IPIY8KT0NsNPWEYZvAMkbgyspxJ6btJaYV+WMDOHAZCmB0lsTObiHaRS1V/ztKAl7+TSkTqXyeoA=="], + "camelcase": ["camelcase@7.0.1", "", {}, "sha512-xlx1yCK2Oc1APsPXDL2LdlNP6+uu8OCDdhOBSVT279M/S+y75O30C2VuD8T2ogdePBBl7PfPF4504tnLgX3zfw=="], + "caniuse-lite": ["caniuse-lite@1.0.30001791", "", {}, "sha512-yk0l/YSrOnFZk3UROpDLQD9+kC1l4meK/wed583AXrzoarMGJcbRi2Q4RaUYbKxYAsZ8sWmaSa/DsLmdBeI1vQ=="], + "ccount": ["ccount@2.0.1", "", {}, "sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg=="], + "chalk": ["chalk@4.1.2", "", { "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" } }, "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA=="], + "chalk-template": ["chalk-template@0.4.0", "", { "dependencies": { "chalk": "^4.1.2" } }, "sha512-/ghrgmhfY8RaSdeo43hNXxpoHAtxdbskUHjPpfqUWGttFgycUhYPGx3YZBCnUCvOa7Doivn1IZec3DEGFoMgLg=="], + "char-regex": ["char-regex@1.0.2", "", {}, "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw=="], + "character-entities": ["character-entities@2.0.2", "", {}, "sha512-shx7oQ0Awen/BRIdkjkvz54PnEEI/EjwXDSIZp86/KKdbafHh1Df/RYGBhn4hbe2+uKC9FnT5UCEdyPz3ai9hQ=="], + + "character-entities-html4": ["character-entities-html4@2.1.0", "", {}, "sha512-1v7fgQRj6hnSwFpq1Eu0ynr/CDEw0rXo2B61qXrLNdHZmPKgb7fqS1a2JwF0rISo9q77jDI8VMEHoApn8qDoZA=="], + + "character-entities-legacy": ["character-entities-legacy@3.0.0", "", {}, "sha512-RpPp0asT/6ufRm//AJVwpViZbGM/MkjQFxJccQRHmISF/22NBtsHqAWmL+/pmkPWoIUJdWyeVleTl1wydHATVQ=="], + + "character-reference-invalid": ["character-reference-invalid@2.0.1", "", {}, "sha512-iBZ4F4wRbyORVsu0jPV7gXkOsGYjGHPmAyv+HiHG8gi5PtC9KI2j1+v8/tlibRvjoWX027ypmG/n0HtO5t7unw=="], + "chardet": ["chardet@2.1.1", "", {}, "sha512-PsezH1rqdV9VvyNhxxOW32/d75r01NY7TQCmOqomRo15ZSOKbpTFVsfjghxo6JloQUCGnH4k1LGu0R4yCLlWQQ=="], + "chevrotain": ["chevrotain@13.2.0", "", { "dependencies": { "@chevrotain/cst-dts-gen": "13.2.0", "@chevrotain/gast": "13.2.0", "@chevrotain/regexp-to-ast": "13.2.0", "@chevrotain/types": "13.2.0", "@chevrotain/utils": "13.2.0" } }, "sha512-GTouk5YzgBxlTPCaDn5q0q2EJKkrYmnPF+HmF8v0Qo4r3iyPG7HJivkN1wthCXZcm3sIcZFpGTRovLPNdJNRCA=="], + "chokidar": ["chokidar@5.0.0", "", { "dependencies": { "readdirp": "^5.0.0" } }, "sha512-TQMmc3w+5AxjpL8iIiwebF73dRDF4fBIieAqGn9RGCWaEVwQ6Fb2cGe31Yns0RRIzii5goJ1Y7xbMwo1TxMplw=="], "ci-info": ["ci-info@3.9.0", "", {}, "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ=="], "cjs-module-lexer": ["cjs-module-lexer@1.4.3", "", {}, "sha512-9z8TZaGM1pfswYeXrUpzPrkx8UnWYdhJclsiYMm6x/w5+nN+8Tf/LnAgfLGQCm59qAOxU8WwHEq2vNwF6i4j+Q=="], + "class-variance-authority": ["class-variance-authority@0.7.1", "", { "dependencies": { "clsx": "^2.1.1" } }, "sha512-Ka+9Trutv7G8M6WT6SeiRWz792K5qEqIGEGzXKhAE6xOWAY6pPH8U+9IY3oCMv6kqTmLsv7Xh/2w2RigkePMsg=="], + "classy-store-angular-example": ["classy-store-angular-example@workspace:examples/angular"], + "classy-store-docs": ["classy-store-docs@workspace:website"], + "classy-store-nextjs-example": ["classy-store-nextjs-example@workspace:examples/nextjs"], "classy-store-solid-example": ["classy-store-solid-example@workspace:examples/solid"], @@ -881,6 +1114,8 @@ "classy-store-vue-example": ["classy-store-vue-example@workspace:examples/vue"], + "cli-boxes": ["cli-boxes@3.0.0", "", {}, "sha512-/lzGpEWL/8PfI0BmBOPRwp0c/wFNX1RdUML3jK/RcSBA9T8mZDdQpqYBKtCFTOfQbwPqWEOpjqW+Fnayc0969g=="], + "cli-cursor": ["cli-cursor@5.0.0", "", { "dependencies": { "restore-cursor": "^5.0.0" } }, "sha512-aCj4O5wKyszjMmDT4tZj93kxyydN/K5zPWSCe6/0AV/AA1pqe5ZBIw0a2ZfPQV7lL5/yb5HsUreJ6UFAF1tEQw=="], "cli-highlight": ["cli-highlight@2.1.11", "", { "dependencies": { "chalk": "^4.0.0", "highlight.js": "^10.7.1", "mz": "^2.4.0", "parse5": "^5.1.1", "parse5-htmlparser2-tree-adapter": "^6.0.0", "yargs": "^16.0.0" }, "bin": { "highlight": "bin/highlight" } }, "sha512-9KDcoEVwyUXrjcJNvHD0NFc/hiwe/WPVYIleQh2O1N2Zro5gWJZ/K+3DGn8w8P/F6FxOgzyC5bxDyHIgCSPhGg=="], @@ -899,16 +1134,34 @@ "clsx": ["clsx@2.1.1", "", {}, "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA=="], + "cn": ["cn@0.5.2", "", { "bin": { "cn": "bin/cn.mjs" } }, "sha512-wm10E6iuJ37rALOw3D+3cfaXXZSLNMh2uxpQn3dNICqfJM59yXqgbA9/9Iiz155j5kYNLdK6WreNdW3NQtx3OQ=="], + + "collapse-white-space": ["collapse-white-space@2.1.0", "", {}, "sha512-loKTxY1zCOuG4j9f6EPnuyyYkf58RnhhWTvRoZEokgB+WbdXehfjFviyOVYkqzEWz1Q5kRiZdBYS5SwxbQYwzw=="], + "color-convert": ["color-convert@2.0.1", "", { "dependencies": { "color-name": "~1.1.4" } }, "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ=="], "color-name": ["color-name@1.1.4", "", {}, "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="], "colorjs.io": ["colorjs.io@0.7.1", "", {}, "sha512-LY7OHnJZxHwT5UlzNa9bbhHHDbzB6yE5+3MIPwJEQKRvSCt/T4G7epsj+9j2BExUIIfXFIJGsIXUKdfrK9Q5tA=="], + "comma-separated-tokens": ["comma-separated-tokens@2.0.3", "", {}, "sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg=="], + "commander": ["commander@10.0.1", "", {}, "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug=="], + "compressible": ["compressible@2.0.18", "", { "dependencies": { "mime-db": ">= 1.43.0 < 2" } }, "sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg=="], + + "compression": ["compression@1.8.2", "", { "dependencies": { "bytes": "3.1.2", "compressible": "~2.0.18", "debug": "2.6.9", "destroy": "1.2.0", "negotiator": "~0.6.4", "on-headers": "~1.1.0", "safe-buffer": "5.2.1", "vary": "~1.1.2" } }, "sha512-o8vI5RE5A6EVVOd9o41jKp41aJom+QTEO/Bx8MYNjexMo/Bv2WOjUfZr+aL0WnYSgymUy6zeguqLTsIhV0gMvQ=="], + + "compute-scroll-into-view": ["compute-scroll-into-view@3.2.2", "", {}, "sha512-X+jf3y2j3TbtxA3fq3/kBNiSnD1QlIChiIQdAc2Yo1LtOc0yjO1TzgxWJf8PwtKPGgSvSfWUlVvrb7vGx1eYWA=="], + + "concat-map": ["concat-map@0.0.1", "", {}, "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg=="], + + "content-disposition": ["content-disposition@0.5.2", "", {}, "sha512-kRGRZw3bLlFISDBgwTSA1TMBFN6J6GWDeubmDE3AF+3+yXL8hTWv8r5rkLbqYXY4RjPk/EzHnClI3zQf1cFmHA=="], + "convert-source-map": ["convert-source-map@2.0.0", "", {}, "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg=="], + "cose-base": ["cose-base@1.0.3", "", { "dependencies": { "layout-base": "^1.0.0" } }, "sha512-s9whTXInMSgAp/NVXVNuVxVKzGH2qck3aQlVHxDCdAEPgtMKwc4Wq6/QKhgdEdgbLSi9rBTAcPoRa6JpiG4ksg=="], + "cross-spawn": ["cross-spawn@7.0.6", "", { "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", "which": "^2.0.1" } }, "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA=="], "css-select": ["css-select@7.0.0", "", { "dependencies": { "boolbase": "^2.0.0", "css-what": "^8.0.0", "domhandler": "^6.0.1", "domutils": "^4.0.2", "nth-check": "^3.0.1" } }, "sha512-snmjEVXy+1LnwXdxhYvTMj1d9tOh4HxkA1YmoayVBeeyR2C14Pum7fcxJIm4SswYspVy866eYNwlH6xC3/VH5g=="], @@ -917,20 +1170,108 @@ "csstype": ["csstype@3.2.3", "", {}, "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ=="], + "cytoscape": ["cytoscape@3.35.0", "", {}, "sha512-sMvBIXiGMnhkCaWz2R06FwF/27MNlS+Tqvi17foO9UhnUg3XGZccKjxsvEqQFAQYMSSZmN5SxYzUYlQ0DOJJ3g=="], + + "cytoscape-cose-bilkent": ["cytoscape-cose-bilkent@4.1.0", "", { "dependencies": { "cose-base": "^1.0.0" }, "peerDependencies": { "cytoscape": "^3.2.0" } }, "sha512-wgQlVIUJF13Quxiv5e1gstZ08rnZj2XaLHGoFMYXz7SkNfCDOOteKBE6SYRfA9WxxI/iBc3ajfDoc6hb/MRAHQ=="], + + "cytoscape-fcose": ["cytoscape-fcose@2.2.0", "", { "dependencies": { "cose-base": "^2.2.0" }, "peerDependencies": { "cytoscape": "^3.2.0" } }, "sha512-ki1/VuRIHFCzxWNrsshHYPs6L7TvLu3DL+TyIGEsRcvVERmxokbf5Gdk7mFxZnTdiGtnA4cfSmjZJMviqSuZrQ=="], + + "d3": ["d3@7.9.2", "", { "dependencies": { "d3-array": "^3.2.5", "d3-axis": "^3.0.1", "d3-brush": "^3.0.1", "d3-chord": "^3.0.2", "d3-color": "^3.1.1", "d3-contour": "^4.0.3", "d3-delaunay": "^6.0.6", "d3-dispatch": "^3.0.2", "d3-drag": "^3.0.1", "d3-dsv": "^3.0.2", "d3-ease": "^3.0.2", "d3-fetch": "^3.0.2", "d3-force": "^3.0.1", "d3-format": "^3.1.3", "d3-geo": "^3.1.2", "d3-hierarchy": "^3.1.3", "d3-interpolate": "^3.0.2", "d3-path": "^3.1.1", "d3-polygon": "^3.0.2", "d3-quadtree": "^3.0.2", "d3-random": "^3.0.2", "d3-scale": "^4.0.3", "d3-scale-chromatic": "^3.1.1", "d3-selection": "^3.0.1", "d3-shape": "^3.2.1", "d3-time": "^3.1.1", "d3-time-format": "^4.1.1", "d3-timer": "^3.0.2", "d3-transition": "^3.0.2", "d3-zoom": "^3.0.1" } }, "sha512-ZKb/mONPVKzaO5UlcWcwN8bS4ezvQaYu+bsou+XgNABdGC800kwH651ADTbbTxMPHW13UlvbQafdmJQDk1w7Mg=="], + + "d3-array": ["d3-array@3.2.5", "", { "dependencies": { "internmap": "1 - 2" } }, "sha512-Th8qGXoBalmWsstpkuhmBuTsBQIFqYOJtjlBvNVvBfJ8E3uYusBUwUR8HU20U0qKKQkgCvKyR1YjiozWadk5QA=="], + + "d3-axis": ["d3-axis@3.0.1", "", {}, "sha512-E5QCXfaf/uJZEHHiqoWRq+bQEm2PzoVFv2rDC7CZ3wwI0MjfMW3w83J3ubobG4IJj3lShAI5eiPJhOu/8wHofA=="], + + "d3-brush": ["d3-brush@3.0.1", "", { "dependencies": { "d3-dispatch": "1 - 3", "d3-drag": "2 - 3", "d3-interpolate": "1 - 3", "d3-selection": "3", "d3-transition": "3" } }, "sha512-L5Glqa/Gb7LU3ndIOMtA5mDzlJ0aXKp5ELP2X09ctWF23jO7+faIUVDbmaIi+D6k3EemXFWn1F3lkfguExoVhA=="], + + "d3-chord": ["d3-chord@3.0.2", "", { "dependencies": { "d3-path": "1 - 3" } }, "sha512-cGmADo5M2PTi3ewJZ2lcE32eURd4JmHtQ5JwRIUcas5L1SXqufG9yPyjWp8fW0gRi7aZi9bgbZPFZO1eyZ+1CQ=="], + + "d3-color": ["d3-color@3.1.1", "", {}, "sha512-lfab8x0Bj0UO7SNsY8dZSbNIA6ipbkE3X0NG9nqjCu6CfCHZseuDnOSJY7hidKrjpP++i1M2qT+FlAdPKYRilA=="], + + "d3-contour": ["d3-contour@4.0.3", "", { "dependencies": { "d3-array": "^3.2.4" } }, "sha512-5DYURc8KwXPOhSUBblU0P9rVcArsSPxPOxsfO0Eud0s28oU0sB2e80aRHRL9AZW3usT8ikFKyIHpHHLNWLdRVA=="], + + "d3-delaunay": ["d3-delaunay@6.0.6", "", { "dependencies": { "delaunator": "5" } }, "sha512-DMQIEvSJhZCB6pwedcXaAlQ+MeKU5LlM2XakKtc73b/VM+RBiI1SRXycOEOKg2jsKj4zZ9F0KGYG6nCGwwWu/g=="], + + "d3-dispatch": ["d3-dispatch@3.0.2", "", {}, "sha512-sAzH4Y4nsLo8eSqw5jKiZt+LU2wZmL/qS+OkxQGjhwazB/D7TY34R/QK1eshfGr7cZEKymKZ/Haem7m+lu98Sg=="], + + "d3-drag": ["d3-drag@3.0.1", "", { "dependencies": { "d3-dispatch": "1 - 3", "d3-selection": "3" } }, "sha512-OWeoayCq8J69hUIjvL+Mb6Q6Oaj/fyHV5XaXByEUAG+JUjIfTGDnk3qGpcXrD3VmQ3BSV96fcbM6fqq7C0tbPA=="], + + "d3-dsv": ["d3-dsv@3.0.2", "", { "dependencies": { "commander": "7", "iconv-lite": "0.6", "rw": "1" }, "bin": { "csv2tsv": "bin/dsv2dsv.js", "dsv2dsv": "bin/dsv2dsv.js", "tsv2csv": "bin/dsv2dsv.js", "csv2json": "bin/dsv2json.js", "dsv2json": "bin/dsv2json.js", "json2csv": "bin/json2dsv.js", "json2dsv": "bin/json2dsv.js", "json2tsv": "bin/json2dsv.js", "tsv2json": "bin/dsv2json.js" } }, "sha512-FUnXhX7I4/AXyRCZzwfZTDGSq8PGZ4oR0tiCBqNGOZMsDrQ+6sIWNQnBzcCGhzJKZ6uCvCezTwflUqI209RRiQ=="], + + "d3-ease": ["d3-ease@3.0.2", "", {}, "sha512-B5znKqRmKROAN4oHWQ50W/qisVjA9GXh2WMsVKdFVp4DxWmcrOsweqgUOUVsv5th96kwaZlokU6SlV4J3gak1w=="], + + "d3-fetch": ["d3-fetch@3.0.2", "", { "dependencies": { "d3-dsv": "1 - 3" } }, "sha512-1wGF62bgjMRbF6mqbD+6rRWBL2hwWVYQjFO2UP3Wm1nIAvJZKaQxXM5caVY7athoCa8wIq9lCf7g44lPWFk50g=="], + + "d3-force": ["d3-force@3.0.1", "", { "dependencies": { "d3-dispatch": "1 - 3", "d3-quadtree": "1 - 3", "d3-timer": "1 - 3" } }, "sha512-kAaaHLFebBYwgi5cYBXAI8vKrQFMCD2MEswj2QuPKKbdU1wYLc8WXtS7O8F/b6POCIe3gJjY6hkDstHi1yMETQ=="], + + "d3-format": ["d3-format@3.1.3", "", {}, "sha512-+F+/49swqmGuQJmSKnVMIDH/QkEFV5li9QRj0xm/KhyAUBv099O5PrvpQFxBp24PYph17Mnvt9mjKQV0ii0nMA=="], + + "d3-geo": ["d3-geo@3.1.2", "", { "dependencies": { "d3-array": "2.5.0 - 3" } }, "sha512-5R8ZgDQorIxmauv7R6gpE/ndz+Z0qAZssigq0aXFdvPHdY41RqtW02jrRUQAL724NdPABYXo1+gQEGBBr7uKNg=="], + + "d3-hierarchy": ["d3-hierarchy@3.1.3", "", {}, "sha512-GRajN5ZcnEwYFWqqdzhG1qJ3+fDg6WWzk47TJg7ePY7yvYAgRfD2r1mUx+wviBOWuCwamCUzjwMSdato43jbGA=="], + + "d3-interpolate": ["d3-interpolate@3.0.2", "", { "dependencies": { "d3-color": "1 - 3" } }, "sha512-IRzGU62DtxhvsnSTWMQIdnoZ6gA+BCWwBon1EJI6SjoN595799b6z/QRBzXfFhE8iupUPp3042yBNo0STPqnzQ=="], + + "d3-path": ["d3-path@3.1.1", "", {}, "sha512-jsbgV8zIT38ReB9O7X7gcLndTQRONSqNNd+oGIaTBdUug4r5jFmp0N6RY9R5GWbdUDucn0qoTGyfjapT4tDhcg=="], + + "d3-polygon": ["d3-polygon@3.0.2", "", {}, "sha512-WAUvPudGU1Dn4mDPfb6+JnnbeVEV53hG/BoT+bxts6AkZsOpTEiV1jHYX+2vtwCICNFG9Wxv8QS+eW1zE/Dwfg=="], + + "d3-quadtree": ["d3-quadtree@3.0.2", "", {}, "sha512-9Lu9mqJKRbIk0d6mKDjpvPURaPdwHVK5CYbcdd0/4vBgz4ldz/7TIOse3kNERsByGNfld58KEco507AztJWyTQ=="], + + "d3-random": ["d3-random@3.0.2", "", {}, "sha512-PxJi9LNV+7mulaYO77nd+oGurXGL1fhedXjHnB3pWLUcqDnQtF4VASoqnQGHgoXLByVdv5QJ/2kfwkGn5HTS8g=="], + + "d3-sankey": ["d3-sankey@0.12.3", "", { "dependencies": { "d3-array": "1 - 2", "d3-shape": "^1.2.0" } }, "sha512-nQhsBRmM19Ax5xEIPLMY9ZmJ/cDvd1BG3UVvt5h3WRxKg5zGRbvnteTyWAbzeSvlh3tW7ZEmq4VwR5mB3tutmQ=="], + + "d3-scale": ["d3-scale@4.0.3", "", { "dependencies": { "d3-array": "2.10.0 - 3", "d3-format": "1 - 3", "d3-interpolate": "1.2.0 - 3", "d3-time": "2.1.1 - 3", "d3-time-format": "2 - 4" } }, "sha512-66cWobCNzcMvlfoaDHCxuIv9TBUWG1BLOWdv9kHHFuCr1JdqAWPvTmsaEYDD5NRMyWZ5+7u0GqiCDfMXMqh3hg=="], + + "d3-scale-chromatic": ["d3-scale-chromatic@3.1.1", "", { "dependencies": { "d3-color": "1 - 3", "d3-interpolate": "1 - 3", "d3-scale": "1 - 4" } }, "sha512-lA5gfN2yMvmChubmptnDiBfeGpHD7Yb1EbvCz0TZE0WHXhyR6W2allPuhKtzV5ILQRqeOdefF0qYtERReLUBDg=="], + + "d3-selection": ["d3-selection@3.0.1", "", {}, "sha512-ODSf35vqCrlCfp7hrm0eZjvOosSXSYLjqvIlhMBV9q9VOx7EBJG6pc+uXBswEZNJgCGJ+qnKYcWutbZDIxe/Xg=="], + + "d3-shape": ["d3-shape@3.2.1", "", { "dependencies": { "d3-path": "^3.1.1" } }, "sha512-dm2o+lbKdzg9tY7GEag/dB9hcbodLfwkE/DkvqbELJXaMz0yKzWWhZqhbI7CKubukA7HnRyz0avdtvi7EPxPvw=="], + + "d3-time": ["d3-time@3.1.1", "", { "dependencies": { "d3-array": "2 - 3" } }, "sha512-Ze7rjrhMzdeulh0/hjcfFj7XLAHOfowtEMfsoG6DU866HPynQNW7Wfen6hzXcqKTv8XzxvF6Hzr5XD6bMHr2ug=="], + + "d3-time-format": ["d3-time-format@4.1.1", "", { "dependencies": { "d3-time": "1 - 3" } }, "sha512-22XaqjyCjpqgda20erhsOjGmC3vvYwTNYniKAd45W5UWLDF43moeOuV9qYpRqobIlsnK0UhnKZjUUJm3VgORUA=="], + + "d3-timer": ["d3-timer@3.0.2", "", {}, "sha512-1Il1aliroVSErrv5aulRBxAY+7+DnaoLIWGd1C6SsBTWDeobWiP/V69vwb8vT6abR1kKwaNe1196pmaQ1fK90A=="], + + "d3-transition": ["d3-transition@3.0.2", "", { "dependencies": { "d3-color": "1 - 3", "d3-dispatch": "1 - 3", "d3-ease": "1 - 3", "d3-interpolate": "1 - 3", "d3-timer": "1 - 3" }, "peerDependencies": { "d3-selection": "2 - 3" } }, "sha512-RcjCsdFgyFoDB+QXLC5m60ZkTN0k9zH+ovoLlTdJnDS1AbfbcuowiM4pCKSTOclNibS4f4J4cbv2m7O7y8NTOQ=="], + + "d3-zoom": ["d3-zoom@3.0.1", "", { "dependencies": { "d3-dispatch": "1 - 3", "d3-drag": "2 - 3", "d3-interpolate": "1 - 3", "d3-selection": "2 - 3", "d3-transition": "2 - 3" } }, "sha512-kfjD3BDQu/FOatpZ6JdMSyIoDwTxIpI29ySTI2J5ZlDaH1WbuJGQJ2Q9oJkWTEZEW98j6idezoomSD3Cn2zwiw=="], + + "dagre-d3-es": ["dagre-d3-es@7.0.14", "", { "dependencies": { "d3": "^7.9.0", "lodash-es": "^4.17.21" } }, "sha512-P4rFMVq9ESWqmOgK+dlXvOtLwYg0i7u0HBGJER0LZDJT2VHIPAMZ/riPxqJceWMStH5+E61QxFra9kIS3AqdMg=="], + "dataloader": ["dataloader@1.4.0", "", {}, "sha512-68s5jYdlvasItOJnCuI2Q9s4q98g0pCyL3HrcKJu8KNugUl8ahgmZYg38ysLTgQjjXX3H8CJLkAvWrclWfcalw=="], + "dayjs": ["dayjs@1.11.23", "", {}, "sha512-QDTCU0M0MxR3hQfnlDJfwekQiaanm1ubOD231u73WBckQ/fsamwRLiE2GBz6D3a/xF1NgfiDLJjXBa1hYOYTtQ=="], + "debug": ["debug@4.4.3", "", { "dependencies": { "ms": "^2.1.3" } }, "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA=="], + "decode-named-character-reference": ["decode-named-character-reference@1.3.0", "", { "dependencies": { "character-entities": "^2.0.0" } }, "sha512-GtpQYB283KrPp6nRw50q3U9/VfOutZOe103qlN7BPP6Ad27xYnOIWv4lPzo8HCAL+mMZofJ9KEy30fq6MfaK6Q=="], + + "deep-extend": ["deep-extend@0.6.0", "", {}, "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA=="], + "deepmerge": ["deepmerge@4.3.1", "", {}, "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A=="], "defu": ["defu@6.1.7", "", {}, "sha512-7z22QmUWiQ/2d0KkdYmANbRUVABpZ9SNYyH5vx6PZ+nE5bcC0l7uFvEfHlyld/HcGBFTL536ClDt3DEcSlEJAQ=="], + "delaunator": ["delaunator@5.1.0", "", { "dependencies": { "robust-predicates": "^3.0.2" } }, "sha512-AGrQ4QSgssa1NGmWmLPqN5NY2KajF5MqxetNEO+o0n3ZwZZeTmt7bBnvzHWrmkZFxGgr4HdyFgelzgi06otLuQ=="], + + "dequal": ["dequal@2.0.3", "", {}, "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA=="], + + "destroy": ["destroy@1.2.0", "", {}, "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg=="], + "detect-indent": ["detect-indent@6.1.0", "", {}, "sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA=="], "detect-libc": ["detect-libc@2.1.2", "", {}, "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ=="], + "detect-node-es": ["detect-node-es@1.1.0", "", {}, "sha512-ypdmJU/TbBby2Dxibuv7ZLW3Bs1QEmM7nHjEANfohJLvE0XVujisn1qPJcZxg+qDucsr+bP6fLD1rPS3AhJ7EQ=="], + "devalue": ["devalue@5.9.4", "", {}, "sha512-sPAT4pztbu6586/hrhOnMKS17IJrvg12mXiSPSS3W5qDeN2RGgvZ0diZCm31dBbnevfVmujNO3IM2wrS4Y2Rhg=="], + "devlop": ["devlop@1.1.0", "", { "dependencies": { "dequal": "^2.0.0" } }, "sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA=="], + "dir-glob": ["dir-glob@3.0.1", "", { "dependencies": { "path-type": "^4.0.0" } }, "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA=="], "dom-serializer": ["dom-serializer@3.1.1", "", { "dependencies": { "domelementtype": "^3.0.0", "domhandler": "^6.0.0", "entities": "^8.0.0" } }, "sha512-4MEa38/QexBob6gFNwu+EGdWvhJ1OKuNwdYY3Y3NyeWDQfnGeDYQUDfIRzWu5B5gsv03so2Uxd28YC6zrsx3Lw=="], @@ -939,14 +1280,20 @@ "domhandler": ["domhandler@6.0.1", "", { "dependencies": { "domelementtype": "^3.0.0" } }, "sha512-gYzvtM72ZtxQO0T048kd6HWSbbGCNOUwcnfQ01cqIJ4X2IYKFFHZ5mKvrQETcFXxsRObZulDaKmy//R7TPtsBg=="], + "dompurify": ["dompurify@3.4.18", "", { "optionalDependencies": { "@types/trusted-types": "^2.0.7" } }, "sha512-ofe3wI/uNm68HInABYFJYqQxRw1EaKAjNdrFVKqjUY+UZurvNd2L/HuQe097s/4RivWiZyP6tT7aoT8atjfhwg=="], + "domutils": ["domutils@4.0.2", "", { "dependencies": { "dom-serializer": "^3.0.0", "domelementtype": "^3.0.0", "domhandler": "^6.0.0" } }, "sha512-qI4JLRKnSzqFqr7hAlS5xQDusBCjKSEG4t4+7aNrIQMHBcsC2TGEhuyABJdYkgSewL57PNLYEiibY2iPKhKpaA=="], "dotenv": ["dotenv@8.6.0", "", {}, "sha512-IrPdXQsk2BbzvCBGBOTmmSH5SodmqZNt4ERAZDmW4CT+tL8VtvinqywuANaFu4bOMWki16nqf0e4oC0QIaDr/g=="], "dts-resolver": ["dts-resolver@3.0.0", "", { "peerDependencies": { "oxc-resolver": ">=11.0.0" }, "optionalPeers": ["oxc-resolver"] }, "sha512-1T1f+z+4tl9XD+m+0HBgWoL/nm0bOIffyWaUuUSBlFg/86IWvfx+wjNaO/ybU0AJzG9/Mi5hBUgGV6zCmWEN7Q=="], + "eastasianwidth": ["eastasianwidth@0.2.0", "", {}, "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA=="], + "electron-to-chromium": ["electron-to-chromium@1.5.348", "", {}, "sha512-QC2X59nRlycQQMc4ZXjSVBX+tSgJfgRtcrYHbIZLgOV2dCvefoQGegLR7lLXKgpPpSuVmJU19LMzGrSa2C7k3Q=="], + "elkjs": ["elkjs@0.12.1", "", {}, "sha512-IhMYKHE4S2vtx0QrhBP3lYOIKDeIiJXBrdq9MGYkuB8ZHqhrBnHNfSUndjXFewrX1CPK8chwq+2NA0K0hliYuw=="], + "emoji-regex": ["emoji-regex@8.0.0", "", {}, "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="], "emojilib": ["emojilib@2.4.0", "", {}, "sha512-5U0rVMU5Y2n2+ykNLQqMoqklN9ICBT/KsvC1Gz6vqHbz2AXXGkG+Pm5rMWk/8Vjrr/mY9985Hi8DYzn1F09Nyw=="], @@ -961,18 +1308,42 @@ "environment": ["environment@1.1.0", "", {}, "sha512-xUtoPkMggbz0MPyPiIWr1Kp4aeWJjDZ6SMvURhimjdZgsRuDplF5/s9hcgGhyXMhs+6vpnuoiZ2kFiu3FMnS8Q=="], + "es-toolkit": ["es-toolkit@1.53.2", "", {}, "sha512-iUqZ+NlwH4jUgRmXZUxFBsV/9762TQEa1O4IXLFBmDEjVHScBytKuseX23I0+v9ShZ5MYxEx6WKNzm6IPnex8g=="], + + "esast-util-from-estree": ["esast-util-from-estree@2.0.0", "", { "dependencies": { "@types/estree-jsx": "^1.0.0", "devlop": "^1.0.0", "estree-util-visit": "^2.0.0", "unist-util-position-from-estree": "^2.0.0" } }, "sha512-4CyanoAudUSBAn5K13H4JhsMH6L9ZP7XbLVe/dKybkxMO7eDyLsT8UHl9TRNrU2Gr9nz+FovfSIjuXWJ81uVwQ=="], + + "esast-util-from-js": ["esast-util-from-js@2.0.1", "", { "dependencies": { "@types/estree-jsx": "^1.0.0", "acorn": "^8.0.0", "esast-util-from-estree": "^2.0.0", "vfile-message": "^4.0.0" } }, "sha512-8Ja+rNJ0Lt56Pcf3TAmpBZjmx8ZcK5Ts4cAzIOjsjevg9oSXJnl6SUQ2EevU8tv3h6ZLWmoKL5H4fgWvdvfETw=="], + "esbuild": ["esbuild@0.28.2", "", { "optionalDependencies": { "@esbuild/aix-ppc64": "0.28.2", "@esbuild/android-arm": "0.28.2", "@esbuild/android-arm64": "0.28.2", "@esbuild/android-x64": "0.28.2", "@esbuild/darwin-arm64": "0.28.2", "@esbuild/darwin-x64": "0.28.2", "@esbuild/freebsd-arm64": "0.28.2", "@esbuild/freebsd-x64": "0.28.2", "@esbuild/linux-arm": "0.28.2", "@esbuild/linux-arm64": "0.28.2", "@esbuild/linux-ia32": "0.28.2", "@esbuild/linux-loong64": "0.28.2", "@esbuild/linux-mips64el": "0.28.2", "@esbuild/linux-ppc64": "0.28.2", "@esbuild/linux-riscv64": "0.28.2", "@esbuild/linux-s390x": "0.28.2", "@esbuild/linux-x64": "0.28.2", "@esbuild/netbsd-arm64": "0.28.2", "@esbuild/netbsd-x64": "0.28.2", "@esbuild/openbsd-arm64": "0.28.2", "@esbuild/openbsd-x64": "0.28.2", "@esbuild/openharmony-arm64": "0.28.2", "@esbuild/sunos-x64": "0.28.2", "@esbuild/win32-arm64": "0.28.2", "@esbuild/win32-ia32": "0.28.2", "@esbuild/win32-x64": "0.28.2" }, "bin": { "esbuild": "bin/esbuild" } }, "sha512-HKVLS8dvII+xoKW9kmqxbRKrnWEXfJJr/FZhhJmiqIB0e053QNYFqOBouTMO/k5sID4MvCiUCvv8b9M4h32wIA=="], "escalade": ["escalade@3.2.0", "", {}, "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA=="], + "escape-string-regexp": ["escape-string-regexp@5.0.0", "", {}, "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw=="], + "esm-env": ["esm-env@1.2.2", "", {}, "sha512-Epxrv+Nr/CaL4ZcFGPJIYLWFom+YeV1DqMLHJoEd9SYRxNbaFruBwfEX/kkHUJf55j2+TUbmDcmuilbP1TmXHA=="], "esprima": ["esprima@4.0.1", "", { "bin": { "esparse": "./bin/esparse.js", "esvalidate": "./bin/esvalidate.js" } }, "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A=="], "esrap": ["esrap@2.4.0", "", { "dependencies": { "@jridgewell/sourcemap-codec": "^1.4.15" }, "peerDependencies": { "@typescript-eslint/types": "^8.2.0" }, "optionalPeers": ["@typescript-eslint/types"] }, "sha512-CQPcneEHw/czj32uwQC52nYnax8H4SXt25FCM+LIwGZ49cMIxpOj3bP8wmzcI+Z0HIy5KkClaPhRLfCySzwHPA=="], + "estree-util-attach-comments": ["estree-util-attach-comments@3.0.0", "", { "dependencies": { "@types/estree": "^1.0.0" } }, "sha512-cKUwm/HUcTDsYh/9FgnuFqpfquUbwIqwKM26BVCGDPVgvaCl/nDCCjUfiLlx6lsEZ3Z4RFxNbOQ60pkaEwFxGw=="], + + "estree-util-build-jsx": ["estree-util-build-jsx@3.0.1", "", { "dependencies": { "@types/estree-jsx": "^1.0.0", "devlop": "^1.0.0", "estree-util-is-identifier-name": "^3.0.0", "estree-walker": "^3.0.0" } }, "sha512-8U5eiL6BTrPxp/CHbs2yMgP8ftMhR5ww1eIKoWRMlqvltHF8fZn5LRDvTKuxD3DUn+shRbLGqXemcP51oFCsGQ=="], + + "estree-util-is-identifier-name": ["estree-util-is-identifier-name@3.0.0", "", {}, "sha512-hFtqIDZTIUZ9BXLb8y4pYGyk6+wekIivNVTcmvk8NoOh+VeRn5y6cEHzbURrWbfp1fIqdVipilzj+lfaadNZmg=="], + + "estree-util-scope": ["estree-util-scope@1.0.1", "", { "dependencies": { "@types/estree": "^1.0.0", "devlop": "^1.0.0" } }, "sha512-B0np3dcdxqILX5e9nEi5/Fr4K7gL4oYFVPV1zRa2e9wRCbQoZZNWOZFYyoInvXUPJXBXjss+QXlWLJChDEHDkA=="], + + "estree-util-to-js": ["estree-util-to-js@2.0.0", "", { "dependencies": { "@types/estree-jsx": "^1.0.0", "astring": "^1.8.0", "source-map": "^0.7.0" } }, "sha512-WDF+xj5rRWmD5tj6bIqRi6CkLIXbbNQUcxQHzGysQzvHmdYG2G7p/Tf0J0gpxGgkeMZNTIjT/AoSvC9Xehcgdg=="], + + "estree-util-value-to-estree": ["estree-util-value-to-estree@3.5.0", "", { "dependencies": { "@types/estree": "^1.0.0" } }, "sha512-aMV56R27Gv3QmfmF1MY12GWkGzzeAezAX+UplqHVASfjc9wNzI/X6hC0S9oxq61WT4aQesLGslWP9tKk6ghRZQ=="], + + "estree-util-visit": ["estree-util-visit@2.0.0", "", { "dependencies": { "@types/estree-jsx": "^1.0.0", "@types/unist": "^3.0.0" } }, "sha512-m5KgiH85xAhhW8Wta0vShLcUvOsh3LLPI2YVwcbio1l7E09NTLL1EyMZFM1OyWowoH0skScNbhOPl4kcBgzTww=="], + "estree-walker": ["estree-walker@2.0.2", "", {}, "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w=="], + "extend": ["extend@3.0.2", "", {}, "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g=="], + "extendable-error": ["extendable-error@0.1.7", "", {}, "sha512-UOiS2in6/Q0FK0R0q6UY9vYpQ21mr/Qn1KOnte7vsACuNJf514WvCCUHSRCPcgjPT2bAhNIJdlE6bVap1GKmeg=="], "fast-deep-equal": ["fast-deep-equal@3.1.3", "", {}, "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q=="], @@ -999,34 +1370,64 @@ "flru": ["flru@1.0.2", "", {}, "sha512-kWyh8ADvHBFz6ua5xYOPnUroZTT/bwWfrCeL0Wj1dzG4/YOmOcfJ99W8dOVyyynJN35rZ9aCOtHChqQovV7yog=="], + "framer-motion": ["framer-motion@14.14.0", "", { "dependencies": { "motion-dom": "14.14.0", "motion-utils": "14.7.0", "tslib": "^2.4.0" }, "peerDependencies": { "react": "^18.0.0 || ^19.0.0", "react-dom": "^18.0.0 || ^19.0.0", "remix": "^3.1.0" }, "optionalPeers": ["react", "react-dom", "remix"] }, "sha512-fidRX0VzkZdA9OovFiBSzJtt9/jLcJpna78Z+KCqQQZIWoIpN3tOhEXAhhAw/FObUUh+o3Y18yx1F4BP0mVJ8Q=="], + "fs-extra": ["fs-extra@7.0.1", "", { "dependencies": { "graceful-fs": "^4.1.2", "jsonfile": "^4.0.0", "universalify": "^0.1.0" } }, "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw=="], "fsevents": ["fsevents@2.3.3", "", { "os": "darwin" }, "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw=="], + "fumadocs-core": ["fumadocs-core@16.19.4", "", { "dependencies": { "@fumari/image-size": "^0.1.1", "acorn": "^8.19.0", "acorn-jsx": "^5.3.2", "estree-util-value-to-estree": "^3.5.0", "github-slugger": "^2.0.0", "hast-util-from-dom": "^5.0.1", "hast-util-to-estree": "^3.1.3", "mdast-util-mdx": "^3.0.0", "micromark": "^4.0.3", "micromark-extension-gfm-table": "^2.1.2", "npm-to-yarn": "3.2.0", "remark": "^15.0.1", "remark-gfm": "^4.0.1", "remark-rehype": "^11.1.2", "scroll-into-view-if-needed": "^3.1.0", "shiki": "^4.6.0", "tinyglobby": "^0.2.17", "unified": "^11.0.5", "vfile": "^6.0.3", "yaml": "^2.9.1", "zbsearch": "^4.0.2" }, "peerDependencies": { "@mdx-js/mdx": "*", "@mixedbread/sdk": "0.x.x", "@modelcontextprotocol/server": "2.x.x", "@orama/core": "1.x.x", "@oramacloud/client": "2.x.x", "@pierre/highlights": "0.x.x", "@tanstack/react-router": "1.x.x", "@types/estree-jsx": "*", "@types/hast": "*", "@types/mdast": "*", "@types/react": "*", "algoliasearch": "5.x.x", "flexsearch": "*", "lucide-react": "*", "meilisearch": ">=0.50.0 <1.0.0", "next": "16.x.x", "react": "^19.2.0", "react-dom": "^19.2.0", "react-router": "7.x.x || 8.x.x", "waku": "*", "zod": "4.x.x" }, "optionalPeers": ["@mdx-js/mdx", "@mixedbread/sdk", "@modelcontextprotocol/server", "@orama/core", "@oramacloud/client", "@pierre/highlights", "@tanstack/react-router", "@types/estree-jsx", "@types/hast", "@types/mdast", "@types/react", "algoliasearch", "flexsearch", "lucide-react", "meilisearch", "next", "react", "react-dom", "react-router", "waku", "zod"] }, "sha512-PRYjTrfIbp3clCIE4n0nhbkGnoDg61cDOQp0GNYtAMl7haBgVykaQhI5SRTS8/i6POfodSR6C5lJiAGBBH1eNA=="], + + "fumadocs-mdx": ["fumadocs-mdx@15.6.3", "", { "dependencies": { "@mdx-js/mdx": "^3.1.1", "@standard-schema/spec": "^1.1.0", "acorn": "^8.19.0", "acorn-jsx": "^5.3.2", "chokidar": "^6.0.0", "esbuild": "^0.28.2", "estree-util-value-to-estree": "^3.5.0", "github-slugger": "^2.0.0", "magic-string": "^1.4.5", "mdast-util-from-markdown": "^2.1.0", "mdast-util-mdx": "^3.0.0", "micromark-extension-mdxjs-esm": "^3.0.0", "picocolors": "^1.1.1", "picomatch": "^4.0.7", "tinyexec": "^1.3.1", "tinyglobby": "^0.2.17", "unified": "^11.0.5", "unist-util-remove-position": "^5.0.0", "vfile": "^6.0.3", "yaml": "^2.9.1", "yuku-analyzer": "^0.19.0", "zod": "^4.6.7" }, "peerDependencies": { "@fumadocs/satteri": "0.x.x", "@types/mdast": "*", "@types/mdx": "*", "@types/react": "*", "@vitejs/plugin-rsc": "^0.5.34", "fumadocs-core": "^16.18.3", "mdast-util-directive": "*", "next": "^15.3.0 || ^16.0.0", "react": "^19.2.0", "rolldown": "*", "satteri": "^0.11.7", "vite": "7.x.x || 8.x.x" }, "optionalPeers": ["@fumadocs/satteri", "@types/mdast", "@types/mdx", "@types/react", "@vitejs/plugin-rsc", "mdast-util-directive", "next", "react", "rolldown", "satteri", "vite"], "bin": { "fumadocs-mdx": "./bin.js" } }, "sha512-MPuuZNfczeuYON3g+gWQB+jtD4gGIx0hEikYVDAb/GL/JO6SFyCBH6xASg0OuWrcLyLrhqaei65HXBZQMQCTRw=="], + + "fumadocs-ui": ["@fumadocs/base-ui@16.19.4", "", { "dependencies": { "@base-ui/react": "^1.9.0", "@fuma-translate/react": "^1.0.2", "@fumadocs/tailwind": "0.1.5", "class-variance-authority": "^0.7.1", "cn": "^0.5.2", "lucide-react": "^1.71.0", "motion": "^14.12.0", "next-themes": "^0.4.6", "react-remove-scroll": "^2.7.2", "scroll-into-view-if-needed": "^3.1.0", "shiki": "^4.6.0" }, "peerDependencies": { "@types/mdx": "*", "@types/react": "*", "fumadocs-core": "16.19.4", "next": "16.x.x", "react": "^19.2.0", "react-dom": "^19.2.0", "takumi-js": "*" }, "optionalPeers": ["@types/mdx", "@types/react", "next", "takumi-js"] }, "sha512-S8CPsuyIjWErT9Ek8+y/tmq+DPrlTJ+1b1KphvmKyeNKHnpfFC9BEj/Gqrz4gj0aZLQH2Fwo73igMAgnOUDeEw=="], + "gensync": ["gensync@1.0.0-beta.2", "", {}, "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg=="], "get-caller-file": ["get-caller-file@2.0.5", "", {}, "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg=="], "get-east-asian-width": ["get-east-asian-width@1.5.0", "", {}, "sha512-CQ+bEO+Tva/qlmw24dCejulK5pMzVnUOFOijVogd3KQs07HnRIgp8TGipvCCRT06xeYEbpbgwaCxglFyiuIcmA=="], + "get-nonce": ["get-nonce@1.0.1", "", {}, "sha512-FJhYRoDaiatfEkUK8HKlicmu/3SGFD51q3itKDGoSTysQJBnfOcxU5GxnhE1E6soB76MbT0MBtnKJuXyAx+96Q=="], + "get-tsconfig": ["get-tsconfig@5.0.0-beta.6", "", { "dependencies": { "resolve-pkg-maps": "^1.0.0" } }, "sha512-X6fBC0pmImC70gvX2zm56go9hx0MyoGVdG0tUCkg/D+Xnh5TJsOZ7iDbOdI3PvmtrDxnu1YdDufpK2QJX1Meqw=="], + "github-slugger": ["github-slugger@2.0.0", "", {}, "sha512-IaOQ9puYtjrkq7Y0Ygl9KDZnrf/aiUJYUpVf89y8kyaxbRG7Y1SrX/jaumrv81vc61+kiMempujsM3Yw7w5qcw=="], + "glob-parent": ["glob-parent@5.1.2", "", { "dependencies": { "is-glob": "^4.0.1" } }, "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow=="], "globby": ["globby@11.1.0", "", { "dependencies": { "array-union": "^2.1.0", "dir-glob": "^3.0.1", "fast-glob": "^3.2.9", "ignore": "^5.2.0", "merge2": "^1.4.1", "slash": "^3.0.0" } }, "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g=="], "graceful-fs": ["graceful-fs@4.2.11", "", {}, "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ=="], + "hachure-fill": ["hachure-fill@0.5.2", "", {}, "sha512-3GKBOn+m2LX9iq+JC1064cSFprJY4jL1jCXTcpnfER5HYE2l/4EfWSGzkPa/ZDBmYI0ZOEj5VHV/eKnPGkHuOg=="], + "happy-dom": ["happy-dom@21.0.4", "", { "dependencies": { "@types/node": ">=20.0.0", "@types/whatwg-mimetype": "^3.0.2", "@types/ws": "^8.18.1", "buffer-image-size": "^0.6.4", "entities": "^7.0.1", "whatwg-mimetype": "^3.0.0", "ws": "^8.21.0" } }, "sha512-tFm+GaLBgo6o0awHnvHaNoraVo27qJ+2tZEtZ+cIa08hXbeitrxAJajLI05hsUy/2/YTKcUjQYzHe5mCcraLBw=="], "has-flag": ["has-flag@4.0.0", "", {}, "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ=="], + "hast-util-from-dom": ["hast-util-from-dom@5.0.1", "", { "dependencies": { "@types/hast": "^3.0.0", "hastscript": "^9.0.0", "web-namespaces": "^2.0.0" } }, "sha512-N+LqofjR2zuzTjCPzyDUdSshy4Ma6li7p/c3pA78uTwzFgENbgbUrm2ugwsOdcjI1muO+o6Dgzp9p8WHtn/39Q=="], + + "hast-util-parse-selector": ["hast-util-parse-selector@4.0.0", "", { "dependencies": { "@types/hast": "^3.0.0" } }, "sha512-wkQCkSYoOGCRKERFWcxMVMOcYE2K1AaNLU8DXS9arxnLOUEWbOXKXiJUNzEpqZ3JOKpnha3jkFrumEjVliDe7A=="], + + "hast-util-to-estree": ["hast-util-to-estree@3.1.3", "", { "dependencies": { "@types/estree": "^1.0.0", "@types/estree-jsx": "^1.0.0", "@types/hast": "^3.0.0", "comma-separated-tokens": "^2.0.0", "devlop": "^1.0.0", "estree-util-attach-comments": "^3.0.0", "estree-util-is-identifier-name": "^3.0.0", "hast-util-whitespace": "^3.0.0", "mdast-util-mdx-expression": "^2.0.0", "mdast-util-mdx-jsx": "^3.0.0", "mdast-util-mdxjs-esm": "^2.0.0", "property-information": "^7.0.0", "space-separated-tokens": "^2.0.0", "style-to-js": "^1.0.0", "unist-util-position": "^5.0.0", "zwitch": "^2.0.0" } }, "sha512-48+B/rJWAp0jamNbAAf9M7Uf//UVqAoMmgXhBdxTDJLGKY+LRnZ99qcG+Qjl5HfMpYNzS5v4EAwVEF34LeAj7w=="], + + "hast-util-to-html": ["hast-util-to-html@9.0.6", "", { "dependencies": { "@types/hast": "^3.0.0", "@types/unist": "^3.0.0", "ccount": "^2.0.0", "comma-separated-tokens": "^2.0.0", "hast-util-whitespace": "^3.0.0", "html-void-elements": "^3.0.0", "mdast-util-to-hast": "^13.0.0", "property-information": "^7.0.0", "space-separated-tokens": "^2.0.0", "stringify-entities": "^4.0.0", "zwitch": "^2.0.4" } }, "sha512-1SZUxCN3TtJAE7e2BQN2MBHsoZ1gnmi9GoCP5Di59CSWptIezSAW09yDZyVbanb78V9eCwrKqdQsjtfVTxYHWA=="], + + "hast-util-to-jsx-runtime": ["hast-util-to-jsx-runtime@2.3.7", "", { "dependencies": { "@types/estree": "^1.0.0", "@types/hast": "^3.0.0", "@types/unist": "^3.0.0", "comma-separated-tokens": "^2.0.0", "devlop": "^1.0.0", "estree-util-is-identifier-name": "^3.0.0", "hast-util-whitespace": "^3.0.0", "mdast-util-mdx-expression": "^2.0.0", "mdast-util-mdx-jsx": "^3.0.0", "mdast-util-mdxjs-esm": "^2.0.0", "property-information": "^7.0.0", "space-separated-tokens": "^2.0.0", "style-to-object": "^2.0.0", "unist-util-position": "^5.0.0", "vfile-message": "^4.0.0" } }, "sha512-F7DNV2NMcTxA4GqPVHnXzX+mpoPHAIY9rJAVH3CZ1FdBZOcBUEjUuvMkMpHVs/sicEtznh9tMGj5WUR9S4E2rg=="], + + "hast-util-whitespace": ["hast-util-whitespace@3.0.0", "", { "dependencies": { "@types/hast": "^3.0.0" } }, "sha512-88JUN06ipLwsnv+dVn+OIYOvAuvBMy/Qoi6O7mQHxdPXpjy+Cd6xRkWwux7DKO+4sYILtLBRIKgsdpS2gQc7qw=="], + + "hastscript": ["hastscript@9.0.3", "", { "dependencies": { "@types/hast": "^3.0.0", "comma-separated-tokens": "^2.0.0", "hast-util-parse-selector": "^4.0.0", "property-information": "^7.0.0", "space-separated-tokens": "^2.0.0" } }, "sha512-1ALZXSmCGmW3h8AMz4R4+QKSKFi7sNgXLVwmwB8FYVtl1CwQ3WDkSAEY/d5tp1g/vbQgq2s1WlHgfO3jbw1TsA=="], + "highlight.js": ["highlight.js@10.7.3", "", {}, "sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A=="], "hookable": ["hookable@6.1.2", "", {}, "sha512-+abwxtiEA52GCVIsQqut3S/uKTbUwYIp4Pe/vv+6py5XiXBCqMZHg6pA6Y5qhgLSEys0/cYuPbO0z1QFj5ZCmg=="], "hosted-git-info": ["hosted-git-info@10.1.1", "", { "dependencies": { "lru-cache": "^11.1.0" } }, "sha512-DeOnSPAvOndYKfw075gt8yZzQ7S2hNztw34zBTfhIzLhmBTswIBg5/y+pqu/VD5cYWm5goAFTusDmUEmKZ0PEQ=="], + "html-void-elements": ["html-void-elements@3.0.0", "", {}, "sha512-bEqo66MRXsUGxWHV5IP0PUiAWwoEjba4VCzg0LjFJBpchPaTfyfCKTG6bc5F8ucKec3q5y6qOdGyYTSBEvhCrg=="], + "htmlparser2": ["htmlparser2@12.0.0", "", { "dependencies": { "domelementtype": "^3.0.0", "domhandler": "^6.0.0", "domutils": "^4.0.2", "entities": "^8.0.0" } }, "sha512-Tz7u1i95/g2x2jz81+x0FBVhBhY5aRTvD3tXXdFaljuNdzDLJ8UGNRrTcj2cgQvAg3iW/h77Fz15nLW0L0CrZw=="], "https-proxy-agent": ["https-proxy-agent@9.1.0", "", { "dependencies": { "agent-base": "9.0.0", "debug": "^4.3.4", "proxy-agent-negotiate": "1.1.0" } }, "sha512-ag87y7cJJ9/3+GxFr8Oy4O5faDsGRGnBGsJj/YjOSsSx/5eadKLYTMPlzuR6obgoCDDm0abAAZitXXQkMOPSpA=="], @@ -1043,16 +1444,34 @@ "import-without-cache": ["import-without-cache@0.4.1", "", {}, "sha512-vXoV9PjKHEednCUu01e98TkImxy67e3BJXbTIOmIq4Hyzw3IAwYRcuPkfeTzJzwyyts4kjuA73x+pWJLc4f86A=="], + "ini": ["ini@1.3.8", "", {}, "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew=="], + + "inline-style-parser": ["inline-style-parser@0.2.7", "", {}, "sha512-Nb2ctOyNR8DqQoR0OwRG95uNWIC0C1lCgf5Naz5H6Ji72KZ8OcFZLz2P5sNgwlyoJ8Yif11oMuYs5pBQa86csA=="], + + "internmap": ["internmap@1.0.1", "", {}, "sha512-lDB5YccMydFBtasVtxnZ3MRBHuaoE8GKsppq+EchKL2U4nK/DmEpPHNH8MZe5HkMtpSiTSOZwfN0tzYjO/lJEw=="], + + "is-alphabetical": ["is-alphabetical@2.0.1", "", {}, "sha512-FWyyY60MeTNyeSRpkM2Iry0G9hpr7/9kD40mD/cGQEuilcZYS4okz8SN2Q6rLCJ8gbCt6fN+rC+6tMGS99LaxQ=="], + + "is-alphanumerical": ["is-alphanumerical@2.0.1", "", { "dependencies": { "is-alphabetical": "^2.0.0", "is-decimal": "^2.0.0" } }, "sha512-hmbYhX/9MUMF5uh7tOXyK/n0ZvWpad5caBA17GsC6vyuCqaWliRG5K1qS9inmUhEMaOBIW7/whAnSwveW/LtZw=="], + + "is-decimal": ["is-decimal@2.0.1", "", {}, "sha512-AAB9hiomQs5DXWcRB1rqsxGUstbRroFOPPVAomNk/3XHR5JyEZChOyTWe2oayKnsSsr/kcGqF+z6yuH6HHpN0A=="], + "is-extglob": ["is-extglob@2.1.1", "", {}, "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ=="], "is-fullwidth-code-point": ["is-fullwidth-code-point@3.0.0", "", {}, "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg=="], "is-glob": ["is-glob@4.0.3", "", { "dependencies": { "is-extglob": "^2.1.1" } }, "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg=="], + "is-hexadecimal": ["is-hexadecimal@2.0.1", "", {}, "sha512-DgZQp241c8oO6cA1SbTEWiXeoxV42vlcJxgH+B3hi1AiqqKruZR3ZGF8In3fj4+/y/7rHvlOZLZtgJ/4ttYGZg=="], + "is-interactive": ["is-interactive@2.0.0", "", {}, "sha512-qP1vozQRI+BMOPcjFzrjXuQvdak2pHNUMZoeG2eRbiSqyvbEf/wQtEOTOX1guk6E3t36RkaqiSt8A/6YElNxLQ=="], "is-number": ["is-number@7.0.0", "", {}, "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng=="], + "is-plain-obj": ["is-plain-obj@4.1.0", "", {}, "sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg=="], + + "is-port-reachable": ["is-port-reachable@4.0.0", "", {}, "sha512-9UoipoxYmSk6Xy7QFgRv2HDyaysmgSG75TFQs6S+3pDM7ZhKTF/bskZV+0UlABHzKjNVhPjYCLfeZUEg1wXxig=="], + "is-reference": ["is-reference@3.0.3", "", { "dependencies": { "@types/estree": "^1.0.6" } }, "sha512-ixkJoqQvAP88E6wLydLGGqCJsrFUnqoH6HnaczB8XmDH1oaWU+xxdptvikTgaEhtZ53Ky6YXiBuUI2WXLMCwjw=="], "is-subdir": ["is-subdir@1.2.0", "", { "dependencies": { "better-path-resolve": "1.0.0" } }, "sha512-2AT6j+gXe/1ueqbW6fLZJiIw3F8iXGJtt0yDrZaBhAZEG1raiTxKWU+IPqMCzQAXOUCKdA4UDMgacKH25XG2Cw=="], @@ -1081,6 +1500,12 @@ "jsonfile": ["jsonfile@4.0.0", "", { "optionalDependencies": { "graceful-fs": "^4.1.6" } }, "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg=="], + "katex": ["katex@0.18.10", "", { "dependencies": { "commander": "^15.0.0" }, "bin": { "katex": "cli.js" } }, "sha512-/B6p9eY9DX7aHBfpkHdpirDTZ5QH9xTwL9y837PWuzuv41O5jFdqNQwVQEQsimY0/iVNkwBY4+4hMfhQ7d4Dbw=="], + + "khroma": ["khroma@2.1.0", "", {}, "sha512-Ls993zuzfayK269Svk9hzpeGUKob/sIgZzyHYdjQoAdQetRKpOLj+k/QQQ/6Qi0Yz65mlROrfd+Ev+1+7dz9Kw=="], + + "layout-base": ["layout-base@1.0.2", "", {}, "sha512-8h2oVEZNktL4BH2JCOI90iD1yXwL6iNW7KcCKT2QZgQJR2vbqDsldCTPRU9NifTCqHZci57XvQQ15YTu+sTYPg=="], + "lightningcss": ["lightningcss@1.33.0", "", { "dependencies": { "detect-libc": "^2.0.3" }, "optionalDependencies": { "lightningcss-android-arm64": "1.33.0", "lightningcss-darwin-arm64": "1.33.0", "lightningcss-darwin-x64": "1.33.0", "lightningcss-freebsd-x64": "1.33.0", "lightningcss-linux-arm-gnueabihf": "1.33.0", "lightningcss-linux-arm64-gnu": "1.33.0", "lightningcss-linux-arm64-musl": "1.33.0", "lightningcss-linux-x64-gnu": "1.33.0", "lightningcss-linux-x64-musl": "1.33.0", "lightningcss-win32-arm64-msvc": "1.33.0", "lightningcss-win32-x64-msvc": "1.33.0" } }, "sha512-WkUDrojuJs0xkgGf2udWxa3yGBRxPtxUkB79i6aCZLRgc7PM8fZe9TosfPDcvEpQZbuFASnHYmRLBLUbmLOIIA=="], "lightningcss-android-arm64": ["lightningcss-android-arm64@1.33.0", "", { "os": "android", "cpu": "arm64" }, "sha512-gEpRTalKdosp4Bb8qWtc2iOgE5SeIHlpS1up9bFq2wAyYhl1UdTObYiHe98zEM9SQvSoqQZ1IQD0JNpg3Ml5pg=="], @@ -1113,28 +1538,158 @@ "locate-path": ["locate-path@5.0.0", "", { "dependencies": { "p-locate": "^4.1.0" } }, "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g=="], + "lodash-es": ["lodash-es@4.18.1", "", {}, "sha512-J8xewKD/Gk22OZbhpOVSwcs60zhd95ESDwezOFuA3/099925PdHJ7OFHNTGtajL3AlZkykD32HykiMo+BIBI8A=="], + "lodash.startcase": ["lodash.startcase@4.4.0", "", {}, "sha512-+WKqsK294HMSc2jEbNgpHpd0JfIBhp7rEV4aqXWqFr6AlXov+SlcgB1Fv01y2kGe3Gc8nMW7VA0SrGuSkRfIEg=="], "log-symbols": ["log-symbols@7.0.1", "", { "dependencies": { "is-unicode-supported": "^2.0.0", "yoctocolors": "^2.1.1" } }, "sha512-ja1E3yCr9i/0hmBVaM0bfwDjnGy8I/s6PP4DFp+yP+a+mrHO4Rm7DtmnqROTUkHIkqffC84YY7AeqX6oFk0WFg=="], "log-update": ["log-update@8.0.0", "", { "dependencies": { "ansi-escapes": "^7.3.0", "cli-cursor": "^5.0.0", "slice-ansi": "^9.0.0", "string-width": "^8.2.0", "strip-ansi": "^7.2.0", "wrap-ansi": "^10.0.0" } }, "sha512-lddSgOt3bPASrylL54ZSpy8nBHns+vBVSoILlVOx+dei300pnLRN958rj/EdlVLKuWlSESU3qdnDZdAI7FXYGg=="], + "longest-streak": ["longest-streak@3.1.0", "", {}, "sha512-9Ri+o0JYgehTaVBBDoMqIl8GXtbWg711O3srftcHhZ0dqnETqLaoIK0x17fUw9rFSlK/0NlsKe0Ahhyl5pXE2g=="], + "lru-cache": ["lru-cache@11.5.3", "", {}, "sha512-U4N8FgzmWxc8k1VH8Kr6lQg18U7Fjvby6wXHVRX/ZZ7IwWbRMgrRbP0Wrb5q5NVinryp4SQampHKdvtecItxUg=="], + "lucide-react": ["lucide-react@1.74.0", "", { "peerDependencies": { "@types/react": "*", "react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0" }, "optionalPeers": ["@types/react"] }, "sha512-A1doIs/1fj1WnPbtIT7WRiM6Kvw5NUg+BtkoOh3Shpr4obwSDVt6WxCEcNH56EWprzuCoKle1OF0RqIkojwL1A=="], + "magic-string": ["magic-string@0.30.21", "", { "dependencies": { "@jridgewell/sourcemap-codec": "^1.5.5" } }, "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ=="], + "markdown-extensions": ["markdown-extensions@2.0.0", "", {}, "sha512-o5vL7aDWatOTX8LzaS1WMoaoxIiLRQJuIKKe2wAw6IeULDHaqbiqiggmx+pKvZDb1Sj+pE46Sn1T7lCqfFtg1Q=="], + + "markdown-table": ["markdown-table@3.1.0", "", {}, "sha512-xpeSCdM+B+6P3ncfgaB7FoDbtJ30xAe6Z18TGT7AgXJsHqCElCICZovQqdRMm7kHgpTyYv36EupqewoFFSB8vw=="], + "marked": ["marked@9.1.6", "", { "bin": { "marked": "bin/marked.js" } }, "sha512-jcByLnIFkd5gSXZmjNvS1TlmRhCXZjIzHYlaGkPlLIekG55JDR2Z4va9tZwCiP+/RDERiNhMOFu01xd6O5ct1Q=="], "marked-terminal": ["marked-terminal@7.3.1", "", { "dependencies": { "ansi-escapes": "^7.3.0", "ansi-regex": "^6.4.0", "chalk": "^5.6.2", "cli-highlight": "^2.1.11", "cli-table3": "^0.6.5", "node-emoji": "^2.2.0", "supports-hyperlinks": "^3.2.0" }, "peerDependencies": { "marked": ">=1 <19" } }, "sha512-B1eKs5mRiacjHHMlex1zn0zkVomz2/KWjD/dyA8WRQTXk2d15OzVjiK/iuPfvDFB27Gvr8p/u6MYgU0NY/O45w=="], + "mdast-util-find-and-replace": ["mdast-util-find-and-replace@3.0.4", "", { "dependencies": { "@types/mdast": "^4.0.0", "escape-string-regexp": "^5.0.0", "unist-util-is": "^6.0.0", "unist-util-visit-parents": "^6.1.0" } }, "sha512-z4B5c6jrnJ1ltOQemhWYPBSAo6y42Z8Gt2yEgfgNTMcLSU59B8bfj8Z8AnAlJrBGLnqkdAUZ7jdDEqQw3KuipQ=="], + + "mdast-util-from-markdown": ["mdast-util-from-markdown@2.1.0", "", { "dependencies": { "@types/mdast": "^4.0.0", "@types/unist": "^3.0.0", "decode-named-character-reference": "^1.0.0", "devlop": "^1.0.0", "mdast-util-to-string": "^4.0.0", "micromark": "^4.0.0", "micromark-util-decode-numeric-character-reference": "^2.0.0", "micromark-util-decode-string": "^2.0.0", "micromark-util-normalize-identifier": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0", "unist-util-stringify-position": "^4.0.0" } }, "sha512-KRLgmPaP2H1ul2bpoJkOS+9pAcDAAj9Nu1mqLnh8NLeJG5tlvj42TH80PIGBpROWlRXLk0lDrWNuZCFy/tsB4A=="], + + "mdast-util-gfm": ["mdast-util-gfm@3.1.0", "", { "dependencies": { "mdast-util-from-markdown": "^2.0.0", "mdast-util-gfm-autolink-literal": "^2.0.0", "mdast-util-gfm-footnote": "^2.0.0", "mdast-util-gfm-strikethrough": "^2.0.0", "mdast-util-gfm-table": "^2.0.0", "mdast-util-gfm-task-list-item": "^2.0.0", "mdast-util-to-markdown": "^2.0.0" } }, "sha512-0ulfdQOM3ysHhCJ1p06l0b0VKlhU0wuQs3thxZQagjcjPrlFRqY215uZGHHJan9GEAXd9MbfPjFJz+qMkVR6zQ=="], + + "mdast-util-gfm-autolink-literal": ["mdast-util-gfm-autolink-literal@2.1.0", "", { "dependencies": { "@types/mdast": "^4.0.0", "ccount": "^2.0.0", "devlop": "^1.0.0", "mdast-util-find-and-replace": "^3.0.0", "micromark-util-character": "^2.0.0" } }, "sha512-Jx6QSK8wDo558Bcf7q+1pe0v81g2PVs09Hlvu9xJHmCFRF3sAPW7vXFVIAwBncs3sde92WbsVqNxwdqViA2XnQ=="], + + "mdast-util-gfm-footnote": ["mdast-util-gfm-footnote@2.1.0", "", { "dependencies": { "@types/mdast": "^4.0.0", "devlop": "^1.1.0", "mdast-util-from-markdown": "^2.0.0", "mdast-util-to-markdown": "^2.0.0", "micromark-util-normalize-identifier": "^2.0.0" } }, "sha512-sqpDWlsHn7Ac9GNZQMeUzPQSMzR6Wv0WKRNvQRg0KqHh02fpTz69Qc1QSseNX29bhz1ROIyNyxExfawVKTm1GQ=="], + + "mdast-util-gfm-strikethrough": ["mdast-util-gfm-strikethrough@2.0.1", "", { "dependencies": { "@types/mdast": "^4.0.0", "mdast-util-from-markdown": "^2.0.0", "mdast-util-to-markdown": "^2.0.0" } }, "sha512-OuJHqvr455pwu2OaOrir7dbzqs4jlWKOtlu9L6GjcIjjQwNyw02VntQsr/Ek6/A13vgnXfUhBekWRUP1OkNivw=="], + + "mdast-util-gfm-table": ["mdast-util-gfm-table@2.0.1", "", { "dependencies": { "@types/mdast": "^4.0.0", "devlop": "^1.0.0", "markdown-table": "^3.0.0", "mdast-util-from-markdown": "^2.0.0", "mdast-util-to-markdown": "^2.0.0", "mdast-util-to-string": "^4.0.0", "unist-util-visit": "^5.0.0" } }, "sha512-fiIjPrAy4kz68/eFbPHhsiWDGHhqUSVoU1XsfLM5DsEPXw7MxgiVVyulUggFRckVWeT1KXQXkg5vm3kv4oMSOA=="], + + "mdast-util-gfm-task-list-item": ["mdast-util-gfm-task-list-item@2.0.1", "", { "dependencies": { "@types/mdast": "^4.0.0", "devlop": "^1.0.0", "mdast-util-from-markdown": "^2.0.0", "mdast-util-to-markdown": "^2.0.0" } }, "sha512-jXVO1hvB2hs82g1esi7I9nIJDqiijbQLIyH2jDUb5s7jIAZMr/79h0VHSq7XHKTqpLARRm+DDNjduB7S9+6XZA=="], + + "mdast-util-mdx": ["mdast-util-mdx@3.0.0", "", { "dependencies": { "mdast-util-from-markdown": "^2.0.0", "mdast-util-mdx-expression": "^2.0.0", "mdast-util-mdx-jsx": "^3.0.0", "mdast-util-mdxjs-esm": "^2.0.0", "mdast-util-to-markdown": "^2.0.0" } }, "sha512-JfbYLAW7XnYTTbUsmpu0kdBUVe+yKVJZBItEjwyYJiDJuZ9w4eeaqks4HQO+R7objWgS2ymV60GYpI14Ug554w=="], + + "mdast-util-mdx-expression": ["mdast-util-mdx-expression@2.0.1", "", { "dependencies": { "@types/estree-jsx": "^1.0.0", "@types/hast": "^3.0.0", "@types/mdast": "^4.0.0", "devlop": "^1.0.0", "mdast-util-from-markdown": "^2.0.0", "mdast-util-to-markdown": "^2.0.0" } }, "sha512-J6f+9hUp+ldTZqKRSg7Vw5V6MqjATc+3E4gf3CFNcuZNWD8XdyI6zQ8GqH7f8169MM6P7hMBRDVGnn7oHB9kXQ=="], + + "mdast-util-mdx-jsx": ["mdast-util-mdx-jsx@3.2.1", "", { "dependencies": { "@types/estree-jsx": "^1.0.0", "@types/hast": "^3.0.0", "@types/mdast": "^4.0.0", "@types/unist": "^3.0.0", "ccount": "^2.0.0", "devlop": "^1.1.0", "mdast-util-from-markdown": "^2.0.0", "mdast-util-to-markdown": "^2.0.0", "parse-entities": "^4.0.0", "stringify-entities": "^4.0.0", "unist-util-stringify-position": "^4.0.0", "vfile-message": "^4.0.0" } }, "sha512-oXp1GIa+E9IwIs3a106+tr3Bz2MlTTBvlXjOZMoIat11kk7vjqgmBnksB9WHmWv+gZh7k3IUgpAHlwHB7DH4GQ=="], + + "mdast-util-mdxjs-esm": ["mdast-util-mdxjs-esm@2.0.1", "", { "dependencies": { "@types/estree-jsx": "^1.0.0", "@types/hast": "^3.0.0", "@types/mdast": "^4.0.0", "devlop": "^1.0.0", "mdast-util-from-markdown": "^2.0.0", "mdast-util-to-markdown": "^2.0.0" } }, "sha512-EcmOpxsZ96CvlP03NghtH1EsLtr0n9Tm4lPUJUBccV9RwUOneqSycg19n5HGzCf+10LozMRSObtVr3ee1WoHtg=="], + + "mdast-util-phrasing": ["mdast-util-phrasing@4.1.0", "", { "dependencies": { "@types/mdast": "^4.0.0", "unist-util-is": "^6.0.0" } }, "sha512-TqICwyvJJpBwvGAMZjj4J2n0X8QWp21b9l0o7eXyVJ25YNWYbJDVIyD1bZXE6WtV6RmKJVYmQAKWa0zWOABz2w=="], + + "mdast-util-to-hast": ["mdast-util-to-hast@13.2.2", "", { "dependencies": { "@types/hast": "^3.0.0", "@types/mdast": "^4.0.0", "@ungap/structured-clone": "^1.0.0", "devlop": "^1.0.0", "micromark-util-sanitize-uri": "^2.0.0", "trim-lines": "^3.0.0", "unist-util-position": "^5.0.0", "unist-util-visit": "^5.0.0", "vfile": "^6.0.0" } }, "sha512-l2pnmOuqs+SGLVpTVXnRLQu5v1AzvDe181404fbXzzqObVxrAnnVxapAP27pUwzLBL/ABIkgUhGlPVU7QSvIFg=="], + + "mdast-util-to-markdown": ["mdast-util-to-markdown@2.2.3", "", { "dependencies": { "@types/mdast": "^4.0.0", "@types/unist": "^3.0.0", "longest-streak": "^3.0.0", "mdast-util-phrasing": "^4.0.0", "mdast-util-to-string": "^4.0.0", "micromark-util-character": "^2.0.0", "micromark-util-classify-character": "^2.0.0", "micromark-util-decode-string": "^2.0.0", "micromark-util-html-tag-name": "^2.0.0", "unist-util-visit": "^5.0.0", "zwitch": "^2.0.0" } }, "sha512-dImdB6VZRMRac1SwAW6o1c0ESk/7pFFAMCMuKM+9v7LpTSthMM5nzXpqKw4Mjo66aXVKhNkyrP4bMB9MurPyWg=="], + + "mdast-util-to-string": ["mdast-util-to-string@4.0.0", "", { "dependencies": { "@types/mdast": "^4.0.0" } }, "sha512-0H44vDimn51F0YwvxSJSm0eCDOJTRlmN0R1yBh4HLj9wiV1Dn0QoXGbvFAWj2hSItVTlCmBF1hqKlIyUBVFLPg=="], + "merge-anything": ["merge-anything@5.1.7", "", { "dependencies": { "is-what": "^4.1.8" } }, "sha512-eRtbOb1N5iyH0tkQDAoQ4Ipsp/5qSR79Dzrz8hEPxRX10RWWR/iQXdoKmBSRCThY1Fh5EhISDtpSc93fpxUniQ=="], "merge2": ["merge2@1.4.1", "", {}, "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg=="], + "mermaid": ["mermaid@12.3.0", "", { "dependencies": { "@braintree/sanitize-url": "^7.1.2", "@iconify/utils": "^3.0.2", "@mermaid-js/parser": "^2.0.1", "@types/d3": "^7.4.3", "@upsetjs/venn.js": "^2.0.0", "chevrotain": "~13.2.0", "cytoscape": "^3.34.0", "cytoscape-cose-bilkent": "^4.1.0", "cytoscape-fcose": "^2.2.0", "d3": "^7.9.0", "d3-sankey": "^0.12.3", "dagre-d3-es": "7.0.14", "dayjs": "^1.11.21", "dompurify": "^3.4.17", "elkjs": "^0.12.0", "es-toolkit": "^1.45.1", "katex": "^0.18.0", "khroma": "^2.1.0", "marked": "^16.3.0", "roughjs": "^4.6.6", "stylis": "^4.3.6", "ts-dedent": "^2.2.0" } }, "sha512-4113TdXeLAsMruJ79OpFL5O8+LTFXhQqZ260rF3tgUmiNAtRm4Uume04I+65PRN6yZ69J4f8rVYWW8zRk65UYw=="], + + "micromark": ["micromark@4.0.3", "", { "dependencies": { "@types/debug": "^4.0.0", "debug": "^4.0.0", "decode-named-character-reference": "^1.0.0", "devlop": "^1.0.0", "micromark-core-commonmark": "^2.0.0", "micromark-factory-space": "^2.0.0", "micromark-util-character": "^2.0.0", "micromark-util-chunked": "^2.0.0", "micromark-util-combine-extensions": "^2.0.0", "micromark-util-decode-numeric-character-reference": "^2.0.0", "micromark-util-edit-map": "^1.0.0", "micromark-util-encode": "^2.0.0", "micromark-util-normalize-identifier": "^2.0.0", "micromark-util-resolve-all": "^2.0.0", "micromark-util-sanitize-uri": "^2.0.0", "micromark-util-subtokenize": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-oGYfQzHSG5dOMovQcJ3fyTmZlWAWpi0XA0sJwJs+i6OT88o1+Jtw/8z0CmdowSLxGhhFK89rQ/oXph/wN02PNw=="], + + "micromark-core-commonmark": ["micromark-core-commonmark@2.0.4", "", { "dependencies": { "decode-named-character-reference": "^1.0.0", "devlop": "^1.0.0", "micromark-factory-destination": "^2.0.0", "micromark-factory-label": "^2.0.0", "micromark-factory-space": "^2.1.0", "micromark-factory-title": "^2.0.0", "micromark-factory-whitespace": "^2.0.0", "micromark-util-character": "^2.0.0", "micromark-util-chunked": "^2.0.0", "micromark-util-classify-character": "^2.0.0", "micromark-util-edit-map": "^1.0.0", "micromark-util-html-tag-name": "^2.0.0", "micromark-util-normalize-identifier": "^2.0.0", "micromark-util-resolve-all": "^2.0.0", "micromark-util-subtokenize": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.3" } }, "sha512-wxEeE8v8XVvOrxn1TZj74qYhAtTQsSqufHVS3uNVyT1MupXxhyaHk8/9xDNPh9BmL77QNDgWTkZ3RsYHB2ry7w=="], + + "micromark-extension-gfm": ["micromark-extension-gfm@3.0.0", "", { "dependencies": { "micromark-extension-gfm-autolink-literal": "^2.0.0", "micromark-extension-gfm-footnote": "^2.0.0", "micromark-extension-gfm-strikethrough": "^2.0.0", "micromark-extension-gfm-table": "^2.0.0", "micromark-extension-gfm-tagfilter": "^2.0.0", "micromark-extension-gfm-task-list-item": "^2.0.0", "micromark-util-combine-extensions": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-vsKArQsicm7t0z2GugkCKtZehqUm31oeGBV/KVSorWSy8ZlNAv7ytjFhvaryUiCUJYqs+NoE6AFhpQvBTM6Q4w=="], + + "micromark-extension-gfm-autolink-literal": ["micromark-extension-gfm-autolink-literal@2.1.0", "", { "dependencies": { "micromark-util-character": "^2.0.0", "micromark-util-sanitize-uri": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-oOg7knzhicgQ3t4QCjCWgTmfNhvQbDDnJeVu9v81r7NltNCVmhPy1fJRX27pISafdjL+SVc4d3l48Gb6pbRypw=="], + + "micromark-extension-gfm-footnote": ["micromark-extension-gfm-footnote@2.1.0", "", { "dependencies": { "devlop": "^1.0.0", "micromark-core-commonmark": "^2.0.0", "micromark-factory-space": "^2.0.0", "micromark-util-character": "^2.0.0", "micromark-util-normalize-identifier": "^2.0.0", "micromark-util-sanitize-uri": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-/yPhxI1ntnDNsiHtzLKYnE3vf9JZ6cAisqVDauhp4CEHxlb4uoOTxOCJ+9s51bIB8U1N1FJ1RXOKTIlD5B/gqw=="], + + "micromark-extension-gfm-strikethrough": ["micromark-extension-gfm-strikethrough@2.1.0", "", { "dependencies": { "devlop": "^1.0.0", "micromark-util-chunked": "^2.0.0", "micromark-util-classify-character": "^2.0.0", "micromark-util-resolve-all": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-ADVjpOOkjz1hhkZLlBiYA9cR2Anf8F4HqZUO6e5eDcPQd0Txw5fxLzzxnEkSkfnD0wziSGiv7sYhk/ktvbf1uw=="], + + "micromark-extension-gfm-table": ["micromark-extension-gfm-table@2.1.2", "", { "dependencies": { "devlop": "^1.0.0", "micromark-factory-space": "^2.0.0", "micromark-util-character": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-pRzm4kDTu0MjlmBkxmS9yYhw60nncfcEwu9NNdPFSQEFXS95ZKyIIyTSHu/o3ReBUrLKYEq+7YaXCRn/bPB4MA=="], + + "micromark-extension-gfm-tagfilter": ["micromark-extension-gfm-tagfilter@2.0.0", "", { "dependencies": { "micromark-util-types": "^2.0.0" } }, "sha512-xHlTOmuCSotIA8TW1mDIM6X2O1SiX5P9IuDtqGonFhEK0qgRI4yeC6vMxEV2dgyr2TiD+2PQ10o+cOhdVAcwfg=="], + + "micromark-extension-gfm-task-list-item": ["micromark-extension-gfm-task-list-item@2.1.0", "", { "dependencies": { "devlop": "^1.0.0", "micromark-factory-space": "^2.0.0", "micromark-util-character": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-qIBZhqxqI6fjLDYFTBIa4eivDMnP+OZqsNwmQ3xNLE4Cxwc+zfQEfbs6tzAo2Hjq+bh6q5F+Z8/cksrLFYWQQw=="], + + "micromark-extension-mdx-expression": ["micromark-extension-mdx-expression@3.0.1", "", { "dependencies": { "@types/estree": "^1.0.0", "devlop": "^1.0.0", "micromark-factory-mdx-expression": "^2.0.0", "micromark-factory-space": "^2.0.0", "micromark-util-character": "^2.0.0", "micromark-util-events-to-acorn": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-dD/ADLJ1AeMvSAKBwO22zG22N4ybhe7kFIZ3LsDI0GlsNr2A3KYxb0LdC1u5rj4Nw+CHKY0RVdnHX8vj8ejm4Q=="], + + "micromark-extension-mdx-jsx": ["micromark-extension-mdx-jsx@3.0.2", "", { "dependencies": { "@types/estree": "^1.0.0", "devlop": "^1.0.0", "estree-util-is-identifier-name": "^3.0.0", "micromark-factory-mdx-expression": "^2.0.0", "micromark-factory-space": "^2.0.0", "micromark-util-character": "^2.0.0", "micromark-util-events-to-acorn": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0", "vfile-message": "^4.0.0" } }, "sha512-e5+q1DjMh62LZAJOnDraSSbDMvGJ8x3cbjygy2qFEi7HCeUT4BDKCvMozPozcD6WmOt6sVvYDNBKhFSz3kjOVQ=="], + + "micromark-extension-mdx-md": ["micromark-extension-mdx-md@2.0.0", "", { "dependencies": { "micromark-util-types": "^2.0.0" } }, "sha512-EpAiszsB3blw4Rpba7xTOUptcFeBFi+6PY8VnJ2hhimH+vCQDirWgsMpz7w1XcZE7LVrSAUGb9VJpG9ghlYvYQ=="], + + "micromark-extension-mdxjs": ["micromark-extension-mdxjs@3.0.0", "", { "dependencies": { "acorn": "^8.0.0", "acorn-jsx": "^5.0.0", "micromark-extension-mdx-expression": "^3.0.0", "micromark-extension-mdx-jsx": "^3.0.0", "micromark-extension-mdx-md": "^2.0.0", "micromark-extension-mdxjs-esm": "^3.0.0", "micromark-util-combine-extensions": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-A873fJfhnJ2siZyUrJ31l34Uqwy4xIFmvPY1oj+Ean5PHcPBYzEsvqvWGaWcfEIr11O5Dlw3p2y0tZWpKHDejQ=="], + + "micromark-extension-mdxjs-esm": ["micromark-extension-mdxjs-esm@3.0.0", "", { "dependencies": { "@types/estree": "^1.0.0", "devlop": "^1.0.0", "micromark-core-commonmark": "^2.0.0", "micromark-util-character": "^2.0.0", "micromark-util-events-to-acorn": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0", "unist-util-position-from-estree": "^2.0.0", "vfile-message": "^4.0.0" } }, "sha512-DJFl4ZqkErRpq/dAPyeWp15tGrcrrJho1hKK5uBS70BCtfrIFg81sqcTVu3Ta+KD1Tk5vAtBNElWxtAa+m8K9A=="], + + "micromark-factory-destination": ["micromark-factory-destination@2.0.1", "", { "dependencies": { "micromark-util-character": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-Xe6rDdJlkmbFRExpTOmRj9N3MaWmbAgdpSrBQvCFqhezUn4AHqJHbaEnfbVYYiexVSs//tqOdY/DxhjdCiJnIA=="], + + "micromark-factory-label": ["micromark-factory-label@2.0.1", "", { "dependencies": { "devlop": "^1.0.0", "micromark-util-character": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-VFMekyQExqIW7xIChcXn4ok29YE3rnuyveW3wZQWWqF4Nv9Wk5rgJ99KzPvHjkmPXF93FXIbBp6YdW3t71/7Vg=="], + + "micromark-factory-mdx-expression": ["micromark-factory-mdx-expression@2.0.3", "", { "dependencies": { "@types/estree": "^1.0.0", "devlop": "^1.0.0", "micromark-factory-space": "^2.0.0", "micromark-util-character": "^2.0.0", "micromark-util-events-to-acorn": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0", "unist-util-position-from-estree": "^2.0.0", "vfile-message": "^4.0.0" } }, "sha512-kQnEtA3vzucU2BkrIa8/VaSAsP+EJ3CKOvhMuJgOEGg9KDC6OAY6nSnNDVRiVNRqj7Y4SlSzcStaH/5jge8JdQ=="], + + "micromark-factory-space": ["micromark-factory-space@2.1.0", "", { "dependencies": { "micromark-util-character": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-fS8hnLIjnjvdQIj39Geug8wWsR0HrYZ43KShKxNfwT7t2LOHo/LbWZEzEaSOjwtjdCsjoE6syHhonEzW0zv0+Q=="], + + "micromark-factory-title": ["micromark-factory-title@2.0.1", "", { "dependencies": { "micromark-factory-space": "^2.0.0", "micromark-util-character": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-5bZ+3CjhAd9eChYTHsjy6TGxpOFSKgKKJPJxr293jTbfry2KDoWkhBb6TcPVB4NmzaPhMs1Frm9AZH7OD4Cjzw=="], + + "micromark-factory-whitespace": ["micromark-factory-whitespace@2.0.1", "", { "dependencies": { "micromark-factory-space": "^2.0.0", "micromark-util-character": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-Ob0nuZ3PKt/n0hORHyvoD9uZhr+Za8sFoP+OnMcnWK5lngSzALgQYKMr9RJVOWLqQYuyn6ulqGWSXdwf6F80lQ=="], + + "micromark-util-character": ["micromark-util-character@2.1.1", "", { "dependencies": { "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-wv8tdUTJ3thSFFFJKtpYKOYiGP2+v96Hvk4Tu8KpCAsTMs6yi+nVmGh1syvSCsaxz45J6Jbw+9DD6g97+NV67Q=="], + + "micromark-util-chunked": ["micromark-util-chunked@2.0.1", "", { "dependencies": { "micromark-util-symbol": "^2.0.0" } }, "sha512-QUNFEOPELfmvv+4xiNg2sRYeS/P84pTW0TCgP5zc9FpXetHY0ab7SxKyAQCNCc1eK0459uoLI1y5oO5Vc1dbhA=="], + + "micromark-util-classify-character": ["micromark-util-classify-character@2.0.1", "", { "dependencies": { "micromark-util-character": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-K0kHzM6afW/MbeWYWLjoHQv1sgg2Q9EccHEDzSkxiP/EaagNzCm7T/WMKZ3rjMbvIpvBiZgwR3dKMygtA4mG1Q=="], + + "micromark-util-combine-extensions": ["micromark-util-combine-extensions@2.0.1", "", { "dependencies": { "micromark-util-chunked": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-OnAnH8Ujmy59JcyZw8JSbK9cGpdVY44NKgSM7E9Eh7DiLS2E9RNQf0dONaGDzEG9yjEl5hcqeIsj4hfRkLH/Bg=="], + + "micromark-util-decode-numeric-character-reference": ["micromark-util-decode-numeric-character-reference@2.0.2", "", { "dependencies": { "micromark-util-symbol": "^2.0.0" } }, "sha512-ccUbYk6CwVdkmCQMyr64dXz42EfHGkPQlBj5p7YVGzq8I7CtjXZJrubAYezf7Rp+bjPseiROqe7G6foFd+lEuw=="], + + "micromark-util-decode-string": ["micromark-util-decode-string@2.0.1", "", { "dependencies": { "decode-named-character-reference": "^1.0.0", "micromark-util-character": "^2.0.0", "micromark-util-decode-numeric-character-reference": "^2.0.0", "micromark-util-symbol": "^2.0.0" } }, "sha512-nDV/77Fj6eH1ynwscYTOsbK7rR//Uj0bZXBwJZRfaLEJ1iGBR6kIfNmlNqaqJf649EP0F3NWNdeJi03elllNUQ=="], + + "micromark-util-edit-map": ["micromark-util-edit-map@1.0.0", "", { "dependencies": { "micromark-util-types": "^2.0.0" } }, "sha512-Pa2ljlsEL6sVwFaYeyrOLSYbQt73JvGbPOYFq+9AElXiSnfI5Q4465RRZ1sHv7lDjDOnGRDDaqPXqClqWK/q1Q=="], + + "micromark-util-encode": ["micromark-util-encode@2.0.1", "", {}, "sha512-c3cVx2y4KqUnwopcO9b/SCdo2O67LwJJ/UyqGfbigahfegL9myoEFoDYZgkT7f36T0bLrM9hZTAaAyH+PCAXjw=="], + + "micromark-util-events-to-acorn": ["micromark-util-events-to-acorn@2.0.3", "", { "dependencies": { "@types/estree": "^1.0.0", "@types/unist": "^3.0.0", "devlop": "^1.0.0", "estree-util-visit": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0", "vfile-message": "^4.0.0" } }, "sha512-jmsiEIiZ1n7X1Rr5k8wVExBQCg5jy4UXVADItHmNk1zkwEVhBuIUKRu3fqv+hs4nxLISi2DQGlqIOGiFxgbfHg=="], + + "micromark-util-html-tag-name": ["micromark-util-html-tag-name@2.0.1", "", {}, "sha512-2cNEiYDhCWKI+Gs9T0Tiysk136SnR13hhO8yW6BGNyhOC4qYFnwF1nKfD3HFAIXA5c45RrIG1ub11GiXeYd1xA=="], + + "micromark-util-normalize-identifier": ["micromark-util-normalize-identifier@2.0.1", "", { "dependencies": { "micromark-util-symbol": "^2.0.0" } }, "sha512-sxPqmo70LyARJs0w2UclACPUUEqltCkJ6PhKdMIDuJ3gSf/Q+/GIe3WKl0Ijb/GyH9lOpUkRAO2wp0GVkLvS9Q=="], + + "micromark-util-resolve-all": ["micromark-util-resolve-all@2.0.1", "", { "dependencies": { "micromark-util-types": "^2.0.0" } }, "sha512-VdQyxFWFT2/FGJgwQnJYbe1jjQoNTS4RjglmSjTUlpUMa95Htx9NHeYW4rGDJzbjvCsl9eLjMQwGeElsqmzcHg=="], + + "micromark-util-sanitize-uri": ["micromark-util-sanitize-uri@2.0.1", "", { "dependencies": { "micromark-util-character": "^2.0.0", "micromark-util-encode": "^2.0.0", "micromark-util-symbol": "^2.0.0" } }, "sha512-9N9IomZ/YuGGZZmQec1MbgxtlgougxTodVwDzzEouPKo3qFWvymFHWcnDi2vzV1ff6kas9ucW+o3yzJK9YB1AQ=="], + + "micromark-util-subtokenize": ["micromark-util-subtokenize@2.1.0", "", { "dependencies": { "devlop": "^1.0.0", "micromark-util-chunked": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-XQLu552iSctvnEcgXw6+Sx75GflAPNED1qx7eBJ+wydBb2KCbRZe+NwvIEEMM83uml1+2WSXpBAcp9IUCgCYWA=="], + + "micromark-util-symbol": ["micromark-util-symbol@2.0.1", "", {}, "sha512-vs5t8Apaud9N28kgCrRUdEed4UJ+wWNvicHLPxCa9ENlYuAY31M0ETy5y1vA33YoNPDFTghEbnh6efaE8h4x0Q=="], + + "micromark-util-types": ["micromark-util-types@2.0.3", "", {}, "sha512-oxB2Ik03hI0gv+VNn9tnh1t1YEe9MDPptViAEgfdf3YQHsn0pzGTgCdlSCJXcwhqm8phaEuM7zeEu3QQzVBrPg=="], + "micromatch": ["micromatch@4.0.8", "", { "dependencies": { "braces": "^3.0.3", "picomatch": "^2.3.1" } }, "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA=="], + "mime-db": ["mime-db@1.54.0", "", {}, "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ=="], + + "mime-types": ["mime-types@2.1.18", "", { "dependencies": { "mime-db": "~1.33.0" } }, "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ=="], + "mimic-function": ["mimic-function@5.0.1", "", {}, "sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA=="], + "minimatch": ["minimatch@3.1.5", "", { "dependencies": { "brace-expansion": "^1.1.7" } }, "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w=="], + + "minimist": ["minimist@1.2.8", "", {}, "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA=="], + + "motion": ["motion@14.14.0", "", { "dependencies": { "framer-motion": "14.14.0", "tslib": "^2.4.0" }, "peerDependencies": { "react": "^18.0.0 || ^19.0.0", "react-dom": "^18.0.0 || ^19.0.0", "remix": "^3.1.0" }, "optionalPeers": ["react", "react-dom", "remix"] }, "sha512-a306U6sV5VKq1abtzKiinB+UQjiY88jrsvQzWORP3WPv/DFANyoYVlPbdnmJPMEbusyPXB4GyQJVANaq/pSIYQ=="], + + "motion-dom": ["motion-dom@14.14.0", "", { "dependencies": { "motion-utils": "14.7.0" } }, "sha512-IAxcKhYkuQA2W0Tlx1AvVgImfqEoF3/t3IovbPQJlYkefmGsmrXjn967lMII5VmFmLpQEab4+ZkHo/ijJ4Esig=="], + + "motion-utils": ["motion-utils@14.7.0", "", {}, "sha512-woO0/Nb7ys75f94fjvQi/6leiHGvZUYkeHUPEZ3vxsV+9OpEVhkxp01x8MlRwX0zt31EqgXsKDAoBoJLC148Tw=="], + "mri": ["mri@1.2.0", "", {}, "sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA=="], "mrmime": ["mrmime@2.0.1", "", {}, "sha512-Y3wQdFg2Va6etvQ5I82yUhGdsKrcYox6p7FfL1LbK2J4V01F9TGlepTIhnK24t7koZibmg82KGglhA1XK5IsLQ=="], @@ -1153,8 +1708,12 @@ "nanoid": ["nanoid@3.3.20", "", { "bin": { "nanoid": "bin/nanoid.cjs" } }, "sha512-uKdg2G3GNCKQn9byYOpxbGqrT2fGO5KRt5J/8b3pok8rT6qxGWF6hxMyJiEYtAf+FVyYuD9hRaDqX5uPFYJ4ZQ=="], + "negotiator": ["negotiator@0.6.4", "", {}, "sha512-myRT3DiWPHqho5PrJaIRyaMv2kgYf0mUVgBNOYMuCH5Ki1yEiQaf/ZJuQ62nvpc44wL5WDbTX7yGJi1Neevw8w=="], + "next": ["next@16.4.6", "", { "dependencies": { "@next/env": "16.4.6", "@swc/helpers": "0.5.23", "baseline-browser-mapping": "^2.9.19", "caniuse-lite": "^1.0.30001579", "postcss": "8.5.23", "styled-jsx": "5.1.6" }, "optionalDependencies": { "@next/swc-darwin-arm64": "16.4.6", "@next/swc-darwin-x64": "16.4.6", "@next/swc-linux-arm64-gnu": "16.4.6", "@next/swc-linux-arm64-musl": "16.4.6", "@next/swc-linux-x64-gnu": "16.4.6", "@next/swc-linux-x64-musl": "16.4.6", "@next/swc-win32-arm64-msvc": "16.4.6", "@next/swc-win32-x64-msvc": "16.4.6", "sharp": "^0.35.5" }, "peerDependencies": { "@opentelemetry/api": "^1.1.0", "@playwright/test": "^1.51.1", "babel-plugin-react-compiler": "*", "react": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0", "react-dom": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0", "sass": "^1.3.0" }, "optionalPeers": ["@opentelemetry/api", "@playwright/test", "babel-plugin-react-compiler", "sass"], "bin": { "next": "dist/bin/next" } }, "sha512-QZJiYhaZLJMo2KpkQGQIwvmd79WVsAWeYIU554a8d7zArS3si/IRy3lBNV/rtYhE70oLwdLYhPAXLPx8HwcwtA=="], + "next-themes": ["next-themes@0.4.6", "", { "peerDependencies": { "react": "^16.8 || ^17 || ^18 || ^19 || ^19.0.0-rc", "react-dom": "^16.8 || ^17 || ^18 || ^19 || ^19.0.0-rc" } }, "sha512-pZvgD5L0IEvX5/9GWyHMf3m8BKiVQwsCMHfoFosXtXBMnaS0ZnIJ9ST4b4NqLVKDEm8QBxoNNGNaBv2JNF6XNA=="], + "node-addon-api": ["node-addon-api@6.1.0", "", {}, "sha512-+eawOlIgy680F0kBzPUNFhMZGtJ1YmqM6l4+Crf4IkImjYrO/mqPwRMh352g23uIaQKFItcQ64I7KMaJxHgAVA=="], "node-emoji": ["node-emoji@2.2.0", "", { "dependencies": { "@sindresorhus/is": "^4.6.0", "char-regex": "^1.0.2", "emojilib": "^2.4.0", "skin-tone": "^2.0.0" } }, "sha512-Z3lTE9pLaJF47NyMhd4ww1yFTAP8YhYI8SleJiHzM46Fgpm5cnNzSl9XfzFNqbaz+VlJrIj3fXQ4DeN1Rjm6cw=="], @@ -1167,14 +1726,22 @@ "npm-package-arg": ["npm-package-arg@14.0.0", "", { "dependencies": { "hosted-git-info": "^10.1.0", "proc-log": "^7.0.0", "semver": "^7.3.5", "validate-npm-package-name": "^8.0.0" } }, "sha512-69XQh3k+dtGa1p+7RaR57IuG3rCko96xr/nUfN4yDYBXbTYICiWcOpsFKLN2GtGE9cyIljE+f1exnaYt9MvM+Q=="], + "npm-to-yarn": ["npm-to-yarn@3.2.0", "", {}, "sha512-K1HmQeZT2HrjpsR6KgqbN2FAXL2NrJJmNUSD9ck7HGTVu1JKXox8n9SB+tjbU8m8JGLF4OscrroPepew/L7/Xw=="], + "nth-check": ["nth-check@3.0.1", "", { "dependencies": { "boolbase": "^2.0.0" } }, "sha512-GX0gsdbGVCgnRgbeGaubfjpBXyYRWOOCVeYh08bSQvDZqxz5ndXs1OTfAt/h36G1xvI94YIspsI0sVFqAV9+RQ=="], "object-assign": ["object-assign@4.1.1", "", {}, "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg=="], "obug": ["obug@3.0.0", "", {}, "sha512-5vvB5+W7ePv+p3uqxi+RcW1XAzLW0/hxt3/4X4Lc4qHudzOhmBiBwOY6DRob4WnanAEGvNcLjF+KNOufrUoEQw=="], + "on-headers": ["on-headers@1.1.0", "", {}, "sha512-737ZY3yNnXy37FHkQxPzt4UZ2UWPWiCZWLvFZ4fu5cueciegX0zGPnrlY6bwRg4FdQOe9YU8MkmJwGhoMybl8A=="], + "onetime": ["onetime@7.0.0", "", { "dependencies": { "mimic-function": "^5.0.0" } }, "sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ=="], + "oniguruma-parser": ["oniguruma-parser@0.12.2", "", {}, "sha512-6HVa5oIrgMC6aA6WF6XyyqbhRPJrKR02L20+2+zpDtO5QAzGHAUGw5TKQvwi5vctNnRHkJYmjAhRVQF2EKdTQw=="], + + "oniguruma-to-es": ["oniguruma-to-es@4.3.6", "", { "dependencies": { "oniguruma-parser": "^0.12.2", "regex": "^6.1.0", "regex-recursion": "^6.0.2" } }, "sha512-csuQ9x3Yr0cEIs/Zgx/OEt9iBw9vqIunAPQkx19R/fiMq2oGVTgcMqO/V3Ybqefr1TBvosI6jU539ksaBULJyA=="], + "ora": ["ora@9.4.1", "", { "dependencies": { "chalk": "^5.6.2", "cli-cursor": "^5.0.0", "cli-spinners": "^3.2.0", "is-interactive": "^2.0.0", "is-unicode-supported": "^2.1.0", "log-symbols": "^7.0.1", "stdin-discarder": "^0.3.2", "string-width": "^8.1.0" } }, "sha512-6VlU9MLXbjVQD04AZCMX28hVtA5bUoadvUqO76MUCVA0ilwJbMiHsITRPfyVm6p/BC0Av/BXMujx39WCe1LEqw=="], "ordered-binary": ["ordered-binary@1.6.1", "", {}, "sha512-QkCdPooczexPLiXIrbVOPYkR3VO3T6v2OyKRkR1Xbhpy7/LAVXwahnRCgRp78Oe/Ehf0C/HATAxfSr6eA1oX+w=="], @@ -1195,6 +1762,8 @@ "package-manager-detector": ["package-manager-detector@0.2.11", "", { "dependencies": { "quansync": "^0.2.7" } }, "sha512-BEnLolu+yuz22S56CU1SUKq3XC3PkwD5wv4ikR4MfGvnRVcmzXR9DwSlW2fEamyTPyXHomBJRzgapeuBvRNzJQ=="], + "parse-entities": ["parse-entities@4.0.2", "", { "dependencies": { "@types/unist": "^2.0.0", "character-entities-legacy": "^3.0.0", "character-reference-invalid": "^2.0.0", "decode-named-character-reference": "^1.0.0", "is-alphanumerical": "^2.0.0", "is-decimal": "^2.0.0", "is-hexadecimal": "^2.0.0" } }, "sha512-GG2AQYWoLgL877gQIKeRPGO1xF9+eG1ujIb5soS5gPvLQ1y2o8FL90w2QWNdf9I361Mpp7726c+lj3U0qK1uGw=="], + "parse5": ["parse5@8.0.1", "", { "dependencies": { "entities": "^8.0.0" } }, "sha512-z1e/HMG90obSGeidlli3hj7cbocou0/wa5HacvI3ASx34PecNjNQeaHNo5WIZpWofN9kgkqV1q5YvXe3F0FoPw=="], "parse5-html-rewriting-stream": ["parse5-html-rewriting-stream@8.0.1", "", { "dependencies": { "entities": "^8.0.0", "parse5": "^8.0.0", "parse5-sax-parser": "^8.0.0" } }, "sha512-NaRku2aMpUN1Sh1Gyk1KWUh2A7EJx2c6qYzvwsPtqhoHoaURshdrceYK3LunVCm3WHhm6FS7Vcczbvdh3/UIVw=="], @@ -1205,10 +1774,16 @@ "path-browserify": ["path-browserify@1.0.1", "", {}, "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g=="], + "path-data-parser": ["path-data-parser@0.1.0", "", {}, "sha512-NOnmBpt5Y2RWbuv0LMzsayp3lVylAHLPUTut412ZA3l+C4uw4ZVkQbjShYCQ8TCpUMdPapr4YjUqLYD6v68j+w=="], + "path-exists": ["path-exists@4.0.0", "", {}, "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w=="], + "path-is-inside": ["path-is-inside@1.0.2", "", {}, "sha512-DUWJr3+ULp4zXmol/SZkFf3JGsS9/SIv+Y3Rt93/UjPpDpklB5f1er4O3POIbUuUJ3FXgqte2Q7SrU6zAqwk8w=="], + "path-key": ["path-key@3.1.1", "", {}, "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q=="], + "path-to-regexp": ["path-to-regexp@3.3.0", "", {}, "sha512-qyCH421YQPS2WFDxDjftfc1ZR5WKQzVzqsp4n9M2kQhVOo/ByahFoUNJfl58kOcEGfQ//7weFTDhm+ss8Ecxgw=="], + "path-type": ["path-type@4.0.0", "", {}, "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw=="], "picocolors": ["picocolors@1.1.1", "", {}, "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA=="], @@ -1223,7 +1798,11 @@ "playwright-core": ["playwright-core@1.65.1", "", { "bin": { "playwright-core": "cli.js" } }, "sha512-hqPpz7blSMPxWVdoeE1yiBSzXsKiVOd2k+kjCvmUywD2GPO2Dd9HfcWnq9NN0GHbNZDFgZ9JfBFr+X5/BLo0qw=="], - "postcss": ["postcss@8.5.31", "", { "dependencies": { "nanoid": "^3.3.20", "picocolors": "^1.1.1", "source-map-js": "^1.2.2" } }, "sha512-YUbWYCgErwnMAVkjUnYa+KlMBzGpHwiIt/DE7f0G33AuX2LH9UcTk6KgWxd3zRU+pN3u/C+Xl3EnMLM4Hea7Sg=="], + "points-on-curve": ["points-on-curve@0.2.0", "", {}, "sha512-0mYKnYYe9ZcqMCWhUjItv/oHjvgEsfKvnUTg8sAtnHr3GVy7rGkXCb6d5cSyqrWqL4k81b9CPg3urd+T7aop3A=="], + + "points-on-path": ["points-on-path@0.2.1", "", { "dependencies": { "path-data-parser": "0.1.0", "points-on-curve": "0.2.0" } }, "sha512-25ClnWWuw7JbWZcgqY/gJ4FQWadKxGWk+3kR/7kD0tCaDtPPMj7oHu2ToLaVhfpnHrZzYby2w6tUA0eOIuUg8g=="], + + "postcss": ["postcss@8.5.33", "", { "dependencies": { "nanoid": "^3.3.20", "picocolors": "^1.1.1", "source-map-js": "^1.2.2" } }, "sha512-RVHEU9/Pp1Fnjr/MpAJsZoADukCKhfIi15OunEYiGktIkYLkPVvC1sioWolGDS7XByMTx9m/IGbro0Js13zhnQ=="], "postcss-media-query-parser": ["postcss-media-query-parser@0.2.3", "", {}, "sha512-3sOlxmbKcSHMjlUXQZKQ06jOswE7oVkXPxmZdoB1r5l0q6gTFTQSHxNxOrCccElbW7dxNytifNEo8qidX2Vsig=="], @@ -1233,6 +1812,8 @@ "proc-log": ["proc-log@7.0.0", "", {}, "sha512-FYgfaA69XZ93zaXLoMNQ+ViDXGGBgR8aLh03txzcFhV+9xOXx7+8DLCULrKKpR9+GsH9ZfHm82aSUPpozX0Ztg=="], + "property-information": ["property-information@7.2.0", "", {}, "sha512-IAtzIB6sUiWaJYrX9smp3V46pBGbBeLFRGdh25kg1334VcBlD8HzhPeNIWQH9zhGmo2itIe25EHt9dQP7G5hmg=="], + "proxy-agent-negotiate": ["proxy-agent-negotiate@1.1.0", "", { "peerDependencies": { "kerberos": "^2.0.0" }, "optionalPeers": ["kerberos"] }, "sha512-N8IBcM3UgCVzz2L2Lqv8DVntDnnC8/hiV4nEDUPkqq72TPUgYWjQc+bdZlBPZK9LzPAvOY//gAt0S0DApoOXWQ=="], "proxy-compare": ["proxy-compare@3.0.1", "", {}, "sha512-V9plBAt3qjMlS1+nC8771KNf6oJ12gExvaxnNzN/9yVRLdTv/lc+oJlnSzrdYDAvBfTStPCoiaCOTmTs0adv7Q=="], @@ -1243,22 +1824,66 @@ "queue-microtask": ["queue-microtask@1.2.3", "", {}, "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A=="], + "range-parser": ["range-parser@1.2.0", "", {}, "sha512-kA5WQoNVo4t9lNx2kQNFCxKeBl5IbbSNBl1M/tLkw9WCn+hxNBAW5Qh8gdhs63CJnhjJ2zQWFoqPJP2sK1AV5A=="], + + "rc": ["rc@1.2.8", "", { "dependencies": { "deep-extend": "^0.6.0", "ini": "~1.3.0", "minimist": "^1.2.0", "strip-json-comments": "~2.0.1" }, "bin": { "rc": "./cli.js" } }, "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw=="], + "react": ["react@19.3.1", "", {}, "sha512-QNhWdt7nrgVWWQG58QuGsAR3jv3Hbe4mb4vz7w2csnHavciZJgda1CPNaldF6eVxv90ud3jUXpKlHL69gO38yw=="], "react-compiler-runtime": ["react-compiler-runtime@1.0.0", "", { "peerDependencies": { "react": "^17.0.0 || ^18.0.0 || ^19.0.0 || ^0.0.0-experimental" } }, "sha512-rRfjYv66HlG8896yPUDONgKzG5BxZD1nV9U6rkm+7VCuvQc903C4MjcoZR4zPw53IKSOX9wMQVpA1IAbRtzQ7w=="], "react-dom": ["react-dom@19.3.1", "", { "dependencies": { "scheduler": "^0.28.0" }, "peerDependencies": { "react": "^19.3.1" } }, "sha512-Y0bARz53lhEC1NMCASs0/j+faB/zqt3R8hpvg1e8+61ZVJ4UL0UdC4cBbXfZMcIuhrfgeILTLe+ZeBCavQPtKQ=="], + "react-remove-scroll": ["react-remove-scroll@2.7.2", "", { "dependencies": { "react-remove-scroll-bar": "^2.3.7", "react-style-singleton": "^2.2.3", "tslib": "^2.1.0", "use-callback-ref": "^1.3.3", "use-sidecar": "^1.1.3" }, "peerDependencies": { "@types/react": "*", "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-Iqb9NjCCTt6Hf+vOdNIZGdTiH1QSqr27H/Ek9sv/a97gfueI/5h1s3yRi1nngzMUaOOToin5dI1dXKdXiF+u0Q=="], + + "react-remove-scroll-bar": ["react-remove-scroll-bar@2.3.8", "", { "dependencies": { "react-style-singleton": "^2.2.2", "tslib": "^2.0.0" }, "peerDependencies": { "@types/react": "*", "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" }, "optionalPeers": ["@types/react"] }, "sha512-9r+yi9+mgU33AKcj6IbT9oRCO78WriSj6t/cF8DWBZJ9aOGPOTEDvdUDz1FwKim7QXWwmHqtdHnRJfhAxEG46Q=="], + + "react-style-singleton": ["react-style-singleton@2.2.3", "", { "dependencies": { "get-nonce": "^1.0.0", "tslib": "^2.0.0" }, "peerDependencies": { "@types/react": "*", "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-b6jSvxvVnyptAiLjbkWLE/lOnR4lfTtDAl+eUC7RZy+QQWc6wRzIV2CE6xBuMmDxc2qIihtDCZD5NPOFl7fRBQ=="], + "read-yaml-file": ["read-yaml-file@1.1.0", "", { "dependencies": { "graceful-fs": "^4.1.5", "js-yaml": "^3.6.1", "pify": "^4.0.1", "strip-bom": "^3.0.0" } }, "sha512-VIMnQi/Z4HT2Fxuwg5KrY174U1VdUIASQVWXXyqtNRtxSr9IYkn1rsI6Tb6HsrHCmB7gVpNwX6JxPTHcH6IoTA=="], "readdirp": ["readdirp@5.1.1", "", {}, "sha512-Kko+Y5XQ6fM+Ce3dq3m9YGxnacYZYl9cA1wZjaF3Vbry2L3i1qVg8+CAgNPsXRArPMUMCaOR7oa9Nqntc43JKA=="], + "recma-build-jsx": ["recma-build-jsx@1.0.0", "", { "dependencies": { "@types/estree": "^1.0.0", "estree-util-build-jsx": "^3.0.0", "vfile": "^6.0.0" } }, "sha512-8GtdyqaBcDfva+GUKDr3nev3VpKAhup1+RvkMvUxURHpW7QyIvk9F5wz7Vzo06CEMSilw6uArgRqhpiUcWp8ew=="], + + "recma-jsx": ["recma-jsx@1.0.1", "", { "dependencies": { "acorn-jsx": "^5.0.0", "estree-util-to-js": "^2.0.0", "recma-parse": "^1.0.0", "recma-stringify": "^1.0.0", "unified": "^11.0.0" }, "peerDependencies": { "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, "sha512-huSIy7VU2Z5OLv6oFLosQGGDqPqdO1iq6bWNAdhzMxSJP7RAso4fCZ1cKu8j9YHCZf3TPrq4dw3okhrylgcd7w=="], + + "recma-parse": ["recma-parse@1.0.0", "", { "dependencies": { "@types/estree": "^1.0.0", "esast-util-from-js": "^2.0.0", "unified": "^11.0.0", "vfile": "^6.0.0" } }, "sha512-OYLsIGBB5Y5wjnSnQW6t3Xg7q3fQ7FWbw/vcXtORTnyaSFscOtABg+7Pnz6YZ6c27fG1/aN8CjfwoUEUIdwqWQ=="], + + "recma-stringify": ["recma-stringify@1.0.0", "", { "dependencies": { "@types/estree": "^1.0.0", "estree-util-to-js": "^2.0.0", "unified": "^11.0.0", "vfile": "^6.0.0" } }, "sha512-cjwII1MdIIVloKvC9ErQ+OgAtwHBmcZ0Bg4ciz78FtbT8In39aAYbaA7zvxQ61xVMSPE8WxhLwLbhif4Js2C+g=="], + "reflect-metadata": ["reflect-metadata@0.2.2", "", {}, "sha512-urBwgfrvVP/eAyXx4hluJivBKzuEbSQs9rKWCrCkbSxNv8mxPcUZKeuoF3Uy4mJl3Lwprp6yy5/39VWigZ4K6Q=="], + "regex": ["regex@6.1.0", "", { "dependencies": { "regex-utilities": "^2.3.0" } }, "sha512-6VwtthbV4o/7+OaAF9I5L5V3llLEsoPyq9P1JVXkedTP33c7MfCG0/5NOPcSJn0TzXcG9YUrR0gQSWioew3LDg=="], + + "regex-recursion": ["regex-recursion@6.0.2", "", { "dependencies": { "regex-utilities": "^2.3.0" } }, "sha512-0YCaSCq2VRIebiaUviZNs0cBz1kg5kVS2UKUfNIx8YVs1cN3AV7NTctO5FOKBA+UT2BPJIWZauYHPqJODG50cg=="], + + "regex-utilities": ["regex-utilities@2.3.0", "", {}, "sha512-8VhliFJAWRaUiVvREIiW2NXXTmHs4vMNnSzuJVhscgmGav3g9VDxLrQndI3dZZVVdp0ZO/5v0xmX516/7M9cng=="], + + "registry-auth-token": ["registry-auth-token@3.3.2", "", { "dependencies": { "rc": "^1.1.6", "safe-buffer": "^5.0.1" } }, "sha512-JL39c60XlzCVgNrO+qq68FoNb56w/m7JYvGR2jT5iR1xBrUA3Mfx5Twk5rqTThPmQKMWydGmq8oFtDlxfrmxnQ=="], + + "registry-url": ["registry-url@3.1.0", "", { "dependencies": { "rc": "^1.0.1" } }, "sha512-ZbgR5aZEdf4UKZVBPYIgaglBmSF2Hi94s2PcIHhRGFjKYu+chjJdYfHn4rt3hB6eCKLJ8giVIIfgMa1ehDfZKA=="], + + "rehype-recma": ["rehype-recma@1.0.0", "", { "dependencies": { "@types/estree": "^1.0.0", "@types/hast": "^3.0.0", "hast-util-to-estree": "^3.0.0" } }, "sha512-lqA4rGUf1JmacCNWWZx0Wv1dHqMwxzsDWYMTowuplHF3xH0N/MmrZ/G3BDZnzAkRmxDadujCjaKM2hqYdCBOGw=="], + + "remark": ["remark@15.0.1", "", { "dependencies": { "@types/mdast": "^4.0.0", "remark-parse": "^11.0.0", "remark-stringify": "^11.0.0", "unified": "^11.0.0" } }, "sha512-Eht5w30ruCXgFmxVUSlNWQ9iiimq07URKeFS3hNc8cUWy1llX4KDWfyEDZRycMc+znsN9Ux5/tJ/BFdgdOwA3A=="], + + "remark-gfm": ["remark-gfm@4.0.1", "", { "dependencies": { "@types/mdast": "^4.0.0", "mdast-util-gfm": "^3.0.0", "micromark-extension-gfm": "^3.0.0", "remark-parse": "^11.0.0", "remark-stringify": "^11.0.0", "unified": "^11.0.0" } }, "sha512-1quofZ2RQ9EWdeN34S79+KExV1764+wCUGop5CPL1WGdD0ocPpu91lzPGbwWMECpEpd42kJGQwzRfyov9j4yNg=="], + + "remark-mdx": ["remark-mdx@3.1.1", "", { "dependencies": { "mdast-util-mdx": "^3.0.0", "micromark-extension-mdxjs": "^3.0.0" } }, "sha512-Pjj2IYlUY3+D8x00UJsIOg5BEvfMyeI+2uLPn9VO9Wg4MEtN/VTIq2NEJQfde9PnX15KgtHyl9S0BcTnWrIuWg=="], + + "remark-parse": ["remark-parse@11.0.0", "", { "dependencies": { "@types/mdast": "^4.0.0", "mdast-util-from-markdown": "^2.0.0", "micromark-util-types": "^2.0.0", "unified": "^11.0.0" } }, "sha512-FCxlKLNGknS5ba/1lmpYijMUzX2esxW5xQqjWxw2eHFfS2MSdaHVINFmhjo+qN1WhZhNimq0dZATN9pH0IDrpA=="], + + "remark-rehype": ["remark-rehype@11.1.2", "", { "dependencies": { "@types/hast": "^3.0.0", "@types/mdast": "^4.0.0", "mdast-util-to-hast": "^13.0.0", "unified": "^11.0.0", "vfile": "^6.0.0" } }, "sha512-Dh7l57ianaEoIpzbp0PC9UKAdCSVklD8E5Rpw7ETfbTl3FqcOOgq5q2LVDhgGCkaBv7p24JXikPdvhhmHvKMsw=="], + + "remark-stringify": ["remark-stringify@11.0.0", "", { "dependencies": { "@types/mdast": "^4.0.0", "mdast-util-to-markdown": "^2.0.0", "unified": "^11.0.0" } }, "sha512-1OSmLd3awB/t8qdoEOMazZkNsfVTeY4fTsgzcQFdXNq8ToTN4ZGwrMnlda4K6smTFKD+GRV6O48i6Z4iKgPPpw=="], + "require-directory": ["require-directory@2.1.1", "", {}, "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q=="], "require-from-string": ["require-from-string@2.0.2", "", {}, "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw=="], + "reselect": ["reselect@5.3.0", "", {}, "sha512-XGoLeRAVzUTcJ1qkxPQhDJyIZ5d6zzZD9nT7AEZOaaU9UbWclhycElmhO+VD5bFeLuzhPBaOV2oXC8uG35ZSpg=="], + "resolve-from": ["resolve-from@5.0.0", "", {}, "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw=="], "resolve-pkg-maps": ["resolve-pkg-maps@1.0.0", "", {}, "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw=="], @@ -1267,16 +1892,24 @@ "reusify": ["reusify@1.1.0", "", {}, "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw=="], + "robust-predicates": ["robust-predicates@3.0.3", "", {}, "sha512-NS3levdsRIUOmiJ8FZWCP7LG3QpJyrs/TE0Zpf1yvZu8cAJJ6QMW92H1c7kWpdIHo8RvmLxN/o2JXTKHp74lUA=="], + "rolldown": ["rolldown@1.3.2", "", { "dependencies": { "@oxc-project/types": "=0.158.0", "@rolldown/pluginutils": "^1.0.0" }, "optionalDependencies": { "@rolldown/binding-android-arm-eabi": "1.3.2", "@rolldown/binding-android-arm64": "1.3.2", "@rolldown/binding-darwin-arm64": "1.3.2", "@rolldown/binding-darwin-x64": "1.3.2", "@rolldown/binding-freebsd-x64": "1.3.2", "@rolldown/binding-linux-arm-gnueabihf": "1.3.2", "@rolldown/binding-linux-arm64-gnu": "1.3.2", "@rolldown/binding-linux-arm64-musl": "1.3.2", "@rolldown/binding-linux-ppc64-gnu": "1.3.2", "@rolldown/binding-linux-s390x-gnu": "1.3.2", "@rolldown/binding-linux-x64-gnu": "1.3.2", "@rolldown/binding-linux-x64-musl": "1.3.2", "@rolldown/binding-openharmony-arm64": "1.3.2", "@rolldown/binding-wasm32-wasi": "1.3.2", "@rolldown/binding-win32-arm64-msvc": "1.3.2", "@rolldown/binding-win32-x64-msvc": "1.3.2" }, "bin": { "rolldown": "./bin/cli.mjs" } }, "sha512-EFHqbVkXiYZA6akmYm2bvJhNbEGdUwAResRhYwl/BO8QhB5KxsG+t3RVHJSIOy5jBEb0XCACvrIGnnl6Z8sMGA=="], "rolldown-plugin-dts": ["rolldown-plugin-dts@0.30.2", "", { "dependencies": { "dts-resolver": "^3.0.0", "get-tsconfig": "5.0.0-beta.6", "obug": "^3.0.0", "yuku": "^0.28.0" }, "peerDependencies": { "@volar/typescript": "~2.4.0", "@vue/language-core": "~3.2.0 || ~3.3.0", "rolldown": "^1.2.0", "tsrs": "*", "typescript": "^5.0.0 || ^6.0.0 || ~7.0.0 || ~7.1.0-0", "vue-tsc": "~3.2.0 || ~3.3.0" }, "optionalPeers": ["@volar/typescript", "@vue/language-core", "tsrs", "typescript", "vue-tsc"] }, "sha512-Q3wRlwawifZeN1llb1BaeZfimmJMF/WHzm7z5ieZ8g2CWHQM0gvVWLYPbgBglsXJqcd405gc+3LS2NzSevbYNQ=="], + "roughjs": ["roughjs@4.6.6", "", { "dependencies": { "hachure-fill": "^0.5.2", "path-data-parser": "^0.1.0", "points-on-curve": "^0.2.0", "points-on-path": "^0.2.1" } }, "sha512-ZUz/69+SYpFN/g/lUlo2FXcIjRkSu3nDarreVdGGndHEBJ6cXPdKguS8JGxwj5HA5xIbVKSmLgr5b3AWxtRfvQ=="], + "run-parallel": ["run-parallel@1.2.0", "", { "dependencies": { "queue-microtask": "^1.2.2" } }, "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA=="], + "rw": ["rw@1.3.3", "", {}, "sha512-PdhdWy89SiZogBLaw42zdeqtRJ//zFd2PgQavcICDUgJT5oW10QCRKbJ6bg4r0/UY2M6BWd5tkxuGFRvCkgfHQ=="], + "rxjs": ["rxjs@7.8.2", "", { "dependencies": { "tslib": "^2.1.0" } }, "sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA=="], "sade": ["sade@1.8.1", "", { "dependencies": { "mri": "^1.1.0" } }, "sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A=="], + "safe-buffer": ["safe-buffer@5.2.1", "", {}, "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="], + "safer-buffer": ["safer-buffer@2.1.2", "", {}, "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="], "sass": ["sass@1.104.1", "", { "dependencies": { "chokidar": "^5.0.0", "immutable": "^5.1.5", "source-map-js": ">=0.6.2 <2.0.0" }, "optionalDependencies": { "@parcel/watcher": "^2.4.1" }, "bin": { "sass": "sass.js" } }, "sha512-yDA+1aIG3EHgN4V/BvuhCvu61FF6hEd4e+9DxikUm9U0CAGuvdIZ/UYy7qbOxjhbbWQraoyLlMuzdRGOSV5Bmw=="], @@ -1321,18 +1954,26 @@ "scheduler": ["scheduler@0.28.0", "", {}, "sha512-juorfCmIkIw8tT+p5BXSm6PJjQF/ycEYmKyzURCIt/RaZIhL+PulbQ9Yu2z1HdOJDdqDTlxA1+xKBmHXJsczAw=="], + "scroll-into-view-if-needed": ["scroll-into-view-if-needed@3.2.1", "", { "dependencies": { "compute-scroll-into-view": "^3.2.2" } }, "sha512-dgeJvJhSV9MY6hyhtsivbSxHoZVm+lumsWTObtUdAchJflwOGmKKHNkEpU8pVYMomZ8h/yrfzVQkcPlObQNDWQ=="], + "semver": ["semver@7.8.5", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA=="], "seroval": ["seroval@1.8.1", "", {}, "sha512-7z9x1flFYfZBz+LfDkXNfm5UIhZJ/97ASaV8Q1wctoVkeqVfv+tLPsWebeMXBNw6XprvwxDE5wC5Ylqmr+iSrA=="], "seroval-plugins": ["seroval-plugins@1.8.0", "", { "peerDependencies": { "seroval": "^1.8.0" } }, "sha512-96vBb12rDvPPwdKUgWw1op3fGq8AVBFOr0IllbnM72yR5J9WWXF18cQ4g1XfDO7HCyh2dt70P3XdtyRayP8FWg=="], + "serve": ["serve@14.2.8", "", { "dependencies": { "@zeit/schemas": "2.36.0", "ajv": "8.18.0", "arg": "5.0.2", "boxen": "7.0.0", "chalk": "5.0.1", "chalk-template": "0.4.0", "compression": "1.8.2", "is-port-reachable": "4.0.0", "serve-handler": "6.1.7", "tinyclip": "^0.1.12", "update-check": "1.5.4" }, "bin": { "serve": "build/main.js" } }, "sha512-7or7YqR3zXwHhiBGj40l9yODyQY146O+hXKaEAfQYQkcvHtMDdX95K96xr50qL9EjXScyYVJb1NIgVE8F0i5cA=="], + + "serve-handler": ["serve-handler@6.1.7", "", { "dependencies": { "bytes": "3.0.0", "content-disposition": "0.5.2", "mime-types": "2.1.18", "minimatch": "3.1.5", "path-is-inside": "1.0.2", "path-to-regexp": "3.3.0", "range-parser": "1.2.0" } }, "sha512-CinAq1xWb0vR3twAv9evEU8cNWkXCb9kd5ePAHUKJBkOsUpR1wt/CvGdeca7vqumL1U5cSaeVQ6zZMxiJ3yWsg=="], + "sharp": ["sharp@0.35.5", "", { "dependencies": { "@img/colour": "^1.1.0", "detect-libc": "^2.1.2", "semver": "^7.8.5" }, "optionalDependencies": { "@img/sharp-darwin-arm64": "0.35.5", "@img/sharp-darwin-x64": "0.35.5", "@img/sharp-freebsd-wasm32": "0.35.5", "@img/sharp-libvips-darwin-arm64": "1.3.4", "@img/sharp-libvips-darwin-x64": "1.3.4", "@img/sharp-libvips-linux-arm": "1.3.4", "@img/sharp-libvips-linux-arm64": "1.3.4", "@img/sharp-libvips-linux-ppc64": "1.3.4", "@img/sharp-libvips-linux-riscv64": "1.3.4", "@img/sharp-libvips-linux-s390x": "1.3.4", "@img/sharp-libvips-linux-x64": "1.3.4", "@img/sharp-libvips-linuxmusl-arm64": "1.3.4", "@img/sharp-libvips-linuxmusl-x64": "1.3.4", "@img/sharp-linux-arm": "0.35.5", "@img/sharp-linux-arm64": "0.35.5", "@img/sharp-linux-ppc64": "0.35.5", "@img/sharp-linux-riscv64": "0.35.5", "@img/sharp-linux-s390x": "0.35.5", "@img/sharp-linux-x64": "0.35.5", "@img/sharp-linuxmusl-arm64": "0.35.5", "@img/sharp-linuxmusl-x64": "0.35.5", "@img/sharp-webcontainers-wasm32": "0.35.5", "@img/sharp-win32-arm64": "0.35.5", "@img/sharp-win32-ia32": "0.35.5", "@img/sharp-win32-x64": "0.35.5" }, "peerDependencies": { "@types/node": "*" }, "optionalPeers": ["@types/node"] }, "sha512-Ywn4OnzGukp7CDMrp08RQ50YKmuwG47brZgIVPTvBaaAfQlRlygrRqSrxdCiL9M+LlzLBiJ68IR1QqvzHyjC7g=="], "shebang-command": ["shebang-command@2.0.0", "", { "dependencies": { "shebang-regex": "^3.0.0" } }, "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA=="], "shebang-regex": ["shebang-regex@3.0.0", "", {}, "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A=="], + "shiki": ["shiki@4.6.0", "", { "dependencies": { "@shikijs/core": "4.6.0", "@shikijs/engine-javascript": "4.6.0", "@shikijs/engine-oniguruma": "4.6.0", "@shikijs/langs": "4.6.0", "@shikijs/themes": "4.6.0", "@shikijs/types": "4.6.0", "@shikijs/vscode-textmate": "^10.1.0", "@types/hast": "^3.0.5" } }, "sha512-imjLsVHgPuWhvpU3P+zOekvMYqnel7QmKsFC4Sn0fCuAvaaalBsxwKEsrU8Ko5BdFnZA6Go/8a0RzahS634UgA=="], + "signal-exit": ["signal-exit@4.1.0", "", {}, "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw=="], "skin-tone": ["skin-tone@2.0.0", "", { "dependencies": { "unicode-emoji-modifier-base": "^1.0.0" } }, "sha512-kUMbT1oBJCpgrnKoSr0o6wPtvRWT9W9UKvGLwfJYO2WuahZRHOpEyL1ckyMGgMWh0UdpmaoFqKKD29WTomNEGA=="], @@ -1349,6 +1990,8 @@ "source-map-support": ["source-map-support@0.5.21", "", { "dependencies": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" } }, "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w=="], + "space-separated-tokens": ["space-separated-tokens@2.0.2", "", {}, "sha512-PEGlAwrG8yXGXRjW32fGbg66JAlOAwbObuqVoJpv/mRgoWDQfgH1wDPvtzWyUSNAXBGSk8h755YDbbcEy3SH2Q=="], + "spawndamnit": ["spawndamnit@3.0.1", "", { "dependencies": { "cross-spawn": "^7.0.5", "signal-exit": "^4.0.1" } }, "sha512-MmnduQUuHCoFckZoWnXsTg7JaiLBJrKFj9UI2MbRPGaJeVpsLcVBu6P/IGZovziM/YBsellCmsprgNA+w0CzVg=="], "sprintf-js": ["sprintf-js@1.0.3", "", {}, "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g=="], @@ -1357,12 +2000,22 @@ "string-width": ["string-width@4.2.3", "", { "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", "strip-ansi": "^6.0.1" } }, "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g=="], + "stringify-entities": ["stringify-entities@4.0.4", "", { "dependencies": { "character-entities-html4": "^2.0.0", "character-entities-legacy": "^3.0.0" } }, "sha512-IwfBptatlO+QCJUo19AqvrPNqlVMpW9YEL2LIVY+Rpv2qsjCGxaDLNRgeGsQWJhfItebuJhsGSLjaBbNSQ+ieg=="], + "strip-ansi": ["strip-ansi@6.0.1", "", { "dependencies": { "ansi-regex": "^5.0.1" } }, "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A=="], "strip-bom": ["strip-bom@3.0.0", "", {}, "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA=="], + "strip-json-comments": ["strip-json-comments@2.0.1", "", {}, "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ=="], + + "style-to-js": ["style-to-js@1.1.21", "", { "dependencies": { "style-to-object": "1.0.14" } }, "sha512-RjQetxJrrUJLQPHbLku6U/ocGtzyjbJMP9lCNK7Ag0CNh690nSH8woqWH9u16nMjYBAok+i7JO1NP2pOy8IsPQ=="], + + "style-to-object": ["style-to-object@1.0.14", "", { "dependencies": { "inline-style-parser": "0.2.7" } }, "sha512-LIN7rULI0jBscWQYaSswptyderlarFkjQ+t79nzty8tcIAceVomEVlLzH5VP4Cmsv6MtKhs7qaAiwlcp+Mgaxw=="], + "styled-jsx": ["styled-jsx@5.1.6", "", { "dependencies": { "client-only": "0.0.1" }, "peerDependencies": { "react": ">= 16.8.0 || 17.x.x || ^18.0.0-0 || ^19.0.0-0" } }, "sha512-qSVyDTeMotdvQYoHWLNGwRFJHC+i+ZvdBRYosOFgC+Wg1vx4frN2/RG/NA7SYqqvKNLf39P2LSRA2pu6n0XYZA=="], + "stylis": ["stylis@4.4.0", "", {}, "sha512-5Z9ZpRzfuH6l/UAvCPAPUo3665Nk2wLaZU3x+TLHKVzIz33+sbJqbtrYoC3KD4/uVOr2Zp+L0LySezP9OHV9yA=="], + "supports-color": ["supports-color@7.2.0", "", { "dependencies": { "has-flag": "^4.0.0" } }, "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw=="], "supports-hyperlinks": ["supports-hyperlinks@3.2.0", "", { "dependencies": { "has-flag": "^4.0.0", "supports-color": "^7.0.0" } }, "sha512-zFObLMyZeEwzAoKCyu1B91U79K2t7ApXuQfo8OuxwXLDgcKxuwM+YvcbIhm6QWqz7mHUH1TVytR1PwVVjEuMig=="], @@ -1383,6 +2036,8 @@ "thenify-all": ["thenify-all@1.6.0", "", { "dependencies": { "thenify": ">= 3.1.0 < 4" } }, "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA=="], + "tinyclip": ["tinyclip@0.1.15", "", {}, "sha512-uo33abH+Ays0xYaDysoBt494Hb3hsEczMpcC0MwFl773pazORx4fmvKhclhR1wonUbB6vvpRsvVMwnhfqeMc+A=="], + "tinyexec": ["tinyexec@1.3.1", "", {}, "sha512-GCvB3aoys96IuDFBMcTB46JOR6mdMtAToqwiW8JlWhsoh1mhHi/xn9ss/Dg7N555GiJyEt2qzoG/NHCwM6h1EA=="], "tinyglobby": ["tinyglobby@0.2.17", "", { "dependencies": { "fdir": "^6.5.0", "picomatch": "^4.0.4" } }, "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g=="], @@ -1393,10 +2048,18 @@ "tr46": ["tr46@0.0.3", "", {}, "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw=="], + "trim-lines": ["trim-lines@3.0.1", "", {}, "sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg=="], + + "trough": ["trough@2.2.0", "", {}, "sha512-tmMpK00BjZiUyVyvrBK7knerNgmgvcV/KLVyuma/SC+TQN167GrMRciANTz09+k3zW8L8t60jWO1GpfkZdjTaw=="], + + "ts-dedent": ["ts-dedent@2.3.0", "", {}, "sha512-JfJeIHke7y2egdGGgRAvpCwYFUsHlM2gPcrVOxFkznt/4uzQ7HFmvE63iFHVLBJNDuyDOQgijDK/tXH/f6Msjg=="], + "tsdown": ["tsdown@0.23.7", "", { "dependencies": { "cac": "^7.1.0", "defu": "^6.1.7", "empathic": "^2.1.0", "hookable": "^6.1.2", "import-without-cache": "^0.4.1", "obug": "^3.0.0", "picomatch": "^4.0.7", "rolldown": "~1.3.0", "rolldown-plugin-dts": "^0.30.0", "tinyexec": "^1.3.1", "tinyglobby": "^0.2.17", "tinyps": "^0.5.1", "unconfig-core": "^7.5.0", "verkit": "^0.5.0" }, "peerDependencies": { "@arethetypeswrong/core": "^0.18.1", "@tsdown/css": "0.23.7", "@tsdown/exe": "0.23.7", "@vitejs/devtools": "*", "publint": "^0.3.8", "tsx": "*", "typescript": "^5.0.0 || ^6.0.0 || ^7.0.0", "unplugin-unused": ">=0.5.0", "unrun": "*" }, "optionalPeers": ["@arethetypeswrong/core", "@tsdown/css", "@tsdown/exe", "@vitejs/devtools", "publint", "tsx", "typescript", "unplugin-unused", "unrun"], "bin": { "tsdown": "./dist/run.mjs" } }, "sha512-w9nmWyEimfqQ7/HpVeKTldAeBvWGXiaWyNP7xaxSrr0GhKxsngEyTWqk1nOruRqvqRSkdpMMkpV2BcoWfLB4Uw=="], "tslib": ["tslib@2.9.1", "", {}, "sha512-a4Ux9VKuIMHsOS7ENbEq6hK2ZGYIT27Rtl0E4eD9KqwxhKiQeMZE/9xb3IdYwWaSOyIBQLExhQgXDTYoiCxnWA=="], + "type-fest": ["type-fest@2.19.0", "", {}, "sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA=="], + "typescript": ["typescript@7.0.2", "", { "optionalDependencies": { "@typescript/typescript-aix-ppc64": "7.0.2", "@typescript/typescript-darwin-arm64": "7.0.2", "@typescript/typescript-darwin-x64": "7.0.2", "@typescript/typescript-freebsd-arm64": "7.0.2", "@typescript/typescript-freebsd-x64": "7.0.2", "@typescript/typescript-linux-arm": "7.0.2", "@typescript/typescript-linux-arm64": "7.0.2", "@typescript/typescript-linux-loong64": "7.0.2", "@typescript/typescript-linux-mips64el": "7.0.2", "@typescript/typescript-linux-ppc64": "7.0.2", "@typescript/typescript-linux-riscv64": "7.0.2", "@typescript/typescript-linux-s390x": "7.0.2", "@typescript/typescript-linux-x64": "7.0.2", "@typescript/typescript-netbsd-arm64": "7.0.2", "@typescript/typescript-netbsd-x64": "7.0.2", "@typescript/typescript-openbsd-arm64": "7.0.2", "@typescript/typescript-openbsd-x64": "7.0.2", "@typescript/typescript-sunos-x64": "7.0.2", "@typescript/typescript-win32-arm64": "7.0.2", "@typescript/typescript-win32-x64": "7.0.2" }, "bin": { "tsc": "bin/tsc" } }, "sha512-8FYau96o3NKOhbjKi/qNvG/W5jhzxkbdm5sj9AbZ/5T5sWqn3hJgLfGx27sRKZWTvyzCP8dLRBTf5tBTSRVUNA=="], "unconfig-core": ["unconfig-core@7.5.0", "", { "dependencies": { "@quansync/fs": "^1.0.0", "quansync": "^1.0.0" } }, "sha512-Su3FauozOGP44ZmKdHy2oE6LPjk51M/TRRjHv2HNCWiDvfvCoxC2lno6jevMA91MYAdCdwP05QnWdWpSbncX/w=="], @@ -1405,16 +2068,46 @@ "unicode-emoji-modifier-base": ["unicode-emoji-modifier-base@1.0.0", "", {}, "sha512-yLSH4py7oFH3oG/9K+XWrz1pSi3dfUrWEnInbxMfArOfc1+33BlGPQtLsOYwvdMy11AwUBetYuaRxSPqgkq+8g=="], + "unified": ["unified@11.0.5", "", { "dependencies": { "@types/unist": "^3.0.0", "bail": "^2.0.0", "devlop": "^1.0.0", "extend": "^3.0.0", "is-plain-obj": "^4.0.0", "trough": "^2.0.0", "vfile": "^6.0.0" } }, "sha512-xKvGhPWw3k84Qjh8bI3ZeJjqnyadK+GEFtazSfZv/rKeTkTjOJho6mFqh2SM96iIcZokxiOpg78GazTSg8+KHA=="], + + "unist-util-is": ["unist-util-is@6.0.1", "", { "dependencies": { "@types/unist": "^3.0.0" } }, "sha512-LsiILbtBETkDz8I9p1dQ0uyRUWuaQzd/cuEeS1hoRSyW5E5XGmTzlwY1OrNzzakGowI9Dr/I8HVaw4hTtnxy8g=="], + + "unist-util-position": ["unist-util-position@5.0.0", "", { "dependencies": { "@types/unist": "^3.0.0" } }, "sha512-fucsC7HjXvkB5R3kTCO7kUjRdrS0BJt3M/FPxmHMBOm8JQi2BsHAHFsy27E0EolP8rp0NzXsJ+jNPyDWvOJZPA=="], + + "unist-util-position-from-estree": ["unist-util-position-from-estree@2.0.0", "", { "dependencies": { "@types/unist": "^3.0.0" } }, "sha512-KaFVRjoqLyF6YXCbVLNad/eS4+OfPQQn2yOd7zF/h5T/CSL2v8NpN6a5TPvtbXthAGw5nG+PuTtq+DdIZr+cRQ=="], + + "unist-util-remove-position": ["unist-util-remove-position@5.0.0", "", { "dependencies": { "@types/unist": "^3.0.0", "unist-util-visit": "^5.0.0" } }, "sha512-Hp5Kh3wLxv0PHj9m2yZhhLt58KzPtEYKQQ4yxfYFEO7EvHwzyDYnduhHnY1mDxoqr7VUwVuHXk9RXKIiYS1N8Q=="], + + "unist-util-stringify-position": ["unist-util-stringify-position@4.0.0", "", { "dependencies": { "@types/unist": "^3.0.0" } }, "sha512-0ASV06AAoKCDkS2+xw5RXJywruurpbC4JZSm7nr7MOt1ojAzvyyaO+UxZf18j8FCF6kmzCZKcAgN/yu2gm2XgQ=="], + + "unist-util-visit": ["unist-util-visit@5.2.0", "", { "dependencies": { "@types/unist": "^3.0.0", "unist-util-is": "^6.0.0", "unist-util-visit-parents": "^6.1.0" } }, "sha512-fpsYs/VVoZxfGY9/j3FQpZmN8wdLJaV1Pt38AaJNZu9uKIHcFU3halCdBveEq1HGKO1OEfJY65w1zvoFV1b3qQ=="], + + "unist-util-visit-parents": ["unist-util-visit-parents@6.1.0", "", { "dependencies": { "@types/unist": "^3.0.0", "unist-util-is": "^6.0.0" } }, "sha512-vKXxz6O38sKDj1mtx/k2cWvkkFBuYGx6uGrlzBkVeWCRF/F8sdI0j3Wbkz/5rVNRRuVc8UrgRdbCxNhmYXgP3w=="], + "universalify": ["universalify@0.1.2", "", {}, "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg=="], "update-browserslist-db": ["update-browserslist-db@1.2.3", "", { "dependencies": { "escalade": "^3.2.0", "picocolors": "^1.1.1" }, "peerDependencies": { "browserslist": ">= 4.21.0" }, "bin": { "update-browserslist-db": "cli.js" } }, "sha512-Js0m9cx+qOgDxo0eMiFGEueWztz+d4+M3rGlmKPT+T4IS/jP4ylw3Nwpu6cpTTP8R1MAC1kF4VbdLt3ARf209w=="], + "update-check": ["update-check@1.5.4", "", { "dependencies": { "registry-auth-token": "3.3.2", "registry-url": "3.1.0" } }, "sha512-5YHsflzHP4t1G+8WGPlvKbJEbAJGCgw+Em+dGR1KmBUbr1J36SJBqlHLjR7oob7sco5hWHGQVcr9B2poIVDDTQ=="], + + "use-callback-ref": ["use-callback-ref@1.3.3", "", { "dependencies": { "tslib": "^2.0.0" }, "peerDependencies": { "@types/react": "*", "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-jQL3lRnocaFtu3V00JToYz/4QkNWswxijDaCVNZRiRTO3HQDLsdu1ZtmIUvV4yPp+rvWm5j0y0TG/S61cuijTg=="], + + "use-sidecar": ["use-sidecar@1.1.3", "", { "dependencies": { "detect-node-es": "^1.1.0", "tslib": "^2.0.0" }, "peerDependencies": { "@types/react": "*", "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-Fedw0aZvkhynoPYlA5WXrMCAMm+nSWdZt6lzJQ7Ok8S6Q+VsHmHpRWndVRJ8Be0ZbkfPc5LRYH+5XrzXcEeLRQ=="], + + "use-sync-external-store": ["use-sync-external-store@1.7.0", "", { "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "sha512-6L+EeigHMQhdaIPNIFUKwfWJSwWFQ8gJbJ2DLOs5sDIegTwR9fRxvnM3uciHKjIZhFz+KAv2emhWMRvDmMcY8A=="], + "validate-npm-package-name": ["validate-npm-package-name@5.0.1", "", {}, "sha512-OljLrQ9SQdOUqTaQxqL5dEfZWrXExyyWsozYlAWFawPVNuD83igl7uJD2RTkNMbniIYgt8l81eCJGIdQF7avLQ=="], "varint": ["varint@6.0.0", "", {}, "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg=="], + "vary": ["vary@1.1.2", "", {}, "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg=="], + "verkit": ["verkit@0.5.0", "", {}, "sha512-u4J1hr6Y+C/hit34GwL3eIcUf3wngT8TlYUjK7tk0jxydKLAq3sYvifjdTDA6U3KCKRcQCQDGf/srjxfZF3l7g=="], + "vfile": ["vfile@6.0.3", "", { "dependencies": { "@types/unist": "^3.0.0", "vfile-message": "^4.0.0" } }, "sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q=="], + + "vfile-message": ["vfile-message@4.0.4", "", { "dependencies": { "@types/unist": "^3.0.0", "unist-util-stringify-position": "^4.0.0" } }, "sha512-66ycRswIkNmHH9PHku7ADtv5RVwgIrOcuv3J8Svz6h4qgGRrKVa+9/neuKyJZUXyOpYwLTvS+whZ4R2urHHgQg=="], + "vite": ["vite@8.3.8", "", { "dependencies": { "lightningcss": "^1.33.0", "picomatch": "^4.0.7", "postcss": "^8.5.32", "rolldown": "~1.2.18", "tinyglobby": "^0.2.17" }, "optionalDependencies": { "fsevents": "~2.3.3" }, "peerDependencies": { "@types/node": "^20.19.0 || >=22.12.0", "@vitejs/devtools": "^0.7.1 || ^0.8.0", "esbuild": "^0.27.0 || ^0.28.0", "jiti": ">=1.21.0", "less": "^4.0.0", "sass": "^1.70.0", "sass-embedded": "^1.70.0", "stylus": ">=0.54.8", "sugarss": "^5.0.0", "terser": "^5.16.0", "tsx": "^4.8.1", "yaml": "^2.4.2" }, "optionalPeers": ["@types/node", "@vitejs/devtools", "esbuild", "jiti", "less", "sass", "sass-embedded", "stylus", "sugarss", "terser", "tsx", "yaml"], "bin": { "vite": "bin/vite.js" } }, "sha512-LzOn3h9rG/0vhLdXrV4yJ4QFA9eEoqCl+Yx+kGJd7aB9w6nfNgVHKSYwLPZUHrz4ZGa+t+kXjV9itvcHDLQouA=="], "vitefu": ["vitefu@1.1.3", "", { "peerDependencies": { "vite": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0" }, "optionalPeers": ["vite"] }, "sha512-ub4okH7Z5KLjb6hDyjqrGXqWtWvoYdU3IGm/NorpgHncKoLTCfRIbvlhBm7r0YstIaQRYlp4yEbFqDcKSzXSSg=="], @@ -1435,6 +2128,8 @@ "weak-lru-cache": ["weak-lru-cache@1.2.2", "", {}, "sha512-DEAoo25RfSYMuTGc9vPJzZcZullwIqRDSI9LOy+fkCJPi6hykCnfKaXTuPBDuXAUcqHXyOgFtHNp/kB2FjYHbw=="], + "web-namespaces": ["web-namespaces@2.0.1", "", {}, "sha512-bKr1DkiNa2krS7qxNtdrtHAmzuYGFQLiQ13TsorsdT6ULTkPLKuu5+GsFpDlg6JFjUTwX2DyhMPG2be8uPrqsQ=="], + "webidl-conversions": ["webidl-conversions@3.0.1", "", {}, "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ=="], "whatwg-mimetype": ["whatwg-mimetype@3.0.0", "", {}, "sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q=="], @@ -1443,6 +2138,8 @@ "which": ["which@2.0.2", "", { "dependencies": { "isexe": "^2.0.0" }, "bin": { "node-which": "./bin/node-which" } }, "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA=="], + "widest-line": ["widest-line@4.0.1", "", { "dependencies": { "string-width": "^5.0.1" } }, "sha512-o0cyEG0e8GPzT4iGHphIOh0cJOV8fivsXxddQasHPHfoZf1ZexrfeA21w2NaEN1RHE+fXlfISmOE8R9N3u3Qig=="], + "wrap-ansi": ["wrap-ansi@10.0.2", "", { "dependencies": { "ansi-styles": "^6.2.3", "string-width": "^8.2.0" } }, "sha512-6OLRNZqRntVGBm26ghZ5eZhCuWWyOkRCSn8XsOIuq5stpCE/tjLbdozd93naILZig0lmD8ANfRwnhn0DLeXGlg=="], "ws": ["ws@8.22.0", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": ">=5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-Ydggc987+RO0AnWtZ/7Wq9FtNvcrL1b/RO0ud9mWjUPgDrsAAwQSF51sm2hm1XofbU/4jkpGEsLFsZZxU+1DOg=="], @@ -1453,6 +2150,8 @@ "yallist": ["yallist@3.1.1", "", {}, "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g=="], + "yaml": ["yaml@2.9.1", "", { "bin": { "yaml": "bin.mjs" } }, "sha512-3NxN8+78OdzbT7C/WjGsyfPAtJaN3FNDsWxv7Y7mcDsT/oOmgW8BpyQQFFBnvZE3j9Y2Sdz1ULFLezL7Eb2yFw=="], + "yargs": ["yargs@18.1.0", "", { "dependencies": { "cliui": "^9.0.1", "escalade": "^3.1.1", "get-caller-file": "^2.0.5", "string-width": "^8.2.1", "y18n": "^5.0.5", "yargs-parser": "^22.0.0" } }, "sha512-2rAgRKu54VsHkqI0/tYkmluGXHD4KW7yZoycuqDQ15QOTnc2VVfy0nN/1eMhnQLO00A+dwtK20xuCnc1YGeUyg=="], "yargs-parser": ["yargs-parser@22.0.0", "", {}, "sha512-rwu/ClNdSMpkSrUb+d6BRsSkLUq1fmfsY6TOpYzTwvwkg1/NRG85KBy3kq++A8LKQwX6lsu+aWad+2khvuXrqw=="], @@ -1461,20 +2160,38 @@ "yuku": ["yuku@0.28.1", "", { "optionalDependencies": { "@yuku-toolchain/darwin-arm64": "0.28.1", "@yuku-toolchain/darwin-x64": "0.28.1", "@yuku-toolchain/linux-arm64": "0.28.1", "@yuku-toolchain/linux-x64": "0.28.1", "@yuku-toolchain/win32-arm64": "0.28.1", "@yuku-toolchain/win32-x64": "0.28.1" }, "peerDependencies": { "@yuku-toolchain/wasm": "0.28.1" }, "optionalPeers": ["@yuku-toolchain/wasm"] }, "sha512-l899L8rSywcq9OLHf8JNQKpgyrBUL7UNJ7JqefoSVy0oYaFpdf3HoF72EVQFNWYr9HqMw0nGw1r1DefNujOnLQ=="], + "yuku-analyzer": ["yuku-analyzer@0.19.0", "", { "dependencies": { "@yuku-toolchain/types": "^0.19.0", "yuku-ast": "^0.19.0", "yuku-core": "0.19.0" } }, "sha512-Iu7DV5cWOQ3ERSA7oBquz/RT5IEGsUyUeCivYs9lQaZ4nSjM31yD17mH616JKcTyVoVWYivsFZ+twT3UyBosTA=="], + + "yuku-ast": ["yuku-ast@0.19.0", "", { "dependencies": { "@yuku-toolchain/types": "^0.19.0" } }, "sha512-PyCsiScaelhxBGzL8dyeJkLqvRZycoh78R31Vrt/WqYrm0hMFoKwIw/X7Dx5mBKLWAMlV9I9HEyBOHnj2gZVyw=="], + + "yuku-core": ["yuku-core@0.19.0", "", { "dependencies": { "@yuku-toolchain/types": "^0.19.0" }, "optionalDependencies": { "@yuku-core/binding-android-arm64": "0.19.0", "@yuku-core/binding-darwin-arm64": "0.19.0", "@yuku-core/binding-darwin-x64": "0.19.0", "@yuku-core/binding-freebsd-x64": "0.19.0", "@yuku-core/binding-linux-arm-gnu": "0.19.0", "@yuku-core/binding-linux-arm-musl": "0.19.0", "@yuku-core/binding-linux-arm64-gnu": "0.19.0", "@yuku-core/binding-linux-arm64-musl": "0.19.0", "@yuku-core/binding-linux-x64-gnu": "0.19.0", "@yuku-core/binding-linux-x64-musl": "0.19.0", "@yuku-core/binding-win32-arm64": "0.19.0", "@yuku-core/binding-win32-x64": "0.19.0" } }, "sha512-kYK9e1XdfirNhkipzW0wmMcSWcVF/CWnuugodfVYRCUwvoBefweL9HzB96OiKEhsx78V5WbUxbJqlizMX869Qg=="], + + "zbsearch": ["zbsearch@4.0.4", "", {}, "sha512-uajYItKQcOP6f1z+XqzJSIx1jQPe7PbXajElh7r60KGc1MoSIn/hH9d++SvtkT78GXrZB4fah/e8Ts8jFh2CGw=="], + "zimmerframe": ["zimmerframe@1.1.4", "", {}, "sha512-B58NGBEoc8Y9MWWCQGl/gq9xBCe4IiKM0a2x7GZdQKOW5Exr8S1W24J6OgM1njK8xCRGvAJIL/MxXHf6SkmQKQ=="], - "zod": ["zod@4.6.6", "", {}, "sha512-4UmzQUF5fxvfcYHlbjBmejU+w+hbDnWFx4aS8kBx7nPBHcO2SqPbpAG8snbdg+Xse4pRefR98hgjFgIMCI/UhA=="], + "zod": ["zod@4.6.7", "", {}, "sha512-g8W2D2kU6a8untc053fX1uVBKzM7yqAxW/3zwk83+6RyF2+SKOuV+c0wBDhUwzV1PaGapmZH+rmcUzPf+3CGwg=="], + + "zwitch": ["zwitch@2.0.4", "", {}, "sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A=="], + + "@angular-devkit/core/ajv": ["ajv@8.20.0", "", { "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", "json-schema-traverse": "^1.0.0", "require-from-string": "^2.0.2" } }, "sha512-Thbli+OlOj+iMPYFBVBfJ3OmCAnaSyNn4M1vz9T6Gka5Jt9ba/HIR56joy65tY6kx/FCF5VXNB819Y7/GUrBGA=="], "@angular-devkit/core/source-map": ["source-map@0.8.0", "", {}, "sha512-d8EqvL+k/SOXCreS/SUzg2ciyHqBBLcN/yuRjFsbvVhHTE2pgei7oAhmPM7kWFbkX6OSMQfUq4KbkF3au9lhYQ=="], "@angular-devkit/schematics/magic-string": ["magic-string@1.4.1", "", { "dependencies": { "@jridgewell/sourcemap-codec": "^1.6.0" } }, "sha512-8lyCu36ErXR0J9uaGKlKQoiLZKmtI63YGLE8G2o9jyRPdr4X47LusSOwgOJOzcVtp81fTAAjxR7BwKz682Jhow=="], + "@angular/cli/zod": ["zod@4.6.6", "", {}, "sha512-4UmzQUF5fxvfcYHlbjBmejU+w+hbDnWFx4aS8kBx7nPBHcO2SqPbpAG8snbdg+Xse4pRefR98hgjFgIMCI/UhA=="], + "@angular/compiler-cli/@babel/core": ["@babel/core@8.0.1", "", { "dependencies": { "@babel/code-frame": "^8.0.0", "@babel/generator": "^8.0.0", "@babel/helper-compilation-targets": "^8.0.0", "@babel/helpers": "^8.0.0", "@babel/parser": "^8.0.0", "@babel/template": "^8.0.0", "@babel/traverse": "^8.0.0", "@babel/types": "^8.0.0", "@types/gensync": "^1.0.5", "convert-source-map": "^2.0.0", "empathic": "^2.0.1", "gensync": "^1.0.0-beta.2", "import-meta-resolve": "^4.2.0", "json5": "^2.2.3", "obug": "^2.1.1", "semver": "^7.7.3" } }, "sha512-5FgxM4dLQpMJHSiVATk8foW263dVHQHBVpXYiimNECVWG01f4nFyEbQixeT6Mwvg7TayREJ2gpKl3o2RoMdnqw=="], "@angular/compiler-cli/convert-source-map": ["convert-source-map@1.9.0", "", {}, "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A=="], "@angular/compiler-cli/typescript": ["typescript@6.0.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw=="], + "@angular/forms/zod": ["zod@4.6.6", "", {}, "sha512-4UmzQUF5fxvfcYHlbjBmejU+w+hbDnWFx4aS8kBx7nPBHcO2SqPbpAG8snbdg+Xse4pRefR98hgjFgIMCI/UhA=="], + + "@antfu/install-pkg/package-manager-detector": ["package-manager-detector@1.9.0", "", {}, "sha512-zAMfbta9nPA8AKkA4WdmNAT8R8s6Dk0/xwPsqNnRidMFcLo1YkLuPDTgs2f64XdzS8vbLNnoJ+uUIkgbz7oRHA=="], + "@arethetypeswrong/core/typescript": ["typescript@5.6.1-rc", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-E3b2+1zEFu84jB0YQi9BORDjz9+jGbwwy1Zi3G0LUNw7a7cePUrHMRNy8aPh53nXpkFGVHSxIZo5vKTfYaFiBQ=="], "@babel/core/semver": ["semver@6.3.1", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA=="], @@ -1525,6 +2242,14 @@ "@manypkg/get-packages/fs-extra": ["fs-extra@8.1.0", "", { "dependencies": { "graceful-fs": "^4.2.0", "jsonfile": "^4.0.0", "universalify": "^0.1.0" } }, "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g=="], + "@mdx-js/mdx/estree-walker": ["estree-walker@3.0.3", "", { "dependencies": { "@types/estree": "^1.0.0" } }, "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g=="], + + "@mdx-js/mdx/source-map": ["source-map@0.7.6", "", {}, "sha512-i5uvt8C3ikiWeNZSVZNWcfZPItFQOsYTUAOkcUPGd8DqDy1uOUikjt5dG+uRlwyvR108Fb9DOd4GvXfT0N2/uQ=="], + + "@modelcontextprotocol/core/zod": ["zod@4.6.6", "", {}, "sha512-4UmzQUF5fxvfcYHlbjBmejU+w+hbDnWFx4aS8kBx7nPBHcO2SqPbpAG8snbdg+Xse4pRefR98hgjFgIMCI/UhA=="], + + "@modelcontextprotocol/server/zod": ["zod@4.6.6", "", {}, "sha512-4UmzQUF5fxvfcYHlbjBmejU+w+hbDnWFx4aS8kBx7nPBHcO2SqPbpAG8snbdg+Xse4pRefR98hgjFgIMCI/UhA=="], + "@oxc-parser/binding-wasm32-wasi/@emnapi/core": ["@emnapi/core@2.0.0-alpha.6", "", { "dependencies": { "@emnapi/wasi-threads": "2.2.0", "tslib": "^2.4.0" } }, "sha512-MNVvMV7WtEJMgqaWJMvCyupK7Oi8sZctUIgPRZTsiS3cVvefk8DXPflOU3MSBddtj/rrYHygpYgpHDgwXnI3+w=="], "@oxc-parser/binding-wasm32-wasi/@emnapi/runtime": ["@emnapi/runtime@2.0.0-alpha.6", "", { "dependencies": { "tslib": "^2.4.0" } }, "sha512-5ZR49ZsZ3cLvu5lkrVj6CMpHRgZjYz7XSlqK23GYYpyEqp749RVuIH0bEUKaGNghMh2pXRhIC3cnVrH28Y1j1Q=="], @@ -1557,15 +2282,21 @@ "@tailwindcss/oxide-wasm32-wasi/tslib": ["tslib@2.9.1", "", { "bundled": true }, "sha512-a4Ux9VKuIMHsOS7ENbEq6hK2ZGYIT27Rtl0E4eD9KqwxhKiQeMZE/9xb3IdYwWaSOyIBQLExhQgXDTYoiCxnWA=="], + "@tailwindcss/postcss/postcss": ["postcss@8.5.31", "", { "dependencies": { "nanoid": "^3.3.20", "picocolors": "^1.1.1", "source-map-js": "^1.2.2" } }, "sha512-YUbWYCgErwnMAVkjUnYa+KlMBzGpHwiIt/DE7f0G33AuX2LH9UcTk6KgWxd3zRU+pN3u/C+Xl3EnMLM4Hea7Sg=="], + "@volar/language-service/typescript": ["typescript@6.0.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw=="], "@volar/typescript/typescript": ["typescript@6.0.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw=="], - "@vue/compiler-sfc/postcss": ["postcss@8.5.33", "", { "dependencies": { "nanoid": "^3.3.20", "picocolors": "^1.1.1", "source-map-js": "^1.2.2" } }, "sha512-RVHEU9/Pp1Fnjr/MpAJsZoADukCKhfIi15OunEYiGktIkYLkPVvC1sioWolGDS7XByMTx9m/IGbro0Js13zhnQ=="], + "babel-plugin-react-compiler/@babel/types": ["@babel/types@7.29.0", "", { "dependencies": { "@babel/helper-string-parser": "^7.27.1", "@babel/helper-validator-identifier": "^7.28.5" } }, "sha512-LwdZHpScM4Qz8Xw2iKSzS+cfglZzJGvofQICy7W7v4caru4EaAmyUuO6BGrbyQ2mYV11W0U8j5mBhd14dd3B0A=="], - "ajv-formats/ajv": ["ajv@8.18.0", "", { "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", "json-schema-traverse": "^1.0.0", "require-from-string": "^2.0.2" } }, "sha512-PlXPeEWMXMZ7sPYOHqmDyCJzcfNrUr3fGNKtezX14ykXOEIvyK81d+qydx89KY5O71FKMPaQ2vBfBFI5NHR63A=="], + "beasties/postcss": ["postcss@8.5.31", "", { "dependencies": { "nanoid": "^3.3.20", "picocolors": "^1.1.1", "source-map-js": "^1.2.2" } }, "sha512-YUbWYCgErwnMAVkjUnYa+KlMBzGpHwiIt/DE7f0G33AuX2LH9UcTk6KgWxd3zRU+pN3u/C+Xl3EnMLM4Hea7Sg=="], - "babel-plugin-react-compiler/@babel/types": ["@babel/types@7.29.0", "", { "dependencies": { "@babel/helper-string-parser": "^7.27.1", "@babel/helper-validator-identifier": "^7.28.5" } }, "sha512-LwdZHpScM4Qz8Xw2iKSzS+cfglZzJGvofQICy7W7v4caru4EaAmyUuO6BGrbyQ2mYV11W0U8j5mBhd14dd3B0A=="], + "boxen/chalk": ["chalk@5.6.2", "", {}, "sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA=="], + + "boxen/string-width": ["string-width@5.1.2", "", { "dependencies": { "eastasianwidth": "^0.2.0", "emoji-regex": "^9.2.2", "strip-ansi": "^7.0.1" } }, "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA=="], + + "boxen/wrap-ansi": ["wrap-ansi@8.1.0", "", { "dependencies": { "ansi-styles": "^6.1.0", "string-width": "^5.0.1", "strip-ansi": "^7.0.1" } }, "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ=="], "classy-store-angular-example/@angular/build": ["@angular/build@22.2.7", "", { "dependencies": { "@ampproject/remapping": "2.3.0", "@angular-devkit/architect": "0.2202.7", "@babel/core": "8.0.5", "@inquirer/confirm": "6.3.2", "@parcel/watcher": "2.6.0", "@vitejs/plugin-basic-ssl": "2.3.0", "beasties": "0.5.4", "browserslist": "^4.26.0", "chokidar": "5.0.0", "esbuild": "0.28.2", "https-proxy-agent": "9.1.0", "jsonc-parser": "3.3.1", "listr2": "11.1.0", "magic-string": "1.4.1", "mrmime": "2.0.1", "oxc-parser": "0.156.0", "parse5-html-rewriting-stream": "8.0.1", "picomatch": "4.0.7", "piscina": "5.3.2", "rolldown": "1.2.16", "sass": "1.104.1", "sass-embedded": "1.104.1", "semver": "7.8.5", "source-map-support": "0.5.21", "tinyglobby": "0.2.17", "vite": "8.3.5", "xxhash-wasm": "1.1.0" }, "optionalDependencies": { "@oxc-parser/binding-wasm32-wasi": "0.156.0", "lmdb": "3.5.6" }, "peerDependencies": { "@angular/compiler": "^22.0.0", "@angular/compiler-cli": "^22.0.0", "@angular/core": "^22.0.0", "@angular/localize": "^22.0.0", "@angular/platform-browser": "^22.0.0", "@angular/platform-server": "^22.0.0", "@angular/service-worker": "^22.0.0", "@angular/ssr": "^22.2.7", "istanbul-lib-instrument": "^6.0.0", "karma": "^6.4.0", "less": "^4.2.0", "ng-packagr": "^22.0.0", "postcss": "^8.4.0", "rollup": "^4.0.0", "tailwindcss": "^2.0.0 || ^3.0.0 || ^4.0.0", "tslib": "^2.3.0", "typescript": ">=6.0 <6.1", "vitest": "^4.0.8 || ^5.0.0" }, "optionalPeers": ["@angular/core", "@angular/localize", "@angular/platform-browser", "@angular/platform-server", "@angular/service-worker", "@angular/ssr", "istanbul-lib-instrument", "karma", "less", "ng-packagr", "postcss", "rollup", "tailwindcss", "vitest"] }, "sha512-tQGzQPHvPK2oG5CqAsOMayU49WliSLlFV001poDpClmZ5d7cBsPeUZZlsEv84aMkplFDfhxqj6Guqd38T9HRdQ=="], @@ -1589,20 +2320,48 @@ "cliui/wrap-ansi": ["wrap-ansi@9.0.2", "", { "dependencies": { "ansi-styles": "^6.2.1", "string-width": "^7.0.0", "strip-ansi": "^7.1.0" } }, "sha512-42AtmgqjV+X1VpdOfyTGOYRi0/zsoLqtXQckTmqTeybT+BDIbM/Guxo7x3pE2vtpr1ok6xRqM9OpBe+Jyoqyww=="], + "compression/debug": ["debug@2.6.9", "", { "dependencies": { "ms": "2.0.0" } }, "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA=="], + + "cytoscape-fcose/cose-base": ["cose-base@2.2.0", "", { "dependencies": { "layout-base": "^2.0.0" } }, "sha512-AzlgcsCbUMymkADOJtQm3wO9S3ltPfYOFD5033keQn9NJzIbtnZj+UdBJe7DYml/8TdbtHJW3j58SOnKhWY/5g=="], + + "d3-dsv/commander": ["commander@7.2.0", "", {}, "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw=="], + + "d3-dsv/iconv-lite": ["iconv-lite@0.6.3", "", { "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" } }, "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw=="], + + "d3-sankey/d3-array": ["d3-array@2.12.1", "", { "dependencies": { "internmap": "^1.0.0" } }, "sha512-B0ErZK/66mHtEsR1TkPEEkwdy+WDesimkM5gpZr5Dsg54BiTA5RXtYW5qTLIAcekaS9xfZrzBLF/OAkB3Qn1YQ=="], + + "d3-sankey/d3-shape": ["d3-shape@1.3.7", "", { "dependencies": { "d3-path": "1" } }, "sha512-EUkvKjqPFUAZyOlhY5gzCxCeI0Aep04LwIRpsZ/mLFelJiUfnK56jo5JMDSE7yyP2kLSb6LtF+S5chMk7uqPqw=="], + "dom-serializer/entities": ["entities@8.1.0", "", {}, "sha512-kxL7msIffSuh9aaFAMD7rxAIuTRMAHMeBtgHW2yUdWw732ZNh4MehkF2gdjvtdmikkaIP9bFDDJOPlsvm7avrA=="], + "estree-util-build-jsx/estree-walker": ["estree-walker@3.0.3", "", { "dependencies": { "@types/estree": "^1.0.0" } }, "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g=="], + + "estree-util-to-js/source-map": ["source-map@0.7.6", "", {}, "sha512-i5uvt8C3ikiWeNZSVZNWcfZPItFQOsYTUAOkcUPGd8DqDy1uOUikjt5dG+uRlwyvR108Fb9DOd4GvXfT0N2/uQ=="], + + "fumadocs-mdx/chokidar": ["chokidar@6.0.0", "", { "dependencies": { "readdirp": "^5.1.1" } }, "sha512-Ec2Z7wpcKBiMpR7DxteoqS/sq5G5d2A4fpxzPv6+fD7xNNdrTghn7L11YwV5EN1B3i72Erc3XVT5FkWIDx90+A=="], + + "fumadocs-mdx/magic-string": ["magic-string@1.4.5", "", { "dependencies": { "@jridgewell/sourcemap-codec": "^1.6.0" } }, "sha512-oLLC2+YvQUfAa+vxoufE/yc1icb87M9iXIRqAoR/2EhE/8cb3SF/+Gi0c2By1B+5Vz2e2vQtUvHiu1+63Znh+w=="], + + "hast-util-to-jsx-runtime/style-to-object": ["style-to-object@2.0.2", "", { "dependencies": { "inline-style-parser": "0.2.9" } }, "sha512-QmbXPUylqU80HAgTOJeEOdbA40W9KtxmjMhQy+tq+b8F2aoh3aQLuy82hh2jm2qsC9hR9eI0+eQidTMydKcqRA=="], + "htmlparser2/entities": ["entities@8.1.0", "", {}, "sha512-kxL7msIffSuh9aaFAMD7rxAIuTRMAHMeBtgHW2yUdWw732ZNh4MehkF2gdjvtdmikkaIP9bFDDJOPlsvm7avrA=="], "is-reference/@types/estree": ["@types/estree@1.0.8", "", {}, "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w=="], + "katex/commander": ["commander@15.1.0", "", {}, "sha512-cgnQ88TRrWcC7pVq46RzJVRMktu3W2RcbnoidnfBsl1bmDCBwJS/udcIZpKoCrbAYYaCqsz1yZCVIgbIaU3ddQ=="], + "log-update/string-width": ["string-width@8.3.0", "", { "dependencies": { "get-east-asian-width": "^1.5.0", "strip-ansi": "^7.1.2" } }, "sha512-ZbmZM0JCihQN91dWnxoipT2KOEyHqEyfRXUyjuRhW8b/xnqPDoq4gWEVApTVa9db2wN8mmoikgFBbjh71+cGeQ=="], "log-update/strip-ansi": ["strip-ansi@7.2.0", "", { "dependencies": { "ansi-regex": "^6.2.2" } }, "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w=="], "marked-terminal/chalk": ["chalk@5.6.2", "", {}, "sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA=="], + "mermaid/marked": ["marked@16.4.2", "", { "bin": { "marked": "bin/marked.js" } }, "sha512-TI3V8YYWvkVf3KJe1dRkpnjs68JUPyEa5vjKrp1XEEJUAOaQc+Qj+L1qWbPd0SJuAdQkFU0h73sXXqwDYxsiDA=="], + "micromatch/picomatch": ["picomatch@2.3.2", "", {}, "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA=="], + "mime-types/mime-db": ["mime-db@1.33.0", "", {}, "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ=="], + "next/postcss": ["postcss@8.5.23", "", { "dependencies": { "nanoid": "^3.3.16", "picocolors": "^1.1.1", "source-map-js": "^1.2.1" } }, "sha512-g50586zr4bZmwFiTlflMu8E0bDTb5I5gertgwAKmsdUlTQIhZtunzUlD1WSzwcVWPoAVpsrA6vlfCD7oXvRwgg=="], "npm-package-arg/validate-npm-package-name": ["validate-npm-package-name@8.0.0", "", {}, "sha512-SCv6OOV6Xj2/3cXy3dGmADluJTNcL3o7hZAglNPTe+WYuEuvxgJzxPrSDLZhF+CwyQOubqgecjMmTJGMVLWjYQ=="], @@ -1613,6 +2372,8 @@ "oxc-parser/@oxc-project/types": ["@oxc-project/types@0.156.0", "", {}, "sha512-1Duyg48TdJNdyhEB8Xn1L36bT9Pv6GUtlKjHxOys8xkaF/rQq3XJE+bAurSK/AgIz5mGFsb77cn9Pb20+WCScw=="], + "parse-entities/@types/unist": ["@types/unist@2.0.11", "", {}, "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA=="], + "parse5/entities": ["entities@8.1.0", "", {}, "sha512-kxL7msIffSuh9aaFAMD7rxAIuTRMAHMeBtgHW2yUdWw732ZNh4MehkF2gdjvtdmikkaIP9bFDDJOPlsvm7avrA=="], "parse5-html-rewriting-stream/entities": ["entities@8.1.0", "", {}, "sha512-kxL7msIffSuh9aaFAMD7rxAIuTRMAHMeBtgHW2yUdWw732ZNh4MehkF2gdjvtdmikkaIP9bFDDJOPlsvm7avrA=="], @@ -1625,6 +2386,10 @@ "sass-embedded/supports-color": ["supports-color@8.1.1", "", { "dependencies": { "has-flag": "^4.0.0" } }, "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q=="], + "serve/chalk": ["chalk@5.0.1", "", {}, "sha512-Fo07WOYGqMfCWHOzSXOt2CxDbC6skS/jO9ynEcmpANMoPrD+W1r1K6Vx7iNm+AQmETU1Xr2t+n8nzkV9t6xh3w=="], + + "serve-handler/bytes": ["bytes@3.0.0", "", {}, "sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw=="], + "slice-ansi/ansi-styles": ["ansi-styles@6.2.3", "", {}, "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg=="], "slice-ansi/is-fullwidth-code-point": ["is-fullwidth-code-point@5.1.0", "", { "dependencies": { "get-east-asian-width": "^1.3.1" } }, "sha512-5XHYaSyiqADb4RnZ1Bdad6cPp8Toise4TzEjcOYDHZkTCbKgiUl7WTUCpNWHuxmDt91wnsZBc9xinNzopv3JMQ=="], @@ -1633,10 +2398,10 @@ "unconfig-core/quansync": ["quansync@1.0.0", "", {}, "sha512-5xZacEEufv3HSTPQuchrvV6soaiACMFnq1H8wkVioctoH3TRha9Sz66lOxRwPK/qZj7HPiSveih9yAyh98gvqA=="], - "vite/postcss": ["postcss@8.5.33", "", { "dependencies": { "nanoid": "^3.3.20", "picocolors": "^1.1.1", "source-map-js": "^1.2.2" } }, "sha512-RVHEU9/Pp1Fnjr/MpAJsZoADukCKhfIi15OunEYiGktIkYLkPVvC1sioWolGDS7XByMTx9m/IGbro0Js13zhnQ=="], - "vite/rolldown": ["rolldown@1.2.19", "", { "dependencies": { "@oxc-project/types": "=0.156.0", "@rolldown/pluginutils": "^1.0.0" }, "optionalDependencies": { "@rolldown/binding-android-arm-eabi": "1.2.19", "@rolldown/binding-android-arm64": "1.2.19", "@rolldown/binding-darwin-arm64": "1.2.19", "@rolldown/binding-darwin-x64": "1.2.19", "@rolldown/binding-freebsd-x64": "1.2.19", "@rolldown/binding-linux-arm-gnueabihf": "1.2.19", "@rolldown/binding-linux-arm64-gnu": "1.2.19", "@rolldown/binding-linux-arm64-musl": "1.2.19", "@rolldown/binding-linux-ppc64-gnu": "1.2.19", "@rolldown/binding-linux-s390x-gnu": "1.2.19", "@rolldown/binding-linux-x64-gnu": "1.2.19", "@rolldown/binding-linux-x64-musl": "1.2.19", "@rolldown/binding-openharmony-arm64": "1.2.19", "@rolldown/binding-wasm32-wasi": "1.2.19", "@rolldown/binding-win32-arm64-msvc": "1.2.19", "@rolldown/binding-win32-x64-msvc": "1.2.19" }, "bin": { "rolldown": "./bin/cli.mjs" } }, "sha512-QIiV1J9d0pzN4jeeTH4sjPy0AZ6cAy2cG0ExeoE1+U8Rvj+hR3gYkokx0YbeUNGlZqiQJJ2utcETe0oKXwzsuA=="], + "widest-line/string-width": ["string-width@5.1.2", "", { "dependencies": { "eastasianwidth": "^0.2.0", "emoji-regex": "^9.2.2", "strip-ansi": "^7.0.1" } }, "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA=="], + "wrap-ansi/ansi-styles": ["ansi-styles@6.2.3", "", {}, "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg=="], "wrap-ansi/string-width": ["string-width@8.3.0", "", { "dependencies": { "get-east-asian-width": "^1.5.0", "strip-ansi": "^7.1.2" } }, "sha512-ZbmZM0JCihQN91dWnxoipT2KOEyHqEyfRXUyjuRhW8b/xnqPDoq4gWEVApTVa9db2wN8mmoikgFBbjh71+cGeQ=="], @@ -1681,6 +2446,14 @@ "babel-plugin-react-compiler/@babel/types/@babel/helper-validator-identifier": ["@babel/helper-validator-identifier@7.28.5", "", {}, "sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q=="], + "boxen/string-width/emoji-regex": ["emoji-regex@9.2.2", "", {}, "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg=="], + + "boxen/string-width/strip-ansi": ["strip-ansi@7.2.0", "", { "dependencies": { "ansi-regex": "^6.2.2" } }, "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w=="], + + "boxen/wrap-ansi/ansi-styles": ["ansi-styles@6.2.3", "", {}, "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg=="], + + "boxen/wrap-ansi/strip-ansi": ["strip-ansi@7.2.0", "", { "dependencies": { "ansi-regex": "^6.2.2" } }, "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w=="], + "classy-store-angular-example/@angular/build/@babel/core": ["@babel/core@8.0.5", "", { "dependencies": { "@babel/code-frame": "^8.0.0", "@babel/generator": "^8.0.5", "@babel/helper-compilation-targets": "^8.0.5", "@babel/helpers": "^8.0.5", "@babel/parser": "^8.0.5", "@babel/template": "^8.0.0", "@babel/traverse": "^8.0.5", "@babel/types": "^8.0.5", "@types/gensync": "^1.0.5", "convert-source-map": "^2.0.0", "empathic": "^2.0.1", "gensync": "^1.0.0-beta.2", "import-meta-resolve": "^4.2.0", "json5": "^2.2.3", "obug": "^2.1.1", "verkit": "^0.3.2" } }, "sha512-2/oWkgTbBYoqioCWAE4XJobOrzwxTDa5/XjDP3tJ1BhDr/owcd9qnXBp4xc3/2G5X4bvXM04nrxbRJxFcXAxFQ=="], "classy-store-angular-example/@angular/build/magic-string": ["magic-string@1.4.1", "", { "dependencies": { "@jridgewell/sourcemap-codec": "^1.6.0" } }, "sha512-8lyCu36ErXR0J9uaGKlKQoiLZKmtI63YGLE8G2o9jyRPdr4X47LusSOwgOJOzcVtp81fTAAjxR7BwKz682Jhow=="], @@ -1703,6 +2476,14 @@ "cliui/wrap-ansi/ansi-styles": ["ansi-styles@6.2.3", "", {}, "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg=="], + "compression/debug/ms": ["ms@2.0.0", "", {}, "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A=="], + + "cytoscape-fcose/cose-base/layout-base": ["layout-base@2.0.1", "", {}, "sha512-dp3s92+uNI1hWIpPGH3jK2kxE2lMjdXdr+DH8ynZHpd6PUlH6x6cbuXnoMmiNumznqaNO31xu9e79F0uuZ0JFg=="], + + "d3-sankey/d3-shape/d3-path": ["d3-path@1.0.9", "", {}, "sha512-VLaYcn81dtHVTjEHd8B+pbe9yHWpXKZUC87PzoFmsFrJqgFwDe/qxfp5MlfsfM1V5E/iVt0MmEbWQ7FVIXh/bg=="], + + "hast-util-to-jsx-runtime/style-to-object/inline-style-parser": ["inline-style-parser@0.2.9", "", {}, "sha512-IttN8BqKLxzUrnTqHI+/hwAJQItBAUjdoHERCDv+oOuX48VP6bzW8+QjOXSfoevzq3YrYAwX1uLHp8TqO9yIeg=="], + "log-update/strip-ansi/ansi-regex": ["ansi-regex@6.2.2", "", {}, "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg=="], "ora/string-width/strip-ansi": ["strip-ansi@7.2.0", "", { "dependencies": { "ansi-regex": "^6.2.2" } }, "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w=="], @@ -1743,6 +2524,10 @@ "vite/rolldown/@rolldown/binding-win32-x64-msvc": ["@rolldown/binding-win32-x64-msvc@1.2.19", "", { "os": "win32", "cpu": "x64" }, "sha512-y/sqRRc6d7hECzOFc5n3LSeqctmIp9mMjY1Kq4s14uLPd/LZ4z7i1zrW6fMtp2mPeuQIC4e6ULMcwQzMomqQag=="], + "widest-line/string-width/emoji-regex": ["emoji-regex@9.2.2", "", {}, "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg=="], + + "widest-line/string-width/strip-ansi": ["strip-ansi@7.2.0", "", { "dependencies": { "ansi-regex": "^6.2.2" } }, "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w=="], + "wrap-ansi/string-width/strip-ansi": ["strip-ansi@7.2.0", "", { "dependencies": { "ansi-regex": "^6.2.2" } }, "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w=="], "yargs/string-width/strip-ansi": ["strip-ansi@7.2.0", "", { "dependencies": { "ansi-regex": "^6.2.2" } }, "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w=="], @@ -1765,6 +2550,10 @@ "@angular/compiler-cli/@babel/core/@babel/types/@babel/helper-validator-identifier": ["@babel/helper-validator-identifier@8.0.6", "", {}, "sha512-HYx0YmuchRxRSpnjvcNffnPS8DCauKNmnumIuHG3jnQAVewRA7kfJGwF13ayEpSZs7s4R/oBH4eppuXcAQd5JQ=="], + "boxen/string-width/strip-ansi/ansi-regex": ["ansi-regex@6.2.2", "", {}, "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg=="], + + "boxen/wrap-ansi/strip-ansi/ansi-regex": ["ansi-regex@6.2.2", "", {}, "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg=="], + "classy-store-angular-example/@angular/build/@babel/core/@babel/code-frame": ["@babel/code-frame@8.0.6", "", { "dependencies": { "@babel/helper-validator-identifier": "^8.0.6", "js-tokens": "^10.0.0" } }, "sha512-uMHhvmDmwFiLuiozaoRYTZHqMFuu3fem/X9JY78lohAuLoh8LSGGC8JqUzo2cVuBsBxkjMZNk56CE7ock8Xxkw=="], "classy-store-angular-example/@angular/build/@babel/core/@babel/generator": ["@babel/generator@8.0.6", "", { "dependencies": { "@babel/parser": "^8.0.6", "@babel/types": "^8.0.6", "@jridgewell/gen-mapping": "0.4.0-beta.0", "@jridgewell/trace-mapping": "^0.3.31", "@types/jsesc": "^2.5.0", "jsesc": "^3.0.2" } }, "sha512-/pcanjdRsonCexCuxgGD8fKnBLLzk2i9uM4kmcmGyyev2R5YDs+rafMYZ89RvaGY1mW8T7C5au0TyYaEeHBGng=="], @@ -1817,6 +2606,8 @@ "classy-store-angular-example/@angular/build/rolldown/@rolldown/binding-win32-x64-msvc": ["@rolldown/binding-win32-x64-msvc@1.2.16", "", { "os": "win32", "cpu": "x64" }, "sha512-1lv1KvX0Z871zfk7vw+dnXMMnHNyDwMzWG8Kv3HxDXMOhzCX4SHc7HK319fInP0i+0p9D8brkfzL7pJOaGl+tw=="], + "classy-store-angular-example/@angular/build/vite/postcss": ["postcss@8.5.31", "", { "dependencies": { "nanoid": "^3.3.20", "picocolors": "^1.1.1", "source-map-js": "^1.2.2" } }, "sha512-YUbWYCgErwnMAVkjUnYa+KlMBzGpHwiIt/DE7f0G33AuX2LH9UcTk6KgWxd3zRU+pN3u/C+Xl3EnMLM4Hea7Sg=="], + "classy-store-angular-example/@angular/build/vite/rolldown": ["rolldown@1.2.14", "", { "dependencies": { "@oxc-project/types": "=0.154.0", "@rolldown/pluginutils": "^1.0.0" }, "optionalDependencies": { "@rolldown/binding-android-arm-eabi": "1.2.14", "@rolldown/binding-android-arm64": "1.2.14", "@rolldown/binding-darwin-arm64": "1.2.14", "@rolldown/binding-darwin-x64": "1.2.14", "@rolldown/binding-freebsd-x64": "1.2.14", "@rolldown/binding-linux-arm-gnueabihf": "1.2.14", "@rolldown/binding-linux-arm64-gnu": "1.2.14", "@rolldown/binding-linux-arm64-musl": "1.2.14", "@rolldown/binding-linux-ppc64-gnu": "1.2.14", "@rolldown/binding-linux-s390x-gnu": "1.2.14", "@rolldown/binding-linux-x64-gnu": "1.2.14", "@rolldown/binding-linux-x64-musl": "1.2.14", "@rolldown/binding-openharmony-arm64": "1.2.14", "@rolldown/binding-win32-arm64-msvc": "1.2.14", "@rolldown/binding-win32-x64-msvc": "1.2.14" }, "bin": { "rolldown": "./bin/cli.mjs" } }, "sha512-eTBTTqMR6uHKLgcUqpJP8ntzDI6V4LYA8negAMBEI7gkgVvOdrx6VsvS2Ym+83KhOPdLCHWJu0w7UQFJZhHKNw=="], "classy-store-svelte-example/svelte-check/chokidar/readdirp": ["readdirp@4.1.2", "", {}, "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg=="], @@ -1831,6 +2622,8 @@ "vite/rolldown/@rolldown/binding-wasm32-wasi/@emnapi/runtime": ["@emnapi/runtime@2.0.0-beta.2", "", { "dependencies": { "tslib": "^2.4.0" } }, "sha512-JcrSPzPvZuNZvJqPTF9Fw25LbOJ8avzFVlaf2grmH4Cku0oGP47tRgqPZadcfj3YoZMHkFVnCYFbQM8I+i5QEw=="], + "widest-line/string-width/strip-ansi/ansi-regex": ["ansi-regex@6.2.2", "", {}, "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg=="], + "wrap-ansi/string-width/strip-ansi/ansi-regex": ["ansi-regex@6.2.2", "", {}, "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg=="], "yargs/string-width/strip-ansi/ansi-regex": ["ansi-regex@6.2.2", "", {}, "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg=="], diff --git a/examples/nextjs/package.json b/examples/nextjs/package.json index 22dd25da..6424b56c 100644 --- a/examples/nextjs/package.json +++ b/examples/nextjs/package.json @@ -5,7 +5,8 @@ "scripts": { "dev": "bun --bun next dev", "build": "bun --bun next build", - "start": "bun --bun next start" + "start": "bun --bun next start", + "typecheck": "tsc --noEmit" }, "dependencies": { "@codebelt/classy-store": "workspace:*", diff --git a/examples/nextjs/src/components/features/FeatureMap.tsx b/examples/nextjs/src/components/features/FeatureMap.tsx index 4fdd9006..3606eedd 100644 --- a/examples/nextjs/src/components/features/FeatureMap.tsx +++ b/examples/nextjs/src/components/features/FeatureMap.tsx @@ -215,6 +215,12 @@ const sections: FeatureSection[] = [ {label: 'Shopping / AddItemForm', href: '/shopping'}, ], }, + { + api: 'Transactions', + description: + 'A store method that writes many fields notifies React once, when it returns', + links: [{label: 'Planner / PlannerGrid', href: '/planner'}], + }, { api: 'Cross-store reads', description: 'One component reads from multiple stores', diff --git a/package.json b/package.json index 86d85a12..4e7d52d3 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,8 @@ "private": true, "workspaces": [ "packages/*", - "examples/*" + "examples/*", + "website" ], "scripts": { "---------- Dev --------------------------------------------------------": "", @@ -24,7 +25,7 @@ "lint": "biome check", "lint:fix": "biome check --write", "check:package": "bun run build && bun run --filter @codebelt/classy-store check:package", - "typecheck": "bun run --filter @codebelt/classy-store typecheck && bun run --filter @codebelt/classy-store typecheck:scoping && bun run --filter classy-store-svelte-example check:integration && bun run --filter classy-store-vue-example check:integration && bun run --filter classy-store-solid-example typecheck && bun run --filter classy-store-solid-example check:integration && bun run --filter classy-store-angular-example typecheck && bun run --filter classy-store-angular-example check:integration", + "typecheck": "bun run --filter @codebelt/classy-store typecheck && bun run --filter @codebelt/classy-store typecheck:scoping && bun run --filter classy-store-svelte-example check:integration && bun run --filter classy-store-vue-example check:integration && bun run --filter classy-store-solid-example typecheck && bun run --filter classy-store-solid-example check:integration && bun run --filter classy-store-angular-example typecheck && bun run --filter classy-store-angular-example check:integration && bun run --filter classy-store-nextjs-example typecheck && bun run --filter classy-store-docs types:check", "---------- Release (Changesets) ----------------------------------------": "", "changeset": "changeset", "changeset:add": "changeset add", @@ -39,8 +40,8 @@ "solid:dev": "cd examples/solid && bun run dev", "angular:dev": "cd examples/angular && bun run start", "---------- Docs (Fumadocs) ------------------------------------------": "", - "docs:dev": "bun run --cwd website dev", - "docs:build": "bun run --cwd website build:pages", + "docs:dev": "bun run build && bun run --cwd website dev", + "docs:build": "bun run build && bun run --cwd website build:pages", "docs:test": "bun run --cwd website test:pages", "---------- CI / Helper ------------------------------------------------": "", "checkall": "bun run lint:fix && bun run test && bun run typecheck", diff --git a/packages/classy-store/package.json b/packages/classy-store/package.json index eeff5024..45625bc4 100644 --- a/packages/classy-store/package.json +++ b/packages/classy-store/package.json @@ -9,7 +9,7 @@ }, "type": "module", "engines": { - "node": ">=20" + "node": ">=22" }, "main": "./dist/index.cjs", "module": "./dist/index.mjs", diff --git a/website/bun.lock b/website/bun.lock deleted file mode 100644 index 3e72e0a5..00000000 --- a/website/bun.lock +++ /dev/null @@ -1,1143 +0,0 @@ -{ - "lockfileVersion": 1, - "configVersion": 1, - "workspaces": { - "": { - "name": "website-fumadocs", - "dependencies": { - "@codebelt/classy-store": "0.11.0", - "fumadocs-core": "16.19.4", - "fumadocs-mdx": "15.6.3", - "fumadocs-ui": "npm:@fumadocs/base-ui@16.19.4", - "mermaid": "^12.3.0", - "next": "16.4.6", - "next-themes": "0.4.6", - "react": "^19.3.1", - "react-dom": "^19.3.1", - }, - "devDependencies": { - "@playwright/test": "1.65.1", - "@tailwindcss/postcss": "^4.3.5", - "@types/mdx": "^2.0.14", - "@types/node": "^26.6.6", - "@types/react": "^19.3.0", - "@types/react-dom": "^19.3.0", - "postcss": "^8.5.33", - "serve": "^14.2.8", - "tailwindcss": "^4.3.5", - "typescript": "^7.0.2", - }, - }, - }, - "packages": { - "@alloc/quick-lru": ["@alloc/quick-lru@5.3.0", "", {}, "sha512-U4+70Pc5ZS9osnCBCE5Jha/ciHM+Yp+CNMNC/7HvYbNRk1Ldd+f7qO65W5qfhu/TCv+/ozljlXXe9Nj8419DMA=="], - - "@antfu/install-pkg": ["@antfu/install-pkg@2.1.0", "", { "dependencies": { "package-manager-detector": "^1.8.0", "tinyexec": "^1.3.1" } }, "sha512-sdg9NxU3zR4Mnawfbc/x6GB5Wf17WYud5qOuEuxXjaKpYpMkISSJEjItGebXJ2bQ4DIcly4NYH23mtkGJjvKUw=="], - - "@babel/runtime": ["@babel/runtime@8.0.7", "", {}, "sha512-k0hagDDq/6w4v+0Sp4wFvIz/yswH5O7Va6aRTnD7N62Tnborp4X+YB+H3XUcWVSR4aE47WPEXiIIZchBs0GmYg=="], - - "@base-ui/react": ["@base-ui/react@1.9.0", "", { "dependencies": { "@babel/runtime": "^7.29.7 || ^8.0.0", "@base-ui/utils": "0.5.0", "@floating-ui/react-dom": "^2.1.9", "@floating-ui/utils": "^0.2.12", "use-sync-external-store": "^1.7.0" }, "peerDependencies": { "@date-fns/tz": "^1.2.0", "@types/react": "^17 || ^18 || ^19", "date-fns": "^4.0.0", "react": "^17 || ^18 || ^19", "react-dom": "^17 || ^18 || ^19" }, "optionalPeers": ["@date-fns/tz", "@types/react", "date-fns"] }, "sha512-S8CSYosASBKtpL8SWUfS78rFElfLijiCgA7oHOK22jCJ95FULsYyKwBNFOgudt0RA+/7yNc7F81bOvQnRgbBiQ=="], - - "@base-ui/utils": ["@base-ui/utils@0.5.0", "", { "dependencies": { "@babel/runtime": "^7.29.7 || ^8.0.0", "@floating-ui/utils": "^0.2.12", "reselect": "^5.3.0", "use-sync-external-store": "^1.7.0" }, "peerDependencies": { "@types/react": "^17 || ^18 || ^19", "react": "^17 || ^18 || ^19", "react-dom": "^17 || ^18 || ^19" }, "optionalPeers": ["@types/react"] }, "sha512-dYGGcEttjkYiMoa5nHm8vLaJ2UcuTWxo3BFAwOYXeRg/q7UVVvA6cacEIXEs3FgBfK1CGtW1ptElqs7wsx+t9A=="], - - "@braintree/sanitize-url": ["@braintree/sanitize-url@7.1.2", "", {}, "sha512-jigsZK+sMF/cuiB7sERuo9V7N9jx+dhmHHnQyDSVdpZwVutaBu7WvNYqMDLSgFgfB30n452TP3vjDAvFC973mA=="], - - "@chevrotain/cst-dts-gen": ["@chevrotain/cst-dts-gen@13.2.0", "", { "dependencies": { "@chevrotain/gast": "13.2.0", "@chevrotain/types": "13.2.0" } }, "sha512-bA9dvWlhAUcHkNwU+8w9yiUxJPlj/Lm3VqS7MD+NbIR/7LmpNLuK/AWNFdCo/T3SK5ND0/UHf3IJvl/Jn/i6yg=="], - - "@chevrotain/gast": ["@chevrotain/gast@13.2.0", "", { "dependencies": { "@chevrotain/types": "13.2.0" } }, "sha512-bCARdAsG+eEbOveSXcOAC7pVxA04I1ionzeMOwIYf5NX7SaS7zgn4Dgug2BSqoL+iyKeMNSorQjsFSHJHsCNwg=="], - - "@chevrotain/regexp-to-ast": ["@chevrotain/regexp-to-ast@13.2.0", "", {}, "sha512-kxpUkLtiaK09ph+dib+Yvm+3sWSnuwlo25gqfKRgTPNmF6H7uW4gVkMjaRdtnN783S9sM6vUNWh9CsxYX4QwKw=="], - - "@chevrotain/types": ["@chevrotain/types@13.2.0", "", {}, "sha512-7qrYHRlKfWf2AvBfJi5eVOrKAkbxvMFsy/iIHTGIiApNcEecCaVIdR+mIQhyCBsTDJxBz4JWXHMo6krbhR9hVg=="], - - "@chevrotain/utils": ["@chevrotain/utils@13.2.0", "", {}, "sha512-SzKYY68rseOrb9KILVzPsl6SjkQtdWw01SRGB5aCVI5kFcHltQsOYV3JB0Ffst72DgkvHCyDQ0NLwxtmCCf97Q=="], - - "@codebelt/classy-store": ["@codebelt/classy-store@0.11.0", "", { "dependencies": { "proxy-compare": "3.0.1" }, "peerDependencies": { "@angular/core": "^22.0.0", "react": "^18.0.0 || ^19.0.0", "solid-js": "2.0.0-rc.18", "svelte": "^4.0.0 || ^5.0.0", "vue": "^3.2.0" }, "optionalPeers": ["@angular/core", "react", "solid-js", "svelte", "vue"] }, "sha512-tVplXA4CIjKW30cYvvOG08kMySzuOIL5bT3+3v2wcu1EipDCsFMqQ55zeMc7dfJrxnryr2AaBQ9RbLSahLczMw=="], - - "@emnapi/runtime": ["@emnapi/runtime@1.11.3", "", { "dependencies": { "tslib": "^2.4.0" } }, "sha512-Xz4Tpyki7XyrpbUK1jR1AhdAdaXyhhY4lZ3neLodmhpuWfy2PAQN5B46sAiU4liOXGLkHypn/qU+jvfWSCYYLA=="], - - "@esbuild/aix-ppc64": ["@esbuild/aix-ppc64@0.28.2", "", { "os": "aix", "cpu": "ppc64" }, "sha512-XExcO+dvLKvVtNTibSTBej1NCAbaGhWn9Ww1ZPx80qsahhPFe/8jgWP0IchNe0F3HwkU7n8ejhH8bjonqht8mQ=="], - - "@esbuild/android-arm": ["@esbuild/android-arm@0.28.2", "", { "os": "android", "cpu": "arm" }, "sha512-kXXoiPVVGQcnIYGOeaovwOURpniDBpSq4A03qkQ+BMQqtGG6HYap3xne9C1O1yo4TR3qxlCX5IqqmX6fFo2Lqg=="], - - "@esbuild/android-arm64": ["@esbuild/android-arm64@0.28.2", "", { "os": "android", "cpu": "arm64" }, "sha512-5YfKeeI8qWfBZIX+u2xZC3Zlb3Os/gLS2sbEKM+I4ZOcsWmHS2WLysCcQZDAFRslDUU5Oiq44gf6PYN1vGwG5A=="], - - "@esbuild/android-x64": ["@esbuild/android-x64@0.28.2", "", { "os": "android", "cpu": "x64" }, "sha512-O387ite7SzUyCcy3JQX4P4bLtEA7bLLkx+esve5JHnyYfNTxcVpXZo9jhdB0lTKN44gztELTdU7nS8Nr16Fs1Q=="], - - "@esbuild/darwin-arm64": ["@esbuild/darwin-arm64@0.28.2", "", { "os": "darwin", "cpu": "arm64" }, "sha512-n4KqkOQrraxHJcgjM1RvwbigfQKIKJVpM7xp+KsxiyUSrRdIXnt73VhrPAx0fV44hgfmIVKjxMN9J1t5jySVkw=="], - - "@esbuild/darwin-x64": ["@esbuild/darwin-x64@0.28.2", "", { "os": "darwin", "cpu": "x64" }, "sha512-uq6suIWYP37qzGddBKPw5QEQPi6HiLGsO7UmkpfyaYNQ3D+rN6w6WfwH+nuqcGXWvawGwxOEroO4YGnFh95azw=="], - - "@esbuild/freebsd-arm64": ["@esbuild/freebsd-arm64@0.28.2", "", { "os": "freebsd", "cpu": "arm64" }, "sha512-n+I0BTSRIoy+d6RPKnEVwql5UwBJolytvY4mAOIEJorKlqgPII8ix6slVVrfZ5Tnj7glIZvloylbB/EJPMWEXw=="], - - "@esbuild/freebsd-x64": ["@esbuild/freebsd-x64@0.28.2", "", { "os": "freebsd", "cpu": "x64" }, "sha512-78XJTJkvPs0kz2w61301PJjXl4g7q3JqiYMZ/M/yVI73EHBrCRTgkhu9oqG7vPqq+a/yadEW8aD+agKlk5xrmg=="], - - "@esbuild/linux-arm": ["@esbuild/linux-arm@0.28.2", "", { "os": "linux", "cpu": "arm" }, "sha512-XlDnu2q5yoqems+xay6wSAcg9DDD7K9RLKZEBOMZm3ckNpJBvOX20tSfby8KfrrhINDyv9V2YVZKY/SpoGJI8w=="], - - "@esbuild/linux-arm64": ["@esbuild/linux-arm64@0.28.2", "", { "os": "linux", "cpu": "arm64" }, "sha512-pW4AC0P3it8c7do9MVM4p51FzHzdM/TZrerurgRcHJ2WTa1VQ1CIq18xncfpBJw4ojkiZZrKW2yIBWBP92j6Ug=="], - - "@esbuild/linux-ia32": ["@esbuild/linux-ia32@0.28.2", "", { "os": "linux", "cpu": "ia32" }, "sha512-CYbnj78HsIeA+DhgUKgFCfvNsTHFhMMrinUrMZpDXJXKN8T3XViTZ/+wtHeVxEWY8ewSzTFN+nRmSwO2tZaLUQ=="], - - "@esbuild/linux-loong64": ["@esbuild/linux-loong64@0.28.2", "", { "os": "linux", "cpu": "none" }, "sha512-buwkd8nsph4R+ajRvw0qM5Hja/TXQow3ptzWO2EbG/cqcIkHloRrdlBtQlshyYGTNFvfkfJ5tpPLVkY4DtsPfQ=="], - - "@esbuild/linux-mips64el": ["@esbuild/linux-mips64el@0.28.2", "", { "os": "linux", "cpu": "none" }, "sha512-ZVykbDyk7519VwiNb9Lcj9m8XM6v5V9uKPvrEMkkEedVewf+0itkhahp4HDpgERXhwLRpWFypsGbG/J8s0QjJA=="], - - "@esbuild/linux-ppc64": ["@esbuild/linux-ppc64@0.28.2", "", { "os": "linux", "cpu": "ppc64" }, "sha512-CAXl+Dtd9UUuJd8pKKdwh6MLm3MUMiqMPmhZ3tTSXPqfyQ3vDl6R5hZdZ/kYojK4ofXtdfSv1tFq8XzWx3heNQ=="], - - "@esbuild/linux-riscv64": ["@esbuild/linux-riscv64@0.28.2", "", { "os": "linux", "cpu": "none" }, "sha512-GeXCej4IQtU1B+QlDV8W/RRvbzI3O/Stss+/bCXv4lZls5WGRtu2a+3JkA3i4qIUlMXpcHebWpF8AkJhATowuA=="], - - "@esbuild/linux-s390x": ["@esbuild/linux-s390x@0.28.2", "", { "os": "linux", "cpu": "s390x" }, "sha512-3H1weTYZPxt/WOhByszQZybS9w5lKzUn1FDMsgEChbHWQwHYQQRfBxgCcZvPhjHfKyJjIievvMmEUawJrdY9Dg=="], - - "@esbuild/linux-x64": ["@esbuild/linux-x64@0.28.2", "", { "os": "linux", "cpu": "x64" }, "sha512-4xTZr1FUmSoQW4XIWmit3tzQrUTZM+N3P0XV8xROKYF50XfI7xeO90+1bZvNwxIufQ9hDQVRJH5YhgPVF8A/HQ=="], - - "@esbuild/netbsd-arm64": ["@esbuild/netbsd-arm64@0.28.2", "", { "os": "none", "cpu": "arm64" }, "sha512-sSATRjPeDBg3pdgHoQfoYBob11Kk1FGa9lui5RIHZCoCkJa9QKlvl3/vKz2usCmYYjs7ymJR/2Nnsqe+Hjt5nw=="], - - "@esbuild/netbsd-x64": ["@esbuild/netbsd-x64@0.28.2", "", { "os": "none", "cpu": "x64" }, "sha512-lqnzCV+mM0gIADaKihiCg6ifgfU2L3h5E33rNQBN1Y4MaVGnzryzmvvf7UHxprpQdE8hpqLolJ9Rl+SkIRDpyw=="], - - "@esbuild/openbsd-arm64": ["@esbuild/openbsd-arm64@0.28.2", "", { "os": "openbsd", "cpu": "arm64" }, "sha512-AL2qJILH7lNjrDmCQDvdxMfAUIv8KMNZOvrwAQ8i8//ntL9FflhOyMJ8OZSMBb8/AWXe3/5v5S20y3zCoZWKoQ=="], - - "@esbuild/openbsd-x64": ["@esbuild/openbsd-x64@0.28.2", "", { "os": "openbsd", "cpu": "x64" }, "sha512-QtiuPytchRyC4rwUKhexJdQKvDuZ6hWloi3igqPQNUJCS1/v9EiO3UTOXR6A3FoMo4fnAKbWJdqaIwhOzh8qEw=="], - - "@esbuild/openharmony-arm64": ["@esbuild/openharmony-arm64@0.28.2", "", { "os": "none", "cpu": "arm64" }, "sha512-WkhYDmpTjLvGlScA1rwjRUmhl4k8oXR3cIbtqWmELgU/dFeHHlEllxDvdWcNJV9rbzCexB5vz8gtNewWLgCT7Q=="], - - "@esbuild/sunos-x64": ["@esbuild/sunos-x64@0.28.2", "", { "os": "sunos", "cpu": "x64" }, "sha512-GPMSkTOtMnv2U2F8gxe4Io6qmVs+YKyp832Etqqxr0hFngmXQ3rzwytelm3GIn7T4VviRUlf3sOgBOiTdvaf7g=="], - - "@esbuild/win32-arm64": ["@esbuild/win32-arm64@0.28.2", "", { "os": "win32", "cpu": "arm64" }, "sha512-PIhhEkE9uPBleRBrQEJpUn7MBnibZzbGzYWPmY3x+YoVg/95zbjB4CxPPOQ8l5tYYM4mMaCthF8/1DIfBQQyWQ=="], - - "@esbuild/win32-ia32": ["@esbuild/win32-ia32@0.28.2", "", { "os": "win32", "cpu": "ia32" }, "sha512-YmJbfTlvU7Sdn9BB+4PRES4oB6pxgS37MAONj+hBr/cpXS1aBPKXxNnDbu+QCWPj0o9dgyxeq79g6c5P8KeuYA=="], - - "@esbuild/win32-x64": ["@esbuild/win32-x64@0.28.2", "", { "os": "win32", "cpu": "x64" }, "sha512-5ebpxr3nWMzrL/rnUI755Jkuee0bHL/Gq0WTF9lvcpv73wAp5eu8MfBUgWK9bhWvZjj7yX8etf/8tI8Ney695g=="], - - "@floating-ui/core": ["@floating-ui/core@1.8.0", "", { "dependencies": { "@floating-ui/utils": "^0.2.12" } }, "sha512-0CIZ5itps/8x7BG8dEIhs53BvCUH2PCoogtakwRTut+Arm58sJooJ0AuZhLw2HJYIR5cMLNPBSS728sPho2khQ=="], - - "@floating-ui/dom": ["@floating-ui/dom@1.8.0", "", { "dependencies": { "@floating-ui/core": "^1.8.0", "@floating-ui/utils": "^0.2.12" } }, "sha512-yXSrzeHZBTZadLOlfyhCkJHNeLJnHRnRInwdZ40L7ZiaAtrBwoYlsDrX3v5zB1Utk7CLfzcOVnVVWoXEky7Ceg=="], - - "@floating-ui/react-dom": ["@floating-ui/react-dom@2.1.9", "", { "dependencies": { "@floating-ui/dom": "^1.8.0" }, "peerDependencies": { "react": ">=16.8.0", "react-dom": ">=16.8.0" } }, "sha512-JDjEFGCpImxDCA7JJKviA0M9+RtmJdj0m/NVU5IMgBK+AmZouAQQ7/+2GLH0GXXY0YMw9oXPB8hKdbPYg5QLYg=="], - - "@floating-ui/utils": ["@floating-ui/utils@0.2.12", "", {}, "sha512-HpCo8tmWzLVad5s2d19EhAz5zqrrQ6s69qd6moPMQvkOuSwDT1YgRfWSVuc4ennqrgv3OHppiOGMQ7oC13yIww=="], - - "@fuma-translate/react": ["@fuma-translate/react@1.0.2", "", { "peerDependencies": { "@types/react": "*", "react": "^19.2.0", "react-dom": "^19.2.0" }, "optionalPeers": ["@types/react"] }, "sha512-uOiOtBx3nRXR8Nu1GzBf1tApgF1FErDBTHxRIAQeyQdyOoZbrNRN6H4kDCWObY4qyGeGbHydG0DHzgeUgFDMIw=="], - - "@fumadocs/tailwind": ["@fumadocs/tailwind@0.1.5", "", { "peerDependencies": { "tailwindcss": "^4.0.0" }, "optionalPeers": ["tailwindcss"] }, "sha512-ohzmuLTfNNRvP6B/Xx31lWJ58xu40NcmI+6mc/jivYeOoofnmdxBKu5gCErTgOE/mUqyVv4GvYeqd9FhoLHphg=="], - - "@fumari/image-size": ["@fumari/image-size@0.1.1", "", {}, "sha512-iaiV2wyzJ4mW358NX4CX3yGit+WjKYzpaQ+rldK9BjL/5jFpeV6ruWnZVq7MEyMn3Gd0DLi8g/79NZAAQaGscw=="], - - "@iconify/types": ["@iconify/types@2.0.0", "", {}, "sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg=="], - - "@iconify/utils": ["@iconify/utils@3.1.7", "", { "dependencies": { "@antfu/install-pkg": "^2.0.1", "@iconify/types": "^2.0.0", "import-meta-resolve": "^4.2.0" } }, "sha512-JZHlwdID+dy+lTgbYC8NEC4zeugqeYsc6jewvzb4c58kHauJn+X7rNwQjxz5p2qSjqaEeQoLkCIQ9v/H4PK0/w=="], - - "@img/colour": ["@img/colour@1.1.0", "", {}, "sha512-Td76q7j57o/tLVdgS746cYARfSyxk8iEfRxewL9h4OMzYhbW4TAcppl0mT4eyqXddh6L/jwoM75mo7ixa/pCeQ=="], - - "@img/sharp-darwin-arm64": ["@img/sharp-darwin-arm64@0.35.5", "", { "optionalDependencies": { "@img/sharp-libvips-darwin-arm64": "1.3.4" }, "os": "darwin", "cpu": "arm64" }, "sha512-QRUlFQ0WxvdWyqqG/WtI3iupfD5rBzmCHXSdPsY91sAtVtTo7Q4cb6zOccZ3gqEqkr0f1As1ehLqmEpDsRf+lg=="], - - "@img/sharp-darwin-x64": ["@img/sharp-darwin-x64@0.35.5", "", { "optionalDependencies": { "@img/sharp-libvips-darwin-x64": "1.3.4" }, "os": "darwin", "cpu": "x64" }, "sha512-+BR255RhDlpygUpOc/Jdt1nT6DQ3XG/ERo5wbcdOf5Q320dKtPCKPLR1LJs9VGXRaMa8l1uUa0tkCNOXiAxZUw=="], - - "@img/sharp-freebsd-wasm32": ["@img/sharp-freebsd-wasm32@0.35.5", "", { "dependencies": { "@img/sharp-wasm32": "0.35.5" }, "os": "freebsd" }, "sha512-Y/z91nEZ4uIBX5X3nfTovjU9lHNKFYbL2lpHCLVNmXQK03VIZvXBBt0KxbPGp2SdGSF+2mQU4e+hQaWOt86iAw=="], - - "@img/sharp-libvips-darwin-arm64": ["@img/sharp-libvips-darwin-arm64@1.3.4", "", { "os": "darwin", "cpu": "arm64" }, "sha512-5R89nBYiRdUlSWJxPhO+GVtaXzXSxKnRu/xqMn3KTA3L9EB9Oy/P+Nn2f2vlhPuUdy/Zusb2DarbyTpGCfEDuw=="], - - "@img/sharp-libvips-darwin-x64": ["@img/sharp-libvips-darwin-x64@1.3.4", "", { "os": "darwin", "cpu": "x64" }, "sha512-iR2OKH80yi0U+dUplyh3/xdpFvps6YkCwsXenIJxqxR1v9o+xtKTGbS9H7cps+2Vxjc8B1j96p75NmTGjIhtpQ=="], - - "@img/sharp-libvips-linux-arm": ["@img/sharp-libvips-linux-arm@1.3.4", "", { "os": "linux", "cpu": "arm" }, "sha512-LmRtTsOHuvM2+wlO2Db37dx5MiZhB0FvSunciw48YjdOkZz9KAiRbm8ujeMOA1INqmei5NapFxYEK1D1ZSidmw=="], - - "@img/sharp-libvips-linux-arm64": ["@img/sharp-libvips-linux-arm64@1.3.4", "", { "os": "linux", "cpu": "arm64" }, "sha512-Y3dgX/6lE2QhQb+Gxy0WZxfg9MEm/JBjamZpS2IklP7xIQoKN4hzAm7KcMVGtaVDt3neE9OKBC7vAfonA/Lr1A=="], - - "@img/sharp-libvips-linux-ppc64": ["@img/sharp-libvips-linux-ppc64@1.3.4", "", { "os": "linux", "cpu": "ppc64" }, "sha512-Le6boB8Tai0Nis+gIxIpKx68UDVVIqdR8Tin5Yf1z2LJJQLDJvCDRqRu+jC2qCoD+eIomonmOwB4smBRxfVpYQ=="], - - "@img/sharp-libvips-linux-riscv64": ["@img/sharp-libvips-linux-riscv64@1.3.4", "", { "os": "linux", "cpu": "none" }, "sha512-aHkkIEHPRdQEegJN20MLmGtxYD9R2wQr3Cwpddnu5+YKMt6Uzax7S9h5gpZTo8wyrGuZSlfQ63OevL5mTyOC7Q=="], - - "@img/sharp-libvips-linux-s390x": ["@img/sharp-libvips-linux-s390x@1.3.4", "", { "os": "linux", "cpu": "s390x" }, "sha512-ra/mB6MikESDUO7Yg+Mi95bFBb9GsObURuhnOv3OqknjGe9sZrG8tCe9q0xSIGrtLgvgw0gKnFWcK4blSgQOuQ=="], - - "@img/sharp-libvips-linux-x64": ["@img/sharp-libvips-linux-x64@1.3.4", "", { "os": "linux", "cpu": "x64" }, "sha512-GJ//SSXbnwSDes02umB3nDJLFcQzw8a18V8fyhqr6tV515tOEMdImjjxj1AoafMRz56F3PHgftnj1QEKSU1zkw=="], - - "@img/sharp-libvips-linuxmusl-arm64": ["@img/sharp-libvips-linuxmusl-arm64@1.3.4", "", { "os": "linux", "cpu": "arm64" }, "sha512-hvulFwtjUcagsis6BBxHwGFwWoNZjgYmULGVrZcyfNbjA8hKILbRxGg15/7w5HDyXHXUos/j6baAWqnCyQ2DWA=="], - - "@img/sharp-libvips-linuxmusl-x64": ["@img/sharp-libvips-linuxmusl-x64@1.3.4", "", { "os": "linux", "cpu": "x64" }, "sha512-6zXKeE/p39I1AmA3cJG35eyBGNqNddLnUXjhwBnsGjFPWqf5VKkDBEqaEkPDoTEtkxwi2vv8Tcr2mDyP4So7Fg=="], - - "@img/sharp-linux-arm": ["@img/sharp-linux-arm@0.35.5", "", { "optionalDependencies": { "@img/sharp-libvips-linux-arm": "1.3.4" }, "os": "linux", "cpu": "arm" }, "sha512-LEaXK2WdXVK5ykcw0buWyPMsmLLL2vpHLD6yrNSW+JGEL3BZPA4tpKN6iaMc4AxTTAoaX/sU1rOL51lcIz48ZQ=="], - - "@img/sharp-linux-arm64": ["@img/sharp-linux-arm64@0.35.5", "", { "optionalDependencies": { "@img/sharp-libvips-linux-arm64": "1.3.4" }, "os": "linux", "cpu": "arm64" }, "sha512-LYVx5JTsOM2CBzmxreh+nl64/3H6Xb09iSLknqH47z2T2DFFxDeFLP5y4dJwe6H7uGQlHPyEEtIqyo3DYsRwdQ=="], - - "@img/sharp-linux-ppc64": ["@img/sharp-linux-ppc64@0.35.5", "", { "optionalDependencies": { "@img/sharp-libvips-linux-ppc64": "1.3.4" }, "os": "linux", "cpu": "ppc64" }, "sha512-QVxAAq8evVRI9ia2vqgwrmWucn5Dfv+JdWzj75pD8omHLPSP7f8p20O8jxzjCcuCEQEOtYOZUmX1hkiZ0kdevA=="], - - "@img/sharp-linux-riscv64": ["@img/sharp-linux-riscv64@0.35.5", "", { "optionalDependencies": { "@img/sharp-libvips-linux-riscv64": "1.3.4" }, "os": "linux", "cpu": "none" }, "sha512-LtdreXguaavKODPIfzJ4kffx7UNt1omwtK0rch4EBbbSTXPnxWmYSayXdLJw0fJzQ97kHt1gL/yh4tvU+nCyRQ=="], - - "@img/sharp-linux-s390x": ["@img/sharp-linux-s390x@0.35.5", "", { "optionalDependencies": { "@img/sharp-libvips-linux-s390x": "1.3.4" }, "os": "linux", "cpu": "s390x" }, "sha512-UZasTOFiYzotTsGOCu42BfUzP6Tu6Do/947iRm1RsLKvlllxwGcn4RN27LibGWceix4Y+Pmw3jsnTcCQIgWjqA=="], - - "@img/sharp-linux-x64": ["@img/sharp-linux-x64@0.35.5", "", { "optionalDependencies": { "@img/sharp-libvips-linux-x64": "1.3.4" }, "os": "linux", "cpu": "x64" }, "sha512-SxFtLTeJInhAA9Q836kux2vZNeOBQEx658qvbboZScr0wIARym3IcGmW7KpVD5sbVg0Ojy+udFQdayYIZyoNog=="], - - "@img/sharp-linuxmusl-arm64": ["@img/sharp-linuxmusl-arm64@0.35.5", "", { "optionalDependencies": { "@img/sharp-libvips-linuxmusl-arm64": "1.3.4" }, "os": "linux", "cpu": "arm64" }, "sha512-9HbMclmI1zlNkFRs3z9/eBtDjfD0sGlrX1z6b1qwmiFY5ElDLh4BC0LPBdVp7z1DXFiKlIcznf+ZlsuZzLxQqg=="], - - "@img/sharp-linuxmusl-x64": ["@img/sharp-linuxmusl-x64@0.35.5", "", { "optionalDependencies": { "@img/sharp-libvips-linuxmusl-x64": "1.3.4" }, "os": "linux", "cpu": "x64" }, "sha512-4KOphqB035HrVdqLZfCgMzzERrQkkzOwRhl4OAkRO1YCldbaFjySXMaK534Mo0V+LndnlJk+sbUyLeU0ULyD1A=="], - - "@img/sharp-wasm32": ["@img/sharp-wasm32@0.35.5", "", { "dependencies": { "@emnapi/runtime": "^1.11.3" } }, "sha512-Ptsga1su4tQx+LLF1ECS9U6nz5kmrXKo6XVbtR48Ke3ZRxxgaWBu7IDtEe1quo8hiupwm6WFqxVlXaSf7IINGQ=="], - - "@img/sharp-webcontainers-wasm32": ["@img/sharp-webcontainers-wasm32@0.35.5", "", { "dependencies": { "@img/sharp-wasm32": "0.35.5" }, "cpu": "none" }, "sha512-hfhF/FmoQyTUkA0bIKFOtw536BQSeBMe6BF6QyWlrPxT754+TFLaZ7sKKTfvvM0yJgKgaYTwnFCIZ/GuDw5SUA=="], - - "@img/sharp-win32-arm64": ["@img/sharp-win32-arm64@0.35.5", "", { "os": "win32", "cpu": "arm64" }, "sha512-X4t7g+7ZA5DKblCBEXGjUqqemj4vczING/5viFwAL8h4N3qYeyjwdCvRLHi4EdOUI+2Z7UFlp1VM+p/AuEtm6Q=="], - - "@img/sharp-win32-ia32": ["@img/sharp-win32-ia32@0.35.5", "", { "os": "win32", "cpu": "ia32" }, "sha512-5Zm82LoBc43nhwNybZlG7Y1KO//Zhsn306fQl29ZOuStHLGTo3BWL83q3cznX0poxSAMuYL1On/BHBxkBeKr6A=="], - - "@img/sharp-win32-x64": ["@img/sharp-win32-x64@0.35.5", "", { "os": "win32", "cpu": "x64" }, "sha512-x76eH0vEiHlcMQu8Y8IenntaACtddpT6W0wmXtWrnKcnKI7ME5DdgqhAD6SEWOEl1v2zDvkZDhFA9KnURwpfqg=="], - - "@jridgewell/gen-mapping": ["@jridgewell/gen-mapping@0.3.13", "", { "dependencies": { "@jridgewell/sourcemap-codec": "^1.5.0", "@jridgewell/trace-mapping": "^0.3.24" } }, "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA=="], - - "@jridgewell/remapping": ["@jridgewell/remapping@2.3.5", "", { "dependencies": { "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.24" } }, "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ=="], - - "@jridgewell/resolve-uri": ["@jridgewell/resolve-uri@3.1.2", "", {}, "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw=="], - - "@jridgewell/sourcemap-codec": ["@jridgewell/sourcemap-codec@1.6.0", "", {}, "sha512-T7jf+5zgsZHwNJ4lvQ7/aezbyk0nNX+zJVWpmHA7VYsEx7a7qr5Rg5IbtJFqkgze5Y2sruq1RUY8Q837Od7iFw=="], - - "@jridgewell/trace-mapping": ["@jridgewell/trace-mapping@0.3.31", "", { "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" } }, "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw=="], - - "@mdx-js/mdx": ["@mdx-js/mdx@3.1.1", "", { "dependencies": { "@types/estree": "^1.0.0", "@types/estree-jsx": "^1.0.0", "@types/hast": "^3.0.0", "@types/mdx": "^2.0.0", "acorn": "^8.0.0", "collapse-white-space": "^2.0.0", "devlop": "^1.0.0", "estree-util-is-identifier-name": "^3.0.0", "estree-util-scope": "^1.0.0", "estree-walker": "^3.0.0", "hast-util-to-jsx-runtime": "^2.0.0", "markdown-extensions": "^2.0.0", "recma-build-jsx": "^1.0.0", "recma-jsx": "^1.0.0", "recma-stringify": "^1.0.0", "rehype-recma": "^1.0.0", "remark-mdx": "^3.0.0", "remark-parse": "^11.0.0", "remark-rehype": "^11.0.0", "source-map": "^0.7.0", "unified": "^11.0.0", "unist-util-position-from-estree": "^2.0.0", "unist-util-stringify-position": "^4.0.0", "unist-util-visit": "^5.0.0", "vfile": "^6.0.0" } }, "sha512-f6ZO2ifpwAQIpzGWaBQT2TXxPv6z3RBzQKpVftEWN78Vl/YweF1uwussDx8ECAXVtr3Rs89fKyG9YlzUs9DyGQ=="], - - "@mermaid-js/parser": ["@mermaid-js/parser@2.0.1", "", { "dependencies": { "@chevrotain/types": "~13.2.0" } }, "sha512-j37dj/h6p6pots1L7pLPPNuABEEu9WP4OYg9pW1g+nYG331j0+3canE9OagtYdytYvdSAMG+2fKU5cxep6LgjA=="], - - "@next/env": ["@next/env@16.4.6", "", {}, "sha512-SunBjJ6t+oBtecS3dTjdVuMhUogP5wD/vrGL5EVuQYM1iS4O5ilL51HkiJ3sPjMzRHiCChvr4dbaSJbR7F3lxA=="], - - "@next/swc-darwin-arm64": ["@next/swc-darwin-arm64@16.4.6", "", { "os": "darwin", "cpu": "arm64" }, "sha512-kJ4VVZkley17xKaJx72QN2IBqjrj7zenCQZaUF0l9ShS/1Mt2kW4+Z5KGG6vgr3L/J562xTOizVyM1iA/u5nlg=="], - - "@next/swc-darwin-x64": ["@next/swc-darwin-x64@16.4.6", "", { "os": "darwin", "cpu": "x64" }, "sha512-eIPGZIqC+8JKaeZmvnCANJQF4xWkkHqSnAAajtFxgwDMAOnCgxNvP52SeWZ41PyVwoe+Le/NQuZSaQ8j7YshSA=="], - - "@next/swc-linux-arm64-gnu": ["@next/swc-linux-arm64-gnu@16.4.6", "", { "os": "linux", "cpu": "arm64", "libc": "glibc" }, "sha512-9nI6O8vvczH2D9ZNdMGqb/3NuT15T9ksOZnAmx9/gjF2cOi74+xxyf1Hk96uIMfm14c9y6wHeBq6SH8g6udvcA=="], - - "@next/swc-linux-arm64-musl": ["@next/swc-linux-arm64-musl@16.4.6", "", { "os": "linux", "cpu": "arm64", "libc": "musl" }, "sha512-7/qPhTxDp2ScluOJOhLuhWmlA17o1yZ0SIgpISBCpBxXgtnK4+KGywBpFkfLPiU1rnSM1faFGzYkH6i7JdTrqA=="], - - "@next/swc-linux-x64-gnu": ["@next/swc-linux-x64-gnu@16.4.6", "", { "os": "linux", "cpu": "x64", "libc": "glibc" }, "sha512-oOpbNa8XOW1qCGd9VvzC4fbkkRxEls7/WI6tz+YHC0xRA7KpV1U7DrAnCPjzVyOk/karzWEepCOcTIDmwK8FwQ=="], - - "@next/swc-linux-x64-musl": ["@next/swc-linux-x64-musl@16.4.6", "", { "os": "linux", "cpu": "x64", "libc": "musl" }, "sha512-aM8CZ+OR2EwXaAYw7KGkW2GDmNDsLBIRe1MMRZCJPTdw/xhTD0IMUVO4sf3KqrzuRouGzwwLZn34+gFeVXiUQA=="], - - "@next/swc-win32-arm64-msvc": ["@next/swc-win32-arm64-msvc@16.4.6", "", { "os": "win32", "cpu": "arm64" }, "sha512-U0p7/tEtqvHX2crhd841CDwKtp5CFkKXVjOhmfccR3Pvp64sj8KBwRqsvltqLOwVBbj0NtkxwXSDpEHYGbxeXQ=="], - - "@next/swc-win32-x64-msvc": ["@next/swc-win32-x64-msvc@16.4.6", "", { "os": "win32", "cpu": "x64" }, "sha512-3ZG15/5WIdlTQsIEvc9sPTTSL5XFrlLklIKmfF4fwsDnoAhu6NcBDXsk3mbGxNyo6aVLEGex+fHCv2MahY7a9g=="], - - "@playwright/test": ["@playwright/test@1.65.1", "", { "dependencies": { "playwright": "1.65.1" }, "bin": { "playwright": "cli.js" } }, "sha512-y+NCIRm2LvY4slUVWvGh1nujJ8RF/hEisIsq2mtUPgdQC4L701bq5hZGMhrpeXjACvwvO9tj5dJqhvM6TP9lbw=="], - - "@shikijs/core": ["@shikijs/core@4.6.0", "", { "dependencies": { "@shikijs/primitive": "4.6.0", "@shikijs/types": "4.6.0", "@shikijs/vscode-textmate": "^10.1.0", "@types/hast": "^3.0.5", "hast-util-to-html": "^9.0.6" } }, "sha512-bfd4OKgvoyXYiYmMRuleA656P4V7M/Du9lcTl38Ngm6KszMj7bq4J1IGZwSYR4c95Tv5UQALtYNWUwaI9UT3xw=="], - - "@shikijs/engine-javascript": ["@shikijs/engine-javascript@4.6.0", "", { "dependencies": { "@shikijs/types": "4.6.0", "@shikijs/vscode-textmate": "^10.1.0", "oniguruma-to-es": "^4.3.6" } }, "sha512-K0oqxFoL+kEMdz89mHLFO15Tsbv3kFZ6WR1cXZKMvLSc+oqaM00A6pyga1qSeXB22dP0tTiSApRcGBaKWsEccg=="], - - "@shikijs/engine-oniguruma": ["@shikijs/engine-oniguruma@4.6.0", "", { "dependencies": { "@shikijs/types": "4.6.0", "@shikijs/vscode-textmate": "^10.1.0" } }, "sha512-aggd6Q7SuJOXNnsUbfG2XesxBJKBMAw/PDTUo9PyRjMaaJJ2dNrI+q0C+25ARXAK9yLHAlwxc9oRT2u68YKZ7w=="], - - "@shikijs/langs": ["@shikijs/langs@4.6.0", "", { "dependencies": { "@shikijs/types": "4.6.0" } }, "sha512-1yMEX3oCVV54LUq/ovfpRkDQoYDkcvjSWFFa/YLUDMiSoRzMi2uxLJYbv41ahT8Lu9lFMaa7hecd3Q39trqUyg=="], - - "@shikijs/primitive": ["@shikijs/primitive@4.6.0", "", { "dependencies": { "@shikijs/types": "4.6.0", "@shikijs/vscode-textmate": "^10.1.0", "@types/hast": "^3.0.5" } }, "sha512-c54+TQEo9ToqgfL/AU8FpjnV09+GA9Oa7M5ROkkXteZfp5XzpAJGXjjvZQFQioJOwm/w/6Z3lIzQstAkl8coag=="], - - "@shikijs/themes": ["@shikijs/themes@4.6.0", "", { "dependencies": { "@shikijs/types": "4.6.0" } }, "sha512-qHAVAs80RiGD+IRuH9G+JPDOEc9A/kHsng4EzCUCwB9bLzW6Z0y9WETh2YyCcADJBmfrIaJ1Jp7KBNP6FHkgtQ=="], - - "@shikijs/types": ["@shikijs/types@4.6.0", "", { "dependencies": { "@shikijs/vscode-textmate": "^10.1.0", "@types/hast": "^3.0.5" } }, "sha512-+ENG1adsKt/X7cRYw1Nl7BEpBmPOjmQ7bR/eGmHuMlT8gtOFf3KEi5l31DJYyAWhW6Y6bjP1plU7FmaxWGENFw=="], - - "@shikijs/vscode-textmate": ["@shikijs/vscode-textmate@10.1.0", "", {}, "sha512-cVBuhDQjBZaNMTwBquYfPydrUP+E3hE6oYGasx8h6ZrODIM7/r+gxLDXdd66oszbrggZHEntdE6j+5gYIVyMWQ=="], - - "@standard-schema/spec": ["@standard-schema/spec@1.1.0", "", {}, "sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w=="], - - "@swc/helpers": ["@swc/helpers@0.5.23", "", { "dependencies": { "tslib": "^2.8.0" } }, "sha512-5lSsMOTXURePglDfvuAQUqkGek9Hg2kksOYay2m0+XR++b2NWYL/4sWyuvVBIs8oKnJaxkdi9whaL/sqN13afw=="], - - "@tailwindcss/node": ["@tailwindcss/node@4.3.5", "", { "dependencies": { "@jridgewell/remapping": "^2.3.5", "enhanced-resolve": "^5.24.5", "jiti": "^2.7.0", "lightningcss": "1.33.0", "magic-string": "^1.1.0", "source-map-js": "^1.2.1", "tailwindcss": "4.3.5" } }, "sha512-yT53FzV4ke0cr/BguDxhWMpm5MJu1O2muzk+tKw6lKHjODAsYArBbWwFbJiaksfzFv1tpkO9QHGzmfs1hJT66g=="], - - "@tailwindcss/oxide": ["@tailwindcss/oxide@4.3.5", "", { "optionalDependencies": { "@tailwindcss/oxide-android-arm64": "4.3.5", "@tailwindcss/oxide-darwin-arm64": "4.3.5", "@tailwindcss/oxide-darwin-x64": "4.3.5", "@tailwindcss/oxide-freebsd-x64": "4.3.5", "@tailwindcss/oxide-linux-arm-gnueabihf": "4.3.5", "@tailwindcss/oxide-linux-arm64-gnu": "4.3.5", "@tailwindcss/oxide-linux-arm64-musl": "4.3.5", "@tailwindcss/oxide-linux-x64-gnu": "4.3.5", "@tailwindcss/oxide-linux-x64-musl": "4.3.5", "@tailwindcss/oxide-wasm32-wasi": "4.3.5", "@tailwindcss/oxide-win32-arm64-msvc": "4.3.5", "@tailwindcss/oxide-win32-x64-msvc": "4.3.5" } }, "sha512-PynqGLZsZvwM9tqD/CUxkOIfyd6K5elZ2MooauzJryP/UqXYgi3yYbtt3N0Xe+MHV/eFKPFQCEfIKAqlAS1CBg=="], - - "@tailwindcss/oxide-android-arm64": ["@tailwindcss/oxide-android-arm64@4.3.5", "", { "os": "android", "cpu": "arm64" }, "sha512-Se0z5xMqcSQanJD1IYmO0cGpK3iv0fp3ZsIT7xRJZ1Da5PghvNoc46zz4jIQn+aan3dV9T8AermFNN9QPmsh0Q=="], - - "@tailwindcss/oxide-darwin-arm64": ["@tailwindcss/oxide-darwin-arm64@4.3.5", "", { "os": "darwin", "cpu": "arm64" }, "sha512-UPrgTDuUbvmqGMZuCnmI3FKee/tYKzKdp00/kuB4oSGB213VYg8QTdF7lVhnPoBXq/mIfJ+ILoBFqNOboWcMwQ=="], - - "@tailwindcss/oxide-darwin-x64": ["@tailwindcss/oxide-darwin-x64@4.3.5", "", { "os": "darwin", "cpu": "x64" }, "sha512-E+p7HEtjI0b8D7kbbWxH067cGui6d4c79COGko9fAPVE3rwc1E7ld2HFCbaG86AOGWS5VKQYqZOaf38ya4uxTQ=="], - - "@tailwindcss/oxide-freebsd-x64": ["@tailwindcss/oxide-freebsd-x64@4.3.5", "", { "os": "freebsd", "cpu": "x64" }, "sha512-yWEWcWyAG7rWOcTpJTjdhQ3pcaFY2h+0bqTRfgU3G2fz87ZU3AKdvdZKhslD+kyHnjBUWKvNdRYwIYC5dI1tIg=="], - - "@tailwindcss/oxide-linux-arm-gnueabihf": ["@tailwindcss/oxide-linux-arm-gnueabihf@4.3.5", "", { "os": "linux", "cpu": "arm" }, "sha512-WmeVjtJhZlr+smpqcdR2kQkkn6arHIJnUIBxTO2EJcTLGY1ecVXNo2hbSn8xc0IH2aEtys936iMWKGyj0GaKnA=="], - - "@tailwindcss/oxide-linux-arm64-gnu": ["@tailwindcss/oxide-linux-arm64-gnu@4.3.5", "", { "os": "linux", "cpu": "arm64", "libc": "glibc" }, "sha512-DTCSyucc6ShMp1QMqV5R94Z7xlgNgUzkGmFF1rL5HH2Qjy4eSmEqy+YLGkqqYvWa4sILtgrBt1JjRKbneQtiFQ=="], - - "@tailwindcss/oxide-linux-arm64-musl": ["@tailwindcss/oxide-linux-arm64-musl@4.3.5", "", { "os": "linux", "cpu": "arm64", "libc": "musl" }, "sha512-H9lsvO4x9E4nE4Hi8h7NHHw0O/kcVSu+iOyFHNGdYzazGgDjFHZbE6S3hQ8kMcbNXSBlMdNi67LV5EVqtpaJtw=="], - - "@tailwindcss/oxide-linux-x64-gnu": ["@tailwindcss/oxide-linux-x64-gnu@4.3.5", "", { "os": "linux", "cpu": "x64", "libc": "glibc" }, "sha512-4uxQvtBvPuIdl13WfUBj9xMZHH14PtHZ8OZdtLmdyDtG66sCa1t599NZT+jagkUzRtWhuul1qRZQ1nAJscXN5g=="], - - "@tailwindcss/oxide-linux-x64-musl": ["@tailwindcss/oxide-linux-x64-musl@4.3.5", "", { "os": "linux", "cpu": "x64", "libc": "musl" }, "sha512-0JQAzs7jwbA7O6+z/adU+Jk3AXwsu3npAhtr5escXS7TqEqWcaDV7qHuI+0Vy/KQRuVGnLQREcSJWYauyV3oqg=="], - - "@tailwindcss/oxide-wasm32-wasi": ["@tailwindcss/oxide-wasm32-wasi@4.3.5", "", { "dependencies": { "@emnapi/core": "^1.11.3", "@emnapi/runtime": "^1.11.3", "@emnapi/wasi-threads": "^1.2.3", "@napi-rs/wasm-runtime": "^1.2.2", "@tybys/wasm-util": "^0.10.3", "tslib": "^2.8.1" } }, "sha512-OJhFmlEfdzMr+avACdi40RPtnkW0B6hXyxL/8r+tnEHBWZji36CYRjEXrrvgBmaYsD3oEOBqwYFRKsYvzFe7Bw=="], - - "@tailwindcss/oxide-win32-arm64-msvc": ["@tailwindcss/oxide-win32-arm64-msvc@4.3.5", "", { "os": "win32", "cpu": "arm64" }, "sha512-9o8jgthi+QE5eandnboiJT64VQfnIArfZzSTdgbhEK5aafdiu2jTW9Honi/mwYHxBZuH1vAC57IFyrh+0iK5Gg=="], - - "@tailwindcss/oxide-win32-x64-msvc": ["@tailwindcss/oxide-win32-x64-msvc@4.3.5", "", { "os": "win32", "cpu": "x64" }, "sha512-XiKFfIy1RWe7qK4WqByxNW7Oz1/nkOy8o/BWhHminyV1PmpUd8Eedj5v2A8h2kpqeVlz6xRnwk9Fr/ZXNLcZfg=="], - - "@tailwindcss/postcss": ["@tailwindcss/postcss@4.3.5", "", { "dependencies": { "@alloc/quick-lru": "^5.2.0", "@tailwindcss/node": "4.3.5", "@tailwindcss/oxide": "4.3.5", "postcss": "^8.5.25", "tailwindcss": "4.3.5" } }, "sha512-FAV37Tlx9wBiT/hkfgVD0Q6CWsP2oUX3lf28nrfjW8+ksILjnpuFulUqWDfNR4/ZiEHHDRBX8DUTzD1Rys687A=="], - - "@types/d3": ["@types/d3@7.4.3", "", { "dependencies": { "@types/d3-array": "*", "@types/d3-axis": "*", "@types/d3-brush": "*", "@types/d3-chord": "*", "@types/d3-color": "*", "@types/d3-contour": "*", "@types/d3-delaunay": "*", "@types/d3-dispatch": "*", "@types/d3-drag": "*", "@types/d3-dsv": "*", "@types/d3-ease": "*", "@types/d3-fetch": "*", "@types/d3-force": "*", "@types/d3-format": "*", "@types/d3-geo": "*", "@types/d3-hierarchy": "*", "@types/d3-interpolate": "*", "@types/d3-path": "*", "@types/d3-polygon": "*", "@types/d3-quadtree": "*", "@types/d3-random": "*", "@types/d3-scale": "*", "@types/d3-scale-chromatic": "*", "@types/d3-selection": "*", "@types/d3-shape": "*", "@types/d3-time": "*", "@types/d3-time-format": "*", "@types/d3-timer": "*", "@types/d3-transition": "*", "@types/d3-zoom": "*" } }, "sha512-lZXZ9ckh5R8uiFVt8ogUNf+pIrK4EsWrx2Np75WvF/eTpJ0FMHNhjXk8CKEx/+gpHbNQyJWehbFaTvqmHWB3ww=="], - - "@types/d3-array": ["@types/d3-array@3.2.2", "", {}, "sha512-hOLWVbm7uRza0BYXpIIW5pxfrKe0W+D5lrFiAEYR+pb6w3N2SwSMaJbXdUfSEv+dT4MfHBLtn5js0LAWaO6otw=="], - - "@types/d3-axis": ["@types/d3-axis@3.0.6", "", { "dependencies": { "@types/d3-selection": "*" } }, "sha512-pYeijfZuBd87T0hGn0FO1vQ/cgLk6E1ALJjfkC0oJ8cbwkZl3TpgS8bVBLZN+2jjGgg38epgxb2zmoGtSfvgMw=="], - - "@types/d3-brush": ["@types/d3-brush@3.0.6", "", { "dependencies": { "@types/d3-selection": "*" } }, "sha512-nH60IZNNxEcrh6L1ZSMNA28rj27ut/2ZmI3r96Zd+1jrZD++zD3LsMIjWlvg4AYrHn/Pqz4CF3veCxGjtbqt7A=="], - - "@types/d3-chord": ["@types/d3-chord@3.0.6", "", {}, "sha512-LFYWWd8nwfwEmTZG9PfQxd17HbNPksHBiJHaKuY1XeqscXacsS2tyoo6OdRsjf+NQYeB6XrNL3a25E3gH69lcg=="], - - "@types/d3-color": ["@types/d3-color@3.1.3", "", {}, "sha512-iO90scth9WAbmgv7ogoq57O9YpKmFBbmoEoCHDB2xMBY0+/KVrqAaCDyCE16dUspeOvIxFFRI+0sEtqDqy2b4A=="], - - "@types/d3-contour": ["@types/d3-contour@3.0.6", "", { "dependencies": { "@types/d3-array": "*", "@types/geojson": "*" } }, "sha512-BjzLgXGnCWjUSYGfH1cpdo41/hgdWETu4YxpezoztawmqsvCeep+8QGfiY6YbDvfgHz/DkjeIkkZVJavB4a3rg=="], - - "@types/d3-delaunay": ["@types/d3-delaunay@6.0.4", "", {}, "sha512-ZMaSKu4THYCU6sV64Lhg6qjf1orxBthaC161plr5KuPHo3CNm8DTHiLw/5Eq2b6TsNP0W0iJrUOFscY6Q450Hw=="], - - "@types/d3-dispatch": ["@types/d3-dispatch@3.0.7", "", {}, "sha512-5o9OIAdKkhN1QItV2oqaE5KMIiXAvDWBDPrD85e58Qlz1c1kI/J0NcqbEG88CoTwJrYe7ntUCVfeUl2UJKbWgA=="], - - "@types/d3-drag": ["@types/d3-drag@3.0.7", "", { "dependencies": { "@types/d3-selection": "*" } }, "sha512-HE3jVKlzU9AaMazNufooRJ5ZpWmLIoc90A37WU2JMmeq28w1FQqCZswHZ3xR+SuxYftzHq6WU6KJHvqxKzTxxQ=="], - - "@types/d3-dsv": ["@types/d3-dsv@3.0.7", "", {}, "sha512-n6QBF9/+XASqcKK6waudgL0pf/S5XHPPI8APyMLLUHd8NqouBGLsU8MgtO7NINGtPBtk9Kko/W4ea0oAspwh9g=="], - - "@types/d3-ease": ["@types/d3-ease@3.0.2", "", {}, "sha512-NcV1JjO5oDzoK26oMzbILE6HW7uVXOHLQvHshBUW4UMdZGfiY6v5BeQwh9a9tCzv+CeefZQHJt5SRgK154RtiA=="], - - "@types/d3-fetch": ["@types/d3-fetch@3.0.7", "", { "dependencies": { "@types/d3-dsv": "*" } }, "sha512-fTAfNmxSb9SOWNB9IoG5c8Hg6R+AzUHDRlsXsDZsNp6sxAEOP0tkP3gKkNSO/qmHPoBFTxNrjDprVHDQDvo5aA=="], - - "@types/d3-force": ["@types/d3-force@3.0.10", "", {}, "sha512-ZYeSaCF3p73RdOKcjj+swRlZfnYpK1EbaDiYICEEp5Q6sUiqFaFQ9qgoshp5CzIyyb/yD09kD9o2zEltCexlgw=="], - - "@types/d3-format": ["@types/d3-format@3.0.4", "", {}, "sha512-fALi2aI6shfg7vM5KiR1wNJnZ7r6UuggVqtDA+xiEdPZQwy/trcQaHnwShLuLdta2rTymCNpxYTiMZX/e09F4g=="], - - "@types/d3-geo": ["@types/d3-geo@3.1.1", "", { "dependencies": { "@types/geojson": "*" } }, "sha512-65Emv9fQiQQqphLlRkuQ5ypPsOmWPhtBGCMv61JDPEPMvsx+gzhGf74yw1a78xFKPj6zw4AgQICJoQv0vK9M2w=="], - - "@types/d3-hierarchy": ["@types/d3-hierarchy@3.1.7", "", {}, "sha512-tJFtNoYBtRtkNysX1Xq4sxtjK8YgoWUNpIiUee0/jHGRwqvzYxkq0hGVbbOGSz+JgFxxRu4K8nb3YpG3CMARtg=="], - - "@types/d3-interpolate": ["@types/d3-interpolate@3.0.4", "", { "dependencies": { "@types/d3-color": "*" } }, "sha512-mgLPETlrpVV1YRJIglr4Ez47g7Yxjl1lj7YKsiMCb27VJH9W8NVM6Bb9d8kkpG/uAQS5AmbA48q2IAolKKo1MA=="], - - "@types/d3-path": ["@types/d3-path@3.1.1", "", {}, "sha512-VMZBYyQvbGmWyWVea0EHs/BwLgxc+MKi1zLDCONksozI4YJMcTt8ZEuIR4Sb1MMTE8MMW49v0IwI5+b7RmfWlg=="], - - "@types/d3-polygon": ["@types/d3-polygon@3.0.2", "", {}, "sha512-ZuWOtMaHCkN9xoeEMr1ubW2nGWsp4nIql+OPQRstu4ypeZ+zk3YKqQT0CXVe/PYqrKpZAi+J9mTs05TKwjXSRA=="], - - "@types/d3-quadtree": ["@types/d3-quadtree@3.0.6", "", {}, "sha512-oUzyO1/Zm6rsxKRHA1vH0NEDG58HrT5icx/azi9MF1TWdtttWl0UIUsjEQBBh+SIkrpd21ZjEv7ptxWys1ncsg=="], - - "@types/d3-random": ["@types/d3-random@3.0.4", "", {}, "sha512-UHYId5WTCx4L4YNel7NU00XUXXgvgpgZOvp10PuvsQENjMDXhh2RyFc0KBjO7B45ne4Ha1yVH7ii0vnzKkuzWA=="], - - "@types/d3-scale": ["@types/d3-scale@4.0.9", "", { "dependencies": { "@types/d3-time": "*" } }, "sha512-dLmtwB8zkAeO/juAMfnV+sItKjlsw2lKdZVVy6LRr0cBmegxSABiLEpGVmSJJ8O08i4+sGR6qQtb6WtuwJdvVw=="], - - "@types/d3-scale-chromatic": ["@types/d3-scale-chromatic@3.1.0", "", {}, "sha512-iWMJgwkK7yTRmWqRB5plb1kadXyQ5Sj8V/zYlFGMUBbIPKQScw+Dku9cAAMgJG+z5GYDoMjWGLVOvjghDEFnKQ=="], - - "@types/d3-selection": ["@types/d3-selection@3.0.12", "", {}, "sha512-Qe/KWYhEiIIxGs7HrAAjMfShxKldx19SJtr5zu53f3afPsdZNz7HHtdTLXo/kqeiWNXVycI24kSnfzBYkTzpgw=="], - - "@types/d3-shape": ["@types/d3-shape@3.2.0", "", { "dependencies": { "@types/d3-path": "*" } }, "sha512-kVd74ta9eof3eJOvbNd1vGKS/XERRyQbT26Og63hIsvDO84cjD5gEOhsXf26w3FSoNlPVz84DOFcKv/oou+fMw=="], - - "@types/d3-time": ["@types/d3-time@3.0.4", "", {}, "sha512-yuzZug1nkAAaBlBBikKZTgzCeA+k1uy4ZFwWANOfKw5z5LRhV0gNA7gNkKm7HoK+HRN0wX3EkxGk0fpbWhmB7g=="], - - "@types/d3-time-format": ["@types/d3-time-format@4.0.3", "", {}, "sha512-5xg9rC+wWL8kdDj153qZcsJ0FWiFt0J5RB6LYUNZjwSnesfblqrI/bJ1wBdJ8OQfncgbJG5+2F+qfqnqyzYxyg=="], - - "@types/d3-timer": ["@types/d3-timer@3.0.2", "", {}, "sha512-Ps3T8E8dZDam6fUyNiMkekK3XUsaUEik+idO9/YjPtfj2qruF8tFBXS7XhtE4iIXBLxhmLjP3SXpLhVf21I9Lw=="], - - "@types/d3-transition": ["@types/d3-transition@3.0.9", "", { "dependencies": { "@types/d3-selection": "*" } }, "sha512-uZS5shfxzO3rGlu0cC3bjmMFKsXv+SmZZcgp0KD22ts4uGXp5EVYGzu/0YdwZeKmddhcAccYtREJKkPfXkZuCg=="], - - "@types/d3-zoom": ["@types/d3-zoom@3.0.9", "", { "dependencies": { "@types/d3-interpolate": "*", "@types/d3-selection": "*" } }, "sha512-0sE1406XBYJGiqD3AusTl9ZqC//2mIXix51tbom25gDCA8ri4xnSZg28CaSE8Srl6FClqABUKfsn0qghgdepMA=="], - - "@types/debug": ["@types/debug@4.1.13", "", { "dependencies": { "@types/ms": "*" } }, "sha512-KSVgmQmzMwPlmtljOomayoR89W4FynCAi3E8PPs7vmDVPe84hT+vGPKkJfThkmXs0x0jAaa9U8uW8bbfyS2fWw=="], - - "@types/estree": ["@types/estree@1.0.9", "", {}, "sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg=="], - - "@types/estree-jsx": ["@types/estree-jsx@1.0.5", "", { "dependencies": { "@types/estree": "*" } }, "sha512-52CcUVNFyfb1A2ALocQw/Dd1BQFNmSdkuC3BkZ6iqhdMfQz7JWOFRuJFloOzjk+6WijU56m9oKXFAXc7o3Towg=="], - - "@types/geojson": ["@types/geojson@7946.0.16", "", {}, "sha512-6C8nqWur3j98U6+lXDfTUWIfgvZU+EumvpHKcYjujKH7woYyLj2sUmff0tRhrqM7BohUw7Pz3ZB1jj2gW9Fvmg=="], - - "@types/hast": ["@types/hast@3.0.5", "", { "dependencies": { "@types/unist": "*" } }, "sha512-rp/ezSWaD1m44dPKICGhiskI13nVr7qTloFwDa/IYkhhf5nzwP+zIQcIJh3WIFSBOy/H1PzB40jPjMDksN4F+g=="], - - "@types/mdast": ["@types/mdast@4.0.4", "", { "dependencies": { "@types/unist": "*" } }, "sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA=="], - - "@types/mdx": ["@types/mdx@2.0.14", "", {}, "sha512-T48PeuJtvLosNTPVhfnIp3i/n3a4g4Bad7YCq5k64D4u7NwDrAotikQ+5+sjtUvBmxCMlbo3dVL+C2dP0rWHzg=="], - - "@types/ms": ["@types/ms@2.1.0", "", {}, "sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA=="], - - "@types/node": ["@types/node@26.6.6", "", { "dependencies": { "undici-types": "~8.9.0" } }, "sha512-MzQj+8Kx3XI40OmUAE6Qoh58ZMNstNNMwn2nfd3qWsfe7nDNSqJNzes4njhz6AHwrSHOffSLwXU6yb474Q4aog=="], - - "@types/react": ["@types/react@19.3.0", "", { "dependencies": { "csstype": "^3.2.2" } }, "sha512-N0rFCuH9YoxG9/m61l9MfpJKfmLOVU0em7ipIz6TRgSSkvReLB9vL85GB+yr8Bs5leqpvg96JSwF4ZS1s4viQg=="], - - "@types/react-dom": ["@types/react-dom@19.3.0", "", { "peerDependencies": { "@types/react": "^19.3.0" } }, "sha512-ZI7bU42mZXXKHn/qNLEw2IrbiINU7X5+vfgdixBHkCNpYWXjKgfQ/P+uyGb5CjOLB9UcnTeg3rylQtV2hym44Q=="], - - "@types/trusted-types": ["@types/trusted-types@2.0.7", "", {}, "sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw=="], - - "@types/unist": ["@types/unist@3.0.3", "", {}, "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q=="], - - "@typescript/typescript-aix-ppc64": ["@typescript/typescript-aix-ppc64@7.0.2", "", { "os": "aix", "cpu": "ppc64" }, "sha512-MTKKkWB7p/0E9xi1d1tHtZ5PiLkGEMIq88pK2CubZjOsLtYTLqhgIgi6zepFa+9GHZ6h05NMCkQxGKiPXMxXtQ=="], - - "@typescript/typescript-darwin-arm64": ["@typescript/typescript-darwin-arm64@7.0.2", "", { "os": "darwin", "cpu": "arm64" }, "sha512-gowzar9MwS/aRWp6f3a4KUqzRjAZjOsmGNCM6LcTgXum+dBfgsBVMN+AgvOCCbguXyick6LJhpBszxMebJ8syA=="], - - "@typescript/typescript-darwin-x64": ["@typescript/typescript-darwin-x64@7.0.2", "", { "os": "darwin", "cpu": "x64" }, "sha512-SZ9xZInqApNlNGc9s0W1VSsktYSOe9cFqNOIqmN1Gs8SmkjKZYFt017G4VwPxASInODuAdbTW7sXiFUf893RgA=="], - - "@typescript/typescript-freebsd-arm64": ["@typescript/typescript-freebsd-arm64@7.0.2", "", { "os": "freebsd", "cpu": "arm64" }, "sha512-W5NH4y/J0plIIS5b2xvTEkU7JFxyqdMAOgf+Ilhl0vHQXKO5dZoxd+C/jEtq56c4F3wk71RB4BMRQ2XdI+bwYQ=="], - - "@typescript/typescript-freebsd-x64": ["@typescript/typescript-freebsd-x64@7.0.2", "", { "os": "freebsd", "cpu": "x64" }, "sha512-UMGDx5sTpzNw3WiPebH7l90IWfJggEd+egHt/q6p7/Cm3zqoV7VxkGXt+3DxPIw8CcmvAB0j3sVVfbhX+M4Tpw=="], - - "@typescript/typescript-linux-arm": ["@typescript/typescript-linux-arm@7.0.2", "", { "os": "linux", "cpu": "arm" }, "sha512-gffT3xPz9sR7j/YJExkyPntrI0P2EP9XbOyWzth2/Gs0RstK+90RBcO0ncXoXy/beYll1SXw846Nf2zdnEz0QQ=="], - - "@typescript/typescript-linux-arm64": ["@typescript/typescript-linux-arm64@7.0.2", "", { "os": "linux", "cpu": "arm64" }, "sha512-Qh4eU4/y3yDjnfjjyPYihMj5/ODIlmt+Bzu17OI+fiSRDW57QmU5SiN63exPRNJPKUzcc1INa1NXdrJ+MqHjUQ=="], - - "@typescript/typescript-linux-loong64": ["@typescript/typescript-linux-loong64@7.0.2", "", { "os": "linux", "cpu": "none" }, "sha512-uEHck9i8hoAzXPiYRib1O7miOnz23SxIeVl6F4LXox+qov1K35jHcEW6VHKvZI+pyvl7fZEP4MCU5LYvIq1GuQ=="], - - "@typescript/typescript-linux-mips64el": ["@typescript/typescript-linux-mips64el@7.0.2", "", { "os": "linux", "cpu": "none" }, "sha512-R4KvAMnE43W5Qeqb0Ly56O3mWMWIAgsMyz36DCaycd5nbg/9kzm0liw3JocfRqyJY0KPmzFjbswozXyW0DnIYA=="], - - "@typescript/typescript-linux-ppc64": ["@typescript/typescript-linux-ppc64@7.0.2", "", { "os": "linux", "cpu": "ppc64" }, "sha512-DORx5b3sd/4S7eayxm4FQv+A7CrkUIGRaHiwI8oiHTAI1fAPWhF4J0vAlkC8biAlHSVVwxMQ3tjZ2/DVbnQiiA=="], - - "@typescript/typescript-linux-riscv64": ["@typescript/typescript-linux-riscv64@7.0.2", "", { "os": "linux", "cpu": "none" }, "sha512-wf0jqEDOjrPRnKwYRyyJDRo11KMbvMFrU+q4zqKyChODBzvlkbhNQfKvLxQCcwTpdDaXSHZTVuh0JoCrKCUMHQ=="], - - "@typescript/typescript-linux-s390x": ["@typescript/typescript-linux-s390x@7.0.2", "", { "os": "linux", "cpu": "s390x" }, "sha512-IkwJc3L7yhytWd/ewjyxNDfOmswCm9GWMJT/ue/dU4aZNbwZeYAetq42VyLmsmSjvoX7z74X6ZaYCtzAr0EuGw=="], - - "@typescript/typescript-linux-x64": ["@typescript/typescript-linux-x64@7.0.2", "", { "os": "linux", "cpu": "x64" }, "sha512-EYdf2cNg7rgCWJnxCdJ+F3V39O8ihb37eHAu1LK8oAFizgTQbPOK7zHHXbPt8rX24COqODXeI3sIf0fCXG7H/A=="], - - "@typescript/typescript-netbsd-arm64": ["@typescript/typescript-netbsd-arm64@7.0.2", "", { "os": "none", "cpu": "arm64" }, "sha512-+polYF4MF04aPpO5FTkHran9yUQDSXqy5GiSDKpsll5jy3l3+g9QLhpf39T+ePtefhXLOGrLl0QIjkQP6VnelA=="], - - "@typescript/typescript-netbsd-x64": ["@typescript/typescript-netbsd-x64@7.0.2", "", { "os": "none", "cpu": "x64" }, "sha512-8YIT0EHM/3dq10ZOVF/A7pc/YSMtbcecct4rWtexrnSCHOPcpC2KTLXfTCR6vDpnSiY12heNb1GiN/wu+T/FyA=="], - - "@typescript/typescript-openbsd-arm64": ["@typescript/typescript-openbsd-arm64@7.0.2", "", { "os": "openbsd", "cpu": "arm64" }, "sha512-APT8+ClYnuYm1u9+kgGXoMj2VzWzcymwh2gNSQVySHfkRDGOTVkoWLjCmOQSaO+PoqQ57B0flRp9SA+7GnnkzQ=="], - - "@typescript/typescript-openbsd-x64": ["@typescript/typescript-openbsd-x64@7.0.2", "", { "os": "openbsd", "cpu": "x64" }, "sha512-yX7s+Q0Dln0Dt9tEzZsAjXXR/+ytBM7AlglaqyeMPxQszJ1JhlJdZ6jLA+IzldHtflX81em7lDao1xXu+aRRkg=="], - - "@typescript/typescript-sunos-x64": ["@typescript/typescript-sunos-x64@7.0.2", "", { "os": "sunos", "cpu": "x64" }, "sha512-dLJDGaLZ1D4HPQn62u1n8mBDkJREwMsAkCdkwd4Ieqw+x3TUyTsqY0YiBCtE6H6OzzgGk3iuZ3vFWRS+E8/d1g=="], - - "@typescript/typescript-win32-arm64": ["@typescript/typescript-win32-arm64@7.0.2", "", { "os": "win32", "cpu": "arm64" }, "sha512-Gyl1Vy6OsWesLzmq+EP0Fb7b4Nid5232AvcA2SFcdYreldpNtYFFofPjnt62y9hQy7VTaZp65ICJjuAQRaVcIQ=="], - - "@typescript/typescript-win32-x64": ["@typescript/typescript-win32-x64@7.0.2", "", { "os": "win32", "cpu": "x64" }, "sha512-0BQ3HkAHHlKLSp1qRvf3SUhGpGsDuhB/jgFw75guyqbxJqEaS0Cw/VFO8i2nHglJUzQCRtMMR/IBAKE3ETMC4g=="], - - "@ungap/structured-clone": ["@ungap/structured-clone@1.4.0", "", {}, "sha512-1mEZtMKPM09vDmQt5y7YvmN2+DFTP7Tg0EWXdic8/C6VRnpb33e4ghisCIE3WZjsE2N8mf+QV1Zqh7ZFYLWInQ=="], - - "@upsetjs/venn.js": ["@upsetjs/venn.js@2.0.0", "", { "optionalDependencies": { "d3-selection": "^3.0.0", "d3-transition": "^3.0.1" } }, "sha512-WbBhLrooyePuQ1VZxrJjtLvTc4NVfpOyKx0sKqioq9bX1C1m7Jgykkn8gLrtwumBioXIqam8DLxp88Adbue6Hw=="], - - "@yuku-core/binding-android-arm64": ["@yuku-core/binding-android-arm64@0.19.0", "", { "os": "android", "cpu": "arm64" }, "sha512-wdL2XmTiZixAOaHk9Z0JJZ8u9Qm8d333Zjpc6gaxXFX+UR5BlsfxZ7a2+2Rm71pamppsPYGUGFq2oVLbh6DISw=="], - - "@yuku-core/binding-darwin-arm64": ["@yuku-core/binding-darwin-arm64@0.19.0", "", { "os": "darwin", "cpu": "arm64" }, "sha512-7sNJa6XJhyetnTy64jw3NEi4YgUcezHk1G5GH9FSvXAuC8wIlbaOwT9lgq5qo5sspjrZJQlBR1TWflP49uRpMw=="], - - "@yuku-core/binding-darwin-x64": ["@yuku-core/binding-darwin-x64@0.19.0", "", { "os": "darwin", "cpu": "x64" }, "sha512-pTC7dYEc59isdyizc3nsuyFNBu2LU5wMYZ1be6UMr59PY/AJNtO1aBLWV0MgL/z7C1nv/2sX4TNjGgKLoeevJw=="], - - "@yuku-core/binding-freebsd-x64": ["@yuku-core/binding-freebsd-x64@0.19.0", "", { "os": "freebsd", "cpu": "x64" }, "sha512-xrZjF6XOEwyLOiDIfrwDdRCS6ghxcJeirNC1KivQhVcUwlRonaU79S3/Uiyx3lBylPnT8qKJ3/aMT+H52nGTJQ=="], - - "@yuku-core/binding-linux-arm-gnu": ["@yuku-core/binding-linux-arm-gnu@0.19.0", "", { "os": "linux", "cpu": "arm" }, "sha512-0OyIH53C0I1CbADHn9FSdCfX5qbpeLwJhmOVhonFJNYheybOnkSJ50qGMfTJIb8y5zrwqvLs7FVBvz6Fk8maZg=="], - - "@yuku-core/binding-linux-arm-musl": ["@yuku-core/binding-linux-arm-musl@0.19.0", "", { "os": "linux", "cpu": "arm" }, "sha512-z/iPfkCOCSXE34VXNt0uP1ORSW+4mEa9b5CiJcWZeqZH08g49bFU/jRM2T04f+Wpw5mJ6HIzNBiojxeAbrHjeg=="], - - "@yuku-core/binding-linux-arm64-gnu": ["@yuku-core/binding-linux-arm64-gnu@0.19.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-jLNTi+gzaRwBJ+gwhCJ+rDb5dmx/8hEBx93UWd7hjMSqPTL1D1wvVSvXVAldV5kALvju7b0/m51EHEhs4+I1fA=="], - - "@yuku-core/binding-linux-arm64-musl": ["@yuku-core/binding-linux-arm64-musl@0.19.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-YwyPIdW/rN2Fmv0MTFWi47FaB3F9g+2b+sJISyAw83Yd60RWH4T3Nx6XkAHHVN+uKJNBAd6So7/BVihSiFYvuQ=="], - - "@yuku-core/binding-linux-x64-gnu": ["@yuku-core/binding-linux-x64-gnu@0.19.0", "", { "os": "linux", "cpu": "x64" }, "sha512-/vskaAXVX3ESR43FiTdfiYS7z1b9uoQJwVQ/0RgUHgN2sWoAyCZs+aX4CgU7eKGIHTVfp9VFwv+c+2XchYiEtQ=="], - - "@yuku-core/binding-linux-x64-musl": ["@yuku-core/binding-linux-x64-musl@0.19.0", "", { "os": "linux", "cpu": "x64" }, "sha512-FuXL5igeSKib9Rye02TdH+D6SQezTyGxIATMu1Qsn/QywrzwpGl35OLpS2C1x5vpGLeVE2XgiLd5mVPFHmIglQ=="], - - "@yuku-core/binding-win32-arm64": ["@yuku-core/binding-win32-arm64@0.19.0", "", { "os": "win32", "cpu": "arm64" }, "sha512-YuJAe7zEKT1Xa7LuHlhGJpPnYQeVtvo0rZvNjJRqkH0hQGOw4C8QeP30Tg5VKGzZfo2x8CjhjEhKt4TmLwfmdg=="], - - "@yuku-core/binding-win32-x64": ["@yuku-core/binding-win32-x64@0.19.0", "", { "os": "win32", "cpu": "x64" }, "sha512-o8iY/mXwlRkedp0LNTr4+TEfXTPQwoNZmv6k+1WIAd1ZXEn8xJJTBCtB0osaVvdZo/x/cNmV16UrWrrGpM5Mvw=="], - - "@yuku-toolchain/types": ["@yuku-toolchain/types@0.19.0", "", {}, "sha512-tFkNbsP4WXX9UMUC5syJGdK9dPMLK0PPaIuXCcCYH75sZ8MrebfBZ2XvCILRTw8AgLivSSCfDa4R67iYBDa4Kg=="], - - "@zeit/schemas": ["@zeit/schemas@2.36.0", "", {}, "sha512-7kjMwcChYEzMKjeex9ZFXkt1AyNov9R5HZtjBKVsmVpw7pa7ZtlCGvCBC2vnnXctaYN+aRI61HjIqeetZW5ROg=="], - - "acorn": ["acorn@8.19.0", "", { "bin": { "acorn": "bin/acorn" } }, "sha512-oJlA3XiRm7Cyk6qFD2Jn8ak9B7jSy0qy00ADO3+8dpT0LSjFihQYv4C02LFCSYJV3Q37xYwwRy5m+IpIiUzqWw=="], - - "acorn-jsx": ["acorn-jsx@5.3.2", "", { "peerDependencies": { "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ=="], - - "ajv": ["ajv@8.18.0", "", { "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", "json-schema-traverse": "^1.0.0", "require-from-string": "^2.0.2" } }, "sha512-PlXPeEWMXMZ7sPYOHqmDyCJzcfNrUr3fGNKtezX14ykXOEIvyK81d+qydx89KY5O71FKMPaQ2vBfBFI5NHR63A=="], - - "ansi-align": ["ansi-align@3.0.1", "", { "dependencies": { "string-width": "^4.1.0" } }, "sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w=="], - - "ansi-regex": ["ansi-regex@6.4.0", "", {}, "sha512-KzTVk2tCWAHtYrvvvaP8bJKJq2pVinhLcGEQdtLIYPbmNGNyYe8QwNaTUYQp2J7/vIsUKt5QCqAfUkYyG9DkOw=="], - - "ansi-styles": ["ansi-styles@6.2.3", "", {}, "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg=="], - - "arg": ["arg@5.0.2", "", {}, "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg=="], - - "astring": ["astring@1.9.0", "", { "bin": { "astring": "bin/astring" } }, "sha512-LElXdjswlqjWrPpJFg1Fx4wpkOCxj1TDHlSV4PlaRxHGWko024xICaa97ZkMfs6DRKlCguiAI+rbXv5GWwXIkg=="], - - "bail": ["bail@2.0.2", "", {}, "sha512-0xO6mYd7JB2YesxDKplafRpsiOzPt9V02ddPCLbY1xYGPOX24NTyN50qnUxgCPcSoYMhKpAuBTjQoRZCAkUDRw=="], - - "balanced-match": ["balanced-match@1.0.2", "", {}, "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="], - - "baseline-browser-mapping": ["baseline-browser-mapping@2.11.30", "", { "bin": { "baseline-browser-mapping": "dist/cli.cjs" } }, "sha512-YJs6Pz17RMNv8HoyKREtCY38E3BV1nPkWVmIb+XN1uHC1Vqt3KZCH/uJH9ZKRoiKb/icZ6tvehyee6RZNbFfRA=="], - - "boxen": ["boxen@7.0.0", "", { "dependencies": { "ansi-align": "^3.0.1", "camelcase": "^7.0.0", "chalk": "^5.0.1", "cli-boxes": "^3.0.0", "string-width": "^5.1.2", "type-fest": "^2.13.0", "widest-line": "^4.0.1", "wrap-ansi": "^8.0.1" } }, "sha512-j//dBVuyacJbvW+tvZ9HuH03fZ46QcaKvvhZickZqtB271DxJ7SNRSNxrV/dZX0085m7hISRZWbzWlJvx/rHSg=="], - - "brace-expansion": ["brace-expansion@1.1.21", "", { "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, "sha512-9zeA+KLZNNzglF2TPKRQEDyx6Yby7daAkuy8MiPzpXPsYDWi/DRM8jmwUDxokQjYqBpv5DgPiwD4h4ZZSy1Ujw=="], - - "bytes": ["bytes@3.1.2", "", {}, "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg=="], - - "camelcase": ["camelcase@7.0.1", "", {}, "sha512-xlx1yCK2Oc1APsPXDL2LdlNP6+uu8OCDdhOBSVT279M/S+y75O30C2VuD8T2ogdePBBl7PfPF4504tnLgX3zfw=="], - - "caniuse-lite": ["caniuse-lite@1.0.30001817", "", {}, "sha512-uZ1JG80BwhtMalIAGPxPfmNhHyd/B/nTdr3hITWlRamSyAdUStP1Gop01e7SD5q6J90ixJvWDbvmiFVfDgn4bw=="], - - "ccount": ["ccount@2.0.1", "", {}, "sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg=="], - - "chalk": ["chalk@5.0.1", "", {}, "sha512-Fo07WOYGqMfCWHOzSXOt2CxDbC6skS/jO9ynEcmpANMoPrD+W1r1K6Vx7iNm+AQmETU1Xr2t+n8nzkV9t6xh3w=="], - - "chalk-template": ["chalk-template@0.4.0", "", { "dependencies": { "chalk": "^4.1.2" } }, "sha512-/ghrgmhfY8RaSdeo43hNXxpoHAtxdbskUHjPpfqUWGttFgycUhYPGx3YZBCnUCvOa7Doivn1IZec3DEGFoMgLg=="], - - "character-entities": ["character-entities@2.0.2", "", {}, "sha512-shx7oQ0Awen/BRIdkjkvz54PnEEI/EjwXDSIZp86/KKdbafHh1Df/RYGBhn4hbe2+uKC9FnT5UCEdyPz3ai9hQ=="], - - "character-entities-html4": ["character-entities-html4@2.1.0", "", {}, "sha512-1v7fgQRj6hnSwFpq1Eu0ynr/CDEw0rXo2B61qXrLNdHZmPKgb7fqS1a2JwF0rISo9q77jDI8VMEHoApn8qDoZA=="], - - "character-entities-legacy": ["character-entities-legacy@3.0.0", "", {}, "sha512-RpPp0asT/6ufRm//AJVwpViZbGM/MkjQFxJccQRHmISF/22NBtsHqAWmL+/pmkPWoIUJdWyeVleTl1wydHATVQ=="], - - "character-reference-invalid": ["character-reference-invalid@2.0.1", "", {}, "sha512-iBZ4F4wRbyORVsu0jPV7gXkOsGYjGHPmAyv+HiHG8gi5PtC9KI2j1+v8/tlibRvjoWX027ypmG/n0HtO5t7unw=="], - - "chevrotain": ["chevrotain@13.2.0", "", { "dependencies": { "@chevrotain/cst-dts-gen": "13.2.0", "@chevrotain/gast": "13.2.0", "@chevrotain/regexp-to-ast": "13.2.0", "@chevrotain/types": "13.2.0", "@chevrotain/utils": "13.2.0" } }, "sha512-GTouk5YzgBxlTPCaDn5q0q2EJKkrYmnPF+HmF8v0Qo4r3iyPG7HJivkN1wthCXZcm3sIcZFpGTRovLPNdJNRCA=="], - - "chokidar": ["chokidar@6.0.0", "", { "dependencies": { "readdirp": "^5.1.1" } }, "sha512-Ec2Z7wpcKBiMpR7DxteoqS/sq5G5d2A4fpxzPv6+fD7xNNdrTghn7L11YwV5EN1B3i72Erc3XVT5FkWIDx90+A=="], - - "class-variance-authority": ["class-variance-authority@0.7.1", "", { "dependencies": { "clsx": "^2.1.1" } }, "sha512-Ka+9Trutv7G8M6WT6SeiRWz792K5qEqIGEGzXKhAE6xOWAY6pPH8U+9IY3oCMv6kqTmLsv7Xh/2w2RigkePMsg=="], - - "cli-boxes": ["cli-boxes@3.0.0", "", {}, "sha512-/lzGpEWL/8PfI0BmBOPRwp0c/wFNX1RdUML3jK/RcSBA9T8mZDdQpqYBKtCFTOfQbwPqWEOpjqW+Fnayc0969g=="], - - "client-only": ["client-only@0.0.1", "", {}, "sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA=="], - - "clsx": ["clsx@2.1.1", "", {}, "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA=="], - - "cn": ["cn@0.5.2", "", { "bin": { "cn": "bin/cn.mjs" } }, "sha512-wm10E6iuJ37rALOw3D+3cfaXXZSLNMh2uxpQn3dNICqfJM59yXqgbA9/9Iiz155j5kYNLdK6WreNdW3NQtx3OQ=="], - - "collapse-white-space": ["collapse-white-space@2.1.0", "", {}, "sha512-loKTxY1zCOuG4j9f6EPnuyyYkf58RnhhWTvRoZEokgB+WbdXehfjFviyOVYkqzEWz1Q5kRiZdBYS5SwxbQYwzw=="], - - "color-convert": ["color-convert@2.0.1", "", { "dependencies": { "color-name": "~1.1.4" } }, "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ=="], - - "color-name": ["color-name@1.1.4", "", {}, "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="], - - "comma-separated-tokens": ["comma-separated-tokens@2.0.3", "", {}, "sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg=="], - - "commander": ["commander@15.0.0", "", {}, "sha512-z67u4ZhzCL/Tydu1lJARtEZYWbWaN7oYLHbsuzocr6y4N6WZAagG3RQ4FW61V1/0+jImpj293XfrcYnd1qxtPg=="], - - "compressible": ["compressible@2.0.18", "", { "dependencies": { "mime-db": ">= 1.43.0 < 2" } }, "sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg=="], - - "compression": ["compression@1.8.2", "", { "dependencies": { "bytes": "3.1.2", "compressible": "~2.0.18", "debug": "2.6.9", "destroy": "1.2.0", "negotiator": "~0.6.4", "on-headers": "~1.1.0", "safe-buffer": "5.2.1", "vary": "~1.1.2" } }, "sha512-o8vI5RE5A6EVVOd9o41jKp41aJom+QTEO/Bx8MYNjexMo/Bv2WOjUfZr+aL0WnYSgymUy6zeguqLTsIhV0gMvQ=="], - - "compute-scroll-into-view": ["compute-scroll-into-view@3.1.1", "", {}, "sha512-VRhuHOLoKYOy4UbilLbUzbYg93XLjv2PncJC50EuTWPA3gaja1UjBsUP/D/9/juV3vQFr6XBEzn9KCAHdUvOHw=="], - - "concat-map": ["concat-map@0.0.1", "", {}, "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg=="], - - "content-disposition": ["content-disposition@0.5.2", "", {}, "sha512-kRGRZw3bLlFISDBgwTSA1TMBFN6J6GWDeubmDE3AF+3+yXL8hTWv8r5rkLbqYXY4RjPk/EzHnClI3zQf1cFmHA=="], - - "cose-base": ["cose-base@1.0.3", "", { "dependencies": { "layout-base": "^1.0.0" } }, "sha512-s9whTXInMSgAp/NVXVNuVxVKzGH2qck3aQlVHxDCdAEPgtMKwc4Wq6/QKhgdEdgbLSi9rBTAcPoRa6JpiG4ksg=="], - - "csstype": ["csstype@3.2.3", "", {}, "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ=="], - - "cytoscape": ["cytoscape@3.34.4", "", {}, "sha512-msY99tMY8iWTg+sIPGfSqDcPNOt4xcj+v/K/7qUFaCUxxlqnMkUYLBjRUzn9W5CU/R2hrmtJa5+UtovrEM2ctg=="], - - "cytoscape-cose-bilkent": ["cytoscape-cose-bilkent@4.1.0", "", { "dependencies": { "cose-base": "^1.0.0" }, "peerDependencies": { "cytoscape": "^3.2.0" } }, "sha512-wgQlVIUJF13Quxiv5e1gstZ08rnZj2XaLHGoFMYXz7SkNfCDOOteKBE6SYRfA9WxxI/iBc3ajfDoc6hb/MRAHQ=="], - - "cytoscape-fcose": ["cytoscape-fcose@2.2.0", "", { "dependencies": { "cose-base": "^2.2.0" }, "peerDependencies": { "cytoscape": "^3.2.0" } }, "sha512-ki1/VuRIHFCzxWNrsshHYPs6L7TvLu3DL+TyIGEsRcvVERmxokbf5Gdk7mFxZnTdiGtnA4cfSmjZJMviqSuZrQ=="], - - "d3": ["d3@7.9.0", "", { "dependencies": { "d3-array": "3", "d3-axis": "3", "d3-brush": "3", "d3-chord": "3", "d3-color": "3", "d3-contour": "4", "d3-delaunay": "6", "d3-dispatch": "3", "d3-drag": "3", "d3-dsv": "3", "d3-ease": "3", "d3-fetch": "3", "d3-force": "3", "d3-format": "3", "d3-geo": "3", "d3-hierarchy": "3", "d3-interpolate": "3", "d3-path": "3", "d3-polygon": "3", "d3-quadtree": "3", "d3-random": "3", "d3-scale": "4", "d3-scale-chromatic": "3", "d3-selection": "3", "d3-shape": "3", "d3-time": "3", "d3-time-format": "4", "d3-timer": "3", "d3-transition": "3", "d3-zoom": "3" } }, "sha512-e1U46jVP+w7Iut8Jt8ri1YsPOvFpg46k+K8TpCb0P+zjCkjkPnV7WzfDJzMHy1LnA+wj5pLT1wjO901gLXeEhA=="], - - "d3-array": ["d3-array@3.2.4", "", { "dependencies": { "internmap": "1 - 2" } }, "sha512-tdQAmyA18i4J7wprpYq8ClcxZy3SC31QMeByyCFyRt7BVHdREQZ5lpzoe5mFEYZUWe+oq8HBvk9JjpibyEV4Jg=="], - - "d3-axis": ["d3-axis@3.0.0", "", {}, "sha512-IH5tgjV4jE/GhHkRV0HiVYPDtvfjHQlQfJHs0usq7M30XcSBvOotpmH1IgkcXsO/5gEQZD43B//fc7SRT5S+xw=="], - - "d3-brush": ["d3-brush@3.0.0", "", { "dependencies": { "d3-dispatch": "1 - 3", "d3-drag": "2 - 3", "d3-interpolate": "1 - 3", "d3-selection": "3", "d3-transition": "3" } }, "sha512-ALnjWlVYkXsVIGlOsuWH1+3udkYFI48Ljihfnh8FZPF2QS9o+PzGLBslO0PjzVoHLZ2KCVgAM8NVkXPJB2aNnQ=="], - - "d3-chord": ["d3-chord@3.0.1", "", { "dependencies": { "d3-path": "1 - 3" } }, "sha512-VE5S6TNa+j8msksl7HwjxMHDM2yNK3XCkusIlpX5kwauBfXuyLAtNg9jCp/iHH61tgI4sb6R/EIMWCqEIdjT/g=="], - - "d3-color": ["d3-color@3.1.0", "", {}, "sha512-zg/chbXyeBtMQ1LbD/WSoW2DpC3I0mpmPdW+ynRTj/x2DAWYrIY7qeZIHidozwV24m4iavr15lNwIwLxRmOxhA=="], - - "d3-contour": ["d3-contour@4.0.2", "", { "dependencies": { "d3-array": "^3.2.0" } }, "sha512-4EzFTRIikzs47RGmdxbeUvLWtGedDUNkTcmzoeyg4sP/dvCexO47AaQL7VKy/gul85TOxw+IBgA8US2xwbToNA=="], - - "d3-delaunay": ["d3-delaunay@6.0.4", "", { "dependencies": { "delaunator": "5" } }, "sha512-mdjtIZ1XLAM8bm/hx3WwjfHt6Sggek7qH043O8KEjDXN40xi3vx/6pYSVTwLjEgiXQTbvaouWKynLBiUZ6SK6A=="], - - "d3-dispatch": ["d3-dispatch@3.0.1", "", {}, "sha512-rzUyPU/S7rwUflMyLc1ETDeBj0NRuHKKAcvukozwhshr6g6c5d8zh4c2gQjY2bZ0dXeGLWc1PF174P2tVvKhfg=="], - - "d3-drag": ["d3-drag@3.0.0", "", { "dependencies": { "d3-dispatch": "1 - 3", "d3-selection": "3" } }, "sha512-pWbUJLdETVA8lQNJecMxoXfH6x+mO2UQo8rSmZ+QqxcbyA3hfeprFgIT//HW2nlHChWeIIMwS2Fq+gEARkhTkg=="], - - "d3-dsv": ["d3-dsv@3.0.1", "", { "dependencies": { "commander": "7", "iconv-lite": "0.6", "rw": "1" }, "bin": { "csv2json": "bin/dsv2json.js", "csv2tsv": "bin/dsv2dsv.js", "dsv2dsv": "bin/dsv2dsv.js", "dsv2json": "bin/dsv2json.js", "json2csv": "bin/json2dsv.js", "json2dsv": "bin/json2dsv.js", "json2tsv": "bin/json2dsv.js", "tsv2csv": "bin/dsv2dsv.js", "tsv2json": "bin/dsv2json.js" } }, "sha512-UG6OvdI5afDIFP9w4G0mNq50dSOsXHJaRE8arAS5o9ApWnIElp8GZw1Dun8vP8OyHOZ/QJUKUJwxiiCCnUwm+Q=="], - - "d3-ease": ["d3-ease@3.0.1", "", {}, "sha512-wR/XK3D3XcLIZwpbvQwQ5fK+8Ykds1ip7A2Txe0yxncXSdq1L9skcG7blcedkOX+ZcgxGAmLX1FrRGbADwzi0w=="], - - "d3-fetch": ["d3-fetch@3.0.1", "", { "dependencies": { "d3-dsv": "1 - 3" } }, "sha512-kpkQIM20n3oLVBKGg6oHrUchHM3xODkTzjMoj7aWQFq5QEM+R6E4WkzT5+tojDY7yjez8KgCBRoj4aEr99Fdqw=="], - - "d3-force": ["d3-force@3.0.0", "", { "dependencies": { "d3-dispatch": "1 - 3", "d3-quadtree": "1 - 3", "d3-timer": "1 - 3" } }, "sha512-zxV/SsA+U4yte8051P4ECydjD/S+qeYtnaIyAs9tgHCqfguma/aAQDjo85A9Z6EKhBirHRJHXIgJUlffT4wdLg=="], - - "d3-format": ["d3-format@3.1.2", "", {}, "sha512-AJDdYOdnyRDV5b6ArilzCPPwc1ejkHcoyFarqlPqT7zRYjhavcT3uSrqcMvsgh2CgoPbK3RCwyHaVyxYcP2Arg=="], - - "d3-geo": ["d3-geo@3.1.1", "", { "dependencies": { "d3-array": "2.5.0 - 3" } }, "sha512-637ln3gXKXOwhalDzinUgY83KzNWZRKbYubaG+fGVuc/dxO64RRljtCTnf5ecMyE1RIdtqpkVcq0IbtU2S8j2Q=="], - - "d3-hierarchy": ["d3-hierarchy@3.1.2", "", {}, "sha512-FX/9frcub54beBdugHjDCdikxThEqjnR93Qt7PvQTOHxyiNCAlvMrHhclk3cD5VeAaq9fxmfRp+CnWw9rEMBuA=="], - - "d3-interpolate": ["d3-interpolate@3.0.1", "", { "dependencies": { "d3-color": "1 - 3" } }, "sha512-3bYs1rOD33uo8aqJfKP3JWPAibgw8Zm2+L9vBKEHJ2Rg+viTR7o5Mmv5mZcieN+FRYaAOWX5SJATX6k1PWz72g=="], - - "d3-path": ["d3-path@3.1.0", "", {}, "sha512-p3KP5HCf/bvjBSSKuXid6Zqijx7wIfNW+J/maPs+iwR35at5JCbLUT0LzF1cnjbCHWhqzQTIN2Jpe8pRebIEFQ=="], - - "d3-polygon": ["d3-polygon@3.0.1", "", {}, "sha512-3vbA7vXYwfe1SYhED++fPUQlWSYTTGmFmQiany/gdbiWgU/iEyQzyymwL9SkJjFFuCS4902BSzewVGsHHmHtXg=="], - - "d3-quadtree": ["d3-quadtree@3.0.1", "", {}, "sha512-04xDrxQTDTCFwP5H6hRhsRcb9xxv2RzkcsygFzmkSIOJy3PeRJP7sNk3VRIbKXcog561P9oU0/rVH6vDROAgUw=="], - - "d3-random": ["d3-random@3.0.1", "", {}, "sha512-FXMe9GfxTxqd5D6jFsQ+DJ8BJS4E/fT5mqqdjovykEB2oFbTMDVdg1MGFxfQW+FBOGoB++k8swBrgwSHT1cUXQ=="], - - "d3-sankey": ["d3-sankey@0.12.3", "", { "dependencies": { "d3-array": "1 - 2", "d3-shape": "^1.2.0" } }, "sha512-nQhsBRmM19Ax5xEIPLMY9ZmJ/cDvd1BG3UVvt5h3WRxKg5zGRbvnteTyWAbzeSvlh3tW7ZEmq4VwR5mB3tutmQ=="], - - "d3-scale": ["d3-scale@4.0.2", "", { "dependencies": { "d3-array": "2.10.0 - 3", "d3-format": "1 - 3", "d3-interpolate": "1.2.0 - 3", "d3-time": "2.1.1 - 3", "d3-time-format": "2 - 4" } }, "sha512-GZW464g1SH7ag3Y7hXjf8RoUuAFIqklOAq3MRl4OaWabTFJY9PN/E1YklhXLh+OQ3fM9yS2nOkCoS+WLZ6kvxQ=="], - - "d3-scale-chromatic": ["d3-scale-chromatic@3.1.0", "", { "dependencies": { "d3-color": "1 - 3", "d3-interpolate": "1 - 3" } }, "sha512-A3s5PWiZ9YCXFye1o246KoscMWqf8BsD9eRiJ3He7C9OBaxKhAd5TFCdEx/7VbKtxxTsu//1mMJFrEt572cEyQ=="], - - "d3-selection": ["d3-selection@3.0.0", "", {}, "sha512-fmTRWbNMmsmWq6xJV8D19U/gw/bwrHfNXxrIN+HfZgnzqTHp9jOmKMhsTUjXOJnZOdZY9Q28y4yebKzqDKlxlQ=="], - - "d3-shape": ["d3-shape@3.2.0", "", { "dependencies": { "d3-path": "^3.1.0" } }, "sha512-SaLBuwGm3MOViRq2ABk3eLoxwZELpH6zhl3FbAoJ7Vm1gofKx6El1Ib5z23NUEhF9AsGl7y+dzLe5Cw2AArGTA=="], - - "d3-time": ["d3-time@3.1.0", "", { "dependencies": { "d3-array": "2 - 3" } }, "sha512-VqKjzBLejbSMT4IgbmVgDjpkYrNWUYJnbCGo874u7MMKIWsILRX+OpX/gTk8MqjpT1A/c6HY2dCA77ZN0lkQ2Q=="], - - "d3-time-format": ["d3-time-format@4.1.0", "", { "dependencies": { "d3-time": "1 - 3" } }, "sha512-dJxPBlzC7NugB2PDLwo9Q8JiTR3M3e4/XANkreKSUxF8vvXKqm1Yfq4Q5dl8budlunRVlUUaDUgFt7eA8D6NLg=="], - - "d3-timer": ["d3-timer@3.0.1", "", {}, "sha512-ndfJ/JxxMd3nw31uyKoY2naivF+r29V+Lc0svZxe1JvvIRmi8hUsrMvdOwgS1o6uBHmiz91geQ0ylPP0aj1VUA=="], - - "d3-transition": ["d3-transition@3.0.1", "", { "dependencies": { "d3-color": "1 - 3", "d3-dispatch": "1 - 3", "d3-ease": "1 - 3", "d3-interpolate": "1 - 3", "d3-timer": "1 - 3" }, "peerDependencies": { "d3-selection": "2 - 3" } }, "sha512-ApKvfjsSR6tg06xrL434C0WydLr7JewBB3V+/39RMHsaXTOG0zmt/OAXeng5M5LBm0ojmxJrpomQVZ1aPvBL4w=="], - - "d3-zoom": ["d3-zoom@3.0.0", "", { "dependencies": { "d3-dispatch": "1 - 3", "d3-drag": "2 - 3", "d3-interpolate": "1 - 3", "d3-selection": "2 - 3", "d3-transition": "2 - 3" } }, "sha512-b8AmV3kfQaqWAuacbPuNbL6vahnOJflOhexLzMMNLga62+/nh0JzvJ0aO/5a5MVgUFGS7Hu1P9P03o3fJkDCyw=="], - - "dagre-d3-es": ["dagre-d3-es@7.0.14", "", { "dependencies": { "d3": "^7.9.0", "lodash-es": "^4.17.21" } }, "sha512-P4rFMVq9ESWqmOgK+dlXvOtLwYg0i7u0HBGJER0LZDJT2VHIPAMZ/riPxqJceWMStH5+E61QxFra9kIS3AqdMg=="], - - "dayjs": ["dayjs@1.11.23", "", {}, "sha512-QDTCU0M0MxR3hQfnlDJfwekQiaanm1ubOD231u73WBckQ/fsamwRLiE2GBz6D3a/xF1NgfiDLJjXBa1hYOYTtQ=="], - - "debug": ["debug@2.6.9", "", { "dependencies": { "ms": "2.0.0" } }, "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA=="], - - "decode-named-character-reference": ["decode-named-character-reference@1.3.0", "", { "dependencies": { "character-entities": "^2.0.0" } }, "sha512-GtpQYB283KrPp6nRw50q3U9/VfOutZOe103qlN7BPP6Ad27xYnOIWv4lPzo8HCAL+mMZofJ9KEy30fq6MfaK6Q=="], - - "deep-extend": ["deep-extend@0.6.0", "", {}, "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA=="], - - "delaunator": ["delaunator@5.1.0", "", { "dependencies": { "robust-predicates": "^3.0.2" } }, "sha512-AGrQ4QSgssa1NGmWmLPqN5NY2KajF5MqxetNEO+o0n3ZwZZeTmt7bBnvzHWrmkZFxGgr4HdyFgelzgi06otLuQ=="], - - "dequal": ["dequal@2.0.3", "", {}, "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA=="], - - "destroy": ["destroy@1.2.0", "", {}, "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg=="], - - "detect-libc": ["detect-libc@2.1.2", "", {}, "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ=="], - - "detect-node-es": ["detect-node-es@1.1.0", "", {}, "sha512-ypdmJU/TbBby2Dxibuv7ZLW3Bs1QEmM7nHjEANfohJLvE0XVujisn1qPJcZxg+qDucsr+bP6fLD1rPS3AhJ7EQ=="], - - "devlop": ["devlop@1.1.0", "", { "dependencies": { "dequal": "^2.0.0" } }, "sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA=="], - - "dompurify": ["dompurify@3.4.17", "", { "optionalDependencies": { "@types/trusted-types": "^2.0.7" } }, "sha512-B/pSlYVHQ58kqISD/yDjuJ1yfzI34m1gF4lAod2bwSRhiN4K5Cl3H8Af7hqB2PmTL911tdEudnnXn5FnhRoz0w=="], - - "eastasianwidth": ["eastasianwidth@0.2.0", "", {}, "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA=="], - - "elkjs": ["elkjs@0.12.1", "", {}, "sha512-IhMYKHE4S2vtx0QrhBP3lYOIKDeIiJXBrdq9MGYkuB8ZHqhrBnHNfSUndjXFewrX1CPK8chwq+2NA0K0hliYuw=="], - - "emoji-regex": ["emoji-regex@9.2.2", "", {}, "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg=="], - - "enhanced-resolve": ["enhanced-resolve@5.26.0", "", { "dependencies": { "graceful-fs": "^4.2.4", "tapable": "^2.3.3" } }, "sha512-9vhedylFonb2YGogzUKX6+Ja72gOJbN1QHAqdrvqLwhdl/QWbKopzoUC9EbQNVsAns/bx/4uyqalrQAoy1IByw=="], - - "es-toolkit": ["es-toolkit@1.52.0", "", {}, "sha512-XTNEJQh1tY1ZJVcf6ayP/2n4ZPyaHlW2FWs7xvw5ddPuhUVjLD3olQVQS7kf58JbAB48iL0uL/jerTrjtV3lDA=="], - - "esast-util-from-estree": ["esast-util-from-estree@2.0.0", "", { "dependencies": { "@types/estree-jsx": "^1.0.0", "devlop": "^1.0.0", "estree-util-visit": "^2.0.0", "unist-util-position-from-estree": "^2.0.0" } }, "sha512-4CyanoAudUSBAn5K13H4JhsMH6L9ZP7XbLVe/dKybkxMO7eDyLsT8UHl9TRNrU2Gr9nz+FovfSIjuXWJ81uVwQ=="], - - "esast-util-from-js": ["esast-util-from-js@2.0.1", "", { "dependencies": { "@types/estree-jsx": "^1.0.0", "acorn": "^8.0.0", "esast-util-from-estree": "^2.0.0", "vfile-message": "^4.0.0" } }, "sha512-8Ja+rNJ0Lt56Pcf3TAmpBZjmx8ZcK5Ts4cAzIOjsjevg9oSXJnl6SUQ2EevU8tv3h6ZLWmoKL5H4fgWvdvfETw=="], - - "esbuild": ["esbuild@0.28.2", "", { "optionalDependencies": { "@esbuild/aix-ppc64": "0.28.2", "@esbuild/android-arm": "0.28.2", "@esbuild/android-arm64": "0.28.2", "@esbuild/android-x64": "0.28.2", "@esbuild/darwin-arm64": "0.28.2", "@esbuild/darwin-x64": "0.28.2", "@esbuild/freebsd-arm64": "0.28.2", "@esbuild/freebsd-x64": "0.28.2", "@esbuild/linux-arm": "0.28.2", "@esbuild/linux-arm64": "0.28.2", "@esbuild/linux-ia32": "0.28.2", "@esbuild/linux-loong64": "0.28.2", "@esbuild/linux-mips64el": "0.28.2", "@esbuild/linux-ppc64": "0.28.2", "@esbuild/linux-riscv64": "0.28.2", "@esbuild/linux-s390x": "0.28.2", "@esbuild/linux-x64": "0.28.2", "@esbuild/netbsd-arm64": "0.28.2", "@esbuild/netbsd-x64": "0.28.2", "@esbuild/openbsd-arm64": "0.28.2", "@esbuild/openbsd-x64": "0.28.2", "@esbuild/openharmony-arm64": "0.28.2", "@esbuild/sunos-x64": "0.28.2", "@esbuild/win32-arm64": "0.28.2", "@esbuild/win32-ia32": "0.28.2", "@esbuild/win32-x64": "0.28.2" }, "bin": { "esbuild": "bin/esbuild" } }, "sha512-HKVLS8dvII+xoKW9kmqxbRKrnWEXfJJr/FZhhJmiqIB0e053QNYFqOBouTMO/k5sID4MvCiUCvv8b9M4h32wIA=="], - - "escape-string-regexp": ["escape-string-regexp@5.0.0", "", {}, "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw=="], - - "estree-util-attach-comments": ["estree-util-attach-comments@3.0.0", "", { "dependencies": { "@types/estree": "^1.0.0" } }, "sha512-cKUwm/HUcTDsYh/9FgnuFqpfquUbwIqwKM26BVCGDPVgvaCl/nDCCjUfiLlx6lsEZ3Z4RFxNbOQ60pkaEwFxGw=="], - - "estree-util-build-jsx": ["estree-util-build-jsx@3.0.1", "", { "dependencies": { "@types/estree-jsx": "^1.0.0", "devlop": "^1.0.0", "estree-util-is-identifier-name": "^3.0.0", "estree-walker": "^3.0.0" } }, "sha512-8U5eiL6BTrPxp/CHbs2yMgP8ftMhR5ww1eIKoWRMlqvltHF8fZn5LRDvTKuxD3DUn+shRbLGqXemcP51oFCsGQ=="], - - "estree-util-is-identifier-name": ["estree-util-is-identifier-name@3.0.0", "", {}, "sha512-hFtqIDZTIUZ9BXLb8y4pYGyk6+wekIivNVTcmvk8NoOh+VeRn5y6cEHzbURrWbfp1fIqdVipilzj+lfaadNZmg=="], - - "estree-util-scope": ["estree-util-scope@1.0.1", "", { "dependencies": { "@types/estree": "^1.0.0", "devlop": "^1.0.0" } }, "sha512-B0np3dcdxqILX5e9nEi5/Fr4K7gL4oYFVPV1zRa2e9wRCbQoZZNWOZFYyoInvXUPJXBXjss+QXlWLJChDEHDkA=="], - - "estree-util-to-js": ["estree-util-to-js@2.0.0", "", { "dependencies": { "@types/estree-jsx": "^1.0.0", "astring": "^1.8.0", "source-map": "^0.7.0" } }, "sha512-WDF+xj5rRWmD5tj6bIqRi6CkLIXbbNQUcxQHzGysQzvHmdYG2G7p/Tf0J0gpxGgkeMZNTIjT/AoSvC9Xehcgdg=="], - - "estree-util-value-to-estree": ["estree-util-value-to-estree@3.5.0", "", { "dependencies": { "@types/estree": "^1.0.0" } }, "sha512-aMV56R27Gv3QmfmF1MY12GWkGzzeAezAX+UplqHVASfjc9wNzI/X6hC0S9oxq61WT4aQesLGslWP9tKk6ghRZQ=="], - - "estree-util-visit": ["estree-util-visit@2.0.0", "", { "dependencies": { "@types/estree-jsx": "^1.0.0", "@types/unist": "^3.0.0" } }, "sha512-m5KgiH85xAhhW8Wta0vShLcUvOsh3LLPI2YVwcbio1l7E09NTLL1EyMZFM1OyWowoH0skScNbhOPl4kcBgzTww=="], - - "estree-walker": ["estree-walker@3.0.3", "", { "dependencies": { "@types/estree": "^1.0.0" } }, "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g=="], - - "extend": ["extend@3.0.2", "", {}, "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g=="], - - "fast-deep-equal": ["fast-deep-equal@3.1.3", "", {}, "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q=="], - - "fast-uri": ["fast-uri@3.1.9", "", {}, "sha512-hS/0Wt3Ya043oKXs0sIxrMpKQITXhMLIrVAKKXi4gozGC9v7YRWVnXIZzjNPTO02M9BdxLCWqK1yRXgNziVyJQ=="], - - "fdir": ["fdir@6.5.0", "", { "peerDependencies": { "picomatch": "^3 || ^4" }, "optionalPeers": ["picomatch"] }, "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg=="], - - "framer-motion": ["framer-motion@14.14.0", "", { "dependencies": { "motion-dom": "14.14.0", "motion-utils": "14.7.0", "tslib": "^2.4.0" }, "peerDependencies": { "react": "^18.0.0 || ^19.0.0", "react-dom": "^18.0.0 || ^19.0.0", "remix": "^3.1.0" }, "optionalPeers": ["react", "react-dom", "remix"] }, "sha512-fidRX0VzkZdA9OovFiBSzJtt9/jLcJpna78Z+KCqQQZIWoIpN3tOhEXAhhAw/FObUUh+o3Y18yx1F4BP0mVJ8Q=="], - - "fumadocs-core": ["fumadocs-core@16.19.4", "", { "dependencies": { "@fumari/image-size": "^0.1.1", "acorn": "^8.19.0", "acorn-jsx": "^5.3.2", "estree-util-value-to-estree": "^3.5.0", "github-slugger": "^2.0.0", "hast-util-from-dom": "^5.0.1", "hast-util-to-estree": "^3.1.3", "mdast-util-mdx": "^3.0.0", "micromark": "^4.0.3", "micromark-extension-gfm-table": "^2.1.2", "npm-to-yarn": "3.2.0", "remark": "^15.0.1", "remark-gfm": "^4.0.1", "remark-rehype": "^11.1.2", "scroll-into-view-if-needed": "^3.1.0", "shiki": "^4.6.0", "tinyglobby": "^0.2.17", "unified": "^11.0.5", "vfile": "^6.0.3", "yaml": "^2.9.1", "zbsearch": "^4.0.2" }, "peerDependencies": { "@mdx-js/mdx": "*", "@mixedbread/sdk": "0.x.x", "@modelcontextprotocol/server": "2.x.x", "@orama/core": "1.x.x", "@oramacloud/client": "2.x.x", "@pierre/highlights": "0.x.x", "@tanstack/react-router": "1.x.x", "@types/estree-jsx": "*", "@types/hast": "*", "@types/mdast": "*", "@types/react": "*", "algoliasearch": "5.x.x", "flexsearch": "*", "lucide-react": "*", "meilisearch": ">=0.50.0 <1.0.0", "next": "16.x.x", "react": "^19.2.0", "react-dom": "^19.2.0", "react-router": "7.x.x || 8.x.x", "waku": "*", "zod": "4.x.x" }, "optionalPeers": ["@mdx-js/mdx", "@mixedbread/sdk", "@modelcontextprotocol/server", "@orama/core", "@oramacloud/client", "@pierre/highlights", "@tanstack/react-router", "@types/estree-jsx", "@types/hast", "@types/mdast", "@types/react", "algoliasearch", "flexsearch", "lucide-react", "meilisearch", "next", "react", "react-dom", "react-router", "waku", "zod"] }, "sha512-PRYjTrfIbp3clCIE4n0nhbkGnoDg61cDOQp0GNYtAMl7haBgVykaQhI5SRTS8/i6POfodSR6C5lJiAGBBH1eNA=="], - - "fumadocs-mdx": ["fumadocs-mdx@15.6.3", "", { "dependencies": { "@mdx-js/mdx": "^3.1.1", "@standard-schema/spec": "^1.1.0", "acorn": "^8.19.0", "acorn-jsx": "^5.3.2", "chokidar": "^6.0.0", "esbuild": "^0.28.2", "estree-util-value-to-estree": "^3.5.0", "github-slugger": "^2.0.0", "magic-string": "^1.4.5", "mdast-util-from-markdown": "^2.1.0", "mdast-util-mdx": "^3.0.0", "micromark-extension-mdxjs-esm": "^3.0.0", "picocolors": "^1.1.1", "picomatch": "^4.0.7", "tinyexec": "^1.3.1", "tinyglobby": "^0.2.17", "unified": "^11.0.5", "unist-util-remove-position": "^5.0.0", "vfile": "^6.0.3", "yaml": "^2.9.1", "yuku-analyzer": "^0.19.0", "zod": "^4.6.7" }, "peerDependencies": { "@fumadocs/satteri": "0.x.x", "@types/mdast": "*", "@types/mdx": "*", "@types/react": "*", "@vitejs/plugin-rsc": "^0.5.34", "fumadocs-core": "^16.18.3", "mdast-util-directive": "*", "next": "^15.3.0 || ^16.0.0", "react": "^19.2.0", "rolldown": "*", "satteri": "^0.11.7", "vite": "7.x.x || 8.x.x" }, "optionalPeers": ["@fumadocs/satteri", "@types/mdast", "@types/mdx", "@types/react", "@vitejs/plugin-rsc", "mdast-util-directive", "next", "react", "rolldown", "satteri", "vite"], "bin": { "fumadocs-mdx": "./bin.js" } }, "sha512-MPuuZNfczeuYON3g+gWQB+jtD4gGIx0hEikYVDAb/GL/JO6SFyCBH6xASg0OuWrcLyLrhqaei65HXBZQMQCTRw=="], - - "fumadocs-ui": ["@fumadocs/base-ui@16.19.4", "", { "dependencies": { "@base-ui/react": "^1.9.0", "@fuma-translate/react": "^1.0.2", "@fumadocs/tailwind": "0.1.5", "class-variance-authority": "^0.7.1", "cn": "^0.5.2", "lucide-react": "^1.71.0", "motion": "^14.12.0", "next-themes": "^0.4.6", "react-remove-scroll": "^2.7.2", "scroll-into-view-if-needed": "^3.1.0", "shiki": "^4.6.0" }, "peerDependencies": { "@types/mdx": "*", "@types/react": "*", "fumadocs-core": "16.19.4", "next": "16.x.x", "react": "^19.2.0", "react-dom": "^19.2.0", "takumi-js": "*" }, "optionalPeers": ["@types/mdx", "@types/react", "next", "takumi-js"] }, "sha512-S8CPsuyIjWErT9Ek8+y/tmq+DPrlTJ+1b1KphvmKyeNKHnpfFC9BEj/Gqrz4gj0aZLQH2Fwo73igMAgnOUDeEw=="], - - "get-nonce": ["get-nonce@1.0.1", "", {}, "sha512-FJhYRoDaiatfEkUK8HKlicmu/3SGFD51q3itKDGoSTysQJBnfOcxU5GxnhE1E6soB76MbT0MBtnKJuXyAx+96Q=="], - - "github-slugger": ["github-slugger@2.0.0", "", {}, "sha512-IaOQ9puYtjrkq7Y0Ygl9KDZnrf/aiUJYUpVf89y8kyaxbRG7Y1SrX/jaumrv81vc61+kiMempujsM3Yw7w5qcw=="], - - "graceful-fs": ["graceful-fs@4.2.11", "", {}, "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ=="], - - "hachure-fill": ["hachure-fill@0.5.2", "", {}, "sha512-3GKBOn+m2LX9iq+JC1064cSFprJY4jL1jCXTcpnfER5HYE2l/4EfWSGzkPa/ZDBmYI0ZOEj5VHV/eKnPGkHuOg=="], - - "has-flag": ["has-flag@4.0.0", "", {}, "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ=="], - - "hast-util-from-dom": ["hast-util-from-dom@5.0.1", "", { "dependencies": { "@types/hast": "^3.0.0", "hastscript": "^9.0.0", "web-namespaces": "^2.0.0" } }, "sha512-N+LqofjR2zuzTjCPzyDUdSshy4Ma6li7p/c3pA78uTwzFgENbgbUrm2ugwsOdcjI1muO+o6Dgzp9p8WHtn/39Q=="], - - "hast-util-parse-selector": ["hast-util-parse-selector@4.0.0", "", { "dependencies": { "@types/hast": "^3.0.0" } }, "sha512-wkQCkSYoOGCRKERFWcxMVMOcYE2K1AaNLU8DXS9arxnLOUEWbOXKXiJUNzEpqZ3JOKpnha3jkFrumEjVliDe7A=="], - - "hast-util-to-estree": ["hast-util-to-estree@3.1.3", "", { "dependencies": { "@types/estree": "^1.0.0", "@types/estree-jsx": "^1.0.0", "@types/hast": "^3.0.0", "comma-separated-tokens": "^2.0.0", "devlop": "^1.0.0", "estree-util-attach-comments": "^3.0.0", "estree-util-is-identifier-name": "^3.0.0", "hast-util-whitespace": "^3.0.0", "mdast-util-mdx-expression": "^2.0.0", "mdast-util-mdx-jsx": "^3.0.0", "mdast-util-mdxjs-esm": "^2.0.0", "property-information": "^7.0.0", "space-separated-tokens": "^2.0.0", "style-to-js": "^1.0.0", "unist-util-position": "^5.0.0", "zwitch": "^2.0.0" } }, "sha512-48+B/rJWAp0jamNbAAf9M7Uf//UVqAoMmgXhBdxTDJLGKY+LRnZ99qcG+Qjl5HfMpYNzS5v4EAwVEF34LeAj7w=="], - - "hast-util-to-html": ["hast-util-to-html@9.0.6", "", { "dependencies": { "@types/hast": "^3.0.0", "@types/unist": "^3.0.0", "ccount": "^2.0.0", "comma-separated-tokens": "^2.0.0", "hast-util-whitespace": "^3.0.0", "html-void-elements": "^3.0.0", "mdast-util-to-hast": "^13.0.0", "property-information": "^7.0.0", "space-separated-tokens": "^2.0.0", "stringify-entities": "^4.0.0", "zwitch": "^2.0.4" } }, "sha512-1SZUxCN3TtJAE7e2BQN2MBHsoZ1gnmi9GoCP5Di59CSWptIezSAW09yDZyVbanb78V9eCwrKqdQsjtfVTxYHWA=="], - - "hast-util-to-jsx-runtime": ["hast-util-to-jsx-runtime@2.3.6", "", { "dependencies": { "@types/estree": "^1.0.0", "@types/hast": "^3.0.0", "@types/unist": "^3.0.0", "comma-separated-tokens": "^2.0.0", "devlop": "^1.0.0", "estree-util-is-identifier-name": "^3.0.0", "hast-util-whitespace": "^3.0.0", "mdast-util-mdx-expression": "^2.0.0", "mdast-util-mdx-jsx": "^3.0.0", "mdast-util-mdxjs-esm": "^2.0.0", "property-information": "^7.0.0", "space-separated-tokens": "^2.0.0", "style-to-js": "^1.0.0", "unist-util-position": "^5.0.0", "vfile-message": "^4.0.0" } }, "sha512-zl6s8LwNyo1P9uw+XJGvZtdFF1GdAkOg8ujOw+4Pyb76874fLps4ueHXDhXWdk6YHQ6OgUtinliG7RsYvCbbBg=="], - - "hast-util-whitespace": ["hast-util-whitespace@3.0.0", "", { "dependencies": { "@types/hast": "^3.0.0" } }, "sha512-88JUN06ipLwsnv+dVn+OIYOvAuvBMy/Qoi6O7mQHxdPXpjy+Cd6xRkWwux7DKO+4sYILtLBRIKgsdpS2gQc7qw=="], - - "hastscript": ["hastscript@9.0.1", "", { "dependencies": { "@types/hast": "^3.0.0", "comma-separated-tokens": "^2.0.0", "hast-util-parse-selector": "^4.0.0", "property-information": "^7.0.0", "space-separated-tokens": "^2.0.0" } }, "sha512-g7df9rMFX/SPi34tyGCyUBREQoKkapwdY/T04Qn9TDWfHhAYt4/I0gMVirzK5wEzeUqIjEB+LXC/ypb7Aqno5w=="], - - "html-void-elements": ["html-void-elements@3.0.0", "", {}, "sha512-bEqo66MRXsUGxWHV5IP0PUiAWwoEjba4VCzg0LjFJBpchPaTfyfCKTG6bc5F8ucKec3q5y6qOdGyYTSBEvhCrg=="], - - "iconv-lite": ["iconv-lite@0.6.3", "", { "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" } }, "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw=="], - - "import-meta-resolve": ["import-meta-resolve@4.2.0", "", {}, "sha512-Iqv2fzaTQN28s/FwZAoFq0ZSs/7hMAHJVX+w8PZl3cY19Pxk6jFFalxQoIfW2826i/fDLXv8IiEZRIT0lDuWcg=="], - - "ini": ["ini@1.3.8", "", {}, "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew=="], - - "inline-style-parser": ["inline-style-parser@0.2.7", "", {}, "sha512-Nb2ctOyNR8DqQoR0OwRG95uNWIC0C1lCgf5Naz5H6Ji72KZ8OcFZLz2P5sNgwlyoJ8Yif11oMuYs5pBQa86csA=="], - - "internmap": ["internmap@2.0.3", "", {}, "sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg=="], - - "is-alphabetical": ["is-alphabetical@2.0.1", "", {}, "sha512-FWyyY60MeTNyeSRpkM2Iry0G9hpr7/9kD40mD/cGQEuilcZYS4okz8SN2Q6rLCJ8gbCt6fN+rC+6tMGS99LaxQ=="], - - "is-alphanumerical": ["is-alphanumerical@2.0.1", "", { "dependencies": { "is-alphabetical": "^2.0.0", "is-decimal": "^2.0.0" } }, "sha512-hmbYhX/9MUMF5uh7tOXyK/n0ZvWpad5caBA17GsC6vyuCqaWliRG5K1qS9inmUhEMaOBIW7/whAnSwveW/LtZw=="], - - "is-decimal": ["is-decimal@2.0.1", "", {}, "sha512-AAB9hiomQs5DXWcRB1rqsxGUstbRroFOPPVAomNk/3XHR5JyEZChOyTWe2oayKnsSsr/kcGqF+z6yuH6HHpN0A=="], - - "is-fullwidth-code-point": ["is-fullwidth-code-point@3.0.0", "", {}, "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg=="], - - "is-hexadecimal": ["is-hexadecimal@2.0.1", "", {}, "sha512-DgZQp241c8oO6cA1SbTEWiXeoxV42vlcJxgH+B3hi1AiqqKruZR3ZGF8In3fj4+/y/7rHvlOZLZtgJ/4ttYGZg=="], - - "is-plain-obj": ["is-plain-obj@4.1.0", "", {}, "sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg=="], - - "is-port-reachable": ["is-port-reachable@4.0.0", "", {}, "sha512-9UoipoxYmSk6Xy7QFgRv2HDyaysmgSG75TFQs6S+3pDM7ZhKTF/bskZV+0UlABHzKjNVhPjYCLfeZUEg1wXxig=="], - - "jiti": ["jiti@2.7.0", "", { "bin": { "jiti": "lib/jiti-cli.mjs" } }, "sha512-AC/7JofJvZGrrneWNaEnJeOLUx+JlGt7tNa0wZiRPT4MY1wmfKjt2+6O2p2uz2+skll8OZZmJMNqeke7kKbNgQ=="], - - "json-schema-traverse": ["json-schema-traverse@1.0.0", "", {}, "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug=="], - - "katex": ["katex@0.18.11", "", { "dependencies": { "commander": "^15.0.0" }, "bin": { "katex": "cli.js" } }, "sha512-yvyz/2VMKqoho/35Hat5w37wIEdWJ5ElVMidTAlWrxr5uW4aBGsEpveTmKh18/zw08v/7lGswCPon4OhqmqrTA=="], - - "khroma": ["khroma@2.1.0", "", {}, "sha512-Ls993zuzfayK269Svk9hzpeGUKob/sIgZzyHYdjQoAdQetRKpOLj+k/QQQ/6Qi0Yz65mlROrfd+Ev+1+7dz9Kw=="], - - "layout-base": ["layout-base@1.0.2", "", {}, "sha512-8h2oVEZNktL4BH2JCOI90iD1yXwL6iNW7KcCKT2QZgQJR2vbqDsldCTPRU9NifTCqHZci57XvQQ15YTu+sTYPg=="], - - "lightningcss": ["lightningcss@1.33.0", "", { "dependencies": { "detect-libc": "^2.0.3" }, "optionalDependencies": { "lightningcss-android-arm64": "1.33.0", "lightningcss-darwin-arm64": "1.33.0", "lightningcss-darwin-x64": "1.33.0", "lightningcss-freebsd-x64": "1.33.0", "lightningcss-linux-arm-gnueabihf": "1.33.0", "lightningcss-linux-arm64-gnu": "1.33.0", "lightningcss-linux-arm64-musl": "1.33.0", "lightningcss-linux-x64-gnu": "1.33.0", "lightningcss-linux-x64-musl": "1.33.0", "lightningcss-win32-arm64-msvc": "1.33.0", "lightningcss-win32-x64-msvc": "1.33.0" } }, "sha512-WkUDrojuJs0xkgGf2udWxa3yGBRxPtxUkB79i6aCZLRgc7PM8fZe9TosfPDcvEpQZbuFASnHYmRLBLUbmLOIIA=="], - - "lightningcss-android-arm64": ["lightningcss-android-arm64@1.33.0", "", { "os": "android", "cpu": "arm64" }, "sha512-gEpRTalKdosp4Bb8qWtc2iOgE5SeIHlpS1up9bFq2wAyYhl1UdTObYiHe98zEM9SQvSoqQZ1IQD0JNpg3Ml5pg=="], - - "lightningcss-darwin-arm64": ["lightningcss-darwin-arm64@1.33.0", "", { "os": "darwin", "cpu": "arm64" }, "sha512-Sciaz8eenNTKn9b3t7+xr0ipTp9YxKQY4npwQ3mrRuL0BAVHBLyZxofhaKBAVtzmtRZ/zTyo0/to4B1uWG/Djg=="], - - "lightningcss-darwin-x64": ["lightningcss-darwin-x64@1.33.0", "", { "os": "darwin", "cpu": "x64" }, "sha512-Z5UPAxzrjlWNNyGy6i65cJzzvgJ5D3T6wMvs+gWpY9d7qRhANrxqAp6LhxIgZhWEw18RfJTGcRxjuLIBr+m8XQ=="], - - "lightningcss-freebsd-x64": ["lightningcss-freebsd-x64@1.33.0", "", { "os": "freebsd", "cpu": "x64" }, "sha512-QQM/Ti/hQajJwCY+RiWuCZ9sdtI/XQk7nDK5vC8kkdwixezOlDgvDx7+RT+QjK6FcFT4MpsuoBnHIo/O3StRRg=="], - - "lightningcss-linux-arm-gnueabihf": ["lightningcss-linux-arm-gnueabihf@1.33.0", "", { "os": "linux", "cpu": "arm" }, "sha512-N7FVBe6iS24MlM6R/4RBTxGhQheZGs7tiQ9U32UtF75NzP5Q7xWPRqLBCKxlRQRk3rY1jCIPLzx7WzOhuUIRLQ=="], - - "lightningcss-linux-arm64-gnu": ["lightningcss-linux-arm64-gnu@1.33.0", "", { "os": "linux", "cpu": "arm64", "libc": "glibc" }, "sha512-j2v/itmy4HlNxlc6voKXYgBqNi0Ng2LShg4z7GufpEgs05P+2suBVyi9I6YHq5uoVFx9ETin3eCEhLVyXGQnKg=="], - - "lightningcss-linux-arm64-musl": ["lightningcss-linux-arm64-musl@1.33.0", "", { "os": "linux", "cpu": "arm64", "libc": "musl" }, "sha512-yiO5ROMuYQgXbC60yjZU5CYSFZGKXL0HFATXt9mHJn1+zW55oCtMI9NfcVhYLMFDL7gV7oBPon/EmMMGg2OvtQ=="], - - "lightningcss-linux-x64-gnu": ["lightningcss-linux-x64-gnu@1.33.0", "", { "os": "linux", "cpu": "x64", "libc": "glibc" }, "sha512-ar+Ju7LmcN0Jo4FpL4hpFybwNG9/3A/Br5KW2n2jyODg3MEZXaDYADdemoNS+BDNfMgKvylJLj4S5tyRActuAg=="], - - "lightningcss-linux-x64-musl": ["lightningcss-linux-x64-musl@1.33.0", "", { "os": "linux", "cpu": "x64", "libc": "musl" }, "sha512-RYiYbkokw0trfKqqzfF55lginwEPrD3OJDfTuJzFs1MK6iFnDenaz1fqLLtX4ITG3OktJQXOeTaw1awrBAlZPw=="], - - "lightningcss-win32-arm64-msvc": ["lightningcss-win32-arm64-msvc@1.33.0", "", { "os": "win32", "cpu": "arm64" }, "sha512-1K+MPfLSFVpphzpdbfkhlWk6wBrTObBzS2T6db10PNOZgR9GoVsAWzwNyuhUYYbTp23j+4RrncfujZ4uAzXvwA=="], - - "lightningcss-win32-x64-msvc": ["lightningcss-win32-x64-msvc@1.33.0", "", { "os": "win32", "cpu": "x64" }, "sha512-OlEICDx/Xl0FqSp4bry8zFnCvGpig3Gl4gCquvYwHuqJKEC1+n9NgDniFvqHGmMv1ZkqDJrDqKKSykTDX+ehuA=="], - - "lodash-es": ["lodash-es@4.18.1", "", {}, "sha512-J8xewKD/Gk22OZbhpOVSwcs60zhd95ESDwezOFuA3/099925PdHJ7OFHNTGtajL3AlZkykD32HykiMo+BIBI8A=="], - - "longest-streak": ["longest-streak@3.1.0", "", {}, "sha512-9Ri+o0JYgehTaVBBDoMqIl8GXtbWg711O3srftcHhZ0dqnETqLaoIK0x17fUw9rFSlK/0NlsKe0Ahhyl5pXE2g=="], - - "lucide-react": ["lucide-react@1.74.0", "", { "peerDependencies": { "@types/react": "*", "react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0" }, "optionalPeers": ["@types/react"] }, "sha512-A1doIs/1fj1WnPbtIT7WRiM6Kvw5NUg+BtkoOh3Shpr4obwSDVt6WxCEcNH56EWprzuCoKle1OF0RqIkojwL1A=="], - - "magic-string": ["magic-string@1.4.5", "", { "dependencies": { "@jridgewell/sourcemap-codec": "^1.6.0" } }, "sha512-oLLC2+YvQUfAa+vxoufE/yc1icb87M9iXIRqAoR/2EhE/8cb3SF/+Gi0c2By1B+5Vz2e2vQtUvHiu1+63Znh+w=="], - - "markdown-extensions": ["markdown-extensions@2.0.0", "", {}, "sha512-o5vL7aDWatOTX8LzaS1WMoaoxIiLRQJuIKKe2wAw6IeULDHaqbiqiggmx+pKvZDb1Sj+pE46Sn1T7lCqfFtg1Q=="], - - "markdown-table": ["markdown-table@3.0.4", "", {}, "sha512-wiYz4+JrLyb/DqW2hkFJxP7Vd7JuTDm77fvbM8VfEQdmSMqcImWeeRbHwZjBjIFki/VaMK2BhFi7oUUZeM5bqw=="], - - "marked": ["marked@16.4.2", "", { "bin": { "marked": "bin/marked.js" } }, "sha512-TI3V8YYWvkVf3KJe1dRkpnjs68JUPyEa5vjKrp1XEEJUAOaQc+Qj+L1qWbPd0SJuAdQkFU0h73sXXqwDYxsiDA=="], - - "mdast-util-find-and-replace": ["mdast-util-find-and-replace@3.0.3", "", { "dependencies": { "@types/mdast": "^4.0.0", "escape-string-regexp": "^5.0.0", "unist-util-is": "^6.0.0", "unist-util-visit-parents": "^6.0.0" } }, "sha512-xPgpDNl0/OXHsI7TlaIs22lWnH3KlpvZdXG1ET/m/YT2Hhdkx8lJV4kLphE6l9simyM4KPDFBwas08BgEob6Jw=="], - - "mdast-util-from-markdown": ["mdast-util-from-markdown@2.1.0", "", { "dependencies": { "@types/mdast": "^4.0.0", "@types/unist": "^3.0.0", "decode-named-character-reference": "^1.0.0", "devlop": "^1.0.0", "mdast-util-to-string": "^4.0.0", "micromark": "^4.0.0", "micromark-util-decode-numeric-character-reference": "^2.0.0", "micromark-util-decode-string": "^2.0.0", "micromark-util-normalize-identifier": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0", "unist-util-stringify-position": "^4.0.0" } }, "sha512-KRLgmPaP2H1ul2bpoJkOS+9pAcDAAj9Nu1mqLnh8NLeJG5tlvj42TH80PIGBpROWlRXLk0lDrWNuZCFy/tsB4A=="], - - "mdast-util-gfm": ["mdast-util-gfm@3.1.0", "", { "dependencies": { "mdast-util-from-markdown": "^2.0.0", "mdast-util-gfm-autolink-literal": "^2.0.0", "mdast-util-gfm-footnote": "^2.0.0", "mdast-util-gfm-strikethrough": "^2.0.0", "mdast-util-gfm-table": "^2.0.0", "mdast-util-gfm-task-list-item": "^2.0.0", "mdast-util-to-markdown": "^2.0.0" } }, "sha512-0ulfdQOM3ysHhCJ1p06l0b0VKlhU0wuQs3thxZQagjcjPrlFRqY215uZGHHJan9GEAXd9MbfPjFJz+qMkVR6zQ=="], - - "mdast-util-gfm-autolink-literal": ["mdast-util-gfm-autolink-literal@2.0.1", "", { "dependencies": { "@types/mdast": "^4.0.0", "ccount": "^2.0.0", "devlop": "^1.0.0", "mdast-util-find-and-replace": "^3.0.0", "micromark-util-character": "^2.0.0" } }, "sha512-5HVP2MKaP6L+G6YaxPNjuL0BPrq9orG3TsrZ9YXbA3vDw/ACI4MEsnoDpn6ZNm7GnZgtAcONJyPhOP8tNJQavQ=="], - - "mdast-util-gfm-footnote": ["mdast-util-gfm-footnote@2.1.0", "", { "dependencies": { "@types/mdast": "^4.0.0", "devlop": "^1.1.0", "mdast-util-from-markdown": "^2.0.0", "mdast-util-to-markdown": "^2.0.0", "micromark-util-normalize-identifier": "^2.0.0" } }, "sha512-sqpDWlsHn7Ac9GNZQMeUzPQSMzR6Wv0WKRNvQRg0KqHh02fpTz69Qc1QSseNX29bhz1ROIyNyxExfawVKTm1GQ=="], - - "mdast-util-gfm-strikethrough": ["mdast-util-gfm-strikethrough@2.0.1", "", { "dependencies": { "@types/mdast": "^4.0.0", "mdast-util-from-markdown": "^2.0.0", "mdast-util-to-markdown": "^2.0.0" } }, "sha512-OuJHqvr455pwu2OaOrir7dbzqs4jlWKOtlu9L6GjcIjjQwNyw02VntQsr/Ek6/A13vgnXfUhBekWRUP1OkNivw=="], - - "mdast-util-gfm-table": ["mdast-util-gfm-table@2.0.0", "", { "dependencies": { "@types/mdast": "^4.0.0", "devlop": "^1.0.0", "markdown-table": "^3.0.0", "mdast-util-from-markdown": "^2.0.0", "mdast-util-to-markdown": "^2.0.0" } }, "sha512-78UEvebzz/rJIxLvE7ZtDd/vIQ0RHv+3Mh5DR96p7cS7HsBhYIICDBCu8csTNWNO6tBWfqXPWekRuj2FNOGOZg=="], - - "mdast-util-gfm-task-list-item": ["mdast-util-gfm-task-list-item@2.0.0", "", { "dependencies": { "@types/mdast": "^4.0.0", "devlop": "^1.0.0", "mdast-util-from-markdown": "^2.0.0", "mdast-util-to-markdown": "^2.0.0" } }, "sha512-IrtvNvjxC1o06taBAVJznEnkiHxLFTzgonUdy8hzFVeDun0uTjxxrRGVaNFqkU1wJR3RBPEfsxmU6jDWPofrTQ=="], - - "mdast-util-mdx": ["mdast-util-mdx@3.0.0", "", { "dependencies": { "mdast-util-from-markdown": "^2.0.0", "mdast-util-mdx-expression": "^2.0.0", "mdast-util-mdx-jsx": "^3.0.0", "mdast-util-mdxjs-esm": "^2.0.0", "mdast-util-to-markdown": "^2.0.0" } }, "sha512-JfbYLAW7XnYTTbUsmpu0kdBUVe+yKVJZBItEjwyYJiDJuZ9w4eeaqks4HQO+R7objWgS2ymV60GYpI14Ug554w=="], - - "mdast-util-mdx-expression": ["mdast-util-mdx-expression@2.0.1", "", { "dependencies": { "@types/estree-jsx": "^1.0.0", "@types/hast": "^3.0.0", "@types/mdast": "^4.0.0", "devlop": "^1.0.0", "mdast-util-from-markdown": "^2.0.0", "mdast-util-to-markdown": "^2.0.0" } }, "sha512-J6f+9hUp+ldTZqKRSg7Vw5V6MqjATc+3E4gf3CFNcuZNWD8XdyI6zQ8GqH7f8169MM6P7hMBRDVGnn7oHB9kXQ=="], - - "mdast-util-mdx-jsx": ["mdast-util-mdx-jsx@3.2.0", "", { "dependencies": { "@types/estree-jsx": "^1.0.0", "@types/hast": "^3.0.0", "@types/mdast": "^4.0.0", "@types/unist": "^3.0.0", "ccount": "^2.0.0", "devlop": "^1.1.0", "mdast-util-from-markdown": "^2.0.0", "mdast-util-to-markdown": "^2.0.0", "parse-entities": "^4.0.0", "stringify-entities": "^4.0.0", "unist-util-stringify-position": "^4.0.0", "vfile-message": "^4.0.0" } }, "sha512-lj/z8v0r6ZtsN/cGNNtemmmfoLAFZnjMbNyLzBafjzikOM+glrjNHPlf6lQDOTccj9n5b0PPihEBbhneMyGs1Q=="], - - "mdast-util-mdxjs-esm": ["mdast-util-mdxjs-esm@2.0.1", "", { "dependencies": { "@types/estree-jsx": "^1.0.0", "@types/hast": "^3.0.0", "@types/mdast": "^4.0.0", "devlop": "^1.0.0", "mdast-util-from-markdown": "^2.0.0", "mdast-util-to-markdown": "^2.0.0" } }, "sha512-EcmOpxsZ96CvlP03NghtH1EsLtr0n9Tm4lPUJUBccV9RwUOneqSycg19n5HGzCf+10LozMRSObtVr3ee1WoHtg=="], - - "mdast-util-phrasing": ["mdast-util-phrasing@4.1.0", "", { "dependencies": { "@types/mdast": "^4.0.0", "unist-util-is": "^6.0.0" } }, "sha512-TqICwyvJJpBwvGAMZjj4J2n0X8QWp21b9l0o7eXyVJ25YNWYbJDVIyD1bZXE6WtV6RmKJVYmQAKWa0zWOABz2w=="], - - "mdast-util-to-hast": ["mdast-util-to-hast@13.2.1", "", { "dependencies": { "@types/hast": "^3.0.0", "@types/mdast": "^4.0.0", "@ungap/structured-clone": "^1.0.0", "devlop": "^1.0.0", "micromark-util-sanitize-uri": "^2.0.0", "trim-lines": "^3.0.0", "unist-util-position": "^5.0.0", "unist-util-visit": "^5.0.0", "vfile": "^6.0.0" } }, "sha512-cctsq2wp5vTsLIcaymblUriiTcZd0CwWtCbLvrOzYCDZoWyMNV8sZ7krj09FSnsiJi3WVsHLM4k6Dq/yaPyCXA=="], - - "mdast-util-to-markdown": ["mdast-util-to-markdown@2.2.0", "", { "dependencies": { "@types/mdast": "^4.0.0", "@types/unist": "^3.0.0", "longest-streak": "^3.0.0", "mdast-util-phrasing": "^4.0.0", "mdast-util-to-string": "^4.0.0", "micromark-util-character": "^2.0.0", "micromark-util-classify-character": "^2.0.0", "micromark-util-decode-string": "^2.0.0", "micromark-util-html-tag-name": "^2.0.0", "unist-util-visit": "^5.0.0", "zwitch": "^2.0.0" } }, "sha512-2Jn/ADrHFFyyniBMi0bncTbJqU78K3/TEYvzvwrWWzD9MYPUa/Gm4r3nOeKFQg/PDM5BsbDYdc8ackW4NTY6NA=="], - - "mdast-util-to-string": ["mdast-util-to-string@4.0.0", "", { "dependencies": { "@types/mdast": "^4.0.0" } }, "sha512-0H44vDimn51F0YwvxSJSm0eCDOJTRlmN0R1yBh4HLj9wiV1Dn0QoXGbvFAWj2hSItVTlCmBF1hqKlIyUBVFLPg=="], - - "mermaid": ["mermaid@12.3.0", "", { "dependencies": { "@braintree/sanitize-url": "^7.1.2", "@iconify/utils": "^3.0.2", "@mermaid-js/parser": "^2.0.1", "@types/d3": "^7.4.3", "@upsetjs/venn.js": "^2.0.0", "chevrotain": "~13.2.0", "cytoscape": "^3.34.0", "cytoscape-cose-bilkent": "^4.1.0", "cytoscape-fcose": "^2.2.0", "d3": "^7.9.0", "d3-sankey": "^0.12.3", "dagre-d3-es": "7.0.14", "dayjs": "^1.11.21", "dompurify": "^3.4.17", "elkjs": "^0.12.0", "es-toolkit": "^1.45.1", "katex": "^0.18.0", "khroma": "^2.1.0", "marked": "^16.3.0", "roughjs": "^4.6.6", "stylis": "^4.3.6", "ts-dedent": "^2.2.0" } }, "sha512-4113TdXeLAsMruJ79OpFL5O8+LTFXhQqZ260rF3tgUmiNAtRm4Uume04I+65PRN6yZ69J4f8rVYWW8zRk65UYw=="], - - "micromark": ["micromark@4.0.3", "", { "dependencies": { "@types/debug": "^4.0.0", "debug": "^4.0.0", "decode-named-character-reference": "^1.0.0", "devlop": "^1.0.0", "micromark-core-commonmark": "^2.0.0", "micromark-factory-space": "^2.0.0", "micromark-util-character": "^2.0.0", "micromark-util-chunked": "^2.0.0", "micromark-util-combine-extensions": "^2.0.0", "micromark-util-decode-numeric-character-reference": "^2.0.0", "micromark-util-edit-map": "^1.0.0", "micromark-util-encode": "^2.0.0", "micromark-util-normalize-identifier": "^2.0.0", "micromark-util-resolve-all": "^2.0.0", "micromark-util-sanitize-uri": "^2.0.0", "micromark-util-subtokenize": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-oGYfQzHSG5dOMovQcJ3fyTmZlWAWpi0XA0sJwJs+i6OT88o1+Jtw/8z0CmdowSLxGhhFK89rQ/oXph/wN02PNw=="], - - "micromark-core-commonmark": ["micromark-core-commonmark@2.0.4", "", { "dependencies": { "decode-named-character-reference": "^1.0.0", "devlop": "^1.0.0", "micromark-factory-destination": "^2.0.0", "micromark-factory-label": "^2.0.0", "micromark-factory-space": "^2.1.0", "micromark-factory-title": "^2.0.0", "micromark-factory-whitespace": "^2.0.0", "micromark-util-character": "^2.0.0", "micromark-util-chunked": "^2.0.0", "micromark-util-classify-character": "^2.0.0", "micromark-util-edit-map": "^1.0.0", "micromark-util-html-tag-name": "^2.0.0", "micromark-util-normalize-identifier": "^2.0.0", "micromark-util-resolve-all": "^2.0.0", "micromark-util-subtokenize": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.3" } }, "sha512-wxEeE8v8XVvOrxn1TZj74qYhAtTQsSqufHVS3uNVyT1MupXxhyaHk8/9xDNPh9BmL77QNDgWTkZ3RsYHB2ry7w=="], - - "micromark-extension-gfm": ["micromark-extension-gfm@3.0.0", "", { "dependencies": { "micromark-extension-gfm-autolink-literal": "^2.0.0", "micromark-extension-gfm-footnote": "^2.0.0", "micromark-extension-gfm-strikethrough": "^2.0.0", "micromark-extension-gfm-table": "^2.0.0", "micromark-extension-gfm-tagfilter": "^2.0.0", "micromark-extension-gfm-task-list-item": "^2.0.0", "micromark-util-combine-extensions": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-vsKArQsicm7t0z2GugkCKtZehqUm31oeGBV/KVSorWSy8ZlNAv7ytjFhvaryUiCUJYqs+NoE6AFhpQvBTM6Q4w=="], - - "micromark-extension-gfm-autolink-literal": ["micromark-extension-gfm-autolink-literal@2.1.0", "", { "dependencies": { "micromark-util-character": "^2.0.0", "micromark-util-sanitize-uri": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-oOg7knzhicgQ3t4QCjCWgTmfNhvQbDDnJeVu9v81r7NltNCVmhPy1fJRX27pISafdjL+SVc4d3l48Gb6pbRypw=="], - - "micromark-extension-gfm-footnote": ["micromark-extension-gfm-footnote@2.1.0", "", { "dependencies": { "devlop": "^1.0.0", "micromark-core-commonmark": "^2.0.0", "micromark-factory-space": "^2.0.0", "micromark-util-character": "^2.0.0", "micromark-util-normalize-identifier": "^2.0.0", "micromark-util-sanitize-uri": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-/yPhxI1ntnDNsiHtzLKYnE3vf9JZ6cAisqVDauhp4CEHxlb4uoOTxOCJ+9s51bIB8U1N1FJ1RXOKTIlD5B/gqw=="], - - "micromark-extension-gfm-strikethrough": ["micromark-extension-gfm-strikethrough@2.1.0", "", { "dependencies": { "devlop": "^1.0.0", "micromark-util-chunked": "^2.0.0", "micromark-util-classify-character": "^2.0.0", "micromark-util-resolve-all": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-ADVjpOOkjz1hhkZLlBiYA9cR2Anf8F4HqZUO6e5eDcPQd0Txw5fxLzzxnEkSkfnD0wziSGiv7sYhk/ktvbf1uw=="], - - "micromark-extension-gfm-table": ["micromark-extension-gfm-table@2.1.2", "", { "dependencies": { "devlop": "^1.0.0", "micromark-factory-space": "^2.0.0", "micromark-util-character": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-pRzm4kDTu0MjlmBkxmS9yYhw60nncfcEwu9NNdPFSQEFXS95ZKyIIyTSHu/o3ReBUrLKYEq+7YaXCRn/bPB4MA=="], - - "micromark-extension-gfm-tagfilter": ["micromark-extension-gfm-tagfilter@2.0.0", "", { "dependencies": { "micromark-util-types": "^2.0.0" } }, "sha512-xHlTOmuCSotIA8TW1mDIM6X2O1SiX5P9IuDtqGonFhEK0qgRI4yeC6vMxEV2dgyr2TiD+2PQ10o+cOhdVAcwfg=="], - - "micromark-extension-gfm-task-list-item": ["micromark-extension-gfm-task-list-item@2.1.0", "", { "dependencies": { "devlop": "^1.0.0", "micromark-factory-space": "^2.0.0", "micromark-util-character": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-qIBZhqxqI6fjLDYFTBIa4eivDMnP+OZqsNwmQ3xNLE4Cxwc+zfQEfbs6tzAo2Hjq+bh6q5F+Z8/cksrLFYWQQw=="], - - "micromark-extension-mdx-expression": ["micromark-extension-mdx-expression@3.0.1", "", { "dependencies": { "@types/estree": "^1.0.0", "devlop": "^1.0.0", "micromark-factory-mdx-expression": "^2.0.0", "micromark-factory-space": "^2.0.0", "micromark-util-character": "^2.0.0", "micromark-util-events-to-acorn": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-dD/ADLJ1AeMvSAKBwO22zG22N4ybhe7kFIZ3LsDI0GlsNr2A3KYxb0LdC1u5rj4Nw+CHKY0RVdnHX8vj8ejm4Q=="], - - "micromark-extension-mdx-jsx": ["micromark-extension-mdx-jsx@3.0.2", "", { "dependencies": { "@types/estree": "^1.0.0", "devlop": "^1.0.0", "estree-util-is-identifier-name": "^3.0.0", "micromark-factory-mdx-expression": "^2.0.0", "micromark-factory-space": "^2.0.0", "micromark-util-character": "^2.0.0", "micromark-util-events-to-acorn": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0", "vfile-message": "^4.0.0" } }, "sha512-e5+q1DjMh62LZAJOnDraSSbDMvGJ8x3cbjygy2qFEi7HCeUT4BDKCvMozPozcD6WmOt6sVvYDNBKhFSz3kjOVQ=="], - - "micromark-extension-mdx-md": ["micromark-extension-mdx-md@2.0.0", "", { "dependencies": { "micromark-util-types": "^2.0.0" } }, "sha512-EpAiszsB3blw4Rpba7xTOUptcFeBFi+6PY8VnJ2hhimH+vCQDirWgsMpz7w1XcZE7LVrSAUGb9VJpG9ghlYvYQ=="], - - "micromark-extension-mdxjs": ["micromark-extension-mdxjs@3.0.0", "", { "dependencies": { "acorn": "^8.0.0", "acorn-jsx": "^5.0.0", "micromark-extension-mdx-expression": "^3.0.0", "micromark-extension-mdx-jsx": "^3.0.0", "micromark-extension-mdx-md": "^2.0.0", "micromark-extension-mdxjs-esm": "^3.0.0", "micromark-util-combine-extensions": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-A873fJfhnJ2siZyUrJ31l34Uqwy4xIFmvPY1oj+Ean5PHcPBYzEsvqvWGaWcfEIr11O5Dlw3p2y0tZWpKHDejQ=="], - - "micromark-extension-mdxjs-esm": ["micromark-extension-mdxjs-esm@3.0.0", "", { "dependencies": { "@types/estree": "^1.0.0", "devlop": "^1.0.0", "micromark-core-commonmark": "^2.0.0", "micromark-util-character": "^2.0.0", "micromark-util-events-to-acorn": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0", "unist-util-position-from-estree": "^2.0.0", "vfile-message": "^4.0.0" } }, "sha512-DJFl4ZqkErRpq/dAPyeWp15tGrcrrJho1hKK5uBS70BCtfrIFg81sqcTVu3Ta+KD1Tk5vAtBNElWxtAa+m8K9A=="], - - "micromark-factory-destination": ["micromark-factory-destination@2.0.1", "", { "dependencies": { "micromark-util-character": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-Xe6rDdJlkmbFRExpTOmRj9N3MaWmbAgdpSrBQvCFqhezUn4AHqJHbaEnfbVYYiexVSs//tqOdY/DxhjdCiJnIA=="], - - "micromark-factory-label": ["micromark-factory-label@2.0.1", "", { "dependencies": { "devlop": "^1.0.0", "micromark-util-character": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-VFMekyQExqIW7xIChcXn4ok29YE3rnuyveW3wZQWWqF4Nv9Wk5rgJ99KzPvHjkmPXF93FXIbBp6YdW3t71/7Vg=="], - - "micromark-factory-mdx-expression": ["micromark-factory-mdx-expression@2.0.3", "", { "dependencies": { "@types/estree": "^1.0.0", "devlop": "^1.0.0", "micromark-factory-space": "^2.0.0", "micromark-util-character": "^2.0.0", "micromark-util-events-to-acorn": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0", "unist-util-position-from-estree": "^2.0.0", "vfile-message": "^4.0.0" } }, "sha512-kQnEtA3vzucU2BkrIa8/VaSAsP+EJ3CKOvhMuJgOEGg9KDC6OAY6nSnNDVRiVNRqj7Y4SlSzcStaH/5jge8JdQ=="], - - "micromark-factory-space": ["micromark-factory-space@2.1.0", "", { "dependencies": { "micromark-util-character": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-fS8hnLIjnjvdQIj39Geug8wWsR0HrYZ43KShKxNfwT7t2LOHo/LbWZEzEaSOjwtjdCsjoE6syHhonEzW0zv0+Q=="], - - "micromark-factory-title": ["micromark-factory-title@2.0.1", "", { "dependencies": { "micromark-factory-space": "^2.0.0", "micromark-util-character": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-5bZ+3CjhAd9eChYTHsjy6TGxpOFSKgKKJPJxr293jTbfry2KDoWkhBb6TcPVB4NmzaPhMs1Frm9AZH7OD4Cjzw=="], - - "micromark-factory-whitespace": ["micromark-factory-whitespace@2.0.1", "", { "dependencies": { "micromark-factory-space": "^2.0.0", "micromark-util-character": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-Ob0nuZ3PKt/n0hORHyvoD9uZhr+Za8sFoP+OnMcnWK5lngSzALgQYKMr9RJVOWLqQYuyn6ulqGWSXdwf6F80lQ=="], - - "micromark-util-character": ["micromark-util-character@2.1.1", "", { "dependencies": { "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-wv8tdUTJ3thSFFFJKtpYKOYiGP2+v96Hvk4Tu8KpCAsTMs6yi+nVmGh1syvSCsaxz45J6Jbw+9DD6g97+NV67Q=="], - - "micromark-util-chunked": ["micromark-util-chunked@2.0.1", "", { "dependencies": { "micromark-util-symbol": "^2.0.0" } }, "sha512-QUNFEOPELfmvv+4xiNg2sRYeS/P84pTW0TCgP5zc9FpXetHY0ab7SxKyAQCNCc1eK0459uoLI1y5oO5Vc1dbhA=="], - - "micromark-util-classify-character": ["micromark-util-classify-character@2.0.1", "", { "dependencies": { "micromark-util-character": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-K0kHzM6afW/MbeWYWLjoHQv1sgg2Q9EccHEDzSkxiP/EaagNzCm7T/WMKZ3rjMbvIpvBiZgwR3dKMygtA4mG1Q=="], - - "micromark-util-combine-extensions": ["micromark-util-combine-extensions@2.0.1", "", { "dependencies": { "micromark-util-chunked": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-OnAnH8Ujmy59JcyZw8JSbK9cGpdVY44NKgSM7E9Eh7DiLS2E9RNQf0dONaGDzEG9yjEl5hcqeIsj4hfRkLH/Bg=="], - - "micromark-util-decode-numeric-character-reference": ["micromark-util-decode-numeric-character-reference@2.0.2", "", { "dependencies": { "micromark-util-symbol": "^2.0.0" } }, "sha512-ccUbYk6CwVdkmCQMyr64dXz42EfHGkPQlBj5p7YVGzq8I7CtjXZJrubAYezf7Rp+bjPseiROqe7G6foFd+lEuw=="], - - "micromark-util-decode-string": ["micromark-util-decode-string@2.0.1", "", { "dependencies": { "decode-named-character-reference": "^1.0.0", "micromark-util-character": "^2.0.0", "micromark-util-decode-numeric-character-reference": "^2.0.0", "micromark-util-symbol": "^2.0.0" } }, "sha512-nDV/77Fj6eH1ynwscYTOsbK7rR//Uj0bZXBwJZRfaLEJ1iGBR6kIfNmlNqaqJf649EP0F3NWNdeJi03elllNUQ=="], - - "micromark-util-edit-map": ["micromark-util-edit-map@1.0.0", "", { "dependencies": { "micromark-util-types": "^2.0.0" } }, "sha512-Pa2ljlsEL6sVwFaYeyrOLSYbQt73JvGbPOYFq+9AElXiSnfI5Q4465RRZ1sHv7lDjDOnGRDDaqPXqClqWK/q1Q=="], - - "micromark-util-encode": ["micromark-util-encode@2.0.1", "", {}, "sha512-c3cVx2y4KqUnwopcO9b/SCdo2O67LwJJ/UyqGfbigahfegL9myoEFoDYZgkT7f36T0bLrM9hZTAaAyH+PCAXjw=="], - - "micromark-util-events-to-acorn": ["micromark-util-events-to-acorn@2.0.3", "", { "dependencies": { "@types/estree": "^1.0.0", "@types/unist": "^3.0.0", "devlop": "^1.0.0", "estree-util-visit": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0", "vfile-message": "^4.0.0" } }, "sha512-jmsiEIiZ1n7X1Rr5k8wVExBQCg5jy4UXVADItHmNk1zkwEVhBuIUKRu3fqv+hs4nxLISi2DQGlqIOGiFxgbfHg=="], - - "micromark-util-html-tag-name": ["micromark-util-html-tag-name@2.0.1", "", {}, "sha512-2cNEiYDhCWKI+Gs9T0Tiysk136SnR13hhO8yW6BGNyhOC4qYFnwF1nKfD3HFAIXA5c45RrIG1ub11GiXeYd1xA=="], - - "micromark-util-normalize-identifier": ["micromark-util-normalize-identifier@2.0.1", "", { "dependencies": { "micromark-util-symbol": "^2.0.0" } }, "sha512-sxPqmo70LyARJs0w2UclACPUUEqltCkJ6PhKdMIDuJ3gSf/Q+/GIe3WKl0Ijb/GyH9lOpUkRAO2wp0GVkLvS9Q=="], - - "micromark-util-resolve-all": ["micromark-util-resolve-all@2.0.1", "", { "dependencies": { "micromark-util-types": "^2.0.0" } }, "sha512-VdQyxFWFT2/FGJgwQnJYbe1jjQoNTS4RjglmSjTUlpUMa95Htx9NHeYW4rGDJzbjvCsl9eLjMQwGeElsqmzcHg=="], - - "micromark-util-sanitize-uri": ["micromark-util-sanitize-uri@2.0.1", "", { "dependencies": { "micromark-util-character": "^2.0.0", "micromark-util-encode": "^2.0.0", "micromark-util-symbol": "^2.0.0" } }, "sha512-9N9IomZ/YuGGZZmQec1MbgxtlgougxTodVwDzzEouPKo3qFWvymFHWcnDi2vzV1ff6kas9ucW+o3yzJK9YB1AQ=="], - - "micromark-util-subtokenize": ["micromark-util-subtokenize@2.1.0", "", { "dependencies": { "devlop": "^1.0.0", "micromark-util-chunked": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-XQLu552iSctvnEcgXw6+Sx75GflAPNED1qx7eBJ+wydBb2KCbRZe+NwvIEEMM83uml1+2WSXpBAcp9IUCgCYWA=="], - - "micromark-util-symbol": ["micromark-util-symbol@2.0.1", "", {}, "sha512-vs5t8Apaud9N28kgCrRUdEed4UJ+wWNvicHLPxCa9ENlYuAY31M0ETy5y1vA33YoNPDFTghEbnh6efaE8h4x0Q=="], - - "micromark-util-types": ["micromark-util-types@2.0.3", "", {}, "sha512-oxB2Ik03hI0gv+VNn9tnh1t1YEe9MDPptViAEgfdf3YQHsn0pzGTgCdlSCJXcwhqm8phaEuM7zeEu3QQzVBrPg=="], - - "mime-db": ["mime-db@1.54.0", "", {}, "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ=="], - - "mime-types": ["mime-types@2.1.18", "", { "dependencies": { "mime-db": "~1.33.0" } }, "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ=="], - - "minimatch": ["minimatch@3.1.5", "", { "dependencies": { "brace-expansion": "^1.1.7" } }, "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w=="], - - "minimist": ["minimist@1.2.8", "", {}, "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA=="], - - "motion": ["motion@14.14.0", "", { "dependencies": { "framer-motion": "14.14.0", "tslib": "^2.4.0" }, "peerDependencies": { "react": "^18.0.0 || ^19.0.0", "react-dom": "^18.0.0 || ^19.0.0", "remix": "^3.1.0" }, "optionalPeers": ["react", "react-dom", "remix"] }, "sha512-a306U6sV5VKq1abtzKiinB+UQjiY88jrsvQzWORP3WPv/DFANyoYVlPbdnmJPMEbusyPXB4GyQJVANaq/pSIYQ=="], - - "motion-dom": ["motion-dom@14.14.0", "", { "dependencies": { "motion-utils": "14.7.0" } }, "sha512-IAxcKhYkuQA2W0Tlx1AvVgImfqEoF3/t3IovbPQJlYkefmGsmrXjn967lMII5VmFmLpQEab4+ZkHo/ijJ4Esig=="], - - "motion-utils": ["motion-utils@14.7.0", "", {}, "sha512-woO0/Nb7ys75f94fjvQi/6leiHGvZUYkeHUPEZ3vxsV+9OpEVhkxp01x8MlRwX0zt31EqgXsKDAoBoJLC148Tw=="], - - "ms": ["ms@2.0.0", "", {}, "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A=="], - - "nanoid": ["nanoid@3.3.20", "", { "bin": { "nanoid": "bin/nanoid.cjs" } }, "sha512-uKdg2G3GNCKQn9byYOpxbGqrT2fGO5KRt5J/8b3pok8rT6qxGWF6hxMyJiEYtAf+FVyYuD9hRaDqX5uPFYJ4ZQ=="], - - "negotiator": ["negotiator@0.6.4", "", {}, "sha512-myRT3DiWPHqho5PrJaIRyaMv2kgYf0mUVgBNOYMuCH5Ki1yEiQaf/ZJuQ62nvpc44wL5WDbTX7yGJi1Neevw8w=="], - - "next": ["next@16.4.6", "", { "dependencies": { "@next/env": "16.4.6", "@swc/helpers": "0.5.23", "baseline-browser-mapping": "^2.9.19", "caniuse-lite": "^1.0.30001579", "postcss": "8.5.23", "styled-jsx": "5.1.6" }, "optionalDependencies": { "@next/swc-darwin-arm64": "16.4.6", "@next/swc-darwin-x64": "16.4.6", "@next/swc-linux-arm64-gnu": "16.4.6", "@next/swc-linux-arm64-musl": "16.4.6", "@next/swc-linux-x64-gnu": "16.4.6", "@next/swc-linux-x64-musl": "16.4.6", "@next/swc-win32-arm64-msvc": "16.4.6", "@next/swc-win32-x64-msvc": "16.4.6", "sharp": "^0.35.5" }, "peerDependencies": { "@opentelemetry/api": "^1.1.0", "@playwright/test": "^1.51.1", "babel-plugin-react-compiler": "*", "react": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0", "react-dom": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0", "sass": "^1.3.0" }, "optionalPeers": ["@opentelemetry/api", "@playwright/test", "babel-plugin-react-compiler", "sass"], "bin": { "next": "dist/bin/next" } }, "sha512-QZJiYhaZLJMo2KpkQGQIwvmd79WVsAWeYIU554a8d7zArS3si/IRy3lBNV/rtYhE70oLwdLYhPAXLPx8HwcwtA=="], - - "next-themes": ["next-themes@0.4.6", "", { "peerDependencies": { "react": "^16.8 || ^17 || ^18 || ^19 || ^19.0.0-rc", "react-dom": "^16.8 || ^17 || ^18 || ^19 || ^19.0.0-rc" } }, "sha512-pZvgD5L0IEvX5/9GWyHMf3m8BKiVQwsCMHfoFosXtXBMnaS0ZnIJ9ST4b4NqLVKDEm8QBxoNNGNaBv2JNF6XNA=="], - - "npm-to-yarn": ["npm-to-yarn@3.2.0", "", {}, "sha512-K1HmQeZT2HrjpsR6KgqbN2FAXL2NrJJmNUSD9ck7HGTVu1JKXox8n9SB+tjbU8m8JGLF4OscrroPepew/L7/Xw=="], - - "on-headers": ["on-headers@1.1.0", "", {}, "sha512-737ZY3yNnXy37FHkQxPzt4UZ2UWPWiCZWLvFZ4fu5cueciegX0zGPnrlY6bwRg4FdQOe9YU8MkmJwGhoMybl8A=="], - - "oniguruma-parser": ["oniguruma-parser@0.12.2", "", {}, "sha512-6HVa5oIrgMC6aA6WF6XyyqbhRPJrKR02L20+2+zpDtO5QAzGHAUGw5TKQvwi5vctNnRHkJYmjAhRVQF2EKdTQw=="], - - "oniguruma-to-es": ["oniguruma-to-es@4.3.6", "", { "dependencies": { "oniguruma-parser": "^0.12.2", "regex": "^6.1.0", "regex-recursion": "^6.0.2" } }, "sha512-csuQ9x3Yr0cEIs/Zgx/OEt9iBw9vqIunAPQkx19R/fiMq2oGVTgcMqO/V3Ybqefr1TBvosI6jU539ksaBULJyA=="], - - "package-manager-detector": ["package-manager-detector@1.9.0", "", {}, "sha512-zAMfbta9nPA8AKkA4WdmNAT8R8s6Dk0/xwPsqNnRidMFcLo1YkLuPDTgs2f64XdzS8vbLNnoJ+uUIkgbz7oRHA=="], - - "parse-entities": ["parse-entities@4.0.2", "", { "dependencies": { "@types/unist": "^2.0.0", "character-entities-legacy": "^3.0.0", "character-reference-invalid": "^2.0.0", "decode-named-character-reference": "^1.0.0", "is-alphanumerical": "^2.0.0", "is-decimal": "^2.0.0", "is-hexadecimal": "^2.0.0" } }, "sha512-GG2AQYWoLgL877gQIKeRPGO1xF9+eG1ujIb5soS5gPvLQ1y2o8FL90w2QWNdf9I361Mpp7726c+lj3U0qK1uGw=="], - - "path-data-parser": ["path-data-parser@0.1.0", "", {}, "sha512-NOnmBpt5Y2RWbuv0LMzsayp3lVylAHLPUTut412ZA3l+C4uw4ZVkQbjShYCQ8TCpUMdPapr4YjUqLYD6v68j+w=="], - - "path-is-inside": ["path-is-inside@1.0.2", "", {}, "sha512-DUWJr3+ULp4zXmol/SZkFf3JGsS9/SIv+Y3Rt93/UjPpDpklB5f1er4O3POIbUuUJ3FXgqte2Q7SrU6zAqwk8w=="], - - "path-to-regexp": ["path-to-regexp@3.3.0", "", {}, "sha512-qyCH421YQPS2WFDxDjftfc1ZR5WKQzVzqsp4n9M2kQhVOo/ByahFoUNJfl58kOcEGfQ//7weFTDhm+ss8Ecxgw=="], - - "picocolors": ["picocolors@1.1.1", "", {}, "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA=="], - - "picomatch": ["picomatch@4.0.7", "", {}, "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA=="], - - "playwright": ["playwright@1.65.1", "", { "dependencies": { "playwright-core": "1.65.1" }, "bin": { "playwright": "cli.js" } }, "sha512-vJ1FuoOrNwOKHUIVEvSt3jT1L+wjjDpwhwIstKtfvTh8XIG4FG4bIFuvNdMxi81LGfAhUgUZleVFaOLY4RIUUw=="], - - "playwright-core": ["playwright-core@1.65.1", "", { "bin": { "playwright-core": "cli.js" } }, "sha512-hqPpz7blSMPxWVdoeE1yiBSzXsKiVOd2k+kjCvmUywD2GPO2Dd9HfcWnq9NN0GHbNZDFgZ9JfBFr+X5/BLo0qw=="], - - "points-on-curve": ["points-on-curve@0.2.0", "", {}, "sha512-0mYKnYYe9ZcqMCWhUjItv/oHjvgEsfKvnUTg8sAtnHr3GVy7rGkXCb6d5cSyqrWqL4k81b9CPg3urd+T7aop3A=="], - - "points-on-path": ["points-on-path@0.2.1", "", { "dependencies": { "path-data-parser": "0.1.0", "points-on-curve": "0.2.0" } }, "sha512-25ClnWWuw7JbWZcgqY/gJ4FQWadKxGWk+3kR/7kD0tCaDtPPMj7oHu2ToLaVhfpnHrZzYby2w6tUA0eOIuUg8g=="], - - "postcss": ["postcss@8.5.33", "", { "dependencies": { "nanoid": "^3.3.20", "picocolors": "^1.1.1", "source-map-js": "^1.2.2" } }, "sha512-RVHEU9/Pp1Fnjr/MpAJsZoADukCKhfIi15OunEYiGktIkYLkPVvC1sioWolGDS7XByMTx9m/IGbro0Js13zhnQ=="], - - "property-information": ["property-information@7.2.0", "", {}, "sha512-IAtzIB6sUiWaJYrX9smp3V46pBGbBeLFRGdh25kg1334VcBlD8HzhPeNIWQH9zhGmo2itIe25EHt9dQP7G5hmg=="], - - "proxy-compare": ["proxy-compare@3.0.1", "", {}, "sha512-V9plBAt3qjMlS1+nC8771KNf6oJ12gExvaxnNzN/9yVRLdTv/lc+oJlnSzrdYDAvBfTStPCoiaCOTmTs0adv7Q=="], - - "range-parser": ["range-parser@1.2.0", "", {}, "sha512-kA5WQoNVo4t9lNx2kQNFCxKeBl5IbbSNBl1M/tLkw9WCn+hxNBAW5Qh8gdhs63CJnhjJ2zQWFoqPJP2sK1AV5A=="], - - "rc": ["rc@1.2.8", "", { "dependencies": { "deep-extend": "^0.6.0", "ini": "~1.3.0", "minimist": "^1.2.0", "strip-json-comments": "~2.0.1" }, "bin": { "rc": "./cli.js" } }, "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw=="], - - "react": ["react@19.3.1", "", {}, "sha512-QNhWdt7nrgVWWQG58QuGsAR3jv3Hbe4mb4vz7w2csnHavciZJgda1CPNaldF6eVxv90ud3jUXpKlHL69gO38yw=="], - - "react-dom": ["react-dom@19.3.1", "", { "dependencies": { "scheduler": "^0.28.0" }, "peerDependencies": { "react": "^19.3.1" } }, "sha512-Y0bARz53lhEC1NMCASs0/j+faB/zqt3R8hpvg1e8+61ZVJ4UL0UdC4cBbXfZMcIuhrfgeILTLe+ZeBCavQPtKQ=="], - - "react-remove-scroll": ["react-remove-scroll@2.7.2", "", { "dependencies": { "react-remove-scroll-bar": "^2.3.7", "react-style-singleton": "^2.2.3", "tslib": "^2.1.0", "use-callback-ref": "^1.3.3", "use-sidecar": "^1.1.3" }, "peerDependencies": { "@types/react": "*", "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-Iqb9NjCCTt6Hf+vOdNIZGdTiH1QSqr27H/Ek9sv/a97gfueI/5h1s3yRi1nngzMUaOOToin5dI1dXKdXiF+u0Q=="], - - "react-remove-scroll-bar": ["react-remove-scroll-bar@2.3.8", "", { "dependencies": { "react-style-singleton": "^2.2.2", "tslib": "^2.0.0" }, "peerDependencies": { "@types/react": "*", "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" }, "optionalPeers": ["@types/react"] }, "sha512-9r+yi9+mgU33AKcj6IbT9oRCO78WriSj6t/cF8DWBZJ9aOGPOTEDvdUDz1FwKim7QXWwmHqtdHnRJfhAxEG46Q=="], - - "react-style-singleton": ["react-style-singleton@2.2.3", "", { "dependencies": { "get-nonce": "^1.0.0", "tslib": "^2.0.0" }, "peerDependencies": { "@types/react": "*", "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-b6jSvxvVnyptAiLjbkWLE/lOnR4lfTtDAl+eUC7RZy+QQWc6wRzIV2CE6xBuMmDxc2qIihtDCZD5NPOFl7fRBQ=="], - - "readdirp": ["readdirp@5.1.1", "", {}, "sha512-Kko+Y5XQ6fM+Ce3dq3m9YGxnacYZYl9cA1wZjaF3Vbry2L3i1qVg8+CAgNPsXRArPMUMCaOR7oa9Nqntc43JKA=="], - - "recma-build-jsx": ["recma-build-jsx@1.0.0", "", { "dependencies": { "@types/estree": "^1.0.0", "estree-util-build-jsx": "^3.0.0", "vfile": "^6.0.0" } }, "sha512-8GtdyqaBcDfva+GUKDr3nev3VpKAhup1+RvkMvUxURHpW7QyIvk9F5wz7Vzo06CEMSilw6uArgRqhpiUcWp8ew=="], - - "recma-jsx": ["recma-jsx@1.0.1", "", { "dependencies": { "acorn-jsx": "^5.0.0", "estree-util-to-js": "^2.0.0", "recma-parse": "^1.0.0", "recma-stringify": "^1.0.0", "unified": "^11.0.0" }, "peerDependencies": { "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, "sha512-huSIy7VU2Z5OLv6oFLosQGGDqPqdO1iq6bWNAdhzMxSJP7RAso4fCZ1cKu8j9YHCZf3TPrq4dw3okhrylgcd7w=="], - - "recma-parse": ["recma-parse@1.0.0", "", { "dependencies": { "@types/estree": "^1.0.0", "esast-util-from-js": "^2.0.0", "unified": "^11.0.0", "vfile": "^6.0.0" } }, "sha512-OYLsIGBB5Y5wjnSnQW6t3Xg7q3fQ7FWbw/vcXtORTnyaSFscOtABg+7Pnz6YZ6c27fG1/aN8CjfwoUEUIdwqWQ=="], - - "recma-stringify": ["recma-stringify@1.0.0", "", { "dependencies": { "@types/estree": "^1.0.0", "estree-util-to-js": "^2.0.0", "unified": "^11.0.0", "vfile": "^6.0.0" } }, "sha512-cjwII1MdIIVloKvC9ErQ+OgAtwHBmcZ0Bg4ciz78FtbT8In39aAYbaA7zvxQ61xVMSPE8WxhLwLbhif4Js2C+g=="], - - "regex": ["regex@6.1.0", "", { "dependencies": { "regex-utilities": "^2.3.0" } }, "sha512-6VwtthbV4o/7+OaAF9I5L5V3llLEsoPyq9P1JVXkedTP33c7MfCG0/5NOPcSJn0TzXcG9YUrR0gQSWioew3LDg=="], - - "regex-recursion": ["regex-recursion@6.0.2", "", { "dependencies": { "regex-utilities": "^2.3.0" } }, "sha512-0YCaSCq2VRIebiaUviZNs0cBz1kg5kVS2UKUfNIx8YVs1cN3AV7NTctO5FOKBA+UT2BPJIWZauYHPqJODG50cg=="], - - "regex-utilities": ["regex-utilities@2.3.0", "", {}, "sha512-8VhliFJAWRaUiVvREIiW2NXXTmHs4vMNnSzuJVhscgmGav3g9VDxLrQndI3dZZVVdp0ZO/5v0xmX516/7M9cng=="], - - "registry-auth-token": ["registry-auth-token@3.3.2", "", { "dependencies": { "rc": "^1.1.6", "safe-buffer": "^5.0.1" } }, "sha512-JL39c60XlzCVgNrO+qq68FoNb56w/m7JYvGR2jT5iR1xBrUA3Mfx5Twk5rqTThPmQKMWydGmq8oFtDlxfrmxnQ=="], - - "registry-url": ["registry-url@3.1.0", "", { "dependencies": { "rc": "^1.0.1" } }, "sha512-ZbgR5aZEdf4UKZVBPYIgaglBmSF2Hi94s2PcIHhRGFjKYu+chjJdYfHn4rt3hB6eCKLJ8giVIIfgMa1ehDfZKA=="], - - "rehype-recma": ["rehype-recma@1.0.0", "", { "dependencies": { "@types/estree": "^1.0.0", "@types/hast": "^3.0.0", "hast-util-to-estree": "^3.0.0" } }, "sha512-lqA4rGUf1JmacCNWWZx0Wv1dHqMwxzsDWYMTowuplHF3xH0N/MmrZ/G3BDZnzAkRmxDadujCjaKM2hqYdCBOGw=="], - - "remark": ["remark@15.0.1", "", { "dependencies": { "@types/mdast": "^4.0.0", "remark-parse": "^11.0.0", "remark-stringify": "^11.0.0", "unified": "^11.0.0" } }, "sha512-Eht5w30ruCXgFmxVUSlNWQ9iiimq07URKeFS3hNc8cUWy1llX4KDWfyEDZRycMc+znsN9Ux5/tJ/BFdgdOwA3A=="], - - "remark-gfm": ["remark-gfm@4.0.1", "", { "dependencies": { "@types/mdast": "^4.0.0", "mdast-util-gfm": "^3.0.0", "micromark-extension-gfm": "^3.0.0", "remark-parse": "^11.0.0", "remark-stringify": "^11.0.0", "unified": "^11.0.0" } }, "sha512-1quofZ2RQ9EWdeN34S79+KExV1764+wCUGop5CPL1WGdD0ocPpu91lzPGbwWMECpEpd42kJGQwzRfyov9j4yNg=="], - - "remark-mdx": ["remark-mdx@3.1.1", "", { "dependencies": { "mdast-util-mdx": "^3.0.0", "micromark-extension-mdxjs": "^3.0.0" } }, "sha512-Pjj2IYlUY3+D8x00UJsIOg5BEvfMyeI+2uLPn9VO9Wg4MEtN/VTIq2NEJQfde9PnX15KgtHyl9S0BcTnWrIuWg=="], - - "remark-parse": ["remark-parse@11.0.0", "", { "dependencies": { "@types/mdast": "^4.0.0", "mdast-util-from-markdown": "^2.0.0", "micromark-util-types": "^2.0.0", "unified": "^11.0.0" } }, "sha512-FCxlKLNGknS5ba/1lmpYijMUzX2esxW5xQqjWxw2eHFfS2MSdaHVINFmhjo+qN1WhZhNimq0dZATN9pH0IDrpA=="], - - "remark-rehype": ["remark-rehype@11.1.2", "", { "dependencies": { "@types/hast": "^3.0.0", "@types/mdast": "^4.0.0", "mdast-util-to-hast": "^13.0.0", "unified": "^11.0.0", "vfile": "^6.0.0" } }, "sha512-Dh7l57ianaEoIpzbp0PC9UKAdCSVklD8E5Rpw7ETfbTl3FqcOOgq5q2LVDhgGCkaBv7p24JXikPdvhhmHvKMsw=="], - - "remark-stringify": ["remark-stringify@11.0.0", "", { "dependencies": { "@types/mdast": "^4.0.0", "mdast-util-to-markdown": "^2.0.0", "unified": "^11.0.0" } }, "sha512-1OSmLd3awB/t8qdoEOMazZkNsfVTeY4fTsgzcQFdXNq8ToTN4ZGwrMnlda4K6smTFKD+GRV6O48i6Z4iKgPPpw=="], - - "require-from-string": ["require-from-string@2.0.2", "", {}, "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw=="], - - "reselect": ["reselect@5.3.0", "", {}, "sha512-XGoLeRAVzUTcJ1qkxPQhDJyIZ5d6zzZD9nT7AEZOaaU9UbWclhycElmhO+VD5bFeLuzhPBaOV2oXC8uG35ZSpg=="], - - "robust-predicates": ["robust-predicates@3.0.3", "", {}, "sha512-NS3levdsRIUOmiJ8FZWCP7LG3QpJyrs/TE0Zpf1yvZu8cAJJ6QMW92H1c7kWpdIHo8RvmLxN/o2JXTKHp74lUA=="], - - "roughjs": ["roughjs@4.6.6", "", { "dependencies": { "hachure-fill": "^0.5.2", "path-data-parser": "^0.1.0", "points-on-curve": "^0.2.0", "points-on-path": "^0.2.1" } }, "sha512-ZUz/69+SYpFN/g/lUlo2FXcIjRkSu3nDarreVdGGndHEBJ6cXPdKguS8JGxwj5HA5xIbVKSmLgr5b3AWxtRfvQ=="], - - "rw": ["rw@1.3.3", "", {}, "sha512-PdhdWy89SiZogBLaw42zdeqtRJ//zFd2PgQavcICDUgJT5oW10QCRKbJ6bg4r0/UY2M6BWd5tkxuGFRvCkgfHQ=="], - - "safe-buffer": ["safe-buffer@5.2.1", "", {}, "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="], - - "safer-buffer": ["safer-buffer@2.1.2", "", {}, "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="], - - "scheduler": ["scheduler@0.28.0", "", {}, "sha512-juorfCmIkIw8tT+p5BXSm6PJjQF/ycEYmKyzURCIt/RaZIhL+PulbQ9Yu2z1HdOJDdqDTlxA1+xKBmHXJsczAw=="], - - "scroll-into-view-if-needed": ["scroll-into-view-if-needed@3.1.0", "", { "dependencies": { "compute-scroll-into-view": "^3.0.2" } }, "sha512-49oNpRjWRvnU8NyGVmUaYG4jtTkNonFZI86MmGRDqBphEK2EXT9gdEUoQPZhuBM8yWHxCWbobltqYO5M4XrUvQ=="], - - "semver": ["semver@7.8.5", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA=="], - - "serve": ["serve@14.2.8", "", { "dependencies": { "@zeit/schemas": "2.36.0", "ajv": "8.18.0", "arg": "5.0.2", "boxen": "7.0.0", "chalk": "5.0.1", "chalk-template": "0.4.0", "compression": "1.8.2", "is-port-reachable": "4.0.0", "serve-handler": "6.1.7", "tinyclip": "^0.1.12", "update-check": "1.5.4" }, "bin": { "serve": "build/main.js" } }, "sha512-7or7YqR3zXwHhiBGj40l9yODyQY146O+hXKaEAfQYQkcvHtMDdX95K96xr50qL9EjXScyYVJb1NIgVE8F0i5cA=="], - - "serve-handler": ["serve-handler@6.1.7", "", { "dependencies": { "bytes": "3.0.0", "content-disposition": "0.5.2", "mime-types": "2.1.18", "minimatch": "3.1.5", "path-is-inside": "1.0.2", "path-to-regexp": "3.3.0", "range-parser": "1.2.0" } }, "sha512-CinAq1xWb0vR3twAv9evEU8cNWkXCb9kd5ePAHUKJBkOsUpR1wt/CvGdeca7vqumL1U5cSaeVQ6zZMxiJ3yWsg=="], - - "sharp": ["sharp@0.35.5", "", { "dependencies": { "@img/colour": "^1.1.0", "detect-libc": "^2.1.2", "semver": "^7.8.5" }, "optionalDependencies": { "@img/sharp-darwin-arm64": "0.35.5", "@img/sharp-darwin-x64": "0.35.5", "@img/sharp-freebsd-wasm32": "0.35.5", "@img/sharp-libvips-darwin-arm64": "1.3.4", "@img/sharp-libvips-darwin-x64": "1.3.4", "@img/sharp-libvips-linux-arm": "1.3.4", "@img/sharp-libvips-linux-arm64": "1.3.4", "@img/sharp-libvips-linux-ppc64": "1.3.4", "@img/sharp-libvips-linux-riscv64": "1.3.4", "@img/sharp-libvips-linux-s390x": "1.3.4", "@img/sharp-libvips-linux-x64": "1.3.4", "@img/sharp-libvips-linuxmusl-arm64": "1.3.4", "@img/sharp-libvips-linuxmusl-x64": "1.3.4", "@img/sharp-linux-arm": "0.35.5", "@img/sharp-linux-arm64": "0.35.5", "@img/sharp-linux-ppc64": "0.35.5", "@img/sharp-linux-riscv64": "0.35.5", "@img/sharp-linux-s390x": "0.35.5", "@img/sharp-linux-x64": "0.35.5", "@img/sharp-linuxmusl-arm64": "0.35.5", "@img/sharp-linuxmusl-x64": "0.35.5", "@img/sharp-webcontainers-wasm32": "0.35.5", "@img/sharp-win32-arm64": "0.35.5", "@img/sharp-win32-ia32": "0.35.5", "@img/sharp-win32-x64": "0.35.5" }, "peerDependencies": { "@types/node": "*" }, "optionalPeers": ["@types/node"] }, "sha512-Ywn4OnzGukp7CDMrp08RQ50YKmuwG47brZgIVPTvBaaAfQlRlygrRqSrxdCiL9M+LlzLBiJ68IR1QqvzHyjC7g=="], - - "shiki": ["shiki@4.6.0", "", { "dependencies": { "@shikijs/core": "4.6.0", "@shikijs/engine-javascript": "4.6.0", "@shikijs/engine-oniguruma": "4.6.0", "@shikijs/langs": "4.6.0", "@shikijs/themes": "4.6.0", "@shikijs/types": "4.6.0", "@shikijs/vscode-textmate": "^10.1.0", "@types/hast": "^3.0.5" } }, "sha512-imjLsVHgPuWhvpU3P+zOekvMYqnel7QmKsFC4Sn0fCuAvaaalBsxwKEsrU8Ko5BdFnZA6Go/8a0RzahS634UgA=="], - - "source-map": ["source-map@0.7.6", "", {}, "sha512-i5uvt8C3ikiWeNZSVZNWcfZPItFQOsYTUAOkcUPGd8DqDy1uOUikjt5dG+uRlwyvR108Fb9DOd4GvXfT0N2/uQ=="], - - "source-map-js": ["source-map-js@1.2.2", "", {}, "sha512-KGj/8Y43x35aZVDtt+J4mK1hoLGHULMYfSkODJNQjNDC3oW1PqPoxMwo0pLUsWM/UEGzON/NxeHywEfNXNP3Vw=="], - - "space-separated-tokens": ["space-separated-tokens@2.0.2", "", {}, "sha512-PEGlAwrG8yXGXRjW32fGbg66JAlOAwbObuqVoJpv/mRgoWDQfgH1wDPvtzWyUSNAXBGSk8h755YDbbcEy3SH2Q=="], - - "string-width": ["string-width@5.1.2", "", { "dependencies": { "eastasianwidth": "^0.2.0", "emoji-regex": "^9.2.2", "strip-ansi": "^7.0.1" } }, "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA=="], - - "stringify-entities": ["stringify-entities@4.0.4", "", { "dependencies": { "character-entities-html4": "^2.0.0", "character-entities-legacy": "^3.0.0" } }, "sha512-IwfBptatlO+QCJUo19AqvrPNqlVMpW9YEL2LIVY+Rpv2qsjCGxaDLNRgeGsQWJhfItebuJhsGSLjaBbNSQ+ieg=="], - - "strip-ansi": ["strip-ansi@7.2.0", "", { "dependencies": { "ansi-regex": "^6.2.2" } }, "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w=="], - - "strip-json-comments": ["strip-json-comments@2.0.1", "", {}, "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ=="], - - "style-to-js": ["style-to-js@1.1.21", "", { "dependencies": { "style-to-object": "1.0.14" } }, "sha512-RjQetxJrrUJLQPHbLku6U/ocGtzyjbJMP9lCNK7Ag0CNh690nSH8woqWH9u16nMjYBAok+i7JO1NP2pOy8IsPQ=="], - - "style-to-object": ["style-to-object@1.0.14", "", { "dependencies": { "inline-style-parser": "0.2.7" } }, "sha512-LIN7rULI0jBscWQYaSswptyderlarFkjQ+t79nzty8tcIAceVomEVlLzH5VP4Cmsv6MtKhs7qaAiwlcp+Mgaxw=="], - - "styled-jsx": ["styled-jsx@5.1.6", "", { "dependencies": { "client-only": "0.0.1" }, "peerDependencies": { "react": ">= 16.8.0 || 17.x.x || ^18.0.0-0 || ^19.0.0-0" } }, "sha512-qSVyDTeMotdvQYoHWLNGwRFJHC+i+ZvdBRYosOFgC+Wg1vx4frN2/RG/NA7SYqqvKNLf39P2LSRA2pu6n0XYZA=="], - - "stylis": ["stylis@4.4.0", "", {}, "sha512-5Z9ZpRzfuH6l/UAvCPAPUo3665Nk2wLaZU3x+TLHKVzIz33+sbJqbtrYoC3KD4/uVOr2Zp+L0LySezP9OHV9yA=="], - - "supports-color": ["supports-color@7.2.0", "", { "dependencies": { "has-flag": "^4.0.0" } }, "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw=="], - - "tailwindcss": ["tailwindcss@4.3.5", "", {}, "sha512-FcQk9BuffmEHJP2G0XmB2SplU1aLTI7j07Kunk+U74Ny+XiWOtzXz9aujFZ/avntw1e2cOv/3PkgzflQ7gX2vQ=="], - - "tapable": ["tapable@2.3.3", "", {}, "sha512-uxc/zpqFg6x7C8vOE7lh6Lbda8eEL9zmVm/PLeTPBRhh1xCgdWaQ+J1CUieGpIfm2HdtsUpRv+HshiasBMcc6A=="], - - "tinyclip": ["tinyclip@0.1.15", "", {}, "sha512-uo33abH+Ays0xYaDysoBt494Hb3hsEczMpcC0MwFl773pazORx4fmvKhclhR1wonUbB6vvpRsvVMwnhfqeMc+A=="], - - "tinyexec": ["tinyexec@1.3.1", "", {}, "sha512-GCvB3aoys96IuDFBMcTB46JOR6mdMtAToqwiW8JlWhsoh1mhHi/xn9ss/Dg7N555GiJyEt2qzoG/NHCwM6h1EA=="], - - "tinyglobby": ["tinyglobby@0.2.17", "", { "dependencies": { "fdir": "^6.5.0", "picomatch": "^4.0.4" } }, "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g=="], - - "trim-lines": ["trim-lines@3.0.1", "", {}, "sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg=="], - - "trough": ["trough@2.2.0", "", {}, "sha512-tmMpK00BjZiUyVyvrBK7knerNgmgvcV/KLVyuma/SC+TQN167GrMRciANTz09+k3zW8L8t60jWO1GpfkZdjTaw=="], - - "ts-dedent": ["ts-dedent@2.3.0", "", {}, "sha512-JfJeIHke7y2egdGGgRAvpCwYFUsHlM2gPcrVOxFkznt/4uzQ7HFmvE63iFHVLBJNDuyDOQgijDK/tXH/f6Msjg=="], - - "tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="], - - "type-fest": ["type-fest@2.19.0", "", {}, "sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA=="], - - "typescript": ["typescript@7.0.2", "", { "optionalDependencies": { "@typescript/typescript-aix-ppc64": "7.0.2", "@typescript/typescript-darwin-arm64": "7.0.2", "@typescript/typescript-darwin-x64": "7.0.2", "@typescript/typescript-freebsd-arm64": "7.0.2", "@typescript/typescript-freebsd-x64": "7.0.2", "@typescript/typescript-linux-arm": "7.0.2", "@typescript/typescript-linux-arm64": "7.0.2", "@typescript/typescript-linux-loong64": "7.0.2", "@typescript/typescript-linux-mips64el": "7.0.2", "@typescript/typescript-linux-ppc64": "7.0.2", "@typescript/typescript-linux-riscv64": "7.0.2", "@typescript/typescript-linux-s390x": "7.0.2", "@typescript/typescript-linux-x64": "7.0.2", "@typescript/typescript-netbsd-arm64": "7.0.2", "@typescript/typescript-netbsd-x64": "7.0.2", "@typescript/typescript-openbsd-arm64": "7.0.2", "@typescript/typescript-openbsd-x64": "7.0.2", "@typescript/typescript-sunos-x64": "7.0.2", "@typescript/typescript-win32-arm64": "7.0.2", "@typescript/typescript-win32-x64": "7.0.2" }, "bin": { "tsc": "bin/tsc" } }, "sha512-8FYau96o3NKOhbjKi/qNvG/W5jhzxkbdm5sj9AbZ/5T5sWqn3hJgLfGx27sRKZWTvyzCP8dLRBTf5tBTSRVUNA=="], - - "undici-types": ["undici-types@8.9.0", "", {}, "sha512-KTDyRTYX8sWmKXAikPHHSyc63CRPETMctyjKFupcC6OBLXT3xsN0e9aF7m+mIXutFWpUXuedtowG7iLOzp0kQg=="], - - "unified": ["unified@11.0.5", "", { "dependencies": { "@types/unist": "^3.0.0", "bail": "^2.0.0", "devlop": "^1.0.0", "extend": "^3.0.0", "is-plain-obj": "^4.0.0", "trough": "^2.0.0", "vfile": "^6.0.0" } }, "sha512-xKvGhPWw3k84Qjh8bI3ZeJjqnyadK+GEFtazSfZv/rKeTkTjOJho6mFqh2SM96iIcZokxiOpg78GazTSg8+KHA=="], - - "unist-util-is": ["unist-util-is@6.0.1", "", { "dependencies": { "@types/unist": "^3.0.0" } }, "sha512-LsiILbtBETkDz8I9p1dQ0uyRUWuaQzd/cuEeS1hoRSyW5E5XGmTzlwY1OrNzzakGowI9Dr/I8HVaw4hTtnxy8g=="], - - "unist-util-position": ["unist-util-position@5.0.0", "", { "dependencies": { "@types/unist": "^3.0.0" } }, "sha512-fucsC7HjXvkB5R3kTCO7kUjRdrS0BJt3M/FPxmHMBOm8JQi2BsHAHFsy27E0EolP8rp0NzXsJ+jNPyDWvOJZPA=="], - - "unist-util-position-from-estree": ["unist-util-position-from-estree@2.0.0", "", { "dependencies": { "@types/unist": "^3.0.0" } }, "sha512-KaFVRjoqLyF6YXCbVLNad/eS4+OfPQQn2yOd7zF/h5T/CSL2v8NpN6a5TPvtbXthAGw5nG+PuTtq+DdIZr+cRQ=="], - - "unist-util-remove-position": ["unist-util-remove-position@5.0.0", "", { "dependencies": { "@types/unist": "^3.0.0", "unist-util-visit": "^5.0.0" } }, "sha512-Hp5Kh3wLxv0PHj9m2yZhhLt58KzPtEYKQQ4yxfYFEO7EvHwzyDYnduhHnY1mDxoqr7VUwVuHXk9RXKIiYS1N8Q=="], - - "unist-util-stringify-position": ["unist-util-stringify-position@4.0.0", "", { "dependencies": { "@types/unist": "^3.0.0" } }, "sha512-0ASV06AAoKCDkS2+xw5RXJywruurpbC4JZSm7nr7MOt1ojAzvyyaO+UxZf18j8FCF6kmzCZKcAgN/yu2gm2XgQ=="], - - "unist-util-visit": ["unist-util-visit@5.1.0", "", { "dependencies": { "@types/unist": "^3.0.0", "unist-util-is": "^6.0.0", "unist-util-visit-parents": "^6.0.0" } }, "sha512-m+vIdyeCOpdr/QeQCu2EzxX/ohgS8KbnPDgFni4dQsfSCtpz8UqDyY5GjRru8PDKuYn7Fq19j1CQ+nJSsGKOzg=="], - - "unist-util-visit-parents": ["unist-util-visit-parents@6.0.2", "", { "dependencies": { "@types/unist": "^3.0.0", "unist-util-is": "^6.0.0" } }, "sha512-goh1s1TBrqSqukSc8wrjwWhL0hiJxgA8m4kFxGlQ+8FYQ3C/m11FcTs4YYem7V664AhHVvgoQLk890Ssdsr2IQ=="], - - "update-check": ["update-check@1.5.4", "", { "dependencies": { "registry-auth-token": "3.3.2", "registry-url": "3.1.0" } }, "sha512-5YHsflzHP4t1G+8WGPlvKbJEbAJGCgw+Em+dGR1KmBUbr1J36SJBqlHLjR7oob7sco5hWHGQVcr9B2poIVDDTQ=="], - - "use-callback-ref": ["use-callback-ref@1.3.3", "", { "dependencies": { "tslib": "^2.0.0" }, "peerDependencies": { "@types/react": "*", "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-jQL3lRnocaFtu3V00JToYz/4QkNWswxijDaCVNZRiRTO3HQDLsdu1ZtmIUvV4yPp+rvWm5j0y0TG/S61cuijTg=="], - - "use-sidecar": ["use-sidecar@1.1.3", "", { "dependencies": { "detect-node-es": "^1.1.0", "tslib": "^2.0.0" }, "peerDependencies": { "@types/react": "*", "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-Fedw0aZvkhynoPYlA5WXrMCAMm+nSWdZt6lzJQ7Ok8S6Q+VsHmHpRWndVRJ8Be0ZbkfPc5LRYH+5XrzXcEeLRQ=="], - - "use-sync-external-store": ["use-sync-external-store@1.7.0", "", { "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "sha512-6L+EeigHMQhdaIPNIFUKwfWJSwWFQ8gJbJ2DLOs5sDIegTwR9fRxvnM3uciHKjIZhFz+KAv2emhWMRvDmMcY8A=="], - - "vary": ["vary@1.1.2", "", {}, "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg=="], - - "vfile": ["vfile@6.0.3", "", { "dependencies": { "@types/unist": "^3.0.0", "vfile-message": "^4.0.0" } }, "sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q=="], - - "vfile-message": ["vfile-message@4.0.3", "", { "dependencies": { "@types/unist": "^3.0.0", "unist-util-stringify-position": "^4.0.0" } }, "sha512-QTHzsGd1EhbZs4AsQ20JX1rC3cOlt/IWJruk893DfLRr57lcnOeMaWG4K0JrRta4mIJZKth2Au3mM3u03/JWKw=="], - - "web-namespaces": ["web-namespaces@2.0.1", "", {}, "sha512-bKr1DkiNa2krS7qxNtdrtHAmzuYGFQLiQ13TsorsdT6ULTkPLKuu5+GsFpDlg6JFjUTwX2DyhMPG2be8uPrqsQ=="], - - "widest-line": ["widest-line@4.0.1", "", { "dependencies": { "string-width": "^5.0.1" } }, "sha512-o0cyEG0e8GPzT4iGHphIOh0cJOV8fivsXxddQasHPHfoZf1ZexrfeA21w2NaEN1RHE+fXlfISmOE8R9N3u3Qig=="], - - "wrap-ansi": ["wrap-ansi@8.1.0", "", { "dependencies": { "ansi-styles": "^6.1.0", "string-width": "^5.0.1", "strip-ansi": "^7.0.1" } }, "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ=="], - - "yaml": ["yaml@2.9.1", "", { "bin": { "yaml": "bin.mjs" } }, "sha512-3NxN8+78OdzbT7C/WjGsyfPAtJaN3FNDsWxv7Y7mcDsT/oOmgW8BpyQQFFBnvZE3j9Y2Sdz1ULFLezL7Eb2yFw=="], - - "yuku-analyzer": ["yuku-analyzer@0.19.0", "", { "dependencies": { "@yuku-toolchain/types": "^0.19.0", "yuku-ast": "^0.19.0", "yuku-core": "0.19.0" } }, "sha512-Iu7DV5cWOQ3ERSA7oBquz/RT5IEGsUyUeCivYs9lQaZ4nSjM31yD17mH616JKcTyVoVWYivsFZ+twT3UyBosTA=="], - - "yuku-ast": ["yuku-ast@0.19.0", "", { "dependencies": { "@yuku-toolchain/types": "^0.19.0" } }, "sha512-PyCsiScaelhxBGzL8dyeJkLqvRZycoh78R31Vrt/WqYrm0hMFoKwIw/X7Dx5mBKLWAMlV9I9HEyBOHnj2gZVyw=="], - - "yuku-core": ["yuku-core@0.19.0", "", { "dependencies": { "@yuku-toolchain/types": "^0.19.0" }, "optionalDependencies": { "@yuku-core/binding-android-arm64": "0.19.0", "@yuku-core/binding-darwin-arm64": "0.19.0", "@yuku-core/binding-darwin-x64": "0.19.0", "@yuku-core/binding-freebsd-x64": "0.19.0", "@yuku-core/binding-linux-arm-gnu": "0.19.0", "@yuku-core/binding-linux-arm-musl": "0.19.0", "@yuku-core/binding-linux-arm64-gnu": "0.19.0", "@yuku-core/binding-linux-arm64-musl": "0.19.0", "@yuku-core/binding-linux-x64-gnu": "0.19.0", "@yuku-core/binding-linux-x64-musl": "0.19.0", "@yuku-core/binding-win32-arm64": "0.19.0", "@yuku-core/binding-win32-x64": "0.19.0" } }, "sha512-kYK9e1XdfirNhkipzW0wmMcSWcVF/CWnuugodfVYRCUwvoBefweL9HzB96OiKEhsx78V5WbUxbJqlizMX869Qg=="], - - "zbsearch": ["zbsearch@4.0.4", "", {}, "sha512-uajYItKQcOP6f1z+XqzJSIx1jQPe7PbXajElh7r60KGc1MoSIn/hH9d++SvtkT78GXrZB4fah/e8Ts8jFh2CGw=="], - - "zod": ["zod@4.6.7", "", {}, "sha512-g8W2D2kU6a8untc053fX1uVBKzM7yqAxW/3zwk83+6RyF2+SKOuV+c0wBDhUwzV1PaGapmZH+rmcUzPf+3CGwg=="], - - "zwitch": ["zwitch@2.0.4", "", {}, "sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A=="], - - "@tailwindcss/oxide-wasm32-wasi/@emnapi/core": ["@emnapi/core@1.11.3", "", { "dependencies": { "@emnapi/wasi-threads": "1.2.3", "tslib": "^2.4.0" }, "bundled": true }, "sha512-zLpS5asjEb7lq8jYLq37N6XKaE41DIexlY1rF/z4/tIl3wo13Sqm28fRyfIsKZD+NZ8mM5RoKkpW/rBcuoSZSg=="], - - "@tailwindcss/oxide-wasm32-wasi/@emnapi/runtime": ["@emnapi/runtime@1.11.3", "", { "dependencies": { "tslib": "^2.4.0" }, "bundled": true }, "sha512-Xz4Tpyki7XyrpbUK1jR1AhdAdaXyhhY4lZ3neLodmhpuWfy2PAQN5B46sAiU4liOXGLkHypn/qU+jvfWSCYYLA=="], - - "@tailwindcss/oxide-wasm32-wasi/@emnapi/wasi-threads": ["@emnapi/wasi-threads@1.2.3", "", { "dependencies": { "tslib": "^2.4.0" }, "bundled": true }, "sha512-ELEBe8PsLvvJ6QMr0zLt8ffvOHW/dc1m3CEzNMg7aJUv3bMaoDtw2TXyDAwkYBuroxxuHEwhRTLJSe5sya547g=="], - - "@tailwindcss/oxide-wasm32-wasi/@napi-rs/wasm-runtime": ["@napi-rs/wasm-runtime@1.2.5", "", { "dependencies": { "@tybys/wasm-util": "^0.10.3" }, "peerDependencies": { "@emnapi/core": "^1.7.1 || ^2.0.0-alpha.4", "@emnapi/runtime": "^1.7.1 || ^2.0.0-alpha.4" }, "bundled": true }, "sha512-HshSvXzmBxNzqejd3k/KemgQ3hdREUYFRRrgxOZ+gPljDIsO2SDZrVZMd4Z/HsxudQbE62OVyVFE8z9BCurfjA=="], - - "@tailwindcss/oxide-wasm32-wasi/@tybys/wasm-util": ["@tybys/wasm-util@0.10.4", "", { "dependencies": { "tslib": "^2.4.0" }, "bundled": true }, "sha512-W3c4gRigFS0T/Ma4qIYF3GDAc5AQdHb1yL5znJT1Zv1YaD9Kitx656wBjvr19qbiosmZT8lWDM5BEMynUqX65A=="], - - "@tailwindcss/oxide-wasm32-wasi/tslib": ["tslib@2.8.1", "", { "bundled": true }, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="], - - "ansi-align/string-width": ["string-width@4.2.3", "", { "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", "strip-ansi": "^6.0.1" } }, "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g=="], - - "chalk-template/chalk": ["chalk@4.1.2", "", { "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" } }, "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA=="], - - "cytoscape-fcose/cose-base": ["cose-base@2.2.0", "", { "dependencies": { "layout-base": "^2.0.0" } }, "sha512-AzlgcsCbUMymkADOJtQm3wO9S3ltPfYOFD5033keQn9NJzIbtnZj+UdBJe7DYml/8TdbtHJW3j58SOnKhWY/5g=="], - - "d3-dsv/commander": ["commander@7.2.0", "", {}, "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw=="], - - "d3-sankey/d3-array": ["d3-array@2.12.1", "", { "dependencies": { "internmap": "^1.0.0" } }, "sha512-B0ErZK/66mHtEsR1TkPEEkwdy+WDesimkM5gpZr5Dsg54BiTA5RXtYW5qTLIAcekaS9xfZrzBLF/OAkB3Qn1YQ=="], - - "d3-sankey/d3-shape": ["d3-shape@1.3.7", "", { "dependencies": { "d3-path": "1" } }, "sha512-EUkvKjqPFUAZyOlhY5gzCxCeI0Aep04LwIRpsZ/mLFelJiUfnK56jo5JMDSE7yyP2kLSb6LtF+S5chMk7uqPqw=="], - - "micromark/debug": ["debug@4.4.3", "", { "dependencies": { "ms": "^2.1.3" } }, "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA=="], - - "mime-types/mime-db": ["mime-db@1.33.0", "", {}, "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ=="], - - "next/postcss": ["postcss@8.5.23", "", { "dependencies": { "nanoid": "^3.3.16", "picocolors": "^1.1.1", "source-map-js": "^1.2.1" } }, "sha512-g50586zr4bZmwFiTlflMu8E0bDTb5I5gertgwAKmsdUlTQIhZtunzUlD1WSzwcVWPoAVpsrA6vlfCD7oXvRwgg=="], - - "parse-entities/@types/unist": ["@types/unist@2.0.11", "", {}, "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA=="], - - "serve-handler/bytes": ["bytes@3.0.0", "", {}, "sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw=="], - - "ansi-align/string-width/emoji-regex": ["emoji-regex@8.0.0", "", {}, "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="], - - "ansi-align/string-width/strip-ansi": ["strip-ansi@6.0.1", "", { "dependencies": { "ansi-regex": "^5.0.1" } }, "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A=="], - - "chalk-template/chalk/ansi-styles": ["ansi-styles@4.3.0", "", { "dependencies": { "color-convert": "^2.0.1" } }, "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg=="], - - "cytoscape-fcose/cose-base/layout-base": ["layout-base@2.0.1", "", {}, "sha512-dp3s92+uNI1hWIpPGH3jK2kxE2lMjdXdr+DH8ynZHpd6PUlH6x6cbuXnoMmiNumznqaNO31xu9e79F0uuZ0JFg=="], - - "d3-sankey/d3-array/internmap": ["internmap@1.0.1", "", {}, "sha512-lDB5YccMydFBtasVtxnZ3MRBHuaoE8GKsppq+EchKL2U4nK/DmEpPHNH8MZe5HkMtpSiTSOZwfN0tzYjO/lJEw=="], - - "d3-sankey/d3-shape/d3-path": ["d3-path@1.0.9", "", {}, "sha512-VLaYcn81dtHVTjEHd8B+pbe9yHWpXKZUC87PzoFmsFrJqgFwDe/qxfp5MlfsfM1V5E/iVt0MmEbWQ7FVIXh/bg=="], - - "micromark/debug/ms": ["ms@2.1.3", "", {}, "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="], - - "ansi-align/string-width/strip-ansi/ansi-regex": ["ansi-regex@5.0.1", "", {}, "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ=="], - } -} diff --git a/website/content/examples/devtools.mdx b/website/content/examples/devtools.mdx index b1a2670b..83731d64 100644 --- a/website/content/examples/devtools.mdx +++ b/website/content/examples/devtools.mdx @@ -18,6 +18,6 @@ Connect any store to Redux DevTools for state inspection and time-travel debuggi -**API** · `devtools(store, options?): () => void` from `@codebelt/classy-store/utils`. +**API** · `devtools(store, options?): DevtoolsHandle` from `@codebelt/classy-store/utils`. -Call the disposer in effect cleanup to disconnect the component. The `name` option identifies the store in Redux DevTools. +Call the handle's `dispose()` in effect cleanup to disconnect the component. The `name` option identifies the store in Redux DevTools. diff --git a/website/examples/demos/devtools/DevtoolsDemo.tsx b/website/examples/demos/devtools/DevtoolsDemo.tsx index 07311f94..5ed04dd7 100644 --- a/website/examples/demos/devtools/DevtoolsDemo.tsx +++ b/website/examples/demos/devtools/DevtoolsDemo.tsx @@ -41,12 +41,12 @@ function DevtoolsCounter() { // #region connect useEffect(() => { - const dispose = devtools(devtoolsCounterStore, { + const connection = devtools(devtoolsCounterStore, { name: 'DemoCounter', }); - setConnected(Boolean(window.__REDUX_DEVTOOLS_EXTENSION__)); + setConnected('__REDUX_DEVTOOLS_EXTENSION__' in window); return () => { - dispose(); + connection.dispose(); setConnected(false); }; }, []); diff --git a/website/package.json b/website/package.json index cb6d7716..8b7e6caa 100644 --- a/website/package.json +++ b/website/package.json @@ -10,7 +10,7 @@ "test:pages": "playwright test" }, "dependencies": { - "@codebelt/classy-store": "0.11.0", + "@codebelt/classy-store": "workspace:*", "fumadocs-core": "16.19.4", "fumadocs-mdx": "15.6.3", "fumadocs-ui": "npm:@fumadocs/base-ui@16.19.4", @@ -30,6 +30,7 @@ "serve": "^14.2.8", "tailwindcss": "^4.3.5", "typescript": "^7.0.2", - "@playwright/test": "1.65.1" + "@playwright/test": "1.65.1", + "zod": "^4.6.7" } } From a14a003f78267169d72c45482a519e50e5a9c83d Mon Sep 17 00:00:00 2001 From: codeBelt Date: Wed, 18 Nov 2026 08:05:56 -0600 Subject: [PATCH 015/169] docs(examples): remove stray colour-tool links from the Next.js README Co-Authored-By: Claude Fable 5.2 --- examples/nextjs/README.md | 8 -------- 1 file changed, 8 deletions(-) diff --git a/examples/nextjs/README.md b/examples/nextjs/README.md index 7c0c98a0..26b45705 100644 --- a/examples/nextjs/README.md +++ b/examples/nextjs/README.md @@ -11,11 +11,3 @@ bun dev ``` Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. - -- Realtime Colors (realtimecolors.com) — great for light/dark pairs -- Coolors (coolors.co) — shareable palette URLs -- Tailwind Color Generator (uicolors.app) -- Radix Colors (radix-ui.com/colors) -- Shadcn Themes (ui.shadcn.com/themes) -- Happy Hues (happyhues.co) -- Color Hunt (colorhunt.co) From a395e17627abb9063e5c35c27ac87b90a5675737 Mon Sep 17 00:00:00 2001 From: codeBelt Date: Wed, 18 Nov 2026 08:12:52 -0600 Subject: [PATCH 016/169] docs: start the changelog at 1.0.0 Remove the 0.x entries. They linked to upgrade pages that no longer exist and described the Solid release-candidate pin. The earlier notes remain in git history and on the GitHub Releases page. Co-Authored-By: Claude Fable 5.2 --- packages/classy-store/CHANGELOG.md | 234 ----------------------------- 1 file changed, 234 deletions(-) diff --git a/packages/classy-store/CHANGELOG.md b/packages/classy-store/CHANGELOG.md index 8907a092..cd71f6e8 100644 --- a/packages/classy-store/CHANGELOG.md +++ b/packages/classy-store/CHANGELOG.md @@ -1,235 +1 @@ # @codebelt/classy-store - -## 0.11.0 - -### Minor Changes - -- [`eb7f585`](https://github.com/codeBelt/classy-store/commit/eb7f585c14b71987e82d3ccd72fe5c1edfbb27bb) Thanks [@codeBelt](https://github.com/codeBelt)! - Release 0.11.0 with the MIT license and support for stores shared between ESM and CommonJS callers. The Solid adapter stays in preview at exactly `solid-js@2.0.0-rc.18`. The Angular adapter supports stable `@angular/core@^22.0.0` releases, with the development framework pinned to `22.2.6`. - - Preserve edits made by synchronous subscribers to other fields during hydration and cross-tab restores, including when a field is missing from older stored data. Sparse-array selectors using `shallowEqual` now distinguish a hole from an element containing `undefined`. See the [0.11.0 release notes](https://codebelt.github.io/classy-store/docs/UPGRADING_0_11). - - Keep explicit store subscriptions scoped to their own subtree, follow child subscriptions when they change owners, and reclaim dead owner links on read-only shared data. A clear issued during restore remains effective until the next local edit. Dense array comparisons short-circuit on the first mismatch. - -### Patch Changes - -- [`b0ff991`](https://github.com/codeBelt/classy-store/commit/b0ff9917e51e8610e312d1ba1d4a1b9888e0d844) Thanks [@codeBelt](https://github.com/codeBelt)! - Keep retained rows reactive after reordering or filtering and invalidate every owner of a shared object. Preserve JSON `__proto__` keys as snapshot data, evaluate object-literal getters on snapshots, and track nested writes from class setters. Save local subscriber edits made during persistence hydration. - -- [`b9d51fa`](https://github.com/codeBelt/classy-store/commit/b9d51fae65eae800973f2a25c09ca57f295643f5) Thanks [@codeBelt](https://github.com/codeBelt)! - Preserve sparse array holes and trailing length in snapshots and React's auto-tracked reads. Distinguish arrays from records in `shallowEqual`, including an empty array and an empty record. - -- [`1545a53`](https://github.com/codeBelt/classy-store/commit/1545a5327a17fd5b8f92fdd6c03af9da6d24273d) Thanks [@codeBelt](https://github.com/codeBelt)! - Share store identity, snapshot caches, and React hydration preparation across ESM and CommonJS entry points from the same package installation. A CommonJS utility such as `withHistory` can now subscribe to an ESM-created store, and an ESM utility can use a CommonJS-created store. - -## 0.10.0 - -### Minor Changes - -- [#42](https://github.com/codeBelt/classy-store/pull/42) [`68bb261`](https://github.com/codeBelt/classy-store/commit/68bb261f9d127159ec7fb98e20add4d049fc6b55) Thanks [@codeBelt](https://github.com/codeBelt)! - Bound optional framework peers to supported stable majors: React `^18.0.0 || ^19.0.0`, Vue `^3.2.0`, and Svelte `^4.0.0 || ^5.0.0`. Future majors are no longer accepted automatically. Development dependency versions remain unchanged. - - Fix the Vue adapter's public declaration to return `Ref>` backed by a shallow ref. Vue 3.2.0 does not export the newer `ShallowRef` type; the stable type preserves readonly snapshot inference at the advertised minimum without changing runtime behavior. - - Validate packed consumers at React 18.0.0/19.0.0, Vue 3.2.0, and Svelte 4.0.0/5.0.0 using existing focused tests. Add the minimums to CI coverage and document Svelte 4's native deferred `$:` computations versus Svelte 5's immediate `$derived` reads. Store snapshots still update synchronously in the adapters, and ordinary core subscriptions remain batched. - -- [#42](https://github.com/codeBelt/classy-store/pull/42) [`68bb261`](https://github.com/codeBelt/classy-store/commit/68bb261f9d127159ec7fb98e20add4d049fc6b55) Thanks [@codeBelt](https://github.com/codeBelt)! - Support all stable Angular 22 releases with the optional `@angular/core` peer set to `^22.0.0` and update `injectStore` signals synchronously while preserving Angular's native rendering schedule and ordinary core subscription batching. Ignore notifications during teardown and release each subscription with its Angular lifecycle. - - This removes support for Angular 21 and earlier. Use aligned Angular runtime/compiler packages from a stable Angular 22 release and a compatible TypeScript 6.0 toolchain. Development dependencies and the example remain pinned to 22.2.3. The `/angular` import path and `injectStore(store)` signature are unchanged; imperative signal and computed reads now reflect writes immediately. - - Add zoneless input, computed, keyed-list, and cleanup regressions, an updated Angular example, and migration documentation. Validate packed consumers with aligned Angular 22.0.0 and 22.2.3 packages and run the shared focused browser tests for both versions in CI. - -## 0.9.0 - -### Minor Changes - -- [#40](https://github.com/codeBelt/classy-store/pull/40) [`3e2281d`](https://github.com/codeBelt/classy-store/commit/3e2281ddf1202c4742afdd72b0f5065c7d81d237) Thanks [@codeBelt](https://github.com/codeBelt)! - Migrate the `/solid` adapter to Solid 2.0.0-rc.18 only. Solid 1 is no longer - supported. Pin the exact release candidate; browser apps should also use - `@solidjs/web@2.0.0-rc.18` and Solid 2's compiler tooling. The public - `useClassyStore(store): () => Snapshot` API is unchanged. - - Forward store notifications synchronously to Solid while preserving Solid 2's - native scheduling and ordinary core subscription batching. Solid's `flush()` - now applies pending store-backed computed values and DOM updates. - - Require a live Solid owner before subscribing, and release subscriptions on owner - disposal, including disposal during notification. Add real-component regressions - for inputs, computed values, keyed lists, timing, and cleanup; update the example, - TypeScript checks, CI, and public integration guide. - -## 0.8.2 - -### Patch Changes - -- [#38](https://github.com/codeBelt/classy-store/pull/38) [`dfe1228`](https://github.com/codeBelt/classy-store/commit/dfe1228d63472387f002295f1f62bd6160f83be0) Thanks [@codeBelt](https://github.com/codeBelt)! - Update Vue snapshot refs synchronously so computed values are immediately current - and one `await nextTick()` waits for the resulting DOM update. Vue rendering and - ordinary core subscriptions still batch. - - Require an active Vue effect scope for `useClassyStore()` and stop delivery when - that scope is disposed, including disposal during notification. Call the hook in - `setup()` / ` +

{$snap.count}

`; +writeFileSync( + 'svelte-out/Counter.server.js', + compile(component, {generate: 'server', filename: 'Counter.svelte'}).js.code, +); + +// Runes in a module: fromStore() over the adapter, and a direct createSubscriber binding. +const runes = `import {fromStore, derived, get} from 'svelte/store'; +import {createSubscriber} from 'svelte/reactivity'; +import {flushSync} from 'svelte'; +import {toSvelteStore} from '${SRC}/frameworks/svelte/svelte'; +import {subscribe, getInternal} from '${SRC}/core/core'; +import {snapshot} from '${SRC}/snapshot/snapshot'; + +const listeners = (store) => getInternal(store).syncListeners.size; + +// Ten lines: what a rune-native binding would be. +function classyState(store) { + const track = createSubscriber((update) => subscribe(store, update, {sync: true})); + return { + get current() { + track(); + return snapshot(store); + }, + }; +} + +export async function run(store) { + const viaFromStore = fromStore(toSvelteStore(store)); + const direct = classyState(store); + const log = {fromStore: [], direct: [], derivedCount: [], derivedUser: 0}; + const count = $derived(direct.current.count); + const user = $derived(direct.current.user); + const stop = $effect.root(() => { + $effect(() => { log.fromStore.push(viaFromStore.current.count); }); + $effect(() => { log.direct.push(direct.current.count); }); + $effect(() => { log.derivedCount.push(count); }); + $effect(() => { user; log.derivedUser++; }); + }); + flushSync(); + console.log('mounted: listeners', listeners(store), JSON.stringify(log)); + store.other++; + flushSync(); + store.other++; + flushSync(); + console.log('two unrelated writes:', JSON.stringify(log)); + store.count++; + console.log('read outside an effect straight after a write: fromStore', viaFromStore.current.count, 'direct', direct.current.count); + flushSync(); + console.log('after count++:', JSON.stringify(log)); + stop(); + console.log('effects destroyed, same tick: listeners', listeners(store)); + await new Promise((resolve) => setTimeout(resolve, 0)); + console.log('effects destroyed, next task: listeners', listeners(store)); + // svelte/store helpers accept the adapter's readable. + const doubled = derived(toSvelteStore(store), ($s) => $s.count * 2); + console.log('derived + get:', get(doubled), 'listeners after get:', listeners(store)); +}`; +writeFileSync( + 'svelte-out/runes.svelte.js', + compileModule(runes, {generate: 'client', filename: 'runes.svelte.js'}).js + .code, +); +console.log('built'); +``` + +Output: + +```text +built +``` + +### `svelte-server.mjs` + +Run: `bun svelte-server.mjs` + +```js +// Svelte 5 server rendering with $store. Run: bun svelte-server.mjs +import {render} from 'svelte/server'; +import Counter from './svelte-out/Counter.server.js'; +import { + createClassyStore, + getInternal, +} from '/Users/robertparallax/WebstormProjects/classy-store/packages/classy-store/src/core/core'; + +const store = createClassyStore({count: 0}); +for (let request = 1; request <= 3; request++) { + const {body} = render(Counter, {props: {store}}); + console.log( + `request ${request}: ${body.replace(//g, '')} -> sync listeners: ${getInternal(store).syncListeners.size}`, + ); +} +``` + +Output: + +```text +request 1:

0

-> sync listeners: 0 +request 2:

0

-> sync listeners: 0 +request 3:

0

-> sync listeners: 0 +``` + +### `svelte-client.mjs` + +Run: `bun --conditions browser svelte-client.mjs` + +```js +// Runes over the adapter, on Svelte's client runtime. Run: bun --conditions browser svelte-client.mjs +import {run} from './svelte-out/runes.svelte.js'; +import {createClassyStore} from '/Users/robertparallax/WebstormProjects/classy-store/packages/classy-store/src/core/core'; +await run(createClassyStore({count: 0, other: 0, user: {name: 'Ada'}})); +``` + +Output: + +```text +mounted: listeners 2 {"fromStore":[0],"direct":[0],"derivedCount":[0],"derivedUser":1} +two unrelated writes: {"fromStore":[0,0,0],"direct":[0,0,0],"derivedCount":[0],"derivedUser":1} +read outside an effect straight after a write: fromStore 1 direct 1 +after count++: {"fromStore":[0,0,0,1],"direct":[0,0,0,1],"derivedCount":[0,1],"derivedUser":1} +effects destroyed, same tick: listeners 2 +effects destroyed, next task: listeners 0 +derived + get: 2 listeners after get: 0 +``` + +### `svelte-compile.mjs` + +Run: `bun svelte-compile.mjs (compiled code omitted from the output)` + +```js +// Compile the component from website/content/docs/SVELTE.md with the installed Svelte 5 compiler. +import { + compile, + VERSION, +} from '/Users/robertparallax/WebstormProjects/classy-store/packages/classy-store/node_modules/svelte/src/compiler/index.js'; + +const guide = ` + + +`; +const renamed = guide.replaceAll('state', 'snap'); + +for (const [label, source] of [ + ['guide (variable named state)', guide], + ['renamed to snap', renamed], +]) { + for (const generate of ['client', 'server']) { + try { + const result = compile(source, {generate, filename: 'Counter.svelte'}); + console.log( + label, + generate, + 'OK; warnings:', + result.warnings.map((w) => `${w.code}: ${w.message}`), + ); + if (label.startsWith('renamed')) console.log(result.js.code); + } catch (error) { + console.log(label, generate, 'ERROR', error.code, '-', error.message); + } + } +} +console.log('svelte', VERSION); +``` + +Output: + +```text +guide (variable named state) client OK; warnings: [] +guide (variable named state) server OK; warnings: [] +renamed to snap client OK; warnings: [] +renamed to snap server OK; warnings: [] +svelte 5.57.3 +``` + +### `svelte-compile-runes.mjs` + +Run: `bun svelte-compile-runes.mjs` + +```js +// The guide's component once the user adds a rune (runes mode), as most Svelte 5 components do. +import { + compile, + compileModule, +} from '/Users/robertparallax/WebstormProjects/classy-store/packages/classy-store/node_modules/svelte/src/compiler/index.js'; + +const cases = { + 'state + $props': ` +`, + 'state + $derived': ` +`, + 'state + own $state rune': ` +`, + 'snap + $derived (runes mode)': ` +`, +}; +for (const [label, source] of Object.entries(cases)) { + try { + const result = compile(source, { + generate: 'client', + filename: 'Counter.svelte', + }); + console.log( + label, + '=> OK; warnings:', + result.warnings.map((w) => `${w.code}: ${w.message}`), + ); + } catch (error) { + console.log(label, '=> ERROR', error.code, '-', error.message); + } +} + +// $store syntax in a .svelte.ts module +try { + compileModule( + `import {toSvelteStore} from '@codebelt/classy-store/svelte'; +import {counter} from './counter'; +const snap = toSvelteStore(counter); +export function read() { return $snap.count; }`, + {filename: 'shared.svelte.js'}, + ); + console.log('module with $snap => OK'); +} catch (error) { + console.log('module with $snap => ERROR', error.code, '-', error.message); +} +``` + +Output: + +```text +state + $props => OK; warnings: [] +state + $derived => OK; warnings: [] +state + own $state rune => OK; warnings: [ "store_rune_conflict: It looks like you're using the `$state` rune, but there is a local binding called `state`. Referencing a local variable with a `$` prefix will create a store subscription. Please rename `state` to avoid the ambiguity\nhttps://svelte.dev/e/store_rune_conflict" ] +snap + $derived (runes mode) => OK; warnings: [] +module with $snap => ERROR store_invalid_subscription_module - Cannot reference store value outside a `.svelte` file +https://svelte.dev/e/store_invalid_subscription_module +``` + +### `types-check.ts` + +Run: `node_modules/.bin/tsc --project tsconfig.types.json`. Exit 0, no output: the `@ts-expect-error` lines are errors as expected, and the rest compiles. + +```ts +// Type-level checks. Run: node_modules/.bin/tsc --project tsconfig.types.json +import { + computed, + type MaybeRefOrGetter, + type Ref, + type ShallowRef, + toValue, + unref, + watch, +} from 'vue'; +import {derived, fromStore, get, type Readable} from 'svelte/store'; +import type {Snapshot} from '/Users/robertparallax/WebstormProjects/classy-store/packages/classy-store/src/types'; +import {useClassyStore} from '/Users/robertparallax/WebstormProjects/classy-store/packages/classy-store/src/frameworks/vue/vue'; +import {toSvelteStore} from '/Users/robertparallax/WebstormProjects/classy-store/packages/classy-store/src/frameworks/svelte/svelte'; + +type Counter = {count: number; nested: {label: string}}; +declare const store: Counter; + +// Today: the write compiles. +const today = useClassyStore(store); +today.value = {count: 1, nested: {label: 'x'}}; + +// Candidate A: works on the whole peer range (Ref exists in 3.2.0). +declare const a: Readonly>>; +// @ts-expect-error value is read-only +a.value = {count: 1, nested: {label: 'x'}}; +// Candidate B: Vue's own shape for useTemplateRef(); ShallowRef is not exported by 3.2.0. +declare const b: Readonly>>; +// @ts-expect-error value is read-only +b.value = {count: 1, nested: {label: 'x'}}; + +// A read-only ref is still accepted wherever Vue reads a ref. +const n1: number = unref(a).count; +const n2: number = toValue(b).count; +const asSource: MaybeRefOrGetter> = a; +const asRef: Ref> = b; +watch(a, (value) => void value.count); +watch(b, (value) => void value.count); +const doubled = computed(() => a.value.count * 2); +void [n1, n2, asSource, asRef, doubled]; + +// Svelte: the adapter's own interface is accepted by svelte/store. +const readable: Readable> = toSvelteStore(store); +const viaRunes: {readonly current: Snapshot} = fromStore( + toSvelteStore(store), +); +const count: number = get(derived(toSvelteStore(store), ($s) => $s.count)); +void [readable, viaRunes, count]; +``` + +### `eager-vs-lazy.ts` + +Run: `bun eager-vs-lazy.ts` + +```ts +// Cost of building a snapshot in the listener (what four adapters do) against building it at the read. +// Run: bun eager-vs-lazy.ts +import {effectScope} from 'vue'; +import { + batch, + createClassyStore, +} from '/Users/robertparallax/WebstormProjects/classy-store/packages/classy-store/src/core/core'; +import {useClassyStore} from '/Users/robertparallax/WebstormProjects/classy-store/packages/classy-store/src/frameworks/vue/vue'; +import {useClassyStoreSketch} from './vue-sketch'; + +const ROWS = 2000; +const makeStore = () => + createClassyStore({ + rows: Array.from({length: ROWS}, (_, id) => ({id, done: false})), + }); + +function measure( + label: string, + bind: ( + store: ReturnType, + ) => {value: {rows: readonly {done: boolean}[]}} | undefined, + write: (store: ReturnType) => void, +) { + const times: number[] = []; + for (let round = 0; round < 7; round++) { + const store = makeStore(); + const scope = effectScope(); + const state = scope.run(() => bind(store)); + const start = performance.now(); + write(store); + // One read afterwards, as a render would do. + if (state && !state.value.rows[ROWS - 1].done) throw new Error('stale'); + times.push(performance.now() - start); + scope.stop(); + } + times.sort((a, b) => a - b); + console.log(`${label.padEnd(58)} median ${times[3].toFixed(2)} ms`); +} + +const directWrites = (store: ReturnType) => { + for (const row of store.rows) row.done = true; +}; +const batched = (store: ReturnType) => + batch(() => directWrites(store)); + +measure(`${ROWS} direct writes, no adapter`, () => undefined, directWrites); +measure( + `${ROWS} direct writes, Vue adapter (snapshot per notification)`, + (store) => useClassyStore(store), + directWrites, +); +measure( + `${ROWS} direct writes, sketch (snapshot at the read)`, + (store) => useClassyStoreSketch(store), + directWrites, +); +measure( + `${ROWS} writes inside batch(), Vue adapter`, + (store) => useClassyStore(store), + batched, +); +``` + +Output: + +```text +2000 direct writes, no adapter median 1.12 ms +2000 direct writes, Vue adapter (snapshot per notification) median 632.79 ms +2000 direct writes, sketch (snapshot at the read) median 2.21 ms +2000 writes inside batch(), Vue adapter median 2.02 ms +``` + +### `direct-writes-others.ts` + +Run: `bun direct-writes-others.ts` + +```ts +// The loop of direct writes with the Angular and Svelte adapters attached, and with a bare sync subscriber. +// Run: bun direct-writes-others.ts (Solid needs its client runtime: see solid-direct-writes.ts) +import {Injector, runInInjectionContext} from '@angular/core'; +import { + createClassyStore, + subscribe, +} from '/Users/robertparallax/WebstormProjects/classy-store/packages/classy-store/src/core/core'; +import {snapshot} from '/Users/robertparallax/WebstormProjects/classy-store/packages/classy-store/src/snapshot/snapshot'; +import {injectClassyStore} from '/Users/robertparallax/WebstormProjects/classy-store/packages/classy-store/src/frameworks/angular/angular'; +import {toSvelteStore} from '/Users/robertparallax/WebstormProjects/classy-store/packages/classy-store/src/frameworks/svelte/svelte'; + +const ROWS = 2000; +const makeStore = () => + createClassyStore({ + rows: Array.from({length: ROWS}, (_, id) => ({id, done: false})), + }); +type Store = ReturnType; + +function measure(label: string, attach: (store: Store) => () => void) { + const times: number[] = []; + for (let round = 0; round < 5; round++) { + const store = makeStore(); + const detach = attach(store); + const start = performance.now(); + for (const row of store.rows) row.done = true; + times.push(performance.now() - start); + detach(); + } + times.sort((a, b) => a - b); + console.log(`${label.padEnd(46)} median ${times[2].toFixed(2)} ms`); +} + +measure('no subscriber', () => () => {}); +measure('sync subscriber that does nothing', (store) => + subscribe(store, () => {}, {sync: true}), +); +measure('sync subscriber that calls snapshot()', (store) => + subscribe(store, () => void snapshot(store), {sync: true}), +); +measure('batched subscriber that calls snapshot()', (store) => + subscribe(store, () => void snapshot(store)), +); +measure('Angular adapter', (store) => { + const injector = Injector.create({providers: []}); + runInInjectionContext(injector, () => injectClassyStore(store)); + return () => injector.destroy(); +}); +measure('Svelte adapter, one subscriber', (store) => + toSvelteStore(store).subscribe(() => {}), +); +``` + +Output: + +```text +no subscriber median 2.51 ms +sync subscriber that does nothing median 1.13 ms +sync subscriber that calls snapshot() median 649.47 ms +batched subscriber that calls snapshot() median 1.03 ms +Angular adapter median 626.00 ms +Svelte adapter, one subscriber median 646.90 ms +``` + +### `react-direct-writes.ts` + +Run: `bun react-direct-writes.ts` + +```ts +// The same loop of direct writes with a mounted React consumer. Run: bun react-direct-writes.ts +import {GlobalRegistrator} from '@happy-dom/global-registrator'; +GlobalRegistrator.register(); +(globalThis as {IS_REACT_ACT_ENVIRONMENT?: boolean}).IS_REACT_ACT_ENVIRONMENT = + true; +const {createElement, act} = await import('react'); +const {createRoot} = await import('react-dom/client'); +const {batch, createClassyStore} = await import( + '/Users/robertparallax/WebstormProjects/classy-store/packages/classy-store/src/core/core' +); +const {useClassyStore} = await import( + '/Users/robertparallax/WebstormProjects/classy-store/packages/classy-store/src/frameworks/react/react' +); + +const ROWS = 2000; +const makeStore = () => + createClassyStore({ + rows: Array.from({length: ROWS}, (_, id) => ({id, done: false})), + }); +type Store = ReturnType; + +async function measure( + label: string, + mode: 'selector' | 'auto' | 'none', + write: (store: Store) => void, +) { + const times: number[] = []; + for (let round = 0; round < 5; round++) { + const store = makeStore(); + const host = document.createElement('div'); + const root = createRoot(host); + function View() { + if (mode === 'selector') + return createElement( + 'p', + null, + useClassyStore( + store, + (state) => state.rows.filter((row) => row.done).length, + ), + ); + const state = useClassyStore(store); + return createElement( + 'p', + null, + state.rows.filter((row) => row.done).length, + ); + } + if (mode !== 'none') + await act(async () => root.render(createElement(View))); + const start = performance.now(); + await act(async () => write(store)); + times.push(performance.now() - start); + if (mode !== 'none' && host.textContent !== String(ROWS)) + throw new Error(`stale: ${host.textContent}`); + await act(async () => root.unmount()); + } + times.sort((a, b) => a - b); + console.log(`${label.padEnd(52)} median ${times[2].toFixed(2)} ms`); +} + +const directWrites = (store: Store) => { + for (const row of store.rows) row.done = true; +}; +await measure(`${ROWS} direct writes, no consumer`, 'none', directWrites); +await measure( + `${ROWS} direct writes, selector hook mounted`, + 'selector', + directWrites, +); +await measure( + `${ROWS} direct writes, auto-tracked hook mounted`, + 'auto', + directWrites, +); +await measure( + `${ROWS} writes inside batch(), selector hook mounted`, + 'selector', + (store) => batch(() => directWrites(store)), +); +await GlobalRegistrator.unregister(); +``` + +Output: + +```text +2000 direct writes, no consumer median 1.26 ms +2000 direct writes, selector hook mounted median 763.86 ms +2000 direct writes, auto-tracked hook mounted median 655.26 ms +2000 writes inside batch(), selector hook mounted median 2.63 ms +``` From 04bd91d2331e11b8c2a35adec4916222cd76d51d Mon Sep 17 00:00:00 2001 From: codeBelt Date: Thu, 19 Nov 2026 04:41:45 -0600 Subject: [PATCH 066/169] docs: add the stage 2 reports for Signals and Immer Co-Authored-By: Claude Fable 5.2 --- review/stage-2/immer.md | 2476 +++++++++++++++++++++++++++ review/stage-2/signals.md | 3363 +++++++++++++++++++++++++++++++++++++ 2 files changed, 5839 insertions(+) create mode 100644 review/stage-2/immer.md create mode 100644 review/stage-2/signals.md diff --git a/review/stage-2/immer.md b/review/stage-2/immer.md new file mode 100644 index 00000000..49d47b80 --- /dev/null +++ b/review/stage-2/immer.md @@ -0,0 +1,2476 @@ +# Stage 2: Immer + +Stage 2 of the pre-1.0 review, 2026-11-19. Read-only: nothing in the +repository was changed apart from this file. + +## Library, version and files read + +- **Library:** Immer, `https://github.com/immerjs/immer`. +- **Version:** 11.2.10, the latest stable tag and the npm `latest` tag on + 2026-11-18. +- **Commit:** `16589b9c437a28433ceaf4072d5ab125287cd46a` (2026-11-10), tag + `v11.2.10`, cloned into the scratch folder and read there. npm's `gitHead` + for `immer@11.2.10` is the same commit. +- **Files read**, under `src/`: `core/proxy.ts`, `core/finalize.ts`, + `core/immerClass.ts`, `core/scope.ts`, `core/current.ts`, `utils/common.ts`, + `utils/errors.ts`, `utils/env.ts` and `plugins/mapset.ts` whole; + `types/types-external.ts` lines 1 to 110. +- **Ours:** `snapshot/snapshot.ts`, `utils/internal/internal.ts`, + `utils/cloneSnapshot/cloneSnapshot.ts`, `types.ts`, and in `core/core.ts` + `isImmutableValue`, `linkChild` and the proxy handler (lines 330 to 525). +- **Ported tests** ran on Bun 1.4.4 and, where marked, Node 24.21.0, against + `immer@11.2.10` from npm (its development build) and our source imported by + absolute path. For Node, our source was bundled with `bun build` into the + scratch folder first. Type-level port checked with TypeScript 7.0.2. + +Line numbers for Immer refer to that commit. Line numbers for ours refer to +`release/1.0` at `12fe57d`. Machine: Apple M1 Max, not otherwise quiet, so +timings are best-of-seven and good to about 20 per cent. + +## Summary + +Immer and our snapshot layer solve the same problem from opposite ends. Immer +copies on write: a draft proxy makes a shallow copy of each object the first +time it is written, and `finalize` swaps finished copies into their parents. +We copy on read: the live store is mutated in place, and `snapshot()` rebuilds +every node whose version changed. Both end with a frozen tree in which +unchanged subtrees keep their identity. On the ports, the two agree on which +objects are new and which are kept: after one of 1,000 rows changes, the root, +the array and the row are new, and the other 999 rows and every other branch +keep their identity. + +The findings that matter most: + +1. **The cost of a snapshot after one row changed (finding 1).** Immer is no + cheaper as long as it freezes: its deep freeze visits every element of + every new array, which costs as much as our rebuild (66 against 56 + microseconds for 1,000 rows on Node; 138 against 119 on Bun). The floor is + set by the engine. On Bun, freezing a new 1,000-element array costs about + 96 microseconds on its own, so nothing that returns a frozen array can be + much faster. On Node, freezing is nearly free and 90 per cent of our cost is + the per-element cache lookup; a rebuild that copies the previous snapshot + array and recomputes only the changed indices measured 6 microseconds, nine + times faster. +2. **Immer's proxies have a decoy target (finding 2).** A draft's Proxy target + is Immer's own state object, not the user's object, so the user's object can + be frozen, sealed or hold non-configurable properties without any Proxy + invariant applying. Ours targets the raw object, which is the root of stage + 1 findings 46 and 49 and of the read-only special case in `linkChild`. +3. **Immer refuses what it cannot represent, with a numbered error (findings 3, + 4 and 5).** `Object.defineProperty`, `Object.setPrototypeOf` (which also + blocks `__proto__` through `Object.assign`), and a named property written + to an array all throw in development. In each case we accept the operation + and then disagree with ourselves: the store and its snapshot diverge, or no + subscriber is told. + +Where Immer is weaker, the port shows it plainly: it flattens an own getter to +a value at the time of the copy, so the result reports a stale `double` (2 for +`n = 5`); it drops non-enumerable properties by default and leaves symbol-keyed +and non-enumerable objects unfrozen; it freezes the caller's own objects in +place; and a base that refers to itself produces a result whose `self` points +to the old base. Our behaviour is the one to keep in each case ("Where ours is +better"). + +## How the two designs differ + +- **Immer copies on write.** `createProxyProxy` (`core/proxy.ts:57-105`) makes + a revocable Proxy whose target is a state record holding `base_` (the + user's object) and `copy_` (null until the first write). The `get` trap + (`proxy.ts:111-162`) reads `latest(state)`, which is `copy_ ?? base_`, and + creates a child draft lazily, only for an object that is still the base's + own value at that key. The `set` trap (`proxy.ts:169-218`) returns early when + the value is unchanged, otherwise calls `prepareCopy` (`proxy.ts:356-366`), + which makes one shallow copy, and `markChanged` (`proxy.ts:347-354`), which + marks every ancestor modified. An unmodified draft finalizes to its base + (`core/finalize.ts:78-81`), which is the whole of Immer's structural sharing: + what was never written is never copied. +- **We copy on read.** The store proxy targets the raw object + (`core/core.ts:405`). A write bumps versions up to the root. `snapshot()` + (`snapshot/snapshot.ts:235-288`) returns the cached frozen object when the + version matches (`:241-244`) and otherwise rebuilds the node: an array by + visiting every element (`:255-261`, through `mapOwnArrayElements`, + `utils/internal/internal.ts:18-40`), an object by visiting every own key + (`:264-275`). Each child's own cache answers in O(1), so unchanged subtrees + are shared, but every element of a changed array is visited. +- **Freezing.** Immer freezes the finished result deeply once per `produce` + (`finalize.ts:100-105`, called at `:54`), with `freeze(value, true)` + (`utils/common.ts:266-289`). The walk stops at anything already frozen + (`common.ts:268`), visits only enumerable string keys (`common.ts:278-287`, + citing Immer issue 590), and freezes in place whatever it reaches, including + objects that came from the caller. Freezing can be turned off + (`setAutoFreeze`, `core/immerClass.ts:48`, `:175-181`). We freeze each + snapshot node we build (`snapshot.ts:282`) and never freeze the caller's + objects. + +## Findings + +### 1. The cost of a new snapshot after one row changed + +- **What they do.** `produce` copies only written objects (`prepareCopy`, + `proxy.ts:356-366`; an array is copied with `slice`, `common.ts:220`). Then + `maybeFreeze` deep-freezes the result (`finalize.ts:100-105`), and + `freeze(value, true)` calls itself on every element of every array it + reaches (`common.ts:281-287`), each call ending at `isFrozen` for an + unchanged row. +- **What we do.** `createSnapshotRecursive` (`snapshot.ts:255-261`) visits + every element of a changed array; for each object element `snapshotValue` + (`:183-193`) looks the child up in `childInternals` by `String(index)`, then + `snapshotCache` by target, then compares versions. Then it freezes the new + array (`:282`). +- **Difference in behaviour.** Measured, ports 1 and 1d: + + | 1,000 rows, write one, take the next result | Node 24 | Bun 1.4.4 | + | ------------------------------------------- | ------------ | -------------- | + | Immer, auto-freeze (default) | 66.3 µs | 138.5 µs | + | Immer, no freeze | 1.2 µs | 1.6 µs | + | By hand: `slice`, replace one row, freeze | 25.7 µs | 97.6 µs | + | Copy previous frozen array by index, freeze | 6.0 µs | 96.2 µs | + | The same without freezing the array | 6.3 µs | 2.3 µs | + | Ours | 55.7–56.3 µs | 118.5–120.2 µs | + | Ours, cached snapshot (nothing changed) | 39 ns | 22 ns | + | Immer, recipe that only reads one row | 26.2 µs | 16.7 µs | + + At 10,000 rows every figure except the cached snapshot grows about ten + times on Node and fifteen to twenty times on Bun, where freezing a larger + array costs more per element (port 1b), so all of them are at least in + proportion to the number of rows. Three things follow. First, Immer with freezing on + costs the same as we do, so stage 1 finding 2 is not a defect of our design + against Immer's. Second, on Bun `Object.freeze` of a new 1,000-element array + costs about 94 microseconds by itself (row 4 against row 5): that is 80 per + cent of our cost and cannot be removed while snapshots are frozen arrays. + Third, on Node freezing is nearly free and our per-element lookup is about + 50 of the 56 microseconds. On V8, `slice` of a frozen array is slow (about + 27 nanoseconds per element, port 1b), and copying it by index is not (5). + Immer's "reads one row" case costs 16 to 26 microseconds because the get + trap calls `prepareCopy` to cache the child draft (`proxy.ts:154-159`), + which copies the array even though nothing is written; the result is still + the base. +- **Proposal: adapt.** Take Immer's idea of knowing which keys changed. When a + child's version bump reaches its parent, record the child's key in a + per-node "changed since the last snapshot" set. When that set is small, + rebuild an array snapshot by copying the previous snapshot array by index and + recomputing only the recorded indices; fall back to today's walk when the + set is large, when the array's length changed, or when there is no previous + snapshot. Expected effect on Node: 56 to about 6 microseconds for 1,000 + rows. On Bun the gain is small because freezing dominates. Do not adopt an + off switch for freezing: frozen snapshots are part of the contract + (`CLAUDE.md`, "frozen objects are values"), and Immer's own numbers show + freezing is the price of that contract on JavaScriptCore. +- **Kind:** performance. +- **Cost:** `snapshot.ts` and the version propagation in `core.ts` or + `ownership.ts`. Not breaking. Moderate risk: the dirty set must be cleared + exactly when a snapshot is cached and must survive detach and resume; the + invariant and fuzz tests from stage 1 cover the result. The 6 microseconds + is the floor measured by port 1d, not a measured implementation. + +### 2. A decoy Proxy target keeps the user's object out of Proxy invariants + +- **What they do.** `createProxyProxy` uses the state record as the Proxy + target (`proxy.ts:88-99`; an array draft's target is `[state]` so that + `Array.isArray` stays true). Every trap reads from `latest(state)`. Because + the target never has the user's properties, a frozen base, a sealed base, or + a non-writable non-configurable property places no constraint on what a trap + may return. `getOwnPropertyDescriptor` (`proxy.ts:236-246`) reports every + property as writable and configurable. A frozen base is drafted and copied + like any other (`shallowCopy` turns non-writable into writable, + `common.ts:232-235`). +- **What we do.** The store proxy targets the raw object (`core.ts:405`). The + engine therefore checks every `get` result against the raw object's + descriptor. `linkChild` must leave a read-only property's object unproxied + (`core.ts:369-374`, `isReadOnly` at `:345-347`), and freezing the raw object + behind the store's back makes a read throw. +- **Difference in behaviour.** Port 2. A base frozen during the recipe and then + written through the draft gives a new result in Immer; ours throws on read + (stage 1 finding 46): + + ```text + immer: base frozen during the recipe, then written through the draft: 2 + ours: read after the raw object was frozen: THROWS TypeError: Proxy handler's 'get' result of a non-configurable and non-writable property should be the same value as the target's property + ``` + + For a non-writable, non-configurable property holding an object, Immer + writes inside it through a draft and leaves the base untouched; ours writes + the shared raw object, notifies nobody, changes a snapshot already taken, + and the snapshot's copy of it is not frozen (stage 1 finding 49). + + The decoy has a cost Immer pays too: `Object.freeze(draft)` throws an engine + error about a property `parent_` of Immer's state record, which means + nothing to the caller (port 2, last section). +- **Proposal: adapt, as a stage 3 design question, not a 1.0 blocker.** A decoy + target would remove findings 46 and 49 (second half), and the read-only + special case in `linkChild`. It also forces the proxy to answer every + operation itself: `has`, `ownKeys`, `getOwnPropertyDescriptor`, + `getPrototypeOf`, `defineProperty`, `preventExtensions`, `isExtensible`, + which overlaps with stage 1 findings 1, 30, 45 and 50 and with the Vue + report's finding on `has` and `ownKeys`. `Object.freeze(store)` and a frozen + store root, which work today, would need explicit support. The smaller + alternative is to document that the raw object must not be frozen or + redefined once a store holds it. +- **Kind:** bug (46, 49), simplification. +- **Cost:** `core.ts` proxy handler; every trap. Not breaking for ordinary use; + breaking for code that relies on `Object.isFrozen(store)` after freezing the + raw object. High risk; a design change. + +### 3. `defineProperty` and `setPrototypeOf` are refused with a clear error + +- **What they do.** The `defineProperty` trap throws error 11, "Object.defineProperty() cannot be used on an Immer draft" + (`proxy.ts:247-249`, text in `utils/errors.ts`). The `setPrototypeOf` trap + throws error 12 (`proxy.ts:253-255`). Because `Object.assign` with an own + `__proto__` key calls the `[[Set]]` of `__proto__`, which calls + `setPrototypeOf`, the same trap also blocks that prototype swap. +- **What we do.** The `defineProperty` trap (`core.ts:502-513`) applies any + definition to the raw object and only handles the case that makes a + property read-only. There is no `setPrototypeOf` trap. +- **Difference in behaviour.** Port 5: + + ```text + immer: on a draft: THROWS Error: [Immer] Object.defineProperty() cannot be used on an Immer draft + ours: store reads: 2 + ours: subscriber calls: 0 + ours: snapshot has the property: false + immer: Object.assign(draft, JSON.parse('{"__proto__": ...}')): THROWS Error: [Immer] Object.setPrototypeOf() cannot be used on an Immer draft + ours: Object.assign(store, JSON.parse('{"__proto__": ...}')): [true, true] + ``` + +- **Proposal: adopt, with one exception.** `Object.freeze(store)` reaches the + `defineProperty` trap once per property with a descriptor that has no + `value`, `get` or `set` (only `writable: false` and `configurable: false`), + so that call can keep today's behaviour and every definition that carries a + `value`, `get` or `set` can throw. Add a `setPrototypeOf` trap that throws. + Both close stage 1 findings 1, 45, 47 (the prototype half), 48 and 71 with + an error instead of a silent disagreement. The security agent's report on + `persist` should say whether stored JSON can reach the `__proto__` path; the + trap closes it either way. +- **Kind:** diagnostics, bug. +- **Cost:** `core.ts`, two traps. Breaking for code that defines properties on + a store, which today half-works. Low risk. + +### 4. Arrays carry indices and `length` only + +- **What they do.** In development, writing a property of an array draft that + is neither an index nor `length` throws error 14, and deleting one throws + error 13 (`proxy.ts:274-288`). Copies are made with `slice` + (`common.ts:220`), which keeps only the elements, so a named or symbol-keyed + property of the base array is gone from any result in which the array + changed. +- **What we do.** A named or symbol-keyed property of an array is reactive on + the store and missing from its snapshot, because `mapOwnArrayElements` + copies only indices (`internal.ts:18-40`, used at `snapshot.ts:257`). Stage 1 + finding 49. +- **Difference in behaviour.** Port 4: Immer throws on the write + (`Immer only supports setting array indices and the 'length' property`) and + drops the property after a `push`; ours accepts the write, the store reads + `"y"` and the snapshot reads `undefined`. A symbol write on an Immer array + draft fails with an unrelated `TypeError` from `parseInt`, so Immer's check + is not complete either. +- **Proposal: adopt the rule, as a development error.** Carrying named + properties into array snapshots would cost a `Reflect.ownKeys` of the whole + array on every rebuild, which is the cost finding 1 tries to remove. Rejecting + the write in development, as Immer does, makes the limit visible for nothing + at run time in production. Document it in either case. +- **Kind:** diagnostics, docs. +- **Cost:** `core.ts` `set` and `deleteProperty` traps, behind the + development check the diagnostics work (API question 8) introduces. Breaking + only for code that relies on a value nobody can see in a snapshot. Low risk. + +### 5. A delete that removes nothing is not a change + +- **What they do.** `deleteProperty` (`proxy.ts:219-233`) marks the draft + changed only when the key exists on the base; otherwise it forgets any + pending assignment and leaves the draft unmodified, so `produce` returns the + base. +- **What we do.** `deleteProperty` (`core.ts:515-524`) notifies whenever + `Reflect.deleteProperty` returns `true`, which it also does for a key that + is not there. Stage 1 finding 29. +- **Difference in behaviour.** Port 5: `produce(base, d => { delete d.missing })` + returns `base`; ours calls the subscriber once and replaces the snapshot with + an equal one. +- **Proposal: adopt.** Return `true` without notifying when + `!Object.hasOwn(_target, prop)`. An inherited property cannot be deleted + through the object either, so the same test covers it. +- **Kind:** bug. +- **Cost:** `core.ts`, one line. Not breaking. Low risk. + +### 6. A plain object from another realm is opaque to us + +- **What they do.** `isPlainObject` (`common.ts:61-78`) accepts a null + prototype, `Object.prototype`, a prototype whose own `constructor` is + `Object`, and otherwise compares `Function.prototype.toString` of the + prototype's constructor with that of `Object`, cached per constructor in a + `WeakMap` (`:59`, `:71-75`). An object made in an iframe or a Node `vm` + context therefore counts as plain. +- **What we do.** `isPlainObject` (`internal.ts:54-60`) accepts only a null + prototype or this realm's `Object.prototype`. `canProxy` (`:70-82`) + therefore treats a foreign plain object as an opaque value. Foreign arrays + pass, because `Array.isArray` works across realms. +- **Difference in behaviour.** Port 9 (Node and Bun, same output). Immer drafts + and copies the foreign object. Ours hands out the raw object, a write inside + it notifies nobody and changes a snapshot already taken. In a foreign array, + a `push` notifies but a write to a foreign row does not. +- **Proposal: adopt.** The case is real for data from an iframe, a worker + library that builds objects in a `vm` context, or a test runner with its own + realm, and the failure is silent. Immer's per-constructor cache keeps the + check cheap; the extra work happens only when the prototype is not this + realm's. +- **Kind:** bug. +- **Cost:** `internal.ts`, about ten lines. It changes the result of `canProxy` + for such objects, which `persist` and `history` also use, in the direction + of treating them as data. Low risk. + +### 7. Frozen means frozen to the bottom, or the store cannot see inside + +- **What they do.** `finalize` returns a frozen value untouched + (`finalize.ts:65`); `handleValue` skips it (`:286-294`); `freeze` stops at it + (`common.ts:268`). But a frozen base can still be drafted, so a write below a + frozen object in a recipe produces a new result and leaves the base alone. +- **What we do.** `isImmutableValue` (`core.ts:337-342`) treats any frozen + object as a value and `linkChild` (`core.ts:368`) leaves it unproxied, as + `CLAUDE.md` says. +- **Difference in behaviour.** Port 2: for `{config: Object.freeze({inner})}` + with `inner` not frozen, Immer gives a new result for + `draft.config.inner.n = 2`. Ours lets the write through to the raw `inner`, + calls no subscriber, and the snapshot taken before the write now reads 2: + a snapshot, documented as deeply frozen, changed. Immer has the same hole on + its side: an object below one that was already frozen is not frozen in the + result (`object below an already frozen one is frozen: false`). +- **Proposal: adapt, as documentation.** Say that "frozen objects are values" + means the whole value must be frozen, and that a shallowly frozen object's + mutable contents are shared with every snapshot. A development check that + deep-scans a frozen object on first sight would cost what `isImmutableValue` + caches to avoid; not worth it. +- **Kind:** docs. +- **Cost:** `CLAUDE.md` and the API reference. Not breaking. No risk. + +### 8. Frozen collections in a result throw a named error + +- **What they do.** `freeze` replaces `set`, `add`, `clear` and `delete` on a + frozen `Map` or `Set` with a function that throws error 2, "This object has + been frozen and should not be mutated" (`common.ts:269-276`, `:291-297`). The + types say the same thing: `Immutable` turns `Map` into `ReadonlyMap` and + `Set` into `ReadonlySet` (`types/types-external.ts:78-81`), so `set` does not + compile. The override is an own property, so + `Map.prototype.set.call(result.m, ...)` still writes (port 7). +- **What we do.** A snapshot of a `ReactiveMap` is a frozen instance whose + inherited `set` fails on a frozen backing array with an engine message. The + type keeps `set` (stage 1 finding 16). +- **Difference in behaviour.** Port 7: `snapshot.m.set()` throws + `TypeError: Attempted to assign to readonly property.` on Bun, which does not + name the store, the collection or the cause. Immer's message names the + cause. Ours cannot be bypassed: the frozen backing array refuses every + write. +- **Proposal: adopt the message and the types.** Have the mutators of + `ReactiveMap` and `ReactiveSet` check whether the instance is a snapshot and + throw an error that says so; map `ReactiveMap` to a read-only interface + in `Snapshot`. Keep the frozen backing array, which is sounder than + Immer's override. +- **Kind:** diagnostics, API design. +- **Cost:** `collections.ts`, `types.ts`. Breaking at the type level only for + code that calls a mutator on a snapshot, which already throws. Low risk. + +### 9. Map and Set drafts are subclasses of the native classes + +- **What they do.** With the opt-in plugin (`enableMapSet`, global and + permanent), a `Map` is drafted as a `DraftMap extends Map` + (`plugins/mapset.ts:35`) and a `Set` as a `DraftSet extends Set` (`:215`), + each carrying its state in an own field instead of being wrapped in a Proxy. + The draft passes `instanceof Map`, and the result is a native `Map` or `Set`. + A map copy is `new Map(base)` (`:208-213`), so a changed map costs one + native copy. A set has no keys to address its members by, so the first + read of a draft set's contents drafts every draftable member + (`prepareSetCopy`, `:334-348`), and `has` answers for both a member and its + draft (`:242-253`). Without the plugin, a `Map` nested in the base is + ignored until it is read, and reading it throws error 0, which names the + missing plugin (port 7, `noplugin`). +- **What we do.** `ReactiveMap` and `ReactiveSet` (`collections.ts:50`, `:205`) + are classes of their own, backed by an array, marked `PROXYABLE`. A native + `Map` in a store is opaque. +- **Difference in behaviour.** Port 7. Immer's result map is a native `Map`; + our snapshot of a `reactiveMap` is not `instanceof Map`. Both keep the + unchanged values' identity. Changing one value of a 1,000-entry map and + taking the next result: Immer 21 µs, ours 127 µs (Bun only; our collections + entry was not bundled for Node). A native `Map` in our store takes a write + to a value and a `set()` with no notification, and a snapshot taken earlier + reads both. +- **Proposal: no change for 1.0, input to API question 5.** Immer's subclass + approach works because a draft lives for one recipe and the result is a + fresh native copy. A store lives for the application's lifetime, and a + frozen native `Map` is still writable through `Map.prototype.set`, so our + snapshots could not be native maps without losing immutability. Making + `ReactiveMap` extend `Map`, so that `instanceof Map` is true on the store, + is possible but needs every inherited method overridden. The 6 times speed + difference comes from our array-backed snapshot visiting every entry + (finding 1 applies). +- **Kind:** API design, performance. +- **Cost:** none proposed. + +### 10. Tuples survive Immer's types + +- **What they do.** `Immutable` (`types/types-external.ts:74-86`) has no + array branch: everything that is not a leaf, `Map` or `Set` goes through one + homomorphic mapped type (`:85`), which keeps tuples and their element + positions. `WritableDraft` (`:31-37`) singles out plain arrays only to make + them mutable. `produce` returns the base type. +- **What we do.** `Snapshot` (`types.ts:38-44`) has an array branch, + `T extends Array ? ReadonlyArray>`, which turns a tuple + into an array of the union of its element types. Stage 1 finding 14. +- **Difference in behaviour.** Port 8 (type level, passes with TypeScript + 7.0.2). `Immutable<[string, number]>` is `readonly [string, number]`; ours is + `readonly (string | number)[]`. A copy of our type with the array branch + removed (`Snapshot2` in the port) gives `readonly [string, number]` for the + tuple and the same `readonly {readonly id: number}[]` as today for an array. +- **Proposal: adopt.** Remove the array branch; the mapped type handles arrays, + read-only arrays and tuples. +- **Kind:** API design. +- **Cost:** `types.ts`, one branch. Not breaking for arrays; a tuple's snapshot + type becomes more precise, which can break code that relied on the union. + The type tests from stage 1 pin the current type. Low risk. + +### 11. A cycle is neither detected nor resolved by Immer + +- **What they do.** Nothing detects cycles: error 5, "Immer forbids circular + references", is still in `utils/errors.ts` but nothing in `src/` raises it. + A draft assigned into itself is resolved by the finalization callbacks + (`finalize.ts:217-237`), so the result refers to itself. A base that already + refers to itself is copied once; the copy's `self` still points to the old + base. +- **What we do.** `createSnapshotRecursive` throws "circular reference detected + in snapshot" when it meets a target already in progress (`snapshot.ts:246-250`). + Stage 1 finding 8: the write that creates the cycle succeeds and notifies. +- **Difference in behaviour.** Port 6. Immer: `next.self === base` after + `draft.n = 2` on a self-referencing base, so `next.self.n` is the old value, + silently. Ours: the snapshot throws. +- **Proposal: reject Immer's behaviour.** A silent stale reference is worse + than our error. If cycles are to be supported, our snapshot could register + the new snapshot object before visiting its children and return it when the + cycle comes back, freezing it last; that is reasoning from reading, not + tried. Otherwise the error should be raised at the write that creates the + cycle, in development, so it points at the cause. +- **Kind:** bug, diagnostics. +- **Cost:** `snapshot.ts`, and the snapshot cache for a node that is its own + ancestor. Moderate risk. + +## Where ours is better + +Each is measured in the ports. + +- **Own getters.** Immer's copy reads an own accessor once and stores its value + (`common.ts:239-245` in strict mode; the default copy is an object spread, + which does the same, `common.ts:251-253`). In port 4, after `draft.n = 5`, + the result's `double` is 2, and so is `draft.double` inside the recipe. Our + snapshot keeps it as a memoized accessor and answers 10. +- **Symbols and non-enumerable properties.** Immer's default copy drops + non-enumerable properties, and its deep freeze skips them and symbol keys, + so in port 4 an object under a symbol is mutable after `produce`. Ours keeps + both and freezes both. +- **The caller's objects.** Immer freezes in place every object it reaches in + the result, including untouched branches of the base and objects assigned in + the recipe (port 2: `untouched branch of the base, frozen in place: true`). + We copy and never freeze the caller's objects. +- **Class instances.** Immer refuses a class instance without `immerable` at + the root (error 1) and leaves one nested in the base unfrozen and writable, + so a write in a recipe changes the base (port 3), exactly as our snapshot + shares an unmarked instance. Our root may be any class instance, which is + the library's purpose. Immer finds its marker through `value[DRAFTABLE]` or + `value.constructor[DRAFTABLE]` (`common.ts:51-52`), which reads the instance, + so an own field named `constructor` can change the answer; `canProxy` reads + the constructor from the prototype on purpose (`internal.ts:73-78`). + Neither library supports `#private` fields on a proxied or copied instance. + +## Stage 1 findings with a counterpart + +| Stage 1 | What Immer does there | +| ------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | +| 1 | `Object.defineProperty` on a draft throws error 11 (finding 3). | +| 2 | Same cost in proportion to the rows while auto-freeze is on; 1.2 µs with it off (finding 1). | +| 8 | No detection; a self-referencing base yields a result that points to the old base (finding 11). | +| 12 | A draft `Set` answers `has` for both a member and its draft (`mapset.ts:242-253`); the result holds the new copy, not the original. | +| 14 | `Immutable` keeps tuples (finding 10). | +| 15 | No counterpart: a draft's state is behind a symbol on a subclass field, not in the public type. | +| 16 | `Immutable` gives `ReadonlyMap` and `ReadonlySet`; frozen collections throw error 2 (finding 8). | +| 25 | No counterpart: there is no long-lived store, each `produce` starts from the base it is given. | +| 29 | A delete of a missing key leaves the result equal to the base (finding 5). | +| 30 | `has` and `ownKeys` read the latest copy, so `Object.keys(draft)` and `in` are right after a delete (port 5). | +| 31 | Prototype getters run with the result or the draft as `this`, so they see its keys (port 5: `[1, 1]`; ours `[2, 2, 0]`). | +| 40 | Prototype getters are not memoized: each read runs again on frozen data, so nothing is shared between results. | +| 45, 71 | `defineProperty` refused (finding 3). | +| 46 | Not possible: the Proxy target is a decoy (finding 2). | +| 47, 48 | `setPrototypeOf` refused, which also blocks `__proto__` through `Object.assign` (finding 3). | +| 49 | Named array properties refused in development and dropped from copies (finding 4); read-only properties made writable in the copy (finding 2). | +| 50 | The same: `getOwnPropertyDescriptor(draft, key).value` is the base object, and a write through it changes the base (port 5). | +| 70 | Results keep the input's key order; prototype getters stay on the prototype and own getters become data in place. | + +## The API questions + +1. Synchronous notification by default: no position (Immer has no + subscriptions). +2. Writes outside a store method and `batch()`: no position. A recipe is + Immer's only unit of change, which is the closest it comes to a + transaction. +3. **Should snapshot getters stay enumerable own accessors?** Immer's results + have no own accessors: a prototype getter stays on the prototype and runs + on each read, unmemoized (port 3: own keys of a class result are `["n"]`), + and an own getter on a plain object is turned into a data property at copy + time, which makes it stale (port 4). Immer's view is that a result is data + and computed values live on the class. That favours installing memoized + getters where the class has them, on a prototype, and keeping only data as + own enumerable keys, so `Object.keys(snapshot)` and spreading give data. + One way, from reading only: one derived prototype per class, created once + and cached, inheriting from the class's prototype, whose accessors look up + the per-snapshot cache. `instanceof` and `constructor` keep working, and + the per-snapshot `installMemoizedGetters` walk (`snapshot.ts:196-221`) goes + away. `Object.getPrototypeOf(snapshot) === Class.prototype` would become + false. +4. Arrow-function methods and `#private` fields: no position. Port 3 shows + that `#private` fails on Immer drafts and copies too. +5. **Should native `Map` and `Set` be reactive directly?** Immer drafts native + `Map` and `Set` directly, by substituting a subclass instance that carries + its own state, behind an opt-in plugin. That works because the draft is + thrown away after one recipe and the result is a native copy (finding 9). + For a store, which keeps its object and must hand out immutable snapshots, + the result side does not carry over: a frozen native `Map` can still be + written through `Map.prototype.set`. Immer therefore supports keeping + `reactiveMap` and `reactiveSet` as the snapshot representation, while + showing that the live side can be a subclass of the native class. +6. **Opt-in or opt-out for nested class instances?** Opt-in. Immer drafts only + plain objects, arrays, `Map`, `Set` and classes marked with `immerable`, + either as a static or as an instance field (`common.ts:46-56`). An unmarked + instance is a value: Immer neither copies nor freezes it. That is the same + default as `PROXYABLE`. +7. Entry points and adapter names: no position. +8. **Development diagnostics.** Immer's pattern is a numbered error table that + exists only in the development build (`utils/errors.ts`, guarded by + `process.env.NODE_ENV`), with production throwing the bare number and a + link. Its errors cover the operations it cannot represent: findings 3 and 4 + above, revoked drafts, a recipe that both returns and modifies, and a + missing plugin that is named in the message. + +## Verified by running, and only read + +**Verified by running code** (ports below): identity after a one-row write; +all timings; frozen input, nested frozen objects, freezing the raw object, a +read-only property holding an object; what auto-freeze freezes; class instances +with and without the marker, subclasses, `#private`; own getters, symbols, +non-enumerable properties, named array properties, sparse arrays; +`defineProperty`, `setPrototypeOf`, `__proto__` through `Object.assign`; a +delete of a missing key; keys and `in` after a delete; descriptor values; +revoked drafts; cycles; `Map` and `Set` drafts with and without the plugin; +another realm; the tuple types. + +**Only read:** that error 5 is never raised (a search of `src/`); the reason +reading one row through a draft costs as much as a write (`proxy.ts:154-159`); +the dirty-key rebuild in finding 1 beyond its measured floor; the derived +prototype in question 3; supporting cycles in our snapshot (finding 11). +`plugins/patches.ts` and the array-methods plugin were not read. + +## Appendix: ported tests + +Each port is a file in the scratch folder `stage-2-immer/ports/`, with the +shared helpers in `harness.mjs` (`show` prints a value or the error thrown; +`time` returns the best of seven rounds in nanoseconds per call). `.ts` ports +ran with `bun `; `.mjs` ports ran with both `node` and `bun` against a +bundle of our source. + +### Shared helpers + +`harness.mjs`: + +```js +// Shared helpers for the ported tests. +export function section(title) { + console.log(`\n## ${title}`); +} + +/** Print the value of an expression, or the error it throws. */ +export function show(label, run) { + try { + const value = run(); + console.log(`${label}: ${format(value)}`); + } catch (error) { + console.log( + `${label}: THROWS ${error?.constructor?.name}: ${error?.message}`, + ); + } +} + +function format(value) { + if (typeof value === 'string') return JSON.stringify(value); + if (typeof value === 'symbol') return value.toString(); + if (Array.isArray(value)) return `[${value.map(format).join(', ')}]`; + if (value && typeof value === 'object') { + try { + return JSON.stringify(value); + } catch { + return String(value); + } + } + return String(value); +} + +/** Best of `rounds`, in nanoseconds per call. */ +export function time(run, {rounds = 7, sampleMs = 60} = {}) { + // Warm up. + let iterations = 1; + for (;;) { + const start = performance.now(); + for (let index = 0; index < iterations; index++) run(index); + const elapsed = performance.now() - start; + if (elapsed >= sampleMs) break; + iterations *= 2; + } + let best = Number.POSITIVE_INFINITY; + let counter = iterations; + for (let round = 0; round < rounds; round++) { + const start = performance.now(); + for (let index = 0; index < iterations; index++) run(counter++); + const elapsed = performance.now() - start; + best = Math.min(best, (elapsed * 1e6) / iterations); + } + return best; +} + +export function ns(value) { + if (value >= 1e6) return `${(value / 1e6).toFixed(2)} ms`; + if (value >= 1e3) return `${(value / 1e3).toFixed(2)} us`; + return `${value.toFixed(1)} ns`; +} +``` + +### Port 1: one of 1,000 rows, identity and time + +`p1-rows.mjs`: + +```js +// Port 1: change one of N rows, time the next result, and see which objects +// keep their identity. Runs on Bun and on Node. +import {Immer, produce} from 'immer'; +import {createClassyStore, snapshot} from './classy.mjs'; +import {ns, section, show, time} from './harness.mjs'; + +const makeRows = (count) => + Array.from({length: count}, (_, index) => ({ + id: index, + value: index, + done: false, + })); +const makeState = (count) => ({ + count: 0, + label: 'a', + nested: {deep: {value: 0}}, + rows: makeRows(count), +}); + +section('identity after one row is written (1,000 rows)'); +{ + const base = makeState(1000); + const next = produce(base, (draft) => { + draft.rows[500].value = -1; + }); + let kept = 0; + for (let index = 0; index < 1000; index++) { + if (next.rows[index] === base.rows[index]) kept++; + } + show('immer: root is new', () => next !== base); + show('immer: rows array is new', () => next.rows !== base.rows); + show('immer: rows that kept identity', () => kept); + show('immer: nested kept identity', () => next.nested === base.nested); + show('immer: base row untouched', () => base.rows[500].value); + show( + 'immer: no write gives the base back', + () => produce(next, () => {}) === next, + ); + show( + 'immer: writing the value a field holds gives the base back', + () => + produce(next, (draft) => { + draft.count = 0; + }) === next, + ); + show( + 'immer: a read of one row gives the base back', + () => + produce(next, (draft) => { + void draft.rows[3].value; + }) === next, + ); + show( + 'immer: write then write back gives the base back', + () => + produce(next, (draft) => { + draft.count = 1; + draft.count = 0; + }) === next, + ); + + const store = createClassyStore(makeState(1000)); + const before = snapshot(store); + store.rows[500].value = -1; + const after = snapshot(store); + kept = 0; + for (let index = 0; index < 1000; index++) { + if (after.rows[index] === before.rows[index]) kept++; + } + show('ours: root is new', () => after !== before); + show('ours: rows array is new', () => after.rows !== before.rows); + show('ours: rows that kept identity', () => kept); + show('ours: nested kept identity', () => after.nested === before.nested); + show('ours: write then write back gives the same snapshot', () => { + const one = snapshot(store); + store.count = 1; + store.count = 0; + return snapshot(store) === one; + }); +} + +section('time to write one row and get the next immutable result'); +// Every timed write is a real change: `tick` is a value no row has held. +let tick = 0; +const frozen = new Immer({autoFreeze: true}); +const unfrozen = new Immer({autoFreeze: false}); +for (const count of [100, 1000, 10000]) { + const report = (label, value) => + console.log( + `${count} rows | ${label}: ${ns(value)} (${(value / count).toFixed(1)} ns/row)`, + ); + + let state = frozen.produce(makeState(count), () => {}); + report( + 'immer, auto-freeze', + time((index) => { + state = frozen.produce(state, (draft) => { + draft.rows[index % count].value = --tick; + }); + }), + ); + + let loose = makeState(count); + report( + 'immer, no freeze', + time((index) => { + loose = unfrozen.produce(loose, (draft) => { + draft.rows[index % count].value = --tick; + }); + }), + ); + + // The floor: copy by hand what has to change, freeze the three new objects. + let manual = makeState(count); + report( + 'by hand, frozen', + time((index) => { + const rows = manual.rows.slice(); + const at = index % count; + rows[at] = Object.freeze({...rows[at], value: --tick}); + manual = Object.freeze({...manual, rows: Object.freeze(rows)}); + }), + ); + + let bare = makeState(count); + report( + 'by hand, not frozen', + time((index) => { + const rows = bare.rows.slice(); + const at = index % count; + rows[at] = {...rows[at], value: --tick}; + bare = {...bare, rows}; + }), + ); + + const store = createClassyStore(makeState(count)); + snapshot(store); + let sum = 0; + report( + 'ours', + time((index) => { + store.rows[index % count].value = --tick; + sum += snapshot(store).rows.length; + }), + ); + if (sum < 0) console.log(sum); +} + +section('time for a result nothing changed in (1,000 rows)'); +{ + const state = frozen.produce(makeState(1000), () => {}); + const store = createClassyStore(makeState(1000)); + snapshot(store); + let sum = 0; + console.log( + `immer, empty recipe: ${ns( + time(() => { + sum += frozen.produce(state, () => {}).rows.length; + }), + )}`, + ); + console.log( + `immer, recipe reads one row: ${ns( + time((index) => { + sum += frozen.produce(state, (draft) => { + void draft.rows[index % 1000].value; + }).rows.length; + }), + )}`, + ); + console.log( + `ours, cached snapshot: ${ns( + time(() => { + sum += snapshot(store).rows.length; + }), + )}`, + ); + if (sum < 0) console.log(sum); +} +``` + +Output (Node 24): + +```text + +## identity after one row is written (1,000 rows) +immer: root is new: true +immer: rows array is new: true +immer: rows that kept identity: 999 +immer: nested kept identity: true +immer: base row untouched: 500 +immer: no write gives the base back: true +immer: writing the value a field holds gives the base back: true +immer: a read of one row gives the base back: true +immer: write then write back gives the base back: false +ours: root is new: true +ours: rows array is new: true +ours: rows that kept identity: 999 +ours: nested kept identity: true +ours: write then write back gives the same snapshot: false + +## time to write one row and get the next immutable result +100 rows | immer, auto-freeze: 7.79 us (77.9 ns/row) +100 rows | immer, no freeze: 1.00 us (10.0 ns/row) +100 rows | by hand, frozen: 2.74 us (27.4 ns/row) +100 rows | by hand, not frozen: 48.9 ns (0.5 ns/row) +100 rows | ours: 7.83 us (78.3 ns/row) +1000 rows | immer, auto-freeze: 66.30 us (66.3 ns/row) +1000 rows | immer, no freeze: 1.22 us (1.2 ns/row) +1000 rows | by hand, frozen: 25.65 us (25.7 ns/row) +1000 rows | by hand, not frozen: 253.8 ns (0.3 ns/row) +1000 rows | ours: 55.74 us (55.7 ns/row) +10000 rows | immer, auto-freeze: 631.37 us (63.1 ns/row) +10000 rows | immer, no freeze: 3.84 us (0.4 ns/row) +10000 rows | by hand, frozen: 250.28 us (25.0 ns/row) +10000 rows | by hand, not frozen: 2.83 us (0.3 ns/row) +10000 rows | ours: 529.15 us (52.9 ns/row) + +## time for a result nothing changed in (1,000 rows) +immer, empty recipe: 222.9 ns +immer, recipe reads one row: 26.20 us +ours, cached snapshot: 39.3 ns +``` + +Output (Bun 1.4.4): + +```text + +## identity after one row is written (1,000 rows) +immer: root is new: true +immer: rows array is new: true +immer: rows that kept identity: 999 +immer: nested kept identity: true +immer: base row untouched: 500 +immer: no write gives the base back: true +immer: writing the value a field holds gives the base back: true +immer: a read of one row gives the base back: true +immer: write then write back gives the base back: false +ours: root is new: true +ours: rows array is new: true +ours: rows that kept identity: 999 +ours: nested kept identity: true +ours: write then write back gives the same snapshot: false + +## time to write one row and get the next immutable result +100 rows | immer, auto-freeze: 13.21 us (132.1 ns/row) +100 rows | immer, no freeze: 917.2 ns (9.2 ns/row) +100 rows | by hand, frozen: 8.39 us (83.9 ns/row) +100 rows | by hand, not frozen: 102.7 ns (1.0 ns/row) +100 rows | ours: 12.20 us (122.0 ns/row) +1000 rows | immer, auto-freeze: 138.48 us (138.5 ns/row) +1000 rows | immer, no freeze: 1.60 us (1.6 ns/row) +1000 rows | by hand, frozen: 97.64 us (97.6 ns/row) +1000 rows | by hand, not frozen: 869.2 ns (0.9 ns/row) +1000 rows | ours: 118.54 us (118.5 ns/row) +10000 rows | immer, auto-freeze: 2.30 ms (230.3 ns/row) +10000 rows | immer, no freeze: 6.41 us (0.6 ns/row) +10000 rows | by hand, frozen: 1.96 ms (196.4 ns/row) +10000 rows | by hand, not frozen: 5.99 us (0.6 ns/row) +10000 rows | ours: 2.34 ms (234.1 ns/row) + +## time for a result nothing changed in (1,000 rows) +immer, empty recipe: 247.8 ns +immer, recipe reads one row: 16.72 us +ours, cached snapshot: 22.0 ns +``` + +### Port 1b: what freezing an array costs on each engine + +`p1b-freeze-cost.mjs`: + +```js +// What freezing an array costs on each engine, and what it does to later +// reads and copies. One call per size; no long loops, so a slow case shows. +const sizes = [100, 1000, 10000, 100000]; + +function once(run) { + const start = performance.now(); + const result = run(); + return [(performance.now() - start) * 1e6, result]; +} + +function median(run, repeats = 15) { + const all = []; + for (let index = 0; index < repeats; index++) all.push(once(run)[0]); + all.sort((a, b) => a - b); + return all[repeats >> 1]; +} + +for (const size of sizes) { + const rows = Array.from({length: size}, (_, index) => ({id: index})); + const copy = median(() => rows.slice()); + const freeze = median(() => Object.freeze(rows.slice())); + const frozen = Object.freeze(rows.slice()); + const isFrozen = median(() => Object.isFrozen(frozen)); + const sliceFrozen = median(() => frozen.slice()); + const readPlain = median(() => { + let sum = 0; + for (let index = 0; index < size; index++) sum += rows[index].id; + return sum; + }); + const readFrozen = median(() => { + let sum = 0; + for (let index = 0; index < size; index++) sum += frozen[index].id; + return sum; + }); + const forEachFrozen = median(() => { + let sum = 0; + frozen.forEach((row) => { + sum += row.id; + }); + return sum; + }); + const per = (value) => `${(value / size).toFixed(1)} ns/el`; + console.log( + `${size}: slice ${per(copy)} | slice+freeze ${per(freeze)} | isFrozen(frozen) ${per(isFrozen)}` + + ` | slice of frozen ${per(sliceFrozen)} | indexed read plain ${per(readPlain)} | indexed read frozen ${per(readFrozen)}` + + ` | forEach frozen ${per(forEachFrozen)}`, + ); +} +``` + +Output (Node 24): + +```text +100: slice 3.8 ns/el | slice+freeze 3.3 ns/el | isFrozen(frozen) 2.5 ns/el | slice of frozen 29.6 ns/el | indexed read plain 22.5 ns/el | indexed read frozen 22.1 ns/el | forEach frozen 60.8 ns/el +1000: slice 0.8 ns/el | slice+freeze 1.1 ns/el | isFrozen(frozen) 0.2 ns/el | slice of frozen 27.7 ns/el | indexed read plain 14.0 ns/el | indexed read frozen 5.3 ns/el | forEach frozen 25.9 ns/el +10000: slice 0.2 ns/el | slice+freeze 0.3 ns/el | isFrozen(frozen) 0.0 ns/el | slice of frozen 25.7 ns/el | indexed read plain 1.2 ns/el | indexed read frozen 4.8 ns/el | forEach frozen 25.5 ns/el +100000: slice 0.7 ns/el | slice+freeze 0.6 ns/el | isFrozen(frozen) 0.0 ns/el | slice of frozen 26.3 ns/el | indexed read plain 1.0 ns/el | indexed read frozen 4.7 ns/el | forEach frozen 27.0 ns/el +``` + +Output (Bun 1.4.4): + +```text +100: slice 1.2 ns/el | slice+freeze 84.6 ns/el | isFrozen(frozen) 41.7 ns/el | slice of frozen 14.6 ns/el | indexed read plain 54.6 ns/el | indexed read frozen 65.4 ns/el | forEach frozen 85.0 ns/el +1000: slice 0.3 ns/el | slice+freeze 98.0 ns/el | isFrozen(frozen) 48.3 ns/el | slice of frozen 16.4 ns/el | indexed read plain 7.2 ns/el | indexed read frozen 14.0 ns/el | forEach frozen 23.0 ns/el +10000: slice 0.7 ns/el | slice+freeze 183.6 ns/el | isFrozen(frozen) 130.0 ns/el | slice of frozen 15.2 ns/el | indexed read plain 2.3 ns/el | indexed read frozen 13.2 ns/el | forEach frozen 21.3 ns/el +100000: slice 5.8 ns/el | slice+freeze 223.8 ns/el | isFrozen(frozen) 152.3 ns/el | slice of frozen 16.7 ns/el | indexed read plain 1.3 ns/el | indexed read frozen 16.6 ns/el | forEach frozen 23.8 ns/el +``` + +### Port 1d: the floor for a rebuild that recomputes only changed indices + +`p1d-dirty-copy.mjs`: + +```js +// The floor for a "dirty keys" snapshot of an array: copy the previous frozen +// snapshot array by index, replace the one changed element, freeze the copy. +// Compared with what ours does today on the same array. +import {createClassyStore, snapshot} from './classy.mjs'; +import {ns, time} from './harness.mjs'; + +for (const count of [1000, 10000]) { + const rows = Array.from({length: count}, (_, index) => + Object.freeze({id: index, value: index}), + ); + let prev = Object.freeze(rows.slice()); + let tick = 0; + const copyLoop = time((index) => { + const next = new Array(count); + for (let i = 0; i < count; i++) next[i] = prev[i]; + const at = index % count; + next[at] = Object.freeze({...prev[at], value: --tick}); + prev = Object.freeze(next); + }); + let prev2 = Object.freeze(rows.slice()); + const copyNoFreeze = time((index) => { + const next = new Array(count); + for (let i = 0; i < count; i++) next[i] = prev2[i]; + const at = index % count; + next[at] = Object.freeze({...prev2[at], value: --tick}); + prev2 = next; + }); + const store = createClassyStore({ + rows: Array.from({length: count}, (_, index) => ({ + id: index, + value: index, + })), + }); + snapshot(store); + let sum = 0; + const ours = time((index) => { + store.rows[index % count].value = --tick; + sum += snapshot(store).rows.length; + }); + const per = (v) => `${ns(v)} (${(v / count).toFixed(1)} ns/row)`; + console.log( + `${count} rows | copy by index + freeze: ${per(copyLoop)} | copy by index, array not frozen: ${per(copyNoFreeze)} | ours: ${per(ours)}`, + ); + if (sum < 0) console.log(sum); +} +``` + +Output (Node 24): + +```text +1000 rows | copy by index + freeze: 5.98 us (6.0 ns/row) | copy by index, array not frozen: 6.25 us (6.3 ns/row) | ours: 56.40 us (56.4 ns/row) +10000 rows | copy by index + freeze: 63.53 us (6.4 ns/row) | copy by index, array not frozen: 63.54 us (6.4 ns/row) | ours: 502.57 us (50.3 ns/row) +``` + +Output (Bun 1.4.4): + +```text +1000 rows | copy by index + freeze: 95.33 us (95.3 ns/row) | copy by index, array not frozen: 2.14 us (2.1 ns/row) | ours: 123.02 us (123.0 ns/row) +10000 rows | copy by index + freeze: 1.92 ms (192.3 ns/row) | copy by index, array not frozen: 19.62 us (2.0 ns/row) | ours: 2.15 ms (214.9 ns/row) +``` + +### Port 2: frozen and read-only input + +`p2-frozen.ts`: + +```ts +// Port 2: frozen input, frozen objects nested in input, a read-only property +// that holds an object, and what auto-freeze does to objects Immer did not make. +import {produce} from 'immer'; +import { + createClassyStore, + snapshot, + subscribe, +} from '/Users/robertparallax/WebstormProjects/classy-store/packages/classy-store/src/index.ts'; +import {section, show} from './harness.mjs'; + +section('a frozen object as the input'); +{ + const base = Object.freeze({ + a: Object.freeze({b: 1}), + keep: Object.freeze({n: 1}), + }); + const next = produce(base, (draft) => { + draft.a.b = 2; + }); + show('immer: write through a draft of a frozen base', () => next.a.b); + show('immer: base untouched', () => base.a.b); + show('immer: untouched branch kept', () => next.keep === base.keep); + show( + 'immer: result frozen', + () => Object.isFrozen(next) && Object.isFrozen(next.a), + ); + + const store = createClassyStore(Object.freeze({a: Object.freeze({b: 1})})); + show('ours: read through a frozen root', () => store.a.b); + show('ours: write to a frozen root', () => { + (store as {a: object}).a = {b: 2}; + return store.a.b; + }); + show('ours: write inside the frozen child', () => { + (store.a as {b: number}).b = 2; + return store.a.b; + }); +} + +section( + 'a frozen object nested in the input, with an unfrozen object inside it', +); +{ + const inner = {n: 1}; + const base = {config: Object.freeze({inner}), other: 1}; + const next = produce(base, (draft) => { + draft.config.inner.n = 2; + }); + show('immer: write below the frozen object', () => next.config.inner.n); + show('immer: the original inner object', () => inner.n); + show('immer: config was copied', () => next.config !== base.config); + + const inner2 = {n: 1}; + const store = createClassyStore({ + config: Object.freeze({inner: inner2}), + other: 1, + }); + let calls = 0; + subscribe(store, () => calls++, {sync: true}); + const before = snapshot(store); + show('ours: write below the frozen object', () => { + store.config.inner.n = 2; + return store.config.inner.n; + }); + show('ours: subscriber calls', () => calls); + show( + 'ours: the snapshot taken before the write now reads', + () => before.config.inner.n, + ); + show( + 'ours: snapshot after is the same object', + () => snapshot(store) === before, + ); +} + +section('the raw object is frozen after the store has it (finding 46)'); +{ + const raw = {config: {nested: {n: 1}}}; + const next = produce(raw, (draft) => { + Object.freeze(raw.config); + draft.config.nested.n = 2; + }); + show( + 'immer: base frozen during the recipe, then written through the draft', + () => next.config.nested.n, + ); + + const raw2 = {config: {nested: {n: 1}}}; + const store = createClassyStore(raw2); + void store.config.nested; + Object.freeze(raw2.config); + show( + 'ours: read after the raw object was frozen', + () => store.config.nested.n, + ); +} + +section('a non-writable, non-configurable property that holds an object'); +{ + const make = () => { + const base: {locked: {n: number}; a: number} = {a: 1} as never; + Object.defineProperty(base, 'locked', { + value: {n: 1}, + writable: false, + configurable: false, + enumerable: true, + }); + return base; + }; + const base = make(); + const next = produce(base, (draft) => { + draft.locked.n = 2; + }); + show('immer: write inside it', () => next.locked.n); + show('immer: base untouched', () => base.locked.n); + const replaced = produce(base, (draft) => { + draft.locked = {n: 3}; + }); + show( + 'immer: replace the read-only property through the draft', + () => replaced.locked.n, + ); + show('immer: descriptor seen through a draft', () => { + let seen: PropertyDescriptor | undefined; + produce(base, (draft) => { + seen = Object.getOwnPropertyDescriptor(draft, 'locked'); + }); + return {writable: seen?.writable, configurable: seen?.configurable}; + }); + + const store = createClassyStore(make()); + let calls = 0; + subscribe(store, () => calls++, {sync: true}); + const before = snapshot(store); + show('ours: write inside it', () => { + store.locked.n = 2; + return store.locked.n; + }); + show('ours: subscriber calls', () => calls); + show( + 'ours: the snapshot taken before the write now reads', + () => before.locked.n, + ); + show( + 'ours: snapshot shares the object with the store', + () => before.locked === store.locked, + ); + show('ours: is that object frozen in the snapshot', () => + Object.isFrozen(before.locked), + ); +} + +section('what auto-freeze does to objects Immer did not create'); +{ + const shared = {d: 1}; + const base = {a: {b: 1}, shared}; + const added = {x: {y: 1}}; + const next = produce(base, (draft) => { + draft.a.b = 2; + (draft as {added?: object}).added = added; + }); + show('immer: base root frozen', () => Object.isFrozen(base)); + show('immer: untouched branch of the base, frozen in place', () => + Object.isFrozen(shared), + ); + show( + 'immer: object assigned in the recipe, frozen in place', + () => Object.isFrozen(added) && Object.isFrozen(added.x), + ); + show( + 'immer: result holds the assigned object itself', + () => (next as {added?: object}).added === added, + ); + + const halfFrozen = {keep: Object.freeze({inner: {n: 1}}), a: 1}; + const next2 = produce(halfFrozen, (draft) => { + draft.a = 2; + }); + show('immer: object below an already frozen one is frozen', () => + Object.isFrozen(next2.keep.inner), + ); + + const shared2 = {d: 1}; + const added2 = {x: {y: 1}}; + const store = createClassyStore({a: {b: 1}, shared: shared2} as { + a: {b: number}; + shared: object; + added?: object; + }); + store.added = added2; + const snap = snapshot(store); + show( + 'ours: raw objects frozen after a snapshot', + () => Object.isFrozen(shared2) || Object.isFrozen(added2), + ); + show( + 'ours: snapshot holds the assigned object itself', + () => snap.added === added2, + ); + show( + 'ours: snapshot copy is deeply frozen', + () => + Object.isFrozen(snap.added) && + Object.isFrozen((snap.added as typeof added2).x), + ); +} + +section('Object.freeze on a draft, and on a store'); +{ + show('immer: Object.freeze(draft)', () => + produce({a: 1, child: {n: 1}}, (draft) => { + Object.freeze(draft); + }), + ); + const store = createClassyStore({a: 1, child: {n: 1}}); + show('ours: Object.freeze(store)', () => { + Object.freeze(store); + return Object.isFrozen(store); + }); + show('ours: write after the freeze', () => { + store.a = 2; + return store.a; + }); +} +``` + +Output (Bun 1.4.4): + +```text + +## a frozen object as the input +immer: write through a draft of a frozen base: 2 +immer: base untouched: 1 +immer: untouched branch kept: true +immer: result frozen: true +ours: read through a frozen root: 1 +ours: write to a frozen root: THROWS TypeError: Proxy object's 'set' trap returned falsy value for property 'a' +ours: write inside the frozen child: THROWS TypeError: Attempted to assign to readonly property. + +## a frozen object nested in the input, with an unfrozen object inside it +immer: write below the frozen object: 2 +immer: the original inner object: 1 +immer: config was copied: true +ours: write below the frozen object: 2 +ours: subscriber calls: 0 +ours: the snapshot taken before the write now reads: 2 +ours: snapshot after is the same object: true + +## the raw object is frozen after the store has it (finding 46) +immer: base frozen during the recipe, then written through the draft: 2 +ours: read after the raw object was frozen: THROWS TypeError: Proxy handler's 'get' result of a non-configurable and non-writable property should be the same value as the target's property + +## a non-writable, non-configurable property that holds an object +immer: write inside it: 2 +immer: base untouched: 1 +immer: replace the read-only property through the draft: 3 +immer: descriptor seen through a draft: {"writable":true,"configurable":true} +ours: write inside it: 2 +ours: subscriber calls: 0 +ours: the snapshot taken before the write now reads: 2 +ours: snapshot shares the object with the store: true +ours: is that object frozen in the snapshot: false + +## what auto-freeze does to objects Immer did not create +immer: base root frozen: false +immer: untouched branch of the base, frozen in place: true +immer: object assigned in the recipe, frozen in place: true +immer: result holds the assigned object itself: true +immer: object below an already frozen one is frozen: false +ours: raw objects frozen after a snapshot: false +ours: snapshot holds the assigned object itself: false +ours: snapshot copy is deeply frozen: true + +## Object.freeze on a draft, and on a store +immer: Object.freeze(draft): THROWS TypeError: Proxy object's non-extensible 'target' has configurable property 'parent_' that was not in the result from the 'ownKeys' trap +ours: Object.freeze(store): true +ours: write after the freeze: THROWS TypeError: Proxy object's 'set' trap returned falsy value for property 'a' +``` + +### Port 3: class instances + +`p3-class.ts`: + +```ts +// Port 3: class instances with and without the marker, getters, #private. +import {immerable, produce} from 'immer'; +import { + createClassyStore, + PROXYABLE, + snapshot, + subscribe, +} from '/Users/robertparallax/WebstormProjects/classy-store/packages/classy-store/src/index.ts'; +import {section, show} from './harness.mjs'; + +class Unmarked { + n = 1; + get double() { + return this.n * 2; + } + inc() { + this.n++; + } +} + +class Marked { + static [immerable] = true; + static [PROXYABLE] = true; + n = 1; + get double() { + return this.n * 2; + } + inc() { + this.n++; + } +} + +class MarkedChild extends Marked { + extra = 'x'; +} + +class InstanceMarked { + [immerable] = true; + n = 1; +} + +class Private { + static [immerable] = true; + static [PROXYABLE] = true; + #secret = 1; + n = 1; + read() { + return this.#secret; + } +} + +section('a class instance without the marker'); +{ + show('immer: as the root', () => + produce(new Unmarked(), (draft) => void draft.inc()), + ); + const point = new Unmarked(); + const base = {point, a: 1}; + const next = produce(base, (draft) => { + draft.point.n = 5; + }); + show( + 'immer: nested, written in a recipe; the base instance now reads', + () => point.n, + ); + show('immer: result is the base', () => next === base); + show('immer: instance frozen', () => Object.isFrozen(next.point)); + const next2 = produce(base, (draft) => { + draft.a = 2; + }); + show('immer: instance frozen after another field changed', () => + Object.isFrozen(next2.point), + ); + + const point2 = new Unmarked(); + const store = createClassyStore({point: point2, a: 1}); + let calls = 0; + subscribe(store, () => calls++, {sync: true}); + const before = snapshot(store); + store.point.n = 5; + show('ours: nested, written; subscriber calls', () => calls); + show('ours: the snapshot taken before now reads', () => before.point.n); + show('ours: as the root', () => { + const root = createClassyStore(new Unmarked()); + root.inc(); + return [root.n, snapshot(root).double]; + }); +} + +section('a class instance with the marker'); +{ + const base = new Marked(); + const next = produce(base, (draft) => { + draft.inc(); + }); + show('immer: method on the draft', () => [base.n, next.n]); + show( + 'immer: result is an instance of the class', + () => next instanceof Marked, + ); + show('immer: prototype getter on the result', () => next.double); + show('immer: own keys of the result', () => Reflect.ownKeys(next)); + show('immer: result frozen', () => Object.isFrozen(next)); + show('immer: getter read inside the recipe after a write', () => { + let seen = 0; + produce(base, (draft) => { + draft.n = 10; + seen = draft.double; + }); + return seen; + }); + show( + 'immer: subclass of a marked class', + () => + produce(new MarkedChild(), (draft) => { + draft.inc(); + }).n, + ); + show( + 'immer: marker as an instance field', + () => + produce(new InstanceMarked(), (draft) => { + draft.n = 2; + }).n, + ); + + const store = createClassyStore({item: new Marked()}); + store.item.inc(); + const snap = snapshot(store); + show('ours: nested marked instance', () => [snap.item.n, snap.item.double]); + show( + 'ours: snapshot is an instance of the class', + () => snap.item instanceof Marked, + ); + show('ours: own keys of the snapshot', () => Reflect.ownKeys(snap.item)); + show('ours: Object.keys of the snapshot', () => Object.keys(snap.item)); +} + +section('#private fields'); +{ + show('immer: method that reads #private, on a draft', () => { + let seen: unknown; + produce(new Private(), (draft) => { + seen = draft.read(); + }); + return seen; + }); + show('immer: the same on a result that was copied', () => + produce(new Private(), (draft) => { + draft.n = 2; + }).read(), + ); + show('ours: on the store', () => createClassyStore(new Private()).read()); + show('ours: on the snapshot', () => + snapshot(createClassyStore(new Private())).read(), + ); +} +``` + +Output (Bun 1.4.4): + +```text + +## a class instance without the marker +immer: as the root: THROWS Error: [Immer] produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '[object Object]' +immer: nested, written in a recipe; the base instance now reads: 5 +immer: result is the base: true +immer: instance frozen: false +immer: instance frozen after another field changed: false +ours: nested, written; subscriber calls: 0 +ours: the snapshot taken before now reads: 5 +ours: as the root: [2, 4] + +## a class instance with the marker +immer: method on the draft: [1, 2] +immer: result is an instance of the class: true +immer: prototype getter on the result: 4 +immer: own keys of the result: ["n"] +immer: result frozen: true +immer: getter read inside the recipe after a write: 20 +immer: subclass of a marked class: 2 +immer: marker as an instance field: 2 +ours: nested marked instance: [2, 4] +ours: snapshot is an instance of the class: true +ours: own keys of the snapshot: ["n", "double"] +ours: Object.keys of the snapshot: ["n", "double"] + +## #private fields +immer: method that reads #private, on a draft: THROWS TypeError: Cannot access invalid private field (evaluating 'this.#secret') +immer: the same on a result that was copied: THROWS TypeError: Cannot access invalid private field (evaluating 'this.#secret') +ours: on the store: THROWS TypeError: Cannot access invalid private field (evaluating 'this.#secret') +ours: on the snapshot: THROWS TypeError: Cannot access invalid private field (evaluating 'this.#secret') +``` + +### Port 4: getters, symbols, non-enumerable and array properties, sparse arrays + +`p4-shapes.ts`: + +```ts +// Port 4: an own getter on the input, a symbol-keyed property, a +// non-enumerable property, a named property on an array, a sparse array. +import {Immer, produce} from 'immer'; +import { + createClassyStore, + snapshot, +} from '/Users/robertparallax/WebstormProjects/classy-store/packages/classy-store/src/index.ts'; +import {section, show} from './harness.mjs'; + +const strict = new Immer({useStrictShallowCopy: true}); + +section('an own getter on the input'); +{ + const make = () => ({ + n: 1, + get double() { + return this.n * 2; + }, + }); + const next = produce(make(), (draft) => { + draft.n = 5; + }); + show('immer: the getter on the result', () => next.double); + show( + 'immer: is it still an accessor', + () => 'get' in (Object.getOwnPropertyDescriptor(next, 'double') ?? {}), + ); + show('immer: read in the recipe after the write', () => { + let seen = 0; + produce(make(), (draft) => { + draft.n = 5; + seen = draft.double; + }); + return seen; + }); + show( + 'immer, strict copy: the getter on the result', + () => + strict.produce(make(), (draft) => { + draft.n = 5; + }).double, + ); + + const store = createClassyStore(make()); + store.n = 5; + const snap = snapshot(store); + show('ours: the getter on the snapshot', () => snap.double); + show( + 'ours: is it still an accessor', + () => 'get' in (Object.getOwnPropertyDescriptor(snap, 'double') ?? {}), + ); +} + +section('a symbol-keyed property that holds an object'); +{ + const key = Symbol('meta'); + const make = () => ({a: 1, [key]: {n: 1}}); + const base = make(); + const next = produce(base, (draft) => { + draft[key].n = 2; + }); + show('immer: written through the draft', () => [base[key].n, next[key].n]); + show('immer: the new object under the symbol is frozen', () => + Object.isFrozen(next[key]), + ); + show('immer: can it be changed after produce', () => { + next[key].n = 99; + return next[key].n; + }); + + const store = createClassyStore(make()); + store[key].n = 2; + const snap = snapshot(store); + show('ours: written through the store', () => snap[key].n); + show('ours: the object under the symbol is frozen', () => + Object.isFrozen(snap[key]), + ); +} + +section('a non-enumerable property'); +{ + const make = () => { + const base = {a: 1} as {a: number; hidden: {n: number}}; + Object.defineProperty(base, 'hidden', { + value: {n: 1}, + enumerable: false, + writable: true, + configurable: true, + }); + return base; + }; + const next = produce(make(), (draft) => { + draft.a = 2; + }); + show( + 'immer: present on the result after another field changed', + () => 'hidden' in next, + ); + const strictNext = strict.produce(make(), (draft) => { + draft.a = 2; + }); + show('immer, strict copy: present, and enumerable', () => [ + 'hidden' in strictNext, + Object.getOwnPropertyDescriptor(strictNext, 'hidden')?.enumerable, + ]); + show('immer, strict copy: is it frozen', () => + Object.isFrozen(strictNext.hidden), + ); + + const store = createClassyStore(make()); + store.a = 2; + const snap = snapshot(store); + show('ours: present, and enumerable', () => [ + 'hidden' in snap, + Object.getOwnPropertyDescriptor(snap, 'hidden')?.enumerable, + ]); + show('ours: is it frozen', () => Object.isFrozen(snap.hidden)); +} + +section('a named property and a symbol on an array'); +{ + const tag = Symbol('tag'); + const make = () => { + const list = [1, 2, 3] as number[] & {label?: string; [tag]?: string}; + list.label = 'x'; + list[tag] = 't'; + return {list}; + }; + const next = produce(make(), (draft) => { + draft.list.push(4); + }); + show('immer: named property after a push', () => next.list.label); + show('immer: symbol property after a push', () => next.list[tag]); + show( + 'immer: write a named property on a draft array', + () => + produce(make(), (draft) => { + draft.list.label = 'y'; + }).list.label, + ); + show( + 'immer: write a symbol property on a draft array', + () => + produce(make(), (draft) => { + draft.list[tag] = 'u'; + }).list[tag], + ); + show( + 'immer: delete a named property on a draft array', + () => + produce(make(), (draft) => { + delete draft.list.label; + }).list.label, + ); + + const store = createClassyStore(make()); + store.list.label = 'y'; + const snap = snapshot(store); + show('ours: named property on the store', () => store.list.label); + show('ours: named property on the snapshot', () => snap.list.label); + show('ours: symbol property on the snapshot', () => snap.list[tag]); +} + +section('a sparse array'); +{ + // biome-ignore lint/suspicious/noSparseArray: the hole is the test + const make = () => ({ + list: [{n: 1}, , {n: 3}] as ({n: number} | undefined)[], + }); + const next = produce(make(), (draft) => { + (draft.list[2] as {n: number}).n = 9; + }); + show('immer: length and the hole', () => [next.list.length, 1 in next.list]); + const grown = produce(make(), (draft) => { + draft.list[5] = {n: 6}; + }); + show('immer: write past the end', () => [ + grown.list.length, + 3 in grown.list, + 4 in grown.list, + ]); + show('immer: delete an index', () => { + const removed = produce(make(), (draft) => { + delete draft.list[0]; + }); + return [removed.list.length, 0 in removed.list, removed.list[0]]; + }); + + const store = createClassyStore(make()); + (store.list[2] as {n: number}).n = 9; + const snap = snapshot(store); + show('ours: length and the hole', () => [snap.list.length, 1 in snap.list]); + delete store.list[0]; + show('ours: delete an index', () => { + const after = snapshot(store); + return [after.list.length, 0 in after.list, after.list[0]]; + }); +} +``` + +Output (Bun 1.4.4): + +```text + +## an own getter on the input +immer: the getter on the result: 2 +immer: is it still an accessor: false +immer: read in the recipe after the write: 2 +immer, strict copy: the getter on the result: 2 +ours: the getter on the snapshot: 10 +ours: is it still an accessor: true + +## a symbol-keyed property that holds an object +immer: written through the draft: [1, 2] +immer: the new object under the symbol is frozen: false +immer: can it be changed after produce: 99 +ours: written through the store: 2 +ours: the object under the symbol is frozen: true + +## a non-enumerable property +immer: present on the result after another field changed: false +immer, strict copy: present, and enumerable: [true, false] +immer, strict copy: is it frozen: false +ours: present, and enumerable: [true, false] +ours: is it frozen: true + +## a named property and a symbol on an array +immer: named property after a push: undefined +immer: symbol property after a push: undefined +immer: write a named property on a draft array: THROWS Error: [Immer] Immer only supports setting array indices and the 'length' property +immer: write a symbol property on a draft array: THROWS TypeError: Cannot convert a symbol to a string +immer: delete a named property on a draft array: THROWS Error: [Immer] Immer only supports deleting array indices +ours: named property on the store: "y" +ours: named property on the snapshot: undefined +ours: symbol property on the snapshot: undefined + +## a sparse array +immer: length and the hole: [3, false] +immer: write past the end: [6, false, false] +immer: delete an index: [3, true, undefined] +ours: length and the hole: [3, false] +ours: delete an index: [3, false, undefined] +``` + +### Port 5: operations Immer refuses + +`p5-traps.ts`: + +```ts +// Port 5: operations the store proxy lets through and an Immer draft refuses +// or answers: defineProperty, setPrototypeOf, __proto__ through Object.assign, +// a delete of a missing key, keys and `in`, descriptors. +import {produce} from 'immer'; +import { + createClassyStore, + snapshot, + subscribe, +} from '/Users/robertparallax/WebstormProjects/classy-store/packages/classy-store/src/index.ts'; +import {section, show} from './harness.mjs'; + +section('Object.defineProperty (findings 1, 45, 71)'); +{ + show('immer: on a draft', () => + produce({a: 1}, (draft) => { + Object.defineProperty(draft, 'b', { + value: 2, + enumerable: true, + writable: true, + configurable: true, + }); + }), + ); + const store = createClassyStore({a: 1} as {a: number; b?: number}); + let calls = 0; + subscribe(store, () => calls++, {sync: true}); + const before = snapshot(store); + Object.defineProperty(store, 'b', { + value: 2, + enumerable: true, + writable: true, + configurable: true, + }); + show('ours: store reads', () => store.b); + show('ours: subscriber calls', () => calls); + show('ours: snapshot has the property', () => 'b' in snapshot(store)); + show( + 'ours: snapshot is the one from before', + () => snapshot(store) === before, + ); +} + +section('the prototype (findings 47, 48)'); +{ + show('immer: Object.setPrototypeOf(draft)', () => + produce({a: 1}, (draft) => { + Object.setPrototypeOf(draft, {polluted: true}); + }), + ); + show('immer: Object.assign(draft, JSON.parse(\'{"__proto__": ...}\'))', () => + produce({a: 1}, (draft) => { + Object.assign(draft, JSON.parse('{"__proto__": {"polluted": true}}')); + }), + ); + const store = createClassyStore({a: 1} as {a: number; polluted?: boolean}); + show('ours: Object.assign(store, JSON.parse(\'{"__proto__": ...}\'))', () => { + Object.assign(store, JSON.parse('{"__proto__": {"polluted": true}}')); + return [store.polluted, snapshot(store).polluted]; + }); +} + +section('a delete that removes nothing (finding 29)'); +{ + const base = {a: 1} as {a: number; missing?: number}; + show( + 'immer: result is the base', + () => + produce(base, (draft) => { + delete draft.missing; + }) === base, + ); + const store = createClassyStore({a: 1} as {a: number; missing?: number}); + let calls = 0; + subscribe(store, () => calls++, {sync: true}); + const before = snapshot(store); + delete store.missing; + show('ours: subscriber calls', () => calls); + show( + 'ours: snapshot is the one from before', + () => snapshot(store) === before, + ); +} + +section('keys and `in` after a delete (findings 30, 31)'); +{ + show('immer: Object.keys(draft) and "b" in draft after delete', () => { + let seen: unknown; + produce({a: 1, b: 2} as {a: number; b?: number}, (draft) => { + delete draft.b; + seen = [Object.keys(draft), 'b' in draft]; + }); + return seen; + }); + show( + 'immer: a prototype getter that reads Object.keys(this), on a draft and on the result', + () => { + class Bag { + static [Symbol.for('immer-draftable')] = true; + a = 1; + b?: number = 2; + get size() { + return Object.keys(this).length; + } + } + let inRecipe = 0; + const next = produce(new Bag(), (draft) => { + delete draft.b; + inRecipe = draft.size; + }); + return [inRecipe, next.size]; + }, + ); + class Bag { + a = 1; + b?: number = 2; + get size() { + return Object.keys(this).length; + } + } + const store = createClassyStore(new Bag()); + const first = store.size; + delete store.b; + show( + 'ours: the same getter, live before and after the delete, then on a snapshot', + () => [first, store.size, snapshot(store).size], + ); +} + +section('Object.getOwnPropertyDescriptor(...).value (finding 50)'); +{ + const base = {child: {n: 1}}; + let viaDescriptor: unknown; + produce(base, (draft) => { + viaDescriptor = Object.getOwnPropertyDescriptor(draft, 'child')?.value; + (viaDescriptor as {n: number}).n = 9; + }); + show( + 'immer: the descriptor value is the base object', + () => viaDescriptor === base.child, + ); + show('immer: base after a write through it', () => base.child.n); + + const raw = {child: {n: 1}}; + const store = createClassyStore(raw); + let calls = 0; + subscribe(store, () => calls++, {sync: true}); + const value = Object.getOwnPropertyDescriptor(store, 'child')?.value as { + n: number; + }; + value.n = 9; + show( + 'ours: the descriptor value is the raw object', + () => value === raw.child, + ); + show('ours: subscriber calls after a write through it', () => calls); +} + +section('use of a draft after produce returned'); +{ + let leaked: {n: number} | undefined; + produce({child: {n: 1}}, (draft) => { + leaked = draft.child; + }); + show('immer: write to a leaked draft', () => { + (leaked as {n: number}).n = 2; + return 'no error'; + }); +} +``` + +Output (Bun 1.4.4): + +```text + +## Object.defineProperty (findings 1, 45, 71) +immer: on a draft: THROWS Error: [Immer] Object.defineProperty() cannot be used on an Immer draft +ours: store reads: 2 +ours: subscriber calls: 0 +ours: snapshot has the property: false +ours: snapshot is the one from before: true + +## the prototype (findings 47, 48) +immer: Object.setPrototypeOf(draft): THROWS Error: [Immer] Object.setPrototypeOf() cannot be used on an Immer draft +immer: Object.assign(draft, JSON.parse('{"__proto__": ...}')): THROWS Error: [Immer] Object.setPrototypeOf() cannot be used on an Immer draft +ours: Object.assign(store, JSON.parse('{"__proto__": ...}')): [true, true] + +## a delete that removes nothing (finding 29) +immer: result is the base: true +ours: subscriber calls: 1 +ours: snapshot is the one from before: false + +## keys and `in` after a delete (findings 30, 31) +immer: Object.keys(draft) and "b" in draft after delete: [["a"], false] +immer: a prototype getter that reads Object.keys(this), on a draft and on the result: [1, 1] +ours: the same getter, live before and after the delete, then on a snapshot: [2, 2, 0] + +## Object.getOwnPropertyDescriptor(...).value (finding 50) +immer: the descriptor value is the base object: true +immer: base after a write through it: 9 +ours: the descriptor value is the raw object: true +ours: subscriber calls after a write through it: 0 + +## use of a draft after produce returned +immer: write to a leaked draft: THROWS TypeError: Proxy has already been revoked. No more operations are allowed to be performed on it +``` + +### Port 6: cycles + +`p6-cycle.ts`: + +```ts +// Port 6: a self-referencing object. Run with a timeout: a hang is a result. +import {produce} from 'immer'; +import { + createClassyStore, + snapshot, +} from '/Users/robertparallax/WebstormProjects/classy-store/packages/classy-store/src/index.ts'; +import {section, show} from './harness.mjs'; + +type Node = {n: number; self?: Node}; + +section('a base that refers to itself'); +{ + const base: Node = {n: 1}; + base.self = base; + const next = produce(base, (draft) => { + draft.n = 2; + }); + show('immer: result.n', () => next.n); + show('immer: result.self is the result', () => next.self === next); + show('immer: result.self is the base', () => next.self === base); + show('immer: the base is now frozen', () => Object.isFrozen(base)); + + const base2: Node = {n: 1}; + base2.self = base2; + const next2 = produce(base2, (draft) => { + (draft.self as Node).n = 3; + }); + show('immer: write through draft.self; result.n and result.self.n', () => [ + next2.n, + next2.self?.n, + ]); + show('immer: result.self is the result', () => next2.self === next2); +} + +section('a draft assigned to itself'); +{ + const next = produce({n: 1} as Node, (draft) => { + draft.self = draft; + }); + show('immer: result.self is the result', () => next.self === next); + show('immer: result.self is a revoked proxy', () => { + try { + void next.self?.n; + return false; + } catch { + return true; + } + }); + show('immer: result frozen', () => Object.isFrozen(next)); +} + +section('the same in a store (finding 8)'); +{ + const store = createClassyStore({n: 1} as Node); + show('ours: store.self = store', () => { + store.self = store; + return store.self === store; + }); + show('ours: snapshot', () => snapshot(store).n); +} +``` + +Output (Bun 1.4.4): + +```text + +## a base that refers to itself +immer: result.n: 2 +immer: result.self is the result: false +immer: result.self is the base: true +immer: the base is now frozen: true +immer: write through draft.self; result.n and result.self.n: [1, 3] +immer: result.self is the result: false + +## a draft assigned to itself +immer: result.self is the result: true +immer: result.self is a revoked proxy: false +immer: result frozen: true + +## the same in a store (finding 8) +ours: store.self = store: true +ours: snapshot: THROWS Error: @codebelt/classy-store: circular reference detected in snapshot +``` + +### Port 7: Map and Set + +`p7-mapset.ts`: + +```ts +// Port 7: a Map and a Set with object members. Pass "noplugin" to run the +// first section without enableMapSet(), which is global and cannot be undone. +import {enableMapSet, produce} from 'immer'; +import { + reactiveMap, + reactiveSet, +} from '/Users/robertparallax/WebstormProjects/classy-store/packages/classy-store/src/collections/index.ts'; +import { + createClassyStore, + snapshot, + subscribe, +} from '/Users/robertparallax/WebstormProjects/classy-store/packages/classy-store/src/index.ts'; +import {ns, section, show, time} from './harness.mjs'; + +if (process.argv[2] === 'noplugin') { + section('a Map without enableMapSet()'); + show('immer: Map as the root', () => produce(new Map([['a', 1]]), () => {})); + show( + 'immer: Map nested, never read', + () => + produce({m: new Map([['a', {n: 1}]]), x: 1}, (draft) => { + draft.x = 2; + }).x, + ); + show('immer: Map nested, read in the recipe', () => + produce({m: new Map([['a', {n: 1}]]), x: 1}, (draft) => { + void draft.m; + }), + ); + process.exit(0); +} + +enableMapSet(); + +section('a Map with object values'); +{ + const key = {id: 'k'}; + const base = { + m: new Map([ + ['a', {n: 1}], + ['b', {n: 2}], + [key, {n: 3}], + ]), + }; + const next = produce(base, (draft) => { + (draft.m.get('a') as {n: number}).n = 5; + }); + show('immer: result is a native Map', () => [ + next.m instanceof Map, + Object.getPrototypeOf(next.m) === Map.prototype, + ]); + show('immer: map is new, changed value is new, other value kept', () => [ + next.m !== base.m, + next.m.get('a') !== base.m.get('a'), + next.m.get('b') === base.m.get('b'), + ]); + show('immer: base value untouched', () => base.m.get('a')?.n); + show('immer: object key still finds its value', () => next.m.get(key)?.n); + show('immer: result.m.set()', () => next.m.set('c', {n: 9})); + show('immer: result.m.delete()', () => next.m.delete('a')); + show('immer: Map.prototype.set.call(result.m)', () => { + Map.prototype.set.call(next.m, 'c', {n: 9}); + return next.m.has('c'); + }); + show('immer: values are frozen', () => Object.isFrozen(next.m.get('b'))); + show('immer: draft is an instance of Map', () => { + let seen = false; + produce(base, (draft) => { + seen = draft.m instanceof Map; + }); + return seen; + }); + + const store = createClassyStore({m: new Map([['a', {n: 1}]])}); + let calls = 0; + subscribe(store, () => calls++, {sync: true}); + const before = snapshot(store); + (store.m.get('a') as {n: number}).n = 5; + store.m.set('z', {n: 0}); + show( + 'ours, native Map: subscriber calls after a value write and a set()', + () => calls, + ); + show('ours, native Map: the snapshot taken before now reads', () => [ + before.m.get('a')?.n, + before.m.has('z'), + ]); + + const reactive = createClassyStore({ + m: reactiveMap([ + ['a', {n: 1}], + ['b', {n: 2}], + ]), + }); + let reactiveCalls = 0; + subscribe(reactive, () => reactiveCalls++, {sync: true}); + const reactiveBefore = snapshot(reactive); + (reactive.m.get('a') as {n: number}).n = 5; + const reactiveAfter = snapshot(reactive); + show('ours, reactiveMap: subscriber calls', () => reactiveCalls); + show('ours, reactiveMap: before and after', () => [ + reactiveBefore.m.get('a')?.n, + reactiveAfter.m.get('a')?.n, + ]); + show( + 'ours, reactiveMap: other value kept', + () => reactiveAfter.m.get('b') === reactiveBefore.m.get('b'), + ); + show( + 'ours, reactiveMap: snapshot is an instance of Map', + () => reactiveAfter.m instanceof Map, + ); + show('ours, reactiveMap: snapshot.m.set()', () => + (reactiveAfter.m as unknown as Map).set('c', {}), + ); +} + +section('a Set with object members'); +{ + const row = {n: 1}; + const other = {n: 2}; + const base = {s: new Set([row, other])}; + let hasOriginal = false; + let hasDraft = false; + const next = produce(base, (draft) => { + hasOriginal = draft.s.has(row); + for (const member of draft.s) { + if (member.n === 1) { + member.n = 10; + hasDraft = draft.s.has(member); + } + } + }); + show('immer: draft.has(original) and draft.has(its draft)', () => [ + hasOriginal, + hasDraft, + ]); + show('immer: result is a native Set', () => next.s instanceof Set); + show('immer: members in order', () => [...next.s].map((member) => member.n)); + show( + 'immer: result has the original changed member, the unchanged one', + () => [next.s.has(row), next.s.has(other)], + ); + show('immer: result.s.add()', () => next.s.add({n: 3})); + + const store = createClassyStore({s: reactiveSet([{n: 1}, {n: 2}])}); + const before = snapshot(store); + for (const member of store.s) if (member.n === 1) member.n = 10; + const after = snapshot(store); + show('ours, reactiveSet: members before and after', () => [ + [...before.s].map((member) => member.n), + [...after.s].map((member) => member.n), + ]); + show( + 'ours, reactiveSet: unchanged member kept', + () => [...after.s][1] === [...before.s][1], + ); + show('ours, reactiveSet: snapshot.has(a row read from the store)', () => + after.s.has([...store.s][0]), + ); +} + +section( + 'time to change one value of a 1,000-entry map, then take the next result', +); +{ + const entries = () => + Array.from( + {length: 1000}, + (_, index) => [`k${index}`, {value: index}] as [string, {value: number}], + ); + let tick = 0; + let state = produce({m: new Map(entries())}, () => {}); + const immer = time((index) => { + state = produce(state, (draft) => { + (draft.m.get(`k${index % 1000}`) as {value: number}).value = --tick; + }); + }); + const store = createClassyStore({m: reactiveMap(entries())}); + snapshot(store); + let sum = 0; + const ours = time((index) => { + (store.m.get(`k${index % 1000}`) as {value: number}).value = --tick; + sum += snapshot(store).m.size; + }); + console.log( + `immer, native Map draft: ${ns(immer)} | ours, reactiveMap: ${ns(ours)}`, + ); + if (sum < 0) console.log(sum); +} +``` + +Output (Bun 1.4.4): + +```text + +## a Map with object values +immer: result is a native Map: [true, true] +immer: map is new, changed value is new, other value kept: [true, true, true] +immer: base value untouched: 1 +immer: object key still finds its value: 3 +immer: result.m.set(): THROWS Error: [Immer] This object has been frozen and should not be mutated +immer: result.m.delete(): THROWS Error: [Immer] This object has been frozen and should not be mutated +immer: Map.prototype.set.call(result.m): true +immer: values are frozen: true +immer: draft is an instance of Map: true +ours, native Map: subscriber calls after a value write and a set(): 0 +ours, native Map: the snapshot taken before now reads: [5, true] +ours, reactiveMap: subscriber calls: 1 +ours, reactiveMap: before and after: [1, 5] +ours, reactiveMap: other value kept: true +ours, reactiveMap: snapshot is an instance of Map: false +ours, reactiveMap: snapshot.m.set(): THROWS TypeError: Attempted to assign to readonly property. + +## a Set with object members +immer: draft.has(original) and draft.has(its draft): [true, true] +immer: result is a native Set: true +immer: members in order: [10, 2] +immer: result has the original changed member, the unchanged one: [false, true] +immer: result.s.add(): THROWS Error: [Immer] This object has been frozen and should not be mutated +ours, reactiveSet: members before and after: [[1, 2], [10, 2]] +ours, reactiveSet: unchanged member kept: true +ours, reactiveSet: snapshot.has(a row read from the store): true + +## time to change one value of a 1,000-entry map, then take the next result +immer, native Map draft: 21.29 us | ours, reactiveMap: 126.59 us +``` + +Output (Bun 1.4.4, with the argument noplugin): + +```text + +## a Map without enableMapSet() +immer: Map as the root: THROWS Error: [Immer] The plugin for 'MapSet' has not been loaded into Immer. To enable the plugin, import and call `enableMapSet()` when initializing your application. +immer: Map nested, never read: 2 +immer: Map nested, read in the recipe: THROWS Error: [Immer] The plugin for 'MapSet' has not been loaded into Immer. To enable the plugin, import and call `enableMapSet()` when initializing your application. +``` + +### Port 8: types (tuple, Map, Set) + +`p8-types.ts`: + +```ts +// Port 8, type level only: a tuple, a Map and a Set through Immer's types and +// through ours. Checked with `tsc --noEmit`; nothing here runs. +import {type Draft, type Immutable, produce} from 'immer'; +import type {ReactiveMap} from '/Users/robertparallax/WebstormProjects/classy-store/packages/classy-store/src/collections/index.ts'; +import type {Snapshot} from '/Users/robertparallax/WebstormProjects/classy-store/packages/classy-store/src/types.ts'; + +type Equal = + (() => T extends A ? 1 : 2) extends () => T extends B ? 1 : 2 + ? true + : false; +declare function expectTrue(): T; + +type Pair = [string, number]; +type State = { + pair: Pair; + rows: {id: number}[]; + tags: Map; + ids: Set; +}; + +// Immer: a tuple stays a tuple in both directions. +expectTrue, readonly [string, number]>>(); +expectTrue, [string, number]>>(); +expectTrue< + Equal, readonly {readonly id: number}[]> +>(); + +// Immer: produce gives back the base type, tuple included. +declare const state: State; +const next = produce(state, (draft) => { + draft.pair[1] = 2; + // @ts-expect-error index 2 is outside the tuple + draft.pair[2] = 3; +}); +expectTrue>(); + +// Immer: a Map and a Set become their read-only interfaces. +expectTrue< + Equal['tags'], ReadonlyMap> +>(); +expectTrue['ids'], ReadonlySet>>(); +declare const frozen: Immutable; +// @ts-expect-error ReadonlyMap has no set() +frozen.tags.set('a', {n: 1}); + +// Ours: the tuple becomes an array (finding 14). +expectTrue, readonly (string | number)[]>>(); +// @ts-expect-error control: it is not the tuple +expectTrue, readonly [string, number]>>(); + +// Ours with the array branch removed, as Immer's Immutable is written. +type Primitive = string | number | boolean | null | undefined | symbol | bigint; +type Leaf = + | Primitive + | ((...args: never[]) => unknown) + | Date + | RegExp + | Error + | Map + | Set; +type Snapshot2 = T extends Leaf + ? T + : T extends object + ? {readonly [K in keyof T]: Snapshot2} + : T; +expectTrue, readonly [string, number]>>(); +expectTrue< + Equal, readonly {readonly id: number}[]> +>(); +expectTrue< + Equal, readonly {readonly id: number}[]> +>(); + +// Ours: a native Map in a snapshot keeps set(), and so does a ReactiveMap (finding 16). +declare const snap: Snapshot<{ + native: Map; + reactive: ReactiveMap; +}>; +snap.native.set('a', 1); +snap.reactive.set('a', 1); +``` + +Output (tsc 7.0.2 --noEmit, lines for this file): + +```text +errors reported in p8-types.ts: 0 +``` + +### Port 9: another realm + +`p9-realm.mjs`: + +```js +// Port 9: a plain object made in another realm (an iframe, a Node vm context). +// Runs on Bun and on Node. +import vm from 'node:vm'; +import {produce} from 'immer'; +import {createClassyStore, snapshot, subscribe} from './classy.mjs'; +import {section, show} from './harness.mjs'; + +section('a plain object from another realm'); +const make = () => vm.runInNewContext('({a: {b: 1}, list: [{n: 1}]})'); +{ + const foreign = make(); + show( + "its prototype is this realm's Object.prototype", + () => Object.getPrototypeOf(foreign) === Object.prototype, + ); + const next = produce(foreign, (draft) => { + draft.a.b = 2; + }); + show('immer: drafted and copied', () => [foreign.a.b, next.a.b]); + + const data = make(); + const store = createClassyStore({data}); + let calls = 0; + subscribe(store, () => calls++, {sync: true}); + const before = snapshot(store); + store.data.a.b = 2; + show('ours: subscriber calls after a write inside it', () => calls); + show('ours: the snapshot taken before now reads', () => before.data.a.b); + show('ours: the store hands out the raw object', () => store.data === data); + + const list = vm.runInNewContext('[{n: 1}]'); + const listStore = createClassyStore({list}); + let listCalls = 0; + subscribe(listStore, () => listCalls++, {sync: true}); + listStore.list.push({n: 2}); + listStore.list[0].n = 5; + show( + 'ours: a foreign array, calls after a push and a write to a foreign row', + () => listCalls, + ); +} +``` + +Output (Node 24; Bun gives the same): + +```text + +## a plain object from another realm +its prototype is this realm's Object.prototype: false +immer: drafted and copied: [1, 2] +ours: subscriber calls after a write inside it: 0 +ours: the snapshot taken before now reads: 2 +ours: the store hands out the raw object: true +ours: a foreign array, calls after a push and a write to a foreign row: 1 +``` diff --git a/review/stage-2/signals.md b/review/stage-2/signals.md new file mode 100644 index 00000000..eb00974d --- /dev/null +++ b/review/stage-2/signals.md @@ -0,0 +1,3363 @@ +# Stage 2: Preact Signals and the TC39 Signals proposal + +Read-only comparison of our getter memoization and our batching with Preact +Signals and with the reference polyfill of the TC39 Signals proposal, for +stage 3 of the pre-1.0 review. Nothing in the repository was changed apart +from this file. + +This report builds on `review/stage-2/mobx.md`, findings 1 to 5, and does not +repeat them. Where it agrees with that report it says so in a line. Where it +corrects it (finding 2 below), it shows the reproduction. + +## The libraries and what was read + +- **Preact Signals:** `@preact/signals-core` 1.14.5. Source at + `github.com/preactjs/signals`, tag `@preact/signals-core@1.14.5`, commit + `30a797e962c76cc2e623e84f4194a00b9f0c5c8f` (2026-10-27). Read in full: + `packages/core/src/index.ts` (1,173 lines). +- **TC39 Signals polyfill:** `signal-polyfill` 0.2.3. Source at + `github.com/proposal-signals/signal-polyfill`, tag `v0.2.3`, commit + `958ad56b92e321b84673a42c3d16109f72209017` (2026-11-16). Read in full: + `src/graph.ts`, `src/computed.ts`, `src/signal.ts`, `src/wrapper.ts`. +- **What ran:** the published packages at those versions, in a scratch + folder, on Bun 1.4.4. +- **Our side:** `release/1.0` at `ac38f2f`. Scripts import + `packages/classy-store/src/index.ts` by absolute path. The spikes in finding + 1, 2, 3 and 6 ran on copies of `src/` in the scratch folder; their diffs are + in the appendix. +- **Our source read closely:** `core/core.ts` (`activeTracker`, `recordDep`, + `recordComputedDep`, `areDepsValid`, `evaluateComputed`, the `get` trap, + `notifyMutation`, `settleTransaction`, `transactional`, `batch`, `deliver`), + `core/core.types.ts`, and in `snapshot/snapshot.ts` `computeWithTracking`, + `areMemoizedDepsValid`, `evaluateSnapshotGetter`, `installMemoizedGetters`. + +## How they differ, in short + +Both libraries are push-pull graphs with version numbers. + +1. **Every source is its own node with a version.** A write bumps that + source's version and a global counter (Preact `globalVersion`, + `index.ts:161`, `:469-470`; the polyfill's `epoch`, `graph.ts:26`, + `signal.ts` `signalValueChanged`). A computed records each source it read + and the version it saw. +2. **Push marks, pull recomputes.** A write marks observed computeds as + possibly stale (Preact `_notify`, `index.ts:737-749`; polyfill + `consumerMarkDirty`, `graph.ts:330-334`). A read of a computed first asks + "has anything at all changed since I was last clean?" with the global + counter, then polls its sources in recorded order, refreshing each nested + computed and comparing its version (Preact `needsToRecompute`, + `index.ts:504-530`; polyfill `consumerPollProducersForChange`, + `graph.ts:390-415`). A nested computed whose value came out equal keeps its + version, so the outer one does not recompute. +3. **Unobserved computeds still work.** Neither library needs an observer for + memoization: the global counter gives a clean read in O(1) without any + subscription. + +We have no per-source nodes. A getter records three kinds of dependency +(`core.types.ts:9-27`): the version of a child node, the value of a primitive +field, and another getter's value. Every read re-walks that list, and a +dependency on another getter is checked by re-walking that getter's list +recursively (`core.ts:137-142`). + +So the signal libraries have nothing to say about snapshots, structural +sharing or ownership. They are directly comparable on three things: what a +clean read costs, how a nested getter is revalidated, and how batching and +delivery work. + +## Findings + +Each reproduction is an excerpt from the output of a script in the appendix, +where every script and its whole output are given. Times are microseconds +unless marked, from single runs on a laptop that was doing other work; read +them for shape, not for the last digit. + +### 1. A clean read costs time that doubles per level; a global stamp makes it constant + +**What they do.** Preact keeps `_globalVersion` on each computed and returns +at once when the global counter has not moved since the computed was last +found clean (`Computed.prototype._refresh`, `index.ts:661-664`). The counter +is taken before the body runs, so a body that writes is checked again next +time. When the computed is observed, a cheaper check comes first: tracking +and not marked outdated means clean (`index.ts:656-658`). The polyfill does +the same with `lastCleanEpoch` (`producerUpdateValueVersion`, +`graph.ts:277-298`), but stamps after the body has run (`graph.ts:297`). + +**What we do.** `evaluateComputed` calls `areDepsValid` on every read +(`core.ts:166-169`), and a dependency on a getter re-walks that getter's list +(`core.ts:141`). A getter reached by two paths is walked twice, its +dependencies four times, and so on. + +**Difference in behaviour.** Script 01, the ladder from the MobX report's +script 07: two getters per level, each reading both getters of the level +below. No body runs on a clean read in any library. Excerpt: + +```text + clean read of the top read after an unrelated write +depth | ours live | Preact | polyfill | ours live | Preact | polyfill + 8 | 10.28 | 0.07 | 0.08 | 7.27 | 0.42 | 0.70 + 16 | 1540.32 | 0.04 | 0.06 | 1111.15 | 0.68 | 1.11 + 20 | 16548.01 | 0.04 | 0.04 | 16424.39 | 0.68 | 0.92 + 200 | not run | 0.05 | 0.05 | not run | 11.58 | 9.55 +``` + +A spike (`spike-stamp`, appendix) adds a `stamp` to `ComputedEntry`: the +node's own version when the entry was last found valid, taken before the body +runs. A read whose node version equals the stamp returns at once, and a +nested entry found valid is stamped too, so each getter is walked at most +once per version. Script 01 against the spike, from the previous run of this +task: + +```text +depth | clean read | read after an unrelated write | read after base changed + 20 | 0.06 | 1.40 | 11.86 + 200 | 0.09 | 21.46 | 832.34 +``` + +The clean read and the read after an unrelated write become constant and +linear. The everyday case improves too (script 10, one getter over three +fields, nanoseconds per read, best of five rounds): + +```text +base: getter, clean 61 ns | write to another field + getter 206 ns | write to a field it reads + getter 316 ns +spike-stamp: getter, clean 46 ns | write to another field + getter 238 ns | write to a field it reads + getter 321 ns +``` + +All ports 02 to 08 give the same output on the spike as on the base. The +"read after base changed" column is still quadratic on this spike (832 at +200), because a stale nested entry still makes the outer one recompute, which +re-validates the chain below; finding 2 removes that. + +**Proposal: adopt.** This is step 2 of MobX finding 3, with two details the +signal libraries settle: + +- The node's own `version` is enough as the stamp; no new global counter is + needed. A write anywhere under a node bumps that node's version + (`notifyMutation`, `core.ts:222-224`), so for a getter on the root it is a + per-store counter. Preact needs a global counter only because its sources + are not in one tree. +- Take the stamp before the body runs, as Preact does, not after, as the + polyfill does. Script 06 shows the polyfill's choice: a computed that writes + the signal it reads stays at its first value (`values [1,1,1] | runs 1`), + where Preact and our live layer re-run. + +It also removes stage 1 finding 32 on the live store as a side effect: a +getter over a missing property is no longer recomputed on every read (probe, +appendix: `returns the same object twice: false` on the base, `true` on all +three spikes), and it still sees the property once it is written (`5`). + +**Kind.** Performance. + +**Cost.** `core.ts` (`evaluateComputed`, `areDepsValid`) and `core.types.ts`, +about ten lines. Not breaking. The one edge, already named in the MobX +report: a primitive written through the raw object is noticed only after the +next write through a proxy, which is how snapshots behave today (stage 1 +finding 11). Risk low. Measure with `bun run benchmark:core`. + +### 2. Revalidate a nested getter by refreshing it, but compare its node version as well as its value + +**What they do.** `needsToRecompute` (`index.ts:504-530`) walks the sources in +recorded order. For each one it compares the version it saw; if that matches +it calls `_refresh()` on the source, which recomputes it if needed, and +compares the version again. A computed whose new value is equal keeps its +version (`index.ts:679-687`; polyfill `producerRecomputeValue`, +`computed.ts:124-140`, with `equals`), so the outer computed stays valid. +Values held by signals are plain values: a computed returning the same object +means nothing below it changed. + +**What we do.** A dependency on a getter is valid only if that getter's whole +list is valid (`core.ts:141`); whether its value changed is never asked. Our +snapshot layer already does it the other way: it reads the getter through its +own memo and compares the value (`areMemoizedDepsValid`, `snapshot.ts:104-110`). + +**Difference in behaviour.** Script 02, a cutoff: `parity = a % 2` and +`label` reads `parity`. After `a` goes from 1 to 3, the run counts: + +```text +ours live a 1 -> 3, d and label {"b":2,"c":2,"d":2,"parity":2,"label":2} +Preact a 1 -> 3, unobserved {"b":2,"c":2,"d":2,"parity":2,"label":1} +polyfill a 1 -> 3, unwatched {"b":2,"c":2,"d":2,"parity":2,"label":1} +``` + +MobX finding 3, step 1, proposes exactly the signal libraries' rule: refresh +the nested getter, compare the value. A spike of that rule +(`spike-refresh`, appendix) fixes the cutoff above, and breaks this case +(`probe-first.ts`): + +```ts +class Table { + rows = [{price: 1}]; + get first() { + return this.rows[0]; + } + get firstPrice() { + return this.first.price; + } +} +const store = createClassyStore(new Table()); +store.firstPrice; // 1 +store.rows[0].price = 2; +store.firstPrice; // base: 2, spike-refresh: 1, spike-one: 2 +``` + +`first` returns the same store proxy before and after, so the value compare +says "unchanged". `firstPrice` read `.price` on a child of the root, which +`recordDep` does not record (`core.ts:91`). The only thing that catches it +today is the recursive walk into `first`'s list, which holds a version +dependency on `rows`. Our getters can return live store nodes; a signal never +can. So value equality is not enough for us. + +**Proposal: adapt.** Refresh the nested getter through its own memo and +compare both its value and, when the value is a store node, that node's +version. The `spike-one` spike (finding 9) does this with a `versionOf(value)` +lookup in `internalsMap`, and gives `2` above, `label` 1 in the cutoff, and +the error recovery of finding 4. On top of finding 1 it brings "read after +base changed" from quadratic to linear (script 01: 183.61 at depth 200 +against 832.34 with the stamp alone, and 25,660 at depth 20 on the base). +While refreshing, push a frame that records nothing, so reads made during +validation are not taken for the running getter's dependencies. Preact gets +the same effect another way: `needsToRecompute` calls `_refresh()` on a +source directly instead of reading `.value`, so nothing is recorded, and +`_refresh` sets its own context only when it recomputes +(`index.ts:674-693`). + +**Kind.** Performance, bug (the cutoff), and a correction to MobX finding 3. + +**Cost.** `core.ts` (`areDepsValid`), `core.types.ts`. Not breaking. Changes +the pinned run counts at `core.characterisation.getters.test.ts:133`. Risk +medium: the probe above must become a test before the change, and so must a +getter returning a child array that a later getter iterates. + +### 3. A getter that reads the same field in a loop records it once per read + +**What they do.** Preact records a source once per run: `addDependency` reuses +the node already attached to the signal for this context, and a second read +in the same run records nothing (`index.ts:208-256`, the checks on +`node._target !== evalContext` and `node._version === -1`). The polyfill +records every read, by position (`producerAccessed`, `graph.ts:214-260`), and +pays for it in polling. + +**What we do.** `recordDep` pushes an entry on every read +(`core.ts:93-104`). `this.rows` read inside the loop condition and the body +of a 1,000-row loop gives 2,000 version entries, each re-checked on every +read. The snapshot layer dedupes already (`readProps`, `snapshot.ts:77`, +`:85-88`). + +**Difference in behaviour.** Script 09, the same total computed two ways: + +```text +1000 rows first read | clean read | read after an unrelated write +ours live, loop 1204.38 us | 26.80 us | 25.96 us +ours live, hoisted 330.33 us | 0.12 us | 0.14 us +Preact, loop 327.46 us | 0.16 us | 0.12 us +polyfill, loop 576.67 us | 0.12 us | 12.46 us +polyfill, loop: recorded sources 2001 +``` + +The stamp of finding 1 fixes the clean read (0.24) but not the read after an +unrelated write (27.60). `spike-one`, which keys the list by property, gives +0.26 and 0.39. Writing `this.rows[i]` in a loop is the obvious way to write a +getter, and stage 1 finding 3's "200 nanoseconds per row" baseline is this +shape. + +**Proposal: adopt.** Record a property once per run. A `Set` of recorded +properties on the tracker frame, as `computeWithTracking` has, is the +smallest change. The first read is the one that counts. + +**Kind.** Performance. + +**Cost.** `core.ts` (`recordDep`, the tracker frame). Not breaking. Risk low. + +### 4. A computed that throws: both libraries cache the error, record the dependency first, and get stuck on a cycle + +**What they do.** Both cache a thrown error as the computed's result with the +dependencies read before the throw (Preact `index.ts:688-692`, flag +`HAS_ERROR`; polyfill `ERRORED`, `computed.ts:126-129`) and rethrow the same +object on each read until a dependency changes. Both record the outer +computed's dependency on the inner one before rethrowing: Preact calls +`addDependency` before `_refresh` (`index.ts:751-765`); the polyfill calls +`producerAccessed` before `throw node.error` (`computed.ts:48-59`). + +**What we do.** As the MobX report's finding 2 describes: nothing is cached on +a throw (`core.ts:189-195`) and the dependency on the inner getter is recorded +only after it returned (`core.ts:467-475`). + +**Difference in behaviour.** Script 04. `safe` catches the error of `strict`, +which throws until `ready` is set: + +```text +ours live after ready = true: safe fallback | runs {"strict":5,"safe":1,"outer":1} +Preact after ready = true: safe ready | runs {"strict":2,"safe":2,"outer":1} +polyfill after ready = true: safe ready | runs {"strict":2,"safe":2,"outer":1} +Preact strict, read again threw not ready | runs {"strict":1,...} | same error object: true +ours live strict, read again threw not ready | runs {"strict":2,...} | same error object: false +``` + +That agrees with MobX. What the signal libraries add is a counter-example to +caching blindly. Script 03 breaks a cycle with a write: `a = looped ? b : 0`, +`b = a + 1`: + +```text +ours live after looped = false: b returned 1 +Preact after looped = false: b threw Error: Cycle detected +Preact after another round trip: b threw Error: Cycle detected +polyfill after looped = false: b threw Error: Detected cycle in computations. +polyfill sources of b 0 +``` + +In both libraries the cycle error is thrown when `b` reads `a`, before `b` +has recorded `a` (Preact checks `RUNNING` at `index.ts:753`, before +`addDependency`; the polyfill throws inside `producerUpdateValueVersion`, +before `producerAccessed`). So `b` caches an error with no sources, and no +write can ever clear it. Our live layer recovers because it caches nothing. + +**Proposal: adopt MobX finding 2, with one rule from this case.** Record the +dependency on a getter in a `finally` (or before evaluating it), as both +libraries do, so the catching getter recovers. If errors are cached too, do +not cache one when the getter recorded no dependency, and record the +dependency on the getter that closes a cycle before throwing the cycle error. +On `spike-one`, which records the dependency in a `finally` but caches no +error, `safe` recovers (`ready | runs {"strict":6,"safe":2,"outer":1}`) and +`strict` re-runs more often while it throws (10 runs against 7 at the end of +script 04), since validation now refreshes it. Caching the error removes +those runs. + +**Kind.** Bug. + +**Cost.** As in the MobX report: `core.ts` and `snapshot.ts`, not breaking, +changes the pinned tests at `core.characterisation.getters.test.ts:1161` and +`:1270-1300`. Add a test for the broken cycle above, which today passes and +would fail under a naive error cache. + +### 5. Cycle detection: our live message is the best of the three; the snapshot layer has none + +**What they do.** Preact sets a `RUNNING` flag on a computed while it runs and +throws `Error('Cycle detected')` when it is read again (`index.ts:753-754`, +and for effects `:925-928`). The polyfill puts a `COMPUTING` sentinel in the +value slot and throws `Error('Detected cycle in computations.')` +(`computed.ts:111-115`). Neither names the computeds involved. + +**What we do.** `evaluateComputed` scans the tracker stack and throws an +error that names the path (`core.ts:171-184`): `circular computed getter +dependency: a → b → a`. The snapshot layer has no check +(`evaluateSnapshotGetter`, `snapshot.ts:121-162`). + +**Difference in behaviour.** Script 03: + +```text +ours live a <-> b threw Error: @codebelt/classy-store: circular computed getter dependency: a → b → a +ours snapshot a <-> b threw RangeError: Maximum call stack size exceeded. +Preact a <-> b threw Error: Cycle detected +polyfill a <-> b threw Error: Detected cycle in computations. +``` + +**Proposal: adopt for the snapshot layer.** Keep the live message. Give +`evaluateSnapshotGetter` the same check, with a module-level set of +`(target, key)` pairs being computed, so stage 1 finding 38 gives the same +error on both layers. The O(1) flag of the signal libraries is not worth +copying for the live layer: our scan is over the depth of nested getters, +which is small. + +**Kind.** Diagnostics. + +**Cost.** `snapshot.ts`, about ten lines. Not breaking. Changes the pinned +test for finding 38. Risk low. + +### 6. The snapshot layer loses nested memoization once, on a target's first getter + +**What they do.** Nothing comparable; this is a defect in our snapshot layer +that the 20-level chain in script 02 made visible. + +**What we do.** `evaluateSnapshotGetter` reads `memoMap` for the target before +running the getter (`snapshot.ts:132`). While the getter runs, nested getters +create the map for the same target and fill it. Afterwards, if `memoMap` was +undefined at the start, a fresh map replaces the one the nested getters filled +(`snapshot.ts:146-149`). + +**Difference in behaviour.** Script 02, a chain of 20 getters, each reading +the one below. Total body runs: + +```text +ours snapshot first snapshot read total 60 +ours snapshot after an unrelated write total 79 (19 levels re-ran) +ours snapshot after base 2 -> 3 total 99 +ours snapshot after another unrelated write total 99 (none re-ran) +``` + +So stage 1 finding 37 happens once per class instance, after its first +snapshot getter read, not on every snapshot. A one-line spike +(`spike-memo`, appendix) re-reads the map after the computation; the totals +become 60, 60, 80, 80, as Preact and the polyfill give for the live chain. + +**Proposal: adopt.** Re-read `crossSnapshotMemo.get(target)` after +`computeWithTracking` returns. + +**Kind.** Bug (performance only; results are correct). + +**Cost.** One line in `snapshot.ts`. Not breaking. Changes the pinned test for +finding 37. Risk low. + +### 7. A computed that writes + +**What they do.** Neither library forbids it in a computed. Preact runs it and +re-runs on every read when it writes what it reads; once an effect reads that +computed, the write inside the effect's batch trips the cycle guard +(`Cycle detected`, from `index.ts:463-464`). The polyfill lets a `Computed` +write (`consumerAllowSignalWrites = true`, `wrapper.ts:95`) but forbids reads +and writes inside a `Watcher` notification (`wrapper.ts:73`, +`graph.ts:214-221`). In production the read error has an empty message, +because the text is behind Angular's `ngDevMode` flag. + +**What we do.** On the live store the write goes through the `set` trap and +notifies; on a snapshot it is dropped (stage 1 finding 39). + +**Difference in behaviour.** Script 06: + +```text +ours live writes what it reads values [1,2,3] | runs 3 | n 3 | subscriber calls 3 +Preact writes what it reads values [1,2,3] | runs 3 | n 3 +Preact the same, read by an effect threw Error: Cycle detected +polyfill writes what it reads values [1,1,1] | runs 1 | n 1 +``` + +Our live behaviour matches Preact's. + +**Proposal: adapt, as a development warning only.** Neither library treats a +write in a computed as an error, so making it one would be stricter than the +field. A development-only `console.warn` from the `set` trap when +`trackerStack` is not empty, naming the getter, would catch the snapshot case, +where the write is lost in silence. Belongs with MobX finding 7 (a +development build). + +**Kind.** Diagnostics. + +**Cost.** `core.ts`, a few lines behind the development flag. Not breaking. + +### 8. Effects and subscribers: Preact confirms MobX's delivery model, and throws to the writer + +**What they do.** A Preact write starts a batch, marks targets, and runs +queued effects in `endBatch` when the outermost batch closes +(`index.ts:41-81`). Effects are queued, not called from the write, so a +re-entrant write is picked up by the running loop. `endBatch` skips a +disposed effect (`index.ts:62`) and an effect whose sources did not change. +A loop is bounded: after 100 iterations a write throws `Cycle detected` +(`index.ts:463-464`). An effect that throws does not stop the others; the +first error is rethrown to the writer once all have run (`index.ts:63-69`, +`:77-79`). The polyfill has no effect at all: a `Watcher`'s `notify` is +synchronous and may neither read nor write, and scheduling is left to the +user. + +**What we do.** `deliver` is called from inside the write (`core.ts:232`), +recursively on a re-entrant write, from a copy of the listener list +(`core.ts:318-327`), and logs a thrown error with `console.error`. + +**Difference in behaviour.** Script 07: + +```text +ours sync always writes no error at the write | calls 3017 | console.error: ["Maximum call stack size exceeded."] +Preact effect always writes, after a write threw Error: Cycle detected at the write | runs 102 | m 101 +ours sync second removed by first ["first","second"] +Preact second removed by first ["first"] +ours sync re-entrant write ["first:1","first:2","second:2","second:2"] +Preact re-entrant write ["first:1","second:2","first:2"] +ours sync first subscriber throws no error at the write | second called 1 | console.error: ["first subscriber failed"] +Preact first effect throws threw Error: first effect failed at the write | n 1 | second ran 1 +``` + +Preact gives the same results as MobX on loops, removal and re-entrancy, so +MobX finding 5 now has two libraries behind it. On errors the two differ: +MobX logs, Preact throws to the writer. + +**Proposal: adopt MobX finding 5; keep `console.error` for subscriber +errors.** Throwing from a write because a component's subscriber failed +would turn one broken view into a failed store method, and every adapter +subscribes synchronously. For the loop bound, Preact's 100 rounds is the same +number as MobX; the error should name the store, which neither library's +message does. + +**Kind.** Bug, diagnostics. + +**Cost.** As in the MobX report. + +### 9. Batching and glitch freedom match; one Preact refinement is not worth taking + +**What they do.** Preact's `batch` defers effects to the end of the outermost +batch, lets reads inside it see the new values, and still runs effects when +the callback throws (`index.ts:95-107`). Since 1.14 it also records each +signal's value at its first write in a batch and, if the value is back to it +at the end, fast-forwards the targets' versions so nothing re-runs +(`recordBatchSnapshot` and `reconcileBatchSnapshots`, `index.ts:163-206`). +Reads are pull-based, so a computed never sees half of a change; effects see +a consistent state at the end of a batch. + +**What we do.** `batch` and store methods share one transaction counter +(`core.ts:245-306`); versions bump on every write so reads inside are +current, and sync subscribers are told once when the outermost call returns +or throws. Getters are pull-based on both layers. + +**Difference in behaviour.** Scripts 02 and 08. No library showed a glitch: +in the diamond every `b/c` pair `d` saw was consistent (`2/2 4/6 12/22 22/42` +for us). Batching gives the same results: + +```text +ours sync batch(), total read inside saw [-14,28] +Preact batch(), total read inside saw [-14,28] +ours sync batch() that throws threw stop | price 7 | subscriber saw [7] +Preact batch() that throws threw stop | price 7 | effect saw [7] +ours sync set and set back in a batch subscriber calls 1 | same snapshot object: false | equal content: true +Preact set and set back in a batch effect runs after the first 0 | computed runs after the first 0 +``` + +**Proposal: keep `batch()` as it is; reject the set-and-set-back refinement.** +Preact can do it because a signal holds one value. We would need the value of +every written field at its first write in the batch, and the nodes' versions +would still have moved, so the snapshot would be rebuilt anyway. The case is +rare and the cost is one extra notification with equal content, which +selectors already absorb. + +**Kind.** API design. + +**Cost.** None. + +## Could our three kinds of dependency become one? + +Partly tested: the `spike-one` diff in the appendix does it, and ports 01 to +10 and the probe ran against it. The repository's test suites were not run +against it. + +**What it does.** A dependency is `{value, version}` keyed by property name on +the getter's own node, in first-read order. `value` is what the read gave: the +child's proxy for an object edge, the getter's result for a getter, the raw +value for a primitive, and a `MISSING` or `THREW` sentinel. `version` is the +version of the store node `value` is, or -1. Validation re-reads each property +through one function, `currentOf` (`childInternals` for an edge, the memoized +getter for an accessor, `Reflect.get` otherwise), with a frame on the tracker +stack that records nothing, and compares `Object.is(value)` and the version. +The `stamp` of finding 1 sits in front of it. This is the signal libraries' +one rule ("a source is unchanged when its version is the one I saw"), with a +store node's version standing in for a signal's. + +**What it gave.** All three kinds collapse into one entry type and one +validation loop; `recordComputedDep` goes, and the `parent`/`prop` check for a +replaced child falls out of comparing the proxy. Measured: + +- Script 01, ladder at depth 200: clean read 0.13, after an unrelated write + 70.53, after base changed 183.61 (Preact: 0.05, 11.58, 21.88). Linear, and + about six to eight times Preact. +- Script 09: 0.26 clean and 0.39 after an unrelated write, against 26.80 and + 25.96 on the base. +- Script 10, the everyday case: clean getter 48 ns against 61, but a write to + another field followed by the getter 300 ns against 206, because a miss on + the stamp now re-reads each dependency through a descriptor lookup instead + of comparing a stored version. +- Behaviour: the cutoff of finding 2, the probe of finding 2, the error + recovery of finding 4, and stage 1 finding 32 are fixed; nothing else in + ports 02 to 08 changed. + +**What it would take.** `core.ts` (`recordDep`, `areDepsValid`, +`evaluateComputed`, the `get` trap, the tracker frame) and `core.types.ts`, +about 150 lines of diff. Not breaking. Three things to settle first: + +1. The slower "write then read" path. Keeping a fast path for an edge (compare + the stored child version first, as the base does) should recover most of + it; not measured. +2. The snapshot layer keeps its own `{prop, value}` list, which is already + this model without versions (snapshot values are frozen, so value equality + is enough there). The two layers could then share the comparison rule but + not the code. +3. It does not widen what a getter can see. Reads on another node (MobX + finding 1) are still not recorded; a single kind makes it easier to add + "the version of a foreign node" as one more entry of the same shape. + +My recommendation, reasoning from these measurements: take findings 1, 3 and +the `finally` of finding 4 first, as small separate changes, and then decide +on the single kind with the benchmark in hand. Finding 2 needs either the +single kind or a version check bolted on to the `computed` kind; the single +kind is the cleaner of the two. + +## Stage 1 findings that have a counterpart + +| # | What the signal libraries do there | +| --- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 2 | No snapshots; no counterpart. | +| 3 | A 1,000-row sum recomputes in about 330 us in Preact and in our hoisted form; our loop form costs 1,200 us and 27 us per clean read because of duplicate dependencies (finding 3). | +| 13 | Not tested. A Preact computed depends on signals, not on an object that refers to itself. | +| 18 | Preact throws `Cycle detected` at the writer after 100 rounds; the polyfill forbids writes in a `Watcher` callback (finding 8). | +| 19 | Preact effects are synchronous; the same bound covers them. The polyfill leaves scheduling to the user, and its README's microtask effect does not re-run a computed that writes its source. | +| 20 | Preact skips a disposed effect at the call (finding 8). | +| 21 | A Preact effect created after a write runs once with the current value and never hears the earlier write (script 08: `late saw [7]`). | +| 22 | Queued: `["first:1","second:2","first:2"]` (finding 8). | +| 23 | No counterpart; an effect's return value is used only as a cleanup function. | +| 24 | No counterpart: no nested owners. | +| 32 | No counterpart: a missing signal cannot be read. The stamp of finding 1 removes it on our live store. | +| 36 | Both libraries recover the getter that catches another's error, and cache the thrown error (finding 4). Reads on another object: both track every signal read, like MobX. | +| 37 | No snapshot layer; on our side the cause is one line (finding 6). | +| 38 | Both throw a generic cycle error; we overflow the stack on snapshots (finding 5). | +| 39 | Both allow a write in a computed; Preact re-runs like our live layer (finding 7). | +| 40 | Neither freezes or copies a computed's result. Reasoning from reading. | +| 41 | No counterpart: a computed is a function, not a getter with `this`. | +| 42 | No counterpart. | +| 43 | No setters; `batch` is the counterpart, and it behaves like ours (finding 9). | +| 44 | No counterpart: a computed is an object, not a name. | +| 64 | `areDepsValid`'s `if (!cached) return false` becomes reachable with the `finally` of finding 4, as the MobX report noted; `spike-one` removes the whole branch. | + +## The eight API questions, from the signal libraries' point of view + +1. **Synchronous notification by default?** Preact: yes, effects run + synchronously when the outermost batch closes, which is our sync mode. + The polyfill: notification is synchronous but may do nothing except + schedule; running work is the caller's job, typically in a microtask. Both + point the same way as our adapters: synchronous delivery, grouped by a + transaction. +2. **Writes outside a method; `batch()`?** Preact allows writes anywhere, + warns about none, and exports `batch`, which is the only grouping it has. + That supports keeping `batch()` in the API. The polyfill has no batch: a + `Watcher` callback that schedules a microtask groups writes by + construction. +3. **Snapshot getters as enumerable own accessors?** No position. +4. **Arrow-function methods and `#private` fields?** No position. +5. **Native `Map` and `Set`?** No position. +6. **Opt-in or opt-out for nested class instances?** No position. +7. **Entry points and adapter names?** No position. +8. **Development diagnostics.** Both have weaker messages than ours for + cycles (finding 5). What they have that we lack: a bound on update loops + (finding 8), and the polyfill's ban on reads and writes during + notification. Its production build shows the cost of hiding messages + behind a development flag: the error is empty. If we add a development + build, keep the error text in production and drop only the extra checks. + +## What was verified by running code, and what was only read + +Verified by running, on Bun 1.4.4 with the published packages: + +- Every reproduction quoted above. Scripts 02 to 08 were re-run in this pass + and gave the same output as the first run, except the number of calls + before the stack overflowed in script 07 (3,017 against 3,025), which + depends on the stack. +- Scripts 01, 09 and 10 on the base were re-run; the figures quoted are from + the re-run. +- The spikes: `spike-stamp`, `spike-refresh` and `spike-one` against scripts + 01, 09, 10 and the probe (from the previous run of this task), and against + scripts 02 to 06 and 08 (this pass); `spike-memo` against script 02. + +Only read: + +- Every claim about the libraries' code paths, with the lines cited. +- That a stamp on our node version is safe for detached subtrees. A + suspended subtree's version is reconciled on resume (`ownership.ts`), which + `get` calls first (`core.ts:462`), so the stamp should see it; not tested. +- The repository's test suites were not run against any spike. +- Finding 40's line in the table. + +## Appendix: ported tests and their output + +All files are in +`/private/tmp/claude-501/-Users-robertparallax-WebstormProjects-classy-store/9c8c2bbd-bb57-4b12-aa7b-9d06972e3fdd/scratchpad/stage-2-signals/run/`. +`ours.ts` re-exports `batch`, `createClassyStore`, `snapshot` and `subscribe` +from the repository's `packages/classy-store/src/index.ts`; in each spike +folder it re-exports them from that folder's `src/index.ts`. +`polyfill-effect.ts` is the effect from the polyfill's README with a flush +counter added. + +### Helper: `ours.ts` + +```ts +// Our library, read from the repository's source. Nothing is installed there. +export { + batch, + createClassyStore, + snapshot, + subscribe, +} from '/Users/robertparallax/WebstormProjects/classy-store/packages/classy-store/src/index.ts'; +``` + +### Helper: `polyfill-effect.ts` + +```ts +// The proposal has no effect. This is the example from the polyfill's README +// (signal-polyfill 0.2.3, "Creating a simple effect"), with one addition: the +// number of flushes is counted so a test can stop a runaway loop. +import {Signal} from 'signal-polyfill'; + +export const flushes = {count: 0, limit: Number.POSITIVE_INFINITY}; +let needsEnqueue = true; + +const watcher = new Signal.subtle.Watcher(() => { + if (needsEnqueue) { + needsEnqueue = false; + queueMicrotask(processPending); + } +}); + +function processPending() { + needsEnqueue = true; + if (++flushes.count > flushes.limit) return; + for (const pending of watcher.getPending()) pending.get(); + watcher.watch(); +} + +export function effect(callback: () => void): () => void { + const computed = new Signal.Computed(() => { + callback(); + }); + watcher.watch(computed); + computed.get(); + return () => watcher.unwatch(computed); +} +``` + +### Script 01: `01-ladder.ts` + +```ts +// A ladder of computeds: two per level, each reading both of the level below. +// Same shape as script 07 of the MobX report, so the figures can be compared. +// "Clean read" is a read of the top when nothing changed: no body runs. +import {computed, effect, signal} from '@preact/signals-core'; +import {Signal} from 'signal-polyfill'; +import {createClassyStore} from './ours'; + +type Ladder = { + read: () => number; + setBase: (value: number) => void; + touchUnrelated: () => void; + runs: {count: number}; + observe?: () => () => void; +}; + +function oursLadder(depth: number): Ladder { + const runs = {count: 0}; + const target: Record = {base: 1, unrelated: 0}; + for (let level = 0; level < depth; level++) { + for (const side of ['l', 'r']) { + Object.defineProperty(target, `${side}${level}`, { + enumerable: true, + configurable: true, + get(this: Record) { + runs.count++; + return level === 0 + ? this.base + : this[`l${level - 1}`] + this[`r${level - 1}`]; + }, + }); + } + } + const store = createClassyStore(target) as Record; + const top = `l${depth - 1}`; + return { + read: () => store[top], + setBase: (value) => { + store.base = value; + }, + touchUnrelated: () => { + store.unrelated++; + }, + runs, + }; +} + +function preactLadder(depth: number): Ladder { + const runs = {count: 0}; + const base = signal(1); + const unrelated = signal(0); + let below = [base, base] as {value: number}[]; + for (let level = 0; level < depth; level++) { + const [l, r] = below; + const make = () => + computed(() => { + runs.count++; + return level === 0 ? base.value : l.value + r.value; + }); + below = [make(), make()]; + } + const top = below[0]; + return { + read: () => top.value, + setBase: (value) => { + base.value = value; + }, + touchUnrelated: () => { + unrelated.value++; + }, + runs, + observe: () => effect(() => void top.value), + }; +} + +function polyfillLadder(depth: number): Ladder { + const runs = {count: 0}; + const base = new Signal.State(1); + const unrelated = new Signal.State(0); + let below = [base, base] as {get(): number}[]; + for (let level = 0; level < depth; level++) { + const [l, r] = below; + const make = () => + new Signal.Computed(() => { + runs.count++; + return level === 0 ? base.get() : l.get() + r.get(); + }); + below = [make(), make()]; + } + const top = below[0] as Signal.Computed; + return { + read: () => top.get(), + setBase: (value) => base.set(value), + touchUnrelated: () => unrelated.set(unrelated.get() + 1), + runs, + observe: () => { + const watcher = new Signal.subtle.Watcher(() => {}); + watcher.watch(top); + return () => watcher.unwatch(top); + }, + }; +} + +/** Microseconds per call, averaged over `times` calls. */ +function micros(times: number, run: () => void, before?: () => void): string { + let total = 0; + for (let i = 0; i < times; i++) { + before?.(); + const start = performance.now(); + run(); + total += performance.now() - start; + } + return ((total / times) * 1000).toFixed(2).padStart(10); +} + +function measure( + name: string, + make: (depth: number) => Ladder, + depths: number[], + observed: boolean, +) { + console.log(`\n${name}${observed ? ', observed' : ''}`); + console.log( + 'depth | first read | clean read | read after an unrelated write | read after base changed | bodies run: first, clean, unrelated, base (times in microseconds)', + ); + for (const depth of depths) { + const ladder = make(depth); + const stop = observed ? ladder.observe?.() : undefined; + const times = + depth >= 16 && name === 'ours, live' && !process.env.SPIKE ? 3 : 200; + const first = observed ? ' -' : micros(1, ladder.read); + const firstRuns = ladder.runs.count; + const clean = micros(times, ladder.read); + const cleanRuns = ladder.runs.count - firstRuns; + const unrelated = micros(times, ladder.read, ladder.touchUnrelated); + const unrelatedRuns = ladder.runs.count - firstRuns - cleanRuns; + let next = 1; + const before = ladder.runs.count; + const dirty = micros(times, ladder.read, () => ladder.setBase(++next)); + const dirtyRuns = (ladder.runs.count - before) / times; + stop?.(); + console.log( + String(depth).padStart(5), + '|', + first, + '|', + clean, + '|', + unrelated.padStart(29), + '|', + dirty.padStart(23), + '|', + `${firstRuns}, ${cleanRuns}, ${unrelatedRuns}, ${dirtyRuns} per read`, + ); + } +} + +const spike = process.env.SPIKE === '1'; +measure( + 'ours, live', + oursLadder, + spike ? [4, 8, 12, 16, 18, 20, 200] : [4, 8, 12, 16, 18, 20], + false, +); +if (spike) process.exit(0); +measure('Preact Signals', preactLadder, [4, 8, 12, 16, 18, 20, 200], false); +measure('Preact Signals', preactLadder, [4, 8, 12, 16, 18, 20, 200], true); +measure('signal-polyfill', polyfillLadder, [4, 8, 12, 16, 18, 20, 200], false); +measure('signal-polyfill', polyfillLadder, [4, 8, 12, 16, 18, 20, 200], true); +``` + +Output on the base, this pass: + +```text + +ours, live +depth | first read | clean read | read after an unrelated write | read after base changed | bodies run: first, clean, unrelated, base (times in microseconds) + 4 | 220.33 | 3.27 | 1.60 | 4.57 | 7, 0, 0, 7 per read + 8 | 59.04 | 10.28 | 7.27 | 12.21 | 15, 0, 0, 15 per read + 12 | 379.96 | 79.32 | 65.94 | 105.05 | 23, 0, 0, 23 per read + 16 | 2258.54 | 1540.32 | 1111.15 | 1658.15 | 31, 0, 0, 31 per read + 18 | 7086.46 | 4707.40 | 4136.67 | 6480.60 | 35, 0, 0, 35 per read + 20 | 16926.46 | 16548.01 | 16424.39 | 25660.64 | 39, 0, 0, 39 per read + +Preact Signals +depth | first read | clean read | read after an unrelated write | read after base changed | bodies run: first, clean, unrelated, base (times in microseconds) + 4 | 143.25 | 0.43 | 0.94 | 1.97 | 7, 0, 0, 7 per read + 8 | 16.75 | 0.07 | 0.42 | 1.38 | 15, 0, 0, 15 per read + 12 | 7.25 | 0.04 | 0.60 | 1.69 | 23, 0, 0, 23 per read + 16 | 3.04 | 0.04 | 0.68 | 2.13 | 31, 0, 0, 31 per read + 18 | 4.37 | 0.04 | 0.61 | 2.09 | 35, 0, 0, 35 per read + 20 | 2.79 | 0.04 | 0.68 | 2.23 | 39, 0, 0, 39 per read + 200 | 156.54 | 0.05 | 11.58 | 21.88 | 399, 0, 0, 399 per read + +Preact Signals, observed +depth | first read | clean read | read after an unrelated write | read after base changed | bodies run: first, clean, unrelated, base (times in microseconds) + 4 | - | 0.03 | 0.04 | 0.04 | 7, 0, 0, 7 per read + 8 | - | 0.04 | 0.04 | 0.04 | 15, 0, 0, 15 per read + 12 | - | 0.04 | 0.04 | 0.04 | 23, 0, 0, 23 per read + 16 | - | 0.05 | 0.04 | 0.04 | 31, 0, 0, 31 per read + 18 | - | 0.04 | 0.04 | 0.04 | 35, 0, 0, 35 per read + 20 | - | 0.05 | 0.05 | 0.05 | 39, 0, 0, 39 per read + 200 | - | 0.04 | 0.04 | 0.04 | 399, 0, 0, 399 per read + +signal-polyfill +depth | first read | clean read | read after an unrelated write | read after base changed | bodies run: first, clean, unrelated, base (times in microseconds) + 4 | 184.75 | 0.59 | 1.25 | 2.75 | 7, 0, 0, 7 per read + 8 | 49.62 | 0.08 | 0.70 | 1.78 | 15, 0, 0, 15 per read + 12 | 28.29 | 0.05 | 0.83 | 1.95 | 23, 0, 0, 23 per read + 16 | 18.79 | 0.06 | 1.11 | 4.76 | 31, 0, 0, 31 per read + 18 | 32.17 | 0.05 | 1.05 | 2.94 | 35, 0, 0, 35 per read + 20 | 32.00 | 0.04 | 0.92 | 3.99 | 39, 0, 0, 39 per read + 200 | 170.88 | 0.05 | 9.55 | 35.67 | 399, 0, 0, 399 per read + +signal-polyfill, observed +depth | first read | clean read | read after an unrelated write | read after base changed | bodies run: first, clean, unrelated, base (times in microseconds) + 4 | - | 0.84 | 1.30 | 2.75 | 0, 7, 0, 7 per read + 8 | - | 0.28 | 1.12 | 2.60 | 0, 15, 0, 15 per read + 12 | - | 0.25 | 0.93 | 3.19 | 0, 23, 0, 23 per read + 16 | - | 0.15 | 1.17 | 4.06 | 0, 31, 0, 31 per read + 18 | - | 0.16 | 1.33 | 4.55 | 0, 35, 0, 35 per read + 20 | - | 0.18 | 1.53 | 5.31 | 0, 39, 0, 39 per read + 200 | - | 0.70 | 15.55 | 35.93 | 0, 399, 0, 399 per read +``` + +### Script 02: `02-diamond.ts` + +```ts +// A diamond (b and c over a, d over both), an equal-value cutoff, and a chain +// twenty levels deep. Ported from "nested getters, three levels deep" in +// core.characterisation.getters.test.ts (:81 live, :201 snapshots), widened. +import { + batch as preactBatch, + computed, + effect, + signal, +} from '@preact/signals-core'; +import {Signal} from 'signal-polyfill'; +import {batch, createClassyStore, snapshot, subscribe} from './ours'; +import {effect as polyfillEffect} from './polyfill-effect'; + +const tick = () => new Promise((resolve) => setTimeout(resolve, 0)); + +// ── ours ── +{ + const runs = {b: 0, c: 0, d: 0, parity: 0, label: 0}; + const pairs: string[] = []; + class Diamond { + a = 1; + get b() { + runs.b++; + return this.a + 1; + } + get c() { + runs.c++; + return this.a * 2; + } + get d() { + runs.d++; + pairs.push(`${this.b}/${this.c}`); + return this.b + this.c; + } + get parity() { + runs.parity++; + return this.a % 2; + } + get label() { + runs.label++; + return this.parity ? 'odd' : 'even'; + } + setTwice() { + this.a = 10; + this.a = 11; + } + } + const store = createClassyStore(new Diamond()); + const seen: number[] = []; + subscribe(store, () => seen.push(store.d), {sync: true}); + store.d; + store.label; + console.log('ours live first read ', JSON.stringify(runs)); + store.a = 3; + store.label; + console.log( + 'ours live a 1 -> 3, d and label ', + JSON.stringify(runs), + '| subscriber saw d =', + seen, + ); + store.setTwice(); + batch(() => { + store.a = 20; + store.a = 21; + }); + console.log( + 'ours live a method and a batch() ', + JSON.stringify(runs), + '| subscriber saw d =', + seen, + ); + console.log('ours live b/c pairs seen by d ', pairs.join(' ')); + + const snapRuns = {...runs}; + const before = snapshot(store); + before.d; + before.label; + store.a = 23; + const after = snapshot(store); + after.d; + after.label; + console.log( + 'ours snapshot a 21 -> 23, d and label ', + JSON.stringify( + Object.fromEntries( + Object.entries(runs).map(([key, value]) => [ + key, + value - snapRuns[key as keyof typeof runs], + ]), + ), + ), + '(runs since the line above, two snapshots)', + ); +} + +// ── Preact Signals ── +{ + const runs = {b: 0, c: 0, d: 0, parity: 0, label: 0}; + const pairs: string[] = []; + const a = signal(1); + const b = computed(() => (runs.b++, a.value + 1)); + const c = computed(() => (runs.c++, a.value * 2)); + const d = computed(() => { + runs.d++; + pairs.push(`${b.value}/${c.value}`); + return b.value + c.value; + }); + const parity = computed(() => (runs.parity++, a.value % 2)); + const label = computed(() => (runs.label++, parity.value ? 'odd' : 'even')); + const seen: number[] = []; + d.value; + label.value; + console.log('Preact first read ', JSON.stringify(runs)); + a.value = 3; + d.value; + label.value; + console.log('Preact a 1 -> 3, unobserved ', JSON.stringify(runs)); + const stop = effect(() => void seen.push(d.value)); + const stopLabel = effect(() => void label.value); + a.value = 5; + console.log( + 'Preact a 3 -> 5, in effects ', + JSON.stringify(runs), + '| effect saw d =', + seen, + ); + preactBatch(() => { + a.value = 20; + a.value = 21; + }); + console.log( + 'Preact a batch() ', + JSON.stringify(runs), + '| effect saw d =', + seen, + ); + console.log('Preact b/c pairs seen by d ', pairs.join(' ')); + stop(); + stopLabel(); +} + +// ── signal-polyfill ── +{ + const runs = {b: 0, c: 0, d: 0, parity: 0, label: 0}; + const pairs: string[] = []; + const a = new Signal.State(1); + const b = new Signal.Computed(() => (runs.b++, a.get() + 1)); + const c = new Signal.Computed(() => (runs.c++, a.get() * 2)); + const d = new Signal.Computed(() => { + runs.d++; + pairs.push(`${b.get()}/${c.get()}`); + return b.get() + c.get(); + }); + const parity = new Signal.Computed(() => (runs.parity++, a.get() % 2)); + const label = new Signal.Computed( + () => (runs.label++, parity.get() ? 'odd' : 'even'), + ); + d.get(); + label.get(); + console.log('polyfill first read ', JSON.stringify(runs)); + a.set(3); + d.get(); + label.get(); + console.log('polyfill a 1 -> 3, unwatched ', JSON.stringify(runs)); + const seen: number[] = []; + const stop = polyfillEffect(() => void seen.push(d.get())); + const stopLabel = polyfillEffect(() => void label.get()); + a.set(5); + a.set(7); + await tick(); + console.log( + 'polyfill a 3 -> 5 -> 7, README effect', + JSON.stringify(runs), + '| effect saw d =', + seen, + ); + console.log('polyfill b/c pairs seen by d ', pairs.join(' ')); + stop(); + stopLabel(); +} + +// ── a chain twenty levels deep: how often does each level run? ── +{ + const depth = 20; + const count = (list: number[]) => + `min ${Math.min(...list)}, max ${Math.max(...list)}, total ${list.reduce((sum, n) => sum + n, 0)}`; + + const oursRuns = new Array(depth).fill(0); + const target: Record = {base: 1, other: 0}; + for (let level = 0; level < depth; level++) { + Object.defineProperty(target, `g${level}`, { + enumerable: true, + configurable: true, + get(this: Record) { + oursRuns[level]++; + return level === 0 ? this.base : this[`g${level - 1}`] + 1; + }, + }); + } + const store = createClassyStore(target) as Record; + const report = (name: string, runsList: number[], value: number) => + console.log( + name.padEnd(46), + `top = ${value} | per level: ${count(runsList)}`, + ); + report('ours live chain of 20, first read', oursRuns, store.g19); + report('ours live read again', oursRuns, store.g19); + store.other = 1; + report('ours live after an unrelated write', oursRuns, store.g19); + store.base = 2; + report('ours live after base 1 -> 2', oursRuns, store.g19); + report('ours snapshot first snapshot read', oursRuns, snapshot(store).g19); + store.other = 2; + report( + 'ours snapshot after an unrelated write', + oursRuns, + snapshot(store).g19, + ); + store.base = 3; + report('ours snapshot after base 2 -> 3', oursRuns, snapshot(store).g19); + store.other = 3; + report( + 'ours snapshot after another unrelated write', + oursRuns, + snapshot(store).g19, + ); + + const preactRuns = new Array(depth).fill(0); + const base = signal(1); + const other = signal(0); + let previous: {value: number} = base; + for (let level = 0; level < depth; level++) { + const below = previous; + previous = computed( + () => (preactRuns[level]++, level === 0 ? base.value : below.value + 1), + ); + } + const top = previous; + report('Preact chain of 20, first read', preactRuns, top.value); + report('Preact read again', preactRuns, top.value); + other.value = 1; + report('Preact after an unrelated write', preactRuns, top.value); + base.value = 2; + report('Preact after base 1 -> 2', preactRuns, top.value); + + const polyRuns = new Array(depth).fill(0); + const pBase = new Signal.State(1); + const pOther = new Signal.State(0); + let pPrevious: {get(): number} = pBase; + for (let level = 0; level < depth; level++) { + const below = pPrevious; + pPrevious = new Signal.Computed( + () => (polyRuns[level]++, level === 0 ? pBase.get() : below.get() + 1), + ); + } + const pTop = pPrevious; + report('polyfill chain of 20, first read', polyRuns, pTop.get()); + report('polyfill read again', polyRuns, pTop.get()); + pOther.set(1); + report('polyfill after an unrelated write', polyRuns, pTop.get()); + pBase.set(2); + report('polyfill after base 1 -> 2', polyRuns, pTop.get()); +} +``` + +Output on the base, this pass: + +```text +ours live first read {"b":1,"c":1,"d":1,"parity":1,"label":1} +ours live a 1 -> 3, d and label {"b":2,"c":2,"d":2,"parity":2,"label":2} | subscriber saw d = [ + 10 +] +ours live a method and a batch() {"b":4,"c":4,"d":4,"parity":2,"label":2} | subscriber saw d = [ + 10, 34, 64 +] +ours live b/c pairs seen by d 2/2 4/6 12/22 22/42 +ours snapshot a 21 -> 23, d and label {"b":3,"c":3,"d":3,"parity":2,"label":1} (runs since the line above, two snapshots) +Preact first read {"b":1,"c":1,"d":1,"parity":1,"label":1} +Preact a 1 -> 3, unobserved {"b":2,"c":2,"d":2,"parity":2,"label":1} +Preact a 3 -> 5, in effects {"b":3,"c":3,"d":3,"parity":3,"label":1} | effect saw d = [ + 10, 16 +] +Preact a batch() {"b":4,"c":4,"d":4,"parity":4,"label":1} | effect saw d = [ + 10, 16, 64 +] +Preact b/c pairs seen by d 2/2 4/6 6/10 22/42 +polyfill first read {"b":1,"c":1,"d":1,"parity":1,"label":1} +polyfill a 1 -> 3, unwatched {"b":2,"c":2,"d":2,"parity":2,"label":1} +polyfill a 3 -> 5 -> 7, README effect {"b":3,"c":3,"d":3,"parity":3,"label":1} | effect saw d = [ + 10, 22 +] +polyfill b/c pairs seen by d 2/2 4/6 8/14 +ours live chain of 20, first read top = 20 | per level: min 1, max 1, total 20 +ours live read again top = 20 | per level: min 1, max 1, total 20 +ours live after an unrelated write top = 20 | per level: min 1, max 1, total 20 +ours live after base 1 -> 2 top = 21 | per level: min 2, max 2, total 40 +ours snapshot first snapshot read top = 21 | per level: min 3, max 3, total 60 +ours snapshot after an unrelated write top = 21 | per level: min 3, max 4, total 79 +ours snapshot after base 2 -> 3 top = 22 | per level: min 4, max 5, total 99 +ours snapshot after another unrelated write top = 22 | per level: min 4, max 5, total 99 +Preact chain of 20, first read top = 20 | per level: min 1, max 1, total 20 +Preact read again top = 20 | per level: min 1, max 1, total 20 +Preact after an unrelated write top = 20 | per level: min 1, max 1, total 20 +Preact after base 1 -> 2 top = 21 | per level: min 2, max 2, total 40 +polyfill chain of 20, first read top = 20 | per level: min 1, max 1, total 20 +polyfill read again top = 20 | per level: min 1, max 1, total 20 +polyfill after an unrelated write top = 20 | per level: min 1, max 1, total 20 +polyfill after base 1 -> 2 top = 21 | per level: min 2, max 2, total 40 +``` + +### Script 03: `03-cycles.ts` + +```ts +// Cycles between computeds. Ported from "getters that read each other in a +// cycle" in core.characterisation.getters.test.ts (:1049), plus a cycle that +// a later write breaks, to see whether the error outlives the cycle. +import {computed, signal} from '@preact/signals-core'; +import {Signal} from 'signal-polyfill'; +import {createClassyStore, snapshot} from './ours'; + +const attempt = (run: () => unknown): string => { + try { + return `returned ${JSON.stringify(run())}`; + } catch (error) { + const e = error as Error; + return `threw ${e.constructor.name}: ${e.message.slice(0, 90)}`; + } +}; +const line = (name: string, text: string) => console.log(name.padEnd(44), text); + +// ── a plain cycle: a reads b, b reads a ── +{ + class Loop { + get a(): number { + return this.b + 1; + } + get b(): number { + return this.a + 1; + } + get self(): number { + return this.self + 1; + } + } + const store = createClassyStore(new Loop()); + line( + 'ours live a <-> b', + attempt(() => store.a), + ); + line( + 'ours live a <-> b, read again', + attempt(() => store.a), + ); + line( + 'ours live self', + attempt(() => store.self), + ); + line( + 'ours snapshot a <-> b', + attempt(() => snapshot(store).a), + ); + + const a: {value: number} = computed(() => b.value + 1); + const b: {value: number} = computed(() => a.value + 1); + const self: {value: number} = computed(() => self.value + 1); + line( + 'Preact a <-> b', + attempt(() => a.value), + ); + line( + 'Preact a <-> b, read again', + attempt(() => a.value), + ); + line( + 'Preact self', + attempt(() => self.value), + ); + + const pa: Signal.Computed = new Signal.Computed(() => pb.get() + 1); + const pb: Signal.Computed = new Signal.Computed(() => pa.get() + 1); + const pself: Signal.Computed = new Signal.Computed( + () => pself.get() + 1, + ); + line( + 'polyfill a <-> b', + attempt(() => pa.get()), + ); + line( + 'polyfill a <-> b, read again', + attempt(() => pa.get()), + ); + line( + 'polyfill self', + attempt(() => pself.get()), + ); +} + +// ── a cycle that a write breaks: a = looped ? b : 0, b = a + 1 ── +console.log(); +{ + class Breakable { + looped = true; + get a(): number { + return this.looped ? this.b : 0; + } + get b(): number { + return this.a + 1; + } + } + const store = createClassyStore(new Breakable()); + line( + 'ours live while looped: a', + attempt(() => store.a), + ); + store.looped = false; + line( + 'ours live after looped = false: a', + attempt(() => store.a), + ); + line( + 'ours live after looped = false: b', + attempt(() => store.b), + ); + store.looped = true; + line( + 'ours snapshot while looped: a', + attempt(() => snapshot(store).a), + ); + store.looped = false; + line( + 'ours snapshot after looped = false: b', + attempt(() => snapshot(store).b), + ); + + const looped = signal(true); + const a: {value: number} = computed(() => (looped.value ? b.value : 0)); + const b: {value: number} = computed(() => a.value + 1); + line( + 'Preact while looped: a', + attempt(() => a.value), + ); + looped.value = false; + line( + 'Preact after looped = false: a', + attempt(() => a.value), + ); + line( + 'Preact after looped = false: b', + attempt(() => b.value), + ); + looped.value = true; + looped.value = false; + line( + 'Preact after another round trip: b', + attempt(() => b.value), + ); + + const pLooped = new Signal.State(true); + const pa: Signal.Computed = new Signal.Computed(() => + pLooped.get() ? pb.get() : 0, + ); + const pb: Signal.Computed = new Signal.Computed(() => pa.get() + 1); + line( + 'polyfill while looped: a', + attempt(() => pa.get()), + ); + pLooped.set(false); + line( + 'polyfill after looped = false: a', + attempt(() => pa.get()), + ); + line( + 'polyfill after looped = false: b', + attempt(() => pb.get()), + ); + line( + 'polyfill sources of b', + JSON.stringify(Signal.subtle.introspectSources(pb).length), + ); +} +``` + +Output on the base, this pass: + +```text +ours live a <-> b threw Error: @codebelt/classy-store: circular computed getter dependency: a → b → a +ours live a <-> b, read again threw Error: @codebelt/classy-store: circular computed getter dependency: a → b → a +ours live self threw Error: @codebelt/classy-store: circular computed getter dependency: self → self +ours snapshot a <-> b threw RangeError: Maximum call stack size exceeded. +Preact a <-> b threw Error: Cycle detected +Preact a <-> b, read again threw Error: Cycle detected +Preact self threw Error: Cycle detected +polyfill a <-> b threw Error: Detected cycle in computations. +polyfill a <-> b, read again threw Error: Detected cycle in computations. +polyfill self threw Error: Detected cycle in computations. + +ours live while looped: a threw Error: @codebelt/classy-store: circular computed getter dependency: a → b → a +ours live after looped = false: a returned 0 +ours live after looped = false: b returned 1 +ours snapshot while looped: a threw RangeError: Maximum call stack size exceeded. +ours snapshot after looped = false: b returned 1 +Preact while looped: a threw Error: Cycle detected +Preact after looped = false: a returned 0 +Preact after looped = false: b threw Error: Cycle detected +Preact after another round trip: b threw Error: Cycle detected +polyfill while looped: a threw Error: Detected cycle in computations. +polyfill after looped = false: a returned 0 +polyfill after looped = false: b threw Error: Detected cycle in computations. +polyfill sources of b 0 +``` + +### Script 04: `04-errors.ts` + +```ts +// A computed that throws and then recovers, and one that catches another's +// error. Ported from "a getter that throws" (:1160) and "a getter that catches +// the error of another getter" (:1270) in core.characterisation.getters.test.ts. +import {computed, signal} from '@preact/signals-core'; +import {Signal} from 'signal-polyfill'; +import {createClassyStore, snapshot} from './ours'; + +const line = (name: string, text: string) => console.log(name.padEnd(40), text); + +type Subject = { + name: string; + strict: () => string; + safe: () => string; + outer: () => string; + setReady: (value: boolean) => void; + touchOther: () => void; + runs: {strict: number; safe: number; outer: number}; +}; + +function exercise({ + name, + strict, + safe, + outer, + setReady, + touchOther, + runs, +}: Subject) { + const errors: unknown[] = []; + const read = (run: () => string) => { + try { + return run(); + } catch (error) { + errors.push(error); + return `threw ${(error as Error).message}`; + } + }; + line( + `${name} strict, first read`, + `${read(strict)} | runs ${JSON.stringify(runs)}`, + ); + line( + `${name} strict, read again`, + `${read(strict)} | runs ${JSON.stringify(runs)} | same error object: ${errors[0] === errors[1]}`, + ); + line( + `${name} outer (reads strict)`, + `${read(outer)} | runs ${JSON.stringify(runs)} | same error object: ${errors[0] === errors[2]}`, + ); + line( + `${name} safe (catches strict)`, + `${read(safe)} | runs ${JSON.stringify(runs)}`, + ); + touchOther(); + line( + `${name} after an unrelated write`, + `${read(strict)} | runs ${JSON.stringify(runs)} | same error object: ${errors[0] === errors[3]}`, + ); + setReady(true); + line( + `${name} after ready = true: safe`, + `${read(safe)} | runs ${JSON.stringify(runs)}`, + ); + line( + `${name} after ready = true: outer`, + `${read(outer)} | strict: ${read(strict)} | runs ${JSON.stringify(runs)}`, + ); + setReady(false); + line( + `${name} after ready = false: safe`, + `${read(safe)} | outer: ${read(outer)} | runs ${JSON.stringify(runs)}`, + ); + console.log(); +} + +// ── ours, live and snapshot ── +function ours(viaSnapshot: boolean) { + const runs = {strict: 0, safe: 0, outer: 0}; + class Loader { + ready = false; + other = 0; + get strict(): string { + runs.strict++; + if (!this.ready) throw new RangeError('not ready'); + return 'ready'; + } + get outer(): string { + runs.outer++; + return `outer:${this.strict}`; + } + get safe(): string { + runs.safe++; + try { + return this.strict; + } catch { + return 'fallback'; + } + } + } + const store = createClassyStore(new Loader()); + const view = () => (viaSnapshot ? snapshot(store) : store); + exercise({ + name: viaSnapshot ? 'ours snapshot ' : 'ours live ', + strict: () => view().strict, + safe: () => view().safe, + outer: () => view().outer, + setReady: (value) => { + store.ready = value; + }, + touchOther: () => { + store.other++; + }, + runs, + }); +} +ours(false); +ours(true); + +// ── Preact Signals ── +{ + const runs = {strict: 0, safe: 0, outer: 0}; + const ready = signal(false); + const other = signal(0); + const strict = computed(() => { + runs.strict++; + if (!ready.value) throw new RangeError('not ready'); + return 'ready'; + }); + const outer = computed(() => (runs.outer++, `outer:${strict.value}`)); + const safe = computed(() => { + runs.safe++; + try { + return strict.value; + } catch { + return 'fallback'; + } + }); + exercise({ + name: 'Preact ', + strict: () => strict.value, + safe: () => safe.value, + outer: () => outer.value, + setReady: (value) => { + ready.value = value; + }, + touchOther: () => { + other.value++; + }, + runs, + }); +} + +// ── signal-polyfill ── +{ + const runs = {strict: 0, safe: 0, outer: 0}; + const ready = new Signal.State(false); + const other = new Signal.State(0); + const strict = new Signal.Computed(() => { + runs.strict++; + if (!ready.get()) throw new RangeError('not ready'); + return 'ready'; + }); + const outer = new Signal.Computed( + () => (runs.outer++, `outer:${strict.get()}`), + ); + const safe = new Signal.Computed(() => { + runs.safe++; + try { + return strict.get(); + } catch { + return 'fallback'; + } + }); + exercise({ + name: 'polyfill ', + strict: () => strict.get(), + safe: () => safe.get(), + outer: () => outer.get(), + setReady: (value) => ready.set(value), + touchOther: () => other.set(other.get() + 1), + runs, + }); +} +``` + +Output on the base, this pass: + +```text +ours live strict, first read threw not ready | runs {"strict":1,"safe":0,"outer":0} +ours live strict, read again threw not ready | runs {"strict":2,"safe":0,"outer":0} | same error object: false +ours live outer (reads strict) threw not ready | runs {"strict":3,"safe":0,"outer":1} | same error object: false +ours live safe (catches strict) fallback | runs {"strict":4,"safe":1,"outer":1} +ours live after an unrelated write threw not ready | runs {"strict":5,"safe":1,"outer":1} | same error object: false +ours live after ready = true: safe fallback | runs {"strict":5,"safe":1,"outer":1} +ours live after ready = true: outer outer:ready | strict: ready | runs {"strict":6,"safe":1,"outer":2} +ours live after ready = false: safe fallback | outer: threw not ready | runs {"strict":7,"safe":1,"outer":3} + +ours snapshot strict, first read threw not ready | runs {"strict":1,"safe":0,"outer":0} +ours snapshot strict, read again threw not ready | runs {"strict":2,"safe":0,"outer":0} | same error object: false +ours snapshot outer (reads strict) threw not ready | runs {"strict":3,"safe":0,"outer":1} | same error object: false +ours snapshot safe (catches strict) fallback | runs {"strict":4,"safe":1,"outer":1} +ours snapshot after an unrelated write threw not ready | runs {"strict":5,"safe":1,"outer":1} | same error object: false +ours snapshot after ready = true: safe fallback | runs {"strict":5,"safe":1,"outer":1} +ours snapshot after ready = true: outer outer:ready | strict: ready | runs {"strict":6,"safe":1,"outer":2} +ours snapshot after ready = false: safe fallback | outer: threw not ready | runs {"strict":7,"safe":1,"outer":2} + +Preact strict, first read threw not ready | runs {"strict":1,"safe":0,"outer":0} +Preact strict, read again threw not ready | runs {"strict":1,"safe":0,"outer":0} | same error object: true +Preact outer (reads strict) threw not ready | runs {"strict":1,"safe":0,"outer":1} | same error object: true +Preact safe (catches strict) fallback | runs {"strict":1,"safe":1,"outer":1} +Preact after an unrelated write threw not ready | runs {"strict":1,"safe":1,"outer":1} | same error object: true +Preact after ready = true: safe ready | runs {"strict":2,"safe":2,"outer":1} +Preact after ready = true: outer outer:ready | strict: ready | runs {"strict":2,"safe":2,"outer":2} +Preact after ready = false: safe fallback | outer: threw not ready | runs {"strict":3,"safe":3,"outer":3} + +polyfill strict, first read threw not ready | runs {"strict":1,"safe":0,"outer":0} +polyfill strict, read again threw not ready | runs {"strict":1,"safe":0,"outer":0} | same error object: true +polyfill outer (reads strict) threw not ready | runs {"strict":1,"safe":0,"outer":1} | same error object: true +polyfill safe (catches strict) fallback | runs {"strict":1,"safe":1,"outer":1} +polyfill after an unrelated write threw not ready | runs {"strict":1,"safe":1,"outer":1} | same error object: true +polyfill after ready = true: safe ready | runs {"strict":2,"safe":2,"outer":1} +polyfill after ready = true: outer outer:ready | strict: ready | runs {"strict":2,"safe":2,"outer":2} +polyfill after ready = false: safe fallback | outer: threw not ready | runs {"strict":3,"safe":3,"outer":3} + +``` + +### Script 05: `05-dynamic-deps.ts` + +```ts +// A dependency that is read on one run and not on the next. Written for this +// comparison: I found no test of ours for this case by name. +import {computed, effect, signal} from '@preact/signals-core'; +import {Signal} from 'signal-polyfill'; +import {createClassyStore, snapshot, subscribe} from './ours'; + +const line = (name: string, text: string) => console.log(name.padEnd(34), text); + +type Subject = { + name: string; + pick: () => string; + set: (key: 'useA' | 'a' | 'b', value: boolean | string) => void; + runs: {pick: number}; +}; + +function exercise({name, pick, set, runs}: Subject) { + const steps: string[] = []; + const step = (label: string) => + steps.push(`${label}: ${pick()} (${runs.pick})`); + step('start'); + set('b', 'B2'); + step('b changed, not read'); + set('useA', false); + step('switched to b'); + set('a', 'A2'); + step('a changed, no longer read'); + set('b', 'B3'); + step('b changed, read'); + set('useA', true); + step('switched back'); + line(name, steps.join(' | ')); +} + +function ours(viaSnapshot: boolean) { + const runs = {pick: 0}; + class Picker { + useA = true; + a = 'A1'; + b = 'B1'; + get pick() { + runs.pick++; + return this.useA ? this.a : this.b; + } + } + const store = createClassyStore(new Picker()); + exercise({ + name: viaSnapshot ? 'ours snapshot' : 'ours live', + pick: () => (viaSnapshot ? snapshot(store) : store).pick, + set: (key, value) => { + (store as Record)[key] = value; + }, + runs, + }); +} +ours(false); +ours(true); + +{ + const runs = {pick: 0}; + const state = {useA: signal(true), a: signal('A1'), b: signal('B1')}; + const pick = computed( + () => (runs.pick++, state.useA.value ? state.a.value : state.b.value), + ); + exercise({ + name: 'Preact, unobserved', + pick: () => pick.value, + set: (key, value) => { + (state[key] as {value: unknown}).value = value; + }, + runs, + }); +} +{ + const runs = {pick: 0}; + const state = {useA: signal(true), a: signal('A1'), b: signal('B1')}; + const pick = computed( + () => (runs.pick++, state.useA.value ? state.a.value : state.b.value), + ); + let effectRuns = 0; + const stop = effect(() => { + effectRuns++; + pick.value; + }); + exercise({ + name: 'Preact, in an effect', + pick: () => pick.value, + set: (key, value) => { + (state[key] as {value: unknown}).value = value; + }, + runs, + }); + line( + 'Preact, in an effect', + `effect ran ${effectRuns} times for 5 writes, 2 of them to a field pick did not read at the time`, + ); + stop(); +} +{ + const runs = {pick: 0}; + const state = { + useA: new Signal.State(true), + a: new Signal.State('A1'), + b: new Signal.State('B1'), + }; + const pick = new Signal.Computed( + () => (runs.pick++, state.useA.get() ? state.a.get() : state.b.get()), + ); + exercise({ + name: 'polyfill, unwatched', + pick: () => pick.get(), + set: (key, value) => (state[key] as Signal.State).set(value), + runs, + }); + line( + 'polyfill, unwatched', + `sources after the last run: ${Signal.subtle.introspectSources(pick).length}`, + ); +} + +// What a subscriber hears: ours is told about every write to the store, +// whether or not anything it reads depends on the field. +{ + class Picker { + useA = true; + a = 'A1'; + b = 'B1'; + get pick() { + return this.useA ? this.a : this.b; + } + } + const store = createClassyStore(new Picker()); + let calls = 0; + subscribe(store, () => void calls++, {sync: true}); + store.b = 'B2'; + store.useA = false; + store.a = 'A2'; + line( + 'ours, sync subscriber', + `called ${calls} times for 3 writes, 2 of them to a field pick does not read at the time`, + ); +} +``` + +Output on the base, this pass: + +```text +ours live start: A1 (1) | b changed, not read: A1 (1) | switched to b: B2 (2) | a changed, no longer read: B2 (2) | b changed, read: B3 (3) | switched back: A2 (4) +ours snapshot start: A1 (1) | b changed, not read: A1 (1) | switched to b: B2 (2) | a changed, no longer read: B2 (2) | b changed, read: B3 (3) | switched back: A2 (4) +Preact, unobserved start: A1 (1) | b changed, not read: A1 (1) | switched to b: B2 (2) | a changed, no longer read: B2 (2) | b changed, read: B3 (3) | switched back: A2 (4) +Preact, in an effect start: A1 (1) | b changed, not read: A1 (1) | switched to b: B2 (2) | a changed, no longer read: B2 (2) | b changed, read: B3 (3) | switched back: A2 (4) +Preact, in an effect effect ran 4 times for 5 writes, 2 of them to a field pick did not read at the time +polyfill, unwatched start: A1 (1) | b changed, not read: A1 (1) | switched to b: B2 (2) | a changed, no longer read: B2 (2) | b changed, read: B3 (3) | switched back: A2 (4) +polyfill, unwatched sources after the last run: 2 +ours, sync subscriber called 3 times for 3 writes, 2 of them to a field pick does not read at the time +``` + +### Script 06: `06-computed-writes.ts` + +```ts +// A computed that writes. Ported from "a getter that writes to the store +// while it runs" in core.characterisation.getters.test.ts (:1325). +import {computed, effect, signal} from '@preact/signals-core'; +import {Signal} from 'signal-polyfill'; +import {createClassyStore, snapshot, subscribe} from './ours'; + +const line = (name: string, text: string) => console.log(name.padEnd(46), text); +const attempt = (run: () => unknown): string => { + try { + return JSON.stringify(run()); + } catch (error) { + return `threw ${(error as Error).constructor.name}: ${(error as Error).message}`; + } +}; + +// ── writes a field it does not read ── +{ + const runs = {doubled: 0}; + class Counter { + count = 1; + reads = 0; + get doubled() { + runs.doubled++; + this.reads = runs.doubled; + return this.count * 2; + } + } + const store = createClassyStore(new Counter()); + let calls = 0; + subscribe(store, () => void calls++, {sync: true}); + const values = [store.doubled, store.doubled, store.doubled]; + line( + 'ours live writes another field', + `values ${JSON.stringify(values)} | runs ${runs.doubled} | reads field ${store.reads} | subscriber calls ${calls}`, + ); + const snap = snapshot(store); + const before = runs.doubled; + line( + 'ours snapshot writes another field', + `${attempt(() => [snap.doubled, snap.doubled])} | runs ${runs.doubled - before}, and the body wrote ${runs.doubled} | reads field on the snapshot ${snap.reads}, on the store ${store.reads}`, + ); +} +{ + const runs = {doubled: 0}; + const count = signal(1); + const reads = signal(0); + const doubled = computed(() => { + runs.doubled++; + reads.value = runs.doubled; + return count.value * 2; + }); + let effectRuns = 0; + const stop = effect(() => void (reads.value, effectRuns++)); + const values = [doubled.value, doubled.value, doubled.value]; + line( + 'Preact writes another signal', + `values ${JSON.stringify(values)} | runs ${runs.doubled} | reads signal ${reads.value} | effect runs ${effectRuns}`, + ); + stop(); +} +{ + const runs = {doubled: 0}; + const count = new Signal.State(1); + const reads = new Signal.State(0); + const doubled = new Signal.Computed(() => { + runs.doubled++; + reads.set(runs.doubled); + return count.get() * 2; + }); + const values = [doubled.get(), doubled.get(), doubled.get()]; + line( + 'polyfill writes another signal', + `values ${JSON.stringify(values)} | runs ${runs.doubled} | reads signal ${reads.get()}`, + ); +} + +// ── writes the field it reads ── +console.log(); +{ + const runs = {next: 0}; + class Ticker { + n = 0; + get next() { + runs.next++; + this.n = this.n + 1; + return this.n; + } + } + const store = createClassyStore(new Ticker()); + let calls = 0; + subscribe(store, () => void calls++, {sync: true}); + const values = [store.next, store.next, store.next]; + line( + 'ours live writes what it reads', + `values ${JSON.stringify(values)} | runs ${runs.next} | n ${store.n} | subscriber calls ${calls}`, + ); + const store2 = createClassyStore(new Ticker()); + const snap = snapshot(store2); + line( + 'ours snapshot writes what it reads', + `${attempt(() => [snap.next, snap.next])} | n on the snapshot ${snap.n}, on the store ${store2.n}`, + ); +} +{ + const runs = {next: 0}; + const n = signal(0); + const next = computed(() => { + runs.next++; + n.value = n.value + 1; + return n.value; + }); + const values = [next.value, next.value, next.value]; + line( + 'Preact writes what it reads', + `values ${JSON.stringify(values)} | runs ${runs.next} | n ${n.value}`, + ); + line( + 'Preact the same, read by an effect', + attempt(() => { + const stop = effect(() => void next.value); + stop(); + return `no error | runs ${runs.next} | n ${n.value}`; + }), + ); +} +{ + const runs = {next: 0}; + const n = new Signal.State(0); + const next = new Signal.Computed(() => { + runs.next++; + n.set(n.get() + 1); + return n.get(); + }); + const values = [next.get(), next.get(), next.get()]; + line( + 'polyfill writes what it reads', + `values ${JSON.stringify(values)} | runs ${runs.next} | n ${n.get()}`, + ); + const watcher = new Signal.subtle.Watcher(() => {}); + watcher.watch(next); + line( + 'polyfill the same, watched', + attempt(() => [next.get(), next.get()]) + + ` | runs ${runs.next} | n ${n.get()}`, + ); +} +``` + +Output on the base, this pass: + +```text +ours live writes another field values [2,2,2] | runs 1 | reads field 1 | subscriber calls 1 +ours snapshot writes another field [2,2] | runs 1, and the body wrote 2 | reads field on the snapshot 1, on the store 1 +Preact writes another signal values [2,2,2] | runs 1 | reads signal 1 | effect runs 2 +polyfill writes another signal values [2,2,2] | runs 1 | reads signal 1 + +ours live writes what it reads values [1,2,3] | runs 3 | n 3 | subscriber calls 3 +ours snapshot writes what it reads [0,0] | n on the snapshot 0, on the store 0 +Preact writes what it reads values [1,2,3] | runs 3 | n 3 +Preact the same, read by an effect threw Error: Cycle detected +polyfill writes what it reads values [1,1,1] | runs 1 | n 1 +polyfill the same, watched [1,1] | runs 1 | n 1 +``` + +### Script 07: `07-effect-writes.ts` + +```ts +// A subscriber that writes to what it reads, and what happens to the others. +// Ported from "a write made inside a sync subscriber" (:501), "a subscriber +// that throws" (:833) and "unsubscribing during delivery" (:1148) in +// core.characterisation.notifications.test.ts. +import {effect, signal} from '@preact/signals-core'; +import {Signal} from 'signal-polyfill'; +import {createClassyStore, subscribe} from './ours'; +import {flushes, effect as polyfillEffect} from './polyfill-effect'; + +const tick = () => new Promise((resolve) => setTimeout(resolve, 0)); +const line = (name: string, text: string) => console.log(name.padEnd(48), text); +const attempt = (run: () => unknown): string => { + try { + const value = run(); + return value === undefined ? 'no error' : String(value); + } catch (error) { + return `threw ${(error as Error).constructor.name}: ${(error as Error).message}`; + } +}; +const consoleErrors: string[] = []; +const realError = console.error; +console.error = (...args: unknown[]) => + void consoleErrors.push( + String((args[0] as Error)?.message ?? args[0]).slice(0, 60), + ); + +// ── a subscriber that writes until a limit: converges ── +{ + const store = createClassyStore({n: 0}); + const seen: number[] = []; + subscribe( + store, + () => { + seen.push(store.n); + if (store.n < 3) store.n++; + }, + {sync: true}, + ); + store.n = 1; + line( + 'ours sync writes until n is 3', + `seen ${JSON.stringify(seen)} | n ${store.n}`, + ); + + const n = signal(0); + const pSeen: number[] = []; + const stop = effect(() => { + pSeen.push(n.value); + if (n.value > 0 && n.value < 3) n.value++; + }); + n.value = 1; + line( + 'Preact effect writes until n is 3', + `seen ${JSON.stringify(pSeen)} | n ${n.value}`, + ); + stop(); +} + +// ── a subscriber that always writes ── +{ + const store = createClassyStore({n: 0}); + let calls = 0; + subscribe( + store, + () => { + calls++; + store.n++; + }, + {sync: true}, + ); + line( + 'ours sync always writes', + `${attempt(() => { + store.n = 1; + })} at the write | calls ${calls} | n ${store.n} | console.error: ${JSON.stringify(consoleErrors)}`, + ); + consoleErrors.length = 0; + + const n = signal(0); + let runs = 0; + line( + 'Preact effect always writes, at creation', + `${attempt(() => { + effect(() => { + runs++; + n.value = n.value + 1; + }); + })} | runs ${runs} | n ${n.value}`, + ); + + const m = signal(0); + let mRuns = 0; + const stop = effect(() => { + mRuns++; + if (m.value > 0) m.value = m.value + 1; + }); + line( + 'Preact effect always writes, after a write', + `${attempt(() => { + m.value = 1; + })} at the write | runs ${mRuns} | m ${m.value}`, + ); + line( + 'Preact effect the next write', + `${attempt(() => { + m.value = 1000; + })} | runs ${mRuns} | m ${m.value}`, + ); + stop(); +} + +// ── the polyfill: a Watcher may not read or write ── +{ + const state = new Signal.State(0); + const other = new Signal.State(0); + const derived = new Signal.Computed(() => state.get() * 2); + let secondCalled = 0; + const writing = new Signal.subtle.Watcher(() => other.set(1)); + const second = new Signal.subtle.Watcher(() => void secondCalled++); + writing.watch(derived); + second.watch(derived); + derived.get(); + line( + 'polyfill Watcher that writes', + `${attempt(() => state.set(1))} at the write | state ${state.get()} | second watcher called ${secondCalled}`, + ); + writing.unwatch(derived); + second.unwatch(derived); + + const reading = new Signal.subtle.Watcher(() => void derived.get()); + reading.watch(derived); + derived.get(); + line( + 'polyfill Watcher that reads', + `${attempt(() => state.set(2))} at the write | state ${state.get()}`, + ); + reading.unwatch(derived); + + // The README effect runs in a microtask, so a write inside it is allowed. + const n = new Signal.State(0); + let runs = 0; + const stop = polyfillEffect(() => { + runs++; + n.set(n.get() + 1); + }); + await tick(); + line( + 'polyfill README effect, writes what it reads', + `runs ${runs} | n ${n.get()} | microtask flushes ${flushes.count}`, + ); + stop(); +} + +// ── a subscriber that throws: who hears about it, and does the next one run? ── +console.log(); +{ + const store = createClassyStore({n: 0}); + let second = 0; + subscribe( + store, + () => { + throw new Error('first subscriber failed'); + }, + {sync: true}, + ); + subscribe(store, () => void second++, {sync: true}); + line( + 'ours sync first subscriber throws', + `${attempt(() => { + store.n = 1; + })} at the write | second called ${second} | console.error: ${JSON.stringify(consoleErrors)}`, + ); + consoleErrors.length = 0; + + const n = signal(0); + let pSecond = 0; + const stopA = effect(() => { + if (n.value > 0) throw new Error('first effect failed'); + }); + const stopB = effect(() => void (n.value, pSecond++)); + line( + 'Preact first effect throws', + `${attempt(() => { + n.value = 1; + })} at the write | n ${n.value} | second ran ${pSecond - 1} | console.error: ${JSON.stringify(consoleErrors)}`, + ); + line( + 'Preact the next write', + `${attempt(() => { + n.value = 2; + })} at the write | second ran ${pSecond - 1}`, + ); + stopA(); + stopB(); +} + +// ── a subscriber removed by an earlier one, and a re-entrant write ── +console.log(); +{ + const store = createClassyStore({n: 0}); + const calls: string[] = []; + const stopSecond: {run?: () => void} = {}; + subscribe( + store, + () => { + calls.push('first'); + stopSecond.run?.(); + }, + {sync: true}, + ); + stopSecond.run = subscribe(store, () => void calls.push('second'), { + sync: true, + }); + store.n = 1; + line('ours sync second removed by first', JSON.stringify(calls)); + + const n = signal(0); + const pCalls: string[] = []; + const pStop: {run?: () => void} = {}; + effect(() => { + pCalls.push('first'); + if (n.value > 0) pStop.run?.(); + }); + pStop.run = effect(() => void (n.value, pCalls.push('second'))); + pCalls.length = 0; + n.value = 1; + line('Preact second removed by first', JSON.stringify(pCalls)); +} +{ + const store = createClassyStore({n: 0}); + const calls: string[] = []; + subscribe( + store, + () => { + calls.push(`first:${store.n}`); + if (store.n === 1) store.n = 2; + }, + {sync: true}, + ); + subscribe(store, () => void calls.push(`second:${store.n}`), {sync: true}); + store.n = 1; + line('ours sync re-entrant write', JSON.stringify(calls)); + + const n = signal(0); + const pCalls: string[] = []; + effect(() => { + pCalls.push(`first:${n.value}`); + if (n.value === 1) n.value = 2; + }); + effect(() => void pCalls.push(`second:${n.value}`)); + pCalls.length = 0; + n.value = 1; + line('Preact re-entrant write', JSON.stringify(pCalls)); +} +console.error = realError; +``` + +Output on the base, this pass: + +```text +ours sync writes until n is 3 seen [1,2,3] | n 3 +Preact effect writes until n is 3 seen [0,1,2,3] | n 3 +ours sync always writes no error at the write | calls 3017 | n 3018 | console.error: ["Maximum call stack size exceeded."] +Preact effect always writes, at creation threw Error: Cycle detected | runs 102 | n 101 +Preact effect always writes, after a write threw Error: Cycle detected at the write | runs 102 | m 101 +Preact effect the next write threw Error: Cycle detected | runs 203 | m 1100 +polyfill Watcher that writes threw Error: Writes to signals not permitted during Watcher callback at the write | state 1 | second watcher called 0 +polyfill Watcher that reads threw Error: at the write | state 2 +polyfill README effect, writes what it reads runs 1 | n 1 | microtask flushes 0 + +ours sync first subscriber throws no error at the write | second called 1 | console.error: ["first subscriber failed"] +Preact first effect throws threw Error: first effect failed at the write | n 1 | second ran 1 | console.error: [] +Preact the next write threw Error: first effect failed at the write | second ran 2 + +ours sync second removed by first ["first","second"] +Preact second removed by first ["first"] +ours sync re-entrant write ["first:1","first:2","second:2","second:2"] +Preact re-entrant write ["first:1","second:2","first:2"] +``` + +### Script 08: `08-batching.ts` + +```ts +// Batching, and when subscribers run. Ported from "transactions" (:10) and +// "batch()" (:237) in core.transactions.test.ts, and "subscribing or +// unsubscribing between a write and its delivery" (:414) in +// core.characterisation.notifications.test.ts. +import { + action, + batch as preactBatch, + computed, + createModel, + effect, + signal, +} from '@preact/signals-core'; +import {Signal} from 'signal-polyfill'; +import {batch, createClassyStore, snapshot, subscribe} from './ours'; + +const line = (name: string, text: string) => console.log(name.padEnd(50), text); +const attempt = (run: () => unknown): string => { + try { + run(); + return 'no error'; + } catch (error) { + return `threw ${(error as Error).message}`; + } +}; + +class Cart { + price = 10; + quantity = 1; + get total() { + return this.price * this.quantity; + } + restock() { + this.price = 20; + this.quantity = 3; + } +} + +// ── three ways to write two fields ── +{ + const store = createClassyStore(new Cart()); + const seen: number[] = []; + subscribe(store, () => void seen.push(store.total), {sync: true}); + store.price = 5; + store.quantity = 2; + const direct = seen.splice(0); + batch(() => { + store.price = 7; + seen.push(-store.total); + store.quantity = 4; + }); + const batched = seen.splice(0); + store.restock(); + line( + 'ours sync two direct writes', + `subscriber saw total ${JSON.stringify(direct)}`, + ); + line( + 'ours sync batch(), total read inside', + `saw ${JSON.stringify(batched)} (negative: read inside the batch)`, + ); + line('ours sync a method', `saw ${JSON.stringify(seen)}`); + + const price = signal(10); + const quantity = signal(1); + const total = computed(() => price.value * quantity.value); + const pSeen: number[] = []; + effect(() => void pSeen.push(total.value)); + pSeen.length = 0; + price.value = 5; + quantity.value = 2; + const pDirect = pSeen.splice(0); + preactBatch(() => { + price.value = 7; + pSeen.push(-total.value); + quantity.value = 4; + }); + const pBatched = pSeen.splice(0); + const restock = action(() => { + price.value = 20; + quantity.value = 3; + }); + restock(); + line( + 'Preact two direct writes', + `effect saw total ${JSON.stringify(pDirect)}`, + ); + line( + 'Preact batch(), total read inside', + `saw ${JSON.stringify(pBatched)} (negative: read inside the batch)`, + ); + line('Preact an action', `saw ${JSON.stringify(pSeen)}`); + + // createModel wraps every method of the model as an action. + const CartModel = createModel(() => { + const p = signal(10); + const q = signal(1); + return { + p, + q, + total: computed(() => p.value * q.value), + restock() { + p.value = 20; + q.value = 3; + }, + }; + }); + const model = new CartModel(); + const mSeen: number[] = []; + effect(() => void mSeen.push(model.total.value)); + mSeen.length = 0; + model.restock(); + line('Preact a createModel method', `saw ${JSON.stringify(mSeen)}`); + + const sPrice = new Signal.State(10); + const sQuantity = new Signal.State(1); + const sTotal = new Signal.Computed(() => sPrice.get() * sQuantity.get()); + let notified = 0; + const watcher = new Signal.subtle.Watcher(() => void notified++); + watcher.watch(sTotal); + sTotal.get(); + sPrice.set(5); + sQuantity.set(2); + const afterTwo = notified; + watcher.watch(); + sPrice.set(6); + const afterRearm = notified; + const read = sTotal.get(); + watcher.watch(); + sPrice.set(7); + line( + 'polyfill two direct writes', + `Watcher notified ${afterTwo} time | after watch() alone, a write notified ${afterRearm - afterTwo} | after a read (${read}) and watch(), a write notified ${notified - afterRearm}`, + ); +} + +// ── a write that is undone inside the same batch ── +console.log(); +{ + const store = createClassyStore(new Cart()); + let calls = 0; + subscribe(store, () => void calls++, {sync: true}); + const before = snapshot(store); + batch(() => { + store.price = 99; + store.price = 10; + }); + const after = snapshot(store); + line( + 'ours sync set and set back in a batch', + `subscriber calls ${calls} | same snapshot object: ${before === after} | equal content: ${JSON.stringify(before) === JSON.stringify(after)}`, + ); + + const price = signal(10); + let runs = 0; + let doubledRuns = 0; + const doubled = computed(() => (doubledRuns++, price.value * 2)); + effect(() => void (doubled.value, runs++)); + preactBatch(() => { + price.value = 99; + price.value = 10; + }); + line( + 'Preact set and set back in a batch', + `effect runs after the first ${runs - 1} | computed runs after the first ${doubledRuns - 1}`, + ); + price.value = 99; + price.value = 10; + line( + 'Preact the same without a batch', + `effect runs after the first ${runs - 1} | computed runs after the first ${doubledRuns - 1}`, + ); +} + +// ── a batch that throws ── +console.log(); +{ + const store = createClassyStore(new Cart()); + const seen: number[] = []; + subscribe(store, () => void seen.push(store.total), {sync: true}); + const result = attempt(() => + batch(() => { + store.price = 7; + throw new Error('stop'); + }), + ); + line( + 'ours sync batch() that throws', + `${result} | price ${store.price} | subscriber saw ${JSON.stringify(seen)}`, + ); + + const price = signal(10); + const pSeen: number[] = []; + effect(() => void pSeen.push(price.value)); + pSeen.length = 0; + const pResult = attempt(() => + preactBatch(() => { + price.value = 7; + throw new Error('stop'); + }), + ); + line( + 'Preact batch() that throws', + `${pResult} | price ${price.value} | effect saw ${JSON.stringify(pSeen)}`, + ); +} + +// ── a subscriber added inside a batch, after a write ── +console.log(); +{ + const store = createClassyStore(new Cart()); + let early = 0; + let late = 0; + subscribe(store, () => void early++, {sync: true}); + batch(() => { + store.price = 7; + subscribe(store, () => void late++, {sync: true}); + }); + line( + 'ours sync subscriber added after the write', + `early calls ${early} | late calls ${late}`, + ); + + const price = signal(10); + const earlySeen: number[] = []; + const lateSeen: number[] = []; + effect(() => void earlySeen.push(price.value)); + preactBatch(() => { + price.value = 7; + effect(() => void lateSeen.push(price.value)); + }); + line( + 'Preact effect added after the write', + `early saw ${JSON.stringify(earlySeen)} | late saw ${JSON.stringify(lateSeen)}`, + ); + const subSeen: number[] = []; + preactBatch(() => { + price.value = 8; + price.subscribe((value) => void subSeen.push(value)); + }); + line( + 'Preact signal.subscribe() added after', + `saw ${JSON.stringify(subSeen)}`, + ); +} +``` + +Output on the base, this pass: + +```text +ours sync two direct writes subscriber saw total [5,10] +ours sync batch(), total read inside saw [-14,28] (negative: read inside the batch) +ours sync a method saw [60] +Preact two direct writes effect saw total [5,10] +Preact batch(), total read inside saw [-14,28] (negative: read inside the batch) +Preact an action saw [60] +Preact a createModel method saw [60] +polyfill two direct writes Watcher notified 1 time | after watch() alone, a write notified 0 | after a read (12) and watch(), a write notified 1 + +ours sync set and set back in a batch subscriber calls 1 | same snapshot object: false | equal content: true +Preact set and set back in a batch effect runs after the first 0 | computed runs after the first 0 +Preact the same without a batch effect runs after the first 2 | computed runs after the first 2 + +ours sync batch() that throws threw stop | price 7 | subscriber saw [7] +Preact batch() that throws threw stop | price 7 | effect saw [7] + +ours sync subscriber added after the write early calls 1 | late calls 1 +Preact effect added after the write early saw [10,7] | late saw [7] +Preact signal.subscribe() added after saw [8] +``` + +### Script 09: `09-reads-per-dependency.ts` + +```ts +// A measurement, not a port: what a clean read costs when the body reads the +// same field many times. `loop` reads `this.rows` on every pass; `hoisted` +// reads it once. Both give the same total. +import {computed, signal} from '@preact/signals-core'; +import {Signal} from 'signal-polyfill'; +import {createClassyStore} from './ours'; + +const ROWS = 1000; +const makeRows = () => Array.from({length: ROWS}, (_, i) => ({price: i})); + +function micros(times: number, run: () => void, before?: () => void): string { + let total = 0; + for (let i = 0; i < times; i++) { + before?.(); + const start = performance.now(); + run(); + total += performance.now() - start; + } + return `${((total / times) * 1000).toFixed(2)} us`.padStart(11); +} +const line = (name: string, ...cells: string[]) => + console.log(name.padEnd(30), cells.join(' | ')); + +console.log( + `${ROWS} rows first read | clean read | read after an unrelated write`, +); +{ + class Table { + rows = makeRows(); + other = 0; + get loop() { + let sum = 0; + for (let i = 0; i < this.rows.length; i++) sum += this.rows[i].price; + return sum; + } + get hoisted() { + const rows = this.rows; + let sum = 0; + for (let i = 0; i < rows.length; i++) sum += rows[i].price; + return sum; + } + } + const store = createClassyStore(new Table()); + for (const key of ['loop', 'hoisted'] as const) { + line( + `ours live, ${key}`, + micros(1, () => void store[key]), + micros(2000, () => void store[key]), + micros( + 2000, + () => void store[key], + () => void store.other++, + ), + ); + } +} +{ + const rows = signal(makeRows()); + const other = signal(0); + const loop = computed(() => { + let sum = 0; + for (let i = 0; i < rows.value.length; i++) sum += rows.value[i].price; + return sum; + }); + line( + 'Preact, loop', + micros(1, () => void loop.value), + micros(2000, () => void loop.value), + micros( + 2000, + () => void loop.value, + () => void other.value++, + ), + ); +} +{ + const rows = new Signal.State(makeRows()); + const other = new Signal.State(0); + const loop = new Signal.Computed(() => { + let sum = 0; + for (let i = 0; i < rows.get().length; i++) sum += rows.get()[i].price; + return sum; + }); + line( + 'polyfill, loop', + micros(1, () => void loop.get()), + micros(2000, () => void loop.get()), + micros( + 2000, + () => void loop.get(), + () => other.set(other.get() + 1), + ), + ); + console.log( + 'polyfill, loop: recorded sources', + Signal.subtle.introspectSources(loop).length, + ); +} +``` + +Output on the base, this pass: + +```text +1000 rows first read | clean read | read after an unrelated write +ours live, loop 1204.38 us | 26.80 us | 25.96 us +ours live, hoisted 330.33 us | 0.12 us | 0.14 us +Preact, loop 327.46 us | 0.16 us | 0.12 us +polyfill, loop 576.67 us | 0.12 us | 12.46 us +polyfill, loop: recorded sources 2001 +``` + +### Script 10: `10-single-getter.ts` + +```ts +// A measurement, not a port: the everyday case. One getter over three fields, +// read when nothing changed, after an unrelated write, and after a write to a +// field it reads. Nanoseconds per read, best of five rounds of 500,000 reads. +import {createClassyStore} from './ours'; + +class Cart { + price = 10; + quantity = 2; + discount = 1; + other = 0; + get total() { + return this.price * this.quantity - this.discount; + } +} +const store = createClassyStore(new Cart()); +const READS = 500_000; +let sink = 0; + +function best(run: () => void): string { + let fastest = Number.POSITIVE_INFINITY; + for (let round = 0; round < 5; round++) { + const start = performance.now(); + run(); + fastest = Math.min(fastest, performance.now() - start); + } + return `${((fastest * 1e6) / READS).toFixed(0)} ns`.padStart(7); +} + +const field = best(() => { + for (let i = 0; i < READS; i++) sink += store.price; +}); +const clean = best(() => { + for (let i = 0; i < READS; i++) sink += store.total; +}); +const unrelated = best(() => { + for (let i = 0; i < READS; i++) { + store.other = i; + sink += store.total; + } +}); +const writeOnly = best(() => { + for (let i = 0; i < READS; i++) store.other = i + 1; +}); +const dirty = best(() => { + for (let i = 0; i < READS; i++) { + store.price = i; + sink += store.total; + } +}); +console.log( + `field read ${field} | getter, clean ${clean} | write alone ${writeOnly} | write to another field + getter ${unrelated} | write to a field it reads + getter ${dirty}`, + sink > 0 ? '' : '', +); +``` + +Output on the base, this pass: + +```text +field read 24 ns | getter, clean 61 ns | write alone 141 ns | write to another field + getter 206 ns | write to a field it reads + getter 316 ns +``` + +### Probe: `probe-first.ts` + +```ts +// A getter that returns a store node, read by another getter. +import {createClassyStore} from './ours'; + +class Table { + rows = [{price: 1}]; + get first() { + return this.rows[0]; + } + get firstPrice() { + return this.first.price; + } + get missing() { + return (this as unknown as {later?: number}).later ?? {fallback: true}; + } +} +const store = createClassyStore(new Table()); +const before = store.firstPrice; +store.rows[0].price = 2; +console.log( + 'firstPrice before and after the row changed:', + before, + store.firstPrice, +); +const a = store.missing; +console.log( + 'a getter over a missing property returns the same object twice:', + a === store.missing, +); +(store as unknown as {later?: number}).later = 5; +console.log('and sees the property once it exists:', store.missing); +``` + +Output on `spike-base`: + +```text +firstPrice before and after the row changed: 1 2 +a getter over a missing property returns the same object twice: false +and sees the property once it exists: 5 +``` + +Output on `spike-refresh`: + +```text +firstPrice before and after the row changed: 1 1 +a getter over a missing property returns the same object twice: true +and sees the property once it exists: 5 +``` + +Output on `spike-one`: + +```text +firstPrice before and after the row changed: 1 2 +a getter over a missing property returns the same object twice: true +and sees the property once it exists: 5 +``` + +### Spike outputs + +`01-ladder.spike-stamp` (previous run of this task): + +```text + +ours, live +depth | first read | clean read | read after an unrelated write | read after base changed | bodies run: first, clean, unrelated, base (times in microseconds) + 4 | 173.75 | 0.84 | 2.07 | 3.94 | 7, 0, 0, 7 per read + 8 | 29.46 | 0.21 | 1.64 | 5.68 | 15, 0, 0, 15 per read + 12 | 25.92 | 0.09 | 0.76 | 6.52 | 23, 0, 0, 23 per read + 16 | 13.54 | 0.08 | 0.99 | 10.60 | 31, 0, 0, 31 per read + 18 | 10.00 | 0.06 | 1.06 | 13.57 | 35, 0, 0, 35 per read + 20 | 16.00 | 0.06 | 1.40 | 11.86 | 39, 0, 0, 39 per read + 200 | 437.12 | 0.09 | 21.46 | 832.34 | 399, 0, 0, 399 per read +``` + +`01-ladder.spike-refresh` (previous run of this task): + +```text + +ours, live +depth | first read | clean read | read after an unrelated write | read after base changed | bodies run: first, clean, unrelated, base (times in microseconds) + 4 | 168.33 | 0.88 | 3.81 | 4.22 | 7, 0, 0, 7 per read + 8 | 24.79 | 0.23 | 4.36 | 4.76 | 15, 0, 0, 15 per read + 12 | 25.46 | 0.09 | 5.60 | 5.76 | 23, 0, 0, 23 per read + 16 | 19.08 | 0.09 | 4.19 | 11.10 | 31, 0, 0, 31 per read + 18 | 24.54 | 0.06 | 4.53 | 8.75 | 35, 0, 0, 35 per read + 20 | 23.13 | 0.06 | 5.02 | 12.42 | 39, 0, 0, 39 per read + 200 | 451.42 | 0.12 | 73.55 | 169.47 | 399, 0, 0, 399 per read +``` + +`01-ladder.spike-one` (previous run of this task): + +```text + +ours, live +depth | first read | clean read | read after an unrelated write | read after base changed | bodies run: first, clean, unrelated, base (times in microseconds) + 4 | 181.08 | 1.01 | 3.60 | 4.63 | 7, 0, 0, 7 per read + 8 | 23.79 | 0.21 | 2.41 | 5.22 | 15, 0, 0, 15 per read + 12 | 24.87 | 0.09 | 3.77 | 10.18 | 23, 0, 0, 23 per read + 16 | 18.63 | 0.10 | 3.91 | 8.44 | 31, 0, 0, 31 per read + 18 | 28.79 | 0.07 | 6.68 | 9.65 | 35, 0, 0, 35 per read + 20 | 17.46 | 0.07 | 4.25 | 12.00 | 39, 0, 0, 39 per read + 200 | 380.79 | 0.13 | 70.53 | 183.61 | 399, 0, 0, 399 per read +``` + +`09.spike-stamp` (previous run of this task): + +```text +1000 rows first read | clean read | read after an unrelated write +ours live, loop 1309.33 us | 0.24 us | 27.60 us +ours live, hoisted 368.04 us | 0.12 us | 0.15 us +``` + +`09.spike-refresh` (previous run of this task): + +```text +1000 rows first read | clean read | read after an unrelated write +ours live, loop 1263.00 us | 0.27 us | 27.56 us +ours live, hoisted 368.42 us | 0.11 us | 0.14 us +``` + +`09.spike-one` (previous run of this task): + +```text +1000 rows first read | clean read | read after an unrelated write +ours live, loop 1237.08 us | 0.26 us | 0.39 us +ours live, hoisted 356.88 us | 0.13 us | 0.19 us +``` + +`10.spike-base` (previous run of this task): + +```text +field read 23 ns | getter, clean 68 ns | write alone 138 ns | write to another field + getter 214 ns | write to a field it reads + getter 314 ns +``` + +`10.spike-stamp` (previous run of this task): + +```text +field read 23 ns | getter, clean 46 ns | write alone 145 ns | write to another field + getter 238 ns | write to a field it reads + getter 321 ns +``` + +`10.spike-refresh` (previous run of this task): + +```text +field read 24 ns | getter, clean 46 ns | write alone 150 ns | write to another field + getter 241 ns | write to a field it reads + getter 328 ns +``` + +`10.spike-one` (previous run of this task): + +```text +field read 23 ns | getter, clean 48 ns | write alone 146 ns | write to another field + getter 300 ns | write to a field it reads + getter 380 ns +``` + +Ports 02 to 08 on `spike-refresh`, lines that differ from the base (`<` base, `>` spike); `spike-stamp` gave no difference: + +```text +< ours live a 1 -> 3, d and label {"b":2,"c":2,"d":2,"parity":2,"label":2} | subscriber saw d = [ +> ours live a 1 -> 3, d and label {"b":2,"c":2,"d":2,"parity":2,"label":1} | subscriber saw d = [ +< ours live a method and a batch() {"b":4,"c":4,"d":4,"parity":2,"label":2} | subscriber saw d = [ +> ours live a method and a batch() {"b":4,"c":4,"d":4,"parity":2,"label":1} | subscriber saw d = [ +< ours live after ready = false: safe fallback | outer: threw not ready | runs {"strict":7,"safe":1,"outer":3} +> ours live after ready = false: safe fallback | outer: threw not ready | runs {"strict":8,"safe":1,"outer":3} +``` + +Ports 02 to 08 on `spike-one`, lines that differ from the base (`<` base, `>` spike); `spike-stamp` gave no difference: + +```text +< ours live a 1 -> 3, d and label {"b":2,"c":2,"d":2,"parity":2,"label":2} | subscriber saw d = [ +> ours live a 1 -> 3, d and label {"b":2,"c":2,"d":2,"parity":2,"label":1} | subscriber saw d = [ +< ours live a method and a batch() {"b":4,"c":4,"d":4,"parity":2,"label":2} | subscriber saw d = [ +> ours live a method and a batch() {"b":4,"c":4,"d":4,"parity":2,"label":1} | subscriber saw d = [ +< ours live after ready = true: safe fallback | runs {"strict":5,"safe":1,"outer":1} +< ours live after ready = true: outer outer:ready | strict: ready | runs {"strict":6,"safe":1,"outer":2} +< ours live after ready = false: safe fallback | outer: threw not ready | runs {"strict":7,"safe":1,"outer":3} +> ours live after ready = true: safe ready | runs {"strict":6,"safe":2,"outer":1} +> ours live after ready = true: outer outer:ready | strict: ready | runs {"strict":6,"safe":2,"outer":2} +> ours live after ready = false: safe fallback | outer: threw not ready | runs {"strict":10,"safe":3,"outer":3} +``` + +### Spike diffs + +`spike-stamp` + +```diff +--- core.types.ts ++++ core.types.ts (spike-stamp) +@@ -30,4 +30,6 @@ + export type ComputedEntry = { + value: unknown; + deps: DepEntry[]; ++ /** SPIKE: the owning node's version when this entry was last found valid. */ ++ stamp: number; + }; +--- core.ts ++++ core.ts (spike-stamp) +@@ -138,7 +138,11 @@ + // Validate through the computed cache — never re-execute the raw getter. + const cached = dep.internal.computedCache.get(dep.prop); + if (!cached) return false; // no cache → must recompute +- if (!areDepsValid(cached.deps)) return false; // nested deps changed ++ // SPIKE: validate a nested getter once per version of its node. ++ if (cached.stamp !== dep.internal.version) { ++ if (!areDepsValid(cached.deps)) return false; // nested deps changed ++ cached.stamp = dep.internal.version; ++ } + if (!Object.is(cached.value, dep.value)) return false; // value changed + } else { + // Check that the property still exists — if it was deleted and +@@ -164,8 +168,13 @@ + receiver: object, + ): unknown { + const cached = internal.computedCache.get(prop); +- if (cached && areDepsValid(cached.deps)) { +- return cached.value; ++ if (cached) { ++ // SPIKE: nothing under this node was written since the last check. ++ if (cached.stamp === internal.version) return cached.value; ++ if (areDepsValid(cached.deps)) { ++ cached.stamp = internal.version; ++ return cached.value; ++ } + } + + // Cycle detection: if this (internal, prop) pair is already being +@@ -187,8 +196,10 @@ + const frame = {internal, prop, deps: [] as DepEntry[]}; + trackerStack.push(frame); + try { ++ // SPIKE: taken before the body runs, so a getter that writes is checked again. ++ const stamp = internal.version; + const value = getterFn.call(receiver); +- internal.computedCache.set(prop, {value, deps: frame.deps}); ++ internal.computedCache.set(prop, {value, deps: frame.deps, stamp}); + return value; + } finally { + trackerStack.pop(); +``` + +`spike-refresh` + +```diff +--- core.types.ts ++++ core.types.ts (spike-refresh) +@@ -30,4 +30,6 @@ + export type ComputedEntry = { + value: unknown; + deps: DepEntry[]; ++ /** SPIKE: the owning node's version when this entry was last found valid. */ ++ stamp: number; + }; +--- core.ts ++++ core.ts (spike-refresh) +@@ -68,6 +68,13 @@ + deps: DepEntry[]; + }[] = []; + ++/** SPIKE: a frame that records nothing, pushed while a dependency is refreshed. */ ++const VALIDATING = { ++ internal: null as unknown as StoreInternal, ++ prop: Symbol('validating'), ++ deps: [] as DepEntry[], ++}; ++ + /** Returns the tracker currently recording deps, or `null` if none is active. */ + function activeTracker() { + return trackerStack.length > 0 ? trackerStack[trackerStack.length - 1] : null; +@@ -136,10 +143,18 @@ + if (dep.internal.version !== dep.version) return false; + } else if (dep.kind === 'computed') { + // Validate through the computed cache — never re-execute the raw getter. +- const cached = dep.internal.computedCache.get(dep.prop); +- if (!cached) return false; // no cache → must recompute +- if (!areDepsValid(cached.deps)) return false; // nested deps changed +- if (!Object.is(cached.value, dep.value)) return false; // value changed ++ // SPIKE: bring the nested getter up to date through its own memo, then ++ // ask whether its value changed. A frame that owns no node keeps the ++ // reads made here out of whichever getter is running further up. ++ trackerStack.push(VALIDATING); ++ try { ++ const current = Reflect.get(dep.internal.proxy, dep.prop); ++ if (!Object.is(current, dep.value)) return false; ++ } catch { ++ return false; // a dependency that throws counts as changed ++ } finally { ++ trackerStack.pop(); ++ } + } else { + // Check that the property still exists — if it was deleted and + // dep.value was `undefined`, Object.is(undefined, undefined) would +@@ -164,8 +179,13 @@ + receiver: object, + ): unknown { + const cached = internal.computedCache.get(prop); +- if (cached && areDepsValid(cached.deps)) { +- return cached.value; ++ if (cached) { ++ // SPIKE: nothing under this node was written since the last check. ++ if (cached.stamp === internal.version) return cached.value; ++ if (areDepsValid(cached.deps)) { ++ cached.stamp = internal.version; ++ return cached.value; ++ } + } + + // Cycle detection: if this (internal, prop) pair is already being +@@ -187,8 +207,10 @@ + const frame = {internal, prop, deps: [] as DepEntry[]}; + trackerStack.push(frame); + try { ++ // SPIKE: taken before the body runs, so a getter that writes is checked again. ++ const stamp = internal.version; + const value = getterFn.call(receiver); +- internal.computedCache.set(prop, {value, deps: frame.deps}); ++ internal.computedCache.set(prop, {value, deps: frame.deps, stamp}); + return value; + } finally { + trackerStack.pop(); +``` + +`spike-one` + +```diff +--- core.types.ts ++++ core.types.ts (spike-one) +@@ -1,33 +1,18 @@ + import type {StoreInternal} from './ownership'; + +-// ── Computed getter memoization types ───────────────────────────────────────── ++// SPIKE: one kind of dependency. Every entry says what a property of the ++// getter's own node gave when it was read: a plain value, a child's proxy, or ++// another getter's result. `version` is the version of the store node that ++// value is, or -1 when it is not one. ++export type DepEntry = {value: unknown; version: number}; + +-/** +- * A single dependency recorded during getter execution. +- * - `version`: dependency is a tracked sub-tree — compare `internal.version`. +- * - `value`: dependency is a primitive — compare via `Object.is`. +- */ +-export type DepEntry = +- | { +- kind: 'version'; +- internal: StoreInternal; +- version: number; +- /** Parent target — used to detect when the property is replaced entirely. */ +- parent: StoreInternal; +- /** Property name on the parent. */ +- prop: string | symbol; +- } +- | {kind: 'value'; target: object; prop: string | symbol; value: unknown} +- | { +- /** Dependency on a computed getter — validated via the computed cache, not raw getter re-execution. */ +- kind: 'computed'; +- internal: StoreInternal; +- prop: string | symbol; +- value: unknown; +- }; +- + /** Cached result of a memoized computed getter, together with its dependencies. */ + export type ComputedEntry = { + value: unknown; +- deps: DepEntry[]; ++ /** One entry per property read, in the order of the first read. */ ++ deps: Map; ++ /** The owning node's version when this entry was last found valid. */ ++ stamp: number; + }; ++ ++export type {StoreInternal}; +--- core.ts ++++ core.ts (spike-one) +@@ -63,93 +63,72 @@ + * because getter A can read getter B, which pushes a second tracker. + */ + const trackerStack: { +- internal: StoreInternal; ++ internal: StoreInternal | null; + prop: string | symbol; +- deps: DepEntry[]; ++ deps: Map; + }[] = []; + +-/** Returns the tracker currently recording deps, or `null` if none is active. */ +-function activeTracker() { +- return trackerStack.length > 0 ? trackerStack[trackerStack.length - 1] : null; ++/** A frame that records nothing, pushed while dependencies are re-read. */ ++const VALIDATING = { ++ internal: null, ++ prop: Symbol('validating'), ++ deps: new Map(), ++}; ++ ++/** Stands for "the property did not exist" and for "the getter threw". */ ++const MISSING = Symbol('missing'); ++const THREW = Symbol('threw'); ++ ++/** The version of the store node a value is, or -1 when it is not one. */ ++function versionOf(value: unknown): number { ++ if (typeof value !== 'object' || value === null) return -1; ++ return internalsMap.get(value)?.version ?? -1; + } + + /** +- * Record a dependency on the active tracker (if any). +- * Called from the GET trap whenever a non-getter, non-method property is read. ++ * Record what a property of the running getter's own node gave. The first read ++ * of a property in a run is the one that counts. + */ + function recordDep( + internal: StoreInternal, + prop: string | symbol, + value: unknown, + ): void { +- const tracker = activeTracker(); +- if (!tracker) return; +- +- // Only record deps for reads on the SAME proxy that owns the getter. +- // Child-proxy reads don't need explicit tracking because child mutations +- // bubble up via version numbers on the parent's childInternals. +- if (tracker.internal !== internal) return; +- +- const childInternal = internal.childInternals.get(prop); +- if (childInternal) { +- tracker.deps.push({ +- kind: 'version', +- internal: childInternal, +- version: childInternal.version, +- parent: internal, +- prop, +- }); +- } else { +- tracker.deps.push({kind: 'value', target: internal.target, prop, value}); +- } ++ if (trackerStack.length === 0) return; ++ const tracker = trackerStack[trackerStack.length - 1]; ++ if (tracker.internal !== internal || tracker.deps.has(prop)) return; ++ tracker.deps.set(prop, {value, version: versionOf(value)}); + } + +-/** +- * Record a computed getter dependency on the active tracker (if any). +- * Unlike `recordDep`, this creates a `'computed'` dep entry that validates +- * through the computed cache rather than re-executing the raw getter. +- */ +-function recordComputedDep( +- internal: StoreInternal, +- prop: string | symbol, +- value: unknown, +-): void { +- const tracker = activeTracker(); +- if (!tracker) return; +- if (tracker.internal !== internal) return; +- +- tracker.deps.push({kind: 'computed', internal, prop, value}); ++/** What reading `prop` gives now, without the method binding of the `get` trap. */ ++function currentOf(internal: StoreInternal, prop: string | symbol): unknown { ++ const child = internal.childInternals.get(prop); ++ if (child) return child.proxy; ++ const descriptor = findPropertyDescriptor(internal.target, prop); ++ if (!descriptor) return MISSING; ++ if (descriptor.get) ++ return evaluateComputed(internal, prop, descriptor.get, internal.proxy); ++ return Reflect.get(internal.target, prop); + } + +-/** +- * Check whether all dependencies from a previous computation are still valid. +- */ +-function areDepsValid(deps: DepEntry[]): boolean { +- for (const dep of deps) { +- if (dep.kind === 'version') { +- // Verify the parent property still references the same child object. +- // If the property was replaced entirely (e.g., store.items = newArray), +- // the old child internal is detached and its version never changes. +- // This check catches that case. +- if (dep.parent.childInternals.get(dep.prop) !== dep.internal) +- return false; +- if (dep.internal.version !== dep.version) return false; +- } else if (dep.kind === 'computed') { +- // Validate through the computed cache — never re-execute the raw getter. +- const cached = dep.internal.computedCache.get(dep.prop); +- if (!cached) return false; // no cache → must recompute +- if (!areDepsValid(cached.deps)) return false; // nested deps changed +- if (!Object.is(cached.value, dep.value)) return false; // value changed +- } else { +- // Check that the property still exists — if it was deleted and +- // dep.value was `undefined`, Object.is(undefined, undefined) would +- // incorrectly pass without this guard. +- if (!Reflect.has(dep.target, dep.prop)) return false; +- if (!Object.is(Reflect.get(dep.target, dep.prop), dep.value)) ++/** Re-read every dependency; any difference, or a throw, means "recompute". */ ++function areDepsValid( ++ internal: StoreInternal, ++ deps: Map, ++): boolean { ++ trackerStack.push(VALIDATING); ++ try { ++ for (const [prop, dep] of deps) { ++ const current = currentOf(internal, prop); ++ if (!Object.is(current, dep.value) || versionOf(current) !== dep.version) + return false; + } ++ return true; ++ } catch { ++ return false; ++ } finally { ++ trackerStack.pop(); + } +- return true; + } + + /** +@@ -164,16 +143,20 @@ + receiver: object, + ): unknown { + const cached = internal.computedCache.get(prop); +- if (cached && areDepsValid(cached.deps)) { +- return cached.value; ++ if (cached) { ++ // Nothing under this node was written since the last check. ++ if (cached.stamp === internal.version) return cached.value; ++ if (areDepsValid(internal, cached.deps)) { ++ cached.stamp = internal.version; ++ return cached.value; ++ } + } + +- // Cycle detection: if this (internal, prop) pair is already being +- // evaluated higher in the stack, the getter chain is recursive. + for (const existing of trackerStack) { + if (existing.internal === internal && existing.prop === prop) { + const cycle = trackerStack + .slice(trackerStack.indexOf(existing)) ++ .filter((f) => f.internal) + .map((f) => String(f.prop)) + .concat(String(prop)) + .join(' → '); +@@ -183,15 +166,32 @@ + } + } + +- // Push a new tracker frame for this getter evaluation. +- const frame = {internal, prop, deps: [] as DepEntry[]}; ++ const frame = {internal, prop, deps: new Map()}; + trackerStack.push(frame); + try { ++ // Taken before the body runs, so a getter that writes is checked again. ++ const stamp = internal.version; + const value = getterFn.call(receiver); +- internal.computedCache.set(prop, {value, deps: frame.deps}); ++ internal.computedCache.set(prop, {value, deps: frame.deps, stamp}); + return value; + } finally { + trackerStack.pop(); ++ } ++} ++ ++/** Read a getter for the `get` trap: recorded whether it returns or throws. */ ++function readGetter( ++ internal: StoreInternal, ++ prop: string | symbol, ++ getterFn: () => unknown, ++ receiver: object, ++): unknown { ++ let value: unknown = THREW; ++ try { ++ value = evaluateComputed(internal, prop, getterFn, receiver); ++ return value; ++ } finally { ++ recordDep(internal, prop, value); + } + } + +@@ -462,19 +462,8 @@ + internal.resumeScope(); + // 1. Check for getters on the prototype chain (computed values). + const getterDesc = findPropertyDescriptor(_target, prop); +- if (getterDesc?.get) { +- // Memoized: evaluate with dependency tracking, return cached if deps unchanged. +- const value = evaluateComputed( +- internal, +- prop, +- getterDesc.get, +- receiver, +- ); +- // Record as a computed dependency for any parent getter currently tracking. +- // Uses 'computed' dep kind so validation goes through the cache, not raw getter. +- recordComputedDep(internal, prop, value); +- return value; +- } ++ if (getterDesc?.get) ++ return readGetter(internal, prop, getterDesc.get, receiver); + + const value = Reflect.get(_target, prop); + +@@ -495,7 +484,11 @@ + // An inherited data property becomes an edge on its first proxy read. + const child = + internal.childInternals.get(prop) ?? linkChild(internal, prop, value); +- recordDep(internal, prop, value); ++ recordDep( ++ internal, ++ prop, ++ child ? child.proxy : getterDesc ? value : MISSING, ++ ); + return child ? child.proxy : value; + }, + +``` + +`spike-memo` + +```diff +--- spike-base/src/snapshot/snapshot.ts 2026-11-16 20:33:32 ++++ spike-memo/src/snapshot/snapshot.ts 2026-11-19 04:36:57 +@@ -142,6 +142,8 @@ + const computation = computeWithTracking(currentSnap, getterFn); + result = computation.result; + ++ // SPIKE: a nested getter may have created the map while this one ran. ++ memoMap = crossSnapshotMemo.get(target); + // Save cross-snapshot memo. + if (!memoMap) { + memoMap = new Map(); +``` From 5d866cb3b3fb96758245c627a07afbd6d5055811 Mon Sep 17 00:00:00 2001 From: codeBelt Date: Thu, 19 Nov 2026 04:41:57 -0600 Subject: [PATCH 067/169] docs: update the stage 2 status in the review plan Co-Authored-By: Claude Fable 5.2 --- REVIEW_PLAN.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/REVIEW_PLAN.md b/REVIEW_PLAN.md index 7f109c42..f53b7faa 100644 --- a/REVIEW_PLAN.md +++ b/REVIEW_PLAN.md @@ -8,14 +8,14 @@ published. Not part of the published docs; delete it when the work is done. Read this first. Whoever finishes a stage updates its row: the state, the commit it ended on, and where its report is. -| Stage | State | Ended on | Report | -| --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- | -------------------------- | -| Plan | Revised 2026-11-18 after a check against the repository at `7540662` | | | -| 1. Safety net | Done 2026-11-18 | `5bc4008` | `review/stage-1-report.md` | -| 2. Library comparison | In progress since 2026-11-18. Done: Valtio, MobX, Vue reactivity, Solid 2. Running: Svelte 5, Signals, Immer, adapters. Left: security, Legend-State, Zustand and Jotai | | `review/stage-2/` | -| 3. Design review | Not started | | | -| 4. Refactor | Not started | | | -| 5. Release | Not started | | | +| Stage | State | Ended on | Report | +| --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- | -------------------------- | +| Plan | Revised 2026-11-18 after a check against the repository at `7540662` | | | +| 1. Safety net | Done 2026-11-18 | `5bc4008` | `review/stage-1-report.md` | +| 2. Library comparison | In progress since 2026-11-18. Done: Valtio, MobX, Vue reactivity, Solid 2, Svelte 5, Signals, Immer, adapters. Running: security, Legend-State, Zustand and Jotai | | `review/stage-2/` | +| 3. Design review | Not started | | | +| 4. Refactor | Not started | | | +| 5. Release | Not started | | | ## Starting point (read this if you are new to the work) From c59084ed624ae6afe0d5b62076d1efa2d5d306cd Mon Sep 17 00:00:00 2001 From: codeBelt Date: Thu, 19 Nov 2026 04:43:44 -0600 Subject: [PATCH 068/169] docs: add the stage 2 security report Co-Authored-By: Claude Fable 5.2 --- review/stage-2/security.md | 823 +++++++++++++++++++++++++++++++++++++ 1 file changed, 823 insertions(+) create mode 100644 review/stage-2/security.md diff --git a/review/stage-2/security.md b/review/stage-2/security.md new file mode 100644 index 00000000..b61dbfcc --- /dev/null +++ b/review/stage-2/security.md @@ -0,0 +1,823 @@ +# Stage 2 report: security + +Subject: our own code and supply chain, not another library, so this report +has no ports and no table of counterparts. Read at commit `12fe57d` (branch +`release/1.0`), package version 0.11.0. All library line numbers below are at +that commit. + +## What I read and ran + +Read closely: + +- `packages/classy-store/src/utils/persist/persist.ts` and `persist.types.ts` + (the test files only where a finding touched them) +- `packages/classy-store/src/utils/devtools/devtools.ts` +- `packages/classy-store/src/utils/history/history.ts` +- `packages/classy-store/src/utils/cloneSnapshot/cloneSnapshot.ts` +- `packages/classy-store/src/utils/internal/internal.ts` (`canProxy`, + `findGetterDescriptor`, which persist, devtools and history rely on) +- `packages/classy-store/package.json`, `tsdown.config.ts`, the root + `package.json`, `bun.lock`, `bunfig.toml`, `.changeset/config.json` +- `.github/workflows/ci.yml`, `docs.yml`, `react-compatibility.yml`, + `react-next.yml`, `release.yml` +- The packed tarball `codebelt-classy-store-0.11.0.tgz` at the repository root + (listed, not unpacked), and the npm registry metadata for + `proxy-compare@3.0.1` and `@codebelt/classy-store@0.11.0` +- `website/content/docs/PERSIST_TUTORIAL.md` and `DEVTOOLS_TUTORIAL.md`, only + to see which `merge` and `enabled` idioms we teach + +Ran, all in +`/private/tmp/claude-501/-Users-robertparallax-WebstormProjects-classy-store/9c8c2bbd-bb57-4b12-aa7b-9d06972e3fdd/scratchpad/stage-2-security/`, +with Bun 1.4.4 importing our source by absolute path: + +- `repro/persist-input.ts`: hostile and malformed stored records, versions, + `migrate`, transforms, `merge`, expiry (output `repro/persist-input.out`) +- `repro/storage-events.ts`: crafted cross-tab events +- `repro/devtools-input.ts`: a fake Redux DevTools extension sending crafted + messages +- `repro/large-input.ts`, `repro/depth.ts`, `repro/depth2.ts`, + `repro/depth3.ts`: deep and large records +- `repro/reviver.ts`: the cost of stripping `__proto__` with a `JSON.parse` + reviver +- `audit/`: a copy of the manifests and `bun.lock` (nothing installed), where + `bun audit` ran +- `sig/`: `proxy-compare@3.0.1` installed with scripts disabled, where + `npm audit signatures` ran + +Nothing was run in the repository. + +## Threat model in one paragraph + +`persist` reads whatever is in storage under its key, and with `syncTabs` it +also reads every `storage` event under that key. `devtools` reads every message +the object at `window.__REDUX_DEVTOOLS_EXTENSION__` delivers. Who can write +those inputs: (a) script on the same origin, including XSS, which can already +do anything to the store directly; (b) a browser extension with access to the +page, which can too; (c) the user, through the browser's developer tools, on +their own client; (d) **another application on the same origin**, for example +two apps served from different paths of one `github.io` or intranet host, which +share `localStorage` but are otherwise separate; (e) an older or newer version +of the same application, which is not hostile but writes shapes this version +does not expect. Only (d) and (e) gain anything they did not already have, so +the findings below are about integrity and availability of one client's state. +None of them lets data reach another user or the server, and none pollutes +`Object.prototype`. + +## Findings + +### 1. Finding 48 settled: `persist` cannot swap the store's prototype unless the application lists `__proto__` itself + +- **What happens.** The restore loop writes only keys in the configured or + default property list (`propKeys`), and only when `Object.hasOwn(merged, key)` + holds. The default list comes from `Object.keys(snapshot(store))`, which + never contains `__proto__`, `constructor` or `prototype` for an ordinary + class store. So a record + `{"state":{"__proto__":{"polluted":1,"inc":"x"},"constructor":{"x":1},"prototype":{"y":1},"count":5}}` + restores `count` and nothing else: the prototype, methods and getters are + unchanged and `({}).polluted` is `undefined`. A custom `merge` written with + `Object.assign({}, current, persisted)` turns the stored `__proto__` into the + merged object's prototype, but `Object.hasOwn` then refuses the inherited + values, so the store is unchanged too. The spread idiom the tutorial teaches + (`{...current, ...persisted}`) keeps `__proto__` as an own key that no + listed property matches. Only when the application names the key in + `properties` (which `keyof T` does not offer, so it takes a cast or an + untyped array) does the assignment + `proxyStore['__proto__'] = clone` reach the inherited setter and replace the + prototype: methods and getters disappear. + + ```text + ## top-level __proto__/constructor/prototype, default properties + store proto is Settings.prototype: true count 5 ({}).polluted: undefined + ## top-level prototype keys named in properties + store proto is Settings.prototype: false inc is method: undefined doubled: undefined + ## custom merge using Object.assign({}, current, persisted) + store proto is Settings.prototype: true count 0 (stored __proto__.count 99 refused) + ``` + + Cross-tab events go through the same function and behave the same (repro + `storage-events.ts`, case 5). `withHistory` restores only snapshots of its + own store, and its `isData('__proto__')` is false because + `findGetterDescriptor` finds `Object.prototype.__proto__`. + +- **Where.** `persist.ts:337-339` (the `pending` filter), `persist.ts:363` + (the assignment), `persist.ts:42-68` (`resolveProperties`). +- **Who can cause it.** Only the application author, by listing the key. A + storage writer cannot on its own. Not serious. +- **Proposal: fix, cheaply.** In `resolveProperties`, throw when a listed key + is `__proto__`, `constructor`, `prototype`, a getter (finding 52) or a method, + and when an entry is an object without both `serialize` and `deserialize` + (finding 55). One validation pass at `persist()` time, so restore never has + to ask. +- **Kind:** hardening, diagnostics. +- **Cost:** `persist.ts` and its tests. Breaking only for code that lists a + getter or a malformed entry, which is already broken. Low risk. + +### 2. A nested `__proto__` key survives restore as an own data property and is written back on the next save + +- **What happens.** `JSON.parse` makes `"__proto__"` an ordinary own key. + `cloneSnapshotValue` copies every own key with `Object.defineProperty`, so + the restored object keeps that key as data and its real prototype stays + `Object.prototype`. The snapshot layer also uses `defineProperty` + (`snapshot.ts:213`, `snapshot.ts:269`), so snapshots are safe too. The + hazard is downstream: the store now holds `prefs` with own keys + `["__proto__","theme"]`, `JSON.stringify` writes it back on every save, and + application code that copies the object with `Object.assign(target, prefs)` + or a `for...in` loop that assigns `target[key] = value` replaces `target`'s + prototype. DevTools does the same for nested values (repro + `devtools-input.ts`: `prefs own keys: ["__proto__"]`). + + ```text + ## nested __proto__ in prefs + prefs own keys: ["__proto__","theme"] + prefs proto is Object.prototype: true + snapshot prefs proto is Object.prototype: true + ({}).polluted: undefined + ``` + +- **Where.** `cloneSnapshot.ts:22-41`, called from `persist.ts:363`; + `devtools.ts:87` and `devtools.ts:100`. +- **Who can cause it.** Anyone who can write the storage key (d, e above) or + send DevTools messages. It matters only with an unsafe copy in application + code. Low. +- **Proposal: fix.** Drop own `__proto__` keys at every depth when restoring + from storage or DevTools. The cheapest place is inside the walk + `cloneSnapshotValue` already does, behind a parameter that only `persist` + passes, so history keeps cloning exactly. A `JSON.parse` reviver would also + work, but measured about ten times slower to parse (2.1 MB record: 2.7 ms + plain, 35 ms with the reviver; `repro/reviver.out`). DevTools assigns parsed + values without cloning; see finding 7. +- **Kind:** hardening. +- **Cost:** `cloneSnapshot.ts`, `persist.ts`, `devtools.ts`, a test each. Not + breaking for any data a real application writes. Low risk. + +### 3. A deeply nested record bricks the store: restore succeeds, then every snapshot and every save throws, and the bad record is never replaced + +- **What happens.** Nothing bounds the depth of restored data. + `cloneSnapshotValue` and the snapshot builder both recurse once per level, + and the snapshot builder runs out of stack first. Between those two limits a + restore succeeds with no error, after which `snapshot(store)` throws + `RangeError` on every call. Every component that reads the store fails, every + automatic save fails with a `'write'` error, and `save()` rejects, so the + record that caused it stays in storage and the next page load repeats it. + Beyond the clone limit, restore fails part-way: fields earlier in the class + are restored, later ones are not, and a `'parse'` error is reported (the same + partial-restore shape as stage 1 finding 52). + + ```text + depth a (first field) b (deep field) snapshot errors + 15000 restored-a object ok + 16000 restored-a object RangeError (none) + 17000 restored-a object RangeError (none) + 18000 restored-a object RangeError (none) + 19000 restored-a default ok parse:RangeError + after an edit at depth 17000: errors write:RangeError | stored record unchanged: true + save() rejects with RangeError + ``` + + The limits are Bun's (JavaScriptCore's) and will differ by engine and by how + much stack is in use; browsers are likely to fail at lower depths. Large but + shallow input is only slow: 100,000 rows (2.1 MB) restore in 133 ms, 1,000,000 + rows (22 MB, beyond any browser's `localStorage` quota) in 1.5 s, with no + error (`repro/large-input.out`). +- **Where.** `cloneSnapshot.ts:37` (recursion), `snapshot.ts:235` + (`createSnapshotRecursive`), `persist.ts:360-377` (one field at a time). +- **Who can cause it.** A storage writer (d, e). An application can also do + it to itself with legitimately deep data, which is a core limit rather than + a persist one. Availability only, but persistent until the user clears site + data. Low to moderate for apps on a shared origin. +- **Proposal: fix the partial restore, and document the depth limit.** Clone + every value before assigning any, so a failure leaves the store untouched, + as a throwing `deserialize` already does (verified: `count` stayed 0). Then + take one `snapshot()` inside the same `try`; if it throws, put back the + fields just written and report `'parse'`. That turns a bricked store into a + reported, skipped record. A depth cap in `cloneSnapshotValue` is an + alternative, but any number we pick is engine-dependent. +- **Kind:** bug, hardening. +- **Cost:** `persist.ts` and a test. Not breaking. The rollback path needs + care with the existing `skipAutoSaveVersion` and `clearedVersion` + bookkeeping. Medium risk. + +### 4. Records persist cannot read are skipped without any report + +- **What happens.** A record that is valid JSON but not an envelope, or whose + `state` is not an object, is skipped with no error and no status change: + `5`, `null`, `"str"`, `[]`, `{"state":null}`, `{"state":"str"}`. So is a + record whose version differs when there is no `migrate`, and a `migrate` + that returns a string or an array. Only text that is not JSON, a `migrate` + that throws, or one that returns `null` is reported, as `'parse'`. An array + `state` passes the envelope check (stage 1 finding 53) and is handed to + `migrate`, whose type says `Record`. + + ```text + envelope 5 / null / "str" / [] / state null / state "str" / state [1,2,3] + count 0, errors: [], lastError: none + migrate returns a string / an array errors: [] + migrate throws errors: ["parse: migrate boom"] + migrate returns null errors: ["parse: null is not an object ..."] + ``` + +- **Where.** `persist.ts:287-294`, `persist.ts:312-315`, `persist.ts:321`. +- **Who can cause it.** Anyone who writes the key, mostly (e). It matters + because the store silently starts from defaults and the next save overwrites + the record, so data loss leaves no trace. +- **Proposal: fix.** Replace the scattered guards (which stage 1 finding 54 + shows are partly redundant) with one `readEnvelope(raw)` that returns either + a typed envelope or a reason, and report every reason through `onError` with + `'parse'`. Reject an array `state` and a `migrate` result that is not a plain + object. +- **Kind:** diagnostics, bug. +- **Cost:** `persist.ts`, `persist.types.ts` (perhaps an error class or code), + tests. Not breaking in the API; applications see new `onError` calls. Low. + +### 5. A version that is not a number counts as version 0 + +- **What happens.** `typeof envelope.version === 'number' ? envelope.version : 0` + makes a missing version, `"2"`, `null` and `{}` all version 0. With + `version: 2` configured, the record `{"version":"2",...}` is handed to + `migrate` as version 0, so a v0-to-v2 migration runs over data already in v2 + shape; without `migrate` it is dropped silently (finding 4). Negative, + fractional and huge numbers (`-1`, `2.5`, `1e308`) reach `migrate` as they + are. + + ```text + version "2" vs configured 2, with migrate: migrate got oldVersion 0 + version -1 / 2.5 / 1e308: migrate got -1 / 2.5 / 1e308 + version "2", no migrate: count 0, errors: [] + ``` + +- **Where.** `persist.ts:310-315`. +- **Who can cause it.** (e), or (d). Integrity of one client's state. Low. +- **Proposal: fix.** Only a missing `version` means 0 (keeps the documented + rule for old records). Any other value that is not a finite integer is an + unreadable record, reported as in finding 4. Document that `migrate` may + receive any integer, including one newer than the current version. +- **Kind:** bug, docs. +- **Cost:** `persist.ts`, the tutorial's migration section, a test. Breaking + only for records with a non-numeric version, which are already mishandled. + Low. + +### 6. With `expireIn` set, a record with no usable `expiresAt` never expires + +- **What happens.** Expiry is checked only when `expiresAt` is a number. A + record without it, or with a string, `null` or `1e308`, is restored however + old it is. `-1` and `0` expire as expected. + + ```text + expiresAt missing / "yesterday" / null / 1e308, expireIn 1000: restored (count 9) + expiresAt -1 / 0: skipped (count 0) + ``` + + The realistic case is benign: records written before the application added + `expireIn`, or by a version without it, live forever. The TTL is also not a + security control, since whoever writes the record chooses `expiresAt`. +- **Where.** `persist.ts:297-303`. +- **Who can cause it.** (e) mostly. Low. +- **Proposal: owner's call between fix and document.** Fixing means: when + `expireIn` is set, a record without a finite `expiresAt` counts as expired. + That drops pre-TTL records once, which is arguably what someone adding a TTL + wants. Either way, document that expiry bounds the age of data this + application wrote, and is not a way to make stored data trustworthy. +- **Kind:** bug or docs. +- **Cost:** `persist.ts` and a test, or one paragraph. Behaviour change for + old records if fixed. Low. + +### 7. DevTools time travel adds fields, calls setters, and differs from history's restore + +- **What happens.** Only `DISPATCH` messages whose payload type is + `JUMP_TO_STATE` or `JUMP_TO_ACTION` and which carry a `state` string are + acted on; `ROLLBACK`, `IMPORT_STATE`, `RESET`, `COMMIT`, `TOGGLE_ACTION` and + `ACTION` are ignored. For an acted-on message, every top-level key of the + parsed state is assigned unless the store has a getter or a function there. + Consequences, all verified: + - Prototype: safe. `__proto__` is skipped because `findGetterDescriptor` + finds the inherited accessor on `Object.prototype`, and `constructor` + because it reads as a function. This is incidental, not designed. + - Methods and getters cannot be replaced. + - **New fields are added** (`added`, `prototype` became own fields), and + fields missing from the jumped-to state are left as they are, so the store + can end up in a state DevTools never showed. + - **A setter-only accessor is called** with the message's value (`set level` + ran with `7`), because the skip checks only for a getter. + - Nested values are assigned as parsed, without the cloning history uses, and + keep own `__proto__` keys (finding 2). + - A malformed `state` is swallowed silently. + - An edit made in the same tick as a jump is never sent to DevTools, because + `isTimeTraveling` stays true until a microtask. + - Every snapshot is sent to the extension, so any secret held in store state + (a token, personal data) is copied into the extension's history. +- **Where.** `devtools.ts:82-113`, the skip at `devtools.ts:93-99`, the flag + at `devtools.ts:73-79` and `devtools.ts:107-109`. +- **Who can cause it.** The extension, or any page script that defines + `window.__REDUX_DEVTOOLS_EXTENSION__` before `devtools()` runs (a), or the + user (c). In production, if an application leaves `enabled` at its default + `true`, any user with the extension can edit the client state. That is the + user editing their own client, which the server must not trust anyway. Low. +- **Proposal: fix by reuse.** Apply the jumped-to state with the same function + history uses (`applySnapshot`'s rule: only keys that are data on the store, + delete data fields absent from the state, clone with the `__proto__` strip + from finding 2). Skip any accessor, not only getters. Report a malformed + message in development. Keep `enabled` defaulting to `true` (the library has + no portable way to detect production), but say in the API reference, next to + `enabled`, that the extension receives every state, so secrets should not + live in a store that has DevTools enabled outside development. +- **Kind:** hardening, simplification, docs. +- **Cost:** `devtools.ts`, `history.ts` (export the apply helper to a shared + internal module), docs, tests. Behaviour change for time travel only, which + becomes more faithful. Low. + +### 8. Cross-tab sync accepts events from any storage area, and synthetic events, under the same key + +- **What happens.** The handler checks the key, ignores `newValue === null`, + and, when `storageArea` is present, skips an event whose value is no longer + in that area. It does not check that the area is the configured storage. An + event from another `Storage` (for example `sessionStorage` in a same-origin + frame, or another library's area) with the same key is applied, and an event + with no `storageArea` (only a script can make one) skips the staleness check. + Events with another key, a `null` key (`localStorage.clear()` in another + tab), and events after `dispose()` are correctly ignored. + + ```text + 1. synthetic event without storageArea applied: true + 2. event from a different storage area with the same key applied: true theirs + 3. event whose value is no longer in the configured storage applied: false + 4. event with a different key applied: false + 7. clear() from another tab ignored + 8. event after dispose applied: false + ``` + +- **Where.** `persist.ts:446-453`. +- **Who can cause it.** Same-origin script (a), which gains nothing, or (d) + writing a different area under the same key. Low. +- **Proposal: document, and fix the cheap half.** When `storage` is itself + the event's kind of object (`storage instanceof Storage`), ignore events whose + `storageArea !== storage`. Do not require identity when the adapter is a + wrapper, or `syncTabs` stops working for wrapped `localStorage`. Document that + `syncTabs` listens to `localStorage` events under `name` whatever adapter is + configured. +- **Kind:** hardening, docs. +- **Cost:** `persist.ts`, `persist.types.ts` doc comment, a test. Not breaking + for real browser events. Low. + +### 9. Restored values are not validated against the class's field types + +- **What happens.** Any JSON value is restored into any field: a string into + `count`, an object into `label`, and `{"0":"x","length":3}` into an array + field, after which `Array.isArray(store.items)` is false and + `store.items.map` throws in application code. JSON cannot forge a `Date`, + `ReactiveMap` or class instance, because `cloneSnapshotValue` keeps the + parsed object's own prototype (`Object.prototype` or `Array.prototype`). + The tutorial already says stored input is `unknown` and transforms should + validate it (`PERSIST_TUTORIAL.md:145`), and a throwing `merge` or + `deserialize` already rejects the whole record before anything is assigned + (verified). +- **Where.** `persist.ts:321-339`. +- **Who can cause it.** (d), (e). Low; it is the application's schema. +- **Proposal: document, possibly adapt.** Say once, prominently, that stored + data is untrusted input and that a `merge` function is the place to validate + the whole record (throwing rejects it atomically). Show a short validating + `merge` with a schema library. A dedicated `validate` option would duplicate + `merge`; I would not add one before 1.0. +- **Kind:** docs. +- **Cost:** the persist tutorial and API reference. None to the code. + +### 10. Runtime dependency: `proxy-compare` 3.0.1 + +- **What happens.** It is the only runtime dependency and the published code + imports it externally (`dist/storeRuntime.mjs`, line 2). Registry metadata: + one maintainer (npm user `daishi`, the author of Valtio and Zustand), MIT, no + dependencies, no `preinstall`, `install` or `postinstall` script (its + scripts are build and test only), published 2024-11-22 and not changed + since, registry signature verified (`npm audit signatures`: "1 package has a + verified registry signature"), no provenance attestation. We declare it + exactly (`"proxy-compare": "3.0.1"`, `packages/classy-store/package.json`), + and `bunfig.toml` sets `exact = true` for future additions. Valtio 2.3.2 + declares `^3.0.1`. +- **Where.** `packages/classy-store/package.json` `dependencies`. +- **Who can cause it.** A takeover of that one npm account. With an exact pin + a malicious 3.0.2 does not reach our consumers until we release with it; the + cost is that a security fix in it does not reach them either, and that a + consumer with Valtio may install two copies once 3.0.2 exists. +- **Proposal: accept, and document the choice.** The package is small (a few + hundred lines), stable and has no dependencies of its own. Keep the exact pin + for 1.0, watch it with Dependabot or Renovate, and say in `CONTRIBUTING.md` + why it is exact. Vendoring it would remove the account risk but makes us the + maintainer of its fixes; not worth it unless it goes unmaintained. +- **Kind:** hardening, docs. +- **Cost:** none, or one paragraph. + +### 11. Development dependencies: 17 advisories, none in the published artifact + +- **What happens.** `bun audit` over the committed lockfile: + + ```text + baseline-browser-mapping@2.10.25 moderate DoS on invalid input + via next, @angular/build, and @babel/core (dev dependency of the package) + browserslist@4.28.2 2 high memory growth; prototype write via custom stats file + via @angular/build, and @babel/core (dev dependency of the package) + fast-uri@3.1.0 8 high, 2 moderate, 2 low URI parsing (ajv) + via website > serve, @angular/cli, @angular/build + immutable@5.1.5 2 high DoS (sass) + via examples (next, vite, @angular/build) + 17 vulnerabilities (12 high, 3 moderate, 2 low) + ``` + + None can reach a consumer: the tarball holds only `dist`, `README.md`, + `CHANGELOG.md`, `LICENSE` and `package.json` (verified by listing the packed + 0.11.0 tarball: 98 entries, all compiled output and source maps), and + `dist` imports only `proxy-compare` and the framework peers. All four + packages run at build or test time in CI on inputs we write (browserslist + queries in our configs, URIs in our configs, our own Sass). Bun runs no + dependency lifecycle scripts except its built-in trusted list and the root's + `trustedDependencies: ["sharp"]` (`bun.lock:168`). +- **Where.** `bun.lock`. +- **Who can cause it.** Nobody outside the project, as far as I can see. Low. +- **Proposal: fix at the next dependency refresh, not a release blocker.** + `bun update` within ranges clears most of them (`fast-uri` 3.1.9, + `browserslist` above 4.28.6, `immutable` 5.1.8). Add a `bun audit` step to + CI that reports but does not fail, or fails only for packages reachable from + `packages/classy-store`'s `dependencies`. +- **Kind:** hardening. +- **Cost:** `bun.lock`, perhaps `ci.yml`. Not breaking. + +### 12. The release job gives every dependency the npm publishing identity + +- **What happens.** `release.yml` runs one job with `contents: write`, + `pull-requests: write` and `id-token: write`. In that job it runs + `bun install --frozen-lockfile` (about 1,800 locked packages, including the + website's and examples' trees), `bun run build` (tsdown and its plugins), + `changesets/action@v1` (which runs `changeset version` and our `biome format` + script), then `npm publish --provenance` of the `dist` that build produced. + There is no npm token in the workflow: publishing uses npm trusted publishing + over OIDC, and the registry confirms it (`_npmUser` of 0.11.0 is + `GitHub Actions `, with a SLSA provenance + attestation). That design is good, but anything that executes in the job can + request the OIDC token from the runner's environment and publish its own + version, or rewrite `dist` before `npm publish` packs it. The provenance would + still say it came from this workflow. `actions/checkout` also leaves the + `GITHUB_TOKEN` (with `contents: write`) in `.git/config` for the whole job. + Actions are pinned by moving major tags (`actions/checkout@v6`, + `actions/setup-node@v6`, `oven-sh/setup-bun@v2`, `changesets/action@v1`), not + commit SHAs, so a moved tag on a third-party action runs with the same + rights. `ci.yml`, `react-compatibility.yml` and `react-next.yml` declare no + `permissions` (pull requests from forks get a read-only token anyway); + `docs.yml` declares `contents: read` and grants `pages` and `id-token` only to + the deploy job, which is the pattern the release job should follow. Node is + `"24"` (floating), Bun is pinned to 1.4.4. +- **Where.** `.github/workflows/release.yml` (permissions block and steps), + `ci.yml`, `react-compatibility.yml`, `react-next.yml` (no `permissions`). +- **Who can cause it.** A compromised development dependency or a moved action + tag, the realistic supply-chain path into consumers. Moderate: it is the one + route by which someone else's compromise becomes a malicious + `@codebelt/classy-store` release with valid provenance. +- **Proposal: fix before 1.0.** + 1. Split the release into two jobs. Job one (`contents: write`, + `pull-requests: write`, no `id-token`) installs, builds, runs + changesets, and on a publishable commit runs `npm pack` and uploads the + tarball as an artifact. Job two (`id-token: write` and `contents: read` + only) installs nothing, downloads the tarball, and runs + `npm publish --provenance`. A compromised dependency then never + sees the OIDC token. + 2. Put job two in a GitHub environment (for example `npm`) with the owner as + required reviewer, and configure the npm trusted publisher to accept only + that environment. This also matches the rule that the owner alone + releases. + 3. Pin every third-party action to a full commit SHA with the tag in a + comment, and let Dependabot update them. + 4. `persist-credentials: false` on checkouts that do not push; in the + release, push the tags with the token passed explicitly. + 5. Add `permissions: contents: read` at the top of the three workflows that + lack it. + 6. In the npm package settings, once trusted publishing works, disallow + publishing with tokens. +- **Kind:** hardening. +- **Cost:** `.github/workflows/*.yml` and npm settings. No code, not + breaking. Medium risk only in the sense that the first release after the + change must be watched. + +### 13. What the published tarball contains + +- **What happens.** `files` is `dist`, `README.md`, `CHANGELOG.md`, `LICENSE`. + The packed 0.11.0 tarball has 98 entries: those four files, `package.json`, + and `.mjs`, `.cjs`, `.d.mts`, `.d.cts` and `.map` files under `dist`. The + source maps embed `sourcesContent`, which is our public source and no + secret. No test, fixture, `.env` or configuration file is included, and the + library source has no `process.env`, `eval`, `new Function` or `innerHTML`. + The published `package.json` has no install-time scripts; it keeps + `prepack` (`cp ../../README.md .`), which runs only when someone packs from a + checkout. Unpacked size is 543 KB, mostly source maps. +- **Where.** `packages/classy-store/package.json` `files`, `scripts.prepack`. +- **Who can cause it.** Nothing to cause. Informational. +- **Proposal: accept.** Optionally strip the development scripts from the + published manifest, but nothing here is a risk. +- **Kind:** none needed. +- **Cost:** none. + +## Stage 1 findings followed up + +- **48** (`Object.assign` with `__proto__` swaps the prototype): settled in + finding 1. Persist does not use `Object.assign`, and its key filter keeps + `__proto__` out unless the application lists it. DevTools skips it by + accident of `findGetterDescriptor` (finding 7). +- **52** (a getter in `properties` is saved and restoring fails part-way): + still true. Finding 1 proposes rejecting getters at `persist()` time, and + finding 3 proposes the clone-everything-first restore that makes any failure + atomic. +- **53** (an array `state` passes the envelope check): still true, and the + array also reaches `migrate`, whose type says it cannot. Finding 4. +- **54** (dead or redundant code in `persist.ts`): none of it is a security + issue. The redundant `typeof envelope !== 'object'` guard is safe because a + primitive's `state` reads as `undefined`. Finding 4 proposes replacing the + guards with one `readEnvelope` that reports why a record was refused. + +## API question 8: development-only diagnostics that would catch silent failures + +From this subject's side, in order of value: + +1. **Unreadable stored records** (finding 4, 5): report through `onError` as + `'parse'` with a reason. This is not development-only; it is a missing + error. +2. **Bad `properties` entries** (finding 1, stage 1 findings 52 and 55): throw + at `persist()` time for a getter, a method, a prototype key or a malformed + transform. +3. **A restore that leaves the store unsnapshottable** (finding 3): one + `snapshot()` after restore, inside the existing `try`, turns a bricked store + into a reported failure. Cheap enough to run always. +4. **DevTools**: warn in development on a malformed time-travel message and on + a key that does not exist on the store, instead of swallowing the first and + silently adding the second (finding 7). +5. **`syncTabs` with an adapter that is not `localStorage`**: warn in + development, since the option then listens to `localStorage` events that + the adapter never produces (`persist.types.ts:113-114` already says so in a + comment). + +## Verified by running code, and only read + +Verified by running code (scripts and outputs in the scratch folder named +above): + +- Findings 1 to 9: every behaviour quoted in their output blocks, against our + source at `12fe57d`, under Bun 1.4.4. The depth limits in finding 3 are + Bun's and were not measured in a browser. +- Finding 10: registry metadata, absence of install scripts, registry + signature. +- Finding 11: `bun audit` output over a copy of the lockfile. +- Finding 12: that 0.11.0 was published by GitHub Actions over OIDC with a + provenance attestation (registry metadata). +- Finding 13: the tarball listing, and the absence of `process.env`, `eval`, + `new Function` and `innerHTML` in `packages/classy-store/src` (grep). + +Only read, not run: + +- That anything running in the release job can obtain the OIDC token and + publish (finding 12). This is how GitHub's OIDC and npm trusted publishing + work as documented; I did not attempt it. +- That Bun's default trusted list is the only set of dependency scripts that + run on install. +- That `keyof T` of a class instance type excludes `__proto__` and + `constructor` (finding 1). I did not compile a test. +- That an array `state` reaches `migrate` (finding 4): read from + `persist.ts:287-315`, not run with a version mismatch. +- That browsers hit the recursion limits of finding 3 at lower depths than + Bun. +- I did not read `~/.npmrc` or any credential file, and found no secret in the + tracked files (`git ls-files` has no `.env`, `.npmrc`, key or certificate + file). + +## Appendix: reproduction code and output + +The scripts are in +`/private/tmp/claude-501/-Users-robertparallax-WebstormProjects-classy-store/9c8c2bbd-bb57-4b12-aa7b-9d06972e3fdd/scratchpad/stage-2-security/repro/`. +The essential parts follow. + +### Hostile stored records (`persist-input.ts`, abridged) + +```ts +class Settings { + count = 0; + label = 'a'; + prefs: Record = {theme: 'light'}; + items: string[] = []; + get doubled() { + return this.count * 2; + } + inc() { + this.count++; + } +} + +async function restore(title: string, raw: string | null, extra = {}) { + const store = createClassyStore(new Settings()); + const storage = memoryStorage(raw); // a Map behind getItem/setItem/removeItem + const h = persist(store, {name: 'k', storage, onError, ...extra} as never); + await h.hydrated; + // prints prototype, fields, own keys of prefs, ({}).polluted, errors +} + +await restore( + 'top-level prototype keys named in properties', + `{"version":0,"state":{"__proto__":{"polluted":1},"constructor":{"x":1},"count":5}}`, + {properties: ['count', '__proto__', 'constructor']}, +); +await restore( + 'nested __proto__ in prefs', + `{"version":0,"state":{"prefs":{"__proto__":{"polluted":1,"isAdmin":true},"theme":"dark"}}}`, +); +await restore( + 'custom merge using Object.assign({}, current, persisted)', + `{"version":0,"state":{"__proto__":{"count":99,"polluted":1}}}`, + {merge: (p: object, c: object) => Object.assign({}, c, p)}, +); +// ...envelopes 'not json', '5', 'null', '"str"', '[]', state null/'str'/[1,2,3]; +// versions undefined, -1, '2', 2.5, 1e308, {}, null against version 2; +// migrate throwing / returning null, a string, an array; deserialize throwing; +// merge returning null; expiresAt undefined, 'yesterday', -1, 0, 1e308, null. +``` + +Output, condensed (the full output is `persist-input.out`): + +```text +top-level __proto__/constructor/prototype, default properties + proto Settings: true count 5 inc: function doubled 10 ({}).polluted: undefined errors [] +top-level prototype keys named in properties + proto Settings: false count 5 inc: undefined doubled undefined own constructor: true +nested __proto__ in prefs + proto Settings: true prefs own keys ["__proto__","theme"] prefs proto Object.prototype: true +custom merge using Object.assign / using spread + proto Settings: true count 0 / 3 ({}).polluted: undefined +stored keys named after a method and a getter + count 2 inc: function doubled 4 +envelope not json errors ["parse: JSON Parse error: Unexpected identifier \"not\""] +envelope 5, null, "str", [], state null, state "str", state [1,2,3] + count 0 errors [] +wrong field types count "hello" label {"nested":true} items {"0":"x","length":3} isArray false +version missing / {} / null migrate got oldVersion 0 +version "2" migrate got oldVersion 0 (configured version is 2) +version -1 / 2.5 / 1e308 migrate got -1 / 2.5 / 1e308 +version "2", no migrate count 0 errors [] +migrate throws errors ["parse: migrate boom"] +migrate returns null errors ["parse: null is not an object (evaluating 'Object.keys(state)')"] +migrate returns string/array count 0 errors [] +deserialize throws on label count 0 (nothing assigned) errors ["parse: bad label"] +merge returns null count 0 errors ["parse: null is not an object"] +expiresAt missing/"yesterday"/null/1e308 count 9 (restored) +expiresAt -1 / 0 count 0 (expired) +``` + +### Cross-tab events (`storage-events.ts`) + +```ts +function fire(init: { + key: string | null; + newValue: string | null; + storageArea?: unknown; +}) { + const event = new Event('storage') as Event & Record; + Object.assign(event, init); // Bun has no StorageEvent; persist reads only these three + globalThis.dispatchEvent(event); +} +const h = persist(store, {name: 'app', storage, syncTabs: true, onError}); +fire({key: 'app', newValue: rec({count: 1})}); +otherArea.map.set('app', rec({count: 2, token: 'theirs'})); +fire({ + key: 'app', + newValue: rec({count: 2, token: 'theirs'}), + storageArea: otherArea, +}); +fire({key: 'app', newValue: rec({count: 3}), storageArea: storage}); +fire({key: 'other', newValue: rec({count: 4})}); +fire({ + key: 'app', + newValue: '{"version":0,"state":{"__proto__":{"x":1},"count":5}}', +}); +fire({key: 'app', newValue: 'garbage'}); +fire({key: null, newValue: null}); +h.dispose(); +fire({key: 'app', newValue: rec({count: 99})}); +``` + +```text +1. synthetic event without storageArea applied: true +2. event from a different storage area with the same key applied: true theirs +3. event whose value is no longer in the configured storage applied: false +4. event with a different key applied: false +5. __proto__ in event: count 5 proto kept true +6. malformed event value -> errors: ["parse: JSON Parse error: Unexpected identifier \"garbage\""] +7. clear() from another tab ignored, count stays 5 +8. event after dispose applied: false +``` + +### DevTools messages (`devtools-input.ts`, abridged) + +```ts +globalThis.window = globalThis; +globalThis.__REDUX_DEVTOOLS_EXTENSION__ = { + connect: () => ({ + init, + send, + subscribe: (l) => { + listener = l; + return () => { + listener = undefined; + }; + }, + }), +}; +class Account { + count = 0; + role = 'user'; + prefs = {theme: 'light'}; + #secret = 1; + get isAdmin() { + return this.role === 'admin'; + } + set level(v: unknown) { + console.log(' setter "level" called with', JSON.stringify(v)); + } + promote() { + this.role = 'admin'; + } +} +const store = createClassyStore(new Account()); +devtools(store, {name: 'test'}); +jump({ + count: 5, + isAdmin: true, + promote: 'replaced', + constructor: {evil: 1}, + prototype: {p: 1}, + level: 7, + added: 'new field', +}); +listener({ + type: 'DISPATCH', + payload: {type: 'JUMP_TO_STATE'}, + state: + '{"__proto__":{"promote":"x","polluted":1},"prefs":{"__proto__":{"isAdmin":true}}}', +}); +// then ROLLBACK, IMPORT_STATE, RESET, COMMIT, TOGGLE_ACTION, ACTION with count 77/78; +// jump({count: 1}); jump({count: 2}) followed by store.count = 3 in the same tick; '{oops'. +``` + +```text +init payload keys: [ "count", "role", "prefs", "isAdmin", "level" ] + setter "level" called with 7 +count: 5 +isAdmin still a getter: false function +promote still a method: function +constructor own field: false prototype own field: true +added field: true new field +store proto unchanged: true +prefs own keys: ["__proto__"] prefs proto plain: true +({}).polluted: undefined +count after other message types: 5 +fields not in the jumped-to state survive: {"count":1,"role":"user","prefs":{"__proto__":{"isAdmin":true}},"prototype":{"p":1},"added":"new field","isAdmin":false} +edit in the same tick as a jump was sent: false count 3 +malformed state ignored without report +listener removed on dispose: true +``` + +### Deep and large records (`depth2.ts`, `depth3.ts`, `large-input.ts`) + +```ts +class S { + a: unknown = 'default-a'; + b: unknown = 'default-b'; +} +for (const d of [15000, 16000, 17000, 18000, 19000, 20000]) { + const raw = `{"version":0,"state":{"a":"restored-a","b":${'{"n":'.repeat(d)}0${'}'.repeat(d)}}}`; + const store = createClassyStore(new S()); + const h = persist(store, {name: 'k', storage: mapStorage(raw), onError}); + await h.hydrated; + // try snapshot(store); print a, typeof b, snapshot result, errors +} +// depth3.ts: at depth 17000, edit store.a, wait, compare the stored record, then save() +``` + +```text +15000 a= restored-a b= object snapshot ok errors +16000 a= restored-a b= object snapshot RangeError errors +17000 a= restored-a b= object snapshot RangeError errors +18000 a= restored-a b= object snapshot RangeError errors +19000 a= restored-a b= string snapshot ok errors parse:RangeError +20000 a= restored-a b= string snapshot ok errors parse:RangeError + +after an edit: errors write:RangeError | stored record unchanged: true +save() rejects with RangeError + +100000 rows (2.1 MB): restore 133.1 ms, list.length=100000, ok, ok, errors=[] +1000000 rows (21.9 MB): restore 1483.1 ms, list.length=1000000, ok, ok, errors=[] +``` + +### Cost of a `__proto__`-stripping reviver (`reviver.ts`) + +```ts +const rev = (k: string, v: unknown) => (k === '__proto__' ? undefined : v); +// JSON.parse(raw) vs JSON.parse(raw, rev) on a 2.1 MB record, three rounds +``` + +```text +2.1 MB: plain 4.0 ms, with __proto__ reviver 41.3 ms +2.1 MB: plain 2.6 ms, with __proto__ reviver 34.1 ms +2.1 MB: plain 2.7 ms, with __proto__ reviver 35.2 ms +["b"] +``` From cd6a73f3e3fedf1f3a9732d202a1545119dfc2ad Mon Sep 17 00:00:00 2001 From: codeBelt Date: Thu, 19 Nov 2026 04:47:44 -0600 Subject: [PATCH 069/169] docs: add the stage 2 report for Legend-State Co-Authored-By: Claude Fable 5.2 --- review/stage-2/legend-state.md | 1442 ++++++++++++++++++++++++++++++++ 1 file changed, 1442 insertions(+) create mode 100644 review/stage-2/legend-state.md diff --git a/review/stage-2/legend-state.md b/review/stage-2/legend-state.md new file mode 100644 index 00000000..0ee92bb7 --- /dev/null +++ b/review/stage-2/legend-state.md @@ -0,0 +1,1442 @@ +# Stage 2: Legend-State (persistence, sync and batching; API read) + +Stage 2 of the pre-1.0 review, 2026-11-19. Read-only: nothing in the +repository was changed apart from this file. This is an API read, so the +source was read only at the files that decide persistence and batching. + +## Library, version and files read + +- **Library:** `@legendapp/state`, from `https://github.com/LegendApp/legend-state`. +- **Two versions were read**, because the "latest stable release" is not where + the project is going: + - **2.1.15**, the npm `latest` tag and the newest stable release. Tag + `v2.1.15`, commit `02032f3c75874904b114ec6d69cbbfba45a29970`, dated + 2024-08-30. Its persistence is `persistObservable()`. + - **3.0.0-next.1**, the npm `next` tag. Tag `v3.0.0-next.1`, commit + `2676125aa77002cadbb70d32d795fa64930f8051`, dated 2026-11-17. Version 3 + replaces `persistObservable()` with `syncObservable()` and rewrites the + batcher. It is a pre-release; the stable line is two years old, so I read + it as the direction the library has taken. Every claim below names which + version it is about. +- **Files read, 2.1.15** (`src/`): `batching.ts` whole; `persist/persistObservable.ts` + whole; `persist-plugins/local-storage.ts` whole; `ObservableObject.ts` + lines 100 to 135, 545 to 625 and 700 to 760 (`set`, `setKey`, `assign`, + `updateNodesAndNotify`); the `PersistOptions*`, `ObservablePersistLocal` and + `PersistMetadata` types in `observableInterfaces.ts`. A grep over all of + `src/` for `beforeunload`, `pagehide`, `visibilitychange`, `storage` events, + `migrat`, `version`, `expire` and `ttl`. +- **Files read, 3.0.0-next.1** (`src/`): `batching.ts` lines 1 to 200 and 395 to + 562; `sync/syncTypes.ts`, `sync/persistTypes.ts`, `persistFormat.ts` whole; + `sync/retry.ts` lines 1 to 60; `sync/syncObservable.ts` lines 255 to 355 + (local save queue and metadata), 432 to 580 (the queue that turns changes + into saves), 3178 to 3554 (`onObsChange`, `loadLocal`, `loadPersistedLocal`) + and 4500 to 4518 (return value); `persist-plugins/local-storage.ts` whole; + `globals.ts` lines 43 to 138 (`safeStringify`, `safeParse`); a grep over + `src/` for every `NODE_ENV` branch and `[legend-state]` message. + `syncObservable.ts` is 4,520 lines, about 3,000 of them reconciliation of + pending changes with server data. I did not read that part line by line. +- **Not read:** the IndexedDB, MMKV, AsyncStorage and SQLite plugins beyond + their types and their parse-failure messages; the Firebase, Supabase and + CRUD sync plugins; the React bindings; Legend's website documentation. +- **Ours:** `utils/persist/persist.ts` and `persist.types.ts` whole, + `core/core.ts` lines 205 to 330 (notification, transactions, `batch`, + `deliver`) and 560 to 600 (`subscribe`), and the persist tutorial and + architecture pages under `website/content/docs/`. Line numbers for ours refer + to `release/1.0` at `5d866cb`. +- **Ported tests** ran on Bun 1.4.4, with `@legendapp/state@2.1.15` and + `@legendapp/state@3.0.0-next.1` each installed from npm in its own scratch + folder (version 3 imports itself by name, so the two cannot share a folder), + and against our source imported by absolute path. Their code and output are + in the appendix. + +## Summary + +Legend-State is not a class store, and its persistence is built around remote +sync: each observable can have a local cache and a remote, and the machinery +(pending-change tracking, replay after a failed upload, `lastSync`, retry with +back-off) exists for the remote. For a store that persists to `localStorage` +the comparison is narrower than the size of its source suggests, and it comes +out mostly in our favour: we have a schema version and migration, expiry, +cross-tab sync, a status handle, a disposable handle and a deferred save after +an early write, none of which Legend's local persistence has. Eleven findings +follow. The three that matter most: + +1. **Synchronous hydration (finding 4).** With a synchronous storage area, + Legend has the stored value in the observable the moment the persistence + call returns (port P2: 7 against our 0). We always read through an `await`, + so a store on `localStorage` renders its defaults first and the saved state + a microtask later. That is a choice with an SSR consequence, and it should + be made on purpose before 1.0. +2. **A throwing listener broke Legend's batcher until 3.0 (finding 1).** In + 2.1.15 one listener that throws leaves a module-level flag set, so no + observable notifies again, and the second listener on the same observable + never runs (port B5). Version 3 fixed it by running every listener and + rethrowing the first error. Our `deliver()` already isolates listeners + (`core.ts:314-327`); what is worth taking from version 3 is only its + decision about where the error goes. +3. **`batch()` and `async` functions (finding 3).** Neither library notices an + `async` function passed to `batch`; the writes after the first `await` fall + outside it (port B8). Legend avoids half of the trap by typing `batch` as + returning nothing; ours returns whatever `run` returns, so it hands back the + promise that tells the caller nothing was batched. A dev-only check or a type + that refuses a promise would catch it. + +"Where we already do better" lists what to keep. + +## How the two designs differ + +- **Legend notifies on every write, immediately, unless a batch is open.** + `notify()` runs "immediate" listeners, adds the node to the current batch, and + if no batch is open calls `runBatch()` at once (2.1.15 `batching.ts:79-109`; + 3.0.0-next.1 `batching.ts:116-190`). Port B1 shows the default listener has + run before the write returns. `ObservableObject.updateNodesAndNotify` opens a + batch around each write so that one write is one notification + (`ObservableObject.ts:719-752`). Ours is the opposite default: a plain + subscriber hears one notification per microtask and a `{sync: true}` one per + write or per method call (`core.ts:217-241`). +- **A Legend listener gets a list of changes** (`path`, `valueAtPath`, + `prevAtPath`) and a lazy `getPrevious()`; ours get nothing. Persistence is the + consumer that needs it: it saves the changed paths, not the whole value. +- **Legend's persistence is an observer of the observable**, registered with + `obs.onChange` (`persistObservable.ts:802-812`), like ours with `subscribe` + (`persist.ts:485`). It has no handle to stop it: `persistObservable` returns + the observable itself, and 3.0 returns the sync-state observable + (`syncObservable.ts:4500-4518`). Ours returns a handle with `dispose`. +- **Legend has no snapshots, so it has nothing like our version-keyed restore + bookkeeping.** It marks changes that came from a restore instead + (finding 6). + +## Findings + +### 1. A throwing listener wedged the batcher in 2.1.15; 3.0 fixed it + +Stage 1 findings 18, 22 and 23 concern what happens around a listener. Bears on +API question 8. + +- **What they do.** + - 2.1.15: `batchNotifyChanges` calls `listener(listenerParams!)` with no + `try` (`batching.ts:243`). `endBatch` sets `isRunningBatch = true`, calls + `runBatch()` and sets it back to `false` on the next line, with no `finally` + (`batching.ts:313-317`). A throw leaves `isRunningBatch` true, so every later + `endBatch` takes the "already running" branch, sets `didDelayEndBatch` and + returns (`batching.ts:296-300`): nothing is ever notified again. + - 3.0.0-next.1: `batchNotifyChanges` catches each listener's error, keeps the + first, finishes the other listeners and rethrows it (`batching.ts:412-420` + and the `if (didError) throw firstError` after the loop). `endBatch` resets + `isRunningBatch` in a `catch` (`batching.ts:523-535`), and + `endBatchAndThrow` closes a batch while keeping the error that interrupted + it (`batching.ts:545-551`). `batch()` uses it (`batching.ts:489-497`). +- **What we do.** `deliver()` copies the listeners, calls each in a `try`, and + sends the error to `console.error` (`core.ts:314-327`). The writer does not + see it. +- **Difference in behaviour.** Port B5, 2.1.15, run in a process of its own: + the write throws, the second listener on the same observable does not run, + and an unrelated observable's listener is called 0 times out of 2 writes, for + the rest of the process. Version 3 and ours: the second listener runs, and the + other store is notified twice (appendix, B5 and `b5.iso.ts`). Ours never + throws to the writer; version 3 does, with the first error. +- **Proposal: reject the bug, adapt the decision.** Keep `deliver()`. The open + question is where a listener's error should go. Version 3 gives it to the + writer, after every listener has run. That is wrong for us: the write has + already happened and a framework binding's error would surface in whatever + line assigned a field. `console.error` is the quietest answer and is what a + Vue or Solid user sees from their own effects. A cheap improvement that comes + from reading Legend: route the error through one function that dev tools and + tests can replace, so the stage 3 diagnostics work has a single place to hook. + That is optional. +- **Kind:** diagnostics. +- **Cost:** none to keep; a replaceable reporter is one function in `core.ts` + and an internal export, not breaking. + +### 2. A write that is undone inside a batch is not notified + +Bears on API question 2. + +- **What they do.** In 3.0.0-next.1, `notify()` looks for the node in the open + batch and, when the new value equals the value from before the batch, deletes + the entry, so no listener hears of it (`batching.ts:133-143`, the check + `existing.prev === value`). Port B6: `a` set to 1 and back to 0 inside a + batch gives 0 calls in 3.0.0-next.1. Version 2.1.15 gives 1 call: the + suppression is new in 3.0, and `notify()` in 2.1.15 only overwrites the + entry's value (`batching.ts:97-103`). +- **What we do.** Every write bumps the version and schedules a notification + (`core.ts:217-241`), and the transaction delivers once at the end + (`core.ts:249-256`). Port B6: 1 call, to a sync subscriber, with a snapshot + that differs from the earlier one in identity but not in content. +- **Difference in behaviour.** A net-zero batch is silent in Legend 3 and + notifies once in Legend 2.1.15 and in ours. +- **Proposal: reject.** Legend can do this because it has no snapshot object to + keep consistent. A framework binding of ours reads `snapshot(store)` and + compares identity; suppressing the notification while the version has moved + would let a binding hold a snapshot that is no longer the cached one, or force + the snapshot cache to treat a reverted version as unchanged. Structural + sharing could in principle return the old snapshot after a revert, but that is + a change to `snapshot.ts` for a rare case. This is reasoning from reading. +- **Kind:** performance. +- **Cost:** reject; none. + +### 3. `batch()` with an `async` function + +Bears on API questions 2 and 8. + +- **What they do.** `batch(fn: () => void)` in both versions. 2.1.15 calls + `fn()` inside `try/finally` and ends the batch (`batching.ts:268-285`); + 3.0 does the same (`batching.ts:489-497`). The return value is discarded, so + `batch(async () => ...)` returns `undefined`. Neither version inspects it. + `beginBatch()` arms a `setTimeout(onActionTimeout, 0)` that force-ends a batch + still open on the next macrotask and prints "Forcibly completing + observableBatcher because end() was never called" under + `NODE_ENV === 'development'` (2.1.15 `batching.ts:25-34, 286-291`; + 3.0 `batching.ts:49-58`). That watchdog guards the low-level + `beginBatch/endBatch` pair, not the async case: `batch()` always ends + synchronously. +- **What we do.** `batch(run: () => T): T` increments the depth, calls `run`, + and decrements in `finally` (`core.ts:299-306`). It returns what `run` + returns. The doc comment says the part after an `await` is not covered + (`core.ts:282-283`). +- **Difference in behaviour.** Port B8, 2.1.15 and 3.0.0-next.1: one write + before the `await`, two after; the listener has been called once when `batch` + returns and three times when the promise settles; no warning. Ours: the same + three calls, no warning, and `batch` returns the promise. In Legend that + promise is dropped, so the mistake is invisible; in ours it is returned, which + makes a check possible. +- **Proposal: adapt.** Two ways, both small. (a) A dev-only `console.warn` + when `run()` returns a thenable, with a stable message. (b) A type that + rejects a function returning a promise, for example a conditional type on the + parameter; this needs a type test because inference through a conditional + return is awkward (reading, not tried). Neither changes the runtime contract. + Do not copy Legend's watchdog timer: it exists for an unbalanced + `beginBatch/endBatch` pair, which we do not export. +- **Kind:** diagnostics. +- **Cost:** `core.ts` (about 5 lines) or `index.ts` types; not breaking; low + risk. + +### 4. Hydration is synchronous in Legend and asynchronous in ours + +Bears on API question 8 only indirectly; it is the persistence design question +the brief asks about ("how hydration interacts with rendering on a server"). + +- **What they do.** The local-storage plugin reads synchronously + (`persist-plugins/local-storage.ts:13-26` in both versions: `getTable` calls + `storage.getItem` and parses). `loadLocal` / `loadPersistedLocal` call it and + merge into the observable (2.1.15 `persistObservable.ts:520-616`; 3.0 + `syncObservable.ts:3296-3398`). The function is `async`, but it reaches its + first `await` only when the plugin is not yet initialised or has an + asynchronous `loadTable`. For `localStorage`, nothing is awaited, so the merge + has run when the persistence call returns. On the server the plugin is built + with `typeof localStorage !== 'undefined' ? localStorage : undefined` + (`local-storage.ts:67-71` in 2.1.15) and `getTable` returns `undefined` + without a storage object, so a server render sees the defaults and a client + render sees the stored data. That would be a hydration mismatch, and I found + no option for it (reading from the source; no server render was run). +- **What we do.** `persist()` starts `hydrateFromStorage()` and does not wait + (`persist.ts:488-496`). It reads with `raw = await storage.getItem(name)` + (`persist.ts:398`), and an `await` on a plain value still yields a + microtask. So even a synchronous adapter delivers after the call returns. + `skipHydration` and `rehydrate()` are the documented route for SSR + (`persist.types.ts:101-106`). +- **Difference in behaviour.** Port P2, both versions of Legend: the observable + holds 7 immediately after the call; ours holds 0 and reaches 7 after + `await handle.hydrated`. +- **Proposal: adapt, as a decision for stage 3.** The case for a synchronous + fast path: in a client-only app on `localStorage` the first render shows + defaults and the second shows the saved state, a visible flash that Legend and + Zustand's synchronous storage avoid. The case against: a synchronous restore + inside `persist()` runs `migrate`, transforms and `merge` (user code) inside + the caller's stack, and it makes hydration order depend on whether the adapter + happens to be synchronous. The middle path is an option, for example + `hydrate: 'sync' | 'async'`, defaulting to the current behaviour, so SSR stays + safe. `getItem` returning a non-promise is the signal; `hydrated` would still + resolve. This touches the restore-versus-local-edit logic (stage 1 finding + 56), which currently relies on the read being in flight. +- **Kind:** API design. +- **Cost:** `persist.ts`, `persist.types.ts`, docs and about 6 tests; additive if + it is an option; medium risk because of finding 56. + +### 5. No write is flushed when the page goes away + +- **What they do.** Neither version has a `beforeunload`, `pagehide` or + `visibilitychange` handler: the grep over `src/` finds listeners only in + `useHover.ts`, `pageHash.ts` and `pageHashParams.ts`. It does not need one for + local saves, because there is no local debounce: a change is queued in a + microtask and written at once (3.0 `syncObservable.ts:3233-3246`, 2.1.15 + `persistObservable.ts:488-500`). `debounceSet` (3.0) and `saveTimeout` (the + Firebase plugin) debounce the remote upload only (3.0 + `syncObservable.ts:518-530`), and they are not flushed either. +- **What we do.** `debounce` is for the local write (`persist.ts:247-259`) and + nothing flushes the timer when the tab closes; `syncTabs` is the only global + listener (`persist.ts:480-482`). +- **Difference in behaviour.** With `debounce: 500`, an edit made less than half + a second before the tab closes is lost. Legend has no equivalent exposure + because it has no local debounce. This is a gap the comparison exposes, not + something Legend solved. +- **Proposal: adapt.** When `debounce > 0` and a timer is pending, flush on + `pagehide` (and `visibilitychange` to `hidden`) with a synchronous + `storage.setItem` when the adapter returned a non-promise; for an async + adapter, start the write and accept it may not finish. Remove the listeners in + `dispose()`. Add an option or make it the default when `debounce > 0`. + Reading only; I did not test a browser unload. +- **Kind:** bug (data loss window), API design. +- **Cost:** `persist.ts`, one test file, docs; not breaking if added behind the + existing `debounce`; low risk. + +### 6. Telling a restore's writes from the user's + +Stage 1 finding 54 (dead and redundant code in `persist.ts`) and the version +bookkeeping in `applyPersistedState`. + +- **What they do.** Restores write inside a flag. In 3.0, `loadPersistedLocal` + sets `internal.globalState.isLoadingLocal = true` around `mergeIntoObservable` + (`syncObservable.ts:3386-3397`); `notify()` stores that flag on the batch + entry (`batching.ts:143-165`, `isFromPersist`, `isFromSync`); listeners receive + it as `isFromPersist` / `isFromSync` in their parameters, and `onObsChange` + skips a change when `isFromPersist` is set (`syncObservable.ts:3183-3185`). + 2.1.15 reads the global flag when the listener runs instead + (`persistObservable.ts:485-486`, `isLoadingLocal`, `isLoadingRemote`). +- **What we do.** After a batched notification we cannot tell who wrote, so + `persist` records the versions it expects: `skipAutoSaveVersion`, + `clearedVersion`, `expectedVersion`, `discardEditedFields()` and a baseline + snapshot comparison (`persist.ts:128-129, 262-270, 281-382`). About 100 lines, + and the area stage 1 found most to explain (finding 54, `persist.json`). +- **Difference in behaviour.** Equivalent results on the cases stage 1 pinned; + Legend's flag is simpler but cannot express "a subscriber edited another field + while the restore was running": there the restore's own batch is tagged as a + whole. +- **Proposal: reject.** To copy the flag we would tag each pending notification + in the core with its origin, because our persist subscriber runs in a later + microtask, after the restore function has returned; Legend can carry the tag + because its batch entries hold it. That puts persist-specific state into + `core.ts` and widens the listener contract. The version scheme is local to + `persist.ts` and exact. Keep it; if stage 3 wants fewer lines, simplify + inside `persist.ts` (the four cancel-timer blocks and the unread assignments + of finding 54), not by moving the logic. +- **Kind:** simplification (rejected). +- **Cost:** reject; none. + +### 7. The storage contract, ready-made backends and async transforms + +- **What they do.** A Legend backend is a class implementing a table-shaped + interface: `getTable`, `set(table, changes)`, `deleteTable`, `getMetadata`, + `setMetadata`, `deleteMetadata`, and optional `initialize` and `loadTable` + (3.0 `sync/syncTypes.ts:146-155`; 2.1.15 `observableInterfaces.ts:222-231`). + It receives changes by path and a metadata record for pending changes and + `lastSync`. The library ships six: localStorage, sessionStorage, AsyncStorage, + MMKV, IndexedDB and Expo SQLite. Backend-specific options live inside the + generic option objects (`mmkv`, `indexedDB`, `options: any`; + `syncTypes.ts:25-37`), and a plugin is instantiated once per class and shared + (`syncObservable.ts:3316-3328`). Transforms are `transform: {load, save}` + over the whole table, may return promises, and (2.1.15) `fieldTransforms` + renames fields; a field mapped to null is not saved (2.1.15 + `persistObservable.ts:276-278`). +- **What we do.** `StorageAdapter` is `getItem`, `setItem`, `removeItem` on + strings, sync or async (`persist.types.ts:10-14`): the Web Storage shape. A + per-property transform is `{key, serialize, deserialize}`, synchronous + (`persist.types.ts:22-31`). We ship no adapter. +- **Difference in behaviour.** Ours is simpler and is the shape every key-value + store already has, so wrapping AsyncStorage, MMKV or `idb-keyval` is a few + lines and encryption is a wrapper that encrypts the string in `setItem` and + decrypts in `getItem` (reading from the types; not tried). Legend's table + model is what lets IndexedDB store rows and SQLite store tables, which a + string key cannot do. Our synchronous `serialize` cannot call an async + encryption API; the adapter route can. +- **Proposal: keep the contract; adapt the docs.** Add short recipes for + AsyncStorage, IndexedDB and an encrypting wrapper to the persist tutorial, as + that is what a Legend user would otherwise look for. Reject a table model. + Consider letting `serialize` and `deserialize` return a promise only if a real + case needs it; the adapter already covers it. +- **Kind:** docs. +- **Cost:** `PERSIST_TUTORIAL.md`; not breaking. + +### 8. Date, Map and Set round trip by default in Legend + +Bears on API question 5. + +- **What they do.** `safeStringify` replaces a `Date`, a `Map` and a `Set` with a + tagged object, `{__LSType: 'Date' | 'Map' | 'Set', value}`, and `safeParse` + revives it (3.0 `globals.ts:43-83`; 2.1.15 `helpers.ts:254-259`). Both local + plugins use them. A stored object that merely looks like the tag is revived + too, and a malformed one makes `new Map(value.value)` throw during parse; + that is reasoning from reading, and a case for the security agent. + 3.0 stopped reviving plain ISO strings to dates, and prints a dev warning for + them (`globals.ts:92-107`). +- **What we do.** `JSON.stringify` of the snapshot (`persist.ts:217`). A `Date` + becomes a string, a `ReactiveMap` becomes whatever its snapshot serialises to, + so these need a `PropertyTransform` (`persist.types.ts:16-31`). Stage 1 + finding 53 shows the envelope check is loose about shapes. +- **Difference in behaviour.** A store with a `Date` field persists with no + configuration in Legend and needs a transform in ours. +- **Proposal: reject a tag format; adapt the docs.** A tag convention makes the + stored format part of the contract and invites the prototype-pollution class + of problem the security agent is asked to look at. A short "Dates, maps and + sets" section in the tutorial with a ready-made transform for each is + enough. Consider exporting those three transforms from the utils entry if the + tutorial already repeats them. +- **Kind:** docs, API design. +- **Cost:** docs; optionally three small exports; not breaking. + +### 9. Status: Legend has a pause switch and an in-flight count; we have neither + +- **What they do.** The returned sync state is an observable with + `isPersistLoaded`, `isPersistEnabled`, `isSyncEnabled`, `lastSync`, + `syncCount`, `isGetting`, `isSetting`, `numPendingGets`, `numPendingSets`, + `error`, `sync()`, `getPendingChanges()`, `resetPersistence()` and `reset()` + (3.0 `observableInterfaces.ts:199-231`). Setting `isPersistEnabled` to false + stops saving (`syncObservable.ts:566, 677`); `readonly` in the persist options + does the same statically. Errors go to `syncState.error` and to + `onError(error, {source, type, retry, ...})` (`syncObservable.ts:432-445`). +- **What we do.** `PersistStatus` holds `isHydrated`, `isExpired`, `isDisposed` + and `lastError`, observable through `UtilityStatusSource` + (`persist.types.ts:148-188`), plus `dispose`, `save`, `clear`, `rehydrate`. +- **Difference in behaviour.** Ours is smaller and, because `dispose()` exists, + covers stopping for good. A user who wants to pause saving for a while (for + example while loading a document from a server) has to dispose and + re-attach, losing the handle. There is no "a write is in flight" signal for a + "Saving..." indicator; `save()` resolves when its write ends, which covers the + explicit case only. +- **Proposal: reject for now.** Neither is a gap that stage 3 should fill before + 1.0 unless the owner uses them. If one is wanted, a `pause()` and `resume()` + on the handle that stop `scheduleWrite` and take a save on resume is about 10 + lines; an `isSaving` field in `PersistStatus` is the one addition the status + type can take later without breaking anyone. +- **Kind:** API design. +- **Cost:** `persist.ts`, `persist.types.ts`; additive. + +### 10. Cross-tab and conflicts: Legend has none locally; ours is last writer wins + +- **What they do.** There is no `storage` event handling in either version (grep + over `src/`). The local-storage plugin keeps the parsed table in a field, + `data[table]`, filled on the first read and updated by every `set` + (`local-storage.ts:14-38`). It therefore never sees another tab's write, and + its next save writes its cached copy back, so the other tab's change is lost. + Port P4: another tab writes `b = 99`; this tab then sets `a`; the stored + record is `{a: 1, b: 0}`, both versions. Conflict settlement exists only for + the remote: pending local paths are replayed over server data after a `get` + (2.1.15 `persistObservable.ts:724-748`; 3.0 `syncObservable.ts:3400-3532` and + the reconciliation functions that follow), with `mode` choosing set, assign, + merge, append or prepend (`GetMode`, `observableInterfaces.ts:165`) and + `lastSync` as the cursor. +- **What we do.** `syncTabs` listens for the `storage` event, ignores deletions + and obsolete values, cancels a pending debounced write, and restores field by + field (`persist.ts:446-476`). A write in this tab replaces the whole stored + record. Port P4 on ours without `syncTabs`: the same `{a: 1, b: 0}`, because we + also serialise the whole selected state. +- **Difference in behaviour.** With `syncTabs` on, ours would have taken `b = 99` + before the local write; Legend cannot. Neither has per-field merging of two + tabs' concurrent edits: whichever tab saves last wins the whole record. +- **Proposal: reject remote sync; adapt the docs.** Remote sync with pending + replay is a product of its own (about 3,000 lines in Legend) and does not + belong in a 1.0 persist util. What the comparison does show is that the + tutorial's `syncTabs` section should say plainly that two tabs editing + different fields at once is last-writer-wins on the whole record, which is + not obvious from "Tab B automatically receives the update". Per-field storage + (one key per property) would remove it but is a different design. +- **Kind:** docs. +- **Cost:** `PERSIST_TUTORIAL.md`; not breaking. + +### 11. Unknown stored keys are merged in Legend and dropped in ours + +Stage 1 findings 52, 53 and 55 concern what `persist` accepts from storage. + +- **What they do.** Whatever the record holds is merged into the observable with + `mergeIntoObservable` (3.0 `syncObservable.ts:3390-3394`; 2.1.15 + `persistObservable.ts:601`). There is no property list to filter by. Port P3: + a stored `{old: 1, count: 7}` over `{count: 0}` leaves the observable with the + keys `count` and `old`, both versions. A falsy root replaces the default + (`syncObservable.ts:3390-3392`), and a non-object root is accepted. +- **What we do.** Only keys in `propKeys` are written, and only those present in + the merged state (`persist.ts:337-339, 360-365`). Port P3 on ours: the keys + are `['count']`. Stage 1 finding 53 notes that an array in `state` still + passes the envelope check, so the filter is by key name, not by shape. +- **Difference in behaviour.** After a schema change Legend keeps stale keys in + live state and rewrites them on the next save; ours ignores them and drops + them on the next save. That is also why ours can be the safer one against a + stored `__proto__` key (the security agent's area). +- **Proposal: keep ours.** The `properties` allow-list, resolved once at attach + (`persist.ts:160-168`), is the thing Legend lacks. Say in the docs that + unknown stored keys are ignored and removed on the next save, because it is + the reason `migrate` is only needed for renames and shape changes. +- **Kind:** docs. +- **Cost:** `PERSIST_TUTORIAL.md`; none. + +## Where we already do better + +1. **Listener isolation** (finding 1): ours is the 3.0 behaviour minus the + rethrow, and far better than 2.1.15. +2. **Schema version and migration.** Legend has none. The only version is a + marker for the serialiser's own format, `__LSFormat: 1` in the metadata + record (3.0 `persistFormat.ts:5-9, 44-50`), used to decide how to revive + dates. An app that renames a field has to do it inside `transform.load` + without being told which version it is reading. `grep -rn migrat src` finds + nothing relevant in either version. Ours: `version`, `migrate`, `merge` + (`persist.ts:310-315`). +3. **Expiry.** No TTL in Legend (grep for `expire`, `ttl` in the persist and sync + folders: no match). Ours: `expireIn`, `clearOnExpire`. +4. **An edit made before the stored data arrives.** Legend refuses to save it: + it logs "An observable was changed before being loaded from persist" and + returns, so the change stays in memory and reaches storage only if a later + change happens (2.1.15 `persistObservable.ts:230-235`; 3.0 + `syncObservable.ts:569-576, 680-688`). Ours holds the save until the read + settles and then writes the merged state (`persist.ts:235-244, 436-439`). +5. **A corrupt record.** Port P1: both libraries fall back to the defaults and + overwrite the bad record on the next save. Legend says so with one + `console.error` and no callback; the plugin catches the parse error itself + (`local-storage.ts:17-22`), so the application never hears. Ours calls + `onError(error, 'parse')` and sets `lastError` in the status. Neither keeps a + copy of the bad record. +6. **Write coalescing in 2.1.15.** Port P5: three writes in one tick give three + `setItem` calls in 2.1.15 (each write is its own queued change), one in 3.0 + (`mergeQueuedChanges`, `syncObservable.ts:406-431, 449`), and one in ours. In + 3.0 the first write after loading a record that predates the format marker + also writes a second key; a record already in the current format gets one. +7. **A handle with `dispose`.** Legend's local persistence cannot be detached + from an observable. +8. **Cross-tab sync, debounce for local writes and `skipHydration`** have no + counterpart. + +## Our options next to Legend's + +Options of ours that look unusual beside it, and what that tells us: + +| Option | In Legend | Reading | +| --------------------------- | ------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `version`, `migrate` | Absent | Not unusual overall (Zustand has both); a real advantage over Legend. | +| `merge` | Always a merge into the initial value; no choice | Ours is an option with one non-default value; fine. | +| `expireIn`, `clearOnExpire` | Absent | The only options with no precedent in the libraries read so far. Two options for one concept; a single `expireIn` with the clearing as the default is worth a stage 3 look. | +| `syncTabs` | Absent | A browser-only listener behind a boolean. Keep. | +| `skipHydration` | Absent (hydration is synchronous) | Exists because of finding 4; the two decisions go together. | +| `debounce` | Remote only (`debounceSet`); local writes are immediate | Brings the unload gap of finding 5. | +| `properties` allow-list | Absent (whole observable; `fieldTransforms` can drop a field) | Useful; finding 52 and 55 of stage 1 are its edge cases. Consider throwing on an entry that is neither a key nor a complete transform. | + +Features a user of ours would miss, most to least likely: + +1. A synchronous first render with saved data (finding 4). +2. Dates, maps and sets saved without a transform (finding 8). +3. Ready-made backends for AsyncStorage, MMKV, IndexedDB, SQLite (finding 7). +4. A pause switch and an in-flight flag (finding 9). +5. Remote sync with retry, back-off and replay of pending changes. Out of scope. + +## Stage 1 findings with a counterpart + +| Stage 1 finding | Legend-State | +| ----------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | +| 18 (sync subscriber that writes recurses) | A write inside a listener is applied and the written node's listeners run (port B7, both versions: order `a,b`). No loop guard was looked for. | +| 22 (re-entrant write delivers a snapshot twice) | No snapshots; not comparable. | +| 23 (rejected promise from a subscriber) | Listener return values are ignored in `batchNotifyChanges`; an async listener's rejection is unhandled, as in ours. Reading only. | +| 43 (a setter is not a transaction) | Legend has no class setters. Its equivalent is a computed's `set`; not read. | +| 52 (a getter named in `properties` is saved) | No allow-list, so no counterpart. Computeds are not persisted unless they are the persisted observable. Not tested. | +| 53 (an array passes the envelope check) | Any JSON root is accepted; falsy roots replace the default, objects and arrays merge (`syncObservable.ts:3390-3394`). No envelope to check. | +| 54 (dead code in `persist.ts`) | See finding 6; Legend's flag approach has none of these blocks but moves the logic into the core. | +| 55 (malformed `properties` entry ignored) | No allow-list. | +| 56 (when a debounced save runs against a read) | Legend drops a change made before load with a console error (finding in "Where we already do better", item 4); it has no local debounce. | + +## The eight API questions, from Legend's point of view + +1. **Should synchronous notification be the default for `subscribe()`?** Legend's + default is synchronous per write (port B1), and it needs `batch()` and + per-write batching inside `set` to make that tolerable. Its persistence + layer then adds its own microtask queue on top (3.0 + `syncObservable.ts:3244-3246`, 2.1.15 `persistObservable.ts:498-499`), which + is what we have built in as the default. Legend is evidence that synchronous + delivery is workable; it is not evidence that ordinary subscribers should + have it, because Legend's framework bindings are the ones that want it. No + stronger position. +2. **Writes outside a method, and `batch()`.** Legend has no methods: every + write is outside one, and nothing warns. Grouping is explicit, with `batch()` + exported and used inside the library for compound writes (`assign`, + persistence restores). `batch` belongs in the API there because the default + is per-write notification; for us the default already coalesces, so `batch` + serves sync subscribers and framework bindings. Nested batches fold into the + outermost (port B3), a throwing body still notifies and rethrows (port B4), + and a write undone inside a batch is silent in 3.0 only (port B6, finding 2). Neither + library groups an `async` body (finding 3). Position: keep `batch`; do not + try to group automatically. +3. **Snapshot getters as enumerable own accessors.** No position (no snapshots). +4. **Arrow-function methods and `#private` fields.** No position (Legend is not + class based). +5. **Native `Map` and `Set` reactive directly.** Legend observes native Map and + Set and persists them as tagged JSON (3.0 `globals.ts:49-58`; + `batching.ts` handles `Map` in its previous-value rebuild). I did not test + its Map reactivity. No stronger position. +6. **Opt-in or opt-out for nested class instances.** Legend wraps plain objects + and arrays by default and has an opaque marker to exclude one (a symbol check + in `updateNodes`, 2.1.15 `ObservableObject.ts:105-135`; `ObservableHint.ts` + in 3.0, not read). That is opt-out. Reading only. +7. **Entry points and names consistent across the five frameworks.** No + position. Observation only: Legend splits by concern (`/persist`, `/sync`, + `/persist-plugins/*`), not by framework. +8. **Development-only diagnostics.** Legend has about 30 branches gated on + `process.env.NODE_ENV === 'development'` (sometimes also `'test'`), each with + a `[legend-state]` prefix: a circular reference, an `HTMLElement` set into + state, `toggle` on a non-boolean, duplicate ids in an array, an observable + changed before its persistence loaded, a missing `name` on `persist`, an + unfinished batch (3.0 `grep` result, listed under files read). Transfers to + us: (a) a dev warning when `batch()` receives a promise (finding 3); (b) the + "changed before loaded" warning is not needed because we defer the save; (c) + a missing `name` is already a type error for us. The watchdog timer for an + unbalanced batch does not apply. Bigger point: the split is a plain + `NODE_ENV` read, so the checks vanish from a minified build, which is what + the stage 3 diagnostics work needs. Both versions call `process.env` inline; + 3.0 caches the result in a variable for speed (`globals.ts:88-92`). + +## What I verified by running code, and what I only read + +Ran (appendix): batching behaviour on 2.1.15, 3.0.0-next.1 and ours (B1 to B8); +listener failure in 2.1.15 in an isolated process; persistence behaviour on all +three (P1 to P5). The localStorage in the ports is a map-backed stand-in with the +`getItem`, `setItem` and `removeItem` calls the plugins use; no browser was +involved, so nothing was tested about real `storage` events, quotas, or +page unload. + +Only read: every claim about `syncObservable.ts` outside the lines listed +(pending-change replay, `lastSync`, retry, `mode`), the Firebase, IndexedDB, +MMKV, AsyncStorage and SQLite plugins, `isPersistEnabled` behaviour, the Map +reactivity in Legend, `ObservableHint`, and finding 2's argument about snapshot +identity in our core. + +Not done: Legend's website documentation was not consulted, per the brief. + +## Appendix: ported tests and their output + +Ports were run with `bun `. The two Legend versions use separate folders +under the scratch directory, `ports/` (2.1.15) and `ports3/` (3.0.0-next.1); +the ours ports import our source by absolute path. + +### Batching, Legend-State + +The same file runs against each version. B5 comes last because in 2.1.15 it breaks the batcher for the rest of the process (a first run with it in the middle showed this). + +`ports/batch.legend.ts` + +```ts +import {observable, batch} from '@legendapp/state'; +const flush = () => new Promise((r) => setTimeout(r, 0)); +const pkg = JSON.parse( + await Bun.file( + import.meta.dir + '/node_modules/@legendapp/state/package.json', + ).text(), +).version; +console.log('legend-state', pkg); + +// B1 write outside batch: when does the listener run? +{ + const o = observable({a: 0}); + let calls = 0; + o.onChange(() => calls++); + o.a.set(1); + console.log( + 'B1 write outside batch, listener calls right after write:', + calls, + ); +} +// B2 three writes in a batch +{ + const o = observable({a: 0, b: 0, c: 0}); + const seen: number[] = []; + o.onChange((p) => seen.push(p.changes.length)); + batch(() => { + o.a.set(1); + o.b.set(1); + o.c.set(1); + }); + console.log( + 'B2 three writes in batch: calls, changes per call =', + JSON.stringify(seen), + ); +} +// B3 nested batch +{ + const o = observable({a: 0, b: 0}); + let calls = 0; + o.onChange(() => calls++); + batch(() => { + batch(() => { + o.a.set(1); + }); + console.log('B3 after inner batch, calls =', calls); + o.b.set(1); + }); + console.log('B3 after outer batch, calls =', calls); +} +// B4 throwing batch body +{ + const o = observable({a: 0}); + let calls = 0; + o.onChange(() => calls++); + let thrown: unknown; + try { + batch(() => { + o.a.set(1); + throw new Error('boom'); + }); + } catch (e) { + thrown = e; + } + console.log( + 'B4 throwing batch: error propagated =', + (thrown as Error)?.message, + ', listener calls =', + calls, + ); +} +// B6 revert inside batch +{ + const o = observable({a: 0}); + let calls = 0; + o.onChange(() => calls++); + batch(() => { + o.a.set(1); + o.a.set(0); + }); + console.log('B6 a 0->1->0 inside batch: calls =', calls); +} +// B7 write inside listener +{ + const o = observable({a: 0, b: 0}); + const log: string[] = []; + o.a.onChange(() => { + log.push('a'); + o.b.set(5); + }); + o.b.onChange(() => log.push('b')); + o.a.set(1); + console.log('B7 write in listener, order =', log.join(',')); +} +// B5 throwing listener: do others run, do later writes notify? +{ + const o = observable({a: 0}); + let second = 0, + later = 0; + o.onChange(() => { + throw new Error('listener boom'); + }); + o.onChange(() => second++); + let err: unknown; + try { + o.a.set(1); + } catch (e) { + err = e; + } + console.log( + 'B5 throwing listener: write threw =', + (err as Error)?.message, + ', second listener ran =', + second, + ); + const o2 = observable({x: 0}); + o2.onChange(() => later++); + try { + o2.x.set(1); + } catch {} + try { + o2.x.set(2); + } catch {} + console.log( + 'B5 a different observable afterwards: listener calls (expect 2) =', + later, + ); +} +``` + +Output, `batch.v2.txt`: + +```text +legend-state 2.1.15 +B1 write outside batch, listener calls right after write: 1 +B2 three writes in batch: calls, changes per call = [3] +B3 after inner batch, calls = 0 +B3 after outer batch, calls = 1 +B4 throwing batch: error propagated = boom , listener calls = 1 +B6 a 0->1->0 inside batch: calls = 1 +B7 write in listener, order = a,b +B5 throwing listener: write threw = listener boom , second listener ran = 0 +B5 a different observable afterwards: listener calls (expect 2) = 0 +``` + +Output, `batch.v3.txt`: + +```text +legend-state 3.0.0-next.1 +B1 write outside batch, listener calls right after write: 1 +B2 three writes in batch: calls, changes per call = [3] +B3 after inner batch, calls = 0 +B3 after outer batch, calls = 1 +B4 throwing batch: error propagated = boom , listener calls = 1 +B6 a 0->1->0 inside batch: calls = 0 +B7 write in listener, order = a,b +B5 throwing listener: write threw = listener boom , second listener ran = 1 +B5 a different observable afterwards: listener calls (expect 2) = 2 +``` + +### A throwing listener in 2.1.15, alone in its process + +`ports/b5.iso.ts` + +```ts +import {observable} from '@legendapp/state'; +const o = observable({a: 0}); +let second = 0; +o.onChange(() => { + throw new Error('boom'); +}); +o.onChange(() => second++); +try { + o.a.set(1); +} catch (e) { + console.log('threw', (e as Error).message); +} +const p = observable({x: 0}); +let later = 0; +p.onChange(() => later++); +p.x.set(1); +p.x.set(2); +console.log( + 'second listener ran:', + second, + '| unrelated observable listener calls after two writes (expect 2):', + later, +); +setTimeout( + () => console.log('after a macrotask, unrelated observable calls:', later), + 5, +); +``` + +Output, `b5iso.v2.txt`: + +```text +threw boom +second listener ran: 0 | unrelated observable listener calls after two writes (expect 2): 0 +after a macrotask, unrelated observable calls: 0 +``` + +### Batching, ours + +B5 on ours has `write threw = undefined` because `deliver()` sends the error to `console.error`, which the script counts. + +`ports/batch.ours.ts` + +```ts +import { + batch, + createClassyStore, + subscribe, +} from '/Users/robertparallax/WebstormProjects/classy-store/packages/classy-store/src/index.ts'; +const flush = () => new Promise((r) => setTimeout(r, 0)); +const origError = console.error; +let loggedErrors = 0; +console.error = () => { + loggedErrors++; +}; +const make = () => createClassyStore({a: 0, b: 0, c: 0}); +// B1 +{ + const s = make(); + let sync = 0, + async_ = 0; + subscribe(s, () => sync++, {sync: true}); + subscribe(s, () => async_++); + s.a = 1; + console.log( + 'B1 write outside batch: sync subscriber calls right after =', + sync, + ', default subscriber calls right after =', + async_, + ); + await flush(); + console.log('B1 default subscriber after a tick =', async_); +} +// B2 +{ + const s = make(); + let sync = 0, + def = 0; + subscribe(s, () => sync++, {sync: true}); + subscribe(s, () => def++); + batch(() => { + s.a = 1; + s.b = 1; + s.c = 1; + }); + await flush(); + console.log( + 'B2 three writes in batch: sync calls =', + sync, + ', default calls =', + def, + '(no change list is passed)', + ); +} +// B3 +{ + const s = make(); + let calls = 0; + subscribe(s, () => calls++, {sync: true}); + batch(() => { + batch(() => { + s.a = 1; + }); + console.log('B3 after inner batch, sync calls =', calls); + s.b = 1; + }); + console.log('B3 after outer batch, sync calls =', calls); +} +// B4 +{ + const s = make(); + let calls = 0; + subscribe(s, () => calls++, {sync: true}); + let thrown: any; + try { + batch(() => { + s.a = 1; + throw new Error('boom'); + }); + } catch (e) { + thrown = e; + } + console.log( + 'B4 throwing batch: error propagated =', + thrown?.message, + ', sync calls =', + calls, + ); +} +// B5 +{ + const s = make(); + let second = 0; + const s2 = make(); + let later = 0; + subscribe( + s, + () => { + throw new Error('listener boom'); + }, + {sync: true}, + ); + subscribe(s, () => second++, {sync: true}); + let err: any; + try { + s.a = 1; + } catch (e) { + err = e; + } + subscribe(s2, () => later++, {sync: true}); + s2.a = 1; + s2.a = 2; + console.log( + 'B5 throwing listener: write threw =', + err?.message, + ', second listener ran =', + second, + ', console.error calls =', + loggedErrors, + ', other store calls (expect 2) =', + later, + ); +} +// B6 +{ + const s = make(); + let calls = 0; + subscribe(s, () => calls++, {sync: true}); + batch(() => { + s.a = 1; + s.a = 0; + }); + console.log('B6 a 0->1->0 inside batch: sync calls =', calls); +} +// B7 +{ + const s = make(); + const log: string[] = []; + subscribe( + s, + () => { + log.push('first'); + if (log.length === 1) s.b = 5; + }, + {sync: true}, + ); + s.a = 1; + console.log('B7 write in listener, log =', log.join(',')); +} +console.error = origError; +``` + +Output, `batch.ours.txt`: + +```text +B1 write outside batch: sync subscriber calls right after = 1 , default subscriber calls right after = 0 +B1 default subscriber after a tick = 1 +B2 three writes in batch: sync calls = 1 , default calls = 1 (no change list is passed) +B3 after inner batch, sync calls = 0 +B3 after outer batch, sync calls = 1 +B4 throwing batch: error propagated = boom , sync calls = 1 +B5 throwing listener: write threw = undefined , second listener ran = 1 , console.error calls = 1 , other store calls (expect 2) = 2 +B6 a 0->1->0 inside batch: sync calls = 1 +B7 write in listener, log = first,first +``` + +### `batch()` with an async function + +Outputs in order: 2.1.15, 3.0.0-next.1, ours. + +`ports/batch.async.legend.ts` + +```ts +import {observable, batch} from '@legendapp/state'; +const o = observable({a: 0, b: 0, c: 0}); +let calls = 0; +o.onChange(() => calls++); +const warn: any[] = []; +const w = console.warn; +console.warn = (...a) => warn.push(a); +const e = console.error; +console.error = (...a) => warn.push(a); +const p = batch(async () => { + o.a.set(1); + await null; + o.b.set(1); + o.c.set(1); +}); +console.log( + 'B8 async batch: calls right after batch() returned =', + calls, + '| returned a promise =', + p instanceof Promise, +); +await p; +await new Promise((r) => setTimeout(r, 5)); +console.log( + 'B8 after the awaited writes: calls =', + calls, + '| warnings =', + warn.length, +); +console.warn = w; +console.error = e; +``` + +`ports/batch.async.ours.ts` + +```ts +import { + batch, + createClassyStore, + subscribe, +} from '/Users/robertparallax/WebstormProjects/classy-store/packages/classy-store/src/index.ts'; +const s = createClassyStore({a: 0, b: 0, c: 0}); +let calls = 0; +subscribe(s, () => calls++, {sync: true}); +const warn: any[] = []; +const w = console.warn; +console.warn = (...a) => warn.push(a); +const e = console.error; +console.error = (...a) => warn.push(a); +const p = batch(async () => { + s.a = 1; + await null; + s.b = 1; + s.c = 1; +}); +console.log( + 'B8 async batch: sync calls right after batch() returned =', + calls, + '| returned a promise =', + p instanceof Promise, +); +await p; +await new Promise((r) => setTimeout(r, 5)); +console.log( + 'B8 after the awaited writes: sync calls =', + calls, + '| warnings =', + warn.length, +); +console.warn = w; +console.error = e; +``` + +Output, `async.v2.txt`: + +```text +B8 async batch: calls right after batch() returned = 1 | returned a promise = false +B8 after the awaited writes: calls = 3 | warnings = 0 +``` + +Output, `async.v3.txt`: + +```text +B8 async batch: calls right after batch() returned = 1 | returned a promise = false +B8 after the awaited writes: calls = 3 | warnings = 0 +``` + +Output, `async.ours.txt`: + +```text +B8 async batch: sync calls right after batch() returned = 1 | returned a promise = true +B8 after the awaited writes: sync calls = 3 | warnings = 0 +``` + +### Persistence, Legend-State 2.1.15 + +`ports/persist.legend.v2.ts` + +```ts +// Legend-State 2.1.15 +const store = new Map(); +let writes = 0; +const writeLog: string[] = []; +(globalThis as any).localStorage = { + getItem: (k: string) => (store.has(k) ? store.get(k)! : null), + setItem: (k: string, v: string) => { + writes++; + writeLog.push(k); + store.set(k, v); + }, + removeItem: (k: string) => { + store.delete(k); + }, +}; +const {observable} = await import('@legendapp/state'); +const {persistObservable} = await import('@legendapp/state/persist'); +const {ObservablePersistLocalStorage} = await import( + '@legendapp/state/persist-plugins/local-storage' +); +const flush = () => new Promise((r) => setTimeout(r, 20)); +const errs: unknown[][] = []; +const origErr = console.error; +console.error = (...a) => errs.push(a); +const mk = (name: string, init: any) => { + const o = observable(init); + persistObservable(o, { + local: name, + pluginLocal: ObservablePersistLocalStorage, + }); + return o; +}; + +// P1 corrupt record, then a save +store.set('p1', '{not json'); +{ + const o = mk('p1', {count: 0}); + console.log( + 'P1 value right after attach =', + JSON.stringify(o.peek()), + '| console.error calls =', + errs.length, + '| error text =', + String(errs[0]?.[0]), + ); + await flush(); + o.count.set(5); + await flush(); + console.log('P1 stored after a later save =', store.get('p1')); +} +// P2 synchronous hydration +store.set('p2', JSON.stringify({count: 7})); +{ + const o = mk('p2', {count: 0}); + console.log('P2 value immediately after attach (no await) =', o.peek().count); +} +// P3 stored record from an older shape holds an unknown key +store.set('p3', JSON.stringify({old: 1, count: 7})); +{ + const o = mk('p3', {count: 0}); + await flush(); + console.log( + 'P3 keys after hydrating {old:1,count:7} over {count:0} =', + JSON.stringify(Object.keys(o.peek())), + ); +} +// P4 what is written for one changed field +store.set('p4', JSON.stringify({a: 0, b: 0})); +{ + const o = mk('p4', {a: 0, b: 0}); + await flush(); + store.set('p4', JSON.stringify({a: 0, b: 99})); // another tab writes + o.a.set(1); + await flush(); + console.log( + 'P4 after another tab wrote b=99 and this tab set a=1, stored =', + store.get('p4'), + ); +} +// P5 write per mutation: 3 sets in separate ticks vs same tick +store.set('p5', JSON.stringify({a: 0})); +{ + const o = mk('p5', {a: 0}); + await flush(); + writes = 0; + writeLog.length = 0; + o.a.set(1); + o.a.set(2); + o.a.set(3); + await flush(); + console.log( + 'P5 three writes in one tick -> storage setItem calls =', + writes, + JSON.stringify(writeLog), + ); +} +console.error = origErr; +``` + +Output, `persist.v2.txt`: + +```text +P1 value right after attach = {"count":0} | console.error calls = 1 | error text = [legend-state] ObservablePersistLocalStorage failed to parse +P1 stored after a later save = {"count":5} +P2 value immediately after attach (no await) = 7 +P3 keys after hydrating {old:1,count:7} over {count:0} = ["count","old"] +P4 after another tab wrote b=99 and this tab set a=1, stored = {"a":1,"b":0} +P5 three writes in one tick -> storage setItem calls = 3 ["p5","p5","p5"] +``` + +### Persistence, Legend-State 3.0.0-next.1 + +Differs from the 2.1.15 file in the import, the attach call, and the added P5b. + +`ports3/persist.legend.v3.ts` + +```ts +// Legend-State 3.0.0-next.1 +const store = new Map(); +let writes = 0; +const writeLog: string[] = []; +(globalThis as any).localStorage = { + getItem: (k: string) => (store.has(k) ? store.get(k)! : null), + setItem: (k: string, v: string) => { + writes++; + writeLog.push(k); + store.set(k, v); + }, + removeItem: (k: string) => { + store.delete(k); + }, +}; +const {observable} = await import('@legendapp/state'); +const {syncObservable} = await import('@legendapp/state/sync'); +const {ObservablePersistLocalStorage} = await import( + '@legendapp/state/persist-plugins/local-storage' +); +const flush = () => new Promise((r) => setTimeout(r, 20)); +const errs: unknown[][] = []; +const origErr = console.error; +console.error = (...a) => errs.push(a); +const mk = (name: string, init: any) => { + const o = observable(init); + syncObservable(o, {persist: {name, plugin: ObservablePersistLocalStorage}}); + return o; +}; + +// P1 corrupt record, then a save +store.set('p1', '{not json'); +{ + const o = mk('p1', {count: 0}); + console.log( + 'P1 value right after attach =', + JSON.stringify(o.peek()), + '| console.error calls =', + errs.length, + '| error text =', + String(errs[0]?.[0]), + ); + await flush(); + o.count.set(5); + await flush(); + console.log('P1 stored after a later save =', store.get('p1')); +} +// P2 synchronous hydration +store.set('p2', JSON.stringify({count: 7})); +{ + const o = mk('p2', {count: 0}); + console.log('P2 value immediately after attach (no await) =', o.peek().count); +} +// P3 stored record from an older shape holds an unknown key +store.set('p3', JSON.stringify({old: 1, count: 7})); +{ + const o = mk('p3', {count: 0}); + await flush(); + console.log( + 'P3 keys after hydrating {old:1,count:7} over {count:0} =', + JSON.stringify(Object.keys(o.peek())), + ); +} +// P4 what is written for one changed field +store.set('p4', JSON.stringify({a: 0, b: 0})); +{ + const o = mk('p4', {a: 0, b: 0}); + await flush(); + store.set('p4', JSON.stringify({a: 0, b: 99})); // another tab writes + o.a.set(1); + await flush(); + console.log( + 'P4 after another tab wrote b=99 and this tab set a=1, stored =', + store.get('p4'), + ); +} +// P5 write per mutation: 3 sets in separate ticks vs same tick +store.set('p5', JSON.stringify({a: 0})); +{ + const o = mk('p5', {a: 0}); + await flush(); + writes = 0; + writeLog.length = 0; + o.a.set(1); + o.a.set(2); + o.a.set(3); + await flush(); + console.log( + 'P5 three writes in one tick -> storage setItem calls =', + writes, + JSON.stringify(writeLog), + ); +} +console.error = origErr; +// P5b same as P5 but over a record already written by Legend (not a legacy record), second round of writes +{ + const o = mk('p5', {a: 0}); + await flush(); + writes = 0; + writeLog.length = 0; + o.a.set(10); + o.a.set(11); + o.a.set(12); + await flush(); + console.log( + 'P5b three more writes in one tick, record already in the current format -> storage setItem calls =', + writes, + JSON.stringify(writeLog), + ); +} +``` + +Output, `persist.v3.txt`: + +```text +P1 value right after attach = {"count":0} | console.error calls = 1 | error text = [legend-state] ObservablePersistLocalStorageBase failed to parse +P1 stored after a later save = {"count":5} +P2 value immediately after attach (no await) = 7 +P3 keys after hydrating {old:1,count:7} over {count:0} = ["count","old"] +P4 after another tab wrote b=99 and this tab set a=1, stored = {"a":1,"b":0} +P5 three writes in one tick -> storage setItem calls = 2 ["p5","p5__m"] +P5b three more writes in one tick, record already in the current format -> storage setItem calls = 1 ["p5"] +``` + +### Persistence, ours + +P1 in ours reads the status through `getSnapshot()`; the other ports use `onError` and storage contents. + +`ports/persist.ours.ts` + +```ts +import {createClassyStore} from '/Users/robertparallax/WebstormProjects/classy-store/packages/classy-store/src/index.ts'; +import {persist} from '/Users/robertparallax/WebstormProjects/classy-store/packages/classy-store/src/utils/persist/persist.ts'; +const store = new Map(); +let writes = 0; +const writeLog: string[] = []; +const storage = { + getItem: (k: string) => (store.has(k) ? store.get(k)! : null), + setItem: (k: string, v: string) => { + writes++; + writeLog.push(k); + store.set(k, v); + }, + removeItem: (k: string) => { + store.delete(k); + }, +}; +const flush = () => new Promise((r) => setTimeout(r, 20)); +const errors: Array<[unknown, string]> = []; +const mk = (name: string, init: any) => { + const s = createClassyStore(init); + const h = persist(s, { + name, + storage, + onError: (e, op) => errors.push([e, op]), + }); + return {s, h}; +}; +// P1 +store.set('p1', '{not json'); +{ + const {s, h} = mk('p1', {count: 0}); + await h.hydrated; + console.log( + 'P1 value after hydrated =', + JSON.stringify(s), + '| onError calls =', + errors.length, + 'operation =', + errors[0]?.[1], + '| status.lastError.operation =', + h.getSnapshot?.().lastError?.operation, + ); + s.count = 5; + await flush(); + console.log('P1 stored after a later save =', store.get('p1')); +} +// P2 +store.set('p2', JSON.stringify({version: 0, state: {count: 7}})); +{ + const {s, h} = mk('p2', {count: 0}); + console.log('P2 value immediately after attach (no await) =', s.count); + await h.hydrated; + console.log('P2 value after hydrated =', s.count); +} +// P3 +store.set('p3', JSON.stringify({version: 0, state: {old: 1, count: 7}})); +{ + const {s, h} = mk('p3', {count: 0}); + await h.hydrated; + console.log( + 'P3 keys after hydrating {old:1,count:7} over {count:0} =', + JSON.stringify(Object.keys(s)), + ); +} +// P4 +store.set('p4', JSON.stringify({version: 0, state: {a: 0, b: 0}})); +{ + const {s, h} = mk('p4', {a: 0, b: 0}); + await h.hydrated; + store.set('p4', JSON.stringify({version: 0, state: {a: 0, b: 99}})); + s.a = 1; + await flush(); + console.log( + 'P4 after another tab wrote b=99 and this tab set a=1 (no syncTabs), stored =', + store.get('p4'), + ); +} +// P5 +store.set('p5', JSON.stringify({version: 0, state: {a: 0}})); +{ + const {s, h} = mk('p5', {a: 0}); + await h.hydrated; + await flush(); + writes = 0; + writeLog.length = 0; + s.a = 1; + s.a = 2; + s.a = 3; + await flush(); + console.log( + 'P5 three writes in one tick -> storage setItem calls =', + writes, + JSON.stringify(writeLog), + ); +} +``` + +Output, `persist.ours.txt`: + +```text +P1 value after hydrated = {"count":0} | onError calls = 1 operation = parse | status.lastError.operation = parse +P1 stored after a later save = {"version":0,"state":{"count":5}} +P2 value immediately after attach (no await) = 0 +P2 value after hydrated = 7 +P3 keys after hydrating {old:1,count:7} over {count:0} = ["count"] +P4 after another tab wrote b=99 and this tab set a=1 (no syncTabs), stored = {"version":0,"state":{"a":1,"b":0}} +P5 three writes in one tick -> storage setItem calls = 1 ["p5"] +``` From 2a43f7243aa46480fa8641747c7e67393a73b222 Mon Sep 17 00:00:00 2001 From: codeBelt Date: Thu, 19 Nov 2026 04:51:39 -0600 Subject: [PATCH 070/169] docs: add the stage 2 report for Zustand and Jotai Co-Authored-By: Claude Fable 5.2 --- review/stage-2/zustand-jotai.md | 1540 +++++++++++++++++++++++++++++++ 1 file changed, 1540 insertions(+) create mode 100644 review/stage-2/zustand-jotai.md diff --git a/review/stage-2/zustand-jotai.md b/review/stage-2/zustand-jotai.md new file mode 100644 index 00000000..ce3e42f1 --- /dev/null +++ b/review/stage-2/zustand-jotai.md @@ -0,0 +1,1540 @@ +# Stage 2: Zustand and Jotai (API read) + +Stage 2 of the pre-1.0 review, 2026-11-19. Read-only: nothing in the +repository was changed apart from this file. This is an API read, as the brief +asks: documentation and public API first, source only at the files named. + +## Libraries, versions and files read + +- **Zustand 5.1.0**, `https://github.com/pmndrs/zustand`, tag `v5.1.0`, commit + `9fed2eb2f3af672da9f7bf694b996df3831fc207` (2026-11-06), which is the npm + `latest` tag on 2026-11-19. Read under `src/`: `react.ts`, `traditional.ts`, + `react/shallow.ts`, `vanilla.ts` whole; `middleware/persist.ts` whole; + `middleware/devtools.ts` lines 1 to 560 (the part that decides action names, + connection handling and every message handled; the rest is the action-dropdown + helpers); `middleware/subscribeWithSelector.ts` and `middleware/ssrSafe.ts` + whole. Docs read: `docs/reference/middlewares/persist.md` and `devtools.md` + (parameters and troubleshooting), `docs/learn/guides/nextjs.md`, + `ssr-and-hydration.md`, and the "Changes in v5" part of + `docs/reference/migrations/migrating-to-v5.md`. +- **Jotai 3.0.2**, `https://github.com/pmndrs/jotai`, tag `v3.0.2`, commit + `9de9377d10a5ac01388764b89458e2d7091d29d4` (2026-11-09), npm `latest` on + 2026-11-19. Read under `src/`: `react/Provider.ts`, `useAtom.ts`, + `useAtomValue.ts`, `useAtomValueRawSync.ts`, `useSetAtom.ts`, + `react/utils/useHydrateAtoms.ts`, `vanilla/utils/atomWithStorage.ts` and + `vanilla/utils/selectAtom.ts`. Docs read: `docs/utilities/ssr.mdx`, + `storage.mdx`, `select.mdx`, `docs/guides/nextjs.mdx`, `debugging.mdx` + (headings only) and `docs/core/store.mdx`. Jotai's Redux DevTools support is + a separate package that is not in this repository, so it was not read. +- **Ours**, read at `release/1.0`, commit `c59084e`: + `frameworks/react/hooks/useClassyStore/useClassyStore.ts`, + `frameworks/react/utils/createStoreHook/createStoreHook.ts`, + `hooks/useLocalStore/useLocalStore.ts`, `frameworks/react/server.ts`, + `utils/persist/persist.ts` and `persist.types.ts`, `utils/devtools/devtools.ts`, + `utils/subscribe-key/subscribe-key.ts`, `utils/history/history.ts`, + `utils/utilityStatus/utilityStatus.ts`, `types.ts`, and the entry files + `index.ts` and `utils/index.ts`. Also `types.react.test.ts` (signatures), + `core/core.ts` lines 255 to 300, 470 to 500 and 575 to 612, and the guides + `REACT_SSR.md`, `REACT_SCOPING.md`, `PERSIST_TUTORIAL.md` and + `DEVTOOLS_TUTORIAL.md` under `website/content/docs/`. +- **Ports** ran on Bun 1.4.4 with `react@19.3.1`, `zustand@5.1.0`, + `jotai@3.0.2` and `happy-dom@21.0.4`, in a scratch folder. Our source was + copied (without tests) from `c59084e` into the same folder, so that one + React instance serves all three libraries. The code and output are in the + appendix. + +Line numbers for Zustand and Jotai refer to those tags. Line numbers for ours +refer to `c59084e`. + +## Summary + +Zustand and Jotai disagree with each other on almost everything except two +things: both notify subscribers synchronously, and both let you write from +anywhere. Where they agree with each other and we differ, a user coming from +either will be surprised. Where we differ from one only, the difference is a +choice. Ten findings; the three that matter most: + +1. **Hydration safety is automatic in Zustand and manual in ours (finding 1).** + Zustand's hook reads `getInitialState()` as the server snapshot, so a store + written between the server render and hydration (a persist restore, another + boundary) causes no mismatch. In our port the same case raised React's + hydration error until `prepareStoreForHydration` was called, and Jotai + raised it too. Capturing the initial snapshot automatically is a + non-breaking change and removes the one call every SSR user has to remember. +2. **`persist` fails silently where Zustand speaks (finding 3).** A stored + version that differs from `version` with no `migrate` is ignored with no + `onError`, no log and no status; Zustand logs `console.error`. An async + `migrate`, which Zustand accepts, makes ours restore nothing at all without a + word. The migrated record is also never written back, so the migration runs + on every load until the user's first edit (finding 4). +3. **`devtools` is the thinnest of the three integrations (findings 6 and 7).** + Every entry is named `STORE_UPDATE`. Time travel notifies a synchronous + subscriber once per field (3 notifications for a 3-field jump, against 1 in + Zustand), turns a `Date` field into a string, and `RESET`, `COMMIT`, + `ROLLBACK` and `IMPORT_STATE` are ignored. Method names are already known + inside the core (`core.ts:487-491`), so real action names are cheap. + +Where we are better: the hook with no selector, the `persist` handle, and the +types of the two utilities. "Where ours is clearer" lists them. + +## How the two libraries differ from ours + +This explains why some answers carry over and some cannot. + +- **Zustand's store is a value you replace; ours is one you mutate.** A write is + one `setState(partial)` call, so there is one atomic unit and one + notification (`vanilla.ts:66-81`). Ours has direct property writes, so the + atomic unit has to be made (transactions, `batch()`), and several of our + findings are about that gap. +- **Zustand's middleware wraps the state creator at creation time.** `persist` + and `devtools` wrap `set` and replace `api.setState` + (`persist.ts:218-223`, `devtools.ts:267-296`). That is why they can name an + action and write on every `set`, and also why they have no teardown and need + the `Mutate`/`StoreMutators` type machinery (`vanilla.ts:20-41`). Ours attach + after creation and return a handle. +- **Jotai separates definition from value.** An atom is a key; a store holds the + values (`store.mdx`). A module-level atom is therefore safe on a server, and a + `Provider` makes a fresh store per mount (`Provider.ts:23-49`). Ours, like + Zustand's, puts the value in the module-level object. +- **Neither has a snapshot.** Both hand the component the state object itself. + Questions about frozen snapshots and getters get "no position". + +## Findings + +### 1. The server snapshot is automatic in Zustand, manual in ours + +Stage 1 has no number for this; it bears on API question 7 and 8. + +- **What they do.** Zustand's `useStore` passes `() => selector(api.getInitialState())` + as React's `getServerSnapshot` (`react.ts:30-34`). `getInitialState` is the + state the creator returned (`vanilla.ts:85-86`, `:95`), and `persist` replaces + it with the pre-restore state (`persist.ts:234`). React uses that function + only on the server and while hydrating, so nothing needs calling. Jotai passes + `getSnapshot` for both (`useAtomValueRawSync.ts:35-39`), so a value written + before hydration mismatches; its answer is `useHydrateAtoms`, which sets atoms + once per store before the first read (`useHydrateAtoms.ts:27-54`) and is + documented as the way to do it (`ssr.mdx`). +- **What we do.** `useClassyStore` reads a snapshot from a `WeakMap` that only + `prepareStoreForHydration` fills (`useClassyStore.ts:73-75`, `server.ts:16-22`, + `hydrationSnapshots.ts:4`). Without that call the server snapshot is the + current state (`REACT_SSR.md`: "Unprepared stores retain the existing behavior"). +- **Difference in behaviour.** Port 3: render `0` on the server, write `5`, then + `hydrateRoot`. Zustand: no error, shows 5 after hydration. Zustand with + `persist` and a synchronous storage already holding 7: no error, shows 7. + Jotai: `Hydration failed because the server rendered text didn't match`. + Ours unprepared: the same error. Ours after `prepareStoreForHydration`: no + error. (Appendix, port 3.) +- **Proposal: adapt.** Capture the initial snapshot without being asked. Two + ways, to be decided in stage 3 (reasoning from reading, not prototyped): + capture in `createClassyStore`, or lazily just before the first write, so a + store that is never written costs nothing. Keep `prepareStoreForHydration` as + an explicit capture for a store that was changed before it reached React. The + contract becomes Zustand's: the server and the first client render both start + from the state the store was created with. A late Suspense boundary is already + handled by the `WeakMap`, which would simply be filled earlier. +- **Kind:** API design (removes a required call; also a diagnostics gain, since + forgetting it is a silent mismatch). +- **Cost:** `core.ts` (the write path, if lazy) or `createClassyStore`, and + `hydrationSnapshots.ts` moves out of the React folder. Not breaking. Risk + medium: a retained snapshot holds old objects alive, and writes made through + a raw reference (stage 1 finding 11) would bypass a first-write hook. + +### 2. Hook shape: our no-selector form and `isEqual` against `useShallow` and `equalityFn` + +Stage 1 has no number. + +- **What they do.** Zustand v5's `useStore(api, selector)` takes no equality + argument; a selector that returns a new object every call loops (`react.ts:32`, + and "Changes in v5" in the migration guide). Its fixes are `useShallow(selector)` + (`react/shallow.ts:4-11`) and the separate `useStoreWithEqualityFn(api, + selector, equalityFn)` from `zustand/traditional` (`traditional.ts:21-45`). With + no selector it returns the whole state and re-renders on every change. Jotai + has no selector at all; the slice is another atom, and `selectAtom(atom, + selector, equalityFn)` is "an escape hatch" (`select.mdx`, `selectAtom.ts:24-57`). +- **What we do.** `useClassyStore(store, selector, {isEqual})` and + `useClassyStore(store)`, which returns a `proxy-compare` tracking proxy and + re-renders only for fields the component read (`useClassyStore.ts:35-49`, + `:129-136`). A selector's result is cached per snapshot, so a new object each + call does not loop (`:196-229`). +- **Difference in behaviour.** Port 1. Zustand, selector `s => ({a: s.a})`: + React reports `The result of getSnapshot should be cached` and throws + `Maximum update depth exceeded` after 55 renders. Ours: one render, and + one re-render for an unrelated write; with `isEqual: shallowEqual` zero. + No selector, unrelated write: Zustand re-renders once, ours zero, Jotai (atom + per field) zero. +- **Proposal: keep the behaviour; adapt the name.** Our no-selector form is the + best of the three and needs no change. The option is called `isEqual`; in + these two libraries every equivalent is `equalityFn` (`traditional.ts:28`, + `subscribeWithSelector.ts:54`, `selectAtom.ts:22`). Renaming it before the + freeze costs a find and replace and removes a surprise. Also keep `shallowEqual` + exported; Zustand's users know it as `shallow`. +- **Kind:** API design. +- **Cost:** `useClassyStore.types.ts`, the three adapter docs, the type test + (`types.react.test.ts`, one assertion). Breaking, but the owner is the only + user. Risk low. + +### 3. `persist` is silent where Zustand reports + +Stage 1 findings 52, 53 and 55 are the same family (accepted input that does +nothing). + +- **What they do.** With a stored version that differs and no `migrate`, + Zustand logs `State loaded from storage couldn't be migrated since no migrate + function was provided` and keeps the current state (`persist.ts:276-278`). + When storage is unavailable it logs a warning on every write (`:197-208`). + `migrate` may return a promise (`:99-105`, handled at `:271-273`). A stored + record with no `version` field is accepted whatever the configured version + (`:262-265`). +- **What we do.** A version mismatch with no `migrate` returns `false` and + nothing else: no `onError`, no status change, no log (`persist.ts:310-315`). A + record with no version counts as version 0 (`:310-311`). `migrate` is typed + and called as synchronous (`persist.types.ts:78-81`, `persist.ts:314`). There + is no development-mode logging anywhere in the package (the only two + `console.error` calls are listener failures, `core.ts:325` and + `utilityStatus.ts:45`). +- **Difference in behaviour.** Port 4c: version 1 stored, `version: 2`, no + `migrate`. Zustand: state kept, `console.error` as above. Ours: state kept, + `onError` calls `[]`. Port 4d: record without a version, `version: 2`. + Zustand restores 7; ours ignores it (0). Port 7: `migrate` is `async`. + Zustand restores 7; ours restores 0, `onError` is empty, `isHydrated` is true + (reached through a cast; the types forbid it, but a plain JavaScript user + has no types). +- **Proposal: adapt.** (a) Report a version mismatch with no `migrate` through + `onError` under a new operation (for example `'migrate'`), so `usePersistStatus` + shows it. (b) Await `migrate` so that an async function works, as Zustand + does: `hydrateFromStorage` is already async (`persist.ts:385`), so the await + goes before `applyPersistedState`, and the edit-protection baseline is taken + before it already. If a promise is not wanted, throw when the return value has + a `then`. (c) Keep "no version means 0"; it is safer than Zustand's, which + accepts an old unversioned record into a new schema. Document it in + `PERSIST_TUTORIAL.md`. +- **Kind:** diagnostics, API design. +- **Cost:** `persist.ts`, `persist.types.ts` (`PersistOperation` gains a member; + `migrate` return type widens), tutorial. Not breaking. Risk low to medium: + awaiting `migrate` adds a turn between the read and the apply, which the + existing "hydration request" counter already guards (`:386`, `:405`). + +### 4. A migrated record is not written back + +- **What they do.** After a successful migration Zustand calls `setItem()` at + once, so the stored record carries the new version (`persist.ts:297-299`). +- **What we do.** `applyPersistedState` restores the migrated state and sets + `skipAutoSaveVersion` so the restore itself does not trigger a write + (`persist.ts:378-380`). Nothing writes the record at the new version until the + first edit. +- **Difference in behaviour.** Port 4e: stored `{old: 7}` at version 1, + `version: 2`, a `migrate` that renames the field. Zustand: restores 7 and has + written `{"state":{"n":7},"version":2}`. Ours: restores 7, writes nothing. +- **Why it matters.** The migration then runs on every page load until the user + edits something. A user who only reads stays at version 1 indefinitely. When + a later release deletes the old `migrate` branch because "everyone has + migrated", those users hit finding 3's silent path and lose the stored data + (reasoning from reading; the run shows only the missing write). +- **Proposal: adopt.** Save once after a successful migration. Take care that the + write is a revision the handle already expects, as the restore already is + (`:372-376`), and check with `syncTabs` on that two tabs which both migrate do + not keep rewriting each other's record (not run). +- **Kind:** bug (data lifecycle). +- **Cost:** `persist.ts` only, plus a test. Not breaking. Risk low to medium + (a write at load changes when storage is first touched). + +### 5. `persist` defaults and option names against both libraries + +- **What they do.** Zustand's `persist` needs only `name`. `storage` defaults to + `createJSONStorage(() => localStorage)`, evaluated lazily so a server does not + throw (`persist.ts:178-180`, `:31-41`; documented in `persist.md`). Jotai's + `atomWithStorage` needs a key and a value; the default storage is `localStorage` + with the same lazy guard and a development warning if it throws + (`atomWithStorage.ts:100-113`). Zustand names the filter + `partialize` (a function); Jotai has none, since each atom is one value. Both + take a `storage` that already (de)serialises (`PersistStorage`, + `SyncStorage`), where ours takes a raw string store. +- **What we do.** `name` and `storage` are both required, and `storage` is a raw + string store such as `localStorage` itself (`persist.types.ts:37-45`). The + filter is `properties: Array` + (`:57`), a list rather than a function. +- **Difference.** A Zustand user types `persist(store, {name: 'x'})` and gets a + type error. Everything after that is clearer in ours: a raw `localStorage` + needs no wrapper, and a per-key transform is typed per key where Zustand + offers one global `storage` plus `partialize`. The stored envelope is nearly + identical (`{state, version}`, ours adds `expiresAt`), so an app moving from + Zustand to us keeps its stored data (port 4a, 4f show the same keys). +- **Proposal: adapt.** Make `storage` optional and default to a lazily read + `globalThis.localStorage`, with no persistence (and one development warning, + once finding 3's diagnostics exist) where it is missing or throws. Keep + `properties`; `partialize` would be a second way to say the same. Keep the + names `name`, `version`, `migrate`, `merge` and `skipHydration`, which already + match Zustand's in spelling and argument order (`persist.md`, `persist.ts:176-187`). +- **Kind:** API design. +- **Cost:** `persist.ts`, `persist.types.ts`, docs. Not breaking. Risk low. + +### 6. `devtools` action names and entry timing + +Bears on API question 8. + +- **What they do.** Zustand's patched `setState` takes a third argument, a + string or `{type, ...}`; otherwise it uses `anonymousActionType` or infers the + caller's function name from the stack, falling back to `anonymous` + (`devtools.ts:267-280`, `:223-235`). Several stores can share one connection + through the `store` option, which prefixes the name (`:281-294`). +- **What we do.** Every entry is `{type: 'STORE_UPDATE'}` (`devtools.ts:78`). + The subscription is the batched one, so every mutation in one tick makes one + entry (`:76-79`). The store already knows the method name: the get trap wraps + each method in `transactional(method, receiver)` (`core.ts:487-491`), so the + outermost method call is the natural action. +- **Difference in behaviour.** Port 5a: `inc()`, `inc()`, `reset()` in one tick. + Ours sends one `STORE_UPDATE`. Zustand sends one entry per `set`: `anonymous` + for the arrow function in Bun (stack inference depends on the engine's stack + format), and `counter/incNamed` when the name is passed. +- **Proposal: adapt.** Name the entry after the outermost store method (the + transaction already has the call) and use `STORE_UPDATE` for a direct write + made outside a method. Send on the synchronous channel, once per outermost + transaction, so three methods in a tick give three entries, which is what a + time-travel panel needs. This does not need Zustand's stack inference. +- **Kind:** API design, diagnostics. +- **Cost:** `core.ts` (`transactional` passes a name to a small internal slot), + `devtools.ts`. Not breaking. Risk medium: it touches the hot path, so run + `bun run benchmark:core` before and after; `transactional` runs once per method + call and the added work is one assignment at depth 0. + +### 7. `devtools` time travel and the messages it ignores + +- **What they do.** Zustand handles `ACTION` (custom dispatch, action dropdown), + `DISPATCH` with `RESET` (back to `initialState`), `COMMIT` (re-init), + `ROLLBACK`, `JUMP_TO_STATE`, `JUMP_TO_ACTION`, `IMPORT_STATE` and + `PAUSE_RECORDING` (`devtools.ts:391-557`). Time travel is one `set` call, so one + notification (`:313-318`). `enabled` defaults to off in production + (`:251-254`). Every other option is passed to the extension's `connect()` + (`:240-241`, `:327`), so `actionsDenylist`, `maxAge` and `trace` work. +- **What we do.** Only `JUMP_TO_STATE` and `JUMP_TO_ACTION` (`devtools.ts:85`). + Each key of the parsed state is assigned one at a time with no `batch()` + (`:91-101`). `enabled` defaults to `true` in any environment (`:57`). Only + `name` reaches `connect()` (`:66`). +- **Difference in behaviour.** Port 5b: a jump over 3 fields gives a + synchronous subscriber 3 calls (Zustand: 1), so a React binding is notified + three times for one jump. Port 5c: a `Date` field comes back as the string + `1970-01-01T00:00:00.000Z` after a jump, because the extension sends JSON and + the assignment takes it as is. A `RESET` message leaves the store unchanged + (n stayed 5). +- **Proposal: adopt (batch and Date), adapt (messages and options).** Wrap the + jump in `batch()` (one line). For the `Date` case, keep a current value that + is not JSON-like instead of overwriting it, or reuse the persist transform + shape. Handle `RESET` (back to the state captured at `devtools()` time, which + is what `init()` already sends), `COMMIT` and `ROLLBACK`. Pass remaining + options to `connect()`. Decide `enabled`: tie the default to the environment + as Zustand does, or leave it and keep the "Development-only" example in the + tutorial. The security agent covers the `message.state` parse. +- **Kind:** bug (batch, Date), API design (the rest). +- **Cost:** `devtools.ts`, `DEVTOOLS_TUTORIAL.md`. Not breaking, except a default + change for `enabled`. Risk low. + +### 8. Slice subscriptions: `subscribeKey` against `subscribeWithSelector` + +Bears on API question 1. + +- **What they do.** `subscribeWithSelector` adds an overload + `subscribe(selector, listener, {equalityFn, fireImmediately})`; the listener + gets the selected value and the previous one (`subscribeWithSelector.ts:46-71`). + The plain listener gets `(state, previousState)` (`vanilla.ts:62`). Jotai's + `store.sub(atom, listener)` takes a derived atom for a slice and passes no + arguments (`store.mdx`). +- **What we do.** `subscribeKey(store, key, cb, options)` takes a top-level key + only and calls `cb(value, previous)` (`subscribe-key.ts:17-42`). The core + `subscribe(store, cb, options)` calls `cb()` with nothing (`core.ts:585-603`). + There is no `equalityFn` and no `fireImmediately`. +- **Difference in behaviour.** Port 6b: watching `items.length`. Zustand's + selector does it in three lines and also fires immediately (`[[1,1],[2,1]]`). + Ours cannot name a derived value or a nested field; the port compares by hand + and gets `[[2,1]]`. +- **Proposal: adapt.** Let `subscribeKey` take a selector function as well as a + key, or add a separate selector function, and give it `equalityFn` and + `fireImmediately`. Leave the argument-free `subscribe(store, cb)`, since the + listener can call `snapshot(store)` at no cost (the snapshot is cached by + version); but say so in `API_REFERENCE.md`, because a Zustand user expects + `(state, prev)`. +- **Kind:** API design. +- **Cost:** `subscribe-key.ts`, its types and tutorial. Not breaking if the key + form stays. Risk low. + +### 9. Subscriber delivery: the three libraries chose differently + +Stage 1 findings 18 to 22; bears on API question 1. + +- **What they do.** Zustand notifies with `listeners.forEach` over a `Set` + (`vanilla.ts:79`) and passes the variable `state`, read at call time. Jotai + `store.sub` is synchronous too (port 6a). Neither has a loop guard. +- **What we do.** The core has batched and synchronous listener sets + (`core.ts:585-603`); stage 1 pinned the results as findings 18 to 22. +- **Difference in behaviour.** Port 8, with our subscribers synchronous: + finding 18 (a subscriber that writes): Zustand and Jotai both recurse with no + guard (stopped at 5000 by the test). Finding 20 (unsubscribe a later + subscriber from inside delivery): Zustand never calls it; ours calls it + once. Finding 21 (subscribe during delivery): Zustand calls the new subscriber + for the write in flight; ours does not. Finding 22 (re-entrant write): both + deliver the final state twice to the next subscriber, `[2, 2]`, identical. +- **Proposal: adopt for finding 20, keep ours for 21, no change for 18 and 22.** + Skipping a listener removed before its turn is what a caller expects and costs + a membership check. Not calling a subscriber that registered after the write is + the better rule, so ours is right there. For 18 and 22 neither library does + better; a guard is a stage 3 decision of its own. +- **Kind:** bug (20). +- **Cost:** the delivery loop in `core.ts`, and the test that pins finding 20. + Not breaking. Risk low. + +### 10. Server safety by construction, and the scoping story + +Bears on API question 8. + +- **What they do.** Jotai: atoms are definitions and `Provider` makes a store per + mount, so one app instance per request is isolated by default + (`Provider.ts:33-47`, `nextjs.mdx`). Zustand: "No global stores", create one + per request and pass it by context (`nextjs.md`), which is discipline, and an + experimental `ssrSafe` middleware that throws on `setState` when + `window` is undefined (`ssrSafe.ts:6-25`, marked "experimental" at `:3-5`). + Neither ships a context helper; Zustand's docs show a hand-written provider + that throws when used outside it. +- **What we do.** The same discipline as Zustand, documented in `REACT_SSR.md` + and `REACT_SCOPING.md`, plus `useLocalStore` for a store owned by one + component (`useLocalStore.ts:30-33`). No provider; no server-write check. +- **Proposal: reject a Provider and an automatic server-write check; keep + the docs.** A store is a value, not a key, so a provider would add a second + way to hold it. A server-write warning would fire on legitimate per-request + setup (the docs tell users to build the store from request data and mutate it + before render). If wanted, offer Zustand's opt-in shape (an explicit + read-only-on-server marker) rather than a default. `useLocalStore` is a + convenience neither library ships; keep it. +- **Kind:** docs. +- **Cost:** none to code. + +## Where ours is clearer + +- **The hook with no selector** re-renders only for fields read. Zustand's + returns everything and re-renders for everything; its v5 selector rule + (return a stable value or loop) is a trap ours does not have (port 1). +- **The `persist` handle.** `hydrated` (promise), `isHydrated`, `lastError`, + `isExpired`, `dispose()`, `save()`, `clear()`, `rehydrate()` and the + `usePersistStatus` hook replace Zustand's four pieces: `hasHydrated()`, + `onHydrate`, `onFinishHydration` and the `onRehydrateStorage` function + returning a function (`persist.ts:329-367`, `persist.md`). The handle is a + working external store (`getSnapshot`, `subscribe`; `utilityStatus.ts:11-24`). + Zustand's `persist` also has no teardown; ours does (`persist.ts:500-510`). +- **Errors.** `onError(error, operation)` covers read, parse, write and remove. + Zustand reports a read error only, through `onRehydrateStorage`'s second + argument (`persist.ts:317-326`); a failed write in its `setItem` is unhandled. +- **Edit protection during hydration.** A field edited while the read was in + flight keeps its edit (`persist.ts:343-377`). Neither library does this: both + replace state when the read lands (`persist.ts:296`, and `onMount`'s + `setAtom` at `atomWithStorage.ts:234`). +- **Types.** Our utilities are ordinary functions of a store. Zustand's + middleware need `StoreMutatorIdentifier`, `Mutate` and `StateCreator` with + four type parameters (`vanilla.ts:20-41`), and the docs have an + advanced-TypeScript guide (listed, not read). +- **Cross-tab sync** is an option (`syncTabs`). Zustand has none; Jotai's is + built into its default storage and cannot be turned off + (`atomWithStorage.ts:160-189`). + +## Names a user from either library would trip on + +| Ours | Zustand | Jotai | Note | +| -------------------------------------------- | -------------------------------------- | ------------------------------------------------ | ----------------------------------------------------------------------- | +| `isEqual` option | `equalityFn` | `equalityFn` | Finding 2. | +| `subscribe(store, cb)`, cb gets nothing | cb gets `(state, prev)` | cb gets nothing | Finding 8. | +| `persist` needs `storage` | defaults to `localStorage` | defaults to `localStorage` | Finding 5. | +| `properties: [...]` | `partialize(state)` | none | Keep ours. | +| `skipHydration` | `skipHydration` | restores on mount; `getOnInit` reads at creation | Same name as Zustand. | +| `persist` returns a handle | `store.persist.*` on the store | atom | Finding 5 and "clearer". | +| `prepareStoreForHydration` in `react/server` | automatic | `useHydrateAtoms` (client) | The name says server; it is called in client code too (`REACT_SSR.md`). | +| `devtools(store, {name, enabled})` | creator wrapper, many options | separate package | Findings 6 and 7. | +| `createStoreHook(store)` | `create(creator)` returns a bound hook | n/a | Ours is clear; Zustand's also exposes the store on the hook. | +| `useLocalStore(factory)` | docs recipe with `useState` | `Provider` | Neither ships it. | +| `shallowEqual` | `shallow`, `useShallow` | n/a | Keep. | + +## Stage 1 findings with a counterpart + +| Finding | Zustand | Jotai | +| ------------------------------------------------------- | ------------------------------------------------------------------------------------- | --------------------------------------------------------------- | +| 18, a sync subscriber that writes recurses | Same, no guard (port 8a) | Same, no guard (port 8a) | +| 19, batched subscriber served again in a loop | No counterpart: no batching | No counterpart | +| 20, a removed subscriber is still called once | Not called (port 8b) | Not run | +| 21, a late subscriber sometimes hears the write | Always hears the write in flight (port 8c) | Not run | +| 22, a re-entrant write delivers the same snapshot twice | Same: `[2, 2]` (port 8d) | Not run | +| 23, a returned rejected promise is not reported | The return value is ignored (`vanilla.ts:79`); reading only | Not read | +| 52, a getter named in `properties` | No getters; `partialize` is a function and `JSON.stringify` drops functions (reading) | n/a | +| 53, an array as stored `state` | The default `merge` spreads it into the state (`persist.ts:182-185`, reading) | n/a | +| 55, a malformed `properties` entry is ignored | No counterpart: `partialize` is a function | n/a | +| 56, debounce relative to a read | No debounce; writes on every `set` (`persist.ts:210-223`) | No debounce; writes on every set (`atomWithStorage.ts:259-260`) | +| 57, an edit in the same tick as `undo()` | No history middleware in the package | n/a | + +## The eight API questions + +1. **Should synchronous notification be the default for `subscribe()`?** Both + libraries notify synchronously, and neither has microtask batching (port + 6a: two writes, two calls, in both). They get atomicity from the shape of + the write: one `setState(partial)` or one atom write is one notification. + Ours has direct property writes, which have no such unit, so the microtask + default is the thing that gives a `store.a = 1; store.b = 2` pair one + notification. A user from either library will expect the sync behaviour, so + if the default stays batched, say it at the top of `API_REFERENCE.md`. If it + flips, a plain multi-field write must go through a method or `batch()`. + Evidence only supports "users expect sync"; it does not settle the choice. +2. **Writes outside a store method, and `batch()`.** Both libraries allow + writes from anywhere (`useStore.setState(...)`, `store.set(atom, ...)`) and + neither warns. Neither has `batch()`, because the multi-field write is a + single call (`setState({a, b})`; a Jotai write function that sets two atoms). + Our equivalent of that call is `Object.assign(store, {a, b})`, which is two + writes and two sync notifications (port 6d: Zustand 1, ours 2 synchronous and + 1 batched). So `batch()` belongs in the API, and a + warning on an outside write would contradict what both libraries teach. +3. **Snapshot getters as enumerable own accessors.** No position: neither has + snapshots or class getters. +4. **Arrow-function methods and `#private` fields.** No position. Zustand's + state is a plain object of closures, so arrow functions are its normal form; + that is the expectation a user brings, and the reason `CLAUDE.md`'s "no arrow + methods" rule will surprise them (reasoning from reading). +5. **Native `Map` and `Set`.** No position from the libraries' code. Zustand's + docs have a guide on Maps and Sets (`docs/learn/guides/maps-and-sets-usage.md`, + listed, not read). +6. **Opt-in or opt-out for nested class instances.** No position: neither + proxies anything. +7. **Entry points, export names and adapter names.** Zustand: `zustand`, + `zustand/vanilla`, `zustand/middleware`, `zustand/shallow`, + `zustand/react/shallow`, `zustand/traditional`. Jotai: `jotai`, + `jotai/vanilla`, `jotai/react`, `jotai/utils`. Ours: `.`, `./react`, + `./react/server`, `./utils`, `./collections`, plus one entry per framework. + Both libraries keep the vanilla core, the React binding and the utilities in + separate entries, so ours matches them. Two differences to know: `utils` + is Jotai's word, and Zustand calls the same things `middleware`; and + `prepareStoreForHydration` sits in `react/server` but is called on the client + too, which neither library does (Zustand has no such call, Jotai's + `useHydrateAtoms` is client code with `'use client'`). Finding 1 removes the + odd one out. Hook names follow each library's pattern (`useStore`, + `useAtom`, `useClassyStore`), so ours is consistent; React-only helpers + (`useHistoryStatus`, `usePersistStatus`) live in the React entry, beside the + utilities they read, as expected. +8. **Development-only diagnostics for silent failures.** Both libraries use + them where ours has none. Zustand: `persist` logs a version mismatch with no + migrate and an unavailable storage (`persist.ts:197-208`, `:276`); `devtools` + warns about a reserved action type and malformed dispatch JSON + (`devtools.ts:364-374`, `:424-439`); `ssrSafe` throws on a server write. + Jotai: `useSetAtom` throws `not writable atom` (`useSetAtom.ts:33`), atoms + carry `debugLabel`, and `atomWithStorage` warns in development when + `localStorage` throws (`atomWithStorage.ts:106-109`). Both gate on the build + mode (`import.meta.env.MODE`, `process.env.NODE_ENV`). Candidates for ours, + each tied to a silent case already found: a version mismatch with no + `migrate`, a `migrate` that returns a promise, a malformed `properties` + entry (stage 1 finding 55), a getter named in `properties` (finding 52), and + an unrecognised devtools message. The package would need a convention for + the gate first, since it has none today. + +## What was verified by running code, and what was only read + +**Run (Bun 1.4.4, ports in the appendix):** + +- Fresh-object selector: Zustand loops, ours does not (port 1). +- No-selector re-renders: Zustand yes, ours no, Jotai no (port 1). +- Hydration after a write, four variants and Zustand with `persist` (port 3). +- Persist lifecycle with a synchronous storage, version mismatch with and + without `migrate`, unversioned record, migrate write-back, write counts and + envelope shape (port 4); Jotai's restore on mount (port 4b). +- Devtools action names, time-travel notification count, `Date` after a jump, + `RESET` (port 5), through a fake `__REDUX_DEVTOOLS_EXTENSION__`, not a real + extension. +- Subscription timing, slice subscription, the multi-field write (port 6), + async `migrate` (port 7), subscriber delivery cases (port 8). + +**Only read:** + +- Zustand's action-name inference from the stack in V8 or Firefox: the port ran + on Bun's engine, where it gave `anonymous`. +- Zustand's `useShallow` and `traditional` behaviour beyond port 1; Jotai's + `selectAtom`, `useHydrateAtoms` and `atomWithStorage` `RESET`/validator + paths; Jotai's delivery cases 8b to 8d; Jotai DevTools. +- That Zustand's `persist` has no teardown, reports no write errors and + replaces state when a read lands, and that Jotai does the same on mount: from + source, not run. +- Our `devtools` ignoring `COMMIT`, `ROLLBACK` and `IMPORT_STATE`: read at + `devtools.ts:85`; only `RESET` was run. +- Every proposal's cost, and finding 4's claim that the data is lost when an old + `migrate` branch is deleted: reasoning from the missing write. +- Finding 1's lazy-capture variant: not prototyped. +- Real-browser hydration: the ports use happy-dom, so React's recoverable error + is the evidence, not a browser console. + +## Appendix: ported tests and their output + +Each file is in the scratch folder +`/private/tmp/claude-501/-Users-robertparallax-WebstormProjects-classy-store/9c8c2bbd-bb57-4b12-aa7b-9d06972e3fdd/scratchpad/stage-2-zustand-jotai/ports/` +and runs with `bun test ` there. `./ours/` is a copy of our `src` +(without tests) from `c59084e`. The preload registers happy-dom and sets +`IS_REACT_ACT_ENVIRONMENT`; `helpers.ts` mounts a component inside `act`. + +### preload.ts + +```ts +import {GlobalRegistrator} from '@happy-dom/global-registrator'; + +GlobalRegistrator.register(); +// @ts-expect-error +globalThis.IS_REACT_ACT_ENVIRONMENT = true; +``` + +### helpers.ts + +```ts +import {act, createElement} from 'react'; +import {createRoot} from 'react-dom/client'; + +export const SRC = './ours'; + +export async function mount(element: React.ReactElement) { + const container = document.createElement('div'); + document.body.appendChild(container); + const root = createRoot(container); + await act(async () => { + root.render(element); + }); + return { + container, + unmount: () => act(async () => root.unmount()), + }; +} +export {act, createElement}; +``` + +### p1-selectors.test.tsx + +```ts +// Ports 1 and 2: selector shape and what makes a component re-render. +import {expect, spyOn, test} from 'bun:test'; +import {createClassyStore} from './ours/index.ts'; +import {shallowEqual} from './ours/index.ts'; +import {useClassyStore} from './ours/frameworks/react/react.ts'; +import {atom, createStore, Provider, useAtomValue} from 'jotai'; +import {act} from 'react'; +import {create} from 'zustand'; +import {useShallow} from 'zustand/react/shallow'; +import {mount} from './helpers'; + +// Port 1: a selector that returns a NEW object on every call. +test('1a zustand v5: selector returning a fresh object, no useShallow', async () => { + const useStore = create<{a: number; b: number}>(() => ({a: 1, b: 2})); + const errors = spyOn(console, 'error').mockImplementation(() => {}); + let renders = 0; + let thrown: unknown; + function C() { + renders++; + const {a} = useStore((s) => ({a: s.a})); + return {a}; + } + try { + await mount(); + } catch (e) { + thrown = e; + } + const msg = String(errors.mock.calls[0]?.[0] ?? '').slice(0, 80); + errors.mockRestore(); + console.log('zustand fresh-object selector: renders', renders, 'thrown', String(thrown).slice(0, 90), '| console.error:', msg); +}); + +test('1b zustand v5 with useShallow: fresh object, stable result', async () => { + const useStore = create<{a: number; b: number}>(() => ({a: 1, b: 2})); + let renders = 0; + function C() { + renders++; + const {a} = useStore(useShallow((s) => ({a: s.a}))); + return {a}; + } + await mount(); + const before = renders; + await act(async () => useStore.setState({b: 3})); + console.log('zustand useShallow: renders after unrelated write', renders - before); +}); + +test('1c classy: fresh object selector without isEqual', async () => { + const store = createClassyStore({a: 1, b: 2}); + let renders = 0; + function C() { + renders++; + const {a} = useClassyStore(store, (s) => ({a: s.a})); + return {a}; + } + await mount(); + const first = renders; + await act(async () => { + store.b = 3; + }); + console.log('classy fresh-object selector: initial renders', first, 'after unrelated write', renders - first); +}); + +test('1d classy: fresh object selector with isEqual shallowEqual', async () => { + const store = createClassyStore({a: 1, b: 2}); + let renders = 0; + function C() { + renders++; + const {a} = useClassyStore(store, (s) => ({a: s.a}), {isEqual: shallowEqual}); + return {a}; + } + await mount(); + const first = renders; + await act(async () => { + store.b = 3; + }); + console.log('classy isEqual shallowEqual: initial renders', first, 'after unrelated write', renders - first); +}); + +// Port 2: no selector. Does an unrelated write re-render? +test('2a zustand: useStore(store) with no selector re-renders on any write', async () => { + const useStore = create<{a: number; b: number}>(() => ({a: 1, b: 2})); + let renders = 0; + function C() { + renders++; + const s = useStore(); + return {s.a}; + } + await mount(); + const first = renders; + await act(async () => useStore.setState({b: 3})); + console.log('zustand no selector: re-renders after unrelated write', renders - first); +}); + +test('2b classy: no selector is auto-tracked', async () => { + const store = createClassyStore({a: 1, b: 2}); + let renders = 0; + function C() { + renders++; + const s = useClassyStore(store); + return {s.a}; + } + await mount(); + const first = renders; + await act(async () => { + store.b = 3; + }); + const afterB = renders - first; + await act(async () => { + store.a = 9; + }); + console.log('classy no selector: re-renders after unrelated write', afterB, 'after read field write', renders - first - afterB); +}); + +test('2c jotai: one atom per field, useAtomValue re-renders only for its atom', async () => { + const aAtom = atom(1); + const bAtom = atom(2); + const store = createStore(); + let renders = 0; + function C() { + renders++; + return {useAtomValue(aAtom)}; + } + await mount( + + + , + ); + const first = renders; + await act(async () => store.set(bAtom, 3)); + console.log('jotai: re-renders after unrelated atom write', renders - first); +}); +``` + +Output: + +```text + +zustand fresh-object selector: renders 55 thrown Error: Maximum update depth exceeded. This can happen when a component repeatedly calls se | console.error: The result of getSnapshot should be cached to avoid an infinite loop +zustand useShallow: renders after unrelated write 0 +classy fresh-object selector: initial renders 1 after unrelated write 1 +classy isEqual shallowEqual: initial renders 1 after unrelated write 0 +zustand no selector: re-renders after unrelated write 1 +classy no selector: re-renders after unrelated write 0 after read field write 1 +jotai: re-renders after unrelated atom write 0 + +``` + +### p3-hydration.test.tsx + +```ts +// Port 3: the store changes between server render and hydration (what a +// persist restore, or another boundary hydrating first, does). +import {expect, test} from 'bun:test'; +import {atom, createStore, Provider, useAtomValue} from 'jotai'; +import {act} from 'react'; +import {hydrateRoot} from 'react-dom/client'; +import {renderToString} from 'react-dom/server'; +import {create} from 'zustand'; +import {createClassyStore} from './ours/index.ts'; +import {useClassyStore} from './ours/frameworks/react/react.ts'; +import {prepareStoreForHydration} from './ours/frameworks/react/server.ts'; + +async function hydrate(element: React.ReactElement, html: string) { + const container = document.createElement('div'); + container.innerHTML = html; + document.body.appendChild(container); + const errors: string[] = []; + await act(async () => { + hydrateRoot(container, element, { + onRecoverableError: (e) => errors.push(String((e as Error).message).split('\n')[0].slice(0, 60)), + }); + }); + return {errors, text: container.textContent}; +} + +test('3a zustand: store written before hydration, no preparation', async () => { + const useStore = create<{n: number}>(() => ({n: 0})); + const C = () => {useStore((s) => s.n)}; + const html = renderToString(); + useStore.setState({n: 5}); // e.g. a persist restore or an earlier boundary + const r = await hydrate(, html); + console.log('zustand:', JSON.stringify({html, ...r})); +}); + +test('3b jotai: atom written before hydration, no useHydrateAtoms', async () => { + const nAtom = atom(0); + const store = createStore(); + const C = () => {useAtomValue(nAtom)}; + const tree = ( + + + + ); + const html = renderToString(tree); + store.set(nAtom, 5); + const r = await hydrate(tree, html); + console.log('jotai:', JSON.stringify({html, ...r})); +}); + +test('3c classy: written before hydration, not prepared', async () => { + const store = createClassyStore({n: 0}); + const C = () => {useClassyStore(store, (s) => s.n)}; + const html = renderToString(); + store.n = 5; + const r = await hydrate(, html); + console.log('classy unprepared:', JSON.stringify({html, ...r})); +}); + +test('3d classy: written before hydration, prepareStoreForHydration', async () => { + const store = prepareStoreForHydration(createClassyStore({n: 0})); + const C = () => {useClassyStore(store, (s) => s.n)}; + const html = renderToString(); + store.n = 5; + const r = await hydrate(, html); + console.log('classy prepared:', JSON.stringify({html, ...r})); +}); + +import {createJSONStorage, persist} from 'zustand/middleware'; +test('3e zustand + persist with a sync storage that already holds n=7', async () => { + const data: Record = {k: JSON.stringify({state: {n: 7}, version: 0})}; + const storage = createJSONStorage(() => ({ + getItem: (k) => data[k] ?? null, + setItem: (k, v) => void (data[k] = v), + removeItem: (k) => void delete data[k], + })); + const useStore = create<{n: number}>()(persist(() => ({n: 0}), {name: 'k', storage})); + const C = () => {useStore((s) => s.n)}; + const html = renderToString(); // server has no storage; use the initial state + const r = await hydrate(, html); + console.log('zustand persist (sync storage holding 7): getState().n =', useStore.getState().n, JSON.stringify({html, ...r})); +}); +``` + +Output: + +```text + +zustand: {"html":"0","errors":[],"text":"5"} +jotai: {"html":"0","errors":["Hydration failed because the server rendered text didn't mat"],"text":"5"} +classy unprepared: {"html":"0","errors":["Hydration failed because the server rendered text didn't mat"],"text":"5"} +classy prepared: {"html":"0","errors":[],"text":"5"} +zustand persist (sync storage holding 7): getState().n = 7 {"html":"0","errors":[],"text":"7"} + +``` + +### p4-persist.test.tsx + +```ts +// Port 4: persist lifecycle, version handling and what is written. +import {expect, spyOn, test} from 'bun:test'; +import {atom, createStore} from 'jotai'; +import {atomWithStorage} from 'jotai/utils'; +import {create} from 'zustand'; +import {createJSONStorage, persist} from 'zustand/middleware'; +import {createClassyStore} from './ours/index.ts'; +import {persist as classyPersist} from './ours/utils/index.ts'; + +const flush = () => new Promise((r) => setTimeout(r, 0)); +const memory = (seed: Record = {}) => { + const data = {...seed}; + const writes: string[] = []; + return { + data, + writes, + getItem: (k: string) => data[k] ?? null, + setItem: (k: string, v: string) => { + data[k] = v; + writes.push(v); + }, + removeItem: (k: string) => { + delete data[k]; + }, + }; +}; + +test('4a hydration timing with a SYNC storage', async () => { + const mem = memory({k: JSON.stringify({state: {n: 7}, version: 0})}); + const z = create<{n: number}>()( + persist(() => ({n: 0}), {name: 'k', storage: createJSONStorage(() => mem)}), + ); + const zAtCreate = z.getState().n; + const zHyd = z.persist.hasHydrated(); + + class S { + n = 0; + } + const c = createClassyStore(new S()); + const h = classyPersist(c, {name: 'k', storage: mem}); + const cAtCreate = c.n; + const cHyd = h.isHydrated; + await h.hydrated; + console.log( + JSON.stringify({ + zustand: {atCreate: zAtCreate, hasHydrated: zHyd}, + classy: {atCreate: cAtCreate, isHydrated: cHyd, afterHydrated: c.n}, + }), + ); + h.dispose(); +}); + +test('4b jotai atomWithStorage: initial value first, stored value on mount', async () => { + const mem = memory({k: JSON.stringify(7)}); + const a = atomWithStorage('k', 0, { + getItem: (k, init) => + mem.getItem(k) === null ? init : JSON.parse(mem.getItem(k) as string), + setItem: (k, v) => mem.setItem(k, JSON.stringify(v)), + removeItem: (k) => mem.removeItem(k), + }); + const store = createStore(); + const before = store.get(a); + const unsub = store.sub(a, () => {}); + console.log( + 'jotai: read before any subscriber', + before, + '| after sub (onMount)', + store.get(a), + ); + unsub(); +}); + +test('4c stored version differs and there is no migrate', async () => { + const mem = memory({k: JSON.stringify({state: {n: 7}, version: 1})}); + const err = spyOn(console, 'error').mockImplementation(() => {}); + const z = create<{n: number}>()( + persist(() => ({n: 0}), { + name: 'k', + version: 2, + storage: createJSONStorage(() => mem), + }), + ); + const zMsg = err.mock.calls.map((c) => String(c[0]).slice(0, 70)); + err.mockRestore(); + + class S { + n = 0; + } + const c = createClassyStore(new S()); + const errors: unknown[] = []; + const h = classyPersist(c, { + name: 'k', + version: 2, + storage: mem, + onError: (e, op) => errors.push([String(e), op]), + }); + await h.hydrated; + console.log( + JSON.stringify({ + zustand: {n: z.getState().n, console_error: zMsg}, + classy: {n: c.n, onError: errors, status: h.getStatus?.() ?? 'n/a'}, + }), + ); + h.dispose(); +}); + +test('4d stored value has no version field', async () => { + const mem = memory({k: JSON.stringify({state: {n: 7}})}); + const z = create<{n: number}>()( + persist(() => ({n: 0}), { + name: 'k', + version: 2, + storage: createJSONStorage(() => mem), + }), + ); + class S { + n = 0; + } + const c = createClassyStore(new S()); + const h = classyPersist(c, {name: 'k', version: 2, storage: mem}); + await h.hydrated; + console.log( + JSON.stringify({ + zustand_n_with_version_2_and_unversioned_record: z.getState().n, + classy_n: c.n, + }), + ); + h.dispose(); +}); + +test('4e after a migration, is the migrated record written back at once?', async () => { + const seed = JSON.stringify({state: {old: 7}, version: 1}); + const memZ = memory({k: seed}); + const z = create<{n: number}>()( + persist(() => ({n: 0}), { + name: 'k', + version: 2, + storage: createJSONStorage(() => memZ), + migrate: (s: any) => ({n: s.old}), + }), + ); + await flush(); + class S { + n = 0; + } + const memC = memory({k: seed}); + const c = createClassyStore(new S()); + const h = classyPersist(c, { + name: 'k', + version: 2, + storage: memC, + migrate: (s: any) => ({n: s.old}), + }); + await h.hydrated; + await flush(); + console.log( + JSON.stringify({ + zustand: {n: z.getState().n, writes: memZ.writes}, + classy: {n: c.n, writes: memC.writes}, + }), + ); + h.dispose(); +}); + +test('4f a persisted store with a method: what is written, and is there a way to stop writing', async () => { + const mem = memory(); + const z = create<{n: number; inc: () => void}>()( + persist((set) => ({n: 0, inc: () => set((s) => ({n: s.n + 1}))}), { + name: 'k', + storage: createJSONStorage(() => mem), + partialize: (s) => ({n: s.n}), + }), + ); + z.getState().inc(); + z.getState().inc(); + const zWrites = mem.writes.length; + class S { + n = 0; + inc() { + this.n++; + } + } + const memC = memory(); + const c = createClassyStore(new S()); + const h = classyPersist(c, {name: 'k', storage: memC}); + await h.hydrated; + c.inc(); + await flush(); + c.inc(); + await flush(); + console.log( + JSON.stringify({ + zustand: {writes: zWrites, last: mem.writes.at(-1)}, + classy: {writes: memC.writes.length, last: memC.writes.at(-1)}, + }), + ); + h.dispose(); +}); +``` + +Output: + +```text + +{"zustand":{"atCreate":7,"hasHydrated":true},"classy":{"atCreate":0,"isHydrated":false,"afterHydrated":7}} +jotai: read before any subscriber 0 | after sub (onMount) 7 +{"zustand":{"n":0,"console_error":["State loaded from storage couldn't be migrated since no migrate functi"]},"classy":{"n":0,"onError":[],"status":"n/a"}} +{"zustand_n_with_version_2_and_unversioned_record":7,"classy_n":0} +{"zustand":{"n":7,"writes":["{\"state\":{\"n\":7},\"version\":2}"]},"classy":{"n":7,"writes":[]}} +{"zustand":{"writes":2,"last":"{\"state\":{\"n\":2},\"version\":0}"},"classy":{"writes":2,"last":"{\"version\":0,\"state\":{\"n\":2}}"}} + +``` + +### p5-devtools.test.tsx + +```ts +// Port 5: devtools action names, and time travel across several fields. +import {expect, test} from 'bun:test'; +import {create} from 'zustand'; +import {devtools as zdevtools} from 'zustand/middleware'; +import {createClassyStore, subscribe} from './ours/index.ts'; +import {devtools} from './ours/utils/index.ts'; + +function fakeExtension() { + const sent: Array<{action: unknown; state: unknown}> = []; + let listener: ((m: any) => void) | undefined; + const ext = { + connect: (opts: unknown) => ({ + init: (s: unknown) => sent.push({action: 'INIT', state: s}), + send: (action: unknown, state: unknown) => sent.push({action, state}), + subscribe: (l: (m: any) => void) => { + listener = l; + return () => {}; + }, + unsubscribe: () => {}, + }), + }; + (globalThis as any).window.__REDUX_DEVTOOLS_EXTENSION__ = ext; + return {sent, dispatch: (m: unknown) => listener?.(m)}; +} +const flush = () => new Promise((r) => setTimeout(r, 0)); + +test('5a action names from a store method', async () => { + const z = fakeExtension(); + const useStore = create<{n: number; inc: () => void; incNamed: () => void}>()( + zdevtools( + (set) => ({ + n: 0, + inc: () => set((s) => ({n: s.n + 1})), + incNamed: () => + set((s) => ({n: s.n + 1}), undefined, 'counter/incNamed'), + }), + {name: 'z', enabled: true}, + ), + ); + useStore.getState().inc(); + useStore.getState().incNamed(); + + const c = fakeExtension(); + class S { + n = 0; + inc() { + this.n++; + } + reset() { + this.n = 0; + } + } + const store = createClassyStore(new S()); + const h = devtools(store, {name: 'c'}); + store.inc(); + store.inc(); + store.reset(); + await flush(); + console.log( + JSON.stringify({ + zustand: z.sent.map((x) => x.action), + classy: c.sent.map((x) => x.action), + }), + ); + h.dispose(); +}); + +test('5b time travel: how many sync notifications for a 3-field jump', async () => { + const c = fakeExtension(); + class S { + a = 0; + b = 0; + c = 0; + } + const store = createClassyStore(new S()); + const h = devtools(store); + let syncCalls = 0; + subscribe(store, () => syncCalls++, {sync: true}); + c.dispatch({ + type: 'DISPATCH', + payload: {type: 'JUMP_TO_STATE'}, + state: JSON.stringify({a: 1, b: 2, c: 3}), + }); + await flush(); + + const z = fakeExtension(); + const useStore = create<{a: number; b: number; c: number}>()( + zdevtools(() => ({a: 0, b: 0, c: 0}), {enabled: true}), + ); + let zCalls = 0; + useStore.subscribe(() => zCalls++); + z.dispatch({ + type: 'DISPATCH', + payload: {type: 'JUMP_TO_STATE'}, + state: JSON.stringify({a: 1, b: 2, c: 3}), + }); + console.log( + JSON.stringify({ + classy_sync_subscriber_calls_for_one_jump: syncCalls, + zustand_subscriber_calls_for_one_jump: zCalls, + }), + ); + h.dispose(); +}); + +test('5c time travel of a Date field, and RESET / COMMIT messages', async () => { + const c = fakeExtension(); + class S { + at = new Date(0); + n = 0; + } + const store = createClassyStore(new S()); + const h = devtools(store); + store.n = 1; + store.at = new Date(5000); + await flush(); + const jsonState = JSON.stringify({at: new Date(0), n: 0}); // what the extension sends back + c.dispatch({ + type: 'DISPATCH', + payload: {type: 'JUMP_TO_STATE'}, + state: jsonState, + }); + await flush(); + const afterJump = typeof (store as any).at + ':' + (store as any).at; + store.n = 5; + await flush(); + c.dispatch({type: 'DISPATCH', payload: {type: 'RESET'}}); + await flush(); + console.log( + JSON.stringify({ + classy_after_jump_type_of_at: afterJump, + n_before_RESET_message: 5, + n_after_RESET_message: store.n, + }), + ); + h.dispose(); +}); +``` + +Output: + +```text + +{"zustand":["INIT",{"type":"anonymous"},{"type":"counter/incNamed"}],"classy":["INIT",{"type":"STORE_UPDATE"}]} +{"classy_sync_subscriber_calls_for_one_jump":3,"zustand_subscriber_calls_for_one_jump":1} +{"classy_after_jump_type_of_at":"string:1970-01-01T00:00:00.000Z","n_before_RESET_message":5,"n_after_RESET_message":5} + +``` + +### p6-subscribe.test.tsx + +```ts +// Port 6: subscribing outside React, and to one slice. +import {expect, test} from 'bun:test'; +import {atom, createStore} from 'jotai'; +import {create} from 'zustand'; +import {subscribeWithSelector} from 'zustand/middleware'; +import {createClassyStore, snapshot, subscribe} from './ours/index.ts'; +import {subscribeKey} from './ours/utils/index.ts'; + +const flush = () => new Promise((r) => setTimeout(r, 0)); + +test('6a notification timing for two writes in a row', async () => { + const z = create<{n: number}>()(() => ({n: 0})); + let zc = 0; + z.subscribe(() => zc++); + z.setState({n: 1}); + z.setState({n: 2}); + const zSync = zc; + + const nAtom = atom(0); + const js = createStore(); + let jc = 0; + js.sub(nAtom, () => jc++); + js.set(nAtom, 1); + js.set(nAtom, 2); + const jSync = jc; + + const c = createClassyStore({n: 0}); + let cc = 0; + subscribe(c, () => cc++); + let cs = 0; + subscribe(c, () => cs++, {sync: true}); + c.n = 1; + c.n = 2; + const cSync = [cc, cs]; + await flush(); + console.log( + JSON.stringify({ + zustand_sync_calls: zSync, + jotai_sync_calls: jSync, + classy_default_and_sync_right_after: cSync, + classy_default_after_flush: cc, + }), + ); +}); + +test('6b slice subscription: a derived value, equality, fireImmediately, previous value', async () => { + const z = create<{items: number[]; other: number}>()( + subscribeWithSelector(() => ({items: [1], other: 0})), + ); + const zCalls: unknown[] = []; + z.subscribe( + (s) => s.items.length, + (len, prev) => zCalls.push([len, prev]), + {fireImmediately: true}, + ); + z.setState({other: 1}); // not the slice + z.setState({items: [1, 2]}); + + const c = createClassyStore({items: [1], other: 0}); + const cCalls: unknown[] = []; + // subscribeKey takes a key, not a selector: watch `items` and compare lengths by hand. + let prevLen = snapshot(c).items.length; + subscribeKey(c, 'items', (items) => { + if (items.length !== prevLen) { + cCalls.push([items.length, prevLen]); + prevLen = items.length; + } + }); + c.other = 1; + await flush(); + c.items.push(2); + await flush(); + console.log(JSON.stringify({zustand: zCalls, classy_by_hand: cCalls})); +}); + +test('6c subscribeKey on a nested path is not possible, only top-level keys', () => { + // `K extends keyof T & keyof Snapshot`: a nested field has no key here. + const c = createClassyStore({user: {name: 'a'}}); + const calls: unknown[] = []; + subscribeKey(c, 'user', (u) => calls.push(u.name)); + expect(typeof c.user).toBe('object'); +}); + +test('6d the multi-field write: Zustand setState({a, b}) against Object.assign on our store', async () => { + const z = create<{a: number; b: number}>()(() => ({a: 0, b: 0})); + let zc = 0; + z.subscribe(() => zc++); + z.setState({a: 1, b: 1}); + + const c = createClassyStore({a: 0, b: 0}); + let syncCalls = 0; + let batchedCalls = 0; + subscribe(c, () => syncCalls++, {sync: true}); + subscribe(c, () => batchedCalls++); + Object.assign(c, {a: 1, b: 1}); + await flush(); + console.log( + JSON.stringify({ + zustand_setState_two_fields: zc, + classy_Object_assign_sync: syncCalls, + classy_Object_assign_default: batchedCalls, + }), + ); +}); +``` + +Output: + +```text + +{"zustand_sync_calls":2,"jotai_sync_calls":2,"classy_default_and_sync_right_after":[0,2],"classy_default_after_flush":1} +{"zustand":[[1,1],[2,1]],"classy_by_hand":[[2,1]]} +{"zustand_setState_two_fields":1,"classy_Object_assign_sync":2,"classy_Object_assign_default":1} + +``` + +### p7-migrate.test.tsx + +```ts +// Port 7: an async migrate, which Zustand allows (PromiseLike result). +import {test} from 'bun:test'; +import {create} from 'zustand'; +import {createJSONStorage, persist} from 'zustand/middleware'; +import {createClassyStore} from './ours/index.ts'; +import {persist as classyPersist} from './ours/utils/index.ts'; + +const mem = (seed: string) => { + const d: Record = {k: seed}; + return { + getItem: (k: string) => d[k] ?? null, + setItem: (k: string, v: string) => void (d[k] = v), + removeItem: (k: string) => void delete d[k], + }; +}; +test('7 async migrate', async () => { + const seed = JSON.stringify({state: {old: 7}, version: 1}); + const z = create<{n: number}>()( + persist(() => ({n: 0}), { + name: 'k', + version: 2, + storage: createJSONStorage(() => mem(seed)), + migrate: async (s: any) => ({n: s.old}), + }), + ); + await new Promise((r) => setTimeout(r, 5)); + class S { + n = 0; + } + const c = createClassyStore(new S()); + const errs: unknown[] = []; + const h = classyPersist(c, { + name: 'k', + version: 2, + storage: mem(seed), + migrate: (async (s: any) => ({n: s.old})) as any, + onError: (e, op) => errs.push(op), + }); + await h.hydrated; + console.log( + JSON.stringify({ + zustand_n: z.getState().n, + classy_n: c.n, + classy_onError: errs, + classy_isHydrated: h.isHydrated, + }), + ); + h.dispose(); +}); +``` + +Output: + +```text + +{"zustand_n":7,"classy_n":0,"classy_onError":[],"classy_isHydrated":true} + +``` + +### p8-delivery.test.tsx + +```ts +// Port 8: stage 1 findings 18, 20, 21, 22 (subscriber delivery) against +// Zustand's subscribe and Jotai's store.sub. Ours is the same case with +// {sync: true} subscribers. +import {test} from 'bun:test'; +import {atom, createStore} from 'jotai'; +import {create} from 'zustand'; +import {createClassyStore, subscribe} from './ours/index.ts'; + +const flush = () => new Promise((r) => setTimeout(r, 0)); + +test('8a finding 18: a subscriber that writes to its own store', async () => { + const z = create<{n: number}>()(() => ({n: 0})); + let zCalls = 0; + let zErr = ''; + z.subscribe(() => { + zCalls++; + if (zCalls < 5000) z.setState({n: zCalls}); // bounded only so the test ends + }); + z.setState({n: -1}); + const j = createStore(); + const nAtom = atom(0); + let jCalls = 0; + j.sub(nAtom, () => { + jCalls++; + if (jCalls < 5000) j.set(nAtom, jCalls); + }); + j.set(nAtom, -1); + console.log( + JSON.stringify({ + zustand_calls_until_bound: zCalls, + jotai_calls_until_bound: jCalls, + }), + ); +}); + +test('8b finding 20: unsubscribe a later subscriber during delivery', async () => { + const z = create<{n: number}>()(() => ({n: 0})); + let unsubB = () => {}; + const zLog: string[] = []; + z.subscribe(() => { + zLog.push('A'); + unsubB(); + }); + unsubB = z.subscribe(() => zLog.push('B')); + z.setState({n: 1}); + + const c = createClassyStore({n: 0}); + const cLog: string[] = []; + let cUnsubB = () => {}; + subscribe( + c, + () => { + cLog.push('A'); + cUnsubB(); + }, + {sync: true}, + ); + cUnsubB = subscribe(c, () => cLog.push('B'), {sync: true}); + c.n = 1; + console.log(JSON.stringify({zustand: zLog, classy_sync: cLog})); +}); + +test('8c finding 21: subscribe during delivery of the write that is being delivered', async () => { + const z = create<{n: number}>()(() => ({n: 0})); + const zLog: string[] = []; + let added = false; + z.subscribe(() => { + zLog.push('A'); + if (!added) { + added = true; + z.subscribe(() => zLog.push('late')); + } + }); + z.setState({n: 1}); + + const c = createClassyStore({n: 0}); + const cLog: string[] = []; + let cAdded = false; + subscribe( + c, + () => { + cLog.push('A'); + if (!cAdded) { + cAdded = true; + subscribe(c, () => cLog.push('late'), {sync: true}); + } + }, + {sync: true}, + ); + c.n = 1; + console.log(JSON.stringify({zustand: zLog, classy_sync: cLog})); +}); + +test('8d finding 22: a re-entrant write, what the next subscriber sees', async () => { + const z = create<{n: number}>()(() => ({n: 0})); + const zSeen: number[] = []; + let wrote = false; + z.subscribe((s) => { + if (!wrote) { + wrote = true; + z.setState({n: 2}); + } + }); + z.subscribe((s) => zSeen.push(s.n)); + z.setState({n: 1}); + + const c = createClassyStore({n: 0}); + const cSeen: number[] = []; + let cWrote = false; + subscribe( + c, + () => { + if (!cWrote) { + cWrote = true; + c.n = 2; + } + }, + {sync: true}, + ); + subscribe(c, () => cSeen.push(c.n), {sync: true}); + c.n = 1; + console.log( + JSON.stringify({zustand_B_sees: zSeen, classy_sync_B_sees: cSeen}), + ); +}); +``` + +Output: + +```text + +{"zustand_calls_until_bound":5000,"jotai_calls_until_bound":5000} +{"zustand":["A"],"classy_sync":["A","B"]} +{"zustand":["A","late"],"classy_sync":["A"]} +{"zustand_B_sees":[2,2],"classy_sync_B_sees":[2,2]} + +``` From 1b426fb6ea441d191f95c5e2715832d6914acecf Mon Sep 17 00:00:00 2001 From: codeBelt Date: Thu, 19 Nov 2026 04:53:41 -0600 Subject: [PATCH 071/169] docs: add the stage 2 report Co-Authored-By: Claude Fable 5.2 --- review/stage-2-report.md | 842 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 842 insertions(+) create mode 100644 review/stage-2-report.md diff --git a/review/stage-2-report.md b/review/stage-2-report.md new file mode 100644 index 00000000..1db970ee --- /dev/null +++ b/review/stage-2-report.md @@ -0,0 +1,842 @@ +# Stage 2 report: library comparison + +Stage 2 of the pre-1.0 review, 2026-11-18 to 2026-11-19. No library source +was changed. Every commit of this stage adds a report under `review/stage-2/` +or updates the plan, and all of them are pushed to `release/1.0`. + +## Summary + +- **Reports:** eleven, one per row of the table under "How the work was + done". Nine compare us with other libraries, one reviews our five adapters + and one is a security review of `persist`, `devtools` and the release + workflow. +- **Agreement:** six changes are each reached by three or more reports + independently. They are listed under "Where the reports agree". Four of + them are on stage 1's list for stage 3, and three of those four now have a + sketch that fixed its reproductions. +- **New defects and gaps:** twenty-three that stage 1 did not have, under + "Defects and gaps new in stage 2". I re-ran ten of them myself and they + reproduce. +- **API questions:** the eight questions of the plan each have an answer from + every library that has one, under "The eight API questions", with where I + lean. Stage 3 decides. +- **Nothing here is decided or implemented.** Every sketch ran against its own + reproduction only. The stage rules forbid running the repository's suites + against a changed copy, so no sketch is a tested change. + +## Where the reports agree + +Each row is a change that several reports reach independently. "Sketch" means +an agent applied the change to a throwaway copy of `src/` and re-ran its +reproductions. + +| Change | Who does it | Stage 1 findings it bears on | Evidence | +| ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | +| Return a stored function as it is. Bind and group only methods found on a prototype | Valtio (V2), Vue (4), Solid (3), Svelte (3), MobX (9). No library wraps a stored function | 5, 6, 42, 62 | Vue sketch B: 20 lines added, 7 removed, fixed 5, 6, 7, 9, 10 and 42 together | +| Treat `Object.defineProperty` with a data descriptor as a write | Vue (6), Solid (7), Svelte (2), MobX (10) | 1, 45, 61, 66, 71 | Svelte's sketch, 24 lines added and 9 removed, fixed 1, 45, 66 and 71. What to do with other descriptors is disputed: see below | +| Add `has` and `ownKeys` traps, with a dependency on the set of keys | Vue (1), Solid (6), Svelte (4), MobX (10) | 29, 30, 31, 41 | Vue sketch A fixed 29 and 30 on the live store. On a snapshot it cannot be separated from API question 3 | +| A delete that removes nothing is not a change | Vue (5), Svelte (5), Immer (5) | 29 | Svelte sketch | +| Deliver to subscribers from one queue: a write made during delivery is queued, a removed subscriber is skipped, 100 rounds at most | MobX (5), Preact Signals (8), Vue (9), Svelte (11). Zustand skips a removed subscriber (Zustand and Jotai 9) | 18 to 23 | Read and ported, not sketched on ours | +| A class getter is not an enumerable own property of a snapshot | Valtio (V4), MobX, Vue, Solid, Svelte, Immer. None turns an inherited getter into an own enumerable accessor of a copy | 30, 31 | Ports in each report. On ours, `Object.keys(store)` is `a,b` and `Object.keys(snapshot(store))` is `a,b,entryCount` | + +Three more points have fewer voices and one clear result each: + +- **Ownership.** Valtio has no weak references, no suspend and resume and no + pointer to a detached parent. It gives the same answers as ours in every + detached-subtree case that was ported except one (defect 5 below), and it + returns from the read that hangs ours (stage 1 finding 66). This supports stage 1 finding 72: the walk + to a detached parent can go (Valtio V1). +- **Getters.** A stamp on each cached getter, holding its node's version, + makes a clean read constant. Recording each property once per run removes + duplicate dependencies. Both are about ten lines (Signals 1 and 3, MobX 3). + A thrown error should be cached with its dependencies, and never when it + recorded none (MobX 2, Signals 4). +- **A development build.** MobX, Vue, Solid, Svelte and Immer all compile + their diagnostics out of production, and Solid, Svelte and Immer give each + one a stable code. The TC39 polyfill shows the trap: its production error + is empty. Keep the message text in production and drop only the extra + checks (MobX 7, Solid 8 and 9, Svelte 11, Signals question 8). + +## Where the reports disagree + +- **Signals corrects MobX.** MobX finding 3, step 1, proposes revalidating a + nested getter by refreshing it and comparing its value. For us that gives a + stale result, because a getter can return a live store node: with + `get first() { return this.rows[0] }` and + `get firstPrice() { return this.first.price }`, `firstPrice` stays 1 after + `rows[0].price = 2`. The comparison must include the node version of the + value (Signals 2). Stage 3 should read the two reports together. +- **Opt-in or opt-out for nested class instances.** Valtio, Vue, Solid and + Legend-State wrap an object unless told not to. MobX, Svelte and Immer + leave a class instance alone unless the class says otherwise, as we do. The + cost of our side is silent (defect 1 below); the cost of theirs is a + `TypeError` on `#private` fields. +- **Native `Map` and `Set`.** Vue makes them reactive in place, and + Legend-State observes them (read, not run). MobX replaces + them with its own classes on assignment. Valtio, Solid and Svelte leave + them alone and offer separate classes, as we do. Immer drafts them through a + subclass. No library has a frozen native `Map`: a frozen `Map` can still be + written through `Map.prototype.set`, which is why ours are array-backed. +- **The Proxy target.** Solid (5) and Immer (2) give the Proxy a target of + their own, so a frozen or read-only user object never meets a Proxy + invariant. Ours targets the raw object, which is behind stage 1 findings 46 + and 49 and the read-only case in `linkChild`. Both reports call it a large + change and a design question, not a fix. +- **Descriptors that are not a plain write.** Svelte and Immer throw a named + error for an accessor or a read-only descriptor, and for `setPrototypeOf`. + The Immer report proposes we do the same (Immer 3), which would settle + stage 1 findings 47 and 48 too. The Svelte report proposes we do not: they + must refuse what they cannot store, and we store everything on the target + (Svelte 2). +- **Freezing through the store.** MobX and Svelte throw on + `Object.freeze(store)`. The MobX report suggests we do the same, which + would remove the read-only branch of our `defineProperty` trap and stage 1 + findings 61, 66 and 67 with it (MobX 10). The Svelte and Immer reports keep + it working: the calls `Object.freeze` makes to the trap carry no `value`, + `get` or `set`, so they can be told apart (Immer 3). We added freezing on + purpose in `f8a012f`, so removing it is a breaking change to decide before + 1.0. +- **Whether `subscribe()` should be synchronous by default.** See question 1 + below. + +## The eight API questions + +"Lean" is where I would start stage 3 from. It is not a decision. + +| Question | What the libraries say | Lean | +| ----------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| 1. Synchronous `subscribe()` by default | MobX, Preact, Legend-State, Zustand and Jotai notify synchronously. The first two group by a transaction; Zustand and Jotai make a write of several fields one call. Valtio, Solid and Svelte: no. Vue: synchronous underneath, grouped at the surface, which is what we have | Keep the batched default and `{sync: true}` for bindings. A direct property write has no unit that groups two fields, so the microtask is what gives `store.a = 1; store.b = 2` one notification. Say so at the top of the API reference, because users of five of these libraries expect synchronous delivery. Fix delivery first (stage 1 findings 18 to 23) | +| 2. Writes outside a method, and `batch()` | Allowed everywhere except Solid, which ignores them. Only MobX warns, in development. The MobX, Vue, Signals, Legend-State, Zustand and Jotai, and adapters reports say `batch()` belongs. Solid and Svelte note it exists only because bindings are synchronous | Keep both, with no warning for a write outside a method. Make `batch()` refuse a promise (defect 20). Add a development warning when a synchronous listener is called many times in one task, and name `batch()` in the guides | +| 3. Snapshot getters as enumerable own accessors | No library does this. MobX defines them as not enumerable. Valtio, Vue, Solid and Immer leave them on the prototype | Change it before 1.0, because `Object.keys`, spread and `JSON.stringify` of a snapshot are visible behaviour. Stage 3 spikes two forms: own and not enumerable, or one derived prototype per class (Valtio V4, Immer question 3) | +| 4. Arrow-function methods and `#private` fields | Only MobX and Svelte make them work, by never wrapping the instance. A base class whose constructor returns the store makes arrow methods notify on our library as it is (MobX script 10, Vue port 8, Svelte 1). `#private` cannot be state | Spike the base class in stage 3. It depends on `defineProperty` being a write. Document that a `#private` field is never state, since a snapshot cannot copy it | +| 5. Native `Map` and `Set` reactive directly | Vue yes, Legend-State yes (read, not run), MobX by replacement, the rest no | Keep `reactiveMap` and `reactiveSet`. Warn in development when a native one is placed in a store. Look at native storage behind the live side: a lookup among 10,000 entries took 17 nanoseconds in Svelte and 45 microseconds in ours (Svelte 8) | +| 6. Opt-in or opt-out for nested class instances | Four wrap by default: Valtio, Vue, Solid, Legend-State. Three do not: MobX, Svelte, Immer | Keep `PROXYABLE` as opt-in. Opt-out would make snapshots of a class with `#private` fields throw, and needs a marker kept outside the object (Vue question 6). Add a development warning when an unmarked class instance is placed in a store | +| 7. Entry points and adapter names | Entry points are consistent. Names follow each framework's idiom except Solid, where `use*` means a context lookup | Rename the Solid adapter to `fromClassyStore`. Add `{injector}` to the Angular adapter. Type the Vue ref as read-only. Keep the other adapter names. Two option names to settle before 1.0, since both break later: `isEqual` against `equalityFn`, which Zustand and Jotai both use, and whether `storage` in `persist` defaults to `localStorage` as theirs does | +| 8. Development diagnostics | Listed per library in each report. The security report adds validation of `persist` options, and the Zustand and Jotai report lists what `persist` and `devtools` should say out loud | A development build with stable codes, decided as one item in stage 3 with its size cost measured | + +## Defects and gaps new in stage 2 + +None is fixed. "Re-run" means I ran the case myself after the agent reported +it, against the library source, which this stage did not change. + +**Core** + +1. **A method on a nested class instance without `PROXYABLE` changes state and + notifies no one.** The snapshot keeps its identity while its content + changes (Solid 4, Vue port 7). Re-run: count 1, no call to a synchronous + subscriber, same snapshot object. +2. **A clean read of getters arranged as a diamond doubles in cost per + level.** Two getters per level, each reading both below (Signals 1, MobX + 3). Re-run: 27 microseconds at depth 8, 24.8 milliseconds at depth 20. A + plain chain of getters does not show it. +3. **A getter that reads `this.rows[i]` in a loop records every read.** 2,000 + dependencies for 1,000 rows (Signals 3). Re-run: a clean read costs 28 + microseconds, against 0.12 when the getter reads `this.rows` once into a + local. +4. **A plain object from another realm is opaque.** One made in an iframe or a + Node `vm` context is kept by reference: writes to it notify no one and its + snapshot is not frozen (Immer 6). Re-run with `vm.runInNewContext`. +5. **A subscription on a container that has left the store stops being called + once the garbage collector runs**, if the caller kept only one of its rows + (Valtio V1). +6. **`has()` on a snapshot of a collection with 10,000 members costs about 245 + microseconds** (Valtio V10). +7. **The cause of stage 1 finding 37 is one line.** `evaluateSnapshotGetter` + overwrites the memo map that nested getters filled, on a target's first + getter read (Signals 6). + +**Adapters** + +8. **Every adapter builds a snapshot per direct write** (adapters A1). Re-run + with a synchronous subscriber that takes a snapshot: 2,000 row writes take + 639 milliseconds, against 2.7 with no subscriber and 3.8 inside `batch()`. +9. **The Vue adapter leaks one subscription per server render** (adapters V1). +10. **The Angular adapter drops a store write made inside a `computed`** + (adapters N1). `untracked()` around the `set` fixes it. +11. **The Angular adapter has no `injector` option and a misleading error + outside an injection context** (adapters N2). + +**Persist, devtools and the release workflow** + +12. **A deeply nested stored record bricks the store.** At a depth of 16,000 + to 18,000 on Bun, restore succeeds, then every snapshot and every save + throws, so the record is never replaced (security 3). +13. **A nested `__proto__` key survives restore** as an own data key and is + written back on the next save (security 2). The store's prototype cannot + be swapped through `persist`, which settles stage 1 finding 48 (security + 1). +14. **Records that `persist` cannot read are skipped without a report** + (security 4, Zustand and Jotai 3). Re-run for a stored version that + differs from `version` with no `migrate`: nothing is restored, `onError` + is not called and nothing is logged. Also: **a version that is not a + number counts as version 0** (security 5), and **with `expireIn` set, a + record without a usable `expiresAt` never expires** (security 6). +15. **DevTools time travel adds unknown fields, never deletes missing ones, + and calls setter-only accessors** (security 7). A jump notifies a + synchronous subscriber once per field, a `Date` comes back as a string, + every entry is named `STORE_UPDATE`, and `RESET`, `COMMIT`, `ROLLBACK` and + `IMPORT_STATE` are ignored (Zustand and Jotai 6 and 7). +16. **Cross-tab sync applies events from another storage area, and synthetic + events, under the same key** (security 8). +17. **The release job gives every installed dependency the npm publishing + identity** (security 12). One job holds `id-token: write`, then runs + `bun install`, the build and Changesets before `npm publish`. Actions are + pinned by major tag. I read `release.yml` and it is as described. The + proposal is a publish-only job that holds the token, actions pinned by + commit, and `permissions: contents: read` on the three workflows that + declare none. + +**From the two API reads** + +18. **`persist()` reads through an `await` even when the storage is + synchronous** (Legend-State 4). A store on `localStorage` holds its + defaults when `persist()` returns and the saved state a microtask later, + so it renders defaults first. Legend-State has the stored value at once. + Re-run with a synchronous storage: 0 after `persist()` returns, 7 after + `hydrated` resolves. This belongs with the decision on `skipHydration`. +19. **A debounced save is lost when the tab closes** (Legend-State 5). + `debounce` has no flush on `pagehide` or `visibilitychange`. Read in the + code; no page unload was tested. +20. **`batch()` given an `async` function groups only the writes before its + first `await`**, and hands back the promise as if it had worked + (Legend-State 3). Re-run: one notification when `batch()` returns, two + more after. +21. **A store written between the server render and hydration raises React's + hydration error unless `prepareStoreForHydration` was called** (Zustand + and Jotai 1). Zustand needs no call, because its hook reads the store's + initial state as the server snapshot. The proposal is to capture the + initial snapshot without being asked. Run in happy-dom, not in a browser. +22. **An `async` `migrate` makes `persist` restore nothing and report + nothing** (Zustand and Jotai 3). Re-run: `migrate` is called once, the + store keeps its default, `onError` is not called and nothing is logged. +23. **A migrated record is not written back**, so the migration runs on every + load until the first edit (Zustand and Jotai 4). Re-run: after a restore + that migrates version 1 to 2, the stored record still says version 1. + +## What only the owner can do + +Security finding 12 has two steps outside the repository: a GitHub environment +for the publish job with the owner as required reviewer, and the npm settings +that accept only that environment and refuse publishing with a token. The +workflow changes themselves are ordinary commits for stage 4, if approved. + +## What stage 3 should do first + +In this order, because each later item builds on the one before it: + +1. **Merge the eleven reports into one list**, keyed by stage 1 finding where + there is one. Several fixes are proposed three or four times in different + words. +2. **Run each sketch against the repository's suites.** Stage 2 could not. + Five are small and overlap: functions left unwrapped (Vue sketch B), + `defineProperty` as a write (Svelte), `has` and `ownKeys` (Vue sketch A), + the getter stamp (Signals), and delete of a missing key. The count of + failing tests per sketch says which pinned behaviours each one changes. +3. **Decide API question 3 together with the key traps.** They cannot be + separated: with enumerable own getters, a getter that lists the keys of + `this` on a snapshot counts the getters too. +4. **Spike `ownership.ts` without the walk to a detached parent** (stage 1 + finding 72, Valtio V1), and decide the hang (finding 66) there. +5. **Spike the snapshot rebuild that copies the previous array and recomputes + only changed indices** (Immer 1). The measured floor is 6 microseconds + against 56 on Node for 1,000 rows. On Bun the gain is bounded, because + freezing a new 1,000-element array costs about 95 microseconds alone. This + also sets what the adapters can do about defect 8. +6. **Spike the base class for arrow-function methods** (question 4), after + item 2's `defineProperty` change. +7. **Cost a development build**: bytes per entry, and which of the proposed + warnings it would hold. +8. **Decide `persist` as one group**, because its items touch the same few + functions and three of them change documented behaviour: when hydration + happens (defects 18 and 21, `skipHydration`), what is reported (14, 22), + what is validated when `persist()` is called (security 1), the write-back + after a migration (23), and a flush when the page is hidden (19). + +## How the work was done + +| Report | Read | Model | Lines | Commit | +| ---------------------------------- | ------------------------------------------------------------------------------------------ | ----------------------- | ----: | --------- | +| `review/stage-2/valtio.md` | Valtio 2.3.2, commit `15c64d4`; `proxy-compare` 3.0.1 | Fable | 3,134 | `ac38f2f` | +| `review/stage-2/mobx.md` | MobX 7.1.7, commit `f8cf513` | Fable | 3,651 | `ac38f2f` | +| `review/stage-2/vue-reactivity.md` | `@vue/reactivity` 3.5.45, commit `8b479a8` | Fable | 2,958 | `ac38f2f` | +| `review/stage-2/solid.md` | `@solidjs/signals` 2.0.0, commit `a8186e6` | Fable | 2,811 | `ac38f2f` | +| `review/stage-2/svelte.md` | Svelte 5.57.3, the installed copy | Fable, finished by Opus | 2,545 | `12fe57d` | +| `review/stage-2/signals.md` | `@preact/signals-core` 1.14.5, commit `30a797e`; `signal-polyfill` 0.2.3, commit `958ad56` | Fable, finished by Opus | 3,363 | `04bd91d` | +| `review/stage-2/immer.md` | Immer 11.2.10, commit `16589b9` | Fable, finished by Opus | 2,476 | `04bd91d` | +| `review/stage-2/adapters.md` | Our five adapters; React 19.3.1, Vue 3.5.45, Svelte 5.57.3, Solid 2.0.0, Angular 22.2.6 | Fable, finished by Opus | 1,932 | `912a3e2` | +| `review/stage-2/security.md` | `persist`, `devtools`, `history`, the workflows, the packed tarball, `proxy-compare` | Opus | 823 | `c59084e` | +| `review/stage-2/legend-state.md` | `@legendapp/state` 2.1.15, commit `02032f3`, and 3.0.0-next.1, commit `2676125` | Sonnet at high effort | 1,442 | `cd6a73f` | +| `review/stage-2/zustand-jotai.md` | Zustand 5.1.0, commit `9fed2eb`; Jotai 3.0.2, commit `9de9377` | Sonnet at high effort | 1,540 | `2a43f72` | + +Each report records the files it read, has the ported tests and their output +in an appendix, and ends with what was run and what was only read. The plan +asks each library agent for five to ten ported tests, and every library +report has at least that many. + +**One departure from the plan.** Four reads began on Fable and were cut off +when the usage limit was reached. Each was finished by an Opus agent that +reused the first agent's clone and ports and re-ran them. The security review +ran on Opus from the start. The plan allows Opus to stand in for Fable when +usage is short, except on the three core files, and stage 2 changes no file. + +## Verified and not verified + +**Verified:** + +- Each report passes `biome check`, names the version and commit it read, and + has the sections the plan asks for. +- I re-ran defects 1, 2, 3, 4, 8, 18, 20, 22 and 23, and the version case + of 14. All ten reproduce. The scripts and their output are in the appendix. +- I read `release.yml` against security finding 12. + +**Not verified:** + +- Every other claim in the eleven reports is the agent's, with its own + reproduction in its appendix. I did not re-run them. +- No sketch was run against the repository's suites, by the stage rules. A + sketch that fixes its reproduction may still break a pinned test. +- Timings were taken while other agents were running on the same machine. + They show the shape of a cost, not a baseline. +- Not run anywhere: Svelte 4, React 18 and Vue 3.2 (not installed), Angular on + the server, and the depth limits of security finding 3 in a browser. +- The claim in security finding 12 that code running in the release job can + take the publishing token comes from how GitHub and npm document the + mechanism. Nobody tried it. + +Scratch folders, which a reboot can clear: each report names its agent's. +Mine is +`/private/tmp/claude-501/-Users-robertparallax-WebstormProjects-classy-store/9c8c2bbd-bb57-4b12-aa7b-9d06972e3fdd/scratchpad/stage-2-spot/`. + +## Appendix: the re-runs + +Run with `bun ` on Bun 1.4.4, on a machine that was also running other +agents. Each script imports the library source by absolute path. + +### `spot.ts`: defects 1, 3, 4 and 8 + +The first block is a plain chain of getters, which does not show defect 2. The fourth block reproduces stage 1 finding 31, not a new defect. + +```ts +import vm from 'node:vm'; +import { + batch, + createClassyStore, + snapshot, + subscribe, +} from '/Users/robertparallax/WebstormProjects/classy-store/packages/classy-store/src/index.ts'; + +const time = (run: () => void) => { + const start = performance.now(); + run(); + return performance.now() - start; +}; + +// 1. Signals finding 1: a clean read of a ladder of getters. +function ladder(depth: number) { + const target: Record = {base: 1}; + for (let level = 1; level <= depth; level++) { + const below = level === 1 ? 'base' : `g${level - 1}`; + Object.defineProperty(target, `g${level}`, { + get() { + return (this as Record)[below] + 1; + }, + enumerable: true, + configurable: true, + }); + } + return createClassyStore(target); +} +console.log('## 1. clean read of the top of a getter ladder'); +for (const depth of [5, 10, 15, 18, 20]) { + const store = ladder(depth) as Record; + store[`g${depth}`]; // first read computes + const ms = time(() => store[`g${depth}`]); + console.log( + `depth ${depth}: ${ms.toFixed(3)} ms, value ${store[`g${depth}`]}`, + ); +} + +// 1b. the same ladder as class getters +class Ladder { + base = 1; + get g1() { + return this.base + 1; + } + get g2() { + return this.g1 + 1; + } + get g3() { + return this.g2 + 1; + } + get g4() { + return this.g3 + 1; + } + get g5() { + return this.g4 + 1; + } + get g6() { + return this.g5 + 1; + } + get g7() { + return this.g6 + 1; + } + get g8() { + return this.g7 + 1; + } + get g9() { + return this.g8 + 1; + } + get g10() { + return this.g9 + 1; + } + get g11() { + return this.g10 + 1; + } + get g12() { + return this.g11 + 1; + } + get g13() { + return this.g12 + 1; + } + get g14() { + return this.g13 + 1; + } + get g15() { + return this.g14 + 1; + } + get g16() { + return this.g15 + 1; + } +} +{ + const store = createClassyStore(new Ladder()); + store.g16; + const clean16 = time(() => store.g16); + store.g8; + const clean8 = time(() => store.g8); + console.log( + `class ladder: clean g8 ${clean8.toFixed(4)} ms, clean g16 ${clean16.toFixed(4)} ms`, + ); +} + +// 2. Adapters A1: 2,000 direct writes with a sync subscriber that snapshots. +console.log('\n## 2. 2,000 row writes, sync subscriber that takes a snapshot'); +const makeRows = () => + createClassyStore({ + rows: Array.from({length: 2000}, (_, id) => ({id, value: 0})), + }); +{ + const store = makeRows(); + const none = time(() => { + for (const row of store.rows) row.value++; + }); + console.log(`no subscriber: ${none.toFixed(1)} ms`); +} +{ + const store = makeRows(); + let calls = 0; + subscribe( + store, + () => { + calls++; + snapshot(store); + }, + {sync: true}, + ); + const direct = time(() => { + for (const row of store.rows) row.value++; + }); + console.log( + `sync + snapshot, direct writes: ${direct.toFixed(1)} ms, ${calls} calls`, + ); + calls = 0; + const grouped = time(() => { + batch(() => { + for (const row of store.rows) row.value++; + }); + }); + console.log( + `sync + snapshot, inside batch(): ${grouped.toFixed(1)} ms, ${calls} calls`, + ); +} + +// 3. Solid finding 4: a method on a nested class instance without PROXYABLE. +console.log('\n## 3. nested class instance without PROXYABLE'); +class Counter { + count = 0; + increment() { + this.count++; + } +} +{ + const store = createClassyStore({counter: new Counter()}); + let calls = 0; + subscribe( + store, + () => { + calls++; + }, + {sync: true}, + ); + const before = snapshot(store); + store.counter.increment(); + const after = snapshot(store); + console.log( + `count ${store.counter.count}, sync calls ${calls}, same snapshot ${before === after}, snapshot count ${after.counter.count}`, + ); +} + +// 4. Vue finding 1: a getter that lists the entries of `this`, on a snapshot. +console.log( + '\n## 4. getter that calls Object.entries(this), read on a snapshot', +); +class Bag { + a = 1; + b = 2; + get entryCount() { + return Object.entries(this).length; + } + get keyCount() { + return Object.keys(this).length; + } +} +{ + const store = createClassyStore(new Bag()); + console.log( + `live: keyCount ${store.keyCount}, entryCount ${store.entryCount}`, + ); + const snap = snapshot(store); + console.log(`snapshot keys: ${Object.keys(snap).join(',')}`); + try { + console.log(`snapshot keyCount ${snap.keyCount}`); + } catch (error) { + console.log(`snapshot keyCount threw ${(error as Error).constructor.name}`); + } + try { + console.log(`snapshot entryCount ${snap.entryCount}`); + } catch (error) { + console.log( + `snapshot entryCount threw ${(error as Error).constructor.name}: ${(error as Error).message.slice(0, 60)}`, + ); + } +} + +// 5. Immer finding 6: a plain object from another realm. +console.log('\n## 5. a plain object from another realm'); +{ + const foreign = vm.runInNewContext('({n: 1})') as {n: number}; + const store = createClassyStore({local: {n: 1}, foreign}); + let calls = 0; + subscribe( + store, + () => { + calls++; + }, + {sync: true}, + ); + store.local.n++; + const afterLocal = calls; + store.foreign.n++; + console.log( + `write to local child: ${afterLocal} call; write to foreign child: ${calls - afterLocal} calls; snapshot frozen: local ${Object.isFrozen(snapshot(store).local)}, foreign ${Object.isFrozen(snapshot(store).foreign)}`, + ); +} + +// 6. Signals finding 3: a getter that reads this.rows[i] in a loop. +console.log('\n## 6. getter that reads this.rows[i] in a loop, 1,000 rows'); +class Table { + rows = Array.from({length: 1000}, (_, id) => ({id, price: 1})); + get totalIndexed() { + let total = 0; + for (let index = 0; index < this.rows.length; index++) + total += (this.rows[index] as {price: number}).price; + return total; + } + get totalLocal() { + const rows = this.rows; + let total = 0; + for (let index = 0; index < rows.length; index++) + total += (rows[index] as {price: number}).price; + return total; + } +} +{ + const store = createClassyStore(new Table()); + store.totalIndexed; + store.totalLocal; + const rounds = 2000; + const indexed = time(() => { + for (let round = 0; round < rounds; round++) store.totalIndexed; + }); + const local = time(() => { + for (let round = 0; round < rounds; round++) store.totalLocal; + }); + console.log( + `clean read: this.rows[i] ${((indexed / rounds) * 1000).toFixed(2)} µs, local rows ${((local / rounds) * 1000).toFixed(2)} µs`, + ); +} +``` + +Output: + +```text +## 1. clean read of the top of a getter ladder +depth 5: 0.050 ms, value 6 +depth 10: 0.003 ms, value 11 +depth 15: 0.006 ms, value 16 +depth 18: 0.005 ms, value 19 +depth 20: 0.006 ms, value 21 +class ladder: clean g8 0.0042 ms, clean g16 0.0142 ms + +## 2. 2,000 row writes, sync subscriber that takes a snapshot +no subscriber: 2.7 ms +sync + snapshot, direct writes: 638.5 ms, 2000 calls +sync + snapshot, inside batch(): 3.8 ms, 1 calls + +## 3. nested class instance without PROXYABLE +count 1, sync calls 0, same snapshot true, snapshot count 1 + +## 4. getter that calls Object.entries(this), read on a snapshot +live: keyCount 2, entryCount 2 +snapshot keys: a,b,entryCount,keyCount +snapshot keyCount 0 +snapshot entryCount 0 + +## 5. a plain object from another realm +write to local child: 1 call; write to foreign child: 0 calls; snapshot frozen: local true, foreign false + +## 6. getter that reads this.rows[i] in a loop, 1,000 rows +clean read: this.rows[i] 28.42 µs, local rows 0.12 µs +``` + +### `diamond.ts`: defect 2 + +```ts +import {createClassyStore} from '/Users/robertparallax/WebstormProjects/classy-store/packages/classy-store/src/index.ts'; + +// Two getters per level, each reading both getters of the level below. +function diamond(depth: number) { + const target: Record = {a0: 1, b0: 1}; + for (let level = 1; level <= depth; level++) { + for (const side of ['a', 'b']) { + Object.defineProperty(target, `${side}${level}`, { + get() { + const self = this as Record; + return ( + (self[`a${level - 1}`] as number) + + (self[`b${level - 1}`] as number) + ); + }, + enumerable: true, + configurable: true, + }); + } + } + return createClassyStore(target) as Record; +} +for (const depth of [8, 12, 16, 18, 20]) { + const store = diamond(depth); + store[`a${depth}`]; + let best = Infinity; + for (let round = 0; round < 3; round++) { + const start = performance.now(); + store[`a${depth}`]; + best = Math.min(best, performance.now() - start); + } + console.log(`depth ${depth}: clean read ${(best * 1000).toFixed(1)} µs`); +} +``` + +Output: + +```text +depth 8: clean read 27.3 µs +depth 12: clean read 136.3 µs +depth 16: clean read 1535.4 µs +depth 18: clean read 6235.5 µs +depth 20: clean read 24766.5 µs +``` + +### `persist.ts`: defects 18 and 20 + +```ts +import { + batch, + createClassyStore, + subscribe, +} from '/Users/robertparallax/WebstormProjects/classy-store/packages/classy-store/src/index.ts'; +import {persist} from '/Users/robertparallax/WebstormProjects/classy-store/packages/classy-store/src/utils/index.ts'; + +// Legend-State finding 4: a synchronous storage, read right after persist() returns. +const memory = new Map(); +const storage = { + getItem: (name: string) => memory.get(name) ?? null, + setItem: (name: string, value: string) => void memory.set(name, value), + removeItem: (name: string) => void memory.delete(name), +}; +{ + const first = createClassyStore({count: 0}); + const handle = persist(first, {name: 'spot', storage}); + await handle.hydrated; + first.count = 7; + await new Promise((resolve) => setTimeout(resolve, 20)); + console.log('stored record:', memory.get('spot')); + + const second = createClassyStore({count: 0}); + const secondHandle = persist(second, {name: 'spot', storage}); + console.log('count right after persist() returns:', second.count); + await secondHandle.hydrated; + console.log('count after hydrated resolves:', second.count); +} + +// Legend-State finding 3: batch() with an async function. +{ + const store = createClassyStore({a: 0, b: 0}); + let calls = 0; + subscribe( + store, + () => { + calls++; + }, + {sync: true}, + ); + const result = batch(async () => { + store.a = 1; + await Promise.resolve(); + store.a = 2; + store.b = 2; + }); + console.log( + 'batch(async) returned a promise:', + result instanceof Promise, + '| sync calls when batch returns:', + calls, + ); + await result; + console.log('sync calls after the promise settles:', calls); +} +``` + +Output: + +```text +stored record: {"version":0,"state":{"count":7}} +count right after persist() returns: 0 +count after hydrated resolves: 7 +batch(async) returned a promise: true | sync calls when batch returns: 1 +sync calls after the promise settles: 3 +``` + +### `migrate.ts`: defects 14, 22 and 23 + +```ts +import {createClassyStore} from '/Users/robertparallax/WebstormProjects/classy-store/packages/classy-store/src/index.ts'; +import {persist} from '/Users/robertparallax/WebstormProjects/classy-store/packages/classy-store/src/utils/index.ts'; + +const memory = new Map(); +const storage = { + getItem: (name: string) => memory.get(name) ?? null, + setItem: (name: string, value: string) => void memory.set(name, value), + removeItem: (name: string) => void memory.delete(name), +}; +const settle = () => new Promise((resolve) => setTimeout(resolve, 20)); +const errors: string[] = []; +const logged: string[] = []; +const originalError = console.error; +const originalWarn = console.warn; +console.error = (...parts: unknown[]) => void logged.push(parts.join(' ')); +console.warn = (...parts: unknown[]) => void logged.push(parts.join(' ')); + +// 1. Stored version 1, option version 2, no migrate. +memory.set('mismatch', JSON.stringify({version: 1, state: {count: 7}})); +{ + const store = createClassyStore({count: 0}); + const handle = persist(store, { + name: 'mismatch', + storage, + version: 2, + onError: (error, operation) => void errors.push(`${operation}: ${error}`), + }); + await handle.hydrated; + await settle(); + originalError( + '1. version mismatch, no migrate: count', + store.count, + '| onError calls', + errors.length, + '| console calls', + logged.length, + '| lastError', + String((handle as {lastError?: unknown}).lastError), + ); +} + +// 2. An async migrate. +errors.length = 0; +logged.length = 0; +memory.set('async', JSON.stringify({version: 1, state: {count: 7}})); +{ + const store = createClassyStore({count: 0}); + let migrateCalls = 0; + const handle = persist(store, { + name: 'async', + storage, + version: 2, + // The cast stands in for a JavaScript caller: the types refuse a promise. + migrate: (async (state: {count: number}) => { + migrateCalls++; + return {count: state.count + 1}; + }) as never, + onError: (error, operation) => void errors.push(`${operation}: ${error}`), + }); + await handle.hydrated; + await settle(); + originalError( + '2. async migrate: count', + store.count, + '| migrate calls', + migrateCalls, + '| onError calls', + errors.length, + '| console calls', + logged.length, + ); +} + +// 3. A sync migrate: is the migrated record written back before any edit? +errors.length = 0; +memory.set('sync', JSON.stringify({version: 1, state: {count: 7}})); +{ + const store = createClassyStore({count: 0}); + let migrateCalls = 0; + const handle = persist(store, { + name: 'sync', + storage, + version: 2, + migrate: (state) => { + migrateCalls++; + return {count: (state as {count: number}).count + 1}; + }, + }); + await handle.hydrated; + await settle(); + originalError( + '3. sync migrate: count', + store.count, + '| migrate calls', + migrateCalls, + '| stored record now', + memory.get('sync'), + ); +} +console.error = originalError; +console.warn = originalWarn; +``` + +Output: + +```text +1. version mismatch, no migrate: count 0 | onError calls 0 | console calls 0 | lastError undefined +2. async migrate: count 0 | migrate calls 1 | onError calls 0 | console calls 0 +3. sync migrate: count 8 | migrate calls 1 | stored record now {"version":1,"state":{"count":7}} +``` From 7d70d50aa1a1a3d5e2e4de06320e2b4815453d47 Mon Sep 17 00:00:00 2001 From: codeBelt Date: Thu, 19 Nov 2026 04:53:47 -0600 Subject: [PATCH 072/169] docs: mark stage 2 done in the review plan Co-Authored-By: Claude Fable 5.2 --- REVIEW_PLAN.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/REVIEW_PLAN.md b/REVIEW_PLAN.md index f53b7faa..657b77fd 100644 --- a/REVIEW_PLAN.md +++ b/REVIEW_PLAN.md @@ -8,14 +8,14 @@ published. Not part of the published docs; delete it when the work is done. Read this first. Whoever finishes a stage updates its row: the state, the commit it ended on, and where its report is. -| Stage | State | Ended on | Report | -| --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- | -------------------------- | -| Plan | Revised 2026-11-18 after a check against the repository at `7540662` | | | -| 1. Safety net | Done 2026-11-18 | `5bc4008` | `review/stage-1-report.md` | -| 2. Library comparison | In progress since 2026-11-18. Done: Valtio, MobX, Vue reactivity, Solid 2, Svelte 5, Signals, Immer, adapters. Running: security, Legend-State, Zustand and Jotai | | `review/stage-2/` | -| 3. Design review | Not started | | | -| 4. Refactor | Not started | | | -| 5. Release | Not started | | | +| Stage | State | Ended on | Report | +| --------------------- | -------------------------------------------------------------------- | --------- | ------------------------------------------------------------------------ | +| Plan | Revised 2026-11-18 after a check against the repository at `7540662` | | | +| 1. Safety net | Done 2026-11-18 | `5bc4008` | `review/stage-1-report.md` | +| 2. Library comparison | Done 2026-11-19 | `1b426fb` | `review/stage-2-report.md`, with the eleven reports in `review/stage-2/` | +| 3. Design review | Not started | | | +| 4. Refactor | Not started | | | +| 5. Release | Not started | | | ## Starting point (read this if you are new to the work) From 57404c3b14b815f0743b45b851beadb4885d1945 Mon Sep 17 00:00:00 2001 From: codeBelt Date: Thu, 19 Nov 2026 05:54:24 -0600 Subject: [PATCH 073/169] docs: allow merges into branches other than main, and start stage 3 Co-Authored-By: Claude Fable 5.2 --- REVIEW_PLAN.md | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/REVIEW_PLAN.md b/REVIEW_PLAN.md index 657b77fd..0167bd45 100644 --- a/REVIEW_PLAN.md +++ b/REVIEW_PLAN.md @@ -13,7 +13,7 @@ commit it ended on, and where its report is. | Plan | Revised 2026-11-18 after a check against the repository at `7540662` | | | | 1. Safety net | Done 2026-11-18 | `5bc4008` | `review/stage-1-report.md` | | 2. Library comparison | Done 2026-11-19 | `1b426fb` | `review/stage-2-report.md`, with the eleven reports in `review/stage-2/` | -| 3. Design review | Not started | | | +| 3. Design review | In progress since 2026-11-19 | | `review/stage-3/` | | 4. Refactor | Not started | | | | 5. Release | Not started | | | @@ -140,17 +140,20 @@ fail in the main checkout, so `.gitignore` lists that folder. - Fixed: state is a plain class wrapped in a proxy, consumers read immutable snapshots with structural sharing, and one core serves React, Vue, Svelte, Solid and Angular. Everything built on that is open to change. -- The owner alone decides when to merge and when to release. No agent merges - the pull request, merges the Changesets release pull request, enables - auto-merge, publishes to npm, creates a tag or a GitHub release, or runs - the release workflow. Finishing a stage, passing checks or an earlier - approval is not permission; only the owner's explicit instruction for that - specific action is. -- Do not ask the owner to merge or release, and do not suggest it is time. - Report the state of the work and stop; the owner will say when. +- The owner alone decides when anything is merged into `main` and when to + release. No agent merges the pull request, merges the Changesets release + pull request, enables auto-merge, publishes to npm, creates a tag or a + GitHub release, or runs the release workflow. Finishing a stage, passing + checks or an earlier approval is not permission; only the owner's explicit + instruction for that specific action is. +- Do not ask the owner to merge into `main` or to release, and do not suggest + it is time. Report the state of the work and stop; the owner will say when. - Committing and pushing to the branch need no further approval. The owner said on 2026-11-18: "From now on, you can commit and push anytime you want." - Merging and releasing are unchanged: the two rules above still hold. +- Merging into any branch other than `main` needs no further approval, for + example a helper agent's branch into `release/1.0`. The owner said on + 2026-11-19: "You can always merge, just not into main branch." Merging into + `main` and releasing are unchanged: the first two rules still hold. - Read the repo's agent instructions first (`AGENTS.md` if present, otherwise `CLAUDE.md`). Typecheck with `bun run typecheck`, never `bunx tsc`. - Use the skills listed for your stage. Load each one before the work it From 5a3d05ade8dae4414c52d9c406eeeb3ca9c611d1 Mon Sep 17 00:00:00 2001 From: codeBelt Date: Thu, 19 Nov 2026 06:21:58 -0600 Subject: [PATCH 074/169] docs: add the stage 3 merge of the stage 2 reports Co-Authored-By: Claude Fable 5.2 --- review/stage-3/merged.md | 2306 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 2306 insertions(+) create mode 100644 review/stage-3/merged.md diff --git a/review/stage-3/merged.md b/review/stage-3/merged.md new file mode 100644 index 00000000..4d4e78c2 --- /dev/null +++ b/review/stage-3/merged.md @@ -0,0 +1,2306 @@ +# Stage 3, step 1: the stage 2 reports merged + +Stage 3 of the pre-1.0 review, 2026-11-19. No library source was changed and +nothing here is decided. This is the list the decision document is written +from. + +Sources: the 73 findings of `review/stage-1-report.md` ("stage 1 finding N"), +`review/stage-2-report.md` ("stage 2 defect N" is its numbered list of new +defects), and the eleven reports under `review/stage-2/`. A report's own +finding is written as the report and its id: "Vue 4", "Valtio V2", "adapters +N1", "security 12". "Q" before a number is that report's answer to one of the +eight API questions. + +## Summary + +- **77 entries**, `M1` to `M77`, under fourteen headings. Each is one + distinct issue with every report that addresses it. The index has one line + per entry. To read this in one sitting, read the index, the + contradictions, the dependencies and the proposals I doubt, and open an + entry when a line needs its detail. +- **All 73 stage 1 findings are in one table.** 70 map to an entry. + Three have no stage 2 counterpart and no entry (4, 35, 59). Of the 70, + three sit in entries that no stage 2 report addresses (57, 58, 60), three + sit in an entry that has no proposal for them (13, 23, 44), and two are + mapped in part (64, 73). +- **Every stage 2 finding is mapped**, in one table per report. +- **29 contradictions** between reports, seven of them already in the stage 2 + report. One was settled by a stage 2 run, one is not a real conflict, and I + settled three more with short scripts (appendix). The rest need a spike or + the owner. +- **The four that change most other entries:** how snapshot getters are + installed (M33), whether `Object.defineProperty` is a write or an error + (M2), what replaces suspend and resume (M14), and whether there is a + development build (M72). +- **One number stands behind many entries:** the main entry measures 3,661 + bytes against a budget of 3,750. Almost every core fix adds code. + +## How to read an entry + +- **Problem** says what the library does today, with the stage 1 findings. +- **Reports** lists every report that addresses it. +- **Proposals** are what is left after removing duplicates. Where two + proposals cannot both be taken, the entry says "Conflict". +- **Evidence** says what exists: a sketch and where its diff is, a + reproduction, a measurement, or reasoning only. No sketch was run against + the repository's suites in stage 2. +- **Kind and API** gives the kind (bug, simplification, performance, API + design, diagnostics, docs) and whether the change touches the public API or + documented behaviour. For that I read + `website/content/docs/API_REFERENCE.md` in full ("the reference") and + searched the other pages under `website/content/docs/` for the behaviour. + A quoted sentence is what the docs say today. + +## Index + +One line per entry. "Conflict" is "Yes" where two reports propose things that +cannot both be taken, "Options" where the proposals differ without excluding +each other or one report leaves a choice, and "None proposed" where no report +proposes a change. The last column is "Yes" where at least one proposal +changes a signature, a public type or a sentence in the docs. + +| Entry | Issue | Kind | Stage 1 findings | Conflict | Changes the API or documented behaviour | +| ----- | ------------------------------------------------------------------ | ----------------------- | ------------------------ | ------------- | ------------------------------------------- | +| M1 | A function or class held as data is wrapped on every read | Bug | 5, 6, 42, 62 | Yes | No. Undocumented behaviour changes | +| M2 | `Object.defineProperty` through a store is not a write | Bug | 1, 44, 45, 71 | Yes | Yes | +| M3 | No `has` or `ownKeys` trap on the live store | Bug | 30 | No | No | +| M4 | A delete that removes nothing counts as a write | Bug | 29 | No | No | +| M5 | `includes`, `indexOf`, `lastIndexOf` miss a raw object in a list | Bug | 7 | Options | No | +| M6 | Raw objects hold proxies; a store handed over raw is not connected | Bug, simplification | 9, 10 | No | No | +| M7 | A raw object frozen or made read-only behind the store | Bug, or docs | 46, 49 | Yes | Only with a target of our own | +| M8 | The prototype can be swapped through a store | Hardening | 47, 48 | Options | Yes, if `setPrototypeOf` throws | +| M9 | Every `get` and `set` looks the property descriptor up | Performance | None | No | No | +| M10 | Array methods read every element through the proxy | Performance | 3 | No | No | +| M11 | Nested class instances: opt-in or opt-out | API design | None | Yes | Yes, if the default flips | +| M12 | Arrow-function methods and `#private` fields | API design | None | Options | An addition | +| M13 | A plain object from another realm is opaque | Bug | None | No | No | +| M14 | Suspend and resume, the walk, and the read that never returns | Bug, simplification | 28, 61, 64 to 68, 72, 73 | Options | No | +| M15 | What keeps a subscribed node alive | Bug, or docs | 27 | Options | No | +| M16 | The order in which owners are notified | Docs | 24, 69 | None proposed | No. Guaranteed or unspecified is to decide | +| M17 | A raw object changed while out of the store shows old content | Bug, or limit | 25 | None proposed | No | +| M18 | A clean getter read validates every dependency list again | Performance | None | Options | No | +| M19 | How a nested getter is revalidated | Performance, bug | None | Yes, settled | No | +| M20 | A getter that reads one field in a loop records every read | Performance | 3 | No | No | +| M21 | A getter misses what it reads on another node | Bug | 36 | No | No | +| M22 | A nested getter that throws leaves no dependency | Bug | 36, 64 | Options | No | +| M23 | A live getter over a missing property is recomputed on every read | Bug | 32 | Options | Yes. The reference documents the recompute | +| M24 | The snapshot layer loses nested memoization once per instance | Bug | 37 | No | No | +| M25 | A getter cycle on a snapshot overflows the stack | Bug, diagnostics | 38 | No | No | +| M26 | A getter that writes | Diagnostics | 39 | Yes | Yes, if it becomes an error | +| M27 | Three kinds of getter dependency | Simplification | None | No | No | +| M28 | Delivery to subscribers | Bug, diagnostics | 18 to 23 | Yes | No. The order of calls changes | +| M29 | A setter is not a transaction | Bug | 43 | No | One sentence in the reference | +| M30 | `batch()`: an `async` callback, and a write that is undone | Diagnostics | None | Options | Yes, if the type refuses a promise | +| M31 | Whether `subscribe()` should be synchronous by default | API design, docs | None | Yes | No report proposes a change | +| M32 | Writes outside a method, and after an `await` | Diagnostics | None | Options | Only an opt-in switch | +| M33 | Class getters are enumerable own accessors of a snapshot | API design, performance | 70 | Yes | Yes | +| M34 | `this` inside a snapshot getter | Bug | 31, 41 | No | No | +| M35 | A snapshot after one row changed costs time per row | Performance | 2 | No | No | +| M36 | A store that refers to itself can be written but not read | Bug, API design | 8, 13 | Options | Yes | +| M37 | Snapshots are incomplete at the edges | Diagnostics, docs | 49 | No | No | +| M38 | Native `Map` and `Set` | API design | 12 | Yes | No report proposes a change for 1.0 | +| M39 | One membership rule for the reactive collections | Bug | 33, 34 | No | Yes. The collections guide documents `-0` | +| M40 | Collection lookups scan an array | Performance | None | Options | No | +| M41 | `Snapshot` turns a tuple into an array | Types | 14 | No | Yes, a public type | +| M42 | A snapshot of a reactive collection keeps its mutators | Types, diagnostics | 16 | No | Yes, a public type | +| M43 | The backing arrays of the reactive collections are public | Types | 15 | None proposed | Yes, if they leave the type | +| M44 | `persist` options are not validated | Hardening | 48, 52, 55 | No | No. It throws on input that is broken today | +| M45 | Records `persist` cannot read are skipped without a report | Bug, diagnostics | 53 | Yes | Additive types; new `onError` calls | +| M46 | Expiry | Bug, or docs | None | Options | Yes, if the two options merge | +| M47 | A migrated record is not written back | Bug | None | No | No | +| M48 | When hydration happens | API design | 56 | Options | An addition, unless the default changes | +| M49 | `storage` is a required option | API design | None | No | An addition | +| M50 | A debounced save is lost when the page goes away | Bug | None | No | No | +| M51 | A deeply nested record bricks the store | Bug, hardening | 52 | No | No | +| M52 | A nested `__proto__` key survives restore | Hardening | None | No | No | +| M53 | Cross-tab sync | Hardening, docs | None | No | No | +| M54 | Dead and redundant code in `persist.ts` | Simplification | 54 | No | No | +| M55 | A pause switch and an in-flight flag | API design | None | No | An addition, and the report rejects it | +| M56 | DevTools time travel is not a faithful restore | Bug, hardening | None | No | No | +| M57 | `devtools`: action names, messages, options and `enabled` | API design | None | Yes | Yes, if the default of `enabled` changes | +| M58 | An edit in the same tick as `undo()` is not recorded | Bug | 57, 58 | None proposed | No | +| M59 | `withHistory` treats a function in an own field as behaviour | API design | 60 | None proposed | Not known | +| M60 | Undo replaces every row of a changed list | Performance | None | No | No. It refines one sentence | +| M61 | `subscribeKey` snapshots the whole store per notification | Performance | None | No | No | +| M62 | `subscribeKey` takes a top-level key only | API design | None | No | An addition | +| M63 | Every adapter builds a snapshot on each sync notification | Performance | 2 | No | No | +| M64 | The Vue adapter leaks one subscription per server render | Bug | None | No | No | +| M65 | The Vue adapter returns a writable ref | Types | 17 | Options | Yes, a documented return type | +| M66 | The Angular adapter drops a store write made inside a `computed` | Bug | None | No | No | +| M67 | The Angular adapter has no `injector` option | API design | None | No | An addition to a documented signature | +| M68 | Adapter and entry names | API design | None | Yes, mild | Yes, a rename | +| M69 | Svelte 5 runes | Docs | None | No | No | +| M70 | React hydration needs `prepareStoreForHydration` | API design | None | Options | Yes, documented behaviour | +| M71 | The equality option is called `isEqual` | API design | None | No | Yes, a rename | +| M72 | How a development build is split, and its rules | Diagnostics | None | Yes | Export conditions, under one of the shapes | +| M73 | Which diagnostics | Diagnostics | None | Options | Only the four tools | +| M74 | The release job shares the npm publishing identity | Hardening | None | No | No | +| M75 | Dependencies and the published tarball | Hardening, docs | None | No | No | +| M76 | Documentation changes that no report disputes | Docs | None | No | Docs only | +| M77 | Limits that other libraries share | Docs | 11, 26, 40, 50, 51, 63 | None proposed | No | + +## The entries + +### Proxy traps and identity + +#### M1. A function or a class held as data is wrapped on every read + +- **Problem.** Every function read through a store is wrapped, to bind `this` + and open a transaction. An array element gets a new wrapper on each read, so + `indexOf` never finds a callback and `splice(indexOf(first), 1)` removes the + last one. A class held as data, and `constructor`, lose their statics and + `instanceof`. A store made from a function is not recognised by a holder. + Stage 1 findings 5, 6, 42 and 62. +- **Reports.** Valtio V2, MobX 9, Vue 4, Solid 3, Svelte 3. +- **Proposals.** + - (a) Four reports agree: wrap only methods. Return untouched an own + function of an array, `constructor`, and a class. A class is told apart + by its `prototype` property, which is not writable. An own function on a + non-array object stays wrapped, because an object-literal store holds its + methods that way (Solid 3). + - (b) MobX 9: keep wrapping, cache one wrapper per function, never wrap + `constructor`, and treat a frozen function as a value. + - Conflict. Under (b) two reads return the same wrapper, but + `indexOf(first)` is still -1, because what is read is not what was stored. + - Open under both: a callback stored as an own property of a plain object + still reads back as a wrapper. For a store made from a function, no + report proposes anything; Vue's own `reactive(fn)` returns `fn` and warns + in development. +- **Evidence.** Vue sketch B (port 15, diff in `vue-reactivity.md` under + "Sketch B") fixed 5, 6 and 42 and kept a destructured method working. It ran + against its own reproductions only. The class test was checked on Bun + (Valtio, Vue) and on Node 24 (Solid). (b) is reasoning. +- **Kind and API.** Bug. No signature changes. `store.Model === Model` and + `store.list[0] === fn` become true. The reference says "Prototype methods + are automatically bound", which stays true, and says nothing about stored + functions. + +#### M2. `Object.defineProperty` through a store is not a write + +- **Problem.** The trap forwards the definition and handles one case, a + property that became read-only. A new key is not notified and is missing + from the next snapshot. A redefined child or array element leaves the old + child indexed, so store and snapshot disagree. A redefined getter keeps its + cached result. The trap also does not resume a suspended subtree, which is + where the hang of M14 begins. Stage 1 findings 1, 44, 45 and 71, and 61, 66 + and 67 through M14. +- **Reports.** Vue 6, Solid 7, Svelte 2, MobX 10, Immer 3. Valtio has the + same defect. +- **Proposals.** + - (a) A data descriptor is a write: resume, forward, link or detach the + child, drop the cached bound method, bump the version, notify. Stay + silent when nothing a snapshot shows has changed, so `Object.freeze(store)` + does not notify once per key (Vue 6, Solid 7, Svelte 2, MobX 10). Vue 6 + adds that an accessor definition removes the child. + - (b) Refuse: throw for any descriptor that carries `value`, `get` or + `set`, and let through the bare flags that `Object.freeze` sends + (Immer 3). + - Conflict. (a) and (b) exclude each other, and (b) rules out M12, because + class fields reach this trap as data descriptors. I confirmed that with a + run (appendix). + - Descriptors that are not a plain write (an accessor, `writable: false`): + Svelte and Immer throw. The Svelte report says we need not, because we + store everything on the target. + - Freezing through the store: MobX 10 suggests refusing + `Object.freeze(store)`, which removes the read-only branch. Vue, Svelte, + Immer and Solid 7 keep it working. + - No report says what clears a redefined getter's cache (finding 44). +- **Evidence.** Svelte spike, 24 lines added and 9 removed in `core.ts` (diff + in `svelte.md` under "The spike"): the reproductions of 1, 45, 66 and 71 + pass. Stage 1 ran the one-line resume against the suite: 5 failures, all + tests that pin 61 and 67. Nothing else was run against the suite. +- **Kind and API.** Bug. Changes documented behaviour. `TUTORIAL.md` says + "using `Object.defineProperty` to change state bypasses assignment/deletion + tracking" and "After `Object.freeze(store.profile)`, that object reads the + same way". (a) removes a documented limit. (b) and refusing to freeze are + breaking. `ARCHITECTURE.md` describes the trap. + +#### M3. No `has` or `ownKeys` trap on the live store + +- **Problem.** A live getter that reads `Object.keys(this)` or `'b' in this` + records nothing, so it is stale after a key is added or deleted. Stage 1 + finding 30. +- **Reports.** Vue 1, Solid 6, Svelte 4, MobX 10, Valtio V5. +- **Proposals.** All five agree. Two traps that record a dependency only + while a getter is being tracked. `has` records the key and whether it was + present, and is checked with `Reflect.has`. `ownKeys` records a counter per + node that moves when a key is added or removed, not when a value changes. + Svelte 4 adds: do not track `getOwnPropertyDescriptor`, or `Object.keys` + re-runs on every value change. The snapshot side is M34. +- **Evidence.** Vue sketch A, 48 added lines (diff in `vue-reactivity.md` + under "Sketch A", ports 13 and 14): the live getters are right after a + delete and an addition. Not run against the suite. +- **Kind and API.** Bug. No API change. Not documented either way. + +#### M4. A delete that removes nothing counts as a write + +- **Problem.** `delete store.dict.missing` calls every subscriber and + replaces the snapshot with an equal one. Stage 1 finding 29. +- **Reports.** MobX 11a, Vue 5, Svelte 5, Immer 5, and the Solid table. + Valtio has the same defect. +- **Proposals.** One: check `Object.hasOwn` before deleting. +- **Evidence.** In the Svelte spike and in Vue sketch A, each run against its + own reproduction. +- **Kind and API.** Bug. No API change. `ARCHITECTURE.md` describes the + delete trap and would need a clause. Changes the tests that pin 29. + +#### M5. `includes`, `indexOf` and `lastIndexOf` miss a raw object in a list + +- **Problem.** The list hands out proxies and the search compares them with + the raw argument. Stage 1 finding 7. +- **Reports.** Vue 2, Svelte 6. Valtio, MobX and Solid miss in the same way. +- **Proposals.** + - (a) Compare by `identityOf` in the three searches, so the raw object, its + proxy and its snapshot row are all found (Vue 2, Svelte 6). + - (b) It falls out of M10 if read-only array methods run on the raw array, + provided M6 keeps proxies out of the raw array. + - Svelte's own answer, a development warning, is rejected by its report. +- **Evidence.** Vue port 15. The sketch maps the whole array on each call; a + real version would loop once. +- **Kind and API.** Bug. `includes(raw)` changes from `false` to `true`. Not + documented. + +#### M6. Raw objects end up holding proxies, and a store handed over raw is not connected + +- **Problem.** After `to.row = from.row`, or `list.reverse()`, the raw object + holds a proxy. A class instance that is already a store, placed in another + store by its raw object, fails `canProxy` and stays unconnected: a method + call through it notifies neither store. Stage 1 findings 9 and 10, and part + of 34. +- **Reports.** Vue 3. Solid does the same as Vue (table rows 9 and 10). + Valtio V2 warns against the opposite design, a raw object that holds + proxies from creation. +- **Proposals.** One: unwrap a store proxy in `set`, and let `linkChild` find + a node by the raw object as well as by the proxy. The two-form comparison + in `set` then reduces to one. Two rules must survive: a value under a + read-only property is returned as it is, and a frozen container keeps the + form it was given. +- **Evidence.** Vue sketch B, 20 lines added and 7 removed, fixed 9 and 10 + together with M1 and M5. Not run against the suite. It touches attach and + detach. +- **Kind and API.** Bug and simplification. No API change. Only code that + keeps the raw object can see it. The reference promises reactivity for a + store "embedded by its proxy"; embedding by the raw object is not promised. + +#### M7. A raw object frozen or made read-only behind the store + +- **Problem.** The Proxy targets the raw object, so the engine checks every + `get` result against it. After `Object.freeze(raw.config)`, + `s.config.nested` throws. A non-writable, non-configurable field that holds + an object is shared with snapshots already taken. Stage 1 finding 46 and + part of 49. +- **Reports.** Solid 5, Immer 2, Svelte 7. Vue lists freezing through the + proxy among the things we do better. +- **Proposals.** + - (a) Give the Proxy a target of the library's own (Solid, Immer). It + removes `isReadOnly` and the freeze branch. It makes `has`, `ownKeys`, + `getOwnPropertyDescriptor` and `getPrototypeOf` mandatory, and + `Object.freeze(store)` needs separate support. Solid 5 says reject for + 1.0. Immer 2 says a design question, not a 1.0 blocker. + - (b) A guard in `get`: when the property has turned read-only, detach the + child and return the raw value (Svelte 7). It is free only while `get` + looks the descriptor up on every read, which M9 removes. + - (c) Document that the raw object must not be frozen or redefined once a + store holds it (Solid 5, Immer 2). +- **Evidence.** Svelte spike for (b), 9 lines added and 3 removed: the read + returns 1 instead of throwing. (a) is reasoning. +- **Kind and API.** Bug, or docs. (a) is breaking. The tutorial already says + that mutating the raw instance bypasses the store. + +#### M8. The prototype can be swapped through a store + +- **Problem.** `Object.setPrototypeOf(store, …)` and + `Object.assign(store, JSON.parse('{"__proto__": …}'))` swap the prototype. + `s.__proto__` is memoized as a getter with no dependencies, and a method + bound before the swap keeps the old class body. Stage 1 findings 47 and 48. +- **Reports.** Immer 3. Svelte and Solid refuse `setPrototypeOf` (their + tables). Vue behaves as a plain object does. Security 1 settles the + `persist` path. +- **Proposals.** + - (a) A `setPrototypeOf` trap that throws (Immer 3). + - (b) Also ignore `__proto__` as a written key, as Solid does. The Solid + report leaves that to the security report, which does not ask for it. + - (c) Leave it as on a plain object. + - Security 1: `persist` cannot reach this unless the application lists + `__proto__` in `properties`, which M44 would refuse. +- **Evidence.** Immer port 5 and the security reproduction, both run. No + sketch on ours. +- **Kind and API.** Hardening. (a) is breaking for code that swaps a store's + prototype. Not documented. + +#### M9. Every `get` and `set` looks the property descriptor up + +- **Problem.** Both traps walk the prototype chain with + `Object.getOwnPropertyDescriptor` on every access. In Solid's harness a + field read costs 46.5 nanoseconds on Node and 25.4 on Bun, against 21.7 and + 2.5 for a forwarding Proxy. This is the open performance item in the plan. +- **Reports.** Solid 1. MobX 12 notes that MobX does its class work once per + prototype. Valtio V2 has the timing: 1.6 nanoseconds against 30.5. +- **Proposals.** One (Solid 1). Decide an own key with `hasOwnProperty` and + one flag per node, "this object has an own accessor". Answer an inherited + key from a table per prototype, filled on the first miss. It assumes a + prototype gains no getter after its first read through a store, which the + library already does not handle (stage 1 findings 44 and 47). +- **Evidence.** Solid spike, 30 lines (diff in `solid.md` under port 6): a + field read drops to 38.2 on Node (18% less) and 11.9 on Bun (53% less), a + cached getter on Bun from 58.2 to 34.3. Not run against the suite. +- **Kind and API.** Performance. No API change. It removes what makes M7 (b) + free. + +#### M10. Array methods read every element through the proxy + +- **Problem.** `reduce`, `map`, `includes` and the rest run on the proxy, so + every index pays for the `get` trap: 126 nanoseconds per row for a `reduce` + against Vue's 76, and 921 against 57 for `includes` on ten numbers. Bears + on stage 1 finding 3. +- **Reports.** Vue 7. +- **Proposals.** For the array methods that only read, run the native method + on the raw array and hand each element's proxy to the callback. A tracked + getter already holds one version dependency on the array. +- **Evidence.** Vue's numbers (port 11, Bun). Not sketched on ours: the gain + is an expectation. +- **Kind and API.** Performance. Not breaking if a callback still receives + proxies. The Vue report names sparse arrays, array subclasses and a + callback that writes as the risks. + +#### M11. Nested class instances: opt-in or opt-out + +- **Problem.** A nested class instance without `PROXYABLE` is kept by + reference. A method called on it changes state, notifies no one, and + changes snapshots already taken. Stage 2 defect 1. API question 6. +- **Reports.** Solid 4, Valtio V12, Vue (Q6 and port 7), MobX Q6, Svelte Q6, + Immer Q6, Legend-State Q6. +- **Proposals.** + - (a) Keep opt-in, add a development warning when an unmarked class + instance is placed in a store, and document that such an instance is + shared with every snapshot (Valtio V12, Vue Q8; MobX, Svelte and Immer + are opt-in themselves). + - (b) Wrap by default, cache the verdict per prototype, and keep freezing + and one explicit marker as the ways out (Solid 4). + - Conflict. Vue Q6 adds two costs of (b) for us: a snapshot of a class with + `#private` fields fails, and the marker must be kept in a `WeakSet`, + because internal state never goes on the user's object. + - (c) A `ref()`-like marker for a plain object can be added after 1.0 + (Valtio V12). +- **Evidence.** The defect was re-run by the orchestrating agent. The + libraries split four to three: Valtio, Vue, Solid and Legend-State wrap; + MobX, Svelte and Immer do not. No sketch. +- **Kind and API.** API design. (b) changes documented behaviour: the + reference says "Ordinary nested class instances remain opaque" and + documents `PROXYABLE` as the opt-in. + +#### M12. Arrow-function methods and `#private` fields + +- **Problem.** An arrow-function field captured the raw instance, so its + writes go around the proxy without a word. A method that touches `#x` + throws, because `this` is the proxy. API question 4. +- **Reports.** MobX 8, Svelte 1, Vue (Q4 and port 8), Solid 8 and Q4, Valtio + Q4, Zustand and Jotai Q4. +- **Proposals.** + - (a) An optional base class whose constructor returns the store, about + six lines and one new export (MobX 8, Svelte 1, Vue Q4). Arrow methods + then notify. A `#private` field stops throwing on the live store but is + never state: a write to it notifies no one, a getter over it is cached + for good, and a snapshot getter that reads it throws. + - (b) No base class, and a development warning. Two detectors are + proposed: at creation, an own property that holds a function with no + `prototype` (MobX 8); or per call, compare the own data values with the + node's version (Solid 8). + - (c) Under either, document that a `#private` field is never state + (Svelte 1). +- **Evidence.** Three agents ran the base class on the unmodified library + (MobX script 10, Vue port 8, the Svelte appendix). Arrow methods notify. + The first snapshot holds the raw, unfrozen array until M2 is fixed; with + the Svelte spike of M2 it is frozen. `instanceof`, `new.target` and + `useLocalStore` were not checked. +- **Kind and API.** API design. (a) is an addition. It needs M2 (a) and is + ruled out by M2 (b). The reference says "arrow-function fields cannot be + rebound". + +#### M13. A plain object from another realm is opaque + +- **Problem.** `isPlainObject` accepts only this realm's `Object.prototype`. + An object made in an iframe or a `vm` context is kept by reference: writes + to it notify no one and its snapshot is not frozen. Stage 2 defect 4. +- **Reports.** Immer 6. +- **Proposals.** Also accept a prototype whose constructor is another + realm's `Object`, with the check cached per constructor. +- **Evidence.** Immer port 9 on Node and Bun, re-run by the orchestrating + agent. No sketch. +- **Kind and API.** Bug. It changes `canProxy`, which `persist` and `history` + use too. Not documented. + +### Ownership and memory + +#### M14. Suspend and resume, the walk to a detached parent, and the read that never returns + +- **Problem.** A detached, unobserved container is suspended, each suspended + child points at its former parent, and every trap walks that chain first. + Stage 1 found that the walk adds nothing to correct behaviour and causes a + read that never returns (66), a snapshot that is stale once (67) and, where + there is no `WeakRef`, a held row that keeps its removed list alive (68). + Stage 1 findings 28, 61, 65 to 68 and 72, and the dead code in 64 (third + item) and 73. +- **Reports.** Valtio V1. Solid 10 has a note on how Solid does without any + of it. Svelte 2 and Solid 7 include the resume in their `defineProperty` + change. MobX, Vue, Svelte and the signal libraries have no ownership graph. +- **Proposals.** + - (a) One line: `resumeScope()` first in the `defineProperty` trap (stage + 1, Solid 7, Svelte 2). It removes the hang and keeps the walk. + - (b) Remove the pointer to the detached parent and the walk (stage 1 + finding 72, Valtio V1). + - (c) Go further: keep one mechanism against "a retained row keeps removed + lists alive", the weak owner links, and drop suspension with its three + corrections (Valtio V1). + - Valtio V1 also says what not to take: Valtio's pull. Our eager version + bump is what makes a cached snapshot constant. + - (a) and (b) can both be done. (c) includes (b). +- **Evidence.** Stage 1: with the walk removed, every test passes except the + ones that pin 66 to 68; with (a), 1,307 pass and 5 fail, all pinning 61 and + 67. Valtio returns from the read that hangs ours and gives our answers in + every ported detached-subtree case but the one in M15. (c) is reasoning; + what it leaves to measure is a write to a row with many dead owners. +- **Kind and API.** Bug and simplification. No API change. The memory tests + and the owner-order tests (M16) pin today's behaviour. + +#### M15. What keeps a subscribed node alive, and what a store keeps alive + +- **Problem.** After `subscribe(store.list, cb)` and `store.list = []`, a + caller who kept one row and dropped the unsubscribe function is called + until the garbage collector runs and never after. A child holds its owners + weakly, and nothing holds a node that has a listener. Stage 2 defect 5. + Related: the four things stage 1 found kept alive longer than expected + (finding 27). +- **Reports.** Valtio V1. MobX 12 rejects the one remedy MobX has for the + third item of 27, dropping a getter's cache when nobody observes it. +- **Proposals.** + - (a) Document that a subscription lasts while the caller holds the store, + the node or the unsubscribe function. + - (b) Hold a node strongly for as long as it has a listener. A forgotten + unsubscribe then keeps the node for good. +- **Evidence.** Valtio port 4d, five rounds of five on each library. Finding + 27 is pinned by tests. (b) is not sketched. +- **Kind and API.** Bug, or docs. The reference says a subscription "keeps + working when the object moves to another field or another store". A + container removed from every store is not covered by that sentence. + `CONSTRAINTS.md` says retained memory must not grow, which (b) touches. + +#### M16. The order in which owners are notified + +- **Problem.** Owners are notified level by level, not from the inside out, + and the order depends on hidden state: whether a container that left the + store and came back was observed meanwhile. Stage 1 findings 24 and 69. +- **Reports.** No library has owners (MobX, Vue, Svelte, Signals). MobX 5 + says the order across re-entrant writes should be marked unspecified. +- **Proposals.** None from stage 2. This is an item for "guaranteed or + unspecified" in the decision document, and M14 changes it. +- **Evidence.** Pinned in `core.ownerOrder.test.ts`. +- **Kind and API.** Docs. Not documented today. + +#### M17. A raw object changed while out of the store shows old content when put back + +- **Problem.** `delete store.slot; raw.n = 2; store.slot = raw` gives + `store.slot.n === 2` and `snapshot(store).slot.n === 1`, if a snapshot was + taken before the delete. Stage 1 finding 25. +- **Reports.** Valtio does the same (table). Svelte and Immer agree with + themselves only because they cache nothing (Svelte 9). +- **Proposals.** None. It is the raw-write limit of M77 meeting the snapshot + cache. It belongs with M14, since attaching is where a version could be + bumped. +- **Evidence.** Pinned by a stage 1 test. Valtio port 4. +- **Kind and API.** Bug, or a documented limit. The tutorial says raw writes + bypass snapshot invalidation. + +### Getters + +#### M18. A clean read validates every dependency list again + +- **Problem.** Every read of a getter walks its whole dependency list, and a + dependency on another getter walks that getter's list. With two getters per + level, each reading both below, a clean read doubles per level: 27 + microseconds at depth 8 and 24.8 milliseconds at depth 20. Stage 2 + defect 2. +- **Reports.** Signals 1, MobX 3 (step 2). +- **Proposals.** A stamp on each cache entry, so that a read at the same + stamp returns at once. MobX 3 uses a new module-level write counter. + Signals 1 uses the node's own version, which already moves on any write + below it, and takes it before the body runs. Both name one edge: a + primitive written through the raw object is noticed only after the next + write through a proxy. +- **Evidence.** Signals `spike-stamp` (diff in `signals.md` under "Spike + diffs"): a clean read at depth 20 takes 0.06 microseconds, and one getter + over three fields 46 nanoseconds, from 61. Ports 02 to 08 give the same + output. Not run against the suite. That it is safe for a suspended subtree + was read, not tested. +- **Kind and API.** Performance. No API change. + +#### M19. How a nested getter is revalidated + +- **Problem.** A dependency on another getter is valid only if that getter's + whole list is valid. Whether its value changed is never asked. With `label` + reading `parity = a % 2`, `label` re-runs when `a` goes from 1 to 3. The + snapshot layer already compares values. +- **Reports.** MobX 3 (step 1), Signals 2. +- **Proposals.** + - (a) Refresh the nested getter and compare its value (MobX 3). + - (b) Compare its value and, when the value is a store node, that node's + version (Signals 2). Reads made during validation must not be recorded. + - Conflict, settled by a run: (a) gives a stale result on ours. A getter + can return a live store node, so `firstPrice`, which reads + `this.first.price`, stays 1 after `rows[0].price = 2`. +- **Evidence.** `spike-refresh` fails the probe and `spike-one` passes it. + With M18, a read after the base changed becomes linear: 183 microseconds at + depth 200, against 832 with the stamp alone. +- **Kind and API.** Performance and bug. No API change. It changes the run + counts pinned at `core.characterisation.getters.test.ts:133`. + +#### M20. A getter that reads one field in a loop records it on every read + +- **Problem.** `this.rows[i]` in a loop over 1,000 rows records 2,000 + dependencies. A clean read costs 28 microseconds, against 0.12 when the + getter reads `this.rows` once. Stage 1 finding 3, stage 2 defect 3. +- **Reports.** Signals 3. +- **Proposals.** Record a property once per run, with a set on the tracker + frame, as the snapshot layer does already. +- **Evidence.** Signals script 09. The stamp of M18 fixes the clean read and + not the read after an unrelated write (27.6 microseconds). `spike-one` + gives 0.26 and 0.39. +- **Kind and API.** Performance. No API change. + +#### M21. A getter misses what it reads on another node + +- **Problem.** A getter records only reads on its own node. One that reads + another store, its own child through an outside reference, or a static + that names its class is cached for good on the live store, while a fresh + snapshot gives the new value. Stage 1 finding 36 (first three cases) and + the note under finding 28. +- **Reports.** MobX 1, Vue 8. Svelte and the signal libraries track every + read (their tables). +- **Proposals.** One: for a read on any other node, record that node's + version, once per node per run, and skip a node that an already covered + node handed out. A read into another store is then covered by that store's + root version, so any write there invalidates the getter. +- **Evidence.** The defect is reproduced (MobX script 03, Vue port 9). The + fix is reasoning. MobX 1 notes that the snapshot layer has the same gap + and is harder, and that a suspended container must be resumed before its + version is compared. +- **Kind and API.** Bug. No API change. The reference says getters "cache + results from the store properties they read". + +#### M22. A nested getter that throws leaves no dependency + +- **Problem.** A getter is cached, and recorded as a dependency, only when it + returns. `try { return this.strict } catch { return 'fallback' }` stays + `'fallback'` after `strict` stops throwing. A getter that throws runs its + body again on every read. Stage 1 finding 36 (last case) and the first + item of 64. +- **Reports.** MobX 2, Signals 4, Vue 8. +- **Proposals.** + - (a) Record the dependency on the nested getter in a `finally`, or before + it runs, on both layers. All three agree. The branch stage 1 lists as + unreachable, `if (!cached) return false`, is then the one that handles + it. + - (b) Optionally cache the error with its dependencies. Signals 4 adds a + rule from a counter-example: never cache an error that recorded no + dependency, and record the dependency that closes a cycle before + throwing. +- **Evidence.** `spike-one` does (a) without (b), and the catching getter + recovers. Under an error cache without that rule, Preact and the TC39 + polyfill stay stuck on a cycle that a write has broken (Signals script 03). +- **Kind and API.** Bug. No API change. It changes the pinned tests at + `core.characterisation.getters.test.ts:1161` and `:1270-1300`. + +#### M23. A live getter that reads a missing property is recomputed on every read + +- **Problem.** A dependency on a key that does not exist fails validation + every time, so a getter that builds an object returns a new one on each + read. Stage 1 finding 32. +- **Reports.** MobX 10, Vue 8, Svelte 4, Signals 1. +- **Proposals.** + - (a) A `present` flag on the value dependency: it is valid for as long as + the key stays missing (Svelte 4, Vue 8, MobX 10). + - (b) The stamp of M18 alone. Signals 1 reports that it removes the + finding as a side effect. +- **Evidence.** Svelte spike, 7 lines: the getter ran once for two reads, + again when the property appeared and again when it was deleted. Signals + probe: the same object twice on all three spikes. Neither report ran "read, + unrelated write, read" on the stamp alone. +- **Kind and API.** Bug. Changes documented behaviour: the reference says "A + live getter that reads an absent field recomputes on subsequent reads". + +#### M24. The snapshot layer loses nested memoization once per instance + +- **Problem.** `evaluateSnapshotGetter` replaces the memo map that nested + getters filled, on a target's first getter read. Stage 1 finding 37, stage + 2 defect 7. +- **Reports.** Signals 6. +- **Proposals.** Read the memo map again after the computation. One line. +- **Evidence.** `spike-memo`: total body runs of 60, 60, 80, 80 over four + steps, against 60, 79, 99, 99. +- **Kind and API.** Bug, performance only. No API change. It changes the + pinned test of finding 37. + +#### M25. A getter cycle on a snapshot overflows the stack + +- **Problem.** The live store throws "circular computed getter dependency: a + → b → a". The snapshot layer has no check and throws a `RangeError`. Stage + 1 finding 38. +- **Reports.** MobX 11b, Signals 5, Vue 8, and the Svelte table. +- **Proposals.** One: give `evaluateSnapshotGetter` the live layer's check + and message. Keep the live message, which names the path where the other + libraries' messages do not. +- **Evidence.** Reproduced in four reports. Not sketched. +- **Kind and API.** Bug and diagnostics. No API change. + +#### M26. A getter that writes + +- **Problem.** On the live store it runs again and notifies on every read. + On a snapshot the write is dropped without a word. Stage 1 finding 39. +- **Reports.** MobX 6, Solid 8, Svelte 11, Signals 7. +- **Proposals.** + - (a) A development warning from the `set` trap while a getter is being + tracked (MobX 6, Solid 8, Signals 7). + - (b) An error, in every build (Svelte 11). + - Conflict. Signals 7 says an error is stricter than Preact, the TC39 + polyfill and Vue. The Svelte report itself notes that (b) breaks a getter + that fills a cache field on its first read. +- **Evidence.** The behaviour is reproduced in four reports. Nothing is + sketched. +- **Kind and API.** Diagnostics. (b) is breaking. Not documented. + +#### M27. Three kinds of getter dependency + +- **Problem.** A getter records the version of a child node, the value of a + primitive field, or another getter. The plan names this among the parts + hardest to reason about. +- **Reports.** Signals, in "Could our three kinds of dependency become one?". +- **Proposals.** One entry type, `{value, version}`, keyed by property. It + takes in M19, M20, M22 (a) and M23, and makes M21 one more entry of the + same shape. The Signals report recommends M18, M20 and M22 (a) first, as + small changes, and then deciding this with the benchmark in hand. +- **Evidence.** `spike-one`, about 150 lines of diff, ran against the Signals + ports only. A write to another field followed by the getter costs 300 + nanoseconds against 206, which is 45% more. +- **Kind and API.** Simplification. No API change. It would move the + cached-getter and write costs in `CONSTRAINTS.md`. + +### Subscriber delivery and transactions + +#### M28. Delivery to subscribers + +- **Problem.** `deliver` runs inside the write. A sync subscriber that writes + recurses until the stack overflows (stage 1 finding 18). A batched one is + served again in back-to-back microtasks with no bound (19). A subscriber + removed during delivery is still called once (20). A subscriber added after + a write sometimes hears it (21). A re-entrant write delivers the same + snapshot twice (22). A rejected promise from a subscriber is not reported + (23). +- **Reports.** MobX 5, Signals 8, Vue 9, Svelte 11, Valtio V6, Zustand and + Jotai 9, Legend-State 1, adapters A2. +- **Proposals.** + - Agreed by every report that addresses it: skip a listener that is no + longer registered (20). Adapters A2: the four `active` flags in the + adapters can then go. + - Re-entry, three policies. (a) One queue drained in a loop: a write made + during delivery is delivered after the current round (MobX 5, + Signals 8). (b) Skip a listener that is already running, so a subscriber + does not hear of its own writes (Vue 9). (c) Count the depth and throw + (Vue 9, as the alternative). + - The bound: 100 rounds (MobX, Preact, Vue's scheduler) or 1,000 (Svelte). + It is reported through `console.error`, naming the store (MobX 5, + Signals 8), or as a named error in every build (Svelte 11), or in + development only (Vue 9). + - Findings 21 and 22: each subscription keeps the version it last saw and + is skipped when that has not moved (MobX 5). Valtio V6 queues the + listeners that exist at the write, which covers 21 only. Zustand and + Jotai 9 agrees with the rule for 21 and proposes nothing for 22. + - Errors: keep the `try` around each listener and `console.error`; do not + throw to the writer (Signals 8, Legend-State 1, Vue 9, Valtio V6). + Legend-State 1 offers one replaceable reporter as an option. + - Finding 23: no library reports a subscriber's rejected promise, and + nothing is proposed. +- **Evidence.** Ported to MobX, Preact, Vue, Valtio and Zustand. Nothing is + sketched on ours. MobX 5 estimates 30 lines in `core.ts`. +- **Kind and API.** Bug and diagnostics. No signature changes. The order of + calls changes when a subscriber writes. The reference does not say what a + removed or a late subscriber gets. Delivery stays synchronous under all + three policies, which every adapter relies on. + +#### M29. A setter is not a transaction + +- **Problem.** A setter that writes two fields gives two sync notifications, + so a subscriber sees the half-applied state. Stage 1 finding 43. +- **Reports.** Valtio V7, MobX 4, Svelte 10. Vue has the same defect. +- **Proposals.** One: open the transaction around the accessor branch of the + `set` trap. +- **Evidence.** Svelte spike, 6 lines added and 1 removed: the subscriber + sees the final state once. +- **Kind and API.** Bug. The reference lists when sync subscribers are + notified: "once per direct write, and once per store method or array + operation". A setter would join that list. It changes two pinned tests. + +#### M30. `batch()`: an `async` callback, and a write that is undone + +- **Problem.** `batch(async () => …)` groups only the writes before the + first `await` and hands back the promise. Stage 2 defect 20. Separately, a + value set and set back inside a batch still notifies once. +- **Reports.** Legend-State 3 and 2, Solid 8, Signals 9. The MobX, Vue, + Signals, Legend-State, Zustand and adapters reports all say `batch()` + belongs in the API. +- **Proposals.** + - The `async` case: (a) a development warning when `run()` returns a + thenable (Legend-State 3, Solid 8); (b) a type that refuses a function + returning a promise (Legend-State 3). The stage 2 report leans to + "refuse a promise". + - The undone write: reject (Signals 9, Legend-State 2). The version has + moved, and a binding compares snapshot identity. +- **Evidence.** Legend-State port B8, re-run by the orchestrating agent. (b) + was not tried. +- **Kind and API.** Diagnostics. (b) changes a documented signature. The + reference says `batch` "Returns whatever `run` returns" and already + documents that only the synchronous part is covered. + +#### M31. Whether `subscribe()` should be synchronous by default + +- **Problem.** API question 1. `subscribe()` is batched in a microtask + unless `{sync: true}` is passed. +- **Reports.** All eleven answer it. +- **Proposals.** MobX, Preact, Legend-State, Zustand and Jotai notify + synchronously. Valtio, Solid and Svelte batch. Vue is synchronous + underneath and grouped at the surface, as we are. No report proposes + changing our default. Valtio V7 rejects a `sync` option on hooks. Zustand + and Jotai Q1 asks that the batched default be stated at the top of the + reference, because users of five of these libraries expect synchronous + delivery. MobX Q1 says a synchronous default would need M28 first. +- **Evidence.** Ports in each report. Valtio's timing shows why sync without + grouping cannot be a default: sorting 1,000 rows with one sync subscriber + that takes a snapshot costs 248 milliseconds there and 0.9 on ours. +- **Kind and API.** API design and docs. Changing the default would be + breaking and is documented. + +#### M32. Writes outside a method, and after an `await` + +- **Problem.** API question 2. A direct write is allowed anywhere and each + one notifies sync subscribers. A method is a transaction only up to its + first `await`. Neither case is reported to the developer. +- **Reports.** MobX 6, Solid 8, adapters Q8, and question 2 in every report. +- **Proposals.** Every report keeps direct writes allowed and keeps + `batch()`. The diagnostics differ: + - (a) An opt-in development check for a write outside a transaction to a + store that has sync subscribers. It catches the `await` case (MobX 6). + - (b) A development warning when a sync listener is notified many times in + one task (adapters Q8). + - (c) Document a method that returns a promise, and do not warn (Solid 8). +- **Evidence.** MobX script 05. Nothing is sketched. +- **Kind and API.** Diagnostics. (a) needs a public switch. No behaviour + changes. + +### Snapshots + +#### M33. Class getters are enumerable own accessors of a snapshot + +- **Problem.** API question 3. Every snapshot of a class instance gets an own + enumerable accessor per getter. `Object.keys(store)` is `a,b` and + `Object.keys(snapshot(store))` is `a,b,entryCount`. A spread or a + `JSON.stringify` of a snapshot runs every getter. Installing them costs + about 160 nanoseconds per getter per snapshot. A snapshot also lists every + data field before any own getter, whatever their order on the store (stage + 1 finding 70). +- **Reports.** Valtio V4, MobX Q3, Vue (Q3 and finding 1), Solid Q3, Svelte + Q3, Immer Q3. No library turns an inherited getter into an own enumerable + accessor of a copy. +- **Proposals.** + - (a) One derived prototype per class, made once and cached. It inherits + from the class prototype and carries the memoizing accessors, not + enumerable (Valtio V4, Immer Q3). `instanceof` still holds; + `Object.getPrototypeOf(snapshot)` becomes the derived object. + - (b) Own accessors that are not enumerable (MobX Q3). + - (c) Keep today's shape and document that a snapshot has more keys than + its store (Valtio V4, as the fallback). + - An own getter of an object literal stays an own accessor under (a). + - The stage 2 report asks stage 3 to spike (a) and (b). +- **Evidence.** Ports in each report. Valtio's timing: writing a field and + taking a snapshot costs 672 nanoseconds with no getter and 1,938 with + eight. Neither (a) nor (b) is prototyped. +- **Kind and API.** API design and performance. Changes documented + behaviour. `TUTORIAL.md` says "every getter of the class is installed as an + enumerable own accessor, so `Object.keys(snapshot)`, object spread and + `JSON.stringify(snapshot)` include computed values". The reference says + snapshots of a `PROXYABLE` class "keep the class prototype". + +#### M34. `this` inside a snapshot getter + +- **Problem.** A snapshot getter runs with `this` set to a Proxy over an + empty object that has only a `get` trap. `Object.keys(this)` is empty, + `'b' in this` is `false`, `this instanceof C` is `false`, and `return this` + hands the proxy out. Stage 1 findings 31 and 41. +- **Reports.** Valtio V5, Vue 1, Solid 6, MobX 10. +- **Proposals.** Make the frozen snapshot the target of the tracking proxy + and add `has` and `ownKeys` traps that record (Valtio V5, Vue 1). Solid 6 + lists four traps; with the snapshot as the target, only those two are + needed. Valtio V5 says not to use proxy-compare's `createProxy` for this: + every object read through it is a tracking proxy, so a getter that returns + rows would hand out proxies. +- **Tie to M33.** While getters are enumerable own accessors, + `Object.keys(this).length` counts them (5 where the live store says 2), and + a getter that calls `Object.entries(this)` reads itself until the stack + overflows. Either M33 changes, or the tracker's `ownKeys` leaves accessors + out (Vue 1). +- **Evidence.** Valtio's prototypes A, B and C, on real snapshots that held + data properties only. Vue sketch A with ports 13 and 14. +- **Kind and API.** Bug. No API change. No report addresses `return this`. + +#### M35. A snapshot after one row changed costs time in proportion to the rows + +- **Problem.** Writing one of 1,000 rows and taking a snapshot costs about 56 + microseconds on Node and 119 on Bun, against well under a microsecond for a + cached snapshot. Stage 1 finding 2. Every sync adapter multiplies it (M63). +- **Reports.** Immer 1, adapters A1. Valtio, MobX and Solid are no better. +- **Proposals.** Record which child keys changed since the node's last + snapshot. Rebuild an array by copying the previous snapshot by index and + recomputing only those. Fall back to today's walk when many changed, when + the length changed, or when there is no previous snapshot. Immer 1 also + says: no switch to turn freezing off. +- **Evidence.** A measured floor, not an implementation: 6 microseconds + against 56 on Node. On Bun the gain is small, because freezing a new + 1,000-element array dominates. Immer with freezing on costs what we cost. + My own run adds one fact: on Bun, reading a frozen array is itself slow, 17 + microseconds per 1,000 elements against 2.5 (see the appendix). +- **Kind and API.** Performance. No API change. The set of changed keys must + survive detach and resume, so this comes after M14. + +#### M36. A store that refers to itself can be written but not read + +- **Problem.** `store.self = store` succeeds and notifies. Every later + `snapshot(store)` throws, which inside an adapter means the subscriber + throws. Stage 1 finding 8. A getter on such a store also recomputes on + every write (finding 13), for which no report proposes anything. +- **Reports.** Valtio V3, Solid 10, Svelte 9, Immer 11. +- **Proposals.** + - (a) Support cycles: replace the in-progress set with a map from target + to the unfinished snapshot, return that on a repeat visit, and freeze + after filling. All four describe the same mechanism. Valtio V3 adds: not + through the shared cache, where a getter that throws would leave a + half-built snapshot. Then make `proxy-compare`'s `isChanged`, + `cloneSnapshot`, `shallowEqual`, `persist`, `devtools` and `withHistory` + safe for cycles. + - (b) Refuse at the write that closes the cycle (the alternative in + Valtio V3, Svelte 9 and Immer 11). + - All four agree on one thing: today's state, where the write succeeds and + the store can no longer be read, is the outcome to remove. +- **Evidence.** Svelte spike, 13 lines added and 9 removed in `snapshot.ts`: + a store that holds itself, a ring of two and a list that holds itself all + snapshot, and every node is frozen. The utilities and React's tracked reads + were not tried with a cyclic snapshot. +- **Kind and API.** Bug and API design. Changes documented behaviour: + `TUTORIAL.md` says "Circular references in traversed state are rejected by + `snapshot()`". + +#### M37. Snapshots are incomplete at the edges + +- **Problem.** An array's own named and symbol-keyed properties are reactive + on the store and missing from its snapshot. An object inherited from the + prototype comes back raw and unfrozen. Stage 1 finding 49. (Its third case, + the read-only field, is M7.) +- **Reports.** Immer 4. +- **Proposals.** A development error for a named property written to or + deleted from an array, and a sentence in the docs that arrays carry indices + and `length` only. Immer 4 rejects carrying named properties into + snapshots: it would cost a `Reflect.ownKeys` of the array on every + rebuild. Nothing is proposed for the inherited object. +- **Evidence.** Immer port 4. Not sketched. +- **Kind and API.** Diagnostics and docs. It needs M72. + +### Collections + +#### M38. Native `Map` and `Set` + +- **Problem.** API question 5. A native collection in a store is opaque: a + write to it notifies no one, it holds raw members (stage 1 finding 12), and + every snapshot shares it. +- **Reports.** Vue 10, Svelte 8, Immer 9, Legend-State 8, and question 5 in + the MobX, Valtio and Solid reports. +- **Proposals.** No report proposes replacing `reactiveMap` and `reactiveSet` + for 1.0. Four give the same reason: a frozen native `Map` can still be + written through `Map.prototype.set`, so a snapshot cannot be one. + - (a) A development warning when a native `Map` or `Set` is placed in a + store (Vue 10, MobX Q5). + - (b) Decide before 1.0 whether "a native `Map` in a store is kept by + reference" is part of the contract. Making it reactive later would + change what a snapshot holds (Vue 10). + - (c) Make the live side a subclass of the native class, so that + `instanceof Map` holds. Immer 9 says it is possible if every inherited + method is overridden. Svelte 8 says it is not possible as the store + stands, because a native method rejects the proxy as `this`. +- **Evidence.** Ports in the Vue, Svelte and Immer reports. Stage 2 did not + try (c). My run (appendix) shows both statements hold: a method that calls + `super` throws through the store, and a subclass that overrides every + method and accessor it uses works on the store and on a snapshot. +- **Kind and API.** API design. Today's behaviour is documented: native + `Map` and `Set` "retain their references", and `instanceof Map` on a + reactive collection "returns `false`". + +#### M39. One membership rule for the reactive collections + +- **Problem.** `+0` and `-0` are two members when added and one when + constructed (stage 1 finding 33). A collection constructed from one object + in two forms holds it twice, where `add` holds it once (finding 34). +- **Reports.** Valtio V10, Vue 10, Svelte 8. +- **Proposals.** One: the constructors compare as `add` and `set` do, by + `identityOf`, and every path treats `+0` and `-0` as one, as a native `Set` + does. Vue Q8 adds a development warning for both forms of one object. +- **Evidence.** Reproduced in three reports. Not sketched. +- **Kind and API.** Bug. Changes documented behaviour: + `REACTIVE_COLLECTIONS_TUTORIAL.md` says "Primitive members use `Object.is`, + which distinguishes `0` and `-0`" and advises against relying on it. + +#### M40. Collection lookups scan an array + +- **Problem.** A lookup among 10,000 entries costs 45 microseconds on the + live store and 245 to 346 on a snapshot, against 17 nanoseconds in Svelte. + Stage 2 defect 6. +- **Reports.** Valtio V10, Svelte 8, Immer 9. +- **Proposals.** + - (a) For a frozen backing array, build a `Map` from identity to index on + the first lookup and keep it in a `WeakMap` keyed by the array. It cannot + go stale, because the array cannot change (Valtio V10). This is the + snapshot side only. + - (b) An index kept beside the live array. Svelte 8 calls it "a design + task, not a patch": it has to stay right when history or persist replace + the array. Valtio V10 rejects Valtio's own live structure for us. The + stage 2 report leans to looking at native storage behind the live side. +- **Evidence.** Valtio's prototype over real snapshots: 1,000 lookups among + 10,000 members in 0.8 milliseconds with the index built, against 101 for + numbers and 251 for objects. (b) is not sketched. +- **Kind and API.** Performance. No API change. The reference says "Their + lookups are linear". + +### Types + +#### M41. `Snapshot` turns a tuple into an array + +- **Problem.** `Snapshot<[string, number]>` comes out as + `readonly (string | number)[]`. Stage 1 finding 14. +- **Reports.** Valtio V11, Vue 11, Immer 10. +- **Proposals.** One: delete the array branch. The mapped type handles + arrays, read-only arrays and tuples. +- **Evidence.** Type-checked in three scratch folders with TypeScript 7.0.2, + one with a control that fails. Not run against the repository's 54 type + tests. +- **Kind and API.** A bug in the types. It changes a public type: a tuple's + snapshot becomes more precise. + +#### M42. A snapshot of a reactive collection keeps its mutators + +- **Problem.** `snapshot(store).todos.set(...)` compiles, and at run time it + throws the engine's "Attempted to assign to readonly property", which names + neither the collection nor the cause. Stage 1 finding 16. +- **Reports.** Valtio V10, Vue 11, Immer 8. +- **Proposals.** Agreed: `Snapshot` maps `ReactiveMap` and `ReactiveSet` + to read-only interfaces, and each mutator throws a named error when called + on a snapshot. Valtio V10 suggests a general hook that lets any class name + its own snapshot type. Keep the frozen backing array. +- **Evidence.** The other libraries' types were checked (Vue port 12, Immer + port 8). Not sketched on ours. +- **Kind and API.** Types and diagnostics. Breaking at the type level only + for code that calls a mutator on a snapshot, which throws today. + +#### M43. The backing arrays of the reactive collections are public + +- **Problem.** `_entries` and `_items` are writable members of the published + `ReactiveMap` and `ReactiveSet` types. Stage 1 finding 15. +- **Reports.** Svelte 8 and Vue 10 note it. Svelte keeps its storage in + `#private` fields, which is not open to us (M12). +- **Proposals.** None from stage 2. +- **Evidence.** Stage 1's type test. +- **Kind and API.** Types. Both types are exported, so the two names are + frozen with 1.0 unless they leave the public type first. + +### `persist` + +#### M44. Options are not validated when `persist()` is called + +- **Problem.** A getter named in `properties` is saved, and restoring it + fails part-way (stage 1 finding 52). A malformed entry is ignored (55). A + key named `__proto__`, `constructor` or `prototype` in `properties` is the + one way `persist` can swap the store's prototype (48). +- **Reports.** Security 1, Legend-State (its options table), Zustand and + Jotai Q8. +- **Proposals.** One pass when `persist()` is called, which throws for a + prototype key, a getter, a method, or an entry without both `serialize` + and `deserialize`. +- **Evidence.** The security reproduction. Not sketched. +- **Kind and API.** Hardening. Breaking only for input that is already + broken. The reference says an explicit list "should contain writable data + fields". + +#### M45. Records `persist` cannot read are skipped without a report + +- **Problem.** None of these reaches `onError` or the status: a JSON value + that is not an envelope; a `state` that is not an object; a version that + differs when there is no `migrate`; a `migrate` that returns a string, an + array or a promise. An array as `state` passes the check (stage 1 finding + 53). A version that is not a number counts as 0, so `"2"` is migrated as if + from 0. Stage 2 defects 14 and 22. +- **Reports.** Security 4 and 5, Zustand and Jotai 3. +- **Proposals.** + - One function that returns an envelope or a reason, with every reason + reported through `onError` (security 4). + - Only a missing version means 0; anything else that is not an integer is + unreadable (security 5). Zustand and Jotai 3 agrees on "missing means 0". + - Conflict on the operation name: `'parse'` with a reason (security 4), or + a new `'migrate'` (Zustand and Jotai 3). + - Conflict on an `async` `migrate`: await it (Zustand and Jotai 3), or + reject any result that is not a plain object (security 4). +- **Evidence.** The version case and the `async` case were re-run by the + orchestrating agent. Not sketched. +- **Kind and API.** Bug and diagnostics. Additive in the types: + `PersistOperation` may gain a member, and `migrate`'s return type may + widen. Applications see new `onError` calls. + +#### M46. Expiry + +- **Problem.** With `expireIn` set, a record with no usable `expiresAt` + never expires. Separately, `expireIn` and `clearOnExpire` are two options + for one concept. +- **Reports.** Security 6, Legend-State (its options table). +- **Proposals.** Security 6 leaves it to the owner: count such a record as + expired, or document that expiry bounds the age of data this application + wrote. Legend-State suggests looking at a single option with clearing as + the default. +- **Evidence.** The security reproduction. +- **Kind and API.** Bug, or docs. Merging the two options is breaking. The + tutorial documents both. + +#### M47. A migrated record is not written back + +- **Problem.** After a restore that migrates version 1 to 2, the stored + record still says version 1, so the migration runs on every load until the + first edit. Stage 2 defect 23. +- **Reports.** Zustand and Jotai 4. +- **Proposals.** Save once after a successful migration. +- **Evidence.** Zustand port 4e, re-run by the orchestrating agent. Two tabs + that both migrate, with `syncTabs` on, were not run. +- **Kind and API.** Bug. No API change. Storage is first written at load. + +#### M48. When hydration happens + +- **Problem.** `persist()` reads through an `await` even when the storage is + synchronous. A store on `localStorage` holds its defaults when `persist()` + returns and renders them first. Stage 2 defect 18. When a debounced save + runs relative to a read is pinned and not decided (stage 1 finding 56). +- **Reports.** Legend-State 4. +- **Proposals.** An option such as `hydrate: 'sync' | 'async'`, defaulting + to today's behaviour, with a `getItem` that returns a non-promise as the + signal. The report gives the case against: a synchronous restore runs + `migrate`, the transforms and `merge` in the caller's stack. Decide it + together with `skipHydration`. +- **Evidence.** Legend-State port P2, re-run: 0 when `persist()` returns, 7 + after `hydrated` resolves. Not sketched. +- **Kind and API.** API design. Additive as an option. Changing the default + changes documented behaviour: the tutorial says "Hydration is asynchronous + even with `localStorage`". + +#### M49. `storage` is a required option + +- **Problem.** `persist(store, {name: 'x'})` is a type error. Zustand and + Jotai both default to `localStorage`. +- **Reports.** Zustand and Jotai 5. +- **Proposals.** Make `storage` optional, defaulting to a lazily read + `globalThis.localStorage`, with no persistence and one development warning + where it is missing. Keep `properties` and the other option names. +- **Evidence.** Reading only. +- **Kind and API.** API design. Additive. + +#### M50. A debounced save is lost when the page goes away + +- **Problem.** `debounce` has no flush on `pagehide` or `visibilitychange`. + Stage 2 defect 19. +- **Reports.** Legend-State 5. +- **Proposals.** While a timer is pending, flush on `pagehide` and on + `visibilitychange` to hidden, and remove the listeners in `dispose()`. +- **Evidence.** Read in the code. No page unload was tested. +- **Kind and API.** Bug. Additive. + +#### M51. A deeply nested record bricks the store, and a failed restore is partial + +- **Problem.** A record nested 16,000 to 18,000 deep restores without error + on Bun. After that every snapshot and every save throws, so the record is + never replaced. Deeper still, the restore fails part-way: earlier fields + are restored and later ones are not. Stage 2 defect 12, and the partial + restore of stage 1 finding 52. +- **Reports.** Security 3. +- **Proposals.** Clone every value before assigning any. Then take one + `snapshot()` inside the same `try`; if it throws, put the fields back and + report `'parse'`. Document the depth limit. A depth cap is the alternative, + and any number would depend on the engine. +- **Evidence.** The security reproductions on Bun. Browser limits were not + measured. +- **Kind and API.** Bug and hardening. No API change. + +#### M52. A nested `__proto__` key survives restore + +- **Problem.** `JSON.parse` makes `"__proto__"` an ordinary own key. The + restored object keeps it as data and the next save writes it back. Stage 2 + defect 13. +- **Reports.** Security 2. +- **Proposals.** Drop own `__proto__` keys at every depth when restoring + from storage or from DevTools, inside the walk `cloneSnapshotValue` already + does, behind a parameter that only those callers pass. A `JSON.parse` + reviver does the same and measured about ten times slower. +- **Evidence.** Run by the security agent. +- **Kind and API.** Hardening. No API change. + +#### M53. Cross-tab sync + +- **Problem.** The handler applies an event from another storage area under + the same key, and a synthetic event with no `storageArea`. Stage 2 defect + 16. Two tabs that edit different fields overwrite each other's record. +- **Reports.** Security 8, Legend-State 10. +- **Proposals.** When `storage` is a `Storage`, ignore events from another + area, and document that `syncTabs` listens to `localStorage` events + whatever the adapter (security 8). Say in the tutorial that concurrent + edits in two tabs are last writer wins on the whole record (Legend-State + 10). +- **Evidence.** The security reproduction and Legend-State port P4. +- **Kind and API.** Hardening and docs. No API change. + +#### M54. Dead and redundant code in `persist.ts` + +- **Problem.** Stage 1 finding 54 lists it: an `assertActive()` that cannot + throw, a cancel-timer block repeated four times, assignments never read, + and guards whose removal changes nothing. +- **Reports.** Legend-State 6, security 4. +- **Proposals.** Legend-State 6: do not replace the version bookkeeping with + a restore flag carried by the core; simplify inside `persist.ts`. Security + 4: the single envelope reader of M45 replaces the scattered guards. +- **Evidence.** Stage 1's list of equivalent mutants. +- **Kind and API.** Simplification. No API change. + +#### M55. A pause switch and an in-flight flag + +- **Problem.** There is no way to pause saving without disposing the handle, + and no "a write is in flight" signal. +- **Reports.** Legend-State 9. +- **Proposals.** Reject for now. `pause()` and `resume()`, or an `isSaving` + field in `PersistStatus`, can be added later without breaking anyone. +- **Evidence.** Reading only. +- **Kind and API.** API design. Additive, whenever it is done. + +### `devtools` + +#### M56. Time travel is not a faithful restore + +- **Problem.** A jump assigns each key of the parsed state in turn. Unknown + fields are added, missing ones are never deleted, a setter-only accessor is + called, nested values keep `__proto__` keys, a `Date` comes back as a + string, and a sync subscriber is notified once per field. Stage 2 defect + 15. +- **Reports.** Security 7, Zustand and Jotai 7. +- **Proposals.** Apply the state with the function `withHistory` uses: only + keys that are data on the store, delete data fields the state lacks, clone + with the strip of M52, and skip every accessor (security 7). Wrap the jump + in `batch()`, and keep a current value that JSON cannot carry, such as a + `Date` (Zustand and Jotai 7). +- **Evidence.** The security reproduction, and Zustand port 5 through a fake + extension. +- **Kind and API.** Bug and hardening. No API change. + +#### M57. `devtools`: action names, messages, options and `enabled` + +- **Problem.** Every entry is named `STORE_UPDATE`. `RESET`, `COMMIT`, + `ROLLBACK` and `IMPORT_STATE` are ignored. Only `name` reaches the + extension's `connect()`. `enabled` defaults to `true` everywhere. The + payload is the snapshot, so every getter is run and sent (M33). +- **Reports.** Valtio V9, Zustand and Jotai 6 and 7, security 7. +- **Proposals.** + - Name an entry after the outermost store method, through a small hook in + `transactional()` (Valtio V9, Zustand and Jotai 6). The latter adds: + send on the synchronous channel, one entry per outermost transaction. + - Handle `RESET`, `COMMIT` and `ROLLBACK`, and pass the remaining options + to `connect()` (Valtio V9, Zustand and Jotai 7). + - Conflict on `enabled`. Require it, or default it from + `process.env.NODE_ENV` (Valtio V9). Tie it to the environment, or leave + it (Zustand and Jotai 7). Keep `true`, because the library has no + portable way to detect production, and document that the extension + receives every state (security 7). +- **Evidence.** Valtio V9 was read only. Zustand port 5 was run. +- **Kind and API.** API design. Changing the default of `enabled` is + breaking and documented (the options table in `DEVTOOLS_TUTORIAL.md`). The + rest is additive. The action-name hook sits on the method-call path of the + core. + +### `history` and `subscribeKey` + +#### M58. An edit made in the same tick as `undo()` or `redo()` is not recorded + +- **Problem.** After `history.undo(); store.value = 9;` with no flush + between, `canRedo` stays true and `redo()` discards the 9. The `restoring` + counter causes it and may be redundant: removing it leaves every other test + green. Stage 1 findings 57 and 58, and the `history.ts` items of 59. +- **Reports.** None. Zustand and Jotai have no history. +- **Proposals.** None from stage 2. +- **Evidence.** Pinned in `history.sameTick.test.ts`. +- **Kind and API.** Bug. No stage 2 counterpart. + +#### M59. `withHistory` treats a function held in an own field as behaviour + +- **Problem.** Undo neither removes a function that was added nor restores + one that was replaced. Stage 1 finding 60. +- **Reports.** None. +- **Proposals.** None from stage 2. It should be decided with M1, which + makes some stored functions plain data. +- **Evidence.** Pinned by a stage 1 test. +- **Kind and API.** API design. No stage 2 counterpart. + +#### M60. Undo replaces every row of a changed list + +- **Problem.** `withHistory` restores by top-level key and replaces a + changed branch with a deep clone. After undoing an edit to one row of + three, every row is a new object, every row component renders again, and a + row proxy held by the caller is detached. +- **Reports.** Solid 11. Security 7 wants `devtools` to use the same apply + function (M56). +- **Proposals.** A recursive apply: go down while both sides are containers + of the same kind, and write only the leaves that differ. Matching reordered + rows by key could follow. +- **Evidence.** Solid port 10. Not sketched. +- **Kind and API.** Performance. Solid 11 says it can follow 1.0 unless a + public `reconcile` is wanted. The reference says "changed fields are + replaced with mutable copies". + +#### M61. `subscribeKey` takes a snapshot of the whole store on every notification + +- **Problem.** With `subscribeKey(store, 'count', …, {sync: true})` on a + store with 1,000 rows, each row write costs 122 microseconds, against 1.0 + for a plain sync subscriber. +- **Reports.** Valtio V8. +- **Proposals.** Read the live value. If it is a store node, compare the + node and its version, and take a snapshot of that node only when one of + them changed; otherwise compare with `Object.is`. A key that is a getter + keeps today's path. +- **Evidence.** Valtio's timing. Not sketched. +- **Kind and API.** Performance. No API change: the callback still receives + snapshot values. + +#### M62. `subscribeKey` takes a top-level key only + +- **Problem.** It cannot watch a derived value or a nested field, and it has + no equality option and no immediate first call. +- **Reports.** Zustand and Jotai 8. +- **Proposals.** Accept a selector as well as a key, with `equalityFn` and + `fireImmediately`. Say in the reference that the callback of `subscribe` + receives no arguments, since a Zustand user expects `(state, prev)`. +- **Evidence.** Zustand port 6b. +- **Kind and API.** API design. Additive if the key form stays. The name of + the equality option should follow M71. + +### Adapters + +#### M63. Every adapter builds a snapshot on each sync notification + +- **Problem.** A sync subscriber is notified once per direct write, and each + adapter takes a snapshot in its listener. A loop of 2,000 direct row writes + takes 626 to 764 milliseconds with any adapter attached, against 1 to 3 + with none. Stage 2 defect 8. +- **Reports.** Adapters A1. Immer 1 sets the floor (M35). +- **Proposals.** Build the snapshot at the read where the framework allows + it: a `customRef` in Vue, a version signal read by a `computed` in Angular, + the same with `createMemo` in Solid. React and Svelte must hand the value + over when notified, so for them it is M35, and naming `batch()` beside the + sync timing in each guide. Adapters Q8 adds a development warning when a + sync listener sees many notifications in one task. +- **Evidence.** Measured: 2.2 milliseconds with the Vue sketch, 8.2 with the + Angular sketch including the read, and 2.0 to 2.6 with the writes inside + `batch()`. The Solid form was not measured. +- **Kind and API.** Performance. No API change. The timing tests in each + adapter suite pin when the value is current. + +#### M64. The Vue adapter leaks one subscription per server render + +- **Problem.** Vue does not dispose component scopes during a server render, + so a module-level store gains one listener per request, and each one builds + a snapshot on every later write. Stage 2 defect 9. +- **Reports.** Adapters V1. +- **Proposals.** Subscribe in `onMounted` when called inside a component + that is not mounted, and at once otherwise. Refresh the value once on + subscribe. Say in `VUE.md` what a server render does. +- **Evidence.** A sketch run on the server (0 listeners after three renders) + and on the client. +- **Kind and API.** Bug. No API change. + +#### M65. The Vue adapter returns a writable ref + +- **Problem.** `state.value = {count: 99}` compiles and runs: the ref shows + 99 while the store holds 0. Stage 1 finding 17. +- **Reports.** Adapters V2, Vue 11. +- **Proposals.** Type it `Readonly>>` (adapters V2). Vue 11 + names `Readonly>`, which adapters V2 calls more exact but + did not check against Vue 3.2.0, the floor of the peer range. A runtime + `readonly()` in development is optional. +- **Evidence.** Adapters V2 checked the `Ref` form with `tsc` against + `unref`, `toValue`, `watch` and `computed`. +- **Kind and API.** Types. It changes a documented return type: the + reference says "Vue returns a `Ref>`". Breaking only for code + that writes the ref. + +#### M66. The Angular adapter drops a store write made inside a `computed` + +- **Problem.** The listener calls `signal.set()` in a reactive context. + Angular throws, the core logs it, and the signal stays stale until the next + write. Stage 2 defect 10. +- **Reports.** Adapters N1. +- **Proposals.** `untracked(() => state.set(...))`. +- **Evidence.** Run, with a bare signal and with a sketch adapter. +- **Kind and API.** Bug. No API change. + +#### M67. The Angular adapter has no `injector` option + +- **Problem.** Called from `ngOnInit` or an event handler, the error is + Angular's NG0203 and names `DestroyRef`, not our function. The only way + round is `runInInjectionContext`. Stage 2 defect 11. +- **Reports.** Adapters N2. +- **Proposals.** `injectClassyStore(store, {injector?})`, an assertion that + names the caller when no injector is given, as `toSignal` has, and the + package prefix on the message. +- **Evidence.** Both messages were verified, and a sketch run. +- **Kind and API.** API design and diagnostics. Additive. It settles the + signature, which is documented as `injectClassyStore(store)`. + +#### M68. Adapter and entry names + +- **Problem.** API question 7. Names follow each framework's idiom except + in Solid, where `use*` means a context lookup. +- **Reports.** Adapters Q7, and question 7 in the Solid, Svelte, Vue and + Zustand and Jotai reports. +- **Proposals.** Keep the entry points. Rename the Solid adapter to + `fromClassyStore`, after Solid 2's `from()`, which it reproduces (adapters + Q7). Keep `useClassyStore` for React and Vue, `toSvelteStore` and + `injectClassyStore`. +- **Conflict, a mild one.** The Solid report does not ask for a rename. It + says `useClassyStore` returns an accessor, "which is what a Solid user + expects to get", and calls its naming observations "none strong". +- **Evidence.** Adapters O1 verified that the adapter matches + `createMemo(() => from(subscribe))` in values, timing and cleanup. +- **Kind and API.** API design. The rename is breaking and documented. + +#### M69. Svelte 5 runes + +- **Problem.** `$snap` is a compile error in a `.svelte.ts` module, where + Svelte 5 users keep shared logic. +- **Reports.** Adapters S2. +- **Proposals.** Keep `toSvelteStore`, the only shape that works on Svelte 4 + and 5, and document `fromStore(toSvelteStore(store))` for runes modules. A + rune-native helper built on `createSubscriber` needs a separate entry or + dropping Svelte 4. It would also avoid M63 for Svelte. +- **Evidence.** Both bindings were run. +- **Kind and API.** Docs now. A new entry later would be additive. + +#### M70. React hydration needs `prepareStoreForHydration` + +- **Problem.** A store written between the server render and hydration, for + example by a `persist` restore, raises React's hydration error unless + `prepareStoreForHydration` was called. Zustand needs no call. Stage 2 + defect 21. +- **Reports.** Zustand and Jotai 1, and its names table. +- **Proposals.** Capture the initial snapshot without being asked: in + `createClassyStore`, or lazily just before the first write. Keep + `prepareStoreForHydration` for a store that was changed before it reached + React. The report names two risks: a retained snapshot keeps old objects + alive, and a write through a raw reference bypasses a first-write hook. +- **Evidence.** Zustand port 3 in happy-dom, not a browser. Neither variant + is prototyped. +- **Kind and API.** API design. Not breaking. It changes documented + behaviour ("Client-only apps need no preparation") and moves hydration + state from the React folder into the core. + +#### M71. The equality option is called `isEqual` + +- **Problem.** Zustand and Jotai name every equivalent `equalityFn`. +- **Reports.** Zustand and Jotai 2. +- **Proposals.** Rename the option to `equalityFn`. Keep `shallowEqual` and + the hook with no selector, which the report calls the best of the three. +- **Evidence.** Zustand port 1 for the hook's behaviour. The name is + reading. +- **Kind and API.** API design. Breaking and documented + (`UseClassyStoreSelectorOptions`). + +### Diagnostics and a development build + +#### M72. How a development build is split, and its rules + +- **Problem.** There is one build with no development branch, and nothing in + the source reads `NODE_ENV`. Every silent failure stays silent. API + question 8. +- **Reports.** MobX 7, Solid 8 and 9, Svelte 11, and question 8 in the + Signals, Vue, Valtio, Legend-State, Immer and Zustand and Jotai reports. +- **Proposals.** + - The mechanism. (a) Export conditions and a build-time flag. Production + stays byte for byte what it is. It costs a second build per format, and + diagnostics are invisible wherever `development` is not set (Solid 9 + prefers it; Svelte does it). (b) `process.env.NODE_ENV !== 'production'` + guards in one build, removed by the consumer's bundler. One artifact, + and diagnostics are on by default in tests and scripts. The bytes stay + for a consumer whose bundler does not replace the expression (MobX, + Legend-State, Immer and Zustand work this way). Svelte 11 says that what + it proposes is cheap enough to need neither. + - Conflict on what development may do. Keep every thrown error and its + text the same in both builds, and only warn in development (MobX 7, + Signals Q8). Against that, Immer 4 proposes an error thrown in + development only. + - Codes. One stable string code per diagnostic, a `[CODE]` prefix, and a + warning once per object and key (Solid 8, Svelte 11). MobX 7 says + numbered codes are not worth having at our size. +- **Evidence.** Solid 9 verified which build Node resolves. No size was + measured for either shape, and no bundler other than Node was checked. +- **Kind and API.** Diagnostics. Not breaking. (a) adds export conditions to + `package.json`. (b) needs the size script to measure with the replacement + applied. + +#### M73. Which diagnostics + +- **Problem.** The reports name sixteen candidates and four tools. Each + serves an entry above. +- **Reports and proposals.** + + | Diagnostic | Proposed by | Serves | + | -------------------------------------------------------------------------------- | ---------------------------------------------------- | ------------- | + | A class instance without `PROXYABLE` placed in a store | Vue Q8 | M11 | + | A native `Map` or `Set` placed in a store | Vue 10, MobX Q5 | M38 | + | An own arrow-function field on a class instance, at creation | MobX 8 | M12 | + | A write that went around the proxy, found per call | Solid 8 | M12 | + | A write inside a getter | MobX 6, Solid 8, Signals 7; Svelte 11 wants an error | M26 | + | A delivery loop that does not settle | MobX 5, Svelte 11, Vue 9, Signals 8 | M28 | + | `batch()` was given a promise | Legend-State 3, Solid 8 | M30 | + | Many sync notifications in one task | Adapters Q8 | M32, M63 | + | A write outside a transaction to an observed store, opt-in | MobX 6 | M32 | + | A getter that recorded no dependency, opt-in | MobX Q8 | M21 | + | A named property written to an array | Immer 4 | M37 | + | Both forms of one object in a collection | Vue Q8 | M39 | + | A mutator called on a snapshot of a collection: a named error in every build | Valtio V10, Immer 8 | M42 | + | `persist`: an unreadable record, a bad `properties` entry: errors in every build | Security Q8, Zustand and Jotai Q8 | M44, M45 | + | `syncTabs` with an adapter that is not `localStorage` | Security Q8 | M53 | + | A malformed DevTools message, or a key the store does not have | Security Q8 | M56 | + | Tool: a supported way to count listeners in tests | MobX Q8, adapters (its stage 1 table) | Test suites | + | Tool: the paths a component tracked, through `useDebugValue` | Valtio Q8 | React binding | + | Tool: hooks that say which write caused a notification or a recompute | Vue Q8 | Core | + | Tool: one replaceable function for reporting a subscriber's error | Legend-State 1 | M28 | + +- **Evidence.** None is sketched. +- **Kind and API.** Diagnostics. The four tools would be new public or + half-public surface. Everything marked "in every build" does not need M72. + +### Security and the release workflow + +#### M74. The release job gives every installed dependency the npm publishing identity + +- **Problem.** One job holds `id-token: write`, then runs `bun install`, the + build and Changesets before `npm publish`. Actions are pinned by major + tag. Stage 2 defect 17. +- **Reports.** Security 12. +- **Proposals.** Six steps: a publish-only job that holds the token and + installs nothing; a GitHub environment with the owner as required + reviewer; actions pinned by commit; `persist-credentials: false` where + nothing is pushed; `permissions: contents: read` on the three workflows + that declare none; npm set to refuse publishing with a token. The + environment and the npm settings are outside the repository and only the + owner can do them. +- **Evidence.** `release.yml` was read by the security agent and by the + orchestrating agent. That code in the job can take the token comes from + how GitHub and npm document the mechanism; nobody tried it. +- **Kind and API.** Hardening. No library code. + +#### M75. Dependencies and the published tarball + +- **Problem.** `proxy-compare` 3.0.1 is the one runtime dependency, with one + maintainer, and is pinned exactly. `bun audit` reports 17 advisories in + development dependencies, none of which reaches the tarball. +- **Reports.** Security 10, 11 and 13. +- **Proposals.** Keep the exact pin and say why in `CONTRIBUTING.md`. Update + within ranges at the next dependency refresh, and add a `bun audit` step + that reports without failing. Accept the tarball as it is. +- **Evidence.** Registry metadata, `bun audit`, and a listing of the packed + 0.11.0 tarball. +- **Kind and API.** Hardening and docs. Nothing a consumer sees. + +### Documentation only + +#### M76. Documentation changes that no report disputes + +- **Problem.** Limits and defaults that the docs do not state. +- **Reports and proposals.** + - "Frozen objects are values" needs the whole value frozen. The mutable + contents of a shallowly frozen object are shared with every snapshot + (Immer 7). + - An unmarked class instance is shared between the store and every + snapshot (Valtio V12). + - A `#private` field is never state (Svelte 1, MobX 8, Vue Q4). + - The object passed to `createClassyStore` is the store. A Solid user + expects it to stay untouched, so say it in the Solid guide (Solid 12). + - `subscribe()` is batched by default, and its callback receives no + arguments. Say both at the top of the reference (Zustand and Jotai Q1 + and 8). + - Name `batch()` beside the sync timing in each adapter guide (adapters + A1). + - The Svelte guide names its store `state`, which conflicts with the + `$state` rune. Rename it `snap` (adapters S1). + - `persist`: recipes for AsyncStorage, IndexedDB and an encrypting wrapper + (Legend-State 7); a transform each for `Date`, `Map` and `Set` + (Legend-State 8); unknown stored keys are ignored and removed at the + next save (Legend-State 11); stored data is untrusted input and `merge` + is the place to validate it (security 9); a record with no version + counts as version 0 (Zustand and Jotai 3). + - `devtools`: the extension receives every state, so secrets do not belong + in a store with DevTools enabled outside development (security 7). +- **Evidence.** Each is read from a report. I did not check each against the + tutorials. +- **Kind and API.** Docs. + +#### M77. Limits that other libraries share, with no proposal + +- **Problem.** Stage 1 findings that the reports confirm and do not propose + to change. +- **Reports and proposals.** + - A write through the raw object is invisible until the next proxied write + to that node (stage 1 finding 11). Valtio, Vue and Solid are the same. + The tutorial documents it. + - A subscription follows the object, not the property (26). The reference + documents it. MobX's `observe` and Valtio do the same. + - An object returned by a getter is not protected (40). MobX, Vue, Svelte + and the signal libraries are the same. The reference documents it. + - `Object.getOwnPropertyDescriptor(store, key).value` is the raw object + (50). Vue, Solid and Immer are the same. + - `structuredClone(store)` throws (51). Vue and Solid are the same. + - A write past the end of a typed-array store notifies and stores nothing + (63). Vue, Solid and Svelte leave a typed array unwrapped; our root is + always wrapped. +- **Evidence.** The tables of stage 1 counterparts in each report. +- **Kind and API.** Docs, or "unspecified" in the decision document's list + of pinned behaviour. + +## All 73 stage 1 findings + +"None" means no stage 2 report has a counterpart. A second entry in brackets +is one the finding bears on without being its subject. + +| Stage 1 | What it is | Entry | +| ------: | ------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | +| 1 | `Object.defineProperty` on a store is silent | M2 | +| 2 | A snapshot after one row changed costs time per row | M35 (M63) | +| 3 | A getter that sums 1,000 rows costs 200 nanoseconds per row to recompute | M20 (M10) | +| 4 | Two traps of the React snapshot cache cannot be reached | None | +| 5 | A function read from an array is a new wrapper on every read | M1 | +| 6 | A class held in a store comes back as a bound wrapper | M1 | +| 7 | `list.includes(raw)` misses an object that is in the list | M5 (M6, M10) | +| 8 | A store that refers to itself can be written but not read | M36 | +| 9 | A store placed in another store by its raw object is not connected | M6 | +| 10 | Raw objects end up holding proxies | M6 | +| 11 | A write through the raw object is invisible until the next proxied write | M77 (M17, M18) | +| 12 | A native `Set` or `Map` in a store holds raw members | M38 | +| 13 | A getter on a self-referring store recomputes on every write | M36, which has no proposal for it | +| 14 | `Snapshot` turns a tuple into an array | M41 | +| 15 | The backing arrays of the reactive collections are public | M43 | +| 16 | A snapshot of a reactive collection keeps its mutators in the type | M42 | +| 17 | The Vue adapter returns a writable ref | M65 | +| 18 | A sync subscriber that writes recurses until the stack overflows | M28 | +| 19 | A batched subscriber that writes is served again with no bound | M28 | +| 20 | A subscriber removed during delivery is still called once | M28 | +| 21 | A subscriber added after a write sometimes hears that write | M28 | +| 22 | A re-entrant write delivers the same snapshot twice | M28 | +| 23 | A subscriber that returns a rejected promise is not reported | M28, which has no proposal for it | +| 24 | Owners are notified level by level, not from the inside out | M16 | +| 25 | A raw object changed while out of the store shows old content when back | M17 | +| 26 | A subscription follows the object, not the property | M77 | +| 27 | Four things keep memory alive longer than expected | M15 | +| 28 | Suspending a detached subtree has no public effect (corrected by 72) | M14 | +| 29 | A delete that removes nothing counts as a write | M4 | +| 30 | A live getter that reads `Object.keys(this)` or `in` goes stale | M3 | +| 31 | The same getter on a snapshot sees no keys at all | M34 (M33) | +| 32 | A live getter that reads a missing property is recomputed on every read | M23 | +| 33 | `+0` and `-0` are two members when added and one when constructed | M39 | +| 34 | A collection constructed from one object in two forms holds it twice | M39 (M6) | +| 35 | A snapshot given as a map key is stored frozen, yet answers for the row | None. No report looks at it; it sits beside M39 | +| 36 | A getter misses some of what it reads, and stays stale | M21 for another node; M22 for a caught error | +| 37 | The snapshot getter layer loses nested memoization | M24 | +| 38 | A getter cycle on a snapshot overflows the stack | M25 | +| 39 | A getter that writes behaves differently on each layer | M26 | +| 40 | An object returned by a getter is not protected | M77 | +| 41 | Inside a snapshot getter, `this` is a tracking proxy over an empty object | M34 | +| 42 | `constructor` read through a store is a bound wrapper | M1 | +| 43 | A setter is not a transaction | M29 | +| 44 | A redefined getter keeps the old result | M2, which has no proposal for it (M9 assumes it stays unhandled) | +| 45 | `Object.defineProperty` breaks more than notification | M2 | +| 46 | Freezing a raw object behind the store makes reads throw | M7 | +| 47 | A cached getter survives a prototype change | M8 (M9) | +| 48 | `Object.assign` with a parsed `__proto__` key swaps the prototype | M8; settled for `persist` by security 1 (M44) | +| 49 | Snapshots can be incomplete or mutable at the edges | M37; the read-only field is M7 | +| 50 | A descriptor's `value` is the raw object | M77 | +| 51 | `structuredClone(store)` throws | M77 | +| 52 | A getter named in `properties` is saved, and restoring fails part-way | M44, M51 | +| 53 | An array as the stored `state` passes the envelope check | M45 | +| 54 | Dead or redundant code in `persist.ts` | M54 | +| 55 | A malformed entry in `properties` is ignored without an error | M44 | +| 56 | When a debounced save runs relative to a read | M48 (M50) | +| 57 | An edit made in the same tick as `undo()` or `redo()` is not recorded | M58, which has no stage 2 counterpart | +| 58 | The `restoring` counter in `history.ts` may be redundant | M58, which has no stage 2 counterpart | +| 59 | Dead or redundant code in `equality.ts`, `history.ts`, `collections.ts` | None. It is for stage 3's own code review; the `history.ts` items sit with M58 | +| 60 | `withHistory` treats a function in an own field as behaviour | M59, which has no stage 2 counterpart | +| 61 | The `defineProperty` trap does not resume a suspended subtree | M14, M2 | +| 62 | A store made from a function is not treated as a store by other stores | M1 | +| 63 | A write past the end of a typed-array store notifies and stores nothing | M77 | +| 64 | Dead or redundant code in `core.ts` | First item: M22 makes it reachable. Third item: M14. Second item (`activeTracker`): none | +| 65 | Five mutants in `core.ts` are caught only through finding 61 | M14 | +| 66 | A read that never returns | M14, M2 | +| 67 | The same cause in a milder form: a snapshot stale once | M14, M2 | +| 68 | Without `WeakRef`, a held row keeps its removed list alive | M14 | +| 69 | The order in which owners are notified depends on hidden state | M16 | +| 70 | A snapshot lists every data field before any own getter | M33 | +| 71 | An array element redefined to a primitive disagrees with its snapshot | M2 | +| 72 | What suspending and resuming a detached subtree can be seen to do | M14 | +| 73 | Dead or redundant code in `ownership.ts` and `snapshot.ts` | `ownership.ts`: M14. `snapshot.ts`: none | + +## Every stage 2 finding + +One table per report. "No change proposed" marks a finding whose report asks +for nothing, usually because ours is already the better behaviour. + +### `valtio.md` + +| Finding | What it says | Entry | +| -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ | +| V1 | Valtio has no weak links, no suspend and resume, no detached-parent pointer, and returns from the read that hangs ours. Remove the pointer and the walk; choose one mechanism against retained rows | M14 | +| V1 (new) | A subscription on a container that left the store stops after a garbage collection | M15 | +| V2 | A stored function is returned as it is. Wrap only what is found on a prototype; a class is data | M1 | +| V3 | A cycle can be snapshotted: return the unfinished snapshot for a repeat visit, or throw at the write | M36 | +| V4 | Snapshot getters stay on the prototype. One derived prototype per class with non-enumerable memoizing accessors | M33 | +| V5 | `this` in a snapshot getter: proxy the frozen snapshot with `get`, `has`, `ownKeys`; add `has` and `ownKeys` to the store | M3, M34 | +| V6 | A flag per subscription fixes finding 20; queue listeners, not nodes, for 21. Keep our error isolation | M28 | +| V7 | Reject a `sync` option on hooks; run a setter inside a transaction | M29, M31 | +| V8 | `subscribeKey` snapshots the whole store per notification: 122 microseconds per row write against 1.0. Compare the live value and node version | M61 | +| V9 | `devtools`: `enabled` default, options passed to `connect`, action names from the method, `COMMIT` | M57 | +| V10 | Collections: per-snapshot index for lookups, one membership rule, a snapshot type without mutators and a named error | M40, M39, M42 | +| V11 | `Snapshot` turns a tuple into an array; delete the array branch | M41 | +| V12 | Keep opt-in and frozen snapshots; a `ref()`-like marker can follow 1.0; document that an unmarked class instance is shared with every snapshot | M11 | +| V13 | Keep: the registry of tracking proxies, the work list at creation, `createClassyStore(store) === store`, a throwing getter or subscriber does not poison | no change proposed | +| Q8 | Show the paths a component tracked through `useDebugValue` | M73 | + +### `mobx.md` + +| Finding | What it says | Entry | +| ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------- | +| 1 | A getter records only reads on its own node. Record a dependency on the version of any other node read, once per node per run | M21 | +| 2 | An inner getter that throws leaves no dependency. Record it in a `finally`; caching the error with its dependencies is optional | M22 | +| 3 | Every read re-walks the dependency lists. Step 1: validate a nested getter by reading it and comparing the value. Step 2: a module-level write counter stamped on each entry | M18 | +| 4 | A setter is not a transaction; wrap the accessor branch of the `set` trap | M29 | +| 5 | Delivery: one loop, 100 rounds, check registration at the call, each subscription keeps the version it last saw | M28 | +| 6 | MobX warns on a write outside an action. For us: opt-in development check, and an always-on development warning for a write inside a getter | M32, M26 | +| 7 | A development build: one constant resolved once; warn only; thrown errors the same in both builds; no numbered codes | M72 | +| 8 | Arrow methods and `#private` work when the proxy exists before fields are initialised: a base class whose constructor returns the proxy. Or a development warning | M12 | +| 9 | Functions as data: cache wrappers per function, never wrap `constructor`, treat a frozen function as a value | M1 | +| 10 | `has` and `ownKeys` traps with a key counter; a read of a missing key records that it was missing; data descriptor as a write; consider refusing `Object.freeze(store)` | M3, M23, M2, M2 | +| 11a | A delete that removes nothing: check `Object.hasOwn` first | M4 | +| 11b | A getter cycle on a snapshot: a marker per snapshot and key, and the live layer's message | M25 | +| 12 | Reject: dropping an unobserved getter's cache, copying plain objects in, annotations, subclass rules. Per-prototype work supports the descriptor cache | no change proposed; M9 | +| Q5 | A development warning when a native `Map` or `Set` is assigned into a store | M38, M73 | +| Q8 | Opt-in warning for a getter that recorded no dependency; an error for an in-place `sort` inside a getter; a supported way to count listeners in tests | M73 | + +### `vue-reactivity.md` + +| Finding | What it says | Entry | +| ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ | +| 1 | `has` and `ownKeys` traps with two new dependency kinds; the snapshot tracker targets the frozen snapshot. Sketch A fixed 29 and 30 live; on a snapshot it is tied to API question 3 | M3, M34, M33 | +| 2 | `includes`, `indexOf`, `lastIndexOf` should compare by `identityOf` | M5 | +| 3 | Store raw values on write and find a node by the raw object. Sketch B fixed 5, 6, 7, 9, 10 and 42 with finding 4 | M6 | +| 4 | A function is a value unless it is a method: return array elements, `constructor` and classes as they are | M1 | +| 5 | A delete that removes nothing: check `Object.hasOwn` first | M4 | +| 6 | After any define the store must agree with the target: a data define is a write, an accessor define removes the child | M2 | +| 7 | Run read-only array methods on the raw array and hand out proxies. Not sketched; gain expected from Vue's numbers | M10 | +| 8 | Record a nested getter before it runs; record whether a key was present; record another node's version; the snapshot cycle should throw the live message | M22, M23, M21, M25 | +| 9 | Skip a removed listener; for re-entry either skip a running listener or count depth and throw; a bound in development | M28 | +| 10 | Keep `reactiveMap` and `reactiveSet`; `+0` and `-0` one member; constructors remove duplicates by identity; warn on a native collection; decide whether "kept by reference" is contract | M38, M39, M73 | +| 11 | Drop the array case from `Snapshot`; snapshot types of collections without mutators; type the Vue ref `Readonly>` | M41, M42, M65 | +| Keep | Freezing through the proxy, a read-only property that holds an object, sealed objects stay reactive, transactions, the prototype setter check, the cycle message | no change proposed | +| Q6 | Opt-out would need a marker kept in a `WeakSet`, and fails on snapshots of classes with `#private` fields | M11 | +| Q8 | Warn for a class instance without `PROXYABLE` and for both forms of one object in a collection; `onTrack` and `onTrigger`-style hooks | M73 | + +### `solid.md` + +| Finding | What it says | Entry | +| -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------- | +| 1 | Solid has no per-prototype getter cache. One shaped for us (own key by `hasOwnProperty` and an own-accessor flag, inherited key from a table per prototype) cut a field read 18% on Node, 53% on Bun | M9 | +| 2 | Solid's class getters go stale over nested data. Keep ours | no change proposed | +| 3 | Functions are never wrapped. Wrap inherited functions and own functions of non-array objects; return array elements, classes and `constructor` untouched | M1 | +| 4 | Class instances wrap by default. Adopt the default, cache the verdict per prototype, keep freezing and one marker as ways out | M11 | +| 5 | The proxy target is an empty shell. Reject for 1.0; document that the raw object must not be frozen or redefined behind the store | M7 | +| 6 | `has`, `ownKeys` and descriptor reads tracked; on the snapshot tracker add `has`, `ownKeys`, `getOwnPropertyDescriptor`, `getPrototypeOf` | M3, M34 | +| 7 | `defineProperty` follows the steps of `set`: resume first, link or detach, drop the cached method, notify; silent when nothing a snapshot shows changed | M2 | +| 8 | Diagnostics with a `[CODE]` prefix, once per object and key. Candidates: `batch()` got a promise, a write around the proxy, a write inside a getter, a subscriber that keeps writing | M72, M73, M30, M12, M26 | +| 9 | Splitting the build: A, export conditions and a build-time flag; B, `NODE_ENV` guards in one build. Prefers A | M72 | +| 10 | Reject Solid's unfrozen `snapshot`; take cycle handling: a map from target to the snapshot under construction | M36 | +| 11 | `reconcile`: after one undo every row is a new object. A recursive apply in the utilities that writes only leaves that differ | M60 | +| 12 | Reject copy-on-write; a paragraph in the Solid guide that the object passed in is the store | M76 | +| Table 48 | Solid ignores `__proto__` as a written key and refuses `setPrototypeOf` | M8 | +| Q7 | `snapshot` means two things to a Solid user; a Solid user expects per-property updates | M68 | + +### `svelte.md` + +| Finding | What it says | Entry | +| ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ | +| 1 | A class instance is never wrapped. For us: an optional base class whose constructor returns the store; document that a `#private` field is never state | M12 | +| 2 | A `defineProperty` with a plain value is a write. Spike, 24 lines added and 9 removed, fixed 1, 45, 66 and 71. Do not refuse other descriptors | M2 | +| 3 | A function is returned as it is; same proposal as Vue 4 | M1 | +| 4 | Adopt Vue's split for `has` and `ownKeys`; do not track descriptor reads; a `present` flag on a value dependency fixes finding 32 in 7 lines | M3, M23 | +| 5 | A delete of a missing key is no write. Spiked | M4 | +| 6 | Svelte only warns for `includes(raw)`. Reject that, adopt Vue's fix | M5 | +| 7 | Keep "frozen objects are values". Consider a 9-line guard in `get` for a raw object frozen behind the store; it is free only while `get` looks the descriptor up | M7 | +| 8 | Keep array-backed collections; native equality at the edges; consider an index beside the array (17 nanoseconds against 45 microseconds); backing arrays are public | M38, M39, M40, M43 | +| 9 | A cycle is not an error. Spike, 13 lines added and 9 removed, snapshots cycles; `persist`, `devtools`, `withHistory` and tracked reads not tried. Or throw at the write | M36 | +| 10 | Wrap a setter in a transaction (spiked, 6 lines). Reject opt-in memoization | M29 | +| 11 | A bound on delivery with a named error in every build; an error for a write while a getter computes; stable codes; export conditions only if checks get slow | M28, M26, M72, M73 | +| Keep | One proxy per object, the raw object stays current, frozen values, identity in collections, snapshots of class instances, bound methods, memoized getters, null-prototype objects are state | no change proposed | + +### `signals.md` + +| Finding | What it says | Entry | +| ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----- | +| 1 | A clean read of a diamond of getters doubles per level. A stamp on each cache entry, the node's own version taken before the body runs, makes it constant. Spike `spike-stamp` | M18 | +| 2 | Revalidate a nested getter by refreshing it and comparing its value and, when the value is a store node, that node's version. Corrects MobX 3 step 1. Spikes `spike-refresh`, `spike-one` | M19 | +| 3 | A getter that reads the same field in a loop records it once per read: 2,000 entries for 1,000 rows. Record a property once per run | M20 | +| 4 | Record the dependency on a nested getter in a `finally`. If errors are cached, never cache one that recorded no dependency | M22 | +| 5 | Keep the live cycle message; give the snapshot layer the same check | M25 | +| 6 | The cause of stage 1 finding 37 is one line: re-read the memo map after the computation. Spike `spike-memo` | M24 | +| 7 | A getter that writes: a development warning only, not an error | M26 | +| 8 | Preact confirms MobX's delivery model. Keep `console.error` for a subscriber's error; the loop error should name the store | M28 | +| 9 | Keep `batch()`; reject skipping the notification when a value is set and set back | M30 | +| Section | The three kinds of getter dependency can become one `{value, version}` entry. Spike `spike-one`, about 150 lines; a write then a read gets slower, 300 nanoseconds against 206 | M27 | +| Q8 | If a development build is added, keep the error text in production and drop only the extra checks | M72 | + +### `immer.md` + +| Finding | What it says | Entry | +| ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ | +| 1 | A snapshot after one of 1,000 rows changed costs the same in Immer while it freezes. Record changed keys per node and rebuild an array from the previous snapshot: floor 6 microseconds against 56 on Node; on Bun freezing alone is about 96 | M35 | +| 2 | A decoy Proxy target keeps the user's object out of Proxy invariants. A design question, not a 1.0 blocker; the smaller alternative is a documented limit | M7 | +| 3 | Refuse `defineProperty` when the descriptor carries `value`, `get` or `set`, keep `Object.freeze(store)`; add a `setPrototypeOf` trap that throws | M2, M8 | +| 4 | Arrays carry indices and `length` only: a development error for a named property written to an array, and document it | M37 | +| 5 | A delete that removes nothing is not a change | M4 | +| 6 | A plain object from another realm is opaque to us. Accept it as plain, with a check cached per constructor | M13 | +| 7 | Document that "frozen objects are values" needs the whole value frozen: a shallowly frozen object's mutable contents are shared with every snapshot | M76 | +| 8 | Mutators on a snapshot of a collection should throw a named error; `Snapshot` should map the collections to read-only interfaces | M42 | +| 9 | Map and Set drafts are subclasses of the native classes. No change for 1.0; the live side could extend the native class | M38 | +| 10 | Tuples survive Immer's types: remove the array branch | M41 | +| 11 | Immer's cycle handling is a silent stale reference. Reject; support cycles in the snapshot or raise the error at the write | M36 | +| Q3 | A result is data; computed values live on the class. One derived prototype per class | M33 | +| Keep | Own getters stay memoized accessors, symbols and non-enumerable properties are kept and frozen, the caller's objects are never frozen, the root may be any class instance | no change proposed | + +### `legend-state.md` + +| Finding | What it says | Entry | +| ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | +| 1 | Keep `deliver()` and `console.error` for a listener's error. Optional: route the error through one replaceable reporter | M28, M73 | +| 2 | Legend 3 does not notify a write undone inside a batch. Reject: the version has moved and a binding compares snapshot identity | M30 | +| 3 | `batch()` with an `async` function groups only the writes before the first `await` and returns the promise. A development warning for a thenable, or a type that refuses one | M30 | +| 4 | Hydration is synchronous in Legend and always a microtask late in ours, even on `localStorage`. An option such as `hydrate: 'sync'`, decided with `skipHydration` | M48 | +| 5 | A debounced save is lost when the tab closes. Flush on `pagehide` and on `visibilitychange` to hidden | M50 | +| 6 | Legend tags a restore's writes with a flag. Reject; simplify the version bookkeeping inside `persist.ts` instead | M54 | +| 7 | Keep the three-method storage contract; add recipes for AsyncStorage, IndexedDB and an encrypting wrapper | M76 | +| 8 | Legend revives `Date`, `Map` and `Set` from tagged JSON. Reject the tag format; document a transform for each, optionally export the three | M76 | +| 9 | A pause switch and an in-flight flag. Reject for now; both are additive later | M55 | +| 10 | Say in the tutorial that two tabs editing different fields is last writer wins on the whole record. Reject remote sync | M76 | +| 11 | Unknown stored keys are dropped in ours. Keep, and say so in the docs | M76 | +| Options | `expireIn` and `clearOnExpire` are two options for one concept; consider throwing on a `properties` entry that is neither a key nor a complete transform | M46, M44 | + +### `zustand-jotai.md` + +| Finding | What it says | Entry | +| ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------ | +| 1 | A store written between the server render and hydration raises React's hydration error unless `prepareStoreForHydration` was called. Capture the initial snapshot automatically | M70 | +| 2 | Keep the no-selector hook. Rename the `isEqual` option to `equalityFn`, the name both libraries use | M71 | +| 3 | `persist` is silent on a version mismatch with no `migrate` and on an `async` `migrate`. Report through `onError`; await `migrate` or throw on a thenable; keep "no version means 0" | M45 | +| 4 | A migrated record is not written back, so the migration runs on every load until the first edit. Save once after a migration | M47 | +| 5 | `storage` is required in ours and defaults to `localStorage` in both libraries. Make it optional with a lazy default | M49 | +| 6 | Every devtools entry is `STORE_UPDATE`. Name the entry after the outermost store method and send one per transaction on the synchronous channel | M57 | +| 7 | A devtools jump notifies once per field, turns a `Date` into a string, and ignores `RESET`, `COMMIT`, `ROLLBACK`. Wrap in `batch()`; pass options to `connect()`; decide `enabled` | M56, M57 | +| 8 | `subscribeKey` takes a top-level key only. Accept a selector, `equalityFn` and `fireImmediately`; say in the reference that `subscribe`'s callback gets no arguments | M62 | +| 9 | Skip a listener removed before its turn (finding 20). For 21 the rule "a later subscriber does not hear the write" is right. No library does better on 18 and 22 | M28 | +| 10 | Reject a Provider and an automatic server-write check; keep the scoping docs | no change proposed | +| Names | `prepareStoreForHydration` lives in `react/server` and is called in client code too; `subscribe` passes nothing where Zustand passes `(state, prev)` | M70, M76 | +| Q1 | Users of both libraries expect synchronous delivery: if the default stays batched, say so at the top of the API reference | M31 | +| Q8 | Diagnostics for `persist` and `devtools` need a convention for the development gate first | M72 | + +### `adapters.md` + +| Finding | What it says | Entry | +| ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ | +| A1 | Every adapter builds a snapshot per sync notification: 2,000 direct row writes take 630 to 760 milliseconds against 1 to 3. Vue, Angular and Solid can build it at the read; React and Svelte cannot | M63 | +| A2 | Every adapter has its own `active` flag against stage 1 finding 20. Drop the flags if the core stops calling a removed subscriber | M28 | +| V1 | The Vue adapter leaks one subscription per server render. Subscribe in `onMounted` inside an unmounted component | M64 | +| V2 | The Vue ref is writable. Type it `Readonly>>` | M65 | +| S1 | The Svelte guide names the store `state`, which conflicts with the `$state` rune. Rename to `snap` | M76 | +| S2 | Keep `toSvelteStore`; document `fromStore(toSvelteStore(store))` for runes modules; a rune-native helper needs a separate entry or dropping Svelte 4 | M69 | +| O1 | No Solid-specific defect. The adapter is Solid 2's `from()` | no change proposed | +| N1 | The Angular adapter drops a store write made inside a `computed`. Wrap the `set` in `untracked()` | M66 | +| N2 | No `injector` option and a misleading error outside an injection context. Add `{injector}`, assert as `toSignal` does, align the message prefix | M67 | +| Q7 | Rename the Solid adapter to `fromClassyStore`; keep the other names and the entry points | M68 | +| Q8 | A development warning when a sync listener sees many notifications in one task; a supported listener count for tests | M73 | + +### `security.md` + +| Finding | What it says | Entry | +| ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------ | +| 1 | `persist` cannot swap the store's prototype unless the application lists `__proto__` itself. Throw at `persist()` time for a prototype key, a getter, a method or a malformed transform | M44 | +| 2 | A nested `__proto__` key survives restore as an own data key and is written back. Drop such keys at every depth when restoring from storage or DevTools | M52 | +| 3 | A record nested 16,000 to 18,000 deep restores, then every snapshot and save throws. Clone every value before assigning any, take one snapshot inside the `try`, roll back | M51 | +| 4 | Records `persist` cannot read are skipped without a report. One `readEnvelope` that returns an envelope or a reason; report every reason through `onError` | M45 | +| 5 | A version that is not a number counts as version 0. Only a missing version means 0 | M45 | +| 6 | With `expireIn` set, a record with no usable `expiresAt` never expires. Owner's call between fixing and documenting | M46 | +| 7 | DevTools time travel adds unknown fields, never deletes missing ones, calls setter-only accessors. Apply with history's rule; keep `enabled` true and document that the extension receives every state | M56, M57 | +| 8 | Cross-tab sync applies events from another storage area and synthetic events. Check `storageArea` when `storage` is a `Storage`; document | M53 | +| 9 | Restored values are not validated against field types. Document that stored data is untrusted and that `merge` is the place to validate; no `validate` option | M76 | +| 10 | `proxy-compare` 3.0.1 is pinned exactly. Accept, and document why | M75 | +| 11 | 17 advisories in development dependencies, none in the tarball. Update at the next refresh; a reporting `bun audit` step | M75 | +| 12 | The release job gives every installed dependency the npm publishing identity. Split the job, pin actions by commit, set `permissions` | M74 | +| 13 | The tarball holds only `dist` and four files. Accept | no change proposed | +| Q8 | A development warning for `syncTabs` with an adapter that is not `localStorage`, and for a malformed DevTools message | M73 | + +## Contradictions between reports + +The first seven are in the stage 2 report. The rest I found with all eleven +reports side by side. "Settles it" names the cheapest thing that would. + +| No. | Entry | One side | The other side | Settles it | +| --: | -------- | -------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 1 | M19 | MobX 3: revalidate a nested getter by comparing its value | Signals 2: that is stale when a getter returns a live store node; compare the node's version too | Settled by a run. Signals' `probe-first.ts` fails on `spike-refresh` and passes on `spike-one` | +| 2 | M11 | Solid 4: wrap class instances by default | Valtio V12, Vue Q6, MobX, Svelte, Immer: keep opt-in | An owner's decision. A spike would show how many tests a default wrap breaks, and what a snapshot of a class with `#private` fields does | +| 3 | M38 | Vue, Legend-State: native `Map` and `Set` are reactive in place. MobX replaces them | Valtio, Solid, Svelte: separate classes, as ours. No library has a frozen native `Map` | An owner's decision. No report asks for a change before 1.0 | +| 4 | M7 | Solid 5, Immer 2: a Proxy target of the library's own ends the invariant bugs | Both reports: too large for 1.0. Svelte 7: a guard in `get` covers finding 46 | An owner's decision. The guard's cost depends on M9 | +| 5 | M2 | Svelte and Immer throw for an accessor or read-only descriptor; Immer 3 proposes we do | Svelte 2: we need not, because we store everything on the target | An owner's decision; see number 8 first | +| 6 | M2 | MobX 10: refuse `Object.freeze(store)` | Vue, Svelte 2, Immer 3, Solid 7: keep it working | An owner's decision. Freezing through the store is documented in `TUTORIAL.md` | +| 7 | M31 | MobX, Preact, Legend-State, Zustand, Jotai: synchronous by default | Valtio, Solid, Svelte: batched. Vue: as ours | An owner's decision. No report proposes a change | +| 8 | M2, M12 | Immer 3: throw for every `defineProperty` that carries a `value` | MobX 8, Svelte 1, Vue 6: the base class works because class fields arrive as data descriptors | Settled by a run (appendix): the fields arrive as full data descriptors, and a trap that refuses them throws in the constructor. The two cannot both be taken | +| 9 | M1 | Valtio, Vue, Solid, Svelte: return a stored function as it is | MobX 9: keep wrapping, cache one wrapper per function. MobX itself wraps a stored function once, which the stage 2 report's table misses | The stage 1 test for finding 5: `indexOf(first)` is 0 under the first and -1 under the second | +| 10 | M1 | Solid 3: its narrowing fixes the `holder.fn === fn` part of finding 62 | Solid 3's own fifth rule keeps an own function on a non-array object wrapped | Run the stage 1 test for finding 62 against a sketch | +| 11 | M26 | Svelte 11: a write inside a getter is an error in every build | MobX 6, Solid 8, Signals 7: a development warning; an error is stricter than the field | An owner's decision. Count the tests and examples with a getter that writes | +| 12 | M28 | MobX 5, Signals 8: queue a re-entrant write and drain in a loop, 100 rounds, `console.error` | Vue 9: skip the running listener, or count depth and throw. Svelte 11: 1,000 rounds, a named error in every build | An owner's decision. A sketch against the notification tests shows which pinned orders each policy changes | +| 13 | M28 | Zustand and Jotai 9: "keep ours" for finding 21 | MobX 5, Valtio V6: fix finding 21 | Not a real conflict. Zustand tested a sync subscriber added during delivery, where ours is already right. Finding 21 is the batched case | +| 14 | M23 | Signals 1: the stamp removes finding 32 | Svelte 4, Vue 8, MobX 10: it needs a `present` flag | One probe on `spike-stamp`: read, write an unrelated field, read again, and count the runs | +| 15 | M7, M9 | Svelte 7: a guard for finding 46 is free, because `get` has the descriptor | Solid 1: remove that descriptor lookup | Measure the guard on top of the Solid spike | +| 16 | M18 | MobX 3: a new module-level write counter as the stamp | Signals 1: the node's own version is enough | Signals ran the second. The first is reasoning | +| 17 | M72 | Solid 9, Svelte: export conditions, production bytes untouched | MobX, Legend-State, Immer, Zustand: a `NODE_ENV` guard in one build | The stage 3 cost spike: bytes per entry both ways, and which of Vite, Next.js, Vitest, Bun and Node select `development` | +| 18 | M72 | MobX 7, Signals Q8: the same thrown errors in both builds | Immer 4: an error thrown in development only | An owner's decision, made once for all of M73 | +| 19 | M57 | Valtio V9: require `enabled`, or default it from `NODE_ENV` | Security 7: keep `true` and document. Zustand and Jotai 7: either | Follows from number 17: without a `NODE_ENV` read in the library, only "require" or "keep" are open | +| 20 | M45 | Security 4: report an unreadable record as `'parse'` with a reason | Zustand and Jotai 3: a new operation, `'migrate'` | An owner's decision. `PersistOperation` is a public type | +| 21 | M45 | Zustand and Jotai 3: await an `async` `migrate` | Security 4: reject a `migrate` result that is not a plain object | An owner's decision. Awaiting adds a turn between the read and the apply | +| 22 | M38 | Immer 9: a reactive collection could extend the native class if every method is overridden | Svelte 8: not as the store stands, because a native method rejects the proxy as `this` | Settled by a run (appendix). Both hold: a call into `super` throws through the store; a subclass that overrides every method and accessor works, on the store and on a snapshot | +| 23 | M40 | Svelte 8, the stage 2 report: look at an index or native storage beside the live array | Valtio V10: reject Valtio's live structure; index the frozen snapshot only | A spike of the live index with `withHistory` and `persist` replacing the array | +| 24 | M35, M40 | Valtio V10: reading a frozen array is the slow path, 28 times slower on Bun | Immer 1: on Bun, `Object.freeze` of a new 1,000-element array costs about 94 microseconds by itself | Settled by my script (appendix). Immer's row without the freeze also reads an unfrozen array, so about 15 of the 94 are the frozen read | +| 25 | M33 | Valtio V4, Immer Q3: one derived prototype per class | MobX Q3: own accessors that are not enumerable | The spike the stage 2 report asks for: tests that fail, bytes, and the cost per snapshot, for each form | +| 26 | M14 | Valtio V1: with weak owner links, suspension and its corrections can go | Stage 1 finding 72: three parts of suspension are needed for correct snapshots | The ownership spike. Finding 72's three parts are corrections inside suspension, so the question is what the suite says with none of it | +| 27 | M68 | Adapters Q7: rename the Solid adapter `fromClassyStore` | Solid Q7: `useClassyStore` returns what a Solid user expects | An owner's decision | +| 28 | M65 | Adapters V2: `Readonly>>` | Vue 11: `Readonly>` | `tsc` against Vue 3.2.0, the floor of the peer range | +| 29 | M57, M63 | Zustand and Jotai 6: send DevTools entries on the synchronous channel | Adapters A1: a sync listener that takes a snapshot per direct write is the 640-millisecond case | Reasoning is enough: a sync DevTools listener would send one snapshot per direct write. It needs M35, or one entry per task for direct writes | + +## Dependencies between entries + +"Before" means the first has to be decided or made before the second. + +1. **M33 and M34 are one decision.** With enumerable own getters, a snapshot + getter that lists the keys of `this` counts the getters and can call + itself. M3, the same traps on the live store, does not depend on either. +2. **M33 before the utilities that enumerate a snapshot.** `persist` builds + its default property list from `Object.keys(snapshot(store))`. + `shallowEqual`, the DevTools payload (M57), `structuredClone` of a + snapshot and `cloneSnapshot` all see the keys change. Under form (a) a + snapshot and a plain instance of the same class have different + prototypes, and the reference says `shallowEqual` never calls two such + values equal. That last point is my reasoning. +3. **M2 before M12.** The base class gives a correct first snapshot only + once a data descriptor is a write. M2 (b) rules M12 (a) out. +4. **M2 and M14 share a trap.** M2 (a) contains the one-line fix of M14 (a). + If M14 (b) removes the walk, the hang is gone without that line, and M2 is + still needed for findings 1, 45 and 71. +5. **M14 before M35, M21 and M16.** A set of changed keys must survive + detach and resume. A dependency on another node's version must resume a + suspended container first. The order of owner notifications changes with + the ownership code. +6. **M14 before M18, or tested with it.** The stamp is the node's version, + and a suspended subtree's version is reconciled on resume. The Signals + report read that and did not test it. +7. **M9 before M1 and M2.** With the descriptor cache in place, the `get` + trap already knows "own or inherited", which is the test M1 needs. The + cache also adds an own-accessor flag that the `defineProperty` trap has to + set. M9 removes what makes M7 (b) free. +8. **M6 before M5 (b) and M10.** A search on the raw array finds a raw + object only if the raw array never holds a proxy. +9. **The getter entries have an order.** M18, M20 and M22 (a) are small and + independent. M19 needs a version compare. M27 takes in M19, M20, M22 (a) + and M23, so deciding M27 first would change how each is written. M22 (a) + makes a branch reachable that stage 1 lists as dead; M27 removes it. +10. **M28 before M31, and before the adapter flags.** A synchronous default + is only arguable after delivery is bounded. Adapters A2 drops four + `active` flags once the core skips a removed listener. +11. **M72 before every development-only item in M73**, and before M37, the + warning in M49, and any `enabled` default in M57 that reads the + environment. The items marked "in every build" do not wait for it. +12. **M36 (a) before the utilities are safe.** `isChanged` in the React + hook, `cloneSnapshot`, `shallowEqual`, `persist`, `devtools` and + `withHistory` each need a check against a cyclic snapshot. +13. **M1 before M59.** Whether a stored function is data decides what + `withHistory` should do with one. +14. **M60 before M56, or M56 twice.** DevTools is to reuse history's apply + function. If that function becomes recursive later, time travel changes + again. +15. **M52 before M51 and M56.** The `__proto__` strip lives in the clone + walk that the clone-first restore and the DevTools jump would both call. +16. **The `persist` entries touch the same few functions.** M45 and M54 are + one rewrite of the envelope guards. M51 makes the failure in M44 atomic. + M48, M49, M70 and `skipHydration` are one question: what a store holds at + the first render, on the server and on the client. M47 has to be checked + with M53. M50 belongs with the debounce timing of stage 1 finding 56. +17. **M71 before M62.** A new equality option on `subscribeKey` should take + whichever name the hook keeps. +18. **M29 and M57.** A setter that becomes a transaction is a second place + where a transaction opens, so the action-name hook has to say what a + setter is called. +19. **M35 and M63.** What the React and Svelte adapters can do about a + snapshot per write is whatever M35 achieves. Vue, Angular and Solid can + defer the snapshot without it. +20. **M11 (b) touches M13, M38 and the collections.** A default wrap needs a + test for platform objects, which is where the realm check and the native + collections are decided, and `ReactiveMap` and `ReactiveSet` use + `PROXYABLE` today. +21. **The size budget comes before all core fixes.** The main entry measures + 3,661 bytes against 3,750, so 89 bytes are free. M2, M3, M9, M21, M28 and + M34 add code to it. Only M14 clearly removes some. Each approved change + has to state the new number, or the budget is decided once for the whole + set. `CONSTRAINTS.md` allows no silent change. + +## Proposals I think are wrong, or not worth their cost + +These are my views after reading all eleven reports together. None is a +decision. Where a view rests on reasoning and not on a run, it says so. + +1. **M19 (a), value-only revalidation (MobX 3, step 1). Wrong for us.** The + Signals probe shows a stale result. Take (b) or leave the code as it is. +2. **M2 (b), refusing every data descriptor (Immer 3). Wrong for us if M12 + is wanted.** My run confirms that class fields reach the trap as data + descriptors, so the base class throws in its constructor. Four reports + propose the opposite. The `setPrototypeOf` half of Immer 3 stands on its + own as M8. +3. **Refusing `Object.freeze(store)` (MobX 10). Not worth it.** It reverses + documented behaviour to delete a branch that M2 (a) already makes safe: + in the Svelte spike the freeze case "falls out of the same code". The + hang it would also remove goes with M14. +4. **M1 (b), caching wrappers (MobX 9). A half fix.** Two reads agree, but + `indexOf(first)` is still -1 and `store.Model === Model` is still false. + Its third step asks the user to freeze a class before storing it. The + non-writable `prototype` test needs nothing from the user. +5. **M26 (b), an error for a write inside a getter (Svelte 11). Too + strict.** A getter that fills a cache field on first read is ordinary + code, and three reports stop at a warning. What needs fixing is that the + write is dropped without a word on a snapshot, and a warning does that. +6. **M11 (b), wrapping class instances by default (Solid 4). Costs more + than the report counts.** Today an unmarked instance is shared with its + snapshot, so its getters work there. Wrapped, it is copied, and a getter + that reads a `#private` field throws on the copy. Every third-party class + instance in a store would need the marker checked. A development warning + reaches the same silent failure for a few lines. Reasoning, from Vue Q6 + and the base-class runs. +7. **M7 (a), a Proxy target of our own. Not for 1.0.** Both reports that + describe it say so. It makes four more traps mandatory and reopens M2, M3 + and M8 at once. +8. **M10, array methods on the raw array (Vue 7). Unmeasured on ours.** The + gain is read off Vue's numbers. M9 and M20 attack the same per-index + cost and are both sketched. Measure those first. +9. **M27, one kind of dependency. Not yet.** About 150 lines, and a write + followed by a read gets 45% slower. The Signals report itself says to + take M18, M20 and M22 (a) first. +10. **M18 with a module-level counter (MobX 3). The weaker form.** A write + to any store would then invalidate every stamp in every store. The + node's own version does not have that cost and is the form that was + run. Reasoning for the first sentence. +11. **M30, "refuse a promise". Too broad.** `batch(() => { store.loading = + true; return save(); })` returns a promise and batches everything it + should. Only an `async` callback is the mistake, and a check for a + thenable cannot tell the two apart. A type that refuses a promise also + contradicts "Returns whatever `run` returns". A development hint is the + most the evidence supports. Reasoning. +12. **M35, the changed-keys rebuild. Worth a spike, not yet a + commitment.** The floor is nine times faster on Node. On Bun the freeze + and the frozen read are about 95 of 119 microseconds, and Safari shares + Bun's engine, so the gain there may be small too. That last step is an + inference. The quadratic case of M63 goes away for Vue, Angular and + Solid without it. +13. **M36 (b), refusing a cycle at the write. Not free either.** No report + costs it. To know that a write closes a cycle, the `set` trap has to ask + whether the new child is an ancestor of the parent, on every assignment + of an object. (a) is 13 lines in the core plus six utilities to check. + Reasoning. +14. **M40 (b), an index beside the live array. Can wait.** "Their lookups + are linear" is documented, so a faster lookup can ship in any later + release. A native `Map` held in a field of the collection would be an + opaque leaf shared with every snapshot, so it would answer for the live + state on an old snapshot. (a) avoids that by keying on the frozen array. + The second sentence is reasoning. +15. **Sending DevTools entries on the synchronous channel (Zustand and + Jotai 6). It walks into M63.** One snapshot per direct write is what + costs about 640 milliseconds for 2,000 writes. Naming entries after methods + does not need the synchronous channel. +16. **M70, capturing the first snapshot automatically. Dearer than "not + breaking" suggests.** Either every store keeps its first snapshot for + life, whether or not React is used, or the write path of the core gains + a first-write hook for a React-only need, in an entry with 89 bytes of + room. `CONSTRAINTS.md` says retained memory must not grow. Reasoning. +17. **M71, renaming `isEqual` to `equalityFn`. Weak precedent.** Zustand and + Jotai say `equalityFn`. React's own `useSyncExternalStoreWithSelector` + names the same parameter `isEqual`; I checked the copy in + `node_modules`. A breaking rename for a split precedent. +18. **M48 and M49 do not have to be settled before 1.0.** A new `hydrate` + option and an optional `storage` are both additions. Only a changed + default would be breaking. M49 also adds a new silence: `persist()` + that does nothing where `localStorage` is missing. +19. **M15 (b), holding a subscribed node strongly. Trades a surprise for a + leak.** A forgotten unsubscribe would then keep the node and everything + under it for good. A sentence in the docs costs nothing. +20. **M12 (b), the creation-time arrow warning (MobX 8). It collides with + M1.** Once a stored function is data, an own property that holds an + arrow function is no longer evidence of a mistake. Reasoning. +21. **The four tools in M73. New surface on the eve of the freeze.** Each + is an addition and can follow 1.0. + +## Verified and not verified + +**Read in full:** `CLAUDE.md`, `CONSTRAINTS.md`, the three sections of +`REVIEW_PLAN.md` the brief names, the summary and the 73 findings of +`review/stage-1-report.md`, `review/stage-2-report.md` without its appendix, +`website/content/docs/API_REFERENCE.md`, and in each of the eleven reports +everything from the summary to "verified and not verified". That includes +every findings section, every table of stage 1 counterparts and every answer +to the eight API questions. + +**Read in part:** the appendices. I opened one, Immer's port 1d, to see what +its two rows measure. I did not read the diffs of the sketches; each entry +says where its diff is. + +**Searched, not read:** the other pages under `website/content/docs/`, with +`grep`, for the sentences quoted under "Kind and API". A behaviour I call +"not documented" is absent from the reference and from those searches. It may +still be described in words I did not search for. + +**Ran**, on Bun 1.4.4 and Node 24.21.0, on a machine other agents were +using. The scripts and their output are in the appendix. + +- `frozen-read.mjs`: reading a frozen array against an unfrozen one. +- `fields-define.mjs`: whether class fields reach a `defineProperty` trap + when a base constructor returns a Proxy. It uses a bare Proxy, not the + library. +- `map-subclass.ts`: a class that extends `Map`, marked `PROXYABLE`, read + through a store made from the repository's source. Bun only. +- One `grep` in `node_modules` for the parameter name in React's + `use-sync-external-store`. + +**Not run:** no sketch from stage 2, no spike, no suite, no benchmark. The +brief asks for none. + +**Taken from the reports, not checked:** every number, reproduction and line +reference attributed to a report. The stage 2 report says which ten defects +the orchestrating agent re-ran. + +**Reasoning:** the section "Proposals I think are wrong", except where an +item names a run; the dependencies; and in the entries, the remarks that a +proposal "falls out of" or "rules out" another, except M2 against M12. + +**Not done:** the labels "Before 1.0" and "Can follow 1.0". Each entry says +what I checked, so that the decision document can assign them. I did not +check the nine items of M76 against the tutorials. + +## Appendix: the three scripts + +All three are in the scratch folder +`/private/tmp/claude-501/-Users-robertparallax-WebstormProjects-classy-store/9c8c2bbd-bb57-4b12-aa7b-9d06972e3fdd/scratchpad/stage-3-merge/`, +which a reboot can clear. + +### `frozen-read.mjs`: contradiction 24 + +```js +const now = () => performance.now(); +function scan(arr, needle) { + for (let i = 0; i < arr.length; i++) if (Object.is(arr[i], needle)) return i; + return -1; +} +function copy(arr) { + const out = new Array(arr.length); + for (let i = 0; i < arr.length; i++) out[i] = arr[i]; + return out; +} +function bench(label, fn, rounds) { + let best = Infinity; + for (let r = 0; r < 7; r++) { + const t = now(); + for (let i = 0; i < rounds; i++) fn(); + best = Math.min(best, (now() - t) / rounds); + } + console.log(label.padEnd(52), (best * 1000).toFixed(2), 'us'); +} +for (const n of [1000, 10000]) { + for (const kind of ['numbers', 'objects']) { + const make = () => + Array.from({length: n}, (_, i) => (kind === 'numbers' ? i : {id: i})); + const plain = make(); + const frozen = Object.freeze(make()); + const lastPlain = plain[n - 1]; + const lastFrozen = frozen[n - 1]; + const rounds = n === 1000 ? 20000 : 2000; + bench( + `${n} ${kind}: scan to the last, plain`, + () => scan(plain, lastPlain), + rounds, + ); + bench( + `${n} ${kind}: scan to the last, frozen`, + () => scan(frozen, lastFrozen), + rounds, + ); + bench(`${n} ${kind}: copy by index, plain`, () => copy(plain), rounds); + bench(`${n} ${kind}: copy by index, frozen`, () => copy(frozen), rounds); + } +} +``` + +Best of seven rounds, microseconds per call: + +| Case | Bun, plain | Bun, frozen | Node, plain | Node, frozen | +| -------------------------------- | ---------: | ----------: | ----------: | -----------: | +| 1,000 numbers, scan to the last | 0.48 | 16.29 | 0.61 | 5.33 | +| 1,000 numbers, copy by index | 1.03 | 16.70 | 1.11 | 6.17 | +| 1,000 objects, scan to the last | 1.97 | 16.93 | 6.22 | 6.43 | +| 1,000 objects, copy by index | 2.55 | 17.44 | 6.61 | 6.90 | +| 10,000 numbers, scan to the last | 19.39 | 156.31 | 65.26 | 59.50 | +| 10,000 numbers, copy by index | 22.45 | 167.55 | 70.16 | 67.00 | +| 10,000 objects, scan to the last | 19.46 | 158.57 | 62.14 | 64.27 | +| 10,000 objects, copy by index | 21.57 | 156.06 | 65.63 | 68.66 | + +What it shows. On Bun a frozen array costs 16 to 17 nanoseconds per element +to read, whatever it holds, against 0.5 to 2.5 unfrozen. That is 7 to 34 +times, so Valtio V10 holds. On Node only the array of 1,000 numbers differs. +Immer's port 1d compares "copy a frozen array by index, then freeze" with a +row that neither freezes nor, after its first round, reads a frozen array. +So the 94 microseconds that Immer 1 puts on `Object.freeze` on Bun include +about 15 for the frozen read. Treat the figures as shape: one run, on a busy +machine. + +### `fields-define.mjs`: contradiction 8 + +```js +const seen = []; +class Base { + constructor(refuse) { + return new Proxy(this, { + defineProperty(target, key, descriptor) { + seen.push([key, Object.keys(descriptor).sort().join(',')]); + if (refuse && 'value' in descriptor) + throw new Error(`refused: ${String(key)}`); + return Reflect.defineProperty(target, key, descriptor); + }, + }); + } +} +class Todos extends Base { + items = [1]; + setFilter = () => {}; +} +new Todos(false); +console.log('descriptors seen:', JSON.stringify(seen)); +try { + new Todos(true); + console.log('refusing trap: constructed'); +} catch (error) { + console.log('refusing trap: THROWS', error.message); +} +``` + +The same output on Node and on Bun: + +```text +descriptors seen: [["items","configurable,enumerable,value,writable"],["setFilter","configurable,enumerable,value,writable"]] +refusing trap: THROWS refused: items +``` + +### `map-subclass.ts`: contradiction 22 + +```ts +import { + createClassyStore, + PROXYABLE, + snapshot, + subscribe, +} from '/Users/robertparallax/WebstormProjects/classy-store/packages/classy-store/src/index.ts'; + +const attempt = (label: string, run: () => unknown) => { + try { + console.log(label, '->', run()); + } catch (error) { + const failure = error as Error; + console.log(label, '-> THROWS', failure.constructor.name, failure.message); + } +}; + +// A: native storage, reached with super. +class NativeBacked extends Map { + static [PROXYABLE] = true; + get(key: K) { + return super.get(key); + } +} +// B: the native type only. Its own array holds the entries. +class ArrayBacked extends Map { + static [PROXYABLE] = true; + entriesList: [K, V][] = []; + get(key: K) { + return this.entriesList.find(([k]) => k === key)?.[1]; + } + set(key: K, value: V) { + this.entriesList.push([key, value]); + return this; + } +} +const a = createClassyStore({m: new NativeBacked([['a', 1]])}); +attempt('A instanceof Map', () => a.m instanceof Map); +attempt('A get through the store', () => a.m.get('a')); +const b = createClassyStore({m: new ArrayBacked()}); +let calls = 0; +subscribe(b, () => calls++, {sync: true}); +attempt('B instanceof Map', () => b.m instanceof Map); +attempt( + 'B set then get through the store', + () => (b.m.set('a', 1), b.m.get('a')), +); +attempt('B sync notifications', () => calls); +attempt('B snapshot instanceof Map, get', () => [ + snapshot(b).m instanceof Map, + snapshot(b).m.get('a'), +]); +attempt('B snapshot set', () => snapshot(b).m.set('x', 2)); +attempt('B snapshot size (native slot)', () => snapshot(b).m.size); +``` + +Output on Bun. The script that ran had the `subscribe` import on a line of +its own; nothing else differs. + +```text +A instanceof Map -> true +A get through the store -> THROWS TypeError Map operation called on non-Map object +B instanceof Map -> true +B set then get through the store -> 1 +B sync notifications -> 1 +B snapshot instanceof Map, get -> [ true, 1 ] +B snapshot set -> THROWS TypeError Attempted to assign to readonly property. +B snapshot size (native slot) -> THROWS TypeError Map operation called on non-Map object +``` + +What it shows. Svelte 8 is right about native storage: a call into +`Map.prototype` fails through the store. Immer 9 is right about the native +type: a subclass that never calls `super` works, notifies, and gives a frozen +snapshot that is `instanceof Map`. The last line is the catch. Anything not +overridden, here `size`, throws, and a snapshot that passes `instanceof Map` +is not a `Map` to native code. From 216b3d1593ed09abdf2fbe269940a3c519b531a0 Mon Sep 17 00:00:00 2001 From: codeBelt Date: Thu, 19 Nov 2026 06:22:23 -0600 Subject: [PATCH 075/169] docs: correct the stage 2 report on how MobX holds a function Co-Authored-By: Claude Fable 5.2 --- review/stage-2-report.md | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/review/stage-2-report.md b/review/stage-2-report.md index 1db970ee..0ce4bf09 100644 --- a/review/stage-2-report.md +++ b/review/stage-2-report.md @@ -30,14 +30,14 @@ Each row is a change that several reports reach independently. "Sketch" means an agent applied the change to a throwaway copy of `src/` and re-ran its reproductions. -| Change | Who does it | Stage 1 findings it bears on | Evidence | -| ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | -| Return a stored function as it is. Bind and group only methods found on a prototype | Valtio (V2), Vue (4), Solid (3), Svelte (3), MobX (9). No library wraps a stored function | 5, 6, 42, 62 | Vue sketch B: 20 lines added, 7 removed, fixed 5, 6, 7, 9, 10 and 42 together | -| Treat `Object.defineProperty` with a data descriptor as a write | Vue (6), Solid (7), Svelte (2), MobX (10) | 1, 45, 61, 66, 71 | Svelte's sketch, 24 lines added and 9 removed, fixed 1, 45, 66 and 71. What to do with other descriptors is disputed: see below | -| Add `has` and `ownKeys` traps, with a dependency on the set of keys | Vue (1), Solid (6), Svelte (4), MobX (10) | 29, 30, 31, 41 | Vue sketch A fixed 29 and 30 on the live store. On a snapshot it cannot be separated from API question 3 | -| A delete that removes nothing is not a change | Vue (5), Svelte (5), Immer (5) | 29 | Svelte sketch | -| Deliver to subscribers from one queue: a write made during delivery is queued, a removed subscriber is skipped, 100 rounds at most | MobX (5), Preact Signals (8), Vue (9), Svelte (11). Zustand skips a removed subscriber (Zustand and Jotai 9) | 18 to 23 | Read and ported, not sketched on ours | -| A class getter is not an enumerable own property of a snapshot | Valtio (V4), MobX, Vue, Solid, Svelte, Immer. None turns an inherited getter into an own enumerable accessor of a copy | 30, 31 | Ports in each report. On ours, `Object.keys(store)` is `a,b` and `Object.keys(snapshot(store))` is `a,b,entryCount` | +| Change | Who does it | Stage 1 findings it bears on | Evidence | +| ---------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | +| Return a stored function as it is. Bind and group only methods found on a prototype | Valtio (V2), Vue (4), Solid (3) and Svelte (3) return it as it is. MobX wraps it once, when it is written, and its report proposes caching one wrapper per function (9). No library wraps on every read | 5, 6, 42, 62 | Vue sketch B: 20 lines added, 7 removed, fixed 5, 6, 7, 9, 10 and 42 together | +| Treat `Object.defineProperty` with a data descriptor as a write | Vue (6), Solid (7), Svelte (2), MobX (10) | 1, 45, 61, 66, 71 | Svelte's sketch, 24 lines added and 9 removed, fixed 1, 45, 66 and 71. What to do with other descriptors is disputed: see below | +| Add `has` and `ownKeys` traps, with a dependency on the set of keys | Vue (1), Solid (6), Svelte (4), MobX (10) | 29, 30, 31, 41 | Vue sketch A fixed 29 and 30 on the live store. On a snapshot it cannot be separated from API question 3 | +| A delete that removes nothing is not a change | Vue (5), Svelte (5), Immer (5) | 29 | Svelte sketch | +| Deliver to subscribers from one queue: a write made during delivery is queued, a removed subscriber is skipped, 100 rounds at most | MobX (5), Preact Signals (8), Vue (9), Svelte (11). Zustand skips a removed subscriber (Zustand and Jotai 9) | 18 to 23 | Read and ported, not sketched on ours | +| A class getter is not an enumerable own property of a snapshot | Valtio (V4), MobX, Vue, Solid, Svelte, Immer. None turns an inherited getter into an own enumerable accessor of a copy | 30, 31 | Ports in each report. On ours, `Object.keys(store)` is `a,b` and `Object.keys(snapshot(store))` is `a,b,entryCount` | Three more points have fewer voices and one clear result each: @@ -57,6 +57,10 @@ Three more points have fewer voices and one clear result each: is empty. Keep the message text in production and drop only the extra checks (MobX 7, Solid 8 and 9, Svelte 11, Signals question 8). +Corrected on 2026-11-19: the first row said that no library wraps a stored +function. The stage 3 merge (`review/stage-3/merged.md`, contradiction 9) +pointed out that MobX wraps one once. + ## Where the reports disagree - **Signals corrects MobX.** MobX finding 3, step 1, proposes revalidating a From cbb03c9bbe3bd662efccfae96b1ba458a75dea01 Mon Sep 17 00:00:00 2001 From: codeBelt Date: Thu, 19 Nov 2026 09:34:33 -0600 Subject: [PATCH 076/169] docs: record that the agent decides, and scrub machine paths from the reports The owner handed every decision to the agent running the plan on 2026-11-19, except merging into main and releasing. The plan's ground rules, its stage 3 steps and its rule for CONSTRAINTS.md say so now. Reports carried this machine's absolute paths. They now write and , a script does the replacement, and the stage 3 briefs are saved under review/stage-3/briefs so a pause cannot lose them. Co-Authored-By: Claude Fable 5.2 --- REVIEW_PLAN.md | 54 ++++++-- review/stage-2-report.md | 14 +- review/stage-2/adapters.md | 75 +++++----- review/stage-2/immer.md | 18 +-- review/stage-2/legend-state.md | 8 +- review/stage-2/security.md | 4 +- review/stage-2/signals.md | 4 +- review/stage-2/solid.md | 12 +- review/stage-2/svelte.md | 10 +- review/stage-2/valtio.md | 18 +-- review/stage-2/zustand-jotai.md | 2 +- review/stage-3/briefs/COMMON.md | 129 ++++++++++++++++++ review/stage-3/briefs/adapters-collections.md | 54 ++++++++ review/stage-3/briefs/devbuild.md | 44 ++++++ review/stage-3/briefs/merge.md | 53 +++++++ review/stage-3/briefs/own-code.md | 59 ++++++++ review/stage-3/briefs/persist-devtools.md | 64 +++++++++ review/stage-3/briefs/pinned.md | 37 +++++ review/stage-3/briefs/spike-classes.md | 48 +++++++ review/stage-3/briefs/spike-delivery.md | 49 +++++++ review/stage-3/briefs/spike-getters.md | 74 ++++++++++ review/stage-3/briefs/spike-ownership.md | 48 +++++++ review/stage-3/briefs/spike-snapshots.md | 59 ++++++++ review/stage-3/briefs/spike-traps.md | 72 ++++++++++ review/stage-3/merged.md | 4 +- scripts/scrub-paths.mjs | 29 ++++ 26 files changed, 942 insertions(+), 100 deletions(-) create mode 100644 review/stage-3/briefs/COMMON.md create mode 100644 review/stage-3/briefs/adapters-collections.md create mode 100644 review/stage-3/briefs/devbuild.md create mode 100644 review/stage-3/briefs/merge.md create mode 100644 review/stage-3/briefs/own-code.md create mode 100644 review/stage-3/briefs/persist-devtools.md create mode 100644 review/stage-3/briefs/pinned.md create mode 100644 review/stage-3/briefs/spike-classes.md create mode 100644 review/stage-3/briefs/spike-delivery.md create mode 100644 review/stage-3/briefs/spike-getters.md create mode 100644 review/stage-3/briefs/spike-ownership.md create mode 100644 review/stage-3/briefs/spike-snapshots.md create mode 100644 review/stage-3/briefs/spike-traps.md create mode 100644 scripts/scrub-paths.mjs diff --git a/REVIEW_PLAN.md b/REVIEW_PLAN.md index 0167bd45..59a15617 100644 --- a/REVIEW_PLAN.md +++ b/REVIEW_PLAN.md @@ -72,10 +72,13 @@ deadline; the code should be as correct and clear as it can be made. are the hardest parts to reason about. **How to work through this plan.** Do the stages in order. Each stage ends -with a report to the owner and waits for their go-ahead before the next one -starts. The report is also saved (see "Where the work is written down") and -the Status table above is updated. Stage 3 is the decision point: the owner -approves each proposed change there. +with a report, which is saved (see "Where the work is written down"), and the +Status table above is updated. Stage 3 is the decision point: every proposed +change gets a written decision there before stage 4 implements anything. +Until 2026-11-19 each stage waited for the owner's go-ahead and the owner +approved each stage 3 change. The owner has since handed those decisions to +the agent running the plan: see the first ground rule. When the Status table +says the work is paused, do nothing until the owner says to start again. **Commands** (from the repo root; see `CLAUDE.md` for the rest): @@ -135,6 +138,15 @@ fail in the main checkout, so `.gitignore` lists that folder. ## Ground rules (every agent) +- The agent running the plan makes the decisions, and does not wait for the + owner's approval or go-ahead. Two things stay the owner's alone: merging + into `main` and releasing. The owner said on 2026-11-19: "The only + limitation you have is not to merge into main. You can make all the + decisions in the world. You're the expert. Do not merge into main or + release. Those are the two things that you cannot do. Everything else you + can do. You are the one making the decisions from the research and building + this library." Every decision is still written down with its reasons, so + the owner can read why. - No deadline. Correctness and clarity win over speed. - Breaking changes and public API changes are allowed. The library has one user. - Fixed: state is a plain class wrapped in a proxy, consumers read immutable @@ -169,8 +181,8 @@ fail in the main checkout, so `.gitignore` lists that folder. anything lower. "Agent models" below says which. - `CONSTRAINTS.md` is the quality bar from the end of stage 1. No agent lowers a number in it or weakens a check to make something pass. A number moves - only through a stage 3 decision the owner approved, which states the new - value. + only through a stage 3 decision with a decision record under + `docs/decisions/` that states the new value and the reason. - Report what was verified and what was not. A claim needs a test, a reproduction or a measurement behind it. @@ -189,10 +201,16 @@ fail in the main checkout, so `.gitignore` lists that folder. - `review/` is committed with the stage that wrote it, so a later agent with a fresh context or its own worktree can read it. -- This plan is untracked as of 2026-11-18. Commit it with the first stage 1 - commit. Until then, an agent in its own worktree or in another session - cannot see it: run agents in this checkout, or put the text of their stage - in their brief. +- Stage 3 working reports are in `review/stage-3/`, and the briefs its + helper agents were given are in `review/stage-3/briefs/`. A brief is + started with a prompt that names `COMMON.md` and one other file, and gives + the real paths for the two placeholders below. +- No absolute path of this machine goes into a committed file: the branch is + public and such a path carries the local account name. Reports write + `` for the repository root and `` for the agent scratchpad. + Run `node scripts/scrub-paths.mjs ...` on a report before committing + it. The reports up to 2026-11-19 were committed with real paths and + scrubbed afterwards, so those paths are still in this branch's history. - Only one document describes the public API when the work is done. The spec is the working contract for stage 4. By the end of stage 4, `website/content/docs/API_REFERENCE.md` says everything the spec says, and @@ -422,9 +440,9 @@ report format and write to the same folder: `persist` and `devtools` treat data they did not write: stored JSON with `__proto__` or `constructor` keys, version and migration input, cross-tab storage events, and DevTools messages that set state. Each finding is a - proposal for stage 3, so the owner decides on it with the rest. + proposal for stage 3, so it is decided with the rest. -## Stage 3: Design review (one agent: read and experiment, the owner decides, then write) +## Stage 3: Design review (one agent: read and experiment, decide, then write) 1. Merge the stage 2 reports and remove duplicates. 2. Review our own code independently of other libraries: every function in @@ -455,7 +473,12 @@ report format and write to the same folder: breaking change) or **unspecified** (it may change in a minor release). Without this, the stage 1 tests make every incidental behaviour part of the 1.0 contract. -6. The owner approves or rejects each item. Nothing is implemented before that. +6. The agent running the stage decides each item and writes the decision and + its reason into the document. Before the decisions stand, a fresh agent + that took no part in the spikes reviews the document as an adversary and + its objections are answered in writing. Nothing is implemented before + that. The owner approved each item here until 2026-11-19 and has since + handed the decisions over (first ground rule). 7. From the approved items, write the 1.0 public API spec at `review/spec.md` and one decision record per change under `docs/decisions/`, then an ordered task list for stage 4. The spec lists guaranteed and unspecified behaviour @@ -492,8 +515,9 @@ Skills: `incremental-implementation`, `test-driven-development`, - After the last refactor commit, in this order: 1. An independent review by an agent that took no part in the refactor. 2. A second library-comparison pass limited to the areas that changed. - 3. Their findings go to the owner. An approved fix is committed under the - same rules as any other change. + 3. Their findings are decided like any stage 3 item, and written into the + stage report. An approved fix is committed under the same rules as any + other change. 4. Last, on the final commit: the full validation matrix (browsers, React versions with and without the compiler, Node versions, Vue, Svelte, Angular, Next.js, packed-consumer checks). The stage report names the diff --git a/review/stage-2-report.md b/review/stage-2-report.md index 0ce4bf09..43f57e85 100644 --- a/review/stage-2-report.md +++ b/review/stage-2-report.md @@ -309,7 +309,7 @@ usage is short, except on the three core files, and stage 2 changes no file. Scratch folders, which a reboot can clear: each report names its agent's. Mine is -`/private/tmp/claude-501/-Users-robertparallax-WebstormProjects-classy-store/9c8c2bbd-bb57-4b12-aa7b-9d06972e3fdd/scratchpad/stage-2-spot/`. +`/stage-2-spot/`. ## Appendix: the re-runs @@ -327,7 +327,7 @@ import { createClassyStore, snapshot, subscribe, -} from '/Users/robertparallax/WebstormProjects/classy-store/packages/classy-store/src/index.ts'; +} from '/packages/classy-store/src/index.ts'; const time = (run: () => void) => { const start = performance.now(); @@ -616,7 +616,7 @@ clean read: this.rows[i] 28.42 µs, local rows 0.12 µs ### `diamond.ts`: defect 2 ```ts -import {createClassyStore} from '/Users/robertparallax/WebstormProjects/classy-store/packages/classy-store/src/index.ts'; +import {createClassyStore} from '/packages/classy-store/src/index.ts'; // Two getters per level, each reading both getters of the level below. function diamond(depth: number) { @@ -668,8 +668,8 @@ import { batch, createClassyStore, subscribe, -} from '/Users/robertparallax/WebstormProjects/classy-store/packages/classy-store/src/index.ts'; -import {persist} from '/Users/robertparallax/WebstormProjects/classy-store/packages/classy-store/src/utils/index.ts'; +} from '/packages/classy-store/src/index.ts'; +import {persist} from '/packages/classy-store/src/utils/index.ts'; // Legend-State finding 4: a synchronous storage, read right after persist() returns. const memory = new Map(); @@ -734,8 +734,8 @@ sync calls after the promise settles: 3 ### `migrate.ts`: defects 14, 22 and 23 ```ts -import {createClassyStore} from '/Users/robertparallax/WebstormProjects/classy-store/packages/classy-store/src/index.ts'; -import {persist} from '/Users/robertparallax/WebstormProjects/classy-store/packages/classy-store/src/utils/index.ts'; +import {createClassyStore} from '/packages/classy-store/src/index.ts'; +import {persist} from '/packages/classy-store/src/utils/index.ts'; const memory = new Map(); const storage = { diff --git a/review/stage-2/adapters.md b/review/stage-2/adapters.md index 08dc3535..0c2f696d 100644 --- a/review/stage-2/adapters.md +++ b/review/stage-2/adapters.md @@ -457,7 +457,7 @@ framework; Pinia and NgRx SignalStore, from their documentation only. ## Appendix: scripts and output All files are in -`/private/tmp/claude-501/-Users-robertparallax-WebstormProjects-classy-store/9c8c2bbd-bb57-4b12-aa7b-9d06972e3fdd/scratchpad/stage-2-adapters/`, +`/stage-2-adapters/`, run with `bun ` unless noted. `node_modules` there is a symlink to `packages/classy-store/node_modules`. @@ -485,8 +485,8 @@ import {renderToString} from 'vue/server-renderer'; import { createClassyStore, getInternal, -} from '/Users/robertparallax/WebstormProjects/classy-store/packages/classy-store/src/core/core'; -import {useClassyStore} from '/Users/robertparallax/WebstormProjects/classy-store/packages/classy-store/src/frameworks/vue/vue'; +} from '/packages/classy-store/src/core/core'; +import {useClassyStore} from '/packages/classy-store/src/frameworks/vue/vue'; console.log('vue', version); const listeners = (store: object) => getInternal(store).syncListeners.size; @@ -705,9 +705,9 @@ import { import { getInternal, subscribe, -} from '/Users/robertparallax/WebstormProjects/classy-store/packages/classy-store/src/core/core'; -import {snapshot} from '/Users/robertparallax/WebstormProjects/classy-store/packages/classy-store/src/snapshot/snapshot'; -import type {Snapshot} from '/Users/robertparallax/WebstormProjects/classy-store/packages/classy-store/src/types'; +} from '/packages/classy-store/src/core/core'; +import {snapshot} from '/packages/classy-store/src/snapshot/snapshot'; +import type {Snapshot} from '/packages/classy-store/src/types'; export function useClassyStoreSketch( proxyStore: T, @@ -756,7 +756,7 @@ import {renderToString} from 'vue/server-renderer'; import { createClassyStore, getInternal, -} from '/Users/robertparallax/WebstormProjects/classy-store/packages/classy-store/src/core/core'; +} from '/packages/classy-store/src/core/core'; import {useClassyStoreSketch} from './vue-sketch'; const listeners = (store: object) => getInternal(store).syncListeners.size; @@ -795,7 +795,7 @@ import {GlobalRegistrator} from '@happy-dom/global-registrator'; GlobalRegistrator.register(); const {createApp, defineComponent, h, nextTick} = await import('vue'); const {createClassyStore, getInternal} = await import( - '/Users/robertparallax/WebstormProjects/classy-store/packages/classy-store/src/core/core' + '/packages/classy-store/src/core/core' ); const {useClassyStoreSketch} = await import('./vue-sketch'); @@ -858,8 +858,8 @@ import { import { createClassyStore, getInternal, -} from '/Users/robertparallax/WebstormProjects/classy-store/packages/classy-store/src/core/core'; -import {injectClassyStore} from '/Users/robertparallax/WebstormProjects/classy-store/packages/classy-store/src/frameworks/angular/angular'; +} from '/packages/classy-store/src/core/core'; +import {injectClassyStore} from '/packages/classy-store/src/frameworks/angular/angular'; console.log('angular', VERSION.full); const listeners = (store: object) => getInternal(store).syncListeners.size; @@ -1040,9 +1040,9 @@ import { createClassyStore, getInternal, subscribe, -} from '/Users/robertparallax/WebstormProjects/classy-store/packages/classy-store/src/core/core'; -import {snapshot} from '/Users/robertparallax/WebstormProjects/classy-store/packages/classy-store/src/snapshot/snapshot'; -import type {Snapshot} from '/Users/robertparallax/WebstormProjects/classy-store/packages/classy-store/src/types'; +} from '/packages/classy-store/src/core/core'; +import {snapshot} from '/packages/classy-store/src/snapshot/snapshot'; +import type {Snapshot} from '/packages/classy-store/src/types'; function injectClassyStoreSketch( proxyStore: T, @@ -1137,9 +1137,9 @@ import {renderToString} from 'react-dom/server'; import { createClassyStore, getInternal, -} from '/Users/robertparallax/WebstormProjects/classy-store/packages/classy-store/src/core/core'; -import {useClassyStore} from '/Users/robertparallax/WebstormProjects/classy-store/packages/classy-store/src/frameworks/react/react'; -import {prepareStoreForHydration} from '/Users/robertparallax/WebstormProjects/classy-store/packages/classy-store/src/frameworks/react/server'; +} from '/packages/classy-store/src/core/core'; +import {useClassyStore} from '/packages/classy-store/src/frameworks/react/react'; +import {prepareStoreForHydration} from '/packages/classy-store/src/frameworks/react/server'; console.log('react', version); const store = createClassyStore({count: 0}); @@ -1201,9 +1201,9 @@ import { createClassyStore, getInternal, subscribe, -} from '/Users/robertparallax/WebstormProjects/classy-store/packages/classy-store/src/core/core'; -import {snapshot} from '/Users/robertparallax/WebstormProjects/classy-store/packages/classy-store/src/snapshot/snapshot'; -import {useClassyStore} from '/Users/robertparallax/WebstormProjects/classy-store/packages/classy-store/src/frameworks/solid/solid'; +} from '/packages/classy-store/src/core/core'; +import {snapshot} from '/packages/classy-store/src/snapshot/snapshot'; +import {useClassyStore} from '/packages/classy-store/src/frameworks/solid/solid'; const listeners = (store: object) => getInternal(store).syncListeners.size; const tick = () => new Promise((resolve) => setTimeout(resolve, 0)); @@ -1312,8 +1312,8 @@ import {createRoot, getOwner} from 'solid-js'; import { createClassyStore, getInternal, -} from '/Users/robertparallax/WebstormProjects/classy-store/packages/classy-store/src/core/core'; -import {useClassyStore} from '/Users/robertparallax/WebstormProjects/classy-store/packages/classy-store/src/frameworks/solid/solid'; +} from '/packages/classy-store/src/core/core'; +import {useClassyStore} from '/packages/classy-store/src/frameworks/solid/solid'; const listeners = (store: object) => getInternal(store).syncListeners.size; console.log('isServer', isServer); @@ -1363,8 +1363,7 @@ Run: `bun svelte-build.mjs` import {writeFileSync} from 'node:fs'; import {compile, compileModule} from 'svelte/compiler'; -const SRC = - '/Users/robertparallax/WebstormProjects/classy-store/packages/classy-store/src'; +const SRC = '/packages/classy-store/src'; const component = `