@solidjs/signals 2.0.0-beta.21 → 2.0.0-beta.22

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.
@@ -81,12 +81,9 @@ export declare class GlobalQueue extends Queue {
81
81
  static _runEffect: (el: Computed<unknown>) => void;
82
82
  static _clearOptimisticStores: ((stores: Set<any>, completing: Transition | null) => void) | null;
83
83
  static _releaseAffectsScope: ((node: OptimisticNode) => void) | null;
84
- static _applyAffectsReads: ((el: Computed<any>, sources: (Signal<any> | Computed<any>)[]) => void) | null;
85
84
  static _releaseAffectsMarks: ((nodes: OptimisticNode[]) => void) | null;
86
85
  static _markAffects: ((node: OptimisticNode) => void) | null;
87
86
  static _releaseAffectsMark: ((node: OptimisticNode) => void) | null;
88
- static _onlyMarkPending: ((el: Computed<any>) => boolean) | null;
89
- static _collectMarkSources: ((el: Computed<any>, into: OptimisticNode[]) => void) | null;
90
87
  static _wireExternalSource: ((self: Computed<any>) => void) | null;
91
88
  static _externalUntrack: (<T>(fn: () => T) => T) | null;
92
89
  static _syncCompanions: (<T>(el: Signal<T> | Computed<T>, value: T) => void) | null;
@@ -97,15 +94,13 @@ export declare class GlobalQueue extends Queue {
97
94
  static _pendingCheck: ((el: OptimisticNode, c: Computed<any> | null, owner: OptimisticNode, firewall: Computed<any> | null) => void) | null;
98
95
  static _recordFresh: ((el: OptimisticNode, value: any) => void) | null;
99
96
  static _applyReask: ((el: Computed<any>, hadReask: boolean) => boolean) | null;
100
- static _repollVerdicts: ((el: Computed<any>) => void) | null;
97
+ static _repollVerdicts: ((el: Computed<any>, snap?: boolean) => void) | null;
101
98
  static _witnessAffects: ((node: OptimisticNode) => void) | null;
102
99
  static _optimisticWrite: (<T>(el: Signal<T> | Computed<T>, v: T | ((prev: T) => T)) => T) | null;
103
100
  static _resolveOptimistic: ((nodes: OptimisticNode[]) => void) | null;
104
- static _stashOptimistic: ((stashedTransition: Transition) => void) | null;
105
101
  static _transitionBlocked: ((transition: Transition) => boolean) | null;
106
102
  static _cleanupLanes: ((completingTransition: Transition | null) => void) | null;
107
103
  static _runLaneEffects: ((type: number) => void) | null;
108
- static _readStashed: ((el: Signal<any>) => boolean) | null;
109
104
  static _gatedRead: ((el: Signal<any>, owner: OptimisticNode, c: Computed<any>) => boolean) | null;
110
105
  static _laneSuspends: ((owner: OptimisticNode) => boolean) | null;
111
106
  static _laneReadsCommitted: ((el: OptimisticNode, owner: OptimisticNode, c: Computed<any>) => boolean) | null;
@@ -59,19 +59,14 @@ export interface RawSignal<T> {
59
59
  _parentSource?: Signal<any> | Computed<any>;
60
60
  /**
61
61
  * Live `affects()` marks on this node (refcount). Non-zero is declared
62
- * motion: the node reads pending regardless of graph state, until every
63
- * declaring transaction settles/reverts and releases its mark.
62
+ * motion: the node and, via the verdict layer's dep-graph coverage walk,
63
+ * everything derived from it reads pending regardless of graph state,
64
+ * until every declaring transaction settles/reverts and releases its mark.
65
+ * This count is the mark's ONLY graph state: the dedicated channel stores
66
+ * nothing downstream and never touches status flags, errors, or pending
67
+ * sources.
64
68
  */
65
69
  _affectsCount?: number;
66
- /**
67
- * The mark's identity on the pending-source rails (lazy, see
68
- * `getAffectsSentinel`). Downstream subscribers hold it in
69
- * `_pendingSources` exactly like a real in-flight source, but with its own
70
- * identity so a landing or quiet re-ask on the node itself can't clear it.
71
- */
72
- _affectsSentinel?: Computed<any>;
73
- /** Set only on sentinels: the marked node this sentinel stands for. */
74
- _affectsFor?: Signal<any> | Computed<any>;
75
70
  }
76
71
  export interface FirewallSignal<T> extends RawSignal<T> {
77
72
  _firewall: Computed<any>;
@@ -4,15 +4,15 @@ import { type Store } from "./store/store.cjs";
4
4
  * Declares that in-flight work will change the targeted data: the named
5
5
  * slot(s) — and everything DERIVED from them — read as pending
6
6
  * (`isPending` → `true`) from the declaration until the surrounding
7
- * transaction settles or reverts. Marks ride the same status rails as real
8
- * in-flight async, so pendingness flows through memos and effects like any
9
- * other pending source, while the marked values themselves stay readable
10
- * (a mark is a promise of change, not an absence of value). This is the
11
- * declaration verb of the pending model — additive only. A mark can turn
12
- * pending ON for data the graph can't see changing yet; nothing can turn
13
- * pending OFF while a real change is in flight a quiet `refresh()`
14
- * re-ask under a mark still reads pending (declaring the reload is what
15
- * makes it a real question).
7
+ * transaction settles or reverts. A mark lives on its own channel — a
8
+ * refcount on the marked node plus dep-graph reachability in the verdict
9
+ * layer so the marked values themselves stay readable (a mark is a promise
10
+ * of change, not an absence of value), no reader ever suspends on one, and
11
+ * completion/settlement accounting never sees one. This is the declaration
12
+ * verb of the pending model additive only. A mark can turn pending ON for
13
+ * data the graph can't see changing yet; nothing can turn pending OFF while
14
+ * a real change is in flight a quiet `refresh()` re-ask under a mark still
15
+ * reads pending (declaring the reload is what makes it a real question).
16
16
  *
17
17
  * Targets:
18
18
  * - `affects(store)` — a store proxy (any record, root or nested): every
@@ -3,7 +3,7 @@ import type { Computed, Link } from "./types.cjs";
3
3
  export declare function addPendingSource(el: Computed<any>, source: Computed<any>): boolean;
4
4
  export declare function setPendingError(el: Computed<any>, source?: Computed<any>, error?: any): void;
5
5
  export declare function forEachDependent(el: Computed<any>, fn: (node: Computed<any>, link: Link) => void): void;
6
- export declare function settlePendingSource(el: Computed<any>, source?: Computed<any>, snap?: boolean): void;
6
+ export declare function settlePendingSource(el: Computed<any>): void;
7
7
  export declare function isThenable<T>(value: T | PromiseLike<T>): value is PromiseLike<T>;
8
8
  export declare function handleAsync<T>(el: Computed<T>, result: T | PromiseLike<T> | AsyncIterable<T>, setter?: (value: T) => void): T;
9
9
  export declare function clearStatus(el: Computed<any>, clearUninitialized?: boolean): void;
@@ -24,6 +24,13 @@
24
24
  */
25
25
  export declare class NotReadyError extends Error {
26
26
  source: any;
27
+ /**
28
+ * Tags a visibility-only notification on the affects() boundary channel:
29
+ * boundaries update display state from it, but the root queue never
30
+ * registers a reporter — marks are invisible to completion accounting by
31
+ * construction.
32
+ */
33
+ _markVisual?: boolean;
27
34
  constructor(source: any);
28
35
  }
29
36
  export declare class StatusError extends Error {
@@ -81,12 +81,9 @@ export declare class GlobalQueue extends Queue {
81
81
  static _runEffect: (el: Computed<unknown>) => void;
82
82
  static _clearOptimisticStores: ((stores: Set<any>, completing: Transition | null) => void) | null;
83
83
  static _releaseAffectsScope: ((node: OptimisticNode) => void) | null;
84
- static _applyAffectsReads: ((el: Computed<any>, sources: (Signal<any> | Computed<any>)[]) => void) | null;
85
84
  static _releaseAffectsMarks: ((nodes: OptimisticNode[]) => void) | null;
86
85
  static _markAffects: ((node: OptimisticNode) => void) | null;
87
86
  static _releaseAffectsMark: ((node: OptimisticNode) => void) | null;
88
- static _onlyMarkPending: ((el: Computed<any>) => boolean) | null;
89
- static _collectMarkSources: ((el: Computed<any>, into: OptimisticNode[]) => void) | null;
90
87
  static _wireExternalSource: ((self: Computed<any>) => void) | null;
91
88
  static _externalUntrack: (<T>(fn: () => T) => T) | null;
92
89
  static _syncCompanions: (<T>(el: Signal<T> | Computed<T>, value: T) => void) | null;
@@ -97,15 +94,13 @@ export declare class GlobalQueue extends Queue {
97
94
  static _pendingCheck: ((el: OptimisticNode, c: Computed<any> | null, owner: OptimisticNode, firewall: Computed<any> | null) => void) | null;
98
95
  static _recordFresh: ((el: OptimisticNode, value: any) => void) | null;
99
96
  static _applyReask: ((el: Computed<any>, hadReask: boolean) => boolean) | null;
100
- static _repollVerdicts: ((el: Computed<any>) => void) | null;
97
+ static _repollVerdicts: ((el: Computed<any>, snap?: boolean) => void) | null;
101
98
  static _witnessAffects: ((node: OptimisticNode) => void) | null;
102
99
  static _optimisticWrite: (<T>(el: Signal<T> | Computed<T>, v: T | ((prev: T) => T)) => T) | null;
103
100
  static _resolveOptimistic: ((nodes: OptimisticNode[]) => void) | null;
104
- static _stashOptimistic: ((stashedTransition: Transition) => void) | null;
105
101
  static _transitionBlocked: ((transition: Transition) => boolean) | null;
106
102
  static _cleanupLanes: ((completingTransition: Transition | null) => void) | null;
107
103
  static _runLaneEffects: ((type: number) => void) | null;
108
- static _readStashed: ((el: Signal<any>) => boolean) | null;
109
104
  static _gatedRead: ((el: Signal<any>, owner: OptimisticNode, c: Computed<any>) => boolean) | null;
110
105
  static _laneSuspends: ((owner: OptimisticNode) => boolean) | null;
111
106
  static _laneReadsCommitted: ((el: OptimisticNode, owner: OptimisticNode, c: Computed<any>) => boolean) | null;
@@ -59,19 +59,14 @@ export interface RawSignal<T> {
59
59
  _parentSource?: Signal<any> | Computed<any>;
60
60
  /**
61
61
  * Live `affects()` marks on this node (refcount). Non-zero is declared
62
- * motion: the node reads pending regardless of graph state, until every
63
- * declaring transaction settles/reverts and releases its mark.
62
+ * motion: the node and, via the verdict layer's dep-graph coverage walk,
63
+ * everything derived from it reads pending regardless of graph state,
64
+ * until every declaring transaction settles/reverts and releases its mark.
65
+ * This count is the mark's ONLY graph state: the dedicated channel stores
66
+ * nothing downstream and never touches status flags, errors, or pending
67
+ * sources.
64
68
  */
65
69
  _affectsCount?: number;
66
- /**
67
- * The mark's identity on the pending-source rails (lazy, see
68
- * `getAffectsSentinel`). Downstream subscribers hold it in
69
- * `_pendingSources` exactly like a real in-flight source, but with its own
70
- * identity so a landing or quiet re-ask on the node itself can't clear it.
71
- */
72
- _affectsSentinel?: Computed<any>;
73
- /** Set only on sentinels: the marked node this sentinel stands for. */
74
- _affectsFor?: Signal<any> | Computed<any>;
75
70
  }
76
71
  export interface FirewallSignal<T> extends RawSignal<T> {
77
72
  _firewall: Computed<any>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solidjs/signals",
3
- "version": "2.0.0-beta.21",
3
+ "version": "2.0.0-beta.22",
4
4
  "description": "Solid's reactive primitives: signals, memos, effects, stores, and async-aware computations.",
5
5
  "author": "Ryan Carniato",
6
6
  "license": "MIT",