@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
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type ComponentProps, type ReactNode } from 'react';
|
|
2
|
+
import { type FieldProps } from '../components/Field.js';
|
|
2
3
|
import { Textarea } from '../components/Input.js';
|
|
3
4
|
import type { FieldPatch } from '../editing.js';
|
|
4
5
|
import { type GraphEditorStrings } from './editorStrings.js';
|
|
@@ -48,7 +49,9 @@ export declare function flagValue(checked: boolean, fallback: boolean, original:
|
|
|
48
49
|
/** Whether each section of a dialog is open, kept while the dialog is up so switching views keeps it. */
|
|
49
50
|
export declare const SectionMemory: import("react").Context<Map<string, boolean> | null>;
|
|
50
51
|
export declare function useSectionMemory(): Map<string, boolean>;
|
|
51
|
-
|
|
52
|
+
/** A titled part of an editor dialog. It opens as it was last left in this
|
|
53
|
+
* dialog, and opens itself when a problem inside would otherwise be hidden. */
|
|
54
|
+
export declare function DialogSection({ title, description, open, alert, children, }: {
|
|
52
55
|
title: string;
|
|
53
56
|
description?: string;
|
|
54
57
|
/** Whether it starts open; read once, when its dialog first shows it. */
|
|
@@ -57,9 +60,6 @@ export declare function Section({ title, description, open, alert, children, }:
|
|
|
57
60
|
alert?: boolean;
|
|
58
61
|
children: ReactNode;
|
|
59
62
|
}): import("react").JSX.Element;
|
|
60
|
-
export declare function FieldError({ message }: {
|
|
61
|
-
message: string | undefined;
|
|
62
|
-
}): import("react").JSX.Element | null;
|
|
63
63
|
/** The YAML key a field sets, beside its name; left out where the name already says it. */
|
|
64
64
|
export declare function KeyHint({ label, yamlKey }: {
|
|
65
65
|
label: string;
|
|
@@ -68,20 +68,20 @@ export declare function KeyHint({ label, yamlKey }: {
|
|
|
68
68
|
/** Label props for an Input or Textarea that sets `yamlKey`. */
|
|
69
69
|
export declare function labelled(label: string, yamlKey: string): {
|
|
70
70
|
label: string;
|
|
71
|
-
|
|
71
|
+
hint: import("react").JSX.Element;
|
|
72
72
|
};
|
|
73
|
-
/** A
|
|
74
|
-
|
|
73
|
+
/** A Field for a setting the YAML holds, with the key it sets beside its name. With `id`
|
|
74
|
+
* its label names the one control that takes that id; without, it names its controls as a
|
|
75
|
+
* group, as a list of rows or a set of choices wants. */
|
|
76
|
+
export declare function YamlField({ label, yamlKey, description, actions, error, required, id, children, }: {
|
|
75
77
|
label: string;
|
|
76
78
|
yamlKey?: string | undefined;
|
|
77
|
-
description
|
|
78
|
-
htmlFor?: string;
|
|
79
|
-
descriptionId?: string;
|
|
79
|
+
description?: ReactNode;
|
|
80
80
|
actions?: ReactNode;
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
children:
|
|
81
|
+
error?: ReactNode;
|
|
82
|
+
required?: boolean | undefined;
|
|
83
|
+
id?: string | undefined;
|
|
84
|
+
children: FieldProps['children'];
|
|
85
85
|
}): import("react").JSX.Element;
|
|
86
86
|
/**
|
|
87
87
|
* Switches a field between its own control and a typed expression, where the schema takes one. Its
|
|
@@ -91,15 +91,18 @@ export declare function ExpressionToggle({ active, onChange, }: {
|
|
|
91
91
|
active: boolean;
|
|
92
92
|
onChange: (active: boolean) => void;
|
|
93
93
|
}): import("react").JSX.Element;
|
|
94
|
-
export declare function ToggleField({ label, yamlKey, description, checked, onChange, disabled, }: {
|
|
94
|
+
export declare function ToggleField({ label, yamlKey, description, checked, onChange, disabled, error, }: {
|
|
95
95
|
label: string;
|
|
96
96
|
yamlKey?: string;
|
|
97
97
|
description: string;
|
|
98
98
|
checked: boolean;
|
|
99
99
|
onChange: (checked: boolean) => void;
|
|
100
100
|
disabled?: boolean;
|
|
101
|
+
error?: string | undefined;
|
|
101
102
|
}): import("react").JSX.Element;
|
|
102
|
-
|
|
103
|
+
/** One of a few choices. A YamlField around it names it; standing alone, `label` does. */
|
|
104
|
+
export declare function ChoiceButtons<T extends string>({ label, options, value, onChange, }: {
|
|
105
|
+
label?: string | undefined;
|
|
103
106
|
options: {
|
|
104
107
|
value: T;
|
|
105
108
|
label: string;
|
|
@@ -1,22 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { IoMdClose } from "../icons/io/IoMdClose.js";
|
|
3
|
-
import { LuBraces } from "../icons/lu/LuBraces.js";
|
|
4
|
-
import { LuChevronRight } from "../icons/lu/LuChevronRight.js";
|
|
1
|
+
import { AddIcon, ExpressionIcon, RemoveIcon } from "../icons.js";
|
|
5
2
|
import { withPositionKeys } from "../components/keys.js";
|
|
6
3
|
import { Tooltip } from "../components/Tooltip.js";
|
|
7
4
|
import { Button } from "../components/Button.js";
|
|
8
|
-
import {
|
|
5
|
+
import { Checkbox } from "../components/Checkbox.js";
|
|
9
6
|
import { Modal, ModalTitle } from "../components/Modal.js";
|
|
10
7
|
import { Switch } from "../components/Switch.js";
|
|
11
|
-
import {
|
|
8
|
+
import { ErrorText, Field } from "../components/Field.js";
|
|
12
9
|
import { IconButton } from "../components/IconButton.js";
|
|
13
10
|
import { Input, Textarea } from "../components/Input.js";
|
|
11
|
+
import { Section } from "../components/Section.js";
|
|
12
|
+
import { SegmentedControl } from "../components/SegmentedControl.js";
|
|
14
13
|
import { useGraphEditorStrings } from "./editorStrings.js";
|
|
15
14
|
import { asRecord } from "./records.js";
|
|
16
15
|
import { useFieldLint } from "./fieldProblems.js";
|
|
17
16
|
import { SuggestionInput } from "./SuggestionInput.js";
|
|
18
|
-
import {
|
|
19
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
17
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
20
18
|
import { createContext, useContext, useEffect, useId, useLayoutEffect, useRef, useState } from "react";
|
|
21
19
|
//#region src/graph/editorFields.tsx
|
|
22
20
|
var EXPRESSION = /^\$\{\{.*\}\}$/;
|
|
@@ -149,48 +147,40 @@ var SectionMemory = createContext(null);
|
|
|
149
147
|
function useSectionMemory() {
|
|
150
148
|
return useState(() => /* @__PURE__ */ new Map())[0];
|
|
151
149
|
}
|
|
152
|
-
|
|
150
|
+
/** A titled part of an editor dialog. It opens as it was last left in this
|
|
151
|
+
* dialog, and opens itself when a problem inside would otherwise be hidden. */
|
|
152
|
+
function DialogSection({ title, description, open = false, alert = false, children }) {
|
|
153
153
|
const memory = useContext(SectionMemory);
|
|
154
|
-
const [
|
|
155
|
-
|
|
156
|
-
memory?.set(title,
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
154
|
+
const [isOpen, setOpen] = useState(() => memory?.get(title) ?? open);
|
|
155
|
+
useEffect(() => {
|
|
156
|
+
memory?.set(title, isOpen);
|
|
157
|
+
}, [
|
|
158
|
+
memory,
|
|
159
|
+
title,
|
|
160
|
+
isOpen
|
|
161
|
+
]);
|
|
160
162
|
useEffect(() => {
|
|
161
|
-
if (alert
|
|
163
|
+
if (alert) setOpen(true);
|
|
162
164
|
}, [alert]);
|
|
163
|
-
return /* @__PURE__ */
|
|
164
|
-
|
|
165
|
-
open:
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
children:
|
|
169
|
-
className: "flex cursor-pointer select-none list-none items-center gap-1.5 py-2.5 text-sm font-semibold [&::-webkit-details-marker]:hidden",
|
|
170
|
-
children: [/* @__PURE__ */ jsx(LuChevronRight, {
|
|
171
|
-
"aria-hidden": "true",
|
|
172
|
-
className: "h-3.5 w-3.5 shrink-0 theme-muted-text transition-transform group-open:rotate-90 motion-reduce:transition-none"
|
|
173
|
-
}), title]
|
|
174
|
-
}), /* @__PURE__ */ jsxs("div", {
|
|
165
|
+
return /* @__PURE__ */ jsx(Section, {
|
|
166
|
+
title,
|
|
167
|
+
open: isOpen,
|
|
168
|
+
onOpenChange: setOpen,
|
|
169
|
+
headingLevel: 4,
|
|
170
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
175
171
|
className: "flex flex-col gap-3 pb-4",
|
|
176
172
|
children: [description && /* @__PURE__ */ jsx("div", {
|
|
177
173
|
className: "text-xs theme-muted-text",
|
|
178
174
|
children: description
|
|
179
175
|
}), children]
|
|
180
|
-
})
|
|
176
|
+
})
|
|
181
177
|
});
|
|
182
178
|
}
|
|
183
|
-
function FieldError({ message }) {
|
|
184
|
-
return message ? /* @__PURE__ */ jsx("div", {
|
|
185
|
-
className: "text-xs text-(--theme-error)",
|
|
186
|
-
children: message
|
|
187
|
-
}) : null;
|
|
188
|
-
}
|
|
189
179
|
/** The YAML key a field sets, beside its name; left out where the name already says it. */
|
|
190
180
|
function KeyHint({ label, yamlKey }) {
|
|
191
181
|
return label.trim().toLowerCase() === yamlKey.toLowerCase() ? null : /* @__PURE__ */ jsx("code", {
|
|
192
182
|
"aria-hidden": "true",
|
|
193
|
-
className: "font-mono text-xs theme-muted-text",
|
|
183
|
+
className: "font-mono text-xs font-normal theme-muted-text",
|
|
194
184
|
children: yamlKey
|
|
195
185
|
});
|
|
196
186
|
}
|
|
@@ -198,49 +188,29 @@ function KeyHint({ label, yamlKey }) {
|
|
|
198
188
|
function labelled(label, yamlKey) {
|
|
199
189
|
return {
|
|
200
190
|
label,
|
|
201
|
-
|
|
191
|
+
hint: /* @__PURE__ */ jsx(KeyHint, {
|
|
202
192
|
label,
|
|
203
193
|
yamlKey
|
|
204
194
|
})
|
|
205
195
|
};
|
|
206
196
|
}
|
|
207
|
-
/** A
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
})]
|
|
225
|
-
}), /* @__PURE__ */ jsx("span", {
|
|
226
|
-
id: descriptionId,
|
|
227
|
-
className: "text-xs theme-muted-text",
|
|
228
|
-
children: description
|
|
229
|
-
})]
|
|
230
|
-
});
|
|
231
|
-
return actions ? /* @__PURE__ */ jsxs("div", {
|
|
232
|
-
className: "flex items-start justify-between gap-3",
|
|
233
|
-
children: [text, /* @__PURE__ */ jsx("div", {
|
|
234
|
-
className: "flex shrink-0 items-center gap-1",
|
|
235
|
-
children: actions
|
|
236
|
-
})]
|
|
237
|
-
}) : text;
|
|
238
|
-
}
|
|
239
|
-
/** A field's label and description above the editor that sets it. */
|
|
240
|
-
function LabelledField({ children, ...label }) {
|
|
241
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
242
|
-
className: "flex flex-col gap-1.5",
|
|
243
|
-
children: [/* @__PURE__ */ jsx(FieldLabel, { ...label }), children]
|
|
197
|
+
/** A Field for a setting the YAML holds, with the key it sets beside its name. With `id`
|
|
198
|
+
* its label names the one control that takes that id; without, it names its controls as a
|
|
199
|
+
* group, as a list of rows or a set of choices wants. */
|
|
200
|
+
function YamlField({ label, yamlKey, description, actions, error, required, id, children }) {
|
|
201
|
+
return /* @__PURE__ */ jsx(Field, {
|
|
202
|
+
label,
|
|
203
|
+
hint: yamlKey && /* @__PURE__ */ jsx(KeyHint, {
|
|
204
|
+
label,
|
|
205
|
+
yamlKey
|
|
206
|
+
}),
|
|
207
|
+
description: description || void 0,
|
|
208
|
+
actions,
|
|
209
|
+
error: error || void 0,
|
|
210
|
+
required,
|
|
211
|
+
id,
|
|
212
|
+
group: id === void 0,
|
|
213
|
+
children
|
|
244
214
|
});
|
|
245
215
|
}
|
|
246
216
|
/**
|
|
@@ -250,47 +220,46 @@ function LabelledField({ children, ...label }) {
|
|
|
250
220
|
function ExpressionToggle({ active, onChange }) {
|
|
251
221
|
const t = useGraphEditorStrings();
|
|
252
222
|
return /* @__PURE__ */ jsx(IconButton, {
|
|
253
|
-
icon: /* @__PURE__ */ jsx(
|
|
223
|
+
icon: /* @__PURE__ */ jsx(ExpressionIcon, {}),
|
|
254
224
|
label: active ? t.stopExpression : t.useExpression,
|
|
255
225
|
size: "sm",
|
|
256
226
|
variant: "ghost",
|
|
257
|
-
active,
|
|
227
|
+
"data-selected": active || void 0,
|
|
258
228
|
onClick: () => onChange(!active)
|
|
259
229
|
});
|
|
260
230
|
}
|
|
261
|
-
function ToggleField({ label, yamlKey, description, checked, onChange, disabled }) {
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
231
|
+
function ToggleField({ label, yamlKey, description, checked, onChange, disabled, error }) {
|
|
232
|
+
const id = useId();
|
|
233
|
+
return /* @__PURE__ */ jsx(YamlField, {
|
|
234
|
+
label,
|
|
235
|
+
yamlKey,
|
|
236
|
+
description,
|
|
237
|
+
error,
|
|
238
|
+
id,
|
|
239
|
+
children: (control) => /* @__PURE__ */ jsx(Switch, {
|
|
240
|
+
...control,
|
|
241
|
+
nativeButton: true,
|
|
242
|
+
render: /* @__PURE__ */ jsx("button", { type: "button" }),
|
|
269
243
|
checked,
|
|
270
244
|
onCheckedChange: onChange,
|
|
271
|
-
"aria-label": label,
|
|
272
245
|
...disabled ? { disabled } : {}
|
|
273
|
-
})
|
|
246
|
+
})
|
|
274
247
|
});
|
|
275
248
|
}
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
}, option.value))
|
|
249
|
+
/** One of a few choices. A YamlField around it names it; standing alone, `label` does. */
|
|
250
|
+
function ChoiceButtons({ label, options, value, onChange }) {
|
|
251
|
+
return /* @__PURE__ */ jsx(SegmentedControl, {
|
|
252
|
+
label,
|
|
253
|
+
options,
|
|
254
|
+
value,
|
|
255
|
+
onValueChange: onChange
|
|
284
256
|
});
|
|
285
257
|
}
|
|
286
258
|
function AddRowButton({ label, onClick }) {
|
|
287
259
|
return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(Button, {
|
|
288
|
-
type: "button",
|
|
289
260
|
variant: "ghost",
|
|
290
261
|
size: "sm",
|
|
291
|
-
|
|
292
|
-
icon: /* @__PURE__ */ jsx(FaPlus, { className: "h-3 w-3" }),
|
|
293
|
-
iconPosition: "left",
|
|
262
|
+
icon: /* @__PURE__ */ jsx(AddIcon, {}),
|
|
294
263
|
onClick,
|
|
295
264
|
children: label
|
|
296
265
|
}) });
|
|
@@ -309,9 +278,9 @@ function KeyValueEditor({ rows, onChange, error, valuePlaceholder, keyPlaceholde
|
|
|
309
278
|
valueSuggestions,
|
|
310
279
|
lint
|
|
311
280
|
}, key)),
|
|
312
|
-
/* @__PURE__ */ jsx(
|
|
281
|
+
/* @__PURE__ */ jsx(ErrorText, { children: error }),
|
|
313
282
|
/* @__PURE__ */ jsx(AddRowButton, {
|
|
314
|
-
label: addLabel ?? t.
|
|
283
|
+
label: addLabel ?? t.common.add,
|
|
315
284
|
onClick: () => onChange([...rows, {
|
|
316
285
|
key: "",
|
|
317
286
|
value: ""
|
|
@@ -362,15 +331,15 @@ function KeyValueRow({ row, onChange, onRemove, keyPlaceholder, valuePlaceholder
|
|
|
362
331
|
})
|
|
363
332
|
}),
|
|
364
333
|
/* @__PURE__ */ jsx(IconButton, {
|
|
365
|
-
icon: /* @__PURE__ */ jsx(
|
|
366
|
-
label: t.
|
|
334
|
+
icon: /* @__PURE__ */ jsx(RemoveIcon, {}),
|
|
335
|
+
label: t.common.remove,
|
|
367
336
|
variant: "ghost",
|
|
368
337
|
size: "sm",
|
|
369
338
|
onClick: onRemove
|
|
370
339
|
})
|
|
371
340
|
]
|
|
372
341
|
}),
|
|
373
|
-
/* @__PURE__ */ jsx(
|
|
342
|
+
/* @__PURE__ */ jsx(ErrorText, { children: lint.message }),
|
|
374
343
|
lint.fixes
|
|
375
344
|
]
|
|
376
345
|
});
|
|
@@ -399,14 +368,14 @@ function StringListEditor({ label, values, onChange, addLabel, placeholder, erro
|
|
|
399
368
|
onValueChange: (next) => onChange(updateAt(values, i, next))
|
|
400
369
|
})
|
|
401
370
|
}), /* @__PURE__ */ jsx(IconButton, {
|
|
402
|
-
icon: /* @__PURE__ */ jsx(
|
|
403
|
-
label: t.
|
|
371
|
+
icon: /* @__PURE__ */ jsx(RemoveIcon, {}),
|
|
372
|
+
label: t.common.remove,
|
|
404
373
|
variant: "ghost",
|
|
405
374
|
size: "sm",
|
|
406
375
|
onClick: () => onChange(removeAt(values, i))
|
|
407
376
|
})]
|
|
408
377
|
}, key)),
|
|
409
|
-
/* @__PURE__ */ jsx(
|
|
378
|
+
/* @__PURE__ */ jsx(ErrorText, { children: error }),
|
|
410
379
|
/* @__PURE__ */ jsx(AddRowButton, {
|
|
411
380
|
label: addLabel,
|
|
412
381
|
onClick: () => onChange([...values, ""])
|
|
@@ -417,24 +386,19 @@ function StringListEditor({ label, values, onChange, addLabel, placeholder, erro
|
|
|
417
386
|
function SuggestedInput({ label, yamlKey, description, value, onChange, suggestions, error, placeholder }) {
|
|
418
387
|
const id = useId();
|
|
419
388
|
const lint = useFieldLint(yamlKey, id, value, onChange);
|
|
420
|
-
return /* @__PURE__ */
|
|
389
|
+
return /* @__PURE__ */ jsx(YamlField, {
|
|
421
390
|
label,
|
|
422
391
|
yamlKey,
|
|
423
|
-
description
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
children: [
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
onValueChange: onChange
|
|
434
|
-
}),
|
|
435
|
-
/* @__PURE__ */ jsx(FieldError, { message: error ?? lint.message }),
|
|
436
|
-
lint.fixes
|
|
437
|
-
]
|
|
392
|
+
description,
|
|
393
|
+
error: error ?? lint.message,
|
|
394
|
+
id,
|
|
395
|
+
children: (control) => /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(SuggestionInput, {
|
|
396
|
+
...control,
|
|
397
|
+
value,
|
|
398
|
+
placeholder,
|
|
399
|
+
suggestions: suggestions.map((option) => ({ value: option })),
|
|
400
|
+
onValueChange: onChange
|
|
401
|
+
}), lint.fixes] })
|
|
438
402
|
});
|
|
439
403
|
}
|
|
440
404
|
/** A text area that starts one line tall and grows with its text. */
|
|
@@ -472,11 +436,9 @@ function OpenOnAddSwitch({ open, onChange }) {
|
|
|
472
436
|
content: t.openOnAddHelp,
|
|
473
437
|
children: /* @__PURE__ */ jsxs("label", {
|
|
474
438
|
className: "flex cursor-pointer items-center gap-2 text-xs theme-muted-text",
|
|
475
|
-
children: [/* @__PURE__ */ jsx(
|
|
476
|
-
type: "checkbox",
|
|
477
|
-
className: "h-4 w-4 cursor-pointer accent-(--theme-element)",
|
|
439
|
+
children: [/* @__PURE__ */ jsx(Checkbox, {
|
|
478
440
|
checked: open,
|
|
479
|
-
|
|
441
|
+
onCheckedChange: (next) => onChange(next)
|
|
480
442
|
}), t.openOnAdd]
|
|
481
443
|
})
|
|
482
444
|
});
|
|
@@ -512,18 +474,18 @@ function DialogShell({ title, onClose, onSubmit, saveDisabled, dirty, locked = f
|
|
|
512
474
|
footerStart,
|
|
513
475
|
openOnAdd && /* @__PURE__ */ jsx(OpenOnAddSwitch, { ...openOnAdd }),
|
|
514
476
|
/* @__PURE__ */ jsx("div", { className: "flex-1" }),
|
|
515
|
-
/* @__PURE__ */ jsx(
|
|
516
|
-
|
|
517
|
-
|
|
477
|
+
/* @__PURE__ */ jsx(Button, {
|
|
478
|
+
variant: "ghost",
|
|
479
|
+
size: "sm",
|
|
518
480
|
onClick: onClose,
|
|
519
|
-
children: t.cancel
|
|
481
|
+
children: t.common.cancel
|
|
520
482
|
}),
|
|
521
|
-
/* @__PURE__ */ jsx(
|
|
522
|
-
|
|
483
|
+
/* @__PURE__ */ jsx(Button, {
|
|
484
|
+
variant: "primary",
|
|
485
|
+
size: "sm",
|
|
523
486
|
disabled: saveDisabled,
|
|
524
487
|
onClick: submit,
|
|
525
|
-
|
|
526
|
-
children: t.save
|
|
488
|
+
children: t.common.save
|
|
527
489
|
})
|
|
528
490
|
]
|
|
529
491
|
})
|
|
@@ -532,4 +494,4 @@ function DialogShell({ title, onClose, onSubmit, saveDisabled, dirty, locked = f
|
|
|
532
494
|
});
|
|
533
495
|
}
|
|
534
496
|
//#endregion
|
|
535
|
-
export { AddRowButton, ChoiceButtons, DURATION, DialogShell, ENV_KEY, EXPRESSION, ExpressionToggle,
|
|
497
|
+
export { AddRowButton, ChoiceButtons, DURATION, DialogSection, DialogShell, ENV_KEY, EXPRESSION, ExpressionToggle, GROWING_AREA, GrowingTextarea, KeyHint, KeyValueEditor, SectionMemory, StringListEditor, SuggestedInput, ToggleField, YamlField, asRecord, conditionText, countError, diffPatch, durationError, expressionError, flagError, flagOf, flagValue, isEmptyPatch, isScalar, labelled, openOnAddOf, orUndefined, parseCondition, parseCount, parseJson, parseScalar, removeAt, rowsError, rowsFrom, rowsTo, sameValue, text, unchangedValue, updateAt, useGrowingArea, useSectionMemory, withoutUndefined };
|
|
@@ -33,7 +33,7 @@ interface DragOptions {
|
|
|
33
33
|
onMove?: (client: Point) => void;
|
|
34
34
|
/** The release; `dragged` tells a drag from a click. */
|
|
35
35
|
onEnd?: (client: Point, dragged: boolean) => void;
|
|
36
|
-
/** A
|
|
36
|
+
/** A canceled pointer, or Escape when `escape` is on. */
|
|
37
37
|
onCancel?: (dragged: boolean) => void;
|
|
38
38
|
/** Escape cancels the press, and goes no further. */
|
|
39
39
|
escape?: boolean;
|
|
@@ -42,7 +42,7 @@ interface DragOptions {
|
|
|
42
42
|
/** The click after the release: swallowed always, only after a drag, or never. */
|
|
43
43
|
swallowClick?: 'always' | 'drag' | 'never';
|
|
44
44
|
}
|
|
45
|
-
/** Follows a press from `start` until it's released or
|
|
45
|
+
/** Follows a press from `start` until it's released or canceled. */
|
|
46
46
|
export declare function trackDrag(start: Point, { onMove, onEnd, onCancel, escape: cancelOnEscape, holdText, swallowClick, }: DragOptions): void;
|
|
47
47
|
export declare function place(box: Box): {
|
|
48
48
|
left: number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { cx } from "../cx.js";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import { useEffect, useRef, useSyncExternalStore } from "react";
|
|
4
4
|
//#region src/graph/editorPrimitives.tsx
|
|
@@ -69,7 +69,7 @@ function suppressNextClick() {
|
|
|
69
69
|
window.addEventListener("click", swallow, true);
|
|
70
70
|
setTimeout(() => window.removeEventListener("click", swallow, true), 0);
|
|
71
71
|
}
|
|
72
|
-
/** Follows a press from `start` until it's released or
|
|
72
|
+
/** Follows a press from `start` until it's released or canceled. */
|
|
73
73
|
function trackDrag(start, { onMove, onEnd, onCancel, escape: cancelOnEscape = false, holdText, swallowClick = "never" }) {
|
|
74
74
|
let dragged = false;
|
|
75
75
|
const cleanup = () => {
|
|
@@ -123,7 +123,7 @@ function place(box) {
|
|
|
123
123
|
/** The box a shift + drag draws, in its layer's coordinates. */
|
|
124
124
|
function MarqueeBox({ box, className }) {
|
|
125
125
|
return /* @__PURE__ */ jsx("div", {
|
|
126
|
-
className:
|
|
126
|
+
className: cx("absolute rounded-md border-2 border-dashed border-(--theme-accent) bg-(--theme-accent)/10", className),
|
|
127
127
|
style: place(box)
|
|
128
128
|
});
|
|
129
129
|
}
|