@lace-cloud/canvas 0.0.1-bootstrap.0 → 0.6.4-next.25705814731
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/LICENSE +19 -0
- package/README.md +70 -8
- package/dist/AccordionSection-RPWRZINZ.css +74 -0
- package/dist/ActionBar-7ANPCCPK.css +74 -0
- package/dist/Canvas-IXCFWQNP.css +129 -0
- package/dist/ContextMenu-EAQFLI5L.css +46 -0
- package/dist/EdgeInspectorPanel-D536U5MZ.css +54 -0
- package/dist/ErrorBoundary-IXSIVZFH.css +42 -0
- package/dist/GroupNode-EY63N53G.css +112 -0
- package/dist/ModuleConfigPanel-UUJPO457.css +141 -0
- package/dist/ModuleNode-AZZ54ONC.css +134 -0
- package/dist/ValidationErrorBanner-G6TBGMK7.css +158 -0
- package/dist/index.cjs +17351 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.mts +1026 -0
- package/dist/index.d.ts +1026 -0
- package/dist/index.mjs +17305 -0
- package/dist/index.mjs.map +1 -0
- package/dist/panels-shared-5HTOXZUS.css +145 -0
- package/package.json +39 -8
- package/index.js +0 -1
package/LICENSE
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
Proprietary — Lace Cloud Inc.
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Lace Cloud Inc. All rights reserved.
|
|
4
|
+
|
|
5
|
+
This source code and its compiled artifacts are proprietary to Lace
|
|
6
|
+
Cloud Inc. Use is permitted only as part of authorized Lace Cloud
|
|
7
|
+
products and services, under separate terms.
|
|
8
|
+
|
|
9
|
+
The following are NOT permitted without prior written permission
|
|
10
|
+
from Lace Cloud Inc.:
|
|
11
|
+
|
|
12
|
+
- Redistribution of source code or binaries
|
|
13
|
+
- Modification or derivative works
|
|
14
|
+
- Reverse-engineering beyond the legal minimum
|
|
15
|
+
- Hosting, embedding, or resale as a service
|
|
16
|
+
|
|
17
|
+
No warranties are made; use is at your own risk.
|
|
18
|
+
|
|
19
|
+
Subject to legal review.
|
package/README.md
CHANGED
|
@@ -1,11 +1,73 @@
|
|
|
1
|
-
# @lace-cloud/canvas
|
|
1
|
+
# @lace-cloud/canvas
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
Lace Cloud's visual canvas — the React + ReactFlow webview UI for
|
|
4
|
+
visually composing Terraform modules. Transport-agnostic: drives
|
|
5
|
+
either VS Code postMessage (extension host) or Connect-JSON over fetch
|
|
6
|
+
(browser/Storybook).
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
(prerelease, from the develop branch) or `@latest` (stable, from tagged
|
|
9
|
-
releases on main).
|
|
8
|
+
## Install
|
|
10
9
|
|
|
11
|
-
|
|
10
|
+
```bash
|
|
11
|
+
npm install @lace-cloud/canvas @lace-cloud/design-tokens react react-dom @xyflow/react
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Usage (VS Code postMessage path)
|
|
15
|
+
|
|
16
|
+
```tsx
|
|
17
|
+
import { App, type HostBridge, PostMessageEngine } from '@lace-cloud/canvas';
|
|
18
|
+
import { createRoot } from 'react-dom/client';
|
|
19
|
+
import '@lace-cloud/design-tokens/tokens.css';
|
|
20
|
+
|
|
21
|
+
const vscode = acquireVsCodeApi();
|
|
22
|
+
const engine = new PostMessageEngine(vscode);
|
|
23
|
+
const hostBridge: HostBridge = {
|
|
24
|
+
signalReady: () => vscode.postMessage({ command: 'webviewReady' }),
|
|
25
|
+
markDirty: () => vscode.postMessage({ command: 'markDirty' }),
|
|
26
|
+
markClean: () => vscode.postMessage({ command: 'markClean' }),
|
|
27
|
+
triggerGenerate: () => vscode.postMessage({ command: 'generate' }),
|
|
28
|
+
openFile: (relativePath, line, column) =>
|
|
29
|
+
vscode.postMessage({ command: 'openFile', relativePath, line, column }),
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
createRoot(document.getElementById('root')!).render(
|
|
33
|
+
<App engine={engine} hostBridge={hostBridge} />
|
|
34
|
+
);
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Usage (browser fetch path, Storybook + portal)
|
|
38
|
+
|
|
39
|
+
```tsx
|
|
40
|
+
import { App, ConnectWebEngine, type HostBridge } from '@lace-cloud/canvas';
|
|
41
|
+
|
|
42
|
+
const engine = new ConnectWebEngine({ baseUrl: 'http://localhost:50051' });
|
|
43
|
+
engine.startSubscribe(); // open the StateUpdated stream
|
|
44
|
+
|
|
45
|
+
createRoot(document.getElementById('root')!).render(
|
|
46
|
+
<App engine={engine} hostBridge={browserHostBridge} />
|
|
47
|
+
);
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Read-only mode
|
|
51
|
+
|
|
52
|
+
```tsx
|
|
53
|
+
<App engine={engine} hostBridge={hostBridge} readOnly />
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
For consumers that show state without letting users mutate it
|
|
57
|
+
(portal's control plane is the driving example). Three-layer gating
|
|
58
|
+
(xyflow native props + conditional handler installation + render
|
|
59
|
+
gates) ensures no mutation slips through. See lace's
|
|
60
|
+
[CLAUDE.md](https://github.com/lace-cloud/lace/blob/main/CLAUDE.md#read-only-mode-canvas)
|
|
61
|
+
for the full contract.
|
|
62
|
+
|
|
63
|
+
## CanvasEngine interface
|
|
64
|
+
|
|
65
|
+
The contract between webview and backend. `PostMessageEngine` and
|
|
66
|
+
`ConnectWebEngine` both implement it; consumers (App, hooks) work
|
|
67
|
+
with either. See lace's
|
|
68
|
+
[AGENTS.md](https://github.com/lace-cloud/lace/blob/main/AGENTS.md#engine-interface-canvasengine)
|
|
69
|
+
for the full method list.
|
|
70
|
+
|
|
71
|
+
## License
|
|
72
|
+
|
|
73
|
+
Proprietary — see [LICENSE](https://github.com/lace-cloud/lace/blob/main/LICENSE).
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/* AccordionSection — collapsible section used inside config panels.
|
|
2
|
+
* Whole-row button click toggles; chevron rotates 0→90 on open.
|
|
3
|
+
* The grid-rows animation is the "height: auto transition" trick —
|
|
4
|
+
* grid-template-rows can animate, so the inner wrapper's overflow:
|
|
5
|
+
* hidden clips it until it expands to 1fr. */
|
|
6
|
+
|
|
7
|
+
.lace-accordion {
|
|
8
|
+
border-bottom: 1px solid var(--lace-color-border-default);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.lace-accordion__header {
|
|
12
|
+
display: flex;
|
|
13
|
+
align-items: center;
|
|
14
|
+
gap: var(--lace-space-2);
|
|
15
|
+
width: 100%;
|
|
16
|
+
padding: var(--lace-space-3) var(--lace-space-4);
|
|
17
|
+
background: transparent;
|
|
18
|
+
border: none;
|
|
19
|
+
color: var(--lace-color-neutral-300);
|
|
20
|
+
font-family: inherit;
|
|
21
|
+
font-size: var(--lace-font-size-lg);
|
|
22
|
+
font-weight: var(--lace-font-weight-bold);
|
|
23
|
+
text-transform: uppercase;
|
|
24
|
+
letter-spacing: 0.04em;
|
|
25
|
+
text-align: left;
|
|
26
|
+
cursor: pointer;
|
|
27
|
+
transition: color var(--lace-duration-fast) var(--lace-easing-standard);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.lace-accordion__header:hover {
|
|
31
|
+
color: var(--lace-color-text-primary);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.lace-accordion__chevron {
|
|
35
|
+
flex-shrink: 0;
|
|
36
|
+
width: 12px;
|
|
37
|
+
height: 12px;
|
|
38
|
+
fill: currentColor;
|
|
39
|
+
transition: transform var(--lace-duration-medium) var(--lace-easing-standard);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.lace-accordion--open .lace-accordion__chevron {
|
|
43
|
+
transform: rotate(90deg);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.lace-accordion__title {
|
|
47
|
+
flex: 1 1 auto;
|
|
48
|
+
min-width: 0;
|
|
49
|
+
opacity: 0.85;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.lace-accordion__badge {
|
|
53
|
+
font-size: var(--lace-font-size-sm);
|
|
54
|
+
font-weight: var(--lace-font-weight-regular);
|
|
55
|
+
opacity: 0.6;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.lace-accordion__body {
|
|
59
|
+
display: grid;
|
|
60
|
+
grid-template-rows: 0fr;
|
|
61
|
+
transition: grid-template-rows var(--lace-duration-medium) var(--lace-easing-out);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.lace-accordion--open .lace-accordion__body {
|
|
65
|
+
grid-template-rows: 1fr;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.lace-accordion__body-inner {
|
|
69
|
+
overflow: hidden;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.lace-accordion__body-content {
|
|
73
|
+
padding: 0 var(--lace-space-4) var(--lace-space-4);
|
|
74
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/* ActionBar — top-right icon strip over the canvas. Plain CSS + tokens
|
|
2
|
+
* so the composite renders identically in the canvas bundle and in
|
|
3
|
+
* Storybook (Tailwind v4 doesn't scan @lace-cloud/canvas). Matches the
|
|
4
|
+
* ContextMenu/Toast pattern from Session 1.5. */
|
|
5
|
+
|
|
6
|
+
.lace-action-bar {
|
|
7
|
+
display: flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
background: var(--lace-action-bar-bg);
|
|
10
|
+
backdrop-filter: blur(6px);
|
|
11
|
+
border: 1px solid var(--lace-border-default);
|
|
12
|
+
border-radius: 8px;
|
|
13
|
+
box-shadow: var(--lace-action-bar-shadow);
|
|
14
|
+
overflow: hidden;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.lace-action-bar__icon-btn {
|
|
18
|
+
display: inline-flex;
|
|
19
|
+
align-items: center;
|
|
20
|
+
justify-content: center;
|
|
21
|
+
width: 32px;
|
|
22
|
+
height: 32px;
|
|
23
|
+
padding: 0;
|
|
24
|
+
background: transparent;
|
|
25
|
+
border: none;
|
|
26
|
+
color: var(--lace-text-muted);
|
|
27
|
+
cursor: pointer;
|
|
28
|
+
transition: color 120ms ease;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.lace-action-bar__icon-btn:hover:not(:disabled) {
|
|
32
|
+
color: var(--lace-grey);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.lace-action-bar__icon-btn:focus-visible {
|
|
36
|
+
outline: 2px solid var(--lace-green);
|
|
37
|
+
outline-offset: -2px;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.lace-action-bar__separator {
|
|
41
|
+
width: 1px;
|
|
42
|
+
height: 20px;
|
|
43
|
+
margin: 0 2px;
|
|
44
|
+
background: var(--lace-action-bar-separator);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.lace-action-bar__generate {
|
|
48
|
+
display: inline-flex;
|
|
49
|
+
align-items: center;
|
|
50
|
+
justify-content: center;
|
|
51
|
+
width: 32px;
|
|
52
|
+
height: 32px;
|
|
53
|
+
padding: 0;
|
|
54
|
+
background: var(--lace-action-bar-generate-bg);
|
|
55
|
+
border: none;
|
|
56
|
+
color: var(--lace-btn-text-primary);
|
|
57
|
+
cursor: pointer;
|
|
58
|
+
transition: background 120ms ease;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.lace-action-bar__generate:hover:not(:disabled) {
|
|
62
|
+
background: var(--lace-action-bar-generate-bg-hover);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.lace-action-bar__generate:disabled {
|
|
66
|
+
opacity: 0.5;
|
|
67
|
+
cursor: not-allowed;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.lace-action-bar__icon {
|
|
71
|
+
width: 14px;
|
|
72
|
+
height: 14px;
|
|
73
|
+
fill: currentColor;
|
|
74
|
+
}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Canvas.css — xyflow (@xyflow/react) customisations for the Lace canvas.
|
|
3
|
+
*
|
|
4
|
+
* Colocated with Canvas.tsx (imported there) so both the VS Code webview
|
|
5
|
+
* bundle and the Storybook canvas-stories build pick these rules up via
|
|
6
|
+
* the React import chain. There is no separate global stylesheet for the
|
|
7
|
+
* canvas — that was the source of the webview↔Storybook divergence.
|
|
8
|
+
*
|
|
9
|
+
* Layer ordering note:
|
|
10
|
+
* xyflow ships its own stylesheet under @layer components. Our rules
|
|
11
|
+
* below are unlayered, so they beat @layer rules without needing
|
|
12
|
+
* !important. Only the rules that explicitly need to live inside
|
|
13
|
+
* @layer components (e.g. the edge stroke override that competes with
|
|
14
|
+
* the xyflow default) are placed there.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
/* ── Pin handles (Blender-style typed I/O) ──
|
|
18
|
+
* Colors are set per-pin via inline style (pinColor.ts maps type → RGB).
|
|
19
|
+
* The shared rules cover geometry and hover/connecting states. */
|
|
20
|
+
|
|
21
|
+
.lace-pin-handle {
|
|
22
|
+
border-radius: var(--lace-radius-pill);
|
|
23
|
+
opacity: 0.9;
|
|
24
|
+
transition:
|
|
25
|
+
opacity var(--lace-duration-fast) var(--lace-easing-standard),
|
|
26
|
+
transform var(--lace-duration-fast) var(--lace-easing-standard);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.lace-pin-handle:hover {
|
|
30
|
+
opacity: 1;
|
|
31
|
+
transform: scale(1.25);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.react-flow__handle.lace-pin-handle.connectingfrom,
|
|
35
|
+
.react-flow__handle.lace-pin-handle.connectingto {
|
|
36
|
+
opacity: 1;
|
|
37
|
+
transform: scale(1.35);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/* ── Controls (zoom in / zoom out / fit) ──
|
|
41
|
+
* xyflow's defaults give us a white-on-white result. We override with
|
|
42
|
+
* the brand gunmetal + accent-green so controls are legible against
|
|
43
|
+
* the night-black canvas. */
|
|
44
|
+
|
|
45
|
+
.react-flow__controls {
|
|
46
|
+
border-radius: var(--lace-radius-md);
|
|
47
|
+
overflow: hidden;
|
|
48
|
+
border: 1px solid var(--lace-canvas-controls-border);
|
|
49
|
+
box-shadow: var(--lace-shadow-md);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.react-flow__controls-button {
|
|
53
|
+
width: 28px;
|
|
54
|
+
height: 28px;
|
|
55
|
+
padding: 5px;
|
|
56
|
+
display: flex;
|
|
57
|
+
align-items: center;
|
|
58
|
+
justify-content: center;
|
|
59
|
+
background: var(--lace-canvas-controls-bg);
|
|
60
|
+
border: none;
|
|
61
|
+
border-bottom: 1px solid var(--lace-color-accent-alpha-subtle);
|
|
62
|
+
cursor: pointer;
|
|
63
|
+
transition: background var(--lace-duration-fast) var(--lace-easing-standard);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.react-flow__controls-button:last-child {
|
|
67
|
+
border-bottom: none;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.react-flow__controls-button:hover {
|
|
71
|
+
background: var(--lace-canvas-controls-bg-hover);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.react-flow__controls-button svg {
|
|
75
|
+
width: 13px;
|
|
76
|
+
height: 13px;
|
|
77
|
+
max-width: 13px;
|
|
78
|
+
max-height: 13px;
|
|
79
|
+
fill: var(--lace-canvas-controls-icon);
|
|
80
|
+
transition: fill var(--lace-duration-fast) var(--lace-easing-standard);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.react-flow__controls-button:hover svg {
|
|
84
|
+
fill: var(--lace-canvas-controls-icon-hover);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/* ── MiniMap ── */
|
|
88
|
+
|
|
89
|
+
.react-flow__minimap {
|
|
90
|
+
border-radius: var(--lace-radius-md);
|
|
91
|
+
overflow: hidden;
|
|
92
|
+
border: 1px solid var(--lace-canvas-minimap-border);
|
|
93
|
+
box-shadow: var(--lace-shadow-md);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/* ── Edges ──
|
|
97
|
+
* Default edges use the brand green. Selected edges get a brighter
|
|
98
|
+
* stroke + drop-shadow so the user can see what will be deleted on
|
|
99
|
+
* keypress. */
|
|
100
|
+
|
|
101
|
+
.react-flow__edge path {
|
|
102
|
+
stroke: var(--lace-canvas-edge-stroke);
|
|
103
|
+
stroke-width: var(--lace-canvas-edge-stroke-width);
|
|
104
|
+
transition:
|
|
105
|
+
stroke var(--lace-duration-fast) var(--lace-easing-standard),
|
|
106
|
+
stroke-width var(--lace-duration-fast) var(--lace-easing-standard),
|
|
107
|
+
filter var(--lace-duration-fast) var(--lace-easing-standard);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.react-flow__edge.selected path {
|
|
111
|
+
stroke: var(--lace-canvas-edge-stroke-selected);
|
|
112
|
+
stroke-width: var(--lace-canvas-edge-stroke-width-selected);
|
|
113
|
+
filter: drop-shadow(0 0 4px var(--lace-color-green-alpha-60));
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.react-flow__edge:hover path {
|
|
117
|
+
stroke: var(--lace-canvas-edge-stroke-selected);
|
|
118
|
+
stroke-width: 2px;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/* ── Slide panel ── */
|
|
122
|
+
|
|
123
|
+
.slide-panel {
|
|
124
|
+
position: absolute;
|
|
125
|
+
right: 0;
|
|
126
|
+
top: 0;
|
|
127
|
+
height: 100%;
|
|
128
|
+
transition: transform var(--lace-duration-medium) var(--lace-easing-out);
|
|
129
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/* ContextMenu — right-click menu over the canvas. All colors flow through
|
|
2
|
+
* @lace-cloud/design-tokens. The pattern mirrors @lace-cloud/ui primitives: plain CSS,
|
|
3
|
+
* colocated with the component, imported from the TSX module. Keeps this
|
|
4
|
+
* composite renderable in Storybook where Tailwind v4 doesn't scan the
|
|
5
|
+
* @lace-cloud/canvas package for arbitrary-value utilities. */
|
|
6
|
+
|
|
7
|
+
.lace-ctx-menu {
|
|
8
|
+
position: fixed;
|
|
9
|
+
z-index: 50;
|
|
10
|
+
min-width: 120px;
|
|
11
|
+
padding: 4px 0;
|
|
12
|
+
background: var(--lace-bg-context-menu);
|
|
13
|
+
border: 1px solid var(--lace-green-alpha-20);
|
|
14
|
+
border-radius: 4px;
|
|
15
|
+
box-shadow: var(--lace-shadow-lg);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.lace-ctx-menu__item {
|
|
19
|
+
display: flex;
|
|
20
|
+
align-items: center;
|
|
21
|
+
justify-content: space-between;
|
|
22
|
+
gap: 16px;
|
|
23
|
+
width: 100%;
|
|
24
|
+
padding: 6px 12px;
|
|
25
|
+
background: transparent;
|
|
26
|
+
border: none;
|
|
27
|
+
color: var(--lace-green);
|
|
28
|
+
font-size: 12px;
|
|
29
|
+
text-align: left;
|
|
30
|
+
cursor: pointer;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.lace-ctx-menu__item:hover {
|
|
34
|
+
background: var(--lace-gunmetal);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.lace-ctx-menu__shortcut {
|
|
38
|
+
color: var(--lace-text-muted);
|
|
39
|
+
font-size: 10px;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.lace-ctx-menu__scrim {
|
|
43
|
+
position: fixed;
|
|
44
|
+
inset: 0;
|
|
45
|
+
z-index: 40;
|
|
46
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/* EdgeInspectorPanel — right-docked panel shown when an edge is selected.
|
|
2
|
+
* All colors, spacing, font sizes flow through design tokens. */
|
|
3
|
+
|
|
4
|
+
.lace-edge-panel__title-eyebrow {
|
|
5
|
+
font-size: var(--lace-font-size-md);
|
|
6
|
+
opacity: 0.7;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.lace-edge-panel__title {
|
|
10
|
+
margin-top: 2px;
|
|
11
|
+
font-size: var(--lace-font-size-lg);
|
|
12
|
+
font-weight: var(--lace-font-weight-semibold);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.lace-edge-panel__section-label {
|
|
16
|
+
margin-bottom: var(--lace-space-2);
|
|
17
|
+
font-size: var(--lace-font-size-md);
|
|
18
|
+
opacity: 0.8;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.lace-edge-panel__wiring {
|
|
22
|
+
margin-bottom: var(--lace-space-4);
|
|
23
|
+
font-family: var(--lace-font-mono);
|
|
24
|
+
font-size: var(--lace-font-size-sm);
|
|
25
|
+
opacity: 0.9;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.lace-edge-panel__wiring-arrow {
|
|
29
|
+
margin: var(--lace-space-1) 0;
|
|
30
|
+
opacity: 0.6;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.lace-edge-panel__hint {
|
|
34
|
+
font-size: var(--lace-font-size-sm);
|
|
35
|
+
opacity: 0.6;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.lace-edge-panel__delete-btn {
|
|
39
|
+
width: 100%;
|
|
40
|
+
padding: var(--lace-space-3) 0;
|
|
41
|
+
background: var(--lace-color-red-alpha-12);
|
|
42
|
+
border: 1px solid var(--lace-color-red-alpha-30);
|
|
43
|
+
border-radius: var(--lace-radius-lg);
|
|
44
|
+
color: var(--lace-color-text-danger);
|
|
45
|
+
font-family: inherit;
|
|
46
|
+
font-size: var(--lace-font-size-lg);
|
|
47
|
+
font-weight: var(--lace-font-weight-semibold);
|
|
48
|
+
cursor: pointer;
|
|
49
|
+
transition: background var(--lace-duration-fast) var(--lace-easing-standard);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.lace-edge-panel__delete-btn:hover {
|
|
53
|
+
background: var(--lace-color-red-alpha-20);
|
|
54
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/* ErrorBoundary — last-resort UI when the canvas tree throws. Minimal
|
|
2
|
+
* by design; colors through tokens so it stays legible on the dark
|
|
3
|
+
* canvas background. */
|
|
4
|
+
|
|
5
|
+
.lace-error-state {
|
|
6
|
+
padding: var(--lace-space-5);
|
|
7
|
+
color: var(--lace-color-text-danger-soft);
|
|
8
|
+
font-family: inherit;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.lace-error-state__title {
|
|
12
|
+
margin: 0 0 var(--lace-space-2);
|
|
13
|
+
font-size: var(--lace-font-size-2xl);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.lace-error-state__message {
|
|
17
|
+
margin: 0 0 var(--lace-space-3);
|
|
18
|
+
padding: var(--lace-space-2) var(--lace-space-3);
|
|
19
|
+
background: var(--lace-color-bg-input);
|
|
20
|
+
border: 1px solid var(--lace-color-border-default);
|
|
21
|
+
border-radius: var(--lace-radius-md);
|
|
22
|
+
font-family: var(--lace-font-mono);
|
|
23
|
+
font-size: var(--lace-font-size-sm);
|
|
24
|
+
color: var(--lace-color-text-danger-soft);
|
|
25
|
+
white-space: pre-wrap;
|
|
26
|
+
overflow-x: auto;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.lace-error-state__reload {
|
|
30
|
+
padding: var(--lace-space-1) var(--lace-space-3);
|
|
31
|
+
background: var(--lace-btn-secondary-bg);
|
|
32
|
+
border: 1px solid var(--lace-color-border-default);
|
|
33
|
+
border-radius: var(--lace-radius-md);
|
|
34
|
+
color: var(--lace-color-text-primary);
|
|
35
|
+
font-family: inherit;
|
|
36
|
+
font-size: var(--lace-font-size-md);
|
|
37
|
+
cursor: pointer;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.lace-error-state__reload:hover {
|
|
41
|
+
background: var(--lace-btn-secondary-hover);
|
|
42
|
+
}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/* GroupNode — collapsed: solid 220px node with aggregated pin rail.
|
|
2
|
+
* Expanded: dashed container that holds member nodes. Geometry
|
|
3
|
+
* constants live in the .tsx file because they influence positioning
|
|
4
|
+
* math; purely visual properties live here. */
|
|
5
|
+
|
|
6
|
+
.lace-group-node {
|
|
7
|
+
position: relative;
|
|
8
|
+
font-family: inherit;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.lace-group-node--collapsed {
|
|
12
|
+
background: var(--lace-color-bg-canvas);
|
|
13
|
+
border: 1px dashed var(--lace-color-green-alpha-20);
|
|
14
|
+
border-radius: var(--lace-radius-sm);
|
|
15
|
+
box-shadow: var(--lace-shadow-md);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.lace-group-node--collapsed.lace-group-node--error {
|
|
19
|
+
border: 1px solid var(--lace-node-error-border);
|
|
20
|
+
box-shadow: 0 0 10px var(--lace-node-error-shadow-color);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.lace-group-node--expanded {
|
|
24
|
+
background: var(--lace-color-green-alpha-03);
|
|
25
|
+
border: 1px dashed var(--lace-color-green-alpha-18);
|
|
26
|
+
border-radius: var(--lace-radius-md);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.lace-group-node__header {
|
|
30
|
+
display: flex;
|
|
31
|
+
align-items: center;
|
|
32
|
+
gap: 6px;
|
|
33
|
+
padding: 0 6px 0 var(--lace-space-2);
|
|
34
|
+
border-top-left-radius: inherit;
|
|
35
|
+
border-top-right-radius: inherit;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.lace-group-node__header--collapsed {
|
|
39
|
+
background: var(--lace-color-group-collapsed-bg);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.lace-group-node__header--expanded {
|
|
43
|
+
background: var(--lace-color-teal-600-alpha-60);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.lace-group-node__collapse-btn {
|
|
47
|
+
display: flex;
|
|
48
|
+
align-items: center;
|
|
49
|
+
justify-content: center;
|
|
50
|
+
width: 12px;
|
|
51
|
+
height: 12px;
|
|
52
|
+
padding: 0;
|
|
53
|
+
background: none;
|
|
54
|
+
border: none;
|
|
55
|
+
color: var(--lace-color-green-alpha-60);
|
|
56
|
+
cursor: pointer;
|
|
57
|
+
line-height: 1;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.lace-group-node__rename-input {
|
|
61
|
+
flex: 1 1 auto;
|
|
62
|
+
min-width: 0;
|
|
63
|
+
padding: 1px var(--lace-space-1);
|
|
64
|
+
background: var(--lace-color-bg-canvas);
|
|
65
|
+
border: 1px solid var(--lace-color-accent-alpha-medium);
|
|
66
|
+
border-radius: var(--lace-radius-sm);
|
|
67
|
+
color: var(--lace-color-accent);
|
|
68
|
+
font-family: inherit;
|
|
69
|
+
font-size: var(--lace-font-size-sm);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.lace-group-node__label {
|
|
73
|
+
flex: 1 1 auto;
|
|
74
|
+
min-width: 0;
|
|
75
|
+
overflow: hidden;
|
|
76
|
+
white-space: nowrap;
|
|
77
|
+
text-overflow: ellipsis;
|
|
78
|
+
color: var(--lace-color-accent);
|
|
79
|
+
font-size: var(--lace-font-size-sm);
|
|
80
|
+
font-weight: var(--lace-font-weight-medium);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.lace-group-node__count {
|
|
84
|
+
flex-shrink: 0;
|
|
85
|
+
color: var(--lace-color-green-alpha-50);
|
|
86
|
+
font-size: 9px;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.lace-group-node__ungroup-btn {
|
|
90
|
+
display: flex;
|
|
91
|
+
align-items: center;
|
|
92
|
+
justify-content: center;
|
|
93
|
+
flex-shrink: 0;
|
|
94
|
+
width: 14px;
|
|
95
|
+
height: 14px;
|
|
96
|
+
padding: 0;
|
|
97
|
+
background: var(--lace-color-grey-fog-alpha-15);
|
|
98
|
+
border: 1px solid var(--lace-color-grey-fog-alpha-40);
|
|
99
|
+
border-radius: var(--lace-radius-pill);
|
|
100
|
+
color: var(--lace-color-grey-fog);
|
|
101
|
+
cursor: pointer;
|
|
102
|
+
line-height: 1;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.lace-group-node__pin-label {
|
|
106
|
+
max-width: 100%;
|
|
107
|
+
overflow: hidden;
|
|
108
|
+
white-space: nowrap;
|
|
109
|
+
text-overflow: ellipsis;
|
|
110
|
+
color: var(--lace-color-neutral-100-alpha-85);
|
|
111
|
+
font-size: var(--lace-font-size-xs);
|
|
112
|
+
}
|