@contentful/experience-design-system-cli 2.37.1-dev-build-91ca3bb8.0 → 2.37.1-dev-build-ef8b693f.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({
@@ -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,
@@ -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,11 @@ 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
+ BRAND_RAMP = ["#1773EB", "#E44F20", "#FFDA00"];
19713
19650
  BAR_CELL = "\u2501";
19714
19651
  FOCUS_MARKER = "\u276F";
19715
19652
  }
@@ -19789,11 +19726,12 @@ var init_use_terminal_width = __esm({
19789
19726
  import { Text } from "ink";
19790
19727
  import { jsx } from "react/jsx-runtime";
19791
19728
  function ControlHints({ hints }) {
19792
- return /* @__PURE__ */ jsx(Text, { children: hints.map((hint) => `[${hint.keys}] ${hint.label}`).join(" \xB7 ") });
19729
+ return /* @__PURE__ */ jsx(Text, { color: PALETTE.muted, children: hints.map((hint) => `[${hint.keys}] ${hint.label}`).join(" \xB7 ") });
19793
19730
  }
19794
19731
  var init_control_hints = __esm({
19795
19732
  "packages/experience-design-system-cli/src/tui/control-hints.tsx"() {
19796
19733
  "use strict";
19734
+ init_theme();
19797
19735
  }
19798
19736
  });
19799
19737
 
@@ -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
 
@@ -19981,20 +19920,19 @@ function WelcomeScreen({ onContinue, onQuit, initialPath = "" }) {
19981
19920
  if (path5) onContinue(path5);
19982
19921
  };
19983
19922
  return /* @__PURE__ */ jsxs3(Box3, { flexDirection: "column", gap: 1, paddingX: 2, paddingY: 1, children: [
19984
- /* @__PURE__ */ jsx4(Text4, { bold: true, color: PALETTE.success, children: "\u{1F44B} Hey! Let's import your design system into Contentful." }),
19985
- /* @__PURE__ */ jsx4(Text4, { color: PALETTE.muted, children: "I'll walk you through 5 steps to get your components into Contentful ExO." }),
19923
+ /* @__PURE__ */ jsx4(Text4, { bold: true, color: PALETTE.success, children: "Let's import your design system into Contentful." }),
19986
19924
  /* @__PURE__ */ jsxs3(Box3, { flexDirection: "column", children: [
19987
- /* @__PURE__ */ jsx4(Text4, { dimColor: true, children: RULE }),
19925
+ /* @__PURE__ */ jsx4(Text4, { color: PALETTE.muted, children: RULE }),
19988
19926
  OVERVIEW.map((item) => /* @__PURE__ */ jsxs3(Box3, { gap: 1, children: [
19989
19927
  /* @__PURE__ */ jsx4(Text4, { bold: true, children: item.label }),
19990
19928
  /* @__PURE__ */ jsx4(Text4, { color: PALETTE.muted, children: item.description })
19991
19929
  ] }, item.label)),
19992
- /* @__PURE__ */ jsx4(Text4, { dimColor: true, children: RULE })
19930
+ /* @__PURE__ */ jsx4(Text4, { color: PALETTE.muted, children: RULE })
19993
19931
  ] }),
19994
19932
  /* @__PURE__ */ jsxs3(Box3, { flexDirection: "column", gap: 1, children: [
19995
19933
  /* @__PURE__ */ jsx4(Text4, { children: "Where is your component library?" }),
19996
- /* @__PURE__ */ jsxs3(Box3, { gap: 1, children: [
19997
- /* @__PURE__ */ jsx4(Text4, { color: PALETTE.accent, children: "?" }),
19934
+ /* @__PURE__ */ jsxs3(Box3, { children: [
19935
+ /* @__PURE__ */ jsx4(Text4, { color: PALETTE.text, children: "?" }),
19998
19936
  /* @__PURE__ */ jsx4(Text4, { children: "Project path:" }),
19999
19937
  /* @__PURE__ */ jsx4(TextInput, { value: projectPath, onChange: setProjectPath, onSubmit: submit })
20000
19938
  ] })
@@ -20011,7 +19949,7 @@ var RULE, OVERVIEW;
20011
19949
  var init_screen = __esm({
20012
19950
  "packages/experience-design-system-cli/src/tui/import/steps/01-welcome/screen.tsx"() {
20013
19951
  "use strict";
20014
- init_home_theme();
19952
+ init_theme();
20015
19953
  init_controls();
20016
19954
  init_logic();
20017
19955
  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 +20098,7 @@ function TokenInputScreen({ onConfirm, onBack, initialPath = "" }) {
20160
20098
  var init_screen2 = __esm({
20161
20099
  "packages/experience-design-system-cli/src/tui/import/steps/02-token-input/screen.tsx"() {
20162
20100
  "use strict";
20163
- init_home_theme();
20101
+ init_theme();
20164
20102
  init_controls2();
20165
20103
  init_logic2();
20166
20104
  init_validate_path();
@@ -20304,7 +20242,7 @@ import { useEffect as useEffect3, useMemo, useState as useState5 } from "react";
20304
20242
  import { Box as Box5, Text as Text6 } from "ink";
20305
20243
  import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
20306
20244
  function Row({ row }) {
20307
- return /* @__PURE__ */ jsxs5(Text6, { color: row.tone === "accent" ? PALETTE.accent : void 0, dimColor: row.tone === "muted", children: [
20245
+ return /* @__PURE__ */ jsxs5(Text6, { color: row.tone === "accent" ? PALETTE.accent : row.tone === "muted" ? PALETTE.muted : void 0, children: [
20308
20246
  " \u2022 ",
20309
20247
  String(row.count).padStart(3),
20310
20248
  " ",
@@ -20318,7 +20256,7 @@ function Failure({ scan, path: path5 }) {
20318
20256
  "\u2717 ",
20319
20257
  headline
20320
20258
  ] }),
20321
- hints.map((hint) => /* @__PURE__ */ jsx6(Text6, { dimColor: true, children: hint }, hint))
20259
+ hints.map((hint) => /* @__PURE__ */ jsx6(Text6, { color: PALETTE.muted, children: hint }, hint))
20322
20260
  ] });
20323
20261
  }
20324
20262
  function Summary({ scan, path: path5 }) {
@@ -20363,14 +20301,14 @@ function PathValidationScreen({
20363
20301
  onBack
20364
20302
  });
20365
20303
  return /* @__PURE__ */ jsxs5(Box5, { flexDirection: "column", gap: 1, paddingX: 2, paddingY: 1, children: [
20366
- scan === void 0 && /* @__PURE__ */ jsxs5(Text6, { dimColor: true, children: [
20304
+ scan === void 0 && /* @__PURE__ */ jsxs5(Text6, { color: PALETTE.muted, children: [
20367
20305
  "Scanning ",
20368
20306
  /* @__PURE__ */ jsx6(Text6, { bold: true, children: resolvedPath }),
20369
20307
  "..."
20370
20308
  ] }),
20371
20309
  scan?.ok === false && /* @__PURE__ */ jsx6(Failure, { scan, path: resolvedPath }),
20372
20310
  scan?.ok === true && /* @__PURE__ */ jsx6(Summary, { scan, path: resolvedPath }),
20373
- /* @__PURE__ */ jsx6(Box5, { marginTop: 1, gap: 3, children: controlsFor(phase).map((control) => /* @__PURE__ */ jsxs5(Text6, { dimColor: true, children: [
20311
+ /* @__PURE__ */ jsx6(Box5, { marginTop: 1, gap: 3, children: controlsFor(phase).map((control) => /* @__PURE__ */ jsxs5(Text6, { color: PALETTE.muted, children: [
20374
20312
  "[",
20375
20313
  control.keys,
20376
20314
  "] ",
@@ -20381,7 +20319,7 @@ function PathValidationScreen({
20381
20319
  var init_screen3 = __esm({
20382
20320
  "packages/experience-design-system-cli/src/tui/import/steps/03-path-validation/screen.tsx"() {
20383
20321
  "use strict";
20384
- init_home_theme();
20322
+ init_theme();
20385
20323
  init_resolve_user_path();
20386
20324
  init_controls3();
20387
20325
  init_scan_files();
@@ -20549,8 +20487,8 @@ function CredentialsScreen({
20549
20487
  /* @__PURE__ */ jsx7(Text7, { bold: true, children: "Contentful credentials" }),
20550
20488
  /* @__PURE__ */ jsx7(Text7, { children: prefilled ? "Credentials pre-filled from the configuration settings." : "Enter the Contentful space you want to import into." }),
20551
20489
  !prefilled && /* @__PURE__ */ jsxs6(Fragment, { children: [
20552
- /* @__PURE__ */ jsx7(Text7, { dimColor: true, children: "We use it to check what components already exist and to push your import. If you skip, files are saved locally and nothing is pushed." }),
20553
- /* @__PURE__ */ jsx7(Text7, { dimColor: true, children: "Tip: save these under Settings \u2192 Configuration so they pre-fill here." })
20490
+ /* @__PURE__ */ jsx7(Text7, { color: PALETTE.muted, children: "We use it to check what components already exist and to push your import. If you skip, files are saved locally and nothing is pushed." }),
20491
+ /* @__PURE__ */ jsx7(Text7, { color: PALETTE.muted, children: "Tip: save these under Settings \u2192 Configuration so they pre-fill here." })
20554
20492
  ] })
20555
20493
  ] }),
20556
20494
  /* @__PURE__ */ jsx7(Box6, { flexDirection: "column", children: FIELDS.map((field) => /* @__PURE__ */ jsxs6(Box6, { gap: 1, children: [
@@ -20571,14 +20509,14 @@ function CredentialsScreen({
20571
20509
  }
20572
20510
  )
20573
20511
  ] }, field)) }),
20574
- active === "host" && /* @__PURE__ */ jsx7(Text7, { dimColor: true, children: "Default: api.contentful.com \xB7 EU spaces: api.eu.contentful.com" }),
20512
+ active === "host" && /* @__PURE__ */ jsx7(Text7, { color: PALETTE.muted, children: "Default: api.contentful.com \xB7 EU spaces: api.eu.contentful.com" }),
20575
20513
  error && /* @__PURE__ */ jsxs6(Text7, { color: PALETTE.error, children: [
20576
20514
  "\u2717 ",
20577
20515
  error
20578
20516
  ] }),
20579
20517
  validating && /* @__PURE__ */ jsx7(Text7, { color: PALETTE.accent, children: "Validating credentials..." }),
20580
- !validating && !error && !isUnchanged(normalize(values), initialValues) && /* @__PURE__ */ jsx7(Text7, { dimColor: true, children: "Changed values are saved after they validate." }),
20581
- /* @__PURE__ */ jsx7(Box6, { marginTop: 1, gap: 3, children: CREDENTIALS_CONTROLS.map((control) => /* @__PURE__ */ jsxs6(Text7, { dimColor: true, children: [
20518
+ !validating && !error && !isUnchanged(normalize(values), initialValues) && /* @__PURE__ */ jsx7(Text7, { color: PALETTE.muted, children: "Changed values are saved after they validate." }),
20519
+ /* @__PURE__ */ jsx7(Box6, { marginTop: 1, gap: 3, children: CREDENTIALS_CONTROLS.map((control) => /* @__PURE__ */ jsxs6(Text7, { color: PALETTE.muted, children: [
20582
20520
  "[",
20583
20521
  control.keys,
20584
20522
  "] ",
@@ -20590,7 +20528,7 @@ var LABELS;
20590
20528
  var init_screen4 = __esm({
20591
20529
  "packages/experience-design-system-cli/src/tui/import/steps/04-credentials/screen.tsx"() {
20592
20530
  "use strict";
20593
- init_home_theme();
20531
+ init_theme();
20594
20532
  init_controls4();
20595
20533
  init_src4();
20596
20534
  init_logic4();
@@ -20666,7 +20604,7 @@ function ErrorStep({
20666
20604
  " failed"
20667
20605
  ] }),
20668
20606
  /* @__PURE__ */ jsx8(Text8, { color: PALETTE.error, children: message }),
20669
- /* @__PURE__ */ jsx8(Box7, { marginTop: 1, gap: 3, children: controls.map((control) => /* @__PURE__ */ jsxs7(Text8, { dimColor: true, children: [
20607
+ /* @__PURE__ */ jsx8(Box7, { marginTop: 1, gap: 3, children: controls.map((control) => /* @__PURE__ */ jsxs7(Text8, { color: PALETTE.muted, children: [
20670
20608
  "[",
20671
20609
  control.keys,
20672
20610
  "] ",
@@ -20677,7 +20615,7 @@ function ErrorStep({
20677
20615
  var init_error_step = __esm({
20678
20616
  "packages/experience-design-system-cli/src/tui/import/shared/error-step/error-step.tsx"() {
20679
20617
  "use strict";
20680
- init_home_theme();
20618
+ init_theme();
20681
20619
  init_controls5();
20682
20620
  init_logic5();
20683
20621
  }
@@ -20746,7 +20684,7 @@ function GateStep({
20746
20684
  ] }),
20747
20685
  summary && /* @__PURE__ */ jsx9(Text9, { color: PALETTE.muted, children: summary }),
20748
20686
  context && /* @__PURE__ */ jsx9(Box8, { marginTop: 1, children: /* @__PURE__ */ jsx9(Text9, { children: context }) }),
20749
- /* @__PURE__ */ jsx9(Box8, { marginTop: 1, gap: 3, children: gateControls(continueLabel, skipLabel2, onSkip !== void 0).map((control) => /* @__PURE__ */ jsxs8(Text9, { dimColor: true, children: [
20687
+ /* @__PURE__ */ jsx9(Box8, { marginTop: 1, gap: 3, children: gateControls(continueLabel, skipLabel2, onSkip !== void 0).map((control) => /* @__PURE__ */ jsxs8(Text9, { color: PALETTE.muted, children: [
20750
20688
  "[",
20751
20689
  control.keys,
20752
20690
  "] ",
@@ -20757,7 +20695,7 @@ function GateStep({
20757
20695
  var init_gate_step = __esm({
20758
20696
  "packages/experience-design-system-cli/src/tui/import/shared/gate-step/gate-step.tsx"() {
20759
20697
  "use strict";
20760
- init_home_theme();
20698
+ init_theme();
20761
20699
  init_controls6();
20762
20700
  init_logic6();
20763
20701
  }
@@ -20785,14 +20723,15 @@ var init_logic7 = __esm({
20785
20723
  // packages/experience-design-system-cli/src/tui/import/shared/running-step/theme.ts
20786
20724
  import { defaultTheme, extendTheme } from "@inkjs/ui";
20787
20725
  var PROGRESS_THEME;
20788
- var init_theme = __esm({
20726
+ var init_theme2 = __esm({
20789
20727
  "packages/experience-design-system-cli/src/tui/import/shared/running-step/theme.ts"() {
20790
20728
  "use strict";
20729
+ init_theme();
20791
20730
  PROGRESS_THEME = extendTheme(defaultTheme, {
20792
20731
  components: {
20793
20732
  ProgressBar: {
20794
20733
  styles: {
20795
- completed: () => ({ color: "blue" })
20734
+ completed: () => ({ color: PALETTE.accent })
20796
20735
  }
20797
20736
  }
20798
20737
  }
@@ -20850,9 +20789,9 @@ function RunningStep({
20850
20789
  const elapsed = useElapsed();
20851
20790
  return /* @__PURE__ */ jsxs9(Box9, { flexDirection: "column", gap: 1, paddingX: 2, paddingY: 1, children: [
20852
20791
  /* @__PURE__ */ jsxs9(Box9, { flexDirection: "column", children: [
20853
- /* @__PURE__ */ jsx10(Text10, { dimColor: true, children: RULE2 }),
20792
+ /* @__PURE__ */ jsx10(Text10, { color: PALETTE.muted, children: RULE2 }),
20854
20793
  /* @__PURE__ */ jsx10(Text10, { bold: true, children: stepLabel(stepNumber, totalSteps, title) }),
20855
- /* @__PURE__ */ jsx10(Text10, { dimColor: true, children: RULE2 })
20794
+ /* @__PURE__ */ jsx10(Text10, { color: PALETTE.muted, children: RULE2 })
20856
20795
  ] }),
20857
20796
  /* @__PURE__ */ jsx10(Text10, { children: description }),
20858
20797
  /* @__PURE__ */ jsx10(Box9, { marginTop: 1, flexDirection: "column", gap: 1, children: lines.map((line, index) => /* @__PURE__ */ jsx10(Line, { line }, index)) }),
@@ -20866,9 +20805,9 @@ var RULE2;
20866
20805
  var init_running_step = __esm({
20867
20806
  "packages/experience-design-system-cli/src/tui/import/shared/running-step/running-step.tsx"() {
20868
20807
  "use strict";
20869
- init_home_theme();
20870
- init_logic7();
20871
20808
  init_theme();
20809
+ init_logic7();
20810
+ init_theme2();
20872
20811
  init_use_elapsed();
20873
20812
  RULE2 = "\u2500".repeat(40);
20874
20813
  }
@@ -21415,10 +21354,10 @@ var init_use_extraction = __esm({
21415
21354
 
21416
21355
  // packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/theme.ts
21417
21356
  var PALETTE2;
21418
- var init_theme2 = __esm({
21357
+ var init_theme3 = __esm({
21419
21358
  "packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/theme.ts"() {
21420
21359
  "use strict";
21421
- init_home_theme();
21360
+ init_theme();
21422
21361
  PALETTE2 = {
21423
21362
  info: PALETTE.accent,
21424
21363
  success: PALETTE.success,
@@ -21530,7 +21469,7 @@ var TWO_COLUMN_MIN_WIDTH, SCOPE_GATE_MAIN_COLUMN_WIDTH, ACCEPTED_COMPONENTS_COLU
21530
21469
  var init_columns = __esm({
21531
21470
  "packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/columns.ts"() {
21532
21471
  "use strict";
21533
- init_theme2();
21472
+ init_theme3();
21534
21473
  TWO_COLUMN_MIN_WIDTH = 100;
21535
21474
  SCOPE_GATE_MAIN_COLUMN_WIDTH = 54;
21536
21475
  ACCEPTED_COMPONENTS_COLUMN_WIDTH = 36;
@@ -21596,7 +21535,7 @@ function WindowedPanelHeader({
21596
21535
  }) {
21597
21536
  return /* @__PURE__ */ jsxs10(Box10, { flexDirection: "column", children: [
21598
21537
  /* @__PURE__ */ jsx13(Text11, { bold: true, color: PALETTE2.info, inverse: focused, children: title }),
21599
- /* @__PURE__ */ jsx13(Text11, { dimColor: true, children: "\u2500".repeat(Math.max(0, width - 2)) })
21538
+ /* @__PURE__ */ jsx13(Text11, { color: PALETTE2.muted, children: "\u2500".repeat(Math.max(0, width - 2)) })
21600
21539
  ] });
21601
21540
  }
21602
21541
  function formatWindowIndicator(direction, count) {
@@ -21610,7 +21549,7 @@ var MIN_TERMINAL_PANEL_HEIGHT;
21610
21549
  var init_windowed_panel = __esm({
21611
21550
  "packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/windowed-panel.tsx"() {
21612
21551
  "use strict";
21613
- init_theme2();
21552
+ init_theme3();
21614
21553
  MIN_TERMINAL_PANEL_HEIGHT = 5;
21615
21554
  }
21616
21555
  });
@@ -21635,7 +21574,7 @@ function AddedColumn(props) {
21635
21574
  const showSeparator = firstNonCycleIdx > 0 && i === firstNonCycleIdx;
21636
21575
  const style = sideColumnLabelStyle({ isCycle: entry.isCycle, isSelected, focused });
21637
21576
  return /* @__PURE__ */ jsxs11(React6.Fragment, { children: [
21638
- showSeparator && /* @__PURE__ */ jsx14(Text12, { dimColor: true, children: "\u2500".repeat(Math.max(0, width - 2)) }),
21577
+ showSeparator && /* @__PURE__ */ jsx14(Text12, { color: PALETTE2.muted, children: "\u2500".repeat(Math.max(0, width - 2)) }),
21639
21578
  /* @__PURE__ */ jsxs11(Box11, { children: [
21640
21579
  isCursor ? /* @__PURE__ */ jsx14(Text12, { color: PALETTE2.info, bold: true, children: figures.pointer }) : /* @__PURE__ */ jsx14(Text12, { children: " " }),
21641
21580
  reserveAiBadge && (aiFlagged ? /* @__PURE__ */ jsx14(Text12, { color: PALETTE2.warning, bold: true, children: " [\xD7]" }) : /* @__PURE__ */ jsx14(Text12, { children: " " })),
@@ -21661,7 +21600,7 @@ var init_added_column = __esm({
21661
21600
  "packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/panels/added-column.tsx"() {
21662
21601
  "use strict";
21663
21602
  init_columns();
21664
- init_theme2();
21603
+ init_theme3();
21665
21604
  init_windowed_panel();
21666
21605
  }
21667
21606
  });
@@ -21696,7 +21635,7 @@ function CyclesPanel({ cycles, cursor }) {
21696
21635
  var init_cycles_panel = __esm({
21697
21636
  "packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/panels/cycles-panel.tsx"() {
21698
21637
  "use strict";
21699
- init_theme2();
21638
+ init_theme3();
21700
21639
  }
21701
21640
  });
21702
21641
 
@@ -21714,7 +21653,7 @@ function RejectPrompt({ pending }) {
21714
21653
  var init_reject_prompt = __esm({
21715
21654
  "packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/panels/reject-prompt.tsx"() {
21716
21655
  "use strict";
21717
- init_theme2();
21656
+ init_theme3();
21718
21657
  }
21719
21658
  });
21720
21659
 
@@ -21730,7 +21669,7 @@ function legendEntry(keyBracket, label, active = false) {
21730
21669
  var init_LegendEntry = __esm({
21731
21670
  "packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/LegendEntry.tsx"() {
21732
21671
  "use strict";
21733
- init_theme2();
21672
+ init_theme3();
21734
21673
  }
21735
21674
  });
21736
21675
 
@@ -21751,7 +21690,7 @@ function CompactControlBar({ hasGroupRoots, searchActive }) {
21751
21690
  var init_CompactControlBar = __esm({
21752
21691
  "packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/CompactControlBar.tsx"() {
21753
21692
  "use strict";
21754
- init_theme2();
21693
+ init_theme3();
21755
21694
  init_LegendEntry();
21756
21695
  }
21757
21696
  });
@@ -21790,7 +21729,7 @@ function CounterStrip(props) {
21790
21729
  var init_CounterStrip = __esm({
21791
21730
  "packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/CounterStrip.tsx"() {
21792
21731
  "use strict";
21793
- init_theme2();
21732
+ init_theme3();
21794
21733
  }
21795
21734
  });
21796
21735
 
@@ -21855,7 +21794,7 @@ var DEFAULT_MAX_ROWS;
21855
21794
  var init_GotoBanner = __esm({
21856
21795
  "packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/GotoBanner.tsx"() {
21857
21796
  "use strict";
21858
- init_theme2();
21797
+ init_theme3();
21859
21798
  DEFAULT_MAX_ROWS = 15;
21860
21799
  }
21861
21800
  });
@@ -22234,7 +22173,7 @@ function PreviewBadge({
22234
22173
  var init_badge = __esm({
22235
22174
  "packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/badge.tsx"() {
22236
22175
  "use strict";
22237
- init_theme2();
22176
+ init_theme3();
22238
22177
  }
22239
22178
  });
22240
22179
 
@@ -22729,7 +22668,7 @@ var init_GroupedSidebar = __esm({
22729
22668
  "use strict";
22730
22669
  init_composite_closure();
22731
22670
  init_badge();
22732
- init_theme2();
22671
+ init_theme3();
22733
22672
  init_windowed_panel();
22734
22673
  GLYPH_EXPAND_COLLAPSED = "\u25B8";
22735
22674
  GLYPH_EXPAND_EXPANDED = "\u25BE";
@@ -23024,7 +22963,7 @@ function SearchMatchSummary({
23024
22963
  var init_SearchMatchSummary = __esm({
23025
22964
  "packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/SearchMatchSummary.tsx"() {
23026
22965
  "use strict";
23027
- init_theme2();
22966
+ init_theme3();
23028
22967
  init_sidebar_input();
23029
22968
  }
23030
22969
  });
@@ -24392,7 +24331,7 @@ var init_screen7 = __esm({
24392
24331
  init_HelpOverlay();
24393
24332
  init_SearchMatchSummary();
24394
24333
  init_sidebar_help();
24395
- init_theme2();
24334
+ init_theme3();
24396
24335
  init_use_scope_gate();
24397
24336
  HELP_SECTIONS = [
24398
24337
  {
@@ -25280,24 +25219,6 @@ var init_screen9 = __esm({
25280
25219
  }
25281
25220
  });
25282
25221
 
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
25222
  // packages/experience-design-system-cli/src/tui/import/steps/09-review/review-json-panel.ts
25302
25223
  function getReviewJsonPanelValue(selected, showHiddenProps) {
25303
25224
  if (!selected) return "";
@@ -25789,13 +25710,13 @@ function serializeState(state2, originalJson) {
25789
25710
  }
25790
25711
  function Picker({ value, active }) {
25791
25712
  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" })
25713
+ active && /* @__PURE__ */ jsx27(Text23, { color: PALETTE.warning, children: "\u2039" }),
25714
+ /* @__PURE__ */ jsx27(Text23, { color: active ? PALETTE.warning : void 0, bold: active, children: value }),
25715
+ active && /* @__PURE__ */ jsx27(Text23, { color: PALETTE.warning, children: "\u203A" })
25795
25716
  ] });
25796
25717
  }
25797
25718
  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]" : "[ ]" }) });
25719
+ return /* @__PURE__ */ jsx27(Box21, { children: /* @__PURE__ */ jsx27(Text23, { color: active ? PALETTE.warning : value ? PALETTE.success : PALETTE.border, children: value ? "[\u2713]" : "[ ]" }) });
25799
25720
  }
25800
25721
  function InlinePropField({
25801
25722
  label,
@@ -25805,7 +25726,7 @@ function InlinePropField({
25805
25726
  width
25806
25727
  }) {
25807
25728
  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: [
25729
+ /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, wrap: "truncate-end", children: [
25809
25730
  focused ? "\u203A " : " ",
25810
25731
  label
25811
25732
  ] }),
@@ -25826,7 +25747,7 @@ function DefaultValueRow({
25826
25747
  focused
25827
25748
  }) {
25828
25749
  return /* @__PURE__ */ jsxs22(Box21, { gap: 1, flexWrap: "wrap", flexShrink: 0, children: [
25829
- /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE3.warning : PALETTE3.muted, bold: focused, children: [
25750
+ /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, children: [
25830
25751
  focused ? "\u203A " : " ",
25831
25752
  "default:"
25832
25753
  ] }),
@@ -25841,9 +25762,9 @@ function RowLabel({
25841
25762
  return /* @__PURE__ */ jsxs22(
25842
25763
  Text23,
25843
25764
  {
25844
- color: selected ? PALETTE3.inverse : PALETTE3.info,
25765
+ color: selected ? "#FFFFFF" : PALETTE.accent,
25845
25766
  bold: selected,
25846
- backgroundColor: selected ? "blue" : void 0,
25767
+ backgroundColor: selected ? PALETTE.accent : void 0,
25847
25768
  wrap: "truncate-end",
25848
25769
  children: [
25849
25770
  " ",
@@ -25859,7 +25780,7 @@ function ValueInputRow({
25859
25780
  cursorVisible
25860
25781
  }) {
25861
25782
  return /* @__PURE__ */ jsxs22(Box21, { paddingLeft: 2, children: [
25862
- /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.info, children: mode === "edit" ? "\u270E " : "+ " }),
25783
+ /* @__PURE__ */ jsx27(Text23, { color: PALETTE.accent, children: mode === "edit" ? "\u270E " : "+ " }),
25863
25784
  /* @__PURE__ */ jsx27(Text23, { children: valueText }),
25864
25785
  /* @__PURE__ */ jsx27(Text23, { inverse: cursorVisible, children: " " })
25865
25786
  ] });
@@ -25876,7 +25797,7 @@ function EditableListItem({
25876
25797
  if (isBeingEdited) {
25877
25798
  return /* @__PURE__ */ jsx27(ValueInputRow, { mode: "edit", valueText, cursorVisible });
25878
25799
  }
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}` }) });
25800
+ 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
25801
  }
25881
25802
  function EditableValueList({
25882
25803
  values,
@@ -25890,7 +25811,7 @@ function EditableValueList({
25890
25811
  showAddInput
25891
25812
  }) {
25892
25813
  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 }) })),
25814
+ 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
25815
  values.map((value, index) => /* @__PURE__ */ jsx27(
25895
25816
  EditableListItem,
25896
25817
  {
@@ -25916,11 +25837,11 @@ function DefaultSubRow({
25916
25837
  const cursor = cursorVisible ? "\u2588" : " ";
25917
25838
  if (prop.type === "richtext" || prop.type === "media" || prop.type === "link") {
25918
25839
  return /* @__PURE__ */ jsxs22(Box21, { gap: 1, flexShrink: 0, children: [
25919
- /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE3.warning : PALETTE3.muted, bold: focused, children: [
25840
+ /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, children: [
25920
25841
  focused ? "\u203A " : " ",
25921
25842
  "default:"
25922
25843
  ] }),
25923
- /* @__PURE__ */ jsx27(Text23, { color: focused ? void 0 : PALETTE3.muted, children: "(not applicable)" })
25844
+ /* @__PURE__ */ jsx27(Text23, { color: focused ? void 0 : PALETTE.muted, children: "(not applicable)" })
25924
25845
  ] });
25925
25846
  }
25926
25847
  if (prop.type === "boolean") {
@@ -25930,11 +25851,11 @@ function DefaultSubRow({
25930
25851
  if (prop.type === "enum") {
25931
25852
  if (prop.values.length === 0) {
25932
25853
  return /* @__PURE__ */ jsxs22(Box21, { gap: 1, flexShrink: 0, children: [
25933
- /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE3.warning : PALETTE3.muted, bold: focused, children: [
25854
+ /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, children: [
25934
25855
  focused ? "\u203A " : " ",
25935
25856
  "default:"
25936
25857
  ] }),
25937
- /* @__PURE__ */ jsx27(Text23, { color: focused ? void 0 : PALETTE3.muted, children: "(no values defined)" })
25858
+ /* @__PURE__ */ jsx27(Text23, { color: focused ? void 0 : PALETTE.muted, children: "(no values defined)" })
25938
25859
  ] });
25939
25860
  }
25940
25861
  const display = typeof prop.default === "string" && prop.default !== "" ? prop.default : "(unset)";
@@ -25943,11 +25864,11 @@ function DefaultSubRow({
25943
25864
  const value = typeof prop.default === "string" ? prop.default : "";
25944
25865
  if (active) {
25945
25866
  return /* @__PURE__ */ jsxs22(Box21, { flexDirection: "row", flexShrink: 0, children: [
25946
- /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE3.warning : PALETTE3.muted, bold: focused, children: [
25867
+ /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, children: [
25947
25868
  focused ? "\u203A " : " ",
25948
25869
  "default:"
25949
25870
  ] }),
25950
- /* @__PURE__ */ jsxs22(Box21, { flexGrow: 1, borderStyle: "round", borderColor: PALETTE3.warning, paddingX: 1, children: [
25871
+ /* @__PURE__ */ jsxs22(Box21, { flexGrow: 1, borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
25951
25872
  /* @__PURE__ */ jsx27(Text23, { children: value.slice(0, textCursor) }),
25952
25873
  /* @__PURE__ */ jsx27(Text23, { inverse: cursorVisible, children: value[textCursor] ?? cursor }),
25953
25874
  /* @__PURE__ */ jsx27(Text23, { children: value.slice(textCursor + 1) })
@@ -25955,11 +25876,11 @@ function DefaultSubRow({
25955
25876
  ] });
25956
25877
  }
25957
25878
  return /* @__PURE__ */ jsxs22(Box21, { gap: 1, flexShrink: 0, children: [
25958
- /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE3.warning : PALETTE3.muted, bold: focused, children: [
25879
+ /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, children: [
25959
25880
  focused ? "\u203A " : " ",
25960
25881
  "default:"
25961
25882
  ] }),
25962
- /* @__PURE__ */ jsx27(Text23, { color: focused || value ? void 0 : PALETTE3.muted, children: value || "(none)" })
25883
+ /* @__PURE__ */ jsx27(Text23, { color: focused || value ? void 0 : PALETTE.muted, children: value || "(none)" })
25963
25884
  ] });
25964
25885
  }
25965
25886
  function DescriptionField({
@@ -25975,15 +25896,15 @@ function DescriptionField({
25975
25896
  }) {
25976
25897
  if (compact) {
25977
25898
  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: [
25899
+ /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, children: [
25979
25900
  focused ? "\u203A " : " ",
25980
25901
  label
25981
25902
  ] }),
25982
- /* @__PURE__ */ jsx27(Text23, { wrap: "truncate-end", color: value ? void 0 : PALETTE3.muted, children: value || "\u2014" })
25903
+ /* @__PURE__ */ jsx27(Text23, { wrap: "truncate-end", color: value ? void 0 : PALETTE.muted, children: value || "\u2014" })
25983
25904
  ] });
25984
25905
  }
25985
25906
  return /* @__PURE__ */ jsxs22(Box21, { paddingLeft, flexDirection: "column", width, flexShrink: 0, children: [
25986
- /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE3.warning : PALETTE3.muted, bold: focused, children: [
25907
+ /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, children: [
25987
25908
  focused ? "\u203A " : " ",
25988
25909
  label
25989
25910
  ] }),
@@ -26047,7 +25968,7 @@ function PropRow({
26047
25968
  ] }),
26048
25969
  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
25970
  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: [
25971
+ /* @__PURE__ */ jsxs22(Text23, { color: activeField === "values" ? PALETTE.warning : PALETTE.muted, bold: activeField === "values", children: [
26051
25972
  activeField === "values" ? "\u203A " : " ",
26052
25973
  "values:"
26053
25974
  ] }),
@@ -26068,27 +25989,27 @@ function PropRow({
26068
25989
  }
26069
25990
  ),
26070
25991
  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: [
25992
+ /* @__PURE__ */ jsxs22(Text23, { color: activeField === "allowed" ? PALETTE.warning : PALETTE.muted, bold: activeField === "allowed", children: [
26072
25993
  activeField === "allowed" ? "\u203A " : " ",
26073
25994
  "allowed:"
26074
25995
  ] }),
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(
25996
+ 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
25997
  Text23,
26077
25998
  {
26078
- color: activeField !== "allowed" && prop.allowed.length === 0 ? PALETTE3.muted : void 0,
25999
+ color: activeField !== "allowed" && prop.allowed.length === 0 ? PALETTE.muted : void 0,
26079
26000
  wrap: "wrap",
26080
26001
  children: prop.allowed.length > 0 ? prop.allowed.join(", ") : "(any)"
26081
26002
  }
26082
26003
  )
26083
26004
  ] }),
26084
- selected && showRationale && rationale && rationale.trim().length > 0 && /* @__PURE__ */ jsx27(Box21, { paddingLeft: 2, children: /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, children: (() => {
26005
+ selected && showRationale && rationale && rationale.trim().length > 0 && /* @__PURE__ */ jsx27(Box21, { paddingLeft: 2, children: /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: (() => {
26085
26006
  const max = Math.max(8, width - 8);
26086
26007
  const text = `~ ${rationale}`;
26087
26008
  return text.length > max ? text.slice(0, max - 1) + "\u2026" : text;
26088
26009
  })() }) }, rowKey ? `rationale-${rowKey}` : void 0),
26089
26010
  selected && prop.type === "enum" && activeField === "values" && /* @__PURE__ */ jsxs22(Box21, { paddingLeft: 2, flexDirection: "column", children: [
26090
26011
  /* @__PURE__ */ jsxs22(Box21, { children: [
26091
- /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, children: "values:" }),
26012
+ /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: "values:" }),
26092
26013
  activeField === "values" && /* @__PURE__ */ jsx27(Text23, { children: " [a] add [e] edit [r] remove [\u2191\u2193] navigate [K/J] reorder" })
26093
26014
  ] }),
26094
26015
  /* @__PURE__ */ jsx27(
@@ -26149,7 +26070,7 @@ function SlotRow({
26149
26070
  /* @__PURE__ */ jsxs22(
26150
26071
  Text23,
26151
26072
  {
26152
- color: activeField === "allowedComponents" ? PALETTE3.warning : PALETTE3.muted,
26073
+ color: activeField === "allowedComponents" ? PALETTE.warning : PALETTE.muted,
26153
26074
  bold: activeField === "allowedComponents",
26154
26075
  children: [
26155
26076
  activeField === "allowedComponents" ? "\u203A " : " ",
@@ -26157,14 +26078,14 @@ function SlotRow({
26157
26078
  ]
26158
26079
  }
26159
26080
  ),
26160
- slot.allowedComponents.length === 0 ? /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, children: "(any)" }) : /* @__PURE__ */ jsx27(Text23, { wrap: "wrap", children: slot.allowedComponents.join(", ") })
26081
+ slot.allowedComponents.length === 0 ? /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: "(any)" }) : /* @__PURE__ */ jsx27(Text23, { wrap: "wrap", children: slot.allowedComponents.join(", ") })
26161
26082
  ] }),
26162
26083
  selected && editingField && activeField === "allowedComponents" && /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", children: [
26163
26084
  /* @__PURE__ */ jsxs22(Box21, { children: [
26164
26085
  /* @__PURE__ */ jsxs22(
26165
26086
  Text23,
26166
26087
  {
26167
- color: activeField === "allowedComponents" ? PALETTE3.warning : PALETTE3.muted,
26088
+ color: activeField === "allowedComponents" ? PALETTE.warning : PALETTE.muted,
26168
26089
  bold: activeField === "allowedComponents",
26169
26090
  children: [
26170
26091
  activeField === "allowedComponents" ? "\u203A " : " ",
@@ -26172,7 +26093,7 @@ function SlotRow({
26172
26093
  ]
26173
26094
  }
26174
26095
  ),
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" })
26096
+ 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
26097
  ] }),
26177
26098
  /* @__PURE__ */ jsx27(
26178
26099
  EditableValueList,
@@ -26188,21 +26109,21 @@ function SlotRow({
26188
26109
  showAddInput: editingField && activeField === "allowedComponents"
26189
26110
  }
26190
26111
  ),
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)" }) : (() => {
26112
+ 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
26113
  const filtered = valueText.length === 0 ? pickerCandidates : pickerCandidates.filter((n) => n.toLowerCase().includes(valueText.toLowerCase()));
26193
26114
  if (filtered.length === 0) {
26194
- return /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, children: "(no candidates match \u2014 Enter to add as free text)" });
26115
+ return /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: "(no candidates match \u2014 Enter to add as free text)" });
26195
26116
  }
26196
26117
  const cursor = pickerCursor % filtered.length;
26197
26118
  const MAX_VISIBLE = 5;
26198
26119
  const start = Math.max(0, Math.min(filtered.length - MAX_VISIBLE, cursor - 2));
26199
26120
  const slice = filtered.slice(start, start + MAX_VISIBLE);
26200
26121
  return /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", children: [
26201
- /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, children: " candidates (\u2191\u2193 cycle, Enter to add):" }),
26122
+ /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: " candidates (\u2191\u2193 cycle, Enter to add):" }),
26202
26123
  slice.map((name, i) => {
26203
26124
  const absIdx = start + i;
26204
26125
  const isCursor = absIdx === cursor;
26205
- return /* @__PURE__ */ jsx27(Text23, { color: isCursor ? PALETTE3.info : PALETTE3.muted, children: isCursor ? ` ${figures5.pointer} ${name}` : ` ${name}` }, name);
26126
+ return /* @__PURE__ */ jsx27(Text23, { color: isCursor ? PALETTE.accent : PALETTE.muted, children: isCursor ? ` ${figures5.pointer} ${name}` : ` ${name}` }, name);
26206
26127
  })
26207
26128
  ] });
26208
26129
  })() })
@@ -27030,18 +26951,18 @@ function FieldEditor({
27030
26951
  });
27031
26952
  const innerWidth = Math.max(1, width - 2);
27032
26953
  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." })
26954
+ return /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", width, borderStyle: "single", borderColor: PALETTE.error, children: [
26955
+ /* @__PURE__ */ jsx27(Text23, { bold: true, color: PALETTE.error, children: "FIELD EDITOR \u2014 parse error" }),
26956
+ /* @__PURE__ */ jsx27(Text23, { color: PALETTE.error, children: parseErr }),
26957
+ /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: "Cannot display structured editor. Fix the JSON first." })
27037
26958
  ] });
27038
26959
  }
27039
26960
  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" })
26961
+ return /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", width, borderStyle: "single", borderColor: PALETTE.warning, children: [
26962
+ /* @__PURE__ */ jsx27(Text23, { bold: true, color: PALETTE.warning, children: "FIELD EDITOR \u2014 no fields" }),
26963
+ /* @__PURE__ */ jsx27(Text23, { color: PALETTE.warning, children: "\u26A0 No properties classified for this component. The LLM didn't find anything to classify." }),
26964
+ /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: "You can add fields manually below or reject this component." }),
26965
+ /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: "Enter to save \xB7 Esc to discard" })
27045
26966
  ] });
27046
26967
  }
27047
26968
  const hasEmptyProperties = props.length === 0 && slots.length === 0;
@@ -27170,7 +27091,7 @@ function FieldEditor({
27170
27091
  const renderRow = (row, index) => {
27171
27092
  const key = rowKey(row, index);
27172
27093
  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);
27094
+ return /* @__PURE__ */ jsx27(Box21, { flexDirection: "column", paddingTop: 1, children: /* @__PURE__ */ jsx27(Text23, { bold: true, color: PALETTE.success, children: row.label }) }, key);
27174
27095
  }
27175
27096
  if (row.kind === "component-description") {
27176
27097
  const isSelected2 = inComponentDesc && active;
@@ -27252,9 +27173,9 @@ function FieldEditor({
27252
27173
  ...fixedHeight ? { height } : { minHeight: height },
27253
27174
  clipOverflow: fixedHeight,
27254
27175
  borderStyle: "single",
27255
- borderColor: hasEmptyProperties ? PALETTE3.warning : active ? PALETTE3.info : PALETTE3.border,
27176
+ borderColor: hasEmptyProperties ? PALETTE.warning : active ? PALETTE.accent : PALETTE.border,
27256
27177
  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." }),
27178
+ 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
27179
  header,
27259
27180
  /* @__PURE__ */ jsx27(Box21, { flexDirection: "column", width: innerWidth, flexShrink: 0, children: focusLevel === "field" && !inComponentDesc && currentProp ? /* @__PURE__ */ jsx27(
27260
27181
  PropRow,
@@ -27305,7 +27226,7 @@ function FieldEditor({
27305
27226
  `visible-${key}`
27306
27227
  );
27307
27228
  }) }),
27308
- categoryBelow && /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.success, bold: true, children: `(${categoryBelow} below)` }),
27229
+ categoryBelow && /* @__PURE__ */ jsx27(Text23, { color: PALETTE.success, bold: true, children: `(${categoryBelow} below)` }),
27309
27230
  sourceOpen && !onToggleSourceExternal && (() => {
27310
27231
  const propMeta = !inSlots && !inComponentDesc && currentProp ? metadata?.props?.[currentProp.name] : void 0;
27311
27232
  const start = propMeta?.sourceStartLine ?? null;
@@ -27315,20 +27236,20 @@ function FieldEditor({
27315
27236
  const headerPath = path5 ?? "<unknown source path>";
27316
27237
  if (!start || !end2 || !src) {
27317
27238
  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)" }),
27239
+ /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, bold: true, children: `source: ${headerPath}` }),
27240
+ /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: "(no source location captured for this prop)" }),
27320
27241
  /* @__PURE__ */ jsx27(Text23, { children: "[s] close" })
27321
27242
  ] });
27322
27243
  }
27323
27244
  const lines = src.split("\n").slice(Math.max(0, start - 1), end2);
27324
27245
  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}`)),
27246
+ /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, bold: true, children: `${headerPath}: lines ${start}\u2013${end2}` }),
27247
+ lines.map((ln, i) => /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: ln }, `source-line-${i}`)),
27327
27248
  /* @__PURE__ */ jsx27(Text23, { children: "[s] close \xB7 [Esc] close" })
27328
27249
  ] });
27329
27250
  })(),
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" }),
27251
+ showHelp && /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.accent, paddingX: 1, children: [
27252
+ /* @__PURE__ */ jsx27(Text23, { bold: true, color: PALETTE.accent, children: "Keybindings" }),
27332
27253
  /* @__PURE__ */ jsx27(Text23, { children: " " }),
27333
27254
  /* @__PURE__ */ jsx27(Text23, { bold: true, children: "Row navigation" }),
27334
27255
  /* @__PURE__ */ jsx27(Text23, { children: " \u2191/\u2193 move between rows" }),
@@ -27353,10 +27274,10 @@ function FieldEditor({
27353
27274
  /* @__PURE__ */ jsx27(Text23, { children: " " + componentRationaleKey.padEnd(16) + " toggle component rationale panel" }),
27354
27275
  /* @__PURE__ */ jsx27(Text23, { children: " ? toggle this overlay" }),
27355
27276
  /* @__PURE__ */ jsx27(Text23, { children: " " }),
27356
- /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, children: "press ? or Esc to close" })
27277
+ /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: "press ? or Esc to close" })
27357
27278
  ] }),
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 }) })
27279
+ validationError && /* @__PURE__ */ jsx27(Text23, { color: PALETTE.error, children: "\u2717 " + validationError }),
27280
+ /* @__PURE__ */ jsx27(Box21, { paddingTop: 1, children: /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: modeLabel }) })
27360
27281
  ]
27361
27282
  }
27362
27283
  );
@@ -27365,7 +27286,7 @@ var SLOT_FIELDS;
27365
27286
  var init_FieldEditor = __esm({
27366
27287
  "packages/experience-design-system-cli/src/tui/import/steps/09-review/components/FieldEditor.tsx"() {
27367
27288
  "use strict";
27368
- init_theme3();
27289
+ init_theme();
27369
27290
  init_src5();
27370
27291
  init_useImmediateInput();
27371
27292
  init_scroll_offset();
@@ -27420,21 +27341,21 @@ function RationaleLine({ line, active }) {
27420
27341
  return /* @__PURE__ */ jsx28(Box22, { children: /* @__PURE__ */ jsx28(Text24, { children: " " }) });
27421
27342
  }
27422
27343
  if (line.kind === "heading") {
27423
- return /* @__PURE__ */ jsx28(Box22, { children: /* @__PURE__ */ jsx28(Text24, { bold: true, color: active ? PALETTE3.info : PALETTE3.muted, children: line.text }) });
27344
+ return /* @__PURE__ */ jsx28(Box22, { children: /* @__PURE__ */ jsx28(Text24, { bold: true, color: active ? PALETTE.accent : PALETTE.muted, children: line.text }) });
27424
27345
  }
27425
27346
  if (line.kind === "label") {
27426
27347
  return /* @__PURE__ */ jsxs23(Box22, { children: [
27427
27348
  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 })
27349
+ /* @__PURE__ */ jsx28(Text24, { bold: true, color: active ? line.color : PALETTE.muted, children: line.text }),
27350
+ line.suffix && /* @__PURE__ */ jsx28(Text24, { color: PALETTE.muted, children: line.suffix })
27430
27351
  ] });
27431
27352
  }
27432
- return /* @__PURE__ */ jsx28(Box22, { children: /* @__PURE__ */ jsx28(Text24, { color: !active || line.dim ? PALETTE3.muted : void 0, children: line.text }) });
27353
+ return /* @__PURE__ */ jsx28(Box22, { children: /* @__PURE__ */ jsx28(Text24, { color: !active || line.dim ? PALETTE.muted : void 0, children: line.text }) });
27433
27354
  }
27434
27355
  var init_RationaleLine = __esm({
27435
27356
  "packages/experience-design-system-cli/src/tui/import/steps/09-review/components/RationaleLine.tsx"() {
27436
27357
  "use strict";
27437
- init_theme3();
27358
+ init_theme();
27438
27359
  }
27439
27360
  });
27440
27361
 
@@ -27514,9 +27435,9 @@ function ComponentRationalePanel({
27514
27435
  width,
27515
27436
  height: height + 2,
27516
27437
  borderStyle: "single",
27517
- borderColor: active ? PALETTE3.inverse : void 0,
27438
+ borderColor: active ? PALETTE.text : void 0,
27518
27439
  children: [
27519
- /* @__PURE__ */ jsx29(Box23, { children: /* @__PURE__ */ jsx29(Text25, { bold: true, color: active ? void 0 : PALETTE3.muted, children: `Component rationale: ${data.name}` }) }),
27440
+ /* @__PURE__ */ jsx29(Box23, { children: /* @__PURE__ */ jsx29(Text25, { bold: true, color: active ? void 0 : PALETTE.muted, children: `Component rationale: ${data.name}` }) }),
27520
27441
  visible.map((line, i) => /* @__PURE__ */ jsx29(RationaleLine, { line, active }, i)),
27521
27442
  /* @__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
27443
  ]
@@ -27527,7 +27448,7 @@ var PLACEHOLDER;
27527
27448
  var init_ComponentRationalePanel = __esm({
27528
27449
  "packages/experience-design-system-cli/src/tui/import/steps/09-review/components/ComponentRationalePanel.tsx"() {
27529
27450
  "use strict";
27530
- init_theme3();
27451
+ init_theme();
27531
27452
  init_wrap_text();
27532
27453
  init_RationaleLine();
27533
27454
  PLACEHOLDER = "(no rationale captured)";
@@ -27538,12 +27459,12 @@ var init_ComponentRationalePanel = __esm({
27538
27459
  import { Text as Text26 } from "ink";
27539
27460
  import { Fragment as Fragment6, jsx as jsx30 } from "react/jsx-runtime";
27540
27461
  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)) });
27462
+ return /* @__PURE__ */ jsx30(Fragment6, { children: parts.map((part, i) => /* @__PURE__ */ jsx30(Text26, { color: part.dim ? PALETTE.muted : part.color, children: part.text }, i)) });
27542
27463
  }
27543
27464
  var init_HighlightedLine = __esm({
27544
27465
  "packages/experience-design-system-cli/src/tui/import/steps/09-review/components/HighlightedLine.tsx"() {
27545
27466
  "use strict";
27546
- init_theme3();
27467
+ init_theme();
27547
27468
  }
27548
27469
  });
27549
27470
 
@@ -27564,10 +27485,10 @@ function ScrollablePanel({
27564
27485
  const overflowed = totalLines > height;
27565
27486
  return /* @__PURE__ */ jsxs25(Box24, { flexDirection: "column", width, height: height + 2, borderStyle: "single", borderColor, children: [
27566
27487
  /* @__PURE__ */ jsxs25(Box24, { children: [
27567
- /* @__PURE__ */ jsx31(Text27, { bold: true, color: active ? void 0 : PALETTE3.muted, children: title }),
27488
+ /* @__PURE__ */ jsx31(Text27, { bold: true, color: active ? void 0 : PALETTE.muted, children: title }),
27568
27489
  overflowed && /* @__PURE__ */ jsxs25(Fragment7, { children: [
27569
27490
  /* @__PURE__ */ jsx31(Box24, { flexGrow: 1 }),
27570
- /* @__PURE__ */ jsx31(Text27, { color: active ? void 0 : PALETTE3.muted, children: `\u2195 ${visibleStart}-${visibleEnd}/${totalLines}` })
27491
+ /* @__PURE__ */ jsx31(Text27, { color: active ? void 0 : PALETTE.muted, children: `\u2195 ${visibleStart}-${visibleEnd}/${totalLines}` })
27571
27492
  ] })
27572
27493
  ] }),
27573
27494
  children
@@ -27576,7 +27497,7 @@ function ScrollablePanel({
27576
27497
  var init_ScrollablePanel = __esm({
27577
27498
  "packages/experience-design-system-cli/src/tui/import/steps/09-review/components/ScrollablePanel.tsx"() {
27578
27499
  "use strict";
27579
- init_theme3();
27500
+ init_theme();
27580
27501
  }
27581
27502
  });
27582
27503
 
@@ -27667,7 +27588,7 @@ function renderRationaleLines(rows, innerWidth) {
27667
27588
  out.push({
27668
27589
  kind: "label",
27669
27590
  text: row.name,
27670
- color: PALETTE3.info,
27591
+ color: PALETTE.accent,
27671
27592
  suffix: row.kind === "slot" ? " (slot)" : void 0
27672
27593
  });
27673
27594
  for (const line of wrapText(row.rationale, innerWidth)) {
@@ -27703,7 +27624,7 @@ function RationalePanel({
27703
27624
  totalLines,
27704
27625
  visibleStart,
27705
27626
  visibleEnd,
27706
- borderColor: active ? PALETTE3.inverse : void 0,
27627
+ borderColor: active ? PALETTE.text : void 0,
27707
27628
  children: visible.map((line, i) => /* @__PURE__ */ jsx33(RationaleLine, { line, active }, i))
27708
27629
  }
27709
27630
  );
@@ -27711,7 +27632,7 @@ function RationalePanel({
27711
27632
  var init_RationalePanel = __esm({
27712
27633
  "packages/experience-design-system-cli/src/tui/import/steps/09-review/components/RationalePanel.tsx"() {
27713
27634
  "use strict";
27714
- init_theme3();
27635
+ init_theme();
27715
27636
  init_wrap_text();
27716
27637
  init_RationaleLine();
27717
27638
  init_ScrollablePanel();
@@ -27747,21 +27668,29 @@ function TokenReviewPanel({
27747
27668
  width,
27748
27669
  height: height + 2,
27749
27670
  borderStyle: "single",
27750
- borderColor: active ? PALETTE3.inverse : void 0,
27671
+ borderColor: active ? PALETTE.text : void 0,
27751
27672
  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})` }),
27673
+ /* @__PURE__ */ jsx34(Text28, { bold: true, color: active ? void 0 : PALETTE.muted, wrap: "truncate", children: `TOKEN REVIEW \u2014 ${componentName} \xB7 ${current.propName} (edit allowed)` }),
27674
+ /* @__PURE__ */ jsx34(Text28, { color: PALETTE.muted, wrap: "truncate", children: `select which tokens are allowed (${rangeLabel})` }),
27754
27675
  /* @__PURE__ */ jsx34(Text28, { children: " " }),
27755
- current.paths.length === 0 && /* @__PURE__ */ jsx34(Text28, { color: PALETTE3.muted, children: "(no compatible tokens found for this token kind)" }),
27676
+ current.paths.length === 0 && /* @__PURE__ */ jsx34(Text28, { color: PALETTE.muted, children: "(no compatible tokens found for this token kind)" }),
27756
27677
  visiblePaths.map((path5, i) => {
27757
27678
  const pathIndex = scrollStart + i;
27758
27679
  const checked = editSelection.has(path5);
27759
27680
  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);
27681
+ return /* @__PURE__ */ jsx34(Box26, { children: /* @__PURE__ */ jsx34(
27682
+ Text28,
27683
+ {
27684
+ color: focused ? PALETTE.accent : active ? void 0 : PALETTE.muted,
27685
+ bold: focused,
27686
+ wrap: "truncate",
27687
+ children: ` [${checked ? "x" : " "}] ${path5}`
27688
+ }
27689
+ ) }, path5);
27761
27690
  }),
27762
27691
  /* @__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" })
27692
+ /* @__PURE__ */ jsx34(Text28, { color: PALETTE.muted, wrap: "truncate", children: "[\u2191/\u2193] move [Space] toggle" }),
27693
+ /* @__PURE__ */ jsx34(Text28, { color: PALETTE.muted, wrap: "truncate", children: "[Ctrl+S] save [Esc] cancel" })
27765
27694
  ]
27766
27695
  }
27767
27696
  );
@@ -27773,16 +27702,16 @@ function TokenReviewPanel({
27773
27702
  width,
27774
27703
  height: height + 2,
27775
27704
  borderStyle: "single",
27776
- borderColor: active ? PALETTE3.inverse : void 0,
27705
+ borderColor: active ? PALETTE.text : void 0,
27777
27706
  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)" }),
27707
+ /* @__PURE__ */ jsx34(Text28, { bold: true, color: active ? void 0 : PALETTE.muted, children: `TOKEN REVIEW \u2014 ${componentName}` }),
27708
+ suggestions.length === 0 && /* @__PURE__ */ jsx34(Text28, { color: PALETTE.muted, children: "(no token suggestions for this component)" }),
27780
27709
  suggestions.map((s, i) => {
27781
27710
  const focused = i === selectedRow;
27782
27711
  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(", ")}` })
27712
+ /* @__PURE__ */ jsx34(Box26, { children: /* @__PURE__ */ jsx34(Text28, { color: focused ? PALETTE.accent : active ? void 0 : PALETTE.muted, bold: focused, children: `${focused ? figures6.pointer : " "} ${s.propName}` }) }),
27713
+ /* @__PURE__ */ jsx34(Text28, { color: PALETTE.muted, children: ` suggested: ${s.suggested.join(", ")}` }),
27714
+ /* @__PURE__ */ jsx34(Text28, { color: PALETTE.muted, children: ` allowed: ${s.allowed.join(", ")}` })
27786
27715
  ] }, s.propName);
27787
27716
  }),
27788
27717
  /* @__PURE__ */ jsx34(Text28, { children: " " }),
@@ -27794,7 +27723,7 @@ function TokenReviewPanel({
27794
27723
  var init_TokenReviewPanel = __esm({
27795
27724
  "packages/experience-design-system-cli/src/tui/import/steps/09-review/components/TokenReviewPanel.tsx"() {
27796
27725
  "use strict";
27797
- init_theme3();
27726
+ init_theme();
27798
27727
  }
27799
27728
  });
27800
27729
 
@@ -27874,9 +27803,9 @@ function ReviewDetailsPanel({
27874
27803
  const sourceLineCount = Math.max(1, height - 4);
27875
27804
  const lines = source ? source.split("\n").slice(panelScrollOffset, panelScrollOffset + sourceLineCount) : [];
27876
27805
  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" })
27806
+ /* @__PURE__ */ jsx35(Text29, { color: PALETTE.muted, bold: true, wrap: "truncate-end", children: `source: ${headerPath}` }),
27807
+ 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)" }),
27808
+ /* @__PURE__ */ jsx35(Text29, { color: PALETTE.muted, wrap: "truncate-end", children: "[s/Esc] close" })
27880
27809
  ] });
27881
27810
  }
27882
27811
  if (panelOpen === "token-review") {
@@ -27918,7 +27847,7 @@ var init_review_details_panel = __esm({
27918
27847
  init_RationalePanel();
27919
27848
  init_TokenReviewPanel();
27920
27849
  init_windowed_panel();
27921
- init_theme3();
27850
+ init_theme();
27922
27851
  }
27923
27852
  });
27924
27853
 
@@ -28045,17 +27974,17 @@ function ReviewEmptyComponentsWarning({
28045
27974
  hidden
28046
27975
  }) {
28047
27976
  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` });
27977
+ return /* @__PURE__ */ jsx37(Text30, { color: PALETTE.warning, children: `\u26A0 ${count} component${count === 1 ? "" : "s"} had no classifiable props \u2014 review with care` });
28049
27978
  }
28050
27979
  function ReviewNoSelection() {
28051
- return /* @__PURE__ */ jsx37(Box27, { flexGrow: 1, paddingLeft: 1, flexDirection: "column", children: /* @__PURE__ */ jsx37(Text30, { color: PALETTE3.muted, children: "No component selected" }) });
27980
+ return /* @__PURE__ */ jsx37(Box27, { flexGrow: 1, paddingLeft: 1, flexDirection: "column", children: /* @__PURE__ */ jsx37(Text30, { color: PALETTE.muted, children: "No component selected" }) });
28052
27981
  }
28053
27982
  function ReviewFinalizeError({
28054
27983
  message,
28055
27984
  hidden
28056
27985
  }) {
28057
27986
  if (hidden || !message) return null;
28058
- return /* @__PURE__ */ jsx37(Text30, { color: PALETTE3.error, children: `\u26A0 ${message}` });
27987
+ return /* @__PURE__ */ jsx37(Text30, { color: PALETTE.error, children: `\u26A0 ${message}` });
28059
27988
  }
28060
27989
  function ReviewPanelFooter({
28061
27990
  reviewEditor,
@@ -28079,7 +28008,7 @@ function ReviewComponentTitle({
28079
28008
  return /* @__PURE__ */ jsxs28(Box27, { paddingLeft: 2, paddingBottom: 1, children: [
28080
28009
  /* @__PURE__ */ jsx37(Text30, { bold: true, wrap: "truncate-end", children: selectedKey }),
28081
28010
  /* @__PURE__ */ jsx37(Box27, { flexGrow: 1 }),
28082
- /* @__PURE__ */ jsxs28(Text30, { color: PALETTE3.muted, wrap: "truncate-end", children: [
28011
+ /* @__PURE__ */ jsxs28(Text30, { color: PALETTE.muted, wrap: "truncate-end", children: [
28083
28012
  propCount,
28084
28013
  " prop",
28085
28014
  propCount !== 1 ? "s" : "",
@@ -28135,8 +28064,8 @@ function ReviewComponentPanel({
28135
28064
  )
28136
28065
  }
28137
28066
  ) }),
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(
28067
+ /* @__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 : " " }) }),
28068
+ /* @__PURE__ */ jsx37(Box27, { width: contentWidth, height: 1, flexShrink: 0, children: /* @__PURE__ */ jsx37(Text30, { color: PALETTE.muted, wrap: "truncate-end", children: /* @__PURE__ */ jsx37(
28140
28069
  ReviewPanelFooter,
28141
28070
  {
28142
28071
  reviewEditor,
@@ -28151,7 +28080,7 @@ function ReviewComponentPanel({
28151
28080
  var init_ReviewComponentPanel = __esm({
28152
28081
  "packages/experience-design-system-cli/src/tui/import/steps/09-review/components/ReviewComponentPanel.tsx"() {
28153
28082
  "use strict";
28154
- init_theme3();
28083
+ init_theme();
28155
28084
  init_review_json_panel();
28156
28085
  init_ReviewDetailsEditor();
28157
28086
  init_windowed_panel();
@@ -28173,11 +28102,11 @@ function countReviewStatuses(entries) {
28173
28102
  );
28174
28103
  }
28175
28104
  function ReviewLoadingState() {
28176
- return /* @__PURE__ */ jsx38(Box28, { paddingX: 2, paddingY: 1, children: /* @__PURE__ */ jsx38(Text31, { color: PALETTE3.muted, children: "Loading generated definitions..." }) });
28105
+ return /* @__PURE__ */ jsx38(Box28, { paddingX: 2, paddingY: 1, children: /* @__PURE__ */ jsx38(Text31, { color: PALETTE.muted, children: "Loading generated definitions..." }) });
28177
28106
  }
28178
28107
  function ReviewLoadError({ message }) {
28179
28108
  return /* @__PURE__ */ jsxs29(Box28, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
28180
- /* @__PURE__ */ jsx38(Text31, { color: PALETTE3.error, children: message }),
28109
+ /* @__PURE__ */ jsx38(Text31, { color: PALETTE.error, children: message }),
28181
28110
  /* @__PURE__ */ jsx38(Text31, { children: " " }),
28182
28111
  /* @__PURE__ */ jsx38(Text31, { children: "[q / Enter / Esc] Quit" })
28183
28112
  ] });
@@ -28185,7 +28114,7 @@ function ReviewLoadError({ message }) {
28185
28114
  var init_ReviewStatus = __esm({
28186
28115
  "packages/experience-design-system-cli/src/tui/import/steps/09-review/components/ReviewStatus.tsx"() {
28187
28116
  "use strict";
28188
- init_theme3();
28117
+ init_theme();
28189
28118
  }
28190
28119
  });
28191
28120
 
@@ -28435,41 +28364,41 @@ function FinalizeDialog({
28435
28364
  /* @__PURE__ */ jsx39(Text32, { bold: true, children: "\u2500".repeat(22) + " Finalize " + "\u2500".repeat(22) }),
28436
28365
  /* @__PURE__ */ jsx39(Text32, { children: " " }),
28437
28366
  /* @__PURE__ */ jsxs30(Text32, { children: [
28438
- /* @__PURE__ */ jsxs30(Text32, { color: PALETTE3.success, children: [
28367
+ /* @__PURE__ */ jsxs30(Text32, { color: PALETTE.success, children: [
28439
28368
  accepted,
28440
28369
  " accepted"
28441
28370
  ] }),
28442
28371
  /* @__PURE__ */ jsx39(Text32, { children: " \xB7 " }),
28443
- /* @__PURE__ */ jsxs30(Text32, { color: PALETTE3.error, children: [
28372
+ /* @__PURE__ */ jsxs30(Text32, { color: PALETTE.error, children: [
28444
28373
  rejected,
28445
28374
  " rejected"
28446
28375
  ] }),
28447
28376
  /* @__PURE__ */ jsx39(Text32, { children: " \xB7 " }),
28448
- /* @__PURE__ */ jsxs30(Text32, { color: PALETTE3.muted, children: [
28377
+ /* @__PURE__ */ jsxs30(Text32, { color: PALETTE.muted, children: [
28449
28378
  needsReview,
28450
28379
  " unresolved"
28451
28380
  ] })
28452
28381
  ] }),
28453
28382
  /* @__PURE__ */ jsx39(Text32, { children: " " }),
28454
28383
  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." }),
28384
+ /* @__PURE__ */ jsx39(Text32, { bold: true, color: PALETTE.warning, children: "\u26A0 No components are accepted \u2014 nothing will be pushed." }),
28385
+ /* @__PURE__ */ jsx39(Text32, { color: PALETTE.warning, children: "Accept at least one component ([a] a row, [A] accept all) to push." }),
28457
28386
  /* @__PURE__ */ jsx39(Text32, { children: " " })
28458
28387
  ] }),
28459
28388
  !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." }),
28389
+ /* @__PURE__ */ jsx39(Text32, { color: PALETTE.warning, children: "\u26A0 " + needsReview + " unresolved component" + (needsReview === 1 ? "" : "s") + " will not be pushed." }),
28390
+ /* @__PURE__ */ jsx39(Text32, { color: PALETTE.warning, children: "Only explicitly accepted components ship." }),
28462
28391
  /* @__PURE__ */ jsx39(Text32, { children: " " })
28463
28392
  ] }),
28464
28393
  /* @__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: " " }),
28394
+ 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
28395
  /* @__PURE__ */ jsx39(Text32, { children: " " })
28467
28396
  ] }),
28468
28397
  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" }),
28398
+ /* @__PURE__ */ jsx39(Text32, { bold: true, color: PALETTE.error, children: removedComponentsHeader(removed.length, false) }),
28399
+ hasMoreAbove && /* @__PURE__ */ jsx39(Text32, { color: PALETTE.muted, children: "\u2191 more above" }),
28400
+ windowed.map((rc) => /* @__PURE__ */ jsx39(Text32, { color: PALETTE.error, children: removedComponentLine(rc) }, rc.id)),
28401
+ hasMoreBelow && /* @__PURE__ */ jsx39(Text32, { color: PALETTE.muted, children: "\u2193 more below" }),
28473
28402
  removed.length > FINALIZE_REMOVED_WINDOW && /* @__PURE__ */ jsx39(Text32, { children: "[\u2191\u2193] scroll deletions" }),
28474
28403
  /* @__PURE__ */ jsx39(Text32, { children: " " })
28475
28404
  ] }),
@@ -28482,7 +28411,7 @@ var FINALIZE_REMOVED_WINDOW;
28482
28411
  var init_FinalizeDialog = __esm({
28483
28412
  "packages/experience-design-system-cli/src/tui/import/steps/09-review/components/FinalizeDialog.tsx"() {
28484
28413
  "use strict";
28485
- init_theme3();
28414
+ init_theme();
28486
28415
  init_useImmediateInput();
28487
28416
  init_removed_components_text();
28488
28417
  FINALIZE_REMOVED_WINDOW = 6;
@@ -29010,8 +28939,8 @@ function ReviewStepDialogs({
29010
28939
  }
29011
28940
  function ReviewReloadDialog({ open }) {
29012
28941
  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?" }),
28942
+ return /* @__PURE__ */ jsxs32(Box31, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
28943
+ /* @__PURE__ */ jsx41(Text34, { bold: true, color: PALETTE.warning, children: "Reload from saved state?" }),
29015
28944
  /* @__PURE__ */ jsx41(Text34, { children: "Unsaved in-memory changes will be lost." }),
29016
28945
  /* @__PURE__ */ jsx41(Text34, { children: " " }),
29017
28946
  /* @__PURE__ */ jsx41(Text34, { children: " [Enter] Confirm" }),
@@ -29021,7 +28950,7 @@ function ReviewReloadDialog({ open }) {
29021
28950
  var init_ReviewDialogs = __esm({
29022
28951
  "packages/experience-design-system-cli/src/tui/import/steps/09-review/components/ReviewDialogs.tsx"() {
29023
28952
  "use strict";
29024
- init_theme3();
28953
+ init_theme();
29025
28954
  init_FinalizeDialog();
29026
28955
  init_QuitDialog();
29027
28956
  init_ReviewStatus();
@@ -29432,25 +29361,25 @@ function LivePreviewSummary({
29432
29361
  const counts = { new: 0, changed: 0, removed: 0, breaking: 0 };
29433
29362
  for (const annotation of previewAnnotations.values()) counts[annotation] += 1;
29434
29363
  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...` });
29364
+ if (disabled) return /* @__PURE__ */ jsx42(Text35, { color: PALETTE.muted, children: "Preview: disabled (creds rejected)" });
29365
+ if (status === "running" && !hasCounts) return /* @__PURE__ */ jsx42(Text35, { color: PALETTE.muted, children: `Preview: ${spinner} running...` });
29437
29366
  if (!hasCounts) return null;
29438
29367
  return /* @__PURE__ */ jsxs33(Box32, { children: [
29439
29368
  /* @__PURE__ */ jsx42(Text35, { children: "Preview: " }),
29440
- /* @__PURE__ */ jsx42(Text35, { color: PALETTE3.success, children: `${counts.new} new` }),
29369
+ /* @__PURE__ */ jsx42(Text35, { color: PALETTE.success, children: `${counts.new} new` }),
29441
29370
  /* @__PURE__ */ jsx42(Text35, { children: " \xB7 " }),
29442
- /* @__PURE__ */ jsx42(Text35, { color: PALETTE3.warning, children: `${counts.changed} changed` }),
29371
+ /* @__PURE__ */ jsx42(Text35, { color: PALETTE.warning, children: `${counts.changed} changed` }),
29443
29372
  /* @__PURE__ */ jsx42(Text35, { children: " \xB7 " }),
29444
- /* @__PURE__ */ jsx42(Text35, { color: PALETTE3.muted, children: `${counts.removed} removed` }),
29373
+ /* @__PURE__ */ jsx42(Text35, { color: PALETTE.muted, children: `${counts.removed} removed` }),
29445
29374
  showRemovedListHint && removedCount > 0 && /* @__PURE__ */ jsx42(Text35, { children: " ([d] removed list)" }),
29446
29375
  /* @__PURE__ */ jsx42(Text35, { children: " \xB7 " }),
29447
- /* @__PURE__ */ jsx42(Text35, { color: PALETTE3.error, bold: true, children: `${counts.breaking} breaking` })
29376
+ /* @__PURE__ */ jsx42(Text35, { color: PALETTE.error, bold: true, children: `${counts.breaking} breaking` })
29448
29377
  ] });
29449
29378
  }
29450
29379
  var init_LivePreviewSummary = __esm({
29451
29380
  "packages/experience-design-system-cli/src/tui/import/steps/09-review/components/LivePreviewSummary.tsx"() {
29452
29381
  "use strict";
29453
- init_theme3();
29382
+ init_theme();
29454
29383
  }
29455
29384
  });
29456
29385
 
@@ -29499,10 +29428,10 @@ function CyclePathLine({
29499
29428
  highlightComponents = false,
29500
29429
  highlightLine = false
29501
29430
  }) {
29502
- return /* @__PURE__ */ jsxs34(Text36, { color: highlightLine ? PALETTE3.warning : void 0, children: [
29431
+ return /* @__PURE__ */ jsxs34(Text36, { color: highlightLine ? PALETTE.warning : void 0, children: [
29503
29432
  prefix,
29504
29433
  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)
29434
+ (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
29435
  )
29507
29436
  ] });
29508
29437
  }
@@ -29514,9 +29443,9 @@ function CycleDetailPanel({
29514
29443
  height
29515
29444
  }) {
29516
29445
  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"),
29446
+ /* @__PURE__ */ jsx43(Text36, { bold: true, color: PALETTE.warning, children: `SLOT DEPENDENCY CYCLES (${cycles.length})` }, "cyc-title"),
29447
+ /* @__PURE__ */ jsx43(Text36, { color: PALETTE.muted, children: "push will fail until these are resolved" }, "cyc-sub"),
29448
+ /* @__PURE__ */ jsx43(Text36, { color: PALETTE.muted, children: "Reject a cycle member or remove a slot edge to break the cycle." }, "cyc-guidance"),
29520
29449
  /* @__PURE__ */ jsx43(Text36, { children: " " }, "cyc-space")
29521
29450
  ];
29522
29451
  cycles.forEach((cycle, index) => {
@@ -29528,7 +29457,7 @@ function CycleDetailPanel({
29528
29457
  );
29529
29458
  if (cycle.suggestedBreak) {
29530
29459
  lines.push(
29531
- /* @__PURE__ */ jsx43(Text36, { color: PALETTE3.muted, children: ` Suggested fix: remove [${cycle.suggestedBreak.slotName}] from ${cycle.suggestedBreak.fromComponent}` }, `cyc-fix-${index}`)
29460
+ /* @__PURE__ */ jsx43(Text36, { color: PALETTE.muted, children: ` Suggested fix: remove [${cycle.suggestedBreak.slotName}] from ${cycle.suggestedBreak.fromComponent}` }, `cyc-fix-${index}`)
29532
29461
  );
29533
29462
  }
29534
29463
  lines.push(/* @__PURE__ */ jsx43(Text36, { children: " " }, `cyc-s-${index}`));
@@ -29536,9 +29465,9 @@ function CycleDetailPanel({
29536
29465
  const footer = "[\u2191\u2193] move [Enter] fix cycle [c/q/Esc] close";
29537
29466
  const viewportHeight = Math.max(1, height - 3);
29538
29467
  const visible = lines.slice(scrollOffset, scrollOffset + viewportHeight - 1);
29539
- return /* @__PURE__ */ jsxs34(FixedPanel, { width, height, borderStyle: "round", borderColor: PALETTE3.warning, paddingLeft: 1, children: [
29468
+ return /* @__PURE__ */ jsxs34(FixedPanel, { width, height, borderStyle: "round", borderColor: PALETTE.warning, paddingLeft: 1, children: [
29540
29469
  visible,
29541
- /* @__PURE__ */ jsx43(Text36, { color: PALETTE3.muted, children: footer })
29470
+ /* @__PURE__ */ jsx43(Text36, { color: PALETTE.muted, children: footer })
29542
29471
  ] });
29543
29472
  }
29544
29473
  function BreakCyclePanel({
@@ -29549,14 +29478,14 @@ function BreakCyclePanel({
29549
29478
  width,
29550
29479
  height
29551
29480
  }) {
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" }),
29481
+ return /* @__PURE__ */ jsxs34(FixedPanel, { width, height, borderStyle: "round", borderColor: PALETTE.warning, paddingLeft: 1, children: [
29482
+ /* @__PURE__ */ jsx43(Text36, { bold: true, color: PALETTE.warning, children: "BREAK CYCLE \u2014 remove a slot edge" }),
29554
29483
  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." }),
29484
+ /* @__PURE__ */ jsx43(Text36, { color: PALETTE.muted, children: cycle ? "Deleting an edge removes it from $allowedComponents (undo with Ctrl+Z)." : "No cycle highlighted." }),
29556
29485
  /* @__PURE__ */ jsx43(Text36, { children: " " }),
29557
- edges.length > 0 && /* @__PURE__ */ jsx43(Text36, { color: PALETTE3.muted, children: "remove slot edge:" }),
29486
+ edges.length > 0 && /* @__PURE__ */ jsx43(Text36, { color: PALETTE.muted, children: "remove slot edge:" }),
29558
29487
  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" })
29488
+ 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
29489
  ] });
29561
29490
  }
29562
29491
  function buildBreakingRows(breakingChanges) {
@@ -29602,7 +29531,7 @@ function deriveBreakingChanges(response) {
29602
29531
  }
29603
29532
  function GenerateReviewStep(props) {
29604
29533
  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." }) });
29534
+ 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
29535
  }
29607
29536
  return /* @__PURE__ */ jsx43(GenerateReviewStepView, { ...props, extractSessionId: props.extractSessionId });
29608
29537
  }
@@ -30519,8 +30448,8 @@ function GenerateReviewStepView({
30519
30448
  }
30520
30449
  ),
30521
30450
  /* @__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) }),
30451
+ removedComponents.length > 0 && !dialogOpen && /* @__PURE__ */ jsxs34(Box33, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.error, paddingX: 1, children: [
30452
+ /* @__PURE__ */ jsx43(Text36, { bold: true, color: PALETTE.error, children: removedComponentsHeader(removedComponents.length, true) }),
30524
30453
  !removedBannerCollapsed && /* @__PURE__ */ jsxs34(Fragment13, { children: [
30525
30454
  /* @__PURE__ */ jsx43(Text36, { children: " " }),
30526
30455
  removedComponents.map((rc) => /* @__PURE__ */ jsx43(Text36, { children: removedComponentLine(rc) }, rc.id))
@@ -30529,7 +30458,7 @@ function GenerateReviewStepView({
30529
30458
  breakingChanges.length > 0 && !dialogOpen && /* @__PURE__ */ jsx43(Box33, { paddingX: 1, children: /* @__PURE__ */ jsx43(
30530
30459
  Text36,
30531
30460
  {
30532
- color: PALETTE3.warning,
30461
+ color: PALETTE.warning,
30533
30462
  children: `[b] ${breakingChanges.length} breaking change${breakingChanges.length === 1 ? "" : "s"}`
30534
30463
  }
30535
30464
  ) }),
@@ -30537,10 +30466,10 @@ function GenerateReviewStepView({
30537
30466
  const row = breakingRows[breakingCursor];
30538
30467
  const comp = row ? breakingChanges.find((b) => b.componentName === row.componentName) : void 0;
30539
30468
  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}`)),
30469
+ return /* @__PURE__ */ jsxs34(Box33, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
30470
+ /* @__PURE__ */ jsx43(Text36, { bold: true, color: PALETTE.warning, children: `Breaking changes \u2014 ${comp.componentName}` }),
30471
+ 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"}` }),
30472
+ 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
30473
  /* @__PURE__ */ jsx43(Text36, { children: "[D/Esc] close detail" })
30545
30474
  ] });
30546
30475
  })(),
@@ -30563,11 +30492,11 @@ function GenerateReviewStepView({
30563
30492
  const participantSet = cycleView.structural;
30564
30493
  const members = stillRejected.filter((n) => participantSet.has(n)).sort();
30565
30494
  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" })
30495
+ return /* @__PURE__ */ jsxs34(Box33, { flexDirection: "column", borderStyle: "single", borderColor: PALETTE.error, paddingX: 1, children: [
30496
+ /* @__PURE__ */ jsx43(Text36, { color: PALETTE.error, bold: true, children: `Cyclic component graph \u2014 auto-rejected ${stillRejected.length} component${stillRejected.length === 1 ? "" : "s"}:` }),
30497
+ members.length > 0 && /* @__PURE__ */ jsx43(Text36, { color: PALETTE.error, children: ` Cycle members: ${members.join(", ")}` }),
30498
+ ancestors.length > 0 && /* @__PURE__ */ jsx43(Text36, { color: PALETTE.error, children: ` Ancestors: ${ancestors.join(", ")}` }),
30499
+ /* @__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
30500
  ] });
30572
30501
  })(),
30573
30502
  /* @__PURE__ */ jsx43(ReviewEmptyComponentsWarning, { count: emptyCount, hidden: dialogOpen }),
@@ -30683,7 +30612,7 @@ function GenerateReviewStepView({
30683
30612
  ) : /* @__PURE__ */ jsx43(ReviewNoSelection, {})
30684
30613
  ] }),
30685
30614
  !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` }),
30615
+ /* @__PURE__ */ jsx43(Text36, { color: PALETTE.warning, children: `\u26A0 ${cycleRows.length} slot dependency cycle${cycleRows.length === 1 ? "" : "s"} detected \u2014 push will fail` }),
30687
30616
  cycleRows.slice(0, 3).map((cycle, idx) => {
30688
30617
  return /* @__PURE__ */ jsx43(
30689
30618
  CyclePathLine,
@@ -30696,7 +30625,7 @@ function GenerateReviewStepView({
30696
30625
  `cyc-banner-${idx}`
30697
30626
  );
30698
30627
  }),
30699
- cycleRows.length > 3 && /* @__PURE__ */ jsx43(Text36, { color: PALETTE3.warning, children: ` \u2026${cycleRows.length - 3} more` }),
30628
+ cycleRows.length > 3 && /* @__PURE__ */ jsx43(Text36, { color: PALETTE.warning, children: ` \u2026${cycleRows.length - 3} more` }),
30700
30629
  /* @__PURE__ */ jsx43(Text36, { children: " press [c] for detail" })
30701
30630
  ] }),
30702
30631
  /* @__PURE__ */ jsx43(
@@ -30717,7 +30646,7 @@ var HELP_SECTIONS2;
30717
30646
  var init_generate_review_step = __esm({
30718
30647
  "packages/experience-design-system-cli/src/tui/import/steps/09-review/generate-review-step.tsx"() {
30719
30648
  "use strict";
30720
- init_theme3();
30649
+ init_theme();
30721
30650
  init_review_json_panel();
30722
30651
  init_GroupedSidebar();
30723
30652
  init_composite_closure();
@@ -30824,49 +30753,24 @@ var init_generate_review_step = __esm({
30824
30753
  }
30825
30754
  });
30826
30755
 
30827
- // packages/experience-design-system-cli/src/tui/import/steps/10-flow/theme.ts
30828
- import { defaultTheme as defaultTheme2, extendTheme as extendTheme2 } from "@inkjs/ui";
30829
- var PALETTE4, INK_UI_THEME;
30830
- var init_theme4 = __esm({
30831
- "packages/experience-design-system-cli/src/tui/import/steps/10-flow/theme.ts"() {
30832
- "use strict";
30833
- init_theme3();
30834
- PALETTE4 = {
30835
- ...PALETTE3,
30836
- link: "#58A6FF"
30837
- };
30838
- INK_UI_THEME = extendTheme2(defaultTheme2, {
30839
- components: {
30840
- ProgressBar: {
30841
- styles: {
30842
- completed: () => ({
30843
- color: "blue"
30844
- })
30845
- }
30846
- }
30847
- }
30848
- });
30849
- }
30850
- });
30851
-
30852
30756
  // packages/experience-design-system-cli/src/tui/import/steps/10-flow/components/CustomPromptBanner.tsx
30853
30757
  import { Box as Box34, Text as Text37 } from "ink";
30854
30758
  import { jsx as jsx44, jsxs as jsxs35 } from "react/jsx-runtime";
30855
30759
  function CustomPromptBanner({ generatePromptPath }) {
30856
30760
  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: [
30761
+ return /* @__PURE__ */ jsxs35(Box34, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
30762
+ /* @__PURE__ */ jsx44(Text37, { color: PALETTE.warning, bold: true, children: "WARNING: Custom prompt active" }),
30763
+ generatePromptPath ? /* @__PURE__ */ jsxs35(Text37, { color: PALETTE.warning, children: [
30860
30764
  "components: ",
30861
30765
  generatePromptPath
30862
30766
  ] }) : null,
30863
- /* @__PURE__ */ jsx44(Text37, { color: PALETTE4.warning, children: "Bundled invariants (utility-wrapper rejection, description content rules) do NOT apply." })
30767
+ /* @__PURE__ */ jsx44(Text37, { color: PALETTE.warning, children: "Bundled invariants (utility-wrapper rejection, description content rules) do NOT apply." })
30864
30768
  ] });
30865
30769
  }
30866
30770
  var init_CustomPromptBanner = __esm({
30867
30771
  "packages/experience-design-system-cli/src/tui/import/steps/10-flow/components/CustomPromptBanner.tsx"() {
30868
30772
  "use strict";
30869
- init_theme4();
30773
+ init_theme();
30870
30774
  }
30871
30775
  });
30872
30776
 
@@ -30893,17 +30797,17 @@ import { Box as Box35, Text as Text38 } from "ink";
30893
30797
  import { jsx as jsx45, jsxs as jsxs36 } from "react/jsx-runtime";
30894
30798
  function SpaceEnvironment({ spaceId, environmentId }) {
30895
30799
  return /* @__PURE__ */ jsxs36(Box35, { gap: 1, marginTop: 1, children: [
30896
- /* @__PURE__ */ jsx45(Text38, { color: PALETTE4.muted, children: "Space:" }),
30800
+ /* @__PURE__ */ jsx45(Text38, { color: PALETTE.muted, children: "Space:" }),
30897
30801
  /* @__PURE__ */ jsx45(Text38, { children: spaceId }),
30898
- /* @__PURE__ */ jsx45(Text38, { color: PALETTE4.muted, children: "/" }),
30899
- /* @__PURE__ */ jsx45(Text38, { color: PALETTE4.muted, children: "Environment:" }),
30802
+ /* @__PURE__ */ jsx45(Text38, { color: PALETTE.muted, children: "/" }),
30803
+ /* @__PURE__ */ jsx45(Text38, { color: PALETTE.muted, children: "Environment:" }),
30900
30804
  /* @__PURE__ */ jsx45(Text38, { children: environmentId })
30901
30805
  ] });
30902
30806
  }
30903
30807
  var init_SpaceEnvironment = __esm({
30904
30808
  "packages/experience-design-system-cli/src/tui/import/steps/10-flow/components/SpaceEnvironment.tsx"() {
30905
30809
  "use strict";
30906
- init_theme4();
30810
+ init_theme();
30907
30811
  }
30908
30812
  });
30909
30813
 
@@ -30914,13 +30818,13 @@ function EntityRows({ entity, label }) {
30914
30818
  const plural3 = (n) => `${n} ${label}${n !== 1 ? "s" : ""}`;
30915
30819
  return /* @__PURE__ */ jsxs37(Fragment14, { children: [
30916
30820
  ACTIONS.filter((action) => entity[action] > 0).map((action) => /* @__PURE__ */ jsxs37(Text39, { children: [
30917
- /* @__PURE__ */ jsx46(Text39, { color: PALETTE4.success, children: "\u2713" }),
30821
+ /* @__PURE__ */ jsx46(Text39, { color: PALETTE.success, children: "\u2713" }),
30918
30822
  " ",
30919
30823
  plural3(entity[action]),
30920
30824
  " ",
30921
30825
  action
30922
30826
  ] }, action)),
30923
- entity.failed > 0 && /* @__PURE__ */ jsxs37(Text39, { color: PALETTE4.error, children: [
30827
+ entity.failed > 0 && /* @__PURE__ */ jsxs37(Text39, { color: PALETTE.error, children: [
30924
30828
  "\u2717 ",
30925
30829
  plural3(entity.failed),
30926
30830
  " failed \u2014 check logs above"
@@ -30929,8 +30833,8 @@ function EntityRows({ entity, label }) {
30929
30833
  }
30930
30834
  function LinkRow({ title, url }) {
30931
30835
  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 })
30836
+ /* @__PURE__ */ jsx46(Text39, { color: PALETTE.muted, children: title }),
30837
+ /* @__PURE__ */ jsx46(Text39, { color: PALETTE.accent, children: url })
30934
30838
  ] });
30935
30839
  }
30936
30840
  function DoneStep({
@@ -30953,17 +30857,17 @@ function DoneStep({
30953
30857
  const success = totalFailed === 0;
30954
30858
  const urlArgs = { host: host ?? "api.contentful.com", spaceId, environmentId };
30955
30859
  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: [
30860
+ success ? /* @__PURE__ */ jsx46(Text39, { bold: true, color: PALETTE.success, children: "Done!" }) : /* @__PURE__ */ jsx46(Text39, { bold: true, color: PALETTE.warning, children: "\u26A0 Finished with errors" }),
30861
+ totalPushed === 0 && totalFailed === 0 && !summary ? /* @__PURE__ */ jsx46(Text39, { color: PALETTE.muted, children: "Nothing was pushed \u2014 everything was already up to date." }) : /* @__PURE__ */ jsxs37(Box36, { flexDirection: "column", children: [
30958
30862
  /* @__PURE__ */ jsx46(EntityRows, { entity: componentTypes, label: "Component Type" }),
30959
30863
  /* @__PURE__ */ jsx46(EntityRows, { entity: designTokens, label: "Design Token" }),
30960
- summary && /* @__PURE__ */ jsx46(Box36, { marginTop: 1, children: /* @__PURE__ */ jsxs37(Text39, { color: PALETTE4.muted, children: [
30864
+ summary && /* @__PURE__ */ jsx46(Box36, { marginTop: 1, children: /* @__PURE__ */ jsxs37(Text39, { color: PALETTE.muted, children: [
30961
30865
  "Push result: ",
30962
30866
  summary.succeeded,
30963
30867
  "/",
30964
30868
  summary.total,
30965
30869
  " succeeded",
30966
- summary.failed > 0 && /* @__PURE__ */ jsxs37(Text39, { color: PALETTE4.error, children: [
30870
+ summary.failed > 0 && /* @__PURE__ */ jsxs37(Text39, { color: PALETTE.error, children: [
30967
30871
  ", ",
30968
30872
  summary.failed,
30969
30873
  " failed"
@@ -30971,8 +30875,8 @@ function DoneStep({
30971
30875
  ] }) })
30972
30876
  ] }),
30973
30877
  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: [
30878
+ /* @__PURE__ */ jsx46(Text39, { bold: true, color: PALETTE.error, children: "Failure details" }),
30879
+ failures.map((failure) => /* @__PURE__ */ jsxs37(Text39, { color: PALETTE.error, children: [
30976
30880
  failure.entityType,
30977
30881
  " ",
30978
30882
  failure.entityId,
@@ -30982,7 +30886,7 @@ function DoneStep({
30982
30886
  ] }),
30983
30887
  /* @__PURE__ */ jsx46(SpaceEnvironment, { spaceId, environmentId }),
30984
30888
  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." }),
30889
+ /* @__PURE__ */ jsx46(Text39, { color: PALETTE.success, children: "Your design system is now in Contentful Experiences." }),
30986
30890
  /* @__PURE__ */ jsx46(LinkRow, { title: "View your components here:", url: buildPostPushUrl2(urlArgs) }),
30987
30891
  /* @__PURE__ */ jsx46(
30988
30892
  LinkRow,
@@ -30999,7 +30903,7 @@ var ACTIONS;
30999
30903
  var init_DoneStep = __esm({
31000
30904
  "packages/experience-design-system-cli/src/tui/import/steps/10-flow/screens/DoneStep.tsx"() {
31001
30905
  "use strict";
31002
- init_theme4();
30906
+ init_theme();
31003
30907
  init_useImmediateInput();
31004
30908
  init_contentful_urls2();
31005
30909
  init_SpaceEnvironment();
@@ -31110,12 +31014,12 @@ function PathPrompt({
31110
31014
  const cursor = cursorVisible ? "\u2588" : " ";
31111
31015
  return /* @__PURE__ */ jsxs38(Box37, { flexDirection: "column", gap: 1, paddingX: 2, paddingY: 1, children: [
31112
31016
  /* @__PURE__ */ jsxs38(Box37, { gap: 1, children: [
31113
- /* @__PURE__ */ jsx47(Text40, { color: "cyan", children: "?" }),
31017
+ /* @__PURE__ */ jsx47(Text40, { color: PALETTE.accent, children: "?" }),
31114
31018
  /* @__PURE__ */ jsxs38(Text40, { bold: true, children: [
31115
31019
  label,
31116
31020
  ":"
31117
31021
  ] }),
31118
- /* @__PURE__ */ jsx47(Text40, { color: isPlaceholder ? PALETTE4.muted : void 0, children: shown }),
31022
+ /* @__PURE__ */ jsx47(Text40, { color: isPlaceholder ? PALETTE.muted : void 0, children: shown }),
31119
31023
  /* @__PURE__ */ jsx47(Text40, { children: cursor })
31120
31024
  ] }),
31121
31025
  /* @__PURE__ */ jsxs38(Box37, { gap: 3, children: [
@@ -31131,7 +31035,7 @@ var init_PathPrompt = __esm({
31131
31035
  init_useImmediateInput();
31132
31036
  init_path_utils();
31133
31037
  init_use_blinking_cursor();
31134
- init_theme4();
31038
+ init_theme();
31135
31039
  }
31136
31040
  });
31137
31041
 
@@ -31140,7 +31044,7 @@ import { Box as Box38, Text as Text41 } from "ink";
31140
31044
  import { jsx as jsx48, jsxs as jsxs39 } from "react/jsx-runtime";
31141
31045
  function StepHeader({ stepNumber, totalSteps, title }) {
31142
31046
  return /* @__PURE__ */ jsxs39(Box38, { flexDirection: "column", gap: 0, children: [
31143
- /* @__PURE__ */ jsx48(Text41, { dimColor: true, children: "\u2500".repeat(40) }),
31047
+ /* @__PURE__ */ jsx48(Text41, { color: PALETTE.muted, children: "\u2500".repeat(40) }),
31144
31048
  /* @__PURE__ */ jsxs39(Box38, { gap: 1, children: [
31145
31049
  /* @__PURE__ */ jsxs39(Text41, { bold: true, children: [
31146
31050
  "Step ",
@@ -31151,12 +31055,13 @@ function StepHeader({ stepNumber, totalSteps, title }) {
31151
31055
  /* @__PURE__ */ jsx48(Text41, { bold: true, children: "\u2014" }),
31152
31056
  /* @__PURE__ */ jsx48(Text41, { bold: true, children: title })
31153
31057
  ] }),
31154
- /* @__PURE__ */ jsx48(Text41, { dimColor: true, children: "\u2500".repeat(40) })
31058
+ /* @__PURE__ */ jsx48(Text41, { color: PALETTE.muted, children: "\u2500".repeat(40) })
31155
31059
  ] });
31156
31060
  }
31157
31061
  var init_StepHeader = __esm({
31158
31062
  "packages/experience-design-system-cli/src/tui/import/steps/10-flow/components/StepHeader.tsx"() {
31159
31063
  "use strict";
31064
+ init_theme();
31160
31065
  }
31161
31066
  });
31162
31067
 
@@ -31198,12 +31103,12 @@ function PushingStep({ stepNumber, totalSteps, progress }) {
31198
31103
  /* @__PURE__ */ jsx50(StepHeader, { stepNumber, totalSteps, title: "Push to Contentful" }),
31199
31104
  /* @__PURE__ */ jsx50(Text42, { children: "Writing component types and design tokens to your Contentful space..." }),
31200
31105
  operationId && /* @__PURE__ */ jsxs40(Box39, { gap: 1, children: [
31201
- /* @__PURE__ */ jsx50(Text42, { color: PALETTE4.muted, children: "Operation:" }),
31106
+ /* @__PURE__ */ jsx50(Text42, { color: PALETTE.muted, children: "Operation:" }),
31202
31107
  /* @__PURE__ */ jsx50(Text42, { children: operationId })
31203
31108
  ] }),
31204
31109
  showGlobal && progress && progress.kind === "progress" && /* @__PURE__ */ jsx50(Box39, { gap: 1, flexDirection: "column", children: /* @__PURE__ */ jsxs40(Box39, { gap: 2, children: [
31205
- /* @__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: [
31110
+ /* @__PURE__ */ jsx50(Box39, { width: 40, children: /* @__PURE__ */ jsx50(ThemeProvider2, { theme: PROGRESS_THEME, children: /* @__PURE__ */ jsx50(ProgressBar2, { value: Math.round(progress.processed / progress.total * 100) }) }) }),
31111
+ /* @__PURE__ */ jsxs40(Text42, { color: PALETTE.muted, children: [
31207
31112
  progress.processed,
31208
31113
  "/",
31209
31114
  progress.total,
@@ -31211,10 +31116,10 @@ function PushingStep({ stepNumber, totalSteps, progress }) {
31211
31116
  ] })
31212
31117
  ] }) }),
31213
31118
  showCurrent && /* @__PURE__ */ jsxs40(Box39, { gap: 1, children: [
31214
- /* @__PURE__ */ jsx50(Text42, { color: PALETTE4.muted, children: "Now processing:" }),
31119
+ /* @__PURE__ */ jsx50(Text42, { color: PALETTE.muted, children: "Now processing:" }),
31215
31120
  /* @__PURE__ */ jsx50(Text42, { children: showCurrent })
31216
31121
  ] }),
31217
- /* @__PURE__ */ jsx50(Box39, { marginTop: 1, children: /* @__PURE__ */ jsxs40(Text42, { color: PALETTE4.muted, children: [
31122
+ /* @__PURE__ */ jsx50(Box39, { marginTop: 1, children: /* @__PURE__ */ jsxs40(Text42, { color: PALETTE.muted, children: [
31218
31123
  "Elapsed: ",
31219
31124
  elapsed
31220
31125
  ] }) })
@@ -31225,8 +31130,8 @@ var init_PushingStep = __esm({
31225
31130
  "use strict";
31226
31131
  init_StepHeader();
31227
31132
  init_use_timed_spinner();
31228
- init_theme4();
31229
- init_theme4();
31133
+ init_theme2();
31134
+ init_theme();
31230
31135
  }
31231
31136
  });
31232
31137
 
@@ -31421,25 +31326,25 @@ function buildPreviewSummaryLines(preview) {
31421
31326
  if (components.new.length > 0) {
31422
31327
  lines.push({
31423
31328
  key: "summary-components-new",
31424
- color: PALETTE4.success,
31329
+ color: PALETTE.success,
31425
31330
  text: ` \uFF0B ${components.new.length} components will be created`
31426
31331
  });
31427
31332
  for (const [index, item] of components.new.entries()) {
31428
31333
  const name = item.key ?? item.$name ?? "unknown";
31429
- lines.push({ key: `summary-components-new-${index}`, color: PALETTE4.success, text: ` + ${name}` });
31334
+ lines.push({ key: `summary-components-new-${index}`, color: PALETTE.success, text: ` + ${name}` });
31430
31335
  }
31431
31336
  }
31432
31337
  if (components.changed.length > 0) {
31433
31338
  lines.push({
31434
31339
  key: "summary-components-changed",
31435
- color: PALETTE4.warning,
31340
+ color: PALETTE.warning,
31436
31341
  text: ` \uFF5E ${components.changed.length} components will be updated`
31437
31342
  });
31438
31343
  for (const [index, item] of components.changed.entries()) {
31439
31344
  const isBreaking = item.changeClassification?.classification === "breaking";
31440
31345
  lines.push({
31441
31346
  key: `summary-components-changed-${index}`,
31442
- color: isBreaking ? PALETTE4.error : PALETTE4.warning,
31347
+ color: isBreaking ? PALETTE.error : PALETTE.warning,
31443
31348
  text: ` ${isBreaking ? "\u26A0" : "~"} ${item.current.name}`
31444
31349
  });
31445
31350
  }
@@ -31447,11 +31352,11 @@ function buildPreviewSummaryLines(preview) {
31447
31352
  if (components.removed.length > 0) {
31448
31353
  lines.push({
31449
31354
  key: "summary-components-removed",
31450
- color: PALETTE4.warning,
31355
+ color: PALETTE.warning,
31451
31356
  text: ` \u2298 ${components.removed.length} components will be skipped`
31452
31357
  });
31453
31358
  for (const [index, item] of components.removed.entries()) {
31454
- lines.push({ key: `summary-components-removed-${index}`, color: PALETTE4.warning, text: ` \u2298 ${item.name}` });
31359
+ lines.push({ key: `summary-components-removed-${index}`, color: PALETTE.warning, text: ` \u2298 ${item.name}` });
31455
31360
  }
31456
31361
  }
31457
31362
  if (components.unchanged.length > 0) {
@@ -31464,21 +31369,21 @@ function buildPreviewSummaryLines(preview) {
31464
31369
  if (tokens.new.length > 0) {
31465
31370
  lines.push({
31466
31371
  key: "summary-tokens-new",
31467
- color: PALETTE4.success,
31372
+ color: PALETTE.success,
31468
31373
  text: ` \uFF0B ${tokens.new.length} design tokens will be created`
31469
31374
  });
31470
31375
  }
31471
31376
  if (tokens.changed.length > 0) {
31472
31377
  lines.push({
31473
31378
  key: "summary-tokens-changed",
31474
- color: PALETTE4.warning,
31379
+ color: PALETTE.warning,
31475
31380
  text: ` \uFF5E ${tokens.changed.length} design tokens will be updated`
31476
31381
  });
31477
31382
  }
31478
31383
  if (tokens.removed.length > 0) {
31479
31384
  lines.push({
31480
31385
  key: "summary-tokens-removed",
31481
- color: PALETTE4.warning,
31386
+ color: PALETTE.warning,
31482
31387
  text: ` \u2298 ${tokens.removed.length} design tokens will be skipped`
31483
31388
  });
31484
31389
  }
@@ -31522,12 +31427,12 @@ function getPreviewScrollOffset(input, downArrow, upArrow, diffExpanded, current
31522
31427
  function appendChangedPreviewLine(lines, keyPrefix, name, hasPendingDraftChanges, changeClassification) {
31523
31428
  lines.push({
31524
31429
  key: `${keyPrefix}-h-${name}`,
31525
- color: PALETTE4.warning,
31430
+ color: PALETTE.warning,
31526
31431
  text: ` ~ ${name}${hasPendingDraftChanges ? " \u26A1 has pending draft changes" : ""}`
31527
31432
  });
31528
31433
  if (changeClassification?.classification !== "breaking") return;
31529
31434
  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}` });
31435
+ lines.push({ key: `${keyPrefix}-b-${name}`, color: PALETTE.error, text: ` \u26A0 BREAKING: ${reasons}` });
31531
31436
  }
31532
31437
  function buildPreviewDiffLines(preview) {
31533
31438
  const lines = [];
@@ -31535,12 +31440,12 @@ function buildPreviewDiffLines(preview) {
31535
31440
  for (const item of components.new) {
31536
31441
  const raw = item;
31537
31442
  const name = raw.key ?? raw.$name ?? "unknown";
31538
- lines.push({ key: `comp-new-${name}`, color: PALETTE4.success, text: ` + ${name}` });
31443
+ lines.push({ key: `comp-new-${name}`, color: PALETTE.success, text: ` + ${name}` });
31539
31444
  const slots = raw.$slots ?? {};
31540
31445
  for (const slotName of Object.keys(slots).sort()) {
31541
31446
  lines.push({
31542
31447
  key: `comp-new-${name}-slot-${slotName}`,
31543
- color: PALETTE4.success,
31448
+ color: PALETTE.success,
31544
31449
  text: ` slot: ${slotName}`
31545
31450
  });
31546
31451
  const allowed = slots[slotName]?.["$allowedComponents"];
@@ -31548,14 +31453,14 @@ function buildPreviewDiffLines(preview) {
31548
31453
  const names = allowed.filter((n) => typeof n === "string");
31549
31454
  lines.push({
31550
31455
  key: `comp-new-${name}-slot-${slotName}-allow`,
31551
- color: PALETTE4.success,
31456
+ color: PALETTE.success,
31552
31457
  text: ` allowedComponents: [${names.join(", ")}]`
31553
31458
  });
31554
31459
  }
31555
31460
  }
31556
31461
  }
31557
31462
  for (const item of components.removed) {
31558
- lines.push({ key: `comp-rm-${item.name}`, color: PALETTE4.error, text: ` - ${item.name}` });
31463
+ lines.push({ key: `comp-rm-${item.name}`, color: PALETTE.error, text: ` - ${item.name}` });
31559
31464
  }
31560
31465
  for (const item of components.changed) {
31561
31466
  appendChangedPreviewLine(lines, "comp", item.current.name, item.hasPendingDraftChanges, item.changeClassification);
@@ -31586,10 +31491,10 @@ function buildPreviewDiffLines(preview) {
31586
31491
  for (const item of tokens.new) {
31587
31492
  const raw = item;
31588
31493
  const name = raw.name ?? raw.path ?? "unknown";
31589
- lines.push({ key: `tok-new-${name}`, color: PALETTE4.success, text: ` + ${name}` });
31494
+ lines.push({ key: `tok-new-${name}`, color: PALETTE.success, text: ` + ${name}` });
31590
31495
  }
31591
31496
  for (const item of tokens.removed) {
31592
- lines.push({ key: `tok-rm-${item.name}`, color: PALETTE4.error, text: ` - ${item.name}` });
31497
+ lines.push({ key: `tok-rm-${item.name}`, color: PALETTE.error, text: ` - ${item.name}` });
31593
31498
  }
31594
31499
  for (const item of tokens.changed) {
31595
31500
  const tokenName = item.current.name;
@@ -31680,13 +31585,13 @@ function WizardPreviewStep({
31680
31585
  title: diffExpanded ? `Diff (${diffLines.length} lines)` : "",
31681
31586
  focused: false,
31682
31587
  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) })
31588
+ activeLines.slice(boundedScrollOffset, boundedScrollOffset + viewportHeight).map((line) => /* @__PURE__ */ jsx51(Text43, { color: line.color === "gray" ? PALETTE.muted : line.color, wrap: "truncate-end", children: line.text }, line.key)),
31589
+ /* @__PURE__ */ jsx51(Text43, { color: PALETTE.muted, wrap: "truncate-end", children: formatPreviewScrollIndicator(activeLines.length, boundedScrollOffset, viewportHeight) })
31685
31590
  ]
31686
31591
  }
31687
31592
  )
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." }) }),
31593
+ ] }) : /* @__PURE__ */ jsx51(Text43, { color: PALETTE.muted, children: "Nothing to push \u2014 everything is already up to date." }),
31594
+ breakingWithImpact && /* @__PURE__ */ jsx51(Box40, { marginTop: 1, children: /* @__PURE__ */ jsx51(Text43, { color: PALETTE.error, bold: true, children: "\u26A0 Breaking changes will affect downstream entities. Press Enter to acknowledge and apply." }) }),
31690
31595
  /* @__PURE__ */ jsx51(SpaceEnvironment, { spaceId, environmentId }),
31691
31596
  /* @__PURE__ */ jsxs41(Box40, { gap: 3, marginTop: 1, children: [
31692
31597
  /* @__PURE__ */ jsx51(Text43, { children: "[Enter] Push to Contentful" }),
@@ -31704,7 +31609,7 @@ function WizardPreviewStep({
31704
31609
  var init_WizardPreviewStep = __esm({
31705
31610
  "packages/experience-design-system-cli/src/tui/import/steps/10-flow/screens/WizardPreviewStep.tsx"() {
31706
31611
  "use strict";
31707
- init_theme4();
31612
+ init_theme();
31708
31613
  init_useImmediateInput();
31709
31614
  init_use_terminal_size();
31710
31615
  init_src4();
@@ -32368,7 +32273,7 @@ var init_save = __esm({
32368
32273
  writeFile: (path5, contents) => writeFile7(path5, contents),
32369
32274
  appendRun,
32370
32275
  buildSourceFingerprint,
32371
- sleep: (ms) => new Promise((resolve28) => setTimeout(resolve28, ms)),
32276
+ sleep: (ms) => new Promise((resolve27) => setTimeout(resolve27, ms)),
32372
32277
  warn: (message) => process.stderr.write(message)
32373
32278
  });
32374
32279
  }
@@ -32919,48 +32824,13 @@ var init_debug_store = __esm({
32919
32824
  }
32920
32825
  });
32921
32826
 
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
32827
  // packages/experience-design-system-cli/src/tui/help/help-info.ts
32949
32828
  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
- });
32829
+ const debugMode = await readDebugModeSetting();
32957
32830
  return {
32958
32831
  storage: [
32959
32832
  { 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 }
32833
+ { label: "Settings file", value: configFilePath2() }
32964
32834
  ],
32965
32835
  troubleshooting: [
32966
32836
  { label: "CLI version", value: readPackageVersion() },
@@ -32981,7 +32851,6 @@ var init_help_info = __esm({
32981
32851
  init_debug_store();
32982
32852
  init_debug_mode_store();
32983
32853
  init_version();
32984
- init_file_locations();
32985
32854
  }
32986
32855
  });
32987
32856
 
@@ -32993,7 +32862,7 @@ function Section({ title, rows }) {
32993
32862
  return /* @__PURE__ */ jsxs43(Box42, { flexDirection: "column", children: [
32994
32863
  /* @__PURE__ */ jsx53(Text44, { bold: true, color: PALETTE.accent, children: title }),
32995
32864
  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 }) }),
32865
+ /* @__PURE__ */ jsx53(Box42, { width: 14, flexShrink: 0, children: /* @__PURE__ */ jsx53(Text44, { color: PALETTE.muted, children: row.label }) }),
32997
32866
  /* @__PURE__ */ jsx53(Text44, { children: row.value })
32998
32867
  ] }, row.label))
32999
32868
  ] });
@@ -33039,7 +32908,7 @@ function HelpScreen({ onDone }) {
33039
32908
  var init_PageContainer2 = __esm({
33040
32909
  "packages/experience-design-system-cli/src/tui/help/PageContainer.tsx"() {
33041
32910
  "use strict";
33042
- init_home_theme();
32911
+ init_theme();
33043
32912
  init_debug_store();
33044
32913
  init_control_hints();
33045
32914
  init_help_info();
@@ -33082,8 +32951,8 @@ function SettingsScreen({
33082
32951
  });
33083
32952
  return /* @__PURE__ */ jsxs44(Box43, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
33084
32953
  /* @__PURE__ */ jsx54(Text45, { bold: true, children: "Settings" }),
33085
- /* @__PURE__ */ jsx54(Text45, { children: " " }),
33086
- items.map((item, i) => /* @__PURE__ */ jsxs44(Text45, { color: i === focusIdx ? "cyan" : void 0, children: [
32954
+ /* @__PURE__ */ jsx54(Text45, { color: PALETTE.muted, children: " " }),
32955
+ items.map((item, i) => /* @__PURE__ */ jsxs44(Text45, { color: i === focusIdx ? PALETTE.accent : void 0, children: [
33087
32956
  i === focusIdx ? "> " : " ",
33088
32957
  item.label
33089
32958
  ] }, item.label)),
@@ -33104,707 +32973,181 @@ var init_PageContainer3 = __esm({
33104
32973
  "packages/experience-design-system-cli/src/tui/settings/PageContainer.tsx"() {
33105
32974
  "use strict";
33106
32975
  init_control_hints();
32976
+ init_theme();
33107
32977
  }
33108
32978
  });
33109
32979
 
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];
32980
+ // packages/experience-design-system-cli/src/tui/settings/contentful-configuration/config-store.ts
32981
+ async function readCredentials() {
32982
+ const store = await readV1Store();
32983
+ return {
32984
+ spaceId: store.spaceId || "",
32985
+ environmentId: store.environmentId || "",
32986
+ cmaToken: store.cmaToken || "",
32987
+ host: store.host || "",
32988
+ defaultComponentDir: store.defaultComponentDir || "",
32989
+ defaultTokenFile: store.defaultTokenFile || "",
32990
+ contentfulBaseDir: store.contentfulBaseDir || ""
32991
+ };
33115
32992
  }
33116
- function defaultModelLabel(name) {
33117
- const model = DEFAULT_MODELS[name];
33118
- return model && model !== "Auto" ? model : "chosen by the agent";
32993
+ async function writeCredentials(config) {
32994
+ const existing = await readV1Store();
32995
+ const merged = {
32996
+ ...existing,
32997
+ ...config
32998
+ };
32999
+ Object.keys(merged).forEach((k) => {
33000
+ if (!merged[k]) delete merged[k];
33001
+ });
33002
+ await writeV1Store(merged);
33119
33003
  }
33120
- function resolveOnPath(binary) {
33121
- if (binary.includes("/")) {
33122
- return access6(binary, constants.X_OK).then(
33123
- () => binary,
33124
- () => null
33125
- );
33004
+ var init_config_store = __esm({
33005
+ "packages/experience-design-system-cli/src/tui/settings/contentful-configuration/config-store.ts"() {
33006
+ "use strict";
33007
+ init_v1_store();
33126
33008
  }
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
- });
33009
+ });
33010
+
33011
+ // packages/experience-design-system-cli/src/tui/settings/contentful-configuration/ContentfulConfigScreen.tsx
33012
+ import { useEffect as useEffect22, useState as useState29 } from "react";
33013
+ import { Box as Box44, Text as Text46, useInput as useInput11 } from "ink";
33014
+ import TextInput4 from "ink-text-input";
33015
+ import { Fragment as Fragment17, jsx as jsx55, jsxs as jsxs45 } from "react/jsx-runtime";
33016
+ function debugFields(config) {
33017
+ return {
33018
+ space_id: config?.spaceId ?? "",
33019
+ environment_id: config?.environmentId ?? "",
33020
+ cma_token: config?.cmaToken ?? "",
33021
+ host: config?.host ?? "",
33022
+ default_component_dir: config?.defaultComponentDir ?? "",
33023
+ default_token_file: config?.defaultTokenFile ?? "",
33024
+ contentful_base_dir: config?.contentfulBaseDir ?? ""
33025
+ };
33134
33026
  }
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"));
33027
+ function ConfigurationScreen({ onDone }) {
33028
+ const [stage, setStage] = useState29("loading");
33029
+ const [config, setConfig] = useState29(null);
33030
+ const [activeField, setActiveField] = useState29("spaceId");
33031
+ const [notice, setNotice] = useState29(null);
33032
+ const [lastSaved, setLastSaved] = useState29(null);
33033
+ const [editing, setEditing] = useState29(false);
33034
+ const [valueBeforeEdit, setValueBeforeEdit] = useState29("");
33035
+ useEffect22(() => {
33036
+ readCredentials().then((cfg) => {
33037
+ setConfig(cfg);
33038
+ setStage("form");
33039
+ startDebugRun({
33040
+ flow: "settings/contentful-configuration",
33041
+ step: "01-configuration",
33042
+ menuOption: "Configuration",
33043
+ inputs: debugFields(cfg)
33044
+ });
33141
33045
  });
33142
- });
33143
- }
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
- );
33046
+ }, []);
33047
+ function fieldValue(field) {
33048
+ if (!config) return "";
33049
+ return config[field] || "";
33155
33050
  }
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) {
33176
- return [...checks, { ...fail3("prompt", `no answer within ${PROMPT_TIMEOUT_MS / 1e3}s`), timedOut: true }];
33177
- }
33178
- if (result.exitCode !== 0) {
33179
- const reason = result.stderr.trim().split("\n").pop()?.slice(0, 160) || `exited with code ${result.exitCode}`;
33180
- return [...checks, fail3("prompt", reason)];
33181
- }
33182
- return [...checks, pass("prompt", `answered in ${seconds}s`)];
33183
- }
33184
- function statusFromChecks(name, checks, savedBinary) {
33185
- if (checks.length === 0) return "checking";
33186
- if (checks.some((check) => check.step === "path" && !check.ok)) {
33187
- return savedBinary.trim() ? "not-found" : "not-configured";
33188
- }
33189
- const prompt = checks.find((check) => check.step === "prompt");
33190
- if (prompt) {
33191
- if (prompt.ok) return "ready";
33192
- return prompt.timedOut ? "timed-out" : "test-failed";
33193
- }
33194
- const login = checks.find((check) => check.step === "login");
33195
- if (login) return login.ok ? "ready" : "not-logged-in";
33196
- return name === "claude" ? "ready" : "unknown";
33197
- }
33198
- function setupHint(name, status) {
33199
- if (status === "not-configured") return `${INSTALL_HINTS[name]}, or set its command path in settings`;
33200
- if (status === "not-found") return `${INSTALL_HINTS[name]}, or correct the command path in settings`;
33201
- if (status === "not-logged-in") return LOGIN_HINTS[name];
33202
- if (status === "test-failed") return `read the test message; if it is a login problem, ${LOGIN_HINTS[name]}`;
33203
- if (status === "timed-out") return "it may be slow or waiting for input; run the test again, or try it in a terminal";
33204
- if (status === "unknown") return "run a full test to confirm it is logged in";
33205
- return "";
33206
- }
33207
- function testOutcome(checks) {
33208
- const prompt = checks?.find((check) => check.step === "prompt");
33209
- if (!prompt) return void 0;
33210
- if (prompt.ok) return { ok: true, text: `Test passed: ${prompt.detail}` };
33211
- if (prompt.timedOut) return { ok: false, text: `Test timed out: ${prompt.detail}` };
33212
- return { ok: false, text: `Test failed: ${prompt.detail}` };
33213
- }
33214
- function modelLine(name, savedModel) {
33215
- const model = savedModel.trim();
33216
- return model ? model : `${defaultModelLabel(name)} (built-in default)`;
33217
- }
33218
- function panelRows(name, checks, settings) {
33219
- if (!checks) return [{ label: "Command", value: "checking...", tone: "muted" }];
33220
- const status = statusFromChecks(name, checks, settings.binary);
33221
- const path5 = checks.find((check) => check.step === "path");
33222
- if (!path5?.ok) {
33223
- const rows2 = [
33224
- {
33225
- label: "Command",
33226
- value: settings.binary.trim() ? path5?.detail ?? "not found" : "not found on your PATH",
33227
- tone: settings.binary.trim() ? "bad" : "muted"
33228
- }
33229
- ];
33230
- const hint2 = setupHint(name, status);
33231
- if (hint2) rows2.push({ label: "Setup", value: hint2, tone: "muted" });
33232
- return rows2;
33051
+ function setFieldValue(field, value) {
33052
+ if (!config) return;
33053
+ setConfig({ ...config, [field]: value });
33054
+ setNotice(null);
33233
33055
  }
33234
- const rows = [{ label: "Command", value: path5.detail, tone: "ok" }];
33235
- const version = checks.find((check) => check.step === "version");
33236
- if (version?.ok) rows.push({ label: "Version", value: version.detail, tone: "ok" });
33237
- rows.push({ label: "Model", value: modelLine(name, settings.model), tone: "muted" });
33238
- const hint = setupHint(name, status);
33239
- if (hint) rows.push({ label: "Setup", value: hint, tone: "muted" });
33240
- return rows;
33241
- }
33242
- function statusRows(_name, checks, savedBinary) {
33243
- if (!checks) return [{ label: "Command", value: "checking...", tone: "muted" }];
33244
- const find = (step) => checks.find((check) => check.step === step);
33245
- const path5 = find("path");
33246
- if (!path5?.ok) {
33247
- if (savedBinary.trim()) return [{ label: "Command", value: path5?.detail ?? "not found", tone: "bad" }];
33248
- return [{ label: "Command", value: "not configured (not on the PATH)", tone: "muted" }];
33249
- }
33250
- const rows = [{ label: "Command", value: path5.detail, tone: "ok" }];
33251
- const version = find("version");
33252
- if (version) {
33253
- rows.push({
33254
- label: "Version",
33255
- value: version.ok ? version.detail : "could not be read",
33256
- tone: version.ok ? "ok" : "muted"
33056
+ function handleSave() {
33057
+ if (!config) return;
33058
+ setStage("saving");
33059
+ setNotice(null);
33060
+ writeCredentials(config).then(() => {
33061
+ setLastSaved(config);
33062
+ if (config.contentfulBaseDir) void startDebugSessionIn(config.contentfulBaseDir, { replace: true });
33063
+ setNotice({ kind: "success", text: "Configuration saved" });
33064
+ setStage("form");
33065
+ }).catch((err) => {
33066
+ setNotice({ kind: "error", text: err instanceof Error ? err.message : "Failed to save" });
33067
+ setStage("form");
33257
33068
  });
33258
33069
  }
33259
- const login = find("login");
33260
- const prompt = find("prompt");
33261
- if (login) {
33262
- rows.push({ label: "Login", value: login.detail, tone: login.ok ? "ok" : "bad" });
33263
- } else if (prompt) {
33264
- rows.push({
33265
- label: "Login",
33266
- value: prompt.ok ? "confirmed by the test" : prompt.timedOut ? "unknown (the test timed out)" : "see the test result",
33267
- tone: prompt.ok ? "ok" : prompt.timedOut ? "muted" : "bad"
33268
- });
33269
- } else {
33270
- rows.push({ label: "Login", value: "not checked (use Run test)", tone: "muted" });
33070
+ function quit() {
33071
+ void finishDebugRun(
33072
+ lastSaved ? { outputs: debugFields(lastSaved), status: "success", exitMethod: "saved" } : { outputs: {}, status: "success", exitMethod: "discarded" }
33073
+ );
33074
+ onDone();
33271
33075
  }
33272
- if (prompt) rows.push({ label: "Test", value: prompt.detail, tone: prompt.ok ? "ok" : "bad" });
33273
- return rows;
33274
- }
33275
- async function withBinaryEnv(name, binary, run) {
33276
- const key = `EDS_AGENT_BINARY_${name.toUpperCase()}`;
33277
- const previous = process.env[key];
33278
- process.env[key] = binary;
33279
- try {
33280
- return await run();
33281
- } finally {
33282
- if (previous === void 0) delete process.env[key];
33283
- else process.env[key] = previous;
33284
- }
33285
- }
33286
- var VERSION_TIMEOUT_MS, PROMPT_TIMEOUT_MS, TEST_PROMPT, INSTALL_HINTS, LOGIN_HINTS, fail3, pass, LIST_STATUS;
33287
- var init_agent_status = __esm({
33288
- "packages/experience-design-system-cli/src/tui/settings/agents/agent-status.ts"() {
33289
- "use strict";
33290
- init_src4();
33291
- VERSION_TIMEOUT_MS = 5e3;
33292
- PROMPT_TIMEOUT_MS = 6e4;
33293
- TEST_PROMPT = "Reply with the single word: ok";
33294
- INSTALL_HINTS = {
33295
- claude: "npm install -g @anthropic-ai/claude-code",
33296
- codex: "npm install -g @openai/codex",
33297
- opencode: "npm install -g opencode-ai",
33298
- cursor: "install Cursor\u2019s `cursor-agent` command",
33299
- copilot: "npm install -g @github/copilot"
33300
- };
33301
- LOGIN_HINTS = {
33302
- claude: "run `claude login`",
33303
- codex: "set OPENAI_API_KEY, or sign in with a ChatGPT account",
33304
- opencode: "run `opencode auth`",
33305
- cursor: "sign in from Cursor",
33306
- copilot: "run `copilot` and sign in"
33307
- };
33308
- fail3 = (step, detail) => ({ step, ok: false, detail });
33309
- pass = (step, detail) => ({ step, ok: true, detail });
33310
- LIST_STATUS = {
33311
- checking: { symbol: "\u2026", text: "checking", tone: "muted" },
33312
- ready: { symbol: "\u25CF", text: "ready", tone: "ok" },
33313
- "not-configured": { symbol: "\u25CB", text: "not installed", tone: "muted" },
33314
- "not-found": { symbol: "\u25CB", text: "not installed", tone: "bad" },
33315
- "not-logged-in": { symbol: "\u25D0", text: "not logged in", tone: "bad" },
33316
- "test-failed": { symbol: "\u2717", text: "test failed", tone: "bad" },
33317
- "timed-out": { symbol: "\u2717", text: "test timed out", tone: "bad" },
33318
- unknown: { symbol: "\u25D0", text: "installed, login unknown", tone: "muted" }
33319
- };
33320
- }
33321
- });
33322
-
33323
- // packages/experience-design-system-cli/src/tui/settings/agents/AgentStatusBadge.tsx
33324
- import { Text as Text46 } from "ink";
33325
- import { jsx as jsx55 } from "react/jsx-runtime";
33326
- function AgentStatusBadge({
33327
- name,
33328
- checks,
33329
- binary
33330
- }) {
33331
- const { symbol, text, tone } = LIST_STATUS[checks ? statusFromChecks(name, checks, binary) : "checking"];
33332
- return /* @__PURE__ */ jsx55(Text46, { color: TONE_COLOR[tone], children: `${symbol} ${text}` });
33333
- }
33334
- var TONE_COLOR;
33335
- var init_AgentStatusBadge = __esm({
33336
- "packages/experience-design-system-cli/src/tui/settings/agents/AgentStatusBadge.tsx"() {
33337
- "use strict";
33338
- init_home_theme();
33339
- init_agent_status();
33340
- TONE_COLOR = {
33341
- ok: PALETTE.success,
33342
- bad: PALETTE.error,
33343
- muted: PALETTE.muted
33344
- };
33345
- }
33346
- });
33347
-
33348
- // packages/experience-design-system-cli/src/tui/settings/agents/AgentDetail.tsx
33349
- import { useEffect as useEffect22, useState as useState29 } from "react";
33350
- import { Box as Box44, Text as Text47, useInput as useInput11 } from "ink";
33351
- import TextInput4 from "ink-text-input";
33352
- import { jsx as jsx56, jsxs as jsxs45 } from "react/jsx-runtime";
33353
- function Row2({
33354
- pointer,
33355
- label,
33356
- labelProps,
33357
- children
33358
- }) {
33359
- return /* @__PURE__ */ jsxs45(Box44, { children: [
33360
- /* @__PURE__ */ jsx56(Box44, { width: POINTER_WIDTH, flexShrink: 0, children: pointer }),
33361
- /* @__PURE__ */ jsx56(Box44, { width: LABEL_WIDTH + LABEL_GAP, flexShrink: 0, children: /* @__PURE__ */ jsx56(Text47, { color: PALETTE.muted, ...labelProps, children: label }) }),
33362
- children
33363
- ] });
33364
- }
33365
- function Section2({
33366
- title,
33367
- note,
33368
- interactive = false,
33369
- children
33370
- }) {
33371
- return /* @__PURE__ */ jsxs45(Box44, { flexDirection: "column", marginTop: 1, children: [
33372
- /* @__PURE__ */ jsxs45(Box44, { gap: 1, children: [
33373
- /* @__PURE__ */ jsx56(Text47, { bold: true, color: interactive ? PALETTE.accent : PALETTE.muted, children: title }),
33374
- /* @__PURE__ */ jsx56(Text47, { color: PALETTE.muted, children: `\xB7 ${note}` })
33375
- ] }),
33376
- children
33377
- ] });
33378
- }
33379
- function AgentDetail({
33380
- name,
33381
- config,
33382
- setConfig,
33383
- onBack
33384
- }) {
33385
- const settings = config.agents[name];
33386
- const [focusIndex, setFocusIndex] = useState29(0);
33387
- const [editing, setEditing] = useState29(false);
33388
- const [valueBeforeEdit, setValueBeforeEdit] = useState29("");
33389
- const [saving, setSaving] = useState29(false);
33390
- const [testing, setTesting] = useState29(false);
33391
- const [notice, setNotice] = useState29(null);
33392
- const [checks, setChecks] = useState29(void 0);
33393
- useEffect22(() => {
33394
- let active = true;
33395
- setChecks(void 0);
33396
- void inspectAgent(name, settings.binary).then((result) => active && setChecks(result));
33397
- return () => {
33398
- active = false;
33399
- };
33400
- }, [name, settings.binary]);
33401
- const setField = (field, value) => {
33402
- setConfig({ ...config, agents: { ...config.agents, [name]: { ...settings, [field]: value } } });
33403
- setNotice(null);
33404
- };
33405
- const save = () => {
33406
- setSaving(true);
33407
- setNotice(null);
33408
- writeAgentConfig(config).then(() => {
33409
- applyBinaryOverrides(config);
33410
- setNotice({ kind: "success", text: `Saved: ${AGENT_LABELS[name]} settings are written to config.json` });
33411
- }).catch(
33412
- (err) => setNotice({ kind: "error", text: `Not saved: ${err instanceof Error ? err.message : String(err)}` })
33413
- ).finally(() => setSaving(false));
33414
- };
33415
- const runTest = () => {
33416
- setTesting(true);
33417
- setNotice(null);
33418
- testAgent(name, settings.binary, settings.model).then((result) => {
33419
- setChecks(result);
33420
- const outcome = testOutcome(result);
33421
- setNotice(
33422
- outcome ? { kind: outcome.ok ? "success" : "error", text: outcome.text } : { kind: "error", text: "Test not run: the agent could not be started (see Status)" }
33423
- );
33424
- }).catch(
33425
- (err) => setNotice({ kind: "error", text: `Test could not run: ${err instanceof Error ? err.message : String(err)}` })
33426
- ).finally(() => setTesting(false));
33427
- };
33428
- const focused = FOCUS_ORDER[focusIndex];
33429
- const focusedField = focused === "test" ? null : focused;
33430
33076
  useInput11((input, key) => {
33431
- if (saving || testing) return;
33432
- if (editing) {
33433
- if (key.escape && focusedField) {
33434
- setField(focusedField, valueBeforeEdit);
33435
- setEditing(false);
33436
- }
33437
- return;
33438
- }
33439
- if (key.escape || input === "q") {
33440
- onBack();
33441
- return;
33442
- }
33443
- if (input === "s") {
33444
- save();
33445
- return;
33446
- }
33447
- if (key.upArrow) {
33448
- setFocusIndex((i) => (i - 1 + FOCUS_ORDER.length) % FOCUS_ORDER.length);
33449
- return;
33450
- }
33451
- if (key.downArrow || key.tab) {
33452
- setFocusIndex((i) => (i + 1) % FOCUS_ORDER.length);
33453
- return;
33454
- }
33455
- if (input === "c" && focusedField) {
33456
- setField(focusedField, "");
33457
- return;
33458
- }
33459
- if (key.return) {
33460
- if (focusedField) {
33461
- setValueBeforeEdit(settings[focusedField]);
33462
- setEditing(true);
33463
- } else {
33464
- runTest();
33465
- }
33466
- }
33467
- });
33468
- const status = checks ? statusFromChecks(name, checks, settings.binary) : "checking";
33469
- const hint = setupHint(name, status);
33470
- const pointer = (isFocused) => /* @__PURE__ */ jsx56(Text47, { color: isFocused ? PALETTE.accent : void 0, children: isFocused ? "\u276F" : " " });
33471
- return /* @__PURE__ */ jsxs45(Box44, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
33472
- /* @__PURE__ */ jsx56(Text47, { bold: true, children: AGENT_LABELS[name] }),
33473
- /* @__PURE__ */ jsx56(Text47, { color: PALETTE.muted, children: config.defaultAgent === name ? "This is the default agent." : `Runs the \`${AGENT_HINTS[name]}\` command.` }),
33474
- (notice || testing || saving) && /* @__PURE__ */ jsx56(Box44, { marginTop: 1, children: testing || saving ? /* @__PURE__ */ jsx56(Text47, { color: PALETTE.accent, children: testing ? "\u2026 Running the test (up to 60s)" : "\u2026 Saving" }) : notice && /* @__PURE__ */ jsxs45(Text47, { bold: true, color: notice.kind === "success" ? PALETTE.success : PALETTE.error, children: [
33475
- notice.kind === "success" ? "\u2713" : "\u2717",
33476
- " ",
33477
- notice.text
33478
- ] }) }),
33479
- /* @__PURE__ */ jsxs45(Section2, { title: "CONFIGURE", note: "you can change these", interactive: true, children: [
33480
- FIELDS2.map((field) => {
33481
- const isFocused = focused === field;
33482
- const value = settings[field];
33483
- const display = isFocused && editing ? /* @__PURE__ */ jsx56(TextInput4, { value, onChange: (next) => setField(field, next), onSubmit: () => setEditing(false) }) : value ? /* @__PURE__ */ jsx56(Text47, { bold: true, children: value }) : /* @__PURE__ */ jsx56(Text47, { color: PALETTE.muted, children: fieldHint(name, field) });
33484
- return /* @__PURE__ */ jsx56(
33485
- Row2,
33486
- {
33487
- pointer: pointer(isFocused),
33488
- label: FIELD_LABEL[field],
33489
- labelProps: { bold: isFocused, color: isFocused ? PALETTE.accent : PALETTE.muted },
33490
- children: display
33491
- },
33492
- field
33493
- );
33494
- }),
33495
- /* @__PURE__ */ jsx56(
33496
- Row2,
33497
- {
33498
- pointer: pointer(focused === "test"),
33499
- label: "Run test",
33500
- labelProps: { bold: focused === "test", color: focused === "test" ? PALETTE.accent : PALETTE.muted },
33501
- children: /* @__PURE__ */ jsx56(Text47, { color: testing ? PALETTE.accent : PALETTE.muted, children: testing ? "running..." : "sends one small prompt (uses a few tokens)" })
33502
- }
33503
- )
33504
- ] }),
33505
- /* @__PURE__ */ jsxs45(Section2, { title: "STATUS", note: "read only", children: [
33506
- statusRows(name, checks, settings.binary).map((row) => /* @__PURE__ */ jsx56(Row2, { pointer: null, label: row.label, children: /* @__PURE__ */ jsx56(Text47, { color: TONE_COLOR[row.tone], children: row.value }) }, row.label)),
33507
- hint && /* @__PURE__ */ jsx56(Row2, { pointer: null, label: "Setup", children: /* @__PURE__ */ jsx56(Text47, { color: PALETTE.muted, children: hint }) })
33508
- ] }),
33509
- /* @__PURE__ */ jsx56(Text47, { children: " " }),
33510
- /* @__PURE__ */ jsx56(
33511
- ControlHints,
33512
- {
33513
- hints: editing ? [
33514
- { keys: "type", label: "edit" },
33515
- { keys: "\u2190/\u2192", label: "move cursor" },
33516
- { keys: "\u23CE", label: "done" },
33517
- { keys: "Esc", label: "cancel edit" }
33518
- ] : [
33519
- { keys: "\u2191/\u2193", label: "move" },
33520
- { keys: "\u23CE", label: focusedField ? "edit" : "run test" },
33521
- ...focusedField ? [{ keys: "c", label: "clear" }] : [],
33522
- { keys: "s", label: "save" },
33523
- { keys: "Esc/q", label: "back without saving" }
33524
- ]
33525
- }
33526
- )
33527
- ] });
33528
- }
33529
- var FOCUS_ORDER, FIELDS2, FIELD_LABEL, LABEL_WIDTH, LABEL_GAP, POINTER_WIDTH, fieldHint;
33530
- var init_AgentDetail = __esm({
33531
- "packages/experience-design-system-cli/src/tui/settings/agents/AgentDetail.tsx"() {
33532
- "use strict";
33533
- init_home_theme();
33534
- init_control_hints();
33535
- init_agent_store();
33536
- init_agent_status();
33537
- init_AgentStatusBadge();
33538
- init_apply_binary_overrides();
33539
- FOCUS_ORDER = ["binary", "model", "test"];
33540
- FIELDS2 = ["binary", "model"];
33541
- FIELD_LABEL = { binary: "Command path", model: "Model" };
33542
- LABEL_WIDTH = "Command path".length;
33543
- LABEL_GAP = 2;
33544
- POINTER_WIDTH = 2;
33545
- fieldHint = (name, field) => field === "binary" ? `(empty: \`${AGENT_HINTS[name]}\` from the PATH)` : `(empty: ${defaultModelLabel(name)})`;
33546
- }
33547
- });
33548
-
33549
- // packages/experience-design-system-cli/src/tui/settings/agents/AgentScreens.tsx
33550
- import { useEffect as useEffect23, useState as useState30 } from "react";
33551
- import { Box as Box45, Text as Text48, useInput as useInput12 } from "ink";
33552
- import { Fragment as Fragment17, jsx as jsx57, jsxs as jsxs46 } from "react/jsx-runtime";
33553
- function AgentsScreen({ onDone }) {
33554
- const [config, setConfig] = useState30(null);
33555
- const [focus, setFocus] = useState30(0);
33556
- const [open, setOpen] = useState30(null);
33557
- const [notice, setNotice] = useState30(null);
33558
- const [saving, setSaving] = useState30(false);
33559
- const [checks, setChecks] = useState30({});
33560
- const inspectAll = (loaded) => {
33561
- for (const name of AGENT_NAMES) {
33562
- void inspectAgent(name, loaded.agents[name].binary).then(
33563
- (result) => setChecks((previous) => ({ ...previous, [name]: result }))
33564
- );
33565
- }
33566
- };
33567
- useEffect23(() => {
33568
- void readAgentConfig().then((loaded) => {
33569
- setConfig(loaded);
33570
- inspectAll(loaded);
33571
- startDebugRun({
33572
- flow: "settings/agents",
33573
- step: "01-agents",
33574
- menuOption: "Configuration > Agents",
33575
- inputs: { default_agent: loaded.defaultAgent }
33576
- });
33577
- });
33578
- }, []);
33579
- const makeDefault = (name) => {
33580
- if (!config || saving) return;
33581
- if (name === config.defaultAgent) {
33582
- setNotice({ kind: "success", text: `${AGENT_LABELS[name]} is already the default agent` });
33583
- return;
33584
- }
33585
- setSaving(true);
33586
- setNotice(null);
33587
- writeAgentConfig({ ...config, defaultAgent: name }).then(() => {
33588
- setConfig((current) => current ? { ...current, defaultAgent: name } : current);
33589
- setNotice({ kind: "success", text: `Default agent is now ${AGENT_LABELS[name]}` });
33590
- }).catch(
33591
- (err) => setNotice({
33592
- kind: "error",
33593
- text: `Default agent not changed: ${err instanceof Error ? err.message : String(err)}`
33594
- })
33595
- ).finally(() => setSaving(false));
33596
- };
33597
- useInput12((input, key) => {
33598
- if (!config || open || saving) return;
33599
- const focused = AGENT_NAMES[focus];
33600
- if (key.upArrow || key.downArrow || key.tab) setNotice(null);
33601
- if (key.upArrow) {
33602
- setFocus((i) => (i - 1 + AGENT_NAMES.length) % AGENT_NAMES.length);
33603
- return;
33604
- }
33605
- if (key.downArrow || key.tab) {
33606
- setFocus((i) => (i + 1) % AGENT_NAMES.length);
33607
- return;
33608
- }
33609
- if (key.return) {
33610
- makeDefault(focused);
33611
- return;
33612
- }
33613
- if (key.rightArrow) {
33614
- setNotice(null);
33615
- setOpen(focused);
33616
- return;
33617
- }
33618
- if (key.escape || input === "q") {
33619
- void finishDebugRun({ outputs: { default_agent: config.defaultAgent }, status: "success", exitMethod: "saved" });
33620
- onDone();
33621
- }
33622
- });
33623
- if (!config) {
33624
- return /* @__PURE__ */ jsxs46(Box45, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
33625
- /* @__PURE__ */ jsx57(Text48, { bold: true, children: "Agents" }),
33626
- /* @__PURE__ */ jsx57(Text48, { children: " " }),
33627
- /* @__PURE__ */ jsx57(Text48, { color: PALETTE.accent, children: "Loading..." })
33628
- ] });
33629
- }
33630
- if (open) {
33631
- return /* @__PURE__ */ jsx57(
33632
- AgentDetail,
33633
- {
33634
- name: open,
33635
- config,
33636
- setConfig,
33637
- onBack: () => {
33638
- setOpen(null);
33639
- void readAgentConfig().then((saved) => {
33640
- setConfig(saved);
33641
- inspectAll(saved);
33642
- });
33643
- }
33644
- }
33645
- );
33646
- }
33647
- const focusedAgent = AGENT_NAMES[focus];
33648
- return /* @__PURE__ */ jsxs46(Box45, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
33649
- /* @__PURE__ */ jsx57(Text48, { bold: true, children: "Agents" }),
33650
- /* @__PURE__ */ jsx57(Text48, { color: PALETTE.muted, children: "The coding agent the CLI runs, and what was found for each one." }),
33651
- /* @__PURE__ */ jsx57(Text48, { children: " " }),
33652
- /* @__PURE__ */ jsxs46(Box45, { gap: 1, children: [
33653
- /* @__PURE__ */ jsx57(Text48, { color: PALETTE.muted, children: "Default agent" }),
33654
- /* @__PURE__ */ jsx57(Text48, { bold: true, children: AGENT_LABELS[config.defaultAgent] }),
33655
- saving && /* @__PURE__ */ jsx57(Text48, { color: PALETTE.accent, children: "\u2026 saving" })
33656
- ] }),
33657
- /* @__PURE__ */ jsxs46(Box45, { marginTop: 1, gap: 1, children: [
33658
- /* @__PURE__ */ jsx57(Text48, { children: " " }),
33659
- /* @__PURE__ */ jsx57(Text48, { children: " " }),
33660
- /* @__PURE__ */ jsx57(Box45, { width: NAME_WIDTH, flexShrink: 0, children: /* @__PURE__ */ jsx57(Text48, { color: PALETTE.muted, children: "AGENT" }) }),
33661
- /* @__PURE__ */ jsx57(Text48, { color: PALETTE.muted, children: "STATUS" })
33662
- ] }),
33663
- AGENT_NAMES.map((name) => {
33664
- const isFocused = focusedAgent === name;
33665
- return /* @__PURE__ */ jsxs46(Box45, { gap: 1, children: [
33666
- /* @__PURE__ */ jsx57(Text48, { color: isFocused ? PALETTE.accent : void 0, children: isFocused ? "\u276F" : " " }),
33667
- /* @__PURE__ */ jsx57(Text48, { color: PALETTE.success, children: name === config.defaultAgent ? "\u2605" : " " }),
33668
- /* @__PURE__ */ jsx57(Box45, { width: NAME_WIDTH, flexShrink: 0, children: /* @__PURE__ */ jsx57(Text48, { bold: isFocused, color: isFocused ? PALETTE.accent : void 0, children: AGENT_LABELS[name] }) }),
33669
- /* @__PURE__ */ jsx57(AgentStatusBadge, { name, checks: checks[name], binary: config.agents[name].binary })
33670
- ] }, name);
33671
- }),
33672
- /* @__PURE__ */ jsxs46(Box45, { flexDirection: "column", marginTop: 1, children: [
33673
- /* @__PURE__ */ jsx57(Text48, { color: PALETTE.muted, children: `\u2500 ${AGENT_LABELS[focusedAgent]} ${"\u2500".repeat(30)}` }),
33674
- panelRows(focusedAgent, checks[focusedAgent], config.agents[focusedAgent]).map((row) => /* @__PURE__ */ jsxs46(Box45, { gap: 1, paddingLeft: 1, children: [
33675
- /* @__PURE__ */ jsx57(Box45, { width: PANEL_LABEL_WIDTH, flexShrink: 0, children: /* @__PURE__ */ jsx57(Text48, { color: PALETTE.muted, children: row.label }) }),
33676
- /* @__PURE__ */ jsx57(Text48, { color: TONE_COLOR[row.tone], children: row.value })
33677
- ] }, row.label))
33678
- ] }),
33679
- notice && /* @__PURE__ */ jsxs46(Fragment17, { children: [
33680
- /* @__PURE__ */ jsx57(Text48, { children: " " }),
33681
- /* @__PURE__ */ jsxs46(Text48, { bold: true, color: notice.kind === "success" ? PALETTE.success : PALETTE.error, children: [
33682
- notice.kind === "success" ? "\u2713" : "\u2717",
33683
- " ",
33684
- notice.text
33685
- ] })
33686
- ] }),
33687
- /* @__PURE__ */ jsx57(Text48, { children: " " }),
33688
- /* @__PURE__ */ jsx57(
33689
- ControlHints,
33690
- {
33691
- hints: [
33692
- { keys: "\u2191/\u2193", label: "move" },
33693
- { keys: "\u23CE", label: "make default" },
33694
- { keys: "\u2192", label: "settings and test" },
33695
- { keys: "Esc/q", label: "back" }
33696
- ]
33697
- }
33698
- )
33699
- ] });
33700
- }
33701
- var NAME_WIDTH, PANEL_LABEL_WIDTH;
33702
- var init_AgentScreens = __esm({
33703
- "packages/experience-design-system-cli/src/tui/settings/agents/AgentScreens.tsx"() {
33704
- "use strict";
33705
- init_src4();
33706
- init_home_theme();
33707
- init_control_hints();
33708
- init_debug_store();
33709
- init_agent_store();
33710
- init_agent_status();
33711
- init_AgentDetail();
33712
- init_AgentStatusBadge();
33713
- NAME_WIDTH = 16;
33714
- PANEL_LABEL_WIDTH = "Command".length;
33715
- }
33716
- });
33717
-
33718
- // packages/experience-design-system-cli/src/tui/settings/shared/FieldForm.tsx
33719
- import { useState as useState31 } from "react";
33720
- import { Box as Box46, Text as Text49, useInput as useInput13 } from "ink";
33721
- import TextInput5 from "ink-text-input";
33722
- import { Fragment as Fragment18, jsx as jsx58, jsxs as jsxs47 } from "react/jsx-runtime";
33723
- function FieldForm({
33724
- title,
33725
- subtitle,
33726
- fields,
33727
- values,
33728
- onChange,
33729
- onSave,
33730
- onQuit,
33731
- notice,
33732
- busy = false,
33733
- footer
33734
- }) {
33735
- const [active, setActive] = useState31(0);
33736
- const [editing, setEditing] = useState31(false);
33737
- const [valueBeforeEdit, setValueBeforeEdit] = useState31("");
33738
- const labelWidth = Math.max(...fields.map((field) => field.label.length));
33739
- const current = fields[active];
33740
- useInput13((input, key) => {
33741
- if (busy) return;
33077
+ if (stage === "loading" || stage === "saving") return;
33742
33078
  if (editing) {
33743
33079
  if (key.escape) {
33744
- onChange(current.key, valueBeforeEdit);
33080
+ setFieldValue(activeField, valueBeforeEdit);
33745
33081
  setEditing(false);
33746
33082
  }
33747
33083
  return;
33748
33084
  }
33749
33085
  if (key.escape || input === "q") {
33750
- onQuit();
33086
+ quit();
33751
33087
  return;
33752
33088
  }
33753
33089
  if (input === "s") {
33754
- onSave();
33090
+ handleSave();
33755
33091
  return;
33756
33092
  }
33757
33093
  if (input === "c") {
33758
- onChange(current.key, "");
33094
+ setFieldValue(activeField, "");
33759
33095
  return;
33760
33096
  }
33761
33097
  if (key.tab || key.downArrow) {
33762
- setActive((i) => (i + 1) % fields.length);
33098
+ const idx = FIELD_ORDER.indexOf(activeField);
33099
+ setActiveField(FIELD_ORDER[(idx + 1) % FIELD_ORDER.length]);
33763
33100
  return;
33764
33101
  }
33765
33102
  if (key.upArrow) {
33766
- setActive((i) => (i - 1 + fields.length) % fields.length);
33103
+ const idx = FIELD_ORDER.indexOf(activeField);
33104
+ setActiveField(FIELD_ORDER[(idx - 1 + FIELD_ORDER.length) % FIELD_ORDER.length]);
33767
33105
  return;
33768
33106
  }
33769
33107
  if (key.return) {
33770
- setValueBeforeEdit(values[current.key]);
33108
+ setValueBeforeEdit(fieldValue(activeField));
33771
33109
  setEditing(true);
33772
33110
  }
33773
33111
  });
33774
- return /* @__PURE__ */ jsxs47(Box46, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
33775
- /* @__PURE__ */ jsx58(Text49, { bold: true, children: title }),
33776
- subtitle && /* @__PURE__ */ jsx58(Text49, { color: PALETTE.muted, children: subtitle }),
33777
- /* @__PURE__ */ jsx58(Text49, { children: " " }),
33778
- /* @__PURE__ */ jsx58(Box46, { flexDirection: "column", children: fields.map((field, index) => {
33779
- const isActive = index === active;
33780
- const value = values[field.key];
33781
- const display = field.masked ? "\u2022".repeat(value.length) : value;
33782
- return /* @__PURE__ */ jsxs47(Box46, { gap: 1, children: [
33783
- /* @__PURE__ */ jsx58(Text49, { color: isActive ? PALETTE.accent : void 0, children: isActive ? "\u276F" : " " }),
33784
- /* @__PURE__ */ jsx58(Box46, { width: labelWidth, flexShrink: 0, children: /* @__PURE__ */ jsx58(Text49, { bold: isActive, color: isActive ? PALETTE.accent : PALETTE.muted, children: field.label }) }),
33785
- isActive && editing ? /* @__PURE__ */ jsx58(
33786
- TextInput5,
33112
+ if (stage === "loading") {
33113
+ return /* @__PURE__ */ jsxs45(Box44, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
33114
+ /* @__PURE__ */ jsx55(Text46, { bold: true, children: "Configuration" }),
33115
+ /* @__PURE__ */ jsx55(Text46, { children: " " }),
33116
+ /* @__PURE__ */ jsx55(Text46, { color: PALETTE.accent, children: "Loading..." })
33117
+ ] });
33118
+ }
33119
+ return /* @__PURE__ */ jsxs45(Box44, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
33120
+ /* @__PURE__ */ jsx55(Text46, { bold: true, children: "Configuration" }),
33121
+ /* @__PURE__ */ jsx55(Text46, { children: " " }),
33122
+ /* @__PURE__ */ jsx55(Box44, { flexDirection: "column", children: FIELD_ORDER.map((field) => {
33123
+ const isActive = activeField === field;
33124
+ const value = fieldValue(field);
33125
+ const display = field === "cmaToken" ? "\u2022".repeat(value.length) : value;
33126
+ return /* @__PURE__ */ jsxs45(Box44, { gap: 1, children: [
33127
+ /* @__PURE__ */ jsx55(Text46, { color: isActive ? PALETTE.accent : void 0, children: isActive ? "\u276F" : " " }),
33128
+ /* @__PURE__ */ jsx55(Box44, { width: LABEL_WIDTH, flexShrink: 0, children: /* @__PURE__ */ jsx55(Text46, { bold: isActive, color: isActive ? PALETTE.accent : PALETTE.muted, children: FIELD_LABELS[field] }) }),
33129
+ isActive && editing ? /* @__PURE__ */ jsx55(
33130
+ TextInput4,
33787
33131
  {
33788
33132
  value,
33789
- onChange: (next) => onChange(field.key, next),
33133
+ onChange: (next) => setFieldValue(field, next),
33790
33134
  onSubmit: () => setEditing(false),
33791
- mask: field.masked ? "\u2022" : void 0
33135
+ mask: field === "cmaToken" ? "\u2022" : void 0
33792
33136
  }
33793
- ) : /* @__PURE__ */ jsx58(Text49, { bold: !!display, children: display || (field.hint ? "" : /* @__PURE__ */ jsx58(Text49, { color: PALETTE.muted, children: "(empty)" })) }),
33794
- field.hint && /* @__PURE__ */ jsx58(Text49, { color: PALETTE.muted, children: field.hint })
33795
- ] }, field.key);
33137
+ ) : /* @__PURE__ */ jsx55(Text46, { bold: !!display, children: display || (FIELD_HINTS[field] ? "" : /* @__PURE__ */ jsx55(Text46, { color: PALETTE.muted, children: "(empty)" })) }),
33138
+ FIELD_HINTS[field] && /* @__PURE__ */ jsx55(Text46, { color: PALETTE.muted, children: FIELD_HINTS[field] })
33139
+ ] }, field);
33796
33140
  }) }),
33797
- notice && /* @__PURE__ */ jsxs47(Fragment18, { children: [
33798
- /* @__PURE__ */ jsx58(Text49, { children: " " }),
33799
- /* @__PURE__ */ jsxs47(Text49, { color: notice.kind === "success" ? PALETTE.success : PALETTE.error, children: [
33141
+ notice && /* @__PURE__ */ jsxs45(Fragment17, { children: [
33142
+ /* @__PURE__ */ jsx55(Text46, { children: " " }),
33143
+ /* @__PURE__ */ jsxs45(Text46, { color: notice.kind === "success" ? PALETTE.success : PALETTE.error, children: [
33800
33144
  notice.kind === "success" ? "\u2713" : "\u2717",
33801
33145
  " ",
33802
33146
  notice.text
33803
33147
  ] })
33804
33148
  ] }),
33805
- footer,
33806
- /* @__PURE__ */ jsx58(Text49, { children: " " }),
33807
- /* @__PURE__ */ jsx58(
33149
+ /* @__PURE__ */ jsx55(Text46, { children: " " }),
33150
+ /* @__PURE__ */ jsx55(
33808
33151
  ControlHints,
33809
33152
  {
33810
33153
  hints: editing ? [
@@ -33817,219 +33160,53 @@ function FieldForm({
33817
33160
  { keys: "\u23CE", label: "edit" },
33818
33161
  { keys: "c", label: "clear" },
33819
33162
  { keys: "s", label: "save" },
33820
- { keys: "Esc/q", label: "back without saving" }
33821
- ]
33822
- }
33823
- )
33824
- ] });
33825
- }
33826
- var init_FieldForm = __esm({
33827
- "packages/experience-design-system-cli/src/tui/settings/shared/FieldForm.tsx"() {
33828
- "use strict";
33829
- init_home_theme();
33830
- init_control_hints();
33831
- }
33832
- });
33833
-
33834
- // packages/experience-design-system-cli/src/tui/settings/contentful-configuration/config-store.ts
33835
- async function readCredentials() {
33836
- const store = await readV1Store();
33837
- return {
33838
- spaceId: store.spaceId || "",
33839
- environmentId: store.environmentId || "",
33840
- cmaToken: store.cmaToken || "",
33841
- host: store.host || "",
33842
- defaultComponentDir: store.defaultComponentDir || "",
33843
- defaultTokenFile: store.defaultTokenFile || "",
33844
- contentfulBaseDir: store.contentfulBaseDir || ""
33845
- };
33846
- }
33847
- async function writeCredentials(config) {
33848
- const existing = await readV1Store();
33849
- const merged = {
33850
- ...existing,
33851
- ...config
33852
- };
33853
- Object.keys(merged).forEach((k) => {
33854
- if (!merged[k]) delete merged[k];
33855
- });
33856
- await writeV1Store(merged);
33857
- }
33858
- var init_config_store = __esm({
33859
- "packages/experience-design-system-cli/src/tui/settings/contentful-configuration/config-store.ts"() {
33860
- "use strict";
33861
- init_v1_store();
33862
- }
33863
- });
33864
-
33865
- // packages/experience-design-system-cli/src/tui/settings/contentful-configuration/ProjectConfigScreen.tsx
33866
- import { useEffect as useEffect24, useState as useState32 } from "react";
33867
- import { Box as Box47, Text as Text50 } from "ink";
33868
- import { jsx as jsx59, jsxs as jsxs48 } from "react/jsx-runtime";
33869
- function debugFields(config) {
33870
- return {
33871
- space_id: config?.spaceId ?? "",
33872
- environment_id: config?.environmentId ?? "",
33873
- cma_token: config?.cmaToken ?? "",
33874
- host: config?.host ?? "",
33875
- default_component_dir: config?.defaultComponentDir ?? "",
33876
- default_token_file: config?.defaultTokenFile ?? "",
33877
- contentful_base_dir: config?.contentfulBaseDir ?? ""
33878
- };
33879
- }
33880
- function ProjectConfigScreen({ onDone }) {
33881
- const [config, setConfig] = useState32(null);
33882
- const [saving, setSaving] = useState32(false);
33883
- const [notice, setNotice] = useState32(null);
33884
- const [lastSaved, setLastSaved] = useState32(null);
33885
- useEffect24(() => {
33886
- void readCredentials().then((cfg) => {
33887
- setConfig(cfg);
33888
- startDebugRun({
33889
- flow: "settings/contentful-configuration",
33890
- step: "01-configuration",
33891
- menuOption: "Configuration > Project",
33892
- inputs: debugFields(cfg)
33893
- });
33894
- });
33895
- }, []);
33896
- if (!config) {
33897
- return /* @__PURE__ */ jsxs48(Box47, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
33898
- /* @__PURE__ */ jsx59(Text50, { bold: true, children: "Project" }),
33899
- /* @__PURE__ */ jsx59(Text50, { children: " " }),
33900
- /* @__PURE__ */ jsx59(Text50, { color: PALETTE.accent, children: "Loading..." })
33901
- ] });
33902
- }
33903
- const save = () => {
33904
- setSaving(true);
33905
- setNotice(null);
33906
- writeCredentials(config).then(() => {
33907
- setLastSaved(config);
33908
- if (config.contentfulBaseDir) void startDebugSessionIn(config.contentfulBaseDir, { replace: true });
33909
- setNotice({ kind: "success", text: "Project settings saved" });
33910
- }).catch((err) => {
33911
- setNotice({ kind: "error", text: err instanceof Error ? err.message : "Failed to save" });
33912
- }).finally(() => setSaving(false));
33913
- };
33914
- const quit = () => {
33915
- void finishDebugRun(
33916
- lastSaved ? { outputs: debugFields(lastSaved), status: "success", exitMethod: "saved" } : { outputs: {}, status: "success", exitMethod: "discarded" }
33917
- );
33918
- onDone();
33919
- };
33920
- return /* @__PURE__ */ jsx59(
33921
- FieldForm,
33922
- {
33923
- title: "Project",
33924
- subtitle: "The Contentful space and where the CLI keeps its files.",
33925
- fields: FIELDS3,
33926
- values: valuesOf(config),
33927
- onChange: (key, value) => {
33928
- setConfig({ ...config, [key]: value });
33929
- setNotice(null);
33930
- },
33931
- onSave: save,
33932
- onQuit: quit,
33933
- notice,
33934
- busy: saving
33935
- }
33936
- );
33937
- }
33938
- var FIELDS3, valuesOf;
33939
- var init_ProjectConfigScreen = __esm({
33940
- "packages/experience-design-system-cli/src/tui/settings/contentful-configuration/ProjectConfigScreen.tsx"() {
33941
- "use strict";
33942
- init_home_theme();
33943
- init_debug_store();
33944
- init_FieldForm();
33945
- init_config_store();
33946
- FIELDS3 = [
33947
- { key: "spaceId", label: "Space ID" },
33948
- { key: "environmentId", label: "Environment ID" },
33949
- { key: "cmaToken", label: "CMA Token", masked: true },
33950
- { key: "host", label: "API Host" },
33951
- { key: "defaultComponentDir", label: "Default component directory" },
33952
- { key: "defaultTokenFile", label: "Default token file" },
33953
- { key: "contentfulBaseDir", label: "Root Project Directory", hint: "(where .contentful goes)" }
33954
- ];
33955
- valuesOf = (config) => Object.fromEntries(FIELDS3.map(({ key }) => [key, config[key] || ""]));
33956
- }
33957
- });
33958
-
33959
- // packages/experience-design-system-cli/src/tui/settings/contentful-configuration/ContentfulConfigScreen.tsx
33960
- import { useState as useState33 } from "react";
33961
- import { Box as Box48, Text as Text51, useInput as useInput14 } from "ink";
33962
- import { jsx as jsx60, jsxs as jsxs49 } from "react/jsx-runtime";
33963
- function ConfigurationScreen({ onDone }) {
33964
- const [focus, setFocus] = useState33(0);
33965
- const [open, setOpen] = useState33(null);
33966
- const close = () => setOpen(null);
33967
- useInput14((input, key) => {
33968
- if (open) return;
33969
- if (key.upArrow) {
33970
- setFocus((i) => (i - 1 + SECTIONS.length) % SECTIONS.length);
33971
- return;
33972
- }
33973
- if (key.downArrow || key.tab) {
33974
- setFocus((i) => (i + 1) % SECTIONS.length);
33975
- return;
33976
- }
33977
- if (key.return) {
33978
- setOpen(SECTIONS[focus].id);
33979
- return;
33980
- }
33981
- if (key.escape || input === "q") onDone();
33982
- });
33983
- if (open === "project") return /* @__PURE__ */ jsx60(ProjectConfigScreen, { onDone: close });
33984
- if (open === "agents") return /* @__PURE__ */ jsx60(AgentsScreen, { onDone: close });
33985
- return /* @__PURE__ */ jsxs49(Box48, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
33986
- /* @__PURE__ */ jsx60(Text51, { bold: true, children: "Configuration" }),
33987
- /* @__PURE__ */ jsx60(Text51, { children: " " }),
33988
- SECTIONS.map((section, index) => /* @__PURE__ */ jsxs49(Box48, { gap: 1, children: [
33989
- /* @__PURE__ */ jsx60(Text51, { color: index === focus ? PALETTE.accent : void 0, children: index === focus ? "\u276F" : " " }),
33990
- /* @__PURE__ */ jsx60(Box48, { width: 9, flexShrink: 0, children: /* @__PURE__ */ jsx60(Text51, { bold: index === focus, color: index === focus ? PALETTE.accent : void 0, children: section.label }) }),
33991
- /* @__PURE__ */ jsx60(Text51, { color: PALETTE.muted, children: section.description })
33992
- ] }, section.id)),
33993
- /* @__PURE__ */ jsx60(Text51, { children: " " }),
33994
- /* @__PURE__ */ jsx60(
33995
- ControlHints,
33996
- {
33997
- hints: [
33998
- { keys: "\u2191/\u2193", label: "move" },
33999
- { keys: "\u23CE", label: "open" },
34000
- { keys: "Esc/q", label: "back" }
33163
+ { keys: "Esc/q", label: "quit without saving" }
34001
33164
  ]
34002
33165
  }
34003
33166
  )
34004
33167
  ] });
34005
33168
  }
34006
- var SECTIONS;
33169
+ var FIELD_ORDER, FIELD_LABELS, FIELD_HINTS, LABEL_WIDTH;
34007
33170
  var init_ContentfulConfigScreen = __esm({
34008
33171
  "packages/experience-design-system-cli/src/tui/settings/contentful-configuration/ContentfulConfigScreen.tsx"() {
34009
33172
  "use strict";
34010
- init_home_theme();
33173
+ init_theme();
33174
+ init_config_store();
33175
+ init_debug_store();
34011
33176
  init_control_hints();
34012
- init_AgentScreens();
34013
- init_ProjectConfigScreen();
34014
- SECTIONS = [
34015
- {
34016
- id: "project",
34017
- label: "Project",
34018
- description: "Contentful space, credentials, defaults and where .contentful goes"
34019
- },
34020
- { id: "agents", label: "Agents", description: "Which coding agent the CLI uses, and each agent\u2019s settings" }
33177
+ FIELD_ORDER = [
33178
+ "spaceId",
33179
+ "environmentId",
33180
+ "cmaToken",
33181
+ "host",
33182
+ "defaultComponentDir",
33183
+ "defaultTokenFile",
33184
+ "contentfulBaseDir"
34021
33185
  ];
33186
+ FIELD_LABELS = {
33187
+ spaceId: "Space ID",
33188
+ environmentId: "Environment ID",
33189
+ cmaToken: "CMA Token",
33190
+ host: "API Host",
33191
+ defaultComponentDir: "Default component directory",
33192
+ defaultTokenFile: "Default token file",
33193
+ contentfulBaseDir: "Root Project Directory"
33194
+ };
33195
+ FIELD_HINTS = {
33196
+ contentfulBaseDir: "(where .contentful goes)"
33197
+ };
33198
+ LABEL_WIDTH = Math.max(...Object.values(FIELD_LABELS).map((label) => label.length));
34022
33199
  }
34023
33200
  });
34024
33201
 
34025
33202
  // packages/experience-design-system-cli/src/tui/settings/opt-in-analytics/screen.tsx
34026
- import { useEffect as useEffect25, useState as useState34 } from "react";
34027
- import { Box as Box49, Text as Text52, useInput as useInput15 } from "ink";
34028
- import { Fragment as Fragment19, jsx as jsx61, jsxs as jsxs50 } from "react/jsx-runtime";
33203
+ import { useEffect as useEffect23, useState as useState30 } from "react";
33204
+ import { Box as Box45, Text as Text47, useInput as useInput12 } from "ink";
33205
+ import { Fragment as Fragment18, jsx as jsx56, jsxs as jsxs46 } from "react/jsx-runtime";
34029
33206
  function OptInAnalyticsScreen({ onDone }) {
34030
- const [loading, setLoading] = useState34(true);
34031
- const [enabled, setEnabled] = useState34(true);
34032
- useEffect25(() => {
33207
+ const [loading, setLoading] = useState30(true);
33208
+ const [enabled, setEnabled] = useState30(true);
33209
+ useEffect23(() => {
34033
33210
  readAnalyticsSetting().then((setting) => {
34034
33211
  setEnabled(setting.enabled);
34035
33212
  setLoading(false);
@@ -34041,7 +33218,7 @@ function OptInAnalyticsScreen({ onDone }) {
34041
33218
  });
34042
33219
  });
34043
33220
  }, []);
34044
- useInput15((input, key) => {
33221
+ useInput12((input, key) => {
34045
33222
  if (loading) return;
34046
33223
  if (key.return || input === " ") {
34047
33224
  setEnabled((current) => {
@@ -34056,21 +33233,21 @@ function OptInAnalyticsScreen({ onDone }) {
34056
33233
  onDone();
34057
33234
  }
34058
33235
  });
34059
- return /* @__PURE__ */ jsxs50(Box49, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
34060
- /* @__PURE__ */ jsx61(Text52, { bold: true, children: "Settings \u203A Opt-in Analytics" }),
34061
- /* @__PURE__ */ jsx61(Text52, { children: " " }),
34062
- loading ? /* @__PURE__ */ jsx61(Text52, { color: PALETTE.muted, children: "Loading\u2026" }) : /* @__PURE__ */ jsxs50(Fragment19, { children: [
34063
- /* @__PURE__ */ jsxs50(Text52, { children: [
33236
+ return /* @__PURE__ */ jsxs46(Box45, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
33237
+ /* @__PURE__ */ jsx56(Text47, { bold: true, children: "Settings \u203A Opt-in Analytics" }),
33238
+ /* @__PURE__ */ jsx56(Text47, { children: " " }),
33239
+ loading ? /* @__PURE__ */ jsx56(Text47, { color: PALETTE.muted, children: "Loading\u2026" }) : /* @__PURE__ */ jsxs46(Fragment18, { children: [
33240
+ /* @__PURE__ */ jsxs46(Text47, { children: [
34064
33241
  "Share anonymous usage data:",
34065
33242
  " ",
34066
- /* @__PURE__ */ jsx61(Text52, { bold: true, color: enabled ? PALETTE.success : PALETTE.muted, children: enabled ? "On" : "Off" })
33243
+ /* @__PURE__ */ jsx56(Text47, { bold: true, color: enabled ? PALETTE.success : PALETTE.muted, children: enabled ? "On" : "Off" })
34067
33244
  ] }),
34068
- /* @__PURE__ */ jsx61(Text52, { children: " " }),
34069
- /* @__PURE__ */ jsx61(Text52, { color: PALETTE.muted, children: "Shares which CLI commands are used and where imports succeed or fail." }),
34070
- /* @__PURE__ */ jsx61(Text52, { color: PALETTE.muted, children: "Never includes source code, file paths, credentials, or authored content." })
33245
+ /* @__PURE__ */ jsx56(Text47, { children: " " }),
33246
+ /* @__PURE__ */ jsx56(Text47, { color: PALETTE.muted, children: "Shares which CLI commands are used and where imports succeed or fail." }),
33247
+ /* @__PURE__ */ jsx56(Text47, { color: PALETTE.muted, children: "Never includes source code, file paths, credentials, or authored content." })
34071
33248
  ] }),
34072
- /* @__PURE__ */ jsx61(Text52, { children: " " }),
34073
- /* @__PURE__ */ jsx61(
33249
+ /* @__PURE__ */ jsx56(Text47, { children: " " }),
33250
+ /* @__PURE__ */ jsx56(
34074
33251
  ControlHints,
34075
33252
  {
34076
33253
  hints: [
@@ -34084,7 +33261,7 @@ function OptInAnalyticsScreen({ onDone }) {
34084
33261
  var init_screen11 = __esm({
34085
33262
  "packages/experience-design-system-cli/src/tui/settings/opt-in-analytics/screen.tsx"() {
34086
33263
  "use strict";
34087
- init_home_theme();
33264
+ init_theme();
34088
33265
  init_analytics_store();
34089
33266
  init_debug_store();
34090
33267
  init_control_hints();
@@ -34092,12 +33269,12 @@ var init_screen11 = __esm({
34092
33269
  });
34093
33270
 
34094
33271
  // packages/experience-design-system-cli/src/tui/upgrade/PageContainer.tsx
34095
- import { useEffect as useEffect26, useState as useState35 } from "react";
34096
- import { Box as Box50, Text as Text53, useInput as useInput16 } from "ink";
34097
- import { jsx as jsx62, jsxs as jsxs51 } from "react/jsx-runtime";
33272
+ import { useEffect as useEffect24, useState as useState31 } from "react";
33273
+ import { Box as Box46, Text as Text48, useInput as useInput13 } from "ink";
33274
+ import { jsx as jsx57, jsxs as jsxs47 } from "react/jsx-runtime";
34098
33275
  function UpgradeScreen({ onDone }) {
34099
- const [upgradeCheck, setUpgradeCheck] = useState35();
34100
- useEffect26(() => {
33276
+ const [upgradeCheck, setUpgradeCheck] = useState31();
33277
+ useEffect24(() => {
34101
33278
  startDebugRun({
34102
33279
  flow: "upgrade",
34103
33280
  step: "01-upgrade",
@@ -34106,7 +33283,7 @@ function UpgradeScreen({ onDone }) {
34106
33283
  });
34107
33284
  checkForUpgrade().then(setUpgradeCheck).catch(() => setUpgradeCheck({ status: "error" }));
34108
33285
  }, []);
34109
- useInput16((_input, key) => {
33286
+ useInput13((_input, key) => {
34110
33287
  if (key.return) {
34111
33288
  void finishDebugRun({
34112
33289
  outputs: upgradeCheck ?? {},
@@ -34117,12 +33294,12 @@ function UpgradeScreen({ onDone }) {
34117
33294
  return;
34118
33295
  }
34119
33296
  });
34120
- return /* @__PURE__ */ jsxs51(Box50, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
34121
- /* @__PURE__ */ jsx62(Text53, { bold: true, children: "Upgrade" }),
34122
- /* @__PURE__ */ jsx62(Text53, { children: " " }),
33297
+ return /* @__PURE__ */ jsxs47(Box46, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
33298
+ /* @__PURE__ */ jsx57(Text48, { bold: true, children: "Upgrade" }),
33299
+ /* @__PURE__ */ jsx57(Text48, { children: " " }),
34123
33300
  renderBody(upgradeCheck),
34124
- /* @__PURE__ */ jsx62(Text53, { children: " " }),
34125
- /* @__PURE__ */ jsxs51(Text53, { bold: true, color: PALETTE.accent, children: [
33301
+ /* @__PURE__ */ jsx57(Text48, { children: " " }),
33302
+ /* @__PURE__ */ jsxs47(Text48, { bold: true, color: PALETTE.accent, children: [
34126
33303
  FOCUS_MARKER,
34127
33304
  " Go Back"
34128
33305
  ] })
@@ -34130,40 +33307,41 @@ function UpgradeScreen({ onDone }) {
34130
33307
  }
34131
33308
  function renderBody(upgradeCheck) {
34132
33309
  if (!upgradeCheck) {
34133
- return /* @__PURE__ */ jsx62(Text53, { color: PALETTE.muted, children: "Checking for updates\u2026" });
33310
+ return /* @__PURE__ */ jsx57(Text48, { color: PALETTE.muted, children: "Checking for updates\u2026" });
34134
33311
  }
34135
33312
  if (upgradeCheck.status === "error") {
34136
- return /* @__PURE__ */ jsx62(Text53, { color: PALETTE.warning, children: "Couldn't check for updates \u2014 check your network connection and try again." });
33313
+ return /* @__PURE__ */ jsx57(Text48, { color: PALETTE.warning, children: "Couldn't check for updates \u2014 check your network connection and try again." });
34137
33314
  }
34138
33315
  if (upgradeCheck.status === "up-to-date") {
34139
- return /* @__PURE__ */ jsxs51(Text53, { color: PALETTE.success, children: [
33316
+ return /* @__PURE__ */ jsxs47(Text48, { color: PALETTE.success, children: [
34140
33317
  "You're already on the latest version (v",
34141
33318
  upgradeCheck.current,
34142
33319
  ")."
34143
33320
  ] });
34144
33321
  }
34145
- return /* @__PURE__ */ jsxs51(Box50, { flexDirection: "column", children: [
34146
- /* @__PURE__ */ jsxs51(Text53, { color: PALETTE.muted, children: [
34147
- /* @__PURE__ */ jsxs51(Text53, { bold: true, color: PALETTE.success, children: [
33322
+ return /* @__PURE__ */ jsxs47(Box46, { flexDirection: "column", children: [
33323
+ /* @__PURE__ */ jsxs47(Text48, { color: PALETTE.muted, children: [
33324
+ /* @__PURE__ */ jsxs47(Text48, { bold: true, color: PALETTE.success, children: [
34148
33325
  "v",
34149
33326
  upgradeCheck.latest
34150
33327
  ] }),
34151
33328
  " ",
34152
33329
  "is available (you're on ",
34153
- /* @__PURE__ */ jsxs51(Text53, { bold: true, children: [
33330
+ /* @__PURE__ */ jsxs47(Text48, { bold: true, children: [
34154
33331
  "v",
34155
33332
  upgradeCheck.current
34156
33333
  ] }),
34157
33334
  "). Exit this program, cd into the root of your local clone of contentful/experience-design-system-sdk-public, then run:"
34158
33335
  ] }),
34159
- /* @__PURE__ */ jsx62(Text53, { children: " " }),
34160
- /* @__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)) })
33336
+ /* @__PURE__ */ jsx57(Text48, { children: " " }),
33337
+ /* @__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)) })
34161
33338
  ] });
34162
33339
  }
34163
33340
  var UPGRADE_COMMANDS;
34164
33341
  var init_PageContainer4 = __esm({
34165
33342
  "packages/experience-design-system-cli/src/tui/upgrade/PageContainer.tsx"() {
34166
33343
  "use strict";
33344
+ init_theme();
34167
33345
  init_home_theme();
34168
33346
  init_version();
34169
33347
  init_debug_store();
@@ -34172,13 +33350,13 @@ var init_PageContainer4 = __esm({
34172
33350
  });
34173
33351
 
34174
33352
  // packages/experience-design-system-cli/src/tui/settings/debug-mode/screen.tsx
34175
- import { useEffect as useEffect27, useState as useState36 } from "react";
34176
- import { Box as Box51, Text as Text54, useInput as useInput17 } from "ink";
34177
- import { jsx as jsx63, jsxs as jsxs52 } from "react/jsx-runtime";
33353
+ import { useEffect as useEffect25, useState as useState32 } from "react";
33354
+ import { Box as Box47, Text as Text49, useInput as useInput14 } from "ink";
33355
+ import { jsx as jsx58, jsxs as jsxs48 } from "react/jsx-runtime";
34178
33356
  function DebugModeScreen({ onDone }) {
34179
- const [loading, setLoading] = useState36(true);
34180
- const [enabled, setEnabled] = useState36(true);
34181
- useEffect27(() => {
33357
+ const [loading, setLoading] = useState32(true);
33358
+ const [enabled, setEnabled] = useState32(true);
33359
+ useEffect25(() => {
34182
33360
  readDebugModeSetting().then((setting) => {
34183
33361
  setEnabled(setting.enabled);
34184
33362
  setLoading(false);
@@ -34190,7 +33368,7 @@ function DebugModeScreen({ onDone }) {
34190
33368
  });
34191
33369
  });
34192
33370
  }, []);
34193
- useInput17((input, key) => {
33371
+ useInput14((input, key) => {
34194
33372
  if (loading) return;
34195
33373
  if (key.return || input === " ") {
34196
33374
  setEnabled((current) => {
@@ -34205,16 +33383,16 @@ function DebugModeScreen({ onDone }) {
34205
33383
  onDone();
34206
33384
  }
34207
33385
  });
34208
- return /* @__PURE__ */ jsxs52(Box51, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
34209
- /* @__PURE__ */ jsx63(Text54, { bold: true, children: "Settings \u203A Debug Mode" }),
34210
- /* @__PURE__ */ jsx63(Text54, { children: " " }),
34211
- loading ? /* @__PURE__ */ jsx63(Text54, { color: PALETTE.muted, children: "Loading\u2026" }) : /* @__PURE__ */ jsxs52(Text54, { children: [
33386
+ return /* @__PURE__ */ jsxs48(Box47, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
33387
+ /* @__PURE__ */ jsx58(Text49, { bold: true, children: "Settings \u203A Debug Mode" }),
33388
+ /* @__PURE__ */ jsx58(Text49, { children: " " }),
33389
+ loading ? /* @__PURE__ */ jsx58(Text49, { color: PALETTE.muted, children: "Loading\u2026" }) : /* @__PURE__ */ jsxs48(Text49, { children: [
34212
33390
  "Debug logging:",
34213
33391
  " ",
34214
- /* @__PURE__ */ jsx63(Text54, { bold: true, color: enabled ? PALETTE.success : PALETTE.muted, children: enabled ? "On" : "Off" })
33392
+ /* @__PURE__ */ jsx58(Text49, { bold: true, color: enabled ? PALETTE.success : PALETTE.muted, children: enabled ? "On" : "Off" })
34215
33393
  ] }),
34216
- /* @__PURE__ */ jsx63(Text54, { children: " " }),
34217
- /* @__PURE__ */ jsx63(
33394
+ /* @__PURE__ */ jsx58(Text49, { children: " " }),
33395
+ /* @__PURE__ */ jsx58(
34218
33396
  ControlHints,
34219
33397
  {
34220
33398
  hints: [
@@ -34228,7 +33406,7 @@ function DebugModeScreen({ onDone }) {
34228
33406
  var init_screen12 = __esm({
34229
33407
  "packages/experience-design-system-cli/src/tui/settings/debug-mode/screen.tsx"() {
34230
33408
  "use strict";
34231
- init_home_theme();
33409
+ init_theme();
34232
33410
  init_debug_mode_store();
34233
33411
  init_debug_store();
34234
33412
  init_control_hints();
@@ -34240,20 +33418,20 @@ var app_exports = {};
34240
33418
  __export(app_exports, {
34241
33419
  runApp: () => runApp
34242
33420
  });
34243
- import { join as join28 } from "node:path";
34244
- import { useEffect as useEffect28, useState as useState37 } from "react";
34245
- import { Fragment as Fragment20, jsx as jsx64 } from "react/jsx-runtime";
33421
+ import { join as join27 } from "node:path";
33422
+ import { useEffect as useEffect26, useState as useState33 } from "react";
33423
+ import { Fragment as Fragment19, jsx as jsx59 } from "react/jsx-runtime";
34246
33424
  function App({ importOptions, inkClear }) {
34247
- const [screen, setScreen] = useState37("start");
34248
- const [importExitCode, setImportExitCode] = useState37();
33425
+ const [screen, setScreen] = useState33("start");
33426
+ const [importExitCode, setImportExitCode] = useState33();
34249
33427
  const showImportResult = importExitCode !== void 0;
34250
- const [projectPath, setProjectPath] = useState37();
34251
- const [tokensPath, setTokensPath] = useState37();
34252
- const [scannedFiles, setScannedFiles] = useState37();
34253
- const [pendingLaunch, setPendingLaunch] = useState37();
34254
- const [extractionRun, setExtractionRun] = useState37();
33428
+ const [projectPath, setProjectPath] = useState33();
33429
+ const [tokensPath, setTokensPath] = useState33();
33430
+ const [scannedFiles, setScannedFiles] = useState33();
33431
+ const [pendingLaunch, setPendingLaunch] = useState33();
33432
+ const [extractionRun, setExtractionRun] = useState33();
34255
33433
  const extraction = useExtraction(extractionRun?.input);
34256
- const [scopeRun, setScopeRun] = useState37();
33434
+ const [scopeRun, setScopeRun] = useState33();
34257
33435
  const scopeFlow = useScopeGateFlow(
34258
33436
  scopeRun && {
34259
33437
  sessionId: scopeRun.extraction.sessionId,
@@ -34268,12 +33446,12 @@ function App({ importOptions, inkClear }) {
34268
33446
  }
34269
33447
  }
34270
33448
  );
34271
- const [generationInput, setGenerationInput] = useState37();
33449
+ const [generationInput, setGenerationInput] = useState33();
34272
33450
  const generation = useGeneration(generationInput);
34273
- const [flowStart, setFlowStart] = useState37();
33451
+ const [flowStart, setFlowStart] = useState33();
34274
33452
  const flow = useFlow(flowStart, { beforeStepChange: inkClear });
34275
- const [importDefaults, setImportDefaults] = useState37();
34276
- useEffect28(() => {
33453
+ const [importDefaults, setImportDefaults] = useState33();
33454
+ useEffect26(() => {
34277
33455
  if (screen !== "import") {
34278
33456
  setImportDefaults(void 0);
34279
33457
  return;
@@ -34291,7 +33469,7 @@ function App({ importOptions, inkClear }) {
34291
33469
  const launch = { projectPath: projectPath2, tokens, filePaths, ...importOptions };
34292
33470
  const state2 = await inspectTokens({
34293
33471
  rawTokensPath: tokens,
34294
- contentfulDir: join28(resolveUserPath(projectPath2), ".contentful"),
33472
+ contentfulDir: join27(resolveUserPath(projectPath2), ".contentful"),
34295
33473
  cache: importOptions.cache
34296
33474
  });
34297
33475
  if (state2.kind === "cached") {
@@ -34333,12 +33511,12 @@ function App({ importOptions, inkClear }) {
34333
33511
  }
34334
33512
  });
34335
33513
  };
34336
- useEffect28(() => {
33514
+ useEffect26(() => {
34337
33515
  if (!extractionRun || extraction?.status !== "done" || !extraction.result.ok) return;
34338
33516
  setExtractionRun(void 0);
34339
33517
  setScopeRun({ ...extractionRun, extraction: extraction.result.extraction });
34340
33518
  }, [extraction, extractionRun]);
34341
- useEffect28(() => {
33519
+ useEffect26(() => {
34342
33520
  if (!scopeRun || scopeFlow?.status !== "confirmed" || generationInput) return;
34343
33521
  const { extraction: produced, input, generatePromptPath } = scopeRun;
34344
33522
  setGenerationInput({
@@ -34356,7 +33534,7 @@ function App({ importOptions, inkClear }) {
34356
33534
  ...generatePromptPath ? { generatePromptPath } : {}
34357
33535
  });
34358
33536
  }, [scopeFlow, scopeRun, generationInput]);
34359
- useEffect28(() => {
33537
+ useEffect26(() => {
34360
33538
  if (!scopeRun || generation?.status !== "done" || !generation.result.ok) return;
34361
33539
  const { credentialsSkipped, tokenStrategy, extraction: produced, input, generatePromptPath } = scopeRun;
34362
33540
  inkClear();
@@ -34399,9 +33577,9 @@ function App({ importOptions, inkClear }) {
34399
33577
  };
34400
33578
  switch (screen) {
34401
33579
  case "import":
34402
- if (showImportResult) return /* @__PURE__ */ jsx64(ImportScreen, { exitCode: importExitCode, onDone: finishImportResult });
33580
+ if (showImportResult) return /* @__PURE__ */ jsx59(ImportScreen, { exitCode: importExitCode, onDone: finishImportResult });
34403
33581
  if (flow && flowStart) {
34404
- return /* @__PURE__ */ jsx64(
33582
+ return /* @__PURE__ */ jsx59(
34405
33583
  FlowScreen,
34406
33584
  {
34407
33585
  state: flow.state,
@@ -34411,12 +33589,12 @@ function App({ importOptions, inkClear }) {
34411
33589
  }
34412
33590
  );
34413
33591
  }
34414
- if (importDefaults === void 0) return /* @__PURE__ */ jsx64(Fragment20, {});
33592
+ if (importDefaults === void 0) return /* @__PURE__ */ jsx59(Fragment19, {});
34415
33593
  if (projectPath === void 0) {
34416
- return /* @__PURE__ */ jsx64(WelcomeScreen, { onContinue: setProjectPath, onQuit: leaveImport, initialPath: importDefaults.componentDir });
33594
+ return /* @__PURE__ */ jsx59(WelcomeScreen, { onContinue: setProjectPath, onQuit: leaveImport, initialPath: importDefaults.componentDir });
34417
33595
  }
34418
33596
  if (tokensPath === void 0) {
34419
- return /* @__PURE__ */ jsx64(
33597
+ return /* @__PURE__ */ jsx59(
34420
33598
  TokenInputScreen,
34421
33599
  {
34422
33600
  initialPath: importDefaults.tokenFile,
@@ -34426,7 +33604,7 @@ function App({ importOptions, inkClear }) {
34426
33604
  );
34427
33605
  }
34428
33606
  if (scannedFiles === void 0) {
34429
- return /* @__PURE__ */ jsx64(
33607
+ return /* @__PURE__ */ jsx59(
34430
33608
  PathValidationScreen,
34431
33609
  {
34432
33610
  projectPath,
@@ -34438,10 +33616,10 @@ function App({ importOptions, inkClear }) {
34438
33616
  }
34439
33617
  if (extractionRun) {
34440
33618
  if (extraction?.status === "done" && !extraction.result.ok) {
34441
- return /* @__PURE__ */ jsx64(ErrorStep, { stepName: extraction.result.step, message: extraction.result.message, onExit: leaveImport });
33619
+ return /* @__PURE__ */ jsx59(ErrorStep, { stepName: extraction.result.step, message: extraction.result.message, onExit: leaveImport });
34442
33620
  }
34443
33621
  if (extraction?.status === "running") {
34444
- return /* @__PURE__ */ jsx64(
33622
+ return /* @__PURE__ */ jsx59(
34445
33623
  ExtractionScreen,
34446
33624
  {
34447
33625
  progress: extraction.progress,
@@ -34450,14 +33628,14 @@ function App({ importOptions, inkClear }) {
34450
33628
  }
34451
33629
  );
34452
33630
  }
34453
- return /* @__PURE__ */ jsx64(Fragment20, {});
33631
+ return /* @__PURE__ */ jsx59(Fragment19, {});
34454
33632
  }
34455
33633
  if (scopeRun && scopeFlow) {
34456
33634
  if (scopeFlow.status === "failed") {
34457
- return /* @__PURE__ */ jsx64(ErrorStep, { stepName: "scope gate", message: scopeFlow.message, onExit: leaveImport });
33635
+ return /* @__PURE__ */ jsx59(ErrorStep, { stepName: "scope gate", message: scopeFlow.message, onExit: leaveImport });
34458
33636
  }
34459
33637
  if (scopeFlow.status === "deciding") {
34460
- return /* @__PURE__ */ jsx64(
33638
+ return /* @__PURE__ */ jsx59(
34461
33639
  ScopeGateScreen,
34462
33640
  {
34463
33641
  components: scopeFlow.load.components,
@@ -34467,7 +33645,7 @@ function App({ importOptions, inkClear }) {
34467
33645
  );
34468
33646
  }
34469
33647
  if (generation?.status === "done" && !generation.result.ok) {
34470
- return /* @__PURE__ */ jsx64(ErrorStep, { stepName: generation.result.step, message: generation.result.message, onExit: leaveImport });
33648
+ return /* @__PURE__ */ jsx59(ErrorStep, { stepName: generation.result.step, message: generation.result.message, onExit: leaveImport });
34471
33649
  }
34472
33650
  if (generation?.status === "running") {
34473
33651
  const hasRawTokens = scopeRun.input.rawTokensPath !== "";
@@ -34475,7 +33653,7 @@ function App({ importOptions, inkClear }) {
34475
33653
  hasRawTokens,
34476
33654
  mapTokensEligible: generation.progress.mapTokensEligible
34477
33655
  });
34478
- return /* @__PURE__ */ jsx64(
33656
+ return /* @__PURE__ */ jsx59(
34479
33657
  GenerationScreen,
34480
33658
  {
34481
33659
  progress: generation.progress,
@@ -34487,10 +33665,10 @@ function App({ importOptions, inkClear }) {
34487
33665
  }
34488
33666
  );
34489
33667
  }
34490
- return /* @__PURE__ */ jsx64(Fragment20, {});
33668
+ return /* @__PURE__ */ jsx59(Fragment19, {});
34491
33669
  }
34492
33670
  if (pendingLaunch?.cached) {
34493
- return /* @__PURE__ */ jsx64(
33671
+ return /* @__PURE__ */ jsx59(
34494
33672
  TokenReuseScreen,
34495
33673
  {
34496
33674
  tokensPath: pendingLaunch.cached.tokensPath,
@@ -34501,7 +33679,7 @@ function App({ importOptions, inkClear }) {
34501
33679
  }
34502
33680
  );
34503
33681
  }
34504
- return /* @__PURE__ */ jsx64(
33682
+ return /* @__PURE__ */ jsx59(
34505
33683
  CredentialsScreen,
34506
33684
  {
34507
33685
  initial: importDefaults.credentials,
@@ -34510,19 +33688,19 @@ function App({ importOptions, inkClear }) {
34510
33688
  }
34511
33689
  );
34512
33690
  case "help":
34513
- return /* @__PURE__ */ jsx64(HelpScreen, { onDone: goToStart });
33691
+ return /* @__PURE__ */ jsx59(HelpScreen, { onDone: goToStart });
34514
33692
  case "upgrade":
34515
- return /* @__PURE__ */ jsx64(UpgradeScreen, { onDone: goToStart });
33693
+ return /* @__PURE__ */ jsx59(UpgradeScreen, { onDone: goToStart });
34516
33694
  case "settings":
34517
- return /* @__PURE__ */ jsx64(SettingsScreen, { onNavigate: setScreen, onBack: goToStart });
33695
+ return /* @__PURE__ */ jsx59(SettingsScreen, { onNavigate: setScreen, onBack: goToStart });
34518
33696
  case "settings-configuration":
34519
- return /* @__PURE__ */ jsx64(ConfigurationScreen, { onDone: goToSettings });
33697
+ return /* @__PURE__ */ jsx59(ConfigurationScreen, { onDone: goToSettings });
34520
33698
  case "settings-opt-in-analytics":
34521
- return /* @__PURE__ */ jsx64(OptInAnalyticsScreen, { onDone: goToSettings });
33699
+ return /* @__PURE__ */ jsx59(OptInAnalyticsScreen, { onDone: goToSettings });
34522
33700
  case "settings-debug-mode":
34523
- return /* @__PURE__ */ jsx64(DebugModeScreen, { onDone: goToSettings });
33701
+ return /* @__PURE__ */ jsx59(DebugModeScreen, { onDone: goToSettings });
34524
33702
  case "start":
34525
- return /* @__PURE__ */ jsx64(HomeScreen, { onNavigate: setScreen });
33703
+ return /* @__PURE__ */ jsx59(HomeScreen, { onNavigate: setScreen });
34526
33704
  }
34527
33705
  }
34528
33706
  async function runApp(renderApp, importOptions) {
@@ -34530,7 +33708,7 @@ async function runApp(renderApp, importOptions) {
34530
33708
  instance.clear?.();
34531
33709
  process.stdout.write("\x1B[H\x1B[0J");
34532
33710
  };
34533
- const instance = renderApp(/* @__PURE__ */ jsx64(App, { importOptions, inkClear }));
33711
+ const instance = renderApp(/* @__PURE__ */ jsx59(App, { importOptions, inkClear }));
34534
33712
  await instance.waitUntilExit();
34535
33713
  }
34536
33714
  var init_app = __esm({
@@ -34565,7 +33743,7 @@ var init_app = __esm({
34565
33743
  // packages/experience-design-system-cli/program.ts
34566
33744
  init_src4();
34567
33745
  import { readFileSync as readFileSync9 } from "node:fs";
34568
- import { join as join29 } from "node:path";
33746
+ import { join as join28 } from "node:path";
34569
33747
  import { Command } from "commander";
34570
33748
 
34571
33749
  // packages/experience-design-system-cli/src/legacy/run-legacy.ts
@@ -34669,14 +33847,14 @@ function runDevWatch(args) {
34669
33847
  process.stderr.write("--watch only works from a checkout of the repo (scripts/dev.mjs is not in the package).\n");
34670
33848
  return Promise.resolve(1);
34671
33849
  }
34672
- return new Promise((resolve28) => {
33850
+ return new Promise((resolve27) => {
34673
33851
  const child = spawn4(process.execPath, [script, ...args], { stdio: "inherit" });
34674
33852
  process.on("SIGINT", () => void 0);
34675
- child.on("exit", (code) => resolve28(code ?? 0));
33853
+ child.on("exit", (code) => resolve27(code ?? 0));
34676
33854
  child.on("error", (err) => {
34677
33855
  process.stderr.write(`${err.message}
34678
33856
  `);
34679
- resolve28(1);
33857
+ resolve27(1);
34680
33858
  });
34681
33859
  });
34682
33860
  }
@@ -34698,13 +33876,11 @@ function registerImportCommand(program, openTui) {
34698
33876
  }
34699
33877
 
34700
33878
  // packages/experience-design-system-cli/program.ts
34701
- init_agent_store();
34702
- init_apply_binary_overrides();
34703
33879
  init_analytics_store();
34704
33880
  init_package_root();
34705
33881
  var pkg = JSON.parse(
34706
33882
  readFileSync9(
34707
- join29(findPackageRoot(import.meta.url, "@contentful/experience-design-system-cli"), "package.json"),
33883
+ join28(findPackageRoot(import.meta.url, "@contentful/experience-design-system-cli"), "package.json"),
34708
33884
  "utf8"
34709
33885
  )
34710
33886
  );
@@ -34722,7 +33898,6 @@ function createProgram() {
34722
33898
  const commandChain = chain.join(" ") || actionCommand.name();
34723
33899
  const { enabled } = await readAnalyticsSetting();
34724
33900
  setPersistedAnalyticsDisabled(!enabled);
34725
- await readAgentConfig().then(applyBinaryOverrides, () => void 0);
34726
33901
  setCliVersion(pkg.version);
34727
33902
  noteCommandStart(commandChain);
34728
33903
  });
@@ -34746,7 +33921,7 @@ init_config();
34746
33921
  init_package_root();
34747
33922
  import { existsSync as existsSync12 } from "node:fs";
34748
33923
  import { mkdir as mkdir10, readFile as readFile19, rename as rename3, rmdir, unlink } from "node:fs/promises";
34749
- import { dirname as dirname16, join as join30 } from "node:path";
33924
+ import { dirname as dirname16, join as join29 } from "node:path";
34750
33925
  var PACKAGE_NAME4 = "@contentful/experience-design-system-cli";
34751
33926
  async function readJson(path5) {
34752
33927
  try {
@@ -34757,9 +33932,9 @@ async function readJson(path5) {
34757
33932
  }
34758
33933
  async function migrateOldConfig() {
34759
33934
  try {
34760
- const oldCredentials = join30(oldConfigDir2(), "credentials.json");
34761
- const oldRuns = join30(oldConfigDir2(), "runs.json");
34762
- const oldDebugMode = join30(
33935
+ const oldCredentials = join29(oldConfigDir2(), "credentials.json");
33936
+ const oldRuns = join29(oldConfigDir2(), "runs.json");
33937
+ const oldDebugMode = join29(
34763
33938
  findPackageRoot(import.meta.url, PACKAGE_NAME4),
34764
33939
  ".contentful",
34765
33940
  "config",