@namroodinc/liquid-editorial 0.6.5 → 0.6.7

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 (180) hide show
  1. package/README.md +23 -0
  2. package/UPGRADING.md +86 -0
  3. package/dist/chunks/{Avatar-C9ublbzK.cjs → Avatar-B_2lI7fS.cjs} +2 -2
  4. package/dist/chunks/{Avatar-C9ublbzK.cjs.map → Avatar-B_2lI7fS.cjs.map} +1 -1
  5. package/dist/chunks/{Avatar-BtblwihO.js → Avatar-DdFEOumt.js} +2 -2
  6. package/dist/chunks/{Avatar-BtblwihO.js.map → Avatar-DdFEOumt.js.map} +1 -1
  7. package/dist/chunks/{Board-z688-51u.js → Board-B8wK079I.js} +2 -2
  8. package/dist/chunks/{Board-z688-51u.js.map → Board-B8wK079I.js.map} +1 -1
  9. package/dist/chunks/{Board-CUt4j2-8.cjs → Board-CMf5Azt0.cjs} +2 -2
  10. package/dist/chunks/{Board-CUt4j2-8.cjs.map → Board-CMf5Azt0.cjs.map} +1 -1
  11. package/dist/chunks/{ColourField-DXGpNP08.js → ColourField-DC6cLb9h.js} +2 -2
  12. package/dist/chunks/{ColourField-DXGpNP08.js.map → ColourField-DC6cLb9h.js.map} +1 -1
  13. package/dist/chunks/{ColourField-BqhYB4ZE.cjs → ColourField-NnFxLEsh.cjs} +2 -2
  14. package/dist/chunks/{ColourField-BqhYB4ZE.cjs.map → ColourField-NnFxLEsh.cjs.map} +1 -1
  15. package/dist/chunks/EntryPicker-CR8Phuzl.js +180 -0
  16. package/dist/chunks/EntryPicker-CR8Phuzl.js.map +1 -0
  17. package/dist/chunks/EntryPicker-D7JIgx23.cjs +2 -0
  18. package/dist/chunks/EntryPicker-D7JIgx23.cjs.map +1 -0
  19. package/dist/chunks/{FormEditor-C5XtP-N7.js → FormEditor-BSfxVqLn.js} +192 -146
  20. package/dist/chunks/FormEditor-BSfxVqLn.js.map +1 -0
  21. package/dist/chunks/FormEditor-DNcSAnRF.cjs +2 -0
  22. package/dist/chunks/FormEditor-DNcSAnRF.cjs.map +1 -0
  23. package/dist/chunks/{RichTextEditor-DEJ-u-ZR.js → RichTextEditor-CNkwWist.js} +2 -2
  24. package/dist/chunks/{RichTextEditor-DEJ-u-ZR.js.map → RichTextEditor-CNkwWist.js.map} +1 -1
  25. package/dist/chunks/{RichTextEditor-Ddk7qaqg.cjs → RichTextEditor-DAnjElUO.cjs} +2 -2
  26. package/dist/chunks/{RichTextEditor-Ddk7qaqg.cjs.map → RichTextEditor-DAnjElUO.cjs.map} +1 -1
  27. package/dist/chunks/context-BONPXF-V.cjs.map +1 -1
  28. package/dist/chunks/context-CXvOl4Kt.js.map +1 -1
  29. package/dist/chunks/frame-BBVQTBcX.cjs +2 -0
  30. package/dist/chunks/frame-BBVQTBcX.cjs.map +1 -0
  31. package/dist/chunks/frame-De6IuTQz.js +189 -0
  32. package/dist/chunks/frame-De6IuTQz.js.map +1 -0
  33. package/dist/chunks/group-Bj9ZKc0R.cjs +2 -0
  34. package/dist/chunks/group-Bj9ZKc0R.cjs.map +1 -0
  35. package/dist/chunks/group-Ckz4Xya-.js +34 -0
  36. package/dist/chunks/group-Ckz4Xya-.js.map +1 -0
  37. package/dist/chunks/limit-BX6-o1a2.cjs +2 -0
  38. package/dist/chunks/limit-BX6-o1a2.cjs.map +1 -0
  39. package/dist/chunks/limit-ChteDN4T.js +18 -0
  40. package/dist/chunks/limit-ChteDN4T.js.map +1 -0
  41. package/dist/chunks/mergeRefs-C6_5pADN.js +19 -0
  42. package/dist/chunks/mergeRefs-C6_5pADN.js.map +1 -0
  43. package/dist/chunks/mergeRefs-CZ-SArlE.cjs +2 -0
  44. package/dist/chunks/mergeRefs-CZ-SArlE.cjs.map +1 -0
  45. package/dist/chunks/useLimit-BOmHKdJE.js +73 -0
  46. package/dist/chunks/useLimit-BOmHKdJE.js.map +1 -0
  47. package/dist/chunks/useLimit-DXe_VmYl.cjs +2 -0
  48. package/dist/chunks/useLimit-DXe_VmYl.cjs.map +1 -0
  49. package/dist/components/AppShell/index.cjs +1 -1
  50. package/dist/components/AppShell/index.js +1 -1
  51. package/dist/components/Avatar/index.cjs +1 -1
  52. package/dist/components/Avatar/index.js +1 -1
  53. package/dist/components/Board/index.cjs +1 -1
  54. package/dist/components/Board/index.js +1 -1
  55. package/dist/components/Choice/index.cjs +1 -1
  56. package/dist/components/Choice/index.js +1 -1
  57. package/dist/components/ColourField/index.cjs +1 -1
  58. package/dist/components/ColourField/index.js +1 -1
  59. package/dist/components/Drawer/index.cjs +1 -1
  60. package/dist/components/Drawer/index.js +1 -1
  61. package/dist/components/EditLayout/index.cjs +1 -1
  62. package/dist/components/EditLayout/index.js +1 -1
  63. package/dist/components/EntryPicker/index.cjs +1 -2
  64. package/dist/components/EntryPicker/index.d.cts.map +1 -1
  65. package/dist/components/EntryPicker/index.d.ts.map +1 -1
  66. package/dist/components/EntryPicker/index.js +1 -171
  67. package/dist/components/EntryPicker/limit.d.cts +8 -0
  68. package/dist/components/EntryPicker/limit.d.cts.map +1 -0
  69. package/dist/components/EntryPicker/limit.d.ts +8 -0
  70. package/dist/components/EntryPicker/limit.d.ts.map +1 -0
  71. package/dist/components/Field/context.d.cts +6 -0
  72. package/dist/components/Field/context.d.cts.map +1 -1
  73. package/dist/components/Field/context.d.ts +6 -0
  74. package/dist/components/Field/context.d.ts.map +1 -1
  75. package/dist/components/Field/frame.d.cts +1 -1
  76. package/dist/components/Field/frame.d.cts.map +1 -1
  77. package/dist/components/Field/frame.d.ts +1 -1
  78. package/dist/components/Field/frame.d.ts.map +1 -1
  79. package/dist/components/Field/group.d.cts +1 -1
  80. package/dist/components/Field/group.d.cts.map +1 -1
  81. package/dist/components/Field/group.d.ts +1 -1
  82. package/dist/components/Field/group.d.ts.map +1 -1
  83. package/dist/components/Field/header.d.cts +12 -0
  84. package/dist/components/Field/header.d.cts.map +1 -0
  85. package/dist/components/Field/header.d.ts +12 -0
  86. package/dist/components/Field/header.d.ts.map +1 -0
  87. package/dist/components/Field/index.cjs +1 -1
  88. package/dist/components/Field/index.cjs.map +1 -1
  89. package/dist/components/Field/index.d.cts +1 -1
  90. package/dist/components/Field/index.d.cts.map +1 -1
  91. package/dist/components/Field/index.d.ts +1 -1
  92. package/dist/components/Field/index.d.ts.map +1 -1
  93. package/dist/components/Field/index.js +1 -1
  94. package/dist/components/Field/index.js.map +1 -1
  95. package/dist/components/Field/limit-reading.d.cts +12 -0
  96. package/dist/components/Field/limit-reading.d.cts.map +1 -0
  97. package/dist/components/Field/limit-reading.d.ts +12 -0
  98. package/dist/components/Field/limit-reading.d.ts.map +1 -0
  99. package/dist/components/Field/limit.d.cts +8 -0
  100. package/dist/components/Field/limit.d.cts.map +1 -0
  101. package/dist/components/Field/limit.d.ts +8 -0
  102. package/dist/components/Field/limit.d.ts.map +1 -0
  103. package/dist/components/Field/style.css +77 -0
  104. package/dist/components/Field/types.d.cts +12 -1
  105. package/dist/components/Field/types.d.cts.map +1 -1
  106. package/dist/components/Field/types.d.ts +12 -1
  107. package/dist/components/Field/types.d.ts.map +1 -1
  108. package/dist/components/Field/useLimit.d.cts +18 -0
  109. package/dist/components/Field/useLimit.d.cts.map +1 -0
  110. package/dist/components/Field/useLimit.d.ts +18 -0
  111. package/dist/components/Field/useLimit.d.ts.map +1 -0
  112. package/dist/components/FormEditor/README.md +62 -0
  113. package/dist/components/FormEditor/control.d.cts.map +1 -1
  114. package/dist/components/FormEditor/control.d.ts.map +1 -1
  115. package/dist/components/FormEditor/index.cjs +1 -1
  116. package/dist/components/FormEditor/index.d.cts.map +1 -1
  117. package/dist/components/FormEditor/index.d.ts.map +1 -1
  118. package/dist/components/FormEditor/index.js +1 -1
  119. package/dist/components/FormEditor/model.d.cts +21 -8
  120. package/dist/components/FormEditor/model.d.cts.map +1 -1
  121. package/dist/components/FormEditor/model.d.ts +21 -8
  122. package/dist/components/FormEditor/model.d.ts.map +1 -1
  123. package/dist/components/Modal/index.cjs +1 -1
  124. package/dist/components/Modal/index.js +1 -1
  125. package/dist/components/Popover/index.cjs +1 -1
  126. package/dist/components/Popover/index.js +1 -1
  127. package/dist/components/RichTextEditor/index.cjs +1 -1
  128. package/dist/components/RichTextEditor/index.js +1 -1
  129. package/dist/components/SearchField/index.cjs +1 -1
  130. package/dist/components/SearchField/index.cjs.map +1 -1
  131. package/dist/components/SearchField/index.d.cts.map +1 -1
  132. package/dist/components/SearchField/index.d.ts.map +1 -1
  133. package/dist/components/SearchField/index.js +27 -22
  134. package/dist/components/SearchField/index.js.map +1 -1
  135. package/dist/components/SelectionCard/index.cjs +1 -1
  136. package/dist/components/SelectionCard/index.js +1 -1
  137. package/dist/components/SortableList/index.cjs +1 -1
  138. package/dist/components/SortableList/index.js +1 -1
  139. package/dist/components/TagsInput/index.cjs +1 -1
  140. package/dist/components/TagsInput/index.cjs.map +1 -1
  141. package/dist/components/TagsInput/index.d.cts.map +1 -1
  142. package/dist/components/TagsInput/index.d.ts.map +1 -1
  143. package/dist/components/TagsInput/index.js +36 -30
  144. package/dist/components/TagsInput/index.js.map +1 -1
  145. package/dist/components/TextField/index.cjs +1 -1
  146. package/dist/components/TextField/index.cjs.map +1 -1
  147. package/dist/components/TextField/index.d.cts.map +1 -1
  148. package/dist/components/TextField/index.d.ts.map +1 -1
  149. package/dist/components/TextField/index.js +35 -20
  150. package/dist/components/TextField/index.js.map +1 -1
  151. package/dist/components/Time/index.cjs +1 -1
  152. package/dist/components/Time/index.js +1 -1
  153. package/dist/index.cjs +1 -1
  154. package/dist/index.d.cts +1 -1
  155. package/dist/index.d.cts.map +1 -1
  156. package/dist/index.d.ts +1 -1
  157. package/dist/index.d.ts.map +1 -1
  158. package/dist/index.js +6 -6
  159. package/dist/internal/mergeRefs.d.cts +5 -1
  160. package/dist/internal/mergeRefs.d.cts.map +1 -1
  161. package/dist/internal/mergeRefs.d.ts +5 -1
  162. package/dist/internal/mergeRefs.d.ts.map +1 -1
  163. package/package.json +1 -1
  164. package/dist/chunks/FormEditor-BbsvbufQ.cjs +0 -2
  165. package/dist/chunks/FormEditor-BbsvbufQ.cjs.map +0 -1
  166. package/dist/chunks/FormEditor-C5XtP-N7.js.map +0 -1
  167. package/dist/chunks/frame-Bs_jaQRw.js +0 -70
  168. package/dist/chunks/frame-Bs_jaQRw.js.map +0 -1
  169. package/dist/chunks/frame-CNxvbg0D.cjs +0 -2
  170. package/dist/chunks/frame-CNxvbg0D.cjs.map +0 -1
  171. package/dist/chunks/group-CzbacuAY.js +0 -29
  172. package/dist/chunks/group-CzbacuAY.js.map +0 -1
  173. package/dist/chunks/group-pKDQtq-9.cjs +0 -2
  174. package/dist/chunks/group-pKDQtq-9.cjs.map +0 -1
  175. package/dist/chunks/mergeRefs-Bc3qS0Tt.cjs +0 -2
  176. package/dist/chunks/mergeRefs-Bc3qS0Tt.cjs.map +0 -1
  177. package/dist/chunks/mergeRefs-DGM402mE.js +0 -10
  178. package/dist/chunks/mergeRefs-DGM402mE.js.map +0 -1
  179. package/dist/components/EntryPicker/index.cjs.map +0 -1
  180. package/dist/components/EntryPicker/index.js.map +0 -1
@@ -1,27 +1,27 @@
1
1
  import { Button as e } from "../components/Button/index.js";
2
2
  import { Field as t } from "../components/Field/index.js";
3
3
  import { TextArea as n, TextField as r } from "../components/TextField/index.js";
4
- import { n as i, r as a, t as o } from "./RichTextEditor-DEJ-u-ZR.js";
4
+ import { n as i, r as a, t as o } from "./RichTextEditor-CNkwWist.js";
5
5
  import { Container as s } from "../components/Container/index.js";
6
- import { EntryPicker as c } from "../components/EntryPicker/index.js";
7
- import { NumberField as l } from "../components/NumberField/index.js";
8
- import { Select as u } from "../components/Select/index.js";
9
- import { Switch as d } from "../components/Switch/index.js";
10
- import { i as f } from "./colour-CYEF4Q_n.js";
11
- import { t as p } from "./ColourField-DXGpNP08.js";
12
- import { a as m, i as h, n as g, r as _, t as v } from "./Slider-vdMFLX-H.js";
13
- import { a as y, n as ee } from "./DatePicker-DJAqXUDJ.js";
14
- import { TagsInput as te } from "../components/TagsInput/index.js";
15
- import { Checkbox as b, ChoiceGroup as x, Radio as S } from "../components/Choice/index.js";
16
- import { CheckboxCard as C, RadioCard as w, SelectionCardGroup as ne } from "../components/SelectionCard/index.js";
6
+ import { n as c, t as l } from "./EntryPicker-CR8Phuzl.js";
7
+ import { NumberField as u } from "../components/NumberField/index.js";
8
+ import { Select as d } from "../components/Select/index.js";
9
+ import { Switch as f } from "../components/Switch/index.js";
10
+ import { i as p } from "./colour-CYEF4Q_n.js";
11
+ import { t as m } from "./ColourField-DC6cLb9h.js";
12
+ import { a as h, i as g, n as _, r as v, t as y } from "./Slider-vdMFLX-H.js";
13
+ import { a as b, n as x } from "./DatePicker-DJAqXUDJ.js";
14
+ import { TagsInput as S } from "../components/TagsInput/index.js";
15
+ import { Checkbox as C, ChoiceGroup as ee, Radio as te } from "../components/Choice/index.js";
16
+ import { CheckboxCard as ne, RadioCard as re, SelectionCardGroup as w } from "../components/SelectionCard/index.js";
17
17
  import { useMemo as T, useState as E } from "react";
18
18
  import { Fragment as D, jsx as O, jsxs as k } from "react/jsx-runtime";
19
19
  //#region src/components/RichTextEditor/expanded-width.ts
20
- var A = ["wide", "full"], j = [
20
+ var ie = ["wide", "full"], ae = [
21
21
  "sm",
22
22
  "md",
23
23
  "lg"
24
- ], M = /* @__PURE__ */ new Set([
24
+ ], oe = /* @__PURE__ */ new Set([
25
25
  "shortText",
26
26
  "longText",
27
27
  "richText",
@@ -40,28 +40,73 @@ var A = ["wide", "full"], j = [
40
40
  "date",
41
41
  "divider"
42
42
  ]);
43
- function N(e) {
43
+ function A(e) {
44
44
  let t = /* @__PURE__ */ new Set();
45
45
  for (let n of e.fields) {
46
46
  if (!n.id?.trim() || t.has(n.id)) throw Error("Form field IDs must be nonempty and unique.");
47
- if (!M.has(n.type)) throw Error(`Unsupported form field type: ${n.type}`);
48
- (n.type === "select" || n.type === "radioGroup" || n.type === "checkboxGroup") && ie(n), (n.type === "slider" || n.type === "rangeSlider") && re(n), n.type !== "divider" && P(n), t.add(n.id);
47
+ if (!oe.has(n.type)) throw Error(`Unsupported form field type: ${n.type}`);
48
+ (n.type === "select" || n.type === "radioGroup" || n.type === "checkboxGroup") && I(n), (n.type === "slider" || n.type === "rangeSlider") && F(n), n.type !== "divider" && (P(n), ce(n)), t.add(n.id);
49
49
  }
50
50
  }
51
+ var se = /* @__PURE__ */ new Set([
52
+ "shortText",
53
+ "longText",
54
+ "tags",
55
+ "asset",
56
+ "reference"
57
+ ]);
58
+ function j(e) {
59
+ return se.has(e.type);
60
+ }
61
+ function ce(e) {
62
+ if (j(e)) {
63
+ if (e.limitDisplay !== void 0 && !["used", "remaining"].includes(e.limitDisplay)) throw Error(`Field ${e.id} needs a limitDisplay of used or remaining.`);
64
+ if (e.limitVisibility !== void 0 && !["always", "nearLimit"].includes(e.limitVisibility)) throw Error(`Field ${e.id} needs a limitVisibility of always or nearLimit.`);
65
+ if (e.showLimitRing !== void 0 && typeof e.showLimitRing != "boolean") throw Error(`Field ${e.id} needs a boolean showLimitRing.`);
66
+ }
67
+ }
68
+ function le(e, t, n) {
69
+ return j(e) ? {
70
+ limitDisplay: e.limitDisplay,
71
+ limitVisibility: e.limitVisibility,
72
+ showLimitRing: e.showLimitRing,
73
+ limit: ue(e, t, n ?? [])
74
+ } : {};
75
+ }
76
+ function ue(e, t, n) {
77
+ switch (e.type) {
78
+ case "shortText":
79
+ case "longText": return e.maxLength === void 0 ? void 0 : {
80
+ count: M(t).length,
81
+ max: e.maxLength
82
+ };
83
+ case "tags": return e.max === void 0 ? void 0 : {
84
+ count: q(t).length,
85
+ max: e.max
86
+ };
87
+ default: return c(N(e), n.length, z(e).max);
88
+ }
89
+ }
90
+ function M(e) {
91
+ return typeof e == "string" ? e : "";
92
+ }
93
+ function N(e) {
94
+ return e.multiple ? "multiple" : "single";
95
+ }
51
96
  function P(e) {
52
- if (e.width !== void 0 && !j.includes(e.width)) throw Error(`Field ${e.id} needs a width of sm, md or lg.`);
53
- if (e.type === "richText" && e.expandedWidth !== void 0 && !A.includes(e.expandedWidth)) throw Error(`Rich text field ${e.id} needs an expandedWidth of wide or full.`);
97
+ if (e.width !== void 0 && !ae.includes(e.width)) throw Error(`Field ${e.id} needs a width of sm, md or lg.`);
98
+ if (e.type === "richText" && e.expandedWidth !== void 0 && !ie.includes(e.expandedWidth)) throw Error(`Rich text field ${e.id} needs an expandedWidth of wide or full.`);
54
99
  }
55
- function re(e) {
56
- let { min: t, max: n, step: r } = m(e);
100
+ function F(e) {
101
+ let { min: t, max: n, step: r } = h(e);
57
102
  if (![
58
103
  t,
59
104
  n,
60
105
  r
61
106
  ].every(Number.isFinite) || t >= n || r <= 0) throw Error(`Slider field ${e.id} needs finite min < max and a positive step.`);
62
- if (e.type === "rangeSlider" && r > h(n, -t)) throw Error(`Range slider ${e.id} needs room for at least one step.`);
107
+ if (e.type === "rangeSlider" && r > g(n, -t)) throw Error(`Range slider ${e.id} needs room for at least one step.`);
63
108
  }
64
- function ie(e) {
109
+ function I(e) {
65
110
  if (!Array.isArray(e.options)) {
66
111
  let t = e.type === "select" ? "Select" : "Choice";
67
112
  throw Error(`${t} field ${e.id} needs an options array.`);
@@ -70,7 +115,7 @@ function ie(e) {
70
115
  let t = e.options.map((e) => e.value);
71
116
  if (t.some((e) => typeof e != "string" || !e.trim()) || new Set(t).size !== t.length) throw Error(`Choice field ${e.id} needs nonempty, unique option values.`);
72
117
  }
73
- var F = {
118
+ var L = {
74
119
  asset: {
75
120
  key: "assetId",
76
121
  itemLabel: "asset",
@@ -82,11 +127,11 @@ var F = {
82
127
  itemsLabel: "entries"
83
128
  }
84
129
  };
85
- function I(e) {
130
+ function R(e) {
86
131
  return e.type === "asset" || e.type === "reference" ? e.picker?.label ?? e.label : e.label;
87
132
  }
88
- function L(e) {
89
- let t = F[e.type], { addLabel: n = `Choose ${I(e)}`, emptyLabel: r, itemLabel: i = t.itemLabel, itemsLabel: a = t.itemsLabel, max: o, isReorderable: s } = e.picker ?? {};
133
+ function z(e) {
134
+ let t = L[e.type], { addLabel: n = `Choose ${R(e)}`, emptyLabel: r, itemLabel: i = t.itemLabel, itemsLabel: a = t.itemsLabel, max: o, isReorderable: s } = e.picker ?? {};
90
135
  return {
91
136
  addLabel: n,
92
137
  emptyLabel: r,
@@ -96,69 +141,69 @@ function L(e) {
96
141
  isReorderable: s
97
142
  };
98
143
  }
99
- function R(e, t) {
100
- let { key: n } = F[e.type];
101
- return (Array.isArray(t) ? t : t === void 0 ? [] : [t]).flatMap((e) => B(e, n) ? [e[n]] : []);
144
+ function B(e, t) {
145
+ let { key: n } = L[e.type];
146
+ return (Array.isArray(t) ? t : t === void 0 ? [] : [t]).flatMap((e) => H(e, n) ? [e[n]] : []);
102
147
  }
103
- function z(e) {
148
+ function V(e) {
104
149
  if (typeof e != "string") return;
105
150
  let t = /^(\d{4}-\d{2}-\d{2}T\d{2}:\d{2})(?::(\d{2})(?:\.(\d{1,3}))?)?(?:Z|\+00:00)$/.exec(e);
106
151
  if (!t) return;
107
152
  let n = `${t[1]}:${t[2] ?? "00"}.${(t[3] ?? "").padEnd(3, "0")}Z`, r = new Date(n);
108
153
  if (Number.isFinite(r.getTime()) && r.toISOString() === n) return n;
109
154
  }
110
- function B(e, t) {
155
+ function H(e, t) {
111
156
  return !!e && typeof e == "object" && t in e && typeof e[t] == "string" && e[t].trim().length > 0;
112
157
  }
113
- function V(e) {
114
- return !!e.text?.trim() || e.type === "horizontalRule" || !!e.content?.some(V);
158
+ function U(e) {
159
+ return !!e.text?.trim() || e.type === "horizontalRule" || !!e.content?.some(U);
115
160
  }
116
- function H(e) {
117
- return `${I(e)} is required.`;
161
+ function W(e) {
162
+ return `${R(e)} is required.`;
118
163
  }
119
- function U(e, t) {
164
+ function G(e, t) {
120
165
  if (typeof t != "string") return "Enter text.";
121
- if (e.required && !t.trim()) return H(e);
166
+ if (e.required && !t.trim()) return W(e);
122
167
  if ((e.type === "shortText" || e.type === "longText") && e.maxLength !== void 0 && t.length > e.maxLength) return `Enter no more than ${e.maxLength} characters.`;
123
168
  }
124
- function W(e, t) {
169
+ function de(e, t) {
125
170
  let n = i(t);
126
171
  if (n) return n;
127
- if (e.required && !V(t)) return H(e);
172
+ if (e.required && !U(t)) return W(e);
128
173
  }
129
- function G(e, t) {
174
+ function K(e, t) {
130
175
  if (typeof t != "string") return "Choose an available option.";
131
- if (t === "") return e.required ? H(e) : void 0;
176
+ if (t === "") return e.required ? W(e) : void 0;
132
177
  if ((e.type === "select" || e.type === "radioGroup") && e.options.length > 0 && !e.options.some((e) => e.value === t)) return "Choose an available option.";
133
178
  }
134
- function K(e) {
179
+ function q(e) {
135
180
  return Array.isArray(e) ? e.filter((e) => typeof e == "string") : [];
136
181
  }
137
- function q(e, t) {
182
+ function J(e, t) {
138
183
  if (!Array.isArray(t) || !t.every((e) => typeof e == "string" && e.trim()) || new Set(t).size !== t.length) return "Enter a list of unique, nonempty text values.";
139
- if (e.required && !t.length) return H(e);
184
+ if (e.required && !t.length) return W(e);
140
185
  if (e.type === "tags" && e.max !== void 0 && t.length > e.max) return `Enter no more than ${e.max} tags.`;
141
186
  if (e.type === "checkboxGroup" && e.options.length && t.some((t) => !e.options.some((e) => e.value === t))) return "Choose available options.";
142
187
  }
143
- function J(e, t) {
188
+ function Y(e, t) {
144
189
  if (typeof t != "number" || !Number.isFinite(t)) return "Enter a finite number.";
145
- let { min: n, max: r } = e.type === "slider" || e.type === "rangeSlider" ? m(e) : e.type === "number" ? e : {};
190
+ let { min: n, max: r } = e.type === "slider" || e.type === "rangeSlider" ? h(e) : e.type === "number" ? e : {};
146
191
  if (n !== void 0 && t < n) return `Enter a number of at least ${n}.`;
147
192
  if (r !== void 0 && t > r) return `Enter a number no greater than ${r}.`;
148
193
  }
149
- function Y(e, t) {
194
+ function fe(e, t) {
150
195
  if (typeof t != "string") return "Enter a valid calendar date (YYYY-MM-DD).";
151
- if (!t) return e.required ? H(e) : void 0;
152
- if (!y(t)) return "Enter a valid calendar date (YYYY-MM-DD).";
196
+ if (!t) return e.required ? W(e) : void 0;
197
+ if (!b(t)) return "Enter a valid calendar date (YYYY-MM-DD).";
153
198
  if (e.type === "date") {
154
199
  if (e.min && t < e.min) return `Choose a date on or after ${e.min}.`;
155
200
  if (e.max && t > e.max) return `Choose a date on or before ${e.max}.`;
156
201
  }
157
202
  }
158
203
  function X(e, t) {
159
- return typeof e == "number" && Number.isFinite(e) ? _(e, t) : void 0;
204
+ return typeof e == "number" && Number.isFinite(e) ? v(e, t) : void 0;
160
205
  }
161
- function Z(e, t) {
206
+ function pe(e, t) {
162
207
  let n = e, r = X(n?.min, t), i = X(n?.max, t);
163
208
  if (r === void 0 && i === void 0) return;
164
209
  let [a, o] = [r ?? t.min, i ?? t.max].sort((e, t) => e - t);
@@ -167,56 +212,56 @@ function Z(e, t) {
167
212
  max: o
168
213
  };
169
214
  }
170
- function ae(e, t) {
215
+ function me(e, t) {
171
216
  if (!t || typeof t != "object" || Array.isArray(t)) return "Enter a range.";
172
- let n = t, r = n.min, i = n.max, a = J(e, r) ?? J(e, i);
217
+ let n = t, r = n.min, i = n.max, a = Y(e, r) ?? Y(e, i);
173
218
  if (a) return a;
174
219
  if (r > i) return "The start must not be greater than the end.";
175
- if (e.type === "rangeSlider" && h(i, -r) < m(e).step) return "Keep the range endpoints at least one step apart.";
220
+ if (e.type === "rangeSlider" && g(i, -r) < h(e).step) return "Keep the range endpoints at least one step apart.";
176
221
  }
177
- function oe(e, t) {
178
- return typeof t == "string" ? t.trim() ? f(t) ? void 0 : "Enter a valid colour." : e.required ? H(e) : void 0 : "Enter a valid colour.";
222
+ function he(e, t) {
223
+ return typeof t == "string" ? t.trim() ? p(t) ? void 0 : "Enter a valid colour." : e.required ? W(e) : void 0 : "Enter a valid colour.";
179
224
  }
180
- function Q(e, t) {
225
+ function Z(e, t) {
181
226
  if (e.type !== "asset" && e.type !== "reference") return;
182
- let { key: n, itemLabel: r, itemsLabel: i } = F[e.type];
183
- if (!e.multiple) return B(t, n) ? void 0 : `Choose an ${r}.`;
184
- if (!Array.isArray(t) || !t.every((e) => B(e, n))) return `Choose a list of ${i}.`;
185
- if (e.required && t.length === 0) return H(e);
227
+ let { key: n, itemLabel: r, itemsLabel: i } = L[e.type];
228
+ if (!e.multiple) return H(t, n) ? void 0 : `Choose an ${r}.`;
229
+ if (!Array.isArray(t) || !t.every((e) => H(e, n))) return `Choose a list of ${i}.`;
230
+ if (e.required && t.length === 0) return W(e);
186
231
  let a = e.picker?.max;
187
- if (a !== void 0 && t.length > a) return `Choose no more than ${a} ${L(e).itemsLabel}.`;
188
- }
189
- var se = {
190
- shortText: U,
191
- longText: U,
192
- richText: W,
193
- number: J,
194
- slider: J,
195
- rangeSlider: ae,
196
- date: Y,
197
- colour: oe,
198
- radioGroup: G,
199
- checkboxGroup: q,
200
- tags: q,
232
+ if (a !== void 0 && t.length > a) return `Choose no more than ${a} ${z(e).itemsLabel}.`;
233
+ }
234
+ var ge = {
235
+ shortText: G,
236
+ longText: G,
237
+ richText: de,
238
+ number: Y,
239
+ slider: Y,
240
+ rangeSlider: me,
241
+ date: fe,
242
+ colour: he,
243
+ radioGroup: K,
244
+ checkboxGroup: J,
245
+ tags: J,
201
246
  boolean: (e, t) => typeof t == "boolean" ? void 0 : "Choose a boolean value.",
202
- dateTime: (e, t) => z(t) ? void 0 : "Enter a valid UTC date and time.",
203
- select: G,
204
- asset: Q,
205
- reference: Q
247
+ dateTime: (e, t) => V(t) ? void 0 : "Enter a valid UTC date and time.",
248
+ select: K,
249
+ asset: Z,
250
+ reference: Z
206
251
  };
207
- function $(e, t) {
208
- return t === void 0 ? e.required ? H(e) : void 0 : se[e.type](e, t);
252
+ function Q(e, t) {
253
+ return t === void 0 ? e.required ? W(e) : void 0 : ge[e.type](e, t);
209
254
  }
210
- function ce(e, t) {
211
- return N(e), Object.fromEntries(e.fields.flatMap((e) => {
255
+ function _e(e, t) {
256
+ return A(e), Object.fromEntries(e.fields.flatMap((e) => {
212
257
  if (e.type === "divider") return [];
213
- let n = $(e, Object.hasOwn(t, e.id) ? t[e.id] : void 0);
258
+ let n = Q(e, Object.hasOwn(t, e.id) ? t[e.id] : void 0);
214
259
  return n ? [[e.id, n]] : [];
215
260
  }));
216
261
  }
217
262
  //#endregion
218
263
  //#region src/components/FormEditor/choice-control.tsx
219
- function le({ field: e, option: t, name: n, checked: r, isDisabled: i, invalid: a, onChange: o }) {
264
+ function ve({ field: e, option: t, name: n, checked: r, isDisabled: i, invalid: a, onChange: o }) {
220
265
  let s = {
221
266
  name: n,
222
267
  value: t.value,
@@ -228,14 +273,14 @@ function le({ field: e, option: t, name: n, checked: r, isDisabled: i, invalid:
228
273
  }
229
274
  };
230
275
  if (e.appearance === "card") {
231
- let n = e.type === "radioGroup" ? w : C;
276
+ let n = e.type === "radioGroup" ? re : ne;
232
277
  return /* @__PURE__ */ O(n, {
233
278
  ...s,
234
279
  title: t.label,
235
280
  description: t.description
236
281
  });
237
282
  }
238
- let c = e.type === "radioGroup" ? S : b;
283
+ let c = e.type === "radioGroup" ? te : C;
239
284
  return /* @__PURE__ */ O(c, {
240
285
  ...s,
241
286
  children: /* @__PURE__ */ k("span", { children: [t.label, t.description && /* @__PURE__ */ O("span", {
@@ -244,13 +289,13 @@ function le({ field: e, option: t, name: n, checked: r, isDisabled: i, invalid:
244
289
  })] })
245
290
  });
246
291
  }
247
- function ue({ field: t, stored: n, isDisabled: r, required: i, accessibility: a, onChange: o }) {
248
- let s = t.type === "checkboxGroup", c = s ? K(n) : typeof n == "string" && n ? [n] : [], l = t.appearance === "card" ? ne : x;
292
+ function ye({ field: t, stored: n, isDisabled: r, required: i, accessibility: a, onChange: o }) {
293
+ let s = t.type === "checkboxGroup", c = s ? q(n) : typeof n == "string" && n ? [n] : [], l = t.appearance === "card" ? w : ee;
249
294
  return /* @__PURE__ */ k(D, { children: [/* @__PURE__ */ O(l, {
250
295
  ...a,
251
296
  label: t.label,
252
297
  columns: t.columns ?? (t.appearance === "card" ? 2 : 1),
253
- children: t.options.map((e) => /* @__PURE__ */ O(le, {
298
+ children: t.options.map((e) => /* @__PURE__ */ O(ve, {
254
299
  field: t,
255
300
  option: e,
256
301
  name: a.id,
@@ -271,9 +316,9 @@ function ue({ field: t, stored: n, isDisabled: r, required: i, accessibility: a,
271
316
  }
272
317
  //#endregion
273
318
  //#region src/components/FormEditor/additional-control.tsx
274
- function de({ field: e, stored: t, isDisabled: n, accessibility: r, onChange: i }) {
275
- let a = m(e), o = X(t, a);
276
- return /* @__PURE__ */ O(g, {
319
+ function be({ field: e, stored: t, isDisabled: n, accessibility: r, onChange: i }) {
320
+ let a = h(e), o = X(t, a);
321
+ return /* @__PURE__ */ O(_, {
277
322
  ...r,
278
323
  ...a,
279
324
  prefix: e.prefix,
@@ -289,9 +334,9 @@ function de({ field: e, stored: t, isDisabled: n, accessibility: r, onChange: i
289
334
  }
290
335
  });
291
336
  }
292
- function fe({ field: e, stored: t, isDisabled: n, accessibility: r, onChange: i }) {
293
- let a = m(e), o = Z(t, a);
294
- return /* @__PURE__ */ O(v, {
337
+ function $({ field: e, stored: t, isDisabled: n, accessibility: r, onChange: i }) {
338
+ let a = h(e), o = pe(t, a);
339
+ return /* @__PURE__ */ O(y, {
295
340
  ...r,
296
341
  ...a,
297
342
  prefix: e.prefix,
@@ -312,7 +357,7 @@ function fe({ field: e, stored: t, isDisabled: n, accessibility: r, onChange: i
312
357
  }
313
358
  });
314
359
  }
315
- function pe({ field: e, stored: t, isDisabled: n, required: r, accessibility: i, onChange: a }) {
360
+ function xe({ field: e, stored: t, isDisabled: n, required: r, accessibility: i, onChange: a }) {
316
361
  let o = {
317
362
  stored: t,
318
363
  isDisabled: n,
@@ -322,19 +367,19 @@ function pe({ field: e, stored: t, isDisabled: n, required: r, accessibility: i,
322
367
  };
323
368
  switch (e.type) {
324
369
  case "radioGroup":
325
- case "checkboxGroup": return /* @__PURE__ */ O(ue, {
370
+ case "checkboxGroup": return /* @__PURE__ */ O(ye, {
326
371
  field: e,
327
372
  ...o
328
373
  });
329
- case "rangeSlider": return /* @__PURE__ */ O(fe, {
374
+ case "rangeSlider": return /* @__PURE__ */ O($, {
330
375
  field: e,
331
376
  ...o
332
377
  });
333
- case "slider": return /* @__PURE__ */ O(de, {
378
+ case "slider": return /* @__PURE__ */ O(be, {
334
379
  field: e,
335
380
  ...o
336
381
  });
337
- case "colour": return /* @__PURE__ */ O(p, {
382
+ case "colour": return /* @__PURE__ */ O(m, {
338
383
  ...i,
339
384
  required: r,
340
385
  placeholder: e.placeholder,
@@ -348,20 +393,20 @@ function pe({ field: e, stored: t, isDisabled: n, required: r, accessibility: i,
348
393
  value: typeof t == "string" ? t : "",
349
394
  onInput: (e) => {
350
395
  let t = e.currentTarget.value;
351
- t.trim() && !f(t) && a(t);
396
+ t.trim() && !p(t) && a(t);
352
397
  },
353
398
  onValueChange: (e) => a(e === "" ? void 0 : e)
354
399
  });
355
- case "tags": return /* @__PURE__ */ O(te, {
400
+ case "tags": return /* @__PURE__ */ O(S, {
356
401
  ...i,
357
402
  required: r,
358
403
  placeholder: e.placeholder,
359
404
  max: e.max,
360
405
  isDisabled: n,
361
- value: K(t),
406
+ value: q(t),
362
407
  onValueChange: a
363
408
  });
364
- case "date": return /* @__PURE__ */ O(ee, {
409
+ case "date": return /* @__PURE__ */ O(x, {
365
410
  ...i,
366
411
  placeholder: e.placeholder,
367
412
  min: e.min,
@@ -377,7 +422,7 @@ function pe({ field: e, stored: t, isDisabled: n, required: r, accessibility: i,
377
422
  }
378
423
  //#endregion
379
424
  //#region src/components/FormEditor/control.tsx
380
- function me(e, t) {
425
+ function Se(e, t) {
381
426
  if (e.type === "asset") {
382
427
  let n = t.map((e) => ({ assetId: e }));
383
428
  return e.multiple ? n : n[0];
@@ -385,8 +430,8 @@ function me(e, t) {
385
430
  let n = t.map((e) => ({ entryId: e }));
386
431
  return e.multiple ? n : n[0];
387
432
  }
388
- function he({ field: e, stored: t, isDisabled: n, required: r, accessibility: i, onChange: a }) {
389
- return /* @__PURE__ */ O(l, {
433
+ function Ce({ field: e, stored: t, isDisabled: n, required: r, accessibility: i, onChange: a }) {
434
+ return /* @__PURE__ */ O(u, {
390
435
  ...i,
391
436
  required: r,
392
437
  isDisabled: n,
@@ -406,9 +451,9 @@ function he({ field: e, stored: t, isDisabled: n, required: r, accessibility: i,
406
451
  }
407
452
  });
408
453
  }
409
- function ge({ field: e, stored: t, isDisabled: n, required: r, accessibility: i, onChange: a }) {
454
+ function we({ field: e, stored: t, isDisabled: n, required: r, accessibility: i, onChange: a }) {
410
455
  let o = !r && !e.options.some((e) => e.value === "");
411
- return /* @__PURE__ */ O(u, {
456
+ return /* @__PURE__ */ O(d, {
412
457
  ...i,
413
458
  "aria-required": r || void 0,
414
459
  isDisabled: n,
@@ -423,24 +468,24 @@ function ge({ field: e, stored: t, isDisabled: n, required: r, accessibility: i,
423
468
  onValueChange: (e) => a(e === "" ? void 0 : e)
424
469
  });
425
470
  }
426
- function _e({ field: e, selected: t, items: n, isDisabled: r, accessibility: i, onChange: a }) {
427
- return /* @__PURE__ */ O(c, {
471
+ function Te({ field: e, selected: t, items: n, isDisabled: r, accessibility: i, onChange: a }) {
472
+ return /* @__PURE__ */ O(l, {
428
473
  ...i,
429
474
  items: n,
430
475
  value: t,
431
- ...L(e),
432
- mode: e.multiple ? "multiple" : "single",
476
+ ...z(e),
477
+ mode: N(e),
433
478
  isDisabled: r,
434
- onValueChange: (t) => a(me(e, t))
479
+ onValueChange: (t) => a(Se(e, t))
435
480
  });
436
481
  }
437
- function ve({ field: e, stored: t, selected: i, items: s, isDisabled: c, accessibility: { required: l, ...u }, onChange: f }) {
482
+ function Ee({ field: e, stored: t, selected: i, items: s, isDisabled: c, accessibility: { required: l, ...u }, onChange: d }) {
438
483
  let p = {
439
484
  stored: t,
440
485
  isDisabled: c,
441
486
  required: l,
442
487
  accessibility: u,
443
- onChange: f
488
+ onChange: d
444
489
  };
445
490
  switch (e.type) {
446
491
  case "shortText": return /* @__PURE__ */ O(r, {
@@ -452,8 +497,8 @@ function ve({ field: e, stored: t, selected: i, items: s, isDisabled: c, accessi
452
497
  maxLength: e.maxLength,
453
498
  readOnly: e.readOnly,
454
499
  autoFocus: e.autoFocus,
455
- value: typeof t == "string" ? t : "",
456
- onChange: (e) => f(e.target.value)
500
+ value: M(t),
501
+ onChange: (e) => d(e.target.value)
457
502
  });
458
503
  case "longText": return /* @__PURE__ */ O(n, {
459
504
  ...u,
@@ -464,19 +509,19 @@ function ve({ field: e, stored: t, selected: i, items: s, isDisabled: c, accessi
464
509
  maxLength: e.maxLength,
465
510
  readOnly: e.readOnly,
466
511
  autoFocus: e.autoFocus,
467
- value: typeof t == "string" ? t : "",
468
- onChange: (e) => f(e.target.value)
512
+ value: M(t),
513
+ onChange: (e) => d(e.target.value)
469
514
  });
470
- case "number": return /* @__PURE__ */ O(he, {
515
+ case "number": return /* @__PURE__ */ O(Ce, {
471
516
  field: e,
472
517
  ...p
473
518
  });
474
- case "boolean": return /* @__PURE__ */ O(d, {
519
+ case "boolean": return /* @__PURE__ */ O(f, {
475
520
  ...u,
476
521
  isDisabled: c,
477
522
  autoFocus: e.autoFocus,
478
523
  isSelected: t === !0,
479
- onSelectedChange: f
524
+ onSelectedChange: d
480
525
  });
481
526
  case "dateTime": return /* @__PURE__ */ O(r, {
482
527
  ...u,
@@ -485,8 +530,8 @@ function ve({ field: e, stored: t, selected: i, items: s, isDisabled: c, accessi
485
530
  type: "datetime-local",
486
531
  step: "0.001",
487
532
  autoFocus: e.autoFocus,
488
- value: z(t)?.slice(0, -1) ?? "",
489
- onChange: (e) => f(z(`${e.target.value}Z`))
533
+ value: V(t)?.slice(0, -1) ?? "",
534
+ onChange: (e) => d(V(`${e.target.value}Z`))
490
535
  });
491
536
  case "richText": return /* @__PURE__ */ O(o, {
492
537
  ...u,
@@ -497,20 +542,20 @@ function ve({ field: e, stored: t, selected: i, items: s, isDisabled: c, accessi
497
542
  placeholder: e.placeholder,
498
543
  format: "json",
499
544
  value: t === void 0 ? a : t,
500
- onChange: f
545
+ onChange: d
501
546
  });
502
- case "select": return /* @__PURE__ */ O(ge, {
547
+ case "select": return /* @__PURE__ */ O(we, {
503
548
  field: e,
504
549
  ...p
505
550
  });
506
551
  case "asset":
507
- case "reference": return /* @__PURE__ */ O(_e, {
552
+ case "reference": return /* @__PURE__ */ O(Te, {
508
553
  field: e,
509
554
  items: s,
510
555
  selected: i ?? [],
511
556
  ...p
512
557
  });
513
- default: return /* @__PURE__ */ O(pe, {
558
+ default: return /* @__PURE__ */ O(xe, {
514
559
  field: e,
515
560
  ...p
516
561
  });
@@ -518,26 +563,27 @@ function ve({ field: e, stored: t, selected: i, items: s, isDisabled: c, accessi
518
563
  }
519
564
  //#endregion
520
565
  //#region src/components/FormEditor/index.tsx
521
- function ye({ field: e, stored: n, items: r, isDisabled: i, error: a, isErrorVisible: o, onChange: c }) {
522
- let l = T(() => a === void 0 && o ? $(e, n) : void 0, [
566
+ function De({ field: e, stored: n, items: r, isDisabled: i, error: a, isErrorVisible: o, onChange: c }) {
567
+ let l = T(() => a === void 0 && o ? Q(e, n) : void 0, [
523
568
  a,
524
569
  o,
525
570
  e,
526
571
  n
527
- ]), u = T(() => e.type === "asset" || e.type === "reference" ? R(e, n) : void 0, [e, n]);
572
+ ]), u = T(() => e.type === "asset" || e.type === "reference" ? B(e, n) : void 0, [e, n]);
528
573
  return /* @__PURE__ */ O(s, {
529
574
  width: e.width,
530
575
  padded: !1,
531
576
  center: !1,
532
577
  className: "ds-form-editor__field",
533
578
  children: /* @__PURE__ */ O(t, {
534
- label: e.type === "dateTime" ? `${e.label} (UTC)` : I(e),
579
+ ...le(e, n, u),
580
+ label: e.type === "dateTime" ? `${e.label} (UTC)` : R(e),
535
581
  hint: e.hint,
536
582
  error: a ?? l,
537
583
  isRequired: e.required,
538
- count: u?.length ?? (e.type === "checkboxGroup" ? K(n).length : void 0),
539
- isGroup: u !== void 0 || be.has(e.type),
540
- children: (t) => /* @__PURE__ */ O(ve, {
584
+ count: u?.length ?? (e.type === "checkboxGroup" ? q(n).length : void 0),
585
+ isGroup: u !== void 0 || Oe.has(e.type),
586
+ children: (t) => /* @__PURE__ */ O(Ee, {
541
587
  field: e,
542
588
  stored: n,
543
589
  selected: u,
@@ -549,19 +595,19 @@ function ye({ field: e, stored: n, items: r, isDisabled: i, error: a, isErrorVis
549
595
  })
550
596
  });
551
597
  }
552
- var be = /* @__PURE__ */ new Set([
598
+ var Oe = /* @__PURE__ */ new Set([
553
599
  "radioGroup",
554
600
  "checkboxGroup",
555
601
  "rangeSlider"
556
- ]), xe = /* @__PURE__ */ new Set([
602
+ ]), ke = /* @__PURE__ */ new Set([
557
603
  "slider",
558
604
  "rangeSlider",
559
605
  "date",
560
606
  "colour"
561
607
  ]);
562
- function Se({ schema: e, value: t, defaultValue: n = {}, onValueChange: r, pickerItems: i = {}, errors: a = {}, isDisabled: o = !1, showAllErrors: s = !1, columns: c = 1, minColumnWidth: l = "16rem", className: u, style: d, ...f }) {
608
+ function Ae({ schema: e, value: t, defaultValue: n = {}, onValueChange: r, pickerItems: i = {}, errors: a = {}, isDisabled: o = !1, showAllErrors: s = !1, columns: c = 1, minColumnWidth: l = "16rem", className: u, style: d, ...f }) {
563
609
  let [p, m] = E(n), [h, g] = E(() => /* @__PURE__ */ new Set()), _ = t ?? p;
564
- T(() => N(e), [e]);
610
+ T(() => A(e), [e]);
565
611
  let v = (e, n) => {
566
612
  let i = { ..._ };
567
613
  n === void 0 ? delete i[e] : i[e] = n, t === void 0 && m(i), g((t) => new Set(t).add(e)), r?.(i, { fieldId: e });
@@ -582,8 +628,8 @@ function Se({ schema: e, value: t, defaultValue: n = {}, onValueChange: r, picke
582
628
  ...f,
583
629
  children: e.fields.map((e) => {
584
630
  if (e.type === "divider") return /* @__PURE__ */ O("hr", { className: "ds-form-editor__divider" }, e.id);
585
- let t = Object.hasOwn(_, e.id) ? _[e.id] : void 0, n = o || !!e.isDisabled, r = n || "readOnly" in e && !!e.readOnly, c = typeof t == "string" ? t.trim() !== "" : t !== void 0, l = s || h.has(e.id) || c && xe.has(e.type) || e.type === "number" && typeof t == "number";
586
- return /* @__PURE__ */ O(ye, {
631
+ let t = Object.hasOwn(_, e.id) ? _[e.id] : void 0, n = o || !!e.isDisabled, r = n || "readOnly" in e && !!e.readOnly, c = typeof t == "string" ? t.trim() !== "" : t !== void 0, l = s || h.has(e.id) || c && ke.has(e.type) || e.type === "number" && typeof t == "number";
632
+ return /* @__PURE__ */ O(De, {
587
633
  field: e,
588
634
  stored: t,
589
635
  items: i[e.id] ?? [],
@@ -598,6 +644,6 @@ function Se({ schema: e, value: t, defaultValue: n = {}, onValueChange: r, picke
598
644
  });
599
645
  }
600
646
  //#endregion
601
- export { ce as n, Se as t };
647
+ export { _e as n, Ae as t };
602
648
 
603
- //# sourceMappingURL=FormEditor-C5XtP-N7.js.map
649
+ //# sourceMappingURL=FormEditor-BSfxVqLn.js.map