@niscorp/nova 0.2.1 → 0.3.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/CHANGELOG.md +64 -0
- package/dist/adapters/dom/components/index.cjs +4 -51
- package/dist/adapters/dom/components/index.cjs.map +1 -1
- package/dist/adapters/dom/index.cjs +22 -686
- package/dist/adapters/dom/index.cjs.map +1 -1
- package/dist/adapters/dom/index.js +3 -3
- package/dist/adapters/dom/server.cjs +14 -411
- package/dist/adapters/dom/server.cjs.map +1 -1
- package/dist/adapters/dom/server.js +3 -3
- package/dist/adapters/react/components/index.cjs +87 -562
- package/dist/adapters/react/components/index.cjs.map +1 -1
- package/dist/adapters/react/components/index.js +4 -4
- package/dist/adapters/react/index.cjs +97 -1815
- package/dist/adapters/react/index.cjs.map +1 -1
- package/dist/adapters/react/index.js +4 -4
- package/dist/adapters/tty/components/index.cjs +3 -44
- package/dist/adapters/tty/components/index.cjs.map +1 -1
- package/dist/adapters/tty/index.cjs +13 -5
- package/dist/adapters/tty/index.cjs.map +1 -1
- package/dist/adapters/tty/index.js +2 -2
- package/dist/adapters/vue/components/index.cjs +88 -639
- package/dist/adapters/vue/components/index.cjs.map +1 -1
- package/dist/adapters/vue/components/index.js +4 -4
- package/dist/adapters/vue/index.cjs +96 -962
- package/dist/adapters/vue/index.cjs.map +1 -1
- package/dist/adapters/vue/index.js +5 -5
- package/dist/agent/index.cjs +13 -151
- package/dist/agent/index.cjs.map +1 -1
- package/dist/chunk-5YQIAS4V.cjs +184 -0
- package/dist/chunk-5YQIAS4V.cjs.map +1 -0
- package/dist/{chunk-F2H7WP6R.js → chunk-7MATRNZZ.js} +5 -5
- package/dist/{chunk-F2H7WP6R.js.map → chunk-7MATRNZZ.js.map} +1 -1
- package/dist/chunk-AGEAMUQR.cjs +436 -0
- package/dist/chunk-AGEAMUQR.cjs.map +1 -0
- package/dist/chunk-D4PUWBN6.cjs +72 -0
- package/dist/chunk-D4PUWBN6.cjs.map +1 -0
- package/dist/chunk-ECFWPZGL.cjs +2117 -0
- package/dist/chunk-ECFWPZGL.cjs.map +1 -0
- package/dist/{chunk-VOD5JA4D.js → chunk-EG45GQOE.js} +3 -3
- package/dist/{chunk-VOD5JA4D.js.map → chunk-EG45GQOE.js.map} +1 -1
- package/dist/chunk-FSUMCJAR.cjs +646 -0
- package/dist/chunk-FSUMCJAR.cjs.map +1 -0
- package/dist/chunk-GV7UC3SS.cjs +33 -0
- package/dist/chunk-GV7UC3SS.cjs.map +1 -0
- package/dist/chunk-HYFNOF7Y.cjs +97 -0
- package/dist/chunk-HYFNOF7Y.cjs.map +1 -0
- package/dist/chunk-KOYRJXTI.cjs +123 -0
- package/dist/chunk-KOYRJXTI.cjs.map +1 -0
- package/dist/chunk-KW34ZKF5.cjs +12 -0
- package/dist/chunk-KW34ZKF5.cjs.map +1 -0
- package/dist/chunk-M3UFIUXK.cjs +318 -0
- package/dist/chunk-M3UFIUXK.cjs.map +1 -0
- package/dist/chunk-OE527MXF.cjs +49 -0
- package/dist/chunk-OE527MXF.cjs.map +1 -0
- package/dist/{chunk-DU2VIJAF.js → chunk-P5SJ3QXJ.js} +3 -3
- package/dist/{chunk-DU2VIJAF.js.map → chunk-P5SJ3QXJ.js.map} +1 -1
- package/dist/chunk-PBPUSZIQ.cjs +808 -0
- package/dist/chunk-PBPUSZIQ.cjs.map +1 -0
- package/dist/chunk-PMKWYOOX.cjs +64 -0
- package/dist/chunk-PMKWYOOX.cjs.map +1 -0
- package/dist/chunk-PNQY6OFB.cjs +132 -0
- package/dist/chunk-PNQY6OFB.cjs.map +1 -0
- package/dist/chunk-Q7SFCCGT.cjs +11 -0
- package/dist/chunk-Q7SFCCGT.cjs.map +1 -0
- package/dist/{chunk-SVNK5NIK.js → chunk-QLFHYHJ2.js} +4 -4
- package/dist/{chunk-SVNK5NIK.js.map → chunk-QLFHYHJ2.js.map} +1 -1
- package/dist/{chunk-G4LSLLGI.js → chunk-RB4OMSPA.js} +5 -5
- package/dist/{chunk-G4LSLLGI.js.map → chunk-RB4OMSPA.js.map} +1 -1
- package/dist/chunk-UGG7MCX4.cjs +34 -0
- package/dist/chunk-UGG7MCX4.cjs.map +1 -0
- package/dist/chunk-WGZZKCJQ.cjs +157 -0
- package/dist/chunk-WGZZKCJQ.cjs.map +1 -0
- package/dist/{chunk-3JRTELLC.js → chunk-X5JTZ5LW.js} +3 -3
- package/dist/{chunk-3JRTELLC.js.map → chunk-X5JTZ5LW.js.map} +1 -1
- package/dist/{chunk-Y6XVPRYH.js → chunk-XUSKGJRI.js} +2 -2
- package/dist/chunk-XUSKGJRI.js.map +1 -0
- package/dist/chunk-Z7CS43ZT.cjs +808 -0
- package/dist/chunk-Z7CS43ZT.cjs.map +1 -0
- package/dist/chunk-ZYTWQZZC.cjs +623 -0
- package/dist/chunk-ZYTWQZZC.cjs.map +1 -0
- package/dist/devtools/index.cjs +13 -697
- package/dist/devtools/index.cjs.map +1 -1
- package/dist/devtools/index.js +2 -2
- package/dist/document/index.cjs +56 -301
- package/dist/document/index.cjs.map +1 -1
- package/dist/examples/index.cjs +6 -31
- package/dist/examples/index.cjs.map +1 -1
- package/dist/i18n/index.cjs +44 -292
- package/dist/i18n/index.cjs.map +1 -1
- package/dist/index.cjs +335 -3954
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -2
- package/dist/migrations/index.cjs +7 -590
- package/dist/migrations/index.cjs.map +1 -1
- package/dist/reflect/index.cjs +85 -994
- package/dist/reflect/index.cjs.map +1 -1
- package/dist/reflect/index.js +2 -2
- package/package.json +5 -5
- package/dist/chunk-Y6XVPRYH.js.map +0 -1
package/dist/devtools/index.cjs
CHANGED
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkM3UFIUXK_cjs = require('../chunk-M3UFIUXK.cjs');
|
|
4
|
+
require('../chunk-PBPUSZIQ.cjs');
|
|
5
|
+
require('../chunk-PMKWYOOX.cjs');
|
|
6
|
+
require('../chunk-KOYRJXTI.cjs');
|
|
7
|
+
require('../chunk-GV7UC3SS.cjs');
|
|
8
|
+
require('../chunk-FSUMCJAR.cjs');
|
|
9
|
+
require('../chunk-D4PUWBN6.cjs');
|
|
10
|
+
require('../chunk-KW34ZKF5.cjs');
|
|
11
|
+
require('../chunk-OE527MXF.cjs');
|
|
12
|
+
require('../chunk-Q7SFCCGT.cjs');
|
|
4
13
|
|
|
5
14
|
// src/devtools/dock.ts
|
|
6
15
|
var dockLayout = {
|
|
@@ -304,699 +313,6 @@ var inspectAction = {
|
|
|
304
313
|
]
|
|
305
314
|
};
|
|
306
315
|
|
|
307
|
-
// src/reflect/walk.ts
|
|
308
|
-
var isRecord = (value) => value !== null && typeof value === "object" && !Array.isArray(value);
|
|
309
|
-
var walkNodes = (value, visit) => {
|
|
310
|
-
if (Array.isArray(value)) {
|
|
311
|
-
for (const item of value) walkNodes(item, visit);
|
|
312
|
-
return;
|
|
313
|
-
}
|
|
314
|
-
if (!isRecord(value)) return;
|
|
315
|
-
visit(value);
|
|
316
|
-
for (const inner of Object.values(value)) walkNodes(inner, visit);
|
|
317
|
-
};
|
|
318
|
-
var refsOf = (value) => {
|
|
319
|
-
const out = /* @__PURE__ */ new Set();
|
|
320
|
-
walkNodes(value, (record) => {
|
|
321
|
-
if (record["component"] === void 0 || !isRecord(record["props"])) return;
|
|
322
|
-
walkNodes(record["props"], (props) => {
|
|
323
|
-
for (const [key, propValue] of Object.entries(props)) {
|
|
324
|
-
if ((key === "ref" || key.endsWith("Ref")) && typeof propValue === "string" && propValue !== "") out.add(propValue);
|
|
325
|
-
}
|
|
326
|
-
});
|
|
327
|
-
});
|
|
328
|
-
return out;
|
|
329
|
-
};
|
|
330
|
-
var loopVarsOf = (value) => {
|
|
331
|
-
const out = /* @__PURE__ */ new Set();
|
|
332
|
-
walkNodes(value, (record) => {
|
|
333
|
-
if (typeof record["as"] === "string" && record["for"] !== void 0) out.add(record["as"]);
|
|
334
|
-
});
|
|
335
|
-
return out;
|
|
336
|
-
};
|
|
337
|
-
|
|
338
|
-
// src/shared/common.ts
|
|
339
|
-
var isObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
340
|
-
var isArray = (value) => Array.isArray(value);
|
|
341
|
-
var hasKey = (obj, key) => isObject(obj) && key in obj;
|
|
342
|
-
|
|
343
|
-
// src/shared/bindings/paths.ts
|
|
344
|
-
var splitPath = (path) => {
|
|
345
|
-
if (path.length === 0) return [];
|
|
346
|
-
return path.split(".");
|
|
347
|
-
};
|
|
348
|
-
var isIndex = (segment) => /^\d+$/.test(segment);
|
|
349
|
-
var cloneContainer = (value, nextSegment) => {
|
|
350
|
-
if (isArray(value)) return value.slice();
|
|
351
|
-
if (isObject(value)) return { ...value };
|
|
352
|
-
if (nextSegment !== void 0 && isIndex(nextSegment)) return [];
|
|
353
|
-
return {};
|
|
354
|
-
};
|
|
355
|
-
var writeSegment = (container, segment, value) => {
|
|
356
|
-
if (isArray(container)) {
|
|
357
|
-
if (isIndex(segment)) {
|
|
358
|
-
const index = Number.parseInt(segment, 10);
|
|
359
|
-
container[index] = value;
|
|
360
|
-
}
|
|
361
|
-
return;
|
|
362
|
-
}
|
|
363
|
-
container[segment] = value;
|
|
364
|
-
};
|
|
365
|
-
var readSegment = (container, segment) => {
|
|
366
|
-
if (isArray(container)) {
|
|
367
|
-
if (!isIndex(segment)) return void 0;
|
|
368
|
-
const index = Number.parseInt(segment, 10);
|
|
369
|
-
return container[index];
|
|
370
|
-
}
|
|
371
|
-
return container[segment];
|
|
372
|
-
};
|
|
373
|
-
var getPath = (data, path) => {
|
|
374
|
-
const segments = splitPath(path);
|
|
375
|
-
let current = data;
|
|
376
|
-
for (const segment of segments) {
|
|
377
|
-
if (current === void 0 || current === null) return void 0;
|
|
378
|
-
if (isArray(current)) {
|
|
379
|
-
if (isIndex(segment)) {
|
|
380
|
-
const index = Number.parseInt(segment, 10);
|
|
381
|
-
current = current[index];
|
|
382
|
-
continue;
|
|
383
|
-
}
|
|
384
|
-
if (segment === "length") {
|
|
385
|
-
current = current.length;
|
|
386
|
-
continue;
|
|
387
|
-
}
|
|
388
|
-
return void 0;
|
|
389
|
-
}
|
|
390
|
-
if (isObject(current)) {
|
|
391
|
-
if (segment in current) {
|
|
392
|
-
current = current[segment];
|
|
393
|
-
continue;
|
|
394
|
-
}
|
|
395
|
-
return void 0;
|
|
396
|
-
}
|
|
397
|
-
return void 0;
|
|
398
|
-
}
|
|
399
|
-
return current;
|
|
400
|
-
};
|
|
401
|
-
var setPath = (data, path, value) => {
|
|
402
|
-
const segments = splitPath(path);
|
|
403
|
-
if (segments.length === 0) return value;
|
|
404
|
-
const root = cloneContainer(data, segments[0]);
|
|
405
|
-
let parent = root;
|
|
406
|
-
for (let i = 0; i < segments.length - 1; i += 1) {
|
|
407
|
-
const segment = segments[i];
|
|
408
|
-
const nextSegment = segments[i + 1];
|
|
409
|
-
if (segment === void 0) continue;
|
|
410
|
-
const existing = readSegment(parent, segment);
|
|
411
|
-
const cloned = cloneContainer(existing, nextSegment);
|
|
412
|
-
writeSegment(parent, segment, cloned);
|
|
413
|
-
parent = cloned;
|
|
414
|
-
}
|
|
415
|
-
const last = segments[segments.length - 1];
|
|
416
|
-
if (last !== void 0) writeSegment(parent, last, value);
|
|
417
|
-
return root;
|
|
418
|
-
};
|
|
419
|
-
var deletePath = (data, path) => {
|
|
420
|
-
const segments = splitPath(path);
|
|
421
|
-
if (segments.length === 0) return void 0;
|
|
422
|
-
const root = cloneContainer(data, segments[0]);
|
|
423
|
-
let parent = root;
|
|
424
|
-
for (let i = 0; i < segments.length - 1; i += 1) {
|
|
425
|
-
const segment = segments[i];
|
|
426
|
-
const nextSegment = segments[i + 1];
|
|
427
|
-
if (segment === void 0) continue;
|
|
428
|
-
const existing = readSegment(parent, segment);
|
|
429
|
-
if (existing === void 0 || existing === null) return root;
|
|
430
|
-
const cloned = cloneContainer(existing, nextSegment);
|
|
431
|
-
writeSegment(parent, segment, cloned);
|
|
432
|
-
parent = cloned;
|
|
433
|
-
}
|
|
434
|
-
const last = segments[segments.length - 1];
|
|
435
|
-
if (last === void 0) return root;
|
|
436
|
-
if (isArray(parent)) {
|
|
437
|
-
if (isIndex(last)) {
|
|
438
|
-
const index = Number.parseInt(last, 10);
|
|
439
|
-
parent.splice(index, 1);
|
|
440
|
-
}
|
|
441
|
-
} else {
|
|
442
|
-
delete parent[last];
|
|
443
|
-
}
|
|
444
|
-
return root;
|
|
445
|
-
};
|
|
446
|
-
|
|
447
|
-
// src/action/mutations/ops/set.ts
|
|
448
|
-
var SetByValueSchema = zod.z.object({
|
|
449
|
-
set: zod.z.string().describe('Data path to write to, e.g. "user.name" or "items.0.title".'),
|
|
450
|
-
value: zod.z.unknown().describe("Literal value to write at the path.")
|
|
451
|
-
}).strict().describe("Set a field at a path to a literal value.");
|
|
452
|
-
var SetByFromSchema = zod.z.object({
|
|
453
|
-
set: zod.z.string().describe("Data path to write to."),
|
|
454
|
-
from: zod.z.string().describe("Data path (or template path) to read the value from.")
|
|
455
|
-
}).strict().describe("Set a field at a path by copying from another path.");
|
|
456
|
-
var setValueOp = {
|
|
457
|
-
key: "set",
|
|
458
|
-
schema: SetByValueSchema,
|
|
459
|
-
match: (mutation) => hasKey(mutation, "set") && hasKey(mutation, "value"),
|
|
460
|
-
apply: (data, mutation) => {
|
|
461
|
-
const next = setPath(data, mutation.set, mutation.value);
|
|
462
|
-
return isObject(next) ? next : data;
|
|
463
|
-
}
|
|
464
|
-
};
|
|
465
|
-
var setFromOp = {
|
|
466
|
-
key: "set",
|
|
467
|
-
schema: SetByFromSchema,
|
|
468
|
-
match: (mutation) => hasKey(mutation, "set") && hasKey(mutation, "from"),
|
|
469
|
-
apply: (data, mutation) => {
|
|
470
|
-
const value = getPath(data, mutation.from);
|
|
471
|
-
const next = setPath(data, mutation.set, value);
|
|
472
|
-
return isObject(next) ? next : data;
|
|
473
|
-
}
|
|
474
|
-
};
|
|
475
|
-
var ToggleSchema = zod.z.object({
|
|
476
|
-
toggle: zod.z.string().describe("Boolean data path to flip.")
|
|
477
|
-
}).strict().describe("Flip a boolean at the given path.");
|
|
478
|
-
var toggleOp = {
|
|
479
|
-
key: "toggle",
|
|
480
|
-
schema: ToggleSchema,
|
|
481
|
-
apply: (data, mutation) => {
|
|
482
|
-
const current = getPath(data, mutation.toggle);
|
|
483
|
-
const flipped = !(current === true);
|
|
484
|
-
const next = setPath(data, mutation.toggle, flipped);
|
|
485
|
-
return isObject(next) ? next : data;
|
|
486
|
-
}
|
|
487
|
-
};
|
|
488
|
-
var IncrementSchema = zod.z.object({
|
|
489
|
-
increment: zod.z.string().describe("Numeric data path to increment."),
|
|
490
|
-
by: zod.z.number().optional().describe("Amount to increment by; defaults to 1.")
|
|
491
|
-
}).strict().describe("Increment a numeric field.");
|
|
492
|
-
var incrementOp = {
|
|
493
|
-
key: "increment",
|
|
494
|
-
schema: IncrementSchema,
|
|
495
|
-
apply: (data, mutation) => {
|
|
496
|
-
const current = getPath(data, mutation.increment);
|
|
497
|
-
const base = typeof current === "number" ? current : 0;
|
|
498
|
-
const by = mutation.by ?? 1;
|
|
499
|
-
const next = setPath(data, mutation.increment, base + by);
|
|
500
|
-
return isObject(next) ? next : data;
|
|
501
|
-
}
|
|
502
|
-
};
|
|
503
|
-
var DecrementSchema = zod.z.object({
|
|
504
|
-
decrement: zod.z.string().describe("Numeric data path to decrement."),
|
|
505
|
-
by: zod.z.number().optional().describe("Amount to decrement by; defaults to 1.")
|
|
506
|
-
}).strict().describe("Decrement a numeric field.");
|
|
507
|
-
var decrementOp = {
|
|
508
|
-
key: "decrement",
|
|
509
|
-
schema: DecrementSchema,
|
|
510
|
-
apply: (data, mutation) => {
|
|
511
|
-
const current = getPath(data, mutation.decrement);
|
|
512
|
-
const base = typeof current === "number" ? current : 0;
|
|
513
|
-
const by = mutation.by ?? 1;
|
|
514
|
-
const next = setPath(data, mutation.decrement, base - by);
|
|
515
|
-
return isObject(next) ? next : data;
|
|
516
|
-
}
|
|
517
|
-
};
|
|
518
|
-
|
|
519
|
-
// src/shared/errors.ts
|
|
520
|
-
var ErrorCodes = {
|
|
521
|
-
mutation: "MUTATION_ERROR"};
|
|
522
|
-
var NovaError = class extends Error {
|
|
523
|
-
code;
|
|
524
|
-
context;
|
|
525
|
-
constructor(code, message, context, options) {
|
|
526
|
-
super(message, options);
|
|
527
|
-
this.name = "NovaError";
|
|
528
|
-
this.code = code;
|
|
529
|
-
this.context = context;
|
|
530
|
-
}
|
|
531
|
-
};
|
|
532
|
-
var MutationError = class extends NovaError {
|
|
533
|
-
constructor(message, context, options) {
|
|
534
|
-
super(ErrorCodes.mutation, message, context, options);
|
|
535
|
-
this.name = "MutationError";
|
|
536
|
-
}
|
|
537
|
-
};
|
|
538
|
-
|
|
539
|
-
// src/action/mutations/ops/push.ts
|
|
540
|
-
var PushSchema = zod.z.object({
|
|
541
|
-
push: zod.z.string().describe("Array data path to append to."),
|
|
542
|
-
value: zod.z.unknown().optional().describe("Value to append.")
|
|
543
|
-
}).strict().describe("Append a value to an array field.");
|
|
544
|
-
var pushOp = {
|
|
545
|
-
key: "push",
|
|
546
|
-
schema: PushSchema,
|
|
547
|
-
// Guard against the PushEffect navigation effect whose `push` is an object.
|
|
548
|
-
match: (mutation) => typeof mutation.push === "string",
|
|
549
|
-
apply: (data, mutation, ctx) => {
|
|
550
|
-
const current = getPath(data, mutation.push);
|
|
551
|
-
if (current !== void 0 && !isArray(current)) {
|
|
552
|
-
if (ctx.strict) {
|
|
553
|
-
throw new MutationError(
|
|
554
|
-
`push: path "${mutation.push}" is not an array`,
|
|
555
|
-
{ op: "push", path: mutation.push, reason: "wrong-type" }
|
|
556
|
-
);
|
|
557
|
-
}
|
|
558
|
-
return data;
|
|
559
|
-
}
|
|
560
|
-
if (current === void 0 && ctx.strict) {
|
|
561
|
-
throw new MutationError(
|
|
562
|
-
`push: path "${mutation.push}" does not exist`,
|
|
563
|
-
{ op: "push", path: mutation.push, reason: "missing" }
|
|
564
|
-
);
|
|
565
|
-
}
|
|
566
|
-
const arr = isArray(current) ? current.slice() : [];
|
|
567
|
-
arr.push(mutation.value);
|
|
568
|
-
const next = setPath(data, mutation.push, arr);
|
|
569
|
-
return isObject(next) ? next : data;
|
|
570
|
-
}
|
|
571
|
-
};
|
|
572
|
-
var PopSchema = zod.z.object({
|
|
573
|
-
pop: zod.z.string().describe("Array data path to remove the last element from.")
|
|
574
|
-
}).strict().describe("Remove the last element from an array field.");
|
|
575
|
-
var popOp = {
|
|
576
|
-
key: "pop",
|
|
577
|
-
schema: PopSchema,
|
|
578
|
-
// Guard against the PopEffect whose `pop` is the literal `true`.
|
|
579
|
-
match: (mutation) => typeof mutation.pop === "string",
|
|
580
|
-
apply: (data, mutation, ctx) => {
|
|
581
|
-
const current = getPath(data, mutation.pop);
|
|
582
|
-
if (!isArray(current)) {
|
|
583
|
-
if (ctx.strict) {
|
|
584
|
-
throw new MutationError(
|
|
585
|
-
`pop: path "${mutation.pop}" ${current === void 0 ? "does not exist" : "is not an array"}`,
|
|
586
|
-
{ op: "pop", path: mutation.pop, reason: current === void 0 ? "missing" : "wrong-type" }
|
|
587
|
-
);
|
|
588
|
-
}
|
|
589
|
-
return data;
|
|
590
|
-
}
|
|
591
|
-
const arr = current.slice();
|
|
592
|
-
arr.pop();
|
|
593
|
-
const next = setPath(data, mutation.pop, arr);
|
|
594
|
-
return isObject(next) ? next : data;
|
|
595
|
-
}
|
|
596
|
-
};
|
|
597
|
-
var RemoveAtSchema = zod.z.object({
|
|
598
|
-
removeAt: zod.z.string().describe("Array data path to remove an element from."),
|
|
599
|
-
index: zod.z.union([zod.z.number().int(), zod.z.string()]).describe('Index to remove. A string is a template (e.g. "{{@event.payload}}") resolved before applying.')
|
|
600
|
-
}).strict().describe("Remove an element at a specific index of an array field.");
|
|
601
|
-
var removeAtOp = {
|
|
602
|
-
key: "removeAt",
|
|
603
|
-
schema: RemoveAtSchema,
|
|
604
|
-
apply: (data, mutation, ctx) => {
|
|
605
|
-
const current = getPath(data, mutation.removeAt);
|
|
606
|
-
if (!isArray(current)) {
|
|
607
|
-
if (ctx.strict) {
|
|
608
|
-
throw new MutationError(
|
|
609
|
-
`removeAt: path "${mutation.removeAt}" ${current === void 0 ? "does not exist" : "is not an array"}`,
|
|
610
|
-
{
|
|
611
|
-
op: "removeAt",
|
|
612
|
-
path: mutation.removeAt,
|
|
613
|
-
reason: current === void 0 ? "missing" : "wrong-type"
|
|
614
|
-
}
|
|
615
|
-
);
|
|
616
|
-
}
|
|
617
|
-
return data;
|
|
618
|
-
}
|
|
619
|
-
const index = Number(mutation.index);
|
|
620
|
-
if (!Number.isInteger(index)) return data;
|
|
621
|
-
const arr = current.slice();
|
|
622
|
-
arr.splice(index, 1);
|
|
623
|
-
const next = setPath(data, mutation.removeAt, arr);
|
|
624
|
-
return isObject(next) ? next : data;
|
|
625
|
-
}
|
|
626
|
-
};
|
|
627
|
-
var MoveSchema = zod.z.object({
|
|
628
|
-
move: zod.z.string().describe("Array data path to reorder within."),
|
|
629
|
-
from: zod.z.union([zod.z.number().int(), zod.z.string()]).describe('Index to move. A string is a template (e.g. "{{@event.payload}}") resolved before applying.'),
|
|
630
|
-
to: zod.z.union([zod.z.number().int(), zod.z.string()]).describe("Destination index. A string is a template resolved before applying.")
|
|
631
|
-
}).strict().describe("Move an array element from one index to another.");
|
|
632
|
-
var moveOp = {
|
|
633
|
-
key: "move",
|
|
634
|
-
schema: MoveSchema,
|
|
635
|
-
apply: (data, mutation, ctx) => {
|
|
636
|
-
const current = getPath(data, mutation.move);
|
|
637
|
-
if (!isArray(current)) {
|
|
638
|
-
if (ctx.strict) {
|
|
639
|
-
throw new MutationError(
|
|
640
|
-
`move: path "${mutation.move}" ${current === void 0 ? "does not exist" : "is not an array"}`,
|
|
641
|
-
{
|
|
642
|
-
op: "move",
|
|
643
|
-
path: mutation.move,
|
|
644
|
-
reason: current === void 0 ? "missing" : "wrong-type"
|
|
645
|
-
}
|
|
646
|
-
);
|
|
647
|
-
}
|
|
648
|
-
return data;
|
|
649
|
-
}
|
|
650
|
-
const from = Number(mutation.from);
|
|
651
|
-
const to = Number(mutation.to);
|
|
652
|
-
if (!Number.isInteger(from) || !Number.isInteger(to)) return data;
|
|
653
|
-
if (from < 0 || from >= current.length) return data;
|
|
654
|
-
const arr = current.slice();
|
|
655
|
-
const [item] = arr.splice(from, 1);
|
|
656
|
-
arr.splice(Math.max(0, Math.min(to, arr.length)), 0, item);
|
|
657
|
-
const next = setPath(data, mutation.move, arr);
|
|
658
|
-
return isObject(next) ? next : data;
|
|
659
|
-
}
|
|
660
|
-
};
|
|
661
|
-
var ClearSchema = zod.z.object({
|
|
662
|
-
clear: zod.z.string().describe("Array or object data path to clear.")
|
|
663
|
-
}).strict().describe("Clear an array or object field.");
|
|
664
|
-
var clearOp = {
|
|
665
|
-
key: "clear",
|
|
666
|
-
schema: ClearSchema,
|
|
667
|
-
apply: (data, mutation, ctx) => {
|
|
668
|
-
const current = getPath(data, mutation.clear);
|
|
669
|
-
if (isArray(current)) {
|
|
670
|
-
const next2 = setPath(data, mutation.clear, []);
|
|
671
|
-
return isObject(next2) ? next2 : data;
|
|
672
|
-
}
|
|
673
|
-
if (isObject(current)) {
|
|
674
|
-
const next2 = setPath(data, mutation.clear, {});
|
|
675
|
-
return isObject(next2) ? next2 : data;
|
|
676
|
-
}
|
|
677
|
-
if (ctx.strict) {
|
|
678
|
-
throw new MutationError(
|
|
679
|
-
`clear: path "${mutation.clear}" ${current === void 0 ? "does not exist" : "is not an array or object"}`,
|
|
680
|
-
{
|
|
681
|
-
op: "clear",
|
|
682
|
-
path: mutation.clear,
|
|
683
|
-
reason: current === void 0 ? "missing" : "wrong-type"
|
|
684
|
-
}
|
|
685
|
-
);
|
|
686
|
-
}
|
|
687
|
-
const next = deletePath(data, mutation.clear);
|
|
688
|
-
return isObject(next) ? next : data;
|
|
689
|
-
}
|
|
690
|
-
};
|
|
691
|
-
var ResetSchema = zod.z.object({
|
|
692
|
-
reset: zod.z.string().describe("Data path to reset to its initial (definition.data) value.")
|
|
693
|
-
}).strict().describe("Reset a field to its initial value from the action definition.");
|
|
694
|
-
var resetOp = {
|
|
695
|
-
key: "reset",
|
|
696
|
-
schema: ResetSchema,
|
|
697
|
-
apply: (data, mutation, ctx) => {
|
|
698
|
-
const initialValue = getPath(ctx.initial, mutation.reset);
|
|
699
|
-
const next = setPath(data, mutation.reset, initialValue);
|
|
700
|
-
return isObject(next) ? next : data;
|
|
701
|
-
}
|
|
702
|
-
};
|
|
703
|
-
|
|
704
|
-
// src/action/mutations/ops/index.ts
|
|
705
|
-
var OPS = [
|
|
706
|
-
setValueOp,
|
|
707
|
-
setFromOp,
|
|
708
|
-
toggleOp,
|
|
709
|
-
incrementOp,
|
|
710
|
-
decrementOp,
|
|
711
|
-
pushOp,
|
|
712
|
-
popOp,
|
|
713
|
-
removeAtOp,
|
|
714
|
-
moveOp,
|
|
715
|
-
clearOp,
|
|
716
|
-
resetOp
|
|
717
|
-
];
|
|
718
|
-
zod.z.union(
|
|
719
|
-
OPS.map((op) => op.schema)
|
|
720
|
-
).describe("A single immutable mutation applied to the action data.");
|
|
721
|
-
|
|
722
|
-
// src/agent/affordances.ts
|
|
723
|
-
var KEY_PATTERN = /\$\.([A-Za-z_][A-Za-z0-9_]*)/g;
|
|
724
|
-
var VAR_PATTERN = /\$([A-Za-z_][A-Za-z0-9_]*)\./g;
|
|
725
|
-
var collectInteractive = (layout) => {
|
|
726
|
-
const refs = [];
|
|
727
|
-
const models = [];
|
|
728
|
-
const boundKeys = /* @__PURE__ */ new Set();
|
|
729
|
-
const suspects = /* @__PURE__ */ new Set();
|
|
730
|
-
let componentCount = 0;
|
|
731
|
-
const scanString = (value, scope) => {
|
|
732
|
-
for (const match of value.matchAll(KEY_PATTERN)) {
|
|
733
|
-
const key = match[1];
|
|
734
|
-
if (key !== void 0) boundKeys.add(key);
|
|
735
|
-
}
|
|
736
|
-
for (const match of value.matchAll(VAR_PATTERN)) {
|
|
737
|
-
const name = match[1];
|
|
738
|
-
if (name !== void 0 && !scope.has(name)) suspects.add(`$${name}.`);
|
|
739
|
-
}
|
|
740
|
-
};
|
|
741
|
-
const walk = (node, scope) => {
|
|
742
|
-
if (typeof node === "string") return scanString(node, scope);
|
|
743
|
-
if (Array.isArray(node)) {
|
|
744
|
-
for (const child of node) walk(child, scope);
|
|
745
|
-
return;
|
|
746
|
-
}
|
|
747
|
-
if (node === null || typeof node !== "object") return;
|
|
748
|
-
const record = node;
|
|
749
|
-
const loopVar = record["for"] !== void 0 && typeof record["as"] === "string" ? record["as"] : void 0;
|
|
750
|
-
const childScope = loopVar !== void 0 ? /* @__PURE__ */ new Set([...scope, loopVar]) : scope;
|
|
751
|
-
const component = typeof record["component"] === "string" ? record["component"] : void 0;
|
|
752
|
-
if (component !== void 0) {
|
|
753
|
-
componentCount += 1;
|
|
754
|
-
if (typeof record["ref"] === "string" && record["ref"].length > 0) {
|
|
755
|
-
refs.push({ ref: record["ref"], component, via: "ref" });
|
|
756
|
-
}
|
|
757
|
-
if (typeof record["model"] === "string" && record["model"].length > 0) {
|
|
758
|
-
models.push({ path: record["model"], component });
|
|
759
|
-
}
|
|
760
|
-
const props = record["props"];
|
|
761
|
-
if (props !== null && typeof props === "object" && !Array.isArray(props)) {
|
|
762
|
-
for (const [key, value] of Object.entries(props)) {
|
|
763
|
-
if (key.endsWith("Ref") && typeof value === "string" && value.length > 0) {
|
|
764
|
-
refs.push({ ref: value, component, via: key });
|
|
765
|
-
}
|
|
766
|
-
}
|
|
767
|
-
}
|
|
768
|
-
}
|
|
769
|
-
for (const value of Object.values(record)) walk(value, childScope);
|
|
770
|
-
};
|
|
771
|
-
walk(layout, /* @__PURE__ */ new Set());
|
|
772
|
-
return {
|
|
773
|
-
refs,
|
|
774
|
-
models,
|
|
775
|
-
boundKeys: [...boundKeys].sort(),
|
|
776
|
-
suspectBindings: [...suspects].sort(),
|
|
777
|
-
componentCount
|
|
778
|
-
};
|
|
779
|
-
};
|
|
780
|
-
|
|
781
|
-
// src/action/grammar.ts
|
|
782
|
-
var MUTATION_KEYS = [...new Set(OPS.map((op) => op.key))];
|
|
783
|
-
OPS.map((op) => op.match ?? ((step) => op.key in step));
|
|
784
|
-
|
|
785
|
-
// src/action/audit.ts
|
|
786
|
-
var collectChannels = (definition) => {
|
|
787
|
-
const emits = /* @__PURE__ */ new Set();
|
|
788
|
-
const listens = /* @__PURE__ */ new Set();
|
|
789
|
-
const walkSteps = (list) => {
|
|
790
|
-
if (!Array.isArray(list)) return;
|
|
791
|
-
for (const step of list) {
|
|
792
|
-
if (!isRecord2(step)) continue;
|
|
793
|
-
const emit = step["emit"];
|
|
794
|
-
if (isRecord2(emit) && typeof emit["channel"] === "string") emits.add(emit["channel"]);
|
|
795
|
-
if (typeof step["call"] === "string") {
|
|
796
|
-
walkSteps(step["onSuccess"]);
|
|
797
|
-
walkSteps(step["onError"]);
|
|
798
|
-
}
|
|
799
|
-
}
|
|
800
|
-
};
|
|
801
|
-
for (const trigger of definition.triggers ?? []) {
|
|
802
|
-
if (typeof trigger.message === "string") listens.add(trigger.message);
|
|
803
|
-
walkSteps(trigger.do);
|
|
804
|
-
}
|
|
805
|
-
for (const hook of Object.values(definition.lifecycle ?? {})) walkSteps(hook);
|
|
806
|
-
return { emits: [...emits].sort(), listens: [...listens].sort() };
|
|
807
|
-
};
|
|
808
|
-
var firstSegment = (path) => {
|
|
809
|
-
const segment = path.split(".")[0];
|
|
810
|
-
return segment === void 0 || segment.length === 0 ? path : segment;
|
|
811
|
-
};
|
|
812
|
-
var isRecord2 = (value) => value !== null && typeof value === "object" && !Array.isArray(value);
|
|
813
|
-
var navTargetOf = (step) => {
|
|
814
|
-
for (const key of ["push", "replace", "resetTo"]) {
|
|
815
|
-
const value = step[key];
|
|
816
|
-
if (isRecord2(value) && typeof value["action"] === "string") {
|
|
817
|
-
const input = value["input"];
|
|
818
|
-
return { action: value["action"], ...isRecord2(input) ? { input } : {} };
|
|
819
|
-
}
|
|
820
|
-
}
|
|
821
|
-
return void 0;
|
|
822
|
-
};
|
|
823
|
-
var auditAction = (definition, options) => {
|
|
824
|
-
const issues = [];
|
|
825
|
-
const dataKeys = new Set(Object.keys(definition.data ?? {}));
|
|
826
|
-
const endpointNames = new Set(Object.keys(definition.endpoints ?? {}));
|
|
827
|
-
const steps = [];
|
|
828
|
-
const pushSteps = (list) => {
|
|
829
|
-
if (!Array.isArray(list)) return;
|
|
830
|
-
for (const step of list) {
|
|
831
|
-
if (!isRecord2(step)) continue;
|
|
832
|
-
steps.push(step);
|
|
833
|
-
if (typeof step["call"] === "string") {
|
|
834
|
-
pushSteps(step["onSuccess"]);
|
|
835
|
-
pushSteps(step["onError"]);
|
|
836
|
-
}
|
|
837
|
-
}
|
|
838
|
-
};
|
|
839
|
-
for (const trigger of definition.triggers ?? []) pushSteps(trigger.do);
|
|
840
|
-
for (const hook of Object.values(definition.lifecycle ?? {})) pushSteps(hook);
|
|
841
|
-
for (const step of steps) {
|
|
842
|
-
const call = step["call"];
|
|
843
|
-
if (typeof call === "string" && !endpointNames.has(call)) {
|
|
844
|
-
issues.push(`step calls endpoint "${call}" but endpoints has no "${call}"`);
|
|
845
|
-
}
|
|
846
|
-
for (const key of MUTATION_KEYS) {
|
|
847
|
-
const path = step[key];
|
|
848
|
-
if (typeof path === "string" && path.length > 0 && !dataKeys.has(firstSegment(path))) {
|
|
849
|
-
issues.push(`step "${key}: ${path}" writes a key with no default in data`);
|
|
850
|
-
}
|
|
851
|
-
}
|
|
852
|
-
const nav = navTargetOf(step);
|
|
853
|
-
if (nav !== void 0 && options?.catalog !== void 0) {
|
|
854
|
-
const entry = options.catalog.find((candidate) => candidate.id === nav.action);
|
|
855
|
-
if (entry === void 0 && nav.action !== definition.id) {
|
|
856
|
-
issues.push(`step pushes action "${nav.action}" which is not in the catalog`);
|
|
857
|
-
continue;
|
|
858
|
-
}
|
|
859
|
-
const properties = entry?.input?.["properties"];
|
|
860
|
-
if (nav.input !== void 0 && isRecord2(properties)) {
|
|
861
|
-
for (const key of Object.keys(nav.input)) {
|
|
862
|
-
if (!(key in properties)) {
|
|
863
|
-
issues.push(`push to "${nav.action}" seeds input key "${key}" which is not in its input contract`);
|
|
864
|
-
}
|
|
865
|
-
}
|
|
866
|
-
}
|
|
867
|
-
}
|
|
868
|
-
}
|
|
869
|
-
for (const [name, endpoint] of Object.entries(definition.endpoints ?? {})) {
|
|
870
|
-
for (const field of ["target", "errorTarget"]) {
|
|
871
|
-
const target = endpoint[field];
|
|
872
|
-
if (typeof target === "string" && target.length > 0 && !dataKeys.has(firstSegment(target))) {
|
|
873
|
-
issues.push(`endpoint "${name}" ${field} "${target}" has no default in data`);
|
|
874
|
-
}
|
|
875
|
-
}
|
|
876
|
-
}
|
|
877
|
-
if (options?.channels !== void 0) {
|
|
878
|
-
const known = new Set(options.channels);
|
|
879
|
-
const usage = collectChannels(definition);
|
|
880
|
-
for (const channel of usage.listens) {
|
|
881
|
-
if (!known.has(channel) && !usage.emits.includes(channel)) {
|
|
882
|
-
issues.push(`trigger listens on channel "${channel}" which nothing is known to emit`);
|
|
883
|
-
}
|
|
884
|
-
}
|
|
885
|
-
for (const channel of usage.emits) {
|
|
886
|
-
if (!known.has(channel) && !usage.listens.includes(channel)) {
|
|
887
|
-
issues.push(`step emits channel "${channel}" which nothing is known to listen on`);
|
|
888
|
-
}
|
|
889
|
-
}
|
|
890
|
-
}
|
|
891
|
-
if (definition.layout !== void 0 && typeof definition.layout !== "string") {
|
|
892
|
-
const surface = collectInteractive(definition.layout);
|
|
893
|
-
for (const key of surface.boundKeys) {
|
|
894
|
-
if (!dataKeys.has(key)) {
|
|
895
|
-
issues.push(`layout binds "$.${key}" but data has no "${key}" default`);
|
|
896
|
-
}
|
|
897
|
-
}
|
|
898
|
-
for (const suspect of surface.suspectBindings) {
|
|
899
|
-
issues.push(
|
|
900
|
-
`layout binding "${suspect}\u2026" is malformed \u2014 the data root is "$." ("$.key"), and "$name." is only legal for a loop variable declared by an enclosing for/as`
|
|
901
|
-
);
|
|
902
|
-
}
|
|
903
|
-
const layoutRefs = new Set(surface.refs.map((entry) => entry.ref));
|
|
904
|
-
const triggerRefs = new Set(
|
|
905
|
-
(definition.triggers ?? []).map((trigger) => trigger.ref).filter((ref) => typeof ref === "string")
|
|
906
|
-
);
|
|
907
|
-
for (const ref of layoutRefs) {
|
|
908
|
-
if (!triggerRefs.has(ref)) {
|
|
909
|
-
issues.push(`layout ref "${ref}" has no trigger \u2014 dead chrome`);
|
|
910
|
-
}
|
|
911
|
-
}
|
|
912
|
-
for (const ref of triggerRefs) {
|
|
913
|
-
if (!layoutRefs.has(ref)) {
|
|
914
|
-
issues.push(`trigger listens on ref "${ref}" but no layout node carries it`);
|
|
915
|
-
}
|
|
916
|
-
}
|
|
917
|
-
}
|
|
918
|
-
return { ok: issues.length === 0, issues };
|
|
919
|
-
};
|
|
920
|
-
|
|
921
|
-
// src/reflect/audit.ts
|
|
922
|
-
var classifyAudit = (issue, definition) => {
|
|
923
|
-
const layout = typeof definition.layout === "object" ? definition.layout : void 0;
|
|
924
|
-
const bind = issue.match(/binds "\$\.([\w.]+)"/);
|
|
925
|
-
if (bind !== null) {
|
|
926
|
-
const root = (bind[1] ?? "").split(".")[0] ?? "";
|
|
927
|
-
if (root === "index" || root === "items") {
|
|
928
|
-
return { kind: "info", tag: "loop scope", reason: `\`${root}\` is a renderer-reserved loop variable` };
|
|
929
|
-
}
|
|
930
|
-
if (loopVarsOf(layout).has(root)) {
|
|
931
|
-
return { kind: "info", tag: "loop var", reason: `\`${root}\` is a loop \`as:\` variable \u2014 in scope at runtime` };
|
|
932
|
-
}
|
|
933
|
-
}
|
|
934
|
-
const ref = issue.match(/ref "([^"]+)"/);
|
|
935
|
-
if (ref !== null && issue.includes("listens") && refsOf(layout).has(ref[1] ?? "")) {
|
|
936
|
-
return { kind: "info", tag: "prop ref", reason: "dispatched by a component from a props value (e.g. Table rowRef / cell.ref)" };
|
|
937
|
-
}
|
|
938
|
-
if (issue.includes("{{")) {
|
|
939
|
-
return { kind: "info", tag: "template", reason: "target resolves from data at runtime \u2014 statically unknowable" };
|
|
940
|
-
}
|
|
941
|
-
return { kind: "address" };
|
|
942
|
-
};
|
|
943
|
-
var auditCatalog = (definitions) => {
|
|
944
|
-
const defs = Array.isArray(definitions) ? [...definitions] : Object.values(definitions);
|
|
945
|
-
const catalog = defs.map((definition) => ({ id: definition.id, ...definition.input !== void 0 ? { input: definition.input } : {} }));
|
|
946
|
-
const channels = [
|
|
947
|
-
...new Set(
|
|
948
|
-
defs.flatMap((definition) => {
|
|
949
|
-
const usage = collectChannels(definition);
|
|
950
|
-
return [...usage.emits, ...usage.listens];
|
|
951
|
-
})
|
|
952
|
-
)
|
|
953
|
-
];
|
|
954
|
-
return defs.map((definition) => {
|
|
955
|
-
const issues = auditAction(definition, { catalog, channels }).issues.map((issue) => ({ issue, ...classifyAudit(issue, definition) }));
|
|
956
|
-
issues.sort((a, b) => Number(a.kind === "info") - Number(b.kind === "info"));
|
|
957
|
-
return { id: definition.id, address: issues.filter((issue) => issue.kind === "address").length, issues };
|
|
958
|
-
}).filter((row) => row.issues.length > 0).sort((a, b) => b.address - a.address);
|
|
959
|
-
};
|
|
960
|
-
|
|
961
|
-
// src/reflect/shell.ts
|
|
962
|
-
var snapshotShell = (shell, exclude = []) => {
|
|
963
|
-
const state = shell.getState();
|
|
964
|
-
const canvases = Object.values(state.canvases).filter((canvas) => !exclude.includes(canvas.id)).map((canvas) => ({
|
|
965
|
-
id: canvas.id,
|
|
966
|
-
depth: canvas.stack.length,
|
|
967
|
-
items: [...canvas.stack].reverse().map((instance) => ({
|
|
968
|
-
definitionId: instance.definitionId,
|
|
969
|
-
instanceId: instance.id,
|
|
970
|
-
status: instance.status,
|
|
971
|
-
active: instance.id === canvas.active?.id
|
|
972
|
-
}))
|
|
973
|
-
}));
|
|
974
|
-
return { canvases, layouts: shell.layoutStore.list(), components: shell.registry.list() };
|
|
975
|
-
};
|
|
976
|
-
var describeInstance = (shell, instanceId) => {
|
|
977
|
-
const runtime = shell.getRuntime(instanceId);
|
|
978
|
-
if (runtime === void 0) return void 0;
|
|
979
|
-
const definition = runtime.definition;
|
|
980
|
-
const layout = definition.layout;
|
|
981
|
-
const layoutNode = typeof layout === "string" ? shell.layoutStore.get(layout) : layout;
|
|
982
|
-
const issues = auditAction(definition).issues.map((issue) => ({ issue, ...classifyAudit(issue, definition) }));
|
|
983
|
-
return {
|
|
984
|
-
id: definition.id,
|
|
985
|
-
instanceId,
|
|
986
|
-
canvasId: runtime.instance.canvasId,
|
|
987
|
-
status: runtime.instance.status,
|
|
988
|
-
title: definition.title ?? "",
|
|
989
|
-
data: runtime.getData(),
|
|
990
|
-
endpoints: Object.entries(definition.endpoints ?? {}).map(([name, config]) => ({ name, config })),
|
|
991
|
-
triggers: definition.triggers ?? [],
|
|
992
|
-
lifecycle: definition.lifecycle ?? {},
|
|
993
|
-
layoutKind: typeof layout === "string" ? "store" : "inline",
|
|
994
|
-
layout: layoutNode,
|
|
995
|
-
input: definition.input,
|
|
996
|
-
issues
|
|
997
|
-
};
|
|
998
|
-
};
|
|
999
|
-
|
|
1000
316
|
// src/devtools/fns.ts
|
|
1001
317
|
var DEVTOOLS_CANVAS = "devtools";
|
|
1002
318
|
var TIMELINE_CAP = 200;
|
|
@@ -1051,9 +367,9 @@ var createDevtoolsFunctions = (config) => {
|
|
|
1051
367
|
}
|
|
1052
368
|
return on;
|
|
1053
369
|
},
|
|
1054
|
-
"devtools.shellState": async () => snapshotShell(shell(), [DEVTOOLS_CANVAS]),
|
|
370
|
+
"devtools.shellState": async () => chunkM3UFIUXK_cjs.snapshotShell(shell(), [DEVTOOLS_CANVAS]),
|
|
1055
371
|
"devtools.audit": async () => {
|
|
1056
|
-
const rows = auditCatalog(definitions);
|
|
372
|
+
const rows = chunkM3UFIUXK_cjs.auditCatalog(definitions);
|
|
1057
373
|
return { rows, address: rows.reduce((total, row) => total + row.address, 0), definitions: rows.length };
|
|
1058
374
|
},
|
|
1059
375
|
// Stack navigation from the dock — pop the top of a canvas's stack. Only
|
|
@@ -1069,7 +385,7 @@ var createDevtoolsFunctions = (config) => {
|
|
|
1069
385
|
},
|
|
1070
386
|
// Newest first — the ring buffer is oldest→newest; the dock shows a feed.
|
|
1071
387
|
"devtools.timeline": async () => ({ rows: timeline.slice().reverse(), count: timeline.length }),
|
|
1072
|
-
"devtools.describe": async (data) => describeInstance(shell(), String(data["instanceId"] ?? "")) ?? { id: "unmounted", found: false, data: {}, layout: null, issues: [] }
|
|
388
|
+
"devtools.describe": async (data) => chunkM3UFIUXK_cjs.describeInstance(shell(), String(data["instanceId"] ?? "")) ?? { id: "unmounted", found: false, data: {}, layout: null, issues: [] }
|
|
1073
389
|
};
|
|
1074
390
|
};
|
|
1075
391
|
|