@contentful/experience-design-system-cli 2.37.1-dev-build-58e80dfe.0 → 2.37.1-dev-build-f86ffbb8.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.
@@ -9912,196 +9912,9 @@ var init_GateStep = __esm({
9912
9912
  }
9913
9913
  });
9914
9914
 
9915
- // packages/experience-design-system-cli-legacy/src/import/tui/steps/CredentialsStep.tsx
9916
- import { useState as useState6, useRef as useRef3 } from "react";
9917
- import { Box as Box11, Text as Text12 } from "ink";
9918
- import { Fragment as Fragment4, jsx as jsx15, jsxs as jsxs11 } from "react/jsx-runtime";
9919
- function CredentialsStep({
9920
- summary,
9921
- error: externalError,
9922
- initialSpaceId = "",
9923
- initialEnvironmentId = "master",
9924
- initialCmaToken = "",
9925
- initialHost,
9926
- validating = false,
9927
- backgroundValidating = false,
9928
- generatePrefetchStatus = "idle",
9929
- generatePrefetchError = null,
9930
- onConfirm,
9931
- onValuesChange,
9932
- onContinue,
9933
- onQuit,
9934
- onRetryPrefetch,
9935
- onSkip
9936
- }) {
9937
- const normalizedInitialHost = toConfiguredHost(initialHost) ?? DEFAULT_CONFIGURED_HOST;
9938
- const [spaceId, setSpaceId] = useState6(initialSpaceId);
9939
- const [environmentId, setEnvironmentId] = useState6(initialEnvironmentId);
9940
- const [cmaToken, setCmaToken] = useState6(initialCmaToken);
9941
- const [host, setHost] = useState6(normalizedInitialHost);
9942
- const [activeField, setActiveField] = useState6("spaceId");
9943
- const [inlineError, setInlineError] = useState6(null);
9944
- const cursorVisible = useBlinkingCursor();
9945
- const hasTypedRef = useRef3(false);
9946
- useImmediateInput((input, key) => {
9947
- if (validating && !backgroundValidating) {
9948
- return;
9949
- }
9950
- if ((input === "r" || input === "R") && generatePrefetchStatus === "failed" && onRetryPrefetch) {
9951
- onRetryPrefetch();
9952
- return;
9953
- }
9954
- if (key.return) {
9955
- if (activeField === "spaceId") {
9956
- setActiveField("environmentId");
9957
- return;
9958
- }
9959
- if (activeField === "environmentId") {
9960
- setActiveField("cmaToken");
9961
- return;
9962
- }
9963
- if (activeField === "cmaToken") {
9964
- setActiveField("host");
9965
- return;
9966
- }
9967
- if (!spaceId.trim() || !environmentId.trim() || !cmaToken.trim()) {
9968
- setInlineError("All fields are required.");
9969
- return;
9970
- }
9971
- setInlineError(null);
9972
- const submittedHost = toConfiguredHost(host) ?? DEFAULT_CONFIGURED_HOST;
9973
- const unchanged = spaceId.trim() === initialSpaceId && environmentId.trim() === initialEnvironmentId && cmaToken.trim() === initialCmaToken && submittedHost === normalizedInitialHost;
9974
- if (unchanged && onContinue) {
9975
- onContinue(spaceId.trim(), environmentId.trim(), cmaToken.trim(), submittedHost);
9976
- } else {
9977
- onConfirm(spaceId.trim(), environmentId.trim(), cmaToken.trim(), submittedHost);
9978
- }
9979
- return;
9980
- }
9981
- if (key.tab) {
9982
- setActiveField(
9983
- (f) => f === "spaceId" ? "environmentId" : f === "environmentId" ? "cmaToken" : f === "cmaToken" ? "host" : "spaceId"
9984
- );
9985
- return;
9986
- }
9987
- if (key.escape || input === "q") {
9988
- onQuit();
9989
- return;
9990
- }
9991
- if ((input === "s" || input === "S") && onSkip && !hasTypedRef.current) {
9992
- onSkip();
9993
- return;
9994
- }
9995
- if (key.backspace || key.delete) {
9996
- const nextValue = (value) => value.slice(0, -1);
9997
- if (activeField === "spaceId") {
9998
- const next = nextValue(spaceId);
9999
- setSpaceId(next);
10000
- onValuesChange?.(next, environmentId, cmaToken, host);
10001
- } else if (activeField === "environmentId") {
10002
- const next = nextValue(environmentId);
10003
- setEnvironmentId(next);
10004
- onValuesChange?.(spaceId, next, cmaToken, host);
10005
- } else if (activeField === "cmaToken") {
10006
- const next = nextValue(cmaToken);
10007
- setCmaToken(next);
10008
- onValuesChange?.(spaceId, environmentId, next, host);
10009
- } else {
10010
- const next = nextValue(host);
10011
- setHost(next);
10012
- onValuesChange?.(spaceId, environmentId, cmaToken, next);
10013
- }
10014
- return;
10015
- }
10016
- if (input && !key.ctrl && !key.meta) {
10017
- hasTypedRef.current = true;
10018
- if (activeField === "spaceId") {
10019
- const next = spaceId + input;
10020
- setSpaceId(next);
10021
- onValuesChange?.(next, environmentId, cmaToken, host);
10022
- } else if (activeField === "environmentId") {
10023
- const next = environmentId + input;
10024
- setEnvironmentId(next);
10025
- onValuesChange?.(spaceId, next, cmaToken, host);
10026
- } else if (activeField === "cmaToken") {
10027
- const next = cmaToken + input;
10028
- setCmaToken(next);
10029
- onValuesChange?.(spaceId, environmentId, next, host);
10030
- } else {
10031
- const next = host + input;
10032
- setHost(next);
10033
- onValuesChange?.(spaceId, environmentId, cmaToken, next);
10034
- }
10035
- }
10036
- });
10037
- const cursor = cursorVisible ? "\u2588" : " ";
10038
- function renderField(label, value, field, masked = false) {
10039
- const isActive = activeField === field;
10040
- const display = masked ? "\u2022".repeat(value.length) : value;
10041
- const fallback = field === "host" ? DEFAULT_CONFIGURED_HOST : /* @__PURE__ */ jsx15(Text12, { dimColor: true, children: "(empty)" });
10042
- return /* @__PURE__ */ jsxs11(Box11, { gap: 1, children: [
10043
- /* @__PURE__ */ jsx15(Text12, { color: isActive ? PALETTE.info : void 0, children: "?" }),
10044
- /* @__PURE__ */ jsxs11(Text12, { bold: isActive, children: [
10045
- label,
10046
- ":"
10047
- ] }),
10048
- /* @__PURE__ */ jsx15(Text12, { children: isActive ? display + cursor : display || fallback })
10049
- ] });
10050
- }
10051
- const displayError = inlineError ?? externalError ?? null;
10052
- return /* @__PURE__ */ jsxs11(Box11, { flexDirection: "column", gap: 1, paddingX: 2, paddingY: 1, children: [
10053
- summary && /* @__PURE__ */ jsxs11(Text12, { color: PALETTE.success, children: [
10054
- "\u2713 ",
10055
- summary
10056
- ] }),
10057
- /* @__PURE__ */ jsxs11(Box11, { flexDirection: "column", children: [
10058
- /* @__PURE__ */ jsx15(Text12, { children: initialSpaceId && initialCmaToken ? "Credentials pre-filled from the configuration settings." : "Enter the Contentful space you want to import into." }),
10059
- !(initialSpaceId && initialCmaToken) && /* @__PURE__ */ jsxs11(Fragment4, { children: [
10060
- /* @__PURE__ */ jsx15(Text12, { dimColor: true, children: "These credentials are used both to align agent suggestions with what already exists in the space and to push your import at the end. Press S to skip and run without space context (push will be disabled)." }),
10061
- /* @__PURE__ */ jsx15(Text12, { dimColor: true, children: "Tip: run experiences setup to save these to ~/.contentful/experience-design-system-cli/config.json so they pre-fill here automatically." })
10062
- ] })
10063
- ] }),
10064
- /* @__PURE__ */ jsxs11(Box11, { flexDirection: "column", children: [
10065
- renderField("Space ID", spaceId, "spaceId"),
10066
- renderField("Environment", environmentId, "environmentId"),
10067
- renderField("CMA Token", cmaToken, "cmaToken", true),
10068
- renderField("API Host", host, "host")
10069
- ] }),
10070
- activeField === "host" && /* @__PURE__ */ jsx15(Text12, { dimColor: true, children: "Default: api.contentful.com \xB7 EU spaces: api.eu.contentful.com" }),
10071
- displayError && /* @__PURE__ */ jsxs11(Text12, { color: PALETTE.error, children: [
10072
- "\u2717 ",
10073
- displayError
10074
- ] }),
10075
- validating && !backgroundValidating && /* @__PURE__ */ jsx15(Text12, { color: PALETTE.info, children: generatePrefetchStatus === "running" ? "Validating credentials & finishing component generation..." : "Validating credentials..." }),
10076
- !validating && generatePrefetchStatus === "running" && /* @__PURE__ */ jsx15(Text12, { dimColor: true, children: "Component generation in progress..." }),
10077
- !validating && generatePrefetchStatus === "complete" && /* @__PURE__ */ jsx15(Text12, { color: PALETTE.success, children: "Component generation complete." }),
10078
- !validating && generatePrefetchStatus === "failed" && /* @__PURE__ */ jsxs11(Text12, { color: PALETTE.warning, children: [
10079
- "Component generation failed",
10080
- generatePrefetchError ? `: ${generatePrefetchError}` : "",
10081
- ". Will retry after credential validation.",
10082
- onRetryPrefetch ? " Press R to retry now." : ""
10083
- ] }),
10084
- /* @__PURE__ */ jsxs11(Box11, { gap: 3, children: [
10085
- /* @__PURE__ */ jsx15(Text12, { dimColor: true, children: "[Enter] Next field / Submit" }),
10086
- /* @__PURE__ */ jsx15(Text12, { dimColor: true, children: "[Tab] Switch field" }),
10087
- /* @__PURE__ */ jsx15(Text12, { dimColor: true, children: "[q] Quit" }),
10088
- onSkip && /* @__PURE__ */ jsx15(Text12, { dimColor: true, children: "[s] Skip \u2014 review locally only (no push, no live preview)" })
10089
- ] })
10090
- ] });
10091
- }
10092
- var init_CredentialsStep = __esm({
10093
- "packages/experience-design-system-cli-legacy/src/import/tui/steps/CredentialsStep.tsx"() {
10094
- "use strict";
10095
- init_theme();
10096
- init_useImmediateInput();
10097
- init_host_utils();
10098
- init_use_blinking_cursor();
10099
- }
10100
- });
10101
-
10102
9915
  // packages/experience-design-system-cli-legacy/src/tui/use-terminal-size.ts
10103
9916
  import { useStdout } from "ink";
10104
- import { useEffect as useEffect4, useState as useState7 } from "react";
9917
+ import { useEffect as useEffect4, useState as useState6 } from "react";
10105
9918
  function readTerminalSize(stdout) {
10106
9919
  return {
10107
9920
  columns: stdout?.columns ?? 80,
@@ -10110,7 +9923,7 @@ function readTerminalSize(stdout) {
10110
9923
  }
10111
9924
  function useTerminalSize() {
10112
9925
  const { stdout } = useStdout();
10113
- const [size, setSize] = useState7(() => readTerminalSize(stdout));
9926
+ const [size, setSize] = useState6(() => readTerminalSize(stdout));
10114
9927
  useEffect4(() => {
10115
9928
  const updateSize = () => setSize(readTerminalSize(stdout));
10116
9929
  stdout?.on("resize", updateSize);
@@ -10293,15 +10106,15 @@ var init_preview_diff = __esm({
10293
10106
  });
10294
10107
 
10295
10108
  // packages/experience-design-system-cli-legacy/src/import/tui/components/SpaceEnvironment.tsx
10296
- import { Box as Box12, Text as Text13 } from "ink";
10297
- import { jsx as jsx16, jsxs as jsxs12 } from "react/jsx-runtime";
10109
+ import { Box as Box11, Text as Text12 } from "ink";
10110
+ import { jsx as jsx15, jsxs as jsxs11 } from "react/jsx-runtime";
10298
10111
  function SpaceEnvironment({ spaceId, environmentId }) {
10299
- return /* @__PURE__ */ jsxs12(Box12, { gap: 1, marginTop: 1, children: [
10300
- /* @__PURE__ */ jsx16(Text13, { dimColor: true, children: "Space:" }),
10301
- /* @__PURE__ */ jsx16(Text13, { children: spaceId }),
10302
- /* @__PURE__ */ jsx16(Text13, { dimColor: true, children: "/" }),
10303
- /* @__PURE__ */ jsx16(Text13, { dimColor: true, children: "Environment:" }),
10304
- /* @__PURE__ */ jsx16(Text13, { children: environmentId })
10112
+ return /* @__PURE__ */ jsxs11(Box11, { gap: 1, marginTop: 1, children: [
10113
+ /* @__PURE__ */ jsx15(Text12, { dimColor: true, children: "Space:" }),
10114
+ /* @__PURE__ */ jsx15(Text12, { children: spaceId }),
10115
+ /* @__PURE__ */ jsx15(Text12, { dimColor: true, children: "/" }),
10116
+ /* @__PURE__ */ jsx15(Text12, { dimColor: true, children: "Environment:" }),
10117
+ /* @__PURE__ */ jsx15(Text12, { children: environmentId })
10305
10118
  ] });
10306
10119
  }
10307
10120
  var init_SpaceEnvironment = __esm({
@@ -10335,8 +10148,8 @@ var init_preview_confirmation_input = __esm({
10335
10148
  });
10336
10149
 
10337
10150
  // packages/experience-design-system-cli-legacy/src/tui/windowed-panel.tsx
10338
- import { Box as Box13, Text as Text14 } from "ink";
10339
- import { jsx as jsx17, jsxs as jsxs13 } from "react/jsx-runtime";
10151
+ import { Box as Box12, Text as Text13 } from "ink";
10152
+ import { jsx as jsx16, jsxs as jsxs12 } from "react/jsx-runtime";
10340
10153
  function terminalPanelHeight(rows, reservedRows = 4) {
10341
10154
  return Math.max(MIN_TERMINAL_PANEL_HEIGHT, rows - reservedRows);
10342
10155
  }
@@ -10351,8 +10164,8 @@ function FixedPanel({
10351
10164
  clipOverflow = true,
10352
10165
  children
10353
10166
  }) {
10354
- return /* @__PURE__ */ jsx17(
10355
- Box13,
10167
+ return /* @__PURE__ */ jsx16(
10168
+ Box12,
10356
10169
  {
10357
10170
  flexDirection: "column",
10358
10171
  width,
@@ -10368,7 +10181,7 @@ function FixedPanel({
10368
10181
  );
10369
10182
  }
10370
10183
  function WindowedPanel({ width, height, title, focused, children }) {
10371
- return /* @__PURE__ */ jsxs13(
10184
+ return /* @__PURE__ */ jsxs12(
10372
10185
  FixedPanel,
10373
10186
  {
10374
10187
  width,
@@ -10377,7 +10190,7 @@ function WindowedPanel({ width, height, title, focused, children }) {
10377
10190
  ...height === void 0 ? {} : { height },
10378
10191
  focused,
10379
10192
  children: [
10380
- title && /* @__PURE__ */ jsx17(WindowedPanelHeader, { title, width, focused }),
10193
+ title && /* @__PURE__ */ jsx16(WindowedPanelHeader, { title, width, focused }),
10381
10194
  children
10382
10195
  ]
10383
10196
  }
@@ -10388,9 +10201,9 @@ function WindowedPanelHeader({
10388
10201
  width,
10389
10202
  focused
10390
10203
  }) {
10391
- return /* @__PURE__ */ jsxs13(Box13, { flexDirection: "column", children: [
10392
- /* @__PURE__ */ jsx17(Text14, { bold: true, color: PALETTE.info, inverse: focused, children: title }),
10393
- /* @__PURE__ */ jsx17(Text14, { dimColor: true, children: "\u2500".repeat(Math.max(0, width - 2)) })
10204
+ return /* @__PURE__ */ jsxs12(Box12, { flexDirection: "column", children: [
10205
+ /* @__PURE__ */ jsx16(Text13, { bold: true, color: PALETTE.info, inverse: focused, children: title }),
10206
+ /* @__PURE__ */ jsx16(Text13, { dimColor: true, children: "\u2500".repeat(Math.max(0, width - 2)) })
10394
10207
  ] });
10395
10208
  }
10396
10209
  function formatWindowIndicator(direction, count) {
@@ -10398,7 +10211,7 @@ function formatWindowIndicator(direction, count) {
10398
10211
  return `${direction === "up" ? "\u2191" : "\u2193"} ${count} more`;
10399
10212
  }
10400
10213
  function WindowIndicator({ direction, count }) {
10401
- return /* @__PURE__ */ jsx17(Text14, { dimColor: true, children: formatWindowIndicator(direction, count) });
10214
+ return /* @__PURE__ */ jsx16(Text13, { dimColor: true, children: formatWindowIndicator(direction, count) });
10402
10215
  }
10403
10216
  var MIN_TERMINAL_PANEL_HEIGHT;
10404
10217
  var init_windowed_panel = __esm({
@@ -10410,9 +10223,9 @@ var init_windowed_panel = __esm({
10410
10223
  });
10411
10224
 
10412
10225
  // packages/experience-design-system-cli-legacy/src/import/tui/steps/WizardPreviewStep.tsx
10413
- import { useEffect as useEffect5, useState as useState8, useMemo } from "react";
10414
- import { Box as Box14, Text as Text15 } from "ink";
10415
- import { Fragment as Fragment5, jsx as jsx18, jsxs as jsxs14 } from "react/jsx-runtime";
10226
+ import { useEffect as useEffect5, useState as useState7, useMemo } from "react";
10227
+ import { Box as Box13, Text as Text14 } from "ink";
10228
+ import { Fragment as Fragment4, jsx as jsx17, jsxs as jsxs13 } from "react/jsx-runtime";
10416
10229
  function buildPreviewSummaryLines(preview) {
10417
10230
  const lines = [];
10418
10231
  const { components, tokens } = preview;
@@ -10606,8 +10419,8 @@ function WizardPreviewStep({
10606
10419
  onQuit
10607
10420
  }) {
10608
10421
  const breakingWithImpact = hasBreakingChangesWithImpact(preview);
10609
- const [diffExpanded, setDiffExpanded] = useState8(false);
10610
- const [scrollOffset, setScrollOffset] = useState8(0);
10422
+ const [diffExpanded, setDiffExpanded] = useState7(false);
10423
+ const [scrollOffset, setScrollOffset] = useState7(0);
10611
10424
  const { columns: terminalColumns, rows: terminalRows } = useTerminalSize();
10612
10425
  const summaryLines = useMemo(() => buildPreviewSummaryLines(preview), [preview]);
10613
10426
  const diffLines = useMemo(() => buildPreviewDiffLines(preview), [preview]);
@@ -10666,11 +10479,11 @@ function WizardPreviewStep({
10666
10479
  return;
10667
10480
  }
10668
10481
  });
10669
- return /* @__PURE__ */ jsxs14(Box14, { flexDirection: "column", gap: 1, paddingX: 2, paddingY: 2, children: [
10670
- /* @__PURE__ */ jsx18(StepHeader, { stepNumber, totalSteps, title: "Push to Contentful" }),
10671
- hasAnything ? /* @__PURE__ */ jsxs14(Fragment5, { children: [
10672
- /* @__PURE__ */ jsx18(Text15, { children: "Here's what will happen in your space:" }),
10673
- /* @__PURE__ */ jsxs14(
10482
+ return /* @__PURE__ */ jsxs13(Box13, { flexDirection: "column", gap: 1, paddingX: 2, paddingY: 2, children: [
10483
+ /* @__PURE__ */ jsx17(StepHeader, { stepNumber, totalSteps, title: "Push to Contentful" }),
10484
+ hasAnything ? /* @__PURE__ */ jsxs13(Fragment4, { children: [
10485
+ /* @__PURE__ */ jsx17(Text14, { children: "Here's what will happen in your space:" }),
10486
+ /* @__PURE__ */ jsxs13(
10674
10487
  WindowedPanel,
10675
10488
  {
10676
10489
  width: Math.max(20, terminalColumns - 4),
@@ -10678,8 +10491,8 @@ function WizardPreviewStep({
10678
10491
  title: diffExpanded ? `Diff (${diffLines.length} lines)` : "",
10679
10492
  focused: false,
10680
10493
  children: [
10681
- activeLines.slice(boundedScrollOffset, boundedScrollOffset + viewportHeight).map((line) => /* @__PURE__ */ jsx18(
10682
- Text15,
10494
+ activeLines.slice(boundedScrollOffset, boundedScrollOffset + viewportHeight).map((line) => /* @__PURE__ */ jsx17(
10495
+ Text14,
10683
10496
  {
10684
10497
  color: line.color === "gray" ? void 0 : line.color,
10685
10498
  dimColor: line.color === "gray",
@@ -10688,23 +10501,23 @@ function WizardPreviewStep({
10688
10501
  },
10689
10502
  line.key
10690
10503
  )),
10691
- /* @__PURE__ */ jsx18(Text15, { dimColor: true, wrap: "truncate-end", children: formatPreviewScrollIndicator(activeLines.length, boundedScrollOffset, viewportHeight) })
10504
+ /* @__PURE__ */ jsx17(Text14, { dimColor: true, wrap: "truncate-end", children: formatPreviewScrollIndicator(activeLines.length, boundedScrollOffset, viewportHeight) })
10692
10505
  ]
10693
10506
  }
10694
10507
  )
10695
- ] }) : /* @__PURE__ */ jsx18(Text15, { dimColor: true, children: "Nothing to push \u2014 everything is already up to date." }),
10696
- breakingWithImpact && /* @__PURE__ */ jsx18(Box14, { marginTop: 1, children: /* @__PURE__ */ jsx18(Text15, { color: PALETTE.error, bold: true, children: "\u26A0 Breaking changes will affect downstream entities. Press Enter to acknowledge and apply." }) }),
10697
- /* @__PURE__ */ jsx18(SpaceEnvironment, { spaceId, environmentId }),
10698
- /* @__PURE__ */ jsxs14(Box14, { gap: 3, marginTop: 1, children: [
10699
- /* @__PURE__ */ jsx18(Text15, { dimColor: true, children: "[Enter] Push to Contentful" }),
10700
- /* @__PURE__ */ jsxs14(Text15, { dimColor: true, children: [
10508
+ ] }) : /* @__PURE__ */ jsx17(Text14, { dimColor: true, children: "Nothing to push \u2014 everything is already up to date." }),
10509
+ breakingWithImpact && /* @__PURE__ */ jsx17(Box13, { marginTop: 1, children: /* @__PURE__ */ jsx17(Text14, { color: PALETTE.error, bold: true, children: "\u26A0 Breaking changes will affect downstream entities. Press Enter to acknowledge and apply." }) }),
10510
+ /* @__PURE__ */ jsx17(SpaceEnvironment, { spaceId, environmentId }),
10511
+ /* @__PURE__ */ jsxs13(Box13, { gap: 3, marginTop: 1, children: [
10512
+ /* @__PURE__ */ jsx17(Text14, { dimColor: true, children: "[Enter] Push to Contentful" }),
10513
+ /* @__PURE__ */ jsxs13(Text14, { dimColor: true, children: [
10701
10514
  "[d] ",
10702
10515
  diffExpanded ? "Hide" : "Show",
10703
10516
  " diff"
10704
10517
  ] }),
10705
- diffExpanded && /* @__PURE__ */ jsx18(Text15, { dimColor: true, children: "[\u2191\u2193] Scroll [f/b] Page" }),
10706
- onEdit && /* @__PURE__ */ jsx18(Text15, { dimColor: true, children: "[e] Edit definitions" }),
10707
- /* @__PURE__ */ jsx18(Text15, { dimColor: true, children: "[q] Cancel" })
10518
+ diffExpanded && /* @__PURE__ */ jsx17(Text14, { dimColor: true, children: "[\u2191\u2193] Scroll [f/b] Page" }),
10519
+ onEdit && /* @__PURE__ */ jsx17(Text14, { dimColor: true, children: "[e] Edit definitions" }),
10520
+ /* @__PURE__ */ jsx17(Text14, { dimColor: true, children: "[q] Cancel" })
10708
10521
  ] })
10709
10522
  ] });
10710
10523
  }
@@ -10724,19 +10537,19 @@ var init_WizardPreviewStep = __esm({
10724
10537
  });
10725
10538
 
10726
10539
  // packages/experience-design-system-cli-legacy/src/import/tui/steps/DoneStep.tsx
10727
- import { Box as Box15, Text as Text16 } from "ink";
10728
- import { Fragment as Fragment6, jsx as jsx19, jsxs as jsxs15 } from "react/jsx-runtime";
10540
+ import { Box as Box14, Text as Text15 } from "ink";
10541
+ import { Fragment as Fragment5, jsx as jsx18, jsxs as jsxs14 } from "react/jsx-runtime";
10729
10542
  function EntityRows({ entity, label }) {
10730
10543
  const plural = (n) => `${n} ${label}${n !== 1 ? "s" : ""}`;
10731
- return /* @__PURE__ */ jsxs15(Fragment6, { children: [
10732
- ACTIONS.filter((action) => entity[action] > 0).map((action) => /* @__PURE__ */ jsxs15(Text16, { children: [
10733
- /* @__PURE__ */ jsx19(Text16, { color: PALETTE.success, children: "\u2713" }),
10544
+ return /* @__PURE__ */ jsxs14(Fragment5, { children: [
10545
+ ACTIONS.filter((action) => entity[action] > 0).map((action) => /* @__PURE__ */ jsxs14(Text15, { children: [
10546
+ /* @__PURE__ */ jsx18(Text15, { color: PALETTE.success, children: "\u2713" }),
10734
10547
  " ",
10735
10548
  plural(entity[action]),
10736
10549
  " ",
10737
10550
  action
10738
10551
  ] }, action)),
10739
- entity.failed > 0 && /* @__PURE__ */ jsxs15(Text16, { color: PALETTE.error, children: [
10552
+ entity.failed > 0 && /* @__PURE__ */ jsxs14(Text15, { color: PALETTE.error, children: [
10740
10553
  "\u2717 ",
10741
10554
  plural(entity.failed),
10742
10555
  " failed \u2014 check logs above"
@@ -10744,9 +10557,9 @@ function EntityRows({ entity, label }) {
10744
10557
  ] });
10745
10558
  }
10746
10559
  function LinkRow({ title, url }) {
10747
- return /* @__PURE__ */ jsxs15(Box15, { flexDirection: "column", children: [
10748
- /* @__PURE__ */ jsx19(Text16, { dimColor: true, children: title }),
10749
- /* @__PURE__ */ jsx19(Text16, { color: PALETTE.link, children: url })
10560
+ return /* @__PURE__ */ jsxs14(Box14, { flexDirection: "column", children: [
10561
+ /* @__PURE__ */ jsx18(Text15, { dimColor: true, children: title }),
10562
+ /* @__PURE__ */ jsx18(Text15, { color: PALETTE.link, children: url })
10750
10563
  ] });
10751
10564
  }
10752
10565
  function DoneStep({
@@ -10768,27 +10581,27 @@ function DoneStep({
10768
10581
  const totalPushed = componentTypes.created + componentTypes.updated + componentTypes.removed + designTokens.created + designTokens.updated + designTokens.removed;
10769
10582
  const success = totalFailed === 0;
10770
10583
  const urlArgs = { host: host ?? "api.contentful.com", spaceId, environmentId };
10771
- return /* @__PURE__ */ jsxs15(Box15, { flexDirection: "column", gap: 1, paddingX: 2, paddingY: 1, children: [
10772
- success ? /* @__PURE__ */ jsx19(Text16, { bold: true, color: PALETTE.success, children: "Done!" }) : /* @__PURE__ */ jsx19(Text16, { bold: true, color: PALETTE.warning, children: "\u26A0 Finished with errors" }),
10773
- totalPushed === 0 && totalFailed === 0 && !summary ? /* @__PURE__ */ jsx19(Text16, { dimColor: true, children: "Nothing was pushed \u2014 everything was already up to date." }) : /* @__PURE__ */ jsxs15(Box15, { flexDirection: "column", children: [
10774
- /* @__PURE__ */ jsx19(EntityRows, { entity: componentTypes, label: "Component Type" }),
10775
- /* @__PURE__ */ jsx19(EntityRows, { entity: designTokens, label: "Design Token" }),
10776
- summary && /* @__PURE__ */ jsx19(Box15, { marginTop: 1, children: /* @__PURE__ */ jsxs15(Text16, { dimColor: true, children: [
10584
+ return /* @__PURE__ */ jsxs14(Box14, { flexDirection: "column", gap: 1, paddingX: 2, paddingY: 1, children: [
10585
+ success ? /* @__PURE__ */ jsx18(Text15, { bold: true, color: PALETTE.success, children: "Done!" }) : /* @__PURE__ */ jsx18(Text15, { bold: true, color: PALETTE.warning, children: "\u26A0 Finished with errors" }),
10586
+ totalPushed === 0 && totalFailed === 0 && !summary ? /* @__PURE__ */ jsx18(Text15, { dimColor: true, children: "Nothing was pushed \u2014 everything was already up to date." }) : /* @__PURE__ */ jsxs14(Box14, { flexDirection: "column", children: [
10587
+ /* @__PURE__ */ jsx18(EntityRows, { entity: componentTypes, label: "Component Type" }),
10588
+ /* @__PURE__ */ jsx18(EntityRows, { entity: designTokens, label: "Design Token" }),
10589
+ summary && /* @__PURE__ */ jsx18(Box14, { marginTop: 1, children: /* @__PURE__ */ jsxs14(Text15, { dimColor: true, children: [
10777
10590
  "Push result: ",
10778
10591
  summary.succeeded,
10779
10592
  "/",
10780
10593
  summary.total,
10781
10594
  " succeeded",
10782
- summary.failed > 0 && /* @__PURE__ */ jsxs15(Text16, { color: PALETTE.error, children: [
10595
+ summary.failed > 0 && /* @__PURE__ */ jsxs14(Text15, { color: PALETTE.error, children: [
10783
10596
  ", ",
10784
10597
  summary.failed,
10785
10598
  " failed"
10786
10599
  ] })
10787
10600
  ] }) })
10788
10601
  ] }),
10789
- failures.length > 0 && /* @__PURE__ */ jsxs15(Box15, { flexDirection: "column", children: [
10790
- /* @__PURE__ */ jsx19(Text16, { bold: true, color: PALETTE.error, children: "Failure details" }),
10791
- failures.map((failure) => /* @__PURE__ */ jsxs15(Text16, { color: PALETTE.error, children: [
10602
+ failures.length > 0 && /* @__PURE__ */ jsxs14(Box14, { flexDirection: "column", children: [
10603
+ /* @__PURE__ */ jsx18(Text15, { bold: true, color: PALETTE.error, children: "Failure details" }),
10604
+ failures.map((failure) => /* @__PURE__ */ jsxs14(Text15, { color: PALETTE.error, children: [
10792
10605
  failure.entityType,
10793
10606
  " ",
10794
10607
  failure.entityId,
@@ -10796,11 +10609,11 @@ function DoneStep({
10796
10609
  failure.message
10797
10610
  ] }, `${failure.entityType}:${failure.entityId}`))
10798
10611
  ] }),
10799
- /* @__PURE__ */ jsx19(SpaceEnvironment, { spaceId, environmentId }),
10800
- success && totalPushed > 0 && /* @__PURE__ */ jsxs15(Box15, { flexDirection: "column", gap: 1, children: [
10801
- /* @__PURE__ */ jsx19(Text16, { color: PALETTE.success, children: "Your design system is now in Contentful Experiences." }),
10802
- /* @__PURE__ */ jsx19(LinkRow, { title: "View your components here:", url: buildPostPushUrl(urlArgs) }),
10803
- /* @__PURE__ */ jsx19(
10612
+ /* @__PURE__ */ jsx18(SpaceEnvironment, { spaceId, environmentId }),
10613
+ success && totalPushed > 0 && /* @__PURE__ */ jsxs14(Box14, { flexDirection: "column", gap: 1, children: [
10614
+ /* @__PURE__ */ jsx18(Text15, { color: PALETTE.success, children: "Your design system is now in Contentful Experiences." }),
10615
+ /* @__PURE__ */ jsx18(LinkRow, { title: "View your components here:", url: buildPostPushUrl(urlArgs) }),
10616
+ /* @__PURE__ */ jsx18(
10804
10617
  LinkRow,
10805
10618
  {
10806
10619
  title: "View your design tokens here:",
@@ -10808,7 +10621,7 @@ function DoneStep({
10808
10621
  }
10809
10622
  )
10810
10623
  ] }),
10811
- /* @__PURE__ */ jsx19(Text16, { dimColor: true, children: "[Enter / q] Exit" })
10624
+ /* @__PURE__ */ jsx18(Text15, { dimColor: true, children: "[Enter / q] Exit" })
10812
10625
  ] });
10813
10626
  }
10814
10627
  var ACTIONS;
@@ -10824,8 +10637,8 @@ var init_DoneStep = __esm({
10824
10637
  });
10825
10638
 
10826
10639
  // packages/experience-design-system-cli-legacy/src/import/tui/steps/ErrorStep.tsx
10827
- import { Box as Box16, Text as Text17 } from "ink";
10828
- import { Fragment as Fragment7, jsx as jsx20, jsxs as jsxs16 } from "react/jsx-runtime";
10640
+ import { Box as Box15, Text as Text16 } from "ink";
10641
+ import { Fragment as Fragment6, jsx as jsx19, jsxs as jsxs15 } from "react/jsx-runtime";
10829
10642
  function ErrorStep({
10830
10643
  stepName,
10831
10644
  message,
@@ -10846,19 +10659,19 @@ function ErrorStep({
10846
10659
  onExit();
10847
10660
  }
10848
10661
  });
10849
- return /* @__PURE__ */ jsxs16(Box16, { flexDirection: "column", gap: 1, paddingX: 2, paddingY: 1, children: [
10850
- /* @__PURE__ */ jsxs16(Text17, { bold: true, color: PALETTE.error, children: [
10662
+ return /* @__PURE__ */ jsxs15(Box15, { flexDirection: "column", gap: 1, paddingX: 2, paddingY: 1, children: [
10663
+ /* @__PURE__ */ jsxs15(Text16, { bold: true, color: PALETTE.error, children: [
10851
10664
  "\u2717 ",
10852
10665
  stepName,
10853
10666
  " failed"
10854
10667
  ] }),
10855
- /* @__PURE__ */ jsx20(Text17, { color: PALETTE.error, children: message }),
10856
- /* @__PURE__ */ jsxs16(Box16, { gap: 3, marginTop: 1, children: [
10857
- onAcknowledgeBreakingChanges ? /* @__PURE__ */ jsxs16(Fragment7, { children: [
10858
- /* @__PURE__ */ jsx20(Text17, { dimColor: true, children: "[Enter] Acknowledge and apply" }),
10859
- /* @__PURE__ */ jsx20(Text17, { dimColor: true, children: "[Esc / q] Exit" })
10860
- ] }) : /* @__PURE__ */ jsx20(Text17, { dimColor: true, children: "[Enter / q] Exit" }),
10861
- onRetryCredentials && /* @__PURE__ */ jsx20(Text17, { dimColor: true, children: "[r] Re-enter credentials" })
10668
+ /* @__PURE__ */ jsx19(Text16, { color: PALETTE.error, children: message }),
10669
+ /* @__PURE__ */ jsxs15(Box15, { gap: 3, marginTop: 1, children: [
10670
+ onAcknowledgeBreakingChanges ? /* @__PURE__ */ jsxs15(Fragment6, { children: [
10671
+ /* @__PURE__ */ jsx19(Text16, { dimColor: true, children: "[Enter] Acknowledge and apply" }),
10672
+ /* @__PURE__ */ jsx19(Text16, { dimColor: true, children: "[Esc / q] Exit" })
10673
+ ] }) : /* @__PURE__ */ jsx19(Text16, { dimColor: true, children: "[Enter / q] Exit" }),
10674
+ onRetryCredentials && /* @__PURE__ */ jsx19(Text16, { dimColor: true, children: "[r] Re-enter credentials" })
10862
10675
  ] })
10863
10676
  ] });
10864
10677
  }
@@ -10871,7 +10684,7 @@ var init_ErrorStep = __esm({
10871
10684
  });
10872
10685
 
10873
10686
  // packages/experience-design-system-cli-legacy/src/import/tui/steps/PreviewValidationErrorStep.tsx
10874
- import { jsx as jsx21 } from "react/jsx-runtime";
10687
+ import { jsx as jsx20 } from "react/jsx-runtime";
10875
10688
  function PreviewValidationErrorStep({
10876
10689
  errors,
10877
10690
  missingNames,
@@ -10894,7 +10707,7 @@ function PreviewValidationErrorStep({
10894
10707
 
10895
10708
  Note: ${missingNames.length} component name${missingNames.length === 1 ? "" : "s"} from the server (${missingNames.join(", ")}) ${missingNames.length === 1 ? "does" : "do"} not match anything in this session \u2014 they cannot be edited or skipped from here.` : "";
10896
10709
  const skipLabel = matchedNames.length === 0 ? "No matching components to skip" : `Skip ${matchedNames.length === 1 ? matchedNames[0] : `${matchedNames.length} components`} and retry`;
10897
- return /* @__PURE__ */ jsx21(
10710
+ return /* @__PURE__ */ jsx20(
10898
10711
  GateStep,
10899
10712
  {
10900
10713
  intent: "error",
@@ -10919,35 +10732,35 @@ var init_PreviewValidationErrorStep = __esm({
10919
10732
  });
10920
10733
 
10921
10734
  // packages/experience-design-system-cli-legacy/src/import/tui/steps/PushingStep.tsx
10922
- import { Box as Box17, Text as Text18 } from "ink";
10735
+ import { Box as Box16, Text as Text17 } from "ink";
10923
10736
  import { ProgressBar as ProgressBar2, ThemeProvider as ThemeProvider2 } from "@inkjs/ui";
10924
- import { jsx as jsx22, jsxs as jsxs17 } from "react/jsx-runtime";
10737
+ import { jsx as jsx21, jsxs as jsxs16 } from "react/jsx-runtime";
10925
10738
  function PushingStep({ stepNumber, totalSteps, progress }) {
10926
10739
  const { elapsed } = useTimedSpinner();
10927
10740
  const operationId = progress && progress.kind === "queued" ? progress.operationId : null;
10928
10741
  const showGlobal = progress && progress.kind === "progress";
10929
10742
  const showCurrent = progress && progress.kind === "progress" && progress.current ? progress.current : null;
10930
- return /* @__PURE__ */ jsxs17(Box17, { flexDirection: "column", gap: 1, paddingX: 2, paddingY: 1, children: [
10931
- /* @__PURE__ */ jsx22(StepHeader, { stepNumber, totalSteps, title: "Push to Contentful" }),
10932
- /* @__PURE__ */ jsx22(Text18, { children: "Writing component types and design tokens to your Contentful space..." }),
10933
- operationId && /* @__PURE__ */ jsxs17(Box17, { gap: 1, children: [
10934
- /* @__PURE__ */ jsx22(Text18, { dimColor: true, children: "Operation:" }),
10935
- /* @__PURE__ */ jsx22(Text18, { children: operationId })
10743
+ return /* @__PURE__ */ jsxs16(Box16, { flexDirection: "column", gap: 1, paddingX: 2, paddingY: 1, children: [
10744
+ /* @__PURE__ */ jsx21(StepHeader, { stepNumber, totalSteps, title: "Push to Contentful" }),
10745
+ /* @__PURE__ */ jsx21(Text17, { children: "Writing component types and design tokens to your Contentful space..." }),
10746
+ operationId && /* @__PURE__ */ jsxs16(Box16, { gap: 1, children: [
10747
+ /* @__PURE__ */ jsx21(Text17, { dimColor: true, children: "Operation:" }),
10748
+ /* @__PURE__ */ jsx21(Text17, { children: operationId })
10936
10749
  ] }),
10937
- showGlobal && progress && progress.kind === "progress" && /* @__PURE__ */ jsx22(Box17, { gap: 1, flexDirection: "column", children: /* @__PURE__ */ jsxs17(Box17, { gap: 2, children: [
10938
- /* @__PURE__ */ jsx22(Box17, { width: 40, children: /* @__PURE__ */ jsx22(ThemeProvider2, { theme: INK_UI_THEME, children: /* @__PURE__ */ jsx22(ProgressBar2, { value: Math.round(progress.processed / progress.total * 100) }) }) }),
10939
- /* @__PURE__ */ jsxs17(Text18, { dimColor: true, children: [
10750
+ showGlobal && progress && progress.kind === "progress" && /* @__PURE__ */ jsx21(Box16, { gap: 1, flexDirection: "column", children: /* @__PURE__ */ jsxs16(Box16, { gap: 2, children: [
10751
+ /* @__PURE__ */ jsx21(Box16, { width: 40, children: /* @__PURE__ */ jsx21(ThemeProvider2, { theme: INK_UI_THEME, children: /* @__PURE__ */ jsx21(ProgressBar2, { value: Math.round(progress.processed / progress.total * 100) }) }) }),
10752
+ /* @__PURE__ */ jsxs16(Text17, { dimColor: true, children: [
10940
10753
  progress.processed,
10941
10754
  "/",
10942
10755
  progress.total,
10943
10756
  " entities"
10944
10757
  ] })
10945
10758
  ] }) }),
10946
- showCurrent && /* @__PURE__ */ jsxs17(Box17, { gap: 1, children: [
10947
- /* @__PURE__ */ jsx22(Text18, { dimColor: true, children: "Now processing:" }),
10948
- /* @__PURE__ */ jsx22(Text18, { children: showCurrent })
10759
+ showCurrent && /* @__PURE__ */ jsxs16(Box16, { gap: 1, children: [
10760
+ /* @__PURE__ */ jsx21(Text17, { dimColor: true, children: "Now processing:" }),
10761
+ /* @__PURE__ */ jsx21(Text17, { children: showCurrent })
10949
10762
  ] }),
10950
- /* @__PURE__ */ jsx22(Box17, { marginTop: 1, children: /* @__PURE__ */ jsxs17(Text18, { dimColor: true, children: [
10763
+ /* @__PURE__ */ jsx21(Box16, { marginTop: 1, children: /* @__PURE__ */ jsxs16(Text17, { dimColor: true, children: [
10951
10764
  "Elapsed: ",
10952
10765
  elapsed
10953
10766
  ] }) })
@@ -19545,8 +19358,8 @@ var init_composite_closure = __esm({
19545
19358
  });
19546
19359
 
19547
19360
  // packages/experience-design-system-cli-legacy/src/analyze/select/tui/components/Sidebar.tsx
19548
- import { Box as Box18, Text as Text19 } from "ink";
19549
- import { jsx as jsx23, jsxs as jsxs18 } from "react/jsx-runtime";
19361
+ import { Box as Box17, Text as Text18 } from "ink";
19362
+ import { jsx as jsx22, jsxs as jsxs17 } from "react/jsx-runtime";
19550
19363
  function previewBadge(annotation) {
19551
19364
  switch (annotation) {
19552
19365
  case "new":
@@ -19565,7 +19378,7 @@ function PreviewBadge({
19565
19378
  badge,
19566
19379
  highlighted = false
19567
19380
  }) {
19568
- return badge ? /* @__PURE__ */ jsx23(Text19, { color: badge.color, bold: badge.bold, dimColor: highlighted ? false : badge.dim, children: badge.char }) : /* @__PURE__ */ jsx23(Text19, { children: " " });
19381
+ return badge ? /* @__PURE__ */ jsx22(Text18, { color: badge.color, bold: badge.bold, dimColor: highlighted ? false : badge.dim, children: badge.char }) : /* @__PURE__ */ jsx22(Text18, { children: " " });
19569
19382
  }
19570
19383
  var init_Sidebar = __esm({
19571
19384
  "packages/experience-design-system-cli-legacy/src/analyze/select/tui/components/Sidebar.tsx"() {
@@ -19576,8 +19389,8 @@ var init_Sidebar = __esm({
19576
19389
 
19577
19390
  // packages/experience-design-system-cli-legacy/src/analyze/select/tui/components/GroupedSidebar.tsx
19578
19391
  import figures from "figures";
19579
- import { Box as Box19, Text as Text20 } from "ink";
19580
- import { jsx as jsx24, jsxs as jsxs19 } from "react/jsx-runtime";
19392
+ import { Box as Box18, Text as Text19 } from "ink";
19393
+ import { jsx as jsx23, jsxs as jsxs18 } from "react/jsx-runtime";
19581
19394
  function isEmpty(entry) {
19582
19395
  return Object.keys(entry.$properties ?? {}).length === 0 && Object.keys(entry.$slots ?? {}).length === 0;
19583
19396
  }
@@ -20001,8 +19814,8 @@ function GroupedSidebar(props) {
20001
19814
  const start = windowed ? Math.max(0, scrollOffset ?? 0) : 0;
20002
19815
  const end = windowed ? start + (visibleCount ?? allRows.length) : allRows.length;
20003
19816
  const rows = windowed ? allRows.slice(start, end) : allRows;
20004
- return /* @__PURE__ */ jsxs19(WindowedPanel, { width, height: props.height, title, focused, children: [
20005
- windowed && /* @__PURE__ */ jsx24(WindowIndicator, { direction: "up", count: start }),
19817
+ return /* @__PURE__ */ jsxs18(WindowedPanel, { width, height: props.height, title, focused, children: [
19818
+ windowed && /* @__PURE__ */ jsx23(WindowIndicator, { direction: "up", count: start }),
20006
19819
  rows.map((row, i) => {
20007
19820
  const absoluteRowIdx = start + i;
20008
19821
  const isSelected = selectedRowIdx !== void 0 ? absoluteRowIdx === selectedRowIdx && row.itemIdx >= 0 : row.itemIdx >= 0 && row.itemIdx === selectedIdx;
@@ -20029,13 +19842,13 @@ function GroupedSidebar(props) {
20029
19842
  isOwn: rs?.isOwn ?? false,
20030
19843
  isCursor
20031
19844
  });
20032
- return /* @__PURE__ */ jsxs19(Box19, { children: [
20033
- isCursor ? /* @__PURE__ */ jsx24(Text20, { color: PALETTE.info, bold: true, children: figures.pointer }) : /* @__PURE__ */ jsx24(Text20, { children: " " }),
20034
- /* @__PURE__ */ jsx24(PreviewBadge, { badge, highlighted: isSelected }),
20035
- selectionStateByKey !== void 0 && (selGlyph && !isSynthetic ? /* @__PURE__ */ jsx24(Text20, { color: selColor, dimColor: isSelected ? false : selDim, bold: selBold, children: " " + selGlyph }) : /* @__PURE__ */ jsx24(Text20, { children: " " })),
20036
- aiFlaggedByKey !== void 0 && (aiFlagged ? /* @__PURE__ */ jsx24(Text20, { color: PALETTE.warning, bold: true, children: " [\xD7]" }) : /* @__PURE__ */ jsx24(Text20, { children: " " })),
20037
- /* @__PURE__ */ jsxs19(
20038
- Text20,
19845
+ return /* @__PURE__ */ jsxs18(Box18, { children: [
19846
+ isCursor ? /* @__PURE__ */ jsx23(Text19, { color: PALETTE.info, bold: true, children: figures.pointer }) : /* @__PURE__ */ jsx23(Text19, { children: " " }),
19847
+ /* @__PURE__ */ jsx23(PreviewBadge, { badge, highlighted: isSelected }),
19848
+ selectionStateByKey !== void 0 && (selGlyph && !isSynthetic ? /* @__PURE__ */ jsx23(Text19, { color: selColor, dimColor: isSelected ? false : selDim, bold: selBold, children: " " + selGlyph }) : /* @__PURE__ */ jsx23(Text19, { children: " " })),
19849
+ aiFlaggedByKey !== void 0 && (aiFlagged ? /* @__PURE__ */ jsx23(Text19, { color: PALETTE.warning, bold: true, children: " [\xD7]" }) : /* @__PURE__ */ jsx23(Text19, { children: " " })),
19850
+ /* @__PURE__ */ jsxs18(
19851
+ Text19,
20039
19852
  {
20040
19853
  color: isSelected ? PALETTE.info : labelStyle.color,
20041
19854
  bold: isSelected || labelStyle.bold,
@@ -20049,10 +19862,10 @@ function GroupedSidebar(props) {
20049
19862
  ]
20050
19863
  }
20051
19864
  ),
20052
- inheritanceStyle.glyph && /* @__PURE__ */ jsx24(Text20, { color: inheritanceStyle.color, bold: inheritanceStyle.bold, dimColor: inheritanceStyle.dim, children: " " + inheritanceStyle.glyph })
19865
+ inheritanceStyle.glyph && /* @__PURE__ */ jsx23(Text19, { color: inheritanceStyle.color, bold: inheritanceStyle.bold, dimColor: inheritanceStyle.dim, children: " " + inheritanceStyle.glyph })
20053
19866
  ] }, row.key);
20054
19867
  }),
20055
- windowed && /* @__PURE__ */ jsx24(WindowIndicator, { direction: "down", count: allRows.length - end })
19868
+ windowed && /* @__PURE__ */ jsx23(WindowIndicator, { direction: "down", count: allRows.length - end })
20056
19869
  ] });
20057
19870
  }
20058
19871
  var GLYPH_EXPAND_COLLAPSED, GLYPH_EXPAND_EXPANDED, GLYPH_TREE_MID, GLYPH_TREE_LAST, GLYPH_WARN, GLYPH_ERROR;
@@ -20281,15 +20094,15 @@ var init_sidebar_navigation = __esm({
20281
20094
  });
20282
20095
 
20283
20096
  // packages/experience-design-system-cli-legacy/src/import/tui/hooks/sidebar-search-state.ts
20284
- import { useState as useState9 } from "react";
20097
+ import { useState as useState8 } from "react";
20285
20098
  function useSidebarSearchState() {
20286
- const [searchOpen, setSearchOpen] = useState9(false);
20287
- const [searchQuery, setSearchQuery] = useState9("");
20288
- const [autocompleteCandidates, setAutocompleteCandidates] = useState9([]);
20289
- const [jumpFilterTarget, setJumpFilterTarget] = useState9(null);
20290
- const [columnOneView, setColumnOneView] = useState9("grouped");
20291
- const [activeFilters, setActiveFilters] = useState9(/* @__PURE__ */ new Set());
20292
- const [showHelp, setShowHelp] = useState9(false);
20099
+ const [searchOpen, setSearchOpen] = useState8(false);
20100
+ const [searchQuery, setSearchQuery] = useState8("");
20101
+ const [autocompleteCandidates, setAutocompleteCandidates] = useState8([]);
20102
+ const [jumpFilterTarget, setJumpFilterTarget] = useState8(null);
20103
+ const [columnOneView, setColumnOneView] = useState8("grouped");
20104
+ const [activeFilters, setActiveFilters] = useState8(/* @__PURE__ */ new Set());
20105
+ const [showHelp, setShowHelp] = useState8(false);
20293
20106
  return {
20294
20107
  searchOpen,
20295
20108
  setSearchOpen,
@@ -20314,8 +20127,8 @@ var init_sidebar_search_state = __esm({
20314
20127
  });
20315
20128
 
20316
20129
  // packages/experience-design-system-cli-legacy/src/import/tui/components/SearchMatchSummary.tsx
20317
- import { Box as Box20, Text as Text21 } from "ink";
20318
- import { Fragment as Fragment8, jsx as jsx25, jsxs as jsxs20 } from "react/jsx-runtime";
20130
+ import { Box as Box19, Text as Text20 } from "ink";
20131
+ import { Fragment as Fragment7, jsx as jsx24, jsxs as jsxs19 } from "react/jsx-runtime";
20319
20132
  function SearchMatchSummary({
20320
20133
  open,
20321
20134
  query,
@@ -20326,17 +20139,17 @@ function SearchMatchSummary({
20326
20139
  marginTop
20327
20140
  }) {
20328
20141
  if (hidden) return null;
20329
- return /* @__PURE__ */ jsxs20(Fragment8, { children: [
20330
- open && /* @__PURE__ */ jsxs20(Box20, { marginTop, flexDirection: "column", children: [
20331
- /* @__PURE__ */ jsxs20(Text21, { children: [
20142
+ return /* @__PURE__ */ jsxs19(Fragment7, { children: [
20143
+ open && /* @__PURE__ */ jsxs19(Box19, { marginTop, flexDirection: "column", children: [
20144
+ /* @__PURE__ */ jsxs19(Text20, { children: [
20332
20145
  `/${query}`,
20333
- /* @__PURE__ */ jsx25(Text21, { color: PALETTE.info, children: "\u258E" }),
20334
- query && /* @__PURE__ */ jsx25(Text21, { dimColor: true, children: formatSearchMatchSummary(matches, total) }),
20335
- /* @__PURE__ */ jsx25(Text21, { dimColor: true, children: " \xB7 [Esc] leave" })
20146
+ /* @__PURE__ */ jsx24(Text20, { color: PALETTE.info, children: "\u258E" }),
20147
+ query && /* @__PURE__ */ jsx24(Text20, { dimColor: true, children: formatSearchMatchSummary(matches, total) }),
20148
+ /* @__PURE__ */ jsx24(Text20, { dimColor: true, children: " \xB7 [Esc] leave" })
20336
20149
  ] }),
20337
- autocompleteCandidates.length > 1 && /* @__PURE__ */ jsx25(Text21, { dimColor: true, children: ` possibilities: ${autocompleteCandidates.join(" \xB7 ").slice(0, 120)}` })
20150
+ autocompleteCandidates.length > 1 && /* @__PURE__ */ jsx24(Text20, { dimColor: true, children: ` possibilities: ${autocompleteCandidates.join(" \xB7 ").slice(0, 120)}` })
20338
20151
  ] }),
20339
- !open && query && /* @__PURE__ */ jsx25(Box20, { marginTop, children: /* @__PURE__ */ jsx25(Text21, { dimColor: true, children: `/${query}${formatSearchMatchSummary(matches, total)} \xB7 [Esc] clear` }) })
20152
+ !open && query && /* @__PURE__ */ jsx24(Box19, { marginTop, children: /* @__PURE__ */ jsx24(Text20, { dimColor: true, children: `/${query}${formatSearchMatchSummary(matches, total)} \xB7 [Esc] clear` }) })
20340
20153
  ] });
20341
20154
  }
20342
20155
  var init_SearchMatchSummary = __esm({
@@ -20348,10 +20161,10 @@ var init_SearchMatchSummary = __esm({
20348
20161
  });
20349
20162
 
20350
20163
  // packages/experience-design-system-cli-legacy/src/import/tui/hooks/useOverlayPanel.ts
20351
- import { useCallback as useCallback3, useState as useState10 } from "react";
20164
+ import { useCallback as useCallback3, useState as useState9 } from "react";
20352
20165
  function useOverlayPanel(opts) {
20353
20166
  const { toggleKey, onClose } = opts;
20354
- const [isOpen, setIsOpen] = useState10(false);
20167
+ const [isOpen, setIsOpen] = useState9(false);
20355
20168
  const open = useCallback3(() => {
20356
20169
  setIsOpen(true);
20357
20170
  }, []);
@@ -20424,8 +20237,8 @@ var init_lineage_layout = __esm({
20424
20237
 
20425
20238
  // packages/experience-design-system-cli-legacy/src/analyze/select/tui/components/GotoBanner.tsx
20426
20239
  import figures2 from "figures";
20427
- import { Box as Box21, Text as Text22 } from "ink";
20428
- import { jsx as jsx26, jsxs as jsxs21 } from "react/jsx-runtime";
20240
+ import { Box as Box20, Text as Text21 } from "ink";
20241
+ import { jsx as jsx25, jsxs as jsxs20 } from "react/jsx-runtime";
20429
20242
  function windowStart(rowCount, highlightIndex, maxRows) {
20430
20243
  if (rowCount <= maxRows) return 0;
20431
20244
  const maxStart = rowCount - maxRows;
@@ -20435,9 +20248,9 @@ function windowStart(rowCount, highlightIndex, maxRows) {
20435
20248
  return start;
20436
20249
  }
20437
20250
  function defaultRenderRow(row, index, isCursor) {
20438
- return /* @__PURE__ */ jsxs21(Text22, { children: [
20439
- isCursor ? /* @__PURE__ */ jsx26(Text22, { color: PALETTE.info, bold: true, children: figures2.pointer }) : /* @__PURE__ */ jsx26(Text22, { children: " " }),
20440
- /* @__PURE__ */ jsx26(Text22, { inverse: isCursor, children: " " + row.label })
20251
+ return /* @__PURE__ */ jsxs20(Text21, { children: [
20252
+ isCursor ? /* @__PURE__ */ jsx25(Text21, { color: PALETTE.info, bold: true, children: figures2.pointer }) : /* @__PURE__ */ jsx25(Text21, { children: " " }),
20253
+ /* @__PURE__ */ jsx25(Text21, { inverse: isCursor, children: " " + row.label })
20441
20254
  ] }, index);
20442
20255
  }
20443
20256
  function GotoBanner({
@@ -20456,8 +20269,8 @@ function GotoBanner({
20456
20269
  const visible = rows.slice(start, end);
20457
20270
  const moreAbove = start;
20458
20271
  const moreBelow = rows.length - end;
20459
- return /* @__PURE__ */ jsxs21(
20460
- Box21,
20272
+ return /* @__PURE__ */ jsxs20(
20273
+ Box20,
20461
20274
  {
20462
20275
  flexDirection: "column",
20463
20276
  borderStyle: "single",
@@ -20467,14 +20280,14 @@ function GotoBanner({
20467
20280
  width,
20468
20281
  flexShrink: 0,
20469
20282
  children: [
20470
- /* @__PURE__ */ jsx26(Text22, { bold: true, children: title }),
20471
- moreAbove > 0 && /* @__PURE__ */ jsx26(Text22, { dimColor: true, children: ` \u25B2 ${moreAbove} more` }),
20283
+ /* @__PURE__ */ jsx25(Text21, { bold: true, children: title }),
20284
+ moreAbove > 0 && /* @__PURE__ */ jsx25(Text21, { dimColor: true, children: ` \u25B2 ${moreAbove} more` }),
20472
20285
  visible.map((row, vi) => {
20473
20286
  const i = start + vi;
20474
20287
  return renderRow(row, i, i === highlightIndex);
20475
20288
  }),
20476
- moreBelow > 0 && /* @__PURE__ */ jsx26(Text22, { dimColor: true, children: ` \u25BC ${moreBelow} more` }),
20477
- footerHint !== void 0 && /* @__PURE__ */ jsx26(Text22, { dimColor: true, children: footerHint })
20289
+ moreBelow > 0 && /* @__PURE__ */ jsx25(Text21, { dimColor: true, children: ` \u25BC ${moreBelow} more` }),
20290
+ footerHint !== void 0 && /* @__PURE__ */ jsx25(Text21, { dimColor: true, children: footerHint })
20478
20291
  ]
20479
20292
  }
20480
20293
  );
@@ -20489,9 +20302,9 @@ var init_GotoBanner = __esm({
20489
20302
  });
20490
20303
 
20491
20304
  // packages/experience-design-system-cli-legacy/src/analyze/select/tui/components/HelpOverlay.tsx
20492
- import React9 from "react";
20493
- import { Box as Box22, Text as Text23 } from "ink";
20494
- import { Fragment as Fragment9, jsx as jsx27, jsxs as jsxs22 } from "react/jsx-runtime";
20305
+ import React8 from "react";
20306
+ import { Box as Box21, Text as Text22 } from "ink";
20307
+ import { Fragment as Fragment8, jsx as jsx26, jsxs as jsxs21 } from "react/jsx-runtime";
20495
20308
  function HelpOverlay(props) {
20496
20309
  const { onClose } = props;
20497
20310
  const { columns: terminalColumns, rows: terminalRows } = useTerminalSize();
@@ -20502,8 +20315,8 @@ function HelpOverlay(props) {
20502
20315
  if (input === "h" || key.escape) onClose();
20503
20316
  }, props.handleInput !== false);
20504
20317
  if (props.sections) {
20505
- return /* @__PURE__ */ jsxs22(
20506
- Box22,
20318
+ return /* @__PURE__ */ jsxs21(
20319
+ Box21,
20507
20320
  {
20508
20321
  flexDirection: "column",
20509
20322
  borderStyle: "round",
@@ -20512,19 +20325,19 @@ function HelpOverlay(props) {
20512
20325
  height: panelHeight,
20513
20326
  overflowY: "hidden",
20514
20327
  children: [
20515
- /* @__PURE__ */ jsx27(Text23, { bold: true, children: "\u2500".repeat(titleRule) + " Help " + "\u2500".repeat(titleRule) }),
20516
- props.sections.map((section2) => /* @__PURE__ */ jsxs22(React9.Fragment, { children: [
20517
- /* @__PURE__ */ jsx27(Text23, { children: " " }),
20518
- /* @__PURE__ */ jsx27(Text23, { bold: true, children: section2.title }),
20519
- section2.entries.map((entry) => /* @__PURE__ */ jsx27(Text23, { children: entry.keys ? " " + entry.keys.padEnd(16) + " " + entry.label : " " + entry.label }, entry.keys + entry.label))
20328
+ /* @__PURE__ */ jsx26(Text22, { bold: true, children: "\u2500".repeat(titleRule) + " Help " + "\u2500".repeat(titleRule) }),
20329
+ props.sections.map((section2) => /* @__PURE__ */ jsxs21(React8.Fragment, { children: [
20330
+ /* @__PURE__ */ jsx26(Text22, { children: " " }),
20331
+ /* @__PURE__ */ jsx26(Text22, { bold: true, children: section2.title }),
20332
+ section2.entries.map((entry) => /* @__PURE__ */ jsx26(Text22, { children: entry.keys ? " " + entry.keys.padEnd(16) + " " + entry.label : " " + entry.label }, entry.keys + entry.label))
20520
20333
  ] }, section2.title))
20521
20334
  ]
20522
20335
  }
20523
20336
  );
20524
20337
  }
20525
20338
  const mode = props.mode;
20526
- return /* @__PURE__ */ jsxs22(
20527
- Box22,
20339
+ return /* @__PURE__ */ jsxs21(
20340
+ Box21,
20528
20341
  {
20529
20342
  flexDirection: "column",
20530
20343
  borderStyle: "round",
@@ -20533,31 +20346,31 @@ function HelpOverlay(props) {
20533
20346
  height: panelHeight,
20534
20347
  overflowY: "hidden",
20535
20348
  children: [
20536
- /* @__PURE__ */ jsx27(Text23, { bold: true, children: "\u2500".repeat(titleRule) + " Help " + "\u2500".repeat(titleRule) }),
20537
- /* @__PURE__ */ jsx27(Text23, { children: " " }),
20538
- /* @__PURE__ */ jsx27(Text23, { bold: true, children: "Navigation" }),
20539
- /* @__PURE__ */ jsx27(Text23, { children: " \u2191 / k / PgUp Scroll up" }),
20540
- /* @__PURE__ */ jsx27(Text23, { children: " \u2193 / j / PgDn Scroll down" }),
20541
- /* @__PURE__ */ jsx27(Text23, { children: " g / Home Jump to top" }),
20542
- /* @__PURE__ */ jsx27(Text23, { children: " G / End Jump to bottom" }),
20543
- mode === "review" && /* @__PURE__ */ jsxs22(Fragment9, { children: [
20544
- /* @__PURE__ */ jsx27(Text23, { children: " " }),
20545
- /* @__PURE__ */ jsx27(Text23, { bold: true, children: "[Review mode only]" }),
20546
- /* @__PURE__ */ jsx27(Text23, { children: " Tab Toggle sidebar/detail" }),
20547
- /* @__PURE__ */ jsx27(Text23, { children: " a Accept component" }),
20548
- /* @__PURE__ */ jsx27(Text23, { children: " r Reject component" }),
20549
- /* @__PURE__ */ jsx27(Text23, { children: " e Edit proposal" }),
20550
- /* @__PURE__ */ jsx27(Text23, { children: " s Toggle source code" }),
20551
- /* @__PURE__ */ jsx27(Text23, { children: " A Approve all" }),
20552
- /* @__PURE__ */ jsx27(Text23, { children: " F Open finalize dialog" }),
20553
- /* @__PURE__ */ jsx27(Text23, { children: " Ctrl+S Save draft" }),
20554
- /* @__PURE__ */ jsx27(Text23, { children: " Ctrl+Z Undo" }),
20555
- /* @__PURE__ */ jsx27(Text23, { children: " Ctrl+Y Redo" }),
20556
- /* @__PURE__ */ jsx27(Text23, { children: " Esc Exit edit / close" })
20349
+ /* @__PURE__ */ jsx26(Text22, { bold: true, children: "\u2500".repeat(titleRule) + " Help " + "\u2500".repeat(titleRule) }),
20350
+ /* @__PURE__ */ jsx26(Text22, { children: " " }),
20351
+ /* @__PURE__ */ jsx26(Text22, { bold: true, children: "Navigation" }),
20352
+ /* @__PURE__ */ jsx26(Text22, { children: " \u2191 / k / PgUp Scroll up" }),
20353
+ /* @__PURE__ */ jsx26(Text22, { children: " \u2193 / j / PgDn Scroll down" }),
20354
+ /* @__PURE__ */ jsx26(Text22, { children: " g / Home Jump to top" }),
20355
+ /* @__PURE__ */ jsx26(Text22, { children: " G / End Jump to bottom" }),
20356
+ mode === "review" && /* @__PURE__ */ jsxs21(Fragment8, { children: [
20357
+ /* @__PURE__ */ jsx26(Text22, { children: " " }),
20358
+ /* @__PURE__ */ jsx26(Text22, { bold: true, children: "[Review mode only]" }),
20359
+ /* @__PURE__ */ jsx26(Text22, { children: " Tab Toggle sidebar/detail" }),
20360
+ /* @__PURE__ */ jsx26(Text22, { children: " a Accept component" }),
20361
+ /* @__PURE__ */ jsx26(Text22, { children: " r Reject component" }),
20362
+ /* @__PURE__ */ jsx26(Text22, { children: " e Edit proposal" }),
20363
+ /* @__PURE__ */ jsx26(Text22, { children: " s Toggle source code" }),
20364
+ /* @__PURE__ */ jsx26(Text22, { children: " A Approve all" }),
20365
+ /* @__PURE__ */ jsx26(Text22, { children: " F Open finalize dialog" }),
20366
+ /* @__PURE__ */ jsx26(Text22, { children: " Ctrl+S Save draft" }),
20367
+ /* @__PURE__ */ jsx26(Text22, { children: " Ctrl+Z Undo" }),
20368
+ /* @__PURE__ */ jsx26(Text22, { children: " Ctrl+Y Redo" }),
20369
+ /* @__PURE__ */ jsx26(Text22, { children: " Esc Exit edit / close" })
20557
20370
  ] }),
20558
- /* @__PURE__ */ jsx27(Text23, { children: " " }),
20559
- /* @__PURE__ */ jsx27(Text23, { children: " h Close help" }),
20560
- /* @__PURE__ */ jsx27(Text23, { children: " q Quit" })
20371
+ /* @__PURE__ */ jsx26(Text22, { children: " " }),
20372
+ /* @__PURE__ */ jsx26(Text22, { children: " h Close help" }),
20373
+ /* @__PURE__ */ jsx26(Text22, { children: " q Quit" })
20561
20374
  ]
20562
20375
  }
20563
20376
  );
@@ -20572,12 +20385,12 @@ var init_HelpOverlay = __esm({
20572
20385
  });
20573
20386
 
20574
20387
  // packages/experience-design-system-cli-legacy/src/import/tui/components/LegendEntry.tsx
20575
- import { Text as Text24 } from "ink";
20576
- import { jsx as jsx28, jsxs as jsxs23 } from "react/jsx-runtime";
20388
+ import { Text as Text23 } from "ink";
20389
+ import { jsx as jsx27, jsxs as jsxs22 } from "react/jsx-runtime";
20577
20390
  function legendEntry(keyBracket, label, active = false) {
20578
- return /* @__PURE__ */ jsxs23(Text24, { children: [
20579
- /* @__PURE__ */ jsx28(Text24, { color: active ? PALETTE.warning : PALETTE.info, inverse: active, children: keyBracket }),
20580
- /* @__PURE__ */ jsx28(Text24, { color: active ? PALETTE.warning : void 0, inverse: active, dimColor: !active, children: " " + label })
20391
+ return /* @__PURE__ */ jsxs22(Text23, { children: [
20392
+ /* @__PURE__ */ jsx27(Text23, { color: active ? PALETTE.warning : PALETTE.info, inverse: active, children: keyBracket }),
20393
+ /* @__PURE__ */ jsx27(Text23, { color: active ? PALETTE.warning : void 0, inverse: active, dimColor: !active, children: " " + label })
20581
20394
  ] }, keyBracket + label);
20582
20395
  }
20583
20396
  var init_LegendEntry = __esm({
@@ -20588,10 +20401,10 @@ var init_LegendEntry = __esm({
20588
20401
  });
20589
20402
 
20590
20403
  // packages/experience-design-system-cli-legacy/src/import/tui/components/CompactControlBar.tsx
20591
- import { Box as Box23 } from "ink";
20592
- import { jsxs as jsxs24 } from "react/jsx-runtime";
20404
+ import { Box as Box22 } from "ink";
20405
+ import { jsxs as jsxs23 } from "react/jsx-runtime";
20593
20406
  function CompactControlBar({ hasGroupRoots, searchActive }) {
20594
- return /* @__PURE__ */ jsxs24(Box23, { borderStyle: "single", borderColor: PALETTE.border, paddingX: 1, marginTop: 1, flexWrap: "wrap", columnGap: 2, children: [
20407
+ return /* @__PURE__ */ jsxs23(Box22, { borderStyle: "single", borderColor: PALETTE.border, paddingX: 1, marginTop: 1, flexWrap: "wrap", columnGap: 2, children: [
20595
20408
  legendEntry("[\u2191/\u2193]", "move"),
20596
20409
  legendEntry("[a/r]", "accept/reject"),
20597
20410
  legendEntry("[f]", "continue/finalize"),
@@ -20610,8 +20423,8 @@ var init_CompactControlBar = __esm({
20610
20423
  });
20611
20424
 
20612
20425
  // packages/experience-design-system-cli-legacy/src/import/tui/components/CounterStrip.tsx
20613
- import { Box as Box24, Text as Text25 } from "ink";
20614
- import { jsx as jsx29, jsxs as jsxs25 } from "react/jsx-runtime";
20426
+ import { Box as Box23, Text as Text24 } from "ink";
20427
+ import { jsx as jsx28, jsxs as jsxs24 } from "react/jsx-runtime";
20615
20428
  function CounterStrip(props) {
20616
20429
  const { counters, totalWidth } = props;
20617
20430
  const condensed = totalWidth < 60;
@@ -20619,25 +20432,25 @@ function CounterStrip(props) {
20619
20432
  const labelRej = condensed ? "Rej" : "Rejected";
20620
20433
  const labelUnd = condensed ? "Und" : "Undecided";
20621
20434
  const sep = condensed ? " | " : " ";
20622
- return /* @__PURE__ */ jsx29(Box24, { children: /* @__PURE__ */ jsxs25(Text25, { children: [
20623
- /* @__PURE__ */ jsxs25(Text25, { dimColor: true, children: [
20435
+ return /* @__PURE__ */ jsx28(Box23, { children: /* @__PURE__ */ jsxs24(Text24, { children: [
20436
+ /* @__PURE__ */ jsxs24(Text24, { dimColor: true, children: [
20624
20437
  labelGrp,
20625
20438
  " "
20626
20439
  ] }),
20627
- /* @__PURE__ */ jsx29(Text25, { bold: true, children: counters.groups }),
20628
- /* @__PURE__ */ jsx29(Text25, { dimColor: true, children: sep }),
20629
- /* @__PURE__ */ jsxs25(Text25, { dimColor: true, children: [
20440
+ /* @__PURE__ */ jsx28(Text24, { bold: true, children: counters.groups }),
20441
+ /* @__PURE__ */ jsx28(Text24, { dimColor: true, children: sep }),
20442
+ /* @__PURE__ */ jsxs24(Text24, { dimColor: true, children: [
20630
20443
  labelRej,
20631
20444
  " "
20632
20445
  ] }),
20633
- /* @__PURE__ */ jsx29(Text25, { bold: true, children: counters.rejected }),
20634
- /* @__PURE__ */ jsx29(Text25, { dimColor: true, children: sep }),
20635
- /* @__PURE__ */ jsxs25(Text25, { dimColor: true, children: [
20446
+ /* @__PURE__ */ jsx28(Text24, { bold: true, children: counters.rejected }),
20447
+ /* @__PURE__ */ jsx28(Text24, { dimColor: true, children: sep }),
20448
+ /* @__PURE__ */ jsxs24(Text24, { dimColor: true, children: [
20636
20449
  labelUnd,
20637
20450
  " "
20638
20451
  ] }),
20639
- /* @__PURE__ */ jsx29(Text25, { bold: true, children: counters.undecided }),
20640
- /* @__PURE__ */ jsx29(Text25, { dimColor: true, children: sep })
20452
+ /* @__PURE__ */ jsx28(Text24, { bold: true, children: counters.undecided }),
20453
+ /* @__PURE__ */ jsx28(Text24, { dimColor: true, children: sep })
20641
20454
  ] }) });
20642
20455
  }
20643
20456
  var init_CounterStrip = __esm({
@@ -20987,10 +20800,10 @@ var init_scope_gate_columns = __esm({
20987
20800
  });
20988
20801
 
20989
20802
  // packages/experience-design-system-cli-legacy/src/import/tui/steps/ScopeGateStep.tsx
20990
- import { Box as Box25, Text as Text26 } from "ink";
20991
- import React10, { useEffect as useEffect6, useMemo as useMemo2, useRef as useRef4, useState as useState11 } from "react";
20803
+ import { Box as Box24, Text as Text25 } from "ink";
20804
+ import React9, { useEffect as useEffect6, useMemo as useMemo2, useRef as useRef3, useState as useState10 } from "react";
20992
20805
  import figures3 from "figures";
20993
- import { Fragment as Fragment10, jsx as jsx30, jsxs as jsxs26 } from "react/jsx-runtime";
20806
+ import { Fragment as Fragment9, jsx as jsx29, jsxs as jsxs25 } from "react/jsx-runtime";
20994
20807
  function toSidebarEntry(c2) {
20995
20808
  const $slots = {};
20996
20809
  if (c2.slots) {
@@ -21007,9 +20820,9 @@ function toSidebarEntry(c2) {
21007
20820
  }
21008
20821
  function ScopeGateStep(props) {
21009
20822
  if (props.components.length === 0) {
21010
- return /* @__PURE__ */ jsx30(Box25, { paddingX: 2, paddingY: 1, children: /* @__PURE__ */ jsx30(Text26, { color: PALETTE.error, children: "Error: no components found for this session \u2014 please re-run analyze extract." }) });
20823
+ return /* @__PURE__ */ jsx29(Box24, { paddingX: 2, paddingY: 1, children: /* @__PURE__ */ jsx29(Text25, { color: PALETTE.error, children: "Error: no components found for this session \u2014 please re-run analyze extract." }) });
21011
20824
  }
21012
- return /* @__PURE__ */ jsx30(ScopeGateStepView, { ...props, components: [...props.components] });
20825
+ return /* @__PURE__ */ jsx29(ScopeGateStepView, { ...props, components: [...props.components] });
21013
20826
  }
21014
20827
  function ScopeGateStepView({
21015
20828
  components,
@@ -21019,18 +20832,18 @@ function ScopeGateStepView({
21019
20832
  const { columns: totalWidth, rows: terminalRows } = useTerminalSize();
21020
20833
  const columnPlan = useMemo2(() => computeColumnWidths(totalWidth), [totalWidth]);
21021
20834
  const sidebarWidth = columnPlan.main;
21022
- const [userDecisions, setUserDecisions] = useState11(/* @__PURE__ */ new Map());
21023
- const [nav, setNav] = useState11({ cursor: 0, scrollOffset: 0 });
21024
- const [focusedColumn, setFocusedColumn] = useState11("main");
21025
- const [addedComponentsCursor, setAddedComponentsCursor] = useState11(0);
21026
- const [showDependencies, setShowDependencies] = useState11(false);
20835
+ const [userDecisions, setUserDecisions] = useState10(/* @__PURE__ */ new Map());
20836
+ const [nav, setNav] = useState10({ cursor: 0, scrollOffset: 0 });
20837
+ const [focusedColumn, setFocusedColumn] = useState10("main");
20838
+ const [addedComponentsCursor, setAddedComponentsCursor] = useState10(0);
20839
+ const [showDependencies, setShowDependencies] = useState10(false);
21027
20840
  const cursor = nav.cursor;
21028
20841
  const scrollOffset = nav.scrollOffset;
21029
- const [cyclesPanelOpen, setCyclesPanelOpen] = useState11(false);
21030
- const [cyclesCursor, setCyclesCursor] = useState11(0);
20842
+ const [cyclesPanelOpen, setCyclesPanelOpen] = useState10(false);
20843
+ const [cyclesCursor, setCyclesCursor] = useState10(0);
21031
20844
  const aiRationalePanel = useOverlayPanel({ toggleKey: "x" });
21032
- const [aiCursor, setAiCursor] = useState11(0);
21033
- const [pendingRejectCascade, setPendingRejectCascade] = useState11(null);
20845
+ const [aiCursor, setAiCursor] = useState10(0);
20846
+ const [pendingRejectCascade, setPendingRejectCascade] = useState10(null);
21034
20847
  const {
21035
20848
  searchOpen,
21036
20849
  setSearchOpen,
@@ -21089,12 +20902,12 @@ function ScopeGateStepView({
21089
20902
  );
21090
20903
  const hasCycles = slotCycles.length > 0;
21091
20904
  const closures = useMemo2(() => computeAllClosures(graph), [graph]);
21092
- const [expandedGroups, setExpandedGroups] = useState11(() => {
20905
+ const [expandedGroups, setExpandedGroups] = useState10(() => {
21093
20906
  const seed = new Set(closures.keys());
21094
20907
  for (const p of cycleParticipants) seed.add(p);
21095
20908
  return seed;
21096
20909
  });
21097
- const seededGroupsRef = useRef4(closures.size > 0 || cycleParticipants.size > 0);
20910
+ const seededGroupsRef = useRef3(closures.size > 0 || cycleParticipants.size > 0);
21098
20911
  useEffect6(() => {
21099
20912
  if (seededGroupsRef.current) return;
21100
20913
  if (closures.size === 0 && cycleParticipants.size === 0) return;
@@ -21592,17 +21405,17 @@ function ScopeGateStepView({
21592
21405
  );
21593
21406
  const safeAddedComponentsCursor = Math.min(addedComponentsCursor, Math.max(0, addedComponents.length - 1));
21594
21407
  if (showHelp) {
21595
- return /* @__PURE__ */ jsx30(HelpOverlay, { sections: HELP_SECTIONS, handleInput: false, onClose: () => setShowHelp(false) });
21408
+ return /* @__PURE__ */ jsx29(HelpOverlay, { sections: HELP_SECTIONS, handleInput: false, onClose: () => setShowHelp(false) });
21596
21409
  }
21597
- return /* @__PURE__ */ jsxs26(Box25, { flexDirection: "column", paddingX: 2, children: [
21598
- /* @__PURE__ */ jsx30(CounterStrip, { counters, totalWidth }),
21599
- hasAnyAi && /* @__PURE__ */ jsxs26(Text26, { dimColor: true, children: [
21410
+ return /* @__PURE__ */ jsxs25(Box24, { flexDirection: "column", paddingX: 2, children: [
21411
+ /* @__PURE__ */ jsx29(CounterStrip, { counters, totalWidth }),
21412
+ hasAnyAi && /* @__PURE__ */ jsxs25(Text25, { dimColor: true, children: [
21600
21413
  `${aiExcludedCount} component${aiExcludedCount === 1 ? "" : "s"} flagged by AI`,
21601
- aiRows.length > 0 && /* @__PURE__ */ jsx30(Text26, { color: PALETTE.info, children: " \u2014 press [x] to see why" })
21414
+ aiRows.length > 0 && /* @__PURE__ */ jsx29(Text25, { color: PALETTE.info, children: " \u2014 press [x] to see why" })
21602
21415
  ] }),
21603
- hasCycles && /* @__PURE__ */ jsx30(Box25, { marginTop: 1, children: /* @__PURE__ */ jsx30(Text26, { dimColor: true, children: "If you must have components with cycles, select them together into the generate step and then use the editor to fix them." }) }),
21604
- /* @__PURE__ */ jsxs26(Box25, { flexDirection: "row", alignItems: "stretch", children: [
21605
- aiRationalePanel.isOpen ? /* @__PURE__ */ jsx30(
21416
+ hasCycles && /* @__PURE__ */ jsx29(Box24, { marginTop: 1, children: /* @__PURE__ */ jsx29(Text25, { dimColor: true, children: "If you must have components with cycles, select them together into the generate step and then use the editor to fix them." }) }),
21417
+ /* @__PURE__ */ jsxs25(Box24, { flexDirection: "row", alignItems: "stretch", children: [
21418
+ aiRationalePanel.isOpen ? /* @__PURE__ */ jsx29(
21606
21419
  GotoBanner,
21607
21420
  {
21608
21421
  title: `Review flags (${aiExcludedCount})`,
@@ -21612,7 +21425,7 @@ function ScopeGateStepView({
21612
21425
  width: sidebarWidth,
21613
21426
  footerHint: "[\u2191/\u2193] move \xB7 [Enter] jump \xB7 [x/Esc] close"
21614
21427
  }
21615
- ) : /* @__PURE__ */ jsx30(
21428
+ ) : /* @__PURE__ */ jsx29(
21616
21429
  GroupedSidebar,
21617
21430
  {
21618
21431
  items: groupedItems,
@@ -21639,9 +21452,9 @@ function ScopeGateStepView({
21639
21452
  graph
21640
21453
  }
21641
21454
  ),
21642
- columnPlan.layout === "two-column" && /* @__PURE__ */ jsxs26(Fragment10, { children: [
21643
- /* @__PURE__ */ jsx30(Box25, { width: 2, flexShrink: 0 }),
21644
- /* @__PURE__ */ jsx30(
21455
+ columnPlan.layout === "two-column" && /* @__PURE__ */ jsxs25(Fragment9, { children: [
21456
+ /* @__PURE__ */ jsx29(Box24, { width: 2, flexShrink: 0 }),
21457
+ /* @__PURE__ */ jsx29(
21645
21458
  AddedComponentsColumn,
21646
21459
  {
21647
21460
  width: columnPlan.added,
@@ -21656,9 +21469,9 @@ function ScopeGateStepView({
21656
21469
  )
21657
21470
  ] })
21658
21471
  ] }),
21659
- cyclesPanelOpen && /* @__PURE__ */ jsxs26(Box25, { flexDirection: "column", borderStyle: "single", borderColor: PALETTE.warning, paddingX: 1, marginTop: 1, children: [
21660
- /* @__PURE__ */ jsx30(Text26, { bold: true, color: PALETTE.warning, children: `Cycles detected (${slotCycles.length}):` }),
21661
- /* @__PURE__ */ jsx30(Text26, { children: " " }),
21472
+ cyclesPanelOpen && /* @__PURE__ */ jsxs25(Box24, { flexDirection: "column", borderStyle: "single", borderColor: PALETTE.warning, paddingX: 1, marginTop: 1, children: [
21473
+ /* @__PURE__ */ jsx29(Text25, { bold: true, color: PALETTE.warning, children: `Cycles detected (${slotCycles.length}):` }),
21474
+ /* @__PURE__ */ jsx29(Text25, { children: " " }),
21662
21475
  slotCycles.map((cycle, i) => {
21663
21476
  const isCursor = i === cyclesCursor;
21664
21477
  const parts = [];
@@ -21668,20 +21481,20 @@ function ScopeGateStepView({
21668
21481
  }
21669
21482
  parts.push(cycle.path[cycle.path.length - 1]);
21670
21483
  const label = `Cycle ${i + 1}: ${parts.join(" \u2192 ")}`;
21671
- return /* @__PURE__ */ jsxs26(Text26, { children: [
21672
- isCursor ? /* @__PURE__ */ jsx30(Text26, { color: PALETTE.info, bold: true, children: figures3.pointer }) : /* @__PURE__ */ jsx30(Text26, { children: " " }),
21673
- /* @__PURE__ */ jsx30(Text26, { color: PALETTE.warning, inverse: isCursor, children: " " + label })
21484
+ return /* @__PURE__ */ jsxs25(Text25, { children: [
21485
+ isCursor ? /* @__PURE__ */ jsx29(Text25, { color: PALETTE.info, bold: true, children: figures3.pointer }) : /* @__PURE__ */ jsx29(Text25, { children: " " }),
21486
+ /* @__PURE__ */ jsx29(Text25, { color: PALETTE.warning, inverse: isCursor, children: " " + label })
21674
21487
  ] }, i);
21675
21488
  }),
21676
- /* @__PURE__ */ jsx30(Text26, { dimColor: true, children: "[\u2191/\u2193] move \xB7 [Enter] jump \xB7 [c/Esc] close" })
21489
+ /* @__PURE__ */ jsx29(Text25, { dimColor: true, children: "[\u2191/\u2193] move \xB7 [Enter] jump \xB7 [c/Esc] close" })
21677
21490
  ] }),
21678
- pendingRejectCascade && /* @__PURE__ */ jsxs26(Box25, { flexDirection: "column", borderStyle: "single", borderColor: PALETTE.warning, paddingX: 1, marginTop: 1, children: [
21679
- /* @__PURE__ */ jsx30(Text26, { bold: true, color: PALETTE.warning, children: `Rejecting ${pendingRejectCascade.target} will:` }),
21680
- pendingRejectCascade.ancestors.length > 0 && /* @__PURE__ */ jsx30(Text26, { children: `- Reject ancestors: ${pendingRejectCascade.ancestors.join(", ")}` }),
21681
- pendingRejectCascade.descendants.length > 0 && /* @__PURE__ */ jsx30(Text26, { children: `- Deselect descendants: ${pendingRejectCascade.descendants.join(", ")}` }),
21682
- /* @__PURE__ */ jsx30(Text26, { dimColor: true, children: "[y] confirm \xB7 [n]/[Esc] cancel" })
21491
+ pendingRejectCascade && /* @__PURE__ */ jsxs25(Box24, { flexDirection: "column", borderStyle: "single", borderColor: PALETTE.warning, paddingX: 1, marginTop: 1, children: [
21492
+ /* @__PURE__ */ jsx29(Text25, { bold: true, color: PALETTE.warning, children: `Rejecting ${pendingRejectCascade.target} will:` }),
21493
+ pendingRejectCascade.ancestors.length > 0 && /* @__PURE__ */ jsx29(Text25, { children: `- Reject ancestors: ${pendingRejectCascade.ancestors.join(", ")}` }),
21494
+ pendingRejectCascade.descendants.length > 0 && /* @__PURE__ */ jsx29(Text25, { children: `- Deselect descendants: ${pendingRejectCascade.descendants.join(", ")}` }),
21495
+ /* @__PURE__ */ jsx29(Text25, { dimColor: true, children: "[y] confirm \xB7 [n]/[Esc] cancel" })
21683
21496
  ] }),
21684
- /* @__PURE__ */ jsx30(
21497
+ /* @__PURE__ */ jsx29(
21685
21498
  SearchMatchSummary,
21686
21499
  {
21687
21500
  open: searchOpen,
@@ -21692,7 +21505,7 @@ function ScopeGateStepView({
21692
21505
  marginTop: 1
21693
21506
  }
21694
21507
  ),
21695
- /* @__PURE__ */ jsx30(CompactControlBar, { hasGroupRoots, searchActive: searchOpen || searchQuery.length > 0 })
21508
+ /* @__PURE__ */ jsx29(CompactControlBar, { hasGroupRoots, searchActive: searchOpen || searchQuery.length > 0 })
21696
21509
  ] });
21697
21510
  }
21698
21511
  function sideColumnLabelStyle(input) {
@@ -21746,9 +21559,9 @@ function AddedColumn(props) {
21746
21559
  const reserveAiBadge = entries.some((e) => aiFlaggedByKey?.get(e.name) === true);
21747
21560
  const firstNonCycleIdx = entries.findIndex((e) => !e.isCycle);
21748
21561
  const window = computeColumnWindow(entries.length, cursor, Math.max(1, visibleCount));
21749
- return /* @__PURE__ */ jsxs26(WindowedPanel, { width, height, title, focused, children: [
21750
- /* @__PURE__ */ jsx30(WindowIndicator, { direction: "up", count: window.above }),
21751
- entries.length === 0 ? /* @__PURE__ */ jsx30(Text26, { dimColor: true, children: "(none)" }) : entries.slice(window.start, window.end).map((entry, vi) => {
21562
+ return /* @__PURE__ */ jsxs25(WindowedPanel, { width, height, title, focused, children: [
21563
+ /* @__PURE__ */ jsx29(WindowIndicator, { direction: "up", count: window.above }),
21564
+ entries.length === 0 ? /* @__PURE__ */ jsx29(Text25, { dimColor: true, children: "(none)" }) : entries.slice(window.start, window.end).map((entry, vi) => {
21752
21565
  const i = window.start + vi;
21753
21566
  const isSelected = i === cursor;
21754
21567
  const isCursor = focused && isSelected;
@@ -21759,13 +21572,13 @@ function AddedColumn(props) {
21759
21572
  isSelected,
21760
21573
  focused
21761
21574
  });
21762
- return /* @__PURE__ */ jsxs26(React10.Fragment, { children: [
21763
- showSeparator && /* @__PURE__ */ jsx30(Text26, { dimColor: true, children: "\u2500".repeat(Math.max(0, width - 2)) }),
21764
- /* @__PURE__ */ jsxs26(Box25, { children: [
21765
- isCursor ? /* @__PURE__ */ jsx30(Text26, { color: PALETTE.info, bold: true, children: figures3.pointer }) : /* @__PURE__ */ jsx30(Text26, { children: " " }),
21766
- reserveAiBadge && (aiFlagged ? /* @__PURE__ */ jsx30(Text26, { color: PALETTE.warning, bold: true, children: " [\xD7]" }) : /* @__PURE__ */ jsx30(Text26, { children: " " })),
21767
- entry.isCycle && /* @__PURE__ */ jsx30(
21768
- Text26,
21575
+ return /* @__PURE__ */ jsxs25(React9.Fragment, { children: [
21576
+ showSeparator && /* @__PURE__ */ jsx29(Text25, { dimColor: true, children: "\u2500".repeat(Math.max(0, width - 2)) }),
21577
+ /* @__PURE__ */ jsxs25(Box24, { children: [
21578
+ isCursor ? /* @__PURE__ */ jsx29(Text25, { color: PALETTE.info, bold: true, children: figures3.pointer }) : /* @__PURE__ */ jsx29(Text25, { children: " " }),
21579
+ reserveAiBadge && (aiFlagged ? /* @__PURE__ */ jsx29(Text25, { color: PALETTE.warning, bold: true, children: " [\xD7]" }) : /* @__PURE__ */ jsx29(Text25, { children: " " })),
21580
+ entry.isCycle && /* @__PURE__ */ jsx29(
21581
+ Text25,
21769
21582
  {
21770
21583
  color: isCursor ? PALETTE.info : PALETTE.warning,
21771
21584
  bold: true,
@@ -21774,8 +21587,8 @@ function AddedColumn(props) {
21774
21587
  children: " \u26A0"
21775
21588
  }
21776
21589
  ),
21777
- /* @__PURE__ */ jsx30(
21778
- Text26,
21590
+ /* @__PURE__ */ jsx29(
21591
+ Text25,
21779
21592
  {
21780
21593
  color: style.nameColor,
21781
21594
  bold: style.nameBold,
@@ -21789,11 +21602,11 @@ function AddedColumn(props) {
21789
21602
  ] })
21790
21603
  ] }, entry.name);
21791
21604
  }),
21792
- /* @__PURE__ */ jsx30(WindowIndicator, { direction: "down", count: window.below })
21605
+ /* @__PURE__ */ jsx29(WindowIndicator, { direction: "down", count: window.below })
21793
21606
  ] });
21794
21607
  }
21795
21608
  function AddedComponentsColumn(props) {
21796
- return /* @__PURE__ */ jsx30(AddedColumn, { ...props });
21609
+ return /* @__PURE__ */ jsx29(AddedColumn, { ...props });
21797
21610
  }
21798
21611
  var HELP_SECTIONS;
21799
21612
  var init_ScopeGateStep = __esm({
@@ -22217,15 +22030,15 @@ var init_scroll_offset = __esm({
22217
22030
  });
22218
22031
 
22219
22032
  // packages/experience-design-system-cli-legacy/src/analyze/select/tui/components/FieldEditor.tsx
22220
- import React11, { useEffect as useEffect7, useLayoutEffect as useLayoutEffect2, useState as useState12 } from "react";
22033
+ import React10, { useEffect as useEffect7, useLayoutEffect as useLayoutEffect2, useState as useState11 } from "react";
22221
22034
  import figures4 from "figures";
22222
- import { Box as Box26, measureElement, Text as Text27 } from "ink";
22035
+ import { Box as Box25, measureElement, Text as Text26 } from "ink";
22223
22036
  import {
22224
22037
  CDF_PROPERTY_TYPES,
22225
22038
  CDF_PROPERTY_CATEGORIES,
22226
22039
  DESIGN_TOKEN_TYPES as DESIGN_TOKEN_TYPES2
22227
22040
  } from "@contentful/experience-design-system-types";
22228
- import { Fragment as Fragment11, jsx as jsx31, jsxs as jsxs27 } from "react/jsx-runtime";
22041
+ import { Fragment as Fragment10, jsx as jsx30, jsxs as jsxs26 } from "react/jsx-runtime";
22229
22042
  function createCommonRowProps(selected, focusLevel, editingField, textCursor, valueCursor, cursorVisible, editingValue, valueText, width) {
22230
22043
  return {
22231
22044
  selected,
@@ -22363,14 +22176,14 @@ function serializeState(state, originalJson) {
22363
22176
  return JSON.stringify(entry, null, 2);
22364
22177
  }
22365
22178
  function Picker({ value, active }) {
22366
- return /* @__PURE__ */ jsxs27(Box26, { children: [
22367
- active && /* @__PURE__ */ jsx31(Text27, { color: PALETTE.warning, children: "\u2039" }),
22368
- /* @__PURE__ */ jsx31(Text27, { color: active ? PALETTE.warning : PALETTE.inverse, bold: active, children: value }),
22369
- active && /* @__PURE__ */ jsx31(Text27, { color: PALETTE.warning, children: "\u203A" })
22179
+ return /* @__PURE__ */ jsxs26(Box25, { children: [
22180
+ active && /* @__PURE__ */ jsx30(Text26, { color: PALETTE.warning, children: "\u2039" }),
22181
+ /* @__PURE__ */ jsx30(Text26, { color: active ? PALETTE.warning : PALETTE.inverse, bold: active, children: value }),
22182
+ active && /* @__PURE__ */ jsx30(Text26, { color: PALETTE.warning, children: "\u203A" })
22370
22183
  ] });
22371
22184
  }
22372
22185
  function Toggle({ value, active }) {
22373
- return /* @__PURE__ */ jsx31(Box26, { children: /* @__PURE__ */ jsx31(Text27, { color: active ? PALETTE.warning : value ? PALETTE.success : PALETTE.border, children: value ? "[\u2713]" : "[ ]" }) });
22186
+ return /* @__PURE__ */ jsx30(Box25, { children: /* @__PURE__ */ jsx30(Text26, { color: active ? PALETTE.warning : value ? PALETTE.success : PALETTE.border, children: value ? "[\u2713]" : "[ ]" }) });
22374
22187
  }
22375
22188
  function InlinePropField({
22376
22189
  label,
@@ -22379,8 +22192,8 @@ function InlinePropField({
22379
22192
  flexible = false,
22380
22193
  width
22381
22194
  }) {
22382
- return /* @__PURE__ */ jsxs27(Box26, { width, gap: 1, flexShrink: flexible ? 1 : 0, flexGrow: flexible ? 1 : 0, flexWrap: "wrap", children: [
22383
- /* @__PURE__ */ jsxs27(Text27, { color: focused ? PALETTE.warning : void 0, bold: focused, dimColor: !focused, wrap: "truncate-end", children: [
22195
+ return /* @__PURE__ */ jsxs26(Box25, { width, gap: 1, flexShrink: flexible ? 1 : 0, flexGrow: flexible ? 1 : 0, flexWrap: "wrap", children: [
22196
+ /* @__PURE__ */ jsxs26(Text26, { color: focused ? PALETTE.warning : void 0, bold: focused, dimColor: !focused, wrap: "truncate-end", children: [
22384
22197
  focused ? "\u203A " : " ",
22385
22198
  label
22386
22199
  ] }),
@@ -22393,19 +22206,19 @@ function RequiredField({
22393
22206
  editingField,
22394
22207
  activeField
22395
22208
  }) {
22396
- return /* @__PURE__ */ jsx31(InlinePropField, { label: "req:", focused, children: /* @__PURE__ */ jsx31(Toggle, { value, active: editingField && activeField === "required" }) });
22209
+ return /* @__PURE__ */ jsx30(InlinePropField, { label: "req:", focused, children: /* @__PURE__ */ jsx30(Toggle, { value, active: editingField && activeField === "required" }) });
22397
22210
  }
22398
22211
  function DefaultValueRow({
22399
22212
  display,
22400
22213
  active,
22401
22214
  focused
22402
22215
  }) {
22403
- return /* @__PURE__ */ jsxs27(Box26, { gap: 1, flexWrap: "wrap", flexShrink: 0, children: [
22404
- /* @__PURE__ */ jsxs27(Text27, { color: focused ? PALETTE.warning : void 0, bold: focused, dimColor: !focused, children: [
22216
+ return /* @__PURE__ */ jsxs26(Box25, { gap: 1, flexWrap: "wrap", flexShrink: 0, children: [
22217
+ /* @__PURE__ */ jsxs26(Text26, { color: focused ? PALETTE.warning : void 0, bold: focused, dimColor: !focused, children: [
22405
22218
  focused ? "\u203A " : " ",
22406
22219
  "default:"
22407
22220
  ] }),
22408
- active ? /* @__PURE__ */ jsx31(Picker, { value: display, active: true }) : /* @__PURE__ */ jsx31(Text27, { color: focused ? PALETTE.inverse : PALETTE.inverse, wrap: "wrap", children: display })
22221
+ active ? /* @__PURE__ */ jsx30(Picker, { value: display, active: true }) : /* @__PURE__ */ jsx30(Text26, { color: focused ? PALETTE.inverse : PALETTE.inverse, wrap: "wrap", children: display })
22409
22222
  ] });
22410
22223
  }
22411
22224
  function RowLabel({
@@ -22413,8 +22226,8 @@ function RowLabel({
22413
22226
  selected,
22414
22227
  trailing = true
22415
22228
  }) {
22416
- return /* @__PURE__ */ jsxs27(
22417
- Text27,
22229
+ return /* @__PURE__ */ jsxs26(
22230
+ Text26,
22418
22231
  {
22419
22232
  color: selected ? PALETTE.inverse : PALETTE.info,
22420
22233
  bold: selected,
@@ -22433,10 +22246,10 @@ function ValueInputRow({
22433
22246
  valueText,
22434
22247
  cursorVisible
22435
22248
  }) {
22436
- return /* @__PURE__ */ jsxs27(Box26, { paddingLeft: 2, children: [
22437
- /* @__PURE__ */ jsx31(Text27, { color: PALETTE.info, children: mode === "edit" ? "\u270E " : "+ " }),
22438
- /* @__PURE__ */ jsx31(Text27, { children: valueText }),
22439
- /* @__PURE__ */ jsx31(Text27, { inverse: cursorVisible, children: " " })
22249
+ return /* @__PURE__ */ jsxs26(Box25, { paddingLeft: 2, children: [
22250
+ /* @__PURE__ */ jsx30(Text26, { color: PALETTE.info, children: mode === "edit" ? "\u270E " : "+ " }),
22251
+ /* @__PURE__ */ jsx30(Text26, { children: valueText }),
22252
+ /* @__PURE__ */ jsx30(Text26, { inverse: cursorVisible, children: " " })
22440
22253
  ] });
22441
22254
  }
22442
22255
  function EditableListItem({
@@ -22449,9 +22262,9 @@ function EditableListItem({
22449
22262
  }) {
22450
22263
  const isBeingEdited = editingValue?.mode === "edit" && editingValue.index === index;
22451
22264
  if (isBeingEdited) {
22452
- return /* @__PURE__ */ jsx31(ValueInputRow, { mode: "edit", valueText, cursorVisible });
22265
+ return /* @__PURE__ */ jsx30(ValueInputRow, { mode: "edit", valueText, cursorVisible });
22453
22266
  }
22454
- return /* @__PURE__ */ jsx31(Box26, { gap: 1, paddingLeft: 2, children: /* @__PURE__ */ jsx31(Text27, { color: active ? PALETTE.info : PALETTE.inverse, children: active ? `${figures4.pointer} ${value}` : ` ${value}` }) });
22267
+ return /* @__PURE__ */ jsx30(Box25, { gap: 1, paddingLeft: 2, children: /* @__PURE__ */ jsx30(Text26, { color: active ? PALETTE.info : PALETTE.inverse, children: active ? `${figures4.pointer} ${value}` : ` ${value}` }) });
22455
22268
  }
22456
22269
  function EditableValueList({
22457
22270
  values,
@@ -22464,9 +22277,9 @@ function EditableValueList({
22464
22277
  emptyPaddingLeft,
22465
22278
  showAddInput
22466
22279
  }) {
22467
- return /* @__PURE__ */ jsxs27(Fragment11, { children: [
22468
- values.length === 0 && !editingValue && (emptyPaddingLeft === void 0 ? /* @__PURE__ */ jsx31(Text27, { dimColor: true, children: emptyMessage }) : /* @__PURE__ */ jsx31(Box26, { paddingLeft: emptyPaddingLeft, children: /* @__PURE__ */ jsx31(Text27, { dimColor: true, children: emptyMessage }) })),
22469
- values.map((value, index) => /* @__PURE__ */ jsx31(
22280
+ return /* @__PURE__ */ jsxs26(Fragment10, { children: [
22281
+ values.length === 0 && !editingValue && (emptyPaddingLeft === void 0 ? /* @__PURE__ */ jsx30(Text26, { dimColor: true, children: emptyMessage }) : /* @__PURE__ */ jsx30(Box25, { paddingLeft: emptyPaddingLeft, children: /* @__PURE__ */ jsx30(Text26, { dimColor: true, children: emptyMessage }) })),
22282
+ values.map((value, index) => /* @__PURE__ */ jsx30(
22470
22283
  EditableListItem,
22471
22284
  {
22472
22285
  value,
@@ -22478,7 +22291,7 @@ function EditableValueList({
22478
22291
  },
22479
22292
  index
22480
22293
  )),
22481
- showAddInput && editingValue?.mode === "add" && /* @__PURE__ */ jsx31(ValueInputRow, { mode: "add", valueText, cursorVisible })
22294
+ showAddInput && editingValue?.mode === "add" && /* @__PURE__ */ jsx30(ValueInputRow, { mode: "add", valueText, cursorVisible })
22482
22295
  ] });
22483
22296
  }
22484
22297
  function DefaultSubRow({
@@ -22490,51 +22303,51 @@ function DefaultSubRow({
22490
22303
  }) {
22491
22304
  const cursor = cursorVisible ? "\u2588" : " ";
22492
22305
  if (prop.type === "richtext" || prop.type === "media" || prop.type === "link") {
22493
- return /* @__PURE__ */ jsxs27(Box26, { gap: 1, flexShrink: 0, children: [
22494
- /* @__PURE__ */ jsxs27(Text27, { color: focused ? PALETTE.warning : void 0, bold: focused, dimColor: !focused, children: [
22306
+ return /* @__PURE__ */ jsxs26(Box25, { gap: 1, flexShrink: 0, children: [
22307
+ /* @__PURE__ */ jsxs26(Text26, { color: focused ? PALETTE.warning : void 0, bold: focused, dimColor: !focused, children: [
22495
22308
  focused ? "\u203A " : " ",
22496
22309
  "default:"
22497
22310
  ] }),
22498
- /* @__PURE__ */ jsx31(Text27, { dimColor: !focused, children: "(not applicable)" })
22311
+ /* @__PURE__ */ jsx30(Text26, { dimColor: !focused, children: "(not applicable)" })
22499
22312
  ] });
22500
22313
  }
22501
22314
  if (prop.type === "boolean") {
22502
22315
  const display = prop.default === true ? "true" : prop.default === false ? "false" : "(unset)";
22503
- return /* @__PURE__ */ jsx31(DefaultValueRow, { display, active, focused });
22316
+ return /* @__PURE__ */ jsx30(DefaultValueRow, { display, active, focused });
22504
22317
  }
22505
22318
  if (prop.type === "enum") {
22506
22319
  if (prop.values.length === 0) {
22507
- return /* @__PURE__ */ jsxs27(Box26, { gap: 1, flexShrink: 0, children: [
22508
- /* @__PURE__ */ jsxs27(Text27, { color: focused ? PALETTE.warning : void 0, bold: focused, dimColor: !focused, children: [
22320
+ return /* @__PURE__ */ jsxs26(Box25, { gap: 1, flexShrink: 0, children: [
22321
+ /* @__PURE__ */ jsxs26(Text26, { color: focused ? PALETTE.warning : void 0, bold: focused, dimColor: !focused, children: [
22509
22322
  focused ? "\u203A " : " ",
22510
22323
  "default:"
22511
22324
  ] }),
22512
- /* @__PURE__ */ jsx31(Text27, { dimColor: !focused, children: "(no values defined)" })
22325
+ /* @__PURE__ */ jsx30(Text26, { dimColor: !focused, children: "(no values defined)" })
22513
22326
  ] });
22514
22327
  }
22515
22328
  const display = typeof prop.default === "string" && prop.default !== "" ? prop.default : "(unset)";
22516
- return /* @__PURE__ */ jsx31(DefaultValueRow, { display, active, focused });
22329
+ return /* @__PURE__ */ jsx30(DefaultValueRow, { display, active, focused });
22517
22330
  }
22518
22331
  const value = typeof prop.default === "string" ? prop.default : "";
22519
22332
  if (active) {
22520
- return /* @__PURE__ */ jsxs27(Box26, { flexDirection: "row", flexShrink: 0, children: [
22521
- /* @__PURE__ */ jsxs27(Text27, { color: focused ? PALETTE.warning : void 0, bold: focused, dimColor: !focused, children: [
22333
+ return /* @__PURE__ */ jsxs26(Box25, { flexDirection: "row", flexShrink: 0, children: [
22334
+ /* @__PURE__ */ jsxs26(Text26, { color: focused ? PALETTE.warning : void 0, bold: focused, dimColor: !focused, children: [
22522
22335
  focused ? "\u203A " : " ",
22523
22336
  "default:"
22524
22337
  ] }),
22525
- /* @__PURE__ */ jsxs27(Box26, { flexGrow: 1, borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
22526
- /* @__PURE__ */ jsx31(Text27, { children: value.slice(0, textCursor) }),
22527
- /* @__PURE__ */ jsx31(Text27, { inverse: cursorVisible, children: value[textCursor] ?? cursor }),
22528
- /* @__PURE__ */ jsx31(Text27, { children: value.slice(textCursor + 1) })
22338
+ /* @__PURE__ */ jsxs26(Box25, { flexGrow: 1, borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
22339
+ /* @__PURE__ */ jsx30(Text26, { children: value.slice(0, textCursor) }),
22340
+ /* @__PURE__ */ jsx30(Text26, { inverse: cursorVisible, children: value[textCursor] ?? cursor }),
22341
+ /* @__PURE__ */ jsx30(Text26, { children: value.slice(textCursor + 1) })
22529
22342
  ] })
22530
22343
  ] });
22531
22344
  }
22532
- return /* @__PURE__ */ jsxs27(Box26, { gap: 1, flexShrink: 0, children: [
22533
- /* @__PURE__ */ jsxs27(Text27, { color: focused ? PALETTE.warning : void 0, bold: focused, dimColor: !focused, children: [
22345
+ return /* @__PURE__ */ jsxs26(Box25, { gap: 1, flexShrink: 0, children: [
22346
+ /* @__PURE__ */ jsxs26(Text26, { color: focused ? PALETTE.warning : void 0, bold: focused, dimColor: !focused, children: [
22534
22347
  focused ? "\u203A " : " ",
22535
22348
  "default:"
22536
22349
  ] }),
22537
- /* @__PURE__ */ jsx31(Text27, { color: focused ? PALETTE.inverse : value ? PALETTE.inverse : void 0, dimColor: !value && !focused, children: value || "(none)" })
22350
+ /* @__PURE__ */ jsx30(Text26, { color: focused ? PALETTE.inverse : value ? PALETTE.inverse : void 0, dimColor: !value && !focused, children: value || "(none)" })
22538
22351
  ] });
22539
22352
  }
22540
22353
  function DescriptionField({
@@ -22549,20 +22362,20 @@ function DescriptionField({
22549
22362
  paddingLeft = 2
22550
22363
  }) {
22551
22364
  if (compact) {
22552
- return /* @__PURE__ */ jsxs27(Box26, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: [
22553
- /* @__PURE__ */ jsxs27(Text27, { color: focused ? PALETTE.warning : void 0, bold: focused, dimColor: !focused, children: [
22365
+ return /* @__PURE__ */ jsxs26(Box25, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: [
22366
+ /* @__PURE__ */ jsxs26(Text26, { color: focused ? PALETTE.warning : void 0, bold: focused, dimColor: !focused, children: [
22554
22367
  focused ? "\u203A " : " ",
22555
22368
  label
22556
22369
  ] }),
22557
- /* @__PURE__ */ jsx31(Text27, { wrap: "truncate-end", dimColor: !value, children: value || "\u2014" })
22370
+ /* @__PURE__ */ jsx30(Text26, { wrap: "truncate-end", dimColor: !value, children: value || "\u2014" })
22558
22371
  ] });
22559
22372
  }
22560
- return /* @__PURE__ */ jsxs27(Box26, { paddingLeft, flexDirection: "column", width, flexShrink: 0, children: [
22561
- /* @__PURE__ */ jsxs27(Text27, { color: focused ? PALETTE.warning : void 0, bold: focused, dimColor: !focused, children: [
22373
+ return /* @__PURE__ */ jsxs26(Box25, { paddingLeft, flexDirection: "column", width, flexShrink: 0, children: [
22374
+ /* @__PURE__ */ jsxs26(Text26, { color: focused ? PALETTE.warning : void 0, bold: focused, dimColor: !focused, children: [
22562
22375
  focused ? "\u203A " : " ",
22563
22376
  label
22564
22377
  ] }),
22565
- editing ? /* @__PURE__ */ jsx31(EditableDescription, { cursorVisible, value, textCursor }) : /* @__PURE__ */ jsx31(Text27, { wrap: "wrap", children: value || "\u2014" })
22378
+ editing ? /* @__PURE__ */ jsx30(EditableDescription, { cursorVisible, value, textCursor }) : /* @__PURE__ */ jsx30(Text26, { wrap: "wrap", children: value || "\u2014" })
22566
22379
  ] });
22567
22380
  }
22568
22381
  function EditableDescription({
@@ -22570,9 +22383,9 @@ function EditableDescription({
22570
22383
  value,
22571
22384
  textCursor
22572
22385
  }) {
22573
- return /* @__PURE__ */ jsxs27(Text27, { wrap: "wrap", children: [
22386
+ return /* @__PURE__ */ jsxs26(Text26, { wrap: "wrap", children: [
22574
22387
  value.slice(0, textCursor),
22575
- /* @__PURE__ */ jsx31(Text27, { inverse: cursorVisible, children: value[textCursor] ?? " " }),
22388
+ /* @__PURE__ */ jsx30(Text26, { inverse: cursorVisible, children: value[textCursor] ?? " " }),
22576
22389
  value.slice(textCursor + 1)
22577
22390
  ] });
22578
22391
  }
@@ -22593,9 +22406,9 @@ function PropRow({
22593
22406
  }) {
22594
22407
  const descFocused = activeField === "description";
22595
22408
  const descActive = editingField && descFocused;
22596
- return /* @__PURE__ */ jsxs27(Box26, { flexDirection: "column", width, flexShrink: 0, children: [
22597
- /* @__PURE__ */ jsx31(Box26, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: /* @__PURE__ */ jsx31(RowLabel, { name: prop.name, selected }) }),
22598
- /* @__PURE__ */ jsx31(
22409
+ return /* @__PURE__ */ jsxs26(Box25, { flexDirection: "column", width, flexShrink: 0, children: [
22410
+ /* @__PURE__ */ jsx30(Box25, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: /* @__PURE__ */ jsx30(RowLabel, { name: prop.name, selected }) }),
22411
+ /* @__PURE__ */ jsx30(
22599
22412
  DescriptionField,
22600
22413
  {
22601
22414
  value: prop.description,
@@ -22608,8 +22421,8 @@ function PropRow({
22608
22421
  paddingLeft: 0
22609
22422
  }
22610
22423
  ),
22611
- /* @__PURE__ */ jsxs27(Box26, { flexDirection: "column", width, flexShrink: 0, children: [
22612
- /* @__PURE__ */ jsx31(
22424
+ /* @__PURE__ */ jsxs26(Box25, { flexDirection: "column", width, flexShrink: 0, children: [
22425
+ /* @__PURE__ */ jsx30(
22613
22426
  RequiredField,
22614
22427
  {
22615
22428
  value: prop.required,
@@ -22618,12 +22431,12 @@ function PropRow({
22618
22431
  activeField
22619
22432
  }
22620
22433
  ),
22621
- /* @__PURE__ */ jsx31(InlinePropField, { label: "type:", focused: activeField === "type", children: editingField && activeField === "type" ? /* @__PURE__ */ jsx31(Picker, { value: prop.type, active: true }) : /* @__PURE__ */ jsx31(Text27, { color: selected ? PALETTE.inverse : PALETTE.inverse, children: prop.type }) })
22434
+ /* @__PURE__ */ jsx30(InlinePropField, { label: "type:", focused: activeField === "type", children: editingField && activeField === "type" ? /* @__PURE__ */ jsx30(Picker, { value: prop.type, active: true }) : /* @__PURE__ */ jsx30(Text26, { color: selected ? PALETTE.inverse : PALETTE.inverse, children: prop.type }) })
22622
22435
  ] }),
22623
- prop.type === "token" && /* @__PURE__ */ jsx31(InlinePropField, { label: "kind:", focused: activeField === "tokenKind", width, children: editingField && activeField === "tokenKind" ? /* @__PURE__ */ jsx31(Picker, { value: prop.tokenKind || DESIGN_TOKEN_TYPES2[0], active: true }) : /* @__PURE__ */ jsx31(Text27, { color: selected ? PALETTE.inverse : PALETTE.inverse, wrap: "wrap", children: prop.tokenKind || "\u2014" }) }),
22624
- prop.type === "enum" && /* @__PURE__ */ jsxs27(Box26, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: [
22625
- /* @__PURE__ */ jsxs27(
22626
- Text27,
22436
+ prop.type === "token" && /* @__PURE__ */ jsx30(InlinePropField, { label: "kind:", focused: activeField === "tokenKind", width, children: editingField && activeField === "tokenKind" ? /* @__PURE__ */ jsx30(Picker, { value: prop.tokenKind || DESIGN_TOKEN_TYPES2[0], active: true }) : /* @__PURE__ */ jsx30(Text26, { color: selected ? PALETTE.inverse : PALETTE.inverse, wrap: "wrap", children: prop.tokenKind || "\u2014" }) }),
22437
+ prop.type === "enum" && /* @__PURE__ */ jsxs26(Box25, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: [
22438
+ /* @__PURE__ */ jsxs26(
22439
+ Text26,
22627
22440
  {
22628
22441
  color: activeField === "values" ? PALETTE.warning : void 0,
22629
22442
  bold: activeField === "values",
@@ -22634,13 +22447,13 @@ function PropRow({
22634
22447
  ]
22635
22448
  }
22636
22449
  ),
22637
- /* @__PURE__ */ jsxs27(Text27, { color: activeField === "values" ? PALETTE.inverse : selected ? PALETTE.inverse : void 0, wrap: "wrap", children: [
22450
+ /* @__PURE__ */ jsxs26(Text26, { color: activeField === "values" ? PALETTE.inverse : selected ? PALETTE.inverse : void 0, wrap: "wrap", children: [
22638
22451
  "[",
22639
22452
  prop.values.join(", "),
22640
22453
  "]"
22641
22454
  ] })
22642
22455
  ] }),
22643
- /* @__PURE__ */ jsx31(
22456
+ /* @__PURE__ */ jsx30(
22644
22457
  DefaultSubRow,
22645
22458
  {
22646
22459
  prop,
@@ -22650,9 +22463,9 @@ function PropRow({
22650
22463
  cursorVisible
22651
22464
  }
22652
22465
  ),
22653
- prop.type === "token" && prop.category === "design" && /* @__PURE__ */ jsxs27(Box26, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: [
22654
- /* @__PURE__ */ jsxs27(
22655
- Text27,
22466
+ prop.type === "token" && prop.category === "design" && /* @__PURE__ */ jsxs26(Box25, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: [
22467
+ /* @__PURE__ */ jsxs26(
22468
+ Text26,
22656
22469
  {
22657
22470
  color: activeField === "allowed" ? PALETTE.warning : void 0,
22658
22471
  bold: activeField === "allowed",
@@ -22663,8 +22476,8 @@ function PropRow({
22663
22476
  ]
22664
22477
  }
22665
22478
  ),
22666
- editingField && activeField === "allowed" ? /* @__PURE__ */ jsx31(Box26, { width: Math.max(1, width - 4), borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: /* @__PURE__ */ jsx31(Text27, { dimColor: true, children: "press [t] to edit allowed tokens" }) }) : /* @__PURE__ */ jsx31(
22667
- Text27,
22479
+ editingField && activeField === "allowed" ? /* @__PURE__ */ jsx30(Box25, { width: Math.max(1, width - 4), borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: /* @__PURE__ */ jsx30(Text26, { dimColor: true, children: "press [t] to edit allowed tokens" }) }) : /* @__PURE__ */ jsx30(
22480
+ Text26,
22668
22481
  {
22669
22482
  color: activeField === "allowed" ? PALETTE.inverse : void 0,
22670
22483
  dimColor: prop.allowed.length === 0 && activeField !== "allowed",
@@ -22673,17 +22486,17 @@ function PropRow({
22673
22486
  }
22674
22487
  )
22675
22488
  ] }),
22676
- selected && showRationale && rationale && rationale.trim().length > 0 && /* @__PURE__ */ jsx31(Box26, { paddingLeft: 2, children: /* @__PURE__ */ jsx31(Text27, { dimColor: true, children: (() => {
22489
+ selected && showRationale && rationale && rationale.trim().length > 0 && /* @__PURE__ */ jsx30(Box25, { paddingLeft: 2, children: /* @__PURE__ */ jsx30(Text26, { dimColor: true, children: (() => {
22677
22490
  const max = Math.max(8, width - 8);
22678
22491
  const text = `~ ${rationale}`;
22679
22492
  return text.length > max ? text.slice(0, max - 1) + "\u2026" : text;
22680
22493
  })() }) }, rowKey ? `rationale-${rowKey}` : void 0),
22681
- selected && prop.type === "enum" && activeField === "values" && /* @__PURE__ */ jsxs27(Box26, { paddingLeft: 2, flexDirection: "column", children: [
22682
- /* @__PURE__ */ jsxs27(Box26, { children: [
22683
- /* @__PURE__ */ jsx31(Text27, { dimColor: true, children: "values:" }),
22684
- activeField === "values" && /* @__PURE__ */ jsx31(Text27, { dimColor: true, children: " [a]dd [e]dit [r]emove [\u2191\u2193] navigate [K/J] reorder" })
22494
+ selected && prop.type === "enum" && activeField === "values" && /* @__PURE__ */ jsxs26(Box25, { paddingLeft: 2, flexDirection: "column", children: [
22495
+ /* @__PURE__ */ jsxs26(Box25, { children: [
22496
+ /* @__PURE__ */ jsx30(Text26, { dimColor: true, children: "values:" }),
22497
+ activeField === "values" && /* @__PURE__ */ jsx30(Text26, { dimColor: true, children: " [a]dd [e]dit [r]emove [\u2191\u2193] navigate [K/J] reorder" })
22685
22498
  ] }),
22686
- /* @__PURE__ */ jsx31(
22499
+ /* @__PURE__ */ jsx30(
22687
22500
  EditableValueList,
22688
22501
  {
22689
22502
  values: prop.values,
@@ -22713,9 +22526,9 @@ function SlotRow({
22713
22526
  pickerCandidates,
22714
22527
  pickerCursor
22715
22528
  }) {
22716
- return /* @__PURE__ */ jsxs27(Box26, { flexDirection: "column", width, flexShrink: 0, children: [
22717
- /* @__PURE__ */ jsx31(Box26, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: /* @__PURE__ */ jsx31(RowLabel, { name: slot.name, selected, trailing: false }) }),
22718
- /* @__PURE__ */ jsx31(
22529
+ return /* @__PURE__ */ jsxs26(Box25, { flexDirection: "column", width, flexShrink: 0, children: [
22530
+ /* @__PURE__ */ jsx30(Box25, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: /* @__PURE__ */ jsx30(RowLabel, { name: slot.name, selected, trailing: false }) }),
22531
+ /* @__PURE__ */ jsx30(
22719
22532
  DescriptionField,
22720
22533
  {
22721
22534
  value: slot.description,
@@ -22728,7 +22541,7 @@ function SlotRow({
22728
22541
  paddingLeft: 0
22729
22542
  }
22730
22543
  ),
22731
- /* @__PURE__ */ jsx31(Box26, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: /* @__PURE__ */ jsx31(
22544
+ /* @__PURE__ */ jsx30(Box25, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: /* @__PURE__ */ jsx30(
22732
22545
  RequiredField,
22733
22546
  {
22734
22547
  value: slot.required,
@@ -22737,9 +22550,9 @@ function SlotRow({
22737
22550
  activeField
22738
22551
  }
22739
22552
  ) }),
22740
- !(selected && editingField && activeField === "allowedComponents") && /* @__PURE__ */ jsxs27(Box26, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: [
22741
- /* @__PURE__ */ jsxs27(
22742
- Text27,
22553
+ !(selected && editingField && activeField === "allowedComponents") && /* @__PURE__ */ jsxs26(Box25, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: [
22554
+ /* @__PURE__ */ jsxs26(
22555
+ Text26,
22743
22556
  {
22744
22557
  color: activeField === "allowedComponents" ? PALETTE.warning : void 0,
22745
22558
  bold: activeField === "allowedComponents",
@@ -22750,12 +22563,12 @@ function SlotRow({
22750
22563
  ]
22751
22564
  }
22752
22565
  ),
22753
- slot.allowedComponents.length === 0 ? /* @__PURE__ */ jsx31(Text27, { dimColor: true, children: "(any)" }) : /* @__PURE__ */ jsx31(Text27, { wrap: "wrap", children: slot.allowedComponents.join(", ") })
22566
+ slot.allowedComponents.length === 0 ? /* @__PURE__ */ jsx30(Text26, { dimColor: true, children: "(any)" }) : /* @__PURE__ */ jsx30(Text26, { wrap: "wrap", children: slot.allowedComponents.join(", ") })
22754
22567
  ] }),
22755
- selected && editingField && activeField === "allowedComponents" && /* @__PURE__ */ jsxs27(Box26, { flexDirection: "column", children: [
22756
- /* @__PURE__ */ jsxs27(Box26, { children: [
22757
- /* @__PURE__ */ jsxs27(
22758
- Text27,
22568
+ selected && editingField && activeField === "allowedComponents" && /* @__PURE__ */ jsxs26(Box25, { flexDirection: "column", children: [
22569
+ /* @__PURE__ */ jsxs26(Box25, { children: [
22570
+ /* @__PURE__ */ jsxs26(
22571
+ Text26,
22759
22572
  {
22760
22573
  color: activeField === "allowedComponents" ? PALETTE.warning : void 0,
22761
22574
  bold: activeField === "allowedComponents",
@@ -22766,9 +22579,9 @@ function SlotRow({
22766
22579
  ]
22767
22580
  }
22768
22581
  ),
22769
- editingField && activeField === "allowedComponents" && /* @__PURE__ */ jsx31(Text27, { 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" })
22582
+ editingField && activeField === "allowedComponents" && /* @__PURE__ */ jsx30(Text26, { 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" })
22770
22583
  ] }),
22771
- /* @__PURE__ */ jsx31(
22584
+ /* @__PURE__ */ jsx30(
22772
22585
  EditableValueList,
22773
22586
  {
22774
22587
  values: slot.allowedComponents,
@@ -22782,21 +22595,21 @@ function SlotRow({
22782
22595
  showAddInput: editingField && activeField === "allowedComponents"
22783
22596
  }
22784
22597
  ),
22785
- editingField && editingValue?.mode === "add" && activeField === "allowedComponents" && pickerCandidates !== null && /* @__PURE__ */ jsx31(Box26, { paddingLeft: 2, flexDirection: "column", children: pickerCandidates.length === 0 ? /* @__PURE__ */ jsx31(Text27, { dimColor: true, children: "(no valid components to add \u2014 all remaining candidates would create cycles)" }) : (() => {
22598
+ editingField && editingValue?.mode === "add" && activeField === "allowedComponents" && pickerCandidates !== null && /* @__PURE__ */ jsx30(Box25, { paddingLeft: 2, flexDirection: "column", children: pickerCandidates.length === 0 ? /* @__PURE__ */ jsx30(Text26, { dimColor: true, children: "(no valid components to add \u2014 all remaining candidates would create cycles)" }) : (() => {
22786
22599
  const filtered = valueText.length === 0 ? pickerCandidates : pickerCandidates.filter((n) => n.toLowerCase().includes(valueText.toLowerCase()));
22787
22600
  if (filtered.length === 0) {
22788
- return /* @__PURE__ */ jsx31(Text27, { dimColor: true, children: "(no candidates match \u2014 Enter to add as free text)" });
22601
+ return /* @__PURE__ */ jsx30(Text26, { dimColor: true, children: "(no candidates match \u2014 Enter to add as free text)" });
22789
22602
  }
22790
22603
  const cursor = pickerCursor % filtered.length;
22791
22604
  const MAX_VISIBLE = 5;
22792
22605
  const start = Math.max(0, Math.min(filtered.length - MAX_VISIBLE, cursor - 2));
22793
22606
  const slice = filtered.slice(start, start + MAX_VISIBLE);
22794
- return /* @__PURE__ */ jsxs27(Box26, { flexDirection: "column", children: [
22795
- /* @__PURE__ */ jsx31(Text27, { dimColor: true, children: " candidates (\u2191\u2193 cycle, Enter to add):" }),
22607
+ return /* @__PURE__ */ jsxs26(Box25, { flexDirection: "column", children: [
22608
+ /* @__PURE__ */ jsx30(Text26, { dimColor: true, children: " candidates (\u2191\u2193 cycle, Enter to add):" }),
22796
22609
  slice.map((name, i) => {
22797
22610
  const absIdx = start + i;
22798
22611
  const isCursor = absIdx === cursor;
22799
- return /* @__PURE__ */ jsx31(Text27, { color: isCursor ? PALETTE.info : void 0, dimColor: !isCursor, children: isCursor ? ` ${figures4.pointer} ${name}` : ` ${name}` }, name);
22612
+ return /* @__PURE__ */ jsx30(Text26, { color: isCursor ? PALETTE.info : void 0, dimColor: !isCursor, children: isCursor ? ` ${figures4.pointer} ${name}` : ` ${name}` }, name);
22800
22613
  })
22801
22614
  ] });
22802
22615
  })() })
@@ -22918,12 +22731,12 @@ function FieldEditor({
22918
22731
  headerHeight = 2
22919
22732
  }) {
22920
22733
  const { state: initialState, error: parseError } = parseToState(value);
22921
- const [editorState, setEditorState] = useState12(initialState);
22922
- const [parseErr] = useState12(parseError);
22923
- const [listScrollStart, setListScrollStart] = useState12(0);
22924
- const initialFocusScrollApplied = React11.useRef(false);
22925
- const [rowHeights, setRowHeights] = useState12({});
22926
- const rowMeasureRefs = React11.useRef(/* @__PURE__ */ new Map());
22734
+ const [editorState, setEditorState] = useState11(initialState);
22735
+ const [parseErr] = useState11(parseError);
22736
+ const [listScrollStart, setListScrollStart] = useState11(0);
22737
+ const initialFocusScrollApplied = React10.useRef(false);
22738
+ const [rowHeights, setRowHeights] = useState11({});
22739
+ const rowMeasureRefs = React10.useRef(/* @__PURE__ */ new Map());
22927
22740
  const initialFocus = (() => {
22928
22741
  if (initialFocusTarget?.kind === "description") {
22929
22742
  return {
@@ -22990,43 +22803,43 @@ function FieldEditor({
22990
22803
  textCursor: 0
22991
22804
  };
22992
22805
  })();
22993
- const [focusLevel, setFocusLevel] = useState12(initialFocus.focusLevel);
22994
- const [propIdx, setPropIdx] = useState12(initialFocus.propIdx);
22995
- const [slotIdx, setSlotIdx] = useState12(initialFocus.slotIdx);
22996
- const [inSlots, setInSlots] = useState12(initialFocus.inSlots);
22997
- const [inComponentDesc, setInComponentDesc] = useState12(initialFocus.focusLevel === "componentDescription");
22998
- const [activeField, setActiveField] = useState12(initialFocus.activeField);
22999
- const [editingField, setEditingField] = useState12(false);
23000
- const [textCursor, setTextCursor] = useState12(initialFocus.textCursor);
23001
- const [valueCursor, setValueCursor] = useState12(0);
23002
- const [editingValue, setEditingValue] = useState12(null);
23003
- const [valueText, setValueText] = useState12("");
23004
- const [pickerCursor, setPickerCursor] = useState12(0);
23005
- const [validationError, setValidationError] = useState12(null);
23006
- const [cursorVisible] = useState12(true);
23007
- const [sourceOpen, setSourceOpen] = useState12(false);
23008
- const [rationaleOpen, setRationaleOpen] = useState12(false);
23009
- const [rationaleScrollOffset, setRationaleScrollOffset] = useState12(0);
23010
- const [showHelp, setShowHelp] = useState12(false);
22806
+ const [focusLevel, setFocusLevel] = useState11(initialFocus.focusLevel);
22807
+ const [propIdx, setPropIdx] = useState11(initialFocus.propIdx);
22808
+ const [slotIdx, setSlotIdx] = useState11(initialFocus.slotIdx);
22809
+ const [inSlots, setInSlots] = useState11(initialFocus.inSlots);
22810
+ const [inComponentDesc, setInComponentDesc] = useState11(initialFocus.focusLevel === "componentDescription");
22811
+ const [activeField, setActiveField] = useState11(initialFocus.activeField);
22812
+ const [editingField, setEditingField] = useState11(false);
22813
+ const [textCursor, setTextCursor] = useState11(initialFocus.textCursor);
22814
+ const [valueCursor, setValueCursor] = useState11(0);
22815
+ const [editingValue, setEditingValue] = useState11(null);
22816
+ const [valueText, setValueText] = useState11("");
22817
+ const [pickerCursor, setPickerCursor] = useState11(0);
22818
+ const [validationError, setValidationError] = useState11(null);
22819
+ const [cursorVisible] = useState11(true);
22820
+ const [sourceOpen, setSourceOpen] = useState11(false);
22821
+ const [rationaleOpen, setRationaleOpen] = useState11(false);
22822
+ const [rationaleScrollOffset, setRationaleScrollOffset] = useState11(0);
22823
+ const [showHelp, setShowHelp] = useState11(false);
23011
22824
  const props = editorState.props;
23012
22825
  const slots = editorState.slots;
23013
- const contentPropIndexes = React11.useMemo(
22826
+ const contentPropIndexes = React10.useMemo(
23014
22827
  () => props.flatMap((prop, index) => prop.category === "content" ? [index] : []),
23015
22828
  [props]
23016
22829
  );
23017
- const designPropIndexes = React11.useMemo(
22830
+ const designPropIndexes = React10.useMemo(
23018
22831
  () => props.flatMap((prop, index) => prop.category === "design" ? [index] : []),
23019
22832
  [props]
23020
22833
  );
23021
- const hiddenPropIndexes = React11.useMemo(
22834
+ const hiddenPropIndexes = React10.useMemo(
23022
22835
  () => showHiddenProps ? props.flatMap((prop, index) => prop.category === "state" || prop.category === "unattached" ? [index] : []) : [],
23023
22836
  [props, showHiddenProps]
23024
22837
  );
23025
- const visiblePropIndexes = React11.useMemo(
22838
+ const visiblePropIndexes = React10.useMemo(
23026
22839
  () => [...contentPropIndexes, ...designPropIndexes, ...hiddenPropIndexes],
23027
22840
  [contentPropIndexes, designPropIndexes, hiddenPropIndexes]
23028
22841
  );
23029
- const propGroups = React11.useMemo(
22842
+ const propGroups = React10.useMemo(
23030
22843
  () => [
23031
22844
  {
23032
22845
  kind: "content",
@@ -23046,7 +22859,7 @@ function FieldEditor({
23046
22859
  ],
23047
22860
  [contentPropIndexes, designPropIndexes, hiddenPropIndexes]
23048
22861
  );
23049
- const selectableRows = React11.useMemo(
22862
+ const selectableRows = React10.useMemo(
23050
22863
  () => [
23051
22864
  ...contentPropIndexes.map((idx) => ({ kind: "prop", idx })),
23052
22865
  ...designPropIndexes.map((idx) => ({ kind: "prop", idx })),
@@ -23056,7 +22869,7 @@ function FieldEditor({
23056
22869
  [contentPropIndexes, designPropIndexes, hiddenPropIndexes, slots]
23057
22870
  );
23058
22871
  const visiblePropPosition = visiblePropIndexes.indexOf(propIdx);
23059
- const selectedSelectableIndex = React11.useMemo(
22872
+ const selectedSelectableIndex = React10.useMemo(
23060
22873
  () => selectableRows.findIndex(
23061
22874
  (row) => inSlots ? row.kind === "slot" && row.idx === slotIdx : row.kind === "prop" && row.idx === propIdx
23062
22875
  ),
@@ -23075,12 +22888,12 @@ function FieldEditor({
23075
22888
  }
23076
22889
  };
23077
22890
  const textEntryActive = focusLevel === "field" && editingField && activeField === "description" || focusLevel === "field" && editingField && activeField === "default" && (editorState.props[propIdx]?.type === "string" || editorState.props[propIdx]?.type === "token") || editingValue != null;
23078
- React11.useEffect(() => {
22891
+ React10.useEffect(() => {
23079
22892
  onTextEntryActiveChange?.(textEntryActive);
23080
22893
  }, [textEntryActive, onTextEntryActiveChange]);
23081
22894
  const currentProp = props[propIdx] ?? null;
23082
22895
  const currentSlot = slots[slotIdx] ?? null;
23083
- React11.useEffect(() => {
22896
+ React10.useEffect(() => {
23084
22897
  if (showHiddenProps || inSlots || inComponentDesc || visiblePropPosition >= 0) return;
23085
22898
  if (visiblePropIndexes.length > 0) {
23086
22899
  setPropIdx(visiblePropIndexes[0]);
@@ -23099,22 +22912,22 @@ function FieldEditor({
23099
22912
  setEditorState(next);
23100
22913
  onChange(serializeState(next, value));
23101
22914
  };
23102
- const canonicalize = React11.useCallback((json) => {
22915
+ const canonicalize = React10.useCallback((json) => {
23103
22916
  try {
23104
22917
  return JSON.stringify(JSON.parse(json));
23105
22918
  } catch {
23106
22919
  return `__unparseable__:${json}`;
23107
22920
  }
23108
22921
  }, []);
23109
- const initialStateRef = React11.useRef(initialState);
22922
+ const initialStateRef = React10.useRef(initialState);
23110
22923
  const baselineCanonical = canonicalize(serializeState(initialStateRef.current, value));
23111
22924
  const currentCanonical = canonicalize(serializeState(editorState, value));
23112
22925
  const isDirty = currentCanonical !== baselineCanonical;
23113
- React11.useEffect(() => {
22926
+ React10.useEffect(() => {
23114
22927
  onDirtyChange?.(isDirty);
23115
22928
  }, [isDirty, onDirtyChange]);
23116
- const lastDiscardTriggerRef = React11.useRef(discardTrigger);
23117
- React11.useEffect(() => {
22929
+ const lastDiscardTriggerRef = React10.useRef(discardTrigger);
22930
+ React10.useEffect(() => {
23118
22931
  if (discardTrigger === void 0) return;
23119
22932
  if (discardTrigger === lastDiscardTriggerRef.current) return;
23120
22933
  lastDiscardTriggerRef.current = discardTrigger;
@@ -23624,18 +23437,18 @@ function FieldEditor({
23624
23437
  });
23625
23438
  const innerWidth = Math.max(1, width - 2);
23626
23439
  if (parseErr) {
23627
- return /* @__PURE__ */ jsxs27(Box26, { flexDirection: "column", width, borderStyle: "single", borderColor: PALETTE.error, children: [
23628
- /* @__PURE__ */ jsx31(Text27, { bold: true, color: PALETTE.error, children: "FIELD EDITOR \u2014 parse error" }),
23629
- /* @__PURE__ */ jsx31(Text27, { color: PALETTE.error, children: parseErr }),
23630
- /* @__PURE__ */ jsx31(Text27, { dimColor: true, children: "Cannot display structured editor. Fix the JSON first." })
23440
+ return /* @__PURE__ */ jsxs26(Box25, { flexDirection: "column", width, borderStyle: "single", borderColor: PALETTE.error, children: [
23441
+ /* @__PURE__ */ jsx30(Text26, { bold: true, color: PALETTE.error, children: "FIELD EDITOR \u2014 parse error" }),
23442
+ /* @__PURE__ */ jsx30(Text26, { color: PALETTE.error, children: parseErr }),
23443
+ /* @__PURE__ */ jsx30(Text26, { dimColor: true, children: "Cannot display structured editor. Fix the JSON first." })
23631
23444
  ] });
23632
23445
  }
23633
23446
  if (props.length === 0 && slots.length === 0) {
23634
- return /* @__PURE__ */ jsxs27(Box26, { flexDirection: "column", width, borderStyle: "single", borderColor: PALETTE.warning, children: [
23635
- /* @__PURE__ */ jsx31(Text27, { bold: true, color: PALETTE.warning, children: "FIELD EDITOR \u2014 no fields" }),
23636
- /* @__PURE__ */ jsx31(Text27, { color: PALETTE.warning, children: "\u26A0 No properties classified for this component. The LLM didn't find anything to classify." }),
23637
- /* @__PURE__ */ jsx31(Text27, { dimColor: true, children: "You can add fields manually below or reject this component." }),
23638
- /* @__PURE__ */ jsx31(Text27, { dimColor: true, children: "Enter to save \xB7 Esc to discard" })
23447
+ return /* @__PURE__ */ jsxs26(Box25, { flexDirection: "column", width, borderStyle: "single", borderColor: PALETTE.warning, children: [
23448
+ /* @__PURE__ */ jsx30(Text26, { bold: true, color: PALETTE.warning, children: "FIELD EDITOR \u2014 no fields" }),
23449
+ /* @__PURE__ */ jsx30(Text26, { color: PALETTE.warning, children: "\u26A0 No properties classified for this component. The LLM didn't find anything to classify." }),
23450
+ /* @__PURE__ */ jsx30(Text26, { dimColor: true, children: "You can add fields manually below or reject this component." }),
23451
+ /* @__PURE__ */ jsx30(Text26, { dimColor: true, children: "Enter to save \xB7 Esc to discard" })
23639
23452
  ] });
23640
23453
  }
23641
23454
  const hasEmptyProperties = props.length === 0 && slots.length === 0;
@@ -23764,12 +23577,12 @@ function FieldEditor({
23764
23577
  const renderRow = (row, index) => {
23765
23578
  const key = rowKey(row, index);
23766
23579
  if (row.kind === "header") {
23767
- return /* @__PURE__ */ jsx31(Box26, { flexDirection: "column", paddingTop: 1, children: /* @__PURE__ */ jsx31(Text27, { bold: true, color: PALETTE.success, children: row.label }) }, key);
23580
+ return /* @__PURE__ */ jsx30(Box25, { flexDirection: "column", paddingTop: 1, children: /* @__PURE__ */ jsx30(Text26, { bold: true, color: PALETTE.success, children: row.label }) }, key);
23768
23581
  }
23769
23582
  if (row.kind === "component-description") {
23770
23583
  const isSelected2 = inComponentDesc && active;
23771
23584
  const isEditing = isSelected2 && focusLevel === "field" && editingField && activeField === "description";
23772
- return /* @__PURE__ */ jsx31(
23585
+ return /* @__PURE__ */ jsx30(
23773
23586
  DescriptionField,
23774
23587
  {
23775
23588
  value: editorState.componentDescription,
@@ -23800,7 +23613,7 @@ function FieldEditor({
23800
23613
  valueText,
23801
23614
  innerWidth
23802
23615
  );
23803
- return /* @__PURE__ */ jsx31(
23616
+ return /* @__PURE__ */ jsx30(
23804
23617
  PropRow,
23805
23618
  {
23806
23619
  prop: p,
@@ -23827,7 +23640,7 @@ function FieldEditor({
23827
23640
  valueText,
23828
23641
  innerWidth
23829
23642
  );
23830
- return /* @__PURE__ */ jsx31(
23643
+ return /* @__PURE__ */ jsx30(
23831
23644
  SlotRow,
23832
23645
  {
23833
23646
  slot: s,
@@ -23839,7 +23652,7 @@ function FieldEditor({
23839
23652
  key
23840
23653
  );
23841
23654
  };
23842
- return /* @__PURE__ */ jsxs27(
23655
+ return /* @__PURE__ */ jsxs26(
23843
23656
  FixedPanel,
23844
23657
  {
23845
23658
  width,
@@ -23848,9 +23661,9 @@ function FieldEditor({
23848
23661
  borderStyle: "single",
23849
23662
  borderColor: hasEmptyProperties ? PALETTE.warning : active ? PALETTE.info : PALETTE.border,
23850
23663
  children: [
23851
- hasEmptyProperties && /* @__PURE__ */ jsx31(Text27, { 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." }),
23664
+ hasEmptyProperties && /* @__PURE__ */ jsx30(Text26, { 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." }),
23852
23665
  header,
23853
- /* @__PURE__ */ jsx31(Box26, { flexDirection: "column", width: innerWidth, flexShrink: 0, children: focusLevel === "field" && !inComponentDesc && currentProp ? /* @__PURE__ */ jsx31(
23666
+ /* @__PURE__ */ jsx30(Box25, { flexDirection: "column", width: innerWidth, flexShrink: 0, children: focusLevel === "field" && !inComponentDesc && currentProp ? /* @__PURE__ */ jsx30(
23854
23667
  PropRow,
23855
23668
  {
23856
23669
  prop: currentProp,
@@ -23866,7 +23679,7 @@ function FieldEditor({
23866
23679
  rationale: metadata?.props?.[currentProp.name]?.rationale ?? null,
23867
23680
  showRationale: showInlineRationales
23868
23681
  }
23869
- ) : focusLevel === "field" && inSlots && currentSlot ? /* @__PURE__ */ jsx31(
23682
+ ) : focusLevel === "field" && inSlots && currentSlot ? /* @__PURE__ */ jsx30(
23870
23683
  SlotRow,
23871
23684
  {
23872
23685
  slot: currentSlot,
@@ -23885,8 +23698,8 @@ function FieldEditor({
23885
23698
  ) : visibleRowSlice.map((row, index) => {
23886
23699
  const absoluteIndex = scrollStart + index;
23887
23700
  const key = rowKey(row, absoluteIndex);
23888
- return /* @__PURE__ */ jsx31(
23889
- Box26,
23701
+ return /* @__PURE__ */ jsx30(
23702
+ Box25,
23890
23703
  {
23891
23704
  ref: (node) => {
23892
23705
  if (node) rowMeasureRefs.current.set(key, node);
@@ -23899,7 +23712,7 @@ function FieldEditor({
23899
23712
  `visible-${key}`
23900
23713
  );
23901
23714
  }) }),
23902
- categoryBelow && /* @__PURE__ */ jsx31(Text27, { color: PALETTE.success, bold: true, children: `(${categoryBelow} below)` }),
23715
+ categoryBelow && /* @__PURE__ */ jsx30(Text26, { color: PALETTE.success, bold: true, children: `(${categoryBelow} below)` }),
23903
23716
  sourceOpen && !onToggleSourceExternal && (() => {
23904
23717
  const propMeta = !inSlots && !inComponentDesc && currentProp ? metadata?.props?.[currentProp.name] : void 0;
23905
23718
  const start = propMeta?.sourceStartLine ?? null;
@@ -23908,49 +23721,49 @@ function FieldEditor({
23908
23721
  const src = metadata?.componentSource ?? null;
23909
23722
  const headerPath = path ?? "<unknown source path>";
23910
23723
  if (!start || !end2 || !src) {
23911
- return /* @__PURE__ */ jsxs27(Box26, { flexDirection: "column", borderStyle: "single", borderColor: "gray", paddingX: 1, children: [
23912
- /* @__PURE__ */ jsx31(Text27, { dimColor: true, bold: true, children: `source: ${headerPath}` }),
23913
- /* @__PURE__ */ jsx31(Text27, { dimColor: true, children: "(no source location captured for this prop)" }),
23914
- /* @__PURE__ */ jsx31(Text27, { dimColor: true, children: "[s] close" })
23724
+ return /* @__PURE__ */ jsxs26(Box25, { flexDirection: "column", borderStyle: "single", borderColor: "gray", paddingX: 1, children: [
23725
+ /* @__PURE__ */ jsx30(Text26, { dimColor: true, bold: true, children: `source: ${headerPath}` }),
23726
+ /* @__PURE__ */ jsx30(Text26, { dimColor: true, children: "(no source location captured for this prop)" }),
23727
+ /* @__PURE__ */ jsx30(Text26, { dimColor: true, children: "[s] close" })
23915
23728
  ] });
23916
23729
  }
23917
23730
  const lines = src.split("\n").slice(Math.max(0, start - 1), end2);
23918
- return /* @__PURE__ */ jsxs27(Box26, { flexDirection: "column", borderStyle: "single", borderColor: "gray", paddingX: 1, children: [
23919
- /* @__PURE__ */ jsx31(Text27, { dimColor: true, bold: true, children: `${headerPath}: lines ${start}\u2013${end2}` }),
23920
- lines.map((ln, i) => /* @__PURE__ */ jsx31(Text27, { dimColor: true, children: ln }, `source-line-${i}`)),
23921
- /* @__PURE__ */ jsx31(Text27, { dimColor: true, children: "[s] close \xB7 [Esc] close" })
23731
+ return /* @__PURE__ */ jsxs26(Box25, { flexDirection: "column", borderStyle: "single", borderColor: "gray", paddingX: 1, children: [
23732
+ /* @__PURE__ */ jsx30(Text26, { dimColor: true, bold: true, children: `${headerPath}: lines ${start}\u2013${end2}` }),
23733
+ lines.map((ln, i) => /* @__PURE__ */ jsx30(Text26, { dimColor: true, children: ln }, `source-line-${i}`)),
23734
+ /* @__PURE__ */ jsx30(Text26, { dimColor: true, children: "[s] close \xB7 [Esc] close" })
23922
23735
  ] });
23923
23736
  })(),
23924
- showHelp && /* @__PURE__ */ jsxs27(Box26, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.info, paddingX: 1, children: [
23925
- /* @__PURE__ */ jsx31(Text27, { bold: true, color: PALETTE.info, children: "Keybindings" }),
23926
- /* @__PURE__ */ jsx31(Text27, { children: " " }),
23927
- /* @__PURE__ */ jsx31(Text27, { bold: true, children: "Row navigation" }),
23928
- /* @__PURE__ */ jsx31(Text27, { children: " \u2191/\u2193 move between rows" }),
23929
- /* @__PURE__ */ jsx31(Text27, { children: " Enter edit fields on the current row" }),
23930
- /* @__PURE__ */ jsx31(Text27, { children: " Esc exit the panel" }),
23931
- /* @__PURE__ */ jsx31(Text27, { children: " " }),
23932
- /* @__PURE__ */ jsx31(Text27, { bold: true, children: "Field editing" }),
23933
- /* @__PURE__ */ jsx31(Text27, { children: " \u2191/\u2193/\u2190\u2192 cycle through fields" }),
23934
- /* @__PURE__ */ jsx31(Text27, { children: " \u2190/\u2192 cycle picker values \xB7 move cursor in text inputs" }),
23935
- /* @__PURE__ */ jsx31(Text27, { children: " Space/Enter toggle required" }),
23936
- /* @__PURE__ */ jsx31(Text27, { children: " Type edit description / string default" }),
23937
- /* @__PURE__ */ jsx31(Text27, { children: " Esc exit field-edit back to the row" }),
23938
- /* @__PURE__ */ jsx31(Text27, { children: " " }),
23939
- /* @__PURE__ */ jsx31(Text27, { bold: true, children: "Values / allowedComponents" }),
23940
- /* @__PURE__ */ jsx31(Text27, { children: " a / e / r add \xB7 edit \xB7 remove" }),
23941
- /* @__PURE__ */ jsx31(Text27, { children: " \u2191\u2193 navigate the list" }),
23942
- /* @__PURE__ */ jsx31(Text27, { children: " K / J reorder up \xB7 down" }),
23943
- /* @__PURE__ */ jsx31(Text27, { children: " " }),
23944
- /* @__PURE__ */ jsx31(Text27, { bold: true, children: "Panels" }),
23945
- /* @__PURE__ */ jsx31(Text27, { children: " s toggle source-view for the current prop" }),
23946
- /* @__PURE__ */ jsx31(Text27, { children: " " + propRationaleKey.padEnd(16) + " toggle prop rationale panel" }),
23947
- /* @__PURE__ */ jsx31(Text27, { children: " " + componentRationaleKey.padEnd(16) + " toggle component rationale panel" }),
23948
- /* @__PURE__ */ jsx31(Text27, { children: " ? toggle this overlay" }),
23949
- /* @__PURE__ */ jsx31(Text27, { children: " " }),
23950
- /* @__PURE__ */ jsx31(Text27, { dimColor: true, children: "press ? or Esc to close" })
23737
+ showHelp && /* @__PURE__ */ jsxs26(Box25, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.info, paddingX: 1, children: [
23738
+ /* @__PURE__ */ jsx30(Text26, { bold: true, color: PALETTE.info, children: "Keybindings" }),
23739
+ /* @__PURE__ */ jsx30(Text26, { children: " " }),
23740
+ /* @__PURE__ */ jsx30(Text26, { bold: true, children: "Row navigation" }),
23741
+ /* @__PURE__ */ jsx30(Text26, { children: " \u2191/\u2193 move between rows" }),
23742
+ /* @__PURE__ */ jsx30(Text26, { children: " Enter edit fields on the current row" }),
23743
+ /* @__PURE__ */ jsx30(Text26, { children: " Esc exit the panel" }),
23744
+ /* @__PURE__ */ jsx30(Text26, { children: " " }),
23745
+ /* @__PURE__ */ jsx30(Text26, { bold: true, children: "Field editing" }),
23746
+ /* @__PURE__ */ jsx30(Text26, { children: " \u2191/\u2193/\u2190\u2192 cycle through fields" }),
23747
+ /* @__PURE__ */ jsx30(Text26, { children: " \u2190/\u2192 cycle picker values \xB7 move cursor in text inputs" }),
23748
+ /* @__PURE__ */ jsx30(Text26, { children: " Space/Enter toggle required" }),
23749
+ /* @__PURE__ */ jsx30(Text26, { children: " Type edit description / string default" }),
23750
+ /* @__PURE__ */ jsx30(Text26, { children: " Esc exit field-edit back to the row" }),
23751
+ /* @__PURE__ */ jsx30(Text26, { children: " " }),
23752
+ /* @__PURE__ */ jsx30(Text26, { bold: true, children: "Values / allowedComponents" }),
23753
+ /* @__PURE__ */ jsx30(Text26, { children: " a / e / r add \xB7 edit \xB7 remove" }),
23754
+ /* @__PURE__ */ jsx30(Text26, { children: " \u2191\u2193 navigate the list" }),
23755
+ /* @__PURE__ */ jsx30(Text26, { children: " K / J reorder up \xB7 down" }),
23756
+ /* @__PURE__ */ jsx30(Text26, { children: " " }),
23757
+ /* @__PURE__ */ jsx30(Text26, { bold: true, children: "Panels" }),
23758
+ /* @__PURE__ */ jsx30(Text26, { children: " s toggle source-view for the current prop" }),
23759
+ /* @__PURE__ */ jsx30(Text26, { children: " " + propRationaleKey.padEnd(16) + " toggle prop rationale panel" }),
23760
+ /* @__PURE__ */ jsx30(Text26, { children: " " + componentRationaleKey.padEnd(16) + " toggle component rationale panel" }),
23761
+ /* @__PURE__ */ jsx30(Text26, { children: " ? toggle this overlay" }),
23762
+ /* @__PURE__ */ jsx30(Text26, { children: " " }),
23763
+ /* @__PURE__ */ jsx30(Text26, { dimColor: true, children: "press ? or Esc to close" })
23951
23764
  ] }),
23952
- validationError && /* @__PURE__ */ jsx31(Text27, { color: PALETTE.error, children: "\u2717 " + validationError }),
23953
- /* @__PURE__ */ jsx31(Box26, { paddingTop: 1, children: /* @__PURE__ */ jsx31(Text27, { dimColor: true, children: modeLabel }) })
23765
+ validationError && /* @__PURE__ */ jsx30(Text26, { color: PALETTE.error, children: "\u2717 " + validationError }),
23766
+ /* @__PURE__ */ jsx30(Box25, { paddingTop: 1, children: /* @__PURE__ */ jsx30(Text26, { dimColor: true, children: modeLabel }) })
23954
23767
  ]
23955
23768
  }
23956
23769
  );
@@ -24006,23 +23819,23 @@ var init_wrap_text = __esm({
24006
23819
  });
24007
23820
 
24008
23821
  // packages/experience-design-system-cli-legacy/src/analyze/select/tui/components/RationaleLine.tsx
24009
- import { Box as Box27, Text as Text28 } from "ink";
24010
- import { jsx as jsx32, jsxs as jsxs28 } from "react/jsx-runtime";
23822
+ import { Box as Box26, Text as Text27 } from "ink";
23823
+ import { jsx as jsx31, jsxs as jsxs27 } from "react/jsx-runtime";
24011
23824
  function RationaleLine({ line, active }) {
24012
23825
  if (line.kind === "blank") {
24013
- return /* @__PURE__ */ jsx32(Box27, { children: /* @__PURE__ */ jsx32(Text28, { children: " " }) });
23826
+ return /* @__PURE__ */ jsx31(Box26, { children: /* @__PURE__ */ jsx31(Text27, { children: " " }) });
24014
23827
  }
24015
23828
  if (line.kind === "heading") {
24016
- return /* @__PURE__ */ jsx32(Box27, { children: /* @__PURE__ */ jsx32(Text28, { bold: true, color: PALETTE.info, dimColor: !active, children: line.text }) });
23829
+ return /* @__PURE__ */ jsx31(Box26, { children: /* @__PURE__ */ jsx31(Text27, { bold: true, color: PALETTE.info, dimColor: !active, children: line.text }) });
24017
23830
  }
24018
23831
  if (line.kind === "label") {
24019
- return /* @__PURE__ */ jsxs28(Box27, { children: [
24020
- line.prefix && /* @__PURE__ */ jsx32(Text28, { children: line.prefix }),
24021
- /* @__PURE__ */ jsx32(Text28, { bold: true, color: line.color, dimColor: !active, children: line.text }),
24022
- line.suffix && /* @__PURE__ */ jsx32(Text28, { dimColor: true, children: line.suffix })
23832
+ return /* @__PURE__ */ jsxs27(Box26, { children: [
23833
+ line.prefix && /* @__PURE__ */ jsx31(Text27, { children: line.prefix }),
23834
+ /* @__PURE__ */ jsx31(Text27, { bold: true, color: line.color, dimColor: !active, children: line.text }),
23835
+ line.suffix && /* @__PURE__ */ jsx31(Text27, { dimColor: true, children: line.suffix })
24023
23836
  ] });
24024
23837
  }
24025
- return /* @__PURE__ */ jsx32(Box27, { children: /* @__PURE__ */ jsx32(Text28, { dimColor: !active || line.dim, children: line.text }) });
23838
+ return /* @__PURE__ */ jsx31(Box26, { children: /* @__PURE__ */ jsx31(Text27, { dimColor: !active || line.dim, children: line.text }) });
24026
23839
  }
24027
23840
  var init_RationaleLine = __esm({
24028
23841
  "packages/experience-design-system-cli-legacy/src/analyze/select/tui/components/RationaleLine.tsx"() {
@@ -24032,8 +23845,8 @@ var init_RationaleLine = __esm({
24032
23845
  });
24033
23846
 
24034
23847
  // packages/experience-design-system-cli-legacy/src/analyze/select/tui/components/ComponentRationalePanel.tsx
24035
- import { Box as Box28, Text as Text29 } from "ink";
24036
- import { jsx as jsx33, jsxs as jsxs29 } from "react/jsx-runtime";
23848
+ import { Box as Box27, Text as Text28 } from "ink";
23849
+ import { jsx as jsx32, jsxs as jsxs28 } from "react/jsx-runtime";
24037
23850
  function renderComponentRationaleLines(data, innerWidth) {
24038
23851
  const out = [];
24039
23852
  const pushSection = (heading, body) => {
@@ -24100,8 +23913,8 @@ function ComponentRationalePanel({
24100
23913
  const overflowed = totalLines > contentHeight;
24101
23914
  const visibleStart = totalLines === 0 ? 0 : scrollOffset + 1;
24102
23915
  const visibleEnd = Math.min(totalLines, scrollOffset + contentHeight);
24103
- return /* @__PURE__ */ jsxs29(
24104
- Box28,
23916
+ return /* @__PURE__ */ jsxs28(
23917
+ Box27,
24105
23918
  {
24106
23919
  flexDirection: "column",
24107
23920
  width,
@@ -24109,9 +23922,9 @@ function ComponentRationalePanel({
24109
23922
  borderStyle: "single",
24110
23923
  borderColor: active ? PALETTE.inverse : void 0,
24111
23924
  children: [
24112
- /* @__PURE__ */ jsx33(Box28, { children: /* @__PURE__ */ jsx33(Text29, { bold: true, dimColor: !active, children: `Component rationale: ${data.name}` }) }),
24113
- visible.map((line, i) => /* @__PURE__ */ jsx33(RationaleLine, { line, active }, i)),
24114
- /* @__PURE__ */ jsx33(Box28, { children: overflowed ? /* @__PURE__ */ jsx33(Text29, { dimColor: true, children: `${visibleStart}-${visibleEnd}/${totalLines} [\u2191\u2193] scroll [I/Esc] close` }) : /* @__PURE__ */ jsx33(Text29, { dimColor: true, children: "[I/Esc] close" }) })
23925
+ /* @__PURE__ */ jsx32(Box27, { children: /* @__PURE__ */ jsx32(Text28, { bold: true, dimColor: !active, children: `Component rationale: ${data.name}` }) }),
23926
+ visible.map((line, i) => /* @__PURE__ */ jsx32(RationaleLine, { line, active }, i)),
23927
+ /* @__PURE__ */ jsx32(Box27, { children: overflowed ? /* @__PURE__ */ jsx32(Text28, { dimColor: true, children: `${visibleStart}-${visibleEnd}/${totalLines} [\u2191\u2193] scroll [I/Esc] close` }) : /* @__PURE__ */ jsx32(Text28, { dimColor: true, children: "[I/Esc] close" }) })
24115
23928
  ]
24116
23929
  }
24117
23930
  );
@@ -24128,10 +23941,10 @@ var init_ComponentRationalePanel = __esm({
24128
23941
  });
24129
23942
 
24130
23943
  // packages/experience-design-system-cli-legacy/src/analyze/select/tui/components/HighlightedLine.tsx
24131
- import { Text as Text30 } from "ink";
24132
- import { Fragment as Fragment12, jsx as jsx34 } from "react/jsx-runtime";
23944
+ import { Text as Text29 } from "ink";
23945
+ import { Fragment as Fragment11, jsx as jsx33 } from "react/jsx-runtime";
24133
23946
  function HighlightedLine({ parts }) {
24134
- return /* @__PURE__ */ jsx34(Fragment12, { children: parts.map((part, i) => /* @__PURE__ */ jsx34(Text30, { color: part.color, dimColor: part.dim, children: part.text }, i)) });
23947
+ return /* @__PURE__ */ jsx33(Fragment11, { children: parts.map((part, i) => /* @__PURE__ */ jsx33(Text29, { color: part.color, dimColor: part.dim, children: part.text }, i)) });
24135
23948
  }
24136
23949
  var init_HighlightedLine = __esm({
24137
23950
  "packages/experience-design-system-cli-legacy/src/analyze/select/tui/components/HighlightedLine.tsx"() {
@@ -24140,8 +23953,8 @@ var init_HighlightedLine = __esm({
24140
23953
  });
24141
23954
 
24142
23955
  // packages/experience-design-system-cli-legacy/src/analyze/select/tui/components/ScrollablePanel.tsx
24143
- import { Box as Box29, Text as Text31 } from "ink";
24144
- import { Fragment as Fragment13, jsx as jsx35, jsxs as jsxs30 } from "react/jsx-runtime";
23956
+ import { Box as Box28, Text as Text30 } from "ink";
23957
+ import { Fragment as Fragment12, jsx as jsx34, jsxs as jsxs29 } from "react/jsx-runtime";
24145
23958
  function ScrollablePanel({
24146
23959
  header,
24147
23960
  width,
@@ -24154,12 +23967,12 @@ function ScrollablePanel({
24154
23967
  children
24155
23968
  }) {
24156
23969
  const overflowed = totalLines > height;
24157
- return /* @__PURE__ */ jsxs30(Box29, { flexDirection: "column", width, height: height + 2, borderStyle: "single", borderColor, children: [
24158
- /* @__PURE__ */ jsxs30(Box29, { children: [
23970
+ return /* @__PURE__ */ jsxs29(Box28, { flexDirection: "column", width, height: height + 2, borderStyle: "single", borderColor, children: [
23971
+ /* @__PURE__ */ jsxs29(Box28, { children: [
24159
23972
  header,
24160
- overflowed && /* @__PURE__ */ jsxs30(Fragment13, { children: [
24161
- /* @__PURE__ */ jsx35(Box29, { flexGrow: 1 }),
24162
- /* @__PURE__ */ jsx35(Text31, { dimColor: !active, children: `\u2195 ${visibleStart}-${visibleEnd}/${totalLines}` })
23973
+ overflowed && /* @__PURE__ */ jsxs29(Fragment12, { children: [
23974
+ /* @__PURE__ */ jsx34(Box28, { flexGrow: 1 }),
23975
+ /* @__PURE__ */ jsx34(Text30, { dimColor: !active, children: `\u2195 ${visibleStart}-${visibleEnd}/${totalLines}` })
24163
23976
  ] })
24164
23977
  ] }),
24165
23978
  children
@@ -24172,8 +23985,8 @@ var init_ScrollablePanel = __esm({
24172
23985
  });
24173
23986
 
24174
23987
  // packages/experience-design-system-cli-legacy/src/analyze/select/tui/components/JsonPanel.tsx
24175
- import { Box as Box30, Text as Text32 } from "ink";
24176
- import { jsx as jsx36 } from "react/jsx-runtime";
23988
+ import { Box as Box29, Text as Text31 } from "ink";
23989
+ import { jsx as jsx35 } from "react/jsx-runtime";
24177
23990
  function highlightJson(line) {
24178
23991
  const parts = [];
24179
23992
  let remaining = line;
@@ -24211,7 +24024,7 @@ function highlightJson(line) {
24211
24024
  parts.push({ text: remaining[0] });
24212
24025
  remaining = remaining.slice(1);
24213
24026
  }
24214
- return /* @__PURE__ */ jsx36(HighlightedLine, { parts });
24027
+ return /* @__PURE__ */ jsx35(HighlightedLine, { parts });
24215
24028
  }
24216
24029
  function truncateLine(line, maxWidth) {
24217
24030
  if (line.length <= maxWidth) return line;
@@ -24224,10 +24037,10 @@ function JsonPanel({ label, value, scrollOffset, width, height, active }) {
24224
24037
  const totalLines = allLines.length;
24225
24038
  const visibleStart = totalLines === 0 ? 0 : scrollOffset + 1;
24226
24039
  const visibleEnd = Math.min(totalLines, scrollOffset + height);
24227
- return /* @__PURE__ */ jsx36(
24040
+ return /* @__PURE__ */ jsx35(
24228
24041
  ScrollablePanel,
24229
24042
  {
24230
- header: /* @__PURE__ */ jsx36(Text32, { bold: true, dimColor: !active, children: label }),
24043
+ header: /* @__PURE__ */ jsx35(Text31, { bold: true, dimColor: !active, children: label }),
24231
24044
  width,
24232
24045
  height,
24233
24046
  active,
@@ -24237,7 +24050,7 @@ function JsonPanel({ label, value, scrollOffset, width, height, active }) {
24237
24050
  borderColor: active ? "white" : void 0,
24238
24051
  children: visibleLines.map((line, i) => {
24239
24052
  const truncated = truncateLine(line, innerWidth);
24240
- return /* @__PURE__ */ jsx36(Box30, { children: highlightJson(truncated) }, i);
24053
+ return /* @__PURE__ */ jsx35(Box29, { children: highlightJson(truncated) }, i);
24241
24054
  })
24242
24055
  }
24243
24056
  );
@@ -24251,8 +24064,8 @@ var init_JsonPanel = __esm({
24251
24064
  });
24252
24065
 
24253
24066
  // packages/experience-design-system-cli-legacy/src/analyze/select/tui/components/RationalePanel.tsx
24254
- import { Text as Text33 } from "ink";
24255
- import { jsx as jsx37 } from "react/jsx-runtime";
24067
+ import { Text as Text32 } from "ink";
24068
+ import { jsx as jsx36 } from "react/jsx-runtime";
24256
24069
  function renderRationaleLines(rows, innerWidth) {
24257
24070
  const out = [];
24258
24071
  rows.forEach((row, idx) => {
@@ -24285,10 +24098,10 @@ function RationalePanel({
24285
24098
  const visible = allLines.slice(scrollOffset, scrollOffset + height);
24286
24099
  const visibleStart = totalLines === 0 ? 0 : scrollOffset + 1;
24287
24100
  const visibleEnd = Math.min(totalLines, scrollOffset + height);
24288
- return /* @__PURE__ */ jsx37(
24101
+ return /* @__PURE__ */ jsx36(
24289
24102
  ScrollablePanel,
24290
24103
  {
24291
- header: /* @__PURE__ */ jsx37(Text33, { bold: true, dimColor: !active, children: `RATIONALE \u2014 ${componentName}` }),
24104
+ header: /* @__PURE__ */ jsx36(Text32, { bold: true, dimColor: !active, children: `RATIONALE \u2014 ${componentName}` }),
24292
24105
  width,
24293
24106
  height,
24294
24107
  active,
@@ -24296,7 +24109,7 @@ function RationalePanel({
24296
24109
  visibleStart,
24297
24110
  visibleEnd,
24298
24111
  borderColor: active ? PALETTE.inverse : void 0,
24299
- children: visible.map((line, i) => /* @__PURE__ */ jsx37(RationaleLine, { line, active }, i))
24112
+ children: visible.map((line, i) => /* @__PURE__ */ jsx36(RationaleLine, { line, active }, i))
24300
24113
  }
24301
24114
  );
24302
24115
  }
@@ -24312,8 +24125,8 @@ var init_RationalePanel = __esm({
24312
24125
 
24313
24126
  // packages/experience-design-system-cli-legacy/src/analyze/select/tui/components/TokenReviewPanel.tsx
24314
24127
  import figures5 from "figures";
24315
- import { Box as Box31, Text as Text34 } from "ink";
24316
- import { jsx as jsx38, jsxs as jsxs31 } from "react/jsx-runtime";
24128
+ import { Box as Box30, Text as Text33 } from "ink";
24129
+ import { jsx as jsx37, jsxs as jsxs30 } from "react/jsx-runtime";
24317
24130
  function collectTokenSuggestions(entry, availableTokens = []) {
24318
24131
  return Object.entries(entry.$properties).filter(([, def]) => {
24319
24132
  const rawKind = def["$token.kind"];
@@ -24347,8 +24160,8 @@ function TokenReviewPanel({
24347
24160
  const scrollStart = Math.max(0, Math.min(editCursor - Math.floor(visibleCount / 2), maxStart));
24348
24161
  const visiblePaths = current.paths.slice(scrollStart, scrollStart + visibleCount);
24349
24162
  const rangeLabel = current.paths.length === 0 ? "no compatible tokens" : `${scrollStart + 1}-${scrollStart + visiblePaths.length} of ${current.paths.length}`;
24350
- return /* @__PURE__ */ jsxs31(
24351
- Box31,
24163
+ return /* @__PURE__ */ jsxs30(
24164
+ Box30,
24352
24165
  {
24353
24166
  flexDirection: "column",
24354
24167
  width,
@@ -24356,25 +24169,25 @@ function TokenReviewPanel({
24356
24169
  borderStyle: "single",
24357
24170
  borderColor: active ? PALETTE.inverse : void 0,
24358
24171
  children: [
24359
- /* @__PURE__ */ jsx38(Text34, { bold: true, dimColor: !active, wrap: "truncate", children: `TOKEN REVIEW \u2014 ${componentName} \xB7 ${current.propName} (edit allowed)` }),
24360
- /* @__PURE__ */ jsx38(Text34, { dimColor: true, wrap: "truncate", children: `select which tokens are allowed (${rangeLabel})` }),
24361
- /* @__PURE__ */ jsx38(Text34, { children: " " }),
24362
- current.paths.length === 0 && /* @__PURE__ */ jsx38(Text34, { dimColor: true, children: "(no compatible tokens found for this token kind)" }),
24172
+ /* @__PURE__ */ jsx37(Text33, { bold: true, dimColor: !active, wrap: "truncate", children: `TOKEN REVIEW \u2014 ${componentName} \xB7 ${current.propName} (edit allowed)` }),
24173
+ /* @__PURE__ */ jsx37(Text33, { dimColor: true, wrap: "truncate", children: `select which tokens are allowed (${rangeLabel})` }),
24174
+ /* @__PURE__ */ jsx37(Text33, { children: " " }),
24175
+ current.paths.length === 0 && /* @__PURE__ */ jsx37(Text33, { dimColor: true, children: "(no compatible tokens found for this token kind)" }),
24363
24176
  visiblePaths.map((path, i) => {
24364
24177
  const pathIndex = scrollStart + i;
24365
24178
  const checked = editSelection.has(path);
24366
24179
  const focused = pathIndex === editCursor;
24367
- return /* @__PURE__ */ jsx38(Box31, { children: /* @__PURE__ */ jsx38(Text34, { color: focused ? PALETTE.info : void 0, bold: focused, dimColor: !active, wrap: "truncate", children: ` [${checked ? "x" : " "}] ${path}` }) }, path);
24180
+ return /* @__PURE__ */ jsx37(Box30, { children: /* @__PURE__ */ jsx37(Text33, { color: focused ? PALETTE.info : void 0, bold: focused, dimColor: !active, wrap: "truncate", children: ` [${checked ? "x" : " "}] ${path}` }) }, path);
24368
24181
  }),
24369
- /* @__PURE__ */ jsx38(Text34, { children: " " }),
24370
- /* @__PURE__ */ jsx38(Text34, { dimColor: true, wrap: "truncate", children: "[\u2191/\u2193] move [Space] toggle" }),
24371
- /* @__PURE__ */ jsx38(Text34, { dimColor: true, wrap: "truncate", children: "[Ctrl+S] save [Esc] cancel" })
24182
+ /* @__PURE__ */ jsx37(Text33, { children: " " }),
24183
+ /* @__PURE__ */ jsx37(Text33, { dimColor: true, wrap: "truncate", children: "[\u2191/\u2193] move [Space] toggle" }),
24184
+ /* @__PURE__ */ jsx37(Text33, { dimColor: true, wrap: "truncate", children: "[Ctrl+S] save [Esc] cancel" })
24372
24185
  ]
24373
24186
  }
24374
24187
  );
24375
24188
  }
24376
- return /* @__PURE__ */ jsxs31(
24377
- Box31,
24189
+ return /* @__PURE__ */ jsxs30(
24190
+ Box30,
24378
24191
  {
24379
24192
  flexDirection: "column",
24380
24193
  width,
@@ -24382,18 +24195,18 @@ function TokenReviewPanel({
24382
24195
  borderStyle: "single",
24383
24196
  borderColor: active ? PALETTE.inverse : void 0,
24384
24197
  children: [
24385
- /* @__PURE__ */ jsx38(Text34, { bold: true, dimColor: !active, children: `TOKEN REVIEW \u2014 ${componentName}` }),
24386
- suggestions.length === 0 && /* @__PURE__ */ jsx38(Text34, { dimColor: true, children: "(no token suggestions for this component)" }),
24198
+ /* @__PURE__ */ jsx37(Text33, { bold: true, dimColor: !active, children: `TOKEN REVIEW \u2014 ${componentName}` }),
24199
+ suggestions.length === 0 && /* @__PURE__ */ jsx37(Text33, { dimColor: true, children: "(no token suggestions for this component)" }),
24387
24200
  suggestions.map((s, i) => {
24388
24201
  const focused = i === selectedRow;
24389
- return /* @__PURE__ */ jsxs31(Box31, { flexDirection: "column", children: [
24390
- /* @__PURE__ */ jsx38(Box31, { children: /* @__PURE__ */ jsx38(Text34, { color: focused ? PALETTE.info : void 0, bold: focused, dimColor: !active, children: `${focused ? figures5.pointer : " "} ${s.propName}` }) }),
24391
- /* @__PURE__ */ jsx38(Text34, { dimColor: true, children: ` suggested: ${s.suggested.join(", ")}` }),
24392
- /* @__PURE__ */ jsx38(Text34, { dimColor: true, children: ` allowed: ${s.allowed.join(", ")}` })
24202
+ return /* @__PURE__ */ jsxs30(Box30, { flexDirection: "column", children: [
24203
+ /* @__PURE__ */ jsx37(Box30, { children: /* @__PURE__ */ jsx37(Text33, { color: focused ? PALETTE.info : void 0, bold: focused, dimColor: !active, children: `${focused ? figures5.pointer : " "} ${s.propName}` }) }),
24204
+ /* @__PURE__ */ jsx37(Text33, { dimColor: true, children: ` suggested: ${s.suggested.join(", ")}` }),
24205
+ /* @__PURE__ */ jsx37(Text33, { dimColor: true, children: ` allowed: ${s.allowed.join(", ")}` })
24393
24206
  ] }, s.propName);
24394
24207
  }),
24395
- /* @__PURE__ */ jsx38(Text34, { children: " " }),
24396
- /* @__PURE__ */ jsx38(Text34, { dimColor: true, children: "[\u2191/\u2193] move [Enter] edit allowed [Esc] close" })
24208
+ /* @__PURE__ */ jsx37(Text33, { children: " " }),
24209
+ /* @__PURE__ */ jsx37(Text33, { dimColor: true, children: "[\u2191/\u2193] move [Enter] edit allowed [Esc] close" })
24397
24210
  ]
24398
24211
  }
24399
24212
  );
@@ -24406,8 +24219,8 @@ var init_TokenReviewPanel = __esm({
24406
24219
  });
24407
24220
 
24408
24221
  // packages/experience-design-system-cli-legacy/src/import/tui/steps/review-details-panel.tsx
24409
- import { Text as Text35 } from "ink";
24410
- import { Fragment as Fragment14, jsx as jsx39, jsxs as jsxs32 } from "react/jsx-runtime";
24222
+ import { Text as Text34 } from "ink";
24223
+ import { Fragment as Fragment13, jsx as jsx38, jsxs as jsxs31 } from "react/jsx-runtime";
24411
24224
  function ReviewDetailsPanel({
24412
24225
  selectedKey,
24413
24226
  panelOpen,
@@ -24442,7 +24255,7 @@ function ReviewDetailsPanel({
24442
24255
  rationale: s.rationale ?? ""
24443
24256
  }))
24444
24257
  ];
24445
- return /* @__PURE__ */ jsx39(
24258
+ return /* @__PURE__ */ jsx38(
24446
24259
  RationalePanel,
24447
24260
  {
24448
24261
  componentName: componentRationale?.name ?? selectedKey,
@@ -24455,7 +24268,7 @@ function ReviewDetailsPanel({
24455
24268
  );
24456
24269
  }
24457
24270
  if (panelOpen === "component-rationale") {
24458
- return /* @__PURE__ */ jsx39(
24271
+ return /* @__PURE__ */ jsx38(
24459
24272
  ComponentRationalePanel,
24460
24273
  {
24461
24274
  data: componentRationale ?? {
@@ -24480,14 +24293,14 @@ function ReviewDetailsPanel({
24480
24293
  const headerPath = path ?? "<unknown source path>";
24481
24294
  const sourceLineCount = Math.max(1, height - 4);
24482
24295
  const lines = source ? source.split("\n").slice(panelScrollOffset, panelScrollOffset + sourceLineCount) : [];
24483
- return /* @__PURE__ */ jsxs32(FixedPanel, { width, height, borderStyle: "single", borderColor: sourceBorderColor, paddingLeft: 1, children: [
24484
- /* @__PURE__ */ jsx39(Text35, { dimColor: true, bold: true, wrap: "truncate-end", children: `source: ${headerPath}` }),
24485
- source ? lines.map((line, index) => /* @__PURE__ */ jsx39(Text35, { dimColor: true, wrap: "truncate-end", children: line }, `source-line-${index}`)) : /* @__PURE__ */ jsx39(Text35, { dimColor: true, children: "(no source captured)" }),
24486
- /* @__PURE__ */ jsx39(Text35, { dimColor: true, wrap: "truncate-end", children: "[s/Esc] close" })
24296
+ return /* @__PURE__ */ jsxs31(FixedPanel, { width, height, borderStyle: "single", borderColor: sourceBorderColor, paddingLeft: 1, children: [
24297
+ /* @__PURE__ */ jsx38(Text34, { dimColor: true, bold: true, wrap: "truncate-end", children: `source: ${headerPath}` }),
24298
+ source ? lines.map((line, index) => /* @__PURE__ */ jsx38(Text34, { dimColor: true, wrap: "truncate-end", children: line }, `source-line-${index}`)) : /* @__PURE__ */ jsx38(Text34, { dimColor: true, children: "(no source captured)" }),
24299
+ /* @__PURE__ */ jsx38(Text34, { dimColor: true, wrap: "truncate-end", children: "[s/Esc] close" })
24487
24300
  ] });
24488
24301
  }
24489
24302
  if (panelOpen === "token-review") {
24490
- return /* @__PURE__ */ jsx39(
24303
+ return /* @__PURE__ */ jsx38(
24491
24304
  TokenReviewPanel,
24492
24305
  {
24493
24306
  componentName: selectedKey,
@@ -24503,7 +24316,7 @@ function ReviewDetailsPanel({
24503
24316
  );
24504
24317
  }
24505
24318
  if (showJson) {
24506
- return /* @__PURE__ */ jsx39(
24319
+ return /* @__PURE__ */ jsx38(
24507
24320
  JsonPanel,
24508
24321
  {
24509
24322
  label: "GENERATED DEFINITION (read-only)",
@@ -24515,7 +24328,7 @@ function ReviewDetailsPanel({
24515
24328
  }
24516
24329
  );
24517
24330
  }
24518
- return /* @__PURE__ */ jsx39(Fragment14, { children: editor });
24331
+ return /* @__PURE__ */ jsx38(Fragment13, { children: editor });
24519
24332
  }
24520
24333
  var init_review_details_panel = __esm({
24521
24334
  "packages/experience-design-system-cli-legacy/src/import/tui/steps/review-details-panel.tsx"() {
@@ -24529,7 +24342,7 @@ var init_review_details_panel = __esm({
24529
24342
  });
24530
24343
 
24531
24344
  // packages/experience-design-system-cli-legacy/src/import/tui/components/ReviewDetailsEditor.tsx
24532
- import { jsx as jsx40 } from "react/jsx-runtime";
24345
+ import { jsx as jsx39 } from "react/jsx-runtime";
24533
24346
  import { createElement as createElement5 } from "react";
24534
24347
  function toFieldEditorMetadata(reviewMetadata) {
24535
24348
  if (!reviewMetadata) return void 0;
@@ -24563,7 +24376,7 @@ function ReviewDetailsEditor({
24563
24376
  jsonScrollOffset,
24564
24377
  currentTokenSuggestions
24565
24378
  } = reviewEditor;
24566
- return /* @__PURE__ */ jsx40(
24379
+ return /* @__PURE__ */ jsx39(
24567
24380
  ReviewDetailsPanel,
24568
24381
  {
24569
24382
  selectedKey,
@@ -24610,8 +24423,8 @@ var init_ReviewDetailsEditor = __esm({
24610
24423
  });
24611
24424
 
24612
24425
  // packages/experience-design-system-cli-legacy/src/import/tui/components/ReviewComponentPanel.tsx
24613
- import { Box as Box32, Text as Text36 } from "ink";
24614
- import { Fragment as Fragment15, jsx as jsx41, jsxs as jsxs33 } from "react/jsx-runtime";
24426
+ import { Box as Box31, Text as Text35 } from "ink";
24427
+ import { Fragment as Fragment14, jsx as jsx40, jsxs as jsxs32 } from "react/jsx-runtime";
24615
24428
  function buildReviewFieldEditor(reviewEditor, selectedJson, onExit, overrides = {}) {
24616
24429
  return {
24617
24430
  value: reviewEditor.draftValue || selectedJson,
@@ -24651,17 +24464,17 @@ function ReviewEmptyComponentsWarning({
24651
24464
  hidden
24652
24465
  }) {
24653
24466
  if (hidden || count === 0) return null;
24654
- return /* @__PURE__ */ jsx41(Text36, { color: PALETTE.warning, children: `\u26A0 ${count} component${count === 1 ? "" : "s"} had no classifiable props \u2014 review with care` });
24467
+ return /* @__PURE__ */ jsx40(Text35, { color: PALETTE.warning, children: `\u26A0 ${count} component${count === 1 ? "" : "s"} had no classifiable props \u2014 review with care` });
24655
24468
  }
24656
24469
  function ReviewNoSelection() {
24657
- return /* @__PURE__ */ jsx41(Box32, { flexGrow: 1, paddingLeft: 1, flexDirection: "column", children: /* @__PURE__ */ jsx41(Text36, { dimColor: true, children: "No component selected" }) });
24470
+ return /* @__PURE__ */ jsx40(Box31, { flexGrow: 1, paddingLeft: 1, flexDirection: "column", children: /* @__PURE__ */ jsx40(Text35, { dimColor: true, children: "No component selected" }) });
24658
24471
  }
24659
24472
  function ReviewFinalizeError({
24660
24473
  message,
24661
24474
  hidden
24662
24475
  }) {
24663
24476
  if (hidden || !message) return null;
24664
- return /* @__PURE__ */ jsx41(Text36, { color: PALETTE.error, children: `\u26A0 ${message}` });
24477
+ return /* @__PURE__ */ jsx40(Text35, { color: PALETTE.error, children: `\u26A0 ${message}` });
24665
24478
  }
24666
24479
  function ReviewPanelFooter({
24667
24480
  reviewEditor,
@@ -24670,10 +24483,10 @@ function ReviewPanelFooter({
24670
24483
  livePreview,
24671
24484
  livePreviewSpinner
24672
24485
  }) {
24673
- return /* @__PURE__ */ jsxs33(Fragment15, { children: [
24486
+ return /* @__PURE__ */ jsxs32(Fragment14, { children: [
24674
24487
  reviewEditor.panelOpen === "token-review" ? " [\u2191/\u2193] move [Enter] edit allowed [Esc] close" : sidebarFocused ? sidebarFooter : reviewEditor.showJson ? " [\u2191\u2193] 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" : ""),
24675
- livePreview.status === "running" && /* @__PURE__ */ jsx41(Text36, { children: ` ${livePreviewSpinner} live preview` }),
24676
- livePreview.disabled && /* @__PURE__ */ jsx41(Text36, { children: " \xB7 live preview disabled" })
24488
+ livePreview.status === "running" && /* @__PURE__ */ jsx40(Text35, { children: ` ${livePreviewSpinner} live preview` }),
24489
+ livePreview.disabled && /* @__PURE__ */ jsx40(Text35, { children: " \xB7 live preview disabled" })
24677
24490
  ] });
24678
24491
  }
24679
24492
  function ReviewComponentTitle({
@@ -24682,10 +24495,10 @@ function ReviewComponentTitle({
24682
24495
  slotCount,
24683
24496
  sidebarFocused
24684
24497
  }) {
24685
- return /* @__PURE__ */ jsxs33(Box32, { paddingLeft: 2, paddingBottom: 1, children: [
24686
- /* @__PURE__ */ jsx41(Text36, { bold: true, wrap: "truncate-end", children: selectedKey }),
24687
- /* @__PURE__ */ jsx41(Box32, { flexGrow: 1 }),
24688
- /* @__PURE__ */ jsxs33(Text36, { dimColor: true, wrap: "truncate-end", children: [
24498
+ return /* @__PURE__ */ jsxs32(Box31, { paddingLeft: 2, paddingBottom: 1, children: [
24499
+ /* @__PURE__ */ jsx40(Text35, { bold: true, wrap: "truncate-end", children: selectedKey }),
24500
+ /* @__PURE__ */ jsx40(Box31, { flexGrow: 1 }),
24501
+ /* @__PURE__ */ jsxs32(Text35, { dimColor: true, wrap: "truncate-end", children: [
24689
24502
  propCount,
24690
24503
  " prop",
24691
24504
  propCount !== 1 ? "s" : "",
@@ -24716,8 +24529,8 @@ function ReviewComponentPanel({
24716
24529
  const slotCount = selectedEntry.$slots ? Object.keys(selectedEntry.$slots).length : 0;
24717
24530
  const contentHeight = Math.max(1, height - 2);
24718
24531
  const contentWidth = Math.max(1, width - 1);
24719
- return /* @__PURE__ */ jsx41(FixedPanel, { width, height, borderStyle: void 0, paddingLeft: 1, children: /* @__PURE__ */ jsxs33(Box32, { flexDirection: "column", width: contentWidth, height, flexShrink: 0, overflowY: "hidden", children: [
24720
- /* @__PURE__ */ jsx41(Box32, { width: contentWidth, height: contentHeight, flexShrink: 0, overflowY: "hidden", children: /* @__PURE__ */ jsx41(
24532
+ return /* @__PURE__ */ jsx40(FixedPanel, { width, height, borderStyle: void 0, paddingLeft: 1, children: /* @__PURE__ */ jsxs32(Box31, { flexDirection: "column", width: contentWidth, height, flexShrink: 0, overflowY: "hidden", children: [
24533
+ /* @__PURE__ */ jsx40(Box31, { width: contentWidth, height: contentHeight, flexShrink: 0, overflowY: "hidden", children: /* @__PURE__ */ jsx40(
24721
24534
  ReviewDetailsEditor,
24722
24535
  {
24723
24536
  selectedKey,
@@ -24730,7 +24543,7 @@ function ReviewComponentPanel({
24730
24543
  jsonValue,
24731
24544
  sidebarFocused,
24732
24545
  fieldEditor,
24733
- header: /* @__PURE__ */ jsx41(
24546
+ header: /* @__PURE__ */ jsx40(
24734
24547
  ReviewComponentTitle,
24735
24548
  {
24736
24549
  selectedKey,
@@ -24741,8 +24554,8 @@ function ReviewComponentPanel({
24741
24554
  )
24742
24555
  }
24743
24556
  ) }),
24744
- /* @__PURE__ */ jsx41(Box32, { width: contentWidth, height: 1, flexShrink: 0, children: /* @__PURE__ */ jsx41(Text36, { color: saveError ? PALETTE.error : void 0, wrap: "truncate-end", children: saveError ? "\u2717 " + saveError : " " }) }),
24745
- /* @__PURE__ */ jsx41(Box32, { width: contentWidth, height: 1, flexShrink: 0, children: /* @__PURE__ */ jsx41(Text36, { dimColor: true, wrap: "truncate-end", children: /* @__PURE__ */ jsx41(
24557
+ /* @__PURE__ */ jsx40(Box31, { width: contentWidth, height: 1, flexShrink: 0, children: /* @__PURE__ */ jsx40(Text35, { color: saveError ? PALETTE.error : void 0, wrap: "truncate-end", children: saveError ? "\u2717 " + saveError : " " }) }),
24558
+ /* @__PURE__ */ jsx40(Box31, { width: contentWidth, height: 1, flexShrink: 0, children: /* @__PURE__ */ jsx40(Text35, { dimColor: true, wrap: "truncate-end", children: /* @__PURE__ */ jsx40(
24746
24559
  ReviewPanelFooter,
24747
24560
  {
24748
24561
  reviewEditor,
@@ -24765,8 +24578,8 @@ var init_ReviewComponentPanel = __esm({
24765
24578
  });
24766
24579
 
24767
24580
  // packages/experience-design-system-cli-legacy/src/import/tui/components/ReviewStatus.tsx
24768
- import { Box as Box33, Text as Text37 } from "ink";
24769
- import { jsx as jsx42, jsxs as jsxs34 } from "react/jsx-runtime";
24581
+ import { Box as Box32, Text as Text36 } from "ink";
24582
+ import { jsx as jsx41, jsxs as jsxs33 } from "react/jsx-runtime";
24770
24583
  function countReviewStatuses(entries) {
24771
24584
  return entries.reduce(
24772
24585
  (counts, entry) => {
@@ -24779,13 +24592,13 @@ function countReviewStatuses(entries) {
24779
24592
  );
24780
24593
  }
24781
24594
  function ReviewLoadingState() {
24782
- return /* @__PURE__ */ jsx42(Box33, { paddingX: 2, paddingY: 1, children: /* @__PURE__ */ jsx42(Text37, { dimColor: true, children: "Loading generated definitions..." }) });
24595
+ return /* @__PURE__ */ jsx41(Box32, { paddingX: 2, paddingY: 1, children: /* @__PURE__ */ jsx41(Text36, { dimColor: true, children: "Loading generated definitions..." }) });
24783
24596
  }
24784
24597
  function ReviewLoadError({ message }) {
24785
- return /* @__PURE__ */ jsxs34(Box33, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
24786
- /* @__PURE__ */ jsx42(Text37, { color: PALETTE.error, children: message }),
24787
- /* @__PURE__ */ jsx42(Text37, { children: " " }),
24788
- /* @__PURE__ */ jsx42(Text37, { dimColor: true, children: "[q / Enter / Esc] Quit" })
24598
+ return /* @__PURE__ */ jsxs33(Box32, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
24599
+ /* @__PURE__ */ jsx41(Text36, { color: PALETTE.error, children: message }),
24600
+ /* @__PURE__ */ jsx41(Text36, { children: " " }),
24601
+ /* @__PURE__ */ jsx41(Text36, { dimColor: true, children: "[q / Enter / Esc] Quit" })
24789
24602
  ] });
24790
24603
  }
24791
24604
  var init_ReviewStatus = __esm({
@@ -24919,8 +24732,8 @@ var init_runLivePreview = __esm({
24919
24732
  });
24920
24733
 
24921
24734
  // packages/experience-design-system-cli-legacy/src/analyze/select/tui/components/FinalizeDialog.tsx
24922
- import { Box as Box34, Text as Text38 } from "ink";
24923
- import { Fragment as Fragment16, jsx as jsx43, jsxs as jsxs35 } from "react/jsx-runtime";
24735
+ import { Box as Box33, Text as Text37 } from "ink";
24736
+ import { Fragment as Fragment15, jsx as jsx42, jsxs as jsxs34 } from "react/jsx-runtime";
24924
24737
  function FinalizeDialog({
24925
24738
  accepted,
24926
24739
  rejected,
@@ -24948,51 +24761,51 @@ function FinalizeDialog({
24948
24761
  const windowed = removed.slice(offset, offset + FINALIZE_REMOVED_WINDOW);
24949
24762
  const hasMoreBelow = offset + FINALIZE_REMOVED_WINDOW < removed.length;
24950
24763
  const hasMoreAbove = offset > 0;
24951
- return /* @__PURE__ */ jsx43(Box34, { width: "100%", justifyContent: "center", children: /* @__PURE__ */ jsxs35(Box34, { flexDirection: "column", alignItems: "center", borderStyle: "round", padding: 1, width: 58, children: [
24952
- /* @__PURE__ */ jsx43(Text38, { bold: true, children: "\u2500".repeat(22) + " Finalize " + "\u2500".repeat(22) }),
24953
- /* @__PURE__ */ jsx43(Text38, { children: " " }),
24954
- /* @__PURE__ */ jsxs35(Text38, { children: [
24955
- /* @__PURE__ */ jsxs35(Text38, { color: PALETTE.success, children: [
24764
+ return /* @__PURE__ */ jsx42(Box33, { width: "100%", justifyContent: "center", children: /* @__PURE__ */ jsxs34(Box33, { flexDirection: "column", alignItems: "center", borderStyle: "round", padding: 1, width: 58, children: [
24765
+ /* @__PURE__ */ jsx42(Text37, { bold: true, children: "\u2500".repeat(22) + " Finalize " + "\u2500".repeat(22) }),
24766
+ /* @__PURE__ */ jsx42(Text37, { children: " " }),
24767
+ /* @__PURE__ */ jsxs34(Text37, { children: [
24768
+ /* @__PURE__ */ jsxs34(Text37, { color: PALETTE.success, children: [
24956
24769
  accepted,
24957
24770
  " accepted"
24958
24771
  ] }),
24959
- /* @__PURE__ */ jsx43(Text38, { children: " \xB7 " }),
24960
- /* @__PURE__ */ jsxs35(Text38, { color: PALETTE.error, children: [
24772
+ /* @__PURE__ */ jsx42(Text37, { children: " \xB7 " }),
24773
+ /* @__PURE__ */ jsxs34(Text37, { color: PALETTE.error, children: [
24961
24774
  rejected,
24962
24775
  " rejected"
24963
24776
  ] }),
24964
- /* @__PURE__ */ jsx43(Text38, { children: " \xB7 " }),
24965
- /* @__PURE__ */ jsxs35(Text38, { dimColor: true, children: [
24777
+ /* @__PURE__ */ jsx42(Text37, { children: " \xB7 " }),
24778
+ /* @__PURE__ */ jsxs34(Text37, { dimColor: true, children: [
24966
24779
  needsReview,
24967
24780
  " unresolved"
24968
24781
  ] })
24969
24782
  ] }),
24970
- /* @__PURE__ */ jsx43(Text38, { children: " " }),
24971
- noneAccepted && /* @__PURE__ */ jsxs35(Fragment16, { children: [
24972
- /* @__PURE__ */ jsx43(Text38, { bold: true, color: PALETTE.warning, children: "\u26A0 No components are accepted \u2014 nothing will be pushed." }),
24973
- /* @__PURE__ */ jsx43(Text38, { color: PALETTE.warning, children: "Accept at least one component ([a] a row, [A] accept all) to push." }),
24974
- /* @__PURE__ */ jsx43(Text38, { children: " " })
24783
+ /* @__PURE__ */ jsx42(Text37, { children: " " }),
24784
+ noneAccepted && /* @__PURE__ */ jsxs34(Fragment15, { children: [
24785
+ /* @__PURE__ */ jsx42(Text37, { bold: true, color: PALETTE.warning, children: "\u26A0 No components are accepted \u2014 nothing will be pushed." }),
24786
+ /* @__PURE__ */ jsx42(Text37, { color: PALETTE.warning, children: "Accept at least one component ([a] a row, [A] accept all) to push." }),
24787
+ /* @__PURE__ */ jsx42(Text37, { children: " " })
24975
24788
  ] }),
24976
- !allResolved && /* @__PURE__ */ jsxs35(Fragment16, { children: [
24977
- /* @__PURE__ */ jsx43(Text38, { color: PALETTE.warning, children: "\u26A0 " + needsReview + " unresolved component" + (needsReview === 1 ? "" : "s") + " will not be pushed." }),
24978
- /* @__PURE__ */ jsx43(Text38, { color: PALETTE.warning, children: "Only explicitly accepted components ship." }),
24979
- /* @__PURE__ */ jsx43(Text38, { children: " " })
24789
+ !allResolved && /* @__PURE__ */ jsxs34(Fragment15, { children: [
24790
+ /* @__PURE__ */ jsx42(Text37, { color: PALETTE.warning, children: "\u26A0 " + needsReview + " unresolved component" + (needsReview === 1 ? "" : "s") + " will not be pushed." }),
24791
+ /* @__PURE__ */ jsx42(Text37, { color: PALETTE.warning, children: "Only explicitly accepted components ship." }),
24792
+ /* @__PURE__ */ jsx42(Text37, { children: " " })
24980
24793
  ] }),
24981
- /* @__PURE__ */ jsxs35(Box34, { flexDirection: "column", height: 2, children: [
24982
- previewStatus === "running" ? /* @__PURE__ */ jsx43(Text38, { dimColor: true, children: "Previewing deletions against the target space\u2026" }) : previewStatus === "error" ? /* @__PURE__ */ jsx43(Text38, { color: PALETTE.warning, children: "\u26A0 Could not preview deletions (the push will still proceed)." }) : /* @__PURE__ */ jsx43(Text38, { children: " " }),
24983
- /* @__PURE__ */ jsx43(Text38, { children: " " })
24794
+ /* @__PURE__ */ jsxs34(Box33, { flexDirection: "column", height: 2, children: [
24795
+ previewStatus === "running" ? /* @__PURE__ */ jsx42(Text37, { dimColor: true, children: "Previewing deletions against the target space\u2026" }) : previewStatus === "error" ? /* @__PURE__ */ jsx42(Text37, { color: PALETTE.warning, children: "\u26A0 Could not preview deletions (the push will still proceed)." }) : /* @__PURE__ */ jsx42(Text37, { children: " " }),
24796
+ /* @__PURE__ */ jsx42(Text37, { children: " " })
24984
24797
  ] }),
24985
- previewStatus === "done" && removed.length > 0 && /* @__PURE__ */ jsxs35(Fragment16, { children: [
24986
- /* @__PURE__ */ jsx43(Text38, { bold: true, color: PALETTE.error, children: removedComponentsHeader(removed.length, false) }),
24987
- hasMoreAbove && /* @__PURE__ */ jsx43(Text38, { dimColor: true, children: "\u2191 more above" }),
24988
- windowed.map((rc) => /* @__PURE__ */ jsx43(Text38, { color: PALETTE.error, children: removedComponentLine(rc) }, rc.id)),
24989
- hasMoreBelow && /* @__PURE__ */ jsx43(Text38, { dimColor: true, children: "\u2193 more below" }),
24990
- removed.length > FINALIZE_REMOVED_WINDOW && /* @__PURE__ */ jsx43(Text38, { dimColor: true, children: "[\u2191\u2193] scroll deletions" }),
24991
- /* @__PURE__ */ jsx43(Text38, { children: " " })
24798
+ previewStatus === "done" && removed.length > 0 && /* @__PURE__ */ jsxs34(Fragment15, { children: [
24799
+ /* @__PURE__ */ jsx42(Text37, { bold: true, color: PALETTE.error, children: removedComponentsHeader(removed.length, false) }),
24800
+ hasMoreAbove && /* @__PURE__ */ jsx42(Text37, { dimColor: true, children: "\u2191 more above" }),
24801
+ windowed.map((rc) => /* @__PURE__ */ jsx42(Text37, { color: PALETTE.error, children: removedComponentLine(rc) }, rc.id)),
24802
+ hasMoreBelow && /* @__PURE__ */ jsx42(Text37, { dimColor: true, children: "\u2193 more below" }),
24803
+ removed.length > FINALIZE_REMOVED_WINDOW && /* @__PURE__ */ jsx42(Text37, { dimColor: true, children: "[\u2191\u2193] scroll deletions" }),
24804
+ /* @__PURE__ */ jsx42(Text37, { children: " " })
24992
24805
  ] }),
24993
- /* @__PURE__ */ jsx43(Text38, { children: noneAccepted ? "Confirm exit with nothing accepted?" : allResolved ? "Save decisions and exit? All components resolved." : "Save decisions and exit?" }),
24994
- /* @__PURE__ */ jsx43(Text38, { children: " " }),
24995
- /* @__PURE__ */ jsx43(Text38, { children: "[y / Enter] Confirm [n / Esc] Cancel" })
24806
+ /* @__PURE__ */ jsx42(Text37, { children: noneAccepted ? "Confirm exit with nothing accepted?" : allResolved ? "Save decisions and exit? All components resolved." : "Save decisions and exit?" }),
24807
+ /* @__PURE__ */ jsx42(Text37, { children: " " }),
24808
+ /* @__PURE__ */ jsx42(Text37, { children: "[y / Enter] Confirm [n / Esc] Cancel" })
24996
24809
  ] }) });
24997
24810
  }
24998
24811
  var FINALIZE_REMOVED_WINDOW;
@@ -25007,7 +24820,7 @@ var init_FinalizeDialog = __esm({
25007
24820
  });
25008
24821
 
25009
24822
  // packages/experience-design-system-cli-legacy/src/import/tui/useFinalizePreview.ts
25010
- import { useEffect as useEffect8, useRef as useRef5, useState as useState13 } from "react";
24823
+ import { useEffect as useEffect8, useRef as useRef4, useState as useState12 } from "react";
25011
24824
  function useReviewFinalizePreview({
25012
24825
  components,
25013
24826
  ...options
@@ -25019,10 +24832,10 @@ function useReviewFinalizePreview({
25019
24832
  }
25020
24833
  function useFinalizePreview(opts) {
25021
24834
  const { open, extractSessionId, tokensPath, spaceId, environmentId, cmaToken, host, acceptedKeys } = opts;
25022
- const [status, setStatus] = useState13("idle");
25023
- const [removed, setRemoved] = useState13([]);
25024
- const [scrollOffset, setScrollOffset] = useState13(0);
25025
- const generationRef = useRef5(0);
24835
+ const [status, setStatus] = useState12("idle");
24836
+ const [removed, setRemoved] = useState12([]);
24837
+ const [scrollOffset, setScrollOffset] = useState12(0);
24838
+ const generationRef = useRef4(0);
25026
24839
  const acceptedKey = [...acceptedKeys].sort().join("\0");
25027
24840
  useEffect8(() => {
25028
24841
  if (!open) {
@@ -25076,7 +24889,7 @@ var init_useFinalizePreview = __esm({
25076
24889
  });
25077
24890
 
25078
24891
  // packages/experience-design-system-cli-legacy/src/import/tui/hooks/useReviewSession.ts
25079
- import { useCallback as useCallback4, useEffect as useEffect9, useRef as useRef6, useState as useState14 } from "react";
24892
+ import { useCallback as useCallback4, useEffect as useEffect9, useRef as useRef5, useState as useState13 } from "react";
25080
24893
  function loadReviewSessionState({
25081
24894
  extractSessionId,
25082
24895
  tokenSessionId,
@@ -25122,10 +24935,10 @@ function useReviewSession({
25122
24935
  tokensPath,
25123
24936
  onExtraLoaded
25124
24937
  }) {
25125
- const [components, setComponents] = useState14([]);
25126
- const [loading, setLoading] = useState14(true);
25127
- const [loadError, setLoadError] = useState14(null);
25128
- const [availableTokens, setAvailableTokens] = useState14([]);
24938
+ const [components, setComponents] = useState13([]);
24939
+ const [loading, setLoading] = useState13(true);
24940
+ const [loadError, setLoadError] = useState13(null);
24941
+ const [availableTokens, setAvailableTokens] = useState13([]);
25129
24942
  const loadInitialState = useCallback4(async () => {
25130
24943
  const result = loadSession();
25131
24944
  if (result.error || !tokensPath) return { result, catalog: result.tokens };
@@ -25186,8 +24999,8 @@ function useReviewSession({
25186
24999
  };
25187
25000
  }
25188
25001
  function useReviewMetadata({ components, selectedIdx, extractSessionId }) {
25189
- const [reviewMetadata, setReviewMetadata] = useState14(null);
25190
- const [componentRationale, setComponentRationale] = useState14(null);
25002
+ const [reviewMetadata, setReviewMetadata] = useState13(null);
25003
+ const [componentRationale, setComponentRationale] = useState13(null);
25191
25004
  useEffect9(() => {
25192
25005
  const current = components[selectedIdx];
25193
25006
  if (!current) {
@@ -25229,8 +25042,8 @@ function createReviewHistorySnapshot(components, options = {}) {
25229
25042
  };
25230
25043
  }
25231
25044
  function useReviewHistory({ loading, components, createSnapshot, applySnapshot }) {
25232
- const historyRef = useRef6(null);
25233
- const historySeededRef = useRef6(false);
25045
+ const historyRef = useRef5(null);
25046
+ const historySeededRef = useRef5(false);
25234
25047
  useEffect9(() => {
25235
25048
  if (loading || historySeededRef.current) return;
25236
25049
  historySeededRef.current = true;
@@ -25320,7 +25133,7 @@ var init_useReviewSession = __esm({
25320
25133
  });
25321
25134
 
25322
25135
  // packages/experience-design-system-cli-legacy/src/import/tui/hooks/useReviewEditor.ts
25323
- import { useEffect as useEffect10, useRef as useRef7, useState as useState15 } from "react";
25136
+ import { useEffect as useEffect10, useRef as useRef6, useState as useState14 } from "react";
25324
25137
  function parseReviewEntry(draftValue) {
25325
25138
  const parsed = JSON.parse(draftValue);
25326
25139
  const keys = Object.keys(parsed);
@@ -25340,20 +25153,20 @@ function useReviewEditor({
25340
25153
  onEditSaved,
25341
25154
  onTokenSaved
25342
25155
  }) {
25343
- const [panelOpen, setPanelOpen] = useState15("none");
25344
- const [panelScrollOffset, setPanelScrollOffset] = useState15(0);
25345
- const [jsonScrollOffset, setJsonScrollOffset] = useState15(0);
25346
- const [textEntryActive, setTextEntryActive] = useState15(false);
25347
- const [showJson, setShowJson] = useState15(false);
25348
- const [showHiddenProps, setShowHiddenProps] = useState15(false);
25349
- const [draftValue, setDraftValue] = useState15("");
25350
- const [saveError, setSaveError] = useState15(null);
25351
- const [tokenReviewRow, setTokenReviewRow] = useState15(0);
25352
- const [tokenReviewEditing, setTokenReviewEditing] = useState15(false);
25353
- const [tokenReviewEditCursor, setTokenReviewEditCursor] = useState15(0);
25354
- const [tokenReviewEditSelection, setTokenReviewEditSelection] = useState15(/* @__PURE__ */ new Set());
25355
- const tokenReviewSuggestedRef = useRef7(/* @__PURE__ */ new Map());
25356
- const pendingGRef = useRef7(false);
25156
+ const [panelOpen, setPanelOpen] = useState14("none");
25157
+ const [panelScrollOffset, setPanelScrollOffset] = useState14(0);
25158
+ const [jsonScrollOffset, setJsonScrollOffset] = useState14(0);
25159
+ const [textEntryActive, setTextEntryActive] = useState14(false);
25160
+ const [showJson, setShowJson] = useState14(false);
25161
+ const [showHiddenProps, setShowHiddenProps] = useState14(false);
25162
+ const [draftValue, setDraftValue] = useState14("");
25163
+ const [saveError, setSaveError] = useState14(null);
25164
+ const [tokenReviewRow, setTokenReviewRow] = useState14(0);
25165
+ const [tokenReviewEditing, setTokenReviewEditing] = useState14(false);
25166
+ const [tokenReviewEditCursor, setTokenReviewEditCursor] = useState14(0);
25167
+ const [tokenReviewEditSelection, setTokenReviewEditSelection] = useState14(/* @__PURE__ */ new Set());
25168
+ const tokenReviewSuggestedRef = useRef6(/* @__PURE__ */ new Map());
25169
+ const pendingGRef = useRef6(false);
25357
25170
  useEffect10(() => {
25358
25171
  setTokenReviewRow(0);
25359
25172
  setTokenReviewEditing(false);
@@ -25474,12 +25287,12 @@ var init_useReviewEditor = __esm({
25474
25287
  });
25475
25288
 
25476
25289
  // packages/experience-design-system-cli-legacy/src/import/tui/hooks/useReviewSurfaceState.ts
25477
- import { useState as useState16 } from "react";
25290
+ import { useState as useState15 } from "react";
25478
25291
  function useReviewSurfaceState(initialFinalizeError = null) {
25479
- const [sidebarFocused, setSidebarFocused] = useState16(true);
25480
- const [showFinalize, setShowFinalize] = useState16(false);
25481
- const [showQuit, setShowQuit] = useState16(false);
25482
- const [finalizeError, setFinalizeError] = useState16(initialFinalizeError);
25292
+ const [sidebarFocused, setSidebarFocused] = useState15(true);
25293
+ const [showFinalize, setShowFinalize] = useState15(false);
25294
+ const [showQuit, setShowQuit] = useState15(false);
25295
+ const [finalizeError, setFinalizeError] = useState15(initialFinalizeError);
25483
25296
  return {
25484
25297
  sidebarFocused,
25485
25298
  setSidebarFocused,
@@ -25498,8 +25311,8 @@ var init_useReviewSurfaceState = __esm({
25498
25311
  });
25499
25312
 
25500
25313
  // packages/experience-design-system-cli-legacy/src/analyze/select/tui/components/QuitDialog.tsx
25501
- import { Box as Box35, Text as Text39 } from "ink";
25502
- import { Fragment as Fragment17, jsx as jsx44, jsxs as jsxs36 } from "react/jsx-runtime";
25314
+ import { Box as Box34, Text as Text38 } from "ink";
25315
+ import { Fragment as Fragment16, jsx as jsx43, jsxs as jsxs35 } from "react/jsx-runtime";
25503
25316
  function QuitDialog({ hasUnsavedDrafts, onConfirm, onCancel }) {
25504
25317
  useImmediateInput((input, key) => {
25505
25318
  if (input === "y" || key.return) {
@@ -25508,16 +25321,16 @@ function QuitDialog({ hasUnsavedDrafts, onConfirm, onCancel }) {
25508
25321
  onCancel();
25509
25322
  }
25510
25323
  });
25511
- return /* @__PURE__ */ jsxs36(Box35, { flexDirection: "column", borderStyle: "round", padding: 1, width: 50, children: [
25512
- /* @__PURE__ */ jsx44(Text39, { bold: true, children: "\u2500".repeat(19) + " Quit " + "\u2500".repeat(19) }),
25513
- /* @__PURE__ */ jsx44(Text39, { children: " " }),
25514
- hasUnsavedDrafts ? /* @__PURE__ */ jsxs36(Fragment17, { children: [
25515
- /* @__PURE__ */ jsx44(Text39, { children: "You have unsaved draft edits." }),
25516
- /* @__PURE__ */ jsx44(Text39, { children: "Session state is preserved \u2014 you can resume" }),
25517
- /* @__PURE__ */ jsx44(Text39, { children: "by running the same review command again." })
25518
- ] }) : /* @__PURE__ */ jsx44(Text39, { children: "Session is saved. Quit without finalizing?" }),
25519
- /* @__PURE__ */ jsx44(Text39, { children: " " }),
25520
- /* @__PURE__ */ jsx44(Text39, { children: " [y / Enter] Quit [n / Esc] Stay" })
25324
+ return /* @__PURE__ */ jsxs35(Box34, { flexDirection: "column", borderStyle: "round", padding: 1, width: 50, children: [
25325
+ /* @__PURE__ */ jsx43(Text38, { bold: true, children: "\u2500".repeat(19) + " Quit " + "\u2500".repeat(19) }),
25326
+ /* @__PURE__ */ jsx43(Text38, { children: " " }),
25327
+ hasUnsavedDrafts ? /* @__PURE__ */ jsxs35(Fragment16, { children: [
25328
+ /* @__PURE__ */ jsx43(Text38, { children: "You have unsaved draft edits." }),
25329
+ /* @__PURE__ */ jsx43(Text38, { children: "Session state is preserved \u2014 you can resume" }),
25330
+ /* @__PURE__ */ jsx43(Text38, { children: "by running the same review command again." })
25331
+ ] }) : /* @__PURE__ */ jsx43(Text38, { children: "Session is saved. Quit without finalizing?" }),
25332
+ /* @__PURE__ */ jsx43(Text38, { children: " " }),
25333
+ /* @__PURE__ */ jsx43(Text38, { children: " [y / Enter] Quit [n / Esc] Stay" })
25521
25334
  ] });
25522
25335
  }
25523
25336
  var init_QuitDialog = __esm({
@@ -25528,8 +25341,8 @@ var init_QuitDialog = __esm({
25528
25341
  });
25529
25342
 
25530
25343
  // packages/experience-design-system-cli-legacy/src/import/tui/components/ReviewDialogs.tsx
25531
- import { Box as Box36, Text as Text40 } from "ink";
25532
- import { Fragment as Fragment18, jsx as jsx45, jsxs as jsxs37 } from "react/jsx-runtime";
25344
+ import { Box as Box35, Text as Text39 } from "ink";
25345
+ import { Fragment as Fragment17, jsx as jsx44, jsxs as jsxs36 } from "react/jsx-runtime";
25533
25346
  function ReviewFinalizeDialogs({
25534
25347
  showFinalize,
25535
25348
  showQuit,
@@ -25543,8 +25356,8 @@ function ReviewFinalizeDialogs({
25543
25356
  onQuitCancel
25544
25357
  }) {
25545
25358
  const { accepted, rejected, needsReview } = countReviewStatuses(components);
25546
- return /* @__PURE__ */ jsxs37(Fragment18, { children: [
25547
- showFinalize && /* @__PURE__ */ jsx45(
25359
+ return /* @__PURE__ */ jsxs36(Fragment17, { children: [
25360
+ showFinalize && /* @__PURE__ */ jsx44(
25548
25361
  FinalizeDialog,
25549
25362
  {
25550
25363
  accepted,
@@ -25557,7 +25370,7 @@ function ReviewFinalizeDialogs({
25557
25370
  onCancel: onFinalizeCancel
25558
25371
  }
25559
25372
  ),
25560
- showQuit && /* @__PURE__ */ jsx45(QuitDialog, { hasUnsavedDrafts: false, onConfirm: onQuitConfirm, onCancel: onQuitCancel })
25373
+ showQuit && /* @__PURE__ */ jsx44(QuitDialog, { hasUnsavedDrafts: false, onConfirm: onQuitConfirm, onCancel: onQuitCancel })
25561
25374
  ] });
25562
25375
  }
25563
25376
  function ReviewStepDialogs({
@@ -25567,7 +25380,7 @@ function ReviewStepDialogs({
25567
25380
  onFinalize,
25568
25381
  onQuit
25569
25382
  }) {
25570
- return /* @__PURE__ */ jsx45(
25383
+ return /* @__PURE__ */ jsx44(
25571
25384
  ReviewFinalizeDialogs,
25572
25385
  {
25573
25386
  showFinalize: surfaceState.showFinalize,
@@ -25585,12 +25398,12 @@ function ReviewStepDialogs({
25585
25398
  }
25586
25399
  function ReviewReloadDialog({ open }) {
25587
25400
  if (!open) return null;
25588
- return /* @__PURE__ */ jsxs37(Box36, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
25589
- /* @__PURE__ */ jsx45(Text40, { bold: true, color: PALETTE.warning, children: "Reload from saved state?" }),
25590
- /* @__PURE__ */ jsx45(Text40, { children: "Unsaved in-memory changes will be lost." }),
25591
- /* @__PURE__ */ jsx45(Text40, { children: " " }),
25592
- /* @__PURE__ */ jsx45(Text40, { children: " [Enter] Confirm" }),
25593
- /* @__PURE__ */ jsx45(Text40, { children: " [Esc] Cancel" })
25401
+ return /* @__PURE__ */ jsxs36(Box35, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
25402
+ /* @__PURE__ */ jsx44(Text39, { bold: true, color: PALETTE.warning, children: "Reload from saved state?" }),
25403
+ /* @__PURE__ */ jsx44(Text39, { children: "Unsaved in-memory changes will be lost." }),
25404
+ /* @__PURE__ */ jsx44(Text39, { children: " " }),
25405
+ /* @__PURE__ */ jsx44(Text39, { children: " [Enter] Confirm" }),
25406
+ /* @__PURE__ */ jsx44(Text39, { children: " [Esc] Cancel" })
25594
25407
  ] });
25595
25408
  }
25596
25409
  var init_ReviewDialogs = __esm({
@@ -25827,20 +25640,20 @@ var init_preview_annotations = __esm({
25827
25640
  });
25828
25641
 
25829
25642
  // packages/experience-design-system-cli-legacy/src/import/tui/useLivePreview.ts
25830
- import { useCallback as useCallback5, useEffect as useEffect11, useRef as useRef8, useState as useState17 } from "react";
25643
+ import { useCallback as useCallback5, useEffect as useEffect11, useRef as useRef7, useState as useState16 } from "react";
25831
25644
  function useLivePreview(opts) {
25832
25645
  const debounceMs = opts.debounceMs ?? DEFAULT_DEBOUNCE_MS;
25833
- const [status, setStatus] = useState17("idle");
25834
- const [disabled, setDisabled] = useState17(false);
25835
- const timerRef = useRef8(null);
25836
- const generationRef = useRef8(0);
25837
- const latestRef = useRef8(0);
25838
- const inflightRef = useRef8(0);
25839
- const optsRef = useRef8(opts);
25646
+ const [status, setStatus] = useState16("idle");
25647
+ const [disabled, setDisabled] = useState16(false);
25648
+ const timerRef = useRef7(null);
25649
+ const generationRef = useRef7(0);
25650
+ const latestRef = useRef7(0);
25651
+ const inflightRef = useRef7(0);
25652
+ const optsRef = useRef7(opts);
25840
25653
  useEffect11(() => {
25841
25654
  optsRef.current = opts;
25842
25655
  });
25843
- const disabledRef = useRef8(disabled);
25656
+ const disabledRef = useRef7(disabled);
25844
25657
  useEffect11(() => {
25845
25658
  disabledRef.current = disabled;
25846
25659
  }, [disabled]);
@@ -25925,7 +25738,7 @@ var init_useLivePreview = __esm({
25925
25738
  });
25926
25739
 
25927
25740
  // packages/experience-design-system-cli-legacy/src/import/tui/hooks/useReviewPreview.ts
25928
- import { useCallback as useCallback6, useEffect as useEffect12, useState as useState18 } from "react";
25741
+ import { useCallback as useCallback6, useEffect as useEffect12, useState as useState17 } from "react";
25929
25742
  function useReviewPreview({
25930
25743
  components,
25931
25744
  loading,
@@ -25939,8 +25752,8 @@ function useReviewPreview({
25939
25752
  deleteAllComponents,
25940
25753
  onResult
25941
25754
  }) {
25942
- const [previewAnnotations, setPreviewAnnotations] = useState18(/* @__PURE__ */ new Map());
25943
- const [removedComponents, setRemovedComponents] = useState18([]);
25755
+ const [previewAnnotations, setPreviewAnnotations] = useState17(/* @__PURE__ */ new Map());
25756
+ const [removedComponents, setRemovedComponents] = useState17([]);
25944
25757
  const handleResult = useCallback6(
25945
25758
  (response) => {
25946
25759
  if (!response) return;
@@ -25966,7 +25779,7 @@ function useReviewPreview({
25966
25779
  onResult: handleResult,
25967
25780
  deleteAllComponents
25968
25781
  });
25969
- const [spinnerTick, setSpinnerTick] = useState18(0);
25782
+ const [spinnerTick, setSpinnerTick] = useState17(0);
25970
25783
  useEffect12(() => {
25971
25784
  if (livePreviewHook.status !== "running") return;
25972
25785
  const id = setInterval(() => setSpinnerTick((tick2) => tick2 + 1), 80);
@@ -25992,8 +25805,8 @@ var init_useReviewPreview = __esm({
25992
25805
  });
25993
25806
 
25994
25807
  // packages/experience-design-system-cli-legacy/src/import/tui/components/LivePreviewSummary.tsx
25995
- import { Box as Box37, Text as Text41 } from "ink";
25996
- import { jsx as jsx46, jsxs as jsxs38 } from "react/jsx-runtime";
25808
+ import { Box as Box36, Text as Text40 } from "ink";
25809
+ import { jsx as jsx45, jsxs as jsxs37 } from "react/jsx-runtime";
25997
25810
  function LivePreviewSummary({
25998
25811
  enabled,
25999
25812
  previewAnnotations,
@@ -26007,19 +25820,19 @@ function LivePreviewSummary({
26007
25820
  const counts = { new: 0, changed: 0, removed: 0, breaking: 0 };
26008
25821
  for (const annotation of previewAnnotations.values()) counts[annotation] += 1;
26009
25822
  const hasCounts = counts.new + counts.changed + counts.removed + counts.breaking > 0;
26010
- if (disabled) return /* @__PURE__ */ jsx46(Text41, { dimColor: true, children: "Preview: disabled (creds rejected)" });
26011
- if (status === "running" && !hasCounts) return /* @__PURE__ */ jsx46(Text41, { dimColor: true, children: `Preview: ${spinner} running...` });
25823
+ if (disabled) return /* @__PURE__ */ jsx45(Text40, { dimColor: true, children: "Preview: disabled (creds rejected)" });
25824
+ if (status === "running" && !hasCounts) return /* @__PURE__ */ jsx45(Text40, { dimColor: true, children: `Preview: ${spinner} running...` });
26012
25825
  if (!hasCounts) return null;
26013
- return /* @__PURE__ */ jsxs38(Box37, { children: [
26014
- /* @__PURE__ */ jsx46(Text41, { children: "Preview: " }),
26015
- /* @__PURE__ */ jsx46(Text41, { color: PALETTE.success, children: `${counts.new} new` }),
26016
- /* @__PURE__ */ jsx46(Text41, { children: " \xB7 " }),
26017
- /* @__PURE__ */ jsx46(Text41, { color: PALETTE.warning, children: `${counts.changed} changed` }),
26018
- /* @__PURE__ */ jsx46(Text41, { children: " \xB7 " }),
26019
- /* @__PURE__ */ jsx46(Text41, { dimColor: true, children: `${counts.removed} removed` }),
26020
- showRemovedListHint && removedCount > 0 && /* @__PURE__ */ jsx46(Text41, { dimColor: true, children: " ([d] removed list)" }),
26021
- /* @__PURE__ */ jsx46(Text41, { children: " \xB7 " }),
26022
- /* @__PURE__ */ jsx46(Text41, { color: PALETTE.error, bold: true, children: `${counts.breaking} breaking` })
25826
+ return /* @__PURE__ */ jsxs37(Box36, { children: [
25827
+ /* @__PURE__ */ jsx45(Text40, { children: "Preview: " }),
25828
+ /* @__PURE__ */ jsx45(Text40, { color: PALETTE.success, children: `${counts.new} new` }),
25829
+ /* @__PURE__ */ jsx45(Text40, { children: " \xB7 " }),
25830
+ /* @__PURE__ */ jsx45(Text40, { color: PALETTE.warning, children: `${counts.changed} changed` }),
25831
+ /* @__PURE__ */ jsx45(Text40, { children: " \xB7 " }),
25832
+ /* @__PURE__ */ jsx45(Text40, { dimColor: true, children: `${counts.removed} removed` }),
25833
+ showRemovedListHint && removedCount > 0 && /* @__PURE__ */ jsx45(Text40, { dimColor: true, children: " ([d] removed list)" }),
25834
+ /* @__PURE__ */ jsx45(Text40, { children: " \xB7 " }),
25835
+ /* @__PURE__ */ jsx45(Text40, { color: PALETTE.error, bold: true, children: `${counts.breaking} breaking` })
26023
25836
  ] });
26024
25837
  }
26025
25838
  var init_LivePreviewSummary = __esm({
@@ -26030,10 +25843,10 @@ var init_LivePreviewSummary = __esm({
26030
25843
  });
26031
25844
 
26032
25845
  // packages/experience-design-system-cli-legacy/src/import/tui/steps/GenerateReviewStep.tsx
26033
- import { useCallback as useCallback7, useEffect as useEffect13, useMemo as useMemo3, useRef as useRef9, useState as useState19 } from "react";
25846
+ import { useCallback as useCallback7, useEffect as useEffect13, useMemo as useMemo3, useRef as useRef8, useState as useState18 } from "react";
26034
25847
  import figures6 from "figures";
26035
- import { Box as Box38, Text as Text42 } from "ink";
26036
- import { Fragment as Fragment19, jsx as jsx47, jsxs as jsxs39 } from "react/jsx-runtime";
25848
+ import { Box as Box37, Text as Text41 } from "ink";
25849
+ import { Fragment as Fragment18, jsx as jsx46, jsxs as jsxs38 } from "react/jsx-runtime";
26037
25850
  function sortComponentsForSidebar(components, cycleParticipants) {
26038
25851
  const isEmpty2 = (entry) => Object.keys(entry.$properties ?? {}).length === 0 && Object.keys(entry.$slots ?? {}).length === 0;
26039
25852
  const tier = (c2) => {
@@ -26074,10 +25887,10 @@ function CyclePathLine({
26074
25887
  highlightComponents = false,
26075
25888
  highlightLine = false
26076
25889
  }) {
26077
- return /* @__PURE__ */ jsxs39(Text42, { color: highlightLine ? PALETTE.warning : void 0, children: [
25890
+ return /* @__PURE__ */ jsxs38(Text41, { color: highlightLine ? PALETTE.warning : void 0, children: [
26078
25891
  prefix,
26079
25892
  segments.map(
26080
- (segment, index) => segment.kind === "slot" ? /* @__PURE__ */ jsx47(Text42, { color: PALETTE.info, children: segment.text }, index) : segment.kind === "arrow" ? /* @__PURE__ */ jsx47(Text42, { dimColor: true, children: segment.text }, index) : /* @__PURE__ */ jsx47(Text42, { color: highlightComponents ? PALETTE.warning : void 0, children: segment.text }, index)
25893
+ (segment, index) => segment.kind === "slot" ? /* @__PURE__ */ jsx46(Text41, { color: PALETTE.info, children: segment.text }, index) : segment.kind === "arrow" ? /* @__PURE__ */ jsx46(Text41, { dimColor: true, children: segment.text }, index) : /* @__PURE__ */ jsx46(Text41, { color: highlightComponents ? PALETTE.warning : void 0, children: segment.text }, index)
26081
25894
  )
26082
25895
  ] });
26083
25896
  }
@@ -26089,31 +25902,31 @@ function CycleDetailPanel({
26089
25902
  height
26090
25903
  }) {
26091
25904
  const lines = [
26092
- /* @__PURE__ */ jsx47(Text42, { bold: true, color: PALETTE.warning, children: `SLOT DEPENDENCY CYCLES (${cycles.length})` }, "cyc-title"),
26093
- /* @__PURE__ */ jsx47(Text42, { dimColor: true, children: "push will fail until these are resolved" }, "cyc-sub"),
26094
- /* @__PURE__ */ jsx47(Text42, { dimColor: true, children: "Reject a cycle member or remove a slot edge to break the cycle." }, "cyc-guidance"),
26095
- /* @__PURE__ */ jsx47(Text42, { children: " " }, "cyc-space")
25905
+ /* @__PURE__ */ jsx46(Text41, { bold: true, color: PALETTE.warning, children: `SLOT DEPENDENCY CYCLES (${cycles.length})` }, "cyc-title"),
25906
+ /* @__PURE__ */ jsx46(Text41, { dimColor: true, children: "push will fail until these are resolved" }, "cyc-sub"),
25907
+ /* @__PURE__ */ jsx46(Text41, { dimColor: true, children: "Reject a cycle member or remove a slot edge to break the cycle." }, "cyc-guidance"),
25908
+ /* @__PURE__ */ jsx46(Text41, { children: " " }, "cyc-space")
26096
25909
  ];
26097
25910
  cycles.forEach((cycle, index) => {
26098
25911
  const nodeCount = new Set(cycle.path).size;
26099
25912
  const isCursor = index === cursor;
26100
25913
  lines.push(
26101
- /* @__PURE__ */ jsx47(Text42, { bold: true, inverse: isCursor, children: `${isCursor ? figures6.pointer : " "} Cycle ${index + 1} (${nodeCount} component${nodeCount === 1 ? "" : "s"}):` }, `cyc-h-${index}`),
26102
- /* @__PURE__ */ jsx47(CyclePathLine, { segments: formatCyclePathSegments(cycle, 16), prefix: " " }, `cyc-p-${index}`)
25914
+ /* @__PURE__ */ jsx46(Text41, { bold: true, inverse: isCursor, children: `${isCursor ? figures6.pointer : " "} Cycle ${index + 1} (${nodeCount} component${nodeCount === 1 ? "" : "s"}):` }, `cyc-h-${index}`),
25915
+ /* @__PURE__ */ jsx46(CyclePathLine, { segments: formatCyclePathSegments(cycle, 16), prefix: " " }, `cyc-p-${index}`)
26103
25916
  );
26104
25917
  if (cycle.suggestedBreak) {
26105
25918
  lines.push(
26106
- /* @__PURE__ */ jsx47(Text42, { dimColor: true, children: ` Suggested fix: remove [${cycle.suggestedBreak.slotName}] from ${cycle.suggestedBreak.fromComponent}` }, `cyc-fix-${index}`)
25919
+ /* @__PURE__ */ jsx46(Text41, { dimColor: true, children: ` Suggested fix: remove [${cycle.suggestedBreak.slotName}] from ${cycle.suggestedBreak.fromComponent}` }, `cyc-fix-${index}`)
26107
25920
  );
26108
25921
  }
26109
- lines.push(/* @__PURE__ */ jsx47(Text42, { children: " " }, `cyc-s-${index}`));
25922
+ lines.push(/* @__PURE__ */ jsx46(Text41, { children: " " }, `cyc-s-${index}`));
26110
25923
  });
26111
25924
  const footer = "[\u2191\u2193] move [Enter] fix cycle [c/q/Esc] close";
26112
25925
  const viewportHeight = Math.max(1, height - 3);
26113
25926
  const visible = lines.slice(scrollOffset, scrollOffset + viewportHeight - 1);
26114
- return /* @__PURE__ */ jsxs39(FixedPanel, { width, height, borderStyle: "round", borderColor: PALETTE.warning, paddingLeft: 1, children: [
25927
+ return /* @__PURE__ */ jsxs38(FixedPanel, { width, height, borderStyle: "round", borderColor: PALETTE.warning, paddingLeft: 1, children: [
26115
25928
  visible,
26116
- /* @__PURE__ */ jsx47(Text42, { dimColor: true, children: footer })
25929
+ /* @__PURE__ */ jsx46(Text41, { dimColor: true, children: footer })
26117
25930
  ] });
26118
25931
  }
26119
25932
  function BreakCyclePanel({
@@ -26124,14 +25937,14 @@ function BreakCyclePanel({
26124
25937
  width,
26125
25938
  height
26126
25939
  }) {
26127
- return /* @__PURE__ */ jsxs39(FixedPanel, { width, height, borderStyle: "round", borderColor: PALETTE.warning, paddingLeft: 1, children: [
26128
- /* @__PURE__ */ jsx47(Text42, { bold: true, color: PALETTE.warning, children: "BREAK CYCLE \u2014 remove a slot edge" }),
26129
- cycle && /* @__PURE__ */ jsx47(CyclePathLine, { segments: formatCyclePathSegments(cycle), prefix: " ", highlightComponents: true }),
26130
- /* @__PURE__ */ jsx47(Text42, { dimColor: true, children: cycle ? "Deleting an edge removes it from $allowedComponents (undo with Ctrl+Z)." : "No cycle highlighted." }),
26131
- /* @__PURE__ */ jsx47(Text42, { children: " " }),
26132
- edges.length > 0 && /* @__PURE__ */ jsx47(Text42, { dimColor: true, children: "remove slot edge:" }),
26133
- edges.map((edge, index) => /* @__PURE__ */ jsx47(Text42, { inverse: index === cursor, children: `${index === cursor ? figures6.pointer : " "} remove '${edge.toComponent}' from ${edge.fromComponent}.$slots.${edge.slotName}.$allowedComponents` }, `${edge.fromComponent}-${edge.slotName}-${edge.toComponent}`)),
26134
- confirming ? /* @__PURE__ */ jsx47(Text42, { bold: true, color: PALETTE.warning, children: "Delete this slot edge? [y] confirm [n] cancel" }) : /* @__PURE__ */ jsx47(Text42, { dimColor: true, children: "[\u2191\u2193] move [Enter] delete [x/Esc] close" })
25940
+ return /* @__PURE__ */ jsxs38(FixedPanel, { width, height, borderStyle: "round", borderColor: PALETTE.warning, paddingLeft: 1, children: [
25941
+ /* @__PURE__ */ jsx46(Text41, { bold: true, color: PALETTE.warning, children: "BREAK CYCLE \u2014 remove a slot edge" }),
25942
+ cycle && /* @__PURE__ */ jsx46(CyclePathLine, { segments: formatCyclePathSegments(cycle), prefix: " ", highlightComponents: true }),
25943
+ /* @__PURE__ */ jsx46(Text41, { dimColor: true, children: cycle ? "Deleting an edge removes it from $allowedComponents (undo with Ctrl+Z)." : "No cycle highlighted." }),
25944
+ /* @__PURE__ */ jsx46(Text41, { children: " " }),
25945
+ edges.length > 0 && /* @__PURE__ */ jsx46(Text41, { dimColor: true, children: "remove slot edge:" }),
25946
+ edges.map((edge, index) => /* @__PURE__ */ jsx46(Text41, { inverse: index === cursor, children: `${index === cursor ? figures6.pointer : " "} remove '${edge.toComponent}' from ${edge.fromComponent}.$slots.${edge.slotName}.$allowedComponents` }, `${edge.fromComponent}-${edge.slotName}-${edge.toComponent}`)),
25947
+ confirming ? /* @__PURE__ */ jsx46(Text41, { bold: true, color: PALETTE.warning, children: "Delete this slot edge? [y] confirm [n] cancel" }) : /* @__PURE__ */ jsx46(Text41, { dimColor: true, children: "[\u2191\u2193] move [Enter] delete [x/Esc] close" })
26135
25948
  ] });
26136
25949
  }
26137
25950
  function buildBreakingRows(breakingChanges) {
@@ -26177,9 +25990,9 @@ function deriveBreakingChanges(response) {
26177
25990
  }
26178
25991
  function GenerateReviewStep(props) {
26179
25992
  if (!props.extractSessionId) {
26180
- return /* @__PURE__ */ jsx47(Box38, { paddingX: 2, paddingY: 1, children: /* @__PURE__ */ jsx47(Text42, { color: PALETTE.error, children: "Error: no session ID \u2014 cannot load generated definitions." }) });
25993
+ return /* @__PURE__ */ jsx46(Box37, { paddingX: 2, paddingY: 1, children: /* @__PURE__ */ jsx46(Text41, { color: PALETTE.error, children: "Error: no session ID \u2014 cannot load generated definitions." }) });
26181
25994
  }
26182
- return /* @__PURE__ */ jsx47(GenerateReviewStepView, { ...props, extractSessionId: props.extractSessionId });
25995
+ return /* @__PURE__ */ jsx46(GenerateReviewStepView, { ...props, extractSessionId: props.extractSessionId });
26183
25996
  }
26184
25997
  function GenerateReviewStepView({
26185
25998
  extractSessionId,
@@ -26195,7 +26008,7 @@ function GenerateReviewStepView({
26195
26008
  initialFinalizeError = null
26196
26009
  }) {
26197
26010
  const { columns: terminalWidth, rows: terminalRows } = useTerminalSize();
26198
- const [slotCycles, setSlotCycles] = useState19([]);
26011
+ const [slotCycles, setSlotCycles] = useState18([]);
26199
26012
  const setLoadedSlotCycles = useCallback7((cycles) => {
26200
26013
  setSlotCycles(cycles ?? []);
26201
26014
  }, []);
@@ -26227,7 +26040,7 @@ function GenerateReviewStepView({
26227
26040
  tokensPath,
26228
26041
  onExtraLoaded: setLoadedSlotCycles
26229
26042
  });
26230
- const [nav, setNav] = useState19({
26043
+ const [nav, setNav] = useState18({
26231
26044
  cursorRowIdx: 0,
26232
26045
  sidebarScrollOffset: 0
26233
26046
  });
@@ -26243,10 +26056,10 @@ function GenerateReviewStepView({
26243
26056
  finalizeError,
26244
26057
  setFinalizeError
26245
26058
  } = reviewSurface;
26246
- const [removedBannerCollapsed, setRemovedBannerCollapsed] = useState19(false);
26247
- const removedBannerDefaultedRef = useRef9(false);
26248
- const [cyclePanelScroll, setCyclePanelScroll] = useState19(0);
26249
- const [cyclesCursor, setCyclesCursor] = useState19(0);
26059
+ const [removedBannerCollapsed, setRemovedBannerCollapsed] = useState18(false);
26060
+ const removedBannerDefaultedRef = useRef8(false);
26061
+ const [cyclePanelScroll, setCyclePanelScroll] = useState18(0);
26062
+ const [cyclesCursor, setCyclesCursor] = useState18(0);
26250
26063
  const cyclePanel = useOverlayPanel({
26251
26064
  toggleKey: "c",
26252
26065
  onClose: () => {
@@ -26261,10 +26074,10 @@ function GenerateReviewStepView({
26261
26074
  setBreakConfirm(false);
26262
26075
  }
26263
26076
  });
26264
- const [breakCursor, setBreakCursor] = useState19(0);
26265
- const [breakConfirm, setBreakConfirm] = useState19(false);
26266
- const [expandedGroups, setExpandedGroups] = useState19(/* @__PURE__ */ new Set());
26267
- const seededGroupsRef = useRef9(false);
26077
+ const [breakCursor, setBreakCursor] = useState18(0);
26078
+ const [breakConfirm, setBreakConfirm] = useState18(false);
26079
+ const [expandedGroups, setExpandedGroups] = useState18(/* @__PURE__ */ new Set());
26080
+ const seededGroupsRef = useRef8(false);
26268
26081
  const {
26269
26082
  searchOpen,
26270
26083
  setSearchOpen,
@@ -26282,14 +26095,14 @@ function GenerateReviewStepView({
26282
26095
  setShowHelp
26283
26096
  } = useSidebarSearchState();
26284
26097
  const breakingPanel = useOverlayPanel({ toggleKey: "b", onClose: () => setBreakingDetailOpen(false) });
26285
- const [breakingChanges, setBreakingChanges] = useState19([]);
26286
- const [breakingCursor, setBreakingCursor] = useState19(0);
26287
- const [breakingDetailOpen, setBreakingDetailOpen] = useState19(false);
26288
- const [pendingEditorFocus, setPendingEditorFocus] = useState19(null);
26289
- const [autoRejected, setAutoRejected] = useState19([]);
26290
- const [undoSnapshot, setUndoSnapshot] = useState19(null);
26291
- const autoRejectFiredRef = useRef9(false);
26292
- const [showReloadDialog, setShowReloadDialog] = useState19(false);
26098
+ const [breakingChanges, setBreakingChanges] = useState18([]);
26099
+ const [breakingCursor, setBreakingCursor] = useState18(0);
26100
+ const [breakingDetailOpen, setBreakingDetailOpen] = useState18(false);
26101
+ const [pendingEditorFocus, setPendingEditorFocus] = useState18(null);
26102
+ const [autoRejected, setAutoRejected] = useState18([]);
26103
+ const [undoSnapshot, setUndoSnapshot] = useState18(null);
26104
+ const autoRejectFiredRef = useRef8(false);
26105
+ const [showReloadDialog, setShowReloadDialog] = useState18(false);
26293
26106
  const acceptedCountForPreview = components.filter((c2) => c2.status === "accepted").length;
26294
26107
  const { previewAnnotations, removedComponents, livePreviewHook, livePreviewSpinner } = useReviewPreview({
26295
26108
  components,
@@ -26421,7 +26234,7 @@ function GenerateReviewStepView({
26421
26234
  }),
26422
26235
  applySnapshot: applyHistorySnapshot
26423
26236
  });
26424
- const autoRejectPushedRef = useRef9(false);
26237
+ const autoRejectPushedRef = useRef8(false);
26425
26238
  useEffect13(() => {
26426
26239
  if (loading) return;
26427
26240
  if (!historySeededRef.current) return;
@@ -27036,13 +26849,13 @@ function GenerateReviewStepView({
27036
26849
  }
27037
26850
  });
27038
26851
  if (loading) {
27039
- return /* @__PURE__ */ jsx47(ReviewLoadingState, {});
26852
+ return /* @__PURE__ */ jsx46(ReviewLoadingState, {});
27040
26853
  }
27041
26854
  if (loadError) {
27042
- return /* @__PURE__ */ jsx47(ReviewLoadError, { message: loadError });
26855
+ return /* @__PURE__ */ jsx46(ReviewLoadError, { message: loadError });
27043
26856
  }
27044
26857
  if (showHelp) {
27045
- return /* @__PURE__ */ jsx47(HelpOverlay, { sections: HELP_SECTIONS2, handleInput: false, onClose: () => setShowHelp(false) });
26858
+ return /* @__PURE__ */ jsx46(HelpOverlay, { sections: HELP_SECTIONS2, handleInput: false, onClose: () => setShowHelp(false) });
27046
26859
  }
27047
26860
  const { selected, selectedJson, visibleJsonPanelValue } = getReviewSelectionState(
27048
26861
  components,
@@ -27082,8 +26895,8 @@ function GenerateReviewStepView({
27082
26895
  for (const c2 of closures.values()) if (c2.nodes.length > 1) return true;
27083
26896
  return false;
27084
26897
  })();
27085
- return /* @__PURE__ */ jsxs39(Box38, { flexDirection: "column", children: [
27086
- /* @__PURE__ */ jsx47(
26898
+ return /* @__PURE__ */ jsxs38(Box37, { flexDirection: "column", children: [
26899
+ /* @__PURE__ */ jsx46(
27087
26900
  ReviewStepDialogs,
27088
26901
  {
27089
26902
  surfaceState: reviewSurface,
@@ -27093,16 +26906,16 @@ function GenerateReviewStepView({
27093
26906
  onQuit
27094
26907
  }
27095
26908
  ),
27096
- /* @__PURE__ */ jsx47(ReviewReloadDialog, { open: showReloadDialog && !dialogOpen }),
27097
- removedComponents.length > 0 && !dialogOpen && /* @__PURE__ */ jsxs39(Box38, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.error, paddingX: 1, children: [
27098
- /* @__PURE__ */ jsx47(Text42, { bold: true, color: PALETTE.error, children: removedComponentsHeader(removedComponents.length, true) }),
27099
- !removedBannerCollapsed && /* @__PURE__ */ jsxs39(Fragment19, { children: [
27100
- /* @__PURE__ */ jsx47(Text42, { children: " " }),
27101
- removedComponents.map((rc) => /* @__PURE__ */ jsx47(Text42, { children: removedComponentLine(rc) }, rc.id))
26909
+ /* @__PURE__ */ jsx46(ReviewReloadDialog, { open: showReloadDialog && !dialogOpen }),
26910
+ removedComponents.length > 0 && !dialogOpen && /* @__PURE__ */ jsxs38(Box37, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.error, paddingX: 1, children: [
26911
+ /* @__PURE__ */ jsx46(Text41, { bold: true, color: PALETTE.error, children: removedComponentsHeader(removedComponents.length, true) }),
26912
+ !removedBannerCollapsed && /* @__PURE__ */ jsxs38(Fragment18, { children: [
26913
+ /* @__PURE__ */ jsx46(Text41, { children: " " }),
26914
+ removedComponents.map((rc) => /* @__PURE__ */ jsx46(Text41, { children: removedComponentLine(rc) }, rc.id))
27102
26915
  ] })
27103
26916
  ] }),
27104
- breakingChanges.length > 0 && !dialogOpen && /* @__PURE__ */ jsx47(Box38, { paddingX: 1, children: /* @__PURE__ */ jsx47(
27105
- Text42,
26917
+ breakingChanges.length > 0 && !dialogOpen && /* @__PURE__ */ jsx46(Box37, { paddingX: 1, children: /* @__PURE__ */ jsx46(
26918
+ Text41,
27106
26919
  {
27107
26920
  color: PALETTE.warning,
27108
26921
  children: `[b] ${breakingChanges.length} breaking change${breakingChanges.length === 1 ? "" : "s"}`
@@ -27112,14 +26925,14 @@ function GenerateReviewStepView({
27112
26925
  const row = breakingRows[breakingCursor];
27113
26926
  const comp = row ? breakingChanges.find((b) => b.componentName === row.componentName) : void 0;
27114
26927
  if (!comp) return null;
27115
- return /* @__PURE__ */ jsxs39(Box38, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
27116
- /* @__PURE__ */ jsx47(Text42, { bold: true, color: PALETTE.warning, children: `Breaking changes \u2014 ${comp.componentName}` }),
27117
- comp.impact && /* @__PURE__ */ jsx47(Text42, { dimColor: true, children: ` affects ${comp.impact.affectedExperiences} experience${comp.impact.affectedExperiences === 1 ? "" : "s"}, ${comp.impact.affectedFragments} fragment${comp.impact.affectedFragments === 1 ? "" : "s"}` }),
27118
- comp.changes.length === 0 ? /* @__PURE__ */ jsx47(Text42, { dimColor: true, children: " (no enumerated changes)" }) : comp.changes.map((change, ci) => /* @__PURE__ */ jsx47(Text42, { children: ` \u2022 ${formatBreakingChange(change, comp.current)}` }, `bd-detail-${ci}`)),
27119
- /* @__PURE__ */ jsx47(Text42, { dimColor: true, children: "[D/Esc] close detail" })
26928
+ return /* @__PURE__ */ jsxs38(Box37, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
26929
+ /* @__PURE__ */ jsx46(Text41, { bold: true, color: PALETTE.warning, children: `Breaking changes \u2014 ${comp.componentName}` }),
26930
+ comp.impact && /* @__PURE__ */ jsx46(Text41, { dimColor: true, children: ` affects ${comp.impact.affectedExperiences} experience${comp.impact.affectedExperiences === 1 ? "" : "s"}, ${comp.impact.affectedFragments} fragment${comp.impact.affectedFragments === 1 ? "" : "s"}` }),
26931
+ comp.changes.length === 0 ? /* @__PURE__ */ jsx46(Text41, { dimColor: true, children: " (no enumerated changes)" }) : comp.changes.map((change, ci) => /* @__PURE__ */ jsx46(Text41, { children: ` \u2022 ${formatBreakingChange(change, comp.current)}` }, `bd-detail-${ci}`)),
26932
+ /* @__PURE__ */ jsx46(Text41, { dimColor: true, children: "[D/Esc] close detail" })
27120
26933
  ] });
27121
26934
  })(),
27122
- !dialogOpen && /* @__PURE__ */ jsx47(
26935
+ !dialogOpen && /* @__PURE__ */ jsx46(
27123
26936
  LivePreviewSummary,
27124
26937
  {
27125
26938
  enabled: livePreview,
@@ -27138,16 +26951,16 @@ function GenerateReviewStepView({
27138
26951
  const participantSet = cycleView.structural;
27139
26952
  const members = stillRejected.filter((n) => participantSet.has(n)).sort();
27140
26953
  const ancestors = stillRejected.filter((n) => !participantSet.has(n)).sort();
27141
- return /* @__PURE__ */ jsxs39(Box38, { flexDirection: "column", borderStyle: "single", borderColor: PALETTE.error, paddingX: 1, children: [
27142
- /* @__PURE__ */ jsx47(Text42, { color: PALETTE.error, bold: true, children: `Cyclic component graph \u2014 auto-rejected ${stillRejected.length} component${stillRejected.length === 1 ? "" : "s"}:` }),
27143
- members.length > 0 && /* @__PURE__ */ jsx47(Text42, { color: PALETTE.error, children: ` Cycle members: ${members.join(", ")}` }),
27144
- ancestors.length > 0 && /* @__PURE__ */ jsx47(Text42, { color: PALETTE.error, children: ` Ancestors: ${ancestors.join(", ")}` }),
27145
- /* @__PURE__ */ jsx47(Text42, { dimColor: true, children: undoSnapshot ? " [Ctrl+Z] undo \xB7 [r]/[a] manually toggle \xB7 [F] continue" : " [r]/[a] manually toggle \xB7 [F] continue" })
26954
+ return /* @__PURE__ */ jsxs38(Box37, { flexDirection: "column", borderStyle: "single", borderColor: PALETTE.error, paddingX: 1, children: [
26955
+ /* @__PURE__ */ jsx46(Text41, { color: PALETTE.error, bold: true, children: `Cyclic component graph \u2014 auto-rejected ${stillRejected.length} component${stillRejected.length === 1 ? "" : "s"}:` }),
26956
+ members.length > 0 && /* @__PURE__ */ jsx46(Text41, { color: PALETTE.error, children: ` Cycle members: ${members.join(", ")}` }),
26957
+ ancestors.length > 0 && /* @__PURE__ */ jsx46(Text41, { color: PALETTE.error, children: ` Ancestors: ${ancestors.join(", ")}` }),
26958
+ /* @__PURE__ */ jsx46(Text41, { dimColor: true, children: undoSnapshot ? " [Ctrl+Z] undo \xB7 [r]/[a] manually toggle \xB7 [F] continue" : " [r]/[a] manually toggle \xB7 [F] continue" })
27146
26959
  ] });
27147
26960
  })(),
27148
- /* @__PURE__ */ jsx47(ReviewEmptyComponentsWarning, { count: emptyCount, hidden: dialogOpen }),
27149
- /* @__PURE__ */ jsx47(ReviewFinalizeError, { message: finalizeError, hidden: dialogOpen }),
27150
- !dialogOpen && breakPanel.isOpen && /* @__PURE__ */ jsx47(
26961
+ /* @__PURE__ */ jsx46(ReviewEmptyComponentsWarning, { count: emptyCount, hidden: dialogOpen }),
26962
+ /* @__PURE__ */ jsx46(ReviewFinalizeError, { message: finalizeError, hidden: dialogOpen }),
26963
+ !dialogOpen && breakPanel.isOpen && /* @__PURE__ */ jsx46(
27151
26964
  BreakCyclePanel,
27152
26965
  {
27153
26966
  cycle: cycleRows[cyclesCursor],
@@ -27158,7 +26971,7 @@ function GenerateReviewStepView({
27158
26971
  height: panelHeight
27159
26972
  }
27160
26973
  ),
27161
- !dialogOpen && cyclePanel.isOpen && !breakPanel.isOpen && /* @__PURE__ */ jsx47(
26974
+ !dialogOpen && cyclePanel.isOpen && !breakPanel.isOpen && /* @__PURE__ */ jsx46(
27162
26975
  CycleDetailPanel,
27163
26976
  {
27164
26977
  cycles: cycleRows,
@@ -27168,8 +26981,8 @@ function GenerateReviewStepView({
27168
26981
  height: panelHeight
27169
26982
  }
27170
26983
  ),
27171
- !dialogOpen && !cyclePanel.isOpen && !breakPanel.isOpen && /* @__PURE__ */ jsxs39(Box38, { children: [
27172
- breakingPanel.isOpen ? /* @__PURE__ */ jsx47(
26984
+ !dialogOpen && !cyclePanel.isOpen && !breakPanel.isOpen && /* @__PURE__ */ jsxs38(Box37, { children: [
26985
+ breakingPanel.isOpen ? /* @__PURE__ */ jsx46(
27173
26986
  GotoBanner,
27174
26987
  {
27175
26988
  title: `Breaking changes \u2014 ${breakingRows[breakingCursor]?.componentName ?? "unknown component"}`,
@@ -27182,7 +26995,7 @@ function GenerateReviewStepView({
27182
26995
  width: sidebarWidth,
27183
26996
  footerHint: "[\u2191/\u2193] move \xB7 [Enter] jump \xB7 [D] detail \xB7 [Esc] close"
27184
26997
  }
27185
- ) : /* @__PURE__ */ jsx47(
26998
+ ) : /* @__PURE__ */ jsx46(
27186
26999
  GroupedSidebar,
27187
27000
  {
27188
27001
  items: groupedItems,
@@ -27222,7 +27035,7 @@ function GenerateReviewStepView({
27222
27035
  graph: sidebarGraph
27223
27036
  }
27224
27037
  ),
27225
- selected ? /* @__PURE__ */ jsx47(
27038
+ selected ? /* @__PURE__ */ jsx46(
27226
27039
  ReviewComponentPanel,
27227
27040
  {
27228
27041
  selectedKey: selected.key,
@@ -27254,12 +27067,12 @@ function GenerateReviewStepView({
27254
27067
  livePreview: livePreviewHook,
27255
27068
  livePreviewSpinner
27256
27069
  }
27257
- ) : /* @__PURE__ */ jsx47(ReviewNoSelection, {})
27070
+ ) : /* @__PURE__ */ jsx46(ReviewNoSelection, {})
27258
27071
  ] }),
27259
- !dialogOpen && cycleRows.length > 0 && !cyclePanel.isOpen && !breakPanel.isOpen && /* @__PURE__ */ jsxs39(Box38, { flexDirection: "column", children: [
27260
- /* @__PURE__ */ jsx47(Text42, { color: PALETTE.warning, children: `\u26A0 ${cycleRows.length} slot dependency cycle${cycleRows.length === 1 ? "" : "s"} detected \u2014 push will fail` }),
27072
+ !dialogOpen && cycleRows.length > 0 && !cyclePanel.isOpen && !breakPanel.isOpen && /* @__PURE__ */ jsxs38(Box37, { flexDirection: "column", children: [
27073
+ /* @__PURE__ */ jsx46(Text41, { color: PALETTE.warning, children: `\u26A0 ${cycleRows.length} slot dependency cycle${cycleRows.length === 1 ? "" : "s"} detected \u2014 push will fail` }),
27261
27074
  cycleRows.slice(0, 3).map((cycle, idx) => {
27262
- return /* @__PURE__ */ jsx47(
27075
+ return /* @__PURE__ */ jsx46(
27263
27076
  CyclePathLine,
27264
27077
  {
27265
27078
  segments: formatCyclePathSegments(cycle),
@@ -27270,10 +27083,10 @@ function GenerateReviewStepView({
27270
27083
  `cyc-banner-${idx}`
27271
27084
  );
27272
27085
  }),
27273
- cycleRows.length > 3 && /* @__PURE__ */ jsx47(Text42, { color: PALETTE.warning, children: ` \u2026${cycleRows.length - 3} more` }),
27274
- /* @__PURE__ */ jsx47(Text42, { dimColor: true, children: " press [c] for detail" })
27086
+ cycleRows.length > 3 && /* @__PURE__ */ jsx46(Text41, { color: PALETTE.warning, children: ` \u2026${cycleRows.length - 3} more` }),
27087
+ /* @__PURE__ */ jsx46(Text41, { dimColor: true, children: " press [c] for detail" })
27275
27088
  ] }),
27276
- /* @__PURE__ */ jsx47(
27089
+ /* @__PURE__ */ jsx46(
27277
27090
  SearchMatchSummary,
27278
27091
  {
27279
27092
  open: searchOpen,
@@ -27284,7 +27097,7 @@ function GenerateReviewStepView({
27284
27097
  hidden: dialogOpen
27285
27098
  }
27286
27099
  ),
27287
- !dialogOpen && sidebarFocused && /* @__PURE__ */ jsx47(CompactControlBar, { hasGroupRoots, searchActive: searchOpen || searchQuery.length > 0 })
27100
+ !dialogOpen && sidebarFocused && /* @__PURE__ */ jsx46(CompactControlBar, { hasGroupRoots, searchActive: searchOpen || searchQuery.length > 0 })
27288
27101
  ] });
27289
27102
  }
27290
27103
  var HELP_SECTIONS2;
@@ -27673,8 +27486,8 @@ __export(WizardApp_exports, {
27673
27486
  parsePrintTokensCount: () => parsePrintTokensCount,
27674
27487
  shouldRunMapTokens: () => shouldRunMapTokens
27675
27488
  });
27676
- import { useEffect as useEffect14, useRef as useRef10, useState as useState20 } from "react";
27677
- import { Box as Box39, Text as Text43 } from "ink";
27489
+ import { useEffect as useEffect14, useRef as useRef9, useState as useState19 } from "react";
27490
+ import { Box as Box38, Text as Text42 } from "ink";
27678
27491
  import { join as join20, resolve as resolve18 } from "node:path";
27679
27492
  import { appendFileSync as appendFileSync2, writeFileSync } from "node:fs";
27680
27493
  import { access as access7, stat as stat5, writeFile as writeFile5 } from "node:fs/promises";
@@ -27682,7 +27495,7 @@ import { tmpdir } from "node:os";
27682
27495
  import { execFile as execFile2, spawn as spawn5 } from "node:child_process";
27683
27496
  import { mkdir as mkdir4 } from "node:fs/promises";
27684
27497
  import { buildCDF as buildCDF3, validateCDF as validateCDF3, validateSlotReferences as validateSlotReferences2 } from "@contentful/experience-design-system-types";
27685
- import { jsx as jsx48, jsxs as jsxs40 } from "react/jsx-runtime";
27498
+ import { jsx as jsx47, jsxs as jsxs39 } from "react/jsx-runtime";
27686
27499
  function buildGenerateComponentsArgs(opts) {
27687
27500
  const args = ["__generate", "components", "--agent", opts.agent, "--session", opts.sessionId];
27688
27501
  if (opts.tokensPath) args.push("--tokens", opts.tokensPath);
@@ -27810,41 +27623,36 @@ function WizardApp({
27810
27623
  } = {}) {
27811
27624
  const defaultConfiguredHost = toConfiguredHost(host || process.env["EDS_HOST"]) ?? DEFAULT_CONFIGURED_HOST;
27812
27625
  const resolveWizardHost = (hostValue) => hostValue || defaultConfiguredHost;
27813
- const credentialKey = (spaceId, environmentId, cmaToken, hostValue) => [spaceId.trim(), environmentId.trim(), cmaToken.trim(), resolveWizardHost(hostValue)].join("\0");
27814
27626
  const { columns: terminalWidth } = useTerminalSize();
27815
27627
  const clearScreenOnTransition = useScreenTransitionClear();
27816
- const logInit = useRef10(false);
27817
- const initialAgentAuthRef = useRef10(initialAgentAuth ?? null);
27628
+ const logInit = useRef9(false);
27629
+ const initialAgentAuthRef = useRef9(initialAgentAuth ?? null);
27818
27630
  if (!logInit.current) {
27819
27631
  writeFileSync(WIZARD_LOG, `--- experiences import session ${(/* @__PURE__ */ new Date()).toISOString()} ---
27820
27632
  `);
27821
27633
  logInit.current = true;
27822
27634
  }
27823
- const sessionRef = useRef10({
27635
+ const sessionRef = useRef9({
27824
27636
  extractSessionId: null,
27825
27637
  tokensPath: ""
27826
27638
  });
27827
- const allowEmptyDeleteAllRef = useRef10(false);
27828
- const generateChildRef = useRef10(null);
27829
- const generationCachePreflightRef = useRef10(null);
27830
- const selectionToReviewStartedAtRef = useRef10(null);
27831
- const credentialsValidationIdRef = useRef10(0);
27832
- const pendingCredentialValidationRef = useRef10(null);
27833
- const validatedCredentialsKeyRef = useRef10(null);
27834
- const tokenGenerationPromiseRef = useRef10(null);
27835
- const extractPromiseRef = useRef10(null);
27836
- const extractStartedRef = useRef10(false);
27837
- const credentialsReadyRef = useRef10(false);
27838
- const agentAuthVerifiedRef = useRef10(false);
27839
- const scopeGateCompletedRef = useRef10(false);
27840
- const scopeComponentsRef = useRef10(null);
27841
- const existingEntitiesPromiseRef = useRef10(null);
27842
- const generatePromiseRef = useRef10(null);
27639
+ const allowEmptyDeleteAllRef = useRef9(false);
27640
+ const generationCachePreflightRef = useRef9(null);
27641
+ const selectionToReviewStartedAtRef = useRef9(null);
27642
+ const tokenGenerationPromiseRef = useRef9(null);
27643
+ const extractPromiseRef = useRef9(null);
27644
+ const extractStartedRef = useRef9(false);
27645
+ const credentialsReadyRef = useRef9(false);
27646
+ const agentAuthVerifiedRef = useRef9(false);
27647
+ const scopeGateCompletedRef = useRef9(false);
27648
+ const scopeComponentsRef = useRef9(null);
27649
+ const existingEntitiesPromiseRef = useRef9(null);
27650
+ const generatePromiseRef = useRef9(null);
27843
27651
  const rawTokensEntryReady = !!initialRawTokensPath;
27844
27652
  const effectiveNoCache = resolveNoCacheForGenerate({ cliNoCache: noCache });
27845
27653
  const initialStepResolved = "credentials";
27846
27654
  const initialOutDir = initialProjectPath ? join20(resolve18(initialProjectPath), ".contentful") : "";
27847
- const [state, setState] = useState20({
27655
+ const [state, setState] = useState19({
27848
27656
  step: initialStepResolved,
27849
27657
  agent: initialAgent ?? "claude",
27850
27658
  ...initialModel ? { agentModel: initialModel } : {},
@@ -27891,8 +27699,6 @@ function WizardApp({
27891
27699
  previewValidationMissingNames: [],
27892
27700
  credentialsValidating: false,
27893
27701
  credentialsBackgroundValidating: false,
27894
- generatePrefetchStatus: "idle",
27895
- generatePrefetchError: null,
27896
27702
  mapTokensEligible: null,
27897
27703
  credentialsSkipped: false,
27898
27704
  existingEntitiesPath: null,
@@ -28384,23 +28190,6 @@ Make sure this path contains TypeScript/React/Vue component files (.tsx, .ts, .v
28384
28190
  extractPromiseRef.current = null;
28385
28191
  });
28386
28192
  };
28387
- const cancelGeneratePrefetch = () => {
28388
- const child = generateChildRef.current;
28389
- if (child && !child.killed) {
28390
- try {
28391
- child.kill("SIGTERM");
28392
- } catch {
28393
- }
28394
- }
28395
- generateChildRef.current = null;
28396
- generatePromiseRef.current = null;
28397
- setState((prev) => ({
28398
- ...prev,
28399
- generatePrefetchStatus: "idle",
28400
- generatePrefetchError: null,
28401
- generateProgress: null
28402
- }));
28403
- };
28404
28193
  const buildGenerateOptions = (extractSessionId, tokensPath, generatePromptPath2, cachedComponents) => ({
28405
28194
  sessionId: extractSessionId,
28406
28195
  tokensPath,
@@ -28531,60 +28320,6 @@ Make sure this path contains TypeScript/React/Vue component files (.tsx, .ts, .v
28531
28320
  state.existingEntitiesStatus,
28532
28321
  state.existingEntitiesPath
28533
28322
  ]);
28534
- const startGeneratePrefetch = (extractSessionId, tokensPath) => {
28535
- const args = buildGenerateArgs(extractSessionId, tokensPath);
28536
- let progressCursor = null;
28537
- const { child, donePromise } = spawnGenerateChild({
28538
- command: "node",
28539
- args,
28540
- onStderr: (chunk) => {
28541
- const nextProgress = parseGenerateStderrChunk(chunk, progressCursor);
28542
- if (nextProgress !== progressCursor) {
28543
- progressCursor = nextProgress;
28544
- setState((prev) => ({ ...prev, generateProgress: nextProgress }));
28545
- }
28546
- }
28547
- });
28548
- generateChildRef.current = child;
28549
- generatePromiseRef.current = donePromise;
28550
- setState((prev) => ({
28551
- ...prev,
28552
- generatePrefetchStatus: "running",
28553
- generatePrefetchError: null
28554
- }));
28555
- donePromise.then((result) => {
28556
- generateChildRef.current = null;
28557
- if (result.signal === "SIGTERM") {
28558
- return;
28559
- }
28560
- if (result.exitCode !== 0) {
28561
- const tail = result.stderr.trim().split("\n").slice(-3).join("\n") || `exit ${result.exitCode}`;
28562
- setState((prev) => ({
28563
- ...prev,
28564
- generatePrefetchStatus: "failed",
28565
- generatePrefetchError: tail,
28566
- generateProgress: null
28567
- }));
28568
- return;
28569
- }
28570
- const { generateSessionId: generateSessionId2, generatedCount } = parseGenerateResult(result, 0);
28571
- setState((prev) => ({
28572
- ...prev,
28573
- generateSessionId: generateSessionId2,
28574
- generatedCount,
28575
- generateProgress: null,
28576
- generatePrefetchStatus: "complete"
28577
- }));
28578
- }).catch(() => {
28579
- generateChildRef.current = null;
28580
- setState((prev) => ({
28581
- ...prev,
28582
- generatePrefetchStatus: "failed",
28583
- generatePrefetchError: "subprocess error"
28584
- }));
28585
- });
28586
- return donePromise;
28587
- };
28588
28323
  const runGenerate = async (extractSessionId, tokensPath, acceptedCount, suppressScreen = false, cachedComponents = []) => {
28589
28324
  const timer = startWizardTimer("component-generation", {
28590
28325
  sessionId: extractSessionId,
@@ -28693,136 +28428,7 @@ Make sure this path contains TypeScript/React/Vue component files (.tsx, .ts, .v
28693
28428
  const { extractSessionId: sid, tokensPath: tp } = sessionRef.current;
28694
28429
  void runPreview(sid, tp, state.spaceId, state.environmentId, state.cmaToken, state.host);
28695
28430
  };
28696
- const advanceWithCredentials = async (spaceId, environmentId, cmaToken, host2) => {
28697
- const resolvedHost = resolveWizardHost(host2);
28698
- const key = credentialKey(spaceId, environmentId, cmaToken, resolvedHost);
28699
- if (validatedCredentialsKeyRef.current === key) {
28700
- await advanceAfterCredentialsValidated();
28701
- return;
28702
- }
28703
- const pending2 = pendingCredentialValidationRef.current;
28704
- if (pending2?.key === key) {
28705
- if (await pending2.promise) await advanceAfterCredentialsValidated();
28706
- return;
28707
- }
28708
- await validateCredentials(spaceId, environmentId, cmaToken, resolvedHost);
28709
- };
28710
- const confirmCredentials = async (spaceId, environmentId, cmaToken, host2) => {
28711
- const resolvedHost = resolveWizardHost(host2);
28712
- try {
28713
- const stored = await readExperiencesCredentials();
28714
- await writeExperiencesCredentials({
28715
- ...stored,
28716
- spaceId,
28717
- environmentId,
28718
- cmaToken,
28719
- host: resolvedHost
28720
- });
28721
- advanceWithCredentials(spaceId, environmentId, cmaToken, resolvedHost);
28722
- } catch (e) {
28723
- const message = e instanceof Error ? e.message : "Unable to save credentials";
28724
- update({
28725
- spaceId,
28726
- environmentId,
28727
- cmaToken,
28728
- host: resolvedHost,
28729
- credentialsError: `Failed to save credentials: ${message}`,
28730
- step: "credentials"
28731
- });
28732
- }
28733
- };
28734
- const validateCredentials = async (spaceId, environmentId, cmaToken, host2, options = {}) => {
28735
- const validationId = options.validationId ?? ++credentialsValidationIdRef.current;
28736
- const isCurrent = () => credentialsValidationIdRef.current === validationId;
28737
- const key = credentialKey(spaceId, environmentId, cmaToken, host2);
28738
- update({
28739
- step: "credentials",
28740
- credentialsValidating: true,
28741
- credentialsBackgroundValidating: options.background === true,
28742
- credentialsError: ""
28743
- });
28744
- try {
28745
- const resolvedHost = resolveWizardHost(host2);
28746
- const client2 = new ImportApiClient({
28747
- cmaToken,
28748
- spaceId,
28749
- environmentId,
28750
- host: resolvedHost
28751
- });
28752
- await client2.validateToken();
28753
- if (!isCurrent()) return false;
28754
- validatedCredentialsKeyRef.current = key;
28755
- update({
28756
- spaceId,
28757
- environmentId,
28758
- cmaToken,
28759
- host: resolvedHost,
28760
- credentialsValidating: false,
28761
- credentialsBackgroundValidating: false
28762
- });
28763
- if (options.background) return true;
28764
- await advanceAfterCredentialsValidated(validationId);
28765
- return true;
28766
- } catch (e) {
28767
- if (!isCurrent()) return false;
28768
- if (e instanceof ApiError && (e.status === 401 || e.status === 403 || e.status === 404)) {
28769
- cancelGeneratePrefetch();
28770
- update({
28771
- step: "credentials",
28772
- credentialsValidating: false,
28773
- credentialsBackgroundValidating: false,
28774
- credentialsError: formatApiError(e, process.env["EDSI_VERBOSE_ERRORS"] === "1")
28775
- });
28776
- return false;
28777
- }
28778
- const msg = e instanceof Error ? e.message : "Credential check failed";
28779
- cancelGeneratePrefetch();
28780
- update({
28781
- step: "error",
28782
- errorStep: "validating-credentials",
28783
- errorMessage: msg,
28784
- errorAllowCredentialRetry: false,
28785
- credentialsValidating: false,
28786
- credentialsBackgroundValidating: false
28787
- });
28788
- return false;
28789
- }
28790
- };
28791
- const handleCredentialValuesChange = () => {
28792
- credentialsValidationIdRef.current += 1;
28793
- pendingCredentialValidationRef.current = null;
28794
- validatedCredentialsKeyRef.current = null;
28795
- if (state.credentialsValidating) {
28796
- update({ credentialsValidating: false, credentialsBackgroundValidating: false, credentialsError: "" });
28797
- }
28798
- };
28799
- useEffect14(() => {
28800
- if (state.step !== "credentials" || state.credentialsSkipped) return;
28801
- if (!state.spaceId.trim() || !state.environmentId.trim() || !state.cmaToken.trim()) return;
28802
- const validationId = ++credentialsValidationIdRef.current;
28803
- const key = credentialKey(state.spaceId, state.environmentId, state.cmaToken, state.host);
28804
- const promise = validateCredentials(state.spaceId, state.environmentId, state.cmaToken, state.host, {
28805
- background: true,
28806
- validationId
28807
- });
28808
- pendingCredentialValidationRef.current = { key, promise };
28809
- void promise.then(
28810
- () => {
28811
- if (pendingCredentialValidationRef.current?.promise === promise) pendingCredentialValidationRef.current = null;
28812
- },
28813
- () => {
28814
- if (pendingCredentialValidationRef.current?.promise === promise) pendingCredentialValidationRef.current = null;
28815
- }
28816
- );
28817
- return () => {
28818
- credentialsValidationIdRef.current += 1;
28819
- pendingCredentialValidationRef.current = null;
28820
- };
28821
- }, [state.step]);
28822
- const advanceAfterCredentialsValidated = async (validationId) => {
28823
- const isCurrent = () => validationId === void 0 || credentialsValidationIdRef.current === validationId;
28824
- if (!isCurrent()) return;
28825
- if (!isCurrent()) return;
28431
+ const advanceAfterCredentialsValidated = async () => {
28826
28432
  credentialsReadyRef.current = true;
28827
28433
  if (!sessionRef.current.extractSessionId && state.projectPath) {
28828
28434
  if (extractPromiseRef.current) update({ step: "extracting" });
@@ -28971,7 +28577,13 @@ Make sure this path contains TypeScript/React/Vue component files (.tsx, .ts, .v
28971
28577
  });
28972
28578
  return;
28973
28579
  }
28974
- update({ step: "credentials", credentialsError: e.message });
28580
+ update({
28581
+ step: "error",
28582
+ errorStep: "apply preview",
28583
+ errorMessage: `${e.message}
28584
+
28585
+ Re-run the import and enter credentials again.`
28586
+ });
28975
28587
  return;
28976
28588
  }
28977
28589
  if (e.status === 404) {
@@ -29243,7 +28855,7 @@ If using a custom host configuration, make sure the space exists on that host.`
29243
28855
  const runSaveAndPush = async (statePatch = {}) => {
29244
28856
  await startSaveFlow({ skipGate: true, andPush: true }, statePatch);
29245
28857
  };
29246
- const pendingSaveOptionsRef = useRef10({});
28858
+ const pendingSaveOptionsRef = useRef9({});
29247
28859
  const startSaveFlow = async (opts = {}, statePatch = {}) => {
29248
28860
  pendingSaveOptionsRef.current = opts;
29249
28861
  update({ ...statePatch, step: "path-prompt" });
@@ -29306,7 +28918,8 @@ If using a custom host configuration, make sure the space exists on that host.`
29306
28918
  void runPreview(extractSessionId, tokensPath, state.spaceId, state.environmentId, state.cmaToken, state.host);
29307
28919
  }
29308
28920
  };
29309
- const tokenReuseChecked = useRef10(false);
28921
+ const tokenReuseChecked = useRef9(false);
28922
+ const [tokenReuseSettled, setTokenReuseSettled] = useState19(!state.rawTokensPath);
29310
28923
  useEffect14(() => {
29311
28924
  if (state.rawTokensPath) {
29312
28925
  if (tokenReuseChecked.current) return;
@@ -29316,6 +28929,7 @@ If using a custom host configuration, make sure the space exists on that host.`
29316
28929
  tokenGenerationPromiseRef.current = runAgentAuthCheck("credentials").then(
29317
28930
  (ok2) => ok2 ? runGenerateTokens(state.rawTokensPath, state.outDir) : false
29318
28931
  );
28932
+ setTokenReuseSettled(true);
29319
28933
  return;
29320
28934
  }
29321
28935
  (async () => {
@@ -29335,10 +28949,18 @@ If using a custom host configuration, make sure the space exists on that host.`
29335
28949
  tokenGenerationPromiseRef.current = runAgentAuthCheck("credentials").then(
29336
28950
  (ok2) => ok2 ? runGenerateTokens(state.rawTokensPath, state.outDir) : false
29337
28951
  );
28952
+ setTokenReuseSettled(true);
29338
28953
  }
29339
28954
  })();
29340
28955
  }
29341
28956
  }, [state.rawTokensPath]);
28957
+ const credentialsHandedOff = useRef9(false);
28958
+ useEffect14(() => {
28959
+ if (state.step !== "credentials" || !tokenReuseSettled || credentialsHandedOff.current) return;
28960
+ credentialsHandedOff.current = true;
28961
+ if (process.env["EDS_IMPORT_SKIP_CREDENTIALS"] === "1") update({ credentialsSkipped: true });
28962
+ void advanceAfterCredentialsValidated();
28963
+ }, [state.step, tokenReuseSettled]);
29342
28964
  const noQuitSteps = [
29343
28965
  "checking-claude-auth",
29344
28966
  "validating-credentials",
@@ -29357,7 +28979,7 @@ If using a custom host configuration, make sure the space exists on that host.`
29357
28979
  const stepContent = (() => {
29358
28980
  switch (state.step) {
29359
28981
  case "token-reuse-gate":
29360
- return /* @__PURE__ */ jsx48(
28982
+ return /* @__PURE__ */ jsx47(
29361
28983
  GateStep,
29362
28984
  {
29363
28985
  successMessage: "Existing tokens.json found",
@@ -29370,13 +28992,17 @@ Tokens Path: ${state.tokensPath}`,
29370
28992
  continueLabel: "Reuse existing tokens",
29371
28993
  skipLabel: "Regenerate tokens",
29372
28994
  showSkip: true,
29373
- onContinue: () => update({
29374
- step: "credentials",
29375
- tokenSessionId: null,
29376
- tokenGenerationStatus: "complete"
29377
- }),
28995
+ onContinue: () => {
28996
+ setTokenReuseSettled(true);
28997
+ update({
28998
+ step: "credentials",
28999
+ tokenSessionId: null,
29000
+ tokenGenerationStatus: "complete"
29001
+ });
29002
+ },
29378
29003
  onSkip: async () => {
29379
29004
  update({ tokenSourceChanged: null });
29005
+ setTokenReuseSettled(true);
29380
29006
  update({ step: "credentials" });
29381
29007
  if (await runAgentAuthCheck("credentials")) {
29382
29008
  tokenGenerationPromiseRef.current = runGenerateTokens(state.rawTokensPath, state.outDir, true);
@@ -29386,7 +29012,7 @@ Tokens Path: ${state.tokensPath}`,
29386
29012
  }
29387
29013
  );
29388
29014
  case "checking-claude-auth":
29389
- return /* @__PURE__ */ jsx48(
29015
+ return /* @__PURE__ */ jsx47(
29390
29016
  RunningStep,
29391
29017
  {
29392
29018
  stepNumber: state.authCheckStepNumber,
@@ -29413,7 +29039,7 @@ Tokens Path: ${state.tokensPath}`,
29413
29039
  }
29414
29040
  const selectionDetail = state.selectionAgentStatus === "complete" ? "Selection agent complete" : `Filtering component selection via ${state.agent}...`;
29415
29041
  const compositionDetail = state.compositionPhase === "cache-hit" ? "Composition mapping (cached)" : compositionComplete ? "Composition mapping complete" : state.compositionPhase?.startsWith("agent:") ? `Mapping composition via ${state.compositionPhase.slice("agent:".length)}...` : `Mapping composition via ${state.agent}...`;
29416
- return /* @__PURE__ */ jsx48(
29042
+ return /* @__PURE__ */ jsx47(
29417
29043
  RunningStep,
29418
29044
  {
29419
29045
  stepNumber: hasTokenStage ? 2 : 1,
@@ -29435,7 +29061,7 @@ Tokens Path: ${state.tokensPath}`,
29435
29061
  }
29436
29062
  case "scope-gate": {
29437
29063
  if (!state.extractSessionId) {
29438
- return /* @__PURE__ */ jsx48(Box39, { paddingX: 2, paddingY: 1, children: /* @__PURE__ */ jsx48(Text43, { color: PALETTE.error, children: "Error: extract session ID missing \u2014 please re-run." }) });
29064
+ return /* @__PURE__ */ jsx47(Box38, { paddingX: 2, paddingY: 1, children: /* @__PURE__ */ jsx47(Text42, { color: PALETTE.error, children: "Error: extract session ID missing \u2014 please re-run." }) });
29439
29065
  }
29440
29066
  const sessionId2 = state.extractSessionId;
29441
29067
  const db = openPipelineDb();
@@ -29451,7 +29077,7 @@ Tokens Path: ${state.tokensPath}`,
29451
29077
  }
29452
29078
  const rememberedForSession = scopeComponentsRef.current?.sessionId === sessionId2 ? scopeComponentsRef.current.components : null;
29453
29079
  const components = scopeGateCompletedRef.current && rememberedForSession ? rememberedForSession : loadedComponents.length > 0 ? loadedComponents : rememberedForSession ?? [];
29454
- return /* @__PURE__ */ jsx48(
29080
+ return /* @__PURE__ */ jsx47(
29455
29081
  ScopeGateStep,
29456
29082
  {
29457
29083
  components,
@@ -29547,7 +29173,7 @@ Tokens Path: ${state.tokensPath}`,
29547
29173
  const displayAgent = state.agent.charAt(0).toUpperCase() + state.agent.slice(1);
29548
29174
  const progressDetail = p ? `${p.current}` : `Starting up ${displayAgent}...`;
29549
29175
  const mapTokensDetail = state.mapTokensStatus === "running" ? skipMapTokens ? "Resolving token defaults..." : `Mapping token restrictions via ${displayAgent}...` : state.mapTokensStatus === "complete" ? skipMapTokens ? "Token defaults ready" : "Token restrictions ready" : void 0;
29550
- return /* @__PURE__ */ jsx48(
29176
+ return /* @__PURE__ */ jsx47(
29551
29177
  RunningStep,
29552
29178
  {
29553
29179
  stepNumber: stepNum,
@@ -29564,7 +29190,7 @@ ${displayAgent} is mapping your selected components to Contentful's Component De
29564
29190
  }
29565
29191
  case "mapping-tokens": {
29566
29192
  const stepNum = hasTokenStage ? 5 : 4;
29567
- return /* @__PURE__ */ jsx48(
29193
+ return /* @__PURE__ */ jsx47(
29568
29194
  RunningStep,
29569
29195
  {
29570
29196
  stepNumber: stepNum,
@@ -29576,7 +29202,7 @@ ${displayAgent} is mapping your selected components to Contentful's Component De
29576
29202
  );
29577
29203
  }
29578
29204
  case "final-review": {
29579
- return /* @__PURE__ */ jsx48(
29205
+ return /* @__PURE__ */ jsx47(
29580
29206
  GenerateReviewStep,
29581
29207
  {
29582
29208
  extractSessionId: state.extractSessionId,
@@ -29634,42 +29260,17 @@ ${displayAgent} is mapping your selected components to Contentful's Component De
29634
29260
  );
29635
29261
  }
29636
29262
  case "credentials":
29637
- return /* @__PURE__ */ jsx48(
29638
- CredentialsStep,
29263
+ return /* @__PURE__ */ jsx47(
29264
+ RunningStep,
29639
29265
  {
29640
- initialSpaceId: state.spaceId,
29641
- initialEnvironmentId: state.environmentId,
29642
- initialCmaToken: state.cmaToken,
29643
- initialHost: state.host,
29644
- error: state.credentialsError || void 0,
29645
- validating: state.credentialsValidating,
29646
- backgroundValidating: state.credentialsBackgroundValidating,
29647
- generatePrefetchStatus: state.generatePrefetchStatus,
29648
- generatePrefetchError: state.generatePrefetchError,
29649
- onConfirm: (spaceId, environmentId, cmaToken, host2) => {
29650
- void confirmCredentials(spaceId, environmentId, cmaToken, host2);
29651
- },
29652
- onValuesChange: handleCredentialValuesChange,
29653
- onContinue: (spaceId, environmentId, cmaToken, host2) => {
29654
- void confirmCredentials(spaceId, environmentId, cmaToken, host2);
29655
- },
29656
- onRetryPrefetch: state.generatePrefetchStatus === "failed" && sessionRef.current.extractSessionId ? () => {
29657
- const sid = sessionRef.current.extractSessionId;
29658
- void startGeneratePrefetch(sid, state.tokensPath);
29659
- } : void 0,
29660
- onSkip: () => {
29661
- update({ credentialsSkipped: true, credentialsError: "" });
29662
- credentialsReadyRef.current = true;
29663
- void advanceAfterCredentialsValidated();
29664
- },
29665
- onQuit: () => {
29666
- cancelGeneratePrefetch();
29667
- process.exit(0);
29668
- }
29266
+ stepNumber: 1,
29267
+ totalSteps,
29268
+ title: "Starting import",
29269
+ description: "Using the credentials you just confirmed..."
29669
29270
  }
29670
29271
  );
29671
29272
  case "previewing":
29672
- return /* @__PURE__ */ jsx48(
29273
+ return /* @__PURE__ */ jsx47(
29673
29274
  RunningStep,
29674
29275
  {
29675
29276
  stepNumber: totalSteps,
@@ -29680,7 +29281,7 @@ ${displayAgent} is mapping your selected components to Contentful's Component De
29680
29281
  );
29681
29282
  case "preview-gate": {
29682
29283
  const editableComponentCount = extractComponents(state.cdf).length;
29683
- return /* @__PURE__ */ jsx48(
29284
+ return /* @__PURE__ */ jsx47(
29684
29285
  WizardPreviewStep,
29685
29286
  {
29686
29287
  preview: state.serverPreview,
@@ -29705,9 +29306,9 @@ ${displayAgent} is mapping your selected components to Contentful's Component De
29705
29306
  );
29706
29307
  }
29707
29308
  case "pushing":
29708
- return /* @__PURE__ */ jsx48(PushingStep, { stepNumber: totalSteps, totalSteps, progress: state.pushProgress });
29309
+ return /* @__PURE__ */ jsx47(PushingStep, { stepNumber: totalSteps, totalSteps, progress: state.pushProgress });
29709
29310
  case "path-prompt":
29710
- return /* @__PURE__ */ jsx48(
29311
+ return /* @__PURE__ */ jsx47(
29711
29312
  PathPrompt,
29712
29313
  {
29713
29314
  defaultPath: state.outDir,
@@ -29728,7 +29329,7 @@ ${displayAgent} is mapping your selected components to Contentful's Component De
29728
29329
  }
29729
29330
  );
29730
29331
  case "printing":
29731
- return /* @__PURE__ */ jsx48(
29332
+ return /* @__PURE__ */ jsx47(
29732
29333
  RunningStep,
29733
29334
  {
29734
29335
  stepNumber: totalSteps,
@@ -29739,7 +29340,7 @@ ${displayAgent} is mapping your selected components to Contentful's Component De
29739
29340
  );
29740
29341
  case "print-gate": {
29741
29342
  const teaser = buildRunTeaserLine(state.lastRunId);
29742
- return /* @__PURE__ */ jsx48(
29343
+ return /* @__PURE__ */ jsx47(
29743
29344
  GateStep,
29744
29345
  {
29745
29346
  successMessage: "Files saved",
@@ -29756,7 +29357,7 @@ ${displayAgent} is mapping your selected components to Contentful's Component De
29756
29357
  }
29757
29358
  case "done": {
29758
29359
  const totalFailed = state.pushResult.componentTypes.failed + state.pushResult.designTokens.failed;
29759
- return /* @__PURE__ */ jsx48(
29360
+ return /* @__PURE__ */ jsx47(
29760
29361
  DoneStep,
29761
29362
  {
29762
29363
  componentTypes: state.pushResult.componentTypes,
@@ -29771,7 +29372,7 @@ ${displayAgent} is mapping your selected components to Contentful's Component De
29771
29372
  );
29772
29373
  }
29773
29374
  case "preview-validation-error": {
29774
- return /* @__PURE__ */ jsx48(
29375
+ return /* @__PURE__ */ jsx47(
29775
29376
  PreviewValidationErrorStep,
29776
29377
  {
29777
29378
  errors: state.previewValidationErrors,
@@ -29787,13 +29388,12 @@ ${displayAgent} is mapping your selected components to Contentful's Component De
29787
29388
  );
29788
29389
  }
29789
29390
  case "error":
29790
- return /* @__PURE__ */ jsx48(
29391
+ return /* @__PURE__ */ jsx47(
29791
29392
  ErrorStep,
29792
29393
  {
29793
29394
  stepName: state.errorStep,
29794
29395
  message: state.errorMessage,
29795
29396
  onExit: () => process.exit(1),
29796
- onRetryCredentials: state.errorAllowCredentialRetry ? () => update({ step: "credentials", credentialsError: "" }) : void 0,
29797
29397
  onAcknowledgeBreakingChanges: state.errorAllowBreakingChangeAcknowledgment && state.cdf ? () => void runPush(
29798
29398
  state.cdf,
29799
29399
  state.spaceId,
@@ -29809,9 +29409,9 @@ ${displayAgent} is mapping your selected components to Contentful's Component De
29809
29409
  return null;
29810
29410
  }
29811
29411
  })();
29812
- return /* @__PURE__ */ jsxs40(Box39, { flexDirection: "column", width: terminalWidth, children: [
29813
- /* @__PURE__ */ jsx48(TopBar, { subcommand: "import", hints }),
29814
- /* @__PURE__ */ jsx48(CustomPromptBanner, { generatePromptPath }),
29412
+ return /* @__PURE__ */ jsxs39(Box38, { flexDirection: "column", width: terminalWidth, children: [
29413
+ /* @__PURE__ */ jsx47(TopBar, { subcommand: "import", hints }),
29414
+ /* @__PURE__ */ jsx47(CustomPromptBanner, { generatePromptPath }),
29815
29415
  stepContent
29816
29416
  ] });
29817
29417
  }
@@ -29822,7 +29422,6 @@ var init_WizardApp = __esm({
29822
29422
  init_theme();
29823
29423
  init_run_teaser();
29824
29424
  init_debug_logger();
29825
- init_credentials_store();
29826
29425
  init_path_prompt();
29827
29426
  init_save_path_resolver();
29828
29427
  init_store();
@@ -29831,7 +29430,6 @@ var init_WizardApp = __esm({
29831
29430
  init_CustomPromptBanner();
29832
29431
  init_RunningStep();
29833
29432
  init_GateStep();
29834
- init_CredentialsStep();
29835
29433
  init_WizardPreviewStep();
29836
29434
  init_DoneStep();
29837
29435
  init_ErrorStep();
@@ -30337,9 +29935,9 @@ var init_command7 = __esm({
30337
29935
  });
30338
29936
 
30339
29937
  // packages/experience-design-system-cli-legacy/src/setup/SetupStepper.tsx
30340
- import React14 from "react";
30341
- import { Box as Box40, Text as Text44 } from "ink";
30342
- import { jsx as jsx49, jsxs as jsxs41 } from "react/jsx-runtime";
29938
+ import React13 from "react";
29939
+ import { Box as Box39, Text as Text43 } from "ink";
29940
+ import { jsx as jsx48, jsxs as jsxs40 } from "react/jsx-runtime";
30343
29941
  function stepLabel(step, title, state, wide) {
30344
29942
  if (state === "complete") return wide ? `\u2713 ${title}` : "\u2713";
30345
29943
  if (state === "active") return wide ? `[${step} ${title}]` : `[${step}]`;
@@ -30352,12 +29950,12 @@ function stepColor(state) {
30352
29950
  }
30353
29951
  function SetupStepper({ activeStep, columns }) {
30354
29952
  const wide = columns !== void 0 && columns >= WIDE_MIN_COLUMNS;
30355
- return /* @__PURE__ */ jsx49(Box40, { columnGap: wide ? 0 : COMPACT_GAP, children: SETUP_SCREENS.map((title, index) => {
29953
+ return /* @__PURE__ */ jsx48(Box39, { columnGap: wide ? 0 : COMPACT_GAP, children: SETUP_SCREENS.map((title, index) => {
30356
29954
  const step = index + 1;
30357
29955
  const state = step < activeStep ? "complete" : step === activeStep ? "active" : "pending";
30358
- return /* @__PURE__ */ jsxs41(React14.Fragment, { children: [
30359
- wide && index > 0 && /* @__PURE__ */ jsx49(Text44, { dimColor: true, children: WIDE_SEPARATOR }),
30360
- /* @__PURE__ */ jsx49(Text44, { bold: state === "active", dimColor: state === "pending", color: stepColor(state), children: stepLabel(step, title, state, wide) })
29956
+ return /* @__PURE__ */ jsxs40(React13.Fragment, { children: [
29957
+ wide && index > 0 && /* @__PURE__ */ jsx48(Text43, { dimColor: true, children: WIDE_SEPARATOR }),
29958
+ /* @__PURE__ */ jsx48(Text43, { bold: state === "active", dimColor: state === "pending", color: stepColor(state), children: stepLabel(step, title, state, wide) })
30361
29959
  ] }, step);
30362
29960
  }) });
30363
29961
  }
@@ -30376,33 +29974,33 @@ var init_SetupStepper = __esm({
30376
29974
  });
30377
29975
 
30378
29976
  // packages/experience-design-system-cli-legacy/src/setup/steps/StepLayout.tsx
30379
- import { Box as Box41, Text as Text45 } from "ink";
30380
- import { jsx as jsx50, jsxs as jsxs42 } from "react/jsx-runtime";
29977
+ import { Box as Box40, Text as Text44 } from "ink";
29978
+ import { jsx as jsx49, jsxs as jsxs41 } from "react/jsx-runtime";
30381
29979
  function StepLayout({ helpText, children, prompt }) {
30382
- return /* @__PURE__ */ jsxs42(Box41, { flexDirection: "column", children: [
29980
+ return /* @__PURE__ */ jsxs41(Box40, { flexDirection: "column", children: [
30383
29981
  children,
30384
- prompt && /* @__PURE__ */ jsx50(Box41, { marginTop: 1, children: prompt }),
30385
- helpText && /* @__PURE__ */ jsx50(Box41, { marginTop: 1, children: /* @__PURE__ */ jsx50(Text45, { dimColor: true, children: helpText }) })
29982
+ prompt && /* @__PURE__ */ jsx49(Box40, { marginTop: 1, children: prompt }),
29983
+ helpText && /* @__PURE__ */ jsx49(Box40, { marginTop: 1, children: /* @__PURE__ */ jsx49(Text44, { dimColor: true, children: helpText }) })
30386
29984
  ] });
30387
29985
  }
30388
29986
  function StepSuccess({ children }) {
30389
- return /* @__PURE__ */ jsxs42(Text45, { color: PALETTE.success, children: [
29987
+ return /* @__PURE__ */ jsxs41(Text44, { color: PALETTE.success, children: [
30390
29988
  "\u2713 ",
30391
29989
  children
30392
29990
  ] });
30393
29991
  }
30394
29992
  function StepWarning({ children }) {
30395
- return /* @__PURE__ */ jsxs42(Text45, { color: PALETTE.warning, children: [
29993
+ return /* @__PURE__ */ jsxs41(Text44, { color: PALETTE.warning, children: [
30396
29994
  "\u26A0 ",
30397
29995
  children
30398
29996
  ] });
30399
29997
  }
30400
29998
  function StepValue({ label, value }) {
30401
29999
  const color = value ? void 0 : PALETTE.warning;
30402
- return /* @__PURE__ */ jsxs42(Box41, { children: [
30403
- /* @__PURE__ */ jsx50(Box41, { width: 2, children: /* @__PURE__ */ jsx50(Text45, { color, children: value ? "" : "\u26A0" }) }),
30404
- /* @__PURE__ */ jsx50(Box41, { width: 20, flexShrink: 0, children: /* @__PURE__ */ jsx50(Text45, { color, children: label }) }),
30405
- /* @__PURE__ */ jsx50(Text45, { color, children: value || "(not set)" })
30000
+ return /* @__PURE__ */ jsxs41(Box40, { children: [
30001
+ /* @__PURE__ */ jsx49(Box40, { width: 2, children: /* @__PURE__ */ jsx49(Text44, { color, children: value ? "" : "\u26A0" }) }),
30002
+ /* @__PURE__ */ jsx49(Box40, { width: 20, flexShrink: 0, children: /* @__PURE__ */ jsx49(Text44, { color, children: label }) }),
30003
+ /* @__PURE__ */ jsx49(Text44, { color, children: value || "(not set)" })
30406
30004
  ] });
30407
30005
  }
30408
30006
  var init_StepLayout = __esm({
@@ -30413,10 +30011,10 @@ var init_StepLayout = __esm({
30413
30011
  });
30414
30012
 
30415
30013
  // packages/experience-design-system-cli-legacy/src/setup/steps/CodingAgentScreen.tsx
30416
- import { useEffect as useEffect15, useRef as useRef11, useState as useState21 } from "react";
30417
- import { Box as Box42, Text as Text46 } from "ink";
30014
+ import { useEffect as useEffect15, useRef as useRef10, useState as useState20 } from "react";
30015
+ import { Box as Box41, Text as Text45 } from "ink";
30418
30016
  import { Select, TextInput } from "@inkjs/ui";
30419
- import { jsx as jsx51, jsxs as jsxs43 } from "react/jsx-runtime";
30017
+ import { jsx as jsx50, jsxs as jsxs42 } from "react/jsx-runtime";
30420
30018
  async function detectAgents(exists = binaryExists) {
30421
30019
  const found = await Promise.all(AGENT_DEFS.map(async (agent) => await exists(agent.binary) ? agent : void 0));
30422
30020
  return found.filter((agent) => agent !== void 0);
@@ -30426,9 +30024,9 @@ function needsCodexModel(agent, env) {
30426
30024
  }
30427
30025
  function CodingAgentScreen({ onDone, deps }) {
30428
30026
  const { binaryExists: exists, run, env } = deps ?? { binaryExists, run: runSpawn, env: process.env };
30429
- const [phase, setPhase] = useState21({ kind: "detecting" });
30430
- const [notes, setNotes] = useState21([]);
30431
- const startedRef = useRef11(false);
30027
+ const [phase, setPhase] = useState20({ kind: "detecting" });
30028
+ const [notes, setNotes] = useState20([]);
30029
+ const startedRef = useRef10(false);
30432
30030
  const save = async (agent, agentModel) => {
30433
30031
  const stored = await readExperiencesCredentials();
30434
30032
  const { agentModel: _stale, ...rest } = stored;
@@ -30449,7 +30047,7 @@ function CodingAgentScreen({ onDone, deps }) {
30449
30047
  const found = await detectAgents(exists);
30450
30048
  if (found.length === 1) {
30451
30049
  const only = found[0];
30452
- setNotes([/* @__PURE__ */ jsx51(StepSuccess, { children: `${only.name} (${only.binary}) found` }, "found")]);
30050
+ setNotes([/* @__PURE__ */ jsx50(StepSuccess, { children: `${only.name} (${only.binary}) found` }, "found")]);
30453
30051
  afterSelection(only);
30454
30052
  return;
30455
30053
  }
@@ -30457,7 +30055,7 @@ function CodingAgentScreen({ onDone, deps }) {
30457
30055
  setPhase({ kind: "choose", found });
30458
30056
  return;
30459
30057
  }
30460
- setNotes([/* @__PURE__ */ jsx51(StepWarning, { children: "No coding agent found on PATH" }, "none")]);
30058
+ setNotes([/* @__PURE__ */ jsx50(StepWarning, { children: "No coding agent found on PATH" }, "none")]);
30461
30059
  setPhase({ kind: "install-choice" });
30462
30060
  })();
30463
30061
  }, []);
@@ -30469,12 +30067,12 @@ function CodingAgentScreen({ onDone, deps }) {
30469
30067
  onDone("failed");
30470
30068
  return;
30471
30069
  }
30472
- setNotes((current) => [...current, /* @__PURE__ */ jsx51(StepSuccess, { children: `${agent.name} installed` }, "installed")]);
30070
+ setNotes((current) => [...current, /* @__PURE__ */ jsx50(StepSuccess, { children: `${agent.name} installed` }, "installed")]);
30473
30071
  afterSelection(agent);
30474
30072
  };
30475
- const chooser = (question, options, describe, onPick) => /* @__PURE__ */ jsxs43(Box42, { flexDirection: "column", children: [
30476
- /* @__PURE__ */ jsx51(Text46, { children: question }),
30477
- /* @__PURE__ */ jsx51(Box42, { marginTop: 1, children: /* @__PURE__ */ jsx51(
30073
+ const chooser = (question, options, describe, onPick) => /* @__PURE__ */ jsxs42(Box41, { flexDirection: "column", children: [
30074
+ /* @__PURE__ */ jsx50(Text45, { children: question }),
30075
+ /* @__PURE__ */ jsx50(Box41, { marginTop: 1, children: /* @__PURE__ */ jsx50(
30478
30076
  Select,
30479
30077
  {
30480
30078
  options: [
@@ -30486,7 +30084,7 @@ function CodingAgentScreen({ onDone, deps }) {
30486
30084
  ) })
30487
30085
  ] });
30488
30086
  if (phase.kind === "choose") {
30489
- return /* @__PURE__ */ jsx51(
30087
+ return /* @__PURE__ */ jsx50(
30490
30088
  StepLayout,
30491
30089
  {
30492
30090
  helpText: AGENT_HELP,
@@ -30501,7 +30099,7 @@ function CodingAgentScreen({ onDone, deps }) {
30501
30099
  );
30502
30100
  }
30503
30101
  if (phase.kind === "install-choice") {
30504
- return /* @__PURE__ */ jsx51(
30102
+ return /* @__PURE__ */ jsx50(
30505
30103
  StepLayout,
30506
30104
  {
30507
30105
  helpText: AGENT_HELP,
@@ -30516,13 +30114,13 @@ function CodingAgentScreen({ onDone, deps }) {
30516
30114
  );
30517
30115
  }
30518
30116
  if (phase.kind === "model") {
30519
- return /* @__PURE__ */ jsx51(
30117
+ return /* @__PURE__ */ jsx50(
30520
30118
  StepLayout,
30521
30119
  {
30522
30120
  helpText: AGENT_HELP,
30523
- prompt: /* @__PURE__ */ jsxs43(Box42, { children: [
30524
- /* @__PURE__ */ jsx51(Text46, { children: "Model name (optional - press Enter for Codex default): " }),
30525
- /* @__PURE__ */ jsx51(
30121
+ prompt: /* @__PURE__ */ jsxs42(Box41, { children: [
30122
+ /* @__PURE__ */ jsx50(Text45, { children: "Model name (optional - press Enter for Codex default): " }),
30123
+ /* @__PURE__ */ jsx50(
30526
30124
  TextInput,
30527
30125
  {
30528
30126
  onSubmit: (value) => void save(phase.agent.binary, value.trim() || void 0)
@@ -30532,19 +30130,19 @@ function CodingAgentScreen({ onDone, deps }) {
30532
30130
  ] }),
30533
30131
  children: [
30534
30132
  ...notes,
30535
- /* @__PURE__ */ jsx51(StepWarning, { children: "No OPENAI_API_KEY \u2014 using ChatGPT account authentication." }, "no-key"),
30536
- /* @__PURE__ */ jsx51(Text46, { dimColor: true, children: "Tip: run codex then type /model to browse all available models." }, "tip")
30133
+ /* @__PURE__ */ jsx50(StepWarning, { children: "No OPENAI_API_KEY \u2014 using ChatGPT account authentication." }, "no-key"),
30134
+ /* @__PURE__ */ jsx50(Text45, { dimColor: true, children: "Tip: run codex then type /model to browse all available models." }, "tip")
30537
30135
  ]
30538
30136
  }
30539
30137
  );
30540
30138
  }
30541
30139
  if (phase.kind === "installing") {
30542
- return /* @__PURE__ */ jsx51(StepLayout, { helpText: AGENT_HELP, children: [...notes, /* @__PURE__ */ jsx51(Text46, { children: `Installing ${phase.agent.name}\u2026` }, "installing")] });
30140
+ return /* @__PURE__ */ jsx50(StepLayout, { helpText: AGENT_HELP, children: [...notes, /* @__PURE__ */ jsx50(Text45, { children: `Installing ${phase.agent.name}\u2026` }, "installing")] });
30543
30141
  }
30544
30142
  if (phase.kind === "failed") {
30545
- return /* @__PURE__ */ jsx51(StepLayout, { helpText: AGENT_HELP, children: [...notes, /* @__PURE__ */ jsx51(Text46, { children: `\u2717 ${phase.message}` }, "failed")] });
30143
+ return /* @__PURE__ */ jsx50(StepLayout, { helpText: AGENT_HELP, children: [...notes, /* @__PURE__ */ jsx50(Text45, { children: `\u2717 ${phase.message}` }, "failed")] });
30546
30144
  }
30547
- return /* @__PURE__ */ jsx51(Text46, { dimColor: true, children: "Looking for a coding agent\u2026" });
30145
+ return /* @__PURE__ */ jsx50(Text45, { dimColor: true, children: "Looking for a coding agent\u2026" });
30548
30146
  }
30549
30147
  var AGENT_HELP, SKIP_VALUE;
30550
30148
  var init_CodingAgentScreen = __esm({
@@ -30560,10 +30158,10 @@ var init_CodingAgentScreen = __esm({
30560
30158
  });
30561
30159
 
30562
30160
  // packages/experience-design-system-cli-legacy/src/setup/steps/ContentfulCredentialsScreen.tsx
30563
- import { useEffect as useEffect16, useRef as useRef12, useState as useState22 } from "react";
30564
- import { Box as Box43, Text as Text47 } from "ink";
30161
+ import { useEffect as useEffect16, useRef as useRef11, useState as useState21 } from "react";
30162
+ import { Box as Box42, Text as Text46 } from "ink";
30565
30163
  import { PasswordInput, Select as Select2, TextInput as TextInput2 } from "@inkjs/ui";
30566
- import { Fragment as Fragment20, jsx as jsx52, jsxs as jsxs44 } from "react/jsx-runtime";
30164
+ import { Fragment as Fragment19, jsx as jsx51, jsxs as jsxs43 } from "react/jsx-runtime";
30567
30165
  function envShadowingWarning(env) {
30568
30166
  const set = ENV_KEYS.filter((key) => env[key]);
30569
30167
  if (set.length === 0) return null;
@@ -30573,28 +30171,28 @@ function maskToken(token) {
30573
30171
  return `${"\u2022".repeat(Math.min(token.length, 8))}...`;
30574
30172
  }
30575
30173
  function ContentfulCredentialsScreen({ onDone }) {
30576
- const [stored, setStored] = useState22(null);
30577
- const [field, setField] = useState22("confirm");
30578
- const enteredRef = useRef12({});
30579
- const [error, setError] = useState22(null);
30174
+ const [stored, setStored] = useState21(null);
30175
+ const [field, setField] = useState21("confirm");
30176
+ const enteredRef = useRef11({});
30177
+ const [error, setError] = useState21(null);
30580
30178
  useEffect16(() => {
30581
30179
  void readExperiencesCredentials().then(setStored);
30582
30180
  }, []);
30583
- if (!stored) return /* @__PURE__ */ jsx52(Text47, { dimColor: true, children: "Reading saved credentials\u2026" });
30181
+ if (!stored) return /* @__PURE__ */ jsx51(Text46, { dimColor: true, children: "Reading saved credentials\u2026" });
30584
30182
  const currentHost = stored.host ?? DEFAULT_CONFIGURED_HOST;
30585
30183
  const hasAny = Boolean(stored.spaceId || stored.environmentId || stored.cmaToken);
30586
30184
  const allSet = Boolean(stored.spaceId && stored.environmentId && stored.cmaToken);
30587
30185
  const shadowing = envShadowingWarning(process.env);
30588
- const summary = /* @__PURE__ */ jsxs44(Fragment20, { children: [
30589
- shadowing && /* @__PURE__ */ jsx52(StepWarning, { children: shadowing }),
30590
- hasAny && /* @__PURE__ */ jsxs44(Box43, { flexDirection: "column", marginTop: shadowing ? 1 : 0, children: [
30591
- /* @__PURE__ */ jsx52(Text47, { children: "Current values:" }),
30592
- /* @__PURE__ */ jsx52(StepValue, { label: "Space ID", value: stored.spaceId }),
30593
- /* @__PURE__ */ jsx52(StepValue, { label: "Environment ID", value: stored.environmentId }),
30594
- /* @__PURE__ */ jsx52(StepValue, { label: "CMA Token", value: stored.cmaToken ? maskToken(stored.cmaToken) : void 0 }),
30595
- /* @__PURE__ */ jsx52(StepValue, { label: "API Host", value: currentHost })
30186
+ const summary = /* @__PURE__ */ jsxs43(Fragment19, { children: [
30187
+ shadowing && /* @__PURE__ */ jsx51(StepWarning, { children: shadowing }),
30188
+ hasAny && /* @__PURE__ */ jsxs43(Box42, { flexDirection: "column", marginTop: shadowing ? 1 : 0, children: [
30189
+ /* @__PURE__ */ jsx51(Text46, { children: "Current values:" }),
30190
+ /* @__PURE__ */ jsx51(StepValue, { label: "Space ID", value: stored.spaceId }),
30191
+ /* @__PURE__ */ jsx51(StepValue, { label: "Environment ID", value: stored.environmentId }),
30192
+ /* @__PURE__ */ jsx51(StepValue, { label: "CMA Token", value: stored.cmaToken ? maskToken(stored.cmaToken) : void 0 }),
30193
+ /* @__PURE__ */ jsx51(StepValue, { label: "API Host", value: currentHost })
30596
30194
  ] }),
30597
- error && /* @__PURE__ */ jsx52(StepWarning, { children: error })
30195
+ error && /* @__PURE__ */ jsx51(StepWarning, { children: error })
30598
30196
  ] });
30599
30197
  const helpText = `Saved to ${experiencesCredentialsPath()} \u2014 loaded automatically by experiences import.`;
30600
30198
  if (field === "confirm") {
@@ -30602,13 +30200,13 @@ function ContentfulCredentialsScreen({ onDone }) {
30602
30200
  { label: hasAny ? "Update the saved credentials" : "Enter credentials now", value: ENTER },
30603
30201
  { label: allSet ? "Keep them as they are" : "Skip for now", value: KEEP }
30604
30202
  ];
30605
- return /* @__PURE__ */ jsx52(
30203
+ return /* @__PURE__ */ jsx51(
30606
30204
  StepLayout,
30607
30205
  {
30608
30206
  helpText,
30609
- prompt: /* @__PURE__ */ jsxs44(Box43, { flexDirection: "column", children: [
30610
- /* @__PURE__ */ jsx52(Text47, { children: "Contentful credentials" }),
30611
- /* @__PURE__ */ jsx52(Box43, { marginTop: 1, children: /* @__PURE__ */ jsx52(
30207
+ prompt: /* @__PURE__ */ jsxs43(Box42, { flexDirection: "column", children: [
30208
+ /* @__PURE__ */ jsx51(Text46, { children: "Contentful credentials" }),
30209
+ /* @__PURE__ */ jsx51(Box42, { marginTop: 1, children: /* @__PURE__ */ jsx51(
30612
30210
  Select2,
30613
30211
  {
30614
30212
  options: allSet ? [...options].reverse() : options,
@@ -30649,24 +30247,24 @@ function ContentfulCredentialsScreen({ onDone }) {
30649
30247
  onDone("completed");
30650
30248
  };
30651
30249
  const prompts = {
30652
- spaceId: /* @__PURE__ */ jsxs44(Box43, { children: [
30653
- /* @__PURE__ */ jsx52(Text47, { children: `Space ID${stored.spaceId ? ` [${stored.spaceId}]` : ""}: ` }),
30654
- /* @__PURE__ */ jsx52(TextInput2, { onSubmit: (v) => advance("spaceId", v) }, "spaceId")
30250
+ spaceId: /* @__PURE__ */ jsxs43(Box42, { children: [
30251
+ /* @__PURE__ */ jsx51(Text46, { children: `Space ID${stored.spaceId ? ` [${stored.spaceId}]` : ""}: ` }),
30252
+ /* @__PURE__ */ jsx51(TextInput2, { onSubmit: (v) => advance("spaceId", v) }, "spaceId")
30655
30253
  ] }),
30656
- environmentId: /* @__PURE__ */ jsxs44(Box43, { children: [
30657
- /* @__PURE__ */ jsx52(Text47, { children: `Environment ID [${stored.environmentId || "master"}]: ` }),
30658
- /* @__PURE__ */ jsx52(TextInput2, { onSubmit: (v) => advance("environmentId", v) }, "environmentId")
30254
+ environmentId: /* @__PURE__ */ jsxs43(Box42, { children: [
30255
+ /* @__PURE__ */ jsx51(Text46, { children: `Environment ID [${stored.environmentId || "master"}]: ` }),
30256
+ /* @__PURE__ */ jsx51(TextInput2, { onSubmit: (v) => advance("environmentId", v) }, "environmentId")
30659
30257
  ] }),
30660
- cmaToken: /* @__PURE__ */ jsxs44(Box43, { children: [
30661
- /* @__PURE__ */ jsx52(Text47, { children: `CMA token${stored.cmaToken ? " [press Enter to keep existing]" : " (paste here)"}: ` }),
30662
- /* @__PURE__ */ jsx52(PasswordInput, { onSubmit: (v) => advance("cmaToken", v) }, "cmaToken")
30258
+ cmaToken: /* @__PURE__ */ jsxs43(Box42, { children: [
30259
+ /* @__PURE__ */ jsx51(Text46, { children: `CMA token${stored.cmaToken ? " [press Enter to keep existing]" : " (paste here)"}: ` }),
30260
+ /* @__PURE__ */ jsx51(PasswordInput, { onSubmit: (v) => advance("cmaToken", v) }, "cmaToken")
30663
30261
  ] }),
30664
- host: /* @__PURE__ */ jsxs44(Box43, { children: [
30665
- /* @__PURE__ */ jsx52(Text47, { children: `API host [${currentHost}]: ` }),
30666
- /* @__PURE__ */ jsx52(TextInput2, { onSubmit: (v) => advance("host", v) }, "host")
30262
+ host: /* @__PURE__ */ jsxs43(Box42, { children: [
30263
+ /* @__PURE__ */ jsx51(Text46, { children: `API host [${currentHost}]: ` }),
30264
+ /* @__PURE__ */ jsx51(TextInput2, { onSubmit: (v) => advance("host", v) }, "host")
30667
30265
  ] })
30668
30266
  };
30669
- return /* @__PURE__ */ jsx52(StepLayout, { helpText, prompt: prompts[field], children: summary });
30267
+ return /* @__PURE__ */ jsx51(StepLayout, { helpText, prompt: prompts[field], children: summary });
30670
30268
  }
30671
30269
  var ENV_KEYS, ENTER, KEEP, FIELD_ORDER;
30672
30270
  var init_ContentfulCredentialsScreen = __esm({
@@ -30683,10 +30281,10 @@ var init_ContentfulCredentialsScreen = __esm({
30683
30281
  });
30684
30282
 
30685
30283
  // packages/experience-design-system-cli-legacy/src/setup/steps/preferences/BooleanInput.tsx
30686
- import { useEffect as useEffect17, useState as useState23 } from "react";
30687
- import { Box as Box44, Text as Text48 } from "ink";
30284
+ import { useEffect as useEffect17, useState as useState22 } from "react";
30285
+ import { Box as Box43, Text as Text47 } from "ink";
30688
30286
  import { Select as Select3 } from "@inkjs/ui";
30689
- import { jsx as jsx53, jsxs as jsxs45 } from "react/jsx-runtime";
30287
+ import { jsx as jsx52, jsxs as jsxs44 } from "react/jsx-runtime";
30690
30288
  function tick(labels, forOn, current) {
30691
30289
  const label = forOn ? labels.on : labels.off;
30692
30290
  return forOn === current ? `${label} \u2713` : label;
@@ -30700,11 +30298,11 @@ function BooleanInput({
30700
30298
  fallback,
30701
30299
  onDone
30702
30300
  }) {
30703
- const [stored, setStored] = useState23(null);
30301
+ const [stored, setStored] = useState22(null);
30704
30302
  useEffect17(() => {
30705
30303
  void readExperiencesCredentials().then(setStored);
30706
30304
  }, []);
30707
- if (!stored) return /* @__PURE__ */ jsx53(Text48, { dimColor: true, children: "Reading saved preferences\u2026" });
30305
+ if (!stored) return /* @__PURE__ */ jsx52(Text47, { dimColor: true, children: "Reading saved preferences\u2026" });
30708
30306
  const current = read(stored) ?? fallback;
30709
30307
  const submit = (value) => {
30710
30308
  if (value === current) {
@@ -30713,13 +30311,13 @@ function BooleanInput({
30713
30311
  }
30714
30312
  void writeExperiencesCredentials(write2(stored, value)).then(() => onDone("completed"));
30715
30313
  };
30716
- return /* @__PURE__ */ jsx53(
30314
+ return /* @__PURE__ */ jsx52(
30717
30315
  StepLayout,
30718
30316
  {
30719
30317
  helpText,
30720
- prompt: /* @__PURE__ */ jsxs45(Box44, { flexDirection: "column", children: [
30721
- /* @__PURE__ */ jsx53(Text48, { children: question }),
30722
- /* @__PURE__ */ jsx53(Box44, { marginTop: 1, children: /* @__PURE__ */ jsx53(
30318
+ prompt: /* @__PURE__ */ jsxs44(Box43, { flexDirection: "column", children: [
30319
+ /* @__PURE__ */ jsx52(Text47, { children: question }),
30320
+ /* @__PURE__ */ jsx52(Box43, { marginTop: 1, children: /* @__PURE__ */ jsx52(
30723
30321
  Select3,
30724
30322
  {
30725
30323
  options: [
@@ -30744,9 +30342,9 @@ var init_BooleanInput = __esm({
30744
30342
  });
30745
30343
 
30746
30344
  // packages/experience-design-system-cli-legacy/src/setup/steps/preferences/AnalyticsScreen.tsx
30747
- import { jsx as jsx54 } from "react/jsx-runtime";
30345
+ import { jsx as jsx53 } from "react/jsx-runtime";
30748
30346
  function AnalyticsScreen({ onDone }) {
30749
- return /* @__PURE__ */ jsx54(
30347
+ return /* @__PURE__ */ jsx53(
30750
30348
  BooleanInput,
30751
30349
  {
30752
30350
  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",
@@ -30767,9 +30365,9 @@ var init_AnalyticsScreen = __esm({
30767
30365
  });
30768
30366
 
30769
30367
  // packages/experience-design-system-cli-legacy/src/setup/steps/preferences/ColorPreferenceScreen.tsx
30770
- import { jsx as jsx55 } from "react/jsx-runtime";
30368
+ import { jsx as jsx54 } from "react/jsx-runtime";
30771
30369
  function ColorPreferenceScreen({ onDone }) {
30772
- return /* @__PURE__ */ jsx55(
30370
+ return /* @__PURE__ */ jsx54(
30773
30371
  BooleanInput,
30774
30372
  {
30775
30373
  helpText: `Prints plain text with no color, which suits CI logs and basic terminals.`,
@@ -30790,10 +30388,10 @@ var init_ColorPreferenceScreen = __esm({
30790
30388
  });
30791
30389
 
30792
30390
  // packages/experience-design-system-cli-legacy/src/setup/steps/preferences/CustomPromptScreen.tsx
30793
- import { useEffect as useEffect18, useState as useState24 } from "react";
30794
- import { Box as Box45, Text as Text49 } from "ink";
30391
+ import { useEffect as useEffect18, useState as useState23 } from "react";
30392
+ import { Box as Box44, Text as Text48 } from "ink";
30795
30393
  import { ConfirmInput, TextInput as TextInput3 } from "@inkjs/ui";
30796
- import { jsx as jsx56, jsxs as jsxs46 } from "react/jsx-runtime";
30394
+ import { jsx as jsx55, jsxs as jsxs45 } from "react/jsx-runtime";
30797
30395
  function parseCustomSkillPath(answer) {
30798
30396
  const trimmed = answer.trim();
30799
30397
  if (trimmed === "") return void 0;
@@ -30810,24 +30408,24 @@ function applyCustomSkillPath(credentials, parsed) {
30810
30408
  return next;
30811
30409
  }
30812
30410
  function CustomPromptsScreen({ onDone }) {
30813
- const [stored, setStored] = useState24(null);
30814
- const [phase, setPhase] = useState24("confirm");
30411
+ const [stored, setStored] = useState23(null);
30412
+ const [phase, setPhase] = useState23("confirm");
30815
30413
  useEffect18(() => {
30816
30414
  void readExperiencesCredentials().then(setStored);
30817
30415
  }, []);
30818
- if (!stored) return /* @__PURE__ */ jsx56(Text49, { dimColor: true, children: "Reading saved prompt paths\u2026" });
30416
+ if (!stored) return /* @__PURE__ */ jsx55(Text48, { dimColor: true, children: "Reading saved prompt paths\u2026" });
30819
30417
  const submit = (answer) => {
30820
30418
  const next = applyCustomSkillPath(stored, parseCustomSkillPath(answer));
30821
30419
  void writeExperiencesCredentials(next).then(() => onDone("completed"));
30822
30420
  };
30823
30421
  if (phase === "confirm") {
30824
- return /* @__PURE__ */ jsx56(
30422
+ return /* @__PURE__ */ jsx55(
30825
30423
  StepLayout,
30826
30424
  {
30827
30425
  helpText: CUSTOM_PROMPTS_HELP,
30828
- prompt: /* @__PURE__ */ jsxs46(Box45, { children: [
30829
- /* @__PURE__ */ jsx56(Text49, { children: "Use your own prompt file instead of the built-in one? " }),
30830
- /* @__PURE__ */ jsx56(
30426
+ prompt: /* @__PURE__ */ jsxs45(Box44, { children: [
30427
+ /* @__PURE__ */ jsx55(Text48, { children: "Use your own prompt file instead of the built-in one? " }),
30428
+ /* @__PURE__ */ jsx55(
30831
30429
  ConfirmInput,
30832
30430
  {
30833
30431
  defaultChoice: "cancel",
@@ -30839,13 +30437,13 @@ function CustomPromptsScreen({ onDone }) {
30839
30437
  }
30840
30438
  );
30841
30439
  }
30842
- return /* @__PURE__ */ jsx56(
30440
+ return /* @__PURE__ */ jsx55(
30843
30441
  StepLayout,
30844
30442
  {
30845
30443
  helpText: CUSTOM_PROMPTS_HELP,
30846
- prompt: /* @__PURE__ */ jsxs46(Box45, { children: [
30847
- /* @__PURE__ */ jsx56(Text49, { children: customSkillPathQuestion(stored.generatePromptPath) }),
30848
- /* @__PURE__ */ jsx56(TextInput3, { onSubmit: submit })
30444
+ prompt: /* @__PURE__ */ jsxs45(Box44, { children: [
30445
+ /* @__PURE__ */ jsx55(Text48, { children: customSkillPathQuestion(stored.generatePromptPath) }),
30446
+ /* @__PURE__ */ jsx55(TextInput3, { onSubmit: submit })
30849
30447
  ] })
30850
30448
  }
30851
30449
  );
@@ -30861,9 +30459,9 @@ var init_CustomPromptScreen = __esm({
30861
30459
  });
30862
30460
 
30863
30461
  // packages/experience-design-system-cli-legacy/src/setup/steps/preferences/DebugLogsScreen.tsx
30864
- import { jsx as jsx57 } from "react/jsx-runtime";
30462
+ import { jsx as jsx56 } from "react/jsx-runtime";
30865
30463
  function DebugLogsScreen({ onDone }) {
30866
- return /* @__PURE__ */ jsx57(
30464
+ return /* @__PURE__ */ jsx56(
30867
30465
  BooleanInput,
30868
30466
  {
30869
30467
  helpText: `Writes a verbose trace of every command decision, for troubleshooting.`,
@@ -30884,17 +30482,17 @@ var init_DebugLogsScreen = __esm({
30884
30482
  });
30885
30483
 
30886
30484
  // packages/experience-design-system-cli-legacy/src/setup/steps/preferences/PreferencesMenu.tsx
30887
- import { useState as useState25 } from "react";
30888
- import { Box as Box46, Text as Text50 } from "ink";
30485
+ import { useState as useState24 } from "react";
30486
+ import { Box as Box45, Text as Text49 } from "ink";
30889
30487
  import { Select as Select4 } from "@inkjs/ui";
30890
- import { jsx as jsx58, jsxs as jsxs47 } from "react/jsx-runtime";
30488
+ import { jsx as jsx57, jsxs as jsxs46 } from "react/jsx-runtime";
30891
30489
  function PreferencesMenu({ onDone }) {
30892
- const [open, setOpen] = useState25(null);
30893
- const [changed, setChanged] = useState25(/* @__PURE__ */ new Set());
30490
+ const [open, setOpen] = useState24(null);
30491
+ const [changed, setChanged] = useState24(/* @__PURE__ */ new Set());
30894
30492
  const entry = open === null ? void 0 : PREFERENCE_OPTIONS.find((option) => option.key === open);
30895
- if (!entry) return /* @__PURE__ */ jsx58(PreferenceList, { changed, onOpen: setOpen, onDone });
30493
+ if (!entry) return /* @__PURE__ */ jsx57(PreferenceList, { changed, onOpen: setOpen, onDone });
30896
30494
  const { key, Screen } = entry;
30897
- return /* @__PURE__ */ jsx58(
30495
+ return /* @__PURE__ */ jsx57(
30898
30496
  Screen,
30899
30497
  {
30900
30498
  onDone: (status) => {
@@ -30906,18 +30504,18 @@ function PreferencesMenu({ onDone }) {
30906
30504
  );
30907
30505
  }
30908
30506
  function PreferenceList({ changed, onOpen, onDone }) {
30909
- const [pick, setPick] = useState25(0);
30507
+ const [pick, setPick] = useState24(0);
30910
30508
  const options = [
30911
30509
  ...PREFERENCE_OPTIONS.map((option) => ({ label: option.label, value: option.key })),
30912
30510
  { label: "Done", value: DONE_VALUE }
30913
30511
  ];
30914
- return /* @__PURE__ */ jsx58(
30512
+ return /* @__PURE__ */ jsx57(
30915
30513
  StepLayout,
30916
30514
  {
30917
30515
  helpText: PREFERENCES_MENU_HELP,
30918
- prompt: /* @__PURE__ */ jsxs47(Box46, { flexDirection: "column", children: [
30919
- /* @__PURE__ */ jsx58(Text50, { children: "Preferences" }),
30920
- /* @__PURE__ */ jsx58(Box46, { marginTop: 1, children: /* @__PURE__ */ jsx58(
30516
+ prompt: /* @__PURE__ */ jsxs46(Box45, { flexDirection: "column", children: [
30517
+ /* @__PURE__ */ jsx57(Text49, { children: "Preferences" }),
30518
+ /* @__PURE__ */ jsx57(Box45, { marginTop: 1, children: /* @__PURE__ */ jsx57(
30921
30519
  Select4,
30922
30520
  {
30923
30521
  options,
@@ -30950,22 +30548,22 @@ var init_PreferencesMenu = __esm({
30950
30548
  {
30951
30549
  key: "customPrompts",
30952
30550
  label: "Custom prompts",
30953
- Screen: ({ onDone }) => /* @__PURE__ */ jsx58(CustomPromptsScreen, { onDone })
30551
+ Screen: ({ onDone }) => /* @__PURE__ */ jsx57(CustomPromptsScreen, { onDone })
30954
30552
  },
30955
30553
  {
30956
30554
  key: "debug",
30957
30555
  label: "Debug logging",
30958
- Screen: ({ onDone }) => /* @__PURE__ */ jsx58(DebugLogsScreen, { onDone })
30556
+ Screen: ({ onDone }) => /* @__PURE__ */ jsx57(DebugLogsScreen, { onDone })
30959
30557
  },
30960
30558
  {
30961
30559
  key: "analytics",
30962
30560
  label: "Usage analytics",
30963
- Screen: ({ onDone }) => /* @__PURE__ */ jsx58(AnalyticsScreen, { onDone })
30561
+ Screen: ({ onDone }) => /* @__PURE__ */ jsx57(AnalyticsScreen, { onDone })
30964
30562
  },
30965
30563
  {
30966
30564
  key: "noColor",
30967
30565
  label: "Terminal colors",
30968
- Screen: ({ onDone }) => /* @__PURE__ */ jsx58(ColorPreferenceScreen, { onDone })
30566
+ Screen: ({ onDone }) => /* @__PURE__ */ jsx57(ColorPreferenceScreen, { onDone })
30969
30567
  }
30970
30568
  ];
30971
30569
  DONE_VALUE = "menu:done";
@@ -31180,24 +30778,24 @@ var init_prerequisites = __esm({
31180
30778
  });
31181
30779
 
31182
30780
  // packages/experience-design-system-cli-legacy/src/setup/steps/prerequisites/PrerequisitesScreen.tsx
31183
- import { useEffect as useEffect19, useRef as useRef13, useState as useState26 } from "react";
31184
- import { Box as Box47, Text as Text51 } from "ink";
30781
+ import { useEffect as useEffect19, useRef as useRef12, useState as useState25 } from "react";
30782
+ import { Box as Box46, Text as Text50 } from "ink";
31185
30783
  import { ConfirmInput as ConfirmInput2 } from "@inkjs/ui";
31186
- import { jsx as jsx59, jsxs as jsxs48 } from "react/jsx-runtime";
30784
+ import { jsx as jsx58, jsxs as jsxs47 } from "react/jsx-runtime";
31187
30785
  function EventLine({ event }) {
31188
- if (event.kind === "success") return /* @__PURE__ */ jsxs48(Text51, { color: PALETTE.success, children: [
30786
+ if (event.kind === "success") return /* @__PURE__ */ jsxs47(Text50, { color: PALETTE.success, children: [
31189
30787
  "\u2713 ",
31190
30788
  event.message
31191
30789
  ] });
31192
- if (event.kind === "failure") return /* @__PURE__ */ jsxs48(Text51, { color: PALETTE.error, children: [
30790
+ if (event.kind === "failure") return /* @__PURE__ */ jsxs47(Text50, { color: PALETTE.error, children: [
31193
30791
  "\u2717 ",
31194
30792
  event.message
31195
30793
  ] });
31196
- if (event.kind === "warning") return /* @__PURE__ */ jsxs48(Text51, { color: PALETTE.warning, children: [
30794
+ if (event.kind === "warning") return /* @__PURE__ */ jsxs47(Text50, { color: PALETTE.warning, children: [
31197
30795
  "\u26A0 ",
31198
30796
  event.message
31199
30797
  ] });
31200
- return /* @__PURE__ */ jsx59(Text51, { children: event.message });
30798
+ return /* @__PURE__ */ jsx58(Text50, { children: event.message });
31201
30799
  }
31202
30800
  function PrerequisitesScreen({
31203
30801
  repoRoot,
@@ -31205,9 +30803,9 @@ function PrerequisitesScreen({
31205
30803
  onDone,
31206
30804
  deps
31207
30805
  }) {
31208
- const [events, setEvents] = useState26([]);
31209
- const [confirm, setConfirm] = useState26(null);
31210
- const startedRef = useRef13(false);
30806
+ const [events, setEvents] = useState25([]);
30807
+ const [confirm, setConfirm] = useState25(null);
30808
+ const startedRef = useRef12(false);
31211
30809
  useEffect19(() => {
31212
30810
  if (startedRef.current) return;
31213
30811
  startedRef.current = true;
@@ -31236,15 +30834,15 @@ function PrerequisitesScreen({
31236
30834
  ...skipBuild !== void 0 ? { skipBuild } : {}
31237
30835
  }).then(onDone);
31238
30836
  }, []);
31239
- return /* @__PURE__ */ jsx59(
30837
+ return /* @__PURE__ */ jsx58(
31240
30838
  StepLayout,
31241
30839
  {
31242
- prompt: confirm ? /* @__PURE__ */ jsxs48(Box47, { children: [
31243
- /* @__PURE__ */ jsxs48(Text51, { children: [
30840
+ prompt: confirm ? /* @__PURE__ */ jsxs47(Box46, { children: [
30841
+ /* @__PURE__ */ jsxs47(Text50, { children: [
31244
30842
  confirm.question,
31245
30843
  " "
31246
30844
  ] }),
31247
- /* @__PURE__ */ jsx59(
30845
+ /* @__PURE__ */ jsx58(
31248
30846
  ConfirmInput2,
31249
30847
  {
31250
30848
  defaultChoice: confirm.defaultYes ? "confirm" : "cancel",
@@ -31253,8 +30851,8 @@ function PrerequisitesScreen({
31253
30851
  },
31254
30852
  confirm.question
31255
30853
  )
31256
- ] }) : /* @__PURE__ */ jsx59(Text51, { color: PALETTE.info, children: "\u27F3 Checking prerequisites\u2026" }),
31257
- children: /* @__PURE__ */ jsx59(Box47, { flexDirection: "column", children: events.map((event, index) => /* @__PURE__ */ jsx59(EventLine, { event }, `${index}-${event.message}`)) })
30854
+ ] }) : /* @__PURE__ */ jsx58(Text50, { color: PALETTE.info, children: "\u27F3 Checking prerequisites\u2026" }),
30855
+ children: /* @__PURE__ */ jsx58(Box46, { flexDirection: "column", children: events.map((event, index) => /* @__PURE__ */ jsx58(EventLine, { event }, `${index}-${event.message}`)) })
31258
30856
  }
31259
30857
  );
31260
30858
  }
@@ -31274,9 +30872,9 @@ __export(SetupScreen_exports, {
31274
30872
  SetupScreen: () => SetupScreen,
31275
30873
  formatSetupCompletionMessage: () => formatSetupCompletionMessage
31276
30874
  });
31277
- import { useEffect as useEffect20, useRef as useRef14, useState as useState27 } from "react";
31278
- import { Box as Box48, Text as Text52 } from "ink";
31279
- import { jsx as jsx60, jsxs as jsxs49 } from "react/jsx-runtime";
30875
+ import { useEffect as useEffect20, useRef as useRef13, useState as useState26 } from "react";
30876
+ import { Box as Box47, Text as Text51 } from "ink";
30877
+ import { jsx as jsx59, jsxs as jsxs48 } from "react/jsx-runtime";
31280
30878
  function countRequiredFailures(results) {
31281
30879
  return results.filter((result) => result.required && result.status === "failed").length;
31282
30880
  }
@@ -31294,11 +30892,11 @@ function SetupScreen({
31294
30892
  }) {
31295
30893
  const { columns: terminalColumns } = useTerminalSize();
31296
30894
  const columns = columnsOverride ?? terminalColumns;
31297
- const [activeStep, setActiveStep] = useState27(1);
31298
- const [outcome, setOutcome] = useState27(null);
31299
- const [notice, setNotice] = useState27(null);
31300
- const [screen, setScreen] = useState27(null);
31301
- const startedRef = useRef14(false);
30895
+ const [activeStep, setActiveStep] = useState26(1);
30896
+ const [outcome, setOutcome] = useState26(null);
30897
+ const [notice, setNotice] = useState26(null);
30898
+ const [screen, setScreen] = useState26(null);
30899
+ const startedRef = useRef13(false);
31302
30900
  useEffect20(() => {
31303
30901
  if (startedRef.current) return;
31304
30902
  startedRef.current = true;
@@ -31307,7 +30905,7 @@ function SetupScreen({
31307
30905
  });
31308
30906
  void (async () => {
31309
30907
  const results = [];
31310
- const prerequisites = await runScreen((done) => /* @__PURE__ */ jsx60(
30908
+ const prerequisites = await runScreen((done) => /* @__PURE__ */ jsx59(
31311
30909
  PrerequisitesScreen,
31312
30910
  {
31313
30911
  repoRoot,
@@ -31341,21 +30939,21 @@ function SetupScreen({
31341
30939
  if (skip.skipAgent) {
31342
30940
  results.push({ name: "Coding agent", status: "skipped", required: false });
31343
30941
  } else {
31344
- const status = await runScreen((done) => /* @__PURE__ */ jsx60(CodingAgentScreen, { onDone: done }));
30942
+ const status = await runScreen((done) => /* @__PURE__ */ jsx59(CodingAgentScreen, { onDone: done }));
31345
30943
  results.push({ name: "Coding agent", status, required: true });
31346
30944
  }
31347
30945
  setActiveStep(3);
31348
30946
  if (skip.skipCredentials) {
31349
30947
  results.push({ name: "Contentful credentials", status: "skipped", required: false });
31350
30948
  } else {
31351
- const status = await runScreen((done) => /* @__PURE__ */ jsx60(ContentfulCredentialsScreen, { onDone: done }));
30949
+ const status = await runScreen((done) => /* @__PURE__ */ jsx59(ContentfulCredentialsScreen, { onDone: done }));
31352
30950
  results.push({ name: "Contentful credentials", status, required: false });
31353
30951
  }
31354
30952
  setActiveStep(4);
31355
30953
  if (skip.skipOptional) {
31356
30954
  results.push({ name: "Preferences", status: "skipped", required: false });
31357
30955
  } else {
31358
- const status = await runScreen((done) => /* @__PURE__ */ jsx60(PreferencesMenu, { onDone: done }));
30956
+ const status = await runScreen((done) => /* @__PURE__ */ jsx59(PreferencesMenu, { onDone: done }));
31359
30957
  results.push({ name: "Preferences", status, required: false });
31360
30958
  }
31361
30959
  const exitCode = countRequiredFailures(results) === 0 ? 0 : 1;
@@ -31364,37 +30962,37 @@ function SetupScreen({
31364
30962
  onComplete(finalOutcome);
31365
30963
  })();
31366
30964
  }, []);
31367
- return /* @__PURE__ */ jsxs49(Box48, { flexDirection: "column", paddingX: 1, children: [
31368
- /* @__PURE__ */ jsxs49(Box48, { justifyContent: "space-between", columnGap: 1, ...columns !== void 0 ? { width: columns - 2 } : {}, children: [
31369
- /* @__PURE__ */ jsx60(Box48, { flexShrink: 0, children: /* @__PURE__ */ jsx60(Text52, { bold: true, children: "experiences setup" }) }),
31370
- /* @__PURE__ */ jsx60(Box48, { flexShrink: 0, children: /* @__PURE__ */ jsxs49(Text52, { dimColor: true, children: [
30965
+ return /* @__PURE__ */ jsxs48(Box47, { flexDirection: "column", paddingX: 1, children: [
30966
+ /* @__PURE__ */ jsxs48(Box47, { justifyContent: "space-between", columnGap: 1, ...columns !== void 0 ? { width: columns - 2 } : {}, children: [
30967
+ /* @__PURE__ */ jsx59(Box47, { flexShrink: 0, children: /* @__PURE__ */ jsx59(Text51, { bold: true, children: "experiences setup" }) }),
30968
+ /* @__PURE__ */ jsx59(Box47, { flexShrink: 0, children: /* @__PURE__ */ jsxs48(Text51, { dimColor: true, children: [
31371
30969
  "v",
31372
30970
  version
31373
30971
  ] }) })
31374
30972
  ] }),
31375
- /* @__PURE__ */ jsx60(Box48, { marginTop: 1, children: /* @__PURE__ */ jsx60(SetupStepper, { activeStep, columns }) }),
31376
- outcome ? /* @__PURE__ */ jsx60(SetupSummary, { outcome, notice }) : screen && /* @__PURE__ */ jsx60(Box48, { marginTop: 1, children: screen })
30973
+ /* @__PURE__ */ jsx59(Box47, { marginTop: 1, children: /* @__PURE__ */ jsx59(SetupStepper, { activeStep, columns }) }),
30974
+ outcome ? /* @__PURE__ */ jsx59(SetupSummary, { outcome, notice }) : screen && /* @__PURE__ */ jsx59(Box47, { marginTop: 1, children: screen })
31377
30975
  ] });
31378
30976
  }
31379
30977
  function SetupSummary({ outcome, notice }) {
31380
30978
  const requiredFailed = countRequiredFailures(outcome.results);
31381
- return /* @__PURE__ */ jsxs49(Box48, { flexDirection: "column", marginTop: 1, children: [
31382
- /* @__PURE__ */ jsx60(Text52, { bold: true, children: "Summary" }),
30979
+ return /* @__PURE__ */ jsxs48(Box47, { flexDirection: "column", marginTop: 1, children: [
30980
+ /* @__PURE__ */ jsx59(Text51, { bold: true, children: "Summary" }),
31383
30981
  outcome.results.map((result) => {
31384
30982
  if (result.status === "completed") {
31385
- return /* @__PURE__ */ jsxs49(Text52, { color: PALETTE.success, children: [
30983
+ return /* @__PURE__ */ jsxs48(Text51, { color: PALETTE.success, children: [
31386
30984
  "\u2713 ",
31387
30985
  result.name
31388
30986
  ] }, result.name);
31389
30987
  }
31390
30988
  if (result.status === "skipped") {
31391
- return /* @__PURE__ */ jsxs49(Text52, { dimColor: true, children: [
30989
+ return /* @__PURE__ */ jsxs48(Text51, { dimColor: true, children: [
31392
30990
  "\u2013 ",
31393
30991
  result.name,
31394
30992
  " \u2014 skipped"
31395
30993
  ] }, result.name);
31396
30994
  }
31397
- return /* @__PURE__ */ jsxs49(Text52, { color: result.required ? PALETTE.error : PALETTE.warning, children: [
30995
+ return /* @__PURE__ */ jsxs48(Text51, { color: result.required ? PALETTE.error : PALETTE.warning, children: [
31398
30996
  result.required ? "\u2717" : "\u26A0",
31399
30997
  " ",
31400
30998
  result.name,
@@ -31402,10 +31000,10 @@ function SetupSummary({ outcome, notice }) {
31402
31000
  result.required ? "required" : "optional"
31403
31001
  ] }, result.name);
31404
31002
  }),
31405
- notice && /* @__PURE__ */ jsx60(Box48, { marginTop: 1, children: /* @__PURE__ */ jsx60(Text52, { color: PALETTE.warning, children: notice }) }),
31406
- /* @__PURE__ */ jsx60(Box48, { marginTop: 1, children: /* @__PURE__ */ jsx60(Text52, { bold: true, color: requiredFailed === 0 ? PALETTE.success : PALETTE.warning, children: formatSetupCompletionMessage(outcome.results) }) }),
31407
- requiredFailed > 0 && /* @__PURE__ */ jsx60(Text52, { dimColor: true, children: "Complete the steps above, then re-run experiences setup." }),
31408
- /* @__PURE__ */ jsx60(Text52, { dimColor: true, children: "Run experiences doctor any time to re-check." })
31003
+ notice && /* @__PURE__ */ jsx59(Box47, { marginTop: 1, children: /* @__PURE__ */ jsx59(Text51, { color: PALETTE.warning, children: notice }) }),
31004
+ /* @__PURE__ */ jsx59(Box47, { marginTop: 1, children: /* @__PURE__ */ jsx59(Text51, { bold: true, color: requiredFailed === 0 ? PALETTE.success : PALETTE.warning, children: formatSetupCompletionMessage(outcome.results) }) }),
31005
+ requiredFailed > 0 && /* @__PURE__ */ jsx59(Text51, { dimColor: true, children: "Complete the steps above, then re-run experiences setup." }),
31006
+ /* @__PURE__ */ jsx59(Text51, { dimColor: true, children: "Run experiences doctor any time to re-check." })
31409
31007
  ] });
31410
31008
  }
31411
31009
  var init_SetupScreen = __esm({