@contentful/experience-design-system-cli 2.34.5-dev-build-ea694b2.0 → 2.34.5-dev-build-57e4802.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/src/index.js CHANGED
@@ -4146,17 +4146,12 @@ var init_persistence = __esm({
4146
4146
 
4147
4147
  // packages/experience-design-system-cli/src/lib/agent-model-options.ts
4148
4148
  function addAgentModelOptions(cmd, config = {}) {
4149
- const {
4150
- agentDescription = AGENT_DESCRIPTION,
4151
- includeModel = true,
4152
- includeBedrock = true,
4153
- modelDescription = MODEL_DESCRIPTION
4154
- } = config;
4149
+ const { agentDescription = AGENT_DESCRIPTION, includeModel = true, modelDescription = MODEL_DESCRIPTION } = config;
4155
4150
  cmd.option("--agent <name>", agentDescription);
4156
4151
  if (includeModel) {
4157
4152
  cmd.option("--model <name>", modelDescription);
4158
4153
  }
4159
- if (includeBedrock) cmd.option("--bedrock", BEDROCK_DESCRIPTION);
4154
+ cmd.option("--bedrock", BEDROCK_DESCRIPTION);
4160
4155
  return cmd;
4161
4156
  }
4162
4157
  var AGENT_DESCRIPTION, MODEL_DESCRIPTION, BEDROCK_AGENTS, BEDROCK_DESCRIPTION;
@@ -4915,8 +4910,7 @@ async function runGenerateSkill(skill, opts, verbose = false) {
4915
4910
  const { overrides: promptOverrides, errors: promptErrors } = parsePromptOverrides(opts.prompt ?? []);
4916
4911
  if (promptErrors.length > 0) die(`Error: ${promptErrors.join("; ")}`);
4917
4912
  let generatePrompt;
4918
- const promptStage = skill === "tokens" ? "tokens" : "generate";
4919
- const generateOverride = promptOverrides.get(promptStage);
4913
+ const generateOverride = promptOverrides.get("generate");
4920
4914
  if (generateOverride) {
4921
4915
  try {
4922
4916
  generatePrompt = await resolvePromptOverride(generateOverride);
@@ -5266,12 +5260,7 @@ function registerInternalGenerateCommand(program) {
5266
5260
  addAgentFlags(componentsCmd).action(async (opts) => {
5267
5261
  await runGenerateSkill("components", opts, opts.verbose ?? false);
5268
5262
  });
5269
- const tokensCmd = generate.command("tokens").description("Invoke a coding agent to produce tokens.json from raw token data").option("--raw-tokens <path>", "Path to raw token input file").option(
5270
- "--prompt <stage=value>",
5271
- "Override a stage prompt (repeatable). Used here for the tokens stage.",
5272
- (v, acc) => [...acc, v],
5273
- []
5274
- );
5263
+ const tokensCmd = generate.command("tokens").description("Invoke a coding agent to produce tokens.json from raw token data").option("--raw-tokens <path>", "Path to raw token input file");
5275
5264
  addAgentFlags(tokensCmd).action(async (opts) => {
5276
5265
  await runGenerateSkill("tokens", opts, opts.verbose ?? false);
5277
5266
  });
@@ -7543,7 +7532,7 @@ function buildApplyOutput(operation, spaceId, environmentId, host) {
7543
7532
  };
7544
7533
  }
7545
7534
  function registerApplyCommand(program) {
7546
- const applyCmd = program.command("apply").description("Write component types and design tokens to Contentful ExO").helpOption(false).argument("<file>", "CDF file containing all component and design token definitions");
7535
+ const applyCmd = program.command("apply").description("Write component types and design tokens to Contentful ExO").argument("<file>", "CDF file containing all component and design token definitions");
7547
7536
  applyCmd.action(async (file) => {
7548
7537
  const isTTY = getInteractiveTerminalSupport().supported;
7549
7538
  const inputs = await resolveSharedInputsOrDie(file);
@@ -8491,20 +8480,6 @@ async function runMapTokens(opts) {
8491
8480
  );
8492
8481
  }
8493
8482
  const resultAgent = configuredAgent ?? "skipped";
8494
- const { overrides: promptOverrides, errors: promptErrors } = parsePromptOverrides(opts.prompt ?? []);
8495
- if (promptErrors.length > 0) die(`Error: ${promptErrors.join("; ")}`);
8496
- const mapPromptOverride = promptOverrides.get("map-tokens");
8497
- let mapPromptText;
8498
- let mapPromptPath;
8499
- if (mapPromptOverride?.kind === "text") mapPromptText = mapPromptOverride.value;
8500
- if (mapPromptOverride?.kind === "path") {
8501
- mapPromptPath = resolve8(mapPromptOverride.value);
8502
- try {
8503
- await resolvePromptOverride(mapPromptOverride);
8504
- } catch (error) {
8505
- die(`Error: ${error instanceof Error ? error.message : String(error)}`);
8506
- }
8507
- }
8508
8483
  const db = openPipelineDb();
8509
8484
  try {
8510
8485
  const sessionId2 = opts.session ?? findLatestSessionForCommand(db, "generate components");
@@ -8607,19 +8582,16 @@ ${defaultDiagnostics.map((diagnostic) => ` ${diagnostic}`).join("\n")}
8607
8582
  );
8608
8583
  }
8609
8584
  }
8610
- const buildMapPrompt = () => buildPrompt({
8611
- skill: "map-tokens",
8612
- mode: "autonomous",
8613
- generatedCdf,
8614
- tokenTree,
8615
- componentSourceRefs,
8616
- outDir: process.cwd(),
8617
- existingTokensInline,
8618
- ...mapPromptText !== void 0 ? { skillContentOverride: mapPromptText } : {},
8619
- ...mapPromptText === void 0 && mapPromptPath ? { skillPathOverride: mapPromptPath } : {}
8620
- });
8621
8585
  if (opts.printPrompt) {
8622
- const prompt2 = await buildMapPrompt();
8586
+ const prompt2 = await buildPrompt({
8587
+ skill: "map-tokens",
8588
+ mode: "autonomous",
8589
+ generatedCdf,
8590
+ tokenTree,
8591
+ componentSourceRefs,
8592
+ outDir: process.cwd(),
8593
+ existingTokensInline
8594
+ });
8623
8595
  process.stdout.write(prompt2 + "\n");
8624
8596
  await exitWithAnalytics(0);
8625
8597
  return;
@@ -8641,8 +8613,7 @@ ${defaultDiagnostics.map((diagnostic) => ` ${diagnostic}`).join("\n")}
8641
8613
  agent,
8642
8614
  model,
8643
8615
  void 0,
8644
- existingTokensInline ? [hashContent(existingTokensInline)] : [],
8645
- mapPromptText
8616
+ existingTokensInline ? [hashContent(existingTokensInline)] : []
8646
8617
  );
8647
8618
  const inputHash = computeMapTokensInputHash(db, sessionId2, componentSourceRefs);
8648
8619
  if (!noCache) {
@@ -8664,7 +8635,15 @@ Install it, choose another agent with --agent, or use --print-prompt to run the
8664
8635
  );
8665
8636
  }
8666
8637
  const stepId = createStep(db, sessionId2, "map tokens", { agent, model: model ?? "" });
8667
- const prompt = await buildMapPrompt();
8638
+ const prompt = await buildPrompt({
8639
+ skill: "map-tokens",
8640
+ mode: "autonomous",
8641
+ generatedCdf,
8642
+ tokenTree,
8643
+ componentSourceRefs,
8644
+ outDir: process.cwd(),
8645
+ existingTokensInline
8646
+ });
8668
8647
  const invoker2 = createLocalCliAgentInvoker();
8669
8648
  const result = await invoker2.invoke({ agent, model, prompt, timeoutMs: DEFAULT_TIMEOUT_MS2 });
8670
8649
  if (result.timedOut || result.exitCode !== 0) {
@@ -8690,12 +8669,7 @@ ${warnings.map((w) => ` ${w}`).join("\n")}
8690
8669
  }
8691
8670
  function registerMapTokensCommand(program) {
8692
8671
  const map = program.command("map", { hidden: true }).description("Suggest token restrictions for generated design-token props");
8693
- const tokensCmd = map.command("tokens").description("Invoke a coding agent to suggest $token.allowed for design-category token props").option("--session <id>", "Session ID from generate components (defaults to most recent)").option("--print-prompt", "Print the prompt without invoking the agent").option("--skip-agent", "Resolve token defaults without agentic $token.allowed inference").option("--no-cache", "Bypass the map-tokens cache and force a re-run").option(
8694
- "--prompt <stage=value>",
8695
- "Override a stage prompt (repeatable). Used here for the map-tokens stage.",
8696
- (v, acc) => [...acc, v],
8697
- []
8698
- ).option("--token-map <path>", "Path to token-name-map.json sidecar").option(
8672
+ const tokensCmd = map.command("tokens").description("Invoke a coding agent to suggest $token.allowed for design-category token props").option("--session <id>", "Session ID from generate components (defaults to most recent)").option("--print-prompt", "Print the prompt without invoking the agent").option("--skip-agent", "Resolve token defaults without agentic $token.allowed inference").option("--no-cache", "Bypass the map-tokens cache and force a re-run").option("--token-map <path>", "Path to token-name-map.json sidecar").option(
8699
8673
  "--existing-entities-path <path>",
8700
8674
  "Path to the .existing-entities.json file written after CMA credentials are supplied. When present, the agent gets a list of the space's existing design tokens so it can prefer binding to them. Missing/malformed files are treated as no-op."
8701
8675
  );
@@ -8720,7 +8694,6 @@ var init_command4 = __esm({
8720
8694
  init_MapTokensView();
8721
8695
  init_resolve_defaults();
8722
8696
  init_cli_errors();
8723
- init_prompt_overrides();
8724
8697
  DEFAULT_TIMEOUT_MS2 = Number(process.env.EDS_AGENT_TIMEOUT_MS ?? 5 * 60 * 1e3);
8725
8698
  }
8726
8699
  });
@@ -8748,41 +8721,10 @@ var init_path_utils = __esm({
8748
8721
  }
8749
8722
  });
8750
8723
 
8751
- // packages/experience-design-system-cli/src/import/agent-model-resolve.ts
8752
- function parseAgentModel(value) {
8753
- if (!value?.trim()) return {};
8754
- const trimmed = value.trim();
8755
- const separator = trimmed.indexOf(":");
8756
- if (separator >= 0) {
8757
- return {
8758
- agent: trimmed.slice(0, separator).trim() || void 0,
8759
- model: trimmed.slice(separator + 1).trim() || void 0
8760
- };
8761
- }
8762
- const [agent, ...modelParts] = trimmed.split(/\s+/);
8763
- return { agent, ...modelParts.length > 0 ? { model: modelParts.join(" ") } : {} };
8764
- }
8765
- function resolveAgent(flagValue, storedValue) {
8766
- if (flagValue && flagValue.length > 0) return flagValue;
8767
- if (storedValue && storedValue.length > 0) return storedValue;
8768
- return DEFAULT_AGENT;
8769
- }
8770
- function resolveModel(flagValue, storedValue) {
8771
- if (flagValue && flagValue.length > 0) return flagValue;
8772
- if (storedValue && storedValue.length > 0) return storedValue;
8773
- return void 0;
8774
- }
8775
- var DEFAULT_AGENT;
8776
- var init_agent_model_resolve = __esm({
8777
- "packages/experience-design-system-cli/src/import/agent-model-resolve.ts"() {
8778
- "use strict";
8779
- DEFAULT_AGENT = "claude";
8780
- }
8781
- });
8782
-
8783
8724
  // packages/experience-design-system-cli/src/import/composition-options.ts
8784
8725
  function buildCompositionForwardingOptions(options) {
8785
8726
  return {
8727
+ ...options.compositionMap ? { compositionMap: options.compositionMap } : {},
8786
8728
  ...options.prompt && options.prompt.length > 0 ? { promptOverrides: options.prompt } : {}
8787
8729
  };
8788
8730
  }
@@ -10318,13 +10260,6 @@ function WizardPreviewStep({
10318
10260
  maxScroll > 0 && /* @__PURE__ */ jsx18(Text16, { dimColor: true, children: " \u2195 j/k to scroll, f/b to page" })
10319
10261
  ] })
10320
10262
  ] }) : /* @__PURE__ */ jsx18(Text16, { dimColor: true, children: "Nothing to push \u2014 everything is already up to date." }),
10321
- /* @__PURE__ */ jsxs16(Box16, { gap: 1, marginTop: 1, children: [
10322
- /* @__PURE__ */ jsx18(Text16, { dimColor: true, children: "Space:" }),
10323
- /* @__PURE__ */ jsx18(Text16, { children: spaceId }),
10324
- /* @__PURE__ */ jsx18(Text16, { dimColor: true, children: "/" }),
10325
- /* @__PURE__ */ jsx18(Text16, { dimColor: true, children: "Environment:" }),
10326
- /* @__PURE__ */ jsx18(Text16, { children: environmentId })
10327
- ] }),
10328
10263
  breakingWithImpact && /* @__PURE__ */ jsx18(Box16, { marginTop: 1, children: /* @__PURE__ */ jsx18(Text16, { color: PALETTE.error, bold: true, children: "\u26A0 Breaking changes will affect downstream entities. Press Enter to acknowledge and apply." }) }),
10329
10264
  /* @__PURE__ */ jsx18(SpaceEnvironment, { spaceId, environmentId }),
10330
10265
  /* @__PURE__ */ jsxs16(Box16, { gap: 3, marginTop: 1, children: [
@@ -20062,7 +19997,17 @@ function toSidebarEntry(c2) {
20062
19997
  if (Object.keys($slots).length > 0) entry.$slots = $slots;
20063
19998
  return entry;
20064
19999
  }
20065
- function ScopeGateStep({ components, onConfirm, onQuit }) {
20000
+ function ScopeGateStep(props) {
20001
+ if (props.components.length === 0) {
20002
+ return /* @__PURE__ */ jsx32(Box28, { paddingX: 2, paddingY: 1, children: /* @__PURE__ */ jsx32(Text29, { color: PALETTE.error, children: "Error: no components found for this session \u2014 please re-run analyze extract." }) });
20003
+ }
20004
+ return /* @__PURE__ */ jsx32(ScopeGateStepView, { ...props, components: [...props.components] });
20005
+ }
20006
+ function ScopeGateStepView({
20007
+ components,
20008
+ onConfirm,
20009
+ onQuit
20010
+ }) {
20066
20011
  const { stdout } = useStdout2();
20067
20012
  const totalWidth = stdout?.columns ?? 80;
20068
20013
  const columnPlan = useMemo2(() => computeColumnWidths(totalWidth), [totalWidth]);
@@ -21025,23 +20970,6 @@ var init_ScopeGateStep = __esm({
21025
20970
  }
21026
20971
  });
21027
20972
 
21028
- // packages/experience-design-system-cli/src/import/tui/scope-gate-host.tsx
21029
- import { Box as Box29, Text as Text30 } from "ink";
21030
- import { jsx as jsx33 } from "react/jsx-runtime";
21031
- function ScopeGateHost({ components, onConfirm, onQuit }) {
21032
- if (components.length === 0) {
21033
- return /* @__PURE__ */ jsx33(Box29, { paddingX: 2, paddingY: 1, children: /* @__PURE__ */ jsx33(Text30, { color: PALETTE.error, children: "Error: no components found for this session \u2014 please re-run analyze extract." }) });
21034
- }
21035
- return /* @__PURE__ */ jsx33(ScopeGateStep, { components: [...components], onConfirm, onQuit });
21036
- }
21037
- var init_scope_gate_host = __esm({
21038
- "packages/experience-design-system-cli/src/import/tui/scope-gate-host.tsx"() {
21039
- "use strict";
21040
- init_theme();
21041
- init_ScopeGateStep();
21042
- }
21043
- });
21044
-
21045
20973
  // packages/experience-design-system-cli/src/import/tui/steps/review-json-panel.ts
21046
20974
  function getReviewJsonPanelValue(selected, showHiddenProps) {
21047
20975
  if (!selected) return "";
@@ -21383,8 +21311,8 @@ var init_cycle_auto_reject = __esm({
21383
21311
 
21384
21312
  // packages/experience-design-system-cli/src/analyze/select/tui/components/LineagePanel.tsx
21385
21313
  import figures4 from "figures";
21386
- import { Text as Text31 } from "ink";
21387
- import { jsx as jsx34, jsxs as jsxs30 } from "react/jsx-runtime";
21314
+ import { Text as Text30 } from "ink";
21315
+ import { jsx as jsx33, jsxs as jsxs30 } from "react/jsx-runtime";
21388
21316
  function LineagePanel({
21389
21317
  focusedComponentKey,
21390
21318
  entries,
@@ -21399,7 +21327,7 @@ function LineagePanel({
21399
21327
  kind: e.kind
21400
21328
  }));
21401
21329
  const cursorRowIndex = jumpables[cursor]?.i ?? 0;
21402
- return /* @__PURE__ */ jsx34(
21330
+ return /* @__PURE__ */ jsx33(
21403
21331
  GotoBanner,
21404
21332
  {
21405
21333
  title: `Lineage: ${focusedComponentKey}`,
@@ -21411,20 +21339,20 @@ function LineagePanel({
21411
21339
  footerHint: LINEAGE_FOOTER_HINT,
21412
21340
  renderRow: (row, i, isCursor) => {
21413
21341
  if (row.kind === "section") {
21414
- return /* @__PURE__ */ jsxs30(Text31, { bold: true, children: [
21342
+ return /* @__PURE__ */ jsxs30(Text30, { bold: true, children: [
21415
21343
  " ",
21416
21344
  row.label
21417
21345
  ] }, i);
21418
21346
  }
21419
21347
  if (row.kind === "empty") {
21420
- return /* @__PURE__ */ jsxs30(Text31, { children: [
21421
- /* @__PURE__ */ jsx34(Text31, { children: " " }),
21422
- /* @__PURE__ */ jsx34(Text31, { dimColor: true, children: " " + row.label })
21348
+ return /* @__PURE__ */ jsxs30(Text30, { children: [
21349
+ /* @__PURE__ */ jsx33(Text30, { children: " " }),
21350
+ /* @__PURE__ */ jsx33(Text30, { dimColor: true, children: " " + row.label })
21423
21351
  ] }, i);
21424
21352
  }
21425
- return /* @__PURE__ */ jsxs30(Text31, { children: [
21426
- isCursor ? /* @__PURE__ */ jsx34(Text31, { color: PALETTE.info, bold: true, children: figures4.pointer }) : /* @__PURE__ */ jsx34(Text31, { children: " " }),
21427
- /* @__PURE__ */ jsx34(Text31, { inverse: isCursor, children: " " + row.label })
21353
+ return /* @__PURE__ */ jsxs30(Text30, { children: [
21354
+ isCursor ? /* @__PURE__ */ jsx33(Text30, { color: PALETTE.info, bold: true, children: figures4.pointer }) : /* @__PURE__ */ jsx33(Text30, { children: " " }),
21355
+ /* @__PURE__ */ jsx33(Text30, { inverse: isCursor, children: " " + row.label })
21428
21356
  ] }, i);
21429
21357
  }
21430
21358
  }
@@ -21597,13 +21525,13 @@ var init_scroll_offset = __esm({
21597
21525
  // packages/experience-design-system-cli/src/analyze/select/tui/components/FieldEditor.tsx
21598
21526
  import React15, { useState as useState15 } from "react";
21599
21527
  import figures5 from "figures";
21600
- import { Box as Box30, Text as Text32 } from "ink";
21528
+ import { Box as Box29, Text as Text31 } from "ink";
21601
21529
  import {
21602
21530
  CDF_PROPERTY_TYPES,
21603
21531
  CDF_PROPERTY_CATEGORIES,
21604
21532
  DESIGN_TOKEN_TYPES as DESIGN_TOKEN_TYPES2
21605
21533
  } from "@contentful/experience-design-system-types";
21606
- import { Fragment as Fragment9, jsx as jsx35, jsxs as jsxs31 } from "react/jsx-runtime";
21534
+ import { Fragment as Fragment9, jsx as jsx34, jsxs as jsxs31 } from "react/jsx-runtime";
21607
21535
  function removeAt(values, index) {
21608
21536
  return values.filter((_, i) => i !== index);
21609
21537
  }
@@ -21726,25 +21654,25 @@ function serializeState(state, originalJson) {
21726
21654
  return JSON.stringify(entry, null, 2);
21727
21655
  }
21728
21656
  function Picker({ value, active }) {
21729
- return /* @__PURE__ */ jsxs31(Box30, { children: [
21730
- active && /* @__PURE__ */ jsx35(Text32, { color: PALETTE.info, children: "\u2039" }),
21731
- /* @__PURE__ */ jsx35(Text32, { color: active ? PALETTE.info : PALETTE.inverse, bold: active, children: value }),
21732
- active && /* @__PURE__ */ jsx35(Text32, { color: PALETTE.info, children: "\u203A" })
21657
+ return /* @__PURE__ */ jsxs31(Box29, { children: [
21658
+ active && /* @__PURE__ */ jsx34(Text31, { color: PALETTE.info, children: "\u2039" }),
21659
+ /* @__PURE__ */ jsx34(Text31, { color: active ? PALETTE.info : PALETTE.inverse, bold: active, children: value }),
21660
+ active && /* @__PURE__ */ jsx34(Text31, { color: PALETTE.info, children: "\u203A" })
21733
21661
  ] });
21734
21662
  }
21735
21663
  function Toggle({ value, active }) {
21736
- return /* @__PURE__ */ jsx35(Box30, { children: /* @__PURE__ */ jsx35(Text32, { color: active ? PALETTE.info : value ? PALETTE.success : void 0, children: value ? "[\u2713]" : "[ ]" }) });
21664
+ return /* @__PURE__ */ jsx34(Box29, { children: /* @__PURE__ */ jsx34(Text31, { color: active ? PALETTE.info : value ? PALETTE.success : void 0, children: value ? "[\u2713]" : "[ ]" }) });
21737
21665
  }
21738
21666
  function DefaultValueRow({ display, active }) {
21739
- return /* @__PURE__ */ jsxs31(Box30, { paddingLeft: 2, gap: 1, children: [
21740
- /* @__PURE__ */ jsx35(Text32, { dimColor: true, children: "default:" }),
21741
- active ? /* @__PURE__ */ jsx35(Picker, { value: display, active: true }) : /* @__PURE__ */ jsx35(Text32, { color: PALETTE.inverse, children: display })
21667
+ return /* @__PURE__ */ jsxs31(Box29, { paddingLeft: 2, gap: 1, children: [
21668
+ /* @__PURE__ */ jsx34(Text31, { dimColor: true, children: "default:" }),
21669
+ active ? /* @__PURE__ */ jsx34(Picker, { value: display, active: true }) : /* @__PURE__ */ jsx34(Text31, { color: PALETTE.inverse, children: display })
21742
21670
  ] });
21743
21671
  }
21744
21672
  function RowLabel({ name, selected }) {
21745
21673
  const nameDisplay = name.length > 14 ? name.slice(0, 13) + "\u2026" : name.padEnd(14);
21746
21674
  return /* @__PURE__ */ jsxs31(
21747
- Text32,
21675
+ Text31,
21748
21676
  {
21749
21677
  color: selected ? PALETTE.inverse : PALETTE.info,
21750
21678
  bold: selected,
@@ -21762,10 +21690,10 @@ function ValueInputRow({
21762
21690
  valueText,
21763
21691
  cursorVisible
21764
21692
  }) {
21765
- return /* @__PURE__ */ jsxs31(Box30, { paddingLeft: 2, children: [
21766
- /* @__PURE__ */ jsx35(Text32, { color: PALETTE.info, children: mode === "edit" ? "\u270E " : "+ " }),
21767
- /* @__PURE__ */ jsx35(Text32, { children: valueText }),
21768
- /* @__PURE__ */ jsx35(Text32, { inverse: cursorVisible, children: " " })
21693
+ return /* @__PURE__ */ jsxs31(Box29, { paddingLeft: 2, children: [
21694
+ /* @__PURE__ */ jsx34(Text31, { color: PALETTE.info, children: mode === "edit" ? "\u270E " : "+ " }),
21695
+ /* @__PURE__ */ jsx34(Text31, { children: valueText }),
21696
+ /* @__PURE__ */ jsx34(Text31, { inverse: cursorVisible, children: " " })
21769
21697
  ] });
21770
21698
  }
21771
21699
  function EditableListItem({
@@ -21778,9 +21706,9 @@ function EditableListItem({
21778
21706
  }) {
21779
21707
  const isBeingEdited = editingValue?.mode === "edit" && editingValue.index === index;
21780
21708
  if (isBeingEdited) {
21781
- return /* @__PURE__ */ jsx35(ValueInputRow, { mode: "edit", valueText, cursorVisible });
21709
+ return /* @__PURE__ */ jsx34(ValueInputRow, { mode: "edit", valueText, cursorVisible });
21782
21710
  }
21783
- return /* @__PURE__ */ jsx35(Box30, { gap: 1, paddingLeft: 2, children: /* @__PURE__ */ jsx35(Text32, { color: active ? PALETTE.info : PALETTE.inverse, children: active ? `${figures5.pointer} ${value}` : ` ${value}` }) });
21711
+ return /* @__PURE__ */ jsx34(Box29, { gap: 1, paddingLeft: 2, children: /* @__PURE__ */ jsx34(Text31, { color: active ? PALETTE.info : PALETTE.inverse, children: active ? `${figures5.pointer} ${value}` : ` ${value}` }) });
21784
21712
  }
21785
21713
  function EditableValueList({
21786
21714
  values,
@@ -21794,8 +21722,8 @@ function EditableValueList({
21794
21722
  showAddInput
21795
21723
  }) {
21796
21724
  return /* @__PURE__ */ jsxs31(Fragment9, { children: [
21797
- values.length === 0 && !editingValue && (emptyPaddingLeft === void 0 ? /* @__PURE__ */ jsx35(Text32, { dimColor: true, children: emptyMessage }) : /* @__PURE__ */ jsx35(Box30, { paddingLeft: emptyPaddingLeft, children: /* @__PURE__ */ jsx35(Text32, { dimColor: true, children: emptyMessage }) })),
21798
- values.map((value, index) => /* @__PURE__ */ jsx35(
21725
+ values.length === 0 && !editingValue && (emptyPaddingLeft === void 0 ? /* @__PURE__ */ jsx34(Text31, { dimColor: true, children: emptyMessage }) : /* @__PURE__ */ jsx34(Box29, { paddingLeft: emptyPaddingLeft, children: /* @__PURE__ */ jsx34(Text31, { dimColor: true, children: emptyMessage }) })),
21726
+ values.map((value, index) => /* @__PURE__ */ jsx34(
21799
21727
  EditableListItem,
21800
21728
  {
21801
21729
  value,
@@ -21807,7 +21735,7 @@ function EditableValueList({
21807
21735
  },
21808
21736
  index
21809
21737
  )),
21810
- showAddInput && editingValue?.mode === "add" && /* @__PURE__ */ jsx35(ValueInputRow, { mode: "add", valueText, cursorVisible })
21738
+ showAddInput && editingValue?.mode === "add" && /* @__PURE__ */ jsx34(ValueInputRow, { mode: "add", valueText, cursorVisible })
21811
21739
  ] });
21812
21740
  }
21813
21741
  function DefaultSubRow({
@@ -21818,39 +21746,39 @@ function DefaultSubRow({
21818
21746
  }) {
21819
21747
  const cursor = cursorVisible ? "\u2588" : " ";
21820
21748
  if (prop.type === "richtext" || prop.type === "media" || prop.type === "link") {
21821
- return /* @__PURE__ */ jsxs31(Box30, { paddingLeft: 2, gap: 1, children: [
21822
- /* @__PURE__ */ jsx35(Text32, { dimColor: true, children: "default:" }),
21823
- /* @__PURE__ */ jsx35(Text32, { dimColor: true, children: "(not applicable)" })
21749
+ return /* @__PURE__ */ jsxs31(Box29, { paddingLeft: 2, gap: 1, children: [
21750
+ /* @__PURE__ */ jsx34(Text31, { dimColor: true, children: "default:" }),
21751
+ /* @__PURE__ */ jsx34(Text31, { dimColor: true, children: "(not applicable)" })
21824
21752
  ] });
21825
21753
  }
21826
21754
  if (prop.type === "boolean") {
21827
21755
  const display = prop.default === true ? "true" : prop.default === false ? "false" : "(unset)";
21828
- return /* @__PURE__ */ jsx35(DefaultValueRow, { display, active });
21756
+ return /* @__PURE__ */ jsx34(DefaultValueRow, { display, active });
21829
21757
  }
21830
21758
  if (prop.type === "enum") {
21831
21759
  if (prop.values.length === 0) {
21832
- return /* @__PURE__ */ jsxs31(Box30, { paddingLeft: 2, gap: 1, children: [
21833
- /* @__PURE__ */ jsx35(Text32, { dimColor: true, children: "default:" }),
21834
- /* @__PURE__ */ jsx35(Text32, { dimColor: true, children: "(no values defined)" })
21760
+ return /* @__PURE__ */ jsxs31(Box29, { paddingLeft: 2, gap: 1, children: [
21761
+ /* @__PURE__ */ jsx34(Text31, { dimColor: true, children: "default:" }),
21762
+ /* @__PURE__ */ jsx34(Text31, { dimColor: true, children: "(no values defined)" })
21835
21763
  ] });
21836
21764
  }
21837
21765
  const display = typeof prop.default === "string" && prop.default !== "" ? prop.default : "(unset)";
21838
- return /* @__PURE__ */ jsx35(DefaultValueRow, { display, active });
21766
+ return /* @__PURE__ */ jsx34(DefaultValueRow, { display, active });
21839
21767
  }
21840
21768
  const value = typeof prop.default === "string" ? prop.default : "";
21841
21769
  if (active) {
21842
- return /* @__PURE__ */ jsxs31(Box30, { paddingLeft: 2, flexDirection: "row", children: [
21843
- /* @__PURE__ */ jsx35(Text32, { dimColor: true, children: "default:" }),
21844
- /* @__PURE__ */ jsxs31(Box30, { flexGrow: 1, borderStyle: "round", borderColor: PALETTE.info, paddingX: 1, children: [
21845
- /* @__PURE__ */ jsx35(Text32, { children: value.slice(0, textCursor) }),
21846
- /* @__PURE__ */ jsx35(Text32, { inverse: cursorVisible, children: value[textCursor] ?? cursor }),
21847
- /* @__PURE__ */ jsx35(Text32, { children: value.slice(textCursor + 1) })
21770
+ return /* @__PURE__ */ jsxs31(Box29, { paddingLeft: 2, flexDirection: "row", children: [
21771
+ /* @__PURE__ */ jsx34(Text31, { dimColor: true, children: "default:" }),
21772
+ /* @__PURE__ */ jsxs31(Box29, { flexGrow: 1, borderStyle: "round", borderColor: PALETTE.info, paddingX: 1, children: [
21773
+ /* @__PURE__ */ jsx34(Text31, { children: value.slice(0, textCursor) }),
21774
+ /* @__PURE__ */ jsx34(Text31, { inverse: cursorVisible, children: value[textCursor] ?? cursor }),
21775
+ /* @__PURE__ */ jsx34(Text31, { children: value.slice(textCursor + 1) })
21848
21776
  ] })
21849
21777
  ] });
21850
21778
  }
21851
- return /* @__PURE__ */ jsxs31(Box30, { paddingLeft: 2, gap: 1, children: [
21852
- /* @__PURE__ */ jsx35(Text32, { dimColor: true, children: "default:" }),
21853
- /* @__PURE__ */ jsx35(Text32, { color: value ? PALETTE.inverse : void 0, dimColor: !value, children: value || "(none)" })
21779
+ return /* @__PURE__ */ jsxs31(Box29, { paddingLeft: 2, gap: 1, children: [
21780
+ /* @__PURE__ */ jsx34(Text31, { dimColor: true, children: "default:" }),
21781
+ /* @__PURE__ */ jsx34(Text31, { color: value ? PALETTE.inverse : void 0, dimColor: !value, children: value || "(none)" })
21854
21782
  ] });
21855
21783
  }
21856
21784
  function PropRow({
@@ -21868,28 +21796,28 @@ function PropRow({
21868
21796
  }) {
21869
21797
  const cursor = cursorVisible ? "\u2588" : " ";
21870
21798
  const descActive = activeField === "description";
21871
- return /* @__PURE__ */ jsxs31(Box30, { flexDirection: "column", width, children: [
21872
- /* @__PURE__ */ jsxs31(Box30, { gap: 1, children: [
21873
- /* @__PURE__ */ jsx35(RowLabel, { name: prop.name, selected }),
21874
- /* @__PURE__ */ jsx35(Text32, { dimColor: !selected, children: "type:" }),
21875
- activeField === "type" ? /* @__PURE__ */ jsx35(Picker, { value: prop.type, active: true }) : /* @__PURE__ */ jsx35(Text32, { color: selected ? PALETTE.warning : PALETTE.inverse, children: prop.type }),
21876
- activeField === "category" && /* @__PURE__ */ jsx35(Picker, { value: prop.category, active: true }),
21877
- /* @__PURE__ */ jsx35(Text32, { dimColor: !selected, children: "req:" }),
21878
- activeField === "required" ? /* @__PURE__ */ jsx35(Toggle, { value: prop.required, active: true }) : /* @__PURE__ */ jsx35(Toggle, { value: prop.required, active: false }),
21799
+ return /* @__PURE__ */ jsxs31(Box29, { flexDirection: "column", width, children: [
21800
+ /* @__PURE__ */ jsxs31(Box29, { gap: 1, children: [
21801
+ /* @__PURE__ */ jsx34(RowLabel, { name: prop.name, selected }),
21802
+ /* @__PURE__ */ jsx34(Text31, { dimColor: !selected, children: "type:" }),
21803
+ activeField === "type" ? /* @__PURE__ */ jsx34(Picker, { value: prop.type, active: true }) : /* @__PURE__ */ jsx34(Text31, { color: selected ? PALETTE.warning : PALETTE.inverse, children: prop.type }),
21804
+ activeField === "category" && /* @__PURE__ */ jsx34(Picker, { value: prop.category, active: true }),
21805
+ /* @__PURE__ */ jsx34(Text31, { dimColor: !selected, children: "req:" }),
21806
+ activeField === "required" ? /* @__PURE__ */ jsx34(Toggle, { value: prop.required, active: true }) : /* @__PURE__ */ jsx34(Toggle, { value: prop.required, active: false }),
21879
21807
  prop.type === "enum" && /* @__PURE__ */ jsxs31(Fragment9, { children: [
21880
- /* @__PURE__ */ jsx35(Text32, { dimColor: !selected, children: "values:" }),
21881
- /* @__PURE__ */ jsxs31(Text32, { color: selected ? PALETTE.warning : PALETTE.inverse, children: [
21808
+ /* @__PURE__ */ jsx34(Text31, { dimColor: !selected, children: "values:" }),
21809
+ /* @__PURE__ */ jsxs31(Text31, { color: selected ? PALETTE.warning : PALETTE.inverse, children: [
21882
21810
  "[",
21883
21811
  prop.values.join(", "),
21884
21812
  "]"
21885
21813
  ] })
21886
21814
  ] }),
21887
21815
  prop.type === "token" && /* @__PURE__ */ jsxs31(Fragment9, { children: [
21888
- /* @__PURE__ */ jsx35(Text32, { dimColor: !selected, children: "kind:" }),
21889
- activeField === "tokenKind" ? /* @__PURE__ */ jsx35(Picker, { value: prop.tokenKind || DESIGN_TOKEN_TYPES2[0], active: true }) : /* @__PURE__ */ jsx35(Text32, { color: selected ? PALETTE.success : PALETTE.inverse, children: prop.tokenKind || "\u2014" })
21816
+ /* @__PURE__ */ jsx34(Text31, { dimColor: !selected, children: "kind:" }),
21817
+ activeField === "tokenKind" ? /* @__PURE__ */ jsx34(Picker, { value: prop.tokenKind || DESIGN_TOKEN_TYPES2[0], active: true }) : /* @__PURE__ */ jsx34(Text31, { color: selected ? PALETTE.success : PALETTE.inverse, children: prop.tokenKind || "\u2014" })
21890
21818
  ] })
21891
21819
  ] }),
21892
- selected && /* @__PURE__ */ jsx35(
21820
+ selected && /* @__PURE__ */ jsx34(
21893
21821
  DefaultSubRow,
21894
21822
  {
21895
21823
  prop,
@@ -21898,33 +21826,33 @@ function PropRow({
21898
21826
  cursorVisible
21899
21827
  }
21900
21828
  ),
21901
- selected && descActive && /* @__PURE__ */ jsxs31(Box30, { paddingLeft: 2, flexDirection: "row", children: [
21902
- /* @__PURE__ */ jsx35(Text32, { dimColor: true, children: "desc:" }),
21903
- /* @__PURE__ */ jsxs31(Box30, { flexGrow: 1, borderStyle: "round", borderColor: PALETTE.info, paddingX: 1, children: [
21904
- /* @__PURE__ */ jsx35(Text32, { children: prop.description.slice(0, textCursor) }),
21905
- /* @__PURE__ */ jsx35(Text32, { inverse: cursorVisible, children: prop.description[textCursor] ?? cursor }),
21906
- /* @__PURE__ */ jsx35(Text32, { children: prop.description.slice(textCursor + 1) })
21829
+ selected && descActive && /* @__PURE__ */ jsxs31(Box29, { paddingLeft: 2, flexDirection: "row", children: [
21830
+ /* @__PURE__ */ jsx34(Text31, { dimColor: true, children: "desc:" }),
21831
+ /* @__PURE__ */ jsxs31(Box29, { flexGrow: 1, borderStyle: "round", borderColor: PALETTE.info, paddingX: 1, children: [
21832
+ /* @__PURE__ */ jsx34(Text31, { children: prop.description.slice(0, textCursor) }),
21833
+ /* @__PURE__ */ jsx34(Text31, { inverse: cursorVisible, children: prop.description[textCursor] ?? cursor }),
21834
+ /* @__PURE__ */ jsx34(Text31, { children: prop.description.slice(textCursor + 1) })
21907
21835
  ] })
21908
21836
  ] }),
21909
- selected && !descActive && /* @__PURE__ */ jsxs31(Box30, { paddingLeft: 2, gap: 1, children: [
21910
- /* @__PURE__ */ jsx35(Text32, { dimColor: true, children: "desc:" }),
21911
- /* @__PURE__ */ jsx35(Text32, { color: PALETTE.success, children: prop.description || "\u2014" })
21837
+ selected && !descActive && /* @__PURE__ */ jsxs31(Box29, { paddingLeft: 2, gap: 1, children: [
21838
+ /* @__PURE__ */ jsx34(Text31, { dimColor: true, children: "desc:" }),
21839
+ /* @__PURE__ */ jsx34(Text31, { color: PALETTE.success, children: prop.description || "\u2014" })
21912
21840
  ] }),
21913
- selected && prop.type === "token" && prop.category === "design" && /* @__PURE__ */ jsxs31(Box30, { paddingLeft: 2, flexDirection: "row", gap: 1, children: [
21914
- /* @__PURE__ */ jsx35(Text32, { dimColor: true, children: "allowed:" }),
21915
- activeField === "allowed" ? /* @__PURE__ */ jsx35(Box30, { flexGrow: 1, borderStyle: "round", borderColor: PALETTE.info, paddingX: 1, children: /* @__PURE__ */ jsx35(Text32, { dimColor: true, children: "press [t] to edit allowed tokens" }) }) : /* @__PURE__ */ jsx35(Text32, { color: prop.allowed.length > 0 ? PALETTE.info : void 0, dimColor: prop.allowed.length === 0, children: prop.allowed.length > 0 ? prop.allowed.join(", ") : "(any)" })
21841
+ selected && prop.type === "token" && prop.category === "design" && /* @__PURE__ */ jsxs31(Box29, { paddingLeft: 2, flexDirection: "row", gap: 1, children: [
21842
+ /* @__PURE__ */ jsx34(Text31, { dimColor: true, children: "allowed:" }),
21843
+ activeField === "allowed" ? /* @__PURE__ */ jsx34(Box29, { flexGrow: 1, borderStyle: "round", borderColor: PALETTE.info, paddingX: 1, children: /* @__PURE__ */ jsx34(Text31, { dimColor: true, children: "press [t] to edit allowed tokens" }) }) : /* @__PURE__ */ jsx34(Text31, { color: prop.allowed.length > 0 ? PALETTE.info : void 0, dimColor: prop.allowed.length === 0, children: prop.allowed.length > 0 ? prop.allowed.join(", ") : "(any)" })
21916
21844
  ] }),
21917
- selected && rationale && rationale.trim().length > 0 && /* @__PURE__ */ jsx35(Box30, { paddingLeft: 2, children: /* @__PURE__ */ jsx35(Text32, { dimColor: true, children: (() => {
21845
+ selected && rationale && rationale.trim().length > 0 && /* @__PURE__ */ jsx34(Box29, { paddingLeft: 2, children: /* @__PURE__ */ jsx34(Text31, { dimColor: true, children: (() => {
21918
21846
  const max = Math.max(8, width - 8);
21919
21847
  const text = `~ ${rationale}`;
21920
21848
  return text.length > max ? text.slice(0, max - 1) + "\u2026" : text;
21921
21849
  })() }) }, rowKey ? `rationale-${rowKey}` : void 0),
21922
- selected && prop.type === "enum" && activeField === "values" && /* @__PURE__ */ jsxs31(Box30, { paddingLeft: 2, flexDirection: "column", children: [
21923
- /* @__PURE__ */ jsxs31(Box30, { children: [
21924
- /* @__PURE__ */ jsx35(Text32, { dimColor: true, children: "values:" }),
21925
- activeField === "values" && /* @__PURE__ */ jsx35(Text32, { dimColor: true, children: " [a]dd [e]dit [r]emove [\u2191\u2193] navigate [K/J] reorder" })
21850
+ selected && prop.type === "enum" && activeField === "values" && /* @__PURE__ */ jsxs31(Box29, { paddingLeft: 2, flexDirection: "column", children: [
21851
+ /* @__PURE__ */ jsxs31(Box29, { children: [
21852
+ /* @__PURE__ */ jsx34(Text31, { dimColor: true, children: "values:" }),
21853
+ activeField === "values" && /* @__PURE__ */ jsx34(Text31, { dimColor: true, children: " [a]dd [e]dit [r]emove [\u2191\u2193] navigate [K/J] reorder" })
21926
21854
  ] }),
21927
- /* @__PURE__ */ jsx35(
21855
+ /* @__PURE__ */ jsx34(
21928
21856
  EditableValueList,
21929
21857
  {
21930
21858
  values: prop.values,
@@ -21954,22 +21882,22 @@ function SlotRow({
21954
21882
  pickerCursor
21955
21883
  }) {
21956
21884
  const cursor = cursorVisible ? "\u2588" : " ";
21957
- return /* @__PURE__ */ jsxs31(Box30, { flexDirection: "column", width, children: [
21958
- /* @__PURE__ */ jsxs31(Box30, { gap: 1, children: [
21959
- /* @__PURE__ */ jsx35(RowLabel, { name: slot.name, selected }),
21960
- /* @__PURE__ */ jsx35(Text32, { dimColor: !selected, children: "req:" }),
21961
- activeField === "required" ? /* @__PURE__ */ jsx35(Toggle, { value: slot.required, active: true }) : /* @__PURE__ */ jsx35(Toggle, { value: slot.required, active: false })
21885
+ return /* @__PURE__ */ jsxs31(Box29, { flexDirection: "column", width, children: [
21886
+ /* @__PURE__ */ jsxs31(Box29, { gap: 1, children: [
21887
+ /* @__PURE__ */ jsx34(RowLabel, { name: slot.name, selected }),
21888
+ /* @__PURE__ */ jsx34(Text31, { dimColor: !selected, children: "req:" }),
21889
+ activeField === "required" ? /* @__PURE__ */ jsx34(Toggle, { value: slot.required, active: true }) : /* @__PURE__ */ jsx34(Toggle, { value: slot.required, active: false })
21962
21890
  ] }),
21963
- !selected && /* @__PURE__ */ jsxs31(Box30, { paddingLeft: 2, gap: 1, children: [
21964
- /* @__PURE__ */ jsx35(Text32, { dimColor: true, children: "allowed:" }),
21965
- slot.allowedComponents.length === 0 ? /* @__PURE__ */ jsx35(Text32, { dimColor: true, children: "(any)" }) : /* @__PURE__ */ jsx35(Text32, { color: PALETTE.info, children: slot.allowedComponents.join(", ") })
21891
+ !selected && /* @__PURE__ */ jsxs31(Box29, { paddingLeft: 2, gap: 1, children: [
21892
+ /* @__PURE__ */ jsx34(Text31, { dimColor: true, children: "allowed:" }),
21893
+ slot.allowedComponents.length === 0 ? /* @__PURE__ */ jsx34(Text31, { dimColor: true, children: "(any)" }) : /* @__PURE__ */ jsx34(Text31, { color: PALETTE.info, children: slot.allowedComponents.join(", ") })
21966
21894
  ] }),
21967
- selected && /* @__PURE__ */ jsxs31(Box30, { paddingLeft: 2, flexDirection: "column", children: [
21968
- /* @__PURE__ */ jsxs31(Box30, { children: [
21969
- /* @__PURE__ */ jsx35(Text32, { dimColor: true, children: "allowed:" }),
21970
- activeField === "allowedComponents" && /* @__PURE__ */ jsx35(Text32, { dimColor: true, children: slot.allowedComponents.length > 0 ? " [a]dd [e]dit [r]emove [\u2190\u2192] cycle [\u2191\u2193] navigate [K/J] reorder" : " [a]dd [e]dit [r]emove [\u2191\u2193] navigate [K/J] reorder" })
21895
+ selected && /* @__PURE__ */ jsxs31(Box29, { paddingLeft: 2, flexDirection: "column", children: [
21896
+ /* @__PURE__ */ jsxs31(Box29, { children: [
21897
+ /* @__PURE__ */ jsx34(Text31, { dimColor: true, children: "allowed:" }),
21898
+ activeField === "allowedComponents" && /* @__PURE__ */ jsx34(Text31, { dimColor: true, children: slot.allowedComponents.length > 0 ? " [a]dd [e]dit [r]emove [\u2190\u2192] cycle [\u2191\u2193] navigate [K/J] reorder" : " [a]dd [e]dit [r]emove [\u2191\u2193] navigate [K/J] reorder" })
21971
21899
  ] }),
21972
- /* @__PURE__ */ jsx35(
21900
+ /* @__PURE__ */ jsx34(
21973
21901
  EditableValueList,
21974
21902
  {
21975
21903
  values: slot.allowedComponents,
@@ -21983,36 +21911,36 @@ function SlotRow({
21983
21911
  showAddInput: activeField === "allowedComponents"
21984
21912
  }
21985
21913
  ),
21986
- editingValue?.mode === "add" && activeField === "allowedComponents" && pickerCandidates !== null && /* @__PURE__ */ jsx35(Box30, { paddingLeft: 2, flexDirection: "column", children: pickerCandidates.length === 0 ? /* @__PURE__ */ jsx35(Text32, { dimColor: true, children: "(no valid components to add \u2014 all remaining candidates would create cycles)" }) : (() => {
21914
+ editingValue?.mode === "add" && activeField === "allowedComponents" && pickerCandidates !== null && /* @__PURE__ */ jsx34(Box29, { paddingLeft: 2, flexDirection: "column", children: pickerCandidates.length === 0 ? /* @__PURE__ */ jsx34(Text31, { dimColor: true, children: "(no valid components to add \u2014 all remaining candidates would create cycles)" }) : (() => {
21987
21915
  const filtered = valueText.length === 0 ? pickerCandidates : pickerCandidates.filter((n) => n.toLowerCase().includes(valueText.toLowerCase()));
21988
21916
  if (filtered.length === 0) {
21989
- return /* @__PURE__ */ jsx35(Text32, { dimColor: true, children: "(no candidates match \u2014 Enter to add as free text)" });
21917
+ return /* @__PURE__ */ jsx34(Text31, { dimColor: true, children: "(no candidates match \u2014 Enter to add as free text)" });
21990
21918
  }
21991
21919
  const cursor2 = pickerCursor % filtered.length;
21992
21920
  const MAX_VISIBLE = 5;
21993
21921
  const start = Math.max(0, Math.min(filtered.length - MAX_VISIBLE, cursor2 - 2));
21994
21922
  const slice = filtered.slice(start, start + MAX_VISIBLE);
21995
- return /* @__PURE__ */ jsxs31(Box30, { flexDirection: "column", children: [
21996
- /* @__PURE__ */ jsx35(Text32, { dimColor: true, children: " candidates (\u2191\u2193 cycle, Enter to add):" }),
21923
+ return /* @__PURE__ */ jsxs31(Box29, { flexDirection: "column", children: [
21924
+ /* @__PURE__ */ jsx34(Text31, { dimColor: true, children: " candidates (\u2191\u2193 cycle, Enter to add):" }),
21997
21925
  slice.map((name, i) => {
21998
21926
  const absIdx = start + i;
21999
21927
  const isCursor = absIdx === cursor2;
22000
- return /* @__PURE__ */ jsx35(Text32, { color: isCursor ? PALETTE.info : void 0, dimColor: !isCursor, children: isCursor ? ` ${figures5.pointer} ${name}` : ` ${name}` }, name);
21928
+ return /* @__PURE__ */ jsx34(Text31, { color: isCursor ? PALETTE.info : void 0, dimColor: !isCursor, children: isCursor ? ` ${figures5.pointer} ${name}` : ` ${name}` }, name);
22001
21929
  })
22002
21930
  ] });
22003
21931
  })() })
22004
21932
  ] }),
22005
- selected && activeField === "description" && /* @__PURE__ */ jsxs31(Box30, { paddingLeft: 2, flexDirection: "row", children: [
22006
- /* @__PURE__ */ jsx35(Text32, { dimColor: true, children: "desc:" }),
22007
- /* @__PURE__ */ jsxs31(Box30, { flexGrow: 1, borderStyle: "round", borderColor: PALETTE.info, paddingX: 1, children: [
22008
- /* @__PURE__ */ jsx35(Text32, { children: slot.description.slice(0, textCursor) }),
22009
- /* @__PURE__ */ jsx35(Text32, { inverse: cursorVisible, children: slot.description[textCursor] ?? cursor }),
22010
- /* @__PURE__ */ jsx35(Text32, { children: slot.description.slice(textCursor + 1) })
21933
+ selected && activeField === "description" && /* @__PURE__ */ jsxs31(Box29, { paddingLeft: 2, flexDirection: "row", children: [
21934
+ /* @__PURE__ */ jsx34(Text31, { dimColor: true, children: "desc:" }),
21935
+ /* @__PURE__ */ jsxs31(Box29, { flexGrow: 1, borderStyle: "round", borderColor: PALETTE.info, paddingX: 1, children: [
21936
+ /* @__PURE__ */ jsx34(Text31, { children: slot.description.slice(0, textCursor) }),
21937
+ /* @__PURE__ */ jsx34(Text31, { inverse: cursorVisible, children: slot.description[textCursor] ?? cursor }),
21938
+ /* @__PURE__ */ jsx34(Text31, { children: slot.description.slice(textCursor + 1) })
22011
21939
  ] })
22012
21940
  ] }),
22013
- selected && activeField !== "description" && /* @__PURE__ */ jsxs31(Box30, { paddingLeft: 2, gap: 1, children: [
22014
- /* @__PURE__ */ jsx35(Text32, { dimColor: true, children: "desc:" }),
22015
- /* @__PURE__ */ jsx35(Text32, { color: PALETTE.success, children: slot.description || "\u2014" })
21941
+ selected && activeField !== "description" && /* @__PURE__ */ jsxs31(Box29, { paddingLeft: 2, gap: 1, children: [
21942
+ /* @__PURE__ */ jsx34(Text31, { dimColor: true, children: "desc:" }),
21943
+ /* @__PURE__ */ jsx34(Text31, { color: PALETTE.success, children: slot.description || "\u2014" })
22016
21944
  ] })
22017
21945
  ] });
22018
21946
  }
@@ -22796,18 +22724,18 @@ function FieldEditor({
22796
22724
  });
22797
22725
  const innerWidth = Math.max(1, width - 2);
22798
22726
  if (parseErr) {
22799
- return /* @__PURE__ */ jsxs31(Box30, { flexDirection: "column", width, borderStyle: "single", borderColor: PALETTE.error, children: [
22800
- /* @__PURE__ */ jsx35(Text32, { bold: true, color: PALETTE.error, children: "FIELD EDITOR \u2014 parse error" }),
22801
- /* @__PURE__ */ jsx35(Text32, { color: PALETTE.error, children: parseErr }),
22802
- /* @__PURE__ */ jsx35(Text32, { dimColor: true, children: "Cannot display structured editor. Fix the JSON first." })
22727
+ return /* @__PURE__ */ jsxs31(Box29, { flexDirection: "column", width, borderStyle: "single", borderColor: PALETTE.error, children: [
22728
+ /* @__PURE__ */ jsx34(Text31, { bold: true, color: PALETTE.error, children: "FIELD EDITOR \u2014 parse error" }),
22729
+ /* @__PURE__ */ jsx34(Text31, { color: PALETTE.error, children: parseErr }),
22730
+ /* @__PURE__ */ jsx34(Text31, { dimColor: true, children: "Cannot display structured editor. Fix the JSON first." })
22803
22731
  ] });
22804
22732
  }
22805
22733
  if (props.length === 0 && slots.length === 0) {
22806
- return /* @__PURE__ */ jsxs31(Box30, { flexDirection: "column", width, borderStyle: "single", borderColor: PALETTE.warning, children: [
22807
- /* @__PURE__ */ jsx35(Text32, { bold: true, color: PALETTE.warning, children: "FIELD EDITOR \u2014 no fields" }),
22808
- /* @__PURE__ */ jsx35(Text32, { color: PALETTE.warning, children: "\u26A0 No properties classified for this component. The LLM didn't find anything to classify." }),
22809
- /* @__PURE__ */ jsx35(Text32, { dimColor: true, children: "You can add fields manually below or reject this component." }),
22810
- /* @__PURE__ */ jsx35(Text32, { dimColor: true, children: "Ctrl+S to save \xB7 Esc to discard" })
22734
+ return /* @__PURE__ */ jsxs31(Box29, { flexDirection: "column", width, borderStyle: "single", borderColor: PALETTE.warning, children: [
22735
+ /* @__PURE__ */ jsx34(Text31, { bold: true, color: PALETTE.warning, children: "FIELD EDITOR \u2014 no fields" }),
22736
+ /* @__PURE__ */ jsx34(Text31, { color: PALETTE.warning, children: "\u26A0 No properties classified for this component. The LLM didn't find anything to classify." }),
22737
+ /* @__PURE__ */ jsx34(Text31, { dimColor: true, children: "You can add fields manually below or reject this component." }),
22738
+ /* @__PURE__ */ jsx34(Text31, { dimColor: true, children: "Ctrl+S to save \xB7 Esc to discard" })
22811
22739
  ] });
22812
22740
  }
22813
22741
  const hasEmptyProperties = props.length === 0 && slots.length === 0;
@@ -22859,25 +22787,25 @@ function FieldEditor({
22859
22787
  const scrollStart = selectedRowIdx < 0 ? 0 : Math.max(0, Math.min(selectedRowIdx, rows.length - visibleRows));
22860
22788
  const visibleRowSlice = rows.slice(scrollStart, scrollStart + visibleRows);
22861
22789
  return /* @__PURE__ */ jsxs31(
22862
- Box30,
22790
+ Box29,
22863
22791
  {
22864
22792
  flexDirection: "column",
22865
22793
  width,
22866
22794
  borderStyle: "single",
22867
22795
  borderColor: hasEmptyProperties ? PALETTE.warning : PALETTE.info,
22868
22796
  children: [
22869
- hasEmptyProperties && /* @__PURE__ */ jsx35(Text32, { 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." }),
22870
- /* @__PURE__ */ jsx35(Box30, { flexDirection: "column", width: innerWidth, children: visibleRowSlice.map((row, i) => {
22797
+ hasEmptyProperties && /* @__PURE__ */ jsx34(Text31, { color: PALETTE.warning, children: "\u26A0 No properties classified for this component. The LLM didn't find anything to classify. Reject this component or add fields manually." }),
22798
+ /* @__PURE__ */ jsx34(Box29, { flexDirection: "column", width: innerWidth, children: visibleRowSlice.map((row, i) => {
22871
22799
  if (row.kind === "header") {
22872
- return /* @__PURE__ */ jsx35(Text32, { bold: true, color: PALETTE.success, children: row.label }, `header-${i}`);
22800
+ return /* @__PURE__ */ jsx34(Text31, { bold: true, color: PALETTE.success, children: row.label }, `header-${i}`);
22873
22801
  }
22874
22802
  if (row.kind === "component-description") {
22875
22803
  const isSelected2 = inComponentDesc;
22876
22804
  const isEditing = isSelected2 && focusLevel === "field" && activeField === "description";
22877
22805
  const desc = editorState.componentDescription;
22878
- return /* @__PURE__ */ jsx35(Box30, { flexDirection: "column", children: /* @__PURE__ */ jsxs31(Box30, { gap: 1, children: [
22879
- /* @__PURE__ */ jsx35(
22880
- Text32,
22806
+ return /* @__PURE__ */ jsx34(Box29, { flexDirection: "column", children: /* @__PURE__ */ jsxs31(Box29, { gap: 1, children: [
22807
+ /* @__PURE__ */ jsx34(
22808
+ Text31,
22881
22809
  {
22882
22810
  color: isSelected2 ? PALETTE.inverse : PALETTE.info,
22883
22811
  bold: isSelected2,
@@ -22885,18 +22813,18 @@ function FieldEditor({
22885
22813
  children: " description: "
22886
22814
  }
22887
22815
  ),
22888
- isEditing ? /* @__PURE__ */ jsxs31(Box30, { flexGrow: 1, borderStyle: "round", borderColor: PALETTE.info, paddingX: 1, children: [
22889
- /* @__PURE__ */ jsx35(Text32, { children: desc.slice(0, textCursor) }),
22890
- /* @__PURE__ */ jsx35(Text32, { inverse: cursorVisible, children: desc[textCursor] ?? (cursorVisible ? "\u2588" : " ") }),
22891
- /* @__PURE__ */ jsx35(Text32, { children: desc.slice(textCursor + 1) })
22892
- ] }) : /* @__PURE__ */ jsx35(Text32, { color: isSelected2 ? PALETTE.warning : PALETTE.inverse, dimColor: !desc, children: desc || "(none \u2014 Return to edit)" })
22816
+ isEditing ? /* @__PURE__ */ jsxs31(Box29, { flexGrow: 1, borderStyle: "round", borderColor: PALETTE.info, paddingX: 1, children: [
22817
+ /* @__PURE__ */ jsx34(Text31, { children: desc.slice(0, textCursor) }),
22818
+ /* @__PURE__ */ jsx34(Text31, { inverse: cursorVisible, children: desc[textCursor] ?? (cursorVisible ? "\u2588" : " ") }),
22819
+ /* @__PURE__ */ jsx34(Text31, { children: desc.slice(textCursor + 1) })
22820
+ ] }) : /* @__PURE__ */ jsx34(Text31, { color: isSelected2 ? PALETTE.warning : PALETTE.inverse, dimColor: !desc, children: desc || "(none \u2014 Return to edit)" })
22893
22821
  ] }) }, `component-description-${i}`);
22894
22822
  }
22895
22823
  if (row.kind === "prop") {
22896
22824
  const p = props[row.idx];
22897
22825
  const isSelected2 = !inSlots && !inComponentDesc && row.idx === propIdx;
22898
22826
  const propMeta = metadata?.props?.[p.name];
22899
- return /* @__PURE__ */ jsx35(
22827
+ return /* @__PURE__ */ jsx34(
22900
22828
  PropRow,
22901
22829
  {
22902
22830
  prop: p,
@@ -22917,7 +22845,7 @@ function FieldEditor({
22917
22845
  const s = slots[row.idx];
22918
22846
  const isSelected = inSlots && row.idx === slotIdx;
22919
22847
  const slotPickerCandidates = isSelected && editingValue?.mode === "add" && activeField === "allowedComponents" && projectSlotGraph && currentComponentName ? computeAllowedComponentCandidates(projectSlotGraph, currentComponentName, slots, s.name) : null;
22920
- return /* @__PURE__ */ jsx35(
22848
+ return /* @__PURE__ */ jsx34(
22921
22849
  SlotRow,
22922
22850
  {
22923
22851
  slot: s,
@@ -22943,50 +22871,50 @@ function FieldEditor({
22943
22871
  const src = metadata?.componentSource ?? null;
22944
22872
  const headerPath = path ?? "<unknown source path>";
22945
22873
  if (!start || !end || !src) {
22946
- return /* @__PURE__ */ jsxs31(Box30, { flexDirection: "column", borderStyle: "single", borderColor: "gray", paddingX: 1, children: [
22947
- /* @__PURE__ */ jsx35(Text32, { dimColor: true, bold: true, children: `source: ${headerPath}` }),
22948
- /* @__PURE__ */ jsx35(Text32, { dimColor: true, children: "(no source location captured for this prop)" }),
22949
- /* @__PURE__ */ jsx35(Text32, { dimColor: true, children: "[s] close" })
22874
+ return /* @__PURE__ */ jsxs31(Box29, { flexDirection: "column", borderStyle: "single", borderColor: "gray", paddingX: 1, children: [
22875
+ /* @__PURE__ */ jsx34(Text31, { dimColor: true, bold: true, children: `source: ${headerPath}` }),
22876
+ /* @__PURE__ */ jsx34(Text31, { dimColor: true, children: "(no source location captured for this prop)" }),
22877
+ /* @__PURE__ */ jsx34(Text31, { dimColor: true, children: "[s] close" })
22950
22878
  ] });
22951
22879
  }
22952
22880
  const lines = src.split("\n").slice(Math.max(0, start - 1), end);
22953
- return /* @__PURE__ */ jsxs31(Box30, { flexDirection: "column", borderStyle: "single", borderColor: "gray", paddingX: 1, children: [
22954
- /* @__PURE__ */ jsx35(Text32, { dimColor: true, bold: true, children: `${headerPath}: lines ${start}\u2013${end}` }),
22955
- lines.map((ln, i) => /* @__PURE__ */ jsx35(Text32, { dimColor: true, children: ln }, `source-line-${i}`)),
22956
- /* @__PURE__ */ jsx35(Text32, { dimColor: true, children: "[s] close \xB7 [Esc] close" })
22881
+ return /* @__PURE__ */ jsxs31(Box29, { flexDirection: "column", borderStyle: "single", borderColor: "gray", paddingX: 1, children: [
22882
+ /* @__PURE__ */ jsx34(Text31, { dimColor: true, bold: true, children: `${headerPath}: lines ${start}\u2013${end}` }),
22883
+ lines.map((ln, i) => /* @__PURE__ */ jsx34(Text31, { dimColor: true, children: ln }, `source-line-${i}`)),
22884
+ /* @__PURE__ */ jsx34(Text31, { dimColor: true, children: "[s] close \xB7 [Esc] close" })
22957
22885
  ] });
22958
22886
  })(),
22959
- showHelp && /* @__PURE__ */ jsxs31(Box30, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.info, paddingX: 1, children: [
22960
- /* @__PURE__ */ jsx35(Text32, { bold: true, color: PALETTE.info, children: "Keybindings" }),
22961
- /* @__PURE__ */ jsx35(Text32, { children: " " }),
22962
- /* @__PURE__ */ jsx35(Text32, { bold: true, children: "Row navigation" }),
22963
- /* @__PURE__ */ jsx35(Text32, { children: " \u2191/\u2193 or j/k move between rows" }),
22964
- /* @__PURE__ */ jsx35(Text32, { children: " Enter edit fields on the current row" }),
22965
- /* @__PURE__ */ jsx35(Text32, { children: " Esc exit the panel" }),
22966
- /* @__PURE__ */ jsx35(Text32, { children: " " }),
22967
- /* @__PURE__ */ jsx35(Text32, { bold: true, children: "Field editing" }),
22968
- /* @__PURE__ */ jsx35(Text32, { children: " \u2191/\u2193 or j/k cycle through fields (j/k literal in text inputs)" }),
22969
- /* @__PURE__ */ jsx35(Text32, { children: " \u2190/\u2192 cycle picker values \xB7 move cursor in text inputs" }),
22970
- /* @__PURE__ */ jsx35(Text32, { children: " Space/Enter toggle required" }),
22971
- /* @__PURE__ */ jsx35(Text32, { children: " Type edit description / string default" }),
22972
- /* @__PURE__ */ jsx35(Text32, { children: " Ctrl+S save changes" }),
22973
- /* @__PURE__ */ jsx35(Text32, { children: " Esc exit field-edit back to the row" }),
22974
- /* @__PURE__ */ jsx35(Text32, { children: " " }),
22975
- /* @__PURE__ */ jsx35(Text32, { bold: true, children: "Values / allowedComponents" }),
22976
- /* @__PURE__ */ jsx35(Text32, { children: " a / e / r add \xB7 edit \xB7 remove" }),
22977
- /* @__PURE__ */ jsx35(Text32, { children: " \u2191\u2193 or j/k navigate the list" }),
22978
- /* @__PURE__ */ jsx35(Text32, { children: " K / J reorder up \xB7 down" }),
22979
- /* @__PURE__ */ jsx35(Text32, { children: " " }),
22980
- /* @__PURE__ */ jsx35(Text32, { bold: true, children: "Panels" }),
22981
- /* @__PURE__ */ jsx35(Text32, { children: " s toggle source-view for the current prop" }),
22982
- /* @__PURE__ */ jsx35(Text32, { children: " " + propRationaleKey.padEnd(16) + " toggle prop rationale panel" }),
22983
- /* @__PURE__ */ jsx35(Text32, { children: " " + componentRationaleKey.padEnd(16) + " toggle component rationale panel" }),
22984
- /* @__PURE__ */ jsx35(Text32, { children: " ? toggle this overlay" }),
22985
- /* @__PURE__ */ jsx35(Text32, { children: " " }),
22986
- /* @__PURE__ */ jsx35(Text32, { dimColor: true, children: "press ? or Esc to close" })
22887
+ showHelp && /* @__PURE__ */ jsxs31(Box29, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.info, paddingX: 1, children: [
22888
+ /* @__PURE__ */ jsx34(Text31, { bold: true, color: PALETTE.info, children: "Keybindings" }),
22889
+ /* @__PURE__ */ jsx34(Text31, { children: " " }),
22890
+ /* @__PURE__ */ jsx34(Text31, { bold: true, children: "Row navigation" }),
22891
+ /* @__PURE__ */ jsx34(Text31, { children: " \u2191/\u2193 or j/k move between rows" }),
22892
+ /* @__PURE__ */ jsx34(Text31, { children: " Enter edit fields on the current row" }),
22893
+ /* @__PURE__ */ jsx34(Text31, { children: " Esc exit the panel" }),
22894
+ /* @__PURE__ */ jsx34(Text31, { children: " " }),
22895
+ /* @__PURE__ */ jsx34(Text31, { bold: true, children: "Field editing" }),
22896
+ /* @__PURE__ */ jsx34(Text31, { children: " \u2191/\u2193 or j/k cycle through fields (j/k literal in text inputs)" }),
22897
+ /* @__PURE__ */ jsx34(Text31, { children: " \u2190/\u2192 cycle picker values \xB7 move cursor in text inputs" }),
22898
+ /* @__PURE__ */ jsx34(Text31, { children: " Space/Enter toggle required" }),
22899
+ /* @__PURE__ */ jsx34(Text31, { children: " Type edit description / string default" }),
22900
+ /* @__PURE__ */ jsx34(Text31, { children: " Ctrl+S save changes" }),
22901
+ /* @__PURE__ */ jsx34(Text31, { children: " Esc exit field-edit back to the row" }),
22902
+ /* @__PURE__ */ jsx34(Text31, { children: " " }),
22903
+ /* @__PURE__ */ jsx34(Text31, { bold: true, children: "Values / allowedComponents" }),
22904
+ /* @__PURE__ */ jsx34(Text31, { children: " a / e / r add \xB7 edit \xB7 remove" }),
22905
+ /* @__PURE__ */ jsx34(Text31, { children: " \u2191\u2193 or j/k navigate the list" }),
22906
+ /* @__PURE__ */ jsx34(Text31, { children: " K / J reorder up \xB7 down" }),
22907
+ /* @__PURE__ */ jsx34(Text31, { children: " " }),
22908
+ /* @__PURE__ */ jsx34(Text31, { bold: true, children: "Panels" }),
22909
+ /* @__PURE__ */ jsx34(Text31, { children: " s toggle source-view for the current prop" }),
22910
+ /* @__PURE__ */ jsx34(Text31, { children: " " + propRationaleKey.padEnd(16) + " toggle prop rationale panel" }),
22911
+ /* @__PURE__ */ jsx34(Text31, { children: " " + componentRationaleKey.padEnd(16) + " toggle component rationale panel" }),
22912
+ /* @__PURE__ */ jsx34(Text31, { children: " ? toggle this overlay" }),
22913
+ /* @__PURE__ */ jsx34(Text31, { children: " " }),
22914
+ /* @__PURE__ */ jsx34(Text31, { dimColor: true, children: "press ? or Esc to close" })
22987
22915
  ] }),
22988
- validationError && /* @__PURE__ */ jsx35(Text32, { color: PALETTE.error, children: "\u2717 " + validationError }),
22989
- /* @__PURE__ */ jsx35(Text32, { dimColor: true, children: modeLabel })
22916
+ validationError && /* @__PURE__ */ jsx34(Text31, { color: PALETTE.error, children: "\u2717 " + validationError }),
22917
+ /* @__PURE__ */ jsx34(Text31, { dimColor: true, children: modeLabel })
22990
22918
  ]
22991
22919
  }
22992
22920
  );
@@ -23041,23 +22969,23 @@ var init_wrap_text = __esm({
23041
22969
  });
23042
22970
 
23043
22971
  // packages/experience-design-system-cli/src/analyze/select/tui/components/RationaleLine.tsx
23044
- import { Box as Box31, Text as Text33 } from "ink";
23045
- import { jsx as jsx36, jsxs as jsxs32 } from "react/jsx-runtime";
22972
+ import { Box as Box30, Text as Text32 } from "ink";
22973
+ import { jsx as jsx35, jsxs as jsxs32 } from "react/jsx-runtime";
23046
22974
  function RationaleLine({ line, active }) {
23047
22975
  if (line.kind === "blank") {
23048
- return /* @__PURE__ */ jsx36(Box31, { children: /* @__PURE__ */ jsx36(Text33, { children: " " }) });
22976
+ return /* @__PURE__ */ jsx35(Box30, { children: /* @__PURE__ */ jsx35(Text32, { children: " " }) });
23049
22977
  }
23050
22978
  if (line.kind === "heading") {
23051
- return /* @__PURE__ */ jsx36(Box31, { children: /* @__PURE__ */ jsx36(Text33, { bold: true, color: PALETTE.info, dimColor: !active, children: line.text }) });
22979
+ return /* @__PURE__ */ jsx35(Box30, { children: /* @__PURE__ */ jsx35(Text32, { bold: true, color: PALETTE.info, dimColor: !active, children: line.text }) });
23052
22980
  }
23053
22981
  if (line.kind === "label") {
23054
- return /* @__PURE__ */ jsxs32(Box31, { children: [
23055
- line.prefix && /* @__PURE__ */ jsx36(Text33, { children: line.prefix }),
23056
- /* @__PURE__ */ jsx36(Text33, { bold: true, color: line.color, dimColor: !active, children: line.text }),
23057
- line.suffix && /* @__PURE__ */ jsx36(Text33, { dimColor: true, children: line.suffix })
22982
+ return /* @__PURE__ */ jsxs32(Box30, { children: [
22983
+ line.prefix && /* @__PURE__ */ jsx35(Text32, { children: line.prefix }),
22984
+ /* @__PURE__ */ jsx35(Text32, { bold: true, color: line.color, dimColor: !active, children: line.text }),
22985
+ line.suffix && /* @__PURE__ */ jsx35(Text32, { dimColor: true, children: line.suffix })
23058
22986
  ] });
23059
22987
  }
23060
- return /* @__PURE__ */ jsx36(Box31, { children: /* @__PURE__ */ jsx36(Text33, { dimColor: !active || line.dim, children: line.text }) });
22988
+ return /* @__PURE__ */ jsx35(Box30, { children: /* @__PURE__ */ jsx35(Text32, { dimColor: !active || line.dim, children: line.text }) });
23061
22989
  }
23062
22990
  var init_RationaleLine = __esm({
23063
22991
  "packages/experience-design-system-cli/src/analyze/select/tui/components/RationaleLine.tsx"() {
@@ -23067,8 +22995,8 @@ var init_RationaleLine = __esm({
23067
22995
  });
23068
22996
 
23069
22997
  // packages/experience-design-system-cli/src/analyze/select/tui/components/ComponentRationalePanel.tsx
23070
- import { Box as Box32, Text as Text34 } from "ink";
23071
- import { jsx as jsx37, jsxs as jsxs33 } from "react/jsx-runtime";
22998
+ import { Box as Box31, Text as Text33 } from "ink";
22999
+ import { jsx as jsx36, jsxs as jsxs33 } from "react/jsx-runtime";
23072
23000
  function renderComponentRationaleLines(data, innerWidth) {
23073
23001
  const out = [];
23074
23002
  const pushSection = (heading, body) => {
@@ -23136,7 +23064,7 @@ function ComponentRationalePanel({
23136
23064
  const visibleStart = totalLines === 0 ? 0 : scrollOffset + 1;
23137
23065
  const visibleEnd = Math.min(totalLines, scrollOffset + contentHeight);
23138
23066
  return /* @__PURE__ */ jsxs33(
23139
- Box32,
23067
+ Box31,
23140
23068
  {
23141
23069
  flexDirection: "column",
23142
23070
  width,
@@ -23144,9 +23072,9 @@ function ComponentRationalePanel({
23144
23072
  borderStyle: "single",
23145
23073
  borderColor: active ? PALETTE.inverse : void 0,
23146
23074
  children: [
23147
- /* @__PURE__ */ jsx37(Box32, { children: /* @__PURE__ */ jsx37(Text34, { bold: true, dimColor: !active, children: `Component rationale: ${data.name}` }) }),
23148
- visible.map((line, i) => /* @__PURE__ */ jsx37(RationaleLine, { line, active }, i)),
23149
- /* @__PURE__ */ jsx37(Box32, { children: overflowed ? /* @__PURE__ */ jsx37(Text34, { dimColor: true, children: `${visibleStart}-${visibleEnd}/${totalLines} [j/k] scroll [I/Esc] close` }) : /* @__PURE__ */ jsx37(Text34, { dimColor: true, children: "[I/Esc] close" }) })
23075
+ /* @__PURE__ */ jsx36(Box31, { children: /* @__PURE__ */ jsx36(Text33, { bold: true, dimColor: !active, children: `Component rationale: ${data.name}` }) }),
23076
+ visible.map((line, i) => /* @__PURE__ */ jsx36(RationaleLine, { line, active }, i)),
23077
+ /* @__PURE__ */ jsx36(Box31, { children: overflowed ? /* @__PURE__ */ jsx36(Text33, { dimColor: true, children: `${visibleStart}-${visibleEnd}/${totalLines} [j/k] scroll [I/Esc] close` }) : /* @__PURE__ */ jsx36(Text33, { dimColor: true, children: "[I/Esc] close" }) })
23150
23078
  ]
23151
23079
  }
23152
23080
  );
@@ -23163,10 +23091,10 @@ var init_ComponentRationalePanel = __esm({
23163
23091
  });
23164
23092
 
23165
23093
  // packages/experience-design-system-cli/src/analyze/select/tui/components/HighlightedLine.tsx
23166
- import { Text as Text35 } from "ink";
23167
- import { Fragment as Fragment10, jsx as jsx38 } from "react/jsx-runtime";
23094
+ import { Text as Text34 } from "ink";
23095
+ import { Fragment as Fragment10, jsx as jsx37 } from "react/jsx-runtime";
23168
23096
  function HighlightedLine({ parts }) {
23169
- return /* @__PURE__ */ jsx38(Fragment10, { children: parts.map((part, i) => /* @__PURE__ */ jsx38(Text35, { color: part.color, dimColor: part.dim, children: part.text }, i)) });
23097
+ return /* @__PURE__ */ jsx37(Fragment10, { children: parts.map((part, i) => /* @__PURE__ */ jsx37(Text34, { color: part.color, dimColor: part.dim, children: part.text }, i)) });
23170
23098
  }
23171
23099
  var init_HighlightedLine = __esm({
23172
23100
  "packages/experience-design-system-cli/src/analyze/select/tui/components/HighlightedLine.tsx"() {
@@ -23175,8 +23103,8 @@ var init_HighlightedLine = __esm({
23175
23103
  });
23176
23104
 
23177
23105
  // packages/experience-design-system-cli/src/analyze/select/tui/components/ScrollablePanel.tsx
23178
- import { Box as Box33, Text as Text36 } from "ink";
23179
- import { Fragment as Fragment11, jsx as jsx39, jsxs as jsxs34 } from "react/jsx-runtime";
23106
+ import { Box as Box32, Text as Text35 } from "ink";
23107
+ import { Fragment as Fragment11, jsx as jsx38, jsxs as jsxs34 } from "react/jsx-runtime";
23180
23108
  function ScrollablePanel({
23181
23109
  header,
23182
23110
  width,
@@ -23189,12 +23117,12 @@ function ScrollablePanel({
23189
23117
  children
23190
23118
  }) {
23191
23119
  const overflowed = totalLines > height;
23192
- return /* @__PURE__ */ jsxs34(Box33, { flexDirection: "column", width, height: height + 2, borderStyle: "single", borderColor, children: [
23193
- /* @__PURE__ */ jsxs34(Box33, { children: [
23120
+ return /* @__PURE__ */ jsxs34(Box32, { flexDirection: "column", width, height: height + 2, borderStyle: "single", borderColor, children: [
23121
+ /* @__PURE__ */ jsxs34(Box32, { children: [
23194
23122
  header,
23195
23123
  overflowed && /* @__PURE__ */ jsxs34(Fragment11, { children: [
23196
- /* @__PURE__ */ jsx39(Box33, { flexGrow: 1 }),
23197
- /* @__PURE__ */ jsx39(Text36, { dimColor: !active, children: `\u2195 ${visibleStart}-${visibleEnd}/${totalLines}` })
23124
+ /* @__PURE__ */ jsx38(Box32, { flexGrow: 1 }),
23125
+ /* @__PURE__ */ jsx38(Text35, { dimColor: !active, children: `\u2195 ${visibleStart}-${visibleEnd}/${totalLines}` })
23198
23126
  ] })
23199
23127
  ] }),
23200
23128
  children
@@ -23207,8 +23135,8 @@ var init_ScrollablePanel = __esm({
23207
23135
  });
23208
23136
 
23209
23137
  // packages/experience-design-system-cli/src/analyze/select/tui/components/JsonPanel.tsx
23210
- import { Box as Box34, Text as Text37 } from "ink";
23211
- import { jsx as jsx40 } from "react/jsx-runtime";
23138
+ import { Box as Box33, Text as Text36 } from "ink";
23139
+ import { jsx as jsx39 } from "react/jsx-runtime";
23212
23140
  function highlightJson(line) {
23213
23141
  const parts = [];
23214
23142
  let remaining = line;
@@ -23246,7 +23174,7 @@ function highlightJson(line) {
23246
23174
  parts.push({ text: remaining[0] });
23247
23175
  remaining = remaining.slice(1);
23248
23176
  }
23249
- return /* @__PURE__ */ jsx40(HighlightedLine, { parts });
23177
+ return /* @__PURE__ */ jsx39(HighlightedLine, { parts });
23250
23178
  }
23251
23179
  function truncateLine(line, maxWidth) {
23252
23180
  if (line.length <= maxWidth) return line;
@@ -23259,10 +23187,10 @@ function JsonPanel({ label, value, scrollOffset, width, height, active }) {
23259
23187
  const totalLines = allLines.length;
23260
23188
  const visibleStart = totalLines === 0 ? 0 : scrollOffset + 1;
23261
23189
  const visibleEnd = Math.min(totalLines, scrollOffset + height);
23262
- return /* @__PURE__ */ jsx40(
23190
+ return /* @__PURE__ */ jsx39(
23263
23191
  ScrollablePanel,
23264
23192
  {
23265
- header: /* @__PURE__ */ jsx40(Text37, { bold: true, dimColor: !active, children: label }),
23193
+ header: /* @__PURE__ */ jsx39(Text36, { bold: true, dimColor: !active, children: label }),
23266
23194
  width,
23267
23195
  height,
23268
23196
  active,
@@ -23272,7 +23200,7 @@ function JsonPanel({ label, value, scrollOffset, width, height, active }) {
23272
23200
  borderColor: active ? "white" : void 0,
23273
23201
  children: visibleLines.map((line, i) => {
23274
23202
  const truncated = truncateLine(line, innerWidth);
23275
- return /* @__PURE__ */ jsx40(Box34, { children: highlightJson(truncated) }, i);
23203
+ return /* @__PURE__ */ jsx39(Box33, { children: highlightJson(truncated) }, i);
23276
23204
  })
23277
23205
  }
23278
23206
  );
@@ -23286,8 +23214,8 @@ var init_JsonPanel = __esm({
23286
23214
  });
23287
23215
 
23288
23216
  // packages/experience-design-system-cli/src/analyze/select/tui/components/RationalePanel.tsx
23289
- import { Text as Text38 } from "ink";
23290
- import { jsx as jsx41 } from "react/jsx-runtime";
23217
+ import { Text as Text37 } from "ink";
23218
+ import { jsx as jsx40 } from "react/jsx-runtime";
23291
23219
  function renderRationaleLines(rows, innerWidth) {
23292
23220
  const out = [];
23293
23221
  rows.forEach((row, idx) => {
@@ -23320,10 +23248,10 @@ function RationalePanel({
23320
23248
  const visible = allLines.slice(scrollOffset, scrollOffset + height);
23321
23249
  const visibleStart = totalLines === 0 ? 0 : scrollOffset + 1;
23322
23250
  const visibleEnd = Math.min(totalLines, scrollOffset + height);
23323
- return /* @__PURE__ */ jsx41(
23251
+ return /* @__PURE__ */ jsx40(
23324
23252
  ScrollablePanel,
23325
23253
  {
23326
- header: /* @__PURE__ */ jsx41(Text38, { bold: true, dimColor: !active, children: `RATIONALE \u2014 ${componentName}` }),
23254
+ header: /* @__PURE__ */ jsx40(Text37, { bold: true, dimColor: !active, children: `RATIONALE \u2014 ${componentName}` }),
23327
23255
  width,
23328
23256
  height,
23329
23257
  active,
@@ -23331,7 +23259,7 @@ function RationalePanel({
23331
23259
  visibleStart,
23332
23260
  visibleEnd,
23333
23261
  borderColor: active ? PALETTE.inverse : void 0,
23334
- children: visible.map((line, i) => /* @__PURE__ */ jsx41(RationaleLine, { line, active }, i))
23262
+ children: visible.map((line, i) => /* @__PURE__ */ jsx40(RationaleLine, { line, active }, i))
23335
23263
  }
23336
23264
  );
23337
23265
  }
@@ -23347,8 +23275,8 @@ var init_RationalePanel = __esm({
23347
23275
 
23348
23276
  // packages/experience-design-system-cli/src/analyze/select/tui/components/TokenReviewPanel.tsx
23349
23277
  import figures6 from "figures";
23350
- import { Box as Box35, Text as Text39 } from "ink";
23351
- import { jsx as jsx42, jsxs as jsxs35 } from "react/jsx-runtime";
23278
+ import { Box as Box34, Text as Text38 } from "ink";
23279
+ import { jsx as jsx41, jsxs as jsxs35 } from "react/jsx-runtime";
23352
23280
  function collectTokenSuggestions(entry, availableTokens = []) {
23353
23281
  return Object.entries(entry.$properties).filter(([, def]) => {
23354
23282
  const rawKind = def["$token.kind"];
@@ -23383,7 +23311,7 @@ function TokenReviewPanel({
23383
23311
  const visiblePaths = current.paths.slice(scrollStart, scrollStart + visibleCount);
23384
23312
  const rangeLabel = current.paths.length === 0 ? "no compatible tokens" : `${scrollStart + 1}-${scrollStart + visiblePaths.length} of ${current.paths.length}`;
23385
23313
  return /* @__PURE__ */ jsxs35(
23386
- Box35,
23314
+ Box34,
23387
23315
  {
23388
23316
  flexDirection: "column",
23389
23317
  width,
@@ -23391,25 +23319,25 @@ function TokenReviewPanel({
23391
23319
  borderStyle: "single",
23392
23320
  borderColor: active ? PALETTE.inverse : void 0,
23393
23321
  children: [
23394
- /* @__PURE__ */ jsx42(Text39, { bold: true, dimColor: !active, wrap: "truncate", children: `TOKEN REVIEW \u2014 ${componentName} \xB7 ${current.propName} (edit allowed)` }),
23395
- /* @__PURE__ */ jsx42(Text39, { dimColor: true, wrap: "truncate", children: `select which tokens are allowed (${rangeLabel})` }),
23396
- /* @__PURE__ */ jsx42(Text39, { children: " " }),
23397
- current.paths.length === 0 && /* @__PURE__ */ jsx42(Text39, { dimColor: true, children: "(no compatible tokens found for this token kind)" }),
23322
+ /* @__PURE__ */ jsx41(Text38, { bold: true, dimColor: !active, wrap: "truncate", children: `TOKEN REVIEW \u2014 ${componentName} \xB7 ${current.propName} (edit allowed)` }),
23323
+ /* @__PURE__ */ jsx41(Text38, { dimColor: true, wrap: "truncate", children: `select which tokens are allowed (${rangeLabel})` }),
23324
+ /* @__PURE__ */ jsx41(Text38, { children: " " }),
23325
+ current.paths.length === 0 && /* @__PURE__ */ jsx41(Text38, { dimColor: true, children: "(no compatible tokens found for this token kind)" }),
23398
23326
  visiblePaths.map((path, i) => {
23399
23327
  const pathIndex = scrollStart + i;
23400
23328
  const checked = editSelection.has(path);
23401
23329
  const focused = pathIndex === editCursor;
23402
- return /* @__PURE__ */ jsx42(Box35, { children: /* @__PURE__ */ jsx42(Text39, { color: focused ? PALETTE.info : void 0, bold: focused, dimColor: !active, wrap: "truncate", children: ` [${checked ? "x" : " "}] ${path}` }) }, path);
23330
+ return /* @__PURE__ */ jsx41(Box34, { children: /* @__PURE__ */ jsx41(Text38, { color: focused ? PALETTE.info : void 0, bold: focused, dimColor: !active, wrap: "truncate", children: ` [${checked ? "x" : " "}] ${path}` }) }, path);
23403
23331
  }),
23404
- /* @__PURE__ */ jsx42(Text39, { children: " " }),
23405
- /* @__PURE__ */ jsx42(Text39, { dimColor: true, wrap: "truncate", children: "[\u2191/\u2193] move [Space] toggle" }),
23406
- /* @__PURE__ */ jsx42(Text39, { dimColor: true, wrap: "truncate", children: "[Ctrl+S] save [Esc] cancel" })
23332
+ /* @__PURE__ */ jsx41(Text38, { children: " " }),
23333
+ /* @__PURE__ */ jsx41(Text38, { dimColor: true, wrap: "truncate", children: "[\u2191/\u2193] move [Space] toggle" }),
23334
+ /* @__PURE__ */ jsx41(Text38, { dimColor: true, wrap: "truncate", children: "[Ctrl+S] save [Esc] cancel" })
23407
23335
  ]
23408
23336
  }
23409
23337
  );
23410
23338
  }
23411
23339
  return /* @__PURE__ */ jsxs35(
23412
- Box35,
23340
+ Box34,
23413
23341
  {
23414
23342
  flexDirection: "column",
23415
23343
  width,
@@ -23417,18 +23345,18 @@ function TokenReviewPanel({
23417
23345
  borderStyle: "single",
23418
23346
  borderColor: active ? PALETTE.inverse : void 0,
23419
23347
  children: [
23420
- /* @__PURE__ */ jsx42(Text39, { bold: true, dimColor: !active, children: `TOKEN REVIEW \u2014 ${componentName}` }),
23421
- suggestions.length === 0 && /* @__PURE__ */ jsx42(Text39, { dimColor: true, children: "(no token suggestions for this component)" }),
23348
+ /* @__PURE__ */ jsx41(Text38, { bold: true, dimColor: !active, children: `TOKEN REVIEW \u2014 ${componentName}` }),
23349
+ suggestions.length === 0 && /* @__PURE__ */ jsx41(Text38, { dimColor: true, children: "(no token suggestions for this component)" }),
23422
23350
  suggestions.map((s, i) => {
23423
23351
  const focused = i === selectedRow;
23424
- return /* @__PURE__ */ jsxs35(Box35, { flexDirection: "column", children: [
23425
- /* @__PURE__ */ jsx42(Box35, { children: /* @__PURE__ */ jsx42(Text39, { color: focused ? PALETTE.info : void 0, bold: focused, dimColor: !active, children: `${focused ? figures6.pointer : " "} ${s.propName}` }) }),
23426
- /* @__PURE__ */ jsx42(Text39, { dimColor: true, children: ` suggested: ${s.suggested.join(", ")}` }),
23427
- /* @__PURE__ */ jsx42(Text39, { dimColor: true, children: ` allowed: ${s.allowed.join(", ")}` })
23352
+ return /* @__PURE__ */ jsxs35(Box34, { flexDirection: "column", children: [
23353
+ /* @__PURE__ */ jsx41(Box34, { children: /* @__PURE__ */ jsx41(Text38, { color: focused ? PALETTE.info : void 0, bold: focused, dimColor: !active, children: `${focused ? figures6.pointer : " "} ${s.propName}` }) }),
23354
+ /* @__PURE__ */ jsx41(Text38, { dimColor: true, children: ` suggested: ${s.suggested.join(", ")}` }),
23355
+ /* @__PURE__ */ jsx41(Text38, { dimColor: true, children: ` allowed: ${s.allowed.join(", ")}` })
23428
23356
  ] }, s.propName);
23429
23357
  }),
23430
- /* @__PURE__ */ jsx42(Text39, { children: " " }),
23431
- /* @__PURE__ */ jsx42(Text39, { dimColor: true, children: "[\u2191/\u2193] move [Enter] edit allowed [Esc] close" })
23358
+ /* @__PURE__ */ jsx41(Text38, { children: " " }),
23359
+ /* @__PURE__ */ jsx41(Text38, { dimColor: true, children: "[\u2191/\u2193] move [Enter] edit allowed [Esc] close" })
23432
23360
  ]
23433
23361
  }
23434
23362
  );
@@ -23441,8 +23369,8 @@ var init_TokenReviewPanel = __esm({
23441
23369
  });
23442
23370
 
23443
23371
  // packages/experience-design-system-cli/src/import/tui/steps/review-details-panel.tsx
23444
- import { Box as Box36, Text as Text40 } from "ink";
23445
- import { Fragment as Fragment12, jsx as jsx43, jsxs as jsxs36 } from "react/jsx-runtime";
23372
+ import { Box as Box35, Text as Text39 } from "ink";
23373
+ import { Fragment as Fragment12, jsx as jsx42, jsxs as jsxs36 } from "react/jsx-runtime";
23446
23374
  function ReviewDetailsPanel({
23447
23375
  selectedKey,
23448
23376
  panelOpen,
@@ -23476,7 +23404,7 @@ function ReviewDetailsPanel({
23476
23404
  rationale: s.rationale ?? ""
23477
23405
  }))
23478
23406
  ];
23479
- return /* @__PURE__ */ jsx43(
23407
+ return /* @__PURE__ */ jsx42(
23480
23408
  RationalePanel,
23481
23409
  {
23482
23410
  componentName: componentRationale?.name ?? selectedKey,
@@ -23489,7 +23417,7 @@ function ReviewDetailsPanel({
23489
23417
  );
23490
23418
  }
23491
23419
  if (panelOpen === "component-rationale") {
23492
- return /* @__PURE__ */ jsx43(
23420
+ return /* @__PURE__ */ jsx42(
23493
23421
  ComponentRationalePanel,
23494
23422
  {
23495
23423
  data: componentRationale ?? {
@@ -23513,14 +23441,14 @@ function ReviewDetailsPanel({
23513
23441
  const source = reviewMetadata?.componentSource ?? null;
23514
23442
  const headerPath = path ?? "<unknown source path>";
23515
23443
  const lines = source ? source.split("\n").slice(panelScrollOffset, panelScrollOffset + height) : [];
23516
- return /* @__PURE__ */ jsxs36(Box36, { flexDirection: "column", width, borderStyle: "single", borderColor: sourceBorderColor, paddingX: 1, children: [
23517
- /* @__PURE__ */ jsx43(Text40, { dimColor: true, bold: true, children: `source: ${headerPath}` }),
23518
- source ? lines.map((line, index) => /* @__PURE__ */ jsx43(Text40, { dimColor: true, children: line }, `source-line-${index}`)) : /* @__PURE__ */ jsx43(Text40, { dimColor: true, children: "(no source captured)" }),
23519
- /* @__PURE__ */ jsx43(Text40, { dimColor: true, children: "[s/Esc] close" })
23444
+ return /* @__PURE__ */ jsxs36(Box35, { flexDirection: "column", width, borderStyle: "single", borderColor: sourceBorderColor, paddingX: 1, children: [
23445
+ /* @__PURE__ */ jsx42(Text39, { dimColor: true, bold: true, children: `source: ${headerPath}` }),
23446
+ source ? lines.map((line, index) => /* @__PURE__ */ jsx42(Text39, { dimColor: true, children: line }, `source-line-${index}`)) : /* @__PURE__ */ jsx42(Text39, { dimColor: true, children: "(no source captured)" }),
23447
+ /* @__PURE__ */ jsx42(Text39, { dimColor: true, children: "[s/Esc] close" })
23520
23448
  ] });
23521
23449
  }
23522
23450
  if (panelOpen === "token-review") {
23523
- return /* @__PURE__ */ jsx43(
23451
+ return /* @__PURE__ */ jsx42(
23524
23452
  TokenReviewPanel,
23525
23453
  {
23526
23454
  componentName: selectedKey,
@@ -23536,7 +23464,7 @@ function ReviewDetailsPanel({
23536
23464
  );
23537
23465
  }
23538
23466
  if (showJson) {
23539
- return /* @__PURE__ */ jsx43(
23467
+ return /* @__PURE__ */ jsx42(
23540
23468
  JsonPanel,
23541
23469
  {
23542
23470
  label: "GENERATED DEFINITION (read-only)",
@@ -23548,7 +23476,7 @@ function ReviewDetailsPanel({
23548
23476
  }
23549
23477
  );
23550
23478
  }
23551
- return /* @__PURE__ */ jsx43(Fragment12, { children: editor });
23479
+ return /* @__PURE__ */ jsx42(Fragment12, { children: editor });
23552
23480
  }
23553
23481
  var init_review_details_panel = __esm({
23554
23482
  "packages/experience-design-system-cli/src/import/tui/steps/review-details-panel.tsx"() {
@@ -23561,7 +23489,7 @@ var init_review_details_panel = __esm({
23561
23489
  });
23562
23490
 
23563
23491
  // packages/experience-design-system-cli/src/import/tui/components/ReviewDetailsEditor.tsx
23564
- import { jsx as jsx44 } from "react/jsx-runtime";
23492
+ import { jsx as jsx43 } from "react/jsx-runtime";
23565
23493
  import { createElement as createElement5 } from "react";
23566
23494
  function toFieldEditorMetadata(reviewMetadata) {
23567
23495
  if (!reviewMetadata) return void 0;
@@ -23594,7 +23522,7 @@ function ReviewDetailsEditor({
23594
23522
  jsonScrollOffset,
23595
23523
  currentTokenSuggestions
23596
23524
  } = reviewEditor;
23597
- return /* @__PURE__ */ jsx44(
23525
+ return /* @__PURE__ */ jsx43(
23598
23526
  ReviewDetailsPanel,
23599
23527
  {
23600
23528
  selectedKey,
@@ -23637,8 +23565,8 @@ var init_ReviewDetailsEditor = __esm({
23637
23565
  });
23638
23566
 
23639
23567
  // packages/experience-design-system-cli/src/import/tui/components/ReviewComponentPanel.tsx
23640
- import { Box as Box37, Text as Text41 } from "ink";
23641
- import { Fragment as Fragment13, jsx as jsx45, jsxs as jsxs37 } from "react/jsx-runtime";
23568
+ import { Box as Box36, Text as Text40 } from "ink";
23569
+ import { Fragment as Fragment13, jsx as jsx44, jsxs as jsxs37 } from "react/jsx-runtime";
23642
23570
  function buildReviewFieldEditor(reviewEditor, selectedJson, onExit, overrides = {}) {
23643
23571
  return {
23644
23572
  value: reviewEditor.draftValue || selectedJson,
@@ -23678,17 +23606,17 @@ function ReviewEmptyComponentsWarning({
23678
23606
  hidden
23679
23607
  }) {
23680
23608
  if (hidden || count === 0) return null;
23681
- return /* @__PURE__ */ jsx45(Text41, { color: PALETTE.warning, children: `\u26A0 ${count} component${count === 1 ? "" : "s"} had no classifiable props \u2014 review with care` });
23609
+ return /* @__PURE__ */ jsx44(Text40, { color: PALETTE.warning, children: `\u26A0 ${count} component${count === 1 ? "" : "s"} had no classifiable props \u2014 review with care` });
23682
23610
  }
23683
23611
  function ReviewNoSelection() {
23684
- return /* @__PURE__ */ jsx45(Box37, { flexGrow: 1, paddingLeft: 1, flexDirection: "column", children: /* @__PURE__ */ jsx45(Text41, { dimColor: true, children: "No component selected" }) });
23612
+ return /* @__PURE__ */ jsx44(Box36, { flexGrow: 1, paddingLeft: 1, flexDirection: "column", children: /* @__PURE__ */ jsx44(Text40, { dimColor: true, children: "No component selected" }) });
23685
23613
  }
23686
23614
  function ReviewFinalizeError({
23687
23615
  message,
23688
23616
  hidden
23689
23617
  }) {
23690
23618
  if (hidden || !message) return null;
23691
- return /* @__PURE__ */ jsx45(Text41, { color: PALETTE.error, children: `\u26A0 ${message}` });
23619
+ return /* @__PURE__ */ jsx44(Text40, { color: PALETTE.error, children: `\u26A0 ${message}` });
23692
23620
  }
23693
23621
  function ReviewPanelFooter({
23694
23622
  reviewEditor,
@@ -23699,8 +23627,8 @@ function ReviewPanelFooter({
23699
23627
  }) {
23700
23628
  return /* @__PURE__ */ jsxs37(Fragment13, { children: [
23701
23629
  reviewEditor.panelOpen === "token-review" ? " [\u2191/\u2193] move [Enter] edit allowed [Esc] close" : sidebarFocused ? sidebarFooter : reviewEditor.showJson ? " [j/k] scroll [Ctrl+u/d] half-page [gg/G] top/bottom [Tab] focus list" : " [Tab] focus list (edit fields)" + (reviewEditor.currentTokenSuggestions().length > 0 ? " [t] token review" : ""),
23702
- livePreview.status === "running" && /* @__PURE__ */ jsx45(Text41, { children: ` ${livePreviewSpinner} live preview` }),
23703
- livePreview.disabled && /* @__PURE__ */ jsx45(Text41, { children: " \xB7 live preview disabled" })
23630
+ livePreview.status === "running" && /* @__PURE__ */ jsx44(Text40, { children: ` ${livePreviewSpinner} live preview` }),
23631
+ livePreview.disabled && /* @__PURE__ */ jsx44(Text40, { children: " \xB7 live preview disabled" })
23704
23632
  ] });
23705
23633
  }
23706
23634
  function ReviewComponentPanel({
@@ -23722,11 +23650,11 @@ function ReviewComponentPanel({
23722
23650
  }) {
23723
23651
  const propCount = Object.keys(selectedEntry.$properties).length;
23724
23652
  const slotCount = selectedEntry.$slots ? Object.keys(selectedEntry.$slots).length : 0;
23725
- return /* @__PURE__ */ jsxs37(Box37, { flexGrow: 1, paddingLeft: 1, flexDirection: "column", children: [
23726
- /* @__PURE__ */ jsxs37(Box37, { children: [
23727
- /* @__PURE__ */ jsx45(Text41, { bold: true, children: selectedKey }),
23728
- /* @__PURE__ */ jsx45(Box37, { flexGrow: 1 }),
23729
- /* @__PURE__ */ jsxs37(Text41, { dimColor: true, children: [
23653
+ return /* @__PURE__ */ jsxs37(Box36, { flexGrow: 1, paddingLeft: 1, flexDirection: "column", children: [
23654
+ /* @__PURE__ */ jsxs37(Box36, { children: [
23655
+ /* @__PURE__ */ jsx44(Text40, { bold: true, children: selectedKey }),
23656
+ /* @__PURE__ */ jsx44(Box36, { flexGrow: 1 }),
23657
+ /* @__PURE__ */ jsxs37(Text40, { dimColor: true, children: [
23730
23658
  propCount,
23731
23659
  " prop",
23732
23660
  propCount !== 1 ? "s" : "",
@@ -23735,7 +23663,7 @@ function ReviewComponentPanel({
23735
23663
  sidebarFocused ? "[Tab] focus panel" : "[Tab] focus list"
23736
23664
  ] })
23737
23665
  ] }),
23738
- /* @__PURE__ */ jsx45(
23666
+ /* @__PURE__ */ jsx44(
23739
23667
  ReviewDetailsEditor,
23740
23668
  {
23741
23669
  selectedKey,
@@ -23750,8 +23678,8 @@ function ReviewComponentPanel({
23750
23678
  fieldEditor
23751
23679
  }
23752
23680
  ),
23753
- saveError && /* @__PURE__ */ jsx45(Text41, { color: PALETTE.error, children: "\u2717 " + saveError }),
23754
- /* @__PURE__ */ jsx45(Text41, { dimColor: true, children: /* @__PURE__ */ jsx45(
23681
+ saveError && /* @__PURE__ */ jsx44(Text40, { color: PALETTE.error, children: "\u2717 " + saveError }),
23682
+ /* @__PURE__ */ jsx44(Text40, { dimColor: true, children: /* @__PURE__ */ jsx44(
23755
23683
  ReviewPanelFooter,
23756
23684
  {
23757
23685
  reviewEditor,
@@ -23773,30 +23701,30 @@ var init_ReviewComponentPanel = __esm({
23773
23701
  });
23774
23702
 
23775
23703
  // packages/experience-design-system-cli/src/analyze/select/tui/components/StatusBar.tsx
23776
- import { Box as Box38, Text as Text42 } from "ink";
23777
- import { jsx as jsx46, jsxs as jsxs38 } from "react/jsx-runtime";
23704
+ import { Box as Box37, Text as Text41 } from "ink";
23705
+ import { jsx as jsx45, jsxs as jsxs38 } from "react/jsx-runtime";
23778
23706
  function StatusBar({ accepted, rejected, reviewed, needsReview }) {
23779
23707
  const allResolved = needsReview === 0;
23780
- return /* @__PURE__ */ jsxs38(Box38, { gap: 2, flexWrap: "wrap", children: [
23781
- /* @__PURE__ */ jsxs38(Text42, { color: PALETTE.success, children: [
23708
+ return /* @__PURE__ */ jsxs38(Box37, { gap: 2, flexWrap: "wrap", children: [
23709
+ /* @__PURE__ */ jsxs38(Text41, { color: PALETTE.success, children: [
23782
23710
  accepted,
23783
23711
  " accepted"
23784
23712
  ] }),
23785
- /* @__PURE__ */ jsxs38(Text42, { color: PALETTE.error, children: [
23713
+ /* @__PURE__ */ jsxs38(Text41, { color: PALETTE.error, children: [
23786
23714
  rejected,
23787
23715
  " rejected"
23788
23716
  ] }),
23789
- /* @__PURE__ */ jsxs38(Text42, { dimColor: true, children: [
23717
+ /* @__PURE__ */ jsxs38(Text41, { dimColor: true, children: [
23790
23718
  needsReview,
23791
23719
  " pending"
23792
23720
  ] }),
23793
- /* @__PURE__ */ jsxs38(Text42, { color: PALETTE.info, children: [
23721
+ /* @__PURE__ */ jsxs38(Text41, { color: PALETTE.info, children: [
23794
23722
  reviewed,
23795
23723
  " reviewed"
23796
23724
  ] }),
23797
- /* @__PURE__ */ jsx46(Text42, { dimColor: true, children: "\xB7" }),
23798
- /* @__PURE__ */ jsx46(Text42, { dimColor: true, children: "[A] accept all" }),
23799
- /* @__PURE__ */ jsx46(Text42, { bold: allResolved, color: allResolved ? PALETTE.success : PALETTE.fg, children: "[F] finalize" })
23725
+ /* @__PURE__ */ jsx45(Text41, { dimColor: true, children: "\xB7" }),
23726
+ /* @__PURE__ */ jsx45(Text41, { dimColor: true, children: "[A] accept all" }),
23727
+ /* @__PURE__ */ jsx45(Text41, { bold: allResolved, color: allResolved ? PALETTE.success : PALETTE.fg, children: "[F] finalize" })
23800
23728
  ] });
23801
23729
  }
23802
23730
  var init_StatusBar = __esm({
@@ -23807,8 +23735,8 @@ var init_StatusBar = __esm({
23807
23735
  });
23808
23736
 
23809
23737
  // packages/experience-design-system-cli/src/import/tui/components/ReviewStatus.tsx
23810
- import { Box as Box39, Text as Text43 } from "ink";
23811
- import { jsx as jsx47, jsxs as jsxs39 } from "react/jsx-runtime";
23738
+ import { Box as Box38, Text as Text42 } from "ink";
23739
+ import { jsx as jsx46, jsxs as jsxs39 } from "react/jsx-runtime";
23812
23740
  function countReviewStatuses(entries) {
23813
23741
  return entries.reduce(
23814
23742
  (counts, entry) => {
@@ -23826,7 +23754,7 @@ function ReviewStatusBar({
23826
23754
  onFinalize
23827
23755
  }) {
23828
23756
  const { accepted, rejected, needsReview } = countReviewStatuses(entries);
23829
- return /* @__PURE__ */ jsx47(
23757
+ return /* @__PURE__ */ jsx46(
23830
23758
  StatusBar,
23831
23759
  {
23832
23760
  accepted,
@@ -23839,13 +23767,13 @@ function ReviewStatusBar({
23839
23767
  );
23840
23768
  }
23841
23769
  function ReviewLoadingState() {
23842
- return /* @__PURE__ */ jsx47(Box39, { paddingX: 2, paddingY: 1, children: /* @__PURE__ */ jsx47(Text43, { dimColor: true, children: "Loading generated definitions..." }) });
23770
+ return /* @__PURE__ */ jsx46(Box38, { paddingX: 2, paddingY: 1, children: /* @__PURE__ */ jsx46(Text42, { dimColor: true, children: "Loading generated definitions..." }) });
23843
23771
  }
23844
23772
  function ReviewLoadError({ message }) {
23845
- return /* @__PURE__ */ jsxs39(Box39, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
23846
- /* @__PURE__ */ jsx47(Text43, { color: PALETTE.error, children: message }),
23847
- /* @__PURE__ */ jsx47(Text43, { children: " " }),
23848
- /* @__PURE__ */ jsx47(Text43, { dimColor: true, children: "[q / Enter / Esc] Quit" })
23773
+ return /* @__PURE__ */ jsxs39(Box38, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
23774
+ /* @__PURE__ */ jsx46(Text42, { color: PALETTE.error, children: message }),
23775
+ /* @__PURE__ */ jsx46(Text42, { children: " " }),
23776
+ /* @__PURE__ */ jsx46(Text42, { dimColor: true, children: "[q / Enter / Esc] Quit" })
23849
23777
  ] });
23850
23778
  }
23851
23779
  var init_ReviewStatus = __esm({
@@ -23980,8 +23908,8 @@ var init_runLivePreview = __esm({
23980
23908
  });
23981
23909
 
23982
23910
  // packages/experience-design-system-cli/src/analyze/select/tui/components/FinalizeDialog.tsx
23983
- import { Box as Box40, Text as Text44 } from "ink";
23984
- import { Fragment as Fragment14, jsx as jsx48, jsxs as jsxs40 } from "react/jsx-runtime";
23911
+ import { Box as Box39, Text as Text43 } from "ink";
23912
+ import { Fragment as Fragment14, jsx as jsx47, jsxs as jsxs40 } from "react/jsx-runtime";
23985
23913
  function FinalizeDialog({
23986
23914
  accepted,
23987
23915
  rejected,
@@ -24009,55 +23937,55 @@ function FinalizeDialog({
24009
23937
  const windowed = removed.slice(offset, offset + FINALIZE_REMOVED_WINDOW);
24010
23938
  const hasMoreBelow = offset + FINALIZE_REMOVED_WINDOW < removed.length;
24011
23939
  const hasMoreAbove = offset > 0;
24012
- return /* @__PURE__ */ jsxs40(Box40, { flexDirection: "column", borderStyle: "round", padding: 1, width: 58, children: [
24013
- /* @__PURE__ */ jsx48(Text44, { bold: true, children: "\u2500".repeat(17) + " Finalize " + "\u2500".repeat(17) }),
24014
- /* @__PURE__ */ jsx48(Text44, { children: " " }),
24015
- /* @__PURE__ */ jsxs40(Text44, { children: [
24016
- /* @__PURE__ */ jsxs40(Text44, { color: PALETTE.success, children: [
23940
+ return /* @__PURE__ */ jsxs40(Box39, { flexDirection: "column", borderStyle: "round", padding: 1, width: 58, children: [
23941
+ /* @__PURE__ */ jsx47(Text43, { bold: true, children: "\u2500".repeat(17) + " Finalize " + "\u2500".repeat(17) }),
23942
+ /* @__PURE__ */ jsx47(Text43, { children: " " }),
23943
+ /* @__PURE__ */ jsxs40(Text43, { children: [
23944
+ /* @__PURE__ */ jsxs40(Text43, { color: PALETTE.success, children: [
24017
23945
  accepted,
24018
23946
  " accepted"
24019
23947
  ] }),
24020
- /* @__PURE__ */ jsx48(Text44, { children: " \xB7 " }),
24021
- /* @__PURE__ */ jsxs40(Text44, { color: PALETTE.error, children: [
23948
+ /* @__PURE__ */ jsx47(Text43, { children: " \xB7 " }),
23949
+ /* @__PURE__ */ jsxs40(Text43, { color: PALETTE.error, children: [
24022
23950
  rejected,
24023
23951
  " rejected"
24024
23952
  ] }),
24025
- /* @__PURE__ */ jsx48(Text44, { children: " \xB7 " }),
24026
- /* @__PURE__ */ jsxs40(Text44, { dimColor: true, children: [
23953
+ /* @__PURE__ */ jsx47(Text43, { children: " \xB7 " }),
23954
+ /* @__PURE__ */ jsxs40(Text43, { dimColor: true, children: [
24027
23955
  needsReview,
24028
23956
  " unresolved"
24029
23957
  ] })
24030
23958
  ] }),
24031
- /* @__PURE__ */ jsx48(Text44, { children: " " }),
23959
+ /* @__PURE__ */ jsx47(Text43, { children: " " }),
24032
23960
  noneAccepted && /* @__PURE__ */ jsxs40(Fragment14, { children: [
24033
- /* @__PURE__ */ jsx48(Text44, { bold: true, color: PALETTE.warning, children: "\u26A0 No components are accepted \u2014 nothing will be pushed." }),
24034
- /* @__PURE__ */ jsx48(Text44, { color: PALETTE.warning, children: " Accept at least one component ([a] a row, [A] accept all) to push." }),
24035
- /* @__PURE__ */ jsx48(Text44, { children: " " })
23961
+ /* @__PURE__ */ jsx47(Text43, { bold: true, color: PALETTE.warning, children: "\u26A0 No components are accepted \u2014 nothing will be pushed." }),
23962
+ /* @__PURE__ */ jsx47(Text43, { color: PALETTE.warning, children: " Accept at least one component ([a] a row, [A] accept all) to push." }),
23963
+ /* @__PURE__ */ jsx47(Text43, { children: " " })
24036
23964
  ] }),
24037
23965
  !allResolved && /* @__PURE__ */ jsxs40(Fragment14, { children: [
24038
- /* @__PURE__ */ jsx48(Text44, { color: PALETTE.warning, children: "\u26A0 " + needsReview + " unresolved component" + (needsReview === 1 ? "" : "s") + " will not be pushed." }),
24039
- /* @__PURE__ */ jsx48(Text44, { color: PALETTE.warning, children: " Only explicitly accepted components ship." }),
24040
- /* @__PURE__ */ jsx48(Text44, { children: " " })
23966
+ /* @__PURE__ */ jsx47(Text43, { color: PALETTE.warning, children: "\u26A0 " + needsReview + " unresolved component" + (needsReview === 1 ? "" : "s") + " will not be pushed." }),
23967
+ /* @__PURE__ */ jsx47(Text43, { color: PALETTE.warning, children: " Only explicitly accepted components ship." }),
23968
+ /* @__PURE__ */ jsx47(Text43, { children: " " })
24041
23969
  ] }),
24042
23970
  previewStatus === "running" && /* @__PURE__ */ jsxs40(Fragment14, { children: [
24043
- /* @__PURE__ */ jsx48(Text44, { dimColor: true, children: "Previewing deletions against the target space\u2026" }),
24044
- /* @__PURE__ */ jsx48(Text44, { children: " " })
23971
+ /* @__PURE__ */ jsx47(Text43, { dimColor: true, children: "Previewing deletions against the target space\u2026" }),
23972
+ /* @__PURE__ */ jsx47(Text43, { children: " " })
24045
23973
  ] }),
24046
23974
  previewStatus === "error" && /* @__PURE__ */ jsxs40(Fragment14, { children: [
24047
- /* @__PURE__ */ jsx48(Text44, { color: PALETTE.warning, children: "\u26A0 Could not preview deletions (the push will still proceed)." }),
24048
- /* @__PURE__ */ jsx48(Text44, { children: " " })
23975
+ /* @__PURE__ */ jsx47(Text43, { color: PALETTE.warning, children: "\u26A0 Could not preview deletions (the push will still proceed)." }),
23976
+ /* @__PURE__ */ jsx47(Text43, { children: " " })
24049
23977
  ] }),
24050
23978
  previewStatus === "done" && removed.length > 0 && /* @__PURE__ */ jsxs40(Fragment14, { children: [
24051
- /* @__PURE__ */ jsx48(Text44, { bold: true, color: PALETTE.error, children: removedComponentsHeader(removed.length, false) }),
24052
- hasMoreAbove && /* @__PURE__ */ jsx48(Text44, { dimColor: true, children: " \u2191 more above" }),
24053
- windowed.map((rc) => /* @__PURE__ */ jsx48(Text44, { color: PALETTE.error, children: removedComponentLine(rc) }, rc.id)),
24054
- hasMoreBelow && /* @__PURE__ */ jsx48(Text44, { dimColor: true, children: " \u2193 more below" }),
24055
- removed.length > FINALIZE_REMOVED_WINDOW && /* @__PURE__ */ jsx48(Text44, { dimColor: true, children: " [j/k] scroll deletions" }),
24056
- /* @__PURE__ */ jsx48(Text44, { children: " " })
23979
+ /* @__PURE__ */ jsx47(Text43, { bold: true, color: PALETTE.error, children: removedComponentsHeader(removed.length, false) }),
23980
+ hasMoreAbove && /* @__PURE__ */ jsx47(Text43, { dimColor: true, children: " \u2191 more above" }),
23981
+ windowed.map((rc) => /* @__PURE__ */ jsx47(Text43, { color: PALETTE.error, children: removedComponentLine(rc) }, rc.id)),
23982
+ hasMoreBelow && /* @__PURE__ */ jsx47(Text43, { dimColor: true, children: " \u2193 more below" }),
23983
+ removed.length > FINALIZE_REMOVED_WINDOW && /* @__PURE__ */ jsx47(Text43, { dimColor: true, children: " [j/k] scroll deletions" }),
23984
+ /* @__PURE__ */ jsx47(Text43, { children: " " })
24057
23985
  ] }),
24058
- /* @__PURE__ */ jsx48(Text44, { children: noneAccepted ? "Confirm exit with nothing accepted?" : allResolved ? "Save decisions and exit? All components resolved." : "Save decisions and exit?" }),
24059
- /* @__PURE__ */ jsx48(Text44, { children: " " }),
24060
- /* @__PURE__ */ jsx48(Text44, { children: " [y / Enter] Confirm [n / Esc] Cancel" })
23986
+ /* @__PURE__ */ jsx47(Text43, { children: noneAccepted ? "Confirm exit with nothing accepted?" : allResolved ? "Save decisions and exit? All components resolved." : "Save decisions and exit?" }),
23987
+ /* @__PURE__ */ jsx47(Text43, { children: " " }),
23988
+ /* @__PURE__ */ jsx47(Text43, { children: " [y / Enter] Confirm [n / Esc] Cancel" })
24061
23989
  ] });
24062
23990
  }
24063
23991
  var FINALIZE_REMOVED_WINDOW;
@@ -24562,8 +24490,8 @@ var init_useReviewSurfaceState = __esm({
24562
24490
  });
24563
24491
 
24564
24492
  // packages/experience-design-system-cli/src/analyze/select/tui/components/QuitDialog.tsx
24565
- import { Box as Box41, Text as Text45 } from "ink";
24566
- import { Fragment as Fragment15, jsx as jsx49, jsxs as jsxs41 } from "react/jsx-runtime";
24493
+ import { Box as Box40, Text as Text44 } from "ink";
24494
+ import { Fragment as Fragment15, jsx as jsx48, jsxs as jsxs41 } from "react/jsx-runtime";
24567
24495
  function QuitDialog({ hasUnsavedDrafts, onConfirm, onCancel }) {
24568
24496
  useImmediateInput((input, key) => {
24569
24497
  if (input === "y" || key.return) {
@@ -24572,16 +24500,16 @@ function QuitDialog({ hasUnsavedDrafts, onConfirm, onCancel }) {
24572
24500
  onCancel();
24573
24501
  }
24574
24502
  });
24575
- return /* @__PURE__ */ jsxs41(Box41, { flexDirection: "column", borderStyle: "round", padding: 1, width: 50, children: [
24576
- /* @__PURE__ */ jsx49(Text45, { bold: true, children: "\u2500".repeat(19) + " Quit " + "\u2500".repeat(19) }),
24577
- /* @__PURE__ */ jsx49(Text45, { children: " " }),
24503
+ return /* @__PURE__ */ jsxs41(Box40, { flexDirection: "column", borderStyle: "round", padding: 1, width: 50, children: [
24504
+ /* @__PURE__ */ jsx48(Text44, { bold: true, children: "\u2500".repeat(19) + " Quit " + "\u2500".repeat(19) }),
24505
+ /* @__PURE__ */ jsx48(Text44, { children: " " }),
24578
24506
  hasUnsavedDrafts ? /* @__PURE__ */ jsxs41(Fragment15, { children: [
24579
- /* @__PURE__ */ jsx49(Text45, { children: "You have unsaved draft edits." }),
24580
- /* @__PURE__ */ jsx49(Text45, { children: "Session state is preserved \u2014 you can resume" }),
24581
- /* @__PURE__ */ jsx49(Text45, { children: "by running the same review command again." })
24582
- ] }) : /* @__PURE__ */ jsx49(Text45, { children: "Session is saved. Quit without finalizing?" }),
24583
- /* @__PURE__ */ jsx49(Text45, { children: " " }),
24584
- /* @__PURE__ */ jsx49(Text45, { children: " [y / Enter] Quit [n / Esc] Stay" })
24507
+ /* @__PURE__ */ jsx48(Text44, { children: "You have unsaved draft edits." }),
24508
+ /* @__PURE__ */ jsx48(Text44, { children: "Session state is preserved \u2014 you can resume" }),
24509
+ /* @__PURE__ */ jsx48(Text44, { children: "by running the same review command again." })
24510
+ ] }) : /* @__PURE__ */ jsx48(Text44, { children: "Session is saved. Quit without finalizing?" }),
24511
+ /* @__PURE__ */ jsx48(Text44, { children: " " }),
24512
+ /* @__PURE__ */ jsx48(Text44, { children: " [y / Enter] Quit [n / Esc] Stay" })
24585
24513
  ] });
24586
24514
  }
24587
24515
  var init_QuitDialog = __esm({
@@ -24592,8 +24520,8 @@ var init_QuitDialog = __esm({
24592
24520
  });
24593
24521
 
24594
24522
  // packages/experience-design-system-cli/src/import/tui/components/ReviewDialogs.tsx
24595
- import { Box as Box42, Text as Text46 } from "ink";
24596
- import { Fragment as Fragment16, jsx as jsx50, jsxs as jsxs42 } from "react/jsx-runtime";
24523
+ import { Box as Box41, Text as Text45 } from "ink";
24524
+ import { Fragment as Fragment16, jsx as jsx49, jsxs as jsxs42 } from "react/jsx-runtime";
24597
24525
  function ReviewFinalizeDialogs({
24598
24526
  showFinalize,
24599
24527
  showQuit,
@@ -24608,7 +24536,7 @@ function ReviewFinalizeDialogs({
24608
24536
  }) {
24609
24537
  const { accepted, rejected, needsReview } = countReviewStatuses(components);
24610
24538
  return /* @__PURE__ */ jsxs42(Fragment16, { children: [
24611
- showFinalize && /* @__PURE__ */ jsx50(
24539
+ showFinalize && /* @__PURE__ */ jsx49(
24612
24540
  FinalizeDialog,
24613
24541
  {
24614
24542
  accepted,
@@ -24621,7 +24549,7 @@ function ReviewFinalizeDialogs({
24621
24549
  onCancel: onFinalizeCancel
24622
24550
  }
24623
24551
  ),
24624
- showQuit && /* @__PURE__ */ jsx50(QuitDialog, { hasUnsavedDrafts: false, onConfirm: onQuitConfirm, onCancel: onQuitCancel })
24552
+ showQuit && /* @__PURE__ */ jsx49(QuitDialog, { hasUnsavedDrafts: false, onConfirm: onQuitConfirm, onCancel: onQuitCancel })
24625
24553
  ] });
24626
24554
  }
24627
24555
  function ReviewStepDialogs({
@@ -24631,7 +24559,7 @@ function ReviewStepDialogs({
24631
24559
  onFinalize,
24632
24560
  onQuit
24633
24561
  }) {
24634
- return /* @__PURE__ */ jsx50(
24562
+ return /* @__PURE__ */ jsx49(
24635
24563
  ReviewFinalizeDialogs,
24636
24564
  {
24637
24565
  showFinalize: surfaceState.showFinalize,
@@ -24649,12 +24577,12 @@ function ReviewStepDialogs({
24649
24577
  }
24650
24578
  function ReviewReloadDialog({ open }) {
24651
24579
  if (!open) return null;
24652
- return /* @__PURE__ */ jsxs42(Box42, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
24653
- /* @__PURE__ */ jsx50(Text46, { bold: true, color: PALETTE.warning, children: "Reload from saved state?" }),
24654
- /* @__PURE__ */ jsx50(Text46, { children: "Unsaved in-memory changes will be lost." }),
24655
- /* @__PURE__ */ jsx50(Text46, { children: " " }),
24656
- /* @__PURE__ */ jsx50(Text46, { children: " [Enter] Confirm" }),
24657
- /* @__PURE__ */ jsx50(Text46, { children: " [Esc] Cancel" })
24580
+ return /* @__PURE__ */ jsxs42(Box41, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
24581
+ /* @__PURE__ */ jsx49(Text45, { bold: true, color: PALETTE.warning, children: "Reload from saved state?" }),
24582
+ /* @__PURE__ */ jsx49(Text45, { children: "Unsaved in-memory changes will be lost." }),
24583
+ /* @__PURE__ */ jsx49(Text45, { children: " " }),
24584
+ /* @__PURE__ */ jsx49(Text45, { children: " [Enter] Confirm" }),
24585
+ /* @__PURE__ */ jsx49(Text45, { children: " [Esc] Cancel" })
24658
24586
  ] });
24659
24587
  }
24660
24588
  var init_ReviewDialogs = __esm({
@@ -25062,8 +24990,8 @@ var init_useReviewPreview = __esm({
25062
24990
  });
25063
24991
 
25064
24992
  // packages/experience-design-system-cli/src/import/tui/components/LivePreviewSummary.tsx
25065
- import { Box as Box43, Text as Text47 } from "ink";
25066
- import { jsx as jsx51, jsxs as jsxs43 } from "react/jsx-runtime";
24993
+ import { Box as Box42, Text as Text46 } from "ink";
24994
+ import { jsx as jsx50, jsxs as jsxs43 } from "react/jsx-runtime";
25067
24995
  function LivePreviewSummary({
25068
24996
  enabled,
25069
24997
  previewAnnotations,
@@ -25077,19 +25005,19 @@ function LivePreviewSummary({
25077
25005
  const counts = { new: 0, changed: 0, removed: 0, breaking: 0 };
25078
25006
  for (const annotation of previewAnnotations.values()) counts[annotation] += 1;
25079
25007
  const hasCounts = counts.new + counts.changed + counts.removed + counts.breaking > 0;
25080
- if (disabled) return /* @__PURE__ */ jsx51(Text47, { dimColor: true, children: "Preview: disabled (creds rejected)" });
25081
- if (status === "running" && !hasCounts) return /* @__PURE__ */ jsx51(Text47, { dimColor: true, children: `Preview: ${spinner} running...` });
25008
+ if (disabled) return /* @__PURE__ */ jsx50(Text46, { dimColor: true, children: "Preview: disabled (creds rejected)" });
25009
+ if (status === "running" && !hasCounts) return /* @__PURE__ */ jsx50(Text46, { dimColor: true, children: `Preview: ${spinner} running...` });
25082
25010
  if (!hasCounts) return null;
25083
- return /* @__PURE__ */ jsxs43(Box43, { children: [
25084
- /* @__PURE__ */ jsx51(Text47, { children: "Preview: " }),
25085
- /* @__PURE__ */ jsx51(Text47, { color: PALETTE.success, children: `${counts.new} new` }),
25086
- /* @__PURE__ */ jsx51(Text47, { children: " \xB7 " }),
25087
- /* @__PURE__ */ jsx51(Text47, { color: PALETTE.warning, children: `${counts.changed} changed` }),
25088
- /* @__PURE__ */ jsx51(Text47, { children: " \xB7 " }),
25089
- /* @__PURE__ */ jsx51(Text47, { dimColor: true, children: `${counts.removed} removed` }),
25090
- showRemovedListHint && removedCount > 0 && /* @__PURE__ */ jsx51(Text47, { dimColor: true, children: " ([d] removed list)" }),
25091
- /* @__PURE__ */ jsx51(Text47, { children: " \xB7 " }),
25092
- /* @__PURE__ */ jsx51(Text47, { color: PALETTE.error, bold: true, children: `${counts.breaking} breaking` })
25011
+ return /* @__PURE__ */ jsxs43(Box42, { children: [
25012
+ /* @__PURE__ */ jsx50(Text46, { children: "Preview: " }),
25013
+ /* @__PURE__ */ jsx50(Text46, { color: PALETTE.success, children: `${counts.new} new` }),
25014
+ /* @__PURE__ */ jsx50(Text46, { children: " \xB7 " }),
25015
+ /* @__PURE__ */ jsx50(Text46, { color: PALETTE.warning, children: `${counts.changed} changed` }),
25016
+ /* @__PURE__ */ jsx50(Text46, { children: " \xB7 " }),
25017
+ /* @__PURE__ */ jsx50(Text46, { dimColor: true, children: `${counts.removed} removed` }),
25018
+ showRemovedListHint && removedCount > 0 && /* @__PURE__ */ jsx50(Text46, { dimColor: true, children: " ([d] removed list)" }),
25019
+ /* @__PURE__ */ jsx50(Text46, { children: " \xB7 " }),
25020
+ /* @__PURE__ */ jsx50(Text46, { color: PALETTE.error, bold: true, children: `${counts.breaking} breaking` })
25093
25021
  ] });
25094
25022
  }
25095
25023
  var init_LivePreviewSummary = __esm({
@@ -25102,8 +25030,8 @@ var init_LivePreviewSummary = __esm({
25102
25030
  // packages/experience-design-system-cli/src/import/tui/steps/GenerateReviewStep.tsx
25103
25031
  import { useCallback as useCallback6, useEffect as useEffect10, useMemo as useMemo4, useRef as useRef8, useState as useState22 } from "react";
25104
25032
  import figures7 from "figures";
25105
- import { Box as Box44, Text as Text48, useStdout as useStdout3 } from "ink";
25106
- import { Fragment as Fragment17, jsx as jsx52, jsxs as jsxs44 } from "react/jsx-runtime";
25033
+ import { Box as Box43, Text as Text47, useStdout as useStdout3 } from "ink";
25034
+ import { Fragment as Fragment17, jsx as jsx51, jsxs as jsxs44 } from "react/jsx-runtime";
25107
25035
  function sortComponentsForSidebar(components, cycleParticipants) {
25108
25036
  const isEmpty2 = (entry) => Object.keys(entry.$properties ?? {}).length === 0 && Object.keys(entry.$slots ?? {}).length === 0;
25109
25037
  const tier = (c2) => {
@@ -25144,10 +25072,10 @@ function CyclePathLine({
25144
25072
  highlightComponents = false,
25145
25073
  highlightLine = false
25146
25074
  }) {
25147
- return /* @__PURE__ */ jsxs44(Text48, { color: highlightLine ? PALETTE.warning : void 0, children: [
25075
+ return /* @__PURE__ */ jsxs44(Text47, { color: highlightLine ? PALETTE.warning : void 0, children: [
25148
25076
  prefix,
25149
25077
  segments.map(
25150
- (segment, index) => segment.kind === "slot" ? /* @__PURE__ */ jsx52(Text48, { color: PALETTE.info, children: segment.text }, index) : segment.kind === "arrow" ? /* @__PURE__ */ jsx52(Text48, { dimColor: true, children: segment.text }, index) : /* @__PURE__ */ jsx52(Text48, { color: highlightComponents ? PALETTE.warning : void 0, children: segment.text }, index)
25078
+ (segment, index) => segment.kind === "slot" ? /* @__PURE__ */ jsx51(Text47, { color: PALETTE.info, children: segment.text }, index) : segment.kind === "arrow" ? /* @__PURE__ */ jsx51(Text47, { dimColor: true, children: segment.text }, index) : /* @__PURE__ */ jsx51(Text47, { color: highlightComponents ? PALETTE.warning : void 0, children: segment.text }, index)
25151
25079
  )
25152
25080
  ] });
25153
25081
  }
@@ -25192,7 +25120,13 @@ function deriveBreakingChanges(response) {
25192
25120
  }
25193
25121
  return out;
25194
25122
  }
25195
- function GenerateReviewStep({
25123
+ function GenerateReviewStep(props) {
25124
+ if (!props.extractSessionId) {
25125
+ return /* @__PURE__ */ jsx51(Box43, { paddingX: 2, paddingY: 1, children: /* @__PURE__ */ jsx51(Text47, { color: PALETTE.error, children: "Error: no session ID \u2014 cannot load generated definitions." }) });
25126
+ }
25127
+ return /* @__PURE__ */ jsx51(GenerateReviewStepView, { ...props, extractSessionId: props.extractSessionId });
25128
+ }
25129
+ function GenerateReviewStepView({
25196
25130
  extractSessionId,
25197
25131
  tokenSessionId,
25198
25132
  onFinalize,
@@ -26058,30 +25992,30 @@ function GenerateReviewStep({
26058
25992
  }
26059
25993
  });
26060
25994
  if (loading) {
26061
- return /* @__PURE__ */ jsx52(ReviewLoadingState, {});
25995
+ return /* @__PURE__ */ jsx51(ReviewLoadingState, {});
26062
25996
  }
26063
25997
  if (loadError) {
26064
- return /* @__PURE__ */ jsx52(ReviewLoadError, { message: loadError });
25998
+ return /* @__PURE__ */ jsx51(ReviewLoadError, { message: loadError });
26065
25999
  }
26066
26000
  if (showHelp) {
26067
- return /* @__PURE__ */ jsx52(HelpOverlay, { sections: HELP_SECTIONS2, onClose: () => setShowHelp(false) });
26001
+ return /* @__PURE__ */ jsx51(HelpOverlay, { sections: HELP_SECTIONS2, onClose: () => setShowHelp(false) });
26068
26002
  }
26069
26003
  const renderBreakOverlay = (width) => {
26070
26004
  const highlightedCycle = slotCycles[cyclesCursor];
26071
- return /* @__PURE__ */ jsxs44(Box44, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, width, children: [
26072
- /* @__PURE__ */ jsx52(Text48, { bold: true, color: PALETTE.warning, children: `BREAK CYCLE ${cyclesCursor + 1} \u2014 remove a slot edge or reject a member` }),
26073
- highlightedCycle && /* @__PURE__ */ jsx52(CyclePathLine, { segments: formatCyclePathSegments(highlightedCycle), prefix: " ", highlightComponents: true }),
26074
- /* @__PURE__ */ jsx52(Text48, { dimColor: true, children: highlightedCycle ? "Deleting an edge removes it from $allowedComponents (undo with Ctrl+Z)." : "No cycle highlighted." }),
26075
- /* @__PURE__ */ jsx52(Text48, { children: " " }),
26076
- breakEdges.length > 0 && /* @__PURE__ */ jsx52(Text48, { dimColor: true, children: "remove slot edge:" }),
26005
+ return /* @__PURE__ */ jsxs44(Box43, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, width, children: [
26006
+ /* @__PURE__ */ jsx51(Text47, { bold: true, color: PALETTE.warning, children: `BREAK CYCLE ${cyclesCursor + 1} \u2014 remove a slot edge or reject a member` }),
26007
+ highlightedCycle && /* @__PURE__ */ jsx51(CyclePathLine, { segments: formatCyclePathSegments(highlightedCycle), prefix: " ", highlightComponents: true }),
26008
+ /* @__PURE__ */ jsx51(Text47, { dimColor: true, children: highlightedCycle ? "Deleting an edge removes it from $allowedComponents (undo with Ctrl+Z)." : "No cycle highlighted." }),
26009
+ /* @__PURE__ */ jsx51(Text47, { children: " " }),
26010
+ breakEdges.length > 0 && /* @__PURE__ */ jsx51(Text47, { dimColor: true, children: "remove slot edge:" }),
26077
26011
  breakEdges.map((edge, idx) => {
26078
26012
  const isCursor = idx === breakCursor;
26079
- return /* @__PURE__ */ jsx52(Text48, { inverse: isCursor, children: `${isCursor ? figures7.pointer : " "} remove '${edge.toComponent}' from ${edge.fromComponent}.$slots.${edge.slotName}.$allowedComponents` }, `break-${idx}`);
26013
+ return /* @__PURE__ */ jsx51(Text47, { inverse: isCursor, children: `${isCursor ? figures7.pointer : " "} remove '${edge.toComponent}' from ${edge.fromComponent}.$slots.${edge.slotName}.$allowedComponents` }, `break-${idx}`);
26080
26014
  }),
26081
26015
  breakConfirm ? /* @__PURE__ */ jsxs44(Fragment17, { children: [
26082
- /* @__PURE__ */ jsx52(Text48, { children: " " }),
26083
- /* @__PURE__ */ jsx52(Text48, { bold: true, color: PALETTE.warning, children: "Delete this slot edge? [y] confirm [n] cancel" })
26084
- ] }) : /* @__PURE__ */ jsx52(Text48, { dimColor: true, children: "[\u2191\u2193/j/k] move [Enter] delete [x/Esc] close" })
26016
+ /* @__PURE__ */ jsx51(Text47, { children: " " }),
26017
+ /* @__PURE__ */ jsx51(Text47, { bold: true, color: PALETTE.warning, children: "Delete this slot edge? [y] confirm [n] cancel" })
26018
+ ] }) : /* @__PURE__ */ jsx51(Text47, { dimColor: true, children: "[\u2191\u2193/j/k] move [Enter] delete [x/Esc] close" })
26085
26019
  ] });
26086
26020
  };
26087
26021
  const breakOverlayFullScreen = breakPanel.isOpen && shouldBreakOverlayGoFullScreen({
@@ -26125,8 +26059,8 @@ function GenerateReviewStep({
26125
26059
  for (const c2 of closures.values()) if (c2.nodes.length > 1) return true;
26126
26060
  return false;
26127
26061
  })();
26128
- return /* @__PURE__ */ jsxs44(Box44, { flexDirection: "column", children: [
26129
- /* @__PURE__ */ jsx52(
26062
+ return /* @__PURE__ */ jsxs44(Box43, { flexDirection: "column", children: [
26063
+ /* @__PURE__ */ jsx51(
26130
26064
  ReviewStepDialogs,
26131
26065
  {
26132
26066
  surfaceState: reviewSurface,
@@ -26136,24 +26070,24 @@ function GenerateReviewStep({
26136
26070
  onQuit
26137
26071
  }
26138
26072
  ),
26139
- showUnsavedWarning && !dialogOpen && /* @__PURE__ */ jsxs44(Box44, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
26140
- /* @__PURE__ */ jsx52(Text48, { bold: true, color: PALETTE.warning, children: "Unsaved changes" }),
26141
- /* @__PURE__ */ jsx52(Text48, { children: "You have unsaved edits in the current field editor." }),
26142
- /* @__PURE__ */ jsx52(Text48, { children: " " }),
26143
- /* @__PURE__ */ jsx52(Text48, { children: " [Enter] Save and continue" }),
26144
- /* @__PURE__ */ jsx52(Text48, { children: " [Esc] Discard changes and continue" }),
26145
- /* @__PURE__ */ jsx52(Text48, { children: " [Tab] Stay in the panel" })
26073
+ showUnsavedWarning && !dialogOpen && /* @__PURE__ */ jsxs44(Box43, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
26074
+ /* @__PURE__ */ jsx51(Text47, { bold: true, color: PALETTE.warning, children: "Unsaved changes" }),
26075
+ /* @__PURE__ */ jsx51(Text47, { children: "You have unsaved edits in the current field editor." }),
26076
+ /* @__PURE__ */ jsx51(Text47, { children: " " }),
26077
+ /* @__PURE__ */ jsx51(Text47, { children: " [Enter] Save and continue" }),
26078
+ /* @__PURE__ */ jsx51(Text47, { children: " [Esc] Discard changes and continue" }),
26079
+ /* @__PURE__ */ jsx51(Text47, { children: " [Tab] Stay in the panel" })
26146
26080
  ] }),
26147
- /* @__PURE__ */ jsx52(ReviewReloadDialog, { open: showReloadDialog && !dialogOpen }),
26148
- removedComponents.length > 0 && !dialogOpen && /* @__PURE__ */ jsxs44(Box44, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.error, paddingX: 1, children: [
26149
- /* @__PURE__ */ jsx52(Text48, { bold: true, color: PALETTE.error, children: removedComponentsHeader(removedComponents.length, true) }),
26081
+ /* @__PURE__ */ jsx51(ReviewReloadDialog, { open: showReloadDialog && !dialogOpen }),
26082
+ removedComponents.length > 0 && !dialogOpen && /* @__PURE__ */ jsxs44(Box43, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.error, paddingX: 1, children: [
26083
+ /* @__PURE__ */ jsx51(Text47, { bold: true, color: PALETTE.error, children: removedComponentsHeader(removedComponents.length, true) }),
26150
26084
  !removedBannerCollapsed && /* @__PURE__ */ jsxs44(Fragment17, { children: [
26151
- /* @__PURE__ */ jsx52(Text48, { children: " " }),
26152
- removedComponents.map((rc) => /* @__PURE__ */ jsx52(Text48, { children: removedComponentLine(rc) }, rc.id))
26085
+ /* @__PURE__ */ jsx51(Text47, { children: " " }),
26086
+ removedComponents.map((rc) => /* @__PURE__ */ jsx51(Text47, { children: removedComponentLine(rc) }, rc.id))
26153
26087
  ] })
26154
26088
  ] }),
26155
- breakingChanges.length > 0 && !dialogOpen && /* @__PURE__ */ jsx52(Box44, { paddingX: 1, children: /* @__PURE__ */ jsx52(
26156
- Text48,
26089
+ breakingChanges.length > 0 && !dialogOpen && /* @__PURE__ */ jsx51(Box43, { paddingX: 1, children: /* @__PURE__ */ jsx51(
26090
+ Text47,
26157
26091
  {
26158
26092
  color: PALETTE.warning,
26159
26093
  children: `[b] ${breakingChanges.length} breaking change${breakingChanges.length === 1 ? "" : "s"}`
@@ -26163,32 +26097,32 @@ function GenerateReviewStep({
26163
26097
  const row = breakingRows[breakingCursor];
26164
26098
  const comp = row ? breakingChanges.find((b) => b.componentName === row.componentName) : void 0;
26165
26099
  if (!comp) return null;
26166
- return /* @__PURE__ */ jsxs44(Box44, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
26167
- /* @__PURE__ */ jsx52(Text48, { bold: true, color: PALETTE.warning, children: `Breaking changes \u2014 ${comp.componentName}` }),
26168
- comp.impact && /* @__PURE__ */ jsx52(Text48, { dimColor: true, children: ` affects ${comp.impact.affectedExperiences} experience${comp.impact.affectedExperiences === 1 ? "" : "s"}, ${comp.impact.affectedFragments} fragment${comp.impact.affectedFragments === 1 ? "" : "s"}` }),
26169
- comp.changes.length === 0 ? /* @__PURE__ */ jsx52(Text48, { dimColor: true, children: " (no enumerated changes)" }) : comp.changes.map((change, ci) => /* @__PURE__ */ jsx52(Text48, { children: ` \u2022 ${formatBreakingChange(change, comp.current)}` }, `bd-detail-${ci}`)),
26170
- /* @__PURE__ */ jsx52(Text48, { dimColor: true, children: "[D/Esc] close detail" })
26100
+ return /* @__PURE__ */ jsxs44(Box43, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
26101
+ /* @__PURE__ */ jsx51(Text47, { bold: true, color: PALETTE.warning, children: `Breaking changes \u2014 ${comp.componentName}` }),
26102
+ comp.impact && /* @__PURE__ */ jsx51(Text47, { dimColor: true, children: ` affects ${comp.impact.affectedExperiences} experience${comp.impact.affectedExperiences === 1 ? "" : "s"}, ${comp.impact.affectedFragments} fragment${comp.impact.affectedFragments === 1 ? "" : "s"}` }),
26103
+ comp.changes.length === 0 ? /* @__PURE__ */ jsx51(Text47, { dimColor: true, children: " (no enumerated changes)" }) : comp.changes.map((change, ci) => /* @__PURE__ */ jsx51(Text47, { children: ` \u2022 ${formatBreakingChange(change, comp.current)}` }, `bd-detail-${ci}`)),
26104
+ /* @__PURE__ */ jsx51(Text47, { dimColor: true, children: "[D/Esc] close detail" })
26171
26105
  ] });
26172
26106
  })(),
26173
26107
  cyclePanel.isOpen && !dialogOpen && (() => {
26174
26108
  const PANEL_H = 20;
26175
26109
  const lines = [];
26176
26110
  lines.push(
26177
- /* @__PURE__ */ jsx52(Text48, { bold: true, color: PALETTE.warning, children: `SLOT DEPENDENCY CYCLES (${slotCycles.length})` }, "cyc-title")
26111
+ /* @__PURE__ */ jsx51(Text47, { bold: true, color: PALETTE.warning, children: `SLOT DEPENDENCY CYCLES (${slotCycles.length})` }, "cyc-title")
26178
26112
  );
26179
26113
  lines.push(
26180
- /* @__PURE__ */ jsx52(Text48, { dimColor: true, children: "push will fail until these are resolved" }, "cyc-sub")
26114
+ /* @__PURE__ */ jsx51(Text47, { dimColor: true, children: "push will fail until these are resolved" }, "cyc-sub")
26181
26115
  );
26182
26116
  lines.push(
26183
- /* @__PURE__ */ jsx52(Text48, { dimColor: true, children: "To fix: reject a cycle member, or break the cycle by removing a slot edge." }, "cyc-guide")
26117
+ /* @__PURE__ */ jsx51(Text47, { dimColor: true, children: "To fix: reject a cycle member, or break the cycle by removing a slot edge." }, "cyc-guide")
26184
26118
  );
26185
- lines.push(/* @__PURE__ */ jsx52(Text48, { children: " " }, "cyc-space"));
26119
+ lines.push(/* @__PURE__ */ jsx51(Text47, { children: " " }, "cyc-space"));
26186
26120
  slotCycles.forEach((cycle, idx) => {
26187
26121
  const nodeCount = new Set(cycle.path).size;
26188
26122
  const isCursor = idx === cyclesCursor;
26189
26123
  lines.push(
26190
- /* @__PURE__ */ jsx52(
26191
- Text48,
26124
+ /* @__PURE__ */ jsx51(
26125
+ Text47,
26192
26126
  {
26193
26127
  bold: true,
26194
26128
  inverse: isCursor,
@@ -26198,23 +26132,23 @@ function GenerateReviewStep({
26198
26132
  )
26199
26133
  );
26200
26134
  lines.push(
26201
- /* @__PURE__ */ jsx52(CyclePathLine, { segments: formatCyclePathSegments(cycle, 16), prefix: " " }, `cyc-p-${idx}`)
26135
+ /* @__PURE__ */ jsx51(CyclePathLine, { segments: formatCyclePathSegments(cycle, 16), prefix: " " }, `cyc-p-${idx}`)
26202
26136
  );
26203
26137
  if (cycle.suggestedBreak) {
26204
26138
  const b = cycle.suggestedBreak;
26205
26139
  lines.push(
26206
- /* @__PURE__ */ jsx52(Text48, { dimColor: true, children: ` Suggested fix: remove '${b.toComponent}' from ${b.fromComponent}.$slots.${b.slotName}.$allowedComponents` }, `cyc-f-${idx}`)
26140
+ /* @__PURE__ */ jsx51(Text47, { dimColor: true, children: ` Suggested fix: remove '${b.toComponent}' from ${b.fromComponent}.$slots.${b.slotName}.$allowedComponents` }, `cyc-f-${idx}`)
26207
26141
  );
26208
26142
  }
26209
- lines.push(/* @__PURE__ */ jsx52(Text48, { children: " " }, `cyc-s-${idx}`));
26143
+ lines.push(/* @__PURE__ */ jsx51(Text47, { children: " " }, `cyc-s-${idx}`));
26210
26144
  });
26211
26145
  const visible = lines.slice(cyclePanelScroll, cyclePanelScroll + PANEL_H);
26212
- return /* @__PURE__ */ jsxs44(Box44, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
26146
+ return /* @__PURE__ */ jsxs44(Box43, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
26213
26147
  visible,
26214
- /* @__PURE__ */ jsx52(Text48, { dimColor: true, children: "[\u2191\u2193/j/k] move [Enter] jump [x] break cycle [c/q/Esc] close" })
26148
+ /* @__PURE__ */ jsx51(Text47, { dimColor: true, children: "[\u2191\u2193/j/k] move [Enter] jump [x] break cycle [c/q/Esc] close" })
26215
26149
  ] });
26216
26150
  })(),
26217
- !dialogOpen && /* @__PURE__ */ jsx52(
26151
+ !dialogOpen && /* @__PURE__ */ jsx51(
26218
26152
  LivePreviewSummary,
26219
26153
  {
26220
26154
  enabled: livePreview,
@@ -26233,17 +26167,17 @@ function GenerateReviewStep({
26233
26167
  const participantSet = cycleView.structural;
26234
26168
  const members = stillRejected.filter((n) => participantSet.has(n)).sort();
26235
26169
  const ancestors = stillRejected.filter((n) => !participantSet.has(n)).sort();
26236
- return /* @__PURE__ */ jsxs44(Box44, { flexDirection: "column", borderStyle: "single", borderColor: PALETTE.error, paddingX: 1, children: [
26237
- /* @__PURE__ */ jsx52(Text48, { color: PALETTE.error, bold: true, children: `Cyclic component graph \u2014 auto-rejected ${stillRejected.length} component${stillRejected.length === 1 ? "" : "s"}:` }),
26238
- members.length > 0 && /* @__PURE__ */ jsx52(Text48, { color: PALETTE.error, children: ` Cycle members: ${members.join(", ")}` }),
26239
- ancestors.length > 0 && /* @__PURE__ */ jsx52(Text48, { color: PALETTE.error, children: ` Ancestors: ${ancestors.join(", ")}` }),
26240
- /* @__PURE__ */ jsx52(Text48, { dimColor: true, children: undoSnapshot ? " [Ctrl+Z] undo \xB7 [r]/[a] manually toggle \xB7 [F] continue" : " [r]/[a] manually toggle \xB7 [F] continue" })
26170
+ return /* @__PURE__ */ jsxs44(Box43, { flexDirection: "column", borderStyle: "single", borderColor: PALETTE.error, paddingX: 1, children: [
26171
+ /* @__PURE__ */ jsx51(Text47, { color: PALETTE.error, bold: true, children: `Cyclic component graph \u2014 auto-rejected ${stillRejected.length} component${stillRejected.length === 1 ? "" : "s"}:` }),
26172
+ members.length > 0 && /* @__PURE__ */ jsx51(Text47, { color: PALETTE.error, children: ` Cycle members: ${members.join(", ")}` }),
26173
+ ancestors.length > 0 && /* @__PURE__ */ jsx51(Text47, { color: PALETTE.error, children: ` Ancestors: ${ancestors.join(", ")}` }),
26174
+ /* @__PURE__ */ jsx51(Text47, { dimColor: true, children: undoSnapshot ? " [Ctrl+Z] undo \xB7 [r]/[a] manually toggle \xB7 [F] continue" : " [r]/[a] manually toggle \xB7 [F] continue" })
26241
26175
  ] });
26242
26176
  })(),
26243
- /* @__PURE__ */ jsx52(ReviewEmptyComponentsWarning, { count: emptyCount, hidden: dialogOpen }),
26244
- /* @__PURE__ */ jsx52(ReviewFinalizeError, { message: finalizeError, hidden: dialogOpen }),
26245
- !dialogOpen && /* @__PURE__ */ jsxs44(Box44, { children: [
26246
- breakingPanel.isOpen ? /* @__PURE__ */ jsx52(
26177
+ /* @__PURE__ */ jsx51(ReviewEmptyComponentsWarning, { count: emptyCount, hidden: dialogOpen }),
26178
+ /* @__PURE__ */ jsx51(ReviewFinalizeError, { message: finalizeError, hidden: dialogOpen }),
26179
+ !dialogOpen && /* @__PURE__ */ jsxs44(Box43, { children: [
26180
+ breakingPanel.isOpen ? /* @__PURE__ */ jsx51(
26247
26181
  GotoBanner,
26248
26182
  {
26249
26183
  title: "Breaking changes",
@@ -26256,7 +26190,7 @@ function GenerateReviewStep({
26256
26190
  width: sidebarWidth,
26257
26191
  footerHint: "[\u2191/\u2193] move \xB7 [Enter] jump \xB7 [D] detail \xB7 [Esc] close"
26258
26192
  }
26259
- ) : lineagePanel.isOpen && focusedComponentKey ? /* @__PURE__ */ jsx52(
26193
+ ) : lineagePanel.isOpen && focusedComponentKey ? /* @__PURE__ */ jsx51(
26260
26194
  LineagePanel,
26261
26195
  {
26262
26196
  focusedComponentKey,
@@ -26266,7 +26200,7 @@ function GenerateReviewStep({
26266
26200
  maxRows: panelMaxRows,
26267
26201
  width: sidebarWidth
26268
26202
  }
26269
- ) : /* @__PURE__ */ jsx52(
26203
+ ) : /* @__PURE__ */ jsx51(
26270
26204
  GroupedSidebar,
26271
26205
  {
26272
26206
  items: groupedItems,
@@ -26304,7 +26238,7 @@ function GenerateReviewStep({
26304
26238
  graph: sidebarGraph
26305
26239
  }
26306
26240
  ),
26307
- selected ? /* @__PURE__ */ jsx52(
26241
+ selected ? /* @__PURE__ */ jsx51(
26308
26242
  ReviewComponentPanel,
26309
26243
  {
26310
26244
  selectedKey: selected.key,
@@ -26331,13 +26265,13 @@ function GenerateReviewStep({
26331
26265
  livePreview: livePreviewHook,
26332
26266
  livePreviewSpinner
26333
26267
  }
26334
- ) : /* @__PURE__ */ jsx52(ReviewNoSelection, {})
26268
+ ) : /* @__PURE__ */ jsx51(ReviewNoSelection, {})
26335
26269
  ] }),
26336
26270
  breakPanel.isOpen && !breakOverlayFullScreen && !dialogOpen && renderBreakOverlay(),
26337
- !dialogOpen && slotCycles.length > 0 && !cyclePanel.isOpen && !breakPanel.isOpen && /* @__PURE__ */ jsxs44(Box44, { flexDirection: "column", children: [
26338
- /* @__PURE__ */ jsx52(Text48, { color: PALETTE.warning, children: `\u26A0 ${slotCycles.length} slot dependency cycle${slotCycles.length === 1 ? "" : "s"} detected \u2014 push will fail` }),
26271
+ !dialogOpen && slotCycles.length > 0 && !cyclePanel.isOpen && !breakPanel.isOpen && /* @__PURE__ */ jsxs44(Box43, { flexDirection: "column", children: [
26272
+ /* @__PURE__ */ jsx51(Text47, { color: PALETTE.warning, children: `\u26A0 ${slotCycles.length} slot dependency cycle${slotCycles.length === 1 ? "" : "s"} detected \u2014 push will fail` }),
26339
26273
  slotCycles.slice(0, 3).map((cycle, idx) => {
26340
- return /* @__PURE__ */ jsx52(
26274
+ return /* @__PURE__ */ jsx51(
26341
26275
  CyclePathLine,
26342
26276
  {
26343
26277
  segments: formatCyclePathSegments(cycle),
@@ -26348,10 +26282,10 @@ function GenerateReviewStep({
26348
26282
  `cyc-banner-${idx}`
26349
26283
  );
26350
26284
  }),
26351
- slotCycles.length > 3 && /* @__PURE__ */ jsx52(Text48, { color: PALETTE.warning, children: ` \u2026${slotCycles.length - 3} more` }),
26352
- /* @__PURE__ */ jsx52(Text48, { dimColor: true, children: " press [c] for detail" })
26285
+ slotCycles.length > 3 && /* @__PURE__ */ jsx51(Text47, { color: PALETTE.warning, children: ` \u2026${slotCycles.length - 3} more` }),
26286
+ /* @__PURE__ */ jsx51(Text47, { dimColor: true, children: " press [c] for detail" })
26353
26287
  ] }),
26354
- /* @__PURE__ */ jsx52(
26288
+ /* @__PURE__ */ jsx51(
26355
26289
  SearchMatchSummary,
26356
26290
  {
26357
26291
  open: searchOpen,
@@ -26362,7 +26296,7 @@ function GenerateReviewStep({
26362
26296
  hidden: dialogOpen
26363
26297
  }
26364
26298
  ),
26365
- !dialogOpen && sidebarFocused && /* @__PURE__ */ jsx52(Box44, { columnGap: 2, flexWrap: "wrap", children: reviewEditor.panelOpen === "token-review" ? /* @__PURE__ */ jsxs44(Fragment17, { children: [
26299
+ !dialogOpen && sidebarFocused && /* @__PURE__ */ jsx51(Box43, { columnGap: 2, flexWrap: "wrap", children: reviewEditor.panelOpen === "token-review" ? /* @__PURE__ */ jsxs44(Fragment17, { children: [
26366
26300
  legendEntry("[\u2191/\u2193]", "move"),
26367
26301
  legendEntry("[Enter]", "edit allowed"),
26368
26302
  legendEntry("[Esc]", "close")
@@ -26398,7 +26332,7 @@ function GenerateReviewStep({
26398
26332
  legendEntry("[?]", "help"),
26399
26333
  legendEntry("[q]", "quit")
26400
26334
  ] }) }),
26401
- !dialogOpen && /* @__PURE__ */ jsx52(
26335
+ !dialogOpen && /* @__PURE__ */ jsx51(
26402
26336
  ReviewStatusBar,
26403
26337
  {
26404
26338
  entries: components,
@@ -26464,7 +26398,7 @@ var init_GenerateReviewStep = __esm({
26464
26398
  {
26465
26399
  title: "Navigation",
26466
26400
  entries: [
26467
- { keys: "j / k / \u2191 / \u2193", label: "Move cursor" },
26401
+ { keys: "\u2191 / \u2193", label: "Move cursor" },
26468
26402
  { keys: "Tab", label: "Toggle sidebar/panel" },
26469
26403
  { keys: "Enter", label: "Drill to source" }
26470
26404
  ]
@@ -26521,50 +26455,6 @@ var init_GenerateReviewStep = __esm({
26521
26455
  }
26522
26456
  });
26523
26457
 
26524
- // packages/experience-design-system-cli/src/import/tui/final-review-host.tsx
26525
- import { Box as Box45, Text as Text49 } from "ink";
26526
- import { jsx as jsx53 } from "react/jsx-runtime";
26527
- function FinalReviewHost({
26528
- extractSessionId,
26529
- tokenSessionId,
26530
- onFinalize,
26531
- onQuit,
26532
- livePreview,
26533
- spaceId,
26534
- environmentId,
26535
- cmaToken,
26536
- host,
26537
- tokensPath,
26538
- initialFinalizeError
26539
- }) {
26540
- if (!extractSessionId) {
26541
- return /* @__PURE__ */ jsx53(Box45, { paddingX: 2, paddingY: 1, children: /* @__PURE__ */ jsx53(Text49, { color: PALETTE.error, children: "Error: no session ID \u2014 cannot load generated definitions." }) });
26542
- }
26543
- return /* @__PURE__ */ jsx53(
26544
- GenerateReviewStep,
26545
- {
26546
- extractSessionId,
26547
- tokenSessionId,
26548
- onFinalize,
26549
- onQuit,
26550
- livePreview,
26551
- spaceId,
26552
- environmentId,
26553
- cmaToken,
26554
- host,
26555
- tokensPath,
26556
- initialFinalizeError
26557
- }
26558
- );
26559
- }
26560
- var init_final_review_host = __esm({
26561
- "packages/experience-design-system-cli/src/import/tui/final-review-host.tsx"() {
26562
- "use strict";
26563
- init_theme();
26564
- init_GenerateReviewStep();
26565
- }
26566
- });
26567
-
26568
26458
  // packages/experience-design-system-cli/src/import/tui/runScopeGate.ts
26569
26459
  async function runScopeGate(opts) {
26570
26460
  const db = openPipelineDb();
@@ -26689,70 +26579,6 @@ var init_wizard_state_transitions = __esm({
26689
26579
  }
26690
26580
  });
26691
26581
 
26692
- // packages/experience-design-system-cli/src/import/tui/run-selection-agent.ts
26693
- async function runSelectionAgent(options) {
26694
- const db = openPipelineDb();
26695
- let components;
26696
- try {
26697
- components = loadRawComponents(db, options.sessionId);
26698
- } finally {
26699
- db.close();
26700
- }
26701
- if (components.length === 0) return;
26702
- const invoker2 = createLocalCliAgentInvoker({
26703
- onDebugEvent: (name, payload) => getDebugLogger().event("agent", name, payload)
26704
- });
26705
- const prompt = await buildPrompt({
26706
- skill: "select",
26707
- mode: "autonomous",
26708
- rawComponentsInline: JSON.stringify(components, null, 2),
26709
- outDir: process.cwd(),
26710
- ...options.promptText !== void 0 ? { skillContentOverride: options.promptText } : {},
26711
- ...options.promptText === void 0 && options.promptPath ? { skillPathOverride: options.promptPath } : {}
26712
- });
26713
- const { result } = await invokeAgentWithOutput(
26714
- invoker2,
26715
- { agent: options.agent, model: options.model, prompt, timeoutMs: DEFAULT_TIMEOUT_MS4 },
26716
- false
26717
- );
26718
- if (result.timedOut) throw new Error("selection agent timed out");
26719
- if (result.exitCode !== 0) throw new Error(`selection agent exited with code ${result.exitCode}`);
26720
- const { calls, warnings } = parseSelectToolCallLines(result.stdout);
26721
- for (const warning of warnings) process.stderr.write(`Warning: selection agent: ${warning}
26722
- `);
26723
- const byName = new Map(calls.map((call) => [call.name, call]));
26724
- const writeDb = openPipelineDb();
26725
- try {
26726
- const update = writeDb.prepare(
26727
- `UPDATE raw_components SET status = ?, reject_reason = ? WHERE session_id = ? AND component_id = ?`
26728
- );
26729
- for (const component of components) {
26730
- const call = byName.get(component.name);
26731
- if (!call) continue;
26732
- const rejected = call.tool === "reject_component";
26733
- update.run(
26734
- rejected ? "rejected" : "accepted",
26735
- rejected ? call.reason ?? null : null,
26736
- options.sessionId,
26737
- component.component_id
26738
- );
26739
- }
26740
- } finally {
26741
- writeDb.close();
26742
- }
26743
- }
26744
- var DEFAULT_TIMEOUT_MS4;
26745
- var init_run_selection_agent = __esm({
26746
- "packages/experience-design-system-cli/src/import/tui/run-selection-agent.ts"() {
26747
- "use strict";
26748
- init_src();
26749
- init_debug_logger();
26750
- init_agent_output();
26751
- init_db();
26752
- DEFAULT_TIMEOUT_MS4 = Number(process.env.EDS_AGENT_TIMEOUT_MS ?? 5 * 60 * 1e3);
26753
- }
26754
- });
26755
-
26756
26582
  // packages/experience-design-system-cli/src/import/tui/WizardApp.tsx
26757
26583
  var WizardApp_exports = {};
26758
26584
  __export(WizardApp_exports, {
@@ -26766,7 +26592,7 @@ __export(WizardApp_exports, {
26766
26592
  shouldRunMapTokens: () => shouldRunMapTokens
26767
26593
  });
26768
26594
  import { useEffect as useEffect11, useRef as useRef9, useState as useState23 } from "react";
26769
- import { Box as Box46, Text as Text50, useStdout as useStdout4 } from "ink";
26595
+ import { Box as Box44, Text as Text48, useStdout as useStdout4 } from "ink";
26770
26596
  import { join as join20, resolve as resolve17 } from "node:path";
26771
26597
  import { appendFileSync as appendFileSync2, writeFileSync } from "node:fs";
26772
26598
  import { access as access7, stat as stat5, writeFile as writeFile6 } from "node:fs/promises";
@@ -26774,7 +26600,7 @@ import { tmpdir } from "node:os";
26774
26600
  import { execFile as execFile2, spawn as spawn3 } from "node:child_process";
26775
26601
  import { mkdir as mkdir5 } from "node:fs/promises";
26776
26602
  import { buildCDF as buildCDF3, validateCDF as validateCDF3, validateSlotReferences as validateSlotReferences2 } from "@contentful/experience-design-system-types";
26777
- import { jsx as jsx54, jsxs as jsxs45 } from "react/jsx-runtime";
26603
+ import { jsx as jsx52, jsxs as jsxs45 } from "react/jsx-runtime";
26778
26604
  function buildGenerateComponentsArgs(opts) {
26779
26605
  const args = ["__generate", "components", "--agent", opts.agent, "--session", opts.sessionId];
26780
26606
  if (opts.tokensPath) args.push("--tokens", opts.tokensPath);
@@ -26791,7 +26617,6 @@ function buildGenerateTokensArgs(opts) {
26791
26617
  if (opts.model) args.push("--model", opts.model);
26792
26618
  if (opts.bedrock) args.push("--bedrock");
26793
26619
  if (opts.noCache) args.push("--no-cache");
26794
- for (const prompt of opts.promptOverrides ?? []) args.push("--prompt", prompt);
26795
26620
  return args;
26796
26621
  }
26797
26622
  function buildMapTokensArgs(opts) {
@@ -26799,7 +26624,6 @@ function buildMapTokensArgs(opts) {
26799
26624
  if (opts.model) args.push("--model", opts.model);
26800
26625
  if (opts.noCache) args.push("--no-cache");
26801
26626
  if (opts.skipAgent) args.push("--skip-agent");
26802
- for (const prompt of opts.promptOverrides ?? []) args.push("--prompt", prompt);
26803
26627
  if (opts.existingEntitiesPath) args.push("--existing-entities-path", opts.existingEntitiesPath);
26804
26628
  return args;
26805
26629
  }
@@ -26875,6 +26699,7 @@ function WizardApp({
26875
26699
  bedrock = false,
26876
26700
  initialProjectPath,
26877
26701
  host,
26702
+ compositionMap,
26878
26703
  promptOverrides,
26879
26704
  noCache = false,
26880
26705
  livePreview = true,
@@ -27044,8 +26869,7 @@ If you are using AWS Bedrock, run:
27044
26869
  agent: state.agent,
27045
26870
  ...state.agentModel ? { model: state.agentModel } : {},
27046
26871
  ...state.bedrock ? { bedrock: true } : {},
27047
- noCache: effectiveNoCache,
27048
- promptOverrides
26872
+ noCache: effectiveNoCache
27049
26873
  });
27050
26874
  const result = await runSpawnedCli(tokenArgs);
27051
26875
  if (result.exitCode !== 0) {
@@ -27125,7 +26949,6 @@ If you are using AWS Bedrock, run:
27125
26949
  ...state.agentModel ? { model: state.agentModel } : {},
27126
26950
  noCache: effectiveNoCache,
27127
26951
  skipAgent: skipMapTokens,
27128
- promptOverrides,
27129
26952
  ...state.existingEntitiesPath ? { existingEntitiesPath: state.existingEntitiesPath } : {}
27130
26953
  });
27131
26954
  const result = await runCli(args);
@@ -27144,6 +26967,7 @@ If you are using AWS Bedrock, run:
27144
26967
  update({ step: "extracting", outDir, extractProgress: null, compositionPhase: null });
27145
26968
  const extractArgs = [findCliPath(), "__extract", "--project", projectPath];
27146
26969
  if (noCache) extractArgs.push("--composition-refresh");
26970
+ if (compositionMap) extractArgs.push("--composition-map", compositionMap);
27147
26971
  for (const p of promptOverrides ?? []) extractArgs.push("--prompt", p);
27148
26972
  if (state.agent) extractArgs.push("--agent", state.agent);
27149
26973
  if (state.bedrock) extractArgs.push("--bedrock");
@@ -27208,34 +27032,6 @@ Make sure this path contains TypeScript/React/Vue component files (.tsx, .ts, .v
27208
27032
  });
27209
27033
  return;
27210
27034
  }
27211
- try {
27212
- const { overrides, errors } = parsePromptOverrides(promptOverrides ?? []);
27213
- if (errors.length > 0) throw new Error(errors.join("; "));
27214
- const selectOverride = overrides.get("select");
27215
- let promptText;
27216
- let promptPath;
27217
- if (selectOverride?.kind === "text") promptText = selectOverride.value;
27218
- if (selectOverride?.kind === "path") {
27219
- promptPath = resolve17(selectOverride.value);
27220
- await resolvePromptOverride(selectOverride);
27221
- }
27222
- if (state.agent) {
27223
- await runSelectionAgent({
27224
- sessionId: extractSessionId ?? "",
27225
- agent: state.agent,
27226
- ...state.agentModel ? { model: state.agentModel } : {},
27227
- ...promptText !== void 0 ? { promptText } : {},
27228
- ...promptPath ? { promptPath } : {}
27229
- });
27230
- }
27231
- } catch (error) {
27232
- update({
27233
- step: "error",
27234
- errorStep: "selection agent",
27235
- errorMessage: error instanceof Error ? error.message : String(error)
27236
- });
27237
- return;
27238
- }
27239
27035
  update({
27240
27036
  step: "scope-gate",
27241
27037
  extractSessionId
@@ -27961,7 +27757,7 @@ If using a custom host configuration, make sure the space exists on that host.`
27961
27757
  const stepContent = (() => {
27962
27758
  switch (state.step) {
27963
27759
  case "welcome":
27964
- return /* @__PURE__ */ jsx54(
27760
+ return /* @__PURE__ */ jsx52(
27965
27761
  WelcomeStep,
27966
27762
  {
27967
27763
  onContinue: (path) => {
@@ -27973,7 +27769,7 @@ If using a custom host configuration, make sure the space exists on that host.`
27973
27769
  }
27974
27770
  );
27975
27771
  case "token-input":
27976
- return /* @__PURE__ */ jsx54(
27772
+ return /* @__PURE__ */ jsx52(
27977
27773
  TokenInputStep,
27978
27774
  {
27979
27775
  onConfirm: (rawTokensPath) => {
@@ -27984,7 +27780,7 @@ If using a custom host configuration, make sure the space exists on that host.`
27984
27780
  }
27985
27781
  );
27986
27782
  case "token-reuse-gate":
27987
- return /* @__PURE__ */ jsx54(
27783
+ return /* @__PURE__ */ jsx52(
27988
27784
  GateStep,
27989
27785
  {
27990
27786
  successMessage: "Existing tokens.json found",
@@ -28006,7 +27802,7 @@ If using a custom host configuration, make sure the space exists on that host.`
28006
27802
  }
28007
27803
  );
28008
27804
  case "checking-claude-auth":
28009
- return /* @__PURE__ */ jsx54(
27805
+ return /* @__PURE__ */ jsx52(
28010
27806
  RunningStep,
28011
27807
  {
28012
27808
  stepNumber: state.authCheckStepNumber,
@@ -28016,7 +27812,7 @@ If using a custom host configuration, make sure the space exists on that host.`
28016
27812
  }
28017
27813
  );
28018
27814
  case "generating-tokens":
28019
- return /* @__PURE__ */ jsx54(
27815
+ return /* @__PURE__ */ jsx52(
28020
27816
  RunningStep,
28021
27817
  {
28022
27818
  stepNumber: 1,
@@ -28026,7 +27822,7 @@ If using a custom host configuration, make sure the space exists on that host.`
28026
27822
  }
28027
27823
  );
28028
27824
  case "path-validation":
28029
- return /* @__PURE__ */ jsx54(
27825
+ return /* @__PURE__ */ jsx52(
28030
27826
  PathValidationStep,
28031
27827
  {
28032
27828
  projectPath: state.projectPath,
@@ -28061,7 +27857,7 @@ If using a custom host configuration, make sure the space exists on that host.`
28061
27857
  if (phase === "done") return "Composition mapping resolved \u2713";
28062
27858
  return `Composition: ${phase}`;
28063
27859
  })();
28064
- return /* @__PURE__ */ jsx54(
27860
+ return /* @__PURE__ */ jsx52(
28065
27861
  RunningStep,
28066
27862
  {
28067
27863
  stepNumber: hasTokens ? 2 : 1,
@@ -28075,7 +27871,7 @@ If using a custom host configuration, make sure the space exists on that host.`
28075
27871
  }
28076
27872
  case "scope-gate": {
28077
27873
  if (!state.extractSessionId) {
28078
- return /* @__PURE__ */ jsx54(Box46, { paddingX: 2, paddingY: 1, children: /* @__PURE__ */ jsx54(Text50, { color: PALETTE.error, children: "Error: extract session ID missing \u2014 please re-run." }) });
27874
+ return /* @__PURE__ */ jsx52(Box44, { paddingX: 2, paddingY: 1, children: /* @__PURE__ */ jsx52(Text48, { color: PALETTE.error, children: "Error: extract session ID missing \u2014 please re-run." }) });
28079
27875
  }
28080
27876
  const sessionId2 = state.extractSessionId;
28081
27877
  const db = openPipelineDb();
@@ -28085,8 +27881,8 @@ If using a custom host configuration, make sure the space exists on that host.`
28085
27881
  } finally {
28086
27882
  db.close();
28087
27883
  }
28088
- return /* @__PURE__ */ jsx54(
28089
- ScopeGateHost,
27884
+ return /* @__PURE__ */ jsx52(
27885
+ ScopeGateStep,
28090
27886
  {
28091
27887
  components,
28092
27888
  onConfirm: (decisions) => {
@@ -28118,7 +27914,7 @@ If using a custom host configuration, make sure the space exists on that host.`
28118
27914
  const p = state.generateProgress;
28119
27915
  const stepNum = hasTokens ? 4 : 3;
28120
27916
  const progressDetail = p ? `[${p.done}/${p.total}] ${p.current} \u2014 this can take 10\u201330 minutes for large libraries` : `Starting up ${state.agent}... (this can take 10\u201330 minutes for large libraries \u2014 grab a coffee)`;
28121
- return /* @__PURE__ */ jsx54(
27917
+ return /* @__PURE__ */ jsx52(
28122
27918
  RunningStep,
28123
27919
  {
28124
27920
  stepNumber: stepNum,
@@ -28131,7 +27927,7 @@ If using a custom host configuration, make sure the space exists on that host.`
28131
27927
  }
28132
27928
  case "mapping-tokens": {
28133
27929
  const stepNum = hasTokens ? 5 : 4;
28134
- return /* @__PURE__ */ jsx54(
27930
+ return /* @__PURE__ */ jsx52(
28135
27931
  RunningStep,
28136
27932
  {
28137
27933
  stepNumber: stepNum,
@@ -28143,8 +27939,8 @@ If using a custom host configuration, make sure the space exists on that host.`
28143
27939
  );
28144
27940
  }
28145
27941
  case "final-review": {
28146
- return /* @__PURE__ */ jsx54(
28147
- FinalReviewHost,
27942
+ return /* @__PURE__ */ jsx52(
27943
+ GenerateReviewStep,
28148
27944
  {
28149
27945
  extractSessionId: state.extractSessionId,
28150
27946
  tokenSessionId: state.tokenSessionId,
@@ -28202,7 +27998,7 @@ If using a custom host configuration, make sure the space exists on that host.`
28202
27998
  const files = hasComponents || hasTokens ? "components.json" : null;
28203
27999
  const count = state.generatedAcceptedCount > 0 ? state.generatedAcceptedCount : state.generatedCount;
28204
28000
  const summary = hasComponents ? `${count} component definition${count !== 1 ? "s" : ""} ready${hasTokens ? ", design tokens ready" : ""}.` : hasTokens ? "Design tokens ready." : "Ready to continue.";
28205
- return /* @__PURE__ */ jsx54(
28001
+ return /* @__PURE__ */ jsx52(
28206
28002
  PushDecisionGateStep,
28207
28003
  {
28208
28004
  summary,
@@ -28234,7 +28030,7 @@ If using a custom host configuration, make sure the space exists on that host.`
28234
28030
  );
28235
28031
  }
28236
28032
  case "credentials":
28237
- return /* @__PURE__ */ jsx54(
28033
+ return /* @__PURE__ */ jsx52(
28238
28034
  CredentialsStep,
28239
28035
  {
28240
28036
  initialSpaceId: state.spaceId,
@@ -28266,7 +28062,7 @@ If using a custom host configuration, make sure the space exists on that host.`
28266
28062
  }
28267
28063
  );
28268
28064
  case "previewing":
28269
- return /* @__PURE__ */ jsx54(
28065
+ return /* @__PURE__ */ jsx52(
28270
28066
  RunningStep,
28271
28067
  {
28272
28068
  stepNumber: totalSteps,
@@ -28277,7 +28073,7 @@ If using a custom host configuration, make sure the space exists on that host.`
28277
28073
  );
28278
28074
  case "preview-gate": {
28279
28075
  const editableComponentCount = extractComponents(state.cdf).length;
28280
- return /* @__PURE__ */ jsx54(
28076
+ return /* @__PURE__ */ jsx52(
28281
28077
  WizardPreviewStep,
28282
28078
  {
28283
28079
  preview: state.serverPreview,
@@ -28305,9 +28101,9 @@ If using a custom host configuration, make sure the space exists on that host.`
28305
28101
  );
28306
28102
  }
28307
28103
  case "pushing":
28308
- return /* @__PURE__ */ jsx54(PushingStep, { stepNumber: totalSteps, totalSteps, progress: state.pushProgress });
28104
+ return /* @__PURE__ */ jsx52(PushingStep, { stepNumber: totalSteps, totalSteps, progress: state.pushProgress });
28309
28105
  case "path-prompt":
28310
- return /* @__PURE__ */ jsx54(
28106
+ return /* @__PURE__ */ jsx52(
28311
28107
  PathPrompt,
28312
28108
  {
28313
28109
  defaultPath: state.outDir,
@@ -28326,7 +28122,7 @@ If using a custom host configuration, make sure the space exists on that host.`
28326
28122
  }
28327
28123
  );
28328
28124
  case "save-conflict-gate":
28329
- return /* @__PURE__ */ jsx54(
28125
+ return /* @__PURE__ */ jsx52(
28330
28126
  SaveConflictGate,
28331
28127
  {
28332
28128
  path: state.outDir,
@@ -28344,7 +28140,7 @@ If using a custom host configuration, make sure the space exists on that host.`
28344
28140
  }
28345
28141
  );
28346
28142
  case "printing":
28347
- return /* @__PURE__ */ jsx54(
28143
+ return /* @__PURE__ */ jsx52(
28348
28144
  RunningStep,
28349
28145
  {
28350
28146
  stepNumber: totalSteps,
@@ -28355,7 +28151,7 @@ If using a custom host configuration, make sure the space exists on that host.`
28355
28151
  );
28356
28152
  case "print-gate": {
28357
28153
  const teaser = buildRunTeaserLine(state.lastRunId);
28358
- return /* @__PURE__ */ jsx54(
28154
+ return /* @__PURE__ */ jsx52(
28359
28155
  GateStep,
28360
28156
  {
28361
28157
  successMessage: "Files saved",
@@ -28373,7 +28169,7 @@ If using a custom host configuration, make sure the space exists on that host.`
28373
28169
  case "done": {
28374
28170
  const totalFailed = state.pushResult.componentTypes.failed + state.pushResult.designTokens.failed;
28375
28171
  const teaser = buildRunTeaserLine(state.lastRunId);
28376
- return /* @__PURE__ */ jsx54(
28172
+ return /* @__PURE__ */ jsx52(
28377
28173
  DoneStep,
28378
28174
  {
28379
28175
  componentTypes: state.pushResult.componentTypes,
@@ -28389,7 +28185,7 @@ If using a custom host configuration, make sure the space exists on that host.`
28389
28185
  );
28390
28186
  }
28391
28187
  case "preview-validation-error": {
28392
- return /* @__PURE__ */ jsx54(
28188
+ return /* @__PURE__ */ jsx52(
28393
28189
  PreviewValidationErrorStep,
28394
28190
  {
28395
28191
  errors: state.previewValidationErrors,
@@ -28405,7 +28201,7 @@ If using a custom host configuration, make sure the space exists on that host.`
28405
28201
  );
28406
28202
  }
28407
28203
  case "error":
28408
- return /* @__PURE__ */ jsx54(
28204
+ return /* @__PURE__ */ jsx52(
28409
28205
  ErrorStep,
28410
28206
  {
28411
28207
  stepName: state.errorStep,
@@ -28427,9 +28223,9 @@ If using a custom host configuration, make sure the space exists on that host.`
28427
28223
  return null;
28428
28224
  }
28429
28225
  })();
28430
- return /* @__PURE__ */ jsxs45(Box46, { flexDirection: "column", width: terminalWidth, children: [
28431
- /* @__PURE__ */ jsx54(TopBar, { subcommand: "import", hints }),
28432
- /* @__PURE__ */ jsx54(CustomPromptBanner, { generatePromptPath }),
28226
+ return /* @__PURE__ */ jsxs45(Box44, { flexDirection: "column", width: terminalWidth, children: [
28227
+ /* @__PURE__ */ jsx52(TopBar, { subcommand: "import", hints }),
28228
+ /* @__PURE__ */ jsx52(CustomPromptBanner, { generatePromptPath }),
28433
28229
  stepContent
28434
28230
  ] });
28435
28231
  }
@@ -28472,8 +28268,8 @@ var init_WizardApp = __esm({
28472
28268
  init_tokens();
28473
28269
  init_preview_utils();
28474
28270
  init_db();
28475
- init_scope_gate_host();
28476
- init_final_review_host();
28271
+ init_ScopeGateStep();
28272
+ init_GenerateReviewStep();
28477
28273
  init_runScopeGate();
28478
28274
  init_src();
28479
28275
  init_path_utils();
@@ -28482,8 +28278,6 @@ var init_WizardApp = __esm({
28482
28278
  init_fetch_and_persist_existing_contentful_entities();
28483
28279
  init_wizard_state_transitions();
28484
28280
  init_cli_path();
28485
- init_prompt_overrides();
28486
- init_run_selection_agent();
28487
28281
  WIZARD_LOG = join20(tmpdir(), "experiences-import-wizard.log");
28488
28282
  }
28489
28283
  });
@@ -28491,73 +28285,81 @@ var init_WizardApp = __esm({
28491
28285
  // packages/experience-design-system-cli/src/import/command.ts
28492
28286
  function registerImportCommand(program) {
28493
28287
  const cmd = program.command("import").description("Run the full pipeline: analyze \u2192 select \u2192 generate \u2192 push").option("--project <path>", "Path to the project root to analyze", ".");
28494
- cmd.option(
28495
- "--tokens <path>",
28496
- "Path to a raw token source file (SCSS, CSS variables, JS/TS, Style Dictionary, etc.) to classify and import alongside components. Bypasses the interactive token prompt."
28497
- );
28498
28288
  addAgentModelOptions(cmd, {
28499
- agentDescription: 'Agent and optional model as agent:model or "agent model" (overrides credentials.json; falls back to "claude")',
28500
- includeModel: false,
28501
- includeBedrock: false
28502
- });
28503
- cmd.option(
28289
+ agentDescription: 'Agent to use for generate components (overrides credentials.json; falls back to "claude")',
28290
+ modelDescription: "Model to use for generate components (defaults to a lightweight per-agent model; override with EDS_AGENT_MODEL_<AGENT>)"
28291
+ }).option(
28292
+ "--raw-tokens <path>",
28293
+ "Path to a raw token source file (SCSS, CSS variables, JS/TS, Style Dictionary, etc.) to classify and import alongside components. Bypasses the interactive token prompt."
28294
+ ).option(
28295
+ "--skip-map-tokens",
28296
+ "Skip agentic token restrictions while still resolving deterministic token-default paths"
28297
+ ).option("--no-cache", "Re-run all steps even if output already exists");
28298
+ cmd.option("--composition-map <path>", "Consume a hand-authored parent\u2192children interchange map").option(
28504
28299
  "--prompt <stage=value>",
28505
- "Override a composition, selection, token, generation, or token-mapping prompt (repeatable). value is a file path or literal text, e.g. --prompt select=./p.md",
28300
+ "Override a stage prompt (repeatable). value is a file path or literal text, e.g. --prompt composition=./p.md",
28506
28301
  (v, acc) => [...acc, v],
28507
28302
  []
28508
- ).option("--no-cache", "Re-run all steps even if output already exists").action(async (opts) => {
28509
- const interactiveTerminalSupported = getInteractiveTerminalSupport().supported;
28510
- if (opts.tokens !== void 0) {
28511
- const { access: access9 } = await import("node:fs/promises");
28512
- try {
28513
- await access9(normalizePath(opts.tokens));
28514
- } catch {
28515
- process.stderr.write(`Error: --tokens: file not found: ${opts.tokens}
28303
+ ).action(
28304
+ async (opts) => {
28305
+ const interactiveTerminalSupported = getInteractiveTerminalSupport().supported;
28306
+ if (opts.rawTokens !== void 0) {
28307
+ const { access: access9 } = await import("node:fs/promises");
28308
+ try {
28309
+ await access9(normalizePath(opts.rawTokens));
28310
+ } catch {
28311
+ process.stderr.write(`Error: --raw-tokens: file not found: ${opts.rawTokens}
28516
28312
  `);
28517
- process.exit(1);
28313
+ process.exit(1);
28314
+ return;
28315
+ }
28316
+ }
28317
+ if (!interactiveTerminalSupported) {
28318
+ requireInteractiveTerminal({
28319
+ alternative: "run experiences import in an interactive terminal"
28320
+ });
28321
+ }
28322
+ {
28323
+ const { render: render5 } = await import("ink");
28324
+ const { createElement: createElement6 } = await import("react");
28325
+ const { WizardApp: WizardApp2 } = await Promise.resolve().then(() => (init_WizardApp(), WizardApp_exports));
28326
+ const creds = await readExperiencesCredentials();
28327
+ const resolvedAgent = opts.agent || creds.agent || "claude";
28328
+ const resolvedModel = opts.model || creds.agentModel || void 0;
28329
+ if (opts.bedrock && !(isAgentName(resolvedAgent) && agentSupportsBedrock(resolvedAgent))) {
28330
+ process.stderr.write(`Error: --bedrock is not supported for --agent ${resolvedAgent}
28331
+ `);
28332
+ process.exit(1);
28333
+ }
28334
+ const { waitUntilExit } = render5(
28335
+ createElement6(WizardApp2, {
28336
+ initialSpaceId: creds.spaceId,
28337
+ initialEnvironmentId: creds.environmentId || "master",
28338
+ initialCmaToken: creds.cmaToken,
28339
+ initialHost: toConfiguredHost(creds.host) ?? DEFAULT_CONFIGURED_HOST,
28340
+ initialAgent: resolvedAgent,
28341
+ ...resolvedModel ? { initialModel: resolvedModel } : {},
28342
+ ...opts.bedrock ? { bedrock: true } : {},
28343
+ initialProjectPath: opts.project !== "." ? normalizePath(opts.project) : void 0,
28344
+ ...buildCompositionForwardingOptions(opts),
28345
+ noCache: opts.cache === false,
28346
+ skipMapTokens: opts.skipMapTokens ?? false,
28347
+ livePreview: true,
28348
+ generatePromptPath: creds.generatePromptPath,
28349
+ ...opts.rawTokens ? { initialRawTokensPath: normalizePath(opts.rawTokens) } : {}
28350
+ })
28351
+ );
28352
+ await waitUntilExit();
28518
28353
  return;
28519
28354
  }
28520
28355
  }
28521
- if (!interactiveTerminalSupported) {
28522
- requireInteractiveTerminal({
28523
- alternative: "run experiences import in an interactive terminal"
28524
- });
28525
- }
28526
- {
28527
- const { render: render5 } = await import("ink");
28528
- const { createElement: createElement6 } = await import("react");
28529
- const { WizardApp: WizardApp2 } = await Promise.resolve().then(() => (init_WizardApp(), WizardApp_exports));
28530
- const creds = await readExperiencesCredentials();
28531
- const parsedAgentModel = parseAgentModel(opts.agent);
28532
- const resolvedAgent = resolveAgent(parsedAgentModel.agent, creds.agent);
28533
- const resolvedModel = resolveModel(parsedAgentModel.model, creds.agentModel);
28534
- const { waitUntilExit } = render5(
28535
- createElement6(WizardApp2, {
28536
- initialSpaceId: creds.spaceId,
28537
- initialEnvironmentId: creds.environmentId || "master",
28538
- initialCmaToken: creds.cmaToken,
28539
- initialHost: toConfiguredHost(creds.host) ?? DEFAULT_CONFIGURED_HOST,
28540
- initialAgent: resolvedAgent,
28541
- ...resolvedModel ? { initialModel: resolvedModel } : {},
28542
- initialProjectPath: opts.project !== "." ? normalizePath(opts.project) : void 0,
28543
- ...buildCompositionForwardingOptions(opts),
28544
- noCache: opts.cache === false,
28545
- skipMapTokens: false,
28546
- livePreview: true,
28547
- generatePromptPath: creds.generatePromptPath,
28548
- ...opts.tokens ? { initialRawTokensPath: normalizePath(opts.tokens) } : {}
28549
- })
28550
- );
28551
- await waitUntilExit();
28552
- return;
28553
- }
28554
- });
28356
+ );
28555
28357
  }
28556
28358
  var init_command6 = __esm({
28557
28359
  "packages/experience-design-system-cli/src/import/command.ts"() {
28558
28360
  "use strict";
28361
+ init_src();
28559
28362
  init_path_utils();
28560
- init_agent_model_resolve();
28561
28363
  init_agent_model_options();
28562
28364
  init_credentials_store();
28563
28365
  init_host_utils();
@@ -28868,7 +28670,7 @@ var init_checks2 = __esm({
28868
28670
  });
28869
28671
 
28870
28672
  // packages/experience-design-system-cli/src/doctor/command.ts
28871
- async function runChecks() {
28673
+ async function runChecks(opts) {
28872
28674
  const pkgRoot = findPkgRoot();
28873
28675
  const results = [];
28874
28676
  const record = (name, passed, required = true) => {
@@ -28877,11 +28679,13 @@ async function runChecks() {
28877
28679
  };
28878
28680
  if (record("Node.js version", await reportNode())) {
28879
28681
  const pnpmOk = record("pnpm", await reportPnpm(pkgRoot));
28880
- if (pnpmOk && record("dependencies", await reportDependencies(pkgRoot))) {
28682
+ if (opts.skipBuild) {
28683
+ info("\nSkipping install + build (--skip-build)");
28684
+ } else if (pnpmOk && record("dependencies", await reportDependencies(pkgRoot))) {
28881
28685
  record("build", await reportBuild(pkgRoot));
28882
28686
  }
28883
28687
  }
28884
- record("coding agent", await reportAgent(), false);
28688
+ if (!opts.skipAgent) record("coding agent", await reportAgent(), false);
28885
28689
  return results;
28886
28690
  }
28887
28691
  function printSummary(results) {
@@ -28921,13 +28725,13 @@ ${c.red(c.bold(`\u2717 ${requiredFailed} required check${requiredFailed === 1 ?
28921
28725
  `);
28922
28726
  return 1;
28923
28727
  }
28924
- async function runDoctor() {
28728
+ async function runDoctor(opts) {
28925
28729
  process.stderr.write(`${c.bold("experiences doctor")} \u2014 checking your environment
28926
28730
  `);
28927
- process.exitCode = printSummary(await runChecks());
28731
+ process.exitCode = printSummary(await runChecks(opts));
28928
28732
  }
28929
28733
  function registerDoctorCommand(program) {
28930
- program.command("doctor").description("Check prerequisites so experiences import runs without errors").helpOption(false).action(() => runDoctor());
28734
+ program.command("doctor").description("Check prerequisites so experiences import runs without errors").option("--skip-build", "Skip the pnpm install + build step (useful if already built)").option("--skip-agent", "Skip the coding agent check").action((opts) => runDoctor(opts));
28931
28735
  }
28932
28736
  var init_command7 = __esm({
28933
28737
  "packages/experience-design-system-cli/src/doctor/command.ts"() {
@@ -28941,8 +28745,8 @@ var init_command7 = __esm({
28941
28745
 
28942
28746
  // packages/experience-design-system-cli/src/setup/SetupStepper.tsx
28943
28747
  import React18 from "react";
28944
- import { Box as Box47, Text as Text51 } from "ink";
28945
- import { jsx as jsx55, jsxs as jsxs46 } from "react/jsx-runtime";
28748
+ import { Box as Box45, Text as Text49 } from "ink";
28749
+ import { jsx as jsx53, jsxs as jsxs46 } from "react/jsx-runtime";
28946
28750
  function stepLabel(step, title, state, wide) {
28947
28751
  if (state === "complete") return wide ? `\u2713 ${title}` : "\u2713";
28948
28752
  if (state === "active") return wide ? `[${step} ${title}]` : `[${step}]`;
@@ -28955,12 +28759,12 @@ function stepColor(state) {
28955
28759
  }
28956
28760
  function SetupStepper({ activeStep, columns }) {
28957
28761
  const wide = columns !== void 0 && columns >= WIDE_MIN_COLUMNS;
28958
- return /* @__PURE__ */ jsx55(Box47, { columnGap: wide ? 0 : COMPACT_GAP, children: SETUP_SCREENS.map((title, index) => {
28762
+ return /* @__PURE__ */ jsx53(Box45, { columnGap: wide ? 0 : COMPACT_GAP, children: SETUP_SCREENS.map((title, index) => {
28959
28763
  const step = index + 1;
28960
28764
  const state = step < activeStep ? "complete" : step === activeStep ? "active" : "pending";
28961
28765
  return /* @__PURE__ */ jsxs46(React18.Fragment, { children: [
28962
- wide && index > 0 && /* @__PURE__ */ jsx55(Text51, { dimColor: true, children: WIDE_SEPARATOR }),
28963
- /* @__PURE__ */ jsx55(Text51, { bold: state === "active", dimColor: state === "pending", color: stepColor(state), children: stepLabel(step, title, state, wide) })
28766
+ wide && index > 0 && /* @__PURE__ */ jsx53(Text49, { dimColor: true, children: WIDE_SEPARATOR }),
28767
+ /* @__PURE__ */ jsx53(Text49, { bold: state === "active", dimColor: state === "pending", color: stepColor(state), children: stepLabel(step, title, state, wide) })
28964
28768
  ] }, step);
28965
28769
  }) });
28966
28770
  }
@@ -28979,33 +28783,33 @@ var init_SetupStepper = __esm({
28979
28783
  });
28980
28784
 
28981
28785
  // packages/experience-design-system-cli/src/setup/steps/StepLayout.tsx
28982
- import { Box as Box48, Text as Text52 } from "ink";
28983
- import { jsx as jsx56, jsxs as jsxs47 } from "react/jsx-runtime";
28786
+ import { Box as Box46, Text as Text50 } from "ink";
28787
+ import { jsx as jsx54, jsxs as jsxs47 } from "react/jsx-runtime";
28984
28788
  function StepLayout({ helpText, children, prompt }) {
28985
- return /* @__PURE__ */ jsxs47(Box48, { flexDirection: "column", children: [
28789
+ return /* @__PURE__ */ jsxs47(Box46, { flexDirection: "column", children: [
28986
28790
  children,
28987
- prompt && /* @__PURE__ */ jsx56(Box48, { marginTop: 1, children: prompt }),
28988
- helpText && /* @__PURE__ */ jsx56(Box48, { marginTop: 1, children: /* @__PURE__ */ jsx56(Text52, { dimColor: true, children: helpText }) })
28791
+ prompt && /* @__PURE__ */ jsx54(Box46, { marginTop: 1, children: prompt }),
28792
+ helpText && /* @__PURE__ */ jsx54(Box46, { marginTop: 1, children: /* @__PURE__ */ jsx54(Text50, { dimColor: true, children: helpText }) })
28989
28793
  ] });
28990
28794
  }
28991
28795
  function StepSuccess({ children }) {
28992
- return /* @__PURE__ */ jsxs47(Text52, { color: PALETTE.success, children: [
28796
+ return /* @__PURE__ */ jsxs47(Text50, { color: PALETTE.success, children: [
28993
28797
  "\u2713 ",
28994
28798
  children
28995
28799
  ] });
28996
28800
  }
28997
28801
  function StepWarning({ children }) {
28998
- return /* @__PURE__ */ jsxs47(Text52, { color: PALETTE.warning, children: [
28802
+ return /* @__PURE__ */ jsxs47(Text50, { color: PALETTE.warning, children: [
28999
28803
  "\u26A0 ",
29000
28804
  children
29001
28805
  ] });
29002
28806
  }
29003
28807
  function StepValue({ label, value }) {
29004
28808
  const color = value ? void 0 : PALETTE.warning;
29005
- return /* @__PURE__ */ jsxs47(Box48, { children: [
29006
- /* @__PURE__ */ jsx56(Box48, { width: 2, children: /* @__PURE__ */ jsx56(Text52, { color, children: value ? "" : "\u26A0" }) }),
29007
- /* @__PURE__ */ jsx56(Box48, { width: 20, flexShrink: 0, children: /* @__PURE__ */ jsx56(Text52, { color, children: label }) }),
29008
- /* @__PURE__ */ jsx56(Text52, { color, children: value || "(not set)" })
28809
+ return /* @__PURE__ */ jsxs47(Box46, { children: [
28810
+ /* @__PURE__ */ jsx54(Box46, { width: 2, children: /* @__PURE__ */ jsx54(Text50, { color, children: value ? "" : "\u26A0" }) }),
28811
+ /* @__PURE__ */ jsx54(Box46, { width: 20, flexShrink: 0, children: /* @__PURE__ */ jsx54(Text50, { color, children: label }) }),
28812
+ /* @__PURE__ */ jsx54(Text50, { color, children: value || "(not set)" })
29009
28813
  ] });
29010
28814
  }
29011
28815
  var init_StepLayout = __esm({
@@ -29017,9 +28821,9 @@ var init_StepLayout = __esm({
29017
28821
 
29018
28822
  // packages/experience-design-system-cli/src/setup/steps/CodingAgentScreen.tsx
29019
28823
  import { useEffect as useEffect12, useRef as useRef10, useState as useState24 } from "react";
29020
- import { Box as Box49, Text as Text53 } from "ink";
28824
+ import { Box as Box47, Text as Text51 } from "ink";
29021
28825
  import { Select, TextInput } from "@inkjs/ui";
29022
- import { jsx as jsx57, jsxs as jsxs48 } from "react/jsx-runtime";
28826
+ import { jsx as jsx55, jsxs as jsxs48 } from "react/jsx-runtime";
29023
28827
  async function detectAgents(exists = binaryExists) {
29024
28828
  const found = await Promise.all(AGENT_DEFS.map(async (agent) => await exists(agent.binary) ? agent : void 0));
29025
28829
  return found.filter((agent) => agent !== void 0);
@@ -29052,7 +28856,7 @@ function CodingAgentScreen({ onDone, deps }) {
29052
28856
  const found = await detectAgents(exists);
29053
28857
  if (found.length === 1) {
29054
28858
  const only = found[0];
29055
- setNotes([/* @__PURE__ */ jsx57(StepSuccess, { children: `${only.name} (${only.binary}) found` }, "found")]);
28859
+ setNotes([/* @__PURE__ */ jsx55(StepSuccess, { children: `${only.name} (${only.binary}) found` }, "found")]);
29056
28860
  afterSelection(only);
29057
28861
  return;
29058
28862
  }
@@ -29060,7 +28864,7 @@ function CodingAgentScreen({ onDone, deps }) {
29060
28864
  setPhase({ kind: "choose", found });
29061
28865
  return;
29062
28866
  }
29063
- setNotes([/* @__PURE__ */ jsx57(StepWarning, { children: "No coding agent found on PATH" }, "none")]);
28867
+ setNotes([/* @__PURE__ */ jsx55(StepWarning, { children: "No coding agent found on PATH" }, "none")]);
29064
28868
  setPhase({ kind: "install-choice" });
29065
28869
  })();
29066
28870
  }, []);
@@ -29072,12 +28876,12 @@ function CodingAgentScreen({ onDone, deps }) {
29072
28876
  onDone("failed");
29073
28877
  return;
29074
28878
  }
29075
- setNotes((current) => [...current, /* @__PURE__ */ jsx57(StepSuccess, { children: `${agent.name} installed` }, "installed")]);
28879
+ setNotes((current) => [...current, /* @__PURE__ */ jsx55(StepSuccess, { children: `${agent.name} installed` }, "installed")]);
29076
28880
  afterSelection(agent);
29077
28881
  };
29078
- const chooser = (question, options, describe, onPick) => /* @__PURE__ */ jsxs48(Box49, { flexDirection: "column", children: [
29079
- /* @__PURE__ */ jsx57(Text53, { children: question }),
29080
- /* @__PURE__ */ jsx57(Box49, { marginTop: 1, children: /* @__PURE__ */ jsx57(
28882
+ const chooser = (question, options, describe, onPick) => /* @__PURE__ */ jsxs48(Box47, { flexDirection: "column", children: [
28883
+ /* @__PURE__ */ jsx55(Text51, { children: question }),
28884
+ /* @__PURE__ */ jsx55(Box47, { marginTop: 1, children: /* @__PURE__ */ jsx55(
29081
28885
  Select,
29082
28886
  {
29083
28887
  options: [
@@ -29089,7 +28893,7 @@ function CodingAgentScreen({ onDone, deps }) {
29089
28893
  ) })
29090
28894
  ] });
29091
28895
  if (phase.kind === "choose") {
29092
- return /* @__PURE__ */ jsx57(
28896
+ return /* @__PURE__ */ jsx55(
29093
28897
  StepLayout,
29094
28898
  {
29095
28899
  helpText: AGENT_HELP,
@@ -29104,7 +28908,7 @@ function CodingAgentScreen({ onDone, deps }) {
29104
28908
  );
29105
28909
  }
29106
28910
  if (phase.kind === "install-choice") {
29107
- return /* @__PURE__ */ jsx57(
28911
+ return /* @__PURE__ */ jsx55(
29108
28912
  StepLayout,
29109
28913
  {
29110
28914
  helpText: AGENT_HELP,
@@ -29119,13 +28923,13 @@ function CodingAgentScreen({ onDone, deps }) {
29119
28923
  );
29120
28924
  }
29121
28925
  if (phase.kind === "model") {
29122
- return /* @__PURE__ */ jsx57(
28926
+ return /* @__PURE__ */ jsx55(
29123
28927
  StepLayout,
29124
28928
  {
29125
28929
  helpText: AGENT_HELP,
29126
- prompt: /* @__PURE__ */ jsxs48(Box49, { children: [
29127
- /* @__PURE__ */ jsx57(Text53, { children: "Model name (optional - press Enter for Codex default): " }),
29128
- /* @__PURE__ */ jsx57(
28930
+ prompt: /* @__PURE__ */ jsxs48(Box47, { children: [
28931
+ /* @__PURE__ */ jsx55(Text51, { children: "Model name (optional - press Enter for Codex default): " }),
28932
+ /* @__PURE__ */ jsx55(
29129
28933
  TextInput,
29130
28934
  {
29131
28935
  onSubmit: (value) => void save(phase.agent.binary, value.trim() || void 0)
@@ -29135,19 +28939,19 @@ function CodingAgentScreen({ onDone, deps }) {
29135
28939
  ] }),
29136
28940
  children: [
29137
28941
  ...notes,
29138
- /* @__PURE__ */ jsx57(StepWarning, { children: "No OPENAI_API_KEY \u2014 using ChatGPT account authentication." }, "no-key"),
29139
- /* @__PURE__ */ jsx57(Text53, { dimColor: true, children: "Tip: run codex then type /model to browse all available models." }, "tip")
28942
+ /* @__PURE__ */ jsx55(StepWarning, { children: "No OPENAI_API_KEY \u2014 using ChatGPT account authentication." }, "no-key"),
28943
+ /* @__PURE__ */ jsx55(Text51, { dimColor: true, children: "Tip: run codex then type /model to browse all available models." }, "tip")
29140
28944
  ]
29141
28945
  }
29142
28946
  );
29143
28947
  }
29144
28948
  if (phase.kind === "installing") {
29145
- return /* @__PURE__ */ jsx57(StepLayout, { helpText: AGENT_HELP, children: [...notes, /* @__PURE__ */ jsx57(Text53, { children: `Installing ${phase.agent.name}\u2026` }, "installing")] });
28949
+ return /* @__PURE__ */ jsx55(StepLayout, { helpText: AGENT_HELP, children: [...notes, /* @__PURE__ */ jsx55(Text51, { children: `Installing ${phase.agent.name}\u2026` }, "installing")] });
29146
28950
  }
29147
28951
  if (phase.kind === "failed") {
29148
- return /* @__PURE__ */ jsx57(StepLayout, { helpText: AGENT_HELP, children: [...notes, /* @__PURE__ */ jsx57(Text53, { children: `\u2717 ${phase.message}` }, "failed")] });
28952
+ return /* @__PURE__ */ jsx55(StepLayout, { helpText: AGENT_HELP, children: [...notes, /* @__PURE__ */ jsx55(Text51, { children: `\u2717 ${phase.message}` }, "failed")] });
29149
28953
  }
29150
- return /* @__PURE__ */ jsx57(Text53, { dimColor: true, children: "Looking for a coding agent\u2026" });
28954
+ return /* @__PURE__ */ jsx55(Text51, { dimColor: true, children: "Looking for a coding agent\u2026" });
29151
28955
  }
29152
28956
  var AGENT_HELP, SKIP_VALUE;
29153
28957
  var init_CodingAgentScreen = __esm({
@@ -29164,9 +28968,9 @@ var init_CodingAgentScreen = __esm({
29164
28968
 
29165
28969
  // packages/experience-design-system-cli/src/setup/steps/ContentfulCredentialsScreen.tsx
29166
28970
  import { useEffect as useEffect13, useRef as useRef11, useState as useState25 } from "react";
29167
- import { Box as Box50, Text as Text54 } from "ink";
28971
+ import { Box as Box48, Text as Text52 } from "ink";
29168
28972
  import { PasswordInput, Select as Select2, TextInput as TextInput2 } from "@inkjs/ui";
29169
- import { Fragment as Fragment18, jsx as jsx58, jsxs as jsxs49 } from "react/jsx-runtime";
28973
+ import { Fragment as Fragment18, jsx as jsx56, jsxs as jsxs49 } from "react/jsx-runtime";
29170
28974
  function envShadowingWarning(env) {
29171
28975
  const set = ENV_KEYS.filter((key) => env[key]);
29172
28976
  if (set.length === 0) return null;
@@ -29183,21 +28987,21 @@ function ContentfulCredentialsScreen({ onDone }) {
29183
28987
  useEffect13(() => {
29184
28988
  void readExperiencesCredentials().then(setStored);
29185
28989
  }, []);
29186
- if (!stored) return /* @__PURE__ */ jsx58(Text54, { dimColor: true, children: "Reading saved credentials\u2026" });
28990
+ if (!stored) return /* @__PURE__ */ jsx56(Text52, { dimColor: true, children: "Reading saved credentials\u2026" });
29187
28991
  const currentHost = stored.host ?? DEFAULT_CONFIGURED_HOST;
29188
28992
  const hasAny = Boolean(stored.spaceId || stored.environmentId || stored.cmaToken);
29189
28993
  const allSet = Boolean(stored.spaceId && stored.environmentId && stored.cmaToken);
29190
28994
  const shadowing = envShadowingWarning(process.env);
29191
28995
  const summary = /* @__PURE__ */ jsxs49(Fragment18, { children: [
29192
- shadowing && /* @__PURE__ */ jsx58(StepWarning, { children: shadowing }),
29193
- hasAny && /* @__PURE__ */ jsxs49(Box50, { flexDirection: "column", marginTop: shadowing ? 1 : 0, children: [
29194
- /* @__PURE__ */ jsx58(Text54, { children: "Current values:" }),
29195
- /* @__PURE__ */ jsx58(StepValue, { label: "Space ID", value: stored.spaceId }),
29196
- /* @__PURE__ */ jsx58(StepValue, { label: "Environment ID", value: stored.environmentId }),
29197
- /* @__PURE__ */ jsx58(StepValue, { label: "CMA Token", value: stored.cmaToken ? maskToken(stored.cmaToken) : void 0 }),
29198
- /* @__PURE__ */ jsx58(StepValue, { label: "API Host", value: currentHost })
28996
+ shadowing && /* @__PURE__ */ jsx56(StepWarning, { children: shadowing }),
28997
+ hasAny && /* @__PURE__ */ jsxs49(Box48, { flexDirection: "column", marginTop: shadowing ? 1 : 0, children: [
28998
+ /* @__PURE__ */ jsx56(Text52, { children: "Current values:" }),
28999
+ /* @__PURE__ */ jsx56(StepValue, { label: "Space ID", value: stored.spaceId }),
29000
+ /* @__PURE__ */ jsx56(StepValue, { label: "Environment ID", value: stored.environmentId }),
29001
+ /* @__PURE__ */ jsx56(StepValue, { label: "CMA Token", value: stored.cmaToken ? maskToken(stored.cmaToken) : void 0 }),
29002
+ /* @__PURE__ */ jsx56(StepValue, { label: "API Host", value: currentHost })
29199
29003
  ] }),
29200
- error && /* @__PURE__ */ jsx58(StepWarning, { children: error })
29004
+ error && /* @__PURE__ */ jsx56(StepWarning, { children: error })
29201
29005
  ] });
29202
29006
  const helpText = `Saved to ${experiencesCredentialsPath()} \u2014 loaded automatically by experiences import.`;
29203
29007
  if (field === "confirm") {
@@ -29205,13 +29009,13 @@ function ContentfulCredentialsScreen({ onDone }) {
29205
29009
  { label: hasAny ? "Update the saved credentials" : "Enter credentials now", value: ENTER },
29206
29010
  { label: allSet ? "Keep them as they are" : "Skip for now", value: KEEP }
29207
29011
  ];
29208
- return /* @__PURE__ */ jsx58(
29012
+ return /* @__PURE__ */ jsx56(
29209
29013
  StepLayout,
29210
29014
  {
29211
29015
  helpText,
29212
- prompt: /* @__PURE__ */ jsxs49(Box50, { flexDirection: "column", children: [
29213
- /* @__PURE__ */ jsx58(Text54, { children: "Contentful credentials" }),
29214
- /* @__PURE__ */ jsx58(Box50, { marginTop: 1, children: /* @__PURE__ */ jsx58(
29016
+ prompt: /* @__PURE__ */ jsxs49(Box48, { flexDirection: "column", children: [
29017
+ /* @__PURE__ */ jsx56(Text52, { children: "Contentful credentials" }),
29018
+ /* @__PURE__ */ jsx56(Box48, { marginTop: 1, children: /* @__PURE__ */ jsx56(
29215
29019
  Select2,
29216
29020
  {
29217
29021
  options: allSet ? [...options].reverse() : options,
@@ -29252,24 +29056,24 @@ function ContentfulCredentialsScreen({ onDone }) {
29252
29056
  onDone("completed");
29253
29057
  };
29254
29058
  const prompts = {
29255
- spaceId: /* @__PURE__ */ jsxs49(Box50, { children: [
29256
- /* @__PURE__ */ jsx58(Text54, { children: `Space ID${stored.spaceId ? ` [${stored.spaceId}]` : ""}: ` }),
29257
- /* @__PURE__ */ jsx58(TextInput2, { onSubmit: (v) => advance("spaceId", v) }, "spaceId")
29059
+ spaceId: /* @__PURE__ */ jsxs49(Box48, { children: [
29060
+ /* @__PURE__ */ jsx56(Text52, { children: `Space ID${stored.spaceId ? ` [${stored.spaceId}]` : ""}: ` }),
29061
+ /* @__PURE__ */ jsx56(TextInput2, { onSubmit: (v) => advance("spaceId", v) }, "spaceId")
29258
29062
  ] }),
29259
- environmentId: /* @__PURE__ */ jsxs49(Box50, { children: [
29260
- /* @__PURE__ */ jsx58(Text54, { children: `Environment ID [${stored.environmentId || "master"}]: ` }),
29261
- /* @__PURE__ */ jsx58(TextInput2, { onSubmit: (v) => advance("environmentId", v) }, "environmentId")
29063
+ environmentId: /* @__PURE__ */ jsxs49(Box48, { children: [
29064
+ /* @__PURE__ */ jsx56(Text52, { children: `Environment ID [${stored.environmentId || "master"}]: ` }),
29065
+ /* @__PURE__ */ jsx56(TextInput2, { onSubmit: (v) => advance("environmentId", v) }, "environmentId")
29262
29066
  ] }),
29263
- cmaToken: /* @__PURE__ */ jsxs49(Box50, { children: [
29264
- /* @__PURE__ */ jsx58(Text54, { children: `CMA token${stored.cmaToken ? " [press Enter to keep existing]" : " (paste here)"}: ` }),
29265
- /* @__PURE__ */ jsx58(PasswordInput, { onSubmit: (v) => advance("cmaToken", v) }, "cmaToken")
29067
+ cmaToken: /* @__PURE__ */ jsxs49(Box48, { children: [
29068
+ /* @__PURE__ */ jsx56(Text52, { children: `CMA token${stored.cmaToken ? " [press Enter to keep existing]" : " (paste here)"}: ` }),
29069
+ /* @__PURE__ */ jsx56(PasswordInput, { onSubmit: (v) => advance("cmaToken", v) }, "cmaToken")
29266
29070
  ] }),
29267
- host: /* @__PURE__ */ jsxs49(Box50, { children: [
29268
- /* @__PURE__ */ jsx58(Text54, { children: `API host [${currentHost}]: ` }),
29269
- /* @__PURE__ */ jsx58(TextInput2, { onSubmit: (v) => advance("host", v) }, "host")
29071
+ host: /* @__PURE__ */ jsxs49(Box48, { children: [
29072
+ /* @__PURE__ */ jsx56(Text52, { children: `API host [${currentHost}]: ` }),
29073
+ /* @__PURE__ */ jsx56(TextInput2, { onSubmit: (v) => advance("host", v) }, "host")
29270
29074
  ] })
29271
29075
  };
29272
- return /* @__PURE__ */ jsx58(StepLayout, { helpText, prompt: prompts[field], children: summary });
29076
+ return /* @__PURE__ */ jsx56(StepLayout, { helpText, prompt: prompts[field], children: summary });
29273
29077
  }
29274
29078
  var ENV_KEYS, ENTER, KEEP, FIELD_ORDER;
29275
29079
  var init_ContentfulCredentialsScreen = __esm({
@@ -29287,9 +29091,9 @@ var init_ContentfulCredentialsScreen = __esm({
29287
29091
 
29288
29092
  // packages/experience-design-system-cli/src/setup/steps/preferences/BooleanInput.tsx
29289
29093
  import { useEffect as useEffect14, useState as useState26 } from "react";
29290
- import { Box as Box51, Text as Text55 } from "ink";
29094
+ import { Box as Box49, Text as Text53 } from "ink";
29291
29095
  import { Select as Select3 } from "@inkjs/ui";
29292
- import { jsx as jsx59, jsxs as jsxs50 } from "react/jsx-runtime";
29096
+ import { jsx as jsx57, jsxs as jsxs50 } from "react/jsx-runtime";
29293
29097
  function tick(labels, forOn, current) {
29294
29098
  const label = forOn ? labels.on : labels.off;
29295
29099
  return forOn === current ? `${label} \u2713` : label;
@@ -29307,7 +29111,7 @@ function BooleanInput({
29307
29111
  useEffect14(() => {
29308
29112
  void readExperiencesCredentials().then(setStored);
29309
29113
  }, []);
29310
- if (!stored) return /* @__PURE__ */ jsx59(Text55, { dimColor: true, children: "Reading saved preferences\u2026" });
29114
+ if (!stored) return /* @__PURE__ */ jsx57(Text53, { dimColor: true, children: "Reading saved preferences\u2026" });
29311
29115
  const current = read(stored) ?? fallback;
29312
29116
  const submit = (value) => {
29313
29117
  if (value === current) {
@@ -29316,13 +29120,13 @@ function BooleanInput({
29316
29120
  }
29317
29121
  void writeExperiencesCredentials(write2(stored, value)).then(() => onDone("completed"));
29318
29122
  };
29319
- return /* @__PURE__ */ jsx59(
29123
+ return /* @__PURE__ */ jsx57(
29320
29124
  StepLayout,
29321
29125
  {
29322
29126
  helpText,
29323
- prompt: /* @__PURE__ */ jsxs50(Box51, { flexDirection: "column", children: [
29324
- /* @__PURE__ */ jsx59(Text55, { children: question }),
29325
- /* @__PURE__ */ jsx59(Box51, { marginTop: 1, children: /* @__PURE__ */ jsx59(
29127
+ prompt: /* @__PURE__ */ jsxs50(Box49, { flexDirection: "column", children: [
29128
+ /* @__PURE__ */ jsx57(Text53, { children: question }),
29129
+ /* @__PURE__ */ jsx57(Box49, { marginTop: 1, children: /* @__PURE__ */ jsx57(
29326
29130
  Select3,
29327
29131
  {
29328
29132
  options: [
@@ -29347,9 +29151,9 @@ var init_BooleanInput = __esm({
29347
29151
  });
29348
29152
 
29349
29153
  // packages/experience-design-system-cli/src/setup/steps/preferences/AnalyticsScreen.tsx
29350
- import { jsx as jsx60 } from "react/jsx-runtime";
29154
+ import { jsx as jsx58 } from "react/jsx-runtime";
29351
29155
  function AnalyticsScreen({ onDone }) {
29352
- return /* @__PURE__ */ jsx60(
29156
+ return /* @__PURE__ */ jsx58(
29353
29157
  BooleanInput,
29354
29158
  {
29355
29159
  helpText: "Shares anonymous usage data about which CLI commands are used and where imports succeed or fail. Never includes source code, file paths, credentials, or authored content",
@@ -29370,9 +29174,9 @@ var init_AnalyticsScreen = __esm({
29370
29174
  });
29371
29175
 
29372
29176
  // packages/experience-design-system-cli/src/setup/steps/preferences/ColorPreferenceScreen.tsx
29373
- import { jsx as jsx61 } from "react/jsx-runtime";
29177
+ import { jsx as jsx59 } from "react/jsx-runtime";
29374
29178
  function ColorPreferenceScreen({ onDone }) {
29375
- return /* @__PURE__ */ jsx61(
29179
+ return /* @__PURE__ */ jsx59(
29376
29180
  BooleanInput,
29377
29181
  {
29378
29182
  helpText: `Prints plain text with no color, which suits CI logs and basic terminals.`,
@@ -29394,9 +29198,9 @@ var init_ColorPreferenceScreen = __esm({
29394
29198
 
29395
29199
  // packages/experience-design-system-cli/src/setup/steps/preferences/CustomPromptScreen.tsx
29396
29200
  import { useEffect as useEffect15, useState as useState27 } from "react";
29397
- import { Box as Box52, Text as Text56 } from "ink";
29201
+ import { Box as Box50, Text as Text54 } from "ink";
29398
29202
  import { ConfirmInput, TextInput as TextInput3 } from "@inkjs/ui";
29399
- import { jsx as jsx62, jsxs as jsxs51 } from "react/jsx-runtime";
29203
+ import { jsx as jsx60, jsxs as jsxs51 } from "react/jsx-runtime";
29400
29204
  function parseCustomSkillPath(answer) {
29401
29205
  const trimmed = answer.trim();
29402
29206
  if (trimmed === "") return void 0;
@@ -29418,19 +29222,19 @@ function CustomPromptsScreen({ onDone }) {
29418
29222
  useEffect15(() => {
29419
29223
  void readExperiencesCredentials().then(setStored);
29420
29224
  }, []);
29421
- if (!stored) return /* @__PURE__ */ jsx62(Text56, { dimColor: true, children: "Reading saved prompt paths\u2026" });
29225
+ if (!stored) return /* @__PURE__ */ jsx60(Text54, { dimColor: true, children: "Reading saved prompt paths\u2026" });
29422
29226
  const submit = (answer) => {
29423
29227
  const next = applyCustomSkillPath(stored, parseCustomSkillPath(answer));
29424
29228
  void writeExperiencesCredentials(next).then(() => onDone("completed"));
29425
29229
  };
29426
29230
  if (phase === "confirm") {
29427
- return /* @__PURE__ */ jsx62(
29231
+ return /* @__PURE__ */ jsx60(
29428
29232
  StepLayout,
29429
29233
  {
29430
29234
  helpText: CUSTOM_PROMPTS_HELP,
29431
- prompt: /* @__PURE__ */ jsxs51(Box52, { children: [
29432
- /* @__PURE__ */ jsx62(Text56, { children: "Use your own prompt file instead of the built-in one? " }),
29433
- /* @__PURE__ */ jsx62(
29235
+ prompt: /* @__PURE__ */ jsxs51(Box50, { children: [
29236
+ /* @__PURE__ */ jsx60(Text54, { children: "Use your own prompt file instead of the built-in one? " }),
29237
+ /* @__PURE__ */ jsx60(
29434
29238
  ConfirmInput,
29435
29239
  {
29436
29240
  defaultChoice: "cancel",
@@ -29442,13 +29246,13 @@ function CustomPromptsScreen({ onDone }) {
29442
29246
  }
29443
29247
  );
29444
29248
  }
29445
- return /* @__PURE__ */ jsx62(
29249
+ return /* @__PURE__ */ jsx60(
29446
29250
  StepLayout,
29447
29251
  {
29448
29252
  helpText: CUSTOM_PROMPTS_HELP,
29449
- prompt: /* @__PURE__ */ jsxs51(Box52, { children: [
29450
- /* @__PURE__ */ jsx62(Text56, { children: customSkillPathQuestion(stored.generatePromptPath) }),
29451
- /* @__PURE__ */ jsx62(TextInput3, { onSubmit: submit })
29253
+ prompt: /* @__PURE__ */ jsxs51(Box50, { children: [
29254
+ /* @__PURE__ */ jsx60(Text54, { children: customSkillPathQuestion(stored.generatePromptPath) }),
29255
+ /* @__PURE__ */ jsx60(TextInput3, { onSubmit: submit })
29452
29256
  ] })
29453
29257
  }
29454
29258
  );
@@ -29464,9 +29268,9 @@ var init_CustomPromptScreen = __esm({
29464
29268
  });
29465
29269
 
29466
29270
  // packages/experience-design-system-cli/src/setup/steps/preferences/DebugLogsScreen.tsx
29467
- import { jsx as jsx63 } from "react/jsx-runtime";
29271
+ import { jsx as jsx61 } from "react/jsx-runtime";
29468
29272
  function DebugLogsScreen({ onDone }) {
29469
- return /* @__PURE__ */ jsx63(
29273
+ return /* @__PURE__ */ jsx61(
29470
29274
  BooleanInput,
29471
29275
  {
29472
29276
  helpText: `Writes a verbose trace of every command decision, for troubleshooting.`,
@@ -29488,16 +29292,16 @@ var init_DebugLogsScreen = __esm({
29488
29292
 
29489
29293
  // packages/experience-design-system-cli/src/setup/steps/preferences/PreferencesMenu.tsx
29490
29294
  import { useState as useState28 } from "react";
29491
- import { Box as Box53, Text as Text57 } from "ink";
29295
+ import { Box as Box51, Text as Text55 } from "ink";
29492
29296
  import { Select as Select4 } from "@inkjs/ui";
29493
- import { jsx as jsx64, jsxs as jsxs52 } from "react/jsx-runtime";
29297
+ import { jsx as jsx62, jsxs as jsxs52 } from "react/jsx-runtime";
29494
29298
  function PreferencesMenu({ onDone }) {
29495
29299
  const [open, setOpen] = useState28(null);
29496
29300
  const [changed, setChanged] = useState28(/* @__PURE__ */ new Set());
29497
29301
  const entry = open === null ? void 0 : PREFERENCE_OPTIONS.find((option) => option.key === open);
29498
- if (!entry) return /* @__PURE__ */ jsx64(PreferenceList, { changed, onOpen: setOpen, onDone });
29302
+ if (!entry) return /* @__PURE__ */ jsx62(PreferenceList, { changed, onOpen: setOpen, onDone });
29499
29303
  const { key, Screen } = entry;
29500
- return /* @__PURE__ */ jsx64(
29304
+ return /* @__PURE__ */ jsx62(
29501
29305
  Screen,
29502
29306
  {
29503
29307
  onDone: (status) => {
@@ -29514,13 +29318,13 @@ function PreferenceList({ changed, onOpen, onDone }) {
29514
29318
  ...PREFERENCE_OPTIONS.map((option) => ({ label: option.label, value: option.key })),
29515
29319
  { label: "Done", value: DONE_VALUE }
29516
29320
  ];
29517
- return /* @__PURE__ */ jsx64(
29321
+ return /* @__PURE__ */ jsx62(
29518
29322
  StepLayout,
29519
29323
  {
29520
29324
  helpText: PREFERENCES_MENU_HELP,
29521
- prompt: /* @__PURE__ */ jsxs52(Box53, { flexDirection: "column", children: [
29522
- /* @__PURE__ */ jsx64(Text57, { children: "Preferences" }),
29523
- /* @__PURE__ */ jsx64(Box53, { marginTop: 1, children: /* @__PURE__ */ jsx64(
29325
+ prompt: /* @__PURE__ */ jsxs52(Box51, { flexDirection: "column", children: [
29326
+ /* @__PURE__ */ jsx62(Text55, { children: "Preferences" }),
29327
+ /* @__PURE__ */ jsx62(Box51, { marginTop: 1, children: /* @__PURE__ */ jsx62(
29524
29328
  Select4,
29525
29329
  {
29526
29330
  options,
@@ -29553,22 +29357,22 @@ var init_PreferencesMenu = __esm({
29553
29357
  {
29554
29358
  key: "customPrompts",
29555
29359
  label: "Custom prompts",
29556
- Screen: ({ onDone }) => /* @__PURE__ */ jsx64(CustomPromptsScreen, { onDone })
29360
+ Screen: ({ onDone }) => /* @__PURE__ */ jsx62(CustomPromptsScreen, { onDone })
29557
29361
  },
29558
29362
  {
29559
29363
  key: "debug",
29560
29364
  label: "Debug logging",
29561
- Screen: ({ onDone }) => /* @__PURE__ */ jsx64(DebugLogsScreen, { onDone })
29365
+ Screen: ({ onDone }) => /* @__PURE__ */ jsx62(DebugLogsScreen, { onDone })
29562
29366
  },
29563
29367
  {
29564
29368
  key: "analytics",
29565
29369
  label: "Usage analytics",
29566
- Screen: ({ onDone }) => /* @__PURE__ */ jsx64(AnalyticsScreen, { onDone })
29370
+ Screen: ({ onDone }) => /* @__PURE__ */ jsx62(AnalyticsScreen, { onDone })
29567
29371
  },
29568
29372
  {
29569
29373
  key: "noColor",
29570
29374
  label: "Terminal colors",
29571
- Screen: ({ onDone }) => /* @__PURE__ */ jsx64(ColorPreferenceScreen, { onDone })
29375
+ Screen: ({ onDone }) => /* @__PURE__ */ jsx62(ColorPreferenceScreen, { onDone })
29572
29376
  }
29573
29377
  ];
29574
29378
  DONE_VALUE = "menu:done";
@@ -29784,23 +29588,23 @@ var init_prerequisites = __esm({
29784
29588
 
29785
29589
  // packages/experience-design-system-cli/src/setup/steps/prerequisites/PrerequisitesScreen.tsx
29786
29590
  import { useEffect as useEffect16, useRef as useRef12, useState as useState29 } from "react";
29787
- import { Box as Box54, Text as Text58 } from "ink";
29591
+ import { Box as Box52, Text as Text56 } from "ink";
29788
29592
  import { ConfirmInput as ConfirmInput2 } from "@inkjs/ui";
29789
- import { jsx as jsx65, jsxs as jsxs53 } from "react/jsx-runtime";
29593
+ import { jsx as jsx63, jsxs as jsxs53 } from "react/jsx-runtime";
29790
29594
  function EventLine({ event }) {
29791
- if (event.kind === "success") return /* @__PURE__ */ jsxs53(Text58, { color: PALETTE.success, children: [
29595
+ if (event.kind === "success") return /* @__PURE__ */ jsxs53(Text56, { color: PALETTE.success, children: [
29792
29596
  "\u2713 ",
29793
29597
  event.message
29794
29598
  ] });
29795
- if (event.kind === "failure") return /* @__PURE__ */ jsxs53(Text58, { color: PALETTE.error, children: [
29599
+ if (event.kind === "failure") return /* @__PURE__ */ jsxs53(Text56, { color: PALETTE.error, children: [
29796
29600
  "\u2717 ",
29797
29601
  event.message
29798
29602
  ] });
29799
- if (event.kind === "warning") return /* @__PURE__ */ jsxs53(Text58, { color: PALETTE.warning, children: [
29603
+ if (event.kind === "warning") return /* @__PURE__ */ jsxs53(Text56, { color: PALETTE.warning, children: [
29800
29604
  "\u26A0 ",
29801
29605
  event.message
29802
29606
  ] });
29803
- return /* @__PURE__ */ jsx65(Text58, { children: event.message });
29607
+ return /* @__PURE__ */ jsx63(Text56, { children: event.message });
29804
29608
  }
29805
29609
  function PrerequisitesScreen({
29806
29610
  repoRoot,
@@ -29839,15 +29643,15 @@ function PrerequisitesScreen({
29839
29643
  ...skipBuild !== void 0 ? { skipBuild } : {}
29840
29644
  }).then(onDone);
29841
29645
  }, []);
29842
- return /* @__PURE__ */ jsx65(
29646
+ return /* @__PURE__ */ jsx63(
29843
29647
  StepLayout,
29844
29648
  {
29845
- prompt: confirm ? /* @__PURE__ */ jsxs53(Box54, { children: [
29846
- /* @__PURE__ */ jsxs53(Text58, { children: [
29649
+ prompt: confirm ? /* @__PURE__ */ jsxs53(Box52, { children: [
29650
+ /* @__PURE__ */ jsxs53(Text56, { children: [
29847
29651
  confirm.question,
29848
29652
  " "
29849
29653
  ] }),
29850
- /* @__PURE__ */ jsx65(
29654
+ /* @__PURE__ */ jsx63(
29851
29655
  ConfirmInput2,
29852
29656
  {
29853
29657
  defaultChoice: confirm.defaultYes ? "confirm" : "cancel",
@@ -29856,8 +29660,8 @@ function PrerequisitesScreen({
29856
29660
  },
29857
29661
  confirm.question
29858
29662
  )
29859
- ] }) : /* @__PURE__ */ jsx65(Text58, { color: PALETTE.info, children: "\u27F3 Checking prerequisites\u2026" }),
29860
- children: /* @__PURE__ */ jsx65(Box54, { flexDirection: "column", children: events.map((event, index) => /* @__PURE__ */ jsx65(EventLine, { event }, `${index}-${event.message}`)) })
29663
+ ] }) : /* @__PURE__ */ jsx63(Text56, { color: PALETTE.info, children: "\u27F3 Checking prerequisites\u2026" }),
29664
+ children: /* @__PURE__ */ jsx63(Box52, { flexDirection: "column", children: events.map((event, index) => /* @__PURE__ */ jsx63(EventLine, { event }, `${index}-${event.message}`)) })
29861
29665
  }
29862
29666
  );
29863
29667
  }
@@ -29878,8 +29682,8 @@ __export(SetupScreen_exports, {
29878
29682
  formatSetupCompletionMessage: () => formatSetupCompletionMessage
29879
29683
  });
29880
29684
  import { useEffect as useEffect17, useRef as useRef13, useState as useState30 } from "react";
29881
- import { Box as Box55, Text as Text59, useStdout as useStdout5 } from "ink";
29882
- import { jsx as jsx66, jsxs as jsxs54 } from "react/jsx-runtime";
29685
+ import { Box as Box53, Text as Text57, useStdout as useStdout5 } from "ink";
29686
+ import { jsx as jsx64, jsxs as jsxs54 } from "react/jsx-runtime";
29883
29687
  function countRequiredFailures(results) {
29884
29688
  return results.filter((result) => result.required && result.status === "failed").length;
29885
29689
  }
@@ -29910,7 +29714,7 @@ function SetupScreen({
29910
29714
  });
29911
29715
  void (async () => {
29912
29716
  const results = [];
29913
- const prerequisites = await runScreen((done) => /* @__PURE__ */ jsx66(
29717
+ const prerequisites = await runScreen((done) => /* @__PURE__ */ jsx64(
29914
29718
  PrerequisitesScreen,
29915
29719
  {
29916
29720
  repoRoot,
@@ -29944,21 +29748,21 @@ function SetupScreen({
29944
29748
  if (skip.skipAgent) {
29945
29749
  results.push({ name: "Coding agent", status: "skipped", required: false });
29946
29750
  } else {
29947
- const status = await runScreen((done) => /* @__PURE__ */ jsx66(CodingAgentScreen, { onDone: done }));
29751
+ const status = await runScreen((done) => /* @__PURE__ */ jsx64(CodingAgentScreen, { onDone: done }));
29948
29752
  results.push({ name: "Coding agent", status, required: true });
29949
29753
  }
29950
29754
  setActiveStep(3);
29951
29755
  if (skip.skipCredentials) {
29952
29756
  results.push({ name: "Contentful credentials", status: "skipped", required: false });
29953
29757
  } else {
29954
- const status = await runScreen((done) => /* @__PURE__ */ jsx66(ContentfulCredentialsScreen, { onDone: done }));
29758
+ const status = await runScreen((done) => /* @__PURE__ */ jsx64(ContentfulCredentialsScreen, { onDone: done }));
29955
29759
  results.push({ name: "Contentful credentials", status, required: false });
29956
29760
  }
29957
29761
  setActiveStep(4);
29958
29762
  if (skip.skipOptional) {
29959
29763
  results.push({ name: "Preferences", status: "skipped", required: false });
29960
29764
  } else {
29961
- const status = await runScreen((done) => /* @__PURE__ */ jsx66(PreferencesMenu, { onDone: done }));
29765
+ const status = await runScreen((done) => /* @__PURE__ */ jsx64(PreferencesMenu, { onDone: done }));
29962
29766
  results.push({ name: "Preferences", status, required: false });
29963
29767
  }
29964
29768
  const exitCode = countRequiredFailures(results) === 0 ? 0 : 1;
@@ -29967,37 +29771,37 @@ function SetupScreen({
29967
29771
  onComplete(finalOutcome);
29968
29772
  })();
29969
29773
  }, []);
29970
- return /* @__PURE__ */ jsxs54(Box55, { flexDirection: "column", paddingX: 1, children: [
29971
- /* @__PURE__ */ jsxs54(Box55, { justifyContent: "space-between", columnGap: 1, ...columns !== void 0 ? { width: columns - 2 } : {}, children: [
29972
- /* @__PURE__ */ jsx66(Box55, { flexShrink: 0, children: /* @__PURE__ */ jsx66(Text59, { bold: true, children: "experiences setup" }) }),
29973
- /* @__PURE__ */ jsx66(Box55, { flexShrink: 0, children: /* @__PURE__ */ jsxs54(Text59, { dimColor: true, children: [
29774
+ return /* @__PURE__ */ jsxs54(Box53, { flexDirection: "column", paddingX: 1, children: [
29775
+ /* @__PURE__ */ jsxs54(Box53, { justifyContent: "space-between", columnGap: 1, ...columns !== void 0 ? { width: columns - 2 } : {}, children: [
29776
+ /* @__PURE__ */ jsx64(Box53, { flexShrink: 0, children: /* @__PURE__ */ jsx64(Text57, { bold: true, children: "experiences setup" }) }),
29777
+ /* @__PURE__ */ jsx64(Box53, { flexShrink: 0, children: /* @__PURE__ */ jsxs54(Text57, { dimColor: true, children: [
29974
29778
  "v",
29975
29779
  version
29976
29780
  ] }) })
29977
29781
  ] }),
29978
- /* @__PURE__ */ jsx66(Box55, { marginTop: 1, children: /* @__PURE__ */ jsx66(SetupStepper, { activeStep, columns }) }),
29979
- outcome ? /* @__PURE__ */ jsx66(SetupSummary, { outcome, notice }) : screen && /* @__PURE__ */ jsx66(Box55, { marginTop: 1, children: screen })
29782
+ /* @__PURE__ */ jsx64(Box53, { marginTop: 1, children: /* @__PURE__ */ jsx64(SetupStepper, { activeStep, columns }) }),
29783
+ outcome ? /* @__PURE__ */ jsx64(SetupSummary, { outcome, notice }) : screen && /* @__PURE__ */ jsx64(Box53, { marginTop: 1, children: screen })
29980
29784
  ] });
29981
29785
  }
29982
29786
  function SetupSummary({ outcome, notice }) {
29983
29787
  const requiredFailed = countRequiredFailures(outcome.results);
29984
- return /* @__PURE__ */ jsxs54(Box55, { flexDirection: "column", marginTop: 1, children: [
29985
- /* @__PURE__ */ jsx66(Text59, { bold: true, children: "Summary" }),
29788
+ return /* @__PURE__ */ jsxs54(Box53, { flexDirection: "column", marginTop: 1, children: [
29789
+ /* @__PURE__ */ jsx64(Text57, { bold: true, children: "Summary" }),
29986
29790
  outcome.results.map((result) => {
29987
29791
  if (result.status === "completed") {
29988
- return /* @__PURE__ */ jsxs54(Text59, { color: PALETTE.success, children: [
29792
+ return /* @__PURE__ */ jsxs54(Text57, { color: PALETTE.success, children: [
29989
29793
  "\u2713 ",
29990
29794
  result.name
29991
29795
  ] }, result.name);
29992
29796
  }
29993
29797
  if (result.status === "skipped") {
29994
- return /* @__PURE__ */ jsxs54(Text59, { dimColor: true, children: [
29798
+ return /* @__PURE__ */ jsxs54(Text57, { dimColor: true, children: [
29995
29799
  "\u2013 ",
29996
29800
  result.name,
29997
29801
  " \u2014 skipped"
29998
29802
  ] }, result.name);
29999
29803
  }
30000
- return /* @__PURE__ */ jsxs54(Text59, { color: result.required ? PALETTE.error : PALETTE.warning, children: [
29804
+ return /* @__PURE__ */ jsxs54(Text57, { color: result.required ? PALETTE.error : PALETTE.warning, children: [
30001
29805
  result.required ? "\u2717" : "\u26A0",
30002
29806
  " ",
30003
29807
  result.name,
@@ -30005,10 +29809,10 @@ function SetupSummary({ outcome, notice }) {
30005
29809
  result.required ? "required" : "optional"
30006
29810
  ] }, result.name);
30007
29811
  }),
30008
- notice && /* @__PURE__ */ jsx66(Box55, { marginTop: 1, children: /* @__PURE__ */ jsx66(Text59, { color: PALETTE.warning, children: notice }) }),
30009
- /* @__PURE__ */ jsx66(Box55, { marginTop: 1, children: /* @__PURE__ */ jsx66(Text59, { bold: true, color: requiredFailed === 0 ? PALETTE.success : PALETTE.warning, children: formatSetupCompletionMessage(outcome.results) }) }),
30010
- requiredFailed > 0 && /* @__PURE__ */ jsx66(Text59, { dimColor: true, children: "Complete the steps above, then re-run experiences setup." }),
30011
- /* @__PURE__ */ jsx66(Text59, { dimColor: true, children: "Run experiences doctor any time to re-check." })
29812
+ notice && /* @__PURE__ */ jsx64(Box53, { marginTop: 1, children: /* @__PURE__ */ jsx64(Text57, { color: PALETTE.warning, children: notice }) }),
29813
+ /* @__PURE__ */ jsx64(Box53, { marginTop: 1, children: /* @__PURE__ */ jsx64(Text57, { bold: true, color: requiredFailed === 0 ? PALETTE.success : PALETTE.warning, children: formatSetupCompletionMessage(outcome.results) }) }),
29814
+ requiredFailed > 0 && /* @__PURE__ */ jsx64(Text57, { dimColor: true, children: "Complete the steps above, then re-run experiences setup." }),
29815
+ /* @__PURE__ */ jsx64(Text57, { dimColor: true, children: "Run experiences doctor any time to re-check." })
30012
29816
  ] });
30013
29817
  }
30014
29818
  var init_SetupScreen = __esm({
@@ -30067,7 +29871,7 @@ async function runSetup(opts) {
30067
29871
  process.exit(finished.exitCode);
30068
29872
  }
30069
29873
  function registerSetupCommand(program) {
30070
- program.command("setup").description("Interactive setup: installs prerequisites and configures credentials for experiences import").helpOption(false).action(() => runSetup({}));
29874
+ program.command("setup").description("Interactive setup: installs prerequisites and configures credentials for experiences import").option("--skip-build", "Skip the pnpm install + build step").option("--skip-agent", "Skip the coding agent check").option("--skip-credentials", "Skip the Contentful credentials step").option("--skip-optional", "Skip optional quality-of-life extras").action((opts) => runSetup(opts));
30071
29875
  }
30072
29876
  var SETUP_REQUIRES_TTY_MESSAGE;
30073
29877
  var init_command8 = __esm({
@@ -30079,14 +29883,57 @@ var init_command8 = __esm({
30079
29883
  }
30080
29884
  });
30081
29885
 
29886
+ // packages/experience-design-system-cli/src/analyze/composition/interchange-schema.ts
29887
+ function validateInterchangeMap(input) {
29888
+ const errors = [];
29889
+ if (typeof input !== "object" || input === null || Array.isArray(input)) {
29890
+ return { valid: false, errors: ["interchange map must be a JSON object"] };
29891
+ }
29892
+ const obj = input;
29893
+ if (obj.version !== 1) {
29894
+ errors.push(`unsupported interchange version: expected 1, got ${JSON.stringify(obj.version)}`);
29895
+ }
29896
+ if (typeof obj.groups !== "object" || obj.groups === null || Array.isArray(obj.groups)) {
29897
+ errors.push("interchange map must have a `groups` object");
29898
+ return { valid: false, errors };
29899
+ }
29900
+ const groups = obj.groups;
29901
+ for (const [parent, children] of Object.entries(groups)) {
29902
+ if (!Array.isArray(children) || !children.every((c2) => typeof c2 === "string")) {
29903
+ errors.push(`groups["${parent}"] must be an array of strings`);
29904
+ }
29905
+ }
29906
+ if (errors.length > 0) return { valid: false, errors };
29907
+ return { valid: true, map: { version: 1, groups } };
29908
+ }
29909
+ function groupsToEdges(map, provenance) {
29910
+ const seen = /* @__PURE__ */ new Set();
29911
+ const edges = [];
29912
+ for (const [parent, children] of Object.entries(map.groups)) {
29913
+ for (const child of children) {
29914
+ const key = `${parent}::${child}`;
29915
+ if (seen.has(key)) continue;
29916
+ seen.add(key);
29917
+ edges.push({ parent, child, provenance });
29918
+ }
29919
+ }
29920
+ return edges;
29921
+ }
29922
+ var init_interchange_schema = __esm({
29923
+ "packages/experience-design-system-cli/src/analyze/composition/interchange-schema.ts"() {
29924
+ "use strict";
29925
+ }
29926
+ });
29927
+
30082
29928
  // packages/experience-design-system-cli/src/analyze/composition/merge-edges.ts
30083
29929
  function rank(p) {
30084
- if (p === "typed-slot") return 1;
30085
- if (p === "structural") return 2;
30086
- if (p === "manifest") return 3;
30087
- if (p === "doc") return 4;
30088
- if (p.startsWith("adapter:")) return 5;
30089
- return 6;
29930
+ if (p === "user") return 1;
29931
+ if (p === "typed-slot") return 2;
29932
+ if (p === "structural") return 3;
29933
+ if (p === "manifest") return 4;
29934
+ if (p === "doc") return 5;
29935
+ if (p.startsWith("adapter:")) return 6;
29936
+ return 7;
30090
29937
  }
30091
29938
  function mergeEdges(all) {
30092
29939
  const byKey = /* @__PURE__ */ new Map();
@@ -30192,7 +30039,7 @@ function applyMapping(components, edges) {
30192
30039
  }))
30193
30040
  }));
30194
30041
  const byName = new Map(cloned.map((c2) => [c2.name, c2]));
30195
- const isHighTrust = (p) => p === "typed-slot" || p.startsWith("adapter:");
30042
+ const isHighTrust = (p) => p === "user" || p === "typed-slot" || p.startsWith("adapter:");
30196
30043
  const addAllowed = (slot, child) => {
30197
30044
  const set = new Set(slot.allowedComponents ?? []);
30198
30045
  set.add(child);
@@ -30291,6 +30138,7 @@ async function resolveMapping(input) {
30291
30138
  }
30292
30139
  }
30293
30140
  }
30141
+ if (input.userMap) collected.push(...groupsToEdges(input.userMap, "user"));
30294
30142
  if (input.extraEdges) {
30295
30143
  collected.push(...input.extraEdges);
30296
30144
  }
@@ -30338,6 +30186,7 @@ ${f.content}`).join("\n\n");
30338
30186
  var init_resolve_mapping = __esm({
30339
30187
  "packages/experience-design-system-cli/src/analyze/composition/resolve-mapping.ts"() {
30340
30188
  "use strict";
30189
+ init_interchange_schema();
30341
30190
  init_merge_edges();
30342
30191
  init_parse_map_edges();
30343
30192
  init_apply_mapping();
@@ -30346,6 +30195,24 @@ var init_resolve_mapping = __esm({
30346
30195
  });
30347
30196
 
30348
30197
  // packages/experience-design-system-cli/src/analyze/composition/resolve-mapping-cli.ts
30198
+ import { readFile as readFile18 } from "node:fs/promises";
30199
+ async function loadUserMap(path) {
30200
+ let text;
30201
+ try {
30202
+ text = await readFile18(path, "utf8");
30203
+ } catch {
30204
+ return { ok: false, error: `--composition-map: file not found: ${path}` };
30205
+ }
30206
+ let parsed;
30207
+ try {
30208
+ parsed = JSON.parse(text);
30209
+ } catch {
30210
+ return { ok: false, error: `--composition-map: not valid JSON: ${path}` };
30211
+ }
30212
+ const result = validateInterchangeMap(parsed);
30213
+ if (!result.valid) return { ok: false, error: `--composition-map: ${result.errors.join("; ")}` };
30214
+ return { ok: true, map: result.map };
30215
+ }
30349
30216
  function resolveCompositionSources(opts) {
30350
30217
  return {
30351
30218
  forceAgent: !!opts.compositionRefresh
@@ -30354,6 +30221,7 @@ function resolveCompositionSources(opts) {
30354
30221
  var init_resolve_mapping_cli = __esm({
30355
30222
  "packages/experience-design-system-cli/src/analyze/composition/resolve-mapping-cli.ts"() {
30356
30223
  "use strict";
30224
+ init_interchange_schema();
30357
30225
  }
30358
30226
  });
30359
30227
 
@@ -30515,7 +30383,7 @@ var init_manifest_doc_evidence = __esm({
30515
30383
  });
30516
30384
 
30517
30385
  // packages/experience-design-system-cli/src/analyze/extract-command.ts
30518
- import { mkdir as mkdir6, readdir as readdir3, readFile as readFile18, stat as stat6 } from "node:fs/promises";
30386
+ import { mkdir as mkdir6, readdir as readdir3, readFile as readFile19, stat as stat6 } from "node:fs/promises";
30519
30387
  import { isAbsolute as isAbsolute2, join as join25, relative as relative2, resolve as resolve19 } from "node:path";
30520
30388
  function isDenylistedNoiseFile(name) {
30521
30389
  return DENYLISTED_EXACT_FILE_NAMES.has(name) || DENYLISTED_FILE_NAME_PATTERNS.some((pattern) => pattern.test(name));
@@ -30582,7 +30450,7 @@ async function readCandidateFiles(components, extraFiles = []) {
30582
30450
  await Promise.all(
30583
30451
  [...paths].map(async (p) => {
30584
30452
  try {
30585
- const content = await readFile18(p, "utf8");
30453
+ const content = await readFile19(p, "utf8");
30586
30454
  out.push({ path: p, content });
30587
30455
  } catch {
30588
30456
  }
@@ -30595,7 +30463,7 @@ function registerInternalExtractCommand(program) {
30595
30463
  "--resolve-unreachable <mode>",
30596
30464
  "Retry pass for unresolved Svelte Props types: 'auto' (default), 'always', or 'never'",
30597
30465
  "auto"
30598
- ).option("--composition-refresh", "Force the mapping agent to run even where deterministic sources answered").option(
30466
+ ).option("--composition-refresh", "Force the mapping agent to run even where deterministic sources answered").option("--composition-map <path>", "Consume a hand-authored parent\u2192children interchange map").option(
30599
30467
  "--prompt <stage=value>",
30600
30468
  "Override a stage prompt (repeatable). value is a file path or literal text, e.g. --prompt composition=./p.md",
30601
30469
  (v, acc) => [...acc, v],
@@ -30711,6 +30579,16 @@ function registerInternalExtractCommand(program) {
30711
30579
  let validatedComponents = validateExtractedComponents(filteredComponents);
30712
30580
  {
30713
30581
  const sources = resolveCompositionSources(opts);
30582
+ let userMap;
30583
+ if (opts.compositionMap) {
30584
+ const loaded = await loadUserMap(opts.compositionMap);
30585
+ if (!loaded.ok) {
30586
+ process.stderr.write(`Error: ${loaded.error}
30587
+ `);
30588
+ process.exit(1);
30589
+ }
30590
+ userMap = loaded.map;
30591
+ }
30714
30592
  const { overrides: promptOverrides, errors: promptErrors } = parsePromptOverrides(opts.prompt ?? []);
30715
30593
  for (const err of promptErrors) {
30716
30594
  process.stderr.write(`Error: ${err}
@@ -30772,6 +30650,7 @@ function registerInternalExtractCommand(program) {
30772
30650
  });
30773
30651
  const result = await resolveMapping({
30774
30652
  components: validatedComponents,
30653
+ ...userMap ? { userMap } : {},
30775
30654
  ...extraEdges.length > 0 ? { extraEdges } : {},
30776
30655
  forceAgent: sources.forceAgent,
30777
30656
  files: promptFiles,
@@ -30978,7 +30857,7 @@ function resolveBedrockFromAncestors(actionCommand) {
30978
30857
  return false;
30979
30858
  }
30980
30859
  function registerImportV2Command(program) {
30981
- program.command("importv2").description("Launch the v2 import TUI (experience-design-system-cli-v2)").helpOption(false).action(async () => {
30860
+ program.command("importv2").description("Launch the v2 import TUI (experience-design-system-cli-v2)").action(async () => {
30982
30861
  const { render: render5 } = await import("ink");
30983
30862
  const { createElement: createElement6 } = await import("react");
30984
30863
  const { App } = await import("@contentful/experience-design-system-cli-v2/app");
@@ -30987,7 +30866,7 @@ function registerImportV2Command(program) {
30987
30866
  });
30988
30867
  }
30989
30868
  function registerBuildCommand(program) {
30990
- program.command("build").description("Rebuild from source and re-link exo/experiences binaries to this build").helpOption(false).action(async () => {
30869
+ program.command("build").description("Rebuild from source and re-link exo/experiences binaries to this build").action(async () => {
30991
30870
  const pkgRoot = resolve20(dirname13(fileURLToPath4(import.meta.url)), "..", "..");
30992
30871
  process.stderr.write("\u2699 Building from source...\n");
30993
30872
  const { exitCode } = await runBuild({
@@ -30997,35 +30876,32 @@ function registerBuildCommand(program) {
30997
30876
  process.exit(exitCode);
30998
30877
  });
30999
30878
  }
31000
- function configureRootHelpOrder(program) {
31001
- const order = ["build", "help", "import", "apply", "importv2", "setup", "doctor"];
31002
- const rank2 = new Map(order.map((name, index) => [name, index]));
31003
- program.configureHelp({
31004
- visibleCommands(command) {
31005
- const internals = command;
31006
- const visible = command.commands.filter((entry) => !entry._hidden);
31007
- const helpCommand = internals._getHelpCommand?.();
31008
- if (helpCommand && !helpCommand._hidden) visible.push(helpCommand);
31009
- if (command !== program) return visible;
31010
- return visible.sort((a, b) => (rank2.get(a.name()) ?? order.length) - (rank2.get(b.name()) ?? order.length));
31011
- }
31012
- });
31013
- }
31014
30879
  function createProgram() {
31015
30880
  const program = new Command().name("experience-design-system-cli").description("Static analysis, validation, generation, and import of Contentful design system artifacts").version(pkg3.version, "--version", "Print version number");
31016
30881
  registerInternalGenerateCommand(program);
31017
30882
  registerInternalExtractCommand(program);
31018
30883
  registerPrintCommand(program);
31019
30884
  registerMapTokensCommand(program);
31020
- registerBuildCommand(program);
31021
- program.helpCommand("help [command]", "display help for command");
31022
- registerImportCommand(program);
31023
30885
  registerApplyCommand(program);
30886
+ registerImportCommand(program);
31024
30887
  registerImportV2Command(program);
31025
- registerSetupCommand(program);
31026
30888
  registerDoctorCommand(program);
31027
- configureRootHelpOrder(program);
30889
+ registerSetupCommand(program);
30890
+ registerBuildCommand(program);
30891
+ program.option(
30892
+ "--debug",
30893
+ "Write a JSONL trace of every decision to ~/.contentful/experience-design-system-cli/debug/"
30894
+ );
30895
+ program.option("--no-debug", "Force debug logging off (overrides EDSI_DEBUG and persisted setup preference)");
31028
30896
  program.hook("preAction", async (_thisCommand, actionCommand) => {
30897
+ let debug;
30898
+ for (let c2 = actionCommand; c2; c2 = c2.parent) {
30899
+ const opts = c2.opts();
30900
+ if (opts.debug !== void 0) {
30901
+ debug = opts.debug;
30902
+ break;
30903
+ }
30904
+ }
31029
30905
  if (resolveBedrockFromAncestors(actionCommand)) {
31030
30906
  process.env.EDS_BEDROCK = "1";
31031
30907
  }
@@ -31035,7 +30911,7 @@ function createProgram() {
31035
30911
  const { analyticsDisabled } = await readExperiencesCredentials();
31036
30912
  setPersistedAnalyticsDisabled(analyticsDisabled ?? false);
31037
30913
  noteCommandStart(commandChain);
31038
- await beginCommand(commandChain, {});
30914
+ await beginCommand(commandChain, { ...debug !== void 0 ? { debug } : {} });
31039
30915
  });
31040
30916
  program.hook("postAction", async () => {
31041
30917
  await completeActiveCommand();