@flowdrop/flowdrop 1.15.0 → 2.0.0-beta.10
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/CHANGELOG.md +648 -0
- package/MIGRATION-2.0.md +642 -0
- package/README.md +28 -28
- package/dist/adapters/WorkflowAdapter.d.ts +1 -1
- package/dist/adapters/WorkflowAdapter.js +18 -13
- package/dist/adapters/agentspec/AgentSpecAdapter.js +10 -10
- package/dist/adapters/agentspec/defaultNodeTypes.js +9 -9
- package/dist/api/enhanced-client.js +6 -11
- package/dist/chat/batchFeedback.d.ts +39 -0
- package/dist/chat/batchFeedback.js +51 -0
- package/dist/commands/executor.js +66 -27
- package/dist/commands/storeIntegration.svelte.d.ts +4 -1
- package/dist/commands/storeIntegration.svelte.js +36 -21
- package/dist/commands/types.d.ts +2 -0
- package/dist/commands/types.js +5 -5
- package/dist/components/App.svelte +696 -565
- package/dist/components/App.svelte.d.ts +63 -16
- package/dist/components/Button.stories.svelte +65 -0
- package/dist/components/Button.stories.svelte.d.ts +19 -0
- package/dist/components/Button.svelte +62 -0
- package/dist/components/Button.svelte.d.ts +24 -0
- package/dist/components/CanvasIconButton.svelte +76 -0
- package/dist/components/CanvasIconButton.svelte.d.ts +18 -0
- package/dist/components/ConfigForm.svelte +181 -552
- package/dist/components/ConfigForm.svelte.d.ts +24 -7
- package/dist/components/ConfigModal.svelte +16 -3
- package/dist/components/ConfigPanel.svelte +234 -15
- package/dist/components/ConfigPanel.svelte.d.ts +6 -0
- package/dist/components/ConnectionLine.svelte +4 -2
- package/dist/components/EditorStatusBar.stories.svelte +44 -0
- package/dist/components/EditorStatusBar.stories.svelte.d.ts +27 -0
- package/dist/components/EditorStatusBar.svelte +99 -0
- package/dist/components/EditorStatusBar.svelte.d.ts +15 -0
- package/dist/components/IconButton.svelte +80 -0
- package/dist/components/IconButton.svelte.d.ts +30 -0
- package/dist/components/Input.svelte +74 -0
- package/dist/components/Input.svelte.d.ts +17 -0
- package/dist/components/LogoWordmark.svelte +113 -0
- package/dist/components/LogoWordmark.svelte.d.ts +26 -0
- package/dist/components/Navbar.svelte +78 -64
- package/dist/components/Navbar.svelte.d.ts +3 -0
- package/dist/components/NodeSidebar.svelte +48 -171
- package/dist/components/NodeStatusOverlay.svelte +94 -6
- package/dist/components/NodeSwapPicker.svelte +22 -38
- package/dist/components/PipelineStatus.svelte +22 -68
- package/dist/components/PipelineStatus.svelte.d.ts +3 -0
- package/dist/components/PortCoordinateTracker.svelte +5 -6
- package/dist/components/PortMappingRow.svelte +0 -2
- package/dist/components/SchemaForm.stories.svelte +1 -3
- package/dist/components/SchemaForm.svelte +22 -39
- package/dist/components/SchemaForm.svelte.d.ts +0 -8
- package/dist/components/Select.svelte +53 -0
- package/dist/components/Select.svelte.d.ts +15 -0
- package/dist/components/SettingsModal.svelte +8 -8
- package/dist/components/SettingsPanel.svelte +44 -10
- package/dist/components/SwapMappingEditor.svelte +67 -49
- package/dist/components/SwapMappingEditor.svelte.d.ts +0 -2
- package/dist/components/Textarea.svelte +39 -0
- package/dist/components/Textarea.svelte.d.ts +12 -0
- package/dist/components/ThemeToggle.svelte +15 -94
- package/dist/components/UniversalNode.svelte +45 -11
- package/dist/components/UniversalNode.svelte.d.ts +1 -1
- package/dist/components/WorkflowEditor.svelte +183 -162
- package/dist/components/WorkflowEditor.svelte.d.ts +39 -10
- package/dist/components/chat/AIChatPanel.svelte +99 -90
- package/dist/components/chat/AIChatPanel.svelte.d.ts +0 -4
- package/dist/components/chat/CommandPreview.svelte +2 -1
- package/dist/components/console/CommandConsole.svelte +7 -5
- package/dist/components/console/ConsoleAutocomplete.svelte +11 -12
- package/dist/components/console/ConsoleAutocomplete.svelte.d.ts +6 -0
- package/dist/components/console/ConsoleInput.svelte +18 -9
- package/dist/components/console/ConsoleOutput.svelte +4 -3
- package/dist/components/form/FormArray.svelte +42 -182
- package/dist/components/form/FormArray.svelte.d.ts +2 -1
- package/dist/components/form/FormAutocomplete.svelte +26 -21
- package/dist/components/form/FormCheckboxGroup.svelte +1 -5
- package/dist/components/form/FormCodeEditor.svelte +9 -7
- package/dist/components/form/FormField.svelte +22 -44
- package/dist/components/form/FormFieldLight.svelte +56 -50
- package/dist/components/form/FormFieldLight.svelte.d.ts +12 -0
- package/dist/components/form/FormFieldset.svelte +45 -11
- package/dist/components/form/FormMarkdownEditor.svelte +17 -9
- package/dist/components/form/FormNumberField.svelte +4 -36
- package/dist/components/form/FormPorts.svelte +262 -0
- package/dist/components/form/FormPorts.svelte.d.ts +13 -0
- package/dist/components/form/FormRangeField.svelte +62 -30
- package/dist/components/form/FormSelect.svelte +13 -75
- package/dist/components/form/FormTemplateEditor.svelte +17 -7
- package/dist/components/form/FormTextField.svelte +3 -35
- package/dist/components/form/FormTextarea.svelte +4 -39
- package/dist/components/form/FormToggle.svelte +5 -16
- package/dist/components/form/FormToggle.svelte.d.ts +4 -2
- package/dist/components/form/FormUISchemaRenderer.svelte +3 -1
- package/dist/components/form/resolveFieldType.d.ts +24 -0
- package/dist/components/form/resolveFieldType.js +55 -0
- package/dist/components/form/templateAutocomplete.js +1 -5
- package/dist/components/form/types.d.ts +1 -14
- package/dist/components/icons/CloseIcon.svelte +6 -0
- package/dist/components/icons/CloseIcon.svelte.d.ts +26 -0
- package/dist/components/icons/CommandLineIcon.svelte +15 -0
- package/dist/components/icons/CommandLineIcon.svelte.d.ts +26 -0
- package/dist/components/icons/MenuIcon.svelte +4 -0
- package/dist/components/icons/MenuIcon.svelte.d.ts +26 -0
- package/dist/components/icons/MenuOpenIcon.svelte +6 -0
- package/dist/components/icons/MenuOpenIcon.svelte.d.ts +26 -0
- package/dist/components/interrupt/ChoicePrompt.svelte +0 -10
- package/dist/components/interrupt/ConfirmationPrompt.svelte +0 -5
- package/dist/components/interrupt/FormPrompt.svelte +3 -2
- package/dist/components/interrupt/InterruptBubble.svelte +25 -27
- package/dist/components/interrupt/ReviewPrompt.svelte +10 -23
- package/dist/components/interrupt/TextInputPrompt.svelte +2 -7
- package/dist/components/layouts/MainLayout.svelte +24 -18
- package/dist/components/layouts/MainLayout.svelte.d.ts +4 -0
- package/dist/components/nodes/AtomNode.svelte +70 -72
- package/dist/components/nodes/AtomNode.svelte.d.ts +1 -1
- package/dist/components/nodes/GatewayNode.svelte +134 -172
- package/dist/components/nodes/GatewayNode.svelte.d.ts +1 -1
- package/dist/components/nodes/IdeaNode.svelte +79 -98
- package/dist/components/nodes/IdeaNode.svelte.d.ts +8 -4
- package/dist/components/nodes/NodeConfigButton.svelte +86 -0
- package/dist/components/nodes/NodeConfigButton.svelte.d.ts +15 -0
- package/dist/components/nodes/NotesNode.svelte +76 -85
- package/dist/components/nodes/NotesNode.svelte.d.ts +8 -4
- package/dist/components/nodes/SimpleNode.svelte +68 -137
- package/dist/components/nodes/SimpleNode.svelte.d.ts +4 -4
- package/dist/components/nodes/SquareNode.svelte +122 -169
- package/dist/components/nodes/SquareNode.svelte.d.ts +4 -4
- package/dist/components/nodes/TerminalNode.svelte +70 -127
- package/dist/components/nodes/TerminalNode.svelte.d.ts +4 -4
- package/dist/components/nodes/ToolNode.svelte +99 -104
- package/dist/components/nodes/ToolNode.svelte.d.ts +6 -6
- package/dist/components/nodes/WorkflowNode.svelte +145 -195
- package/dist/components/nodes/WorkflowNode.svelte.d.ts +1 -1
- package/dist/components/playground/ChatInput.svelte +11 -15
- package/dist/components/playground/ChatPanel.svelte +6 -49
- package/dist/components/playground/ChatPanel.svelte.d.ts +0 -14
- package/dist/components/playground/ControlPanel.svelte +134 -123
- package/dist/components/playground/ControlPanel.svelte.d.ts +3 -0
- package/dist/components/playground/ExecutionLogs.svelte +11 -9
- package/dist/components/playground/InputCollector.svelte +22 -57
- package/dist/components/playground/MessageStream.svelte +17 -23
- package/dist/components/playground/PipelineKanbanView.svelte +69 -8
- package/dist/components/playground/PipelineKanbanView.svelte.d.ts +2 -0
- package/dist/components/playground/PipelinePanel.svelte +31 -8
- package/dist/components/playground/PipelinePanel.svelte.d.ts +2 -0
- package/dist/components/playground/PipelineTableView.svelte +188 -44
- package/dist/components/playground/PipelineTableView.svelte.d.ts +2 -0
- package/dist/components/playground/Playground.svelte +154 -105
- package/dist/components/playground/Playground.svelte.d.ts +5 -0
- package/dist/components/playground/PlaygroundApp.svelte +12 -2
- package/dist/components/playground/PlaygroundApp.svelte.d.ts +6 -0
- package/dist/components/playground/PlaygroundModal.svelte +18 -3
- package/dist/components/playground/PlaygroundModal.svelte.d.ts +6 -0
- package/dist/components/playground/PlaygroundStudio.svelte +40 -37
- package/dist/components/playground/PlaygroundStudio.svelte.d.ts +6 -0
- package/dist/components/playground/SessionManager.svelte +9 -12
- package/dist/components/playground/pipelineViewUtils.svelte.d.ts +30 -1
- package/dist/components/playground/pipelineViewUtils.svelte.js +40 -3
- package/dist/components/surfaces/SurfaceOverlay.svelte +153 -0
- package/dist/components/surfaces/SurfaceOverlay.svelte.d.ts +14 -0
- package/dist/components/surfaces/TabbedSurface.svelte +133 -0
- package/dist/components/surfaces/TabbedSurface.svelte.d.ts +27 -0
- package/dist/config/endpoints.d.ts +23 -7
- package/dist/config/endpoints.js +30 -10
- package/dist/core/index.d.ts +6 -7
- package/dist/core/index.js +8 -12
- package/dist/display/index.d.ts +6 -3
- package/dist/display/index.js +7 -5
- package/dist/editor/index.d.ts +20 -21
- package/dist/editor/index.js +26 -36
- package/dist/form/code.d.ts +25 -15
- package/dist/form/code.js +44 -41
- package/dist/form/fieldRegistry.d.ts +17 -13
- package/dist/form/fieldRegistry.js +32 -12
- package/dist/form/full.d.ts +19 -14
- package/dist/form/full.js +26 -28
- package/dist/form/index.d.ts +3 -4
- package/dist/form/index.js +6 -5
- package/dist/form/markdown.d.ts +13 -8
- package/dist/form/markdown.js +22 -23
- package/dist/helpers/proximityConnect.d.ts +3 -2
- package/dist/helpers/proximityConnect.js +2 -5
- package/dist/helpers/workflowEditorHelper.d.ts +14 -5
- package/dist/helpers/workflowEditorHelper.js +32 -30
- package/dist/index.d.ts +28 -24
- package/dist/index.js +27 -50
- package/dist/messages/defaults.d.ts +2 -5
- package/dist/messages/defaults.js +3 -6
- package/dist/messages/index.d.ts +1 -2
- package/dist/messages/index.js +1 -2
- package/dist/mocks/app-forms.d.ts +6 -2
- package/dist/mocks/app-forms.js +11 -4
- package/dist/openapi/v1/openapi.yaml +38 -26
- package/dist/playground/index.d.ts +4 -5
- package/dist/playground/index.js +4 -32
- package/dist/playground/mount.d.ts +34 -5
- package/dist/playground/mount.js +58 -24
- package/dist/registry/{BaseRegistry.d.ts → BaseRegistry.svelte.d.ts} +22 -1
- package/dist/registry/{BaseRegistry.js → BaseRegistry.svelte.js} +37 -1
- package/dist/registry/builtinFormats.d.ts +9 -18
- package/dist/registry/builtinFormats.js +9 -39
- package/dist/registry/builtinNodeTypes.d.ts +53 -0
- package/dist/registry/builtinNodeTypes.js +67 -0
- package/dist/registry/builtinNodes.d.ts +2 -64
- package/dist/registry/builtinNodes.js +7 -103
- package/dist/registry/index.d.ts +3 -4
- package/dist/registry/index.js +4 -6
- package/dist/registry/nodeComponentRegistry.d.ts +184 -16
- package/dist/registry/nodeComponentRegistry.js +235 -17
- package/dist/registry/workflowFormatRegistry.d.ts +14 -9
- package/dist/registry/workflowFormatRegistry.js +24 -8
- package/dist/{schema → schemas}/index.d.ts +2 -2
- package/dist/{schema → schemas}/index.js +2 -2
- package/dist/schemas/v1/workflow.schema.json +19 -17
- package/dist/services/agentSpecExecutionService.d.ts +0 -2
- package/dist/services/agentSpecExecutionService.js +0 -3
- package/dist/services/apiVariableService.d.ts +2 -1
- package/dist/services/apiVariableService.js +16 -47
- package/dist/services/autoSaveService.d.ts +7 -0
- package/dist/services/autoSaveService.js +6 -4
- package/dist/services/categoriesApi.js +3 -6
- package/dist/services/chatService.d.ts +9 -4
- package/dist/services/chatService.js +23 -28
- package/dist/services/draftStorage.d.ts +129 -13
- package/dist/services/draftStorage.js +185 -37
- package/dist/services/dynamicSchemaService.d.ts +33 -5
- package/dist/services/dynamicSchemaService.js +67 -55
- package/dist/services/globalSave.d.ts +13 -12
- package/dist/services/globalSave.js +29 -51
- package/dist/services/historyService.d.ts +39 -11
- package/dist/services/historyService.js +60 -18
- package/dist/services/interruptService.d.ts +15 -9
- package/dist/services/interruptService.js +35 -37
- package/dist/services/nodeExecutionService.d.ts +18 -3
- package/dist/services/nodeExecutionService.js +71 -45
- package/dist/services/playgroundService.d.ts +16 -10
- package/dist/services/playgroundService.js +42 -43
- package/dist/services/portConfigApi.js +3 -6
- package/dist/services/settingsService.d.ts +9 -4
- package/dist/services/settingsService.js +23 -12
- package/dist/services/variableService.d.ts +2 -1
- package/dist/services/variableService.js +2 -2
- package/dist/services/workflowStorage.js +6 -6
- package/dist/skins/drafter.d.ts +30 -0
- package/dist/skins/drafter.js +198 -0
- package/dist/skins/index.d.ts +2 -1
- package/dist/skins/index.js +4 -2
- package/dist/stores/apiContext.d.ts +56 -0
- package/dist/stores/apiContext.js +80 -0
- package/dist/stores/categoriesStore.svelte.d.ts +28 -23
- package/dist/stores/categoriesStore.svelte.js +69 -64
- package/dist/stores/getInstance.svelte.d.ts +39 -0
- package/dist/stores/getInstance.svelte.js +65 -0
- package/dist/stores/historyStore.svelte.d.ts +89 -91
- package/dist/stores/historyStore.svelte.js +159 -158
- package/dist/stores/instanceContainer.svelte.d.ts +111 -0
- package/dist/stores/instanceContainer.svelte.js +119 -0
- package/dist/stores/interruptStore.svelte.d.ts +112 -82
- package/dist/stores/interruptStore.svelte.js +253 -226
- package/dist/stores/pipelinePanelStore.svelte.d.ts +27 -3
- package/dist/stores/pipelinePanelStore.svelte.js +61 -14
- package/dist/stores/playgroundStore.svelte.d.ts +169 -222
- package/dist/stores/playgroundStore.svelte.js +513 -580
- package/dist/stores/portCoordinateStore.svelte.d.ts +57 -51
- package/dist/stores/portCoordinateStore.svelte.js +109 -98
- package/dist/stores/settingsStore.svelte.d.ts +17 -1
- package/dist/stores/settingsStore.svelte.js +79 -12
- package/dist/stores/workflowStore.svelte.d.ts +212 -210
- package/dist/stores/workflowStore.svelte.js +527 -502
- package/dist/stories/EdgeDecorator.svelte +5 -2
- package/dist/stories/NodeDecorator.svelte +5 -3
- package/dist/styles/base.css +285 -14
- package/dist/styles/tokens.css +60 -2
- package/dist/svelte-app.d.ts +78 -11
- package/dist/svelte-app.js +210 -141
- package/dist/themes/drafter.d.ts +2 -0
- package/dist/themes/drafter.js +15 -0
- package/dist/themes/index.d.ts +2 -1
- package/dist/themes/index.js +8 -2
- package/dist/types/auth.d.ts +9 -51
- package/dist/types/auth.js +4 -54
- package/dist/types/events.d.ts +24 -3
- package/dist/types/events.js +2 -1
- package/dist/types/index.d.ts +117 -32
- package/dist/types/index.js +0 -1
- package/dist/types/navbar.d.ts +7 -0
- package/dist/types/playground.d.ts +18 -3
- package/dist/types/settings.d.ts +30 -1
- package/dist/types/settings.js +5 -2
- package/dist/types/skin.d.ts +1 -1
- package/dist/types/theme.d.ts +16 -2
- package/dist/types/uischema.d.ts +5 -0
- package/dist/utils/colors.d.ts +74 -21
- package/dist/utils/colors.js +92 -68
- package/dist/utils/connections.d.ts +9 -15
- package/dist/utils/connections.js +33 -88
- package/dist/utils/duration.d.ts +13 -0
- package/dist/utils/duration.js +45 -0
- package/dist/utils/edgeStyling.js +9 -5
- package/dist/utils/fetchWithAuth.d.ts +36 -15
- package/dist/utils/fetchWithAuth.js +53 -23
- package/dist/utils/icons.d.ts +5 -2
- package/dist/utils/icons.js +6 -5
- package/dist/utils/nodeIds.d.ts +1 -1
- package/dist/utils/nodeIds.js +1 -1
- package/dist/utils/nodeSwap.d.ts +6 -2
- package/dist/utils/nodeSwap.js +62 -129
- package/dist/utils/nodeTypes.d.ts +17 -8
- package/dist/utils/nodeTypes.js +27 -20
- package/dist/utils/performanceUtils.js +7 -0
- package/dist/utils/portUtils.d.ts +47 -11
- package/dist/utils/portUtils.js +67 -14
- package/dist/utils/portal.d.ts +18 -0
- package/dist/utils/portal.js +34 -0
- package/dist/utils/schemaMerge.d.ts +25 -0
- package/dist/utils/schemaMerge.js +61 -0
- package/package.json +7 -5
- package/dist/messages/deprecation.d.ts +0 -20
- package/dist/messages/deprecation.js +0 -33
- package/dist/registry/plugin.d.ts +0 -215
- package/dist/registry/plugin.js +0 -249
- package/dist/services/api.d.ts +0 -129
- package/dist/services/api.js +0 -217
|
@@ -7,10 +7,11 @@
|
|
|
7
7
|
<script lang="ts">
|
|
8
8
|
import type { NodeMetadata, NodeCategory, WorkflowFormat } from '../types/index.js';
|
|
9
9
|
import LoadingSpinner from './LoadingSpinner.svelte';
|
|
10
|
+
import Input from './Input.svelte';
|
|
10
11
|
import Icon from '@iconify/svelte';
|
|
11
12
|
import { getNodeIcon, getCategoryIcon } from '../utils/icons.js';
|
|
12
13
|
import { getCategoryColorToken } from '../utils/colors.js';
|
|
13
|
-
import {
|
|
14
|
+
import { getInstance } from '../stores/getInstance.svelte.js';
|
|
14
15
|
import { getUiSettings } from '../stores/settingsStore.svelte.js';
|
|
15
16
|
import { extractConfigDefaults } from '../utils/nodeIds.js';
|
|
16
17
|
import { m } from '../messages/index.js';
|
|
@@ -26,8 +27,10 @@
|
|
|
26
27
|
}
|
|
27
28
|
|
|
28
29
|
let props: Props = $props();
|
|
30
|
+
const fd = getInstance();
|
|
29
31
|
let searchInput = $state('');
|
|
30
|
-
//
|
|
32
|
+
// initial default, user selects interactively
|
|
33
|
+
// svelte-ignore state_referenced_locally
|
|
31
34
|
let selectedCategory = $state(props.selectedCategory || 'all');
|
|
32
35
|
|
|
33
36
|
/**
|
|
@@ -118,7 +121,7 @@
|
|
|
118
121
|
// Create a new node instance from the node type
|
|
119
122
|
const newNodeData = {
|
|
120
123
|
type: 'node',
|
|
121
|
-
nodeType: nodeType.
|
|
124
|
+
nodeType: nodeType.node_type_id,
|
|
122
125
|
nodeData: {
|
|
123
126
|
label: nodeType.name,
|
|
124
127
|
config: extractConfigDefaults(nodeType.configSchema),
|
|
@@ -140,26 +143,12 @@
|
|
|
140
143
|
}
|
|
141
144
|
}
|
|
142
145
|
|
|
143
|
-
/**
|
|
144
|
-
* Handle search input change
|
|
145
|
-
*/
|
|
146
|
-
function handleSearchChange(): void {
|
|
147
|
-
// Search is handled reactively through the derived filteredNodes
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
/**
|
|
151
|
-
* Handle node click
|
|
152
|
-
*/
|
|
153
|
-
function handleNodeClick(nodeType: NodeMetadata): void {
|
|
154
|
-
// Handle node click - could be used for preview or configuration
|
|
155
|
-
}
|
|
156
|
-
|
|
157
146
|
/**
|
|
158
147
|
* Get category display name from the categories store.
|
|
159
148
|
* Falls back to auto-capitalizing the category machine name.
|
|
160
149
|
*/
|
|
161
150
|
function getCategoryDisplayName(category: NodeCategory): string {
|
|
162
|
-
return
|
|
151
|
+
return fd.categories.getLabel(category);
|
|
163
152
|
}
|
|
164
153
|
</script>
|
|
165
154
|
|
|
@@ -173,20 +162,17 @@
|
|
|
173
162
|
>
|
|
174
163
|
<!-- Search Section — visibility controlled by --fd-sidebar-search-display -->
|
|
175
164
|
<div class="flowdrop-sidebar__search">
|
|
176
|
-
<
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
/>
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
<Icon icon="mdi:magnify" class="flowdrop-icon" />
|
|
188
|
-
</button>
|
|
189
|
-
</div>
|
|
165
|
+
<Input
|
|
166
|
+
type="text"
|
|
167
|
+
placeholder={m().layout.searchComponents}
|
|
168
|
+
aria-label={m().layout.searchComponents}
|
|
169
|
+
value={searchInput}
|
|
170
|
+
oninput={(e) => (searchInput = e.currentTarget.value)}
|
|
171
|
+
>
|
|
172
|
+
{#snippet leading()}
|
|
173
|
+
<Icon icon="mdi:magnify" />
|
|
174
|
+
{/snippet}
|
|
175
|
+
</Input>
|
|
190
176
|
</div>
|
|
191
177
|
|
|
192
178
|
<!-- Node Types List -->
|
|
@@ -260,7 +246,7 @@
|
|
|
260
246
|
</div>
|
|
261
247
|
{:else}
|
|
262
248
|
<div class="flowdrop-node-list">
|
|
263
|
-
{#each filteredNodes as nodeType (nodeType.
|
|
249
|
+
{#each filteredNodes as nodeType (nodeType.node_type_id)}
|
|
264
250
|
<div
|
|
265
251
|
class="flowdrop-card flowdrop-card--compact flowdrop-node-item"
|
|
266
252
|
draggable="true"
|
|
@@ -273,9 +259,12 @@
|
|
|
273
259
|
<!-- Node Type Icon with Squircle Background -->
|
|
274
260
|
<span
|
|
275
261
|
class="flowdrop-node-icon"
|
|
276
|
-
style="--_icon-color: {getCategoryColorToken(
|
|
262
|
+
style="--_icon-color: {getCategoryColorToken(
|
|
263
|
+
fd.categories,
|
|
264
|
+
nodeType.category
|
|
265
|
+
)}"
|
|
277
266
|
>
|
|
278
|
-
<Icon icon={getNodeIcon(nodeType.icon, nodeType.category)} />
|
|
267
|
+
<Icon icon={getNodeIcon(fd.categories, nodeType.icon, nodeType.category)} />
|
|
279
268
|
</span>
|
|
280
269
|
|
|
281
270
|
<!-- Node Type Info - Icon and Title only -->
|
|
@@ -309,25 +298,20 @@
|
|
|
309
298
|
<div class="fd-sidebar-flat-category">
|
|
310
299
|
{getCategoryDisplayName(category).toUpperCase()}
|
|
311
300
|
</div>
|
|
312
|
-
<div class="fd-sidebar-flat-list">
|
|
313
|
-
{#each categoryNodes as nodeType (nodeType.
|
|
301
|
+
<div class="fd-sidebar-flat-list" role="list">
|
|
302
|
+
{#each categoryNodes as nodeType (nodeType.node_type_id)}
|
|
314
303
|
<div
|
|
315
304
|
class="fd-sidebar-flat-item"
|
|
305
|
+
role="listitem"
|
|
316
306
|
draggable="true"
|
|
317
307
|
ondragstart={(e) => handleNodeDragStart(e, nodeType)}
|
|
318
|
-
onclick={() => handleNodeClick(nodeType)}
|
|
319
|
-
role="button"
|
|
320
|
-
tabindex="0"
|
|
321
|
-
onkeydown={(e) => {
|
|
322
|
-
if (e.key === 'Enter' || e.key === ' ') {
|
|
323
|
-
e.preventDefault();
|
|
324
|
-
handleNodeClick(nodeType);
|
|
325
|
-
}
|
|
326
|
-
}}
|
|
327
308
|
>
|
|
328
309
|
<span
|
|
329
310
|
class="fd-sidebar-flat-dot"
|
|
330
|
-
style="background: {getCategoryColorToken(
|
|
311
|
+
style="background: {getCategoryColorToken(
|
|
312
|
+
fd.categories,
|
|
313
|
+
nodeType.category
|
|
314
|
+
)}"
|
|
331
315
|
></span>
|
|
332
316
|
<span class="fd-sidebar-flat-name">{nodeType.name}</span>
|
|
333
317
|
</div>
|
|
@@ -343,9 +327,9 @@
|
|
|
343
327
|
<div class="flowdrop-flex flowdrop-gap--2 flowdrop-items--center">
|
|
344
328
|
<span
|
|
345
329
|
class="flowdrop-node-icon"
|
|
346
|
-
style="--_icon-color: {getCategoryColorToken(category)}"
|
|
330
|
+
style="--_icon-color: {getCategoryColorToken(fd.categories, category)}"
|
|
347
331
|
>
|
|
348
|
-
<Icon icon={getCategoryIcon(category)} />
|
|
332
|
+
<Icon icon={getCategoryIcon(fd.categories, category)} />
|
|
349
333
|
</span>
|
|
350
334
|
<span>{getCategoryDisplayName(category)}</span>
|
|
351
335
|
</div>
|
|
@@ -354,30 +338,27 @@
|
|
|
354
338
|
</div>
|
|
355
339
|
</summary>
|
|
356
340
|
<div class="flowdrop-details__content">
|
|
357
|
-
<div class="flowdrop-node-list">
|
|
358
|
-
{#each categoryNodes as nodeType (nodeType.
|
|
341
|
+
<div class="flowdrop-node-list" role="list">
|
|
342
|
+
{#each categoryNodes as nodeType (nodeType.node_type_id)}
|
|
359
343
|
<div
|
|
360
344
|
class="flowdrop-card flowdrop-card--compact flowdrop-node-item"
|
|
345
|
+
role="listitem"
|
|
361
346
|
draggable="true"
|
|
362
347
|
ondragstart={(e) => handleNodeDragStart(e, nodeType)}
|
|
363
|
-
onclick={() => handleNodeClick(nodeType)}
|
|
364
|
-
role="button"
|
|
365
|
-
tabindex="0"
|
|
366
|
-
onkeydown={(e) => {
|
|
367
|
-
if (e.key === 'Enter' || e.key === ' ') {
|
|
368
|
-
e.preventDefault();
|
|
369
|
-
handleNodeClick(nodeType);
|
|
370
|
-
}
|
|
371
|
-
}}
|
|
372
348
|
>
|
|
373
349
|
<div class="flowdrop-card__body flowdrop-p--1 flowdrop-py--1">
|
|
374
350
|
<div class="flowdrop-flex flowdrop-gap--2 flowdrop-items--center">
|
|
375
351
|
<!-- Node Type Icon with Squircle Background -->
|
|
376
352
|
<span
|
|
377
353
|
class="flowdrop-node-icon"
|
|
378
|
-
style="--_icon-color: {getCategoryColorToken(
|
|
354
|
+
style="--_icon-color: {getCategoryColorToken(
|
|
355
|
+
fd.categories,
|
|
356
|
+
nodeType.category
|
|
357
|
+
)}"
|
|
379
358
|
>
|
|
380
|
-
<Icon
|
|
359
|
+
<Icon
|
|
360
|
+
icon={getNodeIcon(fd.categories, nodeType.icon, nodeType.category)}
|
|
361
|
+
/>
|
|
381
362
|
</span>
|
|
382
363
|
|
|
383
364
|
<!-- Node Type Info - Icon and Title only -->
|
|
@@ -426,7 +407,8 @@
|
|
|
426
407
|
/* Components Sidebar - Always Visible */
|
|
427
408
|
.flowdrop-sidebar {
|
|
428
409
|
height: calc(100vh - var(--fd-navbar-height)); /* Account for navbar height */
|
|
429
|
-
background-color: var(--fd-
|
|
410
|
+
background-color: var(--fd-panel-bg);
|
|
411
|
+
backdrop-filter: var(--fd-panel-backdrop-filter);
|
|
430
412
|
border-right: 1px solid var(--fd-border);
|
|
431
413
|
display: flex;
|
|
432
414
|
flex-direction: column;
|
|
@@ -478,7 +460,7 @@
|
|
|
478
460
|
|
|
479
461
|
.flowdrop-sidebar__search {
|
|
480
462
|
padding: 0.75rem 1rem;
|
|
481
|
-
background-color:
|
|
463
|
+
background-color: transparent;
|
|
482
464
|
border-bottom: 1px solid var(--fd-border);
|
|
483
465
|
display: var(--fd-sidebar-search-display, block);
|
|
484
466
|
}
|
|
@@ -503,7 +485,7 @@
|
|
|
503
485
|
|
|
504
486
|
.flowdrop-sidebar__content::-webkit-scrollbar-thumb {
|
|
505
487
|
background: var(--fd-scrollbar-thumb);
|
|
506
|
-
border-radius:
|
|
488
|
+
border-radius: var(--fd-scrollbar-radius);
|
|
507
489
|
min-height: 20px; /* Ensure thumb has minimum height for visibility */
|
|
508
490
|
}
|
|
509
491
|
|
|
@@ -611,114 +593,9 @@
|
|
|
611
593
|
margin-left: 0;
|
|
612
594
|
}
|
|
613
595
|
|
|
614
|
-
/*
|
|
615
|
-
.flowdrop-input {
|
|
616
|
-
padding: 0.625rem 0.75rem;
|
|
617
|
-
border: 1px solid var(--fd-border-strong);
|
|
618
|
-
border-radius: var(--fd-radius-md);
|
|
619
|
-
font-size: var(--fd-text-sm);
|
|
620
|
-
color: var(--fd-foreground);
|
|
621
|
-
background-color: var(--fd-background);
|
|
622
|
-
transition:
|
|
623
|
-
border-color var(--fd-transition-normal),
|
|
624
|
-
box-shadow var(--fd-transition-normal);
|
|
625
|
-
width: 100%;
|
|
626
|
-
height: 2.5rem;
|
|
627
|
-
box-sizing: border-box;
|
|
628
|
-
}
|
|
629
|
-
|
|
630
|
-
.flowdrop-input:focus {
|
|
631
|
-
outline: none;
|
|
632
|
-
border-color: var(--fd-ring);
|
|
633
|
-
box-shadow: 0 0 0 3px color-mix(in srgb, var(--fd-ring) 20%, transparent);
|
|
634
|
-
}
|
|
635
|
-
|
|
636
|
-
.flowdrop-input::placeholder {
|
|
637
|
-
color: var(--fd-muted-foreground);
|
|
638
|
-
}
|
|
639
|
-
|
|
640
|
-
.flowdrop-btn {
|
|
641
|
-
padding: 0.625rem 0.75rem;
|
|
642
|
-
border-radius: var(--fd-radius-md);
|
|
643
|
-
font-size: var(--fd-text-sm);
|
|
644
|
-
font-weight: 500;
|
|
645
|
-
cursor: pointer;
|
|
646
|
-
transition: all var(--fd-transition-normal);
|
|
647
|
-
border: 1px solid var(--fd-border-strong);
|
|
648
|
-
display: flex;
|
|
649
|
-
align-items: center;
|
|
650
|
-
justify-content: center;
|
|
651
|
-
gap: 0.5rem;
|
|
652
|
-
background-color: var(--fd-muted);
|
|
653
|
-
color: var(--fd-foreground);
|
|
654
|
-
height: 2.5rem;
|
|
655
|
-
min-width: 2.5rem;
|
|
656
|
-
box-sizing: border-box;
|
|
657
|
-
}
|
|
658
|
-
|
|
659
|
-
.flowdrop-btn:hover {
|
|
660
|
-
background-color: var(--fd-subtle);
|
|
661
|
-
border-color: var(--fd-border-strong);
|
|
662
|
-
}
|
|
663
|
-
|
|
664
|
-
.flowdrop-btn:active {
|
|
665
|
-
background-color: var(--fd-border);
|
|
666
|
-
border-color: var(--fd-muted-foreground);
|
|
667
|
-
}
|
|
668
|
-
|
|
669
|
-
.flowdrop-btn:focus {
|
|
670
|
-
outline: none;
|
|
671
|
-
box-shadow: 0 0 0 3px color-mix(in srgb, var(--fd-ring) 20%, transparent);
|
|
672
|
-
}
|
|
673
|
-
|
|
674
|
-
.flowdrop-btn:disabled {
|
|
675
|
-
background-color: var(--fd-muted-foreground);
|
|
676
|
-
border-color: var(--fd-muted-foreground);
|
|
677
|
-
cursor: not-allowed;
|
|
678
|
-
opacity: 0.6;
|
|
679
|
-
}
|
|
680
|
-
|
|
681
|
-
/* Join component styles - Seamless integration */
|
|
682
|
-
.flowdrop-join {
|
|
683
|
-
display: flex;
|
|
684
|
-
width: 100%;
|
|
685
|
-
border-radius: var(--fd-radius-md);
|
|
686
|
-
overflow: hidden;
|
|
687
|
-
border: 1px solid var(--fd-border-strong);
|
|
688
|
-
background-color: var(--fd-background);
|
|
689
|
-
}
|
|
690
|
-
|
|
691
|
-
.flowdrop-join__item {
|
|
692
|
-
border: none;
|
|
693
|
-
border-radius: 0;
|
|
694
|
-
background-color: transparent;
|
|
695
|
-
}
|
|
696
|
-
|
|
697
|
-
.flowdrop-join__item:first-child {
|
|
698
|
-
border-right: 1px solid var(--fd-border-strong);
|
|
699
|
-
flex: 1;
|
|
700
|
-
}
|
|
701
|
-
|
|
702
|
-
.flowdrop-join__item:last-child {
|
|
703
|
-
border-left: none;
|
|
704
|
-
background-color: var(--fd-muted);
|
|
705
|
-
color: var(--fd-foreground);
|
|
706
|
-
}
|
|
707
|
-
|
|
708
|
-
.flowdrop-join__item:last-child:hover {
|
|
709
|
-
background-color: var(--fd-subtle);
|
|
710
|
-
}
|
|
711
|
-
|
|
712
|
-
.flowdrop-join:focus-within {
|
|
713
|
-
border-color: var(--fd-ring);
|
|
714
|
-
box-shadow: 0 0 0 3px color-mix(in srgb, var(--fd-ring) 20%, transparent);
|
|
715
|
-
}
|
|
596
|
+
/* Search field renders through the shared Input primitive (base.css). */
|
|
716
597
|
|
|
717
598
|
/* Utility classes */
|
|
718
|
-
.flowdrop-w--full {
|
|
719
|
-
width: 100%;
|
|
720
|
-
}
|
|
721
|
-
|
|
722
599
|
.flowdrop-flex--1 {
|
|
723
600
|
flex: 1;
|
|
724
601
|
}
|
|
@@ -17,8 +17,14 @@
|
|
|
17
17
|
formatExecutionDuration,
|
|
18
18
|
formatLastExecuted
|
|
19
19
|
} from '../utils/nodeStatus.js';
|
|
20
|
+
import { formatMicroseconds } from '../utils/duration.js';
|
|
20
21
|
import { m } from '../messages/index.js';
|
|
21
22
|
|
|
23
|
+
/** Prefer the precise µs duration; fall back to the legacy ms value. */
|
|
24
|
+
function formatDuration(us: number | null | undefined, ms: number | null | undefined): string {
|
|
25
|
+
return formatMicroseconds(us) ?? formatExecutionDuration(ms ?? undefined);
|
|
26
|
+
}
|
|
27
|
+
|
|
22
28
|
interface Props {
|
|
23
29
|
nodeId?: string;
|
|
24
30
|
executionInfo?: NodeExecutionInfo;
|
|
@@ -81,6 +87,13 @@
|
|
|
81
87
|
executionInfo.status !== 'idle' || executionInfo.executionCount > 0 || executionInfo.isExecuting
|
|
82
88
|
);
|
|
83
89
|
|
|
90
|
+
// Number of jobs behind this node's status. Loop iterations create
|
|
91
|
+
// multiple jobs per node — including a never-started job swept to
|
|
92
|
+
// "skipped" when the loop exits — so the per-job history (when known)
|
|
93
|
+
// beats the started-runs count: a skipped node with an earlier completed
|
|
94
|
+
// run must still flag that there is more to inspect.
|
|
95
|
+
let runCount = $derived(executionInfo.jobs?.length ?? executionInfo.executionCount);
|
|
96
|
+
|
|
84
97
|
// Hoist the overlay branch — seven reads in the template.
|
|
85
98
|
const overlay = $derived(m().status.overlay);
|
|
86
99
|
</script>
|
|
@@ -88,6 +101,7 @@
|
|
|
88
101
|
{#if shouldShow}
|
|
89
102
|
<div
|
|
90
103
|
class="node-status-overlay"
|
|
104
|
+
data-node-id={props.nodeId}
|
|
91
105
|
class:node-status-overlay--hovered={isHovered}
|
|
92
106
|
class:node-status-overlay--top-left={true}
|
|
93
107
|
class:node-status-overlay--sm={size === 'sm'}
|
|
@@ -126,10 +140,11 @@
|
|
|
126
140
|
/>
|
|
127
141
|
</div>
|
|
128
142
|
|
|
129
|
-
<!--
|
|
130
|
-
|
|
143
|
+
<!-- Run Count Badge: only meaningful when the node has more than one
|
|
144
|
+
job (loop iterations) — a "1" on every executed node is noise -->
|
|
145
|
+
{#if runCount > 1}
|
|
131
146
|
<div class="node-status-overlay__count">
|
|
132
|
-
{
|
|
147
|
+
×{runCount}
|
|
133
148
|
</div>
|
|
134
149
|
{/if}
|
|
135
150
|
|
|
@@ -154,11 +169,14 @@
|
|
|
154
169
|
>
|
|
155
170
|
</div>
|
|
156
171
|
{/if}
|
|
157
|
-
{#if executionInfo.lastExecutionDuration}
|
|
172
|
+
{#if executionInfo.lastExecutionDurationUs || executionInfo.lastExecutionDuration}
|
|
158
173
|
<div class="node-status-overlay__detail-item">
|
|
159
174
|
<span class="node-status-overlay__detail-label">{overlay.durationLabel}</span>
|
|
160
175
|
<span class="node-status-overlay__detail-value"
|
|
161
|
-
>{
|
|
176
|
+
>{formatDuration(
|
|
177
|
+
executionInfo.lastExecutionDurationUs,
|
|
178
|
+
executionInfo.lastExecutionDuration
|
|
179
|
+
)}</span
|
|
162
180
|
>
|
|
163
181
|
</div>
|
|
164
182
|
{/if}
|
|
@@ -168,6 +186,33 @@
|
|
|
168
186
|
<span class="node-status-overlay__detail-value">{executionInfo.lastError}</span>
|
|
169
187
|
</div>
|
|
170
188
|
{/if}
|
|
189
|
+
<!-- Per-job history: loop iterations create multiple jobs for the
|
|
190
|
+
same node; list them so earlier runs stay inspectable -->
|
|
191
|
+
{#if executionInfo.jobs && executionInfo.jobs.length > 1}
|
|
192
|
+
<div class="node-status-overlay__history">
|
|
193
|
+
<span class="node-status-overlay__detail-label">{overlay.historyLabel}</span>
|
|
194
|
+
{#each executionInfo.jobs as job, i (job.id ?? i)}
|
|
195
|
+
<div class="node-status-overlay__history-item">
|
|
196
|
+
<span
|
|
197
|
+
class="node-status-overlay__history-dot"
|
|
198
|
+
style="background-color: {getStatusColor(job.status)}"
|
|
199
|
+
></span>
|
|
200
|
+
<span class="node-status-overlay__history-label" title={job.label}
|
|
201
|
+
>{job.label ?? `#${i + 1}`}</span
|
|
202
|
+
>
|
|
203
|
+
<span
|
|
204
|
+
class="node-status-overlay__history-status"
|
|
205
|
+
style="color: {getStatusColor(job.status)}">{getStatusLabel(job.status)}</span
|
|
206
|
+
>
|
|
207
|
+
{#if (job.executionTimeUs != null && job.executionTimeUs > 0) || (job.executionTime != null && job.executionTime > 0)}
|
|
208
|
+
<span class="node-status-overlay__history-duration"
|
|
209
|
+
>{formatDuration(job.executionTimeUs, job.executionTime)}</span
|
|
210
|
+
>
|
|
211
|
+
{/if}
|
|
212
|
+
</div>
|
|
213
|
+
{/each}
|
|
214
|
+
</div>
|
|
215
|
+
{/if}
|
|
171
216
|
</div>
|
|
172
217
|
{/if}
|
|
173
218
|
</div>
|
|
@@ -180,7 +225,9 @@
|
|
|
180
225
|
align-items: center;
|
|
181
226
|
gap: 0.75rem;
|
|
182
227
|
z-index: 1000;
|
|
183
|
-
pointer
|
|
228
|
+
/* Must receive pointer events at rest — the hover details panel (and
|
|
229
|
+
per-job history) is only reachable if mouseenter can fire here. */
|
|
230
|
+
pointer-events: auto;
|
|
184
231
|
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
|
185
232
|
height: 48px;
|
|
186
233
|
width: auto;
|
|
@@ -304,6 +351,47 @@
|
|
|
304
351
|
color: #ef4444;
|
|
305
352
|
}
|
|
306
353
|
|
|
354
|
+
.node-status-overlay__history {
|
|
355
|
+
margin-top: 0.5rem;
|
|
356
|
+
padding-top: 0.5rem;
|
|
357
|
+
border-top: 1px solid #e5e7eb;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
.node-status-overlay__history-item {
|
|
361
|
+
display: flex;
|
|
362
|
+
align-items: center;
|
|
363
|
+
gap: 0.375rem;
|
|
364
|
+
margin-top: 0.25rem;
|
|
365
|
+
font-size: 0.75rem;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
.node-status-overlay__history-dot {
|
|
369
|
+
width: 0.5rem;
|
|
370
|
+
height: 0.5rem;
|
|
371
|
+
border-radius: 50%;
|
|
372
|
+
flex-shrink: 0;
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
.node-status-overlay__history-label {
|
|
376
|
+
flex: 1;
|
|
377
|
+
min-width: 0;
|
|
378
|
+
font-weight: 500;
|
|
379
|
+
color: #374151;
|
|
380
|
+
overflow: hidden;
|
|
381
|
+
text-overflow: ellipsis;
|
|
382
|
+
white-space: nowrap;
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
.node-status-overlay__history-status {
|
|
386
|
+
font-weight: 600;
|
|
387
|
+
white-space: nowrap;
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
.node-status-overlay__history-duration {
|
|
391
|
+
color: #6b7280;
|
|
392
|
+
white-space: nowrap;
|
|
393
|
+
}
|
|
394
|
+
|
|
307
395
|
/* Size variants */
|
|
308
396
|
.node-status-overlay--sm {
|
|
309
397
|
gap: 0.125rem;
|
|
@@ -8,10 +8,11 @@
|
|
|
8
8
|
<script lang="ts">
|
|
9
9
|
import type { NodeMetadata, NodeCategory, WorkflowFormat, WorkflowNode } from '../types/index.js';
|
|
10
10
|
import Icon from '@iconify/svelte';
|
|
11
|
+
import Input from './Input.svelte';
|
|
11
12
|
import { getNodeIcon, getCategoryIcon } from '../utils/icons.js';
|
|
12
13
|
import { getCategoryColorToken } from '../utils/colors.js';
|
|
13
14
|
import { m } from '../messages/index.js';
|
|
14
|
-
import {
|
|
15
|
+
import { getInstance } from '../stores/getInstance.svelte.js';
|
|
15
16
|
import { getVersionUpgrade } from '../utils/nodeSwap.js';
|
|
16
17
|
|
|
17
18
|
interface Props {
|
|
@@ -29,6 +30,8 @@
|
|
|
29
30
|
|
|
30
31
|
const { currentNode, availableNodes, activeFormat, onSelect, onCancel }: Props = $props();
|
|
31
32
|
|
|
33
|
+
const fd = getInstance();
|
|
34
|
+
|
|
32
35
|
let searchInput = $state('');
|
|
33
36
|
|
|
34
37
|
/** Check version upgrade availability */
|
|
@@ -113,12 +116,17 @@
|
|
|
113
116
|
|
|
114
117
|
<!-- Search (hidden in minimal via --fd-sidebar-search-display) -->
|
|
115
118
|
<div class="swap-picker__search">
|
|
116
|
-
<
|
|
119
|
+
<Input
|
|
117
120
|
type="text"
|
|
118
121
|
placeholder="Search node types..."
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
+
aria-label="Search node types"
|
|
123
|
+
value={searchInput}
|
|
124
|
+
oninput={(e) => (searchInput = e.currentTarget.value)}
|
|
125
|
+
>
|
|
126
|
+
{#snippet leading()}
|
|
127
|
+
<Icon icon="mdi:magnify" />
|
|
128
|
+
{/snippet}
|
|
129
|
+
</Input>
|
|
122
130
|
</div>
|
|
123
131
|
|
|
124
132
|
<!-- Node list -->
|
|
@@ -134,14 +142,14 @@
|
|
|
134
142
|
<!-- Flat style: dot + name rows (shown in minimal skin) -->
|
|
135
143
|
<div class="swap-picker__flat-section">
|
|
136
144
|
<div class="swap-picker__flat-category">
|
|
137
|
-
{
|
|
145
|
+
{fd.categories.getLabel(category).toUpperCase()}
|
|
138
146
|
</div>
|
|
139
147
|
<div class="swap-picker__flat-list">
|
|
140
|
-
{#each categoryNodes as nodeType (nodeType.
|
|
148
|
+
{#each categoryNodes as nodeType (nodeType.node_type_id)}
|
|
141
149
|
<button class="swap-picker__flat-item" onclick={() => onSelect(nodeType)}>
|
|
142
150
|
<span
|
|
143
151
|
class="swap-picker__flat-dot"
|
|
144
|
-
style="background: {getCategoryColorToken(nodeType.category)}"
|
|
152
|
+
style="background: {getCategoryColorToken(fd.categories, nodeType.category)}"
|
|
145
153
|
></span>
|
|
146
154
|
<span class="swap-picker__flat-name">{nodeType.name}</span>
|
|
147
155
|
</button>
|
|
@@ -154,25 +162,25 @@
|
|
|
154
162
|
<div class="swap-picker__category-header">
|
|
155
163
|
<span
|
|
156
164
|
class="swap-picker__category-icon"
|
|
157
|
-
style="--_icon-color: {getCategoryColorToken(category)}"
|
|
165
|
+
style="--_icon-color: {getCategoryColorToken(fd.categories, category)}"
|
|
158
166
|
>
|
|
159
|
-
<Icon icon={getCategoryIcon(category)} />
|
|
167
|
+
<Icon icon={getCategoryIcon(fd.categories, category)} />
|
|
160
168
|
</span>
|
|
161
169
|
<span class="swap-picker__category-name">
|
|
162
|
-
{
|
|
170
|
+
{fd.categories.getLabel(category)}
|
|
163
171
|
</span>
|
|
164
172
|
<span class="swap-picker__category-count">
|
|
165
173
|
{categoryNodes.length}
|
|
166
174
|
</span>
|
|
167
175
|
</div>
|
|
168
176
|
<div class="swap-picker__category-items">
|
|
169
|
-
{#each categoryNodes as nodeType (nodeType.
|
|
177
|
+
{#each categoryNodes as nodeType (nodeType.node_type_id)}
|
|
170
178
|
<button class="swap-picker__item" onclick={() => onSelect(nodeType)}>
|
|
171
179
|
<span
|
|
172
180
|
class="swap-picker__item-icon"
|
|
173
|
-
style="--_icon-color: {getCategoryColorToken(nodeType.category)}"
|
|
181
|
+
style="--_icon-color: {getCategoryColorToken(fd.categories, nodeType.category)}"
|
|
174
182
|
>
|
|
175
|
-
<Icon icon={getNodeIcon(nodeType.icon, nodeType.category)} />
|
|
183
|
+
<Icon icon={getNodeIcon(fd.categories, nodeType.icon, nodeType.category)} />
|
|
176
184
|
</span>
|
|
177
185
|
<div class="swap-picker__item-info">
|
|
178
186
|
<span class="swap-picker__item-name">{nodeType.name}</span>
|
|
@@ -296,30 +304,6 @@
|
|
|
296
304
|
flex-shrink: 0;
|
|
297
305
|
}
|
|
298
306
|
|
|
299
|
-
.swap-picker__input {
|
|
300
|
-
width: 100%;
|
|
301
|
-
padding: 0.5rem 0.75rem;
|
|
302
|
-
border: 1px solid var(--fd-border-strong);
|
|
303
|
-
border-radius: var(--fd-radius-md);
|
|
304
|
-
font-size: var(--fd-text-sm);
|
|
305
|
-
color: var(--fd-foreground);
|
|
306
|
-
background-color: var(--fd-background);
|
|
307
|
-
box-sizing: border-box;
|
|
308
|
-
transition:
|
|
309
|
-
border-color var(--fd-transition-normal),
|
|
310
|
-
box-shadow var(--fd-transition-normal);
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
.swap-picker__input:focus {
|
|
314
|
-
outline: none;
|
|
315
|
-
border-color: var(--fd-ring);
|
|
316
|
-
box-shadow: 0 0 0 3px color-mix(in srgb, var(--fd-ring) 20%, transparent);
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
.swap-picker__input::placeholder {
|
|
320
|
-
color: var(--fd-muted-foreground);
|
|
321
|
-
}
|
|
322
|
-
|
|
323
307
|
.swap-picker__list {
|
|
324
308
|
flex: 1;
|
|
325
309
|
overflow-y: auto;
|