@vef-framework-react/form-editor 2.24.1 → 2.26.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 (236) hide show
  1. package/dist/cjs/editor/canvas/canvas-field.cjs +1 -1
  2. package/dist/cjs/editor/data-source-apis.cjs +1 -0
  3. package/dist/cjs/editor/footer/footer.cjs +1 -1
  4. package/dist/cjs/editor/form-config/form-config-drawer.cjs +1 -1
  5. package/dist/cjs/editor/form-editor.cjs +1 -1
  6. package/dist/cjs/editor/host-validation.cjs +1 -0
  7. package/dist/cjs/editor/issue-location.cjs +1 -0
  8. package/dist/cjs/editor/preview-runtime-context.cjs +1 -1
  9. package/dist/cjs/editor/properties/entries/linkage/action-editor.cjs +2 -2
  10. package/dist/cjs/editor/properties/entries/linkage/condition-editor.cjs +1 -1
  11. package/dist/cjs/editor/properties/entries/linkage/styles.cjs +1 -1
  12. package/dist/cjs/editor/properties/entries/options-source/index.cjs +1 -1
  13. package/dist/cjs/editor/properties/form-data-sources-panel.cjs +1 -1
  14. package/dist/cjs/editor/properties/option-editors.cjs +1 -1
  15. package/dist/cjs/editor/properties/remote-option-source-editor.cjs +1 -0
  16. package/dist/cjs/editor/properties/remote-request-editor.cjs +1 -0
  17. package/dist/cjs/editor/properties/system-variables-panel.cjs +1 -0
  18. package/dist/cjs/editor/styles.cjs +1 -1
  19. package/dist/cjs/editor/toolbar/toolbar.cjs +2 -2
  20. package/dist/cjs/editor/validation-summary.cjs +1 -1
  21. package/dist/cjs/engine/linkage/default-evaluator.cjs +1 -1
  22. package/dist/cjs/engine/linkage/operators.cjs +1 -1
  23. package/dist/cjs/engine/linkage/scope.cjs +1 -0
  24. package/dist/cjs/engine/linkage/source-tracking.cjs +1 -1
  25. package/dist/cjs/engine/linkage/validator.cjs +1 -1
  26. package/dist/cjs/engine/option-mapping.cjs +1 -0
  27. package/dist/cjs/engine/schema/edit-ops.cjs +1 -1
  28. package/dist/cjs/engine/schema/reconcile.cjs +1 -1
  29. package/dist/cjs/engine/validation.cjs +1 -1
  30. package/dist/cjs/index.cjs +1 -1
  31. package/dist/cjs/render/data-source-context.cjs +1 -1
  32. package/dist/cjs/render/form-renderer.cjs +1 -1
  33. package/dist/es/components/button/index.js +1 -1
  34. package/dist/es/components/checkbox-group-field/index.js +1 -1
  35. package/dist/es/components/code-editor/code-editor-input.js +1 -1
  36. package/dist/es/components/code-editor/index.js +1 -1
  37. package/dist/es/components/containers/index.js +1 -1
  38. package/dist/es/components/date-field/index.js +1 -1
  39. package/dist/es/components/display/index.js +1 -1
  40. package/dist/es/components/field-entries.js +1 -1
  41. package/dist/es/components/mobile/alert-block.js +1 -1
  42. package/dist/es/components/mobile/button.js +1 -1
  43. package/dist/es/components/mobile/checkbox-group.js +1 -1
  44. package/dist/es/components/mobile/date-adapters.js +1 -1
  45. package/dist/es/components/mobile/date.js +1 -1
  46. package/dist/es/components/mobile/daterange.js +1 -1
  47. package/dist/es/components/mobile/datetime.js +1 -1
  48. package/dist/es/components/mobile/definitions.js +1 -1
  49. package/dist/es/components/mobile/divider.js +1 -1
  50. package/dist/es/components/mobile/input-cell.js +1 -1
  51. package/dist/es/components/mobile/number.js +1 -1
  52. package/dist/es/components/mobile/option-group.js +1 -1
  53. package/dist/es/components/mobile/paragraph.js +1 -1
  54. package/dist/es/components/mobile/picker-trigger.js +1 -1
  55. package/dist/es/components/mobile/radio.js +1 -1
  56. package/dist/es/components/mobile/scope.js +1 -1
  57. package/dist/es/components/mobile/select.js +1 -1
  58. package/dist/es/components/mobile/switch.js +1 -1
  59. package/dist/es/components/mobile/textarea.js +1 -1
  60. package/dist/es/components/mobile/textfield.js +1 -1
  61. package/dist/es/components/mobile/theme.js +1 -1
  62. package/dist/es/components/number-field/index.js +1 -1
  63. package/dist/es/components/radio-field/index.js +1 -1
  64. package/dist/es/components/select-field/index.js +1 -1
  65. package/dist/es/components/switch-field/index.js +1 -1
  66. package/dist/es/components/textarea-field/index.js +1 -1
  67. package/dist/es/components/textfield/index.js +1 -1
  68. package/dist/es/components/upload-field/index.js +1 -1
  69. package/dist/es/editor/canvas/canvas-field.js +28 -27
  70. package/dist/es/editor/canvas/canvas.js +1 -1
  71. package/dist/es/editor/canvas/container-drag-chip.js +1 -1
  72. package/dist/es/editor/canvas/drop-indicator.js +1 -1
  73. package/dist/es/editor/canvas/drop-zones.js +1 -1
  74. package/dist/es/editor/canvas/json-split-view.js +1 -1
  75. package/dist/es/editor/canvas/mobile-seed-state.js +1 -1
  76. package/dist/es/editor/canvas/phone-frame.js +1 -1
  77. package/dist/es/editor/canvas/subform-column-eligibility.js +1 -1
  78. package/dist/es/editor/canvas/subform-table-cell.js +1 -1
  79. package/dist/es/editor/canvas/use-scroll-selection-into-view.js +1 -1
  80. package/dist/es/editor/context-sources.js +1 -1
  81. package/dist/es/editor/data-source-apis.js +30 -0
  82. package/dist/es/editor/dnd.js +1 -1
  83. package/dist/es/editor/editor-layout-context.js +1 -1
  84. package/dist/es/editor/footer/footer.js +119 -82
  85. package/dist/es/editor/form-config/form-basics-tab.js +1 -1
  86. package/dist/es/editor/form-config/form-config-drawer.js +120 -99
  87. package/dist/es/editor/form-config/linkage-overview.js +1 -1
  88. package/dist/es/editor/form-config/outline-tab.js +1 -1
  89. package/dist/es/editor/form-editor.js +113 -105
  90. package/dist/es/editor/host-validation.js +17 -0
  91. package/dist/es/editor/issue-location.js +127 -0
  92. package/dist/es/editor/palette/field-groups.js +1 -1
  93. package/dist/es/editor/palette/palette-group.js +1 -1
  94. package/dist/es/editor/palette/palette-item.js +1 -1
  95. package/dist/es/editor/palette/palette-panel.js +1 -1
  96. package/dist/es/editor/preview-effects.js +1 -1
  97. package/dist/es/editor/preview-runtime-context.js +58 -18
  98. package/dist/es/editor/properties/block-layout-section.js +1 -1
  99. package/dist/es/editor/properties/container-properties.js +1 -1
  100. package/dist/es/editor/properties/dynamic-value-editor.js +1 -1
  101. package/dist/es/editor/properties/entries/built-ins.js +1 -1
  102. package/dist/es/editor/properties/entries/checkbox-entry.js +1 -1
  103. package/dist/es/editor/properties/entries/coerce.js +1 -1
  104. package/dist/es/editor/properties/entries/entry-field.js +1 -1
  105. package/dist/es/editor/properties/entries/icon-entry.js +1 -1
  106. package/dist/es/editor/properties/entries/index.js +1 -1
  107. package/dist/es/editor/properties/entries/key-entry.js +1 -1
  108. package/dist/es/editor/properties/entries/linkage/action-editor.js +24 -40
  109. package/dist/es/editor/properties/entries/linkage/actions-editor.js +1 -1
  110. package/dist/es/editor/properties/entries/linkage/condition-editor.js +13 -12
  111. package/dist/es/editor/properties/entries/linkage/container-linkage-section.js +1 -1
  112. package/dist/es/editor/properties/entries/linkage/expression-input.js +1 -1
  113. package/dist/es/editor/properties/entries/linkage/index.js +1 -1
  114. package/dist/es/editor/properties/entries/linkage/linkage-rules-entry.js +1 -1
  115. package/dist/es/editor/properties/entries/linkage/mutators.js +1 -1
  116. package/dist/es/editor/properties/entries/linkage/options.js +1 -1
  117. package/dist/es/editor/properties/entries/linkage/rule-diagnostics.js +1 -1
  118. package/dist/es/editor/properties/entries/linkage/rule-list-editor.js +1 -1
  119. package/dist/es/editor/properties/entries/linkage/styles.js +42 -49
  120. package/dist/es/editor/properties/entries/linkage/trigger-editor.js +1 -1
  121. package/dist/es/editor/properties/entries/linkage/use-linkage-editor-model.js +1 -1
  122. package/dist/es/editor/properties/entries/linkage/use-stable-options.js +1 -1
  123. package/dist/es/editor/properties/entries/number-entry.js +1 -1
  124. package/dist/es/editor/properties/entries/options-source/index.js +7 -6
  125. package/dist/es/editor/properties/entries/options-source/source-mutators.js +1 -1
  126. package/dist/es/editor/properties/entries/select-entry.js +1 -1
  127. package/dist/es/editor/properties/entries/text-entry.js +1 -1
  128. package/dist/es/editor/properties/form-data-sources-panel.js +44 -36
  129. package/dist/es/editor/properties/form-linkage-panel.js +1 -1
  130. package/dist/es/editor/properties/form-variables-panel.js +1 -1
  131. package/dist/es/editor/properties/option-editors.js +87 -252
  132. package/dist/es/editor/properties/panel-header.js +1 -1
  133. package/dist/es/editor/properties/properties-empty.js +1 -1
  134. package/dist/es/editor/properties/properties-header.js +1 -1
  135. package/dist/es/editor/properties/properties-panel.js +1 -1
  136. package/dist/es/editor/properties/properties-provider.js +1 -1
  137. package/dist/es/editor/properties/properties-tabs.js +1 -1
  138. package/dist/es/editor/properties/remote-option-source-editor.js +207 -0
  139. package/dist/es/editor/properties/remote-request-editor.js +357 -0
  140. package/dist/es/editor/properties/system-variables-panel.js +114 -0
  141. package/dist/es/editor/properties/use-confirmable-kind-switch.js +1 -1
  142. package/dist/es/editor/remove-node-confirm.js +1 -1
  143. package/dist/es/editor/schema-apply.js +1 -1
  144. package/dist/es/editor/styles.js +6 -6
  145. package/dist/es/editor/toolbar/notify.js +1 -1
  146. package/dist/es/editor/toolbar/schema-io.js +1 -1
  147. package/dist/es/editor/toolbar/toolbar.js +175 -171
  148. package/dist/es/editor/use-editor-shortcuts.js +1 -1
  149. package/dist/es/editor/validation-summary.js +130 -48
  150. package/dist/es/engine/assert-never.js +1 -1
  151. package/dist/es/engine/conversion/index.js +1 -1
  152. package/dist/es/engine/data-source-params.js +1 -1
  153. package/dist/es/engine/ids.js +1 -1
  154. package/dist/es/engine/keys.js +1 -1
  155. package/dist/es/engine/linkage/cycle.js +1 -1
  156. package/dist/es/engine/linkage/default-evaluator.js +38 -27
  157. package/dist/es/engine/linkage/effects.js +1 -1
  158. package/dist/es/engine/linkage/evaluator.js +1 -1
  159. package/dist/es/engine/linkage/index.js +1 -1
  160. package/dist/es/engine/linkage/operators.js +20 -44
  161. package/dist/es/engine/linkage/scope.js +84 -0
  162. package/dist/es/engine/linkage/shape.js +1 -1
  163. package/dist/es/engine/linkage/source-tracking.js +19 -15
  164. package/dist/es/engine/linkage/taxonomy.js +1 -1
  165. package/dist/es/engine/linkage/validator.js +101 -81
  166. package/dist/es/engine/option-mapping.js +18 -0
  167. package/dist/es/engine/registry/defaults-mobile.js +1 -1
  168. package/dist/es/engine/registry/defaults.js +1 -1
  169. package/dist/es/engine/registry/form-field-registry.js +1 -1
  170. package/dist/es/engine/schema/column-type.js +1 -1
  171. package/dist/es/engine/schema/edit-ops.js +84 -83
  172. package/dist/es/engine/schema/mutate.js +1 -1
  173. package/dist/es/engine/schema/nodes.js +1 -1
  174. package/dist/es/engine/schema/permission-bridge.js +1 -1
  175. package/dist/es/engine/schema/presentation.js +1 -1
  176. package/dist/es/engine/schema/reconcile.js +55 -51
  177. package/dist/es/engine/schema/removal-impact.js +1 -1
  178. package/dist/es/engine/schema/rewrite.js +1 -1
  179. package/dist/es/engine/schema/validate.js +1 -1
  180. package/dist/es/engine/schema/walk.js +1 -1
  181. package/dist/es/engine/validation.js +8 -4
  182. package/dist/es/icons.js +1 -1
  183. package/dist/es/index.js +49 -48
  184. package/dist/es/render/chrome/mobile-chrome.js +1 -1
  185. package/dist/es/render/chrome/pc-chrome.js +1 -1
  186. package/dist/es/render/chrome/subform-shell.js +1 -1
  187. package/dist/es/render/data-source-context.js +44 -43
  188. package/dist/es/render/data-source-param-scope.js +1 -1
  189. package/dist/es/render/flex-style.js +1 -1
  190. package/dist/es/render/form-field.js +1 -1
  191. package/dist/es/render/form-renderer.js +184 -180
  192. package/dist/es/render/grid-style.js +1 -1
  193. package/dist/es/render/parts/field-shell.js +1 -1
  194. package/dist/es/render/parts/label.js +1 -1
  195. package/dist/es/render/parts/option-order.js +1 -1
  196. package/dist/es/render/parts/options-status.js +1 -1
  197. package/dist/es/render/stack-style.js +1 -1
  198. package/dist/es/render/subform-columns.js +1 -1
  199. package/dist/es/render/submit.js +1 -1
  200. package/dist/es/runtime/effects.js +1 -1
  201. package/dist/es/runtime/field-write.js +1 -1
  202. package/dist/es/runtime/resolve-scope-values.js +1 -1
  203. package/dist/es/runtime/runtime-context.js +1 -1
  204. package/dist/es/runtime/runtime-state-controller.js +1 -1
  205. package/dist/es/runtime/stabilize-state-map.js +1 -1
  206. package/dist/es/store/engine-provider.js +1 -1
  207. package/dist/es/store/form-store.js +1 -1
  208. package/dist/es/types/chrome.js +1 -1
  209. package/dist/es/types/component.js +1 -1
  210. package/dist/es/types/data-source.js +1 -1
  211. package/dist/es/types/dynamic-value.js +1 -1
  212. package/dist/es/types/index.js +1 -1
  213. package/dist/es/types/linkage.js +1 -1
  214. package/dist/es/types/properties.js +1 -1
  215. package/dist/es/types/schema.js +1 -1
  216. package/dist/types/editor/data-source-apis.d.ts +24 -0
  217. package/dist/types/editor/form-editor.d.ts +33 -9
  218. package/dist/types/editor/host-validation.d.ts +20 -0
  219. package/dist/types/editor/issue-location.d.ts +43 -0
  220. package/dist/types/editor/preview-runtime-context.d.ts +27 -2
  221. package/dist/types/editor/properties/entries/linkage/styles.d.ts +0 -1
  222. package/dist/types/editor/properties/option-editors.d.ts +1 -12
  223. package/dist/types/editor/properties/remote-option-source-editor.d.ts +15 -0
  224. package/dist/types/editor/properties/remote-request-editor.d.ts +70 -0
  225. package/dist/types/editor/properties/system-variables-panel.d.ts +8 -0
  226. package/dist/types/editor/styles.d.ts +2 -2
  227. package/dist/types/editor/validation-summary.d.ts +37 -14
  228. package/dist/types/engine/linkage/scope.d.ts +73 -0
  229. package/dist/types/engine/linkage/source-tracking.d.ts +3 -3
  230. package/dist/types/engine/option-mapping.d.ts +9 -0
  231. package/dist/types/engine/validation.d.ts +27 -8
  232. package/dist/types/index.d.ts +3 -1
  233. package/dist/types/render/form-renderer.d.ts +4 -3
  234. package/dist/types/types/data-source.d.ts +64 -0
  235. package/dist/types/types/linkage.d.ts +34 -16
  236. package/package.json +5 -5
@@ -0,0 +1,17 @@
1
+ /*! @vef-framework-react/form-editor v2.26.0 made by Venus | 2026-10-13T17:03:48.101Z */
2
+ import { jsx as e } from "@emotion/react/jsx-runtime";
3
+ import { createContext as t, use as n } from "react";
4
+ //#region src/editor/host-validation.tsx
5
+ var r = t(void 0);
6
+ r.displayName = "HostValidationContext";
7
+ function i({ children: t, validate: n }) {
8
+ return /* @__PURE__ */ e(r, {
9
+ value: n,
10
+ children: t
11
+ });
12
+ }
13
+ function a() {
14
+ return n(r);
15
+ }
16
+ //#endregion
17
+ export { i as HostValidationProvider, a as useHostValidation };
@@ -0,0 +1,127 @@
1
+ /*! @vef-framework-react/form-editor v2.26.0 made by Venus | 2026-10-13T17:03:48.101Z */
2
+ import { findNode as e, nodeLabel as t, scopeEquals as n, walkNodes as r } from "../engine/schema/walk.js";
3
+ import { assertNever as i } from "../engine/assert-never.js";
4
+ import { isKeyedNode as a } from "../engine/keys.js";
5
+ import { useFormEditorStoreApi as o } from "../store/form-store.js";
6
+ import { useCallback as s } from "react";
7
+ //#region src/editor/issue-location.ts
8
+ var c = ["pc", "mobile"], l = /^(?<body>children|tabs|template)\[(?<index>\d+)\]$/, u = /^node\[(?<id>[^\]]+)\]$/, d = /* @__PURE__ */ new Set([
9
+ "",
10
+ "id",
11
+ "version",
12
+ "presentations"
13
+ ]);
14
+ function f(e, t) {
15
+ if (e !== void 0) return t === "template" ? e.type === "subform" ? e.template : void 0 : "children" in e && Array.isArray(e.children) ? e.children : void 0;
16
+ }
17
+ function p(e, t) {
18
+ let n, r = e.children;
19
+ for (let e of t) {
20
+ let t = l.exec(e)?.groups;
21
+ if (t === void 0) break;
22
+ let i = Number(t.index);
23
+ if (t.body === "tabs") {
24
+ if (r = n?.type === "tabs" ? n.tabs[i]?.children : void 0, r === void 0) break;
25
+ continue;
26
+ }
27
+ let a = (r ?? f(n, t.body ?? ""))?.[i];
28
+ if (r = void 0, a === void 0) break;
29
+ n = a;
30
+ }
31
+ return n?.id;
32
+ }
33
+ function m(e, t) {
34
+ let i = t.at(-1), o = t.slice(0, -1), s;
35
+ return r(e, (e, t) => {
36
+ s === void 0 && a(e) && e.key === i && n(t, o) && (s = e.id);
37
+ }), s;
38
+ }
39
+ function h(e) {
40
+ return [e, ...c.filter((t) => t !== e)];
41
+ }
42
+ function g(e, t, n) {
43
+ for (let r of h(t)) {
44
+ let t = e.presentations[r], i = t === void 0 ? void 0 : n(t);
45
+ if (i !== void 0) return {
46
+ kind: "node",
47
+ device: r,
48
+ nodeId: i
49
+ };
50
+ }
51
+ }
52
+ function _(t, n, r) {
53
+ let i = t.split("."), [a = "", o] = i;
54
+ if (a === "presentations" && (o === "pc" || o === "mobile")) {
55
+ let e = n.presentations[o], t = e === void 0 ? void 0 : p(e, i.slice(2));
56
+ return t === void 0 ? void 0 : {
57
+ kind: "node",
58
+ device: o,
59
+ nodeId: t
60
+ };
61
+ }
62
+ let s = u.exec(a)?.groups?.id;
63
+ if (s !== void 0) return g(n, r, (t) => e(t, s)?.id);
64
+ if (a === "linkage" || a === "schema" && o === "linkage") return {
65
+ kind: "tab",
66
+ tab: "linkage"
67
+ };
68
+ if (/^dataSources(?:\[\d+\])?$/.test(a)) return {
69
+ kind: "tab",
70
+ tab: "dataSources"
71
+ };
72
+ if (/^variables(?:\[\d+\])?$/.test(a)) return {
73
+ kind: "tab",
74
+ tab: "variables"
75
+ };
76
+ if (!d.has(t)) return g(n, r, (e) => m(e, i));
77
+ }
78
+ function v(e) {
79
+ let t = /^[a-z]+\[(?<index>\d+)\]/i.exec(e)?.groups?.index;
80
+ return t === void 0 ? void 0 : Number(t);
81
+ }
82
+ function y(e, t, n) {
83
+ if (n === void 0) return e;
84
+ let r = t[n];
85
+ return r !== void 0 && r.length > 0 ? `${e}「${r}」` : `${e} #${n + 1}`;
86
+ }
87
+ function b(n, r, o) {
88
+ let s = _(n, r, o);
89
+ if (s !== void 0) {
90
+ if (s.kind === "node") {
91
+ let n = r.presentations[s.device], i = n === void 0 ? void 0 : e(n, s.nodeId), o = i === void 0 ? s.nodeId : t(i) ?? (a(i) ? i.key : i.id);
92
+ return s.device === "mobile" ? `移动端 · ${o}` : o;
93
+ }
94
+ switch (s.tab) {
95
+ case "dataSources": return y("数据源", (r.dataSources ?? []).map((e) => e.name), v(n));
96
+ case "variables": return y("变量", (r.variables ?? []).map((e) => e.name), v(n));
97
+ case "linkage": return "表单联动";
98
+ case "outline": return;
99
+ case "form": return;
100
+ default: return i(s.tab);
101
+ }
102
+ }
103
+ }
104
+ function x(e, t) {
105
+ let n = e.getState();
106
+ if (t.kind === "tab") {
107
+ n.setFormConfigTab(t.tab);
108
+ return;
109
+ }
110
+ n.device !== t.device && n.setDevice(t.device), n.selectNode(t.nodeId);
111
+ }
112
+ function S() {
113
+ let e = o();
114
+ return s((t) => {
115
+ let { device: n, schema: r } = e.getState();
116
+ return b(t.path, r, n);
117
+ }, [e]);
118
+ }
119
+ function C() {
120
+ let e = o();
121
+ return s((t) => {
122
+ let { device: n, schema: r } = e.getState(), i = _(t.path, r, n);
123
+ return i === void 0 ? void 0 : () => x(e, i);
124
+ }, [e]);
125
+ }
126
+ //#endregion
127
+ export { b as describeIssueLocation, _ as locateIssue, S as useIssueDescriber, C as useIssueNavigator };
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/form-editor v2.24.1 made by Venus | 2026-09-28T10:43:02.730Z */
1
+ /*! @vef-framework-react/form-editor v2.26.0 made by Venus | 2026-10-13T17:03:48.101Z */
2
2
  //#region src/editor/palette/field-groups.ts
3
3
  var e = {
4
4
  "basic-input": "基础输入",
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/form-editor v2.24.1 made by Venus | 2026-09-28T10:43:02.730Z */
1
+ /*! @vef-framework-react/form-editor v2.26.0 made by Venus | 2026-10-13T17:03:48.101Z */
2
2
  import { EditorIcon as e } from "../../icons.js";
3
3
  import { FIELD_GROUP_LABELS as t } from "./field-groups.js";
4
4
  import { PaletteItem as n } from "./palette-item.js";
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/form-editor v2.24.1 made by Venus | 2026-09-28T10:43:02.730Z */
1
+ /*! @vef-framework-react/form-editor v2.26.0 made by Venus | 2026-10-13T17:03:48.101Z */
2
2
  import { EditorIcon as e } from "../../icons.js";
3
3
  import { findNode as t, isContainerNode as n } from "../../engine/schema/walk.js";
4
4
  import { currentLayer as r } from "../../engine/schema/presentation.js";
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/form-editor v2.24.1 made by Venus | 2026-09-28T10:43:02.730Z */
1
+ /*! @vef-framework-react/form-editor v2.26.0 made by Venus | 2026-10-13T17:03:48.101Z */
2
2
  import { EditorIcon as e } from "../../icons.js";
3
3
  import { useFieldRegistry as t } from "../../store/engine-provider.js";
4
4
  import { isPaletteVisible as n, useFormEditorStore as r } from "../../store/form-store.js";
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/form-editor v2.24.1 made by Venus | 2026-09-28T10:43:02.730Z */
1
+ /*! @vef-framework-react/form-editor v2.26.0 made by Venus | 2026-10-13T17:03:48.101Z */
2
2
  import { showErrorMessage as e, showInfoMessage as t, showSuccessMessage as n, showWarningMessage as r } from "@vef-framework-react/components";
3
3
  //#region src/editor/preview-effects.ts
4
4
  var i = {
@@ -1,25 +1,65 @@
1
- /*! @vef-framework-react/form-editor v2.24.1 made by Venus | 2026-09-28T10:43:02.730Z */
2
- import { jsx as e } from "@emotion/react/jsx-runtime";
3
- import { createContext as t, use as n, useMemo as r } from "react";
1
+ /*! @vef-framework-react/form-editor v2.26.0 made by Venus | 2026-10-13T17:03:48.101Z */
2
+ import { withContextValues as e } from "../engine/linkage/scope.js";
3
+ import { useContextSources as t } from "./context-sources.js";
4
+ import { jsx as n } from "@emotion/react/jsx-runtime";
5
+ import { createContext as r, use as i, useCallback as a, useMemo as o, useState as s } from "react";
4
6
  //#region src/editor/preview-runtime-context.tsx
5
- var i = t({});
6
- i.displayName = "PreviewRuntimeContext";
7
- function a({ children: t, value: n }) {
8
- return /* @__PURE__ */ e(i, {
9
- value: r(() => ({
10
- dataSourceResolver: n.dataSourceResolver,
11
- evaluators: n.evaluators,
12
- evaluationContext: n.evaluationContext
7
+ var c = r({});
8
+ c.displayName = "PreviewRuntimeContext";
9
+ var l = r(null);
10
+ l.displayName = "PreviewSamplesContext";
11
+ var u = /* @__PURE__ */ new Map();
12
+ function d() {}
13
+ var f = {
14
+ samples: u,
15
+ setSample: d
16
+ };
17
+ function p(e) {
18
+ try {
19
+ return JSON.parse(e);
20
+ } catch {
21
+ return e;
22
+ }
23
+ }
24
+ function m({ children: r, value: i }) {
25
+ let d = t(), [f, m] = s(u), h = a((e, t) => {
26
+ m((n) => {
27
+ if ((n.get(e) ?? "") === t) return n;
28
+ let r = new Map(n);
29
+ return t.length === 0 ? r.delete(e) : r.set(e, t), r;
30
+ });
31
+ }, []), g = o(() => e(i.evaluationContext, new Map(d.flatMap((e) => {
32
+ let t = f.get(e.key);
33
+ return t === void 0 ? [] : [[e.key, p(t)]];
34
+ }))), [
35
+ i.evaluationContext,
36
+ d,
37
+ f
38
+ ]);
39
+ return /* @__PURE__ */ n(c, {
40
+ value: o(() => ({
41
+ dataSourceResolver: i.dataSourceResolver,
42
+ evaluators: i.evaluators,
43
+ evaluationContext: g
13
44
  }), [
14
- n.dataSourceResolver,
15
- n.evaluators,
16
- n.evaluationContext
45
+ i.dataSourceResolver,
46
+ i.evaluators,
47
+ g
17
48
  ]),
18
- children: t
49
+ children: /* @__PURE__ */ n(l, {
50
+ value: o(() => ({
51
+ samples: f,
52
+ setSample: h
53
+ }), [f, h]),
54
+ children: r
55
+ })
19
56
  });
20
57
  }
21
- function o() {
22
- return n(i);
58
+ function h() {
59
+ return i(c);
60
+ }
61
+ function g() {
62
+ return i(l) ?? f;
23
63
  }
24
64
  //#endregion
25
- export { a as PreviewRuntimeProvider, o as usePreviewRuntime };
65
+ export { m as PreviewRuntimeProvider, h as usePreviewRuntime, g as usePreviewSamples };
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/form-editor v2.24.1 made by Venus | 2026-09-28T10:43:02.730Z */
1
+ /*! @vef-framework-react/form-editor v2.26.0 made by Venus | 2026-10-13T17:03:48.101Z */
2
2
  import { useFormEditorStoreApi as e } from "../../store/form-store.js";
3
3
  import { gridColumnCount as t } from "../../render/grid-style.js";
4
4
  import { jsx as n, jsxs as r } from "@emotion/react/jsx-runtime";
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/form-editor v2.24.1 made by Venus | 2026-09-28T10:43:02.730Z */
1
+ /*! @vef-framework-react/form-editor v2.26.0 made by Venus | 2026-10-13T17:03:48.101Z */
2
2
  import { EditorIcon as e } from "../../icons.js";
3
3
  import "../../types/schema.js";
4
4
  import { createId as t } from "../../engine/ids.js";
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/form-editor v2.24.1 made by Venus | 2026-09-28T10:43:02.730Z */
1
+ /*! @vef-framework-react/form-editor v2.26.0 made by Venus | 2026-10-13T17:03:48.101Z */
2
2
  import { coerceToString as e } from "./entries/coerce.js";
3
3
  import { ExpressionInput as t } from "./entries/linkage/expression-input.js";
4
4
  import { codeEditorWrapperCss as n, valueEditorCss as r } from "./entries/linkage/styles.js";
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/form-editor v2.24.1 made by Venus | 2026-09-28T10:43:02.730Z */
1
+ /*! @vef-framework-react/form-editor v2.26.0 made by Venus | 2026-10-13T17:03:48.101Z */
2
2
  import { CheckboxEntry as e } from "./checkbox-entry.js";
3
3
  import { IconEntry as t } from "./icon-entry.js";
4
4
  import { KeyEntry as n } from "./key-entry.js";
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/form-editor v2.24.1 made by Venus | 2026-09-28T10:43:02.730Z */
1
+ /*! @vef-framework-react/form-editor v2.26.0 made by Venus | 2026-10-13T17:03:48.101Z */
2
2
  import { jsx as e, jsxs as t } from "@emotion/react/jsx-runtime";
3
3
  import { css as n } from "@emotion/react";
4
4
  import { Checkbox as r, globalCssVars as i } from "@vef-framework-react/components";
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/form-editor v2.24.1 made by Venus | 2026-09-28T10:43:02.730Z */
1
+ /*! @vef-framework-react/form-editor v2.26.0 made by Venus | 2026-10-13T17:03:48.101Z */
2
2
  import { isNullish as e, isString as t } from "@vef-framework-react/shared";
3
3
  //#region src/editor/properties/entries/coerce.ts
4
4
  function n(n) {
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/form-editor v2.24.1 made by Venus | 2026-09-28T10:43:02.730Z */
1
+ /*! @vef-framework-react/form-editor v2.26.0 made by Venus | 2026-10-13T17:03:48.101Z */
2
2
  import { jsx as e, jsxs as t } from "@emotion/react/jsx-runtime";
3
3
  import { css as n } from "@emotion/react";
4
4
  import { globalCssVars as r } from "@vef-framework-react/components";
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/form-editor v2.24.1 made by Venus | 2026-09-28T10:43:02.730Z */
1
+ /*! @vef-framework-react/form-editor v2.26.0 made by Venus | 2026-10-13T17:03:48.101Z */
2
2
  import { EntryField as e } from "./entry-field.js";
3
3
  import { jsx as t } from "@emotion/react/jsx-runtime";
4
4
  import { IconPicker as n } from "@vef-framework-react/components";
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/form-editor v2.24.1 made by Venus | 2026-09-28T10:43:02.730Z */
1
+ /*! @vef-framework-react/form-editor v2.26.0 made by Venus | 2026-10-13T17:03:48.101Z */
2
2
  import { LinkageRulesEntry as e } from "./linkage/linkage-rules-entry.js";
3
3
  import { CheckboxEntry as t } from "./checkbox-entry.js";
4
4
  import { IconEntry as n } from "./icon-entry.js";
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/form-editor v2.24.1 made by Venus | 2026-09-28T10:43:02.730Z */
1
+ /*! @vef-framework-react/form-editor v2.26.0 made by Venus | 2026-10-13T17:03:48.101Z */
2
2
  import { coerceToString as e } from "./coerce.js";
3
3
  import { EntryField as t } from "./entry-field.js";
4
4
  import { jsx as n } from "@emotion/react/jsx-runtime";
@@ -1,23 +1,24 @@
1
- /*! @vef-framework-react/form-editor v2.24.1 made by Venus | 2026-09-28T10:43:02.730Z */
1
+ /*! @vef-framework-react/form-editor v2.26.0 made by Venus | 2026-10-13T17:03:48.101Z */
2
2
  import { EditorIcon as e } from "../../../../icons.js";
3
3
  import { sanitizeKey as t } from "../../../../engine/keys.js";
4
4
  import { isEffectAction as n } from "../../../../engine/linkage/taxonomy.js";
5
5
  import { NO_COMPLETION_SETUP as r } from "./expression-input.js";
6
- import { actionCardCss as i, actionDeleteCss as a, actionHeaderCss as o, actionRetriggerCss as s, actionRetriggerLabelCss as c, apiFieldsCss as l, codeEditorWrapperCss as u, defaultHintCss as d, defaultTextCss as f, selectStyle as p } from "./styles.js";
7
- import { DynamicValueEditor as m } from "../../dynamic-value-editor.js";
6
+ import { actionCardCss as i, actionDeleteCss as a, actionHeaderCss as o, actionRetriggerCss as s, actionRetriggerLabelCss as c, codeEditorWrapperCss as l, defaultHintCss as u, defaultTextCss as d, selectStyle as f } from "./styles.js";
7
+ import { DynamicValueEditor as p } from "../../dynamic-value-editor.js";
8
+ import { RemoteRequestEditor as m } from "../../remote-request-editor.js";
8
9
  import { createActionFor as h } from "./mutators.js";
9
10
  import { alertLevelOptions as g, isLinkageActionType as _ } from "./options.js";
10
11
  import { Fragment as v, jsx as y, jsxs as b } from "@emotion/react/jsx-runtime";
11
12
  import { Button as x, CodeEditor as S, Input as C, Select as w, Switch as T } from "@vef-framework-react/components";
12
13
  //#region src/editor/properties/entries/linkage/action-editor.tsx
13
- var E = ({ action: t, availableActions: r, canRemove: l, dataSourceOptions: u, isConditionTrigger: m, targetOptions: g, onChange: v, onRemove: S }) => /* @__PURE__ */ b("div", {
14
+ var E = ({ action: t, availableActions: r, canRemove: l, dataSourceOptions: p, isConditionTrigger: m, targetOptions: g, onChange: v, onRemove: S }) => /* @__PURE__ */ b("div", {
14
15
  css: i,
15
16
  children: [
16
17
  /* @__PURE__ */ b("div", {
17
18
  css: o,
18
19
  children: [/* @__PURE__ */ y(w, {
19
20
  options: r,
20
- style: p,
21
+ style: f,
21
22
  value: t.type,
22
23
  onChange: (e) => {
23
24
  if (!_(e)) return;
@@ -38,19 +39,19 @@ var E = ({ action: t, availableActions: r, canRemove: l, dataSourceOptions: u, i
38
39
  }),
39
40
  /* @__PURE__ */ y(D, {
40
41
  action: t,
41
- dataSourceOptions: u,
42
+ dataSourceOptions: p,
42
43
  targetOptions: g,
43
44
  onChange: v
44
45
  }),
45
46
  m && n(t) && /* @__PURE__ */ b("div", {
46
47
  css: s,
47
48
  children: [/* @__PURE__ */ b("div", {
48
- css: f,
49
+ css: d,
49
50
  children: [/* @__PURE__ */ y("span", {
50
51
  css: c,
51
52
  children: "重复触发"
52
53
  }), /* @__PURE__ */ y("span", {
53
- css: d,
54
+ css: u,
54
55
  children: "条件持续满足期间,依赖字段每次变化都重新触发;关闭(默认)则仅在条件首次满足时触发一次。"
55
56
  })]
56
57
  }), /* @__PURE__ */ y(T, {
@@ -74,7 +75,7 @@ var E = ({ action: t, availableActions: r, canRemove: l, dataSourceOptions: u, i
74
75
  });
75
76
  function D({ action: e, dataSourceOptions: n, targetOptions: i, onChange: a }) {
76
77
  switch (e.type) {
77
- case "assign": return /* @__PURE__ */ y(m, {
78
+ case "assign": return /* @__PURE__ */ y(p, {
78
79
  expressionPlaceholder: "field.A + field.B",
79
80
  literalPlaceholder: "赋值内容",
80
81
  value: e.value,
@@ -86,13 +87,13 @@ function D({ action: e, dataSourceOptions: n, targetOptions: i, onChange: a }) {
86
87
  case "set_field": return /* @__PURE__ */ b(v, { children: [/* @__PURE__ */ y(w, {
87
88
  options: i,
88
89
  placeholder: "选择目标字段",
89
- style: p,
90
+ style: f,
90
91
  value: e.targetKey.length > 0 ? e.targetKey : void 0,
91
92
  onChange: (t) => a({
92
93
  ...e,
93
94
  targetKey: String(t)
94
95
  })
95
- }), /* @__PURE__ */ y(m, {
96
+ }), /* @__PURE__ */ y(p, {
96
97
  expressionPlaceholder: "field.A",
97
98
  literalPlaceholder: "写入的值",
98
99
  value: e.value,
@@ -108,7 +109,7 @@ function D({ action: e, dataSourceOptions: n, targetOptions: i, onChange: a }) {
108
109
  ...e,
109
110
  variable: t(n.target.value)
110
111
  })
111
- }), /* @__PURE__ */ y(m, {
112
+ }), /* @__PURE__ */ y(p, {
112
113
  expressionPlaceholder: "$vars.count + 1",
113
114
  literalPlaceholder: "写入的值",
114
115
  value: e.value,
@@ -121,7 +122,7 @@ function D({ action: e, dataSourceOptions: n, targetOptions: i, onChange: a }) {
121
122
  notFoundContent: "请先在表单「数据源」中创建",
122
123
  options: n,
123
124
  placeholder: "选择数据源",
124
- style: p,
125
+ style: f,
125
126
  value: e.dataSourceId.length > 0 ? e.dataSourceId : void 0,
126
127
  onChange: (t) => a({
127
128
  ...e,
@@ -130,13 +131,13 @@ function D({ action: e, dataSourceOptions: n, targetOptions: i, onChange: a }) {
130
131
  });
131
132
  case "alert": return /* @__PURE__ */ b(v, { children: [/* @__PURE__ */ y(w, {
132
133
  options: g,
133
- style: p,
134
+ style: f,
134
135
  value: e.level ?? "info",
135
136
  onChange: (t) => a({
136
137
  ...e,
137
138
  level: O(t)
138
139
  })
139
- }), /* @__PURE__ */ y(m, {
140
+ }), /* @__PURE__ */ y(p, {
140
141
  expressionPlaceholder: "field.name + ' 已保存'",
141
142
  literalPlaceholder: "提示内容",
142
143
  value: e.message,
@@ -145,7 +146,7 @@ function D({ action: e, dataSourceOptions: n, targetOptions: i, onChange: a }) {
145
146
  message: t
146
147
  })
147
148
  })] });
148
- case "navigate": return /* @__PURE__ */ y(m, {
149
+ case "navigate": return /* @__PURE__ */ y(p, {
149
150
  expressionPlaceholder: "'/orders/' + field.id",
150
151
  literalPlaceholder: "目标路径,如 /orders",
151
152
  value: e.to,
@@ -154,32 +155,15 @@ function D({ action: e, dataSourceOptions: n, targetOptions: i, onChange: a }) {
154
155
  to: t
155
156
  })
156
157
  });
157
- case "api_call": return /* @__PURE__ */ b("div", {
158
- css: l,
159
- children: [/* @__PURE__ */ y(C, {
160
- placeholder: "资源 (resource)",
161
- value: e.request.resource,
162
- onChange: (t) => a({
163
- ...e,
164
- request: {
165
- ...e.request,
166
- resource: t.target.value
167
- }
168
- })
169
- }), /* @__PURE__ */ y(C, {
170
- placeholder: "动作 (action)",
171
- value: e.request.action,
172
- onChange: (t) => a({
173
- ...e,
174
- request: {
175
- ...e.request,
176
- action: t.target.value
177
- }
178
- })
179
- })]
158
+ case "api_call": return /* @__PURE__ */ y(m, {
159
+ request: e.request,
160
+ onChange: (t) => a({
161
+ ...e,
162
+ request: t
163
+ })
180
164
  });
181
165
  case "script": return /* @__PURE__ */ y("div", {
182
- css: u,
166
+ css: l,
183
167
  children: /* @__PURE__ */ y(S, {
184
168
  showLineNumbers: !0,
185
169
  basicSetupOptions: r,
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/form-editor v2.24.1 made by Venus | 2026-09-28T10:43:02.730Z */
1
+ /*! @vef-framework-react/form-editor v2.26.0 made by Venus | 2026-10-13T17:03:48.101Z */
2
2
  import { EditorIcon as e } from "../../../../icons.js";
3
3
  import { actionsListCss as t, addInlineButtonCss as n, sectionCss as r, sectionLabelCss as i } from "./styles.js";
4
4
  import { createActionFor as a } from "./mutators.js";