@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
@@ -1,38 +1,38 @@
1
- import { jsxs as s, jsx as o } from "react/jsx-runtime";
2
- import { useQueryClient as ke, useQuery as le, useQueries as Ne } from "@tanstack/react-query";
3
- import { AlertTriangle as ce, AlertCircle as me } from "lucide-react";
4
- import { useState as m, useCallback as I, useRef as b, useEffect as H } from "react";
5
- import { useNivaroClient as Ce } from "../../../context.js";
1
+ import { jsxs as i, jsx as o } from "react/jsx-runtime";
2
+ import { useQueryClient as Ne, useQuery as le, useQueries as Ce } from "@tanstack/react-query";
3
+ import { AlertTriangle as ce, AlertCircle as fe } from "lucide-react";
4
+ import { useState as m, useCallback as I, useRef as v, useEffect as H } from "react";
5
+ import { useNivaroClient as $e } from "../../../context.js";
6
6
  import { get as z } from "../../../lib/commands.js";
7
7
  import { Input as de } from "../../ui/input.js";
8
8
  import { Label as E } from "../../ui/label.js";
9
- import { Switch as Le } from "../../ui/switch.js";
10
- import { Textarea as Re } from "../../ui/textarea.js";
11
- import { helpVideoKeys as ue, helpVideoApi as R, useHelpVideoPages as Te } from "../api.js";
12
- import { collectionKeysOf as $e, stepsOf as Ae, removeCollection as _e, toggleStep as qe, addCollection as De } from "./contexts.js";
13
- import { RemovableChip as Ee, PickerCombo as he, RoleChips as pe } from "./PickerCombo.js";
9
+ import { Switch as _e } from "../../ui/switch.js";
10
+ import { Textarea as Le } from "../../ui/textarea.js";
11
+ import { helpVideoKeys as ue, helpVideoApi as _, useHelpVideoPages as Re } from "../api.js";
12
+ import { collectionKeysOf as Te, stepsOf as Ae, removeCollection as qe, toggleStep as De, addCollection as Ee } from "./contexts.js";
13
+ import { RemovableChip as he, PickerCombo as pe, RoleChips as me } from "./PickerCombo.js";
14
14
  import { blindRequiredRoles as Oe, joinNames as Pe } from "./publish.js";
15
- const G = (n) => n.replace(/_/g, " ").replace(/\b\w/g, (i) => i.toUpperCase()), Fe = "rounded-full border px-2.5 py-1 text-[12px] transition-colors duration-150 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-nvr-cyan motion-reduce:transition-none", Ke = "border-nvr-cyan bg-nvr-cyan/15 font-medium text-foreground", Ve = "border-border text-foreground hover:bg-muted", M = "rounded-sm underline underline-offset-2 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-nvr-cyan";
16
- function O({ title: n, hint: i, children: p }) {
17
- return /* @__PURE__ */ s("section", { className: "space-y-2.5 border-t border-border pt-5", children: [
18
- /* @__PURE__ */ s("div", { className: "space-y-0.5", children: [
15
+ const G = (n) => n.replace(/_/g, " ").replace(/\b\w/g, (s) => s.toUpperCase()), Fe = "rounded-full border px-2.5 py-1 text-[12px] transition-colors duration-150 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-nvr-cyan motion-reduce:transition-none", Ke = "border-nvr-cyan bg-nvr-cyan/15 font-medium text-foreground", Ve = "border-border text-foreground hover:bg-muted", M = "rounded-sm underline underline-offset-2 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-nvr-cyan";
16
+ function O({ title: n, hint: s, children: p }) {
17
+ return /* @__PURE__ */ i("section", { className: "space-y-2.5 border-t border-border pt-5", children: [
18
+ /* @__PURE__ */ i("div", { className: "space-y-0.5", children: [
19
19
  /* @__PURE__ */ o("h3", { className: "text-[13px] font-semibold text-foreground", children: n }),
20
- i && /* @__PURE__ */ o("p", { className: "max-w-[65ch] text-[12px] text-muted-foreground", children: i })
20
+ s && /* @__PURE__ */ o("p", { className: "max-w-[65ch] text-[12px] text-muted-foreground", children: s })
21
21
  ] }),
22
22
  p
23
23
  ] });
24
24
  }
25
- function J({ error: n, what: i, onRetry: p }) {
26
- return n ? /* @__PURE__ */ s(
25
+ function J({ error: n, what: s, onRetry: p }) {
26
+ return n ? /* @__PURE__ */ i(
27
27
  "p",
28
28
  {
29
29
  className: "flex items-start gap-1.5 text-[12px] text-rose-700 dark:text-rose-300",
30
30
  role: "alert",
31
31
  children: [
32
- /* @__PURE__ */ o(me, { className: "mt-px h-3.5 w-3.5 shrink-0", "aria-hidden": !0 }),
33
- /* @__PURE__ */ s("span", { children: [
32
+ /* @__PURE__ */ o(fe, { className: "mt-px h-3.5 w-3.5 shrink-0", "aria-hidden": !0 }),
33
+ /* @__PURE__ */ i("span", { children: [
34
34
  "The list of ",
35
- i,
35
+ s,
36
36
  " couldn't load.",
37
37
  " ",
38
38
  /* @__PURE__ */ o("button", { type: "button", className: M, onClick: p, children: "Try again" })
@@ -41,179 +41,179 @@ function J({ error: n, what: i, onRetry: p }) {
41
41
  }
42
42
  ) : null;
43
43
  }
44
- const v = [
44
+ const k = [
45
45
  ["everyone", "Everyone"],
46
46
  ["roles", "Chosen roles"]
47
47
  ];
48
48
  function Ze({ video: n }) {
49
- const i = Ce(), p = ke(), [T, X] = m(n.title), [$, Y] = m(n.description ?? ""), [A, Z] = m(n.category ?? ""), [c, fe] = m(n.contexts), [d, ye] = m(
49
+ const s = $e(), p = Ne(), [L, X] = m(n.title), [R, Y] = m(n.description ?? ""), [T, Z] = m(n.category ?? ""), [l, ye] = m(n.contexts), [d, ge] = m(
50
50
  n.visibility ?? { mode: "everyone", role_ids: [] }
51
- ), [P, ge] = m(n.required_role_ids ?? []), [F, xe] = m(n.allow_downloads !== !1), [ee, K] = m(null), V = I(
51
+ ), [P, xe] = m(n.required_role_ids ?? []), [F, be] = m(n.allow_downloads !== !1), [ee, K] = m(null), V = I(
52
52
  () => p.invalidateQueries({ queryKey: ue.one(n.id) }),
53
53
  [p, n.id]
54
54
  ), U = I((e, r) => {
55
55
  const t = r == null ? void 0 : r.message;
56
56
  K(`${e} didn't save${t ? `: ${t}` : "."} Change it again to retry.`);
57
- }, []), w = b({ title: T, description: $, category: A });
58
- w.current = { title: T, description: $, category: A };
59
- const f = b(w.current), k = b({
57
+ }, []), w = v({ title: L, description: R, category: T });
58
+ w.current = { title: L, description: R, category: T };
59
+ const f = v(w.current), N = v({
60
60
  title: null,
61
61
  description: null,
62
62
  category: null
63
- }), N = I(() => {
63
+ }), C = I(() => {
64
64
  const e = w.current, r = f.current, t = {};
65
65
  e.title !== r.title && (t.title = e.title), e.description !== r.description && (t.description = e.description || null), e.category !== r.category && (t.category = e.category || null);
66
66
  const a = Object.keys(t);
67
- a.length && (f.current = { ...r, ...Object.fromEntries(a.map((l) => [l, e[l]])) }, R(i).update(n.id, t).then(() => (K(null), p.setQueryData(
67
+ a.length && (f.current = { ...r, ...Object.fromEntries(a.map((c) => [c, e[c]])) }, _(s).update(n.id, t).then(() => (K(null), p.setQueryData(
68
68
  ue.one(n.id),
69
- (l) => l && { ...l, ...t }
70
- ), V())).catch((l) => {
71
- f.current = { ...f.current, ...Object.fromEntries(a.map((y) => [y, r[y]])) }, U("The text", l);
69
+ (c) => c && { ...c, ...t }
70
+ ), V())).catch((c) => {
71
+ f.current = { ...f.current, ...Object.fromEntries(a.map((y) => [y, r[y]])) }, U("The text", c);
72
72
  }));
73
- }, [i, n.id, p, V, U]);
73
+ }, [s, n.id, p, V, U]);
74
74
  H(() => {
75
- const e = window.setTimeout(N, 800);
75
+ const e = window.setTimeout(C, 800);
76
76
  return () => window.clearTimeout(e);
77
- }, [T, $, A]), H(() => N, []);
77
+ }, [L, R, T]), H(() => C, []);
78
78
  const W = (e, r, t) => {
79
- w.current[e] === f.current[e] && (k.current[e] && document.activeElement === k.current[e] || w.current[e] !== r && (f.current = { ...f.current, [e]: r }, t(r)));
79
+ w.current[e] === f.current[e] && (N.current[e] && document.activeElement === N.current[e] || w.current[e] !== r && (f.current = { ...f.current, [e]: r }, t(r)));
80
80
  };
81
81
  H(() => {
82
82
  W("title", n.title, X), W("description", n.description ?? "", Y), W("category", n.category ?? "", Z);
83
83
  }, [n.title, n.description, n.category]);
84
- const j = b({ contexts: c, visibility: d, required: P, downloads: F }), te = b(Promise.resolve()), _ = (e, r, t, a, l) => {
84
+ const j = v({ contexts: l, visibility: d, required: P, downloads: F }), te = v(Promise.resolve()), A = (e, r, t, a, c) => {
85
85
  t(r), te.current = te.current.then(async () => {
86
86
  try {
87
87
  await a(), j.current = { ...j.current, [e]: r }, K(null), V();
88
88
  } catch (y) {
89
- t(j.current[e]), U(l, y);
89
+ t(j.current[e]), U(c, y);
90
90
  }
91
91
  });
92
- }, C = (e) => _(
92
+ }, g = (e) => A(
93
93
  "contexts",
94
94
  e,
95
- fe,
96
- () => R(i).setContexts(n.id, e),
95
+ ye,
96
+ () => _(s).setContexts(n.id, e),
97
97
  "Where it shows"
98
- ), B = (e) => _(
98
+ ), S = (e) => A(
99
99
  "visibility",
100
100
  e,
101
- ye,
102
- () => R(i).update(n.id, { visibility: e }),
101
+ ge,
102
+ () => _(s).update(n.id, { visibility: e }),
103
103
  "Who can watch"
104
- ), be = (e) => _(
104
+ ), ve = (e) => A(
105
105
  "downloads",
106
106
  e,
107
- xe,
108
- () => R(i).update(n.id, { allow_downloads: e }),
107
+ be,
108
+ () => _(s).update(n.id, { allow_downloads: e }),
109
109
  "Downloads"
110
- ), ve = (e) => _(
110
+ ), ke = (e) => A(
111
111
  "required",
112
112
  e,
113
- ge,
114
- () => R(i).setRequirements(n.id, e),
113
+ xe,
114
+ () => _(s).setRequirements(n.id, e),
115
115
  "Required for"
116
116
  ), h = le({
117
117
  queryKey: ["chat-roles"],
118
- queryFn: async () => (await i.request(z("/chat/roles"))).data
119
- }), L = le({
118
+ queryFn: async () => (await s.request(z("/chat/roles"))).data
119
+ }), $ = le({
120
120
  queryKey: ["hv-collections"],
121
- queryFn: async () => (await i.request(
121
+ queryFn: async () => (await s.request(
122
122
  z("/collections")
123
123
  )).data
124
- }), g = Te(), Q = $e(c), we = Ne({
125
- queries: Q.map((e) => ({
124
+ }), x = Re(), B = Te(l), we = Ce({
125
+ queries: B.map((e) => ({
126
126
  queryKey: ["hv-states", e],
127
- queryFn: async () => (await i.request(
127
+ queryFn: async () => (await s.request(
128
128
  z(`/queues/collection-states/${e}`)
129
129
  )).data
130
130
  }))
131
- }), q = (e) => e.isLoading ? "Loading…" : e.isError ? "The list couldn't load." : void 0, S = (e) => {
131
+ }), q = (e) => e.isLoading ? "Loading…" : e.isError ? "The list couldn't load." : void 0, Q = (e) => {
132
132
  var r, t;
133
133
  return ((t = (r = h.data) == null ? void 0 : r.find((a) => a.id.toUpperCase() === e.toUpperCase())) == null ? void 0 : t.name) ?? (h.isLoading ? "Loading…" : "Unknown role");
134
134
  }, re = (e) => {
135
135
  var r, t;
136
- return ((t = (r = L.data) == null ? void 0 : r.find((a) => a.collection === e)) == null ? void 0 : t.display_name) || G(e);
136
+ return ((t = (r = $.data) == null ? void 0 : r.find((a) => a.collection === e)) == null ? void 0 : t.display_name) || G(e);
137
137
  }, oe = (e) => {
138
138
  var r, t;
139
- return ((t = (r = g.data) == null ? void 0 : r.find((a) => a.key === e)) == null ? void 0 : t.label) ?? (g.isLoading ? "Loading…" : "Unknown page");
140
- }, ne = Oe(d, P), x = `hv-details-${n.id}`, ae = b([]), se = (e) => {
139
+ return ((t = (r = x.data) == null ? void 0 : r.find((a) => a.key === e)) == null ? void 0 : t.label) ?? (x.isLoading ? "Loading…" : "Unknown page");
140
+ }, ne = Oe(d, P), b = `hv-details-${n.id}`, ae = v([]), ie = (e) => {
141
141
  var t;
142
- const r = v[(e + v.length) % v.length][0];
143
- B({ mode: r, role_ids: r === "everyone" ? [] : d.role_ids }), (t = ae.current[(e + v.length) % v.length]) == null || t.focus();
142
+ const r = k[(e + k.length) % k.length][0];
143
+ S({ mode: r, role_ids: r === "everyone" ? [] : d.role_ids }), (t = ae.current[(e + k.length) % k.length]) == null || t.focus();
144
144
  };
145
- return /* @__PURE__ */ s("div", { className: "max-w-[760px] space-y-5 p-5 text-[13px]", "data-hv-details": !0, children: [
146
- /* @__PURE__ */ s("div", { className: "space-y-1.5", children: [
147
- /* @__PURE__ */ o(E, { htmlFor: `${x}-title`, children: "Title" }),
145
+ return /* @__PURE__ */ i("div", { className: "max-w-[760px] space-y-5 p-5 text-[13px]", "data-hv-details": !0, children: [
146
+ /* @__PURE__ */ i("div", { className: "space-y-1.5", children: [
147
+ /* @__PURE__ */ o(E, { htmlFor: `${b}-title`, children: "Title" }),
148
148
  /* @__PURE__ */ o(
149
149
  de,
150
150
  {
151
- id: `${x}-title`,
151
+ id: `${b}-title`,
152
152
  ref: (e) => {
153
- k.current.title = e;
153
+ N.current.title = e;
154
154
  },
155
- value: T,
155
+ value: L,
156
156
  maxLength: 200,
157
157
  onChange: (e) => X(e.target.value),
158
- onBlur: N,
158
+ onBlur: C,
159
159
  className: "h-9 text-[13px]",
160
160
  "data-hv-title": !0
161
161
  }
162
162
  )
163
163
  ] }),
164
- /* @__PURE__ */ s("div", { className: "space-y-1.5", children: [
165
- /* @__PURE__ */ o(E, { htmlFor: `${x}-description`, children: "Description" }),
164
+ /* @__PURE__ */ i("div", { className: "space-y-1.5", children: [
165
+ /* @__PURE__ */ o(E, { htmlFor: `${b}-description`, children: "Description" }),
166
166
  /* @__PURE__ */ o(
167
- Re,
167
+ Le,
168
168
  {
169
- id: `${x}-description`,
169
+ id: `${b}-description`,
170
170
  ref: (e) => {
171
- k.current.description = e;
171
+ N.current.description = e;
172
172
  },
173
- value: $,
173
+ value: R,
174
174
  rows: 3,
175
175
  maxLength: 4e3,
176
176
  onChange: (e) => Y(e.target.value),
177
- onBlur: N,
177
+ onBlur: C,
178
178
  className: "text-[13px]",
179
179
  "data-hv-description": !0
180
180
  }
181
181
  )
182
182
  ] }),
183
- /* @__PURE__ */ s("div", { className: "space-y-1.5", children: [
184
- /* @__PURE__ */ o(E, { htmlFor: `${x}-category`, children: "Category" }),
183
+ /* @__PURE__ */ i("div", { className: "space-y-1.5", children: [
184
+ /* @__PURE__ */ o(E, { htmlFor: `${b}-category`, children: "Category" }),
185
185
  /* @__PURE__ */ o(
186
186
  de,
187
187
  {
188
- id: `${x}-category`,
188
+ id: `${b}-category`,
189
189
  ref: (e) => {
190
- k.current.category = e;
190
+ N.current.category = e;
191
191
  },
192
- value: A,
192
+ value: T,
193
193
  maxLength: 100,
194
194
  onChange: (e) => Z(e.target.value),
195
- onBlur: N,
195
+ onBlur: C,
196
196
  placeholder: "For example, Workflows",
197
197
  className: "h-9 text-[13px]"
198
198
  }
199
199
  )
200
200
  ] }),
201
- /* @__PURE__ */ s(
201
+ /* @__PURE__ */ i(
202
202
  O,
203
203
  {
204
204
  title: "Where it shows",
205
205
  hint: "On a record form, the Videos button lists the videos for that collection. Pick steps to show a video only at those steps, or leave them all off to show it at every step.",
206
206
  children: [
207
- Q.map((e, r) => {
208
- var ie;
209
- const t = we[r], a = Ae(c, e), l = (t == null ? void 0 : t.data) ?? [], y = a.filter((u) => !l.some((D) => D.key === u));
210
- return /* @__PURE__ */ s(
207
+ B.map((e, r) => {
208
+ var se;
209
+ const t = we[r], a = Ae(l, e), c = (t == null ? void 0 : t.data) ?? [], y = a.filter((u) => !c.some((D) => D.key === u));
210
+ return /* @__PURE__ */ i(
211
211
  "div",
212
212
  {
213
213
  className: "space-y-2 rounded-md border border-border p-3",
214
214
  "data-hv-context-collection": e,
215
215
  children: [
216
- /* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: [
216
+ /* @__PURE__ */ i("div", { className: "flex items-center gap-2", children: [
217
217
  /* @__PURE__ */ o("span", { className: "font-medium text-foreground", children: re(e) }),
218
218
  /* @__PURE__ */ o("span", { className: "text-[12px] text-muted-foreground", "data-hv-step-summary": !0, children: a.length ? "Only at the chosen steps" : "Every step" }),
219
219
  /* @__PURE__ */ o(
@@ -222,20 +222,20 @@ function Ze({ video: n }) {
222
222
  type: "button",
223
223
  className: `ml-auto text-[12px] text-muted-foreground ${M}`,
224
224
  "aria-label": `Remove ${re(e)}`,
225
- onClick: () => C(_e(c, e)),
225
+ onClick: () => g(qe(l, e)),
226
226
  children: "Remove"
227
227
  }
228
228
  )
229
229
  ] }),
230
- /* @__PURE__ */ s("div", { className: "flex flex-wrap items-center gap-1.5", children: [
231
- [...l, ...y.map((u) => ({ key: u, label: G(u) }))].map((u) => {
230
+ /* @__PURE__ */ i("div", { className: "flex flex-wrap items-center gap-1.5", children: [
231
+ [...c, ...y.map((u) => ({ key: u, label: G(u) }))].map((u) => {
232
232
  const D = a.includes(u.key);
233
233
  return /* @__PURE__ */ o(
234
234
  "button",
235
235
  {
236
236
  type: "button",
237
237
  "aria-pressed": D,
238
- onClick: () => C(qe(c, e, u.key)),
238
+ onClick: () => g(De(l, e, u.key)),
239
239
  className: `${Fe} ${D ? Ke : Ve}`,
240
240
  "data-hv-state-chip": u.key,
241
241
  children: u.label
@@ -244,73 +244,90 @@ function Ze({ video: n }) {
244
244
  );
245
245
  }),
246
246
  (t == null ? void 0 : t.isLoading) && /* @__PURE__ */ o("span", { className: "text-[12px] text-muted-foreground", children: "Loading steps…" }),
247
- (t == null ? void 0 : t.isError) && /* @__PURE__ */ s("span", { className: "text-[12px] text-rose-700 dark:text-rose-300", role: "alert", children: [
247
+ (t == null ? void 0 : t.isError) && /* @__PURE__ */ i("span", { className: "text-[12px] text-rose-700 dark:text-rose-300", role: "alert", children: [
248
248
  "The steps couldn't load.",
249
249
  " ",
250
250
  /* @__PURE__ */ o("button", { type: "button", className: M, onClick: () => void t.refetch(), children: "Try again" })
251
251
  ] }),
252
- ((ie = t == null ? void 0 : t.data) == null ? void 0 : ie.length) === 0 && y.length === 0 && /* @__PURE__ */ o("span", { className: "text-[12px] text-muted-foreground", children: "This collection has no pipeline steps." })
252
+ ((se = t == null ? void 0 : t.data) == null ? void 0 : se.length) === 0 && y.length === 0 && /* @__PURE__ */ o("span", { className: "text-[12px] text-muted-foreground", children: "This collection has no pipeline steps." })
253
253
  ] })
254
254
  ]
255
255
  },
256
256
  e
257
257
  );
258
258
  }),
259
- c.some((e) => e.kind === "page") && /* @__PURE__ */ o("div", { className: "flex flex-wrap gap-1.5", children: c.filter((e) => e.kind === "page").map((e) => /* @__PURE__ */ o(
260
- Ee,
259
+ l.some((e) => e.kind === "page") && /* @__PURE__ */ o("div", { className: "flex flex-wrap gap-1.5", children: l.filter((e) => e.kind === "page").map((e) => /* @__PURE__ */ o(
260
+ he,
261
261
  {
262
262
  removeLabel: `Remove ${oe(e.key)}`,
263
- onRemove: () => C(c.filter((r) => !(r.kind === "page" && r.key === e.key))),
263
+ onRemove: () => g(l.filter((r) => !(r.kind === "page" && r.key === e.key))),
264
264
  "data-hv-context-page": e.key,
265
265
  children: oe(e.key)
266
266
  },
267
267
  e.key
268
268
  )) }),
269
- c.length === 0 && /* @__PURE__ */ o("p", { className: "text-[12px] text-muted-foreground", children: "Not shown anywhere yet. Add a record form or a page to publish." }),
269
+ l.some((e) => e.kind === "field" || e.kind === "section") && /* @__PURE__ */ o("div", { className: "flex flex-wrap gap-1.5", children: l.filter((e) => e.kind === "field" || e.kind === "section").map((e) => {
270
+ const r = `${e.kind === "field" ? "Field" : "Section"} ${e.state_key} on ${e.key}`;
271
+ return /* @__PURE__ */ o(
272
+ he,
273
+ {
274
+ removeLabel: `Remove ${r}`,
275
+ onRemove: () => g(
276
+ l.filter(
277
+ (t) => !(t.kind === e.kind && t.key === e.key && t.state_key === e.state_key)
278
+ )
279
+ ),
280
+ "data-hv-context-target": `${e.kind}:${e.key}:${e.state_key}`,
281
+ children: r
282
+ },
283
+ `${e.kind}|${e.key}|${e.state_key}`
284
+ );
285
+ }) }),
286
+ l.length === 0 && /* @__PURE__ */ o("p", { className: "text-[12px] text-muted-foreground", children: "Not shown anywhere yet. Add a record form or a page to publish." }),
270
287
  /* @__PURE__ */ o(
271
288
  J,
272
289
  {
273
- error: L.isError,
290
+ error: $.isError,
274
291
  what: "record forms",
275
- onRetry: () => void L.refetch()
292
+ onRetry: () => void $.refetch()
276
293
  }
277
294
  ),
278
- /* @__PURE__ */ o(J, { error: g.isError, what: "pages", onRetry: () => void g.refetch() }),
279
- /* @__PURE__ */ s("div", { className: "flex flex-wrap gap-2", children: [
295
+ /* @__PURE__ */ o(J, { error: x.isError, what: "pages", onRetry: () => void x.refetch() }),
296
+ /* @__PURE__ */ i("div", { className: "flex flex-wrap gap-2", children: [
280
297
  /* @__PURE__ */ o(
281
- he,
298
+ pe,
282
299
  {
283
300
  ariaLabel: "Add a record form",
284
301
  placeholder: "Add a record form",
285
- emptyText: q(L),
286
- options: (L.data ?? []).filter(
287
- (e) => !e.collection.startsWith("nivaro_") && !Q.includes(e.collection)
302
+ emptyText: q($),
303
+ options: ($.data ?? []).filter(
304
+ (e) => !e.collection.startsWith("nivaro_") && !B.includes(e.collection)
288
305
  ).map((e) => ({ value: e.collection, label: e.display_name || G(e.collection) })),
289
- onPick: (e) => C(De(c, e))
306
+ onPick: (e) => g(Ee(l, e))
290
307
  }
291
308
  ),
292
309
  /* @__PURE__ */ o(
293
- he,
310
+ pe,
294
311
  {
295
312
  ariaLabel: "Add a page",
296
313
  placeholder: "Add a page",
297
- emptyText: q(g),
298
- options: (g.data ?? []).filter((e) => !c.some((r) => r.kind === "page" && r.key === e.key)).map((e) => ({ value: e.key, label: e.label, hint: e.app ?? void 0 })),
299
- onPick: (e) => C([...c, { kind: "page", key: e, state_key: null }])
314
+ emptyText: q(x),
315
+ options: (x.data ?? []).filter((e) => !l.some((r) => r.kind === "page" && r.key === e.key)).map((e) => ({ value: e.key, label: e.label, hint: e.app ?? void 0 })),
316
+ onPick: (e) => g([...l, { kind: "page", key: e, state_key: null }])
300
317
  }
301
318
  )
302
319
  ] })
303
320
  ]
304
321
  }
305
322
  ),
306
- /* @__PURE__ */ s(O, { title: "Who can watch", children: [
323
+ /* @__PURE__ */ i(O, { title: "Who can watch", children: [
307
324
  /* @__PURE__ */ o(
308
325
  "div",
309
326
  {
310
327
  className: "inline-flex overflow-hidden rounded-md border border-input",
311
328
  role: "radiogroup",
312
329
  "aria-label": "Who can watch",
313
- children: v.map(([e, r], t) => (
330
+ children: k.map(([e, r], t) => (
314
331
  // biome-ignore lint/a11y/useSemanticElements: a segmented control — buttons in a radiogroup, not native radios
315
332
  /* @__PURE__ */ o(
316
333
  "button",
@@ -322,9 +339,9 @@ function Ze({ video: n }) {
322
339
  role: "radio",
323
340
  "aria-checked": d.mode === e,
324
341
  tabIndex: d.mode === e ? 0 : -1,
325
- onClick: () => B({ mode: e, role_ids: e === "everyone" ? [] : d.role_ids }),
342
+ onClick: () => S({ mode: e, role_ids: e === "everyone" ? [] : d.role_ids }),
326
343
  onKeyDown: (a) => {
327
- a.key === "ArrowRight" || a.key === "ArrowDown" ? (a.preventDefault(), se(t + 1)) : (a.key === "ArrowLeft" || a.key === "ArrowUp") && (a.preventDefault(), se(t - 1));
344
+ a.key === "ArrowRight" || a.key === "ArrowDown" ? (a.preventDefault(), ie(t + 1)) : (a.key === "ArrowLeft" || a.key === "ArrowUp") && (a.preventDefault(), ie(t - 1));
328
345
  },
329
346
  className: `h-8 border-l border-input px-3 text-[12.5px] transition-colors duration-150 first:border-l-0 focus-visible:relative focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-nvr-cyan motion-reduce:transition-none ${d.mode === e ? "bg-nvr-cyan/15 font-semibold text-foreground" : "bg-background text-foreground hover:bg-muted"}`,
330
347
  "data-hv-visibility": e,
@@ -336,17 +353,17 @@ function Ze({ video: n }) {
336
353
  }
337
354
  ),
338
355
  d.mode === "roles" && /* @__PURE__ */ o(
339
- pe,
356
+ me,
340
357
  {
341
358
  roles: h.data ?? [],
342
359
  selected: d.role_ids,
343
- onChange: (e) => B({ mode: "roles", role_ids: e }),
344
- roleName: S,
360
+ onChange: (e) => S({ mode: "roles", role_ids: e }),
361
+ roleName: Q,
345
362
  addLabel: "Add a role that can watch",
346
363
  emptyText: q(h)
347
364
  }
348
365
  ),
349
- d.mode === "roles" && d.role_ids.length === 0 && /* @__PURE__ */ s("p", { className: "flex items-start gap-1.5 text-[12px] text-amber-800 dark:text-amber-200", children: [
366
+ d.mode === "roles" && d.role_ids.length === 0 && /* @__PURE__ */ i("p", { className: "flex items-start gap-1.5 text-[12px] text-amber-800 dark:text-amber-200", children: [
350
367
  /* @__PURE__ */ o(ce, { className: "mt-px h-3.5 w-3.5 shrink-0", "aria-hidden": !0 }),
351
368
  "Pick at least one role. Until then, only video authors can watch it."
352
369
  ] })
@@ -356,13 +373,13 @@ function Ze({ video: n }) {
356
373
  {
357
374
  title: "Downloads",
358
375
  hint: "People who can watch it can save the video and its captions to their computer. Authors can always download.",
359
- children: /* @__PURE__ */ s("div", { className: "flex items-center gap-2.5", children: [
376
+ children: /* @__PURE__ */ i("div", { className: "flex items-center gap-2.5", children: [
360
377
  /* @__PURE__ */ o(
361
- Le,
378
+ _e,
362
379
  {
363
380
  id: `hv-downloads-${n.id}`,
364
381
  checked: F,
365
- onCheckedChange: (e) => be(e),
382
+ onCheckedChange: (e) => ve(e),
366
383
  "data-hv-allow-downloads": F ? "on" : "off"
367
384
  }
368
385
  ),
@@ -370,33 +387,33 @@ function Ze({ video: n }) {
370
387
  ] })
371
388
  }
372
389
  ),
373
- /* @__PURE__ */ s(
390
+ /* @__PURE__ */ i(
374
391
  O,
375
392
  {
376
393
  title: "Required for",
377
394
  hint: "People in these roles see the video in their Required videos list until they have watched it.",
378
395
  children: [
379
396
  /* @__PURE__ */ o(
380
- pe,
397
+ me,
381
398
  {
382
399
  roles: h.data ?? [],
383
400
  selected: P,
384
- onChange: ve,
385
- roleName: S,
401
+ onChange: ke,
402
+ roleName: Q,
386
403
  addLabel: "Add a required role",
387
404
  emptyText: q(h)
388
405
  }
389
406
  ),
390
407
  /* @__PURE__ */ o(J, { error: h.isError, what: "roles", onRetry: () => void h.refetch() }),
391
- ne.length > 0 && !h.isLoading && /* @__PURE__ */ s(
408
+ ne.length > 0 && !h.isLoading && /* @__PURE__ */ i(
392
409
  "p",
393
410
  {
394
411
  className: "flex items-start gap-1.5 text-[12px] text-amber-800 dark:text-amber-200",
395
412
  "data-hv-blind-roles": !0,
396
413
  children: [
397
414
  /* @__PURE__ */ o(ce, { className: "mt-px h-3.5 w-3.5 shrink-0", "aria-hidden": !0 }),
398
- /* @__PURE__ */ s("span", { children: [
399
- Pe(ne.map(S)),
415
+ /* @__PURE__ */ i("span", { children: [
416
+ Pe(ne.map(Q)),
400
417
  " must watch this but can't see it. Add them to who can watch, or they won't be asked."
401
418
  ] })
402
419
  ]
@@ -405,13 +422,13 @@ function Ze({ video: n }) {
405
422
  ]
406
423
  }
407
424
  ),
408
- /* @__PURE__ */ o("div", { role: "status", "aria-live": "polite", className: "min-h-[1rem]", children: ee && /* @__PURE__ */ s(
425
+ /* @__PURE__ */ o("div", { role: "status", "aria-live": "polite", className: "min-h-[1rem]", children: ee && /* @__PURE__ */ i(
409
426
  "p",
410
427
  {
411
428
  className: "flex items-start gap-1.5 text-[12px] text-rose-700 dark:text-rose-300",
412
429
  "data-hv-details-problem": !0,
413
430
  children: [
414
- /* @__PURE__ */ o(me, { className: "mt-px h-3.5 w-3.5 shrink-0", "aria-hidden": !0 }),
431
+ /* @__PURE__ */ o(fe, { className: "mt-px h-3.5 w-3.5 shrink-0", "aria-hidden": !0 }),
415
432
  ee
416
433
  ]
417
434
  }
@@ -1,5 +1,5 @@
1
1
  import { jsx as o, jsxs as x, Fragment as $ } from "react/jsx-runtime";
2
- import { Copy as F, History as O, Eye as K, Sigma as B, ExternalLink as H, Lock as I, X as P } from "lucide-react";
2
+ import { Copy as F, History as O, Eye as K, Sigma as P, ExternalLink as B, Lock as H, X as I } from "lucide-react";
3
3
  import { createContext as U, useContext as q, useState as C, useCallback as g, useRef as v, useEffect as E } from "react";
4
4
  import { createPortal as J } from "react-dom";
5
5
  import { toast as k } from "sonner";
@@ -90,23 +90,24 @@ function ne({
90
90
  onClick: n,
91
91
  "aria-label": "Dismiss",
92
92
  className: "shrink-0 rounded p-0.5 text-sky-500 hover:bg-sky-100 hover:text-sky-800 dark:hover:bg-sky-500/20",
93
- children: /* @__PURE__ */ o(P, { className: "h-3 w-3" })
93
+ children: /* @__PURE__ */ o(I, { className: "h-3 w-3" })
94
94
  }
95
95
  )
96
96
  ]
97
97
  }
98
98
  );
99
99
  }
100
- function re({ reason: e }) {
100
+ function re({ reason: e, onHover: n }) {
101
101
  return /* @__PURE__ */ o(
102
102
  "span",
103
103
  {
104
+ onPointerEnter: n,
104
105
  className: "inline-flex cursor-help items-center gap-1 text-amber-500 dark:text-amber-400",
105
106
  "data-tip": e,
106
107
  "data-lock-reason": !0,
107
108
  "aria-label": e,
108
109
  role: "img",
109
- children: /* @__PURE__ */ o(I, { className: "h-3 w-3" })
110
+ children: /* @__PURE__ */ o(H, { className: "h-3 w-3" })
110
111
  }
111
112
  );
112
113
  }
@@ -203,7 +204,7 @@ function oe({
203
204
  {
204
205
  key: "explain",
205
206
  label: "Explain value",
206
- icon: /* @__PURE__ */ o(B, { className: "h-3.5 w-3.5" }),
207
+ icon: /* @__PURE__ */ o(P, { className: "h-3.5 w-3.5" }),
207
208
  disabled: !d || !((M = e.current) != null && M.querySelector("[data-field-lineage]")),
208
209
  run: () => {
209
210
  S("[data-field-lineage]");
@@ -213,7 +214,7 @@ function oe({
213
214
  {
214
215
  key: "open",
215
216
  label: `Open related ${(D = s.one_collection) == null ? void 0 : D.replace(/_/g, " ")}`,
216
- icon: /* @__PURE__ */ o(H, { className: "h-3.5 w-3.5" }),
217
+ icon: /* @__PURE__ */ o(B, { className: "h-3.5 w-3.5" }),
217
218
  disabled: t == null || t === "",
218
219
  run: () => {
219
220
  const a = typeof t == "object" && t && "id" in t ? String(t.id) : String(t);