@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.
- package/LICENSE +21 -0
- package/README.md +604 -2
- package/dist/FormErrorBoundary.d.ts +37 -0
- package/dist/FormErrorBoundary.d.ts.map +1 -0
- package/dist/FormErrorBoundary.js +54 -0
- package/dist/FormErrorBoundary.js.map +1 -0
- package/dist/FormProvider.d.ts +197 -0
- package/dist/FormProvider.d.ts.map +1 -0
- package/dist/FormProvider.js +149 -0
- package/dist/FormProvider.js.map +1 -0
- package/dist/field-error.d.ts +154 -0
- package/dist/field-error.d.ts.map +1 -0
- package/dist/field-error.js +2 -0
- package/dist/field-error.js.map +1 -0
- package/dist/field-props.d.ts +362 -0
- package/dist/field-props.d.ts.map +1 -0
- package/dist/field-props.js +64 -0
- package/dist/field-props.js.map +1 -0
- package/dist/form-context.d.ts +31 -0
- package/dist/form-context.d.ts.map +1 -0
- package/dist/form-context.js +13 -0
- package/dist/form-context.js.map +1 -0
- package/dist/form-store.d.ts +784 -0
- package/dist/form-store.d.ts.map +1 -0
- package/dist/form-store.js +2179 -0
- package/dist/form-store.js.map +1 -0
- package/dist/hints.d.ts +60 -0
- package/dist/hints.d.ts.map +1 -0
- package/dist/hints.js +158 -0
- package/dist/hints.js.map +1 -0
- package/dist/index.d.ts +57 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +36 -0
- package/dist/index.js.map +1 -0
- package/dist/render/field-value.d.ts +92 -0
- package/dist/render/field-value.d.ts.map +1 -0
- package/dist/render/field-value.js +124 -0
- package/dist/render/field-value.js.map +1 -0
- package/dist/render/nodes.d.ts +303 -0
- package/dist/render/nodes.d.ts.map +1 -0
- package/dist/render/nodes.js +325 -0
- package/dist/render/nodes.js.map +1 -0
- package/dist/render/schema.d.ts +30 -0
- package/dist/render/schema.d.ts.map +1 -0
- package/dist/render/schema.js +40 -0
- package/dist/render/schema.js.map +1 -0
- package/dist/render/value-text.d.ts +59 -0
- package/dist/render/value-text.d.ts.map +1 -0
- package/dist/render/value-text.js +104 -0
- package/dist/render/value-text.js.map +1 -0
- package/dist/store/array-bindings.d.ts +110 -0
- package/dist/store/array-bindings.d.ts.map +1 -0
- package/dist/store/array-bindings.js +181 -0
- package/dist/store/array-bindings.js.map +1 -0
- package/dist/store/bindings.d.ts +12 -0
- package/dist/store/bindings.d.ts.map +1 -0
- package/dist/store/bindings.js +16 -0
- package/dist/store/bindings.js.map +1 -0
- package/dist/store/buffer-state.d.ts +42 -0
- package/dist/store/buffer-state.d.ts.map +1 -0
- package/dist/store/buffer-state.js +51 -0
- package/dist/store/buffer-state.js.map +1 -0
- package/dist/store/configure.d.ts +19 -0
- package/dist/store/configure.d.ts.map +1 -0
- package/dist/store/configure.js +28 -0
- package/dist/store/configure.js.map +1 -0
- package/dist/store/derive.d.ts +106 -0
- package/dist/store/derive.d.ts.map +1 -0
- package/dist/store/derive.js +417 -0
- package/dist/store/derive.js.map +1 -0
- package/dist/store/errors.d.ts +20 -0
- package/dist/store/errors.d.ts.map +1 -0
- package/dist/store/errors.js +101 -0
- package/dist/store/errors.js.map +1 -0
- package/dist/store/fields.d.ts +35 -0
- package/dist/store/fields.d.ts.map +1 -0
- package/dist/store/fields.js +81 -0
- package/dist/store/fields.js.map +1 -0
- package/dist/store/form-channel.d.ts +174 -0
- package/dist/store/form-channel.d.ts.map +1 -0
- package/dist/store/form-channel.js +411 -0
- package/dist/store/form-channel.js.map +1 -0
- package/dist/store/gates.d.ts +22 -0
- package/dist/store/gates.d.ts.map +1 -0
- package/dist/store/gates.js +44 -0
- package/dist/store/gates.js.map +1 -0
- package/dist/store/ids.d.ts +20 -0
- package/dist/store/ids.d.ts.map +1 -0
- package/dist/store/ids.js +28 -0
- package/dist/store/ids.js.map +1 -0
- package/dist/store/inputs.d.ts +114 -0
- package/dist/store/inputs.d.ts.map +1 -0
- package/dist/store/inputs.js +202 -0
- package/dist/store/inputs.js.map +1 -0
- package/dist/store/layout.d.ts +81 -0
- package/dist/store/layout.d.ts.map +1 -0
- package/dist/store/layout.js +285 -0
- package/dist/store/layout.js.map +1 -0
- package/dist/store/messages.d.ts +56 -0
- package/dist/store/messages.d.ts.map +1 -0
- package/dist/store/messages.js +157 -0
- package/dist/store/messages.js.map +1 -0
- package/dist/store/option-pages.d.ts +193 -0
- package/dist/store/option-pages.d.ts.map +1 -0
- package/dist/store/option-pages.js +598 -0
- package/dist/store/option-pages.js.map +1 -0
- package/dist/store/parse-print.d.ts +105 -0
- package/dist/store/parse-print.d.ts.map +1 -0
- package/dist/store/parse-print.js +415 -0
- package/dist/store/parse-print.js.map +1 -0
- package/dist/store/proposals.d.ts +114 -0
- package/dist/store/proposals.d.ts.map +1 -0
- package/dist/store/proposals.js +90 -0
- package/dist/store/proposals.js.map +1 -0
- package/dist/store/publish.d.ts +48 -0
- package/dist/store/publish.d.ts.map +1 -0
- package/dist/store/publish.js +96 -0
- package/dist/store/publish.js.map +1 -0
- package/dist/store/snapshots.d.ts +63 -0
- package/dist/store/snapshots.d.ts.map +1 -0
- package/dist/store/snapshots.js +154 -0
- package/dist/store/snapshots.js.map +1 -0
- package/dist/store/steps.d.ts +13 -0
- package/dist/store/steps.d.ts.map +1 -0
- package/dist/store/steps.js +31 -0
- package/dist/store/steps.js.map +1 -0
- package/dist/store/view.d.ts +124 -0
- package/dist/store/view.d.ts.map +1 -0
- package/dist/store/view.js +301 -0
- package/dist/store/view.js.map +1 -0
- package/dist/store/visibility.d.ts +68 -0
- package/dist/store/visibility.d.ts.map +1 -0
- package/dist/store/visibility.js +231 -0
- package/dist/store/visibility.js.map +1 -0
- package/dist/store/wizard-cursor.d.ts +43 -0
- package/dist/store/wizard-cursor.d.ts.map +1 -0
- package/dist/store/wizard-cursor.js +67 -0
- package/dist/store/wizard-cursor.js.map +1 -0
- package/dist/store/writes.d.ts +50 -0
- package/dist/store/writes.d.ts.map +1 -0
- package/dist/store/writes.js +91 -0
- package/dist/store/writes.js.map +1 -0
- package/dist/typed.d.ts +134 -0
- package/dist/typed.d.ts.map +1 -0
- package/dist/typed.js +74 -0
- package/dist/typed.js.map +1 -0
- package/dist/useAsyncOptions.d.ts +20 -0
- package/dist/useAsyncOptions.d.ts.map +1 -0
- package/dist/useAsyncOptions.js +70 -0
- package/dist/useAsyncOptions.js.map +1 -0
- package/dist/useBufferedInput.d.ts +69 -0
- package/dist/useBufferedInput.d.ts.map +1 -0
- package/dist/useBufferedInput.js +132 -0
- package/dist/useBufferedInput.js.map +1 -0
- package/dist/useField.d.ts +42 -0
- package/dist/useField.d.ts.map +1 -0
- package/dist/useField.js +63 -0
- package/dist/useField.js.map +1 -0
- package/dist/useFieldArray.d.ts +25 -0
- package/dist/useFieldArray.d.ts.map +1 -0
- package/dist/useFieldArray.js +18 -0
- package/dist/useFieldArray.js.map +1 -0
- package/dist/useForm.d.ts +20 -0
- package/dist/useForm.d.ts.map +1 -0
- package/dist/useForm.js +9 -0
- package/dist/useForm.js.map +1 -0
- package/dist/useFormState.d.ts +23 -0
- package/dist/useFormState.d.ts.map +1 -0
- package/dist/useFormState.js +11 -0
- package/dist/useFormState.js.map +1 -0
- package/dist/useGate.d.ts +15 -0
- package/dist/useGate.d.ts.map +1 -0
- package/dist/useGate.js +21 -0
- package/dist/useGate.js.map +1 -0
- package/dist/useLayout.d.ts +29 -0
- package/dist/useLayout.d.ts.map +1 -0
- package/dist/useLayout.js +59 -0
- package/dist/useLayout.js.map +1 -0
- package/dist/useMessage.d.ts +58 -0
- package/dist/useMessage.d.ts.map +1 -0
- package/dist/useMessage.js +62 -0
- package/dist/useMessage.js.map +1 -0
- package/dist/useWatch.d.ts +19 -0
- package/dist/useWatch.d.ts.map +1 -0
- package/dist/useWatch.js +17 -0
- package/dist/useWatch.js.map +1 -0
- package/dist/useWizard.d.ts +166 -0
- package/dist/useWizard.d.ts.map +1 -0
- package/dist/useWizard.js +554 -0
- package/dist/useWizard.js.map +1 -0
- package/package.json +62 -3
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A deterministic factory over one seed, for a server render and the hydration that matches it.
|
|
3
|
+
*
|
|
4
|
+
* The ids are a function of the seed and the ordinal alone, so a server render and the client
|
|
5
|
+
* that hydrates it mint the same ids when each builds its own factory over the same seed.
|
|
6
|
+
* Nothing makes that seed unique: two sessions over records that mean different things must not
|
|
7
|
+
* share one, or their rows collide when the records are merged — the seed is the host's choice
|
|
8
|
+
* of scope, `[IDENT-2.1.2]`.
|
|
9
|
+
*
|
|
10
|
+
* A row id is a wire identifier, not free text: `IDENTIFIER_PATTERN` admits a lower-case letter
|
|
11
|
+
* then lower-case letters, digits and underscores, so a seed like `device-a` cannot pass
|
|
12
|
+
* through. The seed is therefore normalised once: lower-cased, every other character mapped to `_`,
|
|
13
|
+
* prefixed with `p` when it does not begin with a lower-case letter so leading digits survive, and
|
|
14
|
+
* truncated to leave room for the ordinal, which is appended with an underscore. Two distinct
|
|
15
|
+
* seeds that normalise alike would still collide, which is why the seed remains the host's scope
|
|
16
|
+
* decision rather than something this factory invents.
|
|
17
|
+
*/
|
|
18
|
+
export function seededIdFactory(seed) {
|
|
19
|
+
const cleaned = seed.toLowerCase().replace(/[^a-z0-9_]/gu, '_');
|
|
20
|
+
const prefixed = /^[a-z]/u.test(cleaned) ? cleaned : `p${cleaned}`;
|
|
21
|
+
const scope = prefixed.slice(0, 48);
|
|
22
|
+
let ordinal = 0;
|
|
23
|
+
return () => {
|
|
24
|
+
ordinal += 1;
|
|
25
|
+
return `${scope}_${String(ordinal)}`;
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=ids.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ids.js","sourceRoot":"","sources":["../../src/store/ids.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,eAAe,CAAC,IAAY;IAC1C,MAAM,OAAO,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,cAAc,EAAE,GAAG,CAAC,CAAC;IAChE,MAAM,QAAQ,GAAG,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,OAAO,EAAE,CAAC;IACnE,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IACpC,IAAI,OAAO,GAAG,CAAC,CAAC;IAChB,OAAO,GAAW,EAAE;QAClB,OAAO,IAAI,CAAC,CAAC;QACb,OAAO,GAAG,KAAK,IAAI,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC;IACvC,CAAC,CAAC;AACJ,CAAC","sourcesContent":["import type { IdFactory } from '@azx-pbc/axiom-runtime';\n\n/**\n * A deterministic factory over one seed, for a server render and the hydration that matches it.\n *\n * The ids are a function of the seed and the ordinal alone, so a server render and the client\n * that hydrates it mint the same ids when each builds its own factory over the same seed.\n * Nothing makes that seed unique: two sessions over records that mean different things must not\n * share one, or their rows collide when the records are merged — the seed is the host's choice\n * of scope, `[IDENT-2.1.2]`.\n *\n * A row id is a wire identifier, not free text: `IDENTIFIER_PATTERN` admits a lower-case letter\n * then lower-case letters, digits and underscores, so a seed like `device-a` cannot pass\n * through. The seed is therefore normalised once: lower-cased, every other character mapped to `_`,\n * prefixed with `p` when it does not begin with a lower-case letter so leading digits survive, and\n * truncated to leave room for the ordinal, which is appended with an underscore. Two distinct\n * seeds that normalise alike would still collide, which is why the seed remains the host's scope\n * decision rather than something this factory invents.\n */\nexport function seededIdFactory(seed: string): IdFactory {\n const cleaned = seed.toLowerCase().replace(/[^a-z0-9_]/gu, '_');\n const prefixed = /^[a-z]/u.test(cleaned) ? cleaned : `p${cleaned}`;\n const scope = prefixed.slice(0, 48);\n let ordinal = 0;\n return (): string => {\n ordinal += 1;\n return `${scope}_${String(ordinal)}`;\n };\n}\n"]}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import type { AccessEntry, AccessOverlay, CompiledSchema, EvaluationEnv, CancellationPort, EvaluationInput, FieldRef, IdFactory, OptionDomains, WireValue } from '@azx-pbc/axiom-runtime';
|
|
2
|
+
import type { OptionLoader, QueryDefer } from './option-pages.js';
|
|
3
|
+
/**
|
|
4
|
+
* The evaluation inputs a mounted provider owns, resolved once from its props.
|
|
5
|
+
*
|
|
6
|
+
* The artifact and the starting record are read at mount; everything here is a live prop the
|
|
7
|
+
* provider may replace, so a host that revokes access re-evaluates the session with the new
|
|
8
|
+
* answer and keeps the values entered so far.
|
|
9
|
+
*/
|
|
10
|
+
export interface SessionInputs {
|
|
11
|
+
readonly context: Readonly<Record<string, unknown>> | undefined;
|
|
12
|
+
readonly overlay: AccessOverlay | undefined;
|
|
13
|
+
readonly access: readonly AccessEntry[] | undefined;
|
|
14
|
+
readonly redacted: readonly FieldRef[] | undefined;
|
|
15
|
+
readonly sessionWrites: readonly FieldRef[];
|
|
16
|
+
readonly env: EvaluationEnv;
|
|
17
|
+
/** The option domain each loaded binding offers, which one derivation reads for eligibility. */
|
|
18
|
+
readonly optionDomains: OptionDomains | undefined;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* The inputs a mounted provider may replace without losing the entered values: everything a
|
|
22
|
+
* session was opened with except the artifact and the starting record.
|
|
23
|
+
*/
|
|
24
|
+
export interface FormStoreOverrides {
|
|
25
|
+
readonly context?: Readonly<Record<string, unknown>>;
|
|
26
|
+
/** The host's 4-level overlay; a session that supplies it must not also supply `access`. */
|
|
27
|
+
readonly overlay?: AccessOverlay;
|
|
28
|
+
readonly access?: readonly AccessEntry[];
|
|
29
|
+
readonly redacted?: readonly FieldRef[];
|
|
30
|
+
readonly sessionWrites?: readonly FieldRef[];
|
|
31
|
+
readonly env?: EvaluationEnv;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* What the provider hands the store at mount; the store owns the values afterwards.
|
|
35
|
+
*
|
|
36
|
+
* The option loaders, cancellation factory and query timer are mount-time too: a page list
|
|
37
|
+
* belongs to the session that started it, and a loader set the host swaps under a live session
|
|
38
|
+
* would leave half its pages answered by one authority and half by another.
|
|
39
|
+
*/
|
|
40
|
+
export interface FormStoreConfig extends FormStoreOverrides {
|
|
41
|
+
readonly compiled: CompiledSchema;
|
|
42
|
+
readonly initialValues: Readonly<Record<string, WireValue>>;
|
|
43
|
+
/**
|
|
44
|
+
* The host's source of assigned row ids, `[IDENT-2.1.2]`.
|
|
45
|
+
*
|
|
46
|
+
* Required when the artifact declares an `assigned` array: the store mints no id of its own,
|
|
47
|
+
* because a constant prefix would make two independent sessions collide and a process counter
|
|
48
|
+
* would make two renders of one record disagree. Every call must return an id that has not
|
|
49
|
+
* named a row before; the engine refuses a session whose rows share one.
|
|
50
|
+
*/
|
|
51
|
+
readonly idFactory?: IdFactory;
|
|
52
|
+
/**
|
|
53
|
+
* The identity manifest a resumed record carries, keyed by array `fieldId`.
|
|
54
|
+
*
|
|
55
|
+
* Replaying it restores the row keys the record was written with, so a draft saved elsewhere
|
|
56
|
+
* addresses the same rows here — and seals the same `reportHash` — instead of acquiring fresh
|
|
57
|
+
* ones. Read once at mount, with `initialValues`, and checked against them: the engine refuses
|
|
58
|
+
* a manifest that names an id twice or a count the record does not hold, `[IDENT-2.1.7]`.
|
|
59
|
+
*/
|
|
60
|
+
readonly rowManifest?: Readonly<Record<string, readonly string[]>>;
|
|
61
|
+
readonly optionSources?: Readonly<Record<string, OptionLoader>>;
|
|
62
|
+
/** Creates one cancellation port per option page list; a host may supply its own. */
|
|
63
|
+
readonly cancellation?: () => CancellationPort;
|
|
64
|
+
/**
|
|
65
|
+
* The host's timer for a search that waits for the reader to stop typing, `[MODEL-3.1.8]`.
|
|
66
|
+
* A search attempted without one is refused before a loader is called.
|
|
67
|
+
*/
|
|
68
|
+
readonly defer?: QueryDefer;
|
|
69
|
+
}
|
|
70
|
+
/** Resolves the host's props to the concrete inputs one evaluation runs with. */
|
|
71
|
+
export declare function resolveSessionInputs(inputs: FormStoreOverrides): SessionInputs;
|
|
72
|
+
/**
|
|
73
|
+
* The evaluation input one session runs with: the record, the context and the access answer.
|
|
74
|
+
*
|
|
75
|
+
* One builder, so the engine's pass and the presentation channel resolve the same record and
|
|
76
|
+
* neither can read an input the other was not given. The access answer is one arm of the
|
|
77
|
+
* runtime's `AccessSource` union — `FormProviderProps` already refuses both at the props, and
|
|
78
|
+
* this switch writes the arm the compiler can prove rather than spreading two optionals into a
|
|
79
|
+
* union that states them as alternatives.
|
|
80
|
+
*/
|
|
81
|
+
export declare function evaluationInputOf(inputs: SessionInputs, values: Readonly<Record<string, WireValue>>, sessionWrites: readonly FieldRef[]): EvaluationInput;
|
|
82
|
+
/**
|
|
83
|
+
* Whether two resolved input sets state the same evaluation inputs, so a render does no work.
|
|
84
|
+
*
|
|
85
|
+
* The declarative members — the access projection, the redaction list, the session writes, the
|
|
86
|
+
* overlay, the context and the environment — are compared by value. A host that computes
|
|
87
|
+
* `access={resolveAccess(state)}` or `env={{ recordDate }}` inline hands over a fresh object on
|
|
88
|
+
* every render that states the same answer, and identity comparison would open a new engine over
|
|
89
|
+
* the whole record for each of them. The snapshot caches are what then keep equal inputs from
|
|
90
|
+
* re-rendering a control, because the candidate a render derives keeps its identity.
|
|
91
|
+
*
|
|
92
|
+
* `optionDomains` stays by identity: it is the page machine's own map, rebuilt only when a page
|
|
93
|
+
* moves, and a value comparison of it would read every loaded page on every render.
|
|
94
|
+
*/
|
|
95
|
+
export declare function sameInputs(left: SessionInputs, right: SessionInputs): boolean;
|
|
96
|
+
/**
|
|
97
|
+
* Whether two raw prop sets state the same inputs.
|
|
98
|
+
*
|
|
99
|
+
* Presence is the fact the provider owns — an input the host states is the authority for it, and
|
|
100
|
+
* one it stops stating is retired — so a member stated on one side only makes the sets different.
|
|
101
|
+
* Whether the stated *value* also moved decides whether the session has to re-derive.
|
|
102
|
+
*/
|
|
103
|
+
export declare function sameOverrides(left: FormStoreOverrides, right: FormStoreOverrides): boolean;
|
|
104
|
+
/**
|
|
105
|
+
* Both access sources were supplied. One could be the stale answer, so the call is refused
|
|
106
|
+
* rather than letting either win, `[ACCESS-2.1.5]`.
|
|
107
|
+
*/
|
|
108
|
+
export declare class AccessSourceError extends Error {
|
|
109
|
+
readonly code = "ACCESS_SOURCE_INVALID";
|
|
110
|
+
constructor();
|
|
111
|
+
}
|
|
112
|
+
/** The access source a host supplied, refusing the pair that would make one answer stale. */
|
|
113
|
+
export declare function assertOneAccessSource(overlay: AccessOverlay | undefined, access: readonly AccessEntry[] | undefined): void;
|
|
114
|
+
//# sourceMappingURL=inputs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inputs.d.ts","sourceRoot":"","sources":["../../src/store/inputs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,WAAW,EACX,aAAa,EACb,cAAc,EACd,aAAa,EACb,gBAAgB,EAChB,eAAe,EACf,QAAQ,EACR,SAAS,EACT,aAAa,EACb,SAAS,EACV,MAAM,wBAAwB,CAAC;AAEhC,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAElE;;;;;;GAMG;AACH,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC;IAChE,QAAQ,CAAC,OAAO,EAAE,aAAa,GAAG,SAAS,CAAC;IAC5C,QAAQ,CAAC,MAAM,EAAE,SAAS,WAAW,EAAE,GAAG,SAAS,CAAC;IACpD,QAAQ,CAAC,QAAQ,EAAE,SAAS,QAAQ,EAAE,GAAG,SAAS,CAAC;IACnD,QAAQ,CAAC,aAAa,EAAE,SAAS,QAAQ,EAAE,CAAC;IAC5C,QAAQ,CAAC,GAAG,EAAE,aAAa,CAAC;IAC5B,gGAAgG;IAChG,QAAQ,CAAC,aAAa,EAAE,aAAa,GAAG,SAAS,CAAC;CACnD;A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rB,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,EAC3C,aAAa,EAAE,SAAS,QAAQ,EAAE,GACjC,eAAe,CAUjB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE,aAAa,GAAG,OAAO,CAW7E;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,kBAAkB,EAAE,KAAK,EAAE,kBAAkB,GAAG,OAAO,CAU1F;AAuHD;;;GAGG;AACH,qBAAa,iBAAkB,SAAQ,KAAK;IAC1C,QAAQ,CAAC,IAAI,2BAA2B;IAExC,cAKC;CACF;AAED,6FAA6F;AAC7F,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,aAAa,GAAG,SAAS,EAClC,MAAM,EAAE,SAAS,WAAW,EAAE,GAAG,SAAS,GACzC,IAAI,CAEN"}
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
import { isRecord } from '@azx-pbc/axiom-runtime';
|
|
2
|
+
/** Stable stand-ins for an omitted input, so a resolved set can be compared by identity. */
|
|
3
|
+
const NO_SESSION_WRITES = [];
|
|
4
|
+
const NO_ENV = {};
|
|
5
|
+
/** Resolves the host's props to the concrete inputs one evaluation runs with. */
|
|
6
|
+
export function resolveSessionInputs(inputs) {
|
|
7
|
+
return {
|
|
8
|
+
context: inputs.context,
|
|
9
|
+
overlay: inputs.overlay,
|
|
10
|
+
access: inputs.access,
|
|
11
|
+
redacted: inputs.redacted,
|
|
12
|
+
sessionWrites: inputs.sessionWrites ?? NO_SESSION_WRITES,
|
|
13
|
+
env: inputs.env ?? NO_ENV,
|
|
14
|
+
optionDomains: undefined,
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* The evaluation input one session runs with: the record, the context and the access answer.
|
|
19
|
+
*
|
|
20
|
+
* One builder, so the engine's pass and the presentation channel resolve the same record and
|
|
21
|
+
* neither can read an input the other was not given. The access answer is one arm of the
|
|
22
|
+
* runtime's `AccessSource` union — `FormProviderProps` already refuses both at the props, and
|
|
23
|
+
* this switch writes the arm the compiler can prove rather than spreading two optionals into a
|
|
24
|
+
* union that states them as alternatives.
|
|
25
|
+
*/
|
|
26
|
+
export function evaluationInputOf(inputs, values, sessionWrites) {
|
|
27
|
+
const base = {
|
|
28
|
+
values,
|
|
29
|
+
...(inputs.context === undefined ? {} : { context: inputs.context }),
|
|
30
|
+
...(inputs.redacted === undefined ? {} : { redacted: inputs.redacted }),
|
|
31
|
+
...(sessionWrites.length === 0 ? {} : { sessionWrites }),
|
|
32
|
+
};
|
|
33
|
+
if (inputs.overlay !== undefined)
|
|
34
|
+
return { ...base, overlay: inputs.overlay };
|
|
35
|
+
if (inputs.access !== undefined)
|
|
36
|
+
return { ...base, access: inputs.access };
|
|
37
|
+
return { ...base };
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Whether two resolved input sets state the same evaluation inputs, so a render does no work.
|
|
41
|
+
*
|
|
42
|
+
* The declarative members — the access projection, the redaction list, the session writes, the
|
|
43
|
+
* overlay, the context and the environment — are compared by value. A host that computes
|
|
44
|
+
* `access={resolveAccess(state)}` or `env={{ recordDate }}` inline hands over a fresh object on
|
|
45
|
+
* every render that states the same answer, and identity comparison would open a new engine over
|
|
46
|
+
* the whole record for each of them. The snapshot caches are what then keep equal inputs from
|
|
47
|
+
* re-rendering a control, because the candidate a render derives keeps its identity.
|
|
48
|
+
*
|
|
49
|
+
* `optionDomains` stays by identity: it is the page machine's own map, rebuilt only when a page
|
|
50
|
+
* moves, and a value comparison of it would read every loaded page on every render.
|
|
51
|
+
*/
|
|
52
|
+
export function sameInputs(left, right) {
|
|
53
|
+
if (left === right)
|
|
54
|
+
return true;
|
|
55
|
+
return (sameContext(left.context, right.context) &&
|
|
56
|
+
sameOverlay(left.overlay, right.overlay) &&
|
|
57
|
+
sameAccess(left.access, right.access) &&
|
|
58
|
+
sameRefs(left.redacted, right.redacted) &&
|
|
59
|
+
sameRefs(left.sessionWrites, right.sessionWrites) &&
|
|
60
|
+
sameEnv(left.env, right.env) &&
|
|
61
|
+
left.optionDomains === right.optionDomains);
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Whether two raw prop sets state the same inputs.
|
|
65
|
+
*
|
|
66
|
+
* Presence is the fact the provider owns — an input the host states is the authority for it, and
|
|
67
|
+
* one it stops stating is retired — so a member stated on one side only makes the sets different.
|
|
68
|
+
* Whether the stated *value* also moved decides whether the session has to re-derive.
|
|
69
|
+
*/
|
|
70
|
+
export function sameOverrides(left, right) {
|
|
71
|
+
if (left === right)
|
|
72
|
+
return true;
|
|
73
|
+
return (sameContext(left.context, right.context) &&
|
|
74
|
+
sameOverlay(left.overlay, right.overlay) &&
|
|
75
|
+
sameAccess(left.access, right.access) &&
|
|
76
|
+
sameRefs(left.redacted, right.redacted) &&
|
|
77
|
+
sameRefs(left.sessionWrites, right.sessionWrites) &&
|
|
78
|
+
sameOptionalEnv(left.env, right.env));
|
|
79
|
+
}
|
|
80
|
+
/** Whether two host context records state the same roots. */
|
|
81
|
+
function sameContext(left, right) {
|
|
82
|
+
if (left === right)
|
|
83
|
+
return true;
|
|
84
|
+
if (left === undefined || right === undefined)
|
|
85
|
+
return false;
|
|
86
|
+
return sameValue(left, right, 0);
|
|
87
|
+
}
|
|
88
|
+
/** How deep a host value is walked before it is compared by identity instead. */
|
|
89
|
+
const MAX_VALUE_DEPTH = 8;
|
|
90
|
+
/**
|
|
91
|
+
* Whether two host-supplied values state the same value.
|
|
92
|
+
*
|
|
93
|
+
* Context roots are host data that never crossed the wire reader, so this narrows as it walks:
|
|
94
|
+
* arrays by position, plain records by member, everything else by identity. A tree deeper than
|
|
95
|
+
* the cap falls back to `false` rather than being walked without bound; a host nesting a context
|
|
96
|
+
* root that deeply has handed over something no memo boundary could keep stable either.
|
|
97
|
+
*/
|
|
98
|
+
function sameValue(left, right, depth) {
|
|
99
|
+
if (left === right)
|
|
100
|
+
return true;
|
|
101
|
+
if (depth >= MAX_VALUE_DEPTH)
|
|
102
|
+
return false;
|
|
103
|
+
if (Array.isArray(left) || Array.isArray(right)) {
|
|
104
|
+
if (!Array.isArray(left) || !Array.isArray(right) || left.length !== right.length)
|
|
105
|
+
return false;
|
|
106
|
+
return left.every((item, index) => sameValue(item, right[index], depth + 1));
|
|
107
|
+
}
|
|
108
|
+
if (!isRecord(left) || !isRecord(right))
|
|
109
|
+
return false;
|
|
110
|
+
const keys = Object.keys(left);
|
|
111
|
+
if (keys.length !== Object.keys(right).length)
|
|
112
|
+
return false;
|
|
113
|
+
return keys.every((key) => Object.hasOwn(right, key) && sameValue(left[key], right[key], depth + 1));
|
|
114
|
+
}
|
|
115
|
+
/** Whether two access projections answer the same state for the same references. */
|
|
116
|
+
function sameAccess(left, right) {
|
|
117
|
+
if (left === right)
|
|
118
|
+
return true;
|
|
119
|
+
if (left === undefined || right === undefined || left.length !== right.length)
|
|
120
|
+
return false;
|
|
121
|
+
return left.every((entry, index) => {
|
|
122
|
+
const other = right[index];
|
|
123
|
+
return (other !== undefined &&
|
|
124
|
+
entry.fieldId === other.fieldId &&
|
|
125
|
+
entry.rowKey === other.rowKey &&
|
|
126
|
+
entry.access === other.access);
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
/** Whether two reference lists name the same bindings in the same order. */
|
|
130
|
+
function sameRefs(left, right) {
|
|
131
|
+
if (left === right)
|
|
132
|
+
return true;
|
|
133
|
+
if (left === undefined || right === undefined || left.length !== right.length)
|
|
134
|
+
return false;
|
|
135
|
+
return left.every((ref, index) => {
|
|
136
|
+
const other = right[index];
|
|
137
|
+
return other !== undefined && ref.fieldId === other.fieldId && ref.rowKey === other.rowKey;
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
/** Whether two overlays declare the same levels, in the same order, at the same version. */
|
|
141
|
+
function sameOverlay(left, right) {
|
|
142
|
+
if (left === right)
|
|
143
|
+
return true;
|
|
144
|
+
if (left === undefined || right === undefined)
|
|
145
|
+
return false;
|
|
146
|
+
if (left.accessVersion !== right.accessVersion)
|
|
147
|
+
return false;
|
|
148
|
+
if (left.defaultAccess !== right.defaultAccess)
|
|
149
|
+
return false;
|
|
150
|
+
if (!sameStrings(left.allowMaskedRead, right.allowMaskedRead))
|
|
151
|
+
return false;
|
|
152
|
+
if (left.rules.length !== right.rules.length)
|
|
153
|
+
return false;
|
|
154
|
+
return left.rules.every((rule, index) => {
|
|
155
|
+
const other = right.rules[index];
|
|
156
|
+
return (other !== undefined &&
|
|
157
|
+
rule.kind === other.kind &&
|
|
158
|
+
rule.match === other.match &&
|
|
159
|
+
rule.access === other.access);
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
/** Whether two environments state the same evaluation facts; the lookup port stays by identity. */
|
|
163
|
+
function sameEnv(left, right) {
|
|
164
|
+
if (left === right)
|
|
165
|
+
return true;
|
|
166
|
+
return (left.tier === right.tier &&
|
|
167
|
+
left.accessVersion === right.accessVersion &&
|
|
168
|
+
left.recordDate === right.recordDate &&
|
|
169
|
+
sameStrings(left.capabilities, right.capabilities) &&
|
|
170
|
+
left.lookup === right.lookup);
|
|
171
|
+
}
|
|
172
|
+
/** Whether one optional environment states the same facts, presence included. */
|
|
173
|
+
function sameOptionalEnv(left, right) {
|
|
174
|
+
if (left === undefined || right === undefined)
|
|
175
|
+
return left === right;
|
|
176
|
+
return sameEnv(left, right);
|
|
177
|
+
}
|
|
178
|
+
/** Whether two string lists state the same entries in the same order. */
|
|
179
|
+
function sameStrings(left, right) {
|
|
180
|
+
if (left === right)
|
|
181
|
+
return true;
|
|
182
|
+
if (left === undefined || right === undefined || left.length !== right.length)
|
|
183
|
+
return false;
|
|
184
|
+
return left.every((entry, index) => entry === right[index]);
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Both access sources were supplied. One could be the stale answer, so the call is refused
|
|
188
|
+
* rather than letting either win, `[ACCESS-2.1.5]`.
|
|
189
|
+
*/
|
|
190
|
+
export class AccessSourceError extends Error {
|
|
191
|
+
code = 'ACCESS_SOURCE_INVALID';
|
|
192
|
+
constructor() {
|
|
193
|
+
super('@azx-pbc/axiom-react: FormProvider received both `overlay` and `access`; supply one access source, because either could be the stale one');
|
|
194
|
+
this.name = 'AccessSourceError';
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
/** The access source a host supplied, refusing the pair that would make one answer stale. */
|
|
198
|
+
export function assertOneAccessSource(overlay, access) {
|
|
199
|
+
if (overlay !== undefined && access !== undefined)
|
|
200
|
+
throw new AccessSourceError();
|
|
201
|
+
}
|
|
202
|
+
//# sourceMappingURL=inputs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inputs.js","sourceRoot":"","sources":["../../src/store/inputs.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAyElD,4FAA4F;AAC5F,MAAM,iBAAiB,GAAwB,EAAE,CAAC;AAClD,MAAM,MAAM,GAAkB,EAAE,CAAC;AAEjC,iFAAiF;AACjF,MAAM,UAAU,oBAAoB,CAAC,MAA0B;IAC7D,OAAO;QACL,OAAO,EAAE,MAAM,CAAC,OAAO;QACvB,OAAO,EAAE,MAAM,CAAC,OAAO;QACvB,MAAM,EAAE,MAAM,CAAC,MAAM;QACrB,QAAQ,EAAE,MAAM,CAAC,QAAQ;QACzB,aAAa,EAAE,MAAM,CAAC,aAAa,IAAI,iBAAiB;QACxD,GAAG,EAAE,MAAM,CAAC,GAAG,IAAI,MAAM;QACzB,aAAa,EAAE,SAAS;KACzB,CAAC;AACJ,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,iBAAiB,CAC/B,MAAqB,EACrB,MAA2C,EAC3C,aAAkC;IAElC,MAAM,IAAI,GAAG;QACX,MAAM;QACN,GAAG,CAAC,MAAM,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC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,KAAK,KAAK,CAAC,MAAM;QAAE,OAAO,KAAK,CAAC;IAC5F,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;AAC9D,CAAC;AAED;;;GAGG;AACH,MAAM,OAAO,iBAAkB,SAAQ,KAAK;IACjC,IAAI,GAAG,uBAAuB,CAAC;IAExC;QACE,KAAK,CACH,0IAA0I,CAC3I,CAAC;QACF,IAAI,CAAC,IAAI,GAAG,mBAAmB,CAAC;IAClC,CAAC;CACF;AAED,6FAA6F;AAC7F,MAAM,UAAU,qBAAqB,CACnC,OAAkC,EAClC,MAA0C;IAE1C,IAAI,OAAO,KAAK,SAAS,IAAI,MAAM,KAAK,SAAS;QAAE,MAAM,IAAI,iBAAiB,EAAE,CAAC;AACnF,CAAC","sourcesContent":["import type {\n AccessEntry,\n AccessOverlay,\n CompiledSchema,\n EvaluationEnv,\n CancellationPort,\n EvaluationInput,\n FieldRef,\n IdFactory,\n OptionDomains,\n WireValue,\n} from '@azx-pbc/axiom-runtime';\nimport { isRecord } from '@azx-pbc/axiom-runtime';\nimport type { OptionLoader, QueryDefer } from './option-pages.js';\n\n/**\n * The evaluation inputs a mounted provider owns, resolved once from its props.\n *\n * The artifact and the starting record are read at mount; everything here is a live prop the\n * provider may replace, so a host that revokes access re-evaluates the session with the new\n * answer and keeps the values entered so far.\n */\nexport interface SessionInputs {\n readonly context: Readonly<Record<string, unknown>> | undefined;\n readonly overlay: AccessOverlay | undefined;\n readonly access: readonly AccessEntry[] | undefined;\n readonly redacted: readonly FieldRef[] | undefined;\n readonly sessionWrites: readonly FieldRef[];\n readonly env: EvaluationEnv;\n /** The option domain each loaded binding offers, which one derivation reads for eligibility. */\n readonly optionDomains: OptionDomains | undefined;\n}\n\n/**\n * The inputs a mounted provider may replace without losing the entered values: everything a\n * session was opened with except the artifact and the starting record.\n */\nexport interface FormStoreOverrides {\n readonly context?: Readonly<Record<string, unknown>>;\n /** The host's 4-level overlay; a session that supplies it must not also supply `access`. */\n readonly overlay?: AccessOverlay;\n readonly access?: readonly AccessEntry[];\n readonly redacted?: readonly FieldRef[];\n readonly sessionWrites?: readonly FieldRef[];\n readonly env?: EvaluationEnv;\n}\n\n/**\n * What the provider hands the store at mount; the store owns the values afterwards.\n *\n * The option loaders, cancellation factory and query timer are mount-time too: a page list\n * belongs to the session that started it, and a loader set the host swaps under a live session\n * would leave half its pages answered by one authority and half by another.\n */\nexport interface FormStoreConfig extends FormStoreOverrides {\n readonly compiled: CompiledSchema;\n readonly initialValues: Readonly<Record<string, WireValue>>;\n /**\n * The host's source of assigned row ids, `[IDENT-2.1.2]`.\n *\n * Required when the artifact declares an `assigned` array: the store mints no id of its own,\n * because a constant prefix would make two independent sessions collide and a process counter\n * would make two renders of one record disagree. Every call must return an id that has not\n * named a row before; the engine refuses a session whose rows share one.\n */\n readonly idFactory?: IdFactory;\n /**\n * The identity manifest a resumed record carries, keyed by array `fieldId`.\n *\n * Replaying it restores the row keys the record was written with, so a draft saved elsewhere\n * addresses the same rows here — and seals the same `reportHash` — instead of acquiring fresh\n * ones. Read once at mount, with `initialValues`, and checked against them: the engine refuses\n * a manifest that names an id twice or a count the record does not hold, `[IDENT-2.1.7]`.\n */\n readonly rowManifest?: Readonly<Record<string, readonly string[]>>;\n readonly optionSources?: Readonly<Record<string, OptionLoader>>;\n /** Creates one cancellation port per option page list; a host may supply its own. */\n readonly cancellation?: () => CancellationPort;\n /**\n * The host's timer for a search that waits for the reader to stop typing, `[MODEL-3.1.8]`.\n * A search attempted without one is refused before a loader is called.\n */\n readonly defer?: QueryDefer;\n}\n\n/** Stable stand-ins for an omitted input, so a resolved set can be compared by identity. */\nconst NO_SESSION_WRITES: readonly FieldRef[] = [];\nconst NO_ENV: EvaluationEnv = {};\n\n/** Resolves the host's props to the concrete inputs one evaluation runs with. */\nexport function resolveSessionInputs(inputs: FormStoreOverrides): SessionInputs {\n return {\n context: inputs.context,\n overlay: inputs.overlay,\n access: inputs.access,\n redacted: inputs.redacted,\n sessionWrites: inputs.sessionWrites ?? NO_SESSION_WRITES,\n env: inputs.env ?? NO_ENV,\n optionDomains: undefined,\n };\n}\n\n/**\n * The evaluation input one session runs with: the record, the context and the access answer.\n *\n * One builder, so the engine's pass and the presentation channel resolve the same record and\n * neither can read an input the other was not given. The access answer is one arm of the\n * runtime's `AccessSource` union — `FormProviderProps` already refuses both at the props, and\n * this switch writes the arm the compiler can prove rather than spreading two optionals into a\n * union that states them as alternatives.\n */\nexport function evaluationInputOf(\n inputs: SessionInputs,\n values: Readonly<Record<string, WireValue>>,\n sessionWrites: readonly FieldRef[],\n): EvaluationInput {\n const base = {\n values,\n ...(inputs.context === undefined ? {} : { context: inputs.context }),\n ...(inputs.redacted === undefined ? {} : { redacted: inputs.redacted }),\n ...(sessionWrites.length === 0 ? {} : { sessionWrites }),\n };\n if (inputs.overlay !== undefined) return { ...base, overlay: inputs.overlay };\n if (inputs.access !== undefined) return { ...base, access: inputs.access };\n return { ...base };\n}\n\n/**\n * Whether two resolved input sets state the same evaluation inputs, so a render does no work.\n *\n * The declarative members — the access projection, the redaction list, the session writes, the\n * overlay, the context and the environment — are compared by value. A host that computes\n * `access={resolveAccess(state)}` or `env={{ recordDate }}` inline hands over a fresh object on\n * every render that states the same answer, and identity comparison would open a new engine over\n * the whole record for each of them. The snapshot caches are what then keep equal inputs from\n * re-rendering a control, because the candidate a render derives keeps its identity.\n *\n * `optionDomains` stays by identity: it is the page machine's own map, rebuilt only when a page\n * moves, and a value comparison of it would read every loaded page on every render.\n */\nexport function sameInputs(left: SessionInputs, right: SessionInputs): boolean {\n if (left === right) return true;\n return (\n sameContext(left.context, right.context) &&\n sameOverlay(left.overlay, right.overlay) &&\n sameAccess(left.access, right.access) &&\n sameRefs(left.redacted, right.redacted) &&\n sameRefs(left.sessionWrites, right.sessionWrites) &&\n sameEnv(left.env, right.env) &&\n left.optionDomains === right.optionDomains\n );\n}\n\n/**\n * Whether two raw prop sets state the same inputs.\n *\n * Presence is the fact the provider owns — an input the host states is the authority for it, and\n * one it stops stating is retired — so a member stated on one side only makes the sets different.\n * Whether the stated *value* also moved decides whether the session has to re-derive.\n */\nexport function sameOverrides(left: FormStoreOverrides, right: FormStoreOverrides): boolean {\n if (left === right) return true;\n return (\n sameContext(left.context, right.context) &&\n sameOverlay(left.overlay, right.overlay) &&\n sameAccess(left.access, right.access) &&\n sameRefs(left.redacted, right.redacted) &&\n sameRefs(left.sessionWrites, right.sessionWrites) &&\n sameOptionalEnv(left.env, right.env)\n );\n}\n\n/** Whether two host context records state the same roots. */\nfunction sameContext(\n left: Readonly<Record<string, unknown>> | undefined,\n right: Readonly<Record<string, unknown>> | undefined,\n): boolean {\n if (left === right) return true;\n if (left === undefined || right === undefined) return false;\n return sameValue(left, right, 0);\n}\n\n/** How deep a host value is walked before it is compared by identity instead. */\nconst MAX_VALUE_DEPTH = 8;\n\n/**\n * Whether two host-supplied values state the same value.\n *\n * Context roots are host data that never crossed the wire reader, so this narrows as it walks:\n * arrays by position, plain records by member, everything else by identity. A tree deeper than\n * the cap falls back to `false` rather than being walked without bound; a host nesting a context\n * root that deeply has handed over something no memo boundary could keep stable either.\n */\nfunction sameValue(left: unknown, right: unknown, depth: number): boolean {\n if (left === right) return true;\n if (depth >= MAX_VALUE_DEPTH) return false;\n if (Array.isArray(left) || Array.isArray(right)) {\n if (!Array.isArray(left) || !Array.isArray(right) || left.length !== right.length) return false;\n return left.every((item, index) => sameValue(item, right[index], depth + 1));\n }\n if (!isRecord(left) || !isRecord(right)) return false;\n const keys = Object.keys(left);\n if (keys.length !== Object.keys(right).length) return false;\n return keys.every(\n (key) => Object.hasOwn(right, key) && sameValue(left[key], right[key], depth + 1),\n );\n}\n\n/** Whether two access projections answer the same state for the same references. */\nfunction sameAccess(\n left: readonly AccessEntry[] | undefined,\n right: readonly AccessEntry[] | undefined,\n): boolean {\n if (left === right) return true;\n if (left === undefined || right === undefined || left.length !== right.length) return false;\n return left.every((entry, index) => {\n const other = right[index];\n return (\n other !== undefined &&\n entry.fieldId === other.fieldId &&\n entry.rowKey === other.rowKey &&\n entry.access === other.access\n );\n });\n}\n\n/** Whether two reference lists name the same bindings in the same order. */\nfunction sameRefs(\n left: readonly FieldRef[] | undefined,\n right: readonly FieldRef[] | undefined,\n): boolean {\n if (left === right) return true;\n if (left === undefined || right === undefined || left.length !== right.length) return false;\n return left.every((ref, index) => {\n const other = right[index];\n return other !== undefined && ref.fieldId === other.fieldId && ref.rowKey === other.rowKey;\n });\n}\n\n/** Whether two overlays declare the same levels, in the same order, at the same version. */\nfunction sameOverlay(left: AccessOverlay | undefined, right: AccessOverlay | undefined): boolean {\n if (left === right) return true;\n if (left === undefined || right === undefined) return false;\n if (left.accessVersion !== right.accessVersion) return false;\n if (left.defaultAccess !== right.defaultAccess) return false;\n if (!sameStrings(left.allowMaskedRead, right.allowMaskedRead)) return false;\n if (left.rules.length !== right.rules.length) return false;\n return left.rules.every((rule, index) => {\n const other = right.rules[index];\n return (\n other !== undefined &&\n rule.kind === other.kind &&\n rule.match === other.match &&\n rule.access === other.access\n );\n });\n}\n\n/** Whether two environments state the same evaluation facts; the lookup port stays by identity. */\nfunction sameEnv(left: EvaluationEnv, right: EvaluationEnv): boolean {\n if (left === right) return true;\n return (\n left.tier === right.tier &&\n left.accessVersion === right.accessVersion &&\n left.recordDate === right.recordDate &&\n sameStrings(left.capabilities, right.capabilities) &&\n left.lookup === right.lookup\n );\n}\n\n/** Whether one optional environment states the same facts, presence included. */\nfunction sameOptionalEnv(\n left: EvaluationEnv | undefined,\n right: EvaluationEnv | undefined,\n): boolean {\n if (left === undefined || right === undefined) return left === right;\n return sameEnv(left, right);\n}\n\n/** Whether two string lists state the same entries in the same order. */\nfunction sameStrings(\n left: readonly string[] | undefined,\n right: readonly string[] | undefined,\n): boolean {\n if (left === right) return true;\n if (left === undefined || right === undefined || left.length !== right.length) return false;\n return left.every((entry, index) => entry === right[index]);\n}\n\n/**\n * Both access sources were supplied. One could be the stale answer, so the call is refused\n * rather than letting either win, `[ACCESS-2.1.5]`.\n */\nexport class AccessSourceError extends Error {\n readonly code = 'ACCESS_SOURCE_INVALID';\n\n constructor() {\n super(\n '@azx-pbc/axiom-react: FormProvider received both `overlay` and `access`; supply one access source, because either could be the stale one',\n );\n this.name = 'AccessSourceError';\n }\n}\n\n/** The access source a host supplied, refusing the pair that would make one answer stale. */\nexport function assertOneAccessSource(\n overlay: AccessOverlay | undefined,\n access: readonly AccessEntry[] | undefined,\n): void {\n if (overlay !== undefined && access !== undefined) throw new AccessSourceError();\n}\n"]}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import type { CompiledSchema, Engine, EvaluationEnv, EvaluationInput, FieldAccess, FormFieldState, FormState, LayoutNodeView, LayoutReadoutView, LayoutStepView, WireValue } from '@azx-pbc/axiom-runtime';
|
|
2
|
+
import type { FieldFacts } from './fields.js';
|
|
3
|
+
/**
|
|
4
|
+
* What a section, step or any other layout node states for a renderer.
|
|
5
|
+
*
|
|
6
|
+
* The chrome itself is the presentation channel's answer: visibility, the resolved title text
|
|
7
|
+
* and the summary card's readouts. The error facts are the form channel's, folded for a
|
|
8
|
+
* collapsed container so an accordion badge can state how many failures it hides; `access` is
|
|
9
|
+
* the meet of the member fields' resolved answers, never a second overlay resolution.
|
|
10
|
+
*/
|
|
11
|
+
export interface LayoutSlice {
|
|
12
|
+
readonly nodeId: string;
|
|
13
|
+
readonly kind: LayoutNodeView['kind'];
|
|
14
|
+
readonly visible: boolean;
|
|
15
|
+
readonly access: FieldAccess;
|
|
16
|
+
/**
|
|
17
|
+
* The node's own text at the artifact's default locale.
|
|
18
|
+
*
|
|
19
|
+
* This is a convenience, not the only answer: a structured argument (money, a date, an
|
|
20
|
+
* instant, a `timeslot`, a percentage) has no plain spelling, so it resolves to the message
|
|
21
|
+
* key. A host rendering such a message, or another locale, reads `messageKey` and
|
|
22
|
+
* `messageParams` through its own formatter, or passes that formatter to
|
|
23
|
+
* `useLayoutNode`/`useSection`.
|
|
24
|
+
*/
|
|
25
|
+
readonly text: string;
|
|
26
|
+
/** The message key this node's own text is written under, when it states one. */
|
|
27
|
+
readonly messageKey: string | undefined;
|
|
28
|
+
/** The arguments `messageKey` interpolates, resolved from the presentation channel. */
|
|
29
|
+
readonly messageParams: Readonly<Record<string, WireValue>> | undefined;
|
|
30
|
+
readonly readouts: readonly LayoutReadoutView[];
|
|
31
|
+
readonly hasErrors: boolean;
|
|
32
|
+
readonly errorCount: number;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* The presentation channel's one pass over one session.
|
|
36
|
+
*
|
|
37
|
+
* Layout is chrome: its `visibleWhen`, callout parameters and readouts are evaluated apart from
|
|
38
|
+
* the report, so nothing here can reach a sealed decision. The store owns the cache and the
|
|
39
|
+
* hook owns nothing, which is why this is a named seam rather than a call inside a hook.
|
|
40
|
+
*/
|
|
41
|
+
export declare function layoutOf(compiled: CompiledSchema, input: EvaluationInput, env: EvaluationEnv): readonly LayoutNodeView[];
|
|
42
|
+
/** The node one id names, or `undefined` when the artifact declares none. */
|
|
43
|
+
export declare function findLayoutNode(views: readonly LayoutNodeView[], nodeId: string): LayoutNodeView | undefined;
|
|
44
|
+
/** The section node one layout anchor names, or `undefined` when the layout declares none. */
|
|
45
|
+
export declare function findLayoutSection(views: readonly LayoutNodeView[], sectionId: string): LayoutNodeView | undefined;
|
|
46
|
+
/**
|
|
47
|
+
* The steps of the form's wizard, in authored order.
|
|
48
|
+
*
|
|
49
|
+
* A wizard is declared at most once and holds only steps, so an artifact that carries none
|
|
50
|
+
* answers an empty list rather than inventing a single-page flow.
|
|
51
|
+
*/
|
|
52
|
+
export declare function wizardSteps(views: readonly LayoutNodeView[]): readonly LayoutStepView[];
|
|
53
|
+
/** The step one id names, wherever the wizard places it. */
|
|
54
|
+
export declare function findStepView(views: readonly LayoutNodeView[], stepId: string): LayoutStepView | undefined;
|
|
55
|
+
/**
|
|
56
|
+
* One node's slice, with the error facts a collapsed container needs.
|
|
57
|
+
*
|
|
58
|
+
* A member of an array has no bindable field value, so its rows answer for it; a container
|
|
59
|
+
* answers for itself and for every row it holds. Only visible bindings count, because a
|
|
60
|
+
* failure the host may not show is not one an accordion badge can name.
|
|
61
|
+
*/
|
|
62
|
+
export declare function layoutSliceOf(node: LayoutNodeView, compiled: CompiledSchema, engine: Engine, form: FormState, facts: ReadonlyMap<string, FieldFacts>, byId?: ReadonlyMap<string, FormFieldState>): LayoutSlice;
|
|
63
|
+
/**
|
|
64
|
+
* Whether two layout passes state the same chrome.
|
|
65
|
+
*
|
|
66
|
+
* The comparison is over the published view, not a hash, so a record edit that moves no
|
|
67
|
+
* visibility, message or readout keeps the array identity a `useLayout` consumer already
|
|
68
|
+
* rendered. Properties are built in one order by one function, so text equality is enough.
|
|
69
|
+
*/
|
|
70
|
+
export declare function sameLayoutViews(left: readonly LayoutNodeView[], right: readonly LayoutNodeView[]): boolean;
|
|
71
|
+
/** Whether two slices state the same facts, so an unrelated publish keeps the identity. */
|
|
72
|
+
export declare function sameLayoutSlice(left: LayoutSlice, right: LayoutSlice): boolean;
|
|
73
|
+
/**
|
|
74
|
+
* The declaration list indexed by field, for the slices one publish reads.
|
|
75
|
+
*
|
|
76
|
+
* A section that places five hundred fields would otherwise scan the array once per leaf. The
|
|
77
|
+
* caller that reads several slices passes one index for the whole form; a lone read builds it
|
|
78
|
+
* here and pays one pass over the declarations, never one per leaf.
|
|
79
|
+
*/
|
|
80
|
+
export declare function fieldsByIdOf(form: FormState): ReadonlyMap<string, FormFieldState>;
|
|
81
|
+
//# sourceMappingURL=layout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../src/store/layout.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EACV,cAAc,EACd,MAAM,EACN,aAAa,EACb,eAAe,EACf,WAAW,EACX,cAAc,EACd,SAAS,EACT,cAAc,EAC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