@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,17 @@
1
+ interface ICopyToClipboardProps {
2
+ as?: 'div' | 'button';
3
+ text: string;
4
+ className?: string;
5
+ children?: React.ReactNode;
6
+ showIcon?: boolean;
7
+ }
8
+ export default function CopyToClipboard({ as, text, className, children, showIcon, }: ICopyToClipboardProps): import("react").JSX.Element;
9
+ interface CopyCodeBlockProps {
10
+ textToCopy: string;
11
+ children: React.ReactNode;
12
+ secret?: boolean;
13
+ isRevealed?: boolean;
14
+ onRevealToggle?: () => void;
15
+ }
16
+ export declare function CopyCodeBlock({ textToCopy, children, secret, isRevealed, onRevealToggle, }: CopyCodeBlockProps): import("react").JSX.Element;
17
+ export {};
@@ -0,0 +1,24 @@
1
+ import { type SetStateAction } from 'react';
2
+ import { type IOptions, type ICategory } from './dropdownUtils.js';
3
+ export interface IProps {
4
+ options: (ICategory | IOptions | string)[];
5
+ onActiveChange?: (option: unknown) => void;
6
+ onChange: React.Dispatch<SetStateAction<unknown>>;
7
+ onRangeChange?: (range: {
8
+ min: number;
9
+ max: number;
10
+ }) => void;
11
+ value: IOptions | string | Record<string, unknown>;
12
+ id?: string;
13
+ ariaLabel?: string;
14
+ className?: string;
15
+ wrapperClassName?: string;
16
+ textBoxClassName?: string;
17
+ disabled?: boolean;
18
+ placeholder?: string;
19
+ loading?: boolean;
20
+ allowCustomValue?: boolean;
21
+ customValueLabel?: string;
22
+ portalEl?: HTMLElement;
23
+ }
24
+ export default function Dropdown(props: IProps): import("react").JSX.Element;
@@ -0,0 +1,4 @@
1
+ import type { TStatus } from '@parallelworks/workflow-parser';
2
+ export declare function Indicator({ status }: {
3
+ status: TStatus;
4
+ }): import("react").JSX.Element;
@@ -0,0 +1,18 @@
1
+ interface ICustomListboxProps {
2
+ /** Only used visually to inform what you're selecting */
3
+ type: string;
4
+ options: {
5
+ label: string;
6
+ secondaryLabel?: string;
7
+ icon?: React.ReactNode;
8
+ value: any;
9
+ selected: boolean;
10
+ }[];
11
+ closeOnSelect?: boolean;
12
+ allowSearch?: boolean;
13
+ handleOptionSelected: (value: any) => void;
14
+ className?: string;
15
+ invalid?: boolean;
16
+ }
17
+ export default function CustomListbox({ options, handleOptionSelected, type, allowSearch, closeOnSelect, className, invalid, }: ICustomListboxProps): import("react").JSX.Element;
18
+ export {};
@@ -0,0 +1,7 @@
1
+ import type { ControlsConfig } from 'streamdown';
2
+ export interface MarkdownProps {
3
+ children: string;
4
+ isStreaming?: boolean;
5
+ controls?: ControlsConfig;
6
+ }
7
+ export default function Markdown(props: MarkdownProps): import("react").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import type { MarkdownProps } from './Markdown.js';
2
+ export default function Markdown({ children, isStreaming, controls, }: MarkdownProps): import("react").JSX.Element;
@@ -0,0 +1,19 @@
1
+ import { type ICategory, type IOptions } from './dropdownUtils.js';
2
+ type MultiSelectDropdownProps<T = string> = {
3
+ options: (ICategory<T> | IOptions<T> | string)[];
4
+ value: T[];
5
+ onChange: (next: T[]) => void;
6
+ id?: string;
7
+ className?: string;
8
+ wrapperClassName?: string;
9
+ textBoxClassName?: string;
10
+ disabled?: boolean;
11
+ placeholder?: string;
12
+ loading?: boolean;
13
+ searchable?: boolean;
14
+ maxTagCount?: number;
15
+ /** Custom comparator for object values. Defaults to strict equality. */
16
+ compareBy?: (a: T, b: T) => boolean;
17
+ };
18
+ export default function MultiSelectDropdown<T = string>({ options, value, onChange, id, className, wrapperClassName, textBoxClassName, disabled, placeholder, loading, searchable, maxTagCount, compareBy, }: MultiSelectDropdownProps<T>): import("react").JSX.Element;
19
+ export {};
@@ -0,0 +1,12 @@
1
+ export declare function Overview({ Icon, name, type, children, right, className, loading, iconSize, }: {
2
+ Icon: React.ReactNode;
3
+ name: string | React.ReactNode;
4
+ type?: string | React.ReactNode;
5
+ children?: React.ReactNode;
6
+ /** Right-aligned content on the header row (e.g. a detail-page action bar),
7
+ * vertically centered against the name block. */
8
+ right?: React.ReactNode;
9
+ className?: string;
10
+ loading?: boolean;
11
+ iconSize?: number;
12
+ }): import("react").JSX.Element;
@@ -0,0 +1,438 @@
1
+ import type { ReactNode } from 'react';
2
+ export type UIToastId = string | number;
3
+ export interface UIToastOptions {
4
+ toastId?: UIToastId;
5
+ /** false hides the default icon. */
6
+ icon?: false;
7
+ closeButton?: boolean;
8
+ autoClose?: number | false;
9
+ }
10
+ export interface UIToastUpdate {
11
+ render?: ReactNode;
12
+ type?: 'info' | 'success' | 'warning' | 'error';
13
+ /** false or null hides the icon. */
14
+ icon?: false | null;
15
+ isLoading?: boolean;
16
+ closeButton?: boolean | null;
17
+ autoClose?: number | false | null;
18
+ }
19
+ export interface UINotify {
20
+ info: (message: string) => void;
21
+ success: (message: string) => void;
22
+ warning: (message: string) => void;
23
+ error: (message: string) => void;
24
+ /** Persistent spinner toast; drive it with update/dismiss via the returned id. */
25
+ loading: (content: ReactNode, options?: UIToastOptions) => UIToastId;
26
+ update: (id: UIToastId, update: UIToastUpdate) => void;
27
+ /** Without an id, dismisses every open toast. */
28
+ dismiss: (id?: UIToastId) => void;
29
+ }
30
+ export interface UIStrings {
31
+ loading: string;
32
+ common: {
33
+ copy: string;
34
+ copied: string;
35
+ copyFailed: string;
36
+ showHiddenFields: string;
37
+ showHiddenFieldsHint: string;
38
+ jsonHasErrors: string;
39
+ };
40
+ dropdown: {
41
+ select: (type: string) => string;
42
+ noOptionsFound: string;
43
+ };
44
+ logviewer: {
45
+ error: string;
46
+ warning: string;
47
+ notice: string;
48
+ top: string;
49
+ clearSelection: string;
50
+ copyLines: (count: number) => string;
51
+ copyAll: string;
52
+ hideDebug: string;
53
+ showDebug: string;
54
+ filterLogs: string;
55
+ download: string;
56
+ };
57
+ dag: {
58
+ workflow: string;
59
+ run: string;
60
+ status: string;
61
+ runtime: string;
62
+ submitted: string;
63
+ expandAll: string;
64
+ collapseAll: string;
65
+ statusLabel: (status: string) => string;
66
+ statusReason: (reason: string | undefined | null) => string | undefined;
67
+ };
68
+ jobActions: {
69
+ openSubworkflowLogs: string;
70
+ openOriginalWorkflow: string;
71
+ openInNewGraph: string;
72
+ };
73
+ fileExplorer: {
74
+ preview: {
75
+ shareFile: string;
76
+ open: string;
77
+ userType: string;
78
+ select: (name: string) => string;
79
+ viewDetails: string;
80
+ openFolder: string;
81
+ delete: string;
82
+ detailsTab: string;
83
+ previewTab: string;
84
+ preview: string;
85
+ openFullPreview: string;
86
+ quickLook: string;
87
+ fullWindow: string;
88
+ streamed: string;
89
+ streamedTooltip: string;
90
+ loading: string;
91
+ linkError: string;
92
+ errorTitle: string;
93
+ previewError: string;
94
+ tooLarge: string;
95
+ downloadInstead: string;
96
+ archiveTitle: string;
97
+ archiveMessage: string;
98
+ unsupportedTitle: string;
99
+ unsupportedMessage: string;
100
+ notebookParseError: string;
101
+ copyUri: string;
102
+ download: string;
103
+ close: string;
104
+ zoomIn: string;
105
+ zoomOut: string;
106
+ previousFile: string;
107
+ nextFile: string;
108
+ csvRows: (count: number, columns: number) => string;
109
+ csvFirstRows: (count: number, columns: number) => string;
110
+ head: string;
111
+ tail: string;
112
+ firstLines: (count: number) => string;
113
+ lastLines: (count: number) => string;
114
+ notebookOutput: string;
115
+ };
116
+ createFolder: {
117
+ action: string;
118
+ submit: string;
119
+ creating: string;
120
+ folder: string;
121
+ namePlaceholder: string;
122
+ success: (name: string) => string;
123
+ error: (message: string) => string;
124
+ invalidTarget: string;
125
+ noWriteAccess: string;
126
+ unsupported: string;
127
+ validation: {
128
+ reserved: string;
129
+ separator: string;
130
+ exists: string;
131
+ };
132
+ };
133
+ readOnly: string;
134
+ cors: {
135
+ explanation: {
136
+ title: string;
137
+ description: string;
138
+ action: string;
139
+ note: string;
140
+ };
141
+ actions: {
142
+ retry: string;
143
+ addRules: string;
144
+ };
145
+ propagating: {
146
+ title: string;
147
+ description: string;
148
+ stages: {
149
+ submitted: string;
150
+ propagating: string;
151
+ verified: string;
152
+ };
153
+ telemetry: {
154
+ probing: string;
155
+ };
156
+ };
157
+ };
158
+ selectedCount: (count: number) => string;
159
+ loadingMore: string;
160
+ loadMore: string;
161
+ retry: string;
162
+ partialCount: (count: number) => string;
163
+ notFound: {
164
+ title: (name: string) => string;
165
+ description: string;
166
+ retry: string;
167
+ };
168
+ treeMoreCount: (count: number) => string;
169
+ treeMoreCountPartial: (count: number) => string;
170
+ messages: {
171
+ noWriteAccess: string;
172
+ uploadsUnsupported: string;
173
+ noFilesForDownload: string;
174
+ downloadLinkFailed: string;
175
+ fileLinkFailed: string;
176
+ fileLinkCopied: string;
177
+ noUri: string;
178
+ uriCopied: string;
179
+ uriCopyFailed: string;
180
+ storageUnavailable: string;
181
+ waitForCurrentUpload: string;
182
+ waitForUpload: string;
183
+ downloadUnsupported: string;
184
+ sharingUnsupported: string;
185
+ deleteUnsupported: string;
186
+ uploadUnsupported: string;
187
+ noItemsForDeletion: string;
188
+ deleting: string;
189
+ deleteSomeFailed: string;
190
+ deleteSuccess: string;
191
+ deleteFailed: (message: string) => string;
192
+ noFilesToUpload: string;
193
+ invalidUploadTarget: string;
194
+ uploadInitFailed: string;
195
+ uploadQueuedInfo: string;
196
+ connectFailed: string;
197
+ corsNoStorage: string;
198
+ corsAdded: string;
199
+ corsPropagating: string;
200
+ };
201
+ chrome: {
202
+ explorer: string;
203
+ refresh: string;
204
+ collapse: string;
205
+ upload: string;
206
+ download: string;
207
+ access: string;
208
+ manageAccess: string;
209
+ delete: string;
210
+ copyToClipboard: string;
211
+ selectAll: string;
212
+ name: string;
213
+ size: string;
214
+ created: string;
215
+ hash: string;
216
+ storageIconAlt: string;
217
+ };
218
+ confirmUpload: {
219
+ title: string;
220
+ text: (path: string) => string;
221
+ defaultPath: string;
222
+ noPath: string;
223
+ confirm: string;
224
+ target: string;
225
+ totalSize: string;
226
+ sizeLimitTitle: string;
227
+ sizeLimitBody: (total: string, max: string) => string;
228
+ sizeLimitHint: string;
229
+ };
230
+ confirmDelete: {
231
+ title: string;
232
+ text: string;
233
+ action: string;
234
+ };
235
+ empty: {
236
+ nothingSelected: string;
237
+ nothingSelectedHint: string;
238
+ folderEmpty: string;
239
+ dropHint: string;
240
+ readOnlyHint: string;
241
+ connectionIssue: string;
242
+ tryAgain: string;
243
+ shareThisFile: string;
244
+ };
245
+ upload: {
246
+ inQueue: (position: number, total: number) => string;
247
+ queuedShort: (position: number, total: number) => string;
248
+ destination: string;
249
+ eta: string;
250
+ uploading: string;
251
+ completeTitle: string;
252
+ completeShort: string;
253
+ failedTitle: string;
254
+ failedShort: string;
255
+ unknownTitle: string;
256
+ unknownShort: string;
257
+ cancelled: string;
258
+ completed: string;
259
+ failed: string;
260
+ totalSize: string;
261
+ size: string;
262
+ calculating: string;
263
+ expandDetails: string;
264
+ minimizeDetails: string;
265
+ sessionNotQueued: (id: string, status: string) => string;
266
+ allCancelled: (count: number) => string;
267
+ someUploaded: (count: number) => string;
268
+ someCancelled: (count: number) => string;
269
+ allUploaded: string;
270
+ failedSummary: (failed: number, total: number) => string;
271
+ failReasonGeneric: string;
272
+ refreshFailed: (name: string, message: string) => string;
273
+ unknownError: string;
274
+ overallProgress: string;
275
+ };
276
+ };
277
+ form: {
278
+ invalidDuration: string;
279
+ durationOutOfRange: (min: string, max: string) => string;
280
+ durationBelowMin: (min: string) => string;
281
+ readOnly: string;
282
+ readWrite: string;
283
+ readOnlyDescription: string;
284
+ readOnlyForced: string;
285
+ };
286
+ list: {
287
+ copy: (label: string) => string;
288
+ copied: (label: string) => string;
289
+ couldntCopy: (label: string) => string;
290
+ moreActions: string;
291
+ labelName: string;
292
+ labelEmail: string;
293
+ labelUsername: string;
294
+ labelUid: string;
295
+ labelId: string;
296
+ labelUrl: string;
297
+ couldNotLoad: (noun: string) => string;
298
+ };
299
+ }
300
+ export interface UINavigation {
301
+ toWorkflow: (name: string) => void;
302
+ toMarketItem: (name: string) => void;
303
+ openExternal: (href: string) => void;
304
+ }
305
+ export type WorkflowJsonRef = {
306
+ kind: 'marketplace';
307
+ slug: string;
308
+ version: string;
309
+ } | {
310
+ kind: 'workflow';
311
+ name: string;
312
+ };
313
+ export interface RunFileResult {
314
+ data: string | undefined;
315
+ isLoading: boolean;
316
+ error: unknown;
317
+ }
318
+ export interface UIData {
319
+ /**
320
+ * Host-bound hook resolving a file in a run's artifact tree (logs, scripts).
321
+ * A null path skips fetching; refreshInterval polls while set. Must be a
322
+ * stable function reference — components call it as a hook.
323
+ */
324
+ useRunFile: (slug: string, path: string | null, options?: {
325
+ refreshInterval?: number;
326
+ }) => RunFileResult;
327
+ /**
328
+ * Resolves a workflow reference to its parsed JSON definition, for the YAML
329
+ * editor's input completion. Absent, that completion silently no-ops.
330
+ */
331
+ resolveWorkflowJson?: (ref: WorkflowJsonRef) => Promise<unknown>;
332
+ /**
333
+ * Provisions browser-access CORS rules on a storage. Absent, the storage
334
+ * explorer hides its "add CORS rules" affordance.
335
+ */
336
+ provisionCorsRules?: (args: {
337
+ csp: string;
338
+ type?: string;
339
+ username: string;
340
+ storageName: string;
341
+ }) => Promise<{
342
+ error?: string;
343
+ }>;
344
+ }
345
+ import type { FieldComponent } from '../form/fieldRegistry.js';
346
+ /** Renders internal navigation; hosts bind their router's Link. */
347
+ export type UILinkComponent = React.ComponentType<{
348
+ to: string;
349
+ onClick?: () => void;
350
+ className?: string;
351
+ children: ReactNode;
352
+ }>;
353
+ /** The provider's link slot, with a plain anchor fallback. */
354
+ export declare function useLink(): UILinkComponent;
355
+ export interface UISlots {
356
+ /** Internal navigation links; absent falls back to a plain anchor. */
357
+ link?: UILinkComponent;
358
+ /**
359
+ * Host-supplied form field components, merged over the form engine's core
360
+ * registry by field type. Lazy components are supported — the registry
361
+ * renders fields inside a Suspense boundary.
362
+ */
363
+ formFields?: Record<string, FieldComponent>;
364
+ /** Sessions block for a run's sidebar; absent hides the section. */
365
+ runSessions?: (args: {
366
+ runId: string;
367
+ runNumber: number;
368
+ runActive: boolean;
369
+ }) => ReactNode;
370
+ /** Rich read-only YAML viewer; absent falls back to a plain <pre>. */
371
+ yamlViewer?: (args: {
372
+ value: string;
373
+ height: number;
374
+ width: number;
375
+ contentKey: string;
376
+ }) => ReactNode;
377
+ /** Icon for a subworkflow step; absent hides icon-bound affordances. */
378
+ workflowIcon?: (args: {
379
+ image?: string;
380
+ type?: string;
381
+ className?: string;
382
+ }) => ReactNode;
383
+ /** Icon URL for a storage type; absent falls back to a generic disk icon.
384
+ * Scheme-dependent variants are the host's concern — bind with the host's
385
+ * own theme state. */
386
+ storageIconUrl?: (args: {
387
+ type: string;
388
+ }) => string | undefined;
389
+ /**
390
+ * The storage explorer's access-management drawer; absent hides the
391
+ * affordance. `storage` and `groups` are the host's own objects passed back
392
+ * through the explorer opaquely.
393
+ */
394
+ accessDrawer?: (args: {
395
+ open: boolean;
396
+ setOpen: (open: boolean) => void;
397
+ storage: unknown;
398
+ groups?: unknown;
399
+ }) => ReactNode;
400
+ /** The storage explorer's create-folder dialog; absent hides the affordance. */
401
+ createFolderDialog?: (args: {
402
+ open: boolean;
403
+ onClose: () => void;
404
+ typeIcon?: ReactNode;
405
+ typeLabel: string;
406
+ namePlaceholder: string;
407
+ submitLabel: string;
408
+ submittingLabel: string;
409
+ validateName: (name: string) => string | null;
410
+ onSubmit: (name: string) => Promise<boolean>;
411
+ }) => ReactNode;
412
+ }
413
+ export interface UIProviderValue {
414
+ notify: UINotify;
415
+ strings: UIStrings;
416
+ navigation: UINavigation;
417
+ data: UIData;
418
+ slots: UISlots;
419
+ }
420
+ export declare function useNotify(): UINotify;
421
+ export declare function useStrings(): UIStrings;
422
+ export declare function useNavigation(): UINavigation;
423
+ export declare function useSlots(): UISlots;
424
+ export declare function useWorkflowJsonResolver(): ((ref: WorkflowJsonRef) => Promise<unknown>) | undefined;
425
+ export declare function useProvisionCorsRules(): UIData['provisionCorsRules'];
426
+ export declare function useRunFile(slug: string, path: string | null, options?: {
427
+ refreshInterval?: number;
428
+ }): RunFileResult;
429
+ export declare function UIProvider({ notify, strings, navigation, data, slots, children, }: {
430
+ notify?: Partial<UINotify>;
431
+ strings?: {
432
+ [G in keyof UIStrings]?: UIStrings[G] extends object ? Partial<UIStrings[G]> : UIStrings[G];
433
+ };
434
+ navigation?: Partial<UINavigation>;
435
+ data?: Partial<UIData>;
436
+ slots?: UISlots;
437
+ children: React.ReactNode;
438
+ }): import("react").JSX.Element;
@@ -0,0 +1,6 @@
1
+ interface ISectionHeaderProps {
2
+ className?: string;
3
+ children: React.ReactNode;
4
+ }
5
+ export default function SectionHeader({ children, className, }: ISectionHeaderProps): import("react").JSX.Element;
6
+ export {};
@@ -0,0 +1,12 @@
1
+ interface IToggleProps {
2
+ onChange: (value: boolean) => void;
3
+ value?: boolean;
4
+ /** Display label for the on/off positions; defaults to Yes/No. */
5
+ yesLabel?: string;
6
+ noLabel?: string;
7
+ disabled?: boolean;
8
+ datatip?: string;
9
+ invalid?: boolean;
10
+ }
11
+ declare function SwitchToggle({ onChange, value, yesLabel, noLabel, disabled, datatip, invalid, }: IToggleProps): import("react").JSX.Element;
12
+ export default SwitchToggle;
@@ -0,0 +1,6 @@
1
+ import type React from 'react';
2
+ interface SwitchToggleSmallProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'value'> {
3
+ value?: boolean;
4
+ }
5
+ export default function SwitchToggleSmall({ value, disabled, className, ...buttonProps }: SwitchToggleSmallProps): React.JSX.Element;
6
+ export {};
@@ -0,0 +1,18 @@
1
+ import type React from 'react';
2
+ export interface IOptions<T = unknown> {
3
+ label: string;
4
+ value: T;
5
+ secondaryValue?: unknown;
6
+ disabled?: boolean;
7
+ icon?: React.ReactNode;
8
+ description?: string;
9
+ }
10
+ export interface ICategory<T = unknown> {
11
+ category?: string;
12
+ options: IOptions<T>[];
13
+ }
14
+ export declare function isCategory<T>(option: ICategory<T> | IOptions<T> | string): option is ICategory<T>;
15
+ export declare function isOption<T>(option: ICategory<T> | IOptions<T> | string): option is IOptions<T>;
16
+ export declare function flattenOptions<T>(options: (ICategory<T> | IOptions<T> | string)[]): (IOptions<T> | ICategory<T>)[];
17
+ export declare function filterOption<T>(option: IOptions<T>, query: string): boolean;
18
+ export declare function DropdownCaret(): React.JSX.Element;
@@ -0,0 +1,2 @@
1
+ import type { IEditorProps } from './Monaco.js';
2
+ export default function Editor({ ...props }: IEditorProps): import("react").JSX.Element;
@@ -0,0 +1,11 @@
1
+ import type { FieldComponentProps } from '../form/types/fieldComponentTypes.js';
2
+ import type { BaseField } from '../form/types/fieldTypes.js';
3
+ export interface IEditorField extends BaseField {
4
+ type: 'editor';
5
+ default?: string;
6
+ options?: {
7
+ language?: string;
8
+ theme?: string;
9
+ };
10
+ }
11
+ export default function EditorField(props: FieldComponentProps<IEditorField>): import("react").JSX.Element;
@@ -0,0 +1,8 @@
1
+ declare function FormCodePanel({ formJSON, data, mutate, height, disabled, }: {
2
+ formJSON: Record<string, any>;
3
+ data: Record<string, any>;
4
+ mutate: any;
5
+ height?: string;
6
+ disabled?: boolean;
7
+ }): import("react").JSX.Element;
8
+ export default FormCodePanel;
@@ -0,0 +1,31 @@
1
+ import * as monaco from 'monaco-editor';
2
+ export interface EditorMarketplaceItem {
3
+ readonly slug?: string;
4
+ readonly name?: string | null;
5
+ readonly description?: string | null;
6
+ readonly type?: string | null;
7
+ readonly subtype?: string | null;
8
+ readonly versions?: readonly string[] | null;
9
+ }
10
+ export interface EditorWorkflowItem {
11
+ readonly name?: string;
12
+ readonly displayName?: string | null;
13
+ readonly description?: string | null;
14
+ readonly type?: string | null;
15
+ }
16
+ type MarketplaceItem = EditorMarketplaceItem;
17
+ type WorkflowItem = EditorWorkflowItem;
18
+ export type ISchemaError = monaco.editor.IMarker;
19
+ export interface IEditorProps extends monaco.editor.IStandaloneEditorConstructionOptions {
20
+ className?: string;
21
+ disabled?: boolean;
22
+ onChange?: (value: string) => void;
23
+ onValidate?: (errors: any[]) => void;
24
+ width?: string | number;
25
+ height?: string | number;
26
+ path?: 'file:///workflow.yaml' | string;
27
+ marketplaceItems?: MarketplaceItem[];
28
+ workflows?: WorkflowItem[];
29
+ }
30
+ export default function MonacoEditor({ className, disabled, onChange, onValidate, width, height, path, marketplaceItems, workflows, ...options }: IEditorProps): import("react").JSX.Element;
31
+ export {};
@@ -0,0 +1,7 @@
1
+ export { default as Editor } from './Editor.js';
2
+ export { default as EditorField, type IEditorField } from './EditorField.js';
3
+ export { default as FormCodePanel } from './FormCodePanel.js';
4
+ export type { EditorMarketplaceItem, EditorWorkflowItem, IEditorProps, ISchemaError, } from './Monaco.js';
5
+ export { defineEditorThemes, getThemeName } from './themes.js';
6
+ export { setupMonacoWorkers } from './workers.js';
7
+ export { useCssIsDark } from './useCssIsDark.js';
@@ -0,0 +1,2 @@
1
+ import { a as FormCodePanel, i as getThemeName, n as setupMonacoWorkers, o as EditorField, r as defineEditorThemes, s as Editor, t as useCssIsDark } from "../chunks/editor-D55tumuZ.js";
2
+ export { Editor, EditorField, FormCodePanel, defineEditorThemes, getThemeName, setupMonacoWorkers, useCssIsDark };
@@ -0,0 +1,4 @@
1
+ import type * as monaco from 'monaco-editor';
2
+ export declare function expandShorthandHex(color: string): string;
3
+ export declare function defineEditorThemes(monacoEditor: typeof monaco.editor): void;
4
+ export declare function getThemeName(isDark: boolean, disabled?: boolean): string;