@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 +4 -1
- package/dist/{AccordionSection-J3ALHB5M.css → AccordionSection-5X2XWUYY.css} +9 -2
- package/dist/BadgeRow-KVODWDQK.css +23 -0
- package/dist/{ContextMenu-C7SLX23S.css → ContextMenu-S3JIZMET.css} +11 -0
- package/dist/{DiagnosticsPanel-T6VDHH4A.css → DiagnosticsPanel-MSK72CGM.css} +3 -1
- package/dist/{GroupNode-QWSLBFCH.css → GroupNode-FXLQCVAE.css} +0 -38
- package/dist/{ModuleConfigPanel-ZMWRMN5N.css → ModuleConfigPanel-DW3RSOEL.css} +6 -0
- package/dist/{ModuleNode-RRZ37SFM.css → ModuleNode-PPAN7NLP.css} +15 -37
- package/dist/{chunk-DYTLLFEM.mjs → chunk-A3ATETIA.mjs} +236 -27
- package/dist/chunk-A3ATETIA.mjs.map +1 -0
- package/dist/engine/index.cjs +225 -25
- package/dist/engine/index.cjs.map +1 -1
- package/dist/engine/index.d.mts +2 -2
- package/dist/engine/index.d.ts +2 -2
- package/dist/engine/index.mjs +5 -1
- package/dist/index.cjs +1857 -1591
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +25 -23
- package/dist/index.d.ts +25 -23
- package/dist/index.mjs +1394 -1328
- package/dist/index.mjs.map +1 -1
- package/dist/{panels-shared-5JFNYXQ7.css → panels-shared-3HUQC7TC.css} +20 -2
- package/dist/{registry-LzXZx20m.d.mts → registry-C8fUGD44.d.mts} +182 -22
- package/dist/{registry-LzXZx20m.d.ts → registry-C8fUGD44.d.ts} +182 -22
- package/package.json +3 -3
- package/dist/chunk-DYTLLFEM.mjs.map +0 -1
|
@@ -4426,13 +4426,19 @@ var SessionGenerateRequest = {
|
|
|
4426
4426
|
}
|
|
4427
4427
|
};
|
|
4428
4428
|
function createBaseSessionGenerateResponse() {
|
|
4429
|
-
return { files_written: [], validate_json: "", revision: 0 };
|
|
4429
|
+
return { files_written: [], files_changed: [], files_removed: [], validate_json: "", revision: 0 };
|
|
4430
4430
|
}
|
|
4431
4431
|
var SessionGenerateResponse = {
|
|
4432
4432
|
encode(message, writer = new BinaryWriter4()) {
|
|
4433
4433
|
for (const v of message.files_written) {
|
|
4434
4434
|
writer.uint32(10).string(v);
|
|
4435
4435
|
}
|
|
4436
|
+
for (const v of message.files_changed) {
|
|
4437
|
+
writer.uint32(50).string(v);
|
|
4438
|
+
}
|
|
4439
|
+
for (const v of message.files_removed) {
|
|
4440
|
+
writer.uint32(58).string(v);
|
|
4441
|
+
}
|
|
4436
4442
|
if (message.validate_json !== "") {
|
|
4437
4443
|
writer.uint32(34).string(message.validate_json);
|
|
4438
4444
|
}
|
|
@@ -4455,6 +4461,20 @@ var SessionGenerateResponse = {
|
|
|
4455
4461
|
message.files_written.push(reader.string());
|
|
4456
4462
|
continue;
|
|
4457
4463
|
}
|
|
4464
|
+
case 6: {
|
|
4465
|
+
if (tag !== 50) {
|
|
4466
|
+
break;
|
|
4467
|
+
}
|
|
4468
|
+
message.files_changed.push(reader.string());
|
|
4469
|
+
continue;
|
|
4470
|
+
}
|
|
4471
|
+
case 7: {
|
|
4472
|
+
if (tag !== 58) {
|
|
4473
|
+
break;
|
|
4474
|
+
}
|
|
4475
|
+
message.files_removed.push(reader.string());
|
|
4476
|
+
continue;
|
|
4477
|
+
}
|
|
4458
4478
|
case 4: {
|
|
4459
4479
|
if (tag !== 34) {
|
|
4460
4480
|
break;
|
|
@@ -4480,6 +4500,8 @@ var SessionGenerateResponse = {
|
|
|
4480
4500
|
fromJSON(object) {
|
|
4481
4501
|
return {
|
|
4482
4502
|
files_written: globalThis.Array.isArray(object?.filesWritten) ? object.filesWritten.map((e) => globalThis.String(e)) : globalThis.Array.isArray(object?.files_written) ? object.files_written.map((e) => globalThis.String(e)) : [],
|
|
4503
|
+
files_changed: globalThis.Array.isArray(object?.filesChanged) ? object.filesChanged.map((e) => globalThis.String(e)) : globalThis.Array.isArray(object?.files_changed) ? object.files_changed.map((e) => globalThis.String(e)) : [],
|
|
4504
|
+
files_removed: globalThis.Array.isArray(object?.filesRemoved) ? object.filesRemoved.map((e) => globalThis.String(e)) : globalThis.Array.isArray(object?.files_removed) ? object.files_removed.map((e) => globalThis.String(e)) : [],
|
|
4483
4505
|
validate_json: isSet3(object.validateJson) ? globalThis.String(object.validateJson) : isSet3(object.validate_json) ? globalThis.String(object.validate_json) : "",
|
|
4484
4506
|
revision: isSet3(object.revision) ? globalThis.Number(object.revision) : 0
|
|
4485
4507
|
};
|
|
@@ -4489,6 +4511,12 @@ var SessionGenerateResponse = {
|
|
|
4489
4511
|
if (message.files_written?.length) {
|
|
4490
4512
|
obj.filesWritten = message.files_written;
|
|
4491
4513
|
}
|
|
4514
|
+
if (message.files_changed?.length) {
|
|
4515
|
+
obj.filesChanged = message.files_changed;
|
|
4516
|
+
}
|
|
4517
|
+
if (message.files_removed?.length) {
|
|
4518
|
+
obj.filesRemoved = message.files_removed;
|
|
4519
|
+
}
|
|
4492
4520
|
if (message.validate_json !== "") {
|
|
4493
4521
|
obj.validateJson = message.validate_json;
|
|
4494
4522
|
}
|
|
@@ -4503,6 +4531,8 @@ var SessionGenerateResponse = {
|
|
|
4503
4531
|
fromPartial(object) {
|
|
4504
4532
|
const message = createBaseSessionGenerateResponse();
|
|
4505
4533
|
message.files_written = object.files_written?.map((e) => e) || [];
|
|
4534
|
+
message.files_changed = object.files_changed?.map((e) => e) || [];
|
|
4535
|
+
message.files_removed = object.files_removed?.map((e) => e) || [];
|
|
4506
4536
|
message.validate_json = object.validate_json ?? "";
|
|
4507
4537
|
message.revision = object.revision ?? 0;
|
|
4508
4538
|
return message;
|
|
@@ -8423,13 +8453,19 @@ var GenerateProgress = {
|
|
|
8423
8453
|
}
|
|
8424
8454
|
};
|
|
8425
8455
|
function createBaseGenerateSuccess() {
|
|
8426
|
-
return { files_written: [], validate_json: "", generate_id: "" };
|
|
8456
|
+
return { files_written: [], files_changed: [], files_removed: [], validate_json: "", generate_id: "" };
|
|
8427
8457
|
}
|
|
8428
8458
|
var GenerateSuccess = {
|
|
8429
8459
|
encode(message, writer = new BinaryWriter4()) {
|
|
8430
8460
|
for (const v of message.files_written) {
|
|
8431
8461
|
writer.uint32(10).string(v);
|
|
8432
8462
|
}
|
|
8463
|
+
for (const v of message.files_changed) {
|
|
8464
|
+
writer.uint32(42).string(v);
|
|
8465
|
+
}
|
|
8466
|
+
for (const v of message.files_removed) {
|
|
8467
|
+
writer.uint32(50).string(v);
|
|
8468
|
+
}
|
|
8433
8469
|
if (message.validate_json !== "") {
|
|
8434
8470
|
writer.uint32(26).string(message.validate_json);
|
|
8435
8471
|
}
|
|
@@ -8452,6 +8488,20 @@ var GenerateSuccess = {
|
|
|
8452
8488
|
message.files_written.push(reader.string());
|
|
8453
8489
|
continue;
|
|
8454
8490
|
}
|
|
8491
|
+
case 5: {
|
|
8492
|
+
if (tag !== 42) {
|
|
8493
|
+
break;
|
|
8494
|
+
}
|
|
8495
|
+
message.files_changed.push(reader.string());
|
|
8496
|
+
continue;
|
|
8497
|
+
}
|
|
8498
|
+
case 6: {
|
|
8499
|
+
if (tag !== 50) {
|
|
8500
|
+
break;
|
|
8501
|
+
}
|
|
8502
|
+
message.files_removed.push(reader.string());
|
|
8503
|
+
continue;
|
|
8504
|
+
}
|
|
8455
8505
|
case 3: {
|
|
8456
8506
|
if (tag !== 26) {
|
|
8457
8507
|
break;
|
|
@@ -8477,6 +8527,8 @@ var GenerateSuccess = {
|
|
|
8477
8527
|
fromJSON(object) {
|
|
8478
8528
|
return {
|
|
8479
8529
|
files_written: globalThis.Array.isArray(object?.filesWritten) ? object.filesWritten.map((e) => globalThis.String(e)) : globalThis.Array.isArray(object?.files_written) ? object.files_written.map((e) => globalThis.String(e)) : [],
|
|
8530
|
+
files_changed: globalThis.Array.isArray(object?.filesChanged) ? object.filesChanged.map((e) => globalThis.String(e)) : globalThis.Array.isArray(object?.files_changed) ? object.files_changed.map((e) => globalThis.String(e)) : [],
|
|
8531
|
+
files_removed: globalThis.Array.isArray(object?.filesRemoved) ? object.filesRemoved.map((e) => globalThis.String(e)) : globalThis.Array.isArray(object?.files_removed) ? object.files_removed.map((e) => globalThis.String(e)) : [],
|
|
8480
8532
|
validate_json: isSet3(object.validateJson) ? globalThis.String(object.validateJson) : isSet3(object.validate_json) ? globalThis.String(object.validate_json) : "",
|
|
8481
8533
|
generate_id: isSet3(object.generateId) ? globalThis.String(object.generateId) : isSet3(object.generate_id) ? globalThis.String(object.generate_id) : ""
|
|
8482
8534
|
};
|
|
@@ -8486,6 +8538,12 @@ var GenerateSuccess = {
|
|
|
8486
8538
|
if (message.files_written?.length) {
|
|
8487
8539
|
obj.filesWritten = message.files_written;
|
|
8488
8540
|
}
|
|
8541
|
+
if (message.files_changed?.length) {
|
|
8542
|
+
obj.filesChanged = message.files_changed;
|
|
8543
|
+
}
|
|
8544
|
+
if (message.files_removed?.length) {
|
|
8545
|
+
obj.filesRemoved = message.files_removed;
|
|
8546
|
+
}
|
|
8489
8547
|
if (message.validate_json !== "") {
|
|
8490
8548
|
obj.validateJson = message.validate_json;
|
|
8491
8549
|
}
|
|
@@ -8500,6 +8558,8 @@ var GenerateSuccess = {
|
|
|
8500
8558
|
fromPartial(object) {
|
|
8501
8559
|
const message = createBaseGenerateSuccess();
|
|
8502
8560
|
message.files_written = object.files_written?.map((e) => e) || [];
|
|
8561
|
+
message.files_changed = object.files_changed?.map((e) => e) || [];
|
|
8562
|
+
message.files_removed = object.files_removed?.map((e) => e) || [];
|
|
8503
8563
|
message.validate_json = object.validate_json ?? "";
|
|
8504
8564
|
message.generate_id = object.generate_id ?? "";
|
|
8505
8565
|
return message;
|
|
@@ -10466,6 +10526,22 @@ function currentFrame(source) {
|
|
|
10466
10526
|
if (settled) unsubscribe();
|
|
10467
10527
|
});
|
|
10468
10528
|
}
|
|
10529
|
+
var GENERATE_STAGES = ["generating", "validating"];
|
|
10530
|
+
function isGenerateStage(stage) {
|
|
10531
|
+
return GENERATE_STAGES.some((known) => known === stage);
|
|
10532
|
+
}
|
|
10533
|
+
function generatedTree({
|
|
10534
|
+
written,
|
|
10535
|
+
changed,
|
|
10536
|
+
removed
|
|
10537
|
+
}) {
|
|
10538
|
+
return {
|
|
10539
|
+
changed,
|
|
10540
|
+
removed,
|
|
10541
|
+
unchanged: written.length - changed.length,
|
|
10542
|
+
treeChanged: changed.length > 0 || removed.length > 0
|
|
10543
|
+
};
|
|
10544
|
+
}
|
|
10469
10545
|
var ApplyUnobservedError = class extends Error {
|
|
10470
10546
|
constructor(end) {
|
|
10471
10547
|
super(`unobserved: the source stopped (${end.kind}) before the frame that carries the write`);
|
|
@@ -11157,6 +11233,32 @@ var COMMANDS = {
|
|
|
11157
11233
|
"hidden": false,
|
|
11158
11234
|
"yes": false
|
|
11159
11235
|
},
|
|
11236
|
+
"module lock": {
|
|
11237
|
+
"path": "module lock",
|
|
11238
|
+
"positionals": [],
|
|
11239
|
+
"flags": {
|
|
11240
|
+
"org": {
|
|
11241
|
+
"type": "string"
|
|
11242
|
+
},
|
|
11243
|
+
"output": {
|
|
11244
|
+
"type": "string",
|
|
11245
|
+
"values": [
|
|
11246
|
+
"table",
|
|
11247
|
+
"json"
|
|
11248
|
+
]
|
|
11249
|
+
},
|
|
11250
|
+
"path": {
|
|
11251
|
+
"type": "string"
|
|
11252
|
+
},
|
|
11253
|
+
"upgrade": {
|
|
11254
|
+
"type": "stringArray",
|
|
11255
|
+
"repeated": true
|
|
11256
|
+
}
|
|
11257
|
+
},
|
|
11258
|
+
"effect": "write",
|
|
11259
|
+
"hidden": false,
|
|
11260
|
+
"yes": false
|
|
11261
|
+
},
|
|
11160
11262
|
"module scan": {
|
|
11161
11263
|
"path": "module scan",
|
|
11162
11264
|
"positionals": [],
|
|
@@ -12303,10 +12405,18 @@ var moduleValidateResultSchema = z.object({
|
|
|
12303
12405
|
failure: commandFailureSchema.optional(),
|
|
12304
12406
|
diagnostics: z.array(commandDiagnosticSchema)
|
|
12305
12407
|
});
|
|
12408
|
+
var moduleLockResultSchema = z.object({
|
|
12409
|
+
path: z.string(),
|
|
12410
|
+
lockfile: z.string(),
|
|
12411
|
+
providers: z.array(
|
|
12412
|
+
z.object({ address: z.string(), version: z.string(), platforms: z.array(z.string()) })
|
|
12413
|
+
)
|
|
12414
|
+
});
|
|
12306
12415
|
var moduleConvertResultSchema = z.object({
|
|
12307
12416
|
changed: z.boolean(),
|
|
12308
12417
|
written: z.array(z.string()),
|
|
12309
12418
|
removed: z.array(z.string()),
|
|
12419
|
+
lock: moduleLockResultSchema.nullable(),
|
|
12310
12420
|
validate: moduleValidateResultSchema,
|
|
12311
12421
|
diagnostics: z.array(commandDiagnosticSchema)
|
|
12312
12422
|
});
|
|
@@ -12386,6 +12496,12 @@ var moduleFmtResultSchema = z.object({ changed: z.array(z.string()) });
|
|
|
12386
12496
|
var moduleDocsResultSchema = z.object({ markdown: z.string() });
|
|
12387
12497
|
var moduleScanResultSchema = z.object({
|
|
12388
12498
|
treeHash: z.string(),
|
|
12499
|
+
tool: z.object({
|
|
12500
|
+
name: z.string(),
|
|
12501
|
+
version: z.string().nullable(),
|
|
12502
|
+
path: z.string(),
|
|
12503
|
+
source: z.enum(["env", "path", "cache"])
|
|
12504
|
+
}),
|
|
12389
12505
|
diagnostics: z.array(commandDiagnosticSchema)
|
|
12390
12506
|
});
|
|
12391
12507
|
var registryDescribeSchema = z.object({
|
|
@@ -12539,6 +12655,22 @@ var runSchema = z.object({
|
|
|
12539
12655
|
// a portal mount reading the API body sees it absent — optional so both
|
|
12540
12656
|
// bodies parse. A host opens this link and never composes a portal route.
|
|
12541
12657
|
url: z.string().optional(),
|
|
12658
|
+
// The provider versions the Run's lockfile pins, each with the
|
|
12659
|
+
// organization's admission it ran under when the version is one admitted
|
|
12660
|
+
// outside the curated range. A single-run read carries it; a list does
|
|
12661
|
+
// not, and the CLI omits an empty one.
|
|
12662
|
+
providers: z.array(
|
|
12663
|
+
z.object({
|
|
12664
|
+
address: z.string(),
|
|
12665
|
+
version: z.string(),
|
|
12666
|
+
admission: z.object({
|
|
12667
|
+
id: z.string(),
|
|
12668
|
+
admittedBy: z.string(),
|
|
12669
|
+
admittedByName: z.string().nullable(),
|
|
12670
|
+
admittedAt: z.string()
|
|
12671
|
+
}).optional()
|
|
12672
|
+
})
|
|
12673
|
+
).optional(),
|
|
12542
12674
|
// The CLI's own `api.Run` decode struct (apps/cli/internal/api/runs.go) has no
|
|
12543
12675
|
// json tag for these, so every CLI JSON golden omits them; the API always sends
|
|
12544
12676
|
// them (apps/api/src/openapi/schemas/runs.ts) — optional so both bodies parse.
|
|
@@ -12758,16 +12890,22 @@ var currentSelectionSchema = z.union([
|
|
|
12758
12890
|
z.object({ slug: z.null(), source: z.null() })
|
|
12759
12891
|
]);
|
|
12760
12892
|
var loginUserSchema = z.object({ id: z.string(), email: z.string(), name: z.string() });
|
|
12761
|
-
var
|
|
12893
|
+
var keyRevocationSchema = z.object({
|
|
12894
|
+
revocation: z.enum(["revoked", "refused", "unreachable", "unreadable", "none"]),
|
|
12895
|
+
detail: z.string().optional(),
|
|
12896
|
+
portalUrl: z.string().optional()
|
|
12897
|
+
});
|
|
12898
|
+
var logoutSchema = keyRevocationSchema.extend({ loggedOut: z.boolean() });
|
|
12762
12899
|
var loginEventSchema = z.discriminatedUnion("type", [
|
|
12763
12900
|
z.object({ type: z.literal("code"), code: z.string(), verificationUrl: z.string().optional() }),
|
|
12764
12901
|
z.object({ type: z.literal("url"), url: z.string() }),
|
|
12765
12902
|
z.object({ type: z.literal("email_sent"), email: z.string() }),
|
|
12766
|
-
z.object({ type: z.literal("result"), user: loginUserSchema })
|
|
12903
|
+
z.object({ type: z.literal("result"), user: loginUserSchema, replacedKey: keyRevocationSchema })
|
|
12767
12904
|
]);
|
|
12768
12905
|
var SCHEMAS = {
|
|
12769
12906
|
"module validate": moduleValidateResultSchema,
|
|
12770
12907
|
"module convert": moduleConvertResultSchema,
|
|
12908
|
+
"module lock": moduleLockResultSchema,
|
|
12771
12909
|
"module fmt": moduleFmtResultSchema,
|
|
12772
12910
|
"module docs": moduleDocsResultSchema,
|
|
12773
12911
|
"module scan": moduleScanResultSchema,
|
|
@@ -12878,6 +13016,7 @@ async function openEngineSession(caller, target, options = {}) {
|
|
|
12878
13016
|
const progressListeners = /* @__PURE__ */ new Set();
|
|
12879
13017
|
const ownGenerates = /* @__PURE__ */ new Set();
|
|
12880
13018
|
let sessionGenerating = initialState.generating;
|
|
13019
|
+
let stage = "generating";
|
|
12881
13020
|
let currentSource = null;
|
|
12882
13021
|
let ended = null;
|
|
12883
13022
|
let deliveredRevision = initialState.revision;
|
|
@@ -12887,6 +13026,7 @@ async function openEngineSession(caller, target, options = {}) {
|
|
|
12887
13026
|
const published = state.bundle ?? EMPTY_BUNDLE;
|
|
12888
13027
|
const bundle = currentSource && deepEqual(currentSource.bundle, published) ? currentSource.bundle : published;
|
|
12889
13028
|
sessionGenerating = state.generating;
|
|
13029
|
+
if (!running()) stage = "generating";
|
|
12890
13030
|
currentSource = {
|
|
12891
13031
|
bundle,
|
|
12892
13032
|
canUndo: state.can_undo,
|
|
@@ -12908,16 +13048,27 @@ async function openEngineSession(caller, target, options = {}) {
|
|
|
12908
13048
|
}
|
|
12909
13049
|
}
|
|
12910
13050
|
adopt(initialState);
|
|
12911
|
-
function
|
|
13051
|
+
function running() {
|
|
12912
13052
|
return sessionGenerating || ownGenerates.size > 0;
|
|
12913
13053
|
}
|
|
13054
|
+
function generating() {
|
|
13055
|
+
return running() && stage;
|
|
13056
|
+
}
|
|
13057
|
+
function republishGenerating() {
|
|
13058
|
+
if (!currentSource || currentSource.generating === generating()) return;
|
|
13059
|
+
currentSource = { ...currentSource, generating: generating() };
|
|
13060
|
+
for (const listener of sourceListeners) deliver(listener, currentSource);
|
|
13061
|
+
}
|
|
12914
13062
|
function track(id, on) {
|
|
12915
|
-
const was = generating();
|
|
12916
13063
|
if (on) ownGenerates.add(id);
|
|
12917
13064
|
else ownGenerates.delete(id);
|
|
12918
|
-
if (!
|
|
12919
|
-
|
|
12920
|
-
|
|
13065
|
+
if (!running()) stage = "generating";
|
|
13066
|
+
republishGenerating();
|
|
13067
|
+
}
|
|
13068
|
+
function reached(next) {
|
|
13069
|
+
if (!running() || !isGenerateStage(next)) return;
|
|
13070
|
+
stage = next;
|
|
13071
|
+
republishGenerating();
|
|
12921
13072
|
}
|
|
12922
13073
|
function observed(revision) {
|
|
12923
13074
|
if (deliveredRevision >= revision) return Promise.resolve();
|
|
@@ -12963,6 +13114,7 @@ async function openEngineSession(caller, target, options = {}) {
|
|
|
12963
13114
|
continue;
|
|
12964
13115
|
}
|
|
12965
13116
|
if (event.generate_progress) {
|
|
13117
|
+
reached(event.generate_progress.stage);
|
|
12966
13118
|
for (const listener of progressListeners) listener(event.generate_progress);
|
|
12967
13119
|
}
|
|
12968
13120
|
}
|
|
@@ -13031,9 +13183,8 @@ async function openEngineSession(caller, target, options = {}) {
|
|
|
13031
13183
|
track(generateId, true);
|
|
13032
13184
|
const onProgress = (progress) => {
|
|
13033
13185
|
if (progress.generate_id !== generateId) return;
|
|
13034
|
-
|
|
13035
|
-
|
|
13036
|
-
queue.push({ type: "progress", stage });
|
|
13186
|
+
if (isGenerateStage(progress.stage)) {
|
|
13187
|
+
queue.push({ type: "progress", stage: progress.stage });
|
|
13037
13188
|
}
|
|
13038
13189
|
};
|
|
13039
13190
|
progressListeners.add(onProgress);
|
|
@@ -13152,6 +13303,8 @@ function generated(response) {
|
|
|
13152
13303
|
return {
|
|
13153
13304
|
type: "success",
|
|
13154
13305
|
written: response.files_written,
|
|
13306
|
+
changed: response.files_changed,
|
|
13307
|
+
removed: response.files_removed,
|
|
13155
13308
|
validate: parseBound("module validate", JSON.parse(response.validate_json))
|
|
13156
13309
|
};
|
|
13157
13310
|
}
|
|
@@ -13601,6 +13754,10 @@ function didNotValidate(v) {
|
|
|
13601
13754
|
const why = whyNotValid(v);
|
|
13602
13755
|
return why === void 0 ? "The tree did not validate: fix it before you commit it." : `The tree did not validate: ${why}. Fix it before you commit it.`;
|
|
13603
13756
|
}
|
|
13757
|
+
function lockFailed(e) {
|
|
13758
|
+
return e.changed && e.lock === null;
|
|
13759
|
+
}
|
|
13760
|
+
var DID_NOT_LOCK = "The tree's providers did not lock: run `lace module lock` once the cause is fixed, before you commit it.";
|
|
13604
13761
|
function beside(v) {
|
|
13605
13762
|
return v.failure ? [v.failure] : [];
|
|
13606
13763
|
}
|
|
@@ -13696,11 +13853,15 @@ function importNotice(e) {
|
|
|
13696
13853
|
if (e.validate.exitClass !== "ok") {
|
|
13697
13854
|
return ["warn", `${imported} ${didNotValidate(e.validate)}`, ...beside(e.validate)];
|
|
13698
13855
|
}
|
|
13699
|
-
|
|
13700
|
-
|
|
13856
|
+
if (lockFailed(e)) return ["warn", `${imported} ${DID_NOT_LOCK}`];
|
|
13857
|
+
const adopts = e.importBlocks > 0;
|
|
13858
|
+
const next = adopts ? `, commit it, then apply ${slug} to adopt them` : " and commit it";
|
|
13859
|
+
const review = e.changed ? ` Review the change in git${next}.` : "";
|
|
13860
|
+
if (e.importResiduals.length === 0) return ["info", `${imported}${review}`];
|
|
13861
|
+
const unadopted = adopts ? "Not adopted" : "No resource was adopted";
|
|
13701
13862
|
return [
|
|
13702
13863
|
"warn",
|
|
13703
|
-
`${imported}${
|
|
13864
|
+
`${imported}${review} ${unadopted}: ${residualAddresses(e.importResiduals)}; supply their import ids before applying, or the apply creates them anew.`
|
|
13704
13865
|
];
|
|
13705
13866
|
}
|
|
13706
13867
|
var importResult = {
|
|
@@ -13732,8 +13893,11 @@ function validateNotice(v) {
|
|
|
13732
13893
|
}
|
|
13733
13894
|
function convertNotice(e) {
|
|
13734
13895
|
const converted = e.changed ? `Converted \u2014 ${e.written.length} file(s) written` : "Already lace-style \u2014 nothing to write";
|
|
13735
|
-
if (e.validate.exitClass
|
|
13736
|
-
|
|
13896
|
+
if (e.validate.exitClass !== "ok") {
|
|
13897
|
+
return ["warn", `${converted}. ${didNotValidate(e.validate)}`, ...beside(e.validate)];
|
|
13898
|
+
}
|
|
13899
|
+
if (lockFailed(e)) return ["warn", `${converted}. ${DID_NOT_LOCK}`];
|
|
13900
|
+
return ["info", converted];
|
|
13737
13901
|
}
|
|
13738
13902
|
var validate = defineCommand({
|
|
13739
13903
|
kind: "command",
|
|
@@ -13902,6 +14066,16 @@ var CORE_COMMAND_ACTIONS = [
|
|
|
13902
14066
|
...MODULE_COMMAND_ACTIONS
|
|
13903
14067
|
];
|
|
13904
14068
|
|
|
14069
|
+
// src/core/entry-scope.ts
|
|
14070
|
+
function entryScopeIds(view) {
|
|
14071
|
+
const nested = new Set(view.groups.flatMap((g) => g.node_ids));
|
|
14072
|
+
return [...view.nodes, ...view.groups].map((n) => n.id).filter((id) => !nested.has(id));
|
|
14073
|
+
}
|
|
14074
|
+
function inEntryScope(view, ids) {
|
|
14075
|
+
const entry = new Set(entryScopeIds(view));
|
|
14076
|
+
return ids.filter((id) => entry.has(id));
|
|
14077
|
+
}
|
|
14078
|
+
|
|
13905
14079
|
// src/registry.ts
|
|
13906
14080
|
var CONTEXT_NEEDS = {
|
|
13907
14081
|
root: "an authoring root",
|
|
@@ -13915,7 +14089,10 @@ var CONTEXT_NEEDS = {
|
|
|
13915
14089
|
sourceRefused: "the source-refused lock",
|
|
13916
14090
|
needsConversion: "a tree out of lace shape",
|
|
13917
14091
|
"selection.node": "a selected node",
|
|
13918
|
-
"selection.
|
|
14092
|
+
"selection.several": "two selected nodes or more",
|
|
14093
|
+
"selection.entryScope": "a selected top-level node or group",
|
|
14094
|
+
"selection.edge": "one selected connection",
|
|
14095
|
+
"selection.edges": "selected connections",
|
|
13919
14096
|
diagnostics: "diagnostics to show",
|
|
13920
14097
|
settingsOpen: "the settings panel open",
|
|
13921
14098
|
generateIdle: "no Generate running",
|
|
@@ -13941,6 +14118,10 @@ function runsOn(action, ctx, target) {
|
|
|
13941
14118
|
if (required.includes("root")) return `root:${ctx.root}`;
|
|
13942
14119
|
return "";
|
|
13943
14120
|
}
|
|
14121
|
+
function wiresAlone(ctx) {
|
|
14122
|
+
const selection = ctx.selection;
|
|
14123
|
+
return selection && selection.nodes.length === 0 ? selection.edges.length : 0;
|
|
14124
|
+
}
|
|
13944
14125
|
function keySatisfied(ctx, key) {
|
|
13945
14126
|
if (key === "editable") return ctx.editable === true;
|
|
13946
14127
|
if (key === "saved") return ctx.view?.unsaved === false;
|
|
@@ -13950,13 +14131,16 @@ function keySatisfied(ctx, key) {
|
|
|
13950
14131
|
if (key === "sourceRefused") return ctx.sourceRefused === true;
|
|
13951
14132
|
if (key === "needsConversion")
|
|
13952
14133
|
return ctx.sourceRefused === true && holdsLaceShapeRefusal(ctx.diagnostics ?? []);
|
|
13953
|
-
if (key === "selection.node")
|
|
13954
|
-
|
|
13955
|
-
if (key === "selection.
|
|
14134
|
+
if (key === "selection.node") return (ctx.selection?.nodes.length ?? 0) > 0;
|
|
14135
|
+
if (key === "selection.several") return (ctx.selection?.nodes.length ?? 0) > 1;
|
|
14136
|
+
if (key === "selection.entryScope")
|
|
14137
|
+
return ctx.view !== void 0 && ctx.selection !== void 0 && inEntryScope(ctx.view, ctx.selection.nodes).length > 0;
|
|
14138
|
+
if (key === "selection.edge") return wiresAlone(ctx) === 1;
|
|
14139
|
+
if (key === "selection.edges") return wiresAlone(ctx) > 0;
|
|
13956
14140
|
if (key === "diagnostics") return ctx.diagnostics !== void 0 && ctx.diagnostics.length > 0;
|
|
13957
14141
|
if (key === "settingsOpen") return ctx.settingsOpen === true;
|
|
13958
14142
|
if (key === "generateIdle") return ctx.generating === false;
|
|
13959
|
-
if (key === "generating") return ctx.generating
|
|
14143
|
+
if (key === "generating") return ctx.generating !== void 0 && ctx.generating !== false;
|
|
13960
14144
|
if (key === "ungenerated") return ctx.view?.ungenerated === true;
|
|
13961
14145
|
if (key === "undoable") return ctx.view?.can_undo === true;
|
|
13962
14146
|
if (key === "redoable") return ctx.view?.can_redo === true;
|
|
@@ -13973,7 +14157,11 @@ function disabledReason(action, ctx, busy) {
|
|
|
13973
14157
|
return void 0;
|
|
13974
14158
|
}
|
|
13975
14159
|
function busyLabelOf(action, ctx, busy) {
|
|
13976
|
-
if (action.busy && keySatisfied(ctx, action.busy.when))
|
|
14160
|
+
if (action.busy && keySatisfied(ctx, action.busy.when)) {
|
|
14161
|
+
const { label } = action.busy;
|
|
14162
|
+
if (typeof label === "string") return label;
|
|
14163
|
+
return ctx.generating ? label[ctx.generating] : void 0;
|
|
14164
|
+
}
|
|
13977
14165
|
if (busy === void 0 || action.binding.kind !== "command") return void 0;
|
|
13978
14166
|
return busy.kind === "run" || busy.running.path === action.binding.path ? action.label : void 0;
|
|
13979
14167
|
}
|
|
@@ -13983,6 +14171,9 @@ function actionState(action, ctx, busy) {
|
|
|
13983
14171
|
busyLabel: busyLabelOf(action, ctx, busy)
|
|
13984
14172
|
};
|
|
13985
14173
|
}
|
|
14174
|
+
function isInert(state) {
|
|
14175
|
+
return state.disabledReason !== void 0 || state.busyLabel !== void 0;
|
|
14176
|
+
}
|
|
13986
14177
|
function missingPort(ports, required) {
|
|
13987
14178
|
return required.find((name) => ports[name] === void 0);
|
|
13988
14179
|
}
|
|
@@ -14084,6 +14275,7 @@ function createActionRunner(ports, store, options = {}) {
|
|
|
14084
14275
|
const notifyControllers = /* @__PURE__ */ new Map();
|
|
14085
14276
|
let edits = 0;
|
|
14086
14277
|
const editingListeners = /* @__PURE__ */ new Set();
|
|
14278
|
+
const tickListeners = /* @__PURE__ */ new Set();
|
|
14087
14279
|
async function asEdit(edit) {
|
|
14088
14280
|
edits += 1;
|
|
14089
14281
|
if (edits === 1) for (const listener of editingListeners) listener(true);
|
|
@@ -14155,7 +14347,10 @@ function createActionRunner(ports, store, options = {}) {
|
|
|
14155
14347
|
},
|
|
14156
14348
|
fail: (error) => run ? store.fail(run.resultKind, token, error) : false,
|
|
14157
14349
|
detach: (kind, tok) => store.detach(kind, tok),
|
|
14158
|
-
tick: () =>
|
|
14350
|
+
tick: () => {
|
|
14351
|
+
store.bumpTick();
|
|
14352
|
+
if (run) for (const listener of tickListeners) listener(run);
|
|
14353
|
+
},
|
|
14159
14354
|
settled: onSettle
|
|
14160
14355
|
};
|
|
14161
14356
|
}
|
|
@@ -14286,8 +14481,9 @@ function createActionRunner(ports, store, options = {}) {
|
|
|
14286
14481
|
const hostSpec = binding.confirm?.(ctx);
|
|
14287
14482
|
if (hostSpec && !await askConfirm(hostSpec)) return;
|
|
14288
14483
|
const token = {};
|
|
14289
|
-
|
|
14290
|
-
|
|
14484
|
+
const rt = runtimeFor(token, readOverOf(ctx), cwdOf(action, ctx));
|
|
14485
|
+
await binding.run(rt, ctx, target);
|
|
14486
|
+
if (binding.invalidates) rt.tick();
|
|
14291
14487
|
}
|
|
14292
14488
|
return {
|
|
14293
14489
|
async run(action, ...rest) {
|
|
@@ -14334,6 +14530,12 @@ function createActionRunner(ports, store, options = {}) {
|
|
|
14334
14530
|
editingListeners.delete(listener);
|
|
14335
14531
|
};
|
|
14336
14532
|
},
|
|
14533
|
+
onDidTick(listener) {
|
|
14534
|
+
tickListeners.add(listener);
|
|
14535
|
+
return () => {
|
|
14536
|
+
tickListeners.delete(listener);
|
|
14537
|
+
};
|
|
14538
|
+
},
|
|
14337
14539
|
busy(action, ctx, target) {
|
|
14338
14540
|
return busyOf(action, ctx, target);
|
|
14339
14541
|
},
|
|
@@ -14353,6 +14555,7 @@ function createActionRunner(ports, store, options = {}) {
|
|
|
14353
14555
|
store.detach("notify", token);
|
|
14354
14556
|
}
|
|
14355
14557
|
notifyControllers.clear();
|
|
14558
|
+
tickListeners.clear();
|
|
14356
14559
|
}
|
|
14357
14560
|
};
|
|
14358
14561
|
}
|
|
@@ -14447,9 +14650,12 @@ function autosave(source, save, policy, report) {
|
|
|
14447
14650
|
export {
|
|
14448
14651
|
uniqueDiagnostics,
|
|
14449
14652
|
diagnosticsOf,
|
|
14653
|
+
entryScopeIds,
|
|
14654
|
+
inEntryScope,
|
|
14450
14655
|
keySatisfied,
|
|
14451
14656
|
disabledReason,
|
|
14452
14657
|
actionState,
|
|
14658
|
+
isInert,
|
|
14453
14659
|
answering,
|
|
14454
14660
|
resolveContributions,
|
|
14455
14661
|
rowActions,
|
|
@@ -14457,6 +14663,8 @@ export {
|
|
|
14457
14663
|
InputMode,
|
|
14458
14664
|
Reason,
|
|
14459
14665
|
currentFrame,
|
|
14666
|
+
GENERATE_STAGES,
|
|
14667
|
+
generatedTree,
|
|
14460
14668
|
ApplyUnobservedError,
|
|
14461
14669
|
CommandExitError,
|
|
14462
14670
|
ConnectError,
|
|
@@ -14488,6 +14696,7 @@ export {
|
|
|
14488
14696
|
MODULE_COMMAND_ACTIONS,
|
|
14489
14697
|
CORE_COMMAND_ACTIONS,
|
|
14490
14698
|
isPlainObject,
|
|
14699
|
+
deepEqual,
|
|
14491
14700
|
createActionRunner,
|
|
14492
14701
|
connectCaller,
|
|
14493
14702
|
bridgeCaller,
|
|
@@ -14496,4 +14705,4 @@ export {
|
|
|
14496
14705
|
AutosaveEndedError,
|
|
14497
14706
|
autosave
|
|
14498
14707
|
};
|
|
14499
|
-
//# sourceMappingURL=chunk-
|
|
14708
|
+
//# sourceMappingURL=chunk-A3ATETIA.mjs.map
|