@contentful/experience-design-system-cli 2.37.1-dev-build-0b786a83.0 → 2.37.1-dev-build-35e4cab1.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/index.js CHANGED
@@ -1500,7 +1500,7 @@ async function runAgent(options) {
1500
1500
  promptLen: prompt.length,
1501
1501
  promptHead: prompt.slice(0, 500)
1502
1502
  });
1503
- return new Promise((resolve28) => {
1503
+ return new Promise((resolve27) => {
1504
1504
  const bedrockEnv = bedrock ? BEDROCK_ENV_BY_AGENT[agent] : void 0;
1505
1505
  const child = spawn(binary, args, {
1506
1506
  stdio: ["pipe", "pipe", "pipe"],
@@ -1549,7 +1549,7 @@ async function runAgent(options) {
1549
1549
  stderrLen: stderr.length,
1550
1550
  stderrTail: stderr.slice(-1e3)
1551
1551
  });
1552
- resolve28(result);
1552
+ resolve27(result);
1553
1553
  });
1554
1554
  });
1555
1555
  }
@@ -1571,7 +1571,7 @@ async function checkAgentAuth(agent) {
1571
1571
  return "not-found";
1572
1572
  if (agent !== "claude")
1573
1573
  return "ok";
1574
- return new Promise((resolve28) => {
1574
+ return new Promise((resolve27) => {
1575
1575
  const child = spawn2(binary, ["auth", "status", "--json"], { stdio: ["ignore", "pipe", "pipe"] });
1576
1576
  let stdout = "";
1577
1577
  let done = false;
@@ -1580,7 +1580,7 @@ async function checkAgentAuth(agent) {
1580
1580
  return;
1581
1581
  done = true;
1582
1582
  child.kill("SIGTERM");
1583
- resolve28("unauthenticated");
1583
+ resolve27("unauthenticated");
1584
1584
  }, 5e3);
1585
1585
  child.stdout?.on("data", (chunk) => {
1586
1586
  stdout += chunk.toString();
@@ -1591,14 +1591,14 @@ async function checkAgentAuth(agent) {
1591
1591
  done = true;
1592
1592
  clearTimeout(timer);
1593
1593
  if (code !== 0) {
1594
- resolve28("unauthenticated");
1594
+ resolve27("unauthenticated");
1595
1595
  return;
1596
1596
  }
1597
1597
  try {
1598
1598
  const status = JSON.parse(stdout);
1599
- resolve28(status.loggedIn ? "ok" : "unauthenticated");
1599
+ resolve27(status.loggedIn ? "ok" : "unauthenticated");
1600
1600
  } catch {
1601
- resolve28("unauthenticated");
1601
+ resolve27("unauthenticated");
1602
1602
  }
1603
1603
  });
1604
1604
  });
@@ -1608,9 +1608,9 @@ async function binaryIsOnPath(binary) {
1608
1608
  const fs = await import("node:fs/promises");
1609
1609
  return fs.access(binary).then(() => true, () => false);
1610
1610
  }
1611
- return new Promise((resolve28) => {
1611
+ return new Promise((resolve27) => {
1612
1612
  const child = spawn2(process.platform === "win32" ? "where" : "which", [binary], { stdio: "ignore" });
1613
- child.on("close", (code) => resolve28(code === 0));
1613
+ child.on("close", (code) => resolve27(code === 0));
1614
1614
  });
1615
1615
  }
1616
1616
  var init_check_agent_auth = __esm({
@@ -3426,9 +3426,9 @@ async function resolveRelativeImport(specifier, fromDir) {
3426
3426
  async function resolveImportSpecifiers(sourceText, fromDir) {
3427
3427
  const resolvedPaths = [];
3428
3428
  for (const specifier of extractRelativeImportPaths(sourceText)) {
3429
- const resolvedPath2 = await resolveRelativeImport(specifier, fromDir);
3430
- if (resolvedPath2)
3431
- resolvedPaths.push(resolvedPath2);
3429
+ const resolvedPath = await resolveRelativeImport(specifier, fromDir);
3430
+ if (resolvedPath)
3431
+ resolvedPaths.push(resolvedPath);
3432
3432
  }
3433
3433
  return resolvedPaths;
3434
3434
  }
@@ -3442,20 +3442,20 @@ async function loadSiblingFiles(sourceText, sourcePath, propNames, candidateType
3442
3442
  if (discovered.length >= MAX_SIBLING_CANDIDATES_EXPLORED)
3443
3443
  break;
3444
3444
  const resolvedPaths = await resolveImportSpecifiers(node.text, node.dir);
3445
- for (const resolvedPath2 of resolvedPaths) {
3446
- if (visited.has(resolvedPath2))
3445
+ for (const resolvedPath of resolvedPaths) {
3446
+ if (visited.has(resolvedPath))
3447
3447
  continue;
3448
- visited.add(resolvedPath2);
3448
+ visited.add(resolvedPath);
3449
3449
  if (discovered.length >= MAX_SIBLING_CANDIDATES_EXPLORED)
3450
3450
  break;
3451
3451
  let content;
3452
3452
  try {
3453
- content = await readFile4(resolvedPath2, "utf8");
3453
+ content = await readFile4(resolvedPath, "utf8");
3454
3454
  } catch {
3455
3455
  continue;
3456
3456
  }
3457
- discovered.push({ path: resolvedPath2, content });
3458
- nextFrontier.push({ text: content, dir: dirname3(resolvedPath2) });
3457
+ discovered.push({ path: resolvedPath, content });
3458
+ nextFrontier.push({ text: content, dir: dirname3(resolvedPath) });
3459
3459
  }
3460
3460
  }
3461
3461
  frontier = nextFrontier;
@@ -4709,11 +4709,11 @@ function isBareModuleSpecifier(moduleSpecifier) {
4709
4709
  return !moduleSpecifier.startsWith(".") && !moduleSpecifier.startsWith("/");
4710
4710
  }
4711
4711
  function findRepoLocalAliasSourceFile(originSourceFile, moduleSpecifier) {
4712
- const resolvedPath2 = resolveRepoLocalAliasImportPath(originSourceFile.getFilePath(), moduleSpecifier);
4713
- if (!resolvedPath2)
4712
+ const resolvedPath = resolveRepoLocalAliasImportPath(originSourceFile.getFilePath(), moduleSpecifier);
4713
+ if (!resolvedPath)
4714
4714
  return void 0;
4715
4715
  const project = originSourceFile.getProject();
4716
- return findProjectSourceFileByImportPath(project, resolvedPath2);
4716
+ return findProjectSourceFileByImportPath(project, resolvedPath);
4717
4717
  }
4718
4718
  function resolveRepoLocalAliasImportPath(importingFilePath, moduleSpecifier) {
4719
4719
  const nearestTsConfigPath = findNearestTsConfigPath(importingFilePath);
@@ -4728,8 +4728,8 @@ function resolveRepoLocalAliasImportPath(importingFilePath, moduleSpecifier) {
4728
4728
  continue;
4729
4729
  for (const targetPattern of targets) {
4730
4730
  const substitutedTarget = substituteTsConfigPathTarget(targetPattern, match2.wildcard);
4731
- const resolvedPath2 = resolve6(tsConfigPaths.baseUrl, substitutedTarget);
4732
- const sourceFilePath = resolveImportSourcePath(resolvedPath2);
4731
+ const resolvedPath = resolve6(tsConfigPaths.baseUrl, substitutedTarget);
4732
+ const sourceFilePath = resolveImportSourcePath(resolvedPath);
4733
4733
  if (sourceFilePath)
4734
4734
  return sourceFilePath;
4735
4735
  }
@@ -4807,17 +4807,17 @@ function resolveImportSourcePath(basePath) {
4807
4807
  ];
4808
4808
  return candidates.find((candidatePath) => existsSync2(candidatePath));
4809
4809
  }
4810
- function findProjectSourceFileByImportPath(project, resolvedPath2) {
4810
+ function findProjectSourceFileByImportPath(project, resolvedPath) {
4811
4811
  const candidatePaths = [
4812
- resolvedPath2,
4813
- `${resolvedPath2}.ts`,
4814
- `${resolvedPath2}.tsx`,
4815
- `${resolvedPath2}.js`,
4816
- `${resolvedPath2}.jsx`,
4817
- join3(resolvedPath2, "index.ts"),
4818
- join3(resolvedPath2, "index.tsx"),
4819
- join3(resolvedPath2, "index.js"),
4820
- join3(resolvedPath2, "index.jsx")
4812
+ resolvedPath,
4813
+ `${resolvedPath}.ts`,
4814
+ `${resolvedPath}.tsx`,
4815
+ `${resolvedPath}.js`,
4816
+ `${resolvedPath}.jsx`,
4817
+ join3(resolvedPath, "index.ts"),
4818
+ join3(resolvedPath, "index.tsx"),
4819
+ join3(resolvedPath, "index.js"),
4820
+ join3(resolvedPath, "index.jsx")
4821
4821
  ];
4822
4822
  for (const candidatePath of candidatePaths) {
4823
4823
  const sourceFile = project.getSourceFile(candidatePath);
@@ -7916,10 +7916,10 @@ function extractVueSlotsFromSetup(options) {
7916
7916
  if (!body)
7917
7917
  return [];
7918
7918
  const slotsByName = /* @__PURE__ */ new Map();
7919
- for (const access7 of body.getDescendantsOfKind(SyntaxKind5.PropertyAccessExpression)) {
7920
- if (access7.getExpression().getText() !== slotsName)
7919
+ for (const access6 of body.getDescendantsOfKind(SyntaxKind5.PropertyAccessExpression)) {
7920
+ if (access6.getExpression().getText() !== slotsName)
7921
7921
  continue;
7922
- const slotName = access7.getName();
7922
+ const slotName = access6.getName();
7923
7923
  if (!slotsByName.has(slotName)) {
7924
7924
  slotsByName.set(slotName, {
7925
7925
  name: slotName,
@@ -9422,11 +9422,11 @@ function getElementTagNameFromFastDefinition(classDecl, project) {
9422
9422
  }
9423
9423
  function resolveImportSourcePath2(fromFilePath, specifier) {
9424
9424
  if (specifier.startsWith(".")) {
9425
- const resolvedPath2 = resolve9(dirname7(fromFilePath), specifier);
9426
- if (resolvedPath2.endsWith(".js")) {
9427
- return `${resolvedPath2.slice(0, -3)}.ts`;
9425
+ const resolvedPath = resolve9(dirname7(fromFilePath), specifier);
9426
+ if (resolvedPath.endsWith(".js")) {
9427
+ return `${resolvedPath.slice(0, -3)}.ts`;
9428
9428
  }
9429
- return resolvedPath2;
9429
+ return resolvedPath;
9430
9430
  }
9431
9431
  const spectrumPrefix = "@spectrum-web-components/core/components/";
9432
9432
  if (!specifier.startsWith(spectrumPrefix)) {
@@ -14333,7 +14333,7 @@ function errorMessage(error) {
14333
14333
  return error instanceof Error && error.message ? error.message : String(error);
14334
14334
  }
14335
14335
  function defaultSleep(delayMs) {
14336
- return new Promise((resolve28) => setTimeout(resolve28, delayMs));
14336
+ return new Promise((resolve27) => setTimeout(resolve27, delayMs));
14337
14337
  }
14338
14338
  var MAX_RETRY_AFTER_MS;
14339
14339
  var init_http_utils = __esm({
@@ -14609,7 +14609,7 @@ var init_api_client = __esm({
14609
14609
  const progress = maxAttempts > 1 ? attempt / (maxAttempts - 1) : 0;
14610
14610
  const baseDelay = intervalMs + (maxIntervalMs - intervalMs) * progress;
14611
14611
  const jitter = Math.random() * baseDelay * 0.15;
14612
- await new Promise((resolve28) => setTimeout(resolve28, baseDelay + jitter));
14612
+ await new Promise((resolve27) => setTimeout(resolve27, baseDelay + jitter));
14613
14613
  }
14614
14614
  }
14615
14615
  throw new Error(`Operation ${operationId} timed out after ${maxAttempts} attempts`);
@@ -18527,7 +18527,7 @@ async function retryDatabaseWrite(operation, attempts = 8) {
18527
18527
  const message = error instanceof Error ? error.message : String(error);
18528
18528
  if (!/database is locked|database is busy/i.test(message) || attempt >= attempts)
18529
18529
  throw error;
18530
- await new Promise((resolve28) => setTimeout(resolve28, Math.min(250 * attempt, 2e3)));
18530
+ await new Promise((resolve27) => setTimeout(resolve27, Math.min(250 * attempt, 2e3)));
18531
18531
  }
18532
18532
  }
18533
18533
  }
@@ -19446,7 +19446,6 @@ var init_src4 = __esm({
19446
19446
  init_agents();
19447
19447
  init_agent_name();
19448
19448
  init_models();
19449
- init_binaries();
19450
19449
  init_is_agent_name();
19451
19450
  init_agent_supports_bedrock();
19452
19451
  init_check_agent_auth();
@@ -19566,97 +19565,6 @@ var init_v1_store = __esm({
19566
19565
  }
19567
19566
  });
19568
19567
 
19569
- // packages/experience-design-system-cli/src/tui/settings/agents/agent-store.ts
19570
- function emptyAgents() {
19571
- return Object.fromEntries(AGENT_NAMES.map((name) => [name, { model: "", binary: "" }]));
19572
- }
19573
- async function readAgentConfig() {
19574
- const store = await readV1Store();
19575
- const stored = asString(store["agent"]);
19576
- const defaultAgent = isAgentName(stored) ? stored : DEFAULT_AGENT3;
19577
- const agents = emptyAgents();
19578
- const saved = store["agents"];
19579
- if (saved && typeof saved === "object") {
19580
- for (const name of AGENT_NAMES) {
19581
- const entry = saved[name];
19582
- if (entry && typeof entry === "object") {
19583
- const fields = entry;
19584
- agents[name] = { model: asString(fields["model"]), binary: asString(fields["binary"]) };
19585
- }
19586
- }
19587
- }
19588
- const legacyModel = asString(store["agentModel"]);
19589
- if (legacyModel && !agents[defaultAgent].model)
19590
- agents[defaultAgent] = { ...agents[defaultAgent], model: legacyModel };
19591
- return { defaultAgent, agents };
19592
- }
19593
- async function writeAgentConfig(config) {
19594
- const existing = await readV1Store();
19595
- const merged = { ...existing };
19596
- const agents = {};
19597
- for (const name of AGENT_NAMES) {
19598
- const model = config.agents[name].model.trim();
19599
- const binary = config.agents[name].binary.trim();
19600
- if (model || binary) agents[name] = { ...model ? { model } : {}, ...binary ? { binary } : {} };
19601
- }
19602
- merged["agent"] = config.defaultAgent;
19603
- const defaultModel = agents[config.defaultAgent]?.model;
19604
- if (defaultModel) merged["agentModel"] = defaultModel;
19605
- else delete merged["agentModel"];
19606
- if (Object.keys(agents).length > 0) merged["agents"] = agents;
19607
- else delete merged["agents"];
19608
- await writeV1Store(merged);
19609
- }
19610
- var DEFAULT_AGENT3, AGENT_LABELS, AGENT_HINTS, asString;
19611
- var init_agent_store = __esm({
19612
- "packages/experience-design-system-cli/src/tui/settings/agents/agent-store.ts"() {
19613
- "use strict";
19614
- init_src4();
19615
- init_v1_store();
19616
- DEFAULT_AGENT3 = "claude";
19617
- AGENT_LABELS = {
19618
- claude: "Claude Code",
19619
- codex: "OpenAI Codex",
19620
- opencode: "OpenCode",
19621
- cursor: "Cursor",
19622
- copilot: "GitHub Copilot"
19623
- };
19624
- AGENT_HINTS = {
19625
- claude: "claude",
19626
- codex: "codex",
19627
- opencode: "opencode",
19628
- cursor: "cursor-agent",
19629
- copilot: "copilot"
19630
- };
19631
- asString = (value) => typeof value === "string" ? value : "";
19632
- }
19633
- });
19634
-
19635
- // packages/experience-design-system-cli/src/tui/settings/agents/apply-binary-overrides.ts
19636
- function applyBinaryOverrides(config) {
19637
- for (const name of AGENT_NAMES) {
19638
- const key = `EDS_AGENT_BINARY_${name.toUpperCase()}`;
19639
- const binary = config.agents[name].binary.trim();
19640
- if (binary) {
19641
- if (!shellValues.has(key)) shellValues.set(key, process.env[key]);
19642
- process.env[key] = binary;
19643
- } else if (shellValues.has(key)) {
19644
- const shellValue = shellValues.get(key);
19645
- if (shellValue === void 0) delete process.env[key];
19646
- else process.env[key] = shellValue;
19647
- shellValues.delete(key);
19648
- }
19649
- }
19650
- }
19651
- var shellValues;
19652
- var init_apply_binary_overrides = __esm({
19653
- "packages/experience-design-system-cli/src/tui/settings/agents/apply-binary-overrides.ts"() {
19654
- "use strict";
19655
- init_src4();
19656
- shellValues = /* @__PURE__ */ new Map();
19657
- }
19658
- });
19659
-
19660
19568
  // packages/experience-design-system-cli/src/tui/settings/opt-in-analytics/analytics-store.ts
19661
19569
  async function readAnalyticsSetting() {
19662
19570
  const store = await readV1Store();
@@ -19678,6 +19586,52 @@ var init_analytics_store = __esm({
19678
19586
  }
19679
19587
  });
19680
19588
 
19589
+ // packages/experience-design-system-cli/src/tui/theme.ts
19590
+ function detectColorMode(env = process.env) {
19591
+ const bg = env.COLORFGBG?.split(";").pop();
19592
+ if (bg === "7" || bg === "15") return "light";
19593
+ return "dark";
19594
+ }
19595
+ var DARK, LIGHT, PALETTE;
19596
+ var init_theme = __esm({
19597
+ "packages/experience-design-system-cli/src/tui/theme.ts"() {
19598
+ "use strict";
19599
+ DARK = {
19600
+ text: "#f7f9fa",
19601
+ // gray100
19602
+ muted: "#aec1cc",
19603
+ // gray400
19604
+ border: "#aec1cc",
19605
+ // gray400
19606
+ accent: "#40a0ff",
19607
+ // blue400
19608
+ error: "#ff707d",
19609
+ // red400
19610
+ success: "#5DB057",
19611
+ // green400
19612
+ warning: "#FFC835"
19613
+ // yellow500
19614
+ };
19615
+ LIGHT = {
19616
+ text: "#111b2b",
19617
+ // gray900
19618
+ muted: "#5a657c",
19619
+ // gray600
19620
+ border: "#5a657c",
19621
+ // gray600
19622
+ accent: "#0059c8",
19623
+ // semantic primary
19624
+ error: "#bd002a",
19625
+ // semantic negative
19626
+ success: "#006D23",
19627
+ // semantic positive
19628
+ warning: "#CC4500"
19629
+ // semantic warning
19630
+ };
19631
+ PALETTE = detectColorMode() === "light" ? LIGHT : DARK;
19632
+ }
19633
+ });
19634
+
19681
19635
  // packages/experience-design-system-cli/src/tui/home/home.theme.ts
19682
19636
  function brandBar(width, ramp = BRAND_RAMP) {
19683
19637
  if (width <= 0 || ramp.length === 0) return [];
@@ -19688,28 +19642,12 @@ function brandBar(width, ramp = BRAND_RAMP) {
19688
19642
  color
19689
19643
  })).filter((segment) => segment.text.length > 0);
19690
19644
  }
19691
- var BRAND, PALETTE, BRAND_RAMP, BAR_CELL, FOCUS_MARKER;
19645
+ var BRAND_RAMP, BAR_CELL, FOCUS_MARKER;
19692
19646
  var init_home_theme = __esm({
19693
19647
  "packages/experience-design-system-cli/src/tui/home/home.theme.ts"() {
19694
19648
  "use strict";
19695
- BRAND = {
19696
- blue: "#1773EB",
19697
- green: "#00C459",
19698
- orange: "#E44F20",
19699
- yellow: "#FFDA00",
19700
- white: "#FFFFFF",
19701
- slate: "#8B8D91",
19702
- steel: "#C4D1DE"
19703
- };
19704
- PALETTE = {
19705
- accent: BRAND.blue,
19706
- success: BRAND.green,
19707
- error: BRAND.orange,
19708
- warning: BRAND.yellow,
19709
- muted: BRAND.slate,
19710
- border: BRAND.steel
19711
- };
19712
- BRAND_RAMP = [BRAND.blue, BRAND.orange, BRAND.yellow];
19649
+ init_theme();
19650
+ BRAND_RAMP = [PALETTE.accent, PALETTE.error, PALETTE.warning];
19713
19651
  BAR_CELL = "\u2501";
19714
19652
  FOCUS_MARKER = "\u276F";
19715
19653
  }
@@ -19891,6 +19829,7 @@ var VERSION, HEADING, SUBTITLE, MIN_TERMINAL_WIDTH, START_ITEMS;
19891
19829
  var init_home = __esm({
19892
19830
  "packages/experience-design-system-cli/src/tui/home/home.tsx"() {
19893
19831
  "use strict";
19832
+ init_theme();
19894
19833
  init_home_theme();
19895
19834
  init_version();
19896
19835
  init_use_terminal_width();
@@ -19931,7 +19870,7 @@ function ImportScreen({ exitCode, onDone }) {
19931
19870
  var init_PageContainer = __esm({
19932
19871
  "packages/experience-design-system-cli/src/tui/import/PageContainer.tsx"() {
19933
19872
  "use strict";
19934
- init_home_theme();
19873
+ init_theme();
19935
19874
  }
19936
19875
  });
19937
19876
 
@@ -20011,7 +19950,7 @@ var RULE, OVERVIEW;
20011
19950
  var init_screen = __esm({
20012
19951
  "packages/experience-design-system-cli/src/tui/import/steps/01-welcome/screen.tsx"() {
20013
19952
  "use strict";
20014
- init_home_theme();
19953
+ init_theme();
20015
19954
  init_controls();
20016
19955
  init_logic();
20017
19956
  RULE = "\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500";
@@ -20160,7 +20099,7 @@ function TokenInputScreen({ onConfirm, onBack, initialPath = "" }) {
20160
20099
  var init_screen2 = __esm({
20161
20100
  "packages/experience-design-system-cli/src/tui/import/steps/02-token-input/screen.tsx"() {
20162
20101
  "use strict";
20163
- init_home_theme();
20102
+ init_theme();
20164
20103
  init_controls2();
20165
20104
  init_logic2();
20166
20105
  init_validate_path();
@@ -20349,15 +20288,15 @@ function PathValidationScreen({
20349
20288
  onChangePath,
20350
20289
  onBack
20351
20290
  }) {
20352
- const resolvedPath2 = useMemo(() => resolveUserPath(projectPath), [projectPath]);
20291
+ const resolvedPath = useMemo(() => resolveUserPath(projectPath), [projectPath]);
20353
20292
  const [scan, setScan] = useState5();
20354
20293
  useEffect3(() => {
20355
- setScan(scanFiles(resolvedPath2));
20356
- }, [resolvedPath2]);
20294
+ setScan(scanFiles(resolvedPath));
20295
+ }, [resolvedPath]);
20357
20296
  const phase = phaseOf(scan);
20358
20297
  usePathValidationControls(phase, {
20359
20298
  onConfirm: () => {
20360
- if (scan?.ok) onConfirm({ projectPath: resolvedPath2, filePaths: scan.filePaths });
20299
+ if (scan?.ok) onConfirm({ projectPath: resolvedPath, filePaths: scan.filePaths });
20361
20300
  },
20362
20301
  onChangePath,
20363
20302
  onBack
@@ -20365,11 +20304,11 @@ function PathValidationScreen({
20365
20304
  return /* @__PURE__ */ jsxs5(Box5, { flexDirection: "column", gap: 1, paddingX: 2, paddingY: 1, children: [
20366
20305
  scan === void 0 && /* @__PURE__ */ jsxs5(Text6, { dimColor: true, children: [
20367
20306
  "Scanning ",
20368
- /* @__PURE__ */ jsx6(Text6, { bold: true, children: resolvedPath2 }),
20307
+ /* @__PURE__ */ jsx6(Text6, { bold: true, children: resolvedPath }),
20369
20308
  "..."
20370
20309
  ] }),
20371
- scan?.ok === false && /* @__PURE__ */ jsx6(Failure, { scan, path: resolvedPath2 }),
20372
- scan?.ok === true && /* @__PURE__ */ jsx6(Summary, { scan, path: resolvedPath2 }),
20310
+ scan?.ok === false && /* @__PURE__ */ jsx6(Failure, { scan, path: resolvedPath }),
20311
+ scan?.ok === true && /* @__PURE__ */ jsx6(Summary, { scan, path: resolvedPath }),
20373
20312
  /* @__PURE__ */ jsx6(Box5, { marginTop: 1, gap: 3, children: controlsFor(phase).map((control) => /* @__PURE__ */ jsxs5(Text6, { dimColor: true, children: [
20374
20313
  "[",
20375
20314
  control.keys,
@@ -20381,7 +20320,7 @@ function PathValidationScreen({
20381
20320
  var init_screen3 = __esm({
20382
20321
  "packages/experience-design-system-cli/src/tui/import/steps/03-path-validation/screen.tsx"() {
20383
20322
  "use strict";
20384
- init_home_theme();
20323
+ init_theme();
20385
20324
  init_resolve_user_path();
20386
20325
  init_controls3();
20387
20326
  init_scan_files();
@@ -20590,7 +20529,7 @@ var LABELS;
20590
20529
  var init_screen4 = __esm({
20591
20530
  "packages/experience-design-system-cli/src/tui/import/steps/04-credentials/screen.tsx"() {
20592
20531
  "use strict";
20593
- init_home_theme();
20532
+ init_theme();
20594
20533
  init_controls4();
20595
20534
  init_src4();
20596
20535
  init_logic4();
@@ -20677,7 +20616,7 @@ function ErrorStep({
20677
20616
  var init_error_step = __esm({
20678
20617
  "packages/experience-design-system-cli/src/tui/import/shared/error-step/error-step.tsx"() {
20679
20618
  "use strict";
20680
- init_home_theme();
20619
+ init_theme();
20681
20620
  init_controls5();
20682
20621
  init_logic5();
20683
20622
  }
@@ -20757,7 +20696,7 @@ function GateStep({
20757
20696
  var init_gate_step = __esm({
20758
20697
  "packages/experience-design-system-cli/src/tui/import/shared/gate-step/gate-step.tsx"() {
20759
20698
  "use strict";
20760
- init_home_theme();
20699
+ init_theme();
20761
20700
  init_controls6();
20762
20701
  init_logic6();
20763
20702
  }
@@ -20785,14 +20724,15 @@ var init_logic7 = __esm({
20785
20724
  // packages/experience-design-system-cli/src/tui/import/shared/running-step/theme.ts
20786
20725
  import { defaultTheme, extendTheme } from "@inkjs/ui";
20787
20726
  var PROGRESS_THEME;
20788
- var init_theme = __esm({
20727
+ var init_theme2 = __esm({
20789
20728
  "packages/experience-design-system-cli/src/tui/import/shared/running-step/theme.ts"() {
20790
20729
  "use strict";
20730
+ init_theme();
20791
20731
  PROGRESS_THEME = extendTheme(defaultTheme, {
20792
20732
  components: {
20793
20733
  ProgressBar: {
20794
20734
  styles: {
20795
- completed: () => ({ color: "blue" })
20735
+ completed: () => ({ color: PALETTE.accent })
20796
20736
  }
20797
20737
  }
20798
20738
  }
@@ -20866,9 +20806,9 @@ var RULE2;
20866
20806
  var init_running_step = __esm({
20867
20807
  "packages/experience-design-system-cli/src/tui/import/shared/running-step/running-step.tsx"() {
20868
20808
  "use strict";
20869
- init_home_theme();
20870
- init_logic7();
20871
20809
  init_theme();
20810
+ init_logic7();
20811
+ init_theme2();
20872
20812
  init_use_elapsed();
20873
20813
  RULE2 = "\u2500".repeat(40);
20874
20814
  }
@@ -21415,10 +21355,10 @@ var init_use_extraction = __esm({
21415
21355
 
21416
21356
  // packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/theme.ts
21417
21357
  var PALETTE2;
21418
- var init_theme2 = __esm({
21358
+ var init_theme3 = __esm({
21419
21359
  "packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/theme.ts"() {
21420
21360
  "use strict";
21421
- init_home_theme();
21361
+ init_theme();
21422
21362
  PALETTE2 = {
21423
21363
  info: PALETTE.accent,
21424
21364
  success: PALETTE.success,
@@ -21530,7 +21470,7 @@ var TWO_COLUMN_MIN_WIDTH, SCOPE_GATE_MAIN_COLUMN_WIDTH, ACCEPTED_COMPONENTS_COLU
21530
21470
  var init_columns = __esm({
21531
21471
  "packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/columns.ts"() {
21532
21472
  "use strict";
21533
- init_theme2();
21473
+ init_theme3();
21534
21474
  TWO_COLUMN_MIN_WIDTH = 100;
21535
21475
  SCOPE_GATE_MAIN_COLUMN_WIDTH = 54;
21536
21476
  ACCEPTED_COMPONENTS_COLUMN_WIDTH = 36;
@@ -21610,7 +21550,7 @@ var MIN_TERMINAL_PANEL_HEIGHT;
21610
21550
  var init_windowed_panel = __esm({
21611
21551
  "packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/windowed-panel.tsx"() {
21612
21552
  "use strict";
21613
- init_theme2();
21553
+ init_theme3();
21614
21554
  MIN_TERMINAL_PANEL_HEIGHT = 5;
21615
21555
  }
21616
21556
  });
@@ -21661,7 +21601,7 @@ var init_added_column = __esm({
21661
21601
  "packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/panels/added-column.tsx"() {
21662
21602
  "use strict";
21663
21603
  init_columns();
21664
- init_theme2();
21604
+ init_theme3();
21665
21605
  init_windowed_panel();
21666
21606
  }
21667
21607
  });
@@ -21696,7 +21636,7 @@ function CyclesPanel({ cycles, cursor }) {
21696
21636
  var init_cycles_panel = __esm({
21697
21637
  "packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/panels/cycles-panel.tsx"() {
21698
21638
  "use strict";
21699
- init_theme2();
21639
+ init_theme3();
21700
21640
  }
21701
21641
  });
21702
21642
 
@@ -21714,7 +21654,7 @@ function RejectPrompt({ pending }) {
21714
21654
  var init_reject_prompt = __esm({
21715
21655
  "packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/panels/reject-prompt.tsx"() {
21716
21656
  "use strict";
21717
- init_theme2();
21657
+ init_theme3();
21718
21658
  }
21719
21659
  });
21720
21660
 
@@ -21730,7 +21670,7 @@ function legendEntry(keyBracket, label, active = false) {
21730
21670
  var init_LegendEntry = __esm({
21731
21671
  "packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/LegendEntry.tsx"() {
21732
21672
  "use strict";
21733
- init_theme2();
21673
+ init_theme3();
21734
21674
  }
21735
21675
  });
21736
21676
 
@@ -21751,7 +21691,7 @@ function CompactControlBar({ hasGroupRoots, searchActive }) {
21751
21691
  var init_CompactControlBar = __esm({
21752
21692
  "packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/CompactControlBar.tsx"() {
21753
21693
  "use strict";
21754
- init_theme2();
21694
+ init_theme3();
21755
21695
  init_LegendEntry();
21756
21696
  }
21757
21697
  });
@@ -21790,7 +21730,7 @@ function CounterStrip(props) {
21790
21730
  var init_CounterStrip = __esm({
21791
21731
  "packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/CounterStrip.tsx"() {
21792
21732
  "use strict";
21793
- init_theme2();
21733
+ init_theme3();
21794
21734
  }
21795
21735
  });
21796
21736
 
@@ -21855,7 +21795,7 @@ var DEFAULT_MAX_ROWS;
21855
21795
  var init_GotoBanner = __esm({
21856
21796
  "packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/GotoBanner.tsx"() {
21857
21797
  "use strict";
21858
- init_theme2();
21798
+ init_theme3();
21859
21799
  DEFAULT_MAX_ROWS = 15;
21860
21800
  }
21861
21801
  });
@@ -22234,7 +22174,7 @@ function PreviewBadge({
22234
22174
  var init_badge = __esm({
22235
22175
  "packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/badge.tsx"() {
22236
22176
  "use strict";
22237
- init_theme2();
22177
+ init_theme3();
22238
22178
  }
22239
22179
  });
22240
22180
 
@@ -22729,7 +22669,7 @@ var init_GroupedSidebar = __esm({
22729
22669
  "use strict";
22730
22670
  init_composite_closure();
22731
22671
  init_badge();
22732
- init_theme2();
22672
+ init_theme3();
22733
22673
  init_windowed_panel();
22734
22674
  GLYPH_EXPAND_COLLAPSED = "\u25B8";
22735
22675
  GLYPH_EXPAND_EXPANDED = "\u25BE";
@@ -23024,7 +22964,7 @@ function SearchMatchSummary({
23024
22964
  var init_SearchMatchSummary = __esm({
23025
22965
  "packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/SearchMatchSummary.tsx"() {
23026
22966
  "use strict";
23027
- init_theme2();
22967
+ init_theme3();
23028
22968
  init_sidebar_input();
23029
22969
  }
23030
22970
  });
@@ -24392,7 +24332,7 @@ var init_screen7 = __esm({
24392
24332
  init_HelpOverlay();
24393
24333
  init_SearchMatchSummary();
24394
24334
  init_sidebar_help();
24395
- init_theme2();
24335
+ init_theme3();
24396
24336
  init_use_scope_gate();
24397
24337
  HELP_SECTIONS = [
24398
24338
  {
@@ -25280,24 +25220,6 @@ var init_screen9 = __esm({
25280
25220
  }
25281
25221
  });
25282
25222
 
25283
- // packages/experience-design-system-cli/src/tui/import/steps/09-review/theme.ts
25284
- var PALETTE3;
25285
- var init_theme3 = __esm({
25286
- "packages/experience-design-system-cli/src/tui/import/steps/09-review/theme.ts"() {
25287
- "use strict";
25288
- init_home_theme();
25289
- PALETTE3 = {
25290
- info: PALETTE.accent,
25291
- success: PALETTE.success,
25292
- error: PALETTE.error,
25293
- warning: PALETTE.warning,
25294
- muted: PALETTE.muted,
25295
- border: PALETTE.border,
25296
- inverse: "#FFFFFF"
25297
- };
25298
- }
25299
- });
25300
-
25301
25223
  // packages/experience-design-system-cli/src/tui/import/steps/09-review/review-json-panel.ts
25302
25224
  function getReviewJsonPanelValue(selected, showHiddenProps) {
25303
25225
  if (!selected) return "";
@@ -25789,13 +25711,13 @@ function serializeState(state2, originalJson) {
25789
25711
  }
25790
25712
  function Picker({ value, active }) {
25791
25713
  return /* @__PURE__ */ jsxs22(Box21, { children: [
25792
- active && /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.warning, children: "\u2039" }),
25793
- /* @__PURE__ */ jsx27(Text23, { color: active ? PALETTE3.warning : void 0, bold: active, children: value }),
25794
- active && /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.warning, children: "\u203A" })
25714
+ active && /* @__PURE__ */ jsx27(Text23, { color: PALETTE.warning, children: "\u2039" }),
25715
+ /* @__PURE__ */ jsx27(Text23, { color: active ? PALETTE.warning : void 0, bold: active, children: value }),
25716
+ active && /* @__PURE__ */ jsx27(Text23, { color: PALETTE.warning, children: "\u203A" })
25795
25717
  ] });
25796
25718
  }
25797
25719
  function Toggle({ value, active }) {
25798
- return /* @__PURE__ */ jsx27(Box21, { children: /* @__PURE__ */ jsx27(Text23, { color: active ? PALETTE3.warning : value ? PALETTE3.success : PALETTE3.border, children: value ? "[\u2713]" : "[ ]" }) });
25720
+ return /* @__PURE__ */ jsx27(Box21, { children: /* @__PURE__ */ jsx27(Text23, { color: active ? PALETTE.warning : value ? PALETTE.success : PALETTE.border, children: value ? "[\u2713]" : "[ ]" }) });
25799
25721
  }
25800
25722
  function InlinePropField({
25801
25723
  label,
@@ -25805,7 +25727,7 @@ function InlinePropField({
25805
25727
  width
25806
25728
  }) {
25807
25729
  return /* @__PURE__ */ jsxs22(Box21, { width, gap: 1, flexShrink: flexible ? 1 : 0, flexGrow: flexible ? 1 : 0, flexWrap: "wrap", children: [
25808
- /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE3.warning : PALETTE3.muted, bold: focused, wrap: "truncate-end", children: [
25730
+ /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, wrap: "truncate-end", children: [
25809
25731
  focused ? "\u203A " : " ",
25810
25732
  label
25811
25733
  ] }),
@@ -25826,7 +25748,7 @@ function DefaultValueRow({
25826
25748
  focused
25827
25749
  }) {
25828
25750
  return /* @__PURE__ */ jsxs22(Box21, { gap: 1, flexWrap: "wrap", flexShrink: 0, children: [
25829
- /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE3.warning : PALETTE3.muted, bold: focused, children: [
25751
+ /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, children: [
25830
25752
  focused ? "\u203A " : " ",
25831
25753
  "default:"
25832
25754
  ] }),
@@ -25841,7 +25763,7 @@ function RowLabel({
25841
25763
  return /* @__PURE__ */ jsxs22(
25842
25764
  Text23,
25843
25765
  {
25844
- color: selected ? PALETTE3.inverse : PALETTE3.info,
25766
+ color: selected ? PALETTE.text : PALETTE.accent,
25845
25767
  bold: selected,
25846
25768
  backgroundColor: selected ? "blue" : void 0,
25847
25769
  wrap: "truncate-end",
@@ -25859,7 +25781,7 @@ function ValueInputRow({
25859
25781
  cursorVisible
25860
25782
  }) {
25861
25783
  return /* @__PURE__ */ jsxs22(Box21, { paddingLeft: 2, children: [
25862
- /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.info, children: mode === "edit" ? "\u270E " : "+ " }),
25784
+ /* @__PURE__ */ jsx27(Text23, { color: PALETTE.accent, children: mode === "edit" ? "\u270E " : "+ " }),
25863
25785
  /* @__PURE__ */ jsx27(Text23, { children: valueText }),
25864
25786
  /* @__PURE__ */ jsx27(Text23, { inverse: cursorVisible, children: " " })
25865
25787
  ] });
@@ -25876,7 +25798,7 @@ function EditableListItem({
25876
25798
  if (isBeingEdited) {
25877
25799
  return /* @__PURE__ */ jsx27(ValueInputRow, { mode: "edit", valueText, cursorVisible });
25878
25800
  }
25879
- return /* @__PURE__ */ jsx27(Box21, { gap: 1, paddingLeft: 2, children: /* @__PURE__ */ jsx27(Text23, { color: active ? PALETTE3.info : void 0, children: active ? `${figures5.pointer} ${value}` : ` ${value}` }) });
25801
+ return /* @__PURE__ */ jsx27(Box21, { gap: 1, paddingLeft: 2, children: /* @__PURE__ */ jsx27(Text23, { color: active ? PALETTE.accent : void 0, children: active ? `${figures5.pointer} ${value}` : ` ${value}` }) });
25880
25802
  }
25881
25803
  function EditableValueList({
25882
25804
  values,
@@ -25890,7 +25812,7 @@ function EditableValueList({
25890
25812
  showAddInput
25891
25813
  }) {
25892
25814
  return /* @__PURE__ */ jsxs22(Fragment5, { children: [
25893
- values.length === 0 && !editingValue && (emptyPaddingLeft === void 0 ? /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, children: emptyMessage }) : /* @__PURE__ */ jsx27(Box21, { paddingLeft: emptyPaddingLeft, children: /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, children: emptyMessage }) })),
25815
+ values.length === 0 && !editingValue && (emptyPaddingLeft === void 0 ? /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: emptyMessage }) : /* @__PURE__ */ jsx27(Box21, { paddingLeft: emptyPaddingLeft, children: /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: emptyMessage }) })),
25894
25816
  values.map((value, index) => /* @__PURE__ */ jsx27(
25895
25817
  EditableListItem,
25896
25818
  {
@@ -25916,11 +25838,11 @@ function DefaultSubRow({
25916
25838
  const cursor = cursorVisible ? "\u2588" : " ";
25917
25839
  if (prop.type === "richtext" || prop.type === "media" || prop.type === "link") {
25918
25840
  return /* @__PURE__ */ jsxs22(Box21, { gap: 1, flexShrink: 0, children: [
25919
- /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE3.warning : PALETTE3.muted, bold: focused, children: [
25841
+ /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, children: [
25920
25842
  focused ? "\u203A " : " ",
25921
25843
  "default:"
25922
25844
  ] }),
25923
- /* @__PURE__ */ jsx27(Text23, { color: focused ? void 0 : PALETTE3.muted, children: "(not applicable)" })
25845
+ /* @__PURE__ */ jsx27(Text23, { color: focused ? void 0 : PALETTE.muted, children: "(not applicable)" })
25924
25846
  ] });
25925
25847
  }
25926
25848
  if (prop.type === "boolean") {
@@ -25930,11 +25852,11 @@ function DefaultSubRow({
25930
25852
  if (prop.type === "enum") {
25931
25853
  if (prop.values.length === 0) {
25932
25854
  return /* @__PURE__ */ jsxs22(Box21, { gap: 1, flexShrink: 0, children: [
25933
- /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE3.warning : PALETTE3.muted, bold: focused, children: [
25855
+ /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, children: [
25934
25856
  focused ? "\u203A " : " ",
25935
25857
  "default:"
25936
25858
  ] }),
25937
- /* @__PURE__ */ jsx27(Text23, { color: focused ? void 0 : PALETTE3.muted, children: "(no values defined)" })
25859
+ /* @__PURE__ */ jsx27(Text23, { color: focused ? void 0 : PALETTE.muted, children: "(no values defined)" })
25938
25860
  ] });
25939
25861
  }
25940
25862
  const display = typeof prop.default === "string" && prop.default !== "" ? prop.default : "(unset)";
@@ -25943,11 +25865,11 @@ function DefaultSubRow({
25943
25865
  const value = typeof prop.default === "string" ? prop.default : "";
25944
25866
  if (active) {
25945
25867
  return /* @__PURE__ */ jsxs22(Box21, { flexDirection: "row", flexShrink: 0, children: [
25946
- /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE3.warning : PALETTE3.muted, bold: focused, children: [
25868
+ /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, children: [
25947
25869
  focused ? "\u203A " : " ",
25948
25870
  "default:"
25949
25871
  ] }),
25950
- /* @__PURE__ */ jsxs22(Box21, { flexGrow: 1, borderStyle: "round", borderColor: PALETTE3.warning, paddingX: 1, children: [
25872
+ /* @__PURE__ */ jsxs22(Box21, { flexGrow: 1, borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
25951
25873
  /* @__PURE__ */ jsx27(Text23, { children: value.slice(0, textCursor) }),
25952
25874
  /* @__PURE__ */ jsx27(Text23, { inverse: cursorVisible, children: value[textCursor] ?? cursor }),
25953
25875
  /* @__PURE__ */ jsx27(Text23, { children: value.slice(textCursor + 1) })
@@ -25955,11 +25877,11 @@ function DefaultSubRow({
25955
25877
  ] });
25956
25878
  }
25957
25879
  return /* @__PURE__ */ jsxs22(Box21, { gap: 1, flexShrink: 0, children: [
25958
- /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE3.warning : PALETTE3.muted, bold: focused, children: [
25880
+ /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, children: [
25959
25881
  focused ? "\u203A " : " ",
25960
25882
  "default:"
25961
25883
  ] }),
25962
- /* @__PURE__ */ jsx27(Text23, { color: focused || value ? void 0 : PALETTE3.muted, children: value || "(none)" })
25884
+ /* @__PURE__ */ jsx27(Text23, { color: focused || value ? void 0 : PALETTE.muted, children: value || "(none)" })
25963
25885
  ] });
25964
25886
  }
25965
25887
  function DescriptionField({
@@ -25975,15 +25897,15 @@ function DescriptionField({
25975
25897
  }) {
25976
25898
  if (compact) {
25977
25899
  return /* @__PURE__ */ jsxs22(Box21, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: [
25978
- /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE3.warning : PALETTE3.muted, bold: focused, children: [
25900
+ /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, children: [
25979
25901
  focused ? "\u203A " : " ",
25980
25902
  label
25981
25903
  ] }),
25982
- /* @__PURE__ */ jsx27(Text23, { wrap: "truncate-end", color: value ? void 0 : PALETTE3.muted, children: value || "\u2014" })
25904
+ /* @__PURE__ */ jsx27(Text23, { wrap: "truncate-end", color: value ? void 0 : PALETTE.muted, children: value || "\u2014" })
25983
25905
  ] });
25984
25906
  }
25985
25907
  return /* @__PURE__ */ jsxs22(Box21, { paddingLeft, flexDirection: "column", width, flexShrink: 0, children: [
25986
- /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE3.warning : PALETTE3.muted, bold: focused, children: [
25908
+ /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, children: [
25987
25909
  focused ? "\u203A " : " ",
25988
25910
  label
25989
25911
  ] }),
@@ -26047,7 +25969,7 @@ function PropRow({
26047
25969
  ] }),
26048
25970
  prop.type === "token" && /* @__PURE__ */ jsx27(InlinePropField, { label: "kind:", focused: activeField === "tokenKind", width, children: editingField && activeField === "tokenKind" ? /* @__PURE__ */ jsx27(Picker, { value: prop.tokenKind || DESIGN_TOKEN_TYPES2[0], active: true }) : /* @__PURE__ */ jsx27(Text23, { wrap: "wrap", children: prop.tokenKind || "\u2014" }) }),
26049
25971
  prop.type === "enum" && /* @__PURE__ */ jsxs22(Box21, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: [
26050
- /* @__PURE__ */ jsxs22(Text23, { color: activeField === "values" ? PALETTE3.warning : PALETTE3.muted, bold: activeField === "values", children: [
25972
+ /* @__PURE__ */ jsxs22(Text23, { color: activeField === "values" ? PALETTE.warning : PALETTE.muted, bold: activeField === "values", children: [
26051
25973
  activeField === "values" ? "\u203A " : " ",
26052
25974
  "values:"
26053
25975
  ] }),
@@ -26068,27 +25990,27 @@ function PropRow({
26068
25990
  }
26069
25991
  ),
26070
25992
  prop.type === "token" && prop.category === "design" && /* @__PURE__ */ jsxs22(Box21, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: [
26071
- /* @__PURE__ */ jsxs22(Text23, { color: activeField === "allowed" ? PALETTE3.warning : PALETTE3.muted, bold: activeField === "allowed", children: [
25993
+ /* @__PURE__ */ jsxs22(Text23, { color: activeField === "allowed" ? PALETTE.warning : PALETTE.muted, bold: activeField === "allowed", children: [
26072
25994
  activeField === "allowed" ? "\u203A " : " ",
26073
25995
  "allowed:"
26074
25996
  ] }),
26075
- editingField && activeField === "allowed" ? /* @__PURE__ */ jsx27(Box21, { width: Math.max(1, width - 4), borderStyle: "round", borderColor: PALETTE3.warning, paddingX: 1, children: /* @__PURE__ */ jsx27(Text23, { children: "press [t] to edit allowed tokens" }) }) : /* @__PURE__ */ jsx27(
25997
+ editingField && activeField === "allowed" ? /* @__PURE__ */ jsx27(Box21, { width: Math.max(1, width - 4), borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: /* @__PURE__ */ jsx27(Text23, { children: "press [t] to edit allowed tokens" }) }) : /* @__PURE__ */ jsx27(
26076
25998
  Text23,
26077
25999
  {
26078
- color: activeField !== "allowed" && prop.allowed.length === 0 ? PALETTE3.muted : void 0,
26000
+ color: activeField !== "allowed" && prop.allowed.length === 0 ? PALETTE.muted : void 0,
26079
26001
  wrap: "wrap",
26080
26002
  children: prop.allowed.length > 0 ? prop.allowed.join(", ") : "(any)"
26081
26003
  }
26082
26004
  )
26083
26005
  ] }),
26084
- selected && showRationale && rationale && rationale.trim().length > 0 && /* @__PURE__ */ jsx27(Box21, { paddingLeft: 2, children: /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, children: (() => {
26006
+ selected && showRationale && rationale && rationale.trim().length > 0 && /* @__PURE__ */ jsx27(Box21, { paddingLeft: 2, children: /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: (() => {
26085
26007
  const max = Math.max(8, width - 8);
26086
26008
  const text = `~ ${rationale}`;
26087
26009
  return text.length > max ? text.slice(0, max - 1) + "\u2026" : text;
26088
26010
  })() }) }, rowKey ? `rationale-${rowKey}` : void 0),
26089
26011
  selected && prop.type === "enum" && activeField === "values" && /* @__PURE__ */ jsxs22(Box21, { paddingLeft: 2, flexDirection: "column", children: [
26090
26012
  /* @__PURE__ */ jsxs22(Box21, { children: [
26091
- /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, children: "values:" }),
26013
+ /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: "values:" }),
26092
26014
  activeField === "values" && /* @__PURE__ */ jsx27(Text23, { children: " [a] add [e] edit [r] remove [\u2191\u2193] navigate [K/J] reorder" })
26093
26015
  ] }),
26094
26016
  /* @__PURE__ */ jsx27(
@@ -26149,7 +26071,7 @@ function SlotRow({
26149
26071
  /* @__PURE__ */ jsxs22(
26150
26072
  Text23,
26151
26073
  {
26152
- color: activeField === "allowedComponents" ? PALETTE3.warning : PALETTE3.muted,
26074
+ color: activeField === "allowedComponents" ? PALETTE.warning : PALETTE.muted,
26153
26075
  bold: activeField === "allowedComponents",
26154
26076
  children: [
26155
26077
  activeField === "allowedComponents" ? "\u203A " : " ",
@@ -26157,14 +26079,14 @@ function SlotRow({
26157
26079
  ]
26158
26080
  }
26159
26081
  ),
26160
- slot.allowedComponents.length === 0 ? /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, children: "(any)" }) : /* @__PURE__ */ jsx27(Text23, { wrap: "wrap", children: slot.allowedComponents.join(", ") })
26082
+ slot.allowedComponents.length === 0 ? /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: "(any)" }) : /* @__PURE__ */ jsx27(Text23, { wrap: "wrap", children: slot.allowedComponents.join(", ") })
26161
26083
  ] }),
26162
26084
  selected && editingField && activeField === "allowedComponents" && /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", children: [
26163
26085
  /* @__PURE__ */ jsxs22(Box21, { children: [
26164
26086
  /* @__PURE__ */ jsxs22(
26165
26087
  Text23,
26166
26088
  {
26167
- color: activeField === "allowedComponents" ? PALETTE3.warning : PALETTE3.muted,
26089
+ color: activeField === "allowedComponents" ? PALETTE.warning : PALETTE.muted,
26168
26090
  bold: activeField === "allowedComponents",
26169
26091
  children: [
26170
26092
  activeField === "allowedComponents" ? "\u203A " : " ",
@@ -26172,7 +26094,7 @@ function SlotRow({
26172
26094
  ]
26173
26095
  }
26174
26096
  ),
26175
- editingField && activeField === "allowedComponents" && /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, children: slot.allowedComponents.length > 0 ? " [a] add [e] edit [r] remove [\u2190\u2192] cycle [\u2191\u2193] navigate [K/J] reorder" : " [a] add [e] edit [r] remove [\u2191\u2193] navigate [K/J] reorder" })
26097
+ editingField && activeField === "allowedComponents" && /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: slot.allowedComponents.length > 0 ? " [a] add [e] edit [r] remove [\u2190\u2192] cycle [\u2191\u2193] navigate [K/J] reorder" : " [a] add [e] edit [r] remove [\u2191\u2193] navigate [K/J] reorder" })
26176
26098
  ] }),
26177
26099
  /* @__PURE__ */ jsx27(
26178
26100
  EditableValueList,
@@ -26188,21 +26110,21 @@ function SlotRow({
26188
26110
  showAddInput: editingField && activeField === "allowedComponents"
26189
26111
  }
26190
26112
  ),
26191
- editingField && editingValue?.mode === "add" && activeField === "allowedComponents" && pickerCandidates !== null && /* @__PURE__ */ jsx27(Box21, { paddingLeft: 2, flexDirection: "column", children: pickerCandidates.length === 0 ? /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, children: "(no valid components to add \u2014 all remaining candidates would create cycles)" }) : (() => {
26113
+ editingField && editingValue?.mode === "add" && activeField === "allowedComponents" && pickerCandidates !== null && /* @__PURE__ */ jsx27(Box21, { paddingLeft: 2, flexDirection: "column", children: pickerCandidates.length === 0 ? /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: "(no valid components to add \u2014 all remaining candidates would create cycles)" }) : (() => {
26192
26114
  const filtered = valueText.length === 0 ? pickerCandidates : pickerCandidates.filter((n) => n.toLowerCase().includes(valueText.toLowerCase()));
26193
26115
  if (filtered.length === 0) {
26194
- return /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, children: "(no candidates match \u2014 Enter to add as free text)" });
26116
+ return /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: "(no candidates match \u2014 Enter to add as free text)" });
26195
26117
  }
26196
26118
  const cursor = pickerCursor % filtered.length;
26197
26119
  const MAX_VISIBLE = 5;
26198
26120
  const start = Math.max(0, Math.min(filtered.length - MAX_VISIBLE, cursor - 2));
26199
26121
  const slice = filtered.slice(start, start + MAX_VISIBLE);
26200
26122
  return /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", children: [
26201
- /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, children: " candidates (\u2191\u2193 cycle, Enter to add):" }),
26123
+ /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: " candidates (\u2191\u2193 cycle, Enter to add):" }),
26202
26124
  slice.map((name, i) => {
26203
26125
  const absIdx = start + i;
26204
26126
  const isCursor = absIdx === cursor;
26205
- return /* @__PURE__ */ jsx27(Text23, { color: isCursor ? PALETTE3.info : PALETTE3.muted, children: isCursor ? ` ${figures5.pointer} ${name}` : ` ${name}` }, name);
26127
+ return /* @__PURE__ */ jsx27(Text23, { color: isCursor ? PALETTE.accent : PALETTE.muted, children: isCursor ? ` ${figures5.pointer} ${name}` : ` ${name}` }, name);
26206
26128
  })
26207
26129
  ] });
26208
26130
  })() })
@@ -27030,18 +26952,18 @@ function FieldEditor({
27030
26952
  });
27031
26953
  const innerWidth = Math.max(1, width - 2);
27032
26954
  if (parseErr) {
27033
- return /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", width, borderStyle: "single", borderColor: PALETTE3.error, children: [
27034
- /* @__PURE__ */ jsx27(Text23, { bold: true, color: PALETTE3.error, children: "FIELD EDITOR \u2014 parse error" }),
27035
- /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.error, children: parseErr }),
27036
- /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, children: "Cannot display structured editor. Fix the JSON first." })
26955
+ return /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", width, borderStyle: "single", borderColor: PALETTE.error, children: [
26956
+ /* @__PURE__ */ jsx27(Text23, { bold: true, color: PALETTE.error, children: "FIELD EDITOR \u2014 parse error" }),
26957
+ /* @__PURE__ */ jsx27(Text23, { color: PALETTE.error, children: parseErr }),
26958
+ /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: "Cannot display structured editor. Fix the JSON first." })
27037
26959
  ] });
27038
26960
  }
27039
26961
  if (props.length === 0 && slots.length === 0) {
27040
- return /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", width, borderStyle: "single", borderColor: PALETTE3.warning, children: [
27041
- /* @__PURE__ */ jsx27(Text23, { bold: true, color: PALETTE3.warning, children: "FIELD EDITOR \u2014 no fields" }),
27042
- /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.warning, children: "\u26A0 No properties classified for this component. The LLM didn't find anything to classify." }),
27043
- /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, children: "You can add fields manually below or reject this component." }),
27044
- /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, children: "Enter to save \xB7 Esc to discard" })
26962
+ return /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", width, borderStyle: "single", borderColor: PALETTE.warning, children: [
26963
+ /* @__PURE__ */ jsx27(Text23, { bold: true, color: PALETTE.warning, children: "FIELD EDITOR \u2014 no fields" }),
26964
+ /* @__PURE__ */ jsx27(Text23, { color: PALETTE.warning, children: "\u26A0 No properties classified for this component. The LLM didn't find anything to classify." }),
26965
+ /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: "You can add fields manually below or reject this component." }),
26966
+ /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: "Enter to save \xB7 Esc to discard" })
27045
26967
  ] });
27046
26968
  }
27047
26969
  const hasEmptyProperties = props.length === 0 && slots.length === 0;
@@ -27170,7 +27092,7 @@ function FieldEditor({
27170
27092
  const renderRow = (row, index) => {
27171
27093
  const key = rowKey(row, index);
27172
27094
  if (row.kind === "header") {
27173
- return /* @__PURE__ */ jsx27(Box21, { flexDirection: "column", paddingTop: 1, children: /* @__PURE__ */ jsx27(Text23, { bold: true, color: PALETTE3.success, children: row.label }) }, key);
27095
+ return /* @__PURE__ */ jsx27(Box21, { flexDirection: "column", paddingTop: 1, children: /* @__PURE__ */ jsx27(Text23, { bold: true, color: PALETTE.success, children: row.label }) }, key);
27174
27096
  }
27175
27097
  if (row.kind === "component-description") {
27176
27098
  const isSelected2 = inComponentDesc && active;
@@ -27252,9 +27174,9 @@ function FieldEditor({
27252
27174
  ...fixedHeight ? { height } : { minHeight: height },
27253
27175
  clipOverflow: fixedHeight,
27254
27176
  borderStyle: "single",
27255
- borderColor: hasEmptyProperties ? PALETTE3.warning : active ? PALETTE3.info : PALETTE3.border,
27177
+ borderColor: hasEmptyProperties ? PALETTE.warning : active ? PALETTE.accent : PALETTE.border,
27256
27178
  children: [
27257
- hasEmptyProperties && /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.warning, children: "\u26A0 No properties classified for this component. The LLM didn't find anything to classify. Reject this component or add fields manually." }),
27179
+ hasEmptyProperties && /* @__PURE__ */ jsx27(Text23, { 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." }),
27258
27180
  header,
27259
27181
  /* @__PURE__ */ jsx27(Box21, { flexDirection: "column", width: innerWidth, flexShrink: 0, children: focusLevel === "field" && !inComponentDesc && currentProp ? /* @__PURE__ */ jsx27(
27260
27182
  PropRow,
@@ -27305,7 +27227,7 @@ function FieldEditor({
27305
27227
  `visible-${key}`
27306
27228
  );
27307
27229
  }) }),
27308
- categoryBelow && /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.success, bold: true, children: `(${categoryBelow} below)` }),
27230
+ categoryBelow && /* @__PURE__ */ jsx27(Text23, { color: PALETTE.success, bold: true, children: `(${categoryBelow} below)` }),
27309
27231
  sourceOpen && !onToggleSourceExternal && (() => {
27310
27232
  const propMeta = !inSlots && !inComponentDesc && currentProp ? metadata?.props?.[currentProp.name] : void 0;
27311
27233
  const start = propMeta?.sourceStartLine ?? null;
@@ -27315,20 +27237,20 @@ function FieldEditor({
27315
27237
  const headerPath = path5 ?? "<unknown source path>";
27316
27238
  if (!start || !end2 || !src) {
27317
27239
  return /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", borderStyle: "single", borderColor: "gray", paddingX: 1, children: [
27318
- /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, bold: true, children: `source: ${headerPath}` }),
27319
- /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, children: "(no source location captured for this prop)" }),
27240
+ /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, bold: true, children: `source: ${headerPath}` }),
27241
+ /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: "(no source location captured for this prop)" }),
27320
27242
  /* @__PURE__ */ jsx27(Text23, { children: "[s] close" })
27321
27243
  ] });
27322
27244
  }
27323
27245
  const lines = src.split("\n").slice(Math.max(0, start - 1), end2);
27324
27246
  return /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", borderStyle: "single", borderColor: "gray", paddingX: 1, children: [
27325
- /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, bold: true, children: `${headerPath}: lines ${start}\u2013${end2}` }),
27326
- lines.map((ln, i) => /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, children: ln }, `source-line-${i}`)),
27247
+ /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, bold: true, children: `${headerPath}: lines ${start}\u2013${end2}` }),
27248
+ lines.map((ln, i) => /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: ln }, `source-line-${i}`)),
27327
27249
  /* @__PURE__ */ jsx27(Text23, { children: "[s] close \xB7 [Esc] close" })
27328
27250
  ] });
27329
27251
  })(),
27330
- showHelp && /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE3.info, paddingX: 1, children: [
27331
- /* @__PURE__ */ jsx27(Text23, { bold: true, color: PALETTE3.info, children: "Keybindings" }),
27252
+ showHelp && /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.accent, paddingX: 1, children: [
27253
+ /* @__PURE__ */ jsx27(Text23, { bold: true, color: PALETTE.accent, children: "Keybindings" }),
27332
27254
  /* @__PURE__ */ jsx27(Text23, { children: " " }),
27333
27255
  /* @__PURE__ */ jsx27(Text23, { bold: true, children: "Row navigation" }),
27334
27256
  /* @__PURE__ */ jsx27(Text23, { children: " \u2191/\u2193 move between rows" }),
@@ -27353,10 +27275,10 @@ function FieldEditor({
27353
27275
  /* @__PURE__ */ jsx27(Text23, { children: " " + componentRationaleKey.padEnd(16) + " toggle component rationale panel" }),
27354
27276
  /* @__PURE__ */ jsx27(Text23, { children: " ? toggle this overlay" }),
27355
27277
  /* @__PURE__ */ jsx27(Text23, { children: " " }),
27356
- /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, children: "press ? or Esc to close" })
27278
+ /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: "press ? or Esc to close" })
27357
27279
  ] }),
27358
- validationError && /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.error, children: "\u2717 " + validationError }),
27359
- /* @__PURE__ */ jsx27(Box21, { paddingTop: 1, children: /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, children: modeLabel }) })
27280
+ validationError && /* @__PURE__ */ jsx27(Text23, { color: PALETTE.error, children: "\u2717 " + validationError }),
27281
+ /* @__PURE__ */ jsx27(Box21, { paddingTop: 1, children: /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: modeLabel }) })
27360
27282
  ]
27361
27283
  }
27362
27284
  );
@@ -27365,7 +27287,7 @@ var SLOT_FIELDS;
27365
27287
  var init_FieldEditor = __esm({
27366
27288
  "packages/experience-design-system-cli/src/tui/import/steps/09-review/components/FieldEditor.tsx"() {
27367
27289
  "use strict";
27368
- init_theme3();
27290
+ init_theme();
27369
27291
  init_src5();
27370
27292
  init_useImmediateInput();
27371
27293
  init_scroll_offset();
@@ -27420,21 +27342,21 @@ function RationaleLine({ line, active }) {
27420
27342
  return /* @__PURE__ */ jsx28(Box22, { children: /* @__PURE__ */ jsx28(Text24, { children: " " }) });
27421
27343
  }
27422
27344
  if (line.kind === "heading") {
27423
- return /* @__PURE__ */ jsx28(Box22, { children: /* @__PURE__ */ jsx28(Text24, { bold: true, color: active ? PALETTE3.info : PALETTE3.muted, children: line.text }) });
27345
+ return /* @__PURE__ */ jsx28(Box22, { children: /* @__PURE__ */ jsx28(Text24, { bold: true, color: active ? PALETTE.accent : PALETTE.muted, children: line.text }) });
27424
27346
  }
27425
27347
  if (line.kind === "label") {
27426
27348
  return /* @__PURE__ */ jsxs23(Box22, { children: [
27427
27349
  line.prefix && /* @__PURE__ */ jsx28(Text24, { children: line.prefix }),
27428
- /* @__PURE__ */ jsx28(Text24, { bold: true, color: active ? line.color : PALETTE3.muted, children: line.text }),
27429
- line.suffix && /* @__PURE__ */ jsx28(Text24, { color: PALETTE3.muted, children: line.suffix })
27350
+ /* @__PURE__ */ jsx28(Text24, { bold: true, color: active ? line.color : PALETTE.muted, children: line.text }),
27351
+ line.suffix && /* @__PURE__ */ jsx28(Text24, { color: PALETTE.muted, children: line.suffix })
27430
27352
  ] });
27431
27353
  }
27432
- return /* @__PURE__ */ jsx28(Box22, { children: /* @__PURE__ */ jsx28(Text24, { color: !active || line.dim ? PALETTE3.muted : void 0, children: line.text }) });
27354
+ return /* @__PURE__ */ jsx28(Box22, { children: /* @__PURE__ */ jsx28(Text24, { color: !active || line.dim ? PALETTE.muted : void 0, children: line.text }) });
27433
27355
  }
27434
27356
  var init_RationaleLine = __esm({
27435
27357
  "packages/experience-design-system-cli/src/tui/import/steps/09-review/components/RationaleLine.tsx"() {
27436
27358
  "use strict";
27437
- init_theme3();
27359
+ init_theme();
27438
27360
  }
27439
27361
  });
27440
27362
 
@@ -27514,9 +27436,9 @@ function ComponentRationalePanel({
27514
27436
  width,
27515
27437
  height: height + 2,
27516
27438
  borderStyle: "single",
27517
- borderColor: active ? PALETTE3.inverse : void 0,
27439
+ borderColor: active ? PALETTE.text : void 0,
27518
27440
  children: [
27519
- /* @__PURE__ */ jsx29(Box23, { children: /* @__PURE__ */ jsx29(Text25, { bold: true, color: active ? void 0 : PALETTE3.muted, children: `Component rationale: ${data.name}` }) }),
27441
+ /* @__PURE__ */ jsx29(Box23, { children: /* @__PURE__ */ jsx29(Text25, { bold: true, color: active ? void 0 : PALETTE.muted, children: `Component rationale: ${data.name}` }) }),
27520
27442
  visible.map((line, i) => /* @__PURE__ */ jsx29(RationaleLine, { line, active }, i)),
27521
27443
  /* @__PURE__ */ jsx29(Box23, { children: overflowed ? /* @__PURE__ */ jsx29(Text25, { children: `${visibleStart}-${visibleEnd}/${totalLines} [\u2191\u2193] scroll [I/Esc] close` }) : /* @__PURE__ */ jsx29(Text25, { children: "[I/Esc] close" }) })
27522
27444
  ]
@@ -27527,7 +27449,7 @@ var PLACEHOLDER;
27527
27449
  var init_ComponentRationalePanel = __esm({
27528
27450
  "packages/experience-design-system-cli/src/tui/import/steps/09-review/components/ComponentRationalePanel.tsx"() {
27529
27451
  "use strict";
27530
- init_theme3();
27452
+ init_theme();
27531
27453
  init_wrap_text();
27532
27454
  init_RationaleLine();
27533
27455
  PLACEHOLDER = "(no rationale captured)";
@@ -27538,12 +27460,12 @@ var init_ComponentRationalePanel = __esm({
27538
27460
  import { Text as Text26 } from "ink";
27539
27461
  import { Fragment as Fragment6, jsx as jsx30 } from "react/jsx-runtime";
27540
27462
  function HighlightedLine({ parts }) {
27541
- return /* @__PURE__ */ jsx30(Fragment6, { children: parts.map((part, i) => /* @__PURE__ */ jsx30(Text26, { color: part.dim ? PALETTE3.muted : part.color, children: part.text }, i)) });
27463
+ return /* @__PURE__ */ jsx30(Fragment6, { children: parts.map((part, i) => /* @__PURE__ */ jsx30(Text26, { color: part.dim ? PALETTE.muted : part.color, children: part.text }, i)) });
27542
27464
  }
27543
27465
  var init_HighlightedLine = __esm({
27544
27466
  "packages/experience-design-system-cli/src/tui/import/steps/09-review/components/HighlightedLine.tsx"() {
27545
27467
  "use strict";
27546
- init_theme3();
27468
+ init_theme();
27547
27469
  }
27548
27470
  });
27549
27471
 
@@ -27564,10 +27486,10 @@ function ScrollablePanel({
27564
27486
  const overflowed = totalLines > height;
27565
27487
  return /* @__PURE__ */ jsxs25(Box24, { flexDirection: "column", width, height: height + 2, borderStyle: "single", borderColor, children: [
27566
27488
  /* @__PURE__ */ jsxs25(Box24, { children: [
27567
- /* @__PURE__ */ jsx31(Text27, { bold: true, color: active ? void 0 : PALETTE3.muted, children: title }),
27489
+ /* @__PURE__ */ jsx31(Text27, { bold: true, color: active ? void 0 : PALETTE.muted, children: title }),
27568
27490
  overflowed && /* @__PURE__ */ jsxs25(Fragment7, { children: [
27569
27491
  /* @__PURE__ */ jsx31(Box24, { flexGrow: 1 }),
27570
- /* @__PURE__ */ jsx31(Text27, { color: active ? void 0 : PALETTE3.muted, children: `\u2195 ${visibleStart}-${visibleEnd}/${totalLines}` })
27492
+ /* @__PURE__ */ jsx31(Text27, { color: active ? void 0 : PALETTE.muted, children: `\u2195 ${visibleStart}-${visibleEnd}/${totalLines}` })
27571
27493
  ] })
27572
27494
  ] }),
27573
27495
  children
@@ -27576,7 +27498,7 @@ function ScrollablePanel({
27576
27498
  var init_ScrollablePanel = __esm({
27577
27499
  "packages/experience-design-system-cli/src/tui/import/steps/09-review/components/ScrollablePanel.tsx"() {
27578
27500
  "use strict";
27579
- init_theme3();
27501
+ init_theme();
27580
27502
  }
27581
27503
  });
27582
27504
 
@@ -27667,7 +27589,7 @@ function renderRationaleLines(rows, innerWidth) {
27667
27589
  out.push({
27668
27590
  kind: "label",
27669
27591
  text: row.name,
27670
- color: PALETTE3.info,
27592
+ color: PALETTE.accent,
27671
27593
  suffix: row.kind === "slot" ? " (slot)" : void 0
27672
27594
  });
27673
27595
  for (const line of wrapText(row.rationale, innerWidth)) {
@@ -27703,7 +27625,7 @@ function RationalePanel({
27703
27625
  totalLines,
27704
27626
  visibleStart,
27705
27627
  visibleEnd,
27706
- borderColor: active ? PALETTE3.inverse : void 0,
27628
+ borderColor: active ? PALETTE.text : void 0,
27707
27629
  children: visible.map((line, i) => /* @__PURE__ */ jsx33(RationaleLine, { line, active }, i))
27708
27630
  }
27709
27631
  );
@@ -27711,7 +27633,7 @@ function RationalePanel({
27711
27633
  var init_RationalePanel = __esm({
27712
27634
  "packages/experience-design-system-cli/src/tui/import/steps/09-review/components/RationalePanel.tsx"() {
27713
27635
  "use strict";
27714
- init_theme3();
27636
+ init_theme();
27715
27637
  init_wrap_text();
27716
27638
  init_RationaleLine();
27717
27639
  init_ScrollablePanel();
@@ -27747,21 +27669,29 @@ function TokenReviewPanel({
27747
27669
  width,
27748
27670
  height: height + 2,
27749
27671
  borderStyle: "single",
27750
- borderColor: active ? PALETTE3.inverse : void 0,
27672
+ borderColor: active ? PALETTE.text : void 0,
27751
27673
  children: [
27752
- /* @__PURE__ */ jsx34(Text28, { bold: true, color: active ? void 0 : PALETTE3.muted, wrap: "truncate", children: `TOKEN REVIEW \u2014 ${componentName} \xB7 ${current.propName} (edit allowed)` }),
27753
- /* @__PURE__ */ jsx34(Text28, { color: PALETTE3.muted, wrap: "truncate", children: `select which tokens are allowed (${rangeLabel})` }),
27674
+ /* @__PURE__ */ jsx34(Text28, { bold: true, color: active ? void 0 : PALETTE.muted, wrap: "truncate", children: `TOKEN REVIEW \u2014 ${componentName} \xB7 ${current.propName} (edit allowed)` }),
27675
+ /* @__PURE__ */ jsx34(Text28, { color: PALETTE.muted, wrap: "truncate", children: `select which tokens are allowed (${rangeLabel})` }),
27754
27676
  /* @__PURE__ */ jsx34(Text28, { children: " " }),
27755
- current.paths.length === 0 && /* @__PURE__ */ jsx34(Text28, { color: PALETTE3.muted, children: "(no compatible tokens found for this token kind)" }),
27677
+ current.paths.length === 0 && /* @__PURE__ */ jsx34(Text28, { color: PALETTE.muted, children: "(no compatible tokens found for this token kind)" }),
27756
27678
  visiblePaths.map((path5, i) => {
27757
27679
  const pathIndex = scrollStart + i;
27758
27680
  const checked = editSelection.has(path5);
27759
27681
  const focused = pathIndex === editCursor;
27760
- return /* @__PURE__ */ jsx34(Box26, { children: /* @__PURE__ */ jsx34(Text28, { color: focused ? PALETTE3.info : active ? void 0 : PALETTE3.muted, bold: focused, wrap: "truncate", children: ` [${checked ? "x" : " "}] ${path5}` }) }, path5);
27682
+ return /* @__PURE__ */ jsx34(Box26, { children: /* @__PURE__ */ jsx34(
27683
+ Text28,
27684
+ {
27685
+ color: focused ? PALETTE.accent : active ? void 0 : PALETTE.muted,
27686
+ bold: focused,
27687
+ wrap: "truncate",
27688
+ children: ` [${checked ? "x" : " "}] ${path5}`
27689
+ }
27690
+ ) }, path5);
27761
27691
  }),
27762
27692
  /* @__PURE__ */ jsx34(Text28, { children: " " }),
27763
- /* @__PURE__ */ jsx34(Text28, { color: PALETTE3.muted, wrap: "truncate", children: "[\u2191/\u2193] move [Space] toggle" }),
27764
- /* @__PURE__ */ jsx34(Text28, { color: PALETTE3.muted, wrap: "truncate", children: "[Ctrl+S] save [Esc] cancel" })
27693
+ /* @__PURE__ */ jsx34(Text28, { color: PALETTE.muted, wrap: "truncate", children: "[\u2191/\u2193] move [Space] toggle" }),
27694
+ /* @__PURE__ */ jsx34(Text28, { color: PALETTE.muted, wrap: "truncate", children: "[Ctrl+S] save [Esc] cancel" })
27765
27695
  ]
27766
27696
  }
27767
27697
  );
@@ -27773,16 +27703,16 @@ function TokenReviewPanel({
27773
27703
  width,
27774
27704
  height: height + 2,
27775
27705
  borderStyle: "single",
27776
- borderColor: active ? PALETTE3.inverse : void 0,
27706
+ borderColor: active ? PALETTE.text : void 0,
27777
27707
  children: [
27778
- /* @__PURE__ */ jsx34(Text28, { bold: true, color: active ? void 0 : PALETTE3.muted, children: `TOKEN REVIEW \u2014 ${componentName}` }),
27779
- suggestions.length === 0 && /* @__PURE__ */ jsx34(Text28, { color: PALETTE3.muted, children: "(no token suggestions for this component)" }),
27708
+ /* @__PURE__ */ jsx34(Text28, { bold: true, color: active ? void 0 : PALETTE.muted, children: `TOKEN REVIEW \u2014 ${componentName}` }),
27709
+ suggestions.length === 0 && /* @__PURE__ */ jsx34(Text28, { color: PALETTE.muted, children: "(no token suggestions for this component)" }),
27780
27710
  suggestions.map((s, i) => {
27781
27711
  const focused = i === selectedRow;
27782
27712
  return /* @__PURE__ */ jsxs26(Box26, { flexDirection: "column", children: [
27783
- /* @__PURE__ */ jsx34(Box26, { children: /* @__PURE__ */ jsx34(Text28, { color: focused ? PALETTE3.info : active ? void 0 : PALETTE3.muted, bold: focused, children: `${focused ? figures6.pointer : " "} ${s.propName}` }) }),
27784
- /* @__PURE__ */ jsx34(Text28, { color: PALETTE3.muted, children: ` suggested: ${s.suggested.join(", ")}` }),
27785
- /* @__PURE__ */ jsx34(Text28, { color: PALETTE3.muted, children: ` allowed: ${s.allowed.join(", ")}` })
27713
+ /* @__PURE__ */ jsx34(Box26, { children: /* @__PURE__ */ jsx34(Text28, { color: focused ? PALETTE.accent : active ? void 0 : PALETTE.muted, bold: focused, children: `${focused ? figures6.pointer : " "} ${s.propName}` }) }),
27714
+ /* @__PURE__ */ jsx34(Text28, { color: PALETTE.muted, children: ` suggested: ${s.suggested.join(", ")}` }),
27715
+ /* @__PURE__ */ jsx34(Text28, { color: PALETTE.muted, children: ` allowed: ${s.allowed.join(", ")}` })
27786
27716
  ] }, s.propName);
27787
27717
  }),
27788
27718
  /* @__PURE__ */ jsx34(Text28, { children: " " }),
@@ -27794,7 +27724,7 @@ function TokenReviewPanel({
27794
27724
  var init_TokenReviewPanel = __esm({
27795
27725
  "packages/experience-design-system-cli/src/tui/import/steps/09-review/components/TokenReviewPanel.tsx"() {
27796
27726
  "use strict";
27797
- init_theme3();
27727
+ init_theme();
27798
27728
  }
27799
27729
  });
27800
27730
 
@@ -27874,9 +27804,9 @@ function ReviewDetailsPanel({
27874
27804
  const sourceLineCount = Math.max(1, height - 4);
27875
27805
  const lines = source ? source.split("\n").slice(panelScrollOffset, panelScrollOffset + sourceLineCount) : [];
27876
27806
  return /* @__PURE__ */ jsxs27(FixedPanel, { width, height, borderStyle: "single", borderColor: sourceBorderColor, paddingLeft: 1, children: [
27877
- /* @__PURE__ */ jsx35(Text29, { color: PALETTE3.muted, bold: true, wrap: "truncate-end", children: `source: ${headerPath}` }),
27878
- source ? lines.map((line, index) => /* @__PURE__ */ jsx35(Text29, { color: PALETTE3.muted, wrap: "truncate-end", children: line }, `source-line-${index}`)) : /* @__PURE__ */ jsx35(Text29, { color: PALETTE3.muted, children: "(no source captured)" }),
27879
- /* @__PURE__ */ jsx35(Text29, { color: PALETTE3.muted, wrap: "truncate-end", children: "[s/Esc] close" })
27807
+ /* @__PURE__ */ jsx35(Text29, { color: PALETTE.muted, bold: true, wrap: "truncate-end", children: `source: ${headerPath}` }),
27808
+ source ? lines.map((line, index) => /* @__PURE__ */ jsx35(Text29, { color: PALETTE.muted, wrap: "truncate-end", children: line }, `source-line-${index}`)) : /* @__PURE__ */ jsx35(Text29, { color: PALETTE.muted, children: "(no source captured)" }),
27809
+ /* @__PURE__ */ jsx35(Text29, { color: PALETTE.muted, wrap: "truncate-end", children: "[s/Esc] close" })
27880
27810
  ] });
27881
27811
  }
27882
27812
  if (panelOpen === "token-review") {
@@ -27918,7 +27848,7 @@ var init_review_details_panel = __esm({
27918
27848
  init_RationalePanel();
27919
27849
  init_TokenReviewPanel();
27920
27850
  init_windowed_panel();
27921
- init_theme3();
27851
+ init_theme();
27922
27852
  }
27923
27853
  });
27924
27854
 
@@ -28045,17 +27975,17 @@ function ReviewEmptyComponentsWarning({
28045
27975
  hidden
28046
27976
  }) {
28047
27977
  if (hidden || count === 0) return null;
28048
- return /* @__PURE__ */ jsx37(Text30, { color: PALETTE3.warning, children: `\u26A0 ${count} component${count === 1 ? "" : "s"} had no classifiable props \u2014 review with care` });
27978
+ return /* @__PURE__ */ jsx37(Text30, { color: PALETTE.warning, children: `\u26A0 ${count} component${count === 1 ? "" : "s"} had no classifiable props \u2014 review with care` });
28049
27979
  }
28050
27980
  function ReviewNoSelection() {
28051
- return /* @__PURE__ */ jsx37(Box27, { flexGrow: 1, paddingLeft: 1, flexDirection: "column", children: /* @__PURE__ */ jsx37(Text30, { color: PALETTE3.muted, children: "No component selected" }) });
27981
+ return /* @__PURE__ */ jsx37(Box27, { flexGrow: 1, paddingLeft: 1, flexDirection: "column", children: /* @__PURE__ */ jsx37(Text30, { color: PALETTE.muted, children: "No component selected" }) });
28052
27982
  }
28053
27983
  function ReviewFinalizeError({
28054
27984
  message,
28055
27985
  hidden
28056
27986
  }) {
28057
27987
  if (hidden || !message) return null;
28058
- return /* @__PURE__ */ jsx37(Text30, { color: PALETTE3.error, children: `\u26A0 ${message}` });
27988
+ return /* @__PURE__ */ jsx37(Text30, { color: PALETTE.error, children: `\u26A0 ${message}` });
28059
27989
  }
28060
27990
  function ReviewPanelFooter({
28061
27991
  reviewEditor,
@@ -28079,7 +28009,7 @@ function ReviewComponentTitle({
28079
28009
  return /* @__PURE__ */ jsxs28(Box27, { paddingLeft: 2, paddingBottom: 1, children: [
28080
28010
  /* @__PURE__ */ jsx37(Text30, { bold: true, wrap: "truncate-end", children: selectedKey }),
28081
28011
  /* @__PURE__ */ jsx37(Box27, { flexGrow: 1 }),
28082
- /* @__PURE__ */ jsxs28(Text30, { color: PALETTE3.muted, wrap: "truncate-end", children: [
28012
+ /* @__PURE__ */ jsxs28(Text30, { color: PALETTE.muted, wrap: "truncate-end", children: [
28083
28013
  propCount,
28084
28014
  " prop",
28085
28015
  propCount !== 1 ? "s" : "",
@@ -28135,8 +28065,8 @@ function ReviewComponentPanel({
28135
28065
  )
28136
28066
  }
28137
28067
  ) }),
28138
- /* @__PURE__ */ jsx37(Box27, { width: contentWidth, height: 1, flexShrink: 0, children: /* @__PURE__ */ jsx37(Text30, { color: saveError ? PALETTE3.error : void 0, wrap: "truncate-end", children: saveError ? "\u2717 " + saveError : " " }) }),
28139
- /* @__PURE__ */ jsx37(Box27, { width: contentWidth, height: 1, flexShrink: 0, children: /* @__PURE__ */ jsx37(Text30, { color: PALETTE3.muted, wrap: "truncate-end", children: /* @__PURE__ */ jsx37(
28068
+ /* @__PURE__ */ jsx37(Box27, { width: contentWidth, height: 1, flexShrink: 0, children: /* @__PURE__ */ jsx37(Text30, { color: saveError ? PALETTE.error : void 0, wrap: "truncate-end", children: saveError ? "\u2717 " + saveError : " " }) }),
28069
+ /* @__PURE__ */ jsx37(Box27, { width: contentWidth, height: 1, flexShrink: 0, children: /* @__PURE__ */ jsx37(Text30, { color: PALETTE.muted, wrap: "truncate-end", children: /* @__PURE__ */ jsx37(
28140
28070
  ReviewPanelFooter,
28141
28071
  {
28142
28072
  reviewEditor,
@@ -28151,7 +28081,7 @@ function ReviewComponentPanel({
28151
28081
  var init_ReviewComponentPanel = __esm({
28152
28082
  "packages/experience-design-system-cli/src/tui/import/steps/09-review/components/ReviewComponentPanel.tsx"() {
28153
28083
  "use strict";
28154
- init_theme3();
28084
+ init_theme();
28155
28085
  init_review_json_panel();
28156
28086
  init_ReviewDetailsEditor();
28157
28087
  init_windowed_panel();
@@ -28173,11 +28103,11 @@ function countReviewStatuses(entries) {
28173
28103
  );
28174
28104
  }
28175
28105
  function ReviewLoadingState() {
28176
- return /* @__PURE__ */ jsx38(Box28, { paddingX: 2, paddingY: 1, children: /* @__PURE__ */ jsx38(Text31, { color: PALETTE3.muted, children: "Loading generated definitions..." }) });
28106
+ return /* @__PURE__ */ jsx38(Box28, { paddingX: 2, paddingY: 1, children: /* @__PURE__ */ jsx38(Text31, { color: PALETTE.muted, children: "Loading generated definitions..." }) });
28177
28107
  }
28178
28108
  function ReviewLoadError({ message }) {
28179
28109
  return /* @__PURE__ */ jsxs29(Box28, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
28180
- /* @__PURE__ */ jsx38(Text31, { color: PALETTE3.error, children: message }),
28110
+ /* @__PURE__ */ jsx38(Text31, { color: PALETTE.error, children: message }),
28181
28111
  /* @__PURE__ */ jsx38(Text31, { children: " " }),
28182
28112
  /* @__PURE__ */ jsx38(Text31, { children: "[q / Enter / Esc] Quit" })
28183
28113
  ] });
@@ -28185,7 +28115,7 @@ function ReviewLoadError({ message }) {
28185
28115
  var init_ReviewStatus = __esm({
28186
28116
  "packages/experience-design-system-cli/src/tui/import/steps/09-review/components/ReviewStatus.tsx"() {
28187
28117
  "use strict";
28188
- init_theme3();
28118
+ init_theme();
28189
28119
  }
28190
28120
  });
28191
28121
 
@@ -28435,41 +28365,41 @@ function FinalizeDialog({
28435
28365
  /* @__PURE__ */ jsx39(Text32, { bold: true, children: "\u2500".repeat(22) + " Finalize " + "\u2500".repeat(22) }),
28436
28366
  /* @__PURE__ */ jsx39(Text32, { children: " " }),
28437
28367
  /* @__PURE__ */ jsxs30(Text32, { children: [
28438
- /* @__PURE__ */ jsxs30(Text32, { color: PALETTE3.success, children: [
28368
+ /* @__PURE__ */ jsxs30(Text32, { color: PALETTE.success, children: [
28439
28369
  accepted,
28440
28370
  " accepted"
28441
28371
  ] }),
28442
28372
  /* @__PURE__ */ jsx39(Text32, { children: " \xB7 " }),
28443
- /* @__PURE__ */ jsxs30(Text32, { color: PALETTE3.error, children: [
28373
+ /* @__PURE__ */ jsxs30(Text32, { color: PALETTE.error, children: [
28444
28374
  rejected,
28445
28375
  " rejected"
28446
28376
  ] }),
28447
28377
  /* @__PURE__ */ jsx39(Text32, { children: " \xB7 " }),
28448
- /* @__PURE__ */ jsxs30(Text32, { color: PALETTE3.muted, children: [
28378
+ /* @__PURE__ */ jsxs30(Text32, { color: PALETTE.muted, children: [
28449
28379
  needsReview,
28450
28380
  " unresolved"
28451
28381
  ] })
28452
28382
  ] }),
28453
28383
  /* @__PURE__ */ jsx39(Text32, { children: " " }),
28454
28384
  noneAccepted && /* @__PURE__ */ jsxs30(Fragment10, { children: [
28455
- /* @__PURE__ */ jsx39(Text32, { bold: true, color: PALETTE3.warning, children: "\u26A0 No components are accepted \u2014 nothing will be pushed." }),
28456
- /* @__PURE__ */ jsx39(Text32, { color: PALETTE3.warning, children: "Accept at least one component ([a] a row, [A] accept all) to push." }),
28385
+ /* @__PURE__ */ jsx39(Text32, { bold: true, color: PALETTE.warning, children: "\u26A0 No components are accepted \u2014 nothing will be pushed." }),
28386
+ /* @__PURE__ */ jsx39(Text32, { color: PALETTE.warning, children: "Accept at least one component ([a] a row, [A] accept all) to push." }),
28457
28387
  /* @__PURE__ */ jsx39(Text32, { children: " " })
28458
28388
  ] }),
28459
28389
  !allResolved && /* @__PURE__ */ jsxs30(Fragment10, { children: [
28460
- /* @__PURE__ */ jsx39(Text32, { color: PALETTE3.warning, children: "\u26A0 " + needsReview + " unresolved component" + (needsReview === 1 ? "" : "s") + " will not be pushed." }),
28461
- /* @__PURE__ */ jsx39(Text32, { color: PALETTE3.warning, children: "Only explicitly accepted components ship." }),
28390
+ /* @__PURE__ */ jsx39(Text32, { color: PALETTE.warning, children: "\u26A0 " + needsReview + " unresolved component" + (needsReview === 1 ? "" : "s") + " will not be pushed." }),
28391
+ /* @__PURE__ */ jsx39(Text32, { color: PALETTE.warning, children: "Only explicitly accepted components ship." }),
28462
28392
  /* @__PURE__ */ jsx39(Text32, { children: " " })
28463
28393
  ] }),
28464
28394
  /* @__PURE__ */ jsxs30(Box29, { flexDirection: "column", height: 2, children: [
28465
- previewStatus === "running" ? /* @__PURE__ */ jsx39(Text32, { color: PALETTE3.muted, children: "Previewing deletions against the target space\u2026" }) : previewStatus === "error" ? /* @__PURE__ */ jsx39(Text32, { color: PALETTE3.warning, children: "\u26A0 Could not preview deletions (the push will still proceed)." }) : /* @__PURE__ */ jsx39(Text32, { children: " " }),
28395
+ previewStatus === "running" ? /* @__PURE__ */ jsx39(Text32, { color: PALETTE.muted, children: "Previewing deletions against the target space\u2026" }) : previewStatus === "error" ? /* @__PURE__ */ jsx39(Text32, { color: PALETTE.warning, children: "\u26A0 Could not preview deletions (the push will still proceed)." }) : /* @__PURE__ */ jsx39(Text32, { children: " " }),
28466
28396
  /* @__PURE__ */ jsx39(Text32, { children: " " })
28467
28397
  ] }),
28468
28398
  previewStatus === "done" && removed.length > 0 && /* @__PURE__ */ jsxs30(Fragment10, { children: [
28469
- /* @__PURE__ */ jsx39(Text32, { bold: true, color: PALETTE3.error, children: removedComponentsHeader(removed.length, false) }),
28470
- hasMoreAbove && /* @__PURE__ */ jsx39(Text32, { color: PALETTE3.muted, children: "\u2191 more above" }),
28471
- windowed.map((rc) => /* @__PURE__ */ jsx39(Text32, { color: PALETTE3.error, children: removedComponentLine(rc) }, rc.id)),
28472
- hasMoreBelow && /* @__PURE__ */ jsx39(Text32, { color: PALETTE3.muted, children: "\u2193 more below" }),
28399
+ /* @__PURE__ */ jsx39(Text32, { bold: true, color: PALETTE.error, children: removedComponentsHeader(removed.length, false) }),
28400
+ hasMoreAbove && /* @__PURE__ */ jsx39(Text32, { color: PALETTE.muted, children: "\u2191 more above" }),
28401
+ windowed.map((rc) => /* @__PURE__ */ jsx39(Text32, { color: PALETTE.error, children: removedComponentLine(rc) }, rc.id)),
28402
+ hasMoreBelow && /* @__PURE__ */ jsx39(Text32, { color: PALETTE.muted, children: "\u2193 more below" }),
28473
28403
  removed.length > FINALIZE_REMOVED_WINDOW && /* @__PURE__ */ jsx39(Text32, { children: "[\u2191\u2193] scroll deletions" }),
28474
28404
  /* @__PURE__ */ jsx39(Text32, { children: " " })
28475
28405
  ] }),
@@ -28482,7 +28412,7 @@ var FINALIZE_REMOVED_WINDOW;
28482
28412
  var init_FinalizeDialog = __esm({
28483
28413
  "packages/experience-design-system-cli/src/tui/import/steps/09-review/components/FinalizeDialog.tsx"() {
28484
28414
  "use strict";
28485
- init_theme3();
28415
+ init_theme();
28486
28416
  init_useImmediateInput();
28487
28417
  init_removed_components_text();
28488
28418
  FINALIZE_REMOVED_WINDOW = 6;
@@ -29010,8 +28940,8 @@ function ReviewStepDialogs({
29010
28940
  }
29011
28941
  function ReviewReloadDialog({ open }) {
29012
28942
  if (!open) return null;
29013
- return /* @__PURE__ */ jsxs32(Box31, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE3.warning, paddingX: 1, children: [
29014
- /* @__PURE__ */ jsx41(Text34, { bold: true, color: PALETTE3.warning, children: "Reload from saved state?" }),
28943
+ return /* @__PURE__ */ jsxs32(Box31, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
28944
+ /* @__PURE__ */ jsx41(Text34, { bold: true, color: PALETTE.warning, children: "Reload from saved state?" }),
29015
28945
  /* @__PURE__ */ jsx41(Text34, { children: "Unsaved in-memory changes will be lost." }),
29016
28946
  /* @__PURE__ */ jsx41(Text34, { children: " " }),
29017
28947
  /* @__PURE__ */ jsx41(Text34, { children: " [Enter] Confirm" }),
@@ -29021,7 +28951,7 @@ function ReviewReloadDialog({ open }) {
29021
28951
  var init_ReviewDialogs = __esm({
29022
28952
  "packages/experience-design-system-cli/src/tui/import/steps/09-review/components/ReviewDialogs.tsx"() {
29023
28953
  "use strict";
29024
- init_theme3();
28954
+ init_theme();
29025
28955
  init_FinalizeDialog();
29026
28956
  init_QuitDialog();
29027
28957
  init_ReviewStatus();
@@ -29432,25 +29362,25 @@ function LivePreviewSummary({
29432
29362
  const counts = { new: 0, changed: 0, removed: 0, breaking: 0 };
29433
29363
  for (const annotation of previewAnnotations.values()) counts[annotation] += 1;
29434
29364
  const hasCounts = counts.new + counts.changed + counts.removed + counts.breaking > 0;
29435
- if (disabled) return /* @__PURE__ */ jsx42(Text35, { color: PALETTE3.muted, children: "Preview: disabled (creds rejected)" });
29436
- if (status === "running" && !hasCounts) return /* @__PURE__ */ jsx42(Text35, { color: PALETTE3.muted, children: `Preview: ${spinner} running...` });
29365
+ if (disabled) return /* @__PURE__ */ jsx42(Text35, { color: PALETTE.muted, children: "Preview: disabled (creds rejected)" });
29366
+ if (status === "running" && !hasCounts) return /* @__PURE__ */ jsx42(Text35, { color: PALETTE.muted, children: `Preview: ${spinner} running...` });
29437
29367
  if (!hasCounts) return null;
29438
29368
  return /* @__PURE__ */ jsxs33(Box32, { children: [
29439
29369
  /* @__PURE__ */ jsx42(Text35, { children: "Preview: " }),
29440
- /* @__PURE__ */ jsx42(Text35, { color: PALETTE3.success, children: `${counts.new} new` }),
29370
+ /* @__PURE__ */ jsx42(Text35, { color: PALETTE.success, children: `${counts.new} new` }),
29441
29371
  /* @__PURE__ */ jsx42(Text35, { children: " \xB7 " }),
29442
- /* @__PURE__ */ jsx42(Text35, { color: PALETTE3.warning, children: `${counts.changed} changed` }),
29372
+ /* @__PURE__ */ jsx42(Text35, { color: PALETTE.warning, children: `${counts.changed} changed` }),
29443
29373
  /* @__PURE__ */ jsx42(Text35, { children: " \xB7 " }),
29444
- /* @__PURE__ */ jsx42(Text35, { color: PALETTE3.muted, children: `${counts.removed} removed` }),
29374
+ /* @__PURE__ */ jsx42(Text35, { color: PALETTE.muted, children: `${counts.removed} removed` }),
29445
29375
  showRemovedListHint && removedCount > 0 && /* @__PURE__ */ jsx42(Text35, { children: " ([d] removed list)" }),
29446
29376
  /* @__PURE__ */ jsx42(Text35, { children: " \xB7 " }),
29447
- /* @__PURE__ */ jsx42(Text35, { color: PALETTE3.error, bold: true, children: `${counts.breaking} breaking` })
29377
+ /* @__PURE__ */ jsx42(Text35, { color: PALETTE.error, bold: true, children: `${counts.breaking} breaking` })
29448
29378
  ] });
29449
29379
  }
29450
29380
  var init_LivePreviewSummary = __esm({
29451
29381
  "packages/experience-design-system-cli/src/tui/import/steps/09-review/components/LivePreviewSummary.tsx"() {
29452
29382
  "use strict";
29453
- init_theme3();
29383
+ init_theme();
29454
29384
  }
29455
29385
  });
29456
29386
 
@@ -29499,10 +29429,10 @@ function CyclePathLine({
29499
29429
  highlightComponents = false,
29500
29430
  highlightLine = false
29501
29431
  }) {
29502
- return /* @__PURE__ */ jsxs34(Text36, { color: highlightLine ? PALETTE3.warning : void 0, children: [
29432
+ return /* @__PURE__ */ jsxs34(Text36, { color: highlightLine ? PALETTE.warning : void 0, children: [
29503
29433
  prefix,
29504
29434
  segments.map(
29505
- (segment, index) => segment.kind === "slot" ? /* @__PURE__ */ jsx43(Text36, { color: PALETTE3.info, children: segment.text }, index) : segment.kind === "arrow" ? /* @__PURE__ */ jsx43(Text36, { color: PALETTE3.muted, children: segment.text }, index) : /* @__PURE__ */ jsx43(Text36, { color: highlightComponents ? PALETTE3.warning : void 0, children: segment.text }, index)
29435
+ (segment, index) => segment.kind === "slot" ? /* @__PURE__ */ jsx43(Text36, { color: PALETTE.accent, children: segment.text }, index) : segment.kind === "arrow" ? /* @__PURE__ */ jsx43(Text36, { color: PALETTE.muted, children: segment.text }, index) : /* @__PURE__ */ jsx43(Text36, { color: highlightComponents ? PALETTE.warning : void 0, children: segment.text }, index)
29506
29436
  )
29507
29437
  ] });
29508
29438
  }
@@ -29514,9 +29444,9 @@ function CycleDetailPanel({
29514
29444
  height
29515
29445
  }) {
29516
29446
  const lines = [
29517
- /* @__PURE__ */ jsx43(Text36, { bold: true, color: PALETTE3.warning, children: `SLOT DEPENDENCY CYCLES (${cycles.length})` }, "cyc-title"),
29518
- /* @__PURE__ */ jsx43(Text36, { color: PALETTE3.muted, children: "push will fail until these are resolved" }, "cyc-sub"),
29519
- /* @__PURE__ */ jsx43(Text36, { color: PALETTE3.muted, children: "Reject a cycle member or remove a slot edge to break the cycle." }, "cyc-guidance"),
29447
+ /* @__PURE__ */ jsx43(Text36, { bold: true, color: PALETTE.warning, children: `SLOT DEPENDENCY CYCLES (${cycles.length})` }, "cyc-title"),
29448
+ /* @__PURE__ */ jsx43(Text36, { color: PALETTE.muted, children: "push will fail until these are resolved" }, "cyc-sub"),
29449
+ /* @__PURE__ */ jsx43(Text36, { color: PALETTE.muted, children: "Reject a cycle member or remove a slot edge to break the cycle." }, "cyc-guidance"),
29520
29450
  /* @__PURE__ */ jsx43(Text36, { children: " " }, "cyc-space")
29521
29451
  ];
29522
29452
  cycles.forEach((cycle, index) => {
@@ -29528,7 +29458,7 @@ function CycleDetailPanel({
29528
29458
  );
29529
29459
  if (cycle.suggestedBreak) {
29530
29460
  lines.push(
29531
- /* @__PURE__ */ jsx43(Text36, { color: PALETTE3.muted, children: ` Suggested fix: remove [${cycle.suggestedBreak.slotName}] from ${cycle.suggestedBreak.fromComponent}` }, `cyc-fix-${index}`)
29461
+ /* @__PURE__ */ jsx43(Text36, { color: PALETTE.muted, children: ` Suggested fix: remove [${cycle.suggestedBreak.slotName}] from ${cycle.suggestedBreak.fromComponent}` }, `cyc-fix-${index}`)
29532
29462
  );
29533
29463
  }
29534
29464
  lines.push(/* @__PURE__ */ jsx43(Text36, { children: " " }, `cyc-s-${index}`));
@@ -29536,9 +29466,9 @@ function CycleDetailPanel({
29536
29466
  const footer = "[\u2191\u2193] move [Enter] fix cycle [c/q/Esc] close";
29537
29467
  const viewportHeight = Math.max(1, height - 3);
29538
29468
  const visible = lines.slice(scrollOffset, scrollOffset + viewportHeight - 1);
29539
- return /* @__PURE__ */ jsxs34(FixedPanel, { width, height, borderStyle: "round", borderColor: PALETTE3.warning, paddingLeft: 1, children: [
29469
+ return /* @__PURE__ */ jsxs34(FixedPanel, { width, height, borderStyle: "round", borderColor: PALETTE.warning, paddingLeft: 1, children: [
29540
29470
  visible,
29541
- /* @__PURE__ */ jsx43(Text36, { color: PALETTE3.muted, children: footer })
29471
+ /* @__PURE__ */ jsx43(Text36, { color: PALETTE.muted, children: footer })
29542
29472
  ] });
29543
29473
  }
29544
29474
  function BreakCyclePanel({
@@ -29549,14 +29479,14 @@ function BreakCyclePanel({
29549
29479
  width,
29550
29480
  height
29551
29481
  }) {
29552
- return /* @__PURE__ */ jsxs34(FixedPanel, { width, height, borderStyle: "round", borderColor: PALETTE3.warning, paddingLeft: 1, children: [
29553
- /* @__PURE__ */ jsx43(Text36, { bold: true, color: PALETTE3.warning, children: "BREAK CYCLE \u2014 remove a slot edge" }),
29482
+ return /* @__PURE__ */ jsxs34(FixedPanel, { width, height, borderStyle: "round", borderColor: PALETTE.warning, paddingLeft: 1, children: [
29483
+ /* @__PURE__ */ jsx43(Text36, { bold: true, color: PALETTE.warning, children: "BREAK CYCLE \u2014 remove a slot edge" }),
29554
29484
  cycle && /* @__PURE__ */ jsx43(CyclePathLine, { segments: formatCyclePathSegments2(cycle), prefix: " ", highlightComponents: true }),
29555
- /* @__PURE__ */ jsx43(Text36, { color: PALETTE3.muted, children: cycle ? "Deleting an edge removes it from $allowedComponents (undo with Ctrl+Z)." : "No cycle highlighted." }),
29485
+ /* @__PURE__ */ jsx43(Text36, { color: PALETTE.muted, children: cycle ? "Deleting an edge removes it from $allowedComponents (undo with Ctrl+Z)." : "No cycle highlighted." }),
29556
29486
  /* @__PURE__ */ jsx43(Text36, { children: " " }),
29557
- edges.length > 0 && /* @__PURE__ */ jsx43(Text36, { color: PALETTE3.muted, children: "remove slot edge:" }),
29487
+ edges.length > 0 && /* @__PURE__ */ jsx43(Text36, { color: PALETTE.muted, children: "remove slot edge:" }),
29558
29488
  edges.map((edge, index) => /* @__PURE__ */ jsx43(Text36, { inverse: index === cursor, children: `${index === cursor ? figures7.pointer : " "} remove '${edge.toComponent}' from ${edge.fromComponent}.$slots.${edge.slotName}.$allowedComponents` }, `${edge.fromComponent}-${edge.slotName}-${edge.toComponent}`)),
29559
- confirming ? /* @__PURE__ */ jsx43(Text36, { bold: true, color: PALETTE3.warning, children: "Delete this slot edge? [y] confirm [n] cancel" }) : /* @__PURE__ */ jsx43(Text36, { children: "[\u2191\u2193] move [Enter] delete [x/Esc] close" })
29489
+ confirming ? /* @__PURE__ */ jsx43(Text36, { bold: true, color: PALETTE.warning, children: "Delete this slot edge? [y] confirm [n] cancel" }) : /* @__PURE__ */ jsx43(Text36, { children: "[\u2191\u2193] move [Enter] delete [x/Esc] close" })
29560
29490
  ] });
29561
29491
  }
29562
29492
  function buildBreakingRows(breakingChanges) {
@@ -29602,7 +29532,7 @@ function deriveBreakingChanges(response) {
29602
29532
  }
29603
29533
  function GenerateReviewStep(props) {
29604
29534
  if (!props.extractSessionId) {
29605
- return /* @__PURE__ */ jsx43(Box33, { paddingX: 2, paddingY: 1, children: /* @__PURE__ */ jsx43(Text36, { color: PALETTE3.error, children: "Error: no session ID \u2014 cannot load generated definitions." }) });
29535
+ return /* @__PURE__ */ jsx43(Box33, { paddingX: 2, paddingY: 1, children: /* @__PURE__ */ jsx43(Text36, { color: PALETTE.error, children: "Error: no session ID \u2014 cannot load generated definitions." }) });
29606
29536
  }
29607
29537
  return /* @__PURE__ */ jsx43(GenerateReviewStepView, { ...props, extractSessionId: props.extractSessionId });
29608
29538
  }
@@ -30519,8 +30449,8 @@ function GenerateReviewStepView({
30519
30449
  }
30520
30450
  ),
30521
30451
  /* @__PURE__ */ jsx43(ReviewReloadDialog, { open: showReloadDialog && !dialogOpen }),
30522
- removedComponents.length > 0 && !dialogOpen && /* @__PURE__ */ jsxs34(Box33, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE3.error, paddingX: 1, children: [
30523
- /* @__PURE__ */ jsx43(Text36, { bold: true, color: PALETTE3.error, children: removedComponentsHeader(removedComponents.length, true) }),
30452
+ removedComponents.length > 0 && !dialogOpen && /* @__PURE__ */ jsxs34(Box33, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.error, paddingX: 1, children: [
30453
+ /* @__PURE__ */ jsx43(Text36, { bold: true, color: PALETTE.error, children: removedComponentsHeader(removedComponents.length, true) }),
30524
30454
  !removedBannerCollapsed && /* @__PURE__ */ jsxs34(Fragment13, { children: [
30525
30455
  /* @__PURE__ */ jsx43(Text36, { children: " " }),
30526
30456
  removedComponents.map((rc) => /* @__PURE__ */ jsx43(Text36, { children: removedComponentLine(rc) }, rc.id))
@@ -30529,7 +30459,7 @@ function GenerateReviewStepView({
30529
30459
  breakingChanges.length > 0 && !dialogOpen && /* @__PURE__ */ jsx43(Box33, { paddingX: 1, children: /* @__PURE__ */ jsx43(
30530
30460
  Text36,
30531
30461
  {
30532
- color: PALETTE3.warning,
30462
+ color: PALETTE.warning,
30533
30463
  children: `[b] ${breakingChanges.length} breaking change${breakingChanges.length === 1 ? "" : "s"}`
30534
30464
  }
30535
30465
  ) }),
@@ -30537,10 +30467,10 @@ function GenerateReviewStepView({
30537
30467
  const row = breakingRows[breakingCursor];
30538
30468
  const comp = row ? breakingChanges.find((b) => b.componentName === row.componentName) : void 0;
30539
30469
  if (!comp) return null;
30540
- return /* @__PURE__ */ jsxs34(Box33, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE3.warning, paddingX: 1, children: [
30541
- /* @__PURE__ */ jsx43(Text36, { bold: true, color: PALETTE3.warning, children: `Breaking changes \u2014 ${comp.componentName}` }),
30542
- comp.impact && /* @__PURE__ */ jsx43(Text36, { color: PALETTE3.muted, children: ` affects ${comp.impact.affectedExperiences} experience${comp.impact.affectedExperiences === 1 ? "" : "s"}, ${comp.impact.affectedFragments} fragment${comp.impact.affectedFragments === 1 ? "" : "s"}` }),
30543
- comp.changes.length === 0 ? /* @__PURE__ */ jsx43(Text36, { color: PALETTE3.muted, children: " (no enumerated changes)" }) : comp.changes.map((change, ci) => /* @__PURE__ */ jsx43(Text36, { children: ` \u2022 ${formatBreakingChange(change, comp.current)}` }, `bd-detail-${ci}`)),
30470
+ return /* @__PURE__ */ jsxs34(Box33, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
30471
+ /* @__PURE__ */ jsx43(Text36, { bold: true, color: PALETTE.warning, children: `Breaking changes \u2014 ${comp.componentName}` }),
30472
+ comp.impact && /* @__PURE__ */ jsx43(Text36, { color: PALETTE.muted, children: ` affects ${comp.impact.affectedExperiences} experience${comp.impact.affectedExperiences === 1 ? "" : "s"}, ${comp.impact.affectedFragments} fragment${comp.impact.affectedFragments === 1 ? "" : "s"}` }),
30473
+ comp.changes.length === 0 ? /* @__PURE__ */ jsx43(Text36, { color: PALETTE.muted, children: " (no enumerated changes)" }) : comp.changes.map((change, ci) => /* @__PURE__ */ jsx43(Text36, { children: ` \u2022 ${formatBreakingChange(change, comp.current)}` }, `bd-detail-${ci}`)),
30544
30474
  /* @__PURE__ */ jsx43(Text36, { children: "[D/Esc] close detail" })
30545
30475
  ] });
30546
30476
  })(),
@@ -30563,11 +30493,11 @@ function GenerateReviewStepView({
30563
30493
  const participantSet = cycleView.structural;
30564
30494
  const members = stillRejected.filter((n) => participantSet.has(n)).sort();
30565
30495
  const ancestors = stillRejected.filter((n) => !participantSet.has(n)).sort();
30566
- return /* @__PURE__ */ jsxs34(Box33, { flexDirection: "column", borderStyle: "single", borderColor: PALETTE3.error, paddingX: 1, children: [
30567
- /* @__PURE__ */ jsx43(Text36, { color: PALETTE3.error, bold: true, children: `Cyclic component graph \u2014 auto-rejected ${stillRejected.length} component${stillRejected.length === 1 ? "" : "s"}:` }),
30568
- members.length > 0 && /* @__PURE__ */ jsx43(Text36, { color: PALETTE3.error, children: ` Cycle members: ${members.join(", ")}` }),
30569
- ancestors.length > 0 && /* @__PURE__ */ jsx43(Text36, { color: PALETTE3.error, children: ` Ancestors: ${ancestors.join(", ")}` }),
30570
- /* @__PURE__ */ jsx43(Text36, { color: PALETTE3.muted, children: undoSnapshot ? " [Ctrl+Z] undo \xB7 [r]/[a] manually toggle \xB7 [F] continue" : " [r]/[a] manually toggle \xB7 [F] continue" })
30496
+ return /* @__PURE__ */ jsxs34(Box33, { flexDirection: "column", borderStyle: "single", borderColor: PALETTE.error, paddingX: 1, children: [
30497
+ /* @__PURE__ */ jsx43(Text36, { color: PALETTE.error, bold: true, children: `Cyclic component graph \u2014 auto-rejected ${stillRejected.length} component${stillRejected.length === 1 ? "" : "s"}:` }),
30498
+ members.length > 0 && /* @__PURE__ */ jsx43(Text36, { color: PALETTE.error, children: ` Cycle members: ${members.join(", ")}` }),
30499
+ ancestors.length > 0 && /* @__PURE__ */ jsx43(Text36, { color: PALETTE.error, children: ` Ancestors: ${ancestors.join(", ")}` }),
30500
+ /* @__PURE__ */ jsx43(Text36, { color: PALETTE.muted, children: undoSnapshot ? " [Ctrl+Z] undo \xB7 [r]/[a] manually toggle \xB7 [F] continue" : " [r]/[a] manually toggle \xB7 [F] continue" })
30571
30501
  ] });
30572
30502
  })(),
30573
30503
  /* @__PURE__ */ jsx43(ReviewEmptyComponentsWarning, { count: emptyCount, hidden: dialogOpen }),
@@ -30683,7 +30613,7 @@ function GenerateReviewStepView({
30683
30613
  ) : /* @__PURE__ */ jsx43(ReviewNoSelection, {})
30684
30614
  ] }),
30685
30615
  !dialogOpen && cycleRows.length > 0 && !cyclePanel.isOpen && !breakPanel.isOpen && /* @__PURE__ */ jsxs34(Box33, { flexDirection: "column", children: [
30686
- /* @__PURE__ */ jsx43(Text36, { color: PALETTE3.warning, children: `\u26A0 ${cycleRows.length} slot dependency cycle${cycleRows.length === 1 ? "" : "s"} detected \u2014 push will fail` }),
30616
+ /* @__PURE__ */ jsx43(Text36, { color: PALETTE.warning, children: `\u26A0 ${cycleRows.length} slot dependency cycle${cycleRows.length === 1 ? "" : "s"} detected \u2014 push will fail` }),
30687
30617
  cycleRows.slice(0, 3).map((cycle, idx) => {
30688
30618
  return /* @__PURE__ */ jsx43(
30689
30619
  CyclePathLine,
@@ -30696,7 +30626,7 @@ function GenerateReviewStepView({
30696
30626
  `cyc-banner-${idx}`
30697
30627
  );
30698
30628
  }),
30699
- cycleRows.length > 3 && /* @__PURE__ */ jsx43(Text36, { color: PALETTE3.warning, children: ` \u2026${cycleRows.length - 3} more` }),
30629
+ cycleRows.length > 3 && /* @__PURE__ */ jsx43(Text36, { color: PALETTE.warning, children: ` \u2026${cycleRows.length - 3} more` }),
30700
30630
  /* @__PURE__ */ jsx43(Text36, { children: " press [c] for detail" })
30701
30631
  ] }),
30702
30632
  /* @__PURE__ */ jsx43(
@@ -30717,7 +30647,7 @@ var HELP_SECTIONS2;
30717
30647
  var init_generate_review_step = __esm({
30718
30648
  "packages/experience-design-system-cli/src/tui/import/steps/09-review/generate-review-step.tsx"() {
30719
30649
  "use strict";
30720
- init_theme3();
30650
+ init_theme();
30721
30651
  init_review_json_panel();
30722
30652
  init_GroupedSidebar();
30723
30653
  init_composite_closure();
@@ -30826,13 +30756,13 @@ var init_generate_review_step = __esm({
30826
30756
 
30827
30757
  // packages/experience-design-system-cli/src/tui/import/steps/10-flow/theme.ts
30828
30758
  import { defaultTheme as defaultTheme2, extendTheme as extendTheme2 } from "@inkjs/ui";
30829
- var PALETTE4, INK_UI_THEME;
30759
+ var PALETTE3, INK_UI_THEME;
30830
30760
  var init_theme4 = __esm({
30831
30761
  "packages/experience-design-system-cli/src/tui/import/steps/10-flow/theme.ts"() {
30832
30762
  "use strict";
30833
- init_theme3();
30834
- PALETTE4 = {
30835
- ...PALETTE3,
30763
+ init_theme();
30764
+ PALETTE3 = {
30765
+ ...PALETTE,
30836
30766
  link: "#58A6FF"
30837
30767
  };
30838
30768
  INK_UI_THEME = extendTheme2(defaultTheme2, {
@@ -30840,7 +30770,7 @@ var init_theme4 = __esm({
30840
30770
  ProgressBar: {
30841
30771
  styles: {
30842
30772
  completed: () => ({
30843
- color: "blue"
30773
+ color: PALETTE3.accent
30844
30774
  })
30845
30775
  }
30846
30776
  }
@@ -30854,13 +30784,13 @@ import { Box as Box34, Text as Text37 } from "ink";
30854
30784
  import { jsx as jsx44, jsxs as jsxs35 } from "react/jsx-runtime";
30855
30785
  function CustomPromptBanner({ generatePromptPath }) {
30856
30786
  if (!generatePromptPath) return null;
30857
- return /* @__PURE__ */ jsxs35(Box34, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE4.warning, paddingX: 1, children: [
30858
- /* @__PURE__ */ jsx44(Text37, { color: PALETTE4.warning, bold: true, children: "WARNING: Custom prompt active" }),
30859
- generatePromptPath ? /* @__PURE__ */ jsxs35(Text37, { color: PALETTE4.warning, children: [
30787
+ return /* @__PURE__ */ jsxs35(Box34, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE3.warning, paddingX: 1, children: [
30788
+ /* @__PURE__ */ jsx44(Text37, { color: PALETTE3.warning, bold: true, children: "WARNING: Custom prompt active" }),
30789
+ generatePromptPath ? /* @__PURE__ */ jsxs35(Text37, { color: PALETTE3.warning, children: [
30860
30790
  "components: ",
30861
30791
  generatePromptPath
30862
30792
  ] }) : null,
30863
- /* @__PURE__ */ jsx44(Text37, { color: PALETTE4.warning, children: "Bundled invariants (utility-wrapper rejection, description content rules) do NOT apply." })
30793
+ /* @__PURE__ */ jsx44(Text37, { color: PALETTE3.warning, children: "Bundled invariants (utility-wrapper rejection, description content rules) do NOT apply." })
30864
30794
  ] });
30865
30795
  }
30866
30796
  var init_CustomPromptBanner = __esm({
@@ -30893,10 +30823,10 @@ import { Box as Box35, Text as Text38 } from "ink";
30893
30823
  import { jsx as jsx45, jsxs as jsxs36 } from "react/jsx-runtime";
30894
30824
  function SpaceEnvironment({ spaceId, environmentId }) {
30895
30825
  return /* @__PURE__ */ jsxs36(Box35, { gap: 1, marginTop: 1, children: [
30896
- /* @__PURE__ */ jsx45(Text38, { color: PALETTE4.muted, children: "Space:" }),
30826
+ /* @__PURE__ */ jsx45(Text38, { color: PALETTE3.muted, children: "Space:" }),
30897
30827
  /* @__PURE__ */ jsx45(Text38, { children: spaceId }),
30898
- /* @__PURE__ */ jsx45(Text38, { color: PALETTE4.muted, children: "/" }),
30899
- /* @__PURE__ */ jsx45(Text38, { color: PALETTE4.muted, children: "Environment:" }),
30828
+ /* @__PURE__ */ jsx45(Text38, { color: PALETTE3.muted, children: "/" }),
30829
+ /* @__PURE__ */ jsx45(Text38, { color: PALETTE3.muted, children: "Environment:" }),
30900
30830
  /* @__PURE__ */ jsx45(Text38, { children: environmentId })
30901
30831
  ] });
30902
30832
  }
@@ -30914,13 +30844,13 @@ function EntityRows({ entity, label }) {
30914
30844
  const plural3 = (n) => `${n} ${label}${n !== 1 ? "s" : ""}`;
30915
30845
  return /* @__PURE__ */ jsxs37(Fragment14, { children: [
30916
30846
  ACTIONS.filter((action) => entity[action] > 0).map((action) => /* @__PURE__ */ jsxs37(Text39, { children: [
30917
- /* @__PURE__ */ jsx46(Text39, { color: PALETTE4.success, children: "\u2713" }),
30847
+ /* @__PURE__ */ jsx46(Text39, { color: PALETTE3.success, children: "\u2713" }),
30918
30848
  " ",
30919
30849
  plural3(entity[action]),
30920
30850
  " ",
30921
30851
  action
30922
30852
  ] }, action)),
30923
- entity.failed > 0 && /* @__PURE__ */ jsxs37(Text39, { color: PALETTE4.error, children: [
30853
+ entity.failed > 0 && /* @__PURE__ */ jsxs37(Text39, { color: PALETTE3.error, children: [
30924
30854
  "\u2717 ",
30925
30855
  plural3(entity.failed),
30926
30856
  " failed \u2014 check logs above"
@@ -30929,8 +30859,8 @@ function EntityRows({ entity, label }) {
30929
30859
  }
30930
30860
  function LinkRow({ title, url }) {
30931
30861
  return /* @__PURE__ */ jsxs37(Box36, { flexDirection: "column", children: [
30932
- /* @__PURE__ */ jsx46(Text39, { color: PALETTE4.muted, children: title }),
30933
- /* @__PURE__ */ jsx46(Text39, { color: PALETTE4.link, children: url })
30862
+ /* @__PURE__ */ jsx46(Text39, { color: PALETTE3.muted, children: title }),
30863
+ /* @__PURE__ */ jsx46(Text39, { color: PALETTE3.link, children: url })
30934
30864
  ] });
30935
30865
  }
30936
30866
  function DoneStep({
@@ -30953,17 +30883,17 @@ function DoneStep({
30953
30883
  const success = totalFailed === 0;
30954
30884
  const urlArgs = { host: host ?? "api.contentful.com", spaceId, environmentId };
30955
30885
  return /* @__PURE__ */ jsxs37(Box36, { flexDirection: "column", gap: 1, paddingX: 2, paddingY: 1, children: [
30956
- success ? /* @__PURE__ */ jsx46(Text39, { bold: true, color: PALETTE4.success, children: "Done!" }) : /* @__PURE__ */ jsx46(Text39, { bold: true, color: PALETTE4.warning, children: "\u26A0 Finished with errors" }),
30957
- totalPushed === 0 && totalFailed === 0 && !summary ? /* @__PURE__ */ jsx46(Text39, { color: PALETTE4.muted, children: "Nothing was pushed \u2014 everything was already up to date." }) : /* @__PURE__ */ jsxs37(Box36, { flexDirection: "column", children: [
30886
+ success ? /* @__PURE__ */ jsx46(Text39, { bold: true, color: PALETTE3.success, children: "Done!" }) : /* @__PURE__ */ jsx46(Text39, { bold: true, color: PALETTE3.warning, children: "\u26A0 Finished with errors" }),
30887
+ totalPushed === 0 && totalFailed === 0 && !summary ? /* @__PURE__ */ jsx46(Text39, { color: PALETTE3.muted, children: "Nothing was pushed \u2014 everything was already up to date." }) : /* @__PURE__ */ jsxs37(Box36, { flexDirection: "column", children: [
30958
30888
  /* @__PURE__ */ jsx46(EntityRows, { entity: componentTypes, label: "Component Type" }),
30959
30889
  /* @__PURE__ */ jsx46(EntityRows, { entity: designTokens, label: "Design Token" }),
30960
- summary && /* @__PURE__ */ jsx46(Box36, { marginTop: 1, children: /* @__PURE__ */ jsxs37(Text39, { color: PALETTE4.muted, children: [
30890
+ summary && /* @__PURE__ */ jsx46(Box36, { marginTop: 1, children: /* @__PURE__ */ jsxs37(Text39, { color: PALETTE3.muted, children: [
30961
30891
  "Push result: ",
30962
30892
  summary.succeeded,
30963
30893
  "/",
30964
30894
  summary.total,
30965
30895
  " succeeded",
30966
- summary.failed > 0 && /* @__PURE__ */ jsxs37(Text39, { color: PALETTE4.error, children: [
30896
+ summary.failed > 0 && /* @__PURE__ */ jsxs37(Text39, { color: PALETTE3.error, children: [
30967
30897
  ", ",
30968
30898
  summary.failed,
30969
30899
  " failed"
@@ -30971,8 +30901,8 @@ function DoneStep({
30971
30901
  ] }) })
30972
30902
  ] }),
30973
30903
  failures.length > 0 && /* @__PURE__ */ jsxs37(Box36, { flexDirection: "column", children: [
30974
- /* @__PURE__ */ jsx46(Text39, { bold: true, color: PALETTE4.error, children: "Failure details" }),
30975
- failures.map((failure) => /* @__PURE__ */ jsxs37(Text39, { color: PALETTE4.error, children: [
30904
+ /* @__PURE__ */ jsx46(Text39, { bold: true, color: PALETTE3.error, children: "Failure details" }),
30905
+ failures.map((failure) => /* @__PURE__ */ jsxs37(Text39, { color: PALETTE3.error, children: [
30976
30906
  failure.entityType,
30977
30907
  " ",
30978
30908
  failure.entityId,
@@ -30982,7 +30912,7 @@ function DoneStep({
30982
30912
  ] }),
30983
30913
  /* @__PURE__ */ jsx46(SpaceEnvironment, { spaceId, environmentId }),
30984
30914
  success && totalPushed > 0 && /* @__PURE__ */ jsxs37(Box36, { flexDirection: "column", gap: 1, children: [
30985
- /* @__PURE__ */ jsx46(Text39, { color: PALETTE4.success, children: "Your design system is now in Contentful Experiences." }),
30915
+ /* @__PURE__ */ jsx46(Text39, { color: PALETTE3.success, children: "Your design system is now in Contentful Experiences." }),
30986
30916
  /* @__PURE__ */ jsx46(LinkRow, { title: "View your components here:", url: buildPostPushUrl2(urlArgs) }),
30987
30917
  /* @__PURE__ */ jsx46(
30988
30918
  LinkRow,
@@ -31115,7 +31045,7 @@ function PathPrompt({
31115
31045
  label,
31116
31046
  ":"
31117
31047
  ] }),
31118
- /* @__PURE__ */ jsx47(Text40, { color: isPlaceholder ? PALETTE4.muted : void 0, children: shown }),
31048
+ /* @__PURE__ */ jsx47(Text40, { color: isPlaceholder ? PALETTE3.muted : void 0, children: shown }),
31119
31049
  /* @__PURE__ */ jsx47(Text40, { children: cursor })
31120
31050
  ] }),
31121
31051
  /* @__PURE__ */ jsxs38(Box37, { gap: 3, children: [
@@ -31198,12 +31128,12 @@ function PushingStep({ stepNumber, totalSteps, progress }) {
31198
31128
  /* @__PURE__ */ jsx50(StepHeader, { stepNumber, totalSteps, title: "Push to Contentful" }),
31199
31129
  /* @__PURE__ */ jsx50(Text42, { children: "Writing component types and design tokens to your Contentful space..." }),
31200
31130
  operationId && /* @__PURE__ */ jsxs40(Box39, { gap: 1, children: [
31201
- /* @__PURE__ */ jsx50(Text42, { color: PALETTE4.muted, children: "Operation:" }),
31131
+ /* @__PURE__ */ jsx50(Text42, { color: PALETTE3.muted, children: "Operation:" }),
31202
31132
  /* @__PURE__ */ jsx50(Text42, { children: operationId })
31203
31133
  ] }),
31204
31134
  showGlobal && progress && progress.kind === "progress" && /* @__PURE__ */ jsx50(Box39, { gap: 1, flexDirection: "column", children: /* @__PURE__ */ jsxs40(Box39, { gap: 2, children: [
31205
31135
  /* @__PURE__ */ jsx50(Box39, { width: 40, children: /* @__PURE__ */ jsx50(ThemeProvider2, { theme: INK_UI_THEME, children: /* @__PURE__ */ jsx50(ProgressBar2, { value: Math.round(progress.processed / progress.total * 100) }) }) }),
31206
- /* @__PURE__ */ jsxs40(Text42, { color: PALETTE4.muted, children: [
31136
+ /* @__PURE__ */ jsxs40(Text42, { color: PALETTE3.muted, children: [
31207
31137
  progress.processed,
31208
31138
  "/",
31209
31139
  progress.total,
@@ -31211,10 +31141,10 @@ function PushingStep({ stepNumber, totalSteps, progress }) {
31211
31141
  ] })
31212
31142
  ] }) }),
31213
31143
  showCurrent && /* @__PURE__ */ jsxs40(Box39, { gap: 1, children: [
31214
- /* @__PURE__ */ jsx50(Text42, { color: PALETTE4.muted, children: "Now processing:" }),
31144
+ /* @__PURE__ */ jsx50(Text42, { color: PALETTE3.muted, children: "Now processing:" }),
31215
31145
  /* @__PURE__ */ jsx50(Text42, { children: showCurrent })
31216
31146
  ] }),
31217
- /* @__PURE__ */ jsx50(Box39, { marginTop: 1, children: /* @__PURE__ */ jsxs40(Text42, { color: PALETTE4.muted, children: [
31147
+ /* @__PURE__ */ jsx50(Box39, { marginTop: 1, children: /* @__PURE__ */ jsxs40(Text42, { color: PALETTE3.muted, children: [
31218
31148
  "Elapsed: ",
31219
31149
  elapsed
31220
31150
  ] }) })
@@ -31421,25 +31351,25 @@ function buildPreviewSummaryLines(preview) {
31421
31351
  if (components.new.length > 0) {
31422
31352
  lines.push({
31423
31353
  key: "summary-components-new",
31424
- color: PALETTE4.success,
31354
+ color: PALETTE3.success,
31425
31355
  text: ` \uFF0B ${components.new.length} components will be created`
31426
31356
  });
31427
31357
  for (const [index, item] of components.new.entries()) {
31428
31358
  const name = item.key ?? item.$name ?? "unknown";
31429
- lines.push({ key: `summary-components-new-${index}`, color: PALETTE4.success, text: ` + ${name}` });
31359
+ lines.push({ key: `summary-components-new-${index}`, color: PALETTE3.success, text: ` + ${name}` });
31430
31360
  }
31431
31361
  }
31432
31362
  if (components.changed.length > 0) {
31433
31363
  lines.push({
31434
31364
  key: "summary-components-changed",
31435
- color: PALETTE4.warning,
31365
+ color: PALETTE3.warning,
31436
31366
  text: ` \uFF5E ${components.changed.length} components will be updated`
31437
31367
  });
31438
31368
  for (const [index, item] of components.changed.entries()) {
31439
31369
  const isBreaking = item.changeClassification?.classification === "breaking";
31440
31370
  lines.push({
31441
31371
  key: `summary-components-changed-${index}`,
31442
- color: isBreaking ? PALETTE4.error : PALETTE4.warning,
31372
+ color: isBreaking ? PALETTE3.error : PALETTE3.warning,
31443
31373
  text: ` ${isBreaking ? "\u26A0" : "~"} ${item.current.name}`
31444
31374
  });
31445
31375
  }
@@ -31447,11 +31377,11 @@ function buildPreviewSummaryLines(preview) {
31447
31377
  if (components.removed.length > 0) {
31448
31378
  lines.push({
31449
31379
  key: "summary-components-removed",
31450
- color: PALETTE4.warning,
31380
+ color: PALETTE3.warning,
31451
31381
  text: ` \u2298 ${components.removed.length} components will be skipped`
31452
31382
  });
31453
31383
  for (const [index, item] of components.removed.entries()) {
31454
- lines.push({ key: `summary-components-removed-${index}`, color: PALETTE4.warning, text: ` \u2298 ${item.name}` });
31384
+ lines.push({ key: `summary-components-removed-${index}`, color: PALETTE3.warning, text: ` \u2298 ${item.name}` });
31455
31385
  }
31456
31386
  }
31457
31387
  if (components.unchanged.length > 0) {
@@ -31464,21 +31394,21 @@ function buildPreviewSummaryLines(preview) {
31464
31394
  if (tokens.new.length > 0) {
31465
31395
  lines.push({
31466
31396
  key: "summary-tokens-new",
31467
- color: PALETTE4.success,
31397
+ color: PALETTE3.success,
31468
31398
  text: ` \uFF0B ${tokens.new.length} design tokens will be created`
31469
31399
  });
31470
31400
  }
31471
31401
  if (tokens.changed.length > 0) {
31472
31402
  lines.push({
31473
31403
  key: "summary-tokens-changed",
31474
- color: PALETTE4.warning,
31404
+ color: PALETTE3.warning,
31475
31405
  text: ` \uFF5E ${tokens.changed.length} design tokens will be updated`
31476
31406
  });
31477
31407
  }
31478
31408
  if (tokens.removed.length > 0) {
31479
31409
  lines.push({
31480
31410
  key: "summary-tokens-removed",
31481
- color: PALETTE4.warning,
31411
+ color: PALETTE3.warning,
31482
31412
  text: ` \u2298 ${tokens.removed.length} design tokens will be skipped`
31483
31413
  });
31484
31414
  }
@@ -31522,12 +31452,12 @@ function getPreviewScrollOffset(input, downArrow, upArrow, diffExpanded, current
31522
31452
  function appendChangedPreviewLine(lines, keyPrefix, name, hasPendingDraftChanges, changeClassification) {
31523
31453
  lines.push({
31524
31454
  key: `${keyPrefix}-h-${name}`,
31525
- color: PALETTE4.warning,
31455
+ color: PALETTE3.warning,
31526
31456
  text: ` ~ ${name}${hasPendingDraftChanges ? " \u26A1 has pending draft changes" : ""}`
31527
31457
  });
31528
31458
  if (changeClassification?.classification !== "breaking") return;
31529
31459
  const reasons = changeClassification.breakingChanges.map((bc) => `${"slotId" in bc ? bc.slotId : bc.propertyId}: ${bc.reason}`).join(", ");
31530
- lines.push({ key: `${keyPrefix}-b-${name}`, color: PALETTE4.error, text: ` \u26A0 BREAKING: ${reasons}` });
31460
+ lines.push({ key: `${keyPrefix}-b-${name}`, color: PALETTE3.error, text: ` \u26A0 BREAKING: ${reasons}` });
31531
31461
  }
31532
31462
  function buildPreviewDiffLines(preview) {
31533
31463
  const lines = [];
@@ -31535,12 +31465,12 @@ function buildPreviewDiffLines(preview) {
31535
31465
  for (const item of components.new) {
31536
31466
  const raw = item;
31537
31467
  const name = raw.key ?? raw.$name ?? "unknown";
31538
- lines.push({ key: `comp-new-${name}`, color: PALETTE4.success, text: ` + ${name}` });
31468
+ lines.push({ key: `comp-new-${name}`, color: PALETTE3.success, text: ` + ${name}` });
31539
31469
  const slots = raw.$slots ?? {};
31540
31470
  for (const slotName of Object.keys(slots).sort()) {
31541
31471
  lines.push({
31542
31472
  key: `comp-new-${name}-slot-${slotName}`,
31543
- color: PALETTE4.success,
31473
+ color: PALETTE3.success,
31544
31474
  text: ` slot: ${slotName}`
31545
31475
  });
31546
31476
  const allowed = slots[slotName]?.["$allowedComponents"];
@@ -31548,14 +31478,14 @@ function buildPreviewDiffLines(preview) {
31548
31478
  const names = allowed.filter((n) => typeof n === "string");
31549
31479
  lines.push({
31550
31480
  key: `comp-new-${name}-slot-${slotName}-allow`,
31551
- color: PALETTE4.success,
31481
+ color: PALETTE3.success,
31552
31482
  text: ` allowedComponents: [${names.join(", ")}]`
31553
31483
  });
31554
31484
  }
31555
31485
  }
31556
31486
  }
31557
31487
  for (const item of components.removed) {
31558
- lines.push({ key: `comp-rm-${item.name}`, color: PALETTE4.error, text: ` - ${item.name}` });
31488
+ lines.push({ key: `comp-rm-${item.name}`, color: PALETTE3.error, text: ` - ${item.name}` });
31559
31489
  }
31560
31490
  for (const item of components.changed) {
31561
31491
  appendChangedPreviewLine(lines, "comp", item.current.name, item.hasPendingDraftChanges, item.changeClassification);
@@ -31586,10 +31516,10 @@ function buildPreviewDiffLines(preview) {
31586
31516
  for (const item of tokens.new) {
31587
31517
  const raw = item;
31588
31518
  const name = raw.name ?? raw.path ?? "unknown";
31589
- lines.push({ key: `tok-new-${name}`, color: PALETTE4.success, text: ` + ${name}` });
31519
+ lines.push({ key: `tok-new-${name}`, color: PALETTE3.success, text: ` + ${name}` });
31590
31520
  }
31591
31521
  for (const item of tokens.removed) {
31592
- lines.push({ key: `tok-rm-${item.name}`, color: PALETTE4.error, text: ` - ${item.name}` });
31522
+ lines.push({ key: `tok-rm-${item.name}`, color: PALETTE3.error, text: ` - ${item.name}` });
31593
31523
  }
31594
31524
  for (const item of tokens.changed) {
31595
31525
  const tokenName = item.current.name;
@@ -31680,13 +31610,13 @@ function WizardPreviewStep({
31680
31610
  title: diffExpanded ? `Diff (${diffLines.length} lines)` : "",
31681
31611
  focused: false,
31682
31612
  children: [
31683
- activeLines.slice(boundedScrollOffset, boundedScrollOffset + viewportHeight).map((line) => /* @__PURE__ */ jsx51(Text43, { color: line.color === "gray" ? PALETTE4.muted : line.color, wrap: "truncate-end", children: line.text }, line.key)),
31684
- /* @__PURE__ */ jsx51(Text43, { color: PALETTE4.muted, wrap: "truncate-end", children: formatPreviewScrollIndicator(activeLines.length, boundedScrollOffset, viewportHeight) })
31613
+ activeLines.slice(boundedScrollOffset, boundedScrollOffset + viewportHeight).map((line) => /* @__PURE__ */ jsx51(Text43, { color: line.color === "gray" ? PALETTE3.muted : line.color, wrap: "truncate-end", children: line.text }, line.key)),
31614
+ /* @__PURE__ */ jsx51(Text43, { color: PALETTE3.muted, wrap: "truncate-end", children: formatPreviewScrollIndicator(activeLines.length, boundedScrollOffset, viewportHeight) })
31685
31615
  ]
31686
31616
  }
31687
31617
  )
31688
- ] }) : /* @__PURE__ */ jsx51(Text43, { color: PALETTE4.muted, children: "Nothing to push \u2014 everything is already up to date." }),
31689
- breakingWithImpact && /* @__PURE__ */ jsx51(Box40, { marginTop: 1, children: /* @__PURE__ */ jsx51(Text43, { color: PALETTE4.error, bold: true, children: "\u26A0 Breaking changes will affect downstream entities. Press Enter to acknowledge and apply." }) }),
31618
+ ] }) : /* @__PURE__ */ jsx51(Text43, { color: PALETTE3.muted, children: "Nothing to push \u2014 everything is already up to date." }),
31619
+ breakingWithImpact && /* @__PURE__ */ jsx51(Box40, { marginTop: 1, children: /* @__PURE__ */ jsx51(Text43, { color: PALETTE3.error, bold: true, children: "\u26A0 Breaking changes will affect downstream entities. Press Enter to acknowledge and apply." }) }),
31690
31620
  /* @__PURE__ */ jsx51(SpaceEnvironment, { spaceId, environmentId }),
31691
31621
  /* @__PURE__ */ jsxs41(Box40, { gap: 3, marginTop: 1, children: [
31692
31622
  /* @__PURE__ */ jsx51(Text43, { children: "[Enter] Push to Contentful" }),
@@ -32368,7 +32298,7 @@ var init_save = __esm({
32368
32298
  writeFile: (path5, contents) => writeFile7(path5, contents),
32369
32299
  appendRun,
32370
32300
  buildSourceFingerprint,
32371
- sleep: (ms) => new Promise((resolve28) => setTimeout(resolve28, ms)),
32301
+ sleep: (ms) => new Promise((resolve27) => setTimeout(resolve27, ms)),
32372
32302
  warn: (message) => process.stderr.write(message)
32373
32303
  });
32374
32304
  }
@@ -32919,48 +32849,13 @@ var init_debug_store = __esm({
32919
32849
  }
32920
32850
  });
32921
32851
 
32922
- // packages/experience-design-system-cli/src/tui/help/file-locations.ts
32923
- import { join as join27, resolve as resolve27 } from "node:path";
32924
- function describeFileLocations({
32925
- contentfulBaseDir,
32926
- debugModeEnabled,
32927
- currentSessionDir: currentSessionDir2
32928
- }) {
32929
- if (!debugModeEnabled) {
32930
- return {
32931
- debugLogs: "none while Debug Mode is off",
32932
- importFiles: `${join27("<project>", ".contentful")}/ (tokens.json, components.json)`
32933
- };
32934
- }
32935
- const base = contentfulBaseDir ? resolve27(contentfulBaseDir) : "<project>";
32936
- const session = currentSessionDir2 ?? join27(base, ".contentful", "<date>-session-<n>");
32937
- return {
32938
- debugLogs: join27(session, "debug"),
32939
- importFiles: `${join27(session, "dsi-import-<n>")}/ (tokens.json, components.json)`
32940
- };
32941
- }
32942
- var init_file_locations = __esm({
32943
- "packages/experience-design-system-cli/src/tui/help/file-locations.ts"() {
32944
- "use strict";
32945
- }
32946
- });
32947
-
32948
32852
  // packages/experience-design-system-cli/src/tui/help/help-info.ts
32949
32853
  async function readHelpInfo() {
32950
- const [debugMode, settings] = await Promise.all([readDebugModeSetting(), readSettings2()]);
32951
- const base = settings["contentfulBaseDir"];
32952
- const locations = describeFileLocations({
32953
- contentfulBaseDir: typeof base === "string" ? base : "",
32954
- debugModeEnabled: debugMode.enabled,
32955
- currentSessionDir: currentSessionDir()
32956
- });
32854
+ const debugMode = await readDebugModeSetting();
32957
32855
  return {
32958
32856
  storage: [
32959
32857
  { label: "Config folder", value: configRoot2() },
32960
- { label: "Settings file", value: configFilePath2() },
32961
- { label: "Agent settings", value: `${configFilePath2()} (keys: agent, agentModel, agents)` },
32962
- { label: "Debug logs", value: locations.debugLogs },
32963
- { label: "Import files", value: locations.importFiles }
32858
+ { label: "Settings file", value: configFilePath2() }
32964
32859
  ],
32965
32860
  troubleshooting: [
32966
32861
  { label: "CLI version", value: readPackageVersion() },
@@ -32981,7 +32876,6 @@ var init_help_info = __esm({
32981
32876
  init_debug_store();
32982
32877
  init_debug_mode_store();
32983
32878
  init_version();
32984
- init_file_locations();
32985
32879
  }
32986
32880
  });
32987
32881
 
@@ -32993,7 +32887,7 @@ function Section({ title, rows }) {
32993
32887
  return /* @__PURE__ */ jsxs43(Box42, { flexDirection: "column", children: [
32994
32888
  /* @__PURE__ */ jsx53(Text44, { bold: true, color: PALETTE.accent, children: title }),
32995
32889
  rows.map((row) => /* @__PURE__ */ jsxs43(Box42, { gap: 1, children: [
32996
- /* @__PURE__ */ jsx53(Box42, { width: 16, flexShrink: 0, children: /* @__PURE__ */ jsx53(Text44, { color: PALETTE.muted, children: row.label }) }),
32890
+ /* @__PURE__ */ jsx53(Box42, { width: 14, flexShrink: 0, children: /* @__PURE__ */ jsx53(Text44, { color: PALETTE.muted, children: row.label }) }),
32997
32891
  /* @__PURE__ */ jsx53(Text44, { children: row.value })
32998
32892
  ] }, row.label))
32999
32893
  ] });
@@ -33039,7 +32933,7 @@ function HelpScreen({ onDone }) {
33039
32933
  var init_PageContainer2 = __esm({
33040
32934
  "packages/experience-design-system-cli/src/tui/help/PageContainer.tsx"() {
33041
32935
  "use strict";
33042
- init_home_theme();
32936
+ init_theme();
33043
32937
  init_debug_store();
33044
32938
  init_control_hints();
33045
32939
  init_help_info();
@@ -33107,304 +33001,167 @@ var init_PageContainer3 = __esm({
33107
33001
  }
33108
33002
  });
33109
33003
 
33110
- // packages/experience-design-system-cli/src/tui/settings/agents/agent-status.ts
33111
- import { execFile as execFile2 } from "node:child_process";
33112
- import { access as access6, constants } from "node:fs/promises";
33113
- function effectiveBinary(name, savedBinary) {
33114
- return savedBinary.trim() || AGENT_BINARIES[name];
33115
- }
33116
- function defaultModelLabel(name) {
33117
- const model = DEFAULT_MODELS[name];
33118
- return model && model !== "Auto" ? model : "chosen by the agent";
33119
- }
33120
- function resolveOnPath(binary) {
33121
- if (binary.includes("/")) {
33122
- return access6(binary, constants.X_OK).then(
33123
- () => binary,
33124
- () => null
33125
- );
33126
- }
33127
- return new Promise((resolve28) => {
33128
- execFile2(
33129
- process.platform === "win32" ? "where" : "which",
33130
- [binary],
33131
- (error, stdout) => resolve28(error ? null : stdout.split("\n")[0]?.trim() ?? null)
33132
- );
33133
- });
33004
+ // packages/experience-design-system-cli/src/tui/settings/contentful-configuration/config-store.ts
33005
+ async function readCredentials() {
33006
+ const store = await readV1Store();
33007
+ return {
33008
+ spaceId: store.spaceId || "",
33009
+ environmentId: store.environmentId || "",
33010
+ cmaToken: store.cmaToken || "",
33011
+ host: store.host || "",
33012
+ defaultComponentDir: store.defaultComponentDir || "",
33013
+ defaultTokenFile: store.defaultTokenFile || "",
33014
+ contentfulBaseDir: store.contentfulBaseDir || ""
33015
+ };
33134
33016
  }
33135
- function readVersion(binary) {
33136
- return new Promise((resolve28) => {
33137
- execFile2(binary, ["--version"], { timeout: VERSION_TIMEOUT_MS }, (error, stdout) => {
33138
- const line = stdout.split("\n")[0]?.trim() ?? "";
33139
- if (!error && line) resolve28(pass("version", line));
33140
- else resolve28(fail3("version", "runs, but did not report a version"));
33141
- });
33017
+ async function writeCredentials(config) {
33018
+ const existing = await readV1Store();
33019
+ const merged = {
33020
+ ...existing,
33021
+ ...config
33022
+ };
33023
+ Object.keys(merged).forEach((k) => {
33024
+ if (!merged[k]) delete merged[k];
33142
33025
  });
33026
+ await writeV1Store(merged);
33143
33027
  }
33144
- async function inspectAgent(name, binary) {
33145
- const target = effectiveBinary(name, binary);
33146
- const found = await resolveOnPath(target);
33147
- if (!found) return [fail3("path", `\`${target}\` was not found or is not executable`)];
33148
- const checks = [pass("path", found)];
33149
- checks.push(await readVersion(found));
33150
- if (name === "claude") {
33151
- const auth = await withBinaryEnv(name, found, () => checkAgentAuth(name));
33152
- checks.push(
33153
- auth === "ok" ? pass("login", "logged in") : fail3("login", auth === "not-found" ? "binary not found" : `not logged in: ${LOGIN_HINTS.claude}`)
33154
- );
33155
- }
33156
- return checks;
33157
- }
33158
- async function testAgent(name, binary, model) {
33159
- const checks = await inspectAgent(name, binary);
33160
- if (!checks.every((check) => check.step === "version" || check.ok)) return checks;
33161
- const target = effectiveBinary(name, binary);
33162
- const found = await resolveOnPath(target) ?? target;
33163
- const started = Date.now();
33164
- const result = await withBinaryEnv(
33165
- name,
33166
- found,
33167
- () => createLocalCliAgentInvoker().invoke({
33168
- agent: name,
33169
- ...model.trim() ? { model: model.trim() } : {},
33170
- prompt: TEST_PROMPT,
33171
- timeoutMs: PROMPT_TIMEOUT_MS
33172
- })
33173
- );
33174
- const seconds = ((Date.now() - started) / 1e3).toFixed(1);
33175
- if (result.timedOut) return [...checks, fail3("prompt", `no answer within ${PROMPT_TIMEOUT_MS / 1e3}s`)];
33176
- if (result.exitCode !== 0) {
33177
- const reason = result.stderr.trim().split("\n").pop()?.slice(0, 160) || `exited with code ${result.exitCode}`;
33178
- return [...checks, fail3("prompt", reason)];
33179
- }
33180
- return [...checks, pass("prompt", `answered in ${seconds}s`)];
33181
- }
33182
- function statusFromChecks(name, checks, savedBinary) {
33183
- if (checks.length === 0) return "checking";
33184
- if (checks.some((check) => check.step === "path" && !check.ok)) {
33185
- return savedBinary.trim() ? "not-found" : "not-configured";
33186
- }
33187
- const login = checks.find((check) => check.step === "login");
33188
- if (login) return login.ok ? "ready" : "not-logged-in";
33189
- const prompt = checks.find((check) => check.step === "prompt");
33190
- if (prompt) return prompt.ok ? "ready" : "not-logged-in";
33191
- return name === "claude" ? "ready" : "unknown";
33192
- }
33193
- function nextStepHint(name, status) {
33194
- if (status === "not-configured") return `${INSTALL_HINTS[name]}, or set the command path below`;
33195
- if (status === "not-found") return `${INSTALL_HINTS[name]}, or fix the command path`;
33196
- if (status === "not-logged-in") return LOGIN_HINTS[name];
33197
- if (status === "unknown") return "run a full test to confirm it is logged in";
33198
- return "";
33199
- }
33200
- function resolvedPath(checks) {
33201
- const path5 = checks?.find((check) => check.step === "path");
33202
- return path5?.ok ? path5.detail : "";
33203
- }
33204
- function statusRows(_name, checks, savedBinary) {
33205
- if (!checks) return [{ label: "Command", value: "checking...", tone: "muted" }];
33206
- const find = (step) => checks.find((check) => check.step === step);
33207
- const path5 = find("path");
33208
- if (!path5?.ok) {
33209
- if (savedBinary.trim()) return [{ label: "Command", value: path5?.detail ?? "not found", tone: "bad" }];
33210
- return [{ label: "Command", value: "not configured (not on the PATH)", tone: "muted" }];
33211
- }
33212
- const rows = [{ label: "Command", value: path5.detail, tone: "ok" }];
33213
- const version = find("version");
33214
- if (version) {
33215
- rows.push({
33216
- label: "Version",
33217
- value: version.ok ? version.detail : "could not be read",
33218
- tone: version.ok ? "ok" : "muted"
33219
- });
33220
- }
33221
- const login = find("login");
33222
- const prompt = find("prompt");
33223
- if (login) {
33224
- rows.push({ label: "Login", value: login.detail, tone: login.ok ? "ok" : "bad" });
33225
- } else if (prompt) {
33226
- rows.push({
33227
- label: "Login",
33228
- value: prompt.ok ? "confirmed by the test" : "see the test result",
33229
- tone: prompt.ok ? "ok" : "bad"
33230
- });
33231
- } else {
33232
- rows.push({ label: "Login", value: "not checked (use Run test)", tone: "muted" });
33233
- }
33234
- if (prompt) rows.push({ label: "Test", value: prompt.detail, tone: prompt.ok ? "ok" : "bad" });
33235
- return rows;
33236
- }
33237
- async function withBinaryEnv(name, binary, run) {
33238
- const key = `EDS_AGENT_BINARY_${name.toUpperCase()}`;
33239
- const previous = process.env[key];
33240
- process.env[key] = binary;
33241
- try {
33242
- return await run();
33243
- } finally {
33244
- if (previous === void 0) delete process.env[key];
33245
- else process.env[key] = previous;
33246
- }
33247
- }
33248
- var VERSION_TIMEOUT_MS, PROMPT_TIMEOUT_MS, TEST_PROMPT, INSTALL_HINTS, LOGIN_HINTS, fail3, pass;
33249
- var init_agent_status = __esm({
33250
- "packages/experience-design-system-cli/src/tui/settings/agents/agent-status.ts"() {
33028
+ var init_config_store = __esm({
33029
+ "packages/experience-design-system-cli/src/tui/settings/contentful-configuration/config-store.ts"() {
33251
33030
  "use strict";
33252
- init_src4();
33253
- VERSION_TIMEOUT_MS = 5e3;
33254
- PROMPT_TIMEOUT_MS = 6e4;
33255
- TEST_PROMPT = "Reply with the single word: ok";
33256
- INSTALL_HINTS = {
33257
- claude: "npm install -g @anthropic-ai/claude-code",
33258
- codex: "npm install -g @openai/codex",
33259
- opencode: "npm install -g opencode-ai",
33260
- cursor: "install Cursor\u2019s `cursor-agent` command",
33261
- copilot: "npm install -g @github/copilot"
33262
- };
33263
- LOGIN_HINTS = {
33264
- claude: "run `claude login`",
33265
- codex: "set OPENAI_API_KEY, or sign in with a ChatGPT account",
33266
- opencode: "run `opencode auth`",
33267
- cursor: "sign in from Cursor",
33268
- copilot: "run `copilot` and sign in"
33269
- };
33270
- fail3 = (step, detail) => ({ step, ok: false, detail });
33271
- pass = (step, detail) => ({ step, ok: true, detail });
33031
+ init_v1_store();
33272
33032
  }
33273
33033
  });
33274
33034
 
33275
- // packages/experience-design-system-cli/src/tui/settings/agents/AgentDetail.tsx
33035
+ // packages/experience-design-system-cli/src/tui/settings/contentful-configuration/ContentfulConfigScreen.tsx
33276
33036
  import { useEffect as useEffect22, useState as useState29 } from "react";
33277
33037
  import { Box as Box44, Text as Text46, useInput as useInput11 } from "ink";
33278
33038
  import TextInput4 from "ink-text-input";
33279
33039
  import { Fragment as Fragment17, jsx as jsx55, jsxs as jsxs45 } from "react/jsx-runtime";
33280
- function Section2({ title, children }) {
33281
- return /* @__PURE__ */ jsxs45(Box44, { flexDirection: "column", marginTop: 1, children: [
33282
- /* @__PURE__ */ jsx55(Text46, { bold: true, color: PALETTE.muted, children: title }),
33283
- children
33284
- ] });
33040
+ function debugFields(config) {
33041
+ return {
33042
+ space_id: config?.spaceId ?? "",
33043
+ environment_id: config?.environmentId ?? "",
33044
+ cma_token: config?.cmaToken ?? "",
33045
+ host: config?.host ?? "",
33046
+ default_component_dir: config?.defaultComponentDir ?? "",
33047
+ default_token_file: config?.defaultTokenFile ?? "",
33048
+ contentful_base_dir: config?.contentfulBaseDir ?? ""
33049
+ };
33285
33050
  }
33286
- function AgentDetail({
33287
- name,
33288
- config,
33289
- setConfig,
33290
- onBack
33291
- }) {
33292
- const settings = config.agents[name];
33293
- const [focusIndex, setFocusIndex] = useState29(0);
33051
+ function ConfigurationScreen({ onDone }) {
33052
+ const [stage, setStage] = useState29("loading");
33053
+ const [config, setConfig] = useState29(null);
33054
+ const [activeField, setActiveField] = useState29("spaceId");
33055
+ const [notice, setNotice] = useState29(null);
33056
+ const [lastSaved, setLastSaved] = useState29(null);
33294
33057
  const [editing, setEditing] = useState29(false);
33295
33058
  const [valueBeforeEdit, setValueBeforeEdit] = useState29("");
33296
- const [saving, setSaving] = useState29(false);
33297
- const [testing, setTesting] = useState29(false);
33298
- const [notice, setNotice] = useState29(null);
33299
- const [checks, setChecks] = useState29(void 0);
33300
33059
  useEffect22(() => {
33301
- let active = true;
33302
- setChecks(void 0);
33303
- void inspectAgent(name, settings.binary).then((result) => active && setChecks(result));
33304
- return () => {
33305
- active = false;
33306
- };
33307
- }, [name, settings.binary]);
33308
- const setField = (field, value) => {
33309
- setConfig({ ...config, agents: { ...config.agents, [name]: { ...settings, [field]: value } } });
33310
- setNotice(null);
33311
- };
33312
- const save = () => {
33313
- setSaving(true);
33060
+ readCredentials().then((cfg) => {
33061
+ setConfig(cfg);
33062
+ setStage("form");
33063
+ startDebugRun({
33064
+ flow: "settings/contentful-configuration",
33065
+ step: "01-configuration",
33066
+ menuOption: "Configuration",
33067
+ inputs: debugFields(cfg)
33068
+ });
33069
+ });
33070
+ }, []);
33071
+ function fieldValue(field) {
33072
+ if (!config) return "";
33073
+ return config[field] || "";
33074
+ }
33075
+ function setFieldValue(field, value) {
33076
+ if (!config) return;
33077
+ setConfig({ ...config, [field]: value });
33314
33078
  setNotice(null);
33315
- writeAgentConfig(config).then(() => {
33316
- applyBinaryOverrides(config);
33317
- setNotice({ kind: "success", text: `${AGENT_LABELS[name]} settings saved` });
33318
- }).catch(
33319
- (err) => setNotice({ kind: "error", text: err instanceof Error ? err.message : "Failed to save" })
33320
- ).finally(() => setSaving(false));
33321
- };
33322
- const runTest = () => {
33323
- setTesting(true);
33079
+ }
33080
+ function handleSave() {
33081
+ if (!config) return;
33082
+ setStage("saving");
33324
33083
  setNotice(null);
33325
- setChecks(void 0);
33326
- testAgent(name, settings.binary, settings.model).then(setChecks).catch(
33327
- (err) => setNotice({ kind: "error", text: err instanceof Error ? err.message : "The test could not run" })
33328
- ).finally(() => setTesting(false));
33329
- };
33330
- const focused = FOCUS_ORDER[focusIndex];
33331
- const focusedField = focused === "test" ? null : focused;
33084
+ writeCredentials(config).then(() => {
33085
+ setLastSaved(config);
33086
+ if (config.contentfulBaseDir) void startDebugSessionIn(config.contentfulBaseDir, { replace: true });
33087
+ setNotice({ kind: "success", text: "Configuration saved" });
33088
+ setStage("form");
33089
+ }).catch((err) => {
33090
+ setNotice({ kind: "error", text: err instanceof Error ? err.message : "Failed to save" });
33091
+ setStage("form");
33092
+ });
33093
+ }
33094
+ function quit() {
33095
+ void finishDebugRun(
33096
+ lastSaved ? { outputs: debugFields(lastSaved), status: "success", exitMethod: "saved" } : { outputs: {}, status: "success", exitMethod: "discarded" }
33097
+ );
33098
+ onDone();
33099
+ }
33332
33100
  useInput11((input, key) => {
33333
- if (saving || testing) return;
33101
+ if (stage === "loading" || stage === "saving") return;
33334
33102
  if (editing) {
33335
- if (key.escape && focusedField) {
33336
- setField(focusedField, valueBeforeEdit);
33103
+ if (key.escape) {
33104
+ setFieldValue(activeField, valueBeforeEdit);
33337
33105
  setEditing(false);
33338
33106
  }
33339
33107
  return;
33340
33108
  }
33341
33109
  if (key.escape || input === "q") {
33342
- onBack();
33110
+ quit();
33343
33111
  return;
33344
33112
  }
33345
33113
  if (input === "s") {
33346
- save();
33114
+ handleSave();
33347
33115
  return;
33348
33116
  }
33349
- if (key.upArrow) {
33350
- setFocusIndex((i) => (i - 1 + FOCUS_ORDER.length) % FOCUS_ORDER.length);
33117
+ if (input === "c") {
33118
+ setFieldValue(activeField, "");
33351
33119
  return;
33352
33120
  }
33353
- if (key.downArrow || key.tab) {
33354
- setFocusIndex((i) => (i + 1) % FOCUS_ORDER.length);
33121
+ if (key.tab || key.downArrow) {
33122
+ const idx = FIELD_ORDER.indexOf(activeField);
33123
+ setActiveField(FIELD_ORDER[(idx + 1) % FIELD_ORDER.length]);
33355
33124
  return;
33356
33125
  }
33357
- if (input === "c" && focusedField) {
33358
- setField(focusedField, "");
33126
+ if (key.upArrow) {
33127
+ const idx = FIELD_ORDER.indexOf(activeField);
33128
+ setActiveField(FIELD_ORDER[(idx - 1 + FIELD_ORDER.length) % FIELD_ORDER.length]);
33359
33129
  return;
33360
33130
  }
33361
33131
  if (key.return) {
33362
- if (focusedField) {
33363
- setValueBeforeEdit(settings[focusedField]);
33364
- setEditing(true);
33365
- } else {
33366
- runTest();
33367
- }
33132
+ setValueBeforeEdit(fieldValue(activeField));
33133
+ setEditing(true);
33368
33134
  }
33369
33135
  });
33370
- const status = checks ? statusFromChecks(name, checks, settings.binary) : "checking";
33371
- const hint = nextStepHint(name, status);
33372
- const pointer = (isFocused) => /* @__PURE__ */ jsx55(Text46, { color: isFocused ? PALETTE.accent : void 0, children: isFocused ? "\u276F" : " " });
33136
+ if (stage === "loading") {
33137
+ return /* @__PURE__ */ jsxs45(Box44, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
33138
+ /* @__PURE__ */ jsx55(Text46, { bold: true, children: "Configuration" }),
33139
+ /* @__PURE__ */ jsx55(Text46, { children: " " }),
33140
+ /* @__PURE__ */ jsx55(Text46, { color: PALETTE.accent, children: "Loading..." })
33141
+ ] });
33142
+ }
33373
33143
  return /* @__PURE__ */ jsxs45(Box44, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
33374
- /* @__PURE__ */ jsx55(Text46, { bold: true, children: AGENT_LABELS[name] }),
33375
- /* @__PURE__ */ jsx55(Text46, { color: PALETTE.muted, children: config.defaultAgent === name ? "This is the default agent." : `Runs the \`${AGENT_HINTS[name]}\` command.` }),
33376
- /* @__PURE__ */ jsxs45(Section2, { title: "STATUS", children: [
33377
- statusRows(name, checks, settings.binary).map((row) => /* @__PURE__ */ jsxs45(Box44, { gap: 1, paddingLeft: 2, children: [
33378
- /* @__PURE__ */ jsx55(Box44, { width: LABEL_WIDTH, flexShrink: 0, children: /* @__PURE__ */ jsx55(Text46, { color: PALETTE.muted, children: row.label }) }),
33379
- /* @__PURE__ */ jsx55(Text46, { color: TONE_COLOR[row.tone], children: row.value })
33380
- ] }, row.label)),
33381
- hint && /* @__PURE__ */ jsx55(Box44, { paddingLeft: 2, children: /* @__PURE__ */ jsxs45(Text46, { color: PALETTE.muted, children: [
33382
- "Next: ",
33383
- hint
33384
- ] }) })
33385
- ] }),
33386
- /* @__PURE__ */ jsx55(Section2, { title: "SETTINGS", children: FIELDS2.map((field) => {
33387
- const isFocused = focused === field;
33388
- const value = settings[field];
33144
+ /* @__PURE__ */ jsx55(Text46, { bold: true, children: "Configuration" }),
33145
+ /* @__PURE__ */ jsx55(Text46, { children: " " }),
33146
+ /* @__PURE__ */ jsx55(Box44, { flexDirection: "column", children: FIELD_ORDER.map((field) => {
33147
+ const isActive = activeField === field;
33148
+ const value = fieldValue(field);
33149
+ const display = field === "cmaToken" ? "\u2022".repeat(value.length) : value;
33389
33150
  return /* @__PURE__ */ jsxs45(Box44, { gap: 1, children: [
33390
- pointer(isFocused),
33391
- /* @__PURE__ */ jsx55(Box44, { width: LABEL_WIDTH, flexShrink: 0, children: /* @__PURE__ */ jsx55(Text46, { bold: isFocused, color: isFocused ? PALETTE.accent : PALETTE.muted, children: FIELD_LABEL[field] }) }),
33392
- isFocused && editing ? /* @__PURE__ */ jsx55(
33151
+ /* @__PURE__ */ jsx55(Text46, { color: isActive ? PALETTE.accent : void 0, children: isActive ? "\u276F" : " " }),
33152
+ /* @__PURE__ */ jsx55(Box44, { width: LABEL_WIDTH, flexShrink: 0, children: /* @__PURE__ */ jsx55(Text46, { bold: isActive, color: isActive ? PALETTE.accent : PALETTE.muted, children: FIELD_LABELS[field] }) }),
33153
+ isActive && editing ? /* @__PURE__ */ jsx55(
33393
33154
  TextInput4,
33394
33155
  {
33395
33156
  value,
33396
- onChange: (next) => setField(field, next),
33397
- onSubmit: () => setEditing(false)
33157
+ onChange: (next) => setFieldValue(field, next),
33158
+ onSubmit: () => setEditing(false),
33159
+ mask: field === "cmaToken" ? "\u2022" : void 0
33398
33160
  }
33399
- ) : /* @__PURE__ */ jsx55(Text46, { bold: true, children: value }),
33400
- !value && /* @__PURE__ */ jsx55(Text46, { color: PALETTE.muted, children: fieldHint(name, field) })
33161
+ ) : /* @__PURE__ */ jsx55(Text46, { bold: !!display, children: display || (FIELD_HINTS[field] ? "" : /* @__PURE__ */ jsx55(Text46, { color: PALETTE.muted, children: "(empty)" })) }),
33162
+ FIELD_HINTS[field] && /* @__PURE__ */ jsx55(Text46, { color: PALETTE.muted, children: FIELD_HINTS[field] })
33401
33163
  ] }, field);
33402
33164
  }) }),
33403
- /* @__PURE__ */ jsx55(Section2, { title: "ACTIONS", children: /* @__PURE__ */ jsxs45(Box44, { gap: 1, children: [
33404
- pointer(focused === "test"),
33405
- /* @__PURE__ */ jsx55(Box44, { width: LABEL_WIDTH, flexShrink: 0, children: /* @__PURE__ */ jsx55(Text46, { bold: focused === "test", color: focused === "test" ? PALETTE.accent : PALETTE.muted, children: "Run test" }) }),
33406
- /* @__PURE__ */ jsx55(Text46, { color: testing ? PALETTE.accent : PALETTE.muted, children: testing ? "running..." : "sends one small prompt (uses a few tokens)" })
33407
- ] }) }),
33408
33165
  notice && /* @__PURE__ */ jsxs45(Fragment17, { children: [
33409
33166
  /* @__PURE__ */ jsx55(Text46, { children: " " }),
33410
33167
  /* @__PURE__ */ jsxs45(Text46, { color: notice.kind === "success" ? PALETTE.success : PALETTE.error, children: [
@@ -33415,329 +33172,6 @@ function AgentDetail({
33415
33172
  ] }),
33416
33173
  /* @__PURE__ */ jsx55(Text46, { children: " " }),
33417
33174
  /* @__PURE__ */ jsx55(
33418
- ControlHints,
33419
- {
33420
- hints: editing ? [
33421
- { keys: "type", label: "edit" },
33422
- { keys: "\u2190/\u2192", label: "move cursor" },
33423
- { keys: "\u23CE", label: "done" },
33424
- { keys: "Esc", label: "cancel edit" }
33425
- ] : [
33426
- { keys: "\u2191/\u2193", label: "move" },
33427
- { keys: "\u23CE", label: focusedField ? "edit" : "run test" },
33428
- ...focusedField ? [{ keys: "c", label: "clear" }] : [],
33429
- { keys: "s", label: "save" },
33430
- { keys: "Esc/q", label: "back without saving" }
33431
- ]
33432
- }
33433
- )
33434
- ] });
33435
- }
33436
- var FOCUS_ORDER, FIELDS2, FIELD_LABEL, LABEL_WIDTH, TONE_COLOR, fieldHint;
33437
- var init_AgentDetail = __esm({
33438
- "packages/experience-design-system-cli/src/tui/settings/agents/AgentDetail.tsx"() {
33439
- "use strict";
33440
- init_home_theme();
33441
- init_control_hints();
33442
- init_agent_store();
33443
- init_agent_status();
33444
- init_apply_binary_overrides();
33445
- FOCUS_ORDER = ["binary", "model", "test"];
33446
- FIELDS2 = ["binary", "model"];
33447
- FIELD_LABEL = { binary: "Command path", model: "Model" };
33448
- LABEL_WIDTH = "Command path".length;
33449
- TONE_COLOR = {
33450
- ok: PALETTE.success,
33451
- bad: PALETTE.error,
33452
- muted: PALETTE.muted
33453
- };
33454
- fieldHint = (name, field) => field === "binary" ? `(empty: \`${AGENT_HINTS[name]}\` from the PATH)` : `(empty: ${defaultModelLabel(name)})`;
33455
- }
33456
- });
33457
-
33458
- // packages/experience-design-system-cli/src/tui/settings/agents/AgentStatusBadge.tsx
33459
- import { Text as Text47 } from "ink";
33460
- import { jsx as jsx56 } from "react/jsx-runtime";
33461
- function AgentStatusBadge({
33462
- name,
33463
- checks,
33464
- binary
33465
- }) {
33466
- const status = checks ? statusFromChecks(name, checks, binary) : "checking";
33467
- return /* @__PURE__ */ jsx56(Text47, { color: STATUS_COLOR[status], children: STATUS_TEXT[status] });
33468
- }
33469
- var STATUS_TEXT, STATUS_COLOR;
33470
- var init_AgentStatusBadge = __esm({
33471
- "packages/experience-design-system-cli/src/tui/settings/agents/AgentStatusBadge.tsx"() {
33472
- "use strict";
33473
- init_home_theme();
33474
- init_agent_status();
33475
- STATUS_TEXT = {
33476
- checking: "checking...",
33477
- ready: "ready",
33478
- "not-configured": "not configured",
33479
- "not-found": "not found",
33480
- "not-logged-in": "not logged in",
33481
- unknown: "found, login not checked"
33482
- };
33483
- STATUS_COLOR = {
33484
- checking: PALETTE.muted,
33485
- ready: PALETTE.success,
33486
- "not-configured": PALETTE.muted,
33487
- "not-found": PALETTE.error,
33488
- "not-logged-in": PALETTE.error,
33489
- unknown: PALETTE.muted
33490
- };
33491
- }
33492
- });
33493
-
33494
- // packages/experience-design-system-cli/src/tui/settings/agents/AgentScreens.tsx
33495
- import { useEffect as useEffect23, useState as useState30 } from "react";
33496
- import { Box as Box45, Text as Text48, useInput as useInput12 } from "ink";
33497
- import { Fragment as Fragment18, jsx as jsx57, jsxs as jsxs46 } from "react/jsx-runtime";
33498
- function AgentsScreen({ onDone }) {
33499
- const [config, setConfig] = useState30(null);
33500
- const [focus, setFocus] = useState30(0);
33501
- const [open, setOpen] = useState30(null);
33502
- const [notice, setNotice] = useState30(null);
33503
- const [checks, setChecks] = useState30({});
33504
- const inspectAll = (loaded) => {
33505
- for (const name of AGENT_NAMES) {
33506
- void inspectAgent(name, loaded.agents[name].binary).then(
33507
- (result) => setChecks((previous) => ({ ...previous, [name]: result }))
33508
- );
33509
- }
33510
- };
33511
- useEffect23(() => {
33512
- void readAgentConfig().then((loaded) => {
33513
- setConfig(loaded);
33514
- inspectAll(loaded);
33515
- startDebugRun({
33516
- flow: "settings/agents",
33517
- step: "01-agents",
33518
- menuOption: "Configuration > Agents",
33519
- inputs: { default_agent: loaded.defaultAgent }
33520
- });
33521
- });
33522
- }, []);
33523
- const cycleDefault = (step) => {
33524
- if (!config) return;
33525
- const index = AGENT_NAMES.indexOf(config.defaultAgent);
33526
- const next = { ...config, defaultAgent: AGENT_NAMES[(index + step + AGENT_NAMES.length) % AGENT_NAMES.length] };
33527
- setConfig(next);
33528
- writeAgentConfig(next).then(() => setNotice({ kind: "success", text: `Default agent is now ${AGENT_LABELS[next.defaultAgent]}` })).catch(
33529
- (err) => setNotice({ kind: "error", text: err instanceof Error ? err.message : "Failed to save" })
33530
- );
33531
- };
33532
- useInput12((input, key) => {
33533
- if (!config || open) return;
33534
- const row = ROWS[focus];
33535
- if (key.upArrow) {
33536
- setFocus((i) => (i - 1 + ROWS.length) % ROWS.length);
33537
- return;
33538
- }
33539
- if (key.downArrow || key.tab) {
33540
- setFocus((i) => (i + 1) % ROWS.length);
33541
- return;
33542
- }
33543
- if (row.kind === "default" && key.leftArrow) {
33544
- cycleDefault(-1);
33545
- return;
33546
- }
33547
- if (row.kind === "default" && key.rightArrow) {
33548
- cycleDefault(1);
33549
- return;
33550
- }
33551
- if (key.return) {
33552
- if (row.kind === "default") cycleDefault(1);
33553
- else setOpen(row.name);
33554
- return;
33555
- }
33556
- if (key.escape || input === "q") {
33557
- void finishDebugRun({ outputs: { default_agent: config.defaultAgent }, status: "success", exitMethod: "saved" });
33558
- onDone();
33559
- }
33560
- });
33561
- if (!config) {
33562
- return /* @__PURE__ */ jsxs46(Box45, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
33563
- /* @__PURE__ */ jsx57(Text48, { bold: true, children: "Agents" }),
33564
- /* @__PURE__ */ jsx57(Text48, { children: " " }),
33565
- /* @__PURE__ */ jsx57(Text48, { color: PALETTE.accent, children: "Loading..." })
33566
- ] });
33567
- }
33568
- if (open) {
33569
- return /* @__PURE__ */ jsx57(
33570
- AgentDetail,
33571
- {
33572
- name: open,
33573
- config,
33574
- setConfig,
33575
- onBack: () => {
33576
- setOpen(null);
33577
- void readAgentConfig().then((saved) => {
33578
- setConfig(saved);
33579
- inspectAll(saved);
33580
- });
33581
- }
33582
- }
33583
- );
33584
- }
33585
- return /* @__PURE__ */ jsxs46(Box45, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
33586
- /* @__PURE__ */ jsx57(Text48, { bold: true, children: "Agents" }),
33587
- /* @__PURE__ */ jsx57(Text48, { color: PALETTE.muted, children: "The coding agent the CLI runs, and what was found for each one." }),
33588
- /* @__PURE__ */ jsx57(Text48, { children: " " }),
33589
- ROWS.map((row, index) => {
33590
- const isFocused = index === focus;
33591
- const pointer = /* @__PURE__ */ jsx57(Text48, { color: isFocused ? PALETTE.accent : void 0, children: isFocused ? "\u276F" : " " });
33592
- if (row.kind === "default") {
33593
- return /* @__PURE__ */ jsx57(Box45, { flexDirection: "column", marginBottom: 1, children: /* @__PURE__ */ jsxs46(Box45, { gap: 1, children: [
33594
- pointer,
33595
- /* @__PURE__ */ jsx57(Text48, { bold: isFocused, color: isFocused ? PALETTE.accent : PALETTE.muted, children: "Default agent" }),
33596
- /* @__PURE__ */ jsx57(Text48, { bold: true, children: `\u2039 ${AGENT_LABELS[config.defaultAgent]} \u203A` })
33597
- ] }) }, "default");
33598
- }
33599
- const saved = config.agents[row.name].binary;
33600
- return /* @__PURE__ */ jsxs46(Box45, { gap: 1, children: [
33601
- pointer,
33602
- /* @__PURE__ */ jsx57(Box45, { width: 16, flexShrink: 0, children: /* @__PURE__ */ jsx57(Text48, { bold: isFocused, color: isFocused ? PALETTE.accent : void 0, children: AGENT_LABELS[row.name] }) }),
33603
- /* @__PURE__ */ jsx57(Box45, { width: 26, flexShrink: 0, children: /* @__PURE__ */ jsx57(AgentStatusBadge, { name: row.name, checks: checks[row.name], binary: saved }) }),
33604
- /* @__PURE__ */ jsx57(Text48, { color: PALETTE.muted, children: shortenPath(resolvedPath(checks[row.name]) || saved) }),
33605
- row.name === config.defaultAgent && /* @__PURE__ */ jsx57(Text48, { color: PALETTE.success, children: "(default)" })
33606
- ] }, row.name);
33607
- }),
33608
- notice && /* @__PURE__ */ jsxs46(Fragment18, { children: [
33609
- /* @__PURE__ */ jsx57(Text48, { children: " " }),
33610
- /* @__PURE__ */ jsxs46(Text48, { color: notice.kind === "success" ? PALETTE.success : PALETTE.error, children: [
33611
- notice.kind === "success" ? "\u2713" : "\u2717",
33612
- " ",
33613
- notice.text
33614
- ] })
33615
- ] }),
33616
- /* @__PURE__ */ jsx57(Text48, { children: " " }),
33617
- /* @__PURE__ */ jsx57(
33618
- ControlHints,
33619
- {
33620
- hints: ROWS[focus].kind === "default" ? [
33621
- { keys: "\u2191/\u2193", label: "move" },
33622
- { keys: "\u2190/\u2192", label: "change default agent" },
33623
- { keys: "Esc/q", label: "back" }
33624
- ] : [
33625
- { keys: "\u2191/\u2193", label: "move" },
33626
- { keys: "\u23CE", label: "open" },
33627
- { keys: "Esc/q", label: "back" }
33628
- ]
33629
- }
33630
- )
33631
- ] });
33632
- }
33633
- var ROWS, MAX_PATH_WIDTH, shortenPath;
33634
- var init_AgentScreens = __esm({
33635
- "packages/experience-design-system-cli/src/tui/settings/agents/AgentScreens.tsx"() {
33636
- "use strict";
33637
- init_src4();
33638
- init_home_theme();
33639
- init_control_hints();
33640
- init_debug_store();
33641
- init_agent_store();
33642
- init_agent_status();
33643
- init_AgentDetail();
33644
- init_AgentStatusBadge();
33645
- ROWS = [{ kind: "default" }, ...AGENT_NAMES.map((name) => ({ kind: "agent", name }))];
33646
- MAX_PATH_WIDTH = 44;
33647
- shortenPath = (path5) => path5.length > MAX_PATH_WIDTH ? `\u2026${path5.slice(-(MAX_PATH_WIDTH - 1))}` : path5;
33648
- }
33649
- });
33650
-
33651
- // packages/experience-design-system-cli/src/tui/settings/shared/FieldForm.tsx
33652
- import { useState as useState31 } from "react";
33653
- import { Box as Box46, Text as Text49, useInput as useInput13 } from "ink";
33654
- import TextInput5 from "ink-text-input";
33655
- import { Fragment as Fragment19, jsx as jsx58, jsxs as jsxs47 } from "react/jsx-runtime";
33656
- function FieldForm({
33657
- title,
33658
- subtitle,
33659
- fields,
33660
- values,
33661
- onChange,
33662
- onSave,
33663
- onQuit,
33664
- notice,
33665
- busy = false,
33666
- footer
33667
- }) {
33668
- const [active, setActive] = useState31(0);
33669
- const [editing, setEditing] = useState31(false);
33670
- const [valueBeforeEdit, setValueBeforeEdit] = useState31("");
33671
- const labelWidth = Math.max(...fields.map((field) => field.label.length));
33672
- const current = fields[active];
33673
- useInput13((input, key) => {
33674
- if (busy) return;
33675
- if (editing) {
33676
- if (key.escape) {
33677
- onChange(current.key, valueBeforeEdit);
33678
- setEditing(false);
33679
- }
33680
- return;
33681
- }
33682
- if (key.escape || input === "q") {
33683
- onQuit();
33684
- return;
33685
- }
33686
- if (input === "s") {
33687
- onSave();
33688
- return;
33689
- }
33690
- if (input === "c") {
33691
- onChange(current.key, "");
33692
- return;
33693
- }
33694
- if (key.tab || key.downArrow) {
33695
- setActive((i) => (i + 1) % fields.length);
33696
- return;
33697
- }
33698
- if (key.upArrow) {
33699
- setActive((i) => (i - 1 + fields.length) % fields.length);
33700
- return;
33701
- }
33702
- if (key.return) {
33703
- setValueBeforeEdit(values[current.key]);
33704
- setEditing(true);
33705
- }
33706
- });
33707
- return /* @__PURE__ */ jsxs47(Box46, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
33708
- /* @__PURE__ */ jsx58(Text49, { bold: true, children: title }),
33709
- subtitle && /* @__PURE__ */ jsx58(Text49, { color: PALETTE.muted, children: subtitle }),
33710
- /* @__PURE__ */ jsx58(Text49, { children: " " }),
33711
- /* @__PURE__ */ jsx58(Box46, { flexDirection: "column", children: fields.map((field, index) => {
33712
- const isActive = index === active;
33713
- const value = values[field.key];
33714
- const display = field.masked ? "\u2022".repeat(value.length) : value;
33715
- return /* @__PURE__ */ jsxs47(Box46, { gap: 1, children: [
33716
- /* @__PURE__ */ jsx58(Text49, { color: isActive ? PALETTE.accent : void 0, children: isActive ? "\u276F" : " " }),
33717
- /* @__PURE__ */ jsx58(Box46, { width: labelWidth, flexShrink: 0, children: /* @__PURE__ */ jsx58(Text49, { bold: isActive, color: isActive ? PALETTE.accent : PALETTE.muted, children: field.label }) }),
33718
- isActive && editing ? /* @__PURE__ */ jsx58(
33719
- TextInput5,
33720
- {
33721
- value,
33722
- onChange: (next) => onChange(field.key, next),
33723
- onSubmit: () => setEditing(false),
33724
- mask: field.masked ? "\u2022" : void 0
33725
- }
33726
- ) : /* @__PURE__ */ jsx58(Text49, { bold: !!display, children: display || (field.hint ? "" : /* @__PURE__ */ jsx58(Text49, { color: PALETTE.muted, children: "(empty)" })) }),
33727
- field.hint && /* @__PURE__ */ jsx58(Text49, { color: PALETTE.muted, children: field.hint })
33728
- ] }, field.key);
33729
- }) }),
33730
- notice && /* @__PURE__ */ jsxs47(Fragment19, { children: [
33731
- /* @__PURE__ */ jsx58(Text49, { children: " " }),
33732
- /* @__PURE__ */ jsxs47(Text49, { color: notice.kind === "success" ? PALETTE.success : PALETTE.error, children: [
33733
- notice.kind === "success" ? "\u2713" : "\u2717",
33734
- " ",
33735
- notice.text
33736
- ] })
33737
- ] }),
33738
- footer,
33739
- /* @__PURE__ */ jsx58(Text49, { children: " " }),
33740
- /* @__PURE__ */ jsx58(
33741
33175
  ControlHints,
33742
33176
  {
33743
33177
  hints: editing ? [
@@ -33750,219 +33184,53 @@ function FieldForm({
33750
33184
  { keys: "\u23CE", label: "edit" },
33751
33185
  { keys: "c", label: "clear" },
33752
33186
  { keys: "s", label: "save" },
33753
- { keys: "Esc/q", label: "back without saving" }
33754
- ]
33755
- }
33756
- )
33757
- ] });
33758
- }
33759
- var init_FieldForm = __esm({
33760
- "packages/experience-design-system-cli/src/tui/settings/shared/FieldForm.tsx"() {
33761
- "use strict";
33762
- init_home_theme();
33763
- init_control_hints();
33764
- }
33765
- });
33766
-
33767
- // packages/experience-design-system-cli/src/tui/settings/contentful-configuration/config-store.ts
33768
- async function readCredentials() {
33769
- const store = await readV1Store();
33770
- return {
33771
- spaceId: store.spaceId || "",
33772
- environmentId: store.environmentId || "",
33773
- cmaToken: store.cmaToken || "",
33774
- host: store.host || "",
33775
- defaultComponentDir: store.defaultComponentDir || "",
33776
- defaultTokenFile: store.defaultTokenFile || "",
33777
- contentfulBaseDir: store.contentfulBaseDir || ""
33778
- };
33779
- }
33780
- async function writeCredentials(config) {
33781
- const existing = await readV1Store();
33782
- const merged = {
33783
- ...existing,
33784
- ...config
33785
- };
33786
- Object.keys(merged).forEach((k) => {
33787
- if (!merged[k]) delete merged[k];
33788
- });
33789
- await writeV1Store(merged);
33790
- }
33791
- var init_config_store = __esm({
33792
- "packages/experience-design-system-cli/src/tui/settings/contentful-configuration/config-store.ts"() {
33793
- "use strict";
33794
- init_v1_store();
33795
- }
33796
- });
33797
-
33798
- // packages/experience-design-system-cli/src/tui/settings/contentful-configuration/ProjectConfigScreen.tsx
33799
- import { useEffect as useEffect24, useState as useState32 } from "react";
33800
- import { Box as Box47, Text as Text50 } from "ink";
33801
- import { jsx as jsx59, jsxs as jsxs48 } from "react/jsx-runtime";
33802
- function debugFields(config) {
33803
- return {
33804
- space_id: config?.spaceId ?? "",
33805
- environment_id: config?.environmentId ?? "",
33806
- cma_token: config?.cmaToken ?? "",
33807
- host: config?.host ?? "",
33808
- default_component_dir: config?.defaultComponentDir ?? "",
33809
- default_token_file: config?.defaultTokenFile ?? "",
33810
- contentful_base_dir: config?.contentfulBaseDir ?? ""
33811
- };
33812
- }
33813
- function ProjectConfigScreen({ onDone }) {
33814
- const [config, setConfig] = useState32(null);
33815
- const [saving, setSaving] = useState32(false);
33816
- const [notice, setNotice] = useState32(null);
33817
- const [lastSaved, setLastSaved] = useState32(null);
33818
- useEffect24(() => {
33819
- void readCredentials().then((cfg) => {
33820
- setConfig(cfg);
33821
- startDebugRun({
33822
- flow: "settings/contentful-configuration",
33823
- step: "01-configuration",
33824
- menuOption: "Configuration > Project",
33825
- inputs: debugFields(cfg)
33826
- });
33827
- });
33828
- }, []);
33829
- if (!config) {
33830
- return /* @__PURE__ */ jsxs48(Box47, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
33831
- /* @__PURE__ */ jsx59(Text50, { bold: true, children: "Project" }),
33832
- /* @__PURE__ */ jsx59(Text50, { children: " " }),
33833
- /* @__PURE__ */ jsx59(Text50, { color: PALETTE.accent, children: "Loading..." })
33834
- ] });
33835
- }
33836
- const save = () => {
33837
- setSaving(true);
33838
- setNotice(null);
33839
- writeCredentials(config).then(() => {
33840
- setLastSaved(config);
33841
- if (config.contentfulBaseDir) void startDebugSessionIn(config.contentfulBaseDir, { replace: true });
33842
- setNotice({ kind: "success", text: "Project settings saved" });
33843
- }).catch((err) => {
33844
- setNotice({ kind: "error", text: err instanceof Error ? err.message : "Failed to save" });
33845
- }).finally(() => setSaving(false));
33846
- };
33847
- const quit = () => {
33848
- void finishDebugRun(
33849
- lastSaved ? { outputs: debugFields(lastSaved), status: "success", exitMethod: "saved" } : { outputs: {}, status: "success", exitMethod: "discarded" }
33850
- );
33851
- onDone();
33852
- };
33853
- return /* @__PURE__ */ jsx59(
33854
- FieldForm,
33855
- {
33856
- title: "Project",
33857
- subtitle: "The Contentful space and where the CLI keeps its files.",
33858
- fields: FIELDS3,
33859
- values: valuesOf(config),
33860
- onChange: (key, value) => {
33861
- setConfig({ ...config, [key]: value });
33862
- setNotice(null);
33863
- },
33864
- onSave: save,
33865
- onQuit: quit,
33866
- notice,
33867
- busy: saving
33868
- }
33869
- );
33870
- }
33871
- var FIELDS3, valuesOf;
33872
- var init_ProjectConfigScreen = __esm({
33873
- "packages/experience-design-system-cli/src/tui/settings/contentful-configuration/ProjectConfigScreen.tsx"() {
33874
- "use strict";
33875
- init_home_theme();
33876
- init_debug_store();
33877
- init_FieldForm();
33878
- init_config_store();
33879
- FIELDS3 = [
33880
- { key: "spaceId", label: "Space ID" },
33881
- { key: "environmentId", label: "Environment ID" },
33882
- { key: "cmaToken", label: "CMA Token", masked: true },
33883
- { key: "host", label: "API Host" },
33884
- { key: "defaultComponentDir", label: "Default component directory" },
33885
- { key: "defaultTokenFile", label: "Default token file" },
33886
- { key: "contentfulBaseDir", label: "Root Project Directory", hint: "(where .contentful goes)" }
33887
- ];
33888
- valuesOf = (config) => Object.fromEntries(FIELDS3.map(({ key }) => [key, config[key] || ""]));
33889
- }
33890
- });
33891
-
33892
- // packages/experience-design-system-cli/src/tui/settings/contentful-configuration/ContentfulConfigScreen.tsx
33893
- import { useState as useState33 } from "react";
33894
- import { Box as Box48, Text as Text51, useInput as useInput14 } from "ink";
33895
- import { jsx as jsx60, jsxs as jsxs49 } from "react/jsx-runtime";
33896
- function ConfigurationScreen({ onDone }) {
33897
- const [focus, setFocus] = useState33(0);
33898
- const [open, setOpen] = useState33(null);
33899
- const close = () => setOpen(null);
33900
- useInput14((input, key) => {
33901
- if (open) return;
33902
- if (key.upArrow) {
33903
- setFocus((i) => (i - 1 + SECTIONS.length) % SECTIONS.length);
33904
- return;
33905
- }
33906
- if (key.downArrow || key.tab) {
33907
- setFocus((i) => (i + 1) % SECTIONS.length);
33908
- return;
33909
- }
33910
- if (key.return) {
33911
- setOpen(SECTIONS[focus].id);
33912
- return;
33913
- }
33914
- if (key.escape || input === "q") onDone();
33915
- });
33916
- if (open === "project") return /* @__PURE__ */ jsx60(ProjectConfigScreen, { onDone: close });
33917
- if (open === "agents") return /* @__PURE__ */ jsx60(AgentsScreen, { onDone: close });
33918
- return /* @__PURE__ */ jsxs49(Box48, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
33919
- /* @__PURE__ */ jsx60(Text51, { bold: true, children: "Configuration" }),
33920
- /* @__PURE__ */ jsx60(Text51, { children: " " }),
33921
- SECTIONS.map((section, index) => /* @__PURE__ */ jsxs49(Box48, { gap: 1, children: [
33922
- /* @__PURE__ */ jsx60(Text51, { color: index === focus ? PALETTE.accent : void 0, children: index === focus ? "\u276F" : " " }),
33923
- /* @__PURE__ */ jsx60(Box48, { width: 9, flexShrink: 0, children: /* @__PURE__ */ jsx60(Text51, { bold: index === focus, color: index === focus ? PALETTE.accent : void 0, children: section.label }) }),
33924
- /* @__PURE__ */ jsx60(Text51, { color: PALETTE.muted, children: section.description })
33925
- ] }, section.id)),
33926
- /* @__PURE__ */ jsx60(Text51, { children: " " }),
33927
- /* @__PURE__ */ jsx60(
33928
- ControlHints,
33929
- {
33930
- hints: [
33931
- { keys: "\u2191/\u2193", label: "move" },
33932
- { keys: "\u23CE", label: "open" },
33933
- { keys: "Esc/q", label: "back" }
33187
+ { keys: "Esc/q", label: "quit without saving" }
33934
33188
  ]
33935
33189
  }
33936
33190
  )
33937
33191
  ] });
33938
33192
  }
33939
- var SECTIONS;
33193
+ var FIELD_ORDER, FIELD_LABELS, FIELD_HINTS, LABEL_WIDTH;
33940
33194
  var init_ContentfulConfigScreen = __esm({
33941
33195
  "packages/experience-design-system-cli/src/tui/settings/contentful-configuration/ContentfulConfigScreen.tsx"() {
33942
33196
  "use strict";
33943
- init_home_theme();
33197
+ init_theme();
33198
+ init_config_store();
33199
+ init_debug_store();
33944
33200
  init_control_hints();
33945
- init_AgentScreens();
33946
- init_ProjectConfigScreen();
33947
- SECTIONS = [
33948
- {
33949
- id: "project",
33950
- label: "Project",
33951
- description: "Contentful space, credentials, defaults and where .contentful goes"
33952
- },
33953
- { id: "agents", label: "Agents", description: "Which coding agent the CLI uses, and each agent\u2019s settings" }
33201
+ FIELD_ORDER = [
33202
+ "spaceId",
33203
+ "environmentId",
33204
+ "cmaToken",
33205
+ "host",
33206
+ "defaultComponentDir",
33207
+ "defaultTokenFile",
33208
+ "contentfulBaseDir"
33954
33209
  ];
33210
+ FIELD_LABELS = {
33211
+ spaceId: "Space ID",
33212
+ environmentId: "Environment ID",
33213
+ cmaToken: "CMA Token",
33214
+ host: "API Host",
33215
+ defaultComponentDir: "Default component directory",
33216
+ defaultTokenFile: "Default token file",
33217
+ contentfulBaseDir: "Root Project Directory"
33218
+ };
33219
+ FIELD_HINTS = {
33220
+ contentfulBaseDir: "(where .contentful goes)"
33221
+ };
33222
+ LABEL_WIDTH = Math.max(...Object.values(FIELD_LABELS).map((label) => label.length));
33955
33223
  }
33956
33224
  });
33957
33225
 
33958
33226
  // packages/experience-design-system-cli/src/tui/settings/opt-in-analytics/screen.tsx
33959
- import { useEffect as useEffect25, useState as useState34 } from "react";
33960
- import { Box as Box49, Text as Text52, useInput as useInput15 } from "ink";
33961
- import { Fragment as Fragment20, jsx as jsx61, jsxs as jsxs50 } from "react/jsx-runtime";
33227
+ import { useEffect as useEffect23, useState as useState30 } from "react";
33228
+ import { Box as Box45, Text as Text47, useInput as useInput12 } from "ink";
33229
+ import { Fragment as Fragment18, jsx as jsx56, jsxs as jsxs46 } from "react/jsx-runtime";
33962
33230
  function OptInAnalyticsScreen({ onDone }) {
33963
- const [loading, setLoading] = useState34(true);
33964
- const [enabled, setEnabled] = useState34(true);
33965
- useEffect25(() => {
33231
+ const [loading, setLoading] = useState30(true);
33232
+ const [enabled, setEnabled] = useState30(true);
33233
+ useEffect23(() => {
33966
33234
  readAnalyticsSetting().then((setting) => {
33967
33235
  setEnabled(setting.enabled);
33968
33236
  setLoading(false);
@@ -33974,7 +33242,7 @@ function OptInAnalyticsScreen({ onDone }) {
33974
33242
  });
33975
33243
  });
33976
33244
  }, []);
33977
- useInput15((input, key) => {
33245
+ useInput12((input, key) => {
33978
33246
  if (loading) return;
33979
33247
  if (key.return || input === " ") {
33980
33248
  setEnabled((current) => {
@@ -33989,21 +33257,21 @@ function OptInAnalyticsScreen({ onDone }) {
33989
33257
  onDone();
33990
33258
  }
33991
33259
  });
33992
- return /* @__PURE__ */ jsxs50(Box49, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
33993
- /* @__PURE__ */ jsx61(Text52, { bold: true, children: "Settings \u203A Opt-in Analytics" }),
33994
- /* @__PURE__ */ jsx61(Text52, { children: " " }),
33995
- loading ? /* @__PURE__ */ jsx61(Text52, { color: PALETTE.muted, children: "Loading\u2026" }) : /* @__PURE__ */ jsxs50(Fragment20, { children: [
33996
- /* @__PURE__ */ jsxs50(Text52, { children: [
33260
+ return /* @__PURE__ */ jsxs46(Box45, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
33261
+ /* @__PURE__ */ jsx56(Text47, { bold: true, children: "Settings \u203A Opt-in Analytics" }),
33262
+ /* @__PURE__ */ jsx56(Text47, { children: " " }),
33263
+ loading ? /* @__PURE__ */ jsx56(Text47, { color: PALETTE.muted, children: "Loading\u2026" }) : /* @__PURE__ */ jsxs46(Fragment18, { children: [
33264
+ /* @__PURE__ */ jsxs46(Text47, { children: [
33997
33265
  "Share anonymous usage data:",
33998
33266
  " ",
33999
- /* @__PURE__ */ jsx61(Text52, { bold: true, color: enabled ? PALETTE.success : PALETTE.muted, children: enabled ? "On" : "Off" })
33267
+ /* @__PURE__ */ jsx56(Text47, { bold: true, color: enabled ? PALETTE.success : PALETTE.muted, children: enabled ? "On" : "Off" })
34000
33268
  ] }),
34001
- /* @__PURE__ */ jsx61(Text52, { children: " " }),
34002
- /* @__PURE__ */ jsx61(Text52, { color: PALETTE.muted, children: "Shares which CLI commands are used and where imports succeed or fail." }),
34003
- /* @__PURE__ */ jsx61(Text52, { color: PALETTE.muted, children: "Never includes source code, file paths, credentials, or authored content." })
33269
+ /* @__PURE__ */ jsx56(Text47, { children: " " }),
33270
+ /* @__PURE__ */ jsx56(Text47, { color: PALETTE.muted, children: "Shares which CLI commands are used and where imports succeed or fail." }),
33271
+ /* @__PURE__ */ jsx56(Text47, { color: PALETTE.muted, children: "Never includes source code, file paths, credentials, or authored content." })
34004
33272
  ] }),
34005
- /* @__PURE__ */ jsx61(Text52, { children: " " }),
34006
- /* @__PURE__ */ jsx61(
33273
+ /* @__PURE__ */ jsx56(Text47, { children: " " }),
33274
+ /* @__PURE__ */ jsx56(
34007
33275
  ControlHints,
34008
33276
  {
34009
33277
  hints: [
@@ -34017,7 +33285,7 @@ function OptInAnalyticsScreen({ onDone }) {
34017
33285
  var init_screen11 = __esm({
34018
33286
  "packages/experience-design-system-cli/src/tui/settings/opt-in-analytics/screen.tsx"() {
34019
33287
  "use strict";
34020
- init_home_theme();
33288
+ init_theme();
34021
33289
  init_analytics_store();
34022
33290
  init_debug_store();
34023
33291
  init_control_hints();
@@ -34025,12 +33293,12 @@ var init_screen11 = __esm({
34025
33293
  });
34026
33294
 
34027
33295
  // packages/experience-design-system-cli/src/tui/upgrade/PageContainer.tsx
34028
- import { useEffect as useEffect26, useState as useState35 } from "react";
34029
- import { Box as Box50, Text as Text53, useInput as useInput16 } from "ink";
34030
- import { jsx as jsx62, jsxs as jsxs51 } from "react/jsx-runtime";
33296
+ import { useEffect as useEffect24, useState as useState31 } from "react";
33297
+ import { Box as Box46, Text as Text48, useInput as useInput13 } from "ink";
33298
+ import { jsx as jsx57, jsxs as jsxs47 } from "react/jsx-runtime";
34031
33299
  function UpgradeScreen({ onDone }) {
34032
- const [upgradeCheck, setUpgradeCheck] = useState35();
34033
- useEffect26(() => {
33300
+ const [upgradeCheck, setUpgradeCheck] = useState31();
33301
+ useEffect24(() => {
34034
33302
  startDebugRun({
34035
33303
  flow: "upgrade",
34036
33304
  step: "01-upgrade",
@@ -34039,7 +33307,7 @@ function UpgradeScreen({ onDone }) {
34039
33307
  });
34040
33308
  checkForUpgrade().then(setUpgradeCheck).catch(() => setUpgradeCheck({ status: "error" }));
34041
33309
  }, []);
34042
- useInput16((_input, key) => {
33310
+ useInput13((_input, key) => {
34043
33311
  if (key.return) {
34044
33312
  void finishDebugRun({
34045
33313
  outputs: upgradeCheck ?? {},
@@ -34050,12 +33318,12 @@ function UpgradeScreen({ onDone }) {
34050
33318
  return;
34051
33319
  }
34052
33320
  });
34053
- return /* @__PURE__ */ jsxs51(Box50, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
34054
- /* @__PURE__ */ jsx62(Text53, { bold: true, children: "Upgrade" }),
34055
- /* @__PURE__ */ jsx62(Text53, { children: " " }),
33321
+ return /* @__PURE__ */ jsxs47(Box46, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
33322
+ /* @__PURE__ */ jsx57(Text48, { bold: true, children: "Upgrade" }),
33323
+ /* @__PURE__ */ jsx57(Text48, { children: " " }),
34056
33324
  renderBody(upgradeCheck),
34057
- /* @__PURE__ */ jsx62(Text53, { children: " " }),
34058
- /* @__PURE__ */ jsxs51(Text53, { bold: true, color: PALETTE.accent, children: [
33325
+ /* @__PURE__ */ jsx57(Text48, { children: " " }),
33326
+ /* @__PURE__ */ jsxs47(Text48, { bold: true, color: PALETTE.accent, children: [
34059
33327
  FOCUS_MARKER,
34060
33328
  " Go Back"
34061
33329
  ] })
@@ -34063,40 +33331,41 @@ function UpgradeScreen({ onDone }) {
34063
33331
  }
34064
33332
  function renderBody(upgradeCheck) {
34065
33333
  if (!upgradeCheck) {
34066
- return /* @__PURE__ */ jsx62(Text53, { color: PALETTE.muted, children: "Checking for updates\u2026" });
33334
+ return /* @__PURE__ */ jsx57(Text48, { color: PALETTE.muted, children: "Checking for updates\u2026" });
34067
33335
  }
34068
33336
  if (upgradeCheck.status === "error") {
34069
- return /* @__PURE__ */ jsx62(Text53, { color: PALETTE.warning, children: "Couldn't check for updates \u2014 check your network connection and try again." });
33337
+ return /* @__PURE__ */ jsx57(Text48, { color: PALETTE.warning, children: "Couldn't check for updates \u2014 check your network connection and try again." });
34070
33338
  }
34071
33339
  if (upgradeCheck.status === "up-to-date") {
34072
- return /* @__PURE__ */ jsxs51(Text53, { color: PALETTE.success, children: [
33340
+ return /* @__PURE__ */ jsxs47(Text48, { color: PALETTE.success, children: [
34073
33341
  "You're already on the latest version (v",
34074
33342
  upgradeCheck.current,
34075
33343
  ")."
34076
33344
  ] });
34077
33345
  }
34078
- return /* @__PURE__ */ jsxs51(Box50, { flexDirection: "column", children: [
34079
- /* @__PURE__ */ jsxs51(Text53, { color: PALETTE.muted, children: [
34080
- /* @__PURE__ */ jsxs51(Text53, { bold: true, color: PALETTE.success, children: [
33346
+ return /* @__PURE__ */ jsxs47(Box46, { flexDirection: "column", children: [
33347
+ /* @__PURE__ */ jsxs47(Text48, { color: PALETTE.muted, children: [
33348
+ /* @__PURE__ */ jsxs47(Text48, { bold: true, color: PALETTE.success, children: [
34081
33349
  "v",
34082
33350
  upgradeCheck.latest
34083
33351
  ] }),
34084
33352
  " ",
34085
33353
  "is available (you're on ",
34086
- /* @__PURE__ */ jsxs51(Text53, { bold: true, children: [
33354
+ /* @__PURE__ */ jsxs47(Text48, { bold: true, children: [
34087
33355
  "v",
34088
33356
  upgradeCheck.current
34089
33357
  ] }),
34090
33358
  "). Exit this program, cd into the root of your local clone of contentful/experience-design-system-sdk-public, then run:"
34091
33359
  ] }),
34092
- /* @__PURE__ */ jsx62(Text53, { children: " " }),
34093
- /* @__PURE__ */ jsx62(Box50, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.border, paddingX: 1, children: UPGRADE_COMMANDS.map((cmd) => /* @__PURE__ */ jsx62(Text53, { bold: true, children: cmd }, cmd)) })
33360
+ /* @__PURE__ */ jsx57(Text48, { children: " " }),
33361
+ /* @__PURE__ */ jsx57(Box46, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.border, paddingX: 1, children: UPGRADE_COMMANDS.map((cmd) => /* @__PURE__ */ jsx57(Text48, { bold: true, children: cmd }, cmd)) })
34094
33362
  ] });
34095
33363
  }
34096
33364
  var UPGRADE_COMMANDS;
34097
33365
  var init_PageContainer4 = __esm({
34098
33366
  "packages/experience-design-system-cli/src/tui/upgrade/PageContainer.tsx"() {
34099
33367
  "use strict";
33368
+ init_theme();
34100
33369
  init_home_theme();
34101
33370
  init_version();
34102
33371
  init_debug_store();
@@ -34105,13 +33374,13 @@ var init_PageContainer4 = __esm({
34105
33374
  });
34106
33375
 
34107
33376
  // packages/experience-design-system-cli/src/tui/settings/debug-mode/screen.tsx
34108
- import { useEffect as useEffect27, useState as useState36 } from "react";
34109
- import { Box as Box51, Text as Text54, useInput as useInput17 } from "ink";
34110
- import { jsx as jsx63, jsxs as jsxs52 } from "react/jsx-runtime";
33377
+ import { useEffect as useEffect25, useState as useState32 } from "react";
33378
+ import { Box as Box47, Text as Text49, useInput as useInput14 } from "ink";
33379
+ import { jsx as jsx58, jsxs as jsxs48 } from "react/jsx-runtime";
34111
33380
  function DebugModeScreen({ onDone }) {
34112
- const [loading, setLoading] = useState36(true);
34113
- const [enabled, setEnabled] = useState36(true);
34114
- useEffect27(() => {
33381
+ const [loading, setLoading] = useState32(true);
33382
+ const [enabled, setEnabled] = useState32(true);
33383
+ useEffect25(() => {
34115
33384
  readDebugModeSetting().then((setting) => {
34116
33385
  setEnabled(setting.enabled);
34117
33386
  setLoading(false);
@@ -34123,7 +33392,7 @@ function DebugModeScreen({ onDone }) {
34123
33392
  });
34124
33393
  });
34125
33394
  }, []);
34126
- useInput17((input, key) => {
33395
+ useInput14((input, key) => {
34127
33396
  if (loading) return;
34128
33397
  if (key.return || input === " ") {
34129
33398
  setEnabled((current) => {
@@ -34138,16 +33407,16 @@ function DebugModeScreen({ onDone }) {
34138
33407
  onDone();
34139
33408
  }
34140
33409
  });
34141
- return /* @__PURE__ */ jsxs52(Box51, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
34142
- /* @__PURE__ */ jsx63(Text54, { bold: true, children: "Settings \u203A Debug Mode" }),
34143
- /* @__PURE__ */ jsx63(Text54, { children: " " }),
34144
- loading ? /* @__PURE__ */ jsx63(Text54, { color: PALETTE.muted, children: "Loading\u2026" }) : /* @__PURE__ */ jsxs52(Text54, { children: [
33410
+ return /* @__PURE__ */ jsxs48(Box47, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
33411
+ /* @__PURE__ */ jsx58(Text49, { bold: true, children: "Settings \u203A Debug Mode" }),
33412
+ /* @__PURE__ */ jsx58(Text49, { children: " " }),
33413
+ loading ? /* @__PURE__ */ jsx58(Text49, { color: PALETTE.muted, children: "Loading\u2026" }) : /* @__PURE__ */ jsxs48(Text49, { children: [
34145
33414
  "Debug logging:",
34146
33415
  " ",
34147
- /* @__PURE__ */ jsx63(Text54, { bold: true, color: enabled ? PALETTE.success : PALETTE.muted, children: enabled ? "On" : "Off" })
33416
+ /* @__PURE__ */ jsx58(Text49, { bold: true, color: enabled ? PALETTE.success : PALETTE.muted, children: enabled ? "On" : "Off" })
34148
33417
  ] }),
34149
- /* @__PURE__ */ jsx63(Text54, { children: " " }),
34150
- /* @__PURE__ */ jsx63(
33418
+ /* @__PURE__ */ jsx58(Text49, { children: " " }),
33419
+ /* @__PURE__ */ jsx58(
34151
33420
  ControlHints,
34152
33421
  {
34153
33422
  hints: [
@@ -34161,7 +33430,7 @@ function DebugModeScreen({ onDone }) {
34161
33430
  var init_screen12 = __esm({
34162
33431
  "packages/experience-design-system-cli/src/tui/settings/debug-mode/screen.tsx"() {
34163
33432
  "use strict";
34164
- init_home_theme();
33433
+ init_theme();
34165
33434
  init_debug_mode_store();
34166
33435
  init_debug_store();
34167
33436
  init_control_hints();
@@ -34173,20 +33442,20 @@ var app_exports = {};
34173
33442
  __export(app_exports, {
34174
33443
  runApp: () => runApp
34175
33444
  });
34176
- import { join as join28 } from "node:path";
34177
- import { useEffect as useEffect28, useState as useState37 } from "react";
34178
- import { Fragment as Fragment21, jsx as jsx64 } from "react/jsx-runtime";
33445
+ import { join as join27 } from "node:path";
33446
+ import { useEffect as useEffect26, useState as useState33 } from "react";
33447
+ import { Fragment as Fragment19, jsx as jsx59 } from "react/jsx-runtime";
34179
33448
  function App({ importOptions, inkClear }) {
34180
- const [screen, setScreen] = useState37("start");
34181
- const [importExitCode, setImportExitCode] = useState37();
33449
+ const [screen, setScreen] = useState33("start");
33450
+ const [importExitCode, setImportExitCode] = useState33();
34182
33451
  const showImportResult = importExitCode !== void 0;
34183
- const [projectPath, setProjectPath] = useState37();
34184
- const [tokensPath, setTokensPath] = useState37();
34185
- const [scannedFiles, setScannedFiles] = useState37();
34186
- const [pendingLaunch, setPendingLaunch] = useState37();
34187
- const [extractionRun, setExtractionRun] = useState37();
33452
+ const [projectPath, setProjectPath] = useState33();
33453
+ const [tokensPath, setTokensPath] = useState33();
33454
+ const [scannedFiles, setScannedFiles] = useState33();
33455
+ const [pendingLaunch, setPendingLaunch] = useState33();
33456
+ const [extractionRun, setExtractionRun] = useState33();
34188
33457
  const extraction = useExtraction(extractionRun?.input);
34189
- const [scopeRun, setScopeRun] = useState37();
33458
+ const [scopeRun, setScopeRun] = useState33();
34190
33459
  const scopeFlow = useScopeGateFlow(
34191
33460
  scopeRun && {
34192
33461
  sessionId: scopeRun.extraction.sessionId,
@@ -34201,12 +33470,12 @@ function App({ importOptions, inkClear }) {
34201
33470
  }
34202
33471
  }
34203
33472
  );
34204
- const [generationInput, setGenerationInput] = useState37();
33473
+ const [generationInput, setGenerationInput] = useState33();
34205
33474
  const generation = useGeneration(generationInput);
34206
- const [flowStart, setFlowStart] = useState37();
33475
+ const [flowStart, setFlowStart] = useState33();
34207
33476
  const flow = useFlow(flowStart, { beforeStepChange: inkClear });
34208
- const [importDefaults, setImportDefaults] = useState37();
34209
- useEffect28(() => {
33477
+ const [importDefaults, setImportDefaults] = useState33();
33478
+ useEffect26(() => {
34210
33479
  if (screen !== "import") {
34211
33480
  setImportDefaults(void 0);
34212
33481
  return;
@@ -34224,7 +33493,7 @@ function App({ importOptions, inkClear }) {
34224
33493
  const launch = { projectPath: projectPath2, tokens, filePaths, ...importOptions };
34225
33494
  const state2 = await inspectTokens({
34226
33495
  rawTokensPath: tokens,
34227
- contentfulDir: join28(resolveUserPath(projectPath2), ".contentful"),
33496
+ contentfulDir: join27(resolveUserPath(projectPath2), ".contentful"),
34228
33497
  cache: importOptions.cache
34229
33498
  });
34230
33499
  if (state2.kind === "cached") {
@@ -34266,12 +33535,12 @@ function App({ importOptions, inkClear }) {
34266
33535
  }
34267
33536
  });
34268
33537
  };
34269
- useEffect28(() => {
33538
+ useEffect26(() => {
34270
33539
  if (!extractionRun || extraction?.status !== "done" || !extraction.result.ok) return;
34271
33540
  setExtractionRun(void 0);
34272
33541
  setScopeRun({ ...extractionRun, extraction: extraction.result.extraction });
34273
33542
  }, [extraction, extractionRun]);
34274
- useEffect28(() => {
33543
+ useEffect26(() => {
34275
33544
  if (!scopeRun || scopeFlow?.status !== "confirmed" || generationInput) return;
34276
33545
  const { extraction: produced, input, generatePromptPath } = scopeRun;
34277
33546
  setGenerationInput({
@@ -34289,7 +33558,7 @@ function App({ importOptions, inkClear }) {
34289
33558
  ...generatePromptPath ? { generatePromptPath } : {}
34290
33559
  });
34291
33560
  }, [scopeFlow, scopeRun, generationInput]);
34292
- useEffect28(() => {
33561
+ useEffect26(() => {
34293
33562
  if (!scopeRun || generation?.status !== "done" || !generation.result.ok) return;
34294
33563
  const { credentialsSkipped, tokenStrategy, extraction: produced, input, generatePromptPath } = scopeRun;
34295
33564
  inkClear();
@@ -34332,9 +33601,9 @@ function App({ importOptions, inkClear }) {
34332
33601
  };
34333
33602
  switch (screen) {
34334
33603
  case "import":
34335
- if (showImportResult) return /* @__PURE__ */ jsx64(ImportScreen, { exitCode: importExitCode, onDone: finishImportResult });
33604
+ if (showImportResult) return /* @__PURE__ */ jsx59(ImportScreen, { exitCode: importExitCode, onDone: finishImportResult });
34336
33605
  if (flow && flowStart) {
34337
- return /* @__PURE__ */ jsx64(
33606
+ return /* @__PURE__ */ jsx59(
34338
33607
  FlowScreen,
34339
33608
  {
34340
33609
  state: flow.state,
@@ -34344,12 +33613,12 @@ function App({ importOptions, inkClear }) {
34344
33613
  }
34345
33614
  );
34346
33615
  }
34347
- if (importDefaults === void 0) return /* @__PURE__ */ jsx64(Fragment21, {});
33616
+ if (importDefaults === void 0) return /* @__PURE__ */ jsx59(Fragment19, {});
34348
33617
  if (projectPath === void 0) {
34349
- return /* @__PURE__ */ jsx64(WelcomeScreen, { onContinue: setProjectPath, onQuit: leaveImport, initialPath: importDefaults.componentDir });
33618
+ return /* @__PURE__ */ jsx59(WelcomeScreen, { onContinue: setProjectPath, onQuit: leaveImport, initialPath: importDefaults.componentDir });
34350
33619
  }
34351
33620
  if (tokensPath === void 0) {
34352
- return /* @__PURE__ */ jsx64(
33621
+ return /* @__PURE__ */ jsx59(
34353
33622
  TokenInputScreen,
34354
33623
  {
34355
33624
  initialPath: importDefaults.tokenFile,
@@ -34359,7 +33628,7 @@ function App({ importOptions, inkClear }) {
34359
33628
  );
34360
33629
  }
34361
33630
  if (scannedFiles === void 0) {
34362
- return /* @__PURE__ */ jsx64(
33631
+ return /* @__PURE__ */ jsx59(
34363
33632
  PathValidationScreen,
34364
33633
  {
34365
33634
  projectPath,
@@ -34371,10 +33640,10 @@ function App({ importOptions, inkClear }) {
34371
33640
  }
34372
33641
  if (extractionRun) {
34373
33642
  if (extraction?.status === "done" && !extraction.result.ok) {
34374
- return /* @__PURE__ */ jsx64(ErrorStep, { stepName: extraction.result.step, message: extraction.result.message, onExit: leaveImport });
33643
+ return /* @__PURE__ */ jsx59(ErrorStep, { stepName: extraction.result.step, message: extraction.result.message, onExit: leaveImport });
34375
33644
  }
34376
33645
  if (extraction?.status === "running") {
34377
- return /* @__PURE__ */ jsx64(
33646
+ return /* @__PURE__ */ jsx59(
34378
33647
  ExtractionScreen,
34379
33648
  {
34380
33649
  progress: extraction.progress,
@@ -34383,14 +33652,14 @@ function App({ importOptions, inkClear }) {
34383
33652
  }
34384
33653
  );
34385
33654
  }
34386
- return /* @__PURE__ */ jsx64(Fragment21, {});
33655
+ return /* @__PURE__ */ jsx59(Fragment19, {});
34387
33656
  }
34388
33657
  if (scopeRun && scopeFlow) {
34389
33658
  if (scopeFlow.status === "failed") {
34390
- return /* @__PURE__ */ jsx64(ErrorStep, { stepName: "scope gate", message: scopeFlow.message, onExit: leaveImport });
33659
+ return /* @__PURE__ */ jsx59(ErrorStep, { stepName: "scope gate", message: scopeFlow.message, onExit: leaveImport });
34391
33660
  }
34392
33661
  if (scopeFlow.status === "deciding") {
34393
- return /* @__PURE__ */ jsx64(
33662
+ return /* @__PURE__ */ jsx59(
34394
33663
  ScopeGateScreen,
34395
33664
  {
34396
33665
  components: scopeFlow.load.components,
@@ -34400,7 +33669,7 @@ function App({ importOptions, inkClear }) {
34400
33669
  );
34401
33670
  }
34402
33671
  if (generation?.status === "done" && !generation.result.ok) {
34403
- return /* @__PURE__ */ jsx64(ErrorStep, { stepName: generation.result.step, message: generation.result.message, onExit: leaveImport });
33672
+ return /* @__PURE__ */ jsx59(ErrorStep, { stepName: generation.result.step, message: generation.result.message, onExit: leaveImport });
34404
33673
  }
34405
33674
  if (generation?.status === "running") {
34406
33675
  const hasRawTokens = scopeRun.input.rawTokensPath !== "";
@@ -34408,7 +33677,7 @@ function App({ importOptions, inkClear }) {
34408
33677
  hasRawTokens,
34409
33678
  mapTokensEligible: generation.progress.mapTokensEligible
34410
33679
  });
34411
- return /* @__PURE__ */ jsx64(
33680
+ return /* @__PURE__ */ jsx59(
34412
33681
  GenerationScreen,
34413
33682
  {
34414
33683
  progress: generation.progress,
@@ -34420,10 +33689,10 @@ function App({ importOptions, inkClear }) {
34420
33689
  }
34421
33690
  );
34422
33691
  }
34423
- return /* @__PURE__ */ jsx64(Fragment21, {});
33692
+ return /* @__PURE__ */ jsx59(Fragment19, {});
34424
33693
  }
34425
33694
  if (pendingLaunch?.cached) {
34426
- return /* @__PURE__ */ jsx64(
33695
+ return /* @__PURE__ */ jsx59(
34427
33696
  TokenReuseScreen,
34428
33697
  {
34429
33698
  tokensPath: pendingLaunch.cached.tokensPath,
@@ -34434,7 +33703,7 @@ function App({ importOptions, inkClear }) {
34434
33703
  }
34435
33704
  );
34436
33705
  }
34437
- return /* @__PURE__ */ jsx64(
33706
+ return /* @__PURE__ */ jsx59(
34438
33707
  CredentialsScreen,
34439
33708
  {
34440
33709
  initial: importDefaults.credentials,
@@ -34443,19 +33712,19 @@ function App({ importOptions, inkClear }) {
34443
33712
  }
34444
33713
  );
34445
33714
  case "help":
34446
- return /* @__PURE__ */ jsx64(HelpScreen, { onDone: goToStart });
33715
+ return /* @__PURE__ */ jsx59(HelpScreen, { onDone: goToStart });
34447
33716
  case "upgrade":
34448
- return /* @__PURE__ */ jsx64(UpgradeScreen, { onDone: goToStart });
33717
+ return /* @__PURE__ */ jsx59(UpgradeScreen, { onDone: goToStart });
34449
33718
  case "settings":
34450
- return /* @__PURE__ */ jsx64(SettingsScreen, { onNavigate: setScreen, onBack: goToStart });
33719
+ return /* @__PURE__ */ jsx59(SettingsScreen, { onNavigate: setScreen, onBack: goToStart });
34451
33720
  case "settings-configuration":
34452
- return /* @__PURE__ */ jsx64(ConfigurationScreen, { onDone: goToSettings });
33721
+ return /* @__PURE__ */ jsx59(ConfigurationScreen, { onDone: goToSettings });
34453
33722
  case "settings-opt-in-analytics":
34454
- return /* @__PURE__ */ jsx64(OptInAnalyticsScreen, { onDone: goToSettings });
33723
+ return /* @__PURE__ */ jsx59(OptInAnalyticsScreen, { onDone: goToSettings });
34455
33724
  case "settings-debug-mode":
34456
- return /* @__PURE__ */ jsx64(DebugModeScreen, { onDone: goToSettings });
33725
+ return /* @__PURE__ */ jsx59(DebugModeScreen, { onDone: goToSettings });
34457
33726
  case "start":
34458
- return /* @__PURE__ */ jsx64(HomeScreen, { onNavigate: setScreen });
33727
+ return /* @__PURE__ */ jsx59(HomeScreen, { onNavigate: setScreen });
34459
33728
  }
34460
33729
  }
34461
33730
  async function runApp(renderApp, importOptions) {
@@ -34463,7 +33732,7 @@ async function runApp(renderApp, importOptions) {
34463
33732
  instance.clear?.();
34464
33733
  process.stdout.write("\x1B[H\x1B[0J");
34465
33734
  };
34466
- const instance = renderApp(/* @__PURE__ */ jsx64(App, { importOptions, inkClear }));
33735
+ const instance = renderApp(/* @__PURE__ */ jsx59(App, { importOptions, inkClear }));
34467
33736
  await instance.waitUntilExit();
34468
33737
  }
34469
33738
  var init_app = __esm({
@@ -34498,7 +33767,7 @@ var init_app = __esm({
34498
33767
  // packages/experience-design-system-cli/program.ts
34499
33768
  init_src4();
34500
33769
  import { readFileSync as readFileSync9 } from "node:fs";
34501
- import { join as join29 } from "node:path";
33770
+ import { join as join28 } from "node:path";
34502
33771
  import { Command } from "commander";
34503
33772
 
34504
33773
  // packages/experience-design-system-cli/src/legacy/run-legacy.ts
@@ -34602,14 +33871,14 @@ function runDevWatch(args) {
34602
33871
  process.stderr.write("--watch only works from a checkout of the repo (scripts/dev.mjs is not in the package).\n");
34603
33872
  return Promise.resolve(1);
34604
33873
  }
34605
- return new Promise((resolve28) => {
33874
+ return new Promise((resolve27) => {
34606
33875
  const child = spawn4(process.execPath, [script, ...args], { stdio: "inherit" });
34607
33876
  process.on("SIGINT", () => void 0);
34608
- child.on("exit", (code) => resolve28(code ?? 0));
33877
+ child.on("exit", (code) => resolve27(code ?? 0));
34609
33878
  child.on("error", (err) => {
34610
33879
  process.stderr.write(`${err.message}
34611
33880
  `);
34612
- resolve28(1);
33881
+ resolve27(1);
34613
33882
  });
34614
33883
  });
34615
33884
  }
@@ -34631,13 +33900,11 @@ function registerImportCommand(program, openTui) {
34631
33900
  }
34632
33901
 
34633
33902
  // packages/experience-design-system-cli/program.ts
34634
- init_agent_store();
34635
- init_apply_binary_overrides();
34636
33903
  init_analytics_store();
34637
33904
  init_package_root();
34638
33905
  var pkg = JSON.parse(
34639
33906
  readFileSync9(
34640
- join29(findPackageRoot(import.meta.url, "@contentful/experience-design-system-cli"), "package.json"),
33907
+ join28(findPackageRoot(import.meta.url, "@contentful/experience-design-system-cli"), "package.json"),
34641
33908
  "utf8"
34642
33909
  )
34643
33910
  );
@@ -34655,7 +33922,6 @@ function createProgram() {
34655
33922
  const commandChain = chain.join(" ") || actionCommand.name();
34656
33923
  const { enabled } = await readAnalyticsSetting();
34657
33924
  setPersistedAnalyticsDisabled(!enabled);
34658
- await readAgentConfig().then(applyBinaryOverrides, () => void 0);
34659
33925
  setCliVersion(pkg.version);
34660
33926
  noteCommandStart(commandChain);
34661
33927
  });
@@ -34679,7 +33945,7 @@ init_config();
34679
33945
  init_package_root();
34680
33946
  import { existsSync as existsSync12 } from "node:fs";
34681
33947
  import { mkdir as mkdir10, readFile as readFile19, rename as rename3, rmdir, unlink } from "node:fs/promises";
34682
- import { dirname as dirname16, join as join30 } from "node:path";
33948
+ import { dirname as dirname16, join as join29 } from "node:path";
34683
33949
  var PACKAGE_NAME4 = "@contentful/experience-design-system-cli";
34684
33950
  async function readJson(path5) {
34685
33951
  try {
@@ -34690,9 +33956,9 @@ async function readJson(path5) {
34690
33956
  }
34691
33957
  async function migrateOldConfig() {
34692
33958
  try {
34693
- const oldCredentials = join30(oldConfigDir2(), "credentials.json");
34694
- const oldRuns = join30(oldConfigDir2(), "runs.json");
34695
- const oldDebugMode = join30(
33959
+ const oldCredentials = join29(oldConfigDir2(), "credentials.json");
33960
+ const oldRuns = join29(oldConfigDir2(), "runs.json");
33961
+ const oldDebugMode = join29(
34696
33962
  findPackageRoot(import.meta.url, PACKAGE_NAME4),
34697
33963
  ".contentful",
34698
33964
  "config",