@contentful/experience-design-system-cli 2.37.1-dev-build-f86ffbb8.0 → 2.37.1-dev-build-c5906aa0.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,9 +9912,196 @@ 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
+
9915
10102
  // packages/experience-design-system-cli-legacy/src/tui/use-terminal-size.ts
9916
10103
  import { useStdout } from "ink";
9917
- import { useEffect as useEffect4, useState as useState6 } from "react";
10104
+ import { useEffect as useEffect4, useState as useState7 } from "react";
9918
10105
  function readTerminalSize(stdout) {
9919
10106
  return {
9920
10107
  columns: stdout?.columns ?? 80,
@@ -9923,7 +10110,7 @@ function readTerminalSize(stdout) {
9923
10110
  }
9924
10111
  function useTerminalSize() {
9925
10112
  const { stdout } = useStdout();
9926
- const [size, setSize] = useState6(() => readTerminalSize(stdout));
10113
+ const [size, setSize] = useState7(() => readTerminalSize(stdout));
9927
10114
  useEffect4(() => {
9928
10115
  const updateSize = () => setSize(readTerminalSize(stdout));
9929
10116
  stdout?.on("resize", updateSize);
@@ -10106,15 +10293,15 @@ var init_preview_diff = __esm({
10106
10293
  });
10107
10294
 
10108
10295
  // packages/experience-design-system-cli-legacy/src/import/tui/components/SpaceEnvironment.tsx
10109
- import { Box as Box11, Text as Text12 } from "ink";
10110
- import { jsx as jsx15, jsxs as jsxs11 } from "react/jsx-runtime";
10296
+ import { Box as Box12, Text as Text13 } from "ink";
10297
+ import { jsx as jsx16, jsxs as jsxs12 } from "react/jsx-runtime";
10111
10298
  function SpaceEnvironment({ spaceId, 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 })
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 })
10118
10305
  ] });
10119
10306
  }
10120
10307
  var init_SpaceEnvironment = __esm({
@@ -10148,8 +10335,8 @@ var init_preview_confirmation_input = __esm({
10148
10335
  });
10149
10336
 
10150
10337
  // packages/experience-design-system-cli-legacy/src/tui/windowed-panel.tsx
10151
- import { Box as Box12, Text as Text13 } from "ink";
10152
- import { jsx as jsx16, jsxs as jsxs12 } from "react/jsx-runtime";
10338
+ import { Box as Box13, Text as Text14 } from "ink";
10339
+ import { jsx as jsx17, jsxs as jsxs13 } from "react/jsx-runtime";
10153
10340
  function terminalPanelHeight(rows, reservedRows = 4) {
10154
10341
  return Math.max(MIN_TERMINAL_PANEL_HEIGHT, rows - reservedRows);
10155
10342
  }
@@ -10164,8 +10351,8 @@ function FixedPanel({
10164
10351
  clipOverflow = true,
10165
10352
  children
10166
10353
  }) {
10167
- return /* @__PURE__ */ jsx16(
10168
- Box12,
10354
+ return /* @__PURE__ */ jsx17(
10355
+ Box13,
10169
10356
  {
10170
10357
  flexDirection: "column",
10171
10358
  width,
@@ -10181,7 +10368,7 @@ function FixedPanel({
10181
10368
  );
10182
10369
  }
10183
10370
  function WindowedPanel({ width, height, title, focused, children }) {
10184
- return /* @__PURE__ */ jsxs12(
10371
+ return /* @__PURE__ */ jsxs13(
10185
10372
  FixedPanel,
10186
10373
  {
10187
10374
  width,
@@ -10190,7 +10377,7 @@ function WindowedPanel({ width, height, title, focused, children }) {
10190
10377
  ...height === void 0 ? {} : { height },
10191
10378
  focused,
10192
10379
  children: [
10193
- title && /* @__PURE__ */ jsx16(WindowedPanelHeader, { title, width, focused }),
10380
+ title && /* @__PURE__ */ jsx17(WindowedPanelHeader, { title, width, focused }),
10194
10381
  children
10195
10382
  ]
10196
10383
  }
@@ -10201,9 +10388,9 @@ function WindowedPanelHeader({
10201
10388
  width,
10202
10389
  focused
10203
10390
  }) {
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)) })
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)) })
10207
10394
  ] });
10208
10395
  }
10209
10396
  function formatWindowIndicator(direction, count) {
@@ -10211,7 +10398,7 @@ function formatWindowIndicator(direction, count) {
10211
10398
  return `${direction === "up" ? "\u2191" : "\u2193"} ${count} more`;
10212
10399
  }
10213
10400
  function WindowIndicator({ direction, count }) {
10214
- return /* @__PURE__ */ jsx16(Text13, { dimColor: true, children: formatWindowIndicator(direction, count) });
10401
+ return /* @__PURE__ */ jsx17(Text14, { dimColor: true, children: formatWindowIndicator(direction, count) });
10215
10402
  }
10216
10403
  var MIN_TERMINAL_PANEL_HEIGHT;
10217
10404
  var init_windowed_panel = __esm({
@@ -10223,9 +10410,9 @@ var init_windowed_panel = __esm({
10223
10410
  });
10224
10411
 
10225
10412
  // packages/experience-design-system-cli-legacy/src/import/tui/steps/WizardPreviewStep.tsx
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";
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";
10229
10416
  function buildPreviewSummaryLines(preview) {
10230
10417
  const lines = [];
10231
10418
  const { components, tokens } = preview;
@@ -10419,8 +10606,8 @@ function WizardPreviewStep({
10419
10606
  onQuit
10420
10607
  }) {
10421
10608
  const breakingWithImpact = hasBreakingChangesWithImpact(preview);
10422
- const [diffExpanded, setDiffExpanded] = useState7(false);
10423
- const [scrollOffset, setScrollOffset] = useState7(0);
10609
+ const [diffExpanded, setDiffExpanded] = useState8(false);
10610
+ const [scrollOffset, setScrollOffset] = useState8(0);
10424
10611
  const { columns: terminalColumns, rows: terminalRows } = useTerminalSize();
10425
10612
  const summaryLines = useMemo(() => buildPreviewSummaryLines(preview), [preview]);
10426
10613
  const diffLines = useMemo(() => buildPreviewDiffLines(preview), [preview]);
@@ -10479,11 +10666,11 @@ function WizardPreviewStep({
10479
10666
  return;
10480
10667
  }
10481
10668
  });
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(
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(
10487
10674
  WindowedPanel,
10488
10675
  {
10489
10676
  width: Math.max(20, terminalColumns - 4),
@@ -10491,8 +10678,8 @@ function WizardPreviewStep({
10491
10678
  title: diffExpanded ? `Diff (${diffLines.length} lines)` : "",
10492
10679
  focused: false,
10493
10680
  children: [
10494
- activeLines.slice(boundedScrollOffset, boundedScrollOffset + viewportHeight).map((line) => /* @__PURE__ */ jsx17(
10495
- Text14,
10681
+ activeLines.slice(boundedScrollOffset, boundedScrollOffset + viewportHeight).map((line) => /* @__PURE__ */ jsx18(
10682
+ Text15,
10496
10683
  {
10497
10684
  color: line.color === "gray" ? void 0 : line.color,
10498
10685
  dimColor: line.color === "gray",
@@ -10501,23 +10688,23 @@ function WizardPreviewStep({
10501
10688
  },
10502
10689
  line.key
10503
10690
  )),
10504
- /* @__PURE__ */ jsx17(Text14, { dimColor: true, wrap: "truncate-end", children: formatPreviewScrollIndicator(activeLines.length, boundedScrollOffset, viewportHeight) })
10691
+ /* @__PURE__ */ jsx18(Text15, { dimColor: true, wrap: "truncate-end", children: formatPreviewScrollIndicator(activeLines.length, boundedScrollOffset, viewportHeight) })
10505
10692
  ]
10506
10693
  }
10507
10694
  )
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: [
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: [
10514
10701
  "[d] ",
10515
10702
  diffExpanded ? "Hide" : "Show",
10516
10703
  " diff"
10517
10704
  ] }),
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" })
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" })
10521
10708
  ] })
10522
10709
  ] });
10523
10710
  }
@@ -10537,19 +10724,19 @@ var init_WizardPreviewStep = __esm({
10537
10724
  });
10538
10725
 
10539
10726
  // packages/experience-design-system-cli-legacy/src/import/tui/steps/DoneStep.tsx
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";
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";
10542
10729
  function EntityRows({ entity, label }) {
10543
10730
  const plural = (n) => `${n} ${label}${n !== 1 ? "s" : ""}`;
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" }),
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" }),
10547
10734
  " ",
10548
10735
  plural(entity[action]),
10549
10736
  " ",
10550
10737
  action
10551
10738
  ] }, action)),
10552
- entity.failed > 0 && /* @__PURE__ */ jsxs14(Text15, { color: PALETTE.error, children: [
10739
+ entity.failed > 0 && /* @__PURE__ */ jsxs15(Text16, { color: PALETTE.error, children: [
10553
10740
  "\u2717 ",
10554
10741
  plural(entity.failed),
10555
10742
  " failed \u2014 check logs above"
@@ -10557,9 +10744,9 @@ function EntityRows({ entity, label }) {
10557
10744
  ] });
10558
10745
  }
10559
10746
  function LinkRow({ title, 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 })
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 })
10563
10750
  ] });
10564
10751
  }
10565
10752
  function DoneStep({
@@ -10581,27 +10768,27 @@ function DoneStep({
10581
10768
  const totalPushed = componentTypes.created + componentTypes.updated + componentTypes.removed + designTokens.created + designTokens.updated + designTokens.removed;
10582
10769
  const success = totalFailed === 0;
10583
10770
  const urlArgs = { host: host ?? "api.contentful.com", spaceId, environmentId };
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: [
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: [
10590
10777
  "Push result: ",
10591
10778
  summary.succeeded,
10592
10779
  "/",
10593
10780
  summary.total,
10594
10781
  " succeeded",
10595
- summary.failed > 0 && /* @__PURE__ */ jsxs14(Text15, { color: PALETTE.error, children: [
10782
+ summary.failed > 0 && /* @__PURE__ */ jsxs15(Text16, { color: PALETTE.error, children: [
10596
10783
  ", ",
10597
10784
  summary.failed,
10598
10785
  " failed"
10599
10786
  ] })
10600
10787
  ] }) })
10601
10788
  ] }),
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: [
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: [
10605
10792
  failure.entityType,
10606
10793
  " ",
10607
10794
  failure.entityId,
@@ -10609,11 +10796,11 @@ function DoneStep({
10609
10796
  failure.message
10610
10797
  ] }, `${failure.entityType}:${failure.entityId}`))
10611
10798
  ] }),
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(
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(
10617
10804
  LinkRow,
10618
10805
  {
10619
10806
  title: "View your design tokens here:",
@@ -10621,7 +10808,7 @@ function DoneStep({
10621
10808
  }
10622
10809
  )
10623
10810
  ] }),
10624
- /* @__PURE__ */ jsx18(Text15, { dimColor: true, children: "[Enter / q] Exit" })
10811
+ /* @__PURE__ */ jsx19(Text16, { dimColor: true, children: "[Enter / q] Exit" })
10625
10812
  ] });
10626
10813
  }
10627
10814
  var ACTIONS;
@@ -10637,8 +10824,8 @@ var init_DoneStep = __esm({
10637
10824
  });
10638
10825
 
10639
10826
  // packages/experience-design-system-cli-legacy/src/import/tui/steps/ErrorStep.tsx
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";
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";
10642
10829
  function ErrorStep({
10643
10830
  stepName,
10644
10831
  message,
@@ -10659,19 +10846,19 @@ function ErrorStep({
10659
10846
  onExit();
10660
10847
  }
10661
10848
  });
10662
- return /* @__PURE__ */ jsxs15(Box15, { flexDirection: "column", gap: 1, paddingX: 2, paddingY: 1, children: [
10663
- /* @__PURE__ */ jsxs15(Text16, { bold: true, color: PALETTE.error, children: [
10849
+ return /* @__PURE__ */ jsxs16(Box16, { flexDirection: "column", gap: 1, paddingX: 2, paddingY: 1, children: [
10850
+ /* @__PURE__ */ jsxs16(Text17, { bold: true, color: PALETTE.error, children: [
10664
10851
  "\u2717 ",
10665
10852
  stepName,
10666
10853
  " failed"
10667
10854
  ] }),
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" })
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" })
10675
10862
  ] })
10676
10863
  ] });
10677
10864
  }
@@ -10684,7 +10871,7 @@ var init_ErrorStep = __esm({
10684
10871
  });
10685
10872
 
10686
10873
  // packages/experience-design-system-cli-legacy/src/import/tui/steps/PreviewValidationErrorStep.tsx
10687
- import { jsx as jsx20 } from "react/jsx-runtime";
10874
+ import { jsx as jsx21 } from "react/jsx-runtime";
10688
10875
  function PreviewValidationErrorStep({
10689
10876
  errors,
10690
10877
  missingNames,
@@ -10707,7 +10894,7 @@ function PreviewValidationErrorStep({
10707
10894
 
10708
10895
  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.` : "";
10709
10896
  const skipLabel = matchedNames.length === 0 ? "No matching components to skip" : `Skip ${matchedNames.length === 1 ? matchedNames[0] : `${matchedNames.length} components`} and retry`;
10710
- return /* @__PURE__ */ jsx20(
10897
+ return /* @__PURE__ */ jsx21(
10711
10898
  GateStep,
10712
10899
  {
10713
10900
  intent: "error",
@@ -10732,35 +10919,35 @@ var init_PreviewValidationErrorStep = __esm({
10732
10919
  });
10733
10920
 
10734
10921
  // packages/experience-design-system-cli-legacy/src/import/tui/steps/PushingStep.tsx
10735
- import { Box as Box16, Text as Text17 } from "ink";
10922
+ import { Box as Box17, Text as Text18 } from "ink";
10736
10923
  import { ProgressBar as ProgressBar2, ThemeProvider as ThemeProvider2 } from "@inkjs/ui";
10737
- import { jsx as jsx21, jsxs as jsxs16 } from "react/jsx-runtime";
10924
+ import { jsx as jsx22, jsxs as jsxs17 } from "react/jsx-runtime";
10738
10925
  function PushingStep({ stepNumber, totalSteps, progress }) {
10739
10926
  const { elapsed } = useTimedSpinner();
10740
10927
  const operationId = progress && progress.kind === "queued" ? progress.operationId : null;
10741
10928
  const showGlobal = progress && progress.kind === "progress";
10742
10929
  const showCurrent = progress && progress.kind === "progress" && progress.current ? progress.current : null;
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 })
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 })
10749
10936
  ] }),
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: [
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: [
10753
10940
  progress.processed,
10754
10941
  "/",
10755
10942
  progress.total,
10756
10943
  " entities"
10757
10944
  ] })
10758
10945
  ] }) }),
10759
- showCurrent && /* @__PURE__ */ jsxs16(Box16, { gap: 1, children: [
10760
- /* @__PURE__ */ jsx21(Text17, { dimColor: true, children: "Now processing:" }),
10761
- /* @__PURE__ */ jsx21(Text17, { children: showCurrent })
10946
+ showCurrent && /* @__PURE__ */ jsxs17(Box17, { gap: 1, children: [
10947
+ /* @__PURE__ */ jsx22(Text18, { dimColor: true, children: "Now processing:" }),
10948
+ /* @__PURE__ */ jsx22(Text18, { children: showCurrent })
10762
10949
  ] }),
10763
- /* @__PURE__ */ jsx21(Box16, { marginTop: 1, children: /* @__PURE__ */ jsxs16(Text17, { dimColor: true, children: [
10950
+ /* @__PURE__ */ jsx22(Box17, { marginTop: 1, children: /* @__PURE__ */ jsxs17(Text18, { dimColor: true, children: [
10764
10951
  "Elapsed: ",
10765
10952
  elapsed
10766
10953
  ] }) })
@@ -19358,8 +19545,8 @@ var init_composite_closure = __esm({
19358
19545
  });
19359
19546
 
19360
19547
  // packages/experience-design-system-cli-legacy/src/analyze/select/tui/components/Sidebar.tsx
19361
- import { Box as Box17, Text as Text18 } from "ink";
19362
- import { jsx as jsx22, jsxs as jsxs17 } from "react/jsx-runtime";
19548
+ import { Box as Box18, Text as Text19 } from "ink";
19549
+ import { jsx as jsx23, jsxs as jsxs18 } from "react/jsx-runtime";
19363
19550
  function previewBadge(annotation) {
19364
19551
  switch (annotation) {
19365
19552
  case "new":
@@ -19378,7 +19565,7 @@ function PreviewBadge({
19378
19565
  badge,
19379
19566
  highlighted = false
19380
19567
  }) {
19381
- return badge ? /* @__PURE__ */ jsx22(Text18, { color: badge.color, bold: badge.bold, dimColor: highlighted ? false : badge.dim, children: badge.char }) : /* @__PURE__ */ jsx22(Text18, { children: " " });
19568
+ return badge ? /* @__PURE__ */ jsx23(Text19, { color: badge.color, bold: badge.bold, dimColor: highlighted ? false : badge.dim, children: badge.char }) : /* @__PURE__ */ jsx23(Text19, { children: " " });
19382
19569
  }
19383
19570
  var init_Sidebar = __esm({
19384
19571
  "packages/experience-design-system-cli-legacy/src/analyze/select/tui/components/Sidebar.tsx"() {
@@ -19389,8 +19576,8 @@ var init_Sidebar = __esm({
19389
19576
 
19390
19577
  // packages/experience-design-system-cli-legacy/src/analyze/select/tui/components/GroupedSidebar.tsx
19391
19578
  import figures from "figures";
19392
- import { Box as Box18, Text as Text19 } from "ink";
19393
- import { jsx as jsx23, jsxs as jsxs18 } from "react/jsx-runtime";
19579
+ import { Box as Box19, Text as Text20 } from "ink";
19580
+ import { jsx as jsx24, jsxs as jsxs19 } from "react/jsx-runtime";
19394
19581
  function isEmpty(entry) {
19395
19582
  return Object.keys(entry.$properties ?? {}).length === 0 && Object.keys(entry.$slots ?? {}).length === 0;
19396
19583
  }
@@ -19814,8 +20001,8 @@ function GroupedSidebar(props) {
19814
20001
  const start = windowed ? Math.max(0, scrollOffset ?? 0) : 0;
19815
20002
  const end = windowed ? start + (visibleCount ?? allRows.length) : allRows.length;
19816
20003
  const rows = windowed ? allRows.slice(start, end) : allRows;
19817
- return /* @__PURE__ */ jsxs18(WindowedPanel, { width, height: props.height, title, focused, children: [
19818
- windowed && /* @__PURE__ */ jsx23(WindowIndicator, { direction: "up", count: start }),
20004
+ return /* @__PURE__ */ jsxs19(WindowedPanel, { width, height: props.height, title, focused, children: [
20005
+ windowed && /* @__PURE__ */ jsx24(WindowIndicator, { direction: "up", count: start }),
19819
20006
  rows.map((row, i) => {
19820
20007
  const absoluteRowIdx = start + i;
19821
20008
  const isSelected = selectedRowIdx !== void 0 ? absoluteRowIdx === selectedRowIdx && row.itemIdx >= 0 : row.itemIdx >= 0 && row.itemIdx === selectedIdx;
@@ -19842,13 +20029,13 @@ function GroupedSidebar(props) {
19842
20029
  isOwn: rs?.isOwn ?? false,
19843
20030
  isCursor
19844
20031
  });
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,
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,
19852
20039
  {
19853
20040
  color: isSelected ? PALETTE.info : labelStyle.color,
19854
20041
  bold: isSelected || labelStyle.bold,
@@ -19862,10 +20049,10 @@ function GroupedSidebar(props) {
19862
20049
  ]
19863
20050
  }
19864
20051
  ),
19865
- inheritanceStyle.glyph && /* @__PURE__ */ jsx23(Text19, { color: inheritanceStyle.color, bold: inheritanceStyle.bold, dimColor: inheritanceStyle.dim, children: " " + inheritanceStyle.glyph })
20052
+ inheritanceStyle.glyph && /* @__PURE__ */ jsx24(Text20, { color: inheritanceStyle.color, bold: inheritanceStyle.bold, dimColor: inheritanceStyle.dim, children: " " + inheritanceStyle.glyph })
19866
20053
  ] }, row.key);
19867
20054
  }),
19868
- windowed && /* @__PURE__ */ jsx23(WindowIndicator, { direction: "down", count: allRows.length - end })
20055
+ windowed && /* @__PURE__ */ jsx24(WindowIndicator, { direction: "down", count: allRows.length - end })
19869
20056
  ] });
19870
20057
  }
19871
20058
  var GLYPH_EXPAND_COLLAPSED, GLYPH_EXPAND_EXPANDED, GLYPH_TREE_MID, GLYPH_TREE_LAST, GLYPH_WARN, GLYPH_ERROR;
@@ -20094,15 +20281,15 @@ var init_sidebar_navigation = __esm({
20094
20281
  });
20095
20282
 
20096
20283
  // packages/experience-design-system-cli-legacy/src/import/tui/hooks/sidebar-search-state.ts
20097
- import { useState as useState8 } from "react";
20284
+ import { useState as useState9 } from "react";
20098
20285
  function useSidebarSearchState() {
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);
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);
20106
20293
  return {
20107
20294
  searchOpen,
20108
20295
  setSearchOpen,
@@ -20127,8 +20314,8 @@ var init_sidebar_search_state = __esm({
20127
20314
  });
20128
20315
 
20129
20316
  // packages/experience-design-system-cli-legacy/src/import/tui/components/SearchMatchSummary.tsx
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";
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";
20132
20319
  function SearchMatchSummary({
20133
20320
  open,
20134
20321
  query,
@@ -20139,17 +20326,17 @@ function SearchMatchSummary({
20139
20326
  marginTop
20140
20327
  }) {
20141
20328
  if (hidden) return null;
20142
- return /* @__PURE__ */ jsxs19(Fragment7, { children: [
20143
- open && /* @__PURE__ */ jsxs19(Box19, { marginTop, flexDirection: "column", children: [
20144
- /* @__PURE__ */ jsxs19(Text20, { children: [
20329
+ return /* @__PURE__ */ jsxs20(Fragment8, { children: [
20330
+ open && /* @__PURE__ */ jsxs20(Box20, { marginTop, flexDirection: "column", children: [
20331
+ /* @__PURE__ */ jsxs20(Text21, { children: [
20145
20332
  `/${query}`,
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" })
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" })
20149
20336
  ] }),
20150
- autocompleteCandidates.length > 1 && /* @__PURE__ */ jsx24(Text20, { dimColor: true, children: ` possibilities: ${autocompleteCandidates.join(" \xB7 ").slice(0, 120)}` })
20337
+ autocompleteCandidates.length > 1 && /* @__PURE__ */ jsx25(Text21, { dimColor: true, children: ` possibilities: ${autocompleteCandidates.join(" \xB7 ").slice(0, 120)}` })
20151
20338
  ] }),
20152
- !open && query && /* @__PURE__ */ jsx24(Box19, { marginTop, children: /* @__PURE__ */ jsx24(Text20, { dimColor: true, children: `/${query}${formatSearchMatchSummary(matches, total)} \xB7 [Esc] clear` }) })
20339
+ !open && query && /* @__PURE__ */ jsx25(Box20, { marginTop, children: /* @__PURE__ */ jsx25(Text21, { dimColor: true, children: `/${query}${formatSearchMatchSummary(matches, total)} \xB7 [Esc] clear` }) })
20153
20340
  ] });
20154
20341
  }
20155
20342
  var init_SearchMatchSummary = __esm({
@@ -20161,10 +20348,10 @@ var init_SearchMatchSummary = __esm({
20161
20348
  });
20162
20349
 
20163
20350
  // packages/experience-design-system-cli-legacy/src/import/tui/hooks/useOverlayPanel.ts
20164
- import { useCallback as useCallback3, useState as useState9 } from "react";
20351
+ import { useCallback as useCallback3, useState as useState10 } from "react";
20165
20352
  function useOverlayPanel(opts) {
20166
20353
  const { toggleKey, onClose } = opts;
20167
- const [isOpen, setIsOpen] = useState9(false);
20354
+ const [isOpen, setIsOpen] = useState10(false);
20168
20355
  const open = useCallback3(() => {
20169
20356
  setIsOpen(true);
20170
20357
  }, []);
@@ -20237,8 +20424,8 @@ var init_lineage_layout = __esm({
20237
20424
 
20238
20425
  // packages/experience-design-system-cli-legacy/src/analyze/select/tui/components/GotoBanner.tsx
20239
20426
  import figures2 from "figures";
20240
- import { Box as Box20, Text as Text21 } from "ink";
20241
- import { jsx as jsx25, jsxs as jsxs20 } from "react/jsx-runtime";
20427
+ import { Box as Box21, Text as Text22 } from "ink";
20428
+ import { jsx as jsx26, jsxs as jsxs21 } from "react/jsx-runtime";
20242
20429
  function windowStart(rowCount, highlightIndex, maxRows) {
20243
20430
  if (rowCount <= maxRows) return 0;
20244
20431
  const maxStart = rowCount - maxRows;
@@ -20248,9 +20435,9 @@ function windowStart(rowCount, highlightIndex, maxRows) {
20248
20435
  return start;
20249
20436
  }
20250
20437
  function defaultRenderRow(row, index, isCursor) {
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 })
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 })
20254
20441
  ] }, index);
20255
20442
  }
20256
20443
  function GotoBanner({
@@ -20269,8 +20456,8 @@ function GotoBanner({
20269
20456
  const visible = rows.slice(start, end);
20270
20457
  const moreAbove = start;
20271
20458
  const moreBelow = rows.length - end;
20272
- return /* @__PURE__ */ jsxs20(
20273
- Box20,
20459
+ return /* @__PURE__ */ jsxs21(
20460
+ Box21,
20274
20461
  {
20275
20462
  flexDirection: "column",
20276
20463
  borderStyle: "single",
@@ -20280,14 +20467,14 @@ function GotoBanner({
20280
20467
  width,
20281
20468
  flexShrink: 0,
20282
20469
  children: [
20283
- /* @__PURE__ */ jsx25(Text21, { bold: true, children: title }),
20284
- moreAbove > 0 && /* @__PURE__ */ jsx25(Text21, { dimColor: true, children: ` \u25B2 ${moreAbove} more` }),
20470
+ /* @__PURE__ */ jsx26(Text22, { bold: true, children: title }),
20471
+ moreAbove > 0 && /* @__PURE__ */ jsx26(Text22, { dimColor: true, children: ` \u25B2 ${moreAbove} more` }),
20285
20472
  visible.map((row, vi) => {
20286
20473
  const i = start + vi;
20287
20474
  return renderRow(row, i, i === highlightIndex);
20288
20475
  }),
20289
- moreBelow > 0 && /* @__PURE__ */ jsx25(Text21, { dimColor: true, children: ` \u25BC ${moreBelow} more` }),
20290
- footerHint !== void 0 && /* @__PURE__ */ jsx25(Text21, { dimColor: true, children: footerHint })
20476
+ moreBelow > 0 && /* @__PURE__ */ jsx26(Text22, { dimColor: true, children: ` \u25BC ${moreBelow} more` }),
20477
+ footerHint !== void 0 && /* @__PURE__ */ jsx26(Text22, { dimColor: true, children: footerHint })
20291
20478
  ]
20292
20479
  }
20293
20480
  );
@@ -20302,9 +20489,9 @@ var init_GotoBanner = __esm({
20302
20489
  });
20303
20490
 
20304
20491
  // packages/experience-design-system-cli-legacy/src/analyze/select/tui/components/HelpOverlay.tsx
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";
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";
20308
20495
  function HelpOverlay(props) {
20309
20496
  const { onClose } = props;
20310
20497
  const { columns: terminalColumns, rows: terminalRows } = useTerminalSize();
@@ -20315,8 +20502,8 @@ function HelpOverlay(props) {
20315
20502
  if (input === "h" || key.escape) onClose();
20316
20503
  }, props.handleInput !== false);
20317
20504
  if (props.sections) {
20318
- return /* @__PURE__ */ jsxs21(
20319
- Box21,
20505
+ return /* @__PURE__ */ jsxs22(
20506
+ Box22,
20320
20507
  {
20321
20508
  flexDirection: "column",
20322
20509
  borderStyle: "round",
@@ -20325,19 +20512,19 @@ function HelpOverlay(props) {
20325
20512
  height: panelHeight,
20326
20513
  overflowY: "hidden",
20327
20514
  children: [
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))
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))
20333
20520
  ] }, section2.title))
20334
20521
  ]
20335
20522
  }
20336
20523
  );
20337
20524
  }
20338
20525
  const mode = props.mode;
20339
- return /* @__PURE__ */ jsxs21(
20340
- Box21,
20526
+ return /* @__PURE__ */ jsxs22(
20527
+ Box22,
20341
20528
  {
20342
20529
  flexDirection: "column",
20343
20530
  borderStyle: "round",
@@ -20346,31 +20533,31 @@ function HelpOverlay(props) {
20346
20533
  height: panelHeight,
20347
20534
  overflowY: "hidden",
20348
20535
  children: [
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" })
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" })
20370
20557
  ] }),
20371
- /* @__PURE__ */ jsx26(Text22, { children: " " }),
20372
- /* @__PURE__ */ jsx26(Text22, { children: " h Close help" }),
20373
- /* @__PURE__ */ jsx26(Text22, { children: " q Quit" })
20558
+ /* @__PURE__ */ jsx27(Text23, { children: " " }),
20559
+ /* @__PURE__ */ jsx27(Text23, { children: " h Close help" }),
20560
+ /* @__PURE__ */ jsx27(Text23, { children: " q Quit" })
20374
20561
  ]
20375
20562
  }
20376
20563
  );
@@ -20385,12 +20572,12 @@ var init_HelpOverlay = __esm({
20385
20572
  });
20386
20573
 
20387
20574
  // packages/experience-design-system-cli-legacy/src/import/tui/components/LegendEntry.tsx
20388
- import { Text as Text23 } from "ink";
20389
- import { jsx as jsx27, jsxs as jsxs22 } from "react/jsx-runtime";
20575
+ import { Text as Text24 } from "ink";
20576
+ import { jsx as jsx28, jsxs as jsxs23 } from "react/jsx-runtime";
20390
20577
  function legendEntry(keyBracket, label, active = false) {
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 })
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 })
20394
20581
  ] }, keyBracket + label);
20395
20582
  }
20396
20583
  var init_LegendEntry = __esm({
@@ -20401,10 +20588,10 @@ var init_LegendEntry = __esm({
20401
20588
  });
20402
20589
 
20403
20590
  // packages/experience-design-system-cli-legacy/src/import/tui/components/CompactControlBar.tsx
20404
- import { Box as Box22 } from "ink";
20405
- import { jsxs as jsxs23 } from "react/jsx-runtime";
20591
+ import { Box as Box23 } from "ink";
20592
+ import { jsxs as jsxs24 } from "react/jsx-runtime";
20406
20593
  function CompactControlBar({ hasGroupRoots, searchActive }) {
20407
- return /* @__PURE__ */ jsxs23(Box22, { borderStyle: "single", borderColor: PALETTE.border, paddingX: 1, marginTop: 1, flexWrap: "wrap", columnGap: 2, children: [
20594
+ return /* @__PURE__ */ jsxs24(Box23, { borderStyle: "single", borderColor: PALETTE.border, paddingX: 1, marginTop: 1, flexWrap: "wrap", columnGap: 2, children: [
20408
20595
  legendEntry("[\u2191/\u2193]", "move"),
20409
20596
  legendEntry("[a/r]", "accept/reject"),
20410
20597
  legendEntry("[f]", "continue/finalize"),
@@ -20423,8 +20610,8 @@ var init_CompactControlBar = __esm({
20423
20610
  });
20424
20611
 
20425
20612
  // packages/experience-design-system-cli-legacy/src/import/tui/components/CounterStrip.tsx
20426
- import { Box as Box23, Text as Text24 } from "ink";
20427
- import { jsx as jsx28, jsxs as jsxs24 } from "react/jsx-runtime";
20613
+ import { Box as Box24, Text as Text25 } from "ink";
20614
+ import { jsx as jsx29, jsxs as jsxs25 } from "react/jsx-runtime";
20428
20615
  function CounterStrip(props) {
20429
20616
  const { counters, totalWidth } = props;
20430
20617
  const condensed = totalWidth < 60;
@@ -20432,25 +20619,25 @@ function CounterStrip(props) {
20432
20619
  const labelRej = condensed ? "Rej" : "Rejected";
20433
20620
  const labelUnd = condensed ? "Und" : "Undecided";
20434
20621
  const sep = condensed ? " | " : " ";
20435
- return /* @__PURE__ */ jsx28(Box23, { children: /* @__PURE__ */ jsxs24(Text24, { children: [
20436
- /* @__PURE__ */ jsxs24(Text24, { dimColor: true, children: [
20622
+ return /* @__PURE__ */ jsx29(Box24, { children: /* @__PURE__ */ jsxs25(Text25, { children: [
20623
+ /* @__PURE__ */ jsxs25(Text25, { dimColor: true, children: [
20437
20624
  labelGrp,
20438
20625
  " "
20439
20626
  ] }),
20440
- /* @__PURE__ */ jsx28(Text24, { bold: true, children: counters.groups }),
20441
- /* @__PURE__ */ jsx28(Text24, { dimColor: true, children: sep }),
20442
- /* @__PURE__ */ jsxs24(Text24, { dimColor: true, children: [
20627
+ /* @__PURE__ */ jsx29(Text25, { bold: true, children: counters.groups }),
20628
+ /* @__PURE__ */ jsx29(Text25, { dimColor: true, children: sep }),
20629
+ /* @__PURE__ */ jsxs25(Text25, { dimColor: true, children: [
20443
20630
  labelRej,
20444
20631
  " "
20445
20632
  ] }),
20446
- /* @__PURE__ */ jsx28(Text24, { bold: true, children: counters.rejected }),
20447
- /* @__PURE__ */ jsx28(Text24, { dimColor: true, children: sep }),
20448
- /* @__PURE__ */ jsxs24(Text24, { dimColor: true, children: [
20633
+ /* @__PURE__ */ jsx29(Text25, { bold: true, children: counters.rejected }),
20634
+ /* @__PURE__ */ jsx29(Text25, { dimColor: true, children: sep }),
20635
+ /* @__PURE__ */ jsxs25(Text25, { dimColor: true, children: [
20449
20636
  labelUnd,
20450
20637
  " "
20451
20638
  ] }),
20452
- /* @__PURE__ */ jsx28(Text24, { bold: true, children: counters.undecided }),
20453
- /* @__PURE__ */ jsx28(Text24, { dimColor: true, children: sep })
20639
+ /* @__PURE__ */ jsx29(Text25, { bold: true, children: counters.undecided }),
20640
+ /* @__PURE__ */ jsx29(Text25, { dimColor: true, children: sep })
20454
20641
  ] }) });
20455
20642
  }
20456
20643
  var init_CounterStrip = __esm({
@@ -20800,10 +20987,10 @@ var init_scope_gate_columns = __esm({
20800
20987
  });
20801
20988
 
20802
20989
  // packages/experience-design-system-cli-legacy/src/import/tui/steps/ScopeGateStep.tsx
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";
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";
20805
20992
  import figures3 from "figures";
20806
- import { Fragment as Fragment9, jsx as jsx29, jsxs as jsxs25 } from "react/jsx-runtime";
20993
+ import { Fragment as Fragment10, jsx as jsx30, jsxs as jsxs26 } from "react/jsx-runtime";
20807
20994
  function toSidebarEntry(c2) {
20808
20995
  const $slots = {};
20809
20996
  if (c2.slots) {
@@ -20820,9 +21007,9 @@ function toSidebarEntry(c2) {
20820
21007
  }
20821
21008
  function ScopeGateStep(props) {
20822
21009
  if (props.components.length === 0) {
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." }) });
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." }) });
20824
21011
  }
20825
- return /* @__PURE__ */ jsx29(ScopeGateStepView, { ...props, components: [...props.components] });
21012
+ return /* @__PURE__ */ jsx30(ScopeGateStepView, { ...props, components: [...props.components] });
20826
21013
  }
20827
21014
  function ScopeGateStepView({
20828
21015
  components,
@@ -20832,18 +21019,18 @@ function ScopeGateStepView({
20832
21019
  const { columns: totalWidth, rows: terminalRows } = useTerminalSize();
20833
21020
  const columnPlan = useMemo2(() => computeColumnWidths(totalWidth), [totalWidth]);
20834
21021
  const sidebarWidth = columnPlan.main;
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);
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);
20840
21027
  const cursor = nav.cursor;
20841
21028
  const scrollOffset = nav.scrollOffset;
20842
- const [cyclesPanelOpen, setCyclesPanelOpen] = useState10(false);
20843
- const [cyclesCursor, setCyclesCursor] = useState10(0);
21029
+ const [cyclesPanelOpen, setCyclesPanelOpen] = useState11(false);
21030
+ const [cyclesCursor, setCyclesCursor] = useState11(0);
20844
21031
  const aiRationalePanel = useOverlayPanel({ toggleKey: "x" });
20845
- const [aiCursor, setAiCursor] = useState10(0);
20846
- const [pendingRejectCascade, setPendingRejectCascade] = useState10(null);
21032
+ const [aiCursor, setAiCursor] = useState11(0);
21033
+ const [pendingRejectCascade, setPendingRejectCascade] = useState11(null);
20847
21034
  const {
20848
21035
  searchOpen,
20849
21036
  setSearchOpen,
@@ -20902,12 +21089,12 @@ function ScopeGateStepView({
20902
21089
  );
20903
21090
  const hasCycles = slotCycles.length > 0;
20904
21091
  const closures = useMemo2(() => computeAllClosures(graph), [graph]);
20905
- const [expandedGroups, setExpandedGroups] = useState10(() => {
21092
+ const [expandedGroups, setExpandedGroups] = useState11(() => {
20906
21093
  const seed = new Set(closures.keys());
20907
21094
  for (const p of cycleParticipants) seed.add(p);
20908
21095
  return seed;
20909
21096
  });
20910
- const seededGroupsRef = useRef3(closures.size > 0 || cycleParticipants.size > 0);
21097
+ const seededGroupsRef = useRef4(closures.size > 0 || cycleParticipants.size > 0);
20911
21098
  useEffect6(() => {
20912
21099
  if (seededGroupsRef.current) return;
20913
21100
  if (closures.size === 0 && cycleParticipants.size === 0) return;
@@ -21405,17 +21592,17 @@ function ScopeGateStepView({
21405
21592
  );
21406
21593
  const safeAddedComponentsCursor = Math.min(addedComponentsCursor, Math.max(0, addedComponents.length - 1));
21407
21594
  if (showHelp) {
21408
- return /* @__PURE__ */ jsx29(HelpOverlay, { sections: HELP_SECTIONS, handleInput: false, onClose: () => setShowHelp(false) });
21595
+ return /* @__PURE__ */ jsx30(HelpOverlay, { sections: HELP_SECTIONS, handleInput: false, onClose: () => setShowHelp(false) });
21409
21596
  }
21410
- return /* @__PURE__ */ jsxs25(Box24, { flexDirection: "column", paddingX: 2, children: [
21411
- /* @__PURE__ */ jsx29(CounterStrip, { counters, totalWidth }),
21412
- hasAnyAi && /* @__PURE__ */ jsxs25(Text25, { dimColor: true, children: [
21597
+ return /* @__PURE__ */ jsxs26(Box25, { flexDirection: "column", paddingX: 2, children: [
21598
+ /* @__PURE__ */ jsx30(CounterStrip, { counters, totalWidth }),
21599
+ hasAnyAi && /* @__PURE__ */ jsxs26(Text26, { dimColor: true, children: [
21413
21600
  `${aiExcludedCount} component${aiExcludedCount === 1 ? "" : "s"} flagged by AI`,
21414
- aiRows.length > 0 && /* @__PURE__ */ jsx29(Text25, { color: PALETTE.info, children: " \u2014 press [x] to see why" })
21601
+ aiRows.length > 0 && /* @__PURE__ */ jsx30(Text26, { color: PALETTE.info, children: " \u2014 press [x] to see why" })
21415
21602
  ] }),
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(
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(
21419
21606
  GotoBanner,
21420
21607
  {
21421
21608
  title: `Review flags (${aiExcludedCount})`,
@@ -21425,7 +21612,7 @@ function ScopeGateStepView({
21425
21612
  width: sidebarWidth,
21426
21613
  footerHint: "[\u2191/\u2193] move \xB7 [Enter] jump \xB7 [x/Esc] close"
21427
21614
  }
21428
- ) : /* @__PURE__ */ jsx29(
21615
+ ) : /* @__PURE__ */ jsx30(
21429
21616
  GroupedSidebar,
21430
21617
  {
21431
21618
  items: groupedItems,
@@ -21452,9 +21639,9 @@ function ScopeGateStepView({
21452
21639
  graph
21453
21640
  }
21454
21641
  ),
21455
- columnPlan.layout === "two-column" && /* @__PURE__ */ jsxs25(Fragment9, { children: [
21456
- /* @__PURE__ */ jsx29(Box24, { width: 2, flexShrink: 0 }),
21457
- /* @__PURE__ */ jsx29(
21642
+ columnPlan.layout === "two-column" && /* @__PURE__ */ jsxs26(Fragment10, { children: [
21643
+ /* @__PURE__ */ jsx30(Box25, { width: 2, flexShrink: 0 }),
21644
+ /* @__PURE__ */ jsx30(
21458
21645
  AddedComponentsColumn,
21459
21646
  {
21460
21647
  width: columnPlan.added,
@@ -21469,9 +21656,9 @@ function ScopeGateStepView({
21469
21656
  )
21470
21657
  ] })
21471
21658
  ] }),
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: " " }),
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: " " }),
21475
21662
  slotCycles.map((cycle, i) => {
21476
21663
  const isCursor = i === cyclesCursor;
21477
21664
  const parts = [];
@@ -21481,20 +21668,20 @@ function ScopeGateStepView({
21481
21668
  }
21482
21669
  parts.push(cycle.path[cycle.path.length - 1]);
21483
21670
  const label = `Cycle ${i + 1}: ${parts.join(" \u2192 ")}`;
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 })
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 })
21487
21674
  ] }, i);
21488
21675
  }),
21489
- /* @__PURE__ */ jsx29(Text25, { dimColor: true, children: "[\u2191/\u2193] move \xB7 [Enter] jump \xB7 [c/Esc] close" })
21676
+ /* @__PURE__ */ jsx30(Text26, { dimColor: true, children: "[\u2191/\u2193] move \xB7 [Enter] jump \xB7 [c/Esc] close" })
21490
21677
  ] }),
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" })
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" })
21496
21683
  ] }),
21497
- /* @__PURE__ */ jsx29(
21684
+ /* @__PURE__ */ jsx30(
21498
21685
  SearchMatchSummary,
21499
21686
  {
21500
21687
  open: searchOpen,
@@ -21505,7 +21692,7 @@ function ScopeGateStepView({
21505
21692
  marginTop: 1
21506
21693
  }
21507
21694
  ),
21508
- /* @__PURE__ */ jsx29(CompactControlBar, { hasGroupRoots, searchActive: searchOpen || searchQuery.length > 0 })
21695
+ /* @__PURE__ */ jsx30(CompactControlBar, { hasGroupRoots, searchActive: searchOpen || searchQuery.length > 0 })
21509
21696
  ] });
21510
21697
  }
21511
21698
  function sideColumnLabelStyle(input) {
@@ -21559,9 +21746,9 @@ function AddedColumn(props) {
21559
21746
  const reserveAiBadge = entries.some((e) => aiFlaggedByKey?.get(e.name) === true);
21560
21747
  const firstNonCycleIdx = entries.findIndex((e) => !e.isCycle);
21561
21748
  const window = computeColumnWindow(entries.length, cursor, Math.max(1, visibleCount));
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) => {
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) => {
21565
21752
  const i = window.start + vi;
21566
21753
  const isSelected = i === cursor;
21567
21754
  const isCursor = focused && isSelected;
@@ -21572,13 +21759,13 @@ function AddedColumn(props) {
21572
21759
  isSelected,
21573
21760
  focused
21574
21761
  });
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,
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,
21582
21769
  {
21583
21770
  color: isCursor ? PALETTE.info : PALETTE.warning,
21584
21771
  bold: true,
@@ -21587,8 +21774,8 @@ function AddedColumn(props) {
21587
21774
  children: " \u26A0"
21588
21775
  }
21589
21776
  ),
21590
- /* @__PURE__ */ jsx29(
21591
- Text25,
21777
+ /* @__PURE__ */ jsx30(
21778
+ Text26,
21592
21779
  {
21593
21780
  color: style.nameColor,
21594
21781
  bold: style.nameBold,
@@ -21602,11 +21789,11 @@ function AddedColumn(props) {
21602
21789
  ] })
21603
21790
  ] }, entry.name);
21604
21791
  }),
21605
- /* @__PURE__ */ jsx29(WindowIndicator, { direction: "down", count: window.below })
21792
+ /* @__PURE__ */ jsx30(WindowIndicator, { direction: "down", count: window.below })
21606
21793
  ] });
21607
21794
  }
21608
21795
  function AddedComponentsColumn(props) {
21609
- return /* @__PURE__ */ jsx29(AddedColumn, { ...props });
21796
+ return /* @__PURE__ */ jsx30(AddedColumn, { ...props });
21610
21797
  }
21611
21798
  var HELP_SECTIONS;
21612
21799
  var init_ScopeGateStep = __esm({
@@ -22030,15 +22217,15 @@ var init_scroll_offset = __esm({
22030
22217
  });
22031
22218
 
22032
22219
  // packages/experience-design-system-cli-legacy/src/analyze/select/tui/components/FieldEditor.tsx
22033
- import React10, { useEffect as useEffect7, useLayoutEffect as useLayoutEffect2, useState as useState11 } from "react";
22220
+ import React11, { useEffect as useEffect7, useLayoutEffect as useLayoutEffect2, useState as useState12 } from "react";
22034
22221
  import figures4 from "figures";
22035
- import { Box as Box25, measureElement, Text as Text26 } from "ink";
22222
+ import { Box as Box26, measureElement, Text as Text27 } from "ink";
22036
22223
  import {
22037
22224
  CDF_PROPERTY_TYPES,
22038
22225
  CDF_PROPERTY_CATEGORIES,
22039
22226
  DESIGN_TOKEN_TYPES as DESIGN_TOKEN_TYPES2
22040
22227
  } from "@contentful/experience-design-system-types";
22041
- import { Fragment as Fragment10, jsx as jsx30, jsxs as jsxs26 } from "react/jsx-runtime";
22228
+ import { Fragment as Fragment11, jsx as jsx31, jsxs as jsxs27 } from "react/jsx-runtime";
22042
22229
  function createCommonRowProps(selected, focusLevel, editingField, textCursor, valueCursor, cursorVisible, editingValue, valueText, width) {
22043
22230
  return {
22044
22231
  selected,
@@ -22176,14 +22363,14 @@ function serializeState(state, originalJson) {
22176
22363
  return JSON.stringify(entry, null, 2);
22177
22364
  }
22178
22365
  function Picker({ value, active }) {
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" })
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" })
22183
22370
  ] });
22184
22371
  }
22185
22372
  function Toggle({ value, active }) {
22186
- return /* @__PURE__ */ jsx30(Box25, { children: /* @__PURE__ */ jsx30(Text26, { color: active ? PALETTE.warning : value ? PALETTE.success : PALETTE.border, children: value ? "[\u2713]" : "[ ]" }) });
22373
+ return /* @__PURE__ */ jsx31(Box26, { children: /* @__PURE__ */ jsx31(Text27, { color: active ? PALETTE.warning : value ? PALETTE.success : PALETTE.border, children: value ? "[\u2713]" : "[ ]" }) });
22187
22374
  }
22188
22375
  function InlinePropField({
22189
22376
  label,
@@ -22192,8 +22379,8 @@ function InlinePropField({
22192
22379
  flexible = false,
22193
22380
  width
22194
22381
  }) {
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: [
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: [
22197
22384
  focused ? "\u203A " : " ",
22198
22385
  label
22199
22386
  ] }),
@@ -22206,19 +22393,19 @@ function RequiredField({
22206
22393
  editingField,
22207
22394
  activeField
22208
22395
  }) {
22209
- return /* @__PURE__ */ jsx30(InlinePropField, { label: "req:", focused, children: /* @__PURE__ */ jsx30(Toggle, { value, active: editingField && activeField === "required" }) });
22396
+ return /* @__PURE__ */ jsx31(InlinePropField, { label: "req:", focused, children: /* @__PURE__ */ jsx31(Toggle, { value, active: editingField && activeField === "required" }) });
22210
22397
  }
22211
22398
  function DefaultValueRow({
22212
22399
  display,
22213
22400
  active,
22214
22401
  focused
22215
22402
  }) {
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: [
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: [
22218
22405
  focused ? "\u203A " : " ",
22219
22406
  "default:"
22220
22407
  ] }),
22221
- active ? /* @__PURE__ */ jsx30(Picker, { value: display, active: true }) : /* @__PURE__ */ jsx30(Text26, { color: focused ? PALETTE.inverse : PALETTE.inverse, wrap: "wrap", children: display })
22408
+ active ? /* @__PURE__ */ jsx31(Picker, { value: display, active: true }) : /* @__PURE__ */ jsx31(Text27, { color: focused ? PALETTE.inverse : PALETTE.inverse, wrap: "wrap", children: display })
22222
22409
  ] });
22223
22410
  }
22224
22411
  function RowLabel({
@@ -22226,8 +22413,8 @@ function RowLabel({
22226
22413
  selected,
22227
22414
  trailing = true
22228
22415
  }) {
22229
- return /* @__PURE__ */ jsxs26(
22230
- Text26,
22416
+ return /* @__PURE__ */ jsxs27(
22417
+ Text27,
22231
22418
  {
22232
22419
  color: selected ? PALETTE.inverse : PALETTE.info,
22233
22420
  bold: selected,
@@ -22246,10 +22433,10 @@ function ValueInputRow({
22246
22433
  valueText,
22247
22434
  cursorVisible
22248
22435
  }) {
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: " " })
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: " " })
22253
22440
  ] });
22254
22441
  }
22255
22442
  function EditableListItem({
@@ -22262,9 +22449,9 @@ function EditableListItem({
22262
22449
  }) {
22263
22450
  const isBeingEdited = editingValue?.mode === "edit" && editingValue.index === index;
22264
22451
  if (isBeingEdited) {
22265
- return /* @__PURE__ */ jsx30(ValueInputRow, { mode: "edit", valueText, cursorVisible });
22452
+ return /* @__PURE__ */ jsx31(ValueInputRow, { mode: "edit", valueText, cursorVisible });
22266
22453
  }
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}` }) });
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}` }) });
22268
22455
  }
22269
22456
  function EditableValueList({
22270
22457
  values,
@@ -22277,9 +22464,9 @@ function EditableValueList({
22277
22464
  emptyPaddingLeft,
22278
22465
  showAddInput
22279
22466
  }) {
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(
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(
22283
22470
  EditableListItem,
22284
22471
  {
22285
22472
  value,
@@ -22291,7 +22478,7 @@ function EditableValueList({
22291
22478
  },
22292
22479
  index
22293
22480
  )),
22294
- showAddInput && editingValue?.mode === "add" && /* @__PURE__ */ jsx30(ValueInputRow, { mode: "add", valueText, cursorVisible })
22481
+ showAddInput && editingValue?.mode === "add" && /* @__PURE__ */ jsx31(ValueInputRow, { mode: "add", valueText, cursorVisible })
22295
22482
  ] });
22296
22483
  }
22297
22484
  function DefaultSubRow({
@@ -22303,51 +22490,51 @@ function DefaultSubRow({
22303
22490
  }) {
22304
22491
  const cursor = cursorVisible ? "\u2588" : " ";
22305
22492
  if (prop.type === "richtext" || prop.type === "media" || prop.type === "link") {
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: [
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: [
22308
22495
  focused ? "\u203A " : " ",
22309
22496
  "default:"
22310
22497
  ] }),
22311
- /* @__PURE__ */ jsx30(Text26, { dimColor: !focused, children: "(not applicable)" })
22498
+ /* @__PURE__ */ jsx31(Text27, { dimColor: !focused, children: "(not applicable)" })
22312
22499
  ] });
22313
22500
  }
22314
22501
  if (prop.type === "boolean") {
22315
22502
  const display = prop.default === true ? "true" : prop.default === false ? "false" : "(unset)";
22316
- return /* @__PURE__ */ jsx30(DefaultValueRow, { display, active, focused });
22503
+ return /* @__PURE__ */ jsx31(DefaultValueRow, { display, active, focused });
22317
22504
  }
22318
22505
  if (prop.type === "enum") {
22319
22506
  if (prop.values.length === 0) {
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: [
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: [
22322
22509
  focused ? "\u203A " : " ",
22323
22510
  "default:"
22324
22511
  ] }),
22325
- /* @__PURE__ */ jsx30(Text26, { dimColor: !focused, children: "(no values defined)" })
22512
+ /* @__PURE__ */ jsx31(Text27, { dimColor: !focused, children: "(no values defined)" })
22326
22513
  ] });
22327
22514
  }
22328
22515
  const display = typeof prop.default === "string" && prop.default !== "" ? prop.default : "(unset)";
22329
- return /* @__PURE__ */ jsx30(DefaultValueRow, { display, active, focused });
22516
+ return /* @__PURE__ */ jsx31(DefaultValueRow, { display, active, focused });
22330
22517
  }
22331
22518
  const value = typeof prop.default === "string" ? prop.default : "";
22332
22519
  if (active) {
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: [
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: [
22335
22522
  focused ? "\u203A " : " ",
22336
22523
  "default:"
22337
22524
  ] }),
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) })
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) })
22342
22529
  ] })
22343
22530
  ] });
22344
22531
  }
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: [
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: [
22347
22534
  focused ? "\u203A " : " ",
22348
22535
  "default:"
22349
22536
  ] }),
22350
- /* @__PURE__ */ jsx30(Text26, { color: focused ? PALETTE.inverse : value ? PALETTE.inverse : void 0, dimColor: !value && !focused, children: value || "(none)" })
22537
+ /* @__PURE__ */ jsx31(Text27, { color: focused ? PALETTE.inverse : value ? PALETTE.inverse : void 0, dimColor: !value && !focused, children: value || "(none)" })
22351
22538
  ] });
22352
22539
  }
22353
22540
  function DescriptionField({
@@ -22362,20 +22549,20 @@ function DescriptionField({
22362
22549
  paddingLeft = 2
22363
22550
  }) {
22364
22551
  if (compact) {
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: [
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: [
22367
22554
  focused ? "\u203A " : " ",
22368
22555
  label
22369
22556
  ] }),
22370
- /* @__PURE__ */ jsx30(Text26, { wrap: "truncate-end", dimColor: !value, children: value || "\u2014" })
22557
+ /* @__PURE__ */ jsx31(Text27, { wrap: "truncate-end", dimColor: !value, children: value || "\u2014" })
22371
22558
  ] });
22372
22559
  }
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: [
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: [
22375
22562
  focused ? "\u203A " : " ",
22376
22563
  label
22377
22564
  ] }),
22378
- editing ? /* @__PURE__ */ jsx30(EditableDescription, { cursorVisible, value, textCursor }) : /* @__PURE__ */ jsx30(Text26, { wrap: "wrap", children: value || "\u2014" })
22565
+ editing ? /* @__PURE__ */ jsx31(EditableDescription, { cursorVisible, value, textCursor }) : /* @__PURE__ */ jsx31(Text27, { wrap: "wrap", children: value || "\u2014" })
22379
22566
  ] });
22380
22567
  }
22381
22568
  function EditableDescription({
@@ -22383,9 +22570,9 @@ function EditableDescription({
22383
22570
  value,
22384
22571
  textCursor
22385
22572
  }) {
22386
- return /* @__PURE__ */ jsxs26(Text26, { wrap: "wrap", children: [
22573
+ return /* @__PURE__ */ jsxs27(Text27, { wrap: "wrap", children: [
22387
22574
  value.slice(0, textCursor),
22388
- /* @__PURE__ */ jsx30(Text26, { inverse: cursorVisible, children: value[textCursor] ?? " " }),
22575
+ /* @__PURE__ */ jsx31(Text27, { inverse: cursorVisible, children: value[textCursor] ?? " " }),
22389
22576
  value.slice(textCursor + 1)
22390
22577
  ] });
22391
22578
  }
@@ -22406,9 +22593,9 @@ function PropRow({
22406
22593
  }) {
22407
22594
  const descFocused = activeField === "description";
22408
22595
  const descActive = editingField && descFocused;
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(
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(
22412
22599
  DescriptionField,
22413
22600
  {
22414
22601
  value: prop.description,
@@ -22421,8 +22608,8 @@ function PropRow({
22421
22608
  paddingLeft: 0
22422
22609
  }
22423
22610
  ),
22424
- /* @__PURE__ */ jsxs26(Box25, { flexDirection: "column", width, flexShrink: 0, children: [
22425
- /* @__PURE__ */ jsx30(
22611
+ /* @__PURE__ */ jsxs27(Box26, { flexDirection: "column", width, flexShrink: 0, children: [
22612
+ /* @__PURE__ */ jsx31(
22426
22613
  RequiredField,
22427
22614
  {
22428
22615
  value: prop.required,
@@ -22431,12 +22618,12 @@ function PropRow({
22431
22618
  activeField
22432
22619
  }
22433
22620
  ),
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 }) })
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 }) })
22435
22622
  ] }),
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,
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,
22440
22627
  {
22441
22628
  color: activeField === "values" ? PALETTE.warning : void 0,
22442
22629
  bold: activeField === "values",
@@ -22447,13 +22634,13 @@ function PropRow({
22447
22634
  ]
22448
22635
  }
22449
22636
  ),
22450
- /* @__PURE__ */ jsxs26(Text26, { color: activeField === "values" ? PALETTE.inverse : selected ? PALETTE.inverse : void 0, wrap: "wrap", children: [
22637
+ /* @__PURE__ */ jsxs27(Text27, { color: activeField === "values" ? PALETTE.inverse : selected ? PALETTE.inverse : void 0, wrap: "wrap", children: [
22451
22638
  "[",
22452
22639
  prop.values.join(", "),
22453
22640
  "]"
22454
22641
  ] })
22455
22642
  ] }),
22456
- /* @__PURE__ */ jsx30(
22643
+ /* @__PURE__ */ jsx31(
22457
22644
  DefaultSubRow,
22458
22645
  {
22459
22646
  prop,
@@ -22463,9 +22650,9 @@ function PropRow({
22463
22650
  cursorVisible
22464
22651
  }
22465
22652
  ),
22466
- prop.type === "token" && prop.category === "design" && /* @__PURE__ */ jsxs26(Box25, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: [
22467
- /* @__PURE__ */ jsxs26(
22468
- Text26,
22653
+ prop.type === "token" && prop.category === "design" && /* @__PURE__ */ jsxs27(Box26, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: [
22654
+ /* @__PURE__ */ jsxs27(
22655
+ Text27,
22469
22656
  {
22470
22657
  color: activeField === "allowed" ? PALETTE.warning : void 0,
22471
22658
  bold: activeField === "allowed",
@@ -22476,8 +22663,8 @@ function PropRow({
22476
22663
  ]
22477
22664
  }
22478
22665
  ),
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,
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,
22481
22668
  {
22482
22669
  color: activeField === "allowed" ? PALETTE.inverse : void 0,
22483
22670
  dimColor: prop.allowed.length === 0 && activeField !== "allowed",
@@ -22486,17 +22673,17 @@ function PropRow({
22486
22673
  }
22487
22674
  )
22488
22675
  ] }),
22489
- selected && showRationale && rationale && rationale.trim().length > 0 && /* @__PURE__ */ jsx30(Box25, { paddingLeft: 2, children: /* @__PURE__ */ jsx30(Text26, { dimColor: true, children: (() => {
22676
+ selected && showRationale && rationale && rationale.trim().length > 0 && /* @__PURE__ */ jsx31(Box26, { paddingLeft: 2, children: /* @__PURE__ */ jsx31(Text27, { dimColor: true, children: (() => {
22490
22677
  const max = Math.max(8, width - 8);
22491
22678
  const text = `~ ${rationale}`;
22492
22679
  return text.length > max ? text.slice(0, max - 1) + "\u2026" : text;
22493
22680
  })() }) }, rowKey ? `rationale-${rowKey}` : void 0),
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" })
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" })
22498
22685
  ] }),
22499
- /* @__PURE__ */ jsx30(
22686
+ /* @__PURE__ */ jsx31(
22500
22687
  EditableValueList,
22501
22688
  {
22502
22689
  values: prop.values,
@@ -22526,9 +22713,9 @@ function SlotRow({
22526
22713
  pickerCandidates,
22527
22714
  pickerCursor
22528
22715
  }) {
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(
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(
22532
22719
  DescriptionField,
22533
22720
  {
22534
22721
  value: slot.description,
@@ -22541,7 +22728,7 @@ function SlotRow({
22541
22728
  paddingLeft: 0
22542
22729
  }
22543
22730
  ),
22544
- /* @__PURE__ */ jsx30(Box25, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: /* @__PURE__ */ jsx30(
22731
+ /* @__PURE__ */ jsx31(Box26, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: /* @__PURE__ */ jsx31(
22545
22732
  RequiredField,
22546
22733
  {
22547
22734
  value: slot.required,
@@ -22550,9 +22737,9 @@ function SlotRow({
22550
22737
  activeField
22551
22738
  }
22552
22739
  ) }),
22553
- !(selected && editingField && activeField === "allowedComponents") && /* @__PURE__ */ jsxs26(Box25, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: [
22554
- /* @__PURE__ */ jsxs26(
22555
- Text26,
22740
+ !(selected && editingField && activeField === "allowedComponents") && /* @__PURE__ */ jsxs27(Box26, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: [
22741
+ /* @__PURE__ */ jsxs27(
22742
+ Text27,
22556
22743
  {
22557
22744
  color: activeField === "allowedComponents" ? PALETTE.warning : void 0,
22558
22745
  bold: activeField === "allowedComponents",
@@ -22563,12 +22750,12 @@ function SlotRow({
22563
22750
  ]
22564
22751
  }
22565
22752
  ),
22566
- slot.allowedComponents.length === 0 ? /* @__PURE__ */ jsx30(Text26, { dimColor: true, children: "(any)" }) : /* @__PURE__ */ jsx30(Text26, { wrap: "wrap", children: slot.allowedComponents.join(", ") })
22753
+ slot.allowedComponents.length === 0 ? /* @__PURE__ */ jsx31(Text27, { dimColor: true, children: "(any)" }) : /* @__PURE__ */ jsx31(Text27, { wrap: "wrap", children: slot.allowedComponents.join(", ") })
22567
22754
  ] }),
22568
- selected && editingField && activeField === "allowedComponents" && /* @__PURE__ */ jsxs26(Box25, { flexDirection: "column", children: [
22569
- /* @__PURE__ */ jsxs26(Box25, { children: [
22570
- /* @__PURE__ */ jsxs26(
22571
- Text26,
22755
+ selected && editingField && activeField === "allowedComponents" && /* @__PURE__ */ jsxs27(Box26, { flexDirection: "column", children: [
22756
+ /* @__PURE__ */ jsxs27(Box26, { children: [
22757
+ /* @__PURE__ */ jsxs27(
22758
+ Text27,
22572
22759
  {
22573
22760
  color: activeField === "allowedComponents" ? PALETTE.warning : void 0,
22574
22761
  bold: activeField === "allowedComponents",
@@ -22579,9 +22766,9 @@ function SlotRow({
22579
22766
  ]
22580
22767
  }
22581
22768
  ),
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" })
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" })
22583
22770
  ] }),
22584
- /* @__PURE__ */ jsx30(
22771
+ /* @__PURE__ */ jsx31(
22585
22772
  EditableValueList,
22586
22773
  {
22587
22774
  values: slot.allowedComponents,
@@ -22595,21 +22782,21 @@ function SlotRow({
22595
22782
  showAddInput: editingField && activeField === "allowedComponents"
22596
22783
  }
22597
22784
  ),
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)" }) : (() => {
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)" }) : (() => {
22599
22786
  const filtered = valueText.length === 0 ? pickerCandidates : pickerCandidates.filter((n) => n.toLowerCase().includes(valueText.toLowerCase()));
22600
22787
  if (filtered.length === 0) {
22601
- return /* @__PURE__ */ jsx30(Text26, { dimColor: true, children: "(no candidates match \u2014 Enter to add as free text)" });
22788
+ return /* @__PURE__ */ jsx31(Text27, { dimColor: true, children: "(no candidates match \u2014 Enter to add as free text)" });
22602
22789
  }
22603
22790
  const cursor = pickerCursor % filtered.length;
22604
22791
  const MAX_VISIBLE = 5;
22605
22792
  const start = Math.max(0, Math.min(filtered.length - MAX_VISIBLE, cursor - 2));
22606
22793
  const slice = filtered.slice(start, start + MAX_VISIBLE);
22607
- return /* @__PURE__ */ jsxs26(Box25, { flexDirection: "column", children: [
22608
- /* @__PURE__ */ jsx30(Text26, { dimColor: true, children: " candidates (\u2191\u2193 cycle, Enter to add):" }),
22794
+ return /* @__PURE__ */ jsxs27(Box26, { flexDirection: "column", children: [
22795
+ /* @__PURE__ */ jsx31(Text27, { dimColor: true, children: " candidates (\u2191\u2193 cycle, Enter to add):" }),
22609
22796
  slice.map((name, i) => {
22610
22797
  const absIdx = start + i;
22611
22798
  const isCursor = absIdx === cursor;
22612
- return /* @__PURE__ */ jsx30(Text26, { color: isCursor ? PALETTE.info : void 0, dimColor: !isCursor, children: isCursor ? ` ${figures4.pointer} ${name}` : ` ${name}` }, name);
22799
+ return /* @__PURE__ */ jsx31(Text27, { color: isCursor ? PALETTE.info : void 0, dimColor: !isCursor, children: isCursor ? ` ${figures4.pointer} ${name}` : ` ${name}` }, name);
22613
22800
  })
22614
22801
  ] });
22615
22802
  })() })
@@ -22731,12 +22918,12 @@ function FieldEditor({
22731
22918
  headerHeight = 2
22732
22919
  }) {
22733
22920
  const { state: initialState, error: parseError } = parseToState(value);
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());
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());
22740
22927
  const initialFocus = (() => {
22741
22928
  if (initialFocusTarget?.kind === "description") {
22742
22929
  return {
@@ -22803,43 +22990,43 @@ function FieldEditor({
22803
22990
  textCursor: 0
22804
22991
  };
22805
22992
  })();
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);
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);
22824
23011
  const props = editorState.props;
22825
23012
  const slots = editorState.slots;
22826
- const contentPropIndexes = React10.useMemo(
23013
+ const contentPropIndexes = React11.useMemo(
22827
23014
  () => props.flatMap((prop, index) => prop.category === "content" ? [index] : []),
22828
23015
  [props]
22829
23016
  );
22830
- const designPropIndexes = React10.useMemo(
23017
+ const designPropIndexes = React11.useMemo(
22831
23018
  () => props.flatMap((prop, index) => prop.category === "design" ? [index] : []),
22832
23019
  [props]
22833
23020
  );
22834
- const hiddenPropIndexes = React10.useMemo(
23021
+ const hiddenPropIndexes = React11.useMemo(
22835
23022
  () => showHiddenProps ? props.flatMap((prop, index) => prop.category === "state" || prop.category === "unattached" ? [index] : []) : [],
22836
23023
  [props, showHiddenProps]
22837
23024
  );
22838
- const visiblePropIndexes = React10.useMemo(
23025
+ const visiblePropIndexes = React11.useMemo(
22839
23026
  () => [...contentPropIndexes, ...designPropIndexes, ...hiddenPropIndexes],
22840
23027
  [contentPropIndexes, designPropIndexes, hiddenPropIndexes]
22841
23028
  );
22842
- const propGroups = React10.useMemo(
23029
+ const propGroups = React11.useMemo(
22843
23030
  () => [
22844
23031
  {
22845
23032
  kind: "content",
@@ -22859,7 +23046,7 @@ function FieldEditor({
22859
23046
  ],
22860
23047
  [contentPropIndexes, designPropIndexes, hiddenPropIndexes]
22861
23048
  );
22862
- const selectableRows = React10.useMemo(
23049
+ const selectableRows = React11.useMemo(
22863
23050
  () => [
22864
23051
  ...contentPropIndexes.map((idx) => ({ kind: "prop", idx })),
22865
23052
  ...designPropIndexes.map((idx) => ({ kind: "prop", idx })),
@@ -22869,7 +23056,7 @@ function FieldEditor({
22869
23056
  [contentPropIndexes, designPropIndexes, hiddenPropIndexes, slots]
22870
23057
  );
22871
23058
  const visiblePropPosition = visiblePropIndexes.indexOf(propIdx);
22872
- const selectedSelectableIndex = React10.useMemo(
23059
+ const selectedSelectableIndex = React11.useMemo(
22873
23060
  () => selectableRows.findIndex(
22874
23061
  (row) => inSlots ? row.kind === "slot" && row.idx === slotIdx : row.kind === "prop" && row.idx === propIdx
22875
23062
  ),
@@ -22888,12 +23075,12 @@ function FieldEditor({
22888
23075
  }
22889
23076
  };
22890
23077
  const textEntryActive = focusLevel === "field" && editingField && activeField === "description" || focusLevel === "field" && editingField && activeField === "default" && (editorState.props[propIdx]?.type === "string" || editorState.props[propIdx]?.type === "token") || editingValue != null;
22891
- React10.useEffect(() => {
23078
+ React11.useEffect(() => {
22892
23079
  onTextEntryActiveChange?.(textEntryActive);
22893
23080
  }, [textEntryActive, onTextEntryActiveChange]);
22894
23081
  const currentProp = props[propIdx] ?? null;
22895
23082
  const currentSlot = slots[slotIdx] ?? null;
22896
- React10.useEffect(() => {
23083
+ React11.useEffect(() => {
22897
23084
  if (showHiddenProps || inSlots || inComponentDesc || visiblePropPosition >= 0) return;
22898
23085
  if (visiblePropIndexes.length > 0) {
22899
23086
  setPropIdx(visiblePropIndexes[0]);
@@ -22912,22 +23099,22 @@ function FieldEditor({
22912
23099
  setEditorState(next);
22913
23100
  onChange(serializeState(next, value));
22914
23101
  };
22915
- const canonicalize = React10.useCallback((json) => {
23102
+ const canonicalize = React11.useCallback((json) => {
22916
23103
  try {
22917
23104
  return JSON.stringify(JSON.parse(json));
22918
23105
  } catch {
22919
23106
  return `__unparseable__:${json}`;
22920
23107
  }
22921
23108
  }, []);
22922
- const initialStateRef = React10.useRef(initialState);
23109
+ const initialStateRef = React11.useRef(initialState);
22923
23110
  const baselineCanonical = canonicalize(serializeState(initialStateRef.current, value));
22924
23111
  const currentCanonical = canonicalize(serializeState(editorState, value));
22925
23112
  const isDirty = currentCanonical !== baselineCanonical;
22926
- React10.useEffect(() => {
23113
+ React11.useEffect(() => {
22927
23114
  onDirtyChange?.(isDirty);
22928
23115
  }, [isDirty, onDirtyChange]);
22929
- const lastDiscardTriggerRef = React10.useRef(discardTrigger);
22930
- React10.useEffect(() => {
23116
+ const lastDiscardTriggerRef = React11.useRef(discardTrigger);
23117
+ React11.useEffect(() => {
22931
23118
  if (discardTrigger === void 0) return;
22932
23119
  if (discardTrigger === lastDiscardTriggerRef.current) return;
22933
23120
  lastDiscardTriggerRef.current = discardTrigger;
@@ -23437,18 +23624,18 @@ function FieldEditor({
23437
23624
  });
23438
23625
  const innerWidth = Math.max(1, width - 2);
23439
23626
  if (parseErr) {
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." })
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." })
23444
23631
  ] });
23445
23632
  }
23446
23633
  if (props.length === 0 && slots.length === 0) {
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" })
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" })
23452
23639
  ] });
23453
23640
  }
23454
23641
  const hasEmptyProperties = props.length === 0 && slots.length === 0;
@@ -23577,12 +23764,12 @@ function FieldEditor({
23577
23764
  const renderRow = (row, index) => {
23578
23765
  const key = rowKey(row, index);
23579
23766
  if (row.kind === "header") {
23580
- return /* @__PURE__ */ jsx30(Box25, { flexDirection: "column", paddingTop: 1, children: /* @__PURE__ */ jsx30(Text26, { bold: true, color: PALETTE.success, children: row.label }) }, key);
23767
+ return /* @__PURE__ */ jsx31(Box26, { flexDirection: "column", paddingTop: 1, children: /* @__PURE__ */ jsx31(Text27, { bold: true, color: PALETTE.success, children: row.label }) }, key);
23581
23768
  }
23582
23769
  if (row.kind === "component-description") {
23583
23770
  const isSelected2 = inComponentDesc && active;
23584
23771
  const isEditing = isSelected2 && focusLevel === "field" && editingField && activeField === "description";
23585
- return /* @__PURE__ */ jsx30(
23772
+ return /* @__PURE__ */ jsx31(
23586
23773
  DescriptionField,
23587
23774
  {
23588
23775
  value: editorState.componentDescription,
@@ -23613,7 +23800,7 @@ function FieldEditor({
23613
23800
  valueText,
23614
23801
  innerWidth
23615
23802
  );
23616
- return /* @__PURE__ */ jsx30(
23803
+ return /* @__PURE__ */ jsx31(
23617
23804
  PropRow,
23618
23805
  {
23619
23806
  prop: p,
@@ -23640,7 +23827,7 @@ function FieldEditor({
23640
23827
  valueText,
23641
23828
  innerWidth
23642
23829
  );
23643
- return /* @__PURE__ */ jsx30(
23830
+ return /* @__PURE__ */ jsx31(
23644
23831
  SlotRow,
23645
23832
  {
23646
23833
  slot: s,
@@ -23652,7 +23839,7 @@ function FieldEditor({
23652
23839
  key
23653
23840
  );
23654
23841
  };
23655
- return /* @__PURE__ */ jsxs26(
23842
+ return /* @__PURE__ */ jsxs27(
23656
23843
  FixedPanel,
23657
23844
  {
23658
23845
  width,
@@ -23661,9 +23848,9 @@ function FieldEditor({
23661
23848
  borderStyle: "single",
23662
23849
  borderColor: hasEmptyProperties ? PALETTE.warning : active ? PALETTE.info : PALETTE.border,
23663
23850
  children: [
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." }),
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." }),
23665
23852
  header,
23666
- /* @__PURE__ */ jsx30(Box25, { flexDirection: "column", width: innerWidth, flexShrink: 0, children: focusLevel === "field" && !inComponentDesc && currentProp ? /* @__PURE__ */ jsx30(
23853
+ /* @__PURE__ */ jsx31(Box26, { flexDirection: "column", width: innerWidth, flexShrink: 0, children: focusLevel === "field" && !inComponentDesc && currentProp ? /* @__PURE__ */ jsx31(
23667
23854
  PropRow,
23668
23855
  {
23669
23856
  prop: currentProp,
@@ -23679,7 +23866,7 @@ function FieldEditor({
23679
23866
  rationale: metadata?.props?.[currentProp.name]?.rationale ?? null,
23680
23867
  showRationale: showInlineRationales
23681
23868
  }
23682
- ) : focusLevel === "field" && inSlots && currentSlot ? /* @__PURE__ */ jsx30(
23869
+ ) : focusLevel === "field" && inSlots && currentSlot ? /* @__PURE__ */ jsx31(
23683
23870
  SlotRow,
23684
23871
  {
23685
23872
  slot: currentSlot,
@@ -23698,8 +23885,8 @@ function FieldEditor({
23698
23885
  ) : visibleRowSlice.map((row, index) => {
23699
23886
  const absoluteIndex = scrollStart + index;
23700
23887
  const key = rowKey(row, absoluteIndex);
23701
- return /* @__PURE__ */ jsx30(
23702
- Box25,
23888
+ return /* @__PURE__ */ jsx31(
23889
+ Box26,
23703
23890
  {
23704
23891
  ref: (node) => {
23705
23892
  if (node) rowMeasureRefs.current.set(key, node);
@@ -23712,7 +23899,7 @@ function FieldEditor({
23712
23899
  `visible-${key}`
23713
23900
  );
23714
23901
  }) }),
23715
- categoryBelow && /* @__PURE__ */ jsx30(Text26, { color: PALETTE.success, bold: true, children: `(${categoryBelow} below)` }),
23902
+ categoryBelow && /* @__PURE__ */ jsx31(Text27, { color: PALETTE.success, bold: true, children: `(${categoryBelow} below)` }),
23716
23903
  sourceOpen && !onToggleSourceExternal && (() => {
23717
23904
  const propMeta = !inSlots && !inComponentDesc && currentProp ? metadata?.props?.[currentProp.name] : void 0;
23718
23905
  const start = propMeta?.sourceStartLine ?? null;
@@ -23721,49 +23908,49 @@ function FieldEditor({
23721
23908
  const src = metadata?.componentSource ?? null;
23722
23909
  const headerPath = path ?? "<unknown source path>";
23723
23910
  if (!start || !end2 || !src) {
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" })
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" })
23728
23915
  ] });
23729
23916
  }
23730
23917
  const lines = src.split("\n").slice(Math.max(0, start - 1), end2);
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" })
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" })
23735
23922
  ] });
23736
23923
  })(),
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" })
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" })
23764
23951
  ] }),
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 }) })
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 }) })
23767
23954
  ]
23768
23955
  }
23769
23956
  );
@@ -23819,23 +24006,23 @@ var init_wrap_text = __esm({
23819
24006
  });
23820
24007
 
23821
24008
  // packages/experience-design-system-cli-legacy/src/analyze/select/tui/components/RationaleLine.tsx
23822
- import { Box as Box26, Text as Text27 } from "ink";
23823
- import { jsx as jsx31, jsxs as jsxs27 } from "react/jsx-runtime";
24009
+ import { Box as Box27, Text as Text28 } from "ink";
24010
+ import { jsx as jsx32, jsxs as jsxs28 } from "react/jsx-runtime";
23824
24011
  function RationaleLine({ line, active }) {
23825
24012
  if (line.kind === "blank") {
23826
- return /* @__PURE__ */ jsx31(Box26, { children: /* @__PURE__ */ jsx31(Text27, { children: " " }) });
24013
+ return /* @__PURE__ */ jsx32(Box27, { children: /* @__PURE__ */ jsx32(Text28, { children: " " }) });
23827
24014
  }
23828
24015
  if (line.kind === "heading") {
23829
- return /* @__PURE__ */ jsx31(Box26, { children: /* @__PURE__ */ jsx31(Text27, { bold: true, color: PALETTE.info, dimColor: !active, children: line.text }) });
24016
+ return /* @__PURE__ */ jsx32(Box27, { children: /* @__PURE__ */ jsx32(Text28, { bold: true, color: PALETTE.info, dimColor: !active, children: line.text }) });
23830
24017
  }
23831
24018
  if (line.kind === "label") {
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 })
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 })
23836
24023
  ] });
23837
24024
  }
23838
- return /* @__PURE__ */ jsx31(Box26, { children: /* @__PURE__ */ jsx31(Text27, { dimColor: !active || line.dim, children: line.text }) });
24025
+ return /* @__PURE__ */ jsx32(Box27, { children: /* @__PURE__ */ jsx32(Text28, { dimColor: !active || line.dim, children: line.text }) });
23839
24026
  }
23840
24027
  var init_RationaleLine = __esm({
23841
24028
  "packages/experience-design-system-cli-legacy/src/analyze/select/tui/components/RationaleLine.tsx"() {
@@ -23845,8 +24032,8 @@ var init_RationaleLine = __esm({
23845
24032
  });
23846
24033
 
23847
24034
  // packages/experience-design-system-cli-legacy/src/analyze/select/tui/components/ComponentRationalePanel.tsx
23848
- import { Box as Box27, Text as Text28 } from "ink";
23849
- import { jsx as jsx32, jsxs as jsxs28 } from "react/jsx-runtime";
24035
+ import { Box as Box28, Text as Text29 } from "ink";
24036
+ import { jsx as jsx33, jsxs as jsxs29 } from "react/jsx-runtime";
23850
24037
  function renderComponentRationaleLines(data, innerWidth) {
23851
24038
  const out = [];
23852
24039
  const pushSection = (heading, body) => {
@@ -23913,8 +24100,8 @@ function ComponentRationalePanel({
23913
24100
  const overflowed = totalLines > contentHeight;
23914
24101
  const visibleStart = totalLines === 0 ? 0 : scrollOffset + 1;
23915
24102
  const visibleEnd = Math.min(totalLines, scrollOffset + contentHeight);
23916
- return /* @__PURE__ */ jsxs28(
23917
- Box27,
24103
+ return /* @__PURE__ */ jsxs29(
24104
+ Box28,
23918
24105
  {
23919
24106
  flexDirection: "column",
23920
24107
  width,
@@ -23922,9 +24109,9 @@ function ComponentRationalePanel({
23922
24109
  borderStyle: "single",
23923
24110
  borderColor: active ? PALETTE.inverse : void 0,
23924
24111
  children: [
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" }) })
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" }) })
23928
24115
  ]
23929
24116
  }
23930
24117
  );
@@ -23941,10 +24128,10 @@ var init_ComponentRationalePanel = __esm({
23941
24128
  });
23942
24129
 
23943
24130
  // packages/experience-design-system-cli-legacy/src/analyze/select/tui/components/HighlightedLine.tsx
23944
- import { Text as Text29 } from "ink";
23945
- import { Fragment as Fragment11, jsx as jsx33 } from "react/jsx-runtime";
24131
+ import { Text as Text30 } from "ink";
24132
+ import { Fragment as Fragment12, jsx as jsx34 } from "react/jsx-runtime";
23946
24133
  function HighlightedLine({ parts }) {
23947
- return /* @__PURE__ */ jsx33(Fragment11, { children: parts.map((part, i) => /* @__PURE__ */ jsx33(Text29, { color: part.color, dimColor: part.dim, children: part.text }, i)) });
24134
+ return /* @__PURE__ */ jsx34(Fragment12, { children: parts.map((part, i) => /* @__PURE__ */ jsx34(Text30, { color: part.color, dimColor: part.dim, children: part.text }, i)) });
23948
24135
  }
23949
24136
  var init_HighlightedLine = __esm({
23950
24137
  "packages/experience-design-system-cli-legacy/src/analyze/select/tui/components/HighlightedLine.tsx"() {
@@ -23953,8 +24140,8 @@ var init_HighlightedLine = __esm({
23953
24140
  });
23954
24141
 
23955
24142
  // packages/experience-design-system-cli-legacy/src/analyze/select/tui/components/ScrollablePanel.tsx
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";
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";
23958
24145
  function ScrollablePanel({
23959
24146
  header,
23960
24147
  width,
@@ -23967,12 +24154,12 @@ function ScrollablePanel({
23967
24154
  children
23968
24155
  }) {
23969
24156
  const overflowed = totalLines > height;
23970
- return /* @__PURE__ */ jsxs29(Box28, { flexDirection: "column", width, height: height + 2, borderStyle: "single", borderColor, children: [
23971
- /* @__PURE__ */ jsxs29(Box28, { children: [
24157
+ return /* @__PURE__ */ jsxs30(Box29, { flexDirection: "column", width, height: height + 2, borderStyle: "single", borderColor, children: [
24158
+ /* @__PURE__ */ jsxs30(Box29, { children: [
23972
24159
  header,
23973
- overflowed && /* @__PURE__ */ jsxs29(Fragment12, { children: [
23974
- /* @__PURE__ */ jsx34(Box28, { flexGrow: 1 }),
23975
- /* @__PURE__ */ jsx34(Text30, { dimColor: !active, children: `\u2195 ${visibleStart}-${visibleEnd}/${totalLines}` })
24160
+ overflowed && /* @__PURE__ */ jsxs30(Fragment13, { children: [
24161
+ /* @__PURE__ */ jsx35(Box29, { flexGrow: 1 }),
24162
+ /* @__PURE__ */ jsx35(Text31, { dimColor: !active, children: `\u2195 ${visibleStart}-${visibleEnd}/${totalLines}` })
23976
24163
  ] })
23977
24164
  ] }),
23978
24165
  children
@@ -23985,8 +24172,8 @@ var init_ScrollablePanel = __esm({
23985
24172
  });
23986
24173
 
23987
24174
  // packages/experience-design-system-cli-legacy/src/analyze/select/tui/components/JsonPanel.tsx
23988
- import { Box as Box29, Text as Text31 } from "ink";
23989
- import { jsx as jsx35 } from "react/jsx-runtime";
24175
+ import { Box as Box30, Text as Text32 } from "ink";
24176
+ import { jsx as jsx36 } from "react/jsx-runtime";
23990
24177
  function highlightJson(line) {
23991
24178
  const parts = [];
23992
24179
  let remaining = line;
@@ -24024,7 +24211,7 @@ function highlightJson(line) {
24024
24211
  parts.push({ text: remaining[0] });
24025
24212
  remaining = remaining.slice(1);
24026
24213
  }
24027
- return /* @__PURE__ */ jsx35(HighlightedLine, { parts });
24214
+ return /* @__PURE__ */ jsx36(HighlightedLine, { parts });
24028
24215
  }
24029
24216
  function truncateLine(line, maxWidth) {
24030
24217
  if (line.length <= maxWidth) return line;
@@ -24037,10 +24224,10 @@ function JsonPanel({ label, value, scrollOffset, width, height, active }) {
24037
24224
  const totalLines = allLines.length;
24038
24225
  const visibleStart = totalLines === 0 ? 0 : scrollOffset + 1;
24039
24226
  const visibleEnd = Math.min(totalLines, scrollOffset + height);
24040
- return /* @__PURE__ */ jsx35(
24227
+ return /* @__PURE__ */ jsx36(
24041
24228
  ScrollablePanel,
24042
24229
  {
24043
- header: /* @__PURE__ */ jsx35(Text31, { bold: true, dimColor: !active, children: label }),
24230
+ header: /* @__PURE__ */ jsx36(Text32, { bold: true, dimColor: !active, children: label }),
24044
24231
  width,
24045
24232
  height,
24046
24233
  active,
@@ -24050,7 +24237,7 @@ function JsonPanel({ label, value, scrollOffset, width, height, active }) {
24050
24237
  borderColor: active ? "white" : void 0,
24051
24238
  children: visibleLines.map((line, i) => {
24052
24239
  const truncated = truncateLine(line, innerWidth);
24053
- return /* @__PURE__ */ jsx35(Box29, { children: highlightJson(truncated) }, i);
24240
+ return /* @__PURE__ */ jsx36(Box30, { children: highlightJson(truncated) }, i);
24054
24241
  })
24055
24242
  }
24056
24243
  );
@@ -24064,8 +24251,8 @@ var init_JsonPanel = __esm({
24064
24251
  });
24065
24252
 
24066
24253
  // packages/experience-design-system-cli-legacy/src/analyze/select/tui/components/RationalePanel.tsx
24067
- import { Text as Text32 } from "ink";
24068
- import { jsx as jsx36 } from "react/jsx-runtime";
24254
+ import { Text as Text33 } from "ink";
24255
+ import { jsx as jsx37 } from "react/jsx-runtime";
24069
24256
  function renderRationaleLines(rows, innerWidth) {
24070
24257
  const out = [];
24071
24258
  rows.forEach((row, idx) => {
@@ -24098,10 +24285,10 @@ function RationalePanel({
24098
24285
  const visible = allLines.slice(scrollOffset, scrollOffset + height);
24099
24286
  const visibleStart = totalLines === 0 ? 0 : scrollOffset + 1;
24100
24287
  const visibleEnd = Math.min(totalLines, scrollOffset + height);
24101
- return /* @__PURE__ */ jsx36(
24288
+ return /* @__PURE__ */ jsx37(
24102
24289
  ScrollablePanel,
24103
24290
  {
24104
- header: /* @__PURE__ */ jsx36(Text32, { bold: true, dimColor: !active, children: `RATIONALE \u2014 ${componentName}` }),
24291
+ header: /* @__PURE__ */ jsx37(Text33, { bold: true, dimColor: !active, children: `RATIONALE \u2014 ${componentName}` }),
24105
24292
  width,
24106
24293
  height,
24107
24294
  active,
@@ -24109,7 +24296,7 @@ function RationalePanel({
24109
24296
  visibleStart,
24110
24297
  visibleEnd,
24111
24298
  borderColor: active ? PALETTE.inverse : void 0,
24112
- children: visible.map((line, i) => /* @__PURE__ */ jsx36(RationaleLine, { line, active }, i))
24299
+ children: visible.map((line, i) => /* @__PURE__ */ jsx37(RationaleLine, { line, active }, i))
24113
24300
  }
24114
24301
  );
24115
24302
  }
@@ -24125,8 +24312,8 @@ var init_RationalePanel = __esm({
24125
24312
 
24126
24313
  // packages/experience-design-system-cli-legacy/src/analyze/select/tui/components/TokenReviewPanel.tsx
24127
24314
  import figures5 from "figures";
24128
- import { Box as Box30, Text as Text33 } from "ink";
24129
- import { jsx as jsx37, jsxs as jsxs30 } from "react/jsx-runtime";
24315
+ import { Box as Box31, Text as Text34 } from "ink";
24316
+ import { jsx as jsx38, jsxs as jsxs31 } from "react/jsx-runtime";
24130
24317
  function collectTokenSuggestions(entry, availableTokens = []) {
24131
24318
  return Object.entries(entry.$properties).filter(([, def]) => {
24132
24319
  const rawKind = def["$token.kind"];
@@ -24160,8 +24347,8 @@ function TokenReviewPanel({
24160
24347
  const scrollStart = Math.max(0, Math.min(editCursor - Math.floor(visibleCount / 2), maxStart));
24161
24348
  const visiblePaths = current.paths.slice(scrollStart, scrollStart + visibleCount);
24162
24349
  const rangeLabel = current.paths.length === 0 ? "no compatible tokens" : `${scrollStart + 1}-${scrollStart + visiblePaths.length} of ${current.paths.length}`;
24163
- return /* @__PURE__ */ jsxs30(
24164
- Box30,
24350
+ return /* @__PURE__ */ jsxs31(
24351
+ Box31,
24165
24352
  {
24166
24353
  flexDirection: "column",
24167
24354
  width,
@@ -24169,25 +24356,25 @@ function TokenReviewPanel({
24169
24356
  borderStyle: "single",
24170
24357
  borderColor: active ? PALETTE.inverse : void 0,
24171
24358
  children: [
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)" }),
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)" }),
24176
24363
  visiblePaths.map((path, i) => {
24177
24364
  const pathIndex = scrollStart + i;
24178
24365
  const checked = editSelection.has(path);
24179
24366
  const focused = pathIndex === editCursor;
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);
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);
24181
24368
  }),
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" })
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" })
24185
24372
  ]
24186
24373
  }
24187
24374
  );
24188
24375
  }
24189
- return /* @__PURE__ */ jsxs30(
24190
- Box30,
24376
+ return /* @__PURE__ */ jsxs31(
24377
+ Box31,
24191
24378
  {
24192
24379
  flexDirection: "column",
24193
24380
  width,
@@ -24195,18 +24382,18 @@ function TokenReviewPanel({
24195
24382
  borderStyle: "single",
24196
24383
  borderColor: active ? PALETTE.inverse : void 0,
24197
24384
  children: [
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)" }),
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)" }),
24200
24387
  suggestions.map((s, i) => {
24201
24388
  const focused = i === selectedRow;
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(", ")}` })
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(", ")}` })
24206
24393
  ] }, s.propName);
24207
24394
  }),
24208
- /* @__PURE__ */ jsx37(Text33, { children: " " }),
24209
- /* @__PURE__ */ jsx37(Text33, { dimColor: true, children: "[\u2191/\u2193] move [Enter] edit allowed [Esc] close" })
24395
+ /* @__PURE__ */ jsx38(Text34, { children: " " }),
24396
+ /* @__PURE__ */ jsx38(Text34, { dimColor: true, children: "[\u2191/\u2193] move [Enter] edit allowed [Esc] close" })
24210
24397
  ]
24211
24398
  }
24212
24399
  );
@@ -24219,8 +24406,8 @@ var init_TokenReviewPanel = __esm({
24219
24406
  });
24220
24407
 
24221
24408
  // packages/experience-design-system-cli-legacy/src/import/tui/steps/review-details-panel.tsx
24222
- import { Text as Text34 } from "ink";
24223
- import { Fragment as Fragment13, jsx as jsx38, jsxs as jsxs31 } from "react/jsx-runtime";
24409
+ import { Text as Text35 } from "ink";
24410
+ import { Fragment as Fragment14, jsx as jsx39, jsxs as jsxs32 } from "react/jsx-runtime";
24224
24411
  function ReviewDetailsPanel({
24225
24412
  selectedKey,
24226
24413
  panelOpen,
@@ -24255,7 +24442,7 @@ function ReviewDetailsPanel({
24255
24442
  rationale: s.rationale ?? ""
24256
24443
  }))
24257
24444
  ];
24258
- return /* @__PURE__ */ jsx38(
24445
+ return /* @__PURE__ */ jsx39(
24259
24446
  RationalePanel,
24260
24447
  {
24261
24448
  componentName: componentRationale?.name ?? selectedKey,
@@ -24268,7 +24455,7 @@ function ReviewDetailsPanel({
24268
24455
  );
24269
24456
  }
24270
24457
  if (panelOpen === "component-rationale") {
24271
- return /* @__PURE__ */ jsx38(
24458
+ return /* @__PURE__ */ jsx39(
24272
24459
  ComponentRationalePanel,
24273
24460
  {
24274
24461
  data: componentRationale ?? {
@@ -24293,14 +24480,14 @@ function ReviewDetailsPanel({
24293
24480
  const headerPath = path ?? "<unknown source path>";
24294
24481
  const sourceLineCount = Math.max(1, height - 4);
24295
24482
  const lines = source ? source.split("\n").slice(panelScrollOffset, panelScrollOffset + sourceLineCount) : [];
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" })
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" })
24300
24487
  ] });
24301
24488
  }
24302
24489
  if (panelOpen === "token-review") {
24303
- return /* @__PURE__ */ jsx38(
24490
+ return /* @__PURE__ */ jsx39(
24304
24491
  TokenReviewPanel,
24305
24492
  {
24306
24493
  componentName: selectedKey,
@@ -24316,7 +24503,7 @@ function ReviewDetailsPanel({
24316
24503
  );
24317
24504
  }
24318
24505
  if (showJson) {
24319
- return /* @__PURE__ */ jsx38(
24506
+ return /* @__PURE__ */ jsx39(
24320
24507
  JsonPanel,
24321
24508
  {
24322
24509
  label: "GENERATED DEFINITION (read-only)",
@@ -24328,7 +24515,7 @@ function ReviewDetailsPanel({
24328
24515
  }
24329
24516
  );
24330
24517
  }
24331
- return /* @__PURE__ */ jsx38(Fragment13, { children: editor });
24518
+ return /* @__PURE__ */ jsx39(Fragment14, { children: editor });
24332
24519
  }
24333
24520
  var init_review_details_panel = __esm({
24334
24521
  "packages/experience-design-system-cli-legacy/src/import/tui/steps/review-details-panel.tsx"() {
@@ -24342,7 +24529,7 @@ var init_review_details_panel = __esm({
24342
24529
  });
24343
24530
 
24344
24531
  // packages/experience-design-system-cli-legacy/src/import/tui/components/ReviewDetailsEditor.tsx
24345
- import { jsx as jsx39 } from "react/jsx-runtime";
24532
+ import { jsx as jsx40 } from "react/jsx-runtime";
24346
24533
  import { createElement as createElement5 } from "react";
24347
24534
  function toFieldEditorMetadata(reviewMetadata) {
24348
24535
  if (!reviewMetadata) return void 0;
@@ -24376,7 +24563,7 @@ function ReviewDetailsEditor({
24376
24563
  jsonScrollOffset,
24377
24564
  currentTokenSuggestions
24378
24565
  } = reviewEditor;
24379
- return /* @__PURE__ */ jsx39(
24566
+ return /* @__PURE__ */ jsx40(
24380
24567
  ReviewDetailsPanel,
24381
24568
  {
24382
24569
  selectedKey,
@@ -24423,8 +24610,8 @@ var init_ReviewDetailsEditor = __esm({
24423
24610
  });
24424
24611
 
24425
24612
  // packages/experience-design-system-cli-legacy/src/import/tui/components/ReviewComponentPanel.tsx
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";
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";
24428
24615
  function buildReviewFieldEditor(reviewEditor, selectedJson, onExit, overrides = {}) {
24429
24616
  return {
24430
24617
  value: reviewEditor.draftValue || selectedJson,
@@ -24464,17 +24651,17 @@ function ReviewEmptyComponentsWarning({
24464
24651
  hidden
24465
24652
  }) {
24466
24653
  if (hidden || count === 0) return null;
24467
- return /* @__PURE__ */ jsx40(Text35, { color: PALETTE.warning, children: `\u26A0 ${count} component${count === 1 ? "" : "s"} had no classifiable props \u2014 review with care` });
24654
+ return /* @__PURE__ */ jsx41(Text36, { color: PALETTE.warning, children: `\u26A0 ${count} component${count === 1 ? "" : "s"} had no classifiable props \u2014 review with care` });
24468
24655
  }
24469
24656
  function ReviewNoSelection() {
24470
- return /* @__PURE__ */ jsx40(Box31, { flexGrow: 1, paddingLeft: 1, flexDirection: "column", children: /* @__PURE__ */ jsx40(Text35, { dimColor: true, children: "No component selected" }) });
24657
+ return /* @__PURE__ */ jsx41(Box32, { flexGrow: 1, paddingLeft: 1, flexDirection: "column", children: /* @__PURE__ */ jsx41(Text36, { dimColor: true, children: "No component selected" }) });
24471
24658
  }
24472
24659
  function ReviewFinalizeError({
24473
24660
  message,
24474
24661
  hidden
24475
24662
  }) {
24476
24663
  if (hidden || !message) return null;
24477
- return /* @__PURE__ */ jsx40(Text35, { color: PALETTE.error, children: `\u26A0 ${message}` });
24664
+ return /* @__PURE__ */ jsx41(Text36, { color: PALETTE.error, children: `\u26A0 ${message}` });
24478
24665
  }
24479
24666
  function ReviewPanelFooter({
24480
24667
  reviewEditor,
@@ -24483,10 +24670,10 @@ function ReviewPanelFooter({
24483
24670
  livePreview,
24484
24671
  livePreviewSpinner
24485
24672
  }) {
24486
- return /* @__PURE__ */ jsxs32(Fragment14, { children: [
24673
+ return /* @__PURE__ */ jsxs33(Fragment15, { children: [
24487
24674
  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" : ""),
24488
- livePreview.status === "running" && /* @__PURE__ */ jsx40(Text35, { children: ` ${livePreviewSpinner} live preview` }),
24489
- livePreview.disabled && /* @__PURE__ */ jsx40(Text35, { children: " \xB7 live preview disabled" })
24675
+ livePreview.status === "running" && /* @__PURE__ */ jsx41(Text36, { children: ` ${livePreviewSpinner} live preview` }),
24676
+ livePreview.disabled && /* @__PURE__ */ jsx41(Text36, { children: " \xB7 live preview disabled" })
24490
24677
  ] });
24491
24678
  }
24492
24679
  function ReviewComponentTitle({
@@ -24495,10 +24682,10 @@ function ReviewComponentTitle({
24495
24682
  slotCount,
24496
24683
  sidebarFocused
24497
24684
  }) {
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: [
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: [
24502
24689
  propCount,
24503
24690
  " prop",
24504
24691
  propCount !== 1 ? "s" : "",
@@ -24529,8 +24716,8 @@ function ReviewComponentPanel({
24529
24716
  const slotCount = selectedEntry.$slots ? Object.keys(selectedEntry.$slots).length : 0;
24530
24717
  const contentHeight = Math.max(1, height - 2);
24531
24718
  const contentWidth = Math.max(1, width - 1);
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(
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(
24534
24721
  ReviewDetailsEditor,
24535
24722
  {
24536
24723
  selectedKey,
@@ -24543,7 +24730,7 @@ function ReviewComponentPanel({
24543
24730
  jsonValue,
24544
24731
  sidebarFocused,
24545
24732
  fieldEditor,
24546
- header: /* @__PURE__ */ jsx40(
24733
+ header: /* @__PURE__ */ jsx41(
24547
24734
  ReviewComponentTitle,
24548
24735
  {
24549
24736
  selectedKey,
@@ -24554,8 +24741,8 @@ function ReviewComponentPanel({
24554
24741
  )
24555
24742
  }
24556
24743
  ) }),
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(
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(
24559
24746
  ReviewPanelFooter,
24560
24747
  {
24561
24748
  reviewEditor,
@@ -24578,8 +24765,8 @@ var init_ReviewComponentPanel = __esm({
24578
24765
  });
24579
24766
 
24580
24767
  // packages/experience-design-system-cli-legacy/src/import/tui/components/ReviewStatus.tsx
24581
- import { Box as Box32, Text as Text36 } from "ink";
24582
- import { jsx as jsx41, jsxs as jsxs33 } from "react/jsx-runtime";
24768
+ import { Box as Box33, Text as Text37 } from "ink";
24769
+ import { jsx as jsx42, jsxs as jsxs34 } from "react/jsx-runtime";
24583
24770
  function countReviewStatuses(entries) {
24584
24771
  return entries.reduce(
24585
24772
  (counts, entry) => {
@@ -24592,13 +24779,13 @@ function countReviewStatuses(entries) {
24592
24779
  );
24593
24780
  }
24594
24781
  function ReviewLoadingState() {
24595
- return /* @__PURE__ */ jsx41(Box32, { paddingX: 2, paddingY: 1, children: /* @__PURE__ */ jsx41(Text36, { dimColor: true, children: "Loading generated definitions..." }) });
24782
+ return /* @__PURE__ */ jsx42(Box33, { paddingX: 2, paddingY: 1, children: /* @__PURE__ */ jsx42(Text37, { dimColor: true, children: "Loading generated definitions..." }) });
24596
24783
  }
24597
24784
  function ReviewLoadError({ message }) {
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" })
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" })
24602
24789
  ] });
24603
24790
  }
24604
24791
  var init_ReviewStatus = __esm({
@@ -24732,8 +24919,8 @@ var init_runLivePreview = __esm({
24732
24919
  });
24733
24920
 
24734
24921
  // packages/experience-design-system-cli-legacy/src/analyze/select/tui/components/FinalizeDialog.tsx
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";
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";
24737
24924
  function FinalizeDialog({
24738
24925
  accepted,
24739
24926
  rejected,
@@ -24761,51 +24948,51 @@ function FinalizeDialog({
24761
24948
  const windowed = removed.slice(offset, offset + FINALIZE_REMOVED_WINDOW);
24762
24949
  const hasMoreBelow = offset + FINALIZE_REMOVED_WINDOW < removed.length;
24763
24950
  const hasMoreAbove = offset > 0;
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: [
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: [
24769
24956
  accepted,
24770
24957
  " accepted"
24771
24958
  ] }),
24772
- /* @__PURE__ */ jsx42(Text37, { children: " \xB7 " }),
24773
- /* @__PURE__ */ jsxs34(Text37, { color: PALETTE.error, children: [
24959
+ /* @__PURE__ */ jsx43(Text38, { children: " \xB7 " }),
24960
+ /* @__PURE__ */ jsxs35(Text38, { color: PALETTE.error, children: [
24774
24961
  rejected,
24775
24962
  " rejected"
24776
24963
  ] }),
24777
- /* @__PURE__ */ jsx42(Text37, { children: " \xB7 " }),
24778
- /* @__PURE__ */ jsxs34(Text37, { dimColor: true, children: [
24964
+ /* @__PURE__ */ jsx43(Text38, { children: " \xB7 " }),
24965
+ /* @__PURE__ */ jsxs35(Text38, { dimColor: true, children: [
24779
24966
  needsReview,
24780
24967
  " unresolved"
24781
24968
  ] })
24782
24969
  ] }),
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: " " })
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: " " })
24788
24975
  ] }),
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: " " })
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: " " })
24793
24980
  ] }),
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: " " })
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: " " })
24797
24984
  ] }),
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: " " })
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: " " })
24805
24992
  ] }),
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" })
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" })
24809
24996
  ] }) });
24810
24997
  }
24811
24998
  var FINALIZE_REMOVED_WINDOW;
@@ -24820,7 +25007,7 @@ var init_FinalizeDialog = __esm({
24820
25007
  });
24821
25008
 
24822
25009
  // packages/experience-design-system-cli-legacy/src/import/tui/useFinalizePreview.ts
24823
- import { useEffect as useEffect8, useRef as useRef4, useState as useState12 } from "react";
25010
+ import { useEffect as useEffect8, useRef as useRef5, useState as useState13 } from "react";
24824
25011
  function useReviewFinalizePreview({
24825
25012
  components,
24826
25013
  ...options
@@ -24832,10 +25019,10 @@ function useReviewFinalizePreview({
24832
25019
  }
24833
25020
  function useFinalizePreview(opts) {
24834
25021
  const { open, extractSessionId, tokensPath, spaceId, environmentId, cmaToken, host, acceptedKeys } = opts;
24835
- const [status, setStatus] = useState12("idle");
24836
- const [removed, setRemoved] = useState12([]);
24837
- const [scrollOffset, setScrollOffset] = useState12(0);
24838
- const generationRef = useRef4(0);
25022
+ const [status, setStatus] = useState13("idle");
25023
+ const [removed, setRemoved] = useState13([]);
25024
+ const [scrollOffset, setScrollOffset] = useState13(0);
25025
+ const generationRef = useRef5(0);
24839
25026
  const acceptedKey = [...acceptedKeys].sort().join("\0");
24840
25027
  useEffect8(() => {
24841
25028
  if (!open) {
@@ -24889,7 +25076,7 @@ var init_useFinalizePreview = __esm({
24889
25076
  });
24890
25077
 
24891
25078
  // packages/experience-design-system-cli-legacy/src/import/tui/hooks/useReviewSession.ts
24892
- import { useCallback as useCallback4, useEffect as useEffect9, useRef as useRef5, useState as useState13 } from "react";
25079
+ import { useCallback as useCallback4, useEffect as useEffect9, useRef as useRef6, useState as useState14 } from "react";
24893
25080
  function loadReviewSessionState({
24894
25081
  extractSessionId,
24895
25082
  tokenSessionId,
@@ -24935,10 +25122,10 @@ function useReviewSession({
24935
25122
  tokensPath,
24936
25123
  onExtraLoaded
24937
25124
  }) {
24938
- const [components, setComponents] = useState13([]);
24939
- const [loading, setLoading] = useState13(true);
24940
- const [loadError, setLoadError] = useState13(null);
24941
- const [availableTokens, setAvailableTokens] = useState13([]);
25125
+ const [components, setComponents] = useState14([]);
25126
+ const [loading, setLoading] = useState14(true);
25127
+ const [loadError, setLoadError] = useState14(null);
25128
+ const [availableTokens, setAvailableTokens] = useState14([]);
24942
25129
  const loadInitialState = useCallback4(async () => {
24943
25130
  const result = loadSession();
24944
25131
  if (result.error || !tokensPath) return { result, catalog: result.tokens };
@@ -24999,8 +25186,8 @@ function useReviewSession({
24999
25186
  };
25000
25187
  }
25001
25188
  function useReviewMetadata({ components, selectedIdx, extractSessionId }) {
25002
- const [reviewMetadata, setReviewMetadata] = useState13(null);
25003
- const [componentRationale, setComponentRationale] = useState13(null);
25189
+ const [reviewMetadata, setReviewMetadata] = useState14(null);
25190
+ const [componentRationale, setComponentRationale] = useState14(null);
25004
25191
  useEffect9(() => {
25005
25192
  const current = components[selectedIdx];
25006
25193
  if (!current) {
@@ -25042,8 +25229,8 @@ function createReviewHistorySnapshot(components, options = {}) {
25042
25229
  };
25043
25230
  }
25044
25231
  function useReviewHistory({ loading, components, createSnapshot, applySnapshot }) {
25045
- const historyRef = useRef5(null);
25046
- const historySeededRef = useRef5(false);
25232
+ const historyRef = useRef6(null);
25233
+ const historySeededRef = useRef6(false);
25047
25234
  useEffect9(() => {
25048
25235
  if (loading || historySeededRef.current) return;
25049
25236
  historySeededRef.current = true;
@@ -25133,7 +25320,7 @@ var init_useReviewSession = __esm({
25133
25320
  });
25134
25321
 
25135
25322
  // packages/experience-design-system-cli-legacy/src/import/tui/hooks/useReviewEditor.ts
25136
- import { useEffect as useEffect10, useRef as useRef6, useState as useState14 } from "react";
25323
+ import { useEffect as useEffect10, useRef as useRef7, useState as useState15 } from "react";
25137
25324
  function parseReviewEntry(draftValue) {
25138
25325
  const parsed = JSON.parse(draftValue);
25139
25326
  const keys = Object.keys(parsed);
@@ -25153,20 +25340,20 @@ function useReviewEditor({
25153
25340
  onEditSaved,
25154
25341
  onTokenSaved
25155
25342
  }) {
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);
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);
25170
25357
  useEffect10(() => {
25171
25358
  setTokenReviewRow(0);
25172
25359
  setTokenReviewEditing(false);
@@ -25287,12 +25474,12 @@ var init_useReviewEditor = __esm({
25287
25474
  });
25288
25475
 
25289
25476
  // packages/experience-design-system-cli-legacy/src/import/tui/hooks/useReviewSurfaceState.ts
25290
- import { useState as useState15 } from "react";
25477
+ import { useState as useState16 } from "react";
25291
25478
  function useReviewSurfaceState(initialFinalizeError = null) {
25292
- const [sidebarFocused, setSidebarFocused] = useState15(true);
25293
- const [showFinalize, setShowFinalize] = useState15(false);
25294
- const [showQuit, setShowQuit] = useState15(false);
25295
- const [finalizeError, setFinalizeError] = useState15(initialFinalizeError);
25479
+ const [sidebarFocused, setSidebarFocused] = useState16(true);
25480
+ const [showFinalize, setShowFinalize] = useState16(false);
25481
+ const [showQuit, setShowQuit] = useState16(false);
25482
+ const [finalizeError, setFinalizeError] = useState16(initialFinalizeError);
25296
25483
  return {
25297
25484
  sidebarFocused,
25298
25485
  setSidebarFocused,
@@ -25311,8 +25498,8 @@ var init_useReviewSurfaceState = __esm({
25311
25498
  });
25312
25499
 
25313
25500
  // packages/experience-design-system-cli-legacy/src/analyze/select/tui/components/QuitDialog.tsx
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";
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";
25316
25503
  function QuitDialog({ hasUnsavedDrafts, onConfirm, onCancel }) {
25317
25504
  useImmediateInput((input, key) => {
25318
25505
  if (input === "y" || key.return) {
@@ -25321,16 +25508,16 @@ function QuitDialog({ hasUnsavedDrafts, onConfirm, onCancel }) {
25321
25508
  onCancel();
25322
25509
  }
25323
25510
  });
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" })
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" })
25334
25521
  ] });
25335
25522
  }
25336
25523
  var init_QuitDialog = __esm({
@@ -25341,8 +25528,8 @@ var init_QuitDialog = __esm({
25341
25528
  });
25342
25529
 
25343
25530
  // packages/experience-design-system-cli-legacy/src/import/tui/components/ReviewDialogs.tsx
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";
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";
25346
25533
  function ReviewFinalizeDialogs({
25347
25534
  showFinalize,
25348
25535
  showQuit,
@@ -25356,8 +25543,8 @@ function ReviewFinalizeDialogs({
25356
25543
  onQuitCancel
25357
25544
  }) {
25358
25545
  const { accepted, rejected, needsReview } = countReviewStatuses(components);
25359
- return /* @__PURE__ */ jsxs36(Fragment17, { children: [
25360
- showFinalize && /* @__PURE__ */ jsx44(
25546
+ return /* @__PURE__ */ jsxs37(Fragment18, { children: [
25547
+ showFinalize && /* @__PURE__ */ jsx45(
25361
25548
  FinalizeDialog,
25362
25549
  {
25363
25550
  accepted,
@@ -25370,7 +25557,7 @@ function ReviewFinalizeDialogs({
25370
25557
  onCancel: onFinalizeCancel
25371
25558
  }
25372
25559
  ),
25373
- showQuit && /* @__PURE__ */ jsx44(QuitDialog, { hasUnsavedDrafts: false, onConfirm: onQuitConfirm, onCancel: onQuitCancel })
25560
+ showQuit && /* @__PURE__ */ jsx45(QuitDialog, { hasUnsavedDrafts: false, onConfirm: onQuitConfirm, onCancel: onQuitCancel })
25374
25561
  ] });
25375
25562
  }
25376
25563
  function ReviewStepDialogs({
@@ -25380,7 +25567,7 @@ function ReviewStepDialogs({
25380
25567
  onFinalize,
25381
25568
  onQuit
25382
25569
  }) {
25383
- return /* @__PURE__ */ jsx44(
25570
+ return /* @__PURE__ */ jsx45(
25384
25571
  ReviewFinalizeDialogs,
25385
25572
  {
25386
25573
  showFinalize: surfaceState.showFinalize,
@@ -25398,12 +25585,12 @@ function ReviewStepDialogs({
25398
25585
  }
25399
25586
  function ReviewReloadDialog({ open }) {
25400
25587
  if (!open) return null;
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" })
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" })
25407
25594
  ] });
25408
25595
  }
25409
25596
  var init_ReviewDialogs = __esm({
@@ -25640,20 +25827,20 @@ var init_preview_annotations = __esm({
25640
25827
  });
25641
25828
 
25642
25829
  // packages/experience-design-system-cli-legacy/src/import/tui/useLivePreview.ts
25643
- import { useCallback as useCallback5, useEffect as useEffect11, useRef as useRef7, useState as useState16 } from "react";
25830
+ import { useCallback as useCallback5, useEffect as useEffect11, useRef as useRef8, useState as useState17 } from "react";
25644
25831
  function useLivePreview(opts) {
25645
25832
  const debounceMs = opts.debounceMs ?? DEFAULT_DEBOUNCE_MS;
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);
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);
25653
25840
  useEffect11(() => {
25654
25841
  optsRef.current = opts;
25655
25842
  });
25656
- const disabledRef = useRef7(disabled);
25843
+ const disabledRef = useRef8(disabled);
25657
25844
  useEffect11(() => {
25658
25845
  disabledRef.current = disabled;
25659
25846
  }, [disabled]);
@@ -25738,7 +25925,7 @@ var init_useLivePreview = __esm({
25738
25925
  });
25739
25926
 
25740
25927
  // packages/experience-design-system-cli-legacy/src/import/tui/hooks/useReviewPreview.ts
25741
- import { useCallback as useCallback6, useEffect as useEffect12, useState as useState17 } from "react";
25928
+ import { useCallback as useCallback6, useEffect as useEffect12, useState as useState18 } from "react";
25742
25929
  function useReviewPreview({
25743
25930
  components,
25744
25931
  loading,
@@ -25752,8 +25939,8 @@ function useReviewPreview({
25752
25939
  deleteAllComponents,
25753
25940
  onResult
25754
25941
  }) {
25755
- const [previewAnnotations, setPreviewAnnotations] = useState17(/* @__PURE__ */ new Map());
25756
- const [removedComponents, setRemovedComponents] = useState17([]);
25942
+ const [previewAnnotations, setPreviewAnnotations] = useState18(/* @__PURE__ */ new Map());
25943
+ const [removedComponents, setRemovedComponents] = useState18([]);
25757
25944
  const handleResult = useCallback6(
25758
25945
  (response) => {
25759
25946
  if (!response) return;
@@ -25779,7 +25966,7 @@ function useReviewPreview({
25779
25966
  onResult: handleResult,
25780
25967
  deleteAllComponents
25781
25968
  });
25782
- const [spinnerTick, setSpinnerTick] = useState17(0);
25969
+ const [spinnerTick, setSpinnerTick] = useState18(0);
25783
25970
  useEffect12(() => {
25784
25971
  if (livePreviewHook.status !== "running") return;
25785
25972
  const id = setInterval(() => setSpinnerTick((tick2) => tick2 + 1), 80);
@@ -25805,8 +25992,8 @@ var init_useReviewPreview = __esm({
25805
25992
  });
25806
25993
 
25807
25994
  // packages/experience-design-system-cli-legacy/src/import/tui/components/LivePreviewSummary.tsx
25808
- import { Box as Box36, Text as Text40 } from "ink";
25809
- import { jsx as jsx45, jsxs as jsxs37 } from "react/jsx-runtime";
25995
+ import { Box as Box37, Text as Text41 } from "ink";
25996
+ import { jsx as jsx46, jsxs as jsxs38 } from "react/jsx-runtime";
25810
25997
  function LivePreviewSummary({
25811
25998
  enabled,
25812
25999
  previewAnnotations,
@@ -25820,19 +26007,19 @@ function LivePreviewSummary({
25820
26007
  const counts = { new: 0, changed: 0, removed: 0, breaking: 0 };
25821
26008
  for (const annotation of previewAnnotations.values()) counts[annotation] += 1;
25822
26009
  const hasCounts = counts.new + counts.changed + counts.removed + counts.breaking > 0;
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...` });
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...` });
25825
26012
  if (!hasCounts) return null;
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` })
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` })
25836
26023
  ] });
25837
26024
  }
25838
26025
  var init_LivePreviewSummary = __esm({
@@ -25843,10 +26030,10 @@ var init_LivePreviewSummary = __esm({
25843
26030
  });
25844
26031
 
25845
26032
  // packages/experience-design-system-cli-legacy/src/import/tui/steps/GenerateReviewStep.tsx
25846
- import { useCallback as useCallback7, useEffect as useEffect13, useMemo as useMemo3, useRef as useRef8, useState as useState18 } from "react";
26033
+ import { useCallback as useCallback7, useEffect as useEffect13, useMemo as useMemo3, useRef as useRef9, useState as useState19 } from "react";
25847
26034
  import figures6 from "figures";
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";
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";
25850
26037
  function sortComponentsForSidebar(components, cycleParticipants) {
25851
26038
  const isEmpty2 = (entry) => Object.keys(entry.$properties ?? {}).length === 0 && Object.keys(entry.$slots ?? {}).length === 0;
25852
26039
  const tier = (c2) => {
@@ -25887,10 +26074,10 @@ function CyclePathLine({
25887
26074
  highlightComponents = false,
25888
26075
  highlightLine = false
25889
26076
  }) {
25890
- return /* @__PURE__ */ jsxs38(Text41, { color: highlightLine ? PALETTE.warning : void 0, children: [
26077
+ return /* @__PURE__ */ jsxs39(Text42, { color: highlightLine ? PALETTE.warning : void 0, children: [
25891
26078
  prefix,
25892
26079
  segments.map(
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)
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)
25894
26081
  )
25895
26082
  ] });
25896
26083
  }
@@ -25902,31 +26089,31 @@ function CycleDetailPanel({
25902
26089
  height
25903
26090
  }) {
25904
26091
  const lines = [
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")
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")
25909
26096
  ];
25910
26097
  cycles.forEach((cycle, index) => {
25911
26098
  const nodeCount = new Set(cycle.path).size;
25912
26099
  const isCursor = index === cursor;
25913
26100
  lines.push(
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}`)
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}`)
25916
26103
  );
25917
26104
  if (cycle.suggestedBreak) {
25918
26105
  lines.push(
25919
- /* @__PURE__ */ jsx46(Text41, { dimColor: true, children: ` Suggested fix: remove [${cycle.suggestedBreak.slotName}] from ${cycle.suggestedBreak.fromComponent}` }, `cyc-fix-${index}`)
26106
+ /* @__PURE__ */ jsx47(Text42, { dimColor: true, children: ` Suggested fix: remove [${cycle.suggestedBreak.slotName}] from ${cycle.suggestedBreak.fromComponent}` }, `cyc-fix-${index}`)
25920
26107
  );
25921
26108
  }
25922
- lines.push(/* @__PURE__ */ jsx46(Text41, { children: " " }, `cyc-s-${index}`));
26109
+ lines.push(/* @__PURE__ */ jsx47(Text42, { children: " " }, `cyc-s-${index}`));
25923
26110
  });
25924
26111
  const footer = "[\u2191\u2193] move [Enter] fix cycle [c/q/Esc] close";
25925
26112
  const viewportHeight = Math.max(1, height - 3);
25926
26113
  const visible = lines.slice(scrollOffset, scrollOffset + viewportHeight - 1);
25927
- return /* @__PURE__ */ jsxs38(FixedPanel, { width, height, borderStyle: "round", borderColor: PALETTE.warning, paddingLeft: 1, children: [
26114
+ return /* @__PURE__ */ jsxs39(FixedPanel, { width, height, borderStyle: "round", borderColor: PALETTE.warning, paddingLeft: 1, children: [
25928
26115
  visible,
25929
- /* @__PURE__ */ jsx46(Text41, { dimColor: true, children: footer })
26116
+ /* @__PURE__ */ jsx47(Text42, { dimColor: true, children: footer })
25930
26117
  ] });
25931
26118
  }
25932
26119
  function BreakCyclePanel({
@@ -25937,14 +26124,14 @@ function BreakCyclePanel({
25937
26124
  width,
25938
26125
  height
25939
26126
  }) {
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" })
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" })
25948
26135
  ] });
25949
26136
  }
25950
26137
  function buildBreakingRows(breakingChanges) {
@@ -25990,9 +26177,9 @@ function deriveBreakingChanges(response) {
25990
26177
  }
25991
26178
  function GenerateReviewStep(props) {
25992
26179
  if (!props.extractSessionId) {
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." }) });
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." }) });
25994
26181
  }
25995
- return /* @__PURE__ */ jsx46(GenerateReviewStepView, { ...props, extractSessionId: props.extractSessionId });
26182
+ return /* @__PURE__ */ jsx47(GenerateReviewStepView, { ...props, extractSessionId: props.extractSessionId });
25996
26183
  }
25997
26184
  function GenerateReviewStepView({
25998
26185
  extractSessionId,
@@ -26008,7 +26195,7 @@ function GenerateReviewStepView({
26008
26195
  initialFinalizeError = null
26009
26196
  }) {
26010
26197
  const { columns: terminalWidth, rows: terminalRows } = useTerminalSize();
26011
- const [slotCycles, setSlotCycles] = useState18([]);
26198
+ const [slotCycles, setSlotCycles] = useState19([]);
26012
26199
  const setLoadedSlotCycles = useCallback7((cycles) => {
26013
26200
  setSlotCycles(cycles ?? []);
26014
26201
  }, []);
@@ -26040,7 +26227,7 @@ function GenerateReviewStepView({
26040
26227
  tokensPath,
26041
26228
  onExtraLoaded: setLoadedSlotCycles
26042
26229
  });
26043
- const [nav, setNav] = useState18({
26230
+ const [nav, setNav] = useState19({
26044
26231
  cursorRowIdx: 0,
26045
26232
  sidebarScrollOffset: 0
26046
26233
  });
@@ -26056,10 +26243,10 @@ function GenerateReviewStepView({
26056
26243
  finalizeError,
26057
26244
  setFinalizeError
26058
26245
  } = reviewSurface;
26059
- const [removedBannerCollapsed, setRemovedBannerCollapsed] = useState18(false);
26060
- const removedBannerDefaultedRef = useRef8(false);
26061
- const [cyclePanelScroll, setCyclePanelScroll] = useState18(0);
26062
- const [cyclesCursor, setCyclesCursor] = useState18(0);
26246
+ const [removedBannerCollapsed, setRemovedBannerCollapsed] = useState19(false);
26247
+ const removedBannerDefaultedRef = useRef9(false);
26248
+ const [cyclePanelScroll, setCyclePanelScroll] = useState19(0);
26249
+ const [cyclesCursor, setCyclesCursor] = useState19(0);
26063
26250
  const cyclePanel = useOverlayPanel({
26064
26251
  toggleKey: "c",
26065
26252
  onClose: () => {
@@ -26074,10 +26261,10 @@ function GenerateReviewStepView({
26074
26261
  setBreakConfirm(false);
26075
26262
  }
26076
26263
  });
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);
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);
26081
26268
  const {
26082
26269
  searchOpen,
26083
26270
  setSearchOpen,
@@ -26095,14 +26282,14 @@ function GenerateReviewStepView({
26095
26282
  setShowHelp
26096
26283
  } = useSidebarSearchState();
26097
26284
  const breakingPanel = useOverlayPanel({ toggleKey: "b", onClose: () => setBreakingDetailOpen(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);
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);
26106
26293
  const acceptedCountForPreview = components.filter((c2) => c2.status === "accepted").length;
26107
26294
  const { previewAnnotations, removedComponents, livePreviewHook, livePreviewSpinner } = useReviewPreview({
26108
26295
  components,
@@ -26234,7 +26421,7 @@ function GenerateReviewStepView({
26234
26421
  }),
26235
26422
  applySnapshot: applyHistorySnapshot
26236
26423
  });
26237
- const autoRejectPushedRef = useRef8(false);
26424
+ const autoRejectPushedRef = useRef9(false);
26238
26425
  useEffect13(() => {
26239
26426
  if (loading) return;
26240
26427
  if (!historySeededRef.current) return;
@@ -26849,13 +27036,13 @@ function GenerateReviewStepView({
26849
27036
  }
26850
27037
  });
26851
27038
  if (loading) {
26852
- return /* @__PURE__ */ jsx46(ReviewLoadingState, {});
27039
+ return /* @__PURE__ */ jsx47(ReviewLoadingState, {});
26853
27040
  }
26854
27041
  if (loadError) {
26855
- return /* @__PURE__ */ jsx46(ReviewLoadError, { message: loadError });
27042
+ return /* @__PURE__ */ jsx47(ReviewLoadError, { message: loadError });
26856
27043
  }
26857
27044
  if (showHelp) {
26858
- return /* @__PURE__ */ jsx46(HelpOverlay, { sections: HELP_SECTIONS2, handleInput: false, onClose: () => setShowHelp(false) });
27045
+ return /* @__PURE__ */ jsx47(HelpOverlay, { sections: HELP_SECTIONS2, handleInput: false, onClose: () => setShowHelp(false) });
26859
27046
  }
26860
27047
  const { selected, selectedJson, visibleJsonPanelValue } = getReviewSelectionState(
26861
27048
  components,
@@ -26895,8 +27082,8 @@ function GenerateReviewStepView({
26895
27082
  for (const c2 of closures.values()) if (c2.nodes.length > 1) return true;
26896
27083
  return false;
26897
27084
  })();
26898
- return /* @__PURE__ */ jsxs38(Box37, { flexDirection: "column", children: [
26899
- /* @__PURE__ */ jsx46(
27085
+ return /* @__PURE__ */ jsxs39(Box38, { flexDirection: "column", children: [
27086
+ /* @__PURE__ */ jsx47(
26900
27087
  ReviewStepDialogs,
26901
27088
  {
26902
27089
  surfaceState: reviewSurface,
@@ -26906,16 +27093,16 @@ function GenerateReviewStepView({
26906
27093
  onQuit
26907
27094
  }
26908
27095
  ),
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))
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))
26915
27102
  ] })
26916
27103
  ] }),
26917
- breakingChanges.length > 0 && !dialogOpen && /* @__PURE__ */ jsx46(Box37, { paddingX: 1, children: /* @__PURE__ */ jsx46(
26918
- Text41,
27104
+ breakingChanges.length > 0 && !dialogOpen && /* @__PURE__ */ jsx47(Box38, { paddingX: 1, children: /* @__PURE__ */ jsx47(
27105
+ Text42,
26919
27106
  {
26920
27107
  color: PALETTE.warning,
26921
27108
  children: `[b] ${breakingChanges.length} breaking change${breakingChanges.length === 1 ? "" : "s"}`
@@ -26925,14 +27112,14 @@ function GenerateReviewStepView({
26925
27112
  const row = breakingRows[breakingCursor];
26926
27113
  const comp = row ? breakingChanges.find((b) => b.componentName === row.componentName) : void 0;
26927
27114
  if (!comp) return null;
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" })
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" })
26933
27120
  ] });
26934
27121
  })(),
26935
- !dialogOpen && /* @__PURE__ */ jsx46(
27122
+ !dialogOpen && /* @__PURE__ */ jsx47(
26936
27123
  LivePreviewSummary,
26937
27124
  {
26938
27125
  enabled: livePreview,
@@ -26951,16 +27138,16 @@ function GenerateReviewStepView({
26951
27138
  const participantSet = cycleView.structural;
26952
27139
  const members = stillRejected.filter((n) => participantSet.has(n)).sort();
26953
27140
  const ancestors = stillRejected.filter((n) => !participantSet.has(n)).sort();
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" })
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" })
26959
27146
  ] });
26960
27147
  })(),
26961
- /* @__PURE__ */ jsx46(ReviewEmptyComponentsWarning, { count: emptyCount, hidden: dialogOpen }),
26962
- /* @__PURE__ */ jsx46(ReviewFinalizeError, { message: finalizeError, hidden: dialogOpen }),
26963
- !dialogOpen && breakPanel.isOpen && /* @__PURE__ */ jsx46(
27148
+ /* @__PURE__ */ jsx47(ReviewEmptyComponentsWarning, { count: emptyCount, hidden: dialogOpen }),
27149
+ /* @__PURE__ */ jsx47(ReviewFinalizeError, { message: finalizeError, hidden: dialogOpen }),
27150
+ !dialogOpen && breakPanel.isOpen && /* @__PURE__ */ jsx47(
26964
27151
  BreakCyclePanel,
26965
27152
  {
26966
27153
  cycle: cycleRows[cyclesCursor],
@@ -26971,7 +27158,7 @@ function GenerateReviewStepView({
26971
27158
  height: panelHeight
26972
27159
  }
26973
27160
  ),
26974
- !dialogOpen && cyclePanel.isOpen && !breakPanel.isOpen && /* @__PURE__ */ jsx46(
27161
+ !dialogOpen && cyclePanel.isOpen && !breakPanel.isOpen && /* @__PURE__ */ jsx47(
26975
27162
  CycleDetailPanel,
26976
27163
  {
26977
27164
  cycles: cycleRows,
@@ -26981,8 +27168,8 @@ function GenerateReviewStepView({
26981
27168
  height: panelHeight
26982
27169
  }
26983
27170
  ),
26984
- !dialogOpen && !cyclePanel.isOpen && !breakPanel.isOpen && /* @__PURE__ */ jsxs38(Box37, { children: [
26985
- breakingPanel.isOpen ? /* @__PURE__ */ jsx46(
27171
+ !dialogOpen && !cyclePanel.isOpen && !breakPanel.isOpen && /* @__PURE__ */ jsxs39(Box38, { children: [
27172
+ breakingPanel.isOpen ? /* @__PURE__ */ jsx47(
26986
27173
  GotoBanner,
26987
27174
  {
26988
27175
  title: `Breaking changes \u2014 ${breakingRows[breakingCursor]?.componentName ?? "unknown component"}`,
@@ -26995,7 +27182,7 @@ function GenerateReviewStepView({
26995
27182
  width: sidebarWidth,
26996
27183
  footerHint: "[\u2191/\u2193] move \xB7 [Enter] jump \xB7 [D] detail \xB7 [Esc] close"
26997
27184
  }
26998
- ) : /* @__PURE__ */ jsx46(
27185
+ ) : /* @__PURE__ */ jsx47(
26999
27186
  GroupedSidebar,
27000
27187
  {
27001
27188
  items: groupedItems,
@@ -27035,7 +27222,7 @@ function GenerateReviewStepView({
27035
27222
  graph: sidebarGraph
27036
27223
  }
27037
27224
  ),
27038
- selected ? /* @__PURE__ */ jsx46(
27225
+ selected ? /* @__PURE__ */ jsx47(
27039
27226
  ReviewComponentPanel,
27040
27227
  {
27041
27228
  selectedKey: selected.key,
@@ -27067,12 +27254,12 @@ function GenerateReviewStepView({
27067
27254
  livePreview: livePreviewHook,
27068
27255
  livePreviewSpinner
27069
27256
  }
27070
- ) : /* @__PURE__ */ jsx46(ReviewNoSelection, {})
27257
+ ) : /* @__PURE__ */ jsx47(ReviewNoSelection, {})
27071
27258
  ] }),
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` }),
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` }),
27074
27261
  cycleRows.slice(0, 3).map((cycle, idx) => {
27075
- return /* @__PURE__ */ jsx46(
27262
+ return /* @__PURE__ */ jsx47(
27076
27263
  CyclePathLine,
27077
27264
  {
27078
27265
  segments: formatCyclePathSegments(cycle),
@@ -27083,10 +27270,10 @@ function GenerateReviewStepView({
27083
27270
  `cyc-banner-${idx}`
27084
27271
  );
27085
27272
  }),
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" })
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" })
27088
27275
  ] }),
27089
- /* @__PURE__ */ jsx46(
27276
+ /* @__PURE__ */ jsx47(
27090
27277
  SearchMatchSummary,
27091
27278
  {
27092
27279
  open: searchOpen,
@@ -27097,7 +27284,7 @@ function GenerateReviewStepView({
27097
27284
  hidden: dialogOpen
27098
27285
  }
27099
27286
  ),
27100
- !dialogOpen && sidebarFocused && /* @__PURE__ */ jsx46(CompactControlBar, { hasGroupRoots, searchActive: searchOpen || searchQuery.length > 0 })
27287
+ !dialogOpen && sidebarFocused && /* @__PURE__ */ jsx47(CompactControlBar, { hasGroupRoots, searchActive: searchOpen || searchQuery.length > 0 })
27101
27288
  ] });
27102
27289
  }
27103
27290
  var HELP_SECTIONS2;
@@ -27486,8 +27673,8 @@ __export(WizardApp_exports, {
27486
27673
  parsePrintTokensCount: () => parsePrintTokensCount,
27487
27674
  shouldRunMapTokens: () => shouldRunMapTokens
27488
27675
  });
27489
- import { useEffect as useEffect14, useRef as useRef9, useState as useState19 } from "react";
27490
- import { Box as Box38, Text as Text42 } from "ink";
27676
+ import { useEffect as useEffect14, useRef as useRef10, useState as useState20 } from "react";
27677
+ import { Box as Box39, Text as Text43 } from "ink";
27491
27678
  import { join as join20, resolve as resolve18 } from "node:path";
27492
27679
  import { appendFileSync as appendFileSync2, writeFileSync } from "node:fs";
27493
27680
  import { access as access7, stat as stat5, writeFile as writeFile5 } from "node:fs/promises";
@@ -27495,7 +27682,7 @@ import { tmpdir } from "node:os";
27495
27682
  import { execFile as execFile2, spawn as spawn5 } from "node:child_process";
27496
27683
  import { mkdir as mkdir4 } from "node:fs/promises";
27497
27684
  import { buildCDF as buildCDF3, validateCDF as validateCDF3, validateSlotReferences as validateSlotReferences2 } from "@contentful/experience-design-system-types";
27498
- import { jsx as jsx47, jsxs as jsxs39 } from "react/jsx-runtime";
27685
+ import { jsx as jsx48, jsxs as jsxs40 } from "react/jsx-runtime";
27499
27686
  function buildGenerateComponentsArgs(opts) {
27500
27687
  const args = ["__generate", "components", "--agent", opts.agent, "--session", opts.sessionId];
27501
27688
  if (opts.tokensPath) args.push("--tokens", opts.tokensPath);
@@ -27623,36 +27810,41 @@ function WizardApp({
27623
27810
  } = {}) {
27624
27811
  const defaultConfiguredHost = toConfiguredHost(host || process.env["EDS_HOST"]) ?? DEFAULT_CONFIGURED_HOST;
27625
27812
  const resolveWizardHost = (hostValue) => hostValue || defaultConfiguredHost;
27813
+ const credentialKey = (spaceId, environmentId, cmaToken, hostValue) => [spaceId.trim(), environmentId.trim(), cmaToken.trim(), resolveWizardHost(hostValue)].join("\0");
27626
27814
  const { columns: terminalWidth } = useTerminalSize();
27627
27815
  const clearScreenOnTransition = useScreenTransitionClear();
27628
- const logInit = useRef9(false);
27629
- const initialAgentAuthRef = useRef9(initialAgentAuth ?? null);
27816
+ const logInit = useRef10(false);
27817
+ const initialAgentAuthRef = useRef10(initialAgentAuth ?? null);
27630
27818
  if (!logInit.current) {
27631
27819
  writeFileSync(WIZARD_LOG, `--- experiences import session ${(/* @__PURE__ */ new Date()).toISOString()} ---
27632
27820
  `);
27633
27821
  logInit.current = true;
27634
27822
  }
27635
- const sessionRef = useRef9({
27823
+ const sessionRef = useRef10({
27636
27824
  extractSessionId: null,
27637
27825
  tokensPath: ""
27638
27826
  });
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);
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);
27651
27843
  const rawTokensEntryReady = !!initialRawTokensPath;
27652
27844
  const effectiveNoCache = resolveNoCacheForGenerate({ cliNoCache: noCache });
27653
27845
  const initialStepResolved = "credentials";
27654
27846
  const initialOutDir = initialProjectPath ? join20(resolve18(initialProjectPath), ".contentful") : "";
27655
- const [state, setState] = useState19({
27847
+ const [state, setState] = useState20({
27656
27848
  step: initialStepResolved,
27657
27849
  agent: initialAgent ?? "claude",
27658
27850
  ...initialModel ? { agentModel: initialModel } : {},
@@ -27699,6 +27891,8 @@ function WizardApp({
27699
27891
  previewValidationMissingNames: [],
27700
27892
  credentialsValidating: false,
27701
27893
  credentialsBackgroundValidating: false,
27894
+ generatePrefetchStatus: "idle",
27895
+ generatePrefetchError: null,
27702
27896
  mapTokensEligible: null,
27703
27897
  credentialsSkipped: false,
27704
27898
  existingEntitiesPath: null,
@@ -28190,6 +28384,23 @@ Make sure this path contains TypeScript/React/Vue component files (.tsx, .ts, .v
28190
28384
  extractPromiseRef.current = null;
28191
28385
  });
28192
28386
  };
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
+ };
28193
28404
  const buildGenerateOptions = (extractSessionId, tokensPath, generatePromptPath2, cachedComponents) => ({
28194
28405
  sessionId: extractSessionId,
28195
28406
  tokensPath,
@@ -28320,6 +28531,60 @@ Make sure this path contains TypeScript/React/Vue component files (.tsx, .ts, .v
28320
28531
  state.existingEntitiesStatus,
28321
28532
  state.existingEntitiesPath
28322
28533
  ]);
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
+ };
28323
28588
  const runGenerate = async (extractSessionId, tokensPath, acceptedCount, suppressScreen = false, cachedComponents = []) => {
28324
28589
  const timer = startWizardTimer("component-generation", {
28325
28590
  sessionId: extractSessionId,
@@ -28428,7 +28693,136 @@ Make sure this path contains TypeScript/React/Vue component files (.tsx, .ts, .v
28428
28693
  const { extractSessionId: sid, tokensPath: tp } = sessionRef.current;
28429
28694
  void runPreview(sid, tp, state.spaceId, state.environmentId, state.cmaToken, state.host);
28430
28695
  };
28431
- const advanceAfterCredentialsValidated = async () => {
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;
28432
28826
  credentialsReadyRef.current = true;
28433
28827
  if (!sessionRef.current.extractSessionId && state.projectPath) {
28434
28828
  if (extractPromiseRef.current) update({ step: "extracting" });
@@ -28577,13 +28971,7 @@ Make sure this path contains TypeScript/React/Vue component files (.tsx, .ts, .v
28577
28971
  });
28578
28972
  return;
28579
28973
  }
28580
- update({
28581
- step: "error",
28582
- errorStep: "apply preview",
28583
- errorMessage: `${e.message}
28584
-
28585
- Re-run the import and enter credentials again.`
28586
- });
28974
+ update({ step: "credentials", credentialsError: e.message });
28587
28975
  return;
28588
28976
  }
28589
28977
  if (e.status === 404) {
@@ -28855,7 +29243,7 @@ If using a custom host configuration, make sure the space exists on that host.`
28855
29243
  const runSaveAndPush = async (statePatch = {}) => {
28856
29244
  await startSaveFlow({ skipGate: true, andPush: true }, statePatch);
28857
29245
  };
28858
- const pendingSaveOptionsRef = useRef9({});
29246
+ const pendingSaveOptionsRef = useRef10({});
28859
29247
  const startSaveFlow = async (opts = {}, statePatch = {}) => {
28860
29248
  pendingSaveOptionsRef.current = opts;
28861
29249
  update({ ...statePatch, step: "path-prompt" });
@@ -28918,8 +29306,7 @@ If using a custom host configuration, make sure the space exists on that host.`
28918
29306
  void runPreview(extractSessionId, tokensPath, state.spaceId, state.environmentId, state.cmaToken, state.host);
28919
29307
  }
28920
29308
  };
28921
- const tokenReuseChecked = useRef9(false);
28922
- const [tokenReuseSettled, setTokenReuseSettled] = useState19(!state.rawTokensPath);
29309
+ const tokenReuseChecked = useRef10(false);
28923
29310
  useEffect14(() => {
28924
29311
  if (state.rawTokensPath) {
28925
29312
  if (tokenReuseChecked.current) return;
@@ -28929,7 +29316,6 @@ If using a custom host configuration, make sure the space exists on that host.`
28929
29316
  tokenGenerationPromiseRef.current = runAgentAuthCheck("credentials").then(
28930
29317
  (ok2) => ok2 ? runGenerateTokens(state.rawTokensPath, state.outDir) : false
28931
29318
  );
28932
- setTokenReuseSettled(true);
28933
29319
  return;
28934
29320
  }
28935
29321
  (async () => {
@@ -28949,18 +29335,10 @@ If using a custom host configuration, make sure the space exists on that host.`
28949
29335
  tokenGenerationPromiseRef.current = runAgentAuthCheck("credentials").then(
28950
29336
  (ok2) => ok2 ? runGenerateTokens(state.rawTokensPath, state.outDir) : false
28951
29337
  );
28952
- setTokenReuseSettled(true);
28953
29338
  }
28954
29339
  })();
28955
29340
  }
28956
29341
  }, [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]);
28964
29342
  const noQuitSteps = [
28965
29343
  "checking-claude-auth",
28966
29344
  "validating-credentials",
@@ -28979,7 +29357,7 @@ If using a custom host configuration, make sure the space exists on that host.`
28979
29357
  const stepContent = (() => {
28980
29358
  switch (state.step) {
28981
29359
  case "token-reuse-gate":
28982
- return /* @__PURE__ */ jsx47(
29360
+ return /* @__PURE__ */ jsx48(
28983
29361
  GateStep,
28984
29362
  {
28985
29363
  successMessage: "Existing tokens.json found",
@@ -28992,17 +29370,13 @@ Tokens Path: ${state.tokensPath}`,
28992
29370
  continueLabel: "Reuse existing tokens",
28993
29371
  skipLabel: "Regenerate tokens",
28994
29372
  showSkip: true,
28995
- onContinue: () => {
28996
- setTokenReuseSettled(true);
28997
- update({
28998
- step: "credentials",
28999
- tokenSessionId: null,
29000
- tokenGenerationStatus: "complete"
29001
- });
29002
- },
29373
+ onContinue: () => update({
29374
+ step: "credentials",
29375
+ tokenSessionId: null,
29376
+ tokenGenerationStatus: "complete"
29377
+ }),
29003
29378
  onSkip: async () => {
29004
29379
  update({ tokenSourceChanged: null });
29005
- setTokenReuseSettled(true);
29006
29380
  update({ step: "credentials" });
29007
29381
  if (await runAgentAuthCheck("credentials")) {
29008
29382
  tokenGenerationPromiseRef.current = runGenerateTokens(state.rawTokensPath, state.outDir, true);
@@ -29012,7 +29386,7 @@ Tokens Path: ${state.tokensPath}`,
29012
29386
  }
29013
29387
  );
29014
29388
  case "checking-claude-auth":
29015
- return /* @__PURE__ */ jsx47(
29389
+ return /* @__PURE__ */ jsx48(
29016
29390
  RunningStep,
29017
29391
  {
29018
29392
  stepNumber: state.authCheckStepNumber,
@@ -29039,7 +29413,7 @@ Tokens Path: ${state.tokensPath}`,
29039
29413
  }
29040
29414
  const selectionDetail = state.selectionAgentStatus === "complete" ? "Selection agent complete" : `Filtering component selection via ${state.agent}...`;
29041
29415
  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}...`;
29042
- return /* @__PURE__ */ jsx47(
29416
+ return /* @__PURE__ */ jsx48(
29043
29417
  RunningStep,
29044
29418
  {
29045
29419
  stepNumber: hasTokenStage ? 2 : 1,
@@ -29061,7 +29435,7 @@ Tokens Path: ${state.tokensPath}`,
29061
29435
  }
29062
29436
  case "scope-gate": {
29063
29437
  if (!state.extractSessionId) {
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." }) });
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." }) });
29065
29439
  }
29066
29440
  const sessionId2 = state.extractSessionId;
29067
29441
  const db = openPipelineDb();
@@ -29077,7 +29451,7 @@ Tokens Path: ${state.tokensPath}`,
29077
29451
  }
29078
29452
  const rememberedForSession = scopeComponentsRef.current?.sessionId === sessionId2 ? scopeComponentsRef.current.components : null;
29079
29453
  const components = scopeGateCompletedRef.current && rememberedForSession ? rememberedForSession : loadedComponents.length > 0 ? loadedComponents : rememberedForSession ?? [];
29080
- return /* @__PURE__ */ jsx47(
29454
+ return /* @__PURE__ */ jsx48(
29081
29455
  ScopeGateStep,
29082
29456
  {
29083
29457
  components,
@@ -29173,7 +29547,7 @@ Tokens Path: ${state.tokensPath}`,
29173
29547
  const displayAgent = state.agent.charAt(0).toUpperCase() + state.agent.slice(1);
29174
29548
  const progressDetail = p ? `${p.current}` : `Starting up ${displayAgent}...`;
29175
29549
  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;
29176
- return /* @__PURE__ */ jsx47(
29550
+ return /* @__PURE__ */ jsx48(
29177
29551
  RunningStep,
29178
29552
  {
29179
29553
  stepNumber: stepNum,
@@ -29190,7 +29564,7 @@ ${displayAgent} is mapping your selected components to Contentful's Component De
29190
29564
  }
29191
29565
  case "mapping-tokens": {
29192
29566
  const stepNum = hasTokenStage ? 5 : 4;
29193
- return /* @__PURE__ */ jsx47(
29567
+ return /* @__PURE__ */ jsx48(
29194
29568
  RunningStep,
29195
29569
  {
29196
29570
  stepNumber: stepNum,
@@ -29202,7 +29576,7 @@ ${displayAgent} is mapping your selected components to Contentful's Component De
29202
29576
  );
29203
29577
  }
29204
29578
  case "final-review": {
29205
- return /* @__PURE__ */ jsx47(
29579
+ return /* @__PURE__ */ jsx48(
29206
29580
  GenerateReviewStep,
29207
29581
  {
29208
29582
  extractSessionId: state.extractSessionId,
@@ -29260,17 +29634,42 @@ ${displayAgent} is mapping your selected components to Contentful's Component De
29260
29634
  );
29261
29635
  }
29262
29636
  case "credentials":
29263
- return /* @__PURE__ */ jsx47(
29264
- RunningStep,
29637
+ return /* @__PURE__ */ jsx48(
29638
+ CredentialsStep,
29265
29639
  {
29266
- stepNumber: 1,
29267
- totalSteps,
29268
- title: "Starting import",
29269
- description: "Using the credentials you just confirmed..."
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
+ }
29270
29669
  }
29271
29670
  );
29272
29671
  case "previewing":
29273
- return /* @__PURE__ */ jsx47(
29672
+ return /* @__PURE__ */ jsx48(
29274
29673
  RunningStep,
29275
29674
  {
29276
29675
  stepNumber: totalSteps,
@@ -29281,7 +29680,7 @@ ${displayAgent} is mapping your selected components to Contentful's Component De
29281
29680
  );
29282
29681
  case "preview-gate": {
29283
29682
  const editableComponentCount = extractComponents(state.cdf).length;
29284
- return /* @__PURE__ */ jsx47(
29683
+ return /* @__PURE__ */ jsx48(
29285
29684
  WizardPreviewStep,
29286
29685
  {
29287
29686
  preview: state.serverPreview,
@@ -29306,9 +29705,9 @@ ${displayAgent} is mapping your selected components to Contentful's Component De
29306
29705
  );
29307
29706
  }
29308
29707
  case "pushing":
29309
- return /* @__PURE__ */ jsx47(PushingStep, { stepNumber: totalSteps, totalSteps, progress: state.pushProgress });
29708
+ return /* @__PURE__ */ jsx48(PushingStep, { stepNumber: totalSteps, totalSteps, progress: state.pushProgress });
29310
29709
  case "path-prompt":
29311
- return /* @__PURE__ */ jsx47(
29710
+ return /* @__PURE__ */ jsx48(
29312
29711
  PathPrompt,
29313
29712
  {
29314
29713
  defaultPath: state.outDir,
@@ -29329,7 +29728,7 @@ ${displayAgent} is mapping your selected components to Contentful's Component De
29329
29728
  }
29330
29729
  );
29331
29730
  case "printing":
29332
- return /* @__PURE__ */ jsx47(
29731
+ return /* @__PURE__ */ jsx48(
29333
29732
  RunningStep,
29334
29733
  {
29335
29734
  stepNumber: totalSteps,
@@ -29340,7 +29739,7 @@ ${displayAgent} is mapping your selected components to Contentful's Component De
29340
29739
  );
29341
29740
  case "print-gate": {
29342
29741
  const teaser = buildRunTeaserLine(state.lastRunId);
29343
- return /* @__PURE__ */ jsx47(
29742
+ return /* @__PURE__ */ jsx48(
29344
29743
  GateStep,
29345
29744
  {
29346
29745
  successMessage: "Files saved",
@@ -29357,7 +29756,7 @@ ${displayAgent} is mapping your selected components to Contentful's Component De
29357
29756
  }
29358
29757
  case "done": {
29359
29758
  const totalFailed = state.pushResult.componentTypes.failed + state.pushResult.designTokens.failed;
29360
- return /* @__PURE__ */ jsx47(
29759
+ return /* @__PURE__ */ jsx48(
29361
29760
  DoneStep,
29362
29761
  {
29363
29762
  componentTypes: state.pushResult.componentTypes,
@@ -29372,7 +29771,7 @@ ${displayAgent} is mapping your selected components to Contentful's Component De
29372
29771
  );
29373
29772
  }
29374
29773
  case "preview-validation-error": {
29375
- return /* @__PURE__ */ jsx47(
29774
+ return /* @__PURE__ */ jsx48(
29376
29775
  PreviewValidationErrorStep,
29377
29776
  {
29378
29777
  errors: state.previewValidationErrors,
@@ -29388,12 +29787,13 @@ ${displayAgent} is mapping your selected components to Contentful's Component De
29388
29787
  );
29389
29788
  }
29390
29789
  case "error":
29391
- return /* @__PURE__ */ jsx47(
29790
+ return /* @__PURE__ */ jsx48(
29392
29791
  ErrorStep,
29393
29792
  {
29394
29793
  stepName: state.errorStep,
29395
29794
  message: state.errorMessage,
29396
29795
  onExit: () => process.exit(1),
29796
+ onRetryCredentials: state.errorAllowCredentialRetry ? () => update({ step: "credentials", credentialsError: "" }) : void 0,
29397
29797
  onAcknowledgeBreakingChanges: state.errorAllowBreakingChangeAcknowledgment && state.cdf ? () => void runPush(
29398
29798
  state.cdf,
29399
29799
  state.spaceId,
@@ -29409,9 +29809,9 @@ ${displayAgent} is mapping your selected components to Contentful's Component De
29409
29809
  return null;
29410
29810
  }
29411
29811
  })();
29412
- return /* @__PURE__ */ jsxs39(Box38, { flexDirection: "column", width: terminalWidth, children: [
29413
- /* @__PURE__ */ jsx47(TopBar, { subcommand: "import", hints }),
29414
- /* @__PURE__ */ jsx47(CustomPromptBanner, { generatePromptPath }),
29812
+ return /* @__PURE__ */ jsxs40(Box39, { flexDirection: "column", width: terminalWidth, children: [
29813
+ /* @__PURE__ */ jsx48(TopBar, { subcommand: "import", hints }),
29814
+ /* @__PURE__ */ jsx48(CustomPromptBanner, { generatePromptPath }),
29415
29815
  stepContent
29416
29816
  ] });
29417
29817
  }
@@ -29422,6 +29822,7 @@ var init_WizardApp = __esm({
29422
29822
  init_theme();
29423
29823
  init_run_teaser();
29424
29824
  init_debug_logger();
29825
+ init_credentials_store();
29425
29826
  init_path_prompt();
29426
29827
  init_save_path_resolver();
29427
29828
  init_store();
@@ -29430,6 +29831,7 @@ var init_WizardApp = __esm({
29430
29831
  init_CustomPromptBanner();
29431
29832
  init_RunningStep();
29432
29833
  init_GateStep();
29834
+ init_CredentialsStep();
29433
29835
  init_WizardPreviewStep();
29434
29836
  init_DoneStep();
29435
29837
  init_ErrorStep();
@@ -29935,9 +30337,9 @@ var init_command7 = __esm({
29935
30337
  });
29936
30338
 
29937
30339
  // packages/experience-design-system-cli-legacy/src/setup/SetupStepper.tsx
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";
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";
29941
30343
  function stepLabel(step, title, state, wide) {
29942
30344
  if (state === "complete") return wide ? `\u2713 ${title}` : "\u2713";
29943
30345
  if (state === "active") return wide ? `[${step} ${title}]` : `[${step}]`;
@@ -29950,12 +30352,12 @@ function stepColor(state) {
29950
30352
  }
29951
30353
  function SetupStepper({ activeStep, columns }) {
29952
30354
  const wide = columns !== void 0 && columns >= WIDE_MIN_COLUMNS;
29953
- return /* @__PURE__ */ jsx48(Box39, { columnGap: wide ? 0 : COMPACT_GAP, children: SETUP_SCREENS.map((title, index) => {
30355
+ return /* @__PURE__ */ jsx49(Box40, { columnGap: wide ? 0 : COMPACT_GAP, children: SETUP_SCREENS.map((title, index) => {
29954
30356
  const step = index + 1;
29955
30357
  const state = step < activeStep ? "complete" : step === activeStep ? "active" : "pending";
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) })
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) })
29959
30361
  ] }, step);
29960
30362
  }) });
29961
30363
  }
@@ -29974,33 +30376,33 @@ var init_SetupStepper = __esm({
29974
30376
  });
29975
30377
 
29976
30378
  // packages/experience-design-system-cli-legacy/src/setup/steps/StepLayout.tsx
29977
- import { Box as Box40, Text as Text44 } from "ink";
29978
- import { jsx as jsx49, jsxs as jsxs41 } from "react/jsx-runtime";
30379
+ import { Box as Box41, Text as Text45 } from "ink";
30380
+ import { jsx as jsx50, jsxs as jsxs42 } from "react/jsx-runtime";
29979
30381
  function StepLayout({ helpText, children, prompt }) {
29980
- return /* @__PURE__ */ jsxs41(Box40, { flexDirection: "column", children: [
30382
+ return /* @__PURE__ */ jsxs42(Box41, { flexDirection: "column", children: [
29981
30383
  children,
29982
- prompt && /* @__PURE__ */ jsx49(Box40, { marginTop: 1, children: prompt }),
29983
- helpText && /* @__PURE__ */ jsx49(Box40, { marginTop: 1, children: /* @__PURE__ */ jsx49(Text44, { dimColor: true, children: helpText }) })
30384
+ prompt && /* @__PURE__ */ jsx50(Box41, { marginTop: 1, children: prompt }),
30385
+ helpText && /* @__PURE__ */ jsx50(Box41, { marginTop: 1, children: /* @__PURE__ */ jsx50(Text45, { dimColor: true, children: helpText }) })
29984
30386
  ] });
29985
30387
  }
29986
30388
  function StepSuccess({ children }) {
29987
- return /* @__PURE__ */ jsxs41(Text44, { color: PALETTE.success, children: [
30389
+ return /* @__PURE__ */ jsxs42(Text45, { color: PALETTE.success, children: [
29988
30390
  "\u2713 ",
29989
30391
  children
29990
30392
  ] });
29991
30393
  }
29992
30394
  function StepWarning({ children }) {
29993
- return /* @__PURE__ */ jsxs41(Text44, { color: PALETTE.warning, children: [
30395
+ return /* @__PURE__ */ jsxs42(Text45, { color: PALETTE.warning, children: [
29994
30396
  "\u26A0 ",
29995
30397
  children
29996
30398
  ] });
29997
30399
  }
29998
30400
  function StepValue({ label, value }) {
29999
30401
  const color = value ? void 0 : PALETTE.warning;
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)" })
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)" })
30004
30406
  ] });
30005
30407
  }
30006
30408
  var init_StepLayout = __esm({
@@ -30011,10 +30413,10 @@ var init_StepLayout = __esm({
30011
30413
  });
30012
30414
 
30013
30415
  // packages/experience-design-system-cli-legacy/src/setup/steps/CodingAgentScreen.tsx
30014
- import { useEffect as useEffect15, useRef as useRef10, useState as useState20 } from "react";
30015
- import { Box as Box41, Text as Text45 } from "ink";
30416
+ import { useEffect as useEffect15, useRef as useRef11, useState as useState21 } from "react";
30417
+ import { Box as Box42, Text as Text46 } from "ink";
30016
30418
  import { Select, TextInput } from "@inkjs/ui";
30017
- import { jsx as jsx50, jsxs as jsxs42 } from "react/jsx-runtime";
30419
+ import { jsx as jsx51, jsxs as jsxs43 } from "react/jsx-runtime";
30018
30420
  async function detectAgents(exists = binaryExists) {
30019
30421
  const found = await Promise.all(AGENT_DEFS.map(async (agent) => await exists(agent.binary) ? agent : void 0));
30020
30422
  return found.filter((agent) => agent !== void 0);
@@ -30024,9 +30426,9 @@ function needsCodexModel(agent, env) {
30024
30426
  }
30025
30427
  function CodingAgentScreen({ onDone, deps }) {
30026
30428
  const { binaryExists: exists, run, env } = deps ?? { binaryExists, run: runSpawn, env: process.env };
30027
- const [phase, setPhase] = useState20({ kind: "detecting" });
30028
- const [notes, setNotes] = useState20([]);
30029
- const startedRef = useRef10(false);
30429
+ const [phase, setPhase] = useState21({ kind: "detecting" });
30430
+ const [notes, setNotes] = useState21([]);
30431
+ const startedRef = useRef11(false);
30030
30432
  const save = async (agent, agentModel) => {
30031
30433
  const stored = await readExperiencesCredentials();
30032
30434
  const { agentModel: _stale, ...rest } = stored;
@@ -30047,7 +30449,7 @@ function CodingAgentScreen({ onDone, deps }) {
30047
30449
  const found = await detectAgents(exists);
30048
30450
  if (found.length === 1) {
30049
30451
  const only = found[0];
30050
- setNotes([/* @__PURE__ */ jsx50(StepSuccess, { children: `${only.name} (${only.binary}) found` }, "found")]);
30452
+ setNotes([/* @__PURE__ */ jsx51(StepSuccess, { children: `${only.name} (${only.binary}) found` }, "found")]);
30051
30453
  afterSelection(only);
30052
30454
  return;
30053
30455
  }
@@ -30055,7 +30457,7 @@ function CodingAgentScreen({ onDone, deps }) {
30055
30457
  setPhase({ kind: "choose", found });
30056
30458
  return;
30057
30459
  }
30058
- setNotes([/* @__PURE__ */ jsx50(StepWarning, { children: "No coding agent found on PATH" }, "none")]);
30460
+ setNotes([/* @__PURE__ */ jsx51(StepWarning, { children: "No coding agent found on PATH" }, "none")]);
30059
30461
  setPhase({ kind: "install-choice" });
30060
30462
  })();
30061
30463
  }, []);
@@ -30067,12 +30469,12 @@ function CodingAgentScreen({ onDone, deps }) {
30067
30469
  onDone("failed");
30068
30470
  return;
30069
30471
  }
30070
- setNotes((current) => [...current, /* @__PURE__ */ jsx50(StepSuccess, { children: `${agent.name} installed` }, "installed")]);
30472
+ setNotes((current) => [...current, /* @__PURE__ */ jsx51(StepSuccess, { children: `${agent.name} installed` }, "installed")]);
30071
30473
  afterSelection(agent);
30072
30474
  };
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(
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(
30076
30478
  Select,
30077
30479
  {
30078
30480
  options: [
@@ -30084,7 +30486,7 @@ function CodingAgentScreen({ onDone, deps }) {
30084
30486
  ) })
30085
30487
  ] });
30086
30488
  if (phase.kind === "choose") {
30087
- return /* @__PURE__ */ jsx50(
30489
+ return /* @__PURE__ */ jsx51(
30088
30490
  StepLayout,
30089
30491
  {
30090
30492
  helpText: AGENT_HELP,
@@ -30099,7 +30501,7 @@ function CodingAgentScreen({ onDone, deps }) {
30099
30501
  );
30100
30502
  }
30101
30503
  if (phase.kind === "install-choice") {
30102
- return /* @__PURE__ */ jsx50(
30504
+ return /* @__PURE__ */ jsx51(
30103
30505
  StepLayout,
30104
30506
  {
30105
30507
  helpText: AGENT_HELP,
@@ -30114,13 +30516,13 @@ function CodingAgentScreen({ onDone, deps }) {
30114
30516
  );
30115
30517
  }
30116
30518
  if (phase.kind === "model") {
30117
- return /* @__PURE__ */ jsx50(
30519
+ return /* @__PURE__ */ jsx51(
30118
30520
  StepLayout,
30119
30521
  {
30120
30522
  helpText: AGENT_HELP,
30121
- prompt: /* @__PURE__ */ jsxs42(Box41, { children: [
30122
- /* @__PURE__ */ jsx50(Text45, { children: "Model name (optional - press Enter for Codex default): " }),
30123
- /* @__PURE__ */ jsx50(
30523
+ prompt: /* @__PURE__ */ jsxs43(Box42, { children: [
30524
+ /* @__PURE__ */ jsx51(Text46, { children: "Model name (optional - press Enter for Codex default): " }),
30525
+ /* @__PURE__ */ jsx51(
30124
30526
  TextInput,
30125
30527
  {
30126
30528
  onSubmit: (value) => void save(phase.agent.binary, value.trim() || void 0)
@@ -30130,19 +30532,19 @@ function CodingAgentScreen({ onDone, deps }) {
30130
30532
  ] }),
30131
30533
  children: [
30132
30534
  ...notes,
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")
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")
30135
30537
  ]
30136
30538
  }
30137
30539
  );
30138
30540
  }
30139
30541
  if (phase.kind === "installing") {
30140
- return /* @__PURE__ */ jsx50(StepLayout, { helpText: AGENT_HELP, children: [...notes, /* @__PURE__ */ jsx50(Text45, { children: `Installing ${phase.agent.name}\u2026` }, "installing")] });
30542
+ return /* @__PURE__ */ jsx51(StepLayout, { helpText: AGENT_HELP, children: [...notes, /* @__PURE__ */ jsx51(Text46, { children: `Installing ${phase.agent.name}\u2026` }, "installing")] });
30141
30543
  }
30142
30544
  if (phase.kind === "failed") {
30143
- return /* @__PURE__ */ jsx50(StepLayout, { helpText: AGENT_HELP, children: [...notes, /* @__PURE__ */ jsx50(Text45, { children: `\u2717 ${phase.message}` }, "failed")] });
30545
+ return /* @__PURE__ */ jsx51(StepLayout, { helpText: AGENT_HELP, children: [...notes, /* @__PURE__ */ jsx51(Text46, { children: `\u2717 ${phase.message}` }, "failed")] });
30144
30546
  }
30145
- return /* @__PURE__ */ jsx50(Text45, { dimColor: true, children: "Looking for a coding agent\u2026" });
30547
+ return /* @__PURE__ */ jsx51(Text46, { dimColor: true, children: "Looking for a coding agent\u2026" });
30146
30548
  }
30147
30549
  var AGENT_HELP, SKIP_VALUE;
30148
30550
  var init_CodingAgentScreen = __esm({
@@ -30158,10 +30560,10 @@ var init_CodingAgentScreen = __esm({
30158
30560
  });
30159
30561
 
30160
30562
  // packages/experience-design-system-cli-legacy/src/setup/steps/ContentfulCredentialsScreen.tsx
30161
- import { useEffect as useEffect16, useRef as useRef11, useState as useState21 } from "react";
30162
- import { Box as Box42, Text as Text46 } from "ink";
30563
+ import { useEffect as useEffect16, useRef as useRef12, useState as useState22 } from "react";
30564
+ import { Box as Box43, Text as Text47 } from "ink";
30163
30565
  import { PasswordInput, Select as Select2, TextInput as TextInput2 } from "@inkjs/ui";
30164
- import { Fragment as Fragment19, jsx as jsx51, jsxs as jsxs43 } from "react/jsx-runtime";
30566
+ import { Fragment as Fragment20, jsx as jsx52, jsxs as jsxs44 } from "react/jsx-runtime";
30165
30567
  function envShadowingWarning(env) {
30166
30568
  const set = ENV_KEYS.filter((key) => env[key]);
30167
30569
  if (set.length === 0) return null;
@@ -30171,28 +30573,28 @@ function maskToken(token) {
30171
30573
  return `${"\u2022".repeat(Math.min(token.length, 8))}...`;
30172
30574
  }
30173
30575
  function ContentfulCredentialsScreen({ onDone }) {
30174
- const [stored, setStored] = useState21(null);
30175
- const [field, setField] = useState21("confirm");
30176
- const enteredRef = useRef11({});
30177
- const [error, setError] = useState21(null);
30576
+ const [stored, setStored] = useState22(null);
30577
+ const [field, setField] = useState22("confirm");
30578
+ const enteredRef = useRef12({});
30579
+ const [error, setError] = useState22(null);
30178
30580
  useEffect16(() => {
30179
30581
  void readExperiencesCredentials().then(setStored);
30180
30582
  }, []);
30181
- if (!stored) return /* @__PURE__ */ jsx51(Text46, { dimColor: true, children: "Reading saved credentials\u2026" });
30583
+ if (!stored) return /* @__PURE__ */ jsx52(Text47, { dimColor: true, children: "Reading saved credentials\u2026" });
30182
30584
  const currentHost = stored.host ?? DEFAULT_CONFIGURED_HOST;
30183
30585
  const hasAny = Boolean(stored.spaceId || stored.environmentId || stored.cmaToken);
30184
30586
  const allSet = Boolean(stored.spaceId && stored.environmentId && stored.cmaToken);
30185
30587
  const shadowing = envShadowingWarning(process.env);
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 })
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 })
30194
30596
  ] }),
30195
- error && /* @__PURE__ */ jsx51(StepWarning, { children: error })
30597
+ error && /* @__PURE__ */ jsx52(StepWarning, { children: error })
30196
30598
  ] });
30197
30599
  const helpText = `Saved to ${experiencesCredentialsPath()} \u2014 loaded automatically by experiences import.`;
30198
30600
  if (field === "confirm") {
@@ -30200,13 +30602,13 @@ function ContentfulCredentialsScreen({ onDone }) {
30200
30602
  { label: hasAny ? "Update the saved credentials" : "Enter credentials now", value: ENTER },
30201
30603
  { label: allSet ? "Keep them as they are" : "Skip for now", value: KEEP }
30202
30604
  ];
30203
- return /* @__PURE__ */ jsx51(
30605
+ return /* @__PURE__ */ jsx52(
30204
30606
  StepLayout,
30205
30607
  {
30206
30608
  helpText,
30207
- prompt: /* @__PURE__ */ jsxs43(Box42, { flexDirection: "column", children: [
30208
- /* @__PURE__ */ jsx51(Text46, { children: "Contentful credentials" }),
30209
- /* @__PURE__ */ jsx51(Box42, { marginTop: 1, children: /* @__PURE__ */ jsx51(
30609
+ prompt: /* @__PURE__ */ jsxs44(Box43, { flexDirection: "column", children: [
30610
+ /* @__PURE__ */ jsx52(Text47, { children: "Contentful credentials" }),
30611
+ /* @__PURE__ */ jsx52(Box43, { marginTop: 1, children: /* @__PURE__ */ jsx52(
30210
30612
  Select2,
30211
30613
  {
30212
30614
  options: allSet ? [...options].reverse() : options,
@@ -30247,24 +30649,24 @@ function ContentfulCredentialsScreen({ onDone }) {
30247
30649
  onDone("completed");
30248
30650
  };
30249
30651
  const prompts = {
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")
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")
30253
30655
  ] }),
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")
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")
30257
30659
  ] }),
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")
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")
30261
30663
  ] }),
30262
- host: /* @__PURE__ */ jsxs43(Box42, { children: [
30263
- /* @__PURE__ */ jsx51(Text46, { children: `API host [${currentHost}]: ` }),
30264
- /* @__PURE__ */ jsx51(TextInput2, { onSubmit: (v) => advance("host", v) }, "host")
30664
+ host: /* @__PURE__ */ jsxs44(Box43, { children: [
30665
+ /* @__PURE__ */ jsx52(Text47, { children: `API host [${currentHost}]: ` }),
30666
+ /* @__PURE__ */ jsx52(TextInput2, { onSubmit: (v) => advance("host", v) }, "host")
30265
30667
  ] })
30266
30668
  };
30267
- return /* @__PURE__ */ jsx51(StepLayout, { helpText, prompt: prompts[field], children: summary });
30669
+ return /* @__PURE__ */ jsx52(StepLayout, { helpText, prompt: prompts[field], children: summary });
30268
30670
  }
30269
30671
  var ENV_KEYS, ENTER, KEEP, FIELD_ORDER;
30270
30672
  var init_ContentfulCredentialsScreen = __esm({
@@ -30281,10 +30683,10 @@ var init_ContentfulCredentialsScreen = __esm({
30281
30683
  });
30282
30684
 
30283
30685
  // packages/experience-design-system-cli-legacy/src/setup/steps/preferences/BooleanInput.tsx
30284
- import { useEffect as useEffect17, useState as useState22 } from "react";
30285
- import { Box as Box43, Text as Text47 } from "ink";
30686
+ import { useEffect as useEffect17, useState as useState23 } from "react";
30687
+ import { Box as Box44, Text as Text48 } from "ink";
30286
30688
  import { Select as Select3 } from "@inkjs/ui";
30287
- import { jsx as jsx52, jsxs as jsxs44 } from "react/jsx-runtime";
30689
+ import { jsx as jsx53, jsxs as jsxs45 } from "react/jsx-runtime";
30288
30690
  function tick(labels, forOn, current) {
30289
30691
  const label = forOn ? labels.on : labels.off;
30290
30692
  return forOn === current ? `${label} \u2713` : label;
@@ -30298,11 +30700,11 @@ function BooleanInput({
30298
30700
  fallback,
30299
30701
  onDone
30300
30702
  }) {
30301
- const [stored, setStored] = useState22(null);
30703
+ const [stored, setStored] = useState23(null);
30302
30704
  useEffect17(() => {
30303
30705
  void readExperiencesCredentials().then(setStored);
30304
30706
  }, []);
30305
- if (!stored) return /* @__PURE__ */ jsx52(Text47, { dimColor: true, children: "Reading saved preferences\u2026" });
30707
+ if (!stored) return /* @__PURE__ */ jsx53(Text48, { dimColor: true, children: "Reading saved preferences\u2026" });
30306
30708
  const current = read(stored) ?? fallback;
30307
30709
  const submit = (value) => {
30308
30710
  if (value === current) {
@@ -30311,13 +30713,13 @@ function BooleanInput({
30311
30713
  }
30312
30714
  void writeExperiencesCredentials(write2(stored, value)).then(() => onDone("completed"));
30313
30715
  };
30314
- return /* @__PURE__ */ jsx52(
30716
+ return /* @__PURE__ */ jsx53(
30315
30717
  StepLayout,
30316
30718
  {
30317
30719
  helpText,
30318
- prompt: /* @__PURE__ */ jsxs44(Box43, { flexDirection: "column", children: [
30319
- /* @__PURE__ */ jsx52(Text47, { children: question }),
30320
- /* @__PURE__ */ jsx52(Box43, { marginTop: 1, children: /* @__PURE__ */ jsx52(
30720
+ prompt: /* @__PURE__ */ jsxs45(Box44, { flexDirection: "column", children: [
30721
+ /* @__PURE__ */ jsx53(Text48, { children: question }),
30722
+ /* @__PURE__ */ jsx53(Box44, { marginTop: 1, children: /* @__PURE__ */ jsx53(
30321
30723
  Select3,
30322
30724
  {
30323
30725
  options: [
@@ -30342,9 +30744,9 @@ var init_BooleanInput = __esm({
30342
30744
  });
30343
30745
 
30344
30746
  // packages/experience-design-system-cli-legacy/src/setup/steps/preferences/AnalyticsScreen.tsx
30345
- import { jsx as jsx53 } from "react/jsx-runtime";
30747
+ import { jsx as jsx54 } from "react/jsx-runtime";
30346
30748
  function AnalyticsScreen({ onDone }) {
30347
- return /* @__PURE__ */ jsx53(
30749
+ return /* @__PURE__ */ jsx54(
30348
30750
  BooleanInput,
30349
30751
  {
30350
30752
  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",
@@ -30365,9 +30767,9 @@ var init_AnalyticsScreen = __esm({
30365
30767
  });
30366
30768
 
30367
30769
  // packages/experience-design-system-cli-legacy/src/setup/steps/preferences/ColorPreferenceScreen.tsx
30368
- import { jsx as jsx54 } from "react/jsx-runtime";
30770
+ import { jsx as jsx55 } from "react/jsx-runtime";
30369
30771
  function ColorPreferenceScreen({ onDone }) {
30370
- return /* @__PURE__ */ jsx54(
30772
+ return /* @__PURE__ */ jsx55(
30371
30773
  BooleanInput,
30372
30774
  {
30373
30775
  helpText: `Prints plain text with no color, which suits CI logs and basic terminals.`,
@@ -30388,10 +30790,10 @@ var init_ColorPreferenceScreen = __esm({
30388
30790
  });
30389
30791
 
30390
30792
  // packages/experience-design-system-cli-legacy/src/setup/steps/preferences/CustomPromptScreen.tsx
30391
- import { useEffect as useEffect18, useState as useState23 } from "react";
30392
- import { Box as Box44, Text as Text48 } from "ink";
30793
+ import { useEffect as useEffect18, useState as useState24 } from "react";
30794
+ import { Box as Box45, Text as Text49 } from "ink";
30393
30795
  import { ConfirmInput, TextInput as TextInput3 } from "@inkjs/ui";
30394
- import { jsx as jsx55, jsxs as jsxs45 } from "react/jsx-runtime";
30796
+ import { jsx as jsx56, jsxs as jsxs46 } from "react/jsx-runtime";
30395
30797
  function parseCustomSkillPath(answer) {
30396
30798
  const trimmed = answer.trim();
30397
30799
  if (trimmed === "") return void 0;
@@ -30408,24 +30810,24 @@ function applyCustomSkillPath(credentials, parsed) {
30408
30810
  return next;
30409
30811
  }
30410
30812
  function CustomPromptsScreen({ onDone }) {
30411
- const [stored, setStored] = useState23(null);
30412
- const [phase, setPhase] = useState23("confirm");
30813
+ const [stored, setStored] = useState24(null);
30814
+ const [phase, setPhase] = useState24("confirm");
30413
30815
  useEffect18(() => {
30414
30816
  void readExperiencesCredentials().then(setStored);
30415
30817
  }, []);
30416
- if (!stored) return /* @__PURE__ */ jsx55(Text48, { dimColor: true, children: "Reading saved prompt paths\u2026" });
30818
+ if (!stored) return /* @__PURE__ */ jsx56(Text49, { dimColor: true, children: "Reading saved prompt paths\u2026" });
30417
30819
  const submit = (answer) => {
30418
30820
  const next = applyCustomSkillPath(stored, parseCustomSkillPath(answer));
30419
30821
  void writeExperiencesCredentials(next).then(() => onDone("completed"));
30420
30822
  };
30421
30823
  if (phase === "confirm") {
30422
- return /* @__PURE__ */ jsx55(
30824
+ return /* @__PURE__ */ jsx56(
30423
30825
  StepLayout,
30424
30826
  {
30425
30827
  helpText: CUSTOM_PROMPTS_HELP,
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(
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(
30429
30831
  ConfirmInput,
30430
30832
  {
30431
30833
  defaultChoice: "cancel",
@@ -30437,13 +30839,13 @@ function CustomPromptsScreen({ onDone }) {
30437
30839
  }
30438
30840
  );
30439
30841
  }
30440
- return /* @__PURE__ */ jsx55(
30842
+ return /* @__PURE__ */ jsx56(
30441
30843
  StepLayout,
30442
30844
  {
30443
30845
  helpText: CUSTOM_PROMPTS_HELP,
30444
- prompt: /* @__PURE__ */ jsxs45(Box44, { children: [
30445
- /* @__PURE__ */ jsx55(Text48, { children: customSkillPathQuestion(stored.generatePromptPath) }),
30446
- /* @__PURE__ */ jsx55(TextInput3, { onSubmit: submit })
30846
+ prompt: /* @__PURE__ */ jsxs46(Box45, { children: [
30847
+ /* @__PURE__ */ jsx56(Text49, { children: customSkillPathQuestion(stored.generatePromptPath) }),
30848
+ /* @__PURE__ */ jsx56(TextInput3, { onSubmit: submit })
30447
30849
  ] })
30448
30850
  }
30449
30851
  );
@@ -30459,9 +30861,9 @@ var init_CustomPromptScreen = __esm({
30459
30861
  });
30460
30862
 
30461
30863
  // packages/experience-design-system-cli-legacy/src/setup/steps/preferences/DebugLogsScreen.tsx
30462
- import { jsx as jsx56 } from "react/jsx-runtime";
30864
+ import { jsx as jsx57 } from "react/jsx-runtime";
30463
30865
  function DebugLogsScreen({ onDone }) {
30464
- return /* @__PURE__ */ jsx56(
30866
+ return /* @__PURE__ */ jsx57(
30465
30867
  BooleanInput,
30466
30868
  {
30467
30869
  helpText: `Writes a verbose trace of every command decision, for troubleshooting.`,
@@ -30482,17 +30884,17 @@ var init_DebugLogsScreen = __esm({
30482
30884
  });
30483
30885
 
30484
30886
  // packages/experience-design-system-cli-legacy/src/setup/steps/preferences/PreferencesMenu.tsx
30485
- import { useState as useState24 } from "react";
30486
- import { Box as Box45, Text as Text49 } from "ink";
30887
+ import { useState as useState25 } from "react";
30888
+ import { Box as Box46, Text as Text50 } from "ink";
30487
30889
  import { Select as Select4 } from "@inkjs/ui";
30488
- import { jsx as jsx57, jsxs as jsxs46 } from "react/jsx-runtime";
30890
+ import { jsx as jsx58, jsxs as jsxs47 } from "react/jsx-runtime";
30489
30891
  function PreferencesMenu({ onDone }) {
30490
- const [open, setOpen] = useState24(null);
30491
- const [changed, setChanged] = useState24(/* @__PURE__ */ new Set());
30892
+ const [open, setOpen] = useState25(null);
30893
+ const [changed, setChanged] = useState25(/* @__PURE__ */ new Set());
30492
30894
  const entry = open === null ? void 0 : PREFERENCE_OPTIONS.find((option) => option.key === open);
30493
- if (!entry) return /* @__PURE__ */ jsx57(PreferenceList, { changed, onOpen: setOpen, onDone });
30895
+ if (!entry) return /* @__PURE__ */ jsx58(PreferenceList, { changed, onOpen: setOpen, onDone });
30494
30896
  const { key, Screen } = entry;
30495
- return /* @__PURE__ */ jsx57(
30897
+ return /* @__PURE__ */ jsx58(
30496
30898
  Screen,
30497
30899
  {
30498
30900
  onDone: (status) => {
@@ -30504,18 +30906,18 @@ function PreferencesMenu({ onDone }) {
30504
30906
  );
30505
30907
  }
30506
30908
  function PreferenceList({ changed, onOpen, onDone }) {
30507
- const [pick, setPick] = useState24(0);
30909
+ const [pick, setPick] = useState25(0);
30508
30910
  const options = [
30509
30911
  ...PREFERENCE_OPTIONS.map((option) => ({ label: option.label, value: option.key })),
30510
30912
  { label: "Done", value: DONE_VALUE }
30511
30913
  ];
30512
- return /* @__PURE__ */ jsx57(
30914
+ return /* @__PURE__ */ jsx58(
30513
30915
  StepLayout,
30514
30916
  {
30515
30917
  helpText: PREFERENCES_MENU_HELP,
30516
- prompt: /* @__PURE__ */ jsxs46(Box45, { flexDirection: "column", children: [
30517
- /* @__PURE__ */ jsx57(Text49, { children: "Preferences" }),
30518
- /* @__PURE__ */ jsx57(Box45, { marginTop: 1, children: /* @__PURE__ */ jsx57(
30918
+ prompt: /* @__PURE__ */ jsxs47(Box46, { flexDirection: "column", children: [
30919
+ /* @__PURE__ */ jsx58(Text50, { children: "Preferences" }),
30920
+ /* @__PURE__ */ jsx58(Box46, { marginTop: 1, children: /* @__PURE__ */ jsx58(
30519
30921
  Select4,
30520
30922
  {
30521
30923
  options,
@@ -30548,22 +30950,22 @@ var init_PreferencesMenu = __esm({
30548
30950
  {
30549
30951
  key: "customPrompts",
30550
30952
  label: "Custom prompts",
30551
- Screen: ({ onDone }) => /* @__PURE__ */ jsx57(CustomPromptsScreen, { onDone })
30953
+ Screen: ({ onDone }) => /* @__PURE__ */ jsx58(CustomPromptsScreen, { onDone })
30552
30954
  },
30553
30955
  {
30554
30956
  key: "debug",
30555
30957
  label: "Debug logging",
30556
- Screen: ({ onDone }) => /* @__PURE__ */ jsx57(DebugLogsScreen, { onDone })
30958
+ Screen: ({ onDone }) => /* @__PURE__ */ jsx58(DebugLogsScreen, { onDone })
30557
30959
  },
30558
30960
  {
30559
30961
  key: "analytics",
30560
30962
  label: "Usage analytics",
30561
- Screen: ({ onDone }) => /* @__PURE__ */ jsx57(AnalyticsScreen, { onDone })
30963
+ Screen: ({ onDone }) => /* @__PURE__ */ jsx58(AnalyticsScreen, { onDone })
30562
30964
  },
30563
30965
  {
30564
30966
  key: "noColor",
30565
30967
  label: "Terminal colors",
30566
- Screen: ({ onDone }) => /* @__PURE__ */ jsx57(ColorPreferenceScreen, { onDone })
30968
+ Screen: ({ onDone }) => /* @__PURE__ */ jsx58(ColorPreferenceScreen, { onDone })
30567
30969
  }
30568
30970
  ];
30569
30971
  DONE_VALUE = "menu:done";
@@ -30778,24 +31180,24 @@ var init_prerequisites = __esm({
30778
31180
  });
30779
31181
 
30780
31182
  // packages/experience-design-system-cli-legacy/src/setup/steps/prerequisites/PrerequisitesScreen.tsx
30781
- import { useEffect as useEffect19, useRef as useRef12, useState as useState25 } from "react";
30782
- import { Box as Box46, Text as Text50 } from "ink";
31183
+ import { useEffect as useEffect19, useRef as useRef13, useState as useState26 } from "react";
31184
+ import { Box as Box47, Text as Text51 } from "ink";
30783
31185
  import { ConfirmInput as ConfirmInput2 } from "@inkjs/ui";
30784
- import { jsx as jsx58, jsxs as jsxs47 } from "react/jsx-runtime";
31186
+ import { jsx as jsx59, jsxs as jsxs48 } from "react/jsx-runtime";
30785
31187
  function EventLine({ event }) {
30786
- if (event.kind === "success") return /* @__PURE__ */ jsxs47(Text50, { color: PALETTE.success, children: [
31188
+ if (event.kind === "success") return /* @__PURE__ */ jsxs48(Text51, { color: PALETTE.success, children: [
30787
31189
  "\u2713 ",
30788
31190
  event.message
30789
31191
  ] });
30790
- if (event.kind === "failure") return /* @__PURE__ */ jsxs47(Text50, { color: PALETTE.error, children: [
31192
+ if (event.kind === "failure") return /* @__PURE__ */ jsxs48(Text51, { color: PALETTE.error, children: [
30791
31193
  "\u2717 ",
30792
31194
  event.message
30793
31195
  ] });
30794
- if (event.kind === "warning") return /* @__PURE__ */ jsxs47(Text50, { color: PALETTE.warning, children: [
31196
+ if (event.kind === "warning") return /* @__PURE__ */ jsxs48(Text51, { color: PALETTE.warning, children: [
30795
31197
  "\u26A0 ",
30796
31198
  event.message
30797
31199
  ] });
30798
- return /* @__PURE__ */ jsx58(Text50, { children: event.message });
31200
+ return /* @__PURE__ */ jsx59(Text51, { children: event.message });
30799
31201
  }
30800
31202
  function PrerequisitesScreen({
30801
31203
  repoRoot,
@@ -30803,9 +31205,9 @@ function PrerequisitesScreen({
30803
31205
  onDone,
30804
31206
  deps
30805
31207
  }) {
30806
- const [events, setEvents] = useState25([]);
30807
- const [confirm, setConfirm] = useState25(null);
30808
- const startedRef = useRef12(false);
31208
+ const [events, setEvents] = useState26([]);
31209
+ const [confirm, setConfirm] = useState26(null);
31210
+ const startedRef = useRef13(false);
30809
31211
  useEffect19(() => {
30810
31212
  if (startedRef.current) return;
30811
31213
  startedRef.current = true;
@@ -30834,15 +31236,15 @@ function PrerequisitesScreen({
30834
31236
  ...skipBuild !== void 0 ? { skipBuild } : {}
30835
31237
  }).then(onDone);
30836
31238
  }, []);
30837
- return /* @__PURE__ */ jsx58(
31239
+ return /* @__PURE__ */ jsx59(
30838
31240
  StepLayout,
30839
31241
  {
30840
- prompt: confirm ? /* @__PURE__ */ jsxs47(Box46, { children: [
30841
- /* @__PURE__ */ jsxs47(Text50, { children: [
31242
+ prompt: confirm ? /* @__PURE__ */ jsxs48(Box47, { children: [
31243
+ /* @__PURE__ */ jsxs48(Text51, { children: [
30842
31244
  confirm.question,
30843
31245
  " "
30844
31246
  ] }),
30845
- /* @__PURE__ */ jsx58(
31247
+ /* @__PURE__ */ jsx59(
30846
31248
  ConfirmInput2,
30847
31249
  {
30848
31250
  defaultChoice: confirm.defaultYes ? "confirm" : "cancel",
@@ -30851,8 +31253,8 @@ function PrerequisitesScreen({
30851
31253
  },
30852
31254
  confirm.question
30853
31255
  )
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}`)) })
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}`)) })
30856
31258
  }
30857
31259
  );
30858
31260
  }
@@ -30872,9 +31274,9 @@ __export(SetupScreen_exports, {
30872
31274
  SetupScreen: () => SetupScreen,
30873
31275
  formatSetupCompletionMessage: () => formatSetupCompletionMessage
30874
31276
  });
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";
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";
30878
31280
  function countRequiredFailures(results) {
30879
31281
  return results.filter((result) => result.required && result.status === "failed").length;
30880
31282
  }
@@ -30892,11 +31294,11 @@ function SetupScreen({
30892
31294
  }) {
30893
31295
  const { columns: terminalColumns } = useTerminalSize();
30894
31296
  const columns = columnsOverride ?? terminalColumns;
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);
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);
30900
31302
  useEffect20(() => {
30901
31303
  if (startedRef.current) return;
30902
31304
  startedRef.current = true;
@@ -30905,7 +31307,7 @@ function SetupScreen({
30905
31307
  });
30906
31308
  void (async () => {
30907
31309
  const results = [];
30908
- const prerequisites = await runScreen((done) => /* @__PURE__ */ jsx59(
31310
+ const prerequisites = await runScreen((done) => /* @__PURE__ */ jsx60(
30909
31311
  PrerequisitesScreen,
30910
31312
  {
30911
31313
  repoRoot,
@@ -30939,21 +31341,21 @@ function SetupScreen({
30939
31341
  if (skip.skipAgent) {
30940
31342
  results.push({ name: "Coding agent", status: "skipped", required: false });
30941
31343
  } else {
30942
- const status = await runScreen((done) => /* @__PURE__ */ jsx59(CodingAgentScreen, { onDone: done }));
31344
+ const status = await runScreen((done) => /* @__PURE__ */ jsx60(CodingAgentScreen, { onDone: done }));
30943
31345
  results.push({ name: "Coding agent", status, required: true });
30944
31346
  }
30945
31347
  setActiveStep(3);
30946
31348
  if (skip.skipCredentials) {
30947
31349
  results.push({ name: "Contentful credentials", status: "skipped", required: false });
30948
31350
  } else {
30949
- const status = await runScreen((done) => /* @__PURE__ */ jsx59(ContentfulCredentialsScreen, { onDone: done }));
31351
+ const status = await runScreen((done) => /* @__PURE__ */ jsx60(ContentfulCredentialsScreen, { onDone: done }));
30950
31352
  results.push({ name: "Contentful credentials", status, required: false });
30951
31353
  }
30952
31354
  setActiveStep(4);
30953
31355
  if (skip.skipOptional) {
30954
31356
  results.push({ name: "Preferences", status: "skipped", required: false });
30955
31357
  } else {
30956
- const status = await runScreen((done) => /* @__PURE__ */ jsx59(PreferencesMenu, { onDone: done }));
31358
+ const status = await runScreen((done) => /* @__PURE__ */ jsx60(PreferencesMenu, { onDone: done }));
30957
31359
  results.push({ name: "Preferences", status, required: false });
30958
31360
  }
30959
31361
  const exitCode = countRequiredFailures(results) === 0 ? 0 : 1;
@@ -30962,37 +31364,37 @@ function SetupScreen({
30962
31364
  onComplete(finalOutcome);
30963
31365
  })();
30964
31366
  }, []);
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: [
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: [
30969
31371
  "v",
30970
31372
  version
30971
31373
  ] }) })
30972
31374
  ] }),
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 })
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 })
30975
31377
  ] });
30976
31378
  }
30977
31379
  function SetupSummary({ outcome, notice }) {
30978
31380
  const requiredFailed = countRequiredFailures(outcome.results);
30979
- return /* @__PURE__ */ jsxs48(Box47, { flexDirection: "column", marginTop: 1, children: [
30980
- /* @__PURE__ */ jsx59(Text51, { bold: true, children: "Summary" }),
31381
+ return /* @__PURE__ */ jsxs49(Box48, { flexDirection: "column", marginTop: 1, children: [
31382
+ /* @__PURE__ */ jsx60(Text52, { bold: true, children: "Summary" }),
30981
31383
  outcome.results.map((result) => {
30982
31384
  if (result.status === "completed") {
30983
- return /* @__PURE__ */ jsxs48(Text51, { color: PALETTE.success, children: [
31385
+ return /* @__PURE__ */ jsxs49(Text52, { color: PALETTE.success, children: [
30984
31386
  "\u2713 ",
30985
31387
  result.name
30986
31388
  ] }, result.name);
30987
31389
  }
30988
31390
  if (result.status === "skipped") {
30989
- return /* @__PURE__ */ jsxs48(Text51, { dimColor: true, children: [
31391
+ return /* @__PURE__ */ jsxs49(Text52, { dimColor: true, children: [
30990
31392
  "\u2013 ",
30991
31393
  result.name,
30992
31394
  " \u2014 skipped"
30993
31395
  ] }, result.name);
30994
31396
  }
30995
- return /* @__PURE__ */ jsxs48(Text51, { color: result.required ? PALETTE.error : PALETTE.warning, children: [
31397
+ return /* @__PURE__ */ jsxs49(Text52, { color: result.required ? PALETTE.error : PALETTE.warning, children: [
30996
31398
  result.required ? "\u2717" : "\u26A0",
30997
31399
  " ",
30998
31400
  result.name,
@@ -31000,10 +31402,10 @@ function SetupSummary({ outcome, notice }) {
31000
31402
  result.required ? "required" : "optional"
31001
31403
  ] }, result.name);
31002
31404
  }),
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." })
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." })
31007
31409
  ] });
31008
31410
  }
31009
31411
  var init_SetupScreen = __esm({