@parallelworks/ui 0.77.0 → 0.79.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.
- package/README.md +42 -6
- package/dist/access/AccessDrawer.d.ts +49 -7
- package/dist/access/AccessDrawer.js +243 -38
- package/dist/access/AccessList.d.ts +19 -1
- package/dist/access/AccessList.js +220 -9
- package/dist/access/GrantView.d.ts +3 -1
- package/dist/access/GrantView.js +17 -4
- package/dist/access/PrincipalPicker.js +5 -5
- package/dist/access/focus.js +1 -1
- package/dist/access/index.d.ts +2 -2
- package/dist/access/index.js +2 -2
- package/dist/access/strings.d.ts +25 -1
- package/dist/access/strings.js +27 -3
- package/dist/access/types.d.ts +26 -0
- package/dist/ai/components/AllocationSelector.js +1 -1
- package/dist/ai/components/AttachmentManager.js +5 -5
- package/dist/ai/components/AttachmentUpload.js +2 -2
- package/dist/ai/components/BranchNavigator.js +1 -1
- package/dist/ai/components/ChatActivity.js +1 -1
- package/dist/ai/components/ChatEmptyState.js +3 -3
- package/dist/ai/components/ChatInput.js +3 -5
- package/dist/ai/components/ChatLayout.js +1 -1
- package/dist/ai/components/ChatMessage.js +1 -1
- package/dist/ai/components/ChatMessageList.js +23 -8
- package/dist/ai/components/ChatSidebar.js +3 -3
- package/dist/ai/components/ChatThread.js +4 -4
- package/dist/ai/components/ComposerAddMenu.js +9 -20
- package/dist/ai/components/ModelSelector.js +3 -3
- package/dist/ai/components/PastedText.js +5 -5
- package/dist/ai/components/SessionView.js +1 -1
- package/dist/ai/components/ShareDialog.js +3 -3
- package/dist/ai/components/SlashMenu.d.ts +31 -4
- package/dist/ai/components/SlashMenu.js +36 -63
- package/dist/ai/components/agent/ActivityLine.js +1 -1
- package/dist/ai/components/agent/AgentMessageParts.js +13 -13
- package/dist/ai/components/conversationActions.js +3 -3
- package/dist/ai/core/ChatProvider.js +1 -1
- package/dist/ai/core/config.js +1 -1
- package/dist/ai/ui/ConversationSidebar.js +3 -3
- package/dist/ai/ui/sidebar.js +3 -3
- package/dist/assets/yaml.worker-DOBV2lND.js +884 -0
- package/dist/components/ActionMenu.d.ts +38 -9
- package/dist/components/ActionMenu.js +48 -22
- package/dist/components/Avatar.d.ts +66 -6
- package/dist/components/Avatar.js +130 -18
- package/dist/components/Breadcrumbs.d.ts +4 -0
- package/dist/components/Breadcrumbs.js +26 -10
- package/dist/components/Button.d.ts +3 -2
- package/dist/components/Button.js +11 -1
- package/dist/components/Callout.d.ts +3 -2
- package/dist/components/Callout.js +3 -2
- package/dist/components/Card.d.ts +33 -9
- package/dist/components/Card.js +24 -8
- package/dist/components/Checkbox.d.ts +3 -1
- package/dist/components/Checkbox.js +4 -2
- package/dist/components/ColorInput.js +1 -1
- package/dist/components/Combobox.d.ts +23 -0
- package/dist/components/Combobox.js +252 -86
- package/dist/components/ConfirmModal.d.ts +28 -2
- package/dist/components/ConfirmModal.js +100 -15
- package/dist/components/ContextMenu.d.ts +29 -2
- package/dist/components/ContextMenu.js +60 -8
- package/dist/components/CopyButton.d.ts +21 -8
- package/dist/components/CopyButton.js +29 -9
- package/dist/components/CreateModal.d.ts +20 -4
- package/dist/components/CreateModal.js +28 -17
- package/dist/components/DatePicker.d.ts +31 -1
- package/dist/components/DatePicker.js +178 -47
- package/dist/components/DescriptionList.d.ts +13 -3
- package/dist/components/DescriptionList.js +43 -11
- package/dist/components/Disclosure.d.ts +10 -2
- package/dist/components/Disclosure.js +18 -7
- package/dist/components/Drawer.js +5 -5
- package/dist/components/EmptyState.d.ts +12 -4
- package/dist/components/EmptyState.js +18 -10
- package/dist/components/ErrorPage.d.ts +40 -0
- package/dist/components/ErrorPage.js +101 -0
- package/dist/components/ExternalLink.d.ts +4 -1
- package/dist/components/ExternalLink.js +4 -5
- package/dist/components/Field.d.ts +21 -6
- package/dist/components/Field.js +32 -16
- package/dist/components/FileButton.d.ts +19 -0
- package/dist/components/FileButton.js +32 -0
- package/dist/components/HoverCard.d.ts +26 -6
- package/dist/components/HoverCard.js +11 -5
- package/dist/components/IconButton.js +4 -2
- package/dist/components/InfoTip.js +3 -3
- package/dist/components/Input.d.ts +33 -3
- package/dist/components/Input.js +149 -14
- package/dist/components/Kbd.d.ts +40 -0
- package/dist/components/Kbd.js +168 -0
- package/dist/components/Listbox.d.ts +103 -0
- package/dist/components/Listbox.js +190 -0
- package/dist/components/Loader.d.ts +8 -2
- package/dist/components/Loader.js +16 -1
- package/dist/components/Markdown.js +1 -1
- package/dist/components/MarkdownImpl.js +1 -1
- package/dist/components/Menu.d.ts +20 -2
- package/dist/components/Menu.js +48 -19
- package/dist/components/MenuEntries.d.ts +41 -4
- package/dist/components/MenuEntries.js +266 -39
- package/dist/components/Meter.d.ts +50 -11
- package/dist/components/Meter.js +71 -21
- package/dist/components/Modal.d.ts +9 -3
- package/dist/components/Modal.js +68 -29
- package/dist/components/OneTimeCodeInput.js +1 -1
- package/dist/components/PageHeader.js +111 -7
- package/dist/components/PageHeaderAction.d.ts +8 -3
- package/dist/components/PageHeaderAction.js +122 -34
- package/dist/components/Pagination.d.ts +13 -1
- package/dist/components/Pagination.js +90 -19
- package/dist/components/Popover.d.ts +16 -2
- package/dist/components/Popover.js +20 -21
- package/dist/components/Provider.d.ts +172 -5
- package/dist/components/Provider.js +157 -14
- package/dist/components/RefreshButton.d.ts +13 -6
- package/dist/components/RefreshButton.js +17 -9
- package/dist/components/RunStatusIcon.d.ts +16 -7
- package/dist/components/RunStatusIcon.js +21 -8
- package/dist/components/Section.d.ts +11 -4
- package/dist/components/Section.js +33 -22
- package/dist/components/SegmentedControl.d.ts +16 -3
- package/dist/components/SegmentedControl.js +7 -3
- package/dist/components/Select.d.ts +19 -3
- package/dist/components/Select.js +114 -68
- package/dist/components/SelectionCopy.d.ts +10 -0
- package/dist/components/SelectionCopy.js +105 -0
- package/dist/components/SettingModeOption.js +1 -1
- package/dist/components/SettingsCard.js +1 -1
- package/dist/components/Skeleton.js +1 -1
- package/dist/components/StatusBadge.d.ts +55 -10
- package/dist/components/StatusBadge.js +91 -15
- package/dist/components/StickyBar.js +1 -1
- package/dist/components/Table.d.ts +22 -4
- package/dist/components/Table.js +46 -24
- package/dist/components/Tabs.d.ts +9 -4
- package/dist/components/Tabs.js +9 -4
- package/dist/components/Tag.d.ts +49 -0
- package/dist/components/Tag.js +199 -0
- package/dist/components/ThemeEditor.js +1 -1
- package/dist/components/Toast.js +1 -1
- package/dist/components/ToggleGroup.d.ts +4 -1
- package/dist/components/ToggleGroup.js +30 -13
- package/dist/components/Tooltip.d.ts +9 -3
- package/dist/components/Tooltip.js +55 -39
- package/dist/components/buttonClasses.d.ts +5 -2
- package/dist/components/buttonClasses.js +11 -10
- package/dist/components/chart.d.ts +69 -0
- package/dist/components/chart.js +145 -0
- package/dist/components/comboboxItems.d.ts +7 -1
- package/dist/components/comboboxItems.js +6 -2
- package/dist/components/dismiss.d.ts +5 -1
- package/dist/components/dismiss.js +6 -2
- package/dist/components/floating.d.ts +4 -4
- package/dist/components/floating.js +5 -5
- package/dist/components/headerActionsFit.d.ts +37 -0
- package/dist/components/headerActionsFit.js +81 -0
- package/dist/components/pageHeaderStore.d.ts +3 -0
- package/dist/components/pageHeaderStore.js +3 -0
- package/dist/components/pathBreaks.js +2 -2
- package/dist/components/popupContainer.d.ts +17 -0
- package/dist/components/popupContainer.js +69 -0
- package/dist/components/relativeTime.d.ts +21 -10
- package/dist/components/relativeTime.js +50 -22
- package/dist/components/segmented.d.ts +18 -4
- package/dist/components/segmented.js +48 -6
- package/dist/components/typedDate.d.ts +5 -0
- package/dist/components/typedDate.js +50 -0
- package/dist/components/useClosingValue.d.ts +4 -0
- package/dist/components/useClosingValue.js +12 -0
- package/dist/components/useCopy.d.ts +6 -0
- package/dist/components/useCopy.js +3 -3
- package/dist/components/useNarrow.d.ts +2 -0
- package/dist/components/useNarrow.js +16 -0
- package/dist/editor/Editor.js +1 -1
- package/dist/editor/FormCodePanel.js +1 -1
- package/dist/editor/Monaco.js +1 -1
- package/dist/editor/workers.js +1 -1
- package/dist/file-explorer/FileExplorer.js +16 -15
- package/dist/file-explorer/FileExplorerContext.js +2 -2
- package/dist/file-explorer/FilePreview/Viewer.js +3 -3
- package/dist/file-explorer/FilePreview/index.js +2 -2
- package/dist/file-explorer/FileRowsWindow.js +3 -3
- package/dist/file-explorer/FileTable.js +1 -1
- package/dist/file-explorer/LoadMoreRow.js +1 -1
- package/dist/file-explorer/TreeView.js +5 -5
- package/dist/file-explorer/helpers.js +2 -2
- package/dist/file-explorer/toasts.js +2 -2
- package/dist/form/Fields/CheckboxGroupField.js +1 -1
- package/dist/form/Fields/DropdownField.js +1 -1
- package/dist/form/Fields/DurationField.js +2 -2
- package/dist/form/Fields/MultiDropdownField.js +1 -1
- package/dist/form/Fields/NumberField.js +1 -1
- package/dist/form/Fields/ObjectField.js +1 -1
- package/dist/form/Fields/RangeField.js +1 -1
- package/dist/form/Fields/StringField.js +1 -1
- package/dist/form/Form.js +3 -3
- package/dist/form/FormLayout.js +1 -1
- package/dist/form/Wizard/WizardContainer.js +1 -1
- package/dist/form/Wizard/WizardNavigation.js +1 -1
- package/dist/form/Wizard/WizardStepContent.js +1 -1
- package/dist/form/fieldRegistry.js +1 -1
- package/dist/form/formEditing.js +1 -1
- package/dist/format.d.ts +17 -7
- package/dist/format.js +39 -16
- package/dist/graph/AnnotationBanner.js +2 -2
- package/dist/graph/Connectors.js +5 -5
- package/dist/graph/DependencyGraph.js +10 -9
- package/dist/graph/GraphEditor.js +4 -4
- package/dist/graph/GraphEditorDialogs.js +13 -12
- package/dist/graph/GraphNode.js +1 -1
- package/dist/graph/InputDialog.js +5 -5
- package/dist/graph/InputsEditor.js +10 -9
- package/dist/graph/MatrixGroup.js +2 -2
- package/dist/graph/ProblemPageLink.d.ts +9 -0
- package/dist/graph/ProblemPageLink.js +21 -0
- package/dist/graph/ProblemsButton.js +26 -16
- package/dist/graph/Reveal.js +1 -1
- package/dist/graph/RunWarningsList.js +21 -12
- package/dist/graph/ShortcutsButton.js +25 -8
- package/dist/graph/StepSummaries.js +1 -1
- package/dist/graph/TreeView.js +2 -2
- package/dist/graph/WorkflowSettingsDialog.js +3 -3
- package/dist/graph/editorApi.d.ts +10 -0
- package/dist/graph/editorFields.js +3 -3
- package/dist/graph/editorPrimitives.js +1 -1
- package/dist/graph/editorRows.js +8 -6
- package/dist/graph/editorStrings.d.ts +1 -0
- package/dist/graph/editorStrings.js +1 -0
- package/dist/graph/fieldProblems.js +2 -2
- package/dist/graph/inputRefs.js +7 -6
- package/dist/graph/runWarnings.d.ts +12 -1
- package/dist/graph/stepWith.js +2 -2
- package/dist/index.d.ts +30 -21
- package/dist/index.js +20 -12
- package/dist/list/ActionToolbar.d.ts +4 -0
- package/dist/list/ActionToolbar.js +35 -12
- package/dist/list/ListFilterBar.d.ts +42 -0
- package/dist/list/ListFilterBar.js +789 -0
- package/dist/list/ListPage.d.ts +42 -4
- package/dist/list/ListPage.js +56 -22
- package/dist/list/ListTable.d.ts +27 -3
- package/dist/list/ListTable.js +48 -23
- package/dist/list/ListToolbar.d.ts +31 -0
- package/dist/list/ListToolbar.js +43 -0
- package/dist/list/ListViewControls.d.ts +8 -4
- package/dist/list/ListViewControls.js +22 -14
- package/dist/list/UserHoverCard.d.ts +8 -2
- package/dist/list/UserHoverCard.js +26 -13
- package/dist/list/filterModel.d.ts +122 -0
- package/dist/list/filterModel.js +308 -0
- package/dist/list/index.d.ts +6 -2
- package/dist/list/index.js +6 -2
- package/dist/list/listSearch.d.ts +1 -1
- package/dist/list/listSearch.js +8 -4
- package/dist/list/listView.d.ts +24 -2
- package/dist/list/listView.js +47 -45
- package/dist/list/rowMenu.d.ts +10 -5
- package/dist/list/rowMenu.js +17 -7
- package/dist/list/useListFilters.d.ts +68 -0
- package/dist/list/useListFilters.js +252 -0
- package/dist/logviewer/LogViewer.js +4 -4
- package/dist/styles/theme.css +94 -0
- package/dist/styles.css +1 -1
- package/package.json +11 -11
- package/dist/assets/yaml.worker-k9AdOqzf.js +0 -1441
- package/dist/components/fullscreen.d.ts +0 -4
- package/dist/components/fullscreen.js +0 -18
package/dist/format.d.ts
CHANGED
|
@@ -2,11 +2,16 @@ import { DateTime, Duration } from 'luxon';
|
|
|
2
2
|
/** A size in bytes the way a file list shows it: 512 B, 1.5 KB, 2.25 GB,
|
|
3
3
|
* counting in 1024s. */
|
|
4
4
|
export declare function formatBytes(bytes: number): string;
|
|
5
|
-
/** A count short enough for a status line: 512, 1.2K, 3.4M.
|
|
6
|
-
|
|
5
|
+
/** A count short enough for a status line: 512, 1.2K, 3.4M. `locale`, such
|
|
6
|
+
* as `useLocale()` gives, wins over the browser's. */
|
|
7
|
+
export declare function formatCount(n: number, locale?: string | undefined): string;
|
|
8
|
+
/** A whole number in full, grouped as `locale` groups it: 1,204 or 1.204.
|
|
9
|
+
* `locale`, such as `useLocale()` gives, wins over the browser's. */
|
|
10
|
+
export declare function formatInteger(n: number, locale?: string | undefined): string;
|
|
7
11
|
/** A length of time to whole seconds, in the host's locale: 45s, 2m 13s,
|
|
8
|
-
* 1d 2h. Takes milliseconds or a luxon Duration; the sign is dropped.
|
|
9
|
-
|
|
12
|
+
* 1d 2h. Takes milliseconds or a luxon Duration; the sign is dropped.
|
|
13
|
+
* `locale` wins over the duration's own and luxon's default. */
|
|
14
|
+
export declare function formatDuration(value: number | Duration, locale?: string | undefined): string;
|
|
10
15
|
/** A moment as an ISO string, milliseconds, a Date or a luxon DateTime. */
|
|
11
16
|
export type TimeValue = string | number | Date | DateTime | null | undefined;
|
|
12
17
|
/** The moment `value` names, or null when it is missing or invalid. */
|
|
@@ -16,11 +21,16 @@ declare const DATE_TIME_STYLES: {
|
|
|
16
21
|
readonly short: Intl.DateTimeFormatOptions;
|
|
17
22
|
readonly medium: Intl.DateTimeFormatOptions;
|
|
18
23
|
readonly seconds: Intl.DateTimeFormatOptions;
|
|
24
|
+
readonly full: Intl.DateTimeFormatOptions;
|
|
19
25
|
};
|
|
26
|
+
/** How `formatDateTime` writes a moment. */
|
|
27
|
+
export type DateTimeStyle = keyof typeof DATE_TIME_STYLES;
|
|
20
28
|
/** A moment in the reader's locale: `date` reads "Mar 14, 2026", `short`
|
|
21
|
-
* "3/14/2026, 9:30 AM", `medium` "Mar 14, 2026, 9:30 AM",
|
|
22
|
-
* the seconds
|
|
23
|
-
|
|
29
|
+
* "3/14/2026, 9:30 AM", `medium` "Mar 14, 2026, 9:30 AM", `seconds` adds
|
|
30
|
+
* the seconds, and `full` reads "March 14, 2026 at 9:30 AM EDT", with the
|
|
31
|
+
* time zone. `locale`, such as `useLocale()` gives, wins over the time's own
|
|
32
|
+
* and luxon's default. Empty for a missing or invalid time. */
|
|
33
|
+
export declare function formatDateTime(value: TimeValue, style?: DateTimeStyle, locale?: string | undefined): string;
|
|
24
34
|
/** Time left, rounded the way a countdown reads: whole seconds under a minute,
|
|
25
35
|
* minutes and seconds under an hour, then hours and minutes. Null once only a
|
|
26
36
|
* few seconds remain, for the caller's "almost done". */
|
package/dist/format.js
CHANGED
|
@@ -16,23 +16,42 @@ function formatBytes(bytes) {
|
|
|
16
16
|
const unit = Math.min(Math.floor(Math.log(bytes) / Math.log(1024)), BYTE_UNITS.length - 1);
|
|
17
17
|
return `${sizeNumber.format(bytes / 1024 ** unit)} ${BYTE_UNITS[unit]}`;
|
|
18
18
|
}
|
|
19
|
-
var
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
19
|
+
var countNumbers = /* @__PURE__ */ new Map();
|
|
20
|
+
var plainNumbers = /* @__PURE__ */ new Map();
|
|
21
|
+
/** A count short enough for a status line: 512, 1.2K, 3.4M. `locale`, such
|
|
22
|
+
* as `useLocale()` gives, wins over the browser's. */
|
|
23
|
+
function formatCount(n, locale) {
|
|
24
|
+
let format = countNumbers.get(locale);
|
|
25
|
+
if (!format) {
|
|
26
|
+
format = new Intl.NumberFormat(locale, {
|
|
27
|
+
notation: "compact",
|
|
28
|
+
maximumFractionDigits: 1
|
|
29
|
+
});
|
|
30
|
+
countNumbers.set(locale, format);
|
|
31
|
+
}
|
|
32
|
+
return format.format(n);
|
|
33
|
+
}
|
|
34
|
+
/** A whole number in full, grouped as `locale` groups it: 1,204 or 1.204.
|
|
35
|
+
* `locale`, such as `useLocale()` gives, wins over the browser's. */
|
|
36
|
+
function formatInteger(n, locale) {
|
|
37
|
+
let format = plainNumbers.get(locale);
|
|
38
|
+
if (!format) {
|
|
39
|
+
format = new Intl.NumberFormat(locale);
|
|
40
|
+
plainNumbers.set(locale, format);
|
|
41
|
+
}
|
|
42
|
+
return format.format(n);
|
|
26
43
|
}
|
|
27
44
|
var UNIT_DISPLAY = { ja: "short" };
|
|
28
45
|
/** A length of time to whole seconds, in the host's locale: 45s, 2m 13s,
|
|
29
|
-
* 1d 2h. Takes milliseconds or a luxon Duration; the sign is dropped.
|
|
30
|
-
|
|
46
|
+
* 1d 2h. Takes milliseconds or a luxon Duration; the sign is dropped.
|
|
47
|
+
* `locale` wins over the duration's own and luxon's default. */
|
|
48
|
+
function formatDuration(value, locale) {
|
|
31
49
|
const duration = typeof value === "number" ? Duration.fromMillis(value) : value;
|
|
32
50
|
const parts = duration.shiftTo("days", "hours", "minutes", "seconds").toObject();
|
|
33
51
|
if (parts.seconds !== void 0) parts.seconds = Math.round(parts.seconds);
|
|
34
52
|
const shown = Object.fromEntries(Object.entries(parts).filter(([, n]) => n !== 0).map(([unit, n]) => [unit, Math.abs(n)]));
|
|
35
|
-
const
|
|
53
|
+
const shownLocale = locale ?? duration.locale;
|
|
54
|
+
const human = Duration.fromObject(Object.keys(shown).length > 0 ? shown : { seconds: 0 }, shownLocale ? { locale: shownLocale } : {});
|
|
36
55
|
return human.toHuman({ unitDisplay: UNIT_DISPLAY[human.locale?.split("-")[0] ?? ""] ?? "narrow" }).replaceAll(/[,、]/g, "");
|
|
37
56
|
}
|
|
38
57
|
/** The moment `value` names, or null when it is missing or invalid. */
|
|
@@ -45,13 +64,17 @@ var DATE_TIME_STYLES = {
|
|
|
45
64
|
date: DateTime.DATE_MED,
|
|
46
65
|
short: DateTime.DATETIME_SHORT,
|
|
47
66
|
medium: DateTime.DATETIME_MED,
|
|
48
|
-
seconds: DateTime.DATETIME_MED_WITH_SECONDS
|
|
67
|
+
seconds: DateTime.DATETIME_MED_WITH_SECONDS,
|
|
68
|
+
full: DateTime.DATETIME_FULL
|
|
49
69
|
};
|
|
50
70
|
/** A moment in the reader's locale: `date` reads "Mar 14, 2026", `short`
|
|
51
|
-
* "3/14/2026, 9:30 AM", `medium` "Mar 14, 2026, 9:30 AM",
|
|
52
|
-
* the seconds
|
|
53
|
-
|
|
54
|
-
|
|
71
|
+
* "3/14/2026, 9:30 AM", `medium` "Mar 14, 2026, 9:30 AM", `seconds` adds
|
|
72
|
+
* the seconds, and `full` reads "March 14, 2026 at 9:30 AM EDT", with the
|
|
73
|
+
* time zone. `locale`, such as `useLocale()` gives, wins over the time's own
|
|
74
|
+
* and luxon's default. Empty for a missing or invalid time. */
|
|
75
|
+
function formatDateTime(value, style = "medium", locale) {
|
|
76
|
+
const time = toDateTime(value);
|
|
77
|
+
return (locale ? time?.setLocale(locale) : time)?.toLocaleString(DATE_TIME_STYLES[style]) ?? "";
|
|
55
78
|
}
|
|
56
79
|
/** Time left, rounded the way a countdown reads: whole seconds under a minute,
|
|
57
80
|
* minutes and seconds under an hour, then hours and minutes. Null once only a
|
|
@@ -61,4 +84,4 @@ function formatTimeLeft(seconds) {
|
|
|
61
84
|
return formatDuration((seconds < 3600 ? Math.round(seconds) : Math.ceil(seconds / 60) * 60) * 1e3);
|
|
62
85
|
}
|
|
63
86
|
//#endregion
|
|
64
|
-
export { formatBytes, formatCount, formatDateTime, formatDuration, formatTimeLeft, toDateTime };
|
|
87
|
+
export { formatBytes, formatCount, formatDateTime, formatDuration, formatInteger, formatTimeLeft, toDateTime };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { cx } from "../cx.js";
|
|
2
2
|
import { ChevronRightIcon, ErrorIcon, InfoIcon, WarningIcon } from "../icons.js";
|
|
3
3
|
import { toneIcon, toneSurface, toneText } from "../components/tone.js";
|
|
4
|
-
import { keyedByContent } from "../components/keys.js";
|
|
5
4
|
import { useStrings } from "../components/Provider.js";
|
|
6
|
-
import {
|
|
5
|
+
import { keyedByContent } from "../components/keys.js";
|
|
7
6
|
import { useId, useState } from "react";
|
|
7
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
//#region src/graph/AnnotationBanner.tsx
|
|
9
9
|
var typeOrder = {
|
|
10
10
|
error: 0,
|
package/dist/graph/Connectors.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { highlightOf, useLineage, useLineageStore } from "./lineage.js";
|
|
2
2
|
import { dimClasses } from "./GraphNode.js";
|
|
3
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
4
3
|
import { memo, useMemo } from "react";
|
|
4
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
//#region src/graph/Connectors.tsx
|
|
6
6
|
var CONNECTOR_COLOR = "var(--theme-border)";
|
|
7
7
|
var HIGHLIGHT_COLOR = "var(--theme-accent)";
|
|
@@ -60,7 +60,7 @@ function LitEdges({ edges }) {
|
|
|
60
60
|
}, `${from}→${to}`));
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [lines.length > 0 && /* @__PURE__ */ jsx("path", {
|
|
63
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [lines.length > 0 && /* @__PURE__ */ jsx("path", {
|
|
64
64
|
d: lines.join(" "),
|
|
65
65
|
stroke: CONNECTOR_COLOR,
|
|
66
66
|
strokeWidth: STROKE,
|
|
@@ -85,7 +85,7 @@ function LitDots({ ports }) {
|
|
|
85
85
|
}, key));
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [at.length > 0 && /* @__PURE__ */ jsx("path", {
|
|
88
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [at.length > 0 && /* @__PURE__ */ jsx("path", {
|
|
89
89
|
d: squaresAt(at),
|
|
90
90
|
fill: PANEL_COLOR
|
|
91
91
|
}), lit] });
|
|
@@ -133,7 +133,7 @@ var ConnectorLayers = memo(function ConnectorLayers({ edges, zBase }) {
|
|
|
133
133
|
style: { zIndex: z + zBase },
|
|
134
134
|
children
|
|
135
135
|
});
|
|
136
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
136
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
137
137
|
keyframes,
|
|
138
138
|
layer(-1, /* @__PURE__ */ jsx("path", {
|
|
139
139
|
d: lines,
|
|
@@ -143,7 +143,7 @@ var ConnectorLayers = memo(function ConnectorLayers({ edges, zBase }) {
|
|
|
143
143
|
className: fade
|
|
144
144
|
})),
|
|
145
145
|
layer(20, /* @__PURE__ */ jsx(LitEdges, { edges })),
|
|
146
|
-
layer(30, /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
146
|
+
layer(30, /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
147
147
|
/* @__PURE__ */ jsx("path", {
|
|
148
148
|
d: squares,
|
|
149
149
|
fill: PANEL_COLOR
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { cx } from "../cx.js";
|
|
2
2
|
import { ArrowLeftIcon, ArrowRightIcon, ChevronLeftIcon, ChevronRightIcon, CloseIcon, FileTextIcon, ZoomInIcon, ZoomOutIcon } from "../icons.js";
|
|
3
3
|
import { Loader } from "../components/Loader.js";
|
|
4
|
-
import { useRunFile, useSlots, useStrings, useWorkflowEngine } from "../components/Provider.js";
|
|
4
|
+
import { useLocale, useRunFile, useSlots, useStrings, useWorkflowEngine } from "../components/Provider.js";
|
|
5
5
|
import { Button } from "../components/Button.js";
|
|
6
6
|
import { IconButton } from "../components/IconButton.js";
|
|
7
7
|
import { InfoTip } from "../components/InfoTip.js";
|
|
@@ -36,8 +36,8 @@ import { StepSummaries } from "./StepSummaries.js";
|
|
|
36
36
|
import { StepSummary } from "./StepSummary.js";
|
|
37
37
|
import TreeView from "./TreeView.js";
|
|
38
38
|
import { FIT_MAX_SCALE, MIN_SCALE, ZOOM_STEP, enclosing, fitMargin, fitView, intoView, viewShowing, wheelFactor, zoomAround, zoomLimit } from "./viewport.js";
|
|
39
|
-
import { Fragment,
|
|
40
|
-
import { Fragment as Fragment$1,
|
|
39
|
+
import { Fragment, Suspense, createContext, lazy, memo, useCallback, useContext, useEffect, useMemo, useRef, useState } from "react";
|
|
40
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
41
41
|
import { flushSync } from "react-dom";
|
|
42
42
|
import { DateTime } from "luxon";
|
|
43
43
|
import { TransformComponent, TransformWrapper } from "react-zoom-pan-pinch";
|
|
@@ -73,7 +73,7 @@ function GraphViewControls({ history, expand, onReset, onZoom, zoomedAll }) {
|
|
|
73
73
|
return /* @__PURE__ */ jsxs("div", {
|
|
74
74
|
className: VIEW_BAR,
|
|
75
75
|
children: [
|
|
76
|
-
history && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
76
|
+
history && /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
77
77
|
/* @__PURE__ */ jsx(IconButton, {
|
|
78
78
|
icon: /* @__PURE__ */ jsx(ChevronLeftIcon, {}),
|
|
79
79
|
label: dag.previousGraph,
|
|
@@ -549,7 +549,7 @@ function EditorEdges({ edges, cols, boxes, selected, zBase, size }) {
|
|
|
549
549
|
const wiredIn = new Set(edges.map((edge) => edge.to));
|
|
550
550
|
const wiredOut = new Set(edges.map((edge) => edge.from));
|
|
551
551
|
const chosen = new Set(selected.map((edge) => `${edge.from}→${edge.to}`));
|
|
552
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
552
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
553
553
|
cols.flatMap((col) => col.map((jobNames) => {
|
|
554
554
|
const [head] = jobNames;
|
|
555
555
|
const box = head === void 0 ? void 0 : boxes.get(head);
|
|
@@ -586,7 +586,7 @@ function EditorEdges({ edges, cols, boxes, selected, zBase, size }) {
|
|
|
586
586
|
width: size?.width,
|
|
587
587
|
height: size?.height,
|
|
588
588
|
style: { zIndex: 1 + zBase },
|
|
589
|
-
children: edges.map(({ from, to, path }) => /* @__PURE__ */ jsxs(Fragment
|
|
589
|
+
children: edges.map(({ from, to, path }) => /* @__PURE__ */ jsxs(Fragment, { children: [chosen.has(`${from}→${to}`) && /* @__PURE__ */ jsx("path", {
|
|
590
590
|
d: path.d,
|
|
591
591
|
stroke: "var(--theme-accent)",
|
|
592
592
|
strokeWidth: "10",
|
|
@@ -643,7 +643,7 @@ function SidebarJobs({ jobs, pathPrefix, preview, stepsOpen, toggleSteps, expand
|
|
|
643
643
|
seenMatrixGroups.add(originaljob);
|
|
644
644
|
return [originaljob];
|
|
645
645
|
});
|
|
646
|
-
return /* @__PURE__ */ jsx(Fragment, { children: orderedKeys.map((jobName) => {
|
|
646
|
+
return /* @__PURE__ */ jsx(Fragment$1, { children: orderedKeys.map((jobName) => {
|
|
647
647
|
const mg = displayJobs[jobName]?._matrixGroup;
|
|
648
648
|
if (mg) return /* @__PURE__ */ jsx(MatrixGroupSummaryItem, {
|
|
649
649
|
matrixGroup: mg,
|
|
@@ -832,6 +832,7 @@ function DependencyGraph({ run, preview = false, removeBorder, viewMode = "dag",
|
|
|
832
832
|
};
|
|
833
833
|
}, [containerEl, fixedHeight]);
|
|
834
834
|
const { common, dag: dagStrings } = useStrings();
|
|
835
|
+
const locale = useLocale();
|
|
835
836
|
const stepHeaderRef = useRef(null);
|
|
836
837
|
const slots = useSlots();
|
|
837
838
|
const [sidebarEl, setSidebarEl] = useState(null);
|
|
@@ -1460,7 +1461,7 @@ function DependencyGraph({ run, preview = false, removeBorder, viewMode = "dag",
|
|
|
1460
1461
|
children: dagStrings.submitted
|
|
1461
1462
|
}), /* @__PURE__ */ jsx("div", {
|
|
1462
1463
|
className: "text-sm font-semibold flex items-center gap-x-1",
|
|
1463
|
-
children: formatDateTime(startDt, "short")
|
|
1464
|
+
children: formatDateTime(startDt, "short", locale)
|
|
1464
1465
|
})]
|
|
1465
1466
|
}),
|
|
1466
1467
|
/* @__PURE__ */ jsx("div", { className: "flex-1" }),
|
|
@@ -1513,7 +1514,7 @@ function DependencyGraph({ run, preview = false, removeBorder, viewMode = "dag",
|
|
|
1513
1514
|
onPanning: moved,
|
|
1514
1515
|
onPinch: moved,
|
|
1515
1516
|
onTransform,
|
|
1516
|
-
children: () => /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("div", {
|
|
1517
|
+
children: () => /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("div", {
|
|
1517
1518
|
ref: viewBarRef,
|
|
1518
1519
|
className: "absolute z-10 top-2 right-2 flex max-w-[calc(100%-1rem)] flex-col items-end gap-y-1",
|
|
1519
1520
|
children: /* @__PURE__ */ jsx(GraphViewControls, {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { cx } from "../cx.js";
|
|
2
2
|
import { AddIcon, DuplicateIcon, EditIcon, GridIcon, LinkIcon, MatrixIcon, RemoveIcon, ResetLayoutIcon, TrashIcon } from "../icons.js";
|
|
3
|
+
import { useContextMenu } from "../components/ContextMenu.js";
|
|
3
4
|
import { useWorkflowEditing } from "../components/Provider.js";
|
|
4
5
|
import { useCopy } from "../components/useCopy.js";
|
|
5
6
|
import { menuDivider } from "../components/MenuEntries.js";
|
|
6
7
|
import { IconButton } from "../components/IconButton.js";
|
|
7
|
-
import { useContextMenu } from "../components/ContextMenu.js";
|
|
8
8
|
import { createStore, reclaimFocus, returningFocus, trackDrag, useFocusAfterDialog, usePressOutside } from "./editorPrimitives.js";
|
|
9
9
|
import { jobLabel } from "./util.js";
|
|
10
10
|
import { EDITOR_HANDLE_CLASS, NO_EDGES, NO_PROBLEMS, NO_SELECTION, NO_STEPS, contentBox, labelsOf, sameEdge, sameStep, selectionBounds, toContent, useUi } from "./graphEditorState.js";
|
|
@@ -16,8 +16,8 @@ import { JobDialog, StepDialog } from "./GraphEditorDialogs.js";
|
|
|
16
16
|
import { overlaps, typing } from "./editorApi.js";
|
|
17
17
|
import { IS_MAC, modifierKeys } from "./ShortcutsButton.js";
|
|
18
18
|
import { AddChip, BarDivider, DragLabel, EditorBar } from "./editorChrome.js";
|
|
19
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
20
19
|
import { useEffect, useMemo, useRef, useState } from "react";
|
|
20
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
21
21
|
//#region src/graph/GraphEditor.tsx
|
|
22
22
|
var EDGE_ZONE = 48;
|
|
23
23
|
var INDICATOR = 6;
|
|
@@ -1283,7 +1283,7 @@ function useGraphEditorState({ editor, jobs, yamlJobs, inputs, workflow, layout,
|
|
|
1283
1283
|
]);
|
|
1284
1284
|
return {
|
|
1285
1285
|
api,
|
|
1286
|
-
overlays: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1286
|
+
overlays: /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
1287
1287
|
/* @__PURE__ */ jsx(EditorToolbar, {
|
|
1288
1288
|
api,
|
|
1289
1289
|
editor,
|
|
@@ -1460,7 +1460,7 @@ function DragOverlays({ api, container, trashRef }) {
|
|
|
1460
1460
|
const rect = container.getBoundingClientRect();
|
|
1461
1461
|
const overTrash = drag.target?.kind === "trash";
|
|
1462
1462
|
const problem = drag.target?.kind === "steps" ? drag.target.problem : void 0;
|
|
1463
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [drag.payload.kind === "jobs" && /* @__PURE__ */ jsxs("div", {
|
|
1463
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [drag.payload.kind === "jobs" && /* @__PURE__ */ jsxs("div", {
|
|
1464
1464
|
ref: trashRef,
|
|
1465
1465
|
className: cx("absolute bottom-2 left-1/2 z-20 flex -translate-x-1/2 items-center gap-2 rounded-lg border-2 border-dashed px-4 py-2 text-sm", overTrash ? "border-(--theme-error) bg-(--theme-error-muted) text-(--theme-error-text)" : "theme-border bg-(--theme-panel-bg) theme-muted-text"),
|
|
1466
1466
|
children: [/* @__PURE__ */ jsx(TrashIcon, { className: "h-4 w-4" }), t.dropToDelete]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ArrowDownIcon, ArrowUpIcon, RemoveIcon, TrashIcon } from "../icons.js";
|
|
2
|
-
import { withPositionKeys } from "../components/keys.js";
|
|
3
2
|
import { useWorkflowActions, useWorkflowEditing } from "../components/Provider.js";
|
|
3
|
+
import { withPositionKeys } from "../components/keys.js";
|
|
4
4
|
import { IconButton } from "../components/IconButton.js";
|
|
5
5
|
import { Checkbox } from "../components/Checkbox.js";
|
|
6
6
|
import { ErrorText, FieldOption } from "../components/Field.js";
|
|
@@ -18,8 +18,8 @@ import { NO_SCOPED, ViewSwitch, YamlPane, yamlProblem } from "./settingsViews.js
|
|
|
18
18
|
import { useNewInputs } from "./InputDialog.js";
|
|
19
19
|
import { editErrorText } from "./refusalText.js";
|
|
20
20
|
import { UsesPicker, WithEditor, usesKind, withDraftFrom, withError, withValue } from "./stepWith.js";
|
|
21
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
22
21
|
import { useId, useMemo, useRef, useState } from "react";
|
|
22
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
23
23
|
//#region src/graph/GraphEditorDialogs.tsx
|
|
24
24
|
var SHELL = /^$|^(\/?([^/ ]+\/)*)?(bash|sh)( .*)?$/;
|
|
25
25
|
var OUTPUT_KEY = /^[a-zA-Z0-9_-]+$/;
|
|
@@ -310,10 +310,11 @@ function OutputsEditor({ rows, onChange, stepIds, error }) {
|
|
|
310
310
|
value: row.custom,
|
|
311
311
|
onChange: (e) => update(i, { custom: e.target.value })
|
|
312
312
|
})
|
|
313
|
-
}) : /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("div", {
|
|
313
|
+
}) : /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("div", {
|
|
314
314
|
className: "w-1/3",
|
|
315
315
|
children: /* @__PURE__ */ jsx(Select, {
|
|
316
316
|
"aria-label": t.outputStep,
|
|
317
|
+
width: "fill",
|
|
317
318
|
placeholder: t.outputStep,
|
|
318
319
|
items: stepIds.map((id) => ({
|
|
319
320
|
value: id,
|
|
@@ -665,7 +666,7 @@ function JobForm({ job, jobs, inputs, workflow, onEdit, onClose, renderShell, on
|
|
|
665
666
|
...patch
|
|
666
667
|
} : null);
|
|
667
668
|
onDraft?.(saveEdit, invalid);
|
|
668
|
-
const children = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
669
|
+
const children = /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
669
670
|
newInputs.dialog,
|
|
670
671
|
/* @__PURE__ */ jsx(Input, {
|
|
671
672
|
autoFocus: true,
|
|
@@ -797,7 +798,7 @@ function JobForm({ job, jobs, inputs, workflow, onEdit, onClose, renderShell, on
|
|
|
797
798
|
kind
|
|
798
799
|
})
|
|
799
800
|
})
|
|
800
|
-
}), !runsOnTyped && (runsOn.kind === "name" ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
801
|
+
}), !runsOnTyped && (runsOn.kind === "name" ? /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
801
802
|
/* @__PURE__ */ jsx(Input, {
|
|
802
803
|
mono: true,
|
|
803
804
|
...labelled(t.fields.environmentCluster, "cluster"),
|
|
@@ -831,7 +832,7 @@ function JobForm({ job, jobs, inputs, workflow, onEdit, onClose, renderShell, on
|
|
|
831
832
|
error: void 0
|
|
832
833
|
})
|
|
833
834
|
})
|
|
834
|
-
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
835
|
+
] }) : /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
835
836
|
/* @__PURE__ */ jsx(YamlField, {
|
|
836
837
|
label: t.fields.targetMode,
|
|
837
838
|
yamlKey: "mode",
|
|
@@ -917,7 +918,7 @@ function JobForm({ job, jobs, inputs, workflow, onEdit, onClose, renderShell, on
|
|
|
917
918
|
setMatrixOn(on);
|
|
918
919
|
if (on && matrixMode === "variables") addVariableRow();
|
|
919
920
|
}
|
|
920
|
-
}), matrixOn && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
921
|
+
}), matrixOn && /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
921
922
|
typeof rawMatrix === "string" && /* @__PURE__ */ jsx(YamlField, {
|
|
922
923
|
label: t.fields.matrixSource,
|
|
923
924
|
description: t.help.matrixMode,
|
|
@@ -943,7 +944,7 @@ function JobForm({ job, jobs, inputs, workflow, onEdit, onClose, renderShell, on
|
|
|
943
944
|
value: matrixText,
|
|
944
945
|
error: errors.matrix,
|
|
945
946
|
onChange: (e) => setMatrixText(e.target.value)
|
|
946
|
-
}) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
947
|
+
}) : /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
947
948
|
/* @__PURE__ */ jsx("div", {
|
|
948
949
|
className: "text-xs theme-muted-text",
|
|
949
950
|
children: t.help.matrixVariables
|
|
@@ -1149,7 +1150,7 @@ function StepForm({ job, index, steps, inputs, workflow, usesSuggestions, onEdit
|
|
|
1149
1150
|
...patch
|
|
1150
1151
|
}, ...references]) : null);
|
|
1151
1152
|
onDraft?.(saveEdit, invalid);
|
|
1152
|
-
const children = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1153
|
+
const children = /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
1153
1154
|
newInputs.dialog,
|
|
1154
1155
|
/* @__PURE__ */ jsx(Input, {
|
|
1155
1156
|
autoFocus: true,
|
|
@@ -1183,7 +1184,7 @@ function StepForm({ job, index, steps, inputs, workflow, usesSuggestions, onEdit
|
|
|
1183
1184
|
placeholder: "echo \"Hello World\"",
|
|
1184
1185
|
onChange: setRun,
|
|
1185
1186
|
source
|
|
1186
|
-
}) : /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(UsesPicker, {
|
|
1187
|
+
}) : /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(UsesPicker, {
|
|
1187
1188
|
uses: trimmedUses,
|
|
1188
1189
|
onUses: setUses,
|
|
1189
1190
|
choices: usesSuggestions,
|
|
@@ -1260,7 +1261,7 @@ function StepForm({ job, index, steps, inputs, workflow, usesSuggestions, onEdit
|
|
|
1260
1261
|
description: t.help.retry,
|
|
1261
1262
|
checked: retryOn,
|
|
1262
1263
|
onChange: setRetryOn
|
|
1263
|
-
}), retryOn && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1264
|
+
}), retryOn && /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
1264
1265
|
/* @__PURE__ */ jsx(Input, {
|
|
1265
1266
|
mono: true,
|
|
1266
1267
|
...labelled(t.fields.maxRetries, "max-retries"),
|
|
@@ -1379,7 +1380,7 @@ function StepForm({ job, index, steps, inputs, workflow, usesSuggestions, onEdit
|
|
|
1379
1380
|
if (saveEdit) onEdit(saveEdit);
|
|
1380
1381
|
onClose();
|
|
1381
1382
|
},
|
|
1382
|
-
footerStart: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1383
|
+
footerStart: /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
1383
1384
|
/* @__PURE__ */ jsx(IconButton, {
|
|
1384
1385
|
icon: /* @__PURE__ */ jsx(TrashIcon, {}),
|
|
1385
1386
|
label: t.deleteStep,
|
package/dist/graph/GraphNode.js
CHANGED
|
@@ -2,8 +2,8 @@ import { BoxGrip } from "./editorRows.js";
|
|
|
2
2
|
import { emptyRowsStyle } from "./gridSpacing.js";
|
|
3
3
|
import { Joblist } from "./JobSummary.js";
|
|
4
4
|
import { useLineage, useLineageStore } from "./lineage.js";
|
|
5
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
5
|
import { memo } from "react";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
//#region src/graph/GraphNode.tsx
|
|
8
8
|
var dimClasses = (depth) => ({
|
|
9
9
|
level: `dag-dim-${depth}`,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { cx } from "../cx.js";
|
|
2
2
|
import { ArrowDownIcon, ArrowUpIcon, EditIcon, RemoveIcon, TrashIcon } from "../icons.js";
|
|
3
|
-
import { withPositionKeys } from "../components/keys.js";
|
|
4
3
|
import { useWorkflowEditing, useWorkflowEngine } from "../components/Provider.js";
|
|
4
|
+
import { withPositionKeys } from "../components/keys.js";
|
|
5
5
|
import { IconButton } from "../components/IconButton.js";
|
|
6
6
|
import { Checkbox, CheckboxGroup } from "../components/Checkbox.js";
|
|
7
7
|
import { ErrorText, Field, FieldOption } from "../components/Field.js";
|
|
@@ -18,8 +18,8 @@ import { FormEditingContext } from "../form/formEditing.js";
|
|
|
18
18
|
import { DynamicForm } from "../form/Form.js";
|
|
19
19
|
import { withInputLayouts } from "./inputLayout.js";
|
|
20
20
|
import { NO_SCOPED, ViewSwitch, YamlPane, yamlProblem } from "./settingsViews.js";
|
|
21
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
22
21
|
import { useEffect, useMemo, useRef, useState } from "react";
|
|
22
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
23
23
|
//#region src/graph/InputDialog.tsx
|
|
24
24
|
/** Input types by menu group, in the order the add menu lists them. */
|
|
25
25
|
var INPUT_TYPE_GROUPS = [
|
|
@@ -752,7 +752,7 @@ function OptionsEditor({ draft, onChange, error, keyed, described }) {
|
|
|
752
752
|
mode
|
|
753
753
|
})
|
|
754
754
|
}),
|
|
755
|
-
draft.mode === "list" ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
755
|
+
draft.mode === "list" ? /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
756
756
|
draft.rows.length > 0 && /* @__PURE__ */ jsxs("div", {
|
|
757
757
|
"aria-hidden": "true",
|
|
758
758
|
className: "flex items-center gap-2 text-xs theme-muted-text",
|
|
@@ -839,7 +839,7 @@ function OptionsEditor({ draft, onChange, error, keyed, described }) {
|
|
|
839
839
|
...draft,
|
|
840
840
|
text: e.target.value
|
|
841
841
|
})
|
|
842
|
-
}) : /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("div", {
|
|
842
|
+
}) : /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("div", {
|
|
843
843
|
className: "text-xs theme-muted-text",
|
|
844
844
|
children: draft.mode === "byKey" ? t.optionsByKeyHelp : t.optionsJsonHelp
|
|
845
845
|
}), /* @__PURE__ */ jsx(Textarea, {
|
|
@@ -1432,7 +1432,7 @@ function PropField({ prop, kind, draft, original, error, onChange, suggestions,
|
|
|
1432
1432
|
values: next.values
|
|
1433
1433
|
}),
|
|
1434
1434
|
error
|
|
1435
|
-
}) : /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(SuggestionInput, {
|
|
1435
|
+
}) : /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(SuggestionInput, {
|
|
1436
1436
|
"aria-label": name,
|
|
1437
1437
|
value: perCopy.text,
|
|
1438
1438
|
suggestions: [],
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { cx } from "../cx.js";
|
|
2
|
+
import { EmptyState } from "../components/EmptyState.js";
|
|
2
3
|
import { AddIcon, ArrowDownIcon, ArrowUpIcon, CollapseIcon, DragHandleIcon, DuplicateIcon, EditIcon, FilesIcon, MinusIcon, MoreIcon, TrashIcon, WarningIcon } from "../icons.js";
|
|
4
|
+
import { useContextMenu } from "../components/ContextMenu.js";
|
|
3
5
|
import { Tooltip } from "../components/Tooltip.js";
|
|
4
|
-
import { useWorkflowEditing } from "../components/Provider.js";
|
|
5
|
-
import { EmptyState } from "../components/EmptyState.js";
|
|
6
|
+
import { useProblemText, useWorkflowEditing } from "../components/Provider.js";
|
|
6
7
|
import { menuDivider } from "../components/MenuEntries.js";
|
|
7
8
|
import { IconButton } from "../components/IconButton.js";
|
|
8
|
-
import { useContextMenu } from "../components/ContextMenu.js";
|
|
9
9
|
import { NumberInput } from "../components/NumberInput.js";
|
|
10
10
|
import { prefersReducedMotion } from "../reducedMotion.js";
|
|
11
11
|
import { MarqueeBox, createStore, reclaimFocus, returningFocus, trackDrag, useFocusAfterDialog, usePressOutside, useStore } from "./editorPrimitives.js";
|
|
@@ -21,8 +21,8 @@ import { modifierKeys } from "./ShortcutsButton.js";
|
|
|
21
21
|
import { AddChip, BarDivider, DragLabel, EditorBar } from "./editorChrome.js";
|
|
22
22
|
import { addPageEdit, splitIntoPagesEdits, unsplitPagesEdits, wizardGroupDefinition } from "./inputPages.js";
|
|
23
23
|
import { inputCell, linesIn, rowsOf, snapSplit } from "./inputRows.js";
|
|
24
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
25
24
|
import { createContext, useCallback, useContext, useEffect, useMemo, useRef, useState } from "react";
|
|
25
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
26
26
|
//#region src/graph/InputsEditor.tsx
|
|
27
27
|
var createFormStore = () => createStore({
|
|
28
28
|
drag: null,
|
|
@@ -100,7 +100,8 @@ function InputRow({ path, hidden = false, instance, children }) {
|
|
|
100
100
|
const copy = instance ?? rowKey;
|
|
101
101
|
const active = useUi(api?.store ?? EMPTY_STORE, (state) => state.open.includes(copy) && !state.drag && !state.resizing);
|
|
102
102
|
const selected = useUi(api?.store ?? EMPTY_STORE, (state) => state.selection.includes(rowKey));
|
|
103
|
-
const
|
|
103
|
+
const problemText = useProblemText();
|
|
104
|
+
const problems = useUi(api?.store ?? EMPTY_STORE, (state) => state.problems.filter((problem) => problem.input && key(problem.input) === rowKey).map((problem) => `${problem.line}\n${problemText(problem)}`).join("\n\n"));
|
|
104
105
|
if (!api) return children;
|
|
105
106
|
const found = problems ? problems.split("\n\n") : [];
|
|
106
107
|
const definition = api.definition(path);
|
|
@@ -110,7 +111,7 @@ function InputRow({ path, hidden = false, instance, children }) {
|
|
|
110
111
|
const childKey = hidden ? editing.inputChildrenKey(definition["type"]) : void 0;
|
|
111
112
|
const outline = childKey && childKey !== "template" ? namesIn(asRecord(definition[childKey])) : null;
|
|
112
113
|
const flagged = hidden && definition["hidden"] !== void 0 && definition["hidden"] !== false;
|
|
113
|
-
const actions = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
114
|
+
const actions = /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
114
115
|
/* @__PURE__ */ jsx("button", {
|
|
115
116
|
type: "button",
|
|
116
117
|
tabIndex: -1,
|
|
@@ -255,7 +256,7 @@ function PageActions({ api, parent, list, bar = false }) {
|
|
|
255
256
|
api.splitIntoPages(parent);
|
|
256
257
|
}
|
|
257
258
|
});
|
|
258
|
-
return bar ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(AddChip, {
|
|
259
|
+
return bar ? /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(AddChip, {
|
|
259
260
|
icon: /* @__PURE__ */ jsx(AddIcon, { className: "h-3 w-3" }),
|
|
260
261
|
label: t.page,
|
|
261
262
|
hint: t.addPage,
|
|
@@ -266,7 +267,7 @@ function PageActions({ api, parent, list, bar = false }) {
|
|
|
266
267
|
size: "sm",
|
|
267
268
|
variant: "ghost",
|
|
268
269
|
onClick: () => api.unsplitPages(parent)
|
|
269
|
-
})] }) : /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(IconButton, {
|
|
270
|
+
})] }) : /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(IconButton, {
|
|
270
271
|
size: "xs",
|
|
271
272
|
label: t.addPage,
|
|
272
273
|
icon: /* @__PURE__ */ jsx(AddIcon, {}),
|
|
@@ -1377,7 +1378,7 @@ function DropIndicator({ store, container }) {
|
|
|
1377
1378
|
const root = container.current;
|
|
1378
1379
|
if (!drag || !root) return null;
|
|
1379
1380
|
const rect = root.getBoundingClientRect();
|
|
1380
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [drag.gap?.beside ? /* @__PURE__ */ jsx("div", {
|
|
1381
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [drag.gap?.beside ? /* @__PURE__ */ jsx("div", {
|
|
1381
1382
|
className: "pointer-events-none absolute z-20 w-1 rounded-full bg-(--theme-accent)",
|
|
1382
1383
|
style: {
|
|
1383
1384
|
left: drag.gap.beside.x - rect.left - 2,
|
|
@@ -6,8 +6,8 @@ import { WarningMark } from "./RunWarningsList.js";
|
|
|
6
6
|
import { rowKey, useWarningMarks } from "./runWarnings.js";
|
|
7
7
|
import { Joblist } from "./JobSummary.js";
|
|
8
8
|
import { GraphNode } from "./GraphNode.js";
|
|
9
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
10
9
|
import { memo } from "react";
|
|
10
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
11
11
|
//#region src/graph/MatrixGroup.tsx
|
|
12
12
|
/** The warnings about any of a matrix's runs, for its group's row while it is closed. */
|
|
13
13
|
function useMatrixWarnings(prefix, members) {
|
|
@@ -68,7 +68,7 @@ var MatrixGroupNode = memo(function MatrixGroupNode({ matrixGroup, jobNames, idP
|
|
|
68
68
|
onClick: () => toggleMatrix(idPrefix + matrixName),
|
|
69
69
|
children: [/* @__PURE__ */ jsx("div", {
|
|
70
70
|
className: "font-semibold p-0.5",
|
|
71
|
-
children: matrixName.length > 20 ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", {
|
|
71
|
+
children: matrixName.length > 20 ? /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("span", {
|
|
72
72
|
"aria-hidden": true,
|
|
73
73
|
children: t.matrixOf(`${matrixName.slice(0, 20)}…`)
|
|
74
74
|
}), /* @__PURE__ */ jsx("span", {
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** The page a problem's type URI resolves to, or undefined for `about:blank` and no type, which
|
|
2
|
+
* have none. */
|
|
3
|
+
export declare function problemPage(type: string | null | undefined): string | undefined;
|
|
4
|
+
/** Links a problem to the page that explains it, in a new tab, when its type has one. */
|
|
5
|
+
export declare function ProblemPageLink({ type, label, className, }: {
|
|
6
|
+
type: string | null | undefined;
|
|
7
|
+
label: string;
|
|
8
|
+
className?: string | undefined;
|
|
9
|
+
}): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { cx } from "../cx.js";
|
|
2
|
+
import { ExternalLink } from "../components/ExternalLink.js";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
//#region src/graph/ProblemPageLink.tsx
|
|
5
|
+
/** The page a problem's type URI resolves to, or undefined for `about:blank` and no type, which
|
|
6
|
+
* have none. */
|
|
7
|
+
function problemPage(type) {
|
|
8
|
+
return type && type !== "about:blank" ? type : void 0;
|
|
9
|
+
}
|
|
10
|
+
/** Links a problem to the page that explains it, in a new tab, when its type has one. */
|
|
11
|
+
function ProblemPageLink({ type, label, className }) {
|
|
12
|
+
const href = problemPage(type);
|
|
13
|
+
if (!href) return null;
|
|
14
|
+
return /* @__PURE__ */ jsx(ExternalLink, {
|
|
15
|
+
href,
|
|
16
|
+
className: cx("rounded-sm text-xs underline underline-offset-2 hover:decoration-2 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--theme-focus)", className),
|
|
17
|
+
children: label
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
//#endregion
|
|
21
|
+
export { ProblemPageLink, problemPage };
|