@contentful/experience-design-system-cli 2.37.1-dev-build-1cd1ccfb.0 → 2.37.1-dev-build-8b3a1c07.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/app.js CHANGED
@@ -837,7 +837,7 @@ async function runAgent(options) {
837
837
  promptLen: prompt.length,
838
838
  promptHead: prompt.slice(0, 500)
839
839
  });
840
- return new Promise((resolve27) => {
840
+ return new Promise((resolve28) => {
841
841
  const bedrockEnv = bedrock ? BEDROCK_ENV_BY_AGENT[agent] : void 0;
842
842
  const child = spawn(binary, args, {
843
843
  stdio: ["pipe", "pipe", "pipe"],
@@ -886,7 +886,7 @@ async function runAgent(options) {
886
886
  stderrLen: stderr.length,
887
887
  stderrTail: stderr.slice(-1e3)
888
888
  });
889
- resolve27(result);
889
+ resolve28(result);
890
890
  });
891
891
  });
892
892
  }
@@ -908,7 +908,7 @@ async function checkAgentAuth(agent) {
908
908
  return "not-found";
909
909
  if (agent !== "claude")
910
910
  return "ok";
911
- return new Promise((resolve27) => {
911
+ return new Promise((resolve28) => {
912
912
  const child = spawn2(binary, ["auth", "status", "--json"], { stdio: ["ignore", "pipe", "pipe"] });
913
913
  let stdout = "";
914
914
  let done = false;
@@ -917,7 +917,7 @@ async function checkAgentAuth(agent) {
917
917
  return;
918
918
  done = true;
919
919
  child.kill("SIGTERM");
920
- resolve27("unauthenticated");
920
+ resolve28("unauthenticated");
921
921
  }, 5e3);
922
922
  child.stdout?.on("data", (chunk) => {
923
923
  stdout += chunk.toString();
@@ -928,14 +928,14 @@ async function checkAgentAuth(agent) {
928
928
  done = true;
929
929
  clearTimeout(timer);
930
930
  if (code !== 0) {
931
- resolve27("unauthenticated");
931
+ resolve28("unauthenticated");
932
932
  return;
933
933
  }
934
934
  try {
935
935
  const status = JSON.parse(stdout);
936
- resolve27(status.loggedIn ? "ok" : "unauthenticated");
936
+ resolve28(status.loggedIn ? "ok" : "unauthenticated");
937
937
  } catch {
938
- resolve27("unauthenticated");
938
+ resolve28("unauthenticated");
939
939
  }
940
940
  });
941
941
  });
@@ -945,9 +945,9 @@ async function binaryIsOnPath(binary) {
945
945
  const fs = await import("node:fs/promises");
946
946
  return fs.access(binary).then(() => true, () => false);
947
947
  }
948
- return new Promise((resolve27) => {
948
+ return new Promise((resolve28) => {
949
949
  const child = spawn2(process.platform === "win32" ? "where" : "which", [binary], { stdio: "ignore" });
950
- child.on("close", (code) => resolve27(code === 0));
950
+ child.on("close", (code) => resolve28(code === 0));
951
951
  });
952
952
  }
953
953
  var init_check_agent_auth = __esm({
@@ -2329,51 +2329,32 @@ var init_debug_store = __esm({
2329
2329
  });
2330
2330
 
2331
2331
  // packages/experience-design-system-cli/app.tsx
2332
- import { join as join25 } from "node:path";
2333
- import { useEffect as useEffect26, useState as useState33 } from "react";
2332
+ import { join as join26 } from "node:path";
2333
+ import { useEffect as useEffect27, useState as useState36 } from "react";
2334
2334
 
2335
2335
  // packages/experience-design-system-cli/src/tui/home/home.tsx
2336
2336
  import { useEffect as useEffect2, useState as useState2 } from "react";
2337
2337
  import { Box, Text as Text2, useApp, useInput } from "ink";
2338
2338
 
2339
- // packages/experience-design-system-cli/src/tui/theme.ts
2340
- var DARK = {
2341
- text: "#f7f9fa",
2342
- // gray/100
2343
- muted: "#aec1cc",
2344
- // gray/400
2345
- border: "#aec1cc",
2346
- // gray/400
2347
- accent: "#40a0ff",
2348
- // blue/400
2349
- error: "#ff707d",
2350
- // red/400
2351
- success: "#00C459",
2352
- warning: "#FFDA00"
2339
+ // packages/experience-design-system-cli/src/tui/home/home.theme.ts
2340
+ var BRAND = {
2341
+ blue: "#1773EB",
2342
+ green: "#00C459",
2343
+ orange: "#E44F20",
2344
+ yellow: "#FFDA00",
2345
+ white: "#FFFFFF",
2346
+ slate: "#8B8D91",
2347
+ steel: "#C4D1DE"
2353
2348
  };
2354
- var LIGHT = {
2355
- text: "#111b2b",
2356
- // gray/900
2357
- muted: "#5a657c",
2358
- // gray/600
2359
- border: "#5a657c",
2360
- // gray/600
2361
- accent: "#0059c8",
2362
- // blue/600, semantic primary
2363
- error: "#bd002a",
2364
- // semantic negative
2365
- success: "#00C459",
2366
- warning: "#FFDA00"
2349
+ var PALETTE = {
2350
+ accent: BRAND.blue,
2351
+ success: BRAND.green,
2352
+ error: BRAND.orange,
2353
+ warning: BRAND.yellow,
2354
+ muted: BRAND.slate,
2355
+ border: BRAND.steel
2367
2356
  };
2368
- function detectColorMode(env = process.env) {
2369
- const bg = env.COLORFGBG?.split(";").pop();
2370
- if (bg === "7" || bg === "15") return "light";
2371
- return "dark";
2372
- }
2373
- var PALETTE = detectColorMode() === "light" ? LIGHT : DARK;
2374
-
2375
- // packages/experience-design-system-cli/src/tui/home/home.theme.ts
2376
- var BRAND_RAMP = [PALETTE.accent, PALETTE.error, PALETTE.warning];
2357
+ var BRAND_RAMP = [BRAND.blue, BRAND.orange, BRAND.yellow];
2377
2358
  var BAR_CELL = "\u2501";
2378
2359
  function brandBar(width, ramp = BRAND_RAMP) {
2379
2360
  if (width <= 0 || ramp.length === 0) return [];
@@ -8450,10 +8431,10 @@ function extractVueSlotsFromSetup(options) {
8450
8431
  if (!body)
8451
8432
  return [];
8452
8433
  const slotsByName = /* @__PURE__ */ new Map();
8453
- for (const access6 of body.getDescendantsOfKind(SyntaxKind5.PropertyAccessExpression)) {
8454
- if (access6.getExpression().getText() !== slotsName)
8434
+ for (const access7 of body.getDescendantsOfKind(SyntaxKind5.PropertyAccessExpression)) {
8435
+ if (access7.getExpression().getText() !== slotsName)
8455
8436
  continue;
8456
- const slotName = access6.getName();
8437
+ const slotName = access7.getName();
8457
8438
  if (!slotsByName.has(slotName)) {
8458
8439
  slotsByName.set(slotName, {
8459
8440
  name: slotName,
@@ -13843,7 +13824,7 @@ function errorMessage(error) {
13843
13824
  return error instanceof Error && error.message ? error.message : String(error);
13844
13825
  }
13845
13826
  function defaultSleep(delayMs) {
13846
- return new Promise((resolve27) => setTimeout(resolve27, delayMs));
13827
+ return new Promise((resolve28) => setTimeout(resolve28, delayMs));
13847
13828
  }
13848
13829
 
13849
13830
  // packages/experience-design-system-backend-pipeline/dist/src/steps/apply/src/helpers/sanitize-preview.js
@@ -14084,7 +14065,7 @@ var ApiClient = class {
14084
14065
  const progress = maxAttempts > 1 ? attempt / (maxAttempts - 1) : 0;
14085
14066
  const baseDelay = intervalMs + (maxIntervalMs - intervalMs) * progress;
14086
14067
  const jitter = Math.random() * baseDelay * 0.15;
14087
- await new Promise((resolve27) => setTimeout(resolve27, baseDelay + jitter));
14068
+ await new Promise((resolve28) => setTimeout(resolve28, baseDelay + jitter));
14088
14069
  }
14089
14070
  }
14090
14071
  throw new Error(`Operation ${operationId} timed out after ${maxAttempts} attempts`);
@@ -14569,6 +14550,7 @@ function readTokensFromPath2(request) {
14569
14550
  init_agents();
14570
14551
  init_agent_name();
14571
14552
  init_models();
14553
+ init_binaries();
14572
14554
  init_is_agent_name();
14573
14555
  init_agent_supports_bedrock();
14574
14556
  init_check_agent_auth();
@@ -16393,7 +16375,7 @@ async function retryDatabaseWrite(operation, attempts = 8) {
16393
16375
  const message = error instanceof Error ? error.message : String(error);
16394
16376
  if (!/database is locked|database is busy/i.test(message) || attempt >= attempts)
16395
16377
  throw error;
16396
- await new Promise((resolve27) => setTimeout(resolve27, Math.min(250 * attempt, 2e3)));
16378
+ await new Promise((resolve28) => setTimeout(resolve28, Math.min(250 * attempt, 2e3)));
16397
16379
  }
16398
16380
  }
16399
16381
  }
@@ -21489,6 +21471,17 @@ function PreviewValidationErrorScreen({
21489
21471
  import { useCallback as useCallback5, useEffect as useEffect16, useMemo as useMemo4, useRef as useRef11, useState as useState22 } from "react";
21490
21472
  import figures7 from "figures";
21491
21473
 
21474
+ // packages/experience-design-system-cli/src/tui/import/steps/09-review/theme.ts
21475
+ var PALETTE3 = {
21476
+ info: PALETTE.accent,
21477
+ success: PALETTE.success,
21478
+ error: PALETTE.error,
21479
+ warning: PALETTE.warning,
21480
+ muted: PALETTE.muted,
21481
+ border: PALETTE.border,
21482
+ inverse: "#FFFFFF"
21483
+ };
21484
+
21492
21485
  // packages/experience-design-system-cli/src/tui/import/steps/09-review/review-json-panel.ts
21493
21486
  var HIDDEN_PROP_CATEGORIES = /* @__PURE__ */ new Set(["state", "unattached"]);
21494
21487
  function getReviewJsonPanelValue(selected, showHiddenProps) {
@@ -21919,13 +21912,13 @@ function serializeState(state2, originalJson) {
21919
21912
  }
21920
21913
  function Picker({ value, active }) {
21921
21914
  return /* @__PURE__ */ jsxs22(Box21, { children: [
21922
- active && /* @__PURE__ */ jsx27(Text23, { color: PALETTE.warning, children: "\u2039" }),
21923
- /* @__PURE__ */ jsx27(Text23, { color: active ? PALETTE.warning : void 0, bold: active, children: value }),
21924
- active && /* @__PURE__ */ jsx27(Text23, { color: PALETTE.warning, children: "\u203A" })
21915
+ active && /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.warning, children: "\u2039" }),
21916
+ /* @__PURE__ */ jsx27(Text23, { color: active ? PALETTE3.warning : void 0, bold: active, children: value }),
21917
+ active && /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.warning, children: "\u203A" })
21925
21918
  ] });
21926
21919
  }
21927
21920
  function Toggle({ value, active }) {
21928
- return /* @__PURE__ */ jsx27(Box21, { children: /* @__PURE__ */ jsx27(Text23, { color: active ? PALETTE.warning : value ? PALETTE.success : PALETTE.border, children: value ? "[\u2713]" : "[ ]" }) });
21921
+ return /* @__PURE__ */ jsx27(Box21, { children: /* @__PURE__ */ jsx27(Text23, { color: active ? PALETTE3.warning : value ? PALETTE3.success : PALETTE3.border, children: value ? "[\u2713]" : "[ ]" }) });
21929
21922
  }
21930
21923
  function InlinePropField({
21931
21924
  label,
@@ -21935,7 +21928,7 @@ function InlinePropField({
21935
21928
  width
21936
21929
  }) {
21937
21930
  return /* @__PURE__ */ jsxs22(Box21, { width, gap: 1, flexShrink: flexible ? 1 : 0, flexGrow: flexible ? 1 : 0, flexWrap: "wrap", children: [
21938
- /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, wrap: "truncate-end", children: [
21931
+ /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE3.warning : PALETTE3.muted, bold: focused, wrap: "truncate-end", children: [
21939
21932
  focused ? "\u203A " : " ",
21940
21933
  label
21941
21934
  ] }),
@@ -21956,7 +21949,7 @@ function DefaultValueRow({
21956
21949
  focused
21957
21950
  }) {
21958
21951
  return /* @__PURE__ */ jsxs22(Box21, { gap: 1, flexWrap: "wrap", flexShrink: 0, children: [
21959
- /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, children: [
21952
+ /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE3.warning : PALETTE3.muted, bold: focused, children: [
21960
21953
  focused ? "\u203A " : " ",
21961
21954
  "default:"
21962
21955
  ] }),
@@ -21971,7 +21964,7 @@ function RowLabel({
21971
21964
  return /* @__PURE__ */ jsxs22(
21972
21965
  Text23,
21973
21966
  {
21974
- color: selected ? PALETTE.text : PALETTE.accent,
21967
+ color: selected ? PALETTE3.inverse : PALETTE3.info,
21975
21968
  bold: selected,
21976
21969
  backgroundColor: selected ? "blue" : void 0,
21977
21970
  wrap: "truncate-end",
@@ -21989,7 +21982,7 @@ function ValueInputRow({
21989
21982
  cursorVisible
21990
21983
  }) {
21991
21984
  return /* @__PURE__ */ jsxs22(Box21, { paddingLeft: 2, children: [
21992
- /* @__PURE__ */ jsx27(Text23, { color: PALETTE.accent, children: mode === "edit" ? "\u270E " : "+ " }),
21985
+ /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.info, children: mode === "edit" ? "\u270E " : "+ " }),
21993
21986
  /* @__PURE__ */ jsx27(Text23, { children: valueText }),
21994
21987
  /* @__PURE__ */ jsx27(Text23, { inverse: cursorVisible, children: " " })
21995
21988
  ] });
@@ -22006,7 +21999,7 @@ function EditableListItem({
22006
21999
  if (isBeingEdited) {
22007
22000
  return /* @__PURE__ */ jsx27(ValueInputRow, { mode: "edit", valueText, cursorVisible });
22008
22001
  }
22009
- return /* @__PURE__ */ jsx27(Box21, { gap: 1, paddingLeft: 2, children: /* @__PURE__ */ jsx27(Text23, { color: active ? PALETTE.accent : void 0, children: active ? `${figures5.pointer} ${value}` : ` ${value}` }) });
22002
+ return /* @__PURE__ */ jsx27(Box21, { gap: 1, paddingLeft: 2, children: /* @__PURE__ */ jsx27(Text23, { color: active ? PALETTE3.info : void 0, children: active ? `${figures5.pointer} ${value}` : ` ${value}` }) });
22010
22003
  }
22011
22004
  function EditableValueList({
22012
22005
  values,
@@ -22020,7 +22013,7 @@ function EditableValueList({
22020
22013
  showAddInput
22021
22014
  }) {
22022
22015
  return /* @__PURE__ */ jsxs22(Fragment5, { children: [
22023
- 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 }) })),
22016
+ 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 }) })),
22024
22017
  values.map((value, index) => /* @__PURE__ */ jsx27(
22025
22018
  EditableListItem,
22026
22019
  {
@@ -22046,11 +22039,11 @@ function DefaultSubRow({
22046
22039
  const cursor = cursorVisible ? "\u2588" : " ";
22047
22040
  if (prop.type === "richtext" || prop.type === "media" || prop.type === "link") {
22048
22041
  return /* @__PURE__ */ jsxs22(Box21, { gap: 1, flexShrink: 0, children: [
22049
- /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, children: [
22042
+ /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE3.warning : PALETTE3.muted, bold: focused, children: [
22050
22043
  focused ? "\u203A " : " ",
22051
22044
  "default:"
22052
22045
  ] }),
22053
- /* @__PURE__ */ jsx27(Text23, { color: focused ? void 0 : PALETTE.muted, children: "(not applicable)" })
22046
+ /* @__PURE__ */ jsx27(Text23, { color: focused ? void 0 : PALETTE3.muted, children: "(not applicable)" })
22054
22047
  ] });
22055
22048
  }
22056
22049
  if (prop.type === "boolean") {
@@ -22060,11 +22053,11 @@ function DefaultSubRow({
22060
22053
  if (prop.type === "enum") {
22061
22054
  if (prop.values.length === 0) {
22062
22055
  return /* @__PURE__ */ jsxs22(Box21, { gap: 1, flexShrink: 0, children: [
22063
- /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, children: [
22056
+ /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE3.warning : PALETTE3.muted, bold: focused, children: [
22064
22057
  focused ? "\u203A " : " ",
22065
22058
  "default:"
22066
22059
  ] }),
22067
- /* @__PURE__ */ jsx27(Text23, { color: focused ? void 0 : PALETTE.muted, children: "(no values defined)" })
22060
+ /* @__PURE__ */ jsx27(Text23, { color: focused ? void 0 : PALETTE3.muted, children: "(no values defined)" })
22068
22061
  ] });
22069
22062
  }
22070
22063
  const display = typeof prop.default === "string" && prop.default !== "" ? prop.default : "(unset)";
@@ -22073,11 +22066,11 @@ function DefaultSubRow({
22073
22066
  const value = typeof prop.default === "string" ? prop.default : "";
22074
22067
  if (active) {
22075
22068
  return /* @__PURE__ */ jsxs22(Box21, { flexDirection: "row", flexShrink: 0, children: [
22076
- /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, children: [
22069
+ /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE3.warning : PALETTE3.muted, bold: focused, children: [
22077
22070
  focused ? "\u203A " : " ",
22078
22071
  "default:"
22079
22072
  ] }),
22080
- /* @__PURE__ */ jsxs22(Box21, { flexGrow: 1, borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
22073
+ /* @__PURE__ */ jsxs22(Box21, { flexGrow: 1, borderStyle: "round", borderColor: PALETTE3.warning, paddingX: 1, children: [
22081
22074
  /* @__PURE__ */ jsx27(Text23, { children: value.slice(0, textCursor) }),
22082
22075
  /* @__PURE__ */ jsx27(Text23, { inverse: cursorVisible, children: value[textCursor] ?? cursor }),
22083
22076
  /* @__PURE__ */ jsx27(Text23, { children: value.slice(textCursor + 1) })
@@ -22085,11 +22078,11 @@ function DefaultSubRow({
22085
22078
  ] });
22086
22079
  }
22087
22080
  return /* @__PURE__ */ jsxs22(Box21, { gap: 1, flexShrink: 0, children: [
22088
- /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, children: [
22081
+ /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE3.warning : PALETTE3.muted, bold: focused, children: [
22089
22082
  focused ? "\u203A " : " ",
22090
22083
  "default:"
22091
22084
  ] }),
22092
- /* @__PURE__ */ jsx27(Text23, { color: focused || value ? void 0 : PALETTE.muted, children: value || "(none)" })
22085
+ /* @__PURE__ */ jsx27(Text23, { color: focused || value ? void 0 : PALETTE3.muted, children: value || "(none)" })
22093
22086
  ] });
22094
22087
  }
22095
22088
  function DescriptionField({
@@ -22105,15 +22098,15 @@ function DescriptionField({
22105
22098
  }) {
22106
22099
  if (compact) {
22107
22100
  return /* @__PURE__ */ jsxs22(Box21, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: [
22108
- /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, children: [
22101
+ /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE3.warning : PALETTE3.muted, bold: focused, children: [
22109
22102
  focused ? "\u203A " : " ",
22110
22103
  label
22111
22104
  ] }),
22112
- /* @__PURE__ */ jsx27(Text23, { wrap: "truncate-end", color: value ? void 0 : PALETTE.muted, children: value || "\u2014" })
22105
+ /* @__PURE__ */ jsx27(Text23, { wrap: "truncate-end", color: value ? void 0 : PALETTE3.muted, children: value || "\u2014" })
22113
22106
  ] });
22114
22107
  }
22115
22108
  return /* @__PURE__ */ jsxs22(Box21, { paddingLeft, flexDirection: "column", width, flexShrink: 0, children: [
22116
- /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, children: [
22109
+ /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE3.warning : PALETTE3.muted, bold: focused, children: [
22117
22110
  focused ? "\u203A " : " ",
22118
22111
  label
22119
22112
  ] }),
@@ -22177,7 +22170,7 @@ function PropRow({
22177
22170
  ] }),
22178
22171
  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" }) }),
22179
22172
  prop.type === "enum" && /* @__PURE__ */ jsxs22(Box21, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: [
22180
- /* @__PURE__ */ jsxs22(Text23, { color: activeField === "values" ? PALETTE.warning : PALETTE.muted, bold: activeField === "values", children: [
22173
+ /* @__PURE__ */ jsxs22(Text23, { color: activeField === "values" ? PALETTE3.warning : PALETTE3.muted, bold: activeField === "values", children: [
22181
22174
  activeField === "values" ? "\u203A " : " ",
22182
22175
  "values:"
22183
22176
  ] }),
@@ -22198,27 +22191,27 @@ function PropRow({
22198
22191
  }
22199
22192
  ),
22200
22193
  prop.type === "token" && prop.category === "design" && /* @__PURE__ */ jsxs22(Box21, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: [
22201
- /* @__PURE__ */ jsxs22(Text23, { color: activeField === "allowed" ? PALETTE.warning : PALETTE.muted, bold: activeField === "allowed", children: [
22194
+ /* @__PURE__ */ jsxs22(Text23, { color: activeField === "allowed" ? PALETTE3.warning : PALETTE3.muted, bold: activeField === "allowed", children: [
22202
22195
  activeField === "allowed" ? "\u203A " : " ",
22203
22196
  "allowed:"
22204
22197
  ] }),
22205
- 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(
22198
+ 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(
22206
22199
  Text23,
22207
22200
  {
22208
- color: activeField !== "allowed" && prop.allowed.length === 0 ? PALETTE.muted : void 0,
22201
+ color: activeField !== "allowed" && prop.allowed.length === 0 ? PALETTE3.muted : void 0,
22209
22202
  wrap: "wrap",
22210
22203
  children: prop.allowed.length > 0 ? prop.allowed.join(", ") : "(any)"
22211
22204
  }
22212
22205
  )
22213
22206
  ] }),
22214
- selected && showRationale && rationale && rationale.trim().length > 0 && /* @__PURE__ */ jsx27(Box21, { paddingLeft: 2, children: /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: (() => {
22207
+ selected && showRationale && rationale && rationale.trim().length > 0 && /* @__PURE__ */ jsx27(Box21, { paddingLeft: 2, children: /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, children: (() => {
22215
22208
  const max = Math.max(8, width - 8);
22216
22209
  const text = `~ ${rationale}`;
22217
22210
  return text.length > max ? text.slice(0, max - 1) + "\u2026" : text;
22218
22211
  })() }) }, rowKey ? `rationale-${rowKey}` : void 0),
22219
22212
  selected && prop.type === "enum" && activeField === "values" && /* @__PURE__ */ jsxs22(Box21, { paddingLeft: 2, flexDirection: "column", children: [
22220
22213
  /* @__PURE__ */ jsxs22(Box21, { children: [
22221
- /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: "values:" }),
22214
+ /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, children: "values:" }),
22222
22215
  activeField === "values" && /* @__PURE__ */ jsx27(Text23, { children: " [a] add [e] edit [r] remove [\u2191\u2193] navigate [K/J] reorder" })
22223
22216
  ] }),
22224
22217
  /* @__PURE__ */ jsx27(
@@ -22279,7 +22272,7 @@ function SlotRow({
22279
22272
  /* @__PURE__ */ jsxs22(
22280
22273
  Text23,
22281
22274
  {
22282
- color: activeField === "allowedComponents" ? PALETTE.warning : PALETTE.muted,
22275
+ color: activeField === "allowedComponents" ? PALETTE3.warning : PALETTE3.muted,
22283
22276
  bold: activeField === "allowedComponents",
22284
22277
  children: [
22285
22278
  activeField === "allowedComponents" ? "\u203A " : " ",
@@ -22287,14 +22280,14 @@ function SlotRow({
22287
22280
  ]
22288
22281
  }
22289
22282
  ),
22290
- slot.allowedComponents.length === 0 ? /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: "(any)" }) : /* @__PURE__ */ jsx27(Text23, { wrap: "wrap", children: slot.allowedComponents.join(", ") })
22283
+ slot.allowedComponents.length === 0 ? /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, children: "(any)" }) : /* @__PURE__ */ jsx27(Text23, { wrap: "wrap", children: slot.allowedComponents.join(", ") })
22291
22284
  ] }),
22292
22285
  selected && editingField && activeField === "allowedComponents" && /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", children: [
22293
22286
  /* @__PURE__ */ jsxs22(Box21, { children: [
22294
22287
  /* @__PURE__ */ jsxs22(
22295
22288
  Text23,
22296
22289
  {
22297
- color: activeField === "allowedComponents" ? PALETTE.warning : PALETTE.muted,
22290
+ color: activeField === "allowedComponents" ? PALETTE3.warning : PALETTE3.muted,
22298
22291
  bold: activeField === "allowedComponents",
22299
22292
  children: [
22300
22293
  activeField === "allowedComponents" ? "\u203A " : " ",
@@ -22302,7 +22295,7 @@ function SlotRow({
22302
22295
  ]
22303
22296
  }
22304
22297
  ),
22305
- 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" })
22298
+ 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" })
22306
22299
  ] }),
22307
22300
  /* @__PURE__ */ jsx27(
22308
22301
  EditableValueList,
@@ -22318,21 +22311,21 @@ function SlotRow({
22318
22311
  showAddInput: editingField && activeField === "allowedComponents"
22319
22312
  }
22320
22313
  ),
22321
- 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)" }) : (() => {
22314
+ 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)" }) : (() => {
22322
22315
  const filtered = valueText.length === 0 ? pickerCandidates : pickerCandidates.filter((n) => n.toLowerCase().includes(valueText.toLowerCase()));
22323
22316
  if (filtered.length === 0) {
22324
- return /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: "(no candidates match \u2014 Enter to add as free text)" });
22317
+ return /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, children: "(no candidates match \u2014 Enter to add as free text)" });
22325
22318
  }
22326
22319
  const cursor = pickerCursor % filtered.length;
22327
22320
  const MAX_VISIBLE = 5;
22328
22321
  const start = Math.max(0, Math.min(filtered.length - MAX_VISIBLE, cursor - 2));
22329
22322
  const slice = filtered.slice(start, start + MAX_VISIBLE);
22330
22323
  return /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", children: [
22331
- /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: " candidates (\u2191\u2193 cycle, Enter to add):" }),
22324
+ /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, children: " candidates (\u2191\u2193 cycle, Enter to add):" }),
22332
22325
  slice.map((name, i) => {
22333
22326
  const absIdx = start + i;
22334
22327
  const isCursor = absIdx === cursor;
22335
- return /* @__PURE__ */ jsx27(Text23, { color: isCursor ? PALETTE.accent : PALETTE.muted, children: isCursor ? ` ${figures5.pointer} ${name}` : ` ${name}` }, name);
22328
+ return /* @__PURE__ */ jsx27(Text23, { color: isCursor ? PALETTE3.info : PALETTE3.muted, children: isCursor ? ` ${figures5.pointer} ${name}` : ` ${name}` }, name);
22336
22329
  })
22337
22330
  ] });
22338
22331
  })() })
@@ -23161,18 +23154,18 @@ function FieldEditor({
23161
23154
  });
23162
23155
  const innerWidth = Math.max(1, width - 2);
23163
23156
  if (parseErr) {
23164
- return /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", width, borderStyle: "single", borderColor: PALETTE.error, children: [
23165
- /* @__PURE__ */ jsx27(Text23, { bold: true, color: PALETTE.error, children: "FIELD EDITOR \u2014 parse error" }),
23166
- /* @__PURE__ */ jsx27(Text23, { color: PALETTE.error, children: parseErr }),
23167
- /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: "Cannot display structured editor. Fix the JSON first." })
23157
+ return /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", width, borderStyle: "single", borderColor: PALETTE3.error, children: [
23158
+ /* @__PURE__ */ jsx27(Text23, { bold: true, color: PALETTE3.error, children: "FIELD EDITOR \u2014 parse error" }),
23159
+ /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.error, children: parseErr }),
23160
+ /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, children: "Cannot display structured editor. Fix the JSON first." })
23168
23161
  ] });
23169
23162
  }
23170
23163
  if (props.length === 0 && slots.length === 0) {
23171
- return /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", width, borderStyle: "single", borderColor: PALETTE.warning, children: [
23172
- /* @__PURE__ */ jsx27(Text23, { bold: true, color: PALETTE.warning, children: "FIELD EDITOR \u2014 no fields" }),
23173
- /* @__PURE__ */ jsx27(Text23, { color: PALETTE.warning, children: "\u26A0 No properties classified for this component. The LLM didn't find anything to classify." }),
23174
- /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: "You can add fields manually below or reject this component." }),
23175
- /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: "Enter to save \xB7 Esc to discard" })
23164
+ return /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", width, borderStyle: "single", borderColor: PALETTE3.warning, children: [
23165
+ /* @__PURE__ */ jsx27(Text23, { bold: true, color: PALETTE3.warning, children: "FIELD EDITOR \u2014 no fields" }),
23166
+ /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.warning, children: "\u26A0 No properties classified for this component. The LLM didn't find anything to classify." }),
23167
+ /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, children: "You can add fields manually below or reject this component." }),
23168
+ /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, children: "Enter to save \xB7 Esc to discard" })
23176
23169
  ] });
23177
23170
  }
23178
23171
  const hasEmptyProperties = props.length === 0 && slots.length === 0;
@@ -23301,7 +23294,7 @@ function FieldEditor({
23301
23294
  const renderRow = (row, index) => {
23302
23295
  const key = rowKey(row, index);
23303
23296
  if (row.kind === "header") {
23304
- return /* @__PURE__ */ jsx27(Box21, { flexDirection: "column", paddingTop: 1, children: /* @__PURE__ */ jsx27(Text23, { bold: true, color: PALETTE.success, children: row.label }) }, key);
23297
+ return /* @__PURE__ */ jsx27(Box21, { flexDirection: "column", paddingTop: 1, children: /* @__PURE__ */ jsx27(Text23, { bold: true, color: PALETTE3.success, children: row.label }) }, key);
23305
23298
  }
23306
23299
  if (row.kind === "component-description") {
23307
23300
  const isSelected2 = inComponentDesc && active;
@@ -23383,9 +23376,9 @@ function FieldEditor({
23383
23376
  ...fixedHeight ? { height } : { minHeight: height },
23384
23377
  clipOverflow: fixedHeight,
23385
23378
  borderStyle: "single",
23386
- borderColor: hasEmptyProperties ? PALETTE.warning : active ? PALETTE.accent : PALETTE.border,
23379
+ borderColor: hasEmptyProperties ? PALETTE3.warning : active ? PALETTE3.info : PALETTE3.border,
23387
23380
  children: [
23388
- 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." }),
23381
+ 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." }),
23389
23382
  header,
23390
23383
  /* @__PURE__ */ jsx27(Box21, { flexDirection: "column", width: innerWidth, flexShrink: 0, children: focusLevel === "field" && !inComponentDesc && currentProp ? /* @__PURE__ */ jsx27(
23391
23384
  PropRow,
@@ -23436,7 +23429,7 @@ function FieldEditor({
23436
23429
  `visible-${key}`
23437
23430
  );
23438
23431
  }) }),
23439
- categoryBelow && /* @__PURE__ */ jsx27(Text23, { color: PALETTE.success, bold: true, children: `(${categoryBelow} below)` }),
23432
+ categoryBelow && /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.success, bold: true, children: `(${categoryBelow} below)` }),
23440
23433
  sourceOpen && !onToggleSourceExternal && (() => {
23441
23434
  const propMeta = !inSlots && !inComponentDesc && currentProp ? metadata?.props?.[currentProp.name] : void 0;
23442
23435
  const start = propMeta?.sourceStartLine ?? null;
@@ -23446,20 +23439,20 @@ function FieldEditor({
23446
23439
  const headerPath = path5 ?? "<unknown source path>";
23447
23440
  if (!start || !end2 || !src) {
23448
23441
  return /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", borderStyle: "single", borderColor: "gray", paddingX: 1, children: [
23449
- /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, bold: true, children: `source: ${headerPath}` }),
23450
- /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: "(no source location captured for this prop)" }),
23442
+ /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, bold: true, children: `source: ${headerPath}` }),
23443
+ /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, children: "(no source location captured for this prop)" }),
23451
23444
  /* @__PURE__ */ jsx27(Text23, { children: "[s] close" })
23452
23445
  ] });
23453
23446
  }
23454
23447
  const lines = src.split("\n").slice(Math.max(0, start - 1), end2);
23455
23448
  return /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", borderStyle: "single", borderColor: "gray", paddingX: 1, children: [
23456
- /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, bold: true, children: `${headerPath}: lines ${start}\u2013${end2}` }),
23457
- lines.map((ln, i) => /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: ln }, `source-line-${i}`)),
23449
+ /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, bold: true, children: `${headerPath}: lines ${start}\u2013${end2}` }),
23450
+ lines.map((ln, i) => /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, children: ln }, `source-line-${i}`)),
23458
23451
  /* @__PURE__ */ jsx27(Text23, { children: "[s] close \xB7 [Esc] close" })
23459
23452
  ] });
23460
23453
  })(),
23461
- showHelp && /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.accent, paddingX: 1, children: [
23462
- /* @__PURE__ */ jsx27(Text23, { bold: true, color: PALETTE.accent, children: "Keybindings" }),
23454
+ showHelp && /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE3.info, paddingX: 1, children: [
23455
+ /* @__PURE__ */ jsx27(Text23, { bold: true, color: PALETTE3.info, children: "Keybindings" }),
23463
23456
  /* @__PURE__ */ jsx27(Text23, { children: " " }),
23464
23457
  /* @__PURE__ */ jsx27(Text23, { bold: true, children: "Row navigation" }),
23465
23458
  /* @__PURE__ */ jsx27(Text23, { children: " \u2191/\u2193 move between rows" }),
@@ -23484,10 +23477,10 @@ function FieldEditor({
23484
23477
  /* @__PURE__ */ jsx27(Text23, { children: " " + componentRationaleKey.padEnd(16) + " toggle component rationale panel" }),
23485
23478
  /* @__PURE__ */ jsx27(Text23, { children: " ? toggle this overlay" }),
23486
23479
  /* @__PURE__ */ jsx27(Text23, { children: " " }),
23487
- /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: "press ? or Esc to close" })
23480
+ /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, children: "press ? or Esc to close" })
23488
23481
  ] }),
23489
- validationError && /* @__PURE__ */ jsx27(Text23, { color: PALETTE.error, children: "\u2717 " + validationError }),
23490
- /* @__PURE__ */ jsx27(Box21, { paddingTop: 1, children: /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: modeLabel }) })
23482
+ validationError && /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.error, children: "\u2717 " + validationError }),
23483
+ /* @__PURE__ */ jsx27(Box21, { paddingTop: 1, children: /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, children: modeLabel }) })
23491
23484
  ]
23492
23485
  }
23493
23486
  );
@@ -23539,16 +23532,16 @@ function RationaleLine({ line, active }) {
23539
23532
  return /* @__PURE__ */ jsx28(Box22, { children: /* @__PURE__ */ jsx28(Text24, { children: " " }) });
23540
23533
  }
23541
23534
  if (line.kind === "heading") {
23542
- return /* @__PURE__ */ jsx28(Box22, { children: /* @__PURE__ */ jsx28(Text24, { bold: true, color: active ? PALETTE.accent : PALETTE.muted, children: line.text }) });
23535
+ return /* @__PURE__ */ jsx28(Box22, { children: /* @__PURE__ */ jsx28(Text24, { bold: true, color: active ? PALETTE3.info : PALETTE3.muted, children: line.text }) });
23543
23536
  }
23544
23537
  if (line.kind === "label") {
23545
23538
  return /* @__PURE__ */ jsxs23(Box22, { children: [
23546
23539
  line.prefix && /* @__PURE__ */ jsx28(Text24, { children: line.prefix }),
23547
- /* @__PURE__ */ jsx28(Text24, { bold: true, color: active ? line.color : PALETTE.muted, children: line.text }),
23548
- line.suffix && /* @__PURE__ */ jsx28(Text24, { color: PALETTE.muted, children: line.suffix })
23540
+ /* @__PURE__ */ jsx28(Text24, { bold: true, color: active ? line.color : PALETTE3.muted, children: line.text }),
23541
+ line.suffix && /* @__PURE__ */ jsx28(Text24, { color: PALETTE3.muted, children: line.suffix })
23549
23542
  ] });
23550
23543
  }
23551
- return /* @__PURE__ */ jsx28(Box22, { children: /* @__PURE__ */ jsx28(Text24, { color: !active || line.dim ? PALETTE.muted : void 0, children: line.text }) });
23544
+ return /* @__PURE__ */ jsx28(Box22, { children: /* @__PURE__ */ jsx28(Text24, { color: !active || line.dim ? PALETTE3.muted : void 0, children: line.text }) });
23552
23545
  }
23553
23546
 
23554
23547
  // packages/experience-design-system-cli/src/tui/import/steps/09-review/components/ComponentRationalePanel.tsx
@@ -23627,9 +23620,9 @@ function ComponentRationalePanel({
23627
23620
  width,
23628
23621
  height: height + 2,
23629
23622
  borderStyle: "single",
23630
- borderColor: active ? PALETTE.text : void 0,
23623
+ borderColor: active ? PALETTE3.inverse : void 0,
23631
23624
  children: [
23632
- /* @__PURE__ */ jsx29(Box23, { children: /* @__PURE__ */ jsx29(Text25, { bold: true, color: active ? void 0 : PALETTE.muted, children: `Component rationale: ${data.name}` }) }),
23625
+ /* @__PURE__ */ jsx29(Box23, { children: /* @__PURE__ */ jsx29(Text25, { bold: true, color: active ? void 0 : PALETTE3.muted, children: `Component rationale: ${data.name}` }) }),
23633
23626
  visible.map((line, i) => /* @__PURE__ */ jsx29(RationaleLine, { line, active }, i)),
23634
23627
  /* @__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" }) })
23635
23628
  ]
@@ -23644,7 +23637,7 @@ import { Box as Box25 } from "ink";
23644
23637
  import { Text as Text26 } from "ink";
23645
23638
  import { Fragment as Fragment6, jsx as jsx30 } from "react/jsx-runtime";
23646
23639
  function HighlightedLine({ parts }) {
23647
- return /* @__PURE__ */ jsx30(Fragment6, { children: parts.map((part, i) => /* @__PURE__ */ jsx30(Text26, { color: part.dim ? PALETTE.muted : part.color, children: part.text }, i)) });
23640
+ return /* @__PURE__ */ jsx30(Fragment6, { children: parts.map((part, i) => /* @__PURE__ */ jsx30(Text26, { color: part.dim ? PALETTE3.muted : part.color, children: part.text }, i)) });
23648
23641
  }
23649
23642
 
23650
23643
  // packages/experience-design-system-cli/src/tui/import/steps/09-review/components/ScrollablePanel.tsx
@@ -23664,10 +23657,10 @@ function ScrollablePanel({
23664
23657
  const overflowed = totalLines > height;
23665
23658
  return /* @__PURE__ */ jsxs25(Box24, { flexDirection: "column", width, height: height + 2, borderStyle: "single", borderColor, children: [
23666
23659
  /* @__PURE__ */ jsxs25(Box24, { children: [
23667
- /* @__PURE__ */ jsx31(Text27, { bold: true, color: active ? void 0 : PALETTE.muted, children: title }),
23660
+ /* @__PURE__ */ jsx31(Text27, { bold: true, color: active ? void 0 : PALETTE3.muted, children: title }),
23668
23661
  overflowed && /* @__PURE__ */ jsxs25(Fragment7, { children: [
23669
23662
  /* @__PURE__ */ jsx31(Box24, { flexGrow: 1 }),
23670
- /* @__PURE__ */ jsx31(Text27, { color: active ? void 0 : PALETTE.muted, children: `\u2195 ${visibleStart}-${visibleEnd}/${totalLines}` })
23663
+ /* @__PURE__ */ jsx31(Text27, { color: active ? void 0 : PALETTE3.muted, children: `\u2195 ${visibleStart}-${visibleEnd}/${totalLines}` })
23671
23664
  ] })
23672
23665
  ] }),
23673
23666
  children
@@ -23753,7 +23746,7 @@ function renderRationaleLines(rows, innerWidth) {
23753
23746
  out.push({
23754
23747
  kind: "label",
23755
23748
  text: row.name,
23756
- color: PALETTE.accent,
23749
+ color: PALETTE3.info,
23757
23750
  suffix: row.kind === "slot" ? " (slot)" : void 0
23758
23751
  });
23759
23752
  for (const line of wrapText(row.rationale, innerWidth)) {
@@ -23789,7 +23782,7 @@ function RationalePanel({
23789
23782
  totalLines,
23790
23783
  visibleStart,
23791
23784
  visibleEnd,
23792
- borderColor: active ? PALETTE.text : void 0,
23785
+ borderColor: active ? PALETTE3.inverse : void 0,
23793
23786
  children: visible.map((line, i) => /* @__PURE__ */ jsx33(RationaleLine, { line, active }, i))
23794
23787
  }
23795
23788
  );
@@ -23824,29 +23817,21 @@ function TokenReviewPanel({
23824
23817
  width,
23825
23818
  height: height + 2,
23826
23819
  borderStyle: "single",
23827
- borderColor: active ? PALETTE.text : void 0,
23820
+ borderColor: active ? PALETTE3.inverse : void 0,
23828
23821
  children: [
23829
- /* @__PURE__ */ jsx34(Text28, { bold: true, color: active ? void 0 : PALETTE.muted, wrap: "truncate", children: `TOKEN REVIEW \u2014 ${componentName} \xB7 ${current.propName} (edit allowed)` }),
23830
- /* @__PURE__ */ jsx34(Text28, { color: PALETTE.muted, wrap: "truncate", children: `select which tokens are allowed (${rangeLabel})` }),
23822
+ /* @__PURE__ */ jsx34(Text28, { bold: true, color: active ? void 0 : PALETTE3.muted, wrap: "truncate", children: `TOKEN REVIEW \u2014 ${componentName} \xB7 ${current.propName} (edit allowed)` }),
23823
+ /* @__PURE__ */ jsx34(Text28, { color: PALETTE3.muted, wrap: "truncate", children: `select which tokens are allowed (${rangeLabel})` }),
23831
23824
  /* @__PURE__ */ jsx34(Text28, { children: " " }),
23832
- current.paths.length === 0 && /* @__PURE__ */ jsx34(Text28, { color: PALETTE.muted, children: "(no compatible tokens found for this token kind)" }),
23825
+ current.paths.length === 0 && /* @__PURE__ */ jsx34(Text28, { color: PALETTE3.muted, children: "(no compatible tokens found for this token kind)" }),
23833
23826
  visiblePaths.map((path5, i) => {
23834
23827
  const pathIndex = scrollStart + i;
23835
23828
  const checked = editSelection.has(path5);
23836
23829
  const focused = pathIndex === editCursor;
23837
- return /* @__PURE__ */ jsx34(Box26, { children: /* @__PURE__ */ jsx34(
23838
- Text28,
23839
- {
23840
- color: focused ? PALETTE.accent : active ? void 0 : PALETTE.muted,
23841
- bold: focused,
23842
- wrap: "truncate",
23843
- children: ` [${checked ? "x" : " "}] ${path5}`
23844
- }
23845
- ) }, path5);
23830
+ 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);
23846
23831
  }),
23847
23832
  /* @__PURE__ */ jsx34(Text28, { children: " " }),
23848
- /* @__PURE__ */ jsx34(Text28, { color: PALETTE.muted, wrap: "truncate", children: "[\u2191/\u2193] move [Space] toggle" }),
23849
- /* @__PURE__ */ jsx34(Text28, { color: PALETTE.muted, wrap: "truncate", children: "[Ctrl+S] save [Esc] cancel" })
23833
+ /* @__PURE__ */ jsx34(Text28, { color: PALETTE3.muted, wrap: "truncate", children: "[\u2191/\u2193] move [Space] toggle" }),
23834
+ /* @__PURE__ */ jsx34(Text28, { color: PALETTE3.muted, wrap: "truncate", children: "[Ctrl+S] save [Esc] cancel" })
23850
23835
  ]
23851
23836
  }
23852
23837
  );
@@ -23858,16 +23843,16 @@ function TokenReviewPanel({
23858
23843
  width,
23859
23844
  height: height + 2,
23860
23845
  borderStyle: "single",
23861
- borderColor: active ? PALETTE.text : void 0,
23846
+ borderColor: active ? PALETTE3.inverse : void 0,
23862
23847
  children: [
23863
- /* @__PURE__ */ jsx34(Text28, { bold: true, color: active ? void 0 : PALETTE.muted, children: `TOKEN REVIEW \u2014 ${componentName}` }),
23864
- suggestions.length === 0 && /* @__PURE__ */ jsx34(Text28, { color: PALETTE.muted, children: "(no token suggestions for this component)" }),
23848
+ /* @__PURE__ */ jsx34(Text28, { bold: true, color: active ? void 0 : PALETTE3.muted, children: `TOKEN REVIEW \u2014 ${componentName}` }),
23849
+ suggestions.length === 0 && /* @__PURE__ */ jsx34(Text28, { color: PALETTE3.muted, children: "(no token suggestions for this component)" }),
23865
23850
  suggestions.map((s, i) => {
23866
23851
  const focused = i === selectedRow;
23867
23852
  return /* @__PURE__ */ jsxs26(Box26, { flexDirection: "column", children: [
23868
- /* @__PURE__ */ jsx34(Box26, { children: /* @__PURE__ */ jsx34(Text28, { color: focused ? PALETTE.accent : active ? void 0 : PALETTE.muted, bold: focused, children: `${focused ? figures6.pointer : " "} ${s.propName}` }) }),
23869
- /* @__PURE__ */ jsx34(Text28, { color: PALETTE.muted, children: ` suggested: ${s.suggested.join(", ")}` }),
23870
- /* @__PURE__ */ jsx34(Text28, { color: PALETTE.muted, children: ` allowed: ${s.allowed.join(", ")}` })
23853
+ /* @__PURE__ */ jsx34(Box26, { children: /* @__PURE__ */ jsx34(Text28, { color: focused ? PALETTE3.info : active ? void 0 : PALETTE3.muted, bold: focused, children: `${focused ? figures6.pointer : " "} ${s.propName}` }) }),
23854
+ /* @__PURE__ */ jsx34(Text28, { color: PALETTE3.muted, children: ` suggested: ${s.suggested.join(", ")}` }),
23855
+ /* @__PURE__ */ jsx34(Text28, { color: PALETTE3.muted, children: ` allowed: ${s.allowed.join(", ")}` })
23871
23856
  ] }, s.propName);
23872
23857
  }),
23873
23858
  /* @__PURE__ */ jsx34(Text28, { children: " " }),
@@ -23952,9 +23937,9 @@ function ReviewDetailsPanel({
23952
23937
  const sourceLineCount = Math.max(1, height - 4);
23953
23938
  const lines = source ? source.split("\n").slice(panelScrollOffset, panelScrollOffset + sourceLineCount) : [];
23954
23939
  return /* @__PURE__ */ jsxs27(FixedPanel, { width, height, borderStyle: "single", borderColor: sourceBorderColor, paddingLeft: 1, children: [
23955
- /* @__PURE__ */ jsx35(Text29, { color: PALETTE.muted, bold: true, wrap: "truncate-end", children: `source: ${headerPath}` }),
23956
- 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)" }),
23957
- /* @__PURE__ */ jsx35(Text29, { color: PALETTE.muted, wrap: "truncate-end", children: "[s/Esc] close" })
23940
+ /* @__PURE__ */ jsx35(Text29, { color: PALETTE3.muted, bold: true, wrap: "truncate-end", children: `source: ${headerPath}` }),
23941
+ 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)" }),
23942
+ /* @__PURE__ */ jsx35(Text29, { color: PALETTE3.muted, wrap: "truncate-end", children: "[s/Esc] close" })
23958
23943
  ] });
23959
23944
  }
23960
23945
  if (panelOpen === "token-review") {
@@ -24104,17 +24089,17 @@ function ReviewEmptyComponentsWarning({
24104
24089
  hidden
24105
24090
  }) {
24106
24091
  if (hidden || count === 0) return null;
24107
- return /* @__PURE__ */ jsx37(Text30, { color: PALETTE.warning, children: `\u26A0 ${count} component${count === 1 ? "" : "s"} had no classifiable props \u2014 review with care` });
24092
+ return /* @__PURE__ */ jsx37(Text30, { color: PALETTE3.warning, children: `\u26A0 ${count} component${count === 1 ? "" : "s"} had no classifiable props \u2014 review with care` });
24108
24093
  }
24109
24094
  function ReviewNoSelection() {
24110
- return /* @__PURE__ */ jsx37(Box27, { flexGrow: 1, paddingLeft: 1, flexDirection: "column", children: /* @__PURE__ */ jsx37(Text30, { color: PALETTE.muted, children: "No component selected" }) });
24095
+ return /* @__PURE__ */ jsx37(Box27, { flexGrow: 1, paddingLeft: 1, flexDirection: "column", children: /* @__PURE__ */ jsx37(Text30, { color: PALETTE3.muted, children: "No component selected" }) });
24111
24096
  }
24112
24097
  function ReviewFinalizeError({
24113
24098
  message,
24114
24099
  hidden
24115
24100
  }) {
24116
24101
  if (hidden || !message) return null;
24117
- return /* @__PURE__ */ jsx37(Text30, { color: PALETTE.error, children: `\u26A0 ${message}` });
24102
+ return /* @__PURE__ */ jsx37(Text30, { color: PALETTE3.error, children: `\u26A0 ${message}` });
24118
24103
  }
24119
24104
  function ReviewPanelFooter({
24120
24105
  reviewEditor,
@@ -24138,7 +24123,7 @@ function ReviewComponentTitle({
24138
24123
  return /* @__PURE__ */ jsxs28(Box27, { paddingLeft: 2, paddingBottom: 1, children: [
24139
24124
  /* @__PURE__ */ jsx37(Text30, { bold: true, wrap: "truncate-end", children: selectedKey }),
24140
24125
  /* @__PURE__ */ jsx37(Box27, { flexGrow: 1 }),
24141
- /* @__PURE__ */ jsxs28(Text30, { color: PALETTE.muted, wrap: "truncate-end", children: [
24126
+ /* @__PURE__ */ jsxs28(Text30, { color: PALETTE3.muted, wrap: "truncate-end", children: [
24142
24127
  propCount,
24143
24128
  " prop",
24144
24129
  propCount !== 1 ? "s" : "",
@@ -24194,8 +24179,8 @@ function ReviewComponentPanel({
24194
24179
  )
24195
24180
  }
24196
24181
  ) }),
24197
- /* @__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 : " " }) }),
24198
- /* @__PURE__ */ jsx37(Box27, { width: contentWidth, height: 1, flexShrink: 0, children: /* @__PURE__ */ jsx37(Text30, { color: PALETTE.muted, wrap: "truncate-end", children: /* @__PURE__ */ jsx37(
24182
+ /* @__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 : " " }) }),
24183
+ /* @__PURE__ */ jsx37(Box27, { width: contentWidth, height: 1, flexShrink: 0, children: /* @__PURE__ */ jsx37(Text30, { color: PALETTE3.muted, wrap: "truncate-end", children: /* @__PURE__ */ jsx37(
24199
24184
  ReviewPanelFooter,
24200
24185
  {
24201
24186
  reviewEditor,
@@ -24223,11 +24208,11 @@ function countReviewStatuses(entries) {
24223
24208
  );
24224
24209
  }
24225
24210
  function ReviewLoadingState() {
24226
- return /* @__PURE__ */ jsx38(Box28, { paddingX: 2, paddingY: 1, children: /* @__PURE__ */ jsx38(Text31, { color: PALETTE.muted, children: "Loading generated definitions..." }) });
24211
+ return /* @__PURE__ */ jsx38(Box28, { paddingX: 2, paddingY: 1, children: /* @__PURE__ */ jsx38(Text31, { color: PALETTE3.muted, children: "Loading generated definitions..." }) });
24227
24212
  }
24228
24213
  function ReviewLoadError({ message }) {
24229
24214
  return /* @__PURE__ */ jsxs29(Box28, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
24230
- /* @__PURE__ */ jsx38(Text31, { color: PALETTE.error, children: message }),
24215
+ /* @__PURE__ */ jsx38(Text31, { color: PALETTE3.error, children: message }),
24231
24216
  /* @__PURE__ */ jsx38(Text31, { children: " " }),
24232
24217
  /* @__PURE__ */ jsx38(Text31, { children: "[q / Enter / Esc] Quit" })
24233
24218
  ] });
@@ -24463,41 +24448,41 @@ function FinalizeDialog({
24463
24448
  /* @__PURE__ */ jsx39(Text32, { bold: true, children: "\u2500".repeat(22) + " Finalize " + "\u2500".repeat(22) }),
24464
24449
  /* @__PURE__ */ jsx39(Text32, { children: " " }),
24465
24450
  /* @__PURE__ */ jsxs30(Text32, { children: [
24466
- /* @__PURE__ */ jsxs30(Text32, { color: PALETTE.success, children: [
24451
+ /* @__PURE__ */ jsxs30(Text32, { color: PALETTE3.success, children: [
24467
24452
  accepted,
24468
24453
  " accepted"
24469
24454
  ] }),
24470
24455
  /* @__PURE__ */ jsx39(Text32, { children: " \xB7 " }),
24471
- /* @__PURE__ */ jsxs30(Text32, { color: PALETTE.error, children: [
24456
+ /* @__PURE__ */ jsxs30(Text32, { color: PALETTE3.error, children: [
24472
24457
  rejected,
24473
24458
  " rejected"
24474
24459
  ] }),
24475
24460
  /* @__PURE__ */ jsx39(Text32, { children: " \xB7 " }),
24476
- /* @__PURE__ */ jsxs30(Text32, { color: PALETTE.muted, children: [
24461
+ /* @__PURE__ */ jsxs30(Text32, { color: PALETTE3.muted, children: [
24477
24462
  needsReview,
24478
24463
  " unresolved"
24479
24464
  ] })
24480
24465
  ] }),
24481
24466
  /* @__PURE__ */ jsx39(Text32, { children: " " }),
24482
24467
  noneAccepted && /* @__PURE__ */ jsxs30(Fragment10, { children: [
24483
- /* @__PURE__ */ jsx39(Text32, { bold: true, color: PALETTE.warning, children: "\u26A0 No components are accepted \u2014 nothing will be pushed." }),
24484
- /* @__PURE__ */ jsx39(Text32, { color: PALETTE.warning, children: "Accept at least one component ([a] a row, [A] accept all) to push." }),
24468
+ /* @__PURE__ */ jsx39(Text32, { bold: true, color: PALETTE3.warning, children: "\u26A0 No components are accepted \u2014 nothing will be pushed." }),
24469
+ /* @__PURE__ */ jsx39(Text32, { color: PALETTE3.warning, children: "Accept at least one component ([a] a row, [A] accept all) to push." }),
24485
24470
  /* @__PURE__ */ jsx39(Text32, { children: " " })
24486
24471
  ] }),
24487
24472
  !allResolved && /* @__PURE__ */ jsxs30(Fragment10, { children: [
24488
- /* @__PURE__ */ jsx39(Text32, { color: PALETTE.warning, children: "\u26A0 " + needsReview + " unresolved component" + (needsReview === 1 ? "" : "s") + " will not be pushed." }),
24489
- /* @__PURE__ */ jsx39(Text32, { color: PALETTE.warning, children: "Only explicitly accepted components ship." }),
24473
+ /* @__PURE__ */ jsx39(Text32, { color: PALETTE3.warning, children: "\u26A0 " + needsReview + " unresolved component" + (needsReview === 1 ? "" : "s") + " will not be pushed." }),
24474
+ /* @__PURE__ */ jsx39(Text32, { color: PALETTE3.warning, children: "Only explicitly accepted components ship." }),
24490
24475
  /* @__PURE__ */ jsx39(Text32, { children: " " })
24491
24476
  ] }),
24492
24477
  /* @__PURE__ */ jsxs30(Box29, { flexDirection: "column", height: 2, children: [
24493
- 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: " " }),
24478
+ 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: " " }),
24494
24479
  /* @__PURE__ */ jsx39(Text32, { children: " " })
24495
24480
  ] }),
24496
24481
  previewStatus === "done" && removed.length > 0 && /* @__PURE__ */ jsxs30(Fragment10, { children: [
24497
- /* @__PURE__ */ jsx39(Text32, { bold: true, color: PALETTE.error, children: removedComponentsHeader(removed.length, false) }),
24498
- hasMoreAbove && /* @__PURE__ */ jsx39(Text32, { color: PALETTE.muted, children: "\u2191 more above" }),
24499
- windowed.map((rc) => /* @__PURE__ */ jsx39(Text32, { color: PALETTE.error, children: removedComponentLine(rc) }, rc.id)),
24500
- hasMoreBelow && /* @__PURE__ */ jsx39(Text32, { color: PALETTE.muted, children: "\u2193 more below" }),
24482
+ /* @__PURE__ */ jsx39(Text32, { bold: true, color: PALETTE3.error, children: removedComponentsHeader(removed.length, false) }),
24483
+ hasMoreAbove && /* @__PURE__ */ jsx39(Text32, { color: PALETTE3.muted, children: "\u2191 more above" }),
24484
+ windowed.map((rc) => /* @__PURE__ */ jsx39(Text32, { color: PALETTE3.error, children: removedComponentLine(rc) }, rc.id)),
24485
+ hasMoreBelow && /* @__PURE__ */ jsx39(Text32, { color: PALETTE3.muted, children: "\u2193 more below" }),
24501
24486
  removed.length > FINALIZE_REMOVED_WINDOW && /* @__PURE__ */ jsx39(Text32, { children: "[\u2191\u2193] scroll deletions" }),
24502
24487
  /* @__PURE__ */ jsx39(Text32, { children: " " })
24503
24488
  ] }),
@@ -24991,8 +24976,8 @@ function ReviewStepDialogs({
24991
24976
  }
24992
24977
  function ReviewReloadDialog({ open }) {
24993
24978
  if (!open) return null;
24994
- return /* @__PURE__ */ jsxs32(Box31, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
24995
- /* @__PURE__ */ jsx41(Text34, { bold: true, color: PALETTE.warning, children: "Reload from saved state?" }),
24979
+ return /* @__PURE__ */ jsxs32(Box31, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE3.warning, paddingX: 1, children: [
24980
+ /* @__PURE__ */ jsx41(Text34, { bold: true, color: PALETTE3.warning, children: "Reload from saved state?" }),
24996
24981
  /* @__PURE__ */ jsx41(Text34, { children: "Unsaved in-memory changes will be lost." }),
24997
24982
  /* @__PURE__ */ jsx41(Text34, { children: " " }),
24998
24983
  /* @__PURE__ */ jsx41(Text34, { children: " [Enter] Confirm" }),
@@ -25378,19 +25363,19 @@ function LivePreviewSummary({
25378
25363
  const counts = { new: 0, changed: 0, removed: 0, breaking: 0 };
25379
25364
  for (const annotation of previewAnnotations.values()) counts[annotation] += 1;
25380
25365
  const hasCounts = counts.new + counts.changed + counts.removed + counts.breaking > 0;
25381
- if (disabled) return /* @__PURE__ */ jsx42(Text35, { color: PALETTE.muted, children: "Preview: disabled (creds rejected)" });
25382
- if (status === "running" && !hasCounts) return /* @__PURE__ */ jsx42(Text35, { color: PALETTE.muted, children: `Preview: ${spinner} running...` });
25366
+ if (disabled) return /* @__PURE__ */ jsx42(Text35, { color: PALETTE3.muted, children: "Preview: disabled (creds rejected)" });
25367
+ if (status === "running" && !hasCounts) return /* @__PURE__ */ jsx42(Text35, { color: PALETTE3.muted, children: `Preview: ${spinner} running...` });
25383
25368
  if (!hasCounts) return null;
25384
25369
  return /* @__PURE__ */ jsxs33(Box32, { children: [
25385
25370
  /* @__PURE__ */ jsx42(Text35, { children: "Preview: " }),
25386
- /* @__PURE__ */ jsx42(Text35, { color: PALETTE.success, children: `${counts.new} new` }),
25371
+ /* @__PURE__ */ jsx42(Text35, { color: PALETTE3.success, children: `${counts.new} new` }),
25387
25372
  /* @__PURE__ */ jsx42(Text35, { children: " \xB7 " }),
25388
- /* @__PURE__ */ jsx42(Text35, { color: PALETTE.warning, children: `${counts.changed} changed` }),
25373
+ /* @__PURE__ */ jsx42(Text35, { color: PALETTE3.warning, children: `${counts.changed} changed` }),
25389
25374
  /* @__PURE__ */ jsx42(Text35, { children: " \xB7 " }),
25390
- /* @__PURE__ */ jsx42(Text35, { color: PALETTE.muted, children: `${counts.removed} removed` }),
25375
+ /* @__PURE__ */ jsx42(Text35, { color: PALETTE3.muted, children: `${counts.removed} removed` }),
25391
25376
  showRemovedListHint && removedCount > 0 && /* @__PURE__ */ jsx42(Text35, { children: " ([d] removed list)" }),
25392
25377
  /* @__PURE__ */ jsx42(Text35, { children: " \xB7 " }),
25393
- /* @__PURE__ */ jsx42(Text35, { color: PALETTE.error, bold: true, children: `${counts.breaking} breaking` })
25378
+ /* @__PURE__ */ jsx42(Text35, { color: PALETTE3.error, bold: true, children: `${counts.breaking} breaking` })
25394
25379
  ] });
25395
25380
  }
25396
25381
 
@@ -25436,10 +25421,10 @@ function CyclePathLine({
25436
25421
  highlightComponents = false,
25437
25422
  highlightLine = false
25438
25423
  }) {
25439
- return /* @__PURE__ */ jsxs34(Text36, { color: highlightLine ? PALETTE.warning : void 0, children: [
25424
+ return /* @__PURE__ */ jsxs34(Text36, { color: highlightLine ? PALETTE3.warning : void 0, children: [
25440
25425
  prefix,
25441
25426
  segments.map(
25442
- (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)
25427
+ (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)
25443
25428
  )
25444
25429
  ] });
25445
25430
  }
@@ -25451,9 +25436,9 @@ function CycleDetailPanel({
25451
25436
  height
25452
25437
  }) {
25453
25438
  const lines = [
25454
- /* @__PURE__ */ jsx43(Text36, { bold: true, color: PALETTE.warning, children: `SLOT DEPENDENCY CYCLES (${cycles.length})` }, "cyc-title"),
25455
- /* @__PURE__ */ jsx43(Text36, { color: PALETTE.muted, children: "push will fail until these are resolved" }, "cyc-sub"),
25456
- /* @__PURE__ */ jsx43(Text36, { color: PALETTE.muted, children: "Reject a cycle member or remove a slot edge to break the cycle." }, "cyc-guidance"),
25439
+ /* @__PURE__ */ jsx43(Text36, { bold: true, color: PALETTE3.warning, children: `SLOT DEPENDENCY CYCLES (${cycles.length})` }, "cyc-title"),
25440
+ /* @__PURE__ */ jsx43(Text36, { color: PALETTE3.muted, children: "push will fail until these are resolved" }, "cyc-sub"),
25441
+ /* @__PURE__ */ jsx43(Text36, { color: PALETTE3.muted, children: "Reject a cycle member or remove a slot edge to break the cycle." }, "cyc-guidance"),
25457
25442
  /* @__PURE__ */ jsx43(Text36, { children: " " }, "cyc-space")
25458
25443
  ];
25459
25444
  cycles.forEach((cycle, index) => {
@@ -25465,7 +25450,7 @@ function CycleDetailPanel({
25465
25450
  );
25466
25451
  if (cycle.suggestedBreak) {
25467
25452
  lines.push(
25468
- /* @__PURE__ */ jsx43(Text36, { color: PALETTE.muted, children: ` Suggested fix: remove [${cycle.suggestedBreak.slotName}] from ${cycle.suggestedBreak.fromComponent}` }, `cyc-fix-${index}`)
25453
+ /* @__PURE__ */ jsx43(Text36, { color: PALETTE3.muted, children: ` Suggested fix: remove [${cycle.suggestedBreak.slotName}] from ${cycle.suggestedBreak.fromComponent}` }, `cyc-fix-${index}`)
25469
25454
  );
25470
25455
  }
25471
25456
  lines.push(/* @__PURE__ */ jsx43(Text36, { children: " " }, `cyc-s-${index}`));
@@ -25473,9 +25458,9 @@ function CycleDetailPanel({
25473
25458
  const footer = "[\u2191\u2193] move [Enter] fix cycle [c/q/Esc] close";
25474
25459
  const viewportHeight = Math.max(1, height - 3);
25475
25460
  const visible = lines.slice(scrollOffset, scrollOffset + viewportHeight - 1);
25476
- return /* @__PURE__ */ jsxs34(FixedPanel, { width, height, borderStyle: "round", borderColor: PALETTE.warning, paddingLeft: 1, children: [
25461
+ return /* @__PURE__ */ jsxs34(FixedPanel, { width, height, borderStyle: "round", borderColor: PALETTE3.warning, paddingLeft: 1, children: [
25477
25462
  visible,
25478
- /* @__PURE__ */ jsx43(Text36, { color: PALETTE.muted, children: footer })
25463
+ /* @__PURE__ */ jsx43(Text36, { color: PALETTE3.muted, children: footer })
25479
25464
  ] });
25480
25465
  }
25481
25466
  function BreakCyclePanel({
@@ -25486,14 +25471,14 @@ function BreakCyclePanel({
25486
25471
  width,
25487
25472
  height
25488
25473
  }) {
25489
- return /* @__PURE__ */ jsxs34(FixedPanel, { width, height, borderStyle: "round", borderColor: PALETTE.warning, paddingLeft: 1, children: [
25490
- /* @__PURE__ */ jsx43(Text36, { bold: true, color: PALETTE.warning, children: "BREAK CYCLE \u2014 remove a slot edge" }),
25474
+ return /* @__PURE__ */ jsxs34(FixedPanel, { width, height, borderStyle: "round", borderColor: PALETTE3.warning, paddingLeft: 1, children: [
25475
+ /* @__PURE__ */ jsx43(Text36, { bold: true, color: PALETTE3.warning, children: "BREAK CYCLE \u2014 remove a slot edge" }),
25491
25476
  cycle && /* @__PURE__ */ jsx43(CyclePathLine, { segments: formatCyclePathSegments2(cycle), prefix: " ", highlightComponents: true }),
25492
- /* @__PURE__ */ jsx43(Text36, { color: PALETTE.muted, children: cycle ? "Deleting an edge removes it from $allowedComponents (undo with Ctrl+Z)." : "No cycle highlighted." }),
25477
+ /* @__PURE__ */ jsx43(Text36, { color: PALETTE3.muted, children: cycle ? "Deleting an edge removes it from $allowedComponents (undo with Ctrl+Z)." : "No cycle highlighted." }),
25493
25478
  /* @__PURE__ */ jsx43(Text36, { children: " " }),
25494
- edges.length > 0 && /* @__PURE__ */ jsx43(Text36, { color: PALETTE.muted, children: "remove slot edge:" }),
25479
+ edges.length > 0 && /* @__PURE__ */ jsx43(Text36, { color: PALETTE3.muted, children: "remove slot edge:" }),
25495
25480
  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}`)),
25496
- 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" })
25481
+ 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" })
25497
25482
  ] });
25498
25483
  }
25499
25484
  var HELP_SECTIONS2 = [
@@ -25599,7 +25584,7 @@ function deriveBreakingChanges(response) {
25599
25584
  }
25600
25585
  function GenerateReviewStep(props) {
25601
25586
  if (!props.extractSessionId) {
25602
- 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." }) });
25587
+ 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." }) });
25603
25588
  }
25604
25589
  return /* @__PURE__ */ jsx43(GenerateReviewStepView, { ...props, extractSessionId: props.extractSessionId });
25605
25590
  }
@@ -26516,8 +26501,8 @@ function GenerateReviewStepView({
26516
26501
  }
26517
26502
  ),
26518
26503
  /* @__PURE__ */ jsx43(ReviewReloadDialog, { open: showReloadDialog && !dialogOpen }),
26519
- removedComponents.length > 0 && !dialogOpen && /* @__PURE__ */ jsxs34(Box33, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.error, paddingX: 1, children: [
26520
- /* @__PURE__ */ jsx43(Text36, { bold: true, color: PALETTE.error, children: removedComponentsHeader(removedComponents.length, true) }),
26504
+ removedComponents.length > 0 && !dialogOpen && /* @__PURE__ */ jsxs34(Box33, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE3.error, paddingX: 1, children: [
26505
+ /* @__PURE__ */ jsx43(Text36, { bold: true, color: PALETTE3.error, children: removedComponentsHeader(removedComponents.length, true) }),
26521
26506
  !removedBannerCollapsed && /* @__PURE__ */ jsxs34(Fragment13, { children: [
26522
26507
  /* @__PURE__ */ jsx43(Text36, { children: " " }),
26523
26508
  removedComponents.map((rc) => /* @__PURE__ */ jsx43(Text36, { children: removedComponentLine(rc) }, rc.id))
@@ -26526,7 +26511,7 @@ function GenerateReviewStepView({
26526
26511
  breakingChanges.length > 0 && !dialogOpen && /* @__PURE__ */ jsx43(Box33, { paddingX: 1, children: /* @__PURE__ */ jsx43(
26527
26512
  Text36,
26528
26513
  {
26529
- color: PALETTE.warning,
26514
+ color: PALETTE3.warning,
26530
26515
  children: `[b] ${breakingChanges.length} breaking change${breakingChanges.length === 1 ? "" : "s"}`
26531
26516
  }
26532
26517
  ) }),
@@ -26534,10 +26519,10 @@ function GenerateReviewStepView({
26534
26519
  const row = breakingRows[breakingCursor];
26535
26520
  const comp = row ? breakingChanges.find((b) => b.componentName === row.componentName) : void 0;
26536
26521
  if (!comp) return null;
26537
- return /* @__PURE__ */ jsxs34(Box33, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
26538
- /* @__PURE__ */ jsx43(Text36, { bold: true, color: PALETTE.warning, children: `Breaking changes \u2014 ${comp.componentName}` }),
26539
- 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"}` }),
26540
- 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}`)),
26522
+ return /* @__PURE__ */ jsxs34(Box33, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE3.warning, paddingX: 1, children: [
26523
+ /* @__PURE__ */ jsx43(Text36, { bold: true, color: PALETTE3.warning, children: `Breaking changes \u2014 ${comp.componentName}` }),
26524
+ 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"}` }),
26525
+ 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}`)),
26541
26526
  /* @__PURE__ */ jsx43(Text36, { children: "[D/Esc] close detail" })
26542
26527
  ] });
26543
26528
  })(),
@@ -26560,11 +26545,11 @@ function GenerateReviewStepView({
26560
26545
  const participantSet = cycleView.structural;
26561
26546
  const members = stillRejected.filter((n) => participantSet.has(n)).sort();
26562
26547
  const ancestors = stillRejected.filter((n) => !participantSet.has(n)).sort();
26563
- return /* @__PURE__ */ jsxs34(Box33, { flexDirection: "column", borderStyle: "single", borderColor: PALETTE.error, paddingX: 1, children: [
26564
- /* @__PURE__ */ jsx43(Text36, { color: PALETTE.error, bold: true, children: `Cyclic component graph \u2014 auto-rejected ${stillRejected.length} component${stillRejected.length === 1 ? "" : "s"}:` }),
26565
- members.length > 0 && /* @__PURE__ */ jsx43(Text36, { color: PALETTE.error, children: ` Cycle members: ${members.join(", ")}` }),
26566
- ancestors.length > 0 && /* @__PURE__ */ jsx43(Text36, { color: PALETTE.error, children: ` Ancestors: ${ancestors.join(", ")}` }),
26567
- /* @__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" })
26548
+ return /* @__PURE__ */ jsxs34(Box33, { flexDirection: "column", borderStyle: "single", borderColor: PALETTE3.error, paddingX: 1, children: [
26549
+ /* @__PURE__ */ jsx43(Text36, { color: PALETTE3.error, bold: true, children: `Cyclic component graph \u2014 auto-rejected ${stillRejected.length} component${stillRejected.length === 1 ? "" : "s"}:` }),
26550
+ members.length > 0 && /* @__PURE__ */ jsx43(Text36, { color: PALETTE3.error, children: ` Cycle members: ${members.join(", ")}` }),
26551
+ ancestors.length > 0 && /* @__PURE__ */ jsx43(Text36, { color: PALETTE3.error, children: ` Ancestors: ${ancestors.join(", ")}` }),
26552
+ /* @__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" })
26568
26553
  ] });
26569
26554
  })(),
26570
26555
  /* @__PURE__ */ jsx43(ReviewEmptyComponentsWarning, { count: emptyCount, hidden: dialogOpen }),
@@ -26680,7 +26665,7 @@ function GenerateReviewStepView({
26680
26665
  ) : /* @__PURE__ */ jsx43(ReviewNoSelection, {})
26681
26666
  ] }),
26682
26667
  !dialogOpen && cycleRows.length > 0 && !cyclePanel.isOpen && !breakPanel.isOpen && /* @__PURE__ */ jsxs34(Box33, { flexDirection: "column", children: [
26683
- /* @__PURE__ */ jsx43(Text36, { color: PALETTE.warning, children: `\u26A0 ${cycleRows.length} slot dependency cycle${cycleRows.length === 1 ? "" : "s"} detected \u2014 push will fail` }),
26668
+ /* @__PURE__ */ jsx43(Text36, { color: PALETTE3.warning, children: `\u26A0 ${cycleRows.length} slot dependency cycle${cycleRows.length === 1 ? "" : "s"} detected \u2014 push will fail` }),
26684
26669
  cycleRows.slice(0, 3).map((cycle, idx) => {
26685
26670
  return /* @__PURE__ */ jsx43(
26686
26671
  CyclePathLine,
@@ -26693,7 +26678,7 @@ function GenerateReviewStepView({
26693
26678
  `cyc-banner-${idx}`
26694
26679
  );
26695
26680
  }),
26696
- cycleRows.length > 3 && /* @__PURE__ */ jsx43(Text36, { color: PALETTE.warning, children: ` \u2026${cycleRows.length - 3} more` }),
26681
+ cycleRows.length > 3 && /* @__PURE__ */ jsx43(Text36, { color: PALETTE3.warning, children: ` \u2026${cycleRows.length - 3} more` }),
26697
26682
  /* @__PURE__ */ jsx43(Text36, { children: " press [c] for detail" })
26698
26683
  ] }),
26699
26684
  /* @__PURE__ */ jsx43(
@@ -26716,8 +26701,8 @@ import { Box as Box34, Text as Text37 } from "ink";
26716
26701
 
26717
26702
  // packages/experience-design-system-cli/src/tui/import/steps/10-flow/theme.ts
26718
26703
  import { defaultTheme as defaultTheme2, extendTheme as extendTheme2 } from "@inkjs/ui";
26719
- var PALETTE3 = {
26720
- ...PALETTE,
26704
+ var PALETTE4 = {
26705
+ ...PALETTE3,
26721
26706
  link: "#58A6FF"
26722
26707
  };
26723
26708
  var INK_UI_THEME = extendTheme2(defaultTheme2, {
@@ -26736,13 +26721,13 @@ var INK_UI_THEME = extendTheme2(defaultTheme2, {
26736
26721
  import { jsx as jsx44, jsxs as jsxs35 } from "react/jsx-runtime";
26737
26722
  function CustomPromptBanner({ generatePromptPath }) {
26738
26723
  if (!generatePromptPath) return null;
26739
- return /* @__PURE__ */ jsxs35(Box34, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE3.warning, paddingX: 1, children: [
26740
- /* @__PURE__ */ jsx44(Text37, { color: PALETTE3.warning, bold: true, children: "WARNING: Custom prompt active" }),
26741
- generatePromptPath ? /* @__PURE__ */ jsxs35(Text37, { color: PALETTE3.warning, children: [
26724
+ return /* @__PURE__ */ jsxs35(Box34, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE4.warning, paddingX: 1, children: [
26725
+ /* @__PURE__ */ jsx44(Text37, { color: PALETTE4.warning, bold: true, children: "WARNING: Custom prompt active" }),
26726
+ generatePromptPath ? /* @__PURE__ */ jsxs35(Text37, { color: PALETTE4.warning, children: [
26742
26727
  "components: ",
26743
26728
  generatePromptPath
26744
26729
  ] }) : null,
26745
- /* @__PURE__ */ jsx44(Text37, { color: PALETTE3.warning, children: "Bundled invariants (utility-wrapper rejection, description content rules) do NOT apply." })
26730
+ /* @__PURE__ */ jsx44(Text37, { color: PALETTE4.warning, children: "Bundled invariants (utility-wrapper rejection, description content rules) do NOT apply." })
26746
26731
  ] });
26747
26732
  }
26748
26733
 
@@ -26767,10 +26752,10 @@ import { Box as Box35, Text as Text38 } from "ink";
26767
26752
  import { jsx as jsx45, jsxs as jsxs36 } from "react/jsx-runtime";
26768
26753
  function SpaceEnvironment({ spaceId, environmentId }) {
26769
26754
  return /* @__PURE__ */ jsxs36(Box35, { gap: 1, marginTop: 1, children: [
26770
- /* @__PURE__ */ jsx45(Text38, { color: PALETTE3.muted, children: "Space:" }),
26755
+ /* @__PURE__ */ jsx45(Text38, { color: PALETTE4.muted, children: "Space:" }),
26771
26756
  /* @__PURE__ */ jsx45(Text38, { children: spaceId }),
26772
- /* @__PURE__ */ jsx45(Text38, { color: PALETTE3.muted, children: "/" }),
26773
- /* @__PURE__ */ jsx45(Text38, { color: PALETTE3.muted, children: "Environment:" }),
26757
+ /* @__PURE__ */ jsx45(Text38, { color: PALETTE4.muted, children: "/" }),
26758
+ /* @__PURE__ */ jsx45(Text38, { color: PALETTE4.muted, children: "Environment:" }),
26774
26759
  /* @__PURE__ */ jsx45(Text38, { children: environmentId })
26775
26760
  ] });
26776
26761
  }
@@ -26782,13 +26767,13 @@ function EntityRows({ entity, label }) {
26782
26767
  const plural3 = (n) => `${n} ${label}${n !== 1 ? "s" : ""}`;
26783
26768
  return /* @__PURE__ */ jsxs37(Fragment14, { children: [
26784
26769
  ACTIONS.filter((action) => entity[action] > 0).map((action) => /* @__PURE__ */ jsxs37(Text39, { children: [
26785
- /* @__PURE__ */ jsx46(Text39, { color: PALETTE3.success, children: "\u2713" }),
26770
+ /* @__PURE__ */ jsx46(Text39, { color: PALETTE4.success, children: "\u2713" }),
26786
26771
  " ",
26787
26772
  plural3(entity[action]),
26788
26773
  " ",
26789
26774
  action
26790
26775
  ] }, action)),
26791
- entity.failed > 0 && /* @__PURE__ */ jsxs37(Text39, { color: PALETTE3.error, children: [
26776
+ entity.failed > 0 && /* @__PURE__ */ jsxs37(Text39, { color: PALETTE4.error, children: [
26792
26777
  "\u2717 ",
26793
26778
  plural3(entity.failed),
26794
26779
  " failed \u2014 check logs above"
@@ -26797,8 +26782,8 @@ function EntityRows({ entity, label }) {
26797
26782
  }
26798
26783
  function LinkRow({ title, url }) {
26799
26784
  return /* @__PURE__ */ jsxs37(Box36, { flexDirection: "column", children: [
26800
- /* @__PURE__ */ jsx46(Text39, { color: PALETTE3.muted, children: title }),
26801
- /* @__PURE__ */ jsx46(Text39, { color: PALETTE3.link, children: url })
26785
+ /* @__PURE__ */ jsx46(Text39, { color: PALETTE4.muted, children: title }),
26786
+ /* @__PURE__ */ jsx46(Text39, { color: PALETTE4.link, children: url })
26802
26787
  ] });
26803
26788
  }
26804
26789
  function DoneStep({
@@ -26821,17 +26806,17 @@ function DoneStep({
26821
26806
  const success = totalFailed === 0;
26822
26807
  const urlArgs = { host: host ?? "api.contentful.com", spaceId, environmentId };
26823
26808
  return /* @__PURE__ */ jsxs37(Box36, { flexDirection: "column", gap: 1, paddingX: 2, paddingY: 1, children: [
26824
- success ? /* @__PURE__ */ jsx46(Text39, { bold: true, color: PALETTE3.success, children: "Done!" }) : /* @__PURE__ */ jsx46(Text39, { bold: true, color: PALETTE3.warning, children: "\u26A0 Finished with errors" }),
26825
- totalPushed === 0 && totalFailed === 0 && !summary ? /* @__PURE__ */ jsx46(Text39, { color: PALETTE3.muted, children: "Nothing was pushed \u2014 everything was already up to date." }) : /* @__PURE__ */ jsxs37(Box36, { flexDirection: "column", children: [
26809
+ success ? /* @__PURE__ */ jsx46(Text39, { bold: true, color: PALETTE4.success, children: "Done!" }) : /* @__PURE__ */ jsx46(Text39, { bold: true, color: PALETTE4.warning, children: "\u26A0 Finished with errors" }),
26810
+ 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: [
26826
26811
  /* @__PURE__ */ jsx46(EntityRows, { entity: componentTypes, label: "Component Type" }),
26827
26812
  /* @__PURE__ */ jsx46(EntityRows, { entity: designTokens, label: "Design Token" }),
26828
- summary && /* @__PURE__ */ jsx46(Box36, { marginTop: 1, children: /* @__PURE__ */ jsxs37(Text39, { color: PALETTE3.muted, children: [
26813
+ summary && /* @__PURE__ */ jsx46(Box36, { marginTop: 1, children: /* @__PURE__ */ jsxs37(Text39, { color: PALETTE4.muted, children: [
26829
26814
  "Push result: ",
26830
26815
  summary.succeeded,
26831
26816
  "/",
26832
26817
  summary.total,
26833
26818
  " succeeded",
26834
- summary.failed > 0 && /* @__PURE__ */ jsxs37(Text39, { color: PALETTE3.error, children: [
26819
+ summary.failed > 0 && /* @__PURE__ */ jsxs37(Text39, { color: PALETTE4.error, children: [
26835
26820
  ", ",
26836
26821
  summary.failed,
26837
26822
  " failed"
@@ -26839,8 +26824,8 @@ function DoneStep({
26839
26824
  ] }) })
26840
26825
  ] }),
26841
26826
  failures.length > 0 && /* @__PURE__ */ jsxs37(Box36, { flexDirection: "column", children: [
26842
- /* @__PURE__ */ jsx46(Text39, { bold: true, color: PALETTE3.error, children: "Failure details" }),
26843
- failures.map((failure) => /* @__PURE__ */ jsxs37(Text39, { color: PALETTE3.error, children: [
26827
+ /* @__PURE__ */ jsx46(Text39, { bold: true, color: PALETTE4.error, children: "Failure details" }),
26828
+ failures.map((failure) => /* @__PURE__ */ jsxs37(Text39, { color: PALETTE4.error, children: [
26844
26829
  failure.entityType,
26845
26830
  " ",
26846
26831
  failure.entityId,
@@ -26850,7 +26835,7 @@ function DoneStep({
26850
26835
  ] }),
26851
26836
  /* @__PURE__ */ jsx46(SpaceEnvironment, { spaceId, environmentId }),
26852
26837
  success && totalPushed > 0 && /* @__PURE__ */ jsxs37(Box36, { flexDirection: "column", gap: 1, children: [
26853
- /* @__PURE__ */ jsx46(Text39, { color: PALETTE3.success, children: "Your design system is now in Contentful Experiences." }),
26838
+ /* @__PURE__ */ jsx46(Text39, { color: PALETTE4.success, children: "Your design system is now in Contentful Experiences." }),
26854
26839
  /* @__PURE__ */ jsx46(LinkRow, { title: "View your components here:", url: buildPostPushUrl2(urlArgs) }),
26855
26840
  /* @__PURE__ */ jsx46(
26856
26841
  LinkRow,
@@ -26964,7 +26949,7 @@ function PathPrompt({
26964
26949
  label,
26965
26950
  ":"
26966
26951
  ] }),
26967
- /* @__PURE__ */ jsx47(Text40, { color: isPlaceholder ? PALETTE3.muted : void 0, children: shown }),
26952
+ /* @__PURE__ */ jsx47(Text40, { color: isPlaceholder ? PALETTE4.muted : void 0, children: shown }),
26968
26953
  /* @__PURE__ */ jsx47(Text40, { children: cursor })
26969
26954
  ] }),
26970
26955
  /* @__PURE__ */ jsxs38(Box37, { gap: 3, children: [
@@ -27030,12 +27015,12 @@ function PushingStep({ stepNumber, totalSteps, progress }) {
27030
27015
  /* @__PURE__ */ jsx50(StepHeader, { stepNumber, totalSteps, title: "Push to Contentful" }),
27031
27016
  /* @__PURE__ */ jsx50(Text42, { children: "Writing component types and design tokens to your Contentful space..." }),
27032
27017
  operationId && /* @__PURE__ */ jsxs40(Box39, { gap: 1, children: [
27033
- /* @__PURE__ */ jsx50(Text42, { color: PALETTE3.muted, children: "Operation:" }),
27018
+ /* @__PURE__ */ jsx50(Text42, { color: PALETTE4.muted, children: "Operation:" }),
27034
27019
  /* @__PURE__ */ jsx50(Text42, { children: operationId })
27035
27020
  ] }),
27036
27021
  showGlobal && progress && progress.kind === "progress" && /* @__PURE__ */ jsx50(Box39, { gap: 1, flexDirection: "column", children: /* @__PURE__ */ jsxs40(Box39, { gap: 2, children: [
27037
27022
  /* @__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) }) }) }),
27038
- /* @__PURE__ */ jsxs40(Text42, { color: PALETTE3.muted, children: [
27023
+ /* @__PURE__ */ jsxs40(Text42, { color: PALETTE4.muted, children: [
27039
27024
  progress.processed,
27040
27025
  "/",
27041
27026
  progress.total,
@@ -27043,10 +27028,10 @@ function PushingStep({ stepNumber, totalSteps, progress }) {
27043
27028
  ] })
27044
27029
  ] }) }),
27045
27030
  showCurrent && /* @__PURE__ */ jsxs40(Box39, { gap: 1, children: [
27046
- /* @__PURE__ */ jsx50(Text42, { color: PALETTE3.muted, children: "Now processing:" }),
27031
+ /* @__PURE__ */ jsx50(Text42, { color: PALETTE4.muted, children: "Now processing:" }),
27047
27032
  /* @__PURE__ */ jsx50(Text42, { children: showCurrent })
27048
27033
  ] }),
27049
- /* @__PURE__ */ jsx50(Box39, { marginTop: 1, children: /* @__PURE__ */ jsxs40(Text42, { color: PALETTE3.muted, children: [
27034
+ /* @__PURE__ */ jsx50(Box39, { marginTop: 1, children: /* @__PURE__ */ jsxs40(Text42, { color: PALETTE4.muted, children: [
27050
27035
  "Elapsed: ",
27051
27036
  elapsed
27052
27037
  ] }) })
@@ -27236,25 +27221,25 @@ function buildPreviewSummaryLines(preview) {
27236
27221
  if (components.new.length > 0) {
27237
27222
  lines.push({
27238
27223
  key: "summary-components-new",
27239
- color: PALETTE3.success,
27224
+ color: PALETTE4.success,
27240
27225
  text: ` \uFF0B ${components.new.length} components will be created`
27241
27226
  });
27242
27227
  for (const [index, item] of components.new.entries()) {
27243
27228
  const name = item.key ?? item.$name ?? "unknown";
27244
- lines.push({ key: `summary-components-new-${index}`, color: PALETTE3.success, text: ` + ${name}` });
27229
+ lines.push({ key: `summary-components-new-${index}`, color: PALETTE4.success, text: ` + ${name}` });
27245
27230
  }
27246
27231
  }
27247
27232
  if (components.changed.length > 0) {
27248
27233
  lines.push({
27249
27234
  key: "summary-components-changed",
27250
- color: PALETTE3.warning,
27235
+ color: PALETTE4.warning,
27251
27236
  text: ` \uFF5E ${components.changed.length} components will be updated`
27252
27237
  });
27253
27238
  for (const [index, item] of components.changed.entries()) {
27254
27239
  const isBreaking = item.changeClassification?.classification === "breaking";
27255
27240
  lines.push({
27256
27241
  key: `summary-components-changed-${index}`,
27257
- color: isBreaking ? PALETTE3.error : PALETTE3.warning,
27242
+ color: isBreaking ? PALETTE4.error : PALETTE4.warning,
27258
27243
  text: ` ${isBreaking ? "\u26A0" : "~"} ${item.current.name}`
27259
27244
  });
27260
27245
  }
@@ -27262,11 +27247,11 @@ function buildPreviewSummaryLines(preview) {
27262
27247
  if (components.removed.length > 0) {
27263
27248
  lines.push({
27264
27249
  key: "summary-components-removed",
27265
- color: PALETTE3.warning,
27250
+ color: PALETTE4.warning,
27266
27251
  text: ` \u2298 ${components.removed.length} components will be skipped`
27267
27252
  });
27268
27253
  for (const [index, item] of components.removed.entries()) {
27269
- lines.push({ key: `summary-components-removed-${index}`, color: PALETTE3.warning, text: ` \u2298 ${item.name}` });
27254
+ lines.push({ key: `summary-components-removed-${index}`, color: PALETTE4.warning, text: ` \u2298 ${item.name}` });
27270
27255
  }
27271
27256
  }
27272
27257
  if (components.unchanged.length > 0) {
@@ -27279,21 +27264,21 @@ function buildPreviewSummaryLines(preview) {
27279
27264
  if (tokens.new.length > 0) {
27280
27265
  lines.push({
27281
27266
  key: "summary-tokens-new",
27282
- color: PALETTE3.success,
27267
+ color: PALETTE4.success,
27283
27268
  text: ` \uFF0B ${tokens.new.length} design tokens will be created`
27284
27269
  });
27285
27270
  }
27286
27271
  if (tokens.changed.length > 0) {
27287
27272
  lines.push({
27288
27273
  key: "summary-tokens-changed",
27289
- color: PALETTE3.warning,
27274
+ color: PALETTE4.warning,
27290
27275
  text: ` \uFF5E ${tokens.changed.length} design tokens will be updated`
27291
27276
  });
27292
27277
  }
27293
27278
  if (tokens.removed.length > 0) {
27294
27279
  lines.push({
27295
27280
  key: "summary-tokens-removed",
27296
- color: PALETTE3.warning,
27281
+ color: PALETTE4.warning,
27297
27282
  text: ` \u2298 ${tokens.removed.length} design tokens will be skipped`
27298
27283
  });
27299
27284
  }
@@ -27337,12 +27322,12 @@ function getPreviewScrollOffset(input, downArrow, upArrow, diffExpanded, current
27337
27322
  function appendChangedPreviewLine(lines, keyPrefix, name, hasPendingDraftChanges, changeClassification) {
27338
27323
  lines.push({
27339
27324
  key: `${keyPrefix}-h-${name}`,
27340
- color: PALETTE3.warning,
27325
+ color: PALETTE4.warning,
27341
27326
  text: ` ~ ${name}${hasPendingDraftChanges ? " \u26A1 has pending draft changes" : ""}`
27342
27327
  });
27343
27328
  if (changeClassification?.classification !== "breaking") return;
27344
27329
  const reasons = changeClassification.breakingChanges.map((bc) => `${"slotId" in bc ? bc.slotId : bc.propertyId}: ${bc.reason}`).join(", ");
27345
- lines.push({ key: `${keyPrefix}-b-${name}`, color: PALETTE3.error, text: ` \u26A0 BREAKING: ${reasons}` });
27330
+ lines.push({ key: `${keyPrefix}-b-${name}`, color: PALETTE4.error, text: ` \u26A0 BREAKING: ${reasons}` });
27346
27331
  }
27347
27332
  function buildPreviewDiffLines(preview) {
27348
27333
  const lines = [];
@@ -27350,12 +27335,12 @@ function buildPreviewDiffLines(preview) {
27350
27335
  for (const item of components.new) {
27351
27336
  const raw = item;
27352
27337
  const name = raw.key ?? raw.$name ?? "unknown";
27353
- lines.push({ key: `comp-new-${name}`, color: PALETTE3.success, text: ` + ${name}` });
27338
+ lines.push({ key: `comp-new-${name}`, color: PALETTE4.success, text: ` + ${name}` });
27354
27339
  const slots = raw.$slots ?? {};
27355
27340
  for (const slotName of Object.keys(slots).sort()) {
27356
27341
  lines.push({
27357
27342
  key: `comp-new-${name}-slot-${slotName}`,
27358
- color: PALETTE3.success,
27343
+ color: PALETTE4.success,
27359
27344
  text: ` slot: ${slotName}`
27360
27345
  });
27361
27346
  const allowed = slots[slotName]?.["$allowedComponents"];
@@ -27363,14 +27348,14 @@ function buildPreviewDiffLines(preview) {
27363
27348
  const names = allowed.filter((n) => typeof n === "string");
27364
27349
  lines.push({
27365
27350
  key: `comp-new-${name}-slot-${slotName}-allow`,
27366
- color: PALETTE3.success,
27351
+ color: PALETTE4.success,
27367
27352
  text: ` allowedComponents: [${names.join(", ")}]`
27368
27353
  });
27369
27354
  }
27370
27355
  }
27371
27356
  }
27372
27357
  for (const item of components.removed) {
27373
- lines.push({ key: `comp-rm-${item.name}`, color: PALETTE3.error, text: ` - ${item.name}` });
27358
+ lines.push({ key: `comp-rm-${item.name}`, color: PALETTE4.error, text: ` - ${item.name}` });
27374
27359
  }
27375
27360
  for (const item of components.changed) {
27376
27361
  appendChangedPreviewLine(lines, "comp", item.current.name, item.hasPendingDraftChanges, item.changeClassification);
@@ -27401,10 +27386,10 @@ function buildPreviewDiffLines(preview) {
27401
27386
  for (const item of tokens.new) {
27402
27387
  const raw = item;
27403
27388
  const name = raw.name ?? raw.path ?? "unknown";
27404
- lines.push({ key: `tok-new-${name}`, color: PALETTE3.success, text: ` + ${name}` });
27389
+ lines.push({ key: `tok-new-${name}`, color: PALETTE4.success, text: ` + ${name}` });
27405
27390
  }
27406
27391
  for (const item of tokens.removed) {
27407
- lines.push({ key: `tok-rm-${item.name}`, color: PALETTE3.error, text: ` - ${item.name}` });
27392
+ lines.push({ key: `tok-rm-${item.name}`, color: PALETTE4.error, text: ` - ${item.name}` });
27408
27393
  }
27409
27394
  for (const item of tokens.changed) {
27410
27395
  const tokenName = item.current.name;
@@ -27495,13 +27480,13 @@ function WizardPreviewStep({
27495
27480
  title: diffExpanded ? `Diff (${diffLines.length} lines)` : "",
27496
27481
  focused: false,
27497
27482
  children: [
27498
- activeLines.slice(boundedScrollOffset, boundedScrollOffset + viewportHeight).map((line) => /* @__PURE__ */ jsx51(Text43, { color: line.color === "gray" ? PALETTE3.muted : line.color, wrap: "truncate-end", children: line.text }, line.key)),
27499
- /* @__PURE__ */ jsx51(Text43, { color: PALETTE3.muted, wrap: "truncate-end", children: formatPreviewScrollIndicator(activeLines.length, boundedScrollOffset, viewportHeight) })
27483
+ 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)),
27484
+ /* @__PURE__ */ jsx51(Text43, { color: PALETTE4.muted, wrap: "truncate-end", children: formatPreviewScrollIndicator(activeLines.length, boundedScrollOffset, viewportHeight) })
27500
27485
  ]
27501
27486
  }
27502
27487
  )
27503
- ] }) : /* @__PURE__ */ jsx51(Text43, { color: PALETTE3.muted, children: "Nothing to push \u2014 everything is already up to date." }),
27504
- breakingWithImpact && /* @__PURE__ */ jsx51(Box40, { marginTop: 1, children: /* @__PURE__ */ jsx51(Text43, { color: PALETTE3.error, bold: true, children: "\u26A0 Breaking changes will affect downstream entities. Press Enter to acknowledge and apply." }) }),
27488
+ ] }) : /* @__PURE__ */ jsx51(Text43, { color: PALETTE4.muted, children: "Nothing to push \u2014 everything is already up to date." }),
27489
+ 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." }) }),
27505
27490
  /* @__PURE__ */ jsx51(SpaceEnvironment, { spaceId, environmentId }),
27506
27491
  /* @__PURE__ */ jsxs41(Box40, { gap: 3, marginTop: 1, children: [
27507
27492
  /* @__PURE__ */ jsx51(Text43, { children: "[Enter] Push to Contentful" }),
@@ -28047,7 +28032,7 @@ var realSaveDeps = () => ({
28047
28032
  writeFile: (path5, contents) => writeFile7(path5, contents),
28048
28033
  appendRun,
28049
28034
  buildSourceFingerprint,
28050
- sleep: (ms) => new Promise((resolve27) => setTimeout(resolve27, ms)),
28035
+ sleep: (ms) => new Promise((resolve28) => setTimeout(resolve28, ms)),
28051
28036
  warn: (message) => process.stderr.write(message)
28052
28037
  });
28053
28038
  async function runPrintFiles(input, deps, onPatch) {
@@ -28437,12 +28422,44 @@ init_config();
28437
28422
  init_debug_store();
28438
28423
  init_debug_mode_store();
28439
28424
  init_version();
28425
+
28426
+ // packages/experience-design-system-cli/src/tui/help/file-locations.ts
28427
+ import { join as join25, resolve as resolve27 } from "node:path";
28428
+ function describeFileLocations({
28429
+ contentfulBaseDir,
28430
+ debugModeEnabled,
28431
+ currentSessionDir: currentSessionDir2
28432
+ }) {
28433
+ if (!debugModeEnabled) {
28434
+ return {
28435
+ debugLogs: "none while Debug Mode is off",
28436
+ importFiles: `${join25("<project>", ".contentful")}/ (tokens.json, components.json)`
28437
+ };
28438
+ }
28439
+ const base = contentfulBaseDir ? resolve27(contentfulBaseDir) : "<project>";
28440
+ const session = currentSessionDir2 ?? join25(base, ".contentful", "<date>-session-<n>");
28441
+ return {
28442
+ debugLogs: join25(session, "debug"),
28443
+ importFiles: `${join25(session, "dsi-import-<n>")}/ (tokens.json, components.json)`
28444
+ };
28445
+ }
28446
+
28447
+ // packages/experience-design-system-cli/src/tui/help/help-info.ts
28440
28448
  async function readHelpInfo() {
28441
- const debugMode = await readDebugModeSetting();
28449
+ const [debugMode, settings] = await Promise.all([readDebugModeSetting(), readSettings2()]);
28450
+ const base = settings["contentfulBaseDir"];
28451
+ const locations = describeFileLocations({
28452
+ contentfulBaseDir: typeof base === "string" ? base : "",
28453
+ debugModeEnabled: debugMode.enabled,
28454
+ currentSessionDir: currentSessionDir()
28455
+ });
28442
28456
  return {
28443
28457
  storage: [
28444
28458
  { label: "Config folder", value: configRoot2() },
28445
- { label: "Settings file", value: configFilePath2() }
28459
+ { label: "Settings file", value: configFilePath2() },
28460
+ { label: "Agent settings", value: `${configFilePath2()} (keys: agent, agentModel, agents)` },
28461
+ { label: "Debug logs", value: locations.debugLogs },
28462
+ { label: "Import files", value: locations.importFiles }
28446
28463
  ],
28447
28464
  troubleshooting: [
28448
28465
  { label: "CLI version", value: readPackageVersion() },
@@ -28463,7 +28480,7 @@ function Section({ title, rows }) {
28463
28480
  return /* @__PURE__ */ jsxs43(Box42, { flexDirection: "column", children: [
28464
28481
  /* @__PURE__ */ jsx53(Text44, { bold: true, color: PALETTE.accent, children: title }),
28465
28482
  rows.map((row) => /* @__PURE__ */ jsxs43(Box42, { gap: 1, children: [
28466
- /* @__PURE__ */ jsx53(Box42, { width: 14, flexShrink: 0, children: /* @__PURE__ */ jsx53(Text44, { color: PALETTE.muted, children: row.label }) }),
28483
+ /* @__PURE__ */ jsx53(Box42, { width: 16, flexShrink: 0, children: /* @__PURE__ */ jsx53(Text44, { color: PALETTE.muted, children: row.label }) }),
28467
28484
  /* @__PURE__ */ jsx53(Text44, { children: row.value })
28468
28485
  ] }, row.label))
28469
28486
  ] });
@@ -28563,15 +28580,586 @@ function SettingsScreen({
28563
28580
  }
28564
28581
 
28565
28582
  // packages/experience-design-system-cli/src/tui/settings/contentful-configuration/ContentfulConfigScreen.tsx
28566
- import { useEffect as useEffect22, useState as useState29 } from "react";
28583
+ import { useState as useState32 } from "react";
28584
+ import { Box as Box48, Text as Text50, useInput as useInput13 } from "ink";
28585
+
28586
+ // packages/experience-design-system-cli/src/tui/settings/agents/AgentScreens.tsx
28587
+ import { useEffect as useEffect22, useState as useState30 } from "react";
28588
+ import { Box as Box46, Text as Text48, useInput as useInput12 } from "ink";
28589
+ init_debug_store();
28590
+
28591
+ // packages/experience-design-system-cli/src/tui/settings/shared/FieldForm.tsx
28592
+ import { useState as useState29 } from "react";
28567
28593
  import { Box as Box44, Text as Text46, useInput as useInput11 } from "ink";
28568
28594
  import TextInput4 from "ink-text-input";
28595
+ import { Fragment as Fragment17, jsx as jsx55, jsxs as jsxs45 } from "react/jsx-runtime";
28596
+ function FieldForm({
28597
+ title,
28598
+ subtitle,
28599
+ fields,
28600
+ values,
28601
+ onChange,
28602
+ onSave,
28603
+ onQuit,
28604
+ notice,
28605
+ busy = false,
28606
+ footer,
28607
+ actions = []
28608
+ }) {
28609
+ const [active, setActive] = useState29(0);
28610
+ const [editing, setEditing] = useState29(false);
28611
+ const [valueBeforeEdit, setValueBeforeEdit] = useState29("");
28612
+ const labelWidth = Math.max(...fields.map((field) => field.label.length));
28613
+ const current = fields[active];
28614
+ useInput11((input, key) => {
28615
+ if (busy) return;
28616
+ if (editing) {
28617
+ if (key.escape) {
28618
+ onChange(current.key, valueBeforeEdit);
28619
+ setEditing(false);
28620
+ }
28621
+ return;
28622
+ }
28623
+ if (key.escape || input === "q") {
28624
+ onQuit();
28625
+ return;
28626
+ }
28627
+ if (input === "s") {
28628
+ onSave();
28629
+ return;
28630
+ }
28631
+ if (input === "c") {
28632
+ onChange(current.key, "");
28633
+ return;
28634
+ }
28635
+ const action = actions.find((candidate) => candidate.key === input);
28636
+ if (action) {
28637
+ action.run();
28638
+ return;
28639
+ }
28640
+ if (key.tab || key.downArrow) {
28641
+ setActive((i) => (i + 1) % fields.length);
28642
+ return;
28643
+ }
28644
+ if (key.upArrow) {
28645
+ setActive((i) => (i - 1 + fields.length) % fields.length);
28646
+ return;
28647
+ }
28648
+ if (key.return) {
28649
+ setValueBeforeEdit(values[current.key]);
28650
+ setEditing(true);
28651
+ }
28652
+ });
28653
+ return /* @__PURE__ */ jsxs45(Box44, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
28654
+ /* @__PURE__ */ jsx55(Text46, { bold: true, children: title }),
28655
+ subtitle && /* @__PURE__ */ jsx55(Text46, { color: PALETTE.muted, children: subtitle }),
28656
+ /* @__PURE__ */ jsx55(Text46, { children: " " }),
28657
+ /* @__PURE__ */ jsx55(Box44, { flexDirection: "column", children: fields.map((field, index) => {
28658
+ const isActive = index === active;
28659
+ const value = values[field.key];
28660
+ const display = field.masked ? "\u2022".repeat(value.length) : value;
28661
+ return /* @__PURE__ */ jsxs45(Box44, { gap: 1, children: [
28662
+ /* @__PURE__ */ jsx55(Text46, { color: isActive ? PALETTE.accent : void 0, children: isActive ? "\u276F" : " " }),
28663
+ /* @__PURE__ */ jsx55(Box44, { width: labelWidth, flexShrink: 0, children: /* @__PURE__ */ jsx55(Text46, { bold: isActive, color: isActive ? PALETTE.accent : PALETTE.muted, children: field.label }) }),
28664
+ isActive && editing ? /* @__PURE__ */ jsx55(
28665
+ TextInput4,
28666
+ {
28667
+ value,
28668
+ onChange: (next) => onChange(field.key, next),
28669
+ onSubmit: () => setEditing(false),
28670
+ mask: field.masked ? "\u2022" : void 0
28671
+ }
28672
+ ) : /* @__PURE__ */ jsx55(Text46, { bold: !!display, children: display || (field.hint ? "" : /* @__PURE__ */ jsx55(Text46, { color: PALETTE.muted, children: "(empty)" })) }),
28673
+ field.hint && /* @__PURE__ */ jsx55(Text46, { color: PALETTE.muted, children: field.hint })
28674
+ ] }, field.key);
28675
+ }) }),
28676
+ notice && /* @__PURE__ */ jsxs45(Fragment17, { children: [
28677
+ /* @__PURE__ */ jsx55(Text46, { children: " " }),
28678
+ /* @__PURE__ */ jsxs45(Text46, { color: notice.kind === "success" ? PALETTE.success : PALETTE.error, children: [
28679
+ notice.kind === "success" ? "\u2713" : "\u2717",
28680
+ " ",
28681
+ notice.text
28682
+ ] })
28683
+ ] }),
28684
+ footer,
28685
+ /* @__PURE__ */ jsx55(Text46, { children: " " }),
28686
+ /* @__PURE__ */ jsx55(
28687
+ ControlHints,
28688
+ {
28689
+ hints: editing ? [
28690
+ { keys: "type", label: "edit" },
28691
+ { keys: "\u2190/\u2192", label: "move cursor" },
28692
+ { keys: "\u23CE", label: "done" },
28693
+ { keys: "Esc", label: "cancel edit" }
28694
+ ] : [
28695
+ { keys: "\u2191/\u2193", label: "move" },
28696
+ { keys: "\u23CE", label: "edit" },
28697
+ { keys: "c", label: "clear" },
28698
+ { keys: "s", label: "save" },
28699
+ ...actions.map(({ key, label }) => ({ keys: key, label })),
28700
+ { keys: "Esc/q", label: "back without saving" }
28701
+ ]
28702
+ }
28703
+ )
28704
+ ] });
28705
+ }
28569
28706
 
28570
28707
  // packages/experience-design-system-cli/src/tui/settings/utils/v1-store.ts
28571
28708
  init_config();
28572
28709
  var readV1Store = readSettings2;
28573
28710
  var writeV1Store = writeSettings2;
28574
28711
 
28712
+ // packages/experience-design-system-cli/src/tui/settings/agents/agent-store.ts
28713
+ var DEFAULT_AGENT3 = "claude";
28714
+ var AGENT_LABELS = {
28715
+ claude: "Claude Code",
28716
+ codex: "OpenAI Codex",
28717
+ opencode: "OpenCode",
28718
+ cursor: "Cursor",
28719
+ copilot: "GitHub Copilot"
28720
+ };
28721
+ var AGENT_HINTS = {
28722
+ claude: "claude",
28723
+ codex: "codex",
28724
+ opencode: "opencode",
28725
+ cursor: "cursor-agent",
28726
+ copilot: "copilot"
28727
+ };
28728
+ var asString = (value) => typeof value === "string" ? value : "";
28729
+ function emptyAgents() {
28730
+ return Object.fromEntries(AGENT_NAMES.map((name) => [name, { model: "", binary: "" }]));
28731
+ }
28732
+ async function readAgentConfig() {
28733
+ const store = await readV1Store();
28734
+ const stored = asString(store["agent"]);
28735
+ const defaultAgent = isAgentName(stored) ? stored : DEFAULT_AGENT3;
28736
+ const agents = emptyAgents();
28737
+ const saved = store["agents"];
28738
+ if (saved && typeof saved === "object") {
28739
+ for (const name of AGENT_NAMES) {
28740
+ const entry = saved[name];
28741
+ if (entry && typeof entry === "object") {
28742
+ const fields = entry;
28743
+ agents[name] = { model: asString(fields["model"]), binary: asString(fields["binary"]) };
28744
+ }
28745
+ }
28746
+ }
28747
+ const legacyModel = asString(store["agentModel"]);
28748
+ if (legacyModel && !agents[defaultAgent].model)
28749
+ agents[defaultAgent] = { ...agents[defaultAgent], model: legacyModel };
28750
+ return { defaultAgent, agents };
28751
+ }
28752
+ async function writeAgentConfig(config) {
28753
+ const existing = await readV1Store();
28754
+ const merged = { ...existing };
28755
+ const agents = {};
28756
+ for (const name of AGENT_NAMES) {
28757
+ const model = config.agents[name].model.trim();
28758
+ const binary = config.agents[name].binary.trim();
28759
+ if (model || binary) agents[name] = { ...model ? { model } : {}, ...binary ? { binary } : {} };
28760
+ }
28761
+ merged["agent"] = config.defaultAgent;
28762
+ const defaultModel = agents[config.defaultAgent]?.model;
28763
+ if (defaultModel) merged["agentModel"] = defaultModel;
28764
+ else delete merged["agentModel"];
28765
+ if (Object.keys(agents).length > 0) merged["agents"] = agents;
28766
+ else delete merged["agents"];
28767
+ await writeV1Store(merged);
28768
+ }
28769
+
28770
+ // packages/experience-design-system-cli/src/tui/settings/agents/agent-status.ts
28771
+ import { execFile as execFile2 } from "node:child_process";
28772
+ import { access as access6, constants } from "node:fs/promises";
28773
+ var VERSION_TIMEOUT_MS = 5e3;
28774
+ var PROMPT_TIMEOUT_MS = 6e4;
28775
+ var TEST_PROMPT = "Reply with the single word: ok";
28776
+ var INSTALL_HINTS = {
28777
+ claude: "npm install -g @anthropic-ai/claude-code",
28778
+ codex: "npm install -g @openai/codex",
28779
+ opencode: "npm install -g opencode-ai",
28780
+ cursor: "install Cursor\u2019s `cursor-agent` command",
28781
+ copilot: "npm install -g @github/copilot"
28782
+ };
28783
+ var LOGIN_HINTS = {
28784
+ claude: "run `claude login`",
28785
+ codex: "set OPENAI_API_KEY, or sign in with a ChatGPT account",
28786
+ opencode: "run `opencode auth`",
28787
+ cursor: "sign in from Cursor",
28788
+ copilot: "run `copilot` and sign in"
28789
+ };
28790
+ function effectiveBinary(name, savedBinary) {
28791
+ return savedBinary.trim() || AGENT_BINARIES[name];
28792
+ }
28793
+ function defaultModelLabel(name) {
28794
+ const model = DEFAULT_MODELS[name];
28795
+ return model && model !== "Auto" ? model : "chosen by the agent";
28796
+ }
28797
+ var fail3 = (step, detail) => ({ step, ok: false, detail });
28798
+ var pass = (step, detail) => ({ step, ok: true, detail });
28799
+ function resolveOnPath(binary) {
28800
+ if (binary.includes("/")) {
28801
+ return access6(binary, constants.X_OK).then(
28802
+ () => binary,
28803
+ () => null
28804
+ );
28805
+ }
28806
+ return new Promise((resolve28) => {
28807
+ execFile2(
28808
+ process.platform === "win32" ? "where" : "which",
28809
+ [binary],
28810
+ (error, stdout) => resolve28(error ? null : stdout.split("\n")[0]?.trim() ?? null)
28811
+ );
28812
+ });
28813
+ }
28814
+ function readVersion(binary) {
28815
+ return new Promise((resolve28) => {
28816
+ execFile2(binary, ["--version"], { timeout: VERSION_TIMEOUT_MS }, (error, stdout) => {
28817
+ const line = stdout.split("\n")[0]?.trim() ?? "";
28818
+ if (!error && line) resolve28(pass("version", line));
28819
+ else resolve28(fail3("version", "runs, but did not report a version"));
28820
+ });
28821
+ });
28822
+ }
28823
+ async function inspectAgent(name, binary) {
28824
+ const target = effectiveBinary(name, binary);
28825
+ const found = await resolveOnPath(target);
28826
+ if (!found) return [fail3("path", `\`${target}\` was not found or is not executable`)];
28827
+ const checks = [pass("path", found)];
28828
+ checks.push(await readVersion(found));
28829
+ if (name === "claude") {
28830
+ const auth = await withBinaryEnv(name, found, () => checkAgentAuth(name));
28831
+ checks.push(
28832
+ auth === "ok" ? pass("login", "logged in") : fail3("login", auth === "not-found" ? "binary not found" : `not logged in: ${LOGIN_HINTS.claude}`)
28833
+ );
28834
+ }
28835
+ return checks;
28836
+ }
28837
+ async function testAgent(name, binary, model) {
28838
+ const checks = await inspectAgent(name, binary);
28839
+ if (!checks.every((check) => check.step === "version" || check.ok)) return checks;
28840
+ const target = effectiveBinary(name, binary);
28841
+ const found = await resolveOnPath(target) ?? target;
28842
+ const started = Date.now();
28843
+ const result = await withBinaryEnv(
28844
+ name,
28845
+ found,
28846
+ () => createLocalCliAgentInvoker().invoke({
28847
+ agent: name,
28848
+ ...model.trim() ? { model: model.trim() } : {},
28849
+ prompt: TEST_PROMPT,
28850
+ timeoutMs: PROMPT_TIMEOUT_MS
28851
+ })
28852
+ );
28853
+ const seconds = ((Date.now() - started) / 1e3).toFixed(1);
28854
+ if (result.timedOut) return [...checks, fail3("prompt", `no answer within ${PROMPT_TIMEOUT_MS / 1e3}s`)];
28855
+ if (result.exitCode !== 0) {
28856
+ const reason = result.stderr.trim().split("\n").pop()?.slice(0, 160) || `exited with code ${result.exitCode}`;
28857
+ return [...checks, fail3("prompt", reason)];
28858
+ }
28859
+ return [...checks, pass("prompt", `answered in ${seconds}s`)];
28860
+ }
28861
+ function statusFromChecks(name, checks) {
28862
+ if (checks.length === 0) return "checking";
28863
+ if (checks.some((check) => check.step === "path" && !check.ok)) return "not-found";
28864
+ const login = checks.find((check) => check.step === "login");
28865
+ if (login) return login.ok ? "ready" : "not-logged-in";
28866
+ const prompt = checks.find((check) => check.step === "prompt");
28867
+ if (prompt) return prompt.ok ? "ready" : "not-logged-in";
28868
+ return name === "claude" ? "ready" : "unknown";
28869
+ }
28870
+ function nextStepHint(name, status) {
28871
+ if (status === "not-found") return INSTALL_HINTS[name];
28872
+ if (status === "not-logged-in") return LOGIN_HINTS[name];
28873
+ if (status === "unknown") return "run a full test to confirm it is logged in";
28874
+ return "";
28875
+ }
28876
+ async function withBinaryEnv(name, binary, run) {
28877
+ const key = `EDS_AGENT_BINARY_${name.toUpperCase()}`;
28878
+ const previous = process.env[key];
28879
+ process.env[key] = binary;
28880
+ try {
28881
+ return await run();
28882
+ } finally {
28883
+ if (previous === void 0) delete process.env[key];
28884
+ else process.env[key] = previous;
28885
+ }
28886
+ }
28887
+
28888
+ // packages/experience-design-system-cli/src/tui/settings/agents/AgentStatusLine.tsx
28889
+ import { Box as Box45, Text as Text47 } from "ink";
28890
+ import { jsx as jsx56, jsxs as jsxs46 } from "react/jsx-runtime";
28891
+ var STATUS_TEXT = {
28892
+ checking: "checking...",
28893
+ ready: "ready",
28894
+ "not-found": "not found",
28895
+ "not-logged-in": "not logged in",
28896
+ unknown: "found, login not checked"
28897
+ };
28898
+ var STATUS_COLOR = {
28899
+ checking: PALETTE.muted,
28900
+ ready: PALETTE.success,
28901
+ "not-found": PALETTE.error,
28902
+ "not-logged-in": PALETTE.error,
28903
+ unknown: PALETTE.muted
28904
+ };
28905
+ function AgentStatusBadge({
28906
+ name,
28907
+ checks
28908
+ }) {
28909
+ const status = checks ? statusFromChecks(name, checks) : "checking";
28910
+ return /* @__PURE__ */ jsx56(Text47, { color: STATUS_COLOR[status], children: STATUS_TEXT[status] });
28911
+ }
28912
+ function AgentChecks({
28913
+ name,
28914
+ checks
28915
+ }) {
28916
+ if (!checks) {
28917
+ return /* @__PURE__ */ jsx56(Box45, { marginTop: 1, children: /* @__PURE__ */ jsx56(Text47, { color: PALETTE.muted, children: "Checking..." }) });
28918
+ }
28919
+ const status = statusFromChecks(name, checks);
28920
+ const hint = nextStepHint(name, status);
28921
+ return /* @__PURE__ */ jsxs46(Box45, { flexDirection: "column", marginTop: 1, children: [
28922
+ /* @__PURE__ */ jsxs46(Text47, { bold: true, children: [
28923
+ "Status: ",
28924
+ /* @__PURE__ */ jsx56(Text47, { color: STATUS_COLOR[status], children: STATUS_TEXT[status] })
28925
+ ] }),
28926
+ checks.map((check) => /* @__PURE__ */ jsxs46(Text47, { color: check.ok ? PALETTE.success : PALETTE.muted, children: [
28927
+ check.ok ? "\u2713" : "\xB7",
28928
+ " ",
28929
+ check.step,
28930
+ ": ",
28931
+ check.detail
28932
+ ] }, check.step)),
28933
+ hint && /* @__PURE__ */ jsxs46(Text47, { color: PALETTE.muted, children: [
28934
+ "Next: ",
28935
+ hint
28936
+ ] })
28937
+ ] });
28938
+ }
28939
+
28940
+ // packages/experience-design-system-cli/src/tui/settings/agents/apply-binary-overrides.ts
28941
+ var shellValues = /* @__PURE__ */ new Map();
28942
+ function applyBinaryOverrides(config) {
28943
+ for (const name of AGENT_NAMES) {
28944
+ const key = `EDS_AGENT_BINARY_${name.toUpperCase()}`;
28945
+ const binary = config.agents[name].binary.trim();
28946
+ if (binary) {
28947
+ if (!shellValues.has(key)) shellValues.set(key, process.env[key]);
28948
+ process.env[key] = binary;
28949
+ } else if (shellValues.has(key)) {
28950
+ const shellValue = shellValues.get(key);
28951
+ if (shellValue === void 0) delete process.env[key];
28952
+ else process.env[key] = shellValue;
28953
+ shellValues.delete(key);
28954
+ }
28955
+ }
28956
+ }
28957
+
28958
+ // packages/experience-design-system-cli/src/tui/settings/agents/AgentScreens.tsx
28959
+ import { Fragment as Fragment18, jsx as jsx57, jsxs as jsxs47 } from "react/jsx-runtime";
28960
+ var agentFields = (name) => [
28961
+ { key: "binary", label: "Command path", hint: `(empty: \`${AGENT_HINTS[name]}\` from the PATH)` },
28962
+ { key: "model", label: "Model", hint: `(empty: ${defaultModelLabel(name)})` }
28963
+ ];
28964
+ var ROWS = [{ kind: "default" }, ...AGENT_NAMES.map((name) => ({ kind: "agent", name }))];
28965
+ function AgentForm({
28966
+ name,
28967
+ config,
28968
+ setConfig,
28969
+ onBack
28970
+ }) {
28971
+ const [saving, setSaving] = useState30(false);
28972
+ const [testing, setTesting] = useState30(false);
28973
+ const [notice, setNotice] = useState30(null);
28974
+ const [checks, setChecks] = useState30(void 0);
28975
+ const settings = config.agents[name];
28976
+ useEffect22(() => {
28977
+ let current = true;
28978
+ setChecks(void 0);
28979
+ void inspectAgent(name, settings.binary).then((result) => current && setChecks(result));
28980
+ return () => {
28981
+ current = false;
28982
+ };
28983
+ }, [name, settings.binary]);
28984
+ const save = () => {
28985
+ setSaving(true);
28986
+ setNotice(null);
28987
+ writeAgentConfig(config).then(() => {
28988
+ applyBinaryOverrides(config);
28989
+ setNotice({ kind: "success", text: `${AGENT_LABELS[name]} settings saved` });
28990
+ }).catch(
28991
+ (err) => setNotice({ kind: "error", text: err instanceof Error ? err.message : "Failed to save" })
28992
+ ).finally(() => setSaving(false));
28993
+ };
28994
+ const runFullTest = () => {
28995
+ setTesting(true);
28996
+ setNotice(null);
28997
+ setChecks(void 0);
28998
+ testAgent(name, settings.binary, settings.model).then(setChecks).catch(
28999
+ (err) => setNotice({ kind: "error", text: err instanceof Error ? err.message : "The test could not run" })
29000
+ ).finally(() => setTesting(false));
29001
+ };
29002
+ return /* @__PURE__ */ jsx57(
29003
+ FieldForm,
29004
+ {
29005
+ title: AGENT_LABELS[name],
29006
+ subtitle: `Runs the \`${AGENT_HINTS[name]}\` command. ${config.defaultAgent === name ? "This is the default agent." : ""}`.trim(),
29007
+ fields: agentFields(name),
29008
+ values: { binary: settings.binary, model: settings.model },
29009
+ onChange: (key, value) => {
29010
+ setConfig({ ...config, agents: { ...config.agents, [name]: { ...settings, [key]: value } } });
29011
+ setNotice(null);
29012
+ },
29013
+ onSave: save,
29014
+ onQuit: onBack,
29015
+ notice,
29016
+ busy: saving || testing,
29017
+ footer: /* @__PURE__ */ jsx57(AgentChecks, { name, checks }),
29018
+ actions: [{ key: "t", label: "full test (uses a few tokens)", run: runFullTest }]
29019
+ }
29020
+ );
29021
+ }
29022
+ function AgentsScreen({ onDone }) {
29023
+ const [config, setConfig] = useState30(null);
29024
+ const [focus, setFocus] = useState30(0);
29025
+ const [open, setOpen] = useState30(null);
29026
+ const [notice, setNotice] = useState30(null);
29027
+ const [checks, setChecks] = useState30({});
29028
+ const inspectAll = (loaded) => {
29029
+ for (const name of AGENT_NAMES) {
29030
+ void inspectAgent(name, loaded.agents[name].binary).then(
29031
+ (result) => setChecks((previous) => ({ ...previous, [name]: result }))
29032
+ );
29033
+ }
29034
+ };
29035
+ useEffect22(() => {
29036
+ void readAgentConfig().then((loaded) => {
29037
+ setConfig(loaded);
29038
+ inspectAll(loaded);
29039
+ startDebugRun({
29040
+ flow: "settings/agents",
29041
+ step: "01-agents",
29042
+ menuOption: "Configuration > Agents",
29043
+ inputs: { default_agent: loaded.defaultAgent }
29044
+ });
29045
+ });
29046
+ }, []);
29047
+ const cycleDefault = (step) => {
29048
+ if (!config) return;
29049
+ const index = AGENT_NAMES.indexOf(config.defaultAgent);
29050
+ const next = { ...config, defaultAgent: AGENT_NAMES[(index + step + AGENT_NAMES.length) % AGENT_NAMES.length] };
29051
+ setConfig(next);
29052
+ writeAgentConfig(next).then(() => setNotice({ kind: "success", text: `Default agent is now ${AGENT_LABELS[next.defaultAgent]}` })).catch(
29053
+ (err) => setNotice({ kind: "error", text: err instanceof Error ? err.message : "Failed to save" })
29054
+ );
29055
+ };
29056
+ useInput12((input, key) => {
29057
+ if (!config || open) return;
29058
+ const row = ROWS[focus];
29059
+ if (key.upArrow) {
29060
+ setFocus((i) => (i - 1 + ROWS.length) % ROWS.length);
29061
+ return;
29062
+ }
29063
+ if (key.downArrow || key.tab) {
29064
+ setFocus((i) => (i + 1) % ROWS.length);
29065
+ return;
29066
+ }
29067
+ if (row.kind === "default" && key.leftArrow) {
29068
+ cycleDefault(-1);
29069
+ return;
29070
+ }
29071
+ if (row.kind === "default" && key.rightArrow) {
29072
+ cycleDefault(1);
29073
+ return;
29074
+ }
29075
+ if (key.return) {
29076
+ if (row.kind === "default") cycleDefault(1);
29077
+ else setOpen(row.name);
29078
+ return;
29079
+ }
29080
+ if (key.escape || input === "q") {
29081
+ void finishDebugRun({ outputs: { default_agent: config.defaultAgent }, status: "success", exitMethod: "saved" });
29082
+ onDone();
29083
+ }
29084
+ });
29085
+ if (!config) {
29086
+ return /* @__PURE__ */ jsxs47(Box46, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
29087
+ /* @__PURE__ */ jsx57(Text48, { bold: true, children: "Agents" }),
29088
+ /* @__PURE__ */ jsx57(Text48, { children: " " }),
29089
+ /* @__PURE__ */ jsx57(Text48, { color: PALETTE.accent, children: "Loading..." })
29090
+ ] });
29091
+ }
29092
+ if (open) {
29093
+ return /* @__PURE__ */ jsx57(
29094
+ AgentForm,
29095
+ {
29096
+ name: open,
29097
+ config,
29098
+ setConfig,
29099
+ onBack: () => {
29100
+ setOpen(null);
29101
+ void readAgentConfig().then((saved) => {
29102
+ setConfig(saved);
29103
+ inspectAll(saved);
29104
+ });
29105
+ }
29106
+ }
29107
+ );
29108
+ }
29109
+ return /* @__PURE__ */ jsxs47(Box46, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
29110
+ /* @__PURE__ */ jsx57(Text48, { bold: true, children: "Agents" }),
29111
+ /* @__PURE__ */ jsx57(Text48, { color: PALETTE.muted, children: "The coding agent the CLI runs, and the settings for each one." }),
29112
+ /* @__PURE__ */ jsx57(Text48, { children: " " }),
29113
+ ROWS.map((row, index) => {
29114
+ const isFocused = index === focus;
29115
+ const pointer = /* @__PURE__ */ jsx57(Text48, { color: isFocused ? PALETTE.accent : void 0, children: isFocused ? "\u276F" : " " });
29116
+ if (row.kind === "default") {
29117
+ return /* @__PURE__ */ jsx57(Box46, { flexDirection: "column", marginBottom: 1, children: /* @__PURE__ */ jsxs47(Box46, { gap: 1, children: [
29118
+ pointer,
29119
+ /* @__PURE__ */ jsx57(Text48, { bold: isFocused, color: isFocused ? PALETTE.accent : PALETTE.muted, children: "Default agent" }),
29120
+ /* @__PURE__ */ jsx57(Text48, { bold: true, children: `\u2039 ${AGENT_LABELS[config.defaultAgent]} \u203A` })
29121
+ ] }) }, "default");
29122
+ }
29123
+ const model = config.agents[row.name].model;
29124
+ return /* @__PURE__ */ jsxs47(Box46, { gap: 1, children: [
29125
+ pointer,
29126
+ /* @__PURE__ */ jsx57(Box46, { width: 16, flexShrink: 0, children: /* @__PURE__ */ jsx57(Text48, { bold: isFocused, color: isFocused ? PALETTE.accent : void 0, children: AGENT_LABELS[row.name] }) }),
29127
+ /* @__PURE__ */ jsx57(Box46, { width: 26, flexShrink: 0, children: /* @__PURE__ */ jsx57(AgentStatusBadge, { name: row.name, checks: checks[row.name] }) }),
29128
+ /* @__PURE__ */ jsx57(Text48, { color: PALETTE.muted, children: `model: ${model || defaultModelLabel(row.name)}` }),
29129
+ row.name === config.defaultAgent && /* @__PURE__ */ jsx57(Text48, { color: PALETTE.success, children: "(default)" })
29130
+ ] }, row.name);
29131
+ }),
29132
+ notice && /* @__PURE__ */ jsxs47(Fragment18, { children: [
29133
+ /* @__PURE__ */ jsx57(Text48, { children: " " }),
29134
+ /* @__PURE__ */ jsxs47(Text48, { color: notice.kind === "success" ? PALETTE.success : PALETTE.error, children: [
29135
+ notice.kind === "success" ? "\u2713" : "\u2717",
29136
+ " ",
29137
+ notice.text
29138
+ ] })
29139
+ ] }),
29140
+ /* @__PURE__ */ jsx57(Text48, { children: " " }),
29141
+ /* @__PURE__ */ jsx57(
29142
+ ControlHints,
29143
+ {
29144
+ hints: ROWS[focus].kind === "default" ? [
29145
+ { keys: "\u2191/\u2193", label: "move" },
29146
+ { keys: "\u2190/\u2192", label: "change default agent" },
29147
+ { keys: "Esc/q", label: "back" }
29148
+ ] : [
29149
+ { keys: "\u2191/\u2193", label: "move" },
29150
+ { keys: "\u23CE", label: "open" },
29151
+ { keys: "Esc/q", label: "back" }
29152
+ ]
29153
+ }
29154
+ )
29155
+ ] });
29156
+ }
29157
+
29158
+ // packages/experience-design-system-cli/src/tui/settings/contentful-configuration/ProjectConfigScreen.tsx
29159
+ import { useEffect as useEffect23, useState as useState31 } from "react";
29160
+ import { Box as Box47, Text as Text49 } from "ink";
29161
+ init_debug_store();
29162
+
28575
29163
  // packages/experience-design-system-cli/src/tui/settings/contentful-configuration/config-store.ts
28576
29164
  async function readCredentials() {
28577
29165
  const store = await readV1Store();
@@ -28597,17 +29185,16 @@ async function writeCredentials(config) {
28597
29185
  await writeV1Store(merged);
28598
29186
  }
28599
29187
 
28600
- // packages/experience-design-system-cli/src/tui/settings/contentful-configuration/ContentfulConfigScreen.tsx
28601
- init_debug_store();
28602
- import { Fragment as Fragment17, jsx as jsx55, jsxs as jsxs45 } from "react/jsx-runtime";
28603
- var FIELD_ORDER = [
28604
- "spaceId",
28605
- "environmentId",
28606
- "cmaToken",
28607
- "host",
28608
- "defaultComponentDir",
28609
- "defaultTokenFile",
28610
- "contentfulBaseDir"
29188
+ // packages/experience-design-system-cli/src/tui/settings/contentful-configuration/ProjectConfigScreen.tsx
29189
+ import { jsx as jsx58, jsxs as jsxs48 } from "react/jsx-runtime";
29190
+ var FIELDS2 = [
29191
+ { key: "spaceId", label: "Space ID" },
29192
+ { key: "environmentId", label: "Environment ID" },
29193
+ { key: "cmaToken", label: "CMA Token", masked: true },
29194
+ { key: "host", label: "API Host" },
29195
+ { key: "defaultComponentDir", label: "Default component directory" },
29196
+ { key: "defaultTokenFile", label: "Default token file" },
29197
+ { key: "contentfulBaseDir", label: "Root Project Directory", hint: "(where .contentful goes)" }
28611
29198
  ];
28612
29199
  function debugFields(config) {
28613
29200
  return {
@@ -28620,156 +29207,114 @@ function debugFields(config) {
28620
29207
  contentful_base_dir: config?.contentfulBaseDir ?? ""
28621
29208
  };
28622
29209
  }
28623
- var FIELD_LABELS = {
28624
- spaceId: "Space ID",
28625
- environmentId: "Environment ID",
28626
- cmaToken: "CMA Token",
28627
- host: "API Host",
28628
- defaultComponentDir: "Default component directory",
28629
- defaultTokenFile: "Default token file",
28630
- contentfulBaseDir: "Root Project Directory"
28631
- };
28632
- var FIELD_HINTS = {
28633
- contentfulBaseDir: "(where .contentful goes)"
28634
- };
28635
- var LABEL_WIDTH = Math.max(...Object.values(FIELD_LABELS).map((label) => label.length));
28636
- function ConfigurationScreen({ onDone }) {
28637
- const [stage, setStage] = useState29("loading");
28638
- const [config, setConfig] = useState29(null);
28639
- const [activeField, setActiveField] = useState29("spaceId");
28640
- const [notice, setNotice] = useState29(null);
28641
- const [lastSaved, setLastSaved] = useState29(null);
28642
- const [editing, setEditing] = useState29(false);
28643
- const [valueBeforeEdit, setValueBeforeEdit] = useState29("");
28644
- useEffect22(() => {
28645
- readCredentials().then((cfg) => {
29210
+ var valuesOf = (config) => Object.fromEntries(FIELDS2.map(({ key }) => [key, config[key] || ""]));
29211
+ function ProjectConfigScreen({ onDone }) {
29212
+ const [config, setConfig] = useState31(null);
29213
+ const [saving, setSaving] = useState31(false);
29214
+ const [notice, setNotice] = useState31(null);
29215
+ const [lastSaved, setLastSaved] = useState31(null);
29216
+ useEffect23(() => {
29217
+ void readCredentials().then((cfg) => {
28646
29218
  setConfig(cfg);
28647
- setStage("form");
28648
29219
  startDebugRun({
28649
29220
  flow: "settings/contentful-configuration",
28650
29221
  step: "01-configuration",
28651
- menuOption: "Configuration",
29222
+ menuOption: "Configuration > Project",
28652
29223
  inputs: debugFields(cfg)
28653
29224
  });
28654
29225
  });
28655
29226
  }, []);
28656
- function fieldValue(field) {
28657
- if (!config) return "";
28658
- return config[field] || "";
28659
- }
28660
- function setFieldValue(field, value) {
28661
- if (!config) return;
28662
- setConfig({ ...config, [field]: value });
28663
- setNotice(null);
29227
+ if (!config) {
29228
+ return /* @__PURE__ */ jsxs48(Box47, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
29229
+ /* @__PURE__ */ jsx58(Text49, { bold: true, children: "Project" }),
29230
+ /* @__PURE__ */ jsx58(Text49, { children: " " }),
29231
+ /* @__PURE__ */ jsx58(Text49, { color: PALETTE.accent, children: "Loading..." })
29232
+ ] });
28664
29233
  }
28665
- function handleSave() {
28666
- if (!config) return;
28667
- setStage("saving");
29234
+ const save = () => {
29235
+ setSaving(true);
28668
29236
  setNotice(null);
28669
29237
  writeCredentials(config).then(() => {
28670
29238
  setLastSaved(config);
28671
29239
  if (config.contentfulBaseDir) void startDebugSessionIn(config.contentfulBaseDir, { replace: true });
28672
- setNotice({ kind: "success", text: "Configuration saved" });
28673
- setStage("form");
29240
+ setNotice({ kind: "success", text: "Project settings saved" });
28674
29241
  }).catch((err) => {
28675
29242
  setNotice({ kind: "error", text: err instanceof Error ? err.message : "Failed to save" });
28676
- setStage("form");
28677
- });
28678
- }
28679
- function quit() {
29243
+ }).finally(() => setSaving(false));
29244
+ };
29245
+ const quit = () => {
28680
29246
  void finishDebugRun(
28681
29247
  lastSaved ? { outputs: debugFields(lastSaved), status: "success", exitMethod: "saved" } : { outputs: {}, status: "success", exitMethod: "discarded" }
28682
29248
  );
28683
29249
  onDone();
28684
- }
28685
- useInput11((input, key) => {
28686
- if (stage === "loading" || stage === "saving") return;
28687
- if (editing) {
28688
- if (key.escape) {
28689
- setFieldValue(activeField, valueBeforeEdit);
28690
- setEditing(false);
28691
- }
28692
- return;
28693
- }
28694
- if (key.escape || input === "q") {
28695
- quit();
28696
- return;
28697
- }
28698
- if (input === "s") {
28699
- handleSave();
28700
- return;
28701
- }
28702
- if (input === "c") {
28703
- setFieldValue(activeField, "");
28704
- return;
29250
+ };
29251
+ return /* @__PURE__ */ jsx58(
29252
+ FieldForm,
29253
+ {
29254
+ title: "Project",
29255
+ subtitle: "The Contentful space and where the CLI keeps its files.",
29256
+ fields: FIELDS2,
29257
+ values: valuesOf(config),
29258
+ onChange: (key, value) => {
29259
+ setConfig({ ...config, [key]: value });
29260
+ setNotice(null);
29261
+ },
29262
+ onSave: save,
29263
+ onQuit: quit,
29264
+ notice,
29265
+ busy: saving
28705
29266
  }
28706
- if (key.tab || key.downArrow) {
28707
- const idx = FIELD_ORDER.indexOf(activeField);
28708
- setActiveField(FIELD_ORDER[(idx + 1) % FIELD_ORDER.length]);
29267
+ );
29268
+ }
29269
+
29270
+ // packages/experience-design-system-cli/src/tui/settings/contentful-configuration/ContentfulConfigScreen.tsx
29271
+ import { jsx as jsx59, jsxs as jsxs49 } from "react/jsx-runtime";
29272
+ var SECTIONS = [
29273
+ {
29274
+ id: "project",
29275
+ label: "Project",
29276
+ description: "Contentful space, credentials, defaults and where .contentful goes"
29277
+ },
29278
+ { id: "agents", label: "Agents", description: "Which coding agent the CLI uses, and each agent\u2019s settings" }
29279
+ ];
29280
+ function ConfigurationScreen({ onDone }) {
29281
+ const [focus, setFocus] = useState32(0);
29282
+ const [open, setOpen] = useState32(null);
29283
+ const close = () => setOpen(null);
29284
+ useInput13((input, key) => {
29285
+ if (open) return;
29286
+ if (key.upArrow) {
29287
+ setFocus((i) => (i - 1 + SECTIONS.length) % SECTIONS.length);
28709
29288
  return;
28710
29289
  }
28711
- if (key.upArrow) {
28712
- const idx = FIELD_ORDER.indexOf(activeField);
28713
- setActiveField(FIELD_ORDER[(idx - 1 + FIELD_ORDER.length) % FIELD_ORDER.length]);
29290
+ if (key.downArrow || key.tab) {
29291
+ setFocus((i) => (i + 1) % SECTIONS.length);
28714
29292
  return;
28715
29293
  }
28716
29294
  if (key.return) {
28717
- setValueBeforeEdit(fieldValue(activeField));
28718
- setEditing(true);
29295
+ setOpen(SECTIONS[focus].id);
29296
+ return;
28719
29297
  }
29298
+ if (key.escape || input === "q") onDone();
28720
29299
  });
28721
- if (stage === "loading") {
28722
- return /* @__PURE__ */ jsxs45(Box44, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
28723
- /* @__PURE__ */ jsx55(Text46, { bold: true, children: "Configuration" }),
28724
- /* @__PURE__ */ jsx55(Text46, { children: " " }),
28725
- /* @__PURE__ */ jsx55(Text46, { color: PALETTE.accent, children: "Loading..." })
28726
- ] });
28727
- }
28728
- return /* @__PURE__ */ jsxs45(Box44, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
28729
- /* @__PURE__ */ jsx55(Text46, { bold: true, children: "Configuration" }),
28730
- /* @__PURE__ */ jsx55(Text46, { children: " " }),
28731
- /* @__PURE__ */ jsx55(Box44, { flexDirection: "column", children: FIELD_ORDER.map((field) => {
28732
- const isActive = activeField === field;
28733
- const value = fieldValue(field);
28734
- const display = field === "cmaToken" ? "\u2022".repeat(value.length) : value;
28735
- return /* @__PURE__ */ jsxs45(Box44, { gap: 1, children: [
28736
- /* @__PURE__ */ jsx55(Text46, { color: isActive ? PALETTE.accent : void 0, children: isActive ? "\u276F" : " " }),
28737
- /* @__PURE__ */ jsx55(Box44, { width: LABEL_WIDTH, flexShrink: 0, children: /* @__PURE__ */ jsx55(Text46, { bold: isActive, color: isActive ? PALETTE.accent : PALETTE.muted, children: FIELD_LABELS[field] }) }),
28738
- isActive && editing ? /* @__PURE__ */ jsx55(
28739
- TextInput4,
28740
- {
28741
- value,
28742
- onChange: (next) => setFieldValue(field, next),
28743
- onSubmit: () => setEditing(false),
28744
- mask: field === "cmaToken" ? "\u2022" : void 0
28745
- }
28746
- ) : /* @__PURE__ */ jsx55(Text46, { bold: !!display, children: display || (FIELD_HINTS[field] ? "" : /* @__PURE__ */ jsx55(Text46, { color: PALETTE.muted, children: "(empty)" })) }),
28747
- FIELD_HINTS[field] && /* @__PURE__ */ jsx55(Text46, { color: PALETTE.muted, children: FIELD_HINTS[field] })
28748
- ] }, field);
28749
- }) }),
28750
- notice && /* @__PURE__ */ jsxs45(Fragment17, { children: [
28751
- /* @__PURE__ */ jsx55(Text46, { children: " " }),
28752
- /* @__PURE__ */ jsxs45(Text46, { color: notice.kind === "success" ? PALETTE.success : PALETTE.error, children: [
28753
- notice.kind === "success" ? "\u2713" : "\u2717",
28754
- " ",
28755
- notice.text
28756
- ] })
28757
- ] }),
28758
- /* @__PURE__ */ jsx55(Text46, { children: " " }),
28759
- /* @__PURE__ */ jsx55(
29300
+ if (open === "project") return /* @__PURE__ */ jsx59(ProjectConfigScreen, { onDone: close });
29301
+ if (open === "agents") return /* @__PURE__ */ jsx59(AgentsScreen, { onDone: close });
29302
+ return /* @__PURE__ */ jsxs49(Box48, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
29303
+ /* @__PURE__ */ jsx59(Text50, { bold: true, children: "Configuration" }),
29304
+ /* @__PURE__ */ jsx59(Text50, { children: " " }),
29305
+ SECTIONS.map((section, index) => /* @__PURE__ */ jsxs49(Box48, { gap: 1, children: [
29306
+ /* @__PURE__ */ jsx59(Text50, { color: index === focus ? PALETTE.accent : void 0, children: index === focus ? "\u276F" : " " }),
29307
+ /* @__PURE__ */ jsx59(Box48, { width: 9, flexShrink: 0, children: /* @__PURE__ */ jsx59(Text50, { bold: index === focus, color: index === focus ? PALETTE.accent : void 0, children: section.label }) }),
29308
+ /* @__PURE__ */ jsx59(Text50, { color: PALETTE.muted, children: section.description })
29309
+ ] }, section.id)),
29310
+ /* @__PURE__ */ jsx59(Text50, { children: " " }),
29311
+ /* @__PURE__ */ jsx59(
28760
29312
  ControlHints,
28761
29313
  {
28762
- hints: editing ? [
28763
- { keys: "type", label: "edit" },
28764
- { keys: "\u2190/\u2192", label: "move cursor" },
28765
- { keys: "\u23CE", label: "done" },
28766
- { keys: "Esc", label: "cancel edit" }
28767
- ] : [
29314
+ hints: [
28768
29315
  { keys: "\u2191/\u2193", label: "move" },
28769
- { keys: "\u23CE", label: "edit" },
28770
- { keys: "c", label: "clear" },
28771
- { keys: "s", label: "save" },
28772
- { keys: "Esc/q", label: "quit without saving" }
29316
+ { keys: "\u23CE", label: "open" },
29317
+ { keys: "Esc/q", label: "back" }
28773
29318
  ]
28774
29319
  }
28775
29320
  )
@@ -28777,8 +29322,8 @@ function ConfigurationScreen({ onDone }) {
28777
29322
  }
28778
29323
 
28779
29324
  // packages/experience-design-system-cli/src/tui/settings/opt-in-analytics/screen.tsx
28780
- import { useEffect as useEffect23, useState as useState30 } from "react";
28781
- import { Box as Box45, Text as Text47, useInput as useInput12 } from "ink";
29325
+ import { useEffect as useEffect24, useState as useState33 } from "react";
29326
+ import { Box as Box49, Text as Text51, useInput as useInput14 } from "ink";
28782
29327
 
28783
29328
  // packages/experience-design-system-cli/src/tui/settings/opt-in-analytics/analytics-store.ts
28784
29329
  async function readAnalyticsSetting() {
@@ -28797,11 +29342,11 @@ async function writeAnalyticsSetting(setting) {
28797
29342
 
28798
29343
  // packages/experience-design-system-cli/src/tui/settings/opt-in-analytics/screen.tsx
28799
29344
  init_debug_store();
28800
- import { Fragment as Fragment18, jsx as jsx56, jsxs as jsxs46 } from "react/jsx-runtime";
29345
+ import { Fragment as Fragment19, jsx as jsx60, jsxs as jsxs50 } from "react/jsx-runtime";
28801
29346
  function OptInAnalyticsScreen({ onDone }) {
28802
- const [loading, setLoading] = useState30(true);
28803
- const [enabled, setEnabled] = useState30(true);
28804
- useEffect23(() => {
29347
+ const [loading, setLoading] = useState33(true);
29348
+ const [enabled, setEnabled] = useState33(true);
29349
+ useEffect24(() => {
28805
29350
  readAnalyticsSetting().then((setting) => {
28806
29351
  setEnabled(setting.enabled);
28807
29352
  setLoading(false);
@@ -28813,7 +29358,7 @@ function OptInAnalyticsScreen({ onDone }) {
28813
29358
  });
28814
29359
  });
28815
29360
  }, []);
28816
- useInput12((input, key) => {
29361
+ useInput14((input, key) => {
28817
29362
  if (loading) return;
28818
29363
  if (key.return || input === " ") {
28819
29364
  setEnabled((current) => {
@@ -28828,21 +29373,21 @@ function OptInAnalyticsScreen({ onDone }) {
28828
29373
  onDone();
28829
29374
  }
28830
29375
  });
28831
- return /* @__PURE__ */ jsxs46(Box45, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
28832
- /* @__PURE__ */ jsx56(Text47, { bold: true, children: "Settings \u203A Opt-in Analytics" }),
28833
- /* @__PURE__ */ jsx56(Text47, { children: " " }),
28834
- loading ? /* @__PURE__ */ jsx56(Text47, { color: PALETTE.muted, children: "Loading\u2026" }) : /* @__PURE__ */ jsxs46(Fragment18, { children: [
28835
- /* @__PURE__ */ jsxs46(Text47, { children: [
29376
+ return /* @__PURE__ */ jsxs50(Box49, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
29377
+ /* @__PURE__ */ jsx60(Text51, { bold: true, children: "Settings \u203A Opt-in Analytics" }),
29378
+ /* @__PURE__ */ jsx60(Text51, { children: " " }),
29379
+ loading ? /* @__PURE__ */ jsx60(Text51, { color: PALETTE.muted, children: "Loading\u2026" }) : /* @__PURE__ */ jsxs50(Fragment19, { children: [
29380
+ /* @__PURE__ */ jsxs50(Text51, { children: [
28836
29381
  "Share anonymous usage data:",
28837
29382
  " ",
28838
- /* @__PURE__ */ jsx56(Text47, { bold: true, color: enabled ? PALETTE.success : PALETTE.muted, children: enabled ? "On" : "Off" })
29383
+ /* @__PURE__ */ jsx60(Text51, { bold: true, color: enabled ? PALETTE.success : PALETTE.muted, children: enabled ? "On" : "Off" })
28839
29384
  ] }),
28840
- /* @__PURE__ */ jsx56(Text47, { children: " " }),
28841
- /* @__PURE__ */ jsx56(Text47, { color: PALETTE.muted, children: "Shares which CLI commands are used and where imports succeed or fail." }),
28842
- /* @__PURE__ */ jsx56(Text47, { color: PALETTE.muted, children: "Never includes source code, file paths, credentials, or authored content." })
29385
+ /* @__PURE__ */ jsx60(Text51, { children: " " }),
29386
+ /* @__PURE__ */ jsx60(Text51, { color: PALETTE.muted, children: "Shares which CLI commands are used and where imports succeed or fail." }),
29387
+ /* @__PURE__ */ jsx60(Text51, { color: PALETTE.muted, children: "Never includes source code, file paths, credentials, or authored content." })
28843
29388
  ] }),
28844
- /* @__PURE__ */ jsx56(Text47, { children: " " }),
28845
- /* @__PURE__ */ jsx56(
29389
+ /* @__PURE__ */ jsx60(Text51, { children: " " }),
29390
+ /* @__PURE__ */ jsx60(
28846
29391
  ControlHints,
28847
29392
  {
28848
29393
  hints: [
@@ -28855,15 +29400,15 @@ function OptInAnalyticsScreen({ onDone }) {
28855
29400
  }
28856
29401
 
28857
29402
  // packages/experience-design-system-cli/src/tui/upgrade/PageContainer.tsx
28858
- import { useEffect as useEffect24, useState as useState31 } from "react";
28859
- import { Box as Box46, Text as Text48, useInput as useInput13 } from "ink";
29403
+ import { useEffect as useEffect25, useState as useState34 } from "react";
29404
+ import { Box as Box50, Text as Text52, useInput as useInput15 } from "ink";
28860
29405
  init_version();
28861
29406
  init_debug_store();
28862
- import { jsx as jsx57, jsxs as jsxs47 } from "react/jsx-runtime";
29407
+ import { jsx as jsx61, jsxs as jsxs51 } from "react/jsx-runtime";
28863
29408
  var UPGRADE_COMMANDS = ["git pull", "pnpm install", "pnpm build"];
28864
29409
  function UpgradeScreen({ onDone }) {
28865
- const [upgradeCheck, setUpgradeCheck] = useState31();
28866
- useEffect24(() => {
29410
+ const [upgradeCheck, setUpgradeCheck] = useState34();
29411
+ useEffect25(() => {
28867
29412
  startDebugRun({
28868
29413
  flow: "upgrade",
28869
29414
  step: "01-upgrade",
@@ -28872,7 +29417,7 @@ function UpgradeScreen({ onDone }) {
28872
29417
  });
28873
29418
  checkForUpgrade().then(setUpgradeCheck).catch(() => setUpgradeCheck({ status: "error" }));
28874
29419
  }, []);
28875
- useInput13((_input, key) => {
29420
+ useInput15((_input, key) => {
28876
29421
  if (key.return) {
28877
29422
  void finishDebugRun({
28878
29423
  outputs: upgradeCheck ?? {},
@@ -28883,12 +29428,12 @@ function UpgradeScreen({ onDone }) {
28883
29428
  return;
28884
29429
  }
28885
29430
  });
28886
- return /* @__PURE__ */ jsxs47(Box46, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
28887
- /* @__PURE__ */ jsx57(Text48, { bold: true, children: "Upgrade" }),
28888
- /* @__PURE__ */ jsx57(Text48, { children: " " }),
29431
+ return /* @__PURE__ */ jsxs51(Box50, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
29432
+ /* @__PURE__ */ jsx61(Text52, { bold: true, children: "Upgrade" }),
29433
+ /* @__PURE__ */ jsx61(Text52, { children: " " }),
28889
29434
  renderBody(upgradeCheck),
28890
- /* @__PURE__ */ jsx57(Text48, { children: " " }),
28891
- /* @__PURE__ */ jsxs47(Text48, { bold: true, color: PALETTE.accent, children: [
29435
+ /* @__PURE__ */ jsx61(Text52, { children: " " }),
29436
+ /* @__PURE__ */ jsxs51(Text52, { bold: true, color: PALETTE.accent, children: [
28892
29437
  FOCUS_MARKER,
28893
29438
  " Go Back"
28894
29439
  ] })
@@ -28896,47 +29441,47 @@ function UpgradeScreen({ onDone }) {
28896
29441
  }
28897
29442
  function renderBody(upgradeCheck) {
28898
29443
  if (!upgradeCheck) {
28899
- return /* @__PURE__ */ jsx57(Text48, { color: PALETTE.muted, children: "Checking for updates\u2026" });
29444
+ return /* @__PURE__ */ jsx61(Text52, { color: PALETTE.muted, children: "Checking for updates\u2026" });
28900
29445
  }
28901
29446
  if (upgradeCheck.status === "error") {
28902
- return /* @__PURE__ */ jsx57(Text48, { color: PALETTE.warning, children: "Couldn't check for updates \u2014 check your network connection and try again." });
29447
+ return /* @__PURE__ */ jsx61(Text52, { color: PALETTE.warning, children: "Couldn't check for updates \u2014 check your network connection and try again." });
28903
29448
  }
28904
29449
  if (upgradeCheck.status === "up-to-date") {
28905
- return /* @__PURE__ */ jsxs47(Text48, { color: PALETTE.success, children: [
29450
+ return /* @__PURE__ */ jsxs51(Text52, { color: PALETTE.success, children: [
28906
29451
  "You're already on the latest version (v",
28907
29452
  upgradeCheck.current,
28908
29453
  ")."
28909
29454
  ] });
28910
29455
  }
28911
- return /* @__PURE__ */ jsxs47(Box46, { flexDirection: "column", children: [
28912
- /* @__PURE__ */ jsxs47(Text48, { color: PALETTE.muted, children: [
28913
- /* @__PURE__ */ jsxs47(Text48, { bold: true, color: PALETTE.success, children: [
29456
+ return /* @__PURE__ */ jsxs51(Box50, { flexDirection: "column", children: [
29457
+ /* @__PURE__ */ jsxs51(Text52, { color: PALETTE.muted, children: [
29458
+ /* @__PURE__ */ jsxs51(Text52, { bold: true, color: PALETTE.success, children: [
28914
29459
  "v",
28915
29460
  upgradeCheck.latest
28916
29461
  ] }),
28917
29462
  " ",
28918
29463
  "is available (you're on ",
28919
- /* @__PURE__ */ jsxs47(Text48, { bold: true, children: [
29464
+ /* @__PURE__ */ jsxs51(Text52, { bold: true, children: [
28920
29465
  "v",
28921
29466
  upgradeCheck.current
28922
29467
  ] }),
28923
29468
  "). Exit this program, cd into the root of your local clone of contentful/experience-design-system-sdk-public, then run:"
28924
29469
  ] }),
28925
- /* @__PURE__ */ jsx57(Text48, { children: " " }),
28926
- /* @__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)) })
29470
+ /* @__PURE__ */ jsx61(Text52, { children: " " }),
29471
+ /* @__PURE__ */ jsx61(Box50, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.border, paddingX: 1, children: UPGRADE_COMMANDS.map((cmd) => /* @__PURE__ */ jsx61(Text52, { bold: true, children: cmd }, cmd)) })
28927
29472
  ] });
28928
29473
  }
28929
29474
 
28930
29475
  // packages/experience-design-system-cli/src/tui/settings/debug-mode/screen.tsx
28931
- import { useEffect as useEffect25, useState as useState32 } from "react";
28932
- import { Box as Box47, Text as Text49, useInput as useInput14 } from "ink";
29476
+ import { useEffect as useEffect26, useState as useState35 } from "react";
29477
+ import { Box as Box51, Text as Text53, useInput as useInput16 } from "ink";
28933
29478
  init_debug_mode_store();
28934
29479
  init_debug_store();
28935
- import { jsx as jsx58, jsxs as jsxs48 } from "react/jsx-runtime";
29480
+ import { jsx as jsx62, jsxs as jsxs52 } from "react/jsx-runtime";
28936
29481
  function DebugModeScreen({ onDone }) {
28937
- const [loading, setLoading] = useState32(true);
28938
- const [enabled, setEnabled] = useState32(true);
28939
- useEffect25(() => {
29482
+ const [loading, setLoading] = useState35(true);
29483
+ const [enabled, setEnabled] = useState35(true);
29484
+ useEffect26(() => {
28940
29485
  readDebugModeSetting().then((setting) => {
28941
29486
  setEnabled(setting.enabled);
28942
29487
  setLoading(false);
@@ -28948,7 +29493,7 @@ function DebugModeScreen({ onDone }) {
28948
29493
  });
28949
29494
  });
28950
29495
  }, []);
28951
- useInput14((input, key) => {
29496
+ useInput16((input, key) => {
28952
29497
  if (loading) return;
28953
29498
  if (key.return || input === " ") {
28954
29499
  setEnabled((current) => {
@@ -28963,16 +29508,16 @@ function DebugModeScreen({ onDone }) {
28963
29508
  onDone();
28964
29509
  }
28965
29510
  });
28966
- return /* @__PURE__ */ jsxs48(Box47, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
28967
- /* @__PURE__ */ jsx58(Text49, { bold: true, children: "Settings \u203A Debug Mode" }),
28968
- /* @__PURE__ */ jsx58(Text49, { children: " " }),
28969
- loading ? /* @__PURE__ */ jsx58(Text49, { color: PALETTE.muted, children: "Loading\u2026" }) : /* @__PURE__ */ jsxs48(Text49, { children: [
29511
+ return /* @__PURE__ */ jsxs52(Box51, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
29512
+ /* @__PURE__ */ jsx62(Text53, { bold: true, children: "Settings \u203A Debug Mode" }),
29513
+ /* @__PURE__ */ jsx62(Text53, { children: " " }),
29514
+ loading ? /* @__PURE__ */ jsx62(Text53, { color: PALETTE.muted, children: "Loading\u2026" }) : /* @__PURE__ */ jsxs52(Text53, { children: [
28970
29515
  "Debug logging:",
28971
29516
  " ",
28972
- /* @__PURE__ */ jsx58(Text49, { bold: true, color: enabled ? PALETTE.success : PALETTE.muted, children: enabled ? "On" : "Off" })
29517
+ /* @__PURE__ */ jsx62(Text53, { bold: true, color: enabled ? PALETTE.success : PALETTE.muted, children: enabled ? "On" : "Off" })
28973
29518
  ] }),
28974
- /* @__PURE__ */ jsx58(Text49, { children: " " }),
28975
- /* @__PURE__ */ jsx58(
29519
+ /* @__PURE__ */ jsx62(Text53, { children: " " }),
29520
+ /* @__PURE__ */ jsx62(
28976
29521
  ControlHints,
28977
29522
  {
28978
29523
  hints: [
@@ -28985,18 +29530,18 @@ function DebugModeScreen({ onDone }) {
28985
29530
  }
28986
29531
 
28987
29532
  // packages/experience-design-system-cli/app.tsx
28988
- import { Fragment as Fragment19, jsx as jsx59 } from "react/jsx-runtime";
29533
+ import { Fragment as Fragment20, jsx as jsx63 } from "react/jsx-runtime";
28989
29534
  function App({ importOptions, inkClear }) {
28990
- const [screen, setScreen] = useState33("start");
28991
- const [importExitCode, setImportExitCode] = useState33();
29535
+ const [screen, setScreen] = useState36("start");
29536
+ const [importExitCode, setImportExitCode] = useState36();
28992
29537
  const showImportResult = importExitCode !== void 0;
28993
- const [projectPath, setProjectPath] = useState33();
28994
- const [tokensPath, setTokensPath] = useState33();
28995
- const [scannedFiles, setScannedFiles] = useState33();
28996
- const [pendingLaunch, setPendingLaunch] = useState33();
28997
- const [extractionRun, setExtractionRun] = useState33();
29538
+ const [projectPath, setProjectPath] = useState36();
29539
+ const [tokensPath, setTokensPath] = useState36();
29540
+ const [scannedFiles, setScannedFiles] = useState36();
29541
+ const [pendingLaunch, setPendingLaunch] = useState36();
29542
+ const [extractionRun, setExtractionRun] = useState36();
28998
29543
  const extraction = useExtraction(extractionRun?.input);
28999
- const [scopeRun, setScopeRun] = useState33();
29544
+ const [scopeRun, setScopeRun] = useState36();
29000
29545
  const scopeFlow = useScopeGateFlow(
29001
29546
  scopeRun && {
29002
29547
  sessionId: scopeRun.extraction.sessionId,
@@ -29011,12 +29556,12 @@ function App({ importOptions, inkClear }) {
29011
29556
  }
29012
29557
  }
29013
29558
  );
29014
- const [generationInput, setGenerationInput] = useState33();
29559
+ const [generationInput, setGenerationInput] = useState36();
29015
29560
  const generation = useGeneration(generationInput);
29016
- const [flowStart, setFlowStart] = useState33();
29561
+ const [flowStart, setFlowStart] = useState36();
29017
29562
  const flow = useFlow(flowStart, { beforeStepChange: inkClear });
29018
- const [importDefaults, setImportDefaults] = useState33();
29019
- useEffect26(() => {
29563
+ const [importDefaults, setImportDefaults] = useState36();
29564
+ useEffect27(() => {
29020
29565
  if (screen !== "import") {
29021
29566
  setImportDefaults(void 0);
29022
29567
  return;
@@ -29034,7 +29579,7 @@ function App({ importOptions, inkClear }) {
29034
29579
  const launch = { projectPath: projectPath2, tokens, filePaths, ...importOptions };
29035
29580
  const state2 = await inspectTokens({
29036
29581
  rawTokensPath: tokens,
29037
- contentfulDir: join25(resolveUserPath(projectPath2), ".contentful"),
29582
+ contentfulDir: join26(resolveUserPath(projectPath2), ".contentful"),
29038
29583
  cache: importOptions.cache
29039
29584
  });
29040
29585
  if (state2.kind === "cached") {
@@ -29076,12 +29621,12 @@ function App({ importOptions, inkClear }) {
29076
29621
  }
29077
29622
  });
29078
29623
  };
29079
- useEffect26(() => {
29624
+ useEffect27(() => {
29080
29625
  if (!extractionRun || extraction?.status !== "done" || !extraction.result.ok) return;
29081
29626
  setExtractionRun(void 0);
29082
29627
  setScopeRun({ ...extractionRun, extraction: extraction.result.extraction });
29083
29628
  }, [extraction, extractionRun]);
29084
- useEffect26(() => {
29629
+ useEffect27(() => {
29085
29630
  if (!scopeRun || scopeFlow?.status !== "confirmed" || generationInput) return;
29086
29631
  const { extraction: produced, input, generatePromptPath } = scopeRun;
29087
29632
  setGenerationInput({
@@ -29099,7 +29644,7 @@ function App({ importOptions, inkClear }) {
29099
29644
  ...generatePromptPath ? { generatePromptPath } : {}
29100
29645
  });
29101
29646
  }, [scopeFlow, scopeRun, generationInput]);
29102
- useEffect26(() => {
29647
+ useEffect27(() => {
29103
29648
  if (!scopeRun || generation?.status !== "done" || !generation.result.ok) return;
29104
29649
  const { credentialsSkipped, tokenStrategy, extraction: produced, input, generatePromptPath } = scopeRun;
29105
29650
  inkClear();
@@ -29142,9 +29687,9 @@ function App({ importOptions, inkClear }) {
29142
29687
  };
29143
29688
  switch (screen) {
29144
29689
  case "import":
29145
- if (showImportResult) return /* @__PURE__ */ jsx59(ImportScreen, { exitCode: importExitCode, onDone: finishImportResult });
29690
+ if (showImportResult) return /* @__PURE__ */ jsx63(ImportScreen, { exitCode: importExitCode, onDone: finishImportResult });
29146
29691
  if (flow && flowStart) {
29147
- return /* @__PURE__ */ jsx59(
29692
+ return /* @__PURE__ */ jsx63(
29148
29693
  FlowScreen,
29149
29694
  {
29150
29695
  state: flow.state,
@@ -29154,12 +29699,12 @@ function App({ importOptions, inkClear }) {
29154
29699
  }
29155
29700
  );
29156
29701
  }
29157
- if (importDefaults === void 0) return /* @__PURE__ */ jsx59(Fragment19, {});
29702
+ if (importDefaults === void 0) return /* @__PURE__ */ jsx63(Fragment20, {});
29158
29703
  if (projectPath === void 0) {
29159
- return /* @__PURE__ */ jsx59(WelcomeScreen, { onContinue: setProjectPath, onQuit: leaveImport, initialPath: importDefaults.componentDir });
29704
+ return /* @__PURE__ */ jsx63(WelcomeScreen, { onContinue: setProjectPath, onQuit: leaveImport, initialPath: importDefaults.componentDir });
29160
29705
  }
29161
29706
  if (tokensPath === void 0) {
29162
- return /* @__PURE__ */ jsx59(
29707
+ return /* @__PURE__ */ jsx63(
29163
29708
  TokenInputScreen,
29164
29709
  {
29165
29710
  initialPath: importDefaults.tokenFile,
@@ -29169,7 +29714,7 @@ function App({ importOptions, inkClear }) {
29169
29714
  );
29170
29715
  }
29171
29716
  if (scannedFiles === void 0) {
29172
- return /* @__PURE__ */ jsx59(
29717
+ return /* @__PURE__ */ jsx63(
29173
29718
  PathValidationScreen,
29174
29719
  {
29175
29720
  projectPath,
@@ -29181,10 +29726,10 @@ function App({ importOptions, inkClear }) {
29181
29726
  }
29182
29727
  if (extractionRun) {
29183
29728
  if (extraction?.status === "done" && !extraction.result.ok) {
29184
- return /* @__PURE__ */ jsx59(ErrorStep, { stepName: extraction.result.step, message: extraction.result.message, onExit: leaveImport });
29729
+ return /* @__PURE__ */ jsx63(ErrorStep, { stepName: extraction.result.step, message: extraction.result.message, onExit: leaveImport });
29185
29730
  }
29186
29731
  if (extraction?.status === "running") {
29187
- return /* @__PURE__ */ jsx59(
29732
+ return /* @__PURE__ */ jsx63(
29188
29733
  ExtractionScreen,
29189
29734
  {
29190
29735
  progress: extraction.progress,
@@ -29193,14 +29738,14 @@ function App({ importOptions, inkClear }) {
29193
29738
  }
29194
29739
  );
29195
29740
  }
29196
- return /* @__PURE__ */ jsx59(Fragment19, {});
29741
+ return /* @__PURE__ */ jsx63(Fragment20, {});
29197
29742
  }
29198
29743
  if (scopeRun && scopeFlow) {
29199
29744
  if (scopeFlow.status === "failed") {
29200
- return /* @__PURE__ */ jsx59(ErrorStep, { stepName: "scope gate", message: scopeFlow.message, onExit: leaveImport });
29745
+ return /* @__PURE__ */ jsx63(ErrorStep, { stepName: "scope gate", message: scopeFlow.message, onExit: leaveImport });
29201
29746
  }
29202
29747
  if (scopeFlow.status === "deciding") {
29203
- return /* @__PURE__ */ jsx59(
29748
+ return /* @__PURE__ */ jsx63(
29204
29749
  ScopeGateScreen,
29205
29750
  {
29206
29751
  components: scopeFlow.load.components,
@@ -29210,7 +29755,7 @@ function App({ importOptions, inkClear }) {
29210
29755
  );
29211
29756
  }
29212
29757
  if (generation?.status === "done" && !generation.result.ok) {
29213
- return /* @__PURE__ */ jsx59(ErrorStep, { stepName: generation.result.step, message: generation.result.message, onExit: leaveImport });
29758
+ return /* @__PURE__ */ jsx63(ErrorStep, { stepName: generation.result.step, message: generation.result.message, onExit: leaveImport });
29214
29759
  }
29215
29760
  if (generation?.status === "running") {
29216
29761
  const hasRawTokens = scopeRun.input.rawTokensPath !== "";
@@ -29218,7 +29763,7 @@ function App({ importOptions, inkClear }) {
29218
29763
  hasRawTokens,
29219
29764
  mapTokensEligible: generation.progress.mapTokensEligible
29220
29765
  });
29221
- return /* @__PURE__ */ jsx59(
29766
+ return /* @__PURE__ */ jsx63(
29222
29767
  GenerationScreen,
29223
29768
  {
29224
29769
  progress: generation.progress,
@@ -29230,10 +29775,10 @@ function App({ importOptions, inkClear }) {
29230
29775
  }
29231
29776
  );
29232
29777
  }
29233
- return /* @__PURE__ */ jsx59(Fragment19, {});
29778
+ return /* @__PURE__ */ jsx63(Fragment20, {});
29234
29779
  }
29235
29780
  if (pendingLaunch?.cached) {
29236
- return /* @__PURE__ */ jsx59(
29781
+ return /* @__PURE__ */ jsx63(
29237
29782
  TokenReuseScreen,
29238
29783
  {
29239
29784
  tokensPath: pendingLaunch.cached.tokensPath,
@@ -29244,7 +29789,7 @@ function App({ importOptions, inkClear }) {
29244
29789
  }
29245
29790
  );
29246
29791
  }
29247
- return /* @__PURE__ */ jsx59(
29792
+ return /* @__PURE__ */ jsx63(
29248
29793
  CredentialsScreen,
29249
29794
  {
29250
29795
  initial: importDefaults.credentials,
@@ -29253,19 +29798,19 @@ function App({ importOptions, inkClear }) {
29253
29798
  }
29254
29799
  );
29255
29800
  case "help":
29256
- return /* @__PURE__ */ jsx59(HelpScreen, { onDone: goToStart });
29801
+ return /* @__PURE__ */ jsx63(HelpScreen, { onDone: goToStart });
29257
29802
  case "upgrade":
29258
- return /* @__PURE__ */ jsx59(UpgradeScreen, { onDone: goToStart });
29803
+ return /* @__PURE__ */ jsx63(UpgradeScreen, { onDone: goToStart });
29259
29804
  case "settings":
29260
- return /* @__PURE__ */ jsx59(SettingsScreen, { onNavigate: setScreen, onBack: goToStart });
29805
+ return /* @__PURE__ */ jsx63(SettingsScreen, { onNavigate: setScreen, onBack: goToStart });
29261
29806
  case "settings-configuration":
29262
- return /* @__PURE__ */ jsx59(ConfigurationScreen, { onDone: goToSettings });
29807
+ return /* @__PURE__ */ jsx63(ConfigurationScreen, { onDone: goToSettings });
29263
29808
  case "settings-opt-in-analytics":
29264
- return /* @__PURE__ */ jsx59(OptInAnalyticsScreen, { onDone: goToSettings });
29809
+ return /* @__PURE__ */ jsx63(OptInAnalyticsScreen, { onDone: goToSettings });
29265
29810
  case "settings-debug-mode":
29266
- return /* @__PURE__ */ jsx59(DebugModeScreen, { onDone: goToSettings });
29811
+ return /* @__PURE__ */ jsx63(DebugModeScreen, { onDone: goToSettings });
29267
29812
  case "start":
29268
- return /* @__PURE__ */ jsx59(HomeScreen, { onNavigate: setScreen });
29813
+ return /* @__PURE__ */ jsx63(HomeScreen, { onNavigate: setScreen });
29269
29814
  }
29270
29815
  }
29271
29816
  async function runApp(renderApp, importOptions) {
@@ -29273,7 +29818,7 @@ async function runApp(renderApp, importOptions) {
29273
29818
  instance.clear?.();
29274
29819
  process.stdout.write("\x1B[H\x1B[0J");
29275
29820
  };
29276
- const instance = renderApp(/* @__PURE__ */ jsx59(App, { importOptions, inkClear }));
29821
+ const instance = renderApp(/* @__PURE__ */ jsx63(App, { importOptions, inkClear }));
29277
29822
  await instance.waitUntilExit();
29278
29823
  }
29279
29824
  export {