@azx-pbc/axiom-react 0.0.0-stage → 0.0.6

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 (191) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +604 -2
  3. package/dist/FormErrorBoundary.d.ts +37 -0
  4. package/dist/FormErrorBoundary.d.ts.map +1 -0
  5. package/dist/FormErrorBoundary.js +54 -0
  6. package/dist/FormErrorBoundary.js.map +1 -0
  7. package/dist/FormProvider.d.ts +197 -0
  8. package/dist/FormProvider.d.ts.map +1 -0
  9. package/dist/FormProvider.js +149 -0
  10. package/dist/FormProvider.js.map +1 -0
  11. package/dist/field-error.d.ts +154 -0
  12. package/dist/field-error.d.ts.map +1 -0
  13. package/dist/field-error.js +2 -0
  14. package/dist/field-error.js.map +1 -0
  15. package/dist/field-props.d.ts +362 -0
  16. package/dist/field-props.d.ts.map +1 -0
  17. package/dist/field-props.js +64 -0
  18. package/dist/field-props.js.map +1 -0
  19. package/dist/form-context.d.ts +31 -0
  20. package/dist/form-context.d.ts.map +1 -0
  21. package/dist/form-context.js +13 -0
  22. package/dist/form-context.js.map +1 -0
  23. package/dist/form-store.d.ts +784 -0
  24. package/dist/form-store.d.ts.map +1 -0
  25. package/dist/form-store.js +2179 -0
  26. package/dist/form-store.js.map +1 -0
  27. package/dist/hints.d.ts +60 -0
  28. package/dist/hints.d.ts.map +1 -0
  29. package/dist/hints.js +158 -0
  30. package/dist/hints.js.map +1 -0
  31. package/dist/index.d.ts +57 -0
  32. package/dist/index.d.ts.map +1 -0
  33. package/dist/index.js +36 -0
  34. package/dist/index.js.map +1 -0
  35. package/dist/render/field-value.d.ts +92 -0
  36. package/dist/render/field-value.d.ts.map +1 -0
  37. package/dist/render/field-value.js +124 -0
  38. package/dist/render/field-value.js.map +1 -0
  39. package/dist/render/nodes.d.ts +303 -0
  40. package/dist/render/nodes.d.ts.map +1 -0
  41. package/dist/render/nodes.js +325 -0
  42. package/dist/render/nodes.js.map +1 -0
  43. package/dist/render/schema.d.ts +30 -0
  44. package/dist/render/schema.d.ts.map +1 -0
  45. package/dist/render/schema.js +40 -0
  46. package/dist/render/schema.js.map +1 -0
  47. package/dist/render/value-text.d.ts +59 -0
  48. package/dist/render/value-text.d.ts.map +1 -0
  49. package/dist/render/value-text.js +104 -0
  50. package/dist/render/value-text.js.map +1 -0
  51. package/dist/store/array-bindings.d.ts +110 -0
  52. package/dist/store/array-bindings.d.ts.map +1 -0
  53. package/dist/store/array-bindings.js +181 -0
  54. package/dist/store/array-bindings.js.map +1 -0
  55. package/dist/store/bindings.d.ts +12 -0
  56. package/dist/store/bindings.d.ts.map +1 -0
  57. package/dist/store/bindings.js +16 -0
  58. package/dist/store/bindings.js.map +1 -0
  59. package/dist/store/buffer-state.d.ts +42 -0
  60. package/dist/store/buffer-state.d.ts.map +1 -0
  61. package/dist/store/buffer-state.js +51 -0
  62. package/dist/store/buffer-state.js.map +1 -0
  63. package/dist/store/configure.d.ts +19 -0
  64. package/dist/store/configure.d.ts.map +1 -0
  65. package/dist/store/configure.js +28 -0
  66. package/dist/store/configure.js.map +1 -0
  67. package/dist/store/derive.d.ts +106 -0
  68. package/dist/store/derive.d.ts.map +1 -0
  69. package/dist/store/derive.js +417 -0
  70. package/dist/store/derive.js.map +1 -0
  71. package/dist/store/errors.d.ts +20 -0
  72. package/dist/store/errors.d.ts.map +1 -0
  73. package/dist/store/errors.js +101 -0
  74. package/dist/store/errors.js.map +1 -0
  75. package/dist/store/fields.d.ts +35 -0
  76. package/dist/store/fields.d.ts.map +1 -0
  77. package/dist/store/fields.js +81 -0
  78. package/dist/store/fields.js.map +1 -0
  79. package/dist/store/form-channel.d.ts +174 -0
  80. package/dist/store/form-channel.d.ts.map +1 -0
  81. package/dist/store/form-channel.js +411 -0
  82. package/dist/store/form-channel.js.map +1 -0
  83. package/dist/store/gates.d.ts +22 -0
  84. package/dist/store/gates.d.ts.map +1 -0
  85. package/dist/store/gates.js +44 -0
  86. package/dist/store/gates.js.map +1 -0
  87. package/dist/store/ids.d.ts +20 -0
  88. package/dist/store/ids.d.ts.map +1 -0
  89. package/dist/store/ids.js +28 -0
  90. package/dist/store/ids.js.map +1 -0
  91. package/dist/store/inputs.d.ts +114 -0
  92. package/dist/store/inputs.d.ts.map +1 -0
  93. package/dist/store/inputs.js +202 -0
  94. package/dist/store/inputs.js.map +1 -0
  95. package/dist/store/layout.d.ts +81 -0
  96. package/dist/store/layout.d.ts.map +1 -0
  97. package/dist/store/layout.js +285 -0
  98. package/dist/store/layout.js.map +1 -0
  99. package/dist/store/messages.d.ts +56 -0
  100. package/dist/store/messages.d.ts.map +1 -0
  101. package/dist/store/messages.js +157 -0
  102. package/dist/store/messages.js.map +1 -0
  103. package/dist/store/option-pages.d.ts +193 -0
  104. package/dist/store/option-pages.d.ts.map +1 -0
  105. package/dist/store/option-pages.js +598 -0
  106. package/dist/store/option-pages.js.map +1 -0
  107. package/dist/store/parse-print.d.ts +105 -0
  108. package/dist/store/parse-print.d.ts.map +1 -0
  109. package/dist/store/parse-print.js +415 -0
  110. package/dist/store/parse-print.js.map +1 -0
  111. package/dist/store/proposals.d.ts +114 -0
  112. package/dist/store/proposals.d.ts.map +1 -0
  113. package/dist/store/proposals.js +90 -0
  114. package/dist/store/proposals.js.map +1 -0
  115. package/dist/store/publish.d.ts +48 -0
  116. package/dist/store/publish.d.ts.map +1 -0
  117. package/dist/store/publish.js +96 -0
  118. package/dist/store/publish.js.map +1 -0
  119. package/dist/store/snapshots.d.ts +63 -0
  120. package/dist/store/snapshots.d.ts.map +1 -0
  121. package/dist/store/snapshots.js +154 -0
  122. package/dist/store/snapshots.js.map +1 -0
  123. package/dist/store/steps.d.ts +13 -0
  124. package/dist/store/steps.d.ts.map +1 -0
  125. package/dist/store/steps.js +31 -0
  126. package/dist/store/steps.js.map +1 -0
  127. package/dist/store/view.d.ts +124 -0
  128. package/dist/store/view.d.ts.map +1 -0
  129. package/dist/store/view.js +301 -0
  130. package/dist/store/view.js.map +1 -0
  131. package/dist/store/visibility.d.ts +68 -0
  132. package/dist/store/visibility.d.ts.map +1 -0
  133. package/dist/store/visibility.js +231 -0
  134. package/dist/store/visibility.js.map +1 -0
  135. package/dist/store/wizard-cursor.d.ts +43 -0
  136. package/dist/store/wizard-cursor.d.ts.map +1 -0
  137. package/dist/store/wizard-cursor.js +67 -0
  138. package/dist/store/wizard-cursor.js.map +1 -0
  139. package/dist/store/writes.d.ts +50 -0
  140. package/dist/store/writes.d.ts.map +1 -0
  141. package/dist/store/writes.js +91 -0
  142. package/dist/store/writes.js.map +1 -0
  143. package/dist/typed.d.ts +134 -0
  144. package/dist/typed.d.ts.map +1 -0
  145. package/dist/typed.js +74 -0
  146. package/dist/typed.js.map +1 -0
  147. package/dist/useAsyncOptions.d.ts +20 -0
  148. package/dist/useAsyncOptions.d.ts.map +1 -0
  149. package/dist/useAsyncOptions.js +70 -0
  150. package/dist/useAsyncOptions.js.map +1 -0
  151. package/dist/useBufferedInput.d.ts +69 -0
  152. package/dist/useBufferedInput.d.ts.map +1 -0
  153. package/dist/useBufferedInput.js +132 -0
  154. package/dist/useBufferedInput.js.map +1 -0
  155. package/dist/useField.d.ts +42 -0
  156. package/dist/useField.d.ts.map +1 -0
  157. package/dist/useField.js +63 -0
  158. package/dist/useField.js.map +1 -0
  159. package/dist/useFieldArray.d.ts +25 -0
  160. package/dist/useFieldArray.d.ts.map +1 -0
  161. package/dist/useFieldArray.js +18 -0
  162. package/dist/useFieldArray.js.map +1 -0
  163. package/dist/useForm.d.ts +20 -0
  164. package/dist/useForm.d.ts.map +1 -0
  165. package/dist/useForm.js +9 -0
  166. package/dist/useForm.js.map +1 -0
  167. package/dist/useFormState.d.ts +23 -0
  168. package/dist/useFormState.d.ts.map +1 -0
  169. package/dist/useFormState.js +11 -0
  170. package/dist/useFormState.js.map +1 -0
  171. package/dist/useGate.d.ts +15 -0
  172. package/dist/useGate.d.ts.map +1 -0
  173. package/dist/useGate.js +21 -0
  174. package/dist/useGate.js.map +1 -0
  175. package/dist/useLayout.d.ts +29 -0
  176. package/dist/useLayout.d.ts.map +1 -0
  177. package/dist/useLayout.js +59 -0
  178. package/dist/useLayout.js.map +1 -0
  179. package/dist/useMessage.d.ts +58 -0
  180. package/dist/useMessage.d.ts.map +1 -0
  181. package/dist/useMessage.js +62 -0
  182. package/dist/useMessage.js.map +1 -0
  183. package/dist/useWatch.d.ts +19 -0
  184. package/dist/useWatch.d.ts.map +1 -0
  185. package/dist/useWatch.js +17 -0
  186. package/dist/useWatch.js.map +1 -0
  187. package/dist/useWizard.d.ts +166 -0
  188. package/dist/useWizard.d.ts.map +1 -0
  189. package/dist/useWizard.js +554 -0
  190. package/dist/useWizard.js.map +1 -0
  191. package/package.json +62 -3
@@ -0,0 +1,784 @@
1
+ import type { AccessOverlay, CompiledSchema, Engine, EngineFieldDeps, EngineFieldExplanation, EngineFieldState, EngineOperation, EngineOutcome, EvaluationEnv, FieldRef, FormBlocker, LastPass, LayoutNodeView, SessionRefusal, SubmissionProjectionOptions, ValueState, WireValue } from '@azx-pbc/axiom-runtime';
2
+ import type { FieldError } from './field-error.js';
3
+ import type { PublishedFieldProps } from './field-props.js';
4
+ import type { DisplayOptions } from './store/derive.js';
5
+ import type { FormSummary } from './store/form-channel.js';
6
+ import type { FormStoreConfig, FormStoreOverrides, SessionInputs } from './store/inputs.js';
7
+ import type { GateView } from './store/gates.js';
8
+ import type { FieldArrayControls, FieldArrayView } from './store/array-bindings.js';
9
+ import type { LayoutSlice } from './store/layout.js';
10
+ import type { OptionBasis, OptionControls, OptionPageState } from './store/option-pages.js';
11
+ import type { PublishTrace } from './store/publish.js';
12
+ import type { Proposal, ProposalRefusal, WriteProposal } from './store/proposals.js';
13
+ export type { FieldProps, PublishedFieldProps } from './field-props.js';
14
+ export type { FormSummary } from './store/form-channel.js';
15
+ export type { PublishTrace } from './store/publish.js';
16
+ export type { Proposal, ProposalRefusal, WriteProposal } from './store/proposals.js';
17
+ /**
18
+ * The state one render derived before anything is committed: the session it derived, the inputs
19
+ * and display it is rendering with, the raw overrides whose ownership it carries, and the revision
20
+ * that names them.
21
+ *
22
+ * A candidate is never written to by the provider. Committing it adopts the session it holds, and
23
+ * a candidate a discarded render built is simply never committed. The engine it names advances
24
+ * with writes made after the render, which is why `isCurrentCandidate` exists: once committed
25
+ * state has moved on, a control reads the committed session instead.
26
+ */
27
+ export interface FormCandidate {
28
+ readonly engine: Engine;
29
+ readonly inputs: SessionInputs;
30
+ readonly overrides: FormStoreOverrides;
31
+ readonly display: DisplayOptions;
32
+ readonly revision: number;
33
+ }
34
+ /** The imperative surface a form handle exposes, one stable object per session. */
35
+ export interface FormHandle {
36
+ /**
37
+ * Submits the form: validates committed state and either exports or reports.
38
+ *
39
+ * A call already in flight is returned to the second caller rather than posted twice: two
40
+ * `handleSubmit` calls before the first settles share one promise and one `onValid` run.
41
+ * A valid submit exports the writable projection (exactly the values the principal may
42
+ * write, which is the body the accept door expects) and hands it to `onValid`; an invalid
43
+ * one touches only the bindings that block, and reports them to `onInvalid`. Either way
44
+ * `isSubmitting` is cleared when the call settles, unless the provider has unmounted.
45
+ *
46
+ * The two failure lists divide the work: `errors` holds the binding-linked failures a
47
+ * control paints (a rule failure, a missing required value, a cardinality refusal, an
48
+ * invalid option), while `blockers` is the complete readiness answer and the only place a
49
+ * gate item appears. Render `blockers` for completeness and `errors` for binding-linked UI.
50
+ */
51
+ handleSubmit(onValid: (values: Readonly<Record<string, unknown>>) => void | Promise<void>, onInvalid?: (errors: readonly FieldError[], blockers: readonly FormBlocker[]) => void): Promise<void>;
52
+ /**
53
+ * The submit function as an event handler.
54
+ *
55
+ * @deprecated Bind the promise `handleSubmit` returns instead: `void
56
+ * form.handleSubmit(onValid, onInvalid)` in a handler, or `await` it. This alias keeps the
57
+ * previous thunk shape working for existing consumers.
58
+ */
59
+ submitHandler(onValid: (values: Readonly<Record<string, unknown>>) => void | Promise<void>, onInvalid?: (errors: readonly FieldError[], blockers: readonly FormBlocker[]) => void): () => Promise<void>;
60
+ /** Re-baselines the session from `values`, or from the record it opened with. */
61
+ reset(values?: Readonly<Record<string, WireValue>>): void;
62
+ /**
63
+ * The `onHide: "exclude"` projection of committed state.
64
+ *
65
+ * A host that must *decide* whether to submit reads `getState().verdict` (or calls the
66
+ * runtime's `submissionVerdict`) — one answer that folds the report, the gate and readiness.
67
+ * The default projection is the record this server would store, `read_only` values included.
68
+ * The body a client sends is `exportSubmission({ writableOnly: true })`: exactly the values
69
+ * the principal may write, because a non-writable binding is the server's record rather than
70
+ * the client's claim. `handleSubmit` hands its callback that writable projection.
71
+ *
72
+ * A bad wire value still reaches the runtime as a throw because the session validated it at
73
+ * open, so there is no second failure surface here for a value the caller never supplied.
74
+ */
75
+ exportSubmission(options?: SubmissionProjectionOptions): Readonly<Record<string, unknown>>;
76
+ /**
77
+ * The committed record as this session holds it — React Hook Form's `getValues`.
78
+ *
79
+ * It is the host's own client state, copied, not a disclosure channel: the values are the ones
80
+ * the host supplied or the user wrote, and access is consistency rather than confidentiality
81
+ * (`[ACCESS-7.1.1]`). A draft is persisted from here, so it carries values the submission
82
+ * projection deliberately excludes — a `hidden` field, a `write_only` value the session wrote,
83
+ * a value in a `signature_ref`. Use `exportSubmission()` for the projection to send.
84
+ */
85
+ getValues(): Readonly<Record<string, WireValue>>;
86
+ /** The engine's identity-stable per-binding snapshot, selected rather than rebuilt. */
87
+ getField(fieldId: string, rowKey?: string | number): EngineFieldState;
88
+ /** The form-level summary committed state currently states. */
89
+ getState(): FormSummary;
90
+ batch(operations: readonly EngineOperation[]): EngineOutcome;
91
+ /**
92
+ * Derives the state a change set would commit, and what applying it would move, committing
93
+ * nothing. It is the confirmation door: read `delta` to show the effect, then hand the
94
+ * proposal to `applyProposal` or drop it with `discardProposal`.
95
+ */
96
+ propose(operations: readonly EngineOperation[]): Proposal | SessionRefusal;
97
+ /**
98
+ * Commits the exact state a proposal derived.
99
+ *
100
+ * The apply is the keystroke's own: one evaluation, one report, one publish, and the user-write
101
+ * provenance and dirty and touched marks a control's write records. The candidate is committed
102
+ * as the host was shown it, so an assigned row keeps the key the preview minted. A session
103
+ * input the candidate carries (`context`, `env`, `access`) is kept in step with the engine's
104
+ * committed answer, so a later re-open replays the accepted input instead of the one it
105
+ * replaced.
106
+ *
107
+ * A session holds one pending proposal. A staged proposal whose `sequence` is not the latest is
108
+ * refused with `PROPOSAL_SUPERSEDED` and writes nothing, and so is a proposal whose
109
+ * confirmation was declined; an engine refusal (a stale basis) is returned as it always was.
110
+ */
111
+ applyProposal(proposal: Proposal): EngineOutcome | ProposalRefusal;
112
+ /**
113
+ * Writes nothing and repaints.
114
+ *
115
+ * Declining a change set commits nothing to the engine, records no dirty or touched mark and
116
+ * leaves the draft as it was. The store publishes, so a control that showed the declined write
117
+ * in its own state paints its committed value again. Declining the pending proposal clears it
118
+ * and makes it no longer committable; declining an older one leaves the pending proposal in
119
+ * place.
120
+ */
121
+ discardProposal(proposal: Proposal): void;
122
+ setValue(fieldId: string, value: WireValue, rowKey?: string | number): EngineOutcome;
123
+ setNull(fieldId: string, rowKey?: string | number): EngineOutcome;
124
+ removeValue(fieldId: string, rowKey?: string | number): EngineOutcome;
125
+ setContext(root: string, value: WireValue): EngineOutcome;
126
+ setEnv(env: EvaluationEnv): EngineOutcome;
127
+ setAccess(overlay: AccessOverlay): void;
128
+ explainField(fieldId: string, rowKey?: string | number): EngineFieldExplanation;
129
+ inspectFieldDeps(fieldId: string): EngineFieldDeps;
130
+ }
131
+ /** What one churned list may ask a store to count: the live entries of each per-binding cache. */
132
+ export interface RetainedBindings {
133
+ readonly snapshots: number;
134
+ readonly values: number;
135
+ readonly writers: number;
136
+ readonly views: number;
137
+ readonly rowRefs: number;
138
+ /** Bindings recorded as touched, and as written, for the session's dirty/touched answer. */
139
+ readonly touched: number;
140
+ readonly changed: number;
141
+ readonly written: number;
142
+ }
143
+ /**
144
+ * The form session a provider owns: one compiled artifact, one engine in force, and the
145
+ * React-side facts the engine does not keep.
146
+ *
147
+ * The engine owns values, access, row identity, the incremental pass, the derived field state
148
+ * and the submission projection. This class is the session shell: it derives candidate views
149
+ * without mutating committed state, keeps each binding's published props identity stable, holds
150
+ * `touched`/`dirty`/`submitCount` — the facts a session has and a record does not — and
151
+ * publishes only what changed. It owns no fact index, no derivation and no write rule of its
152
+ * own (`[ENGINE-7.1.2]`, `[ENGINE-5.1.3]`).
153
+ */
154
+ export declare class FormStore {
155
+ readonly compiled: CompiledSchema;
156
+ private readonly facts;
157
+ /** Every rule's declared reads, from the artifact's cached dependency inspection. */
158
+ private readonly ruleReads;
159
+ private readonly initialValues;
160
+ private readonly idFactory;
161
+ private readonly subscriptions;
162
+ private readonly formSubscriptions;
163
+ private readonly snapshots;
164
+ private readonly watched;
165
+ private readonly writers;
166
+ private readonly arrays;
167
+ private readonly arraySubscriptions;
168
+ private readonly arrayWriters;
169
+ private readonly optionPages;
170
+ private optionDomains;
171
+ private layoutCache;
172
+ /** The declaration index every slice one publish reads shares, keyed by committed form. */
173
+ private fieldIndex;
174
+ /**
175
+ * One slice per layout node and section id. The keys are artifact identifiers, so the map is
176
+ * bounded by the artifact's chrome and never by a session: a provider mounted for a shift sees
177
+ * the same node ids on its last render as on its first.
178
+ */
179
+ private readonly sliceMemo;
180
+ /** One view per declared gate id: bounded by the artifact, like `sliceMemo`. */
181
+ private readonly gateMemo;
182
+ private readonly layoutSubscriptions;
183
+ /** Consumers whose option basis keyed on a session-wide member may have moved. */
184
+ private readonly basisSubscriptions;
185
+ private publishedBasis;
186
+ private readonly view;
187
+ /** One structurally-shared visibility answer per binding, so unchanged facts keep its identity. */
188
+ private readonly visibilityMemo;
189
+ /** The non-throwing write callbacks of each binding, built beside `writers` so both stay stable. */
190
+ private readonly attemptWriters;
191
+ /**
192
+ * The published props of each base snapshot, keyed by the snapshot they extend.
193
+ *
194
+ * Entries die with their base keys once the snapshot cache drops them, so neither a retire
195
+ * nor a reset clears this: a candidate read and a committed read keep their own extension
196
+ * without evicting one another.
197
+ */
198
+ private readonly publishedPropsMemo;
199
+ /** The last paint list each binding stated, reused while the same failures hold. */
200
+ private readonly announceMemo;
201
+ private session;
202
+ private previewed;
203
+ private hostOverrides;
204
+ private imperativeOverlay;
205
+ /** Inputs an event handler installed, which stay in force while the props name none. */
206
+ private imperativeContext;
207
+ private imperativeEnv;
208
+ private submitCount;
209
+ private isSubmitting;
210
+ /** Whether the last settled submission reached `onValid` and it returned without throwing. */
211
+ private submitSucceeded;
212
+ private inFlight;
213
+ private mounted;
214
+ private published;
215
+ private summary;
216
+ private candidateSummary;
217
+ private trace;
218
+ private reportedPass;
219
+ private publishListener;
220
+ /**
221
+ * The host's staged-write interceptor, when it installed one.
222
+ *
223
+ * It is present exactly when `FormProvider` was given `onWriteProposed`: a session with no
224
+ * interceptor hands every write straight to the engine, so a form that stages nothing pays
225
+ * nothing for the feature.
226
+ */
227
+ private writeInterceptor;
228
+ /**
229
+ * The one staged write the host is confirming, and the order that says which is newest.
230
+ *
231
+ * A session stages at most one write: a newer qualifying write replaces the pending one, so a
232
+ * host never holds two proposals it could apply in either order. `nextProposalSequence` keeps
233
+ * counting after a proposal is cleared, so an older staged proposal is still refused once the
234
+ * newer one has been applied.
235
+ */
236
+ private pendingProposal;
237
+ private nextProposalSequence;
238
+ /**
239
+ * The candidates a host declined while they were the pending confirmation.
240
+ *
241
+ * Cleared pending state alone cannot answer "was this write cancelled": the engine still holds
242
+ * the derived candidate, so a sequence that outlived its confirmation would otherwise look
243
+ * committable. A declined candidate is never applied, and the weak set lets it go with the
244
+ * proposal the host stopped holding.
245
+ */
246
+ private readonly declinedCandidates;
247
+ /**
248
+ * The high-level user writes behind a staged candidate.
249
+ *
250
+ * Replacing an assigned array becomes remove/append operations, but its direct control write
251
+ * marks the container. The candidate key carries that fact through a reconstructed public
252
+ * wrapper without letting wrapper metadata describe a different change set.
253
+ */
254
+ private readonly proposalUserWrites;
255
+ /**
256
+ * The bindings the user has written in this session, by binding key.
257
+ *
258
+ * The engine reports one reference per written binding but not who wrote it, so a host claim
259
+ * and a user's own write look alike there. This is the provenance: a host claim the user never
260
+ * wrote is dropped with the prop that declared it, and one the user did write is replayed —
261
+ * subtracting it would blank the control the user is typing in.
262
+ */
263
+ private readonly userWrites;
264
+ /** The addressable-row index, memoised by the committed form object `publish` saw. */
265
+ private rowIndex;
266
+ /** The view identity a summary is keyed to; a write, blur or submit advances it. */
267
+ private snapshotEpoch;
268
+ private nextRevision;
269
+ private formHandle;
270
+ /**
271
+ * The prefix every element id this session emits begins with.
272
+ *
273
+ * Settled once, when the session opens: `FormProvider` passes the host's `idPrefix` or the
274
+ * `useId()` one it minted for this mount. It is not a display option a host flips mid-session —
275
+ * re-keying every control's id under a rendered label helps no one — so it lives on the store
276
+ * and every display the store derives carries it.
277
+ */
278
+ readonly idPrefix: string;
279
+ constructor(config: FormStoreConfig, idPrefix: string);
280
+ /** The published per-binding props of committed state. */
281
+ getFieldProps(fieldId: string, rowKey?: string | number): PublishedFieldProps;
282
+ /** The per-binding props as one candidate derived them, for the render reading it. */
283
+ getCandidateFieldProps(candidate: FormCandidate, fieldId: string, rowKey?: string | number): PublishedFieldProps;
284
+ /** The engine's identity-stable value state of one binding, as committed. */
285
+ getValueState(fieldId: string, rowKey?: string | number): ValueState;
286
+ /** The value state as one candidate derived it. */
287
+ getCandidateValueState(candidate: FormCandidate, fieldId: string, rowKey?: string | number): ValueState;
288
+ /** The form-level summary of committed state. */
289
+ getFormSummary(): FormSummary;
290
+ /** The form-level summary as one candidate derived it. */
291
+ getCandidateFormSummary(candidate: FormCandidate): FormSummary;
292
+ /** Registers `listener` for one field's binding; the returned release is idempotent. */
293
+ subscribe(fieldId: string, listener: () => void): () => void;
294
+ /**
295
+ * Registers `listener` for one binding — the field, or one row of it — refusing a reference
296
+ * the artifact cannot bind rather than notifying a listener that can never read.
297
+ */
298
+ subscribe(fieldId: string, rowKey: string | number | undefined, listener: () => void): () => void;
299
+ /** Registers `listener` on the form channel; the returned release is idempotent. */
300
+ subscribeForm(listener: () => void): () => void;
301
+ /** How many listeners one binding currently has, so a leak can be counted rather than assumed. */
302
+ subscriptionCount(fieldId: string, rowKey?: string | number): number;
303
+ /**
304
+ * How many live entries each per-binding cache retains.
305
+ *
306
+ * A test seam, like `subscriptionCount`, and not part of the package entry: a list that
307
+ * appends and removes rows has to be able to count what a removed row left behind instead of
308
+ * trusting that the caches let go of it.
309
+ */
310
+ retainedBindings(): RetainedBindings;
311
+ /**
312
+ * Whether the artifact declares a field with this id.
313
+ *
314
+ * A read of the declaration, not of the record: an unmounted row and a withheld value are
315
+ * still declared. The untyped `useField` door reads it for its development guard, so a
316
+ * declared id where a row key belongs names the typed door instead of failing later.
317
+ */
318
+ declaresField(fieldId: string): boolean;
319
+ /**
320
+ * Whether the artifact holds rows under this field: an array container, or a member whose
321
+ * value exists once per row.
322
+ */
323
+ declaresRows(fieldId: string): boolean;
324
+ /**
325
+ * Derives the session state a render with these inputs would read, without assigning any
326
+ * committed state. The same inputs, raw overrides and display return the same candidate, so an
327
+ * unchanged render neither re-evaluates nor replaces a snapshot.
328
+ */
329
+ preview(overrides: FormStoreOverrides, display?: DisplayOptions): FormCandidate;
330
+ /**
331
+ * Adopts a candidate a render derived, and nothing else. A candidate that is not the latest
332
+ * preview belongs to a render React superseded or discarded — a Suspense abort, a transition
333
+ * it threw away — so it commits nothing.
334
+ *
335
+ * It answers whether it adopted a *different* view. A commit that changed nothing needs no
336
+ * publish, which is what keeps an unrelated re-render of the provider from re-deriving every
337
+ * subscribed binding.
338
+ */
339
+ commit(candidate: FormCandidate): boolean;
340
+ /**
341
+ * Applies the evaluation inputs the host is rendering with, as the imperative composition of
342
+ * a preview and a commit, for a caller outside a render. A provider renders through `preview`
343
+ * and commits in the insertion phase instead, so a render it abandons leaves the session
344
+ * untouched.
345
+ */
346
+ configure(overrides: FormStoreOverrides): void;
347
+ /**
348
+ * Tells every subscribed binding whose props object changed, then the form channel if the
349
+ * summary changed. The trace names what this publish delivered and copies the pass counts
350
+ * from the engine's own last-pass trace.
351
+ */
352
+ publish(): void;
353
+ /**
354
+ * Observes every committed-state publish, or clears the observer with `undefined`.
355
+ *
356
+ * A summary-only notification is not a publish: `publishForm` states the changed summary on
357
+ * the form channel alone, so a staged-write confirmation is announced there rather than here.
358
+ */
359
+ observePublishes(listener: ((trace: PublishTrace) => void) | undefined): void;
360
+ /**
361
+ * Installs the staged-write interceptor, or removes it with `undefined`.
362
+ *
363
+ * While one is installed every user write is previewed before it commits: a change set that
364
+ * adds a blocker offering alternatives is staged and reported instead of committed, and the
365
+ * host answers it with `applyProposal` or `discardProposal`. With none installed a write is
366
+ * handed to the engine exactly as before.
367
+ */
368
+ interceptWrites(listener: ((proposal: WriteProposal) => void) | undefined): void;
369
+ /** The engine's counted facts of the last committed pass. */
370
+ lastPass(): LastPass;
371
+ /** The access version committed state was derived under. */
372
+ accessVersion(): number;
373
+ /**
374
+ * The `onHide: "exclude"` submission projection of committed state. It accepts no
375
+ * caller-supplied report, and refuses a signature that would travel without its coverage.
376
+ * `writableOnly` is the body a client sends; the default is the record this process stores.
377
+ */
378
+ exportSubmission(options?: SubmissionProjectionOptions): Readonly<Record<string, unknown>>;
379
+ /**
380
+ * Re-baselines the session from `values`, or from the record it opened with.
381
+ *
382
+ * The new record crosses the wire contract, the engine derives its row identity afresh, and
383
+ * the touched set, the dirty baselines, the submit count and every session write are cleared
384
+ * — so a `write_only` value typed before a reset is no longer readable in the new session.
385
+ */
386
+ reset(values?: Readonly<Record<string, WireValue>>): void;
387
+ /**
388
+ * Drops every cache derived from the session that just ended.
389
+ *
390
+ * `capture()` clears the session facts (baselines, touched, changed, refusals, revealed and
391
+ * per-binding views), but the per-binding props, watched values, writer closures and derived
392
+ * chrome are keyed by binding and would otherwise outlive the reset. A `write_only` value an
393
+ * unread binding still held in `FieldProps.value` is exactly the value `reset()` promises is
394
+ * no longer readable. A binding that is still mounted re-derives on the publish that follows.
395
+ */
396
+ private clearCaches;
397
+ /** The stable write callback for one binding; the same function on every call. */
398
+ setValueFor(fieldId: string, rowKey?: string | number): (value: WireValue) => void;
399
+ /** The stable blur callback for one binding; the same function on every call. */
400
+ blurFor(fieldId: string, rowKey?: string | number): () => void;
401
+ /** One array binding's committed structure: its rows in order and its mutation permissions. */
402
+ getArrayView(fieldId: string): FieldArrayView;
403
+ /** The array structure as one candidate derived it, for the render reading it. */
404
+ getCandidateArrayView(candidate: FormCandidate, fieldId: string): FieldArrayView;
405
+ /** Registers `listener` for one array's structure; the returned release is idempotent. */
406
+ subscribeArray(fieldId: string, listener: () => void): () => void;
407
+ /** The five structural operations of one array, with stable identities. */
408
+ arrayControls(fieldId: string): FieldArrayControls;
409
+ /**
410
+ * The basis one option page list is keyed by, `[MODEL-3.1.8]`.
411
+ *
412
+ * The signature is built from the binding, the source, the declared dependencies' current
413
+ * values, the session record date and the access version, so a change to any of them is a
414
+ * different list. A dependency this device may not read makes the basis unreadable and never
415
+ * reaches the loader. The reader's search text is not a member: it narrows the pages of one
416
+ * domain, and the page machine publishes it and owns the request that answers it.
417
+ */
418
+ optionBasis(fieldId: string, rowKey?: string | number): OptionBasis;
419
+ /**
420
+ * The bindings whose changes re-key one option list.
421
+ *
422
+ * A source declared on a row reads a top-level dependency as it stands and a sibling member
423
+ * in that row, so the list re-renders only for the values its own page keys on.
424
+ */
425
+ optionDependencyRefs(fieldId: string, rowKey?: string | number): readonly FieldRef[];
426
+ /** One binding's current page list. */
427
+ optionState(fieldId: string, rowKey?: string | number): OptionPageState;
428
+ /** Registers a listener for every page-list change; the returned release is idempotent. */
429
+ subscribeOptionPages(listener: () => void): () => void;
430
+ /**
431
+ * Starts a load when the committed basis or the page size moved; a no-op while they hold.
432
+ *
433
+ * The effect's render signature is only its wake-up. Reading the basis at effect time avoids
434
+ * discarding the last committed change when no further render follows it.
435
+ */
436
+ ensureOptions(fieldId: string, rowKey: string | number | undefined, pageSize: number): void;
437
+ /** The stable load-more and reload callbacks of one page list. */
438
+ optionControls(fieldId: string, rowKey?: string | number): OptionControls;
439
+ /**
440
+ * Publishes the reader's search text for one host-loaded binding.
441
+ *
442
+ * The text reaches the page machine at the edit, so the pages that answered the previous
443
+ * query are dropped and its request aborted before the loader is asked for the new one. A
444
+ * binding the reader has not mounted has no pages, so it has nothing to narrow.
445
+ */
446
+ searchOptions(fieldId: string, rowKey: string | number | undefined, text: string): void;
447
+ /** Registers one mounted consumer of a page list; the release cancels when it was the last. */
448
+ retainOptions(fieldId: string, rowKey?: string | number): () => void;
449
+ /** The layout chrome committed state renders, or the candidate's when it is current. */
450
+ layoutViews(candidate: FormCandidate | undefined): readonly LayoutNodeView[];
451
+ /** One layout node's slice, by the node id the artifact states. */
452
+ layoutNode(candidate: FormCandidate | undefined, nodeId: string): LayoutSlice;
453
+ /** One layout section's slice, by the anchor its `sectionId` states. */
454
+ layoutSection(candidate: FormCandidate | undefined, sectionId: string): LayoutSlice;
455
+ /** One gate's state: the named one, or the artifact's primary gate when none is named. */
456
+ gateView(candidate: FormCandidate | undefined, gateId: string | undefined): GateView | undefined;
457
+ /** Registers a listener for every publish that may move chrome; the release is idempotent. */
458
+ subscribeLayout(listener: () => void): () => void;
459
+ /**
460
+ * Registers a listener for a move in the session-wide members of an option basis — the record
461
+ * date and the access version — so a mounted picker re-reads the basis it keys its pages by.
462
+ * A declared dependency's value is a binding of its own; a consumer subscribes to that.
463
+ */
464
+ subscribeOptionBasis(listener: () => void): () => void;
465
+ private arrayViewOf;
466
+ /**
467
+ * Applies one structural write, staging it when the host asked to confirm such a write.
468
+ *
469
+ * A staged structural write committed nothing, so the rows a refusal was about have not moved.
470
+ */
471
+ private structural;
472
+ /** Resolves a positional move, then previews the identity-addressed operation like every write. */
473
+ private moveArray;
474
+ /** Issues one structural write the engine expresses as a call rather than as an operation. */
475
+ private structuralRun;
476
+ private structuralApplied;
477
+ /**
478
+ * Replaces every row of one array through the container write the engine already owns.
479
+ *
480
+ * The container is where an array's whole value lives, so this is the one path that works for
481
+ * a natural-key array and an `assigned` one alike: the engine re-derives row identity from the
482
+ * new values (natural) or mints fresh ids through the host's factory (`assigned`). A row whose
483
+ * natural key survives the replace keeps its `RowRef`, and with it the failure the item rule
484
+ * decided about that key; a row the new list dropped retires, and a row it added starts fresh.
485
+ */
486
+ private replaceArray;
487
+ /** One node's slice, reusing the previous object while every fact it states holds. */
488
+ private layoutSliceOf;
489
+ /**
490
+ * The declaration list indexed by field, shared by every slice one publish reads.
491
+ *
492
+ * Each slice needs the `FormState` entry for each field it places; indexing once per form
493
+ * keeps a host that reads many slices from paying one pass per slice.
494
+ */
495
+ private fieldsById;
496
+ /** The session a read answers from: the candidate while it is current, else committed state. */
497
+ private sessionFor;
498
+ /**
499
+ * A loaded page changed: re-derive committed state with the new domain and publish it.
500
+ *
501
+ * Eligibility is the field's derived `invalidValue`, so the derivation is the only place
502
+ * that answers it — the hook never recomputes it and the engine stores no option state.
503
+ */
504
+ private optionDomainChanged;
505
+ /**
506
+ * Tells the option consumers when the record date or the access version moved.
507
+ *
508
+ * Those two members appear in every basis and no field binding carries them, so nothing else
509
+ * would wake a picker that keys on them. The comparison is against what the last publish
510
+ * delivered: a keystroke re-derives the record but moves neither, so it notifies nobody.
511
+ */
512
+ private publishOptionBasis;
513
+ /**
514
+ * The imperative handle: one identity-stable object that never subscribes, so a host can
515
+ * hold it across renders and call it from an event handler.
516
+ */
517
+ handle(): FormHandle;
518
+ /** Whether a candidate is still the view the session is rendering from. */
519
+ isCurrentCandidate(candidate: FormCandidate): boolean;
520
+ /** Marks the store as mounted, so a settled submission may still publish. */
521
+ mount(): void;
522
+ /**
523
+ * Marks the store as unmounted: a settled submission publishes nothing, and every option
524
+ * request is cancelled so neither a resolve nor a reject writes afterwards.
525
+ */
526
+ unmount(): void;
527
+ private applyContext;
528
+ private applyEnv;
529
+ /**
530
+ * Installs the overlay as the session's access source.
531
+ *
532
+ * A provider that supplies `overlay` or `access` is the access authority, so the imperative
533
+ * call yields to it; with no access prop the overlay sticks across renders, because it is the
534
+ * session's own input from now on.
535
+ */
536
+ private applyAccess;
537
+ /**
538
+ * Applies one user write outside a render and publishes what it changed.
539
+ *
540
+ * A control and the handle reach it with the same engine operations, so the two entry points
541
+ * cannot disagree about provenance, the dirty and touched marks, or whether the session
542
+ * staged the write for confirmation instead of committing it.
543
+ */
544
+ private apply;
545
+ /**
546
+ * Derives the state a change set would commit, and what applying it would move.
547
+ *
548
+ * Nothing is committed, no basis moves and no listener is notified: the answer is the engine's
549
+ * own proposal, so a host can show the effect before deciding.
550
+ */
551
+ propose(operations: readonly EngineOperation[]): Proposal | SessionRefusal;
552
+ /** Commits the state one proposal derived, through the bookkeeping a keystroke performs. */
553
+ applyProposal(proposal: Proposal): EngineOutcome | ProposalRefusal;
554
+ /**
555
+ * Declines one proposal: nothing is written, and every control repaints its committed value.
556
+ *
557
+ * Declining is not a write, so no dirty or touched mark is recorded and the engine's basis is
558
+ * untouched. The store still publishes, because a control may have painted the declined write
559
+ * in its own state before the session answered it.
560
+ */
561
+ discardProposal(proposal: Proposal): void;
562
+ /**
563
+ * Ends a confirmation, when one waits.
564
+ *
565
+ * The pending slot and the summary that stated it are one fact, so every path that makes the
566
+ * staged write no longer answerable calls this rather than clearing the field: a cached summary
567
+ * that survived would keep offering an Accept the session would refuse.
568
+ */
569
+ private retirePending;
570
+ /**
571
+ * Whether a proposal is the one the session is currently prepared to commit.
572
+ *
573
+ * A staged proposal carries the sequence that says so, and a candidate the host declined is
574
+ * refused even though the engine still holds its derived state. A proposal from the `propose`
575
+ * door has no sequence: it is committable while no staged write is pending, and once one is it
576
+ * is the second write door the single pending proposal exists to prevent. Declining a proposal
577
+ * that was never staged therefore never marks it declined: that door asked for a dry run, not
578
+ * for a confirmation, and a bare discard leaves its result committable.
579
+ */
580
+ private isLatestProposal;
581
+ /** Whether the pending proposal is this one, by identity or by the sequence it carries. */
582
+ private isPending;
583
+ /** The refusal a superseded proposal earns, naming the order the session holds. */
584
+ private supersededRefusal;
585
+ /**
586
+ * Keeps the store's own evaluation inputs in step with a commit that changed them.
587
+ *
588
+ * The engine owns the committed context, environment and overlay, but a later render re-opens
589
+ * it from the store's copies when the host's props state an input anew. Without this, an
590
+ * accepted `context`, `env` or `access` operation would be replayed from the value it replaced
591
+ * on the next re-open. `handle.batch` and `applyProposal` both reach it, so the two doors
592
+ * cannot disagree about what the session is now evaluating with.
593
+ */
594
+ private syncCommittedInputs;
595
+ /**
596
+ * Commits one user write, or stages it when the host asked to confirm a suggestion-bearing one.
597
+ *
598
+ * With no interceptor installed the operations reach the engine exactly as they always did. With
599
+ * one, the write is previewed first: a change set that adds a blocker offering alternatives is
600
+ * staged and reported instead of committed, and one that adds none commits the very state the
601
+ * preview derived, so the previewed report, manifest and row keys are the committed ones.
602
+ */
603
+ private writeThrough;
604
+ /** One binding's value before a write, so the write can tell whether the value moved. */
605
+ private valuesBefore;
606
+ /**
607
+ * Records what a committed user write changed: the session's provenance, the dirty comparison,
608
+ * the visit a deliberate write is, and the refusal the write answers.
609
+ */
610
+ private recordUserWrites;
611
+ private submit;
612
+ private runSubmit;
613
+ /**
614
+ * Every array field's addressable rows, as row-key tokens, memoised by the committed form
615
+ * object. A pass that changed nothing keeps the form identity, so a keystroke's publish reuses
616
+ * the index it built for the previous one.
617
+ */
618
+ private addressableRows;
619
+ /**
620
+ * Whether committed state still addresses one binding, so a derivation of it can answer.
621
+ *
622
+ * `reachable` is a supplier because a publish with no row-keyed subscriber must not pay for
623
+ * the index at all; it is called only for a binding that names a row.
624
+ */
625
+ private addresses;
626
+ /**
627
+ * Drops the per-binding caches of a row committed state no longer addresses.
628
+ *
629
+ * The registration is deliberately left in place (see `publish`); the caches are not, because
630
+ * a removed row's `FieldProps` holds its value and nothing would read them again. A row that
631
+ * comes back re-derives, and derives into a session that no longer remembers the old object.
632
+ * The user-write provenance goes too: the engine drops that row's write in the same commit, so
633
+ * keeping the key would only grow the set until a reopen happened to prune it.
634
+ */
635
+ private retireBinding;
636
+ /**
637
+ * The binding keys a failed submit names: a blocking error or an unsatisfied requirement.
638
+ *
639
+ * The answer is read from the engine's committed state rather than from derived props,
640
+ * deliberately: `propsOf` primes the published-snapshot cache, and a binding whose props a
641
+ * submit had just changed would then look unchanged to the `publish` that follows, so a
642
+ * control the user had already visited never heard that its failure was now revealed.
643
+ */
644
+ private failingBindings;
645
+ /**
646
+ * One binding's engine state, with the refusal kept for a key the store never registered.
647
+ *
648
+ * A binding the store keeps registered after its row left is read through the absent arm: a
649
+ * mounted control must be able to render between the row leaving and the control unmounting,
650
+ * and the read is not the place to refuse what the record did. A key no control ever registered
651
+ * is a different answer: nothing in the session addresses it, so `getField` refuses it, and a
652
+ * test or a host learns it typed the wrong key instead of reading a silent empty binding.
653
+ */
654
+ private engineStateOf;
655
+ private propsOf;
656
+ /**
657
+ * The snapshot-layer props of one binding, identity-stable while its published state holds.
658
+ *
659
+ * `publish` compares these — never the published extension, which is a different object by
660
+ * construction — so a publish that moved no fact notifies nobody.
661
+ */
662
+ private snapshotOf;
663
+ /**
664
+ * The props a control renders: the snapshot plus the members the derivation layer does not
665
+ * own.
666
+ *
667
+ * The snapshot keeps its identity while a binding's published state holds, so the extended
668
+ * object is cached against it: the same snapshot always publishes the same props, and a new
669
+ * snapshot publishes once. The non-throwing writers come from the store's own stable cache.
670
+ */
671
+ private publishedProps;
672
+ /**
673
+ * The failures a control renders now, reused while the same failures hold.
674
+ *
675
+ * The list is `visibleErrors` once the control shows a failure, and the painted warnings
676
+ * alone before that. Identity follows content rather than the snapshot: an edit that moves
677
+ * no failure keeps the array the control already rendered.
678
+ */
679
+ private announceFor;
680
+ private valueStateOf;
681
+ private writersOf;
682
+ /** The stable non-throwing write callbacks for one binding; built beside `writersOf`. */
683
+ private tryWritersOf;
684
+ /**
685
+ * Writes one value as the user, refusing by throwing.
686
+ *
687
+ * The attempt is judged the same way `attemptWrite` judges it; a refusal the record never
688
+ * took is raised as the runtime's structured write error, except for a duplicate row key,
689
+ * which the attempt already announced beside its control and published.
690
+ */
691
+ private write;
692
+ /**
693
+ * Writes one value as the user, returning the refusal instead of throwing it.
694
+ *
695
+ * The guard runs before the value is parsed, so a write the rendered state does not permit
696
+ * is refused with its own code rather than by whatever the value happens to be. The value is
697
+ * then parsed against its declaration before the engine sees it, so a control is refused with
698
+ * the same `INVALID_VALUE` code the session handle reports, and the boundary diagnostic rides
699
+ * along as the attempt's cause. The engine then judges the write with its own guard, the same
700
+ * derivation the control rendered.
701
+ */
702
+ private attemptWrite;
703
+ /**
704
+ * Settles one engine verdict for a scalar write.
705
+ *
706
+ * A duplicate row key is announced beside its control and published, because the record never
707
+ * took the entry and the control must name the entry that failed. Any other refusal is
708
+ * returned for the caller: the throwing door raises it, the non-throwing door hands it back.
709
+ * A commit records the provenance the engine cannot state — this binding holds a value the
710
+ * user typed — and clears the refusal the write answered.
711
+ */
712
+ private finishAttempt;
713
+ /**
714
+ * Replaces one assigned array through the structural operations that own its row identity,
715
+ * returning the refusal instead of throwing it.
716
+ *
717
+ * A value that is neither an array nor `null` reached past the declaration parse, so it is
718
+ * still a programmer error and throws.
719
+ */
720
+ private attemptWriteAssignedArray;
721
+ /** Records a blur on a binding the user could actually use, and publishes it. */
722
+ private blur;
723
+ /**
724
+ * One binding's visibility answer, structurally shared while the facts it states hold.
725
+ *
726
+ * The incomplete-rule set is derived from the current state of every field the binding's rules
727
+ * read, so a write to a sibling can change it without replacing this binding's engine state.
728
+ * The memo therefore compares the sets by value and reuses the previous object, which keeps a
729
+ * publish from re-deriving props whose painted answer did not move.
730
+ */
731
+ private visibilityOf;
732
+ /**
733
+ * Brings the sticky reveal set in line with committed state.
734
+ *
735
+ * A failure that is still true keeps its key even when the operand question that would decide
736
+ * whether to paint it changed: a sentence the user has already seen must not flicker away.
737
+ * A failure that is no longer true loses its key, so a later, different failure is judged by
738
+ * the policy afresh rather than inheriting the old paint.
739
+ */
740
+ private reconcileReveal;
741
+ private summaryOf;
742
+ private publishForm;
743
+ /**
744
+ * Records that committed state moved on: nothing previewed survives it, and the next read
745
+ * re-derives. A caller that publishes does so deliberately, so a reconfigure applied during a
746
+ * render stays silent until the commit boundary delivers it.
747
+ */
748
+ private markChanged;
749
+ /** One committed-state change, delivered to its subscribers now. */
750
+ private snapshotChanged;
751
+ /**
752
+ * Baselines every binding from the record a session opened with.
753
+ *
754
+ * The record is read once here, not per derivation: the baseline is what `dirty` compares a
755
+ * binding against, and only this moment and a reset define it.
756
+ */
757
+ private captureBaseline;
758
+ private newCandidate;
759
+ private newSession;
760
+ private sessionOf;
761
+ private sameView;
762
+ /**
763
+ * The inputs one evaluation runs with: the host's props, with the inputs an event handler
764
+ * installed beside them.
765
+ *
766
+ * A prop is the authority for the input it states; an imperative `setAccess`/`setContext`/
767
+ * `setEnv` stays in force only while the props name none, so a host that drives an input from
768
+ * props is never overridden by its own earlier call.
769
+ */
770
+ private effective;
771
+ private defaultDisplay;
772
+ /**
773
+ * Replays the session writes a re-opened engine keeps.
774
+ *
775
+ * The host's current declaration comes first. Beside it travel the engine's references that
776
+ * are the *user's* own writes, and nothing else: a host claim the props no longer state is
777
+ * dropped, so a revoked unlock does not become session-owned, while a claim the user has since
778
+ * written at is kept — the engine cannot tell the two apart, and subtracting it blanks the
779
+ * control mid-edit. Only `reset()` retires a user write.
780
+ */
781
+ private writesFor;
782
+ private open;
783
+ }
784
+ //# sourceMappingURL=form-store.d.ts.map