@contentful/experience-design-system-cli 2.34.5-dev-build-d408bfc4.0 → 2.34.5-dev-build-d0fcb46e.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/package.json +1 -1
- package/dist/src/analyze/select/tui/components/LineagePanel.d.ts +14 -0
- package/dist/src/import/tui/components/ReviewStatus.d.ts +5 -0
- package/dist/src/import/tui/hooks/useLineage.d.ts +32 -0
- package/dist/src/import/tui/lineage-input.d.ts +18 -0
- package/dist/src/import/tui/lineage-layout.d.ts +2 -2
- package/dist/src/index.js +935 -581
- package/package.json +6 -6
package/dist/src/index.js
CHANGED
|
@@ -19861,6 +19861,55 @@ function findAllAncestors(target, components) {
|
|
|
19861
19861
|
}
|
|
19862
19862
|
return ancestors;
|
|
19863
19863
|
}
|
|
19864
|
+
function buildAncestorTree(target, components) {
|
|
19865
|
+
const visited = /* @__PURE__ */ new Set();
|
|
19866
|
+
visited.add(target);
|
|
19867
|
+
function walk(name, depth) {
|
|
19868
|
+
const parents = findDirectParents(name, components);
|
|
19869
|
+
const out = [];
|
|
19870
|
+
for (const { parent, slotName } of parents) {
|
|
19871
|
+
if (parent === target) {
|
|
19872
|
+
out.push({
|
|
19873
|
+
name: parent,
|
|
19874
|
+
incomingSlotName: slotName,
|
|
19875
|
+
depth: depth + 1,
|
|
19876
|
+
shared: false,
|
|
19877
|
+
cycle: true,
|
|
19878
|
+
parents: []
|
|
19879
|
+
});
|
|
19880
|
+
continue;
|
|
19881
|
+
}
|
|
19882
|
+
if (visited.has(parent)) {
|
|
19883
|
+
out.push({
|
|
19884
|
+
name: parent,
|
|
19885
|
+
incomingSlotName: slotName,
|
|
19886
|
+
depth: depth + 1,
|
|
19887
|
+
shared: true,
|
|
19888
|
+
cycle: false,
|
|
19889
|
+
parents: []
|
|
19890
|
+
});
|
|
19891
|
+
continue;
|
|
19892
|
+
}
|
|
19893
|
+
visited.add(parent);
|
|
19894
|
+
out.push({
|
|
19895
|
+
name: parent,
|
|
19896
|
+
incomingSlotName: slotName,
|
|
19897
|
+
depth: depth + 1,
|
|
19898
|
+
shared: false,
|
|
19899
|
+
cycle: false,
|
|
19900
|
+
parents: walk(parent, depth + 1)
|
|
19901
|
+
});
|
|
19902
|
+
}
|
|
19903
|
+
return out;
|
|
19904
|
+
}
|
|
19905
|
+
return {
|
|
19906
|
+
name: target,
|
|
19907
|
+
depth: 0,
|
|
19908
|
+
shared: false,
|
|
19909
|
+
cycle: false,
|
|
19910
|
+
parents: walk(target, 0)
|
|
19911
|
+
};
|
|
19912
|
+
}
|
|
19864
19913
|
var init_lineage = __esm({
|
|
19865
19914
|
"packages/experience-design-system-cli/src/analyze/lineage.ts"() {
|
|
19866
19915
|
"use strict";
|
|
@@ -21249,6 +21298,113 @@ var init_selection_cascade = __esm({
|
|
|
21249
21298
|
}
|
|
21250
21299
|
});
|
|
21251
21300
|
|
|
21301
|
+
// packages/experience-design-system-cli/src/import/tui/hooks/useLineage.ts
|
|
21302
|
+
import { useMemo as useMemo3 } from "react";
|
|
21303
|
+
function renderCleanAncestorTree(node) {
|
|
21304
|
+
const lines = [];
|
|
21305
|
+
lines.push({ text: node.name, jumpTarget: node.name });
|
|
21306
|
+
const walk = (parents, prefix) => {
|
|
21307
|
+
for (let i = 0; i < parents.length; i++) {
|
|
21308
|
+
const child = parents[i];
|
|
21309
|
+
const isLast = i === parents.length - 1;
|
|
21310
|
+
const glyph = isLast ? "\u2514\u2500" : "\u251C\u2500";
|
|
21311
|
+
lines.push({ text: `${prefix}${glyph} ${child.name}`, jumpTarget: child.name });
|
|
21312
|
+
if (child.parents.length > 0) {
|
|
21313
|
+
const nextPrefix = prefix + (isLast ? " " : "\u2502 ");
|
|
21314
|
+
walk(child.parents, nextPrefix);
|
|
21315
|
+
}
|
|
21316
|
+
}
|
|
21317
|
+
};
|
|
21318
|
+
walk(node.parents, "");
|
|
21319
|
+
return lines;
|
|
21320
|
+
}
|
|
21321
|
+
function renderDescendantTree(root, closure, graph) {
|
|
21322
|
+
const lines = [];
|
|
21323
|
+
if (closure.containsCycle) {
|
|
21324
|
+
for (const node of closure.nodes) {
|
|
21325
|
+
if (node.name === root) continue;
|
|
21326
|
+
lines.push({ text: ` ${node.name}`, jumpTarget: node.name });
|
|
21327
|
+
}
|
|
21328
|
+
return lines;
|
|
21329
|
+
}
|
|
21330
|
+
const byName = new Map(graph.map((n) => [n.name, n]));
|
|
21331
|
+
const known = new Set(closure.nodes.map((n) => n.name));
|
|
21332
|
+
const childrenOf = (name) => {
|
|
21333
|
+
const node = byName.get(name);
|
|
21334
|
+
if (!node) return [];
|
|
21335
|
+
const seen = /* @__PURE__ */ new Set();
|
|
21336
|
+
const out = [];
|
|
21337
|
+
for (const slot of node.slots) {
|
|
21338
|
+
for (const target of slot.allowedComponents ?? []) {
|
|
21339
|
+
if (!known.has(target)) continue;
|
|
21340
|
+
if (target === name) continue;
|
|
21341
|
+
if (seen.has(target)) continue;
|
|
21342
|
+
seen.add(target);
|
|
21343
|
+
out.push(target);
|
|
21344
|
+
}
|
|
21345
|
+
}
|
|
21346
|
+
return out.sort((a, b) => a.localeCompare(b));
|
|
21347
|
+
};
|
|
21348
|
+
const visited = /* @__PURE__ */ new Set([root]);
|
|
21349
|
+
const walk = (parent, prefix) => {
|
|
21350
|
+
const kids = childrenOf(parent);
|
|
21351
|
+
for (let i = 0; i < kids.length; i++) {
|
|
21352
|
+
const child = kids[i];
|
|
21353
|
+
if (visited.has(child)) continue;
|
|
21354
|
+
visited.add(child);
|
|
21355
|
+
const isLast = i === kids.length - 1;
|
|
21356
|
+
const glyph = isLast ? "\u2514\u2500" : "\u251C\u2500";
|
|
21357
|
+
lines.push({ text: `${prefix}${glyph} ${child}`, jumpTarget: child });
|
|
21358
|
+
const nextPrefix = prefix + (isLast ? " " : "\u2502 ");
|
|
21359
|
+
walk(child, nextPrefix);
|
|
21360
|
+
}
|
|
21361
|
+
};
|
|
21362
|
+
walk(root, "");
|
|
21363
|
+
return lines;
|
|
21364
|
+
}
|
|
21365
|
+
function useLineage(focusedKey, graph) {
|
|
21366
|
+
const graphKey = useMemo3(() => JSON.stringify(graph), [graph]);
|
|
21367
|
+
const stableGraph = useMemo3(() => graph, [graphKey]);
|
|
21368
|
+
const closures = useMemo3(() => computeAllClosures(stableGraph), [stableGraph]);
|
|
21369
|
+
const entries = useMemo3(() => {
|
|
21370
|
+
if (!focusedKey) return [];
|
|
21371
|
+
const name = focusedKey;
|
|
21372
|
+
const tree = buildAncestorTree(name, stableGraph);
|
|
21373
|
+
const closure = closures.get(name);
|
|
21374
|
+
const out = [];
|
|
21375
|
+
out.push({ kind: "section", label: "Ancestors:" });
|
|
21376
|
+
if (tree.parents.length === 0) {
|
|
21377
|
+
out.push({ kind: "empty", label: " (no ancestors)" });
|
|
21378
|
+
} else {
|
|
21379
|
+
const lines = renderCleanAncestorTree(tree);
|
|
21380
|
+
for (const line of lines) {
|
|
21381
|
+
out.push({ kind: "ancestor", label: " " + line.text, jumpTarget: line.jumpTarget ?? name });
|
|
21382
|
+
}
|
|
21383
|
+
}
|
|
21384
|
+
out.push({ kind: "section", label: "Descendants:" });
|
|
21385
|
+
if (!closure || closure.nodes.length <= 1) {
|
|
21386
|
+
out.push({ kind: "empty", label: " (none)" });
|
|
21387
|
+
} else {
|
|
21388
|
+
for (const line of renderDescendantTree(name, closure, stableGraph)) {
|
|
21389
|
+
out.push({ kind: "descendant", label: " " + line.text, jumpTarget: line.jumpTarget });
|
|
21390
|
+
}
|
|
21391
|
+
}
|
|
21392
|
+
return out;
|
|
21393
|
+
}, [focusedKey, stableGraph, closures]);
|
|
21394
|
+
const jumpables = useMemo3(
|
|
21395
|
+
() => entries.map((entry, i) => ({ entry, i })).filter(({ entry }) => entry.kind === "ancestor" || entry.kind === "descendant"),
|
|
21396
|
+
[entries]
|
|
21397
|
+
);
|
|
21398
|
+
return { entries, jumpables };
|
|
21399
|
+
}
|
|
21400
|
+
var init_useLineage = __esm({
|
|
21401
|
+
"packages/experience-design-system-cli/src/import/tui/hooks/useLineage.ts"() {
|
|
21402
|
+
"use strict";
|
|
21403
|
+
init_composite_closure();
|
|
21404
|
+
init_lineage();
|
|
21405
|
+
}
|
|
21406
|
+
});
|
|
21407
|
+
|
|
21252
21408
|
// packages/experience-design-system-cli/src/import/cycle-auto-reject.ts
|
|
21253
21409
|
function computeCycleAutoRejectTargets(slotCycles, graph) {
|
|
21254
21410
|
const targets = /* @__PURE__ */ new Set();
|
|
@@ -21267,6 +21423,65 @@ var init_cycle_auto_reject = __esm({
|
|
|
21267
21423
|
}
|
|
21268
21424
|
});
|
|
21269
21425
|
|
|
21426
|
+
// packages/experience-design-system-cli/src/analyze/select/tui/components/LineagePanel.tsx
|
|
21427
|
+
import figures4 from "figures";
|
|
21428
|
+
import { Text as Text30 } from "ink";
|
|
21429
|
+
import { jsx as jsx33, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
21430
|
+
function LineagePanel({
|
|
21431
|
+
focusedComponentKey,
|
|
21432
|
+
entries,
|
|
21433
|
+
cursor,
|
|
21434
|
+
jumpables,
|
|
21435
|
+
maxRows,
|
|
21436
|
+
width
|
|
21437
|
+
}) {
|
|
21438
|
+
const rows = entries.map((e) => ({
|
|
21439
|
+
label: e.label,
|
|
21440
|
+
jumpTarget: e.kind === "ancestor" || e.kind === "descendant" ? e.jumpTarget : "",
|
|
21441
|
+
kind: e.kind
|
|
21442
|
+
}));
|
|
21443
|
+
const cursorRowIndex = jumpables[cursor]?.i ?? 0;
|
|
21444
|
+
return /* @__PURE__ */ jsx33(
|
|
21445
|
+
GotoBanner,
|
|
21446
|
+
{
|
|
21447
|
+
title: `Lineage: ${focusedComponentKey}`,
|
|
21448
|
+
rows,
|
|
21449
|
+
cursor,
|
|
21450
|
+
cursorRowIndex,
|
|
21451
|
+
maxRows,
|
|
21452
|
+
width,
|
|
21453
|
+
footerHint: LINEAGE_FOOTER_HINT,
|
|
21454
|
+
renderRow: (row, i, isCursor) => {
|
|
21455
|
+
if (row.kind === "section") {
|
|
21456
|
+
return /* @__PURE__ */ jsxs30(Text30, { bold: true, children: [
|
|
21457
|
+
" ",
|
|
21458
|
+
row.label
|
|
21459
|
+
] }, i);
|
|
21460
|
+
}
|
|
21461
|
+
if (row.kind === "empty") {
|
|
21462
|
+
return /* @__PURE__ */ jsxs30(Text30, { children: [
|
|
21463
|
+
/* @__PURE__ */ jsx33(Text30, { children: " " }),
|
|
21464
|
+
/* @__PURE__ */ jsx33(Text30, { dimColor: true, children: " " + row.label })
|
|
21465
|
+
] }, i);
|
|
21466
|
+
}
|
|
21467
|
+
return /* @__PURE__ */ jsxs30(Text30, { children: [
|
|
21468
|
+
isCursor ? /* @__PURE__ */ jsx33(Text30, { color: PALETTE.info, bold: true, children: figures4.pointer }) : /* @__PURE__ */ jsx33(Text30, { children: " " }),
|
|
21469
|
+
/* @__PURE__ */ jsx33(Text30, { inverse: isCursor, children: " " + row.label })
|
|
21470
|
+
] }, i);
|
|
21471
|
+
}
|
|
21472
|
+
}
|
|
21473
|
+
);
|
|
21474
|
+
}
|
|
21475
|
+
var LINEAGE_FOOTER_HINT;
|
|
21476
|
+
var init_LineagePanel = __esm({
|
|
21477
|
+
"packages/experience-design-system-cli/src/analyze/select/tui/components/LineagePanel.tsx"() {
|
|
21478
|
+
"use strict";
|
|
21479
|
+
init_theme();
|
|
21480
|
+
init_GotoBanner();
|
|
21481
|
+
LINEAGE_FOOTER_HINT = "[\u2191/\u2193] move \xB7 [Enter] jump \xB7 [l/Esc] close";
|
|
21482
|
+
}
|
|
21483
|
+
});
|
|
21484
|
+
|
|
21270
21485
|
// packages/experience-design-system-cli/src/import/tui/steps/auto-reject-decision.ts
|
|
21271
21486
|
function computeAutoRejectDecision(input) {
|
|
21272
21487
|
if (input.loading) return "skip";
|
|
@@ -21350,6 +21565,44 @@ var init_enumerate_cycle_breaks = __esm({
|
|
|
21350
21565
|
}
|
|
21351
21566
|
});
|
|
21352
21567
|
|
|
21568
|
+
// packages/experience-design-system-cli/src/import/tui/lineage-input.ts
|
|
21569
|
+
function handleLineageNavigation({
|
|
21570
|
+
key,
|
|
21571
|
+
cursor,
|
|
21572
|
+
jumpables,
|
|
21573
|
+
onCursorChange,
|
|
21574
|
+
onJump,
|
|
21575
|
+
onClose,
|
|
21576
|
+
allowTab
|
|
21577
|
+
}) {
|
|
21578
|
+
if (key.upArrow) {
|
|
21579
|
+
onCursorChange((current) => Math.max(0, current - 1));
|
|
21580
|
+
return true;
|
|
21581
|
+
}
|
|
21582
|
+
if (key.downArrow) {
|
|
21583
|
+
onCursorChange((current) => Math.min(Math.max(0, jumpables.length - 1), current + 1));
|
|
21584
|
+
return true;
|
|
21585
|
+
}
|
|
21586
|
+
if (allowTab && key.tab) {
|
|
21587
|
+
onCursorChange((current) => jumpables.length === 0 ? 0 : (current + 1) % jumpables.length);
|
|
21588
|
+
return true;
|
|
21589
|
+
}
|
|
21590
|
+
if (key.return) {
|
|
21591
|
+
const target = jumpables[cursor];
|
|
21592
|
+
if (target && (target.entry.kind === "ancestor" || target.entry.kind === "descendant")) {
|
|
21593
|
+
onJump(target.entry.jumpTarget);
|
|
21594
|
+
}
|
|
21595
|
+
onClose();
|
|
21596
|
+
return true;
|
|
21597
|
+
}
|
|
21598
|
+
return false;
|
|
21599
|
+
}
|
|
21600
|
+
var init_lineage_input = __esm({
|
|
21601
|
+
"packages/experience-design-system-cli/src/import/tui/lineage-input.ts"() {
|
|
21602
|
+
"use strict";
|
|
21603
|
+
}
|
|
21604
|
+
});
|
|
21605
|
+
|
|
21353
21606
|
// packages/experience-design-system-cli/src/analyze/select/tui/hooks/scroll-offset.ts
|
|
21354
21607
|
function computeNextScrollOffset(current, input, key, totalLines, panelHeight) {
|
|
21355
21608
|
const maxOffset = Math.max(0, totalLines - panelHeight);
|
|
@@ -21385,14 +21638,14 @@ var init_scroll_offset = __esm({
|
|
|
21385
21638
|
|
|
21386
21639
|
// packages/experience-design-system-cli/src/analyze/select/tui/components/FieldEditor.tsx
|
|
21387
21640
|
import React14, { useState as useState15 } from "react";
|
|
21388
|
-
import
|
|
21389
|
-
import { Box as Box29, Text as
|
|
21641
|
+
import figures5 from "figures";
|
|
21642
|
+
import { Box as Box29, Text as Text31 } from "ink";
|
|
21390
21643
|
import {
|
|
21391
21644
|
CDF_PROPERTY_TYPES,
|
|
21392
21645
|
CDF_PROPERTY_CATEGORIES,
|
|
21393
21646
|
DESIGN_TOKEN_TYPES as DESIGN_TOKEN_TYPES2
|
|
21394
21647
|
} from "@contentful/experience-design-system-types";
|
|
21395
|
-
import { Fragment as Fragment10, jsx as
|
|
21648
|
+
import { Fragment as Fragment10, jsx as jsx34, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
21396
21649
|
function removeAt(values, index) {
|
|
21397
21650
|
return values.filter((_, i) => i !== index);
|
|
21398
21651
|
}
|
|
@@ -21515,25 +21768,25 @@ function serializeState(state, originalJson) {
|
|
|
21515
21768
|
return JSON.stringify(entry, null, 2);
|
|
21516
21769
|
}
|
|
21517
21770
|
function Picker({ value, active }) {
|
|
21518
|
-
return /* @__PURE__ */
|
|
21519
|
-
active && /* @__PURE__ */
|
|
21520
|
-
/* @__PURE__ */
|
|
21521
|
-
active && /* @__PURE__ */
|
|
21771
|
+
return /* @__PURE__ */ jsxs31(Box29, { children: [
|
|
21772
|
+
active && /* @__PURE__ */ jsx34(Text31, { color: PALETTE.info, children: "\u2039" }),
|
|
21773
|
+
/* @__PURE__ */ jsx34(Text31, { color: active ? PALETTE.info : PALETTE.inverse, bold: active, children: value }),
|
|
21774
|
+
active && /* @__PURE__ */ jsx34(Text31, { color: PALETTE.info, children: "\u203A" })
|
|
21522
21775
|
] });
|
|
21523
21776
|
}
|
|
21524
21777
|
function Toggle({ value, active }) {
|
|
21525
|
-
return /* @__PURE__ */
|
|
21778
|
+
return /* @__PURE__ */ jsx34(Box29, { children: /* @__PURE__ */ jsx34(Text31, { color: active ? PALETTE.info : value ? PALETTE.success : void 0, children: value ? "[\u2713]" : "[ ]" }) });
|
|
21526
21779
|
}
|
|
21527
21780
|
function DefaultValueRow({ display, active }) {
|
|
21528
|
-
return /* @__PURE__ */
|
|
21529
|
-
/* @__PURE__ */
|
|
21530
|
-
active ? /* @__PURE__ */
|
|
21781
|
+
return /* @__PURE__ */ jsxs31(Box29, { paddingLeft: 2, gap: 1, children: [
|
|
21782
|
+
/* @__PURE__ */ jsx34(Text31, { dimColor: true, children: "default:" }),
|
|
21783
|
+
active ? /* @__PURE__ */ jsx34(Picker, { value: display, active: true }) : /* @__PURE__ */ jsx34(Text31, { color: PALETTE.inverse, children: display })
|
|
21531
21784
|
] });
|
|
21532
21785
|
}
|
|
21533
21786
|
function RowLabel({ name, selected }) {
|
|
21534
21787
|
const nameDisplay = name.length > 14 ? name.slice(0, 13) + "\u2026" : name.padEnd(14);
|
|
21535
|
-
return /* @__PURE__ */
|
|
21536
|
-
|
|
21788
|
+
return /* @__PURE__ */ jsxs31(
|
|
21789
|
+
Text31,
|
|
21537
21790
|
{
|
|
21538
21791
|
color: selected ? PALETTE.inverse : PALETTE.info,
|
|
21539
21792
|
bold: selected,
|
|
@@ -21551,10 +21804,10 @@ function ValueInputRow({
|
|
|
21551
21804
|
valueText,
|
|
21552
21805
|
cursorVisible
|
|
21553
21806
|
}) {
|
|
21554
|
-
return /* @__PURE__ */
|
|
21555
|
-
/* @__PURE__ */
|
|
21556
|
-
/* @__PURE__ */
|
|
21557
|
-
/* @__PURE__ */
|
|
21807
|
+
return /* @__PURE__ */ jsxs31(Box29, { paddingLeft: 2, children: [
|
|
21808
|
+
/* @__PURE__ */ jsx34(Text31, { color: PALETTE.info, children: mode === "edit" ? "\u270E " : "+ " }),
|
|
21809
|
+
/* @__PURE__ */ jsx34(Text31, { children: valueText }),
|
|
21810
|
+
/* @__PURE__ */ jsx34(Text31, { inverse: cursorVisible, children: " " })
|
|
21558
21811
|
] });
|
|
21559
21812
|
}
|
|
21560
21813
|
function EditableListItem({
|
|
@@ -21567,9 +21820,9 @@ function EditableListItem({
|
|
|
21567
21820
|
}) {
|
|
21568
21821
|
const isBeingEdited = editingValue?.mode === "edit" && editingValue.index === index;
|
|
21569
21822
|
if (isBeingEdited) {
|
|
21570
|
-
return /* @__PURE__ */
|
|
21823
|
+
return /* @__PURE__ */ jsx34(ValueInputRow, { mode: "edit", valueText, cursorVisible });
|
|
21571
21824
|
}
|
|
21572
|
-
return /* @__PURE__ */
|
|
21825
|
+
return /* @__PURE__ */ jsx34(Box29, { gap: 1, paddingLeft: 2, children: /* @__PURE__ */ jsx34(Text31, { color: active ? PALETTE.info : PALETTE.inverse, children: active ? `${figures5.pointer} ${value}` : ` ${value}` }) });
|
|
21573
21826
|
}
|
|
21574
21827
|
function EditableValueList({
|
|
21575
21828
|
values,
|
|
@@ -21582,9 +21835,9 @@ function EditableValueList({
|
|
|
21582
21835
|
emptyPaddingLeft,
|
|
21583
21836
|
showAddInput
|
|
21584
21837
|
}) {
|
|
21585
|
-
return /* @__PURE__ */
|
|
21586
|
-
values.length === 0 && !editingValue && (emptyPaddingLeft === void 0 ? /* @__PURE__ */
|
|
21587
|
-
values.map((value, index) => /* @__PURE__ */
|
|
21838
|
+
return /* @__PURE__ */ jsxs31(Fragment10, { children: [
|
|
21839
|
+
values.length === 0 && !editingValue && (emptyPaddingLeft === void 0 ? /* @__PURE__ */ jsx34(Text31, { dimColor: true, children: emptyMessage }) : /* @__PURE__ */ jsx34(Box29, { paddingLeft: emptyPaddingLeft, children: /* @__PURE__ */ jsx34(Text31, { dimColor: true, children: emptyMessage }) })),
|
|
21840
|
+
values.map((value, index) => /* @__PURE__ */ jsx34(
|
|
21588
21841
|
EditableListItem,
|
|
21589
21842
|
{
|
|
21590
21843
|
value,
|
|
@@ -21596,7 +21849,7 @@ function EditableValueList({
|
|
|
21596
21849
|
},
|
|
21597
21850
|
index
|
|
21598
21851
|
)),
|
|
21599
|
-
showAddInput && editingValue?.mode === "add" && /* @__PURE__ */
|
|
21852
|
+
showAddInput && editingValue?.mode === "add" && /* @__PURE__ */ jsx34(ValueInputRow, { mode: "add", valueText, cursorVisible })
|
|
21600
21853
|
] });
|
|
21601
21854
|
}
|
|
21602
21855
|
function DefaultSubRow({
|
|
@@ -21607,39 +21860,39 @@ function DefaultSubRow({
|
|
|
21607
21860
|
}) {
|
|
21608
21861
|
const cursor = cursorVisible ? "\u2588" : " ";
|
|
21609
21862
|
if (prop.type === "richtext" || prop.type === "media" || prop.type === "link") {
|
|
21610
|
-
return /* @__PURE__ */
|
|
21611
|
-
/* @__PURE__ */
|
|
21612
|
-
/* @__PURE__ */
|
|
21863
|
+
return /* @__PURE__ */ jsxs31(Box29, { paddingLeft: 2, gap: 1, children: [
|
|
21864
|
+
/* @__PURE__ */ jsx34(Text31, { dimColor: true, children: "default:" }),
|
|
21865
|
+
/* @__PURE__ */ jsx34(Text31, { dimColor: true, children: "(not applicable)" })
|
|
21613
21866
|
] });
|
|
21614
21867
|
}
|
|
21615
21868
|
if (prop.type === "boolean") {
|
|
21616
21869
|
const display = prop.default === true ? "true" : prop.default === false ? "false" : "(unset)";
|
|
21617
|
-
return /* @__PURE__ */
|
|
21870
|
+
return /* @__PURE__ */ jsx34(DefaultValueRow, { display, active });
|
|
21618
21871
|
}
|
|
21619
21872
|
if (prop.type === "enum") {
|
|
21620
21873
|
if (prop.values.length === 0) {
|
|
21621
|
-
return /* @__PURE__ */
|
|
21622
|
-
/* @__PURE__ */
|
|
21623
|
-
/* @__PURE__ */
|
|
21874
|
+
return /* @__PURE__ */ jsxs31(Box29, { paddingLeft: 2, gap: 1, children: [
|
|
21875
|
+
/* @__PURE__ */ jsx34(Text31, { dimColor: true, children: "default:" }),
|
|
21876
|
+
/* @__PURE__ */ jsx34(Text31, { dimColor: true, children: "(no values defined)" })
|
|
21624
21877
|
] });
|
|
21625
21878
|
}
|
|
21626
21879
|
const display = typeof prop.default === "string" && prop.default !== "" ? prop.default : "(unset)";
|
|
21627
|
-
return /* @__PURE__ */
|
|
21880
|
+
return /* @__PURE__ */ jsx34(DefaultValueRow, { display, active });
|
|
21628
21881
|
}
|
|
21629
21882
|
const value = typeof prop.default === "string" ? prop.default : "";
|
|
21630
21883
|
if (active) {
|
|
21631
|
-
return /* @__PURE__ */
|
|
21632
|
-
/* @__PURE__ */
|
|
21633
|
-
/* @__PURE__ */
|
|
21634
|
-
/* @__PURE__ */
|
|
21635
|
-
/* @__PURE__ */
|
|
21636
|
-
/* @__PURE__ */
|
|
21884
|
+
return /* @__PURE__ */ jsxs31(Box29, { paddingLeft: 2, flexDirection: "row", children: [
|
|
21885
|
+
/* @__PURE__ */ jsx34(Text31, { dimColor: true, children: "default:" }),
|
|
21886
|
+
/* @__PURE__ */ jsxs31(Box29, { flexGrow: 1, borderStyle: "round", borderColor: PALETTE.info, paddingX: 1, children: [
|
|
21887
|
+
/* @__PURE__ */ jsx34(Text31, { children: value.slice(0, textCursor) }),
|
|
21888
|
+
/* @__PURE__ */ jsx34(Text31, { inverse: cursorVisible, children: value[textCursor] ?? cursor }),
|
|
21889
|
+
/* @__PURE__ */ jsx34(Text31, { children: value.slice(textCursor + 1) })
|
|
21637
21890
|
] })
|
|
21638
21891
|
] });
|
|
21639
21892
|
}
|
|
21640
|
-
return /* @__PURE__ */
|
|
21641
|
-
/* @__PURE__ */
|
|
21642
|
-
/* @__PURE__ */
|
|
21893
|
+
return /* @__PURE__ */ jsxs31(Box29, { paddingLeft: 2, gap: 1, children: [
|
|
21894
|
+
/* @__PURE__ */ jsx34(Text31, { dimColor: true, children: "default:" }),
|
|
21895
|
+
/* @__PURE__ */ jsx34(Text31, { color: value ? PALETTE.inverse : void 0, dimColor: !value, children: value || "(none)" })
|
|
21643
21896
|
] });
|
|
21644
21897
|
}
|
|
21645
21898
|
function PropRow({
|
|
@@ -21657,28 +21910,28 @@ function PropRow({
|
|
|
21657
21910
|
}) {
|
|
21658
21911
|
const cursor = cursorVisible ? "\u2588" : " ";
|
|
21659
21912
|
const descActive = activeField === "description";
|
|
21660
|
-
return /* @__PURE__ */
|
|
21661
|
-
/* @__PURE__ */
|
|
21662
|
-
/* @__PURE__ */
|
|
21663
|
-
/* @__PURE__ */
|
|
21664
|
-
activeField === "type" ? /* @__PURE__ */
|
|
21665
|
-
activeField === "category" && /* @__PURE__ */
|
|
21666
|
-
/* @__PURE__ */
|
|
21667
|
-
activeField === "required" ? /* @__PURE__ */
|
|
21668
|
-
prop.type === "enum" && /* @__PURE__ */
|
|
21669
|
-
/* @__PURE__ */
|
|
21670
|
-
/* @__PURE__ */
|
|
21913
|
+
return /* @__PURE__ */ jsxs31(Box29, { flexDirection: "column", width, children: [
|
|
21914
|
+
/* @__PURE__ */ jsxs31(Box29, { gap: 1, children: [
|
|
21915
|
+
/* @__PURE__ */ jsx34(RowLabel, { name: prop.name, selected }),
|
|
21916
|
+
/* @__PURE__ */ jsx34(Text31, { dimColor: !selected, children: "type:" }),
|
|
21917
|
+
activeField === "type" ? /* @__PURE__ */ jsx34(Picker, { value: prop.type, active: true }) : /* @__PURE__ */ jsx34(Text31, { color: selected ? PALETTE.warning : PALETTE.inverse, children: prop.type }),
|
|
21918
|
+
activeField === "category" && /* @__PURE__ */ jsx34(Picker, { value: prop.category, active: true }),
|
|
21919
|
+
/* @__PURE__ */ jsx34(Text31, { dimColor: !selected, children: "req:" }),
|
|
21920
|
+
activeField === "required" ? /* @__PURE__ */ jsx34(Toggle, { value: prop.required, active: true }) : /* @__PURE__ */ jsx34(Toggle, { value: prop.required, active: false }),
|
|
21921
|
+
prop.type === "enum" && /* @__PURE__ */ jsxs31(Fragment10, { children: [
|
|
21922
|
+
/* @__PURE__ */ jsx34(Text31, { dimColor: !selected, children: "values:" }),
|
|
21923
|
+
/* @__PURE__ */ jsxs31(Text31, { color: selected ? PALETTE.warning : PALETTE.inverse, children: [
|
|
21671
21924
|
"[",
|
|
21672
21925
|
prop.values.join(", "),
|
|
21673
21926
|
"]"
|
|
21674
21927
|
] })
|
|
21675
21928
|
] }),
|
|
21676
|
-
prop.type === "token" && /* @__PURE__ */
|
|
21677
|
-
/* @__PURE__ */
|
|
21678
|
-
activeField === "tokenKind" ? /* @__PURE__ */
|
|
21929
|
+
prop.type === "token" && /* @__PURE__ */ jsxs31(Fragment10, { children: [
|
|
21930
|
+
/* @__PURE__ */ jsx34(Text31, { dimColor: !selected, children: "kind:" }),
|
|
21931
|
+
activeField === "tokenKind" ? /* @__PURE__ */ jsx34(Picker, { value: prop.tokenKind || DESIGN_TOKEN_TYPES2[0], active: true }) : /* @__PURE__ */ jsx34(Text31, { color: selected ? PALETTE.success : PALETTE.inverse, children: prop.tokenKind || "\u2014" })
|
|
21679
21932
|
] })
|
|
21680
21933
|
] }),
|
|
21681
|
-
selected && /* @__PURE__ */
|
|
21934
|
+
selected && /* @__PURE__ */ jsx34(
|
|
21682
21935
|
DefaultSubRow,
|
|
21683
21936
|
{
|
|
21684
21937
|
prop,
|
|
@@ -21687,33 +21940,33 @@ function PropRow({
|
|
|
21687
21940
|
cursorVisible
|
|
21688
21941
|
}
|
|
21689
21942
|
),
|
|
21690
|
-
selected && descActive && /* @__PURE__ */
|
|
21691
|
-
/* @__PURE__ */
|
|
21692
|
-
/* @__PURE__ */
|
|
21693
|
-
/* @__PURE__ */
|
|
21694
|
-
/* @__PURE__ */
|
|
21695
|
-
/* @__PURE__ */
|
|
21943
|
+
selected && descActive && /* @__PURE__ */ jsxs31(Box29, { paddingLeft: 2, flexDirection: "row", children: [
|
|
21944
|
+
/* @__PURE__ */ jsx34(Text31, { dimColor: true, children: "desc:" }),
|
|
21945
|
+
/* @__PURE__ */ jsxs31(Box29, { flexGrow: 1, borderStyle: "round", borderColor: PALETTE.info, paddingX: 1, children: [
|
|
21946
|
+
/* @__PURE__ */ jsx34(Text31, { children: prop.description.slice(0, textCursor) }),
|
|
21947
|
+
/* @__PURE__ */ jsx34(Text31, { inverse: cursorVisible, children: prop.description[textCursor] ?? cursor }),
|
|
21948
|
+
/* @__PURE__ */ jsx34(Text31, { children: prop.description.slice(textCursor + 1) })
|
|
21696
21949
|
] })
|
|
21697
21950
|
] }),
|
|
21698
|
-
selected && !descActive && /* @__PURE__ */
|
|
21699
|
-
/* @__PURE__ */
|
|
21700
|
-
/* @__PURE__ */
|
|
21951
|
+
selected && !descActive && /* @__PURE__ */ jsxs31(Box29, { paddingLeft: 2, gap: 1, children: [
|
|
21952
|
+
/* @__PURE__ */ jsx34(Text31, { dimColor: true, children: "desc:" }),
|
|
21953
|
+
/* @__PURE__ */ jsx34(Text31, { color: PALETTE.success, children: prop.description || "\u2014" })
|
|
21701
21954
|
] }),
|
|
21702
|
-
selected && prop.type === "token" && prop.category === "design" && /* @__PURE__ */
|
|
21703
|
-
/* @__PURE__ */
|
|
21704
|
-
activeField === "allowed" ? /* @__PURE__ */
|
|
21955
|
+
selected && prop.type === "token" && prop.category === "design" && /* @__PURE__ */ jsxs31(Box29, { paddingLeft: 2, flexDirection: "row", gap: 1, children: [
|
|
21956
|
+
/* @__PURE__ */ jsx34(Text31, { dimColor: true, children: "allowed:" }),
|
|
21957
|
+
activeField === "allowed" ? /* @__PURE__ */ jsx34(Box29, { flexGrow: 1, borderStyle: "round", borderColor: PALETTE.info, paddingX: 1, children: /* @__PURE__ */ jsx34(Text31, { dimColor: true, children: "press [t] to edit allowed tokens" }) }) : /* @__PURE__ */ jsx34(Text31, { color: prop.allowed.length > 0 ? PALETTE.info : void 0, dimColor: prop.allowed.length === 0, children: prop.allowed.length > 0 ? prop.allowed.join(", ") : "(any)" })
|
|
21705
21958
|
] }),
|
|
21706
|
-
selected && rationale && rationale.trim().length > 0 && /* @__PURE__ */
|
|
21959
|
+
selected && rationale && rationale.trim().length > 0 && /* @__PURE__ */ jsx34(Box29, { paddingLeft: 2, children: /* @__PURE__ */ jsx34(Text31, { dimColor: true, children: (() => {
|
|
21707
21960
|
const max = Math.max(8, width - 8);
|
|
21708
21961
|
const text = `~ ${rationale}`;
|
|
21709
21962
|
return text.length > max ? text.slice(0, max - 1) + "\u2026" : text;
|
|
21710
21963
|
})() }) }, rowKey ? `rationale-${rowKey}` : void 0),
|
|
21711
|
-
selected && prop.type === "enum" && activeField === "values" && /* @__PURE__ */
|
|
21712
|
-
/* @__PURE__ */
|
|
21713
|
-
/* @__PURE__ */
|
|
21714
|
-
activeField === "values" && /* @__PURE__ */
|
|
21964
|
+
selected && prop.type === "enum" && activeField === "values" && /* @__PURE__ */ jsxs31(Box29, { paddingLeft: 2, flexDirection: "column", children: [
|
|
21965
|
+
/* @__PURE__ */ jsxs31(Box29, { children: [
|
|
21966
|
+
/* @__PURE__ */ jsx34(Text31, { dimColor: true, children: "values:" }),
|
|
21967
|
+
activeField === "values" && /* @__PURE__ */ jsx34(Text31, { dimColor: true, children: " [a]dd [e]dit [r]emove [\u2191\u2193] navigate [K/J] reorder" })
|
|
21715
21968
|
] }),
|
|
21716
|
-
/* @__PURE__ */
|
|
21969
|
+
/* @__PURE__ */ jsx34(
|
|
21717
21970
|
EditableValueList,
|
|
21718
21971
|
{
|
|
21719
21972
|
values: prop.values,
|
|
@@ -21743,22 +21996,22 @@ function SlotRow({
|
|
|
21743
21996
|
pickerCursor
|
|
21744
21997
|
}) {
|
|
21745
21998
|
const cursor = cursorVisible ? "\u2588" : " ";
|
|
21746
|
-
return /* @__PURE__ */
|
|
21747
|
-
/* @__PURE__ */
|
|
21748
|
-
/* @__PURE__ */
|
|
21749
|
-
/* @__PURE__ */
|
|
21750
|
-
activeField === "required" ? /* @__PURE__ */
|
|
21999
|
+
return /* @__PURE__ */ jsxs31(Box29, { flexDirection: "column", width, children: [
|
|
22000
|
+
/* @__PURE__ */ jsxs31(Box29, { gap: 1, children: [
|
|
22001
|
+
/* @__PURE__ */ jsx34(RowLabel, { name: slot.name, selected }),
|
|
22002
|
+
/* @__PURE__ */ jsx34(Text31, { dimColor: !selected, children: "req:" }),
|
|
22003
|
+
activeField === "required" ? /* @__PURE__ */ jsx34(Toggle, { value: slot.required, active: true }) : /* @__PURE__ */ jsx34(Toggle, { value: slot.required, active: false })
|
|
21751
22004
|
] }),
|
|
21752
|
-
!selected && /* @__PURE__ */
|
|
21753
|
-
/* @__PURE__ */
|
|
21754
|
-
slot.allowedComponents.length === 0 ? /* @__PURE__ */
|
|
22005
|
+
!selected && /* @__PURE__ */ jsxs31(Box29, { paddingLeft: 2, gap: 1, children: [
|
|
22006
|
+
/* @__PURE__ */ jsx34(Text31, { dimColor: true, children: "allowed:" }),
|
|
22007
|
+
slot.allowedComponents.length === 0 ? /* @__PURE__ */ jsx34(Text31, { dimColor: true, children: "(any)" }) : /* @__PURE__ */ jsx34(Text31, { color: PALETTE.info, children: slot.allowedComponents.join(", ") })
|
|
21755
22008
|
] }),
|
|
21756
|
-
selected && /* @__PURE__ */
|
|
21757
|
-
/* @__PURE__ */
|
|
21758
|
-
/* @__PURE__ */
|
|
21759
|
-
activeField === "allowedComponents" && /* @__PURE__ */
|
|
22009
|
+
selected && /* @__PURE__ */ jsxs31(Box29, { paddingLeft: 2, flexDirection: "column", children: [
|
|
22010
|
+
/* @__PURE__ */ jsxs31(Box29, { children: [
|
|
22011
|
+
/* @__PURE__ */ jsx34(Text31, { dimColor: true, children: "allowed:" }),
|
|
22012
|
+
activeField === "allowedComponents" && /* @__PURE__ */ jsx34(Text31, { dimColor: true, children: slot.allowedComponents.length > 0 ? " [a]dd [e]dit [r]emove [\u2190\u2192] cycle [\u2191\u2193] navigate [K/J] reorder" : " [a]dd [e]dit [r]emove [\u2191\u2193] navigate [K/J] reorder" })
|
|
21760
22013
|
] }),
|
|
21761
|
-
/* @__PURE__ */
|
|
22014
|
+
/* @__PURE__ */ jsx34(
|
|
21762
22015
|
EditableValueList,
|
|
21763
22016
|
{
|
|
21764
22017
|
values: slot.allowedComponents,
|
|
@@ -21772,36 +22025,36 @@ function SlotRow({
|
|
|
21772
22025
|
showAddInput: activeField === "allowedComponents"
|
|
21773
22026
|
}
|
|
21774
22027
|
),
|
|
21775
|
-
editingValue?.mode === "add" && activeField === "allowedComponents" && pickerCandidates !== null && /* @__PURE__ */
|
|
22028
|
+
editingValue?.mode === "add" && activeField === "allowedComponents" && pickerCandidates !== null && /* @__PURE__ */ jsx34(Box29, { paddingLeft: 2, flexDirection: "column", children: pickerCandidates.length === 0 ? /* @__PURE__ */ jsx34(Text31, { dimColor: true, children: "(no valid components to add \u2014 all remaining candidates would create cycles)" }) : (() => {
|
|
21776
22029
|
const filtered = valueText.length === 0 ? pickerCandidates : pickerCandidates.filter((n) => n.toLowerCase().includes(valueText.toLowerCase()));
|
|
21777
22030
|
if (filtered.length === 0) {
|
|
21778
|
-
return /* @__PURE__ */
|
|
22031
|
+
return /* @__PURE__ */ jsx34(Text31, { dimColor: true, children: "(no candidates match \u2014 Enter to add as free text)" });
|
|
21779
22032
|
}
|
|
21780
22033
|
const cursor2 = pickerCursor % filtered.length;
|
|
21781
22034
|
const MAX_VISIBLE = 5;
|
|
21782
22035
|
const start = Math.max(0, Math.min(filtered.length - MAX_VISIBLE, cursor2 - 2));
|
|
21783
22036
|
const slice = filtered.slice(start, start + MAX_VISIBLE);
|
|
21784
|
-
return /* @__PURE__ */
|
|
21785
|
-
/* @__PURE__ */
|
|
22037
|
+
return /* @__PURE__ */ jsxs31(Box29, { flexDirection: "column", children: [
|
|
22038
|
+
/* @__PURE__ */ jsx34(Text31, { dimColor: true, children: " candidates (\u2191\u2193 cycle, Enter to add):" }),
|
|
21786
22039
|
slice.map((name, i) => {
|
|
21787
22040
|
const absIdx = start + i;
|
|
21788
22041
|
const isCursor = absIdx === cursor2;
|
|
21789
|
-
return /* @__PURE__ */
|
|
22042
|
+
return /* @__PURE__ */ jsx34(Text31, { color: isCursor ? PALETTE.info : void 0, dimColor: !isCursor, children: isCursor ? ` ${figures5.pointer} ${name}` : ` ${name}` }, name);
|
|
21790
22043
|
})
|
|
21791
22044
|
] });
|
|
21792
22045
|
})() })
|
|
21793
22046
|
] }),
|
|
21794
|
-
selected && activeField === "description" && /* @__PURE__ */
|
|
21795
|
-
/* @__PURE__ */
|
|
21796
|
-
/* @__PURE__ */
|
|
21797
|
-
/* @__PURE__ */
|
|
21798
|
-
/* @__PURE__ */
|
|
21799
|
-
/* @__PURE__ */
|
|
22047
|
+
selected && activeField === "description" && /* @__PURE__ */ jsxs31(Box29, { paddingLeft: 2, flexDirection: "row", children: [
|
|
22048
|
+
/* @__PURE__ */ jsx34(Text31, { dimColor: true, children: "desc:" }),
|
|
22049
|
+
/* @__PURE__ */ jsxs31(Box29, { flexGrow: 1, borderStyle: "round", borderColor: PALETTE.info, paddingX: 1, children: [
|
|
22050
|
+
/* @__PURE__ */ jsx34(Text31, { children: slot.description.slice(0, textCursor) }),
|
|
22051
|
+
/* @__PURE__ */ jsx34(Text31, { inverse: cursorVisible, children: slot.description[textCursor] ?? cursor }),
|
|
22052
|
+
/* @__PURE__ */ jsx34(Text31, { children: slot.description.slice(textCursor + 1) })
|
|
21800
22053
|
] })
|
|
21801
22054
|
] }),
|
|
21802
|
-
selected && activeField !== "description" && /* @__PURE__ */
|
|
21803
|
-
/* @__PURE__ */
|
|
21804
|
-
/* @__PURE__ */
|
|
22055
|
+
selected && activeField !== "description" && /* @__PURE__ */ jsxs31(Box29, { paddingLeft: 2, gap: 1, children: [
|
|
22056
|
+
/* @__PURE__ */ jsx34(Text31, { dimColor: true, children: "desc:" }),
|
|
22057
|
+
/* @__PURE__ */ jsx34(Text31, { color: PALETTE.success, children: slot.description || "\u2014" })
|
|
21805
22058
|
] })
|
|
21806
22059
|
] });
|
|
21807
22060
|
}
|
|
@@ -22586,18 +22839,18 @@ function FieldEditor({
|
|
|
22586
22839
|
});
|
|
22587
22840
|
const innerWidth = Math.max(1, width - 2);
|
|
22588
22841
|
if (parseErr) {
|
|
22589
|
-
return /* @__PURE__ */
|
|
22590
|
-
/* @__PURE__ */
|
|
22591
|
-
/* @__PURE__ */
|
|
22592
|
-
/* @__PURE__ */
|
|
22842
|
+
return /* @__PURE__ */ jsxs31(Box29, { flexDirection: "column", width, borderStyle: "single", borderColor: PALETTE.error, children: [
|
|
22843
|
+
/* @__PURE__ */ jsx34(Text31, { bold: true, color: PALETTE.error, children: "FIELD EDITOR \u2014 parse error" }),
|
|
22844
|
+
/* @__PURE__ */ jsx34(Text31, { color: PALETTE.error, children: parseErr }),
|
|
22845
|
+
/* @__PURE__ */ jsx34(Text31, { dimColor: true, children: "Cannot display structured editor. Fix the JSON first." })
|
|
22593
22846
|
] });
|
|
22594
22847
|
}
|
|
22595
22848
|
if (props.length === 0 && slots.length === 0) {
|
|
22596
|
-
return /* @__PURE__ */
|
|
22597
|
-
/* @__PURE__ */
|
|
22598
|
-
/* @__PURE__ */
|
|
22599
|
-
/* @__PURE__ */
|
|
22600
|
-
/* @__PURE__ */
|
|
22849
|
+
return /* @__PURE__ */ jsxs31(Box29, { flexDirection: "column", width, borderStyle: "single", borderColor: PALETTE.warning, children: [
|
|
22850
|
+
/* @__PURE__ */ jsx34(Text31, { bold: true, color: PALETTE.warning, children: "FIELD EDITOR \u2014 no fields" }),
|
|
22851
|
+
/* @__PURE__ */ jsx34(Text31, { color: PALETTE.warning, children: "\u26A0 No properties classified for this component. The LLM didn't find anything to classify." }),
|
|
22852
|
+
/* @__PURE__ */ jsx34(Text31, { dimColor: true, children: "You can add fields manually below or reject this component." }),
|
|
22853
|
+
/* @__PURE__ */ jsx34(Text31, { dimColor: true, children: "Ctrl+S to save \xB7 Esc to discard" })
|
|
22601
22854
|
] });
|
|
22602
22855
|
}
|
|
22603
22856
|
const hasEmptyProperties = props.length === 0 && slots.length === 0;
|
|
@@ -22648,7 +22901,7 @@ function FieldEditor({
|
|
|
22648
22901
|
const visibleRows = Math.max(1, height - 3);
|
|
22649
22902
|
const scrollStart = selectedRowIdx < 0 ? 0 : Math.max(0, Math.min(selectedRowIdx, rows.length - visibleRows));
|
|
22650
22903
|
const visibleRowSlice = rows.slice(scrollStart, scrollStart + visibleRows);
|
|
22651
|
-
return /* @__PURE__ */
|
|
22904
|
+
return /* @__PURE__ */ jsxs31(
|
|
22652
22905
|
Box29,
|
|
22653
22906
|
{
|
|
22654
22907
|
flexDirection: "column",
|
|
@@ -22656,18 +22909,18 @@ function FieldEditor({
|
|
|
22656
22909
|
borderStyle: "single",
|
|
22657
22910
|
borderColor: hasEmptyProperties ? PALETTE.warning : PALETTE.info,
|
|
22658
22911
|
children: [
|
|
22659
|
-
hasEmptyProperties && /* @__PURE__ */
|
|
22660
|
-
/* @__PURE__ */
|
|
22912
|
+
hasEmptyProperties && /* @__PURE__ */ jsx34(Text31, { color: PALETTE.warning, children: "\u26A0 No properties classified for this component. The LLM didn't find anything to classify. Reject this component or add fields manually." }),
|
|
22913
|
+
/* @__PURE__ */ jsx34(Box29, { flexDirection: "column", width: innerWidth, children: visibleRowSlice.map((row, i) => {
|
|
22661
22914
|
if (row.kind === "header") {
|
|
22662
|
-
return /* @__PURE__ */
|
|
22915
|
+
return /* @__PURE__ */ jsx34(Text31, { bold: true, color: PALETTE.success, children: row.label }, `header-${i}`);
|
|
22663
22916
|
}
|
|
22664
22917
|
if (row.kind === "component-description") {
|
|
22665
22918
|
const isSelected2 = inComponentDesc && active;
|
|
22666
22919
|
const isEditing = isSelected2 && focusLevel === "field" && activeField === "description";
|
|
22667
22920
|
const desc = editorState.componentDescription;
|
|
22668
|
-
return /* @__PURE__ */
|
|
22669
|
-
/* @__PURE__ */
|
|
22670
|
-
|
|
22921
|
+
return /* @__PURE__ */ jsx34(Box29, { flexDirection: "column", children: /* @__PURE__ */ jsxs31(Box29, { gap: 1, children: [
|
|
22922
|
+
/* @__PURE__ */ jsx34(
|
|
22923
|
+
Text31,
|
|
22671
22924
|
{
|
|
22672
22925
|
color: isSelected2 ? PALETTE.inverse : PALETTE.info,
|
|
22673
22926
|
bold: isSelected2,
|
|
@@ -22675,18 +22928,18 @@ function FieldEditor({
|
|
|
22675
22928
|
children: `${isSelected2 ? "\u203A" : " "} description: `
|
|
22676
22929
|
}
|
|
22677
22930
|
),
|
|
22678
|
-
isEditing ? /* @__PURE__ */
|
|
22679
|
-
/* @__PURE__ */
|
|
22680
|
-
/* @__PURE__ */
|
|
22681
|
-
/* @__PURE__ */
|
|
22682
|
-
] }) : /* @__PURE__ */
|
|
22931
|
+
isEditing ? /* @__PURE__ */ jsxs31(Box29, { flexGrow: 1, borderStyle: "round", borderColor: PALETTE.info, paddingX: 1, children: [
|
|
22932
|
+
/* @__PURE__ */ jsx34(Text31, { children: desc.slice(0, textCursor) }),
|
|
22933
|
+
/* @__PURE__ */ jsx34(Text31, { inverse: cursorVisible, children: desc[textCursor] ?? (cursorVisible ? "\u2588" : " ") }),
|
|
22934
|
+
/* @__PURE__ */ jsx34(Text31, { children: desc.slice(textCursor + 1) })
|
|
22935
|
+
] }) : /* @__PURE__ */ jsx34(Text31, { color: isSelected2 ? PALETTE.warning : PALETTE.inverse, dimColor: !desc, children: desc || "(none \u2014 Return to edit)" })
|
|
22683
22936
|
] }) }, `component-description-${i}`);
|
|
22684
22937
|
}
|
|
22685
22938
|
if (row.kind === "prop") {
|
|
22686
22939
|
const p = props[row.idx];
|
|
22687
22940
|
const isSelected2 = !inSlots && !inComponentDesc && row.idx === propIdx;
|
|
22688
22941
|
const propMeta = metadata?.props?.[p.name];
|
|
22689
|
-
return /* @__PURE__ */
|
|
22942
|
+
return /* @__PURE__ */ jsx34(
|
|
22690
22943
|
PropRow,
|
|
22691
22944
|
{
|
|
22692
22945
|
prop: p,
|
|
@@ -22707,7 +22960,7 @@ function FieldEditor({
|
|
|
22707
22960
|
const s = slots[row.idx];
|
|
22708
22961
|
const isSelected = inSlots && row.idx === slotIdx;
|
|
22709
22962
|
const slotPickerCandidates = isSelected && editingValue?.mode === "add" && activeField === "allowedComponents" && projectSlotGraph && currentComponentName ? computeAllowedComponentCandidates(projectSlotGraph, currentComponentName, slots, s.name) : null;
|
|
22710
|
-
return /* @__PURE__ */
|
|
22963
|
+
return /* @__PURE__ */ jsx34(
|
|
22711
22964
|
SlotRow,
|
|
22712
22965
|
{
|
|
22713
22966
|
slot: s,
|
|
@@ -22733,50 +22986,50 @@ function FieldEditor({
|
|
|
22733
22986
|
const src = metadata?.componentSource ?? null;
|
|
22734
22987
|
const headerPath = path ?? "<unknown source path>";
|
|
22735
22988
|
if (!start || !end || !src) {
|
|
22736
|
-
return /* @__PURE__ */
|
|
22737
|
-
/* @__PURE__ */
|
|
22738
|
-
/* @__PURE__ */
|
|
22739
|
-
/* @__PURE__ */
|
|
22989
|
+
return /* @__PURE__ */ jsxs31(Box29, { flexDirection: "column", borderStyle: "single", borderColor: "gray", paddingX: 1, children: [
|
|
22990
|
+
/* @__PURE__ */ jsx34(Text31, { dimColor: true, bold: true, children: `source: ${headerPath}` }),
|
|
22991
|
+
/* @__PURE__ */ jsx34(Text31, { dimColor: true, children: "(no source location captured for this prop)" }),
|
|
22992
|
+
/* @__PURE__ */ jsx34(Text31, { dimColor: true, children: "[s] close" })
|
|
22740
22993
|
] });
|
|
22741
22994
|
}
|
|
22742
22995
|
const lines = src.split("\n").slice(Math.max(0, start - 1), end);
|
|
22743
|
-
return /* @__PURE__ */
|
|
22744
|
-
/* @__PURE__ */
|
|
22745
|
-
lines.map((ln, i) => /* @__PURE__ */
|
|
22746
|
-
/* @__PURE__ */
|
|
22996
|
+
return /* @__PURE__ */ jsxs31(Box29, { flexDirection: "column", borderStyle: "single", borderColor: "gray", paddingX: 1, children: [
|
|
22997
|
+
/* @__PURE__ */ jsx34(Text31, { dimColor: true, bold: true, children: `${headerPath}: lines ${start}\u2013${end}` }),
|
|
22998
|
+
lines.map((ln, i) => /* @__PURE__ */ jsx34(Text31, { dimColor: true, children: ln }, `source-line-${i}`)),
|
|
22999
|
+
/* @__PURE__ */ jsx34(Text31, { dimColor: true, children: "[s] close \xB7 [Esc] close" })
|
|
22747
23000
|
] });
|
|
22748
23001
|
})(),
|
|
22749
|
-
showHelp && /* @__PURE__ */
|
|
22750
|
-
/* @__PURE__ */
|
|
22751
|
-
/* @__PURE__ */
|
|
22752
|
-
/* @__PURE__ */
|
|
22753
|
-
/* @__PURE__ */
|
|
22754
|
-
/* @__PURE__ */
|
|
22755
|
-
/* @__PURE__ */
|
|
22756
|
-
/* @__PURE__ */
|
|
22757
|
-
/* @__PURE__ */
|
|
22758
|
-
/* @__PURE__ */
|
|
22759
|
-
/* @__PURE__ */
|
|
22760
|
-
/* @__PURE__ */
|
|
22761
|
-
/* @__PURE__ */
|
|
22762
|
-
/* @__PURE__ */
|
|
22763
|
-
/* @__PURE__ */
|
|
22764
|
-
/* @__PURE__ */
|
|
22765
|
-
/* @__PURE__ */
|
|
22766
|
-
/* @__PURE__ */
|
|
22767
|
-
/* @__PURE__ */
|
|
22768
|
-
/* @__PURE__ */
|
|
22769
|
-
/* @__PURE__ */
|
|
22770
|
-
/* @__PURE__ */
|
|
22771
|
-
/* @__PURE__ */
|
|
22772
|
-
/* @__PURE__ */
|
|
22773
|
-
/* @__PURE__ */
|
|
22774
|
-
/* @__PURE__ */
|
|
22775
|
-
/* @__PURE__ */
|
|
22776
|
-
/* @__PURE__ */
|
|
23002
|
+
showHelp && /* @__PURE__ */ jsxs31(Box29, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.info, paddingX: 1, children: [
|
|
23003
|
+
/* @__PURE__ */ jsx34(Text31, { bold: true, color: PALETTE.info, children: "Keybindings" }),
|
|
23004
|
+
/* @__PURE__ */ jsx34(Text31, { children: " " }),
|
|
23005
|
+
/* @__PURE__ */ jsx34(Text31, { bold: true, children: "Row navigation" }),
|
|
23006
|
+
/* @__PURE__ */ jsx34(Text31, { children: " \u2191/\u2193 or j/k move between rows" }),
|
|
23007
|
+
/* @__PURE__ */ jsx34(Text31, { children: " Enter edit fields on the current row" }),
|
|
23008
|
+
/* @__PURE__ */ jsx34(Text31, { children: " Esc exit the panel" }),
|
|
23009
|
+
/* @__PURE__ */ jsx34(Text31, { children: " " }),
|
|
23010
|
+
/* @__PURE__ */ jsx34(Text31, { bold: true, children: "Field editing" }),
|
|
23011
|
+
/* @__PURE__ */ jsx34(Text31, { children: " \u2191/\u2193 or j/k cycle through fields (j/k literal in text inputs)" }),
|
|
23012
|
+
/* @__PURE__ */ jsx34(Text31, { children: " \u2190/\u2192 cycle picker values \xB7 move cursor in text inputs" }),
|
|
23013
|
+
/* @__PURE__ */ jsx34(Text31, { children: " Space/Enter toggle required" }),
|
|
23014
|
+
/* @__PURE__ */ jsx34(Text31, { children: " Type edit description / string default" }),
|
|
23015
|
+
/* @__PURE__ */ jsx34(Text31, { children: " Ctrl+S save changes" }),
|
|
23016
|
+
/* @__PURE__ */ jsx34(Text31, { children: " Esc exit field-edit back to the row" }),
|
|
23017
|
+
/* @__PURE__ */ jsx34(Text31, { children: " " }),
|
|
23018
|
+
/* @__PURE__ */ jsx34(Text31, { bold: true, children: "Values / allowedComponents" }),
|
|
23019
|
+
/* @__PURE__ */ jsx34(Text31, { children: " a / e / r add \xB7 edit \xB7 remove" }),
|
|
23020
|
+
/* @__PURE__ */ jsx34(Text31, { children: " \u2191\u2193 or j/k navigate the list" }),
|
|
23021
|
+
/* @__PURE__ */ jsx34(Text31, { children: " K / J reorder up \xB7 down" }),
|
|
23022
|
+
/* @__PURE__ */ jsx34(Text31, { children: " " }),
|
|
23023
|
+
/* @__PURE__ */ jsx34(Text31, { bold: true, children: "Panels" }),
|
|
23024
|
+
/* @__PURE__ */ jsx34(Text31, { children: " s toggle source-view for the current prop" }),
|
|
23025
|
+
/* @__PURE__ */ jsx34(Text31, { children: " " + propRationaleKey.padEnd(16) + " toggle prop rationale panel" }),
|
|
23026
|
+
/* @__PURE__ */ jsx34(Text31, { children: " " + componentRationaleKey.padEnd(16) + " toggle component rationale panel" }),
|
|
23027
|
+
/* @__PURE__ */ jsx34(Text31, { children: " ? toggle this overlay" }),
|
|
23028
|
+
/* @__PURE__ */ jsx34(Text31, { children: " " }),
|
|
23029
|
+
/* @__PURE__ */ jsx34(Text31, { dimColor: true, children: "press ? or Esc to close" })
|
|
22777
23030
|
] }),
|
|
22778
|
-
validationError && /* @__PURE__ */
|
|
22779
|
-
/* @__PURE__ */
|
|
23031
|
+
validationError && /* @__PURE__ */ jsx34(Text31, { color: PALETTE.error, children: "\u2717 " + validationError }),
|
|
23032
|
+
/* @__PURE__ */ jsx34(Text31, { dimColor: true, children: modeLabel })
|
|
22780
23033
|
]
|
|
22781
23034
|
}
|
|
22782
23035
|
);
|
|
@@ -22831,23 +23084,23 @@ var init_wrap_text = __esm({
|
|
|
22831
23084
|
});
|
|
22832
23085
|
|
|
22833
23086
|
// packages/experience-design-system-cli/src/analyze/select/tui/components/RationaleLine.tsx
|
|
22834
|
-
import { Box as Box30, Text as
|
|
22835
|
-
import { jsx as
|
|
23087
|
+
import { Box as Box30, Text as Text32 } from "ink";
|
|
23088
|
+
import { jsx as jsx35, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
22836
23089
|
function RationaleLine({ line, active }) {
|
|
22837
23090
|
if (line.kind === "blank") {
|
|
22838
|
-
return /* @__PURE__ */
|
|
23091
|
+
return /* @__PURE__ */ jsx35(Box30, { children: /* @__PURE__ */ jsx35(Text32, { children: " " }) });
|
|
22839
23092
|
}
|
|
22840
23093
|
if (line.kind === "heading") {
|
|
22841
|
-
return /* @__PURE__ */
|
|
23094
|
+
return /* @__PURE__ */ jsx35(Box30, { children: /* @__PURE__ */ jsx35(Text32, { bold: true, color: PALETTE.info, dimColor: !active, children: line.text }) });
|
|
22842
23095
|
}
|
|
22843
23096
|
if (line.kind === "label") {
|
|
22844
|
-
return /* @__PURE__ */
|
|
22845
|
-
line.prefix && /* @__PURE__ */
|
|
22846
|
-
/* @__PURE__ */
|
|
22847
|
-
line.suffix && /* @__PURE__ */
|
|
23097
|
+
return /* @__PURE__ */ jsxs32(Box30, { children: [
|
|
23098
|
+
line.prefix && /* @__PURE__ */ jsx35(Text32, { children: line.prefix }),
|
|
23099
|
+
/* @__PURE__ */ jsx35(Text32, { bold: true, color: line.color, dimColor: !active, children: line.text }),
|
|
23100
|
+
line.suffix && /* @__PURE__ */ jsx35(Text32, { dimColor: true, children: line.suffix })
|
|
22848
23101
|
] });
|
|
22849
23102
|
}
|
|
22850
|
-
return /* @__PURE__ */
|
|
23103
|
+
return /* @__PURE__ */ jsx35(Box30, { children: /* @__PURE__ */ jsx35(Text32, { dimColor: !active || line.dim, children: line.text }) });
|
|
22851
23104
|
}
|
|
22852
23105
|
var init_RationaleLine = __esm({
|
|
22853
23106
|
"packages/experience-design-system-cli/src/analyze/select/tui/components/RationaleLine.tsx"() {
|
|
@@ -22857,8 +23110,8 @@ var init_RationaleLine = __esm({
|
|
|
22857
23110
|
});
|
|
22858
23111
|
|
|
22859
23112
|
// packages/experience-design-system-cli/src/analyze/select/tui/components/ComponentRationalePanel.tsx
|
|
22860
|
-
import { Box as Box31, Text as
|
|
22861
|
-
import { jsx as
|
|
23113
|
+
import { Box as Box31, Text as Text33 } from "ink";
|
|
23114
|
+
import { jsx as jsx36, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
22862
23115
|
function renderComponentRationaleLines(data, innerWidth) {
|
|
22863
23116
|
const out = [];
|
|
22864
23117
|
const pushSection = (heading, body) => {
|
|
@@ -22925,7 +23178,7 @@ function ComponentRationalePanel({
|
|
|
22925
23178
|
const overflowed = totalLines > contentHeight;
|
|
22926
23179
|
const visibleStart = totalLines === 0 ? 0 : scrollOffset + 1;
|
|
22927
23180
|
const visibleEnd = Math.min(totalLines, scrollOffset + contentHeight);
|
|
22928
|
-
return /* @__PURE__ */
|
|
23181
|
+
return /* @__PURE__ */ jsxs33(
|
|
22929
23182
|
Box31,
|
|
22930
23183
|
{
|
|
22931
23184
|
flexDirection: "column",
|
|
@@ -22934,9 +23187,9 @@ function ComponentRationalePanel({
|
|
|
22934
23187
|
borderStyle: "single",
|
|
22935
23188
|
borderColor: active ? PALETTE.inverse : void 0,
|
|
22936
23189
|
children: [
|
|
22937
|
-
/* @__PURE__ */
|
|
22938
|
-
visible.map((line, i) => /* @__PURE__ */
|
|
22939
|
-
/* @__PURE__ */
|
|
23190
|
+
/* @__PURE__ */ jsx36(Box31, { children: /* @__PURE__ */ jsx36(Text33, { bold: true, dimColor: !active, children: `Component rationale: ${data.name}` }) }),
|
|
23191
|
+
visible.map((line, i) => /* @__PURE__ */ jsx36(RationaleLine, { line, active }, i)),
|
|
23192
|
+
/* @__PURE__ */ jsx36(Box31, { children: overflowed ? /* @__PURE__ */ jsx36(Text33, { dimColor: true, children: `${visibleStart}-${visibleEnd}/${totalLines} [j/k] scroll [I/Esc] close` }) : /* @__PURE__ */ jsx36(Text33, { dimColor: true, children: "[I/Esc] close" }) })
|
|
22940
23193
|
]
|
|
22941
23194
|
}
|
|
22942
23195
|
);
|
|
@@ -22953,10 +23206,10 @@ var init_ComponentRationalePanel = __esm({
|
|
|
22953
23206
|
});
|
|
22954
23207
|
|
|
22955
23208
|
// packages/experience-design-system-cli/src/analyze/select/tui/components/HighlightedLine.tsx
|
|
22956
|
-
import { Text as
|
|
22957
|
-
import { Fragment as Fragment11, jsx as
|
|
23209
|
+
import { Text as Text34 } from "ink";
|
|
23210
|
+
import { Fragment as Fragment11, jsx as jsx37 } from "react/jsx-runtime";
|
|
22958
23211
|
function HighlightedLine({ parts }) {
|
|
22959
|
-
return /* @__PURE__ */
|
|
23212
|
+
return /* @__PURE__ */ jsx37(Fragment11, { children: parts.map((part, i) => /* @__PURE__ */ jsx37(Text34, { color: part.color, dimColor: part.dim, children: part.text }, i)) });
|
|
22960
23213
|
}
|
|
22961
23214
|
var init_HighlightedLine = __esm({
|
|
22962
23215
|
"packages/experience-design-system-cli/src/analyze/select/tui/components/HighlightedLine.tsx"() {
|
|
@@ -22965,8 +23218,8 @@ var init_HighlightedLine = __esm({
|
|
|
22965
23218
|
});
|
|
22966
23219
|
|
|
22967
23220
|
// packages/experience-design-system-cli/src/analyze/select/tui/components/ScrollablePanel.tsx
|
|
22968
|
-
import { Box as Box32, Text as
|
|
22969
|
-
import { Fragment as Fragment12, jsx as
|
|
23221
|
+
import { Box as Box32, Text as Text35 } from "ink";
|
|
23222
|
+
import { Fragment as Fragment12, jsx as jsx38, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
22970
23223
|
function ScrollablePanel({
|
|
22971
23224
|
header,
|
|
22972
23225
|
width,
|
|
@@ -22979,12 +23232,12 @@ function ScrollablePanel({
|
|
|
22979
23232
|
children
|
|
22980
23233
|
}) {
|
|
22981
23234
|
const overflowed = totalLines > height;
|
|
22982
|
-
return /* @__PURE__ */
|
|
22983
|
-
/* @__PURE__ */
|
|
23235
|
+
return /* @__PURE__ */ jsxs34(Box32, { flexDirection: "column", width, height: height + 2, borderStyle: "single", borderColor, children: [
|
|
23236
|
+
/* @__PURE__ */ jsxs34(Box32, { children: [
|
|
22984
23237
|
header,
|
|
22985
|
-
overflowed && /* @__PURE__ */
|
|
22986
|
-
/* @__PURE__ */
|
|
22987
|
-
/* @__PURE__ */
|
|
23238
|
+
overflowed && /* @__PURE__ */ jsxs34(Fragment12, { children: [
|
|
23239
|
+
/* @__PURE__ */ jsx38(Box32, { flexGrow: 1 }),
|
|
23240
|
+
/* @__PURE__ */ jsx38(Text35, { dimColor: !active, children: `\u2195 ${visibleStart}-${visibleEnd}/${totalLines}` })
|
|
22988
23241
|
] })
|
|
22989
23242
|
] }),
|
|
22990
23243
|
children
|
|
@@ -22997,8 +23250,8 @@ var init_ScrollablePanel = __esm({
|
|
|
22997
23250
|
});
|
|
22998
23251
|
|
|
22999
23252
|
// packages/experience-design-system-cli/src/analyze/select/tui/components/JsonPanel.tsx
|
|
23000
|
-
import { Box as Box33, Text as
|
|
23001
|
-
import { jsx as
|
|
23253
|
+
import { Box as Box33, Text as Text36 } from "ink";
|
|
23254
|
+
import { jsx as jsx39 } from "react/jsx-runtime";
|
|
23002
23255
|
function highlightJson(line) {
|
|
23003
23256
|
const parts = [];
|
|
23004
23257
|
let remaining = line;
|
|
@@ -23036,7 +23289,7 @@ function highlightJson(line) {
|
|
|
23036
23289
|
parts.push({ text: remaining[0] });
|
|
23037
23290
|
remaining = remaining.slice(1);
|
|
23038
23291
|
}
|
|
23039
|
-
return /* @__PURE__ */
|
|
23292
|
+
return /* @__PURE__ */ jsx39(HighlightedLine, { parts });
|
|
23040
23293
|
}
|
|
23041
23294
|
function truncateLine(line, maxWidth) {
|
|
23042
23295
|
if (line.length <= maxWidth) return line;
|
|
@@ -23049,10 +23302,10 @@ function JsonPanel({ label, value, scrollOffset, width, height, active }) {
|
|
|
23049
23302
|
const totalLines = allLines.length;
|
|
23050
23303
|
const visibleStart = totalLines === 0 ? 0 : scrollOffset + 1;
|
|
23051
23304
|
const visibleEnd = Math.min(totalLines, scrollOffset + height);
|
|
23052
|
-
return /* @__PURE__ */
|
|
23305
|
+
return /* @__PURE__ */ jsx39(
|
|
23053
23306
|
ScrollablePanel,
|
|
23054
23307
|
{
|
|
23055
|
-
header: /* @__PURE__ */
|
|
23308
|
+
header: /* @__PURE__ */ jsx39(Text36, { bold: true, dimColor: !active, children: label }),
|
|
23056
23309
|
width,
|
|
23057
23310
|
height,
|
|
23058
23311
|
active,
|
|
@@ -23062,7 +23315,7 @@ function JsonPanel({ label, value, scrollOffset, width, height, active }) {
|
|
|
23062
23315
|
borderColor: active ? "white" : void 0,
|
|
23063
23316
|
children: visibleLines.map((line, i) => {
|
|
23064
23317
|
const truncated = truncateLine(line, innerWidth);
|
|
23065
|
-
return /* @__PURE__ */
|
|
23318
|
+
return /* @__PURE__ */ jsx39(Box33, { children: highlightJson(truncated) }, i);
|
|
23066
23319
|
})
|
|
23067
23320
|
}
|
|
23068
23321
|
);
|
|
@@ -23076,8 +23329,8 @@ var init_JsonPanel = __esm({
|
|
|
23076
23329
|
});
|
|
23077
23330
|
|
|
23078
23331
|
// packages/experience-design-system-cli/src/analyze/select/tui/components/RationalePanel.tsx
|
|
23079
|
-
import { Text as
|
|
23080
|
-
import { jsx as
|
|
23332
|
+
import { Text as Text37 } from "ink";
|
|
23333
|
+
import { jsx as jsx40 } from "react/jsx-runtime";
|
|
23081
23334
|
function renderRationaleLines(rows, innerWidth) {
|
|
23082
23335
|
const out = [];
|
|
23083
23336
|
rows.forEach((row, idx) => {
|
|
@@ -23110,10 +23363,10 @@ function RationalePanel({
|
|
|
23110
23363
|
const visible = allLines.slice(scrollOffset, scrollOffset + height);
|
|
23111
23364
|
const visibleStart = totalLines === 0 ? 0 : scrollOffset + 1;
|
|
23112
23365
|
const visibleEnd = Math.min(totalLines, scrollOffset + height);
|
|
23113
|
-
return /* @__PURE__ */
|
|
23366
|
+
return /* @__PURE__ */ jsx40(
|
|
23114
23367
|
ScrollablePanel,
|
|
23115
23368
|
{
|
|
23116
|
-
header: /* @__PURE__ */
|
|
23369
|
+
header: /* @__PURE__ */ jsx40(Text37, { bold: true, dimColor: !active, children: `RATIONALE \u2014 ${componentName}` }),
|
|
23117
23370
|
width,
|
|
23118
23371
|
height,
|
|
23119
23372
|
active,
|
|
@@ -23121,7 +23374,7 @@ function RationalePanel({
|
|
|
23121
23374
|
visibleStart,
|
|
23122
23375
|
visibleEnd,
|
|
23123
23376
|
borderColor: active ? PALETTE.inverse : void 0,
|
|
23124
|
-
children: visible.map((line, i) => /* @__PURE__ */
|
|
23377
|
+
children: visible.map((line, i) => /* @__PURE__ */ jsx40(RationaleLine, { line, active }, i))
|
|
23125
23378
|
}
|
|
23126
23379
|
);
|
|
23127
23380
|
}
|
|
@@ -23136,9 +23389,9 @@ var init_RationalePanel = __esm({
|
|
|
23136
23389
|
});
|
|
23137
23390
|
|
|
23138
23391
|
// packages/experience-design-system-cli/src/analyze/select/tui/components/TokenReviewPanel.tsx
|
|
23139
|
-
import
|
|
23140
|
-
import { Box as Box34, Text as
|
|
23141
|
-
import { jsx as
|
|
23392
|
+
import figures6 from "figures";
|
|
23393
|
+
import { Box as Box34, Text as Text38 } from "ink";
|
|
23394
|
+
import { jsx as jsx41, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
23142
23395
|
function collectTokenSuggestions(entry, availableTokens = []) {
|
|
23143
23396
|
return Object.entries(entry.$properties).filter(([, def]) => {
|
|
23144
23397
|
const rawKind = def["$token.kind"];
|
|
@@ -23172,7 +23425,7 @@ function TokenReviewPanel({
|
|
|
23172
23425
|
const scrollStart = Math.max(0, Math.min(editCursor - Math.floor(visibleCount / 2), maxStart));
|
|
23173
23426
|
const visiblePaths = current.paths.slice(scrollStart, scrollStart + visibleCount);
|
|
23174
23427
|
const rangeLabel = current.paths.length === 0 ? "no compatible tokens" : `${scrollStart + 1}-${scrollStart + visiblePaths.length} of ${current.paths.length}`;
|
|
23175
|
-
return /* @__PURE__ */
|
|
23428
|
+
return /* @__PURE__ */ jsxs35(
|
|
23176
23429
|
Box34,
|
|
23177
23430
|
{
|
|
23178
23431
|
flexDirection: "column",
|
|
@@ -23181,24 +23434,24 @@ function TokenReviewPanel({
|
|
|
23181
23434
|
borderStyle: "single",
|
|
23182
23435
|
borderColor: active ? PALETTE.inverse : void 0,
|
|
23183
23436
|
children: [
|
|
23184
|
-
/* @__PURE__ */
|
|
23185
|
-
/* @__PURE__ */
|
|
23186
|
-
/* @__PURE__ */
|
|
23187
|
-
current.paths.length === 0 && /* @__PURE__ */
|
|
23437
|
+
/* @__PURE__ */ jsx41(Text38, { bold: true, dimColor: !active, wrap: "truncate", children: `TOKEN REVIEW \u2014 ${componentName} \xB7 ${current.propName} (edit allowed)` }),
|
|
23438
|
+
/* @__PURE__ */ jsx41(Text38, { dimColor: true, wrap: "truncate", children: `select which tokens are allowed (${rangeLabel})` }),
|
|
23439
|
+
/* @__PURE__ */ jsx41(Text38, { children: " " }),
|
|
23440
|
+
current.paths.length === 0 && /* @__PURE__ */ jsx41(Text38, { dimColor: true, children: "(no compatible tokens found for this token kind)" }),
|
|
23188
23441
|
visiblePaths.map((path, i) => {
|
|
23189
23442
|
const pathIndex = scrollStart + i;
|
|
23190
23443
|
const checked = editSelection.has(path);
|
|
23191
23444
|
const focused = pathIndex === editCursor;
|
|
23192
|
-
return /* @__PURE__ */
|
|
23445
|
+
return /* @__PURE__ */ jsx41(Box34, { children: /* @__PURE__ */ jsx41(Text38, { color: focused ? PALETTE.info : void 0, bold: focused, dimColor: !active, wrap: "truncate", children: ` [${checked ? "x" : " "}] ${path}` }) }, path);
|
|
23193
23446
|
}),
|
|
23194
|
-
/* @__PURE__ */
|
|
23195
|
-
/* @__PURE__ */
|
|
23196
|
-
/* @__PURE__ */
|
|
23447
|
+
/* @__PURE__ */ jsx41(Text38, { children: " " }),
|
|
23448
|
+
/* @__PURE__ */ jsx41(Text38, { dimColor: true, wrap: "truncate", children: "[\u2191/\u2193] move [Space] toggle" }),
|
|
23449
|
+
/* @__PURE__ */ jsx41(Text38, { dimColor: true, wrap: "truncate", children: "[Ctrl+S] save [Esc] cancel" })
|
|
23197
23450
|
]
|
|
23198
23451
|
}
|
|
23199
23452
|
);
|
|
23200
23453
|
}
|
|
23201
|
-
return /* @__PURE__ */
|
|
23454
|
+
return /* @__PURE__ */ jsxs35(
|
|
23202
23455
|
Box34,
|
|
23203
23456
|
{
|
|
23204
23457
|
flexDirection: "column",
|
|
@@ -23207,18 +23460,18 @@ function TokenReviewPanel({
|
|
|
23207
23460
|
borderStyle: "single",
|
|
23208
23461
|
borderColor: active ? PALETTE.inverse : void 0,
|
|
23209
23462
|
children: [
|
|
23210
|
-
/* @__PURE__ */
|
|
23211
|
-
suggestions.length === 0 && /* @__PURE__ */
|
|
23463
|
+
/* @__PURE__ */ jsx41(Text38, { bold: true, dimColor: !active, children: `TOKEN REVIEW \u2014 ${componentName}` }),
|
|
23464
|
+
suggestions.length === 0 && /* @__PURE__ */ jsx41(Text38, { dimColor: true, children: "(no token suggestions for this component)" }),
|
|
23212
23465
|
suggestions.map((s, i) => {
|
|
23213
23466
|
const focused = i === selectedRow;
|
|
23214
|
-
return /* @__PURE__ */
|
|
23215
|
-
/* @__PURE__ */
|
|
23216
|
-
/* @__PURE__ */
|
|
23217
|
-
/* @__PURE__ */
|
|
23467
|
+
return /* @__PURE__ */ jsxs35(Box34, { flexDirection: "column", children: [
|
|
23468
|
+
/* @__PURE__ */ jsx41(Box34, { children: /* @__PURE__ */ jsx41(Text38, { color: focused ? PALETTE.info : void 0, bold: focused, dimColor: !active, children: `${focused ? figures6.pointer : " "} ${s.propName}` }) }),
|
|
23469
|
+
/* @__PURE__ */ jsx41(Text38, { dimColor: true, children: ` suggested: ${s.suggested.join(", ")}` }),
|
|
23470
|
+
/* @__PURE__ */ jsx41(Text38, { dimColor: true, children: ` allowed: ${s.allowed.join(", ")}` })
|
|
23218
23471
|
] }, s.propName);
|
|
23219
23472
|
}),
|
|
23220
|
-
/* @__PURE__ */
|
|
23221
|
-
/* @__PURE__ */
|
|
23473
|
+
/* @__PURE__ */ jsx41(Text38, { children: " " }),
|
|
23474
|
+
/* @__PURE__ */ jsx41(Text38, { dimColor: true, children: "[\u2191/\u2193] move [Enter] edit allowed [Esc] close" })
|
|
23222
23475
|
]
|
|
23223
23476
|
}
|
|
23224
23477
|
);
|
|
@@ -23231,8 +23484,8 @@ var init_TokenReviewPanel = __esm({
|
|
|
23231
23484
|
});
|
|
23232
23485
|
|
|
23233
23486
|
// packages/experience-design-system-cli/src/import/tui/steps/review-details-panel.tsx
|
|
23234
|
-
import { Text as
|
|
23235
|
-
import { Fragment as Fragment13, jsx as
|
|
23487
|
+
import { Text as Text39 } from "ink";
|
|
23488
|
+
import { Fragment as Fragment13, jsx as jsx42, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
23236
23489
|
function ReviewDetailsPanel({
|
|
23237
23490
|
selectedKey,
|
|
23238
23491
|
panelOpen,
|
|
@@ -23267,7 +23520,7 @@ function ReviewDetailsPanel({
|
|
|
23267
23520
|
rationale: s.rationale ?? ""
|
|
23268
23521
|
}))
|
|
23269
23522
|
];
|
|
23270
|
-
return /* @__PURE__ */
|
|
23523
|
+
return /* @__PURE__ */ jsx42(
|
|
23271
23524
|
RationalePanel,
|
|
23272
23525
|
{
|
|
23273
23526
|
componentName: componentRationale?.name ?? selectedKey,
|
|
@@ -23280,7 +23533,7 @@ function ReviewDetailsPanel({
|
|
|
23280
23533
|
);
|
|
23281
23534
|
}
|
|
23282
23535
|
if (panelOpen === "component-rationale") {
|
|
23283
|
-
return /* @__PURE__ */
|
|
23536
|
+
return /* @__PURE__ */ jsx42(
|
|
23284
23537
|
ComponentRationalePanel,
|
|
23285
23538
|
{
|
|
23286
23539
|
data: componentRationale ?? {
|
|
@@ -23305,14 +23558,14 @@ function ReviewDetailsPanel({
|
|
|
23305
23558
|
const headerPath = path ?? "<unknown source path>";
|
|
23306
23559
|
const sourceLineCount = Math.max(1, height - 4);
|
|
23307
23560
|
const lines = source ? source.split("\n").slice(panelScrollOffset, panelScrollOffset + sourceLineCount) : [];
|
|
23308
|
-
return /* @__PURE__ */
|
|
23309
|
-
/* @__PURE__ */
|
|
23310
|
-
source ? lines.map((line, index) => /* @__PURE__ */
|
|
23311
|
-
/* @__PURE__ */
|
|
23561
|
+
return /* @__PURE__ */ jsxs36(FixedPanel, { width, height, borderStyle: "single", borderColor: sourceBorderColor, paddingLeft: 1, children: [
|
|
23562
|
+
/* @__PURE__ */ jsx42(Text39, { dimColor: true, bold: true, wrap: "truncate-end", children: `source: ${headerPath}` }),
|
|
23563
|
+
source ? lines.map((line, index) => /* @__PURE__ */ jsx42(Text39, { dimColor: true, wrap: "truncate-end", children: line }, `source-line-${index}`)) : /* @__PURE__ */ jsx42(Text39, { dimColor: true, children: "(no source captured)" }),
|
|
23564
|
+
/* @__PURE__ */ jsx42(Text39, { dimColor: true, wrap: "truncate-end", children: "[s/Esc] close" })
|
|
23312
23565
|
] });
|
|
23313
23566
|
}
|
|
23314
23567
|
if (panelOpen === "token-review") {
|
|
23315
|
-
return /* @__PURE__ */
|
|
23568
|
+
return /* @__PURE__ */ jsx42(
|
|
23316
23569
|
TokenReviewPanel,
|
|
23317
23570
|
{
|
|
23318
23571
|
componentName: selectedKey,
|
|
@@ -23328,7 +23581,7 @@ function ReviewDetailsPanel({
|
|
|
23328
23581
|
);
|
|
23329
23582
|
}
|
|
23330
23583
|
if (showJson) {
|
|
23331
|
-
return /* @__PURE__ */
|
|
23584
|
+
return /* @__PURE__ */ jsx42(
|
|
23332
23585
|
JsonPanel,
|
|
23333
23586
|
{
|
|
23334
23587
|
label: "GENERATED DEFINITION (read-only)",
|
|
@@ -23340,7 +23593,7 @@ function ReviewDetailsPanel({
|
|
|
23340
23593
|
}
|
|
23341
23594
|
);
|
|
23342
23595
|
}
|
|
23343
|
-
return /* @__PURE__ */
|
|
23596
|
+
return /* @__PURE__ */ jsx42(Fragment13, { children: editor });
|
|
23344
23597
|
}
|
|
23345
23598
|
var init_review_details_panel = __esm({
|
|
23346
23599
|
"packages/experience-design-system-cli/src/import/tui/steps/review-details-panel.tsx"() {
|
|
@@ -23354,7 +23607,7 @@ var init_review_details_panel = __esm({
|
|
|
23354
23607
|
});
|
|
23355
23608
|
|
|
23356
23609
|
// packages/experience-design-system-cli/src/import/tui/components/ReviewDetailsEditor.tsx
|
|
23357
|
-
import { jsx as
|
|
23610
|
+
import { jsx as jsx43 } from "react/jsx-runtime";
|
|
23358
23611
|
import { createElement as createElement5 } from "react";
|
|
23359
23612
|
function toFieldEditorMetadata(reviewMetadata) {
|
|
23360
23613
|
if (!reviewMetadata) return void 0;
|
|
@@ -23387,7 +23640,7 @@ function ReviewDetailsEditor({
|
|
|
23387
23640
|
jsonScrollOffset,
|
|
23388
23641
|
currentTokenSuggestions
|
|
23389
23642
|
} = reviewEditor;
|
|
23390
|
-
return /* @__PURE__ */
|
|
23643
|
+
return /* @__PURE__ */ jsx43(
|
|
23391
23644
|
ReviewDetailsPanel,
|
|
23392
23645
|
{
|
|
23393
23646
|
selectedKey,
|
|
@@ -23431,8 +23684,8 @@ var init_ReviewDetailsEditor = __esm({
|
|
|
23431
23684
|
});
|
|
23432
23685
|
|
|
23433
23686
|
// packages/experience-design-system-cli/src/import/tui/components/ReviewComponentPanel.tsx
|
|
23434
|
-
import { Box as Box35, Text as
|
|
23435
|
-
import { Fragment as Fragment14, jsx as
|
|
23687
|
+
import { Box as Box35, Text as Text40 } from "ink";
|
|
23688
|
+
import { Fragment as Fragment14, jsx as jsx44, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
23436
23689
|
function buildReviewFieldEditor(reviewEditor, selectedJson, onExit, overrides = {}) {
|
|
23437
23690
|
return {
|
|
23438
23691
|
value: reviewEditor.draftValue || selectedJson,
|
|
@@ -23472,17 +23725,17 @@ function ReviewEmptyComponentsWarning({
|
|
|
23472
23725
|
hidden
|
|
23473
23726
|
}) {
|
|
23474
23727
|
if (hidden || count === 0) return null;
|
|
23475
|
-
return /* @__PURE__ */
|
|
23728
|
+
return /* @__PURE__ */ jsx44(Text40, { color: PALETTE.warning, children: `\u26A0 ${count} component${count === 1 ? "" : "s"} had no classifiable props \u2014 review with care` });
|
|
23476
23729
|
}
|
|
23477
23730
|
function ReviewNoSelection() {
|
|
23478
|
-
return /* @__PURE__ */
|
|
23731
|
+
return /* @__PURE__ */ jsx44(Box35, { flexGrow: 1, paddingLeft: 1, flexDirection: "column", children: /* @__PURE__ */ jsx44(Text40, { dimColor: true, children: "No component selected" }) });
|
|
23479
23732
|
}
|
|
23480
23733
|
function ReviewFinalizeError({
|
|
23481
23734
|
message,
|
|
23482
23735
|
hidden
|
|
23483
23736
|
}) {
|
|
23484
23737
|
if (hidden || !message) return null;
|
|
23485
|
-
return /* @__PURE__ */
|
|
23738
|
+
return /* @__PURE__ */ jsx44(Text40, { color: PALETTE.error, children: `\u26A0 ${message}` });
|
|
23486
23739
|
}
|
|
23487
23740
|
function ReviewPanelFooter({
|
|
23488
23741
|
reviewEditor,
|
|
@@ -23491,10 +23744,10 @@ function ReviewPanelFooter({
|
|
|
23491
23744
|
livePreview,
|
|
23492
23745
|
livePreviewSpinner
|
|
23493
23746
|
}) {
|
|
23494
|
-
return /* @__PURE__ */
|
|
23747
|
+
return /* @__PURE__ */ jsxs37(Fragment14, { children: [
|
|
23495
23748
|
reviewEditor.panelOpen === "token-review" ? " [\u2191/\u2193] move [Enter] edit allowed [Esc] close" : sidebarFocused ? sidebarFooter : reviewEditor.showJson ? " [j/k] scroll [Ctrl+u/d] half-page [gg/G] top/bottom [Tab] focus list" : " [Tab] focus list (edit fields)" + (reviewEditor.currentTokenSuggestions().length > 0 ? " [t] token review" : ""),
|
|
23496
|
-
livePreview.status === "running" && /* @__PURE__ */
|
|
23497
|
-
livePreview.disabled && /* @__PURE__ */
|
|
23749
|
+
livePreview.status === "running" && /* @__PURE__ */ jsx44(Text40, { children: ` ${livePreviewSpinner} live preview` }),
|
|
23750
|
+
livePreview.disabled && /* @__PURE__ */ jsx44(Text40, { children: " \xB7 live preview disabled" })
|
|
23498
23751
|
] });
|
|
23499
23752
|
}
|
|
23500
23753
|
function ReviewComponentPanel({
|
|
@@ -23518,11 +23771,11 @@ function ReviewComponentPanel({
|
|
|
23518
23771
|
const slotCount = selectedEntry.$slots ? Object.keys(selectedEntry.$slots).length : 0;
|
|
23519
23772
|
const contentHeight = Math.max(1, height - 3);
|
|
23520
23773
|
const contentWidth = Math.max(1, width - 1);
|
|
23521
|
-
return /* @__PURE__ */
|
|
23522
|
-
/* @__PURE__ */
|
|
23523
|
-
/* @__PURE__ */
|
|
23524
|
-
/* @__PURE__ */
|
|
23525
|
-
/* @__PURE__ */
|
|
23774
|
+
return /* @__PURE__ */ jsx44(FixedPanel, { width, height, borderStyle: void 0, paddingLeft: 1, children: /* @__PURE__ */ jsxs37(Box35, { flexDirection: "column", width: contentWidth, height, flexShrink: 0, overflowY: "hidden", children: [
|
|
23775
|
+
/* @__PURE__ */ jsxs37(Box35, { width: contentWidth, height: 1, flexShrink: 0, children: [
|
|
23776
|
+
/* @__PURE__ */ jsx44(Text40, { bold: true, wrap: "truncate-end", children: selectedKey }),
|
|
23777
|
+
/* @__PURE__ */ jsx44(Box35, { flexGrow: 1 }),
|
|
23778
|
+
/* @__PURE__ */ jsxs37(Text40, { dimColor: true, wrap: "truncate-end", children: [
|
|
23526
23779
|
propCount,
|
|
23527
23780
|
" prop",
|
|
23528
23781
|
propCount !== 1 ? "s" : "",
|
|
@@ -23531,7 +23784,7 @@ function ReviewComponentPanel({
|
|
|
23531
23784
|
sidebarFocused ? "[Tab] focus panel" : "[Tab] focus list"
|
|
23532
23785
|
] })
|
|
23533
23786
|
] }),
|
|
23534
|
-
/* @__PURE__ */
|
|
23787
|
+
/* @__PURE__ */ jsx44(Box35, { width: contentWidth, height: contentHeight, flexShrink: 0, overflowY: "hidden", children: /* @__PURE__ */ jsx44(
|
|
23535
23788
|
ReviewDetailsEditor,
|
|
23536
23789
|
{
|
|
23537
23790
|
selectedKey,
|
|
@@ -23546,8 +23799,8 @@ function ReviewComponentPanel({
|
|
|
23546
23799
|
fieldEditor
|
|
23547
23800
|
}
|
|
23548
23801
|
) }),
|
|
23549
|
-
/* @__PURE__ */
|
|
23550
|
-
/* @__PURE__ */
|
|
23802
|
+
/* @__PURE__ */ jsx44(Box35, { width: contentWidth, height: 1, flexShrink: 0, children: /* @__PURE__ */ jsx44(Text40, { color: saveError ? PALETTE.error : void 0, wrap: "truncate-end", children: saveError ? "\u2717 " + saveError : " " }) }),
|
|
23803
|
+
/* @__PURE__ */ jsx44(Box35, { width: contentWidth, height: 1, flexShrink: 0, children: /* @__PURE__ */ jsx44(Text40, { dimColor: true, wrap: "truncate-end", children: /* @__PURE__ */ jsx44(
|
|
23551
23804
|
ReviewPanelFooter,
|
|
23552
23805
|
{
|
|
23553
23806
|
reviewEditor,
|
|
@@ -23569,9 +23822,43 @@ var init_ReviewComponentPanel = __esm({
|
|
|
23569
23822
|
}
|
|
23570
23823
|
});
|
|
23571
23824
|
|
|
23825
|
+
// packages/experience-design-system-cli/src/analyze/select/tui/components/StatusBar.tsx
|
|
23826
|
+
import { Box as Box36, Text as Text41 } from "ink";
|
|
23827
|
+
import { jsx as jsx45, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
23828
|
+
function StatusBar({ accepted, rejected, reviewed, needsReview }) {
|
|
23829
|
+
const allResolved = needsReview === 0;
|
|
23830
|
+
return /* @__PURE__ */ jsxs38(Box36, { gap: 2, flexWrap: "wrap", children: [
|
|
23831
|
+
/* @__PURE__ */ jsxs38(Text41, { color: PALETTE.success, children: [
|
|
23832
|
+
accepted,
|
|
23833
|
+
" accepted"
|
|
23834
|
+
] }),
|
|
23835
|
+
/* @__PURE__ */ jsxs38(Text41, { color: PALETTE.error, children: [
|
|
23836
|
+
rejected,
|
|
23837
|
+
" rejected"
|
|
23838
|
+
] }),
|
|
23839
|
+
/* @__PURE__ */ jsxs38(Text41, { dimColor: true, children: [
|
|
23840
|
+
needsReview,
|
|
23841
|
+
" pending"
|
|
23842
|
+
] }),
|
|
23843
|
+
/* @__PURE__ */ jsxs38(Text41, { color: PALETTE.info, children: [
|
|
23844
|
+
reviewed,
|
|
23845
|
+
" reviewed"
|
|
23846
|
+
] }),
|
|
23847
|
+
/* @__PURE__ */ jsx45(Text41, { dimColor: true, children: "\xB7" }),
|
|
23848
|
+
/* @__PURE__ */ jsx45(Text41, { dimColor: true, children: "[A] accept all" }),
|
|
23849
|
+
/* @__PURE__ */ jsx45(Text41, { bold: allResolved, color: allResolved ? PALETTE.success : PALETTE.fg, children: "[F] finalize" })
|
|
23850
|
+
] });
|
|
23851
|
+
}
|
|
23852
|
+
var init_StatusBar = __esm({
|
|
23853
|
+
"packages/experience-design-system-cli/src/analyze/select/tui/components/StatusBar.tsx"() {
|
|
23854
|
+
"use strict";
|
|
23855
|
+
init_theme();
|
|
23856
|
+
}
|
|
23857
|
+
});
|
|
23858
|
+
|
|
23572
23859
|
// packages/experience-design-system-cli/src/import/tui/components/ReviewStatus.tsx
|
|
23573
|
-
import { Box as
|
|
23574
|
-
import { jsx as
|
|
23860
|
+
import { Box as Box37, Text as Text42 } from "ink";
|
|
23861
|
+
import { jsx as jsx46, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
23575
23862
|
function countReviewStatuses(entries) {
|
|
23576
23863
|
return entries.reduce(
|
|
23577
23864
|
(counts, entry) => {
|
|
@@ -23583,20 +23870,39 @@ function countReviewStatuses(entries) {
|
|
|
23583
23870
|
{ accepted: 0, rejected: 0, needsReview: 0 }
|
|
23584
23871
|
);
|
|
23585
23872
|
}
|
|
23873
|
+
function ReviewStatusBar({
|
|
23874
|
+
entries,
|
|
23875
|
+
onApproveAll,
|
|
23876
|
+
onFinalize
|
|
23877
|
+
}) {
|
|
23878
|
+
const { accepted, rejected, needsReview } = countReviewStatuses(entries);
|
|
23879
|
+
return /* @__PURE__ */ jsx46(
|
|
23880
|
+
StatusBar,
|
|
23881
|
+
{
|
|
23882
|
+
accepted,
|
|
23883
|
+
rejected,
|
|
23884
|
+
reviewed: 0,
|
|
23885
|
+
needsReview,
|
|
23886
|
+
onApproveAll,
|
|
23887
|
+
onFinalize
|
|
23888
|
+
}
|
|
23889
|
+
);
|
|
23890
|
+
}
|
|
23586
23891
|
function ReviewLoadingState() {
|
|
23587
|
-
return /* @__PURE__ */
|
|
23892
|
+
return /* @__PURE__ */ jsx46(Box37, { paddingX: 2, paddingY: 1, children: /* @__PURE__ */ jsx46(Text42, { dimColor: true, children: "Loading generated definitions..." }) });
|
|
23588
23893
|
}
|
|
23589
23894
|
function ReviewLoadError({ message }) {
|
|
23590
|
-
return /* @__PURE__ */
|
|
23591
|
-
/* @__PURE__ */
|
|
23592
|
-
/* @__PURE__ */
|
|
23593
|
-
/* @__PURE__ */
|
|
23895
|
+
return /* @__PURE__ */ jsxs39(Box37, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
|
|
23896
|
+
/* @__PURE__ */ jsx46(Text42, { color: PALETTE.error, children: message }),
|
|
23897
|
+
/* @__PURE__ */ jsx46(Text42, { children: " " }),
|
|
23898
|
+
/* @__PURE__ */ jsx46(Text42, { dimColor: true, children: "[q / Enter / Esc] Quit" })
|
|
23594
23899
|
] });
|
|
23595
23900
|
}
|
|
23596
23901
|
var init_ReviewStatus = __esm({
|
|
23597
23902
|
"packages/experience-design-system-cli/src/import/tui/components/ReviewStatus.tsx"() {
|
|
23598
23903
|
"use strict";
|
|
23599
23904
|
init_theme();
|
|
23905
|
+
init_StatusBar();
|
|
23600
23906
|
}
|
|
23601
23907
|
});
|
|
23602
23908
|
|
|
@@ -23724,8 +24030,8 @@ var init_runLivePreview = __esm({
|
|
|
23724
24030
|
});
|
|
23725
24031
|
|
|
23726
24032
|
// packages/experience-design-system-cli/src/analyze/select/tui/components/FinalizeDialog.tsx
|
|
23727
|
-
import { Box as
|
|
23728
|
-
import { Fragment as Fragment15, jsx as
|
|
24033
|
+
import { Box as Box38, Text as Text43 } from "ink";
|
|
24034
|
+
import { Fragment as Fragment15, jsx as jsx47, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
23729
24035
|
function FinalizeDialog({
|
|
23730
24036
|
accepted,
|
|
23731
24037
|
rejected,
|
|
@@ -23753,51 +24059,51 @@ function FinalizeDialog({
|
|
|
23753
24059
|
const windowed = removed.slice(offset, offset + FINALIZE_REMOVED_WINDOW);
|
|
23754
24060
|
const hasMoreBelow = offset + FINALIZE_REMOVED_WINDOW < removed.length;
|
|
23755
24061
|
const hasMoreAbove = offset > 0;
|
|
23756
|
-
return /* @__PURE__ */
|
|
23757
|
-
/* @__PURE__ */
|
|
23758
|
-
/* @__PURE__ */
|
|
23759
|
-
/* @__PURE__ */
|
|
23760
|
-
/* @__PURE__ */
|
|
24062
|
+
return /* @__PURE__ */ jsxs40(Box38, { flexDirection: "column", borderStyle: "round", padding: 1, width: 58, children: [
|
|
24063
|
+
/* @__PURE__ */ jsx47(Text43, { bold: true, children: "\u2500".repeat(17) + " Finalize " + "\u2500".repeat(17) }),
|
|
24064
|
+
/* @__PURE__ */ jsx47(Text43, { children: " " }),
|
|
24065
|
+
/* @__PURE__ */ jsxs40(Text43, { children: [
|
|
24066
|
+
/* @__PURE__ */ jsxs40(Text43, { color: PALETTE.success, children: [
|
|
23761
24067
|
accepted,
|
|
23762
24068
|
" accepted"
|
|
23763
24069
|
] }),
|
|
23764
|
-
/* @__PURE__ */
|
|
23765
|
-
/* @__PURE__ */
|
|
24070
|
+
/* @__PURE__ */ jsx47(Text43, { children: " \xB7 " }),
|
|
24071
|
+
/* @__PURE__ */ jsxs40(Text43, { color: PALETTE.error, children: [
|
|
23766
24072
|
rejected,
|
|
23767
24073
|
" rejected"
|
|
23768
24074
|
] }),
|
|
23769
|
-
/* @__PURE__ */
|
|
23770
|
-
/* @__PURE__ */
|
|
24075
|
+
/* @__PURE__ */ jsx47(Text43, { children: " \xB7 " }),
|
|
24076
|
+
/* @__PURE__ */ jsxs40(Text43, { dimColor: true, children: [
|
|
23771
24077
|
needsReview,
|
|
23772
24078
|
" unresolved"
|
|
23773
24079
|
] })
|
|
23774
24080
|
] }),
|
|
23775
|
-
/* @__PURE__ */
|
|
23776
|
-
noneAccepted && /* @__PURE__ */
|
|
23777
|
-
/* @__PURE__ */
|
|
23778
|
-
/* @__PURE__ */
|
|
23779
|
-
/* @__PURE__ */
|
|
24081
|
+
/* @__PURE__ */ jsx47(Text43, { children: " " }),
|
|
24082
|
+
noneAccepted && /* @__PURE__ */ jsxs40(Fragment15, { children: [
|
|
24083
|
+
/* @__PURE__ */ jsx47(Text43, { bold: true, color: PALETTE.warning, children: "\u26A0 No components are accepted \u2014 nothing will be pushed." }),
|
|
24084
|
+
/* @__PURE__ */ jsx47(Text43, { color: PALETTE.warning, children: " Accept at least one component ([a] a row, [A] accept all) to push." }),
|
|
24085
|
+
/* @__PURE__ */ jsx47(Text43, { children: " " })
|
|
23780
24086
|
] }),
|
|
23781
|
-
!allResolved && /* @__PURE__ */
|
|
23782
|
-
/* @__PURE__ */
|
|
23783
|
-
/* @__PURE__ */
|
|
23784
|
-
/* @__PURE__ */
|
|
24087
|
+
!allResolved && /* @__PURE__ */ jsxs40(Fragment15, { children: [
|
|
24088
|
+
/* @__PURE__ */ jsx47(Text43, { color: PALETTE.warning, children: "\u26A0 " + needsReview + " unresolved component" + (needsReview === 1 ? "" : "s") + " will not be pushed." }),
|
|
24089
|
+
/* @__PURE__ */ jsx47(Text43, { color: PALETTE.warning, children: " Only explicitly accepted components ship." }),
|
|
24090
|
+
/* @__PURE__ */ jsx47(Text43, { children: " " })
|
|
23785
24091
|
] }),
|
|
23786
|
-
/* @__PURE__ */
|
|
23787
|
-
previewStatus === "running" ? /* @__PURE__ */
|
|
23788
|
-
/* @__PURE__ */
|
|
24092
|
+
/* @__PURE__ */ jsxs40(Box38, { flexDirection: "column", height: 2, children: [
|
|
24093
|
+
previewStatus === "running" ? /* @__PURE__ */ jsx47(Text43, { dimColor: true, children: "Previewing deletions against the target space\u2026" }) : previewStatus === "error" ? /* @__PURE__ */ jsx47(Text43, { color: PALETTE.warning, children: "\u26A0 Could not preview deletions (the push will still proceed)." }) : /* @__PURE__ */ jsx47(Text43, { children: " " }),
|
|
24094
|
+
/* @__PURE__ */ jsx47(Text43, { children: " " })
|
|
23789
24095
|
] }),
|
|
23790
|
-
previewStatus === "done" && removed.length > 0 && /* @__PURE__ */
|
|
23791
|
-
/* @__PURE__ */
|
|
23792
|
-
hasMoreAbove && /* @__PURE__ */
|
|
23793
|
-
windowed.map((rc) => /* @__PURE__ */
|
|
23794
|
-
hasMoreBelow && /* @__PURE__ */
|
|
23795
|
-
removed.length > FINALIZE_REMOVED_WINDOW && /* @__PURE__ */
|
|
23796
|
-
/* @__PURE__ */
|
|
24096
|
+
previewStatus === "done" && removed.length > 0 && /* @__PURE__ */ jsxs40(Fragment15, { children: [
|
|
24097
|
+
/* @__PURE__ */ jsx47(Text43, { bold: true, color: PALETTE.error, children: removedComponentsHeader(removed.length, false) }),
|
|
24098
|
+
hasMoreAbove && /* @__PURE__ */ jsx47(Text43, { dimColor: true, children: " \u2191 more above" }),
|
|
24099
|
+
windowed.map((rc) => /* @__PURE__ */ jsx47(Text43, { color: PALETTE.error, children: removedComponentLine(rc) }, rc.id)),
|
|
24100
|
+
hasMoreBelow && /* @__PURE__ */ jsx47(Text43, { dimColor: true, children: " \u2193 more below" }),
|
|
24101
|
+
removed.length > FINALIZE_REMOVED_WINDOW && /* @__PURE__ */ jsx47(Text43, { dimColor: true, children: " [j/k] scroll deletions" }),
|
|
24102
|
+
/* @__PURE__ */ jsx47(Text43, { children: " " })
|
|
23797
24103
|
] }),
|
|
23798
|
-
/* @__PURE__ */
|
|
23799
|
-
/* @__PURE__ */
|
|
23800
|
-
/* @__PURE__ */
|
|
24104
|
+
/* @__PURE__ */ jsx47(Text43, { children: noneAccepted ? "Confirm exit with nothing accepted?" : allResolved ? "Save decisions and exit? All components resolved." : "Save decisions and exit?" }),
|
|
24105
|
+
/* @__PURE__ */ jsx47(Text43, { children: " " }),
|
|
24106
|
+
/* @__PURE__ */ jsx47(Text43, { children: " [y / Enter] Confirm [n / Esc] Cancel" })
|
|
23801
24107
|
] });
|
|
23802
24108
|
}
|
|
23803
24109
|
var FINALIZE_REMOVED_WINDOW;
|
|
@@ -24302,8 +24608,8 @@ var init_useReviewSurfaceState = __esm({
|
|
|
24302
24608
|
});
|
|
24303
24609
|
|
|
24304
24610
|
// packages/experience-design-system-cli/src/analyze/select/tui/components/QuitDialog.tsx
|
|
24305
|
-
import { Box as
|
|
24306
|
-
import { Fragment as Fragment16, jsx as
|
|
24611
|
+
import { Box as Box39, Text as Text44 } from "ink";
|
|
24612
|
+
import { Fragment as Fragment16, jsx as jsx48, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
24307
24613
|
function QuitDialog({ hasUnsavedDrafts, onConfirm, onCancel }) {
|
|
24308
24614
|
useImmediateInput((input, key) => {
|
|
24309
24615
|
if (input === "y" || key.return) {
|
|
@@ -24312,16 +24618,16 @@ function QuitDialog({ hasUnsavedDrafts, onConfirm, onCancel }) {
|
|
|
24312
24618
|
onCancel();
|
|
24313
24619
|
}
|
|
24314
24620
|
});
|
|
24315
|
-
return /* @__PURE__ */
|
|
24316
|
-
/* @__PURE__ */
|
|
24317
|
-
/* @__PURE__ */
|
|
24318
|
-
hasUnsavedDrafts ? /* @__PURE__ */
|
|
24319
|
-
/* @__PURE__ */
|
|
24320
|
-
/* @__PURE__ */
|
|
24321
|
-
/* @__PURE__ */
|
|
24322
|
-
] }) : /* @__PURE__ */
|
|
24323
|
-
/* @__PURE__ */
|
|
24324
|
-
/* @__PURE__ */
|
|
24621
|
+
return /* @__PURE__ */ jsxs41(Box39, { flexDirection: "column", borderStyle: "round", padding: 1, width: 50, children: [
|
|
24622
|
+
/* @__PURE__ */ jsx48(Text44, { bold: true, children: "\u2500".repeat(19) + " Quit " + "\u2500".repeat(19) }),
|
|
24623
|
+
/* @__PURE__ */ jsx48(Text44, { children: " " }),
|
|
24624
|
+
hasUnsavedDrafts ? /* @__PURE__ */ jsxs41(Fragment16, { children: [
|
|
24625
|
+
/* @__PURE__ */ jsx48(Text44, { children: "You have unsaved draft edits." }),
|
|
24626
|
+
/* @__PURE__ */ jsx48(Text44, { children: "Session state is preserved \u2014 you can resume" }),
|
|
24627
|
+
/* @__PURE__ */ jsx48(Text44, { children: "by running the same review command again." })
|
|
24628
|
+
] }) : /* @__PURE__ */ jsx48(Text44, { children: "Session is saved. Quit without finalizing?" }),
|
|
24629
|
+
/* @__PURE__ */ jsx48(Text44, { children: " " }),
|
|
24630
|
+
/* @__PURE__ */ jsx48(Text44, { children: " [y / Enter] Quit [n / Esc] Stay" })
|
|
24325
24631
|
] });
|
|
24326
24632
|
}
|
|
24327
24633
|
var init_QuitDialog = __esm({
|
|
@@ -24332,8 +24638,8 @@ var init_QuitDialog = __esm({
|
|
|
24332
24638
|
});
|
|
24333
24639
|
|
|
24334
24640
|
// packages/experience-design-system-cli/src/import/tui/components/ReviewDialogs.tsx
|
|
24335
|
-
import { Box as
|
|
24336
|
-
import { Fragment as Fragment17, jsx as
|
|
24641
|
+
import { Box as Box40, Text as Text45 } from "ink";
|
|
24642
|
+
import { Fragment as Fragment17, jsx as jsx49, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
24337
24643
|
function ReviewFinalizeDialogs({
|
|
24338
24644
|
showFinalize,
|
|
24339
24645
|
showQuit,
|
|
@@ -24347,8 +24653,8 @@ function ReviewFinalizeDialogs({
|
|
|
24347
24653
|
onQuitCancel
|
|
24348
24654
|
}) {
|
|
24349
24655
|
const { accepted, rejected, needsReview } = countReviewStatuses(components);
|
|
24350
|
-
return /* @__PURE__ */
|
|
24351
|
-
showFinalize && /* @__PURE__ */
|
|
24656
|
+
return /* @__PURE__ */ jsxs42(Fragment17, { children: [
|
|
24657
|
+
showFinalize && /* @__PURE__ */ jsx49(
|
|
24352
24658
|
FinalizeDialog,
|
|
24353
24659
|
{
|
|
24354
24660
|
accepted,
|
|
@@ -24361,7 +24667,7 @@ function ReviewFinalizeDialogs({
|
|
|
24361
24667
|
onCancel: onFinalizeCancel
|
|
24362
24668
|
}
|
|
24363
24669
|
),
|
|
24364
|
-
showQuit && /* @__PURE__ */
|
|
24670
|
+
showQuit && /* @__PURE__ */ jsx49(QuitDialog, { hasUnsavedDrafts: false, onConfirm: onQuitConfirm, onCancel: onQuitCancel })
|
|
24365
24671
|
] });
|
|
24366
24672
|
}
|
|
24367
24673
|
function ReviewStepDialogs({
|
|
@@ -24371,7 +24677,7 @@ function ReviewStepDialogs({
|
|
|
24371
24677
|
onFinalize,
|
|
24372
24678
|
onQuit
|
|
24373
24679
|
}) {
|
|
24374
|
-
return /* @__PURE__ */
|
|
24680
|
+
return /* @__PURE__ */ jsx49(
|
|
24375
24681
|
ReviewFinalizeDialogs,
|
|
24376
24682
|
{
|
|
24377
24683
|
showFinalize: surfaceState.showFinalize,
|
|
@@ -24389,12 +24695,12 @@ function ReviewStepDialogs({
|
|
|
24389
24695
|
}
|
|
24390
24696
|
function ReviewReloadDialog({ open }) {
|
|
24391
24697
|
if (!open) return null;
|
|
24392
|
-
return /* @__PURE__ */
|
|
24393
|
-
/* @__PURE__ */
|
|
24394
|
-
/* @__PURE__ */
|
|
24395
|
-
/* @__PURE__ */
|
|
24396
|
-
/* @__PURE__ */
|
|
24397
|
-
/* @__PURE__ */
|
|
24698
|
+
return /* @__PURE__ */ jsxs42(Box40, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
|
|
24699
|
+
/* @__PURE__ */ jsx49(Text45, { bold: true, color: PALETTE.warning, children: "Reload from saved state?" }),
|
|
24700
|
+
/* @__PURE__ */ jsx49(Text45, { children: "Unsaved in-memory changes will be lost." }),
|
|
24701
|
+
/* @__PURE__ */ jsx49(Text45, { children: " " }),
|
|
24702
|
+
/* @__PURE__ */ jsx49(Text45, { children: " [Enter] Confirm" }),
|
|
24703
|
+
/* @__PURE__ */ jsx49(Text45, { children: " [Esc] Cancel" })
|
|
24398
24704
|
] });
|
|
24399
24705
|
}
|
|
24400
24706
|
var init_ReviewDialogs = __esm({
|
|
@@ -24802,8 +25108,8 @@ var init_useReviewPreview = __esm({
|
|
|
24802
25108
|
});
|
|
24803
25109
|
|
|
24804
25110
|
// packages/experience-design-system-cli/src/import/tui/components/LivePreviewSummary.tsx
|
|
24805
|
-
import { Box as
|
|
24806
|
-
import { jsx as
|
|
25111
|
+
import { Box as Box41, Text as Text46 } from "ink";
|
|
25112
|
+
import { jsx as jsx50, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
24807
25113
|
function LivePreviewSummary({
|
|
24808
25114
|
enabled,
|
|
24809
25115
|
previewAnnotations,
|
|
@@ -24817,19 +25123,19 @@ function LivePreviewSummary({
|
|
|
24817
25123
|
const counts = { new: 0, changed: 0, removed: 0, breaking: 0 };
|
|
24818
25124
|
for (const annotation of previewAnnotations.values()) counts[annotation] += 1;
|
|
24819
25125
|
const hasCounts = counts.new + counts.changed + counts.removed + counts.breaking > 0;
|
|
24820
|
-
if (disabled) return /* @__PURE__ */
|
|
24821
|
-
if (status === "running" && !hasCounts) return /* @__PURE__ */
|
|
25126
|
+
if (disabled) return /* @__PURE__ */ jsx50(Text46, { dimColor: true, children: "Preview: disabled (creds rejected)" });
|
|
25127
|
+
if (status === "running" && !hasCounts) return /* @__PURE__ */ jsx50(Text46, { dimColor: true, children: `Preview: ${spinner} running...` });
|
|
24822
25128
|
if (!hasCounts) return null;
|
|
24823
|
-
return /* @__PURE__ */
|
|
24824
|
-
/* @__PURE__ */
|
|
24825
|
-
/* @__PURE__ */
|
|
24826
|
-
/* @__PURE__ */
|
|
24827
|
-
/* @__PURE__ */
|
|
24828
|
-
/* @__PURE__ */
|
|
24829
|
-
/* @__PURE__ */
|
|
24830
|
-
showRemovedListHint && removedCount > 0 && /* @__PURE__ */
|
|
24831
|
-
/* @__PURE__ */
|
|
24832
|
-
/* @__PURE__ */
|
|
25129
|
+
return /* @__PURE__ */ jsxs43(Box41, { children: [
|
|
25130
|
+
/* @__PURE__ */ jsx50(Text46, { children: "Preview: " }),
|
|
25131
|
+
/* @__PURE__ */ jsx50(Text46, { color: PALETTE.success, children: `${counts.new} new` }),
|
|
25132
|
+
/* @__PURE__ */ jsx50(Text46, { children: " \xB7 " }),
|
|
25133
|
+
/* @__PURE__ */ jsx50(Text46, { color: PALETTE.warning, children: `${counts.changed} changed` }),
|
|
25134
|
+
/* @__PURE__ */ jsx50(Text46, { children: " \xB7 " }),
|
|
25135
|
+
/* @__PURE__ */ jsx50(Text46, { dimColor: true, children: `${counts.removed} removed` }),
|
|
25136
|
+
showRemovedListHint && removedCount > 0 && /* @__PURE__ */ jsx50(Text46, { dimColor: true, children: " ([d] removed list)" }),
|
|
25137
|
+
/* @__PURE__ */ jsx50(Text46, { children: " \xB7 " }),
|
|
25138
|
+
/* @__PURE__ */ jsx50(Text46, { color: PALETTE.error, bold: true, children: `${counts.breaking} breaking` })
|
|
24833
25139
|
] });
|
|
24834
25140
|
}
|
|
24835
25141
|
var init_LivePreviewSummary = __esm({
|
|
@@ -24840,10 +25146,10 @@ var init_LivePreviewSummary = __esm({
|
|
|
24840
25146
|
});
|
|
24841
25147
|
|
|
24842
25148
|
// packages/experience-design-system-cli/src/import/tui/steps/GenerateReviewStep.tsx
|
|
24843
|
-
import { useCallback as useCallback6, useEffect as useEffect13, useMemo as
|
|
24844
|
-
import
|
|
24845
|
-
import { Box as
|
|
24846
|
-
import { Fragment as Fragment18, jsx as
|
|
25149
|
+
import { useCallback as useCallback6, useEffect as useEffect13, useMemo as useMemo4, useRef as useRef9, useState as useState22 } from "react";
|
|
25150
|
+
import figures7 from "figures";
|
|
25151
|
+
import { Box as Box42, Text as Text47, useStdout as useStdout2 } from "ink";
|
|
25152
|
+
import { Fragment as Fragment18, jsx as jsx51, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
24847
25153
|
function sortComponentsForSidebar(components, cycleParticipants) {
|
|
24848
25154
|
const isEmpty2 = (entry) => Object.keys(entry.$properties ?? {}).length === 0 && Object.keys(entry.$slots ?? {}).length === 0;
|
|
24849
25155
|
const tier = (c2) => {
|
|
@@ -24884,10 +25190,10 @@ function CyclePathLine({
|
|
|
24884
25190
|
highlightComponents = false,
|
|
24885
25191
|
highlightLine = false
|
|
24886
25192
|
}) {
|
|
24887
|
-
return /* @__PURE__ */
|
|
25193
|
+
return /* @__PURE__ */ jsxs44(Text47, { color: highlightLine ? PALETTE.warning : void 0, children: [
|
|
24888
25194
|
prefix,
|
|
24889
25195
|
segments.map(
|
|
24890
|
-
(segment, index) => segment.kind === "slot" ? /* @__PURE__ */
|
|
25196
|
+
(segment, index) => segment.kind === "slot" ? /* @__PURE__ */ jsx51(Text47, { color: PALETTE.info, children: segment.text }, index) : segment.kind === "arrow" ? /* @__PURE__ */ jsx51(Text47, { dimColor: true, children: segment.text }, index) : /* @__PURE__ */ jsx51(Text47, { color: highlightComponents ? PALETTE.warning : void 0, children: segment.text }, index)
|
|
24891
25197
|
)
|
|
24892
25198
|
] });
|
|
24893
25199
|
}
|
|
@@ -24934,9 +25240,9 @@ function deriveBreakingChanges(response) {
|
|
|
24934
25240
|
}
|
|
24935
25241
|
function GenerateReviewStep(props) {
|
|
24936
25242
|
if (!props.extractSessionId) {
|
|
24937
|
-
return /* @__PURE__ */
|
|
25243
|
+
return /* @__PURE__ */ jsx51(Box42, { paddingX: 2, paddingY: 1, children: /* @__PURE__ */ jsx51(Text47, { color: PALETTE.error, children: "Error: no session ID \u2014 cannot load generated definitions." }) });
|
|
24938
25244
|
}
|
|
24939
|
-
return /* @__PURE__ */
|
|
25245
|
+
return /* @__PURE__ */ jsx51(GenerateReviewStepView, { ...props, extractSessionId: props.extractSessionId });
|
|
24940
25246
|
}
|
|
24941
25247
|
function GenerateReviewStepView({
|
|
24942
25248
|
extractSessionId,
|
|
@@ -25039,6 +25345,8 @@ function GenerateReviewStepView({
|
|
|
25039
25345
|
showHelp,
|
|
25040
25346
|
setShowHelp
|
|
25041
25347
|
} = useSidebarSearchState();
|
|
25348
|
+
const lineagePanel = useOverlayPanel({ toggleKey: "l" });
|
|
25349
|
+
const [lineageCursor, setLineageCursor] = useState22(0);
|
|
25042
25350
|
const breakingPanel = useOverlayPanel({ toggleKey: "b", onClose: () => setBreakingDetailOpen(false) });
|
|
25043
25351
|
const [breakingChanges, setBreakingChanges] = useState22([]);
|
|
25044
25352
|
const [breakingCursor, setBreakingCursor] = useState22(0);
|
|
@@ -25107,12 +25415,12 @@ function GenerateReviewStepView({
|
|
|
25107
25415
|
} catch {
|
|
25108
25416
|
}
|
|
25109
25417
|
};
|
|
25110
|
-
const componentGraph =
|
|
25111
|
-
const sidebarGraph =
|
|
25418
|
+
const componentGraph = useMemo4(() => buildComponentGraph(components), [components]);
|
|
25419
|
+
const sidebarGraph = useMemo4(
|
|
25112
25420
|
() => buildComponentGraph(components, { stripRejectedEdges: true }),
|
|
25113
25421
|
[components]
|
|
25114
25422
|
);
|
|
25115
|
-
const closures =
|
|
25423
|
+
const closures = useMemo4(() => computeAllClosures(componentGraph), [componentGraph]);
|
|
25116
25424
|
useEffect13(() => {
|
|
25117
25425
|
if (seededGroupsRef.current) return;
|
|
25118
25426
|
if (closures.size === 0 && slotCycles.length === 0) return;
|
|
@@ -25124,14 +25432,14 @@ function GenerateReviewStepView({
|
|
|
25124
25432
|
)
|
|
25125
25433
|
);
|
|
25126
25434
|
}, [closures, slotCycles]);
|
|
25127
|
-
const directIssues =
|
|
25435
|
+
const directIssues = useMemo4(() => {
|
|
25128
25436
|
const m = /* @__PURE__ */ new Map();
|
|
25129
25437
|
for (const c2 of components) {
|
|
25130
25438
|
if (c2.status === "rejected") m.set(c2.key, "error");
|
|
25131
25439
|
}
|
|
25132
25440
|
return m;
|
|
25133
25441
|
}, [components]);
|
|
25134
|
-
const cycleView =
|
|
25442
|
+
const cycleView = useMemo4(() => computeCycleView(components), [components]);
|
|
25135
25443
|
useEffect13(() => {
|
|
25136
25444
|
const decision = computeAutoRejectDecision({
|
|
25137
25445
|
loading,
|
|
@@ -25202,7 +25510,7 @@ function GenerateReviewStepView({
|
|
|
25202
25510
|
reviewEditor.setSaveError(null);
|
|
25203
25511
|
setFinalizeError(null);
|
|
25204
25512
|
};
|
|
25205
|
-
const groupedItemsMemo =
|
|
25513
|
+
const groupedItemsMemo = useMemo4(
|
|
25206
25514
|
() => components.map((c2) => ({
|
|
25207
25515
|
key: c2.key,
|
|
25208
25516
|
entry: c2.entry,
|
|
@@ -25210,12 +25518,12 @@ function GenerateReviewStepView({
|
|
|
25210
25518
|
})),
|
|
25211
25519
|
[components, directIssues]
|
|
25212
25520
|
);
|
|
25213
|
-
const brokenKeys =
|
|
25521
|
+
const brokenKeys = useMemo4(
|
|
25214
25522
|
() => new Set(breakingChanges.map((b) => b.componentName)),
|
|
25215
25523
|
[breakingChanges]
|
|
25216
25524
|
);
|
|
25217
|
-
const breakingRows =
|
|
25218
|
-
const filterVisibleKeys =
|
|
25525
|
+
const breakingRows = useMemo4(() => buildBreakingRows(breakingChanges), [breakingChanges]);
|
|
25526
|
+
const filterVisibleKeys = useMemo4(() => {
|
|
25219
25527
|
if (jumpFilterTarget) {
|
|
25220
25528
|
return findAllAncestors2(jumpFilterTarget, sidebarGraph);
|
|
25221
25529
|
}
|
|
@@ -25231,7 +25539,7 @@ function GenerateReviewStepView({
|
|
|
25231
25539
|
})();
|
|
25232
25540
|
return intersectFilterKeys(categoryKeys, searchKeys);
|
|
25233
25541
|
}, [jumpFilterTarget, activeFilters, cycleView, brokenKeys, searchQuery, groupedItemsMemo, sidebarGraph]);
|
|
25234
|
-
const visibleRowsMemo =
|
|
25542
|
+
const visibleRowsMemo = useMemo4(
|
|
25235
25543
|
() => buildVisibleRows({
|
|
25236
25544
|
items: groupedItemsMemo,
|
|
25237
25545
|
cycleParticipants: cycleView.structural,
|
|
@@ -25242,7 +25550,7 @@ function GenerateReviewStepView({
|
|
|
25242
25550
|
}),
|
|
25243
25551
|
[groupedItemsMemo, cycleView, expandedGroups, columnOneView, sidebarGraph, filterVisibleKeys]
|
|
25244
25552
|
);
|
|
25245
|
-
const selectableRowPositions =
|
|
25553
|
+
const selectableRowPositions = useMemo4(() => {
|
|
25246
25554
|
const out = [];
|
|
25247
25555
|
for (let i = 0; i < visibleRowsMemo.length; i++) {
|
|
25248
25556
|
if (visibleRowsMemo[i].itemIdx >= 0) out.push(i);
|
|
@@ -25251,9 +25559,11 @@ function GenerateReviewStepView({
|
|
|
25251
25559
|
}, [visibleRowsMemo]);
|
|
25252
25560
|
const selectedIdx = visibleRowsMemo[cursorRowIdx]?.itemIdx ?? -1;
|
|
25253
25561
|
const focusedComponentKey = components[selectedIdx]?.key ?? null;
|
|
25562
|
+
const { entries: lineageEntries, jumpables: lineageJumpables } = useLineage(focusedComponentKey, componentGraph);
|
|
25254
25563
|
const { sidebarVisibleCount: visibleCount, panelMaxRows } = computeSidebarBudget({
|
|
25255
25564
|
rows: stdout?.rows ?? FALLBACK_ROWS,
|
|
25256
|
-
panelOpen:
|
|
25565
|
+
panelOpen: lineagePanel.isOpen,
|
|
25566
|
+
entryCount: lineageEntries.length
|
|
25257
25567
|
});
|
|
25258
25568
|
useEffect13(() => {
|
|
25259
25569
|
if (selectableRowPositions.length === 0) return;
|
|
@@ -25286,7 +25596,7 @@ function GenerateReviewStepView({
|
|
|
25286
25596
|
selectedIdx,
|
|
25287
25597
|
extractSessionId
|
|
25288
25598
|
});
|
|
25289
|
-
const renderStatusByKey =
|
|
25599
|
+
const renderStatusByKey = useMemo4(() => {
|
|
25290
25600
|
const merged = /* @__PURE__ */ new Map();
|
|
25291
25601
|
for (const closure of closures.values()) {
|
|
25292
25602
|
const per = computeRenderStatuses(closure, directIssues);
|
|
@@ -25299,7 +25609,7 @@ function GenerateReviewStepView({
|
|
|
25299
25609
|
}
|
|
25300
25610
|
return merged;
|
|
25301
25611
|
}, [closures, directIssues]);
|
|
25302
|
-
const selectionStateByKey =
|
|
25612
|
+
const selectionStateByKey = useMemo4(() => {
|
|
25303
25613
|
const map = /* @__PURE__ */ new Map();
|
|
25304
25614
|
for (const c2 of components) {
|
|
25305
25615
|
if (c2.status === "accepted") map.set(c2.key, "accepted");
|
|
@@ -25308,7 +25618,7 @@ function GenerateReviewStepView({
|
|
|
25308
25618
|
}
|
|
25309
25619
|
return map;
|
|
25310
25620
|
}, [components]);
|
|
25311
|
-
const searchMatches =
|
|
25621
|
+
const searchMatches = useMemo4(() => {
|
|
25312
25622
|
if (!searchQuery) return [];
|
|
25313
25623
|
const out = [];
|
|
25314
25624
|
for (const pos of selectableRowPositions) {
|
|
@@ -25318,7 +25628,7 @@ function GenerateReviewStepView({
|
|
|
25318
25628
|
}
|
|
25319
25629
|
return out;
|
|
25320
25630
|
}, [searchQuery, selectableRowPositions, visibleRowsMemo, components]);
|
|
25321
|
-
const searchMatchCount =
|
|
25631
|
+
const searchMatchCount = useMemo4(() => {
|
|
25322
25632
|
if (searchMatches.length === 0) return 0;
|
|
25323
25633
|
const seen = /* @__PURE__ */ new Set();
|
|
25324
25634
|
for (const pos of searchMatches) {
|
|
@@ -25327,7 +25637,7 @@ function GenerateReviewStepView({
|
|
|
25327
25637
|
}
|
|
25328
25638
|
return seen.size;
|
|
25329
25639
|
}, [searchMatches, visibleRowsMemo]);
|
|
25330
|
-
const dimPredicate =
|
|
25640
|
+
const dimPredicate = useMemo4(
|
|
25331
25641
|
() => buildFlatDimPredicate({
|
|
25332
25642
|
viewMode: columnOneView,
|
|
25333
25643
|
searchQuery,
|
|
@@ -25358,7 +25668,7 @@ function GenerateReviewStepView({
|
|
|
25358
25668
|
}
|
|
25359
25669
|
}
|
|
25360
25670
|
};
|
|
25361
|
-
const breakEdges =
|
|
25671
|
+
const breakEdges = useMemo4(() => {
|
|
25362
25672
|
const cycle = slotCycles[cyclesCursor];
|
|
25363
25673
|
if (!cycle) return [];
|
|
25364
25674
|
return enumerateCycleBreaks(cycle, components);
|
|
@@ -25511,6 +25821,21 @@ function GenerateReviewStepView({
|
|
|
25511
25821
|
}
|
|
25512
25822
|
return;
|
|
25513
25823
|
}
|
|
25824
|
+
if (lineagePanel.isOpen) {
|
|
25825
|
+
if (lineagePanel.handleInput(input, key)) return;
|
|
25826
|
+
if (handleLineageNavigation({
|
|
25827
|
+
input,
|
|
25828
|
+
key,
|
|
25829
|
+
cursor: lineageCursor,
|
|
25830
|
+
jumpables: lineageJumpables,
|
|
25831
|
+
onCursorChange: setLineageCursor,
|
|
25832
|
+
onJump: jumpCursorToName,
|
|
25833
|
+
onClose: lineagePanel.close,
|
|
25834
|
+
allowTab: true
|
|
25835
|
+
}))
|
|
25836
|
+
return;
|
|
25837
|
+
return;
|
|
25838
|
+
}
|
|
25514
25839
|
if (breakPanel.isOpen) {
|
|
25515
25840
|
if (breakConfirm) {
|
|
25516
25841
|
if (input === "y") {
|
|
@@ -25583,6 +25908,11 @@ function GenerateReviewStepView({
|
|
|
25583
25908
|
setCyclesCursor(0);
|
|
25584
25909
|
return;
|
|
25585
25910
|
}
|
|
25911
|
+
if (input === "l" && sidebarFocused && focusedComponentKey) {
|
|
25912
|
+
lineagePanel.open();
|
|
25913
|
+
setLineageCursor(0);
|
|
25914
|
+
return;
|
|
25915
|
+
}
|
|
25586
25916
|
if (input === "b" && sidebarFocused && breakingChanges.length > 0) {
|
|
25587
25917
|
breakingPanel.open();
|
|
25588
25918
|
setBreakingCursor(0);
|
|
@@ -25780,30 +26110,30 @@ function GenerateReviewStepView({
|
|
|
25780
26110
|
}
|
|
25781
26111
|
});
|
|
25782
26112
|
if (loading) {
|
|
25783
|
-
return /* @__PURE__ */
|
|
26113
|
+
return /* @__PURE__ */ jsx51(ReviewLoadingState, {});
|
|
25784
26114
|
}
|
|
25785
26115
|
if (loadError) {
|
|
25786
|
-
return /* @__PURE__ */
|
|
26116
|
+
return /* @__PURE__ */ jsx51(ReviewLoadError, { message: loadError });
|
|
25787
26117
|
}
|
|
25788
26118
|
if (showHelp) {
|
|
25789
|
-
return /* @__PURE__ */
|
|
26119
|
+
return /* @__PURE__ */ jsx51(HelpOverlay, { sections: HELP_SECTIONS2, onClose: () => setShowHelp(false) });
|
|
25790
26120
|
}
|
|
25791
26121
|
const renderBreakOverlay = (width) => {
|
|
25792
26122
|
const highlightedCycle = slotCycles[cyclesCursor];
|
|
25793
|
-
return /* @__PURE__ */
|
|
25794
|
-
/* @__PURE__ */
|
|
25795
|
-
highlightedCycle && /* @__PURE__ */
|
|
25796
|
-
/* @__PURE__ */
|
|
25797
|
-
/* @__PURE__ */
|
|
25798
|
-
breakEdges.length > 0 && /* @__PURE__ */
|
|
26123
|
+
return /* @__PURE__ */ jsxs44(Box42, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, width, children: [
|
|
26124
|
+
/* @__PURE__ */ jsx51(Text47, { bold: true, color: PALETTE.warning, children: `BREAK CYCLE ${cyclesCursor + 1} \u2014 remove a slot edge or reject a member` }),
|
|
26125
|
+
highlightedCycle && /* @__PURE__ */ jsx51(CyclePathLine, { segments: formatCyclePathSegments(highlightedCycle), prefix: " ", highlightComponents: true }),
|
|
26126
|
+
/* @__PURE__ */ jsx51(Text47, { dimColor: true, children: highlightedCycle ? "Deleting an edge removes it from $allowedComponents (undo with Ctrl+Z)." : "No cycle highlighted." }),
|
|
26127
|
+
/* @__PURE__ */ jsx51(Text47, { children: " " }),
|
|
26128
|
+
breakEdges.length > 0 && /* @__PURE__ */ jsx51(Text47, { dimColor: true, children: "remove slot edge:" }),
|
|
25799
26129
|
breakEdges.map((edge, idx) => {
|
|
25800
26130
|
const isCursor = idx === breakCursor;
|
|
25801
|
-
return /* @__PURE__ */
|
|
26131
|
+
return /* @__PURE__ */ jsx51(Text47, { inverse: isCursor, children: `${isCursor ? figures7.pointer : " "} remove '${edge.toComponent}' from ${edge.fromComponent}.$slots.${edge.slotName}.$allowedComponents` }, `break-${idx}`);
|
|
25802
26132
|
}),
|
|
25803
|
-
breakConfirm ? /* @__PURE__ */
|
|
25804
|
-
/* @__PURE__ */
|
|
25805
|
-
/* @__PURE__ */
|
|
25806
|
-
] }) : /* @__PURE__ */
|
|
26133
|
+
breakConfirm ? /* @__PURE__ */ jsxs44(Fragment18, { children: [
|
|
26134
|
+
/* @__PURE__ */ jsx51(Text47, { children: " " }),
|
|
26135
|
+
/* @__PURE__ */ jsx51(Text47, { bold: true, color: PALETTE.warning, children: "Delete this slot edge? [y] confirm [n] cancel" })
|
|
26136
|
+
] }) : /* @__PURE__ */ jsx51(Text47, { dimColor: true, children: "[\u2191\u2193/j/k] move [Enter] delete [x/Esc] close" })
|
|
25807
26137
|
] });
|
|
25808
26138
|
};
|
|
25809
26139
|
const breakOverlayFullScreen = breakPanel.isOpen && shouldBreakOverlayGoFullScreen({
|
|
@@ -25847,8 +26177,8 @@ function GenerateReviewStepView({
|
|
|
25847
26177
|
for (const c2 of closures.values()) if (c2.nodes.length > 1) return true;
|
|
25848
26178
|
return false;
|
|
25849
26179
|
})();
|
|
25850
|
-
return /* @__PURE__ */
|
|
25851
|
-
/* @__PURE__ */
|
|
26180
|
+
return /* @__PURE__ */ jsxs44(Box42, { flexDirection: "column", children: [
|
|
26181
|
+
/* @__PURE__ */ jsx51(
|
|
25852
26182
|
ReviewStepDialogs,
|
|
25853
26183
|
{
|
|
25854
26184
|
surfaceState: reviewSurface,
|
|
@@ -25858,24 +26188,24 @@ function GenerateReviewStepView({
|
|
|
25858
26188
|
onQuit
|
|
25859
26189
|
}
|
|
25860
26190
|
),
|
|
25861
|
-
showUnsavedWarning && !dialogOpen && /* @__PURE__ */
|
|
25862
|
-
/* @__PURE__ */
|
|
25863
|
-
/* @__PURE__ */
|
|
25864
|
-
/* @__PURE__ */
|
|
25865
|
-
/* @__PURE__ */
|
|
25866
|
-
/* @__PURE__ */
|
|
25867
|
-
/* @__PURE__ */
|
|
26191
|
+
showUnsavedWarning && !dialogOpen && /* @__PURE__ */ jsxs44(Box42, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
|
|
26192
|
+
/* @__PURE__ */ jsx51(Text47, { bold: true, color: PALETTE.warning, children: "Unsaved changes" }),
|
|
26193
|
+
/* @__PURE__ */ jsx51(Text47, { children: "You have unsaved edits in the current field editor." }),
|
|
26194
|
+
/* @__PURE__ */ jsx51(Text47, { children: " " }),
|
|
26195
|
+
/* @__PURE__ */ jsx51(Text47, { children: " [Enter] Save and continue" }),
|
|
26196
|
+
/* @__PURE__ */ jsx51(Text47, { children: " [Esc] Discard changes and continue" }),
|
|
26197
|
+
/* @__PURE__ */ jsx51(Text47, { children: " [Tab] Stay in the panel" })
|
|
25868
26198
|
] }),
|
|
25869
|
-
/* @__PURE__ */
|
|
25870
|
-
removedComponents.length > 0 && !dialogOpen && /* @__PURE__ */
|
|
25871
|
-
/* @__PURE__ */
|
|
25872
|
-
!removedBannerCollapsed && /* @__PURE__ */
|
|
25873
|
-
/* @__PURE__ */
|
|
25874
|
-
removedComponents.map((rc) => /* @__PURE__ */
|
|
26199
|
+
/* @__PURE__ */ jsx51(ReviewReloadDialog, { open: showReloadDialog && !dialogOpen }),
|
|
26200
|
+
removedComponents.length > 0 && !dialogOpen && /* @__PURE__ */ jsxs44(Box42, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.error, paddingX: 1, children: [
|
|
26201
|
+
/* @__PURE__ */ jsx51(Text47, { bold: true, color: PALETTE.error, children: removedComponentsHeader(removedComponents.length, true) }),
|
|
26202
|
+
!removedBannerCollapsed && /* @__PURE__ */ jsxs44(Fragment18, { children: [
|
|
26203
|
+
/* @__PURE__ */ jsx51(Text47, { children: " " }),
|
|
26204
|
+
removedComponents.map((rc) => /* @__PURE__ */ jsx51(Text47, { children: removedComponentLine(rc) }, rc.id))
|
|
25875
26205
|
] })
|
|
25876
26206
|
] }),
|
|
25877
|
-
breakingChanges.length > 0 && !dialogOpen && /* @__PURE__ */
|
|
25878
|
-
|
|
26207
|
+
breakingChanges.length > 0 && !dialogOpen && /* @__PURE__ */ jsx51(Box42, { paddingX: 1, children: /* @__PURE__ */ jsx51(
|
|
26208
|
+
Text47,
|
|
25879
26209
|
{
|
|
25880
26210
|
color: PALETTE.warning,
|
|
25881
26211
|
children: `[b] ${breakingChanges.length} breaking change${breakingChanges.length === 1 ? "" : "s"}`
|
|
@@ -25885,58 +26215,58 @@ function GenerateReviewStepView({
|
|
|
25885
26215
|
const row = breakingRows[breakingCursor];
|
|
25886
26216
|
const comp = row ? breakingChanges.find((b) => b.componentName === row.componentName) : void 0;
|
|
25887
26217
|
if (!comp) return null;
|
|
25888
|
-
return /* @__PURE__ */
|
|
25889
|
-
/* @__PURE__ */
|
|
25890
|
-
comp.impact && /* @__PURE__ */
|
|
25891
|
-
comp.changes.length === 0 ? /* @__PURE__ */
|
|
25892
|
-
/* @__PURE__ */
|
|
26218
|
+
return /* @__PURE__ */ jsxs44(Box42, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
|
|
26219
|
+
/* @__PURE__ */ jsx51(Text47, { bold: true, color: PALETTE.warning, children: `Breaking changes \u2014 ${comp.componentName}` }),
|
|
26220
|
+
comp.impact && /* @__PURE__ */ jsx51(Text47, { dimColor: true, children: ` affects ${comp.impact.affectedExperiences} experience${comp.impact.affectedExperiences === 1 ? "" : "s"}, ${comp.impact.affectedFragments} fragment${comp.impact.affectedFragments === 1 ? "" : "s"}` }),
|
|
26221
|
+
comp.changes.length === 0 ? /* @__PURE__ */ jsx51(Text47, { dimColor: true, children: " (no enumerated changes)" }) : comp.changes.map((change, ci) => /* @__PURE__ */ jsx51(Text47, { children: ` \u2022 ${formatBreakingChange(change, comp.current)}` }, `bd-detail-${ci}`)),
|
|
26222
|
+
/* @__PURE__ */ jsx51(Text47, { dimColor: true, children: "[D/Esc] close detail" })
|
|
25893
26223
|
] });
|
|
25894
26224
|
})(),
|
|
25895
26225
|
cyclePanel.isOpen && !dialogOpen && (() => {
|
|
25896
26226
|
const PANEL_H = 20;
|
|
25897
26227
|
const lines = [];
|
|
25898
26228
|
lines.push(
|
|
25899
|
-
/* @__PURE__ */
|
|
26229
|
+
/* @__PURE__ */ jsx51(Text47, { bold: true, color: PALETTE.warning, children: `SLOT DEPENDENCY CYCLES (${slotCycles.length})` }, "cyc-title")
|
|
25900
26230
|
);
|
|
25901
26231
|
lines.push(
|
|
25902
|
-
/* @__PURE__ */
|
|
26232
|
+
/* @__PURE__ */ jsx51(Text47, { dimColor: true, children: "push will fail until these are resolved" }, "cyc-sub")
|
|
25903
26233
|
);
|
|
25904
26234
|
lines.push(
|
|
25905
|
-
/* @__PURE__ */
|
|
26235
|
+
/* @__PURE__ */ jsx51(Text47, { dimColor: true, children: "To fix: reject a cycle member, or break the cycle by removing a slot edge." }, "cyc-guide")
|
|
25906
26236
|
);
|
|
25907
|
-
lines.push(/* @__PURE__ */
|
|
26237
|
+
lines.push(/* @__PURE__ */ jsx51(Text47, { children: " " }, "cyc-space"));
|
|
25908
26238
|
slotCycles.forEach((cycle, idx) => {
|
|
25909
26239
|
const nodeCount = new Set(cycle.path).size;
|
|
25910
26240
|
const isCursor = idx === cyclesCursor;
|
|
25911
26241
|
lines.push(
|
|
25912
|
-
/* @__PURE__ */
|
|
25913
|
-
|
|
26242
|
+
/* @__PURE__ */ jsx51(
|
|
26243
|
+
Text47,
|
|
25914
26244
|
{
|
|
25915
26245
|
bold: true,
|
|
25916
26246
|
inverse: isCursor,
|
|
25917
|
-
children: `${isCursor ?
|
|
26247
|
+
children: `${isCursor ? figures7.pointer : " "} Cycle ${idx + 1} (${nodeCount} component${nodeCount === 1 ? "" : "s"}):`
|
|
25918
26248
|
},
|
|
25919
26249
|
`cyc-h-${idx}`
|
|
25920
26250
|
)
|
|
25921
26251
|
);
|
|
25922
26252
|
lines.push(
|
|
25923
|
-
/* @__PURE__ */
|
|
26253
|
+
/* @__PURE__ */ jsx51(CyclePathLine, { segments: formatCyclePathSegments(cycle, 16), prefix: " " }, `cyc-p-${idx}`)
|
|
25924
26254
|
);
|
|
25925
26255
|
if (cycle.suggestedBreak) {
|
|
25926
26256
|
const b = cycle.suggestedBreak;
|
|
25927
26257
|
lines.push(
|
|
25928
|
-
/* @__PURE__ */
|
|
26258
|
+
/* @__PURE__ */ jsx51(Text47, { dimColor: true, children: ` Suggested fix: remove '${b.toComponent}' from ${b.fromComponent}.$slots.${b.slotName}.$allowedComponents` }, `cyc-f-${idx}`)
|
|
25929
26259
|
);
|
|
25930
26260
|
}
|
|
25931
|
-
lines.push(/* @__PURE__ */
|
|
26261
|
+
lines.push(/* @__PURE__ */ jsx51(Text47, { children: " " }, `cyc-s-${idx}`));
|
|
25932
26262
|
});
|
|
25933
26263
|
const visible = lines.slice(cyclePanelScroll, cyclePanelScroll + PANEL_H);
|
|
25934
|
-
return /* @__PURE__ */
|
|
26264
|
+
return /* @__PURE__ */ jsxs44(Box42, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
|
|
25935
26265
|
visible,
|
|
25936
|
-
/* @__PURE__ */
|
|
26266
|
+
/* @__PURE__ */ jsx51(Text47, { dimColor: true, children: "[\u2191\u2193/j/k] move [Enter] jump [x] break cycle [c/q/Esc] close" })
|
|
25937
26267
|
] });
|
|
25938
26268
|
})(),
|
|
25939
|
-
!dialogOpen && /* @__PURE__ */
|
|
26269
|
+
!dialogOpen && /* @__PURE__ */ jsx51(
|
|
25940
26270
|
LivePreviewSummary,
|
|
25941
26271
|
{
|
|
25942
26272
|
enabled: livePreview,
|
|
@@ -25955,17 +26285,17 @@ function GenerateReviewStepView({
|
|
|
25955
26285
|
const participantSet = cycleView.structural;
|
|
25956
26286
|
const members = stillRejected.filter((n) => participantSet.has(n)).sort();
|
|
25957
26287
|
const ancestors = stillRejected.filter((n) => !participantSet.has(n)).sort();
|
|
25958
|
-
return /* @__PURE__ */
|
|
25959
|
-
/* @__PURE__ */
|
|
25960
|
-
members.length > 0 && /* @__PURE__ */
|
|
25961
|
-
ancestors.length > 0 && /* @__PURE__ */
|
|
25962
|
-
/* @__PURE__ */
|
|
26288
|
+
return /* @__PURE__ */ jsxs44(Box42, { flexDirection: "column", borderStyle: "single", borderColor: PALETTE.error, paddingX: 1, children: [
|
|
26289
|
+
/* @__PURE__ */ jsx51(Text47, { color: PALETTE.error, bold: true, children: `Cyclic component graph \u2014 auto-rejected ${stillRejected.length} component${stillRejected.length === 1 ? "" : "s"}:` }),
|
|
26290
|
+
members.length > 0 && /* @__PURE__ */ jsx51(Text47, { color: PALETTE.error, children: ` Cycle members: ${members.join(", ")}` }),
|
|
26291
|
+
ancestors.length > 0 && /* @__PURE__ */ jsx51(Text47, { color: PALETTE.error, children: ` Ancestors: ${ancestors.join(", ")}` }),
|
|
26292
|
+
/* @__PURE__ */ jsx51(Text47, { dimColor: true, children: undoSnapshot ? " [Ctrl+Z] undo \xB7 [r]/[a] manually toggle \xB7 [F] continue" : " [r]/[a] manually toggle \xB7 [F] continue" })
|
|
25963
26293
|
] });
|
|
25964
26294
|
})(),
|
|
25965
|
-
/* @__PURE__ */
|
|
25966
|
-
/* @__PURE__ */
|
|
25967
|
-
!dialogOpen && /* @__PURE__ */
|
|
25968
|
-
breakingPanel.isOpen ? /* @__PURE__ */
|
|
26295
|
+
/* @__PURE__ */ jsx51(ReviewEmptyComponentsWarning, { count: emptyCount, hidden: dialogOpen }),
|
|
26296
|
+
/* @__PURE__ */ jsx51(ReviewFinalizeError, { message: finalizeError, hidden: dialogOpen }),
|
|
26297
|
+
!dialogOpen && /* @__PURE__ */ jsxs44(Box42, { children: [
|
|
26298
|
+
breakingPanel.isOpen ? /* @__PURE__ */ jsx51(
|
|
25969
26299
|
GotoBanner,
|
|
25970
26300
|
{
|
|
25971
26301
|
title: "Breaking changes",
|
|
@@ -25978,7 +26308,17 @@ function GenerateReviewStepView({
|
|
|
25978
26308
|
width: sidebarWidth,
|
|
25979
26309
|
footerHint: "[\u2191/\u2193] move \xB7 [Enter] jump \xB7 [D] detail \xB7 [Esc] close"
|
|
25980
26310
|
}
|
|
25981
|
-
) : /* @__PURE__ */
|
|
26311
|
+
) : lineagePanel.isOpen && focusedComponentKey ? /* @__PURE__ */ jsx51(
|
|
26312
|
+
LineagePanel,
|
|
26313
|
+
{
|
|
26314
|
+
focusedComponentKey,
|
|
26315
|
+
entries: lineageEntries,
|
|
26316
|
+
cursor: lineageCursor,
|
|
26317
|
+
jumpables: lineageJumpables,
|
|
26318
|
+
maxRows: panelMaxRows,
|
|
26319
|
+
width: sidebarWidth
|
|
26320
|
+
}
|
|
26321
|
+
) : /* @__PURE__ */ jsx51(
|
|
25982
26322
|
GroupedSidebar,
|
|
25983
26323
|
{
|
|
25984
26324
|
items: groupedItems,
|
|
@@ -26016,7 +26356,7 @@ function GenerateReviewStepView({
|
|
|
26016
26356
|
graph: sidebarGraph
|
|
26017
26357
|
}
|
|
26018
26358
|
),
|
|
26019
|
-
selected ? /* @__PURE__ */
|
|
26359
|
+
selected ? /* @__PURE__ */ jsx51(
|
|
26020
26360
|
ReviewComponentPanel,
|
|
26021
26361
|
{
|
|
26022
26362
|
selectedKey: selected.key,
|
|
@@ -26043,13 +26383,13 @@ function GenerateReviewStepView({
|
|
|
26043
26383
|
livePreview: livePreviewHook,
|
|
26044
26384
|
livePreviewSpinner
|
|
26045
26385
|
}
|
|
26046
|
-
) : /* @__PURE__ */
|
|
26386
|
+
) : /* @__PURE__ */ jsx51(ReviewNoSelection, {})
|
|
26047
26387
|
] }),
|
|
26048
26388
|
breakPanel.isOpen && !breakOverlayFullScreen && !dialogOpen && renderBreakOverlay(),
|
|
26049
|
-
!dialogOpen && slotCycles.length > 0 && !cyclePanel.isOpen && !breakPanel.isOpen && /* @__PURE__ */
|
|
26050
|
-
/* @__PURE__ */
|
|
26389
|
+
!dialogOpen && slotCycles.length > 0 && !cyclePanel.isOpen && !breakPanel.isOpen && /* @__PURE__ */ jsxs44(Box42, { flexDirection: "column", children: [
|
|
26390
|
+
/* @__PURE__ */ jsx51(Text47, { color: PALETTE.warning, children: `\u26A0 ${slotCycles.length} slot dependency cycle${slotCycles.length === 1 ? "" : "s"} detected \u2014 push will fail` }),
|
|
26051
26391
|
slotCycles.slice(0, 3).map((cycle, idx) => {
|
|
26052
|
-
return /* @__PURE__ */
|
|
26392
|
+
return /* @__PURE__ */ jsx51(
|
|
26053
26393
|
CyclePathLine,
|
|
26054
26394
|
{
|
|
26055
26395
|
segments: formatCyclePathSegments(cycle),
|
|
@@ -26060,10 +26400,10 @@ function GenerateReviewStepView({
|
|
|
26060
26400
|
`cyc-banner-${idx}`
|
|
26061
26401
|
);
|
|
26062
26402
|
}),
|
|
26063
|
-
slotCycles.length > 3 && /* @__PURE__ */
|
|
26064
|
-
/* @__PURE__ */
|
|
26403
|
+
slotCycles.length > 3 && /* @__PURE__ */ jsx51(Text47, { color: PALETTE.warning, children: ` \u2026${slotCycles.length - 3} more` }),
|
|
26404
|
+
/* @__PURE__ */ jsx51(Text47, { dimColor: true, children: " press [c] for detail" })
|
|
26065
26405
|
] }),
|
|
26066
|
-
/* @__PURE__ */
|
|
26406
|
+
/* @__PURE__ */ jsx51(
|
|
26067
26407
|
SearchMatchSummary,
|
|
26068
26408
|
{
|
|
26069
26409
|
open: searchOpen,
|
|
@@ -26074,17 +26414,18 @@ function GenerateReviewStepView({
|
|
|
26074
26414
|
hidden: dialogOpen
|
|
26075
26415
|
}
|
|
26076
26416
|
),
|
|
26077
|
-
!dialogOpen && sidebarFocused && /* @__PURE__ */
|
|
26417
|
+
!dialogOpen && sidebarFocused && /* @__PURE__ */ jsx51(Box42, { columnGap: 2, flexWrap: "wrap", children: reviewEditor.panelOpen === "token-review" ? /* @__PURE__ */ jsxs44(Fragment18, { children: [
|
|
26078
26418
|
legendEntry("[\u2191/\u2193]", "move"),
|
|
26079
26419
|
legendEntry("[Enter]", "edit allowed"),
|
|
26080
26420
|
legendEntry("[Esc]", "close")
|
|
26081
|
-
] }) : /* @__PURE__ */
|
|
26421
|
+
] }) : /* @__PURE__ */ jsxs44(Fragment18, { children: [
|
|
26082
26422
|
legendEntry("[j/k]", "move"),
|
|
26083
26423
|
legendEntry("[a]", "accept"),
|
|
26084
26424
|
legendEntry("[r]", "reject"),
|
|
26085
26425
|
legendEntry("[A]", "accept all"),
|
|
26086
26426
|
legendEntry("[F]", "finalize"),
|
|
26087
26427
|
legendEntry("[L]", "flat", columnOneView === "flat"),
|
|
26428
|
+
legendEntry("[l]", "lineage", lineagePanel.isOpen),
|
|
26088
26429
|
legendEntry("[i]", "focus lineage", jumpFilterTarget !== null),
|
|
26089
26430
|
legendEntry("[w]", "only breaking", activeFilters.has("broken")),
|
|
26090
26431
|
slotCycles.length > 0 && legendEntry("[o]", "only cycles", activeFilters.has("cycles")),
|
|
@@ -26108,7 +26449,17 @@ function GenerateReviewStepView({
|
|
|
26108
26449
|
legendEntry("[Ctrl+R]", "reload"),
|
|
26109
26450
|
legendEntry("[?]", "help"),
|
|
26110
26451
|
legendEntry("[q]", "quit")
|
|
26111
|
-
] }) })
|
|
26452
|
+
] }) }),
|
|
26453
|
+
!dialogOpen && /* @__PURE__ */ jsx51(
|
|
26454
|
+
ReviewStatusBar,
|
|
26455
|
+
{
|
|
26456
|
+
entries: components,
|
|
26457
|
+
onApproveAll: () => {
|
|
26458
|
+
setComponents((prev) => prev.map((c2) => c2.status === "needs-review" ? { ...c2, status: "accepted" } : c2));
|
|
26459
|
+
},
|
|
26460
|
+
onFinalize: () => setShowFinalize(true)
|
|
26461
|
+
}
|
|
26462
|
+
)
|
|
26112
26463
|
] });
|
|
26113
26464
|
}
|
|
26114
26465
|
var PANEL_HEIGHT, HELP_SECTIONS2;
|
|
@@ -26131,8 +26482,10 @@ var init_GenerateReviewStep = __esm({
|
|
|
26131
26482
|
init_search_neighborhood();
|
|
26132
26483
|
init_sidebar_width();
|
|
26133
26484
|
init_selection_cascade();
|
|
26485
|
+
init_useLineage();
|
|
26134
26486
|
init_cycle_auto_reject();
|
|
26135
26487
|
init_useOverlayPanel();
|
|
26488
|
+
init_LineagePanel();
|
|
26136
26489
|
init_GotoBanner();
|
|
26137
26490
|
init_lineage_layout();
|
|
26138
26491
|
init_HelpOverlay();
|
|
@@ -26145,6 +26498,7 @@ var init_GenerateReviewStep = __esm({
|
|
|
26145
26498
|
init_sidebar_help();
|
|
26146
26499
|
init_sidebar_input();
|
|
26147
26500
|
init_sidebar_navigation();
|
|
26501
|
+
init_lineage_input();
|
|
26148
26502
|
init_sidebar_search_state();
|
|
26149
26503
|
init_SearchMatchSummary();
|
|
26150
26504
|
init_ReviewComponentPanel();
|
|
@@ -26473,7 +26827,7 @@ __export(WizardApp_exports, {
|
|
|
26473
26827
|
shouldRunMapTokens: () => shouldRunMapTokens
|
|
26474
26828
|
});
|
|
26475
26829
|
import { useEffect as useEffect14, useRef as useRef10, useState as useState23 } from "react";
|
|
26476
|
-
import { Box as
|
|
26830
|
+
import { Box as Box43, Text as Text48 } from "ink";
|
|
26477
26831
|
import { join as join20, resolve as resolve17 } from "node:path";
|
|
26478
26832
|
import { appendFileSync as appendFileSync2, writeFileSync } from "node:fs";
|
|
26479
26833
|
import { access as access7, stat as stat5, writeFile as writeFile6 } from "node:fs/promises";
|
|
@@ -26481,7 +26835,7 @@ import { tmpdir } from "node:os";
|
|
|
26481
26835
|
import { execFile as execFile2, spawn as spawn3 } from "node:child_process";
|
|
26482
26836
|
import { mkdir as mkdir5 } from "node:fs/promises";
|
|
26483
26837
|
import { buildCDF as buildCDF3, validateCDF as validateCDF3, validateSlotReferences as validateSlotReferences2 } from "@contentful/experience-design-system-types";
|
|
26484
|
-
import { jsx as
|
|
26838
|
+
import { jsx as jsx52, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
26485
26839
|
function buildGenerateComponentsArgs(opts) {
|
|
26486
26840
|
const args = ["__generate", "components", "--agent", opts.agent, "--session", opts.sessionId];
|
|
26487
26841
|
if (opts.tokensPath) args.push("--tokens", opts.tokensPath);
|
|
@@ -27887,7 +28241,7 @@ If using a custom host configuration, make sure the space exists on that host.`
|
|
|
27887
28241
|
const stepContent = (() => {
|
|
27888
28242
|
switch (state.step) {
|
|
27889
28243
|
case "welcome":
|
|
27890
|
-
return /* @__PURE__ */
|
|
28244
|
+
return /* @__PURE__ */ jsx52(
|
|
27891
28245
|
WelcomeStep,
|
|
27892
28246
|
{
|
|
27893
28247
|
onContinue: (path) => {
|
|
@@ -27899,7 +28253,7 @@ If using a custom host configuration, make sure the space exists on that host.`
|
|
|
27899
28253
|
}
|
|
27900
28254
|
);
|
|
27901
28255
|
case "token-input":
|
|
27902
|
-
return /* @__PURE__ */
|
|
28256
|
+
return /* @__PURE__ */ jsx52(
|
|
27903
28257
|
TokenInputStep,
|
|
27904
28258
|
{
|
|
27905
28259
|
onConfirm: (rawTokensPath) => {
|
|
@@ -27910,7 +28264,7 @@ If using a custom host configuration, make sure the space exists on that host.`
|
|
|
27910
28264
|
}
|
|
27911
28265
|
);
|
|
27912
28266
|
case "token-reuse-gate":
|
|
27913
|
-
return /* @__PURE__ */
|
|
28267
|
+
return /* @__PURE__ */ jsx52(
|
|
27914
28268
|
GateStep,
|
|
27915
28269
|
{
|
|
27916
28270
|
successMessage: "Existing tokens.json found",
|
|
@@ -27938,7 +28292,7 @@ If using a custom host configuration, make sure the space exists on that host.`
|
|
|
27938
28292
|
}
|
|
27939
28293
|
);
|
|
27940
28294
|
case "checking-claude-auth":
|
|
27941
|
-
return /* @__PURE__ */
|
|
28295
|
+
return /* @__PURE__ */ jsx52(
|
|
27942
28296
|
RunningStep,
|
|
27943
28297
|
{
|
|
27944
28298
|
stepNumber: state.authCheckStepNumber,
|
|
@@ -27948,7 +28302,7 @@ If using a custom host configuration, make sure the space exists on that host.`
|
|
|
27948
28302
|
}
|
|
27949
28303
|
);
|
|
27950
28304
|
case "path-validation":
|
|
27951
|
-
return /* @__PURE__ */
|
|
28305
|
+
return /* @__PURE__ */ jsx52(
|
|
27952
28306
|
PathValidationStep,
|
|
27953
28307
|
{
|
|
27954
28308
|
projectPath: state.projectPath,
|
|
@@ -27981,7 +28335,7 @@ If using a custom host configuration, make sure the space exists on that host.`
|
|
|
27981
28335
|
}
|
|
27982
28336
|
const selectionDetail = state.selectionAgentStatus === "complete" ? "Selection agent complete" : `Filtering component selection via ${state.agent}...`;
|
|
27983
28337
|
const compositionDetail = state.compositionPhase === "cache-hit" ? "Composition mapping (cached)" : compositionComplete ? "Composition mapping complete" : state.compositionPhase?.startsWith("agent:") ? `Mapping composition via ${state.compositionPhase.slice("agent:".length)}...` : `Mapping composition via ${state.agent}...`;
|
|
27984
|
-
return /* @__PURE__ */
|
|
28338
|
+
return /* @__PURE__ */ jsx52(
|
|
27985
28339
|
RunningStep,
|
|
27986
28340
|
{
|
|
27987
28341
|
stepNumber: hasTokenStage ? 2 : 1,
|
|
@@ -28003,7 +28357,7 @@ If using a custom host configuration, make sure the space exists on that host.`
|
|
|
28003
28357
|
}
|
|
28004
28358
|
case "scope-gate": {
|
|
28005
28359
|
if (!state.extractSessionId) {
|
|
28006
|
-
return /* @__PURE__ */
|
|
28360
|
+
return /* @__PURE__ */ jsx52(Box43, { paddingX: 2, paddingY: 1, children: /* @__PURE__ */ jsx52(Text48, { color: PALETTE.error, children: "Error: extract session ID missing \u2014 please re-run." }) });
|
|
28007
28361
|
}
|
|
28008
28362
|
const sessionId2 = state.extractSessionId;
|
|
28009
28363
|
const db = openPipelineDb();
|
|
@@ -28013,7 +28367,7 @@ If using a custom host configuration, make sure the space exists on that host.`
|
|
|
28013
28367
|
} finally {
|
|
28014
28368
|
db.close();
|
|
28015
28369
|
}
|
|
28016
|
-
return /* @__PURE__ */
|
|
28370
|
+
return /* @__PURE__ */ jsx52(
|
|
28017
28371
|
ScopeGateStep,
|
|
28018
28372
|
{
|
|
28019
28373
|
components,
|
|
@@ -28054,7 +28408,7 @@ If using a custom host configuration, make sure the space exists on that host.`
|
|
|
28054
28408
|
const displayAgent = state.agent.charAt(0).toUpperCase() + state.agent.slice(1);
|
|
28055
28409
|
const progressDetail = p ? `[${p.done}/${p.total}] ${p.current}` : `Starting up ${displayAgent}...`;
|
|
28056
28410
|
const mapTokensDetail = state.mapTokensStatus === "running" ? skipMapTokens ? "Resolving token defaults..." : `Mapping token restrictions via ${displayAgent}...` : state.mapTokensStatus === "complete" ? skipMapTokens ? "Token defaults ready" : "Token restrictions ready" : void 0;
|
|
28057
|
-
return /* @__PURE__ */
|
|
28411
|
+
return /* @__PURE__ */ jsx52(
|
|
28058
28412
|
RunningStep,
|
|
28059
28413
|
{
|
|
28060
28414
|
stepNumber: stepNum,
|
|
@@ -28069,7 +28423,7 @@ If using a custom host configuration, make sure the space exists on that host.`
|
|
|
28069
28423
|
}
|
|
28070
28424
|
case "mapping-tokens": {
|
|
28071
28425
|
const stepNum = hasTokenStage ? 5 : 4;
|
|
28072
|
-
return /* @__PURE__ */
|
|
28426
|
+
return /* @__PURE__ */ jsx52(
|
|
28073
28427
|
RunningStep,
|
|
28074
28428
|
{
|
|
28075
28429
|
stepNumber: stepNum,
|
|
@@ -28081,7 +28435,7 @@ If using a custom host configuration, make sure the space exists on that host.`
|
|
|
28081
28435
|
);
|
|
28082
28436
|
}
|
|
28083
28437
|
case "final-review": {
|
|
28084
|
-
return /* @__PURE__ */
|
|
28438
|
+
return /* @__PURE__ */ jsx52(
|
|
28085
28439
|
GenerateReviewStep,
|
|
28086
28440
|
{
|
|
28087
28441
|
extractSessionId: state.extractSessionId,
|
|
@@ -28137,7 +28491,7 @@ If using a custom host configuration, make sure the space exists on that host.`
|
|
|
28137
28491
|
);
|
|
28138
28492
|
}
|
|
28139
28493
|
case "credentials":
|
|
28140
|
-
return /* @__PURE__ */
|
|
28494
|
+
return /* @__PURE__ */ jsx52(
|
|
28141
28495
|
CredentialsStep,
|
|
28142
28496
|
{
|
|
28143
28497
|
initialSpaceId: state.spaceId,
|
|
@@ -28172,7 +28526,7 @@ If using a custom host configuration, make sure the space exists on that host.`
|
|
|
28172
28526
|
}
|
|
28173
28527
|
);
|
|
28174
28528
|
case "previewing":
|
|
28175
|
-
return /* @__PURE__ */
|
|
28529
|
+
return /* @__PURE__ */ jsx52(
|
|
28176
28530
|
RunningStep,
|
|
28177
28531
|
{
|
|
28178
28532
|
stepNumber: totalSteps,
|
|
@@ -28183,7 +28537,7 @@ If using a custom host configuration, make sure the space exists on that host.`
|
|
|
28183
28537
|
);
|
|
28184
28538
|
case "preview-gate": {
|
|
28185
28539
|
const editableComponentCount = extractComponents(state.cdf).length;
|
|
28186
|
-
return /* @__PURE__ */
|
|
28540
|
+
return /* @__PURE__ */ jsx52(
|
|
28187
28541
|
WizardPreviewStep,
|
|
28188
28542
|
{
|
|
28189
28543
|
preview: state.serverPreview,
|
|
@@ -28208,9 +28562,9 @@ If using a custom host configuration, make sure the space exists on that host.`
|
|
|
28208
28562
|
);
|
|
28209
28563
|
}
|
|
28210
28564
|
case "pushing":
|
|
28211
|
-
return /* @__PURE__ */
|
|
28565
|
+
return /* @__PURE__ */ jsx52(PushingStep, { stepNumber: totalSteps, totalSteps, progress: state.pushProgress });
|
|
28212
28566
|
case "path-prompt":
|
|
28213
|
-
return /* @__PURE__ */
|
|
28567
|
+
return /* @__PURE__ */ jsx52(
|
|
28214
28568
|
PathPrompt,
|
|
28215
28569
|
{
|
|
28216
28570
|
defaultPath: state.outDir,
|
|
@@ -28231,7 +28585,7 @@ If using a custom host configuration, make sure the space exists on that host.`
|
|
|
28231
28585
|
}
|
|
28232
28586
|
);
|
|
28233
28587
|
case "printing":
|
|
28234
|
-
return /* @__PURE__ */
|
|
28588
|
+
return /* @__PURE__ */ jsx52(
|
|
28235
28589
|
RunningStep,
|
|
28236
28590
|
{
|
|
28237
28591
|
stepNumber: totalSteps,
|
|
@@ -28242,7 +28596,7 @@ If using a custom host configuration, make sure the space exists on that host.`
|
|
|
28242
28596
|
);
|
|
28243
28597
|
case "print-gate": {
|
|
28244
28598
|
const teaser = buildRunTeaserLine(state.lastRunId);
|
|
28245
|
-
return /* @__PURE__ */
|
|
28599
|
+
return /* @__PURE__ */ jsx52(
|
|
28246
28600
|
GateStep,
|
|
28247
28601
|
{
|
|
28248
28602
|
successMessage: "Files saved",
|
|
@@ -28260,7 +28614,7 @@ If using a custom host configuration, make sure the space exists on that host.`
|
|
|
28260
28614
|
case "done": {
|
|
28261
28615
|
const totalFailed = state.pushResult.componentTypes.failed + state.pushResult.designTokens.failed;
|
|
28262
28616
|
const teaser = buildRunTeaserLine(state.lastRunId);
|
|
28263
|
-
return /* @__PURE__ */
|
|
28617
|
+
return /* @__PURE__ */ jsx52(
|
|
28264
28618
|
DoneStep,
|
|
28265
28619
|
{
|
|
28266
28620
|
componentTypes: state.pushResult.componentTypes,
|
|
@@ -28276,7 +28630,7 @@ If using a custom host configuration, make sure the space exists on that host.`
|
|
|
28276
28630
|
);
|
|
28277
28631
|
}
|
|
28278
28632
|
case "preview-validation-error": {
|
|
28279
|
-
return /* @__PURE__ */
|
|
28633
|
+
return /* @__PURE__ */ jsx52(
|
|
28280
28634
|
PreviewValidationErrorStep,
|
|
28281
28635
|
{
|
|
28282
28636
|
errors: state.previewValidationErrors,
|
|
@@ -28292,7 +28646,7 @@ If using a custom host configuration, make sure the space exists on that host.`
|
|
|
28292
28646
|
);
|
|
28293
28647
|
}
|
|
28294
28648
|
case "error":
|
|
28295
|
-
return /* @__PURE__ */
|
|
28649
|
+
return /* @__PURE__ */ jsx52(
|
|
28296
28650
|
ErrorStep,
|
|
28297
28651
|
{
|
|
28298
28652
|
stepName: state.errorStep,
|
|
@@ -28314,9 +28668,9 @@ If using a custom host configuration, make sure the space exists on that host.`
|
|
|
28314
28668
|
return null;
|
|
28315
28669
|
}
|
|
28316
28670
|
})();
|
|
28317
|
-
return /* @__PURE__ */
|
|
28318
|
-
/* @__PURE__ */
|
|
28319
|
-
/* @__PURE__ */
|
|
28671
|
+
return /* @__PURE__ */ jsxs45(Box43, { flexDirection: "column", width: terminalWidth, children: [
|
|
28672
|
+
/* @__PURE__ */ jsx52(TopBar, { subcommand: "import", hints }),
|
|
28673
|
+
/* @__PURE__ */ jsx52(CustomPromptBanner, { generatePromptPath }),
|
|
28320
28674
|
stepContent
|
|
28321
28675
|
] });
|
|
28322
28676
|
}
|
|
@@ -28830,8 +29184,8 @@ var init_command7 = __esm({
|
|
|
28830
29184
|
|
|
28831
29185
|
// packages/experience-design-system-cli/src/setup/SetupStepper.tsx
|
|
28832
29186
|
import React17 from "react";
|
|
28833
|
-
import { Box as
|
|
28834
|
-
import { jsx as
|
|
29187
|
+
import { Box as Box44, Text as Text49 } from "ink";
|
|
29188
|
+
import { jsx as jsx53, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
28835
29189
|
function stepLabel(step, title, state, wide) {
|
|
28836
29190
|
if (state === "complete") return wide ? `\u2713 ${title}` : "\u2713";
|
|
28837
29191
|
if (state === "active") return wide ? `[${step} ${title}]` : `[${step}]`;
|
|
@@ -28844,12 +29198,12 @@ function stepColor(state) {
|
|
|
28844
29198
|
}
|
|
28845
29199
|
function SetupStepper({ activeStep, columns }) {
|
|
28846
29200
|
const wide = columns !== void 0 && columns >= WIDE_MIN_COLUMNS;
|
|
28847
|
-
return /* @__PURE__ */
|
|
29201
|
+
return /* @__PURE__ */ jsx53(Box44, { columnGap: wide ? 0 : COMPACT_GAP, children: SETUP_SCREENS.map((title, index) => {
|
|
28848
29202
|
const step = index + 1;
|
|
28849
29203
|
const state = step < activeStep ? "complete" : step === activeStep ? "active" : "pending";
|
|
28850
|
-
return /* @__PURE__ */
|
|
28851
|
-
wide && index > 0 && /* @__PURE__ */
|
|
28852
|
-
/* @__PURE__ */
|
|
29204
|
+
return /* @__PURE__ */ jsxs46(React17.Fragment, { children: [
|
|
29205
|
+
wide && index > 0 && /* @__PURE__ */ jsx53(Text49, { dimColor: true, children: WIDE_SEPARATOR }),
|
|
29206
|
+
/* @__PURE__ */ jsx53(Text49, { bold: state === "active", dimColor: state === "pending", color: stepColor(state), children: stepLabel(step, title, state, wide) })
|
|
28853
29207
|
] }, step);
|
|
28854
29208
|
}) });
|
|
28855
29209
|
}
|
|
@@ -28868,33 +29222,33 @@ var init_SetupStepper = __esm({
|
|
|
28868
29222
|
});
|
|
28869
29223
|
|
|
28870
29224
|
// packages/experience-design-system-cli/src/setup/steps/StepLayout.tsx
|
|
28871
|
-
import { Box as
|
|
28872
|
-
import { jsx as
|
|
29225
|
+
import { Box as Box45, Text as Text50 } from "ink";
|
|
29226
|
+
import { jsx as jsx54, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
28873
29227
|
function StepLayout({ helpText, children, prompt }) {
|
|
28874
|
-
return /* @__PURE__ */
|
|
29228
|
+
return /* @__PURE__ */ jsxs47(Box45, { flexDirection: "column", children: [
|
|
28875
29229
|
children,
|
|
28876
|
-
prompt && /* @__PURE__ */
|
|
28877
|
-
helpText && /* @__PURE__ */
|
|
29230
|
+
prompt && /* @__PURE__ */ jsx54(Box45, { marginTop: 1, children: prompt }),
|
|
29231
|
+
helpText && /* @__PURE__ */ jsx54(Box45, { marginTop: 1, children: /* @__PURE__ */ jsx54(Text50, { dimColor: true, children: helpText }) })
|
|
28878
29232
|
] });
|
|
28879
29233
|
}
|
|
28880
29234
|
function StepSuccess({ children }) {
|
|
28881
|
-
return /* @__PURE__ */
|
|
29235
|
+
return /* @__PURE__ */ jsxs47(Text50, { color: PALETTE.success, children: [
|
|
28882
29236
|
"\u2713 ",
|
|
28883
29237
|
children
|
|
28884
29238
|
] });
|
|
28885
29239
|
}
|
|
28886
29240
|
function StepWarning({ children }) {
|
|
28887
|
-
return /* @__PURE__ */
|
|
29241
|
+
return /* @__PURE__ */ jsxs47(Text50, { color: PALETTE.warning, children: [
|
|
28888
29242
|
"\u26A0 ",
|
|
28889
29243
|
children
|
|
28890
29244
|
] });
|
|
28891
29245
|
}
|
|
28892
29246
|
function StepValue({ label, value }) {
|
|
28893
29247
|
const color = value ? void 0 : PALETTE.warning;
|
|
28894
|
-
return /* @__PURE__ */
|
|
28895
|
-
/* @__PURE__ */
|
|
28896
|
-
/* @__PURE__ */
|
|
28897
|
-
/* @__PURE__ */
|
|
29248
|
+
return /* @__PURE__ */ jsxs47(Box45, { children: [
|
|
29249
|
+
/* @__PURE__ */ jsx54(Box45, { width: 2, children: /* @__PURE__ */ jsx54(Text50, { color, children: value ? "" : "\u26A0" }) }),
|
|
29250
|
+
/* @__PURE__ */ jsx54(Box45, { width: 20, flexShrink: 0, children: /* @__PURE__ */ jsx54(Text50, { color, children: label }) }),
|
|
29251
|
+
/* @__PURE__ */ jsx54(Text50, { color, children: value || "(not set)" })
|
|
28898
29252
|
] });
|
|
28899
29253
|
}
|
|
28900
29254
|
var init_StepLayout = __esm({
|
|
@@ -28906,9 +29260,9 @@ var init_StepLayout = __esm({
|
|
|
28906
29260
|
|
|
28907
29261
|
// packages/experience-design-system-cli/src/setup/steps/CodingAgentScreen.tsx
|
|
28908
29262
|
import { useEffect as useEffect15, useRef as useRef11, useState as useState24 } from "react";
|
|
28909
|
-
import { Box as
|
|
29263
|
+
import { Box as Box46, Text as Text51 } from "ink";
|
|
28910
29264
|
import { Select, TextInput } from "@inkjs/ui";
|
|
28911
|
-
import { jsx as
|
|
29265
|
+
import { jsx as jsx55, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
28912
29266
|
async function detectAgents(exists = binaryExists) {
|
|
28913
29267
|
const found = await Promise.all(AGENT_DEFS.map(async (agent) => await exists(agent.binary) ? agent : void 0));
|
|
28914
29268
|
return found.filter((agent) => agent !== void 0);
|
|
@@ -28941,7 +29295,7 @@ function CodingAgentScreen({ onDone, deps }) {
|
|
|
28941
29295
|
const found = await detectAgents(exists);
|
|
28942
29296
|
if (found.length === 1) {
|
|
28943
29297
|
const only = found[0];
|
|
28944
|
-
setNotes([/* @__PURE__ */
|
|
29298
|
+
setNotes([/* @__PURE__ */ jsx55(StepSuccess, { children: `${only.name} (${only.binary}) found` }, "found")]);
|
|
28945
29299
|
afterSelection(only);
|
|
28946
29300
|
return;
|
|
28947
29301
|
}
|
|
@@ -28949,7 +29303,7 @@ function CodingAgentScreen({ onDone, deps }) {
|
|
|
28949
29303
|
setPhase({ kind: "choose", found });
|
|
28950
29304
|
return;
|
|
28951
29305
|
}
|
|
28952
|
-
setNotes([/* @__PURE__ */
|
|
29306
|
+
setNotes([/* @__PURE__ */ jsx55(StepWarning, { children: "No coding agent found on PATH" }, "none")]);
|
|
28953
29307
|
setPhase({ kind: "install-choice" });
|
|
28954
29308
|
})();
|
|
28955
29309
|
}, []);
|
|
@@ -28961,12 +29315,12 @@ function CodingAgentScreen({ onDone, deps }) {
|
|
|
28961
29315
|
onDone("failed");
|
|
28962
29316
|
return;
|
|
28963
29317
|
}
|
|
28964
|
-
setNotes((current) => [...current, /* @__PURE__ */
|
|
29318
|
+
setNotes((current) => [...current, /* @__PURE__ */ jsx55(StepSuccess, { children: `${agent.name} installed` }, "installed")]);
|
|
28965
29319
|
afterSelection(agent);
|
|
28966
29320
|
};
|
|
28967
|
-
const chooser = (question, options, describe, onPick) => /* @__PURE__ */
|
|
28968
|
-
/* @__PURE__ */
|
|
28969
|
-
/* @__PURE__ */
|
|
29321
|
+
const chooser = (question, options, describe, onPick) => /* @__PURE__ */ jsxs48(Box46, { flexDirection: "column", children: [
|
|
29322
|
+
/* @__PURE__ */ jsx55(Text51, { children: question }),
|
|
29323
|
+
/* @__PURE__ */ jsx55(Box46, { marginTop: 1, children: /* @__PURE__ */ jsx55(
|
|
28970
29324
|
Select,
|
|
28971
29325
|
{
|
|
28972
29326
|
options: [
|
|
@@ -28978,7 +29332,7 @@ function CodingAgentScreen({ onDone, deps }) {
|
|
|
28978
29332
|
) })
|
|
28979
29333
|
] });
|
|
28980
29334
|
if (phase.kind === "choose") {
|
|
28981
|
-
return /* @__PURE__ */
|
|
29335
|
+
return /* @__PURE__ */ jsx55(
|
|
28982
29336
|
StepLayout,
|
|
28983
29337
|
{
|
|
28984
29338
|
helpText: AGENT_HELP,
|
|
@@ -28993,7 +29347,7 @@ function CodingAgentScreen({ onDone, deps }) {
|
|
|
28993
29347
|
);
|
|
28994
29348
|
}
|
|
28995
29349
|
if (phase.kind === "install-choice") {
|
|
28996
|
-
return /* @__PURE__ */
|
|
29350
|
+
return /* @__PURE__ */ jsx55(
|
|
28997
29351
|
StepLayout,
|
|
28998
29352
|
{
|
|
28999
29353
|
helpText: AGENT_HELP,
|
|
@@ -29008,13 +29362,13 @@ function CodingAgentScreen({ onDone, deps }) {
|
|
|
29008
29362
|
);
|
|
29009
29363
|
}
|
|
29010
29364
|
if (phase.kind === "model") {
|
|
29011
|
-
return /* @__PURE__ */
|
|
29365
|
+
return /* @__PURE__ */ jsx55(
|
|
29012
29366
|
StepLayout,
|
|
29013
29367
|
{
|
|
29014
29368
|
helpText: AGENT_HELP,
|
|
29015
|
-
prompt: /* @__PURE__ */
|
|
29016
|
-
/* @__PURE__ */
|
|
29017
|
-
/* @__PURE__ */
|
|
29369
|
+
prompt: /* @__PURE__ */ jsxs48(Box46, { children: [
|
|
29370
|
+
/* @__PURE__ */ jsx55(Text51, { children: "Model name (optional - press Enter for Codex default): " }),
|
|
29371
|
+
/* @__PURE__ */ jsx55(
|
|
29018
29372
|
TextInput,
|
|
29019
29373
|
{
|
|
29020
29374
|
onSubmit: (value) => void save(phase.agent.binary, value.trim() || void 0)
|
|
@@ -29024,19 +29378,19 @@ function CodingAgentScreen({ onDone, deps }) {
|
|
|
29024
29378
|
] }),
|
|
29025
29379
|
children: [
|
|
29026
29380
|
...notes,
|
|
29027
|
-
/* @__PURE__ */
|
|
29028
|
-
/* @__PURE__ */
|
|
29381
|
+
/* @__PURE__ */ jsx55(StepWarning, { children: "No OPENAI_API_KEY \u2014 using ChatGPT account authentication." }, "no-key"),
|
|
29382
|
+
/* @__PURE__ */ jsx55(Text51, { dimColor: true, children: "Tip: run codex then type /model to browse all available models." }, "tip")
|
|
29029
29383
|
]
|
|
29030
29384
|
}
|
|
29031
29385
|
);
|
|
29032
29386
|
}
|
|
29033
29387
|
if (phase.kind === "installing") {
|
|
29034
|
-
return /* @__PURE__ */
|
|
29388
|
+
return /* @__PURE__ */ jsx55(StepLayout, { helpText: AGENT_HELP, children: [...notes, /* @__PURE__ */ jsx55(Text51, { children: `Installing ${phase.agent.name}\u2026` }, "installing")] });
|
|
29035
29389
|
}
|
|
29036
29390
|
if (phase.kind === "failed") {
|
|
29037
|
-
return /* @__PURE__ */
|
|
29391
|
+
return /* @__PURE__ */ jsx55(StepLayout, { helpText: AGENT_HELP, children: [...notes, /* @__PURE__ */ jsx55(Text51, { children: `\u2717 ${phase.message}` }, "failed")] });
|
|
29038
29392
|
}
|
|
29039
|
-
return /* @__PURE__ */
|
|
29393
|
+
return /* @__PURE__ */ jsx55(Text51, { dimColor: true, children: "Looking for a coding agent\u2026" });
|
|
29040
29394
|
}
|
|
29041
29395
|
var AGENT_HELP, SKIP_VALUE;
|
|
29042
29396
|
var init_CodingAgentScreen = __esm({
|
|
@@ -29053,9 +29407,9 @@ var init_CodingAgentScreen = __esm({
|
|
|
29053
29407
|
|
|
29054
29408
|
// packages/experience-design-system-cli/src/setup/steps/ContentfulCredentialsScreen.tsx
|
|
29055
29409
|
import { useEffect as useEffect16, useRef as useRef12, useState as useState25 } from "react";
|
|
29056
|
-
import { Box as
|
|
29410
|
+
import { Box as Box47, Text as Text52 } from "ink";
|
|
29057
29411
|
import { PasswordInput, Select as Select2, TextInput as TextInput2 } from "@inkjs/ui";
|
|
29058
|
-
import { Fragment as Fragment19, jsx as
|
|
29412
|
+
import { Fragment as Fragment19, jsx as jsx56, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
29059
29413
|
function envShadowingWarning(env) {
|
|
29060
29414
|
const set = ENV_KEYS.filter((key) => env[key]);
|
|
29061
29415
|
if (set.length === 0) return null;
|
|
@@ -29072,21 +29426,21 @@ function ContentfulCredentialsScreen({ onDone }) {
|
|
|
29072
29426
|
useEffect16(() => {
|
|
29073
29427
|
void readExperiencesCredentials().then(setStored);
|
|
29074
29428
|
}, []);
|
|
29075
|
-
if (!stored) return /* @__PURE__ */
|
|
29429
|
+
if (!stored) return /* @__PURE__ */ jsx56(Text52, { dimColor: true, children: "Reading saved credentials\u2026" });
|
|
29076
29430
|
const currentHost = stored.host ?? DEFAULT_CONFIGURED_HOST;
|
|
29077
29431
|
const hasAny = Boolean(stored.spaceId || stored.environmentId || stored.cmaToken);
|
|
29078
29432
|
const allSet = Boolean(stored.spaceId && stored.environmentId && stored.cmaToken);
|
|
29079
29433
|
const shadowing = envShadowingWarning(process.env);
|
|
29080
|
-
const summary = /* @__PURE__ */
|
|
29081
|
-
shadowing && /* @__PURE__ */
|
|
29082
|
-
hasAny && /* @__PURE__ */
|
|
29083
|
-
/* @__PURE__ */
|
|
29084
|
-
/* @__PURE__ */
|
|
29085
|
-
/* @__PURE__ */
|
|
29086
|
-
/* @__PURE__ */
|
|
29087
|
-
/* @__PURE__ */
|
|
29434
|
+
const summary = /* @__PURE__ */ jsxs49(Fragment19, { children: [
|
|
29435
|
+
shadowing && /* @__PURE__ */ jsx56(StepWarning, { children: shadowing }),
|
|
29436
|
+
hasAny && /* @__PURE__ */ jsxs49(Box47, { flexDirection: "column", marginTop: shadowing ? 1 : 0, children: [
|
|
29437
|
+
/* @__PURE__ */ jsx56(Text52, { children: "Current values:" }),
|
|
29438
|
+
/* @__PURE__ */ jsx56(StepValue, { label: "Space ID", value: stored.spaceId }),
|
|
29439
|
+
/* @__PURE__ */ jsx56(StepValue, { label: "Environment ID", value: stored.environmentId }),
|
|
29440
|
+
/* @__PURE__ */ jsx56(StepValue, { label: "CMA Token", value: stored.cmaToken ? maskToken(stored.cmaToken) : void 0 }),
|
|
29441
|
+
/* @__PURE__ */ jsx56(StepValue, { label: "API Host", value: currentHost })
|
|
29088
29442
|
] }),
|
|
29089
|
-
error && /* @__PURE__ */
|
|
29443
|
+
error && /* @__PURE__ */ jsx56(StepWarning, { children: error })
|
|
29090
29444
|
] });
|
|
29091
29445
|
const helpText = `Saved to ${experiencesCredentialsPath()} \u2014 loaded automatically by experiences import.`;
|
|
29092
29446
|
if (field === "confirm") {
|
|
@@ -29094,13 +29448,13 @@ function ContentfulCredentialsScreen({ onDone }) {
|
|
|
29094
29448
|
{ label: hasAny ? "Update the saved credentials" : "Enter credentials now", value: ENTER },
|
|
29095
29449
|
{ label: allSet ? "Keep them as they are" : "Skip for now", value: KEEP }
|
|
29096
29450
|
];
|
|
29097
|
-
return /* @__PURE__ */
|
|
29451
|
+
return /* @__PURE__ */ jsx56(
|
|
29098
29452
|
StepLayout,
|
|
29099
29453
|
{
|
|
29100
29454
|
helpText,
|
|
29101
|
-
prompt: /* @__PURE__ */
|
|
29102
|
-
/* @__PURE__ */
|
|
29103
|
-
/* @__PURE__ */
|
|
29455
|
+
prompt: /* @__PURE__ */ jsxs49(Box47, { flexDirection: "column", children: [
|
|
29456
|
+
/* @__PURE__ */ jsx56(Text52, { children: "Contentful credentials" }),
|
|
29457
|
+
/* @__PURE__ */ jsx56(Box47, { marginTop: 1, children: /* @__PURE__ */ jsx56(
|
|
29104
29458
|
Select2,
|
|
29105
29459
|
{
|
|
29106
29460
|
options: allSet ? [...options].reverse() : options,
|
|
@@ -29141,24 +29495,24 @@ function ContentfulCredentialsScreen({ onDone }) {
|
|
|
29141
29495
|
onDone("completed");
|
|
29142
29496
|
};
|
|
29143
29497
|
const prompts = {
|
|
29144
|
-
spaceId: /* @__PURE__ */
|
|
29145
|
-
/* @__PURE__ */
|
|
29146
|
-
/* @__PURE__ */
|
|
29498
|
+
spaceId: /* @__PURE__ */ jsxs49(Box47, { children: [
|
|
29499
|
+
/* @__PURE__ */ jsx56(Text52, { children: `Space ID${stored.spaceId ? ` [${stored.spaceId}]` : ""}: ` }),
|
|
29500
|
+
/* @__PURE__ */ jsx56(TextInput2, { onSubmit: (v) => advance("spaceId", v) }, "spaceId")
|
|
29147
29501
|
] }),
|
|
29148
|
-
environmentId: /* @__PURE__ */
|
|
29149
|
-
/* @__PURE__ */
|
|
29150
|
-
/* @__PURE__ */
|
|
29502
|
+
environmentId: /* @__PURE__ */ jsxs49(Box47, { children: [
|
|
29503
|
+
/* @__PURE__ */ jsx56(Text52, { children: `Environment ID [${stored.environmentId || "master"}]: ` }),
|
|
29504
|
+
/* @__PURE__ */ jsx56(TextInput2, { onSubmit: (v) => advance("environmentId", v) }, "environmentId")
|
|
29151
29505
|
] }),
|
|
29152
|
-
cmaToken: /* @__PURE__ */
|
|
29153
|
-
/* @__PURE__ */
|
|
29154
|
-
/* @__PURE__ */
|
|
29506
|
+
cmaToken: /* @__PURE__ */ jsxs49(Box47, { children: [
|
|
29507
|
+
/* @__PURE__ */ jsx56(Text52, { children: `CMA token${stored.cmaToken ? " [press Enter to keep existing]" : " (paste here)"}: ` }),
|
|
29508
|
+
/* @__PURE__ */ jsx56(PasswordInput, { onSubmit: (v) => advance("cmaToken", v) }, "cmaToken")
|
|
29155
29509
|
] }),
|
|
29156
|
-
host: /* @__PURE__ */
|
|
29157
|
-
/* @__PURE__ */
|
|
29158
|
-
/* @__PURE__ */
|
|
29510
|
+
host: /* @__PURE__ */ jsxs49(Box47, { children: [
|
|
29511
|
+
/* @__PURE__ */ jsx56(Text52, { children: `API host [${currentHost}]: ` }),
|
|
29512
|
+
/* @__PURE__ */ jsx56(TextInput2, { onSubmit: (v) => advance("host", v) }, "host")
|
|
29159
29513
|
] })
|
|
29160
29514
|
};
|
|
29161
|
-
return /* @__PURE__ */
|
|
29515
|
+
return /* @__PURE__ */ jsx56(StepLayout, { helpText, prompt: prompts[field], children: summary });
|
|
29162
29516
|
}
|
|
29163
29517
|
var ENV_KEYS, ENTER, KEEP, FIELD_ORDER;
|
|
29164
29518
|
var init_ContentfulCredentialsScreen = __esm({
|
|
@@ -29176,9 +29530,9 @@ var init_ContentfulCredentialsScreen = __esm({
|
|
|
29176
29530
|
|
|
29177
29531
|
// packages/experience-design-system-cli/src/setup/steps/preferences/BooleanInput.tsx
|
|
29178
29532
|
import { useEffect as useEffect17, useState as useState26 } from "react";
|
|
29179
|
-
import { Box as
|
|
29533
|
+
import { Box as Box48, Text as Text53 } from "ink";
|
|
29180
29534
|
import { Select as Select3 } from "@inkjs/ui";
|
|
29181
|
-
import { jsx as
|
|
29535
|
+
import { jsx as jsx57, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
29182
29536
|
function tick(labels, forOn, current) {
|
|
29183
29537
|
const label = forOn ? labels.on : labels.off;
|
|
29184
29538
|
return forOn === current ? `${label} \u2713` : label;
|
|
@@ -29196,7 +29550,7 @@ function BooleanInput({
|
|
|
29196
29550
|
useEffect17(() => {
|
|
29197
29551
|
void readExperiencesCredentials().then(setStored);
|
|
29198
29552
|
}, []);
|
|
29199
|
-
if (!stored) return /* @__PURE__ */
|
|
29553
|
+
if (!stored) return /* @__PURE__ */ jsx57(Text53, { dimColor: true, children: "Reading saved preferences\u2026" });
|
|
29200
29554
|
const current = read(stored) ?? fallback;
|
|
29201
29555
|
const submit = (value) => {
|
|
29202
29556
|
if (value === current) {
|
|
@@ -29205,13 +29559,13 @@ function BooleanInput({
|
|
|
29205
29559
|
}
|
|
29206
29560
|
void writeExperiencesCredentials(write2(stored, value)).then(() => onDone("completed"));
|
|
29207
29561
|
};
|
|
29208
|
-
return /* @__PURE__ */
|
|
29562
|
+
return /* @__PURE__ */ jsx57(
|
|
29209
29563
|
StepLayout,
|
|
29210
29564
|
{
|
|
29211
29565
|
helpText,
|
|
29212
|
-
prompt: /* @__PURE__ */
|
|
29213
|
-
/* @__PURE__ */
|
|
29214
|
-
/* @__PURE__ */
|
|
29566
|
+
prompt: /* @__PURE__ */ jsxs50(Box48, { flexDirection: "column", children: [
|
|
29567
|
+
/* @__PURE__ */ jsx57(Text53, { children: question }),
|
|
29568
|
+
/* @__PURE__ */ jsx57(Box48, { marginTop: 1, children: /* @__PURE__ */ jsx57(
|
|
29215
29569
|
Select3,
|
|
29216
29570
|
{
|
|
29217
29571
|
options: [
|
|
@@ -29236,9 +29590,9 @@ var init_BooleanInput = __esm({
|
|
|
29236
29590
|
});
|
|
29237
29591
|
|
|
29238
29592
|
// packages/experience-design-system-cli/src/setup/steps/preferences/AnalyticsScreen.tsx
|
|
29239
|
-
import { jsx as
|
|
29593
|
+
import { jsx as jsx58 } from "react/jsx-runtime";
|
|
29240
29594
|
function AnalyticsScreen({ onDone }) {
|
|
29241
|
-
return /* @__PURE__ */
|
|
29595
|
+
return /* @__PURE__ */ jsx58(
|
|
29242
29596
|
BooleanInput,
|
|
29243
29597
|
{
|
|
29244
29598
|
helpText: "Shares anonymous usage data about which CLI commands are used and where imports succeed or fail. Never includes source code, file paths, credentials, or authored content",
|
|
@@ -29259,9 +29613,9 @@ var init_AnalyticsScreen = __esm({
|
|
|
29259
29613
|
});
|
|
29260
29614
|
|
|
29261
29615
|
// packages/experience-design-system-cli/src/setup/steps/preferences/ColorPreferenceScreen.tsx
|
|
29262
|
-
import { jsx as
|
|
29616
|
+
import { jsx as jsx59 } from "react/jsx-runtime";
|
|
29263
29617
|
function ColorPreferenceScreen({ onDone }) {
|
|
29264
|
-
return /* @__PURE__ */
|
|
29618
|
+
return /* @__PURE__ */ jsx59(
|
|
29265
29619
|
BooleanInput,
|
|
29266
29620
|
{
|
|
29267
29621
|
helpText: `Prints plain text with no color, which suits CI logs and basic terminals.`,
|
|
@@ -29283,9 +29637,9 @@ var init_ColorPreferenceScreen = __esm({
|
|
|
29283
29637
|
|
|
29284
29638
|
// packages/experience-design-system-cli/src/setup/steps/preferences/CustomPromptScreen.tsx
|
|
29285
29639
|
import { useEffect as useEffect18, useState as useState27 } from "react";
|
|
29286
|
-
import { Box as
|
|
29640
|
+
import { Box as Box49, Text as Text54 } from "ink";
|
|
29287
29641
|
import { ConfirmInput, TextInput as TextInput3 } from "@inkjs/ui";
|
|
29288
|
-
import { jsx as
|
|
29642
|
+
import { jsx as jsx60, jsxs as jsxs51 } from "react/jsx-runtime";
|
|
29289
29643
|
function parseCustomSkillPath(answer) {
|
|
29290
29644
|
const trimmed = answer.trim();
|
|
29291
29645
|
if (trimmed === "") return void 0;
|
|
@@ -29307,19 +29661,19 @@ function CustomPromptsScreen({ onDone }) {
|
|
|
29307
29661
|
useEffect18(() => {
|
|
29308
29662
|
void readExperiencesCredentials().then(setStored);
|
|
29309
29663
|
}, []);
|
|
29310
|
-
if (!stored) return /* @__PURE__ */
|
|
29664
|
+
if (!stored) return /* @__PURE__ */ jsx60(Text54, { dimColor: true, children: "Reading saved prompt paths\u2026" });
|
|
29311
29665
|
const submit = (answer) => {
|
|
29312
29666
|
const next = applyCustomSkillPath(stored, parseCustomSkillPath(answer));
|
|
29313
29667
|
void writeExperiencesCredentials(next).then(() => onDone("completed"));
|
|
29314
29668
|
};
|
|
29315
29669
|
if (phase === "confirm") {
|
|
29316
|
-
return /* @__PURE__ */
|
|
29670
|
+
return /* @__PURE__ */ jsx60(
|
|
29317
29671
|
StepLayout,
|
|
29318
29672
|
{
|
|
29319
29673
|
helpText: CUSTOM_PROMPTS_HELP,
|
|
29320
|
-
prompt: /* @__PURE__ */
|
|
29321
|
-
/* @__PURE__ */
|
|
29322
|
-
/* @__PURE__ */
|
|
29674
|
+
prompt: /* @__PURE__ */ jsxs51(Box49, { children: [
|
|
29675
|
+
/* @__PURE__ */ jsx60(Text54, { children: "Use your own prompt file instead of the built-in one? " }),
|
|
29676
|
+
/* @__PURE__ */ jsx60(
|
|
29323
29677
|
ConfirmInput,
|
|
29324
29678
|
{
|
|
29325
29679
|
defaultChoice: "cancel",
|
|
@@ -29331,13 +29685,13 @@ function CustomPromptsScreen({ onDone }) {
|
|
|
29331
29685
|
}
|
|
29332
29686
|
);
|
|
29333
29687
|
}
|
|
29334
|
-
return /* @__PURE__ */
|
|
29688
|
+
return /* @__PURE__ */ jsx60(
|
|
29335
29689
|
StepLayout,
|
|
29336
29690
|
{
|
|
29337
29691
|
helpText: CUSTOM_PROMPTS_HELP,
|
|
29338
|
-
prompt: /* @__PURE__ */
|
|
29339
|
-
/* @__PURE__ */
|
|
29340
|
-
/* @__PURE__ */
|
|
29692
|
+
prompt: /* @__PURE__ */ jsxs51(Box49, { children: [
|
|
29693
|
+
/* @__PURE__ */ jsx60(Text54, { children: customSkillPathQuestion(stored.generatePromptPath) }),
|
|
29694
|
+
/* @__PURE__ */ jsx60(TextInput3, { onSubmit: submit })
|
|
29341
29695
|
] })
|
|
29342
29696
|
}
|
|
29343
29697
|
);
|
|
@@ -29353,9 +29707,9 @@ var init_CustomPromptScreen = __esm({
|
|
|
29353
29707
|
});
|
|
29354
29708
|
|
|
29355
29709
|
// packages/experience-design-system-cli/src/setup/steps/preferences/DebugLogsScreen.tsx
|
|
29356
|
-
import { jsx as
|
|
29710
|
+
import { jsx as jsx61 } from "react/jsx-runtime";
|
|
29357
29711
|
function DebugLogsScreen({ onDone }) {
|
|
29358
|
-
return /* @__PURE__ */
|
|
29712
|
+
return /* @__PURE__ */ jsx61(
|
|
29359
29713
|
BooleanInput,
|
|
29360
29714
|
{
|
|
29361
29715
|
helpText: `Writes a verbose trace of every command decision, for troubleshooting.`,
|
|
@@ -29377,16 +29731,16 @@ var init_DebugLogsScreen = __esm({
|
|
|
29377
29731
|
|
|
29378
29732
|
// packages/experience-design-system-cli/src/setup/steps/preferences/PreferencesMenu.tsx
|
|
29379
29733
|
import { useState as useState28 } from "react";
|
|
29380
|
-
import { Box as
|
|
29734
|
+
import { Box as Box50, Text as Text55 } from "ink";
|
|
29381
29735
|
import { Select as Select4 } from "@inkjs/ui";
|
|
29382
|
-
import { jsx as
|
|
29736
|
+
import { jsx as jsx62, jsxs as jsxs52 } from "react/jsx-runtime";
|
|
29383
29737
|
function PreferencesMenu({ onDone }) {
|
|
29384
29738
|
const [open, setOpen] = useState28(null);
|
|
29385
29739
|
const [changed, setChanged] = useState28(/* @__PURE__ */ new Set());
|
|
29386
29740
|
const entry = open === null ? void 0 : PREFERENCE_OPTIONS.find((option) => option.key === open);
|
|
29387
|
-
if (!entry) return /* @__PURE__ */
|
|
29741
|
+
if (!entry) return /* @__PURE__ */ jsx62(PreferenceList, { changed, onOpen: setOpen, onDone });
|
|
29388
29742
|
const { key, Screen } = entry;
|
|
29389
|
-
return /* @__PURE__ */
|
|
29743
|
+
return /* @__PURE__ */ jsx62(
|
|
29390
29744
|
Screen,
|
|
29391
29745
|
{
|
|
29392
29746
|
onDone: (status) => {
|
|
@@ -29403,13 +29757,13 @@ function PreferenceList({ changed, onOpen, onDone }) {
|
|
|
29403
29757
|
...PREFERENCE_OPTIONS.map((option) => ({ label: option.label, value: option.key })),
|
|
29404
29758
|
{ label: "Done", value: DONE_VALUE }
|
|
29405
29759
|
];
|
|
29406
|
-
return /* @__PURE__ */
|
|
29760
|
+
return /* @__PURE__ */ jsx62(
|
|
29407
29761
|
StepLayout,
|
|
29408
29762
|
{
|
|
29409
29763
|
helpText: PREFERENCES_MENU_HELP,
|
|
29410
|
-
prompt: /* @__PURE__ */
|
|
29411
|
-
/* @__PURE__ */
|
|
29412
|
-
/* @__PURE__ */
|
|
29764
|
+
prompt: /* @__PURE__ */ jsxs52(Box50, { flexDirection: "column", children: [
|
|
29765
|
+
/* @__PURE__ */ jsx62(Text55, { children: "Preferences" }),
|
|
29766
|
+
/* @__PURE__ */ jsx62(Box50, { marginTop: 1, children: /* @__PURE__ */ jsx62(
|
|
29413
29767
|
Select4,
|
|
29414
29768
|
{
|
|
29415
29769
|
options,
|
|
@@ -29442,22 +29796,22 @@ var init_PreferencesMenu = __esm({
|
|
|
29442
29796
|
{
|
|
29443
29797
|
key: "customPrompts",
|
|
29444
29798
|
label: "Custom prompts",
|
|
29445
|
-
Screen: ({ onDone }) => /* @__PURE__ */
|
|
29799
|
+
Screen: ({ onDone }) => /* @__PURE__ */ jsx62(CustomPromptsScreen, { onDone })
|
|
29446
29800
|
},
|
|
29447
29801
|
{
|
|
29448
29802
|
key: "debug",
|
|
29449
29803
|
label: "Debug logging",
|
|
29450
|
-
Screen: ({ onDone }) => /* @__PURE__ */
|
|
29804
|
+
Screen: ({ onDone }) => /* @__PURE__ */ jsx62(DebugLogsScreen, { onDone })
|
|
29451
29805
|
},
|
|
29452
29806
|
{
|
|
29453
29807
|
key: "analytics",
|
|
29454
29808
|
label: "Usage analytics",
|
|
29455
|
-
Screen: ({ onDone }) => /* @__PURE__ */
|
|
29809
|
+
Screen: ({ onDone }) => /* @__PURE__ */ jsx62(AnalyticsScreen, { onDone })
|
|
29456
29810
|
},
|
|
29457
29811
|
{
|
|
29458
29812
|
key: "noColor",
|
|
29459
29813
|
label: "Terminal colors",
|
|
29460
|
-
Screen: ({ onDone }) => /* @__PURE__ */
|
|
29814
|
+
Screen: ({ onDone }) => /* @__PURE__ */ jsx62(ColorPreferenceScreen, { onDone })
|
|
29461
29815
|
}
|
|
29462
29816
|
];
|
|
29463
29817
|
DONE_VALUE = "menu:done";
|
|
@@ -29673,23 +30027,23 @@ var init_prerequisites = __esm({
|
|
|
29673
30027
|
|
|
29674
30028
|
// packages/experience-design-system-cli/src/setup/steps/prerequisites/PrerequisitesScreen.tsx
|
|
29675
30029
|
import { useEffect as useEffect19, useRef as useRef13, useState as useState29 } from "react";
|
|
29676
|
-
import { Box as
|
|
30030
|
+
import { Box as Box51, Text as Text56 } from "ink";
|
|
29677
30031
|
import { ConfirmInput as ConfirmInput2 } from "@inkjs/ui";
|
|
29678
|
-
import { jsx as
|
|
30032
|
+
import { jsx as jsx63, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
29679
30033
|
function EventLine({ event }) {
|
|
29680
|
-
if (event.kind === "success") return /* @__PURE__ */
|
|
30034
|
+
if (event.kind === "success") return /* @__PURE__ */ jsxs53(Text56, { color: PALETTE.success, children: [
|
|
29681
30035
|
"\u2713 ",
|
|
29682
30036
|
event.message
|
|
29683
30037
|
] });
|
|
29684
|
-
if (event.kind === "failure") return /* @__PURE__ */
|
|
30038
|
+
if (event.kind === "failure") return /* @__PURE__ */ jsxs53(Text56, { color: PALETTE.error, children: [
|
|
29685
30039
|
"\u2717 ",
|
|
29686
30040
|
event.message
|
|
29687
30041
|
] });
|
|
29688
|
-
if (event.kind === "warning") return /* @__PURE__ */
|
|
30042
|
+
if (event.kind === "warning") return /* @__PURE__ */ jsxs53(Text56, { color: PALETTE.warning, children: [
|
|
29689
30043
|
"\u26A0 ",
|
|
29690
30044
|
event.message
|
|
29691
30045
|
] });
|
|
29692
|
-
return /* @__PURE__ */
|
|
30046
|
+
return /* @__PURE__ */ jsx63(Text56, { children: event.message });
|
|
29693
30047
|
}
|
|
29694
30048
|
function PrerequisitesScreen({
|
|
29695
30049
|
repoRoot,
|
|
@@ -29728,15 +30082,15 @@ function PrerequisitesScreen({
|
|
|
29728
30082
|
...skipBuild !== void 0 ? { skipBuild } : {}
|
|
29729
30083
|
}).then(onDone);
|
|
29730
30084
|
}, []);
|
|
29731
|
-
return /* @__PURE__ */
|
|
30085
|
+
return /* @__PURE__ */ jsx63(
|
|
29732
30086
|
StepLayout,
|
|
29733
30087
|
{
|
|
29734
|
-
prompt: confirm ? /* @__PURE__ */
|
|
29735
|
-
/* @__PURE__ */
|
|
30088
|
+
prompt: confirm ? /* @__PURE__ */ jsxs53(Box51, { children: [
|
|
30089
|
+
/* @__PURE__ */ jsxs53(Text56, { children: [
|
|
29736
30090
|
confirm.question,
|
|
29737
30091
|
" "
|
|
29738
30092
|
] }),
|
|
29739
|
-
/* @__PURE__ */
|
|
30093
|
+
/* @__PURE__ */ jsx63(
|
|
29740
30094
|
ConfirmInput2,
|
|
29741
30095
|
{
|
|
29742
30096
|
defaultChoice: confirm.defaultYes ? "confirm" : "cancel",
|
|
@@ -29745,8 +30099,8 @@ function PrerequisitesScreen({
|
|
|
29745
30099
|
},
|
|
29746
30100
|
confirm.question
|
|
29747
30101
|
)
|
|
29748
|
-
] }) : /* @__PURE__ */
|
|
29749
|
-
children: /* @__PURE__ */
|
|
30102
|
+
] }) : /* @__PURE__ */ jsx63(Text56, { color: PALETTE.info, children: "\u27F3 Checking prerequisites\u2026" }),
|
|
30103
|
+
children: /* @__PURE__ */ jsx63(Box51, { flexDirection: "column", children: events.map((event, index) => /* @__PURE__ */ jsx63(EventLine, { event }, `${index}-${event.message}`)) })
|
|
29750
30104
|
}
|
|
29751
30105
|
);
|
|
29752
30106
|
}
|
|
@@ -29767,8 +30121,8 @@ __export(SetupScreen_exports, {
|
|
|
29767
30121
|
formatSetupCompletionMessage: () => formatSetupCompletionMessage
|
|
29768
30122
|
});
|
|
29769
30123
|
import { useEffect as useEffect20, useRef as useRef14, useState as useState30 } from "react";
|
|
29770
|
-
import { Box as
|
|
29771
|
-
import { jsx as
|
|
30124
|
+
import { Box as Box52, Text as Text57 } from "ink";
|
|
30125
|
+
import { jsx as jsx64, jsxs as jsxs54 } from "react/jsx-runtime";
|
|
29772
30126
|
function countRequiredFailures(results) {
|
|
29773
30127
|
return results.filter((result) => result.required && result.status === "failed").length;
|
|
29774
30128
|
}
|
|
@@ -29799,7 +30153,7 @@ function SetupScreen({
|
|
|
29799
30153
|
});
|
|
29800
30154
|
void (async () => {
|
|
29801
30155
|
const results = [];
|
|
29802
|
-
const prerequisites = await runScreen((done) => /* @__PURE__ */
|
|
30156
|
+
const prerequisites = await runScreen((done) => /* @__PURE__ */ jsx64(
|
|
29803
30157
|
PrerequisitesScreen,
|
|
29804
30158
|
{
|
|
29805
30159
|
repoRoot,
|
|
@@ -29833,21 +30187,21 @@ function SetupScreen({
|
|
|
29833
30187
|
if (skip.skipAgent) {
|
|
29834
30188
|
results.push({ name: "Coding agent", status: "skipped", required: false });
|
|
29835
30189
|
} else {
|
|
29836
|
-
const status = await runScreen((done) => /* @__PURE__ */
|
|
30190
|
+
const status = await runScreen((done) => /* @__PURE__ */ jsx64(CodingAgentScreen, { onDone: done }));
|
|
29837
30191
|
results.push({ name: "Coding agent", status, required: true });
|
|
29838
30192
|
}
|
|
29839
30193
|
setActiveStep(3);
|
|
29840
30194
|
if (skip.skipCredentials) {
|
|
29841
30195
|
results.push({ name: "Contentful credentials", status: "skipped", required: false });
|
|
29842
30196
|
} else {
|
|
29843
|
-
const status = await runScreen((done) => /* @__PURE__ */
|
|
30197
|
+
const status = await runScreen((done) => /* @__PURE__ */ jsx64(ContentfulCredentialsScreen, { onDone: done }));
|
|
29844
30198
|
results.push({ name: "Contentful credentials", status, required: false });
|
|
29845
30199
|
}
|
|
29846
30200
|
setActiveStep(4);
|
|
29847
30201
|
if (skip.skipOptional) {
|
|
29848
30202
|
results.push({ name: "Preferences", status: "skipped", required: false });
|
|
29849
30203
|
} else {
|
|
29850
|
-
const status = await runScreen((done) => /* @__PURE__ */
|
|
30204
|
+
const status = await runScreen((done) => /* @__PURE__ */ jsx64(PreferencesMenu, { onDone: done }));
|
|
29851
30205
|
results.push({ name: "Preferences", status, required: false });
|
|
29852
30206
|
}
|
|
29853
30207
|
const exitCode = countRequiredFailures(results) === 0 ? 0 : 1;
|
|
@@ -29856,37 +30210,37 @@ function SetupScreen({
|
|
|
29856
30210
|
onComplete(finalOutcome);
|
|
29857
30211
|
})();
|
|
29858
30212
|
}, []);
|
|
29859
|
-
return /* @__PURE__ */
|
|
29860
|
-
/* @__PURE__ */
|
|
29861
|
-
/* @__PURE__ */
|
|
29862
|
-
/* @__PURE__ */
|
|
30213
|
+
return /* @__PURE__ */ jsxs54(Box52, { flexDirection: "column", paddingX: 1, children: [
|
|
30214
|
+
/* @__PURE__ */ jsxs54(Box52, { justifyContent: "space-between", columnGap: 1, ...columns !== void 0 ? { width: columns - 2 } : {}, children: [
|
|
30215
|
+
/* @__PURE__ */ jsx64(Box52, { flexShrink: 0, children: /* @__PURE__ */ jsx64(Text57, { bold: true, children: "experiences setup" }) }),
|
|
30216
|
+
/* @__PURE__ */ jsx64(Box52, { flexShrink: 0, children: /* @__PURE__ */ jsxs54(Text57, { dimColor: true, children: [
|
|
29863
30217
|
"v",
|
|
29864
30218
|
version
|
|
29865
30219
|
] }) })
|
|
29866
30220
|
] }),
|
|
29867
|
-
/* @__PURE__ */
|
|
29868
|
-
outcome ? /* @__PURE__ */
|
|
30221
|
+
/* @__PURE__ */ jsx64(Box52, { marginTop: 1, children: /* @__PURE__ */ jsx64(SetupStepper, { activeStep, columns }) }),
|
|
30222
|
+
outcome ? /* @__PURE__ */ jsx64(SetupSummary, { outcome, notice }) : screen && /* @__PURE__ */ jsx64(Box52, { marginTop: 1, children: screen })
|
|
29869
30223
|
] });
|
|
29870
30224
|
}
|
|
29871
30225
|
function SetupSummary({ outcome, notice }) {
|
|
29872
30226
|
const requiredFailed = countRequiredFailures(outcome.results);
|
|
29873
|
-
return /* @__PURE__ */
|
|
29874
|
-
/* @__PURE__ */
|
|
30227
|
+
return /* @__PURE__ */ jsxs54(Box52, { flexDirection: "column", marginTop: 1, children: [
|
|
30228
|
+
/* @__PURE__ */ jsx64(Text57, { bold: true, children: "Summary" }),
|
|
29875
30229
|
outcome.results.map((result) => {
|
|
29876
30230
|
if (result.status === "completed") {
|
|
29877
|
-
return /* @__PURE__ */
|
|
30231
|
+
return /* @__PURE__ */ jsxs54(Text57, { color: PALETTE.success, children: [
|
|
29878
30232
|
"\u2713 ",
|
|
29879
30233
|
result.name
|
|
29880
30234
|
] }, result.name);
|
|
29881
30235
|
}
|
|
29882
30236
|
if (result.status === "skipped") {
|
|
29883
|
-
return /* @__PURE__ */
|
|
30237
|
+
return /* @__PURE__ */ jsxs54(Text57, { dimColor: true, children: [
|
|
29884
30238
|
"\u2013 ",
|
|
29885
30239
|
result.name,
|
|
29886
30240
|
" \u2014 skipped"
|
|
29887
30241
|
] }, result.name);
|
|
29888
30242
|
}
|
|
29889
|
-
return /* @__PURE__ */
|
|
30243
|
+
return /* @__PURE__ */ jsxs54(Text57, { color: result.required ? PALETTE.error : PALETTE.warning, children: [
|
|
29890
30244
|
result.required ? "\u2717" : "\u26A0",
|
|
29891
30245
|
" ",
|
|
29892
30246
|
result.name,
|
|
@@ -29894,10 +30248,10 @@ function SetupSummary({ outcome, notice }) {
|
|
|
29894
30248
|
result.required ? "required" : "optional"
|
|
29895
30249
|
] }, result.name);
|
|
29896
30250
|
}),
|
|
29897
|
-
notice && /* @__PURE__ */
|
|
29898
|
-
/* @__PURE__ */
|
|
29899
|
-
requiredFailed > 0 && /* @__PURE__ */
|
|
29900
|
-
/* @__PURE__ */
|
|
30251
|
+
notice && /* @__PURE__ */ jsx64(Box52, { marginTop: 1, children: /* @__PURE__ */ jsx64(Text57, { color: PALETTE.warning, children: notice }) }),
|
|
30252
|
+
/* @__PURE__ */ jsx64(Box52, { marginTop: 1, children: /* @__PURE__ */ jsx64(Text57, { bold: true, color: requiredFailed === 0 ? PALETTE.success : PALETTE.warning, children: formatSetupCompletionMessage(outcome.results) }) }),
|
|
30253
|
+
requiredFailed > 0 && /* @__PURE__ */ jsx64(Text57, { dimColor: true, children: "Complete the steps above, then re-run experiences setup." }),
|
|
30254
|
+
/* @__PURE__ */ jsx64(Text57, { dimColor: true, children: "Run experiences doctor any time to re-check." })
|
|
29901
30255
|
] });
|
|
29902
30256
|
}
|
|
29903
30257
|
var init_SetupScreen = __esm({
|