@nivaro/react 0.2.53 → 0.2.54

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 (191) hide show
  1. package/dist/full.css +1 -1
  2. package/dist/hooks/useSessionRecorder.js +1 -1
  3. package/dist/index.d.ts +113 -2
  4. package/dist/layout-editor.d.ts +248 -2
  5. package/dist/shared/components/FormWhatsNew.js +60 -0
  6. package/dist/shared/components/ItemEditForm.js +4058 -3942
  7. package/dist/shared/components/RecordReadView.js +219 -211
  8. package/dist/shared/components/TipLayer.js +27 -27
  9. package/dist/shared/components/help-videos/api.js +51 -41
  10. package/dist/shared/components/help-videos/editor/DetailsTab.js +147 -130
  11. package/dist/shared/components/item-edit/FieldAffordances.js +7 -6
  12. package/dist/shared/components/item-edit/FieldRow.js +353 -304
  13. package/dist/shared/components/item-edit/FormHelpVideoButton.js +59 -0
  14. package/dist/shared/components/item-edit/GroupSection.js +419 -396
  15. package/dist/shared/components/item-edit/HeaderTools.js +59 -56
  16. package/dist/shared/components/item-edit/LayoutContentBlock.js +47 -24
  17. package/dist/shared/components/item-edit/lock-why.js +87 -0
  18. package/dist/shared/components/item-edit/useFormUsageBeacon.js +59 -0
  19. package/dist/shared/components/layout-editor/AddPanel.js +204 -146
  20. package/dist/shared/components/layout-editor/ArrangeButton.js +34 -0
  21. package/dist/shared/components/layout-editor/AutoArrange.js +86 -0
  22. package/dist/shared/components/layout-editor/CanvasCompare.js +79 -0
  23. package/dist/shared/components/layout-editor/ChangeNote.js +146 -0
  24. package/dist/shared/components/layout-editor/CollabParts.js +170 -0
  25. package/dist/shared/components/layout-editor/DesignNode.js +304 -115
  26. package/dist/shared/components/layout-editor/EditorCanvas.js +21 -20
  27. package/dist/shared/components/layout-editor/EditorTopBar.js +452 -175
  28. package/dist/shared/components/layout-editor/FindReplace.js +188 -0
  29. package/dist/shared/components/layout-editor/FormMapButton.js +141 -0
  30. package/dist/shared/components/layout-editor/HistoryPanel.js +234 -109
  31. package/dist/shared/components/layout-editor/LayoutEditor.js +1101 -307
  32. package/dist/shared/components/layout-editor/LayoutsRail.js +94 -67
  33. package/dist/shared/components/layout-editor/NoteMarker.js +38 -0
  34. package/dist/shared/components/layout-editor/PlacementsTable.js +187 -0
  35. package/dist/shared/components/layout-editor/ScheduleChange.js +106 -0
  36. package/dist/shared/components/layout-editor/SessionHistory.js +84 -0
  37. package/dist/shared/components/layout-editor/StructureMenu.js +413 -0
  38. package/dist/shared/components/layout-editor/UnsavedConfirm.js +103 -0
  39. package/dist/shared/components/layout-editor/ai/AiToolsButton.js +625 -0
  40. package/dist/shared/components/layout-editor/ai/ChangeCheck.js +153 -0
  41. package/dist/shared/components/layout-editor/ai/ai-tools-api.js +80 -0
  42. package/dist/shared/components/layout-editor/ai/assist-ops.js +38 -0
  43. package/dist/shared/components/layout-editor/ai/autofill-ops.js +73 -0
  44. package/dist/shared/components/layout-editor/ai/canvas-capture.js +41 -0
  45. package/dist/shared/components/layout-editor/ai-forms/AiComposer.js +271 -0
  46. package/dist/shared/components/layout-editor/ai-forms/AiFormsButton.js +182 -0
  47. package/dist/shared/components/layout-editor/ai-forms/MeaningSuggestions.js +109 -0
  48. package/dist/shared/components/layout-editor/ai-forms/SlimPanel.js +170 -0
  49. package/dist/shared/components/layout-editor/ai-forms/ai-forms-api.js +40 -0
  50. package/dist/shared/components/layout-editor/ai-forms/pending.js +25 -0
  51. package/dist/shared/components/layout-editor/ai-forms/plan.js +263 -0
  52. package/dist/shared/components/layout-editor/ai-rules/AiAskPopover.js +160 -0
  53. package/dist/shared/components/layout-editor/ai-rules/CascadeWriter.js +175 -0
  54. package/dist/shared/components/layout-editor/ai-rules/FieldRuleWriter.js +97 -0
  55. package/dist/shared/components/layout-editor/ai-rules/RuleWriter.js +94 -0
  56. package/dist/shared/components/layout-editor/ai-rules/ValidationSuggest.js +153 -0
  57. package/dist/shared/components/layout-editor/ai-rules/api.js +6 -0
  58. package/dist/shared/components/layout-editor/ai-text/AiTextTools.js +383 -0
  59. package/dist/shared/components/layout-editor/ai-text/text-ops.js +125 -0
  60. package/dist/shared/components/layout-editor/assist/AskPanel.js +278 -0
  61. package/dist/shared/components/layout-editor/assist/ExplainDiff.js +93 -0
  62. package/dist/shared/components/layout-editor/assist/ProposalsButton.js +150 -0
  63. package/dist/shared/components/layout-editor/assist/assist-api.js +63 -0
  64. package/dist/shared/components/layout-editor/assist/jump.js +142 -0
  65. package/dist/shared/components/layout-editor/assist/settings-index.js +118 -0
  66. package/dist/shared/components/layout-editor/auto-arrange.js +101 -0
  67. package/dist/shared/components/layout-editor/bulk/BulkChangesButton.js +221 -0
  68. package/dist/shared/components/layout-editor/bulk/BulkRun.js +237 -0
  69. package/dist/shared/components/layout-editor/bulk/MacrosPanel.js +230 -0
  70. package/dist/shared/components/layout-editor/bulk/bulk-api.js +65 -0
  71. package/dist/shared/components/layout-editor/bulk/field-labels.js +22 -0
  72. package/dist/shared/components/layout-editor/bulk/macro-record.js +142 -0
  73. package/dist/shared/components/layout-editor/bulk/useMacroRecorder.js +65 -0
  74. package/dist/shared/components/layout-editor/bundle-to-active.js +1 -0
  75. package/dist/shared/components/layout-editor/canvas-diff.js +157 -0
  76. package/dist/shared/components/layout-editor/collab/FormFollowShare.js +342 -0
  77. package/dist/shared/components/layout-editor/collab/collab-api.js +77 -0
  78. package/dist/shared/components/layout-editor/commands/CommandPalette.js +221 -0
  79. package/dist/shared/components/layout-editor/commands/intents.js +214 -0
  80. package/dist/shared/components/layout-editor/commands/parse.js +242 -0
  81. package/dist/shared/components/layout-editor/design-context.js +26 -6
  82. package/dist/shared/components/layout-editor/dnd/LayoutDndProvider.js +179 -163
  83. package/dist/shared/components/layout-editor/dnd/collision.js +25 -23
  84. package/dist/shared/components/layout-editor/dnd/rail-drop.js +56 -0
  85. package/dist/shared/components/layout-editor/draft-recovery.js +61 -0
  86. package/dist/shared/components/layout-editor/editor-notes.js +78 -0
  87. package/dist/shared/components/layout-editor/editors/swap-config.js +1 -0
  88. package/dist/shared/components/layout-editor/explain/CanvasRules.js +142 -0
  89. package/dist/shared/components/layout-editor/explain/default-ghosts.js +81 -0
  90. package/dist/shared/components/layout-editor/explain/driver-hover.js +62 -0
  91. package/dist/shared/components/layout-editor/explain/field-sources.js +246 -0
  92. package/dist/shared/components/layout-editor/explain/rule-graph.js +215 -0
  93. package/dist/shared/components/layout-editor/explain/use-explain.js +132 -0
  94. package/dist/shared/components/layout-editor/field-zones.js +116 -0
  95. package/dist/shared/components/layout-editor/form-map.js +138 -0
  96. package/dist/shared/components/layout-editor/history-api.js +87 -0
  97. package/dist/shared/components/layout-editor/inheritance.js +55 -0
  98. package/dist/shared/components/layout-editor/inspect/inspect-api.js +66 -0
  99. package/dist/shared/components/layout-editor/inspect/picker-preview.js +48 -0
  100. package/dist/shared/components/layout-editor/inspect/width-fit.js +87 -0
  101. package/dist/shared/components/layout-editor/inspector/AiFillSetting.js +85 -0
  102. package/dist/shared/components/layout-editor/inspector/Breadcrumb.js +36 -0
  103. package/dist/shared/components/layout-editor/inspector/BulkInspector.js +175 -0
  104. package/dist/shared/components/layout-editor/inspector/ColumnFit.js +112 -0
  105. package/dist/shared/components/layout-editor/inspector/GroupInspector.js +146 -92
  106. package/dist/shared/components/layout-editor/inspector/HelpTab.js +174 -0
  107. package/dist/shared/components/layout-editor/inspector/Inspector.js +256 -175
  108. package/dist/shared/components/layout-editor/inspector/LookTab.js +46 -40
  109. package/dist/shared/components/layout-editor/inspector/OverrideNotice.js +61 -0
  110. package/dist/shared/components/layout-editor/inspector/PickerPreview.js +134 -0
  111. package/dist/shared/components/layout-editor/inspector/PickerTab.js +167 -141
  112. package/dist/shared/components/layout-editor/inspector/RulesTab.js +175 -128
  113. package/dist/shared/components/layout-editor/inspector/Translations.js +156 -0
  114. package/dist/shared/components/layout-editor/inspector/kit.js +3 -3
  115. package/dist/shared/components/layout-editor/inspector/tab-request.js +21 -0
  116. package/dist/shared/components/layout-editor/is-typing.js +9 -0
  117. package/dist/shared/components/layout-editor/keyboard-move.js +66 -0
  118. package/dist/shared/components/layout-editor/lint/LintPanel.js +190 -0
  119. package/dist/shared/components/layout-editor/lint/lint-api.js +52 -0
  120. package/dist/shared/components/layout-editor/load-error.js +37 -0
  121. package/dist/shared/components/layout-editor/matrix/FieldStateMatrix.js +305 -0
  122. package/dist/shared/components/layout-editor/matrix/MatrixGrid.js +181 -0
  123. package/dist/shared/components/layout-editor/matrix/RoleSectionMatrix.js +147 -0
  124. package/dist/shared/components/layout-editor/matrix/matrix-api.js +48 -0
  125. package/dist/shared/components/layout-editor/matrix/role-matrix.js +36 -0
  126. package/dist/shared/components/layout-editor/matrix/state-matrix.js +145 -0
  127. package/dist/shared/components/layout-editor/nav/FindPanel.js +109 -0
  128. package/dist/shared/components/layout-editor/nav/NavTools.js +114 -0
  129. package/dist/shared/components/layout-editor/nav/OutlinePanel.js +228 -0
  130. package/dist/shared/components/layout-editor/nav/ShortcutSheet.js +31 -0
  131. package/dist/shared/components/layout-editor/nav/find.js +20 -0
  132. package/dist/shared/components/layout-editor/nav/tree.js +142 -0
  133. package/dist/shared/components/layout-editor/nav/useEditorNav.js +101 -0
  134. package/dist/shared/components/layout-editor/nav/view-prefs.js +34 -0
  135. package/dist/shared/components/layout-editor/ops/ChangeRequestsPanel.js +143 -0
  136. package/dist/shared/components/layout-editor/ops/DependencyDiagram.js +179 -0
  137. package/dist/shared/components/layout-editor/ops/LayoutOpsBlocks.js +92 -0
  138. package/dist/shared/components/layout-editor/ops/PromotePanel.js +287 -0
  139. package/dist/shared/components/layout-editor/ops/ops-api.js +122 -0
  140. package/dist/shared/components/layout-editor/overview/OverviewActions.js +15 -3
  141. package/dist/shared/components/layout-editor/overview/describe-conditions.js +18 -14
  142. package/dist/shared/components/layout-editor/overview/overview-api.js +105 -88
  143. package/dist/shared/components/layout-editor/panel-style.js +8 -7
  144. package/dist/shared/components/layout-editor/parity-keys.json.js +4 -0
  145. package/dist/shared/components/layout-editor/pin.js +25 -0
  146. package/dist/shared/components/layout-editor/presence.js +111 -0
  147. package/dist/shared/components/layout-editor/preview/PreviewModes.js +224 -0
  148. package/dist/shared/components/layout-editor/preview/PreviewPanes.js +262 -0
  149. package/dist/shared/components/layout-editor/preview/preview-api.js +57 -0
  150. package/dist/shared/components/layout-editor/preview/preview-model.js +157 -0
  151. package/dist/shared/components/layout-editor/reuse/FieldMapStep.js +70 -0
  152. package/dist/shared/components/layout-editor/reuse/FormMoreMenu.js +127 -0
  153. package/dist/shared/components/layout-editor/reuse/LibraryRows.js +150 -0
  154. package/dist/shared/components/layout-editor/reuse/NewFormStart.js +20 -0
  155. package/dist/shared/components/layout-editor/reuse/SectionReuseActions.js +291 -0
  156. package/dist/shared/components/layout-editor/reuse/field-match.js +77 -0
  157. package/dist/shared/components/layout-editor/reuse/reuse-api.js +73 -0
  158. package/dist/shared/components/layout-editor/reuse/seed.js +13 -0
  159. package/dist/shared/components/layout-editor/reuse/useFormFromRecord.js +43 -0
  160. package/dist/shared/components/layout-editor/reuse/useRailCopy.js +34 -0
  161. package/dist/shared/components/layout-editor/settings/FormSettings.js +123 -103
  162. package/dist/shared/components/layout-editor/settings/InheritanceSection.js +1 -1
  163. package/dist/shared/components/layout-editor/settings/ToolsSection.js +174 -100
  164. package/dist/shared/components/layout-editor/settings/WhoSection.js +136 -100
  165. package/dist/shared/components/layout-editor/settings/controls.js +8 -8
  166. package/dist/shared/components/layout-editor/settings/settings-registry.js +35 -11
  167. package/dist/shared/components/layout-editor/shortcuts.js +88 -0
  168. package/dist/shared/components/layout-editor/show-when.js +35 -0
  169. package/dist/shared/components/layout-editor/slot-names.js +4 -3
  170. package/dist/shared/components/layout-editor/structure-ops.js +399 -0
  171. package/dist/shared/components/layout-editor/testing/CostLimitSetting.js +42 -0
  172. package/dist/shared/components/layout-editor/testing/TestingPanels.js +551 -0
  173. package/dist/shared/components/layout-editor/testing/testing-api.js +67 -0
  174. package/dist/shared/components/layout-editor/testing/testing-model.js +393 -0
  175. package/dist/shared/components/layout-editor/testing/use-record-check.js +44 -0
  176. package/dist/shared/components/layout-editor/toolbar-kit.js +242 -0
  177. package/dist/shared/components/layout-editor/unsaved-marks.js +72 -0
  178. package/dist/shared/components/layout-editor/usage/FillChip.js +27 -0
  179. package/dist/shared/components/layout-editor/usage/UsagePanel.js +158 -0
  180. package/dist/shared/components/layout-editor/usage/suggest-sections.js +55 -0
  181. package/dist/shared/components/layout-editor/usage/usage-api.js +104 -0
  182. package/dist/shared/components/layout-editor/useLayoutDraft.js +573 -307
  183. package/dist/shared/components/support/SuggestFormChange.js +143 -0
  184. package/dist/shared/lib/ai-fill.js +37 -0
  185. package/dist/shared/lib/form-usage-beacon.js +84 -0
  186. package/dist/shared/lib/layout-i18n.js +66 -0
  187. package/dist/shared/lib/layout-lint.js +490 -0
  188. package/dist/shared/lib/layout-ops.js +110 -106
  189. package/dist/shared/lib/screenshot.js +54 -28
  190. package/dist/shared/lib/visible-when.js +34 -0
  191. package/package.json +1 -1
@@ -0,0 +1,36 @@
1
+ import { asArray as a } from "../inspector/model.js";
2
+ const l = ["edit", "readonly", "hidden"], d = (e, n) => a(e).some((r) => String(r).toUpperCase() === n.toUpperCase()), _ = /* @__PURE__ */ new Set(["section", "metadata", "tab"]);
3
+ function f(e, n) {
4
+ return d(e.hidden_for_roles, n) ? "hidden" : d(e.locked_for_roles, n) ? "readonly" : "edit";
5
+ }
6
+ const i = (e) => e.length ? JSON.stringify(e) : null;
7
+ function s(e, n) {
8
+ return a(e).map(String).filter((r) => r.toUpperCase() !== n.toUpperCase());
9
+ }
10
+ function h(e, n, r) {
11
+ if (f(e, n) === r) return [];
12
+ const t = s(e.hidden_for_roles, n), o = s(e.locked_for_roles, n);
13
+ return r === "hidden" && t.push(n), r === "readonly" && o.push(n), [
14
+ {
15
+ op: "group_update",
16
+ key: e.key,
17
+ patch: { hidden_for_roles: i(t), locked_for_roles: i(o) }
18
+ }
19
+ ];
20
+ }
21
+ const u = {
22
+ edit: "Can edit",
23
+ readonly: "Read-only",
24
+ hidden: "Hidden"
25
+ };
26
+ function p(e, n, r) {
27
+ return r === "hidden" ? `Hide ${e} from ${n}` : r === "readonly" ? `Make ${e} read-only for ${n}` : `Let ${n} edit ${e}`;
28
+ }
29
+ export {
30
+ u as ACCESS_LABEL,
31
+ l as ROLE_ACCESS,
32
+ _ as ROLE_SECTION_TYPES,
33
+ f as roleAccess,
34
+ p as roleAccessLabel,
35
+ h as roleAccessOps
36
+ };
@@ -0,0 +1,145 @@
1
+ import { keyOf as A } from "../field-zones.js";
2
+ import { readOverrides as E, lockConditionsOf as L, withKey as O, lockConditionsColumn as F } from "../inspector/model.js";
3
+ const D = ["normal", "readonly", "required", "hidden"], y = { ok: !0 }, h = (e) => ({ ok: !1, why: e });
4
+ function b(e) {
5
+ const n = E(e);
6
+ return n.hidden === !0 ? "hidden" : n.readonly === !0 ? "readonly" : n.required === !0 ? "required" : "normal";
7
+ }
8
+ function H(e, n) {
9
+ if (b(e) === n) return [];
10
+ let t = E(e);
11
+ for (const r of ["hidden", "readonly", "required"])
12
+ t = O(t ?? {}, r, n === r ? !0 : void 0);
13
+ return [{ op: "update_placement", at: A(e), patch: { overrides: t } }];
14
+ }
15
+ function $(e, n) {
16
+ return L(e).some(
17
+ (t) => t.type === "pipeline_state" && (t.state_keys ?? []).includes(n)
18
+ );
19
+ }
20
+ function j(e, n, t, r) {
21
+ const s = L(e).map((i) => ({ ...i }));
22
+ if (r) {
23
+ if ($(e, t)) return s;
24
+ const i = s.find(
25
+ (o) => o.type === "pipeline_state" && (!o.pipeline_id || o.pipeline_id === n)
26
+ );
27
+ return i ? i.state_keys = [...i.state_keys ?? [], t] : s.push({ type: "pipeline_state", pipeline_id: n, state_keys: [t] }), s;
28
+ }
29
+ return s.flatMap((i) => {
30
+ if (i.type !== "pipeline_state" || !(i.state_keys ?? []).includes(t)) return [i];
31
+ const o = (i.state_keys ?? []).filter((a) => a !== t);
32
+ return o.length ? [{ ...i, state_keys: o }] : [];
33
+ });
34
+ }
35
+ function _(e, n, t, r) {
36
+ return $(e, t) === r ? [] : [
37
+ {
38
+ op: "update_placement",
39
+ at: A(e),
40
+ patch: { lock_conditions: F(j(e, n, t, r)) }
41
+ }
42
+ ];
43
+ }
44
+ const k = (e) => e && e.type === "record_fields" && e.optional !== !0 && Array.isArray(e.fields) ? e.fields.map(String) : [], C = (e, n) => (e.requirements ?? []).some((t) => k(t).includes(n)), S = (e, n) => e.filter((t) => t.from_state != null && String(t.from_state) === n.id), x = (e, n) => e.filter((t) => t.from_state == null && C(t, n));
45
+ function M(e, n, t) {
46
+ return S(e, n).filter((r) => C(r, t));
47
+ }
48
+ const m = {
49
+ normal: "editable",
50
+ hidden: "hidden",
51
+ readonly: "read-only",
52
+ required: "required"
53
+ }, v = (e) => e.map((n) => `"${n.label}"`).join(", ");
54
+ function N(e, n, t) {
55
+ const r = b(e), s = $(e, n.key), i = M(t, n, e.field), o = x(t, e.field), a = S(t, n), u = i.length > 0 || o.length > 0, l = h(
56
+ `${m[r][0].toUpperCase()}${m[r].slice(1)} on every state — change it in Every state`
57
+ ), f = h(
58
+ "A field cannot be hidden in one state only. Hide it in Every state, or put it in a section with a Show when rule."
59
+ );
60
+ if (r === "hidden" || r === "readonly")
61
+ return {
62
+ value: r,
63
+ because: `${m[r][0].toUpperCase()}${m[r].slice(1)} on every state`,
64
+ conflict: null,
65
+ options: {
66
+ normal: l,
67
+ readonly: r === "readonly" ? y : l,
68
+ required: l,
69
+ hidden: r === "hidden" ? y : l
70
+ }
71
+ };
72
+ let c = "normal", d = "Editable in this state";
73
+ s ? (c = "readonly", d = `Read-only in ${n.label} (Read-only when)`) : r === "required" ? (c = "required", d = "Required on every state") : i.length ? (c = "required", d = `Required to leave ${n.label}: ${v(i)} asks for it`) : o.length && (c = "required", d = `Required by ${v(o)}, a move from any state`);
74
+ const p = s && (u || r === "required") ? `Read-only in ${n.label} but required${u ? " to move on" : ""}: nobody can fill it in here` : null, R = r === "required" ? l : o.length ? h(`Required by ${v(o)}, a move from any state — change it in the pipeline`) : y, q = r === "required" || i.length || o.length ? y : a.length === 0 ? h(`No move leaves ${n.label}, so nothing can ask for it here`) : y;
75
+ return {
76
+ value: c,
77
+ because: d,
78
+ conflict: p,
79
+ options: { normal: R, readonly: y, required: q, hidden: f }
80
+ };
81
+ }
82
+ function g(e, n, t, r) {
83
+ const s = [];
84
+ for (const i of S(e, n)) {
85
+ if (i.id == null || C(i, t) === r) continue;
86
+ const o = i.requirements ?? null, a = (o ?? []).map((l) => ({ ...l }));
87
+ let u;
88
+ if (r) {
89
+ const l = a.find(
90
+ (f) => f.type === "record_fields" && f.optional !== !0 && f.optional_when == null
91
+ );
92
+ l ? (l.fields = [...k(l), t], u = a) : u = [...a, { type: "record_fields", fields: [t] }];
93
+ } else
94
+ u = a.flatMap((l) => {
95
+ if (!k(l).includes(t)) return [l];
96
+ const f = k(l).filter((d) => d !== t);
97
+ if (f.length === 0) return [];
98
+ const c = { ...l, fields: f };
99
+ for (const d of ["labels", "copy_to_lines"]) {
100
+ const p = l[d];
101
+ if (p && typeof p == "object" && !Array.isArray(p) && t in p) {
102
+ const { [t]: R, ...q } = p;
103
+ c[d] = q;
104
+ }
105
+ }
106
+ return [c];
107
+ });
108
+ s.push({
109
+ transitionId: String(i.id),
110
+ label: i.label,
111
+ before: o,
112
+ after: u.length ? u : null
113
+ });
114
+ }
115
+ return s;
116
+ }
117
+ function T(e, n, t, r, s) {
118
+ const i = N(e, n, r);
119
+ if (!i.options[s].ok || i.value === s) return null;
120
+ const o = b(e);
121
+ return s === "readonly" ? {
122
+ ops: _(e, t, n.key, !0),
123
+ requirements: g(r, n, e.field, !1)
124
+ } : s === "required" ? {
125
+ ops: _(e, t, n.key, !1),
126
+ requirements: o === "required" ? [] : g(r, n, e.field, !0)
127
+ } : {
128
+ ops: _(e, t, n.key, !1),
129
+ requirements: g(r, n, e.field, !1)
130
+ };
131
+ }
132
+ export {
133
+ D as CELL_KINDS,
134
+ x as anyStateAsks,
135
+ T as cellChange,
136
+ H as everyStateOps,
137
+ b as everyStateValue,
138
+ _ as lockOps,
139
+ $ as lockedIn,
140
+ S as movesFrom,
141
+ M as requiredToLeave,
142
+ g as requirementChanges,
143
+ N as stateCell,
144
+ j as withStateLock
145
+ };
@@ -0,0 +1,109 @@
1
+ import { jsxs as d, jsx as r } from "react/jsx-runtime";
2
+ import { Search as y, EyeOff as w } from "lucide-react";
3
+ import { useState as x, useRef as p, useMemo as v, useEffect as h } from "react";
4
+ import { cn as N } from "../../../lib/utils.js";
5
+ import { findHits as $, kindWord as D } from "./find.js";
6
+ const A = "h-8 w-full rounded-md border border-slate-200 bg-white pl-7 pr-2.5 text-[12.5px] text-slate-800 outline-none placeholder:text-slate-400 focus:border-nvr-cyan dark:border-border dark:bg-background dark:text-foreground dark:placeholder:text-muted-foreground";
7
+ function M({
8
+ nodes: c,
9
+ onPick: u,
10
+ focusSeq: g = 0
11
+ }) {
12
+ const [a, b] = x(""), [o, s] = x(0), i = p(null), f = p(null), n = v(() => $(c, a), [c, a]), m = n.filter((e) => e.node.hidden).length;
13
+ h(() => {
14
+ var e, t;
15
+ (e = i.current) == null || e.focus(), (t = i.current) == null || t.select();
16
+ }, [g]);
17
+ const k = (e) => {
18
+ b(e), s(0);
19
+ };
20
+ return h(() => {
21
+ var e, t, l;
22
+ (l = (t = (e = f.current) == null ? void 0 : e.querySelector(`[data-find-index="${o}"]`)) == null ? void 0 : t.scrollIntoView) == null || l.call(t, { block: "nearest" });
23
+ }, [o]), /* @__PURE__ */ d("div", { "data-editor-find": "", className: "flex flex-col", children: [
24
+ /* @__PURE__ */ d("div", { className: "relative p-2", children: [
25
+ /* @__PURE__ */ r(y, { className: "pointer-events-none absolute left-4 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-slate-400" }),
26
+ /* @__PURE__ */ r(
27
+ "input",
28
+ {
29
+ ref: i,
30
+ value: a,
31
+ onChange: (e) => k(e.target.value),
32
+ onKeyDown: (e) => {
33
+ if (e.key === "ArrowDown" || e.key === "ArrowUp") {
34
+ if (e.preventDefault(), n.length === 0) return;
35
+ const t = e.key === "ArrowDown" ? 1 : -1;
36
+ s((l) => (l + t + n.length) % n.length);
37
+ } else if (e.key === "Enter") {
38
+ e.preventDefault();
39
+ const t = n[o];
40
+ t && u(t);
41
+ }
42
+ },
43
+ placeholder: "Find a field by label or key",
44
+ "aria-label": "Find on the form",
45
+ "aria-controls": "layout-find-results",
46
+ "aria-activedescendant": n[o] ? `layout-find-${o}` : void 0,
47
+ className: A
48
+ }
49
+ )
50
+ ] }),
51
+ a.trim() !== "" && /* @__PURE__ */ r(
52
+ "p",
53
+ {
54
+ role: "status",
55
+ "data-find-count": n.length,
56
+ className: "px-3 pb-1 text-[11.5px] text-slate-500 dark:text-muted-foreground",
57
+ children: n.length === 0 ? "Nothing on this form matches." : `${n.length === 50 ? "50+" : n.length} ${n.length === 1 ? "match" : "matches"}${m > 0 ? ` · ${m} hidden` : ""}`
58
+ }
59
+ ),
60
+ /* @__PURE__ */ r(
61
+ "div",
62
+ {
63
+ ref: f,
64
+ id: "layout-find-results",
65
+ role: "listbox",
66
+ "aria-label": "Matches",
67
+ className: "max-h-[320px] overflow-y-auto overscroll-contain px-1 pb-1",
68
+ children: n.map((e, t) => /* @__PURE__ */ d(
69
+ "button",
70
+ {
71
+ id: `layout-find-${t}`,
72
+ type: "button",
73
+ role: "option",
74
+ "aria-selected": t === o,
75
+ "data-find-index": t,
76
+ "data-find-hit": e.node.id,
77
+ onMouseEnter: () => s(t),
78
+ onClick: () => u(e),
79
+ className: N(
80
+ "flex w-full flex-col items-start rounded-md px-2 py-1.5 text-left",
81
+ t === o ? "bg-accent" : "hover:bg-muted"
82
+ ),
83
+ children: [
84
+ /* @__PURE__ */ d("span", { className: "flex w-full min-w-0 items-center gap-1.5", children: [
85
+ /* @__PURE__ */ r("span", { className: "truncate text-[12.5px] font-medium text-slate-800 dark:text-foreground", children: e.node.label }),
86
+ e.node.hidden && /* @__PURE__ */ d("span", { className: "inline-flex shrink-0 items-center gap-0.5 rounded bg-slate-100 px-1 text-[10.5px] font-medium text-slate-600 dark:bg-muted dark:text-muted-foreground", children: [
87
+ /* @__PURE__ */ r(w, { className: "h-2.5 w-2.5" }),
88
+ "Hidden"
89
+ ] }),
90
+ e.node.inherited && /* @__PURE__ */ r("span", { className: "shrink-0 rounded bg-violet-50 px-1 text-[10.5px] font-medium text-violet-700 dark:bg-violet-500/15 dark:text-violet-300", children: "Inherited" })
91
+ ] }),
92
+ /* @__PURE__ */ d("span", { className: "w-full truncate text-[11px] text-slate-500 dark:text-muted-foreground", children: [
93
+ D(e.node),
94
+ e.where && ` · ${e.where}`,
95
+ " · ",
96
+ /* @__PURE__ */ r("span", { className: "font-mono", children: e.node.key })
97
+ ] })
98
+ ]
99
+ },
100
+ e.node.id
101
+ ))
102
+ }
103
+ ),
104
+ /* @__PURE__ */ r("p", { className: "border-t border-slate-100 px-3 py-1.5 text-[11px] leading-snug text-slate-500 dark:border-border dark:text-muted-foreground", children: "Hidden fields, and fields a rule hides, are found too. Picking one turns on Show hidden when the form would not show it." })
105
+ ] });
106
+ }
107
+ export {
108
+ M as FindPanel
109
+ };
@@ -0,0 +1,114 @@
1
+ import { jsxs as a, jsx as e, Fragment as p } from "react/jsx-runtime";
2
+ import { Search as s, ListTree as i, ZoomOut as d, ChevronsUpDown as h, ChevronsDownUp as m, Keyboard as u } from "lucide-react";
3
+ import { Popover as l, PopoverContent as r } from "../../ui/popover.js";
4
+ import { keyLabels as b } from "../shortcuts.js";
5
+ import { ToolButton as n } from "../toolbar-kit.js";
6
+ import { FindPanel as C } from "./FindPanel.js";
7
+ import { ShortcutSheet as f } from "./ShortcutSheet.js";
8
+ const t = (o) => b(o).join("");
9
+ function F({ find: o }) {
10
+ return /* @__PURE__ */ a(l, { open: o.open, onOpenChange: o.onOpenChange, children: [
11
+ /* @__PURE__ */ e(
12
+ n,
13
+ {
14
+ popover: !0,
15
+ onOpen: () => o.onOpenChange(!0),
16
+ label: "Find on this form",
17
+ icon: /* @__PURE__ */ e(s, { className: "h-4 w-4" }),
18
+ kbd: t(["mod", "f"]),
19
+ tip: `Find a field by label or key (${t(["mod", "f"])})`,
20
+ active: o.open,
21
+ data: { "data-editor-find-button": "" }
22
+ }
23
+ ),
24
+ /* @__PURE__ */ e(
25
+ r,
26
+ {
27
+ align: "start",
28
+ className: "w-[340px] p-0",
29
+ onOpenAutoFocus: (c) => c.preventDefault(),
30
+ onCloseAutoFocus: o.onCloseAutoFocus,
31
+ children: o.open && /* @__PURE__ */ e(C, { nodes: o.nodes, onPick: o.onPick, focusSeq: o.focusSeq })
32
+ }
33
+ )
34
+ ] });
35
+ }
36
+ function N({ outline: o }) {
37
+ return o ? /* @__PURE__ */ e(
38
+ n,
39
+ {
40
+ label: "Outline",
41
+ icon: /* @__PURE__ */ e(i, { className: "h-4 w-4" }),
42
+ hint: "The form as a tree beside the canvas",
43
+ tip: o.open ? "Hide the outline" : "Show the form as a tree beside the canvas",
44
+ checked: o.open,
45
+ onClick: o.onToggle,
46
+ data: { "data-editor-outline-toggle": "" }
47
+ }
48
+ ) : null;
49
+ }
50
+ function S({ view: o }) {
51
+ return o ? /* @__PURE__ */ a(p, { children: [
52
+ /* @__PURE__ */ e(
53
+ n,
54
+ {
55
+ label: "Compact canvas",
56
+ icon: /* @__PURE__ */ e(d, { className: "h-4 w-4" }),
57
+ hint: "Smaller spacing and inputs, here only",
58
+ checked: o.compact,
59
+ onClick: () => o.onCompact(!o.compact),
60
+ data: { "data-editor-compact": "" }
61
+ }
62
+ ),
63
+ /* @__PURE__ */ e(
64
+ n,
65
+ {
66
+ label: "Expand all",
67
+ icon: /* @__PURE__ */ e(h, { className: "h-4 w-4" }),
68
+ hint: "Every step and tab shown",
69
+ onClick: o.onExpandAll,
70
+ data: { "data-editor-expand-all": "" }
71
+ }
72
+ ),
73
+ /* @__PURE__ */ e(
74
+ n,
75
+ {
76
+ label: "Collapse all",
77
+ icon: /* @__PURE__ */ e(m, { className: "h-4 w-4" }),
78
+ onClick: o.onCollapseAll,
79
+ data: { "data-editor-collapse-all": "" }
80
+ }
81
+ )
82
+ ] }) : null;
83
+ }
84
+ function T({ shortcuts: o }) {
85
+ return /* @__PURE__ */ a(l, { open: o.open, onOpenChange: o.onOpenChange, children: [
86
+ /* @__PURE__ */ e(
87
+ n,
88
+ {
89
+ popover: !0,
90
+ onOpen: () => o.onOpenChange(!0),
91
+ label: "Keyboard shortcuts",
92
+ icon: /* @__PURE__ */ e(u, { className: "h-4 w-4" }),
93
+ kbd: "?",
94
+ tip: "Keyboard shortcuts (?)",
95
+ active: o.open,
96
+ data: { "data-editor-shortcuts-button": "" }
97
+ }
98
+ ),
99
+ /* @__PURE__ */ e(
100
+ r,
101
+ {
102
+ align: "end",
103
+ className: "max-h-[min(80vh,620px)] w-[380px] overflow-y-auto overscroll-contain p-0",
104
+ children: /* @__PURE__ */ e(f, {})
105
+ }
106
+ )
107
+ ] });
108
+ }
109
+ export {
110
+ F as FindTool,
111
+ N as OutlineTool,
112
+ T as ShortcutsTool,
113
+ S as ViewTools
114
+ };
@@ -0,0 +1,228 @@
1
+ import { jsxs as b, jsx as d } from "react/jsx-runtime";
2
+ import { X as H, TextCursorInput as W, Gauge as X, LayoutPanelTop as Y, Rows3 as $, Info as z, Text as J, Columns3 as q, PanelTop as F, ListOrdered as Q, ChevronRight as Z, EyeOff as ee } from "lucide-react";
3
+ import { useState as S, useRef as te, useMemo as C, useEffect as re } from "react";
4
+ import { cn as v } from "../../../lib/utils.js";
5
+ import { targetKey as I } from "../design-context.js";
6
+ import { dropLabel as ne, orderAfterDrop as oe } from "../dnd/order.js";
7
+ import { walk as ie, KIND_WORDS as ae } from "./tree.js";
8
+ const le = {
9
+ header: F,
10
+ step: Q,
11
+ tab: F,
12
+ "steps-holder": q,
13
+ "tabs-holder": q,
14
+ section: $,
15
+ text: J,
16
+ info: z,
17
+ ungrouped: $,
18
+ panel: Y,
19
+ widget: X,
20
+ field: W
21
+ }, M = (l) => l.kind === "field" || l.kind === "slot" && l.group_key !== null;
22
+ function de(l, g) {
23
+ const s = g[0];
24
+ return (s == null ? void 0 : s.op) === "move" && (l.kind === "field" || l.kind === "slot") ? { ...l, group_key: s.to_group_key } : l;
25
+ }
26
+ function me({
27
+ bundle: l,
28
+ nodes: g,
29
+ selection: s,
30
+ onPick: K,
31
+ onMoved: P,
32
+ apply: U,
33
+ onClose: V
34
+ }) {
35
+ const [p, T] = S(() => /* @__PURE__ */ new Set()), [u, A] = S(null), [n, k] = S(null), w = te(null), O = C(() => new Set(s.map(I)), [s]), y = s.length > 0 ? I(s[s.length - 1]) : null, D = C(() => ie(g), [g]);
36
+ re(() => {
37
+ if (!y) return;
38
+ const e = D.find((r) => r.node.id === y);
39
+ e && (T((r) => {
40
+ if (!e.path.some((i) => r.has(i.id))) return r;
41
+ const t = new Set(r);
42
+ for (const i of e.path) t.delete(i.id);
43
+ return t;
44
+ }), requestAnimationFrame(
45
+ () => {
46
+ var r, t, i;
47
+ return (i = (t = (r = w.current) == null ? void 0 : r.querySelector(`[data-outline-row="${CSS.escape(y)}"]`)) == null ? void 0 : t.scrollIntoView) == null ? void 0 : i.call(t, { block: "nearest" });
48
+ }
49
+ ));
50
+ }, [y, D]);
51
+ const m = C(() => {
52
+ const e = [], r = (t, i) => {
53
+ for (const a of t)
54
+ e.push({ node: a, depth: i }), a.children.length > 0 && !p.has(a.id) && r(a.children, i + 1);
55
+ };
56
+ return r(g, 0), e;
57
+ }, [g, p]), B = m.some((e) => O.has(e.node.id)), x = (e) => T((r) => {
58
+ const t = new Set(r);
59
+ return t.has(e) ? t.delete(e) : t.add(e), t;
60
+ }), R = (e) => {
61
+ var r, t;
62
+ return (t = (r = w.current) == null ? void 0 : r.querySelectorAll("[data-outline-row]")[e]) == null ? void 0 : t.focus();
63
+ }, G = (e, r, t) => {
64
+ var i;
65
+ if (!(e.altKey || e.metaKey || e.ctrlKey)) {
66
+ if (e.key === "ArrowDown" || e.key === "ArrowUp")
67
+ e.preventDefault(), R(Math.max(0, Math.min(m.length - 1, r + (e.key === "ArrowDown" ? 1 : -1))));
68
+ else if (e.key === "ArrowRight" && t.children.length > 0 && p.has(t.id))
69
+ e.preventDefault(), x(t.id);
70
+ else if (e.key === "ArrowLeft")
71
+ if (e.preventDefault(), t.children.length > 0 && !p.has(t.id)) x(t.id);
72
+ else {
73
+ const a = (i = D.find((h) => h.node.id === t.id)) == null ? void 0 : i.path.at(-1), c = a ? m.findIndex((h) => h.node.id === a.id) : -1;
74
+ c >= 0 && R(c);
75
+ }
76
+ }
77
+ }, _ = (e) => !!e.target && !e.inherited, L = (e) => {
78
+ var r;
79
+ return e.kind === "group" ? ((r = l.groups.find((t) => t.key === e.key)) == null ? void 0 : r.parent_key) ?? null : e.kind === "slot" && e.group_key === null ? null : void 0;
80
+ }, j = (e, r) => {
81
+ if (!u || !r.target || r.inherited) return null;
82
+ const t = e.currentTarget.getBoundingClientRect(), i = M(u) && r.target.kind === "group";
83
+ if (!M(u) && u.kind !== "header" && L(r.target) !== L(u))
84
+ return null;
85
+ const a = i || e.clientY < t.top + t.height / 2 ? "before" : "after", c = oe(l, u, r.target, a);
86
+ return c.length > 0 ? { id: r.id, side: a, into: i, ops: c } : null;
87
+ }, E = () => {
88
+ A(null), k(null);
89
+ };
90
+ return /* @__PURE__ */ b("div", { "data-editor-outline": "", className: "flex h-full min-h-0 flex-col", children: [
91
+ /* @__PURE__ */ b("div", { className: "flex shrink-0 items-center justify-between border-b border-slate-200 py-1.5 pl-3 pr-1.5 dark:border-border", children: [
92
+ /* @__PURE__ */ d("p", { className: "text-[12px] font-semibold text-slate-700 dark:text-foreground", children: "Outline" }),
93
+ /* @__PURE__ */ d(
94
+ "button",
95
+ {
96
+ type: "button",
97
+ "aria-label": "Close the outline",
98
+ "data-tip": "Close the outline",
99
+ onClick: V,
100
+ className: "inline-flex h-6 w-6 items-center justify-center rounded text-slate-500 hover:bg-muted hover:text-slate-800 dark:text-muted-foreground dark:hover:text-foreground",
101
+ children: /* @__PURE__ */ d(H, { className: "h-3.5 w-3.5" })
102
+ }
103
+ )
104
+ ] }),
105
+ /* @__PURE__ */ b(
106
+ "div",
107
+ {
108
+ ref: w,
109
+ role: "tree",
110
+ "aria-label": "Form outline",
111
+ "aria-multiselectable": "true",
112
+ className: "min-h-0 flex-1 overflow-y-auto px-1 py-1",
113
+ children: [
114
+ m.length === 0 && /* @__PURE__ */ d("p", { className: "px-2 py-3 text-[12px] text-slate-500 dark:text-muted-foreground", children: "Nothing on this form yet." }),
115
+ m.map(({ node: e, depth: r }, t) => {
116
+ const i = le[e.kind], a = !p.has(e.id), c = O.has(e.id), h = (n == null ? void 0 : n.id) === e.id && !n.into ? n.side : null;
117
+ return /* @__PURE__ */ b(
118
+ "div",
119
+ {
120
+ role: "treeitem",
121
+ tabIndex: c || t === 0 && !B ? 0 : -1,
122
+ "aria-level": r + 1,
123
+ "aria-selected": c,
124
+ "aria-expanded": e.children.length > 0 ? a : void 0,
125
+ "data-outline-row": e.id,
126
+ "data-outline-kind": e.kind,
127
+ draggable: _(e),
128
+ onDragStart: (o) => {
129
+ !e.target || !_(e) || (o.dataTransfer.effectAllowed = "move", o.dataTransfer.setData("text/plain", e.label), A(e.target));
130
+ },
131
+ onDragOver: (o) => {
132
+ const f = j(o, e);
133
+ if (!f) {
134
+ (n == null ? void 0 : n.id) === e.id && k(null);
135
+ return;
136
+ }
137
+ o.preventDefault(), o.dataTransfer.dropEffect = "move", ((n == null ? void 0 : n.id) !== f.id || n.side !== f.side || n.into !== f.into) && k(f);
138
+ },
139
+ onDragLeave: (o) => {
140
+ (n == null ? void 0 : n.id) === e.id && !o.currentTarget.contains(o.relatedTarget) && k(null);
141
+ },
142
+ onDrop: (o) => {
143
+ o.preventDefault();
144
+ const f = (n == null ? void 0 : n.id) === e.id ? n : j(o, e), N = u;
145
+ E(), !(!f || !N) && (U(f.ops, { label: ne(l, N) }), P(de(N, f.ops)));
146
+ },
147
+ onDragEnd: E,
148
+ onClick: (o) => {
149
+ if (!e.target) return x(e.id);
150
+ K(e.target, { additive: o.shiftKey || o.metaKey || o.ctrlKey });
151
+ },
152
+ onKeyDown: (o) => {
153
+ G(o, t, e), (o.key === "Enter" || o.key === " ") && (o.preventDefault(), e.target ? K(e.target) : x(e.id));
154
+ },
155
+ style: { paddingLeft: 4 + r * 14 },
156
+ className: v(
157
+ "group/row relative flex h-7 cursor-pointer select-none items-center gap-1 rounded-md pr-2 text-[12.5px] outline-none focus-visible:ring-2 focus-visible:ring-nvr-cyan/60",
158
+ c ? "bg-accent text-slate-900 dark:text-foreground" : "text-slate-700 hover:bg-muted dark:text-foreground",
159
+ (n == null ? void 0 : n.id) === e.id && n.into && "ring-2 ring-inset ring-nvr-cyan",
160
+ u && I(u) === e.id && "opacity-50",
161
+ e.inherited && "text-slate-500 dark:text-muted-foreground"
162
+ ),
163
+ children: [
164
+ h && /* @__PURE__ */ d(
165
+ "span",
166
+ {
167
+ "aria-hidden": "true",
168
+ "data-outline-drop": h,
169
+ className: v(
170
+ "pointer-events-none absolute left-1 right-1 h-0.5 rounded-full bg-nvr-cyan",
171
+ h === "before" ? "-top-px" : "-bottom-px"
172
+ )
173
+ }
174
+ ),
175
+ e.children.length > 0 ? /* @__PURE__ */ d(
176
+ "button",
177
+ {
178
+ type: "button",
179
+ tabIndex: -1,
180
+ "aria-label": a ? `Fold ${e.label}` : `Unfold ${e.label}`,
181
+ onClick: (o) => {
182
+ o.stopPropagation(), x(e.id);
183
+ },
184
+ className: "inline-flex h-5 w-4 shrink-0 items-center justify-center text-slate-400 hover:text-slate-700 dark:hover:text-foreground",
185
+ children: /* @__PURE__ */ d(
186
+ Z,
187
+ {
188
+ className: v("h-3 w-3 transition-transform", a && "rotate-90")
189
+ }
190
+ )
191
+ }
192
+ ) : /* @__PURE__ */ d("span", { className: "w-4 shrink-0" }),
193
+ /* @__PURE__ */ d(
194
+ i,
195
+ {
196
+ "aria-hidden": "true",
197
+ className: "h-3.5 w-3.5 shrink-0 text-slate-400 dark:text-muted-foreground"
198
+ }
199
+ ),
200
+ /* @__PURE__ */ d(
201
+ "span",
202
+ {
203
+ "data-tip": `${ae[e.kind]} · ${e.key}`,
204
+ className: v("min-w-0 flex-1 truncate", e.kind !== "field" && "font-medium"),
205
+ children: e.label
206
+ }
207
+ ),
208
+ e.hidden && /* @__PURE__ */ d(
209
+ ee,
210
+ {
211
+ "aria-label": "Hidden",
212
+ className: "h-3 w-3 shrink-0 text-slate-400 dark:text-muted-foreground"
213
+ }
214
+ ),
215
+ e.inherited && /* @__PURE__ */ d("span", { className: "shrink-0 text-[10.5px] text-violet-600 dark:text-violet-300", children: "inherited" })
216
+ ]
217
+ },
218
+ e.id
219
+ );
220
+ })
221
+ ]
222
+ }
223
+ )
224
+ ] });
225
+ }
226
+ export {
227
+ me as OutlinePanel
228
+ };
@@ -0,0 +1,31 @@
1
+ import { jsxs as a, jsx as e } from "react/jsx-runtime";
2
+ import { Fragment as s } from "react";
3
+ import { shortcutGroups as n, keyLabels as o } from "../shortcuts.js";
4
+ function i({ keys: r }) {
5
+ return /* @__PURE__ */ e("span", { className: "inline-flex items-center gap-0.5", children: o(r).map((t) => /* @__PURE__ */ e(
6
+ "kbd",
7
+ {
8
+ className: "inline-flex h-5 min-w-[20px] items-center justify-center rounded border border-slate-200 bg-slate-50 px-1 font-sans text-[11px] font-medium text-slate-700 dark:border-border dark:bg-muted dark:text-foreground",
9
+ children: t
10
+ },
11
+ t
12
+ )) });
13
+ }
14
+ function p() {
15
+ return /* @__PURE__ */ a("div", { "data-editor-shortcuts": "", className: "flex flex-col gap-3 p-3", children: [
16
+ /* @__PURE__ */ e("p", { className: "text-[13px] font-semibold text-slate-900 dark:text-foreground", children: "Keyboard shortcuts" }),
17
+ n().map((r) => /* @__PURE__ */ a("section", { "aria-label": r.area, children: [
18
+ /* @__PURE__ */ e("p", { className: "mb-1 text-[11.5px] font-semibold text-slate-500 dark:text-muted-foreground", children: r.area }),
19
+ /* @__PURE__ */ e("dl", { className: "m-0 grid grid-cols-[1fr_auto] items-center gap-x-3 gap-y-1.5", children: r.items.map((t) => /* @__PURE__ */ a(s, { children: [
20
+ /* @__PURE__ */ e("dt", { className: "text-[12.5px] leading-snug text-slate-700 dark:text-foreground", children: t.label }),
21
+ /* @__PURE__ */ e("dd", { "data-shortcut": t.id, className: "m-0 flex flex-wrap justify-end gap-1.5", children: t.keys.map((d, l) => /* @__PURE__ */ a(s, { children: [
22
+ l > 0 && /* @__PURE__ */ e("span", { className: "text-[11px] text-slate-400 dark:text-muted-foreground", children: "or" }),
23
+ /* @__PURE__ */ e(i, { keys: d })
24
+ ] }, d.join("+"))) })
25
+ ] }, t.id)) })
26
+ ] }, r.area))
27
+ ] });
28
+ }
29
+ export {
30
+ p as ShortcutSheet
31
+ };