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

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 @@
1
+ {"version":3,"file":"nodes.js","sourceRoot":"","sources":["../../src/render/nodes.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AA6Q/C,4FAA4F;AAC5F,SAAS,iBAAiB,CAAC,MAAgC;IACzD,MAAM,KAAK,GAAG,IAAI,GAAG,EAAyB,CAAC;IAC/C,MAAM,KAAK,GAAG,CAAC,YAAsC,EAAQ,EAAE;QAC7D,KAAK,MAAM,WAAW,IAAI,YAAY,EAAE,CAAC;YACvC,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;YAC5C,IAAI,WAAW,CAAC,MAAM,KAAK,SAAS;gBAAE,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;QAClE,CAAC;IACH,CAAC,CAAC;IACF,KAAK,CAAC,MAAM,CAAC,CAAC;IACd,OAAO,KAAK,CAAC;AACf,CAAC;AAED,qFAAqF;AACrF,SAAS,MAAM,CAAC,KAAyB;IACvC,QAAQ,KAA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AOG;AACH,MAAM,UAAU,aAAa,CAAC,KAAa,EAAE,OAA2B,EAAE,KAAa;IACrF,OAAO,OAAO,KAAK,SAAS,IAAI,OAAO,KAAK,EAAE,IAAI,qBAAqB,CAAC,OAAO,CAAC;QAC9E,CAAC,CAAC,GAAG,KAAK,IAAI,MAAM,CAAC,KAAK,GAAG,CAAC,CAAC,EAAE;QACjC,CAAC,CAAC,OAAO,CAAC;AACd,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,YAAY,CAAC,KAAwB;IACnD,MAAM,YAAY,GAAG,iBAAiB,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IACrD,OAAO,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;QACnC,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC,EAAE,YAAY,EAAE,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;QAC1E,OAAO,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;IAC1C,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import type {\n CompiledField,\n Control,\n LayoutNodeView,\n LayoutTone,\n WireValue,\n} from '@azx-pbc/axiom-runtime';\nimport { assertNever } from '@azx-pbc/axiom-runtime';\nimport { getInputHints } from '../hints.js';\nimport type { InputHints } from '../hints.js';\nimport { fieldDomId } from '../field-props.js';\n\n/**\n * The host-neutral render tree: one layout walked into the nodes a host paints.\n *\n * The tree is a total function of the closed layout and control unions. A node states what it\n * is — a section, a container, a control, an error — and never which document it came from, so\n * one renderer paints any artifact and a host's adapter chooses markup, not structure. Text is\n * resolved before the tree is built: the caller passes the message formatter for the locale it\n * renders, so a locale switch re-translates the chrome without recompiling the artifact.\n *\n * Field leaves name their binding (`fieldId`, `rowKey`) because a control must bind to a\n * session; the adapter reads that binding with `useField` and never compares the identifier to\n * anything. Everything the tree exposes is derived from the declarations the layout places.\n */\n\n/** Resolves one compiled message key for the locale being rendered. */\nexport type RenderTranslate = (key: string, params?: Readonly<Record<string, WireValue>>) => string;\n\n/** One heading level a host may paint; the layout's depth decides it. */\nexport type RenderHeadingLevel = 2 | 3 | 4 | 5 | 6;\n\n/** One read-only label/value pair a summary card shows. */\nexport interface RenderReadout {\n readonly label: string;\n /** The value the presentation channel decided, or absent when it could not decide one. */\n readonly value?: WireValue;\n}\n\n/**\n * One control leaf, or one member of a record container.\n *\n * The declaration travels whole because a control needs its options, its items, its signature\n * coverage and a money amount's own domain to be rendered at all.\n */\nexport interface RenderControlNode {\n readonly kind: 'field';\n readonly nodeId: string;\n readonly fieldId: string;\n readonly control: Control;\n readonly declaration: CompiledField;\n readonly label: string;\n readonly description?: string;\n readonly placeholder?: string;\n /** How many of its parent's columns the control spans. */\n readonly colSpan: number;\n readonly hints: InputHints;\n}\n\n/** A repeating record: the container's facts plus one control or container per declared member. */\nexport interface RenderRecordsNode {\n readonly kind: 'records';\n readonly nodeId: string;\n readonly fieldId: string;\n readonly label: string;\n readonly description?: string;\n readonly colSpan: number;\n readonly members: readonly RenderMemberNode[];\n /**\n * The member that names a natural row, absent when the host assigns row keys.\n *\n * An adapter that offers \"add row\" needs it: the value a new row starts from must carry the\n * identity the record already keys by, and the host is the only layer that can write one.\n */\n readonly naturalKey?: string;\n}\n\n/**\n * One non-repeating record placed as a group: the record's label and its members' controls.\n *\n * A single record has exactly one instance, so nothing about the array machinery applies: there\n * is no row key, no add or remove, and no per-row binding. Each member is a control bound by its\n * own declared `fieldId` — the identifier the reader already resolves for an expression member\n * path such as `f_vehicle.f_vin` — so its value lives inside the container's value without a\n * second spelling. The record's own `visible` rule and access answer reach its members through\n * the same visibility index a rule reads, so a placement that hides the record paints none of\n * them; its `onHide` policy decides the submission as it does for any hidden container.\n */\nexport interface RenderRecordNode {\n readonly kind: 'record';\n readonly nodeId: string;\n readonly fieldId: string;\n readonly label: string;\n readonly description?: string;\n readonly colSpan: number;\n readonly members: readonly RenderMemberNode[];\n}\n\n/**\n * One member of a record or record array: a control, or a container that is itself a member.\n *\n * A container member is not a tree node placed by the layout; it is a declared member whose\n * value lives inside its parent's value. It carries the same node kinds a placed container does,\n * so an adapter recurses into it instead of refusing a document the compiler admitted.\n */\ntype RenderMemberNode = RenderControlNode | RenderRecordNode | RenderRecordsNode;\n\ninterface RenderContainerBase {\n readonly nodeId: string;\n readonly sectionId?: string;\n readonly description?: string;\n readonly level: RenderHeadingLevel;\n readonly children: readonly RenderNode[];\n}\n\n/** A titled section: the layout's top-level container, or one nested inside another. */\nexport interface RenderSectionNode extends RenderContainerBase {\n readonly kind: 'section';\n readonly title: string;\n readonly columns: number;\n readonly collapsible: boolean;\n readonly defaultExpanded?: boolean;\n}\n\n/**\n * A grouping inside a section or step.\n *\n * Its title is optional because a group's `titleKey` is: the metaschema requires one on a\n * section, step, heading, SOP block and summary card, and lets a group state none. A host\n * paints no heading for it then, rather than a heading with no name.\n */\nexport interface RenderGroupNode extends RenderContainerBase {\n readonly kind: 'group';\n readonly title?: string;\n readonly columns: number;\n readonly collapsible: boolean;\n readonly defaultExpanded?: boolean;\n}\n\n/** One page of a branching flow. The host's wizard cursor decides which one is shown. */\nexport interface RenderStepNode extends RenderContainerBase {\n readonly kind: 'step';\n readonly stepId: string;\n readonly title: string;\n readonly columns: number;\n}\n\n/**\n * The flow that holds the steps; at most one is declared, at the top level.\n *\n * The host owns the cursor, so the tree states it: `currentStepId` is the step the caller named\n * in `RenderLayoutInput.stepId`, and `children` then holds that step alone. Without a named step\n * the children are every visible step in authored order and `currentStepId` is absent, which is\n * what a host painting its own step list wants.\n */\nexport interface RenderWizardNode {\n readonly kind: 'wizard';\n readonly nodeId: string;\n readonly currentStepId?: string;\n readonly children: readonly RenderStepNode[];\n}\n\n/** A decorative title with optional supporting text. */\nexport interface RenderHeadingNode {\n readonly kind: 'heading';\n readonly nodeId: string;\n readonly level: RenderHeadingLevel;\n readonly title: string;\n readonly body?: string;\n}\n\n/** Presentation-only emphasis. */\nexport interface RenderCalloutNode {\n readonly kind: 'callout';\n readonly nodeId: string;\n readonly tone: LayoutTone;\n readonly title?: string;\n readonly body: string;\n}\n\n/** A horizontal rule. */\nexport interface RenderDividerNode {\n readonly kind: 'divider';\n readonly nodeId: string;\n}\n\n/** Standard operating procedure text. */\nexport interface RenderSopBlockNode {\n readonly kind: 'sop_block';\n readonly nodeId: string;\n /**\n * The heading level the block's title is painted at.\n *\n * The layout walk already knows the depth: a block placed inside a section is one level below\n * it. An adapter that hard-codes a level skips one on every document whose chrome sits at a\n * depth other than the one it guessed (`WCAG 1.3.1`, `2.4.10`), so the tree states it.\n */\n readonly level: RenderHeadingLevel;\n readonly title: string;\n readonly body?: string;\n}\n\n/** A read-only summary: decided readouts plus declared fields a host reads live. */\nexport interface RenderSummaryCardNode {\n readonly kind: 'summary_card';\n readonly nodeId: string;\n /** The heading level the card's title is painted at, from where the layout placed the card. */\n readonly level: RenderHeadingLevel;\n readonly title: string;\n readonly body?: string;\n readonly readouts: readonly RenderReadout[];\n readonly fields: readonly { readonly fieldId: string; readonly label: string }[];\n}\n\n/** One reason a submit is blocked, with the field it names where the artifact names one. */\nexport interface RenderErrorItem {\n readonly fieldId?: string;\n readonly label?: string;\n readonly message: string;\n /**\n * The element this item is about, so the announcement can be a set of links to the controls it\n * names rather than a list a reader has to search the page for.\n *\n * An element id, as `field.a11y.controlId` states it: `bindingKey` itself may carry whitespace\n * from a natural row key, so a row-scoped failure passes `fieldDomId(idPrefix, bindingKey)`,\n * and every id carries the session prefix. When the caller names none, the field's control id\n * under `RenderErrorSummaryInput.idPrefix` is used. A reason about the record rather than a\n * field points at the announcement itself, `error_summary`.\n */\n readonly targetId: string;\n}\n\n/** The announced summary of every blocking reason, painted above the form. */\nexport interface RenderErrorSummaryNode {\n readonly kind: 'error_summary';\n readonly nodeId: string;\n readonly items: readonly RenderErrorItem[];\n}\n\n/** One node of the host-neutral render tree. */\nexport type RenderNode =\n | RenderSectionNode\n | RenderGroupNode\n | RenderWizardNode\n | RenderStepNode\n | RenderControlNode\n | RenderRecordsNode\n | RenderRecordNode\n | RenderHeadingNode\n | RenderCalloutNode\n | RenderDividerNode\n | RenderSopBlockNode\n | RenderSummaryCardNode\n | RenderErrorSummaryNode;\n\n/** One blocking reason, already resolved to the text this locale renders. */\nexport interface RenderErrorInput {\n readonly fieldId?: string;\n /** The element id the item is about; defaults to the field's control id under the session prefix. */\n readonly targetId?: string;\n readonly message: string;\n}\n\n/** Everything one layout walk reads. */\nexport interface RenderLayoutInput {\n readonly layout: readonly LayoutNodeView[];\n readonly fields: readonly CompiledField[];\n readonly translate: RenderTranslate;\n /**\n * The wizard step on the screen, when the host has one.\n *\n * Named, the wizard node carries that step alone and states it in `currentStepId`, so a\n * paint-the-tree adapter needs no lookup of its own. A step the presentation channel hid (or an\n * id the artifact never declared) is ignored rather than emptying the wizard: the caller gets\n * every visible step, which is the safe answer for a cursor that outlived its step.\n */\n readonly stepId?: string;\n}\n\n/** The declaration one identifier names, including a member nested in a record or array. */\nfunction indexDeclarations(fields: readonly CompiledField[]): ReadonlyMap<string, CompiledField> {\n const index = new Map<string, CompiledField>();\n const visit = (declarations: readonly CompiledField[]): void => {\n for (const declaration of declarations) {\n index.set(declaration.fieldId, declaration);\n if (declaration.fields !== undefined) visit(declaration.fields);\n }\n };\n visit(fields);\n return index;\n}\n\n/** The next heading level below `level`, clamped to the last level a heading has. */\nfunction deeper(level: RenderHeadingLevel): RenderHeadingLevel {\n switch (level) {\n case 2:\n return 3;\n case 3:\n return 4;\n case 4:\n return 5;\n case 5:\n case 6:\n return 6;\n default:\n return assertNever(level);\n }\n}\n\n/** A declared control, defaulting to plain text for a scalar that states none. */\nfunction controlOf(declaration: CompiledField): Control {\n return declaration.control ?? 'text';\n}\n\n/** The optional members of a compiled declaration, spelled once for the tree. */\nfunction chromeOf(declaration: CompiledField, translate: RenderTranslate) {\n return {\n ...(declaration.descriptionKey === undefined\n ? {}\n : { description: translate(declaration.descriptionKey) }),\n ...(declaration.placeholderKey === undefined\n ? {}\n : { placeholder: translate(declaration.placeholderKey) }),\n };\n}\n\nfunction controlNode(\n nodeId: string,\n declaration: CompiledField,\n colSpan: number,\n translate: RenderTranslate,\n): RenderControlNode {\n const control = controlOf(declaration);\n return {\n kind: 'field',\n nodeId,\n fieldId: declaration.fieldId,\n control,\n declaration,\n label: labelOf(declaration, translate),\n colSpan,\n hints: getInputHints(control),\n ...chromeOf(declaration, translate),\n };\n}\n\n/** The three node kinds a record member can become. */\ntype MemberOutcome = RenderControlNode | RenderRecordNode | RenderRecordsNode;\n\n/**\n * One declared member as a tree node: a control, a single record, or a repeating record.\n *\n * A member declaration is not placed by the layout, so its node id is derived from its parent's\n * and its span is the one cell it occupies. A member that is itself a container recurses through\n * `containerMembers`; a valid artifact therefore has no shape that reaches `renderLayout` and\n * throws.\n */\nfunction memberNode(\n nodeId: string,\n declaration: CompiledField,\n colSpan: number,\n translate: RenderTranslate,\n): MemberOutcome {\n if (declaration.fields === undefined) {\n return controlNode(nodeId, declaration, colSpan, translate);\n }\n if (declaration.primitive === 'array') {\n return {\n kind: 'records',\n nodeId,\n fieldId: declaration.fieldId,\n label: labelOf(declaration, translate),\n colSpan,\n members: containerMembers(nodeId, declaration.fields, translate),\n ...(declaration.rowKey?.mode === 'natural' && declaration.rowKey.fieldId !== undefined\n ? { naturalKey: declaration.rowKey.fieldId }\n : {}),\n ...chromeOf(declaration, translate),\n };\n }\n if (declaration.primitive === 'record') {\n return {\n kind: 'record',\n nodeId,\n fieldId: declaration.fieldId,\n label: labelOf(declaration, translate),\n colSpan,\n members: containerMembers(nodeId, declaration.fields, translate),\n ...chromeOf(declaration, translate),\n };\n }\n // A container of any other primitive is not a shape the grammar declares; refusing it here\n // keeps the tree total if a hand-built artifact carries one.\n throw new Error(\n `@azx-pbc/axiom-react: the layout places the ${declaration.primitive} ${declaration.fieldId} at ${nodeId}, which declares members but is neither a record nor an array`,\n );\n}\n\n/** A declaration's label, or its identifier when the document states no label key. */\nfunction labelOf(declaration: CompiledField, translate: RenderTranslate): string {\n return declaration.labelKey === undefined ? declaration.fieldId : translate(declaration.labelKey);\n}\n\n/** One node per declared member of a container, recursing into a container member. */\nfunction containerMembers(\n nodeId: string,\n members: readonly CompiledField[],\n translate: RenderTranslate,\n): readonly RenderMemberNode[] {\n return members.map((member, index) =>\n memberNode(`${nodeId}.members[${String(index)}]`, member, 1, translate),\n );\n}\n\n/** One placed field: a control, a single record's members, or a repeating record's members. */\nfunction fieldNode(\n view: LayoutNodeView & { readonly kind: 'field' },\n declarations: ReadonlyMap<string, CompiledField>,\n translate: RenderTranslate,\n): RenderControlNode | RenderRecordNode | RenderRecordsNode {\n const declaration = declarations.get(view.fieldId);\n if (declaration === undefined) {\n throw new Error(\n `@azx-pbc/axiom-react: the layout places ${view.fieldId} at ${view.nodeId}, and the artifact declares no such field`,\n );\n }\n return memberNode(view.nodeId, declaration, view.colSpan, translate);\n}\n\n/** One node's tree, or `undefined` when the presentation channel hid it. */\nfunction nodeOf(\n view: LayoutNodeView,\n level: RenderHeadingLevel,\n declarations: ReadonlyMap<string, CompiledField>,\n translate: RenderTranslate,\n stepId: string | undefined,\n): RenderNode | undefined {\n if (!view.visible) return undefined;\n const children = (\n nodes: readonly LayoutNodeView[],\n childLevel: RenderHeadingLevel,\n ): readonly RenderNode[] =>\n nodes.flatMap((child) => {\n const node = nodeOf(child, childLevel, declarations, translate, stepId);\n return node === undefined ? [] : [node];\n });\n switch (view.kind) {\n case 'section':\n return {\n kind: 'section',\n nodeId: view.nodeId,\n ...(view.sectionId === undefined ? {} : { sectionId: view.sectionId }),\n title: translate(view.titleKey),\n ...(view.descriptionKey === undefined\n ? {}\n : { description: translate(view.descriptionKey) }),\n level,\n columns: view.columns,\n collapsible: view.collapsible,\n ...(view.defaultExpanded === undefined ? {} : { defaultExpanded: view.defaultExpanded }),\n children: children(view.children, deeper(level)),\n };\n case 'group':\n return {\n kind: 'group',\n nodeId: view.nodeId,\n ...(view.titleKey === undefined ? {} : { title: translate(view.titleKey) }),\n ...(view.descriptionKey === undefined\n ? {}\n : { description: translate(view.descriptionKey) }),\n level,\n columns: view.columns,\n collapsible: view.collapsible,\n ...(view.defaultExpanded === undefined ? {} : { defaultExpanded: view.defaultExpanded }),\n children: children(view.children, deeper(level)),\n };\n case 'wizard': {\n const steps = view.children.flatMap((step) => {\n const node = nodeOf(step, 2, declarations, translate, stepId);\n return node !== undefined && node.kind === 'step' ? [node] : [];\n });\n // A named step that is present narrows the wizard to it; one that is absent (hidden by the\n // presentation channel, or retired from the artifact) leaves every visible step in place.\n const current =\n stepId === undefined ? undefined : steps.find((step) => step.stepId === stepId);\n return {\n kind: 'wizard',\n nodeId: view.nodeId,\n ...(current === undefined ? {} : { currentStepId: current.stepId }),\n children: current === undefined ? steps : [current],\n };\n }\n case 'step':\n return {\n kind: 'step',\n nodeId: view.nodeId,\n ...(view.sectionId === undefined ? {} : { sectionId: view.sectionId }),\n stepId: view.stepId,\n title: translate(view.titleKey),\n ...(view.descriptionKey === undefined\n ? {}\n : { description: translate(view.descriptionKey) }),\n level,\n columns: view.columns,\n children: children(view.children, deeper(level)),\n };\n case 'field':\n return fieldNode(view, declarations, translate);\n case 'heading':\n return {\n kind: 'heading',\n nodeId: view.nodeId,\n level,\n title: translate(view.titleKey),\n ...(view.textKey === undefined ? {} : { body: translate(view.textKey) }),\n };\n case 'callout':\n return {\n kind: 'callout',\n nodeId: view.nodeId,\n tone: view.tone,\n ...(view.titleKey === undefined ? {} : { title: translate(view.titleKey) }),\n body: translate(view.textKey, view.params),\n };\n case 'divider':\n return { kind: 'divider', nodeId: view.nodeId };\n case 'sop_block':\n return {\n kind: 'sop_block',\n nodeId: view.nodeId,\n level,\n title: translate(view.titleKey),\n ...(view.textKey === undefined ? {} : { body: translate(view.textKey, view.params) }),\n };\n case 'summary_card':\n return {\n kind: 'summary_card',\n nodeId: view.nodeId,\n level,\n title: translate(view.titleKey),\n ...(view.textKey === undefined ? {} : { body: translate(view.textKey, view.params) }),\n readouts: (view.readouts ?? []).map((readout) => ({\n label: translate(readout.labelKey),\n ...(readout.value === undefined ? {} : { value: readout.value }),\n })),\n fields: (view.fields ?? []).flatMap((fieldId) => {\n const declaration = declarations.get(fieldId);\n return declaration === undefined\n ? []\n : [{ fieldId, label: labelOf(declaration, translate) }];\n }),\n };\n default:\n return assertNever(view);\n }\n}\n\n/** Everything the announced error summary is built from. */\nexport interface RenderErrorSummaryInput {\n /** The blocking reasons, in the order the session reports them. */\n readonly errors: readonly RenderErrorInput[];\n readonly fields: readonly CompiledField[];\n readonly translate: RenderTranslate;\n /**\n * The prefix the form session's controls use, from `useIdPrefix()`.\n *\n * An item that names a field and no explicit `targetId` is an element id on the page, and the\n * only correct one is the control's own (`field.a11y.controlId`), which begins with this\n * prefix. Passing it is what keeps the announcement pointing inside its own provider: two forms\n * over one artifact declare the same field ids, so a summary built from `fieldId` alone links a\n * reader to the first form's control. A row-scoped reason still supplies its own `targetId`,\n * because the tree does not know the row.\n */\n readonly idPrefix: string;\n /**\n * The id the summary element itself carries.\n *\n * A reason about the record rather than a field has nowhere else to point, so an item links at\n * this element. A host that renders the summary passes the id it gave that element; without it\n * the item links at `error_summary`, which is the documented default and not an element a host\n * is obliged to create.\n */\n readonly summaryId?: string;\n}\n\n/**\n * The announced summary of every blocking reason, or nothing when none blocks.\n *\n * It is built apart from the layout walk, and on purpose: a reason appears and disappears on\n * almost every keystroke, while the tree it sits above is stable. A host renders this beside the\n * tree, so a keystroke that adds a failure re-renders the announcement and not the form.\n */\nexport function renderErrorSummary(\n input: RenderErrorSummaryInput,\n): RenderErrorSummaryNode | undefined {\n if (input.errors.length === 0) return undefined;\n const declarations = indexDeclarations(input.fields);\n return {\n kind: 'error_summary',\n nodeId: 'error_summary',\n items: input.errors.map((error) => {\n // The element the item is about: the caller's when it knows the row, else the control the\n // field is painted as (`fieldDomId` under this session's prefix), else the announcement\n // itself for a reason about the record.\n const targetId =\n error.targetId ??\n (error.fieldId === undefined\n ? (input.summaryId ?? 'error_summary')\n : fieldDomId(input.idPrefix, error.fieldId));\n if (error.fieldId === undefined) return { message: error.message, targetId };\n const declaration = declarations.get(error.fieldId);\n return {\n fieldId: error.fieldId,\n message: error.message,\n targetId,\n ...(declaration === undefined ? {} : { label: labelOf(declaration, input.translate) }),\n };\n }),\n };\n}\n\n/**\n * The first `row_<n>` key the current rows do not already hold.\n *\n * The key is derived from the record rather than from a counter in a component: a wizard unmounts\n * the step it is not painting, so component state starts again at one while the rows it already\n * appended are still in the record. The engine refuses a duplicate natural key, and a refusal\n * thrown from a handler would leave the counter repeating itself on every later click.\n */\nexport function freeNaturalKey(rows: readonly { readonly rowKey: string | number }[]): string {\n const taken = new Set(rows.map((row) => String(row.rowKey)));\n // The search starts at one, not at the row count: rows may hold authored natural keys\n // (`kitchen`, `garage`), so `row_1` can be free while the list already holds two rows.\n let candidate = 1;\n while (taken.has(`row_${String(candidate)}`)) candidate += 1;\n return `row_${String(candidate)}`;\n}\n\n/**\n * Whether a natural-key string is one `freeNaturalKey` minted rather than text the reader authored.\n *\n * Kept beside `freeNaturalKey` so the minting convention and its display fallback share one owner\n * across web and native adapters.\n */\nfunction isGeneratedNaturalKey(value: string): boolean {\n return /^row_\\d+$/u.test(value);\n}\n\n/**\n * A row's accessible and visible name, falling back to the container label and 1-based position.\n *\n * `rowName` is resolved by the runtime from the declaration's addressing (`natural` and `value`\n * rows carry their key text; `assigned` rows carry `undefined`). Keys minted by `freeNaturalKey`\n * (`row_1`, `row_2`, …) fall back to the positional label so newly added natural-key rows never\n * speak raw placeholder ids on either web or native.\n */\nexport function renderRowName(label: string, rowName: string | undefined, index: number): string {\n return rowName === undefined || rowName === '' || isGeneratedNaturalKey(rowName)\n ? `${label} ${String(index + 1)}`\n : rowName;\n}\n\n/**\n * Walks one layout into the render tree a host paints.\n *\n * Every visible node contributes exactly one tree node of a kind the closed grammar names, and\n * the walk is exhaustive: a layout kind added to the grammar fails typecheck here rather than\n * disappearing from the screen. A hidden node contributes nothing. The tree is a pure function\n * of the layout, the declarations and the formatter, so a host that memoises it keeps the same\n * node objects — and the same child renders — across a value edit that moves no chrome.\n */\nexport function renderLayout(input: RenderLayoutInput): readonly RenderNode[] {\n const declarations = indexDeclarations(input.fields);\n return input.layout.flatMap((view) => {\n const node = nodeOf(view, 2, declarations, input.translate, input.stepId);\n return node === undefined ? [] : [node];\n });\n}\n"]}
@@ -0,0 +1,30 @@
1
+ import type { CompiledField, CompiledSchema } from '@azx-pbc/axiom-runtime';
2
+ /**
3
+ * The compiled artifact the session was opened with, `useSchema()`.
4
+ *
5
+ * `FormProvider` takes the artifact once, and until this hook there was no way to read it back:
6
+ * a component that painted the layout needed the declarations (`renderLayout` takes `fields`),
7
+ * and the only route was forwarding the artifact through every layer between the page and the
8
+ * control. The artifact is a plain value the session already owns, so reading it is a context
9
+ * read, not a subscription — it never changes while the provider is mounted (`FormProvider`
10
+ * refuses a different artifact rather than re-evaluating one it did not open with).
11
+ */
12
+ export declare function useSchema(): CompiledSchema;
13
+ /**
14
+ * The element-id prefix this form session emits, `useIdPrefix()`.
15
+ *
16
+ * `FormProvider` settles one prefix per mount and every `field.a11y.controlId`, `errorId` and
17
+ * `descriptionId` begins with it. A host painting the announced summary (`renderErrorSummary`)
18
+ * or its own markup needs the same value, because a summary that derives ids from `fieldId` alone
19
+ * points at the first provider on the page. Read it, do not recompute it.
20
+ */
21
+ export declare function useIdPrefix(): string;
22
+ /**
23
+ * The artifact's field declarations, `useFields()`.
24
+ *
25
+ * The array `renderLayout` reads, from the session rather than from a prop, and with the
26
+ * artifact's own identity: two components that call it in one render receive the same array, so
27
+ * a memoised render tree is not rebuilt for a call.
28
+ */
29
+ export declare function useFields(): readonly CompiledField[];
30
+ //# sourceMappingURL=schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/render/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAG5E;;;;;;;;;GASG;AACH,wBAAgB,SAAS,IAAI,cAAc,CAE1C;AAOD;;;;;;;GAOG;AACH,wBAAgB,WAAW,IAAI,MAAM,CAEpC;AAED;;;;;;GAMG;AACH,wBAAgB,SAAS,IAAI,SAAS,aAAa,EAAE,CAEpD"}
@@ -0,0 +1,40 @@
1
+ import { useFormSession } from '../useField.js';
2
+ /**
3
+ * The compiled artifact the session was opened with, `useSchema()`.
4
+ *
5
+ * `FormProvider` takes the artifact once, and until this hook there was no way to read it back:
6
+ * a component that painted the layout needed the declarations (`renderLayout` takes `fields`),
7
+ * and the only route was forwarding the artifact through every layer between the page and the
8
+ * control. The artifact is a plain value the session already owns, so reading it is a context
9
+ * read, not a subscription — it never changes while the provider is mounted (`FormProvider`
10
+ * refuses a different artifact rather than re-evaluating one it did not open with).
11
+ */
12
+ export function useSchema() {
13
+ return useSessionSchema('useSchema');
14
+ }
15
+ /** One context read under the caller's own name, so a refusal names the hook that was called. */
16
+ function useSessionSchema(hook) {
17
+ return useFormSession(hook).store.compiled;
18
+ }
19
+ /**
20
+ * The element-id prefix this form session emits, `useIdPrefix()`.
21
+ *
22
+ * `FormProvider` settles one prefix per mount and every `field.a11y.controlId`, `errorId` and
23
+ * `descriptionId` begins with it. A host painting the announced summary (`renderErrorSummary`)
24
+ * or its own markup needs the same value, because a summary that derives ids from `fieldId` alone
25
+ * points at the first provider on the page. Read it, do not recompute it.
26
+ */
27
+ export function useIdPrefix() {
28
+ return useFormSession('useIdPrefix').store.idPrefix;
29
+ }
30
+ /**
31
+ * The artifact's field declarations, `useFields()`.
32
+ *
33
+ * The array `renderLayout` reads, from the session rather than from a prop, and with the
34
+ * artifact's own identity: two components that call it in one render receive the same array, so
35
+ * a memoised render tree is not rebuilt for a call.
36
+ */
37
+ export function useFields() {
38
+ return useSessionSchema('useFields').fields;
39
+ }
40
+ //# sourceMappingURL=schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../src/render/schema.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEhD;;;;;;;;;GASG;AACH,MAAM,UAAU,SAAS;IACvB,OAAO,gBAAgB,CAAC,WAAW,CAAC,CAAC;AACvC,CAAC;AAED,iGAAiG;AACjG,SAAS,gBAAgB,CAAC,IAAY;IACpC,OAAO,cAAc,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC;AAC7C,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,WAAW;IACzB,OAAO,cAAc,CAAC,aAAa,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC;AACtD,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,SAAS;IACvB,OAAO,gBAAgB,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC;AAC9C,CAAC","sourcesContent":["import type { CompiledField, CompiledSchema } from '@azx-pbc/axiom-runtime';\nimport { useFormSession } from '../useField.js';\n\n/**\n * The compiled artifact the session was opened with, `useSchema()`.\n *\n * `FormProvider` takes the artifact once, and until this hook there was no way to read it back:\n * a component that painted the layout needed the declarations (`renderLayout` takes `fields`),\n * and the only route was forwarding the artifact through every layer between the page and the\n * control. The artifact is a plain value the session already owns, so reading it is a context\n * read, not a subscription — it never changes while the provider is mounted (`FormProvider`\n * refuses a different artifact rather than re-evaluating one it did not open with).\n */\nexport function useSchema(): CompiledSchema {\n return useSessionSchema('useSchema');\n}\n\n/** One context read under the caller's own name, so a refusal names the hook that was called. */\nfunction useSessionSchema(hook: string): CompiledSchema {\n return useFormSession(hook).store.compiled;\n}\n\n/**\n * The element-id prefix this form session emits, `useIdPrefix()`.\n *\n * `FormProvider` settles one prefix per mount and every `field.a11y.controlId`, `errorId` and\n * `descriptionId` begins with it. A host painting the announced summary (`renderErrorSummary`)\n * or its own markup needs the same value, because a summary that derives ids from `fieldId` alone\n * points at the first provider on the page. Read it, do not recompute it.\n */\nexport function useIdPrefix(): string {\n return useFormSession('useIdPrefix').store.idPrefix;\n}\n\n/**\n * The artifact's field declarations, `useFields()`.\n *\n * The array `renderLayout` reads, from the session rather than from a prop, and with the\n * artifact's own identity: two components that call it in one render receive the same array, so\n * a memoised render tree is not rebuilt for a call.\n */\nexport function useFields(): readonly CompiledField[] {\n return useSessionSchema('useFields').fields;\n}\n"]}
@@ -0,0 +1,59 @@
1
+ import type { CompiledField, Primitive, WireValue } from '@azx-pbc/axiom-runtime';
2
+ import type { FieldProps } from '../field-props.js';
3
+ /**
4
+ * The text a submitter reads for a value no control edits.
5
+ *
6
+ * A read-only binding, a summary readout and a summary card's field list all show a wire value
7
+ * as text, and the wire spelling of a money amount or a timeslot is not that text. This is a
8
+ * plain renderer's answer, not a locale service: it never reads a platform `Intl`, so the same
9
+ * record reads the same on a browser and on Hermes.
10
+ *
11
+ * A value whose text is a word — a boolean — or a list whose separator is a locale fact has no
12
+ * neutral spelling. The library therefore ships none: `valueDisplay` is the host's port for
13
+ * those, and without it they render as empty text rather than as English.
14
+ */
15
+ /**
16
+ * The host's display formatter for one value a control shows but does not edit.
17
+ *
18
+ * It returns the text the value reads as in the host's locale, or `undefined` for a value it does
19
+ * not format. A value this port does not answer falls back to the canonical text below; a boolean
20
+ * and a list have no fallback because `true`/`false` and `, ` are English conventions. When a
21
+ * binding's declared `primitive` is known, it is passed so a numeric-looking `string` such as a
22
+ * year or reference number is never re-grouped as a decimal.
23
+ */
24
+ export type ValueDisplay = (value: Exclude<WireValue, null>, primitive?: Primitive, itemPrimitive?: Primitive) => string | undefined;
25
+ /**
26
+ * One wire value as text, in the canonical vocabulary each primitive states.
27
+ *
28
+ * `display` is asked first, so a host can format a money amount as currency or a date as prose.
29
+ * Without an answer, a scalar's canonical spelling is shown; a boolean and an array render as
30
+ * empty text, because their display text is a locale decision the library must not make.
31
+ */
32
+ export declare function renderValueText(value: WireValue | undefined, display?: ValueDisplay, primitive?: Primitive, itemPrimitive?: Primitive): string;
33
+ /**
34
+ * The placeholder shown when a read-only binding or summary readout has no decided text.
35
+ *
36
+ * A blank cell reads as "this value does not exist"; the dash (U+2014) says the value is
37
+ * undecided without leaving an empty cell. Owned here so DOM and native adapters render the same
38
+ * placeholder.
39
+ */
40
+ export declare const UNDECIDED_VALUE_TEXT = "\u2014";
41
+ /**
42
+ * Projects rendered display text for a read-only control or summary cell.
43
+ *
44
+ * A non-empty value renders as-is. An empty value that is withheld renders blank so the
45
+ * accompanying deferral or withholding note stands alone; any other empty value renders
46
+ * `UNDECIDED_VALUE_TEXT`.
47
+ */
48
+ export declare function renderDisplayText(text: string, withheld?: boolean): string;
49
+ /**
50
+ * The text a binding shows, wherever its value lives.
51
+ *
52
+ * A computed value is not the record's value: the writer owns it, so the binding reports it under
53
+ * `computation` and leaves `value` absent. A host that printed `value` alone would render every
54
+ * computed total as empty, so the one place that decides a binding's display text reads both.
55
+ */
56
+ export declare function renderFieldText(field: Pick<FieldProps, 'value' | 'maskedText' | 'computation'> & {
57
+ readonly descriptor?: Pick<CompiledField, 'primitive' | 'items'>;
58
+ }, display?: ValueDisplay): string;
59
+ //# sourceMappingURL=value-text.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"value-text.d.ts","sourceRoot":"","sources":["../../src/render/value-text.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAElF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEpD;;;;;;;;;;;GAWG;AAEH;;;;;;;;GAQG;AACH,MAAM,MAAM,YAAY,GAAG,CACzB,KAAK,EAAE,OAAO,CAAC,SAAS,EAAE,IAAI,CAAC,EAC/B,SAAS,CAAC,EAAE,SAAS,EACrB,aAAa,CAAC,EAAE,SAAS,KACtB,MAAM,GAAG,SAAS,CAAC;AAYxB;;;;;;GAMG;AACH,wBAAgB,eAAe,CAC7B,KAAK,EAAE,SAAS,GAAG,SAAS,EAC5B,OAAO,CAAC,EAAE,YAAY,EACtB,SAAS,CAAC,EAAE,SAAS,EACrB,aAAa,CAAC,EAAE,SAAS,GACxB,MAAM,CAsCR;AAED;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,WAAM,CAAC;AAExC;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,OAAO,GAAG,MAAM,CAG1E;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAC7B,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,OAAO,GAAG,YAAY,GAAG,aAAa,CAAC,GAAG;IAChE,QAAQ,CAAC,UAAU,CAAC,EAAE,IAAI,CAAC,aAAa,EAAE,WAAW,GAAG,OAAO,CAAC,CAAC;CAClE,EACD,OAAO,CAAC,EAAE,YAAY,GACrB,MAAM,CAQR"}
@@ -0,0 +1,104 @@
1
+ import { isDurationUnit, isRecord, moneyAmountText } from '@azx-pbc/axiom-runtime';
2
+ /** A timeslot's date and window, when the value carries them. */
3
+ function slotText(value) {
4
+ const localDate = value['localDate'];
5
+ const start = value['start'];
6
+ const end = value['end'];
7
+ if (typeof localDate !== 'string')
8
+ return undefined;
9
+ const window = typeof start === 'string' && typeof end === 'string' ? ` ${start}–${end}` : '';
10
+ return `${localDate}${window}`;
11
+ }
12
+ /**
13
+ * One wire value as text, in the canonical vocabulary each primitive states.
14
+ *
15
+ * `display` is asked first, so a host can format a money amount as currency or a date as prose.
16
+ * Without an answer, a scalar's canonical spelling is shown; a boolean and an array render as
17
+ * empty text, because their display text is a locale decision the library must not make.
18
+ */
19
+ export function renderValueText(value, display, primitive, itemPrimitive) {
20
+ if (value === undefined || value === null)
21
+ return '';
22
+ const shown = display?.(value, primitive, itemPrimitive);
23
+ if (shown !== undefined)
24
+ return shown;
25
+ if (typeof value === 'string' || typeof value === 'number')
26
+ return String(value);
27
+ if (typeof value === 'boolean')
28
+ return '';
29
+ if (Array.isArray(value))
30
+ return '';
31
+ if (!isRecord(value))
32
+ return '';
33
+ const minor = value['minor'];
34
+ const scale = value['scale'];
35
+ if (typeof minor === 'string' && typeof scale === 'number') {
36
+ const text = moneyAmountText(minor, scale);
37
+ if (text !== undefined)
38
+ return text;
39
+ }
40
+ const slot = slotText(value);
41
+ if (slot !== undefined)
42
+ return slot;
43
+ // A quantity carries its own unit, `MODEL-2.1.21`. The unit code is the declaration's
44
+ // vocabulary, not display prose, but stating it beside the amount is the canonical spelling a
45
+ // reader can act on: `24 sqm` is the measurement, where `24` alone names no measure.
46
+ const amount = value['value'];
47
+ const unit = value['unit'];
48
+ if (typeof amount === 'string' && typeof unit === 'string')
49
+ return `${amount} ${unit}`;
50
+ // A duration carries a whole amount and a declared unit, `MODEL-2.1.24`. Returning the canonical
51
+ // pair when no host display formatter answered keeps a decided duration from painting as the
52
+ // undecided dash.
53
+ const durationAmount = value['amount'];
54
+ if (typeof durationAmount === 'number' &&
55
+ Number.isFinite(durationAmount) &&
56
+ isDurationUnit(unit)) {
57
+ return `${String(durationAmount)} ${unit}`;
58
+ }
59
+ const name = value['name'];
60
+ if (typeof name === 'string')
61
+ return name;
62
+ const id = value['id'];
63
+ if (typeof id === 'string')
64
+ return id;
65
+ return '';
66
+ }
67
+ /**
68
+ * The placeholder shown when a read-only binding or summary readout has no decided text.
69
+ *
70
+ * A blank cell reads as "this value does not exist"; the dash (U+2014) says the value is
71
+ * undecided without leaving an empty cell. Owned here so DOM and native adapters render the same
72
+ * placeholder.
73
+ */
74
+ export const UNDECIDED_VALUE_TEXT = '—';
75
+ /**
76
+ * Projects rendered display text for a read-only control or summary cell.
77
+ *
78
+ * A non-empty value renders as-is. An empty value that is withheld renders blank so the
79
+ * accompanying deferral or withholding note stands alone; any other empty value renders
80
+ * `UNDECIDED_VALUE_TEXT`.
81
+ */
82
+ export function renderDisplayText(text, withheld) {
83
+ if (text !== '')
84
+ return text;
85
+ return withheld === true ? '' : UNDECIDED_VALUE_TEXT;
86
+ }
87
+ /**
88
+ * The text a binding shows, wherever its value lives.
89
+ *
90
+ * A computed value is not the record's value: the writer owns it, so the binding reports it under
91
+ * `computation` and leaves `value` absent. A host that printed `value` alone would render every
92
+ * computed total as empty, so the one place that decides a binding's display text reads both.
93
+ */
94
+ export function renderFieldText(field, display) {
95
+ if (field.maskedText !== undefined)
96
+ return field.maskedText;
97
+ const primitive = field.descriptor?.primitive;
98
+ const itemPrimitive = field.descriptor?.items?.primitive;
99
+ if (field.computation.kind === 'value') {
100
+ return renderValueText(field.computation.value, display, primitive, itemPrimitive);
101
+ }
102
+ return renderValueText(field.value, display, primitive, itemPrimitive);
103
+ }
104
+ //# sourceMappingURL=value-text.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"value-text.js","sourceRoot":"","sources":["../../src/render/value-text.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AA+BnF,iEAAiE;AACjE,SAAS,QAAQ,CAAC,KAAwC;IACxD,MAAM,SAAS,GAAG,KAAK,CAAC,WAAW,CAAC,CAAC;IACrC,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC;IAC7B,MAAM,GAAG,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC;IACzB,IAAI,OAAO,SAAS,KAAK,QAAQ;QAAE,OAAO,SAAS,CAAC;IACpD,MAAM,MAAM,GAAG,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,GAAG,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,KAAK,IAAI,GAAG,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;IAC9F,OAAO,GAAG,SAAS,GAAG,MAAM,EAAE,CAAC;AACjC,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,eAAe,CAC7B,KAA4B,EAC5B,OAAsB,EACtB,SAAqB,EACrB,aAAyB;IAEzB,IAAI,KAAK,KAAK,SAAS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,EAAE,OAAO,EAAE,SAAS,EAAE,aAAa,CAAC,CAAC;IACrF,CAAC;IACD,OAAO,eAAe,CAAC,KAAK,CAAC,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,aAAa,CAAC,CAAC;AACzE,CAAC","sourcesContent":["import type { CompiledField, Primitive, WireValue } from '@azx-pbc/axiom-runtime';\nimport { isDurationUnit, isRecord, moneyAmountText } from '@azx-pbc/axiom-runtime';\nimport type { FieldProps } from '../field-props.js';\n\n/**\n * The text a submitter reads for a value no control edits.\n *\n * A read-only binding, a summary readout and a summary card's field list all show a wire value\n * as text, and the wire spelling of a money amount or a timeslot is not that text. This is a\n * plain renderer's answer, not a locale service: it never reads a platform `Intl`, so the same\n * record reads the same on a browser and on Hermes.\n *\n * A value whose text is a word — a boolean — or a list whose separator is a locale fact has no\n * neutral spelling. The library therefore ships none: `valueDisplay` is the host's port for\n * those, and without it they render as empty text rather than as English.\n */\n\n/**\n * The host's display formatter for one value a control shows but does not edit.\n *\n * It returns the text the value reads as in the host's locale, or `undefined` for a value it does\n * not format. A value this port does not answer falls back to the canonical text below; a boolean\n * and a list have no fallback because `true`/`false` and `, ` are English conventions. When a\n * binding's declared `primitive` is known, it is passed so a numeric-looking `string` such as a\n * year or reference number is never re-grouped as a decimal.\n */\nexport type ValueDisplay = (\n value: Exclude<WireValue, null>,\n primitive?: Primitive,\n itemPrimitive?: Primitive,\n) => string | undefined;\n\n/** A timeslot's date and window, when the value carries them. */\nfunction slotText(value: Readonly<Record<string, unknown>>): string | undefined {\n const localDate = value['localDate'];\n const start = value['start'];\n const end = value['end'];\n if (typeof localDate !== 'string') return undefined;\n const window = typeof start === 'string' && typeof end === 'string' ? ` ${start}–${end}` : '';\n return `${localDate}${window}`;\n}\n\n/**\n * One wire value as text, in the canonical vocabulary each primitive states.\n *\n * `display` is asked first, so a host can format a money amount as currency or a date as prose.\n * Without an answer, a scalar's canonical spelling is shown; a boolean and an array render as\n * empty text, because their display text is a locale decision the library must not make.\n */\nexport function renderValueText(\n value: WireValue | undefined,\n display?: ValueDisplay,\n primitive?: Primitive,\n itemPrimitive?: Primitive,\n): string {\n if (value === undefined || value === null) return '';\n const shown = display?.(value, primitive, itemPrimitive);\n if (shown !== undefined) return shown;\n if (typeof value === 'string' || typeof value === 'number') return String(value);\n if (typeof value === 'boolean') return '';\n if (Array.isArray(value)) return '';\n if (!isRecord(value)) return '';\n const minor = value['minor'];\n const scale = value['scale'];\n if (typeof minor === 'string' && typeof scale === 'number') {\n const text = moneyAmountText(minor, scale);\n if (text !== undefined) return text;\n }\n const slot = slotText(value);\n if (slot !== undefined) return slot;\n // A quantity carries its own unit, `MODEL-2.1.21`. The unit code is the declaration's\n // vocabulary, not display prose, but stating it beside the amount is the canonical spelling a\n // reader can act on: `24 sqm` is the measurement, where `24` alone names no measure.\n const amount = value['value'];\n const unit = value['unit'];\n if (typeof amount === 'string' && typeof unit === 'string') return `${amount} ${unit}`;\n // A duration carries a whole amount and a declared unit, `MODEL-2.1.24`. Returning the canonical\n // pair when no host display formatter answered keeps a decided duration from painting as the\n // undecided dash.\n const durationAmount = value['amount'];\n if (\n typeof durationAmount === 'number' &&\n Number.isFinite(durationAmount) &&\n isDurationUnit(unit)\n ) {\n return `${String(durationAmount)} ${unit}`;\n }\n const name = value['name'];\n if (typeof name === 'string') return name;\n const id = value['id'];\n if (typeof id === 'string') return id;\n return '';\n}\n\n/**\n * The placeholder shown when a read-only binding or summary readout has no decided text.\n *\n * A blank cell reads as \"this value does not exist\"; the dash (U+2014) says the value is\n * undecided without leaving an empty cell. Owned here so DOM and native adapters render the same\n * placeholder.\n */\nexport const UNDECIDED_VALUE_TEXT = '—';\n\n/**\n * Projects rendered display text for a read-only control or summary cell.\n *\n * A non-empty value renders as-is. An empty value that is withheld renders blank so the\n * accompanying deferral or withholding note stands alone; any other empty value renders\n * `UNDECIDED_VALUE_TEXT`.\n */\nexport function renderDisplayText(text: string, withheld?: boolean): string {\n if (text !== '') return text;\n return withheld === true ? '' : UNDECIDED_VALUE_TEXT;\n}\n\n/**\n * The text a binding shows, wherever its value lives.\n *\n * A computed value is not the record's value: the writer owns it, so the binding reports it under\n * `computation` and leaves `value` absent. A host that printed `value` alone would render every\n * computed total as empty, so the one place that decides a binding's display text reads both.\n */\nexport function renderFieldText(\n field: Pick<FieldProps, 'value' | 'maskedText' | 'computation'> & {\n readonly descriptor?: Pick<CompiledField, 'primitive' | 'items'>;\n },\n display?: ValueDisplay,\n): string {\n if (field.maskedText !== undefined) return field.maskedText;\n const primitive = field.descriptor?.primitive;\n const itemPrimitive = field.descriptor?.items?.primitive;\n if (field.computation.kind === 'value') {\n return renderValueText(field.computation.value, display, primitive, itemPrimitive);\n }\n return renderValueText(field.value, display, primitive, itemPrimitive);\n}\n"]}
@@ -0,0 +1,110 @@
1
+ import type { Engine, WireValue } from '@azx-pbc/axiom-runtime';
2
+ /**
3
+ * One row of an array binding, addressed by the identity the engine holds for it.
4
+ *
5
+ * The object is reused for as long as the row exists at any position, so a reorder changes the
6
+ * order of the list and the identities of its entries, not the entries themselves. A React
7
+ * `key`, a memo boundary and the engine's own row baseline therefore all agree across a move.
8
+ */
9
+ export interface RowRef {
10
+ readonly rowKey: string | number;
11
+ /** `fieldId@<wire-typed row key>`: the key a row control binds under. */
12
+ readonly bindingKey: string;
13
+ /**
14
+ * The row's own name, when its key is authored text rather than an id the host minted.
15
+ *
16
+ * A renderer paints this name or falls back to the row's position. It never inspects the key's
17
+ * spelling, because the declaration's addressing is the one place that answer is known.
18
+ */
19
+ readonly rowName?: string;
20
+ }
21
+ /** Which structural operations the container's committed state permits. */
22
+ export interface FieldArrayMutations {
23
+ readonly append: boolean;
24
+ readonly insert: boolean;
25
+ readonly remove: boolean;
26
+ readonly move: boolean;
27
+ /** Replace every row at once; a whole-container write, gated like `append`. */
28
+ readonly replace: boolean;
29
+ }
30
+ /**
31
+ * One array binding's committed structure: its rows in order and what may be done to them.
32
+ *
33
+ * The view is what `useFieldArray` publishes. Its identity changes only when the ordered row
34
+ * identities or the mutation permissions change, never when one row's value changes — which is
35
+ * what keeps an edit to row three from re-rendering the list that holds it.
36
+ */
37
+ export interface FieldArrayView {
38
+ readonly fieldId: string;
39
+ readonly rows: readonly RowRef[];
40
+ readonly mutations: FieldArrayMutations;
41
+ }
42
+ /** The five structural operations one array binding is handed, with stable identities. */
43
+ export interface FieldArrayControls {
44
+ readonly append: (value: WireValue) => void;
45
+ readonly insert: (index: number, value: WireValue) => void;
46
+ readonly remove: (rowKey: string | number) => void;
47
+ readonly move: (fromIndex: number, toIndex: number) => void;
48
+ readonly moveRow: (rowKey: string | number, toIndex: number) => void;
49
+ /** React Hook Form's `replace`: the whole list in one write. */
50
+ readonly replace: (values: readonly WireValue[]) => void;
51
+ }
52
+ /**
53
+ * The object one `useFieldArray` consumer renders: the view plus the callbacks.
54
+ *
55
+ * The composite is memoised by the view identity, so the snapshot `useSyncExternalStore`
56
+ * compares is the same object until the structure or a permission actually moved.
57
+ */
58
+ export interface FieldArray extends FieldArrayView, FieldArrayControls {
59
+ }
60
+ export declare function fieldArrayOf(view: FieldArrayView, controls: FieldArrayControls): FieldArray;
61
+ /** The controls of each array field, built once so a memoised row sees a stable callback. */
62
+ export declare class ArrayWriters {
63
+ private readonly controls;
64
+ for(fieldId: string, build: () => FieldArrayControls): FieldArrayControls;
65
+ }
66
+ /**
67
+ * The committed array views, and the per-row identities behind them.
68
+ *
69
+ * A candidate read keeps its own map until the commit boundary adopts it, so a render React
70
+ * discards cannot replace the view a committed subscriber last read.
71
+ */
72
+ export declare class ArrayBindings {
73
+ private readonly committed;
74
+ private readonly rows;
75
+ private candidate;
76
+ /** The view of one array field, reusing every row object the ordered identity still holds. */
77
+ read(owner: object, committed: boolean, engine: Engine, fieldId: string): FieldArrayView;
78
+ /**
79
+ * Drops one row's identity object. A row that left the array is never rendered again, and the
80
+ * object it was given holds its key; a row that returns is handed a fresh one.
81
+ */
82
+ retireRow(fieldId: string, rowKey: string | number | undefined): void;
83
+ /** How many row identities are retained, so a churned list can be counted. */
84
+ retainedRows(): number;
85
+ /** Drops every row identity and view; a reset starts from the new record's rows. */
86
+ clear(): void;
87
+ /** Adopts the views a committed render read; unread fields keep their committed view. */
88
+ commit(owner: object): void;
89
+ /** The view committed state last read, or `undefined` before its first read. */
90
+ current(fieldId: string): FieldArrayView | undefined;
91
+ /**
92
+ * Forgets one array's published view while keeping the identity of every row it still holds.
93
+ *
94
+ * A declined structural write moves no committed row, but its controlled list still repaints.
95
+ */
96
+ retireView(fieldId: string): void;
97
+ private row;
98
+ /**
99
+ * The row objects one field's committed keys name, with the identities of rows it no longer
100
+ * holds dropped first. A list that appends and removes rows must not keep one `RowRef` per row
101
+ * it has ever shown.
102
+ *
103
+ * Only a committed read prunes: a candidate render may be discarded, and the row it dropped
104
+ * from its own tree was never actually removed from the list a committed subscriber shows.
105
+ */
106
+ private committedRowsOf;
107
+ private rowObjectsOf;
108
+ private candidateViews;
109
+ }
110
+ //# sourceMappingURL=array-bindings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"array-bindings.d.ts","sourceRoot":"","sources":["../../src/store/array-bindings.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAA8B,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAG5F;;;;;;GAMG;AACH,MAAM,WAAW,MAAM;IACrB,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;IACjC,yEAAyE;IACzE,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B;;;;;OAKG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,2EAA2E;AAC3E,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,+EAA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