@lace-cloud/canvas 0.28.0 → 0.30.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
@@ -175,7 +175,10 @@ const { ports, close } = await openEngineSession(caller, { root: '/path/to/autho
175
175
  dashboards): it fetches one Bundle snapshot and never changes —
176
176
  `unsaved`/`ungenerated`/`sourceRefused` are always false, `conflict` is
177
177
  always `null`, `diagnostics` is always empty, since a RunSnapshot has no live
178
- validator and the run's own certification already vouched for it.
178
+ validator and the run's own certification already vouched for it. A fetch
179
+ the server answers with a failure ends the stream `failed` with a
180
+ `SnapshotFetchError`, whose `status` is the answer's HTTP status: a host
181
+ words the failure by it, never by the message.
179
182
 
180
183
  ```ts
181
184
  import { snapshotSource } from '@lace-cloud/canvas';
@@ -17,15 +17,22 @@
17
17
  }
18
18
 
19
19
  /* A section head reads like a VS Code view section's: small capitals,
20
- * letter-spaced, muted until hovered, a chevron that turns as it opens. */
20
+ * letter-spaced, muted until hovered, a chevron that turns as it opens.
21
+ * It sticks to the top of the panel that scrolls it while its section is
22
+ * in view, so the controls on screen are always under their section's
23
+ * name, and paints the panel's surface so what scrolls under it is
24
+ * hidden. */
21
25
  .lace-accordion__header {
26
+ position: sticky;
27
+ top: 0;
28
+ z-index: 1;
22
29
  display: flex;
23
30
  align-items: center;
24
31
  gap: var(--lace-space-1);
25
32
  width: 100%;
26
33
  min-height: 32px;
27
34
  padding: var(--lace-space-1) var(--lace-space-4) var(--lace-space-1) var(--lace-space-3);
28
- background: transparent;
35
+ background: var(--lace-bg-surface);
29
36
  border: none;
30
37
  color: var(--lace-color-text-description);
31
38
  font-family: inherit;
@@ -0,0 +1,23 @@
1
+ /* A card's badge row (BadgeRow.tsx), standing on the card's top edge. A row
2
+ * wider than its card cuts its last chip's text with an ellipsis; each chip
3
+ * names its badge in full as its tooltip. */
4
+ .lace-badge-row {
5
+ position: absolute;
6
+ bottom: calc(100% + var(--lace-space-1));
7
+ left: 0;
8
+ display: flex;
9
+ gap: var(--lace-space-1);
10
+ max-width: 100%;
11
+ overflow: hidden;
12
+ }
13
+
14
+ .lace-badge-row__chip {
15
+ flex: 0 1 auto;
16
+ min-width: 0;
17
+ }
18
+
19
+ .lace-badge-row__text {
20
+ min-width: 0;
21
+ overflow: hidden;
22
+ text-overflow: ellipsis;
23
+ }
@@ -54,6 +54,17 @@
54
54
  background: var(--lace-color-danger-bg-soft);
55
55
  }
56
56
 
57
+ /* An item that cannot run yet keeps its place and its focus, so its
58
+ * tooltip can say why; it does not answer the pointer like one that can. */
59
+ .lace-ctx-menu__item[aria-disabled="true"] {
60
+ color: var(--lace-color-text-muted);
61
+ cursor: not-allowed;
62
+ }
63
+
64
+ .lace-ctx-menu__item[aria-disabled="true"]:hover {
65
+ background: transparent;
66
+ }
67
+
57
68
  .lace-ctx-menu__separator {
58
69
  height: 1px;
59
70
  margin: var(--lace-space-1) var(--lace-space-1);
@@ -8,7 +8,8 @@
8
8
  }
9
9
 
10
10
  /* A row: the severity's glyph in its tone, then the finding in the text
11
- * colour, where it is and the rule it breaks — identifiers, muted. The glyph
11
+ * colour, the file and line it is at, where it is in the graph and the rule
12
+ * it breaks — identifiers, muted. The glyph
12
13
  * holds its own column, so a row that wraps hangs under the message, never
13
14
  * under the glyph. */
14
15
  .lace-diagnostics-panel__row {
@@ -39,6 +40,7 @@
39
40
  color: var(--lace-color-text-primary);
40
41
  }
41
42
 
43
+ .lace-diagnostics-panel__file,
42
44
  .lace-diagnostics-panel__where,
43
45
  .lace-diagnostics-panel__code {
44
46
  color: var(--lace-color-text-muted);
@@ -157,41 +157,3 @@
157
157
  font-family: var(--lace-font-mono);
158
158
  font-size: var(--lace-font-size-xs);
159
159
  }
160
-
161
- /* Same chip shape ModuleNode's own badge row uses (ModuleNode.css) — a
162
- diagnostic addressed to this group's own scope, not any member's. */
163
- .lace-group-node__badges {
164
- position: absolute;
165
- top: -20px;
166
- left: 0;
167
- display: flex;
168
- gap: 4px;
169
- max-width: 100%;
170
- overflow: hidden;
171
- }
172
-
173
- .lace-group-node__badge {
174
- overflow: hidden;
175
- padding: 1px 6px;
176
- border-radius: var(--lace-radius-pill);
177
- white-space: nowrap;
178
- text-overflow: ellipsis;
179
- font-size: 9px;
180
- font-weight: var(--lace-font-weight-medium);
181
- line-height: 1.4;
182
- }
183
-
184
- .lace-group-node__badge--neutral {
185
- background: var(--lace-color-neutral-400);
186
- color: var(--lace-color-neutral-900);
187
- }
188
-
189
- .lace-group-node__badge--warn {
190
- background: var(--lace-color-amber-400);
191
- color: var(--lace-color-neutral-900);
192
- }
193
-
194
- .lace-group-node__badge--error {
195
- background: var(--lace-color-red-alpha-30);
196
- color: var(--lace-color-text-danger);
197
- }
@@ -25,6 +25,12 @@
25
25
  font-size: var(--lace-font-size-sm);
26
26
  }
27
27
 
28
+ /* The source the call reads, after the module's key: where the module's
29
+ * directory or address is, which the key alone does not say. */
30
+ .lace-mcp__module-source {
31
+ color: var(--lace-color-text-muted);
32
+ }
33
+
28
34
  .lace-mcp__title-eyebrow {
29
35
  color: var(--lace-color-text-muted);
30
36
  font-size: var(--lace-font-size-xs);
@@ -86,7 +86,7 @@
86
86
  }
87
87
 
88
88
  .lace-module-node__collapse-btn .lace-canvas-icon,
89
- .lace-module-node__delete-btn .lace-canvas-icon {
89
+ .lace-module-node__action .lace-canvas-icon {
90
90
  stroke-width: 2;
91
91
  }
92
92
 
@@ -129,7 +129,9 @@
129
129
  font-weight: var(--lace-font-weight-medium);
130
130
  }
131
131
 
132
- .lace-module-node__delete-btn {
132
+ /* A card's own control, drawn while the card is hovered: an action placed
133
+ * on the card (`card`), its glyph alone. */
134
+ .lace-module-node__action {
133
135
  display: flex;
134
136
  align-items: center;
135
137
  justify-content: center;
@@ -146,45 +148,21 @@
146
148
  line-height: 1;
147
149
  }
148
150
 
149
- .lace-module-node__delete-btn:hover {
150
- background: var(--lace-color-danger-bg-soft);
151
- color: var(--lace-color-danger-fg);
152
- }
153
-
154
- .lace-module-node__badges {
155
- position: absolute;
156
- top: -20px;
157
- left: 0;
158
- display: flex;
159
- gap: 4px;
160
- max-width: 100%;
161
- overflow: hidden;
162
- }
163
-
164
- .lace-module-node__badge {
165
- overflow: hidden;
166
- padding: 1px 6px;
167
- border-radius: var(--lace-radius-pill);
168
- white-space: nowrap;
169
- text-overflow: ellipsis;
170
- font-size: 9px;
171
- font-weight: var(--lace-font-weight-medium);
172
- line-height: 1.4;
173
- }
174
-
175
- .lace-module-node__badge--neutral {
176
- background: var(--lace-color-neutral-400);
177
- color: var(--lace-color-neutral-900);
151
+ .lace-module-node__action:hover:not([aria-disabled="true"]) {
152
+ background: var(--lace-icon-btn-hover);
153
+ color: var(--lace-color-text-primary);
178
154
  }
179
155
 
180
- .lace-module-node__badge--warn {
181
- background: var(--lace-color-amber-400);
182
- color: var(--lace-color-neutral-900);
156
+ .lace-module-node__action--danger:hover:not([aria-disabled="true"]) {
157
+ background: var(--lace-color-danger-bg-soft);
158
+ color: var(--lace-color-danger-fg);
183
159
  }
184
160
 
185
- .lace-module-node__badge--error {
186
- background: var(--lace-color-red-alpha-30);
187
- color: var(--lace-color-text-danger);
161
+ /* A control that cannot run, or is running: inert, keeping its focus so its
162
+ * tooltip says why. */
163
+ .lace-module-node__action[aria-disabled="true"] {
164
+ cursor: not-allowed;
165
+ opacity: 0.4;
188
166
  }
189
167
 
190
168
  .lace-module-node__body {