@parallelworks/ui 0.1.0 → 0.3.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 (146) hide show
  1. package/dist/assets/editor.worker-CuBRIwi-.js +14776 -0
  2. package/dist/assets/json.worker-8ytS02vz.js +22161 -0
  3. package/dist/assets/yaml.worker-DJC-VUcv.js +48367 -0
  4. package/dist/chunks/CodePreviewEditor-CSPRILMp.js +61 -0
  5. package/dist/chunks/Indicator-hBSIxOPK.js +39 -0
  6. package/dist/chunks/Loader-DQiZ75fa.js +25 -0
  7. package/dist/chunks/Markdown-C5Re2ezs.js +101 -0
  8. package/dist/chunks/MarkdownImpl-Bq4QhrtA.js +33 -0
  9. package/dist/chunks/Modal-sOUEwebV.js +121 -0
  10. package/dist/chunks/Monaco-CC4ak1JG.js +717 -0
  11. package/dist/chunks/Provider-DvVvScTQ.js +391 -0
  12. package/dist/chunks/StatusBadge-DXp4zkSd.js +46 -0
  13. package/dist/chunks/SwitchToggle-2uRw8ZeJ.js +725 -0
  14. package/dist/chunks/SwitchToggleSmall-FcsaYSTs.js +14 -0
  15. package/dist/chunks/Table-C5z6qWjM.js +91 -0
  16. package/dist/chunks/Tooltip-WgbiC_nd.js +71 -0
  17. package/dist/chunks/editor-D55tumuZ.js +372 -0
  18. package/dist/chunks/lib-DTgL8klR.js +191 -0
  19. package/dist/chunks/list-7PyDF1tz.js +465 -0
  20. package/dist/components/CollapsiblePanel.d.ts +27 -0
  21. package/dist/components/CopyToClipboard.d.ts +17 -0
  22. package/dist/components/Dropdown.d.ts +24 -0
  23. package/dist/components/Indicator.d.ts +4 -0
  24. package/dist/components/Listbox.d.ts +18 -0
  25. package/dist/components/Markdown.d.ts +7 -0
  26. package/dist/components/MarkdownImpl.d.ts +2 -0
  27. package/dist/components/MultiSelect.d.ts +19 -0
  28. package/dist/components/Overview.d.ts +12 -0
  29. package/dist/components/Provider.d.ts +438 -0
  30. package/dist/components/SectionHeader.d.ts +6 -0
  31. package/dist/components/SwitchToggle.d.ts +12 -0
  32. package/dist/components/SwitchToggleSmall.d.ts +6 -0
  33. package/dist/components/dropdownUtils.d.ts +18 -0
  34. package/dist/editor/Editor.d.ts +2 -0
  35. package/dist/editor/EditorField.d.ts +11 -0
  36. package/dist/editor/FormCodePanel.d.ts +8 -0
  37. package/dist/editor/Monaco.d.ts +31 -0
  38. package/dist/editor/index.d.ts +7 -0
  39. package/dist/editor/index.js +2 -0
  40. package/dist/editor/themes.d.ts +4 -0
  41. package/dist/editor/useCssIsDark.d.ts +6 -0
  42. package/dist/editor/workers.d.ts +6 -0
  43. package/dist/file-explorer/FileExplorer.d.ts +23 -0
  44. package/dist/file-explorer/FileExplorerContext.d.ts +17 -0
  45. package/dist/file-explorer/FilePreview/CodePreviewEditor.d.ts +6 -0
  46. package/dist/file-explorer/FilePreview/Inline.d.ts +13 -0
  47. package/dist/file-explorer/FilePreview/StreamedBadge.d.ts +1 -0
  48. package/dist/file-explorer/FilePreview/Viewer.d.ts +15 -0
  49. package/dist/file-explorer/FilePreview/index.d.ts +15 -0
  50. package/dist/file-explorer/FilePreview/parse.d.ts +24 -0
  51. package/dist/file-explorer/FilePreview/previewCache.d.ts +26 -0
  52. package/dist/file-explorer/FilePreview/previewType.d.ts +21 -0
  53. package/dist/file-explorer/FilePreview/readCappedBytes.d.ts +37 -0
  54. package/dist/file-explorer/FilePreview/useObjectBlobUrl.d.ts +16 -0
  55. package/dist/file-explorer/FilePreview/useObjectText.d.ts +23 -0
  56. package/dist/file-explorer/FilePreview/usePresignedUrl.d.ts +12 -0
  57. package/dist/file-explorer/FileRow.d.ts +35 -0
  58. package/dist/file-explorer/FileRowsWindow.d.ts +43 -0
  59. package/dist/file-explorer/FileTable.d.ts +26 -0
  60. package/dist/file-explorer/FileTableHeaders.d.ts +13 -0
  61. package/dist/file-explorer/LoadMoreRow.d.ts +15 -0
  62. package/dist/file-explorer/TreeView.d.ts +28 -0
  63. package/dist/file-explorer/helpers.d.ts +47 -0
  64. package/dist/file-explorer/index.d.ts +10 -0
  65. package/dist/file-explorer/index.js +5646 -0
  66. package/dist/file-explorer/lib/batch.d.ts +3 -0
  67. package/dist/file-explorer/lib/errors.d.ts +3 -0
  68. package/dist/file-explorer/lib/fileExplorer.d.ts +32 -0
  69. package/dist/file-explorer/lib/paging.d.ts +93 -0
  70. package/dist/file-explorer/lib/types.d.ts +92 -0
  71. package/dist/file-explorer/lib/utils.d.ts +37 -0
  72. package/dist/file-explorer/toasts.d.ts +9 -0
  73. package/dist/file-explorer/treeRows.d.ts +35 -0
  74. package/dist/file-explorer/useNearEnd.d.ts +7 -0
  75. package/dist/form/FieldWrapper.d.ts +10 -0
  76. package/dist/form/Fields/BooleanField.d.ts +12 -0
  77. package/dist/form/Fields/BucketReadOnlyField.d.ts +7 -0
  78. package/dist/form/Fields/CheckboxGroupField.d.ts +18 -0
  79. package/dist/form/Fields/ColorField.d.ts +8 -0
  80. package/dist/form/Fields/DropdownField.d.ts +24 -0
  81. package/dist/form/Fields/DurationField.d.ts +13 -0
  82. package/dist/form/Fields/LabelField.d.ts +9 -0
  83. package/dist/form/Fields/MultiDropdownField.d.ts +18 -0
  84. package/dist/form/Fields/NumberField.d.ts +13 -0
  85. package/dist/form/Fields/ObjectField.d.ts +8 -0
  86. package/dist/form/Fields/RadioField.d.ts +9 -0
  87. package/dist/form/Fields/RangeField.d.ts +11 -0
  88. package/dist/form/Fields/ResourceOptionIcon.d.ts +11 -0
  89. package/dist/form/Fields/StepField.d.ts +3 -0
  90. package/dist/form/Fields/StringField.d.ts +17 -0
  91. package/dist/form/Fields/TextAreaField.d.ts +8 -0
  92. package/dist/form/Fields/durationValidity.d.ts +2 -0
  93. package/dist/form/Form.d.ts +105 -0
  94. package/dist/form/SpecialTypes/DropdownWrapper.d.ts +14 -0
  95. package/dist/form/SpecialTypes/FormikCustomDropdown.d.ts +53 -0
  96. package/dist/form/SpecialTypes/FormikCustomInput.d.ts +17 -0
  97. package/dist/form/SpecialTypes/FormikMultiSelectDropdown.d.ts +13 -0
  98. package/dist/form/SpecialTypes/FormikNumericInput.d.ts +9 -0
  99. package/dist/form/SpecialTypes/index.d.ts +3 -0
  100. package/dist/form/Wizard/WizardContainer.d.ts +5 -0
  101. package/dist/form/Wizard/WizardNavigation.d.ts +2 -0
  102. package/dist/form/Wizard/WizardStepContent.d.ts +8 -0
  103. package/dist/form/Wizard/WizardStepIndicator.d.ts +2 -0
  104. package/dist/form/Wizard/types.d.ts +171 -0
  105. package/dist/form/Wizard/useWizardState.d.ts +28 -0
  106. package/dist/form/Wizard/utils.d.ts +2 -0
  107. package/dist/form/fieldRegistry.d.ts +7 -0
  108. package/dist/form/index.d.ts +16 -0
  109. package/dist/form/index.js +2319 -0
  110. package/dist/form/lib.d.ts +15 -0
  111. package/dist/form/types/fieldComponentTypes.d.ts +32 -0
  112. package/dist/form/types/fieldTypes.d.ts +80 -0
  113. package/dist/form/types/workflow-schema.d.ts +1107 -0
  114. package/dist/form/useParsedOpts.d.ts +5 -0
  115. package/dist/form/usePrevious.d.ts +1 -0
  116. package/dist/form/utils/checkShowIfObject.d.ts +1 -0
  117. package/dist/form/utils/getParentValue.d.ts +1 -0
  118. package/dist/form/utils/getPlaceholder.d.ts +2 -0
  119. package/dist/form/utils/getValueUsingPath.d.ts +1 -0
  120. package/dist/form/utils/pwResolver.d.ts +18 -0
  121. package/dist/form/utils/secondaryField.d.ts +8 -0
  122. package/dist/form/utils/slurmDuration.d.ts +15 -0
  123. package/dist/icons.d.ts +1 -1
  124. package/dist/icons.js +2 -2
  125. package/dist/index.d.ts +17 -0
  126. package/dist/index.js +42 -350
  127. package/dist/list/ListTable.d.ts +63 -0
  128. package/dist/list/RowContextMenu.d.ts +113 -0
  129. package/dist/list/index.d.ts +2 -0
  130. package/dist/list/index.js +2 -0
  131. package/dist/logviewer/LogViewer.d.ts +18 -0
  132. package/dist/logviewer/index.d.ts +1 -0
  133. package/dist/logviewer/index.js +534 -0
  134. package/dist/logviewer/logviewer.css +70 -0
  135. package/dist/styles/theme.css +30 -0
  136. package/dist/styles.css +1 -1
  137. package/dist/workflow/AnnotationBanner.d.ts +5 -0
  138. package/dist/workflow/Collapse.d.ts +6 -0
  139. package/dist/workflow/DependencyGraph.d.ts +15 -0
  140. package/dist/workflow/JobSummary.d.ts +38 -0
  141. package/dist/workflow/MatrixGroup.d.ts +41 -0
  142. package/dist/workflow/Reveal.d.ts +7 -0
  143. package/dist/workflow/TreeView.d.ts +42 -0
  144. package/dist/workflow/index.d.ts +1 -0
  145. package/dist/workflow/index.js +2331 -0
  146. package/package.json +71 -6
@@ -0,0 +1,391 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { createContext, useContext, useMemo } from "react";
3
+ //#region src/components/Provider.tsx
4
+ var DefaultLink = ({ to, onClick, className, children }) => /* @__PURE__ */ jsx("a", {
5
+ href: to,
6
+ onClick,
7
+ className,
8
+ children
9
+ });
10
+ /** The provider's link slot, with a plain anchor fallback. */
11
+ function useLink() {
12
+ return useContext(UIContext).slots.link ?? DefaultLink;
13
+ }
14
+ var defaultUseRunFile = () => ({
15
+ data: void 0,
16
+ isLoading: false,
17
+ error: void 0
18
+ });
19
+ var DEFAULTS = {
20
+ notify: {
21
+ info: () => {},
22
+ success: () => {},
23
+ warning: () => {},
24
+ error: () => {},
25
+ loading: () => "toast",
26
+ update: () => {},
27
+ dismiss: () => {}
28
+ },
29
+ strings: {
30
+ loading: "Loading…",
31
+ common: {
32
+ copy: "Copy",
33
+ copied: "Copied!",
34
+ copyFailed: "Failed to copy text to clipboard",
35
+ showHiddenFields: "Show hidden fields",
36
+ showHiddenFieldsHint: "Includes fields hidden by default because they're specific to each resource, such as name and group.",
37
+ jsonHasErrors: "JSON has errors, please fix before saving"
38
+ },
39
+ dropdown: {
40
+ select: (type) => `Select ${type}`,
41
+ noOptionsFound: "No options found"
42
+ },
43
+ logviewer: {
44
+ error: "Error:",
45
+ warning: "Warning:",
46
+ notice: "Notice:",
47
+ top: "Top",
48
+ clearSelection: "Clear selection",
49
+ copyLines: (count) => count === 1 ? "Copy 1 line" : `Copy ${count} lines`,
50
+ copyAll: "Copy All",
51
+ hideDebug: "Hide Debug",
52
+ showDebug: "Show Debug",
53
+ filterLogs: "Filter logs",
54
+ download: "Download"
55
+ },
56
+ dag: {
57
+ workflow: "Workflow",
58
+ run: "Run",
59
+ status: "Status",
60
+ runtime: "Runtime",
61
+ submitted: "Submitted",
62
+ expandAll: "Expand all",
63
+ collapseAll: "Collapse all",
64
+ statusLabel: (status) => status,
65
+ statusReason: () => void 0
66
+ },
67
+ jobActions: {
68
+ openSubworkflowLogs: "Open subworkflow logs",
69
+ openOriginalWorkflow: "Open original workflow",
70
+ openInNewGraph: "Open in new graph"
71
+ },
72
+ fileExplorer: {
73
+ preview: {
74
+ shareFile: "Share file",
75
+ open: "Open",
76
+ userType: "User",
77
+ select: (name) => `Select ${name}`,
78
+ viewDetails: "View details",
79
+ openFolder: "Open folder",
80
+ delete: "Delete",
81
+ detailsTab: "Details",
82
+ previewTab: "Preview",
83
+ preview: "Preview",
84
+ openFullPreview: "Open full preview",
85
+ quickLook: "Quick Look",
86
+ fullWindow: "Full window",
87
+ streamed: "Streamed",
88
+ streamedTooltip: "Streamed securely to your browser over a short-lived signed URL — never written to disk.",
89
+ loading: "Loading preview…",
90
+ linkError: "Couldn't generate a preview link for this file.",
91
+ errorTitle: "Couldn't load preview",
92
+ previewError: "This file couldn't be previewed in your browser.",
93
+ tooLarge: "This file is too large to preview in the browser.",
94
+ downloadInstead: "Download instead",
95
+ archiveTitle: "Can't preview archives",
96
+ archiveMessage: "Archive files can't be previewed in the browser. Download the file to view its contents.",
97
+ unsupportedTitle: "Preview not available",
98
+ unsupportedMessage: "This file type can't be previewed in the browser. Download the file to view it.",
99
+ notebookParseError: "This notebook couldn't be parsed.",
100
+ copyUri: "Copy URI",
101
+ download: "Download",
102
+ close: "Close",
103
+ zoomIn: "Zoom in",
104
+ zoomOut: "Zoom out",
105
+ previousFile: "Previous file",
106
+ nextFile: "Next file",
107
+ csvRows: (count, columns) => `${count} rows · ${columns} columns`,
108
+ csvFirstRows: (count, columns) => `First ${count} rows · ${columns} columns`,
109
+ head: "Head",
110
+ tail: "Tail",
111
+ firstLines: (count) => `First ${count} lines`,
112
+ lastLines: (count) => `Last ${count} lines`,
113
+ notebookOutput: "Notebook output"
114
+ },
115
+ createFolder: {
116
+ action: "New folder",
117
+ submit: "Create folder",
118
+ creating: "Creating folder…",
119
+ folder: "Folder",
120
+ namePlaceholder: "Folder name",
121
+ success: (name) => `Created ${name}.`,
122
+ error: (message) => `Couldn't create folder: ${message}`,
123
+ invalidTarget: "Select a folder before creating a new folder.",
124
+ noWriteAccess: "You do not have write access to this storage.",
125
+ unsupported: "Folder creation is not supported for this storage.",
126
+ validation: {
127
+ reserved: "The folder name cannot be . or ..",
128
+ separator: "Folder names cannot include / or \\.",
129
+ exists: "An item with this name already exists."
130
+ }
131
+ },
132
+ readOnly: "Read-only",
133
+ cors: {
134
+ explanation: {
135
+ title: "CORS Configuration Required",
136
+ description: "This storage location cannot be accessed from the browser because it is missing Cross-Origin Resource Sharing (CORS) rules.",
137
+ action: "You can automatically configure these rules to allow access from this domain.",
138
+ note: "Note: Changes may take up to 30 seconds to propagate."
139
+ },
140
+ actions: {
141
+ retry: "Retry Connection",
142
+ addRules: "Add CORS Rules"
143
+ },
144
+ propagating: {
145
+ title: "Propagating CORS rules",
146
+ description: "Azure is rolling out the new rules to its storage endpoints. This usually completes within a minute.",
147
+ stages: {
148
+ submitted: "Submitted",
149
+ propagating: "Propagating",
150
+ verified: "Verified"
151
+ },
152
+ telemetry: { probing: "probing every 3s" }
153
+ }
154
+ },
155
+ selectedCount: (count) => `${count} selected`,
156
+ loadingMore: "Loading more items…",
157
+ loadMore: "Load more",
158
+ retry: "Retry",
159
+ partialCount: (count) => `${count.toLocaleString()}+ items`,
160
+ notFound: {
161
+ title: (name) => `Couldn't find ${name}`,
162
+ description: "It may have been moved or deleted, or it may sit further into a folder than we have listed.",
163
+ retry: "Try again"
164
+ },
165
+ treeMoreCount: (count) => `${count.toLocaleString()} more`,
166
+ treeMoreCountPartial: (count) => `${count.toLocaleString()}+ more`,
167
+ messages: {
168
+ noWriteAccess: "You do not have write access to this storage.",
169
+ uploadsUnsupported: "Uploads are not supported for this storage.",
170
+ noFilesForDownload: "No files selected for download.",
171
+ downloadLinkFailed: "Failed to generate download link",
172
+ fileLinkFailed: "Failed to generate file link",
173
+ fileLinkCopied: "File link copied to clipboard",
174
+ noUri: "No URI available for this file.",
175
+ uriCopied: "URI copied to clipboard",
176
+ uriCopyFailed: "Failed to copy URI",
177
+ storageUnavailable: "This storage is not available at the moment. Please try again later.",
178
+ waitForCurrentUpload: "Please wait for the current upload to finish before starting a new one.",
179
+ waitForUpload: "Please wait for the upload to finish.",
180
+ downloadUnsupported: "Download is not supported for this storage at the moment. Please check back later.",
181
+ sharingUnsupported: "Sharing is not supported for this storage at the moment. Please check back later.",
182
+ deleteUnsupported: "Delete is not supported for this storage at the moment. Please check back later.",
183
+ uploadUnsupported: "Upload is not supported for this storage at the moment. Please check back later.",
184
+ noItemsForDeletion: "No items selected for deletion.",
185
+ deleting: "Deleting item(s) from storage...",
186
+ deleteSomeFailed: "Failed to delete one or more items. Please try again.",
187
+ deleteSuccess: "Deleted item(s) from storage successfully!",
188
+ deleteFailed: (message) => `Failed to delete item(s): ${message}`,
189
+ noFilesToUpload: "No files to upload or target path not selected.",
190
+ invalidUploadTarget: "This target path is not valid for upload.",
191
+ uploadInitFailed: "Failed to initialize upload session. Please try again.",
192
+ uploadQueuedInfo: "Another upload is in progress. This upload will be added to the queue and handled once the previous upload finishes.",
193
+ connectFailed: "Failed to connect to storage provider. Please check your storage settings and try again.",
194
+ corsNoStorage: "No storage selected",
195
+ corsAdded: "CORS rules added successfully",
196
+ corsPropagating: "CORS rules were added, but are still propagating. Try again in a moment."
197
+ },
198
+ chrome: {
199
+ explorer: "Explorer",
200
+ refresh: "Refresh",
201
+ collapse: "Collapse",
202
+ upload: "Upload",
203
+ download: "Download",
204
+ access: "Access",
205
+ manageAccess: "Manage Access",
206
+ delete: "Delete",
207
+ copyToClipboard: "Copy to clipboard",
208
+ selectAll: "Select all",
209
+ name: "Name",
210
+ size: "Size",
211
+ created: "Created",
212
+ hash: "Hash",
213
+ storageIconAlt: "An icon for the storage"
214
+ },
215
+ confirmUpload: {
216
+ title: "Confirm Upload",
217
+ text: (path) => `Please confirm the following objects you want to upload to ${path}.`,
218
+ defaultPath: "the selected path",
219
+ noPath: "No path selected",
220
+ confirm: "Confirm",
221
+ target: "Target:",
222
+ totalSize: "Total Size:",
223
+ sizeLimitTitle: "Upload Size Limit Exceeded",
224
+ sizeLimitBody: (total, max) => `The total upload size (${total}) exceeds the maximum allowed limit of ${max}.`,
225
+ sizeLimitHint: "Please reduce the number of files or upload them in smaller batches."
226
+ },
227
+ confirmDelete: {
228
+ title: "Confirm Delete",
229
+ text: "Are you sure you want to delete the following item(s)? Folders are deleted with everything inside them. This action cannot be undone.",
230
+ action: "Delete"
231
+ },
232
+ empty: {
233
+ nothingSelected: "Nothing selected",
234
+ nothingSelectedHint: "Pick a folder or file from the tree to see its contents.",
235
+ folderEmpty: "This folder is empty",
236
+ dropHint: "Drag files or a folder here to upload.",
237
+ readOnlyHint: "You have read-only access to this storage.",
238
+ connectionIssue: "Connection issue",
239
+ tryAgain: "Try again",
240
+ shareThisFile: "Share this file"
241
+ },
242
+ upload: {
243
+ inQueue: (position, total) => `In Queue (#${position} of ${total})`,
244
+ queuedShort: (position, total) => `Queued #${position} / ${total}`,
245
+ destination: "Destination:",
246
+ eta: "ETA:",
247
+ uploading: "Uploading...",
248
+ completeTitle: "Upload Complete!",
249
+ completeShort: "Completed",
250
+ failedTitle: "Upload Failed",
251
+ failedShort: "Failed",
252
+ unknownTitle: "Unknown Status",
253
+ unknownShort: "Unknown",
254
+ cancelled: "Cancelled",
255
+ completed: "Completed",
256
+ failed: "Failed",
257
+ totalSize: "Total size:",
258
+ size: "Size:",
259
+ calculating: "Calculating...",
260
+ expandDetails: "Expand details",
261
+ minimizeDetails: "Minimize details",
262
+ sessionNotQueued: (id, status) => `Upload session with ID ${id} is not queued, current status is ${status}`,
263
+ allCancelled: (count) => `All ${count} file(s) were cancelled by user.`,
264
+ someUploaded: (count) => `${count} file(s) uploaded successfully!`,
265
+ someCancelled: (count) => `${count} file(s) cancelled by user.`,
266
+ allUploaded: "Upload file(s) successfully!",
267
+ failedSummary: (failed, total) => `${failed}/${total} files failed to upload:`,
268
+ failReasonGeneric: "The file(s) may be too large or the connection may have been interrupted.",
269
+ refreshFailed: (name, message) => `Failed to refresh storage data for ${name}. ${message}. Please try again.`,
270
+ unknownError: "Unknown error",
271
+ overallProgress: "Overall Progress"
272
+ }
273
+ },
274
+ form: {
275
+ invalidDuration: "Enter a duration as DD-HH:MM:SS or HH:MM:SS.",
276
+ durationOutOfRange: (min, max) => `Must be between ${min} and ${max}.`,
277
+ durationBelowMin: (min) => `Must be at least ${min}.`,
278
+ readOnly: "Read-only",
279
+ readWrite: "Read-write",
280
+ readOnlyDescription: "Read-only mounts can list and download objects, but cannot upload, modify, or delete them.",
281
+ readOnlyForced: "Your access to this bucket is read-only, so this mount cannot be writable."
282
+ },
283
+ list: {
284
+ copy: (label) => `Copy ${label}`,
285
+ copied: (label) => `Copied ${label}`,
286
+ couldntCopy: (label) => `Couldn't copy ${label}`,
287
+ moreActions: "More actions",
288
+ labelName: "name",
289
+ labelEmail: "email",
290
+ labelUsername: "username",
291
+ labelUid: "UID",
292
+ labelId: "ID",
293
+ labelUrl: "URL",
294
+ couldNotLoad: (noun) => `Couldn't load ${noun}`
295
+ }
296
+ },
297
+ navigation: {
298
+ toWorkflow: () => {},
299
+ toMarketItem: () => {},
300
+ openExternal: (href) => window.open(href, "_blank")
301
+ },
302
+ data: { useRunFile: defaultUseRunFile },
303
+ slots: {}
304
+ };
305
+ var UIContext = createContext(DEFAULTS);
306
+ function useNotify() {
307
+ return useContext(UIContext).notify;
308
+ }
309
+ function useStrings() {
310
+ return useContext(UIContext).strings;
311
+ }
312
+ function useNavigation() {
313
+ return useContext(UIContext).navigation;
314
+ }
315
+ function useSlots() {
316
+ return useContext(UIContext).slots;
317
+ }
318
+ function useWorkflowJsonResolver() {
319
+ return useContext(UIContext).data.resolveWorkflowJson;
320
+ }
321
+ function useProvisionCorsRules() {
322
+ return useContext(UIContext).data.provisionCorsRules;
323
+ }
324
+ function useRunFile(slug, path, options) {
325
+ const { useRunFile: boundUseRunFile } = useContext(UIContext).data;
326
+ return boundUseRunFile(slug, path, options);
327
+ }
328
+ function UIProvider({ notify, strings, navigation, data, slots, children }) {
329
+ const value = useMemo(() => ({
330
+ notify: {
331
+ ...DEFAULTS.notify,
332
+ ...notify
333
+ },
334
+ strings: {
335
+ loading: strings?.loading ?? DEFAULTS.strings.loading,
336
+ common: {
337
+ ...DEFAULTS.strings.common,
338
+ ...strings?.common
339
+ },
340
+ dropdown: {
341
+ ...DEFAULTS.strings.dropdown,
342
+ ...strings?.dropdown
343
+ },
344
+ logviewer: {
345
+ ...DEFAULTS.strings.logviewer,
346
+ ...strings?.logviewer
347
+ },
348
+ dag: {
349
+ ...DEFAULTS.strings.dag,
350
+ ...strings?.dag
351
+ },
352
+ jobActions: {
353
+ ...DEFAULTS.strings.jobActions,
354
+ ...strings?.jobActions
355
+ },
356
+ fileExplorer: {
357
+ ...DEFAULTS.strings.fileExplorer,
358
+ ...strings?.fileExplorer
359
+ },
360
+ form: {
361
+ ...DEFAULTS.strings.form,
362
+ ...strings?.form
363
+ },
364
+ list: {
365
+ ...DEFAULTS.strings.list,
366
+ ...strings?.list
367
+ }
368
+ },
369
+ navigation: {
370
+ ...DEFAULTS.navigation,
371
+ ...navigation
372
+ },
373
+ data: {
374
+ ...DEFAULTS.data,
375
+ ...data
376
+ },
377
+ slots: slots ?? DEFAULTS.slots
378
+ }), [
379
+ notify,
380
+ strings,
381
+ navigation,
382
+ data,
383
+ slots
384
+ ]);
385
+ return /* @__PURE__ */ jsx(UIContext.Provider, {
386
+ value,
387
+ children
388
+ });
389
+ }
390
+ //#endregion
391
+ export { useProvisionCorsRules as a, useStrings as c, useNotify as i, useWorkflowJsonResolver as l, useLink as n, useRunFile as o, useNavigation as r, useSlots as s, UIProvider as t };
@@ -0,0 +1,46 @@
1
+ import cx from "classnames";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ //#region src/components/StatusBadge.tsx
4
+ var variantStyles = {
5
+ default: "bg-(--theme-muted-panel-bg) text-(--theme-app) border-(--theme-border)",
6
+ success: "bg-emerald-500/10 text-emerald-500 border-emerald-500/20",
7
+ warning: "bg-amber-500/10 text-amber-500 border-amber-500/20",
8
+ error: "bg-red-500/10 text-red-500 border-red-500/20",
9
+ info: "bg-blue-500/10 text-blue-500 border-blue-500/20",
10
+ muted: "bg-(--theme-muted-panel-bg)/50 text-(--theme-muted-text-color) border-(--theme-border)"
11
+ };
12
+ var pulseColors = {
13
+ default: "bg-(--theme-app)",
14
+ success: "bg-emerald-500",
15
+ warning: "bg-amber-500",
16
+ error: "bg-red-500",
17
+ info: "bg-blue-500",
18
+ muted: "bg-(--theme-muted-text-color)"
19
+ };
20
+ function StatusBadge({ children, variant = "default", pulse = false, size = "sm", className }) {
21
+ return /* @__PURE__ */ jsxs("span", {
22
+ className: cx("inline-flex items-center gap-1.5 rounded-full border font-medium", size === "sm" && "px-2 py-0.5 text-[10px]", size === "md" && "px-2.5 py-1 text-xs", variantStyles[variant], className),
23
+ children: [pulse && /* @__PURE__ */ jsxs("span", {
24
+ className: "relative flex h-2 w-2",
25
+ children: [/* @__PURE__ */ jsx("span", { className: cx("absolute inline-flex h-full w-full animate-ping rounded-full opacity-75", pulseColors[variant]) }), /* @__PURE__ */ jsx("span", { className: cx("relative inline-flex h-2 w-2 rounded-full", pulseColors[variant]) })]
26
+ }), children]
27
+ });
28
+ }
29
+ function StatusDot({ variant = "default", pulse = false, size = 8, className }) {
30
+ return /* @__PURE__ */ jsxs("span", {
31
+ className: cx("relative inline-flex", className),
32
+ style: {
33
+ width: size,
34
+ height: size
35
+ },
36
+ children: [pulse && /* @__PURE__ */ jsx("span", { className: cx("absolute inline-flex h-full w-full animate-ping rounded-full opacity-75", pulseColors[variant]) }), /* @__PURE__ */ jsx("span", {
37
+ className: cx("relative inline-flex rounded-full", pulseColors[variant]),
38
+ style: {
39
+ width: size,
40
+ height: size
41
+ }
42
+ })]
43
+ });
44
+ }
45
+ //#endregion
46
+ export { StatusDot as n, StatusBadge as t };