@solidjs/signals 2.0.0-rc.1 → 2.0.0-rc.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/dist/dev.js +1661 -361
  2. package/dist/node.cjs +1939 -1331
  3. package/dist/prod/affects.js +16 -16
  4. package/dist/prod/boundaries.js +90 -90
  5. package/dist/prod/core/action.js +3 -3
  6. package/dist/prod/core/async.js +74 -72
  7. package/dist/prod/core/constants.js +39 -1
  8. package/dist/prod/core/core.js +332 -224
  9. package/dist/prod/core/effect.js +56 -56
  10. package/dist/prod/core/external.js +4 -4
  11. package/dist/prod/core/graph.js +65 -54
  12. package/dist/prod/core/heap.js +52 -44
  13. package/dist/prod/core/invariants.js +3 -2
  14. package/dist/prod/core/lanes.js +41 -34
  15. package/dist/prod/core/optimistic.js +63 -60
  16. package/dist/prod/core/owner.js +97 -96
  17. package/dist/prod/core/scheduler.js +243 -194
  18. package/dist/prod/core/verdict.js +184 -77
  19. package/dist/prod/map.js +104 -104
  20. package/dist/prod/signals.js +1 -1
  21. package/dist/prod/store/next/optimistic.js +31 -23
  22. package/dist/prod/store/next/projection.js +3 -3
  23. package/dist/prod/store/next/reconcile.js +78 -74
  24. package/dist/prod/store/next/store.js +357 -90
  25. package/dist/prod/store/store.js +7 -7
  26. package/dist/types/core/attribution-hooks.d.ts +52 -0
  27. package/dist/types/core/attribution.d.ts +186 -0
  28. package/dist/types/core/constants.d.ts +26 -0
  29. package/dist/types/core/core.d.ts +8 -1
  30. package/dist/types/core/dev.d.ts +20 -3
  31. package/dist/types/core/graph.d.ts +1 -0
  32. package/dist/types/core/lanes.d.ts +4 -16
  33. package/dist/types/core/scheduler.d.ts +8 -0
  34. package/dist/types/core/types.d.ts +85 -41
  35. package/dist/types/store/next/projection.d.ts +0 -16
  36. package/dist/types/store/next/store.d.ts +6 -0
  37. package/dist/types/store/next/target.d.ts +18 -0
  38. package/dist/types-cjs/core/attribution-hooks.d.cts +52 -0
  39. package/dist/types-cjs/core/attribution.d.cts +186 -0
  40. package/dist/types-cjs/core/constants.d.cts +26 -0
  41. package/dist/types-cjs/core/core.d.cts +8 -1
  42. package/dist/types-cjs/core/dev.d.cts +20 -3
  43. package/dist/types-cjs/core/graph.d.cts +1 -0
  44. package/dist/types-cjs/core/lanes.d.cts +4 -16
  45. package/dist/types-cjs/core/scheduler.d.cts +8 -0
  46. package/dist/types-cjs/core/types.d.cts +85 -41
  47. package/dist/types-cjs/store/next/projection.d.cts +0 -16
  48. package/dist/types-cjs/store/next/store.d.cts +6 -0
  49. package/dist/types-cjs/store/next/target.d.cts +18 -0
  50. package/package.json +1 -1
@@ -9,6 +9,12 @@ export declare function getKeySetNode(target: StoreNextTarget): Signal<number>;
9
9
  /** Deep-witness bump: any value/shape change on a record with a live deep()
10
10
  * subscriber notifies it. One null check when unused. */
11
11
  export declare function bumpDeep(t: StoreNextTarget): void;
12
+ /** Downgrade a prototype-overlay pending backing to the clone path: builds
13
+ * the real container (committed + overlay writes − deletes) that fold will
14
+ * SWAP in as the committed backing, exactly as if the draft had started on
15
+ * the clone path. Consumers that need a complete container (reconcile's
16
+ * diff walks, drafts escaping into other storage) call this. */
17
+ export declare function materializePB(target: StoreNextTarget): void;
12
18
  /**
13
19
  * Adoption (2026-08-16c): the incoming object becomes the committed backing
14
20
  * IMMEDIATELY — reconcile is eagerly visible to every reader (shipped
@@ -68,6 +68,24 @@ export interface StoreNextTarget {
68
68
  sc: boolean;
69
69
  /** Backing was swapped by adoption this batch (fold diff-notifies it). */
70
70
  adopted: boolean;
71
+ /** Pending backing is a prototype-chain OVERLAY of the committed backing
72
+ * (`Object.create(v)` — own keys are this batch's writes, everything else
73
+ * reads through). O(written) per flush instead of O(container) clones
74
+ * (#3044); commit flattens own keys onto an owned committed backing in
75
+ * place. Only plain-data non-array non-family containers qualify;
76
+ * `materializePB` downgrades to the clone path when a consumer needs a
77
+ * real container (reconcile, draft escape). */
78
+ ovl: boolean;
79
+ /** Keys deleted in the overlay window (a prototype overlay cannot shadow
80
+ * a delete); null when none. */
81
+ del: Set<PropertyKey> | null;
82
+ /** Keys written through the traps since the last fold commit. Bounds the
83
+ * setter notify/hold-check to O(written) instead of O(subscribed nodes) —
84
+ * a record with thousands of per-key subscriptions (selection maps) would
85
+ * otherwise pay a full node scan on every write. null = no trap writes
86
+ * this batch (bulk paths fall back to the full scan); WK_ALL sentinel =
87
+ * bound unusable this batch (array length write implies index deletes). */
88
+ wk: Set<PropertyKey> | null;
71
89
  /** Projection family, null for plain stores (§7b). */
72
90
  fam: StoreNextFamily | null;
73
91
  /** Shallow store root (values served raw). */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solidjs/signals",
3
- "version": "2.0.0-rc.1",
3
+ "version": "2.0.0-rc.2",
4
4
  "description": "Solid's reactive primitives: signals, memos, effects, stores, and async-aware computations.",
5
5
  "author": "Ryan Carniato",
6
6
  "license": "MIT",