@vef-framework-react/form-editor 2.4.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/dist/cjs/_internal/_rolldown/runtime.cjs +1 -0
- package/dist/cjs/components/button/index.cjs +1 -0
- package/dist/cjs/components/checkbox-group-field/index.cjs +1 -0
- package/dist/cjs/components/code-editor/code-editor-input.cjs +1 -0
- package/dist/cjs/components/code-editor/index.cjs +1 -0
- package/dist/cjs/components/containers/index.cjs +1 -0
- package/dist/cjs/components/date-field/index.cjs +1 -0
- package/dist/cjs/components/display/index.cjs +1 -0
- package/dist/cjs/components/field-entries.cjs +1 -0
- package/dist/cjs/components/mobile/alert-block.cjs +1 -0
- package/dist/cjs/components/mobile/button.cjs +1 -0
- package/dist/cjs/components/mobile/checkbox-group.cjs +1 -0
- package/dist/cjs/components/mobile/date-adapters.cjs +1 -0
- package/dist/cjs/components/mobile/date.cjs +1 -0
- package/dist/cjs/components/mobile/daterange.cjs +1 -0
- package/dist/cjs/components/mobile/datetime.cjs +1 -0
- package/dist/cjs/components/mobile/definitions.cjs +1 -0
- package/dist/cjs/components/mobile/divider.cjs +1 -0
- package/dist/cjs/components/mobile/input-cell.cjs +1 -0
- package/dist/cjs/components/mobile/number.cjs +1 -0
- package/dist/cjs/components/mobile/option-group.cjs +1 -0
- package/dist/cjs/components/mobile/paragraph.cjs +1 -0
- package/dist/cjs/components/mobile/picker-trigger.cjs +1 -0
- package/dist/cjs/components/mobile/radio.cjs +1 -0
- package/dist/cjs/components/mobile/scope.cjs +1 -0
- package/dist/cjs/components/mobile/select.cjs +1 -0
- package/dist/cjs/components/mobile/switch.cjs +1 -0
- package/dist/cjs/components/mobile/textarea.cjs +1 -0
- package/dist/cjs/components/mobile/textfield.cjs +1 -0
- package/dist/cjs/components/mobile/theme.cjs +1 -0
- package/dist/cjs/components/number-field/index.cjs +1 -0
- package/dist/cjs/components/radio-field/index.cjs +1 -0
- package/dist/cjs/components/select-field/index.cjs +1 -0
- package/dist/cjs/components/switch-field/index.cjs +1 -0
- package/dist/cjs/components/textarea-field/index.cjs +1 -0
- package/dist/cjs/components/textfield/index.cjs +1 -0
- package/dist/cjs/editor/canvas/canvas-field.cjs +1 -0
- package/dist/cjs/editor/canvas/canvas.cjs +1 -0
- package/dist/cjs/editor/canvas/drop-indicator.cjs +1 -0
- package/dist/cjs/editor/canvas/drop-zones.cjs +1 -0
- package/dist/cjs/editor/canvas/json-split-view.cjs +1 -0
- package/dist/cjs/editor/canvas/mobile-seed-state.cjs +2 -0
- package/dist/cjs/editor/canvas/phone-frame.cjs +1 -0
- package/dist/cjs/editor/dnd.cjs +1 -0
- package/dist/cjs/editor/editor-layout-context.cjs +1 -0
- package/dist/cjs/editor/footer/footer.cjs +1 -0
- package/dist/cjs/editor/form-config/form-basics-tab.cjs +1 -0
- package/dist/cjs/editor/form-config/form-config-drawer.cjs +1 -0
- package/dist/cjs/editor/form-config/outline-tab.cjs +1 -0
- package/dist/cjs/editor/form-editor.cjs +1 -0
- package/dist/cjs/editor/palette/field-groups.cjs +1 -0
- package/dist/cjs/editor/palette/palette-group.cjs +1 -0
- package/dist/cjs/editor/palette/palette-item.cjs +1 -0
- package/dist/cjs/editor/palette/palette-panel.cjs +1 -0
- package/dist/cjs/editor/preview-effects.cjs +1 -0
- package/dist/cjs/editor/preview-runtime-context.cjs +1 -0
- package/dist/cjs/editor/properties/block-layout-section.cjs +1 -0
- package/dist/cjs/editor/properties/container-properties.cjs +1 -0
- package/dist/cjs/editor/properties/entries/built-ins.cjs +1 -0
- package/dist/cjs/editor/properties/entries/checkbox-entry.cjs +1 -0
- package/dist/cjs/editor/properties/entries/coerce.cjs +1 -0
- package/dist/cjs/editor/properties/entries/entry-field.cjs +1 -0
- package/dist/cjs/editor/properties/entries/icon-entry.cjs +1 -0
- package/dist/cjs/editor/properties/entries/index.cjs +1 -0
- package/dist/cjs/editor/properties/entries/key-entry.cjs +1 -0
- package/dist/cjs/editor/properties/entries/linkage/action-editor.cjs +2 -0
- package/dist/cjs/editor/properties/entries/linkage/actions-editor.cjs +1 -0
- package/dist/cjs/editor/properties/entries/linkage/condition-editor.cjs +1 -0
- package/dist/cjs/editor/properties/entries/linkage/container-linkage-section.cjs +1 -0
- package/dist/cjs/editor/properties/entries/linkage/expression-assist.cjs +1 -0
- package/dist/cjs/editor/properties/entries/linkage/index.cjs +1 -0
- package/dist/cjs/editor/properties/entries/linkage/linkage-rules-entry.cjs +1 -0
- package/dist/cjs/editor/properties/entries/linkage/mutators.cjs +1 -0
- package/dist/cjs/editor/properties/entries/linkage/options.cjs +1 -0
- package/dist/cjs/editor/properties/entries/linkage/rule-diagnostics.cjs +1 -0
- package/dist/cjs/editor/properties/entries/linkage/rule-list-editor.cjs +1 -0
- package/dist/cjs/editor/properties/entries/linkage/styles.cjs +1 -0
- package/dist/cjs/editor/properties/entries/linkage/trigger-editor.cjs +1 -0
- package/dist/cjs/editor/properties/entries/linkage/use-linkage-editor-model.cjs +1 -0
- package/dist/cjs/editor/properties/entries/linkage/use-stable-options.cjs +1 -0
- package/dist/cjs/editor/properties/entries/number-entry.cjs +1 -0
- package/dist/cjs/editor/properties/entries/options-source/index.cjs +1 -0
- package/dist/cjs/editor/properties/entries/options-source/source-mutators.cjs +1 -0
- package/dist/cjs/editor/properties/entries/select-entry.cjs +1 -0
- package/dist/cjs/editor/properties/entries/text-entry.cjs +1 -0
- package/dist/cjs/editor/properties/form-data-sources-panel.cjs +1 -0
- package/dist/cjs/editor/properties/form-linkage-panel.cjs +1 -0
- package/dist/cjs/editor/properties/form-variables-panel.cjs +1 -0
- package/dist/cjs/editor/properties/option-editors.cjs +1 -0
- package/dist/cjs/editor/properties/panel-header.cjs +1 -0
- package/dist/cjs/editor/properties/properties-empty.cjs +1 -0
- package/dist/cjs/editor/properties/properties-header.cjs +1 -0
- package/dist/cjs/editor/properties/properties-panel.cjs +1 -0
- package/dist/cjs/editor/properties/properties-provider.cjs +1 -0
- package/dist/cjs/editor/properties/properties-tabs.cjs +1 -0
- package/dist/cjs/editor/properties/use-confirmable-kind-switch.cjs +1 -0
- package/dist/cjs/editor/remove-node-confirm.cjs +1 -0
- package/dist/cjs/editor/schema-apply.cjs +2 -0
- package/dist/cjs/editor/styles.cjs +1 -0
- package/dist/cjs/editor/toolbar/notify.cjs +1 -0
- package/dist/cjs/editor/toolbar/schema-io.cjs +1 -0
- package/dist/cjs/editor/toolbar/toolbar.cjs +1 -0
- package/dist/cjs/editor/use-editor-shortcuts.cjs +1 -0
- package/dist/cjs/editor/validation-summary.cjs +1 -0
- package/dist/cjs/engine/assert-never.cjs +1 -0
- package/dist/cjs/engine/conversion/index.cjs +1 -0
- package/dist/cjs/engine/ids.cjs +1 -0
- package/dist/cjs/engine/keys.cjs +1 -0
- package/dist/cjs/engine/linkage/cycle.cjs +1 -0
- package/dist/cjs/engine/linkage/default-evaluator.cjs +1 -0
- package/dist/cjs/engine/linkage/effects.cjs +1 -0
- package/dist/cjs/engine/linkage/evaluator.cjs +1 -0
- package/dist/cjs/engine/linkage/index.cjs +1 -0
- package/dist/cjs/engine/linkage/operators.cjs +1 -0
- package/dist/cjs/engine/linkage/source-tracking.cjs +1 -0
- package/dist/cjs/engine/linkage/taxonomy.cjs +1 -0
- package/dist/cjs/engine/linkage/validator.cjs +1 -0
- package/dist/cjs/engine/registry/defaults-mobile.cjs +1 -0
- package/dist/cjs/engine/registry/defaults.cjs +1 -0
- package/dist/cjs/engine/registry/form-field-registry.cjs +1 -0
- package/dist/cjs/engine/schema/edit-ops.cjs +1 -0
- package/dist/cjs/engine/schema/mutate.cjs +1 -0
- package/dist/cjs/engine/schema/nodes.cjs +1 -0
- package/dist/cjs/engine/schema/permission-bridge.cjs +1 -0
- package/dist/cjs/engine/schema/presentation.cjs +1 -0
- package/dist/cjs/engine/schema/reconcile.cjs +1 -0
- package/dist/cjs/engine/schema/removal-impact.cjs +1 -0
- package/dist/cjs/engine/schema/rewrite.cjs +1 -0
- package/dist/cjs/engine/schema/validate.cjs +1 -0
- package/dist/cjs/engine/schema/walk.cjs +1 -0
- package/dist/cjs/engine/validation.cjs +1 -0
- package/dist/cjs/icons.cjs +1 -0
- package/dist/cjs/index.cjs +1 -0
- package/dist/cjs/render/chrome/mobile-chrome.cjs +1 -0
- package/dist/cjs/render/chrome/pc-chrome.cjs +1 -0
- package/dist/cjs/render/chrome/subform-shell.cjs +1 -0
- package/dist/cjs/render/data-source-context.cjs +0 -0
- package/dist/cjs/render/flex-style.cjs +1 -0
- package/dist/cjs/render/form-field.cjs +1 -0
- package/dist/cjs/render/form-renderer.cjs +1 -0
- package/dist/cjs/render/grid-style.cjs +1 -0
- package/dist/cjs/render/parts/field-shell.cjs +1 -0
- package/dist/cjs/render/parts/label.cjs +1 -0
- package/dist/cjs/render/parts/options-status.cjs +1 -0
- package/dist/cjs/render/stack-style.cjs +1 -0
- package/dist/cjs/render/subform-columns.cjs +1 -0
- package/dist/cjs/render/submit.cjs +1 -0
- package/dist/cjs/runtime/effects.cjs +1 -0
- package/dist/cjs/runtime/resolve-scope-values.cjs +1 -0
- package/dist/cjs/runtime/runtime-context.cjs +1 -0
- package/dist/cjs/runtime/runtime-state-controller.cjs +1 -0
- package/dist/cjs/runtime/stabilize-state-map.cjs +1 -0
- package/dist/cjs/store/engine-provider.cjs +1 -0
- package/dist/cjs/store/form-store.cjs +1 -0
- package/dist/cjs/types/chrome.cjs +0 -0
- package/dist/cjs/types/component.cjs +1 -0
- package/dist/cjs/types/data-source.cjs +1 -0
- package/dist/cjs/types/index.cjs +1 -0
- package/dist/cjs/types/linkage.cjs +0 -0
- package/dist/cjs/types/properties.cjs +1 -0
- package/dist/cjs/types/schema.cjs +1 -0
- package/dist/es/components/button/index.js +183 -0
- package/dist/es/components/checkbox-group-field/index.js +103 -0
- package/dist/es/components/code-editor/code-editor-input.js +3 -0
- package/dist/es/components/code-editor/index.js +212 -0
- package/dist/es/components/containers/index.js +72 -0
- package/dist/es/components/date-field/index.js +197 -0
- package/dist/es/components/display/index.js +276 -0
- package/dist/es/components/field-entries.js +184 -0
- package/dist/es/components/mobile/alert-block.js +40 -0
- package/dist/es/components/mobile/button.js +41 -0
- package/dist/es/components/mobile/checkbox-group.js +35 -0
- package/dist/es/components/mobile/date-adapters.js +16 -0
- package/dist/es/components/mobile/date.js +42 -0
- package/dist/es/components/mobile/daterange.js +48 -0
- package/dist/es/components/mobile/datetime.js +42 -0
- package/dist/es/components/mobile/definitions.js +58 -0
- package/dist/es/components/mobile/divider.js +10 -0
- package/dist/es/components/mobile/input-cell.js +56 -0
- package/dist/es/components/mobile/number.js +73 -0
- package/dist/es/components/mobile/option-group.js +34 -0
- package/dist/es/components/mobile/paragraph.js +30 -0
- package/dist/es/components/mobile/picker-trigger.js +94 -0
- package/dist/es/components/mobile/radio.js +35 -0
- package/dist/es/components/mobile/scope.js +61 -0
- package/dist/es/components/mobile/select.js +45 -0
- package/dist/es/components/mobile/switch.js +22 -0
- package/dist/es/components/mobile/textarea.js +32 -0
- package/dist/es/components/mobile/textfield.js +30 -0
- package/dist/es/components/mobile/theme.js +8 -0
- package/dist/es/components/number-field/index.js +186 -0
- package/dist/es/components/radio-field/index.js +139 -0
- package/dist/es/components/select-field/index.js +128 -0
- package/dist/es/components/switch-field/index.js +133 -0
- package/dist/es/components/textarea-field/index.js +137 -0
- package/dist/es/components/textfield/index.js +138 -0
- package/dist/es/editor/canvas/canvas-field.js +202 -0
- package/dist/es/editor/canvas/canvas.js +415 -0
- package/dist/es/editor/canvas/drop-indicator.js +42 -0
- package/dist/es/editor/canvas/drop-zones.js +42 -0
- package/dist/es/editor/canvas/json-split-view.js +148 -0
- package/dist/es/editor/canvas/mobile-seed-state.js +103 -0
- package/dist/es/editor/canvas/phone-frame.js +109 -0
- package/dist/es/editor/dnd.js +75 -0
- package/dist/es/editor/editor-layout-context.js +34 -0
- package/dist/es/editor/footer/footer.js +154 -0
- package/dist/es/editor/form-config/form-basics-tab.js +184 -0
- package/dist/es/editor/form-config/form-config-drawer.js +224 -0
- package/dist/es/editor/form-config/outline-tab.js +132 -0
- package/dist/es/editor/form-editor.js +179 -0
- package/dist/es/editor/palette/field-groups.js +19 -0
- package/dist/es/editor/palette/palette-group.js +147 -0
- package/dist/es/editor/palette/palette-item.js +153 -0
- package/dist/es/editor/palette/palette-panel.js +109 -0
- package/dist/es/editor/preview-effects.js +22 -0
- package/dist/es/editor/preview-runtime-context.js +24 -0
- package/dist/es/editor/properties/block-layout-section.js +161 -0
- package/dist/es/editor/properties/container-properties.js +575 -0
- package/dist/es/editor/properties/entries/built-ins.js +21 -0
- package/dist/es/editor/properties/entries/checkbox-entry.js +31 -0
- package/dist/es/editor/properties/entries/coerce.js +8 -0
- package/dist/es/editor/properties/entries/entry-field.js +43 -0
- package/dist/es/editor/properties/entries/icon-entry.js +21 -0
- package/dist/es/editor/properties/entries/index.js +9 -0
- package/dist/es/editor/properties/entries/key-entry.js +29 -0
- package/dist/es/editor/properties/entries/linkage/action-editor.js +260 -0
- package/dist/es/editor/properties/entries/linkage/actions-editor.js +64 -0
- package/dist/es/editor/properties/entries/linkage/condition-editor.js +265 -0
- package/dist/es/editor/properties/entries/linkage/container-linkage-section.js +71 -0
- package/dist/es/editor/properties/entries/linkage/expression-assist.js +87 -0
- package/dist/es/editor/properties/entries/linkage/index.js +3 -0
- package/dist/es/editor/properties/entries/linkage/linkage-rules-entry.js +110 -0
- package/dist/es/editor/properties/entries/linkage/mutators.js +209 -0
- package/dist/es/editor/properties/entries/linkage/options.js +155 -0
- package/dist/es/editor/properties/entries/linkage/rule-diagnostics.js +58 -0
- package/dist/es/editor/properties/entries/linkage/rule-list-editor.js +126 -0
- package/dist/es/editor/properties/entries/linkage/styles.js +276 -0
- package/dist/es/editor/properties/entries/linkage/trigger-editor.js +64 -0
- package/dist/es/editor/properties/entries/linkage/use-linkage-editor-model.js +20 -0
- package/dist/es/editor/properties/entries/linkage/use-stable-options.js +12 -0
- package/dist/es/editor/properties/entries/number-entry.js +25 -0
- package/dist/es/editor/properties/entries/options-source/index.js +122 -0
- package/dist/es/editor/properties/entries/options-source/source-mutators.js +31 -0
- package/dist/es/editor/properties/entries/select-entry.js +23 -0
- package/dist/es/editor/properties/entries/text-entry.js +23 -0
- package/dist/es/editor/properties/form-data-sources-panel.js +170 -0
- package/dist/es/editor/properties/form-linkage-panel.js +36 -0
- package/dist/es/editor/properties/form-variables-panel.js +184 -0
- package/dist/es/editor/properties/option-editors.js +170 -0
- package/dist/es/editor/properties/panel-header.js +93 -0
- package/dist/es/editor/properties/properties-empty.js +62 -0
- package/dist/es/editor/properties/properties-header.js +31 -0
- package/dist/es/editor/properties/properties-panel.js +195 -0
- package/dist/es/editor/properties/properties-provider.js +95 -0
- package/dist/es/editor/properties/properties-tabs.js +91 -0
- package/dist/es/editor/properties/use-confirmable-kind-switch.js +26 -0
- package/dist/es/editor/remove-node-confirm.js +60 -0
- package/dist/es/editor/schema-apply.js +36 -0
- package/dist/es/editor/styles.js +74 -0
- package/dist/es/editor/toolbar/notify.js +59 -0
- package/dist/es/editor/toolbar/schema-io.js +107 -0
- package/dist/es/editor/toolbar/toolbar.js +394 -0
- package/dist/es/editor/use-editor-shortcuts.js +43 -0
- package/dist/es/editor/validation-summary.js +66 -0
- package/dist/es/engine/assert-never.js +8 -0
- package/dist/es/engine/conversion/index.js +127 -0
- package/dist/es/engine/ids.js +18 -0
- package/dist/es/engine/keys.js +48 -0
- package/dist/es/engine/linkage/cycle.js +25 -0
- package/dist/es/engine/linkage/default-evaluator.js +79 -0
- package/dist/es/engine/linkage/effects.js +41 -0
- package/dist/es/engine/linkage/evaluator.js +119 -0
- package/dist/es/engine/linkage/index.js +9 -0
- package/dist/es/engine/linkage/operators.js +44 -0
- package/dist/es/engine/linkage/source-tracking.js +17 -0
- package/dist/es/engine/linkage/taxonomy.js +51 -0
- package/dist/es/engine/linkage/validator.js +360 -0
- package/dist/es/engine/registry/defaults-mobile.js +12 -0
- package/dist/es/engine/registry/defaults.js +25 -0
- package/dist/es/engine/registry/form-field-registry.js +52 -0
- package/dist/es/engine/schema/edit-ops.js +264 -0
- package/dist/es/engine/schema/mutate.js +39 -0
- package/dist/es/engine/schema/nodes.js +61 -0
- package/dist/es/engine/schema/permission-bridge.js +46 -0
- package/dist/es/engine/schema/presentation.js +37 -0
- package/dist/es/engine/schema/reconcile.js +258 -0
- package/dist/es/engine/schema/removal-impact.js +59 -0
- package/dist/es/engine/schema/rewrite.js +11 -0
- package/dist/es/engine/schema/validate.js +320 -0
- package/dist/es/engine/schema/walk.js +103 -0
- package/dist/es/engine/validation.js +122 -0
- package/dist/es/icons.js +74 -0
- package/dist/es/index.js +54 -0
- package/dist/es/render/chrome/mobile-chrome.js +119 -0
- package/dist/es/render/chrome/pc-chrome.js +76 -0
- package/dist/es/render/chrome/subform-shell.js +38 -0
- package/dist/es/render/data-source-context.js +0 -0
- package/dist/es/render/flex-style.js +24 -0
- package/dist/es/render/form-field.js +37 -0
- package/dist/es/render/form-renderer.js +516 -0
- package/dist/es/render/grid-style.js +23 -0
- package/dist/es/render/parts/field-shell.js +119 -0
- package/dist/es/render/parts/label.js +44 -0
- package/dist/es/render/parts/options-status.js +19 -0
- package/dist/es/render/stack-style.js +13 -0
- package/dist/es/render/subform-columns.js +118 -0
- package/dist/es/render/submit.js +112 -0
- package/dist/es/runtime/effects.js +109 -0
- package/dist/es/runtime/resolve-scope-values.js +14 -0
- package/dist/es/runtime/runtime-context.js +10 -0
- package/dist/es/runtime/runtime-state-controller.js +99 -0
- package/dist/es/runtime/stabilize-state-map.js +14 -0
- package/dist/es/store/engine-provider.js +37 -0
- package/dist/es/store/form-store.js +306 -0
- package/dist/es/types/chrome.js +1 -0
- package/dist/es/types/component.js +13 -0
- package/dist/es/types/data-source.js +5 -0
- package/dist/es/types/index.js +5 -0
- package/dist/es/types/linkage.js +1 -0
- package/dist/es/types/properties.js +7 -0
- package/dist/es/types/schema.js +15 -0
- package/dist/types/src/components/button/index.d.ts +8 -0
- package/dist/types/src/components/checkbox-group-field/index.d.ts +2 -0
- package/dist/types/src/components/code-editor/code-editor-input.d.ts +1 -0
- package/dist/types/src/components/code-editor/index.d.ts +4 -0
- package/dist/types/src/components/containers/index.d.ts +12 -0
- package/dist/types/src/components/date-field/index.d.ts +4 -0
- package/dist/types/src/components/display/index.d.ts +4 -0
- package/dist/types/src/components/field-entries.d.ts +103 -0
- package/dist/types/src/components/mobile/alert-block.d.ts +12 -0
- package/dist/types/src/components/mobile/button.d.ts +9 -0
- package/dist/types/src/components/mobile/checkbox-group.d.ts +11 -0
- package/dist/types/src/components/mobile/date-adapters.d.ts +28 -0
- package/dist/types/src/components/mobile/date.d.ts +10 -0
- package/dist/types/src/components/mobile/daterange.d.ts +11 -0
- package/dist/types/src/components/mobile/datetime.d.ts +10 -0
- package/dist/types/src/components/mobile/definitions.d.ts +9 -0
- package/dist/types/src/components/mobile/divider.d.ts +10 -0
- package/dist/types/src/components/mobile/input-cell.d.ts +30 -0
- package/dist/types/src/components/mobile/number.d.ts +25 -0
- package/dist/types/src/components/mobile/option-group.d.ts +17 -0
- package/dist/types/src/components/mobile/paragraph.d.ts +10 -0
- package/dist/types/src/components/mobile/picker-trigger.d.ts +31 -0
- package/dist/types/src/components/mobile/radio.d.ts +12 -0
- package/dist/types/src/components/mobile/scope.d.ts +42 -0
- package/dist/types/src/components/mobile/select.d.ts +12 -0
- package/dist/types/src/components/mobile/switch.d.ts +14 -0
- package/dist/types/src/components/mobile/textarea.d.ts +3 -0
- package/dist/types/src/components/mobile/textfield.d.ts +11 -0
- package/dist/types/src/components/mobile/theme.d.ts +16 -0
- package/dist/types/src/components/number-field/index.d.ts +2 -0
- package/dist/types/src/components/radio-field/index.d.ts +2 -0
- package/dist/types/src/components/select-field/index.d.ts +2 -0
- package/dist/types/src/components/switch-field/index.d.ts +2 -0
- package/dist/types/src/components/textarea-field/index.d.ts +2 -0
- package/dist/types/src/components/textfield/index.d.ts +11 -0
- package/dist/types/src/editor/canvas/canvas-field.d.ts +24 -0
- package/dist/types/src/editor/canvas/canvas.d.ts +11 -0
- package/dist/types/src/editor/canvas/drop-indicator.d.ts +14 -0
- package/dist/types/src/editor/canvas/drop-zones.d.ts +48 -0
- package/dist/types/src/editor/canvas/json-split-view.d.ts +15 -0
- package/dist/types/src/editor/canvas/mobile-seed-state.d.ts +9 -0
- package/dist/types/src/editor/canvas/phone-frame.d.ts +15 -0
- package/dist/types/src/editor/dnd.d.ts +88 -0
- package/dist/types/src/editor/editor-layout-context.d.ts +53 -0
- package/dist/types/src/editor/footer/footer.d.ts +7 -0
- package/dist/types/src/editor/form-config/form-basics-tab.d.ts +34 -0
- package/dist/types/src/editor/form-config/form-config-drawer.d.ts +8 -0
- package/dist/types/src/editor/form-config/outline-tab.d.ts +2 -0
- package/dist/types/src/editor/form-editor.d.ts +142 -0
- package/dist/types/src/editor/palette/field-groups.d.ts +12 -0
- package/dist/types/src/editor/palette/palette-group.d.ts +31 -0
- package/dist/types/src/editor/palette/palette-item.d.ts +34 -0
- package/dist/types/src/editor/palette/palette-panel.d.ts +17 -0
- package/dist/types/src/editor/preview-effects.d.ts +14 -0
- package/dist/types/src/editor/preview-runtime-context.d.ts +23 -0
- package/dist/types/src/editor/properties/block-layout-section.d.ts +19 -0
- package/dist/types/src/editor/properties/container-properties.d.ts +19 -0
- package/dist/types/src/editor/properties/entries/built-ins.d.ts +19 -0
- package/dist/types/src/editor/properties/entries/checkbox-entry.d.ts +3 -0
- package/dist/types/src/editor/properties/entries/coerce.d.ts +6 -0
- package/dist/types/src/editor/properties/entries/entry-field.d.ts +29 -0
- package/dist/types/src/editor/properties/entries/icon-entry.d.ts +8 -0
- package/dist/types/src/editor/properties/entries/index.d.ts +8 -0
- package/dist/types/src/editor/properties/entries/key-entry.d.ts +14 -0
- package/dist/types/src/editor/properties/entries/linkage/action-editor.d.ts +42 -0
- package/dist/types/src/editor/properties/entries/linkage/actions-editor.d.ts +43 -0
- package/dist/types/src/editor/properties/entries/linkage/condition-editor.d.ts +28 -0
- package/dist/types/src/editor/properties/entries/linkage/container-linkage-section.d.ts +14 -0
- package/dist/types/src/editor/properties/entries/linkage/expression-assist.d.ts +33 -0
- package/dist/types/src/editor/properties/entries/linkage/index.d.ts +1 -0
- package/dist/types/src/editor/properties/entries/linkage/linkage-rules-entry.d.ts +17 -0
- package/dist/types/src/editor/properties/entries/linkage/mutators.d.ts +73 -0
- package/dist/types/src/editor/properties/entries/linkage/options.d.ts +72 -0
- package/dist/types/src/editor/properties/entries/linkage/rule-diagnostics.d.ts +20 -0
- package/dist/types/src/editor/properties/entries/linkage/rule-list-editor.d.ts +75 -0
- package/dist/types/src/editor/properties/entries/linkage/styles.d.ts +46 -0
- package/dist/types/src/editor/properties/entries/linkage/trigger-editor.d.ts +35 -0
- package/dist/types/src/editor/properties/entries/linkage/use-linkage-editor-model.d.ts +46 -0
- package/dist/types/src/editor/properties/entries/linkage/use-stable-options.d.ts +17 -0
- package/dist/types/src/editor/properties/entries/number-entry.d.ts +3 -0
- package/dist/types/src/editor/properties/entries/options-source/index.d.ts +9 -0
- package/dist/types/src/editor/properties/entries/options-source/source-mutators.d.ts +14 -0
- package/dist/types/src/editor/properties/entries/select-entry.d.ts +3 -0
- package/dist/types/src/editor/properties/entries/text-entry.d.ts +3 -0
- package/dist/types/src/editor/properties/form-data-sources-panel.d.ts +16 -0
- package/dist/types/src/editor/properties/form-linkage-panel.d.ts +13 -0
- package/dist/types/src/editor/properties/form-variables-panel.d.ts +17 -0
- package/dist/types/src/editor/properties/option-editors.d.ts +33 -0
- package/dist/types/src/editor/properties/panel-header.d.ts +21 -0
- package/dist/types/src/editor/properties/properties-empty.d.ts +13 -0
- package/dist/types/src/editor/properties/properties-header.d.ts +13 -0
- package/dist/types/src/editor/properties/properties-panel.d.ts +18 -0
- package/dist/types/src/editor/properties/properties-provider.d.ts +42 -0
- package/dist/types/src/editor/properties/properties-tabs.d.ts +24 -0
- package/dist/types/src/editor/properties/use-confirmable-kind-switch.d.ts +38 -0
- package/dist/types/src/editor/remove-node-confirm.d.ts +8 -0
- package/dist/types/src/editor/schema-apply.d.ts +25 -0
- package/dist/types/src/editor/styles.d.ts +37 -0
- package/dist/types/src/editor/toolbar/notify.d.ts +13 -0
- package/dist/types/src/editor/toolbar/schema-io.d.ts +12 -0
- package/dist/types/src/editor/toolbar/toolbar.d.ts +42 -0
- package/dist/types/src/editor/use-editor-shortcuts.d.ts +23 -0
- package/dist/types/src/editor/validation-summary.d.ts +19 -0
- package/dist/types/src/engine/assert-never.d.ts +18 -0
- package/dist/types/src/engine/conversion/index.d.ts +87 -0
- package/dist/types/src/engine/ids.d.ts +14 -0
- package/dist/types/src/engine/keys.d.ts +70 -0
- package/dist/types/src/engine/linkage/cycle.d.ts +28 -0
- package/dist/types/src/engine/linkage/default-evaluator.d.ts +10 -0
- package/dist/types/src/engine/linkage/effects.d.ts +76 -0
- package/dist/types/src/engine/linkage/evaluator.d.ts +72 -0
- package/dist/types/src/engine/linkage/index.d.ts +8 -0
- package/dist/types/src/engine/linkage/operators.d.ts +23 -0
- package/dist/types/src/engine/linkage/source-tracking.d.ts +25 -0
- package/dist/types/src/engine/linkage/taxonomy.d.ts +49 -0
- package/dist/types/src/engine/linkage/validator.d.ts +23 -0
- package/dist/types/src/engine/registry/defaults-mobile.d.ts +17 -0
- package/dist/types/src/engine/registry/defaults.d.ts +22 -0
- package/dist/types/src/engine/registry/form-field-registry.d.ts +79 -0
- package/dist/types/src/engine/schema/edit-ops.d.ts +101 -0
- package/dist/types/src/engine/schema/mutate.d.ts +41 -0
- package/dist/types/src/engine/schema/nodes.d.ts +34 -0
- package/dist/types/src/engine/schema/permission-bridge.d.ts +37 -0
- package/dist/types/src/engine/schema/presentation.d.ts +30 -0
- package/dist/types/src/engine/schema/reconcile.d.ts +80 -0
- package/dist/types/src/engine/schema/removal-impact.d.ts +39 -0
- package/dist/types/src/engine/schema/rewrite.d.ts +15 -0
- package/dist/types/src/engine/schema/validate.d.ts +36 -0
- package/dist/types/src/engine/schema/walk.d.ts +90 -0
- package/dist/types/src/engine/validation.d.ts +139 -0
- package/dist/types/src/icons.d.ts +8 -0
- package/dist/types/src/index.d.ts +39 -0
- package/dist/types/src/render/chrome/mobile-chrome.d.ts +9 -0
- package/dist/types/src/render/chrome/pc-chrome.d.ts +7 -0
- package/dist/types/src/render/chrome/subform-shell.d.ts +17 -0
- package/dist/types/src/render/data-source-context.d.ts +42 -0
- package/dist/types/src/render/flex-style.d.ts +26 -0
- package/dist/types/src/render/form-field.d.ts +32 -0
- package/dist/types/src/render/form-renderer.d.ts +65 -0
- package/dist/types/src/render/grid-style.d.ts +24 -0
- package/dist/types/src/render/parts/field-shell.d.ts +33 -0
- package/dist/types/src/render/parts/label.d.ts +20 -0
- package/dist/types/src/render/parts/options-status.d.ts +14 -0
- package/dist/types/src/render/stack-style.d.ts +19 -0
- package/dist/types/src/render/subform-columns.d.ts +16 -0
- package/dist/types/src/render/submit.d.ts +91 -0
- package/dist/types/src/runtime/effects.d.ts +77 -0
- package/dist/types/src/runtime/resolve-scope-values.d.ts +8 -0
- package/dist/types/src/runtime/runtime-context.d.ts +21 -0
- package/dist/types/src/runtime/runtime-state-controller.d.ts +33 -0
- package/dist/types/src/runtime/stabilize-state-map.d.ts +12 -0
- package/dist/types/src/runtime/types.d.ts +13 -0
- package/dist/types/src/store/engine-provider.d.ts +50 -0
- package/dist/types/src/store/form-store.d.ts +234 -0
- package/dist/types/src/types/chrome.d.ts +51 -0
- package/dist/types/src/types/component.d.ts +116 -0
- package/dist/types/src/types/data-source.d.ts +70 -0
- package/dist/types/src/types/index.d.ts +6 -0
- package/dist/types/src/types/linkage.d.ts +350 -0
- package/dist/types/src/types/properties.d.ts +122 -0
- package/dist/types/src/types/schema.d.ts +839 -0
- package/package.json +77 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import { FormVariable } from '../../types';
|
|
3
|
+
export interface FormVariablesPanelProps {
|
|
4
|
+
variables: FormVariable[];
|
|
5
|
+
onChange: (next: FormVariable[]) => void;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Form-global variable manager. Each variable surfaces to expressions as
|
|
9
|
+
* `$vars.<name>` with its `defaultValue`; the runtime seeds the expression scope
|
|
10
|
+
* from this list.
|
|
11
|
+
*
|
|
12
|
+
* Add and type/default edits flow through `onChange` (the drawer patches
|
|
13
|
+
* `schema.variables`); rename and delete go through the store's
|
|
14
|
+
* `renameVariable` / `removeVariable` so `set_variable` references follow the
|
|
15
|
+
* variable instead of dangling.
|
|
16
|
+
*/
|
|
17
|
+
export declare function FormVariablesPanel({ onChange, variables }: FormVariablesPanelProps): ReactElement;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import { FieldOption, RemoteDataSourceRequest, RemoteOptionMapping } from '../../types';
|
|
3
|
+
export interface OptionListEditorProps {
|
|
4
|
+
options: FieldOption[];
|
|
5
|
+
onChange: (next: FieldOption[]) => void;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Inline editor for a positional `{ label, value }` option list. Shared by the
|
|
9
|
+
* field option-source entry and the form-global data-source panel so the row
|
|
10
|
+
* layout, empty hint, and value coercion live in exactly one place. The editor
|
|
11
|
+
* authors STRING option values: a backend-sourced numeric value renders via
|
|
12
|
+
* `String()` and is committed back as a string once edited.
|
|
13
|
+
*
|
|
14
|
+
* Options carry no persistent id, so rows are keyed by ephemeral local ids
|
|
15
|
+
* kept in lockstep with every list mutation made here — removing a middle row
|
|
16
|
+
* keeps each surviving editor (and its focus) pinned to its logical row. Ids are
|
|
17
|
+
* re-minted only when the list LENGTH changes out from under the editor (an
|
|
18
|
+
* add/remove elsewhere, a source switch); a same-length external edit (e.g. an
|
|
19
|
+
* undo that swaps values without changing the count) keeps the existing ids, so
|
|
20
|
+
* a focused cell may briefly pin to the wrong logical row.
|
|
21
|
+
*/
|
|
22
|
+
export declare function OptionListEditor({ onChange, options }: OptionListEditorProps): ReactElement;
|
|
23
|
+
export interface RemoteRequestFieldsProps {
|
|
24
|
+
request: RemoteDataSourceRequest;
|
|
25
|
+
mapping: RemoteOptionMapping | undefined;
|
|
26
|
+
onChange: (request: RemoteDataSourceRequest, mapping: RemoteOptionMapping | undefined) => void;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* The resource / action / labelKey / valueKey editor for a remote option
|
|
30
|
+
* request. Shared by the field option-source entry and the form-global
|
|
31
|
+
* data-source panel; an all-empty mapping is normalized back to `undefined`.
|
|
32
|
+
*/
|
|
33
|
+
export declare function RemoteRequestFields({ mapping, onChange, request }: RemoteRequestFieldsProps): ReactElement;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ReactElement, ReactNode } from 'react';
|
|
2
|
+
export interface PanelHeaderProps {
|
|
3
|
+
/**
|
|
4
|
+
* Icon node shown in the bordered box — a `DynamicIcon` or an `<img>`. The box
|
|
5
|
+
* sizes an `svg` child to 20×20; an image supplies its own sizing.
|
|
6
|
+
*/
|
|
7
|
+
icon: ReactNode;
|
|
8
|
+
title: string;
|
|
9
|
+
/**
|
|
10
|
+
* Optional monospace subtitle (a node id / key), truncated with ellipsis and
|
|
11
|
+
* shown in full on hover.
|
|
12
|
+
*/
|
|
13
|
+
subtitle?: string;
|
|
14
|
+
onClose: () => void;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Shared chrome for a properties-panel header: a bordered icon box, a title with
|
|
18
|
+
* an optional monospace subtitle, and a deselect button. Used by the field and
|
|
19
|
+
* container property panels so the header layout lives in one place.
|
|
20
|
+
*/
|
|
21
|
+
export declare function PanelHeader({ icon, onClose, subtitle, title }: PanelHeaderProps): ReactElement;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { DynamicIconName } from '@vef-framework-react/components';
|
|
2
|
+
import { ReactElement } from 'react';
|
|
3
|
+
export interface PropertiesEmptyProps {
|
|
4
|
+
title: string;
|
|
5
|
+
hint?: string;
|
|
6
|
+
icon?: DynamicIconName;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Empty / error placeholder for the properties panel body. Used when no
|
|
10
|
+
* field is selected, the selected field is missing, or the field's type
|
|
11
|
+
* is not in the registry.
|
|
12
|
+
*/
|
|
13
|
+
export declare function PropertiesEmpty({ hint, icon, title }: PropertiesEmptyProps): ReactElement;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import { FieldDefinition, FormField } from '../../types';
|
|
3
|
+
export interface PropertiesHeaderProps {
|
|
4
|
+
field: FormField;
|
|
5
|
+
definition: FieldDefinition;
|
|
6
|
+
onClose: () => void;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Header for the properties panel when a field is selected. Shows the
|
|
10
|
+
* field's display name (or definition name as fallback) and its stable
|
|
11
|
+
* `id` so the user can correlate the panel with an item in the canvas.
|
|
12
|
+
*/
|
|
13
|
+
export declare function PropertiesHeader({ definition, field, onClose }: PropertiesHeaderProps): ReactElement;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Docked properties workbench on the right edge of the workspace — the mirror of
|
|
4
|
+
* the component palette. It is permanent in edit mode and hidden during
|
|
5
|
+
* preview / json mode; a selected field or container shows its property editor,
|
|
6
|
+
* an empty selection shows a "pick a control" hint.
|
|
7
|
+
*
|
|
8
|
+
* Layout when a field is selected:
|
|
9
|
+
* - header: type icon + field label + field id + deselect button
|
|
10
|
+
* - tabs: 属性 / 校验 / 联动 with count badges, plus a contextual 布局 tab
|
|
11
|
+
* appended only when the field sits inside a flex / grid container
|
|
12
|
+
* - body: scrollable, renders groups assigned to the active tab
|
|
13
|
+
*
|
|
14
|
+
* Empty / error states:
|
|
15
|
+
* - nothing selected → "未选择控件"
|
|
16
|
+
* - selected field's type is unknown → "未知字段类型"
|
|
17
|
+
*/
|
|
18
|
+
export declare function PropertiesPanel(): ReactElement;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { FieldDefinition, FormField, PropertiesDescriptor, PropertyGroup, PropertyTabId } from '../../types';
|
|
2
|
+
/**
|
|
3
|
+
* Visible-in-panel order of the property tabs. The properties panel header
|
|
4
|
+
* iterates this array to render the tab bar; `PROPERTY_TAB_LABELS` keeps
|
|
5
|
+
* the localized text alongside.
|
|
6
|
+
*/
|
|
7
|
+
export declare const PROPERTY_TAB_ORDER: readonly PropertyTabId[];
|
|
8
|
+
export declare const PROPERTY_TAB_LABELS: Record<PropertyTabId, string>;
|
|
9
|
+
/**
|
|
10
|
+
* Build the descriptor for a selected field by merging the auto-injected
|
|
11
|
+
* "general" + "linkage" groups with the field type's own descriptor.
|
|
12
|
+
*
|
|
13
|
+
* The auto-injected groups are forced into their own tabs. If the field
|
|
14
|
+
* type already declares a `general` or `linkage` group, its entries are
|
|
15
|
+
* appended to the injected one rather than producing a duplicate section
|
|
16
|
+
* in the panel.
|
|
17
|
+
*
|
|
18
|
+
* The descriptor depends only on the field's `definition` (its type), not
|
|
19
|
+
* on the field instance itself — per-field visibility decisions live on
|
|
20
|
+
* each entry's `visible(field)` predicate and are evaluated at render time
|
|
21
|
+
* by the panel.
|
|
22
|
+
*/
|
|
23
|
+
export declare function buildPropertiesDescriptor(definition: FieldDefinition): PropertiesDescriptor;
|
|
24
|
+
/**
|
|
25
|
+
* Slice the descriptor down to the groups assigned to a given tab. The
|
|
26
|
+
* properties panel uses this to render one tab at a time.
|
|
27
|
+
*/
|
|
28
|
+
export declare function groupsForTab(descriptor: PropertiesDescriptor, tab: PropertyTabId): PropertyGroup[];
|
|
29
|
+
/**
|
|
30
|
+
* Count the entries on a tab that are *configured* on the given field —
|
|
31
|
+
* i.e. carry a meaningful, non-default value. Used to render the count
|
|
32
|
+
* badge next to each tab name.
|
|
33
|
+
*
|
|
34
|
+
* The "configured" predicate is intentionally simple so it matches what a
|
|
35
|
+
* user would visually call a "set" field: any non-empty, non-falsy value.
|
|
36
|
+
* Read-only entries (like `id`) are excluded so the auto-injected general
|
|
37
|
+
* fields do not inflate the count.
|
|
38
|
+
*
|
|
39
|
+
* Entries hidden by `visible(field)` are excluded so the count matches the
|
|
40
|
+
* visible state of the tab.
|
|
41
|
+
*/
|
|
42
|
+
export declare function countConfiguredEntries(field: FormField, descriptor: PropertiesDescriptor, tab: PropertyTabId): number;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import { FormField, PropertiesDescriptor, PropertyTabId } from '../../types';
|
|
3
|
+
export interface PropertiesTabsProps {
|
|
4
|
+
field: FormField;
|
|
5
|
+
descriptor: PropertiesDescriptor;
|
|
6
|
+
activeTab: PropertyTabId;
|
|
7
|
+
/**
|
|
8
|
+
* The tabs to render, in order. The panel decides visibility (e.g. the
|
|
9
|
+
* contextual "布局" tab only for a container's children), so the bar simply
|
|
10
|
+
* renders what it is handed.
|
|
11
|
+
*/
|
|
12
|
+
tabs: readonly PropertyTabId[];
|
|
13
|
+
onChange: (tab: PropertyTabId) => void;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Tab bar across the top of the properties panel. Renders the `tabs` it is
|
|
17
|
+
* given, in order. Each tab shows the count of *configured* entries on the
|
|
18
|
+
* current field (the linkage tab counts its rules); tabs with no configured
|
|
19
|
+
* entries hide the badge to keep the bar quiet.
|
|
20
|
+
*
|
|
21
|
+
* The "属性" tab never shows a badge — it is the primary tab and would
|
|
22
|
+
* otherwise become a noisy counter of trivial defaults (id, label).
|
|
23
|
+
*/
|
|
24
|
+
export declare function PropertiesTabs({ activeTab, descriptor, field, onChange, tabs }: PropertiesTabsProps): ReactElement;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export interface ConfirmableKindSwitch<K> {
|
|
2
|
+
/**
|
|
3
|
+
* The kind awaiting confirmation, or `null` when no confirmation is open.
|
|
4
|
+
* Drives the `Popconfirm`'s `open`.
|
|
5
|
+
*/
|
|
6
|
+
pendingKind: K | null;
|
|
7
|
+
/**
|
|
8
|
+
* Picker `onChange`: ignore a no-op (same kind), defer to the confirmation
|
|
9
|
+
* when a switch would discard work, else commit immediately. The caller
|
|
10
|
+
* type-guards the raw control value before calling this.
|
|
11
|
+
*/
|
|
12
|
+
requestKind: (kind: K) => void;
|
|
13
|
+
/**
|
|
14
|
+
* Apply the pending kind and close the confirmation (`Popconfirm.onConfirm`).
|
|
15
|
+
*/
|
|
16
|
+
confirm: () => void;
|
|
17
|
+
/**
|
|
18
|
+
* Dismiss the confirmation without switching (`Popconfirm.onCancel`).
|
|
19
|
+
*/
|
|
20
|
+
cancel: () => void;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* The confirm-gated kind-switch flow shared by the data-source, option-source,
|
|
24
|
+
* and linkage-trigger editors. Each picks a value with several mutually
|
|
25
|
+
* exclusive *kinds* whose payloads do not overlap, so switching a configured
|
|
26
|
+
* value to another kind discards work and must be confirmed — while an
|
|
27
|
+
* unconfigured value switches instantly.
|
|
28
|
+
*
|
|
29
|
+
* The hook owns only the pending-kind lifecycle (the one piece that must stay in
|
|
30
|
+
* sync across editors). Each caller keeps its own picker control (`Segmented` /
|
|
31
|
+
* `Select`), its own `needsConfirm` predicate (a payload check, or a prop), and
|
|
32
|
+
* its own per-union `commit` reducer — none of which generalize.
|
|
33
|
+
*/
|
|
34
|
+
export declare function useConfirmableKindSwitch<K>(args: {
|
|
35
|
+
current: K;
|
|
36
|
+
needsConfirm: boolean;
|
|
37
|
+
commit: (kind: K) => void;
|
|
38
|
+
}): ConfirmableKindSwitch<K>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FormEditorStoreApi } from '../store/form-store';
|
|
2
|
+
/**
|
|
3
|
+
* Remove a node through an impact-aware confirmation: when the removal would
|
|
4
|
+
* cascade-prune linkage rules on OTHER blocks (or strand a default-hidden
|
|
5
|
+
* field with no way to show), the designer sees exactly what gets lost before
|
|
6
|
+
* committing. A removal with no outside impact stays a single click.
|
|
7
|
+
*/
|
|
8
|
+
export declare function removeNodeWithConfirm(storeApi: FormEditorStoreApi, nodeId: string): void;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { DeviceRegistries } from '../engine/registry/form-field-registry';
|
|
2
|
+
import { FormEditorStoreApi } from '../store/form-store';
|
|
3
|
+
export interface ApplySchemaJsonResult {
|
|
4
|
+
ok: boolean;
|
|
5
|
+
/**
|
|
6
|
+
* Newline-joined `path:message` lines for error-severity issues.
|
|
7
|
+
*/
|
|
8
|
+
errorText?: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Parse + validate raw schema JSON and commit it to the store — the single
|
|
12
|
+
* apply pipeline behind both the import dialog and the editable JSON view, so
|
|
13
|
+
* the two surfaces accept exactly the same inputs with exactly the same
|
|
14
|
+
* feedback. Errors block (returned for inline display); warnings round-trip
|
|
15
|
+
* with one summarizing toast.
|
|
16
|
+
*/
|
|
17
|
+
export declare function applySchemaJson(args: {
|
|
18
|
+
raw: string;
|
|
19
|
+
registries: DeviceRegistries;
|
|
20
|
+
storeApi: FormEditorStoreApi;
|
|
21
|
+
}): ApplySchemaJsonResult;
|
|
22
|
+
/**
|
|
23
|
+
* Trigger a browser download of pretty-printed schema JSON.
|
|
24
|
+
*/
|
|
25
|
+
export declare function downloadSchemaJson(json: string, schemaId: string): void;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Transition } from '@vef-framework-react/core';
|
|
2
|
+
import { SerializedStyles } from '@emotion/serialize';
|
|
3
|
+
/**
|
|
4
|
+
* Shared styles for the editor's side surfaces. Both side panels are docked
|
|
5
|
+
* workbenches: the component palette on the left, the properties panel on the
|
|
6
|
+
* right. They mirror each other (border + shadow face the canvas) and narrow
|
|
7
|
+
* together as the editor root shrinks.
|
|
8
|
+
*
|
|
9
|
+
* Three layouts are supported (see `editor-layout-context.tsx`):
|
|
10
|
+
* - comfortable: palette 296, properties 380
|
|
11
|
+
* - compact: palette 256, properties 360, toolbar folds extras
|
|
12
|
+
* - drawer: the palette collapses to an icon rail and the properties panel
|
|
13
|
+
* floats over the canvas's right edge, so the canvas keeps real width
|
|
14
|
+
* inside narrow hosts (wizard steps, split panes).
|
|
15
|
+
*/
|
|
16
|
+
export declare const PALETTE_DOCK_WIDTH = 296;
|
|
17
|
+
export declare const PALETTE_DOCK_WIDTH_COMPACT = 256;
|
|
18
|
+
export declare const PALETTE_DOCK_WIDTH_DRAWER = 56;
|
|
19
|
+
export declare const PROPERTIES_PANEL_WIDTH = 380;
|
|
20
|
+
export declare const PROPERTIES_PANEL_WIDTH_COMPACT = 360;
|
|
21
|
+
export declare const PROPERTIES_PANEL_WIDTH_DRAWER = 320;
|
|
22
|
+
export declare const paletteDockCss: SerializedStyles;
|
|
23
|
+
/**
|
|
24
|
+
* Docked properties workbench on the right edge of the workspace — the mirror
|
|
25
|
+
* of {@link paletteDockCss}. It is a permanent column (not a floating overlay):
|
|
26
|
+
* always present in edit mode, showing the selected control's properties or an
|
|
27
|
+
* empty hint when nothing is selected.
|
|
28
|
+
*/
|
|
29
|
+
export declare const propertiesDockCss: SerializedStyles;
|
|
30
|
+
export declare const panelHeaderCss: SerializedStyles;
|
|
31
|
+
export declare const panelHeaderTitleCss: SerializedStyles;
|
|
32
|
+
export declare const panelBodyCss: SerializedStyles;
|
|
33
|
+
/**
|
|
34
|
+
* Shared easing for the editor's panel / drawer motion (the bottom form-config
|
|
35
|
+
* drawer slides in with it).
|
|
36
|
+
*/
|
|
37
|
+
export declare const panelTransition: Transition;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export type NotifyKind = "success" | "warning" | "error";
|
|
3
|
+
export declare function notify(kind: NotifyKind, text: string): void;
|
|
4
|
+
/**
|
|
5
|
+
* Informational modal for post-action reports (e.g. a lossy conversion's
|
|
6
|
+
* dropped-component list) — content the user should read once, with no
|
|
7
|
+
* decision attached. `content` is the rich (React) body for the modal; the
|
|
8
|
+
* optional `detail` is a plain-text rendering of the same information for the
|
|
9
|
+
* `$vef`-less fallback (standalone / tests), where the React body cannot be
|
|
10
|
+
* shown and the title alone would drop the actual report.
|
|
11
|
+
*/
|
|
12
|
+
export declare function infoDialog(title: string, content: ReactNode, detail?: string): void;
|
|
13
|
+
export declare function confirmDialog(title: string, content: ReactNode, onOk: () => void, okType?: "danger" | "primary"): void;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
export type SchemaIoMode = null | "export" | "import";
|
|
3
|
+
export interface SchemaIoModalProps {
|
|
4
|
+
mode: SchemaIoMode;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Modal that hosts the JSON import / export dialogs. Kept as a single
|
|
9
|
+
* component because both branches share the same shell (close, footer
|
|
10
|
+
* style, transition) and only the body and confirm-action differ.
|
|
11
|
+
*/
|
|
12
|
+
export declare function SchemaIoModal({ mode, onClose }: SchemaIoModalProps): ReactElement;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { ReactElement, ReactNode } from 'react';
|
|
2
|
+
import { FormSchema } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* Brand shown at the toolbar's left edge. Consumers override the name/tag/icon
|
|
5
|
+
* so a downstream app does not ship the framework's own label or glyph.
|
|
6
|
+
*/
|
|
7
|
+
export interface ToolbarBrand {
|
|
8
|
+
name?: string;
|
|
9
|
+
tag?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Brand mark rendered at the very left. Defaults to the built-in clipboard
|
|
12
|
+
* glyph.
|
|
13
|
+
*/
|
|
14
|
+
icon?: ReactNode;
|
|
15
|
+
}
|
|
16
|
+
export interface ToolbarProps {
|
|
17
|
+
/**
|
|
18
|
+
* Brand label/tag. Defaults to the framework name with no version tag.
|
|
19
|
+
*/
|
|
20
|
+
brand?: ToolbarBrand;
|
|
21
|
+
/**
|
|
22
|
+
* Publish hook, invoked with the current schema after a pre-publish
|
|
23
|
+
* validation pass (warnings ask the designer for confirmation first).
|
|
24
|
+
* Publishing is host semantics — when omitted, the publish button is not
|
|
25
|
+
* rendered at all.
|
|
26
|
+
*/
|
|
27
|
+
onPublish?: (schema: FormSchema) => void;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Editor top toolbar. Houses brand, summary, device / view-mode switches,
|
|
31
|
+
* history, schema IO, and the publish CTA.
|
|
32
|
+
*
|
|
33
|
+
* Visual style: pill-shaped toggles for binary mode controls, ghost buttons
|
|
34
|
+
* for utility actions, and a primary `发布` button as the CTA on the right.
|
|
35
|
+
*
|
|
36
|
+
* Layout adaptivity (via `useEditorLayout`):
|
|
37
|
+
* - `comfortable`: full toolbar, every action visible
|
|
38
|
+
* - `compact`: import/export/clear collapse into a "更多" menu, toggle
|
|
39
|
+
* pills drop their labels, summary chip stays
|
|
40
|
+
* - `drawer`: same as compact plus summary chip hides
|
|
41
|
+
*/
|
|
42
|
+
export declare function Toolbar({ brand, onPublish }: ToolbarProps): ReactElement;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Keyboard shortcuts for the editor, scoped to the editor shell. The listener
|
|
4
|
+
* attaches to the shell root (which carries `tabIndex={-1}` so clicking
|
|
5
|
+
* anywhere inside focuses it), not `document`: keystrokes only reach it while
|
|
6
|
+
* focus is inside this editor instance, so two mounted editors never execute
|
|
7
|
+
* each other's shortcuts and the host page keeps its own key handling. Bails
|
|
8
|
+
* out when the active element is a text input so typing into the properties
|
|
9
|
+
* panel is not captured.
|
|
10
|
+
*
|
|
11
|
+
* Shortcuts:
|
|
12
|
+
* - Delete: remove the selected node (edit mode only — the selection is not
|
|
13
|
+
* rendered in preview / JSON view, so deleting it there would be invisible)
|
|
14
|
+
* - Cmd/Ctrl + D: duplicate the selected node (edit mode only; still swallowed
|
|
15
|
+
* in JSON view so the browser's bookmark dialog never opens mid-editing)
|
|
16
|
+
* - Cmd/Ctrl + Z: undo
|
|
17
|
+
* - Cmd/Ctrl + Shift + Z, Cmd/Ctrl + Y: redo
|
|
18
|
+
* - Escape: clear selection
|
|
19
|
+
*
|
|
20
|
+
* Backspace is deliberately NOT bound to delete — it is a common source of
|
|
21
|
+
* accidental field loss when the pointer briefly leaves an input.
|
|
22
|
+
*/
|
|
23
|
+
export declare function useEditorShortcuts(shellRef: RefObject<HTMLElement | null>): void;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import { ValidationIssue } from '../engine/validation';
|
|
3
|
+
export interface IssueListProps {
|
|
4
|
+
issues: ValidationIssue[];
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* The live schema's validation issues, for passive diagnostic surfaces (the
|
|
8
|
+
* footer chip). Deferred: the urgent render after a keystroke ships first and
|
|
9
|
+
* the full-schema validation pass follows at transition priority, so typing
|
|
10
|
+
* latency never pays for diagnostics. One pass per schema version — `useMemo`
|
|
11
|
+
* keyed on the deferred schema reference.
|
|
12
|
+
*/
|
|
13
|
+
export declare function useSchemaIssues(): ValidationIssue[];
|
|
14
|
+
/**
|
|
15
|
+
* Compact bullet list of validation issues (`path:message` per line), shared
|
|
16
|
+
* by the publish confirmation, the export banner, and the footer diagnostics
|
|
17
|
+
* popover so every surface reads the same way.
|
|
18
|
+
*/
|
|
19
|
+
export declare function IssueList({ issues }: IssueListProps): ReactElement;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Exhaustiveness guard for closed discriminated unions. Placing
|
|
3
|
+
* `assertNever(x)` in a switch's `default` turns a future un-handled union
|
|
4
|
+
* member into a compile error (the argument stops being `never`), and throws
|
|
5
|
+
* loudly if an out-of-contract value reaches it at runtime.
|
|
6
|
+
*
|
|
7
|
+
* Use this only where the value is provably in-contract by the time the default
|
|
8
|
+
* is reachable (e.g. behind a runtime type guard). On a path that may see
|
|
9
|
+
* untrusted input, prefer {@link exhaustive}, which degrades to a no-op.
|
|
10
|
+
*/
|
|
11
|
+
export declare function assertNever(value: never): never;
|
|
12
|
+
/**
|
|
13
|
+
* Compile-time-only exhaustiveness check. Like {@link assertNever} it makes a
|
|
14
|
+
* missing union case a compile error, but it does **not** throw — so it is safe
|
|
15
|
+
* in a switch over data that may be malformed at runtime (e.g. an imported
|
|
16
|
+
* schema on the public render path): an unexpected value is simply ignored.
|
|
17
|
+
*/
|
|
18
|
+
export declare function exhaustive(_value: never): void;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { Block, PresentationLayer } from '../../types';
|
|
2
|
+
import { FormFieldRegistry } from '../registry/form-field-registry';
|
|
3
|
+
/**
|
|
4
|
+
* Best-effort conversion of a PC design into a mobile one. The rule set is the
|
|
5
|
+
* single extension point: a rule decides, per source block type, whether the
|
|
6
|
+
* block converts (kept, layout stripped), unwraps (its body blocks splice
|
|
7
|
+
* inline — for layout-only containers a phone cannot honour), or is dropped (no
|
|
8
|
+
* mobile equivalent). The walker reflows everything into a single column and
|
|
9
|
+
* reports what it could not carry over.
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* Outcome of converting one source block toward the mobile registry.
|
|
13
|
+
*/
|
|
14
|
+
export type BlockConversion = {
|
|
15
|
+
status: "converted";
|
|
16
|
+
block: Block;
|
|
17
|
+
} | {
|
|
18
|
+
status: "unwrapped";
|
|
19
|
+
blocks: Block[];
|
|
20
|
+
} | {
|
|
21
|
+
status: "dropped";
|
|
22
|
+
sourceType: string;
|
|
23
|
+
reason: string;
|
|
24
|
+
};
|
|
25
|
+
export interface ConversionContext {
|
|
26
|
+
/**
|
|
27
|
+
* The target (mobile) registry — rules consult it to decide whether a type
|
|
28
|
+
* exists on mobile.
|
|
29
|
+
*/
|
|
30
|
+
target: FormFieldRegistry;
|
|
31
|
+
/**
|
|
32
|
+
* Recursively convert a block-list (a container's body). Reflows it to a
|
|
33
|
+
* single column, the same as the top level.
|
|
34
|
+
*/
|
|
35
|
+
convertBlocks: (blocks: Block[]) => Block[];
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Converts one source block type into a mobile block. Registered by `type` on a
|
|
39
|
+
* {@link ConversionRegistry}; an unregistered type falls back to identity (kept
|
|
40
|
+
* if the mobile registry has it, dropped otherwise).
|
|
41
|
+
*/
|
|
42
|
+
export interface BlockConversionRule {
|
|
43
|
+
type: Block["type"];
|
|
44
|
+
convert: (source: Block, ctx: ConversionContext) => BlockConversion;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* What a conversion carried over and what it dropped, surfaced to the user after
|
|
48
|
+
* a one-click convert.
|
|
49
|
+
*/
|
|
50
|
+
export interface ConversionReport {
|
|
51
|
+
convertedCount: number;
|
|
52
|
+
dropped: Array<{
|
|
53
|
+
sourceType: string;
|
|
54
|
+
reason: string;
|
|
55
|
+
label?: string;
|
|
56
|
+
}>;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* A registry of {@link BlockConversionRule}s keyed by source type. Injectable so
|
|
60
|
+
* custom field authors can register conversions alongside their fields.
|
|
61
|
+
*/
|
|
62
|
+
export declare class ConversionRegistry {
|
|
63
|
+
private readonly rules;
|
|
64
|
+
register(rule: BlockConversionRule): this;
|
|
65
|
+
convert(block: Block, ctx: ConversionContext): BlockConversion;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Convert a PC presentation into a mobile one. Reflows to a single column (each
|
|
69
|
+
* kept block stacked full-width), recurses container bodies, and regenerates
|
|
70
|
+
* every node id (keys preserved) so the mobile tree owns an independent id
|
|
71
|
+
* space. Returns the new layer plus a {@link ConversionReport}.
|
|
72
|
+
*/
|
|
73
|
+
export declare function convertPresentation(pc: PresentationLayer, rules: ConversionRegistry, target: FormFieldRegistry): {
|
|
74
|
+
layer: PresentationLayer;
|
|
75
|
+
report: ConversionReport;
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* The built-in conversion rules covering the framework's container and
|
|
79
|
+
* desktop-only field types. Everything else falls back to identity.
|
|
80
|
+
*
|
|
81
|
+
* - `section` / `subform` / `tabs` keep their shell and convert their bodies.
|
|
82
|
+
* - `flex` / `grid` are pure desktop layout, so they unwrap — their (converted)
|
|
83
|
+
* body blocks splice inline and the container itself is dropped.
|
|
84
|
+
* - `code-editor` has no mobile control, so it degrades to a `textarea`,
|
|
85
|
+
* preserving the keyed binding rather than dropping the field.
|
|
86
|
+
*/
|
|
87
|
+
export declare function createDefaultConversionRules(): ConversionRegistry;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type IdPrefix = "Action" | "Condition" | "DataSource" | "Field" | "Flex" | "Grid" | "Form" | "Rule" | "Section" | "Tabs" | "Tab" | "Subform" | "Var";
|
|
2
|
+
/**
|
|
3
|
+
* Generate a prefixed unique id, e.g. createId("Field") → "Field_xxxxxxxxxxxxxxxx".
|
|
4
|
+
* Reuses the shared cuid2-based generator.
|
|
5
|
+
*/
|
|
6
|
+
export declare function createId(prefix: IdPrefix): string;
|
|
7
|
+
/**
|
|
8
|
+
* The id prefix a node of the given `type` is minted with: the per-container
|
|
9
|
+
* prefix for the closed container set, `"Field"` for every leaf field type.
|
|
10
|
+
* The single authority shared by block creation and the clone/move rebuild in
|
|
11
|
+
* `schema/edit-ops.ts`, so a node's id prefix never depends on which path
|
|
12
|
+
* created it.
|
|
13
|
+
*/
|
|
14
|
+
export declare function idPrefixForType(type: string): IdPrefix;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { Block, FormField, KeyedFormField, KeyedNodeUnion, PresentationLayer, Validatable } from '../types';
|
|
2
|
+
import { ScopePath } from './schema/walk';
|
|
3
|
+
/**
|
|
4
|
+
* Generate a unique data-binding key for a keyed node within a value scope.
|
|
5
|
+
*
|
|
6
|
+
* Keys are unique **per scope**, not globally: a subform template opens a new
|
|
7
|
+
* scope, so its fields may reuse a key that also exists in the outer form
|
|
8
|
+
* (their runtime path is `lines[i].amount`, never colliding with a root
|
|
9
|
+
* `amount`). Pass the scope the node will live in; the root scope is `[]`.
|
|
10
|
+
*
|
|
11
|
+
* Tries the bare base first, then `${base}_2`, `${base}_3`, … until an unused
|
|
12
|
+
* key is found. Deterministic, so schemas stay readable while silent
|
|
13
|
+
* collisions are prevented when several keyed nodes of the same type are added.
|
|
14
|
+
*/
|
|
15
|
+
export declare function generateUniqueKey(schema: PresentationLayer, baseKey: string, scope?: ScopePath): string;
|
|
16
|
+
/**
|
|
17
|
+
* Allocate a key not already in `used`, recording the result back into the set
|
|
18
|
+
* so repeated calls stay unique. Lets a deep clone mint many keys in one pass.
|
|
19
|
+
*/
|
|
20
|
+
export declare function nextUniqueKey(used: Set<string>, baseKey: string): string;
|
|
21
|
+
/**
|
|
22
|
+
* Strip characters reserved by the value-path / scope machinery (`.`, `[`,
|
|
23
|
+
* `]`, `/`) — in fact any non-word character — from a user-typed key, so a key
|
|
24
|
+
* can never break field binding or per-scope resolution. May return `""` for an
|
|
25
|
+
* all-invalid input; callers must apply their own non-empty fallback.
|
|
26
|
+
*/
|
|
27
|
+
export declare function sanitizeKey(key: string): string;
|
|
28
|
+
/**
|
|
29
|
+
* Structural guard: a node binds a value (carries a **non-empty** `key`).
|
|
30
|
+
* Catches both keyed leaf fields and the subform. Narrows to
|
|
31
|
+
* {@link KeyedNodeUnion} so callers need no follow-up cast. An empty-string key
|
|
32
|
+
* is treated as non-keyed — matching `validateSchema`, which only registers a
|
|
33
|
+
* key of length > 0, so the runtime never binds a value to an empty path.
|
|
34
|
+
*/
|
|
35
|
+
export declare function isKeyedNode(node: Block): node is KeyedNodeUnion;
|
|
36
|
+
/**
|
|
37
|
+
* Structural guard narrowing a leaf field to its keyed variant (a **non-empty**
|
|
38
|
+
* `key`). Tied to the `FormField` union; for checks that must also catch a
|
|
39
|
+
* subform, use {@link isKeyedNode}.
|
|
40
|
+
*/
|
|
41
|
+
export declare function isKeyedField(field: FormField): field is KeyedFormField;
|
|
42
|
+
/**
|
|
43
|
+
* Structural guard for a field that carries the {@link Validatable} `validate`
|
|
44
|
+
* slot (textfield / code-editor / number). Lets callers read `field.validate`
|
|
45
|
+
* across the field union without a cast.
|
|
46
|
+
*/
|
|
47
|
+
export declare function isValidatableField(field: FormField): field is FormField & Validatable;
|
|
48
|
+
/**
|
|
49
|
+
* Collect the data-binding keys used directly within one value scope (siblings
|
|
50
|
+
* that must stay mutually unique). Keys nested under a deeper subform scope are
|
|
51
|
+
* excluded — they live in their own namespace.
|
|
52
|
+
*/
|
|
53
|
+
export declare function collectScopeKeys(schema: PresentationLayer, scope: ScopePath): Set<string>;
|
|
54
|
+
/**
|
|
55
|
+
* The data-binding keys living in one value scope — the unit
|
|
56
|
+
* {@link collectSubtreeKeysByScope} buckets a removed subtree into and the
|
|
57
|
+
* reconcile prune primitives consume.
|
|
58
|
+
*/
|
|
59
|
+
export interface ScopeKeyBucket {
|
|
60
|
+
scope: ScopePath;
|
|
61
|
+
keys: Set<string>;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Collect the data-binding keys carried by `node` and every node beneath it,
|
|
65
|
+
* bucketed by the value scope each key lives in. `baseScope` is the scope the
|
|
66
|
+
* subtree's root sits in; nested subform templates open deeper scopes. Feeds
|
|
67
|
+
* `pruneKeyReferences` when the subtree is removed (and the removal-impact
|
|
68
|
+
* simulation that previews that prune).
|
|
69
|
+
*/
|
|
70
|
+
export declare function collectSubtreeKeysByScope(node: Block, baseScope: ScopePath): ScopeKeyBucket[];
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Detects cycles in the linkage dependency graph. Each entry maps a
|
|
3
|
+
* source field key to the set of target field keys that depend on it;
|
|
4
|
+
* the validator builds this graph from the condition trees of rules that
|
|
5
|
+
* WRITE a value (`assign` / `script` state actions) — level-stable state
|
|
6
|
+
* actions (`show` / `hide` / `enable` / `disable` / `require` / `optional`)
|
|
7
|
+
* never feed values back, so they create no edges.
|
|
8
|
+
*
|
|
9
|
+
* Cycles must be reported before the schema reaches the renderer —
|
|
10
|
+
* otherwise `evaluateRuntimeStates` would loop in the host's React
|
|
11
|
+
* render-update cycle (one field's `assign` triggers another's
|
|
12
|
+
* recomputation, which writes back, etc.).
|
|
13
|
+
*
|
|
14
|
+
* LIMITATION: the graph is built only from trigger-condition source keys
|
|
15
|
+
* (see `collectConditionSourceKeys`), NOT from the data referenced inside
|
|
16
|
+
* `assign` / `set_field` value expressions, which are opaque to static
|
|
17
|
+
* analysis. Two fields that assign each other's value via expression therefore
|
|
18
|
+
* form a runtime loop this detector cannot see — authors must avoid mutual
|
|
19
|
+
* expression-assignment. The runtime's `stabilizeStateMap` deep-equality guard
|
|
20
|
+
* still halts a loop whose values have settled, but not one that keeps
|
|
21
|
+
* producing changing values.
|
|
22
|
+
*/
|
|
23
|
+
/**
|
|
24
|
+
* Find every dependency cycle in the edge graph. Returns one human-readable
|
|
25
|
+
* chain per cycle (`"a -> b -> a"`, scope prefixes stripped); the validator
|
|
26
|
+
* wraps each chain into a `cycle_detected` issue.
|
|
27
|
+
*/
|
|
28
|
+
export declare function findLinkageCycles(edges: Map<string, Set<string>>): string[];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ExpressionContext, LinkageEvaluators, LinkageScriptResult } from '../../types';
|
|
2
|
+
export declare function defaultEvaluateExpression(source: string, values: Record<string, unknown>, context?: ExpressionContext): boolean;
|
|
3
|
+
export declare function defaultEvaluateAssignExpression(source: string, values: Record<string, unknown>, context?: ExpressionContext): unknown;
|
|
4
|
+
export declare function defaultEvaluateScriptAction(source: string, values: Record<string, unknown>, context?: ExpressionContext): LinkageScriptResult | void;
|
|
5
|
+
/**
|
|
6
|
+
* Resolves a host-supplied {@link LinkageEvaluators} to a fully populated set,
|
|
7
|
+
* filling missing slots with the default `new Function` evaluators and the
|
|
8
|
+
* no-op effect dispatcher.
|
|
9
|
+
*/
|
|
10
|
+
export declare function resolveLinkageEvaluators(overrides?: LinkageEvaluators): Required<LinkageEvaluators>;
|