@nivaro/react 0.2.54 → 0.2.55

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 (150) hide show
  1. package/dist/full.css +1 -1
  2. package/dist/hooks/useSessionRecorder.js +99 -98
  3. package/dist/index.d.ts +339 -2
  4. package/dist/index.js +644 -618
  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/worker-socket.js +200 -0
  150. package/package.json +1 -1
@@ -1,98 +1,99 @@
1
- import { jsxs as n, jsx as e, Fragment as H } from "react/jsx-runtime";
2
- import { ChevronLeft as re, Undo2 as oe, Redo2 as se, Wrench as le, Sparkles as de, History as ie, MoreHorizontal as ce, Save as Z, GitCompare as me, ChevronDown as J, Eye as F, X as he } from "lucide-react";
3
- import { useState as D, useMemo as pe } from "react";
4
- import { useNivaroClient as ue } from "../../context.js";
5
- import { useDebounced as be } from "../../hooks/useDebounced.js";
6
- import { useRelationOptions as xe } from "../../hooks/useRelationOptions.js";
7
- import { cn as h } from "../../lib/utils.js";
8
- import { useOverflowTip as ve } from "../TipLayer.js";
9
- import { Popover as X, PopoverTrigger as Y, PopoverContent as q } from "../ui/popover.js";
10
- import { SimpleSelect as ge } from "../ui/SimpleSelect.js";
11
- import { AiChangeCheck as we } from "./ai/ChangeCheck.js";
12
- import { ShareButton as fe, WatchButton as ke } from "./collab/FormFollowShare.js";
13
- import { HistoryPanel as Ne } from "./HistoryPanel.js";
14
- import { useRuleChoiceLabels as ye, useDisplayTemplate as Ce, useRoleNames as Se } from "./overview/overview-api.js";
15
- import { rowPill as Oe, purposeSegments as Re, TYPE_USE as z, Pill as Pe, Sentence as Ae } from "./overview/purpose.js";
16
- import { ScheduleChange as Te } from "./ScheduleChange.js";
17
- import { barIconBtn as j, BarMenu as R, barIconOn as Be, MenuSeparator as E, ToolButton as _, barBtnOn as Le, barBtn as Ue } from "./toolbar-kit.js";
18
- import { unsavedText as I } from "./UnsavedConfirm.js";
19
- const Me = "h-8 w-full rounded-md border border-slate-200 bg-white px-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", G = "mb-1 block text-[11.5px] font-semibold text-slate-600 dark:text-muted-foreground", $e = `
1
+ import { jsxs as r, jsx as e, Fragment as D } from "react/jsx-runtime";
2
+ import { ChevronLeft as de, Undo2 as ie, Redo2 as ce, Wrench as me, Sparkles as he, History as pe, MoreHorizontal as ue, Save as _, GitCompare as be, ChevronDown as q, Eye as G, X as xe } from "lucide-react";
3
+ import { useState as I, useMemo as ve, useCallback as ge } from "react";
4
+ import { useNivaroClient as we } from "../../context.js";
5
+ import { useDebounced as fe } from "../../hooks/useDebounced.js";
6
+ import { useRelationOptions as ke } from "../../hooks/useRelationOptions.js";
7
+ import { titleCase as Ne, cn as h } from "../../lib/utils.js";
8
+ import { useOverflowTip as ye } from "../TipLayer.js";
9
+ import { Popover as K, PopoverTrigger as Q, PopoverContent as V } from "../ui/popover.js";
10
+ import { SimpleSelect as Ce } from "../ui/SimpleSelect.js";
11
+ import { AiChangeCheck as Se } from "./ai/ChangeCheck.js";
12
+ import { ShareButton as Oe, WatchButton as Re } from "./collab/FormFollowShare.js";
13
+ import { HistoryPanel as Ae } from "./HistoryPanel.js";
14
+ import { useRuleChoiceLabels as Pe, useDisplayTemplate as Te, useRoleNames as Be } from "./overview/overview-api.js";
15
+ import { rowPill as Le, purposeSegments as Ue, TYPE_USE as J, Pill as Me, Sentence as $e } from "./overview/purpose.js";
16
+ import { ScheduleChange as je } from "./ScheduleChange.js";
17
+ import { barIconBtn as E, BarMenu as A, barIconOn as Ee, MenuSeparator as H, ToolButton as X, barBtnOn as He, barBtn as De } from "./toolbar-kit.js";
18
+ import { unsavedText as W } from "./UnsavedConfirm.js";
19
+ const Ie = "h-8 w-full rounded-md border border-slate-200 bg-white px-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", Y = "mb-1 block text-[11.5px] font-semibold text-slate-600 dark:text-muted-foreground", We = `
20
20
  [data-editor-topbar]{container-type:inline-size;container-name:letb}
21
21
  @container letb (max-width: 1499px){[data-editor-topbar] [data-tb-sentence]{display:none}}
22
22
  @container letb (max-width: 1399px){[data-editor-topbar] [data-tb-xwide]{display:none}}
23
23
  @container letb (max-width: 1099px){[data-editor-topbar] [data-tb-wide],[data-editor-topbar] [data-tb-menu-label]{display:none}}
24
24
  @container letb (min-width: 1100px){[data-editor-topbar] [data-tb-name]{min-width:140px}}
25
25
  `;
26
- function je({
26
+ function Ze({
27
27
  draft: i,
28
- onOpen: a
28
+ onOpen: a,
29
+ pendingTip: c
29
30
  }) {
30
- const { status: r, error: l } = i, s = i.unsavedCount ?? 0, d = s > 0 && (r === "idle" || r === "saved"), t = r === "saving" ? "Saving…" : r === "error" ? l ?? "Not saved" : r === "conflict" ? s > 0 ? "Not saved — someone else saved" : "Reloaded — someone else saved" : d ? I(s) : "Saved", c = /* @__PURE__ */ n(
31
+ const { status: n, error: s } = i, l = i.unsavedCount ?? 0, t = l > 0 && (n === "idle" || n === "saved"), m = n === "saving" ? "Saving…" : n === "error" ? s ?? "Not saved" : n === "conflict" ? l > 0 ? "Not saved — someone else saved" : "Reloaded — someone else saved" : t ? W(l) : "Saved", u = /* @__PURE__ */ r(
31
32
  "span",
32
33
  {
33
34
  role: "status",
34
- "data-save-status": r,
35
- "data-unsaved": s,
36
- "data-tip": (r === "error" || r === "conflict") && l ? l : d ? "Only you see these changes until you save (⌘S)" : void 0,
35
+ "data-save-status": n,
36
+ "data-unsaved": l,
37
+ "data-tip": (n === "error" || n === "conflict") && s ? s : t ? c ?? "Only you see these changes until you save (⌘S)" : void 0,
37
38
  className: h(
38
39
  "inline-flex max-w-[180px] shrink-0 items-center gap-1 whitespace-nowrap rounded-full px-2 py-px text-[11px] font-semibold",
39
- r === "saving" && "bg-slate-100 text-slate-600 dark:bg-muted dark:text-muted-foreground",
40
- (r === "saved" || r === "idle") && !d && "bg-emerald-50 text-emerald-700 dark:bg-emerald-500/15 dark:text-emerald-300",
41
- d && "bg-nvr-cyan/10 text-slate-700 dark:text-foreground",
42
- r === "error" && "bg-red-50 text-red-700 dark:bg-red-500/15 dark:text-red-300",
43
- r === "conflict" && "bg-amber-50 text-amber-700 dark:bg-amber-500/15 dark:text-amber-300"
40
+ n === "saving" && "bg-slate-100 text-slate-600 dark:bg-muted dark:text-muted-foreground",
41
+ (n === "saved" || n === "idle") && !t && "bg-emerald-50 text-emerald-700 dark:bg-emerald-500/15 dark:text-emerald-300",
42
+ t && "bg-nvr-cyan/10 text-slate-700 dark:text-foreground",
43
+ n === "error" && "bg-red-50 text-red-700 dark:bg-red-500/15 dark:text-red-300",
44
+ n === "conflict" && "bg-amber-50 text-amber-700 dark:bg-amber-500/15 dark:text-amber-300"
44
45
  ),
45
46
  children: [
46
- d && /* @__PURE__ */ e("span", { "aria-hidden": !0, className: "h-1.5 w-1.5 shrink-0 rounded-full bg-nvr-cyan" }),
47
- /* @__PURE__ */ e("span", { className: "min-w-0 truncate", children: t })
47
+ t && /* @__PURE__ */ e("span", { "aria-hidden": !0, className: "h-1.5 w-1.5 shrink-0 rounded-full bg-nvr-cyan" }),
48
+ /* @__PURE__ */ e("span", { className: "min-w-0 truncate", children: m })
48
49
  ]
49
50
  }
50
51
  );
51
- return !d || !a ? c : /* @__PURE__ */ e(
52
+ return !t || !a ? u : /* @__PURE__ */ e(
52
53
  "button",
53
54
  {
54
55
  type: "button",
55
56
  "data-unsaved-list-open": "",
56
- "aria-label": `${I(s)} — list them`,
57
+ "aria-label": `${W(l)} — list them`,
57
58
  onClick: (b) => a(b.currentTarget),
58
59
  className: "inline-flex rounded-full transition-opacity hover:opacity-80",
59
- children: c
60
+ children: u
60
61
  }
61
62
  );
62
63
  }
63
- function Ee({
64
+ function Fe({
64
65
  icon: i,
65
66
  label: a,
66
- hint: r,
67
- on: l,
67
+ hint: c,
68
+ on: n,
68
69
  onChange: s,
69
- data: d
70
+ data: l
70
71
  }) {
71
- return /* @__PURE__ */ n("div", { className: "flex items-start gap-2 text-[12.5px] text-slate-700 dark:text-foreground", children: [
72
+ return /* @__PURE__ */ r("div", { className: "flex items-start gap-2 text-[12.5px] text-slate-700 dark:text-foreground", children: [
72
73
  /* @__PURE__ */ e("span", { className: "mt-0.5 text-slate-500 dark:text-muted-foreground", children: i }),
73
- /* @__PURE__ */ n("span", { className: "flex min-w-0 flex-1 flex-col", children: [
74
+ /* @__PURE__ */ r("span", { className: "flex min-w-0 flex-1 flex-col", children: [
74
75
  /* @__PURE__ */ e("span", { className: "font-medium", children: a }),
75
- /* @__PURE__ */ e("span", { className: "text-[11.5px] leading-snug text-slate-500 dark:text-muted-foreground", children: r })
76
+ /* @__PURE__ */ e("span", { className: "text-[11.5px] leading-snug text-slate-500 dark:text-muted-foreground", children: c })
76
77
  ] }),
77
78
  /* @__PURE__ */ e(
78
79
  "button",
79
80
  {
80
81
  type: "button",
81
82
  role: "switch",
82
- "aria-checked": l,
83
+ "aria-checked": n,
83
84
  "aria-label": a,
84
- onClick: () => s(!l),
85
- ...d,
85
+ onClick: () => s(!n),
86
+ ...l,
86
87
  className: h(
87
88
  "relative mt-0.5 h-4 w-7 shrink-0 rounded-full transition-colors",
88
- l ? "bg-nvr-cyan" : "bg-slate-300 dark:bg-white/35"
89
+ n ? "bg-nvr-cyan" : "bg-slate-300 dark:bg-white/35"
89
90
  ),
90
91
  children: /* @__PURE__ */ e(
91
92
  "span",
92
93
  {
93
94
  className: h(
94
95
  "absolute left-0 top-0.5 h-3 w-3 rounded-full bg-white shadow-sm transition-transform",
95
- l ? "translate-x-3.5" : "translate-x-0.5"
96
+ n ? "translate-x-3.5" : "translate-x-0.5"
96
97
  )
97
98
  }
98
99
  )
@@ -100,48 +101,48 @@ function Ee({
100
101
  )
101
102
  ] });
102
103
  }
103
- function He({
104
+ function ze({
104
105
  collection: i,
105
106
  value: a,
106
- onChange: r,
107
- showHidden: l,
107
+ onChange: c,
108
+ showHidden: n,
108
109
  onShowHidden: s,
109
- extra: d
110
+ extra: l
110
111
  }) {
111
- var y, C, S, g;
112
- const t = ue(), [c, b] = D(!1), [f, P] = D(""), A = be(f, 250), { data: x } = Ce(i, c), { data: u = [] } = Se(!0), { options: k, loading: T } = xe(c ? t : null, i, {
113
- search: A,
112
+ var y, C, S, O;
113
+ const t = we(), [m, u] = I(!1), [b, P] = I(""), T = fe(b, 250), { data: g } = Te(i, m), { data: x = [] } = Be(!0), { options: k, loading: B } = ke(m ? t : null, i, {
114
+ search: T,
114
115
  limit: 8,
115
- displayTemplate: x ?? null,
116
- enabled: c && x !== void 0
117
- }), v = ((y = u.find((o) => o.id === a.roleId)) == null ? void 0 : y.name) ?? null, N = ((C = u.find((o) => o.id === a.compareRoleId)) == null ? void 0 : C.name) ?? null, B = [
116
+ displayTemplate: g ?? null,
117
+ enabled: m && g !== void 0
118
+ }), w = ((y = x.find((o) => o.id === a.roleId)) == null ? void 0 : y.name) ?? null, N = ((C = x.find((o) => o.id === a.compareRoleId)) == null ? void 0 : C.name) ?? null, L = [
118
119
  (S = a.record) == null ? void 0 : S.label,
119
- N && v ? `${v} | ${N}` : v,
120
- (g = a.state) == null ? void 0 : g.label,
120
+ N && w ? `${w} | ${N}` : w,
121
+ (O = a.state) == null ? void 0 : O.label,
121
122
  a.values && Object.keys(a.values).length > 0 ? "What if" : null,
122
123
  a.device && a.device !== "desktop" ? a.device === "phone" ? "Phone" : "Tablet" : null,
123
124
  a.who ? "Who sees" : null
124
125
  ].filter(Boolean).join(" · ") || "No record";
125
- return /* @__PURE__ */ n(X, { open: c, onOpenChange: b, children: [
126
- /* @__PURE__ */ e(Y, { asChild: !0, children: /* @__PURE__ */ n(
126
+ return /* @__PURE__ */ r(K, { open: m, onOpenChange: u, children: [
127
+ /* @__PURE__ */ e(Q, { asChild: !0, children: /* @__PURE__ */ r(
127
128
  "button",
128
129
  {
129
130
  type: "button",
130
- className: h(Ue, "min-w-[110px] max-w-[260px] shrink", c && Le),
131
+ className: h(De, "min-w-[110px] max-w-[260px] shrink", m && He),
131
132
  "aria-label": "Preview as",
132
133
  "data-preview-as": "",
133
134
  "data-tip": "Show the form with a real record’s values, as a role sees it",
134
135
  children: [
135
- /* @__PURE__ */ e(F, { className: "h-3.5 w-3.5 shrink-0" }),
136
- /* @__PURE__ */ n("span", { className: "min-w-0 truncate", children: [
136
+ /* @__PURE__ */ e(G, { className: "h-3.5 w-3.5 shrink-0" }),
137
+ /* @__PURE__ */ r("span", { className: "min-w-0 truncate", children: [
137
138
  "Preview",
138
- /* @__PURE__ */ n("span", { "data-tb-wide": "", children: [
139
+ /* @__PURE__ */ r("span", { "data-tb-wide": "", children: [
139
140
  ":",
140
141
  " ",
141
- /* @__PURE__ */ e("span", { "data-preview-summary": "", className: "text-slate-500 dark:text-muted-foreground", children: B })
142
+ /* @__PURE__ */ e("span", { "data-preview-summary": "", className: "text-slate-500 dark:text-muted-foreground", children: L })
142
143
  ] })
143
144
  ] }),
144
- l && /* @__PURE__ */ e(
145
+ n && /* @__PURE__ */ e(
145
146
  "span",
146
147
  {
147
148
  "data-preview-hidden-on": "",
@@ -149,175 +150,182 @@ function He({
149
150
  className: "h-1.5 w-1.5 shrink-0 rounded-full bg-nvr-cyan"
150
151
  }
151
152
  ),
152
- /* @__PURE__ */ e(J, { className: "h-3 w-3 shrink-0 text-slate-500 dark:text-muted-foreground" })
153
+ /* @__PURE__ */ e(q, { className: "h-3 w-3 shrink-0 text-slate-500 dark:text-muted-foreground" })
153
154
  ]
154
155
  }
155
156
  ) }),
156
- /* @__PURE__ */ n(
157
- q,
157
+ /* @__PURE__ */ r(
158
+ V,
158
159
  {
159
160
  align: "end",
160
161
  className: "max-h-[min(80vh,640px)] w-[320px] overflow-y-auto overscroll-contain p-3",
161
162
  children: [
162
- /* @__PURE__ */ e("p", { className: G, children: "Record" }),
163
- a.record ? /* @__PURE__ */ n("span", { className: "inline-flex max-w-full items-center gap-1.5 rounded-full bg-nvr-cyan/10 px-2.5 py-1 text-[12px] font-medium text-slate-800 dark:text-foreground", children: [
163
+ /* @__PURE__ */ e("p", { className: Y, children: "Record" }),
164
+ a.record ? /* @__PURE__ */ r("span", { className: "inline-flex max-w-full items-center gap-1.5 rounded-full bg-nvr-cyan/10 px-2.5 py-1 text-[12px] font-medium text-slate-800 dark:text-foreground", children: [
164
165
  /* @__PURE__ */ e("span", { className: "truncate", children: a.record.label }),
165
166
  /* @__PURE__ */ e(
166
167
  "button",
167
168
  {
168
169
  type: "button",
169
170
  "aria-label": "Preview without a record",
170
- onClick: () => r({ ...a, record: null }),
171
+ onClick: () => c({ ...a, record: null }),
171
172
  className: "text-slate-500 hover:text-slate-800 dark:text-muted-foreground dark:hover:text-foreground",
172
- children: /* @__PURE__ */ e(he, { className: "h-3 w-3" })
173
+ children: /* @__PURE__ */ e(xe, { className: "h-3 w-3" })
173
174
  }
174
175
  )
175
- ] }) : /* @__PURE__ */ n(H, { children: [
176
+ ] }) : /* @__PURE__ */ r(D, { children: [
176
177
  /* @__PURE__ */ e(
177
178
  "input",
178
179
  {
179
- value: f,
180
+ value: b,
180
181
  onChange: (o) => P(o.target.value),
181
182
  placeholder: "Search records…",
182
183
  "aria-label": "Search records",
183
- className: Me
184
+ className: Ie
184
185
  }
185
186
  ),
186
- /* @__PURE__ */ n("div", { className: "mt-1 max-h-[220px] overflow-y-auto overscroll-contain", children: [
187
+ /* @__PURE__ */ r("div", { className: "mt-1 max-h-[220px] overflow-y-auto overscroll-contain", children: [
187
188
  k.map((o) => /* @__PURE__ */ e(
188
189
  "button",
189
190
  {
190
191
  type: "button",
191
- onClick: () => r({ ...a, record: { id: String(o.id), label: o.label } }),
192
+ onClick: () => c({ ...a, record: { id: String(o.id), label: o.label } }),
192
193
  className: "block w-full truncate rounded px-2 py-1.5 text-left text-[12.5px] text-slate-700 hover:bg-muted dark:text-foreground",
193
194
  children: o.label
194
195
  },
195
196
  String(o.id)
196
197
  )),
197
- !T && k.length === 0 && /* @__PURE__ */ e("p", { className: "px-2 py-1.5 text-[12px] text-slate-500 dark:text-muted-foreground", children: "No records match." })
198
+ !B && k.length === 0 && /* @__PURE__ */ e("p", { className: "px-2 py-1.5 text-[12px] text-slate-500 dark:text-muted-foreground", children: "No records match." })
198
199
  ] })
199
200
  ] }),
200
- /* @__PURE__ */ e("p", { className: h(G, "mt-3"), children: "As a role" }),
201
+ /* @__PURE__ */ e("p", { className: h(Y, "mt-3"), children: "As a role" }),
201
202
  /* @__PURE__ */ e(
202
- ge,
203
+ Ce,
203
204
  {
204
205
  value: a.roleId ?? "",
205
- onChange: (o) => r({ ...a, roleId: o || null }),
206
+ onChange: (o) => c({ ...a, roleId: o || null }),
206
207
  ariaLabel: "Preview as role",
207
208
  className: "h-8 text-[12.5px]",
208
209
  options: [
209
210
  { value: "", label: "Any role" },
210
- ...u.map((o) => ({ value: o.id, label: o.name }))
211
+ ...x.map((o) => ({ value: o.id, label: o.name }))
211
212
  ]
212
213
  }
213
214
  ),
214
215
  /* @__PURE__ */ e("p", { className: "mt-2 text-[11.5px] leading-snug text-slate-500 dark:text-muted-foreground", children: "The form shows this record’s values, steps and rules. Nothing you do here changes the record." }),
215
216
  /* @__PURE__ */ e("div", { className: "mt-3 border-t border-slate-100 pt-3 dark:border-border", children: /* @__PURE__ */ e(
216
- Ee,
217
+ Fe,
217
218
  {
218
- icon: /* @__PURE__ */ e(F, { className: "h-3.5 w-3.5" }),
219
+ icon: /* @__PURE__ */ e(G, { className: "h-3.5 w-3.5" }),
219
220
  label: "Show hidden",
220
221
  hint: "Fields and sections the preview would hide, faintly, so you can select them",
221
- on: l,
222
+ on: n,
222
223
  onChange: s,
223
224
  data: { "data-show-hidden-switch": "" }
224
225
  }
225
226
  ) }),
226
- d
227
+ l
227
228
  ]
228
229
  }
229
230
  )
230
231
  ] });
231
232
  }
232
- function nt({
233
+ function it({
233
234
  collection: i,
234
235
  layoutId: a,
235
- layoutName: r,
236
- layoutType: l,
236
+ layoutName: c,
237
+ layoutType: n,
237
238
  row: s,
238
- fields: d,
239
+ fields: l,
239
240
  draft: t,
240
- preview: c,
241
- onPreview: b,
242
- showHidden: f,
241
+ preview: m,
242
+ onPreview: u,
243
+ showHidden: b,
243
244
  onShowHidden: P,
244
- onBack: A,
245
- backLabel: x = "Forms",
246
- view: u,
245
+ onBack: T,
246
+ backLabel: g = "Forms",
247
+ view: x,
247
248
  tools: k,
248
- ai: T,
249
- previewExtra: v,
249
+ ai: B,
250
+ previewExtra: w,
250
251
  problems: N,
251
- more: B,
252
+ more: L,
252
253
  presence: y,
253
254
  onOpenUnsaved: C,
254
- onSelectField: S,
255
- onShowOnCanvas: g,
256
- onReviewChanges: o,
257
- reviewing: K = !1,
258
- testing: Q,
259
- beforeSave: V
255
+ pendingTip: S,
256
+ onSelectField: O,
257
+ onShowOnCanvas: o,
258
+ onReviewChanges: Z,
259
+ reviewing: ee = !1,
260
+ testing: te,
261
+ beforeSave: ae
260
262
  }) {
261
- const [L, U] = D(
263
+ const [U, M] = I(
262
264
  () => typeof window < "u" && new URLSearchParams(window.location.search).get("history") === "1"
263
- ), p = t.unsavedCount ?? 0, M = s ? Oe(s) : null, ee = pe(() => s ? [s] : [], [s]), te = ye(i, d, ee), W = s ? Re(s, d, te) : z[l] ? [{ text: z[l] }] : [], O = !!t.save && !t.autosave, $ = O && p > 0, ae = ve(r);
264
- return /* @__PURE__ */ n(
265
+ ), p = t.unsavedCount ?? 0, $ = s ? Le(s) : null, ne = ve(() => s ? [s] : [], [s]), re = Pe(i, l, ne), F = s ? Ue(s, l, re) : J[n] ? [{ text: J[n] }] : [], R = !!t.save && !t.autosave, j = R && p > 0, oe = ge(
266
+ (d) => {
267
+ var v, z;
268
+ return ((z = (v = l.find((le) => le.field === d)) == null ? void 0 : v.label) == null ? void 0 : z.trim()) || Ne(d);
269
+ },
270
+ [l]
271
+ ), se = ye(c);
272
+ return /* @__PURE__ */ r(
265
273
  "header",
266
274
  {
267
275
  "data-editor-topbar": "",
268
276
  className: "flex shrink-0 flex-nowrap items-center gap-1.5 overflow-hidden border-b border-slate-200 bg-white px-3 py-2 dark:border-border dark:bg-card",
269
277
  children: [
270
- /* @__PURE__ */ e("style", { children: $e }),
271
- /* @__PURE__ */ n(
278
+ /* @__PURE__ */ e("style", { children: We }),
279
+ /* @__PURE__ */ r(
272
280
  "button",
273
281
  {
274
282
  type: "button",
275
- "aria-label": x,
283
+ "aria-label": g,
276
284
  "data-editor-back": "",
277
- onClick: (m) => A(m.currentTarget),
285
+ onClick: (d) => T(d.currentTarget),
278
286
  className: "inline-flex h-8 shrink-0 items-center gap-0.5 rounded-md pl-1 pr-2 text-[12px] text-slate-500 transition-colors hover:bg-muted hover:text-slate-800 dark:text-muted-foreground dark:hover:text-foreground",
279
287
  children: [
280
- /* @__PURE__ */ e(re, { className: "h-4 w-4" }),
281
- /* @__PURE__ */ e("span", { "data-tb-wide": "", children: x })
288
+ /* @__PURE__ */ e(de, { className: "h-4 w-4" }),
289
+ /* @__PURE__ */ e("span", { "data-tb-wide": "", children: g })
282
290
  ]
283
291
  }
284
292
  ),
285
- /* @__PURE__ */ e(w, {}),
286
- /* @__PURE__ */ n("div", { "data-tb-name": "", className: "flex min-w-[64px] flex-1 items-center gap-2", children: [
293
+ /* @__PURE__ */ e(f, {}),
294
+ /* @__PURE__ */ r("div", { "data-tb-name": "", className: "flex min-w-[64px] flex-1 items-center gap-2", children: [
287
295
  /* @__PURE__ */ e(
288
296
  "h2",
289
297
  {
290
- ref: ae,
298
+ ref: se,
291
299
  className: "min-w-0 truncate text-[14px] font-semibold text-slate-900 dark:text-foreground",
292
- children: r
300
+ children: c
293
301
  }
294
302
  ),
295
- M && /* @__PURE__ */ e("span", { className: "shrink-0", children: /* @__PURE__ */ e(Pe, { tone: M.tone, children: M.text }) }),
296
- W.length > 0 && /* @__PURE__ */ n(
303
+ $ && /* @__PURE__ */ e("span", { className: "shrink-0", children: /* @__PURE__ */ e(Me, { tone: $.tone, children: $.text }) }),
304
+ F.length > 0 && /* @__PURE__ */ r(
297
305
  "span",
298
306
  {
299
307
  "data-tb-sentence": "",
300
308
  className: "min-w-0 truncate text-[12px] text-slate-500 dark:text-muted-foreground",
301
309
  children: [
302
310
  "· ",
303
- /* @__PURE__ */ e(Ae, { segs: W, muted: !0 })
311
+ /* @__PURE__ */ e($e, { segs: F, muted: !0 })
304
312
  ]
305
313
  }
306
314
  ),
307
315
  y
308
316
  ] }),
309
- /* @__PURE__ */ e(w, {}),
310
- /* @__PURE__ */ n("div", { className: "flex shrink-0 items-center gap-0.5", children: [
317
+ /* @__PURE__ */ e(f, {}),
318
+ /* @__PURE__ */ r("div", { className: "flex shrink-0 items-center gap-0.5", children: [
311
319
  /* @__PURE__ */ e(
312
320
  "button",
313
321
  {
314
322
  type: "button",
315
323
  "aria-label": "Undo",
316
- className: j,
324
+ className: E,
317
325
  disabled: !t.canUndo,
318
326
  onClick: t.undo,
319
327
  "data-tip": t.undoLabel ? `Undo ${t.undoLabel} (⌘Z)` : "Undo (⌘Z)",
320
- children: /* @__PURE__ */ e(oe, { className: "h-4 w-4" })
328
+ children: /* @__PURE__ */ e(ie, { className: "h-4 w-4" })
321
329
  }
322
330
  ),
323
331
  /* @__PURE__ */ e(
@@ -325,156 +333,159 @@ function nt({
325
333
  {
326
334
  type: "button",
327
335
  "aria-label": "Redo",
328
- className: j,
336
+ className: E,
329
337
  disabled: !t.canRedo,
330
338
  onClick: t.redo,
331
339
  "data-tip": t.redoLabel ? `Redo ${t.redoLabel} (⇧⌘Z)` : "Redo (⇧⌘Z)",
332
- children: /* @__PURE__ */ e(se, { className: "h-4 w-4" })
340
+ children: /* @__PURE__ */ e(ce, { className: "h-4 w-4" })
333
341
  }
334
342
  )
335
343
  ] }),
336
- u && /* @__PURE__ */ n(H, { children: [
337
- /* @__PURE__ */ e(w, {}),
338
- /* @__PURE__ */ e("div", { className: "flex shrink-0 items-center gap-1", children: u })
344
+ x && /* @__PURE__ */ r(D, { children: [
345
+ /* @__PURE__ */ e(f, {}),
346
+ /* @__PURE__ */ e("div", { className: "flex shrink-0 items-center gap-1", children: x })
339
347
  ] }),
340
- /* @__PURE__ */ e(w, {}),
348
+ /* @__PURE__ */ e(f, {}),
341
349
  /* @__PURE__ */ e(
342
- He,
350
+ ze,
343
351
  {
344
352
  collection: i,
345
- value: c,
346
- onChange: b,
347
- showHidden: f,
353
+ value: m,
354
+ onChange: u,
355
+ showHidden: b,
348
356
  onShowHidden: P,
349
- extra: v
357
+ extra: w
350
358
  }
351
359
  ),
352
360
  /* @__PURE__ */ e(
353
- R,
361
+ A,
354
362
  {
355
363
  label: "Tools",
356
- icon: /* @__PURE__ */ e(le, { className: "h-3.5 w-3.5" }),
364
+ icon: /* @__PURE__ */ e(me, { className: "h-3.5 w-3.5" }),
357
365
  tip: "Arrange, find, outline, every form, form map and shortcuts",
358
366
  children: k
359
367
  }
360
368
  ),
361
369
  /* @__PURE__ */ e(
362
- R,
370
+ A,
363
371
  {
364
372
  label: "AI",
365
- icon: /* @__PURE__ */ e(de, { className: "h-3.5 w-3.5 text-nvr-cyan" }),
373
+ icon: /* @__PURE__ */ e(he, { className: "h-3.5 w-3.5 text-nvr-cyan" }),
366
374
  tip: "Rebuild, review and ask about this form with AI; type a change",
367
375
  width: "w-[320px]",
368
- children: T
376
+ children: B
369
377
  }
370
378
  ),
371
379
  N,
372
- /* @__PURE__ */ n(X, { open: L, onOpenChange: U, children: [
373
- /* @__PURE__ */ e(Y, { asChild: !0, children: /* @__PURE__ */ e(
380
+ /* @__PURE__ */ r(K, { open: U, onOpenChange: M, children: [
381
+ /* @__PURE__ */ e(Q, { asChild: !0, children: /* @__PURE__ */ e(
374
382
  "button",
375
383
  {
376
384
  type: "button",
377
- className: h(j, L && Be),
385
+ className: h(E, U && Ee),
378
386
  "aria-label": "History",
379
387
  "data-tip": "History: saved versions, this session’s steps, restore",
380
388
  "data-editor-history": "",
381
- children: /* @__PURE__ */ e(ie, { className: "h-4 w-4" })
389
+ children: /* @__PURE__ */ e(pe, { className: "h-4 w-4" })
382
390
  }
383
391
  ) }),
384
392
  /* @__PURE__ */ e(
385
- q,
393
+ V,
386
394
  {
387
395
  align: "end",
388
396
  className: "max-h-[min(75vh,640px)] w-[460px] overflow-y-auto overscroll-contain p-3",
389
- children: L && /* @__PURE__ */ e(
390
- Ne,
397
+ children: U && /* @__PURE__ */ e(
398
+ Ae,
391
399
  {
392
400
  layoutId: a,
393
- onRestored: () => U(!1),
401
+ onRestored: () => M(!1),
394
402
  unsavedCount: p,
395
403
  onDiscardUnsaved: t.discard,
396
404
  session: t.session,
397
405
  onJump: t.jump,
398
- onShowOnCanvas: g ? (m, ne) => {
399
- U(!1), g(m, ne);
406
+ bundle: t.bundle,
407
+ onApply: (d, v) => t.apply(d, { label: v }),
408
+ fieldLabel: oe,
409
+ onShowOnCanvas: o ? (d, v) => {
410
+ M(!1), o(d, v);
400
411
  } : void 0
401
412
  }
402
413
  )
403
414
  }
404
415
  )
405
416
  ] }),
406
- /* @__PURE__ */ n(
407
- R,
417
+ /* @__PURE__ */ r(
418
+ A,
408
419
  {
409
420
  label: "More",
410
- icon: /* @__PURE__ */ e(ce, { className: "h-4 w-4" }),
421
+ icon: /* @__PURE__ */ e(ue, { className: "h-4 w-4" }),
411
422
  iconOnly: !0,
412
423
  align: "end",
413
424
  tip: "Test, share and watch this form, templates and download",
414
425
  data: { "data-editor-more": "" },
415
426
  children: [
416
- Q,
417
- /* @__PURE__ */ e(E, {}),
418
- /* @__PURE__ */ e(fe, { layoutId: a, fields: d, onSelectField: S }),
419
- /* @__PURE__ */ e(ke, { layoutId: a }),
420
- /* @__PURE__ */ e(E, {}),
421
- B
427
+ te,
428
+ /* @__PURE__ */ e(H, {}),
429
+ /* @__PURE__ */ e(Oe, { layoutId: a, fields: l, onSelectField: O }),
430
+ /* @__PURE__ */ e(Re, { layoutId: a }),
431
+ /* @__PURE__ */ e(H, {}),
432
+ L
422
433
  ]
423
434
  }
424
435
  ),
425
- /* @__PURE__ */ e(w, {}),
426
- /* @__PURE__ */ e(je, { draft: t, onOpen: C }),
427
- /* @__PURE__ */ n("div", { "data-save-split": "", className: "flex shrink-0 items-center", children: [
428
- O && /* @__PURE__ */ n(
436
+ /* @__PURE__ */ e(f, {}),
437
+ /* @__PURE__ */ e(Ze, { draft: t, onOpen: C, pendingTip: S }),
438
+ /* @__PURE__ */ r("div", { "data-save-split": "", className: "flex shrink-0 items-center", children: [
439
+ R && /* @__PURE__ */ r(
429
440
  "button",
430
441
  {
431
442
  type: "button",
432
443
  "data-editor-save": "",
433
444
  disabled: p === 0,
434
445
  onClick: () => {
435
- var m;
436
- return void ((m = t.save) == null ? void 0 : m.call(t));
446
+ var d;
447
+ return void ((d = t.save) == null ? void 0 : d.call(t));
437
448
  },
438
- "data-tip": p > 0 ? `Save ${I(p)} (⌘S)` : "Nothing to save",
449
+ "data-tip": p > 0 ? `Save ${W(p)} (⌘S)` : "Nothing to save",
439
450
  className: h(
440
451
  "inline-flex h-8 items-center gap-1.5 rounded-l-md px-3 text-[12.5px] font-medium transition-opacity disabled:pointer-events-none disabled:opacity-40",
441
452
  p > 0 ? "bg-nvr-cyan text-white hover:opacity-90" : "border border-slate-200 text-slate-700 dark:border-border dark:text-foreground"
442
453
  ),
443
454
  children: [
444
- /* @__PURE__ */ e(Z, { className: "h-3.5 w-3.5" }),
455
+ /* @__PURE__ */ e(_, { className: "h-3.5 w-3.5" }),
445
456
  "Save"
446
457
  ]
447
458
  }
448
459
  ),
449
- /* @__PURE__ */ n(
450
- R,
460
+ /* @__PURE__ */ r(
461
+ A,
451
462
  {
452
463
  label: "Save options",
453
- icon: /* @__PURE__ */ e(J, { className: "h-3.5 w-3.5" }),
464
+ icon: /* @__PURE__ */ e(q, { className: "h-3.5 w-3.5" }),
454
465
  iconOnly: !0,
455
466
  align: "end",
456
467
  width: "w-[300px]",
457
- tip: O ? "Review, check or schedule the changes; Autosave" : "Autosave",
468
+ tip: R ? "Review, check or schedule the changes; Autosave" : "Autosave",
458
469
  className: h(
459
- O ? "rounded-l-none border border-l-0 border-slate-200 dark:border-border" : "border border-slate-200 dark:border-border"
470
+ R ? "rounded-l-none border border-l-0 border-slate-200 dark:border-border" : "border border-slate-200 dark:border-border"
460
471
  ),
461
472
  data: { "data-save-menu": "" },
462
473
  children: [
463
- o && $ && /* @__PURE__ */ e(
464
- _,
474
+ Z && j && /* @__PURE__ */ e(
475
+ X,
465
476
  {
466
477
  label: "Review changes on canvas",
467
- icon: /* @__PURE__ */ e(me, { className: "h-3.5 w-3.5" }),
478
+ icon: /* @__PURE__ */ e(be, { className: "h-3.5 w-3.5" }),
468
479
  hint: "Mark the unsaved changes on the form",
469
- checked: K,
470
- onClick: o,
480
+ checked: ee,
481
+ onClick: Z,
471
482
  data: { "data-editor-review": "" }
472
483
  }
473
484
  ),
474
- $ && V,
475
- /* @__PURE__ */ e(we, { layoutId: a, draft: t }),
476
- t.unsavedOps && t.discard && $ && /* @__PURE__ */ e(
477
- Te,
485
+ j && ae,
486
+ /* @__PURE__ */ e(Se, { layoutId: a, draft: t }),
487
+ t.unsavedOps && t.discard && j && /* @__PURE__ */ e(
488
+ je,
478
489
  {
479
490
  collection: i,
480
491
  layoutId: a,
@@ -485,18 +496,18 @@ function nt({
485
496
  }
486
497
  }
487
498
  ),
488
- t.setAutosave && /* @__PURE__ */ n(H, { children: [
489
- /* @__PURE__ */ e(E, {}),
499
+ t.setAutosave && /* @__PURE__ */ r(D, { children: [
500
+ /* @__PURE__ */ e(H, {}),
490
501
  /* @__PURE__ */ e(
491
- _,
502
+ X,
492
503
  {
493
504
  label: "Autosave",
494
- icon: /* @__PURE__ */ e(Z, { className: "h-3.5 w-3.5" }),
505
+ icon: /* @__PURE__ */ e(_, { className: "h-3.5 w-3.5" }),
495
506
  hint: t.autosave ? "Every change saves as you make it, until you close the editor" : "Off: changes wait for Save",
496
507
  checked: !!t.autosave,
497
508
  onClick: () => {
498
- var m;
499
- return (m = t.setAutosave) == null ? void 0 : m.call(t, !t.autosave);
509
+ var d;
510
+ return (d = t.setAutosave) == null ? void 0 : d.call(t, !t.autosave);
500
511
  },
501
512
  data: { "data-autosave-switch": "" }
502
513
  }
@@ -510,9 +521,9 @@ function nt({
510
521
  }
511
522
  );
512
523
  }
513
- function w() {
524
+ function f() {
514
525
  return /* @__PURE__ */ e("span", { "aria-hidden": !0, "data-tb-wide": "", className: "h-5 w-px shrink-0 bg-slate-200 dark:bg-border" });
515
526
  }
516
527
  export {
517
- nt as EditorTopBar
528
+ it as EditorTopBar
518
529
  };