@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.
- package/dist/components/slots/CommentsSlot.js +44 -36
- package/dist/full.css +1 -1
- package/dist/hooks/useSessionRecorder.js +1 -1
- package/dist/index.d.ts +13 -4
- package/dist/shared/components/AgentBadge.js +26 -0
- package/dist/shared/components/AgentQuestionsCard.js +198 -0
- package/dist/shared/components/ItemEditForm.js +3329 -3263
- package/dist/shared/components/McpConnectionScope.js +480 -0
- package/dist/shared/components/MyWorkView.js +223 -208
- package/dist/shared/components/RecordReadView.js +620 -572
- package/dist/shared/components/chat/ChatPanel.js +683 -671
- package/dist/shared/components/imports/DownloadSampleButton.js +69 -0
- package/dist/shared/components/imports/ImportConsole.js +106 -104
- package/dist/shared/components/imports/RunDetailSheet.js +11 -10
- package/dist/shared/components/item-edit/FieldAffordances.js +32 -32
- package/dist/shared/components/item-edit/FormTour.js +279 -0
- package/dist/shared/components/item-edit/GroupSection.js +377 -360
- package/dist/shared/components/item-edit/PersonalDefaultControl.js +80 -63
- package/dist/shared/components/item-edit/entry/EntryStrip.js +30 -26
- package/dist/shared/components/item-edit/form-density.js +36 -0
- package/dist/shared/components/item-edit/useFormUsageBeacon.js +59 -46
- package/dist/shared/components/item-edit/usePersonalDefaults.js +312 -296
- package/dist/shared/components/layout-editor/AddPanel.js +349 -192
- package/dist/shared/components/layout-editor/DesignNode.js +146 -131
- package/dist/shared/components/layout-editor/EditorCanvas.js +25 -17
- package/dist/shared/components/layout-editor/EditorTopBar.js +268 -206
- package/dist/shared/components/layout-editor/LayoutEditor.js +810 -731
- package/dist/shared/components/layout-editor/PlaceTools.js +334 -0
- package/dist/shared/components/layout-editor/SlashInsert.js +252 -0
- package/dist/shared/components/layout-editor/StructureMenu.js +285 -242
- package/dist/shared/components/layout-editor/add-target.js +54 -43
- package/dist/shared/components/layout-editor/ai-forms/AiComposer.js +238 -155
- package/dist/shared/components/layout-editor/ai-forms/AiFormsButton.js +1 -1
- package/dist/shared/components/layout-editor/ai-forms/ai-forms-api.js +15 -12
- package/dist/shared/components/layout-editor/dnd/LayoutDndProvider.js +379 -185
- package/dist/shared/components/layout-editor/dnd/TrashZone.js +96 -0
- package/dist/shared/components/layout-editor/dnd/UndoChip.js +76 -0
- package/dist/shared/components/layout-editor/dnd/merge-drop.js +33 -0
- package/dist/shared/components/layout-editor/dnd/multi-drop.js +87 -0
- package/dist/shared/components/layout-editor/dnd/node.js +115 -105
- package/dist/shared/components/layout-editor/dnd/rail-drop.js +4 -4
- package/dist/shared/components/layout-editor/dnd/sensors.js +23 -0
- package/dist/shared/components/layout-editor/dnd/trash-drop.js +58 -0
- package/dist/shared/components/layout-editor/dnd/trash-links.js +97 -0
- package/dist/shared/components/layout-editor/even-row.js +86 -0
- package/dist/shared/components/layout-editor/field-list.js +99 -0
- package/dist/shared/components/layout-editor/format-painter.js +102 -0
- package/dist/shared/components/layout-editor/grid-guides.js +15 -13
- package/dist/shared/components/layout-editor/inspector/BehaviourSettings.js +150 -132
- package/dist/shared/components/layout-editor/inspector/BulkInspector.js +57 -53
- package/dist/shared/components/layout-editor/inspector/EvenRowAction.js +31 -0
- package/dist/shared/components/layout-editor/inspector/GroupInspector.js +154 -141
- package/dist/shared/components/layout-editor/inspector/Inspector.js +209 -178
- package/dist/shared/components/layout-editor/inspector/LookTab.js +106 -98
- package/dist/shared/components/layout-editor/inspector/RulesTab.js +38 -37
- package/dist/shared/components/layout-editor/inspector/kit.js +280 -223
- package/dist/shared/components/layout-editor/keyboard-move.js +15 -15
- package/dist/shared/components/layout-editor/lint/LabelStyle.js +201 -0
- package/dist/shared/components/layout-editor/lint/LintPanel.js +132 -84
- package/dist/shared/components/layout-editor/lint/lint-api.js +65 -28
- package/dist/shared/components/layout-editor/nav/NavTools.js +14 -12
- package/dist/shared/components/layout-editor/nav/ZoomControls.js +145 -0
- package/dist/shared/components/layout-editor/nav/useEditorNav.js +34 -32
- package/dist/shared/components/layout-editor/nav/view-prefs.js +100 -15
- package/dist/shared/components/layout-editor/outputs/LayoutFile.js +89 -0
- package/dist/shared/components/layout-editor/outputs/OutputsButton.js +272 -195
- package/dist/shared/components/layout-editor/outputs/layout-file-plan.js +176 -0
- package/dist/shared/components/layout-editor/outputs/output-api.js +71 -37
- package/dist/shared/components/layout-editor/overview/describe-conditions.js +16 -11
- package/dist/shared/components/layout-editor/overview/purpose.js +5 -5
- package/dist/shared/components/layout-editor/panel-frame.js +1 -1
- package/dist/shared/components/layout-editor/parity-keys.json.js +1 -1
- package/dist/shared/components/layout-editor/personal-default-marks.js +40 -0
- package/dist/shared/components/layout-editor/pin.js +37 -19
- package/dist/shared/components/layout-editor/place-clip.js +257 -0
- package/dist/shared/components/layout-editor/preview/PreviewModes.js +27 -26
- package/dist/shared/components/layout-editor/preview/PreviewPanes.js +149 -118
- package/dist/shared/components/layout-editor/preview/SampleRecord.js +113 -0
- package/dist/shared/components/layout-editor/preview/preview-model.js +79 -60
- package/dist/shared/components/layout-editor/preview/sample-record.js +105 -0
- package/dist/shared/components/layout-editor/removed-log.js +151 -0
- package/dist/shared/components/layout-editor/reuse/LibraryRows.js +109 -78
- package/dist/shared/components/layout-editor/reuse/linked-sections.js +373 -0
- package/dist/shared/components/layout-editor/revert-element.js +140 -0
- package/dist/shared/components/layout-editor/section-structure.js +193 -170
- package/dist/shared/components/layout-editor/settings/EntrySection.js +63 -45
- package/dist/shared/components/layout-editor/settings/LayoutSection.js +63 -32
- package/dist/shared/components/layout-editor/settings/ResolveSettings.js +179 -137
- package/dist/shared/components/layout-editor/settings/WhoSection.js +18 -17
- package/dist/shared/components/layout-editor/settings/settings-registry.js +24 -0
- package/dist/shared/components/layout-editor/shortcuts.js +21 -16
- package/dist/shared/components/layout-editor/structure-ops.js +221 -195
- package/dist/shared/components/layout-editor/usage/UsagePanel.js +133 -85
- package/dist/shared/components/layout-editor/usage/refusal-lens.js +130 -0
- package/dist/shared/components/layout-editor/usage/usage-api.js +12 -11
- package/dist/shared/components/panels/CommentPanel.js +47 -45
- package/dist/shared/components/panels/RevisionsPanel.js +66 -64
- package/dist/shared/components/panels/TaskPanel.js +395 -332
- package/dist/shared/components/profile/AgentsPanel.js +196 -147
- package/dist/shared/components/profile/ConnectionRollback.js +329 -0
- package/dist/shared/components/profile/MyDefaultsCard.js +526 -520
- package/dist/shared/lib/entry-config.js +22 -22
- package/dist/shared/lib/form-usage-beacon.js +91 -55
- package/dist/shared/lib/layout-lint.js +530 -284
- package/dist/shared/lib/layout-resolve.js +58 -44
- package/package.json +1 -1
|
@@ -1,41 +1,48 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { CopyPlus as
|
|
3
|
-
import { useState as
|
|
4
|
-
import { toast as
|
|
5
|
-
import { stickyGroupKey as
|
|
6
|
-
import { UNGROUPED_KEY as
|
|
7
|
-
import { cn as
|
|
8
|
-
import { Checkbox as
|
|
9
|
-
import { Popover as
|
|
10
|
-
import { STRUCTURE_MENU_EVENT as
|
|
11
|
-
import { ArrangeButton as
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import { tintCard as
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
|
|
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
|
|
21
|
-
if (o === "group") return { kind: "group", key:
|
|
22
|
-
if (o === "header") return { kind: "header", field:
|
|
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
|
|
25
|
-
return { kind: o, field:
|
|
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
|
|
28
|
-
getBoundingClientRect: () => new DOMRect(e,
|
|
29
|
-
})
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
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 = (
|
|
37
|
-
if (r.kind !== "group")
|
|
38
|
-
|
|
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
|
-
...
|
|
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
|
-
] :
|
|
61
|
+
] : c;
|
|
55
62
|
};
|
|
56
|
-
}, [e
|
|
63
|
+
}, [e, i]);
|
|
57
64
|
}
|
|
58
|
-
function
|
|
65
|
+
function kt({
|
|
59
66
|
bundle: e,
|
|
60
|
-
selection:
|
|
67
|
+
selection: i,
|
|
61
68
|
apply: o,
|
|
62
|
-
onSelection:
|
|
63
|
-
rootRef:
|
|
69
|
+
onSelection: l,
|
|
70
|
+
rootRef: a,
|
|
71
|
+
extraItems: r
|
|
64
72
|
}) {
|
|
65
|
-
var
|
|
66
|
-
const [n,
|
|
67
|
-
|
|
68
|
-
const g =
|
|
69
|
-
|
|
70
|
-
const d = (
|
|
71
|
-
if (!(
|
|
72
|
-
const { bundle:
|
|
73
|
-
if (!(!
|
|
74
|
-
if (
|
|
75
|
-
|
|
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(
|
|
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]),
|
|
83
|
-
const d = (
|
|
84
|
-
var
|
|
85
|
-
return !!
|
|
86
|
-
},
|
|
87
|
-
var
|
|
88
|
-
const
|
|
89
|
-
if (!d(
|
|
90
|
-
const
|
|
91
|
-
if (!
|
|
92
|
-
|
|
93
|
-
const
|
|
94
|
-
(!
|
|
95
|
-
const I =
|
|
96
|
-
|
|
97
|
-
targets:
|
|
98
|
-
|
|
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
|
-
},
|
|
102
|
-
const
|
|
103
|
-
if (!d(
|
|
104
|
-
const
|
|
105
|
-
|
|
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",
|
|
108
|
-
document.removeEventListener("contextmenu",
|
|
121
|
+
return document.addEventListener("contextmenu", s, !0), document.addEventListener(V, m), () => {
|
|
122
|
+
document.removeEventListener("contextmenu", s, !0), document.removeEventListener(V, m);
|
|
109
123
|
};
|
|
110
|
-
}, [
|
|
111
|
-
const
|
|
112
|
-
return !n || !e ? null : /* @__PURE__ */
|
|
113
|
-
/* @__PURE__ */ t(
|
|
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
|
-
|
|
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
|
|
122
|
-
d.preventDefault(), (
|
|
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 ||
|
|
138
|
+
)) == null || m.focus();
|
|
125
139
|
},
|
|
126
|
-
children: n.view === "convert" && ((
|
|
127
|
-
|
|
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: () =>
|
|
145
|
+
onBack: () => c({ ...n, view: "menu" }),
|
|
132
146
|
run: g
|
|
133
147
|
}
|
|
134
|
-
) : n.view === "rules" && ((
|
|
135
|
-
|
|
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: () =>
|
|
153
|
+
onBack: () => c({ ...n, view: "menu" }),
|
|
140
154
|
run: g
|
|
141
155
|
}
|
|
142
156
|
) : /* @__PURE__ */ t(
|
|
143
|
-
|
|
157
|
+
Xe,
|
|
144
158
|
{
|
|
145
159
|
bundle: e,
|
|
146
160
|
targets: n.targets,
|
|
147
161
|
run: g,
|
|
148
|
-
onView: (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
|
|
156
|
-
const o = e.placements.find((
|
|
157
|
-
return typeof
|
|
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
|
|
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
|
|
163
|
-
function
|
|
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:
|
|
185
|
+
children: i,
|
|
166
186
|
hint: o,
|
|
167
|
-
blocked:
|
|
168
|
-
onPick:
|
|
169
|
-
...
|
|
187
|
+
blocked: l,
|
|
188
|
+
onPick: a,
|
|
189
|
+
...r
|
|
170
190
|
}) {
|
|
171
|
-
return /* @__PURE__ */
|
|
191
|
+
return /* @__PURE__ */ f(
|
|
172
192
|
"button",
|
|
173
193
|
{
|
|
174
194
|
type: "button",
|
|
175
195
|
role: "menuitem",
|
|
176
|
-
"aria-disabled":
|
|
177
|
-
"data-tip":
|
|
196
|
+
"aria-disabled": l ? !0 : void 0,
|
|
197
|
+
"data-tip": l ?? void 0,
|
|
178
198
|
onClick: () => {
|
|
179
|
-
|
|
199
|
+
l || a();
|
|
180
200
|
},
|
|
181
|
-
className:
|
|
182
|
-
...
|
|
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:
|
|
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
|
|
192
|
-
var
|
|
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
|
|
198
|
-
(
|
|
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
|
|
220
|
+
function Xe({
|
|
201
221
|
bundle: e,
|
|
202
|
-
targets:
|
|
222
|
+
targets: i,
|
|
203
223
|
run: o,
|
|
204
|
-
onView:
|
|
224
|
+
onView: l,
|
|
225
|
+
extra: a
|
|
205
226
|
}) {
|
|
206
|
-
const r =
|
|
207
|
-
(
|
|
208
|
-
),
|
|
209
|
-
return /* @__PURE__ */
|
|
210
|
-
|
|
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
|
-
|
|
233
|
+
x,
|
|
213
234
|
{
|
|
214
|
-
icon: /* @__PURE__ */ t(
|
|
215
|
-
hint:
|
|
235
|
+
icon: /* @__PURE__ */ t(ee, {}),
|
|
236
|
+
hint: ye(),
|
|
216
237
|
blocked: g,
|
|
217
238
|
"data-structure-action": "duplicate",
|
|
218
|
-
onPick: () => o(
|
|
239
|
+
onPick: () => o(F(e, r), { toastNotes: !0 }),
|
|
219
240
|
children: "Duplicate"
|
|
220
241
|
}
|
|
221
242
|
),
|
|
222
|
-
|
|
223
|
-
|
|
243
|
+
u && /* @__PURE__ */ t(
|
|
244
|
+
x,
|
|
224
245
|
{
|
|
225
|
-
icon: /* @__PURE__ */ t(
|
|
226
|
-
blocked:
|
|
246
|
+
icon: /* @__PURE__ */ t(te, {}),
|
|
247
|
+
blocked: u.ok ? null : u.reason,
|
|
227
248
|
"data-structure-action": "wrap",
|
|
228
|
-
onPick: () => o(
|
|
229
|
-
children:
|
|
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
|
-
|
|
254
|
+
x,
|
|
234
255
|
{
|
|
235
|
-
icon: /* @__PURE__ */ t(
|
|
236
|
-
blocked:
|
|
256
|
+
icon: /* @__PURE__ */ t(ne, {}),
|
|
257
|
+
blocked: Se(e, r),
|
|
237
258
|
"data-structure-action": "split",
|
|
238
|
-
onPick: () => o(
|
|
259
|
+
onPick: () => o(Ce(e, r), { toastNotes: !0 }),
|
|
239
260
|
children: "Split the section here"
|
|
240
261
|
}
|
|
241
262
|
),
|
|
242
|
-
|
|
243
|
-
|
|
263
|
+
c.length > 1 && /* @__PURE__ */ t(
|
|
264
|
+
x,
|
|
244
265
|
{
|
|
245
|
-
icon: /* @__PURE__ */ t(
|
|
246
|
-
blocked:
|
|
266
|
+
icon: /* @__PURE__ */ t(re, {}),
|
|
267
|
+
blocked: Ae(e, c),
|
|
247
268
|
"data-structure-action": "row",
|
|
248
|
-
onPick: () => o(
|
|
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
|
-
|
|
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
|
-
|
|
285
|
+
x,
|
|
255
286
|
{
|
|
256
|
-
icon: /* @__PURE__ */ t(
|
|
257
|
-
blocked:
|
|
287
|
+
icon: /* @__PURE__ */ t(ie, {}),
|
|
288
|
+
blocked: $e(e, n.key),
|
|
258
289
|
"data-structure-action": "join",
|
|
259
|
-
onPick: () => o(
|
|
290
|
+
onPick: () => o(_e(e, n.key), { toastNotes: !0 }),
|
|
260
291
|
children: (() => {
|
|
261
|
-
const
|
|
262
|
-
return
|
|
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__ */
|
|
267
|
-
|
|
297
|
+
/* @__PURE__ */ f(
|
|
298
|
+
x,
|
|
268
299
|
{
|
|
269
|
-
icon: /* @__PURE__ */ t(
|
|
270
|
-
blocked:
|
|
300
|
+
icon: /* @__PURE__ */ t(se, {}),
|
|
301
|
+
blocked: je(e, n.key),
|
|
271
302
|
"data-structure-action": "unwrap",
|
|
272
|
-
onPick: () => o(
|
|
303
|
+
onPick: () => o(Ue(e, n.key), { toastNotes: !0 }),
|
|
273
304
|
children: [
|
|
274
305
|
"Unwrap: keep its fields, drop the ",
|
|
275
|
-
|
|
306
|
+
D(e, n)
|
|
276
307
|
]
|
|
277
308
|
}
|
|
278
309
|
),
|
|
279
310
|
/* @__PURE__ */ t(
|
|
280
|
-
|
|
311
|
+
x,
|
|
281
312
|
{
|
|
282
|
-
icon: /* @__PURE__ */ t(
|
|
283
|
-
blocked:
|
|
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: () =>
|
|
316
|
+
onPick: () => l("convert"),
|
|
286
317
|
children: "Convert to…"
|
|
287
318
|
}
|
|
288
319
|
),
|
|
289
320
|
/* @__PURE__ */ t(
|
|
290
|
-
|
|
321
|
+
x,
|
|
291
322
|
{
|
|
292
|
-
icon: /* @__PURE__ */ t(
|
|
293
|
-
blocked:
|
|
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: () =>
|
|
326
|
+
onPick: () => l("rules"),
|
|
296
327
|
children: "Copy rules to other sections…"
|
|
297
328
|
}
|
|
298
329
|
),
|
|
299
330
|
/* @__PURE__ */ t(
|
|
300
|
-
|
|
331
|
+
x,
|
|
301
332
|
{
|
|
302
|
-
icon:
|
|
333
|
+
icon: E(n) ? /* @__PURE__ */ t(U, {}) : /* @__PURE__ */ t(j, {}),
|
|
303
334
|
"data-structure-action": "pin",
|
|
304
|
-
onPick: () => o(
|
|
305
|
-
children:
|
|
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
|
-
|
|
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
|
|
313
|
-
return /* @__PURE__ */
|
|
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:
|
|
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(
|
|
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
|
|
328
|
-
function
|
|
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((
|
|
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
|
|
373
|
+
function ze({
|
|
332
374
|
bundle: e,
|
|
333
|
-
groupKey:
|
|
375
|
+
groupKey: i,
|
|
334
376
|
onBack: o,
|
|
335
|
-
run:
|
|
377
|
+
run: l
|
|
336
378
|
}) {
|
|
337
|
-
const
|
|
338
|
-
return
|
|
339
|
-
/* @__PURE__ */ t(
|
|
340
|
-
/* @__PURE__ */ t("div", { className: "space-y-1.5", children:
|
|
341
|
-
/* @__PURE__ */
|
|
342
|
-
/* @__PURE__ */ t("p", { className: "min-w-0 flex-1 text-[12.5px] font-medium text-slate-900 dark:text-foreground", children:
|
|
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: !
|
|
348
|
-
onClick: () =>
|
|
349
|
-
className:
|
|
389
|
+
disabled: !n.plan.ok,
|
|
390
|
+
onClick: () => l(n.plan),
|
|
391
|
+
className: J,
|
|
350
392
|
children: "Convert"
|
|
351
393
|
}
|
|
352
394
|
)
|
|
353
395
|
] }),
|
|
354
|
-
|
|
355
|
-
] },
|
|
356
|
-
] }) : /* @__PURE__ */ t(
|
|
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
|
|
359
|
-
if (!
|
|
400
|
+
const Ie = (e, i) => {
|
|
401
|
+
if (!G(e, i)) return "none: clears it";
|
|
360
402
|
try {
|
|
361
|
-
const o = JSON.parse(String(e[
|
|
362
|
-
return
|
|
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
|
-
},
|
|
367
|
-
function
|
|
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:
|
|
411
|
+
groupKey: i,
|
|
370
412
|
onBack: o,
|
|
371
|
-
run:
|
|
413
|
+
run: l
|
|
372
414
|
}) {
|
|
373
|
-
const
|
|
374
|
-
const
|
|
375
|
-
return
|
|
376
|
-
}),
|
|
377
|
-
() =>
|
|
378
|
-
[e,
|
|
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 (!
|
|
381
|
-
const
|
|
382
|
-
return /* @__PURE__ */
|
|
383
|
-
/* @__PURE__ */ t(
|
|
384
|
-
/* @__PURE__ */
|
|
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
|
-
|
|
428
|
+
r.map((s) => (
|
|
387
429
|
// biome-ignore lint/a11y/noLabelWithoutControl: the Radix checkbox is the control
|
|
388
|
-
/* @__PURE__ */
|
|
430
|
+
/* @__PURE__ */ f("label", { className: "flex items-center gap-2 py-0.5 text-[12.5px]", children: [
|
|
389
431
|
/* @__PURE__ */ t(
|
|
390
|
-
|
|
432
|
+
K,
|
|
391
433
|
{
|
|
392
|
-
checked:
|
|
393
|
-
onCheckedChange: () =>
|
|
394
|
-
className:
|
|
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:
|
|
398
|
-
/* @__PURE__ */ t("span", { className: "shrink-0 text-[11.5px] text-slate-500 dark:text-muted-foreground", children:
|
|
399
|
-
] },
|
|
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__ */
|
|
403
|
-
/* @__PURE__ */
|
|
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: () =>
|
|
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:
|
|
453
|
+
children: d ? "None" : "All"
|
|
412
454
|
}
|
|
413
455
|
)
|
|
414
456
|
] }),
|
|
415
|
-
/* @__PURE__ */
|
|
416
|
-
|
|
417
|
-
|
|
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__ */
|
|
461
|
+
/* @__PURE__ */ f(
|
|
420
462
|
"label",
|
|
421
463
|
{
|
|
422
|
-
"data-rules-target":
|
|
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
|
-
|
|
468
|
+
K,
|
|
427
469
|
{
|
|
428
|
-
checked:
|
|
429
|
-
onCheckedChange: () =>
|
|
430
|
-
className:
|
|
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:
|
|
434
|
-
/* @__PURE__ */ t("span", { className: "shrink-0 text-[11.5px] text-slate-500 dark:text-muted-foreground", children:
|
|
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
|
-
|
|
479
|
+
s.key
|
|
438
480
|
)
|
|
439
481
|
))
|
|
440
482
|
] })
|
|
441
483
|
] }),
|
|
442
|
-
/* @__PURE__ */
|
|
443
|
-
|
|
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: !
|
|
490
|
+
disabled: !p.ok,
|
|
449
491
|
"data-rules-apply": "",
|
|
450
|
-
onClick: () =>
|
|
451
|
-
className:
|
|
452
|
-
children:
|
|
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
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
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
|
};
|