@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,33 +1,33 @@
1
1
  import { jsx as x } from "react/jsx-runtime";
2
- import { useState as m, useRef as g, useEffect as h, useLayoutEffect as v } from "react";
2
+ import { useState as m, useRef as g, useEffect as v, useLayoutEffect as h } from "react";
3
3
  import { createPortal as b } from "react-dom";
4
- let d = 0;
4
+ let l = 0;
5
5
  function O() {
6
- const [e, r] = m(null), [t, c] = m(!1), s = g(null);
7
- return h(() => (d += 1, c(d === 1), () => {
8
- d -= 1;
9
- }), []), h(() => {
6
+ const [e, i] = m(null), [t, d] = m(!1), s = g(null);
7
+ return v(() => (l += 1, d(l === 1), () => {
8
+ l -= 1;
9
+ }), []), v(() => {
10
10
  if (!t) return;
11
- const i = (u) => {
12
- var l, w;
13
- const n = (w = (l = u.target) == null ? void 0 : l.closest) == null ? void 0 : w.call(l, "[data-tip]"), a = n == null ? void 0 : n.getAttribute("data-tip");
14
- if (!n || !a) {
15
- r((p) => p && null);
11
+ const o = (u) => {
12
+ var c, w;
13
+ const n = (w = (c = u.target) == null ? void 0 : c.closest) == null ? void 0 : w.call(c, "[data-tip]"), a = n == null ? void 0 : n.getAttribute("data-tip");
14
+ if (!n || !a || n.getAttribute("aria-expanded") === "true") {
15
+ i((p) => p && null);
16
16
  return;
17
17
  }
18
18
  const f = n.getBoundingClientRect();
19
- r({ x: f.left, y: f.bottom + 4, text: a });
20
- }, o = () => r(null);
21
- return window.addEventListener("mouseover", i), window.addEventListener("scroll", o, !0), () => {
22
- window.removeEventListener("mouseover", i), window.removeEventListener("scroll", o, !0);
19
+ i({ x: f.left, y: f.bottom + 4, text: a });
20
+ }, r = () => i(null);
21
+ return window.addEventListener("mouseover", o), window.addEventListener("pointerdown", r, !0), window.addEventListener("scroll", r, !0), () => {
22
+ window.removeEventListener("mouseover", o), window.removeEventListener("pointerdown", r, !0), window.removeEventListener("scroll", r, !0);
23
23
  };
24
- }, [t]), v(() => {
24
+ }, [t]), h(() => {
25
25
  if (!e) return;
26
- const i = s.current;
27
- if (!i) return;
28
- const o = i.getBoundingClientRect();
26
+ const o = s.current;
27
+ if (!o) return;
28
+ const r = o.getBoundingClientRect();
29
29
  let { x: u, y: n } = e;
30
- o.right > window.innerWidth - 8 && (u = Math.max(8, window.innerWidth - o.width - 8)), o.bottom > window.innerHeight - 8 && (n = Math.max(8, e.y - o.height - 30)), (u !== e.x || n !== e.y) && r({ ...e, x: u, y: n });
30
+ r.right > window.innerWidth - 8 && (u = Math.max(8, window.innerWidth - r.width - 8)), r.bottom > window.innerHeight - 8 && (n = Math.max(8, e.y - r.height - 30)), (u !== e.x || n !== e.y) && i({ ...e, x: u, y: n });
31
31
  }, [e]), !t || !e ? null : b(
32
32
  /* @__PURE__ */ x(
33
33
  "div",
@@ -42,17 +42,17 @@ function O() {
42
42
  );
43
43
  }
44
44
  function R(e) {
45
- const r = g(null);
46
- return v(() => {
47
- const t = r.current;
45
+ const i = g(null);
46
+ return h(() => {
47
+ const t = i.current;
48
48
  if (!t) return;
49
- const c = () => {
49
+ const d = () => {
50
50
  (t.scrollWidth > t.clientWidth + 1 || t.scrollHeight > t.clientHeight + 1) && e ? t.setAttribute("data-tip", e) : t.removeAttribute("data-tip");
51
51
  };
52
- if (c(), typeof ResizeObserver > "u") return;
53
- const s = new ResizeObserver(c);
52
+ if (d(), typeof ResizeObserver > "u") return;
53
+ const s = new ResizeObserver(d);
54
54
  return s.observe(t), () => s.disconnect();
55
- }, [e]), r;
55
+ }, [e]), i;
56
56
  }
57
57
  export {
58
58
  O as TipLayer,
@@ -1,9 +1,9 @@
1
1
  import { useQuery as u, useInfiniteQuery as b, useQueryClient as f } from "@tanstack/react-query";
2
- import { useRef as w } from "react";
2
+ import { useRef as F } from "react";
3
3
  import { useNivaroClient as d } from "../../context.js";
4
4
  import { patch as y, get as r, del as p, post as i, put as h } from "../../lib/commands.js";
5
5
  import { useLiveEvent as m } from "../../lib/live.js";
6
- import { cardAccent as _ } from "./cards.js";
6
+ import { cardAccent as w } from "./cards.js";
7
7
  const l = {
8
8
  all: ["help-videos"],
9
9
  one: (s) => ["help-videos", "one", s],
@@ -28,7 +28,7 @@ const l = {
28
28
  draftEdits: (s, a) => ["help-video-draft", s, a]
29
29
  }, q = (s, a) => String(s ?? "").toLowerCase() === String(a ?? "").toLowerCase();
30
30
  function c(s, a) {
31
- const e = f(), t = w(s);
31
+ const e = f(), t = F(s);
32
32
  t.current = s, m(
33
33
  "help-video:changed",
34
34
  () => {
@@ -42,7 +42,7 @@ function c(s, a) {
42
42
  }
43
43
  );
44
44
  }
45
- async function F(s, a) {
45
+ async function _(s, a) {
46
46
  return (await s.request(r(`/help-videos/${a}`))).data;
47
47
  }
48
48
  function x(s) {
@@ -50,7 +50,7 @@ function x(s) {
50
50
  return c([l.one(s ?? "")], s), u({
51
51
  queryKey: l.one(s ?? ""),
52
52
  enabled: !!s,
53
- queryFn: () => F(a, s),
53
+ queryFn: () => _(a, s),
54
54
  // Poll while a render runs so the status chip and the stream switch over by themselves.
55
55
  refetchInterval: (e) => {
56
56
  var n, o;
@@ -73,11 +73,20 @@ function U(s, a = !0) {
73
73
  )
74
74
  });
75
75
  }
76
+ function M(s, a = !0) {
77
+ const e = d();
78
+ return c([["help-videos", "form"]]), u({
79
+ queryKey: ["help-videos", "form", s ?? ""],
80
+ enabled: a && !!s,
81
+ staleTime: 6e4,
82
+ queryFn: () => e.request(r("/help-videos/for-form", { collection: s })).then((t) => t.data)
83
+ });
84
+ }
76
85
  function K(s) {
77
86
  const a = s[s.length - 1];
78
87
  return a != null && a.data.length && s.reduce((t, n) => t + n.data.length, 0) < a.total ? s.length + 1 : void 0;
79
88
  }
80
- function M(s) {
89
+ function O(s) {
81
90
  const a = d();
82
91
  return c([["help-videos", "library"]]), b({
83
92
  queryKey: l.library(s),
@@ -102,7 +111,7 @@ async function g(s) {
102
111
  );
103
112
  return { data: a.data ?? [], paths: a.paths ?? [] };
104
113
  }
105
- function O() {
114
+ function z() {
106
115
  const s = d();
107
116
  return c([l.required]), u({
108
117
  queryKey: l.required,
@@ -110,7 +119,7 @@ function O() {
110
119
  queryFn: () => g(s)
111
120
  });
112
121
  }
113
- function z() {
122
+ function I() {
114
123
  const s = d();
115
124
  return c([l.required]), u({
116
125
  queryKey: l.required,
@@ -119,7 +128,7 @@ function z() {
119
128
  select: (a) => a.data
120
129
  });
121
130
  }
122
- function I(s = !0) {
131
+ function Q(s = !0) {
123
132
  const a = d();
124
133
  return u({
125
134
  queryKey: l.myPaths,
@@ -128,7 +137,7 @@ function I(s = !0) {
128
137
  queryFn: async () => (await a.request(r("/help-videos/paths/mine"))).data
129
138
  });
130
139
  }
131
- function Q(s = !0) {
140
+ function S(s = !0) {
132
141
  const a = d();
133
142
  return u({
134
143
  queryKey: l.paths,
@@ -136,7 +145,7 @@ function Q(s = !0) {
136
145
  queryFn: async () => (await a.request(r("/help-videos/paths"))).data
137
146
  });
138
147
  }
139
- function S(s) {
148
+ function j(s) {
140
149
  const a = s.request.bind(s);
141
150
  return {
142
151
  create: (e) => a(i("/help-videos/paths", e)).then((t) => t.data),
@@ -154,7 +163,7 @@ function S(s) {
154
163
  remove: (e) => a(p(`/help-videos/paths/${e}`))
155
164
  };
156
165
  }
157
- function j(s) {
166
+ function D(s) {
158
167
  const a = d();
159
168
  return u({
160
169
  queryKey: l.walk(s ?? ""),
@@ -165,7 +174,7 @@ function j(s) {
165
174
  )).data
166
175
  });
167
176
  }
168
- function D(s) {
177
+ function E(s) {
169
178
  const a = d(), e = f();
170
179
  return m(
171
180
  "help-video:question",
@@ -183,7 +192,7 @@ function D(s) {
183
192
  queryFn: () => $(a).questions(s)
184
193
  });
185
194
  }
186
- function E(s, a = !0) {
195
+ function N(s, a = !0) {
187
196
  const e = d();
188
197
  return u({
189
198
  queryKey: l.next(s ?? ""),
@@ -192,7 +201,7 @@ function E(s, a = !0) {
192
201
  queryFn: () => $(e).next(s)
193
202
  });
194
203
  }
195
- function N(s) {
204
+ function B(s) {
196
205
  const a = d();
197
206
  return u({
198
207
  queryKey: l.clips(s ?? ""),
@@ -202,13 +211,13 @@ function N(s) {
202
211
  const e = await a.request(r(`/help-videos/${s}/clips`));
203
212
  return Array.isArray(e == null ? void 0 : e.data) ? e.data : [];
204
213
  },
205
- refetchInterval: (e) => C(e.state.data) ? 2500 : !1
214
+ refetchInterval: (e) => V(e.state.data) ? 2500 : !1
206
215
  });
207
216
  }
208
- function C(s) {
217
+ function V(s) {
209
218
  return Array.isArray(s) && s.some((a) => a.status === "queued" || a.status === "rendering");
210
219
  }
211
- function B() {
220
+ function J() {
212
221
  const s = d();
213
222
  return u({
214
223
  queryKey: l.pages,
@@ -397,13 +406,13 @@ function $(s) {
397
406
  authorRoles: () => a(r("/settings")).then(
398
407
  (e) => {
399
408
  var t;
400
- return V((t = e.data) == null ? void 0 : t.help_video_author_roles);
409
+ return C((t = e.data) == null ? void 0 : t.help_video_author_roles);
401
410
  }
402
411
  ),
403
412
  setAuthorRoles: (e) => a(y("/settings", { help_video_author_roles: e }))
404
413
  };
405
414
  }
406
- async function J(s, a, e) {
415
+ async function W(s, a, e) {
407
416
  const t = new FormData();
408
417
  t.append("file", e, e.name);
409
418
  const n = await fetch(`${s.apiBase}/help-videos/${encodeURIComponent(a)}/music`, {
@@ -421,7 +430,7 @@ async function J(s, a, e) {
421
430
  }
422
431
  return o.data;
423
432
  }
424
- function W(s) {
433
+ function G(s) {
425
434
  var e, t;
426
435
  if (!s || typeof s != "object") return null;
427
436
  const a = s;
@@ -431,7 +440,7 @@ function W(s) {
431
440
  ...typeof ((t = a.response) == null ? void 0 : t.current_hash) == "string" ? { current_hash: a.response.current_hash } : {}
432
441
  };
433
442
  }
434
- function V(s) {
443
+ function C(s) {
435
444
  return (() => {
436
445
  if (Array.isArray(s)) return s;
437
446
  if (typeof s != "string" || !s.trim()) return [];
@@ -448,11 +457,11 @@ function P(s, a) {
448
457
  const e = s ? s.card_logo_url ?? s.logo_url : null;
449
458
  return {
450
459
  name: ((t = s == null ? void 0 : s.name) == null ? void 0 : t.trim()) || null,
451
- color: _(s == null ? void 0 : s.color),
460
+ color: w(s == null ? void 0 : s.color),
452
461
  logo: e ? `${a}${e}` : null
453
462
  };
454
463
  }
455
- function G(s, a) {
464
+ function X(s, a) {
456
465
  var n;
457
466
  const e = d(), t = u({
458
467
  queryKey: ["help-video-card-brand"],
@@ -464,27 +473,28 @@ function G(s, a) {
464
473
  }
465
474
  export {
466
475
  P as cardBrandFrom,
467
- C as clipsInFlight,
468
- F as fetchHelpVideo,
476
+ V as clipsInFlight,
477
+ _ as fetchHelpVideo,
469
478
  $ as helpVideoApi,
470
- W as helpVideoError,
479
+ G as helpVideoError,
471
480
  l as helpVideoKeys,
472
- S as learningPathApi,
481
+ j as learningPathApi,
473
482
  K as nextLibraryPage,
474
- V as parseRoleIdList,
475
- J as uploadMusicFile,
476
- G as useCardBrand,
483
+ C as parseRoleIdList,
484
+ W as uploadMusicFile,
485
+ X as useCardBrand,
477
486
  x as useHelpVideo,
478
- N as useHelpVideoClips,
479
- M as useHelpVideoLibrary,
487
+ B as useHelpVideoClips,
488
+ O as useHelpVideoLibrary,
480
489
  c as useHelpVideoLive,
481
- E as useHelpVideoNext,
482
- B as useHelpVideoPages,
483
- D as useHelpVideoQuestions,
484
- j as useHelpVideoWalk,
490
+ N as useHelpVideoNext,
491
+ J as useHelpVideoPages,
492
+ E as useHelpVideoQuestions,
493
+ D as useHelpVideoWalk,
485
494
  U as useHelpVideosFor,
486
- Q as useLearningPaths,
487
- I as useMyLearningPaths,
488
- O as useRequiredList,
489
- z as useRequiredVideos
495
+ M as useHelpVideosForForm,
496
+ S as useLearningPaths,
497
+ Q as useMyLearningPaths,
498
+ z as useRequiredList,
499
+ I as useRequiredVideos
490
500
  };