@parallelworks/ui 0.40.1 → 0.42.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 +25 -0
- package/dist/ai/adapter/memoryStore.js +7 -0
- package/dist/ai/adapter/mock/mockAdapter.js +52 -17
- package/dist/ai/adapter/openai/createOpenAIStream.js +1 -1
- package/dist/ai/adapter/openai/index.d.ts +1 -1
- package/dist/ai/adapter/openai/sse.d.ts +8 -2
- package/dist/ai/adapter/openai/sse.js +40 -4
- package/dist/ai/adapter/openai/wire.d.ts +6 -0
- package/dist/ai/components/AllocationSelector.d.ts +3 -4
- package/dist/ai/components/AllocationSelector.js +37 -33
- package/dist/ai/components/AttachmentManager.js +7 -7
- package/dist/ai/components/AttachmentUpload.js +5 -5
- package/dist/ai/components/BranchNavigator.js +1 -1
- package/dist/ai/components/ChatEmptyState.js +2 -2
- package/dist/ai/components/ChatInput.js +10 -8
- package/dist/ai/components/ChatLayout.js +4 -5
- package/dist/ai/components/ChatMessage.js +12 -12
- package/dist/ai/components/ChatMessageList.js +9 -9
- package/dist/ai/components/ChatSidebar.js +8 -9
- package/dist/ai/components/ChatThread.js +4 -4
- package/dist/ai/components/ComposerChrome.d.ts +2 -2
- package/dist/ai/components/ComposerChrome.js +3 -6
- package/dist/ai/components/DragOverlay.js +2 -2
- package/dist/ai/components/ModelSelector.d.ts +5 -3
- package/dist/ai/components/ModelSelector.js +102 -339
- package/dist/ai/components/PastedText.js +11 -11
- package/dist/ai/components/ProviderIssueBanner.d.ts +2 -0
- package/dist/ai/components/ProviderIssueBanner.js +34 -16
- package/dist/ai/components/Reasoning.js +4 -4
- package/dist/ai/components/ShareDialog.js +43 -35
- package/dist/ai/components/SlashMenu.d.ts +12 -2
- package/dist/ai/components/SlashMenu.js +29 -13
- package/dist/ai/components/agent/ActivityLine.js +3 -3
- package/dist/ai/components/agent/AgentMessageParts.js +20 -20
- package/dist/ai/components/agent/PermissionPicker.js +13 -11
- package/dist/ai/components/conversationActions.d.ts +4 -6
- package/dist/ai/components/conversationActions.js +9 -13
- package/dist/ai/core/ChatProvider.js +4 -4
- package/dist/ai/core/config.js +1 -1
- package/dist/ai/core/parts.d.ts +5 -0
- package/dist/ai/core/parts.js +28 -1
- package/dist/ai/core/providerIssues.d.ts +7 -0
- package/dist/ai/core/providerIssues.js +9 -1
- package/dist/ai/core/useKeyboardShortcuts.d.ts +4 -0
- package/dist/ai/core/useKeyboardShortcuts.js +8 -2
- package/dist/ai/index.d.ts +0 -1
- package/dist/ai/index.js +1 -2
- package/dist/ai/strings.d.ts +19 -0
- package/dist/ai/strings.js +18 -1
- package/dist/ai/ui/Avatar.js +5 -5
- package/dist/ai/ui/ConversationSidebar.d.ts +0 -1
- package/dist/ai/ui/ConversationSidebar.js +6 -7
- package/dist/ai/ui/Markdown.js +3 -3
- package/dist/ai/ui/Notice.js +6 -6
- package/dist/ai/ui/chip.d.ts +4 -0
- package/dist/ai/ui/chip.js +8 -0
- package/dist/ai/ui/sidebar.d.ts +6 -5
- package/dist/ai/ui/sidebar.js +39 -43
- package/dist/components/ActionMenu.d.ts +13 -0
- package/dist/components/ActionMenu.js +30 -0
- package/dist/components/Avatar.js +6 -6
- package/dist/components/Breadcrumbs.js +1 -1
- package/dist/components/Button.js +10 -10
- package/dist/components/Callout.js +2 -2
- package/dist/components/Card.js +3 -3
- package/dist/components/Combobox.d.ts +66 -0
- package/dist/components/Combobox.js +393 -0
- package/dist/components/ConfirmModal.js +11 -11
- package/dist/components/ContextMenu.d.ts +23 -0
- package/dist/components/ContextMenu.js +89 -0
- package/dist/components/CopyToClipboard.js +2 -2
- package/dist/components/CreateModal.d.ts +17 -36
- package/dist/components/CreateModal.js +97 -259
- package/dist/components/DescriptionList.js +8 -8
- package/dist/components/Filter.js +2 -2
- package/dist/components/FilterPill.js +2 -2
- package/dist/components/HoverCard.d.ts +14 -0
- package/dist/components/HoverCard.js +33 -0
- package/dist/components/IconButton.d.ts +5 -5
- package/dist/components/IconButton.js +18 -22
- package/dist/components/InfoTip.d.ts +15 -0
- package/dist/components/InfoTip.js +60 -0
- package/dist/components/Input.js +5 -5
- package/dist/components/LetterBadge.js +2 -2
- package/dist/components/Loader.js +3 -3
- package/dist/components/Markdown.js +1 -1
- package/dist/components/MarkdownImpl.js +2 -2
- package/dist/components/Menu.d.ts +33 -0
- package/dist/components/Menu.js +86 -0
- package/dist/components/MenuEntries.d.ts +56 -0
- package/dist/components/MenuEntries.js +123 -0
- package/dist/components/Modal.d.ts +29 -0
- package/dist/components/Modal.js +47 -0
- package/dist/components/Overview.js +11 -10
- package/dist/components/PageHeader.d.ts +10 -16
- package/dist/components/PageHeader.js +69 -95
- package/dist/components/Pagination.js +5 -5
- package/dist/components/Provider.d.ts +5 -11
- package/dist/components/Provider.js +11 -14
- package/dist/components/Radio.d.ts +8 -0
- package/dist/components/Radio.js +16 -0
- package/dist/components/SectionHeader.js +2 -2
- package/dist/components/SegmentedControl.d.ts +6 -5
- package/dist/components/SegmentedControl.js +34 -30
- package/dist/components/Select.d.ts +27 -0
- package/dist/components/Select.js +78 -0
- package/dist/components/SettingModeOption.d.ts +5 -8
- package/dist/components/SettingModeOption.js +10 -12
- package/dist/components/SettingRow.js +4 -4
- package/dist/components/SettingsCard.js +4 -4
- package/dist/components/SettingsGroup.js +2 -2
- package/dist/components/Sort.js +1 -1
- package/dist/components/StatusBadge.js +7 -7
- package/dist/components/StatusIcons.js +4 -4
- package/dist/components/Switch.d.ts +22 -0
- package/dist/components/Switch.js +28 -0
- package/dist/components/Table.js +11 -11
- package/dist/components/Tooltip.d.ts +24 -20
- package/dist/components/Tooltip.js +58 -76
- package/dist/components/floating.d.ts +14 -0
- package/dist/components/floating.js +21 -0
- package/dist/components/search.d.ts +2 -0
- package/dist/components/search.js +14 -0
- package/dist/editor/Editor.js +1 -1
- package/dist/editor/EditorField.js +16 -21
- package/dist/editor/FormCodePanel.js +19 -19
- package/dist/editor/Monaco.js +3 -3
- package/dist/file-explorer/FileExplorer.js +77 -81
- package/dist/file-explorer/FileExplorerContext.js +2 -2
- package/dist/file-explorer/FilePreview/CodePreviewEditor.js +1 -1
- package/dist/file-explorer/FilePreview/Inline.js +1 -1
- package/dist/file-explorer/FilePreview/StreamedBadge.js +5 -6
- package/dist/file-explorer/FilePreview/Viewer.js +8 -8
- package/dist/file-explorer/FilePreview/index.d.ts +1 -1
- package/dist/file-explorer/FilePreview/index.js +49 -83
- package/dist/file-explorer/FileRow.d.ts +4 -3
- package/dist/file-explorer/FileRow.js +32 -38
- package/dist/file-explorer/FileRowsWindow.d.ts +3 -2
- package/dist/file-explorer/FileRowsWindow.js +4 -4
- package/dist/file-explorer/FileTable.d.ts +3 -2
- package/dist/file-explorer/FileTable.js +3 -3
- package/dist/file-explorer/LoadMoreRow.js +1 -1
- package/dist/file-explorer/TreeView.js +11 -16
- package/dist/file-explorer/helpers.js +11 -12
- package/dist/file-explorer/toasts.js +11 -11
- package/dist/form/FieldGroup.d.ts +11 -0
- package/dist/form/FieldGroup.js +36 -0
- package/dist/form/FieldWrapper.js +4 -4
- package/dist/form/Fields/BooleanField.js +23 -33
- package/dist/form/Fields/CheckboxGroupField.d.ts +1 -1
- package/dist/form/Fields/CheckboxGroupField.js +9 -13
- package/dist/form/Fields/ColorField.d.ts +1 -2
- package/dist/form/Fields/ColorField.js +6 -11
- package/dist/form/Fields/DropdownField.d.ts +3 -13
- package/dist/form/Fields/DropdownField.js +40 -27
- package/dist/form/Fields/DurationField.d.ts +1 -2
- package/dist/form/Fields/DurationField.js +25 -32
- package/dist/form/Fields/LabelField.js +2 -2
- package/dist/form/Fields/MultiDropdownField.d.ts +6 -12
- package/dist/form/Fields/MultiDropdownField.js +31 -22
- package/dist/form/Fields/NumberField.d.ts +1 -1
- package/dist/form/Fields/NumberField.js +65 -35
- package/dist/form/Fields/ObjectField.d.ts +1 -1
- package/dist/form/Fields/ObjectField.js +12 -43
- package/dist/form/Fields/RadioField.d.ts +1 -1
- package/dist/form/Fields/RadioField.js +30 -41
- package/dist/form/Fields/RangeField.d.ts +1 -2
- package/dist/form/Fields/RangeField.js +23 -16
- package/dist/form/Fields/StringField.d.ts +1 -2
- package/dist/form/Fields/StringField.js +58 -26
- package/dist/form/Fields/TextAreaField.js +12 -10
- package/dist/form/Form.d.ts +30 -48
- package/dist/form/Form.js +306 -412
- package/dist/form/FormLayout.js +9 -9
- package/dist/form/Wizard/WizardContainer.d.ts +1 -4
- package/dist/form/Wizard/WizardContainer.js +40 -56
- package/dist/form/Wizard/WizardNavigation.js +1 -1
- package/dist/form/Wizard/WizardStepContent.d.ts +1 -5
- package/dist/form/Wizard/WizardStepContent.js +11 -16
- package/dist/form/Wizard/WizardStepIndicator.js +6 -6
- package/dist/form/Wizard/types.d.ts +0 -14
- package/dist/form/fieldRegistry.d.ts +1 -1
- package/dist/form/fieldRegistry.js +6 -6
- package/dist/form/formEditing.js +1 -1
- package/dist/form/index.d.ts +5 -4
- package/dist/form/index.js +6 -7
- package/dist/form/types/fieldComponentTypes.d.ts +8 -10
- package/dist/form/useChoiceField.d.ts +20 -0
- package/dist/form/useChoiceField.js +49 -0
- package/dist/form/useFieldValue.d.ts +7 -0
- package/dist/form/useFieldValue.js +20 -0
- package/dist/form/useParsedOpts.d.ts +3 -1
- package/dist/form/useParsedOpts.js +12 -17
- package/dist/form/utils/dependentOptions.d.ts +8 -4
- package/dist/form/utils/dependentOptions.js +25 -17
- package/dist/form/utils/fieldItems.d.ts +10 -0
- package/dist/form/utils/fieldItems.js +11 -0
- package/dist/form/utils/fieldPath.d.ts +10 -0
- package/dist/form/utils/fieldPath.js +20 -0
- package/dist/form/utils/shareEqual.d.ts +6 -0
- package/dist/form/utils/shareEqual.js +38 -0
- package/dist/graph/AnnotationBanner.js +8 -8
- package/dist/graph/Collapse.d.ts +1 -0
- package/dist/graph/Collapse.js +6 -27
- package/dist/graph/Connectors.js +5 -5
- package/dist/graph/DependencyGraph.js +20 -19
- package/dist/graph/GraphEditor.js +30 -41
- package/dist/graph/GraphEditorDialogs.js +17 -17
- package/dist/graph/GraphNode.js +1 -1
- package/dist/graph/InputDialog.js +19 -22
- package/dist/graph/InputsEditor.js +58 -66
- package/dist/graph/JobSummary.js +42 -39
- package/dist/graph/MatrixGroup.js +1 -1
- package/dist/graph/ProblemsButton.js +18 -19
- package/dist/graph/Reveal.js +1 -1
- package/dist/graph/ShortcutsButton.js +15 -18
- package/dist/graph/SuggestionInput.d.ts +5 -10
- package/dist/graph/SuggestionInput.js +14 -18
- package/dist/graph/ToolbarPopover.d.ts +11 -6
- package/dist/graph/ToolbarPopover.js +35 -67
- package/dist/graph/TreeView.js +24 -37
- package/dist/graph/WorkflowSettingsDialog.js +4 -4
- package/dist/graph/editorChrome.js +13 -12
- package/dist/graph/editorFields.js +29 -29
- package/dist/graph/editorPrimitives.d.ts +1 -1
- package/dist/graph/editorPrimitives.js +10 -7
- package/dist/graph/editorRows.js +103 -97
- package/dist/graph/fieldProblems.js +2 -2
- package/dist/graph/graphEditorState.d.ts +4 -3
- package/dist/graph/inputRefs.js +9 -9
- package/dist/graph/settingsViews.js +6 -7
- package/dist/graph/stepWith.js +6 -6
- package/dist/index.d.ts +14 -15
- package/dist/index.js +15 -14
- package/dist/list/ActionToolbar.d.ts +6 -14
- package/dist/list/ActionToolbar.js +48 -96
- package/dist/list/ListPage.d.ts +6 -12
- package/dist/list/ListPage.js +46 -29
- package/dist/list/ListPager.js +4 -4
- package/dist/list/ListTable.js +5 -5
- package/dist/list/ListViewControls.d.ts +5 -4
- package/dist/list/ListViewControls.js +177 -267
- package/dist/list/UserHoverCard.d.ts +3 -17
- package/dist/list/UserHoverCard.js +21 -45
- package/dist/list/index.d.ts +3 -4
- package/dist/list/index.js +3 -4
- package/dist/list/listSearch.js +12 -11
- package/dist/list/rowMenu.d.ts +63 -0
- package/dist/list/rowMenu.js +134 -0
- package/dist/logviewer/LogViewer.js +26 -26
- package/dist/styles.css +1 -1
- package/package.json +7 -13
- package/dist/ai/ui/Dropdown.d.ts +0 -31
- package/dist/ai/ui/Dropdown.js +0 -110
- package/dist/components/AddMenu.d.ts +0 -18
- package/dist/components/AddMenu.js +0 -46
- package/dist/components/BareModal.d.ts +0 -17
- package/dist/components/BareModal.js +0 -77
- package/dist/components/CollapsiblePanel.d.ts +0 -27
- package/dist/components/CollapsiblePanel.js +0 -77
- package/dist/components/Dropdown.d.ts +0 -28
- package/dist/components/Dropdown.js +0 -355
- package/dist/components/Listbox.d.ts +0 -21
- package/dist/components/Listbox.js +0 -119
- package/dist/components/MultiSelect.d.ts +0 -22
- package/dist/components/MultiSelect.js +0 -168
- package/dist/components/SwitchToggle.d.ts +0 -15
- package/dist/components/SwitchToggle.js +0 -57
- package/dist/components/SwitchToggleSmall.d.ts +0 -6
- package/dist/components/SwitchToggleSmall.js +0 -14
- package/dist/components/Toggle.d.ts +0 -6
- package/dist/components/Toggle.js +0 -20
- package/dist/components/dropdownUtils.d.ts +0 -37
- package/dist/components/dropdownUtils.js +0 -99
- package/dist/form/SpecialTypes/DropdownWrapper.d.ts +0 -25
- package/dist/form/SpecialTypes/DropdownWrapper.js +0 -28
- package/dist/form/SpecialTypes/FormikCustomDropdown.d.ts +0 -51
- package/dist/form/SpecialTypes/FormikCustomDropdown.js +0 -119
- package/dist/form/SpecialTypes/FormikCustomInput.d.ts +0 -19
- package/dist/form/SpecialTypes/FormikCustomInput.js +0 -121
- package/dist/form/SpecialTypes/FormikMultiSelectDropdown.d.ts +0 -13
- package/dist/form/SpecialTypes/FormikMultiSelectDropdown.js +0 -31
- package/dist/form/SpecialTypes/FormikNumericInput.d.ts +0 -9
- package/dist/form/SpecialTypes/FormikNumericInput.js +0 -60
- package/dist/form/SpecialTypes/index.d.ts +0 -3
- package/dist/list/HoverCard.d.ts +0 -24
- package/dist/list/HoverCard.js +0 -73
- package/dist/list/RowContextMenu.d.ts +0 -127
- package/dist/list/RowContextMenu.js +0 -515
package/dist/graph/editorRows.js
CHANGED
|
@@ -2,12 +2,12 @@ import { BsThreeDots } from "../icons/bs/BsThreeDots.js";
|
|
|
2
2
|
import { FaPlus } from "../icons/fa/FaPlus.js";
|
|
3
3
|
import { MdDragHandle } from "../icons/md/MdDragHandle.js";
|
|
4
4
|
import { TbAlertTriangle } from "../icons/tb/TbAlertTriangle.js";
|
|
5
|
-
import {
|
|
5
|
+
import { Tooltip } from "../components/Tooltip.js";
|
|
6
6
|
import { MarqueeBox, place } from "./editorPrimitives.js";
|
|
7
7
|
import { EDITOR_HANDLE_CLASS, NO_SELECTION, labelsOf, problemsIn, sameEdge, sameStep, selectionBounds, useGraphEditor, useSelectedEdges, useUi } from "./graphEditorState.js";
|
|
8
|
-
import
|
|
8
|
+
import { clsx } from "clsx";
|
|
9
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
9
10
|
import { useEffect, useRef } from "react";
|
|
10
|
-
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
11
11
|
//#region src/graph/editorRows.tsx
|
|
12
12
|
/** Drop indicators, the connection line and the selection, drawn in the graph's own coordinates. */
|
|
13
13
|
function GraphEditorCanvas() {
|
|
@@ -27,11 +27,11 @@ function GraphEditorCanvas() {
|
|
|
27
27
|
marquee && /* @__PURE__ */ jsx(MarqueeBox, { box: marquee }),
|
|
28
28
|
!marquee && drag?.payload.kind !== "jobs" && /* @__PURE__ */ jsx(SelectionBox, { api }),
|
|
29
29
|
indicator && /* @__PURE__ */ jsx("div", {
|
|
30
|
-
className:
|
|
30
|
+
className: clsx("absolute rounded-full", refused ? "bg-(--theme-error)" : "bg-(--theme-element)"),
|
|
31
31
|
style: place(indicator)
|
|
32
32
|
}),
|
|
33
33
|
outline && /* @__PURE__ */ jsx("div", {
|
|
34
|
-
className:
|
|
34
|
+
className: clsx("absolute rounded-md border-4", refused ? "border-(--theme-error)" : "border-(--theme-element)"),
|
|
35
35
|
style: {
|
|
36
36
|
left: outline.left - 8,
|
|
37
37
|
top: outline.top - 4,
|
|
@@ -40,7 +40,7 @@ function GraphEditorCanvas() {
|
|
|
40
40
|
}
|
|
41
41
|
}),
|
|
42
42
|
(target?.kind === "connect" || target?.kind === "merge") && /* @__PURE__ */ jsx("div", {
|
|
43
|
-
className:
|
|
43
|
+
className: clsx("absolute rounded-md border-4", (target.kind === "connect" ? target.edits : target.valid) ? "border-(--theme-element)" : "border-(--theme-error)"),
|
|
44
44
|
style: {
|
|
45
45
|
left: target.box.left - 8,
|
|
46
46
|
top: target.box.top - 4,
|
|
@@ -74,7 +74,7 @@ function SelectionBox({ api }) {
|
|
|
74
74
|
if (!grid || !bounds) return null;
|
|
75
75
|
const anchor = grid.cols.flat(2).find((job) => jobs.includes(job));
|
|
76
76
|
const y = bounds.connectorY;
|
|
77
|
-
return /* @__PURE__ */ jsxs(Fragment
|
|
77
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
78
78
|
/* @__PURE__ */ jsx("div", {
|
|
79
79
|
className: "absolute rounded-xl border-2 border-dashed border-(--theme-element)",
|
|
80
80
|
style: place(bounds)
|
|
@@ -101,23 +101,24 @@ function SelectionBox({ api }) {
|
|
|
101
101
|
port: "selection",
|
|
102
102
|
hint: t.selectionOutHint
|
|
103
103
|
}),
|
|
104
|
-
/* @__PURE__ */ jsx(
|
|
105
|
-
|
|
106
|
-
"
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
104
|
+
/* @__PURE__ */ jsx(Tooltip, {
|
|
105
|
+
content: t.moveSelectionHint,
|
|
106
|
+
children: /* @__PURE__ */ jsx("button", {
|
|
107
|
+
type: "button",
|
|
108
|
+
"aria-label": t.moveSelectionHint,
|
|
109
|
+
className: clsx(EDITOR_HANDLE_CLASS, "pointer-events-auto absolute flex h-8 w-8 cursor-grab items-center justify-center rounded-full border-4 border-(--theme-element) bg-(--theme-panel-bg)"),
|
|
110
|
+
style: {
|
|
111
|
+
left: bounds.left - 16,
|
|
112
|
+
top: bounds.top - 16
|
|
113
|
+
},
|
|
114
|
+
onPointerDown: (e) => api.startDrag(e, {
|
|
115
|
+
kind: "jobs",
|
|
116
|
+
jobs,
|
|
117
|
+
label: labelsOf(jobs),
|
|
118
|
+
...anchor ? { anchor } : {}
|
|
119
|
+
}),
|
|
120
|
+
children: /* @__PURE__ */ jsx(MdDragHandle, { className: "h-5 w-5" })
|
|
121
|
+
})
|
|
121
122
|
})
|
|
122
123
|
] });
|
|
123
124
|
}
|
|
@@ -126,18 +127,19 @@ function BoxGrip({ jobs }) {
|
|
|
126
127
|
const api = useGraphEditor();
|
|
127
128
|
if (!api) return null;
|
|
128
129
|
const t = api.t;
|
|
129
|
-
return /* @__PURE__ */ jsx(
|
|
130
|
-
|
|
131
|
-
"
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
130
|
+
return /* @__PURE__ */ jsx(Tooltip, {
|
|
131
|
+
content: t.moveBoxHint,
|
|
132
|
+
children: /* @__PURE__ */ jsx("button", {
|
|
133
|
+
type: "button",
|
|
134
|
+
"aria-label": t.moveBoxHint,
|
|
135
|
+
className: clsx(EDITOR_HANDLE_CLASS, "absolute -left-[18px] -top-[18px] flex h-8 w-8 cursor-grab items-center justify-center rounded-full border-4 theme-border bg-(--theme-panel-bg)"),
|
|
136
|
+
onPointerDown: (e) => api.startDrag(e, {
|
|
137
|
+
kind: "jobs",
|
|
138
|
+
jobs,
|
|
139
|
+
label: labelsOf(jobs)
|
|
140
|
+
}),
|
|
141
|
+
children: /* @__PURE__ */ jsx(MdDragHandle, { className: "h-5 w-5" })
|
|
142
|
+
})
|
|
141
143
|
});
|
|
142
144
|
}
|
|
143
145
|
var onBadge = (target) => target instanceof Element && !!target.closest("[data-problem-badge]");
|
|
@@ -148,19 +150,20 @@ function ProblemBadge({ api, job, step }) {
|
|
|
148
150
|
const messages = useUi(api, (state) => mine(state.problems).map((problem) => problem.message).join("\n"), "");
|
|
149
151
|
const line = useUi(api, (state) => mine(state.problems)[0]?.line ?? 0, 0);
|
|
150
152
|
if (!messages) return null;
|
|
151
|
-
return /* @__PURE__ */ jsx(
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
153
|
+
return /* @__PURE__ */ jsx(Tooltip, {
|
|
154
|
+
content: messages,
|
|
155
|
+
children: /* @__PURE__ */ jsx("button", {
|
|
156
|
+
type: "button",
|
|
157
|
+
"data-problem-badge": "",
|
|
158
|
+
"aria-label": t.problemCount(messages.split("\n").length),
|
|
159
|
+
className: "cursor-pointer rounded p-0.5 text-(--theme-error) hover:bg-(--theme-muted-panel-bg)",
|
|
160
|
+
onPointerDown: (e) => e.stopPropagation(),
|
|
161
|
+
onClick: (e) => {
|
|
162
|
+
e.stopPropagation();
|
|
163
|
+
api.reveal({ line });
|
|
164
|
+
},
|
|
165
|
+
children: /* @__PURE__ */ jsx(TbAlertTriangle, { className: "h-[0.9em] w-[0.9em]" })
|
|
166
|
+
})
|
|
164
167
|
});
|
|
165
168
|
}
|
|
166
169
|
/** What a job or step row does in the editor: drag, shift-click to select, a menu, its problems. */
|
|
@@ -169,7 +172,7 @@ function EditableRow({ api, selected, flagged, data, className, drag, toggle, re
|
|
|
169
172
|
role: "none",
|
|
170
173
|
...data,
|
|
171
174
|
...selected ? { "data-selected": "" } : {},
|
|
172
|
-
className:
|
|
175
|
+
className: clsx(EDITOR_HANDLE_CLASS, "-mx-0.5 px-0.5", className, selected && "bg-(--theme-element)/15", flagged ? "ring-2 ring-(--theme-error)" : selected && "ring-2 ring-(--theme-element)"),
|
|
173
176
|
onPointerDown: (e) => {
|
|
174
177
|
if (e.shiftKey) e.preventDefault();
|
|
175
178
|
api.startDrag(e, drag());
|
|
@@ -186,7 +189,7 @@ function EditableRow({ api, selected, flagged, data, className, drag, toggle, re
|
|
|
186
189
|
onContextMenu: (e) => {
|
|
187
190
|
e.preventDefault();
|
|
188
191
|
e.stopPropagation();
|
|
189
|
-
openMenu(e
|
|
192
|
+
openMenu(e);
|
|
190
193
|
},
|
|
191
194
|
children: [
|
|
192
195
|
children,
|
|
@@ -194,12 +197,11 @@ function EditableRow({ api, selected, flagged, data, className, drag, toggle, re
|
|
|
194
197
|
/* @__PURE__ */ jsx("button", {
|
|
195
198
|
type: "button",
|
|
196
199
|
"aria-label": menuLabel,
|
|
197
|
-
className:
|
|
200
|
+
className: clsx("cursor-pointer rounded theme-muted-text opacity-0 transition-opacity hover:bg-(--theme-muted-panel-bg) focus-visible:opacity-100", menuClassName),
|
|
198
201
|
onPointerDown: (e) => e.stopPropagation(),
|
|
199
202
|
onClick: (e) => {
|
|
200
203
|
e.stopPropagation();
|
|
201
|
-
|
|
202
|
-
openMenu(r.right, r.bottom);
|
|
204
|
+
openMenu(e.currentTarget);
|
|
203
205
|
},
|
|
204
206
|
children: /* @__PURE__ */ jsx(BsThreeDots, { className: iconClassName })
|
|
205
207
|
})
|
|
@@ -237,11 +239,11 @@ function EditableJobRow({ job, label, badge = true, children }) {
|
|
|
237
239
|
return api.store.get().selection.includes(job);
|
|
238
240
|
},
|
|
239
241
|
reveal: () => api.reveal({ job }),
|
|
240
|
-
openMenu: (
|
|
242
|
+
openMenu: (at) => api.openJobMenu(at, job),
|
|
241
243
|
menuLabel: t.jobActions,
|
|
242
244
|
menuClassName: "p-1 group-hover/row:opacity-100",
|
|
243
245
|
iconClassName: "h-[1em] w-[1em]",
|
|
244
|
-
badges: /* @__PURE__ */ jsxs(Fragment
|
|
246
|
+
badges: /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(ProblemBadge, {
|
|
245
247
|
api,
|
|
246
248
|
job
|
|
247
249
|
}), badge && api.isMatrixJob(job) && /* @__PURE__ */ jsx("span", {
|
|
@@ -257,26 +259,28 @@ function PortCircle({ side, at, draw, jobs, port, hint, zIndex }) {
|
|
|
257
259
|
const drag = useUi(api, (state) => state.drag, null);
|
|
258
260
|
if (!api) return null;
|
|
259
261
|
const dragging = drag?.payload.kind === "connect" && drag.payload.port === port && drag.payload.side === side;
|
|
260
|
-
return /* @__PURE__ */
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
262
|
+
return /* @__PURE__ */ jsx(Tooltip, {
|
|
263
|
+
content: hint,
|
|
264
|
+
disabled: Boolean(drag),
|
|
265
|
+
children: /* @__PURE__ */ jsxs("span", {
|
|
266
|
+
role: "none",
|
|
267
|
+
"data-dag-port": side,
|
|
268
|
+
...port === "selection" ? { "data-dag-selection": "" } : { "data-dag-node": jobs[0] },
|
|
269
|
+
className: clsx(EDITOR_HANDLE_CLASS, "group/port pointer-events-auto absolute flex h-8 w-8 cursor-crosshair items-center justify-center"),
|
|
270
|
+
style: {
|
|
271
|
+
left: at.x - 16,
|
|
272
|
+
top: at.y - 16,
|
|
273
|
+
...zIndex === void 0 ? {} : { zIndex }
|
|
274
|
+
},
|
|
275
|
+
onPointerDown: (e) => api.startDrag(e, {
|
|
276
|
+
kind: "connect",
|
|
277
|
+
from: jobs,
|
|
278
|
+
side,
|
|
279
|
+
label: labelsOf(jobs),
|
|
280
|
+
port
|
|
281
|
+
}),
|
|
282
|
+
children: [draw && /* @__PURE__ */ jsx("span", { className: "absolute inset-0 bg-(--theme-panel-bg)" }), /* @__PURE__ */ jsx("span", { className: clsx("relative h-4 w-4 rounded-full group-hover/port:bg-(--theme-element)", dragging ? "bg-(--theme-element)" : draw && "bg-(--theme-border)") })]
|
|
283
|
+
})
|
|
280
284
|
});
|
|
281
285
|
}
|
|
282
286
|
/**
|
|
@@ -288,7 +292,7 @@ function NodePorts({ jobs, left, right, drawLeft, drawRight, zIndex }) {
|
|
|
288
292
|
if (!api) return null;
|
|
289
293
|
const t = api.t;
|
|
290
294
|
const port = `node:${jobs[0]}`;
|
|
291
|
-
return /* @__PURE__ */ jsxs(Fragment
|
|
295
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(PortCircle, {
|
|
292
296
|
side: "in",
|
|
293
297
|
at: left,
|
|
294
298
|
draw: drawLeft,
|
|
@@ -351,7 +355,7 @@ function EditableStepRow({ job, index, label, children }) {
|
|
|
351
355
|
job,
|
|
352
356
|
step: index
|
|
353
357
|
}),
|
|
354
|
-
openMenu: (
|
|
358
|
+
openMenu: (at) => api.openStepMenu(at, job, index),
|
|
355
359
|
menuLabel: t.stepActions,
|
|
356
360
|
menuClassName: "p-0.5 group-hover/step:opacity-100",
|
|
357
361
|
iconClassName: "h-[0.9em] w-[0.9em]",
|
|
@@ -395,7 +399,7 @@ function EdgeHitPath({ d, edge }) {
|
|
|
395
399
|
stroke: "transparent",
|
|
396
400
|
strokeWidth: 28,
|
|
397
401
|
fill: "none",
|
|
398
|
-
className:
|
|
402
|
+
className: clsx(EDITOR_HANDLE_CLASS, "outline-none focus-visible:[stroke:color-mix(in_srgb,var(--theme-element)_35%,transparent)]"),
|
|
399
403
|
style: {
|
|
400
404
|
pointerEvents: "stroke",
|
|
401
405
|
cursor: "pointer"
|
|
@@ -409,7 +413,7 @@ function EdgeHitPath({ d, edge }) {
|
|
|
409
413
|
},
|
|
410
414
|
onContextMenu: (e) => {
|
|
411
415
|
e.preventDefault();
|
|
412
|
-
api.openEdgeMenu(e
|
|
416
|
+
api.openEdgeMenu(e, edge);
|
|
413
417
|
}
|
|
414
418
|
});
|
|
415
419
|
}
|
|
@@ -420,23 +424,25 @@ function EdgeEnds({ edge, start, end, zIndex }) {
|
|
|
420
424
|
if (!api) return null;
|
|
421
425
|
const t = api.t;
|
|
422
426
|
const inUse = api.edgeInUse(edge);
|
|
423
|
-
const handle = (side, at, fixed) => /* @__PURE__ */ jsx(
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
427
|
+
const handle = (side, at, fixed) => /* @__PURE__ */ jsx(Tooltip, {
|
|
428
|
+
content: inUse ? t.dependencyInUse : t.moveDependencyEnd,
|
|
429
|
+
disabled: Boolean(drag),
|
|
430
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
431
|
+
role: "none",
|
|
432
|
+
"data-dag-edge-end": side,
|
|
433
|
+
className: clsx(EDITOR_HANDLE_CLASS, "pointer-events-auto absolute flex h-8 w-8 items-center justify-center", inUse ? "cursor-not-allowed" : "cursor-grab"),
|
|
434
|
+
style: {
|
|
435
|
+
left: at.x - 16,
|
|
436
|
+
top: at.y - 16,
|
|
437
|
+
zIndex
|
|
438
|
+
},
|
|
439
|
+
onPointerDown: (e) => {
|
|
440
|
+
if (!inUse) api.startEdgeEnd(e, edge, side, fixed);
|
|
441
|
+
},
|
|
442
|
+
children: /* @__PURE__ */ jsx("span", { className: "h-5 w-5 rounded-full border-4 border-(--theme-element) bg-(--theme-panel-bg)" })
|
|
443
|
+
})
|
|
438
444
|
}, side);
|
|
439
|
-
return /* @__PURE__ */ jsxs(Fragment
|
|
445
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [handle("from", start, end), handle("to", end, start)] });
|
|
440
446
|
}
|
|
441
447
|
/** Shown in place of the graph when the workflow has no jobs yet. */
|
|
442
448
|
/** The canvas of a graph with no jobs, which takes the graph's keys, so undo and paste still work. */
|
|
@@ -451,7 +457,7 @@ function EmptyGraphEditor({ containerRef, overlays, height, removeBorder }) {
|
|
|
451
457
|
containerRef(el);
|
|
452
458
|
},
|
|
453
459
|
tabIndex: -1,
|
|
454
|
-
className:
|
|
460
|
+
className: clsx("panel relative w-full overflow-hidden outline-none", removeBorder ? "border-none" : "border"),
|
|
455
461
|
style: { height },
|
|
456
462
|
children: overlays
|
|
457
463
|
});
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { useWorkflowEditing } from "../components/Provider.js";
|
|
2
1
|
import { TbAlertTriangle } from "../icons/tb/TbAlertTriangle.js";
|
|
3
2
|
import { keyedByContent } from "../components/keys.js";
|
|
3
|
+
import { useWorkflowEditing } from "../components/Provider.js";
|
|
4
4
|
import { useGraphEditorStrings } from "./editorStrings.js";
|
|
5
|
-
import { createContext, useCallback, useContext, useEffect, useMemo, useState } from "react";
|
|
6
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { createContext, useCallback, useContext, useEffect, useMemo, useState } from "react";
|
|
7
7
|
//#region src/graph/fieldProblems.tsx
|
|
8
8
|
var FieldProblemsContext = createContext(null);
|
|
9
9
|
var keyOf = (at) => at.join(".");
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type PointerEvent as ReactPointerEvent } from 'react';
|
|
2
|
+
import type { MenuAnchor } from '../components/ContextMenu.js';
|
|
2
3
|
import type { GraphEdit, GraphSlot, NeedRef, NudgeDirection, StepRef } from '../editing.js';
|
|
3
4
|
import type { EditorProblem, RevealTarget } from './editorApi.js';
|
|
4
5
|
import type { Box, Point, Store } from './editorPrimitives.js';
|
|
@@ -131,9 +132,9 @@ export interface GraphEditorApi {
|
|
|
131
132
|
t: GraphEditorStrings;
|
|
132
133
|
isMatrixJob: (job: string) => boolean;
|
|
133
134
|
startDrag: (e: ReactPointerEvent, payload: DragPayload) => void;
|
|
134
|
-
openJobMenu: (
|
|
135
|
-
openStepMenu: (
|
|
136
|
-
openEdgeMenu: (
|
|
135
|
+
openJobMenu: (at: MenuAnchor, job: string) => void;
|
|
136
|
+
openStepMenu: (at: MenuAnchor, job: string, index: number) => void;
|
|
137
|
+
openEdgeMenu: (at: MenuAnchor, edge: EdgeSelection) => void;
|
|
137
138
|
/**
|
|
138
139
|
* Selects a connector alone, or with `add` adds it to the selected connectors or takes it out;
|
|
139
140
|
* selected jobs or steps give way to it.
|
package/dist/graph/inputRefs.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { FaPlus } from "../icons/fa/FaPlus.js";
|
|
2
|
+
import { Switch } from "../components/Switch.js";
|
|
2
3
|
import { IconButton } from "../components/IconButton.js";
|
|
3
4
|
import { Textarea, fieldBoxClasses } from "../components/Input.js";
|
|
4
|
-
import { Toggle } from "../components/Toggle.js";
|
|
5
5
|
import { useGraphEditorStrings, useInputsEditorStrings } from "./editorStrings.js";
|
|
6
6
|
import { asRecord } from "./records.js";
|
|
7
7
|
import { useFieldLint } from "./fieldProblems.js";
|
|
8
8
|
import { SuggestionInput } from "./SuggestionInput.js";
|
|
9
9
|
import { ExpressionToggle, FieldError, FieldLabel, GROWING_AREA, LabelledField, flagError, flagValue, text, useGrowingArea } from "./editorFields.js";
|
|
10
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
10
11
|
import { useId, useRef, useState } from "react";
|
|
11
|
-
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
12
12
|
//#region src/graph/inputRefs.tsx
|
|
13
13
|
/** Every input with a value, where a run reads it: groups nest unless flattened, lists hide their rows. */
|
|
14
14
|
function inputRefs(editing, inputs) {
|
|
@@ -124,15 +124,15 @@ function insertAt(element, value, reference) {
|
|
|
124
124
|
var ONE_OF = ["dropdown", "radio"];
|
|
125
125
|
/** A text field that takes any value, expressions included, with suggestions to pick from. */
|
|
126
126
|
function ExpressionInput({ id, label, value, onChange, suggestions = [], placeholder, error, describedBy, required }) {
|
|
127
|
-
return /* @__PURE__ */ jsxs(Fragment
|
|
127
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(SuggestionInput, {
|
|
128
128
|
id,
|
|
129
|
-
|
|
129
|
+
"aria-label": label,
|
|
130
130
|
"aria-describedby": describedBy,
|
|
131
131
|
required,
|
|
132
132
|
value,
|
|
133
133
|
placeholder,
|
|
134
134
|
suggestions,
|
|
135
|
-
onChange
|
|
135
|
+
onValueChange: onChange
|
|
136
136
|
}), /* @__PURE__ */ jsx(FieldError, { message: error })] });
|
|
137
137
|
}
|
|
138
138
|
/** Conditions on the form's switches and choices, for fields that run on one. */
|
|
@@ -170,10 +170,10 @@ function FlagField({ label, yamlKey, description, value, original, fallback = fa
|
|
|
170
170
|
description
|
|
171
171
|
}), /* @__PURE__ */ jsxs("div", {
|
|
172
172
|
className: "flex shrink-0 items-center gap-1",
|
|
173
|
-
children: [!typed && /* @__PURE__ */ jsx(
|
|
173
|
+
children: [!typed && /* @__PURE__ */ jsx(Switch, {
|
|
174
174
|
checked,
|
|
175
|
-
|
|
176
|
-
label
|
|
175
|
+
onCheckedChange: (on) => onChange(flagValue(on, fallback, original)),
|
|
176
|
+
"aria-label": label
|
|
177
177
|
}), /* @__PURE__ */ jsx(ExpressionToggle, {
|
|
178
178
|
active: typed,
|
|
179
179
|
onChange: (on) => {
|
|
@@ -227,7 +227,7 @@ function ConditionField({ label, yamlKey, description, value, onChange, source,
|
|
|
227
227
|
description,
|
|
228
228
|
htmlFor: id,
|
|
229
229
|
descriptionId: `${id}-help`,
|
|
230
|
-
actions: /* @__PURE__ */ jsxs(Fragment
|
|
230
|
+
actions: /* @__PURE__ */ jsxs(Fragment, { children: [allRefs(source).length > 0 && /* @__PURE__ */ jsx(InsertRefSelect, {
|
|
231
231
|
source,
|
|
232
232
|
label: t.insertValue,
|
|
233
233
|
onInsert: insert
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Tooltip } from "../components/Tooltip.js";
|
|
2
2
|
import Loader from "../components/Loader.js";
|
|
3
3
|
import { useGraphEditorStrings } from "./editorStrings.js";
|
|
4
4
|
import { ProblemList } from "./fieldProblems.js";
|
|
5
5
|
import { ChoiceButtons, FieldError } from "./editorFields.js";
|
|
6
|
-
import { Suspense, lazy } from "react";
|
|
7
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
import { Suspense, lazy } from "react";
|
|
8
8
|
//#region src/graph/settingsViews.tsx
|
|
9
9
|
var MonacoEditor = lazy(() => import("../editor/Monaco.js"));
|
|
10
10
|
function yamlProblem(yaml, t, editing) {
|
|
@@ -13,10 +13,9 @@ function yamlProblem(yaml, t, editing) {
|
|
|
13
13
|
}
|
|
14
14
|
function ViewSwitch({ yaml, onForm, onYaml }) {
|
|
15
15
|
const t = useGraphEditorStrings();
|
|
16
|
-
return /* @__PURE__ */ jsx(
|
|
17
|
-
|
|
18
|
-
"
|
|
19
|
-
children: /* @__PURE__ */ jsx(ChoiceButtons, {
|
|
16
|
+
return /* @__PURE__ */ jsx(Tooltip, {
|
|
17
|
+
content: t.help.view,
|
|
18
|
+
children: /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(ChoiceButtons, {
|
|
20
19
|
options: [{
|
|
21
20
|
value: "yaml",
|
|
22
21
|
label: t.viewYaml
|
|
@@ -26,7 +25,7 @@ function ViewSwitch({ yaml, onForm, onYaml }) {
|
|
|
26
25
|
}],
|
|
27
26
|
value: yaml ? "yaml" : "form",
|
|
28
27
|
onChange: (view) => view === "yaml" ? onYaml() : onForm()
|
|
29
|
-
})
|
|
28
|
+
}) })
|
|
30
29
|
});
|
|
31
30
|
}
|
|
32
31
|
var NO_SCOPED = {
|
package/dist/graph/stepWith.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { useRepoSuggestions, useWorkflowActions, useWorkflowEditing, useWorkflowJsonResolver } from "../components/Provider.js";
|
|
2
1
|
import { IoMdClose } from "../icons/io/IoMdClose.js";
|
|
2
|
+
import { useRepoSuggestions, useWorkflowActions, useWorkflowEditing, useWorkflowJsonResolver } from "../components/Provider.js";
|
|
3
3
|
import { IconButton } from "../components/IconButton.js";
|
|
4
4
|
import { Input, Textarea } from "../components/Input.js";
|
|
5
5
|
import { useGraphEditorStrings, useInputsEditorStrings } from "./editorStrings.js";
|
|
@@ -10,8 +10,8 @@ import { SuggestionInput } from "./SuggestionInput.js";
|
|
|
10
10
|
import { ChoiceButtons, EXPRESSION, FieldError, FieldLabel, KeyValueEditor, LabelledField, StringListEditor, SuggestedInput, ToggleField, isScalar, labelled, parseJson, parseScalar, rowsError, rowsFrom, rowsTo, sameValue } from "./editorFields.js";
|
|
11
11
|
import { ValueOrInputField, refSuggestions } from "./inputRefs.js";
|
|
12
12
|
import { DynamicForm } from "../form/Form.js";
|
|
13
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
13
14
|
import { useEffect, useId, useState } from "react";
|
|
14
|
-
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
15
15
|
//#region src/graph/stepWith.tsx
|
|
16
16
|
var REPO_INPUTS = [{
|
|
17
17
|
key: "$yaml",
|
|
@@ -262,7 +262,7 @@ function RepositoryForm({ uses, draft, onUses, onDraft }) {
|
|
|
262
262
|
initialValues: initial,
|
|
263
263
|
labelPosition: "top",
|
|
264
264
|
workflowForm: true,
|
|
265
|
-
|
|
265
|
+
onValuesChange: (values) => {
|
|
266
266
|
if ([
|
|
267
267
|
"repo",
|
|
268
268
|
"branch",
|
|
@@ -299,14 +299,14 @@ function UsesPicker({ uses, onUses, choices, draft, onDraft, error }) {
|
|
|
299
299
|
const options = (prefix) => choices.filter((choice) => choice.startsWith(prefix));
|
|
300
300
|
const select = (values, placeholder, labels) => /* @__PURE__ */ jsx(SuggestionInput, {
|
|
301
301
|
id,
|
|
302
|
-
|
|
302
|
+
"aria-label": t.fields.uses,
|
|
303
303
|
value: uses,
|
|
304
304
|
placeholder,
|
|
305
305
|
suggestions: values.map((value) => ({
|
|
306
306
|
value,
|
|
307
307
|
label: labels?.(value)
|
|
308
308
|
})),
|
|
309
|
-
|
|
309
|
+
onValueChange: onUses
|
|
310
310
|
});
|
|
311
311
|
return /* @__PURE__ */ jsxs("div", {
|
|
312
312
|
className: "flex flex-col gap-2",
|
|
@@ -447,7 +447,7 @@ function WithEditor({ uses, draft, original, onChange, error, source }) {
|
|
|
447
447
|
original,
|
|
448
448
|
onChange
|
|
449
449
|
}, key)),
|
|
450
|
-
kind !== "action" && /* @__PURE__ */ jsxs(Fragment
|
|
450
|
+
kind !== "action" && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
451
451
|
known.map(([key, raw]) => {
|
|
452
452
|
const definition = asRecord(raw);
|
|
453
453
|
const label = String(definition["label"] ?? "");
|
package/dist/index.d.ts
CHANGED
|
@@ -1,52 +1,51 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { ActionMenu } from './components/ActionMenu.js';
|
|
2
2
|
export { Avatar, type AvatarProps, type AvatarSize, type AvatarStatus, avatarInitials, } from './components/Avatar.js';
|
|
3
|
-
export { BareModal, modalPanelClasses } from './components/BareModal.js';
|
|
4
3
|
export { BreadcrumbProvider, type IBreadcrumbItem, useBreadcrumb, useClearBreadcrumbs, useHideBreadcrumbs, useSetBreadcrumbs, useSetDefaultBreadcrumbs, } from './components/Breadcrumbs.js';
|
|
5
4
|
export { Button, MethodButton } from './components/Button.js';
|
|
6
5
|
export { default as Callout } from './components/Callout.js';
|
|
7
6
|
export { Card, CardHeader } from './components/Card.js';
|
|
8
|
-
export {
|
|
7
|
+
export { Autocomplete, type AutocompleteProps, Combobox, type ComboboxGroup, type ComboboxItem, type ComboboxItems, type ComboboxProps, } from './components/Combobox.js';
|
|
9
8
|
export { ConfirmModal } from './components/ConfirmModal.js';
|
|
9
|
+
export { type MenuAnchor, type OpenMenu, type OpenMenuOptions, useContextMenu, } from './components/ContextMenu.js';
|
|
10
10
|
export { CopyCodeBlock, default as CopyToClipboard } from './components/CopyToClipboard.js';
|
|
11
|
-
export {
|
|
11
|
+
export { CreateModal, CreateModalAutocompleteField, CreateModalField, CreateModalSelect, CreateModalSwitch, CreateModalTextarea, } from './components/CreateModal.js';
|
|
12
12
|
export { DescriptionListItem, default as DescriptionList } from './components/DescriptionList.js';
|
|
13
|
-
export type { IProps as DropdownProps } from './components/Dropdown.js';
|
|
14
|
-
export { default as Dropdown } from './components/Dropdown.js';
|
|
15
|
-
export type { ICategory, IOptions } from './components/dropdownUtils.js';
|
|
16
|
-
export { DropdownCaret, filterOption, flattenOptions, isCategory, isOption, toggleSetMember, } from './components/dropdownUtils.js';
|
|
17
13
|
export { default as EmptyState } from './components/EmptyState.js';
|
|
18
14
|
export { default as Filter } from './components/Filter.js';
|
|
19
15
|
export { FilterPill } from './components/FilterPill.js';
|
|
20
16
|
export { dangerButtonClasses, ghostButtonClasses, primaryButtonClasses, } from './components/ghostButton.js';
|
|
17
|
+
export { HoverCard, type HoverCardProps } from './components/HoverCard.js';
|
|
21
18
|
export { IconButton } from './components/IconButton.js';
|
|
22
19
|
export { Indicator } from './components/Indicator.js';
|
|
20
|
+
export { formatInfoTipContent, InfoTip } from './components/InfoTip.js';
|
|
23
21
|
export { Input, Textarea } from './components/Input.js';
|
|
24
22
|
export { inputClasses } from './components/inputClasses.js';
|
|
25
23
|
export { LetterBadge } from './components/LetterBadge.js';
|
|
26
|
-
export { default as CustomListbox } from './components/Listbox.js';
|
|
27
24
|
export { default as Loader } from './components/Loader.js';
|
|
28
25
|
export type { MarkdownProps } from './components/Markdown.js';
|
|
29
26
|
export { default as Markdown } from './components/Markdown.js';
|
|
30
|
-
export {
|
|
27
|
+
export { MenuCheckboxItem, MenuGroupLabel, MenuItem, MenuLinkItem, MenuPopup, type MenuPopupProps, MenuRadioItem, MenuSeparator, MenuSubmenuTrigger, } from './components/Menu.js';
|
|
28
|
+
export { type MenuAction, type MenuDivider, MenuEntries, type MenuEntry, MenuFilter, type MenuSearch, type MenuSubmenu, menuDivider, } from './components/MenuEntries.js';
|
|
29
|
+
export { Modal, ModalDescription, type ModalProps, ModalTitle, modalPanelClassName, } from './components/Modal.js';
|
|
31
30
|
export { Overview } from './components/Overview.js';
|
|
32
|
-
export { BreadcrumbsActionButton, BreadcrumbsRightAction, BreadcrumbsTitleAction, HeaderActionMenu, HeaderAddButton, HeaderEditButton,
|
|
31
|
+
export { BreadcrumbsActionButton, BreadcrumbsRightAction, BreadcrumbsTitleAction, HeaderActionMenu, HeaderAddButton, HeaderEditButton, headerActionButtonClasses, PageHeader, type PageHeaderBreadcrumb, type PageHeaderCrumb, } from './components/PageHeader.js';
|
|
33
32
|
export { Pagination } from './components/Pagination.js';
|
|
34
33
|
export { type PersistedStateHook, type RunFileResult, type UIData, type UILinkComponent, type UINavigation, type UINotify, UIProvider, type UISlots, type UIStrings, type UIToastId, type UIToastOptions, type UIToastUpdate, useNavigation, useNotify, useOptionalWorkflowEngine, usePersistedState, useProvisionCorsRules, useRunFile, useSlots, useStrings, useWorkflowActions, useWorkflowEditing, useWorkflowEngine, useWorkflowEngineLoader, type WorkflowEngineSource, type WorkflowJsonRef, } from './components/Provider.js';
|
|
34
|
+
export { Radio, RadioGroup, type RadioProps } from './components/Radio.js';
|
|
35
35
|
export { RequiredMark } from './components/RequiredMark.js';
|
|
36
36
|
export { useRelativeTime } from './components/relativeTime.js';
|
|
37
37
|
export { default as SectionHeader } from './components/SectionHeader.js';
|
|
38
38
|
export { SegmentedControl, type SegmentedOption } from './components/SegmentedControl.js';
|
|
39
|
+
export { Select, type SelectItem, type SelectProps } from './components/Select.js';
|
|
39
40
|
export { SettingModeOption } from './components/SettingModeOption.js';
|
|
40
41
|
export { SettingRow, SettingSection } from './components/SettingRow.js';
|
|
41
42
|
export { default as SettingsCard } from './components/SettingsCard.js';
|
|
42
43
|
export { default as SettingsGroup } from './components/SettingsGroup.js';
|
|
43
44
|
export { default as Sort, type TDirection } from './components/Sort.js';
|
|
44
45
|
export { type BadgeVariant, StatusBadge, StatusDot, statusTextClass, } from './components/StatusBadge.js';
|
|
45
|
-
export {
|
|
46
|
-
export { default as SwitchToggleSmall } from './components/SwitchToggleSmall.js';
|
|
46
|
+
export { Switch, type SwitchProps } from './components/Switch.js';
|
|
47
47
|
export { CompactTable, Table } from './components/Table.js';
|
|
48
|
-
export {
|
|
49
|
-
export { formatTooltipContent, GlobalTooltip, TOOLTIP_ID, TooltipInfo, truncationTooltipProps, } from './components/Tooltip.js';
|
|
48
|
+
export { Tooltip, type TooltipProps, TooltipProvider, type TooltipSide, } from './components/Tooltip.js';
|
|
50
49
|
export { useCssIsDark } from './components/useCssIsDark.js';
|
|
51
50
|
export type { EditRefusalReason, FieldPatch, GraphEdit, GraphEditResult, GraphEditState, GraphLayout, GraphPosition, GraphSlot, InputEdit, InputPath, LintFix, NeedRef, StepRef, WorkflowAction, WorkflowActionInput, WorkflowEditing, WorkflowLintContext, WorkflowLintProblem, } from './editing.js';
|
|
52
51
|
export type { EngineJob, EngineStep, EvaluateOptions, ExpansionKeys, LogCommand, LogSegment, MatrixGroup, ProcessedLogLine, RunStatus, WorkflowEngine, WorkflowVariable, WorkflowVariables, } from './engine.js';
|