@argusvane/datum-form-test 0.0.0-stage → 0.1.0

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 (552) hide show
  1. package/LICENSE +21 -0
  2. package/NOTICE +26 -0
  3. package/README.md +52 -2
  4. package/bin/datum-form-test.mjs +11 -0
  5. package/dist/bundle-size.txt +3 -0
  6. package/dist/cli.mjs +3 -0
  7. package/dist/datum-form-test.LICENSE.txt +510 -0
  8. package/dist/index.mjs +68728 -0
  9. package/dist/types/engine/form-engine/agent/builder/agent-texts-en.d.ts +53 -0
  10. package/dist/types/engine/form-engine/builder/controller/builder-controller.d.ts +2534 -0
  11. package/dist/types/engine/form-engine/builder/controller/dependents.d.ts +122 -0
  12. package/dist/types/engine/form-engine/builder/controller/language-edits.d.ts +48 -0
  13. package/dist/types/engine/form-engine/builder/controller/simulated-options.d.ts +20 -0
  14. package/dist/types/engine/form-engine/builder/controller/translation-rules.d.ts +71 -0
  15. package/dist/types/engine/form-engine/builder/controller/try-submission.d.ts +45 -0
  16. package/dist/types/engine/form-engine/builder/data/data-loader.d.ts +6 -0
  17. package/dist/types/engine/form-engine/builder/data/data-model-import.d.ts +119 -0
  18. package/dist/types/engine/form-engine/builder/data/data-model-plan.d.ts +52 -0
  19. package/dist/types/engine/form-engine/builder/data/data-surface.d.ts +139 -0
  20. package/dist/types/engine/form-engine/builder/data/data-texts-en.d.ts +205 -0
  21. package/dist/types/engine/form-engine/builder/data/schema-rows.d.ts +56 -0
  22. package/dist/types/engine/form-engine/builder/data-model/compare.d.ts +37 -0
  23. package/dist/types/engine/form-engine/builder/data-model/data-model.d.ts +113 -0
  24. package/dist/types/engine/form-engine/builder/data-model/example.d.ts +6 -0
  25. package/dist/types/engine/form-engine/builder/data-model/from-form.d.ts +43 -0
  26. package/dist/types/engine/form-engine/builder/data-model/from-json-schema.d.ts +22 -0
  27. package/dist/types/engine/form-engine/builder/data-model/from-sample.d.ts +13 -0
  28. package/dist/types/engine/form-engine/builder/data-model/generate.d.ts +101 -0
  29. package/dist/types/engine/form-engine/builder/data-model/index.d.ts +10 -0
  30. package/dist/types/engine/form-engine/builder/data-model/mapping.d.ts +26 -0
  31. package/dist/types/engine/form-engine/builder/data-model/read-input.d.ts +39 -0
  32. package/dist/types/engine/form-engine/builder/data-model/to-json-schema.d.ts +10 -0
  33. package/dist/types/engine/form-engine/builder/definition-budget.d.ts +27 -0
  34. package/dist/types/engine/form-engine/builder/drag-drop/html5-drag-drop.d.ts +57 -0
  35. package/dist/types/engine/form-engine/builder/drag-drop/move-legality.d.ts +23 -0
  36. package/dist/types/engine/form-engine/builder/drag-drop/move-texts-en.d.ts +22 -0
  37. package/dist/types/engine/form-engine/builder/drag-drop/move-ui.d.ts +72 -0
  38. package/dist/types/engine/form-engine/builder/form-tests/tests-accept.d.ts +18 -0
  39. package/dist/types/engine/form-engine/builder/form-tests/tests-add-step.d.ts +51 -0
  40. package/dist/types/engine/form-engine/builder/form-tests/tests-completions.d.ts +66 -0
  41. package/dist/types/engine/form-engine/builder/form-tests/tests-coverage.d.ts +32 -0
  42. package/dist/types/engine/form-engine/builder/form-tests/tests-editor-loader.d.ts +10 -0
  43. package/dist/types/engine/form-engine/builder/form-tests/tests-editor-texts-en.d.ts +72 -0
  44. package/dist/types/engine/form-engine/builder/form-tests/tests-editor.d.ts +50 -0
  45. package/dist/types/engine/form-engine/builder/form-tests/tests-model.d.ts +422 -0
  46. package/dist/types/engine/form-engine/builder/form-tests/tests-panel-styles.d.ts +8 -0
  47. package/dist/types/engine/form-engine/builder/form-tests/tests-panel-texts-en.d.ts +174 -0
  48. package/dist/types/engine/form-engine/builder/form-tests/tests-record.d.ts +55 -0
  49. package/dist/types/engine/form-engine/builder/form-tests/tests-rename.d.ts +93 -0
  50. package/dist/types/engine/form-engine/builder/form-tests/tests-rules.d.ts +42 -0
  51. package/dist/types/engine/form-engine/builder/form-tests/tests-runner.d.ts +2 -0
  52. package/dist/types/engine/form-engine/builder/form-tests/tests-scaffold.d.ts +13 -0
  53. package/dist/types/engine/form-engine/builder/form-tests/tests-textarea.d.ts +88 -0
  54. package/dist/types/engine/form-engine/builder/form-tests/tests-texts-en.d.ts +222 -0
  55. package/dist/types/engine/form-engine/builder/form-tests/tests-words.d.ts +12 -0
  56. package/dist/types/engine/form-engine/builder/formula/feel-functions.d.ts +98 -0
  57. package/dist/types/engine/form-engine/builder/formula/feel-print.d.ts +47 -0
  58. package/dist/types/engine/form-engine/builder/formula/formula-editor-loader.d.ts +16 -0
  59. package/dist/types/engine/form-engine/builder/formula/formula-editor-styles.d.ts +19 -0
  60. package/dist/types/engine/form-engine/builder/formula/formula-editor.d.ts +104 -0
  61. package/dist/types/engine/form-engine/builder/formula/formula-fields.d.ts +44 -0
  62. package/dist/types/engine/form-engine/builder/formula/formula-textarea.d.ts +75 -0
  63. package/dist/types/engine/form-engine/builder/formula/formula-texts-en.d.ts +18 -0
  64. package/dist/types/engine/form-engine/builder/formula/rename.d.ts +98 -0
  65. package/dist/types/engine/form-engine/builder/history/command-history.d.ts +31 -0
  66. package/dist/types/engine/form-engine/builder/history/form-steps-on-page.d.ts +104 -0
  67. package/dist/types/engine/form-engine/builder/history/rename-step.d.ts +68 -0
  68. package/dist/types/engine/form-engine/builder/index.d.ts +48 -0
  69. package/dist/types/engine/form-engine/builder/journey-designer/journey-authoring-texts-en.d.ts +20 -0
  70. package/dist/types/engine/form-engine/builder/journey-designer/journey-authoring.d.ts +119 -0
  71. package/dist/types/engine/form-engine/builder/journey-designer/journey-builder-mode.d.ts +385 -0
  72. package/dist/types/engine/form-engine/builder/journey-designer/journey-catalog.d.ts +212 -0
  73. package/dist/types/engine/form-engine/builder/journey-designer/journey-checks.d.ts +175 -0
  74. package/dist/types/engine/form-engine/builder/journey-designer/journey-components.d.ts +183 -0
  75. package/dist/types/engine/form-engine/builder/journey-designer/journey-config-rename.d.ts +43 -0
  76. package/dist/types/engine/form-engine/builder/journey-designer/journey-designer-panels.d.ts +67 -0
  77. package/dist/types/engine/form-engine/builder/journey-designer/journey-designer.d.ts +296 -0
  78. package/dist/types/engine/form-engine/builder/journey-designer/journey-finding-words.d.ts +30 -0
  79. package/dist/types/engine/form-engine/builder/journey-designer/journey-findings.d.ts +74 -0
  80. package/dist/types/engine/form-engine/builder/journey-designer/journey-from-form.d.ts +89 -0
  81. package/dist/types/engine/form-engine/builder/journey-designer/journey-mode-loader.d.ts +19 -0
  82. package/dist/types/engine/form-engine/builder/journey-designer/journey-mode-model.d.ts +100 -0
  83. package/dist/types/engine/form-engine/builder/journey-designer/journey-preview-texts-en.d.ts +28 -0
  84. package/dist/types/engine/form-engine/builder/journey-designer/journey-preview.d.ts +163 -0
  85. package/dist/types/engine/form-engine/builder/journey-designer/journey-references.d.ts +104 -0
  86. package/dist/types/engine/form-engine/builder/journey-designer/journey-texts-en.d.ts +151 -0
  87. package/dist/types/engine/form-engine/builder/journey-designer/journey-texts.d.ts +51 -0
  88. package/dist/types/engine/form-engine/builder/journey-designer/journey-tree.d.ts +139 -0
  89. package/dist/types/engine/form-engine/builder/journey-designer/journey-try-map.d.ts +49 -0
  90. package/dist/types/engine/form-engine/builder/journey-designer/step-canvas-adapter.d.ts +253 -0
  91. package/dist/types/engine/form-engine/builder/journey-designer/step-history.d.ts +71 -0
  92. package/dist/types/engine/form-engine/builder/journey-designer/step-review.d.ts +79 -0
  93. package/dist/types/engine/form-engine/builder/journey-designer/step-view.d.ts +75 -0
  94. package/dist/types/engine/form-engine/builder/journey-map/journey-map-layout.d.ts +135 -0
  95. package/dist/types/engine/form-engine/builder/journey-map/journey-map-model.d.ts +346 -0
  96. package/dist/types/engine/form-engine/builder/journey-map/journey-map-preferences.d.ts +30 -0
  97. package/dist/types/engine/form-engine/builder/journey-map/journey-map-styles.d.ts +32 -0
  98. package/dist/types/engine/form-engine/builder/journey-map/journey-map-svg.d.ts +17 -0
  99. package/dist/types/engine/form-engine/builder/journey-map/journey-map-texts-en.d.ts +138 -0
  100. package/dist/types/engine/form-engine/builder/journey-map/journey-map.d.ts +138 -0
  101. package/dist/types/engine/form-engine/builder/languages/engine-texts.d.ts +19 -0
  102. package/dist/types/engine/form-engine/builder/languages/exchange.d.ts +199 -0
  103. package/dist/types/engine/form-engine/builder/languages/languages-cells.d.ts +106 -0
  104. package/dist/types/engine/form-engine/builder/languages/languages-exchange-dialog.d.ts +58 -0
  105. package/dist/types/engine/form-engine/builder/languages/languages-exchange-texts-en.d.ts +101 -0
  106. package/dist/types/engine/form-engine/builder/languages/languages-loader.d.ts +7 -0
  107. package/dist/types/engine/form-engine/builder/languages/languages-model.d.ts +180 -0
  108. package/dist/types/engine/form-engine/builder/languages/languages-surface.d.ts +418 -0
  109. package/dist/types/engine/form-engine/builder/languages/languages-texts-en.d.ts +174 -0
  110. package/dist/types/engine/form-engine/builder/logic/builder-texts.d.ts +1127 -0
  111. package/dist/types/engine/form-engine/builder/logic/coverage.d.ts +86 -0
  112. package/dist/types/engine/form-engine/builder/logic/index.d.ts +5 -0
  113. package/dist/types/engine/form-engine/builder/logic/logic-journey-host.d.ts +92 -0
  114. package/dist/types/engine/form-engine/builder/logic/logic-loader.d.ts +7 -0
  115. package/dist/types/engine/form-engine/builder/logic/logic-model.d.ts +158 -0
  116. package/dist/types/engine/form-engine/builder/logic/logic-surface.d.ts +359 -0
  117. package/dist/types/engine/form-engine/builder/logic/logic-texts-en.d.ts +216 -0
  118. package/dist/types/engine/form-engine/builder/logic/logic-types.d.ts +183 -0
  119. package/dist/types/engine/form-engine/builder/overview/overview-loader.d.ts +7 -0
  120. package/dist/types/engine/form-engine/builder/overview/overview-surface.d.ts +84 -0
  121. package/dist/types/engine/form-engine/builder/overview/overview-texts-en.d.ts +27 -0
  122. package/dist/types/engine/form-engine/builder/palette/command-palette.d.ts +46 -0
  123. package/dist/types/engine/form-engine/builder/palette/palette-filter.d.ts +37 -0
  124. package/dist/types/engine/form-engine/builder/palette/palette-loader.d.ts +6 -0
  125. package/dist/types/engine/form-engine/builder/palette/palette-texts-en.d.ts +18 -0
  126. package/dist/types/engine/form-engine/builder/pdf-designer/layout-bindings.d.ts +13 -0
  127. package/dist/types/engine/form-engine/builder/pdf-designer/layout-catalog.d.ts +108 -0
  128. package/dist/types/engine/form-engine/builder/pdf-designer/layout-conditions.d.ts +172 -0
  129. package/dist/types/engine/form-engine/builder/pdf-designer/pdf-builder-mode.d.ts +406 -0
  130. package/dist/types/engine/form-engine/builder/pdf-designer/pdf-canvas-adapters.d.ts +55 -0
  131. package/dist/types/engine/form-engine/builder/pdf-designer/pdf-designer-chunk.d.ts +13 -0
  132. package/dist/types/engine/form-engine/builder/pdf-designer/pdf-designer-loader.d.ts +10 -0
  133. package/dist/types/engine/form-engine/builder/pdf-designer/pdf-designer-panels.d.ts +89 -0
  134. package/dist/types/engine/form-engine/builder/pdf-designer/pdf-designer.d.ts +95 -0
  135. package/dist/types/engine/form-engine/builder/pdf-designer/pdf-layout-texts.d.ts +86 -0
  136. package/dist/types/engine/form-engine/builder/pdf-designer/pdf-mode-loader.d.ts +17 -0
  137. package/dist/types/engine/form-engine/builder/pdf-designer/pdf-mode-model.d.ts +88 -0
  138. package/dist/types/engine/form-engine/builder/pdf-designer/pdf-panel-styles.d.ts +1 -0
  139. package/dist/types/engine/form-engine/builder/pdf-designer/pdf-template-designer.d.ts +139 -0
  140. package/dist/types/engine/form-engine/builder/pdf-designer/pdf-template-source.d.ts +22 -0
  141. package/dist/types/engine/form-engine/builder/pdf-designer/pdf-texts-en.d.ts +405 -0
  142. package/dist/types/engine/form-engine/builder/pdf-designer/template-mode.d.ts +186 -0
  143. package/dist/types/engine/form-engine/builder/pdf-designer/template-pages.d.ts +57 -0
  144. package/dist/types/engine/form-engine/builder/popover-place.d.ts +14 -0
  145. package/dist/types/engine/form-engine/builder/preview/builder-preview-runtime.d.ts +284 -0
  146. package/dist/types/engine/form-engine/builder/print/print-breaks.d.ts +46 -0
  147. package/dist/types/engine/form-engine/builder/print/print-loader.d.ts +6 -0
  148. package/dist/types/engine/form-engine/builder/print/print-preview.d.ts +121 -0
  149. package/dist/types/engine/form-engine/builder/print/print-samples.d.ts +43 -0
  150. package/dist/types/engine/form-engine/builder/print/print-settings-model.d.ts +138 -0
  151. package/dist/types/engine/form-engine/builder/print/print-styles.d.ts +1 -0
  152. package/dist/types/engine/form-engine/builder/print/print-surface.d.ts +284 -0
  153. package/dist/types/engine/form-engine/builder/print/print-texts-en.d.ts +104 -0
  154. package/dist/types/engine/form-engine/builder/property-editor/component-editor-context.d.ts +8 -0
  155. package/dist/types/engine/form-engine/builder/property-editor/component-json.d.ts +83 -0
  156. package/dist/types/engine/form-engine/builder/property-editor/condition-words.d.ts +26 -0
  157. package/dist/types/engine/form-engine/builder/property-editor/css-classes.d.ts +84 -0
  158. package/dist/types/engine/form-engine/builder/property-editor/editor-composer.d.ts +9 -0
  159. package/dist/types/engine/form-engine/builder/property-editor/inspector-model.d.ts +376 -0
  160. package/dist/types/engine/form-engine/builder/property-editor/rule-source.d.ts +8 -0
  161. package/dist/types/engine/form-engine/builder/property-editor/rules-model.d.ts +179 -0
  162. package/dist/types/engine/form-engine/builder/tree-editor/nested-tree-view.d.ts +43 -0
  163. package/dist/types/engine/form-engine/builder/tree-editor/slot-constraints.d.ts +17 -0
  164. package/dist/types/engine/form-engine/builder/tree-editor/tree-editor.d.ts +185 -0
  165. package/dist/types/engine/form-engine/builder/web-component/assistants-settings.d.ts +43 -0
  166. package/dist/types/engine/form-engine/builder/web-component/builder-chrome-panel.d.ts +179 -0
  167. package/dist/types/engine/form-engine/builder/web-component/builder-features.d.ts +97 -0
  168. package/dist/types/engine/form-engine/builder/web-component/builder-form-fields-panel.d.ts +42 -0
  169. package/dist/types/engine/form-engine/builder/web-component/builder-modes.d.ts +704 -0
  170. package/dist/types/engine/form-engine/builder/web-component/builder-outline.d.ts +24 -0
  171. package/dist/types/engine/form-engine/builder/web-component/builder-panels.d.ts +1872 -0
  172. package/dist/types/engine/form-engine/builder/web-component/builder-shared.d.ts +917 -0
  173. package/dist/types/engine/form-engine/builder/web-component/builder-tests-panel.d.ts +454 -0
  174. package/dist/types/engine/form-engine/builder/web-component/builder-theme-registry.d.ts +36 -0
  175. package/dist/types/engine/form-engine/builder/web-component/builder-variables-panel.d.ts +158 -0
  176. package/dist/types/engine/form-engine/builder/web-component/canvas-hooks.d.ts +53 -0
  177. package/dist/types/engine/form-engine/builder/web-component/chrome-panel-loader.d.ts +17 -0
  178. package/dist/types/engine/form-engine/builder/web-component/default-builder-element.d.ts +2012 -0
  179. package/dist/types/engine/form-engine/builder/web-component/definition-size.d.ts +12 -0
  180. package/dist/types/engine/form-engine/builder/web-component/dialog-frame.d.ts +36 -0
  181. package/dist/types/engine/form-engine/builder/web-component/formula-settings.d.ts +31 -0
  182. package/dist/types/engine/form-engine/builder/web-component/host-control-styles.d.ts +38 -0
  183. package/dist/types/engine/form-engine/builder/web-component/json-viewer-loader.d.ts +18 -0
  184. package/dist/types/engine/form-engine/builder/web-component/json-viewer.d.ts +38 -0
  185. package/dist/types/engine/form-engine/builder/web-component/modal-place.d.ts +55 -0
  186. package/dist/types/engine/form-engine/builder/web-component/palette-glyphs.d.ts +14 -0
  187. package/dist/types/engine/form-engine/builder/web-component/panel-memory.d.ts +68 -0
  188. package/dist/types/engine/form-engine/builder/web-component/phone-menu.d.ts +67 -0
  189. package/dist/types/engine/form-engine/builder/web-component/phone-styles.d.ts +30 -0
  190. package/dist/types/engine/form-engine/builder/web-component/remote-images.d.ts +25 -0
  191. package/dist/types/engine/form-engine/builder/web-component/sheet-gestures.d.ts +59 -0
  192. package/dist/types/engine/form-engine/builder/web-component/starter-submit.d.ts +14 -0
  193. package/dist/types/engine/form-engine/builder/web-component/studio-dark-theme.d.ts +22 -0
  194. package/dist/types/engine/form-engine/builder/web-component/studio-tokens.d.ts +46 -0
  195. package/dist/types/engine/form-engine/builder/web-component/surface-sheet.d.ts +31 -0
  196. package/dist/types/engine/form-engine/builder/web-component/tests-panel-loader.d.ts +17 -0
  197. package/dist/types/engine/form-engine/builder/web-component/toolbar-roving.d.ts +21 -0
  198. package/dist/types/engine/form-engine/builder/web-component/try-it-types.d.ts +262 -0
  199. package/dist/types/engine/form-engine/builder/web-component/try-it.d.ts +85 -0
  200. package/dist/types/engine/form-engine/builder/web-component/try-texts-en.d.ts +64 -0
  201. package/dist/types/engine/form-engine/builder/web-component/variables-panel-loader.d.ts +17 -0
  202. package/dist/types/engine/form-engine/core/accessibility/accessibility-semantics.d.ts +51 -0
  203. package/dist/types/engine/form-engine/core/accessibility/keyboard-navigation.d.ts +8 -0
  204. package/dist/types/engine/form-engine/core/crypto/sha256.d.ts +18 -0
  205. package/dist/types/engine/form-engine/core/errors/error-navigation.d.ts +14 -0
  206. package/dist/types/engine/form-engine/core/errors/form-error.d.ts +32 -0
  207. package/dist/types/engine/form-engine/core/events/event-bus.d.ts +18 -0
  208. package/dist/types/engine/form-engine/core/events/event-types.d.ts +236 -0
  209. package/dist/types/engine/form-engine/core/events/hooks.d.ts +107 -0
  210. package/dist/types/engine/form-engine/core/expressions/compile.d.ts +565 -0
  211. package/dist/types/engine/form-engine/core/expressions/condition-shape.d.ts +11 -0
  212. package/dist/types/engine/form-engine/core/expressions/definition-structure.d.ts +329 -0
  213. package/dist/types/engine/form-engine/core/expressions/expression.d.ts +102 -0
  214. package/dist/types/engine/form-engine/core/expressions/formula-types.d.ts +114 -0
  215. package/dist/types/engine/form-engine/core/expressions/formula.d.ts +150 -0
  216. package/dist/types/engine/form-engine/core/expressions/function-docs.d.ts +13 -0
  217. package/dist/types/engine/form-engine/core/expressions/function-table.d.ts +396 -0
  218. package/dist/types/engine/form-engine/core/expressions/inspect.d.ts +292 -0
  219. package/dist/types/engine/form-engine/core/form-tests/form-test-lint.d.ts +28 -0
  220. package/dist/types/engine/form-engine/core/form-tests/form-test-parse.d.ts +200 -0
  221. package/dist/types/engine/form-engine/core/form-tests/form-test-read.d.ts +11 -0
  222. package/dist/types/engine/form-engine/core/form-tests/form-test-run.d.ts +58 -0
  223. package/dist/types/engine/form-engine/core/form-tests/form-test-types.d.ts +413 -0
  224. package/dist/types/engine/form-engine/core/form-tests/index.d.ts +7 -0
  225. package/dist/types/engine/form-engine/core/index.d.ts +75 -0
  226. package/dist/types/engine/form-engine/core/journey/journey-diagnostics.d.ts +249 -0
  227. package/dist/types/engine/form-engine/core/journey/journey-flow.d.ts +77 -0
  228. package/dist/types/engine/form-engine/core/journey/journey-path.d.ts +213 -0
  229. package/dist/types/engine/form-engine/core/journey/journey-server-check.d.ts +66 -0
  230. package/dist/types/engine/form-engine/core/journey/journey-shared.d.ts +39 -0
  231. package/dist/types/engine/form-engine/core/journey/journey-types.d.ts +246 -0
  232. package/dist/types/engine/form-engine/core/journey/presentation.d.ts +163 -0
  233. package/dist/types/engine/form-engine/core/journey/worked-out-text.d.ts +10 -0
  234. package/dist/types/engine/form-engine/core/localization/form-texts.d.ts +283 -0
  235. package/dist/types/engine/form-engine/core/localization/locale-documents.d.ts +74 -0
  236. package/dist/types/engine/form-engine/core/localization/localized-text.d.ts +21 -0
  237. package/dist/types/engine/form-engine/core/localization/supported-locales.d.ts +49 -0
  238. package/dist/types/engine/form-engine/core/localization/translations.d.ts +312 -0
  239. package/dist/types/engine/form-engine/core/localization/validation-messages.d.ts +120 -0
  240. package/dist/types/engine/form-engine/core/schema/agent-tools-setting.d.ts +5 -0
  241. package/dist/types/engine/form-engine/core/schema/answer-kinds.d.ts +92 -0
  242. package/dist/types/engine/form-engine/core/schema/button-group.d.ts +24 -0
  243. package/dist/types/engine/form-engine/core/schema/button.d.ts +75 -0
  244. package/dist/types/engine/form-engine/core/schema/collection.d.ts +29 -0
  245. package/dist/types/engine/form-engine/core/schema/component-classes.d.ts +26 -0
  246. package/dist/types/engine/form-engine/core/schema/component-kinds.d.ts +76 -0
  247. package/dist/types/engine/form-engine/core/schema/contracts.d.ts +614 -0
  248. package/dist/types/engine/form-engine/core/schema/control-hints.d.ts +45 -0
  249. package/dist/types/engine/form-engine/core/schema/data-grid.d.ts +138 -0
  250. package/dist/types/engine/form-engine/core/schema/data-source-capability.d.ts +20 -0
  251. package/dist/types/engine/form-engine/core/schema/file-upload.d.ts +114 -0
  252. package/dist/types/engine/form-engine/core/schema/form-chrome.d.ts +301 -0
  253. package/dist/types/engine/form-engine/core/schema/grid.d.ts +88 -0
  254. package/dist/types/engine/form-engine/core/schema/image.d.ts +19 -0
  255. package/dist/types/engine/form-engine/core/schema/inline-options.d.ts +69 -0
  256. package/dist/types/engine/form-engine/core/schema/journey.d.ts +336 -0
  257. package/dist/types/engine/form-engine/core/schema/legend-mark.d.ts +10 -0
  258. package/dist/types/engine/form-engine/core/schema/length-limits.d.ts +33 -0
  259. package/dist/types/engine/form-engine/core/schema/pattern-validity.d.ts +2 -0
  260. package/dist/types/engine/form-engine/core/schema/pdf-layout-read.d.ts +508 -0
  261. package/dist/types/engine/form-engine/core/schema/pdf-layout-table.d.ts +25 -0
  262. package/dist/types/engine/form-engine/core/schema/pdf-layout.d.ts +224 -0
  263. package/dist/types/engine/form-engine/core/schema/pdf-renditions.d.ts +46 -0
  264. package/dist/types/engine/form-engine/core/schema/pdf-signature-configuration.d.ts +6 -0
  265. package/dist/types/engine/form-engine/core/schema/print.d.ts +76 -0
  266. package/dist/types/engine/form-engine/core/schema/signature.d.ts +13 -0
  267. package/dist/types/engine/form-engine/core/schema/static-html.d.ts +44 -0
  268. package/dist/types/engine/form-engine/core/schema/steps.d.ts +28 -0
  269. package/dist/types/engine/form-engine/core/schema/types.d.ts +186 -0
  270. package/dist/types/engine/form-engine/core/schema/validate-on-setting.d.ts +16 -0
  271. package/dist/types/engine/form-engine/core/state/answer-shape.d.ts +28 -0
  272. package/dist/types/engine/form-engine/core/state/effective-state.d.ts +42 -0
  273. package/dist/types/engine/form-engine/core/state/form-state.d.ts +160 -0
  274. package/dist/types/engine/form-engine/core/state/hidden-value-policy.d.ts +34 -0
  275. package/dist/types/engine/form-engine/core/state/host-context.d.ts +24 -0
  276. package/dist/types/engine/form-engine/core/state/semantic-state.d.ts +19 -0
  277. package/dist/types/engine/form-engine/core/state/submittable-fold.d.ts +460 -0
  278. package/dist/types/engine/form-engine/core/submission/canonical-submission.d.ts +62 -0
  279. package/dist/types/engine/form-engine/core/submission/envelope-completeness.d.ts +20 -0
  280. package/dist/types/engine/form-engine/core/submission/form-notice.d.ts +43 -0
  281. package/dist/types/engine/form-engine/core/submission/jcs.d.ts +20 -0
  282. package/dist/types/engine/form-engine/core/submission/signing.d.ts +110 -0
  283. package/dist/types/engine/form-engine/core/submission/submission-file.d.ts +34 -0
  284. package/dist/types/engine/form-engine/core/submission/submission-handler.d.ts +25 -0
  285. package/dist/types/engine/form-engine/core/submission/submission-modes.d.ts +11 -0
  286. package/dist/types/engine/form-engine/core/submission/webauthn-assertion.d.ts +41 -0
  287. package/dist/types/engine/form-engine/core/text/placeholders.d.ts +20 -0
  288. package/dist/types/engine/form-engine/core/text/spreadsheet-cell.d.ts +14 -0
  289. package/dist/types/engine/form-engine/core/tree/component-id.d.ts +14 -0
  290. package/dist/types/engine/form-engine/core/tree/component-path.d.ts +6 -0
  291. package/dist/types/engine/form-engine/core/tree/component-tree.d.ts +60 -0
  292. package/dist/types/engine/form-engine/core/tree/data-scope.d.ts +151 -0
  293. package/dist/types/engine/form-engine/core/tree/nesting.d.ts +10 -0
  294. package/dist/types/engine/form-engine/core/tree/prototype-names.d.ts +6 -0
  295. package/dist/types/engine/form-engine/data/client/client-data-source-runtime.d.ts +7 -0
  296. package/dist/types/engine/form-engine/data/client/registered-client-data-source-runtime.d.ts +6 -0
  297. package/dist/types/engine/form-engine/data/host/data-source-set.d.ts +46 -0
  298. package/dist/types/engine/form-engine/data/index.d.ts +9 -0
  299. package/dist/types/engine/form-engine/data/providers/data-source-provider-registry.d.ts +11 -0
  300. package/dist/types/engine/form-engine/data/providers/registered-data-source-runtime.d.ts +10 -0
  301. package/dist/types/engine/form-engine/data/providers/remote-data-source-provider.d.ts +30 -0
  302. package/dist/types/engine/form-engine/data/providers/static-data-source-provider.d.ts +20 -0
  303. package/dist/types/engine/form-engine/data/server/registered-server-data-source-runtime.d.ts +6 -0
  304. package/dist/types/engine/form-engine/data/server/server-data-source-runtime.d.ts +7 -0
  305. package/dist/types/engine/form-engine/index.d.ts +29 -0
  306. package/dist/types/engine/form-engine/persistence/core/draft-compatibility.d.ts +22 -0
  307. package/dist/types/engine/form-engine/persistence/core/draft-store.d.ts +96 -0
  308. package/dist/types/engine/form-engine/persistence/file-draft/draft-file.d.ts +3 -0
  309. package/dist/types/engine/form-engine/persistence/index.d.ts +7 -0
  310. package/dist/types/engine/form-engine/persistence/indexeddb/indexeddb-draft-store.d.ts +15 -0
  311. package/dist/types/engine/form-engine/persistence/local-storage/browser-local-draft-store.d.ts +22 -0
  312. package/dist/types/engine/form-engine/persistence/local-storage/in-memory-draft-store.d.ts +8 -0
  313. package/dist/types/engine/form-engine/persistence/server/server-draft-store.d.ts +15 -0
  314. package/dist/types/engine/form-engine/plugins/component-adapters.d.ts +66 -0
  315. package/dist/types/engine/form-engine/plugins/index.d.ts +4 -0
  316. package/dist/types/engine/form-engine/plugins/lifecycle/plugin-lifecycle.d.ts +11 -0
  317. package/dist/types/engine/form-engine/plugins/manifest/load-plugin-manifest.d.ts +23 -0
  318. package/dist/types/engine/form-engine/plugins/platform/plugin-platform.d.ts +81 -0
  319. package/dist/types/engine/form-engine/registry/capabilities/drawing-capabilities.d.ts +52 -0
  320. package/dist/types/engine/form-engine/registry/capabilities/field-capabilities.d.ts +205 -0
  321. package/dist/types/engine/form-engine/registry/components/component-registry.d.ts +9 -0
  322. package/dist/types/engine/form-engine/registry/data-sources/data-source-registry.d.ts +9 -0
  323. package/dist/types/engine/form-engine/registry/engine-component-types.d.ts +20 -0
  324. package/dist/types/engine/form-engine/registry/engine-version.d.ts +5 -0
  325. package/dist/types/engine/form-engine/registry/formula-functions/formula-function-registry.d.ts +33 -0
  326. package/dist/types/engine/form-engine/registry/index.d.ts +13 -0
  327. package/dist/types/engine/form-engine/registry/kinds.d.ts +83 -0
  328. package/dist/types/engine/form-engine/registry/pdf/pdf-rendition-registry.d.ts +15 -0
  329. package/dist/types/engine/form-engine/registry/plugins/plugin-registry.d.ts +14 -0
  330. package/dist/types/engine/form-engine/registry/submission/submission-handler-registry.d.ts +7 -0
  331. package/dist/types/engine/form-engine/registry/validators/validator-registry.d.ts +6 -0
  332. package/dist/types/engine/form-engine/registry/version-range.d.ts +15 -0
  333. package/dist/types/engine/form-engine/registry/versioned-theme-registry.d.ts +30 -0
  334. package/dist/types/engine/form-engine/registry/versioning.d.ts +5 -0
  335. package/dist/types/engine/form-engine/render/core/component-model.d.ts +292 -0
  336. package/dist/types/engine/form-engine/render/core/component-options.d.ts +58 -0
  337. package/dist/types/engine/form-engine/render/core/css-rules.d.ts +68 -0
  338. package/dist/types/engine/form-engine/render/core/error-accessibility.d.ts +23 -0
  339. package/dist/types/engine/form-engine/render/core/error-summary.d.ts +62 -0
  340. package/dist/types/engine/form-engine/render/core/error-wording.d.ts +104 -0
  341. package/dist/types/engine/form-engine/render/core/escape-html.d.ts +2 -0
  342. package/dist/types/engine/form-engine/render/core/file-storage.d.ts +59 -0
  343. package/dist/types/engine/form-engine/render/core/host-data-sources.d.ts +44 -0
  344. package/dist/types/engine/form-engine/render/core/journey-render-kit-default.d.ts +5 -0
  345. package/dist/types/engine/form-engine/render/core/journey-render-kit-eager.d.ts +10 -0
  346. package/dist/types/engine/form-engine/render/core/journey-render-kit-factory.d.ts +13 -0
  347. package/dist/types/engine/form-engine/render/core/journey-render-kit.d.ts +61 -0
  348. package/dist/types/engine/form-engine/render/core/journey-render.d.ts +132 -0
  349. package/dist/types/engine/form-engine/render/core/journey-review-kit-eager.d.ts +9 -0
  350. package/dist/types/engine/form-engine/render/core/journey-review-kit.d.ts +33 -0
  351. package/dist/types/engine/form-engine/render/core/journey-review.d.ts +134 -0
  352. package/dist/types/engine/form-engine/render/core/presentation-tree.d.ts +374 -0
  353. package/dist/types/engine/form-engine/render/core/print-options.d.ts +89 -0
  354. package/dist/types/engine/form-engine/render/core/render-contracts.d.ts +7 -0
  355. package/dist/types/engine/form-engine/render/core/render-orchestrator.d.ts +139 -0
  356. package/dist/types/engine/form-engine/render/core/render-policy.d.ts +52 -0
  357. package/dist/types/engine/form-engine/render/core/runtime-render-bridge.d.ts +154 -0
  358. package/dist/types/engine/form-engine/render/core/scalar-text.d.ts +10 -0
  359. package/dist/types/engine/form-engine/render/core/tab-slots.d.ts +25 -0
  360. package/dist/types/engine/form-engine/render/core/token-style-vars.d.ts +45 -0
  361. package/dist/types/engine/form-engine/render/icons/builtin-icons.d.ts +24 -0
  362. package/dist/types/engine/form-engine/render/icons/icon-names.d.ts +67 -0
  363. package/dist/types/engine/form-engine/render/icons/icon-set.d.ts +102 -0
  364. package/dist/types/engine/form-engine/render/index.d.ts +68 -0
  365. package/dist/types/engine/form-engine/render/live/announcer.d.ts +10 -0
  366. package/dist/types/engine/form-engine/render/live/assets-feature.d.ts +12 -0
  367. package/dist/types/engine/form-engine/render/live/assets-policy.d.ts +6 -0
  368. package/dist/types/engine/form-engine/render/live/assets.d.ts +109 -0
  369. package/dist/types/engine/form-engine/render/live/binding-registry.d.ts +46 -0
  370. package/dist/types/engine/form-engine/render/live/buttons.d.ts +12 -0
  371. package/dist/types/engine/form-engine/render/live/chrome.d.ts +15 -0
  372. package/dist/types/engine/form-engine/render/live/component-text.d.ts +10 -0
  373. package/dist/types/engine/form-engine/render/live/contract.d.ts +1267 -0
  374. package/dist/types/engine/form-engine/render/live/data-grid.d.ts +51 -0
  375. package/dist/types/engine/form-engine/render/live/datum/buttons.d.ts +44 -0
  376. package/dist/types/engine/form-engine/render/live/datum/choice-fields.d.ts +8 -0
  377. package/dist/types/engine/form-engine/render/live/datum/chrome-files.d.ts +43 -0
  378. package/dist/types/engine/form-engine/render/live/datum/chrome.d.ts +49 -0
  379. package/dist/types/engine/form-engine/render/live/datum/container-kit.d.ts +66 -0
  380. package/dist/types/engine/form-engine/render/live/datum/containers.d.ts +25 -0
  381. package/dist/types/engine/form-engine/render/live/datum/content.d.ts +5 -0
  382. package/dist/types/engine/form-engine/render/live/datum/css.d.ts +40 -0
  383. package/dist/types/engine/form-engine/render/live/datum/date.d.ts +66 -0
  384. package/dist/types/engine/form-engine/render/live/datum/default-tokens.d.ts +30 -0
  385. package/dist/types/engine/form-engine/render/live/datum/field-scaffold.d.ts +131 -0
  386. package/dist/types/engine/form-engine/render/live/datum/file.d.ts +6 -0
  387. package/dist/types/engine/form-engine/render/live/datum/frames.d.ts +33 -0
  388. package/dist/types/engine/form-engine/render/live/datum/grid.d.ts +26 -0
  389. package/dist/types/engine/form-engine/render/live/datum/groups.d.ts +45 -0
  390. package/dist/types/engine/form-engine/render/live/datum/icons.d.ts +18 -0
  391. package/dist/types/engine/form-engine/render/live/datum/leaf-kit.d.ts +17 -0
  392. package/dist/types/engine/form-engine/render/live/datum/month-names.d.ts +2 -0
  393. package/dist/types/engine/form-engine/render/live/datum/notice.d.ts +25 -0
  394. package/dist/types/engine/form-engine/render/live/datum/options.d.ts +133 -0
  395. package/dist/types/engine/form-engine/render/live/datum/page.d.ts +13 -0
  396. package/dist/types/engine/form-engine/render/live/datum/parts.d.ts +120 -0
  397. package/dist/types/engine/form-engine/render/live/datum/signature.d.ts +25 -0
  398. package/dist/types/engine/form-engine/render/live/datum/steps.d.ts +30 -0
  399. package/dist/types/engine/form-engine/render/live/datum/summary.d.ts +26 -0
  400. package/dist/types/engine/form-engine/render/live/datum/tabs.d.ts +23 -0
  401. package/dist/types/engine/form-engine/render/live/datum/text-fields.d.ts +7 -0
  402. package/dist/types/engine/form-engine/render/live/datum/tokens.d.ts +1030 -0
  403. package/dist/types/engine/form-engine/render/live/error-target.d.ts +12 -0
  404. package/dist/types/engine/form-engine/render/live/field-preview.d.ts +22 -0
  405. package/dist/types/engine/form-engine/render/live/fields.d.ts +26 -0
  406. package/dist/types/engine/form-engine/render/live/files.d.ts +20 -0
  407. package/dist/types/engine/form-engine/render/live/form-notices.d.ts +17 -0
  408. package/dist/types/engine/form-engine/render/live/guards.d.ts +37 -0
  409. package/dist/types/engine/form-engine/render/live/journey-page.d.ts +45 -0
  410. package/dist/types/engine/form-engine/render/live/journey-review.d.ts +50 -0
  411. package/dist/types/engine/form-engine/render/live/lit.d.ts +48 -0
  412. package/dist/types/engine/form-engine/render/live/look-classes.d.ts +27 -0
  413. package/dist/types/engine/form-engine/render/live/media-labels.d.ts +16 -0
  414. package/dist/types/engine/form-engine/render/live/mount.d.ts +450 -0
  415. package/dist/types/engine/form-engine/render/live/notices.d.ts +3 -0
  416. package/dist/types/engine/form-engine/render/live/readonly-sizing.d.ts +14 -0
  417. package/dist/types/engine/form-engine/render/live/renderer.d.ts +12 -0
  418. package/dist/types/engine/form-engine/render/live/sources.d.ts +4 -0
  419. package/dist/types/engine/form-engine/render/live/steps.d.ts +6 -0
  420. package/dist/types/engine/form-engine/render/live/summary.d.ts +33 -0
  421. package/dist/types/engine/form-engine/render/live/tabs.d.ts +8 -0
  422. package/dist/types/engine/form-engine/render/live/tooltips.d.ts +30 -0
  423. package/dist/types/engine/form-engine/render/pdf/default-layout.d.ts +51 -0
  424. package/dist/types/engine/form-engine/render/pdf/pdf-abi.d.ts +819 -0
  425. package/dist/types/engine/form-engine/render/pdf/pdf-agent-signer.d.ts +92 -0
  426. package/dist/types/engine/form-engine/render/pdf/pdf-attachments.d.ts +76 -0
  427. package/dist/types/engine/form-engine/render/pdf/pdf-components.d.ts +282 -0
  428. package/dist/types/engine/form-engine/render/pdf/pdf-designer-styles.d.ts +12 -0
  429. package/dist/types/engine/form-engine/render/pdf/pdf-document.d.ts +412 -0
  430. package/dist/types/engine/form-engine/render/pdf/pdf-layout-selection.d.ts +54 -0
  431. package/dist/types/engine/form-engine/render/pdf/pdf-pages.d.ts +25 -0
  432. package/dist/types/engine/form-engine/render/pdf/pdf-provider.d.ts +219 -0
  433. package/dist/types/engine/form-engine/render/pdf/pdf-render-mode.d.ts +2 -0
  434. package/dist/types/engine/form-engine/render/pdf/pdf-render-model.d.ts +124 -0
  435. package/dist/types/engine/form-engine/render/pdf/pdf-renditions.d.ts +160 -0
  436. package/dist/types/engine/form-engine/render/pdf/pdf-service.d.ts +161 -0
  437. package/dist/types/engine/form-engine/render/pdf/pdf-signer.d.ts +26 -0
  438. package/dist/types/engine/form-engine/render/pdf/pdf-template-components.d.ts +168 -0
  439. package/dist/types/engine/form-engine/render/pdf/pdf-template-constants.d.ts +14 -0
  440. package/dist/types/engine/form-engine/render/pdf/pdf-template.d.ts +84 -0
  441. package/dist/types/engine/form-engine/render/pdf/pdf-text-addresses.d.ts +20 -0
  442. package/dist/types/engine/form-engine/render/pdf/pdf-theme-defaults.d.ts +410 -0
  443. package/dist/types/engine/form-engine/render/pdf/pdf-theme-registry.d.ts +25 -0
  444. package/dist/types/engine/form-engine/render/pdf/pdf-theme.d.ts +91 -0
  445. package/dist/types/engine/form-engine/render/pdf/pdf-values.d.ts +47 -0
  446. package/dist/types/engine/form-engine/render/pdf/standard-renditions.d.ts +33 -0
  447. package/dist/types/engine/form-engine/render/pdf/template-text.d.ts +52 -0
  448. package/dist/types/engine/form-engine/render/print/answer-text.d.ts +3 -0
  449. package/dist/types/engine/form-engine/render/print/basic.d.ts +18 -0
  450. package/dist/types/engine/form-engine/render/print/datum.d.ts +2 -0
  451. package/dist/types/engine/form-engine/render/print/document.d.ts +65 -0
  452. package/dist/types/engine/form-engine/render/print/field-answer.d.ts +47 -0
  453. package/dist/types/engine/form-engine/render/print/index.d.ts +12 -0
  454. package/dist/types/engine/form-engine/render/print/model.d.ts +346 -0
  455. package/dist/types/engine/form-engine/render/print/safe-html.d.ts +41 -0
  456. package/dist/types/engine/form-engine/render/print/slot-text.d.ts +30 -0
  457. package/dist/types/engine/form-engine/render/print/theme.d.ts +86 -0
  458. package/dist/types/engine/form-engine/render/react/interactive-renderer.d.ts +9 -0
  459. package/dist/types/engine/form-engine/render/readonly/readonly-renderer.d.ts +12 -0
  460. package/dist/types/engine/form-engine/render/web-component/custom-element-base.d.ts +3 -0
  461. package/dist/types/engine/form-engine/render/web-component/form-features.d.ts +76 -0
  462. package/dist/types/engine/form-engine/render/web-component/form-host-element.d.ts +310 -0
  463. package/dist/types/engine/form-engine/render/web-component/form-renderer-element.d.ts +846 -0
  464. package/dist/types/engine/form-engine/render/web-component/locale-select-element.d.ts +24 -0
  465. package/dist/types/engine/form-engine/render/web-component/pdf-download.d.ts +75 -0
  466. package/dist/types/engine/form-engine/render/web-component/print-frame.d.ts +85 -0
  467. package/dist/types/engine/form-engine/render/web-component/print-pipeline.d.ts +11 -0
  468. package/dist/types/engine/form-engine/render/web-component/print-policy.d.ts +2 -0
  469. package/dist/types/engine/form-engine/render/web-component/submission-download.d.ts +47 -0
  470. package/dist/types/engine/form-engine/render/web-component/typed-answers.d.ts +26 -0
  471. package/dist/types/engine/form-engine/render/webauthn/assertion.d.ts +69 -0
  472. package/dist/types/engine/form-engine/render/webauthn/authenticator-data.d.ts +21 -0
  473. package/dist/types/engine/form-engine/render/webauthn/errors.d.ts +30 -0
  474. package/dist/types/engine/form-engine/render/webauthn/registration-verify.d.ts +44 -0
  475. package/dist/types/engine/form-engine/render/webauthn/registration.d.ts +77 -0
  476. package/dist/types/engine/form-engine/render/webauthn/signal.d.ts +27 -0
  477. package/dist/types/engine/form-engine/render/webauthn/signing-provider.d.ts +70 -0
  478. package/dist/types/engine/form-engine/rules/dependencies/calculation-cycle.d.ts +25 -0
  479. package/dist/types/engine/form-engine/rules/dependencies/dependency-extractor.d.ts +9 -0
  480. package/dist/types/engine/form-engine/rules/dependencies/dependency-graph.d.ts +26 -0
  481. package/dist/types/engine/form-engine/rules/evaluator/evaluator.d.ts +209 -0
  482. package/dist/types/engine/form-engine/rules/evaluator/functions-date.d.ts +26 -0
  483. package/dist/types/engine/form-engine/rules/evaluator/functions-list.d.ts +28 -0
  484. package/dist/types/engine/form-engine/rules/evaluator/functions-number.d.ts +6 -0
  485. package/dist/types/engine/form-engine/rules/evaluator/functions-text.d.ts +23 -0
  486. package/dist/types/engine/form-engine/runtime/browser/collection-runtime.d.ts +34 -0
  487. package/dist/types/engine/form-engine/runtime/browser/draft-read.d.ts +27 -0
  488. package/dist/types/engine/form-engine/runtime/browser/form-runtime.d.ts +1470 -0
  489. package/dist/types/engine/form-engine/runtime/browser/form-test-runtime-driver.d.ts +83 -0
  490. package/dist/types/engine/form-engine/runtime/browser/journey/journey-action.d.ts +42 -0
  491. package/dist/types/engine/form-engine/runtime/browser/journey/journey-navigation.d.ts +200 -0
  492. package/dist/types/engine/form-engine/runtime/browser/journey/journey-presentation-overlay.d.ts +69 -0
  493. package/dist/types/engine/form-engine/runtime/browser/journey/journey-server-checks.d.ts +89 -0
  494. package/dist/types/engine/form-engine/runtime/browser/journey-engine-eager.d.ts +11 -0
  495. package/dist/types/engine/form-engine/runtime/browser/journey-engine.d.ts +462 -0
  496. package/dist/types/engine/form-engine/runtime/browser/path-validation-runs.d.ts +91 -0
  497. package/dist/types/engine/form-engine/runtime/browser/runtime-orchestrator.d.ts +530 -0
  498. package/dist/types/engine/form-engine/runtime/browser/submission-key.d.ts +12 -0
  499. package/dist/types/engine/form-engine/runtime/index.d.ts +8 -0
  500. package/dist/types/engine/form-engine/validation/core/error-store.d.ts +70 -0
  501. package/dist/types/engine/form-engine/validation/core/field-constraints.d.ts +293 -0
  502. package/dist/types/engine/form-engine/validation/core/test-vectors.d.ts +20 -0
  503. package/dist/types/engine/form-engine/validation/core/validation-pipeline.d.ts +65 -0
  504. package/dist/types/engine/form-engine/validation/parity/browser-adapter.d.ts +4 -0
  505. package/dist/types/engine/form-engine/validation/parity/formula-function-parity.d.ts +27 -0
  506. package/dist/types/engine/form-engine/validation/parity/index.d.ts +7 -0
  507. package/dist/types/engine/form-engine/validation/parity/parity-runner.d.ts +21 -0
  508. package/dist/types/engine/form-engine/validation/parity/runtime-adapter.d.ts +9 -0
  509. package/dist/types/engine/form-engine/validation/parity/server-adapter.d.ts +7 -0
  510. package/dist/types/engine/form-engine/validation/parity/vectors.d.ts +28 -0
  511. package/dist/types/engine/form-engine/validation/parity/wasm-adapter.d.ts +9 -0
  512. package/dist/types/engine/form-engine/validation/server/server-validation.d.ts +49 -0
  513. package/dist/types/engine/form-engine/validation/wasm/form-test-kernel-driver.d.ts +95 -0
  514. package/dist/types/engine/form-engine/validation/wasm/in-process-host.d.ts +56 -0
  515. package/dist/types/engine/form-engine/validation/wasm/portable-kernel.d.ts +1926 -0
  516. package/dist/types/engine/form-engine/validation/wasm/portable-options.d.ts +282 -0
  517. package/dist/types/engine/form-engine/validation/wasm/wasm-validation-host.d.ts +429 -0
  518. package/dist/types/engine/form-engine/verification/gate-inputs.d.ts +26 -0
  519. package/dist/types/engine/form-engine/verification/release-gates.d.ts +32 -0
  520. package/dist/types/engine/form-engine/verification/telemetry-bridge.d.ts +15 -0
  521. package/dist/types/engine/form-engine/verification/telemetry-sinks.d.ts +13 -0
  522. package/dist/types/engine/form-engine/verification/telemetry.d.ts +29 -0
  523. package/dist/types/packages/form-test/src/api.d.ts +75 -0
  524. package/dist/types/packages/form-test/src/args.d.ts +27 -0
  525. package/dist/types/packages/form-test/src/cli.d.ts +10 -0
  526. package/dist/types/packages/form-test/src/coverage.d.ts +11 -0
  527. package/dist/types/packages/form-test/src/drivers.d.ts +23 -0
  528. package/dist/types/packages/form-test/src/exit-codes.d.ts +17 -0
  529. package/dist/types/packages/form-test/src/index.d.ts +28 -0
  530. package/dist/types/packages/form-test/src/load.d.ts +25 -0
  531. package/dist/types/packages/form-test/src/parity.d.ts +14 -0
  532. package/dist/types/packages/form-test/src/report/json.d.ts +7 -0
  533. package/dist/types/packages/form-test/src/report/junit.d.ts +14 -0
  534. package/dist/types/packages/form-test/src/report/markdown.d.ts +14 -0
  535. package/dist/types/packages/form-test/src/report/model.d.ts +137 -0
  536. package/dist/types/packages/form-test/src/report/schema.d.ts +449 -0
  537. package/dist/types/packages/form-test/src/report/words.d.ts +48 -0
  538. package/dist/types/packages/form-test/src/run.d.ts +15 -0
  539. package/dist/types/packages/form-test/src/version.d.ts +3 -0
  540. package/dist/types/packages/form-test/src/vitest.d.ts +43 -0
  541. package/dist/types/packages/quickjs-wasm-host/src/fresh-sandbox-host.d.ts +70 -0
  542. package/dist/types/packages/quickjs-wasm-host/src/heap-recycle.d.ts +44 -0
  543. package/dist/types/packages/quickjs-wasm-host/src/index.d.ts +4 -0
  544. package/dist/types/packages/quickjs-wasm-host/src/program-host.d.ts +179 -0
  545. package/dist/types/packages/quickjs-wasm-host/src/quickjs-wasm-host-adapter.d.ts +218 -0
  546. package/dist/types/packages/quickjs-wasm-host/src/sandbox-program.d.ts +108 -0
  547. package/dist/vitest.mjs +189 -0
  548. package/fixtures/clock.json +35 -0
  549. package/fixtures/failing.datum-test +2 -0
  550. package/fixtures/main.datum-test +17 -0
  551. package/fixtures/main.json +435 -0
  552. package/package.json +93 -4
@@ -0,0 +1,2012 @@
1
+ import type { ComponentDefinition } from "../../core/schema/contracts.js";
2
+ import type { ComponentNode, FormDefinition, LocalizationConfiguration } from "../../core/schema/types.js";
3
+ import { parseSimulatedOptions } from "../controller/simulated-options.js";
4
+ import type { DefinitionBudget } from "../definition-budget.js";
5
+ import { type BuilderTextCatalog } from "../logic/builder-texts.js";
6
+ import type { ValuePathMove } from "../formula/rename.js";
7
+ import type { FormulaFunctionsSource } from "./builder-panels.js";
8
+ import type { TryItPdfSource, TryItServerChecksSource } from "./try-it-types.js";
9
+ import type { BuilderThemeDefinition } from "./builder-theme-registry.js";
10
+ import { HTMLElementBase } from "../../render/web-component/custom-element-base.js";
11
+ import type { DataSourceResolver } from "../../render/core/component-options.js";
12
+ import type { DataSourceSet } from "../../core/schema/contracts.js";
13
+ import type { AdapterEntry, LiveAssets, LiveBinding } from "../../render/live/contract.js";
14
+ import { BuilderController, type BuilderChangeReason, type BuilderComponentType, type BuilderRenameStepped, type BuilderBindingOption, type FormIdentity, type LocaleChanges, type TranslatableText } from "../controller/builder-controller.js";
15
+ import type { HostValidationCode } from "../property-editor/inspector-model.js";
16
+ import type { TranslationCatalog } from "../../core/schema/contracts.js";
17
+ import { type IconSet } from "../../render/icons/icon-set.js";
18
+ import { type BuilderMode } from "./builder-modes.js";
19
+ import { type FormTranslations } from "../../core/localization/translations.js";
20
+ import { DatumBuilderCanvasElement } from "./builder-panels.js";
21
+ import type { FormTestConfiguration } from "../../core/form-tests/form-test-types.js";
22
+ import { type BuilderScheme } from "./panel-memory.js";
23
+ import { type BuilderFeature } from "./builder-features.js";
24
+ import type { BuilderCommandSource } from "../palette/palette-filter.js";
25
+ import type { PrintTheme } from "../../render/print/theme.js";
26
+ export { BUILDER_FEATURES, BUILDER_FEATURE_PRESETS, builderSides, featureOn as builderFeatureOn, normalizeBuilderFeatures, parseBuilderFeatures, warnBuilderFeatureOnce, type BuilderFeature, type BuilderFeatureSet, type BuilderSides } from "./builder-features.js";
27
+ export declare const DATUM_BUILDER_TAG_NAME = "datum-builder";
28
+ export type DatumBuilderComponentType = BuilderComponentType;
29
+ export interface DatumBuilderOptions {
30
+ title?: string;
31
+ componentTypes?: DatumBuilderComponentType[];
32
+ initialRoot?: ComponentNode;
33
+ componentDefinitions?: ComponentDefinition[];
34
+ /**
35
+ * The icon set the builder's chrome — the bar, the activity strip, the palette, the drag
36
+ * grips — is drawn from. Unset, the default set: whatever the page registered
37
+ * with `setDefaultIconSet`, else the engine's own drawings. A set's markup is trusted like a
38
+ * theme's CSS; names it leaves out fall back to the engine's drawings.
39
+ */
40
+ icons?: IconSet | undefined;
41
+ /** Locale used to resolve `LocalizedText` labels in the canvas and inspector. Defaults to `"en"`. */
42
+ locale?: string;
43
+ /**
44
+ * The `FormDefinition.localization` of the form being edited — like `initialRoot`, an
45
+ * *initial* value. The properties panel's Form selection edits it; read the authored
46
+ * result back from the `localization` getter (or `controller.localization()`) on each
47
+ * `builder-change` and persist it on the definition beside `root`. The bar's locale
48
+ * switcher offers the locales it declares, under their labels.
49
+ * Removing a language (in Languages) deletes its translations from the definition's
50
+ * `translations` map in the same undo step. A host keeping per-locale data of its own (a
51
+ * translation catalog) does not hear of removals and renames as they happen (Undo would then
52
+ * lose its data): it reads the net change since the form was loaded or last saved when it
53
+ * saves, from `localeChangesSinceSave()` or the `localeChanges` handed to `fileActions.save`,
54
+ * applies it to its catalog, and the builder starts counting again from there.
55
+ */
56
+ localization?: LocalizationConfiguration | undefined;
57
+ /**
58
+ * The `FormDefinition.translations` of the form being edited — an *initial* value
59
+ * like `localization`: the controller holds the map from then on, the Languages workspace edits
60
+ * it, and the host reads the authored result back from `controller.translations()` on each
61
+ * `builder-change` and persists it on the definition beside `root`.
62
+ */
63
+ translations?: FormTranslations | undefined;
64
+ /**
65
+ * The definition's `id`, `version` and `schemaVersion` — like `localization`, an *initial*
66
+ * value the Form selection's Identity section edits; read the authored result back from
67
+ * the `identity` getter on each `builder-change` and persist it on the definition. Leave
68
+ * it out and the builder shows no Identity section: the identity stays the host's.
69
+ */
70
+ identity?: FormIdentity | undefined;
71
+ /**
72
+ * The design-system binding the canvas draws the form with — pass the same one (and the same
73
+ * {@link assets}) the host's form element draws with, and the canvas matches it: a binding,
74
+ * the id of one registered on the page (`registerBinding`), or nothing for Datum's own. A
75
+ * design-system stylesheet that cannot be fetched draws the form element's alert in the
76
+ * canvas's place.
77
+ */
78
+ binding?: LiveBinding | string | undefined;
79
+ /** The design system's files, as the host serves them to its form element. */
80
+ assets?: LiveAssets | undefined;
81
+ /**
82
+ * The bindings the View panel's picker offers (`"datum"` for Datum's own): choosing one draws
83
+ * the canvas with it and emits `builder-binding-change` with its id. Nothing is written into
84
+ * the form or its PDF layouts. With one entry or none there is no picker.
85
+ */
86
+ availableBindings?: BuilderBindingOption[];
87
+ /**
88
+ * Adapters by component type laid over the canvas's binding (`extendBinding`): how a tree of
89
+ * the host's own types draws on the canvas. The designers set theirs on their own controllers.
90
+ */
91
+ canvasComponents?: Readonly<Record<string, AdapterEntry>> | undefined;
92
+ /**
93
+ * Lets the tree fix the sheet's width (see `BuilderControllerOptions.sheetWidth`): called
94
+ * with the previewed root on every repaint, the CSS pixel width it returns sizes the form on
95
+ * the sheet and puts the bar's width picker and the sheet's drag grips away. The PDF designer
96
+ * sets it so the page previews at its paper width.
97
+ */
98
+ sheetWidth?: ((root: ComponentNode) => number | undefined) | undefined;
99
+ /** Resolves `select` options in the canvas preview (see `BuilderControllerOptions`). */
100
+ dataSourceResolver?: DataSourceResolver | undefined;
101
+ /**
102
+ * The host's wiring-time data sources (`defineDataSources`): previewed on the canvas ahead
103
+ * of `dataSourceResolver`, and listed by the inspector's Data source picker.
104
+ */
105
+ dataSources?: DataSourceSet | undefined;
106
+ /** Further source ids for the picker — ones registered on the runtime, which the builder cannot see. */
107
+ dataSourceIds?: string[];
108
+ /**
109
+ * Validation codes the page knows about beyond the engine's own — the keys of its `messages`
110
+ * catalog, the codes its server or sandboxed rules return — offered in the messages editor
111
+ * after the engine's. A bare code, or `{ code, label }` for a hint on hover.
112
+ */
113
+ validationCodes?: HostValidationCode[];
114
+ }
115
+ export interface DatumBuilderChangeDetail {
116
+ root: ComponentNode;
117
+ selectedComponentId?: string | undefined;
118
+ reason: BuilderChangeReason;
119
+ /**
120
+ * Only on the change that re-seated a component under a new id. The form's own
121
+ * documents follow it in the rename's step of the history (its rules, translations and
122
+ * scenarios, a PDF layout's conditions and sources when the PDF mode is up); a host keeping
123
+ * references of its own outside the form follows them from here.
124
+ */
125
+ renamed?: {
126
+ from: string;
127
+ to: string;
128
+ dataPath?: ValuePathMove;
129
+ };
130
+ /**
131
+ * Only on the change an Undo or a Redo of a rename made: the component answers to `to` again
132
+ * (its old id, after an Undo). The step put back what followed the rename in the form's own
133
+ * documents; a host that followed {@link renamed} in references of its own follows this too.
134
+ */
135
+ renameStepped?: BuilderRenameStepped;
136
+ /**
137
+ * Only on the change of an edit that moved where answers are stored (a data key, a container's
138
+ * key or `scopeData`): each moved value path before and after, to be followed as one
139
+ * map (a path moves once, so two keys swapped stay swapped) by a host reading answers by path.
140
+ * The change an Undo of such an edit made carries each move the other way round (the answers
141
+ * go back), and the change a Redo made carries the same moves again, both with
142
+ * {@link historyStep}. The array is the host's own copy.
143
+ */
144
+ dataMoved?: readonly ValuePathMove[];
145
+ /**
146
+ * On every change an Undo or a Redo made, so a host can tell a redone {@link dataMoved} from a
147
+ * new one: a move map applied twice undoes a swap. An Undo's {@link dataMoved} is the first
148
+ * run's moves reversed, a Redo's is the first run's, so a host following the form applies each
149
+ * change's map as it is told, once. A follower whose rewrite joined the step's own entry (the
150
+ * shell's scenarios, a registered mode) skips these changes: the entry already puts its rewrite
151
+ * back. Absent on every other change.
152
+ */
153
+ historyStep?: "undo" | "redo";
154
+ }
155
+ /**
156
+ * How `<datum-builder>` lays out its chrome. `"page"` (the default) fills the window below
157
+ * `--db-shell-top` (the height of a host's own app bar, zero by default), for a builder that
158
+ * *is* the page; `"contained"` fills the element's own box, for a builder embedded in a page
159
+ * that has other things on it — the host sizes the element (a height, or a flex/grid cell) and
160
+ * everything, canvas scrolling included, stays within it. Set through the `layout` attribute
161
+ * or property.
162
+ */
163
+ export type DatumBuilderLayout = "page" | "contained";
164
+ /** The panels the activity strip opens, one at a time, beside the canvas. */
165
+ /**
166
+ * The panels the activity strip opens, one at a time, beside the canvas. A host's own panel
167
+ * is any other id: it names it on its `slot="strip"` item and on the `slot="panel"` element
168
+ * that goes with it, and the shell opens the one for the other.
169
+ */
170
+ export type DatumBuilderPanel = "form" | "chrome" | "components" | "fields" | "outline" | "variables" | "tests" | "view" | "settings" | (string & {});
171
+ /**
172
+ * The builder's workspaces: what the author is doing,
173
+ * one at a time — the Form itself, its Logic, its Data, its Languages, its Journeys, its PDF
174
+ * layouts and how it Prints. A layer over the panels and the modes, not a mode of its own: Form,
175
+ * Logic, Data, Languages and Print edit the form's controller; Journeys and PDF open on their overview with the form
176
+ * still the page's mode, and a card's Open puts that mode's designer on the page.
177
+ */
178
+ export type BuilderWorkspace = "form" | "logic" | "data" | "languages" | "journeys" | "pdf" | "print";
179
+ /** The workspaces in the bar's order. */
180
+ export declare const BUILDER_WORKSPACES: readonly BuilderWorkspace[];
181
+ export interface BuilderWorkspaceChangeDetail {
182
+ workspace: BuilderWorkspace;
183
+ previous: BuilderWorkspace;
184
+ }
185
+ /**
186
+ * What a host's {@link DatumBuilderElement.translationsSource} answers: the catalog
187
+ * it hands the runtime, so the Languages workspace can say which texts the page overrides. The
188
+ * builder only reads it; the host's catalog is the host's to edit.
189
+ */
190
+ export interface TranslationsCatalogSource {
191
+ /** The host's translation catalog: what it currently hands the runtime. */
192
+ catalog: TranslationCatalog;
193
+ }
194
+ /** A form file the author chose with the bar's Open button: its name and its text. */
195
+ export interface BuilderFormFile {
196
+ name: string;
197
+ text: string;
198
+ }
199
+ /**
200
+ * The bar's file actions: New, Open and Download, each a button on the bar only when the host
201
+ * supplies it (see {@link DatumBuilderElement.fileActions}). The builder does the asking —
202
+ * the unsaved-edits guard, the confirmation, the file picker, the save as a download — and the
203
+ * host does what only it knows: what an empty form is, whether a file is a form, and the whole
204
+ * definition to save.
205
+ */
206
+ export interface BuilderFileActions {
207
+ /** Put an empty form in place of this one. */
208
+ new?: () => void;
209
+ /** Check a chosen file; return the step that puts it in place, or throw (reject) with a message to refuse it. */
210
+ open?: (file: BuilderFormFile) => (() => void) | Promise<() => void>;
211
+ /** The form as a file to save. */
212
+ download?: () => {
213
+ name: string;
214
+ text: string;
215
+ type?: string;
216
+ };
217
+ /**
218
+ * Save the form where the host keeps it: the file menu's Save, and Ctrl/Cmd+S in
219
+ * the builder. The builder asks about unapplied edits first, then calls it; while a returned
220
+ * promise is pending the item says so, and a rejection's message shows beside the menu.
221
+ * It is handed the languages changed since the form was loaded or last saved, for a host
222
+ * keeping a translation catalog to apply (see {@link BuilderSaveContext}); once the save
223
+ * succeeds they count from there.
224
+ */
225
+ save?: (context: BuilderSaveContext) => void | Promise<void>;
226
+ /** Save's name in the menu; "Save" unless given (say "Save draft"). */
227
+ saveLabel?: string;
228
+ /**
229
+ * Whether the form as the host holds it has nothing a New would lose — say no PDF layouts
230
+ * or journeys of the author's making — so New may go ahead without asking. Consulted only
231
+ * when the builder's own check (no components, no root settings, no languages) passes;
232
+ * unset, that check decides alone.
233
+ */
234
+ isEmpty?: () => boolean;
235
+ }
236
+ /** What the builder hands the host's {@link BuilderFileActions.save}. */
237
+ export interface BuilderSaveContext {
238
+ /**
239
+ * The net change to the form's languages since it was loaded or last saved: a
240
+ * host keeping per-locale data of its own (a translation catalog) drops what it holds under
241
+ * `removed` and moves what it holds under each `renamed.from` to `to` — then saves. Undo before
242
+ * a save loses nothing, because nothing is announced before it.
243
+ */
244
+ localeChanges: LocaleChanges;
245
+ /**
246
+ * `"agent"` when a browser assistant asked for the save, so a host can log
247
+ * who asked; absent when the person did (the File menu, Ctrl/Cmd+S, the command palette).
248
+ */
249
+ trigger?: "agent";
250
+ }
251
+ /** The `builder-file-action` event's detail: which file action completed, and the file's name when there is one. */
252
+ export interface BuilderFileActionDetail {
253
+ action: "new" | "open" | "download" | "save";
254
+ name?: string;
255
+ /** On `save`, when the languages changed since the form was loaded or last saved: what the save was handed (see {@link BuilderSaveContext}). */
256
+ localeChanges?: LocaleChanges;
257
+ /** On `save`, `"agent"` when a browser assistant asked for it (see {@link BuilderSaveContext.trigger}). */
258
+ trigger?: "agent";
259
+ }
260
+ /**
261
+ * How a save a browser assistant asked for ended:
262
+ * `saved` (with the languages changed since the last save, when any were); `no-save` when the host
263
+ * lends no Save; `busy` while a save runs; `held` while something the person has not answered is
264
+ * in the way (an unsaved-changes prompt up, a draft on the selection or the form root, an editor
265
+ * outside the tree holding edits), which the agent's path never asks about itself; `failed` with
266
+ * the host's own words when its save threw or rejected.
267
+ */
268
+ export type BuilderSaveOutcome = {
269
+ status: "saved";
270
+ localeChanges?: LocaleChanges;
271
+ } | {
272
+ status: "no-save";
273
+ } | {
274
+ status: "busy";
275
+ } | {
276
+ status: "held";
277
+ reason: "prompt" | "draft" | "leave-guard";
278
+ componentId?: string;
279
+ } | {
280
+ status: "failed";
281
+ message: string;
282
+ };
283
+ /**
284
+ * The canvas's Try it seams as {@link DatumBuilderElement.agentTryParts}
285
+ * hands them to the builder agent's element host: each is the canvas member of the same name,
286
+ * reached on the canvas the shell has at the time of the call (`onTrySubmit` hears the canvas's
287
+ * `builder-try-submit` on the shell, so it outlives a rebuilt canvas).
288
+ *
289
+ * @internal
290
+ */
291
+ export type BuilderAgentTryParts = Pick<DatumBuilderCanvasElement, "triedRuntime" | "agentTryCheck" | "agentTrySubmit" | "quietTriedPageFocus" | "focusedTriedPath" | "tryReady" | "tryPageIdOf" | "tryNodeIdOf" | "tryRecording" | "tryShowing" | "tryServerChecks" | "onTrySubmit" | "tryChunkState">;
292
+ /**
293
+ * What the Languages surface draws its rows from beyond the form's controller
294
+ * ({@link DatumBuilderElement.agentLanguageInputs}): the journeys' and the PDF layouts' texts, the
295
+ * host's catalog when it lends one, and the designer sides whose texts the form holds but cannot
296
+ * be listed because their mode is not on the page. The header and footer texts are the
297
+ * controller's own.
298
+ *
299
+ * @internal
300
+ */
301
+ export interface BuilderAgentLanguageInputs {
302
+ extraTexts: TranslatableText[];
303
+ pdfTexts: TranslatableText[];
304
+ catalog?: TranslationCatalog;
305
+ notLoaded: Array<"journeys" | "pdf">;
306
+ }
307
+ export { parseSimulatedOptions };
308
+ /**
309
+ * The builder shell: one bar, an activity strip that opens one panel at a time
310
+ * (the component palette, the outline), the canvas, and the properties panel docked beside
311
+ * it. Its API: `.options`, `.value`, `builder-change` / `builder-mutation` events,
312
+ * `undo()` / `redo()`. `.controller` exposes the shared {@link BuilderController} for
313
+ * advanced hosts that want to lay the panels out themselves.
314
+ *
315
+ * The bar leads with the file actions — New, Open, Download — when the host supplies them
316
+ * ({@link fileActions}). Three named slots take host controls, all on the bar: `toolbar-start`
317
+ * follows the file actions (a save button), `toolbar` trails the row (a theme picker), and
318
+ * `canvas-actions` — kept from when the canvas had a toolbar of its own — lands at the end
319
+ * beside `toolbar`. A button or select slotted there, and a launcher slotted into `strip`,
320
+ * takes the builder's own look (see `BUILDER_HOST_CONTROL_STYLES`) unless a class of the
321
+ * host's styles it.
322
+ *
323
+ * Modes: a host may register further things for the same
324
+ * shell to edit — the form's PDF layouts — each with a controller of its own; the bar then
325
+ * shows a tab per mode, or per document of a mode that has several. `value`, `options`,
326
+ * `controller` and the `builder-change` event stay the form's; a mode reports its own changes
327
+ * its own way.
328
+ */
329
+ export declare class DatumBuilderElement extends HTMLElementBase {
330
+ private readonly rootNode;
331
+ private readonly ctrl;
332
+ private optionsState;
333
+ private themeState;
334
+ private appliedThemeVars;
335
+ /** Where the host's translation catalog comes from (see {@link translationsSource}). */
336
+ private translationsSourceValue;
337
+ /** The host's file actions (see {@link fileActions}); a bar button shows for each one supplied. */
338
+ private fileActionsValue;
339
+ /** The longest file Open reads (see {@link maxDefinitionBytes}). */
340
+ private maxDefinitionBytesValue;
341
+ /** What the file actions' confirmation runs on its OK, while it is up. */
342
+ private fileConfirmRun;
343
+ /** The file button whose action the confirmation is asking about, which focus goes back to. */
344
+ private fileConfirmOpener;
345
+ /** The file button the bar's message is about (Open for a refused file, Download when downloads are unavailable), which Dismiss hands focus back to. */
346
+ private fileErrorSource;
347
+ private toolbarEl;
348
+ private outlineEl;
349
+ private fieldsEl;
350
+ /** The Form fields source the panel was last pointed at (the mode's `formFields`) and the way its notices are heard. */
351
+ private fieldsSource;
352
+ private fieldsOff;
353
+ private canvasEl;
354
+ private serverChecksValue;
355
+ private tryPdfValue;
356
+ private propertiesEl;
357
+ /** The strip's Form panel: the inspector, fixed to the controller's root. */
358
+ private formSettingsEl;
359
+ /**
360
+ * The Header & footer panel: the form root's chrome, in the side column. Set once
361
+ * its chunk has loaded and the element in the side column is upgraded and fed;
362
+ * until then {@link chromePanelHost} is the bare element in the markup, which only ever gets
363
+ * attributes and inline style (hidden, the phone flags, the theme's tokens), never a property.
364
+ */
365
+ private chromePanelEl;
366
+ private chromePanelHost;
367
+ /**
368
+ * The Variables panel: what a rule or a PDF text may reference. Pointed at the
369
+ * form's own controller on every tab — the references are the form's fields whichever
370
+ * document is being edited — and told which syntax to list by the mode on the page. Lazy
371
+ * like the Header & footer panel: {@link variablesPanelHost} until it is loaded.
372
+ */
373
+ private variablesPanelEl;
374
+ private variablesPanelHost;
375
+ /**
376
+ * The Tests panel: the form's scenarios, run on the browser's runtime. Pointed at the
377
+ * form's own controller on every tab, since tests are the form's whichever document is being
378
+ * edited. Lazy like the Variables panel: {@link testsPanelHost} until its chunk is loaded.
379
+ */
380
+ private testsPanelEl;
381
+ private testsPanelHost;
382
+ /** How many tests the panel last reported failing, erroring or unparsed: the count on the strip item. */
383
+ private testsFailing;
384
+ /** The rename follow in flight, so a second rename waits for the first and each sees the tests as the last left them. */
385
+ private testsRenameChain;
386
+ /** Moved by every form the controller loads, so a rename follow that waited for the chunk knows its form is still the one. */
387
+ private testsGeneration;
388
+ /**
389
+ * The scenarios' follow-ups the controller dropped because their step was undone before they
390
+ * landed, each by the step's key ({@link followInStep}): a Redo of that step runs it again,
391
+ * while the step can still be redone.
392
+ */
393
+ private droppedFollows;
394
+ /** The component whose rule the Tests panel asked Logic to open, until the surface is there to open it. */
395
+ private pendingRuleOpen;
396
+ /** The rule key (`visibleWhen`, ...) the Tests panel named with it, so the surface opens that rule. */
397
+ private pendingRuleKind;
398
+ /** Set when `persist-panels` put the Tests panel back open: its first wiring says so, and the panel skips its opening run. */
399
+ private testsRestored;
400
+ /**
401
+ * The Logic surface's "Pinned by" source, memoised by the controller change
402
+ * it was built at and the tests block it read, so a repaint or a second connect costs nothing.
403
+ */
404
+ private testsPinsStamp;
405
+ private testsPinsMemo;
406
+ /** Moved by every request for pins, so an answer that lands after a newer request is dropped. */
407
+ private testsPinsRequest;
408
+ /** Set while Try it takes the side column away, so that is not the Tests panel being closed (a showing ends on a close, not on that). */
409
+ private enteringTry;
410
+ /** A lazy panel's load in flight, per panel, for the host element it was asked for. */
411
+ private lazyPanelLoads;
412
+ /**
413
+ * Moved by every buildDom. A re-connect replaces the shadow DOM, so a surface or palette load
414
+ * that was in flight for the old markup must land nowhere: each loader captures this before it
415
+ * waits and drops its answer (resolved or rejected) when it no longer matches.
416
+ */
417
+ private domGeneration;
418
+ /** Ends the listeners buildDom put on the shadow root and on the host, before the next build adds its own. */
419
+ private shellListeners;
420
+ /** The strip's View panel: the canvas controls — preview width, render theme, show hidden. */
421
+ private viewPanelEl;
422
+ private settingsPanelEl;
423
+ /** The data source whose simulated list is open for editing in the Settings panel, and what its box held. */
424
+ private editingSource;
425
+ /** What the Settings panel's source list last drew, so a change that moved nothing in it repaints nothing. */
426
+ private sourcesSignature;
427
+ /** Why the host values box was not taken (the box keeps its text, the last good values stay applied); `undefined` when it was. */
428
+ private hostValuesProblem;
429
+ /** The form's rule text the "reads host values" line was last worked out from, so a change that moved nothing costs no scan. */
430
+ private hostReadsSignature;
431
+ /** What the documents dropdown last drew, so a controller change that moves none of it repaints nothing. */
432
+ private documentsSignature;
433
+ private wrapEl;
434
+ private documentsEl;
435
+ private modeActionsEl;
436
+ private readonly modeMap;
437
+ private activeMode;
438
+ private modeToken;
439
+ private showModeSwitchValue;
440
+ private readonly hiddenModes;
441
+ /** Each mode's canvas surface, kept while the mode is inactive. */
442
+ private readonly surfaces;
443
+ /** What each mode's surface says about the canvas bar's tools. */
444
+ private readonly surfaceOptions;
445
+ private readonly documentUnsubs;
446
+ /** How many documents each mode listed when it last told the shell, so a list that empties is seen. */
447
+ private readonly documentCounts;
448
+ /** Each mode's subscription to its rows on the Form panel (`BuilderMode.formSettings`). */
449
+ private readonly formSettingsUnsubs;
450
+ /** Which bar button opened the shared menu popover: the document's menu or the +. */
451
+ private documentMenuOpener;
452
+ private modeStyleEl;
453
+ /** The controller the panels and the bar are pointed at, so a re-point is only done on a change. */
454
+ private pointedController;
455
+ private barUnsub;
456
+ private activePanel;
457
+ /**
458
+ * Whether the Components palette's open or shut state is the shell's own doing: it
459
+ * opens with an empty form to start on and stays shut on one with components, and a click on the
460
+ * canvas puts it away. The author's own move (a strip item, the rail's All components, the
461
+ * `panel` property, a remembered layout) takes the choice, and nothing is written to
462
+ * `persist-panels` until then.
463
+ */
464
+ private autoPalette;
465
+ /** The workspace on the page, the last one that is not a designer's, and each one's open panel. */
466
+ private workspaceValue;
467
+ private lastFormWorkspace;
468
+ private readonly workspacePanels;
469
+ private hiddenWorkspacesValue;
470
+ /**
471
+ * The `features` list: `undefined` when none was given, where every part of the
472
+ * builder exists; else only the parts it names (and the Form workspace). The list is the master:
473
+ * `hidden-workspaces` and `hidden-panels` only take further parts away.
474
+ */
475
+ private featuresValue;
476
+ /** Strip panels the host leaves off (`hidden-panels`); the ids of SHELL_PANELS. */
477
+ private hiddenPanelsValue;
478
+ private managedSettingsValue;
479
+ private workspaceRestored;
480
+ /** Problem counts a host or the wrapper reports per workspace (journey diagnostics, layout rules); Data adds the form's own. */
481
+ private workspaceProblemsValue;
482
+ /** The document whose name is being edited in place, in the dropdown's face. */
483
+ private renaming;
484
+ private drag;
485
+ private unsub;
486
+ /** The `persist-panels` key the panels are remembered under; none, nothing is remembered. */
487
+ private persistKey;
488
+ /** Set while a remembered layout is being applied, so applying it is not written back. */
489
+ private restoring;
490
+ /** Set once the shell is up and any remembered layout applied: only then are changes written back. */
491
+ private panelsReady;
492
+ /** Whether the shell is narrow: the side column and the inspector are drawers. */
493
+ private narrow;
494
+ /** Whether the shell is medium: 900px up to 1280px, where one drawer sits beside the canvas. */
495
+ private medium;
496
+ /** Set while the palette or another panel drawer has put the inspector away at the medium tier; session only, never written to panel memory. */
497
+ private yieldedProps;
498
+ /** Set while the shell closes a drawer on its own (a selection opening the inspector at the medium tier): not remembered. */
499
+ private passing;
500
+ /** Set while the shell settles its own palette at connect: the panel changes without announcing it. */
501
+ private quietPanel;
502
+ /** The panels as they stood before the shell went narrow, restored when it widens again. */
503
+ private wideState;
504
+ /** Logic's surface, once its chunk has loaded. */
505
+ private logicEl;
506
+ /** The plugin functions the host wired, listed with the built-ins everywhere a formula is written. */
507
+ private formulaFunctionsValue;
508
+ private formulaReferenceHrefValue;
509
+ /** See {@link embedBudget}. */
510
+ private embedBudgetValue;
511
+ private textLocaleValue;
512
+ private textCatalogValue;
513
+ /** The builder's words for the shell chrome: the same locale and catalog the panels take. */
514
+ private readonly words;
515
+ /**
516
+ * One of the builder's own words by key, in the builder's language (the host's catalog, else
517
+ * the English table). `<datum-form-builder>` draws its loading and failure cards in its own
518
+ * shadow root and asks here, so the cards say what the shell's cards say.
519
+ */
520
+ shellText(key: string): string;
521
+ private logicLoading;
522
+ private logicDefinitionSource;
523
+ /** The command palette, once its chunk has loaded. */
524
+ private paletteEl;
525
+ /** Ids of the commands run last, most recent first (five at most, this page only). */
526
+ private recentCommands;
527
+ private readonly commandSources;
528
+ /** The Journeys and PDF overviews' surface, once its chunk has loaded. */
529
+ private overviewEl;
530
+ private overviewLoading;
531
+ private overviewShown;
532
+ private designerShown;
533
+ /** Set while the form comes back for an overview ("‹ Layouts", a designer tab): the mode change keeps the workspace, on its overview. */
534
+ private returningToOverview;
535
+ /** Takes down a mode's popover and styles, put up for an add started from an overview. */
536
+ private overviewAddDown;
537
+ /** The mode a switch is activating, until it lands or another choice supersedes it. */
538
+ private activating;
539
+ /** The document whose card takes focus once the overview is drawn (its chunk was still loading). */
540
+ private pendingOverviewFocus;
541
+ /** Data's surface, once its chunk has loaded. */
542
+ private dataEl;
543
+ private dataLoading;
544
+ private languagesEl;
545
+ private languagesLoading;
546
+ /** Print's surface, once its chunk has loaded. */
547
+ private printEl;
548
+ private printLoading;
549
+ private printThemeValue;
550
+ private printSourcesValue;
551
+ private widthObserver;
552
+ private shellWidth;
553
+ /** The marks {@link highlightComponents} set, until its timer takes them away. */
554
+ private agentHighlight;
555
+ /** The phone tier: set beside `narrow` by the width observer. */
556
+ private phone;
557
+ /** Set while the phone's attributes are on anything, so the first sync off the phone clears them. */
558
+ private phoneTouched;
559
+ private menuOpen;
560
+ private moreOpen;
561
+ private resultsOpen;
562
+ /** Surfaces (Logic, Data) whose own editor is up as a sheet: they say so with builder-sheet-change. */
563
+ private readonly surfaceSheets;
564
+ /** The sheet the last sync drew, so a change of sheet moves focus once. */
565
+ private sheetKind;
566
+ /** What had focus when the first sheet came up: it gets focus back when the last goes. */
567
+ private sheetOpener;
568
+ /** Sheets the author made tall with the handle, for this page only (spec 3.5). */
569
+ private readonly tallSheets;
570
+ /** Sheets the author shrank with the handle on a small phone, where the default is tall. */
571
+ private readonly shortSheets;
572
+ /** Whether the phone is a small one (see PHONE_SMALL_WIDTH): framed sheets open tall. */
573
+ private smallPhone;
574
+ /** The sheet the gestures are attached to, and what takes them away again (sheet-gestures.ts). */
575
+ private sheetGestureKind;
576
+ private sheetGestureOff;
577
+ /** The results sheet's own look, adopted into the canvas's shadow root. */
578
+ private resultsSheetStyles;
579
+ /** Whether the Try it results sheet is raised to its tall height (the grabber's tap or a drag up). */
580
+ private resultsTall;
581
+ /** The bottom bar's items past four, in order, which More lists. */
582
+ private moreItems;
583
+ /** Where each host slot moved into the drawer stood on the bar. */
584
+ private hostSlotHomes;
585
+ private saveStateValue;
586
+ /** The selection the last syncInspector saw, so a phone tells a new selection from a repaint. */
587
+ private selectionSeen;
588
+ constructor();
589
+ connectedCallback(): void;
590
+ disconnectedCallback(): void;
591
+ static get observedAttributes(): string[];
592
+ attributeChangedCallback(name: string, _previous: string | null, value: string | null): void;
593
+ /** The form's controller — the primary mode's. See {@link activeController} for the mode on the page. */
594
+ get controller(): BuilderController;
595
+ /**
596
+ * The answers tried on the canvas, as its one store holds them: typed in
597
+ * any workspace's Try it, kept across them. Typed ones only (a calculation's or a default's
598
+ * value is nobody's answer), as kernel JSON; `{}` before the canvas is drawn.
599
+ */
600
+ triedAnswers(): Record<string, unknown>;
601
+ /** Empties the answers tried, as Try it's Clear answers does (the PDF preview dialog's Clear). */
602
+ clearTriedAnswers(): void;
603
+ /**
604
+ * Registers a mode; its tab (or its documents' tabs) appears on the bar. A `mode` attribute naming it takes effect at once.
605
+ * `before` puts it ahead of that registered mode — on the bar, in the dropdown and in the command palette — so a side a host
606
+ * takes away and brings back keeps its place; a name not registered, or the form's, appends it.
607
+ */
608
+ addMode(mode: BuilderMode, options?: {
609
+ before?: string | undefined;
610
+ }): void;
611
+ /**
612
+ * Removes a mode. The active one is left at once — the host's decision, not held by the
613
+ * guard — and the form comes back on the page. The form itself cannot be removed.
614
+ */
615
+ removeMode(id: string): void;
616
+ /**
617
+ * Takes `mode`, the one on the page, down and puts the form back — at once, not through the
618
+ * unsaved-edits guard: the host removed the mode, or the mode's last document went (and
619
+ * with it anything drafted on it).
620
+ */
621
+ private returnToForm;
622
+ /** Every mode's rows for the Form panel, in the bar's order. */
623
+ private modeSettingsGroups;
624
+ /** Hands the Form panel the modes' rows as they stand; it draws them on the form's own tab. */
625
+ private applyModeSettings;
626
+ /** The registered modes, the form first, as the bar lists them. */
627
+ get modes(): Array<{
628
+ id: string;
629
+ label: string;
630
+ }>;
631
+ /** The mode on the page. Assigning switches (through the unsaved-edits guard); see {@link setMode}. */
632
+ get mode(): string;
633
+ set mode(id: string);
634
+ /**
635
+ * Puts the mode with this id on the page, once the active mode's unsaved inspector edits are
636
+ * dealt with (the same prompt as leaving the builder). Returns whether the switch started now.
637
+ */
638
+ setMode(id: string): boolean;
639
+ /**
640
+ * Puts one of a mode's documents on the page — the mode first, when another is active —
641
+ * once the active controller's unsaved edits are dealt with. Returns whether the switch
642
+ * started now.
643
+ */
644
+ selectDocument(modeId: string, documentId: string): boolean;
645
+ /**
646
+ * A new document (the palette's, a host's `newDocument`): the mode's own add flow (a popover,
647
+ * a dialog). With the mode on the page it is anchored on the document label. A journey or a
648
+ * layout otherwise starts from its workspace's overview, as that overview's New
649
+ * does, once the active controller's unsaved edits are dealt with. Another mode moves the
650
+ * page to it first, its chrome being up only while it is active; the label is looked up when
651
+ * the flow starts, since the switch redraws it.
652
+ */
653
+ private addDocument;
654
+ /**
655
+ * An overview's New: the mode's add flow over the overview, the form still the
656
+ * page's mode. Only the mode's overlays and styles go up for it. The designer opens on the
657
+ * document made; a flow left with nothing made leaves the overview as it was.
658
+ */
659
+ private addFromOverview;
660
+ /**
661
+ * Starts a new document in a mode (a journey, a PDF layout): the mode's own
662
+ * add flow, as an overview's New and the command palette start it, its popover under the
663
+ * bar's document label. `kind` is one of the mode's `addKinds`; without it the mode offers
664
+ * every kind. Returns whether the mode can add.
665
+ */
666
+ newDocument(modeId: string, kind?: string): boolean;
667
+ /**
668
+ * The server's checks Try it can run on the answers tried: a host's WebAssembly
669
+ * sandbox, say. In hand or as a loader, called the first time the author turns it on. Unset, Try it checks in the browser alone.
670
+ */
671
+ get serverChecks(): TryItServerChecksSource | undefined;
672
+ set serverChecks(value: TryItServerChecksSource | undefined);
673
+ /** What Try it's Preview PDF renders with (the host's PDF provider and fonts). Unset, Try it offers no PDF. */
674
+ get tryPdf(): TryItPdfSource | undefined;
675
+ set tryPdf(value: TryItPdfSource | undefined);
676
+ /** Where a new document's popover opens: under the document label, the bar's centre, at every width. */
677
+ private addAnchor;
678
+ /** The workspace on the page. Assigning switches through the unsaved-edits guard; see {@link setWorkspace}. */
679
+ get workspace(): BuilderWorkspace;
680
+ set workspace(id: BuilderWorkspace);
681
+ /** Workspaces the host leaves off the bar (`hidden-workspaces`); the one on the page is left for the first shown. */
682
+ get hiddenWorkspaces(): BuilderWorkspace[];
683
+ set hiddenWorkspaces(value: BuilderWorkspace[]);
684
+ /**
685
+ * Problems to count on the workspace tabs: what a host or the wrapper finds,
686
+ * per workspace — the journeys' diagnostics for Journeys, loaded when the page is idle, and the
687
+ * layouts' rule problems for PDF. Data adds
688
+ * the form's own data-key problems. Until something is reported a tab shows no count, never a
689
+ * spinner, and nothing waits on it.
690
+ */
691
+ get workspaceProblems(): Partial<Record<BuilderWorkspace, number>>;
692
+ set workspaceProblems(value: Partial<Record<BuilderWorkspace, number>>);
693
+ /** A workspace's name on the bar, in the builder's words. */
694
+ private workspaceLabel;
695
+ /** A mode's name: its workspace's words for the form and the designers, else the mode's own label. */
696
+ private modeLabel;
697
+ /** A card the surface's host shows while its chunk loads or when it fails (Retry). */
698
+ private loadingCard;
699
+ /**
700
+ * A lazy surface that did not arrive (or could not be wired): its failure card with Retry in the
701
+ * surface's place, and the host told as `datum-error` {message, cause} (absent-code
702
+ * resilience), so a deleted or blocked chunk is neither a blank area nor silent.
703
+ */
704
+ private surfaceFailed;
705
+ private reportFailure;
706
+ private failedCard;
707
+ /** The count drawn on each tab: the reported problems, and for Data the form's data-key clashes. */
708
+ private applyWorkspaceCounts;
709
+ /**
710
+ * The workspaces the bar offers: those the `features` list allows (every one without a list),
711
+ * not hidden by the host, and Journeys or PDF only while that mode is registered.
712
+ */
713
+ availableWorkspaces(): BuilderWorkspace[];
714
+ /**
715
+ * The form workspace to go back to when a designer's mode leaves the page: the last one the
716
+ * author was on, unless the `features` list has since taken it away (then the Form workspace),
717
+ * so an excluded workspace is never entered, and its chunk never fetched.
718
+ */
719
+ private formWorkspaceToReturn;
720
+ /**
721
+ * The optional parts of the builder that exist, as one list (the `features` attribute,
722
+ * normalised: the parts in a fixed order separated by spaces, `all` or `minimal` when it is
723
+ * either). Without a list (`undefined`, `null`, no attribute) every part exists, as before the
724
+ * attribute was added; with one, only the parts it names do, besides the Form workspace with
725
+ * its canvas, its inspector and its component palette. The list is the master: `hidden-workspaces`
726
+ * and `hidden-panels` only take more away. Assigning a string or an array of tokens sets the
727
+ * attribute; a change after the builder is up rebuilds what it touches (the workspaces, the strip,
728
+ * the bar, the inspector), and the chunks of a part left out are never fetched. See `builder-features.ts`.
729
+ */
730
+ get features(): string | undefined;
731
+ set features(value: string | readonly string[] | null | undefined);
732
+ /**
733
+ * Whether an optional part of the builder exists: always without a `features` list, except an
734
+ * opt-in token such as `agent`, which is never on without a list; else only when the
735
+ * list names it.
736
+ */
737
+ featureEnabled(feature: BuilderFeature): boolean;
738
+ /**
739
+ * The key a text is read under where the builder leaves a part out: with Try it
740
+ * off the canvas offers "Preview", so the bar, the menu and the commands say Preview too, not
741
+ * Try it; with Logic off the View panel's hidden-components row does not speak of rules.
742
+ */
743
+ private textKey;
744
+ /**
745
+ * Strip panels the host leaves off (`hidden-panels`): ids of the shell's own panels — `form`,
746
+ * `chrome`, `components`, `fields`, `outline`, `variables`, `tests`, `view`, `settings`. A hidden
747
+ * panel is never loaded, nor the one open (the workspace's own opens instead), and its item is
748
+ * not on the strip. Works with or without `features`, which it can only restrict.
749
+ */
750
+ get hiddenPanels(): string[];
751
+ set hiddenPanels(value: string[]);
752
+ /**
753
+ * Settings the host manages (`managed-settings`): property paths, or the
754
+ * short `answersFree` for `data.answersFree`. The inspector draws a "managed by the site" note
755
+ * in place of each box; the stored value is never touched. None by default.
756
+ */
757
+ get managedSettings(): string[];
758
+ set managedSettings(value: string[]);
759
+ private applyFeatures;
760
+ /** Whether the panel is left off the strip: by the `features` list or by `hidden-panels`. A host's own panels are never. */
761
+ private panelOff;
762
+ /** The panel to open for the one asked: itself, or the workspace's own when it is left off (none when that is too). */
763
+ private usablePanel;
764
+ /** Whether the strip's item for a shell panel is put away: the panel is left off, or the tab offers no such panel. */
765
+ private stripItemHidden;
766
+ /** The mode whose findings the root panel's card draws, and the way its notices are heard. */
767
+ private findingsMode;
768
+ private findingsOff;
769
+ /** Points the root panel's findings card at the mode on the page (`BuilderMode.findings`): none on a mode without them. */
770
+ private watchFindings;
771
+ private syncFindings;
772
+ /** Whether the mode on the page offers the Form fields panel now (a journey's Step view is up). */
773
+ private fieldsOffered;
774
+ /**
775
+ * Points the Form fields panel at the mode on the page and hears when the mode's offer changes
776
+ * (the Step view going up or down): the strip's item follows, and an open panel gives way to
777
+ * the workspace's own once it is no longer offered.
778
+ */
779
+ private watchFormFields;
780
+ private syncFieldsOffer;
781
+ private syncStripItems;
782
+ /**
783
+ * Brings the shell in line with the `features` list and `hidden-panels` (a change after connect
784
+ * included): a workspace left off gives way to the first one that is on, the strip loses the
785
+ * items of panels left off and an open one gives way to the workspace's own, and the bar, the
786
+ * canvas, the inspector and the surfaces lose the parts the list leaves out. No chunk is
787
+ * fetched for any of it.
788
+ */
789
+ private syncFeatures;
790
+ /** The parts of the bar, the canvas, the inspector and the surfaces that a feature owns; idempotent, so any repaint may call it. */
791
+ private syncFeatureParts;
792
+ /** The words that depend on a feature (see {@link textKey}), written again as the `features` list changes; a value already there costs no paint. */
793
+ private applyFeatureWords;
794
+ /**
795
+ * The parts of the lazy surfaces that a feature owns, by the properties they read before they
796
+ * draw: the Data surface's import (`data-model`) and its Schema and Example views, and
797
+ * the Header & footer panel's JSON menu. The JSON views are what would fetch the editor's chunk,
798
+ * so with `json` left out no view is there to ask. A value the surface already has costs no paint.
799
+ */
800
+ private syncSurfaceFeatures;
801
+ /**
802
+ * Puts a workspace on the page once the active controller's unsaved edits are dealt with (the
803
+ * Apply / Discard / Stay prompt). Journeys and PDF open on their
804
+ * overview, the form back on the page; the others bring the form back too. Returns whether the
805
+ * switch started now.
806
+ */
807
+ setWorkspace(id: BuilderWorkspace): boolean;
808
+ /**
809
+ * Leaves a workspace the host has just taken away (`features`, `hidden-workspaces`). The host
810
+ * decided, so the author is not asked: what the removed workspace holds unapplied is discarded
811
+ * through that surface's own discard (which clears its pending state and its guard), and the
812
+ * move is made at once. A Stay would leave the author inside a workspace the bar no longer
813
+ * offers. Nothing else is discarded: a draft in the inspector or a scenario in the Tests panel,
814
+ * which stay open beside the workspace the author lands on, are not the removed workspace's.
815
+ */
816
+ private leaveRemovedWorkspace;
817
+ private switchWorkspace;
818
+ /**
819
+ * Languages, past the guard, filtered to one component or one header or footer part:
820
+ * where a panel's "Open in Languages" line leads. The surface hears
821
+ * `builder-languages-goto` on itself and filters its texts to it. The focus is kept while the
822
+ * leave guard holds the switch behind its prompt, and while the surface's chunk is not on the
823
+ * page yet (see {@link syncLanguages}); it is dropped only when there is no Languages
824
+ * workspace to go to.
825
+ */
826
+ private openLanguagesFor;
827
+ /** What Languages was asked to show (a component, or a header or footer part), until the surface has heard of it. */
828
+ private languagesFocus;
829
+ private deliverLanguagesFocus;
830
+ /** Form, past the guard, then `then` there: where Languages sends the author to change a thing. */
831
+ private leaveLanguagesFor;
832
+ /**
833
+ * The switch itself, past the guard. From a mode change (`fromMode`) the mode is already right;
834
+ * otherwise the form comes back on the page: a form workspace edits it, and Journeys and PDF
835
+ * open on their overview, the form the page's mode until a card opens a designer.
836
+ */
837
+ private enterWorkspace;
838
+ /** Draws the workspace on the bar and the strip: the current tab, the menu, the items it owns. */
839
+ /**
840
+ * Logic's surface: shown while Logic is on, its chunk loaded the first time, a
841
+ * card with Retry when the load fails. It gets the form's controller and the
842
+ * whole definition (for the journeys' and layouts' rules it lists read-only).
843
+ */
844
+ private syncLogic;
845
+ /**
846
+ * Opens the command palette: every command the builder offers, filtered as you type,
847
+ * each running the same method its control runs. Resolves once it is open; its chunk loads the
848
+ * first time. Focus returns where it was when it closes. Without the `palette` feature
849
+ * it does nothing and resolves at once with `undefined`; `registerCommands` still accepts a
850
+ * source, which is never read.
851
+ */
852
+ openPalette(): Promise<void>;
853
+ /**
854
+ * Adds a host's own commands to the palette (Save, Publish, Sign): read each time it
855
+ * opens. Returns the way to take them out again.
856
+ */
857
+ registerCommands(source: BuilderCommandSource): () => void;
858
+ /**
859
+ * Every command the palette offers now, derived from what the builder has rather than kept by
860
+ * hand: the workspaces, the types the active tree can add, its components, the edits on the
861
+ * selection, the documents, the panels and views, then the host's.
862
+ */
863
+ private paletteCommands;
864
+ /** Whether a designer's workspace is showing its overview: the workspace on, no document's designer on the page. */
865
+ private onOverview;
866
+ /**
867
+ * Puts the form back on the page from a designer. `toOverview`: the workspace stays a designer's,
868
+ * on its overview ("‹ Layouts", the other designer's tab); otherwise reflectMode takes the form's
869
+ * last workspace.
870
+ */
871
+ private bringFormBack;
872
+ /**
873
+ * The bar's "‹ Journeys" / "‹ Layouts", leading the document's pill: shown while a journey's or a
874
+ * PDF layout's designer is on the page, worded for the overview it leads back to.
875
+ */
876
+ private syncOverviewBack;
877
+ /**
878
+ * "‹ Journeys", "‹ Layouts", a phone's back title and the drawer's All journeys / All layouts:
879
+ * the designer's overview, once its unsaved edits are dealt with (the prompt every other way
880
+ * out of a designer asks), so no draft is left behind in a designer no longer on the page.
881
+ */
882
+ private backToOverview;
883
+ /** A switch still activating gives way to a choice made since: it lands nothing when its turn comes. */
884
+ private supersedeActivation;
885
+ /**
886
+ * Ends Try it at the start of a mode, document or workspace switch, so `data-trying`
887
+ * and the form drawn in a designer's place never carry into what comes next.
888
+ */
889
+ private endTrying;
890
+ /**
891
+ * Whether the canvas on the page can be tried: the Form workspace's, or a designer's
892
+ * open document, unless the surface in the sheet's place has no Try it. Not an overview, Logic,
893
+ * Data or Languages, which show no canvas.
894
+ */
895
+ private canvasTryable;
896
+ /** The mode lending `tryIt.pdf` (the PDF designer), on the page or not: Try it's Preview PDF prints through it. */
897
+ private pdfTryMode;
898
+ /** The definition's `pdf` block as a mode holds it, for the fallback Preview PDF on a page with no PDF mode. */
899
+ private definitionPdf;
900
+ /** A phone's sheets go with a workspace switch: the drawer, More, Try it and its results, and the inspector. */
901
+ private putPhoneSheetsAway;
902
+ /** Whether `element` is drawn as far as the markup says: connected, with no `hidden` on it or above it, through shadow roots. */
903
+ private shownDeep;
904
+ /** The element with focus inside the builder, when it is one the author can see. */
905
+ private shownFocus;
906
+ /**
907
+ * After a switch between an overview and a designer, focus that went down with
908
+ * what the author pressed (a card's Open, "‹ Journeys", the back title, the last document's
909
+ * Delete) lands somewhere drawn: the overview's card for the document just left, else its New;
910
+ * a designer's canvas; otherwise the workspace's own control. Focus elsewhere is left alone.
911
+ */
912
+ private rescueFocus;
913
+ /**
914
+ * The Journeys and PDF overviews: shown while that workspace is on with no document
915
+ * open, their chunk loaded the first time; a designer gets "‹ Journeys" or "‹ Layouts" back to
916
+ * its overview on the canvas.
917
+ */
918
+ private syncOverview;
919
+ /**
920
+ * Data's surface: shown while Data is on, its chunk loaded the first time, a card
921
+ * with Retry when the load fails. It edits the form's controller through the selection's draft.
922
+ */
923
+ private syncData;
924
+ /**
925
+ * Languages' surface: shown while Languages is on, its chunk loaded the first time,
926
+ * a card with Retry when the load fails. It edits the form's controller; the other modes' texts
927
+ * (a journey's wording) are listed with it, read only, refreshed on every visit.
928
+ */
929
+ private syncLanguages;
930
+ /**
931
+ * Print's surface: shown while Print is on, its chunk loaded the first time, a card with Retry
932
+ * when the load fails. It edits the form's controller; its samples are its own, never the form's.
933
+ */
934
+ private syncPrint;
935
+ /** What Print draws from: the form's controller, the whole definition, the canvas's answers and renderer set-up, a journey's runtime. */
936
+ private feedPrint;
937
+ /** The definition's `journey` block as the modes hold it. */
938
+ private journeysBlock;
939
+ /** Whether the form opens as a journey (it has one, and does not open as a form). */
940
+ private opensAsJourney;
941
+ /**
942
+ * The print theme the canvas's renderer and the Print workspace draw a print with (the page's
943
+ * own, as `<datum-form>` takes it); unset, the basic one.
944
+ */
945
+ set printTheme(value: PrintTheme | undefined);
946
+ get printTheme(): PrintTheme | undefined;
947
+ /** The catalog the host's translations source answers now, if it has one and it answers. */
948
+ private hostCatalogData;
949
+ private hostCatalogTick;
950
+ /**
951
+ * What Languages draws from: the form's controller, the bar's language, the other modes' texts. The
952
+ * host's catalog is read live from the controller, never copied here, so a source the page swaps
953
+ * takes effect at once.
954
+ *
955
+ * Every setter on the surface repaints its table, and this runs on each `applyWorkspace` while
956
+ * Languages is open (a mode registering, a strip item slotting): handing all six over each time
957
+ * rebuilt the table six times under an author's caret or IME composition. The sources are fixed
958
+ * closures given once, and after that only what changed is set: the flag and the language when they
959
+ * differ from the surface's own, the modes' texts (one repaint) on a visit or when the set of
960
+ * registered modes changed. Edits to the texts themselves reach the surface through the controller.
961
+ */
962
+ private feedLanguages;
963
+ private languagesFed;
964
+ private readonly languagesDefinition;
965
+ private readonly languagesExtraTextsSource;
966
+ private readonly languagesPdfTextsSource;
967
+ /** The other modes' texts Languages lists under Journeys (`BuilderMode.translatableTexts`). */
968
+ private languagesExtraTexts;
969
+ /** The modes' texts Languages lists under PDF (`BuilderMode.languageTexts`). */
970
+ private languagesPdfTexts;
971
+ /**
972
+ * The plugin functions the host wired (`pluginPlatform.formulaFunctions`, a `FormulaFunctionRegistry`,
973
+ * or anything with its `table()` and `signatures()`). The builder holds no plugin platform of
974
+ * its own, so the host hands the registry over; the Logic editor, the inspector, the Form
975
+ * panel and the Variables panel then list these functions with the built-ins and the parser
976
+ * accepts them. Unset: the built-ins only.
977
+ */
978
+ set formulaFunctions(value: FormulaFunctionsSource | undefined);
979
+ get formulaFunctions(): FormulaFunctionsSource | undefined;
980
+ /** Where the "Formula reference" links go; unset: no link is drawn anywhere (the builder has no page of its own to name). */
981
+ set formulaReferenceHref(value: string | undefined);
982
+ get formulaReferenceHref(): string | undefined;
983
+ /** The builder's own language for its words (the text catalog's locale), not the form's. Reaches the Logic surface. */
984
+ set textLocale(value: string | undefined);
985
+ get textLocale(): string | undefined;
986
+ /** A host's translations of the builder's words, by key; absent keys fall back to English. Reaches the Logic surface. */
987
+ set textCatalog(value: BuilderTextCatalog | undefined);
988
+ get textCatalog(): BuilderTextCatalog | undefined;
989
+ /**
990
+ * The builder's words for the shell chrome (the strip, the View and Settings panels, the
991
+ * rail), applied in place: the strip items' names and tooltips, then every element of the
992
+ * wrapper's markup that carries a `data-t` key (its text) or `data-t-attr` (`attr:key;...`).
993
+ * No canvas repaint; the panels and surfaces take the catalog through {@link applyPanelTexts}.
994
+ */
995
+ private applyShellTexts;
996
+ /** The form's controller words its own messages (class-name checks, catalog row labels) in the builder's locale and catalog. */
997
+ private syncControllerWords;
998
+ /** Hands the builder's locale and catalog to the panels and surfaces that draw their own words. */
999
+ private applyPanelTexts;
1000
+ /** Hands the wired functions and the reference link to every panel that writes or lists formulas. */
1001
+ private applyFormulaFunctions;
1002
+ /** The Variables panel's share of {@link applyFormulaFunctions}: the functions it lists, the reference link, its words. */
1003
+ private feedVariablesFunctions;
1004
+ /**
1005
+ * The whole definition, journeys and PDF layouts included, for the rules Logic lists
1006
+ * read-only. `<datum-form-builder>` sets it; without it Logic lists the form's rules alone.
1007
+ */
1008
+ set logicDefinition(source: (() => FormDefinition | undefined) | undefined);
1009
+ /**
1010
+ * The component rail (the left rail): up to {@link RAIL_SIZE} of the
1011
+ * types the form offers, in {@link RAIL_ORDER}, then All components. Form on the form only;
1012
+ * a PDF layout or a journey has its own palette.
1013
+ */
1014
+ private renderAddRail;
1015
+ /** A rail button's click: the type added after the selection (or at the end), or the palette. */
1016
+ private onRailClick;
1017
+ /**
1018
+ * A rail button dragged: the same drag the palette's rows start, so a type can be dropped where
1019
+ * it belongs instead of added after the selection. The rail shows the palette's glyphs, and an
1020
+ * author who has dragged from the palette expects the rail to drag too.
1021
+ */
1022
+ private onRailDragStart;
1023
+ private onRailKey;
1024
+ private roveRail;
1025
+ private applyWorkspace;
1026
+ private reflectWorkspace;
1027
+ /** The controller behind the panels right now: the form's, or the active mode's (its selected document's). */
1028
+ get activeController(): BuilderController;
1029
+ /** Whether the bar shows the document tabs. Default `true`; off, the page is switched through the API alone. */
1030
+ get showModeSwitch(): boolean;
1031
+ set showModeSwitch(value: boolean);
1032
+ /**
1033
+ * Modes whose tabs the bar leaves out — `["form"]` for a shell that edits only a mode's
1034
+ * documents (the standalone PDF designer). The mode stays registered and reachable by API.
1035
+ */
1036
+ get hiddenModeIds(): string[];
1037
+ set hiddenModeIds(value: string[]);
1038
+ /**
1039
+ * Whether the builder covers the whole browser window, over the page it is
1040
+ * embedded in; reflects the `full-window` attribute. The bar's button toggles it unless the
1041
+ * host sets `no-full-window`; leaving full window puts the builder back in its place.
1042
+ */
1043
+ get fullWindow(): boolean;
1044
+ set fullWindow(value: boolean);
1045
+ /**
1046
+ * The builder's own colour scheme: `"dark"` lays the studio look's dark palette
1047
+ * ({@link DATUM_DARK_BUILDER_THEME}) over a host `theme` (its colours win, the host's type,
1048
+ * space and radii stay) on the shell and every panel; `"light"` is the host's theme or the
1049
+ * built-in look. Reflects the `scheme` attribute; without one, the remembered choice, else a
1050
+ * host `theme` that is the dark builder theme (`datum-dark`) as the dark scheme. The ⋮ menu's Dark mode switch (and
1051
+ * the drawer's) changes it and remembers the choice for this origin, which a connect, or a
1052
+ * removal of the attribute, reads back; a page that sets the attribute decides for itself.
1053
+ * `no-scheme-toggle` takes the switch off the menus.
1054
+ */
1055
+ get scheme(): BuilderScheme;
1056
+ /** The remembered choice as read at connect (or when the attribute was removed); never read live. */
1057
+ private rememberedScheme;
1058
+ set scheme(value: BuilderScheme);
1059
+ private schemeToggleOffered;
1060
+ /**
1061
+ * The vars the shell writes: while dark, the dark palette over the host's theme (its type,
1062
+ * space and radii survive, every colour is the dark one); else the host's theme, else
1063
+ * (undefined) the built-in light look. A host theme that is the dark builder theme has the
1064
+ * built-in look as its light half.
1065
+ */
1066
+ private themeVars;
1067
+ /** The scheme `builder-scheme-change` last reported; `undefined` before the shell is up. */
1068
+ private schemeAnnounced;
1069
+ /** The tokens, the menus' switches and the event, after `scheme` or `no-scheme-toggle` changes. */
1070
+ private syncScheme;
1071
+ /** Dark mode from a menu: the other scheme, remembered for this origin. */
1072
+ private toggleScheme;
1073
+ /** The side panel Try it put away, to open again on Back to editing. */
1074
+ private panelBeforeTrying;
1075
+ /** The window's own scroll, held while the builder covers it, given back when it leaves. */
1076
+ private heldDocumentOverflow;
1077
+ /** The state `builder-full-window-change` last reported; `undefined` before the first sync. */
1078
+ private fullWindowAnnounced;
1079
+ /** The bar's button, the window's scroll and the event, after `full-window` changes. */
1080
+ private syncFullWindow;
1081
+ /**
1082
+ * The page under the builder must not scroll behind it: in full window (a wheel at the end of
1083
+ * a panel's scroll), and under a phone's sheet in the contained layout (a swipe that misses
1084
+ * the sheet), where the page is a host's and scrolls. The page layout is
1085
+ * the page, so it never scrolls under its own sheet.
1086
+ */
1087
+ private syncDocumentLock;
1088
+ /** See {@link DatumBuilderLayout}. Reflects the `layout` attribute; anything but `"contained"` is the page layout. */
1089
+ get layout(): DatumBuilderLayout;
1090
+ set layout(value: DatumBuilderLayout);
1091
+ /** The panel the activity strip has open beside the canvas; `undefined` while the side column is put away. */
1092
+ get panel(): DatumBuilderPanel | undefined;
1093
+ set panel(value: DatumBuilderPanel | undefined);
1094
+ /**
1095
+ * The form workspace opening this panel would move the page to, or `undefined` when the panel
1096
+ * opens where the author is (the workspace owns it, or a designer is on the page). The move
1097
+ * asks the leave guard, so a caller that must not raise the author's prompt (the assistant's
1098
+ * open tool) asks this first.
1099
+ */
1100
+ panelWorkspaceTarget(value: DatumBuilderPanel | undefined): BuilderWorkspace | undefined;
1101
+ /**
1102
+ * The key the shell remembers its panels under: the strip's open panel, the two
1103
+ * column widths and whether the inspector is folded, kept in the page's storage and put
1104
+ * back when a shell with the same key next connects. `undefined` (the default) remembers
1105
+ * nothing. Reflects `persist-panels`; an empty value means the key `default`.
1106
+ */
1107
+ get persistPanels(): string | undefined;
1108
+ set persistPanels(value: string | undefined);
1109
+ /** Whether the shell is narrow: under 900px the side column and the inspector open as drawers over the canvas. */
1110
+ get narrowLayout(): boolean;
1111
+ set options(value: DatumBuilderOptions);
1112
+ get options(): DatumBuilderOptions;
1113
+ /** The icon set the shell and its panels draw with right now. */
1114
+ private iconSet;
1115
+ /** Redraws the shell's own glyphs from the current set, and writes the set's CSS beside them. */
1116
+ private paintIcons;
1117
+ /**
1118
+ * See {@link DatumBuilderOptions.icons}. Set here rather than through `options`, a new set
1119
+ * repaints the chrome without re-applying the other options (and the tree they seed).
1120
+ */
1121
+ set icons(value: IconSet | undefined);
1122
+ get icons(): IconSet | undefined;
1123
+ /** Hands the shell's icon set to its panels, whichever mode is on the page. */
1124
+ private applyPanelIcons;
1125
+ /**
1126
+ * Applies a builder theme's tokens as `--db-*` CSS custom properties on the wrapper and its
1127
+ * panels (see {@link buildThemeStyleVars}). Set to `undefined` to revert to each panel's
1128
+ * built-in defaults.
1129
+ */
1130
+ set theme(value: BuilderThemeDefinition | undefined);
1131
+ get theme(): BuilderThemeDefinition | undefined;
1132
+ /**
1133
+ * The design-system binding the canvas draws the form with (see
1134
+ * {@link DatumBuilderOptions.binding}): a binding, a registered id, or nothing for Datum's.
1135
+ */
1136
+ set binding(value: LiveBinding | string | undefined);
1137
+ get binding(): LiveBinding | string | undefined;
1138
+ /** The design system's files the canvas draws with (see {@link DatumBuilderOptions.assets}). */
1139
+ set assets(value: LiveAssets | undefined);
1140
+ get assets(): LiveAssets | undefined;
1141
+ /** Resolves `select` options in the canvas preview. */
1142
+ set dataSourceResolver(value: DataSourceResolver | undefined);
1143
+ get dataSourceResolver(): DataSourceResolver | undefined;
1144
+ /** The host's wiring-time data sources — the same set it hands the renderer. */
1145
+ set dataSources(value: DataSourceSet | undefined);
1146
+ get dataSources(): DataSourceSet | undefined;
1147
+ get value(): ComponentNode;
1148
+ /**
1149
+ * The committed `FormDefinition.localization` the builder has authored (supported locales,
1150
+ * default locale) — persist it on the definition beside {@link value}.
1151
+ */
1152
+ get localization(): LocalizationConfiguration | undefined;
1153
+ /**
1154
+ * The form's tests: scenarios in the test language, one `test "…"` block each. Like
1155
+ * `localization` it is an *initial* value the host sets with the form and reads back, on each
1156
+ * `builder-change`, to persist on the definition (`FormDefinition.tests`) beside {@link value}.
1157
+ * Setting it announces nothing and adds no undo step; the Tests panel edits it afterwards, each
1158
+ * Apply, Accept new behaviour or rename a step of the history.
1159
+ */
1160
+ get tests(): FormTestConfiguration | undefined;
1161
+ set tests(value: FormTestConfiguration | undefined);
1162
+ /**
1163
+ * The committed {@link FormIdentity} the builder has authored (form id, version, schema
1164
+ * version) — persist it on the definition beside {@link value}. `undefined` when the host
1165
+ * gave the builder no identity to edit.
1166
+ */
1167
+ get identity(): FormIdentity | undefined;
1168
+ /** Undoes on the mode the author is looking at (through its history first: {@link historyStep}). */
1169
+ undo(): void;
1170
+ redo(): void;
1171
+ /**
1172
+ * Every Undo and Redo of the builder comes here: the bar's
1173
+ * buttons, the canvas's and the outline's keys, the command palette, {@link undo} and
1174
+ * {@link redo}, and the agent's tools. The mode on the page is asked first
1175
+ * (`BuilderMode.history`): while a journey's Step view is up its one history over the form
1176
+ * and the shown journey takes back the last thing done, whichever controller it landed on.
1177
+ * Answering false (no such history, or nothing of its own left), `controller` steps its own
1178
+ * history, as before. `controller` defaults to the mode's on the page. Another one (the
1179
+ * form's, from a canvas trying the form), or any with `own` (the agent's tools, which take
1180
+ * back their own steps and never the person's), is stepped through the mode's history only by
1181
+ * the entry holding that controller's own step on top, with what was done with it on the
1182
+ * other controller (a rename and the journey's follow-up).
1183
+ */
1184
+ historyStep(direction: "undo" | "redo", controller?: BuilderController, options?: {
1185
+ own?: boolean;
1186
+ }): void;
1187
+ /**
1188
+ * The one function every surface's Undo and Redo keys step through: the outline, the fields panel,
1189
+ * the canvas and the lazy Print and Languages surfaces (set where each is fed). A surface that
1190
+ * handles Ctrl or Cmd+Z itself calls it, so a key pressed in any of them is the bar's Undo.
1191
+ */
1192
+ private readonly surfaceHistoryStep;
1193
+ /** Whether {@link historyStep} on the mode on the page would step: its history's say first, else its controller's. */
1194
+ canHistoryStep(direction: "undo" | "redo"): boolean;
1195
+ /**
1196
+ * The host's translation catalog: a function answering it as it stands, asked when
1197
+ * the builder needs it. The Languages workspace marks the texts the page's catalog overrides
1198
+ * and shows them read-only. The catalog stays host data; the builder never writes it.
1199
+ */
1200
+ set translationsSource(value: (() => TranslationsCatalogSource) | undefined);
1201
+ get translationsSource(): (() => TranslationsCatalogSource) | undefined;
1202
+ /**
1203
+ * The bar's file actions (see {@link BuilderFileActions}): New, Open and Download lead the
1204
+ * bar, a button for each action supplied and none for the others; unset, the bar shows none.
1205
+ * Each goes through the unsaved-edits guard of the document on the page
1206
+ * (`activeController.requestLeave`); New and Open ask before replacing the form (New does
1207
+ * not when the form has nothing to lose: no components, no settings on the form, no
1208
+ * languages, and the host's `isEmpty` agreeing), a file Open refuses shows its message on the bar,
1209
+ * and each completed action is reported as a `builder-file-action` event.
1210
+ */
1211
+ set fileActions(value: BuilderFileActions | undefined);
1212
+ get fileActions(): BuilderFileActions | undefined;
1213
+ /**
1214
+ * What the whole definition would weigh with `extraBytes` more in it, against the most a load
1215
+ * accepts: how the inspector asks before it embeds a file picked into a `file` control (an ICC
1216
+ * profile) as base64. `<datum-form-builder>` sets it, since it alone sees every side of the
1217
+ * definition. Unset, nothing is asked.
1218
+ */
1219
+ get embedBudget(): ((extraBytes: number) => DefinitionBudget | undefined) | undefined;
1220
+ set embedBudget(value: ((extraBytes: number) => DefinitionBudget | undefined) | undefined);
1221
+ private syncEmbedBudget;
1222
+ /**
1223
+ * The longest form file the bar's Open reads, in bytes (2 MiB unless set, the cap the elements
1224
+ * hold a definition to; `max-definition-bytes` on `<datum-form-builder>` sets it here). A longer
1225
+ * file is refused by its size before any of it is read, so it never reaches `fileActions.open`
1226
+ * or a parser. `undefined` puts the 2 MiB back; anything but a whole number above 0 is a RangeError.
1227
+ */
1228
+ get maxDefinitionBytes(): number;
1229
+ set maxDefinitionBytes(value: number | undefined);
1230
+ /**
1231
+ * Every text of the definition that has translations: the form's components' and its header
1232
+ * and footer parts' (`BuilderController.translatableTexts`), then each registered mode's, in
1233
+ * the bar's order — the journeys' names, wording and page titles
1234
+ * (`BuilderMode.translatableTexts`). Each row carries its address in the
1235
+ * definition's `translations` map.
1236
+ */
1237
+ translatableTexts(): TranslatableText[];
1238
+ /** The host's own panels in the side column, each naming the strip item that opens it. */
1239
+ private hostPanels;
1240
+ /**
1241
+ * The host's own strip items, in the order it slotted them: what is assigned to the strip's
1242
+ * slot naming a panel in `data-panel`. They come after the shell's own, in the keyboard's
1243
+ * walk and in the selected state, as they do on screen.
1244
+ */
1245
+ /** Marks the host's strip items against the open panel, as {@link setPanel} marks the shell's. */
1246
+ private markHostStripItems;
1247
+ private hostStripItems;
1248
+ /**
1249
+ * The net change to the form's languages since it was loaded or last saved: what a host
1250
+ * keeping a translation catalog applies to it when it saves. The File menu's
1251
+ * Save hands the same to `fileActions.save`; a host saving some other way reads it here,
1252
+ * applies it, then calls {@link markLocalesSaved}.
1253
+ */
1254
+ localeChangesSinceSave(): LocaleChanges;
1255
+ /** The languages as they stand are the baseline: call it once the host has saved the form (and applied {@link localeChangesSinceSave}). */
1256
+ markLocalesSaved(): void;
1257
+ private buildDom;
1258
+ /**
1259
+ * The divider between the leading controls and undo/redo shows only when there is
1260
+ * something before it: the file actions, or whatever the host slotted.
1261
+ */
1262
+ private syncHostSeparator;
1263
+ /** Which of the file actions the host supplied: each has a button on the bar, the rest none. */
1264
+ private suppliedFileActions;
1265
+ private hasFileActions;
1266
+ /** Shows a button for each file action supplied, and the group only with one; a group put away takes its message and its question with it. */
1267
+ private syncFileActions;
1268
+ private fileMenuEl;
1269
+ private fileMenuItems;
1270
+ private openFileMenu;
1271
+ private closeFileMenu;
1272
+ /** The menu's keys: the arrows, Home and End walk the items; Escape and Tab put it away. */
1273
+ private onFileMenuKeyDown;
1274
+ /**
1275
+ * Save: past the unsaved-edits guard (an edit still in a panel is not in the form yet), the
1276
+ * host's save. One at a time: while a save the host returned is pending, the item says
1277
+ * "Saving…" and another is not started.
1278
+ */
1279
+ private fileSave;
1280
+ /**
1281
+ * The host's save itself, past whatever guard its caller applied: the person's {@link fileSave}
1282
+ * (behind the unsaved-edits prompt) and an assistant's {@link requestSave} (which never raises
1283
+ * one) share it, so both go through the one "Saving…" latch, mark the languages saved, tell the
1284
+ * host (`builder-file-action`) and show a failure beside the File menu alike. Answers how it
1285
+ * ended; the person's path ignores the answer. `trigger` reaches the host's save and the event.
1286
+ */
1287
+ private runSave;
1288
+ /**
1289
+ * Print holds a typed value for a moment before it writes it to the form and has no leave guard to
1290
+ * ask first, so a file action that reads or replaces the form (Save by key, an assistant's save,
1291
+ * Download, New, Open) lets it write now: the form it reads is the one the author sees.
1292
+ */
1293
+ private flushPrintWrites;
1294
+ /** A save the host threw or rejected: its words beside the File menu, and in the answer. */
1295
+ private saveFailed;
1296
+ private saving;
1297
+ /**
1298
+ * Save's item while the host's save is pending: busy, and named so. An assistant's save
1299
+ * (`trigger: "agent"`) never disables the item while the person's focus is on it (an
1300
+ * assistant does not take the person's focus): a disabled button drops focus to the page, so it
1301
+ * is `aria-disabled` then, which says the same, and nothing starts a second save while `saving`
1302
+ * ({@link fileSave} and {@link runSave} both check it). The person's own Save has put the menu
1303
+ * away and moved focus to its button before this runs.
1304
+ */
1305
+ private setSaving;
1306
+ /** Binds the file actions' controls in freshly built markup: the group's buttons, the file picker, the confirmation. */
1307
+ private wireFileActions;
1308
+ /** A click in the file actions' group: a file button, or the message's Dismiss. Matched along the path, like the bar's other buttons. */
1309
+ private onFileActionsClick;
1310
+ /**
1311
+ * New: past the unsaved-edits guard, the host's empty form in place of this one — asked
1312
+ * first, unless the form has nothing to lose (see {@link formIsEmpty} and the host's
1313
+ * `isEmpty`).
1314
+ */
1315
+ private fileNew;
1316
+ /**
1317
+ * Whether the form as committed has nothing a New would lose: no component, nothing set on
1318
+ * the form itself (title, header and footer), no languages. A New then asks nothing. A setting
1319
+ * cleared on the Form panel can stay behind as a key with no value, which is nothing set.
1320
+ * The one Submit button File > New seeds, untouched, is not a component to lose: a New straight
1321
+ * after a New asks nothing (the seed is the same form).
1322
+ */
1323
+ private formIsEmpty;
1324
+ /** Open: the file picker, opened here, inside the author's click — a picker opens on a gesture only. */
1325
+ private fileOpen;
1326
+ private onFileChosen;
1327
+ /**
1328
+ * Reads the chosen file and hands it to the host to check. A refusal shows on the bar; a
1329
+ * file the host accepts goes, past the unsaved-edits guard and a confirmation, in place of
1330
+ * this form.
1331
+ */
1332
+ private openFile;
1333
+ /** Download: past the unsaved-edits guard (an edit still in the inspector is not in the file yet), the host's file as a download. */
1334
+ private fileDownload;
1335
+ /**
1336
+ * A file action completed: any old message goes, and the host hears which one. After an
1337
+ * assistant's save the message stays while the person's focus is in it (its Dismiss): hiding it
1338
+ * would drop that focus to the page, and their Dismiss puts it away.
1339
+ */
1340
+ private fileActionDone;
1341
+ /**
1342
+ * Shows a message beside the file actions (replacing any before it), or with `undefined` puts
1343
+ * it away. `source` is the selector of the file button it is about, which Dismiss hands focus
1344
+ * back to. The line is cut short on the bar, so its title carries the whole of it; the alert
1345
+ * reads the whole of it either way.
1346
+ */
1347
+ private showFileError;
1348
+ private fileConfirmEl;
1349
+ /**
1350
+ * Asks before a file action replaces the form, in a modal dialog in the look of the panels'
1351
+ * unsaved-changes prompt; `run` runs on its OK. Focus starts on Cancel: the destructive
1352
+ * answer takes a deliberate move. A newer question replaces one still up.
1353
+ */
1354
+ private askFileConfirm;
1355
+ /** The confirmation's answer: it goes away, focus goes back to the button that asked, and OK runs the action. */
1356
+ private answerFileConfirm;
1357
+ private closeFileConfirm;
1358
+ /** Subscribes the bar to the controller on the page, so its controls follow that controller's state. */
1359
+ private bindBar;
1360
+ private unbindBar;
1361
+ /**
1362
+ * Repaints the bar's controls from the active controller: undo/redo enablement follows its
1363
+ * history, the width picker and readout the sheet (put away while the tree fixes the
1364
+ * width), the theme picker the host's themes (put away with none to pick from), the locale
1365
+ * switcher the form's locales (put away on another mode's tree, whose faces are built for
1366
+ * the host's locale), and the show-hidden toggle its state.
1367
+ */
1368
+ /** The View panel's Form chrome, from the form controller's preview chrome; the frame list from the theme on the canvas. */
1369
+ private syncPreviewChrome;
1370
+ /** The View panel's Form chrome, read back into the preview chrome: only what differs from the page's defaults is set. */
1371
+ private readPreviewChrome;
1372
+ /**
1373
+ * The Settings panel's data sources: every source the form's choices name, the host's own and
1374
+ * the simulated ones, each saying where its list comes from, with a box to simulate one.
1375
+ */
1376
+ private syncSettingsSources;
1377
+ /**
1378
+ * The Settings panel's Submitting in Try it, drawn from the form's controller. A box
1379
+ * whose text already says the value is left alone, so a focused one keeps its caret.
1380
+ */
1381
+ private syncTrySubmission;
1382
+ /** A Submitting in Try it control changed: its value goes to the form's controller. */
1383
+ private readTrySubmission;
1384
+ /**
1385
+ * The Settings panel's Host values, drawn from the form's controller: the box shows the values
1386
+ * in use, except while it is focused or holds a problem (what is typed stays until it is
1387
+ * applied), and the problem sits under it. The line saying the form reads host values shows
1388
+ * only when a rule or calculation does (a scan of the rules' text, redone when it changes).
1389
+ */
1390
+ private syncHostValues;
1391
+ /**
1392
+ * The Host values box was changed (on blur, never per keystroke): empty
1393
+ * means none; a JSON object goes through `plainHostContext` (the page property's own rules) to
1394
+ * the controller; text that is not JSON, or JSON that is not an object, is said under the box
1395
+ * and the last good values stay in use. Never an edit of the form.
1396
+ */
1397
+ private readHostValues;
1398
+ /** A Settings panel source button: open the box, use its list, cancel, or stop simulating. */
1399
+ private runSourceAction;
1400
+ /** The bar's Undo and Redo, enabled as {@link canHistoryStep} answers (the mode's history first). */
1401
+ private syncHistoryButtons;
1402
+ /** The mode whose `subscribeHistory` is heard, and the unsubscribe. */
1403
+ private historySubscription;
1404
+ /**
1405
+ * Hears the mode on the page say its history moved, so the bar's Undo and Redo follow a step
1406
+ * made on a controller the bar is not bound to (a form field edited from a journey's Step
1407
+ * view); the previous mode is no longer heard.
1408
+ */
1409
+ private listenModeHistory;
1410
+ private syncBar;
1411
+ /**
1412
+ * The Settings language list: the form's supported languages, and, when the form's own
1413
+ * language (`defaultLocale`, else "en") is not one of them, that language first as "Form
1414
+ * default (English)". A form with a French translation alone declares only "fr", and the
1415
+ * select the canvas shows English in would otherwise be blank, or have no way back from French.
1416
+ * Empty while the form declares no other language (the section says so instead).
1417
+ */
1418
+ private settingsLocaleOptions;
1419
+ private onChange;
1420
+ /**
1421
+ * The View panel's binding picker, chosen: the form's controller draws the canvas with the
1422
+ * binding (`undefined`: the host's own, else Datum's), and the host hears which (`""` for
1423
+ * that). Shared with {@link setBindingForAgent}. Nothing is written into the form or its PDF
1424
+ * layouts: the choice is how the canvas shows the form.
1425
+ */
1426
+ private pickBinding;
1427
+ private onClick;
1428
+ private onKeyDown;
1429
+ private onFocusOut;
1430
+ /** Each of SHELL_PANELS with the element it shows. */
1431
+ private shellPanelElements;
1432
+ /**
1433
+ * The author's own move between side panels (a strip item, the rail's All components): a panel
1434
+ * that edits the root's draft — Form, Header & footer — asks about its unapplied edits before
1435
+ * it goes, as the inspector does when its selection changes.
1436
+ */
1437
+ private switchPanel;
1438
+ private setPanel;
1439
+ /**
1440
+ * Whether the form has nothing to add to yet: no component, or only the Submit
1441
+ * button File > New seeds (an untouched one, id and words as seeded). A form with anything
1442
+ * else is one the author is working on, and the palette has no business over its canvas.
1443
+ */
1444
+ private formHasNoComponents;
1445
+ /**
1446
+ * Puts the Components palette as the shell's own rule has it: open for a form with no
1447
+ * components, shut for one with some, and never the other way over a choice the author made.
1448
+ * Run as the shell comes up and whenever a form is put in place (File > Open and New, a host's
1449
+ * definition). A phone or narrow shell keeps its drawers put away. Not written to `persist-panels`.
1450
+ */
1451
+ private settlePalette;
1452
+ /** A click on the canvas puts away a palette the shell opened itself; one the author opened stays. */
1453
+ private dismissAutoPalette;
1454
+ /**
1455
+ * Hands a scenario's step to the canvas for Show me, or ends the showing. The canvas method is
1456
+ * the canvas role's (`showScenario`); until it exists the call is a no-op, and ending a showing
1457
+ * asks nothing of a canvas that never showed one.
1458
+ */
1459
+ private showScenarioOnCanvas;
1460
+ /**
1461
+ * What the Tests panel offers that another feature owns: Show me needs Try it's step control
1462
+ * (the `try-it` feature), Open rule the Logic workspace. Called when the panel is
1463
+ * wired and whenever the features move.
1464
+ */
1465
+ private syncTestsPanelFeatures;
1466
+ /**
1467
+ * Record from the Tests drawer in Logic, Data or an overview brings the form's canvas back
1468
+ * first, past the unsaved-edits guard, as Show me does: Try it on a canvas that is put
1469
+ * away would record over a form nobody can see. A switch the prompt holds back starts nothing
1470
+ * (the throw is the panel's "could not start").
1471
+ */
1472
+ private readonly recordOnCanvasForTests;
1473
+ /** Whether the Tests panel is recording (its `recording` getter); false before its chunk is wired. */
1474
+ private testsPanelRecording;
1475
+ private readonly assertSnapshotForTests;
1476
+ /** The canvas's own cheap answer to "would `assertSnapshot` give a form now" (its `assertReady`), read through a cast. */
1477
+ private readonly assertReadyForTests;
1478
+ /** The canvas as the Tests panel's Record and Assert this see it; absent until the canvas role's methods land. */
1479
+ private recordingCanvas;
1480
+ /** Whether the workspace on the page puts the canvas away (the styles' `display: none` for these). */
1481
+ private canvasPutAway;
1482
+ /** Listens to the panel's events on its host, which outlives the upgrade; the markup redraw makes a new host and listens again. */
1483
+ private wireTestsPanelHost;
1484
+ /**
1485
+ * The count on the Tests strip item: tests failing, erroring or not parsing, as the panel last
1486
+ * said. Drawn as the workspace tabs draw theirs (a danger chip, hidden from a screen reader and
1487
+ * put into the item's name in words) and gone at zero.
1488
+ */
1489
+ private applyTestsCount;
1490
+ /**
1491
+ * Open rule: Logic comes up on the component's rule. Logic is a lazy
1492
+ * surface, so the request waits in {@link pendingRuleOpen} until the surface is there. A switch
1493
+ * the unsaved-edits prompt holds back drops the request: it should not fire later, when the
1494
+ * author opens Logic for another reason.
1495
+ */
1496
+ private openRuleInLogic;
1497
+ private flushPendingRuleOpen;
1498
+ /**
1499
+ * Opens the Tests panel (the drawer of the workspace the author is in) and, once its chunk is
1500
+ * wired, calls `call` on it: the Logic editor's Pinned-by buttons land here.
1501
+ * Nothing happens where the Tests panel is off; a drawer switch the unsaved-edits prompt holds
1502
+ * back drops the call, which should not fire later when the panel opens for another reason.
1503
+ */
1504
+ private withTestsPanel;
1505
+ /**
1506
+ * Feeds the Logic surface's "Pinned by" line. With no scenarios there is
1507
+ * nothing to read, so the surface gets an answer of "none" without the Tests chunk being
1508
+ * fetched (its Write a test is then the way in); with scenarios the chunk is loaded and
1509
+ * the pins are the coverage of the committed tree by the parsed entries, memoised by the
1510
+ * controller change and the tests block. Until the chunk answers the surface draws no line.
1511
+ * Recomputed only while Logic is the workspace, since nothing else shows the line.
1512
+ */
1513
+ private feedTestsPins;
1514
+ /** The pins of a tests block over the committed tree, through the chunk's coverage; `undefined` when the chunk cannot answer. */
1515
+ private testsPinsFrom;
1516
+ /**
1517
+ * A rename in the form is followed in the scenarios that name the field:
1518
+ * the tests panel's chunk rewrites the sources, in the rename's own step of the history. The
1519
+ * chunk loads here when it has not (a form with scenarios renames before the panel was ever
1520
+ * opened); a failed load is the host's datum-error and the scenarios stay as they were. Each
1521
+ * rename waits for the one before it, so two quick renames both land.
1522
+ */
1523
+ private followRenameInTests;
1524
+ /**
1525
+ * The scenarios' value paths follow a move of the data as a rename's ids do: queued
1526
+ * behind any rename before it, every move of the edit applied as one map, and the rewrite joined
1527
+ * to the edit's step of the history while nothing else was done since, or held for its Redo
1528
+ * while the edit is undone. A step that also renamed the component is the rename's, so its ids
1529
+ * are the step's key.
1530
+ */
1531
+ private followDataMovedInTests;
1532
+ /**
1533
+ * Where each language the form was loaded (or last saved) with stands now: its code then, to
1534
+ * its code now. A change to a language's code is the difference between this and the
1535
+ * controller's lineage, so a rename and the undo of one are both seen, and a save, which makes
1536
+ * the codes as they stand the baseline, starts the map over.
1537
+ */
1538
+ private localeTargets;
1539
+ /** The scenarios follow every language whose code changed since the last change, in `given locale`. */
1540
+ private followLocaleRenames;
1541
+ /** The same queue the component renames wait in, so a language rename and a component rename land in order. */
1542
+ private queueLocaleRename;
1543
+ /**
1544
+ * A page or journey id the Journeys mode renamed is followed in the scenarios the same way a
1545
+ * component's is: `page` refs for a page, `journey` refs for a journey.
1546
+ * The mode tells the shell itself with a bubbling `builder-journey-rename` event, and the shell's
1547
+ * listener comes here, so no host forwards anything. The method stays public for a mode mounted
1548
+ * outside the builder's tree (its event never reaches the shell): that host forwards the mode's
1549
+ * `onChange` detail (`reason` `"page-rename"` or `"journey-rename"`, `renamed` the ids). A host that
1550
+ * forwards while the mode is in the tree renames twice, and the second finds nothing to rewrite.
1551
+ * Any other detail is ignored, so a host may forward every change. A detail whose rename the mode
1552
+ * did not make in this form is the host's to filter.
1553
+ */
1554
+ followJourneyChange(detail: {
1555
+ reason?: string;
1556
+ renamed?: {
1557
+ journeyId?: unknown;
1558
+ from?: unknown;
1559
+ to?: unknown;
1560
+ } | undefined;
1561
+ } | undefined): void;
1562
+ /**
1563
+ * One rename's rewrite of the scenarios, queued behind the one before it: the chunk loads if it
1564
+ * has not, and a form opened meanwhile drops the follow. A component's rename takes the rewrite
1565
+ * into its own step of the history while nothing else was done since (one Undo puts the id and
1566
+ * the scenarios back together), writes nothing while the rename is undone (its Redo brings the
1567
+ * rewrite back, {@link followInStep}), and is a step of its own after other edits; a page's or
1568
+ * a journey's is always a step of its own.
1569
+ */
1570
+ private queueTestsRename;
1571
+ /**
1572
+ * Writes a follow-up that landed a moment after its step (`write`: the scenarios rewritten once
1573
+ * their chunk is in) into that step of the history, named by `key` (the rename's ids, or the
1574
+ * first value path the edit moved). The controller drops a follow-up whose step was undone
1575
+ * meanwhile, so the scenarios never name an id or a path the form no longer has and the Redo
1576
+ * stays; the follow is kept to run again (`again`, against the scenarios as they are then) when
1577
+ * that step is redone.
1578
+ */
1579
+ private followInStep;
1580
+ /** A Redo put a step back: the follow-ups dropped while it was undone run now, named by the ids or the first path it moves. */
1581
+ private followRedone;
1582
+ private lazyPanelHost;
1583
+ /** The upgraded element of a lazy panel, once its chunk is wired. */
1584
+ private lazyPanelElement;
1585
+ /**
1586
+ * Makes a lazy strip panel's body ready: at once when its chunk is already on the
1587
+ * page, else fetched, its element showing the loading card meanwhile and the failure card
1588
+ * with Retry when the fetch fails. Resolves once the panel is wired (or the load failed, or
1589
+ * the markup was redrawn while it was in flight: the new markup asks for itself). One load
1590
+ * per panel at a time; the loaders fetch each chunk once per page.
1591
+ */
1592
+ private ensureLazyPanel;
1593
+ private focusIsIn;
1594
+ /**
1595
+ * Adopts a loaded panel; a throw (a panel setter, its resume paint) is the failure card and a
1596
+ * datum-error, never an unhandled rejection. The focus the card held moves into the panel.
1597
+ */
1598
+ private adoptLazyPanelSafely;
1599
+ private lazyPanelFailed;
1600
+ /** The alert beside a panel that wired but threw: shown while that panel is the open one, gone with the markup. */
1601
+ private showWiredPanelFailure;
1602
+ private readonly lazyPanelNotes;
1603
+ /** Keeps a wired panel's failure note in step with which panel is open. */
1604
+ private syncLazyPanelNotes;
1605
+ /**
1606
+ * Upgrades a lazy panel's element in the side column and feeds it everything the shell would
1607
+ * have set on it, in one paint: hidden while it upgrades, so its connect paints
1608
+ * nothing, then the properties under suspendPaints, its own hidden state put back last.
1609
+ */
1610
+ private adoptLazyPanel;
1611
+ /**
1612
+ * The inspector column follows the selection: it is there when a component is
1613
+ * selected and gone — no stub, no grip, the canvas taking the width — when none is. Its own
1614
+ * `collapsed` state is left alone, so an author who folded it gets it back folded.
1615
+ *
1616
+ * The root is not an inspector subject. Selecting it (the outline's first row, the canvas's
1617
+ * root) opens the Form panel instead, so form-level settings are edited in one place.
1618
+ */
1619
+ private syncInspector;
1620
+ /** Opens the inspector; Narrow shows one drawer at a time, so the side drawer goes. */
1621
+ private openInspector;
1622
+ /** Folds or opens the inspector from the shell's side (its stub's button goes through panel-toggle). */
1623
+ private foldInspector;
1624
+ /** Whether the shell is a phone: under 768px of its own box, one top row, a bottom bar and sheets. */
1625
+ get phoneLayout(): boolean;
1626
+ /**
1627
+ * Whether the host's definition is saved, for the menu drawer's state line on a phone.
1628
+ * `<datum-form-builder>` forwards its own `dirty`; unset, the line says nothing.
1629
+ */
1630
+ set saveState(value: "saved" | "unsaved" | undefined);
1631
+ get saveState(): "saved" | "unsaved" | undefined;
1632
+ /**
1633
+ * The bar's cue that the form is unsaved: a dot and its words, in view (the tooltip
1634
+ * repeats them), drawn here from `saveState` rather than slotted in by the host element, so
1635
+ * the host's `history` slot stays the page's own (a phone's drawer lists that slot's items under
1636
+ * "From the page"). Shown only while the state is `"unsaved"`.
1637
+ */
1638
+ private syncSaveCue;
1639
+ /** Turns the phone tier on or off: the parts are told, the host's bar slots move, the sheets put away. */
1640
+ private setPhone;
1641
+ /** Every part with a look of its own reads the tier from its own attribute (its shadow root cannot see the shell's). */
1642
+ private applyPhoneToParts;
1643
+ /**
1644
+ * The host's bar controls (the slots) and a mode's own actions move into the menu
1645
+ * drawer on a phone, a marker left where each stood, and back again when the shell widens.
1646
+ * The slots move, not what is slotted: the host's elements stay where the host put them.
1647
+ */
1648
+ private moveHostSlots;
1649
+ /** The drawer's "From the page" section shows only when the host put something in one of its slots. */
1650
+ private syncMenuHostSection;
1651
+ /** The count a workspace shows: the reported problems, and for Data the form's data-key clashes. */
1652
+ private workspaceCount;
1653
+ /** Brings the phone's parts up to date: the top row, the bottom bar, the sheet that is up. */
1654
+ private syncPhone;
1655
+ /** The top row (spec 3.1): Menu named by the workspace and its problems, or a designer's back title. */
1656
+ private syncTopRow;
1657
+ /** What the bottom bar can hold, in the DOM's order: the rail's Add, the strip's items, the host's, Try it. */
1658
+ private bottomBarItems;
1659
+ private bottomKey;
1660
+ /**
1661
+ * The bottom bar (spec 3.4): the workspace's items in the phone's order, at most four, the rest
1662
+ * behind More. While trying the form, Results takes More's place. Script places them (an inline
1663
+ * order) and marks the overflow; everything else is the phone's CSS.
1664
+ */
1665
+ private syncBottomBar;
1666
+ /** The sheet up on a phone, if any; one at a time, in this order of precedence. */
1667
+ private currentSheet;
1668
+ /** Whether a framed sheet is at full height: the author raised it, or a small phone opens it so. */
1669
+ private sheetIsTall;
1670
+ /** Raises or lowers the sheet that is up, remembered for this page. */
1671
+ private setSheetTall;
1672
+ /** The key a sheet's height is remembered under, for this page only. */
1673
+ private sheetKey;
1674
+ /**
1675
+ * Draws the sheet that is up (spec 3.5): the scrim, the handle row, its height, its dialog
1676
+ * semantics, everything behind it inert, and focus into it and back to what opened it.
1677
+ */
1678
+ private syncSheets;
1679
+ /**
1680
+ * Gives focus back after the last sheet goes: to what opened it, else (that is hidden now,
1681
+ * the tier having left the phone, or gone) to the nearest control the shell still draws,
1682
+ * so focus never falls to the page.
1683
+ */
1684
+ private returnFocus;
1685
+ /** The Try it results sheet's own panel, in the canvas's shadow root (it is redrawn there, so asked for each time). */
1686
+ private resultsPanel;
1687
+ /** Moves focus into the results sheet, to its title (the same place Try again sends it). */
1688
+ private focusResultsSheet;
1689
+ /**
1690
+ * The results sheet as a dialog, like the other sheets: role, modal, its
1691
+ * title for a name (the catalog's words if the panel has no title yet), and its look adopted
1692
+ * into the canvas's shadow root, which the shell cannot style from outside.
1693
+ */
1694
+ private syncResultsSheet;
1695
+ /** Takes the gestures off the sheet they were on. */
1696
+ private disposeSheetGestures;
1697
+ /**
1698
+ * Drag, fling and swipe for the sheet that is up: attached when it
1699
+ * comes up, taken away when it goes. The handle row follows a drag by pointer events; a body
1700
+ * scrolled to its top follows a swipe down by touch events. Both end in the sheet's own
1701
+ * close path, so unapplied edits are asked about as they are for its Close button.
1702
+ */
1703
+ private syncSheetGestures;
1704
+ /** The open side panel's name, for its sheet's dialog and close button. */
1705
+ private sheetLabel;
1706
+ /** The element with focus, through every shadow root on the way down; the host's own light DOM too. */
1707
+ private deepActiveElement;
1708
+ /** Puts away the sheet that is up, as its close button would: a panel or the inspector asks about unapplied edits first. */
1709
+ private closeSheet;
1710
+ /** The phone's own controls; answers whether the click was one of theirs. */
1711
+ private onPhoneClick;
1712
+ /** Try it from the bottom bar or the drawer: unapplied edits are asked about first, as the canvas's own Try it does. */
1713
+ private toggleTryIt;
1714
+ /**
1715
+ * Opens the step or tab that holds the component on the canvas, as the canvas does for a new
1716
+ * selection: through the previewed form's own `revealComponent`, which never moves focus. Does
1717
+ * nothing before the canvas has drawn a form.
1718
+ */
1719
+ revealComponent(componentId: string): void;
1720
+ /**
1721
+ * Marks what an assistant's write touched: `data-agent-touched` on each of the
1722
+ * components' boxes in the canvas's previewed form for `ms`, drawn by the canvas chrome's rule
1723
+ * in the focus colour. In the edit view the box is the canvas's node chrome; while trying the
1724
+ * form, the form's own component and container elements. A paint inside the window that
1725
+ * replaces the boxes gets the mark again, once; a second call ends the first and starts over.
1726
+ */
1727
+ highlightComponents(ids: readonly string[], ms?: number): void;
1728
+ /**
1729
+ * Whether the canvas shows the form being tried (Try it) rather than the edit view: the bottom
1730
+ * bar's own notion, so a canvas that cannot be tried on this workspace never reads as trying.
1731
+ */
1732
+ get trying(): boolean;
1733
+ /**
1734
+ * Whether Try it can run on the page now: the gate every person's route to Try it
1735
+ * applies (the command, the bar's button, the phone menu), public so an assistant's host can
1736
+ * answer "not tryable" before it asks. False on Logic, Data, Languages and a designer overview.
1737
+ */
1738
+ get tryable(): boolean;
1739
+ /**
1740
+ * Turns Try it on or off, as the bottom bar's Try it does: off at once; on once unapplied edits
1741
+ * are answered, so with a draft open the shell asks the person first and Try it waits for the
1742
+ * answer. Answers whether the change happened now (also when there was nothing to change).
1743
+ * Never on where the person has no Try it: a workspace with no canvas would be left previewing
1744
+ * with no Back to editing, so that answers false and changes nothing.
1745
+ */
1746
+ setTrying(on: boolean): boolean;
1747
+ /** Whether a strip panel is left off: by the `features` list or by `hidden-panels`. A host's own panels never are. */
1748
+ panelHidden(id: string): boolean;
1749
+ /**
1750
+ * The host's Save as the File menu offers it, with the label the menu shows ("Save", "Save
1751
+ * draft"); `undefined` when the host lends none.
1752
+ *
1753
+ * @internal
1754
+ */
1755
+ saveAvailable(): {
1756
+ label: string;
1757
+ } | undefined;
1758
+ /**
1759
+ * Save for a browser assistant: the File menu's Save without its unsaved-edits prompt. Where the
1760
+ * person's Save would ask first (a prompt already up, a draft on the selection or the form root,
1761
+ * an editor outside the tree holding edits: what `requestLeave` holds for, on the controller on
1762
+ * the page), this answers `held` and changes nothing, so the person's own answer is never
1763
+ * pre-empted; otherwise it runs the host's save as the person's does, with `trigger: "agent"` in
1764
+ * the save's context and the `builder-file-action` detail. Never New, Open or Download.
1765
+ *
1766
+ * @internal
1767
+ */
1768
+ requestSave(): Promise<BuilderSaveOutcome>;
1769
+ /**
1770
+ * Draws the canvas with one of the offered bindings, as the View panel's picker does: the
1771
+ * controller's binding **and** `builder-binding-change`, so the host hears it (`setBindingId`
1772
+ * alone does not, and ignores an unknown id without a word). `""` or `undefined` draws with the
1773
+ * host's own binding (else Datum's). Answers `false`, and changes nothing, for an id the builder
1774
+ * does not offer or when it offers none.
1775
+ *
1776
+ * Always the form's controller, whichever workspace is on the page: the host offers its
1777
+ * bindings to that one alone, and `describe_builder` lists them from it, so in Journeys or PDF
1778
+ * the answer agrees with what was offered.
1779
+ *
1780
+ * @internal
1781
+ */
1782
+ setBindingForAgent(id: string | undefined): boolean;
1783
+ /**
1784
+ * Shows the form in another of its languages, as the bar's language switcher does: the form's
1785
+ * controller moves, and Languages follows. The form itself is not changed.
1786
+ *
1787
+ * The form's controller even in Journeys or PDF, where the switcher is put away: moving only the
1788
+ * designer's own controller there would be half the picture (the View sync says so) and leave the
1789
+ * form where it was. A journey on the page shows the form's language, so its controller follows
1790
+ * too, now: the mode itself takes the form's language up only when it next brings the journey up
1791
+ * (activation, another journey), and the canvas the person sees must agree with the answer. As
1792
+ * the mode's own locale sync does it, silently with a repaint, which is no edit. A PDF layout
1793
+ * keeps the host's language, as it always does.
1794
+ *
1795
+ * @internal
1796
+ */
1797
+ setPreviewLocale(code: string): void;
1798
+ /**
1799
+ * The canvas's Try it seams for the builder agent's element host (the canvas is private), or
1800
+ * `undefined` before the shell has drawn one. Each part reaches the canvas the shell has when it
1801
+ * is called, so a rebuilt shadow root is followed. `onTrySubmit` listens on the shell itself
1802
+ * (`builder-try-submit` bubbles and is composed): a listener bound to the canvas would stay on
1803
+ * the one a page move discards, and its unsubscriber would remove nothing from the new one.
1804
+ *
1805
+ * @internal
1806
+ */
1807
+ agentTryParts(): BuilderAgentTryParts | undefined;
1808
+ /**
1809
+ * What the Languages surface draws its rows from beside the form's controller, whether or not
1810
+ * the surface is on the page: the header and footer texts as the surface lists them, the
1811
+ * journeys' and the PDF layouts' texts (the same sources `feedLanguages` hands it), the host's
1812
+ * catalog, and `notLoaded`: a designer side the form holds documents for whose mode is not
1813
+ * registered, so its texts are missing from these lists. The element host cannot rebuild them,
1814
+ * since the header rows come from a shell-private module.
1815
+ *
1816
+ * @internal
1817
+ */
1818
+ agentLanguageInputs(): BuilderAgentLanguageInputs;
1819
+ /**
1820
+ * How many translations typed in Languages are not applied yet (the surface's `pendingCount`):
1821
+ * `0` when the surface has never been on the page.
1822
+ *
1823
+ * @internal
1824
+ */
1825
+ agentLanguagesPending(): number;
1826
+ /**
1827
+ * The bar's language switcher, moved: the controller on the page follows (or `controller`, the
1828
+ * form's for {@link setPreviewLocale}), and Languages with it. The person's `locale-change`
1829
+ * listener keeps the default: it can also hear a composed `locale-change` from inside the canvas.
1830
+ */
1831
+ private followBarLocale;
1832
+ /** Takes the marks of the last {@link highlightComponents} away and stops its watch and its timer. */
1833
+ private endAgentHighlight;
1834
+ /** Try it's results as a sheet over the live form (spec 4.7). */
1835
+ private setResults;
1836
+ /** A PDF page drawn to fit a phone's width: after the designer has drawn it. */
1837
+ private fitDesignerSoon;
1838
+ private openMore;
1839
+ private closeMore;
1840
+ private openMenu;
1841
+ private closeMenu;
1842
+ /** Draws the drawer's head and sections from the shell as it stands. */
1843
+ private renderMenu;
1844
+ /** What the drawer lists (spec 3.6): workspaces, the designer's documents, the canvas, files, tools. */
1845
+ private phoneMenuSections;
1846
+ /** A drawer row: a switch and a first Delete keep the drawer up; everything else puts it away, then runs. */
1847
+ private onMenuGo;
1848
+ /** The drawer's options for the document on the page: the bar's document menu, on a phone. */
1849
+ private runPhoneDocumentAction;
1850
+ /** Puts back the layout remembered under the key, if any: widths first, then the panel and the inspector's fold. */
1851
+ private restorePanels;
1852
+ /** Writes the panels as they stand under the key; a narrow shell writes nothing, its drawers being a passing state. */
1853
+ private savePanels;
1854
+ /** Follows the wrap's width: a ResizeObserver where there is one, the window's resize otherwise (and in jsdom). */
1855
+ private watchWidth;
1856
+ private readonly onWindowResize;
1857
+ /** Reads the wrap's width and moves between the wide and the narrow layout when it crosses the line. */
1858
+ private syncNarrow;
1859
+ /** Whether the primary pointer is coarse (a finger): keyboard and drag hints are hidden then. */
1860
+ private coarsePointer;
1861
+ /** Sets `data-pointer` on the shell and `--db-hint-display`, which the panels' hint rules read. */
1862
+ private setPointer;
1863
+ /** Whether the window is short and touched, the way a phone held sideways is (a desktop window never is). */
1864
+ private shortCoarseViewport;
1865
+ private applyNarrow;
1866
+ /** The tabs the bar shows, in order: each mode's documents, or the mode itself. Hidden modes are left out. */
1867
+ private documentTabs;
1868
+ /**
1869
+ * What a mode's own tab says. The builder's own tree is the *form*, so its tab carries the
1870
+ * form's title — an author with a form and three PDF layouts on the bar reads four document
1871
+ * names, not "Form" and three. The title is taken drafted, so the tab follows what is being
1872
+ * typed the way the canvas does, and falls back to the mode's label while the form has no
1873
+ * title yet. Another mode's tab keeps its own label.
1874
+ */
1875
+ private modeTabLabel;
1876
+ private isTabSelected;
1877
+ private renderDocuments;
1878
+ /** Marks the label busy while a switch is under way; the repaint that follows a success clears it. */
1879
+ private setDocumentFaceBusy;
1880
+ private documentMenuEl;
1881
+ private toggleDocumentMenu;
1882
+ private closeDocumentMenu;
1883
+ /** A click outside the shell entirely takes the document's menu down. */
1884
+ private readonly onWindowClick;
1885
+ /** The file menu goes on any click outside it, in the builder or on the page; heard only while it is open. */
1886
+ private readonly onFileMenuOutside;
1887
+ private runDocumentAction;
1888
+ /** The inline confirmation of a document's removal: what goes, then Cancel and Delete (the second carries `data-confirm`). */
1889
+ private removeNoteHtml;
1890
+ /**
1891
+ * Focus after a rename box goes (Enter, Escape): the document's label it stood in for, or on a
1892
+ * phone, where the label is not drawn, the back title (else Menu).
1893
+ */
1894
+ private focusDocumentLabel;
1895
+ private commitRename;
1896
+ /** Mirrors the mode on the page onto the `mode` attribute. */
1897
+ private reflectMode;
1898
+ private modeContext;
1899
+ /**
1900
+ * Switches to `mode`: its own `activate` first (the tab shows busy; a failure leaves the
1901
+ * page as it was), then, when asked, the mode's document; then the old mode's chrome comes
1902
+ * down, the panels are re-pointed and the new mode's chrome goes up. A newer switch
1903
+ * supersedes one still activating.
1904
+ */
1905
+ private activateMode;
1906
+ /** Moves the active mode to another of its documents; the tab shows busy meanwhile. */
1907
+ private moveToDocument;
1908
+ private emitDocumentChange;
1909
+ /**
1910
+ * Where the active mode's controls go: a `data-segmented` child (the mode's views,
1911
+ * navigation) on the bar, in the shell's pill; every other one (its worded actions) in the
1912
+ * canvas's toolbar. On a phone, whose canvas has no toolbar, every one stays in the bar's
1913
+ * group, which the menu drawer takes.
1914
+ */
1915
+ private placeModeActions;
1916
+ /** Puts the mode's controls away again, from the bar and the canvas's toolbar. */
1917
+ private detachModeActions;
1918
+ /** The shell's width on every overlay a mode put in the shadow root (they sit outside .wrap). */
1919
+ private applyShellWidth;
1920
+ private attachModeChrome;
1921
+ private detachModeChrome;
1922
+ /** Shows a mode's surface on the canvas in the sheet's place, or the sheet again. */
1923
+ private applySurface;
1924
+ /** Points the panels and the bar at the mode on the page (its selected document's controller). */
1925
+ private applyPanelControllers;
1926
+ /**
1927
+ * What the inspector edits when the mode on the page says it is on another controller than
1928
+ * its own (`BuilderMode.inspection`): a form field placed on a journey step, edited on the form's
1929
+ * controller. `via` is what the mode's controller had selected then, put back by Keep editing
1930
+ * after a move that did not ask first. `undefined`: the inspector is on the mode's controller.
1931
+ */
1932
+ private inspected;
1933
+ /**
1934
+ * A move waiting on the inspected component's unsaved edits (see {@link holdInspected}): `next`
1935
+ * once Apply or Discard settles them, `stay` on Keep editing (or a refused Apply).
1936
+ */
1937
+ private inspectHold;
1938
+ /**
1939
+ * Set by Keep editing after a move that did not ask, when what the mode's controller had
1940
+ * selected is gone (taken away by the outline, an agent): the inspector stays on the draft
1941
+ * until it is applied or discarded, rather than asking again at once.
1942
+ */
1943
+ private inspectPinned;
1944
+ /** The mode whose `subscribeInspection` is heard, and the unsubscribe. */
1945
+ private inspectSubscription;
1946
+ /** The controller the inspected component lives on, heard for the prompt's answer. */
1947
+ private inspectListened;
1948
+ /** The leave guard on the mode's controller while the inspector is on another (see {@link syncInspectGuard}). */
1949
+ private inspectGuard;
1950
+ /** Hears the mode on the page say its inspection moved; the previous mode is no longer heard. */
1951
+ private listenModeInspect;
1952
+ /**
1953
+ * Points the inspector where the mode on the page says, in one paint: on another
1954
+ * controller, with the component selected there and the form's tabs; else back on the mode's
1955
+ * own. The mode's buttons go to the inspector's about card, and the one standing in for
1956
+ * Delete to the canvas's selection bar, each behind {@link holdInspected}. A move away from a
1957
+ * component holding unsaved edits that did not ask first (the outline, a host, an agent) is
1958
+ * held here: the inspector stays on it with the prompt up. A shell whose modes say nothing of
1959
+ * this (the form, the PDF designer) is left exactly as it was.
1960
+ */
1961
+ private syncInspection;
1962
+ /** The mode whose controller `controller` is (the form's for the builder's own), for the inspector's settings. */
1963
+ private modeOwning;
1964
+ /** The inspector's settings for a tree of `mode`'s, as {@link applyPanelControllersInner} sets them for the mode on the page. */
1965
+ private applyInspectorSettings;
1966
+ /**
1967
+ * Runs `run` once the component the inspector edits on another controller holds no unsaved
1968
+ * edits: at once when it holds none (or the inspector is on the mode's own). Else the
1969
+ * inspector puts up its unsaved-edits prompt for it (asked on that controller as a move away
1970
+ * from it, so the panel showing it draws it); Apply or Discard runs `run`, Keep editing runs
1971
+ * `stay`. A newer move replaces one still waiting: the latest is the one that counts. Answers
1972
+ * whether `run` ran now.
1973
+ */
1974
+ private holdInspected;
1975
+ /** Hears the controller the inspected component is on: the prompt's answer goes on, or stays. */
1976
+ private listenInspected;
1977
+ /**
1978
+ * While the inspector edits on another controller, the mode's controller holds a leave guard
1979
+ * for that component's unsaved edits: every departure the shell makes through
1980
+ * `requestLeave` — leaving the workspace or the document, Try it, New and Open, a click on
1981
+ * empty canvas — and a mode's own, wait for them. The prompt is the inspector's: the guard's
1982
+ * hold is answered through {@link holdInspected}.
1983
+ */
1984
+ private syncInspectGuard;
1985
+ private applyPanelControllersInner;
1986
+ /** Whether the strip is offering the Header & footer item: not on another mode's tab. */
1987
+ private chromeItemHidden;
1988
+ private isContained;
1989
+ /** Mirrors {@link layout} onto the wrap, which the stylesheet keys its contained rules on. */
1990
+ private applyLayout;
1991
+ /**
1992
+ * Inline-styles `--db-*` vars set here beat each panel's own internal `:host {}` defaults
1993
+ * (inline style outranks a shadow root's own stylesheet), and survive that panel's
1994
+ * `render()` calls since those only touch `this.root.innerHTML`, not `this.style`.
1995
+ */
1996
+ private applyTheme;
1997
+ /**
1998
+ * Every host that declares the token defaults on itself (`builderTokens()`), which an inherited
1999
+ * value cannot beat: the theme has to be set on each one, the strip panels and the lazy
2000
+ * surfaces included The lazy panels' elements whether loaded or not
2001
+ *: inline style survives the upgrade. A surface made after the theme was applied
2002
+ * gets it from {@link paintThemeVars} where it is created.
2003
+ */
2004
+ private themeTargets;
2005
+ /** The theme's vars on a themed host created after the theme was applied (a lazy surface, the palette, the catalog). */
2006
+ private paintThemeVars;
2007
+ private wireController;
2008
+ private emitChange;
2009
+ private readonly onMouseMove;
2010
+ private readonly onMouseUp;
2011
+ }
2012
+ export declare function defineDatumBuilderElement(): void;