@lace-cloud/canvas 0.20.0 → 0.21.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.
Files changed (44) hide show
  1. package/README.md +3 -3
  2. package/dist/{AccordionSection-QHNIBNJT.css → AccordionSection-J3ALHB5M.css} +22 -12
  3. package/dist/{App-D7WF3TWZ.css → App-IFIOMNV7.css} +47 -33
  4. package/dist/Banner-4TSIKYLF.css +48 -0
  5. package/dist/{Canvas-J6F7YHEK.css → Canvas-JRY2HAY6.css} +0 -56
  6. package/dist/CanvasControls-L6Q2LX2P.css +47 -0
  7. package/dist/ContextMenu-C7SLX23S.css +74 -0
  8. package/dist/DiagnosticsPanel-T6VDHH4A.css +64 -0
  9. package/dist/Drawer-34ZYTEWE.css +62 -0
  10. package/dist/EdgeInspectorPanel-JD6CVUAT.css +45 -0
  11. package/dist/EmptyCanvas-QA2OV3T3.css +21 -0
  12. package/dist/GroupNode-QWSLBFCH.css +197 -0
  13. package/dist/Identifier-V6MZ37EG.css +4 -0
  14. package/dist/{ModuleConfigPanel-LZRL4F3Q.css → ModuleConfigPanel-LTPLEG2L.css} +29 -10
  15. package/dist/{ModuleNode-OJXMNOL3.css → ModuleNode-RRZ37SFM.css} +97 -27
  16. package/dist/PaperGrid-WFRL3N4P.css +25 -0
  17. package/dist/ToolbarAction-PQNWHJSU.css +36 -0
  18. package/dist/UpdateButton-TJKSFVBA.css +16 -0
  19. package/dist/{chunk-R4RA2QI7.mjs → chunk-W6U3TVQK.mjs} +106 -110
  20. package/dist/chunk-W6U3TVQK.mjs.map +1 -0
  21. package/dist/engine/index.cjs +83 -104
  22. package/dist/engine/index.cjs.map +1 -1
  23. package/dist/engine/index.d.mts +3 -5
  24. package/dist/engine/index.d.ts +3 -5
  25. package/dist/engine/index.mjs +1 -3
  26. package/dist/icons-SBZCWI5T.css +14 -0
  27. package/dist/index.cjs +10710 -10373
  28. package/dist/index.cjs.map +1 -1
  29. package/dist/index.d.mts +35 -25
  30. package/dist/index.d.ts +35 -25
  31. package/dist/index.mjs +3026 -2641
  32. package/dist/index.mjs.map +1 -1
  33. package/dist/{mapping-ChSnv11V.d.mts → mapping-CopjG8Ae.d.mts} +59 -51
  34. package/dist/{mapping-ChSnv11V.d.ts → mapping-CopjG8Ae.d.ts} +59 -51
  35. package/dist/{panels-shared-OFOUQSUT.css → panels-shared-5JFNYXQ7.css} +47 -66
  36. package/package.json +3 -3
  37. package/dist/ConflictBanner-4V5K2QNU.css +0 -44
  38. package/dist/ContextMenu-EAQFLI5L.css +0 -46
  39. package/dist/DiagnosticsPanel-HB3JQYSY.css +0 -39
  40. package/dist/EdgeInspectorPanel-D536U5MZ.css +0 -54
  41. package/dist/GroupNode-XSB4OKGK.css +0 -150
  42. package/dist/Markers-XLREDZNM.css +0 -16
  43. package/dist/SourceRefusedBanner-5PXHEDHT.css +0 -23
  44. package/dist/chunk-R4RA2QI7.mjs.map +0 -1
@@ -3,15 +3,24 @@
3
3
  * ad-hoc Tailwind class strings for these.
4
4
  *
5
5
  * Input fields, mode toggles, and buttons inside config panels adopt
6
- * @lace-cloud/ui primitives (Input, ModeToggle, Button) — not replicated here. */
7
-
6
+ * @lace-cloud/ui primitives (Input, ModeToggle, Button) — not replicated here.
7
+ *
8
+ * A panel's content fits the column the canvas gives it (260 px for the
9
+ * settings panel, 300 px for an inspector): the frame breaks long
10
+ * identifiers anywhere (`overflow-wrap: anywhere` on @lace-cloud/ui's
11
+ * `.lace-panel`, inherited), every row of controls wraps, and a row's
12
+ * children may shrink below their content's width. */
13
+
14
+ /* A heading inside a section (Interface > Inputs, Outputs): the same small
15
+ * capitals as the section heads (AccordionSection.css), so the drawer has
16
+ * one heading style. */
8
17
  .lace-panel-section-title {
9
- margin: 0 0 var(--lace-space-3);
10
- font-size: var(--lace-font-size-lg);
18
+ margin: var(--lace-space-4) 0 var(--lace-space-2);
19
+ color: var(--lace-color-text-description);
20
+ font-size: var(--lace-font-size-sm);
11
21
  font-weight: var(--lace-font-weight-bold);
12
22
  text-transform: uppercase;
13
- letter-spacing: 0.04em;
14
- opacity: 0.85;
23
+ letter-spacing: 0.06em;
15
24
  }
16
25
 
17
26
  .lace-panel-row-card {
@@ -30,10 +39,24 @@
30
39
  padding: var(--lace-space-3);
31
40
  }
32
41
 
42
+ /* A card's name: the identifier the card describes (an input of the
43
+ * module's interface). */
44
+ .lace-panel-row-card__name {
45
+ color: var(--lace-color-text-primary);
46
+ font-size: var(--lace-font-size-md);
47
+ font-weight: var(--lace-font-weight-semibold);
48
+ }
49
+
33
50
  .lace-panel-row-actions {
34
51
  display: flex;
52
+ flex-wrap: wrap;
35
53
  align-items: center;
36
54
  gap: var(--lace-space-2);
55
+ min-width: 0;
56
+ }
57
+
58
+ .lace-panel-row-actions > * {
59
+ min-width: 0;
37
60
  }
38
61
 
39
62
  .lace-panel-row-actions--stacked {
@@ -41,49 +64,6 @@
41
64
  align-items: stretch;
42
65
  }
43
66
 
44
- .lace-panel-remove-btn {
45
- padding: 0 var(--lace-space-2);
46
- background: transparent;
47
- border: none;
48
- color: var(--lace-color-text-danger);
49
- font-family: inherit;
50
- font-size: var(--lace-font-size-md);
51
- cursor: pointer;
52
- white-space: nowrap;
53
- transition: color var(--lace-duration-fast) var(--lace-easing-standard);
54
- }
55
-
56
- .lace-panel-remove-btn--sm {
57
- padding: 0 6px;
58
- font-size: var(--lace-font-size-xs);
59
- }
60
-
61
- .lace-panel-remove-btn:hover {
62
- color: var(--lace-color-text-danger-soft);
63
- }
64
-
65
- .lace-panel-add-btn {
66
- margin-bottom: var(--lace-space-4);
67
- padding: 0;
68
- background: transparent;
69
- border: none;
70
- color: var(--lace-color-text-link);
71
- font-family: inherit;
72
- font-size: var(--lace-font-size-md);
73
- cursor: pointer;
74
- transition: opacity var(--lace-duration-fast) var(--lace-easing-standard);
75
- }
76
-
77
- .lace-panel-add-btn--sm {
78
- margin-top: var(--lace-space-1);
79
- margin-bottom: 0;
80
- font-size: var(--lace-font-size-xs);
81
- }
82
-
83
- .lace-panel-add-btn:hover {
84
- opacity: 0.85;
85
- }
86
-
87
67
  .lace-panel-hint {
88
68
  margin-bottom: var(--lace-space-4);
89
69
  color: var(--lace-color-text-muted);
@@ -91,12 +71,15 @@
91
71
  line-height: var(--lace-line-height-normal);
92
72
  }
93
73
 
74
+ /* A field's name is the input's identifier, in monospace like every
75
+ * identifier the canvas shows. */
94
76
  .lace-panel-row-label {
95
77
  display: block;
96
- margin-bottom: 6px;
97
- color: var(--lace-color-text-label);
78
+ margin-bottom: 2px;
79
+ color: var(--lace-color-text-primary);
80
+ font-family: var(--lace-font-mono);
98
81
  font-size: var(--lace-font-size-md);
99
- font-weight: var(--lace-font-weight-semibold);
82
+ font-weight: var(--lace-font-weight-medium);
100
83
  }
101
84
 
102
85
  .lace-panel-field {
@@ -124,8 +107,9 @@
124
107
 
125
108
  .lace-panel-row-sublabel {
126
109
  margin-bottom: 6px;
127
- font-size: var(--lace-font-size-sm);
128
- opacity: 0.7;
110
+ color: var(--lace-text-label);
111
+ font-size: var(--lace-font-size-md);
112
+ font-weight: var(--lace-font-weight-semibold);
129
113
  }
130
114
 
131
115
  /* Checkbox row used by panel rows that gate behavior on a single
@@ -139,17 +123,14 @@
139
123
  cursor: pointer;
140
124
  }
141
125
 
142
- .lace-panel-checkbox-row__source {
143
- font-family: var(--lace-font-family-mono);
144
- }
145
-
146
126
  /* Sub-section label inside a row card (Interface > Inputs validation,
147
- * Interface > Outputs depends_on). Lighter than the section title. */
127
+ * Interface > Outputs depends_on): the field-label style ui's Input and
128
+ * Textarea draw their own labels in. */
148
129
  .lace-panel-subsection-label {
149
- margin-bottom: 4px;
150
- font-size: var(--lace-font-size-xs);
151
- font-weight: 600;
152
- opacity: 0.7;
130
+ margin-bottom: 6px;
131
+ color: var(--lace-text-label);
132
+ font-size: var(--lace-font-size-md);
133
+ font-weight: var(--lace-font-weight-semibold);
153
134
  }
154
135
 
155
136
  /* One custom validation {} block: condition + error_message inputs and a
@@ -165,7 +146,7 @@
165
146
 
166
147
  /* Read-only depends_on reference chip (portal / inspection mode). */
167
148
  .lace-panel-depends-item {
168
- font-family: var(--lace-font-family-mono);
169
- font-size: var(--lace-font-size-xs);
170
- opacity: 0.85;
149
+ font-family: var(--lace-font-mono);
150
+ font-size: var(--lace-font-size-sm);
151
+ color: var(--lace-color-text-label);
171
152
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lace-cloud/canvas",
3
- "version": "0.20.0",
3
+ "version": "0.21.0",
4
4
  "license": "BUSL-1.1",
5
5
  "main": "./dist/index.cjs",
6
6
  "types": "./dist/index.d.ts",
@@ -23,8 +23,8 @@
23
23
  "react": "^18.3.1",
24
24
  "react-dom": "^18.3.1",
25
25
  "zod": "^4.1.11",
26
- "@lace-cloud/proto": "0.20.0",
27
- "@lace-cloud/ui": "0.20.0"
26
+ "@lace-cloud/proto": "0.21.0",
27
+ "@lace-cloud/ui": "0.21.0"
28
28
  },
29
29
  "devDependencies": {
30
30
  "@types/react": "^18.3.12",
@@ -1,44 +0,0 @@
1
- /* ConflictBanner — shown when the tf changed under an unsaved or
2
- * ungenerated working IR and needs Keep or Reload (see
3
- * docs/developer/proto.md "The save/generate contract"). Keep resolves the
4
- * conflict onto the current tree hash; Reload discards the working IR and
5
- * re-parses the tree. */
6
-
7
- .lace-conflict-banner {
8
- position: absolute;
9
- top: var(--lace-space-4);
10
- left: var(--lace-space-4);
11
- z-index: var(--lace-z-chrome);
12
- display: inline-flex;
13
- align-items: center;
14
- gap: var(--lace-space-2);
15
- padding: var(--lace-space-1) var(--lace-space-3);
16
- background: var(--lace-toast-error-bg);
17
- border: 1px solid var(--lace-toast-error-border);
18
- border-radius: var(--lace-radius-md);
19
- color: var(--lace-color-text-danger-soft);
20
- font-size: var(--lace-font-size-md);
21
- line-height: var(--lace-line-height-tight);
22
- box-shadow: var(--lace-shadow-sm);
23
- }
24
-
25
- .lace-conflict-banner__message {
26
- white-space: nowrap;
27
- }
28
-
29
- .lace-conflict-banner__conflict-keep,
30
- .lace-conflict-banner__conflict-reload {
31
- padding: 1px 7px;
32
- background: var(--lace-color-red-alpha-12);
33
- border: 1px solid var(--lace-color-red-alpha-30);
34
- border-radius: var(--lace-radius-sm);
35
- color: var(--lace-color-text-danger-soft);
36
- font-size: var(--lace-font-size-sm);
37
- cursor: pointer;
38
- transition: background var(--lace-duration-fast) var(--lace-easing-standard);
39
- }
40
-
41
- .lace-conflict-banner__conflict-keep:hover,
42
- .lace-conflict-banner__conflict-reload:hover {
43
- background: var(--lace-color-red-alpha-20);
44
- }
@@ -1,46 +0,0 @@
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
- }
@@ -1,39 +0,0 @@
1
- .lace-diagnostics-panel {
2
- list-style: none;
3
- margin: 0;
4
- padding: var(--lace-space-2);
5
- display: flex;
6
- flex-direction: column;
7
- gap: var(--lace-space-1);
8
- }
9
-
10
- .lace-diagnostics-panel__message {
11
- font: inherit;
12
- color: inherit;
13
- }
14
-
15
- .lace-diagnostics-panel__code {
16
- margin-left: var(--lace-space-2);
17
- font: inherit;
18
- color: inherit;
19
- }
20
-
21
- .lace-diagnostics-panel__action {
22
- background: none;
23
- border: none;
24
- padding: 0;
25
- margin-left: var(--lace-space-2);
26
- text-align: left;
27
- cursor: pointer;
28
- font: inherit;
29
- color: inherit;
30
- text-decoration: underline;
31
- }
32
-
33
- .lace-diagnostics-panel__row--error .lace-diagnostics-panel__message {
34
- color: var(--lace-color-text-danger);
35
- }
36
-
37
- .lace-diagnostics-panel__row--warning .lace-diagnostics-panel__message {
38
- color: var(--lace-color-warning-fg);
39
- }
@@ -1,54 +0,0 @@
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
- }
@@ -1,150 +0,0 @@
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
- }
113
-
114
- /* Same chip shape ModuleNode's own badge row uses (ModuleNode.css) — a
115
- diagnostic addressed to this group's own scope, not any member's. */
116
- .lace-group-node__badges {
117
- position: absolute;
118
- top: -20px;
119
- left: 0;
120
- display: flex;
121
- gap: 4px;
122
- max-width: 100%;
123
- overflow: hidden;
124
- }
125
-
126
- .lace-group-node__badge {
127
- overflow: hidden;
128
- padding: 1px 6px;
129
- border-radius: var(--lace-radius-pill);
130
- white-space: nowrap;
131
- text-overflow: ellipsis;
132
- font-size: 9px;
133
- font-weight: var(--lace-font-weight-medium);
134
- line-height: 1.4;
135
- }
136
-
137
- .lace-group-node__badge--neutral {
138
- background: var(--lace-color-neutral-400);
139
- color: var(--lace-color-neutral-900);
140
- }
141
-
142
- .lace-group-node__badge--warn {
143
- background: var(--lace-color-amber-400);
144
- color: var(--lace-color-neutral-900);
145
- }
146
-
147
- .lace-group-node__badge--error {
148
- background: var(--lace-color-red-alpha-30);
149
- color: var(--lace-color-text-danger);
150
- }
@@ -1,16 +0,0 @@
1
- /* The two quiet toolbar status markers (Unsaved, Not generated) — plain
2
- * text, no banner chrome; the conflict and source-refused facts get the
3
- * attention-grabbing banner treatment instead. */
4
-
5
- .lace-marker {
6
- display: inline-flex;
7
- align-items: center;
8
- padding: 0 var(--lace-space-2);
9
- font-size: var(--lace-font-size-sm);
10
- color: var(--lace-color-text-muted);
11
- white-space: nowrap;
12
- }
13
-
14
- .lace-marker--unsaved {
15
- color: var(--lace-color-text-danger-soft);
16
- }
@@ -1,23 +0,0 @@
1
- /* SourceRefusedBanner — shown while the open tf is refused: the engine
2
- * locks every edit, undo, redo, save, generate and conflict Keep/Reload
3
- * until a fix lands. ConflictBanner still renders independently over
4
- * `view.conflict` — the conflict stays visible, its Keep/Reload row just
5
- * isn't resolvable. */
6
-
7
- .lace-source-refused-banner {
8
- position: absolute;
9
- top: var(--lace-space-4);
10
- left: var(--lace-space-4);
11
- z-index: var(--lace-z-chrome);
12
- display: flex;
13
- flex-direction: column;
14
- gap: var(--lace-space-2);
15
- padding: var(--lace-space-2) var(--lace-space-3);
16
- background: var(--lace-toast-error-bg);
17
- border: 1px solid var(--lace-toast-error-border);
18
- border-radius: var(--lace-radius-md);
19
- color: var(--lace-color-text-danger-soft);
20
- font-size: var(--lace-font-size-md);
21
- line-height: var(--lace-line-height-tight);
22
- box-shadow: var(--lace-shadow-sm);
23
- }