@solidjs/signals 2.0.0-rc.2 → 2.0.0-rc.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dev-shared.js +6505 -0
- package/dist/dev.attribution.js +3484 -0
- package/dist/dev.js +10227 -9508
- package/dist/observe/affects-marks.js +86 -0
- package/dist/observe/affects.js +112 -0
- package/dist/observe/attribution.js +7 -0
- package/dist/observe/boundaries.js +696 -0
- package/dist/observe/core/action.js +182 -0
- package/dist/observe/core/async.js +824 -0
- package/dist/observe/core/attribution-costs.js +66 -0
- package/dist/observe/core/attribution-feedback.js +280 -0
- package/dist/observe/core/attribution-hooks.js +83 -0
- package/dist/observe/core/attribution-queries.js +43 -0
- package/dist/observe/core/attribution.js +3079 -0
- package/dist/observe/core/constants.js +269 -0
- package/dist/observe/core/context.js +63 -0
- package/dist/observe/core/copies.js +10 -0
- package/dist/observe/core/core.js +1707 -0
- package/dist/observe/core/dev.js +394 -0
- package/dist/observe/core/effect.js +193 -0
- package/dist/observe/core/error-hooks.js +71 -0
- package/dist/observe/core/error.js +82 -0
- package/dist/observe/core/external.js +97 -0
- package/dist/observe/core/graph.js +162 -0
- package/dist/observe/core/heap.js +124 -0
- package/dist/observe/core/identities.js +62 -0
- package/dist/observe/core/invariants.js +12 -0
- package/dist/observe/core/lanes.js +972 -0
- package/dist/observe/core/owner.js +371 -0
- package/dist/observe/core/scheduler.js +1157 -0
- package/dist/observe/core/truth.js +47 -0
- package/dist/observe/core/verdict.js +470 -0
- package/dist/observe/deferred.js +186 -0
- package/dist/observe/flatten.js +79 -0
- package/dist/observe/from.js +248 -0
- package/dist/observe/index.js +71 -0
- package/dist/observe/map.js +593 -0
- package/dist/observe/reveal.js +212 -0
- package/dist/observe/signals.js +717 -0
- package/dist/observe/store/affects.js +142 -0
- package/dist/observe/store/edges.js +39 -0
- package/dist/observe/store/hooks.js +16 -0
- package/dist/observe/store/index.js +47 -0
- package/dist/observe/store/optimistic.js +713 -0
- package/dist/observe/store/projection.js +345 -0
- package/dist/observe/store/reconcile.js +281 -0
- package/dist/observe/store/store.js +2127 -0
- package/dist/observe/store/storePath.js +103 -0
- package/dist/observe/store/target.js +46 -0
- package/dist/observe/store/types.js +83 -0
- package/dist/observe/store/utils.js +1063 -0
- package/dist/prod/affects-marks.js +86 -0
- package/dist/prod/affects.js +98 -112
- package/dist/prod/attribution.js +45 -0
- package/dist/prod/boundaries.js +578 -468
- package/dist/prod/core/action.js +92 -59
- package/dist/prod/core/async.js +522 -336
- package/dist/prod/core/attribution-hooks.js +3 -0
- package/dist/prod/core/constants.js +168 -44
- package/dist/prod/core/context.js +12 -16
- package/dist/prod/core/copies.js +10 -0
- package/dist/prod/core/core.js +1345 -627
- package/dist/prod/core/dev.js +123 -1
- package/dist/prod/core/effect.js +113 -80
- package/dist/prod/core/error-hooks.js +71 -0
- package/dist/prod/core/error.js +18 -4
- package/dist/prod/core/external.js +6 -7
- package/dist/prod/core/graph.js +119 -72
- package/dist/prod/core/heap.js +85 -109
- package/dist/prod/core/identities.js +62 -0
- package/dist/prod/core/invariants.js +1 -32
- package/dist/prod/core/lanes.js +931 -132
- package/dist/prod/core/owner.js +192 -129
- package/dist/prod/core/scheduler.js +948 -642
- package/dist/prod/core/truth.js +47 -0
- package/dist/prod/core/verdict.js +409 -420
- package/dist/prod/deferred.js +184 -0
- package/dist/prod/flatten.js +77 -0
- package/dist/prod/from.js +248 -0
- package/dist/prod/index.js +40 -16
- package/dist/prod/map.js +481 -211
- package/dist/prod/reveal.js +212 -0
- package/dist/prod/signals.js +401 -84
- package/dist/prod/store/affects.js +142 -0
- package/dist/prod/store/edges.js +39 -0
- package/dist/prod/store/hooks.js +16 -0
- package/dist/prod/store/index.js +27 -18
- package/dist/prod/store/optimistic.js +707 -0
- package/dist/prod/store/projection.js +331 -0
- package/dist/prod/store/reconcile.js +281 -0
- package/dist/prod/store/store.js +1952 -267
- package/dist/prod/store/storePath.js +1 -1
- package/dist/prod/store/target.js +43 -0
- package/dist/prod/store/types.js +83 -0
- package/dist/prod/store/utils.js +997 -138
- package/dist/types/affects-marks.d.ts +14 -0
- package/dist/types/affects.d.ts +12 -30
- package/dist/types/attribution.d.ts +19 -0
- package/dist/types/attribution.prod.d.ts +22 -0
- package/dist/types/boundaries.d.ts +99 -124
- package/dist/types/carved.d.ts +1 -0
- package/dist/types/core/action.d.ts +23 -9
- package/dist/types/core/async.d.ts +34 -6
- package/dist/types/core/attribution-costs.d.ts +35 -0
- package/dist/types/core/attribution-feedback.d.ts +133 -0
- package/dist/types/core/attribution-hooks.d.ts +307 -8
- package/dist/types/core/attribution-queries.d.ts +24 -0
- package/dist/types/core/attribution.d.ts +802 -72
- package/dist/types/core/constants.d.ts +195 -38
- package/dist/types/core/copies.d.ts +54 -0
- package/dist/types/core/core.d.ts +295 -65
- package/dist/types/core/dev.d.ts +509 -22
- package/dist/types/core/effect.d.ts +1 -1
- package/dist/types/core/error-hooks.d.ts +71 -0
- package/dist/types/core/error.d.ts +18 -1
- package/dist/types/core/graph.d.ts +40 -1
- package/dist/types/core/heap.d.ts +5 -5
- package/dist/types/core/identities.d.ts +17 -0
- package/dist/types/core/index.d.ts +11 -7
- package/dist/types/core/invariants.d.ts +1 -26
- package/dist/types/core/lanes.d.ts +74 -43
- package/dist/types/core/owner.d.ts +27 -9
- package/dist/types/core/scheduler.d.ts +353 -102
- package/dist/types/core/truth.d.ts +18 -0
- package/dist/types/core/types.d.ts +97 -71
- package/dist/types/core/verdict.d.ts +35 -0
- package/dist/types/deferred.d.ts +28 -0
- package/dist/types/flatten.d.ts +8 -0
- package/dist/types/from.d.ts +47 -0
- package/dist/types/index.d.ts +33 -7
- package/dist/types/map.d.ts +4 -2
- package/dist/types/reveal.d.ts +19 -0
- package/dist/types/signals.d.ts +196 -45
- package/dist/types/store/affects.d.ts +12 -0
- package/dist/types/store/edges.d.ts +9 -0
- package/dist/types/store/hooks.d.ts +62 -0
- package/dist/types/store/index.d.ts +42 -15
- package/dist/types/store/optimistic.d.ts +24 -45
- package/dist/types/store/projection.d.ts +17 -68
- package/dist/types/store/reconcile.d.ts +3 -46
- package/dist/types/store/store.d.ts +133 -136
- package/dist/types/store/storePath.d.ts +1 -1
- package/dist/types/store/target.d.ts +166 -0
- package/dist/types/store/types.d.ts +105 -0
- package/dist/types/store/utils.d.ts +188 -0
- package/package.json +31 -26
- package/dist/node.cjs +0 -8745
- package/dist/prod/core/optimistic.js +0 -265
- package/dist/prod/store/next/optimistic.js +0 -385
- package/dist/prod/store/next/projection.js +0 -172
- package/dist/prod/store/next/reconcile.js +0 -331
- package/dist/prod/store/next/store.js +0 -1499
- package/dist/prod/store/next/target.js +0 -20
- package/dist/types/core/optimistic.d.ts +0 -6
- package/dist/types/store/next/optimistic.d.ts +0 -20
- package/dist/types/store/next/projection.d.ts +0 -8
- package/dist/types/store/next/reconcile.d.ts +0 -3
- package/dist/types/store/next/store.d.ts +0 -77
- package/dist/types/store/next/target.d.ts +0 -117
- package/dist/types-cjs/affects.d.cts +0 -47
- package/dist/types-cjs/boundaries.d.cts +0 -175
- package/dist/types-cjs/core/action.d.cts +0 -64
- package/dist/types-cjs/core/async.d.cts +0 -21
- package/dist/types-cjs/core/attribution-hooks.d.cts +0 -52
- package/dist/types-cjs/core/attribution.d.cts +0 -186
- package/dist/types-cjs/core/constants.d.cts +0 -97
- package/dist/types-cjs/core/context.d.cts +0 -36
- package/dist/types-cjs/core/core.d.cts +0 -163
- package/dist/types-cjs/core/dev.d.cts +0 -81
- package/dist/types-cjs/core/effect.d.cts +0 -30
- package/dist/types-cjs/core/error.d.cts +0 -47
- package/dist/types-cjs/core/external.d.cts +0 -15
- package/dist/types-cjs/core/graph.d.cts +0 -6
- package/dist/types-cjs/core/heap.d.cts +0 -22
- package/dist/types-cjs/core/index.d.cts +0 -13
- package/dist/types-cjs/core/invariants.d.cts +0 -59
- package/dist/types-cjs/core/lanes.d.cts +0 -44
- package/dist/types-cjs/core/optimistic.d.cts +0 -6
- package/dist/types-cjs/core/owner.d.cts +0 -124
- package/dist/types-cjs/core/scheduler.d.cts +0 -180
- package/dist/types-cjs/core/types.d.cts +0 -192
- package/dist/types-cjs/core/verdict.d.cts +0 -2
- package/dist/types-cjs/index.d.cts +0 -10
- package/dist/types-cjs/map.d.cts +0 -69
- package/dist/types-cjs/package.json +0 -3
- package/dist/types-cjs/signals.d.cts +0 -624
- package/dist/types-cjs/store/index.d.cts +0 -19
- package/dist/types-cjs/store/next/optimistic.d.cts +0 -20
- package/dist/types-cjs/store/next/projection.d.cts +0 -8
- package/dist/types-cjs/store/next/reconcile.d.cts +0 -3
- package/dist/types-cjs/store/next/store.d.cts +0 -77
- package/dist/types-cjs/store/next/target.d.cts +0 -117
- package/dist/types-cjs/store/optimistic.d.cts +0 -45
- package/dist/types-cjs/store/projection.d.cts +0 -70
- package/dist/types-cjs/store/reconcile.d.cts +0 -46
- package/dist/types-cjs/store/store.d.cts +0 -138
- package/dist/types-cjs/store/storePath.d.cts +0 -58
- package/dist/types-cjs/store/utils.d.cts +0 -74
|
@@ -4,20 +4,28 @@ export declare const REACTIVE_DIRTY: number;
|
|
|
4
4
|
export declare const REACTIVE_RECOMPUTING_DEPS: number;
|
|
5
5
|
export declare const REACTIVE_IN_HEAP: number;
|
|
6
6
|
export declare const REACTIVE_IN_HEAP_HEIGHT: number;
|
|
7
|
+
/** L2 — the node sits on its owner's parked frame (`_x._pendingFirstChild`):
|
|
8
|
+
* it is the displayed frame until the owner's commit disposes it. Set by
|
|
9
|
+
* `markDisposal` over the parked subtree; carried through every per-pass
|
|
10
|
+
* flag wipe (#3543). Scheduling reads it once, at the heap pop: a zombie's
|
|
11
|
+
* recompute is deferred past the seam (`deferZombie`). */
|
|
7
12
|
export declare const REACTIVE_ZOMBIE: number;
|
|
8
13
|
export declare const REACTIVE_DISPOSED: number;
|
|
9
|
-
|
|
14
|
+
/** L2 — this pass read the future (a tracked read of a CONFIG_HELD node).
|
|
15
|
+
* Lives for the pass only: set by `read`, consumed by `recompute`'s publish
|
|
16
|
+
* (a first pass that read the future is born held, A29), wiped with the
|
|
17
|
+
* pass's other per-pass bits. */
|
|
18
|
+
export declare const REACTIVE_JOINED: number;
|
|
10
19
|
export declare const REACTIVE_SNAPSHOT_STALE: number;
|
|
11
20
|
export declare const REACTIVE_LAZY: number;
|
|
12
21
|
export declare const REACTIVE_MANUAL_WRITE: number;
|
|
13
|
-
/**
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
|
|
20
|
-
export declare const REACTIVE_REASK: number;
|
|
22
|
+
/** L2, rule 3 — the node's LAST pass was a render effect's read of the
|
|
23
|
+
* future as committed (`frameRead`): the frame shows the committed world
|
|
24
|
+
* beside a future it also derives from, and re-derives at the landing.
|
|
25
|
+
* Survives its own pass's wipe; the next pass's wipe clears it (a pass that
|
|
26
|
+
* re-derived the frame — in the future, or without the held read — owes the
|
|
27
|
+
* landing nothing). The landing consumes it (the transaction's `_reruns`). */
|
|
28
|
+
export declare const REACTIVE_FRAME_READ: number;
|
|
21
29
|
/**
|
|
22
30
|
* A dependency write landed while this subscriber was mid-recompute — a
|
|
23
31
|
* nested pull committed beneath one of its reads (#3037). The heap refuses
|
|
@@ -27,6 +35,44 @@ export declare const REACTIVE_REASK: number;
|
|
|
27
35
|
* either re-read later in the pass (fresh) or trimmed with it (not a dep).
|
|
28
36
|
*/
|
|
29
37
|
export declare const REACTIVE_MISSED_WAKE: number;
|
|
38
|
+
/** A `refresh()` asked this node to re-ask its question (A19 exc. 2, A24):
|
|
39
|
+
* consumed by the next pass, which — going pending — classifies its flight
|
|
40
|
+
* quiet (`_x._reask`). */
|
|
41
|
+
export declare const REACTIVE_REASK: number;
|
|
42
|
+
/** The pass was served a node's ambient staging — written this flush, not
|
|
43
|
+
* held. If the flush parks, the pass is the frame's with it (the same sync
|
|
44
|
+
* frame as the async): a verdict read cannot break it out. Per pass. */
|
|
45
|
+
export declare const REACTIVE_STAGED_READ: number;
|
|
46
|
+
/** The pass entered a verdict window (`isPending`/`latest`). Per pass: a
|
|
47
|
+
* pass that did not keeps CONFIG_VERDICT no longer — the frame-reader
|
|
48
|
+
* posture lasts exactly as long as the probing does. */
|
|
49
|
+
export declare const REACTIVE_PROBED: number;
|
|
50
|
+
/** Lanes — the node (a lane's member) was dirtied by the lane's own
|
|
51
|
+
* re-staging (a re-guess, lane work re-derived): its next pass is the
|
|
52
|
+
* lane's from the start (`recompute`), not a stale reader's re-run by an
|
|
53
|
+
* unrelated write (#3460). Consumed by the pass. */
|
|
54
|
+
export declare const REACTIVE_LANE_DIRTY: number;
|
|
55
|
+
/** Lanes (plan sec. 28) — the pass read a lane's value as lane work (`enterLane`): a
|
|
56
|
+
* tracked derivation's read of displayed optimism, a verdict read routed
|
|
57
|
+
* into the holder's verdict lane. A pass in a lane's seat that read none of
|
|
58
|
+
* its world has left the lane (`recompute`'s tail). Per pass. */
|
|
59
|
+
export declare const REACTIVE_LANE_READ: number;
|
|
60
|
+
/** Lanes (plan sec. 28) — a render effect in the frame's seat was served the screen
|
|
61
|
+
* for a lane's node (`laneRead`: a stale reader of a lane that has not
|
|
62
|
+
* shown). Its pass computing exactly what it last applied has nothing to
|
|
63
|
+
* run — an effect has no comparator, and the guess's notification is not a
|
|
64
|
+
* change it can see. Per pass. */
|
|
65
|
+
export declare const REACTIVE_SCREEN_READ: number;
|
|
66
|
+
/** A verdict reader whose probe was answered before the flush had a
|
|
67
|
+
* transaction (verdict.ts `watchVerdict`): the seam re-runs it even if a
|
|
68
|
+
* later read of the same pass routed it into a verdict lane — that was not
|
|
69
|
+
* the probe's answer (lanes.ts). Per pass. */
|
|
70
|
+
export declare const REACTIVE_PROBE_UNANSWERED: number;
|
|
71
|
+
/** The pass opened a verdict window of its own (`isPending`/`latest`) — not
|
|
72
|
+
* only read a verdict memo (F-6, core.ts `read`). An async memo whose pass
|
|
73
|
+
* did not is D-25's hold work while its flight is up (verdict.ts
|
|
74
|
+
* `holdWork`). Per pass (1 << 20 is lanes.ts's LEFT_SHOWN). */
|
|
75
|
+
export declare const REACTIVE_WINDOW: number;
|
|
30
76
|
export declare const CONFIG_OWNED_WRITE: number;
|
|
31
77
|
export declare const CONFIG_NO_SNAPSHOT: number;
|
|
32
78
|
export declare const CONFIG_TRANSPARENT: number;
|
|
@@ -34,46 +80,152 @@ export declare const CONFIG_IN_SNAPSHOT_SCOPE: number;
|
|
|
34
80
|
export declare const CONFIG_CHILDREN_FORBIDDEN: number;
|
|
35
81
|
export declare const CONFIG_AUTO_DISPOSE: number;
|
|
36
82
|
export declare const CONFIG_SYNC: number;
|
|
37
|
-
|
|
38
|
-
|
|
83
|
+
/** The node has a pass awaiting commit: its live children (and `_disposal`)
|
|
84
|
+
* are that pass's and were never shown — a re-pass tears them down on the
|
|
85
|
+
* spot, while the frame parked on `_x._pendingFirstChild` keeps waiting for
|
|
86
|
+
* the commit. Set by `recompute` when it queues the node. */
|
|
87
|
+
export declare const CONFIG_STAGED: number;
|
|
88
|
+
/** The node's staged state is in the future: the flush that staged it
|
|
89
|
+
* parked. A write to it, a tracked read of it by a derivation, or a pass
|
|
90
|
+
* over a derivation holding it joins the future (the flush parks). Render
|
|
91
|
+
* effects are the frame, not derivations (rule 3): reading it outside a
|
|
92
|
+
* parking flush they see the committed value and hold nothing, and are
|
|
93
|
+
* re-derived at the landing. Set at the park seam on every staged node. */
|
|
94
|
+
export declare const CONFIG_HELD: number;
|
|
95
|
+
/** A member of the uncommitted frame a held pass built (ruling A): set at
|
|
96
|
+
* the park seam on every computed under a staged node (`holdFrame`). Never
|
|
97
|
+
* shown, it has no screen: its reads are its transaction's, whichever flush
|
|
98
|
+
* runs it (`bornInto`, #4010). Cleared by its commit. */
|
|
99
|
+
export declare const CONFIG_HELD_FRAME: number;
|
|
100
|
+
/** A15's reveal corollary (#3305): a commit published this flight's inputs
|
|
101
|
+
* beneath it — the node was pending, nothing staged, when it committed — so
|
|
102
|
+
* its committed value is torn against the visible frame. A render effect
|
|
103
|
+
* revealing it cannot be a stale reader: it observes the flight (pends,
|
|
104
|
+
* holds) instead of showing the pre-flight value. Outlives the flight that
|
|
105
|
+
* earned it for as long as the node stays pending, and no longer: the
|
|
106
|
+
* commit that lands a value clears it. */
|
|
107
|
+
export declare const CONFIG_INPUTS_PUBLISHED: number;
|
|
108
|
+
/** Lanes (plan sec. 28) — the node has a lane's value (`_x._lane`): a written guess
|
|
109
|
+
* (CONFIG_GUESS) or a lane pass's derivation of one. Its lane is
|
|
110
|
+
* `_x._transaction`. The gate to the lane arm of `read`; `_value` stays the
|
|
111
|
+
* committed truth and `_pendingValue` a transaction's staging throughout —
|
|
112
|
+
* a value's world is where it lives, never a bit. */
|
|
113
|
+
export declare const CONFIG_OVERRIDE: number;
|
|
114
|
+
/** A store slot node (`slotSignal`): a leaf, presence, container or deep
|
|
115
|
+
* witness of a store target. One literal, no `_x` at birth; the last-one-out
|
|
116
|
+
* sweep dispatches it to the store's shared release hook (graph.ts) instead
|
|
117
|
+
* of a per-node `_unobserved` closure. */
|
|
118
|
+
export declare const CONFIG_SLOT_NODE: number;
|
|
119
|
+
/** A store slot node whose staging is a USER setter's proposal, not its
|
|
120
|
+
* derive's derivation (A34 (3)'s discriminator for derived stores — the
|
|
121
|
+
* leaf twin of REACTIVE_MANUAL_WRITE). Set by the user setter, cleared by
|
|
122
|
+
* the derive's own write to the key. */
|
|
123
|
+
export declare const CONFIG_MANUAL_WRITE: number;
|
|
124
|
+
/** D-41: the staged value in `_pendingValue` is an error — an
|
|
125
|
+
* answer of the held frame, published at its landing like a value. */
|
|
126
|
+
export declare const CONFIG_STAGED_ERROR: number;
|
|
127
|
+
/** Lanes — the node carries a written guess (`optimisticWrite`): its own
|
|
128
|
+
* source recomputing it, or a plain write landing on it, is the truth
|
|
129
|
+
* (`supersede`). A lane's derived staging is not. */
|
|
130
|
+
export declare const CONFIG_GUESS: number;
|
|
131
|
+
/** The node's pass read a verdict (`isPending`/`latest`): a dependency going
|
|
132
|
+
* pending is a question for its next pass — the verdict changed — so the
|
|
133
|
+
* propagation re-derives it instead of marking it pending (as a kept-tail
|
|
134
|
+
* link does, A30). Set at the window, never cleared: a reader that stopped
|
|
135
|
+
* asking re-derives once and goes pending through its own read. The same
|
|
136
|
+
* bit as REACTIVE_PROBED: a pass's probe (or a read of a verdict memo,
|
|
137
|
+
* core.ts `read`) carries into the config at its end without a shift. */
|
|
138
|
+
export declare const CONFIG_VERDICT: number;
|
|
139
|
+
/** A dependency's status is a question for this node's pass, not a fact
|
|
140
|
+
* about its current one: the propagation re-derives it instead of marking
|
|
141
|
+
* it, for errors as for pending (as CONFIG_VERDICT). A boundary's output
|
|
142
|
+
* (show the content, or the fallback) and its `on` node (boundaries.ts); a
|
|
143
|
+
* promise over an expression (`resolve`/`until`, signals.ts: the pass reads
|
|
144
|
+
* the error and rejects, or re-asks a pending source). */
|
|
145
|
+
export declare const CONFIG_REDERIVE: number;
|
|
146
|
+
/** An answered `createDeferred` node (deferred.ts): held because a
|
|
147
|
+
* downstream hold staged its landing, its re-pass is a lagging question,
|
|
148
|
+
* not an answer, and joins no transaction (D-40). */
|
|
149
|
+
export declare const CONFIG_LAGS: number;
|
|
150
|
+
/** The reader wants the truth, not the lane's guess (`until`, signals.ts):
|
|
151
|
+
* a read of displayed optimism serves the base the guess covers, makes the
|
|
152
|
+
* pass no lane's, and the truth landing wakes it even when it confirms the
|
|
153
|
+
* guess (the one case ordinary subscribers are not told — A17's silence). */
|
|
154
|
+
export declare const CONFIG_AUTHORITATIVE: number;
|
|
39
155
|
export declare const CONFIG_HAS_SNAPSHOT: number;
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
|
|
156
|
+
/** Fresh-pull reader (awaitable `refresh()`'s waiter effect): a read of a
|
|
157
|
+
* dirty source recomputes it inline even when the height gate defers to the
|
|
158
|
+
* flush. Closes the same-flush ordering race where a waiter created
|
|
159
|
+
* alongside a refresh() mark read the PRE-re-ask value as settled and
|
|
160
|
+
* delivered stale; with the pull, the waiter either parks on the re-ask's
|
|
161
|
+
* pending window (async — woken by the settle walk, which runs on every
|
|
162
|
+
* landing including equal-value ones) or serves its sync answer. resolve()
|
|
163
|
+
* deliberately keeps that race — its contract is "first settled value"
|
|
164
|
+
* (#2930), not "next quiescent state". */
|
|
165
|
+
export declare const CONFIG_FRESH_READ: number;
|
|
166
|
+
/** A28 (4): the node was written inside a recompute that ran OUTSIDE a flush
|
|
167
|
+
* (a creation-time compute — boundary machinery, a mapArray's first run). Such
|
|
168
|
+
* a write is promoted at that recompute's end: readers in the same block see
|
|
169
|
+
* it. Cleared when the next flush begins; set only on that rare path. */
|
|
170
|
+
export declare const CONFIG_PROMOTED: number;
|
|
171
|
+
/** Observe tiers only: the node is framework plumbing (the `solid-js/refresh`
|
|
172
|
+
* HMR memo between a component's root and its body) — it has no name, is no
|
|
173
|
+
* segment of any owner path, and the attribution engine records nothing about
|
|
174
|
+
* it (creation, re-runs, checks) and does not count it toward another scope's
|
|
175
|
+
* WIDE_SCOPE_DEPS or a write's engine-side HUGE_FAN_OUT, while the nodes it
|
|
176
|
+
* owns stay fully observed.
|
|
177
|
+
* Set from the internal `_plumbing` option at creation; never set in prod. */
|
|
178
|
+
export declare const CONFIG_PLUMBING: number;
|
|
179
|
+
/** Observe tiers only: a framework scope wide by construction (`@solidjs/web`'s
|
|
180
|
+
* insert child-resolution pass, which must track each row's resolved child) —
|
|
181
|
+
* the attribution engine's WIDE_SCOPE_DEPS skips it; the always-on HUGE_FAN_IN
|
|
182
|
+
* does not. Set from the internal `_wide` option at creation by dev builds only
|
|
183
|
+
* (the observe artifact mangles the option name, as it does `_plumbing`). */
|
|
184
|
+
export declare const CONFIG_WIDE: number;
|
|
185
|
+
/** Observe tiers only: a framework async node that supersedes its own flights
|
|
186
|
+
* by design (`@solidjs/web/frames`' per-key slot-arg memo, re-run by every
|
|
187
|
+
* re-shipped record while the arg is still pending) — the attribution
|
|
188
|
+
* engine's ABANDONED_FLIGHTS skips it; its flight records and the feedback
|
|
189
|
+
* fold's counts are unchanged. Set from the internal `_supersedes` option at
|
|
190
|
+
* creation by dev builds only (the observe artifact mangles the option name,
|
|
191
|
+
* as it does `_wide`). */
|
|
192
|
+
export declare const CONFIG_SUPERSEDES: number;
|
|
193
|
+
/** Observe tiers only: the memo `merge()` creates for a function source — a
|
|
194
|
+
* key bag readers consume key by key, built by the framework (a compiled
|
|
195
|
+
* component spread) with options no user can reach. The attribution engine's
|
|
196
|
+
* UNSTABLE_MEMO_OUTPUT skips it: a fresh-but-equal bag is the idiom
|
|
197
|
+
* (`{...(on() ? { a } : {})}`), and the advice (`equals`) cannot be applied
|
|
198
|
+
* (#4256). Set through `_extraConfig` by observe builds only. */
|
|
199
|
+
export declare const CONFIG_KEY_BAG: number;
|
|
200
|
+
/** The frame (rule 3, D-3): a render effect (set at creation, as
|
|
201
|
+
* `EFFECT_RENDER << 23` — keep the two in step), and a boundary's tree and
|
|
202
|
+
* output (boundaries.ts) — structure between the content and the render
|
|
203
|
+
* effect that shows it, not a user derivation of the content. Outside a
|
|
204
|
+
* hold's own flush it reads that hold's values as committed and is
|
|
205
|
+
* re-derived at its landing, and a re-pass of it publishes mainline: it
|
|
206
|
+
* joins nothing, so two mounts under one boundary made in separate flushes
|
|
207
|
+
* keep their holds apart (D-4, S-5 rows 1′–3′, #4283). */
|
|
208
|
+
export declare const CONFIG_FRAME: number;
|
|
209
|
+
/** The node's last answering pass registered a flight: an async memo. Kept
|
|
210
|
+
* by the verdict engine alone (verdict.ts `holdWork`), which reads it. */
|
|
211
|
+
export declare const CONFIG_ASYNC: number;
|
|
54
212
|
export declare const STATUS_NONE = 0;
|
|
55
213
|
export declare const STATUS_PENDING: number;
|
|
56
214
|
export declare const STATUS_ERROR: number;
|
|
57
215
|
export declare const STATUS_UNINITIALIZED: number;
|
|
216
|
+
/** An error that answered a node's first read (no value has ever landed):
|
|
217
|
+
* the error, not UNINITIALIZED, is its status while shown, but a re-ask
|
|
218
|
+
* makes it uninitialized-pending again — it still has no value (#4244). */
|
|
219
|
+
export declare const STATUS_NO_VALUE: number;
|
|
220
|
+
/** `catchHook`'s answer when the catcher is a boundary re-armed by
|
|
221
|
+
* `on` (truthy, as any catch): what it collects is its own, not the hold's. */
|
|
222
|
+
export declare const CAUGHT_REARMED = 2;
|
|
58
223
|
export declare const EFFECT_PURE = 0;
|
|
59
224
|
export declare const EFFECT_RENDER = 1;
|
|
60
225
|
export declare const EFFECT_USER = 2;
|
|
61
226
|
export declare const EFFECT_TRACKED = 3;
|
|
62
227
|
export declare const NOT_PENDING: {};
|
|
63
228
|
export declare const NO_SNAPSHOT: {};
|
|
64
|
-
/**
|
|
65
|
-
* Stand-in stored in `_overrideValue` for an optimistic write of literal
|
|
66
|
-
* `undefined` (#2898). The slot doubles as the optimistic-node brand
|
|
67
|
-
* (`undefined` = not optimistic, `NOT_PENDING` = at rest), so the raw value
|
|
68
|
-
* would erase the node's optimistic identity: the write turns invisible and
|
|
69
|
-
* follow-up writes route off the optimistic path and commit permanently.
|
|
70
|
-
* Same shape as NO_SNAPSHOT. Sites that surface the override VALUE unwrap
|
|
71
|
-
* via `visibleOverrideValue`; slot identity tests stay raw.
|
|
72
|
-
*/
|
|
73
|
-
export declare const OVERRIDE_UNDEFINED: {};
|
|
74
|
-
/** Unwrap an active override's stored value for surfacing to readers (#2898). */
|
|
75
|
-
export declare function unwrapOverride<T = any>(v: unknown): T;
|
|
76
|
-
export declare const STORE_SNAPSHOT_PROPS = "sp";
|
|
77
229
|
export declare const SUPPORTS_PROXY: boolean;
|
|
78
230
|
export declare const defaultContext: {};
|
|
79
231
|
/**
|
|
@@ -95,3 +247,8 @@ export declare const $REFRESH: unique symbol;
|
|
|
95
247
|
export type Refreshable<T> = T & {
|
|
96
248
|
readonly [$REFRESH]: any;
|
|
97
249
|
};
|
|
250
|
+
/** `Set` under a module binding. Bundlers mark a bare `new Set()` pure with
|
|
251
|
+
* a `/* @__PURE__ *\/` comment that survives minification (16 bytes a site);
|
|
252
|
+
* a construction through a binding carries none. Same constructor, so the
|
|
253
|
+
* same objects. */
|
|
254
|
+
export declare const NewSet: SetConstructor;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dev: duplicate-copy detection.
|
|
3
|
+
*
|
|
4
|
+
* Two copies of Solid on a page are only a bug when they meet: one copy's
|
|
5
|
+
* code runs inside the other's computation or component and finds no owner
|
|
6
|
+
* or listener of its own (each copy keeps them in its own module state), so
|
|
7
|
+
* it neither reacts nor sees the other's providers. That is the shape of
|
|
8
|
+
* every duplicate report on record: a library's precompiled JSX on copy B
|
|
9
|
+
* reading the app's props or signals from copy A, a runtime that bundled its
|
|
10
|
+
* own solid-js. Copies that never meet (a devtools panel rendering into its
|
|
11
|
+
* own root, an isolated widget) are fine at any version, so nothing is
|
|
12
|
+
* checked when a copy loads.
|
|
13
|
+
*
|
|
14
|
+
* Every copy from 2.0 on shares one global record, `Solid$$copies`. It is a
|
|
15
|
+
* contract between all future versions of Solid, so its shape never changes:
|
|
16
|
+
*
|
|
17
|
+
* - `copies`: each copy adds 1 when it loads.
|
|
18
|
+
* - `running`: while `copies > 1`, each copy names itself here (an object
|
|
19
|
+
* with a `rooted` boolean, compared by identity) around its computations
|
|
20
|
+
* and components, and restores the previous value after.
|
|
21
|
+
*
|
|
22
|
+
* A copy that sees `copies < 2` skips the slot entirely, so a page with one
|
|
23
|
+
* copy pays one property read per check. v1 keeps its own load-time `Solid$$`
|
|
24
|
+
* check, which this never sets, so neither side warns about the other.
|
|
25
|
+
*/
|
|
26
|
+
interface SolidCopy {
|
|
27
|
+
/** This copy has created a root of its own (it renders by itself). */
|
|
28
|
+
rooted: boolean;
|
|
29
|
+
}
|
|
30
|
+
interface SolidCopies {
|
|
31
|
+
copies: number;
|
|
32
|
+
running: SolidCopy | undefined;
|
|
33
|
+
}
|
|
34
|
+
declare global {
|
|
35
|
+
var Solid$$copies: SolidCopies | undefined;
|
|
36
|
+
}
|
|
37
|
+
export declare function markCopyRooted(): void;
|
|
38
|
+
/**
|
|
39
|
+
* Marks this copy as the one running; returns the slot's previous value. A
|
|
40
|
+
* nested run of the same copy (most runs inside a flush) only reads the slot.
|
|
41
|
+
*/
|
|
42
|
+
export declare function enterCopy(): SolidCopy | undefined;
|
|
43
|
+
export declare function exitCopy(prev: SolidCopy | undefined): void;
|
|
44
|
+
/** @internal Runs `fn` with this copy marked as the one running. */
|
|
45
|
+
export declare function runAsSolidCopy<T>(fn: () => T): T;
|
|
46
|
+
/** @internal An ownerless component or context read: warns if another copy is running. */
|
|
47
|
+
export declare function checkForeignOwnerless(): void;
|
|
48
|
+
/**
|
|
49
|
+
* An untracked read: warns if another copy's computation is running, unless
|
|
50
|
+
* both copies render through roots of their own (an app calling into an
|
|
51
|
+
* isolated copy's API, which reads its own state untracked by design).
|
|
52
|
+
*/
|
|
53
|
+
export declare function checkForeignRead(): void;
|
|
54
|
+
export {};
|