@parallelworks/ui 0.40.1 → 0.42.0

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 (289) hide show
  1. package/README.md +25 -0
  2. package/dist/ai/adapter/memoryStore.js +7 -0
  3. package/dist/ai/adapter/mock/mockAdapter.js +52 -17
  4. package/dist/ai/adapter/openai/createOpenAIStream.js +1 -1
  5. package/dist/ai/adapter/openai/index.d.ts +1 -1
  6. package/dist/ai/adapter/openai/sse.d.ts +8 -2
  7. package/dist/ai/adapter/openai/sse.js +40 -4
  8. package/dist/ai/adapter/openai/wire.d.ts +6 -0
  9. package/dist/ai/components/AllocationSelector.d.ts +3 -4
  10. package/dist/ai/components/AllocationSelector.js +37 -33
  11. package/dist/ai/components/AttachmentManager.js +7 -7
  12. package/dist/ai/components/AttachmentUpload.js +5 -5
  13. package/dist/ai/components/BranchNavigator.js +1 -1
  14. package/dist/ai/components/ChatEmptyState.js +2 -2
  15. package/dist/ai/components/ChatInput.js +10 -8
  16. package/dist/ai/components/ChatLayout.js +4 -5
  17. package/dist/ai/components/ChatMessage.js +12 -12
  18. package/dist/ai/components/ChatMessageList.js +9 -9
  19. package/dist/ai/components/ChatSidebar.js +8 -9
  20. package/dist/ai/components/ChatThread.js +4 -4
  21. package/dist/ai/components/ComposerChrome.d.ts +2 -2
  22. package/dist/ai/components/ComposerChrome.js +3 -6
  23. package/dist/ai/components/DragOverlay.js +2 -2
  24. package/dist/ai/components/ModelSelector.d.ts +5 -3
  25. package/dist/ai/components/ModelSelector.js +102 -339
  26. package/dist/ai/components/PastedText.js +11 -11
  27. package/dist/ai/components/ProviderIssueBanner.d.ts +2 -0
  28. package/dist/ai/components/ProviderIssueBanner.js +34 -16
  29. package/dist/ai/components/Reasoning.js +4 -4
  30. package/dist/ai/components/ShareDialog.js +43 -35
  31. package/dist/ai/components/SlashMenu.d.ts +12 -2
  32. package/dist/ai/components/SlashMenu.js +29 -13
  33. package/dist/ai/components/agent/ActivityLine.js +3 -3
  34. package/dist/ai/components/agent/AgentMessageParts.js +20 -20
  35. package/dist/ai/components/agent/PermissionPicker.js +13 -11
  36. package/dist/ai/components/conversationActions.d.ts +4 -6
  37. package/dist/ai/components/conversationActions.js +9 -13
  38. package/dist/ai/core/ChatProvider.js +4 -4
  39. package/dist/ai/core/config.js +1 -1
  40. package/dist/ai/core/parts.d.ts +5 -0
  41. package/dist/ai/core/parts.js +28 -1
  42. package/dist/ai/core/providerIssues.d.ts +7 -0
  43. package/dist/ai/core/providerIssues.js +9 -1
  44. package/dist/ai/core/useKeyboardShortcuts.d.ts +4 -0
  45. package/dist/ai/core/useKeyboardShortcuts.js +8 -2
  46. package/dist/ai/index.d.ts +0 -1
  47. package/dist/ai/index.js +1 -2
  48. package/dist/ai/strings.d.ts +19 -0
  49. package/dist/ai/strings.js +18 -1
  50. package/dist/ai/ui/Avatar.js +5 -5
  51. package/dist/ai/ui/ConversationSidebar.d.ts +0 -1
  52. package/dist/ai/ui/ConversationSidebar.js +6 -7
  53. package/dist/ai/ui/Markdown.js +3 -3
  54. package/dist/ai/ui/Notice.js +6 -6
  55. package/dist/ai/ui/chip.d.ts +4 -0
  56. package/dist/ai/ui/chip.js +8 -0
  57. package/dist/ai/ui/sidebar.d.ts +6 -5
  58. package/dist/ai/ui/sidebar.js +39 -43
  59. package/dist/components/ActionMenu.d.ts +13 -0
  60. package/dist/components/ActionMenu.js +30 -0
  61. package/dist/components/Avatar.js +6 -6
  62. package/dist/components/Breadcrumbs.js +1 -1
  63. package/dist/components/Button.js +10 -10
  64. package/dist/components/Callout.js +2 -2
  65. package/dist/components/Card.js +3 -3
  66. package/dist/components/Combobox.d.ts +66 -0
  67. package/dist/components/Combobox.js +393 -0
  68. package/dist/components/ConfirmModal.js +11 -11
  69. package/dist/components/ContextMenu.d.ts +23 -0
  70. package/dist/components/ContextMenu.js +89 -0
  71. package/dist/components/CopyToClipboard.js +2 -2
  72. package/dist/components/CreateModal.d.ts +17 -36
  73. package/dist/components/CreateModal.js +97 -259
  74. package/dist/components/DescriptionList.js +8 -8
  75. package/dist/components/Filter.js +2 -2
  76. package/dist/components/FilterPill.js +2 -2
  77. package/dist/components/HoverCard.d.ts +14 -0
  78. package/dist/components/HoverCard.js +33 -0
  79. package/dist/components/IconButton.d.ts +5 -5
  80. package/dist/components/IconButton.js +18 -22
  81. package/dist/components/InfoTip.d.ts +15 -0
  82. package/dist/components/InfoTip.js +60 -0
  83. package/dist/components/Input.js +5 -5
  84. package/dist/components/LetterBadge.js +2 -2
  85. package/dist/components/Loader.js +3 -3
  86. package/dist/components/Markdown.js +1 -1
  87. package/dist/components/MarkdownImpl.js +2 -2
  88. package/dist/components/Menu.d.ts +33 -0
  89. package/dist/components/Menu.js +86 -0
  90. package/dist/components/MenuEntries.d.ts +56 -0
  91. package/dist/components/MenuEntries.js +123 -0
  92. package/dist/components/Modal.d.ts +29 -0
  93. package/dist/components/Modal.js +47 -0
  94. package/dist/components/Overview.js +11 -10
  95. package/dist/components/PageHeader.d.ts +10 -16
  96. package/dist/components/PageHeader.js +69 -95
  97. package/dist/components/Pagination.js +5 -5
  98. package/dist/components/Provider.d.ts +5 -11
  99. package/dist/components/Provider.js +11 -14
  100. package/dist/components/Radio.d.ts +8 -0
  101. package/dist/components/Radio.js +16 -0
  102. package/dist/components/SectionHeader.js +2 -2
  103. package/dist/components/SegmentedControl.d.ts +6 -5
  104. package/dist/components/SegmentedControl.js +34 -30
  105. package/dist/components/Select.d.ts +27 -0
  106. package/dist/components/Select.js +78 -0
  107. package/dist/components/SettingModeOption.d.ts +5 -8
  108. package/dist/components/SettingModeOption.js +10 -12
  109. package/dist/components/SettingRow.js +4 -4
  110. package/dist/components/SettingsCard.js +4 -4
  111. package/dist/components/SettingsGroup.js +2 -2
  112. package/dist/components/Sort.js +1 -1
  113. package/dist/components/StatusBadge.js +7 -7
  114. package/dist/components/StatusIcons.js +4 -4
  115. package/dist/components/Switch.d.ts +22 -0
  116. package/dist/components/Switch.js +28 -0
  117. package/dist/components/Table.js +11 -11
  118. package/dist/components/Tooltip.d.ts +24 -20
  119. package/dist/components/Tooltip.js +58 -76
  120. package/dist/components/floating.d.ts +14 -0
  121. package/dist/components/floating.js +21 -0
  122. package/dist/components/search.d.ts +2 -0
  123. package/dist/components/search.js +14 -0
  124. package/dist/editor/Editor.js +1 -1
  125. package/dist/editor/EditorField.js +16 -21
  126. package/dist/editor/FormCodePanel.js +19 -19
  127. package/dist/editor/Monaco.js +3 -3
  128. package/dist/file-explorer/FileExplorer.js +77 -81
  129. package/dist/file-explorer/FileExplorerContext.js +2 -2
  130. package/dist/file-explorer/FilePreview/CodePreviewEditor.js +1 -1
  131. package/dist/file-explorer/FilePreview/Inline.js +1 -1
  132. package/dist/file-explorer/FilePreview/StreamedBadge.js +5 -6
  133. package/dist/file-explorer/FilePreview/Viewer.js +8 -8
  134. package/dist/file-explorer/FilePreview/index.d.ts +1 -1
  135. package/dist/file-explorer/FilePreview/index.js +49 -83
  136. package/dist/file-explorer/FileRow.d.ts +4 -3
  137. package/dist/file-explorer/FileRow.js +32 -38
  138. package/dist/file-explorer/FileRowsWindow.d.ts +3 -2
  139. package/dist/file-explorer/FileRowsWindow.js +4 -4
  140. package/dist/file-explorer/FileTable.d.ts +3 -2
  141. package/dist/file-explorer/FileTable.js +3 -3
  142. package/dist/file-explorer/LoadMoreRow.js +1 -1
  143. package/dist/file-explorer/TreeView.js +11 -16
  144. package/dist/file-explorer/helpers.js +11 -12
  145. package/dist/file-explorer/toasts.js +11 -11
  146. package/dist/form/FieldGroup.d.ts +11 -0
  147. package/dist/form/FieldGroup.js +36 -0
  148. package/dist/form/FieldWrapper.js +4 -4
  149. package/dist/form/Fields/BooleanField.js +23 -33
  150. package/dist/form/Fields/CheckboxGroupField.d.ts +1 -1
  151. package/dist/form/Fields/CheckboxGroupField.js +9 -13
  152. package/dist/form/Fields/ColorField.d.ts +1 -2
  153. package/dist/form/Fields/ColorField.js +6 -11
  154. package/dist/form/Fields/DropdownField.d.ts +3 -13
  155. package/dist/form/Fields/DropdownField.js +40 -27
  156. package/dist/form/Fields/DurationField.d.ts +1 -2
  157. package/dist/form/Fields/DurationField.js +25 -32
  158. package/dist/form/Fields/LabelField.js +2 -2
  159. package/dist/form/Fields/MultiDropdownField.d.ts +6 -12
  160. package/dist/form/Fields/MultiDropdownField.js +31 -22
  161. package/dist/form/Fields/NumberField.d.ts +1 -1
  162. package/dist/form/Fields/NumberField.js +65 -35
  163. package/dist/form/Fields/ObjectField.d.ts +1 -1
  164. package/dist/form/Fields/ObjectField.js +12 -43
  165. package/dist/form/Fields/RadioField.d.ts +1 -1
  166. package/dist/form/Fields/RadioField.js +30 -41
  167. package/dist/form/Fields/RangeField.d.ts +1 -2
  168. package/dist/form/Fields/RangeField.js +23 -16
  169. package/dist/form/Fields/StringField.d.ts +1 -2
  170. package/dist/form/Fields/StringField.js +58 -26
  171. package/dist/form/Fields/TextAreaField.js +12 -10
  172. package/dist/form/Form.d.ts +30 -48
  173. package/dist/form/Form.js +306 -412
  174. package/dist/form/FormLayout.js +9 -9
  175. package/dist/form/Wizard/WizardContainer.d.ts +1 -4
  176. package/dist/form/Wizard/WizardContainer.js +40 -56
  177. package/dist/form/Wizard/WizardNavigation.js +1 -1
  178. package/dist/form/Wizard/WizardStepContent.d.ts +1 -5
  179. package/dist/form/Wizard/WizardStepContent.js +11 -16
  180. package/dist/form/Wizard/WizardStepIndicator.js +6 -6
  181. package/dist/form/Wizard/types.d.ts +0 -14
  182. package/dist/form/fieldRegistry.d.ts +1 -1
  183. package/dist/form/fieldRegistry.js +6 -6
  184. package/dist/form/formEditing.js +1 -1
  185. package/dist/form/index.d.ts +5 -4
  186. package/dist/form/index.js +6 -7
  187. package/dist/form/types/fieldComponentTypes.d.ts +8 -10
  188. package/dist/form/useChoiceField.d.ts +20 -0
  189. package/dist/form/useChoiceField.js +49 -0
  190. package/dist/form/useFieldValue.d.ts +7 -0
  191. package/dist/form/useFieldValue.js +20 -0
  192. package/dist/form/useParsedOpts.d.ts +3 -1
  193. package/dist/form/useParsedOpts.js +12 -17
  194. package/dist/form/utils/dependentOptions.d.ts +8 -4
  195. package/dist/form/utils/dependentOptions.js +25 -17
  196. package/dist/form/utils/fieldItems.d.ts +10 -0
  197. package/dist/form/utils/fieldItems.js +11 -0
  198. package/dist/form/utils/fieldPath.d.ts +10 -0
  199. package/dist/form/utils/fieldPath.js +20 -0
  200. package/dist/form/utils/shareEqual.d.ts +6 -0
  201. package/dist/form/utils/shareEqual.js +38 -0
  202. package/dist/graph/AnnotationBanner.js +8 -8
  203. package/dist/graph/Collapse.d.ts +1 -0
  204. package/dist/graph/Collapse.js +6 -27
  205. package/dist/graph/Connectors.js +5 -5
  206. package/dist/graph/DependencyGraph.js +20 -19
  207. package/dist/graph/GraphEditor.js +30 -41
  208. package/dist/graph/GraphEditorDialogs.js +17 -17
  209. package/dist/graph/GraphNode.js +1 -1
  210. package/dist/graph/InputDialog.js +19 -22
  211. package/dist/graph/InputsEditor.js +58 -66
  212. package/dist/graph/JobSummary.js +42 -39
  213. package/dist/graph/MatrixGroup.js +1 -1
  214. package/dist/graph/ProblemsButton.js +18 -19
  215. package/dist/graph/Reveal.js +1 -1
  216. package/dist/graph/ShortcutsButton.js +15 -18
  217. package/dist/graph/SuggestionInput.d.ts +5 -10
  218. package/dist/graph/SuggestionInput.js +14 -18
  219. package/dist/graph/ToolbarPopover.d.ts +11 -6
  220. package/dist/graph/ToolbarPopover.js +35 -67
  221. package/dist/graph/TreeView.js +24 -37
  222. package/dist/graph/WorkflowSettingsDialog.js +4 -4
  223. package/dist/graph/editorChrome.js +13 -12
  224. package/dist/graph/editorFields.js +29 -29
  225. package/dist/graph/editorPrimitives.d.ts +1 -1
  226. package/dist/graph/editorPrimitives.js +10 -7
  227. package/dist/graph/editorRows.js +103 -97
  228. package/dist/graph/fieldProblems.js +2 -2
  229. package/dist/graph/graphEditorState.d.ts +4 -3
  230. package/dist/graph/inputRefs.js +9 -9
  231. package/dist/graph/settingsViews.js +6 -7
  232. package/dist/graph/stepWith.js +6 -6
  233. package/dist/index.d.ts +14 -15
  234. package/dist/index.js +15 -14
  235. package/dist/list/ActionToolbar.d.ts +6 -14
  236. package/dist/list/ActionToolbar.js +48 -96
  237. package/dist/list/ListPage.d.ts +6 -12
  238. package/dist/list/ListPage.js +46 -29
  239. package/dist/list/ListPager.js +4 -4
  240. package/dist/list/ListTable.js +5 -5
  241. package/dist/list/ListViewControls.d.ts +5 -4
  242. package/dist/list/ListViewControls.js +177 -267
  243. package/dist/list/UserHoverCard.d.ts +3 -17
  244. package/dist/list/UserHoverCard.js +21 -45
  245. package/dist/list/index.d.ts +3 -4
  246. package/dist/list/index.js +3 -4
  247. package/dist/list/listSearch.js +12 -11
  248. package/dist/list/rowMenu.d.ts +63 -0
  249. package/dist/list/rowMenu.js +134 -0
  250. package/dist/logviewer/LogViewer.js +26 -26
  251. package/dist/styles.css +1 -1
  252. package/package.json +7 -13
  253. package/dist/ai/ui/Dropdown.d.ts +0 -31
  254. package/dist/ai/ui/Dropdown.js +0 -110
  255. package/dist/components/AddMenu.d.ts +0 -18
  256. package/dist/components/AddMenu.js +0 -46
  257. package/dist/components/BareModal.d.ts +0 -17
  258. package/dist/components/BareModal.js +0 -77
  259. package/dist/components/CollapsiblePanel.d.ts +0 -27
  260. package/dist/components/CollapsiblePanel.js +0 -77
  261. package/dist/components/Dropdown.d.ts +0 -28
  262. package/dist/components/Dropdown.js +0 -355
  263. package/dist/components/Listbox.d.ts +0 -21
  264. package/dist/components/Listbox.js +0 -119
  265. package/dist/components/MultiSelect.d.ts +0 -22
  266. package/dist/components/MultiSelect.js +0 -168
  267. package/dist/components/SwitchToggle.d.ts +0 -15
  268. package/dist/components/SwitchToggle.js +0 -57
  269. package/dist/components/SwitchToggleSmall.d.ts +0 -6
  270. package/dist/components/SwitchToggleSmall.js +0 -14
  271. package/dist/components/Toggle.d.ts +0 -6
  272. package/dist/components/Toggle.js +0 -20
  273. package/dist/components/dropdownUtils.d.ts +0 -37
  274. package/dist/components/dropdownUtils.js +0 -99
  275. package/dist/form/SpecialTypes/DropdownWrapper.d.ts +0 -25
  276. package/dist/form/SpecialTypes/DropdownWrapper.js +0 -28
  277. package/dist/form/SpecialTypes/FormikCustomDropdown.d.ts +0 -51
  278. package/dist/form/SpecialTypes/FormikCustomDropdown.js +0 -119
  279. package/dist/form/SpecialTypes/FormikCustomInput.d.ts +0 -19
  280. package/dist/form/SpecialTypes/FormikCustomInput.js +0 -121
  281. package/dist/form/SpecialTypes/FormikMultiSelectDropdown.d.ts +0 -13
  282. package/dist/form/SpecialTypes/FormikMultiSelectDropdown.js +0 -31
  283. package/dist/form/SpecialTypes/FormikNumericInput.d.ts +0 -9
  284. package/dist/form/SpecialTypes/FormikNumericInput.js +0 -60
  285. package/dist/form/SpecialTypes/index.d.ts +0 -3
  286. package/dist/list/HoverCard.d.ts +0 -24
  287. package/dist/list/HoverCard.js +0 -73
  288. package/dist/list/RowContextMenu.d.ts +0 -127
  289. package/dist/list/RowContextMenu.js +0 -515
@@ -1,8 +1,8 @@
1
1
  import { useStrings } from "./Provider.js";
2
2
  import Loader from "./Loader.js";
3
- import cx from "classnames";
4
- import React from "react";
3
+ import { clsx } from "clsx";
5
4
  import { jsx, jsxs } from "react/jsx-runtime";
5
+ import React from "react";
6
6
  //#region src/components/Table.tsx
7
7
  function Item({ wrap = false, children, className, colspan = 1, ...tdProps }) {
8
8
  const yPadding = className?.includes("py-") ? "" : "py-4";
@@ -10,7 +10,7 @@ function Item({ wrap = false, children, className, colspan = 1, ...tdProps }) {
10
10
  return /* @__PURE__ */ jsx("td", {
11
11
  ...tdProps,
12
12
  colSpan: colspan,
13
- className: cx(yPadding, xPadding, wrap ? "" : "whitespace-nowrap", className),
13
+ className: clsx(yPadding, xPadding, wrap ? "" : "whitespace-nowrap", className),
14
14
  children
15
15
  });
16
16
  }
@@ -18,7 +18,7 @@ function CompactItem({ wrap = false, children, className, colspan = 1, ...tdProp
18
18
  return /* @__PURE__ */ jsx("td", {
19
19
  ...tdProps,
20
20
  colSpan: colspan,
21
- className: cx("px-2 text-sm font-medium", !wrap && "whitespace-nowrap", className),
21
+ className: clsx("px-2 text-sm font-medium", !wrap && "whitespace-nowrap", className),
22
22
  children
23
23
  });
24
24
  }
@@ -31,7 +31,7 @@ function Header({ children, className, style, colspan = 1, onClick, sort, caps =
31
31
  colSpan: colspan,
32
32
  style,
33
33
  "aria-sort": sort === "unsorted" ? "none" : sort,
34
- className: cx(className, yPadding, xPadding, textAlign, "text-xs font-medium", caps ? "uppercase tracking-wider" : ""),
34
+ className: clsx(className, yPadding, xPadding, textAlign, "text-xs font-medium", caps ? "uppercase tracking-wider" : ""),
35
35
  children: onClick ? /* @__PURE__ */ jsx("button", {
36
36
  type: "button",
37
37
  onClick,
@@ -52,7 +52,7 @@ function Table({ borderless = false, panel = true, className = "", wrapperClassN
52
52
  const hasOverflow = wrapperClassName.split(" ").some((cls) => cls.startsWith("overflow-"));
53
53
  return /* @__PURE__ */ jsx("div", {
54
54
  "aria-busy": isLoading,
55
- className: cx("flex flex-col w-full", !hasOverflow && "overflow-hidden", wrapperClassName),
55
+ className: clsx("flex flex-col w-full", !hasOverflow && "overflow-hidden", wrapperClassName),
56
56
  children: isLoading ? /* @__PURE__ */ jsxs("div", {
57
57
  role: "status",
58
58
  "aria-label": loading,
@@ -62,9 +62,9 @@ function Table({ borderless = false, panel = true, className = "", wrapperClassN
62
62
  children: loading
63
63
  })]
64
64
  }) : /* @__PURE__ */ jsx("div", {
65
- className: cx("align-middle inline-block min-w-full overflow-x-auto", panel && "theme-panel", !borderless && "border theme-border", rounded && "rounded-2xl", roundedBottom && "rounded-b-2xl", roundedTop && "rounded-t-2xl"),
65
+ className: clsx("align-middle inline-block min-w-full overflow-x-auto", panel && "theme-panel", !borderless && "border theme-border", rounded && "rounded-2xl", roundedBottom && "rounded-b-2xl", roundedTop && "rounded-t-2xl"),
66
66
  children: /* @__PURE__ */ jsxs("table", {
67
- className: cx(className, "min-w-full divide-y theme-border"),
67
+ className: clsx(className, "min-w-full divide-y theme-border"),
68
68
  ...tableProps,
69
69
  children: [/* @__PURE__ */ jsx("thead", {
70
70
  className: theadClassName,
@@ -82,11 +82,11 @@ function CompactTable({ wrapperClassName = "", className = "", tbodyClassName =
82
82
  const Headers = getHeaders(ChildrenArr);
83
83
  const hasOverflow = wrapperClassName.split(" ").some((cls) => cls.startsWith("overflow-"));
84
84
  return /* @__PURE__ */ jsx("div", {
85
- className: cx("flex flex-col w-full", !hasOverflow && "overflow-hidden", wrapperClassName),
85
+ className: clsx("flex flex-col w-full", !hasOverflow && "overflow-hidden", wrapperClassName),
86
86
  children: /* @__PURE__ */ jsx("div", {
87
- className: cx("theme-panel inline-block min-w-full align-middle overflow-x-auto", rounded && "rounded-2xl", roundedBottom && "rounded-b-2xl pb-1", roundedTop && "rounded-t-2xl"),
87
+ className: clsx("theme-panel inline-block min-w-full align-middle overflow-x-auto", rounded && "rounded-2xl", roundedBottom && "rounded-b-2xl pb-1", roundedTop && "rounded-t-2xl"),
88
88
  children: /* @__PURE__ */ jsxs("table", {
89
- className: cx("min-w-full divide-y theme-border", className),
89
+ className: clsx("min-w-full divide-y theme-border", className),
90
90
  children: [/* @__PURE__ */ jsx("thead", {
91
91
  className: "theme-muted-panel",
92
92
  children: /* @__PURE__ */ jsx("tr", {
@@ -1,21 +1,25 @@
1
- import { type PlacesType } from 'react-tooltip';
2
- export declare const TOOLTIP_ID = "global-tooltip";
3
- /** Anchor props that reveal `content` only while the text is ellipsized; `measure` picks the clipped descendant when it isn't the anchor. */
4
- export declare function truncationTooltipProps(content: string, measure?: (anchor: HTMLElement) => HTMLElement | null): {
5
- role: 'none';
6
- 'data-tooltip-id': string;
7
- onMouseEnter: (event: React.MouseEvent<HTMLElement>) => void;
8
- };
9
- /** Tooltip text can come from untrusted sources (workflow YAML), so all markup is literal text — only `[text](url)` links and newlines are parsed. */
10
- export declare function formatTooltipContent(content: React.ReactNode): number | bigint | true | import("react").JSX.Element[] | Iterable<import("react").ReactNode> | Promise<string | number | bigint | boolean | Iterable<import("react").ReactNode> | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | import("react").ReactPortal | null | undefined> | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | null;
11
- /** Singleton rendered at layout root; anchors opt in via data-tooltip-id={TOOLTIP_ID}, data-tooltip-content, and data-tooltip-shortcut. */
12
- export declare function GlobalTooltip(): import("react").JSX.Element;
13
- interface ITooltipInfo {
14
- text: string;
15
- className?: string | undefined;
16
- place?: PlacesType;
17
- children?: React.ReactNode;
18
- tabIndex?: number;
1
+ import { Tooltip as BaseTooltip } from '@base-ui/react/tooltip';
2
+ import { type ReactElement, type ReactNode } from 'react';
3
+ export type TooltipSide = 'top' | 'bottom' | 'left' | 'right';
4
+ /** One popup serves every Tooltip below it, so each anchor costs only a trigger.
5
+ * UIProvider mounts it; nothing else needs to. */
6
+ export declare function TooltipProvider({ children }: {
7
+ children: ReactNode;
8
+ }): import("react").JSX.Element;
9
+ /** Props beyond the tooltip's own go to the anchor, so a Tooltip can be another
10
+ * trigger's render target, such as a popover button with a hint. */
11
+ export interface TooltipProps extends Omit<BaseTooltip.Trigger.Props, 'content' | 'children' | 'render' | 'handle' | 'payload'> {
12
+ /** Nothing to show disables the tooltip. Newlines in a string break lines. */
13
+ content: ReactNode;
14
+ /** The anchor. It receives the trigger's props and ref, so it must pass them to its element. */
15
+ children: ReactElement;
16
+ side?: TooltipSide;
17
+ /** Keys shown beside the content, joined with +, such as ⌘+F. */
18
+ shortcut?: string | undefined;
19
+ disabled?: boolean | undefined;
20
+ /** Opens only while the anchor's text is clipped, such as a truncated label. */
21
+ overflowOnly?: boolean;
19
22
  }
20
- export declare function TooltipInfo({ text, className, children, place, tabIndex, }: ITooltipInfo): import("react").JSX.Element;
21
- export {};
23
+ /** A visual hint for sighted pointer and keyboard users. The anchor still needs
24
+ * its own accessible name; use InfoTip for content everyone must reach. */
25
+ export declare function Tooltip({ content, children, side, shortcut, disabled, overflowOnly, ...anchorProps }: TooltipProps): import("react").JSX.Element;
@@ -1,98 +1,80 @@
1
- import { HiQuestionMarkCircle } from "../icons/hi/HiQuestionMarkCircle.js";
1
+ import { portalContainer, positionerClassName, tipArrowClassName, tipClassName } from "./floating.js";
2
2
  import { keyedByContent } from "./keys.js";
3
- import { Fragment } from "react";
4
3
  import { jsx, jsxs } from "react/jsx-runtime";
5
- import { Tooltip } from "react-tooltip";
4
+ import { Fragment as Fragment$1, createContext, use, useState } from "react";
5
+ import { Tooltip } from "@base-ui/react/tooltip";
6
6
  //#region src/components/Tooltip.tsx
7
- var TOOLTIP_ID = "global-tooltip";
8
- /** Anchor props that reveal `content` only while the text is ellipsized; `measure` picks the clipped descendant when it isn't the anchor. */
9
- function truncationTooltipProps(content, measure) {
10
- return {
11
- role: "none",
12
- "data-tooltip-id": TOOLTIP_ID,
13
- onMouseEnter: (event) => {
14
- const anchor = event.currentTarget;
15
- const measured = measure ? measure(anchor) : anchor;
16
- if (measured && measured.scrollWidth > measured.clientWidth) anchor.setAttribute("data-tooltip-content", content);
17
- else anchor.removeAttribute("data-tooltip-content");
18
- }
19
- };
20
- }
21
- var linkRegex = /\[([^\]]+)\]\((https?:\/\/[^\s)]+)\)/g;
22
- function formatLine(line) {
23
- const nodes = [];
24
- let last = 0;
25
- for (const match of line.matchAll(linkRegex)) {
26
- if (match.index > last) nodes.push(line.slice(last, match.index));
27
- nodes.push(/* @__PURE__ */ jsx("a", {
28
- href: match[2],
29
- target: "_blank",
30
- rel: "noopener noreferrer",
31
- className: "underline",
32
- children: match[1]
33
- }, match.index));
34
- last = match.index + match[0].length;
35
- }
36
- if (last < line.length) nodes.push(line.slice(last));
37
- return nodes;
38
- }
39
- /** Tooltip text can come from untrusted sources (workflow YAML), so all markup is literal text — only `[text](url)` links and newlines are parsed. */
40
- function formatTooltipContent(content) {
41
- if (typeof content !== "string") return content || null;
42
- if (!content) return null;
43
- return keyedByContent(content.split(/<br\s*\/?>|\n/i), (l) => l).map(({ key, item: line }, idx) => /* @__PURE__ */ jsxs(Fragment, { children: [idx > 0 && /* @__PURE__ */ jsx("br", {}), formatLine(line)] }, key));
44
- }
7
+ var TooltipHandleContext = createContext(null);
45
8
  function KbdShortcut({ keys }) {
46
9
  const parts = keys.split("+").map((part) => part.trim()).filter(Boolean);
47
10
  return /* @__PURE__ */ jsx("span", {
48
11
  className: "inline-flex items-center gap-1 align-middle",
49
- children: keyedByContent(parts, (p) => p).map(({ key, item: part }, idx) => /* @__PURE__ */ jsxs(Fragment, { children: [idx > 0 && /* @__PURE__ */ jsx("span", {
12
+ children: keyedByContent(parts, (p) => p).map(({ key, item: part }, idx) => /* @__PURE__ */ jsxs(Fragment$1, { children: [idx > 0 && /* @__PURE__ */ jsx("span", {
50
13
  className: "opacity-60 text-[11px]",
51
14
  children: "+"
52
15
  }), /* @__PURE__ */ jsx("kbd", {
53
- className: "inline-flex items-center justify-center min-w-[18px] h-[18px] px-1 rounded border border-white/30 bg-white/10 font-sans text-[11px] font-semibold leading-none",
16
+ className: "inline-flex items-center justify-center min-w-[18px] h-[18px] px-1 rounded border border-current/30 bg-current/10 font-sans text-[11px] font-semibold leading-none",
54
17
  children: part
55
18
  })] }, key))
56
19
  });
57
20
  }
58
- var globalCloseEvents = { escape: true };
59
- /** Singleton rendered at layout root; anchors opt in via data-tooltip-id={TOOLTIP_ID}, data-tooltip-content, and data-tooltip-shortcut. */
60
- function GlobalTooltip() {
61
- return /* @__PURE__ */ jsx(Tooltip, {
62
- id: TOOLTIP_ID,
63
- className: "max-w-lg break-words config-tips normal-case text-left z-[10000]",
64
- place: "top",
65
- globalCloseEvents,
66
- render: ({ content, activeAnchor }) => {
67
- const body = formatTooltipContent(content);
68
- const shortcut = activeAnchor?.getAttribute("data-tooltip-shortcut");
69
- if (!shortcut) return body;
70
- return /* @__PURE__ */ jsxs("span", {
71
- className: "inline-flex items-center gap-2",
72
- children: [body, /* @__PURE__ */ jsx(KbdShortcut, { keys: shortcut })]
73
- });
74
- }
21
+ function TooltipPopup({ content, shortcut, side }) {
22
+ return /* @__PURE__ */ jsx(Tooltip.Portal, {
23
+ container: portalContainer(),
24
+ children: /* @__PURE__ */ jsx(Tooltip.Positioner, {
25
+ side,
26
+ sideOffset: 8,
27
+ className: positionerClassName,
28
+ children: /* @__PURE__ */ jsxs(Tooltip.Popup, {
29
+ className: `max-w-xs ${tipClassName}`,
30
+ children: [/* @__PURE__ */ jsx(Tooltip.Arrow, { className: tipArrowClassName }), shortcut ? /* @__PURE__ */ jsxs("span", {
31
+ className: "inline-flex items-center gap-2",
32
+ children: [content, /* @__PURE__ */ jsx(KbdShortcut, { keys: shortcut })]
33
+ }) : content]
34
+ })
35
+ })
75
36
  });
76
37
  }
77
- function TooltipInfo({ text, className = "", children, place = "top", tabIndex }) {
78
- const anchorProps = {
79
- "data-tooltip-id": TOOLTIP_ID,
80
- "data-tooltip-content": text,
81
- "data-tooltip-place": place,
82
- className
38
+ /** One popup serves every Tooltip below it, so each anchor costs only a trigger.
39
+ * UIProvider mounts it; nothing else needs to. */
40
+ function TooltipProvider({ children }) {
41
+ const [handle] = useState(() => Tooltip.createHandle());
42
+ return /* @__PURE__ */ jsxs(Tooltip.Provider, { children: [/* @__PURE__ */ jsx(TooltipHandleContext, {
43
+ value: handle,
44
+ children
45
+ }), /* @__PURE__ */ jsx(Tooltip.Root, {
46
+ handle,
47
+ onOpenChange: skipUnclipped,
48
+ children: ({ payload }) => payload && /* @__PURE__ */ jsx(TooltipPopup, { ...payload })
49
+ })] });
50
+ }
51
+ /** An overflowOnly anchor opens only while its text is cut off. */
52
+ function skipUnclipped(open, details) {
53
+ const anchor = details.trigger;
54
+ if (open && anchor instanceof HTMLElement && anchor.hasAttribute("data-overflow-only") && anchor.scrollWidth <= anchor.clientWidth) details.cancel();
55
+ }
56
+ /** A visual hint for sighted pointer and keyboard users. The anchor still needs
57
+ * its own accessible name; use InfoTip for content everyone must reach. */
58
+ function Tooltip$1({ content, children, side = "top", shortcut, disabled = false, overflowOnly = false, ...anchorProps }) {
59
+ const handle = use(TooltipHandleContext);
60
+ const payload = {
61
+ content,
62
+ shortcut,
63
+ side
83
64
  };
84
- if (children || !text) return /* @__PURE__ */ jsx("div", {
65
+ const trigger = /* @__PURE__ */ jsx(Tooltip.Trigger, {
85
66
  ...anchorProps,
86
- tabIndex,
87
- children: children || /* @__PURE__ */ jsx(HiQuestionMarkCircle, { className: "tooltip" })
67
+ handle: handle ?? void 0,
68
+ payload,
69
+ disabled: disabled || !content,
70
+ "data-overflow-only": overflowOnly || void 0,
71
+ render: children
88
72
  });
89
- return /* @__PURE__ */ jsx("div", {
90
- ...anchorProps,
91
- role: "img",
92
- "aria-label": text,
93
- tabIndex: tabIndex ?? 0,
94
- children: /* @__PURE__ */ jsx(HiQuestionMarkCircle, { className: "tooltip" })
73
+ if (handle) return trigger;
74
+ return /* @__PURE__ */ jsxs(Tooltip.Root, {
75
+ onOpenChange: skipUnclipped,
76
+ children: [trigger, /* @__PURE__ */ jsx(TooltipPopup, { ...payload })]
95
77
  });
96
78
  }
97
79
  //#endregion
98
- export { GlobalTooltip, TOOLTIP_ID, TooltipInfo, formatTooltipContent, truncationTooltipProps };
80
+ export { Tooltip$1 as Tooltip, TooltipProvider };
@@ -0,0 +1,14 @@
1
+ /** Popups portal into the host's .ds-root when it has one, so they inherit the
2
+ * design system's CSS variables; undefined lets the portal use document.body. */
3
+ export declare function portalContainer(): HTMLElement | undefined;
4
+ /** Above dialogs and sticky chrome; hidden while its anchor is scrolled out of view. */
5
+ export declare const positionerClassName = "z-[10000] outline-none data-anchor-hidden:invisible";
6
+ /** A panel of choices: a menu, a select's list, a combobox's list. */
7
+ export declare const panelClassName = "rounded-lg border border-(--theme-border) bg-(--theme-app-bg) text-sm text-(--theme-app) shadow-(--theme-shadow-lg) outline-none origin-(--transform-origin) transition-[transform,opacity] duration-100 data-starting-style:scale-95 data-starting-style:opacity-0 data-ending-style:scale-95 data-ending-style:opacity-0";
8
+ /** A row in a panel. */
9
+ export declare const panelItemClassName = "flex w-full cursor-pointer select-none items-center gap-2 px-3 py-1.5 text-left outline-none data-highlighted:bg-(--theme-hover) data-highlighted:text-(--theme-hover-text) data-disabled:cursor-not-allowed data-disabled:opacity-50";
10
+ /** A tooltip's or infotip's small inverted surface. */
11
+ export declare const tipClassName = "rounded-md bg-(--theme-app) px-2 py-1 text-xs text-(--theme-app-bg) shadow-(--theme-shadow) whitespace-pre-line break-words data-instant:transition-none origin-(--transform-origin) transition-[transform,opacity] duration-100 data-starting-style:scale-95 data-starting-style:opacity-0 data-ending-style:scale-95 data-ending-style:opacity-0";
12
+ export declare const tipArrowClassName = "size-2 rotate-45 bg-(--theme-app) data-[side=top]:-bottom-1 data-[side=bottom]:-top-1 data-[side=left]:-right-1 data-[side=right]:-left-1";
13
+ /** A hover card's surface; the card sets its own width and padding. */
14
+ export declare const cardClassName = "overflow-hidden rounded-xl border border-(--theme-border) bg-(--theme-panel-bg) text-(--theme-app) shadow-(--theme-shadow-lg) outline-none origin-(--transform-origin) transition-[transform,opacity] duration-100 data-starting-style:scale-95 data-starting-style:opacity-0 data-ending-style:scale-95 data-ending-style:opacity-0";
@@ -0,0 +1,21 @@
1
+ //#region src/components/floating.ts
2
+ /** Popups portal into the host's .ds-root when it has one, so they inherit the
3
+ * design system's CSS variables; undefined lets the portal use document.body. */
4
+ function portalContainer() {
5
+ if (typeof document === "undefined") return;
6
+ return document.querySelector(".ds-root") ?? void 0;
7
+ }
8
+ /** Above dialogs and sticky chrome; hidden while its anchor is scrolled out of view. */
9
+ var positionerClassName = "z-[10000] outline-none data-anchor-hidden:invisible";
10
+ var enterExit = "origin-(--transform-origin) transition-[transform,opacity] duration-100 data-starting-style:scale-95 data-starting-style:opacity-0 data-ending-style:scale-95 data-ending-style:opacity-0";
11
+ /** A panel of choices: a menu, a select's list, a combobox's list. */
12
+ var panelClassName = `rounded-lg border border-(--theme-border) bg-(--theme-app-bg) text-sm text-(--theme-app) shadow-(--theme-shadow-lg) outline-none ${enterExit}`;
13
+ /** A row in a panel. */
14
+ var panelItemClassName = "flex w-full cursor-pointer select-none items-center gap-2 px-3 py-1.5 text-left outline-none data-highlighted:bg-(--theme-hover) data-highlighted:text-(--theme-hover-text) data-disabled:cursor-not-allowed data-disabled:opacity-50";
15
+ /** A tooltip's or infotip's small inverted surface. */
16
+ var tipClassName = `rounded-md bg-(--theme-app) px-2 py-1 text-xs text-(--theme-app-bg) shadow-(--theme-shadow) whitespace-pre-line break-words data-instant:transition-none ${enterExit}`;
17
+ var tipArrowClassName = "size-2 rotate-45 bg-(--theme-app) data-[side=top]:-bottom-1 data-[side=bottom]:-top-1 data-[side=left]:-right-1 data-[side=right]:-left-1";
18
+ /** A hover card's surface; the card sets its own width and padding. */
19
+ var cardClassName = `overflow-hidden rounded-xl border border-(--theme-border) bg-(--theme-panel-bg) text-(--theme-app) shadow-(--theme-shadow-lg) outline-none ${enterExit}`;
20
+ //#endregion
21
+ export { cardClassName, panelClassName, panelItemClassName, portalContainer, positionerClassName, tipArrowClassName, tipClassName };
@@ -0,0 +1,2 @@
1
+ /** Whether a query matches any of the texts, the way every picker in the package searches. */
2
+ export declare function useQueryMatch(): (query: string, ...texts: (string | undefined)[]) => boolean;
@@ -0,0 +1,14 @@
1
+ import { useCallback } from "react";
2
+ import { Combobox } from "@base-ui/react/combobox";
3
+ //#region src/components/search.ts
4
+ var fold = (text) => text.replaceAll("-", "");
5
+ /** Whether a query matches any of the texts, the way every picker in the package searches. */
6
+ function useQueryMatch() {
7
+ const { contains } = Combobox.useFilter();
8
+ return useCallback((query, ...texts) => {
9
+ const q = fold(query);
10
+ return texts.some((text) => text !== void 0 && contains(fold(text), q));
11
+ }, [contains]);
12
+ }
13
+ //#endregion
14
+ export { useQueryMatch };
@@ -1,6 +1,6 @@
1
1
  import Loader from "../components/Loader.js";
2
- import { Suspense, lazy } from "react";
3
2
  import { jsx } from "react/jsx-runtime";
3
+ import { Suspense, lazy } from "react";
4
4
  //#region src/editor/Editor.tsx
5
5
  var MonacoEditor = lazy(() => import("./Monaco.js"));
6
6
  function Editor(props) {
@@ -1,32 +1,27 @@
1
1
  import { FieldWrapper } from "../form/FieldWrapper.js";
2
+ import { useFieldValue } from "../form/useFieldValue.js";
2
3
  import Editor from "./Editor.js";
3
- import cx from "classnames";
4
- import { useMemo, useRef } from "react";
4
+ import { clsx } from "clsx";
5
5
  import { jsx } from "react/jsx-runtime";
6
- import { useField, useFormikContext } from "formik";
6
+ import { useMemo, useRef } from "react";
7
+ import { useFormContext, useWatch } from "react-hook-form";
7
8
  //#region src/editor/EditorField.tsx
8
- function hasResetKeys(obj) {
9
- return typeof obj === "object" && obj !== null && "editorKeyPostfix" in obj && typeof obj.editorKeyPostfix === "string";
10
- }
11
9
  function EditorField(props) {
12
- const { field, label, labelPosition, disabled, onChange, tooltipComponent, spaceCompact, setFormDirty } = props;
10
+ const { field, label, labelPosition, disabled, onChange, tooltipComponent, spaceCompact } = props;
13
11
  const fieldName = field.name ?? "";
14
- const [fieldState] = useField(fieldName);
15
- const { setFieldValue, setFieldTouched, values } = useFormikContext();
16
- const debounceRef = useRef(null);
12
+ const [value, change] = useFieldValue(fieldName);
17
13
  const touchedRef = useRef(false);
18
14
  const handleChange = (val) => {
19
15
  touchedRef.current = true;
20
- if (debounceRef.current) clearTimeout(debounceRef.current);
21
- debounceRef.current = setTimeout(() => {
22
- onChange?.(val);
23
- setFieldTouched(fieldName, true);
24
- setFieldValue(fieldName, val);
25
- setFormDirty(true);
26
- }, 500);
16
+ onChange?.(val);
17
+ change(val);
27
18
  };
28
- let editorKeyPostfix = "";
29
- if (hasResetKeys(values)) editorKeyPostfix = values.editorKeyPostfix;
19
+ const { control } = useFormContext();
20
+ const resetKey = useWatch({
21
+ control,
22
+ name: "editorKeyPostfix"
23
+ });
24
+ const editorKeyPostfix = typeof resetKey === "string" ? resetKey : "";
30
25
  const postfixKey = useMemo(() => {
31
26
  const randomKey = Math.random().toString(36).substring(7);
32
27
  return editorKeyPostfix || randomKey;
@@ -41,8 +36,8 @@ function EditorField(props) {
41
36
  ariaLabel: label,
42
37
  height: "200px",
43
38
  path: fieldName,
44
- ...touchedRef.current ? {} : { value: fieldState.value },
45
- className: cx("bg-(--theme-input-bg) w-11 border focus:border rounded text-[10px] leading-4 pl-[6px]", disabled && "opacity-75"),
39
+ ...touchedRef.current || value === void 0 ? {} : { value },
40
+ className: clsx("bg-(--theme-input-bg) w-11 border focus:border rounded text-[10px] leading-4 pl-[6px]", disabled && "opacity-75"),
46
41
  readOnly: disabled,
47
42
  onChange: handleChange,
48
43
  language: field.options?.language || "shell"
@@ -1,14 +1,15 @@
1
- import { useNotify, useStrings, useWorkflowEngine } from "../components/Provider.js";
2
1
  import { FaCheck } from "../icons/fa/FaCheck.js";
3
2
  import { FiCopy } from "../icons/fi/FiCopy.js";
4
3
  import { LuEye } from "../icons/lu/LuEye.js";
5
4
  import { LuEyeOff } from "../icons/lu/LuEyeOff.js";
6
- import SwitchToggleSmall from "../components/SwitchToggleSmall.js";
5
+ import { Tooltip } from "../components/Tooltip.js";
6
+ import { useNotify, useStrings, useWorkflowEngine } from "../components/Provider.js";
7
+ import { Switch } from "../components/Switch.js";
7
8
  import { flattenGroups, impureSetValueFromPath } from "../form/lib.js";
8
9
  import Editor from "./Editor.js";
9
- import cx from "classnames";
10
- import { useId, useRef, useState } from "react";
10
+ import { clsx } from "clsx";
11
11
  import { jsx, jsxs } from "react/jsx-runtime";
12
+ import { useRef, useState } from "react";
12
13
  //#region src/editor/FormCodePanel.tsx
13
14
  var isObject = (value) => typeof value === "object" && value !== null;
14
15
  var shouldIgnoreField = (engine, fieldSchema, inputs, arrayIndex) => {
@@ -73,7 +74,6 @@ function FormCodePanel({ formJSON, data, mutate, height = "600px", disabled = fa
73
74
  const engine = useWorkflowEngine();
74
75
  const notify = useNotify();
75
76
  const { common: t } = useStrings();
76
- const uid = useId();
77
77
  const [jsonHasErrors, setJsonHasErrors] = useState(false);
78
78
  const [showHidden, setShowHidden] = useState(false);
79
79
  const [copied, setCopied] = useState(false);
@@ -103,22 +103,22 @@ function FormCodePanel({ formJSON, data, mutate, height = "600px", disabled = fa
103
103
  style: { height },
104
104
  className: "flex w-full flex-col gap-2",
105
105
  children: [/* @__PURE__ */ jsxs("div", {
106
- className: cx("flex min-h-0 flex-1 flex-col overflow-hidden rounded-md border", jsonHasErrors ? "border-red-500" : "border-(--theme-border)"),
106
+ className: clsx("flex min-h-0 flex-1 flex-col overflow-hidden rounded-md border", jsonHasErrors ? "border-red-500" : "border-(--theme-border)"),
107
107
  children: [/* @__PURE__ */ jsxs("div", {
108
108
  className: "bg-(--theme-muted-panel-bg) text-(--theme-muted-panel-color) flex shrink-0 items-center gap-3 border-b border-(--theme-border) px-3 py-2",
109
- children: [hasHiddenFields && /* @__PURE__ */ jsxs("label", {
110
- htmlFor: `${uid}-show-hidden`,
111
- title: t.showHiddenFieldsHint,
112
- className: "flex cursor-pointer select-none items-center gap-2 text-sm text-(--theme-app)",
113
- children: [/* @__PURE__ */ jsx(SwitchToggleSmall, {
114
- id: `${uid}-show-hidden`,
115
- value: showHidden,
116
- "aria-label": t.showHiddenFields,
117
- onClick: () => setShowHidden((prev) => !prev)
118
- }), /* @__PURE__ */ jsxs("span", {
119
- className: "flex items-center gap-1.5",
120
- children: [showHidden ? /* @__PURE__ */ jsx(LuEye, {}) : /* @__PURE__ */ jsx(LuEyeOff, {}), t.showHiddenFields]
121
- })]
109
+ children: [hasHiddenFields && /* @__PURE__ */ jsx(Tooltip, {
110
+ content: t.showHiddenFieldsHint,
111
+ children: /* @__PURE__ */ jsxs("label", {
112
+ className: "flex cursor-pointer select-none items-center gap-2 text-sm text-(--theme-app)",
113
+ children: [/* @__PURE__ */ jsx(Switch, {
114
+ size: "sm",
115
+ checked: showHidden,
116
+ onCheckedChange: setShowHidden
117
+ }), /* @__PURE__ */ jsxs("span", {
118
+ className: "flex items-center gap-1.5",
119
+ children: [showHidden ? /* @__PURE__ */ jsx(LuEye, {}) : /* @__PURE__ */ jsx(LuEyeOff, {}), t.showHiddenFields]
120
+ })]
121
+ })
122
122
  }), /* @__PURE__ */ jsxs("button", {
123
123
  type: "button",
124
124
  onClick: handleCopy,
@@ -7,9 +7,9 @@ import { defineEditorThemes, getThemeName } from "./themes.js";
7
7
  import { setupMonacoWorkers } from "./workers.js";
8
8
  import { holdListeners, modelFor } from "./editorModel.js";
9
9
  import { ensureYamlLanguage } from "./yamlLanguage.js";
10
- import cx from "classnames";
11
- import { useEffect, useLayoutEffect, useRef } from "react";
10
+ import { clsx } from "clsx";
12
11
  import { jsx } from "react/jsx-runtime";
12
+ import { useEffect, useLayoutEffect, useRef } from "react";
13
13
  import * as monaco from "monaco-editor";
14
14
  //#region src/editor/Monaco.tsx
15
15
  setupMonacoWorkers();
@@ -116,7 +116,7 @@ function MonacoEditor({ className, disabled, onChange = noop, onValidate = noop,
116
116
  width,
117
117
  height
118
118
  },
119
- className: cx("relative border rounded", className),
119
+ className: clsx("relative border rounded", className),
120
120
  ref: (ref) => {
121
121
  if (ref && !monacoRef.current) {
122
122
  defineEditorThemes(monaco.editor);