@parallelworks/ui 0.18.0 → 0.19.1

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 (349) hide show
  1. package/README.md +86 -6
  2. package/dist/ai/adapter/memoryStore.d.ts +8 -0
  3. package/dist/ai/adapter/memoryStore.js +152 -0
  4. package/dist/ai/adapter/mock/index.d.ts +2 -0
  5. package/dist/ai/adapter/mock/index.js +3 -0
  6. package/dist/ai/adapter/mock/mockAdapter.d.ts +4 -0
  7. package/dist/ai/adapter/mock/mockAdapter.js +81 -0
  8. package/dist/ai/adapter/openai/createOpenAIStream.d.ts +9 -0
  9. package/dist/ai/adapter/openai/createOpenAIStream.js +33 -0
  10. package/dist/ai/adapter/openai/errors.d.ts +3 -0
  11. package/dist/ai/adapter/openai/errors.js +37 -0
  12. package/dist/ai/adapter/openai/index.d.ts +6 -0
  13. package/dist/ai/adapter/openai/index.js +6 -0
  14. package/dist/ai/adapter/openai/openaiAdapter.d.ts +9 -0
  15. package/dist/ai/adapter/openai/openaiAdapter.js +54 -0
  16. package/dist/ai/adapter/openai/responses.d.ts +4 -0
  17. package/dist/ai/adapter/openai/responses.js +108 -0
  18. package/dist/ai/adapter/openai/sse.d.ts +24 -0
  19. package/dist/ai/adapter/openai/sse.js +112 -0
  20. package/dist/ai/adapter/openai/wire.d.ts +40 -0
  21. package/dist/ai/adapter/types.d.ts +131 -0
  22. package/dist/ai/adapter/types.js +11 -0
  23. package/dist/ai/agent/classifier.d.ts +2 -0
  24. package/dist/ai/agent/classifier.js +12 -0
  25. package/dist/ai/agent/diff.d.ts +35 -0
  26. package/dist/ai/agent/diff.js +223 -0
  27. package/dist/ai/agent/diffHighlight.d.ts +6 -0
  28. package/dist/ai/agent/diffHighlight.js +101 -0
  29. package/dist/ai/agent/index.d.ts +6 -0
  30. package/dist/ai/agent/permissions.d.ts +11 -0
  31. package/dist/ai/agent/permissions.js +29 -0
  32. package/dist/ai/agent/toolfmt.d.ts +18 -0
  33. package/dist/ai/agent/toolfmt.js +383 -0
  34. package/dist/ai/agent/transcript.d.ts +38 -0
  35. package/dist/ai/agent/transcript.js +127 -0
  36. package/dist/ai/ai.css +325 -0
  37. package/dist/ai/components/AllocationSelector.d.ts +4 -0
  38. package/dist/ai/components/AllocationSelector.js +56 -0
  39. package/dist/ai/components/AttachmentManager.d.ts +1 -0
  40. package/dist/ai/components/AttachmentManager.js +144 -0
  41. package/dist/ai/components/AttachmentUpload.d.ts +24 -0
  42. package/dist/ai/components/AttachmentUpload.js +179 -0
  43. package/dist/ai/components/BlockedGroupBanner.d.ts +1 -0
  44. package/dist/ai/components/BlockedGroupBanner.js +29 -0
  45. package/dist/ai/components/BranchNavigator.d.ts +8 -0
  46. package/dist/ai/components/BranchNavigator.js +57 -0
  47. package/dist/ai/components/ChatEmptyState.d.ts +3 -0
  48. package/dist/ai/components/ChatEmptyState.js +171 -0
  49. package/dist/ai/components/ChatInput.d.ts +45 -0
  50. package/dist/ai/components/ChatInput.js +265 -0
  51. package/dist/ai/components/ChatLayout.d.ts +5 -0
  52. package/dist/ai/components/ChatLayout.js +15 -0
  53. package/dist/ai/components/ChatMessage.d.ts +24 -0
  54. package/dist/ai/components/ChatMessage.js +338 -0
  55. package/dist/ai/components/ChatMessageList.d.ts +35 -0
  56. package/dist/ai/components/ChatMessageList.js +301 -0
  57. package/dist/ai/components/ChatSidebar.d.ts +5 -0
  58. package/dist/ai/components/ChatSidebar.js +345 -0
  59. package/dist/ai/components/ChatThread.d.ts +3 -0
  60. package/dist/ai/components/ChatThread.js +198 -0
  61. package/dist/ai/components/ComposerChrome.d.ts +18 -0
  62. package/dist/ai/components/ComposerChrome.js +50 -0
  63. package/dist/ai/components/ComposerFrame.d.ts +16 -0
  64. package/dist/ai/components/ComposerFrame.js +33 -0
  65. package/dist/ai/components/DragOverlay.d.ts +5 -0
  66. package/dist/ai/components/DragOverlay.js +20 -0
  67. package/dist/ai/components/ModelSelector.d.ts +6 -0
  68. package/dist/ai/components/ModelSelector.js +343 -0
  69. package/dist/ai/components/ShareDialog.d.ts +11 -0
  70. package/dist/ai/components/ShareDialog.js +260 -0
  71. package/dist/ai/components/SlashMenu.d.ts +28 -0
  72. package/dist/ai/components/SlashMenu.js +91 -0
  73. package/dist/ai/components/agent/ActivityLine.d.ts +21 -0
  74. package/dist/ai/components/agent/ActivityLine.js +151 -0
  75. package/dist/ai/components/agent/AgentMessageParts.d.ts +54 -0
  76. package/dist/ai/components/agent/AgentMessageParts.js +721 -0
  77. package/dist/ai/components/agent/PermissionPicker.d.ts +11 -0
  78. package/dist/ai/components/agent/PermissionPicker.js +38 -0
  79. package/dist/ai/components/attachmentKeys.d.ts +4 -0
  80. package/dist/ai/components/attachmentKeys.js +10 -0
  81. package/dist/ai/core/ChatProvider.d.ts +66 -0
  82. package/dist/ai/core/ChatProvider.js +848 -0
  83. package/dist/ai/core/KeyboardShortcutsProvider.d.ts +5 -0
  84. package/dist/ai/core/KeyboardShortcutsProvider.js +9 -0
  85. package/dist/ai/core/chatReducer.d.ts +114 -0
  86. package/dist/ai/core/chatReducer.js +223 -0
  87. package/dist/ai/core/config.d.ts +47 -0
  88. package/dist/ai/core/config.js +45 -0
  89. package/dist/ai/core/events.d.ts +1 -0
  90. package/dist/ai/core/events.js +4 -0
  91. package/dist/ai/core/exportConversation.d.ts +4 -0
  92. package/dist/ai/core/exportConversation.js +42 -0
  93. package/dist/ai/core/greeting.d.ts +3 -0
  94. package/dist/ai/core/greeting.js +38 -0
  95. package/dist/ai/core/parts.d.ts +11 -0
  96. package/dist/ai/core/parts.js +84 -0
  97. package/dist/ai/core/useDragDrop.d.ts +14 -0
  98. package/dist/ai/core/useDragDrop.js +36 -0
  99. package/dist/ai/core/useKeyboardShortcuts.d.ts +12 -0
  100. package/dist/ai/core/useKeyboardShortcuts.js +77 -0
  101. package/dist/ai/core/useSSEStream.d.ts +34 -0
  102. package/dist/ai/core/useSSEStream.js +98 -0
  103. package/dist/ai/index.d.ts +40 -0
  104. package/dist/ai/index.js +44 -0
  105. package/dist/ai/strings.d.ts +167 -0
  106. package/dist/ai/strings.js +175 -0
  107. package/dist/ai/types.d.ts +236 -0
  108. package/dist/ai/ui/Avatar.d.ts +8 -0
  109. package/dist/ai/ui/Avatar.js +35 -0
  110. package/dist/ai/ui/Dropdown.d.ts +31 -0
  111. package/dist/ai/ui/Dropdown.js +110 -0
  112. package/dist/ai/ui/Markdown.d.ts +8 -0
  113. package/dist/ai/ui/Markdown.js +79 -0
  114. package/dist/ai/ui/Notice.d.ts +21 -0
  115. package/dist/ai/ui/Notice.js +77 -0
  116. package/dist/ai/ui/buttons.d.ts +1 -0
  117. package/dist/ai/ui/codeBreaks.d.ts +16 -0
  118. package/dist/ai/ui/codeBreaks.js +36 -0
  119. package/dist/ai/ui/prose.d.ts +1 -0
  120. package/dist/ai/ui/prose.js +13 -0
  121. package/dist/ai/ui/sidebar.d.ts +81 -0
  122. package/dist/ai/ui/sidebar.js +148 -0
  123. package/dist/ai/utils.d.ts +4 -0
  124. package/dist/ai/utils.js +23 -0
  125. package/dist/assets/{editor.worker-CuBRIwi-.js → editor.worker-BmHUIVG4.js} +194 -163
  126. package/dist/assets/{json.worker-8ytS02vz.js → json.worker-D8bJ92nw.js} +384 -338
  127. package/dist/assets/{yaml.worker-DJC-VUcv.js → yaml.worker-C4gyGAko.js} +15657 -13823
  128. package/dist/components/AddMenu.js +46 -0
  129. package/dist/components/Avatar.d.ts +1 -1
  130. package/dist/components/Avatar.js +46 -0
  131. package/dist/{chunks/BareModal-BtRiQezg.js → components/BareModal.js} +1 -1
  132. package/dist/components/Breadcrumbs.d.ts +1 -1
  133. package/dist/components/Breadcrumbs.js +83 -0
  134. package/dist/components/Button.js +83 -0
  135. package/dist/components/Callout.js +23 -0
  136. package/dist/components/Card.js +31 -0
  137. package/dist/components/CollapsiblePanel.js +77 -0
  138. package/dist/components/ConfirmModal.js +74 -0
  139. package/dist/components/CopyToClipboard.js +81 -0
  140. package/dist/{chunks/CreateModal-BY6DLmur.js → components/CreateModal.js} +10 -189
  141. package/dist/components/DescriptionList.js +42 -0
  142. package/dist/components/Dropdown.d.ts +1 -1
  143. package/dist/components/Dropdown.js +349 -0
  144. package/dist/components/EmptyState.d.ts +1 -1
  145. package/dist/components/EmptyState.js +27 -0
  146. package/dist/components/Filter.js +32 -0
  147. package/dist/components/FilterPill.js +13 -0
  148. package/dist/components/IconButton.js +34 -0
  149. package/dist/components/Indicator.d.ts +2 -2
  150. package/dist/{chunks/Indicator-hBSIxOPK.js → components/Indicator.js} +1 -1
  151. package/dist/components/Input.d.ts +1 -1
  152. package/dist/components/Input.js +88 -0
  153. package/dist/components/LetterBadge.d.ts +1 -1
  154. package/dist/components/LetterBadge.js +13 -0
  155. package/dist/components/Listbox.js +123 -0
  156. package/dist/{chunks/Loader-BXoXTZGc.js → components/Loader.js} +1 -1
  157. package/dist/components/Markdown.js +15 -0
  158. package/dist/components/MarkdownImpl.d.ts +1 -1
  159. package/dist/components/MultiSelect.js +171 -0
  160. package/dist/components/Overview.js +39 -0
  161. package/dist/components/PageHeader.js +194 -0
  162. package/dist/components/Pagination.js +35 -0
  163. package/dist/components/Provider.d.ts +16 -65
  164. package/dist/{chunks/Provider-Ghua9PkN.js → components/Provider.js} +54 -20
  165. package/dist/{chunks/RequiredMark-DfLdYbYZ.js → components/RequiredMark.js} +1 -1
  166. package/dist/components/SectionHeader.js +11 -0
  167. package/dist/components/SettingModeOption.js +30 -0
  168. package/dist/components/SettingRow.d.ts +1 -1
  169. package/dist/components/SettingRow.js +35 -0
  170. package/dist/components/SettingsCard.js +31 -0
  171. package/dist/components/SettingsGroup.d.ts +1 -1
  172. package/dist/components/SettingsGroup.js +17 -0
  173. package/dist/components/Sort.js +42 -0
  174. package/dist/components/StatusBadge.js +63 -0
  175. package/dist/components/SwitchToggle.js +59 -0
  176. package/dist/{chunks/SwitchToggleSmall-FcsaYSTs.js → components/SwitchToggleSmall.js} +1 -1
  177. package/dist/{chunks/Table-4OHjdKdO.js → components/Table.js} +7 -5
  178. package/dist/components/Toggle.js +20 -0
  179. package/dist/{chunks/Tooltip-Crxo_eU_.js → components/Tooltip.js} +6 -4
  180. package/dist/{chunks/StatusBadge-C1Blx_cW.js → components/dropdownUtils.js} +2 -63
  181. package/dist/components/focus.d.ts +2 -0
  182. package/dist/components/focus.js +7 -0
  183. package/dist/components/ghostButton.js +7 -0
  184. package/dist/components/inputClasses.js +4 -0
  185. package/dist/components/keys.d.ts +12 -0
  186. package/dist/components/keys.js +27 -0
  187. package/dist/components/relativeTime.js +32 -0
  188. package/dist/{chunks/useCssIsDark-DHr05dG2.js → components/useCssIsDark.js} +1 -1
  189. package/dist/duration.d.ts +3 -0
  190. package/dist/duration.js +17 -0
  191. package/dist/editor/Editor.js +13 -0
  192. package/dist/editor/EditorField.js +53 -0
  193. package/dist/editor/FormCodePanel.js +173 -0
  194. package/dist/editor/Monaco.d.ts +1 -20
  195. package/dist/editor/Monaco.js +112 -0
  196. package/dist/editor/index.d.ts +2 -1
  197. package/dist/editor/index.js +7 -2
  198. package/dist/editor/themes.js +91 -0
  199. package/dist/editor/workers.js +29 -0
  200. package/dist/editor/yaml.d.ts +5 -0
  201. package/dist/editor/yaml.js +15 -0
  202. package/dist/engine.d.ts +98 -0
  203. package/dist/file-explorer/FileExplorer.d.ts +11 -2
  204. package/dist/file-explorer/FileExplorer.js +1402 -0
  205. package/dist/file-explorer/FileExplorerContext.d.ts +1 -1
  206. package/dist/file-explorer/FileExplorerContext.js +370 -0
  207. package/dist/file-explorer/FilePreview/CodePreviewEditor.d.ts +1 -1
  208. package/dist/{chunks/CodePreviewEditor-4lx3kE-w.js → file-explorer/FilePreview/CodePreviewEditor.js} +3 -2
  209. package/dist/file-explorer/FilePreview/Inline.js +45 -0
  210. package/dist/file-explorer/FilePreview/StreamedBadge.js +16 -0
  211. package/dist/file-explorer/FilePreview/Viewer.js +526 -0
  212. package/dist/file-explorer/FilePreview/index.js +266 -0
  213. package/dist/file-explorer/FilePreview/parse.js +63 -0
  214. package/dist/file-explorer/FilePreview/previewCache.js +98 -0
  215. package/dist/file-explorer/FilePreview/previewType.d.ts +1 -1
  216. package/dist/file-explorer/FilePreview/previewType.js +151 -0
  217. package/dist/file-explorer/FilePreview/readCappedBytes.js +196 -0
  218. package/dist/file-explorer/FilePreview/useObjectBlobUrl.js +95 -0
  219. package/dist/file-explorer/FilePreview/useObjectText.js +109 -0
  220. package/dist/file-explorer/FilePreview/usePresignedUrl.js +73 -0
  221. package/dist/file-explorer/FileRow.d.ts +1 -1
  222. package/dist/file-explorer/FileRow.js +165 -0
  223. package/dist/file-explorer/FileRowsWindow.js +92 -0
  224. package/dist/file-explorer/FileTable.js +172 -0
  225. package/dist/file-explorer/FileTableHeaders.js +49 -0
  226. package/dist/file-explorer/LoadMoreRow.js +46 -0
  227. package/dist/file-explorer/TreeView.js +376 -0
  228. package/dist/file-explorer/helpers.d.ts +4 -4
  229. package/dist/file-explorer/helpers.js +537 -0
  230. package/dist/file-explorer/index.d.ts +3 -3
  231. package/dist/file-explorer/index.js +7 -5705
  232. package/dist/file-explorer/lib/batch.js +39 -0
  233. package/dist/file-explorer/lib/errors.js +9 -0
  234. package/dist/file-explorer/lib/paging.js +124 -0
  235. package/dist/file-explorer/lib/types.d.ts +6 -1
  236. package/dist/file-explorer/lib/utils.d.ts +1 -3
  237. package/dist/file-explorer/lib/utils.js +322 -0
  238. package/dist/file-explorer/toasts.js +400 -0
  239. package/dist/file-explorer/treeRows.js +73 -0
  240. package/dist/file-explorer/useNearEnd.d.ts +1 -1
  241. package/dist/file-explorer/useNearEnd.js +27 -0
  242. package/dist/form/FieldWrapper.d.ts +2 -2
  243. package/dist/form/FieldWrapper.js +54 -0
  244. package/dist/form/Fields/BooleanField.js +51 -0
  245. package/dist/form/Fields/CheckboxGroupField.js +72 -0
  246. package/dist/form/Fields/ColorField.js +33 -0
  247. package/dist/form/Fields/DropdownField.js +49 -0
  248. package/dist/form/Fields/DurationField.js +130 -0
  249. package/dist/form/Fields/LabelField.js +19 -0
  250. package/dist/form/Fields/MultiDropdownField.js +40 -0
  251. package/dist/form/Fields/NumberField.js +51 -0
  252. package/dist/form/Fields/ObjectField.js +54 -0
  253. package/dist/form/Fields/RadioField.js +49 -0
  254. package/dist/form/Fields/RangeField.js +58 -0
  255. package/dist/form/Fields/ResourceOptionIcon.d.ts +1 -1
  256. package/dist/form/Fields/ResourceOptionIcon.js +21 -0
  257. package/dist/form/Fields/StepField.js +6 -0
  258. package/dist/form/Fields/StringField.js +37 -0
  259. package/dist/form/Fields/TextAreaField.js +31 -0
  260. package/dist/form/Fields/durationValidity.js +11 -0
  261. package/dist/form/Form.d.ts +4 -21
  262. package/dist/form/Form.js +643 -0
  263. package/dist/form/SpecialTypes/DropdownWrapper.js +30 -0
  264. package/dist/form/SpecialTypes/FormikCustomDropdown.js +122 -0
  265. package/dist/form/SpecialTypes/FormikCustomInput.js +111 -0
  266. package/dist/form/SpecialTypes/FormikMultiSelectDropdown.js +31 -0
  267. package/dist/form/SpecialTypes/FormikNumericInput.js +60 -0
  268. package/dist/form/Wizard/WizardContainer.js +138 -0
  269. package/dist/form/Wizard/WizardNavigation.js +92 -0
  270. package/dist/form/Wizard/WizardStepContent.js +35 -0
  271. package/dist/form/Wizard/WizardStepIndicator.js +108 -0
  272. package/dist/form/Wizard/useWizardState.js +118 -0
  273. package/dist/form/Wizard/utils.js +34 -0
  274. package/dist/form/fieldContext.js +26 -0
  275. package/dist/form/fieldRegistry.js +50 -0
  276. package/dist/form/index.d.ts +11 -12
  277. package/dist/form/index.js +18 -2445
  278. package/dist/form/lib.d.ts +6 -1
  279. package/dist/{chunks/FieldWrapper-Bef01EWO.js → form/lib.js} +5 -104
  280. package/dist/form/types/fieldComponentTypes.d.ts +3 -2
  281. package/dist/form/types/fieldTypes.d.ts +6 -20
  282. package/dist/form/useParsedOpts.d.ts +1 -1
  283. package/dist/form/useParsedOpts.js +62 -0
  284. package/dist/form/usePrevious.js +11 -0
  285. package/dist/form/utils/checkShowIfObject.js +14 -0
  286. package/dist/form/utils/{slurmDuration.d.ts → duration.d.ts} +2 -2
  287. package/dist/form/utils/duration.js +69 -0
  288. package/dist/form/utils/getParentValue.js +23 -0
  289. package/dist/form/utils/getPlaceholder.js +9 -0
  290. package/dist/form/utils/getValueUsingPath.js +23 -0
  291. package/dist/form/utils/secondaryField.js +22 -0
  292. package/dist/graph/AnnotationBanner.js +141 -0
  293. package/dist/graph/Collapse.js +41 -0
  294. package/dist/{workflow/index.js → graph/DependencyGraph.js} +76 -1163
  295. package/dist/graph/JobSummary.js +104 -0
  296. package/dist/{workflow → graph}/MatrixGroup.d.ts +2 -2
  297. package/dist/graph/MatrixGroup.js +107 -0
  298. package/dist/graph/Reveal.js +57 -0
  299. package/dist/graph/TreeView.js +711 -0
  300. package/dist/{workflow → graph}/index.d.ts +1 -1
  301. package/dist/graph/index.js +2 -0
  302. package/dist/{workflow → graph}/types.d.ts +3 -3
  303. package/dist/graph/types.js +6 -0
  304. package/dist/icons.d.ts +20 -21
  305. package/dist/index.d.ts +38 -40
  306. package/dist/index.js +47 -599
  307. package/dist/list/ActionToolbar.js +184 -0
  308. package/dist/list/HoverCard.js +73 -0
  309. package/dist/list/ListPage.js +145 -0
  310. package/dist/list/ListPager.js +59 -0
  311. package/dist/list/ListTable.d.ts +1 -1
  312. package/dist/list/ListTable.js +163 -0
  313. package/dist/list/ListViewControls.d.ts +2 -2
  314. package/dist/list/ListViewControls.js +372 -0
  315. package/dist/list/RowContextMenu.js +350 -0
  316. package/dist/list/UserHoverCard.js +117 -0
  317. package/dist/list/index.d.ts +9 -9
  318. package/dist/list/index.js +11 -2
  319. package/dist/list/listSearch.js +137 -0
  320. package/dist/list/listView.js +210 -0
  321. package/dist/list/textEntry.js +10 -0
  322. package/dist/logviewer/LogViewer.d.ts +1 -1
  323. package/dist/logviewer/LogViewer.js +750 -0
  324. package/dist/logviewer/index.d.ts +1 -0
  325. package/dist/logviewer/index.js +3 -742
  326. package/dist/logviewer/segments.d.ts +9 -0
  327. package/dist/logviewer/segments.js +80 -0
  328. package/dist/styles/fonts.css +4 -4
  329. package/dist/styles/theme.css +6 -4
  330. package/dist/styles.css +1 -1
  331. package/dist/theme/index.js +2 -2
  332. package/package.json +38 -14
  333. package/LICENSE +0 -202
  334. package/dist/chunks/Monaco-C1POOdVv.js +0 -1046
  335. package/dist/chunks/PageHeader-l49p1nM9.js +0 -690
  336. package/dist/chunks/SwitchToggle-CHPP8uZQ.js +0 -755
  337. package/dist/chunks/editor-9_uVtUyy.js +0 -347
  338. package/dist/chunks/list-qrojZZNv.js +0 -1411
  339. package/dist/editor/usesGitlab.d.ts +0 -97
  340. package/dist/form/Fields/BucketReadOnlyField.d.ts +0 -7
  341. package/dist/form/types/workflow-schema.d.ts +0 -1145
  342. package/dist/form/utils/pwResolver.d.ts +0 -18
  343. package/dist/{chunks/MarkdownImpl-Bq4QhrtA.js → components/MarkdownImpl.js} +1 -1
  344. /package/dist/{workflow → graph}/AnnotationBanner.d.ts +0 -0
  345. /package/dist/{workflow → graph}/Collapse.d.ts +0 -0
  346. /package/dist/{workflow → graph}/DependencyGraph.d.ts +0 -0
  347. /package/dist/{workflow → graph}/JobSummary.d.ts +0 -0
  348. /package/dist/{workflow → graph}/Reveal.d.ts +0 -0
  349. /package/dist/{workflow → graph}/TreeView.d.ts +0 -0
package/dist/index.js CHANGED
@@ -1,600 +1,48 @@
1
+ import { UIProvider, useNavigation, useNotify, useOptionalWorkflowEngine, usePersistedState, useProvisionCorsRules, useRunFile, useSlots, useStrings, useWorkflowEngine, useWorkflowEngineLoader } from "./components/Provider.js";
2
+ import { GlobalTooltip, TOOLTIP_ID, TooltipInfo, formatTooltipContent, truncationTooltipProps } from "./components/Tooltip.js";
3
+ import { AddMenu } from "./components/AddMenu.js";
4
+ import { Avatar, avatarInitials } from "./components/Avatar.js";
5
+ import { BareModal, modalPanelClasses } from "./components/BareModal.js";
6
+ import { BreadcrumbProvider, useBreadcrumb, useClearBreadcrumbs, useHideBreadcrumbs, useSetBreadcrumbs, useSetDefaultBreadcrumbs } from "./components/Breadcrumbs.js";
7
+ import { Button, MethodButton } from "./components/Button.js";
8
+ import Callout from "./components/Callout.js";
9
+ import { Card, CardHeader } from "./components/Card.js";
10
+ import { ControlledCollapsiblePanel, MaybeCollapsible, UncontrolledCollapsiblePanel } from "./components/CollapsiblePanel.js";
11
+ import { dangerButtonClasses, ghostButtonClasses, primaryButtonClasses } from "./components/ghostButton.js";
12
+ import { ConfirmModal } from "./components/ConfirmModal.js";
13
+ import CopyToClipboard, { CopyCodeBlock } from "./components/CopyToClipboard.js";
14
+ import { DropdownCaret, filterOption, flattenOptions, isCategory, isOption, toggleSetMember } from "./components/dropdownUtils.js";
15
+ import { CREATE_MODAL_SELECT_FILTER_THRESHOLD, CreateModal, CreateModalAutocompleteField, CreateModalField, CreateModalSelect, CreateModalSwitch, CreateModalTextarea } from "./components/CreateModal.js";
16
+ import DescriptionList, { DescriptionListItem } from "./components/DescriptionList.js";
17
+ import Dropdown from "./components/Dropdown.js";
18
+ import EmptyState from "./components/EmptyState.js";
19
+ import Filter from "./components/Filter.js";
20
+ import { FilterPill } from "./components/FilterPill.js";
21
+ import { IconButton } from "./components/IconButton.js";
22
+ import { Indicator } from "./components/Indicator.js";
23
+ import { RequiredMark } from "./components/RequiredMark.js";
24
+ import { Input, Textarea } from "./components/Input.js";
25
+ import { inputClasses } from "./components/inputClasses.js";
26
+ import { LetterBadge } from "./components/LetterBadge.js";
27
+ import CustomListbox from "./components/Listbox.js";
28
+ import Loader from "./components/Loader.js";
29
+ import Markdown from "./components/Markdown.js";
30
+ import MultiSelectDropdown from "./components/MultiSelect.js";
31
+ import { Overview } from "./components/Overview.js";
32
+ import { BreadcrumbsActionButton, BreadcrumbsRightAction, BreadcrumbsTitleAction, HeaderActionMenu, HeaderAddButton, HeaderEditButton, HeaderRowMenu, PageHeader, headerActionButtonClasses } from "./components/PageHeader.js";
33
+ import { Pagination } from "./components/Pagination.js";
34
+ import { useRelativeTime } from "./components/relativeTime.js";
35
+ import SectionHeader from "./components/SectionHeader.js";
36
+ import { SettingModeOption } from "./components/SettingModeOption.js";
37
+ import { SettingRow, SettingSection } from "./components/SettingRow.js";
38
+ import SettingsCard from "./components/SettingsCard.js";
39
+ import SettingsGroup from "./components/SettingsGroup.js";
40
+ import Sort from "./components/Sort.js";
41
+ import { StatusBadge, StatusDot, statusTextClass } from "./components/StatusBadge.js";
42
+ import SwitchToggle from "./components/SwitchToggle.js";
43
+ import SwitchToggleSmall from "./components/SwitchToggleSmall.js";
44
+ import { CompactTable, Table } from "./components/Table.js";
45
+ import { Toggle } from "./components/Toggle.js";
46
+ import { useCssIsDark } from "./components/useCssIsDark.js";
1
47
  import { DEFAULT_PRESET, THEME_PRESETS, THEME_TOKENS, applyTheme, contrastRatio, deriveTheme, isDarkColor } from "./theme/index.js";
2
- import { a as usePersistedState, c as useRunFile, d as useWorkflowJsonResolver, i as useNotify, l as useSlots, n as useLink, o as useProvisionCorsRules, r as useNavigation, s as useRepoSuggestions, t as UIProvider, u as useStrings } from "./chunks/Provider-Ghua9PkN.js";
3
- import { C as useSetDefaultBreadcrumbs, E as avatarInitials, S as useSetBreadcrumbs, T as Avatar, a as HeaderAddButton, b as useClearBreadcrumbs, c as PageHeader, i as HeaderActionMenu, l as headerActionButtonClasses, n as BreadcrumbsRightAction, o as HeaderEditButton, r as BreadcrumbsTitleAction, s as HeaderRowMenu, t as BreadcrumbsActionButton, v as BreadcrumbProvider, w as AddMenu, x as useHideBreadcrumbs, y as useBreadcrumb } from "./chunks/PageHeader-l49p1nM9.js";
4
- import { AlertIcon, AngleRightIcon, EyeIcon, EyeOffIcon, FilterIcon, LoaderIcon, SortDownIcon, SortUnsortedIcon, SortUpIcon } from "./icons.js";
5
- import { a as CreateModalSelect, c as ConfirmModal, d as primaryButtonClasses, f as Markdown, h as Callout, i as CreateModalField, l as dangerButtonClasses, m as CopyToClipboard, n as CreateModal, o as CreateModalSwitch, p as CopyCodeBlock, r as CreateModalAutocompleteField, s as CreateModalTextarea, t as CREATE_MODAL_SELECT_FILTER_THRESHOLD, u as ghostButtonClasses } from "./chunks/CreateModal-BY6DLmur.js";
6
- import { a as truncationTooltipProps, i as formatTooltipContent, n as TOOLTIP_ID, r as TooltipInfo, t as GlobalTooltip } from "./chunks/Tooltip-Crxo_eU_.js";
7
- import { a as filterOption, c as isCategory, i as DropdownCaret, l as isOption, n as StatusDot, r as statusTextClass, s as flattenOptions, t as StatusBadge, u as toggleSetMember } from "./chunks/StatusBadge-C1Blx_cW.js";
8
- import { a as UncontrolledCollapsiblePanel, c as Dropdown, i as MaybeCollapsible, n as SectionHeader, o as MultiSelectDropdown, r as ControlledCollapsiblePanel, s as CustomListbox, t as SwitchToggle } from "./chunks/SwitchToggle-CHPP8uZQ.js";
9
- import { t as Loader } from "./chunks/Loader-BXoXTZGc.js";
10
- import { n as modalPanelClasses, t as BareModal } from "./chunks/BareModal-BtRiQezg.js";
11
- import { t as useCssIsDark } from "./chunks/useCssIsDark-DHr05dG2.js";
12
- import { t as Indicator } from "./chunks/Indicator-hBSIxOPK.js";
13
- import { t as SwitchToggleSmall } from "./chunks/SwitchToggleSmall-FcsaYSTs.js";
14
- import { n as Table, t as CompactTable } from "./chunks/Table-4OHjdKdO.js";
15
- import { t as RequiredMark } from "./chunks/RequiredMark-DfLdYbYZ.js";
16
- import cx from "classnames";
17
- import React, { forwardRef, useEffect, useId, useState } from "react";
18
- import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
19
- import Skeleton from "react-loading-skeleton";
20
- import { DateTime } from "luxon";
21
- //#region src/components/DescriptionList.tsx
22
- function DescriptionListItem({ label, children, tooltip, className, ...props }) {
23
- return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs("dt", {
24
- className: cx("text-[13px] leading-6 col-span-1 font-normal flex gap-1", className),
25
- children: [/* @__PURE__ */ jsx("span", {
26
- className: "min-w-0 truncate",
27
- children: label
28
- }), tooltip && /* @__PURE__ */ jsx(TooltipInfo, {
29
- className: "pr-2",
30
- text: tooltip
31
- })]
32
- }), /* @__PURE__ */ jsx("dd", {
33
- ...props,
34
- className: "flex text-[13px] leading-6 col-span-4 font-light items-center overflow-auto",
35
- children
36
- })] });
37
- }
38
- function DescriptionList({ children, title, separators = true, subtitle, className, wrapperClassName, vertical = false }) {
39
- return /* @__PURE__ */ jsxs("div", {
40
- className: cx("w-full", wrapperClassName),
41
- children: [
42
- title && /* @__PURE__ */ jsx("h2", {
43
- className: "text-sm font-semibold w-full mb-1",
44
- children: title
45
- }),
46
- subtitle && /* @__PURE__ */ jsx("div", {
47
- className: "max-w-2xl text-sm/6 w-full",
48
- children: subtitle
49
- }),
50
- /* @__PURE__ */ jsx("dl", {
51
- className: cx("grid", separators && "*:not-last-of-type:border-b-1", vertical ? "grid-cols-1" : "grid-cols-5 gap-x-4 gap-y-0.5 *:pb-0.5", className),
52
- children: Array.isArray(children) ? children.map((child, index) => /* @__PURE__ */ jsx(React.Fragment, { children: child }, index)) : children
53
- })
54
- ]
55
- });
56
- }
57
- //#endregion
58
- //#region src/components/EmptyState.tsx
59
- function EmptyState({ title, description, action, icon: Icon }) {
60
- return /* @__PURE__ */ jsxs("div", {
61
- className: "border-solid rounded-2xl border border-(--theme-border) theme-panel flex flex-col items-center justify-center py-12 px-6",
62
- children: [
63
- Icon && /* @__PURE__ */ jsx("div", {
64
- className: "w-10 h-10 rounded-full bg-(--theme-muted-panel-bg) flex items-center justify-center mb-3",
65
- children: /* @__PURE__ */ jsx(Icon, { className: "w-5 h-5 theme-muted-text" })
66
- }),
67
- /* @__PURE__ */ jsx("p", {
68
- className: "text-sm font-medium mb-1",
69
- children: title
70
- }),
71
- description && /* @__PURE__ */ jsx("p", {
72
- className: "text-xs theme-muted-text text-center max-w-xs",
73
- children: description
74
- }),
75
- action && /* @__PURE__ */ jsx("div", {
76
- className: "mt-4",
77
- children: action
78
- })
79
- ]
80
- });
81
- }
82
- //#endregion
83
- //#region src/components/Overview.tsx
84
- function Overview({ Icon, name, type, children, right, className, loading, iconSize = 75 }) {
85
- return /* @__PURE__ */ jsxs("div", {
86
- className: cx("flex items-center w-full", className),
87
- children: [
88
- loading ? /* @__PURE__ */ jsx(Skeleton, {
89
- width: iconSize,
90
- height: iconSize,
91
- circle: true
92
- }) : Icon,
93
- /* @__PURE__ */ jsx("div", {
94
- className: "flex flex-col min-w-0 flex-1",
95
- children: loading ? /* @__PURE__ */ jsx(Skeleton, {
96
- count: 2,
97
- height: 12
98
- }) : /* @__PURE__ */ jsxs(Fragment$1, { children: [
99
- /* @__PURE__ */ jsx("div", {
100
- className: "font-semibold text-xl tracking-tight",
101
- children: name
102
- }),
103
- type && /* @__PURE__ */ jsx("p", { children: type }),
104
- /* @__PURE__ */ jsx("div", {
105
- className: "flex flex-row gap-x-2",
106
- children
107
- })
108
- ] })
109
- }),
110
- right && /* @__PURE__ */ jsx("div", {
111
- className: "shrink-0 self-center",
112
- children: right
113
- })
114
- ]
115
- });
116
- }
117
- //#endregion
118
- //#region src/components/relativeTime.ts
119
- var TICK_MS = 3e4;
120
- function compactRelativeMinutes(minutes, t) {
121
- if (!Number.isFinite(minutes) || minutes < 1) return t.now;
122
- if (minutes < 60) return t.minutes(minutes);
123
- const hours = Math.floor(minutes / 60);
124
- if (hours < 24) return t.hours(hours);
125
- const days = Math.floor(hours / 24);
126
- if (days < 365) return t.days(days);
127
- return t.years(Math.floor(days / 365));
128
- }
129
- /** A clock that re-reads itself, so "5m" ages while the page sits open, with
130
- * the abbreviated form a row has room for. */
131
- function useRelativeTime() {
132
- const t = useStrings().time;
133
- const [now, setNow] = useState(() => DateTime.now());
134
- useEffect(() => {
135
- const id = setInterval(() => setNow(DateTime.now()), TICK_MS);
136
- return () => clearInterval(id);
137
- }, []);
138
- const compactMinutes = (minutes) => compactRelativeMinutes(minutes, t);
139
- return {
140
- now,
141
- compactMinutes,
142
- compact: (iso) => iso ? compactMinutes(Math.floor(now.diff(DateTime.fromISO(iso)).as("minutes"))) : ""
143
- };
144
- }
145
- //#endregion
146
- //#region src/components/Button.tsx
147
- var Button = forwardRef(({ children, variant = "primary", size = "default", loading, icon, iconPosition = "right", fullWidth = true, className = "", disabled, ...props }, ref) => {
148
- const baseClasses = "inline-flex items-center justify-center gap-2 font-semibold rounded-lg transition-all duration-200 cursor-pointer border-none mt-2 disabled:opacity-50 disabled:cursor-not-allowed";
149
- const variantClasses = {
150
- primary: "bg-gradient-to-br from-[var(--gradient-start,var(--theme-element))] to-[var(--gradient-mid,var(--theme-link))] text-white shadow-[0_4px_14px_0_rgba(59,130,246,0.3)] hover:enabled:-translate-y-0.5 hover:enabled:shadow-[0_6px_20px_0_rgba(59,130,246,0.4)] active:enabled:translate-y-0",
151
- secondary: "bg-[var(--theme-muted-panel-bg)] text-[var(--theme-app)] border border-[var(--theme-border)] hover:enabled:bg-[var(--theme-border)]",
152
- outline: "bg-transparent text-[var(--theme-app)] border border-[var(--theme-border)] hover:enabled:bg-[var(--theme-muted-panel-bg)] hover:enabled:border-[var(--theme-muted-text-color)]",
153
- ghost: "bg-transparent text-[var(--theme-muted-text-color)] hover:enabled:text-[var(--theme-app)] hover:enabled:bg-[var(--theme-muted-panel-bg)]"
154
- };
155
- const sizeClasses = {
156
- sm: "py-2 px-4 text-[0.8125rem]",
157
- default: "py-3 px-5 text-sm",
158
- lg: "py-4 px-6 text-base"
159
- };
160
- const widthClass = fullWidth ? "w-full" : "w-auto";
161
- return /* @__PURE__ */ jsx("button", {
162
- ref,
163
- type: "button",
164
- disabled: disabled || loading,
165
- className: cx(baseClasses, variantClasses[variant], sizeClasses[size], widthClass, className),
166
- ...props,
167
- children: loading ? /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(LoaderIcon, { className: "size-[18px]" }), children] }) : /* @__PURE__ */ jsxs(Fragment$1, { children: [
168
- icon && iconPosition === "left" && /* @__PURE__ */ jsx("span", {
169
- className: "flex items-center",
170
- children: icon
171
- }),
172
- children,
173
- icon && iconPosition === "right" && /* @__PURE__ */ jsx("span", {
174
- className: "flex items-center",
175
- children: icon
176
- })
177
- ] })
178
- });
179
- });
180
- Button.displayName = "Button";
181
- function MethodButton({ icon, label, description, href, loading, disabled, className = "", ...props }) {
182
- const Link = useLink();
183
- const baseClasses = "flex items-center w-full p-4 bg-[var(--theme-muted-panel-bg)] border border-[var(--theme-border)] rounded-xl text-[var(--theme-app)] text-[0.9375rem] font-medium cursor-pointer transition-all duration-200 no-underline mb-3 last:mb-0 hover:bg-[var(--theme-border)] hover:border-[var(--theme-muted-text-color)] hover:-translate-y-0.5 active:translate-y-0";
184
- const disabledClasses = "disabled:opacity-60 disabled:cursor-not-allowed disabled:hover:bg-[var(--ds-muted)] disabled:hover:border-[var(--ds-border)] disabled:hover:translate-y-0";
185
- const content = /* @__PURE__ */ jsxs(Fragment$1, { children: [
186
- icon && /* @__PURE__ */ jsx("span", {
187
- className: "size-10 rounded-lg bg-gradient-to-br from-[var(--gradient-start,var(--theme-element))] to-[var(--gradient-mid,var(--theme-link))] flex items-center justify-center shrink-0 mr-4 [&_svg]:size-5 [&_svg]:text-white",
188
- children: icon
189
- }),
190
- /* @__PURE__ */ jsxs("span", {
191
- className: "flex-1 text-left",
192
- children: [/* @__PURE__ */ jsx("span", {
193
- className: "block font-semibold text-[var(--theme-app)]",
194
- children: label
195
- }), description && /* @__PURE__ */ jsx("span", {
196
- className: "block text-[0.8125rem] text-[var(--theme-muted-text-color)] font-normal mt-0.5",
197
- children: description
198
- })]
199
- }),
200
- loading ? /* @__PURE__ */ jsx(LoaderIcon, { className: "size-5 text-[var(--theme-muted-text-color)] shrink-0 ml-2" }) : /* @__PURE__ */ jsx(AngleRightIcon, { className: "size-5 text-[var(--theme-muted-text-color)] shrink-0 ml-2 transition-all duration-200 group-hover:translate-x-[3px] group-hover:text-[var(--theme-app)]" })
201
- ] });
202
- if (href) {
203
- if (href.startsWith("/api/") || href.startsWith("http")) return /* @__PURE__ */ jsx("a", {
204
- href,
205
- className: cx("group", baseClasses, className),
206
- children: content
207
- });
208
- return /* @__PURE__ */ jsx(Link, {
209
- to: href,
210
- className: cx("group", baseClasses, className),
211
- children: content
212
- });
213
- }
214
- return /* @__PURE__ */ jsx("button", {
215
- type: "button",
216
- className: cx("group", baseClasses, disabledClasses, className),
217
- disabled: disabled || loading,
218
- ...props,
219
- children: content
220
- });
221
- }
222
- //#endregion
223
- //#region src/components/Card.tsx
224
- function Card({ children, className = "", wide, compact, interactive, authShadow }) {
225
- return /* @__PURE__ */ jsx("div", {
226
- className: cx("w-full bg-[var(--theme-card-bg)] backdrop-blur-xl border border-[var(--theme-border)] rounded-2xl", authShadow ? "shadow-[var(--theme-auth-shadow)]" : "shadow-[var(--theme-shadow)]", wide && "max-w-[560px] p-8", compact && "max-w-[400px] p-6", !wide && !compact && "max-w-[520px] p-10", interactive && "ds-card-interactive cursor-pointer", className),
227
- children
228
- });
229
- }
230
- function CardHeader({ badge, title, description, className = "", align = "center" }) {
231
- return /* @__PURE__ */ jsxs("div", {
232
- className: cx(align === "center" ? "text-center" : "text-left", "mb-6", className),
233
- children: [
234
- badge && /* @__PURE__ */ jsx("div", {
235
- className: "inline-flex items-center gap-1.5 py-1.5 px-3 text-xs font-medium bg-[var(--theme-muted-panel-bg)] border border-[var(--theme-border)] rounded-full text-[var(--theme-muted-text-color)] mb-4 transition-colors duration-200",
236
- children: badge
237
- }),
238
- /* @__PURE__ */ jsx("h1", {
239
- className: "text-2xl font-bold tracking-tight text-[var(--theme-app)]",
240
- style: { letterSpacing: "-0.025em" },
241
- children: title
242
- }),
243
- description && /* @__PURE__ */ jsx("p", {
244
- className: "text-[var(--theme-muted-text-color)] text-sm leading-relaxed mt-2",
245
- children: description
246
- })
247
- ]
248
- });
249
- }
250
- //#endregion
251
- //#region src/components/Input.tsx
252
- var Input = forwardRef(({ label, error, className = "", mono, type, required, ...props }, ref) => {
253
- const [showPassword, setShowPassword] = useState(false);
254
- const isPassword = type === "password";
255
- const inputType = isPassword && showPassword ? "text" : type;
256
- const generatedId = useId();
257
- const id = props.id ?? generatedId;
258
- const errorId = `${id}-error`;
259
- const describedBy = [props["aria-describedby"], error ? errorId : void 0].filter(Boolean).join(" ") || void 0;
260
- const inputClasses = cx("w-full py-3 px-4 bg-[var(--theme-muted-panel-bg)] border border-[var(--theme-border)] rounded-lg text-[var(--theme-app)] text-sm transition-all duration-200 box-border", "focus:outline-none focus:border-[var(--theme-element)] focus:shadow-[0_0_0_3px_color-mix(in_srgb,var(--theme-element)_25%,transparent)]", "placeholder:text-[var(--theme-muted-text-color)]", "disabled:bg-[var(--theme-muted-panel-bg)] disabled:text-[var(--theme-muted-text-color)] disabled:cursor-not-allowed disabled:opacity-70", mono && "font-mono text-[0.8125rem]", error && "border-[#ef4444]", isPassword && "pr-11", className);
261
- return /* @__PURE__ */ jsxs("div", {
262
- className: "flex flex-col gap-1.5",
263
- children: [
264
- label && /* @__PURE__ */ jsxs("label", {
265
- className: "text-[0.8125rem] font-medium text-[var(--theme-app)]",
266
- htmlFor: id,
267
- children: [label, required && /* @__PURE__ */ jsx(RequiredMark, {})]
268
- }),
269
- /* @__PURE__ */ jsxs("div", {
270
- className: isPassword ? "relative w-full" : "",
271
- children: [/* @__PURE__ */ jsx("input", {
272
- ref,
273
- type: inputType,
274
- className: inputClasses,
275
- ...props,
276
- id,
277
- required,
278
- "aria-invalid": error ? true : props["aria-invalid"],
279
- "aria-describedby": describedBy
280
- }), isPassword && /* @__PURE__ */ jsx("button", {
281
- type: "button",
282
- className: "absolute right-3 top-1/2 -translate-y-1/2 bg-transparent border-none text-[var(--theme-muted-text-color)] cursor-pointer p-1 transition-colors duration-200 flex items-center justify-center hover:text-[var(--theme-app)]",
283
- onClick: () => setShowPassword(!showPassword),
284
- tabIndex: -1,
285
- "aria-label": showPassword ? "Hide password" : "Show password",
286
- children: showPassword ? /* @__PURE__ */ jsx(EyeOffIcon, { className: "w-5 h-5" }) : /* @__PURE__ */ jsx(EyeIcon, { className: "w-5 h-5" })
287
- })]
288
- }),
289
- error && /* @__PURE__ */ jsxs("span", {
290
- id: errorId,
291
- role: "alert",
292
- className: "text-[0.8125rem] text-[#ef4444] flex items-center gap-1.5",
293
- children: [/* @__PURE__ */ jsx(AlertIcon, { className: "w-4 h-4" }), error]
294
- })
295
- ]
296
- });
297
- });
298
- Input.displayName = "Input";
299
- var Textarea = forwardRef(({ label, error, className = "", mono, required, ...props }, ref) => {
300
- const generatedId = useId();
301
- const id = props.id ?? generatedId;
302
- const errorId = `${id}-error`;
303
- const describedBy = [props["aria-describedby"], error ? errorId : void 0].filter(Boolean).join(" ") || void 0;
304
- const textareaClasses = cx("w-full py-3 px-4 bg-[var(--theme-muted-panel-bg)] border border-[var(--theme-border)] rounded-lg text-[var(--theme-app)] text-sm transition-all duration-200 box-border min-h-[140px] resize-y", "focus:outline-none focus:border-[var(--theme-element)] focus:shadow-[0_0_0_3px_color-mix(in_srgb,var(--theme-element)_25%,transparent)]", "placeholder:text-[var(--theme-muted-text-color)]", mono && "font-mono text-[0.8125rem]", error && "border-[#ef4444]", className);
305
- return /* @__PURE__ */ jsxs("div", {
306
- className: "flex flex-col gap-1.5",
307
- children: [
308
- label && /* @__PURE__ */ jsxs("label", {
309
- className: "text-[0.8125rem] font-medium text-[var(--theme-app)]",
310
- htmlFor: id,
311
- children: [label, required && /* @__PURE__ */ jsx(RequiredMark, {})]
312
- }),
313
- /* @__PURE__ */ jsx("textarea", {
314
- ref,
315
- className: textareaClasses,
316
- ...props,
317
- id,
318
- required,
319
- "aria-invalid": error ? true : props["aria-invalid"],
320
- "aria-describedby": describedBy
321
- }),
322
- error && /* @__PURE__ */ jsxs("span", {
323
- id: errorId,
324
- role: "alert",
325
- className: "text-[0.8125rem] text-[#ef4444] flex items-center gap-1.5",
326
- children: [/* @__PURE__ */ jsx(AlertIcon, { className: "w-4 h-4" }), error]
327
- })
328
- ]
329
- });
330
- });
331
- Textarea.displayName = "Textarea";
332
- //#endregion
333
- //#region src/components/inputClasses.ts
334
- var inputClasses = "w-full rounded-md border theme-border bg-(--theme-input-bg) px-3 py-2 text-sm text-(--theme-panel) outline-none focus:ring-2 focus:ring-(--theme-element)";
335
- //#endregion
336
- //#region src/components/IconButton.tsx
337
- var IconButton = forwardRef(({ icon, label, variant = "default", size = "md", active = false, showTooltip = true, className, disabled, ...props }, ref) => {
338
- const sizeClasses = {
339
- sm: "w-7 h-7 [&_svg]:w-3.5 [&_svg]:h-3.5",
340
- md: "w-9 h-9 [&_svg]:w-4 [&_svg]:h-4",
341
- lg: "w-11 h-11 [&_svg]:w-5 [&_svg]:h-5"
342
- };
343
- const variantClasses = {
344
- default: cx("bg-[var(--theme-muted-panel-bg)] text-[var(--theme-muted-text-color)]", "hover:bg-[var(--theme-border)] hover:text-[var(--theme-app)]", active && "bg-[var(--theme-element)]/10 text-[var(--theme-element)]"),
345
- ghost: cx("bg-transparent text-[var(--theme-muted-text-color)]", "hover:bg-[var(--theme-muted-panel-bg)] hover:text-[var(--theme-app)]", active && "text-[var(--theme-element)]"),
346
- primary: cx("bg-[var(--theme-element)] text-white", "hover:bg-[var(--theme-element)]/90", active && "ring-2 ring-[var(--theme-element)]/50"),
347
- success: cx("bg-[#22c55e] text-white", "hover:bg-[#22c55e]/90", active && "ring-2 ring-[#22c55e]/50")
348
- };
349
- return /* @__PURE__ */ jsx("button", {
350
- ref,
351
- type: "button",
352
- "aria-label": label,
353
- disabled,
354
- ...showTooltip ? { "data-tooltip-id": TOOLTIP_ID } : {},
355
- "data-tooltip-content": label,
356
- "data-tooltip-delay-show": 300,
357
- "data-tooltip-class-name": "!bg-[var(--theme-app)] !text-[var(--theme-app-bg)] !text-xs !py-1 !px-2 !rounded-md",
358
- className: cx("inline-flex items-center justify-center rounded-lg", "transition-all duration-200 cursor-pointer", "disabled:opacity-50 disabled:cursor-not-allowed", sizeClasses[size], variantClasses[variant], className),
359
- ...props,
360
- children: icon
361
- });
362
- });
363
- IconButton.displayName = "IconButton";
364
- //#endregion
365
- //#region src/components/Toggle.tsx
366
- function Toggle({ checked, onChange, disabled, label }) {
367
- return /* @__PURE__ */ jsxs("label", {
368
- role: "none",
369
- onClick: (e) => e.stopPropagation(),
370
- className: cx("relative inline-flex items-center", disabled ? "cursor-not-allowed opacity-60" : "cursor-pointer"),
371
- children: [/* @__PURE__ */ jsx("input", {
372
- type: "checkbox",
373
- className: "peer sr-only",
374
- checked,
375
- onChange: (e) => onChange(e.target.checked),
376
- disabled,
377
- "aria-label": label
378
- }), /* @__PURE__ */ jsx("div", { className: "h-6 w-11 rounded-full bg-(--theme-muted-panel-bg) transition-colors peer-checked:bg-(--theme-element) peer-focus-visible:ring-2 peer-focus-visible:ring-[color-mix(in_srgb,var(--theme-element)_25%,transparent)] after:absolute after:start-[2px] after:top-[2px] after:h-5 after:w-5 after:rounded-full after:bg-white after:shadow-sm after:transition-transform after:content-[\"\"] motion-reduce:after:transition-none peer-checked:after:translate-x-5" })]
379
- });
380
- }
381
- //#endregion
382
- //#region src/components/LetterBadge.tsx
383
- /** A compact letter badge ("AI", "PUB", "SSH") used as a type mark in place of
384
- * an icon. Size the box and text via className (e.g. "h-5 w-5 text-[8px]"). */
385
- function LetterBadge({ text, className }) {
386
- return /* @__PURE__ */ jsx("span", {
387
- className: cx("inline-flex shrink-0 items-center justify-center rounded-[3px] border theme-border font-bold leading-none tracking-tight text-(--theme-app)", className),
388
- children: text
389
- });
390
- }
391
- //#endregion
392
- //#region src/components/FilterPill.tsx
393
- function FilterPill({ active, onClick, children }) {
394
- return /* @__PURE__ */ jsx("button", {
395
- type: "button",
396
- onClick,
397
- className: cx("px-3 py-1.5 text-xs font-medium rounded-full border transition-all duration-200", active ? "bg-[var(--theme-panel-bg)] border-[var(--theme-border)] text-[var(--theme-panel)] shadow-sm" : "bg-transparent border-transparent text-[var(--theme-muted-text-color)] hover:text-[var(--theme-panel)] hover:bg-[var(--theme-hover)]"),
398
- children
399
- });
400
- }
401
- //#endregion
402
- //#region src/components/Filter.tsx
403
- function Filter({ filter, setFilter, placeholder = "Filter...", pills, activePill, onPillChange }) {
404
- return /* @__PURE__ */ jsxs("div", {
405
- className: "flex items-center gap-2",
406
- children: [/* @__PURE__ */ jsxs("div", {
407
- className: "relative flex items-center",
408
- children: [/* @__PURE__ */ jsx("input", {
409
- placeholder,
410
- type: "text",
411
- value: filter,
412
- onChange: (e) => setFilter(e.target.value.toLowerCase()),
413
- className: "shadow-sm focus:ring-1 block w-full pr-3 sm:text-sm theme-border rounded-md py-1.5 pl-8"
414
- }), /* @__PURE__ */ jsx("div", {
415
- className: "absolute inset-y-0 left-0 flex py-2.5 pl-2",
416
- children: /* @__PURE__ */ jsx(FilterIcon, {})
417
- })]
418
- }), pills && onPillChange && /* @__PURE__ */ jsx("div", {
419
- className: "flex gap-1",
420
- children: pills.map((pill) => /* @__PURE__ */ jsx("button", {
421
- type: "button",
422
- onClick: () => onPillChange(pill.value),
423
- className: cx("px-2.5 py-1 text-xs rounded-full transition-colors border", activePill === pill.value ? "bg-(--theme-element) text-(--theme-element-text) border-transparent" : "theme-border theme-text hover:theme-hover"),
424
- children: pill.label
425
- }, pill.value))
426
- })]
427
- });
428
- }
429
- //#endregion
430
- //#region src/components/Sort.tsx
431
- var SortIcon = ({ currentlySorted, currentDirection, name }) => {
432
- const style = { transform: "translateY(2px)" };
433
- if (currentlySorted === name) {
434
- if (currentDirection === "ascending") return /* @__PURE__ */ jsx(SortDownIcon, { style });
435
- else if (currentDirection === "descending") return /* @__PURE__ */ jsx(SortUpIcon, { style });
436
- } else return /* @__PURE__ */ jsx(SortUnsortedIcon, { style });
437
- return null;
438
- };
439
- function Sort({ currentlySorted, name, setCurrentDirection, setCurrentlySorted, currentDirection }) {
440
- const t = useStrings().common;
441
- const sort = (sorted, direction) => {
442
- if (sorted === name) {
443
- if (direction === "ascending") setCurrentDirection("descending");
444
- else if (direction === "descending") {
445
- setCurrentDirection("unsorted");
446
- setCurrentlySorted("");
447
- }
448
- } else {
449
- setCurrentDirection("ascending");
450
- setCurrentlySorted(name);
451
- }
452
- };
453
- return /* @__PURE__ */ jsx("div", {
454
- className: "inline",
455
- children: /* @__PURE__ */ jsx("button", {
456
- type: "button",
457
- "aria-label": t.sort,
458
- onClick: () => sort(currentlySorted, currentDirection),
459
- children: /* @__PURE__ */ jsx(SortIcon, {
460
- currentDirection,
461
- currentlySorted,
462
- name
463
- })
464
- })
465
- });
466
- }
467
- //#endregion
468
- //#region src/components/Pagination.tsx
469
- function Pagination({ endingNumber, endingTime, nextCallback, prevCallback, roundedBottom, startingNumber, startingTime, nextDisabled, prevDisabled, name, useTimeRange = false }) {
470
- const t = useStrings().list;
471
- return /* @__PURE__ */ jsxs("nav", {
472
- className: cx(roundedBottom && "rounded-b-2xl", "theme-muted-panel flex items-center justify-between border-t theme-border px-4 py-1 sm:px-6"),
473
- "aria-label": "Pagination",
474
- children: [/* @__PURE__ */ jsx("div", {
475
- className: cx("hidden", (startingNumber !== void 0 && startingNumber !== null && endingNumber !== void 0 && endingNumber !== null || startingTime && endingTime) && "sm:block"),
476
- children: /* @__PURE__ */ jsx("p", {
477
- className: "text-sm whitespace-nowrap",
478
- children: useTimeRange && startingTime && endingTime ? t.paginationShowingTimeRange(name ?? "", startingTime, endingTime) : t.paginationShowing(name ?? "", startingNumber ?? "", endingNumber ?? "")
479
- })
480
- }), /* @__PURE__ */ jsxs("div", {
481
- className: "flex flex-1 justify-between sm:justify-end gap-x-2",
482
- children: [/* @__PURE__ */ jsx("button", {
483
- type: "button",
484
- disabled: prevDisabled,
485
- onClick: prevCallback,
486
- className: cx("link text-sm", prevDisabled && "disabled"),
487
- children: t.paginationPrevious
488
- }), /* @__PURE__ */ jsx("button", {
489
- type: "button",
490
- disabled: nextDisabled,
491
- onClick: nextCallback,
492
- className: cx("link text-sm", nextDisabled && "disabled"),
493
- children: t.paginationNext
494
- })]
495
- })]
496
- });
497
- }
498
- //#endregion
499
- //#region src/components/SettingsCard.tsx
500
- /**
501
- * A settings card: an optional sentence-case section label sits above a
502
- * bordered panel of rows. The label carries the breathing-room rhythm between
503
- * cards; the rows inside provide their own dividers via SettingRow's `isFirst`.
504
- */
505
- function SettingsCard({ title, description, action, actionAlign = "adjacent", overflowVisible, children, className }) {
506
- return /* @__PURE__ */ jsxs("section", {
507
- className: cx("mt-10 first:mt-0", className),
508
- children: [(title || action) && /* @__PURE__ */ jsxs("div", {
509
- className: "mb-3 px-0.5",
510
- children: [/* @__PURE__ */ jsxs("div", {
511
- className: cx("flex items-center gap-1.5", actionAlign === "right" && "justify-between"),
512
- children: [title && /* @__PURE__ */ jsx("h2", {
513
- className: "text-[15px] font-semibold theme-text leading-none",
514
- children: title
515
- }), action]
516
- }), description && /* @__PURE__ */ jsx("p", {
517
- className: "text-xs theme-muted-text mt-1.5 leading-snug",
518
- children: description
519
- })]
520
- }), /* @__PURE__ */ jsx("div", {
521
- className: cx("panel", overflowVisible ? "overflow-visible" : "overflow-hidden"),
522
- children
523
- })]
524
- });
525
- }
526
- //#endregion
527
- //#region src/components/SettingsGroup.tsx
528
- function SettingsGroup({ title, children, className }) {
529
- return /* @__PURE__ */ jsxs("div", {
530
- className: cx("mt-8 first:mt-0", className),
531
- children: [title && /* @__PURE__ */ jsx("h2", {
532
- className: "text-[11px] font-semibold uppercase tracking-wider theme-muted-text mb-2 px-1",
533
- children: title
534
- }), /* @__PURE__ */ jsx("div", {
535
- className: "panel divide-y divide-(--theme-border)",
536
- children
537
- })]
538
- });
539
- }
540
- //#endregion
541
- //#region src/components/SettingRow.tsx
542
- function SettingRow({ label, htmlFor, helpText, children, isFirst, fill, onClick }) {
543
- return /* @__PURE__ */ jsxs("div", {
544
- role: "none",
545
- onClick,
546
- className: cx("px-5 py-5 grid grid-cols-1 gap-x-8 gap-y-2", fill ? "md:grid-cols-[200px_1fr]" : "md:grid-cols-[1fr_auto]", !isFirst && "border-t theme-border", onClick && "cursor-pointer select-none hover:theme-hover transition-colors"),
547
- children: [/* @__PURE__ */ jsxs("div", {
548
- className: "flex flex-col gap-y-1",
549
- children: [/* @__PURE__ */ jsx("label", {
550
- htmlFor,
551
- className: "font-semibold theme-text leading-tight",
552
- children: label
553
- }), helpText && /* @__PURE__ */ jsx("div", {
554
- className: "theme-muted-text text-xs leading-snug",
555
- children: helpText
556
- })]
557
- }), /* @__PURE__ */ jsx("div", {
558
- className: cx("min-w-0", !fill && "flex items-center justify-end"),
559
- children
560
- })]
561
- });
562
- }
563
- function SettingSection({ title, isFirst }) {
564
- return /* @__PURE__ */ jsx("div", {
565
- className: cx("px-5 py-3 theme-muted-panel", !isFirst && "border-t theme-border"),
566
- children: /* @__PURE__ */ jsx("h2", {
567
- className: "font-semibold text-sm uppercase tracking-wider theme-muted-text",
568
- children: title
569
- })
570
- });
571
- }
572
- //#endregion
573
- //#region src/components/SettingModeOption.tsx
574
- /** A labeled + described radio option row, used inside a SettingsCard to pick
575
- * between modes (e.g. default vs custom). Stacked rows share the card's
576
- * dividers via `isFirst`. */
577
- function SettingModeOption({ name, checked, onSelect, label, description, isFirst, disabled }) {
578
- return /* @__PURE__ */ jsxs("label", {
579
- className: cx("flex items-start gap-3 px-5 py-4", disabled ? "cursor-default opacity-60" : "cursor-pointer", !isFirst && "border-t theme-border"),
580
- children: [/* @__PURE__ */ jsx("input", {
581
- type: "radio",
582
- name,
583
- checked,
584
- onChange: onSelect,
585
- disabled,
586
- className: "mt-0.5 w-4 h-4 theme-input shrink-0"
587
- }), /* @__PURE__ */ jsxs("div", {
588
- className: "min-w-0",
589
- children: [/* @__PURE__ */ jsx("div", {
590
- className: "font-semibold theme-text leading-tight",
591
- children: label
592
- }), /* @__PURE__ */ jsx("div", {
593
- className: "theme-muted-text text-xs leading-snug mt-0.5",
594
- children: description
595
- })]
596
- })]
597
- });
598
- }
599
- //#endregion
600
- export { AddMenu, Avatar, BareModal, BreadcrumbProvider, BreadcrumbsActionButton, BreadcrumbsRightAction, BreadcrumbsTitleAction, Button, CREATE_MODAL_SELECT_FILTER_THRESHOLD, Callout, Card, CardHeader, CompactTable, ConfirmModal, ControlledCollapsiblePanel, CopyCodeBlock, CopyToClipboard, CreateModal, CreateModalAutocompleteField, CreateModalField, CreateModalSelect, CreateModalSwitch, CreateModalTextarea, CustomListbox, DEFAULT_PRESET, DescriptionList, DescriptionListItem, Dropdown, DropdownCaret, EmptyState, Filter, FilterPill, GlobalTooltip, HeaderActionMenu, HeaderAddButton, HeaderEditButton, HeaderRowMenu, IconButton, Indicator, Input, LetterBadge, Loader, Markdown, MaybeCollapsible, MethodButton, MultiSelectDropdown, Overview, PageHeader, Pagination, RequiredMark, SectionHeader, SettingModeOption, SettingRow, SettingSection, SettingsCard, SettingsGroup, Sort, StatusBadge, StatusDot, SwitchToggle, SwitchToggleSmall, THEME_PRESETS, THEME_TOKENS, TOOLTIP_ID, Table, Textarea, Toggle, TooltipInfo, UIProvider, UncontrolledCollapsiblePanel, applyTheme, avatarInitials, contrastRatio, dangerButtonClasses, deriveTheme, filterOption, flattenOptions, formatTooltipContent, ghostButtonClasses, headerActionButtonClasses, inputClasses, isCategory, isDarkColor, isOption, modalPanelClasses, primaryButtonClasses, statusTextClass, toggleSetMember, truncationTooltipProps, useBreadcrumb, useClearBreadcrumbs, useCssIsDark, useHideBreadcrumbs, useNavigation, useNotify, usePersistedState, useProvisionCorsRules, useRelativeTime, useRepoSuggestions, useRunFile, useSetBreadcrumbs, useSetDefaultBreadcrumbs, useSlots, useStrings, useWorkflowJsonResolver };
48
+ export { AddMenu, Avatar, BareModal, BreadcrumbProvider, BreadcrumbsActionButton, BreadcrumbsRightAction, BreadcrumbsTitleAction, Button, CREATE_MODAL_SELECT_FILTER_THRESHOLD, Callout, Card, CardHeader, CompactTable, ConfirmModal, ControlledCollapsiblePanel, CopyCodeBlock, CopyToClipboard, CreateModal, CreateModalAutocompleteField, CreateModalField, CreateModalSelect, CreateModalSwitch, CreateModalTextarea, CustomListbox, DEFAULT_PRESET, DescriptionList, DescriptionListItem, Dropdown, DropdownCaret, EmptyState, Filter, FilterPill, GlobalTooltip, HeaderActionMenu, HeaderAddButton, HeaderEditButton, HeaderRowMenu, IconButton, Indicator, Input, LetterBadge, Loader, Markdown, MaybeCollapsible, MethodButton, MultiSelectDropdown, Overview, PageHeader, Pagination, RequiredMark, SectionHeader, SettingModeOption, SettingRow, SettingSection, SettingsCard, SettingsGroup, Sort, StatusBadge, StatusDot, SwitchToggle, SwitchToggleSmall, THEME_PRESETS, THEME_TOKENS, TOOLTIP_ID, Table, Textarea, Toggle, TooltipInfo, UIProvider, UncontrolledCollapsiblePanel, applyTheme, avatarInitials, contrastRatio, dangerButtonClasses, deriveTheme, filterOption, flattenOptions, formatTooltipContent, ghostButtonClasses, headerActionButtonClasses, inputClasses, isCategory, isDarkColor, isOption, modalPanelClasses, primaryButtonClasses, statusTextClass, toggleSetMember, truncationTooltipProps, useBreadcrumb, useClearBreadcrumbs, useCssIsDark, useHideBreadcrumbs, useNavigation, useNotify, useOptionalWorkflowEngine, usePersistedState, useProvisionCorsRules, useRelativeTime, useRunFile, useSetBreadcrumbs, useSetDefaultBreadcrumbs, useSlots, useStrings, useWorkflowEngine, useWorkflowEngineLoader };