@vef-framework-react/form-editor 2.9.0 → 2.10.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 (217) hide show
  1. package/dist/cjs/editor/canvas/canvas-field.cjs +1 -1
  2. package/dist/cjs/editor/canvas/canvas.cjs +1 -1
  3. package/dist/cjs/editor/canvas/container-drag-chip.cjs +1 -0
  4. package/dist/cjs/editor/canvas/use-scroll-selection-into-view.cjs +1 -0
  5. package/dist/cjs/editor/dnd.cjs +1 -1
  6. package/dist/cjs/editor/form-editor.cjs +1 -1
  7. package/dist/cjs/editor/properties/block-layout-section.cjs +1 -1
  8. package/dist/cjs/editor/properties/option-editors.cjs +1 -1
  9. package/dist/cjs/editor/properties/properties-panel.cjs +1 -1
  10. package/dist/cjs/engine/linkage/evaluator.cjs +1 -1
  11. package/dist/cjs/engine/linkage/index.cjs +1 -1
  12. package/dist/cjs/engine/linkage/operators.cjs +1 -1
  13. package/dist/cjs/engine/schema/edit-ops.cjs +1 -1
  14. package/dist/cjs/engine/schema/validate.cjs +1 -1
  15. package/dist/cjs/engine/validation.cjs +1 -1
  16. package/dist/cjs/index.cjs +1 -1
  17. package/dist/cjs/render/form-renderer.cjs +1 -1
  18. package/dist/cjs/render/stack-style.cjs +1 -1
  19. package/dist/cjs/render/submit.cjs +1 -1
  20. package/dist/cjs/runtime/effects.cjs +1 -1
  21. package/dist/cjs/runtime/field-write.cjs +1 -0
  22. package/dist/cjs/runtime/runtime-state-controller.cjs +1 -1
  23. package/dist/cjs/store/form-store.cjs +1 -1
  24. package/dist/es/components/button/index.js +1 -1
  25. package/dist/es/components/checkbox-group-field/index.js +1 -1
  26. package/dist/es/components/code-editor/code-editor-input.js +1 -1
  27. package/dist/es/components/code-editor/index.js +1 -1
  28. package/dist/es/components/containers/index.js +1 -1
  29. package/dist/es/components/date-field/index.js +1 -1
  30. package/dist/es/components/display/index.js +1 -1
  31. package/dist/es/components/field-entries.js +1 -1
  32. package/dist/es/components/mobile/alert-block.js +1 -1
  33. package/dist/es/components/mobile/button.js +1 -1
  34. package/dist/es/components/mobile/checkbox-group.js +1 -1
  35. package/dist/es/components/mobile/date-adapters.js +1 -1
  36. package/dist/es/components/mobile/date.js +1 -1
  37. package/dist/es/components/mobile/daterange.js +1 -1
  38. package/dist/es/components/mobile/datetime.js +1 -1
  39. package/dist/es/components/mobile/definitions.js +1 -1
  40. package/dist/es/components/mobile/divider.js +1 -1
  41. package/dist/es/components/mobile/input-cell.js +1 -1
  42. package/dist/es/components/mobile/number.js +1 -1
  43. package/dist/es/components/mobile/option-group.js +1 -1
  44. package/dist/es/components/mobile/paragraph.js +1 -1
  45. package/dist/es/components/mobile/picker-trigger.js +1 -1
  46. package/dist/es/components/mobile/radio.js +1 -1
  47. package/dist/es/components/mobile/scope.js +1 -1
  48. package/dist/es/components/mobile/select.js +1 -1
  49. package/dist/es/components/mobile/switch.js +1 -1
  50. package/dist/es/components/mobile/textarea.js +1 -1
  51. package/dist/es/components/mobile/textfield.js +1 -1
  52. package/dist/es/components/mobile/theme.js +1 -1
  53. package/dist/es/components/number-field/index.js +1 -1
  54. package/dist/es/components/radio-field/index.js +1 -1
  55. package/dist/es/components/select-field/index.js +1 -1
  56. package/dist/es/components/switch-field/index.js +1 -1
  57. package/dist/es/components/textarea-field/index.js +1 -1
  58. package/dist/es/components/textfield/index.js +1 -1
  59. package/dist/es/editor/canvas/canvas-field.js +95 -93
  60. package/dist/es/editor/canvas/canvas.js +242 -235
  61. package/dist/es/editor/canvas/container-drag-chip.js +91 -0
  62. package/dist/es/editor/canvas/drop-indicator.js +1 -1
  63. package/dist/es/editor/canvas/drop-zones.js +1 -1
  64. package/dist/es/editor/canvas/json-split-view.js +1 -1
  65. package/dist/es/editor/canvas/mobile-seed-state.js +1 -1
  66. package/dist/es/editor/canvas/phone-frame.js +1 -1
  67. package/dist/es/editor/canvas/subform-column-eligibility.js +1 -1
  68. package/dist/es/editor/canvas/subform-table-cell.js +1 -1
  69. package/dist/es/editor/canvas/use-scroll-selection-into-view.js +15 -0
  70. package/dist/es/editor/context-sources.js +1 -1
  71. package/dist/es/editor/dnd.js +7 -4
  72. package/dist/es/editor/editor-layout-context.js +1 -1
  73. package/dist/es/editor/footer/footer.js +1 -1
  74. package/dist/es/editor/form-config/form-basics-tab.js +1 -1
  75. package/dist/es/editor/form-config/form-config-drawer.js +1 -1
  76. package/dist/es/editor/form-config/linkage-overview.js +1 -1
  77. package/dist/es/editor/form-config/outline-tab.js +1 -1
  78. package/dist/es/editor/form-editor.js +104 -93
  79. package/dist/es/editor/palette/field-groups.js +1 -1
  80. package/dist/es/editor/palette/palette-group.js +1 -1
  81. package/dist/es/editor/palette/palette-item.js +1 -1
  82. package/dist/es/editor/palette/palette-panel.js +1 -1
  83. package/dist/es/editor/preview-effects.js +1 -1
  84. package/dist/es/editor/preview-runtime-context.js +1 -1
  85. package/dist/es/editor/properties/block-layout-section.js +156 -49
  86. package/dist/es/editor/properties/container-properties.js +1 -1
  87. package/dist/es/editor/properties/entries/built-ins.js +1 -1
  88. package/dist/es/editor/properties/entries/checkbox-entry.js +1 -1
  89. package/dist/es/editor/properties/entries/coerce.js +1 -1
  90. package/dist/es/editor/properties/entries/entry-field.js +1 -1
  91. package/dist/es/editor/properties/entries/icon-entry.js +1 -1
  92. package/dist/es/editor/properties/entries/index.js +1 -1
  93. package/dist/es/editor/properties/entries/key-entry.js +1 -1
  94. package/dist/es/editor/properties/entries/linkage/action-editor.js +1 -1
  95. package/dist/es/editor/properties/entries/linkage/actions-editor.js +1 -1
  96. package/dist/es/editor/properties/entries/linkage/condition-editor.js +1 -1
  97. package/dist/es/editor/properties/entries/linkage/container-linkage-section.js +1 -1
  98. package/dist/es/editor/properties/entries/linkage/expression-input.js +1 -1
  99. package/dist/es/editor/properties/entries/linkage/index.js +1 -1
  100. package/dist/es/editor/properties/entries/linkage/linkage-rules-entry.js +1 -1
  101. package/dist/es/editor/properties/entries/linkage/mutators.js +1 -1
  102. package/dist/es/editor/properties/entries/linkage/options.js +1 -1
  103. package/dist/es/editor/properties/entries/linkage/rule-diagnostics.js +1 -1
  104. package/dist/es/editor/properties/entries/linkage/rule-list-editor.js +1 -1
  105. package/dist/es/editor/properties/entries/linkage/styles.js +1 -1
  106. package/dist/es/editor/properties/entries/linkage/trigger-editor.js +1 -1
  107. package/dist/es/editor/properties/entries/linkage/use-linkage-editor-model.js +1 -1
  108. package/dist/es/editor/properties/entries/linkage/use-stable-options.js +1 -1
  109. package/dist/es/editor/properties/entries/number-entry.js +1 -1
  110. package/dist/es/editor/properties/entries/options-source/index.js +1 -1
  111. package/dist/es/editor/properties/entries/options-source/source-mutators.js +1 -1
  112. package/dist/es/editor/properties/entries/select-entry.js +1 -1
  113. package/dist/es/editor/properties/entries/text-entry.js +1 -1
  114. package/dist/es/editor/properties/form-data-sources-panel.js +1 -1
  115. package/dist/es/editor/properties/form-linkage-panel.js +1 -1
  116. package/dist/es/editor/properties/form-variables-panel.js +1 -1
  117. package/dist/es/editor/properties/option-editors.js +142 -86
  118. package/dist/es/editor/properties/panel-header.js +1 -1
  119. package/dist/es/editor/properties/properties-empty.js +1 -1
  120. package/dist/es/editor/properties/properties-header.js +1 -1
  121. package/dist/es/editor/properties/properties-panel.js +18 -18
  122. package/dist/es/editor/properties/properties-provider.js +1 -1
  123. package/dist/es/editor/properties/properties-tabs.js +1 -1
  124. package/dist/es/editor/properties/use-confirmable-kind-switch.js +1 -1
  125. package/dist/es/editor/remove-node-confirm.js +1 -1
  126. package/dist/es/editor/schema-apply.js +1 -1
  127. package/dist/es/editor/styles.js +1 -1
  128. package/dist/es/editor/toolbar/notify.js +1 -1
  129. package/dist/es/editor/toolbar/schema-io.js +1 -1
  130. package/dist/es/editor/toolbar/toolbar.js +1 -1
  131. package/dist/es/editor/use-editor-shortcuts.js +1 -1
  132. package/dist/es/editor/validation-summary.js +1 -1
  133. package/dist/es/engine/assert-never.js +1 -1
  134. package/dist/es/engine/conversion/index.js +1 -1
  135. package/dist/es/engine/ids.js +1 -1
  136. package/dist/es/engine/keys.js +1 -1
  137. package/dist/es/engine/linkage/cycle.js +1 -1
  138. package/dist/es/engine/linkage/default-evaluator.js +1 -1
  139. package/dist/es/engine/linkage/effects.js +1 -1
  140. package/dist/es/engine/linkage/evaluator.js +58 -40
  141. package/dist/es/engine/linkage/index.js +6 -6
  142. package/dist/es/engine/linkage/operators.js +2 -2
  143. package/dist/es/engine/linkage/source-tracking.js +1 -1
  144. package/dist/es/engine/linkage/taxonomy.js +1 -1
  145. package/dist/es/engine/linkage/validator.js +1 -1
  146. package/dist/es/engine/registry/defaults-mobile.js +1 -1
  147. package/dist/es/engine/registry/defaults.js +1 -1
  148. package/dist/es/engine/registry/form-field-registry.js +1 -1
  149. package/dist/es/engine/schema/column-type.js +1 -1
  150. package/dist/es/engine/schema/edit-ops.js +79 -58
  151. package/dist/es/engine/schema/mutate.js +1 -1
  152. package/dist/es/engine/schema/nodes.js +1 -1
  153. package/dist/es/engine/schema/permission-bridge.js +1 -1
  154. package/dist/es/engine/schema/presentation.js +1 -1
  155. package/dist/es/engine/schema/reconcile.js +1 -1
  156. package/dist/es/engine/schema/removal-impact.js +1 -1
  157. package/dist/es/engine/schema/rewrite.js +1 -1
  158. package/dist/es/engine/schema/validate.js +25 -3
  159. package/dist/es/engine/schema/walk.js +1 -1
  160. package/dist/es/engine/validation.js +2 -1
  161. package/dist/es/icons.js +1 -1
  162. package/dist/es/index.js +20 -19
  163. package/dist/es/render/chrome/mobile-chrome.js +1 -1
  164. package/dist/es/render/chrome/pc-chrome.js +1 -1
  165. package/dist/es/render/chrome/subform-shell.js +1 -1
  166. package/dist/es/render/data-source-context.js +0 -0
  167. package/dist/es/render/flex-style.js +1 -1
  168. package/dist/es/render/form-field.js +1 -1
  169. package/dist/es/render/form-renderer.js +269 -236
  170. package/dist/es/render/grid-style.js +1 -1
  171. package/dist/es/render/parts/field-shell.js +1 -1
  172. package/dist/es/render/parts/label.js +1 -1
  173. package/dist/es/render/parts/options-status.js +1 -1
  174. package/dist/es/render/stack-style.js +18 -2
  175. package/dist/es/render/subform-columns.js +1 -1
  176. package/dist/es/render/submit.js +44 -32
  177. package/dist/es/runtime/effects.js +56 -50
  178. package/dist/es/runtime/field-write.js +17 -0
  179. package/dist/es/runtime/resolve-scope-values.js +1 -1
  180. package/dist/es/runtime/runtime-context.js +1 -1
  181. package/dist/es/runtime/runtime-state-controller.js +70 -63
  182. package/dist/es/runtime/stabilize-state-map.js +1 -1
  183. package/dist/es/store/engine-provider.js +1 -1
  184. package/dist/es/store/form-store.js +68 -61
  185. package/dist/es/types/chrome.js +1 -1
  186. package/dist/es/types/component.js +1 -1
  187. package/dist/es/types/data-source.js +1 -1
  188. package/dist/es/types/index.js +1 -1
  189. package/dist/es/types/linkage.js +1 -1
  190. package/dist/es/types/properties.js +1 -1
  191. package/dist/es/types/schema.js +1 -1
  192. package/dist/types/editor/canvas/container-drag-chip.d.ts +12 -0
  193. package/dist/types/editor/canvas/container-drag-chip.test.d.ts +1 -0
  194. package/dist/types/editor/canvas/use-scroll-selection-into-view.d.ts +21 -0
  195. package/dist/types/editor/canvas/use-scroll-selection-into-view.test.d.ts +1 -0
  196. package/dist/types/editor/dnd.d.ts +21 -1
  197. package/dist/types/editor/properties/block-layout-section.d.ts +6 -5
  198. package/dist/types/editor/properties/block-layout-section.test.d.ts +1 -0
  199. package/dist/types/editor/properties/option-editors.d.ts +13 -0
  200. package/dist/types/editor/properties/properties-panel.d.ts +2 -2
  201. package/dist/types/engine/linkage/evaluator.d.ts +25 -1
  202. package/dist/types/engine/linkage/index.d.ts +1 -1
  203. package/dist/types/engine/linkage/operators.d.ts +13 -5
  204. package/dist/types/engine/schema/edit-ops.d.ts +12 -1
  205. package/dist/types/engine/validation.d.ts +1 -1
  206. package/dist/types/index.d.ts +1 -1
  207. package/dist/types/render/form-renderer.d.ts +27 -1
  208. package/dist/types/render/form-renderer.field-permissions.test.d.ts +1 -0
  209. package/dist/types/render/stack-style.d.ts +14 -1
  210. package/dist/types/render/submit.d.ts +26 -4
  211. package/dist/types/runtime/effects.d.ts +11 -1
  212. package/dist/types/runtime/field-write.d.ts +37 -0
  213. package/dist/types/runtime/runtime-state-controller.d.ts +3 -2
  214. package/dist/types/store/form-store.d.ts +9 -1
  215. package/dist/types/types/linkage.d.ts +16 -0
  216. package/dist/types/types/schema.d.ts +33 -0
  217. package/package.json +5 -5
@@ -1,27 +1,27 @@
1
- /*! @vef-framework-react/form-editor v2.9.0 made by Venus | 2026-07-07T06:22:20.341Z */
1
+ /*! @vef-framework-react/form-editor v2.10.0 made by Venus | 2026-07-13T07:28:24.093Z */
2
2
  import { createId as e, idPrefixForType as t } from "../engine/ids.js";
3
3
  import { createEmptySchema as n } from "../engine/schema/nodes.js";
4
4
  import { countFields as r, findField as i, findNode as a, findScope as o, scopeEquals as s, walkNodes as c } from "../engine/schema/walk.js";
5
5
  import { collectScopeKeys as l, collectSubtreeKeysByScope as u, generateUniqueKey as d, isKeyedField as f, nextUniqueKey as p, sanitizeKey as m } from "../engine/keys.js";
6
6
  import { editField as h, removeBlock as g, updateNode as _ } from "../engine/schema/mutate.js";
7
- import { cloneBlock as v, insertBlock as y, moveBlock as b, setColumnWidth as x, setFlex as S, setSpan as C, targetScope as w } from "../engine/schema/edit-ops.js";
8
- import { currentLayer as T, withPresentation as E } from "../engine/schema/presentation.js";
9
- import { pruneDataSourceReferences as D, pruneFormLinkageForRootBucket as O, pruneScopedReferences as k, renameKeyReferences as A, renameLinkageKeyReferences as j, renameVariableReferences as M } from "../engine/schema/reconcile.js";
10
- import { isValidVariableName as N } from "../engine/schema/validate.js";
11
- import { createComponentStore as P } from "@vef-framework-react/core";
7
+ import { cloneBlock as v, insertBlock as y, moveBlock as b, setColumnWidth as x, setFlex as S, setSpan as C, setStackSlot as w, targetScope as T } from "../engine/schema/edit-ops.js";
8
+ import { currentLayer as E, withPresentation as D } from "../engine/schema/presentation.js";
9
+ import { pruneDataSourceReferences as O, pruneFormLinkageForRootBucket as k, pruneScopedReferences as A, renameKeyReferences as j, renameLinkageKeyReferences as M, renameVariableReferences as N } from "../engine/schema/reconcile.js";
10
+ import { isValidVariableName as P } from "../engine/schema/validate.js";
11
+ import { createComponentStore as F } from "@vef-framework-react/core";
12
12
  //#region src/store/form-store.ts
13
- var F = 100;
14
- function I(e) {
13
+ var I = 100;
14
+ function L(e) {
15
15
  return e.viewMode === "edit";
16
16
  }
17
- function L(n, r, i) {
17
+ function R(n, r, i) {
18
18
  let a = {
19
19
  ...n.config.create(),
20
20
  id: e(t(n.config.type))
21
21
  };
22
22
  return n.config.keyed && (a.key = d(r, m(n.config.type) || "field", i)), a;
23
23
  }
24
- var R = P("FormEditor", (e, t) => {
24
+ var z = F("FormEditor", (e, t) => {
25
25
  let r = null;
26
26
  function c() {
27
27
  let { device: n, past: r, schema: i } = t(), a = {
@@ -29,14 +29,14 @@ var R = P("FormEditor", (e, t) => {
29
29
  device: n
30
30
  };
31
31
  e({
32
- past: r.length >= F ? [...r.slice(r.length - F + 1), a] : [...r, a],
32
+ past: r.length >= I ? [...r.slice(r.length - I + 1), a] : [...r, a],
33
33
  future: []
34
34
  });
35
35
  }
36
36
  function d() {
37
37
  r = null, c();
38
38
  }
39
- function P(e) {
39
+ function F(e) {
40
40
  r !== e && (c(), r = e);
41
41
  }
42
42
  return {
@@ -63,9 +63,9 @@ var R = P("FormEditor", (e, t) => {
63
63
  });
64
64
  },
65
65
  patchSchema: (n) => {
66
- let { device: r, schema: i } = t(), { gap: a, ...o } = n, s = Object.keys(o).some((e) => i[e] !== o[e]), c = "gap" in n && T(i, r).gap !== a;
66
+ let { device: r, schema: i } = t(), { gap: a, ...o } = n, s = Object.keys(o).some((e) => i[e] !== o[e]), c = "gap" in n && E(i, r).gap !== a;
67
67
  if (!s && !c) return;
68
- P(`form:${Object.keys(n).toSorted().join(",")}`);
68
+ F(`form:${Object.keys(n).toSorted().join(",")}`);
69
69
  let l = {
70
70
  ...i,
71
71
  ...o
@@ -76,8 +76,8 @@ var R = P("FormEditor", (e, t) => {
76
76
  "dataSources"
77
77
  ]) Object.hasOwn(o, e) && o[e] === void 0 && delete l[e];
78
78
  if (c) {
79
- let t = { ...T(l, r) };
80
- a === void 0 ? delete t.gap : t.gap = a, e({ schema: E(l, r, t) });
79
+ let t = { ...E(l, r) };
80
+ a === void 0 ? delete t.gap : t.gap = a, e({ schema: D(l, r, t) });
81
81
  return;
82
82
  }
83
83
  e({ schema: l });
@@ -89,7 +89,7 @@ var R = P("FormEditor", (e, t) => {
89
89
  }
90
90
  if (n !== null) {
91
91
  let { device: r, schema: i } = t();
92
- if (!a(T(i, r), n)) {
92
+ if (!a(E(i, r), n)) {
93
93
  e({ selectedId: null });
94
94
  return;
95
95
  }
@@ -114,7 +114,7 @@ var R = P("FormEditor", (e, t) => {
114
114
  e({ viewMode: t });
115
115
  },
116
116
  setDevice: (n) => {
117
- let { schema: i, selectedId: o } = t(), s = T(i, n), c = o !== null && a(s, o) ? o : null;
117
+ let { schema: i, selectedId: o } = t(), s = E(i, n), c = o !== null && a(s, o) ? o : null;
118
118
  r = null, e({
119
119
  device: n,
120
120
  selectedId: c
@@ -123,42 +123,45 @@ var R = P("FormEditor", (e, t) => {
123
123
  initMobile: (n) => {
124
124
  let { schema: r } = t();
125
125
  d(), e({
126
- schema: E(r, "mobile", n),
126
+ schema: D(r, "mobile", n),
127
127
  device: "mobile",
128
128
  selectedId: null
129
129
  });
130
130
  },
131
131
  insertField: ({ definition: n, target: r }) => {
132
- let { device: i, schema: a } = t(), o = T(a, i), s = r ?? { kind: "append" }, c = L(n, o, w(o, s)), l = y(o, c, s);
132
+ let { device: i, schema: a } = t(), o = E(a, i), s = r ?? { kind: "append" }, c = R(n, o, T(o, s)), l = y(o, c, s);
133
133
  l !== o && (d(), e({
134
- schema: E(a, i, l),
134
+ schema: D(a, i, l),
135
135
  selectedId: c.id
136
136
  }));
137
137
  },
138
138
  moveNode: ({ nodeId: n, target: r }) => {
139
- let { device: i, schema: c } = t(), l = T(c, i), f = a(l, n);
139
+ let { device: i, schema: c } = t(), l = E(c, i), f = a(l, n);
140
140
  if (!f) return;
141
141
  let p = o(l, n) ?? [], m = b(l, n, r);
142
142
  if (m === l) return;
143
- let h = m, g = E(c, i, h);
143
+ let h = m, g = D(c, i, h);
144
144
  if (!s(p, o(h, n) ?? [])) {
145
145
  let e = u(f, p);
146
- if (h = k(h, e), g = E(c, i, h), i === "pc" && g.linkage !== void 0) {
147
- let t = O(g.linkage, e);
146
+ if (h = A(h, e), g = D(c, i, h), i === "pc" && g.linkage !== void 0) {
147
+ let t = k(g.linkage, e);
148
148
  t !== g.linkage && (g = {
149
149
  ...g,
150
150
  linkage: t
151
151
  });
152
152
  }
153
153
  }
154
- d(), e({ schema: g });
154
+ d(), e({
155
+ schema: g,
156
+ selectedId: n
157
+ });
155
158
  },
156
159
  removeNode: (n) => {
157
- let { device: r, schema: i, selectedId: s } = t(), c = T(i, r), l = a(c, n);
160
+ let { device: r, schema: i, selectedId: s } = t(), c = E(i, r), l = a(c, n);
158
161
  if (!l) return;
159
- let f = u(l, o(c, n) ?? []), p = k(g(c, n), f), m = E(i, r, p);
162
+ let f = u(l, o(c, n) ?? []), p = A(g(c, n), f), m = D(i, r, p);
160
163
  if (r === "pc" && m.linkage !== void 0) {
161
- let e = O(m.linkage, f);
164
+ let e = k(m.linkage, f);
162
165
  e !== m.linkage && (m = {
163
166
  ...m,
164
167
  linkage: e
@@ -171,7 +174,7 @@ var R = P("FormEditor", (e, t) => {
171
174
  });
172
175
  },
173
176
  duplicateNode: (n) => {
174
- let { device: r, schema: i } = t(), s = T(i, r), c = a(s, n);
177
+ let { device: r, schema: i } = t(), s = E(i, r), c = a(s, n);
175
178
  if (!c) return;
176
179
  let u = l(s, o(s, n) ?? []), f = v(c, (e) => p(u, e)), m = y(s, f, {
177
180
  kind: "beside",
@@ -179,54 +182,58 @@ var R = P("FormEditor", (e, t) => {
179
182
  side: "after"
180
183
  });
181
184
  d(), e({
182
- schema: E(i, r, m),
185
+ schema: D(i, r, m),
183
186
  selectedId: f.id
184
187
  });
185
188
  },
186
189
  setSpan: ({ nodeId: n, span: r }) => {
187
- let { device: i, schema: a } = t(), o = T(a, i), s = C(o, n, r);
188
- s !== o && (P(`span:${n}`), e({ schema: E(a, i, s) }));
190
+ let { device: i, schema: a } = t(), o = E(a, i), s = C(o, n, r);
191
+ s !== o && (F(`span:${n}`), e({ schema: D(a, i, s) }));
189
192
  },
190
193
  setFlex: ({ nodeId: n, flex: r }) => {
191
- let { device: i, schema: a } = t(), o = T(a, i), s = S(o, n, r);
192
- s !== o && (P(`flex:${n}`), e({ schema: E(a, i, s) }));
194
+ let { device: i, schema: a } = t(), o = E(a, i), s = S(o, n, r);
195
+ s !== o && (F(`flex:${n}`), e({ schema: D(a, i, s) }));
193
196
  },
194
197
  setColumnWidth: ({ nodeId: n, width: r }) => {
195
- let { device: i, schema: a } = t(), o = T(a, i), s = x(o, n, r);
196
- s !== o && (P(`column-width:${n}`), e({ schema: E(a, i, s) }));
198
+ let { device: i, schema: a } = t(), o = E(a, i), s = x(o, n, r);
199
+ s !== o && (F(`column-width:${n}`), e({ schema: D(a, i, s) }));
200
+ },
201
+ setStackSlot: ({ nodeId: n, slot: r }) => {
202
+ let { device: i, schema: a } = t(), o = E(a, i), s = w(o, n, r);
203
+ s !== o && (F(`stack:${n}`), e({ schema: D(a, i, s) }));
197
204
  },
198
205
  editField: ({ fieldId: n, updater: r }, i) => {
199
- let { device: a, schema: o } = t(), s = T(o, a), c = h(s, n, r);
200
- c !== s && (P(i?.coalesceKey ?? `field:${n}`), e({ schema: E(o, a, c) }));
206
+ let { device: a, schema: o } = t(), s = E(o, a), c = h(s, n, r);
207
+ c !== s && (F(i?.coalesceKey ?? `field:${n}`), e({ schema: D(o, a, c) }));
201
208
  },
202
209
  setFieldKey: ({ fieldId: n, key: r }) => {
203
- let { device: a, schema: s } = t(), c = T(s, a), u = i(c, n);
210
+ let { device: a, schema: s } = t(), c = E(s, a), u = i(c, n);
204
211
  if (!u || !f(u)) return;
205
212
  let d = o(c, n) ?? [], g = m(r), _ = g.length > 0 ? g : u.key, v = l(c, d);
206
213
  v.delete(u.key);
207
214
  let y = p(v, _);
208
215
  if (y === u.key) return;
209
- let b = u.key, x = E(s, a, A(h(c, n, (e) => ({
216
+ let b = u.key, x = D(s, a, j(h(c, n, (e) => ({
210
217
  ...e,
211
218
  key: y
212
219
  })), d, b, y));
213
220
  if (a === "pc" && d.length === 0 && x.linkage !== void 0) {
214
- let e = j(x.linkage, b, y);
221
+ let e = M(x.linkage, b, y);
215
222
  e !== x.linkage && (x = {
216
223
  ...x,
217
224
  linkage: e
218
225
  });
219
226
  }
220
- P(`field-key:${n}`), e({ schema: x });
227
+ F(`field-key:${n}`), e({ schema: x });
221
228
  },
222
229
  updateBlock: ({ nodeId: n, updater: r }, i) => {
223
- let { device: a, schema: o } = t(), s = T(o, a), c = _(s, n, r);
224
- c !== s && (P(i?.coalesceKey ?? `block:${n}`), e({ schema: E(o, a, c) }));
230
+ let { device: a, schema: o } = t(), s = E(o, a), c = _(s, n, r);
231
+ c !== s && (F(i?.coalesceKey ?? `block:${n}`), e({ schema: D(o, a, c) }));
225
232
  },
226
233
  renameVariable: (n, r) => {
227
234
  let { schema: i } = t(), a = i.variables ?? [];
228
- r === n || !N(r) || a.every((e) => e.name !== n) || a.some((e) => e.name === r) || (d(), e({ schema: {
229
- ...M(i, n, r),
235
+ r === n || !P(r) || a.every((e) => e.name !== n) || a.some((e) => e.name === r) || (d(), e({ schema: {
236
+ ...N(i, n, r),
230
237
  variables: a.map((e) => e.name === n ? {
231
238
  ...e,
232
239
  name: r
@@ -246,7 +253,7 @@ var R = P("FormEditor", (e, t) => {
246
253
  let { schema: r } = t(), i = r.dataSources ?? [];
247
254
  if (i.every((e) => e.id !== n)) return;
248
255
  let a = i.filter((e) => e.id !== n), o = {
249
- ...D(r, n),
256
+ ...O(r, n),
250
257
  dataSources: a
251
258
  };
252
259
  a.length === 0 && delete o.dataSources, d(), e({ schema: o });
@@ -255,7 +262,7 @@ var R = P("FormEditor", (e, t) => {
255
262
  let { device: n, future: i, past: o, schema: s, selectedId: c } = t(), l = o.at(-1);
256
263
  if (l === void 0) return;
257
264
  r = null;
258
- let u = T(l.schema, l.device), d = c !== null && a(u, c) !== void 0;
265
+ let u = E(l.schema, l.device), d = c !== null && a(u, c) !== void 0;
259
266
  e({
260
267
  schema: l.schema,
261
268
  device: l.device,
@@ -271,7 +278,7 @@ var R = P("FormEditor", (e, t) => {
271
278
  let { device: n, future: i, past: o, schema: s, selectedId: c } = t(), l = i.at(-1);
272
279
  if (l === void 0) return;
273
280
  r = null;
274
- let u = T(l.schema, l.device), d = c !== null && a(u, c) !== void 0;
281
+ let u = E(l.schema, l.device), d = c !== null && a(u, c) !== void 0;
275
282
  e({
276
283
  schema: l.schema,
277
284
  device: l.device,
@@ -286,11 +293,11 @@ var R = P("FormEditor", (e, t) => {
286
293
  canUndo: () => t().past.length > 0,
287
294
  canRedo: () => t().future.length > 0
288
295
  };
289
- }), z = R.StoreProvider, B = R.useStoreApi, V = R.useStore;
290
- function H() {
291
- return V((e) => T(e.schema, e.device));
296
+ }), B = z.StoreProvider, V = z.useStoreApi, H = z.useStore;
297
+ function U() {
298
+ return H((e) => E(e.schema, e.device));
292
299
  }
293
- function U(e) {
300
+ function W(e) {
294
301
  let t = /* @__PURE__ */ new WeakMap();
295
302
  return (n) => {
296
303
  let r = t.get(n);
@@ -299,18 +306,18 @@ function U(e) {
299
306
  return t.set(n, i), i;
300
307
  };
301
308
  }
302
- var W = U(r);
303
- function G(e) {
304
- return W(T(e.schema, e.device));
309
+ var G = W(r);
310
+ function K(e) {
311
+ return G(E(e.schema, e.device));
305
312
  }
306
- var K = U((e) => {
313
+ var q = W((e) => {
307
314
  let t = 0;
308
315
  return c(e, (e) => {
309
316
  t += e.linkage?.rules?.length ?? 0;
310
317
  }), t;
311
318
  });
312
- function q(e) {
313
- return K(T(e.schema, e.device)) + (e.schema.linkage?.rules?.length ?? 0);
319
+ function J(e) {
320
+ return q(E(e.schema, e.device)) + (e.schema.linkage?.rules?.length ?? 0);
314
321
  }
315
322
  //#endregion
316
- export { z as FormEditorStoreProvider, I as isPaletteVisible, G as selectFieldCount, q as selectLinkageRuleCount, H as useCurrentLayer, V as useFormEditorStore, B as useFormEditorStoreApi };
323
+ export { B as FormEditorStoreProvider, L as isPaletteVisible, K as selectFieldCount, J as selectLinkageRuleCount, U as useCurrentLayer, H as useFormEditorStore, V as useFormEditorStoreApi };
@@ -1 +1 @@
1
- /*! @vef-framework-react/form-editor v2.9.0 made by Venus | 2026-07-07T06:22:20.341Z */
1
+ /*! @vef-framework-react/form-editor v2.10.0 made by Venus | 2026-07-13T07:28:24.093Z */
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/form-editor v2.9.0 made by Venus | 2026-07-07T06:22:20.341Z */
1
+ /*! @vef-framework-react/form-editor v2.10.0 made by Venus | 2026-07-13T07:28:24.093Z */
2
2
  //#region src/types/component.ts
3
3
  function e(e) {
4
4
  return e;
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/form-editor v2.9.0 made by Venus | 2026-07-07T06:22:20.341Z */
1
+ /*! @vef-framework-react/form-editor v2.10.0 made by Venus | 2026-07-13T07:28:24.093Z */
2
2
  //#region src/types/data-source.ts
3
3
  var e = { resolve: () => Promise.resolve([]) };
4
4
  //#endregion
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/form-editor v2.9.0 made by Venus | 2026-07-07T06:22:20.341Z */
1
+ /*! @vef-framework-react/form-editor v2.10.0 made by Venus | 2026-07-13T07:28:24.093Z */
2
2
  import { defineContainerDefinition as e, defineFieldDefinition as t } from "./component.js";
3
3
  import { noopDataSourceResolver as n } from "./data-source.js";
4
4
  import { definePropertyEntry as r } from "./properties.js";
@@ -1 +1 @@
1
- /*! @vef-framework-react/form-editor v2.9.0 made by Venus | 2026-07-07T06:22:20.341Z */
1
+ /*! @vef-framework-react/form-editor v2.10.0 made by Venus | 2026-07-13T07:28:24.093Z */
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/form-editor v2.9.0 made by Venus | 2026-07-07T06:22:20.341Z */
1
+ /*! @vef-framework-react/form-editor v2.10.0 made by Venus | 2026-07-13T07:28:24.093Z */
2
2
  //#region src/types/properties.ts
3
3
  function e(e) {
4
4
  return e;
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/form-editor v2.9.0 made by Venus | 2026-07-07T06:22:20.341Z */
1
+ /*! @vef-framework-react/form-editor v2.10.0 made by Venus | 2026-07-13T07:28:24.093Z */
2
2
  //#region src/types/schema.ts
3
3
  var e = 24, t = [
4
4
  "small",
@@ -0,0 +1,12 @@
1
+ import { ReactElement } from 'react';
2
+ /**
3
+ * The drag ghost for a container move: a compact icon + label chip. Resolves the
4
+ * container by id from the active device's layer, drawing its icon and type name
5
+ * from the field registry (exactly as the palette does), and prefers the
6
+ * container's own title/label when set. Renders nothing if the id no longer
7
+ * resolves to a container (a torn-down drag), so the overlay stays empty rather
8
+ * than throwing.
9
+ */
10
+ export declare function ContainerDragChip({ nodeId }: {
11
+ nodeId: string;
12
+ }): ReactElement | null;
@@ -0,0 +1,21 @@
1
+ import { RefObject } from 'react';
2
+ /**
3
+ * Scrolls the selected block into view whenever the selection changes — after a
4
+ * drop (insert / move / duplicate) or a programmatic select (outline click,
5
+ * keyboard shortcut, undo/redo), the block the designer just acted on is
6
+ * brought into the viewport. This pays off most on the 100s-of-fields forms the
7
+ * editor targets, where a drop near the bottom of a tall form would otherwise
8
+ * give no viewport feedback.
9
+ *
10
+ * `block: "nearest"` makes selecting an already-visible block a no-op, so a
11
+ * plain click on the canvas never yanks the viewport — only off-screen
12
+ * selections scroll. The effect fires once per selection change (keyed on
13
+ * `selectedId`), so it adds no per-keystroke or per-frame-drag work.
14
+ *
15
+ * Scoped to `containerRef` so the lookup only sees this editor instance's
16
+ * canvas, and `scrollIntoView` resolves against the nearest scroll ancestor —
17
+ * the desktop canvas scroller or the mobile phone viewport — without branching
18
+ * on device. In preview / JSON mode the store holds no selection to react to,
19
+ * and the kept-alive edit tree is hidden, so nothing scrolls there.
20
+ */
21
+ export declare function useScrollSelectionIntoView(containerRef: RefObject<HTMLElement | null>): void;
@@ -2,7 +2,7 @@ import { DragEndEvent, KeyboardSensor, PointerSensor } from '@vef-framework-reac
2
2
  import { PluginDescriptor, Plugin } from '@dnd-kit/abstract';
3
3
  import { PointerSensorOptions } from '@dnd-kit/dom';
4
4
  /**
5
- * Shared drag-and-drop contract for the editor canvas, built on dnd-kit v0.4.
5
+ * Shared drag-and-drop contract for the editor canvas, built on dnd-kit v0.5.
6
6
  *
7
7
  * A drag originates from either a palette item (creates a new field) or an
8
8
  * existing canvas block (moves it). It lands on one of three drop-zone kinds.
@@ -39,6 +39,11 @@ export declare const editorSensors: ( PluginDescriptor<any, Plugin<any, PointerS
39
39
  export declare const palettePointerSensors: PluginDescriptor<any, Plugin<any, PointerSensorOptions>, typeof PointerSensor>[];
40
40
  /**
41
41
  * Data attached to a draggable.
42
+ *
43
+ * A `block` drag carries `isContainer` so the drag-overlay can decide — without
44
+ * a store lookup — whether to swap the default full-subtree lift for a compact
45
+ * container chip (see {@link isContainerDragData}); leaves keep the in-place
46
+ * lift.
42
47
  */
43
48
  export type EditorDragData = {
44
49
  kind: "palette";
@@ -46,7 +51,15 @@ export type EditorDragData = {
46
51
  } | {
47
52
  kind: "block";
48
53
  nodeId: string;
54
+ isContainer: boolean;
49
55
  };
56
+ /**
57
+ * The block variant of {@link EditorDragData} — a drag that moves an existing
58
+ * canvas block (as opposed to creating one from a palette item).
59
+ */
60
+ export type BlockDragData = Extract<EditorDragData, {
61
+ kind: "block";
62
+ }>;
50
63
  /**
51
64
  * Data attached to a drop zone.
52
65
  *
@@ -83,6 +96,13 @@ export declare function dropZoneId(data: DropZoneData): string;
83
96
  */
84
97
  export declare function fallbackDropZoneId(data: DropZoneData): string;
85
98
  export declare function isEditorDragData(value: unknown): value is EditorDragData;
99
+ /**
100
+ * True when the drag moves an existing CONTAINER block — the signal the
101
+ * drag-overlay uses to render a compact chip instead of lifting the whole
102
+ * nested subtree. Palette drags and leaf-block drags return false (they keep
103
+ * dnd-kit's default in-place lift).
104
+ */
105
+ export declare function isContainerDragData(value: unknown): value is BlockDragData;
86
106
  /**
87
107
  * Build the `onDragEnd` handler for the editor's `DragDropProvider`. Reads the
88
108
  * source (palette type or moved node) and the drop zone, then inserts or moves.
@@ -11,10 +11,11 @@ export interface BlockLayoutSectionProps {
11
11
  }
12
12
  /**
13
13
  * Layout sizing for the selected block, shown above its type-specific
14
- * properties. The control adapts to the block's parent container: under a flex
15
- * container it edits the per-slot `flex` (grow / basis); under a table subform it
16
- * edits the column's fixed pixel width; anywhere else (a grid row) it edits the
17
- * column `span` — an empty span means auto, sharing the row's leftover width with
18
- * the other auto blocks.
14
+ * properties. The control adapts to the block's parent context: under a flex
15
+ * container it edits the per-slot `flex` (grow / shrink / basis); under a grid it
16
+ * edits the column `span`; under a table subform it edits the column's fixed
17
+ * pixel width; otherwise (the document root or a section / tab / stack-subform
18
+ * body) it edits the block's stack sizing — width with optional min / max bounds
19
+ * and a horizontal alignment, full-width when left empty.
19
20
  */
20
21
  export declare function BlockLayoutSection({ node, parent }: BlockLayoutSectionProps): ReactElement | null;
@@ -1,9 +1,22 @@
1
+ import { DragEndEvent } from '@vef-framework-react/core';
1
2
  import { ReactElement } from 'react';
2
3
  import { FieldOption, RemoteDataSourceRequest, RemoteOptionMapping } from '../../types';
3
4
  export interface OptionListEditorProps {
4
5
  options: FieldOption[];
5
6
  onChange: (next: FieldOption[]) => void;
6
7
  }
8
+ /**
9
+ * Reorder an option list from a sortable drag. Drives off the UI-only row-id
10
+ * array (the sortable item ids) so `moveDragItem` stays type-safe, then permutes
11
+ * the options into the same order — the two lockstep arrays can never drift.
12
+ * Returns `null` for a no-op (cancel / dropped in place), which the caller uses
13
+ * to skip an empty commit. Exported so the reorder can be unit-tested with a
14
+ * fabricated drag event, the same way the canvas drag-end handler is.
15
+ */
16
+ export declare function reorderOptionRows(options: FieldOption[], rowIds: string[], event: DragEndEvent): {
17
+ options: FieldOption[];
18
+ rowIds: string[];
19
+ } | null;
7
20
  /**
8
21
  * Inline editor for a positional `{ label, value }` option list. Shared by the
9
22
  * field option-source entry and the form-global data-source panel so the row
@@ -7,8 +7,8 @@ import { ReactElement } from 'react';
7
7
  *
8
8
  * Layout when a field is selected:
9
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 or a table subform
10
+ * - tabs: 属性 / 校验 / 联动 with count badges, plus a 布局 tab shown for any
11
+ * selected field (its sizing control adapts to the field's parent context)
12
12
  * - body: scrollable, renders groups assigned to the active tab
13
13
  *
14
14
  * Empty / error states:
@@ -1,4 +1,4 @@
1
- import { Block, EvaluationContext, LinkageActionValue, LinkageCondition, LinkageEvaluators, RuntimeSchema } from '../../types';
1
+ import { Block, EvaluationContext, FieldPermission, 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
@@ -20,7 +20,28 @@ export interface EvaluateLinkageOptions {
20
20
  * variables and the host context.
21
21
  */
22
22
  evaluationContext?: EvaluationContext;
23
+ /**
24
+ * Server-resolved {@link FieldPermission} clamp, keyed by the field's
25
+ * data-binding `key`. Applied to keyed nodes after the linkage fold as the
26
+ * OUTER bound — linkage may narrow (hide / disable) but never widen past the
27
+ * permission. An absent map or absent key means no clamp. Callers evaluating
28
+ * a subform-template scope must NOT pass it: top-level permissions address
29
+ * root-scope keys only, never a template field.
30
+ */
31
+ fieldPermissions?: Record<string, FieldPermission>;
23
32
  }
33
+ /**
34
+ * Resolve one key's clamp from a permission map. Own-property guarded so a
35
+ * field keyed like an Object prototype member (e.g. `"constructor"`) never
36
+ * reads a prototype slot off a JSON-parsed map.
37
+ */
38
+ export declare function getFieldPermission(permissions: Record<string, FieldPermission> | undefined, key: string): FieldPermission | undefined;
39
+ /**
40
+ * Whether a permission grants write access. `undefined` (no clamp entry) is
41
+ * writable — the renderer stays fully permissive unless the server says
42
+ * otherwise; hosts wanting default-deny materialize the full map server-side.
43
+ */
44
+ export declare function isWritableFieldPermission(permission: FieldPermission | undefined): boolean;
24
45
  /**
25
46
  * Evaluates one field's linkage in two phases:
26
47
  *
@@ -31,6 +52,9 @@ export interface EvaluateLinkageOptions {
31
52
  * actions are applied (effect actions belong to the side-effect lane and are
32
53
  * skipped). Later rules overwrite earlier ones — order is the user's
33
54
  * tie-breaker.
55
+ *
56
+ * When `options.fieldPermissions` is supplied, the server clamp is composed
57
+ * onto the fold's outcome last (see {@link EvaluateLinkageOptions.fieldPermissions}).
34
58
  */
35
59
  export declare function evaluateLinkage(node: Block, values: Record<string, unknown>, options?: EvaluateLinkageOptions): RuntimeFieldState;
36
60
  /**
@@ -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, deriveEvaluationVariables, emptyRuntimeState, evaluateLinkage, evaluateRuntimeStates, resolveActionValue, type EvaluateLinkageOptions, type RuntimeFieldState } from './evaluator';
4
+ export { deriveDefaultValues, deriveEvaluationVariables, emptyRuntimeState, evaluateLinkage, evaluateRuntimeStates, getFieldPermission, isWritableFieldPermission, 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';
@@ -8,11 +8,19 @@ import { EvaluationContext, LinkageConditionLeaf, LinkageOperator } from '../../
8
8
  export declare const LINKAGE_OPERATORS: readonly LinkageOperator[];
9
9
  /**
10
10
  * True when a value is considered "empty" for linkage purposes — covers
11
- * the typical user-facing notion of empty (nullish / `""` / `[]`). Numbers
12
- * (including `0`), booleans, and non-empty objects are NOT empty. An array
13
- * counts as empty when it holds no meaningful entry, so a date range cleared
14
- * to `["", ""]` is treated the same as an unset `[]` by `required` and the
15
- * `empty` / `notEmpty` operators.
11
+ * the typical user-facing notion of empty (nullish / blank string / `[]`).
12
+ * Numbers (including `0`), booleans, and non-empty objects are NOT empty. An
13
+ * array counts as empty when it holds no meaningful entry, so a date range
14
+ * cleared to `["", ""]` is treated the same as an unset `[]` by `required` and
15
+ * the `empty` / `notEmpty` operators.
16
+ *
17
+ * Lockstep pair: the Go approval backend's `isEmptyFormValue`
18
+ * (`internal/approval/service/validation.go`). Strings are TRIMMED on both
19
+ * sides, so a whitespace-only value fails `required` here instead of passing
20
+ * the client and bouncing off the server with no inline error. Deliberate
21
+ * residual asymmetry: arrays here are empty when every element is empty
22
+ * (recursive), Go uses `len == 0` — the client is intentionally STRICTER
23
+ * (client-side strictness is safe; the server accepts more).
16
24
  */
17
25
  export declare function isEmptyRuntimeValue(value: unknown): boolean;
18
26
  /**
@@ -1,4 +1,4 @@
1
- import { Block, FlexSlot, PresentationLayer } from '../../types';
1
+ import { Block, FlexSlot, PresentationLayer, StackSlot } from '../../types';
2
2
  import { ScopePath } from './walk';
3
3
  /**
4
4
  * Structural edit operations driven by the canvas. Every function is pure and
@@ -87,6 +87,17 @@ export declare function setFlex(schema: PresentationLayer, blockId: string, flex
87
87
  * already in place returns the input layer unchanged.
88
88
  */
89
89
  export declare function setColumnWidth(schema: PresentationLayer, blockId: string, width: number | undefined): PresentationLayer;
90
+ /**
91
+ * Set (or clear) a block's stack sizing + placement — honored when the block is
92
+ * a direct child of a stack body (root / section / tab / stack subform).
93
+ *
94
+ * The slot is normalized at the write so the schema only ever persists what
95
+ * `validateSchema` accepts: each length keeps a finite, non-negative `value` and
96
+ * a known `unit`; invalid lengths and an unknown `align` are dropped, and a slot
97
+ * left with no fields collapses to `undefined`. Writing a slot equal to the one
98
+ * already in place returns the input layer unchanged.
99
+ */
100
+ export declare function setStackSlot(schema: PresentationLayer, blockId: string, slot: StackSlot | undefined): PresentationLayer;
90
101
  /**
91
102
  * A key-minting strategy for a tree rebuild (clone or cross-scope move). A
92
103
  * function reallocates each keyed node's key in the rebuilt block's own value
@@ -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" | "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";
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" | "stack_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
@@ -18,7 +18,7 @@ export { Toolbar as FormEditorToolbar, type ToolbarBrand, type ToolbarProps } fr
18
18
  export { ConversionRegistry, convertPresentation, createDefaultConversionRules, type BlockConversion, type BlockConversionRule, type ConversionContext, type ConversionReport } from './engine/conversion';
19
19
  export { createId } from './engine/ids';
20
20
  export { generateUniqueKey, isKeyedField, isKeyedNode, nextUniqueKey, sanitizeKey } from './engine/keys';
21
- export { ALERT_LEVELS, defaultEvaluateAssignExpression, defaultEvaluateExpression, defaultEvaluateScriptAction, EFFECT_ACTION_TYPES, FIELD_EVENT_TRIGGER_KINDS, FIELD_TRIGGER_KINDS, FORM_TRIGGER_KINDS, isEffectAction, isFieldEventTriggerKind, isStateAction, KEYED_ONLY_ACTIONS, LINKAGE_ACTION_TYPES, LINKAGE_OPERATORS, resolveLinkageEvaluators, STATE_ACTION_TYPES, validateLinkageSchema, type LinkageValidationResult } from './engine/linkage';
21
+ export { ALERT_LEVELS, defaultEvaluateAssignExpression, defaultEvaluateExpression, defaultEvaluateScriptAction, EFFECT_ACTION_TYPES, FIELD_EVENT_TRIGGER_KINDS, FIELD_TRIGGER_KINDS, FORM_TRIGGER_KINDS, getFieldPermission, isEffectAction, isFieldEventTriggerKind, isStateAction, isWritableFieldPermission, KEYED_ONLY_ACTIONS, LINKAGE_ACTION_TYPES, LINKAGE_OPERATORS, resolveLinkageEvaluators, STATE_ACTION_TYPES, validateLinkageSchema, type LinkageValidationResult } from './engine/linkage';
22
22
  export { createDefaultRegistry, registerDefaults } from './engine/registry/defaults';
23
23
  export { createDefaultMobileRegistry } from './engine/registry/defaults-mobile';
24
24
  export { FormFieldRegistry, type DeviceRegistries } from './engine/registry/form-field-registry';