@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.
- package/LICENSE +21 -0
- package/NOTICE +26 -0
- package/README.md +52 -2
- package/bin/datum-form-test.mjs +11 -0
- package/dist/bundle-size.txt +3 -0
- package/dist/cli.mjs +3 -0
- package/dist/datum-form-test.LICENSE.txt +510 -0
- package/dist/index.mjs +68728 -0
- package/dist/types/engine/form-engine/agent/builder/agent-texts-en.d.ts +53 -0
- package/dist/types/engine/form-engine/builder/controller/builder-controller.d.ts +2534 -0
- package/dist/types/engine/form-engine/builder/controller/dependents.d.ts +122 -0
- package/dist/types/engine/form-engine/builder/controller/language-edits.d.ts +48 -0
- package/dist/types/engine/form-engine/builder/controller/simulated-options.d.ts +20 -0
- package/dist/types/engine/form-engine/builder/controller/translation-rules.d.ts +71 -0
- package/dist/types/engine/form-engine/builder/controller/try-submission.d.ts +45 -0
- package/dist/types/engine/form-engine/builder/data/data-loader.d.ts +6 -0
- package/dist/types/engine/form-engine/builder/data/data-model-import.d.ts +119 -0
- package/dist/types/engine/form-engine/builder/data/data-model-plan.d.ts +52 -0
- package/dist/types/engine/form-engine/builder/data/data-surface.d.ts +139 -0
- package/dist/types/engine/form-engine/builder/data/data-texts-en.d.ts +205 -0
- package/dist/types/engine/form-engine/builder/data/schema-rows.d.ts +56 -0
- package/dist/types/engine/form-engine/builder/data-model/compare.d.ts +37 -0
- package/dist/types/engine/form-engine/builder/data-model/data-model.d.ts +113 -0
- package/dist/types/engine/form-engine/builder/data-model/example.d.ts +6 -0
- package/dist/types/engine/form-engine/builder/data-model/from-form.d.ts +43 -0
- package/dist/types/engine/form-engine/builder/data-model/from-json-schema.d.ts +22 -0
- package/dist/types/engine/form-engine/builder/data-model/from-sample.d.ts +13 -0
- package/dist/types/engine/form-engine/builder/data-model/generate.d.ts +101 -0
- package/dist/types/engine/form-engine/builder/data-model/index.d.ts +10 -0
- package/dist/types/engine/form-engine/builder/data-model/mapping.d.ts +26 -0
- package/dist/types/engine/form-engine/builder/data-model/read-input.d.ts +39 -0
- package/dist/types/engine/form-engine/builder/data-model/to-json-schema.d.ts +10 -0
- package/dist/types/engine/form-engine/builder/definition-budget.d.ts +27 -0
- package/dist/types/engine/form-engine/builder/drag-drop/html5-drag-drop.d.ts +57 -0
- package/dist/types/engine/form-engine/builder/drag-drop/move-legality.d.ts +23 -0
- package/dist/types/engine/form-engine/builder/drag-drop/move-texts-en.d.ts +22 -0
- package/dist/types/engine/form-engine/builder/drag-drop/move-ui.d.ts +72 -0
- package/dist/types/engine/form-engine/builder/form-tests/tests-accept.d.ts +18 -0
- package/dist/types/engine/form-engine/builder/form-tests/tests-add-step.d.ts +51 -0
- package/dist/types/engine/form-engine/builder/form-tests/tests-completions.d.ts +66 -0
- package/dist/types/engine/form-engine/builder/form-tests/tests-coverage.d.ts +32 -0
- package/dist/types/engine/form-engine/builder/form-tests/tests-editor-loader.d.ts +10 -0
- package/dist/types/engine/form-engine/builder/form-tests/tests-editor-texts-en.d.ts +72 -0
- package/dist/types/engine/form-engine/builder/form-tests/tests-editor.d.ts +50 -0
- package/dist/types/engine/form-engine/builder/form-tests/tests-model.d.ts +422 -0
- package/dist/types/engine/form-engine/builder/form-tests/tests-panel-styles.d.ts +8 -0
- package/dist/types/engine/form-engine/builder/form-tests/tests-panel-texts-en.d.ts +174 -0
- package/dist/types/engine/form-engine/builder/form-tests/tests-record.d.ts +55 -0
- package/dist/types/engine/form-engine/builder/form-tests/tests-rename.d.ts +93 -0
- package/dist/types/engine/form-engine/builder/form-tests/tests-rules.d.ts +42 -0
- package/dist/types/engine/form-engine/builder/form-tests/tests-runner.d.ts +2 -0
- package/dist/types/engine/form-engine/builder/form-tests/tests-scaffold.d.ts +13 -0
- package/dist/types/engine/form-engine/builder/form-tests/tests-textarea.d.ts +88 -0
- package/dist/types/engine/form-engine/builder/form-tests/tests-texts-en.d.ts +222 -0
- package/dist/types/engine/form-engine/builder/form-tests/tests-words.d.ts +12 -0
- package/dist/types/engine/form-engine/builder/formula/feel-functions.d.ts +98 -0
- package/dist/types/engine/form-engine/builder/formula/feel-print.d.ts +47 -0
- package/dist/types/engine/form-engine/builder/formula/formula-editor-loader.d.ts +16 -0
- package/dist/types/engine/form-engine/builder/formula/formula-editor-styles.d.ts +19 -0
- package/dist/types/engine/form-engine/builder/formula/formula-editor.d.ts +104 -0
- package/dist/types/engine/form-engine/builder/formula/formula-fields.d.ts +44 -0
- package/dist/types/engine/form-engine/builder/formula/formula-textarea.d.ts +75 -0
- package/dist/types/engine/form-engine/builder/formula/formula-texts-en.d.ts +18 -0
- package/dist/types/engine/form-engine/builder/formula/rename.d.ts +98 -0
- package/dist/types/engine/form-engine/builder/history/command-history.d.ts +31 -0
- package/dist/types/engine/form-engine/builder/history/form-steps-on-page.d.ts +104 -0
- package/dist/types/engine/form-engine/builder/history/rename-step.d.ts +68 -0
- package/dist/types/engine/form-engine/builder/index.d.ts +48 -0
- package/dist/types/engine/form-engine/builder/journey-designer/journey-authoring-texts-en.d.ts +20 -0
- package/dist/types/engine/form-engine/builder/journey-designer/journey-authoring.d.ts +119 -0
- package/dist/types/engine/form-engine/builder/journey-designer/journey-builder-mode.d.ts +385 -0
- package/dist/types/engine/form-engine/builder/journey-designer/journey-catalog.d.ts +212 -0
- package/dist/types/engine/form-engine/builder/journey-designer/journey-checks.d.ts +175 -0
- package/dist/types/engine/form-engine/builder/journey-designer/journey-components.d.ts +183 -0
- package/dist/types/engine/form-engine/builder/journey-designer/journey-config-rename.d.ts +43 -0
- package/dist/types/engine/form-engine/builder/journey-designer/journey-designer-panels.d.ts +67 -0
- package/dist/types/engine/form-engine/builder/journey-designer/journey-designer.d.ts +296 -0
- package/dist/types/engine/form-engine/builder/journey-designer/journey-finding-words.d.ts +30 -0
- package/dist/types/engine/form-engine/builder/journey-designer/journey-findings.d.ts +74 -0
- package/dist/types/engine/form-engine/builder/journey-designer/journey-from-form.d.ts +89 -0
- package/dist/types/engine/form-engine/builder/journey-designer/journey-mode-loader.d.ts +19 -0
- package/dist/types/engine/form-engine/builder/journey-designer/journey-mode-model.d.ts +100 -0
- package/dist/types/engine/form-engine/builder/journey-designer/journey-preview-texts-en.d.ts +28 -0
- package/dist/types/engine/form-engine/builder/journey-designer/journey-preview.d.ts +163 -0
- package/dist/types/engine/form-engine/builder/journey-designer/journey-references.d.ts +104 -0
- package/dist/types/engine/form-engine/builder/journey-designer/journey-texts-en.d.ts +151 -0
- package/dist/types/engine/form-engine/builder/journey-designer/journey-texts.d.ts +51 -0
- package/dist/types/engine/form-engine/builder/journey-designer/journey-tree.d.ts +139 -0
- package/dist/types/engine/form-engine/builder/journey-designer/journey-try-map.d.ts +49 -0
- package/dist/types/engine/form-engine/builder/journey-designer/step-canvas-adapter.d.ts +253 -0
- package/dist/types/engine/form-engine/builder/journey-designer/step-history.d.ts +71 -0
- package/dist/types/engine/form-engine/builder/journey-designer/step-review.d.ts +79 -0
- package/dist/types/engine/form-engine/builder/journey-designer/step-view.d.ts +75 -0
- package/dist/types/engine/form-engine/builder/journey-map/journey-map-layout.d.ts +135 -0
- package/dist/types/engine/form-engine/builder/journey-map/journey-map-model.d.ts +346 -0
- package/dist/types/engine/form-engine/builder/journey-map/journey-map-preferences.d.ts +30 -0
- package/dist/types/engine/form-engine/builder/journey-map/journey-map-styles.d.ts +32 -0
- package/dist/types/engine/form-engine/builder/journey-map/journey-map-svg.d.ts +17 -0
- package/dist/types/engine/form-engine/builder/journey-map/journey-map-texts-en.d.ts +138 -0
- package/dist/types/engine/form-engine/builder/journey-map/journey-map.d.ts +138 -0
- package/dist/types/engine/form-engine/builder/languages/engine-texts.d.ts +19 -0
- package/dist/types/engine/form-engine/builder/languages/exchange.d.ts +199 -0
- package/dist/types/engine/form-engine/builder/languages/languages-cells.d.ts +106 -0
- package/dist/types/engine/form-engine/builder/languages/languages-exchange-dialog.d.ts +58 -0
- package/dist/types/engine/form-engine/builder/languages/languages-exchange-texts-en.d.ts +101 -0
- package/dist/types/engine/form-engine/builder/languages/languages-loader.d.ts +7 -0
- package/dist/types/engine/form-engine/builder/languages/languages-model.d.ts +180 -0
- package/dist/types/engine/form-engine/builder/languages/languages-surface.d.ts +418 -0
- package/dist/types/engine/form-engine/builder/languages/languages-texts-en.d.ts +174 -0
- package/dist/types/engine/form-engine/builder/logic/builder-texts.d.ts +1127 -0
- package/dist/types/engine/form-engine/builder/logic/coverage.d.ts +86 -0
- package/dist/types/engine/form-engine/builder/logic/index.d.ts +5 -0
- package/dist/types/engine/form-engine/builder/logic/logic-journey-host.d.ts +92 -0
- package/dist/types/engine/form-engine/builder/logic/logic-loader.d.ts +7 -0
- package/dist/types/engine/form-engine/builder/logic/logic-model.d.ts +158 -0
- package/dist/types/engine/form-engine/builder/logic/logic-surface.d.ts +359 -0
- package/dist/types/engine/form-engine/builder/logic/logic-texts-en.d.ts +216 -0
- package/dist/types/engine/form-engine/builder/logic/logic-types.d.ts +183 -0
- package/dist/types/engine/form-engine/builder/overview/overview-loader.d.ts +7 -0
- package/dist/types/engine/form-engine/builder/overview/overview-surface.d.ts +84 -0
- package/dist/types/engine/form-engine/builder/overview/overview-texts-en.d.ts +27 -0
- package/dist/types/engine/form-engine/builder/palette/command-palette.d.ts +46 -0
- package/dist/types/engine/form-engine/builder/palette/palette-filter.d.ts +37 -0
- package/dist/types/engine/form-engine/builder/palette/palette-loader.d.ts +6 -0
- package/dist/types/engine/form-engine/builder/palette/palette-texts-en.d.ts +18 -0
- package/dist/types/engine/form-engine/builder/pdf-designer/layout-bindings.d.ts +13 -0
- package/dist/types/engine/form-engine/builder/pdf-designer/layout-catalog.d.ts +108 -0
- package/dist/types/engine/form-engine/builder/pdf-designer/layout-conditions.d.ts +172 -0
- package/dist/types/engine/form-engine/builder/pdf-designer/pdf-builder-mode.d.ts +406 -0
- package/dist/types/engine/form-engine/builder/pdf-designer/pdf-canvas-adapters.d.ts +55 -0
- package/dist/types/engine/form-engine/builder/pdf-designer/pdf-designer-chunk.d.ts +13 -0
- package/dist/types/engine/form-engine/builder/pdf-designer/pdf-designer-loader.d.ts +10 -0
- package/dist/types/engine/form-engine/builder/pdf-designer/pdf-designer-panels.d.ts +89 -0
- package/dist/types/engine/form-engine/builder/pdf-designer/pdf-designer.d.ts +95 -0
- package/dist/types/engine/form-engine/builder/pdf-designer/pdf-layout-texts.d.ts +86 -0
- package/dist/types/engine/form-engine/builder/pdf-designer/pdf-mode-loader.d.ts +17 -0
- package/dist/types/engine/form-engine/builder/pdf-designer/pdf-mode-model.d.ts +88 -0
- package/dist/types/engine/form-engine/builder/pdf-designer/pdf-panel-styles.d.ts +1 -0
- package/dist/types/engine/form-engine/builder/pdf-designer/pdf-template-designer.d.ts +139 -0
- package/dist/types/engine/form-engine/builder/pdf-designer/pdf-template-source.d.ts +22 -0
- package/dist/types/engine/form-engine/builder/pdf-designer/pdf-texts-en.d.ts +405 -0
- package/dist/types/engine/form-engine/builder/pdf-designer/template-mode.d.ts +186 -0
- package/dist/types/engine/form-engine/builder/pdf-designer/template-pages.d.ts +57 -0
- package/dist/types/engine/form-engine/builder/popover-place.d.ts +14 -0
- package/dist/types/engine/form-engine/builder/preview/builder-preview-runtime.d.ts +284 -0
- package/dist/types/engine/form-engine/builder/print/print-breaks.d.ts +46 -0
- package/dist/types/engine/form-engine/builder/print/print-loader.d.ts +6 -0
- package/dist/types/engine/form-engine/builder/print/print-preview.d.ts +121 -0
- package/dist/types/engine/form-engine/builder/print/print-samples.d.ts +43 -0
- package/dist/types/engine/form-engine/builder/print/print-settings-model.d.ts +138 -0
- package/dist/types/engine/form-engine/builder/print/print-styles.d.ts +1 -0
- package/dist/types/engine/form-engine/builder/print/print-surface.d.ts +284 -0
- package/dist/types/engine/form-engine/builder/print/print-texts-en.d.ts +104 -0
- package/dist/types/engine/form-engine/builder/property-editor/component-editor-context.d.ts +8 -0
- package/dist/types/engine/form-engine/builder/property-editor/component-json.d.ts +83 -0
- package/dist/types/engine/form-engine/builder/property-editor/condition-words.d.ts +26 -0
- package/dist/types/engine/form-engine/builder/property-editor/css-classes.d.ts +84 -0
- package/dist/types/engine/form-engine/builder/property-editor/editor-composer.d.ts +9 -0
- package/dist/types/engine/form-engine/builder/property-editor/inspector-model.d.ts +376 -0
- package/dist/types/engine/form-engine/builder/property-editor/rule-source.d.ts +8 -0
- package/dist/types/engine/form-engine/builder/property-editor/rules-model.d.ts +179 -0
- package/dist/types/engine/form-engine/builder/tree-editor/nested-tree-view.d.ts +43 -0
- package/dist/types/engine/form-engine/builder/tree-editor/slot-constraints.d.ts +17 -0
- package/dist/types/engine/form-engine/builder/tree-editor/tree-editor.d.ts +185 -0
- package/dist/types/engine/form-engine/builder/web-component/assistants-settings.d.ts +43 -0
- package/dist/types/engine/form-engine/builder/web-component/builder-chrome-panel.d.ts +179 -0
- package/dist/types/engine/form-engine/builder/web-component/builder-features.d.ts +97 -0
- package/dist/types/engine/form-engine/builder/web-component/builder-form-fields-panel.d.ts +42 -0
- package/dist/types/engine/form-engine/builder/web-component/builder-modes.d.ts +704 -0
- package/dist/types/engine/form-engine/builder/web-component/builder-outline.d.ts +24 -0
- package/dist/types/engine/form-engine/builder/web-component/builder-panels.d.ts +1872 -0
- package/dist/types/engine/form-engine/builder/web-component/builder-shared.d.ts +917 -0
- package/dist/types/engine/form-engine/builder/web-component/builder-tests-panel.d.ts +454 -0
- package/dist/types/engine/form-engine/builder/web-component/builder-theme-registry.d.ts +36 -0
- package/dist/types/engine/form-engine/builder/web-component/builder-variables-panel.d.ts +158 -0
- package/dist/types/engine/form-engine/builder/web-component/canvas-hooks.d.ts +53 -0
- package/dist/types/engine/form-engine/builder/web-component/chrome-panel-loader.d.ts +17 -0
- package/dist/types/engine/form-engine/builder/web-component/default-builder-element.d.ts +2012 -0
- package/dist/types/engine/form-engine/builder/web-component/definition-size.d.ts +12 -0
- package/dist/types/engine/form-engine/builder/web-component/dialog-frame.d.ts +36 -0
- package/dist/types/engine/form-engine/builder/web-component/formula-settings.d.ts +31 -0
- package/dist/types/engine/form-engine/builder/web-component/host-control-styles.d.ts +38 -0
- package/dist/types/engine/form-engine/builder/web-component/json-viewer-loader.d.ts +18 -0
- package/dist/types/engine/form-engine/builder/web-component/json-viewer.d.ts +38 -0
- package/dist/types/engine/form-engine/builder/web-component/modal-place.d.ts +55 -0
- package/dist/types/engine/form-engine/builder/web-component/palette-glyphs.d.ts +14 -0
- package/dist/types/engine/form-engine/builder/web-component/panel-memory.d.ts +68 -0
- package/dist/types/engine/form-engine/builder/web-component/phone-menu.d.ts +67 -0
- package/dist/types/engine/form-engine/builder/web-component/phone-styles.d.ts +30 -0
- package/dist/types/engine/form-engine/builder/web-component/remote-images.d.ts +25 -0
- package/dist/types/engine/form-engine/builder/web-component/sheet-gestures.d.ts +59 -0
- package/dist/types/engine/form-engine/builder/web-component/starter-submit.d.ts +14 -0
- package/dist/types/engine/form-engine/builder/web-component/studio-dark-theme.d.ts +22 -0
- package/dist/types/engine/form-engine/builder/web-component/studio-tokens.d.ts +46 -0
- package/dist/types/engine/form-engine/builder/web-component/surface-sheet.d.ts +31 -0
- package/dist/types/engine/form-engine/builder/web-component/tests-panel-loader.d.ts +17 -0
- package/dist/types/engine/form-engine/builder/web-component/toolbar-roving.d.ts +21 -0
- package/dist/types/engine/form-engine/builder/web-component/try-it-types.d.ts +262 -0
- package/dist/types/engine/form-engine/builder/web-component/try-it.d.ts +85 -0
- package/dist/types/engine/form-engine/builder/web-component/try-texts-en.d.ts +64 -0
- package/dist/types/engine/form-engine/builder/web-component/variables-panel-loader.d.ts +17 -0
- package/dist/types/engine/form-engine/core/accessibility/accessibility-semantics.d.ts +51 -0
- package/dist/types/engine/form-engine/core/accessibility/keyboard-navigation.d.ts +8 -0
- package/dist/types/engine/form-engine/core/crypto/sha256.d.ts +18 -0
- package/dist/types/engine/form-engine/core/errors/error-navigation.d.ts +14 -0
- package/dist/types/engine/form-engine/core/errors/form-error.d.ts +32 -0
- package/dist/types/engine/form-engine/core/events/event-bus.d.ts +18 -0
- package/dist/types/engine/form-engine/core/events/event-types.d.ts +236 -0
- package/dist/types/engine/form-engine/core/events/hooks.d.ts +107 -0
- package/dist/types/engine/form-engine/core/expressions/compile.d.ts +565 -0
- package/dist/types/engine/form-engine/core/expressions/condition-shape.d.ts +11 -0
- package/dist/types/engine/form-engine/core/expressions/definition-structure.d.ts +329 -0
- package/dist/types/engine/form-engine/core/expressions/expression.d.ts +102 -0
- package/dist/types/engine/form-engine/core/expressions/formula-types.d.ts +114 -0
- package/dist/types/engine/form-engine/core/expressions/formula.d.ts +150 -0
- package/dist/types/engine/form-engine/core/expressions/function-docs.d.ts +13 -0
- package/dist/types/engine/form-engine/core/expressions/function-table.d.ts +396 -0
- package/dist/types/engine/form-engine/core/expressions/inspect.d.ts +292 -0
- package/dist/types/engine/form-engine/core/form-tests/form-test-lint.d.ts +28 -0
- package/dist/types/engine/form-engine/core/form-tests/form-test-parse.d.ts +200 -0
- package/dist/types/engine/form-engine/core/form-tests/form-test-read.d.ts +11 -0
- package/dist/types/engine/form-engine/core/form-tests/form-test-run.d.ts +58 -0
- package/dist/types/engine/form-engine/core/form-tests/form-test-types.d.ts +413 -0
- package/dist/types/engine/form-engine/core/form-tests/index.d.ts +7 -0
- package/dist/types/engine/form-engine/core/index.d.ts +75 -0
- package/dist/types/engine/form-engine/core/journey/journey-diagnostics.d.ts +249 -0
- package/dist/types/engine/form-engine/core/journey/journey-flow.d.ts +77 -0
- package/dist/types/engine/form-engine/core/journey/journey-path.d.ts +213 -0
- package/dist/types/engine/form-engine/core/journey/journey-server-check.d.ts +66 -0
- package/dist/types/engine/form-engine/core/journey/journey-shared.d.ts +39 -0
- package/dist/types/engine/form-engine/core/journey/journey-types.d.ts +246 -0
- package/dist/types/engine/form-engine/core/journey/presentation.d.ts +163 -0
- package/dist/types/engine/form-engine/core/journey/worked-out-text.d.ts +10 -0
- package/dist/types/engine/form-engine/core/localization/form-texts.d.ts +283 -0
- package/dist/types/engine/form-engine/core/localization/locale-documents.d.ts +74 -0
- package/dist/types/engine/form-engine/core/localization/localized-text.d.ts +21 -0
- package/dist/types/engine/form-engine/core/localization/supported-locales.d.ts +49 -0
- package/dist/types/engine/form-engine/core/localization/translations.d.ts +312 -0
- package/dist/types/engine/form-engine/core/localization/validation-messages.d.ts +120 -0
- package/dist/types/engine/form-engine/core/schema/agent-tools-setting.d.ts +5 -0
- package/dist/types/engine/form-engine/core/schema/answer-kinds.d.ts +92 -0
- package/dist/types/engine/form-engine/core/schema/button-group.d.ts +24 -0
- package/dist/types/engine/form-engine/core/schema/button.d.ts +75 -0
- package/dist/types/engine/form-engine/core/schema/collection.d.ts +29 -0
- package/dist/types/engine/form-engine/core/schema/component-classes.d.ts +26 -0
- package/dist/types/engine/form-engine/core/schema/component-kinds.d.ts +76 -0
- package/dist/types/engine/form-engine/core/schema/contracts.d.ts +614 -0
- package/dist/types/engine/form-engine/core/schema/control-hints.d.ts +45 -0
- package/dist/types/engine/form-engine/core/schema/data-grid.d.ts +138 -0
- package/dist/types/engine/form-engine/core/schema/data-source-capability.d.ts +20 -0
- package/dist/types/engine/form-engine/core/schema/file-upload.d.ts +114 -0
- package/dist/types/engine/form-engine/core/schema/form-chrome.d.ts +301 -0
- package/dist/types/engine/form-engine/core/schema/grid.d.ts +88 -0
- package/dist/types/engine/form-engine/core/schema/image.d.ts +19 -0
- package/dist/types/engine/form-engine/core/schema/inline-options.d.ts +69 -0
- package/dist/types/engine/form-engine/core/schema/journey.d.ts +336 -0
- package/dist/types/engine/form-engine/core/schema/legend-mark.d.ts +10 -0
- package/dist/types/engine/form-engine/core/schema/length-limits.d.ts +33 -0
- package/dist/types/engine/form-engine/core/schema/pattern-validity.d.ts +2 -0
- package/dist/types/engine/form-engine/core/schema/pdf-layout-read.d.ts +508 -0
- package/dist/types/engine/form-engine/core/schema/pdf-layout-table.d.ts +25 -0
- package/dist/types/engine/form-engine/core/schema/pdf-layout.d.ts +224 -0
- package/dist/types/engine/form-engine/core/schema/pdf-renditions.d.ts +46 -0
- package/dist/types/engine/form-engine/core/schema/pdf-signature-configuration.d.ts +6 -0
- package/dist/types/engine/form-engine/core/schema/print.d.ts +76 -0
- package/dist/types/engine/form-engine/core/schema/signature.d.ts +13 -0
- package/dist/types/engine/form-engine/core/schema/static-html.d.ts +44 -0
- package/dist/types/engine/form-engine/core/schema/steps.d.ts +28 -0
- package/dist/types/engine/form-engine/core/schema/types.d.ts +186 -0
- package/dist/types/engine/form-engine/core/schema/validate-on-setting.d.ts +16 -0
- package/dist/types/engine/form-engine/core/state/answer-shape.d.ts +28 -0
- package/dist/types/engine/form-engine/core/state/effective-state.d.ts +42 -0
- package/dist/types/engine/form-engine/core/state/form-state.d.ts +160 -0
- package/dist/types/engine/form-engine/core/state/hidden-value-policy.d.ts +34 -0
- package/dist/types/engine/form-engine/core/state/host-context.d.ts +24 -0
- package/dist/types/engine/form-engine/core/state/semantic-state.d.ts +19 -0
- package/dist/types/engine/form-engine/core/state/submittable-fold.d.ts +460 -0
- package/dist/types/engine/form-engine/core/submission/canonical-submission.d.ts +62 -0
- package/dist/types/engine/form-engine/core/submission/envelope-completeness.d.ts +20 -0
- package/dist/types/engine/form-engine/core/submission/form-notice.d.ts +43 -0
- package/dist/types/engine/form-engine/core/submission/jcs.d.ts +20 -0
- package/dist/types/engine/form-engine/core/submission/signing.d.ts +110 -0
- package/dist/types/engine/form-engine/core/submission/submission-file.d.ts +34 -0
- package/dist/types/engine/form-engine/core/submission/submission-handler.d.ts +25 -0
- package/dist/types/engine/form-engine/core/submission/submission-modes.d.ts +11 -0
- package/dist/types/engine/form-engine/core/submission/webauthn-assertion.d.ts +41 -0
- package/dist/types/engine/form-engine/core/text/placeholders.d.ts +20 -0
- package/dist/types/engine/form-engine/core/text/spreadsheet-cell.d.ts +14 -0
- package/dist/types/engine/form-engine/core/tree/component-id.d.ts +14 -0
- package/dist/types/engine/form-engine/core/tree/component-path.d.ts +6 -0
- package/dist/types/engine/form-engine/core/tree/component-tree.d.ts +60 -0
- package/dist/types/engine/form-engine/core/tree/data-scope.d.ts +151 -0
- package/dist/types/engine/form-engine/core/tree/nesting.d.ts +10 -0
- package/dist/types/engine/form-engine/core/tree/prototype-names.d.ts +6 -0
- package/dist/types/engine/form-engine/data/client/client-data-source-runtime.d.ts +7 -0
- package/dist/types/engine/form-engine/data/client/registered-client-data-source-runtime.d.ts +6 -0
- package/dist/types/engine/form-engine/data/host/data-source-set.d.ts +46 -0
- package/dist/types/engine/form-engine/data/index.d.ts +9 -0
- package/dist/types/engine/form-engine/data/providers/data-source-provider-registry.d.ts +11 -0
- package/dist/types/engine/form-engine/data/providers/registered-data-source-runtime.d.ts +10 -0
- package/dist/types/engine/form-engine/data/providers/remote-data-source-provider.d.ts +30 -0
- package/dist/types/engine/form-engine/data/providers/static-data-source-provider.d.ts +20 -0
- package/dist/types/engine/form-engine/data/server/registered-server-data-source-runtime.d.ts +6 -0
- package/dist/types/engine/form-engine/data/server/server-data-source-runtime.d.ts +7 -0
- package/dist/types/engine/form-engine/index.d.ts +29 -0
- package/dist/types/engine/form-engine/persistence/core/draft-compatibility.d.ts +22 -0
- package/dist/types/engine/form-engine/persistence/core/draft-store.d.ts +96 -0
- package/dist/types/engine/form-engine/persistence/file-draft/draft-file.d.ts +3 -0
- package/dist/types/engine/form-engine/persistence/index.d.ts +7 -0
- package/dist/types/engine/form-engine/persistence/indexeddb/indexeddb-draft-store.d.ts +15 -0
- package/dist/types/engine/form-engine/persistence/local-storage/browser-local-draft-store.d.ts +22 -0
- package/dist/types/engine/form-engine/persistence/local-storage/in-memory-draft-store.d.ts +8 -0
- package/dist/types/engine/form-engine/persistence/server/server-draft-store.d.ts +15 -0
- package/dist/types/engine/form-engine/plugins/component-adapters.d.ts +66 -0
- package/dist/types/engine/form-engine/plugins/index.d.ts +4 -0
- package/dist/types/engine/form-engine/plugins/lifecycle/plugin-lifecycle.d.ts +11 -0
- package/dist/types/engine/form-engine/plugins/manifest/load-plugin-manifest.d.ts +23 -0
- package/dist/types/engine/form-engine/plugins/platform/plugin-platform.d.ts +81 -0
- package/dist/types/engine/form-engine/registry/capabilities/drawing-capabilities.d.ts +52 -0
- package/dist/types/engine/form-engine/registry/capabilities/field-capabilities.d.ts +205 -0
- package/dist/types/engine/form-engine/registry/components/component-registry.d.ts +9 -0
- package/dist/types/engine/form-engine/registry/data-sources/data-source-registry.d.ts +9 -0
- package/dist/types/engine/form-engine/registry/engine-component-types.d.ts +20 -0
- package/dist/types/engine/form-engine/registry/engine-version.d.ts +5 -0
- package/dist/types/engine/form-engine/registry/formula-functions/formula-function-registry.d.ts +33 -0
- package/dist/types/engine/form-engine/registry/index.d.ts +13 -0
- package/dist/types/engine/form-engine/registry/kinds.d.ts +83 -0
- package/dist/types/engine/form-engine/registry/pdf/pdf-rendition-registry.d.ts +15 -0
- package/dist/types/engine/form-engine/registry/plugins/plugin-registry.d.ts +14 -0
- package/dist/types/engine/form-engine/registry/submission/submission-handler-registry.d.ts +7 -0
- package/dist/types/engine/form-engine/registry/validators/validator-registry.d.ts +6 -0
- package/dist/types/engine/form-engine/registry/version-range.d.ts +15 -0
- package/dist/types/engine/form-engine/registry/versioned-theme-registry.d.ts +30 -0
- package/dist/types/engine/form-engine/registry/versioning.d.ts +5 -0
- package/dist/types/engine/form-engine/render/core/component-model.d.ts +292 -0
- package/dist/types/engine/form-engine/render/core/component-options.d.ts +58 -0
- package/dist/types/engine/form-engine/render/core/css-rules.d.ts +68 -0
- package/dist/types/engine/form-engine/render/core/error-accessibility.d.ts +23 -0
- package/dist/types/engine/form-engine/render/core/error-summary.d.ts +62 -0
- package/dist/types/engine/form-engine/render/core/error-wording.d.ts +104 -0
- package/dist/types/engine/form-engine/render/core/escape-html.d.ts +2 -0
- package/dist/types/engine/form-engine/render/core/file-storage.d.ts +59 -0
- package/dist/types/engine/form-engine/render/core/host-data-sources.d.ts +44 -0
- package/dist/types/engine/form-engine/render/core/journey-render-kit-default.d.ts +5 -0
- package/dist/types/engine/form-engine/render/core/journey-render-kit-eager.d.ts +10 -0
- package/dist/types/engine/form-engine/render/core/journey-render-kit-factory.d.ts +13 -0
- package/dist/types/engine/form-engine/render/core/journey-render-kit.d.ts +61 -0
- package/dist/types/engine/form-engine/render/core/journey-render.d.ts +132 -0
- package/dist/types/engine/form-engine/render/core/journey-review-kit-eager.d.ts +9 -0
- package/dist/types/engine/form-engine/render/core/journey-review-kit.d.ts +33 -0
- package/dist/types/engine/form-engine/render/core/journey-review.d.ts +134 -0
- package/dist/types/engine/form-engine/render/core/presentation-tree.d.ts +374 -0
- package/dist/types/engine/form-engine/render/core/print-options.d.ts +89 -0
- package/dist/types/engine/form-engine/render/core/render-contracts.d.ts +7 -0
- package/dist/types/engine/form-engine/render/core/render-orchestrator.d.ts +139 -0
- package/dist/types/engine/form-engine/render/core/render-policy.d.ts +52 -0
- package/dist/types/engine/form-engine/render/core/runtime-render-bridge.d.ts +154 -0
- package/dist/types/engine/form-engine/render/core/scalar-text.d.ts +10 -0
- package/dist/types/engine/form-engine/render/core/tab-slots.d.ts +25 -0
- package/dist/types/engine/form-engine/render/core/token-style-vars.d.ts +45 -0
- package/dist/types/engine/form-engine/render/icons/builtin-icons.d.ts +24 -0
- package/dist/types/engine/form-engine/render/icons/icon-names.d.ts +67 -0
- package/dist/types/engine/form-engine/render/icons/icon-set.d.ts +102 -0
- package/dist/types/engine/form-engine/render/index.d.ts +68 -0
- package/dist/types/engine/form-engine/render/live/announcer.d.ts +10 -0
- package/dist/types/engine/form-engine/render/live/assets-feature.d.ts +12 -0
- package/dist/types/engine/form-engine/render/live/assets-policy.d.ts +6 -0
- package/dist/types/engine/form-engine/render/live/assets.d.ts +109 -0
- package/dist/types/engine/form-engine/render/live/binding-registry.d.ts +46 -0
- package/dist/types/engine/form-engine/render/live/buttons.d.ts +12 -0
- package/dist/types/engine/form-engine/render/live/chrome.d.ts +15 -0
- package/dist/types/engine/form-engine/render/live/component-text.d.ts +10 -0
- package/dist/types/engine/form-engine/render/live/contract.d.ts +1267 -0
- package/dist/types/engine/form-engine/render/live/data-grid.d.ts +51 -0
- package/dist/types/engine/form-engine/render/live/datum/buttons.d.ts +44 -0
- package/dist/types/engine/form-engine/render/live/datum/choice-fields.d.ts +8 -0
- package/dist/types/engine/form-engine/render/live/datum/chrome-files.d.ts +43 -0
- package/dist/types/engine/form-engine/render/live/datum/chrome.d.ts +49 -0
- package/dist/types/engine/form-engine/render/live/datum/container-kit.d.ts +66 -0
- package/dist/types/engine/form-engine/render/live/datum/containers.d.ts +25 -0
- package/dist/types/engine/form-engine/render/live/datum/content.d.ts +5 -0
- package/dist/types/engine/form-engine/render/live/datum/css.d.ts +40 -0
- package/dist/types/engine/form-engine/render/live/datum/date.d.ts +66 -0
- package/dist/types/engine/form-engine/render/live/datum/default-tokens.d.ts +30 -0
- package/dist/types/engine/form-engine/render/live/datum/field-scaffold.d.ts +131 -0
- package/dist/types/engine/form-engine/render/live/datum/file.d.ts +6 -0
- package/dist/types/engine/form-engine/render/live/datum/frames.d.ts +33 -0
- package/dist/types/engine/form-engine/render/live/datum/grid.d.ts +26 -0
- package/dist/types/engine/form-engine/render/live/datum/groups.d.ts +45 -0
- package/dist/types/engine/form-engine/render/live/datum/icons.d.ts +18 -0
- package/dist/types/engine/form-engine/render/live/datum/leaf-kit.d.ts +17 -0
- package/dist/types/engine/form-engine/render/live/datum/month-names.d.ts +2 -0
- package/dist/types/engine/form-engine/render/live/datum/notice.d.ts +25 -0
- package/dist/types/engine/form-engine/render/live/datum/options.d.ts +133 -0
- package/dist/types/engine/form-engine/render/live/datum/page.d.ts +13 -0
- package/dist/types/engine/form-engine/render/live/datum/parts.d.ts +120 -0
- package/dist/types/engine/form-engine/render/live/datum/signature.d.ts +25 -0
- package/dist/types/engine/form-engine/render/live/datum/steps.d.ts +30 -0
- package/dist/types/engine/form-engine/render/live/datum/summary.d.ts +26 -0
- package/dist/types/engine/form-engine/render/live/datum/tabs.d.ts +23 -0
- package/dist/types/engine/form-engine/render/live/datum/text-fields.d.ts +7 -0
- package/dist/types/engine/form-engine/render/live/datum/tokens.d.ts +1030 -0
- package/dist/types/engine/form-engine/render/live/error-target.d.ts +12 -0
- package/dist/types/engine/form-engine/render/live/field-preview.d.ts +22 -0
- package/dist/types/engine/form-engine/render/live/fields.d.ts +26 -0
- package/dist/types/engine/form-engine/render/live/files.d.ts +20 -0
- package/dist/types/engine/form-engine/render/live/form-notices.d.ts +17 -0
- package/dist/types/engine/form-engine/render/live/guards.d.ts +37 -0
- package/dist/types/engine/form-engine/render/live/journey-page.d.ts +45 -0
- package/dist/types/engine/form-engine/render/live/journey-review.d.ts +50 -0
- package/dist/types/engine/form-engine/render/live/lit.d.ts +48 -0
- package/dist/types/engine/form-engine/render/live/look-classes.d.ts +27 -0
- package/dist/types/engine/form-engine/render/live/media-labels.d.ts +16 -0
- package/dist/types/engine/form-engine/render/live/mount.d.ts +450 -0
- package/dist/types/engine/form-engine/render/live/notices.d.ts +3 -0
- package/dist/types/engine/form-engine/render/live/readonly-sizing.d.ts +14 -0
- package/dist/types/engine/form-engine/render/live/renderer.d.ts +12 -0
- package/dist/types/engine/form-engine/render/live/sources.d.ts +4 -0
- package/dist/types/engine/form-engine/render/live/steps.d.ts +6 -0
- package/dist/types/engine/form-engine/render/live/summary.d.ts +33 -0
- package/dist/types/engine/form-engine/render/live/tabs.d.ts +8 -0
- package/dist/types/engine/form-engine/render/live/tooltips.d.ts +30 -0
- package/dist/types/engine/form-engine/render/pdf/default-layout.d.ts +51 -0
- package/dist/types/engine/form-engine/render/pdf/pdf-abi.d.ts +819 -0
- package/dist/types/engine/form-engine/render/pdf/pdf-agent-signer.d.ts +92 -0
- package/dist/types/engine/form-engine/render/pdf/pdf-attachments.d.ts +76 -0
- package/dist/types/engine/form-engine/render/pdf/pdf-components.d.ts +282 -0
- package/dist/types/engine/form-engine/render/pdf/pdf-designer-styles.d.ts +12 -0
- package/dist/types/engine/form-engine/render/pdf/pdf-document.d.ts +412 -0
- package/dist/types/engine/form-engine/render/pdf/pdf-layout-selection.d.ts +54 -0
- package/dist/types/engine/form-engine/render/pdf/pdf-pages.d.ts +25 -0
- package/dist/types/engine/form-engine/render/pdf/pdf-provider.d.ts +219 -0
- package/dist/types/engine/form-engine/render/pdf/pdf-render-mode.d.ts +2 -0
- package/dist/types/engine/form-engine/render/pdf/pdf-render-model.d.ts +124 -0
- package/dist/types/engine/form-engine/render/pdf/pdf-renditions.d.ts +160 -0
- package/dist/types/engine/form-engine/render/pdf/pdf-service.d.ts +161 -0
- package/dist/types/engine/form-engine/render/pdf/pdf-signer.d.ts +26 -0
- package/dist/types/engine/form-engine/render/pdf/pdf-template-components.d.ts +168 -0
- package/dist/types/engine/form-engine/render/pdf/pdf-template-constants.d.ts +14 -0
- package/dist/types/engine/form-engine/render/pdf/pdf-template.d.ts +84 -0
- package/dist/types/engine/form-engine/render/pdf/pdf-text-addresses.d.ts +20 -0
- package/dist/types/engine/form-engine/render/pdf/pdf-theme-defaults.d.ts +410 -0
- package/dist/types/engine/form-engine/render/pdf/pdf-theme-registry.d.ts +25 -0
- package/dist/types/engine/form-engine/render/pdf/pdf-theme.d.ts +91 -0
- package/dist/types/engine/form-engine/render/pdf/pdf-values.d.ts +47 -0
- package/dist/types/engine/form-engine/render/pdf/standard-renditions.d.ts +33 -0
- package/dist/types/engine/form-engine/render/pdf/template-text.d.ts +52 -0
- package/dist/types/engine/form-engine/render/print/answer-text.d.ts +3 -0
- package/dist/types/engine/form-engine/render/print/basic.d.ts +18 -0
- package/dist/types/engine/form-engine/render/print/datum.d.ts +2 -0
- package/dist/types/engine/form-engine/render/print/document.d.ts +65 -0
- package/dist/types/engine/form-engine/render/print/field-answer.d.ts +47 -0
- package/dist/types/engine/form-engine/render/print/index.d.ts +12 -0
- package/dist/types/engine/form-engine/render/print/model.d.ts +346 -0
- package/dist/types/engine/form-engine/render/print/safe-html.d.ts +41 -0
- package/dist/types/engine/form-engine/render/print/slot-text.d.ts +30 -0
- package/dist/types/engine/form-engine/render/print/theme.d.ts +86 -0
- package/dist/types/engine/form-engine/render/react/interactive-renderer.d.ts +9 -0
- package/dist/types/engine/form-engine/render/readonly/readonly-renderer.d.ts +12 -0
- package/dist/types/engine/form-engine/render/web-component/custom-element-base.d.ts +3 -0
- package/dist/types/engine/form-engine/render/web-component/form-features.d.ts +76 -0
- package/dist/types/engine/form-engine/render/web-component/form-host-element.d.ts +310 -0
- package/dist/types/engine/form-engine/render/web-component/form-renderer-element.d.ts +846 -0
- package/dist/types/engine/form-engine/render/web-component/locale-select-element.d.ts +24 -0
- package/dist/types/engine/form-engine/render/web-component/pdf-download.d.ts +75 -0
- package/dist/types/engine/form-engine/render/web-component/print-frame.d.ts +85 -0
- package/dist/types/engine/form-engine/render/web-component/print-pipeline.d.ts +11 -0
- package/dist/types/engine/form-engine/render/web-component/print-policy.d.ts +2 -0
- package/dist/types/engine/form-engine/render/web-component/submission-download.d.ts +47 -0
- package/dist/types/engine/form-engine/render/web-component/typed-answers.d.ts +26 -0
- package/dist/types/engine/form-engine/render/webauthn/assertion.d.ts +69 -0
- package/dist/types/engine/form-engine/render/webauthn/authenticator-data.d.ts +21 -0
- package/dist/types/engine/form-engine/render/webauthn/errors.d.ts +30 -0
- package/dist/types/engine/form-engine/render/webauthn/registration-verify.d.ts +44 -0
- package/dist/types/engine/form-engine/render/webauthn/registration.d.ts +77 -0
- package/dist/types/engine/form-engine/render/webauthn/signal.d.ts +27 -0
- package/dist/types/engine/form-engine/render/webauthn/signing-provider.d.ts +70 -0
- package/dist/types/engine/form-engine/rules/dependencies/calculation-cycle.d.ts +25 -0
- package/dist/types/engine/form-engine/rules/dependencies/dependency-extractor.d.ts +9 -0
- package/dist/types/engine/form-engine/rules/dependencies/dependency-graph.d.ts +26 -0
- package/dist/types/engine/form-engine/rules/evaluator/evaluator.d.ts +209 -0
- package/dist/types/engine/form-engine/rules/evaluator/functions-date.d.ts +26 -0
- package/dist/types/engine/form-engine/rules/evaluator/functions-list.d.ts +28 -0
- package/dist/types/engine/form-engine/rules/evaluator/functions-number.d.ts +6 -0
- package/dist/types/engine/form-engine/rules/evaluator/functions-text.d.ts +23 -0
- package/dist/types/engine/form-engine/runtime/browser/collection-runtime.d.ts +34 -0
- package/dist/types/engine/form-engine/runtime/browser/draft-read.d.ts +27 -0
- package/dist/types/engine/form-engine/runtime/browser/form-runtime.d.ts +1470 -0
- package/dist/types/engine/form-engine/runtime/browser/form-test-runtime-driver.d.ts +83 -0
- package/dist/types/engine/form-engine/runtime/browser/journey/journey-action.d.ts +42 -0
- package/dist/types/engine/form-engine/runtime/browser/journey/journey-navigation.d.ts +200 -0
- package/dist/types/engine/form-engine/runtime/browser/journey/journey-presentation-overlay.d.ts +69 -0
- package/dist/types/engine/form-engine/runtime/browser/journey/journey-server-checks.d.ts +89 -0
- package/dist/types/engine/form-engine/runtime/browser/journey-engine-eager.d.ts +11 -0
- package/dist/types/engine/form-engine/runtime/browser/journey-engine.d.ts +462 -0
- package/dist/types/engine/form-engine/runtime/browser/path-validation-runs.d.ts +91 -0
- package/dist/types/engine/form-engine/runtime/browser/runtime-orchestrator.d.ts +530 -0
- package/dist/types/engine/form-engine/runtime/browser/submission-key.d.ts +12 -0
- package/dist/types/engine/form-engine/runtime/index.d.ts +8 -0
- package/dist/types/engine/form-engine/validation/core/error-store.d.ts +70 -0
- package/dist/types/engine/form-engine/validation/core/field-constraints.d.ts +293 -0
- package/dist/types/engine/form-engine/validation/core/test-vectors.d.ts +20 -0
- package/dist/types/engine/form-engine/validation/core/validation-pipeline.d.ts +65 -0
- package/dist/types/engine/form-engine/validation/parity/browser-adapter.d.ts +4 -0
- package/dist/types/engine/form-engine/validation/parity/formula-function-parity.d.ts +27 -0
- package/dist/types/engine/form-engine/validation/parity/index.d.ts +7 -0
- package/dist/types/engine/form-engine/validation/parity/parity-runner.d.ts +21 -0
- package/dist/types/engine/form-engine/validation/parity/runtime-adapter.d.ts +9 -0
- package/dist/types/engine/form-engine/validation/parity/server-adapter.d.ts +7 -0
- package/dist/types/engine/form-engine/validation/parity/vectors.d.ts +28 -0
- package/dist/types/engine/form-engine/validation/parity/wasm-adapter.d.ts +9 -0
- package/dist/types/engine/form-engine/validation/server/server-validation.d.ts +49 -0
- package/dist/types/engine/form-engine/validation/wasm/form-test-kernel-driver.d.ts +95 -0
- package/dist/types/engine/form-engine/validation/wasm/in-process-host.d.ts +56 -0
- package/dist/types/engine/form-engine/validation/wasm/portable-kernel.d.ts +1926 -0
- package/dist/types/engine/form-engine/validation/wasm/portable-options.d.ts +282 -0
- package/dist/types/engine/form-engine/validation/wasm/wasm-validation-host.d.ts +429 -0
- package/dist/types/engine/form-engine/verification/gate-inputs.d.ts +26 -0
- package/dist/types/engine/form-engine/verification/release-gates.d.ts +32 -0
- package/dist/types/engine/form-engine/verification/telemetry-bridge.d.ts +15 -0
- package/dist/types/engine/form-engine/verification/telemetry-sinks.d.ts +13 -0
- package/dist/types/engine/form-engine/verification/telemetry.d.ts +29 -0
- package/dist/types/packages/form-test/src/api.d.ts +75 -0
- package/dist/types/packages/form-test/src/args.d.ts +27 -0
- package/dist/types/packages/form-test/src/cli.d.ts +10 -0
- package/dist/types/packages/form-test/src/coverage.d.ts +11 -0
- package/dist/types/packages/form-test/src/drivers.d.ts +23 -0
- package/dist/types/packages/form-test/src/exit-codes.d.ts +17 -0
- package/dist/types/packages/form-test/src/index.d.ts +28 -0
- package/dist/types/packages/form-test/src/load.d.ts +25 -0
- package/dist/types/packages/form-test/src/parity.d.ts +14 -0
- package/dist/types/packages/form-test/src/report/json.d.ts +7 -0
- package/dist/types/packages/form-test/src/report/junit.d.ts +14 -0
- package/dist/types/packages/form-test/src/report/markdown.d.ts +14 -0
- package/dist/types/packages/form-test/src/report/model.d.ts +137 -0
- package/dist/types/packages/form-test/src/report/schema.d.ts +449 -0
- package/dist/types/packages/form-test/src/report/words.d.ts +48 -0
- package/dist/types/packages/form-test/src/run.d.ts +15 -0
- package/dist/types/packages/form-test/src/version.d.ts +3 -0
- package/dist/types/packages/form-test/src/vitest.d.ts +43 -0
- package/dist/types/packages/quickjs-wasm-host/src/fresh-sandbox-host.d.ts +70 -0
- package/dist/types/packages/quickjs-wasm-host/src/heap-recycle.d.ts +44 -0
- package/dist/types/packages/quickjs-wasm-host/src/index.d.ts +4 -0
- package/dist/types/packages/quickjs-wasm-host/src/program-host.d.ts +179 -0
- package/dist/types/packages/quickjs-wasm-host/src/quickjs-wasm-host-adapter.d.ts +218 -0
- package/dist/types/packages/quickjs-wasm-host/src/sandbox-program.d.ts +108 -0
- package/dist/vitest.mjs +189 -0
- package/fixtures/clock.json +35 -0
- package/fixtures/failing.datum-test +2 -0
- package/fixtures/main.datum-test +17 -0
- package/fixtures/main.json +435 -0
- package/package.json +93 -4
|
@@ -0,0 +1,1267 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The binding contract: what a binding hands the live renderer (`mount.ts`) and what the
|
|
3
|
+
* renderer hands each adapter. A binding draws leaf markup only, in its design system's own
|
|
4
|
+
* vocabulary; everything Datum owns (the answers, the rules, validation and its wording, focus,
|
|
5
|
+
* the state hooks, read-only and disabled, rows, tabs, pages) stays the renderer's.
|
|
6
|
+
*
|
|
7
|
+
* - A binding module exports `createBinding(lit, datum)` ({@link BindingFactory}); the host passes
|
|
8
|
+
* the renderer's one lit namespace (`lit.ts`), so a binding never imports lit by specifier and
|
|
9
|
+
* needs it only as a type, and the Datum binding, so a binding wraps or patches one of Datum's
|
|
10
|
+
* adapters rather than copying it.
|
|
11
|
+
* - Adapters are looked up by component type with the chain binding[type] -> binding[base] ->
|
|
12
|
+
* datum[type] -> datum[base] ({@link resolveAdapter}): `base` is the engine type the
|
|
13
|
+
* definition's `kinds` map reads a design system's own type as (`registry/kinds.ts`). Each
|
|
14
|
+
* adapter says which node it draws (`kind`), so a field adapter is never asked to draw a
|
|
15
|
+
* container under the same type.
|
|
16
|
+
* - Capabilities are data: per drawing capability (`registry/capabilities/drawing-capabilities.ts`)
|
|
17
|
+
* an adapter answers `drawn`, `degraded` or `none` (unanswered is `none`), plus behaviour flags
|
|
18
|
+
* saying who runs the keys and who counts characters. The renderer reads every answer: a field's
|
|
19
|
+
* and a container's capability answered `none` and used is recorded in `unsupported()`.
|
|
20
|
+
* - A binding's own tier-2 types and the engine type each reads as (`LiveBinding.kinds`) stand
|
|
21
|
+
* under the definition's `kinds` map in the drawing; a form that uses one without the
|
|
22
|
+
* definition's entry is drawn as the base and reported, since only the definition's map reaches
|
|
23
|
+
* validation and the server.
|
|
24
|
+
* - Adapters receive pre-worded state: blocking errors only in `errors`, warnings and info as
|
|
25
|
+
* `notices`, ids that exist in `describedBy`, the form's words in `words`. No adapter words
|
|
26
|
+
* anything, assembles an IDREF (unless its component writes the ids itself, `idsWrittenBy`)
|
|
27
|
+
* or writes a state hook ({@link STATE_HOOKS}).
|
|
28
|
+
* - Lifecycle per field: select -> render (template) -> after (every draw) -> ready (new fields,
|
|
29
|
+
* budgeted) -> connect (returns its cleanup, run when the field leaves or the form unmounts).
|
|
30
|
+
*
|
|
31
|
+
* Types and pure functions only: nothing here draws, and nothing reaches lit at run time.
|
|
32
|
+
*/
|
|
33
|
+
import type { FormTextResolver } from "../../core/localization/form-texts.js";
|
|
34
|
+
import type { LanguagePackTable } from "../../core/localization/translations.js";
|
|
35
|
+
import { type DrawingCapabilityId, type DrawingSupport } from "../../registry/capabilities/drawing-capabilities.js";
|
|
36
|
+
import { type FieldKind } from "../../registry/kinds.js";
|
|
37
|
+
import type { LayoutSpec, RenderComponentModel } from "../core/component-model.js";
|
|
38
|
+
import type { ReviewAction, ReviewRowStatus } from "../core/journey-review.js";
|
|
39
|
+
import type { PresentationReveal } from "../core/presentation-tree.js";
|
|
40
|
+
import type { PdfThemeDefinition } from "../pdf/pdf-theme-defaults.js";
|
|
41
|
+
import type { StepStatus } from "../../core/schema/steps.js";
|
|
42
|
+
import type { FormNoticeKind } from "../../core/submission/form-notice.js";
|
|
43
|
+
import type { FormFrameDefinition } from "./datum/frames.js";
|
|
44
|
+
import type { Lit, Nothing, TemplateResult } from "./lit.js";
|
|
45
|
+
/**
|
|
46
|
+
* A binding module's one export: the binding, drawn with the lit namespace the host passes in.
|
|
47
|
+
* `datum` is the Datum binding the host mounts behind it as the fallback (`LiveMountOptions.datum`,
|
|
48
|
+
* the same object): a binding takes one of its adapters to wrap or patch (`{ ...datum.components.date,
|
|
49
|
+
* template }`, `datum.components.date.focusTarget`), never copies one. A binding that needs none of
|
|
50
|
+
* Datum's ignores it.
|
|
51
|
+
*/
|
|
52
|
+
export type BindingFactory = (lit: Lit, datum: LiveBinding) => LiveBinding;
|
|
53
|
+
/** What a binding module looks like to a host that loads it (`import("./my-binding.js")`). */
|
|
54
|
+
export interface BindingModule {
|
|
55
|
+
createBinding: BindingFactory;
|
|
56
|
+
}
|
|
57
|
+
/** A template, or nothing drawn. `lit.nothing` is one, destructured or not ({@link Nothing}). */
|
|
58
|
+
export type View = TemplateResult | Nothing;
|
|
59
|
+
/** Which node an adapter draws: a leaf (an input, a button, static content), or one of the containers. */
|
|
60
|
+
export type AdapterKind = "field" | "group" | "tabs" | "grid" | "steps";
|
|
61
|
+
/**
|
|
62
|
+
* An adapter's answers per drawing capability; a capability left out is `none`.
|
|
63
|
+
*
|
|
64
|
+
* - `drawn`: the adapter draws what the state carries for it, as authored, and the renderer adds
|
|
65
|
+
* the behaviour it owns for it. A count the adapter draws (its limit sentence under
|
|
66
|
+
* `characterCount.limitId`, its status) is `drawn` whoever counts: with
|
|
67
|
+
* `behaviour.countsCharacters: "renderer"` (the default) the renderer's announcer reads it out,
|
|
68
|
+
* and it speaks only for a count answered `drawn`.
|
|
69
|
+
* - `degraded`: drawn in a reduced form, which the renderer may complete: a tooltip or a pending
|
|
70
|
+
* word folded into the hint, a notice drawn as hint-styled text with its severity word, row
|
|
71
|
+
* numbers that cannot be turned off. A degraded count is drawn but not announced. A design
|
|
72
|
+
* system's scripted component left on its no-JavaScript baseline is `degraded` only when
|
|
73
|
+
* what it draws is reduced; one whose markup is drawn as its script leaves it, with the
|
|
74
|
+
* behaviour the renderer's (the count, the reveal), is `drawn`.
|
|
75
|
+
* - `none`: not drawn. The renderer leaves the capability's id out of `describedBy` and records
|
|
76
|
+
* `<component id>: <capability>` in `unsupported()` when the form uses it.
|
|
77
|
+
*/
|
|
78
|
+
export type CapabilityAnswers = Readonly<Partial<Record<DrawingCapabilityId, DrawingSupport>>>;
|
|
79
|
+
/**
|
|
80
|
+
* Who does what beside the drawing, where the renderer would otherwise do it. Datum's code-point
|
|
81
|
+
* count and its over-limit error always apply whatever `countsCharacters` says, and no adapter
|
|
82
|
+
* writes `maxlength`. Who draws an error message is not a flag: the renderer draws none, so
|
|
83
|
+
* whatever an adapter draws (its own markup, a component's property) is the field's only one.
|
|
84
|
+
*/
|
|
85
|
+
export interface AdapterBehaviour {
|
|
86
|
+
/** Who runs the keys of a composite (tabs, a listbox): the component, or the renderer. */
|
|
87
|
+
keyboard?: "component" | "renderer";
|
|
88
|
+
/** Who counts and announces a counted field: the component, or the renderer's announcer. */
|
|
89
|
+
countsCharacters?: "component" | "renderer";
|
|
90
|
+
}
|
|
91
|
+
/** The behaviour an adapter has when it says nothing. */
|
|
92
|
+
export declare const DEFAULT_BEHAVIOUR: Readonly<Required<AdapterBehaviour>>;
|
|
93
|
+
/** The answer an adapter gives for one capability: what it says, else `none`. */
|
|
94
|
+
export declare function capabilityOf(adapter: Pick<AdapterBase, "capabilities"> | undefined, capability: DrawingCapabilityId): DrawingSupport;
|
|
95
|
+
/**
|
|
96
|
+
* An adapter's answer for every drawing capability that applies to `kind` (a capability the
|
|
97
|
+
* registry does not ask of that kind is left out): what the builder's inspector shows, hides
|
|
98
|
+
* (`none`) or notes (`degraded`).
|
|
99
|
+
*/
|
|
100
|
+
export declare function capabilityAnswers(adapter: Pick<AdapterBase, "capabilities"> | undefined, kind: FieldKind): Record<DrawingCapabilityId, DrawingSupport>;
|
|
101
|
+
/** An adapter's behaviour with the defaults filled in. */
|
|
102
|
+
export declare function behaviourOf(adapter: Pick<AdapterBase, "behaviour"> | undefined): Required<AdapterBehaviour>;
|
|
103
|
+
/**
|
|
104
|
+
* The form's words for the locale, layered as the engine layers them: the host's texts, the
|
|
105
|
+
* form's `texts` translations, the binding's language pack, then the engine's English. What an
|
|
106
|
+
* adapter calls for a word it draws itself ("(optional)", a date's "Day", a notice's
|
|
107
|
+
* "Warning: "); no word is written into a template.
|
|
108
|
+
*/
|
|
109
|
+
export type Words = FormTextResolver;
|
|
110
|
+
/** How a whole form is drawn: live; read-only (looks live, takes nothing, no summary); disabled (greyed out). */
|
|
111
|
+
export type LiveMode = "interactive" | "readonly" | "disabled";
|
|
112
|
+
/** What the form is busy with: the renderer sets `aria-busy` on the form, and button adapters draw `aria-disabled`. */
|
|
113
|
+
export type FormBusy = "submitting" | "validating" | "navigating";
|
|
114
|
+
/** The form as a whole, as one draw sees it. */
|
|
115
|
+
export interface FormDrawState {
|
|
116
|
+
mode: LiveMode;
|
|
117
|
+
locale: string;
|
|
118
|
+
dir: "ltr" | "rtl";
|
|
119
|
+
busy: FormBusy | undefined;
|
|
120
|
+
colorScheme: "light" | "dark";
|
|
121
|
+
/**
|
|
122
|
+
* The form is being printed (`LiveContext.setPrinting`): a container that pages its content
|
|
123
|
+
* (steps, tabs) draws every panel, headed and in order, with no indicator or buttons.
|
|
124
|
+
*/
|
|
125
|
+
printing: boolean;
|
|
126
|
+
words: Words;
|
|
127
|
+
}
|
|
128
|
+
/** A warning or info message on a field: never blocking, never in the summary, never drawn as an error. */
|
|
129
|
+
export interface FieldNotice {
|
|
130
|
+
code: string;
|
|
131
|
+
severity: "warning" | "info";
|
|
132
|
+
message: string;
|
|
133
|
+
}
|
|
134
|
+
/** Where a field drawn in a row of a collection sits. */
|
|
135
|
+
export interface FieldRow {
|
|
136
|
+
/** 0-based. */
|
|
137
|
+
index: number;
|
|
138
|
+
/** The row's label ("Row 2", "Child 2"). */
|
|
139
|
+
label: string;
|
|
140
|
+
/** The row's stable identity, when the runtime keeps one. */
|
|
141
|
+
rowKey?: string;
|
|
142
|
+
collectionPath: string;
|
|
143
|
+
/** The collection-bound container's component id. */
|
|
144
|
+
ownerId: string;
|
|
145
|
+
}
|
|
146
|
+
/** Where a field's choices come from a data source that has not answered, failed, or was cut to the cap. */
|
|
147
|
+
export type FieldSource = "loading" | "error" | "truncated";
|
|
148
|
+
/**
|
|
149
|
+
* What the renderer has resolved about one field, common to every adapter. Ids are the engine's
|
|
150
|
+
* (`AccessibilitySemantics`); `describedBy` lists only ids this field's drawing carries (an id
|
|
151
|
+
* for a capability the adapter answers `none` is left out).
|
|
152
|
+
*/
|
|
153
|
+
export interface FieldState {
|
|
154
|
+
/** The instance: the component id, or a row-scoped key inside a row. Instances, wrappers and hooks go by it. */
|
|
155
|
+
key: string;
|
|
156
|
+
componentId: string;
|
|
157
|
+
/** The type written on the component. */
|
|
158
|
+
type: string;
|
|
159
|
+
/** The engine type it is read as (itself for an engine type). */
|
|
160
|
+
base: string;
|
|
161
|
+
/** How its answer reads; absent for a type that holds no answer (a button, static HTML, an image). */
|
|
162
|
+
kind?: FieldKind;
|
|
163
|
+
/** The control's id: what a label's `for` names. */
|
|
164
|
+
id: string;
|
|
165
|
+
/** A name for a control that wants one (a radio group's shared name): unique per instance. */
|
|
166
|
+
name: string;
|
|
167
|
+
/** Where the answer is stored. */
|
|
168
|
+
valuePath: string;
|
|
169
|
+
label: string;
|
|
170
|
+
labelId: string;
|
|
171
|
+
hideLabel: boolean;
|
|
172
|
+
/** Help text: the description (and what the renderer folds in for a capability the adapter answers `degraded`). */
|
|
173
|
+
hint?: string;
|
|
174
|
+
/** The id the hint must carry; present with `hint`. */
|
|
175
|
+
hintId?: string;
|
|
176
|
+
/**
|
|
177
|
+
* On a journey page, the line saying the value is worked out from other answers (the
|
|
178
|
+
* `workedOut` form text): an adapter answering `workedOut` `drawn` draws it as its own
|
|
179
|
+
* element carrying `workedOutId`, which `describedBy` names after the hint. Otherwise the
|
|
180
|
+
* renderer draws it in the field's wrapper after the adapter's drawing (`none`), or folds it into
|
|
181
|
+
* the hint (`degraded`, for a component that words its own description).
|
|
182
|
+
*/
|
|
183
|
+
workedOut?: string;
|
|
184
|
+
/** The id the worked-out line carries; present with `workedOut`. */
|
|
185
|
+
workedOutId?: string;
|
|
186
|
+
/** The stored answer as text: `""` for no answer and for an answer that is no scalar. */
|
|
187
|
+
value: string;
|
|
188
|
+
/** The stored answer as it is. */
|
|
189
|
+
answer: unknown;
|
|
190
|
+
required: boolean;
|
|
191
|
+
readOnly: boolean;
|
|
192
|
+
disabled: boolean;
|
|
193
|
+
/** A blocking error is shown on the field: what `aria-invalid` says. Warnings and info never set it. */
|
|
194
|
+
invalid: boolean;
|
|
195
|
+
/** The blocking errors, worded, when the form shows errors on fields; empty otherwise. */
|
|
196
|
+
errors: readonly string[];
|
|
197
|
+
/** `errors` joined, for a component that takes one message. */
|
|
198
|
+
message?: string;
|
|
199
|
+
/** The id the error message must carry; present when `errors` is not empty. */
|
|
200
|
+
errorId?: string;
|
|
201
|
+
/** Warnings and info, worded. */
|
|
202
|
+
notices: readonly FieldNotice[];
|
|
203
|
+
/** The id the notices must carry (`${id}__notice`); present when `notices` is not empty. */
|
|
204
|
+
noticeId?: string;
|
|
205
|
+
/** The ids that describe the control, in the engine's order: description, worked-out line, notices, count, error. */
|
|
206
|
+
describedBy: readonly string[];
|
|
207
|
+
/** An async check covering this field's answer is running. */
|
|
208
|
+
pending: boolean;
|
|
209
|
+
/** The state of a data source the field's choices come from, when it is not plainly answered. */
|
|
210
|
+
source?: FieldSource;
|
|
211
|
+
/** The form is busy (a submit, a whole-form check, a page change): a button draws `aria-disabled`. */
|
|
212
|
+
busy: FormBusy | undefined;
|
|
213
|
+
/** A counted field holds more characters than its limit. */
|
|
214
|
+
overLimit: boolean;
|
|
215
|
+
locale: string;
|
|
216
|
+
dir: "ltr" | "rtl";
|
|
217
|
+
/** The author's classes (`configuration.cssClass`); the renderer puts them on the field's wrapper. */
|
|
218
|
+
classNames: readonly string[];
|
|
219
|
+
/** In a row of a collection: which row. */
|
|
220
|
+
row?: FieldRow;
|
|
221
|
+
/** The tabs and steps that must be open for the field to be seen, outermost first. */
|
|
222
|
+
reveal: readonly PresentationReveal[];
|
|
223
|
+
mode: LiveMode;
|
|
224
|
+
words: Words;
|
|
225
|
+
/**
|
|
226
|
+
* One of the component's own configuration texts (`configuration[property]`, a string in the
|
|
227
|
+
* form's default language) worded for the locale: the form's translation at
|
|
228
|
+
* `components › <id> › <property>`, the host catalog's over it, else the authored string. What a plugin's or a binding's adapter draws for a property of its own type (a
|
|
229
|
+
* card's `title`); `undefined` when the component authors no such text.
|
|
230
|
+
*/
|
|
231
|
+
text(property: string): string | undefined;
|
|
232
|
+
/** The engine's model, for what no state member carries (a plugin type's own configuration). */
|
|
233
|
+
model: RenderComponentModel;
|
|
234
|
+
}
|
|
235
|
+
/** A counted field's figures and the words Datum uses for them. */
|
|
236
|
+
export interface CharacterCount {
|
|
237
|
+
max: number;
|
|
238
|
+
count: number;
|
|
239
|
+
/** Negative when over. */
|
|
240
|
+
left: number;
|
|
241
|
+
over: boolean;
|
|
242
|
+
/** "You can enter up to 200 characters": told to assistive technology with the hint. */
|
|
243
|
+
limit: string;
|
|
244
|
+
/** The id the limit sentence carries (`describedBy` holds it). */
|
|
245
|
+
limitId: string;
|
|
246
|
+
/** "180 characters left" / "3 characters over limit": the visible count, and what is announced. */
|
|
247
|
+
status: string;
|
|
248
|
+
}
|
|
249
|
+
/** A text box. */
|
|
250
|
+
export interface TextFieldState extends FieldState {
|
|
251
|
+
placeholder?: string;
|
|
252
|
+
prefix?: string;
|
|
253
|
+
suffix?: string;
|
|
254
|
+
tooltip?: string;
|
|
255
|
+
characterCount?: CharacterCount;
|
|
256
|
+
autocomplete?: string;
|
|
257
|
+
inputMode?: string;
|
|
258
|
+
spellcheck?: boolean;
|
|
259
|
+
/** Hints for the browser; Datum runs the checks. Never written as `maxlength`. */
|
|
260
|
+
minLength?: number;
|
|
261
|
+
maxLength?: number;
|
|
262
|
+
pattern?: string;
|
|
263
|
+
}
|
|
264
|
+
export interface TextareaFieldState extends TextFieldState {
|
|
265
|
+
/** How many lines the box opens with. */
|
|
266
|
+
rows?: number;
|
|
267
|
+
}
|
|
268
|
+
export interface NumberFieldState extends TextFieldState {
|
|
269
|
+
min?: number;
|
|
270
|
+
max?: number;
|
|
271
|
+
step?: number;
|
|
272
|
+
/**
|
|
273
|
+
* Whether `text` in a text box drawn for this number already stands for the stored answer
|
|
274
|
+
* (`value` itself, or text the renderer reads with the form's locale as the stored number:
|
|
275
|
+
* "1,000" for 1000, "2,5" in French for 2.5, "0002" for 2). Such a box is left as typed, so the
|
|
276
|
+
* caret keeps its place; any other text is replaced with `value`. The renderer's reading, the
|
|
277
|
+
* one `on.input(text, { typed: "number" })` stores with.
|
|
278
|
+
*/
|
|
279
|
+
standsFor(text: string): boolean;
|
|
280
|
+
}
|
|
281
|
+
/** One choice. `id` is unique per option, for a label's `for` and a hint's id. */
|
|
282
|
+
export interface ChoiceOption {
|
|
283
|
+
id: string;
|
|
284
|
+
value: string;
|
|
285
|
+
label: string;
|
|
286
|
+
hint?: string;
|
|
287
|
+
hintId?: string;
|
|
288
|
+
/** Checked (radio, checkbox) or selected (select). */
|
|
289
|
+
checked: boolean;
|
|
290
|
+
}
|
|
291
|
+
/** A choice of one: radios. */
|
|
292
|
+
export interface RadioFieldState extends FieldState {
|
|
293
|
+
options: readonly ChoiceOption[];
|
|
294
|
+
}
|
|
295
|
+
/** A choice of one from a list that drops down. */
|
|
296
|
+
export interface SelectFieldState extends FieldState {
|
|
297
|
+
options: readonly ChoiceOption[];
|
|
298
|
+
/** The empty first option's words. */
|
|
299
|
+
emptyLabel: string;
|
|
300
|
+
placeholder?: string;
|
|
301
|
+
}
|
|
302
|
+
/**
|
|
303
|
+
* Any number of choices. Datum stores one boolean per option; `selected` is the chosen values,
|
|
304
|
+
* and the adapter reports the list back with `on.input`.
|
|
305
|
+
*/
|
|
306
|
+
export interface CheckboxesFieldState extends FieldState {
|
|
307
|
+
options: readonly ChoiceOption[];
|
|
308
|
+
selected: readonly string[];
|
|
309
|
+
}
|
|
310
|
+
/** A single checkbox. */
|
|
311
|
+
export interface CheckboxFieldState extends FieldState {
|
|
312
|
+
checked: boolean;
|
|
313
|
+
}
|
|
314
|
+
/** A date's three parts as typed, each possibly empty. */
|
|
315
|
+
export interface DateParts {
|
|
316
|
+
year: string;
|
|
317
|
+
month: string;
|
|
318
|
+
day: string;
|
|
319
|
+
}
|
|
320
|
+
/**
|
|
321
|
+
* A date. Datum stores a whole `YYYY-MM-DD` or nothing; `parts` is what the boxes show, which
|
|
322
|
+
* for a date typed in part is what was typed, not the empty answer stored.
|
|
323
|
+
*/
|
|
324
|
+
export interface DateFieldState extends FieldState {
|
|
325
|
+
parts: DateParts;
|
|
326
|
+
/**
|
|
327
|
+
* The parts a date typed in part still lacks, in the order the adapter drawing it puts them
|
|
328
|
+
* (`LiveBinding.dateOrder` of the binding that adapter came from; focus goes to the first).
|
|
329
|
+
*/
|
|
330
|
+
missingParts: readonly DatePartName[];
|
|
331
|
+
}
|
|
332
|
+
/** One part of a date. */
|
|
333
|
+
export type DatePartName = keyof DateParts;
|
|
334
|
+
/** One stored attachment of a file field. */
|
|
335
|
+
export interface FileItem {
|
|
336
|
+
id: string;
|
|
337
|
+
name: string;
|
|
338
|
+
size?: number;
|
|
339
|
+
type?: string;
|
|
340
|
+
/** The bytes are in the answer itself (base64), so the name can be offered as a download (`on.download`). */
|
|
341
|
+
downloadable?: boolean;
|
|
342
|
+
}
|
|
343
|
+
/** A file field. */
|
|
344
|
+
export interface FileFieldState extends FieldState {
|
|
345
|
+
files: readonly FileItem[];
|
|
346
|
+
multiple: boolean;
|
|
347
|
+
accept?: string;
|
|
348
|
+
}
|
|
349
|
+
/** A button. */
|
|
350
|
+
export interface ButtonFieldState extends FieldState {
|
|
351
|
+
action: string | undefined;
|
|
352
|
+
variant?: string;
|
|
353
|
+
size?: string;
|
|
354
|
+
}
|
|
355
|
+
/** How `on.input` hears a value. */
|
|
356
|
+
export interface FieldInputOptions {
|
|
357
|
+
/** Written while the person types: the runtime hears a commit only when the field is left. */
|
|
358
|
+
interim?: boolean;
|
|
359
|
+
/** With an empty value: a native number box holds text the browser could not read. */
|
|
360
|
+
badInput?: boolean;
|
|
361
|
+
/**
|
|
362
|
+
* `"number"`: the value is the text as typed in a text box drawn for a number field (a design
|
|
363
|
+
* system's text input asking for a number keyboard), and the renderer reads it with the form's
|
|
364
|
+
* locale, as Datum's own text-drawn number does: "1,000" and "1 000" are 1000, "2,5" in French
|
|
365
|
+
* is 2.5. Text that reads as a number is stored as that number, an emptied box as the empty
|
|
366
|
+
* string, and anything else as typed, so validation says "number" ("abc"). Pair it with
|
|
367
|
+
* {@link NumberFieldState.standsFor} when the value is written back into the box. A binding
|
|
368
|
+
* never reads the text itself: the reading is the renderer's, the same under every binding.
|
|
369
|
+
* A native `type="number"` box reports its own number and needs none of this.
|
|
370
|
+
*/
|
|
371
|
+
typed?: "number";
|
|
372
|
+
}
|
|
373
|
+
/**
|
|
374
|
+
* How a field reports what the person did. The renderer drops every write (`input`, `parts`,
|
|
375
|
+
* `commit`, `files`, `remove`) while the form is not live or the field is read-only or disabled,
|
|
376
|
+
* and draws the stored answer back.
|
|
377
|
+
*/
|
|
378
|
+
export interface FieldEvents {
|
|
379
|
+
/**
|
|
380
|
+
* A new value, in the type the field reports (a string; a number for a number box; the chosen
|
|
381
|
+
* values for checkboxes). `interim` while typing. `badInput` with an empty value: the box
|
|
382
|
+
* holds text the browser could not read as a number, so validation says "number"
|
|
383
|
+
* rather than "required". `typed: "number"` with the text as typed in a text box drawn for a
|
|
384
|
+
* number: the renderer reads it (see {@link FieldInputOptions.typed}).
|
|
385
|
+
*/
|
|
386
|
+
input(value: unknown, options?: FieldInputOptions): void;
|
|
387
|
+
/**
|
|
388
|
+
* A date's parts as typed: the renderer composes the answer, keeps a date typed in part, and
|
|
389
|
+
* tells validation what is missing. `interim` while a box is being typed in, like `input`.
|
|
390
|
+
*/
|
|
391
|
+
parts(parts: DateParts, options?: {
|
|
392
|
+
interim?: boolean;
|
|
393
|
+
}): void;
|
|
394
|
+
/**
|
|
395
|
+
* The field was left or its value settled. The runtime hears it as a commit only when the
|
|
396
|
+
* field was being typed in (an interim write came before), and the leave-field check
|
|
397
|
+
* (`validatePath`, per the form's `validateOn`) runs either way.
|
|
398
|
+
*/
|
|
399
|
+
commit(): void;
|
|
400
|
+
/**
|
|
401
|
+
* Files picked or dropped (a file field). The adapter reads `input.files` into an array, calls
|
|
402
|
+
* this, and clears the input, so picking the same file again is heard.
|
|
403
|
+
*/
|
|
404
|
+
files?(files: readonly File[]): void;
|
|
405
|
+
/** An attachment removed (a file field). */
|
|
406
|
+
remove?(id: string): void;
|
|
407
|
+
/** An attachment asked for (a file field); allowed read-only. */
|
|
408
|
+
download?(id: string): void;
|
|
409
|
+
}
|
|
410
|
+
/** What every adapter has. */
|
|
411
|
+
export interface AdapterBase<State = unknown> {
|
|
412
|
+
kind: AdapterKind;
|
|
413
|
+
/** A name for the inspector and the conformance report. */
|
|
414
|
+
name?: string;
|
|
415
|
+
/**
|
|
416
|
+
* When several adapters are given for one type, the first whose `when` holds draws; one
|
|
417
|
+
* without `when` is the default. A field whose answer changes adapter between draws gets
|
|
418
|
+
* new nodes. A `when` that throws is reported (`datum-binding-error`, hook `when`) and counts
|
|
419
|
+
* as not holding.
|
|
420
|
+
*/
|
|
421
|
+
when?(state: State): boolean;
|
|
422
|
+
capabilities?: CapabilityAnswers;
|
|
423
|
+
behaviour?: AdapterBehaviour;
|
|
424
|
+
}
|
|
425
|
+
/** Draws a leaf: an input, a choice, a date, a file field, a button, static content. */
|
|
426
|
+
export interface FieldAdapter<State extends FieldState = FieldState> extends AdapterBase<State> {
|
|
427
|
+
kind: "field";
|
|
428
|
+
template(state: State, on: FieldEvents): TemplateResult;
|
|
429
|
+
/**
|
|
430
|
+
* After every draw of the field, before it is painted, given its wrapper: a small touch no
|
|
431
|
+
* attribute reaches. Runs again once `ready` resolves, so it must be safe to repeat.
|
|
432
|
+
*/
|
|
433
|
+
after?(field: HTMLElement, state: State): void;
|
|
434
|
+
/** Resolves when the field's component has drawn itself: the renderer waits, budgeted. Left out, the binding's `ready`. */
|
|
435
|
+
ready?(field: HTMLElement): Promise<void>;
|
|
436
|
+
/** Once, after `ready`: what lives as long as the field (a listener outside the template, a design system's scoped init). Returns its cleanup. */
|
|
437
|
+
connect?(field: HTMLElement, state: State): (() => void) | void;
|
|
438
|
+
/** Where focus goes (a summary link, an error, a new row), given the wrapper. Left out, the binding's, else the renderer's. */
|
|
439
|
+
focusTarget?(field: HTMLElement, state: State): HTMLElement | null | undefined;
|
|
440
|
+
/** A guard for a custom control the renderer's read-only guards cannot reach (a listbox of buttons). Returns its cleanup. */
|
|
441
|
+
guard?(field: HTMLElement): (() => void) | void;
|
|
442
|
+
/**
|
|
443
|
+
* Who writes the ids the state names (`describedBy`: the hint, the notices, the count's limit,
|
|
444
|
+
* the error): the binding's markup (the default), or the design system's component itself,
|
|
445
|
+
* which writes ids of its own inside its shadow root (`hint-<id>`) and is told the words by
|
|
446
|
+
* property. For `binding`, the renderer checks after every draw that each id in `describedBy`
|
|
447
|
+
* is carried by an element of the form, and reports one that is not (`datum-binding-error`,
|
|
448
|
+
* hook `ids`, once per field and id): a description the control names and nothing carries.
|
|
449
|
+
*/
|
|
450
|
+
idsWrittenBy?: "binding" | "component";
|
|
451
|
+
}
|
|
452
|
+
/** A container's own words; never its children's, which come drawn. */
|
|
453
|
+
export interface GroupState {
|
|
454
|
+
/** The component id. */
|
|
455
|
+
id: string;
|
|
456
|
+
key: string;
|
|
457
|
+
type: string;
|
|
458
|
+
base: string;
|
|
459
|
+
/** Absent when the author gave no name: a plain group with nothing to read out. */
|
|
460
|
+
legend?: string;
|
|
461
|
+
hint?: string;
|
|
462
|
+
hintId?: string;
|
|
463
|
+
hideLegend: boolean;
|
|
464
|
+
legendMark?: "required" | "optional";
|
|
465
|
+
/** 1 for a container directly in the form or page; for a heading size. */
|
|
466
|
+
level: number;
|
|
467
|
+
layout: LayoutSpec;
|
|
468
|
+
/** A layout grid's authored column spans out of 12 tracks (`6,4,2`), one per column in slot order; absent for equal columns. */
|
|
469
|
+
spans?: readonly number[];
|
|
470
|
+
classNames: readonly string[];
|
|
471
|
+
/**
|
|
472
|
+
* The engine's model, for what no state member carries (a plugin container's own
|
|
473
|
+
* configuration, a design-time face's settings), as `FieldState.model` is for a field.
|
|
474
|
+
*/
|
|
475
|
+
model?: RenderComponentModel;
|
|
476
|
+
/** Every slot, drawn and keyed by the renderer, in drawn order. */
|
|
477
|
+
slots: ReadonlyArray<{
|
|
478
|
+
slotId: string;
|
|
479
|
+
content: TemplateResult;
|
|
480
|
+
}>;
|
|
481
|
+
/** Every child on its own, drawn and keyed, across the slots in drawn order: a list draws one item per child (a button group as a `<ul>`). */
|
|
482
|
+
items: readonly GroupItem[];
|
|
483
|
+
/** Draws the items keyed by the renderer: use it rather than mapping `items`. */
|
|
484
|
+
eachItem(draw: (item: GroupItem) => TemplateResult): TemplateResult;
|
|
485
|
+
locale: string;
|
|
486
|
+
dir: "ltr" | "rtl";
|
|
487
|
+
words: Words;
|
|
488
|
+
/** One of the container's own configuration texts worded for the locale, as `FieldState.text` words a field's. */
|
|
489
|
+
text(property: string): string | undefined;
|
|
490
|
+
}
|
|
491
|
+
/** One child of a container, drawn: a field in its wrapper, or a container in its own. */
|
|
492
|
+
export interface GroupItem {
|
|
493
|
+
/** The node's key; stable across draws. */
|
|
494
|
+
key: string;
|
|
495
|
+
content: TemplateResult;
|
|
496
|
+
}
|
|
497
|
+
/** Draws a container around its children, which the renderer drew; the adapter only says where they go. */
|
|
498
|
+
export interface GroupAdapter extends AdapterBase<GroupState> {
|
|
499
|
+
kind: "group";
|
|
500
|
+
template(state: GroupState, children: TemplateResult): TemplateResult;
|
|
501
|
+
/**
|
|
502
|
+
* For an adapter drawing the form root as no group: the renderer then names the `<form>`
|
|
503
|
+
* element itself (`aria-label`) by the root's label, one name for the whole form instead of a
|
|
504
|
+
* legend said again with each field. Left out, the adapter draws the root's name (a legend).
|
|
505
|
+
*/
|
|
506
|
+
formLabelled?: true;
|
|
507
|
+
}
|
|
508
|
+
/** One tab as the renderer resolved it. */
|
|
509
|
+
export interface TabState {
|
|
510
|
+
slotId: string;
|
|
511
|
+
label: string;
|
|
512
|
+
selected: boolean;
|
|
513
|
+
/** The id the tab element must carry: the renderer runs the keys by it. */
|
|
514
|
+
tabId: string;
|
|
515
|
+
/** The id the panel must carry. */
|
|
516
|
+
panelId: string;
|
|
517
|
+
/**
|
|
518
|
+
* Blocking errors inside the panel. Worded by the `tabHasErrors` form text, counted
|
|
519
|
+
* (`words.plural("tabHasErrors", errorCount, { count: errorCount })`: "2 errors"), for a tab
|
|
520
|
+
* that says it holds errors.
|
|
521
|
+
*/
|
|
522
|
+
errorCount: number;
|
|
523
|
+
/** Shows this tab. */
|
|
524
|
+
select(): void;
|
|
525
|
+
/** The panel's content, drawn and keyed. Every panel is drawn; all but the selected one hidden. */
|
|
526
|
+
content: TemplateResult;
|
|
527
|
+
}
|
|
528
|
+
export interface TabsState extends Omit<GroupState, "slots" | "items" | "eachItem" | "layout" | "spans" | "legendMark"> {
|
|
529
|
+
tabs: readonly TabState[];
|
|
530
|
+
/** Below the width the tabs fit (`LiveBinding.tabsNarrowBelow`): the renderer's narrow view, a contents list over the stacked panels. */
|
|
531
|
+
narrow: boolean;
|
|
532
|
+
/**
|
|
533
|
+
* Every tab is drawn headed by its label, in order, with no strip: a review (`readonly` mode)
|
|
534
|
+
* or a print. Every `TabState.selected` is true and `select` does nothing.
|
|
535
|
+
*/
|
|
536
|
+
flat: boolean;
|
|
537
|
+
}
|
|
538
|
+
/** Draws a tabs container. Which tab shows, the arrow keys and opening a tab for an error are the renderer's. */
|
|
539
|
+
export interface TabsAdapter extends AdapterBase<TabsState> {
|
|
540
|
+
kind: "tabs";
|
|
541
|
+
template(state: TabsState): TemplateResult;
|
|
542
|
+
}
|
|
543
|
+
/** One column of a data grid. */
|
|
544
|
+
export interface GridColumn {
|
|
545
|
+
id: string;
|
|
546
|
+
label: string;
|
|
547
|
+
required: boolean;
|
|
548
|
+
/** A width hint (a CSS length or fraction) from the column's configuration. */
|
|
549
|
+
width?: string;
|
|
550
|
+
}
|
|
551
|
+
/** One cell: a column's components in this row, drawn. */
|
|
552
|
+
export interface GridCell {
|
|
553
|
+
columnId: string;
|
|
554
|
+
content: TemplateResult;
|
|
555
|
+
/** The cell holds a container, not fields directly: its fields keep their labels, which name them inside it. */
|
|
556
|
+
group?: boolean;
|
|
557
|
+
}
|
|
558
|
+
/** One row of a data grid. */
|
|
559
|
+
export interface GridRow {
|
|
560
|
+
/** 0-based. */
|
|
561
|
+
index: number;
|
|
562
|
+
/** The row's identity, for keying. */
|
|
563
|
+
key: string;
|
|
564
|
+
label: string;
|
|
565
|
+
cells: readonly GridCell[];
|
|
566
|
+
/** Present when the row can be removed now. */
|
|
567
|
+
remove?: () => void;
|
|
568
|
+
moveUp?: () => void;
|
|
569
|
+
moveDown?: () => void;
|
|
570
|
+
}
|
|
571
|
+
export interface GridState extends Omit<GroupState, "slots" | "items" | "eachItem" | "layout" | "spans"> {
|
|
572
|
+
/**
|
|
573
|
+
* The layout to draw: `table` for an author's `table` or `auto`, `stacked` for `stacked` and a
|
|
574
|
+
* repeating section, and `stacked` whatever the author chose for an adapter that draws no table
|
|
575
|
+
* (`GridAdapter.layouts`). In `table` the cells' fields come with their labels hidden (the
|
|
576
|
+
* column headings name them); in `stacked` they keep them.
|
|
577
|
+
*/
|
|
578
|
+
layout: GridLayout;
|
|
579
|
+
/**
|
|
580
|
+
* The author left the layout to the form (`auto`): a table while the grid is wide, stacked
|
|
581
|
+
* when it is not. `layout` is then `table`; a binding that cannot change with the width draws
|
|
582
|
+
* that, one that can (Datum's, by container query) draws the setting itself. Never true for an
|
|
583
|
+
* adapter that draws no table.
|
|
584
|
+
*/
|
|
585
|
+
responsive: boolean;
|
|
586
|
+
columns: readonly GridColumn[];
|
|
587
|
+
showHeader: boolean;
|
|
588
|
+
showRowNumbers: boolean;
|
|
589
|
+
rows: readonly GridRow[];
|
|
590
|
+
/** Draws the rows keyed by the renderer: use it rather than mapping `rows`. */
|
|
591
|
+
eachRow(draw: (row: GridRow) => TemplateResult): TemplateResult;
|
|
592
|
+
/**
|
|
593
|
+
* The row buttons the grid offers at all (a live form only). A button it offers but cannot
|
|
594
|
+
* press now (`add`, `remove`, `moveUp`, `moveDown` absent: a bound, a locked grid) is drawn
|
|
595
|
+
* disabled; one it does not offer is not drawn.
|
|
596
|
+
*/
|
|
597
|
+
offers: {
|
|
598
|
+
add: boolean;
|
|
599
|
+
remove: boolean;
|
|
600
|
+
reorder: boolean;
|
|
601
|
+
};
|
|
602
|
+
/** Present when a row can be added now. */
|
|
603
|
+
add?: () => void;
|
|
604
|
+
/** The id the Add button must carry: focus goes to it when the last row is removed. */
|
|
605
|
+
addId: string;
|
|
606
|
+
captions: {
|
|
607
|
+
add: string;
|
|
608
|
+
remove: string;
|
|
609
|
+
moveUp: string;
|
|
610
|
+
moveDown: string;
|
|
611
|
+
empty: string;
|
|
612
|
+
actions: string;
|
|
613
|
+
};
|
|
614
|
+
/** The grid's own blocking errors, then each cell error no drawn row owns, worded. */
|
|
615
|
+
errors: readonly string[];
|
|
616
|
+
errorId?: string;
|
|
617
|
+
}
|
|
618
|
+
/** How a data grid lays out its rows: a table under column headings, or one block per row. */
|
|
619
|
+
export type GridLayout = "table" | "stacked";
|
|
620
|
+
/**
|
|
621
|
+
* Draws a data grid or a repeating section. Rows, bounds and focus after a row button are the
|
|
622
|
+
* renderer's. The adapter is chosen before the rows are drawn (its `layouts` decide whether the
|
|
623
|
+
* cells' labels are hidden), so its `when` sees the grid's state with every cell's `content`
|
|
624
|
+
* still empty.
|
|
625
|
+
*/
|
|
626
|
+
export interface GridAdapter extends AdapterBase<GridState> {
|
|
627
|
+
kind: "grid";
|
|
628
|
+
/**
|
|
629
|
+
* The layouts it draws; left out, both. One that draws no table (a design system with no table
|
|
630
|
+
* of inputs: rows as stacked fieldsets) is handed `layout: "stacked"` whatever the author chose,
|
|
631
|
+
* with the cells' labels kept, since no column heading would name them.
|
|
632
|
+
*/
|
|
633
|
+
layouts?: readonly GridLayout[];
|
|
634
|
+
template(state: GridState): TemplateResult;
|
|
635
|
+
}
|
|
636
|
+
/** One step of a steps container. */
|
|
637
|
+
export interface StepState {
|
|
638
|
+
id: string;
|
|
639
|
+
label: string;
|
|
640
|
+
status: StepStatus;
|
|
641
|
+
statusText: string;
|
|
642
|
+
/** "Step 2 of 3". */
|
|
643
|
+
tag: string;
|
|
644
|
+
shown: boolean;
|
|
645
|
+
hideLabel: boolean;
|
|
646
|
+
classNames: readonly string[];
|
|
647
|
+
/** The id the step's heading must carry (`tabindex="-1"`): focus goes to it when the step opens. */
|
|
648
|
+
headingId: string;
|
|
649
|
+
/** The step's components, drawn in a wrapper that holds the DOM contract (`data-container-id` is the step's id). */
|
|
650
|
+
content: TemplateResult;
|
|
651
|
+
/** Present when the step can be opened from the indicator: a step already reached (or any, on the builder canvas). */
|
|
652
|
+
select?: () => void;
|
|
653
|
+
}
|
|
654
|
+
export interface StepsState extends Omit<GroupState, "slots" | "items" | "eachItem" | "layout" | "spans" | "legend" | "hint" | "hintId" | "hideLegend" | "legendMark"> {
|
|
655
|
+
/** Every step, drawn: all but the shown one hidden by the adapter (`hidden`). Keyed by `eachStep`. */
|
|
656
|
+
steps: readonly StepState[];
|
|
657
|
+
/** Draws the steps keyed by the renderer: use it rather than mapping `steps`. */
|
|
658
|
+
eachStep(draw: (step: StepState) => TemplateResult): TemplateResult;
|
|
659
|
+
/**
|
|
660
|
+
* Every step is drawn headed, in order, and the container draws no indicator, progress line or
|
|
661
|
+
* buttons: a review (`readonly` mode) or a print. `back`, `next` and every `select` are absent.
|
|
662
|
+
*/
|
|
663
|
+
flat: boolean;
|
|
664
|
+
activeStepId: string | undefined;
|
|
665
|
+
progress: string;
|
|
666
|
+
/** What the container holds beside its steps, drawn. */
|
|
667
|
+
others: TemplateResult;
|
|
668
|
+
back?: {
|
|
669
|
+
label: string;
|
|
670
|
+
go(): void;
|
|
671
|
+
};
|
|
672
|
+
next?: {
|
|
673
|
+
label: string;
|
|
674
|
+
go(): void;
|
|
675
|
+
};
|
|
676
|
+
busy: boolean;
|
|
677
|
+
}
|
|
678
|
+
/** Draws a steps container: the indicator, the shown step and Back/Continue. Navigation and focus are the renderer's. */
|
|
679
|
+
export interface StepsAdapter extends AdapterBase<StepsState> {
|
|
680
|
+
kind: "steps";
|
|
681
|
+
template(state: StepsState): TemplateResult;
|
|
682
|
+
}
|
|
683
|
+
/**
|
|
684
|
+
* Any adapter a binding's `components` holds. A field adapter typed for a narrower state
|
|
685
|
+
* (`FieldAdapter<DateFieldState>`) is one of these: its hooks are methods, read bivariantly.
|
|
686
|
+
*/
|
|
687
|
+
export type Adapter = FieldAdapter | GroupAdapter | TabsAdapter | GridAdapter | StepsAdapter;
|
|
688
|
+
/** One type's entry in `components`: an adapter, or several told apart by `when`. */
|
|
689
|
+
export type AdapterEntry = Adapter | readonly Adapter[];
|
|
690
|
+
/** A journey page as the renderer resolved it for a binding to draw. */
|
|
691
|
+
export interface PageState {
|
|
692
|
+
journeyId: string;
|
|
693
|
+
pageId: string;
|
|
694
|
+
/** Empty for a page that draws no heading. */
|
|
695
|
+
title: string;
|
|
696
|
+
description?: string;
|
|
697
|
+
progress?: string;
|
|
698
|
+
/** The id the heading must carry: focus goes to it after a page change. */
|
|
699
|
+
headingId: string;
|
|
700
|
+
/** The level the page's heading takes: the form's own (the host's `headingLevel`, 1 unless said), the page standing for the form. */
|
|
701
|
+
headingLevel: number;
|
|
702
|
+
back?: () => void;
|
|
703
|
+
/** Continue, or Submit on the last page; absent on an exit page. */
|
|
704
|
+
next?: () => void;
|
|
705
|
+
backLabel: string;
|
|
706
|
+
nextLabel: string;
|
|
707
|
+
final: boolean;
|
|
708
|
+
/** A Continue is being worked out: draw `aria-disabled`, never `disabled`. */
|
|
709
|
+
busy: boolean;
|
|
710
|
+
/** The words of the checking line while a server check is out. */
|
|
711
|
+
checking?: string;
|
|
712
|
+
/**
|
|
713
|
+
* The page drawn is where the person was put after the page they asked for was refused: say so
|
|
714
|
+
* politely (a status line with the `pageRedirected` words) under the heading, until the next move.
|
|
715
|
+
*/
|
|
716
|
+
redirected?: boolean;
|
|
717
|
+
words: Words;
|
|
718
|
+
}
|
|
719
|
+
/**
|
|
720
|
+
* A link of a journey's Check answers page (`kind: "review"`): a row's Change, the card's Change,
|
|
721
|
+
* or the "Enter {{label}}" that takes the place of a required answer not given. Draw an `<a>` with
|
|
722
|
+
* `href`, showing `text`, then `hidden` in the design system's visually hidden span (when not
|
|
723
|
+
* empty); when `reordered`, `text` is `aria-hidden` and `hidden` is the whole name. On a press,
|
|
724
|
+
* `preventDefault()` then `go()`: the renderer opens the step (direction `"change"`).
|
|
725
|
+
*/
|
|
726
|
+
export interface ReviewLinkState extends ReviewAction {
|
|
727
|
+
/** `#` and the heading id of the step it opens. */
|
|
728
|
+
href: string;
|
|
729
|
+
/** On a row (or card) in error: its `errorId`, for the link's `aria-describedby` (the summary focuses the link). */
|
|
730
|
+
describedBy?: string;
|
|
731
|
+
go(): void;
|
|
732
|
+
}
|
|
733
|
+
/** One answer of a Check answers page. Put `id` on the row's element: the error summary links to it, and focus comes back to it. */
|
|
734
|
+
export interface ReviewRowState {
|
|
735
|
+
id: string;
|
|
736
|
+
/** The answer's value path; unique within the list. */
|
|
737
|
+
key: string;
|
|
738
|
+
componentId: string;
|
|
739
|
+
/** The step the answer is given on. */
|
|
740
|
+
pageId: string;
|
|
741
|
+
/** The row's wording (the page's `review.labels`, else the field's label). */
|
|
742
|
+
label: string;
|
|
743
|
+
/** The answer as text, lines split by `\n`; "Not provided" for a blank optional answer; empty when `missing`. */
|
|
744
|
+
value: string;
|
|
745
|
+
status: ReviewRowStatus;
|
|
746
|
+
/** Its blocking errors, worded; drawn in the value cell, above the value, under `errorId`. */
|
|
747
|
+
errors: readonly string[];
|
|
748
|
+
errorId: string;
|
|
749
|
+
/** Absent when the page says no Change links, on a `missing` row, on a card's row, and in a form that is not interactive. */
|
|
750
|
+
change?: ReviewLinkState;
|
|
751
|
+
/** On a `missing` row of an interactive form: the link drawn in the value's place. */
|
|
752
|
+
enter?: ReviewLinkState;
|
|
753
|
+
}
|
|
754
|
+
/** One row of a data grid as a card: its title, its one Change, its fields as rows. Put `id` on the card's element. */
|
|
755
|
+
export interface ReviewCardState {
|
|
756
|
+
id: string;
|
|
757
|
+
key: string;
|
|
758
|
+
/** The grid. */
|
|
759
|
+
componentId: string;
|
|
760
|
+
index: number;
|
|
761
|
+
pageId: string;
|
|
762
|
+
title: string;
|
|
763
|
+
rows: readonly ReviewRowState[];
|
|
764
|
+
/** The grid's own blocking errors (its row count), on its first card. */
|
|
765
|
+
errors: readonly string[];
|
|
766
|
+
errorId: string;
|
|
767
|
+
change?: ReviewLinkState;
|
|
768
|
+
}
|
|
769
|
+
export type ReviewItemState = ({
|
|
770
|
+
kind: "row";
|
|
771
|
+
} & ReviewRowState) | ({
|
|
772
|
+
kind: "card";
|
|
773
|
+
} & ReviewCardState);
|
|
774
|
+
/** One step on the path: a heading over its answers. */
|
|
775
|
+
export interface ReviewSectionState {
|
|
776
|
+
pageId: string;
|
|
777
|
+
title: string;
|
|
778
|
+
headingId: string;
|
|
779
|
+
items: readonly ReviewItemState[];
|
|
780
|
+
}
|
|
781
|
+
/** A journey's Check answers list (`LiveBinding.review`), between the page's heading and its own content. */
|
|
782
|
+
export interface ReviewState {
|
|
783
|
+
journeyId: string;
|
|
784
|
+
pageId: string;
|
|
785
|
+
sections: readonly ReviewSectionState[];
|
|
786
|
+
/** A section heading's level: one under the page's heading (`PageState.headingLevel`). A card's title is one under it. */
|
|
787
|
+
headingLevel: number;
|
|
788
|
+
/** The hidden word read before an error ("Error:"); empty when unworded. */
|
|
789
|
+
errorPrefix: string;
|
|
790
|
+
/** Datum's own drawing of the list: wrap it, or return it for what the design system has no markup for. */
|
|
791
|
+
content: View;
|
|
792
|
+
words: Words;
|
|
793
|
+
}
|
|
794
|
+
/** One line of the error summary: the render output's entry, with where it links and how it focuses. */
|
|
795
|
+
export interface SummaryEntry {
|
|
796
|
+
/** `#<control id>`. */
|
|
797
|
+
href: string;
|
|
798
|
+
targetPath: string;
|
|
799
|
+
componentId: string;
|
|
800
|
+
label: string;
|
|
801
|
+
message: string | undefined;
|
|
802
|
+
/** The line as Datum words it (`summaryEntry`). */
|
|
803
|
+
text: string;
|
|
804
|
+
/**
|
|
805
|
+
* `message` is words written for this error by the form or its host (a field's, a container's
|
|
806
|
+
* or the form's `messages`, the page's catalog, a message the error carries, an `error.<code>`
|
|
807
|
+
* text of the form's translations or the page's texts), not a default wording (the engine's
|
|
808
|
+
* own sentence, in English or translated, or a binding's language pack). A design system whose
|
|
809
|
+
* summary lists a specific message alone and a generic one with its field's label (GOV.UK)
|
|
810
|
+
* reads it.
|
|
811
|
+
*/
|
|
812
|
+
authored: boolean;
|
|
813
|
+
focus(): void;
|
|
814
|
+
}
|
|
815
|
+
export interface SummaryState {
|
|
816
|
+
heading: string;
|
|
817
|
+
/** Errors with no field on this page to go to, worded as text. */
|
|
818
|
+
formEntries: ReadonlyArray<{
|
|
819
|
+
message: string;
|
|
820
|
+
text: string;
|
|
821
|
+
}>;
|
|
822
|
+
/** The id the summary's heading carries. */
|
|
823
|
+
headingId: string;
|
|
824
|
+
/** The level of the summary's heading: a level under the form's own (the host's `headingLevel`, 1 by default). */
|
|
825
|
+
headingLevel: number;
|
|
826
|
+
/**
|
|
827
|
+
* The second copy of a summary placed at both ends: a visual echo with no alert role (the top
|
|
828
|
+
* copy is the alert), never the place focus goes to. Its `headingId` is its own.
|
|
829
|
+
*/
|
|
830
|
+
echo?: boolean;
|
|
831
|
+
locale: string;
|
|
832
|
+
words: Words;
|
|
833
|
+
}
|
|
834
|
+
/**
|
|
835
|
+
* The host's receipt after a delivered submission, resolved for a binding to draw: the texts
|
|
836
|
+
* already in the form's language, the kind said once for assistive technology, and whether this
|
|
837
|
+
* copy is the visual echo of a receipt placed at both ends.
|
|
838
|
+
*/
|
|
839
|
+
export interface FormNoticeState {
|
|
840
|
+
kind: FormNoticeKind;
|
|
841
|
+
title?: string;
|
|
842
|
+
message?: string;
|
|
843
|
+
details: ReadonlyArray<{
|
|
844
|
+
label: string;
|
|
845
|
+
value: string;
|
|
846
|
+
}>;
|
|
847
|
+
/** The second copy of a receipt placed at both ends: aria-hidden, no role, never focused. */
|
|
848
|
+
echo: boolean;
|
|
849
|
+
/** An error receipt on the draw that first shows it: an alert. Every other draw of it is a status. */
|
|
850
|
+
assertive: boolean;
|
|
851
|
+
/** The level of the title: a level under the form's own heading. */
|
|
852
|
+
headingLevel: number;
|
|
853
|
+
/** The kind said once for assistive technology ("Success: "); empty where the form words none. */
|
|
854
|
+
kindWord: string;
|
|
855
|
+
words: Words;
|
|
856
|
+
}
|
|
857
|
+
/** The line that says a submission is in flight; `echo` is the second copy of one placed at both ends. */
|
|
858
|
+
export interface FormStatusState {
|
|
859
|
+
message: string;
|
|
860
|
+
echo: boolean;
|
|
861
|
+
words: Words;
|
|
862
|
+
}
|
|
863
|
+
/** The sentence above the fields that explains the required marker ("Fields marked with * are required"). */
|
|
864
|
+
export interface RequiredNoteState {
|
|
865
|
+
note: string;
|
|
866
|
+
words: Words;
|
|
867
|
+
}
|
|
868
|
+
export interface LanguageSwitcherState {
|
|
869
|
+
current: string;
|
|
870
|
+
locales: ReadonlyArray<{
|
|
871
|
+
code: string;
|
|
872
|
+
label: string;
|
|
873
|
+
}>;
|
|
874
|
+
/** The control's label, worded for the page ("Language"); the part's own when the author gave one. */
|
|
875
|
+
label: string;
|
|
876
|
+
/** Keep the label for assistive technology only. */
|
|
877
|
+
hideLabel: boolean;
|
|
878
|
+
/** An id unique within the form for the control: what a label's `for` names. */
|
|
879
|
+
controlId: string;
|
|
880
|
+
/**
|
|
881
|
+
* Switches the form to `code` (the runtime decides, and reports `datum-locale-applied` or
|
|
882
|
+
* `datum-locale-rejected`). `false` when the form refused: put a select back to `current`.
|
|
883
|
+
*/
|
|
884
|
+
switchTo(code: string): boolean;
|
|
885
|
+
words: Words;
|
|
886
|
+
}
|
|
887
|
+
/** A picture part: its URL already checked, its text alternative resolved (empty for a decorative picture). */
|
|
888
|
+
export interface ChromeImage {
|
|
889
|
+
src: string;
|
|
890
|
+
alt: string;
|
|
891
|
+
href?: string;
|
|
892
|
+
width?: number;
|
|
893
|
+
height?: number;
|
|
894
|
+
}
|
|
895
|
+
/**
|
|
896
|
+
* A chrome part (header, footer, title, the form's own buttons) as the renderer resolved it: the
|
|
897
|
+
* part's type, what it says, and `content`, the renderer's own drawing of it. An adapter draws
|
|
898
|
+
* the part from the members its type carries, or wraps `content`.
|
|
899
|
+
*/
|
|
900
|
+
export interface ChromeState {
|
|
901
|
+
/** The part's type: `language-switcher`, `image`, `heading`, `text`, `html`, `form-title`, `form-description`, `group`. */
|
|
902
|
+
part: string;
|
|
903
|
+
region: "header" | "footer";
|
|
904
|
+
locale: string;
|
|
905
|
+
dir: "ltr" | "rtl";
|
|
906
|
+
busy: FormBusy | undefined;
|
|
907
|
+
words: Words;
|
|
908
|
+
/**
|
|
909
|
+
* The form's own heading level, its place in the page's outline (the host's `headingLevel`, 1
|
|
910
|
+
* unless said): the level a part that heads itself takes (a design system's header drawing the
|
|
911
|
+
* form's name), and the one a heading under the form sits below. A `heading` or `form-title`
|
|
912
|
+
* part's own level is `level`.
|
|
913
|
+
*/
|
|
914
|
+
headingLevel: number;
|
|
915
|
+
/** The resolved text of a `heading`, `text`, `form-title` or `form-description`. */
|
|
916
|
+
text?: string;
|
|
917
|
+
/** A heading's or the form title's level. */
|
|
918
|
+
level?: 1 | 2 | 3;
|
|
919
|
+
/** A `form-title` over a journey page's own heading: drawn as the caption, never a second heading. */
|
|
920
|
+
caption?: boolean;
|
|
921
|
+
image?: ChromeImage;
|
|
922
|
+
/** An `html` part's markup, through the allowlist (`sanitizeStaticHtml`). */
|
|
923
|
+
html?: string;
|
|
924
|
+
/** A `group`: how it spreads its parts along the row, and lines them up across it. */
|
|
925
|
+
justify?: "start" | "center" | "end" | "space-between";
|
|
926
|
+
verticalAlign?: "start" | "center" | "end";
|
|
927
|
+
/** The part's own content, drawn by the renderer. */
|
|
928
|
+
content: View;
|
|
929
|
+
}
|
|
930
|
+
export interface ChromeAdapter {
|
|
931
|
+
template(state: ChromeState): TemplateResult;
|
|
932
|
+
}
|
|
933
|
+
export interface AssetSource {
|
|
934
|
+
url: string;
|
|
935
|
+
/** Subresource integrity, checked on every fetch. */
|
|
936
|
+
integrity?: string;
|
|
937
|
+
}
|
|
938
|
+
export interface ScriptSource extends AssetSource {
|
|
939
|
+
/** Run as a classic script rather than a module. */
|
|
940
|
+
classic?: boolean;
|
|
941
|
+
/** Attributes for its `<script>` element, for a script that reads its own (`document.currentScript`). */
|
|
942
|
+
attributes?: Readonly<Record<string, string>>;
|
|
943
|
+
}
|
|
944
|
+
/** The design system's files as the host serves them; never on the binding. */
|
|
945
|
+
export interface LiveAssets {
|
|
946
|
+
stylesheets?: readonly AssetSource[];
|
|
947
|
+
fonts?: readonly AssetSource[];
|
|
948
|
+
scripts?: readonly ScriptSource[];
|
|
949
|
+
/** The host page's root font size in px, when the design system's sheet expects another. */
|
|
950
|
+
rootFontSize?: number;
|
|
951
|
+
}
|
|
952
|
+
/** One change a design system's own code makes outside the form's shadow root (`LiveBinding.designSystem.sideEffects`). */
|
|
953
|
+
export interface DesignSystemSideEffect {
|
|
954
|
+
/** What outside the form it touches: `<html lang>`, `<body> style.overflow`, `window`. */
|
|
955
|
+
target: string;
|
|
956
|
+
/** What it does and when, and what the binding does about it. */
|
|
957
|
+
effect: string;
|
|
958
|
+
}
|
|
959
|
+
export interface LiveBinding {
|
|
960
|
+
id: string;
|
|
961
|
+
label: string;
|
|
962
|
+
designSystem?: {
|
|
963
|
+
name: string;
|
|
964
|
+
/** The root font size in px the design system's stylesheet expects. */
|
|
965
|
+
rootFontSize?: number;
|
|
966
|
+
/** After the first draw is ready: what the binding relies on that the design system must have drawn. Each string is a problem. */
|
|
967
|
+
selfCheck?(root: ShadowRoot): string[];
|
|
968
|
+
/**
|
|
969
|
+
* What the design system's own code changes outside the form's shadow root (Ontario's
|
|
970
|
+
* language toggle writing `<html lang>`, a dialog writing `<body>`'s overflow): reported with
|
|
971
|
+
* the self-check (`LiveSelfCheck.sideEffects`, the conformance suite's run header and
|
|
972
|
+
* report), never as a problem.
|
|
973
|
+
*/
|
|
974
|
+
sideEffects?: readonly DesignSystemSideEffect[];
|
|
975
|
+
};
|
|
976
|
+
/** By component type: Datum's engine types, and the binding's own tier-2 types (`gcds-date`). */
|
|
977
|
+
components: Readonly<Record<string, AdapterEntry>>;
|
|
978
|
+
/**
|
|
979
|
+
* The binding's own tier-2 types and the engine type each reads as (`{ "gcds-date": "date" }`):
|
|
980
|
+
* what its package offers beside the engine's types. The renderer draws with these under the
|
|
981
|
+
* definition's own `kinds` map (an entry there wins), so `data-kind`, the state and the lookup
|
|
982
|
+
* chain read the base; a type used without the definition's entry is reported in `unsupported()`
|
|
983
|
+
* (`<component id>: component "<type>" has no kinds entry`), since only the definition's map
|
|
984
|
+
* reaches validation, the sandbox and the PDF. The builder offers these types in its palette
|
|
985
|
+
* under this binding, and writes the entry of each one a form uses into the definition's
|
|
986
|
+
* `kinds` on save. An entry whose base is not an engine type maps nothing.
|
|
987
|
+
*/
|
|
988
|
+
kinds?: Readonly<Record<string, string>>;
|
|
989
|
+
/**
|
|
990
|
+
* The order this binding's date adapters draw a date's parts in, by locale (GC Design System:
|
|
991
|
+
* month, day, year in English): what `DateFieldState.missingParts` follows for a date one of its
|
|
992
|
+
* adapters draws, so focus goes to the first part lacking as drawn. Left out, Datum's order (day,
|
|
993
|
+
* month, year, or its `fieldOrder.date`).
|
|
994
|
+
*/
|
|
995
|
+
dateOrder?(locale: string): readonly DatePartName[];
|
|
996
|
+
/** Rules for what the binding draws itself, adopted after the host's stylesheets. */
|
|
997
|
+
css?: string;
|
|
998
|
+
/**
|
|
999
|
+
* The frame presets this binding adds to the built-ins (seamless, outlined, paper), by frame id:
|
|
1000
|
+
* what `chrome.frame` may name under it and what a frame picker offers (a built-in id relabels
|
|
1001
|
+
* the built-in). The binding's `css` draws each under its class (`datum-form--frame-<id>`).
|
|
1002
|
+
* Datum's own binding carries the frames `createDatumBinding({ frame })` was given.
|
|
1003
|
+
*/
|
|
1004
|
+
frames?: Readonly<Record<string, FormFrameDefinition>>;
|
|
1005
|
+
/** Classes on the form element itself; a function of the scheme and locale for a dark variant. */
|
|
1006
|
+
formClass?: string | ((context: {
|
|
1007
|
+
colorScheme: "light" | "dark";
|
|
1008
|
+
locale: string;
|
|
1009
|
+
}) => string);
|
|
1010
|
+
/** The binding's language pack: form text keys by locale, under the form's translations and over the engine's English. */
|
|
1011
|
+
texts?: LanguagePackTable;
|
|
1012
|
+
/** Validation messages by code, by locale: the same layer for the errors. */
|
|
1013
|
+
messages?: LanguagePackTable;
|
|
1014
|
+
/**
|
|
1015
|
+
* Datum tokens to the design system's values, for what Datum draws inside this binding: set on
|
|
1016
|
+
* every element the renderer marks `data-fallback`, which is a field wrapper, a container's
|
|
1017
|
+
* wrapper (`datum-live-container`) and a region of the form (a journey page's heading and
|
|
1018
|
+
* buttons, the chrome, the summary, the receipt) whenever Datum's adapter or hook draws it.
|
|
1019
|
+
*/
|
|
1020
|
+
fallbackTokens?: Readonly<Record<string, string>>;
|
|
1021
|
+
/**
|
|
1022
|
+
* The PDF theme this binding suggests for the form's paper: an id the host's PDF theme
|
|
1023
|
+
* registry holds (`pdfThemes.register`), or the theme object a design-system package exports
|
|
1024
|
+
* beside its binding. Read only when nothing else names a PDF theme (the render call, the
|
|
1025
|
+
* layout, the host's default); left out, the form prints under `datum-pdf`. A suggestion,
|
|
1026
|
+
* never a derivation: nothing about the binding's look is turned into paper.
|
|
1027
|
+
*/
|
|
1028
|
+
pdfTheme?: string | PdfThemeDefinition;
|
|
1029
|
+
/**
|
|
1030
|
+
* The id of the binding a picker offers as this one's dark look (a design system that ships its
|
|
1031
|
+
* dark mode as a separate binding). Datum's own dark look is no other binding: it is drawn while
|
|
1032
|
+
* the host's colour scheme is dark (`colorScheme`), so the Datum binding names none.
|
|
1033
|
+
*/
|
|
1034
|
+
darkVariant?: string;
|
|
1035
|
+
/** Where focus goes after a validation that found errors: the summary (the default) or the first field in error. */
|
|
1036
|
+
errorFocus?: "summary" | "field";
|
|
1037
|
+
/** The form width in CSS px under which tabs take the narrow view (`TabsState.narrow`: a stacked list); left out, tabs keep their strip at every width. */
|
|
1038
|
+
tabsNarrowBelow?: number;
|
|
1039
|
+
/** The default focus target for this binding's field adapters. */
|
|
1040
|
+
focusTarget?(field: HTMLElement, state: FieldState): HTMLElement | null | undefined;
|
|
1041
|
+
/** The stand-in `ready` for an adapter without one. */
|
|
1042
|
+
ready?(root: ShadowRoot): Promise<void>;
|
|
1043
|
+
/**
|
|
1044
|
+
* The design system's own script started scoped to the form: called once per mount, after the
|
|
1045
|
+
* first draw is ready, never on a redraw. `form` is the scope to hand the design system's init
|
|
1046
|
+
* (GOV.UK `initAll({ scope: form })`): an Element inside the
|
|
1047
|
+
* shadow root, where `root` itself is not one. Returns (or resolves to) its cleanup, run on
|
|
1048
|
+
* unmount; a throw or a rejection is reported as `datum-binding-error` with hook `connect`.
|
|
1049
|
+
* Start only the components whose script touches nothing but its own root.
|
|
1050
|
+
*
|
|
1051
|
+
* A sheet a design system adopts into the form's shadow root while the form is mounted (a
|
|
1052
|
+
* Stencil library's shared sheet) needs no cleanup here: the renderer notes the root's adopted
|
|
1053
|
+
* sheets before it adopts its own and, on unmount, takes away every sheet added since.
|
|
1054
|
+
*/
|
|
1055
|
+
connect?(root: ShadowRoot, form: HTMLFormElement): (() => void) | void | Promise<(() => void) | void>;
|
|
1056
|
+
/** The error summary from the renderer's entries. Left out, Datum's. */
|
|
1057
|
+
summary?(entries: readonly SummaryEntry[], state: SummaryState): TemplateResult;
|
|
1058
|
+
/** The host's receipt after a delivered submission. Left out, Datum's. */
|
|
1059
|
+
notice?(state: FormNoticeState): TemplateResult;
|
|
1060
|
+
/** The line that says a submission is in flight. Left out, Datum's. */
|
|
1061
|
+
status?(state: FormStatusState): TemplateResult;
|
|
1062
|
+
/** The sentence explaining the required marker. Left out, Datum's. */
|
|
1063
|
+
requiredNote?(state: RequiredNoteState): TemplateResult;
|
|
1064
|
+
/** A journey page's heading and buttons. Left out, Datum's. */
|
|
1065
|
+
page?: {
|
|
1066
|
+
heading(state: PageState): TemplateResult;
|
|
1067
|
+
actions(state: PageState): TemplateResult;
|
|
1068
|
+
};
|
|
1069
|
+
/**
|
|
1070
|
+
* A journey's Check answers list (`kind: "review"`): a section per step, a row per answer with its
|
|
1071
|
+
* Change link, a card per data grid row. Left out, Datum's (`state.content`), drawn in the
|
|
1072
|
+
* journeys chunk.
|
|
1073
|
+
*/
|
|
1074
|
+
review?(state: ReviewState): TemplateResult;
|
|
1075
|
+
/** The language switcher. Left out, Datum's. */
|
|
1076
|
+
languageSwitcher?(state: LanguageSwitcherState): TemplateResult;
|
|
1077
|
+
/** Chrome parts by part id. Left out, Datum's. */
|
|
1078
|
+
chrome?: Readonly<Record<string, ChromeAdapter>>;
|
|
1079
|
+
/**
|
|
1080
|
+
* Classes an author may put in `configuration.cssClass` under this binding: what the builder's
|
|
1081
|
+
* Style tab offers, and the vocabulary its class check notes a class outside of. An entry is a
|
|
1082
|
+
* bare class name or a {@link CssClassDeclaration} that says what the class is called, which
|
|
1083
|
+
* components it applies to and which classes it excludes.
|
|
1084
|
+
*/
|
|
1085
|
+
cssClasses?: readonly CssClassEntry[];
|
|
1086
|
+
/**
|
|
1087
|
+
* What the builder says of an error an author left unworded under this binding: `"noted"` (a
|
|
1088
|
+
* design system that asks for each error to be written for its question, as GOV.UK does) puts a
|
|
1089
|
+
* note under the messages box naming each error the component's checks raise that no message
|
|
1090
|
+
* words. Left out, the engine's wording stands in silently.
|
|
1091
|
+
*/
|
|
1092
|
+
unwordedErrors?: "noted";
|
|
1093
|
+
}
|
|
1094
|
+
/**
|
|
1095
|
+
* A class a binding gives a meaning to, declared with what the builder's Style tab needs to
|
|
1096
|
+
* offer it: a name an author reads, the components it applies to, and the set it belongs to.
|
|
1097
|
+
*/
|
|
1098
|
+
export interface CssClassDeclaration {
|
|
1099
|
+
/** The class token written into `configuration.cssClass`. */
|
|
1100
|
+
name: string;
|
|
1101
|
+
/** What the Style tab calls it; the class name when absent. */
|
|
1102
|
+
label?: string | undefined;
|
|
1103
|
+
/** One line under the label saying what it does. */
|
|
1104
|
+
description?: string | undefined;
|
|
1105
|
+
/**
|
|
1106
|
+
* The component types it applies to, each as written (`panel`, `gcds-card`) or as the type
|
|
1107
|
+
* they read as (`panel`); the Style tab offers it on those components only. Absent: any component.
|
|
1108
|
+
*/
|
|
1109
|
+
types?: readonly string[] | undefined;
|
|
1110
|
+
/**
|
|
1111
|
+
* Classes that share a group are mutually exclusive on one component: choosing one takes the
|
|
1112
|
+
* others of the group away, and the Style tab draws them as one choice with a way back to none.
|
|
1113
|
+
*/
|
|
1114
|
+
group?: string | undefined;
|
|
1115
|
+
/**
|
|
1116
|
+
* What the Style tab calls the group (its heading over the choices), for a group the builder
|
|
1117
|
+
* does not word itself; "Choose one" when absent. The panel looks' group is worded by the builder.
|
|
1118
|
+
*/
|
|
1119
|
+
groupLabel?: string | undefined;
|
|
1120
|
+
}
|
|
1121
|
+
/** One entry of {@link LiveBinding.cssClasses}: a bare class name, or its declaration. */
|
|
1122
|
+
export type CssClassEntry = string | CssClassDeclaration;
|
|
1123
|
+
/**
|
|
1124
|
+
* A binding with some of its parts replaced or wrapped: a host changes one adapter without
|
|
1125
|
+
* copying the binding. A component override is an adapter (or a list), or a function of the
|
|
1126
|
+
* binding's own entry that returns one (wrap or patch it).
|
|
1127
|
+
*/
|
|
1128
|
+
export declare function extendBinding(binding: LiveBinding, overrides: Omit<Partial<LiveBinding>, "components"> & {
|
|
1129
|
+
components?: Readonly<Record<string, AdapterEntry | ((base: AdapterEntry | undefined) => AdapterEntry)>>;
|
|
1130
|
+
}): LiveBinding;
|
|
1131
|
+
/** Which step of the chain an adapter came from. */
|
|
1132
|
+
export type AdapterSource = "binding" | "binding-base" | "datum" | "datum-base";
|
|
1133
|
+
export interface ResolvedAdapter<A extends Adapter = Adapter> {
|
|
1134
|
+
adapter: A;
|
|
1135
|
+
from: AdapterSource;
|
|
1136
|
+
/** The type it is registered under: the component's type, or its base. */
|
|
1137
|
+
via: string;
|
|
1138
|
+
}
|
|
1139
|
+
/**
|
|
1140
|
+
* Whether an adapter's `when` holds for `state`. The renderer passes one that runs `when` as a hook,
|
|
1141
|
+
* so a `when` that throws is reported and counts as not holding.
|
|
1142
|
+
*/
|
|
1143
|
+
export type AdapterTest = (adapter: {
|
|
1144
|
+
readonly name?: string | undefined;
|
|
1145
|
+
when(state: unknown): boolean;
|
|
1146
|
+
}, state: unknown) => boolean;
|
|
1147
|
+
/**
|
|
1148
|
+
* The adapter that draws a node of `kind` and `type`: binding[type] -> binding[base] ->
|
|
1149
|
+
* datum[type] -> datum[base], each step skipped when it holds no adapter of that kind (or none
|
|
1150
|
+
* whose `when` holds and no default). `datum` is the Datum binding, whose adapters stand in for
|
|
1151
|
+
* what a design-system binding does not draw; when the binding is Datum's, pass it for both.
|
|
1152
|
+
* `test` says whether an adapter's `when` holds (default: it returns `true`); the renderer's
|
|
1153
|
+
* reports a `when` that throws and counts it as not holding, so the next adapter draws.
|
|
1154
|
+
* `undefined` when no step has one.
|
|
1155
|
+
*/
|
|
1156
|
+
export declare function resolveAdapter<A extends Adapter = Adapter>(binding: LiveBinding, datum: LiveBinding | undefined, kind: A["kind"], type: string, base: string, state?: unknown, test?: AdapterTest): ResolvedAdapter<A> | undefined;
|
|
1157
|
+
/**
|
|
1158
|
+
* The `kinds` map a form is drawn with: the binding's own tier-2 types (`LiveBinding.kinds`) under
|
|
1159
|
+
* the definition's map, an entry there winning. `undefined` when neither has one.
|
|
1160
|
+
*/
|
|
1161
|
+
export declare function drawingKindsOf(binding: Pick<LiveBinding, "kinds"> | undefined, definitionKinds: Readonly<Record<string, string>> | undefined): Readonly<Record<string, string>> | undefined;
|
|
1162
|
+
/**
|
|
1163
|
+
* Whether `type` reads as an engine type only through the binding's own `kinds`: the definition
|
|
1164
|
+
* has no entry for it, so validation, the sandbox and the PDF do not know it.
|
|
1165
|
+
*/
|
|
1166
|
+
export declare function needsKindsEntry(binding: Pick<LiveBinding, "kinds"> | undefined, definitionKinds: Readonly<Record<string, string>> | undefined, type: string): boolean;
|
|
1167
|
+
/**
|
|
1168
|
+
* The layout a grid adapter draws for an authored `table` or `stacked`: the authored one when the
|
|
1169
|
+
* adapter draws it (`GridAdapter.layouts`, both when left out), else the one it draws.
|
|
1170
|
+
*/
|
|
1171
|
+
export declare function gridLayoutFor(adapter: Pick<GridAdapter, "layouts"> | undefined, wanted: GridLayout): GridLayout;
|
|
1172
|
+
/**
|
|
1173
|
+
* The drawing capabilities a container's state uses, each one the registry asks of its kind
|
|
1174
|
+
* (`group`, `collection`): a hidden legend over a named container (`hideLabel`), a hidden step
|
|
1175
|
+
* heading, row numbers. A container carries neither notices nor a tooltip, so neither is asked.
|
|
1176
|
+
*/
|
|
1177
|
+
export declare function usedContainerCapabilities(kind: "group" | "collection", state: {
|
|
1178
|
+
legend?: string | undefined;
|
|
1179
|
+
hideLegend?: boolean;
|
|
1180
|
+
showRowNumbers?: boolean;
|
|
1181
|
+
steps?: ReadonlyArray<{
|
|
1182
|
+
hideLabel: boolean;
|
|
1183
|
+
}>;
|
|
1184
|
+
}): DrawingCapabilityId[];
|
|
1185
|
+
/**
|
|
1186
|
+
* The base a node of `kind` and `type` is looked up under: a leaf's answer base, a container's
|
|
1187
|
+
* container base (`gcds-tabs`, base `tabs`), each from the definition's `kinds` map.
|
|
1188
|
+
*/
|
|
1189
|
+
export declare function lookupBaseOf(kind: AdapterKind, type: string, kinds: Readonly<Record<string, string>> | undefined): string;
|
|
1190
|
+
/**
|
|
1191
|
+
* The capabilities a binding answers for a field type (no state: the default adapter), with the
|
|
1192
|
+
* field kind its base reads as: what the builder's inspector offers under this binding. A data
|
|
1193
|
+
* grid (kind `collection`) is answered by the binding's grid adapter, the one that draws its row
|
|
1194
|
+
* numbers and its label. `kinds` is the definition's map; the binding's own stand under it.
|
|
1195
|
+
* `undefined` for a type nothing draws, or one that holds no answer (a group container's).
|
|
1196
|
+
*/
|
|
1197
|
+
export declare function fieldCapabilitiesOf(binding: LiveBinding, datum: LiveBinding | undefined, type: string, kinds?: Readonly<Record<string, string>>): {
|
|
1198
|
+
kind: FieldKind;
|
|
1199
|
+
from: AdapterSource;
|
|
1200
|
+
answers: Record<DrawingCapabilityId, DrawingSupport>;
|
|
1201
|
+
} | undefined;
|
|
1202
|
+
/** The drawing capabilities a field's state uses, each one the registry asks of its kind. */
|
|
1203
|
+
export declare function usedCapabilities(state: FieldState & Partial<Pick<TextFieldState, "tooltip" | "prefix" | "suffix" | "characterCount" | "placeholder">>): DrawingCapabilityId[];
|
|
1204
|
+
/**
|
|
1205
|
+
* The attributes the renderer writes on every field wrapper, and only the renderer: bindings
|
|
1206
|
+
* never write them, and host or binding overrides never remove them. Boolean hooks are present
|
|
1207
|
+
* or absent; `data-kind` holds the base type (`date`, `radio`), `data-source` the source state.
|
|
1208
|
+
*/
|
|
1209
|
+
export declare const STATE_HOOKS: readonly ["data-kind", "data-required", "data-invalid", "data-readonly", "data-disabled", "data-over-limit", "data-source", "data-pending"];
|
|
1210
|
+
export type StateHook = (typeof STATE_HOOKS)[number];
|
|
1211
|
+
/** On every field wrapper: the component id, and where its answer lives (a grid row's own path). */
|
|
1212
|
+
export declare const FIELD_ID_ATTRIBUTE = "data-component-id";
|
|
1213
|
+
export declare const VALUE_PATH_ATTRIBUTE = "data-value-path";
|
|
1214
|
+
/** On every container's wrapper. */
|
|
1215
|
+
export declare const CONTAINER_ID_ATTRIBUTE = "data-container-id";
|
|
1216
|
+
/** The field wrapper's instance key (internal: how the renderer finds a field again). */
|
|
1217
|
+
export declare const INSTANCE_ATTRIBUTE = "data-instance";
|
|
1218
|
+
/**
|
|
1219
|
+
* Marks an adapter draws and the renderer's behaviour finds by (all inside a field's wrapper).
|
|
1220
|
+
* An adapter that draws one gets the behaviour; one that does not gets none, and nothing breaks.
|
|
1221
|
+
*
|
|
1222
|
+
* - File fields: the renderer sets `data-file-drag` on the wrapper while a file is dragged over
|
|
1223
|
+
* it (the binding's CSS draws the state). A polite live region marked `data-file-status`
|
|
1224
|
+
* (`data-file-announce` too, where picks are to be read out) is filled with what a pick or a
|
|
1225
|
+
* removal did; one marked `data-file-drop-status` hears a drag entering and leaving. A press
|
|
1226
|
+
* that starts inside an element marked `data-file-button` sets `data-file-press` on the
|
|
1227
|
+
* wrapper until it ends.
|
|
1228
|
+
* - Tooltips: `data-tooltip` is the container of a mark (`data-tooltip-mark`, the focusable
|
|
1229
|
+
* control) and its bubble. The renderer sets `data-dismissed` on the container while Escape or
|
|
1230
|
+
* the mark's key has closed it, until pointer and focus have left; the binding's CSS shows the
|
|
1231
|
+
* bubble on hover or focus unless it is dismissed.
|
|
1232
|
+
*/
|
|
1233
|
+
export declare const FILE_DRAG_ATTRIBUTE = "data-file-drag";
|
|
1234
|
+
export declare const FILE_PRESS_ATTRIBUTE = "data-file-press";
|
|
1235
|
+
export declare const FILE_STATUS_ATTRIBUTE = "data-file-status";
|
|
1236
|
+
export declare const FILE_ANNOUNCE_ATTRIBUTE = "data-file-announce";
|
|
1237
|
+
export declare const FILE_DROP_STATUS_ATTRIBUTE = "data-file-drop-status";
|
|
1238
|
+
export declare const FILE_BUTTON_ATTRIBUTE = "data-file-button";
|
|
1239
|
+
export declare const TOOLTIP_ATTRIBUTE = "data-tooltip";
|
|
1240
|
+
export declare const TOOLTIP_MARK_ATTRIBUTE = "data-tooltip-mark";
|
|
1241
|
+
export declare const TOOLTIP_DISMISSED_ATTRIBUTE = "data-dismissed";
|
|
1242
|
+
/**
|
|
1243
|
+
* Buttons: a control an adapter draws for a `button` component carries `data-button-action` (the
|
|
1244
|
+
* configured action, on the element a press lands on) and, for a signed submit,
|
|
1245
|
+
* `data-button-signature`. The renderer's buttons module hears the press and reports it as
|
|
1246
|
+
* `datum-form-action` {componentId, action, signature?}; an adapter draws no handler of its own.
|
|
1247
|
+
*/
|
|
1248
|
+
export declare const BUTTON_ACTION_ATTRIBUTE = "data-button-action";
|
|
1249
|
+
export declare const BUTTON_SIGNATURE_ATTRIBUTE = "data-button-signature";
|
|
1250
|
+
/**
|
|
1251
|
+
* The id a drawn tooltip's bubble carries. The renderer adds it to `describedBy` (after the
|
|
1252
|
+
* description) for an adapter that answers tooltip `drawn`, so the help is a real description of
|
|
1253
|
+
* the control; the adapter puts it on the bubble.
|
|
1254
|
+
*/
|
|
1255
|
+
export declare function tooltipIdOf(fieldId: string): string;
|
|
1256
|
+
/** The event a binding problem is reported by, on the shadow root's host. */
|
|
1257
|
+
export declare const BINDING_ERROR_EVENT = "datum-binding-error";
|
|
1258
|
+
/** `datum-binding-error`'s detail. */
|
|
1259
|
+
export interface BindingErrorDetail {
|
|
1260
|
+
/** The hook or stage that failed: `assets`, `render`, `when` (an adapter's `when` threw: it counted as not holding), `template`, `after`, `ready`, `connect`, `focus`, `self-check`, `ids` (a described-by id a binding-written field names and nothing carries), ... */
|
|
1261
|
+
hook: string;
|
|
1262
|
+
/** The field's instance key or the component id, when the problem is one field's. */
|
|
1263
|
+
id?: string;
|
|
1264
|
+
message: string;
|
|
1265
|
+
url?: string;
|
|
1266
|
+
problems?: readonly string[];
|
|
1267
|
+
}
|