@lace-cloud/canvas 0.36.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/dist/{Canvas-VQQEZSPA.css → Canvas-UTKLP6WI.css} +32 -1
- package/dist/{CardActions-QLTNQUVW.css → CardActions-ORDC2L5Y.css} +4 -0
- package/dist/{ContextMenu-S3JIZMET.css → ContextMenu-P457V6QE.css} +1 -1
- package/dist/{GroupNode-NJOGOGQM.css → GroupNode-2IGAUA6V.css} +14 -5
- package/dist/{ModuleNode-LPPBJZCD.css → ModuleNode-3GTXKKVQ.css} +20 -20
- package/dist/NodeDropTarget-H5L3NZS6.css +15 -0
- package/dist/{chunk-XPHDFIKV.mjs → chunk-45ZS7XCZ.mjs} +190 -24
- package/dist/chunk-45ZS7XCZ.mjs.map +1 -0
- package/dist/engine/index.cjs +164 -23
- package/dist/engine/index.cjs.map +1 -1
- package/dist/engine/index.d.mts +21 -5
- package/dist/engine/index.d.ts +21 -5
- package/dist/engine/index.mjs +7 -3
- package/dist/index.cjs +1422 -891
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +51 -19
- package/dist/index.d.ts +51 -19
- package/dist/index.mjs +864 -490
- package/dist/index.mjs.map +1 -1
- package/dist/{registry-Bflzqecd.d.mts → registry-4-XX1MRe.d.mts} +63 -6
- package/dist/{registry-Bflzqecd.d.ts → registry-4-XX1MRe.d.ts} +63 -6
- package/package.json +5 -5
- package/dist/chunk-XPHDFIKV.mjs.map +0 -1
|
@@ -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:
|
|
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);
|
|
@@ -22,7 +22,10 @@
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
.lace-group-node--collapsed.lace-group-node--error {
|
|
25
|
-
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:
|
|
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
|
|
42
|
-
outline-offset:
|
|
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-
|
|
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:
|
|
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
|
|
32
|
-
outline-offset:
|
|
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-
|
|
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
|
+
}
|
|
@@ -492,6 +492,7 @@ var Reason = /* @__PURE__ */ ((Reason3) => {
|
|
|
492
492
|
Reason3[Reason3["REASON_IMPORT_UNDECLARED"] = 20] = "REASON_IMPORT_UNDECLARED";
|
|
493
493
|
Reason3[Reason3["REASON_ALREADY_IMPORTED"] = 21] = "REASON_ALREADY_IMPORTED";
|
|
494
494
|
Reason3[Reason3["REASON_NO_LOCKFILE"] = 22] = "REASON_NO_LOCKFILE";
|
|
495
|
+
Reason3[Reason3["REASON_NO_COMMIT"] = 23] = "REASON_NO_COMMIT";
|
|
495
496
|
Reason3[Reason3["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
496
497
|
return Reason3;
|
|
497
498
|
})(Reason || {});
|
|
@@ -566,6 +567,9 @@ function reasonFromJSON(object) {
|
|
|
566
567
|
case 22:
|
|
567
568
|
case "REASON_NO_LOCKFILE":
|
|
568
569
|
return 22 /* REASON_NO_LOCKFILE */;
|
|
570
|
+
case 23:
|
|
571
|
+
case "REASON_NO_COMMIT":
|
|
572
|
+
return 23 /* REASON_NO_COMMIT */;
|
|
569
573
|
case -1:
|
|
570
574
|
case "UNRECOGNIZED":
|
|
571
575
|
default:
|
|
@@ -620,6 +624,8 @@ function reasonToJSON(object) {
|
|
|
620
624
|
return "REASON_ALREADY_IMPORTED";
|
|
621
625
|
case 22 /* REASON_NO_LOCKFILE */:
|
|
622
626
|
return "REASON_NO_LOCKFILE";
|
|
627
|
+
case 23 /* REASON_NO_COMMIT */:
|
|
628
|
+
return "REASON_NO_COMMIT";
|
|
623
629
|
case -1 /* UNRECOGNIZED */:
|
|
624
630
|
default:
|
|
625
631
|
return "UNRECOGNIZED";
|
|
@@ -9300,7 +9306,7 @@ var BundleApplyResult = {
|
|
|
9300
9306
|
}
|
|
9301
9307
|
};
|
|
9302
9308
|
function createBaseCreatedRef() {
|
|
9303
|
-
return { scope: "", id: "", module_key: "", source_id: "" };
|
|
9309
|
+
return { scope: "", id: "", module_key: "", source_id: "", group_id: "" };
|
|
9304
9310
|
}
|
|
9305
9311
|
var CreatedRef = {
|
|
9306
9312
|
encode(message, writer = new BinaryWriter4()) {
|
|
@@ -9316,6 +9322,9 @@ var CreatedRef = {
|
|
|
9316
9322
|
if (message.source_id !== "") {
|
|
9317
9323
|
writer.uint32(34).string(message.source_id);
|
|
9318
9324
|
}
|
|
9325
|
+
if (message.group_id !== "") {
|
|
9326
|
+
writer.uint32(42).string(message.group_id);
|
|
9327
|
+
}
|
|
9319
9328
|
return writer;
|
|
9320
9329
|
},
|
|
9321
9330
|
decode(input, length) {
|
|
@@ -9353,6 +9362,13 @@ var CreatedRef = {
|
|
|
9353
9362
|
message.source_id = reader.string();
|
|
9354
9363
|
continue;
|
|
9355
9364
|
}
|
|
9365
|
+
case 5: {
|
|
9366
|
+
if (tag !== 42) {
|
|
9367
|
+
break;
|
|
9368
|
+
}
|
|
9369
|
+
message.group_id = reader.string();
|
|
9370
|
+
continue;
|
|
9371
|
+
}
|
|
9356
9372
|
}
|
|
9357
9373
|
if ((tag & 7) === 4 || tag === 0) {
|
|
9358
9374
|
break;
|
|
@@ -9366,7 +9382,8 @@ var CreatedRef = {
|
|
|
9366
9382
|
scope: isSet3(object.scope) ? globalThis.String(object.scope) : "",
|
|
9367
9383
|
id: isSet3(object.id) ? globalThis.String(object.id) : "",
|
|
9368
9384
|
module_key: isSet3(object.moduleKey) ? globalThis.String(object.moduleKey) : isSet3(object.module_key) ? globalThis.String(object.module_key) : "",
|
|
9369
|
-
source_id: isSet3(object.sourceId) ? globalThis.String(object.sourceId) : isSet3(object.source_id) ? globalThis.String(object.source_id) : ""
|
|
9385
|
+
source_id: isSet3(object.sourceId) ? globalThis.String(object.sourceId) : isSet3(object.source_id) ? globalThis.String(object.source_id) : "",
|
|
9386
|
+
group_id: isSet3(object.groupId) ? globalThis.String(object.groupId) : isSet3(object.group_id) ? globalThis.String(object.group_id) : ""
|
|
9370
9387
|
};
|
|
9371
9388
|
},
|
|
9372
9389
|
toJSON(message) {
|
|
@@ -9383,6 +9400,9 @@ var CreatedRef = {
|
|
|
9383
9400
|
if (message.source_id !== "") {
|
|
9384
9401
|
obj.sourceId = message.source_id;
|
|
9385
9402
|
}
|
|
9403
|
+
if (message.group_id !== "") {
|
|
9404
|
+
obj.groupId = message.group_id;
|
|
9405
|
+
}
|
|
9386
9406
|
return obj;
|
|
9387
9407
|
},
|
|
9388
9408
|
create(base) {
|
|
@@ -9394,6 +9414,7 @@ var CreatedRef = {
|
|
|
9394
9414
|
message.id = object.id ?? "";
|
|
9395
9415
|
message.module_key = object.module_key ?? "";
|
|
9396
9416
|
message.source_id = object.source_id ?? "";
|
|
9417
|
+
message.group_id = object.group_id ?? "";
|
|
9397
9418
|
return message;
|
|
9398
9419
|
}
|
|
9399
9420
|
};
|
|
@@ -12274,6 +12295,27 @@ var COMMANDS = {
|
|
|
12274
12295
|
"hidden": false,
|
|
12275
12296
|
"yes": false
|
|
12276
12297
|
},
|
|
12298
|
+
"stack validate": {
|
|
12299
|
+
"path": "stack validate",
|
|
12300
|
+
"positionals": [],
|
|
12301
|
+
"flags": {
|
|
12302
|
+
"output": {
|
|
12303
|
+
"type": "string",
|
|
12304
|
+
"values": [
|
|
12305
|
+
"table",
|
|
12306
|
+
"json"
|
|
12307
|
+
],
|
|
12308
|
+
"short": "o"
|
|
12309
|
+
},
|
|
12310
|
+
"source": {
|
|
12311
|
+
"type": "string",
|
|
12312
|
+
"required": true
|
|
12313
|
+
}
|
|
12314
|
+
},
|
|
12315
|
+
"effect": "read",
|
|
12316
|
+
"hidden": false,
|
|
12317
|
+
"yes": false
|
|
12318
|
+
},
|
|
12277
12319
|
"team current": {
|
|
12278
12320
|
"path": "team current",
|
|
12279
12321
|
"positionals": [],
|
|
@@ -13082,6 +13124,7 @@ var SCHEMAS = {
|
|
|
13082
13124
|
"stack destroy": runEventSchema,
|
|
13083
13125
|
"drift scan": driftScanSchema,
|
|
13084
13126
|
"stack create": stackSchema,
|
|
13127
|
+
"stack validate": stackSourceSchema,
|
|
13085
13128
|
"module import": moduleImportSchema,
|
|
13086
13129
|
"run get": runSchema,
|
|
13087
13130
|
"run plan": runPlanSchema,
|
|
@@ -13507,7 +13550,13 @@ function convertGraphError(e) {
|
|
|
13507
13550
|
};
|
|
13508
13551
|
}
|
|
13509
13552
|
function convertCreatedRef(r) {
|
|
13510
|
-
return {
|
|
13553
|
+
return {
|
|
13554
|
+
scope: r.scope,
|
|
13555
|
+
id: r.id,
|
|
13556
|
+
moduleKey: r.module_key,
|
|
13557
|
+
sourceId: r.source_id,
|
|
13558
|
+
groupId: r.group_id
|
|
13559
|
+
};
|
|
13511
13560
|
}
|
|
13512
13561
|
|
|
13513
13562
|
// src/utils/counted.ts
|
|
@@ -13748,6 +13797,14 @@ function failureSays(error) {
|
|
|
13748
13797
|
}
|
|
13749
13798
|
return { message: error instanceof Error ? error.message : String(error) };
|
|
13750
13799
|
}
|
|
13800
|
+
function notifyFailure(presenter, error, label) {
|
|
13801
|
+
const { message, failure } = failureSays(error);
|
|
13802
|
+
presenter.notify(
|
|
13803
|
+
"error",
|
|
13804
|
+
label ? `${label}: ${message}` : message,
|
|
13805
|
+
...failure ? [failure] : []
|
|
13806
|
+
);
|
|
13807
|
+
}
|
|
13751
13808
|
function settleRun(prev, token, error) {
|
|
13752
13809
|
const carried = prev && prev.token === token ? prev : null;
|
|
13753
13810
|
const run = carried?.run ?? null;
|
|
@@ -13892,6 +13949,7 @@ function defineCommand(binding) {
|
|
|
13892
13949
|
kind: "command",
|
|
13893
13950
|
path: binding.path,
|
|
13894
13951
|
confirms: binding.confirm !== void 0,
|
|
13952
|
+
preflightPath: binding.preflight?.path,
|
|
13895
13953
|
resultKind: binding.result.kind,
|
|
13896
13954
|
invalidates: binding.invalidates,
|
|
13897
13955
|
partialArgs(ctx, target) {
|
|
@@ -13903,6 +13961,24 @@ function defineCommand(binding) {
|
|
|
13903
13961
|
if (!merged.ok) return void 0;
|
|
13904
13962
|
return binding.confirm(ctx, merged.args, target);
|
|
13905
13963
|
},
|
|
13964
|
+
async preflight(rt, ctx, target, signal) {
|
|
13965
|
+
const commands = rt.ports.commands;
|
|
13966
|
+
if (!binding.preflight || !commands) return true;
|
|
13967
|
+
const { path, args } = binding.preflight;
|
|
13968
|
+
const merged = completeArgs(path, args(ctx, target));
|
|
13969
|
+
if (!merged.ok) return true;
|
|
13970
|
+
try {
|
|
13971
|
+
const events = commands.invoke(path, merged.args, signal, rt.cwd).events;
|
|
13972
|
+
const read = events[Symbol.asyncIterator]();
|
|
13973
|
+
let step = await read.next();
|
|
13974
|
+
while (!step.done) step = await read.next();
|
|
13975
|
+
return true;
|
|
13976
|
+
} catch (err) {
|
|
13977
|
+
if (err instanceof CommandDetachedError) return false;
|
|
13978
|
+
notifyFailure(rt.ports.presenter, err);
|
|
13979
|
+
return false;
|
|
13980
|
+
}
|
|
13981
|
+
},
|
|
13906
13982
|
async start(rt, ctx, target, formArgs, signal) {
|
|
13907
13983
|
const merged = completeArgs(binding.path, { ...binding.args(ctx, target), ...formArgs });
|
|
13908
13984
|
if (!merged.ok) return null;
|
|
@@ -13922,8 +13998,7 @@ function defineCommand(binding) {
|
|
|
13922
13998
|
} catch (err) {
|
|
13923
13999
|
const settledByDocument = rendered && binding.result.kind === "notify" && (err instanceof CommandExitError || err instanceof CommandUnobservedError);
|
|
13924
14000
|
if (!rt.fail(err) && !(err instanceof CommandDetachedError) && !settledByDocument) {
|
|
13925
|
-
|
|
13926
|
-
rt.ports.presenter.notify("error", message, ...failure ? [failure] : []);
|
|
14001
|
+
notifyFailure(rt.ports.presenter, err);
|
|
13927
14002
|
}
|
|
13928
14003
|
if (binding.invalidates) rt.tick();
|
|
13929
14004
|
} finally {
|
|
@@ -14030,6 +14105,7 @@ var create = defineCommand({
|
|
|
14030
14105
|
kind: "command",
|
|
14031
14106
|
path: "stack create",
|
|
14032
14107
|
args: (ctx) => ({ source: ctx.root }),
|
|
14108
|
+
preflight: { path: "stack validate", args: (ctx) => ({ source: ctx.root }) },
|
|
14033
14109
|
invalidates: true,
|
|
14034
14110
|
result: {
|
|
14035
14111
|
kind: "notify",
|
|
@@ -14313,6 +14389,31 @@ function inEntryScope(view, ids) {
|
|
|
14313
14389
|
return ids.filter((id) => entry.has(id));
|
|
14314
14390
|
}
|
|
14315
14391
|
|
|
14392
|
+
// src/utils/handleId.ts
|
|
14393
|
+
var NODE_HANDLE = "node";
|
|
14394
|
+
function parseHandleId(handleId, prefix) {
|
|
14395
|
+
if (!handleId) return null;
|
|
14396
|
+
const marker = `${prefix}:`;
|
|
14397
|
+
if (!handleId.startsWith(marker)) return null;
|
|
14398
|
+
const name = handleId.slice(marker.length);
|
|
14399
|
+
return name.length > 0 ? name : null;
|
|
14400
|
+
}
|
|
14401
|
+
function sourceHandleId(output) {
|
|
14402
|
+
return `out:${output}`;
|
|
14403
|
+
}
|
|
14404
|
+
function targetHandleId(input) {
|
|
14405
|
+
return `in:${input}`;
|
|
14406
|
+
}
|
|
14407
|
+
function edgeHandles(e) {
|
|
14408
|
+
return {
|
|
14409
|
+
sourceHandle: e.source_pin ? targetHandleId(e.source_output) : sourceHandleId(e.source_output),
|
|
14410
|
+
targetHandle: e.target_pin ? sourceHandleId(e.target_input) : targetHandleId(e.target_input)
|
|
14411
|
+
};
|
|
14412
|
+
}
|
|
14413
|
+
function isDisconnectable(e) {
|
|
14414
|
+
return !e.target_pin;
|
|
14415
|
+
}
|
|
14416
|
+
|
|
14316
14417
|
// src/registry.ts
|
|
14317
14418
|
var CONTEXT_NEEDS = {
|
|
14318
14419
|
root: "an authoring root",
|
|
@@ -14331,6 +14432,7 @@ var CONTEXT_NEEDS = {
|
|
|
14331
14432
|
"selection.oneScope": "selected nodes that share one scope",
|
|
14332
14433
|
"selection.edge": "one selected connection",
|
|
14333
14434
|
"selection.edges": "selected connections",
|
|
14435
|
+
"selection.disconnectable": "a selected connection that feeds an input",
|
|
14334
14436
|
diagnostics: "diagnostics to show",
|
|
14335
14437
|
settingsOpen: "the settings panel open",
|
|
14336
14438
|
generateIdle: "no Generate running",
|
|
@@ -14384,6 +14486,10 @@ function keySatisfied(ctx, key) {
|
|
|
14384
14486
|
return ctx.view !== void 0 && ctx.selection !== void 0 && inOneScope(ctx.view, ctx.selection.nodes);
|
|
14385
14487
|
if (key === "selection.edge") return wiresAlone(ctx) === 1;
|
|
14386
14488
|
if (key === "selection.edges") return wiresAlone(ctx) > 0;
|
|
14489
|
+
if (key === "selection.disconnectable")
|
|
14490
|
+
return wiresAlone(ctx) > 0 && (ctx.view?.edges ?? []).some(
|
|
14491
|
+
(e) => ctx.selection?.edges.includes(e.id) && isDisconnectable(e)
|
|
14492
|
+
);
|
|
14387
14493
|
if (key === "diagnostics") return ctx.diagnostics !== void 0 && ctx.diagnostics.length > 0;
|
|
14388
14494
|
if (key === "settingsOpen") return ctx.settingsOpen === true;
|
|
14389
14495
|
if (key === "generateIdle") return ctx.generating === false;
|
|
@@ -14476,8 +14582,13 @@ function unmetRequirement(action, ports, ctx, target) {
|
|
|
14476
14582
|
if (target.failure === void 0) return `${label} needs ${TARGET_NEEDS.failure}`;
|
|
14477
14583
|
if (!answersFailure(action, target.failure)) return `${label} does not answer this failure`;
|
|
14478
14584
|
}
|
|
14479
|
-
if (binding.kind === "command"
|
|
14480
|
-
|
|
14585
|
+
if (binding.kind === "command") {
|
|
14586
|
+
const available = availableCommands(ports);
|
|
14587
|
+
for (const path of [binding.path, binding.preflightPath]) {
|
|
14588
|
+
if (path !== void 0 && !available.has(path)) {
|
|
14589
|
+
return `${label} runs lace ${path}, which this host does not route`;
|
|
14590
|
+
}
|
|
14591
|
+
}
|
|
14481
14592
|
}
|
|
14482
14593
|
return void 0;
|
|
14483
14594
|
}
|
|
@@ -14529,6 +14640,8 @@ function createActionRunner(ports, store, options = {}) {
|
|
|
14529
14640
|
const tokens = /* @__PURE__ */ new Map();
|
|
14530
14641
|
const clipboard = createClipboardStore();
|
|
14531
14642
|
const notifyControllers = /* @__PURE__ */ new Map();
|
|
14643
|
+
const preflighting = /* @__PURE__ */ new Set();
|
|
14644
|
+
const preflightControllers = /* @__PURE__ */ new Set();
|
|
14532
14645
|
let edits = 0;
|
|
14533
14646
|
const editingListeners = /* @__PURE__ */ new Set();
|
|
14534
14647
|
const tickListeners = /* @__PURE__ */ new Set();
|
|
@@ -14603,6 +14716,15 @@ function createActionRunner(ports, store, options = {}) {
|
|
|
14603
14716
|
settled: onSettle
|
|
14604
14717
|
};
|
|
14605
14718
|
}
|
|
14719
|
+
function invocationOf(action, binding, ctx, target, on) {
|
|
14720
|
+
const token = {};
|
|
14721
|
+
const run = { token, path: binding.path, resultKind: binding.resultKind, ctx, target };
|
|
14722
|
+
const started = { target, on, path: binding.path, label: action.label };
|
|
14723
|
+
return {
|
|
14724
|
+
token,
|
|
14725
|
+
runtime: (onSettle) => runtimeFor(token, readOverOf(ctx), cwdOf(action, ctx), { run, started }, onSettle)
|
|
14726
|
+
};
|
|
14727
|
+
}
|
|
14606
14728
|
function readOverOf(ctx) {
|
|
14607
14729
|
return { stack: ctx.stack?.id };
|
|
14608
14730
|
}
|
|
@@ -14635,7 +14757,7 @@ function createActionRunner(ports, store, options = {}) {
|
|
|
14635
14757
|
}
|
|
14636
14758
|
function tellFailure(error) {
|
|
14637
14759
|
if (error instanceof CommandDetachedError) return;
|
|
14638
|
-
ports.presenter
|
|
14760
|
+
notifyFailure(ports.presenter, error);
|
|
14639
14761
|
}
|
|
14640
14762
|
async function startCommand(action, ctx, target, formArgs) {
|
|
14641
14763
|
const binding = action.binding;
|
|
@@ -14647,16 +14769,12 @@ function createActionRunner(ports, store, options = {}) {
|
|
|
14647
14769
|
ports.presenter.notify("warn", busyReason(busy));
|
|
14648
14770
|
return;
|
|
14649
14771
|
}
|
|
14650
|
-
const
|
|
14651
|
-
const cwd = cwdOf(action, ctx);
|
|
14652
|
-
const token = {};
|
|
14653
|
-
const run = { token, path: binding.path, resultKind: binding.resultKind, ctx, target };
|
|
14654
|
-
const started = { target, on, path: binding.path, label: action.label };
|
|
14772
|
+
const { token, runtime } = invocationOf(action, binding, ctx, target, on);
|
|
14655
14773
|
const controller = new AbortController();
|
|
14656
14774
|
if (binding.resultKind === "notify") {
|
|
14657
14775
|
notifyControllers.set(controller, token);
|
|
14658
14776
|
await binding.start(
|
|
14659
|
-
|
|
14777
|
+
runtime(() => {
|
|
14660
14778
|
notifyControllers.delete(controller);
|
|
14661
14779
|
store.detach("notify", token);
|
|
14662
14780
|
}),
|
|
@@ -14670,18 +14788,33 @@ function createActionRunner(ports, store, options = {}) {
|
|
|
14670
14788
|
detachSlot(binding.resultKind);
|
|
14671
14789
|
controllers.set(binding.resultKind, controller);
|
|
14672
14790
|
tokens.set(binding.resultKind, token);
|
|
14673
|
-
const handle = await binding.start(
|
|
14674
|
-
runtimeFor(token, readOver, cwd, { run, started }),
|
|
14675
|
-
ctx,
|
|
14676
|
-
target,
|
|
14677
|
-
formArgs,
|
|
14678
|
-
controller.signal
|
|
14679
|
-
);
|
|
14791
|
+
const handle = await binding.start(runtime(), ctx, target, formArgs, controller.signal);
|
|
14680
14792
|
if (handle) handles.set(binding.resultKind, handle);
|
|
14681
14793
|
}
|
|
14682
14794
|
async function runCommand(action, ctx, target) {
|
|
14683
14795
|
const binding = action.binding;
|
|
14684
14796
|
if (binding.kind !== "command") return;
|
|
14797
|
+
if (binding.preflightPath !== void 0) {
|
|
14798
|
+
if (preflighting.has(action.id)) return;
|
|
14799
|
+
preflighting.add(action.id);
|
|
14800
|
+
const { token, runtime } = invocationOf(
|
|
14801
|
+
action,
|
|
14802
|
+
binding,
|
|
14803
|
+
ctx,
|
|
14804
|
+
target,
|
|
14805
|
+
runsOn(action, ctx, target)
|
|
14806
|
+
);
|
|
14807
|
+
const rt = runtime(() => store.detach("notify", token));
|
|
14808
|
+
const controller = new AbortController();
|
|
14809
|
+
preflightControllers.add(controller);
|
|
14810
|
+
if (binding.resultKind === "notify") rt.begin();
|
|
14811
|
+
const proceed = await binding.preflight(rt, ctx, target, controller.signal).finally(() => {
|
|
14812
|
+
if (binding.resultKind === "notify") rt.settled?.();
|
|
14813
|
+
preflighting.delete(action.id);
|
|
14814
|
+
preflightControllers.delete(controller);
|
|
14815
|
+
});
|
|
14816
|
+
if (!proceed) return;
|
|
14817
|
+
}
|
|
14685
14818
|
const completion = completeArgs(binding.path, binding.partialArgs(ctx, target));
|
|
14686
14819
|
if (!completion.ok) {
|
|
14687
14820
|
if (!options.onPendingFormChange) {
|
|
@@ -14717,6 +14850,7 @@ function createActionRunner(ports, store, options = {}) {
|
|
|
14717
14850
|
ctx,
|
|
14718
14851
|
target,
|
|
14719
14852
|
clipboard,
|
|
14853
|
+
dissolved: options.onDissolved,
|
|
14720
14854
|
...envExtras
|
|
14721
14855
|
};
|
|
14722
14856
|
if (binding.result === "apply") {
|
|
@@ -14814,6 +14948,7 @@ function createActionRunner(ports, store, options = {}) {
|
|
|
14814
14948
|
store.detach("notify", token);
|
|
14815
14949
|
}
|
|
14816
14950
|
notifyControllers.clear();
|
|
14951
|
+
for (const controller of preflightControllers) controller.abort();
|
|
14817
14952
|
tickListeners.clear();
|
|
14818
14953
|
}
|
|
14819
14954
|
};
|
|
@@ -14837,6 +14972,28 @@ function proposeStackSlug(folder) {
|
|
|
14837
14972
|
return "";
|
|
14838
14973
|
}
|
|
14839
14974
|
|
|
14975
|
+
// src/utils/wire-end.ts
|
|
14976
|
+
import { callText, groupPinText } from "@lace-cloud/proto";
|
|
14977
|
+
function wireEnd(wire, end) {
|
|
14978
|
+
const source = end === "source";
|
|
14979
|
+
const node = source ? wire.source : wire.target;
|
|
14980
|
+
const pin = source ? wire.source_output : wire.target_input;
|
|
14981
|
+
if (source ? wire.source_pin : wire.target_pin) return { kind: "group-pin", node, pin };
|
|
14982
|
+
if (source && !pin) return { kind: "call", node };
|
|
14983
|
+
return { kind: "pin", node, pin };
|
|
14984
|
+
}
|
|
14985
|
+
function wireEndText(wire, end, pinText) {
|
|
14986
|
+
const part = wireEnd(wire, end);
|
|
14987
|
+
switch (part.kind) {
|
|
14988
|
+
case "group-pin":
|
|
14989
|
+
return groupPinText(part.node, end, part.pin);
|
|
14990
|
+
case "call":
|
|
14991
|
+
return callText(part.node);
|
|
14992
|
+
case "pin":
|
|
14993
|
+
return pinText(part.node, part.pin, end);
|
|
14994
|
+
}
|
|
14995
|
+
}
|
|
14996
|
+
|
|
14840
14997
|
// src/engine/autosave.ts
|
|
14841
14998
|
var AutosaveEndedError = class extends Error {
|
|
14842
14999
|
constructor(reason) {
|
|
@@ -14929,6 +15086,12 @@ export {
|
|
|
14929
15086
|
diagnosticsOf,
|
|
14930
15087
|
entryScopeIds,
|
|
14931
15088
|
inEntryScope,
|
|
15089
|
+
NODE_HANDLE,
|
|
15090
|
+
parseHandleId,
|
|
15091
|
+
sourceHandleId,
|
|
15092
|
+
targetHandleId,
|
|
15093
|
+
edgeHandles,
|
|
15094
|
+
isDisconnectable,
|
|
14932
15095
|
keySatisfied,
|
|
14933
15096
|
disabledReason,
|
|
14934
15097
|
actionState,
|
|
@@ -14936,6 +15099,8 @@ export {
|
|
|
14936
15099
|
answering,
|
|
14937
15100
|
resolveContributions,
|
|
14938
15101
|
rowActions,
|
|
15102
|
+
isPlainObject,
|
|
15103
|
+
deepEqual,
|
|
14939
15104
|
counted,
|
|
14940
15105
|
Reason,
|
|
14941
15106
|
Bundle,
|
|
@@ -14967,6 +15132,7 @@ export {
|
|
|
14967
15132
|
commandUnderWay,
|
|
14968
15133
|
reduceRun,
|
|
14969
15134
|
failureSays,
|
|
15135
|
+
notifyFailure,
|
|
14970
15136
|
settleRun,
|
|
14971
15137
|
reducePreview,
|
|
14972
15138
|
reduceReport,
|
|
@@ -14981,8 +15147,8 @@ export {
|
|
|
14981
15147
|
LOCK_LABEL,
|
|
14982
15148
|
MODULE_COMMAND_ACTIONS,
|
|
14983
15149
|
CORE_COMMAND_ACTIONS,
|
|
14984
|
-
|
|
14985
|
-
|
|
15150
|
+
wireEnd,
|
|
15151
|
+
wireEndText,
|
|
14986
15152
|
createActionRunner,
|
|
14987
15153
|
connectCaller,
|
|
14988
15154
|
bridgeCaller,
|
|
@@ -14993,4 +15159,4 @@ export {
|
|
|
14993
15159
|
AutosaveEndedError,
|
|
14994
15160
|
autosave
|
|
14995
15161
|
};
|
|
14996
|
-
//# sourceMappingURL=chunk-
|
|
15162
|
+
//# sourceMappingURL=chunk-45ZS7XCZ.mjs.map
|