@nivaro/react 0.3.35 → 0.3.37

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 (106) hide show
  1. package/dist/components/slots/CommentsSlot.js +44 -36
  2. package/dist/full.css +1 -1
  3. package/dist/hooks/useSessionRecorder.js +1 -1
  4. package/dist/index.d.ts +13 -4
  5. package/dist/shared/components/AgentBadge.js +26 -0
  6. package/dist/shared/components/AgentQuestionsCard.js +198 -0
  7. package/dist/shared/components/ItemEditForm.js +3329 -3263
  8. package/dist/shared/components/McpConnectionScope.js +480 -0
  9. package/dist/shared/components/MyWorkView.js +223 -208
  10. package/dist/shared/components/RecordReadView.js +620 -572
  11. package/dist/shared/components/chat/ChatPanel.js +683 -671
  12. package/dist/shared/components/imports/DownloadSampleButton.js +69 -0
  13. package/dist/shared/components/imports/ImportConsole.js +106 -104
  14. package/dist/shared/components/imports/RunDetailSheet.js +11 -10
  15. package/dist/shared/components/item-edit/FieldAffordances.js +32 -32
  16. package/dist/shared/components/item-edit/FormTour.js +279 -0
  17. package/dist/shared/components/item-edit/GroupSection.js +377 -360
  18. package/dist/shared/components/item-edit/PersonalDefaultControl.js +80 -63
  19. package/dist/shared/components/item-edit/entry/EntryStrip.js +30 -26
  20. package/dist/shared/components/item-edit/form-density.js +36 -0
  21. package/dist/shared/components/item-edit/useFormUsageBeacon.js +59 -46
  22. package/dist/shared/components/item-edit/usePersonalDefaults.js +312 -296
  23. package/dist/shared/components/layout-editor/AddPanel.js +349 -192
  24. package/dist/shared/components/layout-editor/DesignNode.js +146 -131
  25. package/dist/shared/components/layout-editor/EditorCanvas.js +25 -17
  26. package/dist/shared/components/layout-editor/EditorTopBar.js +268 -206
  27. package/dist/shared/components/layout-editor/LayoutEditor.js +810 -731
  28. package/dist/shared/components/layout-editor/PlaceTools.js +334 -0
  29. package/dist/shared/components/layout-editor/SlashInsert.js +252 -0
  30. package/dist/shared/components/layout-editor/StructureMenu.js +285 -242
  31. package/dist/shared/components/layout-editor/add-target.js +54 -43
  32. package/dist/shared/components/layout-editor/ai-forms/AiComposer.js +238 -155
  33. package/dist/shared/components/layout-editor/ai-forms/AiFormsButton.js +1 -1
  34. package/dist/shared/components/layout-editor/ai-forms/ai-forms-api.js +15 -12
  35. package/dist/shared/components/layout-editor/dnd/LayoutDndProvider.js +379 -185
  36. package/dist/shared/components/layout-editor/dnd/TrashZone.js +96 -0
  37. package/dist/shared/components/layout-editor/dnd/UndoChip.js +76 -0
  38. package/dist/shared/components/layout-editor/dnd/merge-drop.js +33 -0
  39. package/dist/shared/components/layout-editor/dnd/multi-drop.js +87 -0
  40. package/dist/shared/components/layout-editor/dnd/node.js +115 -105
  41. package/dist/shared/components/layout-editor/dnd/rail-drop.js +4 -4
  42. package/dist/shared/components/layout-editor/dnd/sensors.js +23 -0
  43. package/dist/shared/components/layout-editor/dnd/trash-drop.js +58 -0
  44. package/dist/shared/components/layout-editor/dnd/trash-links.js +97 -0
  45. package/dist/shared/components/layout-editor/even-row.js +86 -0
  46. package/dist/shared/components/layout-editor/field-list.js +99 -0
  47. package/dist/shared/components/layout-editor/format-painter.js +102 -0
  48. package/dist/shared/components/layout-editor/grid-guides.js +15 -13
  49. package/dist/shared/components/layout-editor/inspector/BehaviourSettings.js +150 -132
  50. package/dist/shared/components/layout-editor/inspector/BulkInspector.js +57 -53
  51. package/dist/shared/components/layout-editor/inspector/EvenRowAction.js +31 -0
  52. package/dist/shared/components/layout-editor/inspector/GroupInspector.js +154 -141
  53. package/dist/shared/components/layout-editor/inspector/Inspector.js +209 -178
  54. package/dist/shared/components/layout-editor/inspector/LookTab.js +106 -98
  55. package/dist/shared/components/layout-editor/inspector/RulesTab.js +38 -37
  56. package/dist/shared/components/layout-editor/inspector/kit.js +280 -223
  57. package/dist/shared/components/layout-editor/keyboard-move.js +15 -15
  58. package/dist/shared/components/layout-editor/lint/LabelStyle.js +201 -0
  59. package/dist/shared/components/layout-editor/lint/LintPanel.js +132 -84
  60. package/dist/shared/components/layout-editor/lint/lint-api.js +65 -28
  61. package/dist/shared/components/layout-editor/nav/NavTools.js +14 -12
  62. package/dist/shared/components/layout-editor/nav/ZoomControls.js +145 -0
  63. package/dist/shared/components/layout-editor/nav/useEditorNav.js +34 -32
  64. package/dist/shared/components/layout-editor/nav/view-prefs.js +100 -15
  65. package/dist/shared/components/layout-editor/outputs/LayoutFile.js +89 -0
  66. package/dist/shared/components/layout-editor/outputs/OutputsButton.js +272 -195
  67. package/dist/shared/components/layout-editor/outputs/layout-file-plan.js +176 -0
  68. package/dist/shared/components/layout-editor/outputs/output-api.js +71 -37
  69. package/dist/shared/components/layout-editor/overview/describe-conditions.js +16 -11
  70. package/dist/shared/components/layout-editor/overview/purpose.js +5 -5
  71. package/dist/shared/components/layout-editor/panel-frame.js +1 -1
  72. package/dist/shared/components/layout-editor/parity-keys.json.js +1 -1
  73. package/dist/shared/components/layout-editor/personal-default-marks.js +40 -0
  74. package/dist/shared/components/layout-editor/pin.js +37 -19
  75. package/dist/shared/components/layout-editor/place-clip.js +257 -0
  76. package/dist/shared/components/layout-editor/preview/PreviewModes.js +27 -26
  77. package/dist/shared/components/layout-editor/preview/PreviewPanes.js +149 -118
  78. package/dist/shared/components/layout-editor/preview/SampleRecord.js +113 -0
  79. package/dist/shared/components/layout-editor/preview/preview-model.js +79 -60
  80. package/dist/shared/components/layout-editor/preview/sample-record.js +105 -0
  81. package/dist/shared/components/layout-editor/removed-log.js +151 -0
  82. package/dist/shared/components/layout-editor/reuse/LibraryRows.js +109 -78
  83. package/dist/shared/components/layout-editor/reuse/linked-sections.js +373 -0
  84. package/dist/shared/components/layout-editor/revert-element.js +140 -0
  85. package/dist/shared/components/layout-editor/section-structure.js +193 -170
  86. package/dist/shared/components/layout-editor/settings/EntrySection.js +63 -45
  87. package/dist/shared/components/layout-editor/settings/LayoutSection.js +63 -32
  88. package/dist/shared/components/layout-editor/settings/ResolveSettings.js +179 -137
  89. package/dist/shared/components/layout-editor/settings/WhoSection.js +18 -17
  90. package/dist/shared/components/layout-editor/settings/settings-registry.js +24 -0
  91. package/dist/shared/components/layout-editor/shortcuts.js +21 -16
  92. package/dist/shared/components/layout-editor/structure-ops.js +221 -195
  93. package/dist/shared/components/layout-editor/usage/UsagePanel.js +133 -85
  94. package/dist/shared/components/layout-editor/usage/refusal-lens.js +130 -0
  95. package/dist/shared/components/layout-editor/usage/usage-api.js +12 -11
  96. package/dist/shared/components/panels/CommentPanel.js +47 -45
  97. package/dist/shared/components/panels/RevisionsPanel.js +66 -64
  98. package/dist/shared/components/panels/TaskPanel.js +395 -332
  99. package/dist/shared/components/profile/AgentsPanel.js +196 -147
  100. package/dist/shared/components/profile/ConnectionRollback.js +329 -0
  101. package/dist/shared/components/profile/MyDefaultsCard.js +526 -520
  102. package/dist/shared/lib/entry-config.js +22 -22
  103. package/dist/shared/lib/form-usage-beacon.js +91 -55
  104. package/dist/shared/lib/layout-lint.js +530 -284
  105. package/dist/shared/lib/layout-resolve.js +58 -44
  106. package/package.json +1 -1
@@ -1,41 +1,48 @@
1
- import { jsxs as p, jsx as t, Fragment as Y } from "react/jsx-runtime";
2
- import { CopyPlus as F, Group as X, SquareSplitVertical as z, Columns3 as Q, Merge as Z, Ungroup as ee, Shuffle as te, ClipboardCopy as ne, PinOff as re, Pin as oe, ArrowLeft as se } from "lucide-react";
3
- import { useState as O, useRef as ie, useCallback as ae, useEffect as R, useMemo as w } from "react";
4
- import { toast as A } from "sonner";
5
- import { stickyGroupKey as le } from "../../lib/form-structure.js";
6
- import { UNGROUPED_KEY as ce, isCanvasSlot as de } from "../../lib/layout-ops.js";
7
- import { cn as $, titleCase as ue } from "../../lib/utils.js";
8
- import { Checkbox as L } from "../ui/checkbox.js";
9
- import { Popover as pe, PopoverAnchor as me, PopoverContent as fe } from "../ui/popover.js";
10
- import { STRUCTURE_MENU_EVENT as j, duplicateKeys as he } from "./ArrangeButton.js";
11
- import { ArrangeButton as dt, openStructureMenu as ut } from "./ArrangeButton.js";
12
- import { readOverrides as ge } from "./inspector/model.js";
13
- import { isTyping as ke } from "./is-typing.js";
14
- import { splitPlan as xe, splitBlocked as ye, rowPlan as ve, rowBlocked as we, joinTarget as Ne, joinPlan as be, joinBlocked as Ce } from "./section-structure.js";
15
- import { tintCard as Pe, effectText as S } from "./panel-style.js";
16
- import { duplicatePlan as U, convertChoices as M, groupName as N, rulesOf as K, ruleSet as V, ruleTargets as Se, copyRulesPlan as Ee, RULE_LABELS as Ae, kindWord as T, wrapPlan as Oe, duplicateBlocked as $e, unwrapPlan as Te, unwrapBlocked as _e, pinPlan as De } from "./structure-ops.js";
17
- import { isPinned as P } from "./pin.js";
18
- function Re(e) {
1
+ import { jsxs as f, jsx as t, Fragment as Z } from "react/jsx-runtime";
2
+ import { CopyPlus as ee, Group as te, SquareSplitVertical as ne, Columns3 as re, AlignHorizontalSpaceAround as oe, Merge as ie, Ungroup as se, Shuffle as ae, ClipboardCopy as le, PinOff as U, Pin as j, ArrowLeft as ce } from "lucide-react";
3
+ import { useState as R, useRef as de, useCallback as ue, useEffect as M, useMemo as P } from "react";
4
+ import { toast as $ } from "sonner";
5
+ import { stickyGroupKey as pe } from "../../lib/form-structure.js";
6
+ import { UNGROUPED_KEY as he, isCanvasSlot as me } from "../../lib/layout-ops.js";
7
+ import { cn as T, titleCase as fe } from "../../lib/utils.js";
8
+ import { Checkbox as K } from "../ui/checkbox.js";
9
+ import { Popover as ge, PopoverAnchor as ke, PopoverContent as xe } from "../ui/popover.js";
10
+ import { STRUCTURE_MENU_EVENT as V, duplicateKeys as ye } from "./ArrangeButton.js";
11
+ import { ArrangeButton as vt, openStructureMenu as wt } from "./ArrangeButton.js";
12
+ import { evenRowPlan as ve, evenRowBlocked as we } from "./even-row.js";
13
+ import { readOverrides as Ne } from "./inspector/model.js";
14
+ import { isTyping as Pe } from "./is-typing.js";
15
+ import { tintCard as be, effectText as O } from "./panel-style.js";
16
+ import { isPinned as E, isPlacementPinned as N, placementOf as A } from "./pin.js";
17
+ import { splitPlan as Ce, splitBlocked as Se, rowPlan as Ee, rowBlocked as Ae, joinTarget as Oe, joinPlan as _e, joinBlocked as $e } from "./section-structure.js";
18
+ import { duplicatePlan as F, convertChoices as H, groupName as b, rulesOf as W, ruleSet as G, ruleTargets as Re, copyRulesPlan as Te, RULE_LABELS as De, kindWord as D, wrapPlan as Be, duplicateBlocked as Le, unwrapPlan as Ue, unwrapBlocked as je, pinPlan as Me, fieldPinPlan as Ke, fieldPinBlocked as Ve } from "./structure-ops.js";
19
+ function qe(e) {
19
20
  if (!e) return null;
20
- const s = e.indexOf(":"), o = e.slice(0, s), c = e.slice(s + 1);
21
- if (o === "group") return { kind: "group", key: c };
22
- if (o === "header") return { kind: "header", field: c };
21
+ const i = e.indexOf(":"), o = e.slice(0, i), l = e.slice(i + 1);
22
+ if (o === "group") return { kind: "group", key: l };
23
+ if (o === "header") return { kind: "header", field: l };
23
24
  if (o !== "field" && o !== "slot") return null;
24
- const r = c.lastIndexOf(":"), n = c.slice(r + 1);
25
- return { kind: o, field: c.slice(0, r), group_key: n === "" ? null : n };
25
+ const a = l.lastIndexOf(":"), r = l.slice(a + 1);
26
+ return { kind: o, field: l.slice(0, a), group_key: r === "" ? null : r };
26
27
  }
27
- const Le = (e, s) => ({
28
- getBoundingClientRect: () => new DOMRect(e, s, 0, 0)
29
- });
30
- function it(e, s) {
31
- return w(() => {
32
- const o = new Set(e.groups.filter((r) => P(r)).map((r) => r.key)), c = le(
28
+ const Fe = (e, i) => ({
29
+ getBoundingClientRect: () => new DOMRect(e, i, 0, 0)
30
+ }), He = {
31
+ text: "Pinned",
32
+ tone: "slate",
33
+ icon: "pin",
34
+ tip: "Pinned in the editor: it keeps its spot (no dragging, no drops on it). The form people see is unchanged."
35
+ };
36
+ function gt(e, i) {
37
+ return P(() => {
38
+ const o = new Set(e.groups.filter((r) => E(r)).map((r) => r.key)), l = e.placements.some((r) => N(r)), a = pe(
33
39
  [...e.groups].filter((r) => r.parent_key === null).sort((r, n) => r.sort - n.sort)
34
40
  );
35
41
  return (r) => {
36
- const n = (s == null ? void 0 : s(r)) ?? [];
37
- if (r.kind !== "group") return n;
38
- const i = r.key === c ? [
42
+ const n = (i == null ? void 0 : i(r)) ?? [];
43
+ if (r.kind !== "group")
44
+ return l && N(A(e, r)) ? [...n, He] : n;
45
+ const c = r.key === a ? [
39
46
  ...n,
40
47
  {
41
48
  text: "Sticks to the top",
@@ -44,421 +51,457 @@ function it(e, s) {
44
51
  }
45
52
  ] : n;
46
53
  return o.has(r.key) ? [
47
- ...i,
54
+ ...c,
48
55
  {
49
56
  text: "Pinned",
50
57
  tone: "slate",
51
58
  icon: "pin",
52
59
  tip: "Pinned in the editor: it does not drag and takes no drops. The form people see is unchanged."
53
60
  }
54
- ] : i;
61
+ ] : c;
55
62
  };
56
- }, [e.groups, s]);
63
+ }, [e, i]);
57
64
  }
58
- function at({
65
+ function kt({
59
66
  bundle: e,
60
- selection: s,
67
+ selection: i,
61
68
  apply: o,
62
- onSelection: c,
63
- rootRef: r
69
+ onSelection: l,
70
+ rootRef: a,
71
+ extraItems: r
64
72
  }) {
65
- var h, x;
66
- const [n, i] = O(null), m = ie({ bundle: e, selection: s, apply: o, onSelection: c });
67
- m.current = { bundle: e, selection: s, apply: o, onSelection: c };
68
- const g = ae((d, u = {}) => d.ok ? (m.current.apply(d.ops, { label: d.label }), d.select && m.current.onSelection([d.select]), u.toastNotes && d.notes.length && A.success(d.label, { description: d.notes.join(". ") }), i(null), !0) : (A(d.reason), !1), []);
69
- R(() => {
70
- const d = (u) => {
71
- if (!(u.metaKey || u.ctrlKey) || u.altKey || u.shiftKey || u.key.toLowerCase() !== "d") return;
72
- const { bundle: a, selection: l } = m.current;
73
- if (!(!a || l.length === 0 || ke(u.target) || u.defaultPrevented) && !document.querySelector('[data-radix-popper-content-wrapper], [role="menu"]')) {
74
- if (u.preventDefault(), l.length > 1) {
75
- A("Duplicate works on one section at a time");
73
+ var p, w;
74
+ const [n, c] = R(null), u = de({ bundle: e, selection: i, apply: o, onSelection: l });
75
+ u.current = { bundle: e, selection: i, apply: o, onSelection: l };
76
+ const g = ue((d, s = {}) => d.ok ? (u.current.apply(d.ops, { label: d.label }), d.select && u.current.onSelection([d.select]), s.toastNotes && d.notes.length && $.success(d.label, { description: d.notes.join(". ") }), c(null), !0) : ($(d.reason), !1), []);
77
+ M(() => {
78
+ const d = (s) => {
79
+ if (!(s.metaKey || s.ctrlKey) || s.altKey || s.shiftKey || s.key.toLowerCase() !== "d") return;
80
+ const { bundle: m, selection: h } = u.current;
81
+ if (!(!m || h.length === 0 || Pe(s.target) || s.defaultPrevented) && !document.querySelector('[data-radix-popper-content-wrapper], [role="menu"]')) {
82
+ if (s.preventDefault(), h.length > 1) {
83
+ $("Duplicate works on one section at a time");
76
84
  return;
77
85
  }
78
- g(U(a, l[0]), { toastNotes: !0 });
86
+ g(F(m, h[0]), { toastNotes: !0 });
79
87
  }
80
88
  };
81
89
  return window.addEventListener("keydown", d), () => window.removeEventListener("keydown", d);
82
- }, [g]), R(() => {
83
- const d = (l) => {
84
- var f;
85
- return !!l && !!((f = r.current) != null && f.contains(l));
86
- }, u = (l) => {
87
- var C, D;
88
- const f = ((D = (C = l.target) == null ? void 0 : C.closest) == null ? void 0 : D.call(C, "[data-design-target]")) ?? null;
89
- if (!d(f) || !(f != null && f.closest("[data-design-canvas]")) || !m.current.bundle) return;
90
- const v = Re(f.getAttribute("data-design-target"));
91
- if (!v) return;
92
- l.preventDefault();
93
- const b = m.current.selection, G = f.getAttribute("data-design-target"), _ = b.some((J) => Be(J) === G), H = _ && b.length > 1 ? b : [v];
94
- (!_ || b.length <= 1) && m.current.onSelection([v]);
95
- const I = l.button !== 2 && l.clientX === 0 && l.clientY === 0;
96
- i({
97
- targets: H,
98
- anchor: I ? f : Le(l.clientX, l.clientY),
90
+ }, [g]), M(() => {
91
+ const d = (h) => {
92
+ var k;
93
+ return !!h && !!((k = a.current) != null && k.contains(h));
94
+ }, s = (h) => {
95
+ var S, L;
96
+ const k = ((L = (S = h.target) == null ? void 0 : S.closest) == null ? void 0 : L.call(S, "[data-design-target]")) ?? null;
97
+ if (!d(k) || !(k != null && k.closest("[data-design-canvas]")) || !u.current.bundle) return;
98
+ const y = qe(k.getAttribute("data-design-target"));
99
+ if (!y) return;
100
+ h.preventDefault();
101
+ const C = u.current.selection, X = k.getAttribute("data-design-target"), B = C.some((Q) => Ge(Q) === X), z = B && C.length > 1 ? C : [y];
102
+ (!B || C.length <= 1) && u.current.onSelection([y]);
103
+ const I = h.button !== 2 && h.clientX === 0 && h.clientY === 0;
104
+ c({
105
+ targets: z,
106
+ origin: y,
107
+ anchor: I ? k : Fe(h.clientX, h.clientY),
99
108
  view: "menu"
100
109
  });
101
- }, a = (l) => {
102
- const f = l.target;
103
- if (!d(f)) return;
104
- const v = l.detail;
105
- i({ targets: v.targets, anchor: f, view: v.view ?? "menu" });
110
+ }, m = (h) => {
111
+ const k = h.target;
112
+ if (!d(k)) return;
113
+ const y = h.detail;
114
+ c({
115
+ targets: y.targets,
116
+ origin: y.targets.length === 1 ? y.targets[0] : null,
117
+ anchor: k,
118
+ view: y.view ?? "menu"
119
+ });
106
120
  };
107
- return document.addEventListener("contextmenu", u, !0), document.addEventListener(j, a), () => {
108
- document.removeEventListener("contextmenu", u, !0), document.removeEventListener(j, a);
121
+ return document.addEventListener("contextmenu", s, !0), document.addEventListener(V, m), () => {
122
+ document.removeEventListener("contextmenu", s, !0), document.removeEventListener(V, m);
109
123
  };
110
- }, [r]);
111
- const k = w(() => ({ current: (n == null ? void 0 : n.anchor) ?? null }), [n]);
112
- return !n || !e ? null : /* @__PURE__ */ p(pe, { open: !0, onOpenChange: (d) => !d && i(null), children: [
113
- /* @__PURE__ */ t(me, { virtualRef: k }),
124
+ }, [a]);
125
+ const v = P(() => ({ current: (n == null ? void 0 : n.anchor) ?? null }), [n]);
126
+ return !n || !e ? null : /* @__PURE__ */ f(ge, { open: !0, onOpenChange: (d) => !d && c(null), children: [
127
+ /* @__PURE__ */ t(ke, { virtualRef: v }),
114
128
  /* @__PURE__ */ t(
115
- fe,
129
+ xe,
116
130
  {
117
131
  align: "start",
118
132
  className: "w-[300px] p-1.5",
119
133
  "data-structure-menu": n.view,
120
134
  onOpenAutoFocus: (d) => {
121
- var u, a;
122
- d.preventDefault(), (a = (u = d.currentTarget) == null ? void 0 : u.querySelector(
135
+ var s, m;
136
+ d.preventDefault(), (m = (s = d.currentTarget) == null ? void 0 : s.querySelector(
123
137
  '[role="menuitem"]:not([aria-disabled="true"]), input, button'
124
- )) == null || a.focus();
138
+ )) == null || m.focus();
125
139
  },
126
- children: n.view === "convert" && ((h = n.targets[0]) == null ? void 0 : h.kind) === "group" ? /* @__PURE__ */ t(
127
- Ve,
140
+ children: n.view === "convert" && ((p = n.targets[0]) == null ? void 0 : p.kind) === "group" ? /* @__PURE__ */ t(
141
+ ze,
128
142
  {
129
143
  bundle: e,
130
144
  groupKey: n.targets[0].key,
131
- onBack: () => i({ ...n, view: "menu" }),
145
+ onBack: () => c({ ...n, view: "menu" }),
132
146
  run: g
133
147
  }
134
- ) : n.view === "rules" && ((x = n.targets[0]) == null ? void 0 : x.kind) === "group" ? /* @__PURE__ */ t(
135
- We,
148
+ ) : n.view === "rules" && ((w = n.targets[0]) == null ? void 0 : w.kind) === "group" ? /* @__PURE__ */ t(
149
+ Qe,
136
150
  {
137
151
  bundle: e,
138
152
  groupKey: n.targets[0].key,
139
- onBack: () => i({ ...n, view: "menu" }),
153
+ onBack: () => c({ ...n, view: "menu" }),
140
154
  run: g
141
155
  }
142
156
  ) : /* @__PURE__ */ t(
143
- Ke,
157
+ Xe,
144
158
  {
145
159
  bundle: e,
146
160
  targets: n.targets,
147
161
  run: g,
148
- onView: (d) => i({ ...n, view: d })
162
+ onView: (d) => c({ ...n, view: d }),
163
+ extra: r == null ? void 0 : r({
164
+ targets: n.targets,
165
+ origin: n.origin,
166
+ run: g,
167
+ close: () => c(null)
168
+ })
149
169
  }
150
170
  )
151
171
  }
152
172
  )
153
173
  ] });
154
174
  }
155
- const je = (e) => (s) => {
156
- const o = e.placements.find((r) => r.field === s), c = ge(o).label;
157
- return typeof c == "string" && c || (o == null ? void 0 : o.label_override) || ue(s);
175
+ const We = (e) => (i) => {
176
+ const o = e.placements.find((a) => a.field === i), l = Ne(o).label;
177
+ return typeof l == "string" && l || (o == null ? void 0 : o.label_override) || fe(i);
158
178
  };
159
- function Be(e) {
179
+ function Ge(e) {
160
180
  return e.kind === "group" ? `group:${e.key}` : e.kind === "header" ? `header:${e.field}` : `${e.kind}:${e.field}:${e.group_key ?? ""}`;
161
181
  }
162
- const Ue = "flex w-full items-center gap-2 rounded px-2 py-1.5 text-left text-[12.5px] text-slate-700 outline-none transition-colors hover:bg-muted focus-visible:bg-muted dark:text-foreground aria-disabled:cursor-not-allowed aria-disabled:opacity-45 aria-disabled:hover:bg-transparent";
163
- function y({
182
+ const Je = "flex w-full items-center gap-2 rounded px-2 py-1.5 text-left text-[12.5px] text-slate-700 outline-none transition-colors hover:bg-muted focus-visible:bg-muted dark:text-foreground aria-disabled:cursor-not-allowed aria-disabled:opacity-45 aria-disabled:hover:bg-transparent";
183
+ function x({
164
184
  icon: e,
165
- children: s,
185
+ children: i,
166
186
  hint: o,
167
- blocked: c,
168
- onPick: r,
169
- ...n
187
+ blocked: l,
188
+ onPick: a,
189
+ ...r
170
190
  }) {
171
- return /* @__PURE__ */ p(
191
+ return /* @__PURE__ */ f(
172
192
  "button",
173
193
  {
174
194
  type: "button",
175
195
  role: "menuitem",
176
- "aria-disabled": c ? !0 : void 0,
177
- "data-tip": c ?? void 0,
196
+ "aria-disabled": l ? !0 : void 0,
197
+ "data-tip": l ?? void 0,
178
198
  onClick: () => {
179
- c || r();
199
+ l || a();
180
200
  },
181
- className: Ue,
182
- ...n,
201
+ className: Je,
202
+ ...r,
183
203
  children: [
184
204
  /* @__PURE__ */ t("span", { className: "flex h-4 w-4 shrink-0 items-center justify-center text-slate-500 dark:text-muted-foreground [&_svg]:h-3.5 [&_svg]:w-3.5", children: e }),
185
- /* @__PURE__ */ t("span", { className: "min-w-0 flex-1 truncate", children: s }),
205
+ /* @__PURE__ */ t("span", { className: "min-w-0 flex-1 truncate", children: i }),
186
206
  o && /* @__PURE__ */ t("kbd", { className: "shrink-0 font-sans text-[11px] text-slate-400 dark:text-muted-foreground", children: o })
187
207
  ]
188
208
  }
189
209
  );
190
210
  }
191
- function Me(e) {
192
- var n;
211
+ function Ye(e) {
212
+ var r;
193
213
  if (!["ArrowDown", "ArrowUp", "Home", "End"].includes(e.key)) return;
194
214
  const o = Array.from(e.currentTarget.querySelectorAll('[role="menuitem"]'));
195
215
  if (o.length === 0) return;
196
216
  e.preventDefault();
197
- const c = o.indexOf(document.activeElement), r = e.key === "Home" ? 0 : e.key === "End" ? o.length - 1 : (c + (e.key === "ArrowDown" ? 1 : -1) + o.length) % o.length;
198
- (n = o[r]) == null || n.focus();
217
+ const l = o.indexOf(document.activeElement), a = e.key === "Home" ? 0 : e.key === "End" ? o.length - 1 : (l + (e.key === "ArrowDown" ? 1 : -1) + o.length) % o.length;
218
+ (r = o[a]) == null || r.focus();
199
219
  }
200
- function Ke({
220
+ function Xe({
201
221
  bundle: e,
202
- targets: s,
222
+ targets: i,
203
223
  run: o,
204
- onView: c
224
+ onView: l,
225
+ extra: a
205
226
  }) {
206
- const r = s.length === 1 ? s[0] : null, n = (r == null ? void 0 : r.kind) === "group" && r.key !== ce ? e.groups.find((h) => h.key === r.key) ?? null : null, i = s.filter(
207
- (h) => (h.kind === "field" || h.kind === "slot") && !de(h)
208
- ), m = i.length ? Oe(e, i) : null, g = r ? $e(e, r) : "Duplicate works on one section at a time", k = n ? `${N(n)} · ${T(e, n)}` : i.length > 1 ? `${i.length} selected` : null;
209
- return /* @__PURE__ */ p("div", { role: "menu", "aria-label": "Arrange", onKeyDown: Me, className: "flex flex-col", children: [
210
- k && /* @__PURE__ */ t("p", { className: $(S, "truncate px-2 pb-1 pt-0.5"), children: k }),
227
+ const r = i.length === 1 ? i[0] : null, n = (r == null ? void 0 : r.kind) === "group" && r.key !== he ? e.groups.find((p) => p.key === r.key) ?? null : null, c = i.filter(
228
+ (p) => (p.kind === "field" || p.kind === "slot") && !me(p)
229
+ ), u = c.length ? Be(e, c) : null, g = r ? Le(e, r) : "Duplicate works on one section at a time", v = n ? `${b(n)} · ${D(e, n)}` : c.length > 1 ? `${c.length} selected` : null;
230
+ return /* @__PURE__ */ f("div", { role: "menu", "aria-label": "Arrange", onKeyDown: Ye, className: "flex flex-col", children: [
231
+ v && /* @__PURE__ */ t("p", { className: T(O, "truncate px-2 pb-1 pt-0.5"), children: v }),
211
232
  /* @__PURE__ */ t(
212
- y,
233
+ x,
213
234
  {
214
- icon: /* @__PURE__ */ t(F, {}),
215
- hint: he(),
235
+ icon: /* @__PURE__ */ t(ee, {}),
236
+ hint: ye(),
216
237
  blocked: g,
217
238
  "data-structure-action": "duplicate",
218
- onPick: () => o(U(e, r), { toastNotes: !0 }),
239
+ onPick: () => o(F(e, r), { toastNotes: !0 }),
219
240
  children: "Duplicate"
220
241
  }
221
242
  ),
222
- m && /* @__PURE__ */ t(
223
- y,
243
+ u && /* @__PURE__ */ t(
244
+ x,
224
245
  {
225
- icon: /* @__PURE__ */ t(X, {}),
226
- blocked: m.ok ? null : m.reason,
246
+ icon: /* @__PURE__ */ t(te, {}),
247
+ blocked: u.ok ? null : u.reason,
227
248
  "data-structure-action": "wrap",
228
- onPick: () => o(m),
229
- children: m.ok ? m.label.replace(/^Wrap \d+ fields?/, "Wrap") : "Wrap in a new section"
249
+ onPick: () => o(u),
250
+ children: u.ok ? u.label.replace(/^Wrap \d+ fields?/, "Wrap") : "Wrap in a new section"
230
251
  }
231
252
  ),
232
253
  r && (r.kind === "field" || r.kind === "slot") && r.group_key !== null && /* @__PURE__ */ t(
233
- y,
254
+ x,
234
255
  {
235
- icon: /* @__PURE__ */ t(z, {}),
236
- blocked: ye(e, r),
256
+ icon: /* @__PURE__ */ t(ne, {}),
257
+ blocked: Se(e, r),
237
258
  "data-structure-action": "split",
238
- onPick: () => o(xe(e, r), { toastNotes: !0 }),
259
+ onPick: () => o(Ce(e, r), { toastNotes: !0 }),
239
260
  children: "Split the section here"
240
261
  }
241
262
  ),
242
- i.length > 1 && /* @__PURE__ */ t(
243
- y,
263
+ c.length > 1 && /* @__PURE__ */ t(
264
+ x,
244
265
  {
245
- icon: /* @__PURE__ */ t(Q, {}),
246
- blocked: we(e, i),
266
+ icon: /* @__PURE__ */ t(re, {}),
267
+ blocked: Ae(e, c),
247
268
  "data-structure-action": "row",
248
- onPick: () => o(ve(e, i, je(e)), { toastNotes: !0 }),
269
+ onPick: () => o(Ee(e, c, We(e)), { toastNotes: !0 }),
249
270
  children: "Put side by side under one label"
250
271
  }
251
272
  ),
252
- n && /* @__PURE__ */ p(Y, { children: [
273
+ c.length > 0 && /* @__PURE__ */ t(
274
+ x,
275
+ {
276
+ icon: /* @__PURE__ */ t(oe, {}),
277
+ blocked: we(e, c),
278
+ "data-structure-action": "even-row",
279
+ onPick: () => o(ve(e, c)),
280
+ children: c.length > 1 ? "Even out their rows" : "Even out this row"
281
+ }
282
+ ),
283
+ n && /* @__PURE__ */ f(Z, { children: [
253
284
  /* @__PURE__ */ t(
254
- y,
285
+ x,
255
286
  {
256
- icon: /* @__PURE__ */ t(Z, {}),
257
- blocked: Ce(e, n.key),
287
+ icon: /* @__PURE__ */ t(ie, {}),
288
+ blocked: $e(e, n.key),
258
289
  "data-structure-action": "join",
259
- onPick: () => o(be(e, n.key), { toastNotes: !0 }),
290
+ onPick: () => o(_e(e, n.key), { toastNotes: !0 }),
260
291
  children: (() => {
261
- const h = Ne(e, n.key);
262
- return h ? `Join with ${N(h)}` : "Join with the next section";
292
+ const p = Oe(e, n.key);
293
+ return p ? `Join with ${b(p)}` : "Join with the next section";
263
294
  })()
264
295
  }
265
296
  ),
266
- /* @__PURE__ */ p(
267
- y,
297
+ /* @__PURE__ */ f(
298
+ x,
268
299
  {
269
- icon: /* @__PURE__ */ t(ee, {}),
270
- blocked: _e(e, n.key),
300
+ icon: /* @__PURE__ */ t(se, {}),
301
+ blocked: je(e, n.key),
271
302
  "data-structure-action": "unwrap",
272
- onPick: () => o(Te(e, n.key), { toastNotes: !0 }),
303
+ onPick: () => o(Ue(e, n.key), { toastNotes: !0 }),
273
304
  children: [
274
305
  "Unwrap: keep its fields, drop the ",
275
- T(e, n)
306
+ D(e, n)
276
307
  ]
277
308
  }
278
309
  ),
279
310
  /* @__PURE__ */ t(
280
- y,
311
+ x,
281
312
  {
282
- icon: /* @__PURE__ */ t(te, {}),
283
- blocked: M(e, n.key).length ? null : "Only sections, tabs, steps and their holders convert",
313
+ icon: /* @__PURE__ */ t(ae, {}),
314
+ blocked: H(e, n.key).length ? null : "Only sections, tabs, steps and their holders convert",
284
315
  "data-structure-action": "convert",
285
- onPick: () => c("convert"),
316
+ onPick: () => l("convert"),
286
317
  children: "Convert to…"
287
318
  }
288
319
  ),
289
320
  /* @__PURE__ */ t(
290
- y,
321
+ x,
291
322
  {
292
- icon: /* @__PURE__ */ t(ne, {}),
293
- blocked: K(n).length ? null : "Only sections, tabs and steps have these rules",
323
+ icon: /* @__PURE__ */ t(le, {}),
324
+ blocked: W(n).length ? null : "Only sections, tabs and steps have these rules",
294
325
  "data-structure-action": "rules",
295
- onPick: () => c("rules"),
326
+ onPick: () => l("rules"),
296
327
  children: "Copy rules to other sections…"
297
328
  }
298
329
  ),
299
330
  /* @__PURE__ */ t(
300
- y,
331
+ x,
301
332
  {
302
- icon: P(n) ? /* @__PURE__ */ t(re, {}) : /* @__PURE__ */ t(oe, {}),
333
+ icon: E(n) ? /* @__PURE__ */ t(U, {}) : /* @__PURE__ */ t(j, {}),
303
334
  "data-structure-action": "pin",
304
- onPick: () => o(De(e, n.key, !P(n))),
305
- children: P(n) ? "Unpin" : "Pin in the editor (no dragging)"
335
+ onPick: () => o(Me(e, n.key, !E(n))),
336
+ children: E(n) ? "Unpin" : "Pin in the editor (no dragging)"
306
337
  }
307
338
  )
308
339
  ] }),
309
- !n && i.length === 0 && /* @__PURE__ */ t("p", { className: $(S, "px-2 py-1"), children: "Select a section or fields to duplicate, wrap or convert." })
340
+ r && r.kind !== "group" && /* @__PURE__ */ t(
341
+ x,
342
+ {
343
+ icon: N(A(e, r)) ? /* @__PURE__ */ t(U, {}) : /* @__PURE__ */ t(j, {}),
344
+ blocked: Ve(e, r),
345
+ "data-structure-action": "pin-field",
346
+ onPick: () => o(Ke(e, r, !N(A(e, r)))),
347
+ children: N(A(e, r)) ? "Unpin" : "Pin in the editor (no dragging)"
348
+ }
349
+ ),
350
+ !n && c.length === 0 && !a && (!r || r.kind === "group") && /* @__PURE__ */ t("p", { className: T(O, "px-2 py-1"), children: "Select a section or fields to duplicate, wrap or convert." }),
351
+ a
310
352
  ] });
311
353
  }
312
- function E({ title: e, onBack: s }) {
313
- return /* @__PURE__ */ p("div", { className: "flex items-center gap-1.5 px-1 pb-1.5", children: [
354
+ function _({ title: e, onBack: i }) {
355
+ return /* @__PURE__ */ f("div", { className: "flex items-center gap-1.5 px-1 pb-1.5", children: [
314
356
  /* @__PURE__ */ t(
315
357
  "button",
316
358
  {
317
359
  type: "button",
318
360
  "aria-label": "Back",
319
- onClick: s,
361
+ onClick: i,
320
362
  className: "inline-flex h-6 w-6 items-center justify-center rounded text-slate-500 hover:bg-muted hover:text-slate-900 dark:text-muted-foreground dark:hover:text-foreground",
321
- children: /* @__PURE__ */ t(se, { className: "h-3.5 w-3.5" })
363
+ children: /* @__PURE__ */ t(ce, { className: "h-3.5 w-3.5" })
322
364
  }
323
365
  ),
324
366
  /* @__PURE__ */ t("p", { className: "min-w-0 flex-1 truncate text-[13px] font-semibold text-slate-900 dark:text-foreground", children: e })
325
367
  ] });
326
368
  }
327
- const q = "inline-flex h-7 shrink-0 items-center rounded-md bg-nvr-cyan px-3 text-[12px] font-medium text-white transition-opacity hover:opacity-90 disabled:pointer-events-none disabled:opacity-40";
328
- function W({ notes: e }) {
329
- return e.length === 0 ? null : /* @__PURE__ */ t("ul", { className: "mt-1 list-disc space-y-0.5 pl-4 text-[12px] leading-snug text-slate-600 dark:text-muted-foreground", children: e.map((s) => /* @__PURE__ */ t("li", { children: s }, s)) });
369
+ const J = "inline-flex h-7 shrink-0 items-center rounded-md bg-nvr-cyan px-3 text-[12px] font-medium text-white transition-opacity hover:opacity-90 disabled:pointer-events-none disabled:opacity-40";
370
+ function Y({ notes: e }) {
371
+ return e.length === 0 ? null : /* @__PURE__ */ t("ul", { className: "mt-1 list-disc space-y-0.5 pl-4 text-[12px] leading-snug text-slate-600 dark:text-muted-foreground", children: e.map((i) => /* @__PURE__ */ t("li", { children: i }, i)) });
330
372
  }
331
- function Ve({
373
+ function ze({
332
374
  bundle: e,
333
- groupKey: s,
375
+ groupKey: i,
334
376
  onBack: o,
335
- run: c
377
+ run: l
336
378
  }) {
337
- const r = e.groups.find((i) => i.key === s), n = w(() => M(e, s), [e, s]);
338
- return r ? /* @__PURE__ */ p("div", { "data-structure-convert": "", className: "flex flex-col", children: [
339
- /* @__PURE__ */ t(E, { title: `Convert ${N(r)}`, onBack: o }),
340
- /* @__PURE__ */ t("div", { className: "space-y-1.5", children: n.map((i) => /* @__PURE__ */ p("div", { "data-convert-choice": i.to, className: $(Pe, "p-2.5"), children: [
341
- /* @__PURE__ */ p("div", { className: "flex items-center gap-2", children: [
342
- /* @__PURE__ */ t("p", { className: "min-w-0 flex-1 text-[12.5px] font-medium text-slate-900 dark:text-foreground", children: i.title }),
379
+ const a = e.groups.find((n) => n.key === i), r = P(() => H(e, i), [e, i]);
380
+ return a ? /* @__PURE__ */ f("div", { "data-structure-convert": "", className: "flex flex-col", children: [
381
+ /* @__PURE__ */ t(_, { title: `Convert ${b(a)}`, onBack: o }),
382
+ /* @__PURE__ */ t("div", { className: "space-y-1.5", children: r.map((n) => /* @__PURE__ */ f("div", { "data-convert-choice": n.to, className: T(be, "p-2.5"), children: [
383
+ /* @__PURE__ */ f("div", { className: "flex items-center gap-2", children: [
384
+ /* @__PURE__ */ t("p", { className: "min-w-0 flex-1 text-[12.5px] font-medium text-slate-900 dark:text-foreground", children: n.title }),
343
385
  /* @__PURE__ */ t(
344
386
  "button",
345
387
  {
346
388
  type: "button",
347
- disabled: !i.plan.ok,
348
- onClick: () => c(i.plan),
349
- className: q,
389
+ disabled: !n.plan.ok,
390
+ onClick: () => l(n.plan),
391
+ className: J,
350
392
  children: "Convert"
351
393
  }
352
394
  )
353
395
  ] }),
354
- i.plan.ok ? /* @__PURE__ */ t(W, { notes: i.plan.notes }) : /* @__PURE__ */ t("p", { className: "mt-1 text-[12px] leading-snug text-amber-700 dark:text-amber-300", children: i.plan.reason })
355
- ] }, i.to)) })
356
- ] }) : /* @__PURE__ */ t(E, { title: "That section is no longer here", onBack: o });
396
+ n.plan.ok ? /* @__PURE__ */ t(Y, { notes: n.plan.notes }) : /* @__PURE__ */ t("p", { className: "mt-1 text-[12px] leading-snug text-amber-700 dark:text-amber-300", children: n.plan.reason })
397
+ ] }, n.to)) })
398
+ ] }) : /* @__PURE__ */ t(_, { title: "That section is no longer here", onBack: o });
357
399
  }
358
- const qe = (e, s) => {
359
- if (!V(e, s)) return "none: clears it";
400
+ const Ie = (e, i) => {
401
+ if (!G(e, i)) return "none: clears it";
360
402
  try {
361
- const o = JSON.parse(String(e[s])).length;
362
- return s === "visible_when" ? `${o} condition${o === 1 ? "" : "s"}` : `${o} role${o === 1 ? "" : "s"}`;
403
+ const o = JSON.parse(String(e[i])).length;
404
+ return i === "visible_when" ? `${o} condition${o === 1 ? "" : "s"}` : `${o} role${o === 1 ? "" : "s"}`;
363
405
  } catch {
364
406
  return "set";
365
407
  }
366
- }, B = "h-4 w-4 rounded border-slate-300 data-[state=checked]:border-nvr-cyan data-[state=checked]:bg-nvr-cyan data-[state=checked]:text-white dark:border-slate-600 [&_svg]:h-3 [&_svg]:w-3";
367
- function We({
408
+ }, q = "h-4 w-4 rounded border-slate-300 data-[state=checked]:border-nvr-cyan data-[state=checked]:bg-nvr-cyan data-[state=checked]:text-white dark:border-slate-600 [&_svg]:h-3 [&_svg]:w-3";
409
+ function Qe({
368
410
  bundle: e,
369
- groupKey: s,
411
+ groupKey: i,
370
412
  onBack: o,
371
- run: c
413
+ run: l
372
414
  }) {
373
- const r = e.groups.find((a) => a.key === s), n = r ? K(r) : [], [i, m] = O(() => {
374
- const a = r ? n.filter((l) => V(r, l)) : [];
375
- return a.length ? a : n;
376
- }), g = w(() => Se(e, s), [e, s]), [k, h] = O([]), x = w(
377
- () => Ee(e, s, k, i),
378
- [e, s, k, i]
415
+ const a = e.groups.find((s) => s.key === i), r = a ? W(a) : [], [n, c] = R(() => {
416
+ const s = a ? r.filter((m) => G(a, m)) : [];
417
+ return s.length ? s : r;
418
+ }), u = P(() => Re(e, i), [e, i]), [g, v] = R([]), p = P(
419
+ () => Te(e, i, g, n),
420
+ [e, i, g, n]
379
421
  );
380
- if (!r) return /* @__PURE__ */ t(E, { title: "That section is no longer here", onBack: o });
381
- const d = (a, l) => a.includes(l) ? a.filter((f) => f !== l) : [...a, l], u = k.length === g.length && g.length > 0;
382
- return /* @__PURE__ */ p("div", { "data-structure-rules": "", className: "flex flex-col", children: [
383
- /* @__PURE__ */ t(E, { title: `Copy the rules of ${N(r)}`, onBack: o }),
384
- /* @__PURE__ */ p("fieldset", { className: "m-0 min-w-0 border-0 p-0 px-1", children: [
422
+ if (!a) return /* @__PURE__ */ t(_, { title: "That section is no longer here", onBack: o });
423
+ const w = (s, m) => s.includes(m) ? s.filter((h) => h !== m) : [...s, m], d = g.length === u.length && u.length > 0;
424
+ return /* @__PURE__ */ f("div", { "data-structure-rules": "", className: "flex flex-col", children: [
425
+ /* @__PURE__ */ t(_, { title: `Copy the rules of ${b(a)}`, onBack: o }),
426
+ /* @__PURE__ */ f("fieldset", { className: "m-0 min-w-0 border-0 p-0 px-1", children: [
385
427
  /* @__PURE__ */ t("legend", { className: "pb-1 text-[12px] font-medium text-slate-700 dark:text-foreground", children: "Rules" }),
386
- n.map((a) => (
428
+ r.map((s) => (
387
429
  // biome-ignore lint/a11y/noLabelWithoutControl: the Radix checkbox is the control
388
- /* @__PURE__ */ p("label", { className: "flex items-center gap-2 py-0.5 text-[12.5px]", children: [
430
+ /* @__PURE__ */ f("label", { className: "flex items-center gap-2 py-0.5 text-[12.5px]", children: [
389
431
  /* @__PURE__ */ t(
390
- L,
432
+ K,
391
433
  {
392
- checked: i.includes(a),
393
- onCheckedChange: () => m((l) => d(l, a)),
394
- className: B
434
+ checked: n.includes(s),
435
+ onCheckedChange: () => c((m) => w(m, s)),
436
+ className: q
395
437
  }
396
438
  ),
397
- /* @__PURE__ */ t("span", { className: "min-w-0 flex-1 truncate text-slate-800 dark:text-foreground", children: Ae[a] }),
398
- /* @__PURE__ */ t("span", { className: "shrink-0 text-[11.5px] text-slate-500 dark:text-muted-foreground", children: qe(r, a) })
399
- ] }, a)
439
+ /* @__PURE__ */ t("span", { className: "min-w-0 flex-1 truncate text-slate-800 dark:text-foreground", children: De[s] }),
440
+ /* @__PURE__ */ t("span", { className: "shrink-0 text-[11.5px] text-slate-500 dark:text-muted-foreground", children: Ie(a, s) })
441
+ ] }, s)
400
442
  ))
401
443
  ] }),
402
- /* @__PURE__ */ p("fieldset", { className: "m-0 mt-2 min-w-0 border-0 p-0 px-1", children: [
403
- /* @__PURE__ */ p("div", { className: "flex items-center pb-1", children: [
444
+ /* @__PURE__ */ f("fieldset", { className: "m-0 mt-2 min-w-0 border-0 p-0 px-1", children: [
445
+ /* @__PURE__ */ f("div", { className: "flex items-center pb-1", children: [
404
446
  /* @__PURE__ */ t("legend", { className: "flex-1 text-[12px] font-medium text-slate-700 dark:text-foreground", children: "Onto" }),
405
447
  /* @__PURE__ */ t(
406
448
  "button",
407
449
  {
408
450
  type: "button",
409
- onClick: () => h(u ? [] : g.map((a) => a.key)),
451
+ onClick: () => v(d ? [] : u.map((s) => s.key)),
410
452
  className: "text-[12px] font-medium text-sky-700 hover:underline dark:text-nvr-cyan",
411
- children: u ? "None" : "All"
453
+ children: d ? "None" : "All"
412
454
  }
413
455
  )
414
456
  ] }),
415
- /* @__PURE__ */ p("div", { className: "max-h-[200px] overflow-y-auto", children: [
416
- g.length === 0 && /* @__PURE__ */ t("p", { className: S, children: "No other sections on this form." }),
417
- g.map((a) => (
457
+ /* @__PURE__ */ f("div", { className: "max-h-[200px] overflow-y-auto", children: [
458
+ u.length === 0 && /* @__PURE__ */ t("p", { className: O, children: "No other sections on this form." }),
459
+ u.map((s) => (
418
460
  // biome-ignore lint/a11y/noLabelWithoutControl: the Radix checkbox is the control
419
- /* @__PURE__ */ p(
461
+ /* @__PURE__ */ f(
420
462
  "label",
421
463
  {
422
- "data-rules-target": a.key,
464
+ "data-rules-target": s.key,
423
465
  className: "flex items-center gap-2 py-0.5 text-[12.5px]",
424
466
  children: [
425
467
  /* @__PURE__ */ t(
426
- L,
468
+ K,
427
469
  {
428
- checked: k.includes(a.key),
429
- onCheckedChange: () => h((l) => d(l, a.key)),
430
- className: B
470
+ checked: g.includes(s.key),
471
+ onCheckedChange: () => v((m) => w(m, s.key)),
472
+ className: q
431
473
  }
432
474
  ),
433
- /* @__PURE__ */ t("span", { className: "min-w-0 flex-1 truncate text-slate-800 dark:text-foreground", children: N(a) }),
434
- /* @__PURE__ */ t("span", { className: "shrink-0 text-[11.5px] text-slate-500 dark:text-muted-foreground", children: T(e, a) })
475
+ /* @__PURE__ */ t("span", { className: "min-w-0 flex-1 truncate text-slate-800 dark:text-foreground", children: b(s) }),
476
+ /* @__PURE__ */ t("span", { className: "shrink-0 text-[11.5px] text-slate-500 dark:text-muted-foreground", children: D(e, s) })
435
477
  ]
436
478
  },
437
- a.key
479
+ s.key
438
480
  )
439
481
  ))
440
482
  ] })
441
483
  ] }),
442
- /* @__PURE__ */ p("div", { className: "mt-2 border-t border-slate-100 px-1 pt-2 dark:border-border", children: [
443
- x.ok ? /* @__PURE__ */ t(W, { notes: x.notes }) : k.length > 0 && /* @__PURE__ */ t("p", { className: S, children: x.reason }),
484
+ /* @__PURE__ */ f("div", { className: "mt-2 border-t border-slate-100 px-1 pt-2 dark:border-border", children: [
485
+ p.ok ? /* @__PURE__ */ t(Y, { notes: p.notes }) : g.length > 0 && /* @__PURE__ */ t("p", { className: O, children: p.reason }),
444
486
  /* @__PURE__ */ t("div", { className: "mt-2 flex justify-end", children: /* @__PURE__ */ t(
445
487
  "button",
446
488
  {
447
489
  type: "button",
448
- disabled: !x.ok,
490
+ disabled: !p.ok,
449
491
  "data-rules-apply": "",
450
- onClick: () => c(x),
451
- className: q,
452
- children: x.ok ? `Copy to ${x.ops.length}` : "Copy"
492
+ onClick: () => l(p),
493
+ className: J,
494
+ children: p.ok ? `Copy to ${p.ops.length}` : "Copy"
453
495
  }
454
496
  ) })
455
497
  ] })
456
498
  ] });
457
499
  }
458
500
  export {
459
- dt as ArrangeButton,
460
- at as StructureActions,
461
- ut as openStructureMenu,
462
- Re as parseTargetKey,
463
- it as usePinMarks
501
+ vt as ArrangeButton,
502
+ x as MenuItem,
503
+ kt as StructureActions,
504
+ wt as openStructureMenu,
505
+ qe as parseTargetKey,
506
+ gt as usePinMarks
464
507
  };