@nivaro/react 0.2.54 → 0.2.56

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 (151) hide show
  1. package/dist/full.css +1 -1
  2. package/dist/hooks/useSessionRecorder.js +99 -98
  3. package/dist/index.d.ts +367 -2
  4. package/dist/index.js +645 -616
  5. package/dist/layout-editor.d.ts +4 -0
  6. package/dist/shared/components/BackgroundRunOffer.js +117 -0
  7. package/dist/shared/components/BroadcastView.js +214 -213
  8. package/dist/shared/components/CollectionBrowserView.js +2592 -2695
  9. package/dist/shared/components/ItemEditForm.js +4066 -3832
  10. package/dist/shared/components/JobsTray.js +100 -55
  11. package/dist/shared/components/MyWorkView.js +91 -89
  12. package/dist/shared/components/NotificationBell.js +80 -79
  13. package/dist/shared/components/ProfileView.js +568 -520
  14. package/dist/shared/components/RecordCompare.js +254 -0
  15. package/dist/shared/components/RecordReadView.js +599 -552
  16. package/dist/shared/components/ReportView.js +578 -543
  17. package/dist/shared/components/RowPresence.js +91 -0
  18. package/dist/shared/components/WidgetSlot.js +474 -458
  19. package/dist/shared/components/ai/AiAnalyticsView.js +16 -6
  20. package/dist/shared/components/ai/AskPanel.js +139 -119
  21. package/dist/shared/components/ai/FirstWeekCard.js +126 -0
  22. package/dist/shared/components/bulk/BulkFieldUpdate.js +289 -0
  23. package/dist/shared/components/bulk/bulk-field-options.js +45 -0
  24. package/dist/shared/components/charts/CumulativeFlowChart.js +176 -0
  25. package/dist/shared/components/chat/ChannelArchive.js +326 -0
  26. package/dist/shared/components/chat/ChannelExtras.js +141 -121
  27. package/dist/shared/components/chat/ChatAnalyticsView.js +112 -110
  28. package/dist/shared/components/chat/ChatPanel.js +1695 -1733
  29. package/dist/shared/components/chat/Composer.js +357 -303
  30. package/dist/shared/components/chat/MessageActions.js +92 -0
  31. package/dist/shared/components/chat/MessageFormat.js +290 -264
  32. package/dist/shared/components/chat/OutboxBubbles.js +146 -0
  33. package/dist/shared/components/chat/RequestIdCard.js +135 -0
  34. package/dist/shared/components/chat/RoomHeaderMenu.js +202 -0
  35. package/dist/shared/components/chat/RoomParts.js +213 -274
  36. package/dist/shared/components/chat/ScreenClip.js +184 -0
  37. package/dist/shared/components/chat/chat-core.js +402 -483
  38. package/dist/shared/components/chat/chat-drafts.js +59 -0
  39. package/dist/shared/components/chat/chat-emoji.js +348 -0
  40. package/dist/shared/components/chat/chat-local-time.js +41 -0
  41. package/dist/shared/components/chat/chat-outbox.js +303 -0
  42. package/dist/shared/components/chat/chat-window.js +163 -0
  43. package/dist/shared/components/chat/huddle/HuddleControls.js +143 -0
  44. package/dist/shared/components/chat/huddle/HuddleStage.js +164 -0
  45. package/dist/shared/components/chat/huddle/huddle-store.js +342 -0
  46. package/dist/shared/components/chat/huddle/useHuddle.js +58 -0
  47. package/dist/shared/components/help-videos/api.js +76 -73
  48. package/dist/shared/components/item-edit/CatalogPickerField.js +113 -112
  49. package/dist/shared/components/item-edit/ChangeReasonDialog.js +13 -13
  50. package/dist/shared/components/item-edit/FieldAffordances.js +2 -2
  51. package/dist/shared/components/item-edit/FieldRenderer.js +248 -245
  52. package/dist/shared/components/item-edit/FieldRow.js +292 -279
  53. package/dist/shared/components/item-edit/GroupSection.js +698 -574
  54. package/dist/shared/components/item-edit/InlineTableField.js +3 -1
  55. package/dist/shared/components/item-edit/RelationCombobox.js +186 -176
  56. package/dist/shared/components/item-edit/entry/EntryStrip.js +54 -0
  57. package/dist/shared/components/item-edit/entry/entry-keys.js +27 -0
  58. package/dist/shared/components/item-edit/entry/useEntryKeyboard.js +70 -0
  59. package/dist/shared/components/item-edit/entry/useEntryMode.js +59 -0
  60. package/dist/shared/components/item-edit/form-structure-ui.js +105 -0
  61. package/dist/shared/components/item-edit/lazy-sections.js +36 -0
  62. package/dist/shared/components/item-edit/lock-why.js +39 -32
  63. package/dist/shared/components/item-edit/picker-miss.js +26 -0
  64. package/dist/shared/components/item-edit/placement-behaviour.js +196 -0
  65. package/dist/shared/components/item-edit/useFormUsageBeacon.js +51 -45
  66. package/dist/shared/components/layout-editor/AddPanel.js +134 -117
  67. package/dist/shared/components/layout-editor/ChangeNote.js +25 -24
  68. package/dist/shared/components/layout-editor/CollabParts.js +80 -75
  69. package/dist/shared/components/layout-editor/DesignNode.js +126 -120
  70. package/dist/shared/components/layout-editor/EditorCanvas.js +30 -27
  71. package/dist/shared/components/layout-editor/EditorTopBar.js +203 -192
  72. package/dist/shared/components/layout-editor/HistoryPanel.js +120 -104
  73. package/dist/shared/components/layout-editor/LayoutEditor.js +768 -671
  74. package/dist/shared/components/layout-editor/RestorePiece.js +143 -0
  75. package/dist/shared/components/layout-editor/StagedChip.js +22 -0
  76. package/dist/shared/components/layout-editor/StructureMenu.js +237 -186
  77. package/dist/shared/components/layout-editor/collab/FormFollowShare.js +149 -103
  78. package/dist/shared/components/layout-editor/collab/collab-api.js +29 -26
  79. package/dist/shared/components/layout-editor/dnd/LayoutDndProvider.js +81 -80
  80. package/dist/shared/components/layout-editor/dnd/node.js +69 -57
  81. package/dist/shared/components/layout-editor/draft-recovery.js +113 -43
  82. package/dist/shared/components/layout-editor/entry/PlacementPresets.js +149 -0
  83. package/dist/shared/components/layout-editor/entry/entry-editor-context.js +10 -0
  84. package/dist/shared/components/layout-editor/entry/presets.js +71 -0
  85. package/dist/shared/components/layout-editor/entry/tab-order.js +110 -0
  86. package/dist/shared/components/layout-editor/entry/theme-preview.js +37 -0
  87. package/dist/shared/components/layout-editor/grid-guides.js +142 -0
  88. package/dist/shared/components/layout-editor/inspector/BehaviourSettings.js +402 -0
  89. package/dist/shared/components/layout-editor/inspector/BulkInspector.js +61 -57
  90. package/dist/shared/components/layout-editor/inspector/GroupInspector.js +247 -151
  91. package/dist/shared/components/layout-editor/inspector/Inspector.js +176 -155
  92. package/dist/shared/components/layout-editor/inspector/LookTab.js +167 -116
  93. package/dist/shared/components/layout-editor/inspector/PickerMisses.js +129 -0
  94. package/dist/shared/components/layout-editor/inspector/PickerTab.js +84 -82
  95. package/dist/shared/components/layout-editor/inspector/RulesTab.js +66 -62
  96. package/dist/shared/components/layout-editor/inspector/kit.js +69 -68
  97. package/dist/shared/components/layout-editor/outputs/OutputsButton.js +254 -0
  98. package/dist/shared/components/layout-editor/outputs/help-sheet.js +154 -0
  99. package/dist/shared/components/layout-editor/outputs/output-api.js +61 -0
  100. package/dist/shared/components/layout-editor/overview/describe-conditions.js +6 -0
  101. package/dist/shared/components/layout-editor/overview/purpose.js +15 -13
  102. package/dist/shared/components/layout-editor/parity-keys.json.js +1 -1
  103. package/dist/shared/components/layout-editor/restore-piece.js +192 -0
  104. package/dist/shared/components/layout-editor/section-structure.js +241 -0
  105. package/dist/shared/components/layout-editor/settings/EntrySection.js +296 -0
  106. package/dist/shared/components/layout-editor/settings/FormSettings.js +41 -39
  107. package/dist/shared/components/layout-editor/settings/ResolveSettings.js +255 -0
  108. package/dist/shared/components/layout-editor/settings/ToolsSection.js +147 -111
  109. package/dist/shared/components/layout-editor/settings/WhoSection.js +29 -26
  110. package/dist/shared/components/layout-editor/settings/settings-registry.js +114 -17
  111. package/dist/shared/components/layout-editor/staged-api.js +64 -0
  112. package/dist/shared/components/layout-editor/structure-ops.js +81 -77
  113. package/dist/shared/components/layout-editor/testing/TestingPanels.js +65 -60
  114. package/dist/shared/components/layout-editor/testing/testing-model.js +198 -185
  115. package/dist/shared/components/layout-editor/toolbar-kit.js +11 -11
  116. package/dist/shared/components/layout-editor/usage/AbTestSection.js +355 -0
  117. package/dist/shared/components/layout-editor/usage/UsagePanel.js +144 -70
  118. package/dist/shared/components/layout-editor/usage/ab-api.js +86 -0
  119. package/dist/shared/components/layout-editor/usage/suggest-collapse.js +32 -0
  120. package/dist/shared/components/layout-editor/useLayoutDraft.js +25 -24
  121. package/dist/shared/components/notifications/NotificationAnalyticsView.js +148 -77
  122. package/dist/shared/components/panels/ErpFailureBanner.js +18 -17
  123. package/dist/shared/components/panels/ExternalRequestsChip.js +63 -62
  124. package/dist/shared/components/pipeline/PipelineEditorView.js +106 -104
  125. package/dist/shared/components/profile/AgentsPanel.js +479 -0
  126. package/dist/shared/components/queue/QueueWorklist.js +1026 -1040
  127. package/dist/shared/components/support/SupportAnalytics.js +171 -0
  128. package/dist/shared/components/support/SupportView.js +75 -73
  129. package/dist/shared/lib/background-runs.js +150 -0
  130. package/dist/shared/lib/delivery-ack.js +9 -0
  131. package/dist/shared/lib/entry-badge-style.js +13 -0
  132. package/dist/shared/lib/entry-config.js +71 -0
  133. package/dist/shared/lib/form-sections.js +64 -0
  134. package/dist/shared/lib/form-structure.js +99 -0
  135. package/dist/shared/lib/form-usage-beacon.js +101 -52
  136. package/dist/shared/lib/jobs-tray.js +25 -23
  137. package/dist/shared/lib/keyset-pager.js +37 -0
  138. package/dist/shared/lib/layout-ops.js +84 -82
  139. package/dist/shared/lib/layout-resolve.js +113 -0
  140. package/dist/shared/lib/placement-behaviour.js +144 -0
  141. package/dist/shared/lib/prefetch.js +149 -0
  142. package/dist/shared/lib/presence-hooks.js +199 -0
  143. package/dist/shared/lib/record-outbox.js +82 -81
  144. package/dist/shared/lib/replay-socket.js +93 -0
  145. package/dist/shared/lib/request-gate.js +51 -50
  146. package/dist/shared/lib/room-gaps.js +96 -0
  147. package/dist/shared/lib/search-log.js +27 -0
  148. package/dist/shared/lib/socket-realtime.js +101 -80
  149. package/dist/shared/lib/stale-chunk.js +60 -0
  150. package/dist/shared/lib/worker-socket.js +200 -0
  151. package/package.json +1 -1
@@ -0,0 +1,296 @@
1
+ import { jsxs as f, Fragment as _, jsx as r } from "react/jsx-runtime";
2
+ import { useState as x, useRef as v, useEffect as N } from "react";
3
+ import { badgeClasses as b } from "../../../lib/entry-badge-style.js";
4
+ import { entryConfigOf as w, ENTRY_THRESHOLD_DEFAULT as S, sanitizeEntryConfig as E, ENTRY_THRESHOLD_MAX as T, ENTRY_BADGE_TAG_MAX as B, BADGE_COLORS as D } from "../../../lib/entry-config.js";
5
+ import { cn as p } from "../../../lib/utils.js";
6
+ import { useEntryEditor as A } from "../entry/entry-editor-context.js";
7
+ import { presetSummary as R, withPresets as O } from "../entry/presets.js";
8
+ import { Setting as d, Toggle as m, quietText as g, smallBtn as h, inputCls as k } from "./controls.js";
9
+ function U(o) {
10
+ var l;
11
+ const n = w(o.layout), u = A(), t = (e, a, c = !1) => {
12
+ const C = E({ ...n, ...e });
13
+ (c ? o.setText : o.set)({ entry_config: C }, a);
14
+ }, s = ((l = n.tab_order) == null ? void 0 : l.length) ?? 0, i = n.presets ?? [];
15
+ return /* @__PURE__ */ f(_, { children: [
16
+ /* @__PURE__ */ r(
17
+ d,
18
+ {
19
+ k: "layout.focus_first",
20
+ control: /* @__PURE__ */ r(
21
+ m,
22
+ {
23
+ label: "Start on the first empty required field",
24
+ checked: n.focus_first === !0,
25
+ onChange: (e) => t(
26
+ { focus_first: e || void 0 },
27
+ e ? "Start on the first empty required field" : "Stop starting on a required field"
28
+ )
29
+ }
30
+ )
31
+ }
32
+ ),
33
+ /* @__PURE__ */ r(
34
+ d,
35
+ {
36
+ k: "layout.enter_next",
37
+ control: /* @__PURE__ */ r(
38
+ m,
39
+ {
40
+ label: "Enter moves to the next field",
41
+ checked: n.enter_next === !0,
42
+ onChange: (e) => t(
43
+ { enter_next: e || void 0 },
44
+ e ? "Make Enter move to the next field" : "Make Enter save again"
45
+ )
46
+ }
47
+ )
48
+ }
49
+ ),
50
+ /* @__PURE__ */ r(
51
+ d,
52
+ {
53
+ k: "layout.tab_order",
54
+ control: /* @__PURE__ */ f("div", { className: "flex flex-wrap items-center gap-2", children: [
55
+ /* @__PURE__ */ r(
56
+ "button",
57
+ {
58
+ type: "button",
59
+ "data-tab-order-start": "",
60
+ className: h,
61
+ disabled: u.tabOrderActive,
62
+ onClick: u.startTabOrder,
63
+ children: s ? "Change order on the canvas" : "Set order on the canvas"
64
+ }
65
+ ),
66
+ s > 0 && /* @__PURE__ */ r(
67
+ "button",
68
+ {
69
+ type: "button",
70
+ className: h,
71
+ onClick: () => t({ tab_order: void 0 }, "Clear the tab order"),
72
+ children: "Clear"
73
+ }
74
+ )
75
+ ] }),
76
+ note: /* @__PURE__ */ r("span", { className: g, children: s ? `${s} ${s === 1 ? "field" : "fields"} in order; the rest follow in page order.` : "Not set: Tab follows the page order." })
77
+ }
78
+ ),
79
+ /* @__PURE__ */ r(
80
+ d,
81
+ {
82
+ k: "layout.adaptive_mode",
83
+ control: /* @__PURE__ */ r(
84
+ m,
85
+ {
86
+ label: "Guided steps for new people",
87
+ checked: n.adaptive === !0,
88
+ onChange: (e) => t(
89
+ { adaptive: e || void 0 },
90
+ e ? "Show steps to new people" : "Stop switching between steps and tabs"
91
+ )
92
+ }
93
+ )
94
+ }
95
+ ),
96
+ /* @__PURE__ */ r(
97
+ d,
98
+ {
99
+ k: "layout.adaptive_threshold",
100
+ control: /* @__PURE__ */ r(
101
+ F,
102
+ {
103
+ value: n.adaptive_threshold ?? S,
104
+ label: "Records before tabs",
105
+ disabled: n.adaptive !== !0,
106
+ onChange: (e) => t({ adaptive_threshold: e }, "Change records before tabs", !0),
107
+ onBlur: o.flush
108
+ }
109
+ )
110
+ }
111
+ ),
112
+ /* @__PURE__ */ r(d, { k: "layout.badge", children: /* @__PURE__ */ r(
113
+ G,
114
+ {
115
+ config: n,
116
+ onChange: (e, a) => t({ badge: e }, "Change the form badge", a),
117
+ onBlur: o.flush
118
+ }
119
+ ) }),
120
+ /* @__PURE__ */ r(
121
+ d,
122
+ {
123
+ k: "layout.glossary",
124
+ control: /* @__PURE__ */ r(
125
+ m,
126
+ {
127
+ label: "Glossary tooltips in help text",
128
+ checked: n.glossary !== !1,
129
+ onChange: (e) => t(
130
+ { glossary: e ? void 0 : !1 },
131
+ e ? "Turn on glossary tooltips" : "Turn off glossary tooltips"
132
+ )
133
+ }
134
+ )
135
+ }
136
+ ),
137
+ /* @__PURE__ */ r(
138
+ d,
139
+ {
140
+ k: "layout.presets",
141
+ control: /* @__PURE__ */ r(
142
+ "button",
143
+ {
144
+ type: "button",
145
+ className: h,
146
+ disabled: i.length === 0,
147
+ onClick: () => t({ presets: void 0 }, "Delete all presets"),
148
+ children: "Delete all"
149
+ }
150
+ ),
151
+ children: i.length === 0 ? /* @__PURE__ */ r("p", { className: g, children: "None yet. Select a field and use Presets in its inspector." }) : /* @__PURE__ */ r("ul", { className: "m-0 list-none space-y-1 p-0", "data-preset-list": "", children: i.map((e) => /* @__PURE__ */ f(
152
+ "li",
153
+ {
154
+ className: "flex items-center justify-between gap-2 rounded-md border border-slate-200 px-2 py-1 dark:border-border",
155
+ children: [
156
+ /* @__PURE__ */ f("span", { className: "min-w-0", children: [
157
+ /* @__PURE__ */ r("span", { className: "block truncate text-[12.5px] font-medium text-slate-800 dark:text-foreground", children: e.name }),
158
+ /* @__PURE__ */ r("span", { className: p(g, "block truncate"), children: R(e) })
159
+ ] }),
160
+ /* @__PURE__ */ r(
161
+ "button",
162
+ {
163
+ type: "button",
164
+ className: h,
165
+ "aria-label": `Delete preset ${e.name}`,
166
+ onClick: () => {
167
+ var a;
168
+ return t(
169
+ {
170
+ presets: (a = O(
171
+ n,
172
+ i.filter((c) => c.id !== e.id)
173
+ )) == null ? void 0 : a.presets
174
+ },
175
+ `Delete preset ${e.name}`
176
+ );
177
+ },
178
+ children: "Delete"
179
+ }
180
+ )
181
+ ]
182
+ },
183
+ e.id
184
+ )) })
185
+ }
186
+ )
187
+ ] });
188
+ }
189
+ function F({
190
+ value: o,
191
+ onChange: n,
192
+ onBlur: u,
193
+ label: t,
194
+ disabled: s
195
+ }) {
196
+ const [i, l] = x(String(o)), e = v(!1);
197
+ return N(() => {
198
+ e.current || l(String(o));
199
+ }, [o]), /* @__PURE__ */ r(
200
+ "input",
201
+ {
202
+ type: "number",
203
+ min: 1,
204
+ max: T,
205
+ "aria-label": t,
206
+ disabled: s,
207
+ value: i,
208
+ className: p(k, "w-20"),
209
+ onFocus: () => {
210
+ e.current = !0;
211
+ },
212
+ onChange: (a) => {
213
+ l(a.target.value);
214
+ const c = Number(a.target.value);
215
+ Number.isFinite(c) && c >= 1 && n(c);
216
+ },
217
+ onBlur: () => {
218
+ e.current = !1, l(String(o)), u();
219
+ }
220
+ }
221
+ );
222
+ }
223
+ function G({
224
+ config: o,
225
+ onChange: n,
226
+ onBlur: u
227
+ }) {
228
+ const t = o.badge, [s, i] = x((t == null ? void 0 : t.tag) ?? ""), l = v(!1);
229
+ N(() => {
230
+ l.current || i((t == null ? void 0 : t.tag) ?? "");
231
+ }, [t == null ? void 0 : t.tag]);
232
+ const e = (t == null ? void 0 : t.color) ?? "orange";
233
+ return /* @__PURE__ */ f("div", { className: "space-y-2", "data-badge-editor": "", children: [
234
+ /* @__PURE__ */ f("div", { className: "flex items-center gap-2", children: [
235
+ /* @__PURE__ */ r(
236
+ "input",
237
+ {
238
+ type: "text",
239
+ "aria-label": "Badge text",
240
+ placeholder: "Short tag, e.g. Sparing",
241
+ maxLength: B,
242
+ value: s,
243
+ className: p(k, "min-w-0 flex-1"),
244
+ onFocus: () => {
245
+ l.current = !0;
246
+ },
247
+ onChange: (a) => {
248
+ i(a.target.value), n(a.target.value.trim() ? { tag: a.target.value, color: e } : void 0, !0);
249
+ },
250
+ onBlur: () => {
251
+ l.current = !1, u();
252
+ }
253
+ }
254
+ ),
255
+ t && /* @__PURE__ */ r(
256
+ "span",
257
+ {
258
+ "data-badge-preview": "",
259
+ className: p(
260
+ "inline-flex h-5 shrink-0 items-center rounded-full px-2 text-[11px] font-medium",
261
+ b(t.color)
262
+ ),
263
+ children: t.tag
264
+ }
265
+ )
266
+ ] }),
267
+ /* @__PURE__ */ r(
268
+ "fieldset",
269
+ {
270
+ "aria-label": "Badge colour",
271
+ className: "m-0 flex min-w-0 flex-wrap gap-1.5 border-0 p-0",
272
+ children: D.map((a) => /* @__PURE__ */ r(
273
+ "button",
274
+ {
275
+ type: "button",
276
+ "aria-pressed": e === a && !!t,
277
+ "aria-label": y(a),
278
+ "data-tip": s.trim() ? y(a) : "Type the badge text first",
279
+ disabled: !s.trim(),
280
+ onClick: () => n({ tag: s, color: a }, !1),
281
+ className: p(
282
+ "h-5 w-5 rounded-full border transition-shadow disabled:cursor-not-allowed disabled:opacity-50",
283
+ b(a),
284
+ e === a && !!t && "ring-2 ring-nvr-cyan/60 ring-offset-1 ring-offset-white dark:ring-offset-card"
285
+ )
286
+ },
287
+ a
288
+ ))
289
+ }
290
+ )
291
+ ] });
292
+ }
293
+ const y = (o) => o.charAt(0).toUpperCase() + o.slice(1);
294
+ export {
295
+ U as EntrySection
296
+ };
@@ -2,32 +2,34 @@ import { jsxs as i, jsx as o } from "react/jsx-runtime";
2
2
  import { Search as T, X as B, MessageCircleQuestion as F } from "lucide-react";
3
3
  import { useState as M, useMemo as c, useCallback as q } from "react";
4
4
  import { cn as u } from "../../../lib/utils.js";
5
- import { isWhereQuestion as I } from "../assist/settings-index.js";
6
- import { PanelHeader as O } from "../panel-frame.js";
7
- import { groupTitle as P } from "../panel-style.js";
8
- import { AddendumSection as Q } from "./AddendumSection.js";
9
- import { ButtonsSection as R } from "./ButtonsSection.js";
10
- import { inputCls as _, quietText as j, VisibleSettingsContext as A } from "./controls.js";
11
- import { DefaultsSection as D } from "./DefaultsSection.js";
12
- import { InheritanceSection as E } from "./InheritanceSection.js";
13
- import { LayoutSection as L } from "./LayoutSection.js";
14
- import { PdfSection as W } from "./PdfSection.js";
15
- import { ReadSection as $ } from "./ReadSection.js";
16
- import { layoutKindOf as z, visibleSections as H } from "./settings-registry.js";
17
- import { ToolsSection as K } from "./ToolsSection.js";
18
- import { WhoSection as V } from "./WhoSection.js";
19
- const X = {
20
- who: V,
21
- layout: L,
22
- buttons: R,
23
- read: $,
24
- pdf: W,
25
- addendum: Q,
26
- defaults: D,
27
- inheritance: E,
28
- tools: K
5
+ import { isWhereQuestion as E } from "../assist/settings-index.js";
6
+ import { PanelHeader as I } from "../panel-frame.js";
7
+ import { groupTitle as O } from "../panel-style.js";
8
+ import { AddendumSection as P } from "./AddendumSection.js";
9
+ import { ButtonsSection as Q } from "./ButtonsSection.js";
10
+ import { inputCls as R, quietText as _, VisibleSettingsContext as j } from "./controls.js";
11
+ import { DefaultsSection as A } from "./DefaultsSection.js";
12
+ import { EntrySection as D } from "./EntrySection.js";
13
+ import { InheritanceSection as L } from "./InheritanceSection.js";
14
+ import { LayoutSection as W } from "./LayoutSection.js";
15
+ import { PdfSection as $ } from "./PdfSection.js";
16
+ import { ReadSection as z } from "./ReadSection.js";
17
+ import { layoutKindOf as H, visibleSections as K } from "./settings-registry.js";
18
+ import { ToolsSection as V } from "./ToolsSection.js";
19
+ import { WhoSection as X } from "./WhoSection.js";
20
+ const G = {
21
+ who: X,
22
+ layout: W,
23
+ buttons: Q,
24
+ read: z,
25
+ pdf: $,
26
+ addendum: P,
27
+ defaults: A,
28
+ entry: D,
29
+ inheritance: L,
30
+ tools: V
29
31
  };
30
- function pt({
32
+ function ht({
31
33
  bundle: a,
32
34
  apply: d,
33
35
  flush: m,
@@ -37,14 +39,14 @@ function pt({
37
39
  onPreviewRoleChange: v,
38
40
  onAskWhere: f
39
41
  }) {
40
- const [r, h] = M(""), s = z(a.layout), n = c(() => H(s, r), [s, r]), S = c(
41
- () => new Set(n.flatMap((t) => t.settings.map((e) => e.key))),
42
- [n]
42
+ const [r, h] = M(""), n = H(a.layout), s = c(() => K(n, r), [n, r]), S = c(
43
+ () => new Set(s.flatMap((t) => t.settings.map((e) => e.key))),
44
+ [s]
43
45
  ), b = q(() => m == null ? void 0 : m(), [m]), k = c(
44
46
  () => ({
45
47
  bundle: a,
46
48
  layout: a.layout,
47
- kind: s,
49
+ kind: n,
48
50
  collection: p,
49
51
  set: (t, e, l) => d(
50
52
  [{ op: "layout_update", patch: t }],
@@ -54,7 +56,7 @@ function pt({
54
56
  flush: b,
55
57
  apply: (t, e) => d(t, e)
56
58
  }),
57
- [a, s, p, d, b]
59
+ [a, n, p, d, b]
58
60
  ), N = typeof a.layout.name == "string" ? a.layout.name : "", C = (t) => {
59
61
  const e = t.currentTarget, l = e.getBoundingClientRect().top;
60
62
  for (const g of e.querySelectorAll("[data-section-title]")) {
@@ -62,9 +64,9 @@ function pt({
62
64
  g.toggleAttribute("data-stuck", w);
63
65
  }
64
66
  };
65
- return /* @__PURE__ */ i("div", { className: "flex h-full min-h-0 flex-col", "data-form-settings": s, children: [
67
+ return /* @__PURE__ */ i("div", { className: "flex h-full min-h-0 flex-col", "data-form-settings": n, children: [
66
68
  /* @__PURE__ */ o(
67
- O,
69
+ I,
68
70
  {
69
71
  eyebrow: "Form settings",
70
72
  title: N || "This form",
@@ -79,7 +81,7 @@ function pt({
79
81
  placeholder: "Find a setting…",
80
82
  "aria-label": "Find a setting",
81
83
  "data-settings-search": !0,
82
- className: u(_, "pl-8 pr-8")
84
+ className: u(R, "pl-8 pr-8")
83
85
  }
84
86
  ),
85
87
  r && /* @__PURE__ */ o(
@@ -102,7 +104,7 @@ function pt({
102
104
  onScroll: C,
103
105
  className: "min-h-0 flex-1 overflow-y-auto px-4 pb-8",
104
106
  children: [
105
- f && r.trim() && (n.length === 0 || I(r)) && /* @__PURE__ */ i(
107
+ f && r.trim() && (s.length === 0 || E(r)) && /* @__PURE__ */ i(
106
108
  "button",
107
109
  {
108
110
  type: "button",
@@ -117,12 +119,12 @@ function pt({
117
119
  ]
118
120
  }
119
121
  ),
120
- n.length === 0 ? /* @__PURE__ */ i("p", { className: u("py-8 text-center", j), children: [
122
+ s.length === 0 ? /* @__PURE__ */ i("p", { className: u("py-8 text-center", _), children: [
121
123
  "No setting matches “",
122
124
  r.trim(),
123
125
  "”."
124
- ] }) : /* @__PURE__ */ o(A.Provider, { value: S, children: n.map(({ section: t }) => {
125
- const e = X[t.id];
126
+ ] }) : /* @__PURE__ */ o(j.Provider, { value: S, children: s.map(({ section: t }) => {
127
+ const e = G[t.id];
126
128
  return /* @__PURE__ */ i(
127
129
  "section",
128
130
  {
@@ -136,7 +138,7 @@ function pt({
136
138
  id: `form-settings-${t.id}`,
137
139
  "data-section-title": "",
138
140
  className: u(
139
- P,
141
+ O,
140
142
  "sticky top-0 z-10 -mx-4 border-b border-transparent bg-white px-4 pb-3 pt-4 data-[stuck]:border-slate-200 dark:bg-card dark:data-[stuck]:border-border"
141
143
  ),
142
144
  children: t.title
@@ -162,5 +164,5 @@ function pt({
162
164
  ] });
163
165
  }
164
166
  export {
165
- pt as FormSettings
167
+ ht as FormSettings
166
168
  };