@lace-cloud/canvas 0.35.0 → 0.37.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -156,7 +156,12 @@ const { ports, close } = await openEngineSession(caller, { root: '/path/to/autho
156
156
  `Initialize` once, `Invoke` per command, no session and no Subscribe.
157
157
  - Both mappings name the protocol version this package speaks
158
158
  (`ENGINE_PROTOCOL_VERSION`, `@lace-cloud/proto`) on `Initialize`; an
159
- engine that speaks another refuses the call.
159
+ engine that speaks another refuses the call. Each checks the answer's
160
+ protocol version and contract against `ENGINE_PROTOCOL_VERSION` and
161
+ `ENGINE_CONTRACT` (`checkEngineIdentity`) and rejects with
162
+ `EngineIdentityMismatchError` before any other call when either differs,
163
+ so an engine built from another tree is refused before a command path is
164
+ bound or a document parsed.
160
165
  - Every `Invoke` names the one working directory its command runs in, as
161
166
  a terminal invocation has one, and no session: the engine takes the
162
167
  Workspace of the session it holds open on that directory when there is
@@ -19,10 +19,29 @@
19
19
  * The shared rules cover geometry and hover/connecting states. */
20
20
 
21
21
  .lace-pin-handle {
22
+ border-width: 1.5px;
22
23
  border-radius: var(--lace-radius-pill);
23
24
  transition: transform var(--lace-duration-fast) var(--lace-easing-standard);
24
25
  }
25
26
 
27
+ /* A finding on the pin: a thicker ring in its tone's colour (ModuleNode.tsx), outlined by tone
28
+ * where the high-contrast themes need a shape. */
29
+ .lace-pin-handle[data-problem] {
30
+ border-width: 2px;
31
+ }
32
+
33
+ .lace-pin-handle[data-problem="error"] {
34
+ outline: var(--lace-pin-problem-outline-width) var(--lace-pin-error-outline-style)
35
+ var(--lace-node-error-border);
36
+ outline-offset: 1px;
37
+ }
38
+
39
+ .lace-pin-handle[data-problem="warn"] {
40
+ outline: var(--lace-pin-problem-outline-width) var(--lace-pin-warn-outline-style)
41
+ var(--lace-node-error-border);
42
+ outline-offset: 1px;
43
+ }
44
+
26
45
  .lace-pin-handle:hover {
27
46
  transform: scale(1.25);
28
47
  }
@@ -56,7 +75,19 @@
56
75
 
57
76
  .react-flow__edge:hover .react-flow__edge-path {
58
77
  stroke: var(--lace-canvas-edge-stroke-selected);
59
- stroke-width: 2px;
78
+ stroke-width: var(--lace-canvas-edge-stroke-width-hover);
79
+ }
80
+
81
+ .react-flow__connection-path {
82
+ stroke: var(--lace-canvas-connection-stroke);
83
+ }
84
+
85
+ /* Forced colours replace a pin's fill and ring alike, which would draw a wired pin (filled)
86
+ * as an unwired one (ringed). The handle keeps its own colours; its labels do not. */
87
+ @media (forced-colors: active) {
88
+ .lace-pin-handle {
89
+ forced-color-adjust: none;
90
+ }
60
91
  }
61
92
 
62
93
  /* ── Slide panel ── */
@@ -22,6 +22,10 @@
22
22
  stroke-width: 2;
23
23
  }
24
24
 
25
+ :where(.lace-card-action:hover:not([aria-disabled="true"])) {
26
+ outline: var(--lace-hover-outline);
27
+ }
28
+
25
29
  .lace-card-action:hover:not([aria-disabled="true"]) {
26
30
  background: var(--lace-icon-btn-hover);
27
31
  color: var(--lace-color-text-primary);
@@ -42,7 +42,7 @@
42
42
  .lace-ctx-menu__item:hover,
43
43
  .lace-ctx-menu__item:focus-visible {
44
44
  background: var(--lace-color-accent-alpha-medium);
45
- outline: none;
45
+ outline: var(--lace-hover-outline);
46
46
  }
47
47
 
48
48
  .lace-ctx-menu__item--danger {
@@ -22,7 +22,10 @@
22
22
  }
23
23
 
24
24
  .lace-group-node--collapsed.lace-group-node--error {
25
- border: 1px solid var(--lace-node-error-border);
25
+ border-width: var(--lace-node-error-border-width);
26
+ border-style: var(--lace-node-error-border-style);
27
+ border-color: var(--lace-node-error-border);
28
+ margin: calc(1px - var(--lace-node-error-border-width));
26
29
  box-shadow: 0 0 10px var(--lace-node-error-shadow-color);
27
30
  }
28
31
 
@@ -33,13 +36,19 @@
33
36
  }
34
37
 
35
38
  .react-flow__node.selected > .lace-group-node {
36
- outline: 1.5px solid var(--lace-node-selected-ring);
39
+ outline: var(--lace-node-selected-ring-width) solid var(--lace-node-selected-ring);
37
40
  outline-offset: 2px;
38
41
  }
39
42
 
40
43
  .react-flow__node:focus-visible > .lace-group-node {
41
- outline: 2px solid var(--lace-color-focus-ring);
42
- outline-offset: 2px;
44
+ outline: 2px var(--lace-node-focus-ring-style) var(--lace-color-focus-ring);
45
+ outline-offset: var(--lace-node-focus-ring-offset);
46
+ }
47
+
48
+ .react-flow__node.selected:focus-visible > .lace-group-node {
49
+ outline: var(--lace-node-selected-focus-ring-width) var(--lace-node-selected-focus-ring-style)
50
+ var(--lace-color-focus-ring);
51
+ outline-offset: var(--lace-node-focus-ring-offset);
43
52
  }
44
53
 
45
54
  .lace-group-node__header {
@@ -114,7 +123,7 @@
114
123
  min-width: 0;
115
124
  padding: 1px var(--lace-space-1);
116
125
  background: var(--lace-color-bg-input);
117
- border: 1px solid var(--lace-color-accent-alpha-medium);
126
+ border: 1px solid var(--lace-node-rename-border);
118
127
  border-radius: var(--lace-radius-sm);
119
128
  color: var(--lace-group-chip-text);
120
129
  font-family: var(--lace-font-mono);
@@ -19,7 +19,7 @@
19
19
  }
20
20
 
21
21
  .react-flow__node.selected > .lace-module-node {
22
- outline: 1.5px solid var(--lace-node-selected-ring);
22
+ outline: var(--lace-node-selected-ring-width) solid var(--lace-node-selected-ring);
23
23
  outline-offset: 2px;
24
24
  }
25
25
 
@@ -28,17 +28,33 @@
28
28
  }
29
29
 
30
30
  .react-flow__node:focus-visible > .lace-module-node {
31
- outline: 2px solid var(--lace-color-focus-ring);
32
- outline-offset: 2px;
31
+ outline: 2px var(--lace-node-focus-ring-style) var(--lace-color-focus-ring);
32
+ outline-offset: var(--lace-node-focus-ring-offset);
33
+ }
34
+
35
+ /* A selected card focused by key keeps both cues: the focus rule above would otherwise
36
+ * replace the selected ring. */
37
+ .react-flow__node.selected:focus-visible > .lace-module-node {
38
+ outline: var(--lace-node-selected-focus-ring-width) var(--lace-node-selected-focus-ring-style)
39
+ var(--lace-color-focus-ring);
40
+ outline-offset: var(--lace-node-focus-ring-offset);
33
41
  }
34
42
 
43
+ /* A state border wider than the card's 1px pulls its margin in by the difference, so the
44
+ * header and pins stay where the geometry puts them. */
35
45
  .lace-module-node--error {
46
+ border-width: var(--lace-node-error-border-width);
47
+ border-style: var(--lace-node-error-border-style);
36
48
  border-color: var(--lace-node-error-border);
49
+ margin: calc(1px - var(--lace-node-error-border-width));
37
50
  box-shadow: 0 0 10px var(--lace-node-error-shadow-color);
38
51
  }
39
52
 
40
53
  .lace-module-node--new {
54
+ border-width: var(--lace-node-new-border-width);
55
+ border-style: var(--lace-node-new-border-style);
41
56
  border-color: var(--lace-node-new-border);
57
+ margin: calc(1px - var(--lace-node-new-border-width));
42
58
  box-shadow: 0 0 10px var(--lace-node-new-shadow-color);
43
59
  }
44
60
 
@@ -107,7 +123,7 @@
107
123
  min-width: 0;
108
124
  padding: 1px var(--lace-space-1);
109
125
  background: var(--lace-color-bg-canvas);
110
- border: 1px solid var(--lace-color-accent-alpha-medium);
126
+ border: 1px solid var(--lace-node-rename-border);
111
127
  border-radius: var(--lace-radius-sm);
112
128
  color: var(--lace-node-name);
113
129
  font-family: var(--lace-font-mono);
@@ -191,19 +207,3 @@
191
207
  .lace-module-node__grip:focus-visible {
192
208
  opacity: 1;
193
209
  }
194
-
195
- /* The card as the drop area for that drag: invisible, outlined while a drag
196
- * held over it would connect. */
197
- .react-flow__handle.lace-module-node__drop {
198
- inset: 0;
199
- width: auto;
200
- height: auto;
201
- background: none;
202
- border: none;
203
- border-radius: inherit;
204
- transform: none;
205
- }
206
-
207
- .react-flow__handle.lace-module-node__drop.connectingto.valid {
208
- outline: 2px solid var(--lace-color-accent);
209
- }
@@ -0,0 +1,15 @@
1
+ /* The card as the drop area for a node-to-node drag: invisible, outlined
2
+ * while a drag held over it would connect. */
3
+ .react-flow__handle.lace-node-drop {
4
+ inset: 0;
5
+ width: auto;
6
+ height: auto;
7
+ background: none;
8
+ border: none;
9
+ border-radius: inherit;
10
+ transform: none;
11
+ }
12
+
13
+ .react-flow__handle.lace-node-drop.connectingto.valid {
14
+ outline: var(--lace-node-drop-outline);
15
+ }