@kiberon-labs/behave-graph-flow 2.0.0 → 3.0.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/.storybook/manager.ts +6 -0
- package/.storybook/preview.ts +49 -1
- package/.storybook/styles.css +9 -3
- package/.turbo/turbo-build.log +1 -1
- package/CHANGELOG.md +368 -0
- package/dist/AnyControlImpl-Ds-CShIB.js +20 -0
- package/dist/AnyControlImpl-Ds-CShIB.js.map +1 -0
- package/dist/DocumentationBrowserPanelImpl-deZNzFX8.js +166 -0
- package/dist/DocumentationBrowserPanelImpl-deZNzFX8.js.map +1 -0
- package/dist/index.css +36 -33
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +1865 -550
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +14357 -11221
- package/dist/index.js.map +1 -1
- package/dist/noteImpl-KkrrWgJd.js +242 -0
- package/dist/noteImpl-KkrrWgJd.js.map +1 -0
- package/dist/styles.module-CvmpDkZj.css +3 -0
- package/dist/styles.module-CvmpDkZj.css.map +1 -0
- package/dist/styles.module-DZxg8aW9.js +271 -0
- package/dist/styles.module-DZxg8aW9.js.map +1 -0
- package/dist/useChangeNodeData-ChQGK7AI.js +23 -0
- package/dist/useChangeNodeData-ChQGK7AI.js.map +1 -0
- package/docs/protocol.md +43 -20
- package/package.json +5 -9
- package/src/components/FloatingToolbar/index.module.css +5 -13
- package/src/components/FloatingToolbar/index.tsx +9 -9
- package/src/components/Flow.tsx +34 -23
- package/src/components/contextMenus/DynamicContextMenu.tsx +85 -0
- package/src/components/contextMenus/NodePicker.module.css +13 -13
- package/src/components/contextMenus/edge.tsx +9 -95
- package/src/components/contextMenus/node.tsx +9 -149
- package/src/components/contextMenus/selection.tsx +5 -71
- package/src/components/controls/any/AnyControlImpl.tsx +14 -0
- package/src/components/controls/any/index.tsx +13 -2
- package/src/components/edges/index.tsx +75 -69
- package/src/components/layoutController/index.module.css +3 -0
- package/src/components/layoutController/index.tsx +24 -1
- package/src/components/layoutController/utils.ts +46 -3
- package/src/components/menubar/defaults.tsx +55 -19
- package/src/components/menubar/menuItem.module.css +18 -3
- package/src/components/menubar/menuItem.tsx +34 -1
- package/src/components/nodes/behave/NodeContainer.module.css +26 -25
- package/src/components/nodes/group/index.tsx +3 -3
- package/src/components/nodes/wrapper/styles.module.css +6 -32
- package/src/components/panels/alignment/index.module.css +0 -10
- package/src/components/panels/alignment/index.tsx +4 -4
- package/src/components/panels/base/styles.module.css +2 -2
- package/src/components/panels/common/PanelHeader.module.css +24 -0
- package/src/components/panels/common/PanelHeader.tsx +22 -0
- package/src/components/panels/common/SectionTitle.module.css +13 -0
- package/src/components/panels/common/SectionTitle.tsx +10 -0
- package/src/components/panels/events/EditEventPanel.tsx +14 -5
- package/src/components/panels/events/ManageEventsPanel.tsx +11 -8
- package/src/components/panels/events/styles.module.css +6 -64
- package/src/components/panels/graphProperties/index.tsx +125 -0
- package/src/components/panels/history/index.tsx +2 -2
- package/src/components/panels/history/styles.module.css +0 -9
- package/src/components/panels/keymaps/index.module.css +3 -13
- package/src/components/panels/keymaps/index.tsx +1 -2
- package/src/components/panels/layers/index.tsx +20 -15
- package/src/components/panels/layers/styles.module.css +9 -12
- package/src/components/panels/legend/index.tsx +1 -1
- package/src/components/panels/logs/index.module.css +25 -19
- package/src/components/panels/logs/index.tsx +7 -7
- package/src/components/panels/nodeInputs/InputsGroup.tsx +1 -0
- package/src/components/panels/nodeInputs/NodeSettings.tsx +2 -2
- package/src/components/panels/nodeInputs/NodeTitleEditor.tsx +1 -1
- package/src/components/panels/nodeInputs/OutputsGroup.tsx +2 -12
- package/src/components/panels/nodeInputs/index.module.css +99 -75
- package/src/components/panels/nodeInputs/index.tsx +21 -11
- package/src/components/panels/nodeInputs/useNodeHandlers.ts +2 -2
- package/src/components/panels/nodeInputs/useNodeInputsData.ts +23 -43
- package/src/components/panels/nodePicker/index.tsx +8 -8
- package/src/components/panels/panel/index.module.css +7 -7
- package/src/components/panels/search/index.module.css +0 -50
- package/src/components/panels/search/index.tsx +2 -2
- package/src/components/panels/systemSettings/ConversionsSettings.tsx +203 -0
- package/src/components/panels/systemSettings/index.tsx +221 -176
- package/src/components/panels/systemSettings/styles.module.css +135 -8
- package/src/components/panels/traces/GridLines.tsx +1 -1
- package/src/components/panels/traces/TimeGrid.tsx +3 -3
- package/src/components/panels/traces/TraceLane.tsx +1 -1
- package/src/components/panels/traces/index.module.css +1 -8
- package/src/components/panels/traces/index.tsx +8 -4
- package/src/components/panels/traces/useDerivedSpans.ts +241 -146
- package/src/components/panels/traces/utils.ts +8 -0
- package/src/components/panels/variables/CreateVariableScreen.tsx +3 -3
- package/src/components/panels/variables/ManageVariablesScreen.tsx +12 -9
- package/src/components/panels/variables/index.tsx +2 -2
- package/src/components/panels/variables/styles.module.css +4 -91
- package/src/components/primitives/icon.module.css +4 -4
- package/src/components/sockets/input/index.tsx +9 -2
- package/src/components/sockets/input/styles.module.css +2 -3
- package/src/components/sockets/output/index.tsx +10 -3
- package/src/components/sockets/output/styles.module.css +1 -6
- package/src/css/notes.css +135 -0
- package/src/css/prosemirror.css +3 -3
- package/src/css/rc-dock.css +143 -43
- package/src/css/rc-menu.css +56 -55
- package/src/css/themes/kiberon.css +127 -0
- package/src/css/vars.css +197 -13
- package/src/css/vscode-elements.css +124 -0
- package/src/generators/CallSubgraphGenerator.tsx +136 -0
- package/src/generators/CustomEventOnTriggeredGenerator.tsx +2 -2
- package/src/generators/GraphBoundaryGenerator.module.css +32 -0
- package/src/generators/GraphBoundaryGenerator.tsx +193 -0
- package/src/generators/SequenceGenerator.tsx +2 -2
- package/src/generators/SwitchOnIntegerGenerator.tsx +2 -2
- package/src/generators/SwitchOnStringGenerator.tsx +2 -2
- package/src/generators/callSubgraphSync.ts +126 -0
- package/src/generators/registerDefaultGenerators.ts +21 -0
- package/src/generators/registerDefaults.ts +26 -0
- package/src/hooks/useBehaveGraphFlow.ts +2 -2
- package/src/hooks/useFlowHandlers.ts +47 -9
- package/src/hooks/useWasdPan.ts +26 -4
- package/src/index.css +4 -16
- package/src/index.ts +17 -0
- package/src/manifest/contributionRegistry.ts +93 -0
- package/src/manifest/index.ts +4 -0
- package/src/manifest/loadManifest.ts +82 -0
- package/src/manifest/manifestPlugin.ts +29 -0
- package/src/manifest/passthroughValueType.ts +40 -0
- package/src/plugin/alignment/index.ts +22 -12
- package/src/plugin/autosave/controller.ts +366 -0
- package/src/plugin/autosave/index.tsx +114 -0
- package/src/plugin/autosave/panel/BackupPanel.tsx +141 -0
- package/src/plugin/autosave/panel/index.tsx +1 -0
- package/src/plugin/autosave/panel/styles.module.css +56 -0
- package/src/plugin/autosave/settings.ts +65 -0
- package/src/plugin/autosave/storage.ts +147 -0
- package/src/plugin/docs/index.tsx +2 -4
- package/src/plugin/docs/panel/DocumentationBrowserPanelImpl.tsx +200 -0
- package/src/plugin/docs/panel/index.tsx +15 -194
- package/src/plugin/docs/panel/styles.module.css +8 -8
- package/src/plugin/graphrunner/actions.ts +258 -185
- package/src/plugin/graphrunner/buttons.tsx +34 -26
- package/src/plugin/graphrunner/client.ts +4 -1
- package/src/plugin/graphrunner/index.tsx +29 -100
- package/src/plugin/graphrunner/panel.tsx +2 -2
- package/src/plugin/graphrunner/runController.ts +283 -0
- package/src/plugin/graphrunner/runner.ts +21 -192
- package/src/plugin/graphrunner/store.ts +14 -24
- package/src/plugin/graphrunner/styles.module.css +17 -57
- package/src/plugin/graphrunner/transport.ts +26 -0
- package/src/plugin/graphrunner/types.ts +21 -0
- package/src/plugin/graphrunner-local/execution-utils.ts +260 -80
- package/src/plugin/graphrunner-local/index.tsx +8 -2
- package/src/plugin/graphrunner-local/panel.tsx +131 -175
- package/src/plugin/graphrunner-local/styles.module.css +57 -76
- package/src/plugin/graphrunner-local/transport.ts +151 -184
- package/src/plugin/graphrunner-webworker/graph-executor.worker.ts +2 -0
- package/src/plugin/graphrunner-webworker/index.tsx +4 -10
- package/src/plugin/graphrunner-webworker/store.ts +9 -0
- package/src/plugin/kitchen-sink/index.ts +38 -0
- package/src/{layout/dagre.tsx → plugin/layout/dagre.ts} +17 -5
- package/src/{layout → plugin/layout}/elk.ts +22 -6
- package/src/plugin/layout/index.ts +80 -0
- package/src/plugin/notes/FormatToolbar.tsx +200 -0
- package/src/plugin/notes/index.tsx +191 -0
- package/src/plugin/notes/nodeActions.ts +100 -0
- package/src/plugin/notes/note.tsx +20 -0
- package/src/plugin/notes/noteImpl.tsx +89 -0
- package/src/plugin/realtime/realtimeRunner.ts +58 -4
- package/src/specifics/CustomEventOnTriggeredSpecific.tsx +2 -2
- package/src/specifics/CustomEventTriggerSpecific.tsx +2 -2
- package/src/specifics/VariableGetSpecific.tsx +2 -2
- package/src/specifics/VariableSetSpecific.tsx +2 -2
- package/src/store/actions.tsx +5 -5
- package/src/store/commands.ts +278 -0
- package/src/store/contextMenu.ts +192 -0
- package/src/store/conversions.ts +47 -0
- package/src/store/flow.tsx +23 -38
- package/src/store/graphMeta.ts +39 -0
- package/src/store/hotKeys.tsx +301 -260
- package/src/store/layers.ts +3 -3
- package/src/store/registry.ts +12 -4
- package/src/store/selection.ts +3 -3
- package/src/store/settings.ts +82 -82
- package/src/store/settingsSchema.ts +210 -0
- package/src/store/tabs.ts +5 -1
- package/src/store/traces.ts +3 -3
- package/src/system/graph.ts +11 -14
- package/src/system/graphSession.ts +172 -0
- package/src/system/index.ts +3 -0
- package/src/system/notifications.ts +13 -0
- package/src/system/persistence.ts +82 -0
- package/src/system/plugin.ts +28 -0
- package/src/system/provider.tsx +64 -0
- package/src/system/system.ts +518 -88
- package/src/system/tabLoader.tsx +70 -32
- package/src/system/undoRedo.ts +1 -1
- package/src/transformers/Uigraph.ts +5 -4
- package/src/transformers/contract.ts +87 -0
- package/src/transformers/flowToBehave.ts +13 -5
- package/src/types/nodes.ts +8 -3
- package/src/types.ts +2 -0
- package/src/util/autoConvert.ts +200 -0
- package/src/util/isValidConnection.ts +23 -2
- package/stories/defaults/defaultStoryProvider.tsx +17 -14
- package/stories/defaults/systemGenerator.ts +6 -1
- package/stories/{components/nodes/comment.stories.tsx → plugins/notes.stories.tsx} +24 -30
- package/tests/autoConvert.test.ts +329 -0
- package/tests/autosavePlugin.test.ts +204 -0
- package/tests/callSubgraphSync.test.ts +148 -0
- package/tests/commandRegistry.test.ts +137 -0
- package/tests/contract.test.ts +51 -0
- package/tests/contractSerialize.test.ts +62 -0
- package/tests/deriveSpans.test.ts +71 -0
- package/tests/flowToBehave.test.ts +2 -1
- package/tests/hotkeys.test.ts +79 -0
- package/tests/keepAliveLifecycle.test.ts +167 -0
- package/tests/loadManifest.test.ts +113 -0
- package/tests/noteMarkdown.test.ts +65 -0
- package/tests/notesPlugin.test.ts +162 -0
- package/tests/persistence.test.ts +51 -0
- package/tests/saveLoad.test.ts +7 -6
- package/tests/settings.test.ts +178 -0
- package/tests/traceStore.test.ts +46 -0
- package/tests/visual/README.md +2 -2
- package/tests/visual/__screenshots__/panels.visual.test.tsx/panel-conversation-chromium-win32.png +0 -0
- package/tests/visual/__screenshots__/panels.visual.test.tsx/panel-events-chromium-win32.png +0 -0
- package/tests/visual/__screenshots__/panels.visual.test.tsx/panel-history-chromium-win32.png +0 -0
- package/tests/visual/__screenshots__/panels.visual.test.tsx/panel-keymaps-chromium-win32.png +0 -0
- package/tests/visual/__screenshots__/panels.visual.test.tsx/panel-layers-chromium-win32.png +0 -0
- package/tests/visual/__screenshots__/panels.visual.test.tsx/panel-legend-chromium-win32.png +0 -0
- package/tests/visual/__screenshots__/panels.visual.test.tsx/panel-localGraphRunner-chromium-win32.png +0 -0
- package/tests/visual/__screenshots__/panels.visual.test.tsx/panel-logs-chromium-win32.png +0 -0
- package/tests/visual/__screenshots__/panels.visual.test.tsx/panel-nodeInputs-chromium-win32.png +0 -0
- package/tests/visual/__screenshots__/panels.visual.test.tsx/panel-nodePicker-chromium-win32.png +0 -0
- package/tests/visual/__screenshots__/panels.visual.test.tsx/panel-panel-chromium-win32.png +0 -0
- package/tests/visual/__screenshots__/panels.visual.test.tsx/panel-search-chromium-win32.png +0 -0
- package/tests/visual/__screenshots__/panels.visual.test.tsx/panel-systemSettings-chromium-win32.png +0 -0
- package/tests/visual/__screenshots__/panels.visual.test.tsx/panel-variables-chromium-win32.png +0 -0
- package/tests/visual/panels.visual.test.tsx +3 -3
- package/tests/wasdPan.test.ts +71 -0
- package/vitest.config.ts +1 -1
- package/vitest.visual.config.ts +7 -0
- package/.storybook/vscode.css +0 -814
- package/src/components/nodes/comment/FormatToolbar.tsx +0 -118
- package/src/components/nodes/comment/comment.tsx +0 -103
- package/src/components/nodes/comment/styles.module.css +0 -150
- package/src/components/panels/conversation/index.module.css +0 -151
- package/src/components/panels/conversation/index.tsx +0 -162
- package/src/components/panels/events/CustomEventsEditor.tsx +0 -384
- package/src/css/vscode.css +0 -13
- package/src/hooks/useDetachNodes.ts +0 -39
- package/src/plugin/graphrunner-webworker/types.ts +0 -17
- package/src/specifics/registerDefaultSpecifics.ts +0 -5
- package/src/store/chat.ts +0 -73
- package/src/store/graphRunnerClient.ts +0 -110
|
@@ -7,14 +7,6 @@
|
|
|
7
7
|
overflow: hidden;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
.header {
|
|
11
|
-
display: flex;
|
|
12
|
-
align-items: center;
|
|
13
|
-
justify-content: space-between;
|
|
14
|
-
padding: 12px 16px;
|
|
15
|
-
flex-shrink: 0;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
10
|
.content {
|
|
19
11
|
padding: 8px;
|
|
20
12
|
}
|
|
@@ -42,30 +34,6 @@
|
|
|
42
34
|
opacity: 0.7;
|
|
43
35
|
}
|
|
44
36
|
|
|
45
|
-
.eventList {
|
|
46
|
-
flex: 1;
|
|
47
|
-
overflow-y: auto;
|
|
48
|
-
padding: 8px;
|
|
49
|
-
min-height: 0;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.eventItem {
|
|
53
|
-
display: flex;
|
|
54
|
-
align-items: center;
|
|
55
|
-
gap: 12px;
|
|
56
|
-
padding: 12px 16px;
|
|
57
|
-
min-height: 52px;
|
|
58
|
-
width: 100%;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.eventInfo {
|
|
62
|
-
flex: 1;
|
|
63
|
-
min-width: 0;
|
|
64
|
-
display: flex;
|
|
65
|
-
flex-direction: column;
|
|
66
|
-
gap: 4px;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
37
|
.eventName {
|
|
70
38
|
font-size: 13px;
|
|
71
39
|
font-weight: 500;
|
|
@@ -78,12 +46,6 @@
|
|
|
78
46
|
line-height: 1.2;
|
|
79
47
|
}
|
|
80
48
|
|
|
81
|
-
.eventActions {
|
|
82
|
-
display: flex;
|
|
83
|
-
align-items: center;
|
|
84
|
-
flex-shrink: 0;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
49
|
/* Edit Panel Specific Styles */
|
|
88
50
|
|
|
89
51
|
.editRoot {
|
|
@@ -99,7 +61,7 @@
|
|
|
99
61
|
display: flex;
|
|
100
62
|
gap: 1em;
|
|
101
63
|
align-items: center;
|
|
102
|
-
border-bottom: 1px solid var(--
|
|
64
|
+
border-bottom: 1px solid var(--ds-panel-border, rgba(255, 255, 255, 0.08));
|
|
103
65
|
}
|
|
104
66
|
|
|
105
67
|
.editorFields {
|
|
@@ -128,28 +90,12 @@
|
|
|
128
90
|
margin-bottom: 4px;
|
|
129
91
|
}
|
|
130
92
|
|
|
131
|
-
.col4 {
|
|
132
|
-
grid-column: span 4;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
.col8 {
|
|
136
|
-
grid-column: span 8;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
.col3 {
|
|
140
|
-
grid-column: span 3;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
.col1 {
|
|
144
|
-
grid-column: span 1;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
93
|
.parametersSection {
|
|
148
94
|
display: flex;
|
|
149
95
|
flex-direction: column;
|
|
150
96
|
gap: 0;
|
|
151
|
-
border-top: 1px solid var(--
|
|
152
|
-
background: var(--
|
|
97
|
+
border-top: 1px solid var(--ds-panel-border, rgba(255, 255, 255, 0.1));
|
|
98
|
+
background: var(--ds-sidebar-bg, var(--colors-bgPanel));
|
|
153
99
|
flex: 1;
|
|
154
100
|
min-height: 0;
|
|
155
101
|
}
|
|
@@ -159,7 +105,7 @@
|
|
|
159
105
|
display: flex;
|
|
160
106
|
align-items: center;
|
|
161
107
|
justify-content: space-between;
|
|
162
|
-
border-bottom: 1px solid var(--
|
|
108
|
+
border-bottom: 1px solid var(--ds-panel-border, rgba(255, 255, 255, 0.08));
|
|
163
109
|
}
|
|
164
110
|
|
|
165
111
|
.parametersTitle {
|
|
@@ -188,16 +134,12 @@
|
|
|
188
134
|
gap: 16px;
|
|
189
135
|
}
|
|
190
136
|
|
|
191
|
-
.parametersGridHeader {
|
|
192
|
-
display: none;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
137
|
.parameterRow {
|
|
196
138
|
display: flex;
|
|
197
139
|
flex-direction: column;
|
|
198
140
|
gap: 8px;
|
|
199
141
|
padding: 12px;
|
|
200
|
-
background: var(--
|
|
142
|
+
background: var(--ds-input-bg, rgba(255, 255, 255, 0.05));
|
|
201
143
|
border-radius: 4px;
|
|
202
144
|
position: relative;
|
|
203
145
|
}
|
|
@@ -227,7 +169,7 @@
|
|
|
227
169
|
|
|
228
170
|
.editorActions {
|
|
229
171
|
padding: 12px 16px;
|
|
230
|
-
border-top: 1px solid var(--
|
|
172
|
+
border-top: 1px solid var(--ds-panel-border, rgba(255, 255, 255, 0.08));
|
|
231
173
|
}
|
|
232
174
|
|
|
233
175
|
.actions {
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { useStore } from 'zustand';
|
|
3
|
+
import { VscodeButton, VscodeTextfield } from '@vscode-elements/react-elements';
|
|
4
|
+
import { Trash } from 'iconoir-react';
|
|
5
|
+
import { useActiveGraph } from '@/system/provider';
|
|
6
|
+
import type { GraphSession } from '@/system/graphSession';
|
|
7
|
+
import { BasePanel } from '../base';
|
|
8
|
+
import { SectionTitle } from '../common/SectionTitle';
|
|
9
|
+
|
|
10
|
+
export function GraphPropertiesPanel() {
|
|
11
|
+
const session = useActiveGraph();
|
|
12
|
+
if (!session) {
|
|
13
|
+
return (
|
|
14
|
+
<BasePanel>
|
|
15
|
+
<div style={{ padding: 12, opacity: 0.7 }}>No graph open.</div>
|
|
16
|
+
</BasePanel>
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
return <GraphProperties session={session} />;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const GraphProperties: React.FC<{ session: GraphSession }> = ({ session }) => {
|
|
23
|
+
const name = useStore(session.metaStore, (s) => s.name);
|
|
24
|
+
const metadata = useStore(session.metaStore, (s) => s.metadata);
|
|
25
|
+
const { setName, setMetadataValue, removeMetadataKey, setMetadata } =
|
|
26
|
+
session.metaStore.getState();
|
|
27
|
+
|
|
28
|
+
const entries = Object.entries(metadata);
|
|
29
|
+
|
|
30
|
+
const renameKey = (oldKey: string, newKey: string, value: any) => {
|
|
31
|
+
const trimmed = newKey.trim();
|
|
32
|
+
if (trimmed === oldKey) return;
|
|
33
|
+
const next = { ...session.metaStore.getState().metadata };
|
|
34
|
+
delete next[oldKey];
|
|
35
|
+
if (trimmed) next[trimmed] = value;
|
|
36
|
+
setMetadata(next);
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
const addEntry = () => {
|
|
40
|
+
const current = session.metaStore.getState().metadata;
|
|
41
|
+
let i = 1;
|
|
42
|
+
let key = `key${i}`;
|
|
43
|
+
while (key in current) key = `key${++i}`;
|
|
44
|
+
setMetadataValue(key, '');
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
return (
|
|
48
|
+
<BasePanel>
|
|
49
|
+
<div
|
|
50
|
+
style={{
|
|
51
|
+
display: 'flex',
|
|
52
|
+
flexDirection: 'column',
|
|
53
|
+
minWidth: 0
|
|
54
|
+
}}
|
|
55
|
+
>
|
|
56
|
+
<SectionTitle>Name</SectionTitle>
|
|
57
|
+
<VscodeTextfield
|
|
58
|
+
value={name}
|
|
59
|
+
placeholder="Graph name"
|
|
60
|
+
style={{ width: '100%' }}
|
|
61
|
+
onChange={(e: any) => setName(String(e?.target?.value ?? ''))}
|
|
62
|
+
/>
|
|
63
|
+
|
|
64
|
+
<SectionTitle>Metadata</SectionTitle>
|
|
65
|
+
<div style={{ display: 'flex', flexDirection: 'column', gap: 6 }}>
|
|
66
|
+
{entries.length === 0 && (
|
|
67
|
+
<div
|
|
68
|
+
style={{
|
|
69
|
+
fontSize: 'var(--fs-desc, 0.72rem)',
|
|
70
|
+
color: 'var(--ds-fg-muted)'
|
|
71
|
+
}}
|
|
72
|
+
>
|
|
73
|
+
No metadata. Add a key/value pair below.
|
|
74
|
+
</div>
|
|
75
|
+
)}
|
|
76
|
+
{entries.map(([key, value]) => (
|
|
77
|
+
<MetadataRow
|
|
78
|
+
key={key}
|
|
79
|
+
entryKey={key}
|
|
80
|
+
value={value}
|
|
81
|
+
onRename={renameKey}
|
|
82
|
+
onValueChange={(v) => setMetadataValue(key, v)}
|
|
83
|
+
onRemove={() => removeMetadataKey(key)}
|
|
84
|
+
/>
|
|
85
|
+
))}
|
|
86
|
+
<VscodeButton secondary onClick={addEntry}>
|
|
87
|
+
+ Add metadata
|
|
88
|
+
</VscodeButton>
|
|
89
|
+
</div>
|
|
90
|
+
</div>
|
|
91
|
+
</BasePanel>
|
|
92
|
+
);
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
const MetadataRow: React.FC<{
|
|
96
|
+
entryKey: string;
|
|
97
|
+
value: any;
|
|
98
|
+
onRename: (oldKey: string, newKey: string, value: any) => void;
|
|
99
|
+
onValueChange: (value: string) => void;
|
|
100
|
+
onRemove: () => void;
|
|
101
|
+
}> = ({ entryKey, value, onRename, onValueChange, onRemove }) => {
|
|
102
|
+
// Key edits commit on blur (renaming changes identity); value edits are live.
|
|
103
|
+
const [draftKey, setDraftKey] = useState(entryKey);
|
|
104
|
+
|
|
105
|
+
return (
|
|
106
|
+
<div style={{ display: 'flex', gap: 4, alignItems: 'center' }}>
|
|
107
|
+
<VscodeTextfield
|
|
108
|
+
value={draftKey}
|
|
109
|
+
placeholder="key"
|
|
110
|
+
style={{ flex: 1, minWidth: 0 }}
|
|
111
|
+
onChange={(e: any) => setDraftKey(String(e?.target?.value ?? ''))}
|
|
112
|
+
onBlur={() => onRename(entryKey, draftKey, value)}
|
|
113
|
+
/>
|
|
114
|
+
<VscodeTextfield
|
|
115
|
+
value={String(value ?? '')}
|
|
116
|
+
placeholder="value"
|
|
117
|
+
style={{ flex: 1, minWidth: 0 }}
|
|
118
|
+
onChange={(e: any) => onValueChange(String(e?.target?.value ?? ''))}
|
|
119
|
+
/>
|
|
120
|
+
<VscodeButton secondary iconOnly title="Remove" onClick={onRemove}>
|
|
121
|
+
<Trash />
|
|
122
|
+
</VscodeButton>
|
|
123
|
+
</div>
|
|
124
|
+
);
|
|
125
|
+
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { VscodeBadge, VscodeDivider } from '@vscode-elements/react-elements';
|
|
3
3
|
import { useStore } from 'zustand';
|
|
4
|
-
import {
|
|
4
|
+
import { useActiveGraph } from '@/system/provider';
|
|
5
5
|
import styles from './styles.module.css';
|
|
6
6
|
import { BasePanel } from '../base';
|
|
7
7
|
|
|
8
8
|
export function HistoryPanel() {
|
|
9
|
-
const system =
|
|
9
|
+
const system = useActiveGraph()!;
|
|
10
10
|
const history = useStore(system.undoManager.store, (s) => s.history);
|
|
11
11
|
const redoStack = useStore(system.undoManager.store, (s) => s.redoStack);
|
|
12
12
|
|
|
@@ -1,13 +1,3 @@
|
|
|
1
|
-
.root {
|
|
2
|
-
display: flex;
|
|
3
|
-
flex-direction: column;
|
|
4
|
-
flex: 1;
|
|
5
|
-
height: 100%;
|
|
6
|
-
width: 100%;
|
|
7
|
-
padding: 0.5rem;
|
|
8
|
-
overflow: auto;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
1
|
.content {
|
|
12
2
|
display: flex;
|
|
13
3
|
flex-direction: column;
|
|
@@ -52,9 +42,9 @@
|
|
|
52
42
|
|
|
53
43
|
.keyBadge {
|
|
54
44
|
font-size: 0.875rem;
|
|
55
|
-
font-family: var(--
|
|
56
|
-
background: var(--
|
|
57
|
-
border: 1px solid var(--
|
|
45
|
+
font-family: var(--ds-font-mono);
|
|
46
|
+
background: var(--ds-widget-bg);
|
|
47
|
+
border: 1px solid var(--ds-border-subtle);
|
|
58
48
|
padding: 0.25rem 0.5rem;
|
|
59
49
|
border-radius: var(--component-radii-sm);
|
|
60
50
|
word-break: break-all;
|
|
@@ -107,10 +107,9 @@ export const KeymapsPanel = () => {
|
|
|
107
107
|
<VscodeTableRow key={action}>
|
|
108
108
|
<VscodeTableCell className={styles.actionCell}>
|
|
109
109
|
<div className={styles.actionInfo}>
|
|
110
|
-
<div className={styles.actionLabel}>
|
|
110
|
+
<div className={styles.actionLabel} title={action}>
|
|
111
111
|
{getDescription(action)}
|
|
112
112
|
</div>
|
|
113
|
-
<code className={styles.actionId}>{action}</code>
|
|
114
113
|
</div>
|
|
115
114
|
</VscodeTableCell>
|
|
116
115
|
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { BasePanel } from '@/components/panels/base';
|
|
2
2
|
import { layerId } from '@/annotations';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { useActiveGraph } from '@/system/provider';
|
|
4
|
+
import {
|
|
5
|
+
VscodeButton,
|
|
6
|
+
VscodeCheckbox,
|
|
7
|
+
VscodeDivider
|
|
8
|
+
} from '@vscode-elements/react-elements';
|
|
5
9
|
import { useMemo, useState } from 'react';
|
|
6
10
|
import { useStore } from 'zustand';
|
|
7
11
|
import styles from './styles.module.css';
|
|
@@ -25,7 +29,7 @@ const clampOpacityFromPercent = (percent: number): number => {
|
|
|
25
29
|
};
|
|
26
30
|
|
|
27
31
|
export function LayersPanel() {
|
|
28
|
-
const system =
|
|
32
|
+
const system = useActiveGraph()!;
|
|
29
33
|
|
|
30
34
|
const layers = useStore(system.layerStore, (state) => state.layers);
|
|
31
35
|
const nodeLayers = useStore(system.layerStore, (state) => state.nodeLayers);
|
|
@@ -180,18 +184,19 @@ export function LayersPanel() {
|
|
|
180
184
|
</div>
|
|
181
185
|
|
|
182
186
|
<div className={styles.controls}>
|
|
183
|
-
<
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
187
|
+
<VscodeCheckbox
|
|
188
|
+
className={styles.checkboxLabel}
|
|
189
|
+
checked={layer.visible}
|
|
190
|
+
label="Visible"
|
|
191
|
+
onChange={(event: any) =>
|
|
192
|
+
system.layerStore
|
|
193
|
+
.getState()
|
|
194
|
+
.setLayerVisibility(
|
|
195
|
+
layer.id,
|
|
196
|
+
Boolean(event?.target?.checked)
|
|
197
|
+
)
|
|
198
|
+
}
|
|
199
|
+
/>
|
|
195
200
|
|
|
196
201
|
<label className={styles.opacityLabel}>
|
|
197
202
|
Opacity
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
|
|
19
19
|
.subtitle {
|
|
20
20
|
font-size: 0.85rem;
|
|
21
|
-
color: var(--
|
|
21
|
+
color: var(--ds-fg-muted);
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
.addRow {
|
|
@@ -28,9 +28,9 @@
|
|
|
28
28
|
|
|
29
29
|
.nameInput {
|
|
30
30
|
flex: 1;
|
|
31
|
-
background: var(--
|
|
32
|
-
color: var(--
|
|
33
|
-
border: 1px solid var(--
|
|
31
|
+
background: var(--ds-input-bg);
|
|
32
|
+
color: var(--ds-input-fg);
|
|
33
|
+
border: 1px solid var(--ds-input-border);
|
|
34
34
|
border-radius: 4px;
|
|
35
35
|
padding: 0.35rem 0.5rem;
|
|
36
36
|
}
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
.row {
|
|
46
|
-
border: 1px solid var(--
|
|
46
|
+
border: 1px solid var(--ds-panel-border);
|
|
47
47
|
border-radius: 6px;
|
|
48
48
|
padding: 0.6rem;
|
|
49
49
|
display: flex;
|
|
@@ -60,21 +60,21 @@
|
|
|
60
60
|
.layerName {
|
|
61
61
|
flex: 1;
|
|
62
62
|
background: transparent;
|
|
63
|
-
color: var(--
|
|
63
|
+
color: var(--ds-editor-fg);
|
|
64
64
|
border: 1px solid transparent;
|
|
65
65
|
border-radius: 4px;
|
|
66
66
|
padding: 0.2rem 0.3rem;
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
.layerName:focus {
|
|
70
|
-
border-color: var(--
|
|
70
|
+
border-color: var(--ds-focus-border);
|
|
71
71
|
outline: none;
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
.badge {
|
|
75
75
|
font-size: 0.7rem;
|
|
76
|
-
color: var(--
|
|
77
|
-
background: var(--
|
|
76
|
+
color: var(--ds-badge-fg);
|
|
77
|
+
background: var(--ds-badge-bg);
|
|
78
78
|
border-radius: 99px;
|
|
79
79
|
padding: 0.1rem 0.45rem;
|
|
80
80
|
}
|
|
@@ -87,9 +87,6 @@
|
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
.checkboxLabel {
|
|
90
|
-
display: flex;
|
|
91
|
-
align-items: center;
|
|
92
|
-
gap: 0.4rem;
|
|
93
90
|
font-size: 0.85rem;
|
|
94
91
|
}
|
|
95
92
|
|
|
@@ -42,7 +42,7 @@ export function LegendPanel() {
|
|
|
42
42
|
|
|
43
43
|
return (
|
|
44
44
|
<BasePanel>
|
|
45
|
-
<div
|
|
45
|
+
<div style={{ display: 'flex', flexDirection: 'column', gap: '4px' }}>
|
|
46
46
|
<VscodeTable zebra columns={['50', '50', 'auto']}>
|
|
47
47
|
<VscodeTableHeader>
|
|
48
48
|
<VscodeTableHeaderCell>Color</VscodeTableHeaderCell>
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
flex-direction: column;
|
|
6
6
|
gap: 8px;
|
|
7
7
|
padding-bottom: 8px;
|
|
8
|
-
border-bottom: 1px solid var(--
|
|
8
|
+
border-bottom: 1px solid var(--ds-panel-border);
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
.searchBar {
|
|
@@ -36,10 +36,16 @@
|
|
|
36
36
|
gap: 2px;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
+
/* Keep the toolbar action icons inside their (ghost) buttons. */
|
|
40
|
+
.toolbarActions svg {
|
|
41
|
+
width: 16px;
|
|
42
|
+
height: 16px;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/* Active toggle: conveyed by the solid icon variant + an accent color, with no
|
|
46
|
+
box — the buttons stay ghost/invisible like the rest of the toolbar. */
|
|
39
47
|
.actionActive {
|
|
40
|
-
color: var(--
|
|
41
|
-
background-color: var(--vscode-inputOption-activeBackground, rgba(53, 116, 240, 0.25));
|
|
42
|
-
outline: 1px solid var(--vscode-inputOption-activeBorder, transparent);
|
|
48
|
+
color: var(--ds-focus-border, #3794ff);
|
|
43
49
|
}
|
|
44
50
|
|
|
45
51
|
/* ---- Level filter chips ---------------------------------------------- */
|
|
@@ -73,13 +79,13 @@
|
|
|
73
79
|
}
|
|
74
80
|
|
|
75
81
|
.levelChip:focus-visible {
|
|
76
|
-
outline: 1px solid var(--
|
|
82
|
+
outline: 1px solid var(--ds-focus-border);
|
|
77
83
|
outline-offset: 1px;
|
|
78
84
|
}
|
|
79
85
|
|
|
80
86
|
.levelOff {
|
|
81
87
|
background-color: transparent;
|
|
82
|
-
color: var(--
|
|
88
|
+
color: var(--ds-fg-muted, #9d9d9d);
|
|
83
89
|
opacity: 0.6;
|
|
84
90
|
}
|
|
85
91
|
|
|
@@ -114,7 +120,7 @@
|
|
|
114
120
|
font-size: 0.72rem;
|
|
115
121
|
line-height: 1;
|
|
116
122
|
align-self: center;
|
|
117
|
-
color: var(--
|
|
123
|
+
color: var(--ds-fg-muted, #9d9d9d);
|
|
118
124
|
font-variant-numeric: tabular-nums;
|
|
119
125
|
}
|
|
120
126
|
|
|
@@ -134,15 +140,15 @@
|
|
|
134
140
|
justify-content: center;
|
|
135
141
|
height: 100%;
|
|
136
142
|
min-height: 64px;
|
|
137
|
-
color: var(--
|
|
143
|
+
color: var(--ds-fg-muted, #9d9d9d);
|
|
138
144
|
font-size: 0.85rem;
|
|
139
145
|
}
|
|
140
146
|
|
|
141
147
|
.logsList {
|
|
142
148
|
display: flex;
|
|
143
149
|
flex-direction: column;
|
|
144
|
-
font-family: var(--
|
|
145
|
-
font-size: var(--
|
|
150
|
+
font-family: var(--ds-font-mono, monospace);
|
|
151
|
+
font-size: var(--ds-font-mono-size, 12px);
|
|
146
152
|
line-height: 18px;
|
|
147
153
|
}
|
|
148
154
|
|
|
@@ -158,16 +164,16 @@
|
|
|
158
164
|
}
|
|
159
165
|
|
|
160
166
|
.row:hover {
|
|
161
|
-
background-color: var(--
|
|
167
|
+
background-color: var(--ds-list-hover-bg, rgba(255, 255, 255, 0.06));
|
|
162
168
|
}
|
|
163
169
|
|
|
164
170
|
.row[data-severity='warning'] {
|
|
165
|
-
border-left-color: color-mix(in srgb, var(--
|
|
171
|
+
border-left-color: color-mix(in srgb, var(--ds-warning, #cca700) 60%, transparent);
|
|
166
172
|
}
|
|
167
173
|
|
|
168
174
|
.row[data-severity='error'] {
|
|
169
|
-
border-left-color: var(--
|
|
170
|
-
background-color: color-mix(in srgb, var(--
|
|
175
|
+
border-left-color: var(--ds-error, #f48771);
|
|
176
|
+
background-color: color-mix(in srgb, var(--ds-error, #f48771) 8%, transparent);
|
|
171
177
|
}
|
|
172
178
|
|
|
173
179
|
.rowIcon {
|
|
@@ -186,7 +192,7 @@
|
|
|
186
192
|
|
|
187
193
|
.rowTime {
|
|
188
194
|
flex: none;
|
|
189
|
-
color: var(--
|
|
195
|
+
color: var(--ds-fg-muted, #9d9d9d);
|
|
190
196
|
opacity: 0.85;
|
|
191
197
|
font-variant-numeric: tabular-nums;
|
|
192
198
|
}
|
|
@@ -194,19 +200,19 @@
|
|
|
194
200
|
.rowMessage {
|
|
195
201
|
flex: 1;
|
|
196
202
|
min-width: 0;
|
|
197
|
-
color: var(--
|
|
203
|
+
color: var(--ds-fg);
|
|
198
204
|
}
|
|
199
205
|
|
|
200
206
|
.row[data-severity='error'] .rowMessage {
|
|
201
|
-
color: var(--
|
|
207
|
+
color: var(--ds-error, #f48771);
|
|
202
208
|
}
|
|
203
209
|
|
|
204
210
|
.row[data-severity='verbose'] .rowMessage {
|
|
205
|
-
color: var(--
|
|
211
|
+
color: var(--ds-fg-muted, #9d9d9d);
|
|
206
212
|
}
|
|
207
213
|
|
|
208
214
|
.highlight {
|
|
209
|
-
background-color: var(--
|
|
215
|
+
background-color: var(--ds-find-match-bg, rgba(234, 92, 0, 0.33));
|
|
210
216
|
color: inherit;
|
|
211
217
|
border-radius: 2px;
|
|
212
218
|
}
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
ClockSolid
|
|
15
15
|
} from 'iconoir-react';
|
|
16
16
|
import { VscodeTextfield } from '@vscode-elements/react-elements';
|
|
17
|
-
import {
|
|
17
|
+
import { useActiveGraph } from '@/system/provider';
|
|
18
18
|
import { useStore } from 'zustand';
|
|
19
19
|
import clsx from 'clsx';
|
|
20
20
|
import { BasePanel } from '../base';
|
|
@@ -25,10 +25,10 @@ import { Icon } from '@/components/primitives/icon';
|
|
|
25
25
|
const LEVELS: readonly LogSeverity[] = ['verbose', 'info', 'warning', 'error'];
|
|
26
26
|
|
|
27
27
|
const LOG_COLORS: Record<LogSeverity, string> = {
|
|
28
|
-
verbose: 'var(--
|
|
29
|
-
info: 'var(--
|
|
30
|
-
warning: 'var(--
|
|
31
|
-
error: 'var(--
|
|
28
|
+
verbose: 'var(--ds-terminal-cyan, #29b8db)',
|
|
29
|
+
info: 'var(--ds-chart-blue, #3794ff)',
|
|
30
|
+
warning: 'var(--ds-warning, #cca700)',
|
|
31
|
+
error: 'var(--ds-error, #f48771)'
|
|
32
32
|
};
|
|
33
33
|
|
|
34
34
|
const IconType: Record<LogSeverity, React.ReactNode> = {
|
|
@@ -66,7 +66,7 @@ const renderMessage = (message: string, term: string): React.ReactNode => {
|
|
|
66
66
|
};
|
|
67
67
|
|
|
68
68
|
export function LogsPanel() {
|
|
69
|
-
const system =
|
|
69
|
+
const system = useActiveGraph()!;
|
|
70
70
|
const logs = useStore(system.logsStore, (x) => x.logs);
|
|
71
71
|
const clearLogs = useStore(system.logsStore, (x) => x.clear);
|
|
72
72
|
|
|
@@ -161,7 +161,7 @@ export function LogsPanel() {
|
|
|
161
161
|
const copyToClipboard = useCallback(
|
|
162
162
|
(text: string) => {
|
|
163
163
|
navigator.clipboard.writeText(text).then(() => {
|
|
164
|
-
system.notifications.success('Copied to clipboard');
|
|
164
|
+
system.editor.notifications.success('Copied to clipboard');
|
|
165
165
|
});
|
|
166
166
|
},
|
|
167
167
|
[system]
|
|
@@ -43,6 +43,7 @@ export const InputsGroup: React.FC<InputsGroupProps> = ({
|
|
|
43
43
|
<div key={input.name} className={styles.inputWithToggle}>
|
|
44
44
|
{onToggleInput && (
|
|
45
45
|
<Icon
|
|
46
|
+
className={styles.inputToggle}
|
|
46
47
|
onClick={() => onToggleInput(input.name)}
|
|
47
48
|
title={isHidden ? 'Show input on node' : 'Hide input on node'}
|
|
48
49
|
>
|
|
@@ -40,7 +40,7 @@ export const NodeSettings: React.FC<NodeSettingsProps> = ({
|
|
|
40
40
|
<VscodeDivider />
|
|
41
41
|
|
|
42
42
|
<div className={styles.descriptionSection}>
|
|
43
|
-
<div className={styles.
|
|
43
|
+
<div className={styles.subTitle}>Description</div>
|
|
44
44
|
<VscodeTextarea
|
|
45
45
|
placeholder="No description provided."
|
|
46
46
|
className={styles.descriptionTextarea}
|
|
@@ -62,7 +62,7 @@ export const NodeSettings: React.FC<NodeSettingsProps> = ({
|
|
|
62
62
|
<VscodeDivider />
|
|
63
63
|
|
|
64
64
|
<div className={styles.annotationsSection}>
|
|
65
|
-
<div className={styles.
|
|
65
|
+
<div className={styles.subTitle}>Annotations</div>
|
|
66
66
|
{annotations == null ? (
|
|
67
67
|
<div className={styles.annotationsEmpty}>No annotations.</div>
|
|
68
68
|
) : typeof annotations === 'string' ||
|