@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,59 +1,55 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { FaAngleUp } from "../icons/fa/FaAngleUp.js";
|
|
4
|
-
import { HiMiniCheckCircle } from "../icons/hi2/HiMiniCheckCircle.js";
|
|
5
|
-
import { IoMdClose } from "../icons/io/IoMdClose.js";
|
|
6
|
-
import { IoCloudUploadOutline } from "../icons/io5/IoCloudUploadOutline.js";
|
|
7
|
-
import { TbAlertTriangle } from "../icons/tb/TbAlertTriangle.js";
|
|
8
|
-
import { VscChromeMinimize } from "../icons/vsc/VscChromeMinimize.js";
|
|
1
|
+
import { cx } from "../cx.js";
|
|
2
|
+
import { ChevronDownIcon, ChevronUpIcon, CloseIcon, ExpandVerticalIcon, MinimizeIcon, SuccessIcon, UploadIcon, WarningIcon } from "../icons.js";
|
|
9
3
|
import { useStrings } from "../components/Provider.js";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
4
|
+
import { Button } from "../components/Button.js";
|
|
5
|
+
import { IconButton } from "../components/IconButton.js";
|
|
6
|
+
import { ProgressBar } from "../components/Meter.js";
|
|
7
|
+
import { formatBytes, formatTimeLeft } from "../format.js";
|
|
12
8
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
13
9
|
import { useState } from "react";
|
|
14
10
|
//#region src/file-explorer/toasts.tsx
|
|
15
11
|
function getSessionStatusInfo(session, queueLength, strings) {
|
|
16
12
|
switch (session.status) {
|
|
17
13
|
case "queued": return {
|
|
18
|
-
icon: /* @__PURE__ */ jsx(
|
|
14
|
+
icon: /* @__PURE__ */ jsx(UploadIcon, { className: "w-5 h-5 text-blue-600" }),
|
|
19
15
|
title: strings.inQueue(session.queueIndex + 1, queueLength),
|
|
20
16
|
shortTitle: strings.queuedShort(session.queueIndex + 1, queueLength),
|
|
21
17
|
bgColor: "bg-blue-100"
|
|
22
18
|
};
|
|
23
19
|
case "uploading": return {
|
|
24
|
-
icon: /* @__PURE__ */ jsx(
|
|
20
|
+
icon: /* @__PURE__ */ jsx(UploadIcon, { className: "w-5 h-5 text-blue-600" }),
|
|
25
21
|
title: strings.uploading,
|
|
26
22
|
shortTitle: strings.uploading,
|
|
27
23
|
bgColor: "bg-blue-100"
|
|
28
24
|
};
|
|
29
25
|
case "completed": return {
|
|
30
|
-
icon: /* @__PURE__ */ jsx(
|
|
26
|
+
icon: /* @__PURE__ */ jsx(SuccessIcon, { className: "w-5 h-5 text-green-600" }),
|
|
31
27
|
title: strings.completeTitle,
|
|
32
|
-
shortTitle: strings.
|
|
28
|
+
shortTitle: strings.completed,
|
|
33
29
|
bgColor: "bg-green-100"
|
|
34
30
|
};
|
|
35
31
|
case "failed": return {
|
|
36
|
-
icon: /* @__PURE__ */ jsx(
|
|
32
|
+
icon: /* @__PURE__ */ jsx(WarningIcon, { className: "w-5 h-5 text-red-600" }),
|
|
37
33
|
title: strings.failedTitle,
|
|
38
|
-
shortTitle: strings.
|
|
34
|
+
shortTitle: strings.failed,
|
|
39
35
|
bgColor: "bg-red-100"
|
|
40
36
|
};
|
|
41
37
|
default: return {
|
|
42
|
-
icon: /* @__PURE__ */ jsx(
|
|
38
|
+
icon: /* @__PURE__ */ jsx(UploadIcon, { className: "w-5 h-5 theme-muted-text" }),
|
|
43
39
|
title: strings.unknownTitle,
|
|
44
40
|
shortTitle: strings.unknownShort,
|
|
45
41
|
bgColor: "bg-(--theme-muted-panel-bg)"
|
|
46
42
|
};
|
|
47
43
|
}
|
|
48
44
|
}
|
|
49
|
-
function
|
|
50
|
-
if (isCompleted) return "
|
|
51
|
-
if (isCancelled) return "
|
|
52
|
-
return isFailed ? "
|
|
45
|
+
function barTone({ isCompleted, isCancelled, isFailed }) {
|
|
46
|
+
if (isCompleted) return "success";
|
|
47
|
+
if (isCancelled) return "muted";
|
|
48
|
+
return isFailed ? "error" : "accent";
|
|
53
49
|
}
|
|
54
50
|
function FileProgressBar({ fileProgress, fileName, onCancelFile }) {
|
|
55
|
-
const
|
|
56
|
-
const
|
|
51
|
+
const { common, fileExplorer } = useStrings();
|
|
52
|
+
const strings = fileExplorer.upload;
|
|
57
53
|
const [showCancelConfirm, setShowCancelConfirm] = useState(false);
|
|
58
54
|
const percentage = fileProgress.percentage || 0;
|
|
59
55
|
const loadedBytes = fileProgress.loadedBytes || 0;
|
|
@@ -62,114 +58,62 @@ function FileProgressBar({ fileProgress, fileName, onCancelFile }) {
|
|
|
62
58
|
const isCancelled = fileProgress.status === "cancelled";
|
|
63
59
|
const isFailed = fileProgress.status === "failed";
|
|
64
60
|
const isSettled = isCompleted || isCancelled || isFailed;
|
|
65
|
-
const isUploading = fileProgress.status === "uploading" || !isSettled;
|
|
66
61
|
const canCancel = !!fileProgress.abortController && !isSettled;
|
|
67
|
-
const
|
|
62
|
+
const stop = (e, then) => {
|
|
68
63
|
e.stopPropagation();
|
|
69
|
-
|
|
70
|
-
};
|
|
71
|
-
const handleConfirmCancel = (e) => {
|
|
72
|
-
e.stopPropagation();
|
|
73
|
-
onCancelFile?.();
|
|
74
|
-
setShowCancelConfirm(false);
|
|
75
|
-
};
|
|
76
|
-
const handleKeepUploading = (e) => {
|
|
77
|
-
e.stopPropagation();
|
|
78
|
-
setShowCancelConfirm(false);
|
|
64
|
+
then();
|
|
79
65
|
};
|
|
80
66
|
return /* @__PURE__ */ jsxs("div", {
|
|
81
|
-
className: "
|
|
82
|
-
children: [
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
isCancelled && strings.cancelled,
|
|
91
|
-
isCompleted && strings.completed,
|
|
92
|
-
isFailed && strings.failed,
|
|
93
|
-
isUploading && `${percentage.toFixed(2)}%`
|
|
94
|
-
]
|
|
95
|
-
})]
|
|
96
|
-
}), /* @__PURE__ */ jsxs("div", {
|
|
97
|
-
className: "flex items-center gap-1",
|
|
98
|
-
children: [
|
|
99
|
-
/* @__PURE__ */ jsx("div", {
|
|
100
|
-
role: "none",
|
|
101
|
-
className: "relative flex-1",
|
|
102
|
-
onMouseEnter: () => setIsHovered(true),
|
|
103
|
-
onMouseLeave: () => setIsHovered(false),
|
|
104
|
-
children: /* @__PURE__ */ jsxs("div", {
|
|
105
|
-
className: clsx("w-full bg-(--theme-border) rounded-full overflow-hidden transition-all duration-300 ease-in-out flex items-center", isHovered && !isCompleted ? "h-6" : "h-2"),
|
|
106
|
-
children: [/* @__PURE__ */ jsx("div", {
|
|
107
|
-
className: clsx("h-full transition-all duration-300 relative flex items-center justify-center", barColor({
|
|
108
|
-
isCompleted,
|
|
109
|
-
isCancelled,
|
|
110
|
-
isFailed
|
|
111
|
-
}), isHovered && "opacity-80"),
|
|
112
|
-
style: { width: `${percentage}%` }
|
|
113
|
-
}), isHovered && !isCompleted && totalBytes > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs("div", {
|
|
114
|
-
className: "absolute inset-0 flex items-center justify-center text-xs whitespace-nowrap p-0.5 z-10",
|
|
115
|
-
style: {
|
|
116
|
-
WebkitClipPath: `inset(0 ${100 - percentage}% 0 0)`,
|
|
117
|
-
color: "white"
|
|
118
|
-
},
|
|
119
|
-
children: [
|
|
120
|
-
formatFileSize(loadedBytes),
|
|
121
|
-
" / ",
|
|
122
|
-
formatFileSize(totalBytes)
|
|
123
|
-
]
|
|
124
|
-
}), /* @__PURE__ */ jsxs("div", {
|
|
125
|
-
className: "absolute inset-0 flex items-center justify-center text-xs whitespace-nowrap p-0.5 z-10",
|
|
126
|
-
style: {
|
|
127
|
-
WebkitClipPath: `inset(0 0 0 ${percentage}%)`,
|
|
128
|
-
color: "black"
|
|
129
|
-
},
|
|
130
|
-
children: [
|
|
131
|
-
formatFileSize(loadedBytes),
|
|
132
|
-
" / ",
|
|
133
|
-
formatFileSize(totalBytes)
|
|
134
|
-
]
|
|
135
|
-
})] })]
|
|
136
|
-
})
|
|
67
|
+
className: "flex items-end gap-1",
|
|
68
|
+
children: [
|
|
69
|
+
/* @__PURE__ */ jsx(ProgressBar, {
|
|
70
|
+
className: "flex-1",
|
|
71
|
+
value: percentage,
|
|
72
|
+
tone: barTone({
|
|
73
|
+
isCompleted,
|
|
74
|
+
isCancelled,
|
|
75
|
+
isFailed
|
|
137
76
|
}),
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
}),
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
77
|
+
label: fileName,
|
|
78
|
+
status: isCancelled ? strings.cancelled : isCompleted ? strings.completed : isFailed ? strings.failed : void 0,
|
|
79
|
+
detail: !isSettled && totalBytes > 0 ? `${formatBytes(loadedBytes)} / ${formatBytes(totalBytes)}` : void 0
|
|
80
|
+
}),
|
|
81
|
+
!showCancelConfirm && canCancel && /* @__PURE__ */ jsx(IconButton, {
|
|
82
|
+
size: "xs",
|
|
83
|
+
label: strings.cancelFile(fileName),
|
|
84
|
+
icon: /* @__PURE__ */ jsx(CloseIcon, {}),
|
|
85
|
+
onClick: (e) => stop(e, () => setShowCancelConfirm(true))
|
|
86
|
+
}),
|
|
87
|
+
showCancelConfirm && canCancel && /* @__PURE__ */ jsxs("div", {
|
|
88
|
+
className: "flex items-center gap-1",
|
|
89
|
+
children: [
|
|
90
|
+
/* @__PURE__ */ jsx("span", {
|
|
91
|
+
className: "text-xs theme-muted-text whitespace-nowrap",
|
|
92
|
+
children: strings.confirmCancelFile
|
|
93
|
+
}),
|
|
94
|
+
/* @__PURE__ */ jsx(Button, {
|
|
95
|
+
variant: "secondary",
|
|
96
|
+
size: "xs",
|
|
97
|
+
onClick: (e) => stop(e, () => setShowCancelConfirm(false)),
|
|
98
|
+
children: common.no
|
|
99
|
+
}),
|
|
100
|
+
/* @__PURE__ */ jsx(Button, {
|
|
101
|
+
variant: "danger",
|
|
102
|
+
size: "xs",
|
|
103
|
+
onClick: (e) => stop(e, () => {
|
|
104
|
+
onCancelFile?.();
|
|
105
|
+
setShowCancelConfirm(false);
|
|
158
106
|
}),
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
})
|
|
165
|
-
]
|
|
166
|
-
})
|
|
167
|
-
]
|
|
168
|
-
})]
|
|
107
|
+
children: common.yes
|
|
108
|
+
})
|
|
109
|
+
]
|
|
110
|
+
})
|
|
111
|
+
]
|
|
169
112
|
});
|
|
170
113
|
}
|
|
171
114
|
function UploadSessionToast({ session, queueLength, onCancel, onCancelFile }) {
|
|
172
|
-
const
|
|
115
|
+
const { common, fileExplorer } = useStrings();
|
|
116
|
+
const strings = fileExplorer.upload;
|
|
173
117
|
const [isToastExpanded, setIsToastExpanded] = useState(false);
|
|
174
118
|
const [isFileListExpanded, setIsExpanded] = useState(session.uploadNodes.length <= 3);
|
|
175
119
|
const [showCancelConfirm, setShowCancelConfirm] = useState(false);
|
|
@@ -181,7 +125,7 @@ function UploadSessionToast({ session, queueLength, onCancel, onCancelFile }) {
|
|
|
181
125
|
const isUploading = !isCompleted && !isCancelled && !isFailed;
|
|
182
126
|
const totalProgress = session.progress?.overallProgress || 0;
|
|
183
127
|
const totalSize = session.progress?.totalSizeBytes || 0;
|
|
184
|
-
const
|
|
128
|
+
const sessionTone = barTone({
|
|
185
129
|
isCompleted,
|
|
186
130
|
isCancelled,
|
|
187
131
|
isFailed
|
|
@@ -214,7 +158,7 @@ function UploadSessionToast({ session, queueLength, onCancel, onCancelFile }) {
|
|
|
214
158
|
children: [!isToastExpanded && /* @__PURE__ */ jsxs("div", {
|
|
215
159
|
className: "flex items-center gap-3 flex-1",
|
|
216
160
|
children: [/* @__PURE__ */ jsx("div", {
|
|
217
|
-
className:
|
|
161
|
+
className: cx("w-10 h-10 rounded-full flex items-center justify-center", statusInfo.bgColor),
|
|
218
162
|
children: statusInfo.icon
|
|
219
163
|
}), /* @__PURE__ */ jsxs("div", {
|
|
220
164
|
role: "none",
|
|
@@ -237,35 +181,25 @@ function UploadSessionToast({ session, queueLength, onCancel, onCancelFile }) {
|
|
|
237
181
|
className: "flex items-center justify-between text-xs theme-muted-text hover:theme-text cursor-pointer",
|
|
238
182
|
onClick: handleExpandClick,
|
|
239
183
|
title: strings.expandDetails,
|
|
240
|
-
children: /* @__PURE__ */ jsx(
|
|
184
|
+
children: /* @__PURE__ */ jsx(ExpandVerticalIcon, { className: "w-4 h-4" })
|
|
241
185
|
})]
|
|
242
186
|
})]
|
|
243
187
|
}),
|
|
244
188
|
/* @__PURE__ */ jsxs("div", {
|
|
245
189
|
className: "flex items-center justify-between",
|
|
246
|
-
children: [/* @__PURE__ */
|
|
190
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
247
191
|
className: "text-xs theme-muted-text mt-0.5",
|
|
248
|
-
children:
|
|
249
|
-
session.progress?.completedFiles || 0,
|
|
250
|
-
" / ",
|
|
251
|
-
session.progress?.totalFiles || 0,
|
|
252
|
-
" ",
|
|
253
|
-
"files done"
|
|
254
|
-
]
|
|
192
|
+
children: strings.filesDone(session.progress?.completedFiles || 0, session.progress?.totalFiles || 0)
|
|
255
193
|
}), /* @__PURE__ */ jsx("div", {
|
|
256
194
|
className: "text-xs theme-muted-text mt-0.5",
|
|
257
|
-
children: showETA &&
|
|
195
|
+
children: showETA && (formatTimeLeft(estimatedSecondsLeft) ?? strings.almostDone)
|
|
258
196
|
})]
|
|
259
197
|
}),
|
|
260
|
-
/* @__PURE__ */ jsx(
|
|
261
|
-
className: "mt-1
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
className: clsx("h-full transition-all duration-300", sessionBarColor),
|
|
266
|
-
style: { width: `${totalProgress}%` }
|
|
267
|
-
})
|
|
268
|
-
})
|
|
198
|
+
/* @__PURE__ */ jsx(ProgressBar, {
|
|
199
|
+
className: "mt-1",
|
|
200
|
+
value: totalProgress,
|
|
201
|
+
tone: sessionTone,
|
|
202
|
+
"aria-label": strings.overallProgress
|
|
269
203
|
})
|
|
270
204
|
]
|
|
271
205
|
})]
|
|
@@ -275,22 +209,14 @@ function UploadSessionToast({ session, queueLength, onCancel, onCancelFile }) {
|
|
|
275
209
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
276
210
|
className: "flex items-center gap-3",
|
|
277
211
|
children: [/* @__PURE__ */ jsx("div", {
|
|
278
|
-
className:
|
|
212
|
+
className: cx("w-10 h-10 rounded-full flex items-center justify-center", statusInfo.bgColor),
|
|
279
213
|
children: statusInfo.icon
|
|
280
214
|
}), /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("h3", {
|
|
281
215
|
className: "text-sm font-semibold theme-text",
|
|
282
216
|
children: statusInfo.title
|
|
283
|
-
}), /* @__PURE__ */
|
|
217
|
+
}), /* @__PURE__ */ jsx("p", {
|
|
284
218
|
className: "text-xs theme-muted-text",
|
|
285
|
-
children:
|
|
286
|
-
uploadingFiles.length > 0 && `${uploadingFiles.length} uploading `,
|
|
287
|
-
"(",
|
|
288
|
-
session.progress?.completedFiles || 0,
|
|
289
|
-
" / ",
|
|
290
|
-
session.progress?.totalFiles || 0,
|
|
291
|
-
" ",
|
|
292
|
-
"done)"
|
|
293
|
-
]
|
|
219
|
+
children: strings.progress(uploadingFiles.length, session.progress?.completedFiles || 0, session.progress?.totalFiles || 0)
|
|
294
220
|
})] })]
|
|
295
221
|
}), /* @__PURE__ */ jsx("button", {
|
|
296
222
|
type: "button",
|
|
@@ -298,7 +224,7 @@ function UploadSessionToast({ session, queueLength, onCancel, onCancelFile }) {
|
|
|
298
224
|
className: "flex items-center justify-between text-xs theme-muted-text hover:theme-text cursor-pointer mr-2",
|
|
299
225
|
onClick: handleExpandClick,
|
|
300
226
|
title: strings.minimizeDetails,
|
|
301
|
-
children: /* @__PURE__ */ jsx(
|
|
227
|
+
children: /* @__PURE__ */ jsx(MinimizeIcon, { className: "w-4 h-4" })
|
|
302
228
|
})]
|
|
303
229
|
}),
|
|
304
230
|
/* @__PURE__ */ jsx("div", {
|
|
@@ -315,11 +241,11 @@ function UploadSessionToast({ session, queueLength, onCancel, onCancelFile }) {
|
|
|
315
241
|
}),
|
|
316
242
|
/* @__PURE__ */ jsxs("div", {
|
|
317
243
|
className: "flex justify-between",
|
|
318
|
-
children: [/* @__PURE__ */ jsx("span", { children: session.uploadNodes.length > 1 ? strings.totalSize : strings.size }), /* @__PURE__ */ jsx("span", { children:
|
|
244
|
+
children: [/* @__PURE__ */ jsx("span", { children: session.uploadNodes.length > 1 ? strings.totalSize : strings.size }), /* @__PURE__ */ jsx("span", { children: formatBytes(totalSize) })]
|
|
319
245
|
}),
|
|
320
246
|
/* @__PURE__ */ jsxs("div", {
|
|
321
247
|
className: "flex justify-between",
|
|
322
|
-
children: [/* @__PURE__ */ jsx("span", { children: strings.eta }), showETA ?
|
|
248
|
+
children: [/* @__PURE__ */ jsx("span", { children: strings.eta }), showETA ? formatTimeLeft(estimatedSecondsLeft) ?? strings.almostDone : strings.calculating]
|
|
323
249
|
})
|
|
324
250
|
]
|
|
325
251
|
})
|
|
@@ -328,24 +254,17 @@ function UploadSessionToast({ session, queueLength, onCancel, onCancelFile }) {
|
|
|
328
254
|
className: "mb-4 p-3 bg-amber-50 border border-amber-200 rounded-lg",
|
|
329
255
|
children: /* @__PURE__ */ jsxs("div", {
|
|
330
256
|
className: "flex gap-2",
|
|
331
|
-
children: [/* @__PURE__ */ jsx(
|
|
257
|
+
children: [/* @__PURE__ */ jsx(WarningIcon, { className: "w-4 h-4 text-amber-600 flex-shrink-0 mt-0.5" }), /* @__PURE__ */ jsx("p", {
|
|
332
258
|
className: "text-xs text-amber-800",
|
|
333
|
-
children:
|
|
259
|
+
children: strings.keepPageOpen
|
|
334
260
|
})]
|
|
335
261
|
})
|
|
336
262
|
}),
|
|
337
|
-
session.uploadNodes.length > 1 && isUploading && /* @__PURE__ */
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
}), /* @__PURE__ */ jsx("div", {
|
|
343
|
-
className: "h-2 w-full bg-(--theme-border) rounded-full overflow-hidden",
|
|
344
|
-
children: /* @__PURE__ */ jsx("div", {
|
|
345
|
-
className: clsx("h-full transition-all duration-300", sessionBarColor),
|
|
346
|
-
style: { width: `${totalProgress}%` }
|
|
347
|
-
})
|
|
348
|
-
})]
|
|
263
|
+
session.uploadNodes.length > 1 && isUploading && /* @__PURE__ */ jsx(ProgressBar, {
|
|
264
|
+
value: totalProgress,
|
|
265
|
+
tone: sessionTone,
|
|
266
|
+
size: "lg",
|
|
267
|
+
label: strings.overallProgress
|
|
349
268
|
}),
|
|
350
269
|
session.uploadNodes.length > 1 && /* @__PURE__ */ jsxs("div", {
|
|
351
270
|
className: "flex flex-col bg-(--theme-muted-panel-bg) rounded py-2 px-3 space-y-2 transition-all duration-300",
|
|
@@ -353,7 +272,7 @@ function UploadSessionToast({ session, queueLength, onCancel, onCancelFile }) {
|
|
|
353
272
|
type: "button",
|
|
354
273
|
className: "flex items-center justify-between text-xs theme-muted-text hover:theme-text cursor-pointer",
|
|
355
274
|
onClick: () => setIsExpanded(!isFileListExpanded),
|
|
356
|
-
children: [/* @__PURE__ */
|
|
275
|
+
children: [/* @__PURE__ */ jsx("span", { children: strings.fileCount(session.uploadNodes.length) }), isFileListExpanded ? /* @__PURE__ */ jsx(ChevronUpIcon, { className: "w-4 h-4" }) : /* @__PURE__ */ jsx(ChevronDownIcon, { className: "w-4 h-4" })]
|
|
357
276
|
}), isFileListExpanded && /* @__PURE__ */ jsx("div", {
|
|
358
277
|
className: "max-h-48 overflow-y-auto space-y-2",
|
|
359
278
|
children: session.uploadNodes.map((node) => {
|
|
@@ -374,29 +293,29 @@ function UploadSessionToast({ session, queueLength, onCancel, onCancelFile }) {
|
|
|
374
293
|
}),
|
|
375
294
|
/* @__PURE__ */ jsxs("div", {
|
|
376
295
|
className: "flex items-center justify-end",
|
|
377
|
-
children: [shouldShowSessionCancelButton && /* @__PURE__ */ jsx(
|
|
378
|
-
|
|
379
|
-
|
|
296
|
+
children: [shouldShowSessionCancelButton && /* @__PURE__ */ jsx(Button, {
|
|
297
|
+
variant: "danger",
|
|
298
|
+
size: "xs",
|
|
380
299
|
onClick: handleCancelClick,
|
|
381
|
-
children:
|
|
300
|
+
children: common.cancel
|
|
382
301
|
}), showCancelConfirm && /* @__PURE__ */ jsxs("div", {
|
|
383
302
|
className: "flex items-center space-x-2",
|
|
384
303
|
children: [
|
|
385
304
|
/* @__PURE__ */ jsx("span", {
|
|
386
305
|
className: "text-xs theme-muted-text",
|
|
387
|
-
children:
|
|
306
|
+
children: strings.confirmCancelAll
|
|
388
307
|
}),
|
|
389
|
-
/* @__PURE__ */ jsx(
|
|
390
|
-
|
|
391
|
-
|
|
308
|
+
/* @__PURE__ */ jsx(Button, {
|
|
309
|
+
variant: "secondary",
|
|
310
|
+
size: "xs",
|
|
392
311
|
onClick: handleKeepUploading,
|
|
393
|
-
children:
|
|
312
|
+
children: common.no
|
|
394
313
|
}),
|
|
395
|
-
/* @__PURE__ */ jsx(
|
|
396
|
-
|
|
397
|
-
|
|
314
|
+
/* @__PURE__ */ jsx(Button, {
|
|
315
|
+
variant: "danger",
|
|
316
|
+
size: "xs",
|
|
398
317
|
onClick: handleConfirmCancel,
|
|
399
|
-
children:
|
|
318
|
+
children: common.yes
|
|
400
319
|
})
|
|
401
320
|
]
|
|
402
321
|
})]
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { Tooltip } from "../../components/Tooltip.js";
|
|
2
2
|
import { Switch } from "../../components/Switch.js";
|
|
3
|
-
import {
|
|
3
|
+
import { Field } from "../../components/Field.js";
|
|
4
|
+
import { fieldFrame } from "../fieldFrame.js";
|
|
4
5
|
import { useFieldValue } from "../useFieldValue.js";
|
|
5
6
|
import { jsx } from "react/jsx-runtime";
|
|
6
7
|
//#region src/form/Fields/BooleanField.tsx
|
|
7
8
|
function BooleanField(props) {
|
|
8
|
-
const { field,
|
|
9
|
+
const { field, disabled, onChange } = props;
|
|
9
10
|
const [value, change] = useFieldValue(field.name ?? "");
|
|
10
11
|
const handleChange = (val) => {
|
|
11
12
|
if (disabled) return;
|
|
@@ -15,25 +16,22 @@ function BooleanField(props) {
|
|
|
15
16
|
const onOption = field.options ? String(field.options.onOption ?? true) : true;
|
|
16
17
|
const offOption = field.options ? String(field.options.offOption ?? false) : false;
|
|
17
18
|
const checked = value === true || value === "true" || value === onOption;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
labelPosition,
|
|
24
|
-
spaceCompact,
|
|
25
|
-
children: ({ id, describedBy }) => /* @__PURE__ */ jsx(Tooltip, {
|
|
19
|
+
const stateName = (option) => typeof option === "string" ? option.charAt(0).toUpperCase() + option.slice(1).toLowerCase() : void 0;
|
|
20
|
+
return /* @__PURE__ */ jsx(Field, {
|
|
21
|
+
...fieldFrame(props),
|
|
22
|
+
required: false,
|
|
23
|
+
children: (control) => /* @__PURE__ */ jsx(Tooltip, {
|
|
26
24
|
content: field.disabled_message,
|
|
27
25
|
disabled: !disabled,
|
|
28
26
|
children: /* @__PURE__ */ jsx(Switch, {
|
|
29
|
-
|
|
27
|
+
...control,
|
|
30
28
|
nativeButton: true,
|
|
31
29
|
render: /* @__PURE__ */ jsx("button", { type: "button" }),
|
|
32
30
|
checked,
|
|
33
31
|
onCheckedChange: (on) => handleChange(on ? onOption : offOption),
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
32
|
+
onLabel: stateName(onOption),
|
|
33
|
+
offLabel: stateName(offOption),
|
|
34
|
+
disabled
|
|
37
35
|
})
|
|
38
36
|
})
|
|
39
37
|
});
|
|
@@ -15,4 +15,4 @@ export interface ICheckboxGroupField extends BaseField {
|
|
|
15
15
|
*/
|
|
16
16
|
implies?: Record<string, string[]>;
|
|
17
17
|
}
|
|
18
|
-
export default function CheckboxGroupField(
|
|
18
|
+
export default function CheckboxGroupField(props: FieldComponentProps<ICheckboxGroupField>): import("react").JSX.Element;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { cx } from "../../cx.js";
|
|
2
|
+
import { Checkbox } from "../../components/Checkbox.js";
|
|
3
|
+
import { Field, FieldOption } from "../../components/Field.js";
|
|
4
|
+
import { fieldFrame } from "../fieldFrame.js";
|
|
2
5
|
import { useFieldValue } from "../useFieldValue.js";
|
|
3
6
|
import { fieldOption } from "./fieldOption.js";
|
|
4
|
-
import { clsx } from "clsx";
|
|
5
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
8
|
import { useState } from "react";
|
|
7
9
|
//#region src/form/Fields/CheckboxGroupField.tsx
|
|
@@ -13,7 +15,8 @@ function impliedFrom(values, implies = {}) {
|
|
|
13
15
|
function union(manual, forced) {
|
|
14
16
|
return [...manual, ...[...forced].filter((v) => !manual.includes(v))];
|
|
15
17
|
}
|
|
16
|
-
function CheckboxGroupField(
|
|
18
|
+
function CheckboxGroupField(props) {
|
|
19
|
+
const { field, error, disabled, onChange } = props;
|
|
17
20
|
const [value, change] = useFieldValue(field.name ?? "");
|
|
18
21
|
const implies = field.implies;
|
|
19
22
|
const rawOf = new Map((field.options ?? []).map((choice) => {
|
|
@@ -34,28 +37,23 @@ function CheckboxGroupField({ field, label, labelPosition, missing, disabled, on
|
|
|
34
37
|
change(next);
|
|
35
38
|
onChange?.(next);
|
|
36
39
|
};
|
|
37
|
-
return /* @__PURE__ */ jsx(
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
tooltipComponent,
|
|
41
|
-
labelPosition,
|
|
42
|
-
spaceCompact,
|
|
43
|
-
children: ({ labelId, describedBy }) => /* @__PURE__ */ jsx("fieldset", {
|
|
44
|
-
"aria-labelledby": labelId,
|
|
45
|
-
"aria-describedby": describedBy,
|
|
40
|
+
return /* @__PURE__ */ jsx(Field, {
|
|
41
|
+
...fieldFrame(props, { group: true }),
|
|
42
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
46
43
|
className: "flex min-w-0 max-w-lg flex-col gap-1",
|
|
47
44
|
children: field.options?.map((raw) => {
|
|
48
45
|
const option = fieldOption(raw);
|
|
49
46
|
const locked = forced.has(option.value);
|
|
50
47
|
const optionDisabled = disabled || locked;
|
|
51
|
-
return /* @__PURE__ */ jsxs(
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
48
|
+
return /* @__PURE__ */ jsxs(FieldOption, {
|
|
49
|
+
disabled: optionDisabled,
|
|
50
|
+
className: cx("-mx-2 flex items-start gap-2.5 rounded-md px-2 py-1.5 transition-colors", !optionDisabled && "hover:bg-(--theme-hover) has-[:focus-visible]:bg-(--theme-hover)"),
|
|
51
|
+
children: [/* @__PURE__ */ jsx(Checkbox, {
|
|
55
52
|
checked: manual.includes(option.value) || locked,
|
|
56
53
|
disabled: optionDisabled,
|
|
57
|
-
|
|
58
|
-
|
|
54
|
+
onCheckedChange: () => handleToggle(option.value),
|
|
55
|
+
"aria-invalid": error !== void 0 || void 0,
|
|
56
|
+
className: "mt-0.5"
|
|
59
57
|
}), /* @__PURE__ */ jsxs("div", {
|
|
60
58
|
className: "flex min-w-0 flex-col",
|
|
61
59
|
children: [/* @__PURE__ */ jsx("span", {
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { cx } from "../../cx.js";
|
|
2
|
+
import { fieldBox } from "../../components/fieldBox.js";
|
|
3
|
+
import { Field } from "../../components/Field.js";
|
|
4
|
+
import { fieldFrame } from "../fieldFrame.js";
|
|
2
5
|
import { useFieldValue } from "../useFieldValue.js";
|
|
3
6
|
import { jsx } from "react/jsx-runtime";
|
|
4
7
|
//#region src/form/Fields/ColorField.tsx
|
|
5
8
|
function ColorField(props) {
|
|
6
|
-
const { field,
|
|
9
|
+
const { field, disabled, onChange } = props;
|
|
7
10
|
const [value, change] = useFieldValue(field.name ?? "");
|
|
8
11
|
const handleChange = (e) => {
|
|
9
12
|
onChange?.(e.target.value);
|
|
10
13
|
change(e.target.value);
|
|
11
14
|
};
|
|
12
|
-
return /* @__PURE__ */ jsx(
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
spaceCompact,
|
|
18
|
-
children: ({ id }) => /* @__PURE__ */ jsx("input", {
|
|
19
|
-
className: "theme-input h-8 w-18 rounded border border-neutral-400 placeholder:text-xs",
|
|
20
|
-
id,
|
|
15
|
+
return /* @__PURE__ */ jsx(Field, {
|
|
16
|
+
...fieldFrame(props),
|
|
17
|
+
children: (control) => /* @__PURE__ */ jsx("input", {
|
|
18
|
+
...control,
|
|
19
|
+
className: cx(fieldBox(), "w-18 cursor-pointer p-1"),
|
|
21
20
|
name: field.name,
|
|
22
21
|
value: value || "#fbbf24",
|
|
23
22
|
type: "color",
|
|
23
|
+
disabled,
|
|
24
24
|
onChange: handleChange
|
|
25
25
|
})
|
|
26
26
|
});
|
|
@@ -10,4 +10,4 @@ export interface IDropdownField extends BaseField {
|
|
|
10
10
|
allowCustomValue?: boolean;
|
|
11
11
|
placeholder?: string;
|
|
12
12
|
}
|
|
13
|
-
export default function DropdownField(
|
|
13
|
+
export default function DropdownField(props: FieldComponentProps<IDropdownField>): import("react").JSX.Element;
|