@parallelworks/ui 0.44.0 → 0.46.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/permissions.d.ts +1 -1
- package/dist/ai/agent/permissions.js +1 -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 +22 -35
- 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.d.ts +1 -1
- package/dist/ai/components/ChatStage.js +2 -2
- 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/pasteLanguage.d.ts +1 -1
- package/dist/ai/core/pasteLanguage.js +1 -1
- 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 +200 -83
- package/dist/components/Provider.js +203 -121
- 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 +5 -1
- package/dist/components/Select.js +43 -44
- 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 +5 -3
- package/dist/components/StatusBadge.js +10 -33
- 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/comboboxItems.d.ts +1 -1
- 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/editing.d.ts +1 -1
- 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 +45 -67
- 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/FilePreview/useObjectBlobUrl.js +4 -4
- package/dist/file-explorer/FilePreview/useObjectText.js +4 -4
- package/dist/file-explorer/FilePreview/usePresignedUrl.js +4 -4
- 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/types.d.ts +2 -2
- 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 +109 -190
- 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/fieldItems.d.ts +1 -1
- 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 +2 -3
- package/dist/graph/SuggestionInput.js +2 -4
- 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.d.ts +2 -2
- package/dist/graph/editorPrimitives.js +3 -3
- package/dist/graph/editorRows.js +22 -25
- package/dist/graph/editorStrings.d.ts +18 -21
- package/dist/graph/editorStrings.js +15 -27
- 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 +122 -160
- 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/logviewer/segments.d.ts +1 -1
- package/dist/logviewer/segments.js +1 -1
- 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
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/** Guards page shortcuts from firing inside inputs, terminals, editors, and dialogs. */
|
|
2
|
+
export declare function isTextEntryContext(target: EventTarget | null): boolean;
|
|
3
|
+
/** Calls `onPress` on a single key, such as F to filter, unless the key goes to a text field. */
|
|
4
|
+
export declare function useShortcutKey(key: string | undefined, onPress: () => void): void;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { useEffect, useRef } from "react";
|
|
2
|
+
//#region src/components/shortcutKey.ts
|
|
3
|
+
/** Guards page shortcuts from firing inside inputs, terminals, editors, and dialogs. */
|
|
4
|
+
function isTextEntryContext(target) {
|
|
5
|
+
const el = target;
|
|
6
|
+
if (!el) return false;
|
|
7
|
+
if (el.tagName === "INPUT" || el.tagName === "TEXTAREA" || el.isContentEditable) return true;
|
|
8
|
+
return Boolean(el.closest?.(".xterm, .monaco-editor, .cm-editor, [role=\"dialog\"]"));
|
|
9
|
+
}
|
|
10
|
+
/** Calls `onPress` on a single key, such as F to filter, unless the key goes to a text field. */
|
|
11
|
+
function useShortcutKey(key, onPress) {
|
|
12
|
+
const press = useRef(onPress);
|
|
13
|
+
press.current = onPress;
|
|
14
|
+
useEffect(() => {
|
|
15
|
+
if (!key) return;
|
|
16
|
+
const onKey = (e) => {
|
|
17
|
+
if (e.metaKey || e.ctrlKey || e.altKey || e.key.toLowerCase() !== key.toLowerCase()) return;
|
|
18
|
+
if (isTextEntryContext(e.target)) return;
|
|
19
|
+
e.preventDefault();
|
|
20
|
+
press.current();
|
|
21
|
+
};
|
|
22
|
+
window.addEventListener("keydown", onKey);
|
|
23
|
+
return () => window.removeEventListener("keydown", onKey);
|
|
24
|
+
}, [key]);
|
|
25
|
+
}
|
|
26
|
+
//#endregion
|
|
27
|
+
export { isTextEntryContext, useShortcutKey };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'react';
|
|
2
|
+
export interface SplitterOptions {
|
|
3
|
+
/** The committed width. Keep it in `useState`, or in `usePersistedState` to remember it. */
|
|
4
|
+
width: number;
|
|
5
|
+
/** Hears the width once a drag ends, and on each key press. */
|
|
6
|
+
onWidthChange: (width: number) => void;
|
|
7
|
+
min: number;
|
|
8
|
+
/** The widest it goes; a function for a bound that moves with the window. */
|
|
9
|
+
max: number | (() => number);
|
|
10
|
+
/** The panel edge the handle sits on. Dragging away from the panel widens it. */
|
|
11
|
+
side: 'left' | 'right';
|
|
12
|
+
/** What a double-click restores. */
|
|
13
|
+
defaultWidth?: number | undefined;
|
|
14
|
+
/** Names the handle when "Resize panel" doesn't say which panel. */
|
|
15
|
+
label?: string | undefined;
|
|
16
|
+
}
|
|
17
|
+
export interface Splitter {
|
|
18
|
+
/** The width to draw: the live one during a drag, the committed one otherwise. */
|
|
19
|
+
width: number;
|
|
20
|
+
resizing: boolean;
|
|
21
|
+
/** Spread on the handle: a focusable window splitter on the panel's edge. */
|
|
22
|
+
separatorProps: HTMLAttributes<HTMLDivElement>;
|
|
23
|
+
}
|
|
24
|
+
/** A panel edge that a drag, the arrow keys, Home and End resize. The width is
|
|
25
|
+
* the caller's state; a drag commits it once, when it ends. */
|
|
26
|
+
export declare function useSplitter({ width, onWidthChange, min, max, side, defaultWidth, label, }: SplitterOptions): Splitter;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { cx } from "../cx.js";
|
|
2
|
+
import { useStrings } from "./Provider.js";
|
|
3
|
+
import { useRef, useState } from "react";
|
|
4
|
+
//#region src/components/splitter.ts
|
|
5
|
+
var KEYBOARD_STEP_PX = 16;
|
|
6
|
+
/** A panel edge that a drag, the arrow keys, Home and End resize. The width is
|
|
7
|
+
* the caller's state; a drag commits it once, when it ends. */
|
|
8
|
+
function useSplitter({ width, onWidthChange, min, max, side, defaultWidth, label }) {
|
|
9
|
+
const t = useStrings().common;
|
|
10
|
+
const [live, setLive] = useState(null);
|
|
11
|
+
const drag = useRef(null);
|
|
12
|
+
const grows = side === "left" ? -1 : 1;
|
|
13
|
+
const maxWidth = () => typeof max === "function" ? max() : max;
|
|
14
|
+
const clamp = (px) => Math.round(Math.max(min, Math.min(px, maxWidth())));
|
|
15
|
+
const shown = live ?? width;
|
|
16
|
+
const onPointerDown = (e) => {
|
|
17
|
+
e.preventDefault();
|
|
18
|
+
e.currentTarget.setPointerCapture?.(e.pointerId);
|
|
19
|
+
drag.current = {
|
|
20
|
+
x: e.clientX,
|
|
21
|
+
width
|
|
22
|
+
};
|
|
23
|
+
setLive(width);
|
|
24
|
+
};
|
|
25
|
+
const onPointerMove = (e) => {
|
|
26
|
+
if (drag.current) setLive(clamp(drag.current.width + (e.clientX - drag.current.x) * grows));
|
|
27
|
+
};
|
|
28
|
+
const onPointerUp = () => {
|
|
29
|
+
if (drag.current && live !== null && live !== width) onWidthChange(live);
|
|
30
|
+
drag.current = null;
|
|
31
|
+
setLive(null);
|
|
32
|
+
};
|
|
33
|
+
const onKeyDown = (e) => {
|
|
34
|
+
const direction = {
|
|
35
|
+
ArrowLeft: -1,
|
|
36
|
+
ArrowRight: 1
|
|
37
|
+
}[e.key];
|
|
38
|
+
if (direction !== void 0) onWidthChange(clamp(width + direction * grows * KEYBOARD_STEP_PX));
|
|
39
|
+
else if (e.key === "Home") onWidthChange(min);
|
|
40
|
+
else if (e.key === "End") onWidthChange(clamp(Number.POSITIVE_INFINITY));
|
|
41
|
+
else return;
|
|
42
|
+
e.preventDefault();
|
|
43
|
+
};
|
|
44
|
+
const now = Math.round(shown);
|
|
45
|
+
const bound = maxWidth();
|
|
46
|
+
return {
|
|
47
|
+
width: shown,
|
|
48
|
+
resizing: live !== null,
|
|
49
|
+
separatorProps: {
|
|
50
|
+
role: "separator",
|
|
51
|
+
"aria-label": label ?? t.resizePanel,
|
|
52
|
+
"aria-orientation": "vertical",
|
|
53
|
+
"aria-valuenow": now,
|
|
54
|
+
"aria-valuemin": min,
|
|
55
|
+
...Number.isFinite(bound) ? { "aria-valuemax": Math.round(bound) } : {},
|
|
56
|
+
"aria-valuetext": t.panelWidth(now),
|
|
57
|
+
tabIndex: 0,
|
|
58
|
+
onPointerDown,
|
|
59
|
+
onPointerMove,
|
|
60
|
+
onPointerUp,
|
|
61
|
+
onPointerCancel: onPointerUp,
|
|
62
|
+
onKeyDown,
|
|
63
|
+
...defaultWidth === void 0 ? {} : { onDoubleClick: () => onWidthChange(defaultWidth) },
|
|
64
|
+
className: cx("absolute inset-y-0 z-10 w-1.5 cursor-col-resize touch-none transition-colors focus-visible:bg-(--theme-link) focus-visible:outline-none", side === "left" ? "-left-0.75" : "-right-0.75", live === null ? "hover:bg-(--theme-border)" : "bg-(--theme-accent)")
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
//#endregion
|
|
69
|
+
export { useSplitter };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** How a status reads: its colors come from the theme's tone tokens, so every
|
|
2
|
+
* theme, dark ones included, sets them once. */
|
|
3
|
+
export type Tone = 'default' | 'success' | 'warning' | 'error' | 'info' | 'muted';
|
|
4
|
+
/** Text in the tone, for a status line beside a dot or icon. */
|
|
5
|
+
export declare const toneText: Record<Tone, string>;
|
|
6
|
+
/** A tinted surface with a border and text in the tone, for a badge or a callout. */
|
|
7
|
+
export declare const toneSurface: Record<Tone, string>;
|
|
8
|
+
/** A solid fill in the tone, for a dot. */
|
|
9
|
+
export declare const toneFill: Record<Tone, string>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
//#region src/components/tone.ts
|
|
2
|
+
/** Text in the tone, for a status line beside a dot or icon. */
|
|
3
|
+
var toneText = {
|
|
4
|
+
default: "text-(--theme-app)",
|
|
5
|
+
success: "text-(--theme-success)",
|
|
6
|
+
warning: "text-(--theme-warning)",
|
|
7
|
+
error: "text-(--theme-error)",
|
|
8
|
+
info: "text-(--theme-info)",
|
|
9
|
+
muted: "text-(--theme-muted-text-color)"
|
|
10
|
+
};
|
|
11
|
+
/** A tinted surface with a border and text in the tone, for a badge or a callout. */
|
|
12
|
+
var toneSurface = {
|
|
13
|
+
default: "bg-(--theme-muted-panel-bg) text-(--theme-app) border-(--theme-border)",
|
|
14
|
+
success: "bg-(--theme-success-muted) text-(--theme-success) border-(--theme-success)/25",
|
|
15
|
+
warning: "bg-(--theme-warning-muted) text-(--theme-warning) border-(--theme-warning)/25",
|
|
16
|
+
error: "bg-(--theme-error-muted) text-(--theme-error) border-(--theme-error)/25",
|
|
17
|
+
info: "bg-(--theme-info-muted) text-(--theme-info) border-(--theme-info)/25",
|
|
18
|
+
muted: "bg-(--theme-muted-panel-bg)/50 text-(--theme-muted-text-color) border-(--theme-border)"
|
|
19
|
+
};
|
|
20
|
+
/** A solid fill in the tone, for a dot. */
|
|
21
|
+
var toneFill = {
|
|
22
|
+
default: "bg-(--theme-app)",
|
|
23
|
+
success: "bg-(--theme-success)",
|
|
24
|
+
warning: "bg-(--theme-warning)",
|
|
25
|
+
error: "bg-(--theme-error)",
|
|
26
|
+
info: "bg-(--theme-info)",
|
|
27
|
+
muted: "bg-(--theme-muted-text-color)"
|
|
28
|
+
};
|
|
29
|
+
//#endregion
|
|
30
|
+
export { toneFill, toneSurface, toneText };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface CopyOptions {
|
|
2
|
+
/** Names what was copied in the toast, "Copied email address"; without it the
|
|
3
|
+
* toast says only that something was copied. */
|
|
4
|
+
label?: string | undefined;
|
|
5
|
+
/** No toast on success, for a control that shows its own check. A failure
|
|
6
|
+
* still says so. */
|
|
7
|
+
quiet?: boolean | undefined;
|
|
8
|
+
}
|
|
9
|
+
/** Copies text to the clipboard and says how it went. `copied` stays true for a
|
|
10
|
+
* moment after, for a button that turns into a check. */
|
|
11
|
+
export declare function useCopy(): {
|
|
12
|
+
copy: (text: string, options?: CopyOptions) => Promise<boolean>;
|
|
13
|
+
copied: boolean;
|
|
14
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { toast } from "./Toast.js";
|
|
2
|
+
import { useStrings } from "./Provider.js";
|
|
3
|
+
import { useCallback, useEffect, useRef, useState } from "react";
|
|
4
|
+
//#region src/components/useCopy.ts
|
|
5
|
+
var COPIED_FOR_MS = 2e3;
|
|
6
|
+
/** Copies text to the clipboard and says how it went. `copied` stays true for a
|
|
7
|
+
* moment after, for a button that turns into a check. */
|
|
8
|
+
function useCopy() {
|
|
9
|
+
const { common: t } = useStrings();
|
|
10
|
+
const [copied, setCopied] = useState(false);
|
|
11
|
+
const reset = useRef(void 0);
|
|
12
|
+
useEffect(() => () => clearTimeout(reset.current), []);
|
|
13
|
+
return {
|
|
14
|
+
copy: useCallback(async (text, { label, quiet = false } = {}) => {
|
|
15
|
+
try {
|
|
16
|
+
await navigator.clipboard.writeText(text);
|
|
17
|
+
} catch {
|
|
18
|
+
toast.error(label ? t.copyThingFailed(label) : t.copyFailed);
|
|
19
|
+
return false;
|
|
20
|
+
}
|
|
21
|
+
if (!quiet) toast.success(label ? t.copiedThing(label) : t.copiedToClipboard);
|
|
22
|
+
setCopied(true);
|
|
23
|
+
clearTimeout(reset.current);
|
|
24
|
+
reset.current = setTimeout(() => setCopied(false), COPIED_FOR_MS);
|
|
25
|
+
return true;
|
|
26
|
+
}, [t]),
|
|
27
|
+
copied
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
//#endregion
|
|
31
|
+
export { useCopy };
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/** Whether the host's CSS color-scheme reads dark, falling back to the system preference. */
|
|
2
|
+
export declare function readIsDark(): boolean;
|
|
1
3
|
/**
|
|
2
4
|
* Follows the host's CSS color-scheme, the same signal the log viewer's
|
|
3
5
|
* light-dark() palette uses — no provider API involved. For the rare concrete
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { useEffect, useState } from "react";
|
|
2
2
|
//#region src/components/useCssIsDark.ts
|
|
3
|
+
/** Whether the host's CSS color-scheme reads dark, falling back to the system preference. */
|
|
3
4
|
function readIsDark() {
|
|
4
5
|
const scheme = getComputedStyle(document.documentElement).colorScheme;
|
|
5
6
|
const dark = scheme.includes("dark");
|
|
@@ -35,4 +36,4 @@ function useCssIsDark() {
|
|
|
35
36
|
return isDark;
|
|
36
37
|
}
|
|
37
38
|
//#endregion
|
|
38
|
-
export { useCssIsDark };
|
|
39
|
+
export { readIsDark, useCssIsDark };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type ColorPreference, type Mode, type Theme } from '../theme/index.js';
|
|
2
|
+
/** The mode a preference shows now, following the device while it's `system`. */
|
|
3
|
+
export declare function useColorMode(preference: ColorPreference): Mode;
|
|
4
|
+
/**
|
|
5
|
+
* Applies a theme's scheme for a mode to an element, the document root by
|
|
6
|
+
* default, again whenever the theme changes: as a person edits it, the whole
|
|
7
|
+
* app previews it. It also sets the element's `color-scheme`, which native
|
|
8
|
+
* controls and `light-dark()` follow.
|
|
9
|
+
*/
|
|
10
|
+
export declare function useApplyTheme(theme: Theme, mode: Mode, element?: HTMLElement | null): void;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { modeOf, resolveMode, schemeFor } from "../theme/model.js";
|
|
2
|
+
import { generateTheme } from "../theme/derive.js";
|
|
3
|
+
import { applyTheme } from "../theme/index.js";
|
|
4
|
+
import { useEffect, useLayoutEffect, useState } from "react";
|
|
5
|
+
//#region src/components/useTheme.ts
|
|
6
|
+
var DARK = "(prefers-color-scheme: dark)";
|
|
7
|
+
var prefersDark = () => typeof matchMedia === "function" && matchMedia(DARK).matches;
|
|
8
|
+
/** The mode a preference shows now, following the device while it's `system`. */
|
|
9
|
+
function useColorMode(preference) {
|
|
10
|
+
const [dark, setDark] = useState(prefersDark);
|
|
11
|
+
useEffect(() => {
|
|
12
|
+
if (preference !== "system" || typeof matchMedia !== "function") return;
|
|
13
|
+
const media = matchMedia(DARK);
|
|
14
|
+
const update = () => setDark(media.matches);
|
|
15
|
+
update();
|
|
16
|
+
media.addEventListener("change", update);
|
|
17
|
+
return () => media.removeEventListener("change", update);
|
|
18
|
+
}, [preference]);
|
|
19
|
+
return resolveMode(preference, dark);
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Applies a theme's scheme for a mode to an element, the document root by
|
|
23
|
+
* default, again whenever the theme changes: as a person edits it, the whole
|
|
24
|
+
* app previews it. It also sets the element's `color-scheme`, which native
|
|
25
|
+
* controls and `light-dark()` follow.
|
|
26
|
+
*/
|
|
27
|
+
function useApplyTheme(theme, mode, element) {
|
|
28
|
+
useLayoutEffect(() => {
|
|
29
|
+
const el = element ?? document.documentElement;
|
|
30
|
+
const scheme = schemeFor(theme, mode);
|
|
31
|
+
applyTheme(el, generateTheme(scheme, theme.code ? { code: theme.code } : {}));
|
|
32
|
+
el.style.colorScheme = modeOf(scheme);
|
|
33
|
+
}, [
|
|
34
|
+
theme,
|
|
35
|
+
mode,
|
|
36
|
+
element
|
|
37
|
+
]);
|
|
38
|
+
}
|
|
39
|
+
//#endregion
|
|
40
|
+
export { useApplyTheme, useColorMode };
|
package/dist/cx.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type ClassValue } from 'clsx';
|
|
2
|
+
/** Joins class names, letting a later utility replace an earlier one it conflicts
|
|
3
|
+
* with, so a caller's `className` wins over a component's own defaults: `w-20`
|
|
4
|
+
* narrows a field box that is `w-full` by default. */
|
|
5
|
+
export declare function cx(...inputs: ClassValue[]): string;
|
package/dist/cx.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { clsx } from "clsx";
|
|
2
|
+
import { twMerge } from "tailwind-merge";
|
|
3
|
+
//#region src/cx.ts
|
|
4
|
+
/** Joins class names, letting a later utility replace an earlier one it conflicts
|
|
5
|
+
* with, so a caller's `className` wins over a component's own defaults: `w-20`
|
|
6
|
+
* narrows a field box that is `w-full` by default. */
|
|
7
|
+
function cx(...inputs) {
|
|
8
|
+
return twMerge(clsx(inputs));
|
|
9
|
+
}
|
|
10
|
+
//#endregion
|
|
11
|
+
export { cx };
|
package/dist/editing.d.ts
CHANGED
|
@@ -320,7 +320,7 @@ export type SettingsYamlProblem = {
|
|
|
320
320
|
/** A key or list index on the way down to a YAML node. */
|
|
321
321
|
export type YamlSegment = string | number;
|
|
322
322
|
type UnknownRecord = Record<string, unknown>;
|
|
323
|
-
/** One input a built-in action takes in its step's `with`,
|
|
323
|
+
/** One input a built-in action takes in its step's `with`, labeled in the reader's language. */
|
|
324
324
|
export interface WorkflowActionInput {
|
|
325
325
|
key: string;
|
|
326
326
|
kind: 'text' | 'textarea' | 'number' | 'any' | 'list' | 'bool' | 'choice' | 'flags' | 'target';
|
package/dist/editor/Editor.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import Loader from "../components/Loader.js";
|
|
1
|
+
import { Loader } from "../components/Loader.js";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import { Suspense, lazy } from "react";
|
|
4
4
|
//#region src/editor/Editor.tsx
|
|
5
5
|
var MonacoEditor = lazy(() => import("./Monaco.js"));
|
|
6
6
|
function Editor(props) {
|
|
7
7
|
return /* @__PURE__ */ jsx(Suspense, {
|
|
8
|
-
fallback: /* @__PURE__ */ jsx(Loader, {
|
|
8
|
+
fallback: /* @__PURE__ */ jsx(Loader, {}),
|
|
9
9
|
children: /* @__PURE__ */ jsx(MonacoEditor, { ...props })
|
|
10
10
|
});
|
|
11
11
|
}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { cx } from "../cx.js";
|
|
2
|
+
import { Field } from "../components/Field.js";
|
|
3
|
+
import { fieldFrame } from "../form/fieldFrame.js";
|
|
2
4
|
import { useFieldValue } from "../form/useFieldValue.js";
|
|
3
5
|
import Editor from "./Editor.js";
|
|
4
|
-
import { clsx } from "clsx";
|
|
5
6
|
import { jsx } from "react/jsx-runtime";
|
|
6
7
|
import { useMemo, useRef } from "react";
|
|
7
8
|
import { useFormContext, useWatch } from "react-hook-form";
|
|
8
9
|
//#region src/editor/EditorField.tsx
|
|
9
10
|
function EditorField(props) {
|
|
10
|
-
const { field, label,
|
|
11
|
+
const { field, label, disabled, onChange } = props;
|
|
11
12
|
const fieldName = field.name ?? "";
|
|
12
13
|
const [value, change] = useFieldValue(fieldName);
|
|
13
14
|
const touchedRef = useRef(false);
|
|
@@ -26,18 +27,14 @@ function EditorField(props) {
|
|
|
26
27
|
const randomKey = Math.random().toString(36).substring(7);
|
|
27
28
|
return editorKeyPostfix || randomKey;
|
|
28
29
|
}, [editorKeyPostfix]);
|
|
29
|
-
return /* @__PURE__ */ jsx(
|
|
30
|
-
|
|
31
|
-
label,
|
|
32
|
-
tooltipComponent,
|
|
33
|
-
labelPosition,
|
|
34
|
-
spaceCompact,
|
|
30
|
+
return /* @__PURE__ */ jsx(Field, {
|
|
31
|
+
...fieldFrame(props),
|
|
35
32
|
children: /* @__PURE__ */ jsx(Editor, {
|
|
36
33
|
ariaLabel: label,
|
|
37
34
|
height: "200px",
|
|
38
35
|
path: fieldName,
|
|
39
36
|
...touchedRef.current || value === void 0 ? {} : { value },
|
|
40
|
-
className:
|
|
37
|
+
className: cx("bg-(--theme-input-bg) w-11 border focus:border rounded text-[10px] leading-4 pl-[6px]", disabled && "opacity-75"),
|
|
41
38
|
readOnly: disabled,
|
|
42
39
|
onChange: handleChange,
|
|
43
40
|
language: field.options?.language || "shell"
|
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { LuEye } from "../icons/lu/LuEye.js";
|
|
4
|
-
import { LuEyeOff } from "../icons/lu/LuEyeOff.js";
|
|
1
|
+
import { cx } from "../cx.js";
|
|
2
|
+
import { CheckIcon, CopyIcon, EyeIcon, EyeOffIcon } from "../icons.js";
|
|
5
3
|
import { Tooltip } from "../components/Tooltip.js";
|
|
6
|
-
import {
|
|
4
|
+
import { useStrings, useWorkflowEngine } from "../components/Provider.js";
|
|
5
|
+
import { useCopy } from "../components/useCopy.js";
|
|
7
6
|
import { Switch } from "../components/Switch.js";
|
|
8
7
|
import { flattenGroups, impureSetValueFromPath } from "../form/lib.js";
|
|
9
8
|
import Editor from "./Editor.js";
|
|
10
|
-
import { clsx } from "clsx";
|
|
11
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
12
10
|
import { useRef, useState } from "react";
|
|
13
11
|
//#region src/editor/FormCodePanel.tsx
|
|
@@ -72,12 +70,10 @@ var populateFiltered = (filteredFields, data) => {
|
|
|
72
70
|
};
|
|
73
71
|
function FormCodePanel({ formJSON, data, mutate, height = "600px", disabled = false }) {
|
|
74
72
|
const engine = useWorkflowEngine();
|
|
75
|
-
const notify = useNotify();
|
|
76
73
|
const { common: t } = useStrings();
|
|
77
74
|
const [jsonHasErrors, setJsonHasErrors] = useState(false);
|
|
78
75
|
const [showHidden, setShowHidden] = useState(false);
|
|
79
|
-
const
|
|
80
|
-
const copyResetRef = useRef(void 0);
|
|
76
|
+
const { copy, copied } = useCopy();
|
|
81
77
|
const isValidJson = (errors) => {
|
|
82
78
|
setJsonHasErrors(errors.length > 0);
|
|
83
79
|
};
|
|
@@ -89,23 +85,14 @@ function FormCodePanel({ formJSON, data, mutate, height = "600px", disabled = fa
|
|
|
89
85
|
const filteredFieldsRef = useRef(filteredFields);
|
|
90
86
|
filteredFieldsRef.current = filteredFields;
|
|
91
87
|
const json = JSON.stringify(displayObj, null, 2);
|
|
92
|
-
const handleCopy =
|
|
93
|
-
try {
|
|
94
|
-
await navigator.clipboard.writeText(json);
|
|
95
|
-
setCopied(true);
|
|
96
|
-
clearTimeout(copyResetRef.current);
|
|
97
|
-
copyResetRef.current = setTimeout(() => setCopied(false), 2e3);
|
|
98
|
-
} catch {
|
|
99
|
-
notify.error(t.copyFailed);
|
|
100
|
-
}
|
|
101
|
-
};
|
|
88
|
+
const handleCopy = () => void copy(json, { quiet: true });
|
|
102
89
|
return /* @__PURE__ */ jsxs("div", {
|
|
103
90
|
style: { height },
|
|
104
91
|
className: "flex w-full flex-col gap-2",
|
|
105
92
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
106
|
-
className:
|
|
93
|
+
className: cx("flex min-h-0 flex-1 flex-col overflow-hidden rounded-md border", jsonHasErrors ? "border-red-500" : "border-(--theme-border)"),
|
|
107
94
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
108
|
-
className: "bg-(--theme-muted-panel-bg) text-(--theme-muted-
|
|
95
|
+
className: "bg-(--theme-muted-panel-bg) text-(--theme-muted-text-color) flex shrink-0 items-center gap-3 border-b border-(--theme-border) px-3 py-2",
|
|
109
96
|
children: [hasHiddenFields && /* @__PURE__ */ jsx(Tooltip, {
|
|
110
97
|
content: t.showHiddenFieldsHint,
|
|
111
98
|
children: /* @__PURE__ */ jsxs("label", {
|
|
@@ -116,7 +103,7 @@ function FormCodePanel({ formJSON, data, mutate, height = "600px", disabled = fa
|
|
|
116
103
|
onCheckedChange: setShowHidden
|
|
117
104
|
}), /* @__PURE__ */ jsxs("span", {
|
|
118
105
|
className: "flex items-center gap-1.5",
|
|
119
|
-
children: [showHidden ? /* @__PURE__ */ jsx(
|
|
106
|
+
children: [showHidden ? /* @__PURE__ */ jsx(EyeIcon, {}) : /* @__PURE__ */ jsx(EyeOffIcon, {}), t.showHiddenFields]
|
|
120
107
|
})]
|
|
121
108
|
})
|
|
122
109
|
}), /* @__PURE__ */ jsxs("button", {
|
|
@@ -124,7 +111,7 @@ function FormCodePanel({ formJSON, data, mutate, height = "600px", disabled = fa
|
|
|
124
111
|
onClick: handleCopy,
|
|
125
112
|
"aria-label": copied ? t.copied : t.copy,
|
|
126
113
|
className: "ml-auto flex shrink-0 items-center gap-1.5 rounded-md border border-(--theme-border) px-2.5 py-1.5 text-sm text-(--theme-app) transition-colors duration-150 hover:bg-(--theme-hover) focus:outline-none focus-visible:ring-2 focus-visible:ring-(--theme-link)",
|
|
127
|
-
children: [copied ? /* @__PURE__ */ jsx(
|
|
114
|
+
children: [copied ? /* @__PURE__ */ jsx(CheckIcon, { className: "text-green-500" }) : /* @__PURE__ */ jsx(CopyIcon, { className: "text-(--theme-muted-text-color)" }), copied ? t.copied : t.copy]
|
|
128
115
|
})]
|
|
129
116
|
}), /* @__PURE__ */ jsx("div", {
|
|
130
117
|
className: "min-h-0 flex-1",
|
package/dist/editor/Monaco.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
+
import { cx } from "../cx.js";
|
|
1
2
|
import { useCssIsDark } from "../components/useCssIsDark.js";
|
|
2
3
|
import { HOST_MARKER_OWNER, LINT_OWNER } from "./lintOwner.js";
|
|
3
4
|
import { lintContext, useLintEditing, useLintSources } from "./lintContext.js";
|
|
4
5
|
import { publishNestedText } from "./nestedText.js";
|
|
5
6
|
import { registerRevealer } from "./reveal.js";
|
|
6
|
-
import { defineEditorThemes, getThemeName } from "./themes.js";
|
|
7
|
+
import { defineEditorThemes, followThemeTokens, getThemeName } from "./themes.js";
|
|
7
8
|
import { setupMonacoWorkers } from "./workers.js";
|
|
8
9
|
import { holdListeners, modelFor } from "./editorModel.js";
|
|
9
10
|
import { ensureYamlLanguage } from "./yamlLanguage.js";
|
|
10
|
-
import { clsx } from "clsx";
|
|
11
11
|
import { jsx } from "react/jsx-runtime";
|
|
12
12
|
import { useEffect, useLayoutEffect, useRef } from "react";
|
|
13
13
|
import * as monaco from "monaco-editor";
|
|
@@ -70,6 +70,8 @@ function MonacoEditor({ className, disabled, onChange = noop, onValidate = noop,
|
|
|
70
70
|
if (!isNested) return;
|
|
71
71
|
return publishNestedText(monaco.Uri.parse(path).toString(), nestedRef);
|
|
72
72
|
}, [path, isNested]);
|
|
73
|
+
const themeName = useRef(getThemeName(isDark, disabled));
|
|
74
|
+
themeName.current = getThemeName(isDark, disabled);
|
|
73
75
|
useEffect(() => {
|
|
74
76
|
if (!monacoRef.current) return;
|
|
75
77
|
defineEditorThemes(monaco.editor);
|
|
@@ -80,6 +82,7 @@ function MonacoEditor({ className, disabled, onChange = noop, onValidate = noop,
|
|
|
80
82
|
isDark,
|
|
81
83
|
readOnly
|
|
82
84
|
]);
|
|
85
|
+
useEffect(() => followThemeTokens(monaco.editor, () => themeName.current), []);
|
|
83
86
|
useLayoutEffect(() => {
|
|
84
87
|
const model = monacoRef.current?.getModel();
|
|
85
88
|
if (!model || options.value === void 0 || editorText(model.getValue()) === editorText(options.value)) return;
|
|
@@ -116,7 +119,7 @@ function MonacoEditor({ className, disabled, onChange = noop, onValidate = noop,
|
|
|
116
119
|
width,
|
|
117
120
|
height
|
|
118
121
|
},
|
|
119
|
-
className:
|
|
122
|
+
className: cx("relative border rounded", className),
|
|
120
123
|
ref: (ref) => {
|
|
121
124
|
if (ref && !monacoRef.current) {
|
|
122
125
|
defineEditorThemes(monaco.editor);
|
|
@@ -178,7 +181,7 @@ function MonacoEditor({ className, disabled, onChange = noop, onValidate = noop,
|
|
|
178
181
|
range: new monaco.Range(start, 1, last, 1),
|
|
179
182
|
options: {
|
|
180
183
|
isWholeLine: true,
|
|
181
|
-
className: "bg-(--theme-
|
|
184
|
+
className: "bg-(--theme-accent)/20"
|
|
182
185
|
}
|
|
183
186
|
}]);
|
|
184
187
|
window.setTimeout(() => flash.clear(), 1500);
|
package/dist/editor/index.d.ts
CHANGED
|
@@ -6,6 +6,6 @@ export type { IEditorProps, ISchemaError } from './Monaco.js';
|
|
|
6
6
|
export { type NestedWorkflowText, nestedWorkflowText } from './nestedText.js';
|
|
7
7
|
export { revealLines } from './reveal.js';
|
|
8
8
|
export { INPUT_YAML_PATH, JOB_YAML_PATH, type JsonSchema, SETTINGS_YAML_PATH, STEP_YAML_PATH, settingsSchemas, } from './settingsYaml.js';
|
|
9
|
-
export { defineEditorThemes, getThemeName } from './themes.js';
|
|
9
|
+
export { defineEditorThemes, followThemeTokens, getThemeName } from './themes.js';
|
|
10
10
|
export { setupMonacoWorkers } from './workers.js';
|
|
11
11
|
export { configureEditorYaml } from './yaml.js';
|
package/dist/editor/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import EditorField from "./EditorField.js";
|
|
|
5
5
|
import FormCodePanel from "./FormCodePanel.js";
|
|
6
6
|
import { nestedWorkflowText } from "./nestedText.js";
|
|
7
7
|
import { revealLines } from "./reveal.js";
|
|
8
|
-
import { defineEditorThemes, getThemeName } from "./themes.js";
|
|
8
|
+
import { defineEditorThemes, followThemeTokens, getThemeName } from "./themes.js";
|
|
9
9
|
import { setupMonacoWorkers } from "./workers.js";
|
|
10
10
|
import { configureEditorYaml } from "./yaml.js";
|
|
11
|
-
export { Editor, EditorField, FormCodePanel, HOST_MARKER_OWNER, INPUT_YAML_PATH, JOB_YAML_PATH, LINT_OWNER, SETTINGS_YAML_PATH, STEP_YAML_PATH, configureEditorYaml, defineEditorThemes, getThemeName, nestedWorkflowText, revealLines, settingsSchemas, setupMonacoWorkers };
|
|
11
|
+
export { Editor, EditorField, FormCodePanel, HOST_MARKER_OWNER, INPUT_YAML_PATH, JOB_YAML_PATH, LINT_OWNER, SETTINGS_YAML_PATH, STEP_YAML_PATH, configureEditorYaml, defineEditorThemes, followThemeTokens, getThemeName, nestedWorkflowText, revealLines, settingsSchemas, setupMonacoWorkers };
|
package/dist/editor/themes.d.ts
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import type * as monaco from 'monaco-editor';
|
|
2
2
|
export declare function expandShorthandHex(color: string): string;
|
|
3
|
+
/** Monaco themes read from the document's tokens: call again after the host applies another theme. */
|
|
3
4
|
export declare function defineEditorThemes(monacoEditor: typeof monaco.editor): void;
|
|
5
|
+
/** Redefines the editor themes when the host applies other tokens to the document,
|
|
6
|
+
* and sets `current()` again, so an open editor follows a theme being edited. */
|
|
7
|
+
export declare function followThemeTokens(monacoEditor: typeof monaco.editor, current: () => string): () => void;
|
|
4
8
|
export declare function getThemeName(isDark: boolean, disabled?: boolean): string;
|