@texaryn/solid 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,19 +1,19 @@
1
- import { createFormRuntime as pe, objectChildKey as re, createRendererRegistry as ve, createFailedSubmitTracker as $e, visibleErrorLabel as be, visibleErrorMessages as _e, englishMessages as we } from "@texaryn/core";
2
- import { createSignal as z, createEffect as V, onCleanup as K, createContext as se, useContext as ce, createMemo as b, Show as x, For as E, Switch as xe, Match as j, createUniqueId as Te } from "solid-js";
3
- import { createComponent as i, Dynamic as ue, memo as O, delegateEvents as G, use as de, insert as l, setAttribute as k, effect as A, template as y, spread as L, mergeProps as U } from "solid-js/web";
1
+ import { createFormRuntime as pe, visibleFieldLabel as ve, objectChildKey as re, createRendererRegistry as $e, createFailedSubmitTracker as be, visibleErrorLabel as _e, visibleErrorMessages as we, englishMessages as xe } from "@texaryn/core";
2
+ import { createSignal as z, createEffect as q, onCleanup as K, createContext as le, useContext as ce, createMemo as b, Show as x, For as E, Switch as Te, Match as j, createUniqueId as Ie } from "solid-js";
3
+ import { createComponent as a, Dynamic as ue, memo as C, delegateEvents as G, use as de, insert as c, setAttribute as k, effect as A, template as $, spread as L, mergeProps as U } from "solid-js/web";
4
4
  function ht(t, e) {
5
5
  return pe(t, e);
6
6
  }
7
- function M(t) {
7
+ function V(t) {
8
8
  const [e, n] = z(t().getSnapshot(), { equals: !1 });
9
- return V(() => {
10
- const a = t();
11
- n(() => a.getSnapshot()), K(a.subscribe(() => n(() => a.getSnapshot())));
9
+ return q(() => {
10
+ const o = t();
11
+ n(() => o.getSnapshot()), K(o.subscribe(() => n(() => o.getSnapshot())));
12
12
  }), e;
13
13
  }
14
- const me = se();
15
- function q() {
16
- const t = ce(me);
14
+ const ge = le();
15
+ function F() {
16
+ const t = ce(ge);
17
17
  if (!t) throw new Error("Solid form widgets must be rendered below FormRoot");
18
18
  return t;
19
19
  }
@@ -21,41 +21,44 @@ const ne = [];
21
21
  function W(t, e, n) {
22
22
  return `${t}-${e}-${n}`;
23
23
  }
24
- function ge(t) {
25
- const e = q(), n = b(() => {
26
- const m = e.document().nodes[t()];
27
- return m?.type === "field" ? m : void 0;
24
+ function me(t) {
25
+ const e = F(), n = b(() => {
26
+ const s = e.document().nodes[t()];
27
+ return s?.type === "field" ? s : void 0;
28
28
  });
29
- function a(m, s) {
30
- const [$, I] = z(s, { equals: !1 });
31
- return V(() => {
32
- const D = m(t());
33
- if (!D) {
34
- I(() => s);
29
+ function o(s, l) {
30
+ const [v, I] = z(l, { equals: !1 });
31
+ return q(() => {
32
+ const O = s(t());
33
+ if (!O) {
34
+ I(() => l);
35
35
  return;
36
36
  }
37
- I(() => D.getSnapshot()), K(D.subscribe(() => I(() => D.getSnapshot())));
38
- }), $;
37
+ I(() => O.getSnapshot()), K(O.subscribe(() => I(() => O.getSnapshot())));
38
+ }), v;
39
39
  }
40
- const h = a((m) => e.form().getNodeState(m)?.value, void 0), g = a((m) => e.form().getNodeState(m)?.errors, ne), d = a((m) => e.form().getNodeState(m)?.dirty, !1), w = a((m) => e.form().getNodeState(m)?.touched, !1), c = a((m) => e.form().getNodeState(m)?.visible, !0), u = a((m) => e.form().getNodeState(m)?.disabled, !1), r = a((m) => e.form().getNodeState(m)?.showErrors, !1), p = b(() => r() ? g() : ne), o = b(() => n()?.annotations.title ?? n()?.dataPointer ?? n()?.id ?? ""), f = b(() => n()?.helpText ?? n()?.annotations.description), T = b(() => W(e.idPrefix(), n()?.id ?? t(), "input")), v = b(() => W(e.idPrefix(), n()?.id ?? t(), "description")), _ = b(() => W(e.idPrefix(), n()?.id ?? t(), "error")), S = b(() => p().length > 0), C = b(() => [
41
- f() ? v() : void 0,
40
+ const h = o((s) => e.form().getNodeState(s)?.value, void 0), u = o((s) => e.form().getNodeState(s)?.errors, ne), m = o((s) => e.form().getNodeState(s)?.dirty, !1), w = o((s) => e.form().getNodeState(s)?.touched, !1), d = o((s) => e.form().getNodeState(s)?.visible, !0), g = o((s) => e.form().getNodeState(s)?.disabled, !1), r = o((s) => e.form().getNodeState(s)?.showErrors, !1), f = b(() => r() ? u() : ne), i = b(() => {
41
+ const s = n();
42
+ return s ? ve(s.annotations.title, s.dataPointer, e.messages()) : "";
43
+ }), y = b(() => n()?.helpText ?? n()?.annotations.description), T = b(() => W(e.idPrefix(), n()?.id ?? t(), "input")), p = b(() => W(e.idPrefix(), n()?.id ?? t(), "description")), _ = b(() => W(e.idPrefix(), n()?.id ?? t(), "error")), S = b(() => f().length > 0), D = b(() => [
44
+ y() ? p() : void 0,
42
45
  S() ? _() : void 0
43
46
  ].filter(Boolean).join(" ") || void 0), N = b(() => {
44
- const m = h();
45
- return typeof m == "number" ? m : m == null ? "" : String(m);
47
+ const s = h();
48
+ return typeof s == "number" ? s : s == null ? "" : String(s);
46
49
  });
47
- function R(m) {
48
- n()?.readOnly || e.form().dispatch({ type: "SetValue", nodeId: t(), value: m });
50
+ function R(s) {
51
+ n()?.readOnly || e.form().dispatch({ type: "SetValue", nodeId: t(), value: s });
49
52
  }
50
- function P(m, s) {
51
- const $ = n();
52
- if (!(!$ || $.readOnly)) {
53
- if ($.enumValues?.length) {
54
- const I = Number(s);
55
- Number.isInteger(I) && I >= 0 && $.enumValues[I] && R($.enumValues[I].value);
53
+ function P(s, l) {
54
+ const v = n();
55
+ if (!(!v || v.readOnly)) {
56
+ if (v.enumValues?.length) {
57
+ const I = Number(l);
58
+ Number.isInteger(I) && I >= 0 && v.enumValues[I] && R(v.enumValues[I].value);
56
59
  return;
57
60
  }
58
- $.fieldType === "number" || $.fieldType === "integer" ? R(m === "" ? void 0 : Number(m)) : R(m);
61
+ v.fieldType === "number" || v.fieldType === "integer" ? R(s === "" ? void 0 : Number(s)) : R(s);
59
62
  }
60
63
  }
61
64
  function B() {
@@ -64,37 +67,37 @@ function ge(t) {
64
67
  return {
65
68
  node: n,
66
69
  value: h,
67
- errors: g,
68
- visibleErrors: p,
69
- dirty: d,
70
+ errors: u,
71
+ visibleErrors: f,
72
+ dirty: m,
70
73
  touched: w,
71
- visible: c,
72
- disabled: u,
74
+ visible: d,
75
+ disabled: g,
73
76
  showErrors: r,
74
- label: o,
75
- description: f,
77
+ label: i,
78
+ description: y,
76
79
  inputId: T,
77
- descriptionId: v,
80
+ descriptionId: p,
78
81
  errorId: _,
79
82
  invalid: S,
80
- describedBy: C,
83
+ describedBy: D,
81
84
  display: N,
82
85
  setRaw: P,
83
86
  setValue: R,
84
87
  onBlur: B
85
88
  };
86
89
  }
87
- const yt = ge;
90
+ const yt = me;
88
91
  function Q(t) {
89
- const e = q(), n = b(() => e.document().nodes[t.node.id] ?? t.node), a = b(() => e.registry().resolve(n()));
90
- return i(x, {
92
+ const e = F(), n = b(() => e.document().nodes[t.node.id] ?? t.node), o = b(() => e.registry().resolve(n()));
93
+ return a(x, {
91
94
  get when() {
92
- return O(() => !!n().visible)() && a();
95
+ return C(() => !!n().visible)() && o();
93
96
  },
94
97
  get children() {
95
- return i(ue, {
98
+ return a(ue, {
96
99
  get component() {
97
- return a();
100
+ return o();
98
101
  },
99
102
  get node() {
100
103
  return n();
@@ -103,213 +106,214 @@ function Q(t) {
103
106
  }
104
107
  });
105
108
  }
106
- var oe = /* @__PURE__ */ y("<button type=button>"), Ie = /* @__PURE__ */ y("<div data-array-container>"), Se = /* @__PURE__ */ y("<span aria-hidden=true class=texaryn-array-drag-handle tabindex=-1>⠿"), ke = /* @__PURE__ */ y("<button type=button data-reorder-direction=up>"), Ae = /* @__PURE__ */ y("<button type=button data-reorder-direction=down>"), Ee = /* @__PURE__ */ y("<div data-array-row>");
107
- const F = "application/x-texaryn-array-item";
108
- function Re(t) {
109
- const e = q(), n = b(() => e.document().nodes[t.node.id] ?? t.node), a = b(() => n().arrayMeta), h = b(() => n().annotations.title), g = b(() => a()?.itemIds ?? []), [d, w] = z(null);
110
- let c;
111
- const u = () => a()?.canReorder === !0 && !n().readOnly && !n().disabled, r = () => {
112
- c?.removeAttribute("data-array-drag-active"), c?.querySelectorAll("[data-dragging], [data-drop-target]").forEach((v) => {
113
- v.removeAttribute("data-dragging"), v.removeAttribute("data-drop-target");
109
+ var oe = /* @__PURE__ */ $("<button type=button>"), Se = /* @__PURE__ */ $("<div data-array-container>"), ke = /* @__PURE__ */ $("<span aria-hidden=true class=texaryn-array-drag-handle tabindex=-1>⠿"), Ae = /* @__PURE__ */ $("<button type=button data-reorder-direction=up>"), Ee = /* @__PURE__ */ $("<button type=button data-reorder-direction=down>"), Re = /* @__PURE__ */ $("<div data-array-row>");
110
+ const M = "application/x-texaryn-array-item";
111
+ function Oe(t) {
112
+ const e = F(), n = b(() => e.document().nodes[t.node.id] ?? t.node), o = b(() => n().arrayMeta), h = b(() => n().annotations.title), u = b(() => o()?.itemIds ?? []), [m, w] = z(null);
113
+ let d;
114
+ const g = () => o()?.canReorder === !0 && !n().readOnly && !n().disabled, r = () => {
115
+ d?.removeAttribute("data-array-drag-active"), d?.querySelectorAll("[data-dragging], [data-drop-target]").forEach((p) => {
116
+ p.removeAttribute("data-dragging"), p.removeAttribute("data-drop-target");
114
117
  }), w(null);
115
118
  };
116
- V(() => {
117
- const v = d();
118
- if (!v) return;
119
+ q(() => {
120
+ const p = m();
121
+ if (!p) return;
119
122
  const _ = e.form();
120
- (v.runtime !== _ || v.root !== c || v.identityKey !== a()?.identityKey || !u() || !g().includes(v.itemId)) && r();
123
+ (p.runtime !== _ || p.root !== d || p.identityKey !== o()?.identityKey || !g() || !u().includes(p.itemId)) && r();
121
124
  }), K(r);
122
- const p = (v) => v.target instanceof Element && v.target.closest("[data-array-container]") === c, o = (v) => {
123
- const _ = n().children[v];
125
+ const f = (p) => p.target instanceof Element && p.target.closest("[data-array-container]") === d, i = (p) => {
126
+ const _ = n().children[p];
124
127
  return _ ? e.document().nodes[_] : void 0;
125
- }, f = () => e.messages().addItem({
126
- itemTemplateTitle: a()?.itemTitle,
128
+ }, y = () => e.messages().addItem({
129
+ itemTemplateTitle: o()?.itemTitle,
127
130
  containerTitle: h()
128
- }), T = (v, _, S) => {
129
- const C = S.currentTarget, N = document.activeElement === C, R = g()[v];
131
+ }), T = (p, _, S) => {
132
+ const D = S.currentTarget, N = document.activeElement === D, R = u()[p];
130
133
  e.form().dispatch({
131
134
  type: "MoveItem",
132
135
  containerId: n().id,
133
- from: v,
136
+ from: p,
134
137
  to: _
135
- }), !(!N || !R || _ === v) && queueMicrotask(() => {
136
- const P = [...document.querySelectorAll("[data-array-item-id]")].find((m) => m.dataset.arrayItemId === R), B = _ < v && _ === 0 ? "down" : _ > v && _ === g().length - 1 ? "up" : void 0;
138
+ }), !(!N || !R || _ === p) && queueMicrotask(() => {
139
+ const P = [...document.querySelectorAll("[data-array-item-id]")].find((s) => s.dataset.arrayItemId === R), B = _ < p && _ === 0 ? "down" : _ > p && _ === u().length - 1 ? "up" : void 0;
137
140
  B && P?.querySelector(`[data-reorder-direction="${B}"]`)?.focus();
138
141
  });
139
142
  };
140
143
  return (() => {
141
- var v = Ie();
144
+ var p = Se();
142
145
  return de((_) => {
143
- c = _;
144
- }, v), l(v, i(E, {
146
+ d = _;
147
+ }, p), c(p, a(E, {
145
148
  get each() {
146
- return g();
149
+ return u();
147
150
  },
148
151
  children: (_, S) => {
149
- const C = () => o(S())?.annotations.title, N = () => S() + 1, R = () => e.messages().moveItemUp({
152
+ const D = () => i(S())?.annotations.title, N = () => S() + 1, R = () => e.messages().moveItemUp({
150
153
  position: N(),
151
- itemTitle: C(),
154
+ itemTitle: D(),
152
155
  containerTitle: h()
153
156
  }), P = () => e.messages().moveItemDown({
154
157
  position: N(),
155
- itemTitle: C(),
158
+ itemTitle: D(),
156
159
  containerTitle: h()
157
160
  }), B = () => e.messages().removeItem({
158
161
  position: N(),
159
- itemTitle: C(),
162
+ itemTitle: D(),
160
163
  containerTitle: h()
161
164
  });
162
165
  return (() => {
163
- var m = Ee();
164
- return m.addEventListener("drop", (s) => {
165
- if (!Array.from(s.dataTransfer?.types ?? []).includes(F)) return;
166
- s.stopPropagation();
167
- const $ = d(), I = g();
168
- if (!c || !p(s) || !$) {
166
+ var s = Re();
167
+ return s.addEventListener("drop", (l) => {
168
+ if (!Array.from(l.dataTransfer?.types ?? []).includes(M)) return;
169
+ l.stopPropagation();
170
+ const v = m(), I = u();
171
+ if (!d || !f(l) || !v) {
169
172
  r();
170
173
  return;
171
174
  }
172
- const D = I.indexOf($.itemId), Z = I.indexOf(_);
173
- if ($.runtime !== e.form() || $.root !== c || $.identityKey !== a()?.identityKey || !u() || D < 0 || Z < 0) {
175
+ const O = I.indexOf(v.itemId), Z = I.indexOf(_);
176
+ if (v.runtime !== e.form() || v.root !== d || v.identityKey !== o()?.identityKey || !g() || O < 0 || Z < 0) {
174
177
  r();
175
178
  return;
176
179
  }
177
- s.preventDefault();
178
- const ee = s.currentTarget.getBoundingClientRect(), ye = s.clientY >= ee.top + ee.height / 2, H = Z + (ye ? 1 : 0), te = H > D ? H - 1 : H;
179
- r(), te !== D && e.form().dispatch({
180
+ l.preventDefault();
181
+ const ee = l.currentTarget.getBoundingClientRect(), ye = l.clientY >= ee.top + ee.height / 2, H = Z + (ye ? 1 : 0), te = H > O ? H - 1 : H;
182
+ r(), te !== O && e.form().dispatch({
180
183
  type: "MoveItem",
181
184
  containerId: n().id,
182
- from: D,
185
+ from: O,
183
186
  to: te
184
187
  });
185
- }), m.addEventListener("dragleave", (s) => {
186
- Array.from(s.dataTransfer?.types ?? []).includes(F) && s.currentTarget.removeAttribute("data-drop-target");
187
- }), m.addEventListener("dragover", (s) => {
188
- if (!Array.from(s.dataTransfer?.types ?? []).includes(F)) return;
189
- if (!c || !p(s)) {
190
- s.stopPropagation();
188
+ }), s.addEventListener("dragleave", (l) => {
189
+ Array.from(l.dataTransfer?.types ?? []).includes(M) && l.currentTarget.removeAttribute("data-drop-target");
190
+ }), s.addEventListener("dragover", (l) => {
191
+ if (!Array.from(l.dataTransfer?.types ?? []).includes(M)) return;
192
+ if (!d || !f(l)) {
193
+ l.stopPropagation();
191
194
  return;
192
195
  }
193
- const $ = d(), I = g();
194
- if (!$ || $.runtime !== e.form() || $.root !== c || $.identityKey !== a()?.identityKey || !u() || !I.includes($.itemId) || !I.includes(_)) {
195
- s.stopPropagation();
196
+ const v = m(), I = u();
197
+ if (!v || v.runtime !== e.form() || v.root !== d || v.identityKey !== o()?.identityKey || !g() || !I.includes(v.itemId) || !I.includes(_)) {
198
+ l.stopPropagation();
196
199
  return;
197
200
  }
198
- s.preventDefault(), s.stopPropagation(), s.dataTransfer && (s.dataTransfer.dropEffect = "move"), s.currentTarget.setAttribute("data-drop-target", "");
199
- }), k(m, "data-array-item-id", _), l(m, i(x, {
201
+ l.preventDefault(), l.stopPropagation(), l.dataTransfer && (l.dataTransfer.dropEffect = "move"), l.currentTarget.setAttribute("data-drop-target", "");
202
+ }), k(s, "data-array-item-id", _), c(s, a(x, {
200
203
  get when() {
201
- return u();
204
+ return g();
202
205
  },
203
206
  get children() {
204
- var s = Se();
205
- return s.addEventListener("dragend", ($) => {
206
- $.dataTransfer?.clearData(F), r();
207
- }), s.addEventListener("dragstart", ($) => {
208
- const I = a()?.identityKey;
209
- if (!u() || !c || I === void 0 || !g().includes(_)) {
210
- $.preventDefault();
207
+ var l = ke();
208
+ return l.addEventListener("dragend", (v) => {
209
+ v.dataTransfer?.clearData(M), r();
210
+ }), l.addEventListener("dragstart", (v) => {
211
+ const I = o()?.identityKey;
212
+ if (!g() || !d || I === void 0 || !u().includes(_)) {
213
+ v.preventDefault();
211
214
  return;
212
215
  }
213
- $.stopPropagation(), $.dataTransfer?.setData(F, _), $.dataTransfer && ($.dataTransfer.effectAllowed = "move"), w({
216
+ v.stopPropagation(), v.dataTransfer?.setData(M, _), v.dataTransfer && (v.dataTransfer.effectAllowed = "move"), w({
214
217
  runtime: e.form(),
215
218
  identityKey: I,
216
- root: c,
219
+ root: d,
217
220
  itemId: _
218
- }), c.setAttribute("data-array-drag-active", ""), $.currentTarget.closest("[data-array-row]")?.setAttribute("data-dragging", "");
219
- }), k(s, "draggable", !0), s;
221
+ }), d.setAttribute("data-array-drag-active", ""), v.currentTarget.closest("[data-array-row]")?.setAttribute("data-dragging", "");
222
+ }), k(l, "draggable", !0), l;
220
223
  }
221
- }), null), l(m, i(x, {
224
+ }), null), c(s, a(x, {
222
225
  get when() {
223
- return o(S());
226
+ return i(S());
224
227
  },
225
- children: (s) => i(Q, {
228
+ children: (l) => a(Q, {
226
229
  get node() {
227
- return s();
230
+ return l();
228
231
  }
229
232
  })
230
- }), null), l(m, i(x, {
233
+ }), null), c(s, a(x, {
231
234
  get when() {
232
- return O(() => !!a()?.canReorder)() && S() > 0;
235
+ return C(() => !!o()?.canReorder)() && S() > 0;
233
236
  },
234
237
  get children() {
235
- var s = ke();
236
- return s.$$click = ($) => T(S(), S() - 1, $), l(s, () => R().label), A(() => k(s, "aria-label", R().accessibleName)), s;
238
+ var l = Ae();
239
+ return l.$$click = (v) => T(S(), S() - 1, v), c(l, () => R().label), A(() => k(l, "aria-label", R().accessibleName)), l;
237
240
  }
238
- }), null), l(m, i(x, {
241
+ }), null), c(s, a(x, {
239
242
  get when() {
240
- return O(() => !!a()?.canReorder)() && S() < g().length - 1;
243
+ return C(() => !!o()?.canReorder)() && S() < u().length - 1;
241
244
  },
242
245
  get children() {
243
- var s = Ae();
244
- return s.$$click = ($) => T(S(), S() + 1, $), l(s, () => P().label), A(() => k(s, "aria-label", P().accessibleName)), s;
246
+ var l = Ee();
247
+ return l.$$click = (v) => T(S(), S() + 1, v), c(l, () => P().label), A(() => k(l, "aria-label", P().accessibleName)), l;
245
248
  }
246
- }), null), l(m, i(x, {
249
+ }), null), c(s, a(x, {
247
250
  get when() {
248
- return a()?.canRemove;
251
+ return o()?.canRemove;
249
252
  },
250
253
  get children() {
251
- var s = oe();
252
- return s.$$click = () => e.form().dispatch({
254
+ var l = oe();
255
+ return l.$$click = () => e.form().dispatch({
253
256
  type: "RemoveItem",
254
257
  containerId: n().id,
255
258
  index: S()
256
- }), l(s, () => B().label), A(() => k(s, "aria-label", B().accessibleName)), s;
259
+ }), c(l, () => B().label), A(() => k(l, "aria-label", B().accessibleName)), l;
257
260
  }
258
- }), null), m;
261
+ }), null), s;
259
262
  })();
260
263
  }
261
- }), null), l(v, i(x, {
264
+ }), null), c(p, a(x, {
262
265
  get when() {
263
- return a()?.canAdd;
266
+ return o()?.canAdd;
264
267
  },
265
268
  get children() {
266
269
  var _ = oe();
267
270
  return _.$$click = () => e.form().dispatch({
268
271
  type: "InsertItem",
269
272
  containerId: n().id,
270
- index: g().length
271
- }), l(_, () => f().label), A(() => k(_, "aria-label", f().accessibleName)), _;
273
+ index: u().length
274
+ }), c(_, () => y().label), A(() => k(_, "aria-label", y().accessibleName)), _;
272
275
  }
273
- }), null), v;
276
+ }), null), p;
274
277
  })();
275
278
  }
276
279
  G(["click"]);
277
- var De = /* @__PURE__ */ y("<ul>"), Oe = /* @__PURE__ */ y("<div aria-live=polite aria-atomic=true>"), Ce = /* @__PURE__ */ y("<li>");
278
- function Ne(t) {
280
+ var Ce = /* @__PURE__ */ $("<ul>"), De = /* @__PURE__ */ $("<div aria-live=polite aria-atomic=true>"), Ne = /* @__PURE__ */ $("<li>");
281
+ function Be(t) {
282
+ const e = F();
279
283
  return (() => {
280
- var e = Oe();
281
- return l(e, i(x, {
284
+ var n = De();
285
+ return c(n, a(x, {
282
286
  get when() {
283
287
  return t.errors.length > 0;
284
288
  },
285
289
  get children() {
286
- var n = De();
287
- return l(n, i(E, {
290
+ var o = Ce();
291
+ return c(o, a(E, {
288
292
  get each() {
289
293
  return t.errors;
290
294
  },
291
- children: (a) => (() => {
292
- var h = Ce();
293
- return l(h, () => a.message ?? a.keyword), h;
295
+ children: (h) => (() => {
296
+ var u = Ne();
297
+ return c(u, () => e.messages().validationMessage(h)), u;
294
298
  })()
295
- })), n;
299
+ })), o;
296
300
  }
297
- })), A(() => k(e, "id", t.id)), e;
301
+ })), A(() => k(n, "id", t.id)), n;
298
302
  })();
299
303
  }
300
- var Be = /* @__PURE__ */ y("<span> (required)"), Pe = /* @__PURE__ */ y("<select>"), ae = /* @__PURE__ */ y("<input>"), Fe = /* @__PURE__ */ y("<textarea>"), Me = /* @__PURE__ */ y("<div>"), Ve = /* @__PURE__ */ y("<div><label>"), qe = /* @__PURE__ */ y("<option>");
304
+ var Pe = /* @__PURE__ */ $("<span> (required)"), Fe = /* @__PURE__ */ $("<select>"), ae = /* @__PURE__ */ $("<input>"), Me = /* @__PURE__ */ $("<textarea>"), Ve = /* @__PURE__ */ $("<div>"), qe = /* @__PURE__ */ $("<div><label>"), je = /* @__PURE__ */ $("<option>");
301
305
  function J(t, e) {
302
306
  if (t === e) return !0;
303
307
  if (typeof t != "object" || t === null || typeof e != "object" || e === null) return !1;
304
308
  if (Array.isArray(t) || Array.isArray(e))
305
- return Array.isArray(t) && Array.isArray(e) && t.length === e.length && t.every((g, d) => J(g, e[d]));
306
- const n = t, a = e, h = Object.keys(n);
307
- return h.length === Object.keys(a).length && h.every((g) => Object.hasOwn(a, g) && J(n[g], a[g]));
309
+ return Array.isArray(t) && Array.isArray(e) && t.length === e.length && t.every((u, m) => J(u, e[m]));
310
+ const n = t, o = e, h = Object.keys(n);
311
+ return h.length === Object.keys(o).length && h.every((u) => Object.hasOwn(o, u) && J(n[u], o[u]));
308
312
  }
309
313
  function ie(t) {
310
- const e = ge(() => t.node.id), n = b(() => e.node()), a = b(() => {
311
- const d = n()?.enumValues ?? [], w = e.value();
312
- return String(d.findIndex((c) => J(c.value, w)));
314
+ const e = me(() => t.node.id), n = b(() => e.node()), o = b(() => {
315
+ const m = n()?.enumValues ?? [], w = e.value();
316
+ return String(m.findIndex((d) => J(d.value, w)));
313
317
  }), h = () => ({
314
318
  id: e.inputId(),
315
319
  name: n()?.dataPointer || n()?.id || "",
@@ -318,40 +322,40 @@ function ie(t) {
318
322
  "aria-invalid": e.invalid() || void 0,
319
323
  "aria-describedby": e.describedBy(),
320
324
  placeholder: n()?.placeholder
321
- }), g = (d) => {
322
- e.setRaw(d.currentTarget.value);
325
+ }), u = (m) => {
326
+ e.setRaw(m.currentTarget.value);
323
327
  };
324
- return i(x, {
328
+ return a(x, {
325
329
  get when() {
326
- return O(() => !!e.visible())() && n();
330
+ return C(() => !!e.visible())() && n();
327
331
  },
328
- children: (d) => (() => {
329
- var w = Ve(), c = w.firstChild;
330
- return l(c, () => e.label(), null), l(c, i(x, {
332
+ children: (m) => (() => {
333
+ var w = qe(), d = w.firstChild;
334
+ return c(d, () => e.label(), null), c(d, a(x, {
331
335
  get when() {
332
- return d().constraints.required;
336
+ return m().constraints.required;
333
337
  },
334
338
  get children() {
335
- return Be();
339
+ return Pe();
336
340
  }
337
- }), null), l(w, i(xe, {
341
+ }), null), c(w, a(Te, {
338
342
  get children() {
339
- return [i(j, {
343
+ return [a(j, {
340
344
  get when() {
341
- return d().enumValues?.length;
345
+ return m().enumValues?.length;
342
346
  },
343
347
  get children() {
344
- var u = Pe();
345
- return L(u, U(h, {
348
+ var g = Fe();
349
+ return L(g, U(h, {
346
350
  get value() {
347
- return a();
351
+ return o();
348
352
  },
349
353
  get "aria-readonly"() {
350
- return d().readOnly ? "true" : void 0;
354
+ return m().readOnly ? "true" : void 0;
351
355
  },
352
356
  onChange: (r) => {
353
- if (d().readOnly) {
354
- r.currentTarget.value = a();
357
+ if (m().readOnly) {
358
+ r.currentTarget.value = o();
355
359
  return;
356
360
  }
357
361
  e.setRaw("", r.currentTarget.value);
@@ -359,32 +363,32 @@ function ie(t) {
359
363
  get onBlur() {
360
364
  return e.onBlur;
361
365
  }
362
- }), !1, !0), l(u, i(E, {
366
+ }), !1, !0), c(g, a(E, {
363
367
  get each() {
364
- return d().enumValues;
368
+ return m().enumValues;
365
369
  },
366
- children: (r, p) => (() => {
367
- var o = qe();
368
- return l(o, () => r.title ?? String(r.value)), A(() => o.value = String(p())), o;
370
+ children: (r, f) => (() => {
371
+ var i = je();
372
+ return c(i, () => r.title ?? String(r.value)), A(() => i.value = String(f())), i;
369
373
  })()
370
- })), u;
374
+ })), g;
371
375
  }
372
- }), i(j, {
376
+ }), a(j, {
373
377
  get when() {
374
- return d().fieldType === "boolean";
378
+ return m().fieldType === "boolean";
375
379
  },
376
380
  get children() {
377
- var u = ae();
378
- return L(u, U(h, {
381
+ var g = ae();
382
+ return L(g, U(h, {
379
383
  type: "checkbox",
380
384
  get checked() {
381
385
  return !!e.value();
382
386
  },
383
387
  get "aria-readonly"() {
384
- return d().readOnly ? "true" : void 0;
388
+ return m().readOnly ? "true" : void 0;
385
389
  },
386
390
  onChange: (r) => {
387
- if (d().readOnly) {
391
+ if (m().readOnly) {
388
392
  r.currentTarget.checked = !!e.value();
389
393
  return;
390
394
  }
@@ -393,137 +397,137 @@ function ie(t) {
393
397
  get onBlur() {
394
398
  return e.onBlur;
395
399
  }
396
- }), !1, !1), u;
400
+ }), !1, !1), g;
397
401
  }
398
- }), i(j, {
402
+ }), a(j, {
399
403
  get when() {
400
- return d().widget === "textarea";
404
+ return m().widget === "textarea";
401
405
  },
402
406
  get children() {
403
- var u = Fe();
404
- return L(u, U(h, {
407
+ var g = Me();
408
+ return L(g, U(h, {
405
409
  get value() {
406
410
  return e.display();
407
411
  },
408
412
  get readOnly() {
409
- return d().readOnly;
413
+ return m().readOnly;
410
414
  },
411
- onInput: g,
415
+ onInput: u,
412
416
  get onBlur() {
413
417
  return e.onBlur;
414
418
  }
415
- }), !1, !1), u;
419
+ }), !1, !1), g;
416
420
  }
417
- }), i(j, {
421
+ }), a(j, {
418
422
  when: !0,
419
423
  get children() {
420
- var u = ae();
421
- return L(u, U(h, {
424
+ var g = ae();
425
+ return L(g, U(h, {
422
426
  get type() {
423
- return d().fieldType === "number" || d().fieldType === "integer" ? "number" : "text";
427
+ return m().fieldType === "number" || m().fieldType === "integer" ? "number" : "text";
424
428
  },
425
429
  get value() {
426
430
  return e.display();
427
431
  },
428
432
  get readOnly() {
429
- return d().readOnly;
433
+ return m().readOnly;
430
434
  },
431
- onInput: g,
435
+ onInput: u,
432
436
  get onBlur() {
433
437
  return e.onBlur;
434
438
  }
435
- }), !1, !1), u;
439
+ }), !1, !1), g;
436
440
  }
437
441
  })];
438
442
  }
439
- }), null), l(w, i(x, {
443
+ }), null), c(w, a(x, {
440
444
  get when() {
441
445
  return e.description();
442
446
  },
443
447
  get children() {
444
- var u = Me();
445
- return l(u, () => e.description()), A(() => k(u, "id", e.descriptionId())), u;
448
+ var g = Ve();
449
+ return c(g, () => e.description()), A(() => k(g, "id", e.descriptionId())), g;
446
450
  }
447
- }), null), l(w, i(Ne, {
451
+ }), null), c(w, a(Be, {
448
452
  get id() {
449
453
  return e.errorId();
450
454
  },
451
455
  get errors() {
452
456
  return e.visibleErrors();
453
457
  }
454
- }), null), A(() => k(c, "for", e.inputId())), w;
458
+ }), null), A(() => k(d, "for", e.inputId())), w;
455
459
  })()
456
460
  });
457
461
  }
458
- var je = /* @__PURE__ */ y("<div>"), Le = /* @__PURE__ */ y("<button type=button>"), Ue = /* @__PURE__ */ y("<fieldset>"), Ke = /* @__PURE__ */ y("<legend>");
459
- function He(t) {
460
- const e = q(), n = b(() => e.document().nodes[t.node.id] ?? t.node), a = b(() => n().children.map((r) => e.document().nodes[r]).filter((r) => r != null)), h = b(() => a().map(re)), g = b(() => n().annotations.title), d = b(() => {
462
+ var Le = /* @__PURE__ */ $("<div>"), Ue = /* @__PURE__ */ $("<button type=button>"), Ke = /* @__PURE__ */ $("<fieldset>"), He = /* @__PURE__ */ $("<legend>");
463
+ function We(t) {
464
+ const e = F(), n = b(() => e.document().nodes[t.node.id] ?? t.node), o = b(() => n().children.map((r) => e.document().nodes[r]).filter((r) => r != null)), h = b(() => o().map(re)), u = b(() => n().annotations.title), m = b(() => {
461
465
  const r = /* @__PURE__ */ new Map();
462
- for (const p of n().boundaryTargets ?? [])
463
- r.has(p.reason) || r.set(p.reason, p);
466
+ for (const f of n().boundaryTargets ?? [])
467
+ r.has(f.reason) || r.set(f.reason, f);
464
468
  return [...r.values()];
465
- }), w = (r) => (e.messages().expandBoundary ?? ((o) => ({
466
- label: `Show ${o.boundary}`,
467
- accessibleName: `Show ${o.boundary}`
469
+ }), w = (r) => (e.messages().expandBoundary ?? ((i) => ({
470
+ label: `Show ${i.boundary}`,
471
+ accessibleName: `Show ${i.boundary}`
468
472
  })))({
469
473
  boundary: r.reason,
470
- containerTitle: g(),
474
+ containerTitle: u(),
471
475
  position: 1,
472
476
  count: 1
473
- }), c = (r) => {
477
+ }), d = (r) => {
474
478
  e.form().dispatch({
475
479
  type: "ExpandBoundary",
476
480
  containerId: n().id,
477
481
  targetToken: r.token
478
482
  });
479
- }, u = () => (() => {
480
- var r = je();
481
- return l(r, i(E, {
483
+ }, g = () => (() => {
484
+ var r = Le();
485
+ return c(r, a(E, {
482
486
  get each() {
483
487
  return h();
484
488
  },
485
- children: (p) => {
486
- const o = b(() => a().find((f) => re(f) === p));
487
- return i(x, {
489
+ children: (f) => {
490
+ const i = b(() => o().find((y) => re(y) === f));
491
+ return a(x, {
488
492
  get when() {
489
- return o();
493
+ return i();
490
494
  },
491
- children: (f) => i(Q, {
495
+ children: (y) => a(Q, {
492
496
  get node() {
493
- return f();
497
+ return y();
494
498
  }
495
499
  })
496
500
  });
497
501
  }
498
- }), null), l(r, i(E, {
502
+ }), null), c(r, a(E, {
499
503
  get each() {
500
- return d();
504
+ return m();
501
505
  },
502
- children: (p) => {
503
- const o = w(p);
506
+ children: (f) => {
507
+ const i = w(f);
504
508
  return (() => {
505
- var f = Le();
506
- return f.$$click = () => c(p), l(f, () => o.label), A(() => k(f, "aria-label", o.accessibleName)), f;
509
+ var y = Ue();
510
+ return y.$$click = () => d(f), c(y, () => i.label), A(() => k(y, "aria-label", i.accessibleName)), y;
507
511
  })();
508
512
  }
509
513
  }), null), r;
510
514
  })();
511
- return t.node.parentId === null ? u() : (() => {
512
- var r = Ue();
513
- return l(r, i(x, {
515
+ return t.node.parentId === null ? g() : (() => {
516
+ var r = Ke();
517
+ return c(r, a(x, {
514
518
  get when() {
515
- return g();
519
+ return u();
516
520
  },
517
- children: (p) => (() => {
518
- var o = Ke();
519
- return l(o, p), o;
521
+ children: (f) => (() => {
522
+ var i = He();
523
+ return c(i, f), i;
520
524
  })()
521
- }), null), l(r, u, null), A(() => k(r, "role", g() === void 0 ? "none" : void 0)), r;
525
+ }), null), c(r, g, null), A(() => k(r, "role", u() === void 0 ? "none" : void 0)), r;
522
526
  })();
523
527
  }
524
528
  G(["click"]);
525
- function We() {
526
- const t = ve();
529
+ function Je() {
530
+ const t = $e();
527
531
  return t.register({
528
532
  test: (e) => e.type === "field" && e.enumValues != null && e.enumValues.length > 0,
529
533
  rank: 2
@@ -533,108 +537,102 @@ function We() {
533
537
  }, ie), t.register({
534
538
  test: (e) => e.type === "container" && e.containerType === "object",
535
539
  rank: 1
536
- }, He), t.register({
540
+ }, We), t.register({
537
541
  test: (e) => e.type === "container" && e.containerType === "array",
538
542
  rank: 1
539
- }, Re), t;
543
+ }, Oe), t;
540
544
  }
541
- var Je = /* @__PURE__ */ y("<div role=group tabindex=-1><h2></h2><ul>"), Ye = /* @__PURE__ */ y("<li><a>");
542
- function le(t, e, n) {
545
+ var Ye = /* @__PURE__ */ $("<div role=group tabindex=-1><h2></h2><ul>"), ze = /* @__PURE__ */ $("<li><a>");
546
+ function se(t, e, n) {
543
547
  return `${t}-${e}-${n}`;
544
548
  }
545
- function ze(t) {
546
- const e = q(), n = M(() => e.form().visibleErrors), a = M(() => e.form().submission), h = $e(e.form().submission.getSnapshot()), g = b(() => le(e.idPrefix(), "error-summary", "heading"));
547
- let d;
548
- V(() => {
549
- const c = n();
550
- c.length > 0 && h.settle(a(), c) && t.focus !== !1 && queueMicrotask(() => d?.isConnected && d.focus());
549
+ function Ge(t) {
550
+ const e = F(), n = V(() => e.form().visibleErrors), o = V(() => e.form().submission), h = be(e.form().submission.getSnapshot()), u = b(() => se(e.idPrefix(), "error-summary", "heading"));
551
+ let m;
552
+ q(() => {
553
+ const d = n();
554
+ d.length > 0 && h.settle(o(), d) && t.focus !== !1 && queueMicrotask(() => m?.isConnected && m.focus());
551
555
  });
552
- const w = (c) => e.messages().errorSummaryDetail({
553
- messages: _e(c)
556
+ const w = (d) => e.messages().errorSummaryDetail({
557
+ messages: we(d, e.messages())
554
558
  });
555
- return i(x, {
559
+ return a(x, {
556
560
  get when() {
557
561
  return n().length > 0;
558
562
  },
559
563
  get children() {
560
- var c = Je(), u = c.firstChild, r = u.nextSibling, p = d;
561
- return typeof p == "function" ? de(p, c) : d = c, l(u, () => e.messages().errorSummaryHeading({
564
+ var d = Ye(), g = d.firstChild, r = g.nextSibling, f = m;
565
+ return typeof f == "function" ? de(f, d) : m = d, c(g, () => e.messages().errorSummaryHeading({
562
566
  count: n().length
563
- })), l(r, i(E, {
567
+ })), c(r, a(E, {
564
568
  get each() {
565
569
  return n();
566
570
  },
567
- children: (o) => (() => {
568
- var f = Ye(), T = f.firstChild;
569
- return l(T, () => be(o)), l(f, () => w(o), null), A(() => k(T, "href", `#${le(e.idPrefix(), o.nodeId, "input")}`)), f;
571
+ children: (i) => (() => {
572
+ var y = ze(), T = y.firstChild;
573
+ return c(T, () => _e(i, e.messages())), c(y, () => w(i), null), A(() => k(T, "href", `#${se(e.idPrefix(), i.nodeId, "input")}`)), y;
570
574
  })()
571
- })), A((o) => {
572
- var f = g(), T = g();
573
- return f !== o.e && k(c, "aria-labelledby", o.e = f), T !== o.t && k(u, "id", o.t = T), o;
575
+ })), A((i) => {
576
+ var y = u(), T = u();
577
+ return y !== i.e && k(d, "aria-labelledby", i.e = y), T !== i.t && k(g, "id", i.t = T), i;
574
578
  }, {
575
579
  e: void 0,
576
580
  t: void 0
577
- }), c;
581
+ }), d;
578
582
  }
579
583
  });
580
584
  }
581
- var Ge = /* @__PURE__ */ y("<form>");
582
585
  function Qe(t) {
583
586
  return Array.from(t, (e) => e.codePointAt(0).toString(36)).join("_");
584
587
  }
585
588
  function pt(t) {
586
- const e = We(), n = t.form, a = b(() => t.form), h = M(() => a().document), g = () => t.registry ?? e, d = () => t.messages ?? we, w = `texaryn-${Qe(Te())}`, c = () => t.idPrefix ?? w;
587
- let u = n;
588
- V(() => {
589
- const o = a();
590
- if (o === u) return;
591
- const f = u;
592
- u = o, t.destroyOnUnmount !== !1 && f !== o && f.destroy();
589
+ const e = Je(), n = t.form, o = b(() => t.form), h = V(() => o().document), u = () => t.registry ?? e, m = () => t.messages ?? xe, w = `texaryn-${Qe(Ie())}`, d = () => t.idPrefix ?? w;
590
+ let g = n;
591
+ q(() => {
592
+ const f = o();
593
+ if (f === g) return;
594
+ const i = g;
595
+ g = f, t.destroyOnUnmount !== !1 && i !== f && i.destroy();
593
596
  }), K(() => {
594
- t.destroyOnUnmount !== !1 && a().destroy();
597
+ t.destroyOnUnmount !== !1 && o().destroy();
595
598
  });
596
599
  const r = {
597
- form: a,
600
+ form: o,
598
601
  document: h,
599
- registry: g,
600
- messages: d,
601
- idPrefix: c
602
- }, p = (o) => {
603
- o.preventDefault(), a().dispatch({
604
- type: "Submit"
605
- });
602
+ registry: u,
603
+ messages: m,
604
+ idPrefix: d
606
605
  };
607
- return i(me.Provider, {
606
+ return a(ge.Provider, {
608
607
  value: r,
609
608
  get children() {
610
- var o = Ge();
611
- return o.addEventListener("submit", p), l(o, i(x, {
609
+ return [a(x, {
612
610
  get when() {
613
- return O(() => !!t.showErrorSummary)() && a();
611
+ return C(() => !!t.showErrorSummary)() && o();
614
612
  },
615
613
  keyed: !0,
616
614
  get children() {
617
- return i(ze, {
615
+ return a(Ge, {
618
616
  get focus() {
619
617
  return t.summaryFocus !== !1;
620
618
  }
621
619
  });
622
620
  }
623
- }), null), l(o, i(x, {
621
+ }), a(x, {
624
622
  get when() {
625
623
  return h().nodes[h().rootId];
626
624
  },
627
- children: (f) => i(Q, {
625
+ children: (f) => a(Q, {
628
626
  get node() {
629
627
  return f();
630
628
  }
631
629
  })
632
- }), null), l(o, () => t.children, null), o;
630
+ }), C(() => t.children)];
633
631
  }
634
632
  });
635
633
  }
636
- var Xe = /* @__PURE__ */ y("<fieldset><legend>"), Ze = /* @__PURE__ */ y("<div data-texaryn-layout>"), et = /* @__PURE__ */ y("<h2>"), tt = /* @__PURE__ */ y("<p role=note>"), rt = /* @__PURE__ */ y("<p>"), nt = /* @__PURE__ */ y("<button type=button>"), ot = /* @__PURE__ */ y("<ul>"), at = /* @__PURE__ */ y("<li>"), it = /* @__PURE__ */ y("<table><thead><tr></tr></thead><tbody>"), lt = /* @__PURE__ */ y("<th scope=col>"), st = /* @__PURE__ */ y("<tr>"), ct = /* @__PURE__ */ y("<td>");
637
- const fe = se();
634
+ var Xe = /* @__PURE__ */ $("<fieldset><legend>"), Ze = /* @__PURE__ */ $("<div data-texaryn-layout>"), et = /* @__PURE__ */ $("<h2>"), tt = /* @__PURE__ */ $("<p role=note>"), rt = /* @__PURE__ */ $("<p>"), nt = /* @__PURE__ */ $("<button type=button>"), ot = /* @__PURE__ */ $("<ul>"), at = /* @__PURE__ */ $("<li>"), it = /* @__PURE__ */ $("<table><thead><tr></tr></thead><tbody>"), st = /* @__PURE__ */ $("<th scope=col>"), lt = /* @__PURE__ */ $("<tr>"), ct = /* @__PURE__ */ $("<td>");
635
+ const fe = le();
638
636
  function X() {
639
637
  const t = ce(fe);
640
638
  if (!t) throw new Error("Display nodes must be rendered below DocumentRoot");
@@ -642,114 +640,114 @@ function X() {
642
640
  }
643
641
  function he(t) {
644
642
  const e = X();
645
- return M(() => {
643
+ return V(() => {
646
644
  const n = e.runtime().getCollection(t);
647
645
  if (!n) throw new Error(`Node ${t} is not a collection`);
648
646
  return n;
649
647
  });
650
648
  }
651
649
  function Y(t) {
652
- const e = X(), n = b(() => e.document().nodes[t.nodeId]), a = b(() => {
650
+ const e = X(), n = b(() => e.document().nodes[t.nodeId]), o = b(() => {
653
651
  const r = n();
654
652
  if (r)
655
653
  return r.type === "container" ? `container:${r.containerType}` : r.type === "text" ? `text:${r.textRole}` : r.type;
656
654
  }), h = b(() => {
657
655
  const r = n();
658
656
  return r ? e.registry()?.resolve(r) : void 0;
659
- }), g = () => {
657
+ }), u = () => {
660
658
  const r = n();
661
659
  return r?.type === "container" ? r : void 0;
662
- }, d = () => {
660
+ }, m = () => {
663
661
  const r = n();
664
662
  return r?.type === "text" ? r : void 0;
665
663
  }, w = () => {
666
664
  const r = n();
667
665
  return r?.type === "list" ? r : void 0;
668
- }, c = () => {
666
+ }, d = () => {
669
667
  const r = n();
670
668
  return r?.type === "table" ? r : void 0;
671
- }, u = () => {
669
+ }, g = () => {
672
670
  const r = n();
673
671
  return r?.type === "action" ? r : void 0;
674
672
  };
675
- return i(x, {
673
+ return a(x, {
676
674
  get when() {
677
- return a();
675
+ return o();
678
676
  },
679
677
  keyed: !0,
680
678
  children: (r) => {
681
- let p = null;
679
+ let f = null;
682
680
  if (r.startsWith("container:")) {
683
- const o = () => g()?.children ?? [];
684
- p = r === "container:group" ? (() => {
685
- var f = Xe(), T = f.firstChild;
686
- return l(T, () => g()?.annotations.title), l(f, i(E, {
681
+ const i = () => u()?.children ?? [];
682
+ f = r === "container:group" ? (() => {
683
+ var y = Xe(), T = y.firstChild;
684
+ return c(T, () => u()?.annotations.title), c(y, a(E, {
687
685
  get each() {
688
- return o();
686
+ return i();
689
687
  },
690
- children: (v) => i(Y, {
691
- nodeId: v
688
+ children: (p) => a(Y, {
689
+ nodeId: p
692
690
  })
693
- }), null), f;
691
+ }), null), y;
694
692
  })() : (() => {
695
- var f = Ze();
696
- return l(f, i(E, {
693
+ var y = Ze();
694
+ return c(y, a(E, {
697
695
  get each() {
698
- return o();
696
+ return i();
699
697
  },
700
- children: (T) => i(Y, {
698
+ children: (T) => a(Y, {
701
699
  nodeId: T
702
700
  })
703
- })), f;
701
+ })), y;
704
702
  })();
705
- } else r === "text:heading" ? p = (() => {
706
- var o = et();
707
- return l(o, () => d()?.content), o;
708
- })() : r === "text:help" ? p = (() => {
709
- var o = tt();
710
- return l(o, () => d()?.content), o;
711
- })() : r === "text:paragraph" ? p = (() => {
712
- var o = rt();
713
- return l(o, () => d()?.content), o;
714
- })() : r === "list" ? p = i(x, {
703
+ } else r === "text:heading" ? f = (() => {
704
+ var i = et();
705
+ return c(i, () => m()?.content), i;
706
+ })() : r === "text:help" ? f = (() => {
707
+ var i = tt();
708
+ return c(i, () => m()?.content), i;
709
+ })() : r === "text:paragraph" ? f = (() => {
710
+ var i = rt();
711
+ return c(i, () => m()?.content), i;
712
+ })() : r === "list" ? f = a(x, {
715
713
  get when() {
716
714
  return w();
717
715
  },
718
716
  get children() {
719
- return i(ut, {
717
+ return a(ut, {
720
718
  get nodeId() {
721
719
  return t.nodeId;
722
720
  }
723
721
  });
724
722
  }
725
- }) : r === "table" ? p = i(x, {
723
+ }) : r === "table" ? f = a(x, {
726
724
  get when() {
727
- return c();
725
+ return d();
728
726
  },
729
727
  get children() {
730
- return i(dt, {
728
+ return a(dt, {
731
729
  get nodeId() {
732
730
  return t.nodeId;
733
731
  }
734
732
  });
735
733
  }
736
- }) : r === "action" && (p = (() => {
737
- var o = nt();
738
- return o.$$click = () => {
739
- const f = n();
740
- f?.type === "action" && e.runtime().invokeAction(f.id).catch((T) => {
741
- const v = e.onActionError();
742
- v ? v(T) : console.error(T);
734
+ }) : r === "action" && (f = (() => {
735
+ var i = nt();
736
+ return i.$$click = () => {
737
+ const y = n();
738
+ y?.type === "action" && e.runtime().invokeAction(y.id).catch((T) => {
739
+ const p = e.onActionError();
740
+ p ? p(T) : console.error(T);
743
741
  });
744
- }, l(o, () => u()?.label ?? ""), A(() => o.disabled = !e.runtime().hasActionHandler(u()?.actionType ?? "")), o;
742
+ }, c(i, () => g()?.label ?? ""), A(() => i.disabled = !e.runtime().hasActionHandler(g()?.actionType ?? "")), i;
745
743
  })());
746
- return i(x, {
744
+ return a(x, {
747
745
  get when() {
748
746
  return h();
749
747
  },
750
- fallback: p,
748
+ fallback: f,
751
749
  get children() {
752
- return i(ue, {
750
+ return a(ue, {
753
751
  get component() {
754
752
  return h();
755
753
  },
@@ -769,57 +767,57 @@ function ut(t) {
769
767
  const e = he(t.nodeId);
770
768
  return (() => {
771
769
  var n = ot();
772
- return l(n, i(E, {
770
+ return c(n, a(E, {
773
771
  get each() {
774
- return e().map((a) => a.id);
772
+ return e().map((o) => o.id);
775
773
  },
776
- children: (a) => {
777
- const h = () => e().find((g) => g.id === a);
774
+ children: (o) => {
775
+ const h = () => e().find((u) => u.id === o);
778
776
  return (() => {
779
- var g = at();
780
- return l(g, (() => {
781
- var d = O(() => h()?.value == null);
782
- return () => d() ? "" : String(h()?.value);
783
- })()), g;
777
+ var u = at();
778
+ return c(u, (() => {
779
+ var m = C(() => h()?.value == null);
780
+ return () => m() ? "" : String(h()?.value);
781
+ })()), u;
784
782
  })();
785
783
  }
786
784
  })), n;
787
785
  })();
788
786
  }
789
787
  function dt(t) {
790
- const e = X(), n = he(t.nodeId), a = b(() => {
788
+ const e = X(), n = he(t.nodeId), o = b(() => {
791
789
  const h = e.document().nodes[t.nodeId];
792
790
  return h?.type === "table" ? h : void 0;
793
791
  });
794
792
  return (() => {
795
- var h = it(), g = h.firstChild, d = g.firstChild, w = g.nextSibling;
796
- return l(d, i(E, {
793
+ var h = it(), u = h.firstChild, m = u.firstChild, w = u.nextSibling;
794
+ return c(m, a(E, {
797
795
  get each() {
798
- return a()?.columns ?? [];
796
+ return o()?.columns ?? [];
799
797
  },
800
- children: (c) => (() => {
801
- var u = lt();
802
- return l(u, () => c.label), u;
798
+ children: (d) => (() => {
799
+ var g = st();
800
+ return c(g, () => d.label), g;
803
801
  })()
804
- })), l(w, i(E, {
802
+ })), c(w, a(E, {
805
803
  get each() {
806
- return n().map((c) => c.id);
804
+ return n().map((d) => d.id);
807
805
  },
808
- children: (c) => {
809
- const u = () => n().find((r) => r.id === c);
806
+ children: (d) => {
807
+ const g = () => n().find((r) => r.id === d);
810
808
  return (() => {
811
- var r = st();
812
- return l(r, i(E, {
809
+ var r = lt();
810
+ return c(r, a(E, {
813
811
  get each() {
814
- return a()?.columns ?? [];
812
+ return o()?.columns ?? [];
815
813
  },
816
- children: (p, o) => {
817
- const f = () => u()?.cells[o()] ?? null;
814
+ children: (f, i) => {
815
+ const y = () => g()?.cells[i()] ?? null;
818
816
  return (() => {
819
817
  var T = ct();
820
- return l(T, (() => {
821
- var v = O(() => f() === null);
822
- return () => v() ? "" : String(f());
818
+ return c(T, (() => {
819
+ var p = C(() => y() === null);
820
+ return () => p() ? "" : String(y());
823
821
  })()), T;
824
822
  })();
825
823
  }
@@ -830,41 +828,41 @@ function dt(t) {
830
828
  })();
831
829
  }
832
830
  function vt(t) {
833
- const e = M(() => t.runtime.document), n = {
831
+ const e = V(() => t.runtime.document), n = {
834
832
  runtime: () => t.runtime,
835
833
  document: e,
836
834
  registry: () => t.registry,
837
835
  onActionError: () => t.onActionError
838
836
  };
839
- return i(fe.Provider, {
837
+ return a(fe.Provider, {
840
838
  value: n,
841
839
  get children() {
842
- return [i(x, {
840
+ return [a(x, {
843
841
  get when() {
844
842
  return e().rootId;
845
843
  },
846
844
  keyed: !0,
847
- children: (a) => i(Y, {
848
- nodeId: a
845
+ children: (o) => a(Y, {
846
+ nodeId: o
849
847
  })
850
- }), O(() => t.children)];
848
+ }), C(() => t.children)];
851
849
  }
852
850
  });
853
851
  }
854
852
  G(["click"]);
855
853
  export {
856
- Re as ArrayControl,
854
+ Oe as ArrayControl,
857
855
  vt as DocumentRoot,
858
- ze as ErrorSummary,
859
- Ne as FieldErrors,
856
+ Ge as ErrorSummary,
857
+ Be as FieldErrors,
860
858
  ie as FieldWidget,
861
- me as FormContext,
859
+ ge as FormContext,
862
860
  pt as FormRoot,
863
861
  Q as NodeRenderer,
864
- He as ObjectLayout,
865
- We as createDefaultRegistry,
862
+ We as ObjectLayout,
863
+ Je as createDefaultRegistry,
866
864
  ht as createForm,
867
865
  yt as useField,
868
- q as useFormContext,
869
- M as useStore
866
+ F as useFormContext,
867
+ V as useStore
870
868
  };