@parallelworks/ui 0.43.0 → 0.45.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 +348 -25
- package/dist/ai/agent/diff.d.ts +2 -1
- package/dist/ai/agent/diff.js +4 -12
- package/dist/ai/agent/diffHighlight.d.ts +1 -1
- package/dist/ai/agent/diffHighlight.js +4 -3
- package/dist/ai/agent/index.d.ts +2 -1
- package/dist/ai/agent/toolStrings.d.ts +37 -0
- package/dist/ai/agent/toolStrings.js +35 -0
- package/dist/ai/agent/toolfmt.d.ts +8 -3
- package/dist/ai/agent/toolfmt.js +50 -65
- package/dist/ai/ai.css +18 -31
- package/dist/ai/components/AllocationSelector.js +2 -2
- package/dist/ai/components/AttachmentManager.js +28 -29
- package/dist/ai/components/AttachmentUpload.js +25 -30
- package/dist/ai/components/BlockedGroupBanner.js +2 -2
- package/dist/ai/components/BranchNavigator.js +3 -4
- package/dist/ai/components/ChatEmptyState.js +8 -7
- package/dist/ai/components/ChatInput.js +10 -12
- package/dist/ai/components/ChatLayout.js +3 -3
- package/dist/ai/components/ChatMessage.js +49 -61
- package/dist/ai/components/ChatMessageList.js +46 -42
- package/dist/ai/components/ChatSidebar.js +26 -34
- package/dist/ai/components/ChatStage.js +1 -1
- package/dist/ai/components/ComposerChrome.js +3 -4
- package/dist/ai/components/DragOverlay.js +6 -4
- package/dist/ai/components/ModelSelector.js +14 -15
- package/dist/ai/components/PastedText.js +18 -14
- package/dist/ai/components/ProviderIssueBanner.js +3 -4
- package/dist/ai/components/Reasoning.d.ts +12 -6
- package/dist/ai/components/Reasoning.js +31 -18
- package/dist/ai/components/ShareDialog.js +25 -28
- package/dist/ai/components/SlashMenu.js +3 -3
- package/dist/ai/components/agent/ActivityLine.d.ts +0 -5
- package/dist/ai/components/agent/ActivityLine.js +17 -54
- package/dist/ai/components/agent/AgentMessageParts.js +139 -149
- package/dist/ai/components/conversationActions.js +16 -16
- package/dist/ai/core/ChatProvider.d.ts +2 -4
- package/dist/ai/core/ChatProvider.js +25 -38
- package/dist/ai/core/exportConversation.js +4 -4
- package/dist/ai/core/sidebarState.d.ts +8 -6
- package/dist/ai/core/sidebarState.js +21 -28
- package/dist/ai/core/useKeyboardShortcuts.js +14 -5
- package/dist/ai/index.d.ts +4 -5
- package/dist/ai/index.js +7 -7
- package/dist/ai/strings.d.ts +14 -31
- package/dist/ai/strings.js +19 -39
- package/dist/ai/types.d.ts +0 -5
- package/dist/ai/ui/ConversationSidebar.d.ts +12 -9
- package/dist/ai/ui/ConversationSidebar.js +43 -87
- package/dist/ai/ui/Markdown.d.ts +3 -6
- package/dist/ai/ui/Markdown.js +6 -73
- package/dist/ai/ui/Notice.js +10 -12
- package/dist/ai/ui/chip.d.ts +2 -2
- package/dist/ai/ui/chip.js +1 -1
- package/dist/ai/ui/sidebar.d.ts +4 -20
- package/dist/ai/ui/sidebar.js +30 -67
- package/dist/ai/utils.d.ts +0 -1
- package/dist/ai/utils.js +1 -14
- package/dist/brandIcons.d.ts +51 -0
- package/dist/brandIcons.js +75 -0
- package/dist/components/Avatar.d.ts +3 -1
- package/dist/components/Avatar.js +34 -28
- package/dist/components/Button.d.ts +12 -7
- package/dist/components/Button.js +39 -44
- package/dist/components/Callout.js +18 -12
- package/dist/components/Card.d.ts +18 -8
- package/dist/components/Card.js +17 -6
- package/dist/components/Checkbox.d.ts +9 -0
- package/dist/components/Checkbox.js +30 -0
- package/dist/components/Combobox.d.ts +9 -1
- package/dist/components/Combobox.js +71 -44
- package/dist/components/ConfirmModal.js +11 -11
- package/dist/components/ContextMenu.d.ts +2 -8
- package/dist/components/ContextMenu.js +2 -29
- package/dist/components/CopyToClipboard.js +17 -36
- package/dist/components/CreateModal.d.ts +3 -24
- package/dist/components/CreateModal.js +46 -113
- package/dist/components/DatePicker.d.ts +31 -0
- package/dist/components/DatePicker.js +191 -0
- package/dist/components/DescriptionList.js +4 -4
- package/dist/components/Disclosure.d.ts +34 -0
- package/dist/components/Disclosure.js +46 -0
- package/dist/components/Drawer.d.ts +47 -0
- package/dist/components/Drawer.js +120 -0
- package/dist/components/EmptyState.d.ts +15 -10
- package/dist/components/EmptyState.js +13 -8
- package/dist/components/ExternalLink.d.ts +8 -0
- package/dist/components/ExternalLink.js +29 -0
- package/dist/components/Field.d.ts +70 -0
- package/dist/components/Field.js +159 -0
- package/dist/components/HoverCard.js +11 -14
- package/dist/components/IconButton.d.ts +16 -13
- package/dist/components/IconButton.js +27 -18
- package/dist/components/InfoTip.js +16 -23
- package/dist/components/Input.d.ts +10 -9
- package/dist/components/Input.js +54 -96
- package/dist/components/LetterBadge.js +2 -2
- package/dist/components/Loader.d.ts +15 -8
- package/dist/components/Loader.js +29 -19
- package/dist/components/Markdown.d.ts +7 -1
- package/dist/components/Markdown.js +2 -0
- package/dist/components/MarkdownImpl.d.ts +1 -1
- package/dist/components/MarkdownImpl.js +55 -14
- package/dist/components/Menu.js +13 -15
- package/dist/components/MenuEntries.js +11 -16
- package/dist/components/Meter.d.ts +48 -0
- package/dist/components/Meter.js +94 -0
- package/dist/components/Modal.js +11 -14
- package/dist/components/NumberInput.d.ts +25 -0
- package/dist/components/NumberInput.js +55 -0
- package/dist/components/Overview.js +12 -10
- package/dist/components/PageHeader.d.ts +2 -3
- package/dist/components/PageHeader.js +30 -21
- package/dist/components/Pagination.d.ts +27 -14
- package/dist/components/Pagination.js +86 -25
- package/dist/components/Popover.d.ts +47 -0
- package/dist/components/Popover.js +63 -0
- package/dist/components/Provider.d.ts +197 -80
- package/dist/components/Provider.js +200 -118
- package/dist/components/Radio.d.ts +1 -1
- package/dist/components/Radio.js +4 -4
- package/dist/components/RefreshButton.d.ts +15 -0
- package/dist/components/RefreshButton.js +53 -0
- package/dist/components/RunStatusIcon.d.ts +12 -0
- package/dist/components/RunStatusIcon.js +84 -0
- package/dist/components/SearchInput.d.ts +16 -0
- package/dist/components/SearchInput.js +52 -0
- package/dist/components/Section.d.ts +28 -0
- package/dist/components/Section.js +76 -0
- package/dist/components/SegmentedControl.d.ts +7 -11
- package/dist/components/SegmentedControl.js +25 -56
- package/dist/components/Select.d.ts +8 -1
- package/dist/components/Select.js +47 -43
- package/dist/components/SettingModeOption.d.ts +3 -5
- package/dist/components/SettingModeOption.js +5 -6
- package/dist/components/SettingsCard.d.ts +32 -19
- package/dist/components/SettingsCard.js +40 -13
- package/dist/components/Skeleton.d.ts +22 -0
- package/dist/components/Skeleton.js +34 -0
- package/dist/components/Slider.d.ts +16 -0
- package/dist/components/Slider.js +30 -0
- package/dist/components/Sort.js +4 -6
- package/dist/components/StatusBadge.d.ts +3 -1
- package/dist/components/StatusBadge.js +9 -32
- package/dist/components/StatusIcons.d.ts +0 -4
- package/dist/components/StatusIcons.js +5 -13
- package/dist/components/Switch.d.ts +5 -1
- package/dist/components/Switch.js +23 -6
- package/dist/components/Table.js +13 -20
- package/dist/components/Tabs.d.ts +52 -0
- package/dist/components/Tabs.js +75 -0
- package/dist/components/ThemeEditor.d.ts +29 -0
- package/dist/components/ThemeEditor.js +397 -0
- package/dist/components/Toast.d.ts +57 -0
- package/dist/components/Toast.js +203 -0
- package/dist/components/Tooltip.js +12 -15
- package/dist/components/buttonClasses.d.ts +18 -0
- package/dist/components/buttonClasses.js +31 -0
- package/dist/components/codeTheme.d.ts +5 -0
- package/dist/components/codeTheme.js +93 -0
- package/dist/components/fieldBox.d.ts +14 -0
- package/dist/components/fieldBox.js +29 -0
- package/dist/components/floating.d.ts +26 -5
- package/dist/components/floating.js +31 -9
- package/dist/{ai/ui/codeBreaks.js → components/markdownCodeBreaks.js} +1 -1
- package/dist/components/persistedState.d.ts +2 -0
- package/dist/components/persistedState.js +63 -0
- package/dist/components/relativeTime.d.ts +36 -8
- package/dist/components/relativeTime.js +106 -23
- package/dist/components/segmented.d.ts +17 -0
- package/dist/components/segmented.js +27 -0
- package/dist/components/shortcutKey.d.ts +4 -0
- package/dist/components/shortcutKey.js +27 -0
- package/dist/components/splitter.d.ts +26 -0
- package/dist/components/splitter.js +69 -0
- package/dist/components/tone.d.ts +9 -0
- package/dist/components/tone.js +30 -0
- package/dist/components/useCopy.d.ts +14 -0
- package/dist/components/useCopy.js +31 -0
- package/dist/components/useCssIsDark.d.ts +2 -0
- package/dist/components/useCssIsDark.js +2 -1
- package/dist/components/useTheme.d.ts +10 -0
- package/dist/components/useTheme.js +40 -0
- package/dist/cx.d.ts +5 -0
- package/dist/cx.js +11 -0
- package/dist/editor/Editor.js +2 -2
- package/dist/editor/EditorField.js +7 -10
- package/dist/editor/FormCodePanel.js +10 -23
- package/dist/editor/Monaco.js +7 -4
- package/dist/editor/index.d.ts +1 -1
- package/dist/editor/index.js +2 -2
- package/dist/editor/themes.d.ts +4 -0
- package/dist/editor/themes.js +75 -76
- package/dist/file-explorer/FileExplorer.js +180 -187
- package/dist/file-explorer/FileExplorerContext.js +36 -58
- package/dist/file-explorer/FilePreview/CodePreviewEditor.js +2 -1
- package/dist/file-explorer/FilePreview/Inline.js +9 -7
- package/dist/file-explorer/FilePreview/StreamedBadge.js +2 -2
- package/dist/file-explorer/FilePreview/Viewer.js +32 -34
- package/dist/file-explorer/FilePreview/index.js +60 -92
- package/dist/file-explorer/FileRow.js +10 -15
- package/dist/file-explorer/FileRowsWindow.js +2 -6
- package/dist/file-explorer/FileTable.js +2 -2
- package/dist/file-explorer/FileTableHeaders.js +8 -11
- package/dist/file-explorer/LoadMoreRow.js +8 -9
- package/dist/file-explorer/TreeView.js +16 -16
- package/dist/file-explorer/helpers.d.ts +1 -4
- package/dist/file-explorer/helpers.js +101 -114
- package/dist/file-explorer/lib/utils.d.ts +0 -2
- package/dist/file-explorer/lib/utils.js +1 -25
- package/dist/file-explorer/toasts.js +104 -185
- package/dist/form/Fields/BooleanField.js +12 -14
- package/dist/form/Fields/CheckboxGroupField.d.ts +1 -1
- package/dist/form/Fields/CheckboxGroupField.js +16 -18
- package/dist/form/Fields/ColorField.js +11 -11
- package/dist/form/Fields/DropdownField.d.ts +1 -1
- package/dist/form/Fields/DropdownField.js +20 -36
- package/dist/form/Fields/DurationField.d.ts +1 -1
- package/dist/form/Fields/DurationField.js +36 -50
- package/dist/form/Fields/LabelField.js +2 -2
- package/dist/form/Fields/MultiDropdownField.d.ts +1 -1
- package/dist/form/Fields/MultiDropdownField.js +9 -14
- package/dist/form/Fields/NumberField.d.ts +1 -1
- package/dist/form/Fields/NumberField.js +13 -48
- package/dist/form/Fields/ObjectField.js +3 -3
- package/dist/form/Fields/RadioField.d.ts +1 -1
- package/dist/form/Fields/RadioField.js +15 -18
- package/dist/form/Fields/RangeField.js +34 -35
- package/dist/form/Fields/StringField.d.ts +1 -1
- package/dist/form/Fields/StringField.js +15 -25
- package/dist/form/Fields/TextAreaField.js +10 -15
- package/dist/form/Form.d.ts +7 -2
- package/dist/form/Form.js +144 -49
- package/dist/form/FormLayout.js +18 -12
- package/dist/form/Wizard/WizardContainer.js +44 -18
- package/dist/form/Wizard/WizardNavigation.d.ts +1 -1
- package/dist/form/Wizard/WizardNavigation.js +31 -56
- package/dist/form/Wizard/WizardStepIndicator.d.ts +3 -0
- package/dist/form/Wizard/WizardStepIndicator.js +98 -114
- package/dist/form/Wizard/types.d.ts +2 -2
- package/dist/form/fieldFrame.d.ts +7 -0
- package/dist/form/fieldFrame.js +19 -0
- package/dist/form/index.d.ts +5 -5
- package/dist/form/index.js +4 -6
- package/dist/form/layoutCSS.js +5 -4
- package/dist/form/types/fieldComponentTypes.d.ts +5 -3
- package/dist/form/useChoiceField.js +2 -3
- package/dist/form/useFieldValue.d.ts +3 -0
- package/dist/form/useFieldValue.js +24 -7
- package/dist/form/utils/duration.d.ts +2 -2
- package/dist/form/utils/duration.js +3 -3
- package/dist/form/utils/fieldPath.d.ts +5 -3
- package/dist/form/utils/fieldPath.js +18 -3
- package/dist/form/utils/secondaryField.d.ts +0 -7
- package/dist/form/utils/secondaryField.js +1 -12
- package/dist/form/validation.d.ts +29 -0
- package/dist/form/validation.js +14 -0
- package/dist/format.d.ts +28 -0
- package/dist/format.js +64 -0
- package/dist/graph/AnnotationBanner.js +20 -31
- package/dist/graph/Connectors.js +1 -1
- package/dist/graph/DependencyGraph.js +51 -65
- package/dist/graph/GraphEditor.js +24 -28
- package/dist/graph/GraphEditorDialogs.js +239 -245
- package/dist/graph/InputDialog.js +93 -112
- package/dist/graph/InputsEditor.js +83 -84
- package/dist/graph/JobSummary.js +10 -11
- package/dist/graph/MatrixGroup.js +3 -3
- package/dist/graph/ProblemsButton.js +9 -10
- package/dist/graph/ShortcutsButton.js +12 -17
- package/dist/graph/SuggestionInput.d.ts +1 -2
- package/dist/graph/SuggestionInput.js +1 -3
- package/dist/graph/TreeView.js +47 -45
- package/dist/graph/WorkflowSettingsDialog.js +97 -102
- package/dist/graph/editorChrome.js +10 -12
- package/dist/graph/editorFields.d.ts +19 -16
- package/dist/graph/editorFields.js +97 -135
- package/dist/graph/editorPrimitives.js +2 -2
- package/dist/graph/editorRows.js +22 -25
- package/dist/graph/editorStrings.d.ts +16 -19
- package/dist/graph/editorStrings.js +11 -23
- package/dist/graph/fieldProblems.js +2 -2
- package/dist/graph/graphEditorState.d.ts +4 -4
- package/dist/graph/inputRefs.d.ts +0 -13
- package/dist/graph/inputRefs.js +121 -159
- package/dist/graph/settingsViews.js +5 -3
- package/dist/graph/stepWith.js +100 -100
- package/dist/graph/toolbarPanel.d.ts +8 -0
- package/dist/graph/toolbarPanel.js +11 -0
- package/dist/icons.d.ts +234 -23
- package/dist/icons.js +249 -264
- package/dist/index.d.ts +38 -21
- package/dist/index.js +42 -21
- package/dist/list/ActionToolbar.d.ts +1 -5
- package/dist/list/ActionToolbar.js +21 -20
- package/dist/list/ListPage.js +7 -7
- package/dist/list/ListTable.d.ts +3 -2
- package/dist/list/ListTable.js +33 -29
- package/dist/list/ListViewControls.d.ts +0 -17
- package/dist/list/ListViewControls.js +50 -118
- package/dist/list/UserHoverCard.js +24 -32
- package/dist/list/index.d.ts +2 -4
- package/dist/list/index.js +3 -5
- package/dist/list/listSearch.d.ts +1 -1
- package/dist/list/listSearch.js +19 -14
- package/dist/list/rowMenu.js +20 -26
- package/dist/logviewer/LogViewer.js +268 -382
- package/dist/logviewer/logviewer.css +53 -41
- package/dist/styles/base.css +16 -40
- package/dist/styles/theme.css +75 -106
- package/dist/styles.css +1 -1
- package/dist/theme/color.d.ts +40 -0
- package/dist/theme/color.js +228 -0
- package/dist/theme/contrast.d.ts +42 -0
- package/dist/theme/contrast.js +145 -0
- package/dist/theme/derive.d.ts +25 -0
- package/dist/theme/derive.js +475 -0
- package/dist/theme/fit.d.ts +35 -0
- package/dist/theme/fit.js +185 -0
- package/dist/theme/index.d.ts +14 -29
- package/dist/theme/index.js +20 -279
- package/dist/theme/model.d.ts +64 -0
- package/dist/theme/model.js +219 -0
- package/package.json +9 -5
- package/dist/ai/ui/Avatar.d.ts +0 -7
- package/dist/ai/ui/Avatar.js +0 -24
- package/dist/components/Filter.d.ts +0 -15
- package/dist/components/Filter.js +0 -32
- package/dist/components/FilterPill.d.ts +0 -7
- package/dist/components/FilterPill.js +0 -14
- package/dist/components/Indicator.d.ts +0 -4
- package/dist/components/Indicator.js +0 -44
- package/dist/components/SectionHeader.d.ts +0 -8
- package/dist/components/SectionHeader.js +0 -11
- package/dist/components/SettingRow.d.ts +0 -18
- package/dist/components/SettingRow.js +0 -35
- package/dist/components/SettingsGroup.d.ts +0 -8
- package/dist/components/SettingsGroup.js +0 -17
- package/dist/components/ghostButton.d.ts +0 -4
- package/dist/components/ghostButton.js +0 -7
- package/dist/components/inputClasses.d.ts +0 -1
- package/dist/components/inputClasses.js +0 -4
- package/dist/duration.d.ts +0 -3
- package/dist/duration.js +0 -17
- package/dist/form/FieldGroup.d.ts +0 -11
- package/dist/form/FieldGroup.js +0 -36
- package/dist/form/FieldWrapper.d.ts +0 -16
- package/dist/form/FieldWrapper.js +0 -55
- package/dist/form/fieldContext.d.ts +0 -19
- package/dist/form/fieldContext.js +0 -26
- package/dist/graph/Collapse.d.ts +0 -7
- package/dist/graph/Collapse.js +0 -15
- package/dist/graph/ToolbarPopover.d.ts +0 -13
- package/dist/graph/ToolbarPopover.js +0 -39
- package/dist/icons/ai/AiOutlineRollback.js +0 -16
- package/dist/icons/bi/BiBell.js +0 -16
- package/dist/icons/bi/BiBellOff.js +0 -16
- package/dist/icons/bi/BiBuildings.js +0 -20
- package/dist/icons/bi/BiError.js +0 -20
- package/dist/icons/bi/BiExpandVertical.js +0 -16
- package/dist/icons/bi/BiPause.js +0 -16
- package/dist/icons/bi/BiPlay.js +0 -16
- package/dist/icons/bi/BiRedo.js +0 -16
- package/dist/icons/bi/BiSolidCheckShield.js +0 -16
- package/dist/icons/bi/BiSolidTrashAlt.js +0 -16
- package/dist/icons/bi/BiStop.js +0 -16
- package/dist/icons/bi/BiUndo.js +0 -16
- package/dist/icons/bs/BsArrowsCollapse.js +0 -22
- package/dist/icons/bs/BsBank2.js +0 -19
- package/dist/icons/bs/BsBriefcase.js +0 -19
- package/dist/icons/bs/BsBucket.js +0 -19
- package/dist/icons/bs/BsCalendarX.js +0 -23
- package/dist/icons/bs/BsChatLeft.js +0 -19
- package/dist/icons/bs/BsChevronDoubleDown.js +0 -29
- package/dist/icons/bs/BsChevronDoubleUp.js +0 -29
- package/dist/icons/bs/BsClipboardCheck.js +0 -34
- package/dist/icons/bs/BsCurrencyDollar.js +0 -19
- package/dist/icons/bs/BsDash.js +0 -19
- package/dist/icons/bs/BsFileEarmarkZip.js +0 -23
- package/dist/icons/bs/BsFiles.js +0 -19
- package/dist/icons/bs/BsGeoAlt.js +0 -23
- package/dist/icons/bs/BsGrid.js +0 -19
- package/dist/icons/bs/BsLayers.js +0 -19
- package/dist/icons/bs/BsLayoutThreeColumns.js +0 -19
- package/dist/icons/bs/BsListUl.js +0 -22
- package/dist/icons/bs/BsMortarboard.js +0 -23
- package/dist/icons/bs/BsMusicNoteBeamed.js +0 -34
- package/dist/icons/bs/BsOpenai.js +0 -19
- package/dist/icons/bs/BsPersonPlus.js +0 -26
- package/dist/icons/bs/BsSearch.js +0 -19
- package/dist/icons/bs/BsSend.js +0 -19
- package/dist/icons/bs/BsShieldSlash.js +0 -22
- package/dist/icons/bs/BsStar.js +0 -19
- package/dist/icons/bs/BsStarFill.js +0 -19
- package/dist/icons/bs/BsStopCircle.js +0 -23
- package/dist/icons/bs/BsTag.js +0 -23
- package/dist/icons/bs/BsTelephone.js +0 -19
- package/dist/icons/bs/BsTerminal.js +0 -23
- package/dist/icons/bs/BsTerminalFill.js +0 -19
- package/dist/icons/bs/BsThreeDots.js +0 -19
- package/dist/icons/bs/BsThreeDotsVertical.js +0 -19
- package/dist/icons/bs/BsZoomIn.js +0 -37
- package/dist/icons/fa/FaAmazon.js +0 -16
- package/dist/icons/fa/FaAngleDown.js +0 -16
- package/dist/icons/fa/FaAngleLeft.js +0 -16
- package/dist/icons/fa/FaAngleRight.js +0 -16
- package/dist/icons/fa/FaAngleUp.js +0 -16
- package/dist/icons/fa/FaArrowDown.js +0 -16
- package/dist/icons/fa/FaArrowLeft.js +0 -16
- package/dist/icons/fa/FaArrowRight.js +0 -16
- package/dist/icons/fa/FaArrowUp.js +0 -16
- package/dist/icons/fa/FaBalanceScale.js +0 -16
- package/dist/icons/fa/FaCaretDown.js +0 -16
- package/dist/icons/fa/FaCentos.js +0 -16
- package/dist/icons/fa/FaChartLine.js +0 -16
- package/dist/icons/fa/FaChartPie.js +0 -16
- package/dist/icons/fa/FaCheck.js +0 -16
- package/dist/icons/fa/FaChevronDown.js +0 -16
- package/dist/icons/fa/FaChevronUp.js +0 -16
- package/dist/icons/fa/FaChrome.js +0 -16
- package/dist/icons/fa/FaCircleNotch.js +0 -16
- package/dist/icons/fa/FaCloud.js +0 -16
- package/dist/icons/fa/FaCloudDownloadAlt.js +0 -16
- package/dist/icons/fa/FaCog.js +0 -16
- package/dist/icons/fa/FaCogs.js +0 -16
- package/dist/icons/fa/FaComments.js +0 -16
- package/dist/icons/fa/FaCompress.js +0 -16
- package/dist/icons/fa/FaDesktop.js +0 -16
- package/dist/icons/fa/FaDocker.js +0 -16
- package/dist/icons/fa/FaDollarSign.js +0 -16
- package/dist/icons/fa/FaEdge.js +0 -16
- package/dist/icons/fa/FaEdit.js +0 -16
- package/dist/icons/fa/FaExclamationTriangle.js +0 -16
- package/dist/icons/fa/FaExpand.js +0 -16
- package/dist/icons/fa/FaEye.js +0 -16
- package/dist/icons/fa/FaEyeSlash.js +0 -16
- package/dist/icons/fa/FaFile.js +0 -16
- package/dist/icons/fa/FaFilePdf.js +0 -16
- package/dist/icons/fa/FaFilter.js +0 -16
- package/dist/icons/fa/FaFirefoxBrowser.js +0 -16
- package/dist/icons/fa/FaFlask.js +0 -16
- package/dist/icons/fa/FaFolder.js +0 -16
- package/dist/icons/fa/FaGithub.js +0 -16
- package/dist/icons/fa/FaGitlab.js +0 -16
- package/dist/icons/fa/FaGlobe.js +0 -16
- package/dist/icons/fa/FaGlobeAmericas.js +0 -16
- package/dist/icons/fa/FaImage.js +0 -16
- package/dist/icons/fa/FaInfoCircle.js +0 -16
- package/dist/icons/fa/FaKey.js +0 -16
- package/dist/icons/fa/FaLayerGroup.js +0 -16
- package/dist/icons/fa/FaLink.js +0 -16
- package/dist/icons/fa/FaLinkedin.js +0 -16
- package/dist/icons/fa/FaLinux.js +0 -16
- package/dist/icons/fa/FaList.js +0 -16
- package/dist/icons/fa/FaLock.js +0 -16
- package/dist/icons/fa/FaOpenid.js +0 -16
- package/dist/icons/fa/FaOpera.js +0 -16
- package/dist/icons/fa/FaPaperclip.js +0 -16
- package/dist/icons/fa/FaPlus.js +0 -16
- package/dist/icons/fa/FaPowerOff.js +0 -16
- package/dist/icons/fa/FaPrint.js +0 -16
- package/dist/icons/fa/FaQrcode.js +0 -16
- package/dist/icons/fa/FaQuestionCircle.js +0 -16
- package/dist/icons/fa/FaRedhat.js +0 -16
- package/dist/icons/fa/FaRegCircle.js +0 -16
- package/dist/icons/fa/FaRegFileImage.js +0 -16
- package/dist/icons/fa/FaRegFolder.js +0 -16
- package/dist/icons/fa/FaRobot.js +0 -16
- package/dist/icons/fa/FaRocket.js +0 -16
- package/dist/icons/fa/FaRunning.js +0 -16
- package/dist/icons/fa/FaSafari.js +0 -16
- package/dist/icons/fa/FaSave.js +0 -16
- package/dist/icons/fa/FaSearch.js +0 -16
- package/dist/icons/fa/FaShieldAlt.js +0 -16
- package/dist/icons/fa/FaSlack.js +0 -16
- package/dist/icons/fa/FaStar.js +0 -16
- package/dist/icons/fa/FaStop.js +0 -16
- package/dist/icons/fa/FaSuse.js +0 -16
- package/dist/icons/fa/FaTerminal.js +0 -16
- package/dist/icons/fa/FaTimes.js +0 -16
- package/dist/icons/fa/FaUbuntu.js +0 -16
- package/dist/icons/fa/FaUndoAlt.js +0 -16
- package/dist/icons/fa/FaUnlink.js +0 -16
- package/dist/icons/fa/FaUser.js +0 -16
- package/dist/icons/fa/FaUsers.js +0 -16
- package/dist/icons/fa/FaWindows.js +0 -16
- package/dist/icons/fa6/FaApple.js +0 -16
- package/dist/icons/fa6/FaArrowsRotate.js +0 -16
- package/dist/icons/fa6/FaDebian.js +0 -16
- package/dist/icons/fa6/FaFilterCircleXmark.js +0 -16
- package/dist/icons/fa6/FaInbox.js +0 -16
- package/dist/icons/fa6/FaLocationDot.js +0 -16
- package/dist/icons/fa6/FaRegFilePdf.js +0 -16
- package/dist/icons/fa6/FaRegFolderOpen.js +0 -16
- package/dist/icons/fa6/FaUpRightFromSquare.js +0 -16
- package/dist/icons/fa6/FaWandMagicSparkles.js +0 -16
- package/dist/icons/fa6/FaXTwitter.js +0 -16
- package/dist/icons/fi/FiActivity.js +0 -23
- package/dist/icons/fi/FiAlertCircle.js +0 -49
- package/dist/icons/fi/FiChevronDown.js +0 -23
- package/dist/icons/fi/FiClock.js +0 -31
- package/dist/icons/fi/FiCopy.js +0 -34
- package/dist/icons/fi/FiDownload.js +0 -40
- package/dist/icons/fi/FiFile.js +0 -27
- package/dist/icons/fi/FiFileText.js +0 -55
- package/dist/icons/fi/FiHardDrive.js +0 -55
- package/dist/icons/fi/FiRotateCcw.js +0 -27
- package/dist/icons/fi/FiUpload.js +0 -40
- package/dist/icons/fi/FiX.js +0 -37
- package/dist/icons/fi/FiZap.js +0 -23
- package/dist/icons/gi/GiSpy.js +0 -16
- package/dist/icons/go/GoGitCommit.js +0 -16
- package/dist/icons/go/GoGitPullRequest.js +0 -20
- package/dist/icons/go/GoIssueOpened.js +0 -16
- package/dist/icons/go/GoPlus.js +0 -16
- package/dist/icons/go/GoRepoForked.js +0 -28
- package/dist/icons/go/GoSignOut.js +0 -16
- package/dist/icons/go/GoSkip.js +0 -20
- package/dist/icons/go/GoVideo.js +0 -20
- package/dist/icons/gr/GrCloudComputer.js +0 -20
- package/dist/icons/gr/GrInbox.js +0 -20
- package/dist/icons/gr/GrServerCluster.js +0 -20
- package/dist/icons/gr/GrStorage.js +0 -20
- package/dist/icons/gr/GrTasks.js +0 -20
- package/dist/icons/hi/HiCog.js +0 -24
- package/dist/icons/hi/HiDuplicate.js +0 -24
- package/dist/icons/hi/HiOutlineArchive.js +0 -26
- package/dist/icons/hi/HiOutlineClipboardCopy.js +0 -26
- package/dist/icons/hi/HiOutlineHome.js +0 -26
- package/dist/icons/hi/HiQuestionMarkCircle.js +0 -24
- package/dist/icons/hi/HiServer.js +0 -24
- package/dist/icons/hi2/HiMiniCheckCircle.js +0 -24
- package/dist/icons/hi2/HiMiniLanguage.js +0 -28
- package/dist/icons/hi2/HiMiniMinusCircle.js +0 -24
- package/dist/icons/hi2/HiMiniXCircle.js +0 -24
- package/dist/icons/hi2/HiSparkles.js +0 -24
- package/dist/icons/im/ImSpinner5.js +0 -19
- package/dist/icons/io/IoIosNotifications.js +0 -16
- package/dist/icons/io/IoMdBuild.js +0 -16
- package/dist/icons/io/IoMdClose.js +0 -16
- package/dist/icons/io5/IoCloudUploadOutline.js +0 -32
- package/dist/icons/io5/IoDocumentTextOutline.js +0 -31
- package/dist/icons/io5/IoFileTrayFullOutline.js +0 -31
- package/dist/icons/io5/IoHeart.js +0 -16
- package/dist/icons/io5/IoHeartDislike.js +0 -16
- package/dist/icons/io5/IoHeartOutline.js +0 -22
- package/dist/icons/io5/IoInformationCircleOutline.js +0 -50
- package/dist/icons/io5/IoSettingsOutline.js +0 -22
- package/dist/icons/io5/IoWarningOutline.js +0 -40
- package/dist/icons/lu/LuArrowRight.js +0 -27
- package/dist/icons/lu/LuBadgeCheck.js +0 -27
- package/dist/icons/lu/LuBraces.js +0 -27
- package/dist/icons/lu/LuBrainCircuit.js +0 -101
- package/dist/icons/lu/LuCalendar.js +0 -46
- package/dist/icons/lu/LuCheck.js +0 -23
- package/dist/icons/lu/LuChevronLeft.js +0 -23
- package/dist/icons/lu/LuChevronRight.js +0 -23
- package/dist/icons/lu/LuCode.js +0 -27
- package/dist/icons/lu/LuExternalLink.js +0 -35
- package/dist/icons/lu/LuEye.js +0 -31
- package/dist/icons/lu/LuEyeOff.js +0 -40
- package/dist/icons/lu/LuFolderTree.js +0 -40
- package/dist/icons/lu/LuIdCard.js +0 -55
- package/dist/icons/lu/LuKeyboard.js +0 -71
- package/dist/icons/lu/LuLogs.js +0 -65
- package/dist/icons/lu/LuMail.js +0 -33
- package/dist/icons/lu/LuMegaphone.js +0 -27
- package/dist/icons/lu/LuMoon.js +0 -23
- package/dist/icons/lu/LuNetwork.js +0 -63
- package/dist/icons/lu/LuPartyPopper.js +0 -65
- package/dist/icons/lu/LuSettings2.js +0 -48
- package/dist/icons/lu/LuSheet.js +0 -72
- package/dist/icons/lu/LuShield.js +0 -23
- package/dist/icons/lu/LuSun.js +0 -69
- package/dist/icons/lu/LuTextCursorInput.js +0 -45
- package/dist/icons/lu/LuX.js +0 -27
- package/dist/icons/lu/LuZoomIn.js +0 -59
- package/dist/icons/lu/LuZoomOut.js +0 -49
- package/dist/icons/md/MdClear.js +0 -23
- package/dist/icons/md/MdDragHandle.js +0 -23
- package/dist/icons/md/MdInstallDesktop.js +0 -31
- package/dist/icons/md/MdOutlineAttachMoney.js +0 -23
- package/dist/icons/md/MdOutlineMoneyOff.js +0 -23
- package/dist/icons/md/MdPieChart.js +0 -23
- package/dist/icons/md/MdRefresh.js +0 -23
- package/dist/icons/md/MdReplay.js +0 -23
- package/dist/icons/md/MdSmartphone.js +0 -23
- package/dist/icons/pi/PiArrowBendUpRightBold.js +0 -19
- package/dist/icons/pi/PiPlugsConnectedFill.js +0 -19
- package/dist/icons/pi/PiRectangleDashed.js +0 -19
- package/dist/icons/pi/PiShareBold.js +0 -19
- package/dist/icons/si/SiAnthropic.js +0 -19
- package/dist/icons/si/SiHelm.js +0 -19
- package/dist/icons/si/SiKubernetes.js +0 -19
- package/dist/icons/tb/TbAlertTriangle.js +0 -35
- package/dist/icons/tb/TbAlertTriangleFilled.js +0 -19
- package/dist/icons/tb/TbApi.js +0 -40
- package/dist/icons/tb/TbBrain.js +0 -50
- package/dist/icons/tb/TbBuildingTunnel.js +0 -65
- package/dist/icons/tb/TbEdit.js +0 -35
- package/dist/icons/tb/TbLayoutSidebar.js +0 -27
- package/dist/icons/tb/TbLayoutSidebarLeftCollapse.js +0 -35
- package/dist/icons/tb/TbLayoutSidebarRightCollapse.js +0 -35
- package/dist/icons/tb/TbUser.js +0 -27
- package/dist/icons/tb/TbUserOff.js +0 -35
- package/dist/icons/tb/TbWorldShare.js +0 -55
- package/dist/icons/tb/TbWorldWww.js +0 -65
- package/dist/icons/ti/TiArrowSortedDown.js +0 -20
- package/dist/icons/ti/TiArrowSortedUp.js +0 -20
- package/dist/icons/ti/TiArrowUnsorted.js +0 -20
- package/dist/icons/ti/TiCancel.js +0 -20
- package/dist/icons/vsc/VscChromeMinimize.js +0 -19
- package/dist/icons/vsc/VscJson.js +0 -19
- package/dist/icons/vsc/VscLayoutSidebarLeft.js +0 -19
- package/dist/icons/vsc/VscPass.js +0 -27
- package/dist/icons/vsc/VscSplitHorizontal.js +0 -19
- package/dist/icons/vsc/VscTerminalPowershell.js +0 -19
- package/dist/list/ListPager.d.ts +0 -14
- package/dist/list/ListPager.js +0 -62
- package/dist/list/textEntry.d.ts +0 -2
- package/dist/list/textEntry.js +0 -10
- /package/dist/{ai/ui/codeBreaks.d.ts → components/markdownCodeBreaks.d.ts} +0 -0
|
@@ -1,12 +1,27 @@
|
|
|
1
1
|
//#region src/form/utils/fieldPath.ts
|
|
2
2
|
/**
|
|
3
|
-
* A field's path as the form store names it
|
|
4
|
-
*
|
|
5
|
-
*
|
|
3
|
+
* A field's path as the form store names it, from any way a path to it is written: a workflow's
|
|
4
|
+
* `hosts[0].cpus`, the store's own `hosts.0.cpus`, or a JSON Pointer such as `#/hosts/0/cpus`, as a
|
|
5
|
+
* problem response locates a field. A workflow writes rows with brackets, but the store tells a field
|
|
6
|
+
* of a change by a path it starts, so a row's fields hear a change to their list only when both name
|
|
7
|
+
* it with dots.
|
|
6
8
|
*/
|
|
7
9
|
function fieldPath(path) {
|
|
10
|
+
if (path.startsWith("#") || path.startsWith("/")) return pointerPath(path);
|
|
8
11
|
return path.replace(/\[(\d+)\]/g, ".$1");
|
|
9
12
|
}
|
|
13
|
+
/** A JSON Pointer's path in the store, decoding a URI fragment's escapes and then the pointer's own. */
|
|
14
|
+
function pointerPath(pointer) {
|
|
15
|
+
const fragment = pointer.startsWith("#");
|
|
16
|
+
return (fragment ? pointer.slice(1) : pointer).split("/").slice(1).map((segment) => (fragment ? safeDecode(segment) : segment).replaceAll("~1", "/").replaceAll("~0", "~")).join(".");
|
|
17
|
+
}
|
|
18
|
+
function safeDecode(segment) {
|
|
19
|
+
try {
|
|
20
|
+
return decodeURIComponent(segment);
|
|
21
|
+
} catch {
|
|
22
|
+
return segment;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
10
25
|
/** The index of the innermost row a path is in, or undefined outside every list. */
|
|
11
26
|
function rowIndexOf(path) {
|
|
12
27
|
const index = fieldPath(path).split(".").findLast((segment) => /^\d+$/.test(segment));
|
|
@@ -1,8 +1 @@
|
|
|
1
|
-
type SecondaryOption = {
|
|
2
|
-
value?: unknown;
|
|
3
|
-
secondaryValue?: unknown;
|
|
4
|
-
options?: unknown[];
|
|
5
|
-
};
|
|
6
|
-
export declare function findSecondaryOption(options: unknown[], value: unknown): SecondaryOption | undefined;
|
|
7
1
|
export declare function applySecondaryField(secondaryField: string | string[] | undefined, secondaryValue: unknown, setFieldValue: (field: string, value: unknown) => void): void;
|
|
8
|
-
export {};
|
|
@@ -1,15 +1,4 @@
|
|
|
1
1
|
//#region src/form/utils/secondaryField.ts
|
|
2
|
-
function findSecondaryOption(options, value) {
|
|
3
|
-
for (const candidate of options) {
|
|
4
|
-
if (!candidate || typeof candidate !== "object") continue;
|
|
5
|
-
const option = candidate;
|
|
6
|
-
if (option.value === value) return option;
|
|
7
|
-
if (Array.isArray(option.options)) {
|
|
8
|
-
const nestedOption = findSecondaryOption(option.options, value);
|
|
9
|
-
if (nestedOption) return nestedOption;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
2
|
function applySecondaryField(secondaryField, secondaryValue, setFieldValue) {
|
|
14
3
|
if (secondaryField === void 0 || secondaryValue === void 0) return;
|
|
15
4
|
const fields = Array.isArray(secondaryField) ? secondaryField : [secondaryField];
|
|
@@ -19,4 +8,4 @@ function applySecondaryField(secondaryField, secondaryValue, setFieldValue) {
|
|
|
19
8
|
});
|
|
20
9
|
}
|
|
21
10
|
//#endregion
|
|
22
|
-
export { applySecondaryField
|
|
11
|
+
export { applySecondaryField };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/** A field the server rejected. */
|
|
2
|
+
export interface ServerError {
|
|
3
|
+
/** The field's path, written any way: a workflow's `hosts[0].cpus`, a problem response's JSON
|
|
4
|
+
* Pointer `#/hosts/0/cpus`, or `hosts.0.cpus`. */
|
|
5
|
+
path: string;
|
|
6
|
+
/** Why, in the reader's language; without one the field says to check its value. */
|
|
7
|
+
message?: string | undefined;
|
|
8
|
+
}
|
|
9
|
+
/** The field a form renders and needs a value in, and what it says while it has none. Its input's
|
|
10
|
+
* `useFieldValue` gives the form's store the rule, because the store keeps only the rules the
|
|
11
|
+
* field's own controller registers. */
|
|
12
|
+
export interface RequiredField {
|
|
13
|
+
name: string;
|
|
14
|
+
message: string;
|
|
15
|
+
}
|
|
16
|
+
export declare const RequiredFieldContext: import("react").Context<RequiredField | null>;
|
|
17
|
+
/** Whether a field holds a value: an empty string or list, like none at all, does not. */
|
|
18
|
+
export declare function filled(value: unknown): boolean;
|
|
19
|
+
export interface FormChecks {
|
|
20
|
+
/** The server's errors the person hasn't yet answered, by store path. */
|
|
21
|
+
serverErrors: ReadonlySet<string>;
|
|
22
|
+
/** Changes each time the host reports a new set, so a wizard turns to the first once. */
|
|
23
|
+
serverErrorsKey: string;
|
|
24
|
+
/** Runs a check of the form, a `trigger` or `handleSubmit`. The server's errors never hold the
|
|
25
|
+
* person back, since the server checks again, so they step aside while it runs and come back on
|
|
26
|
+
* the fields where it found nothing. */
|
|
27
|
+
check: <T>(run: () => Promise<T>) => Promise<T>;
|
|
28
|
+
}
|
|
29
|
+
export declare const FormChecksContext: import("react").Context<FormChecks>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { createContext } from "react";
|
|
2
|
+
//#region src/form/validation.ts
|
|
3
|
+
var RequiredFieldContext = createContext(null);
|
|
4
|
+
/** Whether a field holds a value: an empty string or list, like none at all, does not. */
|
|
5
|
+
function filled(value) {
|
|
6
|
+
return !(value === void 0 || value === null || value === "" || Array.isArray(value) && value.length === 0);
|
|
7
|
+
}
|
|
8
|
+
var FormChecksContext = createContext({
|
|
9
|
+
serverErrors: /* @__PURE__ */ new Set(),
|
|
10
|
+
serverErrorsKey: "",
|
|
11
|
+
check: (run) => run()
|
|
12
|
+
});
|
|
13
|
+
//#endregion
|
|
14
|
+
export { FormChecksContext, RequiredFieldContext, filled };
|
package/dist/format.d.ts
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { DateTime, Duration } from 'luxon';
|
|
2
|
+
/** A size in bytes the way a file list shows it: 512 B, 1.5 KB, 2.25 GB,
|
|
3
|
+
* counting in 1024s. */
|
|
4
|
+
export declare function formatBytes(bytes: number): string;
|
|
5
|
+
/** A count short enough for a status line: 512, 1.2K, 3.4M. */
|
|
6
|
+
export declare function formatCount(n: number): string;
|
|
7
|
+
/** 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
|
+
export declare function formatDuration(value: number | Duration): string;
|
|
10
|
+
/** A moment as an ISO string, milliseconds, a Date or a luxon DateTime. */
|
|
11
|
+
export type TimeValue = string | number | Date | DateTime | null | undefined;
|
|
12
|
+
/** The moment `value` names, or null when it is missing or invalid. */
|
|
13
|
+
export declare function toDateTime(value: TimeValue): DateTime | null;
|
|
14
|
+
declare const DATE_TIME_STYLES: {
|
|
15
|
+
readonly date: Intl.DateTimeFormatOptions;
|
|
16
|
+
readonly short: Intl.DateTimeFormatOptions;
|
|
17
|
+
readonly medium: Intl.DateTimeFormatOptions;
|
|
18
|
+
readonly seconds: Intl.DateTimeFormatOptions;
|
|
19
|
+
};
|
|
20
|
+
/** 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", and `seconds` adds
|
|
22
|
+
* the seconds. Empty for a missing or invalid time. */
|
|
23
|
+
export declare function formatDateTime(value: TimeValue, style?: keyof typeof DATE_TIME_STYLES): string;
|
|
24
|
+
/** Time left, rounded the way a countdown reads: whole seconds under a minute,
|
|
25
|
+
* minutes and seconds under an hour, then hours and minutes. Null once only a
|
|
26
|
+
* few seconds remain, for the caller's "almost done". */
|
|
27
|
+
export declare function formatTimeLeft(seconds: number): string | null;
|
|
28
|
+
export {};
|
package/dist/format.js
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { DateTime, Duration } from "luxon";
|
|
2
|
+
//#region src/format.ts
|
|
3
|
+
var sizeNumber = new Intl.NumberFormat(void 0, { maximumFractionDigits: 2 });
|
|
4
|
+
var BYTE_UNITS = [
|
|
5
|
+
"B",
|
|
6
|
+
"KB",
|
|
7
|
+
"MB",
|
|
8
|
+
"GB",
|
|
9
|
+
"TB",
|
|
10
|
+
"PB"
|
|
11
|
+
];
|
|
12
|
+
/** A size in bytes the way a file list shows it: 512 B, 1.5 KB, 2.25 GB,
|
|
13
|
+
* counting in 1024s. */
|
|
14
|
+
function formatBytes(bytes) {
|
|
15
|
+
if (!Number.isFinite(bytes) || bytes < 1) return `${sizeNumber.format(0)} B`;
|
|
16
|
+
const unit = Math.min(Math.floor(Math.log(bytes) / Math.log(1024)), BYTE_UNITS.length - 1);
|
|
17
|
+
return `${sizeNumber.format(bytes / 1024 ** unit)} ${BYTE_UNITS[unit]}`;
|
|
18
|
+
}
|
|
19
|
+
var countNumber = new Intl.NumberFormat(void 0, {
|
|
20
|
+
notation: "compact",
|
|
21
|
+
maximumFractionDigits: 1
|
|
22
|
+
});
|
|
23
|
+
/** A count short enough for a status line: 512, 1.2K, 3.4M. */
|
|
24
|
+
function formatCount(n) {
|
|
25
|
+
return countNumber.format(n);
|
|
26
|
+
}
|
|
27
|
+
var UNIT_DISPLAY = { ja: "short" };
|
|
28
|
+
/** 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
|
+
function formatDuration(value) {
|
|
31
|
+
const duration = typeof value === "number" ? Duration.fromMillis(value) : value;
|
|
32
|
+
const parts = duration.shiftTo("days", "hours", "minutes", "seconds").toObject();
|
|
33
|
+
if (parts.seconds !== void 0) parts.seconds = Math.round(parts.seconds);
|
|
34
|
+
const shown = Object.fromEntries(Object.entries(parts).filter(([, n]) => n !== 0).map(([unit, n]) => [unit, Math.abs(n)]));
|
|
35
|
+
const human = Duration.fromObject(Object.keys(shown).length > 0 ? shown : { seconds: 0 }, duration.locale ? { locale: duration.locale } : {});
|
|
36
|
+
return human.toHuman({ unitDisplay: UNIT_DISPLAY[human.locale?.split("-")[0] ?? ""] ?? "narrow" }).replaceAll(/[,、]/g, "");
|
|
37
|
+
}
|
|
38
|
+
/** The moment `value` names, or null when it is missing or invalid. */
|
|
39
|
+
function toDateTime(value) {
|
|
40
|
+
if (value === null || value === void 0 || value === "") return null;
|
|
41
|
+
const time = typeof value === "string" ? DateTime.fromISO(value) : typeof value === "number" ? DateTime.fromMillis(value) : value instanceof Date ? DateTime.fromJSDate(value) : value;
|
|
42
|
+
return time.isValid ? time : null;
|
|
43
|
+
}
|
|
44
|
+
var DATE_TIME_STYLES = {
|
|
45
|
+
date: DateTime.DATE_MED,
|
|
46
|
+
short: DateTime.DATETIME_SHORT,
|
|
47
|
+
medium: DateTime.DATETIME_MED,
|
|
48
|
+
seconds: DateTime.DATETIME_MED_WITH_SECONDS
|
|
49
|
+
};
|
|
50
|
+
/** 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", and `seconds` adds
|
|
52
|
+
* the seconds. Empty for a missing or invalid time. */
|
|
53
|
+
function formatDateTime(value, style = "medium") {
|
|
54
|
+
return toDateTime(value)?.toLocaleString(DATE_TIME_STYLES[style]) ?? "";
|
|
55
|
+
}
|
|
56
|
+
/** Time left, rounded the way a countdown reads: whole seconds under a minute,
|
|
57
|
+
* minutes and seconds under an hour, then hours and minutes. Null once only a
|
|
58
|
+
* few seconds remain, for the caller's "almost done". */
|
|
59
|
+
function formatTimeLeft(seconds) {
|
|
60
|
+
if (seconds < 5) return null;
|
|
61
|
+
return formatDuration((seconds < 3600 ? Math.round(seconds) : Math.ceil(seconds / 60) * 60) * 1e3);
|
|
62
|
+
}
|
|
63
|
+
//#endregion
|
|
64
|
+
export { formatBytes, formatCount, formatDateTime, formatDuration, formatTimeLeft, toDateTime };
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { FaInfoCircle } from "../icons/fa/FaInfoCircle.js";
|
|
4
|
-
import { IoWarningOutline } from "../icons/io5/IoWarningOutline.js";
|
|
5
|
-
import { LuChevronRight } from "../icons/lu/LuChevronRight.js";
|
|
1
|
+
import { cx } from "../cx.js";
|
|
2
|
+
import { ChevronDownIcon, ChevronRightIcon, ErrorIcon, InfoIcon, WarningIcon } from "../icons.js";
|
|
6
3
|
import { keyedByContent } from "../components/keys.js";
|
|
7
|
-
import {
|
|
4
|
+
import { useStrings } from "../components/Provider.js";
|
|
8
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
6
|
import { useState } from "react";
|
|
10
7
|
//#region src/graph/AnnotationBanner.tsx
|
|
@@ -15,22 +12,19 @@ var typeOrder = {
|
|
|
15
12
|
};
|
|
16
13
|
var typeConfig = {
|
|
17
14
|
error: {
|
|
18
|
-
icon:
|
|
19
|
-
label: "Error",
|
|
15
|
+
icon: ErrorIcon,
|
|
20
16
|
accentClass: "text-red-500",
|
|
21
17
|
bgClass: "bg-red-500/5 dark:bg-red-500/10",
|
|
22
18
|
countBg: "bg-red-500/15 text-red-700 dark:text-red-400"
|
|
23
19
|
},
|
|
24
20
|
warning: {
|
|
25
|
-
icon:
|
|
26
|
-
label: "Warning",
|
|
21
|
+
icon: WarningIcon,
|
|
27
22
|
accentClass: "text-yellow-500",
|
|
28
23
|
bgClass: "bg-yellow-500/5 dark:bg-yellow-500/10",
|
|
29
24
|
countBg: "bg-yellow-500/15 text-yellow-700 dark:text-yellow-400"
|
|
30
25
|
},
|
|
31
26
|
notice: {
|
|
32
|
-
icon:
|
|
33
|
-
label: "Notice",
|
|
27
|
+
icon: InfoIcon,
|
|
34
28
|
accentClass: "text-blue-500",
|
|
35
29
|
bgClass: "bg-blue-500/5 dark:bg-blue-500/10",
|
|
36
30
|
countBg: "bg-blue-500/15 text-blue-700 dark:text-blue-400"
|
|
@@ -67,6 +61,7 @@ function collectAnnotations(executedJobs, parentPath) {
|
|
|
67
61
|
}
|
|
68
62
|
function AnnotationBanner({ executedJobs }) {
|
|
69
63
|
const [expanded, setExpanded] = useState(false);
|
|
64
|
+
const { dag: t } = useStrings();
|
|
70
65
|
const annotations = collectAnnotations(executedJobs);
|
|
71
66
|
if (annotations.length === 0) return null;
|
|
72
67
|
const counts = {
|
|
@@ -75,18 +70,18 @@ function AnnotationBanner({ executedJobs }) {
|
|
|
75
70
|
notice: 0
|
|
76
71
|
};
|
|
77
72
|
for (const a of annotations) counts[a.type]++;
|
|
78
|
-
const ChevronIcon = expanded ?
|
|
73
|
+
const ChevronIcon = expanded ? ChevronDownIcon : ChevronRightIcon;
|
|
79
74
|
return /* @__PURE__ */ jsxs("div", {
|
|
80
|
-
className:
|
|
75
|
+
className: cx("rounded-lg border border-[var(--theme-border)] overflow-hidden", "bg-[var(--theme-panel-bg)]"),
|
|
81
76
|
children: [/* @__PURE__ */ jsxs("button", {
|
|
82
77
|
type: "button",
|
|
83
78
|
onClick: () => setExpanded((prev) => !prev),
|
|
84
|
-
className:
|
|
79
|
+
className: cx("w-full flex items-center gap-3 px-4 py-2.5 text-left", "hover:bg-[var(--theme-hover)] transition-colors", expanded && "border-b border-[var(--theme-border)]"),
|
|
85
80
|
children: [
|
|
86
81
|
/* @__PURE__ */ jsx(ChevronIcon, { className: "w-3.5 h-3.5 text-[var(--theme-muted-text-color)] shrink-0" }),
|
|
87
82
|
/* @__PURE__ */ jsx("span", {
|
|
88
|
-
className: "text-sm font-medium text-[var(--theme-
|
|
89
|
-
children:
|
|
83
|
+
className: "text-sm font-medium text-[var(--theme-app)]",
|
|
84
|
+
children: t.annotations
|
|
90
85
|
}),
|
|
91
86
|
/* @__PURE__ */ jsx("div", {
|
|
92
87
|
className: "flex items-center gap-1.5",
|
|
@@ -99,7 +94,7 @@ function AnnotationBanner({ executedJobs }) {
|
|
|
99
94
|
const config = typeConfig[type];
|
|
100
95
|
const Icon = config.icon;
|
|
101
96
|
return /* @__PURE__ */ jsxs("span", {
|
|
102
|
-
className:
|
|
97
|
+
className: cx("inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium", config.countBg),
|
|
103
98
|
children: [/* @__PURE__ */ jsx(Icon, { className: "w-3 h-3" }), counts[type]]
|
|
104
99
|
}, type);
|
|
105
100
|
})
|
|
@@ -111,28 +106,22 @@ function AnnotationBanner({ executedJobs }) {
|
|
|
111
106
|
const config = typeConfig[annotation.type] || typeConfig.notice;
|
|
112
107
|
const Icon = config.icon;
|
|
113
108
|
return /* @__PURE__ */ jsxs("div", {
|
|
114
|
-
className:
|
|
115
|
-
children: [/* @__PURE__ */ jsx(Icon, { className:
|
|
109
|
+
className: cx("flex items-start gap-2.5 px-4 py-2 text-sm", config.bgClass),
|
|
110
|
+
children: [/* @__PURE__ */ jsx(Icon, { className: cx("w-4 h-4 mt-0.5 shrink-0", config.accentClass) }), /* @__PURE__ */ jsxs("div", {
|
|
116
111
|
className: "flex-1 min-w-0",
|
|
117
112
|
children: [
|
|
118
113
|
/* @__PURE__ */ jsxs("span", {
|
|
119
|
-
className:
|
|
120
|
-
children: [annotation.title ||
|
|
114
|
+
className: cx("font-medium", config.accentClass),
|
|
115
|
+
children: [annotation.title || t.annotationType[annotation.type] || t.annotationType.notice, ":"]
|
|
121
116
|
}),
|
|
122
117
|
" ",
|
|
123
118
|
/* @__PURE__ */ jsx("span", {
|
|
124
|
-
className: "text-[var(--theme-
|
|
119
|
+
className: "text-[var(--theme-app)]",
|
|
125
120
|
children: annotation.message
|
|
126
121
|
}),
|
|
127
|
-
/* @__PURE__ */
|
|
122
|
+
/* @__PURE__ */ jsx("span", {
|
|
128
123
|
className: "text-[var(--theme-muted-text-color)] ml-2 text-xs",
|
|
129
|
-
children:
|
|
130
|
-
"in ",
|
|
131
|
-
annotation.jobName,
|
|
132
|
-
" →",
|
|
133
|
-
" ",
|
|
134
|
-
annotation.stepName || `step ${annotation.stepIndex}`
|
|
135
|
-
]
|
|
124
|
+
children: t.annotationSource(annotation.jobName, annotation.stepName || t.stepNumber(annotation.stepIndex))
|
|
136
125
|
})
|
|
137
126
|
]
|
|
138
127
|
})]
|
package/dist/graph/Connectors.js
CHANGED
|
@@ -4,7 +4,7 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
|
4
4
|
import { memo, useMemo } from "react";
|
|
5
5
|
//#region src/graph/Connectors.tsx
|
|
6
6
|
var CONNECTOR_COLOR = "var(--theme-border)";
|
|
7
|
-
var HIGHLIGHT_COLOR = "var(--theme-
|
|
7
|
+
var HIGHLIGHT_COLOR = "var(--theme-accent)";
|
|
8
8
|
var PANEL_COLOR = "var(--theme-panel-bg)";
|
|
9
9
|
var STROKE = 6;
|
|
10
10
|
var KEYFRAMES = [
|
|
@@ -1,21 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { LuChevronLeft } from "../icons/lu/LuChevronLeft.js";
|
|
5
|
-
import { LuChevronRight } from "../icons/lu/LuChevronRight.js";
|
|
6
|
-
import { LuZoomIn } from "../icons/lu/LuZoomIn.js";
|
|
7
|
-
import { LuZoomOut } from "../icons/lu/LuZoomOut.js";
|
|
1
|
+
import { cx } from "../cx.js";
|
|
2
|
+
import { ArrowLeftIcon, ArrowRightIcon, ChevronLeftIcon, ChevronRightIcon, FileTextIcon, ZoomInIcon, ZoomOutIcon } from "../icons.js";
|
|
3
|
+
import { Loader } from "../components/Loader.js";
|
|
8
4
|
import { useRunFile, useSlots, useStrings, useWorkflowEngine } from "../components/Provider.js";
|
|
5
|
+
import { Button } from "../components/Button.js";
|
|
9
6
|
import { Modal } from "../components/Modal.js";
|
|
7
|
+
import { DisclosurePanel } from "../components/Disclosure.js";
|
|
10
8
|
import { InfoTip } from "../components/InfoTip.js";
|
|
11
9
|
import { IconButton } from "../components/IconButton.js";
|
|
12
|
-
import {
|
|
13
|
-
import
|
|
10
|
+
import { formatDateTime } from "../format.js";
|
|
11
|
+
import { Elapsed } from "../components/relativeTime.js";
|
|
12
|
+
import { RunStatusIcon } from "../components/RunStatusIcon.js";
|
|
14
13
|
import { LogViewer } from "../logviewer/LogViewer.js";
|
|
15
|
-
import { toAbsHumanDuration } from "../duration.js";
|
|
16
14
|
import { initializeValues } from "../form/lib.js";
|
|
17
15
|
import { AnnotationBanner } from "./AnnotationBanner.js";
|
|
18
|
-
import { Collapse } from "./Collapse.js";
|
|
19
16
|
import { jobLabel, toggled } from "./util.js";
|
|
20
17
|
import { EDITOR_HANDLE_CLASS, GraphEditorProvider, useGraphEditor, useSelectedEdges } from "./graphEditorState.js";
|
|
21
18
|
import { EdgeEnds, EdgeHitPath, EmptyGraphEditor, GraphEditorCanvas, NodePorts } from "./editorRows.js";
|
|
@@ -32,7 +29,6 @@ import { computeGraphLayout, displayJobsOf, hopDistances, positionsOf } from "./
|
|
|
32
29
|
import { MatrixGroupNode, MatrixGroupSummaryItem } from "./MatrixGroup.js";
|
|
33
30
|
import TreeView from "./TreeView.js";
|
|
34
31
|
import { FIT_MAX_SCALE, MIN_SCALE, ZOOM_STEP, fitMargin, fitView, intoView, wheelFactor, zoomAround, zoomLimit } from "./viewport.js";
|
|
35
|
-
import { clsx } from "clsx";
|
|
36
32
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
37
33
|
import { Fragment as Fragment$1, Suspense, createContext, lazy, memo, useCallback, useContext, useEffect, useMemo, useRef, useState } from "react";
|
|
38
34
|
import { flushSync } from "react-dom";
|
|
@@ -40,32 +36,33 @@ import { DateTime } from "luxon";
|
|
|
40
36
|
import { TransformComponent, TransformWrapper } from "react-zoom-pan-pinch";
|
|
41
37
|
//#region src/graph/DependencyGraph.tsx
|
|
42
38
|
function ViewToggle({ viewMode, setViewMode }) {
|
|
39
|
+
const { dag: t } = useStrings();
|
|
43
40
|
return /* @__PURE__ */ jsxs("div", {
|
|
44
41
|
className: "flex border border-[var(--theme-border)] rounded overflow-hidden",
|
|
45
42
|
children: [/* @__PURE__ */ jsx("button", {
|
|
46
43
|
type: "button",
|
|
47
44
|
onClick: () => setViewMode("dag"),
|
|
48
|
-
className:
|
|
49
|
-
children:
|
|
45
|
+
className: cx("px-3 py-1.5 text-xs font-mono transition-colors", viewMode === "dag" ? "bg-[var(--theme-accent)] text-[var(--theme-accent-text)]" : "text-[var(--theme-muted-text-color)] hover:text-[var(--theme-app)] hover:bg-[var(--theme-hover)]"),
|
|
46
|
+
children: t.graphView
|
|
50
47
|
}), /* @__PURE__ */ jsx("button", {
|
|
51
48
|
type: "button",
|
|
52
49
|
onClick: () => setViewMode("tree"),
|
|
53
|
-
className:
|
|
54
|
-
children:
|
|
50
|
+
className: cx("px-3 py-1.5 text-xs font-mono transition-colors", viewMode === "tree" ? "bg-[var(--theme-accent)] text-[var(--theme-accent-text)]" : "text-[var(--theme-muted-text-color)] hover:text-[var(--theme-app)] hover:bg-[var(--theme-hover)]"),
|
|
51
|
+
children: t.treeView
|
|
55
52
|
})]
|
|
56
53
|
});
|
|
57
54
|
}
|
|
58
55
|
var VIEW_BAR = "flex max-w-full flex-wrap items-center justify-end gap-0.5 rounded-md border theme-border bg-(--theme-panel-bg) p-0.5";
|
|
59
56
|
/** The graph's view buttons, the same wherever a graph is drawn. */
|
|
60
57
|
function GraphViewControls({ history, expand, onReset, onZoom, zoomedAll }) {
|
|
61
|
-
const { dag } = useStrings();
|
|
58
|
+
const { common, dag } = useStrings();
|
|
62
59
|
const chip = "flex h-7 cursor-pointer items-center whitespace-nowrap rounded px-2 text-xs theme-hover";
|
|
63
60
|
return /* @__PURE__ */ jsxs("div", {
|
|
64
61
|
className: VIEW_BAR,
|
|
65
62
|
children: [
|
|
66
63
|
history && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
67
64
|
/* @__PURE__ */ jsx(IconButton, {
|
|
68
|
-
icon: /* @__PURE__ */ jsx(
|
|
65
|
+
icon: /* @__PURE__ */ jsx(ChevronLeftIcon, {}),
|
|
69
66
|
label: dag.previousGraph,
|
|
70
67
|
size: "sm",
|
|
71
68
|
variant: "ghost",
|
|
@@ -73,7 +70,7 @@ function GraphViewControls({ history, expand, onReset, onZoom, zoomedAll }) {
|
|
|
73
70
|
onClick: history.back
|
|
74
71
|
}),
|
|
75
72
|
/* @__PURE__ */ jsx(IconButton, {
|
|
76
|
-
icon: /* @__PURE__ */ jsx(
|
|
73
|
+
icon: /* @__PURE__ */ jsx(ChevronRightIcon, {}),
|
|
77
74
|
label: dag.nextGraph,
|
|
78
75
|
size: "sm",
|
|
79
76
|
variant: "ghost",
|
|
@@ -96,16 +93,16 @@ function GraphViewControls({ history, expand, onReset, onZoom, zoomedAll }) {
|
|
|
96
93
|
}),
|
|
97
94
|
/* @__PURE__ */ jsx("div", { className: "mx-0.5 h-5 w-px bg-(--theme-border)" }),
|
|
98
95
|
/* @__PURE__ */ jsx(IconButton, {
|
|
99
|
-
icon: /* @__PURE__ */ jsx(
|
|
100
|
-
label:
|
|
96
|
+
icon: /* @__PURE__ */ jsx(ZoomOutIcon, {}),
|
|
97
|
+
label: common.zoomOut,
|
|
101
98
|
size: "sm",
|
|
102
99
|
variant: "ghost",
|
|
103
100
|
disabled: zoomedAll === "out",
|
|
104
101
|
onClick: () => onZoom(-1)
|
|
105
102
|
}),
|
|
106
103
|
/* @__PURE__ */ jsx(IconButton, {
|
|
107
|
-
icon: /* @__PURE__ */ jsx(
|
|
108
|
-
label:
|
|
104
|
+
icon: /* @__PURE__ */ jsx(ZoomInIcon, {}),
|
|
105
|
+
label: common.zoomIn,
|
|
109
106
|
size: "sm",
|
|
110
107
|
variant: "ghost",
|
|
111
108
|
disabled: zoomedAll === "in",
|
|
@@ -570,7 +567,7 @@ function EditorEdges({ edges, cols, boxes, selected, zBase, size }) {
|
|
|
570
567
|
style: { zIndex: 1 + zBase },
|
|
571
568
|
children: edges.map(({ from, to, path }) => /* @__PURE__ */ jsxs(Fragment$1, { children: [chosen.has(`${from}→${to}`) && /* @__PURE__ */ jsx("path", {
|
|
572
569
|
d: path.d,
|
|
573
|
-
stroke: "var(--theme-
|
|
570
|
+
stroke: "var(--theme-accent)",
|
|
574
571
|
strokeWidth: "10",
|
|
575
572
|
fill: "transparent"
|
|
576
573
|
}), /* @__PURE__ */ jsx(EdgeHitPath, {
|
|
@@ -597,8 +594,8 @@ function SidebarJobs({ jobs, pathPrefix, preview, stepsOpen, toggleSteps, expand
|
|
|
597
594
|
toggleSubworkflow,
|
|
598
595
|
openInNewGraph,
|
|
599
596
|
setSublogOpen,
|
|
600
|
-
renderWell: (subJobs, subPrefix, expanded) => /* @__PURE__ */ jsx(
|
|
601
|
-
expanded,
|
|
597
|
+
renderWell: (subJobs, subPrefix, expanded) => /* @__PURE__ */ jsx(DisclosurePanel, {
|
|
598
|
+
open: expanded,
|
|
602
599
|
children: /* @__PURE__ */ jsx("div", {
|
|
603
600
|
className: "ml-6 mt-0.5 border-l border-(--theme-border) pl-4",
|
|
604
601
|
children: /* @__PURE__ */ jsx(SidebarJobs, {
|
|
@@ -668,16 +665,6 @@ function walkJobPath(root, path) {
|
|
|
668
665
|
}
|
|
669
666
|
return isJobRecord(cursor) ? cursor : {};
|
|
670
667
|
}
|
|
671
|
-
function RunTime({ start, end, finished }) {
|
|
672
|
-
const [now, setNow] = useState(() => DateTime.now());
|
|
673
|
-
const ticking = !end && !finished;
|
|
674
|
-
useEffect(() => {
|
|
675
|
-
if (!ticking) return;
|
|
676
|
-
const timer = setInterval(() => setNow(DateTime.now()), 1e3);
|
|
677
|
-
return () => clearInterval(timer);
|
|
678
|
-
}, [ticking]);
|
|
679
|
-
return toAbsHumanDuration(start, end ?? now);
|
|
680
|
-
}
|
|
681
668
|
function graphBounds(content) {
|
|
682
669
|
const nodes = outerNodes(content);
|
|
683
670
|
if (nodes.length === 0) return null;
|
|
@@ -780,7 +767,7 @@ function DependencyGraph({ run, preview = false, removeBorder, viewMode = "dag",
|
|
|
780
767
|
cancelAnimationFrame(raf);
|
|
781
768
|
};
|
|
782
769
|
}, [preview, fixedHeight]);
|
|
783
|
-
const { dag: dagStrings } = useStrings();
|
|
770
|
+
const { common, dag: dagStrings } = useStrings();
|
|
784
771
|
const slots = useSlots();
|
|
785
772
|
const [executedJobsPath, setExecutedJobsPath] = useState([[]]);
|
|
786
773
|
const [executedJobsPathIdx, setExecutedJobsPathIdx] = useState(0);
|
|
@@ -1143,33 +1130,33 @@ function DependencyGraph({ run, preview = false, removeBorder, viewMode = "dag",
|
|
|
1143
1130
|
}) : void 0;
|
|
1144
1131
|
const startDt = run.createdAt ? DateTime.fromISO(run.createdAt) : shownAt;
|
|
1145
1132
|
const additionalBottomLeftBarComponents = sublogIsStep ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1146
|
-
/* @__PURE__ */
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1133
|
+
/* @__PURE__ */ jsx(IconButton, {
|
|
1134
|
+
variant: "outline",
|
|
1135
|
+
icon: /* @__PURE__ */ jsx(ArrowLeftIcon, {}),
|
|
1136
|
+
label: dagStrings.previousStep,
|
|
1137
|
+
onClick: () => nextStep(true)
|
|
1151
1138
|
}),
|
|
1152
|
-
/* @__PURE__ */
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1139
|
+
/* @__PURE__ */ jsx(IconButton, {
|
|
1140
|
+
variant: "outline",
|
|
1141
|
+
icon: /* @__PURE__ */ jsx(ArrowRightIcon, {}),
|
|
1142
|
+
label: dagStrings.nextStep,
|
|
1143
|
+
onClick: () => nextStep(false)
|
|
1157
1144
|
}),
|
|
1158
1145
|
/* @__PURE__ */ jsx("span", {
|
|
1159
1146
|
className: "pt-0.5 whitespace-pre-wrap text-xs",
|
|
1160
1147
|
children: logName
|
|
1161
1148
|
})
|
|
1162
1149
|
] }) : void 0;
|
|
1163
|
-
const additionalBottomRightBarComponents = (!preview || sublogIsSubworkflow) && sublogIsStep ? /* @__PURE__ */ jsx(
|
|
1164
|
-
|
|
1165
|
-
|
|
1150
|
+
const additionalBottomRightBarComponents = (!preview || sublogIsSubworkflow) && sublogIsStep ? /* @__PURE__ */ jsx(Button, {
|
|
1151
|
+
variant: "secondary",
|
|
1152
|
+
size: "sm",
|
|
1166
1153
|
onClick: () => {
|
|
1167
1154
|
if (sublogIsSubworkflow) {
|
|
1168
1155
|
openInNewGraph(pathAppend, sublogJob, parseInt(sublogStep ?? "", 10));
|
|
1169
1156
|
setSublogOpen("");
|
|
1170
1157
|
} else setSublogOpen(sublogOpen.slice(0, sublogFileStart) + (sublogShowsLog ? "script-unstable-redacted.sh" : "logs.out"));
|
|
1171
1158
|
},
|
|
1172
|
-
children:
|
|
1159
|
+
children: sublogIsSubworkflow ? "Open Subworkflow" : sublogShowsLog ? "Show Script" : "Show Logs"
|
|
1173
1160
|
}) : void 0;
|
|
1174
1161
|
const graph = /* @__PURE__ */ jsxs("div", {
|
|
1175
1162
|
className: "flex flex-col lg:flex-row w-full",
|
|
@@ -1188,12 +1175,12 @@ function DependencyGraph({ run, preview = false, removeBorder, viewMode = "dag",
|
|
|
1188
1175
|
}),
|
|
1189
1176
|
/* @__PURE__ */ jsxs("div", {
|
|
1190
1177
|
className: "font-bold flex items-center gap-x-2",
|
|
1191
|
-
children: [
|
|
1178
|
+
children: [dagStrings.summary, /* @__PURE__ */ jsx("button", {
|
|
1192
1179
|
type: "button",
|
|
1193
|
-
"aria-label":
|
|
1180
|
+
"aria-label": dagStrings.generalLog,
|
|
1194
1181
|
onClick: () => setSublogOpen(generalLogPath),
|
|
1195
1182
|
className: "link",
|
|
1196
|
-
children: /* @__PURE__ */ jsx(
|
|
1183
|
+
children: /* @__PURE__ */ jsx(FileTextIcon, { className: "w-4 h-4" })
|
|
1197
1184
|
})]
|
|
1198
1185
|
}),
|
|
1199
1186
|
/* @__PURE__ */ jsx("div", {
|
|
@@ -1203,7 +1190,7 @@ function DependencyGraph({ run, preview = false, removeBorder, viewMode = "dag",
|
|
|
1203
1190
|
]
|
|
1204
1191
|
}),
|
|
1205
1192
|
/* @__PURE__ */ jsxs("div", {
|
|
1206
|
-
className:
|
|
1193
|
+
className: cx(preview ? "w-full" : "flex-1 min-w-0 mt-2", "h-full flex flex-col gap-y-2"),
|
|
1207
1194
|
children: [
|
|
1208
1195
|
!preview && /* @__PURE__ */ jsxs("div", {
|
|
1209
1196
|
className: "panel w-full border rounded-lg px-4 py-2 flex flex-wrap items-center gap-x-16 gap-y-2",
|
|
@@ -1238,7 +1225,7 @@ function DependencyGraph({ run, preview = false, removeBorder, viewMode = "dag",
|
|
|
1238
1225
|
children: /* @__PURE__ */ jsxs(InfoTip, {
|
|
1239
1226
|
className: "flex items-center gap-x-1",
|
|
1240
1227
|
text: dagStrings.statusReason(run.statusReason) ?? "",
|
|
1241
|
-
children: [/* @__PURE__ */ jsx(
|
|
1228
|
+
children: [/* @__PURE__ */ jsx(RunStatusIcon, { status: runStatus }), dagStrings.statusLabel(runStatus)]
|
|
1242
1229
|
})
|
|
1243
1230
|
})]
|
|
1244
1231
|
}),
|
|
@@ -1249,10 +1236,10 @@ function DependencyGraph({ run, preview = false, removeBorder, viewMode = "dag",
|
|
|
1249
1236
|
children: dagStrings.runtime
|
|
1250
1237
|
}), /* @__PURE__ */ jsx("div", {
|
|
1251
1238
|
className: "text-sm font-semibold flex items-center gap-x-1",
|
|
1252
|
-
children: /* @__PURE__ */ jsx(
|
|
1239
|
+
children: /* @__PURE__ */ jsx(Elapsed, {
|
|
1253
1240
|
start: startDt,
|
|
1254
|
-
end: run.completedAt
|
|
1255
|
-
|
|
1241
|
+
end: run.completedAt,
|
|
1242
|
+
running: !(run.status === "completed" || run.status === "error" || run.status === "canceled")
|
|
1256
1243
|
})
|
|
1257
1244
|
})]
|
|
1258
1245
|
}),
|
|
@@ -1263,7 +1250,7 @@ function DependencyGraph({ run, preview = false, removeBorder, viewMode = "dag",
|
|
|
1263
1250
|
children: dagStrings.submitted
|
|
1264
1251
|
}), /* @__PURE__ */ jsx("div", {
|
|
1265
1252
|
className: "text-sm font-semibold flex items-center gap-x-1",
|
|
1266
|
-
children: startDt
|
|
1253
|
+
children: formatDateTime(startDt, "short")
|
|
1267
1254
|
})]
|
|
1268
1255
|
}),
|
|
1269
1256
|
/* @__PURE__ */ jsx("div", { className: "flex-1" }),
|
|
@@ -1291,7 +1278,7 @@ function DependencyGraph({ run, preview = false, removeBorder, viewMode = "dag",
|
|
|
1291
1278
|
}) : /* @__PURE__ */ jsxs("div", {
|
|
1292
1279
|
ref: setContainerElement,
|
|
1293
1280
|
tabIndex: editor ? -1 : void 0,
|
|
1294
|
-
className:
|
|
1281
|
+
className: cx("panel w-full overflow-hidden relative", removeBorder ? "border-none" : "border", editor && "outline-none"),
|
|
1295
1282
|
style: {
|
|
1296
1283
|
height: fixedHeight ?? (containerHeight !== null ? `${containerHeight}px` : previewHeight !== null ? `${Math.min(previewHeight, windowSize.h * .62)}px` : "62vh"),
|
|
1297
1284
|
minHeight: previewHeight !== null && !fixedHeight ? 0 : 160
|
|
@@ -1325,7 +1312,7 @@ function DependencyGraph({ run, preview = false, removeBorder, viewMode = "dag",
|
|
|
1325
1312
|
} : void 0
|
|
1326
1313
|
} : void 0,
|
|
1327
1314
|
expand: hasExpandable ? {
|
|
1328
|
-
label: allExpanded ?
|
|
1315
|
+
label: allExpanded ? common.collapseAll : common.expandAll,
|
|
1329
1316
|
onClick: toggleExpandAll
|
|
1330
1317
|
} : void 0,
|
|
1331
1318
|
onReset: resetView,
|
|
@@ -1374,9 +1361,8 @@ function DependencyGraph({ run, preview = false, removeBorder, viewMode = "dag",
|
|
|
1374
1361
|
children: /* @__PURE__ */ jsx("div", {
|
|
1375
1362
|
className: "flex w-full",
|
|
1376
1363
|
children: sublogsLoading && (!sublogs || !runNumber) ? /* @__PURE__ */ jsx(Loader, {
|
|
1377
|
-
|
|
1378
|
-
size: 70
|
|
1379
|
-
textSize: 18
|
|
1364
|
+
label: dagStrings.loadingLogs,
|
|
1365
|
+
size: 70
|
|
1380
1366
|
}) : preview ? /* @__PURE__ */ jsxs("div", { children: [slots.yamlViewer?.({
|
|
1381
1367
|
value: currentSublog,
|
|
1382
1368
|
height: window.innerHeight / 1.4,
|