@vef-framework-react/form-editor 2.6.0 → 2.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (283) hide show
  1. package/dist/cjs/components/button/index.cjs +1 -1
  2. package/dist/cjs/components/checkbox-group-field/index.cjs +1 -1
  3. package/dist/cjs/components/code-editor/index.cjs +1 -1
  4. package/dist/cjs/components/date-field/index.cjs +1 -1
  5. package/dist/cjs/components/field-entries.cjs +1 -1
  6. package/dist/cjs/components/mobile/checkbox-group.cjs +1 -1
  7. package/dist/cjs/components/mobile/input-cell.cjs +1 -1
  8. package/dist/cjs/components/mobile/number.cjs +1 -1
  9. package/dist/cjs/components/mobile/switch.cjs +1 -1
  10. package/dist/cjs/components/mobile/textfield.cjs +1 -1
  11. package/dist/cjs/components/number-field/index.cjs +1 -1
  12. package/dist/cjs/components/textfield/index.cjs +1 -1
  13. package/dist/cjs/editor/canvas/canvas-field.cjs +1 -1
  14. package/dist/cjs/editor/canvas/canvas.cjs +1 -1
  15. package/dist/cjs/editor/canvas/drop-zones.cjs +1 -1
  16. package/dist/cjs/editor/canvas/json-split-view.cjs +1 -1
  17. package/dist/cjs/editor/canvas/subform-column-eligibility.cjs +1 -1
  18. package/dist/cjs/editor/context-sources.cjs +1 -0
  19. package/dist/cjs/editor/dnd.cjs +1 -1
  20. package/dist/cjs/editor/editor-layout-context.cjs +1 -1
  21. package/dist/cjs/editor/form-config/form-config-drawer.cjs +1 -1
  22. package/dist/cjs/editor/form-config/linkage-overview.cjs +1 -0
  23. package/dist/cjs/editor/form-editor.cjs +1 -1
  24. package/dist/cjs/editor/palette/palette-group.cjs +1 -1
  25. package/dist/cjs/editor/preview-runtime-context.cjs +1 -1
  26. package/dist/cjs/editor/properties/container-properties.cjs +1 -1
  27. package/dist/cjs/editor/properties/entries/index.cjs +1 -1
  28. package/dist/cjs/editor/properties/entries/linkage/action-editor.cjs +2 -2
  29. package/dist/cjs/editor/properties/entries/linkage/actions-editor.cjs +1 -1
  30. package/dist/cjs/editor/properties/entries/linkage/condition-editor.cjs +1 -1
  31. package/dist/cjs/editor/properties/entries/linkage/container-linkage-section.cjs +1 -1
  32. package/dist/cjs/editor/properties/entries/linkage/expression-input.cjs +1 -0
  33. package/dist/cjs/editor/properties/entries/linkage/linkage-rules-entry.cjs +1 -1
  34. package/dist/cjs/editor/properties/entries/linkage/mutators.cjs +1 -1
  35. package/dist/cjs/editor/properties/entries/linkage/options.cjs +1 -1
  36. package/dist/cjs/editor/properties/entries/linkage/rule-diagnostics.cjs +1 -1
  37. package/dist/cjs/editor/properties/entries/linkage/rule-list-editor.cjs +1 -1
  38. package/dist/cjs/editor/properties/entries/linkage/trigger-editor.cjs +1 -1
  39. package/dist/cjs/editor/properties/entries/linkage/use-linkage-editor-model.cjs +1 -1
  40. package/dist/cjs/editor/properties/form-linkage-panel.cjs +1 -1
  41. package/dist/cjs/editor/properties/form-variables-panel.cjs +1 -1
  42. package/dist/cjs/editor/properties/properties-panel.cjs +1 -1
  43. package/dist/cjs/editor/properties/properties-provider.cjs +1 -1
  44. package/dist/cjs/editor/remove-node-confirm.cjs +2 -1
  45. package/dist/cjs/editor/schema-apply.cjs +2 -2
  46. package/dist/cjs/editor/toolbar/notify.cjs +1 -1
  47. package/dist/cjs/editor/toolbar/toolbar.cjs +2 -1
  48. package/dist/cjs/engine/conversion/index.cjs +1 -1
  49. package/dist/cjs/engine/keys.cjs +1 -1
  50. package/dist/cjs/engine/linkage/cycle.cjs +1 -1
  51. package/dist/cjs/engine/linkage/default-evaluator.cjs +1 -1
  52. package/dist/cjs/engine/linkage/effects.cjs +1 -1
  53. package/dist/cjs/engine/linkage/evaluator.cjs +1 -1
  54. package/dist/cjs/engine/linkage/index.cjs +1 -1
  55. package/dist/cjs/engine/linkage/operators.cjs +1 -1
  56. package/dist/cjs/engine/linkage/source-tracking.cjs +1 -1
  57. package/dist/cjs/engine/linkage/taxonomy.cjs +1 -1
  58. package/dist/cjs/engine/linkage/validator.cjs +1 -1
  59. package/dist/cjs/engine/registry/form-field-registry.cjs +1 -1
  60. package/dist/cjs/engine/schema/column-type.cjs +1 -1
  61. package/dist/cjs/engine/schema/edit-ops.cjs +1 -1
  62. package/dist/cjs/engine/schema/permission-bridge.cjs +1 -1
  63. package/dist/cjs/engine/schema/presentation.cjs +1 -1
  64. package/dist/cjs/engine/schema/reconcile.cjs +1 -1
  65. package/dist/cjs/engine/schema/validate.cjs +1 -1
  66. package/dist/cjs/engine/schema/walk.cjs +1 -1
  67. package/dist/cjs/engine/validation.cjs +1 -1
  68. package/dist/cjs/render/form-renderer.cjs +1 -1
  69. package/dist/cjs/render/stack-style.cjs +1 -1
  70. package/dist/cjs/render/submit.cjs +1 -1
  71. package/dist/cjs/runtime/effects.cjs +1 -1
  72. package/dist/cjs/runtime/runtime-state-controller.cjs +1 -1
  73. package/dist/cjs/runtime/stabilize-state-map.cjs +1 -1
  74. package/dist/cjs/store/form-store.cjs +1 -1
  75. package/dist/cjs/types/index.cjs +1 -1
  76. package/dist/es/components/button/index.js +18 -18
  77. package/dist/es/components/checkbox-group-field/index.js +20 -19
  78. package/dist/es/components/code-editor/code-editor-input.js +1 -1
  79. package/dist/es/components/code-editor/index.js +31 -31
  80. package/dist/es/components/containers/index.js +1 -1
  81. package/dist/es/components/date-field/index.js +4 -2
  82. package/dist/es/components/display/index.js +1 -1
  83. package/dist/es/components/field-entries.js +5 -5
  84. package/dist/es/components/mobile/alert-block.js +1 -1
  85. package/dist/es/components/mobile/button.js +1 -1
  86. package/dist/es/components/mobile/checkbox-group.js +18 -18
  87. package/dist/es/components/mobile/date-adapters.js +1 -1
  88. package/dist/es/components/mobile/date.js +1 -1
  89. package/dist/es/components/mobile/daterange.js +1 -1
  90. package/dist/es/components/mobile/datetime.js +1 -1
  91. package/dist/es/components/mobile/definitions.js +1 -1
  92. package/dist/es/components/mobile/divider.js +1 -1
  93. package/dist/es/components/mobile/input-cell.js +13 -9
  94. package/dist/es/components/mobile/number.js +30 -35
  95. package/dist/es/components/mobile/option-group.js +1 -1
  96. package/dist/es/components/mobile/paragraph.js +1 -1
  97. package/dist/es/components/mobile/picker-trigger.js +1 -1
  98. package/dist/es/components/mobile/radio.js +1 -1
  99. package/dist/es/components/mobile/scope.js +1 -1
  100. package/dist/es/components/mobile/select.js +1 -1
  101. package/dist/es/components/mobile/switch.js +43 -19
  102. package/dist/es/components/mobile/textarea.js +1 -1
  103. package/dist/es/components/mobile/textfield.js +30 -26
  104. package/dist/es/components/mobile/theme.js +1 -1
  105. package/dist/es/components/number-field/index.js +2 -2
  106. package/dist/es/components/radio-field/index.js +1 -1
  107. package/dist/es/components/select-field/index.js +1 -1
  108. package/dist/es/components/switch-field/index.js +1 -1
  109. package/dist/es/components/textarea-field/index.js +1 -1
  110. package/dist/es/components/textfield/index.js +29 -28
  111. package/dist/es/editor/canvas/canvas-field.js +13 -11
  112. package/dist/es/editor/canvas/canvas.js +259 -248
  113. package/dist/es/editor/canvas/drop-indicator.js +1 -1
  114. package/dist/es/editor/canvas/drop-zones.js +31 -23
  115. package/dist/es/editor/canvas/json-split-view.js +73 -73
  116. package/dist/es/editor/canvas/mobile-seed-state.js +1 -1
  117. package/dist/es/editor/canvas/phone-frame.js +1 -1
  118. package/dist/es/editor/canvas/subform-column-eligibility.js +2 -2
  119. package/dist/es/editor/canvas/subform-table-cell.js +1 -1
  120. package/dist/es/editor/context-sources.js +21 -0
  121. package/dist/es/editor/dnd.js +2 -2
  122. package/dist/es/editor/editor-layout-context.js +2 -2
  123. package/dist/es/editor/footer/footer.js +1 -1
  124. package/dist/es/editor/form-config/form-basics-tab.js +1 -1
  125. package/dist/es/editor/form-config/form-config-drawer.js +125 -103
  126. package/dist/es/editor/form-config/linkage-overview.js +96 -0
  127. package/dist/es/editor/form-config/outline-tab.js +1 -1
  128. package/dist/es/editor/form-editor.js +94 -90
  129. package/dist/es/editor/palette/field-groups.js +1 -1
  130. package/dist/es/editor/palette/palette-group.js +3 -2
  131. package/dist/es/editor/palette/palette-item.js +1 -1
  132. package/dist/es/editor/palette/palette-panel.js +1 -1
  133. package/dist/es/editor/preview-effects.js +1 -1
  134. package/dist/es/editor/preview-runtime-context.js +3 -3
  135. package/dist/es/editor/properties/block-layout-section.js +1 -1
  136. package/dist/es/editor/properties/container-properties.js +16 -24
  137. package/dist/es/editor/properties/entries/built-ins.js +1 -1
  138. package/dist/es/editor/properties/entries/checkbox-entry.js +1 -1
  139. package/dist/es/editor/properties/entries/coerce.js +1 -1
  140. package/dist/es/editor/properties/entries/entry-field.js +1 -1
  141. package/dist/es/editor/properties/entries/icon-entry.js +1 -1
  142. package/dist/es/editor/properties/entries/index.js +10 -9
  143. package/dist/es/editor/properties/entries/key-entry.js +1 -1
  144. package/dist/es/editor/properties/entries/linkage/action-editor.js +117 -136
  145. package/dist/es/editor/properties/entries/linkage/actions-editor.js +13 -14
  146. package/dist/es/editor/properties/entries/linkage/condition-editor.js +158 -163
  147. package/dist/es/editor/properties/entries/linkage/container-linkage-section.js +18 -20
  148. package/dist/es/editor/properties/entries/linkage/expression-input.js +17 -0
  149. package/dist/es/editor/properties/entries/linkage/index.js +1 -1
  150. package/dist/es/editor/properties/entries/linkage/linkage-rules-entry.js +9 -11
  151. package/dist/es/editor/properties/entries/linkage/mutators.js +13 -13
  152. package/dist/es/editor/properties/entries/linkage/options.js +4 -4
  153. package/dist/es/editor/properties/entries/linkage/rule-diagnostics.js +30 -20
  154. package/dist/es/editor/properties/entries/linkage/rule-list-editor.js +29 -32
  155. package/dist/es/editor/properties/entries/linkage/styles.js +1 -1
  156. package/dist/es/editor/properties/entries/linkage/trigger-editor.js +10 -11
  157. package/dist/es/editor/properties/entries/linkage/use-linkage-editor-model.js +12 -13
  158. package/dist/es/editor/properties/entries/linkage/use-stable-options.js +1 -1
  159. package/dist/es/editor/properties/entries/number-entry.js +1 -1
  160. package/dist/es/editor/properties/entries/options-source/index.js +1 -1
  161. package/dist/es/editor/properties/entries/options-source/source-mutators.js +1 -1
  162. package/dist/es/editor/properties/entries/select-entry.js +1 -1
  163. package/dist/es/editor/properties/entries/text-entry.js +1 -1
  164. package/dist/es/editor/properties/form-data-sources-panel.js +1 -1
  165. package/dist/es/editor/properties/form-linkage-panel.js +2 -4
  166. package/dist/es/editor/properties/form-variables-panel.js +4 -4
  167. package/dist/es/editor/properties/option-editors.js +1 -1
  168. package/dist/es/editor/properties/panel-header.js +1 -1
  169. package/dist/es/editor/properties/properties-empty.js +1 -1
  170. package/dist/es/editor/properties/properties-header.js +1 -1
  171. package/dist/es/editor/properties/properties-panel.js +9 -9
  172. package/dist/es/editor/properties/properties-provider.js +6 -10
  173. package/dist/es/editor/properties/properties-tabs.js +1 -1
  174. package/dist/es/editor/properties/use-confirmable-kind-switch.js +1 -1
  175. package/dist/es/editor/remove-node-confirm.js +24 -29
  176. package/dist/es/editor/schema-apply.js +15 -17
  177. package/dist/es/editor/styles.js +1 -1
  178. package/dist/es/editor/toolbar/notify.js +9 -8
  179. package/dist/es/editor/toolbar/schema-io.js +1 -1
  180. package/dist/es/editor/toolbar/toolbar.js +29 -24
  181. package/dist/es/editor/use-editor-shortcuts.js +1 -1
  182. package/dist/es/editor/validation-summary.js +1 -1
  183. package/dist/es/engine/assert-never.js +1 -1
  184. package/dist/es/engine/conversion/index.js +2 -2
  185. package/dist/es/engine/ids.js +1 -1
  186. package/dist/es/engine/keys.js +28 -20
  187. package/dist/es/engine/linkage/cycle.js +6 -6
  188. package/dist/es/engine/linkage/default-evaluator.js +37 -32
  189. package/dist/es/engine/linkage/effects.js +13 -12
  190. package/dist/es/engine/linkage/evaluator.js +50 -47
  191. package/dist/es/engine/linkage/index.js +9 -8
  192. package/dist/es/engine/linkage/operators.js +51 -24
  193. package/dist/es/engine/linkage/source-tracking.js +15 -12
  194. package/dist/es/engine/linkage/taxonomy.js +12 -12
  195. package/dist/es/engine/linkage/validator.js +59 -50
  196. package/dist/es/engine/registry/defaults-mobile.js +1 -1
  197. package/dist/es/engine/registry/defaults.js +1 -1
  198. package/dist/es/engine/registry/form-field-registry.js +6 -6
  199. package/dist/es/engine/schema/column-type.js +20 -25
  200. package/dist/es/engine/schema/edit-ops.js +14 -11
  201. package/dist/es/engine/schema/mutate.js +1 -1
  202. package/dist/es/engine/schema/nodes.js +1 -1
  203. package/dist/es/engine/schema/permission-bridge.js +17 -22
  204. package/dist/es/engine/schema/presentation.js +2 -3
  205. package/dist/es/engine/schema/reconcile.js +4 -8
  206. package/dist/es/engine/schema/removal-impact.js +1 -1
  207. package/dist/es/engine/schema/rewrite.js +1 -1
  208. package/dist/es/engine/schema/validate.js +74 -71
  209. package/dist/es/engine/schema/walk.js +2 -2
  210. package/dist/es/engine/validation.js +15 -11
  211. package/dist/es/icons.js +1 -1
  212. package/dist/es/index.js +1 -1
  213. package/dist/es/render/chrome/mobile-chrome.js +1 -1
  214. package/dist/es/render/chrome/pc-chrome.js +1 -1
  215. package/dist/es/render/chrome/subform-shell.js +1 -1
  216. package/dist/es/render/data-source-context.js +0 -0
  217. package/dist/es/render/flex-style.js +1 -1
  218. package/dist/es/render/form-field.js +1 -1
  219. package/dist/es/render/form-renderer.js +180 -217
  220. package/dist/es/render/grid-style.js +1 -1
  221. package/dist/es/render/parts/field-shell.js +1 -1
  222. package/dist/es/render/parts/label.js +1 -1
  223. package/dist/es/render/parts/options-status.js +1 -1
  224. package/dist/es/render/stack-style.js +2 -2
  225. package/dist/es/render/subform-columns.js +1 -1
  226. package/dist/es/render/submit.js +6 -6
  227. package/dist/es/runtime/effects.js +37 -34
  228. package/dist/es/runtime/resolve-scope-values.js +1 -1
  229. package/dist/es/runtime/runtime-context.js +1 -1
  230. package/dist/es/runtime/runtime-state-controller.js +8 -8
  231. package/dist/es/runtime/stabilize-state-map.js +5 -3
  232. package/dist/es/store/engine-provider.js +1 -1
  233. package/dist/es/store/form-store.js +14 -8
  234. package/dist/es/types/chrome.js +1 -1
  235. package/dist/es/types/component.js +1 -1
  236. package/dist/es/types/data-source.js +1 -1
  237. package/dist/es/types/index.js +6 -5
  238. package/dist/es/types/linkage.js +1 -1
  239. package/dist/es/types/properties.js +1 -1
  240. package/dist/es/types/schema.js +1 -1
  241. package/dist/types/components/mobile/input-cell.d.ts +5 -0
  242. package/dist/types/components/mobile/switch.d.ts +9 -8
  243. package/dist/types/components/mobile/textfield.d.ts +3 -0
  244. package/dist/types/editor/canvas/drop-zones.d.ts +12 -1
  245. package/dist/types/editor/context-sources.d.ts +19 -0
  246. package/dist/types/editor/dnd.d.ts +5 -4
  247. package/dist/types/editor/form-config/linkage-overview.d.ts +8 -0
  248. package/dist/types/editor/form-editor.d.ts +12 -4
  249. package/dist/types/editor/preview-runtime-context.d.ts +3 -3
  250. package/dist/types/editor/properties/entries/linkage/action-editor.d.ts +0 -5
  251. package/dist/types/editor/properties/entries/linkage/actions-editor.d.ts +0 -5
  252. package/dist/types/editor/properties/entries/linkage/condition-editor.d.ts +1 -6
  253. package/dist/types/editor/properties/entries/linkage/expression-input.d.ts +22 -0
  254. package/dist/types/editor/properties/entries/linkage/rule-diagnostics.d.ts +10 -0
  255. package/dist/types/editor/properties/entries/linkage/rule-list-editor.d.ts +0 -5
  256. package/dist/types/editor/properties/entries/linkage/trigger-editor.d.ts +0 -5
  257. package/dist/types/editor/properties/entries/linkage/use-linkage-editor-model.d.ts +5 -10
  258. package/dist/types/editor/properties/entries/linkage/use-stable-options.d.ts +4 -4
  259. package/dist/types/editor/properties/form-variables-panel.d.ts +1 -1
  260. package/dist/types/editor/toolbar/notify.d.ts +17 -1
  261. package/dist/types/engine/keys.d.ts +11 -1
  262. package/dist/types/engine/linkage/default-evaluator.d.ts +6 -7
  263. package/dist/types/engine/linkage/effects.d.ts +2 -2
  264. package/dist/types/engine/linkage/evaluator.d.ts +12 -6
  265. package/dist/types/engine/linkage/index.d.ts +1 -1
  266. package/dist/types/engine/linkage/operators.d.ts +7 -5
  267. package/dist/types/engine/linkage/taxonomy.d.ts +4 -3
  268. package/dist/types/engine/registry/form-field-registry.d.ts +1 -1
  269. package/dist/types/engine/schema/permission-bridge.d.ts +7 -0
  270. package/dist/types/engine/validation.d.ts +7 -1
  271. package/dist/types/render/form-renderer.d.ts +6 -7
  272. package/dist/types/render/submit.d.ts +4 -4
  273. package/dist/types/runtime/effects.d.ts +3 -3
  274. package/dist/types/runtime/runtime-state-controller.d.ts +5 -5
  275. package/dist/types/store/form-store.d.ts +7 -0
  276. package/dist/types/types/linkage.d.ts +30 -10
  277. package/dist/types/types/schema.d.ts +1 -1
  278. package/package.json +6 -12
  279. package/dist/cjs/editor/properties/entries/linkage/expression-assist.cjs +0 -1
  280. package/dist/es/editor/properties/entries/linkage/expression-assist.js +0 -86
  281. package/dist/types/editor/properties/entries/linkage/expression-assist.d.ts +0 -33
  282. package/dist/types/editor/properties/entries/linkage/expression-assist.test.d.ts +0 -1
  283. package/dist/types/test-expression-engine.d.ts +0 -25
@@ -1,16 +1,16 @@
1
1
  import { ReactNode } from 'react';
2
- import { DataSourceResolver, ExpressionContext, LinkageEvaluators } from '../types';
2
+ import { DataSourceResolver, EvaluationContext, LinkageEvaluators } from '../types';
3
3
  /**
4
4
  * Host-injected runtime capabilities the editor's live preview (and JSON split
5
5
  * render) need so the in-designer `FormRenderer` behaves like the deployed form:
6
6
  * remote / ref data sources resolve, a custom linkage engine runs, and the host
7
- * expression scope (`$user` / `$node`) is present. Mirrors the slots
7
+ * evaluation scope (`$user` / `$node`) is present. Mirrors the slots
8
8
  * `FormRendererProps` already exposes; the editor only forwards them.
9
9
  */
10
10
  export interface PreviewRuntime {
11
11
  evaluators?: LinkageEvaluators;
12
12
  dataSourceResolver?: DataSourceResolver;
13
- expressionContext?: ExpressionContext;
13
+ evaluationContext?: EvaluationContext;
14
14
  }
15
15
  export declare function PreviewRuntimeProvider({ children, value }: {
16
16
  children: ReactNode;
@@ -25,11 +25,6 @@ export interface ActionEditorProps {
25
25
  * action's `retrigger` (edge vs. always) apply, so the toggle shows just here.
26
26
  */
27
27
  isConditionTrigger: boolean;
28
- /**
29
- * Declared form-variable names, feeding the expression editors' completion
30
- * and unknown-key lint (same assist the condition editor gets).
31
- */
32
- variableNames?: string[];
33
28
  onChange: (next: FieldLinkageAction) => void;
34
29
  onRemove: () => void;
35
30
  }
@@ -27,11 +27,6 @@ export interface ActionsEditorProps {
27
27
  * Form-global data sources offered as a `refresh_data_source` target.
28
28
  */
29
29
  dataSourceOptions: SourceFieldOption[];
30
- /**
31
- * Declared form-variable names, forwarded into each action's expression
32
- * editors for completion / lint.
33
- */
34
- variableNames?: string[];
35
30
  onChange: (next: FieldLinkageAction[]) => void;
36
31
  }
37
32
  /**
@@ -4,11 +4,6 @@ import { SourceFieldOption } from './options';
4
4
  export interface ConditionEditorProps {
5
5
  condition: LinkageCondition;
6
6
  sourceOptions: SourceFieldOption[];
7
- /**
8
- * Declared form-variable names, feeding `$vars.` autocompletion in
9
- * expression mode.
10
- */
11
- variableNames?: string[];
12
7
  /**
13
8
  * The owning block's data-binding key. The expression → visual switch
14
9
  * seeds its first condition with another field when one exists — a
@@ -21,7 +16,7 @@ export interface ConditionEditorProps {
21
16
  * Top-level wrapper. The root condition is always a `group` or an
22
17
  * `expression` — a bare `leaf` is never the rule's top condition. Mode
23
18
  * switching here is a destructive replace (group ↔ expression) because
24
- * there is no general way to reverse-translate a free-form ZEN expression
19
+ * there is no general way to reverse-translate a free-form JS expression
25
20
  * back into a structured tree; a switch that would discard authored content
26
21
  * is gated behind a confirmation.
27
22
  */
@@ -0,0 +1,22 @@
1
+ import { FC } from 'react';
2
+ /**
3
+ * Completion is off for linkage sources: without the (removed) scope-aware
4
+ * assist, CodeMirror would only offer generic JavaScript keyword noise.
5
+ * Shared with the script editor, which uses CodeEditor directly.
6
+ */
7
+ export declare const NO_COMPLETION_SETUP: {
8
+ readonly autocompletion: false;
9
+ };
10
+ interface ExpressionInputProps {
11
+ minHeight?: number;
12
+ placeholder?: string;
13
+ value: string;
14
+ onChange: (source: string) => void;
15
+ }
16
+ /**
17
+ * Single-expression editor for linkage conditions and action values: a
18
+ * compact CodeMirror bound to plain JavaScript — syntax highlighting, no
19
+ * completion, no gutters.
20
+ */
21
+ export declare const ExpressionInput: FC<ExpressionInputProps>;
22
+ export {};
@@ -7,6 +7,16 @@ import { ValidationIssue } from '../../../../engine/validation';
7
7
  * not card-addressable and are dropped here.
8
8
  */
9
9
  export declare function groupIssuesByRule(issues: readonly ValidationIssue[]): Map<string, ValidationIssue[]>;
10
+ /**
11
+ * Reference-reconcile a freshly-grouped issue map against the prior one.
12
+ * {@link groupIssuesByRule} allocates fresh buckets on every revalidation
13
+ * (every schema edit moves the deferred layer reference), which would hand
14
+ * every issue-carrying RuleCard a new `issues` prop identity — busting its
15
+ * memo on each keystroke anywhere in the form. A bucket whose content is
16
+ * unchanged keeps its previous array reference; a fully unchanged map keeps
17
+ * its own reference (mirroring the runtime's `stabilizeStateMap`).
18
+ */
19
+ export declare function stabilizeIssueBuckets(prev: Map<string, ValidationIssue[]> | undefined, next: Map<string, ValidationIssue[]>): Map<string, ValidationIssue[]>;
10
20
  export interface RuleDiagnosticsProps {
11
21
  issues: readonly ValidationIssue[];
12
22
  }
@@ -26,11 +26,6 @@ export interface RuleListEditorProps {
26
26
  * reading its own key).
27
27
  */
28
28
  sourceOptions: SourceFieldOption[];
29
- /**
30
- * Declared form-variable names, feeding `$vars.` autocompletion in the
31
- * expression-mode condition editor.
32
- */
33
- variableNames?: string[];
34
29
  /**
35
30
  * The owning block's data-binding key (when keyed). Seeds the expression →
36
31
  * visual switch with a different field, mirroring rule creation.
@@ -8,11 +8,6 @@ export interface TriggerEditorProps {
8
8
  */
9
9
  triggerKinds: readonly LinkageTriggerKind[];
10
10
  sourceOptions: SourceFieldOption[];
11
- /**
12
- * Declared form-variable names, forwarded to the expression-mode condition
13
- * editor for `$vars.` autocompletion.
14
- */
15
- variableNames?: string[];
16
11
  /**
17
12
  * The owning block's data-binding key, forwarded so the expression → visual
18
13
  * switch seeds with a different field when one exists.
@@ -1,4 +1,4 @@
1
- import { FieldLinkage, FormDataSource, FormVariable, PresentationLayer } from '../../../../types';
1
+ import { FieldLinkage, FormDataSource, PresentationLayer } from '../../../../types';
2
2
  import { SourceFieldOption } from './options';
3
3
  import { groupIssuesByRule } from './rule-diagnostics';
4
4
  export interface LinkageEditorModel {
@@ -11,10 +11,6 @@ export interface LinkageEditorModel {
11
11
  * The form's named data sources, for a `refresh_data_source` action.
12
12
  */
13
13
  dataSourceOptions: SourceFieldOption[];
14
- /**
15
- * Declared `$vars` names, for the expression editors' completion.
16
- */
17
- variableNames: string[];
18
14
  /**
19
15
  * Validator issues hung onto each rule by id, for live in-card diagnostics.
20
16
  */
@@ -23,10 +19,10 @@ export interface LinkageEditorModel {
23
19
  /**
24
20
  * The shared model behind every linkage editor host — the field-level entry, the
25
21
  * container section, and the form-level events panel. Each resolves the same
26
- * four things (same-scope field options, data-source options, variable names,
27
- * deferred rule diagnostics) and differed only in which layer/scope they walk
28
- * and whether the form-level linkage participates; that wiring lived copy-pasted
29
- * across all three.
22
+ * three things (same-scope field options, data-source options, deferred rule
23
+ * diagnostics) and differed only in which layer/scope they walk and whether the
24
+ * form-level linkage participates; that wiring lived copy-pasted across all
25
+ * three.
30
26
  *
31
27
  * `nodeId` is the node whose own value scope the sources resolve in (`null` for
32
28
  * the form-level root scope). `formLinkage` is threaded only by the form panel so
@@ -41,6 +37,5 @@ export declare function useLinkageEditorModel(args: {
41
37
  layer: PresentationLayer;
42
38
  nodeId: string | null;
43
39
  dataSources: FormDataSource[] | undefined;
44
- variables: FormVariable[] | undefined;
45
40
  formLinkage?: FieldLinkage;
46
41
  }): LinkageEditorModel;
@@ -5,10 +5,10 @@ import { SourceFieldOption } from './options';
5
5
  * The candidate walks rebuild the array on every store edit (the layer
6
6
  * reference moves per keystroke), but the candidate SET only changes when a
7
7
  * field is added / removed / re-keyed / re-labeled. Downstream the array
8
- * identity feeds the expression editors' `assistExtensions` memo — a fresh
9
- * reference per keystroke would rebuild the CodeMirror completion / lint
10
- * extensions and reconfigure the editor mid-typing (closing an open
11
- * completion popup).
8
+ * identity feeds `RuleCard`'s memo props (`sourceOptions` / `targetOptions`,
9
+ * see linkage-rules-entry.tsx) — a fresh reference per keystroke would
10
+ * re-render every rule card (and its mounted CodeMirror) on every edit
11
+ * anywhere in the form.
12
12
  *
13
13
  * The ref write happens during render but is idempotent for a given content,
14
14
  * so StrictMode double-renders and discarded concurrent renders stay
@@ -6,7 +6,7 @@ export interface FormVariablesPanelProps {
6
6
  }
7
7
  /**
8
8
  * Form-global variable manager. Each variable surfaces to expressions as
9
- * `$vars.<name>` with its `defaultValue`; the runtime seeds the expression scope
9
+ * `$vars.<name>` with its `defaultValue`; the runtime seeds the evaluation scope
10
10
  * from this list.
11
11
  *
12
12
  * Add and type/default edits flow through `onChange` (the drawer patches
@@ -10,4 +10,20 @@ export declare function notify(kind: NotifyKind, text: string): void;
10
10
  * shown and the title alone would drop the actual report.
11
11
  */
12
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;
13
+ export interface ConfirmDialogOptions {
14
+ onOk: () => void;
15
+ /**
16
+ * Visual intent of the confirm button.
17
+ *
18
+ * @default "danger"
19
+ */
20
+ okType?: "danger" | "primary";
21
+ /**
22
+ * Plain-text rendering of a rich (React) `content` for the `$vef`-less
23
+ * native fallback, where the React body cannot be shown and the title alone
24
+ * would drop the substance of the question (mirrors `infoDialog`'s
25
+ * `detail`). Unnecessary when `content` is already a string.
26
+ */
27
+ detail?: string;
28
+ }
29
+ export declare function confirmDialog(title: string, content: ReactNode, options: ConfirmDialogOptions): void;
@@ -1,4 +1,4 @@
1
- import { Block, FormField, KeyedFormField, KeyedNodeUnion, PresentationLayer, Validatable } from '../types';
1
+ import { Block, FormField, FormSchema, KeyedFormField, KeyedNodeUnion, PresentationLayer, Validatable } from '../types';
2
2
  import { ScopePath } from './schema/walk';
3
3
  /**
4
4
  * Generate a unique data-binding key for a keyed node within a value scope.
@@ -45,6 +45,16 @@ export declare function isKeyedField(field: FormField): field is KeyedFormField;
45
45
  * across the field union without a cast.
46
46
  */
47
47
  export declare function isValidatableField(field: FormField): field is FormField & Validatable;
48
+ /**
49
+ * Visit each root-scope keyed leaf field across both device presentations,
50
+ * de-duplicated by key with the pc tree scanned first (so pc wins a label /
51
+ * config collision). The shared projection walk behind `toColumnDefinitions`
52
+ * and `toFormFieldDefinitions` — the cross-package field inventories must
53
+ * agree on which fields exist, so they share one definition of the scan.
54
+ * Subform-scoped fields are excluded: consumers address fields by bare `key`,
55
+ * which cannot reach a scoped `lines[i].amount` path.
56
+ */
57
+ export declare function walkUniqueRootKeyedFields(schema: FormSchema, visit: (field: KeyedFormField) => void): void;
48
58
  /**
49
59
  * Collect the data-binding keys used directly within one value scope (siblings
50
60
  * that must stay mutually unique). Keys nested under a deeper subform scope are
@@ -1,11 +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;
1
+ import { EvaluationContext, LinkageEvaluators, LinkageScriptResult } from '../../types';
2
+ export declare function defaultEvaluateExpression(source: string, values: Record<string, unknown>, context?: EvaluationContext): boolean;
3
+ export declare function defaultEvaluateAssignExpression(source: string, values: Record<string, unknown>, context?: EvaluationContext): unknown;
4
+ export declare function defaultEvaluateScriptAction(source: string, values: Record<string, unknown>, context?: EvaluationContext): LinkageScriptResult | void;
5
5
  /**
6
6
  * Resolves a host-supplied {@link LinkageEvaluators} to a fully populated set,
7
- * filling missing expression slots with the shared ZEN evaluator, script slots
8
- * with the default `new Function` evaluator, and effects with the no-op
9
- * dispatcher.
7
+ * filling missing expression and script slots with the default `new Function`
8
+ * evaluators and effects with the no-op dispatcher.
10
9
  */
11
10
  export declare function resolveLinkageEvaluators(overrides?: LinkageEvaluators): Required<LinkageEvaluators>;
@@ -1,4 +1,4 @@
1
- import { EffectAction, ExpressionContext, FieldLinkageRule, LinkageCondition, LinkageEvaluators, LinkageTriggerKind, RuntimeSchema } from '../../types';
1
+ import { EffectAction, EvaluationContext, FieldLinkageRule, LinkageCondition, LinkageEvaluators, LinkageTriggerKind, RuntimeSchema } from '../../types';
2
2
  /**
3
3
  * The side-effect lane (pure half).
4
4
  *
@@ -59,7 +59,7 @@ export declare function collectConditionEffectRules(schema: RuntimeSchema): Cond
59
59
  * aligned with {@link collectConditionEffectRules}'s output, so the runtime can
60
60
  * diff against the previous vector to detect rising edges.
61
61
  */
62
- export declare function evaluateConditionEffectTruths(rules: ConditionEffectRule[], values: Record<string, unknown>, evaluators: Required<LinkageEvaluators>, context?: ExpressionContext): boolean[];
62
+ export declare function evaluateConditionEffectTruths(rules: ConditionEffectRule[], values: Record<string, unknown>, evaluators: Required<LinkageEvaluators>, context?: EvaluationContext): boolean[];
63
63
  /**
64
64
  * The effect actions to run when a given edge trigger fires. Returns the
65
65
  * flattened effect actions of every rule whose trigger matches `kind` (state
@@ -1,4 +1,4 @@
1
- import { Block, ExpressionContext, LinkageActionValue, LinkageCondition, LinkageEvaluators, RuntimeSchema } from '../../types';
1
+ import { Block, EvaluationContext, LinkageActionValue, LinkageCondition, LinkageEvaluators, RuntimeSchema } from '../../types';
2
2
  /**
3
3
  * Runtime state derived for a single field from its linkage rules. Mirrors
4
4
  * the shape consumed by `FormRenderer` / `RuntimeStateController` — kept as a
@@ -19,7 +19,7 @@ export interface EvaluateLinkageOptions {
19
19
  * scripts. Omitted at design time; the runtime composes it from the form's
20
20
  * variables and the host context.
21
21
  */
22
- expressionContext?: ExpressionContext;
22
+ evaluationContext?: EvaluationContext;
23
23
  }
24
24
  /**
25
25
  * Evaluates one field's linkage in two phases:
@@ -43,21 +43,27 @@ export declare function evaluateRuntimeStates(schema: RuntimeSchema, values: Rec
43
43
  * appropriately so a large tree never evaluates more leaves than needed.
44
44
  * Exported so the effect lane can re-evaluate a rule's trigger condition for
45
45
  * rising-edge detection without duplicating the recursion.
46
+ *
47
+ * Structurally defensive: a missing / non-object condition, a group without a
48
+ * `children` array, or an out-of-contract `kind` degrades to "no match" — the
49
+ * render path may evaluate a host-supplied schema that never passed
50
+ * `validateLinkageSchema`, and `matchLeaf`'s "never crash the renderer"
51
+ * contract must hold for shape, not just for values.
46
52
  */
47
- export declare function matchCondition(condition: LinkageCondition, values: Record<string, unknown>, evaluators: Required<LinkageEvaluators>, context?: ExpressionContext): boolean;
53
+ export declare function matchCondition(condition: LinkageCondition, values: Record<string, unknown>, evaluators: Required<LinkageEvaluators>, context?: EvaluationContext): boolean;
48
54
  /**
49
55
  * Resolve a {@link LinkageActionValue} to a concrete value: a literal verbatim,
50
56
  * or an expression run through the injected evaluator. Shared by the state
51
57
  * lane's `assign` and the effect lane's value-bearing actions (`set_field` /
52
58
  * `alert` / `navigate`).
53
59
  */
54
- export declare function resolveActionValue(actionValue: LinkageActionValue, values: Record<string, unknown>, evaluators: Required<LinkageEvaluators>, context?: ExpressionContext): unknown;
60
+ export declare function resolveActionValue(actionValue: LinkageActionValue, values: Record<string, unknown>, evaluators: Required<LinkageEvaluators>, context?: EvaluationContext): unknown;
55
61
  /**
56
62
  * Build the `$vars` map from a schema's form-global variable declarations,
57
63
  * keyed by variable name with each `defaultValue`. The runtime merges this with
58
- * any host-supplied overrides to form the expression context's `variables`.
64
+ * any host-supplied overrides to form the evaluation context's `variables`.
59
65
  */
60
- export declare function deriveExpressionVariables(schema: RuntimeSchema): Record<string, unknown>;
66
+ export declare function deriveEvaluationVariables(schema: RuntimeSchema): Record<string, unknown>;
61
67
  /**
62
68
  * Builds the initial value map for a form from its schema. Each root-scope
63
69
  * keyed field is seeded with a type-appropriate empty value (see
@@ -1,7 +1,7 @@
1
1
  export { formatIssueMessage, type ValidationIssue, type ValidationIssueCode, type ValidationSeverity } from '../validation';
2
2
  export { defaultEvaluateAssignExpression, defaultEvaluateExpression, defaultEvaluateScriptAction, resolveLinkageEvaluators } from './default-evaluator';
3
3
  export { collectConditionEffectRules, evaluateConditionEffectTruths, getFieldEventTriggerKinds, getTriggerEffectActions, type ConditionEffectRule } from './effects';
4
- export { deriveDefaultValues, deriveExpressionVariables, emptyRuntimeState, evaluateLinkage, evaluateRuntimeStates, resolveActionValue, type EvaluateLinkageOptions, type RuntimeFieldState } from './evaluator';
4
+ export { deriveDefaultValues, deriveEvaluationVariables, emptyRuntimeState, evaluateLinkage, evaluateRuntimeStates, resolveActionValue, type EvaluateLinkageOptions, type RuntimeFieldState } from './evaluator';
5
5
  export { isEmptyRuntimeValue, LINKAGE_OPERATORS } from './operators';
6
6
  export { getLinkageSourceKeys } from './source-tracking';
7
7
  export { ALERT_LEVELS, EFFECT_ACTION_TYPES, FIELD_EVENT_TRIGGER_KINDS, FIELD_TRIGGER_KINDS, FORM_TRIGGER_KINDS, isEffectAction, isFieldEventTriggerKind, isStateAction, KEYED_ONLY_ACTIONS, LINKAGE_ACTION_TYPES, STATE_ACTION_TYPES } from './taxonomy';
@@ -1,4 +1,4 @@
1
- import { LinkageConditionLeaf, LinkageOperator } from '../../types';
1
+ import { EvaluationContext, LinkageConditionLeaf, LinkageOperator } from '../../types';
2
2
  /**
3
3
  * The full set of supported leaf operators, in display order. Mirrors the
4
4
  * union `LinkageOperator` and is used both by the editor UI (to render the
@@ -16,8 +16,10 @@ export declare const LINKAGE_OPERATORS: readonly LinkageOperator[];
16
16
  */
17
17
  export declare function isEmptyRuntimeValue(value: unknown): boolean;
18
18
  /**
19
- * Evaluates a leaf condition against the current form values. Operators
20
- * fall back to `false` rather than throw when the source value is of an
21
- * unexpected type, so a malformed condition can never crash the renderer.
19
+ * Evaluates a leaf condition against the current form values (or, for a
20
+ * `$`-rooted source path, the evaluation context — see
21
+ * {@link resolveLeafSourceValue}). Operators fall back to `false` rather than
22
+ * throw when the source value is of an unexpected type, so a malformed
23
+ * condition can never crash the renderer.
22
24
  */
23
- export declare function matchLeaf(leaf: LinkageConditionLeaf, values: Record<string, unknown>): boolean;
25
+ export declare function matchLeaf(leaf: LinkageConditionLeaf, values: Record<string, unknown>, context?: EvaluationContext): boolean;
@@ -13,9 +13,10 @@ export declare const LINKAGE_ACTION_TYPES: readonly LinkageActionType[];
13
13
  export declare function isStateAction(action: FieldLinkageAction): action is StateAction;
14
14
  /**
15
15
  * Narrows an action to the effect family — fired by the side-effect lane,
16
- * skipped by the state lane. The complement of {@link isStateAction} over the
17
- * closed {@link FieldLinkageAction} union, which is sound because
18
- * {@link STATE_ACTION_TYPE_TABLE} is compile-checked to be complete.
16
+ * skipped by the state lane. A positive membership test (not the negation of
17
+ * {@link isStateAction}): on the unvalidated render path an out-of-contract
18
+ * `action.type` must classify as NEITHER family, not silently become an
19
+ * effect.
19
20
  */
20
21
  export declare function isEffectAction(action: FieldLinkageAction): action is EffectAction;
21
22
  /**
@@ -20,6 +20,7 @@ export declare class FormFieldRegistry {
20
20
  * `useSyncExternalStore` snapshot this number to know when to re-read.
21
21
  */
22
22
  private revision;
23
+ private notify;
23
24
  register(definition: FieldDefinition): void;
24
25
  unregister(type: string): boolean;
25
26
  get(type: string): FieldDefinition | undefined;
@@ -64,7 +65,6 @@ export declare class FormFieldRegistry {
64
65
  * only its identity (changing on every mutation) matters.
65
66
  */
66
67
  getRevision(): number;
67
- private notify;
68
68
  }
69
69
  /**
70
70
  * One {@link FormFieldRegistry} per target device. The editor and renderer
@@ -4,6 +4,13 @@ import { FieldOption, FormSchema } from '../../types';
4
4
  * (`approval/form_definition.go` `FieldKind`). The form editor's own field
5
5
  * types are richer; this is the lowest-common-denominator the cross-package
6
6
  * field-permission matrix keys off.
7
+ *
8
+ * For approval-backend integrations use `projectFormSchema` from
9
+ * `@vef-framework-react/approval-form-bridge` instead — its mapping is the
10
+ * authoritative one there. This table intentionally stays lossy (switch /
11
+ * daterange collapse into a nearest kind, subforms are excluded, unknown
12
+ * types fall back to "input") because a permission row only needs a rough
13
+ * label, while the bridge must reject what the backend cannot carry.
7
14
  */
8
15
  export type FieldKind = "input" | "textarea" | "select" | "number" | "date" | "upload";
9
16
  /**
@@ -21,7 +21,7 @@
21
21
  /**
22
22
  * Stable machine-readable identifiers for every issue the validators emit.
23
23
  */
24
- export type ValidationIssueCode = "schema_not_object" | "id_required" | "duplicate_id" | "version_unsupported" | "presentation_not_object" | "variables_invalid" | "data_sources_invalid" | "block_not_object" | "children_not_array" | "tabs_empty" | "tab_malformed" | "type_required" | "unknown_field_type" | "key_required" | "stray_key" | "stray_key_on_container" | "duplicate_key" | "key_invalid_charset" | "span_invalid" | "flex_invalid" | "column_width_invalid" | "gap_invalid" | "columns_invalid" | "variant_invalid" | "title_invalid" | "display_text_invalid" | "rows_bound_invalid" | "subform_table_column" | "validate_malformed" | "validate_range_invalid" | "pattern_invalid" | "data_source_invalid" | "data_source_ref_unknown" | "request_malformed" | "request_incomplete" | "linkage_malformed" | "rules_not_array" | "rule_malformed" | "trigger_malformed" | "trigger_kind_invalid" | "trigger_requires_keyed_leaf" | "condition_malformed" | "condition_kind_invalid" | "logic_invalid" | "condition_group_empty" | "operator_invalid" | "source_key_empty" | "source_key_unresolved" | "source_empty" | "actions_not_array" | "actions_empty" | "action_malformed" | "action_unknown_type" | "state_action_on_edge_trigger" | "state_action_on_form_scope" | "action_requires_keyed_leaf" | "defaults_requires_keyed_leaf" | "defaults_on_form_scope" | "default_hidden_unreachable" | "target_key_empty" | "target_key_unresolved" | "variable_empty" | "data_source_id_empty" | "value_malformed" | "alert_level_invalid" | "retrigger_invalid" | "retrigger_ignored" | "self_reference" | "cycle_detected";
24
+ export type ValidationIssueCode = "schema_not_object" | "id_required" | "duplicate_id" | "version_unsupported" | "presentation_not_object" | "variables_invalid" | "data_sources_invalid" | "block_not_object" | "children_not_array" | "tabs_empty" | "tab_malformed" | "type_required" | "unknown_field_type" | "key_required" | "stray_key" | "stray_key_on_container" | "duplicate_key" | "key_invalid_charset" | "span_invalid" | "flex_invalid" | "column_width_invalid" | "gap_invalid" | "columns_invalid" | "variant_invalid" | "subform_variant_invalid" | "title_invalid" | "display_text_invalid" | "rows_bound_invalid" | "subform_table_column" | "validate_malformed" | "validate_range_invalid" | "pattern_invalid" | "data_source_invalid" | "data_source_ref_unknown" | "request_malformed" | "request_incomplete" | "linkage_malformed" | "rules_not_array" | "rule_malformed" | "trigger_malformed" | "trigger_kind_invalid" | "trigger_requires_keyed_leaf" | "condition_malformed" | "condition_kind_invalid" | "logic_invalid" | "condition_group_empty" | "operator_invalid" | "source_key_empty" | "source_key_unresolved" | "source_empty" | "actions_not_array" | "actions_empty" | "action_malformed" | "action_unknown_type" | "state_action_on_edge_trigger" | "state_action_on_form_scope" | "action_requires_keyed_leaf" | "defaults_requires_keyed_leaf" | "defaults_on_form_scope" | "default_hidden_unreachable" | "target_key_empty" | "target_key_unresolved" | "variable_empty" | "data_source_id_empty" | "value_malformed" | "alert_level_invalid" | "retrigger_invalid" | "retrigger_ignored" | "self_reference" | "cycle_detected";
25
25
  export type ValidationSeverity = "error" | "warning";
26
26
  /**
27
27
  * One problem found while validating a schema. `path` points at the offending
@@ -111,6 +111,12 @@ type ParamlessCode = Exclude<ValidationIssueCode, ParamCode>;
111
111
  */
112
112
  export declare function formatIssueMessage<C extends ParamCode>(code: C, params: ValidationIssueParams[C]): string;
113
113
  export declare function formatIssueMessage(code: ParamlessCode): string;
114
+ /**
115
+ * One issue rendered as `path:message` (or the bare message when it carries
116
+ * no path) — the plain-text line format shared by the apply pipeline's
117
+ * error/warning reports and the dialogs' `$vef`-less fallbacks.
118
+ */
119
+ export declare function formatIssueLine(issue: ValidationIssue): string;
114
120
  /**
115
121
  * Build a {@link ValidationIssue}, deriving `severity` and `message` from the
116
122
  * central tables so emit sites only state location + code (+ params / rule id).
@@ -1,6 +1,6 @@
1
1
  import { ReactElement, Ref } from 'react';
2
2
  import { RuntimeFormValues } from '../runtime/types';
3
- import { DataSourceResolver, ExpressionContext, FormSchema, LinkageEvaluators, PresentationDevice } from '../types';
3
+ import { DataSourceResolver, EvaluationContext, FormSchema, LinkageEvaluators, PresentationDevice } from '../types';
4
4
  export interface FormRendererProps {
5
5
  schema: FormSchema;
6
6
  /**
@@ -12,10 +12,9 @@ export interface FormRendererProps {
12
12
  defaultValues?: RuntimeFormValues;
13
13
  disabled?: boolean;
14
14
  /**
15
- * Overrides for the dynamic linkage evaluators. Expression slots fall back to
16
- * the shared ZEN engine; script slots fall back to `new Function` because
17
- * scripts are statement blocks. Host projects only need overrides for a
18
- * sandbox, a custom expression engine, or a DSL.
15
+ * Overrides for the dynamic linkage evaluators. Expression and script slots
16
+ * fall back to plain-JavaScript `new Function` compilation. Host projects
17
+ * only need overrides for a sandbox, a custom expression engine, or a DSL.
19
18
  */
20
19
  evaluators?: LinkageEvaluators;
21
20
  /**
@@ -24,12 +23,12 @@ export interface FormRendererProps {
24
23
  */
25
24
  dataSourceResolver?: DataSourceResolver;
26
25
  /**
27
- * Host-supplied expression scope. `$vars` here merges over (and overrides) the
26
+ * Host-supplied evaluation scope. `$vars` here merges over (and overrides) the
28
27
  * schema's variable defaults; `$user` / `$node` carry runtime context. The
29
28
  * form derives `$vars` from `schema.variables` on its own, so this is only
30
29
  * needed to supply user / node context or override a variable at runtime.
31
30
  */
32
- expressionContext?: ExpressionContext;
31
+ evaluationContext?: EvaluationContext;
33
32
  onSubmit?: (values: RuntimeFormValues) => void | Promise<void>;
34
33
  /**
35
34
  * Imperative handle for host chrome (a Modal footer's 确定/取消, an external
@@ -1,6 +1,6 @@
1
1
  import { RuntimeFieldState } from '../engine/linkage';
2
2
  import { RuntimeFormValues } from '../runtime/types';
3
- import { Block, ExpressionContext, KeyedFormField, LinkageEvaluators, RuntimeSchema, SubformNode } from '../types';
3
+ import { Block, EvaluationContext, KeyedFormField, LinkageEvaluators, RuntimeSchema, SubformNode } from '../types';
4
4
  /**
5
5
  * Build the submit payload for one value scope: each keyed field / subform that
6
6
  * is not **effectively** hidden — by its own linkage or any ancestor container's
@@ -13,7 +13,7 @@ import { Block, ExpressionContext, KeyedFormField, LinkageEvaluators, RuntimeSch
13
13
  export declare function filterSubmitValues(args: {
14
14
  blocks: Block[];
15
15
  evaluators: LinkageEvaluators | undefined;
16
- expressionContext: ExpressionContext | undefined;
16
+ evaluationContext: EvaluationContext | undefined;
17
17
  values: RuntimeFormValues;
18
18
  }): RuntimeFormValues;
19
19
  /**
@@ -44,7 +44,7 @@ export declare function collectSubmitErrors(args: {
44
44
  blocks: Block[];
45
45
  disabled: boolean;
46
46
  evaluators: LinkageEvaluators | undefined;
47
- expressionContext: ExpressionContext | undefined;
47
+ evaluationContext: EvaluationContext | undefined;
48
48
  namePrefix: string;
49
49
  values: RuntimeFormValues;
50
50
  }): Record<string, string>;
@@ -57,7 +57,7 @@ export declare function collectSubmitErrors(args: {
57
57
  export declare function validateRuntimeField(args: {
58
58
  disabled: boolean;
59
59
  evaluators: LinkageEvaluators | undefined;
60
- expressionContext: ExpressionContext | undefined;
60
+ evaluationContext: EvaluationContext | undefined;
61
61
  field: KeyedFormField;
62
62
  namePrefix: string;
63
63
  value: unknown;
@@ -1,5 +1,5 @@
1
1
  import { ReactElement, ReactNode } from 'react';
2
- import { EffectAction, ExpressionContext, LinkageEvaluators, RuntimeSchema } from '../types';
2
+ import { EffectAction, EvaluationContext, LinkageEvaluators, RuntimeSchema } from '../types';
3
3
  import { RuntimeForm, RuntimeFormValues } from './types';
4
4
  /**
5
5
  * Run a list of effect actions in one value scope (root form or subform row).
@@ -50,7 +50,7 @@ export declare function EffectDispatchProvider({ children, run }: {
50
50
  export declare function dispatchFormEffects(args: {
51
51
  actions: EffectAction[];
52
52
  evaluators: LinkageEvaluators | undefined;
53
- expressionContext: ExpressionContext | undefined;
53
+ evaluationContext: EvaluationContext | undefined;
54
54
  form: RuntimeForm;
55
55
  sinks: EffectSinks;
56
56
  }): Promise<void>;
@@ -68,7 +68,7 @@ export declare function dispatchFormEffects(args: {
68
68
  */
69
69
  export declare function useScopeEffects(args: {
70
70
  evaluators: LinkageEvaluators | undefined;
71
- expressionContext: ExpressionContext | undefined;
71
+ evaluationContext: EvaluationContext | undefined;
72
72
  form: RuntimeForm;
73
73
  prefix: string;
74
74
  schema: RuntimeSchema;
@@ -1,5 +1,5 @@
1
1
  import { ReactElement, ReactNode } from 'react';
2
- import { ExpressionContext, LinkageEvaluators, RuntimeSchema } from '../types';
2
+ import { EvaluationContext, LinkageEvaluators, RuntimeSchema } from '../types';
3
3
  import { EffectSinks } from './effects';
4
4
  import { RuntimeForm } from './types';
5
5
  /**
@@ -7,10 +7,10 @@ import { RuntimeForm } from './types';
7
7
  * form-values object. `form.store.state.values` is one shared reference per
8
8
  * write, so the default `Object.is` compare on the selector is correct here.
9
9
  */
10
- export declare function RuntimeStateController({ children, evaluators, expressionContext, form, schema, sinks }: {
10
+ export declare function RuntimeStateController({ children, evaluators, evaluationContext, form, schema, sinks }: {
11
11
  children: ReactNode;
12
12
  evaluators: LinkageEvaluators | undefined;
13
- expressionContext: ExpressionContext | undefined;
13
+ evaluationContext: EvaluationContext | undefined;
14
14
  form: RuntimeForm;
15
15
  schema: RuntimeSchema;
16
16
  sinks: EffectSinks;
@@ -22,10 +22,10 @@ export declare function RuntimeStateController({ children, evaluators, expressio
22
22
  * elsewhere. Installs a NESTED selector-context Provider so the template field
23
23
  * ids (which repeat across rows) resolve to this row's own state map.
24
24
  */
25
- export declare function SubformRowController({ children, evaluators, expressionContext, form, prefix, sinks, templateSchema }: {
25
+ export declare function SubformRowController({ children, evaluators, evaluationContext, form, prefix, sinks, templateSchema }: {
26
26
  children: ReactNode;
27
27
  evaluators: LinkageEvaluators | undefined;
28
- expressionContext: ExpressionContext | undefined;
28
+ evaluationContext: EvaluationContext | undefined;
29
29
  form: RuntimeForm;
30
30
  prefix: string;
31
31
  sinks: EffectSinks;
@@ -85,6 +85,13 @@ export interface FormEditorStoreState {
85
85
  */
86
86
  future: HistoryEntry[];
87
87
  setSchema: (schema: FormSchema) => void;
88
+ /**
89
+ * Reset the document to an empty schema as an ordinary checkpointed edit —
90
+ * unlike {@link setSchema}, the undo timeline survives, so a clear is one
91
+ * undo away from recovery (the toolbar's confirm dialog promises exactly
92
+ * that).
93
+ */
94
+ clearSchema: () => void;
88
95
  patchSchema: (patch: FormSchemaPatch) => void;
89
96
  selectNode: (id: string | null) => void;
90
97
  /**