@contentful/experience-design-system-cli 2.37.1-dev-build-c299dd61.0 → 2.37.1-dev-build-283166e5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -19981,109 +19981,438 @@ var init_ClearableTextInput = __esm({
19981
19981
  }
19982
19982
  });
19983
19983
 
19984
- // packages/experience-design-system-cli/src/tui/import/steps/01-welcome/logic.ts
19985
- function shouldQuit(key) {
19986
- return key.escape;
19984
+ // packages/experience-design-system-cli/src/tui/shared/components/FieldForm.tsx
19985
+ import { useState as useState5 } from "react";
19986
+ import { Box as Box10, Text as Text10, useInput as useInput7 } from "ink";
19987
+ import { Fragment, jsx as jsx11, jsxs as jsxs10 } from "react/jsx-runtime";
19988
+ function formLabelWidth(rows) {
19989
+ return Math.max(...rows.map((row) => row.label.length));
19987
19990
  }
19988
- function toProjectPath(value) {
19989
- const projectPath = value.trim();
19990
- return projectPath === "" ? null : projectPath;
19991
+ function FormReadOnlyRow({
19992
+ label,
19993
+ labelWidth,
19994
+ children
19995
+ }) {
19996
+ return /* @__PURE__ */ jsxs10(Box10, { gap: 1, children: [
19997
+ /* @__PURE__ */ jsx11(Text10, { children: " " }),
19998
+ /* @__PURE__ */ jsx11(Box10, { width: labelWidth, flexShrink: 0, children: /* @__PURE__ */ jsx11(Text10, { color: PALETTE.muted, children: label }) }),
19999
+ children
20000
+ ] });
19991
20001
  }
19992
- var init_logic5 = __esm({
19993
- "packages/experience-design-system-cli/src/tui/import/steps/01-welcome/logic.ts"() {
20002
+ function FieldForm({
20003
+ header,
20004
+ title,
20005
+ subtitle,
20006
+ fields: fields2,
20007
+ values,
20008
+ onChange,
20009
+ onSave,
20010
+ saveLabel = "save",
20011
+ enterAdvances = false,
20012
+ onSkip,
20013
+ skipLabel: skipLabel2 = "skip",
20014
+ onQuit,
20015
+ quitLabel = "back without saving",
20016
+ actions = [],
20017
+ notice,
20018
+ busy = false,
20019
+ children
20020
+ }) {
20021
+ const [active, setActive] = useState5(0);
20022
+ const [editing, setEditing] = useState5(false);
20023
+ const [valueBeforeEdit, setValueBeforeEdit] = useState5("");
20024
+ const rowCount = fields2.length + actions.length;
20025
+ const labelWidth = formLabelWidth([...fields2, ...actions]);
20026
+ const currentField = active < fields2.length ? fields2[active] : void 0;
20027
+ const currentAction = currentField ? void 0 : actions[active - fields2.length];
20028
+ useInput7((input, key) => {
20029
+ if (busy) return;
20030
+ if (editing) {
20031
+ if (key.escape && currentField) {
20032
+ onChange(currentField.key, valueBeforeEdit);
20033
+ setEditing(false);
20034
+ }
20035
+ return;
20036
+ }
20037
+ if (key.escape || input === "q") {
20038
+ onQuit();
20039
+ return;
20040
+ }
20041
+ if (input === "s") {
20042
+ onSave();
20043
+ return;
20044
+ }
20045
+ if (input === "k" && onSkip) {
20046
+ onSkip();
20047
+ return;
20048
+ }
20049
+ if (isClearKey(input, key) && currentField) {
20050
+ onChange(currentField.key, "");
20051
+ return;
20052
+ }
20053
+ if (key.tab || key.downArrow) {
20054
+ setActive((i) => (i + 1) % rowCount);
20055
+ return;
20056
+ }
20057
+ if (key.upArrow) {
20058
+ setActive((i) => (i - 1 + rowCount) % rowCount);
20059
+ return;
20060
+ }
20061
+ if (key.return) {
20062
+ if (currentField) {
20063
+ setValueBeforeEdit(values[currentField.key]);
20064
+ setEditing(true);
20065
+ } else {
20066
+ currentAction?.onRun();
20067
+ }
20068
+ }
20069
+ });
20070
+ const isLastField = active === fields2.length - 1;
20071
+ const submitField = () => {
20072
+ if (!enterAdvances) {
20073
+ setEditing(false);
20074
+ return;
20075
+ }
20076
+ if (isLastField) {
20077
+ setEditing(false);
20078
+ onSave();
20079
+ return;
20080
+ }
20081
+ const next = fields2[active + 1];
20082
+ setValueBeforeEdit(values[next.key]);
20083
+ setActive(active + 1);
20084
+ };
20085
+ const pointer = (isActive) => /* @__PURE__ */ jsx11(Text10, { color: isActive ? PALETTE.accent : void 0, children: isActive ? "\u276F" : " " });
20086
+ return /* @__PURE__ */ jsxs10(Box10, { flexDirection: "column", children: [
20087
+ header,
20088
+ /* @__PURE__ */ jsxs10(Box10, { flexDirection: "column", paddingX: 2, paddingTop: header ? 0 : 1, paddingBottom: 1, children: [
20089
+ /* @__PURE__ */ jsx11(Text10, { bold: true, children: title }),
20090
+ /* @__PURE__ */ jsx11(Text10, { children: " " }),
20091
+ subtitle && /* @__PURE__ */ jsx11(Text10, { color: PALETTE.muted, children: subtitle }),
20092
+ /* @__PURE__ */ jsx11(Text10, { children: " " }),
20093
+ /* @__PURE__ */ jsxs10(Box10, { flexDirection: "column", children: [
20094
+ fields2.map((field, index) => {
20095
+ const isActive = index === active;
20096
+ const value = values[field.key];
20097
+ const display = field.masked ? "\u2022".repeat(value.length) : value;
20098
+ return /* @__PURE__ */ jsxs10(Box10, { gap: 1, children: [
20099
+ pointer(isActive),
20100
+ /* @__PURE__ */ jsx11(Box10, { width: labelWidth, flexShrink: 0, children: /* @__PURE__ */ jsx11(Text10, { bold: isActive, color: isActive ? PALETTE.accent : PALETTE.muted, children: field.label }) }),
20101
+ isActive && editing ? /* @__PURE__ */ jsx11(
20102
+ ClearableTextInput,
20103
+ {
20104
+ value,
20105
+ onChange: (next) => onChange(field.key, next),
20106
+ onSubmit: submitField,
20107
+ mask: field.masked ? "\u2022" : void 0
20108
+ }
20109
+ ) : display ? /* @__PURE__ */ jsx11(Text10, { bold: true, children: display }) : (
20110
+ // An empty value shows its hint (or "(empty)") in the value's place, not after an empty element, so the
20111
+ // text starts in the same column as every other row's.
20112
+ /* @__PURE__ */ jsx11(Text10, { color: PALETTE.muted, children: field.hint ?? "(empty)" })
20113
+ ),
20114
+ display && field.hint && /* @__PURE__ */ jsx11(Text10, { color: PALETTE.muted, children: field.hint })
20115
+ ] }, field.key);
20116
+ }),
20117
+ actions.map((action, index) => {
20118
+ const isActive = fields2.length + index === active;
20119
+ return /* @__PURE__ */ jsxs10(Box10, { gap: 1, children: [
20120
+ pointer(isActive),
20121
+ /* @__PURE__ */ jsx11(Box10, { width: labelWidth, flexShrink: 0, children: /* @__PURE__ */ jsx11(Text10, { bold: isActive, color: isActive ? PALETTE.accent : PALETTE.muted, children: action.label }) }),
20122
+ /* @__PURE__ */ jsx11(Text10, { color: action.running ? PALETTE.accent : PALETTE.muted, children: action.running ? action.runningText ?? "running..." : action.description })
20123
+ ] }, action.label);
20124
+ })
20125
+ ] }),
20126
+ notice && /* @__PURE__ */ jsxs10(Fragment, { children: [
20127
+ /* @__PURE__ */ jsx11(Text10, { children: " " }),
20128
+ /* @__PURE__ */ jsxs10(Text10, { color: notice.kind === "success" ? PALETTE.success : PALETTE.error, children: [
20129
+ notice.kind === "success" ? "\u2713" : "\u2717",
20130
+ " ",
20131
+ notice.text
20132
+ ] })
20133
+ ] }),
20134
+ children,
20135
+ /* @__PURE__ */ jsx11(Text10, { children: " " }),
20136
+ /* @__PURE__ */ jsx11(
20137
+ ControlHints,
20138
+ {
20139
+ hints: editing ? [
20140
+ { keys: "type", label: "edit" },
20141
+ { keys: "\u2190/\u2192", label: "move cursor" },
20142
+ { keys: "\u23CE", label: enterAdvances ? isLastField ? saveLabel : "next" : "done" },
20143
+ { keys: "Ctrl+D", label: "clear" },
20144
+ { keys: "Esc", label: "cancel edit" }
20145
+ ] : [
20146
+ { keys: "\u2191/\u2193", label: "move" },
20147
+ { keys: "\u23CE", label: currentAction ? currentAction.hint : "edit" },
20148
+ ...currentField ? [{ keys: "Ctrl+D", label: "clear" }] : [],
20149
+ { keys: "s", label: saveLabel },
20150
+ ...onSkip ? [{ keys: "k", label: skipLabel2 }] : [],
20151
+ { keys: "Esc/q", label: quitLabel }
20152
+ ]
20153
+ }
20154
+ )
20155
+ ] })
20156
+ ] });
20157
+ }
20158
+ var init_FieldForm = __esm({
20159
+ "packages/experience-design-system-cli/src/tui/shared/components/FieldForm.tsx"() {
19994
20160
  "use strict";
20161
+ init_theme();
20162
+ init_ControlHints();
20163
+ init_ClearableTextInput();
19995
20164
  }
19996
20165
  });
19997
20166
 
19998
- // packages/experience-design-system-cli/src/tui/import/steps/01-welcome/controls.ts
19999
- import { useInput as useInput7 } from "ink";
20000
- function useWelcomeControls(onQuit) {
20001
- useInput7((_input, key) => {
20002
- if (shouldQuit(key)) onQuit();
20167
+ // packages/experience-design-system-cli/src/tui/shared/components/MenuScreen.tsx
20168
+ import { useState as useState6 } from "react";
20169
+ import { Box as Box11, Text as Text11, useInput as useInput8 } from "ink";
20170
+ import { Fragment as Fragment2, jsx as jsx12, jsxs as jsxs11 } from "react/jsx-runtime";
20171
+ function MenuScreen({
20172
+ title,
20173
+ subtitle,
20174
+ menu,
20175
+ rows = [],
20176
+ onChoose,
20177
+ onEscape,
20178
+ escapeLabel = "back",
20179
+ busy = false,
20180
+ children
20181
+ }) {
20182
+ const [focus, setFocus] = useState6(0);
20183
+ useInput8((_input, key) => {
20184
+ if (busy) return;
20185
+ if (key.escape) onEscape();
20186
+ else if (key.return) onChoose(menu[focus].choice);
20187
+ else if (key.upArrow) setFocus((current) => (current - 1 + menu.length) % menu.length);
20188
+ else if (key.downArrow || key.tab) setFocus((current) => (current + 1) % menu.length);
20003
20189
  });
20190
+ const labelWidth = formLabelWidth([...menu, ...rows]);
20191
+ return /* @__PURE__ */ jsxs11(Box11, { flexDirection: "column", children: [
20192
+ /* @__PURE__ */ jsx12(StepHeader, { step: "setup" }),
20193
+ /* @__PURE__ */ jsxs11(Box11, { flexDirection: "column", paddingX: 2, paddingBottom: 1, children: [
20194
+ /* @__PURE__ */ jsx12(Text11, { bold: true, children: title }),
20195
+ /* @__PURE__ */ jsx12(Text11, { children: " " }),
20196
+ subtitle && /* @__PURE__ */ jsxs11(Fragment2, { children: [
20197
+ /* @__PURE__ */ jsx12(Text11, { color: PALETTE.muted, children: subtitle }),
20198
+ /* @__PURE__ */ jsx12(Text11, { children: " " })
20199
+ ] }),
20200
+ menu.map((item, index) => {
20201
+ const focused = index === focus;
20202
+ return /* @__PURE__ */ jsxs11(Box11, { gap: 1, children: [
20203
+ /* @__PURE__ */ jsx12(Text11, { color: focused ? PALETTE.accent : void 0, children: focused ? "\u276F" : " " }),
20204
+ /* @__PURE__ */ jsx12(Box11, { width: labelWidth, flexShrink: 0, children: /* @__PURE__ */ jsx12(Text11, { bold: focused, color: focused ? PALETTE.accent : PALETTE.muted, children: item.label }) }),
20205
+ /* @__PURE__ */ jsx12(Text11, { color: PALETTE.muted, children: item.description })
20206
+ ] }, item.choice);
20207
+ }),
20208
+ rows.length > 0 && /* @__PURE__ */ jsx12(Text11, { children: " " }),
20209
+ rows.map((row) => /* @__PURE__ */ jsx12(FormReadOnlyRow, { label: row.label, labelWidth, children: /* @__PURE__ */ jsx12(Text11, { bold: row.value !== "", children: row.value || "(empty)" }) }, row.label)),
20210
+ children,
20211
+ /* @__PURE__ */ jsx12(Text11, { children: " " }),
20212
+ /* @__PURE__ */ jsx12(
20213
+ ControlHints,
20214
+ {
20215
+ hints: [
20216
+ { keys: "\u2191/\u2193", label: "move" },
20217
+ { keys: "\u23CE", label: menu[focus].label.toLowerCase() },
20218
+ { keys: "Esc", label: escapeLabel }
20219
+ ]
20220
+ }
20221
+ )
20222
+ ] })
20223
+ ] });
20004
20224
  }
20005
- var WELCOME_CONTROLS;
20006
- var init_controls4 = __esm({
20007
- "packages/experience-design-system-cli/src/tui/import/steps/01-welcome/controls.ts"() {
20225
+ var init_MenuScreen = __esm({
20226
+ "packages/experience-design-system-cli/src/tui/shared/components/MenuScreen.tsx"() {
20008
20227
  "use strict";
20009
- init_logic5();
20010
- WELCOME_CONTROLS = [
20011
- { keys: "Enter", label: "Continue" },
20012
- { keys: "Ctrl+D", label: "Clear" },
20013
- { keys: "Esc", label: "Back" }
20014
- ];
20228
+ init_theme();
20229
+ init_ControlHints();
20230
+ init_FieldForm();
20231
+ init_StepHeader();
20015
20232
  }
20016
20233
  });
20017
20234
 
20018
- // packages/experience-design-system-cli/src/tui/import/steps/01-welcome/screen.tsx
20019
- import { useState as useState5 } from "react";
20020
- import { Box as Box10, Text as Text10 } from "ink";
20021
- import { jsx as jsx11, jsxs as jsxs10 } from "react/jsx-runtime";
20022
- function WelcomeScreen({ onContinue, onQuit, initialPath = "" }) {
20023
- const [projectPath, setProjectPath] = useState5(initialPath);
20024
- useWelcomeControls(onQuit);
20025
- const submit = (value) => {
20026
- const path5 = toProjectPath(value);
20027
- if (path5) onContinue(path5);
20235
+ // packages/experience-design-system-cli/src/tui/shared/components/PathStepScreen.tsx
20236
+ import { useState as useState7 } from "react";
20237
+ import { Box as Box12, Text as Text12, useInput as useInput9 } from "ink";
20238
+ import { Fragment as Fragment3, jsx as jsx13, jsxs as jsxs12 } from "react/jsx-runtime";
20239
+ function PathStepScreen({
20240
+ title,
20241
+ subtitle,
20242
+ label,
20243
+ initialPath = "",
20244
+ toPath,
20245
+ check,
20246
+ onContinue,
20247
+ onBack
20248
+ }) {
20249
+ const [value, setValue] = useState7(initialPath);
20250
+ const [savedValue, setSavedValue] = useState7(toPath(initialPath) === null ? "" : initialPath);
20251
+ const [editing, setEditing] = useState7(toPath(initialPath) === null);
20252
+ const [failure, setFailure] = useState7(null);
20253
+ useInput9(
20254
+ (_input, key) => {
20255
+ if (!key.escape) return;
20256
+ if (savedValue === "") {
20257
+ onBack();
20258
+ return;
20259
+ }
20260
+ setValue(savedValue);
20261
+ setFailure(null);
20262
+ setEditing(false);
20263
+ },
20264
+ { isActive: editing }
20265
+ );
20266
+ const choose = (choice) => {
20267
+ if (choice === "edit") {
20268
+ setFailure(null);
20269
+ setEditing(true);
20270
+ return;
20271
+ }
20272
+ if (choice === "back") {
20273
+ onBack();
20274
+ return;
20275
+ }
20276
+ const path5 = toPath(value);
20277
+ if (path5 === null) return;
20278
+ const result = check(path5);
20279
+ if (result.ok) onContinue(result.path);
20280
+ else setFailure({ error: result.error, resolvedPath: result.resolvedPath });
20028
20281
  };
20029
- return /* @__PURE__ */ jsxs10(Box10, { flexDirection: "column", children: [
20030
- /* @__PURE__ */ jsx11(StepHeader, { step: "setup" }),
20031
- /* @__PURE__ */ jsxs10(Box10, { flexDirection: "column", gap: 1, paddingX: 2, paddingBottom: 1, children: [
20032
- /* @__PURE__ */ jsxs10(Box10, { flexDirection: "column", gap: 1, children: [
20033
- /* @__PURE__ */ jsx11(Text10, { color: PALETTE.text, children: "Where is your component library?" }),
20034
- /* @__PURE__ */ jsxs10(Box10, { children: [
20035
- /* @__PURE__ */ jsx11(Text10, { color: PALETTE.accent, children: "? " }),
20036
- /* @__PURE__ */ jsx11(Text10, { children: "Project path: " }),
20037
- /* @__PURE__ */ jsx11(ClearableTextInput, { value: projectPath, onChange: setProjectPath, onSubmit: submit })
20038
- ] })
20282
+ const submit = (typed) => {
20283
+ if (toPath(typed) === null) {
20284
+ setFailure({ error: `Enter the ${label.toLowerCase()}.` });
20285
+ return;
20286
+ }
20287
+ setSavedValue(typed);
20288
+ setEditing(false);
20289
+ };
20290
+ const failureLines = failure && /* @__PURE__ */ jsxs12(Fragment3, { children: [
20291
+ /* @__PURE__ */ jsx13(Text12, { children: " " }),
20292
+ /* @__PURE__ */ jsxs12(Text12, { color: PALETTE.error, children: [
20293
+ "\u2717 ",
20294
+ failure.error
20295
+ ] }),
20296
+ failure.resolvedPath && /* @__PURE__ */ jsxs12(Text12, { color: PALETTE.muted, children: [
20297
+ " Resolved to: ",
20298
+ failure.resolvedPath
20299
+ ] })
20300
+ ] });
20301
+ if (!editing) {
20302
+ return /* @__PURE__ */ jsx13(
20303
+ MenuScreen,
20304
+ {
20305
+ title,
20306
+ subtitle,
20307
+ menu: MENU,
20308
+ rows: [{ label, value: savedValue }],
20309
+ onChoose: choose,
20310
+ onEscape: onBack,
20311
+ children: failureLines
20312
+ }
20313
+ );
20314
+ }
20315
+ return /* @__PURE__ */ jsxs12(Box12, { flexDirection: "column", children: [
20316
+ /* @__PURE__ */ jsx13(StepHeader, { step: "setup" }),
20317
+ /* @__PURE__ */ jsxs12(Box12, { flexDirection: "column", paddingX: 2, paddingBottom: 1, children: [
20318
+ /* @__PURE__ */ jsx13(Text12, { bold: true, children: title }),
20319
+ /* @__PURE__ */ jsx13(Text12, { children: " " }),
20320
+ /* @__PURE__ */ jsx13(Text12, { color: PALETTE.muted, children: subtitle }),
20321
+ /* @__PURE__ */ jsx13(Text12, { children: " " }),
20322
+ /* @__PURE__ */ jsxs12(Box12, { gap: 1, children: [
20323
+ /* @__PURE__ */ jsx13(Text12, { color: PALETTE.accent, children: "?" }),
20324
+ /* @__PURE__ */ jsxs12(Text12, { children: [
20325
+ label,
20326
+ ":"
20327
+ ] }),
20328
+ /* @__PURE__ */ jsx13(
20329
+ ClearableTextInput,
20330
+ {
20331
+ value,
20332
+ onChange: (next) => {
20333
+ setValue(next);
20334
+ setFailure(null);
20335
+ },
20336
+ onSubmit: submit
20337
+ }
20338
+ )
20039
20339
  ] }),
20040
- /* @__PURE__ */ jsx11(Box10, { children: /* @__PURE__ */ jsx11(ControlHints, { hints: WELCOME_CONTROLS }) })
20340
+ failureLines,
20341
+ /* @__PURE__ */ jsx13(Text12, { children: " " }),
20342
+ /* @__PURE__ */ jsx13(
20343
+ ControlHints,
20344
+ {
20345
+ hints: [
20346
+ { keys: "\u23CE", label: "done" },
20347
+ { keys: "Ctrl+D", label: "clear" },
20348
+ { keys: "Esc", label: savedValue === "" ? "back" : "cancel edit" }
20349
+ ]
20350
+ }
20351
+ )
20041
20352
  ] })
20042
20353
  ] });
20043
20354
  }
20044
- var init_screen2 = __esm({
20045
- "packages/experience-design-system-cli/src/tui/import/steps/01-welcome/screen.tsx"() {
20355
+ var MENU;
20356
+ var init_PathStepScreen = __esm({
20357
+ "packages/experience-design-system-cli/src/tui/shared/components/PathStepScreen.tsx"() {
20046
20358
  "use strict";
20047
20359
  init_theme();
20048
20360
  init_ClearableTextInput();
20049
- init_controls4();
20050
- init_logic5();
20051
20361
  init_ControlHints();
20362
+ init_MenuScreen();
20052
20363
  init_StepHeader();
20364
+ MENU = [
20365
+ { choice: "continue", label: "Continue", description: "Use this path and go on" },
20366
+ { choice: "edit", label: "Edit", description: "Change the path" },
20367
+ { choice: "back", label: "Back", description: "Go back" }
20368
+ ];
20053
20369
  }
20054
20370
  });
20055
20371
 
20056
- // packages/experience-design-system-cli/src/tui/import/steps/02-token-input/logic.ts
20057
- function shouldGoBack(key) {
20058
- return key.escape;
20372
+ // packages/experience-design-system-cli/src/tui/import/steps/01-welcome/logic.ts
20373
+ function toProjectPath(value) {
20374
+ const projectPath = value.trim();
20375
+ return projectPath === "" ? null : projectPath;
20059
20376
  }
20060
- function toTokenPath(value) {
20061
- const tokenPath = value.trim();
20062
- return tokenPath === "" ? null : tokenPath;
20377
+ var init_logic5 = __esm({
20378
+ "packages/experience-design-system-cli/src/tui/import/steps/01-welcome/logic.ts"() {
20379
+ "use strict";
20380
+ }
20381
+ });
20382
+
20383
+ // packages/experience-design-system-cli/src/tui/import/steps/01-welcome/screen.tsx
20384
+ import { jsx as jsx14 } from "react/jsx-runtime";
20385
+ function WelcomeScreen({ onContinue, onQuit, initialPath = "" }) {
20386
+ return /* @__PURE__ */ jsx14(
20387
+ PathStepScreen,
20388
+ {
20389
+ title: "Where is your component library?",
20390
+ subtitle: "The folder with your components. You can use ~, relative, or absolute paths.",
20391
+ label: "Project path",
20392
+ initialPath,
20393
+ toPath: toProjectPath,
20394
+ check: (path5) => ({ ok: true, path: path5 }),
20395
+ onContinue,
20396
+ onBack: onQuit
20397
+ }
20398
+ );
20063
20399
  }
20064
- var init_logic6 = __esm({
20065
- "packages/experience-design-system-cli/src/tui/import/steps/02-token-input/logic.ts"() {
20400
+ var init_screen2 = __esm({
20401
+ "packages/experience-design-system-cli/src/tui/import/steps/01-welcome/screen.tsx"() {
20066
20402
  "use strict";
20403
+ init_PathStepScreen();
20404
+ init_logic5();
20067
20405
  }
20068
20406
  });
20069
20407
 
20070
- // packages/experience-design-system-cli/src/tui/import/steps/02-token-input/controls.ts
20071
- import { useInput as useInput8 } from "ink";
20072
- function useTokenInputControls(onBack) {
20073
- useInput8((_input, key) => {
20074
- if (shouldGoBack(key)) onBack();
20075
- });
20408
+ // packages/experience-design-system-cli/src/tui/import/steps/02-token-input/logic.ts
20409
+ function toTokenPath(value) {
20410
+ const tokenPath = value.trim();
20411
+ return tokenPath === "" ? null : tokenPath;
20076
20412
  }
20077
- var TOKEN_INPUT_CONTROLS;
20078
- var init_controls5 = __esm({
20079
- "packages/experience-design-system-cli/src/tui/import/steps/02-token-input/controls.ts"() {
20413
+ var init_logic6 = __esm({
20414
+ "packages/experience-design-system-cli/src/tui/import/steps/02-token-input/logic.ts"() {
20080
20415
  "use strict";
20081
- init_logic6();
20082
- TOKEN_INPUT_CONTROLS = [
20083
- { keys: "Enter", label: "Continue" },
20084
- { keys: "Ctrl+D", label: "Clear" },
20085
- { keys: "Esc", label: "Back" }
20086
- ];
20087
20416
  }
20088
20417
  });
20089
20418
 
@@ -20136,63 +20465,52 @@ var init_validate_path = __esm({
20136
20465
  });
20137
20466
 
20138
20467
  // packages/experience-design-system-cli/src/tui/import/steps/02-token-input/screen.tsx
20139
- import { useState as useState6 } from "react";
20140
- import { Box as Box11, Text as Text11 } from "ink";
20141
- import { jsx as jsx12, jsxs as jsxs11 } from "react/jsx-runtime";
20468
+ import { jsx as jsx15 } from "react/jsx-runtime";
20142
20469
  function TokenInputScreen({ onConfirm, onBack, initialPath = "" }) {
20143
- const [tokenPath, setTokenPath] = useState6(initialPath);
20144
- const [failure, setFailure] = useState6(null);
20145
- useTokenInputControls(onBack);
20146
- const change = (value) => {
20147
- setTokenPath(value);
20148
- setFailure(null);
20149
- };
20150
- const submit = (value) => {
20151
- const rawPath = toTokenPath(value);
20152
- if (!rawPath) {
20153
- setFailure({ error: "Enter the path to your token file." });
20154
- return;
20470
+ return /* @__PURE__ */ jsx15(
20471
+ PathStepScreen,
20472
+ {
20473
+ title: "Design tokens",
20474
+ subtitle: "Point me to your raw token file (e.g. ~/design-tokens/tokens.json). You can use ~, relative, or absolute paths. Claude will map it to Design Token Group Format (DTCG).",
20475
+ label: "Token path",
20476
+ initialPath,
20477
+ toPath: toTokenPath,
20478
+ check: validateTokenPath,
20479
+ onContinue: onConfirm,
20480
+ onBack
20155
20481
  }
20156
- const check = validateTokenPath(rawPath);
20157
- if (check.ok) onConfirm(check.path);
20158
- else setFailure({ error: check.error, resolvedPath: check.resolvedPath });
20159
- };
20160
- return /* @__PURE__ */ jsxs11(Box11, { flexDirection: "column", children: [
20161
- /* @__PURE__ */ jsx12(StepHeader, { step: "setup" }),
20162
- /* @__PURE__ */ jsxs11(Box11, { flexDirection: "column", gap: 1, paddingX: 2, paddingBottom: 1, children: [
20163
- /* @__PURE__ */ jsx12(Text11, { bold: true, children: "Design tokens" }),
20164
- /* @__PURE__ */ jsx12(Text11, { color: PALETTE.muted, children: "Point me to your raw token file (e.g. ~/design-tokens/tokens.json). You can use ~, relative, or absolute paths. Claude will map it to Design Token Group Format (DTCG)." }),
20165
- /* @__PURE__ */ jsxs11(Box11, { flexDirection: "column", children: [
20166
- /* @__PURE__ */ jsxs11(Box11, { gap: 1, children: [
20167
- /* @__PURE__ */ jsx12(Text11, { color: PALETTE.accent, children: "?" }),
20168
- /* @__PURE__ */ jsx12(Text11, { children: "Token path:" }),
20169
- /* @__PURE__ */ jsx12(ClearableTextInput, { value: tokenPath, onChange: change, onSubmit: submit })
20170
- ] }),
20171
- failure && /* @__PURE__ */ jsxs11(Box11, { flexDirection: "column", children: [
20172
- /* @__PURE__ */ jsxs11(Text11, { color: PALETTE.error, children: [
20173
- "\u2717 ",
20174
- failure.error
20175
- ] }),
20176
- failure.resolvedPath && /* @__PURE__ */ jsxs11(Text11, { color: PALETTE.muted, children: [
20177
- " Resolved to: ",
20178
- failure.resolvedPath
20179
- ] })
20180
- ] })
20181
- ] }),
20182
- /* @__PURE__ */ jsx12(Box11, { marginTop: 1, children: /* @__PURE__ */ jsx12(ControlHints, { hints: TOKEN_INPUT_CONTROLS }) })
20183
- ] })
20184
- ] });
20482
+ );
20185
20483
  }
20186
20484
  var init_screen3 = __esm({
20187
20485
  "packages/experience-design-system-cli/src/tui/import/steps/02-token-input/screen.tsx"() {
20188
20486
  "use strict";
20189
- init_theme();
20190
- init_ClearableTextInput();
20191
- init_controls5();
20487
+ init_PathStepScreen();
20192
20488
  init_logic6();
20193
20489
  init_validate_path();
20194
- init_ControlHints();
20195
- init_StepHeader();
20490
+ }
20491
+ });
20492
+
20493
+ // packages/experience-design-system-cli/src/tui/import/steps/03-path-validation/helpers/scan-files.ts
20494
+ function scanFiles(directory) {
20495
+ return toScanResult(collectFiles(directory));
20496
+ }
20497
+ function toScanResult(outcome) {
20498
+ if (!outcome.ok) return { ok: false, failure: outcome.failure };
20499
+ return {
20500
+ ok: true,
20501
+ counts: foldSvelteAndMdIntoOther(outcome.result.counts),
20502
+ filePaths: outcome.result.filePaths,
20503
+ warnings: outcome.result.warnings
20504
+ };
20505
+ }
20506
+ function foldSvelteAndMdIntoOther(counts) {
20507
+ const { svelte, md, ...rest } = counts;
20508
+ return { ...rest, other: rest.other + svelte + md };
20509
+ }
20510
+ var init_scan_files = __esm({
20511
+ "packages/experience-design-system-cli/src/tui/import/steps/03-path-validation/helpers/scan-files.ts"() {
20512
+ "use strict";
20513
+ init_src3();
20196
20514
  }
20197
20515
  });
20198
20516
 
@@ -20234,107 +20552,41 @@ function summarize(counts, { hasTokens = true } = {}) {
20234
20552
  if (hasTokens && counts.json > 0) {
20235
20553
  return { total: counts.total, rows, warning: "No component files found \u2014 only token files detected." };
20236
20554
  }
20237
- return {
20238
- total: counts.total,
20239
- rows,
20240
- warning: hasTokens ? "No component or token files found. Try a different path." : "No component files found. Try a different path."
20241
- };
20242
- }
20243
- function phaseOf(scan) {
20244
- if (scan === void 0) return "scanning";
20245
- return scan.ok ? "ready" : "failed";
20246
- }
20247
- function keyAction(phase, input, key) {
20248
- if (key.escape) return "back";
20249
- if (phase === "ready") {
20250
- if (key.return) return "confirm";
20251
- if (input === "e") return "change-path";
20252
- }
20253
- if (phase === "failed" && (key.return || input === "e")) return "change-path";
20254
- return void 0;
20255
- }
20256
- var COMPONENT_CATEGORIES, ROW_LABELS, ROW_ORDER;
20257
- var init_logic7 = __esm({
20258
- "packages/experience-design-system-cli/src/tui/import/steps/03-path-validation/logic.ts"() {
20259
- "use strict";
20260
- COMPONENT_CATEGORIES = ["tsx", "ts", "vue", "astro", "jsx", "js"];
20261
- ROW_LABELS = {
20262
- tsx: ".tsx files",
20263
- ts: ".ts files",
20264
- vue: ".vue files",
20265
- astro: ".astro files",
20266
- jsx: ".jsx files",
20267
- js: ".js files",
20268
- json: ".json files (design tokens)",
20269
- other: "other (ignored)"
20270
- };
20271
- ROW_ORDER = ["tsx", "ts", "vue", "astro", "jsx", "js", "json", "other"];
20272
- }
20273
- });
20274
-
20275
- // packages/experience-design-system-cli/src/tui/import/steps/03-path-validation/controls.ts
20276
- import { useInput as useInput9 } from "ink";
20277
- function controlsFor(phase) {
20278
- return CONTROLS[phase];
20279
- }
20280
- function usePathValidationControls(phase, handlers) {
20281
- useInput9((input, key) => {
20282
- const action = keyAction(phase, input, key);
20283
- if (action === "confirm") handlers.onConfirm();
20284
- else if (action === "change-path") handlers.onChangePath();
20285
- else if (action === "back") handlers.onBack();
20286
- });
20287
- }
20288
- var CONTROLS;
20289
- var init_controls6 = __esm({
20290
- "packages/experience-design-system-cli/src/tui/import/steps/03-path-validation/controls.ts"() {
20291
- "use strict";
20292
- init_logic7();
20293
- CONTROLS = {
20294
- scanning: [{ keys: "Esc", label: "Back" }],
20295
- ready: [
20296
- { keys: "Enter", label: "Yes, continue" },
20297
- { keys: "e", label: "Change path" },
20298
- { keys: "Esc", label: "Back" }
20299
- ],
20300
- failed: [
20301
- { keys: "Enter/e", label: "Try a different path" },
20302
- { keys: "Esc", label: "Back" }
20303
- ]
20304
- };
20305
- }
20306
- });
20307
-
20308
- // packages/experience-design-system-cli/src/tui/import/steps/03-path-validation/helpers/scan-files.ts
20309
- function scanFiles(directory) {
20310
- return toScanResult(collectFiles(directory));
20311
- }
20312
- function toScanResult(outcome) {
20313
- if (!outcome.ok) return { ok: false, failure: outcome.failure };
20314
- return {
20315
- ok: true,
20316
- counts: foldSvelteAndMdIntoOther(outcome.result.counts),
20317
- filePaths: outcome.result.filePaths,
20318
- warnings: outcome.result.warnings
20555
+ return {
20556
+ total: counts.total,
20557
+ rows,
20558
+ warning: hasTokens ? "No component or token files found. Try a different path." : "No component files found. Try a different path."
20319
20559
  };
20320
20560
  }
20321
- function foldSvelteAndMdIntoOther(counts) {
20322
- const { svelte, md, ...rest } = counts;
20323
- return { ...rest, other: rest.other + svelte + md };
20561
+ function phaseOf(scan) {
20562
+ if (scan === void 0) return "scanning";
20563
+ return scan.ok ? "ready" : "failed";
20324
20564
  }
20325
- var init_scan_files = __esm({
20326
- "packages/experience-design-system-cli/src/tui/import/steps/03-path-validation/helpers/scan-files.ts"() {
20565
+ var COMPONENT_CATEGORIES, ROW_LABELS, ROW_ORDER;
20566
+ var init_logic7 = __esm({
20567
+ "packages/experience-design-system-cli/src/tui/import/steps/03-path-validation/logic.ts"() {
20327
20568
  "use strict";
20328
- init_src3();
20569
+ COMPONENT_CATEGORIES = ["tsx", "ts", "vue", "astro", "jsx", "js"];
20570
+ ROW_LABELS = {
20571
+ tsx: ".tsx files",
20572
+ ts: ".ts files",
20573
+ vue: ".vue files",
20574
+ astro: ".astro files",
20575
+ jsx: ".jsx files",
20576
+ js: ".js files",
20577
+ json: ".json files (design tokens)",
20578
+ other: "other (ignored)"
20579
+ };
20580
+ ROW_ORDER = ["tsx", "ts", "vue", "astro", "jsx", "js", "json", "other"];
20329
20581
  }
20330
20582
  });
20331
20583
 
20332
20584
  // packages/experience-design-system-cli/src/tui/import/steps/03-path-validation/screen.tsx
20333
- import { useEffect as useEffect4, useMemo, useState as useState7 } from "react";
20334
- import { Box as Box12, Text as Text12 } from "ink";
20335
- import { jsx as jsx13, jsxs as jsxs12 } from "react/jsx-runtime";
20585
+ import { useEffect as useEffect4, useMemo, useState as useState8 } from "react";
20586
+ import { Box as Box13, Text as Text13 } from "ink";
20587
+ import { jsx as jsx16, jsxs as jsxs13 } from "react/jsx-runtime";
20336
20588
  function Row({ row }) {
20337
- return /* @__PURE__ */ jsxs12(Text12, { color: row.tone === "accent" ? PALETTE.accent : row.tone === "muted" ? PALETTE.muted : void 0, children: [
20589
+ return /* @__PURE__ */ jsxs13(Text13, { color: row.tone === "accent" ? PALETTE.accent : row.tone === "muted" ? PALETTE.muted : void 0, children: [
20338
20590
  " \u2022 ",
20339
20591
  String(row.count).padStart(3),
20340
20592
  " ",
@@ -20343,12 +20595,12 @@ function Row({ row }) {
20343
20595
  }
20344
20596
  function Failure({ scan, path: path5 }) {
20345
20597
  const { headline, hints } = describeFailure(scan.failure, path5);
20346
- return /* @__PURE__ */ jsxs12(Box12, { flexDirection: "column", children: [
20347
- /* @__PURE__ */ jsxs12(Text12, { color: PALETTE.error, children: [
20598
+ return /* @__PURE__ */ jsxs13(Box13, { flexDirection: "column", children: [
20599
+ /* @__PURE__ */ jsxs13(Text13, { color: PALETTE.error, children: [
20348
20600
  "\u2717 ",
20349
20601
  headline
20350
20602
  ] }),
20351
- hints.map((hint) => /* @__PURE__ */ jsx13(Text12, { color: PALETTE.muted, children: hint }, hint))
20603
+ hints.map((hint) => /* @__PURE__ */ jsx16(Text13, { color: PALETTE.muted, children: hint }, hint))
20352
20604
  ] });
20353
20605
  }
20354
20606
  function Summary({
@@ -20357,24 +20609,23 @@ function Summary({
20357
20609
  hasTokens
20358
20610
  }) {
20359
20611
  const { total, rows, warning } = summarize(scan.counts, { hasTokens });
20360
- return /* @__PURE__ */ jsxs12(Box12, { flexDirection: "column", gap: 1, children: [
20361
- /* @__PURE__ */ jsxs12(Text12, { children: [
20612
+ return /* @__PURE__ */ jsxs13(Box13, { flexDirection: "column", gap: 1, children: [
20613
+ /* @__PURE__ */ jsxs13(Text13, { children: [
20362
20614
  "Scanned ",
20363
- /* @__PURE__ */ jsx13(Text12, { bold: true, children: path5 })
20615
+ /* @__PURE__ */ jsx16(Text13, { bold: true, children: path5 })
20364
20616
  ] }),
20365
- /* @__PURE__ */ jsxs12(Box12, { flexDirection: "column", children: [
20366
- /* @__PURE__ */ jsxs12(Text12, { color: PALETTE.success, children: [
20617
+ /* @__PURE__ */ jsxs13(Box13, { flexDirection: "column", children: [
20618
+ /* @__PURE__ */ jsxs13(Text13, { color: PALETTE.success, children: [
20367
20619
  "\u2713 Found ",
20368
20620
  total,
20369
20621
  " files:"
20370
20622
  ] }),
20371
- rows.map((row) => /* @__PURE__ */ jsx13(Row, { row }, row.label))
20623
+ rows.map((row) => /* @__PURE__ */ jsx16(Row, { row }, row.label))
20372
20624
  ] }),
20373
- warning && /* @__PURE__ */ jsxs12(Text12, { color: PALETTE.warning, children: [
20625
+ warning && /* @__PURE__ */ jsxs13(Text13, { color: PALETTE.warning, children: [
20374
20626
  "\u26A0 ",
20375
20627
  warning
20376
- ] }),
20377
- /* @__PURE__ */ jsx13(Text12, { children: "Does this look right?" })
20628
+ ] })
20378
20629
  ] });
20379
20630
  }
20380
20631
  function PathValidationScreen({
@@ -20385,225 +20636,50 @@ function PathValidationScreen({
20385
20636
  hasTokens = true
20386
20637
  }) {
20387
20638
  const resolvedPath = useMemo(() => resolveUserPath(projectPath), [projectPath]);
20388
- const [scan, setScan] = useState7();
20639
+ const [scan, setScan] = useState8();
20389
20640
  useEffect4(() => {
20390
20641
  setScan(scanFiles(resolvedPath));
20391
20642
  }, [resolvedPath]);
20392
20643
  const phase = phaseOf(scan);
20393
- usePathValidationControls(phase, {
20394
- onConfirm: () => {
20644
+ const choose = (choice) => {
20645
+ if (choice === "continue") {
20395
20646
  if (scan?.ok) onConfirm({ projectPath: resolvedPath, filePaths: scan.filePaths });
20396
- },
20397
- onChangePath,
20398
- onBack
20399
- });
20400
- return /* @__PURE__ */ jsxs12(Box12, { flexDirection: "column", children: [
20401
- /* @__PURE__ */ jsx13(StepHeader, { step: "setup" }),
20402
- /* @__PURE__ */ jsxs12(Box12, { flexDirection: "column", gap: 1, paddingX: 2, paddingBottom: 1, children: [
20403
- scan === void 0 && /* @__PURE__ */ jsxs12(Text12, { color: PALETTE.muted, children: [
20647
+ } else if (choice === "change-path") onChangePath();
20648
+ else onBack();
20649
+ };
20650
+ return (
20651
+ // keyed by phase: the menu changes length, so its focus starts over
20652
+ /* @__PURE__ */ jsxs13(MenuScreen, { title: "Scan", menu: MENUS[phase], onChoose: choose, onEscape: onBack, children: [
20653
+ /* @__PURE__ */ jsx16(Text13, { children: " " }),
20654
+ scan === void 0 && /* @__PURE__ */ jsxs13(Text13, { color: PALETTE.muted, children: [
20404
20655
  "Scanning ",
20405
- /* @__PURE__ */ jsx13(Text12, { bold: true, children: resolvedPath }),
20656
+ /* @__PURE__ */ jsx16(Text13, { bold: true, children: resolvedPath }),
20406
20657
  "..."
20407
20658
  ] }),
20408
- scan?.ok === false && /* @__PURE__ */ jsx13(Failure, { scan, path: resolvedPath }),
20409
- scan?.ok === true && /* @__PURE__ */ jsx13(Summary, { scan, path: resolvedPath, hasTokens }),
20410
- /* @__PURE__ */ jsx13(Box12, { marginTop: 1, children: /* @__PURE__ */ jsx13(ControlHints, { hints: controlsFor(phase) }) })
20411
- ] })
20412
- ] });
20659
+ scan?.ok === false && /* @__PURE__ */ jsx16(Failure, { scan, path: resolvedPath }),
20660
+ scan?.ok === true && /* @__PURE__ */ jsx16(Summary, { scan, path: resolvedPath, hasTokens })
20661
+ ] }, phase)
20662
+ );
20413
20663
  }
20664
+ var BACK, MENUS;
20414
20665
  var init_screen4 = __esm({
20415
20666
  "packages/experience-design-system-cli/src/tui/import/steps/03-path-validation/screen.tsx"() {
20416
20667
  "use strict";
20417
20668
  init_theme();
20418
20669
  init_resolve_user_path();
20419
- init_controls6();
20420
20670
  init_scan_files();
20421
20671
  init_logic7();
20422
- init_ControlHints();
20423
- init_StepHeader();
20424
- }
20425
- });
20426
-
20427
- // packages/experience-design-system-cli/src/tui/shared/components/FieldForm.tsx
20428
- import { useState as useState8 } from "react";
20429
- import { Box as Box13, Text as Text13, useInput as useInput10 } from "ink";
20430
- import { Fragment, jsx as jsx14, jsxs as jsxs13 } from "react/jsx-runtime";
20431
- function formLabelWidth(rows) {
20432
- return Math.max(...rows.map((row) => row.label.length));
20433
- }
20434
- function FormReadOnlyRow({
20435
- label,
20436
- labelWidth,
20437
- children
20438
- }) {
20439
- return /* @__PURE__ */ jsxs13(Box13, { gap: 1, children: [
20440
- /* @__PURE__ */ jsx14(Text13, { children: " " }),
20441
- /* @__PURE__ */ jsx14(Box13, { width: labelWidth, flexShrink: 0, children: /* @__PURE__ */ jsx14(Text13, { color: PALETTE.muted, children: label }) }),
20442
- children
20443
- ] });
20444
- }
20445
- function FieldForm({
20446
- header,
20447
- title,
20448
- subtitle,
20449
- fields: fields2,
20450
- values,
20451
- onChange,
20452
- onSave,
20453
- saveLabel = "save",
20454
- enterAdvances = false,
20455
- onSkip,
20456
- skipLabel: skipLabel2 = "skip",
20457
- onQuit,
20458
- quitLabel = "back without saving",
20459
- actions = [],
20460
- notice,
20461
- busy = false,
20462
- children
20463
- }) {
20464
- const [active, setActive] = useState8(0);
20465
- const [editing, setEditing] = useState8(false);
20466
- const [valueBeforeEdit, setValueBeforeEdit] = useState8("");
20467
- const rowCount = fields2.length + actions.length;
20468
- const labelWidth = formLabelWidth([...fields2, ...actions]);
20469
- const currentField = active < fields2.length ? fields2[active] : void 0;
20470
- const currentAction = currentField ? void 0 : actions[active - fields2.length];
20471
- useInput10((input, key) => {
20472
- if (busy) return;
20473
- if (editing) {
20474
- if (key.escape && currentField) {
20475
- onChange(currentField.key, valueBeforeEdit);
20476
- setEditing(false);
20477
- }
20478
- return;
20479
- }
20480
- if (key.escape || input === "q") {
20481
- onQuit();
20482
- return;
20483
- }
20484
- if (input === "s") {
20485
- onSave();
20486
- return;
20487
- }
20488
- if (input === "k" && onSkip) {
20489
- onSkip();
20490
- return;
20491
- }
20492
- if (isClearKey(input, key) && currentField) {
20493
- onChange(currentField.key, "");
20494
- return;
20495
- }
20496
- if (key.tab || key.downArrow) {
20497
- setActive((i) => (i + 1) % rowCount);
20498
- return;
20499
- }
20500
- if (key.upArrow) {
20501
- setActive((i) => (i - 1 + rowCount) % rowCount);
20502
- return;
20503
- }
20504
- if (key.return) {
20505
- if (currentField) {
20506
- setValueBeforeEdit(values[currentField.key]);
20507
- setEditing(true);
20508
- } else {
20509
- currentAction?.onRun();
20510
- }
20511
- }
20512
- });
20513
- const isLastField = active === fields2.length - 1;
20514
- const submitField = () => {
20515
- if (!enterAdvances) {
20516
- setEditing(false);
20517
- return;
20518
- }
20519
- if (isLastField) {
20520
- setEditing(false);
20521
- onSave();
20522
- return;
20523
- }
20524
- const next = fields2[active + 1];
20525
- setValueBeforeEdit(values[next.key]);
20526
- setActive(active + 1);
20527
- };
20528
- const pointer = (isActive) => /* @__PURE__ */ jsx14(Text13, { color: isActive ? PALETTE.accent : void 0, children: isActive ? "\u276F" : " " });
20529
- return /* @__PURE__ */ jsxs13(Box13, { flexDirection: "column", children: [
20530
- header,
20531
- /* @__PURE__ */ jsxs13(Box13, { flexDirection: "column", paddingX: 2, paddingTop: header ? 0 : 1, paddingBottom: 1, children: [
20532
- /* @__PURE__ */ jsx14(Text13, { bold: true, children: title }),
20533
- /* @__PURE__ */ jsx14(Text13, { children: " " }),
20534
- subtitle && /* @__PURE__ */ jsx14(Text13, { color: PALETTE.muted, children: subtitle }),
20535
- /* @__PURE__ */ jsx14(Text13, { children: " " }),
20536
- /* @__PURE__ */ jsxs13(Box13, { flexDirection: "column", children: [
20537
- fields2.map((field, index) => {
20538
- const isActive = index === active;
20539
- const value = values[field.key];
20540
- const display = field.masked ? "\u2022".repeat(value.length) : value;
20541
- return /* @__PURE__ */ jsxs13(Box13, { gap: 1, children: [
20542
- pointer(isActive),
20543
- /* @__PURE__ */ jsx14(Box13, { width: labelWidth, flexShrink: 0, children: /* @__PURE__ */ jsx14(Text13, { bold: isActive, color: isActive ? PALETTE.accent : PALETTE.muted, children: field.label }) }),
20544
- isActive && editing ? /* @__PURE__ */ jsx14(
20545
- ClearableTextInput,
20546
- {
20547
- value,
20548
- onChange: (next) => onChange(field.key, next),
20549
- onSubmit: submitField,
20550
- mask: field.masked ? "\u2022" : void 0
20551
- }
20552
- ) : display ? /* @__PURE__ */ jsx14(Text13, { bold: true, children: display }) : (
20553
- // An empty value shows its hint (or "(empty)") in the value's place, not after an empty element, so the
20554
- // text starts in the same column as every other row's.
20555
- /* @__PURE__ */ jsx14(Text13, { color: PALETTE.muted, children: field.hint ?? "(empty)" })
20556
- ),
20557
- display && field.hint && /* @__PURE__ */ jsx14(Text13, { color: PALETTE.muted, children: field.hint })
20558
- ] }, field.key);
20559
- }),
20560
- actions.map((action, index) => {
20561
- const isActive = fields2.length + index === active;
20562
- return /* @__PURE__ */ jsxs13(Box13, { gap: 1, children: [
20563
- pointer(isActive),
20564
- /* @__PURE__ */ jsx14(Box13, { width: labelWidth, flexShrink: 0, children: /* @__PURE__ */ jsx14(Text13, { bold: isActive, color: isActive ? PALETTE.accent : PALETTE.muted, children: action.label }) }),
20565
- /* @__PURE__ */ jsx14(Text13, { color: action.running ? PALETTE.accent : PALETTE.muted, children: action.running ? action.runningText ?? "running..." : action.description })
20566
- ] }, action.label);
20567
- })
20568
- ] }),
20569
- notice && /* @__PURE__ */ jsxs13(Fragment, { children: [
20570
- /* @__PURE__ */ jsx14(Text13, { children: " " }),
20571
- /* @__PURE__ */ jsxs13(Text13, { color: notice.kind === "success" ? PALETTE.success : PALETTE.error, children: [
20572
- notice.kind === "success" ? "\u2713" : "\u2717",
20573
- " ",
20574
- notice.text
20575
- ] })
20576
- ] }),
20577
- children,
20578
- /* @__PURE__ */ jsx14(Text13, { children: " " }),
20579
- /* @__PURE__ */ jsx14(
20580
- ControlHints,
20581
- {
20582
- hints: editing ? [
20583
- { keys: "type", label: "edit" },
20584
- { keys: "\u2190/\u2192", label: "move cursor" },
20585
- { keys: "\u23CE", label: enterAdvances ? isLastField ? saveLabel : "next" : "done" },
20586
- { keys: "Ctrl+D", label: "clear" },
20587
- { keys: "Esc", label: "cancel edit" }
20588
- ] : [
20589
- { keys: "\u2191/\u2193", label: "move" },
20590
- { keys: "\u23CE", label: currentAction ? currentAction.hint : "edit" },
20591
- ...currentField ? [{ keys: "Ctrl+D", label: "clear" }] : [],
20592
- { keys: "s", label: saveLabel },
20593
- ...onSkip ? [{ keys: "k", label: skipLabel2 }] : [],
20594
- { keys: "Esc/q", label: quitLabel }
20595
- ]
20596
- }
20597
- )
20598
- ] })
20599
- ] });
20600
- }
20601
- var init_FieldForm = __esm({
20602
- "packages/experience-design-system-cli/src/tui/shared/components/FieldForm.tsx"() {
20603
- "use strict";
20604
- init_theme();
20605
- init_ControlHints();
20606
- init_ClearableTextInput();
20672
+ init_MenuScreen();
20673
+ BACK = { choice: "back", label: "Back", description: "Go back" };
20674
+ MENUS = {
20675
+ scanning: [BACK],
20676
+ ready: [
20677
+ { choice: "continue", label: "Continue", description: "Use these files and go on" },
20678
+ { choice: "change-path", label: "Change path", description: "Pick a different folder" },
20679
+ BACK
20680
+ ],
20681
+ failed: [{ choice: "change-path", label: "Try a different path", description: "Pick a different folder" }, BACK]
20682
+ };
20607
20683
  }
20608
20684
  });
20609
20685
 
@@ -20684,71 +20760,8 @@ var init_validate4 = __esm({
20684
20760
 
20685
20761
  // packages/experience-design-system-cli/src/tui/import/steps/04-credentials/screen.tsx
20686
20762
  import { useRef as useRef2, useState as useState9 } from "react";
20687
- import { Box as Box14, Text as Text14, useInput as useInput11 } from "ink";
20688
- import { Fragment as Fragment2, jsx as jsx15, jsxs as jsxs14 } from "react/jsx-runtime";
20689
- function CredentialsReview({
20690
- values,
20691
- subtitle,
20692
- notice,
20693
- validating,
20694
- onChoose,
20695
- children
20696
- }) {
20697
- const [focus, setFocus] = useState9(0);
20698
- useInput11((_input, key) => {
20699
- if (validating) return;
20700
- if (key.escape) onChoose("quit");
20701
- else if (key.return) onChoose(MENU[focus].choice);
20702
- else if (key.upArrow) setFocus((current) => (current - 1 + MENU.length) % MENU.length);
20703
- else if (key.downArrow || key.tab) setFocus((current) => (current + 1) % MENU.length);
20704
- });
20705
- const labelWidth = formLabelWidth([...FIELDS2, ...MENU]);
20706
- return /* @__PURE__ */ jsxs14(Box14, { flexDirection: "column", children: [
20707
- /* @__PURE__ */ jsx15(StepHeader, { step: "setup" }),
20708
- /* @__PURE__ */ jsxs14(Box14, { flexDirection: "column", paddingX: 2, paddingBottom: 1, children: [
20709
- /* @__PURE__ */ jsx15(Text14, { bold: true, children: "Contentful Credentials" }),
20710
- /* @__PURE__ */ jsx15(Text14, { children: " " }),
20711
- /* @__PURE__ */ jsx15(Text14, { color: PALETTE.muted, children: subtitle }),
20712
- /* @__PURE__ */ jsx15(Text14, { children: " " }),
20713
- MENU.map((item, index) => {
20714
- const focused = index === focus;
20715
- return /* @__PURE__ */ jsxs14(Box14, { gap: 1, children: [
20716
- /* @__PURE__ */ jsx15(Text14, { color: focused ? PALETTE.accent : void 0, children: focused ? "\u276F" : " " }),
20717
- /* @__PURE__ */ jsx15(Box14, { width: labelWidth, flexShrink: 0, children: /* @__PURE__ */ jsx15(Text14, { bold: focused, color: focused ? PALETTE.accent : PALETTE.muted, children: item.label }) }),
20718
- /* @__PURE__ */ jsx15(Text14, { color: PALETTE.muted, children: item.description })
20719
- ] }, item.choice);
20720
- }),
20721
- /* @__PURE__ */ jsx15(Text14, { children: " " }),
20722
- FIELDS2.map((field) => {
20723
- const value = values[field.key];
20724
- return /* @__PURE__ */ jsx15(FormReadOnlyRow, { label: field.label, labelWidth, children: /* @__PURE__ */ jsx15(Text14, { bold: value !== "", children: field.masked ? "\u2022".repeat(value.length) : value || "(empty)" }) }, field.key);
20725
- }),
20726
- notice && /* @__PURE__ */ jsxs14(Fragment2, { children: [
20727
- /* @__PURE__ */ jsx15(Text14, { children: " " }),
20728
- /* @__PURE__ */ jsxs14(Text14, { color: PALETTE.error, children: [
20729
- "\u2717 ",
20730
- notice.text
20731
- ] })
20732
- ] }),
20733
- validating && /* @__PURE__ */ jsxs14(Fragment2, { children: [
20734
- /* @__PURE__ */ jsx15(Text14, { children: " " }),
20735
- /* @__PURE__ */ jsx15(Text14, { color: PALETTE.accent, children: "Validating credentials..." })
20736
- ] }),
20737
- children,
20738
- /* @__PURE__ */ jsx15(Text14, { children: " " }),
20739
- /* @__PURE__ */ jsx15(
20740
- ControlHints,
20741
- {
20742
- hints: [
20743
- { keys: "\u2191/\u2193", label: "move" },
20744
- { keys: "\u23CE", label: MENU[focus].label.toLowerCase() },
20745
- { keys: "Esc", label: "back" }
20746
- ]
20747
- }
20748
- )
20749
- ] })
20750
- ] });
20751
- }
20763
+ import { Text as Text14 } from "ink";
20764
+ import { Fragment as Fragment4, jsx as jsx17, jsxs as jsxs14 } from "react/jsx-runtime";
20752
20765
  function CredentialsScreen({
20753
20766
  onDone,
20754
20767
  onBack,
@@ -20791,15 +20804,43 @@ function CredentialsScreen({
20791
20804
  else onBack();
20792
20805
  };
20793
20806
  if (!editing) {
20794
- return /* @__PURE__ */ jsx15(CredentialsReview, { values, subtitle, notice, validating, onChoose: choose, children: !isUnchanged(normalize(values), initialValues) && /* @__PURE__ */ jsxs14(Fragment2, { children: [
20795
- /* @__PURE__ */ jsx15(Text14, { children: " " }),
20796
- /* @__PURE__ */ jsx15(Text14, { color: PALETTE.muted, children: "Changed values are saved after they validate." })
20797
- ] }) });
20807
+ return /* @__PURE__ */ jsxs14(
20808
+ MenuScreen,
20809
+ {
20810
+ title: "Contentful Credentials",
20811
+ subtitle,
20812
+ menu: MENU2,
20813
+ rows: FIELDS2.map((field) => ({
20814
+ label: field.label,
20815
+ value: field.masked ? "\u2022".repeat(values[field.key].length) : values[field.key]
20816
+ })),
20817
+ onChoose: choose,
20818
+ onEscape: onBack,
20819
+ busy: validating,
20820
+ children: [
20821
+ notice && /* @__PURE__ */ jsxs14(Fragment4, { children: [
20822
+ /* @__PURE__ */ jsx17(Text14, { children: " " }),
20823
+ /* @__PURE__ */ jsxs14(Text14, { color: PALETTE.error, children: [
20824
+ "\u2717 ",
20825
+ notice.text
20826
+ ] })
20827
+ ] }),
20828
+ validating && /* @__PURE__ */ jsxs14(Fragment4, { children: [
20829
+ /* @__PURE__ */ jsx17(Text14, { children: " " }),
20830
+ /* @__PURE__ */ jsx17(Text14, { color: PALETTE.accent, children: "Validating credentials..." })
20831
+ ] }),
20832
+ !isUnchanged(normalize(values), initialValues) && /* @__PURE__ */ jsxs14(Fragment4, { children: [
20833
+ /* @__PURE__ */ jsx17(Text14, { children: " " }),
20834
+ /* @__PURE__ */ jsx17(Text14, { color: PALETTE.muted, children: "Changed values are saved after they validate." })
20835
+ ] })
20836
+ ]
20837
+ }
20838
+ );
20798
20839
  }
20799
20840
  return /* @__PURE__ */ jsxs14(
20800
20841
  FieldForm,
20801
20842
  {
20802
- header: /* @__PURE__ */ jsx15(StepHeader, { step: "setup" }),
20843
+ header: /* @__PURE__ */ jsx17(StepHeader, { step: "setup" }),
20803
20844
  title: "Contentful Credentials",
20804
20845
  subtitle,
20805
20846
  fields: FIELDS2,
@@ -20816,30 +20857,30 @@ function CredentialsScreen({
20816
20857
  notice,
20817
20858
  busy: validating,
20818
20859
  children: [
20819
- !prefilled && /* @__PURE__ */ jsxs14(Fragment2, { children: [
20820
- /* @__PURE__ */ jsx15(Text14, { children: " " }),
20821
- /* @__PURE__ */ jsx15(Text14, { color: PALETTE.muted, children: credentialsPurpose(tokensOnly) }),
20822
- /* @__PURE__ */ jsx15(Text14, { color: PALETTE.muted, children: "Tip: save these under Settings \u2192 Configuration so they pre-fill here." })
20860
+ !prefilled && /* @__PURE__ */ jsxs14(Fragment4, { children: [
20861
+ /* @__PURE__ */ jsx17(Text14, { children: " " }),
20862
+ /* @__PURE__ */ jsx17(Text14, { color: PALETTE.muted, children: credentialsPurpose(tokensOnly) }),
20863
+ /* @__PURE__ */ jsx17(Text14, { color: PALETTE.muted, children: "Tip: save these under Settings \u2192 Configuration so they pre-fill here." })
20823
20864
  ] }),
20824
- validating && /* @__PURE__ */ jsxs14(Fragment2, { children: [
20825
- /* @__PURE__ */ jsx15(Text14, { children: " " }),
20826
- /* @__PURE__ */ jsx15(Text14, { color: PALETTE.accent, children: "Validating credentials..." })
20865
+ validating && /* @__PURE__ */ jsxs14(Fragment4, { children: [
20866
+ /* @__PURE__ */ jsx17(Text14, { children: " " }),
20867
+ /* @__PURE__ */ jsx17(Text14, { color: PALETTE.accent, children: "Validating credentials..." })
20827
20868
  ] }),
20828
- !validating && !notice && !isUnchanged(normalize(values), initialValues) && /* @__PURE__ */ jsxs14(Fragment2, { children: [
20829
- /* @__PURE__ */ jsx15(Text14, { children: " " }),
20830
- /* @__PURE__ */ jsx15(Text14, { color: PALETTE.muted, children: "Changed values are saved after they validate." })
20869
+ !validating && !notice && !isUnchanged(normalize(values), initialValues) && /* @__PURE__ */ jsxs14(Fragment4, { children: [
20870
+ /* @__PURE__ */ jsx17(Text14, { children: " " }),
20871
+ /* @__PURE__ */ jsx17(Text14, { color: PALETTE.muted, children: "Changed values are saved after they validate." })
20831
20872
  ] })
20832
20873
  ]
20833
20874
  }
20834
20875
  );
20835
20876
  }
20836
- var FIELDS2, MENU;
20877
+ var FIELDS2, MENU2;
20837
20878
  var init_screen5 = __esm({
20838
20879
  "packages/experience-design-system-cli/src/tui/import/steps/04-credentials/screen.tsx"() {
20839
20880
  "use strict";
20840
20881
  init_theme();
20841
20882
  init_FieldForm();
20842
- init_ControlHints();
20883
+ init_MenuScreen();
20843
20884
  init_StepHeader();
20844
20885
  init_logic8();
20845
20886
  init_validate4();
@@ -20849,7 +20890,7 @@ var init_screen5 = __esm({
20849
20890
  { key: "cmaToken", label: "CMA Token", masked: true },
20850
20891
  { key: "host", label: "API Host", hint: "(default: api.contentful.com \xB7 EU spaces: api.eu.contentful.com)" }
20851
20892
  ];
20852
- MENU = [
20893
+ MENU2 = [
20853
20894
  { choice: "continue", label: "Continue", description: "Check the credentials and go on" },
20854
20895
  { choice: "edit", label: "Edit", description: "Change the credentials" },
20855
20896
  { choice: "skip", label: "Skip", description: "Save files only, nothing is pushed" },
@@ -20946,9 +20987,9 @@ var init_logic9 = __esm({
20946
20987
  });
20947
20988
 
20948
20989
  // packages/experience-design-system-cli/src/tui/import/steps/06-extraction/screen.tsx
20949
- import { jsx as jsx16 } from "react/jsx-runtime";
20990
+ import { jsx as jsx18 } from "react/jsx-runtime";
20950
20991
  function ExtractionScreen({ progress, agent }) {
20951
- return /* @__PURE__ */ jsx16(
20992
+ return /* @__PURE__ */ jsx18(
20952
20993
  RunningStep,
20953
20994
  {
20954
20995
  step: "extraction",
@@ -21464,8 +21505,8 @@ var init_columns = __esm({
21464
21505
  });
21465
21506
 
21466
21507
  // packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/windowed-panel.tsx
21467
- import { Box as Box15, Text as Text15 } from "ink";
21468
- import { jsx as jsx17, jsxs as jsxs15 } from "react/jsx-runtime";
21508
+ import { Box as Box14, Text as Text15 } from "ink";
21509
+ import { jsx as jsx19, jsxs as jsxs15 } from "react/jsx-runtime";
21469
21510
  function terminalPanelHeight(rows, reservedRows = 4) {
21470
21511
  return Math.max(MIN_TERMINAL_PANEL_HEIGHT, rows - reservedRows);
21471
21512
  }
@@ -21480,8 +21521,8 @@ function FixedPanel({
21480
21521
  clipOverflow = true,
21481
21522
  children
21482
21523
  }) {
21483
- return /* @__PURE__ */ jsx17(
21484
- Box15,
21524
+ return /* @__PURE__ */ jsx19(
21525
+ Box14,
21485
21526
  {
21486
21527
  flexDirection: "column",
21487
21528
  width,
@@ -21506,7 +21547,7 @@ function WindowedPanel({ width, height, title, focused, children }) {
21506
21547
  ...height === void 0 ? {} : { height },
21507
21548
  focused,
21508
21549
  children: [
21509
- title && /* @__PURE__ */ jsx17(WindowedPanelHeader, { title, width, focused }),
21550
+ title && /* @__PURE__ */ jsx19(WindowedPanelHeader, { title, width, focused }),
21510
21551
  children
21511
21552
  ]
21512
21553
  }
@@ -21517,9 +21558,9 @@ function WindowedPanelHeader({
21517
21558
  width,
21518
21559
  focused
21519
21560
  }) {
21520
- return /* @__PURE__ */ jsxs15(Box15, { flexDirection: "column", children: [
21521
- /* @__PURE__ */ jsx17(Text15, { bold: true, color: PALETTE.accent, inverse: focused, children: title }),
21522
- /* @__PURE__ */ jsx17(Text15, { color: PALETTE.muted, children: "\u2500".repeat(Math.max(0, width - 2)) })
21561
+ return /* @__PURE__ */ jsxs15(Box14, { flexDirection: "column", children: [
21562
+ /* @__PURE__ */ jsx19(Text15, { bold: true, color: PALETTE.accent, inverse: focused, children: title }),
21563
+ /* @__PURE__ */ jsx19(Text15, { color: PALETTE.muted, children: "\u2500".repeat(Math.max(0, width - 2)) })
21523
21564
  ] });
21524
21565
  }
21525
21566
  function formatWindowIndicator(direction, count) {
@@ -21528,10 +21569,10 @@ function formatWindowIndicator(direction, count) {
21528
21569
  }
21529
21570
  function WindowFooter({ above, below }) {
21530
21571
  const parts = [above > 0 ? `\u2191 ${above}` : "", below > 0 ? `\u2193 ${below}` : ""].filter(Boolean);
21531
- return /* @__PURE__ */ jsx17(Text15, { color: PALETTE.muted, children: parts.length === 0 ? " " : `${parts.join(" \xB7 ")} more` });
21572
+ return /* @__PURE__ */ jsx19(Text15, { color: PALETTE.muted, children: parts.length === 0 ? " " : `${parts.join(" \xB7 ")} more` });
21532
21573
  }
21533
21574
  function WindowIndicator({ direction, count }) {
21534
- return /* @__PURE__ */ jsx17(Text15, { color: PALETTE.muted, children: formatWindowIndicator(direction, count) });
21575
+ return /* @__PURE__ */ jsx19(Text15, { color: PALETTE.muted, children: formatWindowIndicator(direction, count) });
21535
21576
  }
21536
21577
  var MIN_TERMINAL_PANEL_HEIGHT;
21537
21578
  var init_windowed_panel = __esm({
@@ -21544,17 +21585,17 @@ var init_windowed_panel = __esm({
21544
21585
 
21545
21586
  // packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/panels/added-column.tsx
21546
21587
  import React10 from "react";
21547
- import { Box as Box16, Text as Text16 } from "ink";
21588
+ import { Box as Box15, Text as Text16 } from "ink";
21548
21589
  import figures2 from "figures";
21549
- import { jsx as jsx18, jsxs as jsxs16 } from "react/jsx-runtime";
21590
+ import { jsx as jsx20, jsxs as jsxs16 } from "react/jsx-runtime";
21550
21591
  function AddedColumn(props) {
21551
21592
  const { title, width, height, entries, cursor, focused, aiFlaggedByKey, visibleCount } = props;
21552
21593
  const reserveAiBadge = entries.some((e) => aiFlaggedByKey?.get(e.name) === true);
21553
21594
  const firstNonCycleIdx = entries.findIndex((e) => !e.isCycle);
21554
21595
  const window = computeColumnWindow(entries.length, cursor, Math.max(1, visibleCount));
21555
21596
  return /* @__PURE__ */ jsxs16(WindowedPanel, { width, height, title, focused, children: [
21556
- /* @__PURE__ */ jsx18(WindowIndicator, { direction: "up", count: window.above }),
21557
- entries.length === 0 ? /* @__PURE__ */ jsx18(Text16, { color: PALETTE.muted, children: "(none)" }) : entries.slice(window.start, window.end).map((entry, vi) => {
21597
+ /* @__PURE__ */ jsx20(WindowIndicator, { direction: "up", count: window.above }),
21598
+ entries.length === 0 ? /* @__PURE__ */ jsx20(Text16, { color: PALETTE.muted, children: "(none)" }) : entries.slice(window.start, window.end).map((entry, vi) => {
21558
21599
  const i = window.start + vi;
21559
21600
  const isSelected = i === cursor;
21560
21601
  const isCursor = focused && isSelected;
@@ -21562,12 +21603,12 @@ function AddedColumn(props) {
21562
21603
  const showSeparator = firstNonCycleIdx > 0 && i === firstNonCycleIdx;
21563
21604
  const style = sideColumnLabelStyle({ isCycle: entry.isCycle, isSelected, focused });
21564
21605
  return /* @__PURE__ */ jsxs16(React10.Fragment, { children: [
21565
- showSeparator && /* @__PURE__ */ jsx18(Text16, { color: PALETTE.muted, children: "\u2500".repeat(Math.max(0, width - 2)) }),
21566
- /* @__PURE__ */ jsxs16(Box16, { children: [
21567
- isCursor ? /* @__PURE__ */ jsx18(Text16, { color: PALETTE.accent, bold: true, children: figures2.pointer }) : /* @__PURE__ */ jsx18(Text16, { children: " " }),
21568
- reserveAiBadge && (aiFlagged ? /* @__PURE__ */ jsx18(Text16, { color: PALETTE.warning, bold: true, children: " [\xD7]" }) : /* @__PURE__ */ jsx18(Text16, { children: " " })),
21569
- entry.isCycle && /* @__PURE__ */ jsx18(Text16, { color: isCursor ? PALETTE.accent : PALETTE.warning, bold: true, underline: style.nameUnderline, children: " \u26A0" }),
21570
- /* @__PURE__ */ jsx18(
21606
+ showSeparator && /* @__PURE__ */ jsx20(Text16, { color: PALETTE.muted, children: "\u2500".repeat(Math.max(0, width - 2)) }),
21607
+ /* @__PURE__ */ jsxs16(Box15, { children: [
21608
+ isCursor ? /* @__PURE__ */ jsx20(Text16, { color: PALETTE.accent, bold: true, children: figures2.pointer }) : /* @__PURE__ */ jsx20(Text16, { children: " " }),
21609
+ reserveAiBadge && (aiFlagged ? /* @__PURE__ */ jsx20(Text16, { color: PALETTE.warning, bold: true, children: " [\xD7]" }) : /* @__PURE__ */ jsx20(Text16, { children: " " })),
21610
+ entry.isCycle && /* @__PURE__ */ jsx20(Text16, { color: isCursor ? PALETTE.accent : PALETTE.warning, bold: true, underline: style.nameUnderline, children: " \u26A0" }),
21611
+ /* @__PURE__ */ jsx20(
21571
21612
  Text16,
21572
21613
  {
21573
21614
  color: style.nameColor,
@@ -21581,7 +21622,7 @@ function AddedColumn(props) {
21581
21622
  ] })
21582
21623
  ] }, entry.name);
21583
21624
  }),
21584
- /* @__PURE__ */ jsx18(WindowIndicator, { direction: "down", count: window.below })
21625
+ /* @__PURE__ */ jsx20(WindowIndicator, { direction: "down", count: window.below })
21585
21626
  ] });
21586
21627
  }
21587
21628
  var init_added_column = __esm({
@@ -21594,9 +21635,9 @@ var init_added_column = __esm({
21594
21635
  });
21595
21636
 
21596
21637
  // packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/panels/cycles-panel.tsx
21597
- import { Box as Box17, Text as Text17 } from "ink";
21638
+ import { Box as Box16, Text as Text17 } from "ink";
21598
21639
  import figures3 from "figures";
21599
- import { jsx as jsx19, jsxs as jsxs17 } from "react/jsx-runtime";
21640
+ import { jsx as jsx21, jsxs as jsxs17 } from "react/jsx-runtime";
21600
21641
  function cycleLabel(cycle, index) {
21601
21642
  const parts = [];
21602
21643
  for (let i = 0; i < cycle.edges.length; i++) {
@@ -21607,17 +21648,17 @@ function cycleLabel(cycle, index) {
21607
21648
  return `Cycle ${index + 1}: ${parts.join(" \u2192 ")}`;
21608
21649
  }
21609
21650
  function CyclesPanel({ cycles, cursor }) {
21610
- return /* @__PURE__ */ jsxs17(Box17, { flexDirection: "column", borderStyle: "single", borderColor: PALETTE.warning, paddingX: 1, marginTop: 1, children: [
21611
- /* @__PURE__ */ jsx19(Text17, { bold: true, color: PALETTE.warning, children: `Cycles detected (${cycles.length}):` }),
21612
- /* @__PURE__ */ jsx19(Text17, { children: " " }),
21651
+ return /* @__PURE__ */ jsxs17(Box16, { flexDirection: "column", borderStyle: "single", borderColor: PALETTE.warning, paddingX: 1, marginTop: 1, children: [
21652
+ /* @__PURE__ */ jsx21(Text17, { bold: true, color: PALETTE.warning, children: `Cycles detected (${cycles.length}):` }),
21653
+ /* @__PURE__ */ jsx21(Text17, { children: " " }),
21613
21654
  cycles.map((cycle, i) => {
21614
21655
  const isCursor = i === cursor;
21615
21656
  return /* @__PURE__ */ jsxs17(Text17, { children: [
21616
- isCursor ? /* @__PURE__ */ jsx19(Text17, { color: PALETTE.accent, bold: true, children: figures3.pointer }) : /* @__PURE__ */ jsx19(Text17, { children: " " }),
21617
- /* @__PURE__ */ jsx19(Text17, { color: PALETTE.warning, inverse: isCursor, children: " " + cycleLabel(cycle, i) })
21657
+ isCursor ? /* @__PURE__ */ jsx21(Text17, { color: PALETTE.accent, bold: true, children: figures3.pointer }) : /* @__PURE__ */ jsx21(Text17, { children: " " }),
21658
+ /* @__PURE__ */ jsx21(Text17, { color: PALETTE.warning, inverse: isCursor, children: " " + cycleLabel(cycle, i) })
21618
21659
  ] }, i);
21619
21660
  }),
21620
- /* @__PURE__ */ jsx19(Text17, { children: "[\u2191/\u2193] move \xB7 [Enter] jump \xB7 [c/Esc] close" })
21661
+ /* @__PURE__ */ jsx21(Text17, { children: "[\u2191/\u2193] move \xB7 [Enter] jump \xB7 [c/Esc] close" })
21621
21662
  ] });
21622
21663
  }
21623
21664
  var init_cycles_panel = __esm({
@@ -21628,14 +21669,14 @@ var init_cycles_panel = __esm({
21628
21669
  });
21629
21670
 
21630
21671
  // packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/panels/reject-prompt.tsx
21631
- import { Box as Box18, Text as Text18 } from "ink";
21632
- import { jsx as jsx20, jsxs as jsxs18 } from "react/jsx-runtime";
21672
+ import { Box as Box17, Text as Text18 } from "ink";
21673
+ import { jsx as jsx22, jsxs as jsxs18 } from "react/jsx-runtime";
21633
21674
  function RejectPrompt({ pending }) {
21634
- return /* @__PURE__ */ jsxs18(Box18, { flexDirection: "column", borderStyle: "single", borderColor: PALETTE.warning, paddingX: 1, marginTop: 1, children: [
21635
- /* @__PURE__ */ jsx20(Text18, { bold: true, color: PALETTE.warning, children: `Rejecting ${pending.target} will:` }),
21636
- pending.ancestors.length > 0 && /* @__PURE__ */ jsx20(Text18, { children: `- Reject ancestors: ${pending.ancestors.join(", ")}` }),
21637
- pending.descendants.length > 0 && /* @__PURE__ */ jsx20(Text18, { children: `- Deselect descendants: ${pending.descendants.join(", ")}` }),
21638
- /* @__PURE__ */ jsx20(Text18, { children: "[y] confirm \xB7 [n]/[Esc] cancel" })
21675
+ return /* @__PURE__ */ jsxs18(Box17, { flexDirection: "column", borderStyle: "single", borderColor: PALETTE.warning, paddingX: 1, marginTop: 1, children: [
21676
+ /* @__PURE__ */ jsx22(Text18, { bold: true, color: PALETTE.warning, children: `Rejecting ${pending.target} will:` }),
21677
+ pending.ancestors.length > 0 && /* @__PURE__ */ jsx22(Text18, { children: `- Reject ancestors: ${pending.ancestors.join(", ")}` }),
21678
+ pending.descendants.length > 0 && /* @__PURE__ */ jsx22(Text18, { children: `- Deselect descendants: ${pending.descendants.join(", ")}` }),
21679
+ /* @__PURE__ */ jsx22(Text18, { children: "[y] confirm \xB7 [n]/[Esc] cancel" })
21639
21680
  ] });
21640
21681
  }
21641
21682
  var init_reject_prompt = __esm({
@@ -21646,9 +21687,9 @@ var init_reject_prompt = __esm({
21646
21687
  });
21647
21688
 
21648
21689
  // packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/CompactControlBar.tsx
21649
- import { jsx as jsx21 } from "react/jsx-runtime";
21690
+ import { jsx as jsx23 } from "react/jsx-runtime";
21650
21691
  function CompactControlBar({ hasGroupRoots, searchActive }) {
21651
- return /* @__PURE__ */ jsx21(
21692
+ return /* @__PURE__ */ jsx23(
21652
21693
  ControlHints,
21653
21694
  {
21654
21695
  hints: [
@@ -21671,8 +21712,8 @@ var init_CompactControlBar = __esm({
21671
21712
  });
21672
21713
 
21673
21714
  // packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/CounterStrip.tsx
21674
- import { Box as Box19, Text as Text19 } from "ink";
21675
- import { jsx as jsx22, jsxs as jsxs19 } from "react/jsx-runtime";
21715
+ import { Box as Box18, Text as Text19 } from "ink";
21716
+ import { jsx as jsx24, jsxs as jsxs19 } from "react/jsx-runtime";
21676
21717
  function CounterStrip(props) {
21677
21718
  const { counters, totalWidth } = props;
21678
21719
  const condensed = totalWidth < 60;
@@ -21680,25 +21721,25 @@ function CounterStrip(props) {
21680
21721
  const labelRej = condensed ? "Rej" : "Rejected";
21681
21722
  const labelUnd = condensed ? "Und" : "Undecided";
21682
21723
  const sep = condensed ? " | " : " ";
21683
- return /* @__PURE__ */ jsx22(Box19, { children: /* @__PURE__ */ jsxs19(Text19, { children: [
21724
+ return /* @__PURE__ */ jsx24(Box18, { children: /* @__PURE__ */ jsxs19(Text19, { children: [
21684
21725
  /* @__PURE__ */ jsxs19(Text19, { color: PALETTE.muted, children: [
21685
21726
  labelGrp,
21686
21727
  " "
21687
21728
  ] }),
21688
- /* @__PURE__ */ jsx22(Text19, { bold: true, children: counters.groups }),
21689
- /* @__PURE__ */ jsx22(Text19, { color: PALETTE.muted, children: sep }),
21729
+ /* @__PURE__ */ jsx24(Text19, { bold: true, children: counters.groups }),
21730
+ /* @__PURE__ */ jsx24(Text19, { color: PALETTE.muted, children: sep }),
21690
21731
  /* @__PURE__ */ jsxs19(Text19, { color: PALETTE.muted, children: [
21691
21732
  labelRej,
21692
21733
  " "
21693
21734
  ] }),
21694
- /* @__PURE__ */ jsx22(Text19, { bold: true, children: counters.rejected }),
21695
- /* @__PURE__ */ jsx22(Text19, { color: PALETTE.muted, children: sep }),
21735
+ /* @__PURE__ */ jsx24(Text19, { bold: true, children: counters.rejected }),
21736
+ /* @__PURE__ */ jsx24(Text19, { color: PALETTE.muted, children: sep }),
21696
21737
  /* @__PURE__ */ jsxs19(Text19, { color: PALETTE.muted, children: [
21697
21738
  labelUnd,
21698
21739
  " "
21699
21740
  ] }),
21700
- /* @__PURE__ */ jsx22(Text19, { bold: true, children: counters.undecided }),
21701
- /* @__PURE__ */ jsx22(Text19, { color: PALETTE.muted, children: sep })
21741
+ /* @__PURE__ */ jsx24(Text19, { bold: true, children: counters.undecided }),
21742
+ /* @__PURE__ */ jsx24(Text19, { color: PALETTE.muted, children: sep })
21702
21743
  ] }) });
21703
21744
  }
21704
21745
  var init_CounterStrip = __esm({
@@ -21710,8 +21751,8 @@ var init_CounterStrip = __esm({
21710
21751
 
21711
21752
  // packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/GotoBanner.tsx
21712
21753
  import figures4 from "figures";
21713
- import { Box as Box20, Text as Text20 } from "ink";
21714
- import { jsx as jsx23, jsxs as jsxs20 } from "react/jsx-runtime";
21754
+ import { Box as Box19, Text as Text20 } from "ink";
21755
+ import { jsx as jsx25, jsxs as jsxs20 } from "react/jsx-runtime";
21715
21756
  function windowStart(rowCount, highlightIndex, maxRows) {
21716
21757
  if (rowCount <= maxRows) return 0;
21717
21758
  const maxStart = rowCount - maxRows;
@@ -21722,8 +21763,8 @@ function windowStart(rowCount, highlightIndex, maxRows) {
21722
21763
  }
21723
21764
  function defaultRenderRow(row, index, isCursor) {
21724
21765
  return /* @__PURE__ */ jsxs20(Text20, { children: [
21725
- isCursor ? /* @__PURE__ */ jsx23(Text20, { color: PALETTE.accent, bold: true, children: figures4.pointer }) : /* @__PURE__ */ jsx23(Text20, { children: " " }),
21726
- /* @__PURE__ */ jsx23(Text20, { inverse: isCursor, children: " " + row.label })
21766
+ isCursor ? /* @__PURE__ */ jsx25(Text20, { color: PALETTE.accent, bold: true, children: figures4.pointer }) : /* @__PURE__ */ jsx25(Text20, { children: " " }),
21767
+ /* @__PURE__ */ jsx25(Text20, { inverse: isCursor, children: " " + row.label })
21727
21768
  ] }, index);
21728
21769
  }
21729
21770
  function GotoBanner({
@@ -21743,7 +21784,7 @@ function GotoBanner({
21743
21784
  const moreAbove = start;
21744
21785
  const moreBelow = rows.length - end;
21745
21786
  return /* @__PURE__ */ jsxs20(
21746
- Box20,
21787
+ Box19,
21747
21788
  {
21748
21789
  flexDirection: "column",
21749
21790
  borderStyle: "single",
@@ -21753,14 +21794,14 @@ function GotoBanner({
21753
21794
  width,
21754
21795
  flexShrink: 0,
21755
21796
  children: [
21756
- /* @__PURE__ */ jsx23(Text20, { bold: true, children: title }),
21757
- moreAbove > 0 && /* @__PURE__ */ jsx23(Text20, { color: PALETTE.muted, children: ` \u25B2 ${moreAbove} more` }),
21797
+ /* @__PURE__ */ jsx25(Text20, { bold: true, children: title }),
21798
+ moreAbove > 0 && /* @__PURE__ */ jsx25(Text20, { color: PALETTE.muted, children: ` \u25B2 ${moreAbove} more` }),
21758
21799
  visible.map((row, vi) => {
21759
21800
  const i = start + vi;
21760
21801
  return renderRow(row, i, i === highlightIndex);
21761
21802
  }),
21762
- moreBelow > 0 && /* @__PURE__ */ jsx23(Text20, { color: PALETTE.muted, children: ` \u25BC ${moreBelow} more` }),
21763
- footerHint !== void 0 && /* @__PURE__ */ jsx23(Text20, { color: PALETTE.muted, children: footerHint })
21803
+ moreBelow > 0 && /* @__PURE__ */ jsx25(Text20, { color: PALETTE.muted, children: ` \u25BC ${moreBelow} more` }),
21804
+ footerHint !== void 0 && /* @__PURE__ */ jsx25(Text20, { color: PALETTE.muted, children: footerHint })
21764
21805
  ]
21765
21806
  }
21766
21807
  );
@@ -22124,7 +22165,7 @@ var init_composite_closure = __esm({
22124
22165
 
22125
22166
  // packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/badge.tsx
22126
22167
  import { Text as Text21 } from "ink";
22127
- import { jsx as jsx24 } from "react/jsx-runtime";
22168
+ import { jsx as jsx26 } from "react/jsx-runtime";
22128
22169
  function previewBadge(annotation) {
22129
22170
  switch (annotation) {
22130
22171
  case "new":
@@ -22143,7 +22184,7 @@ function PreviewBadge({
22143
22184
  badge,
22144
22185
  highlighted = false
22145
22186
  }) {
22146
- return badge ? /* @__PURE__ */ jsx24(Text21, { color: !highlighted && badge.dim ? PALETTE.muted : badge.color, bold: badge.bold, children: badge.char }) : /* @__PURE__ */ jsx24(Text21, { children: " " });
22187
+ return badge ? /* @__PURE__ */ jsx26(Text21, { color: !highlighted && badge.dim ? PALETTE.muted : badge.color, bold: badge.bold, children: badge.char }) : /* @__PURE__ */ jsx26(Text21, { children: " " });
22147
22188
  }
22148
22189
  var init_badge = __esm({
22149
22190
  "packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/badge.tsx"() {
@@ -22154,8 +22195,8 @@ var init_badge = __esm({
22154
22195
 
22155
22196
  // packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/GroupedSidebar.tsx
22156
22197
  import figures5 from "figures";
22157
- import { Box as Box21, Text as Text22 } from "ink";
22158
- import { jsx as jsx25, jsxs as jsxs21 } from "react/jsx-runtime";
22198
+ import { Box as Box20, Text as Text22 } from "ink";
22199
+ import { jsx as jsx27, jsxs as jsxs21 } from "react/jsx-runtime";
22159
22200
  function hasDirectChild(node) {
22160
22201
  return node.slots.some((slot) => (slot.allowedComponents ?? []).some((target) => target !== node.name));
22161
22202
  }
@@ -22605,11 +22646,11 @@ function GroupedSidebar(props) {
22605
22646
  isOwn: rs?.isOwn ?? false,
22606
22647
  isCursor
22607
22648
  });
22608
- return /* @__PURE__ */ jsxs21(Box21, { children: [
22609
- isCursor ? /* @__PURE__ */ jsx25(Text22, { color: PALETTE.accent, bold: true, children: figures5.pointer }) : /* @__PURE__ */ jsx25(Text22, { children: " " }),
22610
- /* @__PURE__ */ jsx25(PreviewBadge, { badge, highlighted: isSelected }),
22611
- selectionStateByKey !== void 0 && (selGlyph && !isSynthetic ? /* @__PURE__ */ jsx25(Text22, { color: !isSelected && selDim ? PALETTE.muted : selColor, bold: selBold, children: " " + selGlyph }) : /* @__PURE__ */ jsx25(Text22, { children: " " })),
22612
- aiFlaggedByKey !== void 0 && (aiFlagged ? /* @__PURE__ */ jsx25(Text22, { color: PALETTE.warning, bold: true, children: " [\xD7]" }) : /* @__PURE__ */ jsx25(Text22, { children: " " })),
22649
+ return /* @__PURE__ */ jsxs21(Box20, { children: [
22650
+ isCursor ? /* @__PURE__ */ jsx27(Text22, { color: PALETTE.accent, bold: true, children: figures5.pointer }) : /* @__PURE__ */ jsx27(Text22, { children: " " }),
22651
+ /* @__PURE__ */ jsx27(PreviewBadge, { badge, highlighted: isSelected }),
22652
+ selectionStateByKey !== void 0 && (selGlyph && !isSynthetic ? /* @__PURE__ */ jsx27(Text22, { color: !isSelected && selDim ? PALETTE.muted : selColor, bold: selBold, children: " " + selGlyph }) : /* @__PURE__ */ jsx27(Text22, { children: " " })),
22653
+ aiFlaggedByKey !== void 0 && (aiFlagged ? /* @__PURE__ */ jsx27(Text22, { color: PALETTE.warning, bold: true, children: " [\xD7]" }) : /* @__PURE__ */ jsx27(Text22, { children: " " })),
22613
22654
  /* @__PURE__ */ jsxs21(
22614
22655
  Text22,
22615
22656
  {
@@ -22624,10 +22665,10 @@ function GroupedSidebar(props) {
22624
22665
  ]
22625
22666
  }
22626
22667
  ),
22627
- inheritanceStyle.glyph && /* @__PURE__ */ jsx25(Text22, { color: inheritanceStyle.dim ? PALETTE.muted : inheritanceStyle.color, bold: inheritanceStyle.bold, children: " " + inheritanceStyle.glyph })
22668
+ inheritanceStyle.glyph && /* @__PURE__ */ jsx27(Text22, { color: inheritanceStyle.dim ? PALETTE.muted : inheritanceStyle.color, bold: inheritanceStyle.bold, children: " " + inheritanceStyle.glyph })
22628
22669
  ] }, row.key);
22629
22670
  }),
22630
- windowed && /* @__PURE__ */ jsx25(WindowFooter, { above: start, below: Math.max(0, allRows.length - end) })
22671
+ windowed && /* @__PURE__ */ jsx27(WindowFooter, { above: start, below: Math.max(0, allRows.length - end) })
22631
22672
  ] });
22632
22673
  }
22633
22674
  var GLYPH_EXPAND_COLLAPSED, GLYPH_EXPAND_EXPANDED, GLYPH_TREE_MID, GLYPH_TREE_LAST, GLYPH_WARN, GLYPH_ERROR;
@@ -22756,8 +22797,8 @@ var init_use_terminal_size = __esm({
22756
22797
 
22757
22798
  // packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/HelpOverlay.tsx
22758
22799
  import React11 from "react";
22759
- import { Box as Box22, Text as Text23 } from "ink";
22760
- import { Fragment as Fragment3, jsx as jsx26, jsxs as jsxs22 } from "react/jsx-runtime";
22800
+ import { Box as Box21, Text as Text23 } from "ink";
22801
+ import { Fragment as Fragment5, jsx as jsx28, jsxs as jsxs22 } from "react/jsx-runtime";
22761
22802
  function HelpOverlay(props) {
22762
22803
  const { onClose } = props;
22763
22804
  const { columns: terminalColumns, rows: terminalRows } = useTerminalSize();
@@ -22769,7 +22810,7 @@ function HelpOverlay(props) {
22769
22810
  }, props.handleInput !== false);
22770
22811
  if (props.sections) {
22771
22812
  return /* @__PURE__ */ jsxs22(
22772
- Box22,
22813
+ Box21,
22773
22814
  {
22774
22815
  flexDirection: "column",
22775
22816
  borderStyle: "round",
@@ -22778,11 +22819,11 @@ function HelpOverlay(props) {
22778
22819
  height: panelHeight,
22779
22820
  overflowY: "hidden",
22780
22821
  children: [
22781
- /* @__PURE__ */ jsx26(Text23, { bold: true, children: "\u2500".repeat(titleRule) + " Help " + "\u2500".repeat(titleRule) }),
22822
+ /* @__PURE__ */ jsx28(Text23, { bold: true, children: "\u2500".repeat(titleRule) + " Help " + "\u2500".repeat(titleRule) }),
22782
22823
  props.sections.map((section) => /* @__PURE__ */ jsxs22(React11.Fragment, { children: [
22783
- /* @__PURE__ */ jsx26(Text23, { children: " " }),
22784
- /* @__PURE__ */ jsx26(Text23, { bold: true, children: section.title }),
22785
- section.entries.map((entry) => /* @__PURE__ */ jsx26(Text23, { children: entry.keys ? " " + entry.keys.padEnd(16) + " " + entry.label : " " + entry.label }, entry.keys + entry.label))
22824
+ /* @__PURE__ */ jsx28(Text23, { children: " " }),
22825
+ /* @__PURE__ */ jsx28(Text23, { bold: true, children: section.title }),
22826
+ section.entries.map((entry) => /* @__PURE__ */ jsx28(Text23, { children: entry.keys ? " " + entry.keys.padEnd(16) + " " + entry.label : " " + entry.label }, entry.keys + entry.label))
22786
22827
  ] }, section.title))
22787
22828
  ]
22788
22829
  }
@@ -22790,7 +22831,7 @@ function HelpOverlay(props) {
22790
22831
  }
22791
22832
  const mode = props.mode;
22792
22833
  return /* @__PURE__ */ jsxs22(
22793
- Box22,
22834
+ Box21,
22794
22835
  {
22795
22836
  flexDirection: "column",
22796
22837
  borderStyle: "round",
@@ -22799,31 +22840,31 @@ function HelpOverlay(props) {
22799
22840
  height: panelHeight,
22800
22841
  overflowY: "hidden",
22801
22842
  children: [
22802
- /* @__PURE__ */ jsx26(Text23, { bold: true, children: "\u2500".repeat(titleRule) + " Help " + "\u2500".repeat(titleRule) }),
22803
- /* @__PURE__ */ jsx26(Text23, { children: " " }),
22804
- /* @__PURE__ */ jsx26(Text23, { bold: true, children: "Navigation" }),
22805
- /* @__PURE__ */ jsx26(Text23, { children: " \u2191 / k / PgUp Scroll up" }),
22806
- /* @__PURE__ */ jsx26(Text23, { children: " \u2193 / j / PgDn Scroll down" }),
22807
- /* @__PURE__ */ jsx26(Text23, { children: " g / Home Jump to top" }),
22808
- /* @__PURE__ */ jsx26(Text23, { children: " G / End Jump to bottom" }),
22809
- mode === "review" && /* @__PURE__ */ jsxs22(Fragment3, { children: [
22810
- /* @__PURE__ */ jsx26(Text23, { children: " " }),
22811
- /* @__PURE__ */ jsx26(Text23, { bold: true, children: "[Review mode only]" }),
22812
- /* @__PURE__ */ jsx26(Text23, { children: " Tab Toggle sidebar/detail" }),
22813
- /* @__PURE__ */ jsx26(Text23, { children: " a Accept component" }),
22814
- /* @__PURE__ */ jsx26(Text23, { children: " r Reject component" }),
22815
- /* @__PURE__ */ jsx26(Text23, { children: " e Edit proposal" }),
22816
- /* @__PURE__ */ jsx26(Text23, { children: " s Toggle source code" }),
22817
- /* @__PURE__ */ jsx26(Text23, { children: " A Approve all" }),
22818
- /* @__PURE__ */ jsx26(Text23, { children: " F Open finalize dialog" }),
22819
- /* @__PURE__ */ jsx26(Text23, { children: " Ctrl+S Save draft" }),
22820
- /* @__PURE__ */ jsx26(Text23, { children: " Ctrl+Z Undo" }),
22821
- /* @__PURE__ */ jsx26(Text23, { children: " Ctrl+Y Redo" }),
22822
- /* @__PURE__ */ jsx26(Text23, { children: " Esc Exit edit / close" })
22843
+ /* @__PURE__ */ jsx28(Text23, { bold: true, children: "\u2500".repeat(titleRule) + " Help " + "\u2500".repeat(titleRule) }),
22844
+ /* @__PURE__ */ jsx28(Text23, { children: " " }),
22845
+ /* @__PURE__ */ jsx28(Text23, { bold: true, children: "Navigation" }),
22846
+ /* @__PURE__ */ jsx28(Text23, { children: " \u2191 / k / PgUp Scroll up" }),
22847
+ /* @__PURE__ */ jsx28(Text23, { children: " \u2193 / j / PgDn Scroll down" }),
22848
+ /* @__PURE__ */ jsx28(Text23, { children: " g / Home Jump to top" }),
22849
+ /* @__PURE__ */ jsx28(Text23, { children: " G / End Jump to bottom" }),
22850
+ mode === "review" && /* @__PURE__ */ jsxs22(Fragment5, { children: [
22851
+ /* @__PURE__ */ jsx28(Text23, { children: " " }),
22852
+ /* @__PURE__ */ jsx28(Text23, { bold: true, children: "[Review mode only]" }),
22853
+ /* @__PURE__ */ jsx28(Text23, { children: " Tab Toggle sidebar/detail" }),
22854
+ /* @__PURE__ */ jsx28(Text23, { children: " a Accept component" }),
22855
+ /* @__PURE__ */ jsx28(Text23, { children: " r Reject component" }),
22856
+ /* @__PURE__ */ jsx28(Text23, { children: " e Edit proposal" }),
22857
+ /* @__PURE__ */ jsx28(Text23, { children: " s Toggle source code" }),
22858
+ /* @__PURE__ */ jsx28(Text23, { children: " A Approve all" }),
22859
+ /* @__PURE__ */ jsx28(Text23, { children: " F Open finalize dialog" }),
22860
+ /* @__PURE__ */ jsx28(Text23, { children: " Ctrl+S Save draft" }),
22861
+ /* @__PURE__ */ jsx28(Text23, { children: " Ctrl+Z Undo" }),
22862
+ /* @__PURE__ */ jsx28(Text23, { children: " Ctrl+Y Redo" }),
22863
+ /* @__PURE__ */ jsx28(Text23, { children: " Esc Exit edit / close" })
22823
22864
  ] }),
22824
- /* @__PURE__ */ jsx26(Text23, { children: " " }),
22825
- /* @__PURE__ */ jsx26(Text23, { children: " h Close help" }),
22826
- /* @__PURE__ */ jsx26(Text23, { children: " q Quit" })
22865
+ /* @__PURE__ */ jsx28(Text23, { children: " " }),
22866
+ /* @__PURE__ */ jsx28(Text23, { children: " h Close help" }),
22867
+ /* @__PURE__ */ jsx28(Text23, { children: " q Quit" })
22827
22868
  ]
22828
22869
  }
22829
22870
  );
@@ -22903,8 +22944,8 @@ var init_sidebar_input = __esm({
22903
22944
  });
22904
22945
 
22905
22946
  // packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/SearchMatchSummary.tsx
22906
- import { Box as Box23, Text as Text24 } from "ink";
22907
- import { Fragment as Fragment4, jsx as jsx27, jsxs as jsxs23 } from "react/jsx-runtime";
22947
+ import { Box as Box22, Text as Text24 } from "ink";
22948
+ import { Fragment as Fragment6, jsx as jsx29, jsxs as jsxs23 } from "react/jsx-runtime";
22908
22949
  function SearchMatchSummary({
22909
22950
  open,
22910
22951
  query,
@@ -22915,17 +22956,17 @@ function SearchMatchSummary({
22915
22956
  marginTop
22916
22957
  }) {
22917
22958
  if (hidden) return null;
22918
- return /* @__PURE__ */ jsxs23(Fragment4, { children: [
22919
- open && /* @__PURE__ */ jsxs23(Box23, { marginTop, flexDirection: "column", children: [
22959
+ return /* @__PURE__ */ jsxs23(Fragment6, { children: [
22960
+ open && /* @__PURE__ */ jsxs23(Box22, { marginTop, flexDirection: "column", children: [
22920
22961
  /* @__PURE__ */ jsxs23(Text24, { children: [
22921
22962
  `/${query}`,
22922
- /* @__PURE__ */ jsx27(Text24, { color: PALETTE.accent, children: "\u258E" }),
22923
- query && /* @__PURE__ */ jsx27(Text24, { color: PALETTE.muted, children: formatSearchMatchSummary(matches, total) }),
22924
- /* @__PURE__ */ jsx27(Text24, { children: " \xB7 [Esc] leave" })
22963
+ /* @__PURE__ */ jsx29(Text24, { color: PALETTE.accent, children: "\u258E" }),
22964
+ query && /* @__PURE__ */ jsx29(Text24, { color: PALETTE.muted, children: formatSearchMatchSummary(matches, total) }),
22965
+ /* @__PURE__ */ jsx29(Text24, { children: " \xB7 [Esc] leave" })
22925
22966
  ] }),
22926
- autocompleteCandidates.length > 1 && /* @__PURE__ */ jsx27(Text24, { color: PALETTE.muted, children: ` possibilities: ${autocompleteCandidates.join(" \xB7 ").slice(0, 120)}` })
22967
+ autocompleteCandidates.length > 1 && /* @__PURE__ */ jsx29(Text24, { color: PALETTE.muted, children: ` possibilities: ${autocompleteCandidates.join(" \xB7 ").slice(0, 120)}` })
22927
22968
  ] }),
22928
- !open && query && /* @__PURE__ */ jsx27(Box23, { marginTop, children: /* @__PURE__ */ jsx27(Text24, { children: `/${query}${formatSearchMatchSummary(matches, total)} \xB7 [Esc] clear` }) })
22969
+ !open && query && /* @__PURE__ */ jsx29(Box22, { marginTop, children: /* @__PURE__ */ jsx29(Text24, { children: `/${query}${formatSearchMatchSummary(matches, total)} \xB7 [Esc] clear` }) })
22929
22970
  ] });
22930
22971
  }
22931
22972
  var init_SearchMatchSummary = __esm({
@@ -24185,33 +24226,33 @@ var init_use_scope_gate = __esm({
24185
24226
  });
24186
24227
 
24187
24228
  // packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/screen.tsx
24188
- import { Box as Box24, Text as Text25 } from "ink";
24189
- import { Fragment as Fragment5, jsx as jsx28, jsxs as jsxs24 } from "react/jsx-runtime";
24229
+ import { Box as Box23, Text as Text25 } from "ink";
24230
+ import { Fragment as Fragment7, jsx as jsx30, jsxs as jsxs24 } from "react/jsx-runtime";
24190
24231
  function ScopeGateScreen(props) {
24191
24232
  if (props.components.length === 0) {
24192
- return /* @__PURE__ */ jsx28(Box24, { paddingX: 2, paddingY: 1, children: /* @__PURE__ */ jsx28(Text25, { color: PALETTE.error, children: "Error: no components found for this session \u2014 please re-run analyze extract." }) });
24233
+ return /* @__PURE__ */ jsx30(Box23, { paddingX: 2, paddingY: 1, children: /* @__PURE__ */ jsx30(Text25, { color: PALETTE.error, children: "Error: no components found for this session \u2014 please re-run analyze extract." }) });
24193
24234
  }
24194
- return /* @__PURE__ */ jsx28(ScopeGateView, { ...props });
24235
+ return /* @__PURE__ */ jsx30(ScopeGateView, { ...props });
24195
24236
  }
24196
24237
  function ScopeGateView({ components, onConfirm, onQuit }) {
24197
24238
  const gate = useScopeGate({ components, onConfirm, onQuit });
24198
24239
  const { search, graph, columnPlan, panelLayout, counters } = gate;
24199
24240
  if (gate.showHelp) {
24200
- return /* @__PURE__ */ jsx28(HelpOverlay, { sections: HELP_SECTIONS, handleInput: false, onClose: gate.closeHelp });
24241
+ return /* @__PURE__ */ jsx30(HelpOverlay, { sections: HELP_SECTIONS, handleInput: false, onClose: gate.closeHelp });
24201
24242
  }
24202
- return /* @__PURE__ */ jsxs24(Box24, { flexDirection: "column", children: [
24203
- /* @__PURE__ */ jsx28(StepHeader, { step: "scope-gate" }),
24204
- /* @__PURE__ */ jsxs24(Box24, { flexDirection: "column", paddingX: 2, children: [
24205
- /* @__PURE__ */ jsxs24(Box24, { flexDirection: "row", flexWrap: "wrap", children: [
24206
- /* @__PURE__ */ jsx28(CounterStrip, { counters, totalWidth: gate.totalWidth }),
24243
+ return /* @__PURE__ */ jsxs24(Box23, { flexDirection: "column", children: [
24244
+ /* @__PURE__ */ jsx30(StepHeader, { step: "scope-gate" }),
24245
+ /* @__PURE__ */ jsxs24(Box23, { flexDirection: "column", paddingX: 2, children: [
24246
+ /* @__PURE__ */ jsxs24(Box23, { flexDirection: "row", flexWrap: "wrap", children: [
24247
+ /* @__PURE__ */ jsx30(CounterStrip, { counters, totalWidth: gate.totalWidth }),
24207
24248
  gate.aiExcludedCount > 0 && /* @__PURE__ */ jsxs24(Text25, { color: PALETTE.muted, children: [
24208
24249
  `${gate.aiExcludedCount} component${gate.aiExcludedCount === 1 ? "" : "s"} flagged by AI`,
24209
- gate.aiRows.length > 0 && /* @__PURE__ */ jsx28(Text25, { color: PALETTE.accent, children: " \u2014 press [x] to see why" })
24250
+ gate.aiRows.length > 0 && /* @__PURE__ */ jsx30(Text25, { color: PALETTE.accent, children: " \u2014 press [x] to see why" })
24210
24251
  ] })
24211
24252
  ] }),
24212
- graph.cycles.length > 0 && /* @__PURE__ */ jsx28(Box24, { marginTop: 1, children: /* @__PURE__ */ jsx28(Text25, { color: PALETTE.muted, children: "If you must have components with cycles, select them together into the generate step and then use the editor to fix them." }) }),
24213
- /* @__PURE__ */ jsxs24(Box24, { flexDirection: "row", alignItems: "stretch", children: [
24214
- gate.aiRationalePanelOpen ? /* @__PURE__ */ jsx28(
24253
+ graph.cycles.length > 0 && /* @__PURE__ */ jsx30(Box23, { marginTop: 1, children: /* @__PURE__ */ jsx30(Text25, { color: PALETTE.muted, children: "If you must have components with cycles, select them together into the generate step and then use the editor to fix them." }) }),
24254
+ /* @__PURE__ */ jsxs24(Box23, { flexDirection: "row", alignItems: "stretch", children: [
24255
+ gate.aiRationalePanelOpen ? /* @__PURE__ */ jsx30(
24215
24256
  GotoBanner,
24216
24257
  {
24217
24258
  title: `Review flags (${gate.aiExcludedCount})`,
@@ -24221,7 +24262,7 @@ function ScopeGateView({ components, onConfirm, onQuit }) {
24221
24262
  width: columnPlan.main,
24222
24263
  footerHint: "[\u2191/\u2193] move \xB7 [Enter] jump \xB7 [x/Esc] close"
24223
24264
  }
24224
- ) : /* @__PURE__ */ jsx28(
24265
+ ) : /* @__PURE__ */ jsx30(
24225
24266
  GroupedSidebar,
24226
24267
  {
24227
24268
  items: gate.groupedItems,
@@ -24249,9 +24290,9 @@ function ScopeGateView({ components, onConfirm, onQuit }) {
24249
24290
  graph: graph.nodes
24250
24291
  }
24251
24292
  ),
24252
- columnPlan.layout === "two-column" && /* @__PURE__ */ jsxs24(Fragment5, { children: [
24253
- /* @__PURE__ */ jsx28(Box24, { width: 2, flexShrink: 0 }),
24254
- /* @__PURE__ */ jsx28(
24293
+ columnPlan.layout === "two-column" && /* @__PURE__ */ jsxs24(Fragment7, { children: [
24294
+ /* @__PURE__ */ jsx30(Box23, { width: 2, flexShrink: 0 }),
24295
+ /* @__PURE__ */ jsx30(
24255
24296
  AddedColumn,
24256
24297
  {
24257
24298
  width: columnPlan.added,
@@ -24266,9 +24307,9 @@ function ScopeGateView({ components, onConfirm, onQuit }) {
24266
24307
  )
24267
24308
  ] })
24268
24309
  ] }),
24269
- gate.cyclesPanelOpen && /* @__PURE__ */ jsx28(CyclesPanel, { cycles: gate.slotCycles, cursor: gate.cyclesCursor }),
24270
- gate.pendingRejectCascade && /* @__PURE__ */ jsx28(RejectPrompt, { pending: gate.pendingRejectCascade }),
24271
- /* @__PURE__ */ jsx28(
24310
+ gate.cyclesPanelOpen && /* @__PURE__ */ jsx30(CyclesPanel, { cycles: gate.slotCycles, cursor: gate.cyclesCursor }),
24311
+ gate.pendingRejectCascade && /* @__PURE__ */ jsx30(RejectPrompt, { pending: gate.pendingRejectCascade }),
24312
+ /* @__PURE__ */ jsx30(
24272
24313
  SearchMatchSummary,
24273
24314
  {
24274
24315
  open: search.searchOpen,
@@ -24279,7 +24320,7 @@ function ScopeGateView({ components, onConfirm, onQuit }) {
24279
24320
  marginTop: 1
24280
24321
  }
24281
24322
  ),
24282
- /* @__PURE__ */ jsx28(
24323
+ /* @__PURE__ */ jsx30(
24283
24324
  CompactControlBar,
24284
24325
  {
24285
24326
  hasGroupRoots: gate.hasGroupRoots,
@@ -24469,14 +24510,14 @@ var init_logic10 = __esm({
24469
24510
  });
24470
24511
 
24471
24512
  // packages/experience-design-system-cli/src/tui/import/steps/08-generation/screen.tsx
24472
- import { jsx as jsx29 } from "react/jsx-runtime";
24513
+ import { jsx as jsx31 } from "react/jsx-runtime";
24473
24514
  function GenerationScreen({
24474
24515
  progress,
24475
24516
  agent,
24476
24517
  acceptedCount,
24477
24518
  hasTokens
24478
24519
  }) {
24479
- return /* @__PURE__ */ jsx29(
24520
+ return /* @__PURE__ */ jsx31(
24480
24521
  RunningStep,
24481
24522
  {
24482
24523
  step: "generation",
@@ -25157,7 +25198,7 @@ var init_logic11 = __esm({
25157
25198
  });
25158
25199
 
25159
25200
  // packages/experience-design-system-cli/src/tui/import/steps/preview-validation-error/screen.tsx
25160
- import { jsx as jsx30 } from "react/jsx-runtime";
25201
+ import { jsx as jsx32 } from "react/jsx-runtime";
25161
25202
  function PreviewValidationErrorScreen({
25162
25203
  errors,
25163
25204
  missingNames,
@@ -25166,7 +25207,7 @@ function PreviewValidationErrorScreen({
25166
25207
  onQuit
25167
25208
  }) {
25168
25209
  const matchedNames = matchedComponentNames(errors, missingNames);
25169
- return /* @__PURE__ */ jsx30(
25210
+ return /* @__PURE__ */ jsx32(
25170
25211
  GateStep,
25171
25212
  {
25172
25213
  intent: "error",
@@ -25540,8 +25581,8 @@ var init_scroll_offset = __esm({
25540
25581
  // packages/experience-design-system-cli/src/tui/import/steps/09-review/components/FieldEditor.tsx
25541
25582
  import React12, { useEffect as useEffect11, useLayoutEffect as useLayoutEffect2, useState as useState18 } from "react";
25542
25583
  import figures6 from "figures";
25543
- import { Box as Box25, measureElement, Text as Text26 } from "ink";
25544
- import { Fragment as Fragment6, jsx as jsx31, jsxs as jsxs25 } from "react/jsx-runtime";
25584
+ import { Box as Box24, measureElement, Text as Text26 } from "ink";
25585
+ import { Fragment as Fragment8, jsx as jsx33, jsxs as jsxs25 } from "react/jsx-runtime";
25545
25586
  function createCommonRowProps(selected, focusLevel, editingField, textCursor, valueCursor, cursorVisible, editingValue, valueText, width) {
25546
25587
  return {
25547
25588
  selected,
@@ -25679,14 +25720,14 @@ function serializeState(state2, originalJson) {
25679
25720
  return JSON.stringify(entry, null, 2);
25680
25721
  }
25681
25722
  function Picker({ value, active }) {
25682
- return /* @__PURE__ */ jsxs25(Box25, { children: [
25683
- active && /* @__PURE__ */ jsx31(Text26, { color: PALETTE.warning, children: "\u2039" }),
25684
- /* @__PURE__ */ jsx31(Text26, { color: active ? PALETTE.warning : void 0, bold: active, children: value }),
25685
- active && /* @__PURE__ */ jsx31(Text26, { color: PALETTE.warning, children: "\u203A" })
25723
+ return /* @__PURE__ */ jsxs25(Box24, { children: [
25724
+ active && /* @__PURE__ */ jsx33(Text26, { color: PALETTE.warning, children: "\u2039" }),
25725
+ /* @__PURE__ */ jsx33(Text26, { color: active ? PALETTE.warning : void 0, bold: active, children: value }),
25726
+ active && /* @__PURE__ */ jsx33(Text26, { color: PALETTE.warning, children: "\u203A" })
25686
25727
  ] });
25687
25728
  }
25688
25729
  function Toggle({ value, active }) {
25689
- return /* @__PURE__ */ jsx31(Box25, { children: /* @__PURE__ */ jsx31(Text26, { color: active ? PALETTE.warning : value ? PALETTE.success : PALETTE.border, children: value ? "[\u2713]" : "[ ]" }) });
25730
+ return /* @__PURE__ */ jsx33(Box24, { children: /* @__PURE__ */ jsx33(Text26, { color: active ? PALETTE.warning : value ? PALETTE.success : PALETTE.border, children: value ? "[\u2713]" : "[ ]" }) });
25690
25731
  }
25691
25732
  function InlinePropField({
25692
25733
  label,
@@ -25695,7 +25736,7 @@ function InlinePropField({
25695
25736
  flexible = false,
25696
25737
  width
25697
25738
  }) {
25698
- return /* @__PURE__ */ jsxs25(Box25, { width, gap: 1, flexShrink: flexible ? 1 : 0, flexGrow: flexible ? 1 : 0, flexWrap: "wrap", children: [
25739
+ return /* @__PURE__ */ jsxs25(Box24, { width, gap: 1, flexShrink: flexible ? 1 : 0, flexGrow: flexible ? 1 : 0, flexWrap: "wrap", children: [
25699
25740
  /* @__PURE__ */ jsxs25(Text26, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, wrap: "truncate-end", children: [
25700
25741
  focused ? "\u203A " : " ",
25701
25742
  label
@@ -25709,19 +25750,19 @@ function RequiredField({
25709
25750
  editingField,
25710
25751
  activeField
25711
25752
  }) {
25712
- return /* @__PURE__ */ jsx31(InlinePropField, { label: "req:", focused, children: /* @__PURE__ */ jsx31(Toggle, { value, active: editingField && activeField === "required" }) });
25753
+ return /* @__PURE__ */ jsx33(InlinePropField, { label: "req:", focused, children: /* @__PURE__ */ jsx33(Toggle, { value, active: editingField && activeField === "required" }) });
25713
25754
  }
25714
25755
  function DefaultValueRow({
25715
25756
  display,
25716
25757
  active,
25717
25758
  focused
25718
25759
  }) {
25719
- return /* @__PURE__ */ jsxs25(Box25, { gap: 1, flexWrap: "wrap", flexShrink: 0, children: [
25760
+ return /* @__PURE__ */ jsxs25(Box24, { gap: 1, flexWrap: "wrap", flexShrink: 0, children: [
25720
25761
  /* @__PURE__ */ jsxs25(Text26, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, children: [
25721
25762
  focused ? "\u203A " : " ",
25722
25763
  "default:"
25723
25764
  ] }),
25724
- active ? /* @__PURE__ */ jsx31(Picker, { value: display, active: true }) : /* @__PURE__ */ jsx31(Text26, { wrap: "wrap", children: display })
25765
+ active ? /* @__PURE__ */ jsx33(Picker, { value: display, active: true }) : /* @__PURE__ */ jsx33(Text26, { wrap: "wrap", children: display })
25725
25766
  ] });
25726
25767
  }
25727
25768
  function RowLabel({
@@ -25749,10 +25790,10 @@ function ValueInputRow({
25749
25790
  valueText,
25750
25791
  cursorVisible
25751
25792
  }) {
25752
- return /* @__PURE__ */ jsxs25(Box25, { paddingLeft: 2, children: [
25753
- /* @__PURE__ */ jsx31(Text26, { color: PALETTE.accent, children: mode === "edit" ? "\u270E " : "+ " }),
25754
- /* @__PURE__ */ jsx31(Text26, { children: valueText }),
25755
- /* @__PURE__ */ jsx31(Text26, { inverse: cursorVisible, children: " " })
25793
+ return /* @__PURE__ */ jsxs25(Box24, { paddingLeft: 2, children: [
25794
+ /* @__PURE__ */ jsx33(Text26, { color: PALETTE.accent, children: mode === "edit" ? "\u270E " : "+ " }),
25795
+ /* @__PURE__ */ jsx33(Text26, { children: valueText }),
25796
+ /* @__PURE__ */ jsx33(Text26, { inverse: cursorVisible, children: " " })
25756
25797
  ] });
25757
25798
  }
25758
25799
  function EditableListItem({
@@ -25765,9 +25806,9 @@ function EditableListItem({
25765
25806
  }) {
25766
25807
  const isBeingEdited = editingValue?.mode === "edit" && editingValue.index === index;
25767
25808
  if (isBeingEdited) {
25768
- return /* @__PURE__ */ jsx31(ValueInputRow, { mode: "edit", valueText, cursorVisible });
25809
+ return /* @__PURE__ */ jsx33(ValueInputRow, { mode: "edit", valueText, cursorVisible });
25769
25810
  }
25770
- return /* @__PURE__ */ jsx31(Box25, { gap: 1, paddingLeft: 2, children: /* @__PURE__ */ jsx31(Text26, { color: active ? PALETTE.accent : void 0, children: active ? `${figures6.pointer} ${value}` : ` ${value}` }) });
25811
+ return /* @__PURE__ */ jsx33(Box24, { gap: 1, paddingLeft: 2, children: /* @__PURE__ */ jsx33(Text26, { color: active ? PALETTE.accent : void 0, children: active ? `${figures6.pointer} ${value}` : ` ${value}` }) });
25771
25812
  }
25772
25813
  function EditableValueList({
25773
25814
  values,
@@ -25780,9 +25821,9 @@ function EditableValueList({
25780
25821
  emptyPaddingLeft,
25781
25822
  showAddInput
25782
25823
  }) {
25783
- return /* @__PURE__ */ jsxs25(Fragment6, { children: [
25784
- values.length === 0 && !editingValue && (emptyPaddingLeft === void 0 ? /* @__PURE__ */ jsx31(Text26, { color: PALETTE.muted, children: emptyMessage }) : /* @__PURE__ */ jsx31(Box25, { paddingLeft: emptyPaddingLeft, children: /* @__PURE__ */ jsx31(Text26, { color: PALETTE.muted, children: emptyMessage }) })),
25785
- values.map((value, index) => /* @__PURE__ */ jsx31(
25824
+ return /* @__PURE__ */ jsxs25(Fragment8, { children: [
25825
+ values.length === 0 && !editingValue && (emptyPaddingLeft === void 0 ? /* @__PURE__ */ jsx33(Text26, { color: PALETTE.muted, children: emptyMessage }) : /* @__PURE__ */ jsx33(Box24, { paddingLeft: emptyPaddingLeft, children: /* @__PURE__ */ jsx33(Text26, { color: PALETTE.muted, children: emptyMessage }) })),
25826
+ values.map((value, index) => /* @__PURE__ */ jsx33(
25786
25827
  EditableListItem,
25787
25828
  {
25788
25829
  value,
@@ -25794,7 +25835,7 @@ function EditableValueList({
25794
25835
  },
25795
25836
  index
25796
25837
  )),
25797
- showAddInput && editingValue?.mode === "add" && /* @__PURE__ */ jsx31(ValueInputRow, { mode: "add", valueText, cursorVisible })
25838
+ showAddInput && editingValue?.mode === "add" && /* @__PURE__ */ jsx33(ValueInputRow, { mode: "add", valueText, cursorVisible })
25798
25839
  ] });
25799
25840
  }
25800
25841
  function DefaultSubRow({
@@ -25806,51 +25847,51 @@ function DefaultSubRow({
25806
25847
  }) {
25807
25848
  const cursor = cursorVisible ? "\u2588" : " ";
25808
25849
  if (prop.type === "richtext" || prop.type === "media" || prop.type === "link") {
25809
- return /* @__PURE__ */ jsxs25(Box25, { gap: 1, flexShrink: 0, children: [
25850
+ return /* @__PURE__ */ jsxs25(Box24, { gap: 1, flexShrink: 0, children: [
25810
25851
  /* @__PURE__ */ jsxs25(Text26, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, children: [
25811
25852
  focused ? "\u203A " : " ",
25812
25853
  "default:"
25813
25854
  ] }),
25814
- /* @__PURE__ */ jsx31(Text26, { color: focused ? void 0 : PALETTE.muted, children: "(not applicable)" })
25855
+ /* @__PURE__ */ jsx33(Text26, { color: focused ? void 0 : PALETTE.muted, children: "(not applicable)" })
25815
25856
  ] });
25816
25857
  }
25817
25858
  if (prop.type === "boolean") {
25818
25859
  const display = prop.default === true ? "true" : prop.default === false ? "false" : "(unset)";
25819
- return /* @__PURE__ */ jsx31(DefaultValueRow, { display, active, focused });
25860
+ return /* @__PURE__ */ jsx33(DefaultValueRow, { display, active, focused });
25820
25861
  }
25821
25862
  if (prop.type === "enum") {
25822
25863
  if (prop.values.length === 0) {
25823
- return /* @__PURE__ */ jsxs25(Box25, { gap: 1, flexShrink: 0, children: [
25864
+ return /* @__PURE__ */ jsxs25(Box24, { gap: 1, flexShrink: 0, children: [
25824
25865
  /* @__PURE__ */ jsxs25(Text26, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, children: [
25825
25866
  focused ? "\u203A " : " ",
25826
25867
  "default:"
25827
25868
  ] }),
25828
- /* @__PURE__ */ jsx31(Text26, { color: focused ? void 0 : PALETTE.muted, children: "(no values defined)" })
25869
+ /* @__PURE__ */ jsx33(Text26, { color: focused ? void 0 : PALETTE.muted, children: "(no values defined)" })
25829
25870
  ] });
25830
25871
  }
25831
25872
  const display = typeof prop.default === "string" && prop.default !== "" ? prop.default : "(unset)";
25832
- return /* @__PURE__ */ jsx31(DefaultValueRow, { display, active, focused });
25873
+ return /* @__PURE__ */ jsx33(DefaultValueRow, { display, active, focused });
25833
25874
  }
25834
25875
  const value = typeof prop.default === "string" ? prop.default : "";
25835
25876
  if (active) {
25836
- return /* @__PURE__ */ jsxs25(Box25, { flexDirection: "row", flexShrink: 0, children: [
25877
+ return /* @__PURE__ */ jsxs25(Box24, { flexDirection: "row", flexShrink: 0, children: [
25837
25878
  /* @__PURE__ */ jsxs25(Text26, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, children: [
25838
25879
  focused ? "\u203A " : " ",
25839
25880
  "default:"
25840
25881
  ] }),
25841
- /* @__PURE__ */ jsxs25(Box25, { flexGrow: 1, borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
25842
- /* @__PURE__ */ jsx31(Text26, { children: value.slice(0, textCursor) }),
25843
- /* @__PURE__ */ jsx31(Text26, { inverse: cursorVisible, children: value[textCursor] ?? cursor }),
25844
- /* @__PURE__ */ jsx31(Text26, { children: value.slice(textCursor + 1) })
25882
+ /* @__PURE__ */ jsxs25(Box24, { flexGrow: 1, borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
25883
+ /* @__PURE__ */ jsx33(Text26, { children: value.slice(0, textCursor) }),
25884
+ /* @__PURE__ */ jsx33(Text26, { inverse: cursorVisible, children: value[textCursor] ?? cursor }),
25885
+ /* @__PURE__ */ jsx33(Text26, { children: value.slice(textCursor + 1) })
25845
25886
  ] })
25846
25887
  ] });
25847
25888
  }
25848
- return /* @__PURE__ */ jsxs25(Box25, { gap: 1, flexShrink: 0, children: [
25889
+ return /* @__PURE__ */ jsxs25(Box24, { gap: 1, flexShrink: 0, children: [
25849
25890
  /* @__PURE__ */ jsxs25(Text26, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, children: [
25850
25891
  focused ? "\u203A " : " ",
25851
25892
  "default:"
25852
25893
  ] }),
25853
- /* @__PURE__ */ jsx31(Text26, { color: focused || value ? void 0 : PALETTE.muted, children: value || "(none)" })
25894
+ /* @__PURE__ */ jsx33(Text26, { color: focused || value ? void 0 : PALETTE.muted, children: value || "(none)" })
25854
25895
  ] });
25855
25896
  }
25856
25897
  function DescriptionField({
@@ -25865,20 +25906,20 @@ function DescriptionField({
25865
25906
  paddingLeft = 2
25866
25907
  }) {
25867
25908
  if (compact) {
25868
- return /* @__PURE__ */ jsxs25(Box25, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: [
25909
+ return /* @__PURE__ */ jsxs25(Box24, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: [
25869
25910
  /* @__PURE__ */ jsxs25(Text26, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, children: [
25870
25911
  focused ? "\u203A " : " ",
25871
25912
  label
25872
25913
  ] }),
25873
- /* @__PURE__ */ jsx31(Text26, { wrap: "truncate-end", color: value ? void 0 : PALETTE.muted, children: value || "\u2014" })
25914
+ /* @__PURE__ */ jsx33(Text26, { wrap: "truncate-end", color: value ? void 0 : PALETTE.muted, children: value || "\u2014" })
25874
25915
  ] });
25875
25916
  }
25876
- return /* @__PURE__ */ jsxs25(Box25, { paddingLeft, flexDirection: "column", width, flexShrink: 0, children: [
25917
+ return /* @__PURE__ */ jsxs25(Box24, { paddingLeft, flexDirection: "column", width, flexShrink: 0, children: [
25877
25918
  /* @__PURE__ */ jsxs25(Text26, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, children: [
25878
25919
  focused ? "\u203A " : " ",
25879
25920
  label
25880
25921
  ] }),
25881
- editing ? /* @__PURE__ */ jsx31(EditableDescription, { cursorVisible, value, textCursor }) : /* @__PURE__ */ jsx31(Text26, { wrap: "wrap", children: value || "\u2014" })
25922
+ editing ? /* @__PURE__ */ jsx33(EditableDescription, { cursorVisible, value, textCursor }) : /* @__PURE__ */ jsx33(Text26, { wrap: "wrap", children: value || "\u2014" })
25882
25923
  ] });
25883
25924
  }
25884
25925
  function EditableDescription({
@@ -25888,7 +25929,7 @@ function EditableDescription({
25888
25929
  }) {
25889
25930
  return /* @__PURE__ */ jsxs25(Text26, { wrap: "wrap", children: [
25890
25931
  value.slice(0, textCursor),
25891
- /* @__PURE__ */ jsx31(Text26, { inverse: cursorVisible, children: value[textCursor] ?? " " }),
25932
+ /* @__PURE__ */ jsx33(Text26, { inverse: cursorVisible, children: value[textCursor] ?? " " }),
25892
25933
  value.slice(textCursor + 1)
25893
25934
  ] });
25894
25935
  }
@@ -25909,9 +25950,9 @@ function PropRow({
25909
25950
  }) {
25910
25951
  const descFocused = activeField === "description";
25911
25952
  const descActive = editingField && descFocused;
25912
- return /* @__PURE__ */ jsxs25(Box25, { flexDirection: "column", width, flexShrink: 0, children: [
25913
- /* @__PURE__ */ jsx31(Box25, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: /* @__PURE__ */ jsx31(RowLabel, { name: prop.name, selected }) }),
25914
- /* @__PURE__ */ jsx31(
25953
+ return /* @__PURE__ */ jsxs25(Box24, { flexDirection: "column", width, flexShrink: 0, children: [
25954
+ /* @__PURE__ */ jsx33(Box24, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: /* @__PURE__ */ jsx33(RowLabel, { name: prop.name, selected }) }),
25955
+ /* @__PURE__ */ jsx33(
25915
25956
  DescriptionField,
25916
25957
  {
25917
25958
  value: prop.description,
@@ -25924,8 +25965,8 @@ function PropRow({
25924
25965
  paddingLeft: 0
25925
25966
  }
25926
25967
  ),
25927
- /* @__PURE__ */ jsxs25(Box25, { flexDirection: "column", width, flexShrink: 0, children: [
25928
- /* @__PURE__ */ jsx31(
25968
+ /* @__PURE__ */ jsxs25(Box24, { flexDirection: "column", width, flexShrink: 0, children: [
25969
+ /* @__PURE__ */ jsx33(
25929
25970
  RequiredField,
25930
25971
  {
25931
25972
  value: prop.required,
@@ -25934,10 +25975,10 @@ function PropRow({
25934
25975
  activeField
25935
25976
  }
25936
25977
  ),
25937
- /* @__PURE__ */ jsx31(InlinePropField, { label: "type:", focused: activeField === "type", children: editingField && activeField === "type" ? /* @__PURE__ */ jsx31(Picker, { value: prop.type, active: true }) : /* @__PURE__ */ jsx31(Text26, { children: prop.type }) })
25978
+ /* @__PURE__ */ jsx33(InlinePropField, { label: "type:", focused: activeField === "type", children: editingField && activeField === "type" ? /* @__PURE__ */ jsx33(Picker, { value: prop.type, active: true }) : /* @__PURE__ */ jsx33(Text26, { children: prop.type }) })
25938
25979
  ] }),
25939
- 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(Text26, { wrap: "wrap", children: prop.tokenKind || "\u2014" }) }),
25940
- prop.type === "enum" && /* @__PURE__ */ jsxs25(Box25, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: [
25980
+ prop.type === "token" && /* @__PURE__ */ jsx33(InlinePropField, { label: "kind:", focused: activeField === "tokenKind", width, children: editingField && activeField === "tokenKind" ? /* @__PURE__ */ jsx33(Picker, { value: prop.tokenKind || DESIGN_TOKEN_TYPES2[0], active: true }) : /* @__PURE__ */ jsx33(Text26, { wrap: "wrap", children: prop.tokenKind || "\u2014" }) }),
25981
+ prop.type === "enum" && /* @__PURE__ */ jsxs25(Box24, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: [
25941
25982
  /* @__PURE__ */ jsxs25(Text26, { color: activeField === "values" ? PALETTE.warning : PALETTE.muted, bold: activeField === "values", children: [
25942
25983
  activeField === "values" ? "\u203A " : " ",
25943
25984
  "values:"
@@ -25948,7 +25989,7 @@ function PropRow({
25948
25989
  "]"
25949
25990
  ] })
25950
25991
  ] }),
25951
- /* @__PURE__ */ jsx31(
25992
+ /* @__PURE__ */ jsx33(
25952
25993
  DefaultSubRow,
25953
25994
  {
25954
25995
  prop,
@@ -25958,12 +25999,12 @@ function PropRow({
25958
25999
  cursorVisible
25959
26000
  }
25960
26001
  ),
25961
- prop.type === "token" && prop.category === "design" && /* @__PURE__ */ jsxs25(Box25, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: [
26002
+ prop.type === "token" && prop.category === "design" && /* @__PURE__ */ jsxs25(Box24, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: [
25962
26003
  /* @__PURE__ */ jsxs25(Text26, { color: activeField === "allowed" ? PALETTE.warning : PALETTE.muted, bold: activeField === "allowed", children: [
25963
26004
  activeField === "allowed" ? "\u203A " : " ",
25964
26005
  "allowed:"
25965
26006
  ] }),
25966
- editingField && activeField === "allowed" ? /* @__PURE__ */ jsx31(Box25, { width: Math.max(1, width - 4), borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: /* @__PURE__ */ jsx31(Text26, { children: "press [t] to edit allowed tokens" }) }) : /* @__PURE__ */ jsx31(
26007
+ editingField && activeField === "allowed" ? /* @__PURE__ */ jsx33(Box24, { width: Math.max(1, width - 4), borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: /* @__PURE__ */ jsx33(Text26, { children: "press [t] to edit allowed tokens" }) }) : /* @__PURE__ */ jsx33(
25967
26008
  Text26,
25968
26009
  {
25969
26010
  color: activeField !== "allowed" && prop.allowed.length === 0 ? PALETTE.muted : void 0,
@@ -25972,17 +26013,17 @@ function PropRow({
25972
26013
  }
25973
26014
  )
25974
26015
  ] }),
25975
- selected && showRationale && rationale && rationale.trim().length > 0 && /* @__PURE__ */ jsx31(Box25, { paddingLeft: 2, children: /* @__PURE__ */ jsx31(Text26, { color: PALETTE.muted, children: (() => {
26016
+ selected && showRationale && rationale && rationale.trim().length > 0 && /* @__PURE__ */ jsx33(Box24, { paddingLeft: 2, children: /* @__PURE__ */ jsx33(Text26, { color: PALETTE.muted, children: (() => {
25976
26017
  const max = Math.max(8, width - 8);
25977
26018
  const text = `~ ${rationale}`;
25978
26019
  return text.length > max ? text.slice(0, max - 1) + "\u2026" : text;
25979
26020
  })() }) }, rowKey ? `rationale-${rowKey}` : void 0),
25980
- selected && prop.type === "enum" && activeField === "values" && /* @__PURE__ */ jsxs25(Box25, { paddingLeft: 2, flexDirection: "column", children: [
25981
- /* @__PURE__ */ jsxs25(Box25, { children: [
25982
- /* @__PURE__ */ jsx31(Text26, { color: PALETTE.muted, children: "values:" }),
25983
- activeField === "values" && /* @__PURE__ */ jsx31(Text26, { children: " [a] add [e] edit [r] remove [\u2191\u2193] navigate [K/J] reorder" })
26021
+ selected && prop.type === "enum" && activeField === "values" && /* @__PURE__ */ jsxs25(Box24, { paddingLeft: 2, flexDirection: "column", children: [
26022
+ /* @__PURE__ */ jsxs25(Box24, { children: [
26023
+ /* @__PURE__ */ jsx33(Text26, { color: PALETTE.muted, children: "values:" }),
26024
+ activeField === "values" && /* @__PURE__ */ jsx33(Text26, { children: " [a] add [e] edit [r] remove [\u2191\u2193] navigate [K/J] reorder" })
25984
26025
  ] }),
25985
- /* @__PURE__ */ jsx31(
26026
+ /* @__PURE__ */ jsx33(
25986
26027
  EditableValueList,
25987
26028
  {
25988
26029
  values: prop.values,
@@ -26012,9 +26053,9 @@ function SlotRow({
26012
26053
  pickerCandidates,
26013
26054
  pickerCursor
26014
26055
  }) {
26015
- return /* @__PURE__ */ jsxs25(Box25, { flexDirection: "column", width, flexShrink: 0, children: [
26016
- /* @__PURE__ */ jsx31(Box25, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: /* @__PURE__ */ jsx31(RowLabel, { name: slot.name, selected, trailing: false }) }),
26017
- /* @__PURE__ */ jsx31(
26056
+ return /* @__PURE__ */ jsxs25(Box24, { flexDirection: "column", width, flexShrink: 0, children: [
26057
+ /* @__PURE__ */ jsx33(Box24, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: /* @__PURE__ */ jsx33(RowLabel, { name: slot.name, selected, trailing: false }) }),
26058
+ /* @__PURE__ */ jsx33(
26018
26059
  DescriptionField,
26019
26060
  {
26020
26061
  value: slot.description,
@@ -26027,7 +26068,7 @@ function SlotRow({
26027
26068
  paddingLeft: 0
26028
26069
  }
26029
26070
  ),
26030
- /* @__PURE__ */ jsx31(Box25, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: /* @__PURE__ */ jsx31(
26071
+ /* @__PURE__ */ jsx33(Box24, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: /* @__PURE__ */ jsx33(
26031
26072
  RequiredField,
26032
26073
  {
26033
26074
  value: slot.required,
@@ -26036,7 +26077,7 @@ function SlotRow({
26036
26077
  activeField
26037
26078
  }
26038
26079
  ) }),
26039
- !(selected && editingField && activeField === "allowedComponents") && /* @__PURE__ */ jsxs25(Box25, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: [
26080
+ !(selected && editingField && activeField === "allowedComponents") && /* @__PURE__ */ jsxs25(Box24, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: [
26040
26081
  /* @__PURE__ */ jsxs25(
26041
26082
  Text26,
26042
26083
  {
@@ -26048,10 +26089,10 @@ function SlotRow({
26048
26089
  ]
26049
26090
  }
26050
26091
  ),
26051
- slot.allowedComponents.length === 0 ? /* @__PURE__ */ jsx31(Text26, { color: PALETTE.muted, children: "(any)" }) : /* @__PURE__ */ jsx31(Text26, { wrap: "wrap", children: slot.allowedComponents.join(", ") })
26092
+ slot.allowedComponents.length === 0 ? /* @__PURE__ */ jsx33(Text26, { color: PALETTE.muted, children: "(any)" }) : /* @__PURE__ */ jsx33(Text26, { wrap: "wrap", children: slot.allowedComponents.join(", ") })
26052
26093
  ] }),
26053
- selected && editingField && activeField === "allowedComponents" && /* @__PURE__ */ jsxs25(Box25, { flexDirection: "column", children: [
26054
- /* @__PURE__ */ jsxs25(Box25, { children: [
26094
+ selected && editingField && activeField === "allowedComponents" && /* @__PURE__ */ jsxs25(Box24, { flexDirection: "column", children: [
26095
+ /* @__PURE__ */ jsxs25(Box24, { children: [
26055
26096
  /* @__PURE__ */ jsxs25(
26056
26097
  Text26,
26057
26098
  {
@@ -26063,9 +26104,9 @@ function SlotRow({
26063
26104
  ]
26064
26105
  }
26065
26106
  ),
26066
- editingField && activeField === "allowedComponents" && /* @__PURE__ */ jsx31(Text26, { color: PALETTE.muted, children: slot.allowedComponents.length > 0 ? " [a] add [e] edit [r] remove [\u2190\u2192] cycle [\u2191\u2193] navigate [K/J] reorder" : " [a] add [e] edit [r] remove [\u2191\u2193] navigate [K/J] reorder" })
26107
+ editingField && activeField === "allowedComponents" && /* @__PURE__ */ jsx33(Text26, { color: PALETTE.muted, children: slot.allowedComponents.length > 0 ? " [a] add [e] edit [r] remove [\u2190\u2192] cycle [\u2191\u2193] navigate [K/J] reorder" : " [a] add [e] edit [r] remove [\u2191\u2193] navigate [K/J] reorder" })
26067
26108
  ] }),
26068
- /* @__PURE__ */ jsx31(
26109
+ /* @__PURE__ */ jsx33(
26069
26110
  EditableValueList,
26070
26111
  {
26071
26112
  values: slot.allowedComponents,
@@ -26079,21 +26120,21 @@ function SlotRow({
26079
26120
  showAddInput: editingField && activeField === "allowedComponents"
26080
26121
  }
26081
26122
  ),
26082
- editingField && editingValue?.mode === "add" && activeField === "allowedComponents" && pickerCandidates !== null && /* @__PURE__ */ jsx31(Box25, { paddingLeft: 2, flexDirection: "column", children: pickerCandidates.length === 0 ? /* @__PURE__ */ jsx31(Text26, { color: PALETTE.muted, children: "(no valid components to add \u2014 all remaining candidates would create cycles)" }) : (() => {
26123
+ editingField && editingValue?.mode === "add" && activeField === "allowedComponents" && pickerCandidates !== null && /* @__PURE__ */ jsx33(Box24, { paddingLeft: 2, flexDirection: "column", children: pickerCandidates.length === 0 ? /* @__PURE__ */ jsx33(Text26, { color: PALETTE.muted, children: "(no valid components to add \u2014 all remaining candidates would create cycles)" }) : (() => {
26083
26124
  const filtered = valueText.length === 0 ? pickerCandidates : pickerCandidates.filter((n) => n.toLowerCase().includes(valueText.toLowerCase()));
26084
26125
  if (filtered.length === 0) {
26085
- return /* @__PURE__ */ jsx31(Text26, { color: PALETTE.muted, children: "(no candidates match \u2014 Enter to add as free text)" });
26126
+ return /* @__PURE__ */ jsx33(Text26, { color: PALETTE.muted, children: "(no candidates match \u2014 Enter to add as free text)" });
26086
26127
  }
26087
26128
  const cursor = pickerCursor % filtered.length;
26088
26129
  const MAX_VISIBLE = 5;
26089
26130
  const start = Math.max(0, Math.min(filtered.length - MAX_VISIBLE, cursor - 2));
26090
26131
  const slice = filtered.slice(start, start + MAX_VISIBLE);
26091
- return /* @__PURE__ */ jsxs25(Box25, { flexDirection: "column", children: [
26092
- /* @__PURE__ */ jsx31(Text26, { color: PALETTE.muted, children: " candidates (\u2191\u2193 cycle, Enter to add):" }),
26132
+ return /* @__PURE__ */ jsxs25(Box24, { flexDirection: "column", children: [
26133
+ /* @__PURE__ */ jsx33(Text26, { color: PALETTE.muted, children: " candidates (\u2191\u2193 cycle, Enter to add):" }),
26093
26134
  slice.map((name, i) => {
26094
26135
  const absIdx = start + i;
26095
26136
  const isCursor = absIdx === cursor;
26096
- return /* @__PURE__ */ jsx31(Text26, { color: isCursor ? PALETTE.accent : PALETTE.muted, children: isCursor ? ` ${figures6.pointer} ${name}` : ` ${name}` }, name);
26137
+ return /* @__PURE__ */ jsx33(Text26, { color: isCursor ? PALETTE.accent : PALETTE.muted, children: isCursor ? ` ${figures6.pointer} ${name}` : ` ${name}` }, name);
26097
26138
  })
26098
26139
  ] });
26099
26140
  })() })
@@ -26921,18 +26962,18 @@ function FieldEditor({
26921
26962
  });
26922
26963
  const innerWidth = Math.max(1, width - 2);
26923
26964
  if (parseErr) {
26924
- return /* @__PURE__ */ jsxs25(Box25, { flexDirection: "column", width, borderStyle: "single", borderColor: PALETTE.error, children: [
26925
- /* @__PURE__ */ jsx31(Text26, { bold: true, color: PALETTE.error, children: "FIELD EDITOR \u2014 parse error" }),
26926
- /* @__PURE__ */ jsx31(Text26, { color: PALETTE.error, children: parseErr }),
26927
- /* @__PURE__ */ jsx31(Text26, { color: PALETTE.muted, children: "Cannot display structured editor. Fix the JSON first." })
26965
+ return /* @__PURE__ */ jsxs25(Box24, { flexDirection: "column", width, borderStyle: "single", borderColor: PALETTE.error, children: [
26966
+ /* @__PURE__ */ jsx33(Text26, { bold: true, color: PALETTE.error, children: "FIELD EDITOR \u2014 parse error" }),
26967
+ /* @__PURE__ */ jsx33(Text26, { color: PALETTE.error, children: parseErr }),
26968
+ /* @__PURE__ */ jsx33(Text26, { color: PALETTE.muted, children: "Cannot display structured editor. Fix the JSON first." })
26928
26969
  ] });
26929
26970
  }
26930
26971
  if (props.length === 0 && slots.length === 0) {
26931
- return /* @__PURE__ */ jsxs25(Box25, { flexDirection: "column", width, borderStyle: "single", borderColor: PALETTE.warning, children: [
26932
- /* @__PURE__ */ jsx31(Text26, { bold: true, color: PALETTE.warning, children: "FIELD EDITOR \u2014 no fields" }),
26933
- /* @__PURE__ */ jsx31(Text26, { color: PALETTE.warning, children: "\u26A0 No properties classified for this component. The LLM didn't find anything to classify." }),
26934
- /* @__PURE__ */ jsx31(Text26, { color: PALETTE.muted, children: "You can add fields manually below or reject this component." }),
26935
- /* @__PURE__ */ jsx31(Text26, { color: PALETTE.muted, children: "Enter to save \xB7 Esc to discard" })
26972
+ return /* @__PURE__ */ jsxs25(Box24, { flexDirection: "column", width, borderStyle: "single", borderColor: PALETTE.warning, children: [
26973
+ /* @__PURE__ */ jsx33(Text26, { bold: true, color: PALETTE.warning, children: "FIELD EDITOR \u2014 no fields" }),
26974
+ /* @__PURE__ */ jsx33(Text26, { color: PALETTE.warning, children: "\u26A0 No properties classified for this component. The LLM didn't find anything to classify." }),
26975
+ /* @__PURE__ */ jsx33(Text26, { color: PALETTE.muted, children: "You can add fields manually below or reject this component." }),
26976
+ /* @__PURE__ */ jsx33(Text26, { color: PALETTE.muted, children: "Enter to save \xB7 Esc to discard" })
26936
26977
  ] });
26937
26978
  }
26938
26979
  const hasEmptyProperties = props.length === 0 && slots.length === 0;
@@ -27061,12 +27102,12 @@ function FieldEditor({
27061
27102
  const renderRow = (row, index) => {
27062
27103
  const key = rowKey(row, index);
27063
27104
  if (row.kind === "header") {
27064
- return /* @__PURE__ */ jsx31(Box25, { flexDirection: "column", paddingTop: 1, children: /* @__PURE__ */ jsx31(Text26, { bold: true, color: PALETTE.success, children: row.label }) }, key);
27105
+ return /* @__PURE__ */ jsx33(Box24, { flexDirection: "column", paddingTop: 1, children: /* @__PURE__ */ jsx33(Text26, { bold: true, color: PALETTE.success, children: row.label }) }, key);
27065
27106
  }
27066
27107
  if (row.kind === "component-description") {
27067
27108
  const isSelected2 = inComponentDesc && active;
27068
27109
  const isEditing = isSelected2 && focusLevel === "field" && editingField && activeField === "description";
27069
- return /* @__PURE__ */ jsx31(
27110
+ return /* @__PURE__ */ jsx33(
27070
27111
  DescriptionField,
27071
27112
  {
27072
27113
  value: editorState.componentDescription,
@@ -27097,7 +27138,7 @@ function FieldEditor({
27097
27138
  valueText,
27098
27139
  innerWidth
27099
27140
  );
27100
- return /* @__PURE__ */ jsx31(
27141
+ return /* @__PURE__ */ jsx33(
27101
27142
  PropRow,
27102
27143
  {
27103
27144
  prop: p,
@@ -27124,7 +27165,7 @@ function FieldEditor({
27124
27165
  valueText,
27125
27166
  innerWidth
27126
27167
  );
27127
- return /* @__PURE__ */ jsx31(
27168
+ return /* @__PURE__ */ jsx33(
27128
27169
  SlotRow,
27129
27170
  {
27130
27171
  slot: s,
@@ -27145,9 +27186,9 @@ function FieldEditor({
27145
27186
  borderStyle: "single",
27146
27187
  borderColor: hasEmptyProperties ? PALETTE.warning : active ? PALETTE.accent : PALETTE.border,
27147
27188
  children: [
27148
- hasEmptyProperties && /* @__PURE__ */ jsx31(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." }),
27189
+ hasEmptyProperties && /* @__PURE__ */ jsx33(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." }),
27149
27190
  header,
27150
- /* @__PURE__ */ jsx31(Box25, { flexDirection: "column", width: innerWidth, flexShrink: 0, children: focusLevel === "field" && !inComponentDesc && currentProp ? /* @__PURE__ */ jsx31(
27191
+ /* @__PURE__ */ jsx33(Box24, { flexDirection: "column", width: innerWidth, flexShrink: 0, children: focusLevel === "field" && !inComponentDesc && currentProp ? /* @__PURE__ */ jsx33(
27151
27192
  PropRow,
27152
27193
  {
27153
27194
  prop: currentProp,
@@ -27163,7 +27204,7 @@ function FieldEditor({
27163
27204
  rationale: metadata?.props?.[currentProp.name]?.rationale ?? null,
27164
27205
  showRationale: showInlineRationales
27165
27206
  }
27166
- ) : focusLevel === "field" && inSlots && currentSlot ? /* @__PURE__ */ jsx31(
27207
+ ) : focusLevel === "field" && inSlots && currentSlot ? /* @__PURE__ */ jsx33(
27167
27208
  SlotRow,
27168
27209
  {
27169
27210
  slot: currentSlot,
@@ -27182,8 +27223,8 @@ function FieldEditor({
27182
27223
  ) : visibleRowSlice.map((row, index) => {
27183
27224
  const absoluteIndex = scrollStart + index;
27184
27225
  const key = rowKey(row, absoluteIndex);
27185
- return /* @__PURE__ */ jsx31(
27186
- Box25,
27226
+ return /* @__PURE__ */ jsx33(
27227
+ Box24,
27187
27228
  {
27188
27229
  ref: (node) => {
27189
27230
  if (node) rowMeasureRefs.current.set(key, node);
@@ -27196,7 +27237,7 @@ function FieldEditor({
27196
27237
  `visible-${key}`
27197
27238
  );
27198
27239
  }) }),
27199
- categoryBelow && /* @__PURE__ */ jsx31(Text26, { color: PALETTE.success, bold: true, children: `(${categoryBelow} below)` }),
27240
+ categoryBelow && /* @__PURE__ */ jsx33(Text26, { color: PALETTE.success, bold: true, children: `(${categoryBelow} below)` }),
27200
27241
  sourceOpen && !onToggleSourceExternal && (() => {
27201
27242
  const propMeta = !inSlots && !inComponentDesc && currentProp ? metadata?.props?.[currentProp.name] : void 0;
27202
27243
  const start = propMeta?.sourceStartLine ?? null;
@@ -27205,49 +27246,49 @@ function FieldEditor({
27205
27246
  const src = metadata?.componentSource ?? null;
27206
27247
  const headerPath = path5 ?? "<unknown source path>";
27207
27248
  if (!start || !end2 || !src) {
27208
- return /* @__PURE__ */ jsxs25(Box25, { flexDirection: "column", borderStyle: "single", borderColor: "gray", paddingX: 1, children: [
27209
- /* @__PURE__ */ jsx31(Text26, { color: PALETTE.muted, bold: true, children: `source: ${headerPath}` }),
27210
- /* @__PURE__ */ jsx31(Text26, { color: PALETTE.muted, children: "(no source location captured for this prop)" }),
27211
- /* @__PURE__ */ jsx31(Text26, { children: "[s] close" })
27249
+ return /* @__PURE__ */ jsxs25(Box24, { flexDirection: "column", borderStyle: "single", borderColor: "gray", paddingX: 1, children: [
27250
+ /* @__PURE__ */ jsx33(Text26, { color: PALETTE.muted, bold: true, children: `source: ${headerPath}` }),
27251
+ /* @__PURE__ */ jsx33(Text26, { color: PALETTE.muted, children: "(no source location captured for this prop)" }),
27252
+ /* @__PURE__ */ jsx33(Text26, { children: "[s] close" })
27212
27253
  ] });
27213
27254
  }
27214
27255
  const lines = src.split("\n").slice(Math.max(0, start - 1), end2);
27215
- return /* @__PURE__ */ jsxs25(Box25, { flexDirection: "column", borderStyle: "single", borderColor: "gray", paddingX: 1, children: [
27216
- /* @__PURE__ */ jsx31(Text26, { color: PALETTE.muted, bold: true, children: `${headerPath}: lines ${start}\u2013${end2}` }),
27217
- lines.map((ln, i) => /* @__PURE__ */ jsx31(Text26, { color: PALETTE.muted, children: ln }, `source-line-${i}`)),
27218
- /* @__PURE__ */ jsx31(Text26, { children: "[s] close \xB7 [Esc] close" })
27256
+ return /* @__PURE__ */ jsxs25(Box24, { flexDirection: "column", borderStyle: "single", borderColor: "gray", paddingX: 1, children: [
27257
+ /* @__PURE__ */ jsx33(Text26, { color: PALETTE.muted, bold: true, children: `${headerPath}: lines ${start}\u2013${end2}` }),
27258
+ lines.map((ln, i) => /* @__PURE__ */ jsx33(Text26, { color: PALETTE.muted, children: ln }, `source-line-${i}`)),
27259
+ /* @__PURE__ */ jsx33(Text26, { children: "[s] close \xB7 [Esc] close" })
27219
27260
  ] });
27220
27261
  })(),
27221
- showHelp && /* @__PURE__ */ jsxs25(Box25, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.accent, paddingX: 1, children: [
27222
- /* @__PURE__ */ jsx31(Text26, { bold: true, color: PALETTE.accent, children: "Keybindings" }),
27223
- /* @__PURE__ */ jsx31(Text26, { children: " " }),
27224
- /* @__PURE__ */ jsx31(Text26, { bold: true, children: "Row navigation" }),
27225
- /* @__PURE__ */ jsx31(Text26, { children: " \u2191/\u2193 move between rows" }),
27226
- /* @__PURE__ */ jsx31(Text26, { children: " Enter edit fields on the current row" }),
27227
- /* @__PURE__ */ jsx31(Text26, { children: " Esc exit the panel" }),
27228
- /* @__PURE__ */ jsx31(Text26, { children: " " }),
27229
- /* @__PURE__ */ jsx31(Text26, { bold: true, children: "Field editing" }),
27230
- /* @__PURE__ */ jsx31(Text26, { children: " \u2191/\u2193/\u2190\u2192 cycle through fields" }),
27231
- /* @__PURE__ */ jsx31(Text26, { children: " \u2190/\u2192 cycle picker values \xB7 move cursor in text inputs" }),
27232
- /* @__PURE__ */ jsx31(Text26, { children: " Space/Enter toggle required" }),
27233
- /* @__PURE__ */ jsx31(Text26, { children: " Type edit description / string default" }),
27234
- /* @__PURE__ */ jsx31(Text26, { children: " Esc exit field-edit back to the row" }),
27235
- /* @__PURE__ */ jsx31(Text26, { children: " " }),
27236
- /* @__PURE__ */ jsx31(Text26, { bold: true, children: "Values / allowedComponents" }),
27237
- /* @__PURE__ */ jsx31(Text26, { children: " a / e / r add \xB7 edit \xB7 remove" }),
27238
- /* @__PURE__ */ jsx31(Text26, { children: " \u2191\u2193 navigate the list" }),
27239
- /* @__PURE__ */ jsx31(Text26, { children: " K / J reorder up \xB7 down" }),
27240
- /* @__PURE__ */ jsx31(Text26, { children: " " }),
27241
- /* @__PURE__ */ jsx31(Text26, { bold: true, children: "Panels" }),
27242
- /* @__PURE__ */ jsx31(Text26, { children: " s toggle source-view for the current prop" }),
27243
- /* @__PURE__ */ jsx31(Text26, { children: " " + propRationaleKey.padEnd(16) + " toggle prop rationale panel" }),
27244
- /* @__PURE__ */ jsx31(Text26, { children: " " + componentRationaleKey.padEnd(16) + " toggle component rationale panel" }),
27245
- /* @__PURE__ */ jsx31(Text26, { children: " ? toggle this overlay" }),
27246
- /* @__PURE__ */ jsx31(Text26, { children: " " }),
27247
- /* @__PURE__ */ jsx31(Text26, { color: PALETTE.muted, children: "press ? or Esc to close" })
27262
+ showHelp && /* @__PURE__ */ jsxs25(Box24, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.accent, paddingX: 1, children: [
27263
+ /* @__PURE__ */ jsx33(Text26, { bold: true, color: PALETTE.accent, children: "Keybindings" }),
27264
+ /* @__PURE__ */ jsx33(Text26, { children: " " }),
27265
+ /* @__PURE__ */ jsx33(Text26, { bold: true, children: "Row navigation" }),
27266
+ /* @__PURE__ */ jsx33(Text26, { children: " \u2191/\u2193 move between rows" }),
27267
+ /* @__PURE__ */ jsx33(Text26, { children: " Enter edit fields on the current row" }),
27268
+ /* @__PURE__ */ jsx33(Text26, { children: " Esc exit the panel" }),
27269
+ /* @__PURE__ */ jsx33(Text26, { children: " " }),
27270
+ /* @__PURE__ */ jsx33(Text26, { bold: true, children: "Field editing" }),
27271
+ /* @__PURE__ */ jsx33(Text26, { children: " \u2191/\u2193/\u2190\u2192 cycle through fields" }),
27272
+ /* @__PURE__ */ jsx33(Text26, { children: " \u2190/\u2192 cycle picker values \xB7 move cursor in text inputs" }),
27273
+ /* @__PURE__ */ jsx33(Text26, { children: " Space/Enter toggle required" }),
27274
+ /* @__PURE__ */ jsx33(Text26, { children: " Type edit description / string default" }),
27275
+ /* @__PURE__ */ jsx33(Text26, { children: " Esc exit field-edit back to the row" }),
27276
+ /* @__PURE__ */ jsx33(Text26, { children: " " }),
27277
+ /* @__PURE__ */ jsx33(Text26, { bold: true, children: "Values / allowedComponents" }),
27278
+ /* @__PURE__ */ jsx33(Text26, { children: " a / e / r add \xB7 edit \xB7 remove" }),
27279
+ /* @__PURE__ */ jsx33(Text26, { children: " \u2191\u2193 navigate the list" }),
27280
+ /* @__PURE__ */ jsx33(Text26, { children: " K / J reorder up \xB7 down" }),
27281
+ /* @__PURE__ */ jsx33(Text26, { children: " " }),
27282
+ /* @__PURE__ */ jsx33(Text26, { bold: true, children: "Panels" }),
27283
+ /* @__PURE__ */ jsx33(Text26, { children: " s toggle source-view for the current prop" }),
27284
+ /* @__PURE__ */ jsx33(Text26, { children: " " + propRationaleKey.padEnd(16) + " toggle prop rationale panel" }),
27285
+ /* @__PURE__ */ jsx33(Text26, { children: " " + componentRationaleKey.padEnd(16) + " toggle component rationale panel" }),
27286
+ /* @__PURE__ */ jsx33(Text26, { children: " ? toggle this overlay" }),
27287
+ /* @__PURE__ */ jsx33(Text26, { children: " " }),
27288
+ /* @__PURE__ */ jsx33(Text26, { color: PALETTE.muted, children: "press ? or Esc to close" })
27248
27289
  ] }),
27249
- validationError && /* @__PURE__ */ jsx31(Text26, { color: PALETTE.error, children: "\u2717 " + validationError }),
27250
- /* @__PURE__ */ jsx31(Box25, { paddingTop: 1, children: /* @__PURE__ */ jsx31(Text26, { color: PALETTE.muted, children: modeLabel }) })
27290
+ validationError && /* @__PURE__ */ jsx33(Text26, { color: PALETTE.error, children: "\u2717 " + validationError }),
27291
+ /* @__PURE__ */ jsx33(Box24, { paddingTop: 1, children: /* @__PURE__ */ jsx33(Text26, { color: PALETTE.muted, children: modeLabel }) })
27251
27292
  ]
27252
27293
  }
27253
27294
  );
@@ -27304,23 +27345,23 @@ var init_wrap_text = __esm({
27304
27345
  });
27305
27346
 
27306
27347
  // packages/experience-design-system-cli/src/tui/import/steps/09-review/components/RationaleLine.tsx
27307
- import { Box as Box26, Text as Text27 } from "ink";
27308
- import { jsx as jsx32, jsxs as jsxs26 } from "react/jsx-runtime";
27348
+ import { Box as Box25, Text as Text27 } from "ink";
27349
+ import { jsx as jsx34, jsxs as jsxs26 } from "react/jsx-runtime";
27309
27350
  function RationaleLine({ line, active }) {
27310
27351
  if (line.kind === "blank") {
27311
- return /* @__PURE__ */ jsx32(Box26, { children: /* @__PURE__ */ jsx32(Text27, { children: " " }) });
27352
+ return /* @__PURE__ */ jsx34(Box25, { children: /* @__PURE__ */ jsx34(Text27, { children: " " }) });
27312
27353
  }
27313
27354
  if (line.kind === "heading") {
27314
- return /* @__PURE__ */ jsx32(Box26, { children: /* @__PURE__ */ jsx32(Text27, { bold: true, color: active ? PALETTE.accent : PALETTE.muted, children: line.text }) });
27355
+ return /* @__PURE__ */ jsx34(Box25, { children: /* @__PURE__ */ jsx34(Text27, { bold: true, color: active ? PALETTE.accent : PALETTE.muted, children: line.text }) });
27315
27356
  }
27316
27357
  if (line.kind === "label") {
27317
- return /* @__PURE__ */ jsxs26(Box26, { children: [
27318
- line.prefix && /* @__PURE__ */ jsx32(Text27, { children: line.prefix }),
27319
- /* @__PURE__ */ jsx32(Text27, { bold: true, color: active ? line.color : PALETTE.muted, children: line.text }),
27320
- line.suffix && /* @__PURE__ */ jsx32(Text27, { color: PALETTE.muted, children: line.suffix })
27358
+ return /* @__PURE__ */ jsxs26(Box25, { children: [
27359
+ line.prefix && /* @__PURE__ */ jsx34(Text27, { children: line.prefix }),
27360
+ /* @__PURE__ */ jsx34(Text27, { bold: true, color: active ? line.color : PALETTE.muted, children: line.text }),
27361
+ line.suffix && /* @__PURE__ */ jsx34(Text27, { color: PALETTE.muted, children: line.suffix })
27321
27362
  ] });
27322
27363
  }
27323
- return /* @__PURE__ */ jsx32(Box26, { children: /* @__PURE__ */ jsx32(Text27, { color: !active || line.dim ? PALETTE.muted : void 0, children: line.text }) });
27364
+ return /* @__PURE__ */ jsx34(Box25, { children: /* @__PURE__ */ jsx34(Text27, { color: !active || line.dim ? PALETTE.muted : void 0, children: line.text }) });
27324
27365
  }
27325
27366
  var init_RationaleLine = __esm({
27326
27367
  "packages/experience-design-system-cli/src/tui/import/steps/09-review/components/RationaleLine.tsx"() {
@@ -27330,8 +27371,8 @@ var init_RationaleLine = __esm({
27330
27371
  });
27331
27372
 
27332
27373
  // packages/experience-design-system-cli/src/tui/import/steps/09-review/components/ComponentRationalePanel.tsx
27333
- import { Box as Box27, Text as Text28 } from "ink";
27334
- import { jsx as jsx33, jsxs as jsxs27 } from "react/jsx-runtime";
27374
+ import { Box as Box26, Text as Text28 } from "ink";
27375
+ import { jsx as jsx35, jsxs as jsxs27 } from "react/jsx-runtime";
27335
27376
  function renderComponentRationaleLines(data, innerWidth) {
27336
27377
  const out = [];
27337
27378
  const pushSection = (heading, body) => {
@@ -27399,7 +27440,7 @@ function ComponentRationalePanel({
27399
27440
  const visibleStart = totalLines === 0 ? 0 : scrollOffset + 1;
27400
27441
  const visibleEnd = Math.min(totalLines, scrollOffset + contentHeight);
27401
27442
  return /* @__PURE__ */ jsxs27(
27402
- Box27,
27443
+ Box26,
27403
27444
  {
27404
27445
  flexDirection: "column",
27405
27446
  width,
@@ -27407,9 +27448,9 @@ function ComponentRationalePanel({
27407
27448
  borderStyle: "single",
27408
27449
  borderColor: active ? PALETTE.text : void 0,
27409
27450
  children: [
27410
- /* @__PURE__ */ jsx33(Box27, { children: /* @__PURE__ */ jsx33(Text28, { bold: true, color: active ? void 0 : PALETTE.muted, children: `Component rationale: ${data.name}` }) }),
27411
- visible.map((line, i) => /* @__PURE__ */ jsx33(RationaleLine, { line, active }, i)),
27412
- /* @__PURE__ */ jsx33(Box27, { children: overflowed ? /* @__PURE__ */ jsx33(Text28, { children: `${visibleStart}-${visibleEnd}/${totalLines} [\u2191\u2193] scroll [I/Esc] close` }) : /* @__PURE__ */ jsx33(Text28, { children: "[I/Esc] close" }) })
27451
+ /* @__PURE__ */ jsx35(Box26, { children: /* @__PURE__ */ jsx35(Text28, { bold: true, color: active ? void 0 : PALETTE.muted, children: `Component rationale: ${data.name}` }) }),
27452
+ visible.map((line, i) => /* @__PURE__ */ jsx35(RationaleLine, { line, active }, i)),
27453
+ /* @__PURE__ */ jsx35(Box26, { children: overflowed ? /* @__PURE__ */ jsx35(Text28, { children: `${visibleStart}-${visibleEnd}/${totalLines} [\u2191\u2193] scroll [I/Esc] close` }) : /* @__PURE__ */ jsx35(Text28, { children: "[I/Esc] close" }) })
27413
27454
  ]
27414
27455
  }
27415
27456
  );
@@ -27427,9 +27468,9 @@ var init_ComponentRationalePanel = __esm({
27427
27468
 
27428
27469
  // packages/experience-design-system-cli/src/tui/import/steps/09-review/components/HighlightedLine.tsx
27429
27470
  import { Text as Text29 } from "ink";
27430
- import { Fragment as Fragment7, jsx as jsx34 } from "react/jsx-runtime";
27471
+ import { Fragment as Fragment9, jsx as jsx36 } from "react/jsx-runtime";
27431
27472
  function HighlightedLine({ parts }) {
27432
- return /* @__PURE__ */ jsx34(Fragment7, { children: parts.map((part, i) => /* @__PURE__ */ jsx34(Text29, { color: part.dim ? PALETTE.muted : part.color, children: part.text }, i)) });
27473
+ return /* @__PURE__ */ jsx36(Fragment9, { children: parts.map((part, i) => /* @__PURE__ */ jsx36(Text29, { color: part.dim ? PALETTE.muted : part.color, children: part.text }, i)) });
27433
27474
  }
27434
27475
  var init_HighlightedLine = __esm({
27435
27476
  "packages/experience-design-system-cli/src/tui/import/steps/09-review/components/HighlightedLine.tsx"() {
@@ -27439,8 +27480,8 @@ var init_HighlightedLine = __esm({
27439
27480
  });
27440
27481
 
27441
27482
  // packages/experience-design-system-cli/src/tui/import/steps/09-review/components/ScrollablePanel.tsx
27442
- import { Box as Box28, Text as Text30 } from "ink";
27443
- import { Fragment as Fragment8, jsx as jsx35, jsxs as jsxs28 } from "react/jsx-runtime";
27483
+ import { Box as Box27, Text as Text30 } from "ink";
27484
+ import { Fragment as Fragment10, jsx as jsx37, jsxs as jsxs28 } from "react/jsx-runtime";
27444
27485
  function ScrollablePanel({
27445
27486
  title,
27446
27487
  width,
@@ -27453,12 +27494,12 @@ function ScrollablePanel({
27453
27494
  children
27454
27495
  }) {
27455
27496
  const overflowed = totalLines > height;
27456
- return /* @__PURE__ */ jsxs28(Box28, { flexDirection: "column", width, height: height + 2, borderStyle: "single", borderColor, children: [
27457
- /* @__PURE__ */ jsxs28(Box28, { children: [
27458
- /* @__PURE__ */ jsx35(Text30, { bold: true, color: active ? void 0 : PALETTE.muted, children: title }),
27459
- overflowed && /* @__PURE__ */ jsxs28(Fragment8, { children: [
27460
- /* @__PURE__ */ jsx35(Box28, { flexGrow: 1 }),
27461
- /* @__PURE__ */ jsx35(Text30, { color: active ? void 0 : PALETTE.muted, children: `\u2195 ${visibleStart}-${visibleEnd}/${totalLines}` })
27497
+ return /* @__PURE__ */ jsxs28(Box27, { flexDirection: "column", width, height: height + 2, borderStyle: "single", borderColor, children: [
27498
+ /* @__PURE__ */ jsxs28(Box27, { children: [
27499
+ /* @__PURE__ */ jsx37(Text30, { bold: true, color: active ? void 0 : PALETTE.muted, children: title }),
27500
+ overflowed && /* @__PURE__ */ jsxs28(Fragment10, { children: [
27501
+ /* @__PURE__ */ jsx37(Box27, { flexGrow: 1 }),
27502
+ /* @__PURE__ */ jsx37(Text30, { color: active ? void 0 : PALETTE.muted, children: `\u2195 ${visibleStart}-${visibleEnd}/${totalLines}` })
27462
27503
  ] })
27463
27504
  ] }),
27464
27505
  children
@@ -27472,8 +27513,8 @@ var init_ScrollablePanel = __esm({
27472
27513
  });
27473
27514
 
27474
27515
  // packages/experience-design-system-cli/src/tui/import/steps/09-review/components/JsonPanel.tsx
27475
- import { Box as Box29 } from "ink";
27476
- import { jsx as jsx36 } from "react/jsx-runtime";
27516
+ import { Box as Box28 } from "ink";
27517
+ import { jsx as jsx38 } from "react/jsx-runtime";
27477
27518
  function highlightJson(line) {
27478
27519
  const parts = [];
27479
27520
  let remaining = line;
@@ -27511,7 +27552,7 @@ function highlightJson(line) {
27511
27552
  parts.push({ text: remaining[0] });
27512
27553
  remaining = remaining.slice(1);
27513
27554
  }
27514
- return /* @__PURE__ */ jsx36(HighlightedLine, { parts });
27555
+ return /* @__PURE__ */ jsx38(HighlightedLine, { parts });
27515
27556
  }
27516
27557
  function truncateLine(line, maxWidth) {
27517
27558
  if (line.length <= maxWidth) return line;
@@ -27524,7 +27565,7 @@ function JsonPanel({ label, value, scrollOffset, width, height, active }) {
27524
27565
  const totalLines = allLines.length;
27525
27566
  const visibleStart = totalLines === 0 ? 0 : scrollOffset + 1;
27526
27567
  const visibleEnd = Math.min(totalLines, scrollOffset + height);
27527
- return /* @__PURE__ */ jsx36(
27568
+ return /* @__PURE__ */ jsx38(
27528
27569
  ScrollablePanel,
27529
27570
  {
27530
27571
  title: label,
@@ -27537,7 +27578,7 @@ function JsonPanel({ label, value, scrollOffset, width, height, active }) {
27537
27578
  borderColor: active ? "white" : void 0,
27538
27579
  children: visibleLines.map((line, i) => {
27539
27580
  const truncated = truncateLine(line, innerWidth);
27540
- return /* @__PURE__ */ jsx36(Box29, { children: highlightJson(truncated) }, i);
27581
+ return /* @__PURE__ */ jsx38(Box28, { children: highlightJson(truncated) }, i);
27541
27582
  })
27542
27583
  }
27543
27584
  );
@@ -27551,7 +27592,7 @@ var init_JsonPanel = __esm({
27551
27592
  });
27552
27593
 
27553
27594
  // packages/experience-design-system-cli/src/tui/import/steps/09-review/components/RationalePanel.tsx
27554
- import { jsx as jsx37 } from "react/jsx-runtime";
27595
+ import { jsx as jsx39 } from "react/jsx-runtime";
27555
27596
  function renderRationaleLines(rows, innerWidth) {
27556
27597
  const out = [];
27557
27598
  rows.forEach((row, idx) => {
@@ -27584,7 +27625,7 @@ function RationalePanel({
27584
27625
  const visible = allLines.slice(scrollOffset, scrollOffset + height);
27585
27626
  const visibleStart = totalLines === 0 ? 0 : scrollOffset + 1;
27586
27627
  const visibleEnd = Math.min(totalLines, scrollOffset + height);
27587
- return /* @__PURE__ */ jsx37(
27628
+ return /* @__PURE__ */ jsx39(
27588
27629
  ScrollablePanel,
27589
27630
  {
27590
27631
  title: `RATIONALE \u2014 ${componentName}`,
@@ -27595,7 +27636,7 @@ function RationalePanel({
27595
27636
  visibleStart,
27596
27637
  visibleEnd,
27597
27638
  borderColor: active ? PALETTE.text : void 0,
27598
- children: visible.map((line, i) => /* @__PURE__ */ jsx37(RationaleLine, { line, active }, i))
27639
+ children: visible.map((line, i) => /* @__PURE__ */ jsx39(RationaleLine, { line, active }, i))
27599
27640
  }
27600
27641
  );
27601
27642
  }
@@ -27611,8 +27652,8 @@ var init_RationalePanel = __esm({
27611
27652
 
27612
27653
  // packages/experience-design-system-cli/src/tui/import/steps/09-review/components/TokenReviewPanel.tsx
27613
27654
  import figures7 from "figures";
27614
- import { Box as Box30, Text as Text31 } from "ink";
27615
- import { jsx as jsx38, jsxs as jsxs29 } from "react/jsx-runtime";
27655
+ import { Box as Box29, Text as Text31 } from "ink";
27656
+ import { jsx as jsx40, jsxs as jsxs29 } from "react/jsx-runtime";
27616
27657
  function TokenReviewPanel({
27617
27658
  componentName,
27618
27659
  suggestions,
@@ -27632,7 +27673,7 @@ function TokenReviewPanel({
27632
27673
  const visiblePaths = current.paths.slice(scrollStart, scrollStart + visibleCount);
27633
27674
  const rangeLabel = current.paths.length === 0 ? "no compatible tokens" : `${scrollStart + 1}-${scrollStart + visiblePaths.length} of ${current.paths.length}`;
27634
27675
  return /* @__PURE__ */ jsxs29(
27635
- Box30,
27676
+ Box29,
27636
27677
  {
27637
27678
  flexDirection: "column",
27638
27679
  width,
@@ -27640,15 +27681,15 @@ function TokenReviewPanel({
27640
27681
  borderStyle: "single",
27641
27682
  borderColor: active ? PALETTE.text : void 0,
27642
27683
  children: [
27643
- /* @__PURE__ */ jsx38(Text31, { bold: true, color: active ? void 0 : PALETTE.muted, wrap: "truncate", children: `TOKEN REVIEW \u2014 ${componentName} \xB7 ${current.propName} (edit allowed)` }),
27644
- /* @__PURE__ */ jsx38(Text31, { color: PALETTE.muted, wrap: "truncate", children: `select which tokens are allowed (${rangeLabel})` }),
27645
- /* @__PURE__ */ jsx38(Text31, { children: " " }),
27646
- current.paths.length === 0 && /* @__PURE__ */ jsx38(Text31, { color: PALETTE.muted, children: "(no compatible tokens found for this token kind)" }),
27684
+ /* @__PURE__ */ jsx40(Text31, { bold: true, color: active ? void 0 : PALETTE.muted, wrap: "truncate", children: `TOKEN REVIEW \u2014 ${componentName} \xB7 ${current.propName} (edit allowed)` }),
27685
+ /* @__PURE__ */ jsx40(Text31, { color: PALETTE.muted, wrap: "truncate", children: `select which tokens are allowed (${rangeLabel})` }),
27686
+ /* @__PURE__ */ jsx40(Text31, { children: " " }),
27687
+ current.paths.length === 0 && /* @__PURE__ */ jsx40(Text31, { color: PALETTE.muted, children: "(no compatible tokens found for this token kind)" }),
27647
27688
  visiblePaths.map((path5, i) => {
27648
27689
  const pathIndex = scrollStart + i;
27649
27690
  const checked = editSelection.has(path5);
27650
27691
  const focused = pathIndex === editCursor;
27651
- return /* @__PURE__ */ jsx38(Box30, { children: /* @__PURE__ */ jsx38(
27692
+ return /* @__PURE__ */ jsx40(Box29, { children: /* @__PURE__ */ jsx40(
27652
27693
  Text31,
27653
27694
  {
27654
27695
  color: focused ? PALETTE.accent : active ? void 0 : PALETTE.muted,
@@ -27658,15 +27699,15 @@ function TokenReviewPanel({
27658
27699
  }
27659
27700
  ) }, path5);
27660
27701
  }),
27661
- /* @__PURE__ */ jsx38(Text31, { children: " " }),
27662
- /* @__PURE__ */ jsx38(Text31, { color: PALETTE.muted, wrap: "truncate", children: "[\u2191/\u2193] move [Space] toggle" }),
27663
- /* @__PURE__ */ jsx38(Text31, { color: PALETTE.muted, wrap: "truncate", children: "[Ctrl+S] save [Esc] cancel" })
27702
+ /* @__PURE__ */ jsx40(Text31, { children: " " }),
27703
+ /* @__PURE__ */ jsx40(Text31, { color: PALETTE.muted, wrap: "truncate", children: "[\u2191/\u2193] move [Space] toggle" }),
27704
+ /* @__PURE__ */ jsx40(Text31, { color: PALETTE.muted, wrap: "truncate", children: "[Ctrl+S] save [Esc] cancel" })
27664
27705
  ]
27665
27706
  }
27666
27707
  );
27667
27708
  }
27668
27709
  return /* @__PURE__ */ jsxs29(
27669
- Box30,
27710
+ Box29,
27670
27711
  {
27671
27712
  flexDirection: "column",
27672
27713
  width,
@@ -27674,18 +27715,18 @@ function TokenReviewPanel({
27674
27715
  borderStyle: "single",
27675
27716
  borderColor: active ? PALETTE.text : void 0,
27676
27717
  children: [
27677
- /* @__PURE__ */ jsx38(Text31, { bold: true, color: active ? void 0 : PALETTE.muted, children: `TOKEN REVIEW \u2014 ${componentName}` }),
27678
- suggestions.length === 0 && /* @__PURE__ */ jsx38(Text31, { color: PALETTE.muted, children: "(no token suggestions for this component)" }),
27718
+ /* @__PURE__ */ jsx40(Text31, { bold: true, color: active ? void 0 : PALETTE.muted, children: `TOKEN REVIEW \u2014 ${componentName}` }),
27719
+ suggestions.length === 0 && /* @__PURE__ */ jsx40(Text31, { color: PALETTE.muted, children: "(no token suggestions for this component)" }),
27679
27720
  suggestions.map((s, i) => {
27680
27721
  const focused = i === selectedRow;
27681
- return /* @__PURE__ */ jsxs29(Box30, { flexDirection: "column", children: [
27682
- /* @__PURE__ */ jsx38(Box30, { children: /* @__PURE__ */ jsx38(Text31, { color: focused ? PALETTE.accent : active ? void 0 : PALETTE.muted, bold: focused, children: `${focused ? figures7.pointer : " "} ${s.propName}` }) }),
27683
- /* @__PURE__ */ jsx38(Text31, { color: PALETTE.muted, children: ` suggested: ${s.suggested.join(", ")}` }),
27684
- /* @__PURE__ */ jsx38(Text31, { color: PALETTE.muted, children: ` allowed: ${s.allowed.join(", ")}` })
27722
+ return /* @__PURE__ */ jsxs29(Box29, { flexDirection: "column", children: [
27723
+ /* @__PURE__ */ jsx40(Box29, { children: /* @__PURE__ */ jsx40(Text31, { color: focused ? PALETTE.accent : active ? void 0 : PALETTE.muted, bold: focused, children: `${focused ? figures7.pointer : " "} ${s.propName}` }) }),
27724
+ /* @__PURE__ */ jsx40(Text31, { color: PALETTE.muted, children: ` suggested: ${s.suggested.join(", ")}` }),
27725
+ /* @__PURE__ */ jsx40(Text31, { color: PALETTE.muted, children: ` allowed: ${s.allowed.join(", ")}` })
27685
27726
  ] }, s.propName);
27686
27727
  }),
27687
- /* @__PURE__ */ jsx38(Text31, { children: " " }),
27688
- /* @__PURE__ */ jsx38(Text31, { children: "[\u2191/\u2193] move [Enter] edit allowed [Esc] close" })
27728
+ /* @__PURE__ */ jsx40(Text31, { children: " " }),
27729
+ /* @__PURE__ */ jsx40(Text31, { children: "[\u2191/\u2193] move [Enter] edit allowed [Esc] close" })
27689
27730
  ]
27690
27731
  }
27691
27732
  );
@@ -27699,7 +27740,7 @@ var init_TokenReviewPanel = __esm({
27699
27740
 
27700
27741
  // packages/experience-design-system-cli/src/tui/import/steps/09-review/review-details-panel.tsx
27701
27742
  import { Text as Text32 } from "ink";
27702
- import { Fragment as Fragment9, jsx as jsx39, jsxs as jsxs30 } from "react/jsx-runtime";
27743
+ import { Fragment as Fragment11, jsx as jsx41, jsxs as jsxs30 } from "react/jsx-runtime";
27703
27744
  function ReviewDetailsPanel({
27704
27745
  selectedKey,
27705
27746
  panelOpen,
@@ -27734,7 +27775,7 @@ function ReviewDetailsPanel({
27734
27775
  rationale: s.rationale ?? ""
27735
27776
  }))
27736
27777
  ];
27737
- return /* @__PURE__ */ jsx39(
27778
+ return /* @__PURE__ */ jsx41(
27738
27779
  RationalePanel,
27739
27780
  {
27740
27781
  componentName: componentRationale?.name ?? selectedKey,
@@ -27747,7 +27788,7 @@ function ReviewDetailsPanel({
27747
27788
  );
27748
27789
  }
27749
27790
  if (panelOpen === "component-rationale") {
27750
- return /* @__PURE__ */ jsx39(
27791
+ return /* @__PURE__ */ jsx41(
27751
27792
  ComponentRationalePanel,
27752
27793
  {
27753
27794
  data: componentRationale ?? {
@@ -27773,13 +27814,13 @@ function ReviewDetailsPanel({
27773
27814
  const sourceLineCount = Math.max(1, height - 4);
27774
27815
  const lines = source ? source.split("\n").slice(panelScrollOffset, panelScrollOffset + sourceLineCount) : [];
27775
27816
  return /* @__PURE__ */ jsxs30(FixedPanel, { width, height, borderStyle: "single", borderColor: sourceBorderColor, paddingLeft: 1, children: [
27776
- /* @__PURE__ */ jsx39(Text32, { color: PALETTE.muted, bold: true, wrap: "truncate-end", children: `source: ${headerPath}` }),
27777
- source ? lines.map((line, index) => /* @__PURE__ */ jsx39(Text32, { color: PALETTE.muted, wrap: "truncate-end", children: line }, `source-line-${index}`)) : /* @__PURE__ */ jsx39(Text32, { color: PALETTE.muted, children: "(no source captured)" }),
27778
- /* @__PURE__ */ jsx39(Text32, { color: PALETTE.muted, wrap: "truncate-end", children: "[s/Esc] close" })
27817
+ /* @__PURE__ */ jsx41(Text32, { color: PALETTE.muted, bold: true, wrap: "truncate-end", children: `source: ${headerPath}` }),
27818
+ source ? lines.map((line, index) => /* @__PURE__ */ jsx41(Text32, { color: PALETTE.muted, wrap: "truncate-end", children: line }, `source-line-${index}`)) : /* @__PURE__ */ jsx41(Text32, { color: PALETTE.muted, children: "(no source captured)" }),
27819
+ /* @__PURE__ */ jsx41(Text32, { color: PALETTE.muted, wrap: "truncate-end", children: "[s/Esc] close" })
27779
27820
  ] });
27780
27821
  }
27781
27822
  if (panelOpen === "token-review") {
27782
- return /* @__PURE__ */ jsx39(
27823
+ return /* @__PURE__ */ jsx41(
27783
27824
  TokenReviewPanel,
27784
27825
  {
27785
27826
  componentName: selectedKey,
@@ -27795,7 +27836,7 @@ function ReviewDetailsPanel({
27795
27836
  );
27796
27837
  }
27797
27838
  if (showJson) {
27798
- return /* @__PURE__ */ jsx39(
27839
+ return /* @__PURE__ */ jsx41(
27799
27840
  JsonPanel,
27800
27841
  {
27801
27842
  label: "GENERATED DEFINITION (read-only)",
@@ -27807,7 +27848,7 @@ function ReviewDetailsPanel({
27807
27848
  }
27808
27849
  );
27809
27850
  }
27810
- return /* @__PURE__ */ jsx39(Fragment9, { children: editor });
27851
+ return /* @__PURE__ */ jsx41(Fragment11, { children: editor });
27811
27852
  }
27812
27853
  var init_review_details_panel = __esm({
27813
27854
  "packages/experience-design-system-cli/src/tui/import/steps/09-review/review-details-panel.tsx"() {
@@ -27822,7 +27863,7 @@ var init_review_details_panel = __esm({
27822
27863
  });
27823
27864
 
27824
27865
  // packages/experience-design-system-cli/src/tui/import/steps/09-review/components/ReviewDetailsEditor.tsx
27825
- import { jsx as jsx40 } from "react/jsx-runtime";
27866
+ import { jsx as jsx42 } from "react/jsx-runtime";
27826
27867
  import { createElement } from "react";
27827
27868
  function toFieldEditorMetadata(reviewMetadata) {
27828
27869
  if (!reviewMetadata) return void 0;
@@ -27856,7 +27897,7 @@ function ReviewDetailsEditor({
27856
27897
  jsonScrollOffset,
27857
27898
  currentTokenSuggestions
27858
27899
  } = reviewEditor;
27859
- return /* @__PURE__ */ jsx40(
27900
+ return /* @__PURE__ */ jsx42(
27860
27901
  ReviewDetailsPanel,
27861
27902
  {
27862
27903
  selectedKey,
@@ -27903,8 +27944,8 @@ var init_ReviewDetailsEditor = __esm({
27903
27944
  });
27904
27945
 
27905
27946
  // packages/experience-design-system-cli/src/tui/import/steps/09-review/components/ReviewComponentPanel.tsx
27906
- import { Box as Box31, Text as Text33 } from "ink";
27907
- import { Fragment as Fragment10, jsx as jsx41, jsxs as jsxs31 } from "react/jsx-runtime";
27947
+ import { Box as Box30, Text as Text33 } from "ink";
27948
+ import { Fragment as Fragment12, jsx as jsx43, jsxs as jsxs31 } from "react/jsx-runtime";
27908
27949
  function buildReviewFieldEditor(reviewEditor, selectedJson, onExit, overrides = {}) {
27909
27950
  return {
27910
27951
  value: reviewEditor.draftValue || selectedJson,
@@ -27944,17 +27985,17 @@ function ReviewEmptyComponentsWarning({
27944
27985
  hidden
27945
27986
  }) {
27946
27987
  if (hidden || count === 0) return null;
27947
- return /* @__PURE__ */ jsx41(Text33, { color: PALETTE.warning, children: `\u26A0 ${count} component${count === 1 ? "" : "s"} had no classifiable props \u2014 review with care` });
27988
+ return /* @__PURE__ */ jsx43(Text33, { color: PALETTE.warning, children: `\u26A0 ${count} component${count === 1 ? "" : "s"} had no classifiable props \u2014 review with care` });
27948
27989
  }
27949
27990
  function ReviewNoSelection() {
27950
- return /* @__PURE__ */ jsx41(Box31, { flexGrow: 1, paddingLeft: 1, flexDirection: "column", children: /* @__PURE__ */ jsx41(Text33, { color: PALETTE.muted, children: "No component selected" }) });
27991
+ return /* @__PURE__ */ jsx43(Box30, { flexGrow: 1, paddingLeft: 1, flexDirection: "column", children: /* @__PURE__ */ jsx43(Text33, { color: PALETTE.muted, children: "No component selected" }) });
27951
27992
  }
27952
27993
  function ReviewFinalizeError({
27953
27994
  message,
27954
27995
  hidden
27955
27996
  }) {
27956
27997
  if (hidden || !message) return null;
27957
- return /* @__PURE__ */ jsx41(Text33, { color: PALETTE.error, children: `\u26A0 ${message}` });
27998
+ return /* @__PURE__ */ jsx43(Text33, { color: PALETTE.error, children: `\u26A0 ${message}` });
27958
27999
  }
27959
28000
  function ReviewPanelFooter({
27960
28001
  reviewEditor,
@@ -27963,10 +28004,10 @@ function ReviewPanelFooter({
27963
28004
  livePreview,
27964
28005
  livePreviewSpinner
27965
28006
  }) {
27966
- return /* @__PURE__ */ jsxs31(Fragment10, { children: [
28007
+ return /* @__PURE__ */ jsxs31(Fragment12, { children: [
27967
28008
  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" : ""),
27968
- livePreview.status === "running" && /* @__PURE__ */ jsx41(Text33, { children: ` ${livePreviewSpinner} live preview` }),
27969
- livePreview.disabled && /* @__PURE__ */ jsx41(Text33, { children: " \xB7 live preview disabled" })
28009
+ livePreview.status === "running" && /* @__PURE__ */ jsx43(Text33, { children: ` ${livePreviewSpinner} live preview` }),
28010
+ livePreview.disabled && /* @__PURE__ */ jsx43(Text33, { children: " \xB7 live preview disabled" })
27970
28011
  ] });
27971
28012
  }
27972
28013
  function ReviewComponentTitle({
@@ -27975,9 +28016,9 @@ function ReviewComponentTitle({
27975
28016
  slotCount,
27976
28017
  sidebarFocused
27977
28018
  }) {
27978
- return /* @__PURE__ */ jsxs31(Box31, { paddingLeft: 2, paddingBottom: 1, children: [
27979
- /* @__PURE__ */ jsx41(Text33, { bold: true, wrap: "truncate-end", children: selectedKey }),
27980
- /* @__PURE__ */ jsx41(Box31, { flexGrow: 1 }),
28019
+ return /* @__PURE__ */ jsxs31(Box30, { paddingLeft: 2, paddingBottom: 1, children: [
28020
+ /* @__PURE__ */ jsx43(Text33, { bold: true, wrap: "truncate-end", children: selectedKey }),
28021
+ /* @__PURE__ */ jsx43(Box30, { flexGrow: 1 }),
27981
28022
  /* @__PURE__ */ jsxs31(Text33, { color: PALETTE.muted, wrap: "truncate-end", children: [
27982
28023
  propCount,
27983
28024
  " prop",
@@ -28009,8 +28050,8 @@ function ReviewComponentPanel({
28009
28050
  const slotCount = selectedEntry.$slots ? Object.keys(selectedEntry.$slots).length : 0;
28010
28051
  const contentHeight = Math.max(1, height - 2);
28011
28052
  const contentWidth = Math.max(1, width - 1);
28012
- return /* @__PURE__ */ jsx41(FixedPanel, { width, height, borderStyle: void 0, paddingLeft: 1, children: /* @__PURE__ */ jsxs31(Box31, { flexDirection: "column", width: contentWidth, height, flexShrink: 0, overflowY: "hidden", children: [
28013
- /* @__PURE__ */ jsx41(Box31, { width: contentWidth, height: contentHeight, flexShrink: 0, overflowY: "hidden", children: /* @__PURE__ */ jsx41(
28053
+ return /* @__PURE__ */ jsx43(FixedPanel, { width, height, borderStyle: void 0, paddingLeft: 1, children: /* @__PURE__ */ jsxs31(Box30, { flexDirection: "column", width: contentWidth, height, flexShrink: 0, overflowY: "hidden", children: [
28054
+ /* @__PURE__ */ jsx43(Box30, { width: contentWidth, height: contentHeight, flexShrink: 0, overflowY: "hidden", children: /* @__PURE__ */ jsx43(
28014
28055
  ReviewDetailsEditor,
28015
28056
  {
28016
28057
  selectedKey,
@@ -28023,7 +28064,7 @@ function ReviewComponentPanel({
28023
28064
  jsonValue,
28024
28065
  sidebarFocused,
28025
28066
  fieldEditor,
28026
- header: /* @__PURE__ */ jsx41(
28067
+ header: /* @__PURE__ */ jsx43(
28027
28068
  ReviewComponentTitle,
28028
28069
  {
28029
28070
  selectedKey,
@@ -28034,8 +28075,8 @@ function ReviewComponentPanel({
28034
28075
  )
28035
28076
  }
28036
28077
  ) }),
28037
- /* @__PURE__ */ jsx41(Box31, { width: contentWidth, height: 1, flexShrink: 0, children: /* @__PURE__ */ jsx41(Text33, { color: saveError ? PALETTE.error : void 0, wrap: "truncate-end", children: saveError ? "\u2717 " + saveError : " " }) }),
28038
- /* @__PURE__ */ jsx41(Box31, { width: contentWidth, height: 1, flexShrink: 0, children: /* @__PURE__ */ jsx41(Text33, { color: PALETTE.muted, wrap: "truncate-end", children: /* @__PURE__ */ jsx41(
28078
+ /* @__PURE__ */ jsx43(Box30, { width: contentWidth, height: 1, flexShrink: 0, children: /* @__PURE__ */ jsx43(Text33, { color: saveError ? PALETTE.error : void 0, wrap: "truncate-end", children: saveError ? "\u2717 " + saveError : " " }) }),
28079
+ /* @__PURE__ */ jsx43(Box30, { width: contentWidth, height: 1, flexShrink: 0, children: /* @__PURE__ */ jsx43(Text33, { color: PALETTE.muted, wrap: "truncate-end", children: /* @__PURE__ */ jsx43(
28039
28080
  ReviewPanelFooter,
28040
28081
  {
28041
28082
  reviewEditor,
@@ -28058,8 +28099,8 @@ var init_ReviewComponentPanel = __esm({
28058
28099
  });
28059
28100
 
28060
28101
  // packages/experience-design-system-cli/src/tui/import/steps/09-review/components/ReviewStatus.tsx
28061
- import { Box as Box32, Text as Text34 } from "ink";
28062
- import { jsx as jsx42, jsxs as jsxs32 } from "react/jsx-runtime";
28102
+ import { Box as Box31, Text as Text34 } from "ink";
28103
+ import { jsx as jsx44, jsxs as jsxs32 } from "react/jsx-runtime";
28063
28104
  function countReviewStatuses(entries) {
28064
28105
  return entries.reduce(
28065
28106
  (counts, entry) => {
@@ -28072,13 +28113,13 @@ function countReviewStatuses(entries) {
28072
28113
  );
28073
28114
  }
28074
28115
  function ReviewLoadingState() {
28075
- return /* @__PURE__ */ jsx42(Box32, { paddingX: 2, paddingY: 1, children: /* @__PURE__ */ jsx42(Text34, { color: PALETTE.muted, children: "Loading generated definitions..." }) });
28116
+ return /* @__PURE__ */ jsx44(Box31, { paddingX: 2, paddingY: 1, children: /* @__PURE__ */ jsx44(Text34, { color: PALETTE.muted, children: "Loading generated definitions..." }) });
28076
28117
  }
28077
28118
  function ReviewLoadError({ message }) {
28078
- return /* @__PURE__ */ jsxs32(Box32, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
28079
- /* @__PURE__ */ jsx42(Text34, { color: PALETTE.error, children: message }),
28080
- /* @__PURE__ */ jsx42(Text34, { children: " " }),
28081
- /* @__PURE__ */ jsx42(ControlHints, { hints: [{ keys: "q / Enter / Esc", label: "Quit" }] })
28119
+ return /* @__PURE__ */ jsxs32(Box31, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
28120
+ /* @__PURE__ */ jsx44(Text34, { color: PALETTE.error, children: message }),
28121
+ /* @__PURE__ */ jsx44(Text34, { children: " " }),
28122
+ /* @__PURE__ */ jsx44(ControlHints, { hints: [{ keys: "q / Enter / Esc", label: "Quit" }] })
28082
28123
  ] });
28083
28124
  }
28084
28125
  var init_ReviewStatus = __esm({
@@ -28302,8 +28343,8 @@ var init_run_live_preview = __esm({
28302
28343
  });
28303
28344
 
28304
28345
  // packages/experience-design-system-cli/src/tui/import/steps/09-review/components/FinalizeDialog.tsx
28305
- import { Box as Box33, Text as Text35 } from "ink";
28306
- import { Fragment as Fragment11, jsx as jsx43, jsxs as jsxs33 } from "react/jsx-runtime";
28346
+ import { Box as Box32, Text as Text35 } from "ink";
28347
+ import { Fragment as Fragment13, jsx as jsx45, jsxs as jsxs33 } from "react/jsx-runtime";
28307
28348
  function FinalizeDialog({
28308
28349
  accepted,
28309
28350
  rejected,
@@ -28331,51 +28372,51 @@ function FinalizeDialog({
28331
28372
  const windowed = removed.slice(offset, offset + FINALIZE_REMOVED_WINDOW);
28332
28373
  const hasMoreBelow = offset + FINALIZE_REMOVED_WINDOW < removed.length;
28333
28374
  const hasMoreAbove = offset > 0;
28334
- return /* @__PURE__ */ jsx43(Box33, { width: "100%", paddingX: 2, children: /* @__PURE__ */ jsxs33(Box33, { flexDirection: "column", alignItems: "flex-start", children: [
28335
- /* @__PURE__ */ jsx43(Text35, { bold: true, children: "Finalize" }),
28336
- /* @__PURE__ */ jsx43(Text35, { children: " " }),
28375
+ return /* @__PURE__ */ jsx45(Box32, { width: "100%", paddingX: 2, children: /* @__PURE__ */ jsxs33(Box32, { flexDirection: "column", alignItems: "flex-start", children: [
28376
+ /* @__PURE__ */ jsx45(Text35, { bold: true, children: "Finalize" }),
28377
+ /* @__PURE__ */ jsx45(Text35, { children: " " }),
28337
28378
  /* @__PURE__ */ jsxs33(Text35, { children: [
28338
28379
  /* @__PURE__ */ jsxs33(Text35, { color: PALETTE.success, children: [
28339
28380
  accepted,
28340
28381
  " accepted"
28341
28382
  ] }),
28342
- /* @__PURE__ */ jsx43(Text35, { children: " \xB7 " }),
28383
+ /* @__PURE__ */ jsx45(Text35, { children: " \xB7 " }),
28343
28384
  /* @__PURE__ */ jsxs33(Text35, { color: PALETTE.error, children: [
28344
28385
  rejected,
28345
28386
  " rejected"
28346
28387
  ] }),
28347
- /* @__PURE__ */ jsx43(Text35, { children: " \xB7 " }),
28388
+ /* @__PURE__ */ jsx45(Text35, { children: " \xB7 " }),
28348
28389
  /* @__PURE__ */ jsxs33(Text35, { color: PALETTE.muted, children: [
28349
28390
  needsReview,
28350
28391
  " unresolved"
28351
28392
  ] })
28352
28393
  ] }),
28353
- /* @__PURE__ */ jsx43(Text35, { children: " " }),
28354
- noneAccepted && /* @__PURE__ */ jsxs33(Fragment11, { children: [
28355
- /* @__PURE__ */ jsx43(Text35, { bold: true, color: PALETTE.warning, children: "\u26A0 No components are accepted \u2014 nothing will be pushed." }),
28356
- /* @__PURE__ */ jsx43(Text35, { color: PALETTE.warning, children: "Accept at least one component ([a] a row, [A] accept all) to push." }),
28357
- /* @__PURE__ */ jsx43(Text35, { children: " " })
28394
+ /* @__PURE__ */ jsx45(Text35, { children: " " }),
28395
+ noneAccepted && /* @__PURE__ */ jsxs33(Fragment13, { children: [
28396
+ /* @__PURE__ */ jsx45(Text35, { bold: true, color: PALETTE.warning, children: "\u26A0 No components are accepted \u2014 nothing will be pushed." }),
28397
+ /* @__PURE__ */ jsx45(Text35, { color: PALETTE.warning, children: "Accept at least one component ([a] a row, [A] accept all) to push." }),
28398
+ /* @__PURE__ */ jsx45(Text35, { children: " " })
28358
28399
  ] }),
28359
- !allResolved && /* @__PURE__ */ jsxs33(Fragment11, { children: [
28360
- /* @__PURE__ */ jsx43(Text35, { color: PALETTE.warning, children: "\u26A0 " + needsReview + " unresolved component" + (needsReview === 1 ? "" : "s") + " will not be pushed." }),
28361
- /* @__PURE__ */ jsx43(Text35, { color: PALETTE.warning, children: "Only explicitly accepted components ship." }),
28362
- /* @__PURE__ */ jsx43(Text35, { children: " " })
28400
+ !allResolved && /* @__PURE__ */ jsxs33(Fragment13, { children: [
28401
+ /* @__PURE__ */ jsx45(Text35, { color: PALETTE.warning, children: "\u26A0 " + needsReview + " unresolved component" + (needsReview === 1 ? "" : "s") + " will not be pushed." }),
28402
+ /* @__PURE__ */ jsx45(Text35, { color: PALETTE.warning, children: "Only explicitly accepted components ship." }),
28403
+ /* @__PURE__ */ jsx45(Text35, { children: " " })
28363
28404
  ] }),
28364
- /* @__PURE__ */ jsxs33(Box33, { flexDirection: "column", height: 2, children: [
28365
- previewStatus === "running" ? /* @__PURE__ */ jsx43(Text35, { color: PALETTE.muted, children: "Previewing deletions against the target space\u2026" }) : previewStatus === "error" ? /* @__PURE__ */ jsx43(Text35, { color: PALETTE.warning, children: "\u26A0 Could not preview deletions (the push will still proceed)." }) : /* @__PURE__ */ jsx43(Text35, { children: " " }),
28366
- /* @__PURE__ */ jsx43(Text35, { children: " " })
28405
+ /* @__PURE__ */ jsxs33(Box32, { flexDirection: "column", height: 2, children: [
28406
+ previewStatus === "running" ? /* @__PURE__ */ jsx45(Text35, { color: PALETTE.muted, children: "Previewing deletions against the target space\u2026" }) : previewStatus === "error" ? /* @__PURE__ */ jsx45(Text35, { color: PALETTE.warning, children: "\u26A0 Could not preview deletions (the push will still proceed)." }) : /* @__PURE__ */ jsx45(Text35, { children: " " }),
28407
+ /* @__PURE__ */ jsx45(Text35, { children: " " })
28367
28408
  ] }),
28368
- previewStatus === "done" && removed.length > 0 && /* @__PURE__ */ jsxs33(Fragment11, { children: [
28369
- /* @__PURE__ */ jsx43(Text35, { bold: true, color: PALETTE.error, children: removedComponentsHeader(removed.length, false) }),
28370
- hasMoreAbove && /* @__PURE__ */ jsx43(Text35, { color: PALETTE.muted, children: "\u2191 more above" }),
28371
- windowed.map((rc) => /* @__PURE__ */ jsx43(Text35, { color: PALETTE.error, children: removedComponentLine(rc) }, rc.id)),
28372
- hasMoreBelow && /* @__PURE__ */ jsx43(Text35, { color: PALETTE.muted, children: "\u2193 more below" }),
28373
- removed.length > FINALIZE_REMOVED_WINDOW && /* @__PURE__ */ jsx43(Text35, { children: "[\u2191\u2193] scroll deletions" }),
28374
- /* @__PURE__ */ jsx43(Text35, { children: " " })
28409
+ previewStatus === "done" && removed.length > 0 && /* @__PURE__ */ jsxs33(Fragment13, { children: [
28410
+ /* @__PURE__ */ jsx45(Text35, { bold: true, color: PALETTE.error, children: removedComponentsHeader(removed.length, false) }),
28411
+ hasMoreAbove && /* @__PURE__ */ jsx45(Text35, { color: PALETTE.muted, children: "\u2191 more above" }),
28412
+ windowed.map((rc) => /* @__PURE__ */ jsx45(Text35, { color: PALETTE.error, children: removedComponentLine(rc) }, rc.id)),
28413
+ hasMoreBelow && /* @__PURE__ */ jsx45(Text35, { color: PALETTE.muted, children: "\u2193 more below" }),
28414
+ removed.length > FINALIZE_REMOVED_WINDOW && /* @__PURE__ */ jsx45(Text35, { children: "[\u2191\u2193] scroll deletions" }),
28415
+ /* @__PURE__ */ jsx45(Text35, { children: " " })
28375
28416
  ] }),
28376
- /* @__PURE__ */ jsx43(Text35, { children: noneAccepted ? "Confirm exit with nothing accepted?" : allResolved ? "Save decisions and exit? All components resolved." : "Save decisions and exit?" }),
28377
- /* @__PURE__ */ jsx43(Text35, { children: " " }),
28378
- /* @__PURE__ */ jsx43(
28417
+ /* @__PURE__ */ jsx45(Text35, { children: noneAccepted ? "Confirm exit with nothing accepted?" : allResolved ? "Save decisions and exit? All components resolved." : "Save decisions and exit?" }),
28418
+ /* @__PURE__ */ jsx45(Text35, { children: " " }),
28419
+ /* @__PURE__ */ jsx45(
28379
28420
  ControlHints,
28380
28421
  {
28381
28422
  hints: [
@@ -28832,8 +28873,8 @@ var init_use_review_surface_state = __esm({
28832
28873
  });
28833
28874
 
28834
28875
  // packages/experience-design-system-cli/src/tui/import/steps/09-review/components/QuitDialog.tsx
28835
- import { Box as Box34, Text as Text36 } from "ink";
28836
- import { Fragment as Fragment12, jsx as jsx44, jsxs as jsxs34 } from "react/jsx-runtime";
28876
+ import { Box as Box33, Text as Text36 } from "ink";
28877
+ import { Fragment as Fragment14, jsx as jsx46, jsxs as jsxs34 } from "react/jsx-runtime";
28837
28878
  function QuitDialog({ hasUnsavedDrafts, onConfirm, onCancel }) {
28838
28879
  useImmediateInput((input, key) => {
28839
28880
  if (input === "y" || key.return) {
@@ -28842,16 +28883,16 @@ function QuitDialog({ hasUnsavedDrafts, onConfirm, onCancel }) {
28842
28883
  onCancel();
28843
28884
  }
28844
28885
  });
28845
- return /* @__PURE__ */ jsxs34(Box34, { flexDirection: "column", borderStyle: "round", padding: 1, width: 50, children: [
28846
- /* @__PURE__ */ jsx44(Text36, { bold: true, children: "\u2500".repeat(19) + " Quit " + "\u2500".repeat(19) }),
28847
- /* @__PURE__ */ jsx44(Text36, { children: " " }),
28848
- hasUnsavedDrafts ? /* @__PURE__ */ jsxs34(Fragment12, { children: [
28849
- /* @__PURE__ */ jsx44(Text36, { children: "You have unsaved draft edits." }),
28850
- /* @__PURE__ */ jsx44(Text36, { children: "Session state is preserved \u2014 you can resume" }),
28851
- /* @__PURE__ */ jsx44(Text36, { children: "by running the same review command again." })
28852
- ] }) : /* @__PURE__ */ jsx44(Text36, { children: "Session is saved. Quit without finalizing?" }),
28853
- /* @__PURE__ */ jsx44(Text36, { children: " " }),
28854
- /* @__PURE__ */ jsx44(
28886
+ return /* @__PURE__ */ jsxs34(Box33, { flexDirection: "column", borderStyle: "round", padding: 1, width: 50, children: [
28887
+ /* @__PURE__ */ jsx46(Text36, { bold: true, children: "\u2500".repeat(19) + " Quit " + "\u2500".repeat(19) }),
28888
+ /* @__PURE__ */ jsx46(Text36, { children: " " }),
28889
+ hasUnsavedDrafts ? /* @__PURE__ */ jsxs34(Fragment14, { children: [
28890
+ /* @__PURE__ */ jsx46(Text36, { children: "You have unsaved draft edits." }),
28891
+ /* @__PURE__ */ jsx46(Text36, { children: "Session state is preserved \u2014 you can resume" }),
28892
+ /* @__PURE__ */ jsx46(Text36, { children: "by running the same review command again." })
28893
+ ] }) : /* @__PURE__ */ jsx46(Text36, { children: "Session is saved. Quit without finalizing?" }),
28894
+ /* @__PURE__ */ jsx46(Text36, { children: " " }),
28895
+ /* @__PURE__ */ jsx46(
28855
28896
  ControlHints,
28856
28897
  {
28857
28898
  hints: [
@@ -28871,8 +28912,8 @@ var init_QuitDialog = __esm({
28871
28912
  });
28872
28913
 
28873
28914
  // packages/experience-design-system-cli/src/tui/import/steps/09-review/components/ReviewDialogs.tsx
28874
- import { Box as Box35, Text as Text37 } from "ink";
28875
- import { Fragment as Fragment13, jsx as jsx45, jsxs as jsxs35 } from "react/jsx-runtime";
28915
+ import { Box as Box34, Text as Text37 } from "ink";
28916
+ import { Fragment as Fragment15, jsx as jsx47, jsxs as jsxs35 } from "react/jsx-runtime";
28876
28917
  function ReviewFinalizeDialogs({
28877
28918
  showFinalize,
28878
28919
  showQuit,
@@ -28886,8 +28927,8 @@ function ReviewFinalizeDialogs({
28886
28927
  onQuitCancel
28887
28928
  }) {
28888
28929
  const { accepted, rejected, needsReview } = countReviewStatuses(components);
28889
- return /* @__PURE__ */ jsxs35(Fragment13, { children: [
28890
- showFinalize && /* @__PURE__ */ jsx45(
28930
+ return /* @__PURE__ */ jsxs35(Fragment15, { children: [
28931
+ showFinalize && /* @__PURE__ */ jsx47(
28891
28932
  FinalizeDialog,
28892
28933
  {
28893
28934
  accepted,
@@ -28900,7 +28941,7 @@ function ReviewFinalizeDialogs({
28900
28941
  onCancel: onFinalizeCancel
28901
28942
  }
28902
28943
  ),
28903
- showQuit && /* @__PURE__ */ jsx45(QuitDialog, { hasUnsavedDrafts: false, onConfirm: onQuitConfirm, onCancel: onQuitCancel })
28944
+ showQuit && /* @__PURE__ */ jsx47(QuitDialog, { hasUnsavedDrafts: false, onConfirm: onQuitConfirm, onCancel: onQuitCancel })
28904
28945
  ] });
28905
28946
  }
28906
28947
  function ReviewStepDialogs({
@@ -28910,7 +28951,7 @@ function ReviewStepDialogs({
28910
28951
  onFinalize,
28911
28952
  onQuit
28912
28953
  }) {
28913
- return /* @__PURE__ */ jsx45(
28954
+ return /* @__PURE__ */ jsx47(
28914
28955
  ReviewFinalizeDialogs,
28915
28956
  {
28916
28957
  showFinalize: surfaceState.showFinalize,
@@ -28928,12 +28969,12 @@ function ReviewStepDialogs({
28928
28969
  }
28929
28970
  function ReviewReloadDialog({ open }) {
28930
28971
  if (!open) return null;
28931
- return /* @__PURE__ */ jsxs35(Box35, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
28932
- /* @__PURE__ */ jsx45(Text37, { bold: true, color: PALETTE.warning, children: "Reload from saved state?" }),
28933
- /* @__PURE__ */ jsx45(Text37, { children: "Unsaved in-memory changes will be lost." }),
28934
- /* @__PURE__ */ jsx45(Text37, { children: " " }),
28935
- /* @__PURE__ */ jsx45(Text37, { children: " [Enter] Confirm" }),
28936
- /* @__PURE__ */ jsx45(Text37, { children: " [Esc] Cancel" })
28972
+ return /* @__PURE__ */ jsxs35(Box34, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
28973
+ /* @__PURE__ */ jsx47(Text37, { bold: true, color: PALETTE.warning, children: "Reload from saved state?" }),
28974
+ /* @__PURE__ */ jsx47(Text37, { children: "Unsaved in-memory changes will be lost." }),
28975
+ /* @__PURE__ */ jsx47(Text37, { children: " " }),
28976
+ /* @__PURE__ */ jsx47(Text37, { children: " [Enter] Confirm" }),
28977
+ /* @__PURE__ */ jsx47(Text37, { children: " [Esc] Cancel" })
28937
28978
  ] });
28938
28979
  }
28939
28980
  var init_ReviewDialogs = __esm({
@@ -29335,8 +29376,8 @@ var init_use_review_preview = __esm({
29335
29376
  });
29336
29377
 
29337
29378
  // packages/experience-design-system-cli/src/tui/import/steps/09-review/components/LivePreviewSummary.tsx
29338
- import { Box as Box36, Text as Text38 } from "ink";
29339
- import { jsx as jsx46, jsxs as jsxs36 } from "react/jsx-runtime";
29379
+ import { Box as Box35, Text as Text38 } from "ink";
29380
+ import { jsx as jsx48, jsxs as jsxs36 } from "react/jsx-runtime";
29340
29381
  function LivePreviewSummary({
29341
29382
  enabled,
29342
29383
  previewAnnotations,
@@ -29350,19 +29391,19 @@ function LivePreviewSummary({
29350
29391
  const counts = { new: 0, changed: 0, removed: 0, breaking: 0 };
29351
29392
  for (const annotation of previewAnnotations.values()) counts[annotation] += 1;
29352
29393
  const hasCounts = counts.new + counts.changed + counts.removed + counts.breaking > 0;
29353
- if (disabled) return /* @__PURE__ */ jsx46(Text38, { color: PALETTE.muted, children: "Preview: disabled (creds rejected)" });
29354
- if (status === "running" && !hasCounts) return /* @__PURE__ */ jsx46(Text38, { color: PALETTE.muted, children: `Preview: ${spinner} running...` });
29394
+ if (disabled) return /* @__PURE__ */ jsx48(Text38, { color: PALETTE.muted, children: "Preview: disabled (creds rejected)" });
29395
+ if (status === "running" && !hasCounts) return /* @__PURE__ */ jsx48(Text38, { color: PALETTE.muted, children: `Preview: ${spinner} running...` });
29355
29396
  if (!hasCounts) return null;
29356
- return /* @__PURE__ */ jsxs36(Box36, { children: [
29357
- /* @__PURE__ */ jsx46(Text38, { children: "Preview: " }),
29358
- /* @__PURE__ */ jsx46(Text38, { color: PALETTE.success, children: `${counts.new} new` }),
29359
- /* @__PURE__ */ jsx46(Text38, { children: " \xB7 " }),
29360
- /* @__PURE__ */ jsx46(Text38, { color: PALETTE.warning, children: `${counts.changed} changed` }),
29361
- /* @__PURE__ */ jsx46(Text38, { children: " \xB7 " }),
29362
- /* @__PURE__ */ jsx46(Text38, { color: PALETTE.muted, children: `${counts.removed} removed` }),
29363
- showRemovedListHint && removedCount > 0 && /* @__PURE__ */ jsx46(Text38, { children: " ([d] removed list)" }),
29364
- /* @__PURE__ */ jsx46(Text38, { children: " \xB7 " }),
29365
- /* @__PURE__ */ jsx46(Text38, { color: PALETTE.error, bold: true, children: `${counts.breaking} breaking` })
29397
+ return /* @__PURE__ */ jsxs36(Box35, { children: [
29398
+ /* @__PURE__ */ jsx48(Text38, { children: "Preview: " }),
29399
+ /* @__PURE__ */ jsx48(Text38, { color: PALETTE.success, children: `${counts.new} new` }),
29400
+ /* @__PURE__ */ jsx48(Text38, { children: " \xB7 " }),
29401
+ /* @__PURE__ */ jsx48(Text38, { color: PALETTE.warning, children: `${counts.changed} changed` }),
29402
+ /* @__PURE__ */ jsx48(Text38, { children: " \xB7 " }),
29403
+ /* @__PURE__ */ jsx48(Text38, { color: PALETTE.muted, children: `${counts.removed} removed` }),
29404
+ showRemovedListHint && removedCount > 0 && /* @__PURE__ */ jsx48(Text38, { children: " ([d] removed list)" }),
29405
+ /* @__PURE__ */ jsx48(Text38, { children: " \xB7 " }),
29406
+ /* @__PURE__ */ jsx48(Text38, { color: PALETTE.error, bold: true, children: `${counts.breaking} breaking` })
29366
29407
  ] });
29367
29408
  }
29368
29409
  var init_LivePreviewSummary = __esm({
@@ -29375,8 +29416,8 @@ var init_LivePreviewSummary = __esm({
29375
29416
  // packages/experience-design-system-cli/src/tui/import/steps/09-review/generate-review-step.tsx
29376
29417
  import { useCallback as useCallback5, useEffect as useEffect17, useMemo as useMemo4, useRef as useRef13, useState as useState25 } from "react";
29377
29418
  import figures8 from "figures";
29378
- import { Box as Box37, Text as Text39 } from "ink";
29379
- import { Fragment as Fragment14, jsx as jsx47, jsxs as jsxs37 } from "react/jsx-runtime";
29419
+ import { Box as Box36, Text as Text39 } from "ink";
29420
+ import { Fragment as Fragment16, jsx as jsx49, jsxs as jsxs37 } from "react/jsx-runtime";
29380
29421
  function sortComponentsForSidebar(components, cycleParticipants) {
29381
29422
  const isEmpty2 = (entry) => Object.keys(entry.$properties ?? {}).length === 0 && Object.keys(entry.$slots ?? {}).length === 0;
29382
29423
  const tier = (c2) => {
@@ -29420,7 +29461,7 @@ function CyclePathLine({
29420
29461
  return /* @__PURE__ */ jsxs37(Text39, { color: highlightLine ? PALETTE.warning : void 0, children: [
29421
29462
  prefix,
29422
29463
  segments.map(
29423
- (segment, index) => segment.kind === "slot" ? /* @__PURE__ */ jsx47(Text39, { color: PALETTE.accent, children: segment.text }, index) : segment.kind === "arrow" ? /* @__PURE__ */ jsx47(Text39, { color: PALETTE.muted, children: segment.text }, index) : /* @__PURE__ */ jsx47(Text39, { color: highlightComponents ? PALETTE.warning : void 0, children: segment.text }, index)
29464
+ (segment, index) => segment.kind === "slot" ? /* @__PURE__ */ jsx49(Text39, { color: PALETTE.accent, children: segment.text }, index) : segment.kind === "arrow" ? /* @__PURE__ */ jsx49(Text39, { color: PALETTE.muted, children: segment.text }, index) : /* @__PURE__ */ jsx49(Text39, { color: highlightComponents ? PALETTE.warning : void 0, children: segment.text }, index)
29424
29465
  )
29425
29466
  ] });
29426
29467
  }
@@ -29432,31 +29473,31 @@ function CycleDetailPanel({
29432
29473
  height
29433
29474
  }) {
29434
29475
  const lines = [
29435
- /* @__PURE__ */ jsx47(Text39, { bold: true, color: PALETTE.warning, children: `SLOT DEPENDENCY CYCLES (${cycles.length})` }, "cyc-title"),
29436
- /* @__PURE__ */ jsx47(Text39, { color: PALETTE.muted, children: "push will fail until these are resolved" }, "cyc-sub"),
29437
- /* @__PURE__ */ jsx47(Text39, { color: PALETTE.muted, children: "Reject a cycle member or remove a slot edge to break the cycle." }, "cyc-guidance"),
29438
- /* @__PURE__ */ jsx47(Text39, { children: " " }, "cyc-space")
29476
+ /* @__PURE__ */ jsx49(Text39, { bold: true, color: PALETTE.warning, children: `SLOT DEPENDENCY CYCLES (${cycles.length})` }, "cyc-title"),
29477
+ /* @__PURE__ */ jsx49(Text39, { color: PALETTE.muted, children: "push will fail until these are resolved" }, "cyc-sub"),
29478
+ /* @__PURE__ */ jsx49(Text39, { color: PALETTE.muted, children: "Reject a cycle member or remove a slot edge to break the cycle." }, "cyc-guidance"),
29479
+ /* @__PURE__ */ jsx49(Text39, { children: " " }, "cyc-space")
29439
29480
  ];
29440
29481
  cycles.forEach((cycle, index) => {
29441
29482
  const nodeCount = new Set(cycle.path).size;
29442
29483
  const isCursor = index === cursor;
29443
29484
  lines.push(
29444
- /* @__PURE__ */ jsx47(Text39, { bold: true, inverse: isCursor, children: `${isCursor ? figures8.pointer : " "} Cycle ${index + 1} (${nodeCount} component${nodeCount === 1 ? "" : "s"}):` }, `cyc-h-${index}`),
29445
- /* @__PURE__ */ jsx47(CyclePathLine, { segments: formatCyclePathSegments2(cycle, 16), prefix: " " }, `cyc-p-${index}`)
29485
+ /* @__PURE__ */ jsx49(Text39, { bold: true, inverse: isCursor, children: `${isCursor ? figures8.pointer : " "} Cycle ${index + 1} (${nodeCount} component${nodeCount === 1 ? "" : "s"}):` }, `cyc-h-${index}`),
29486
+ /* @__PURE__ */ jsx49(CyclePathLine, { segments: formatCyclePathSegments2(cycle, 16), prefix: " " }, `cyc-p-${index}`)
29446
29487
  );
29447
29488
  if (cycle.suggestedBreak) {
29448
29489
  lines.push(
29449
- /* @__PURE__ */ jsx47(Text39, { color: PALETTE.muted, children: ` Suggested fix: remove [${cycle.suggestedBreak.slotName}] from ${cycle.suggestedBreak.fromComponent}` }, `cyc-fix-${index}`)
29490
+ /* @__PURE__ */ jsx49(Text39, { color: PALETTE.muted, children: ` Suggested fix: remove [${cycle.suggestedBreak.slotName}] from ${cycle.suggestedBreak.fromComponent}` }, `cyc-fix-${index}`)
29450
29491
  );
29451
29492
  }
29452
- lines.push(/* @__PURE__ */ jsx47(Text39, { children: " " }, `cyc-s-${index}`));
29493
+ lines.push(/* @__PURE__ */ jsx49(Text39, { children: " " }, `cyc-s-${index}`));
29453
29494
  });
29454
29495
  const footer = "[\u2191\u2193] move [Enter] fix cycle [c/q/Esc] close";
29455
29496
  const viewportHeight = Math.max(1, height - 3);
29456
29497
  const visible = lines.slice(scrollOffset, scrollOffset + viewportHeight - 1);
29457
29498
  return /* @__PURE__ */ jsxs37(FixedPanel, { width, height, borderStyle: "round", borderColor: PALETTE.warning, paddingLeft: 1, children: [
29458
29499
  visible,
29459
- /* @__PURE__ */ jsx47(Text39, { color: PALETTE.muted, children: footer })
29500
+ /* @__PURE__ */ jsx49(Text39, { color: PALETTE.muted, children: footer })
29460
29501
  ] });
29461
29502
  }
29462
29503
  function BreakCyclePanel({
@@ -29468,13 +29509,13 @@ function BreakCyclePanel({
29468
29509
  height
29469
29510
  }) {
29470
29511
  return /* @__PURE__ */ jsxs37(FixedPanel, { width, height, borderStyle: "round", borderColor: PALETTE.warning, paddingLeft: 1, children: [
29471
- /* @__PURE__ */ jsx47(Text39, { bold: true, color: PALETTE.warning, children: "BREAK CYCLE \u2014 remove a slot edge" }),
29472
- cycle && /* @__PURE__ */ jsx47(CyclePathLine, { segments: formatCyclePathSegments2(cycle), prefix: " ", highlightComponents: true }),
29473
- /* @__PURE__ */ jsx47(Text39, { color: PALETTE.muted, children: cycle ? "Deleting an edge removes it from $allowedComponents (undo with Ctrl+Z)." : "No cycle highlighted." }),
29474
- /* @__PURE__ */ jsx47(Text39, { children: " " }),
29475
- edges.length > 0 && /* @__PURE__ */ jsx47(Text39, { color: PALETTE.muted, children: "remove slot edge:" }),
29476
- edges.map((edge, index) => /* @__PURE__ */ jsx47(Text39, { inverse: index === cursor, children: `${index === cursor ? figures8.pointer : " "} remove '${edge.toComponent}' from ${edge.fromComponent}.$slots.${edge.slotName}.$allowedComponents` }, `${edge.fromComponent}-${edge.slotName}-${edge.toComponent}`)),
29477
- confirming ? /* @__PURE__ */ jsx47(Text39, { bold: true, color: PALETTE.warning, children: "Delete this slot edge? [y] confirm [n] cancel" }) : /* @__PURE__ */ jsx47(Text39, { children: "[\u2191\u2193] move [Enter] delete [x/Esc] close" })
29512
+ /* @__PURE__ */ jsx49(Text39, { bold: true, color: PALETTE.warning, children: "BREAK CYCLE \u2014 remove a slot edge" }),
29513
+ cycle && /* @__PURE__ */ jsx49(CyclePathLine, { segments: formatCyclePathSegments2(cycle), prefix: " ", highlightComponents: true }),
29514
+ /* @__PURE__ */ jsx49(Text39, { color: PALETTE.muted, children: cycle ? "Deleting an edge removes it from $allowedComponents (undo with Ctrl+Z)." : "No cycle highlighted." }),
29515
+ /* @__PURE__ */ jsx49(Text39, { children: " " }),
29516
+ edges.length > 0 && /* @__PURE__ */ jsx49(Text39, { color: PALETTE.muted, children: "remove slot edge:" }),
29517
+ edges.map((edge, index) => /* @__PURE__ */ jsx49(Text39, { inverse: index === cursor, children: `${index === cursor ? figures8.pointer : " "} remove '${edge.toComponent}' from ${edge.fromComponent}.$slots.${edge.slotName}.$allowedComponents` }, `${edge.fromComponent}-${edge.slotName}-${edge.toComponent}`)),
29518
+ confirming ? /* @__PURE__ */ jsx49(Text39, { bold: true, color: PALETTE.warning, children: "Delete this slot edge? [y] confirm [n] cancel" }) : /* @__PURE__ */ jsx49(Text39, { children: "[\u2191\u2193] move [Enter] delete [x/Esc] close" })
29478
29519
  ] });
29479
29520
  }
29480
29521
  function buildBreakingRows(breakingChanges) {
@@ -29520,9 +29561,9 @@ function deriveBreakingChanges(response) {
29520
29561
  }
29521
29562
  function GenerateReviewStep(props) {
29522
29563
  if (!props.extractSessionId) {
29523
- return /* @__PURE__ */ jsx47(Box37, { paddingX: 2, paddingY: 1, children: /* @__PURE__ */ jsx47(Text39, { color: PALETTE.error, children: "Error: no session ID \u2014 cannot load generated definitions." }) });
29564
+ return /* @__PURE__ */ jsx49(Box36, { paddingX: 2, paddingY: 1, children: /* @__PURE__ */ jsx49(Text39, { color: PALETTE.error, children: "Error: no session ID \u2014 cannot load generated definitions." }) });
29524
29565
  }
29525
- return /* @__PURE__ */ jsx47(GenerateReviewStepView, { ...props, extractSessionId: props.extractSessionId });
29566
+ return /* @__PURE__ */ jsx49(GenerateReviewStepView, { ...props, extractSessionId: props.extractSessionId });
29526
29567
  }
29527
29568
  function GenerateReviewStepView({
29528
29569
  extractSessionId,
@@ -30379,13 +30420,13 @@ function GenerateReviewStepView({
30379
30420
  }
30380
30421
  });
30381
30422
  if (loading) {
30382
- return /* @__PURE__ */ jsx47(ReviewLoadingState, {});
30423
+ return /* @__PURE__ */ jsx49(ReviewLoadingState, {});
30383
30424
  }
30384
30425
  if (loadError) {
30385
- return /* @__PURE__ */ jsx47(ReviewLoadError, { message: loadError });
30426
+ return /* @__PURE__ */ jsx49(ReviewLoadError, { message: loadError });
30386
30427
  }
30387
30428
  if (showHelp) {
30388
- return /* @__PURE__ */ jsx47(HelpOverlay, { sections: HELP_SECTIONS2, handleInput: false, onClose: () => setShowHelp(false) });
30429
+ return /* @__PURE__ */ jsx49(HelpOverlay, { sections: HELP_SECTIONS2, handleInput: false, onClose: () => setShowHelp(false) });
30389
30430
  }
30390
30431
  const { selected, selectedJson, visibleJsonPanelValue } = getReviewSelectionState(
30391
30432
  components,
@@ -30425,9 +30466,9 @@ function GenerateReviewStepView({
30425
30466
  for (const c2 of closures.values()) if (c2.nodes.length > 1) return true;
30426
30467
  return false;
30427
30468
  })();
30428
- return /* @__PURE__ */ jsxs37(Box37, { flexDirection: "column", children: [
30429
- /* @__PURE__ */ jsx47(StepHeader, { step: "review" }),
30430
- /* @__PURE__ */ jsx47(
30469
+ return /* @__PURE__ */ jsxs37(Box36, { flexDirection: "column", children: [
30470
+ /* @__PURE__ */ jsx49(StepHeader, { step: "review" }),
30471
+ /* @__PURE__ */ jsx49(
30431
30472
  ReviewStepDialogs,
30432
30473
  {
30433
30474
  surfaceState: reviewSurface,
@@ -30437,15 +30478,15 @@ function GenerateReviewStepView({
30437
30478
  onQuit
30438
30479
  }
30439
30480
  ),
30440
- /* @__PURE__ */ jsx47(ReviewReloadDialog, { open: showReloadDialog && !dialogOpen }),
30441
- removedComponents.length > 0 && !dialogOpen && /* @__PURE__ */ jsxs37(Box37, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.error, paddingX: 1, children: [
30442
- /* @__PURE__ */ jsx47(Text39, { bold: true, color: PALETTE.error, children: removedComponentsHeader(removedComponents.length, true) }),
30443
- !removedBannerCollapsed && /* @__PURE__ */ jsxs37(Fragment14, { children: [
30444
- /* @__PURE__ */ jsx47(Text39, { children: " " }),
30445
- removedComponents.map((rc) => /* @__PURE__ */ jsx47(Text39, { children: removedComponentLine(rc) }, rc.id))
30481
+ /* @__PURE__ */ jsx49(ReviewReloadDialog, { open: showReloadDialog && !dialogOpen }),
30482
+ removedComponents.length > 0 && !dialogOpen && /* @__PURE__ */ jsxs37(Box36, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.error, paddingX: 1, children: [
30483
+ /* @__PURE__ */ jsx49(Text39, { bold: true, color: PALETTE.error, children: removedComponentsHeader(removedComponents.length, true) }),
30484
+ !removedBannerCollapsed && /* @__PURE__ */ jsxs37(Fragment16, { children: [
30485
+ /* @__PURE__ */ jsx49(Text39, { children: " " }),
30486
+ removedComponents.map((rc) => /* @__PURE__ */ jsx49(Text39, { children: removedComponentLine(rc) }, rc.id))
30446
30487
  ] })
30447
30488
  ] }),
30448
- breakingChanges.length > 0 && !dialogOpen && /* @__PURE__ */ jsx47(Box37, { paddingX: 1, children: /* @__PURE__ */ jsx47(
30489
+ breakingChanges.length > 0 && !dialogOpen && /* @__PURE__ */ jsx49(Box36, { paddingX: 1, children: /* @__PURE__ */ jsx49(
30449
30490
  Text39,
30450
30491
  {
30451
30492
  color: PALETTE.warning,
@@ -30456,14 +30497,14 @@ function GenerateReviewStepView({
30456
30497
  const row = breakingRows[breakingCursor];
30457
30498
  const comp = row ? breakingChanges.find((b) => b.componentName === row.componentName) : void 0;
30458
30499
  if (!comp) return null;
30459
- return /* @__PURE__ */ jsxs37(Box37, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
30460
- /* @__PURE__ */ jsx47(Text39, { bold: true, color: PALETTE.warning, children: `Breaking changes \u2014 ${comp.componentName}` }),
30461
- comp.impact && /* @__PURE__ */ jsx47(Text39, { color: PALETTE.muted, children: ` affects ${comp.impact.affectedExperiences} experience${comp.impact.affectedExperiences === 1 ? "" : "s"}, ${comp.impact.affectedFragments} fragment${comp.impact.affectedFragments === 1 ? "" : "s"}` }),
30462
- comp.changes.length === 0 ? /* @__PURE__ */ jsx47(Text39, { color: PALETTE.muted, children: " (no enumerated changes)" }) : comp.changes.map((change, ci) => /* @__PURE__ */ jsx47(Text39, { children: ` \u2022 ${formatBreakingChange(change, comp.current)}` }, `bd-detail-${ci}`)),
30463
- /* @__PURE__ */ jsx47(Text39, { children: "[D/Esc] close detail" })
30500
+ return /* @__PURE__ */ jsxs37(Box36, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
30501
+ /* @__PURE__ */ jsx49(Text39, { bold: true, color: PALETTE.warning, children: `Breaking changes \u2014 ${comp.componentName}` }),
30502
+ comp.impact && /* @__PURE__ */ jsx49(Text39, { color: PALETTE.muted, children: ` affects ${comp.impact.affectedExperiences} experience${comp.impact.affectedExperiences === 1 ? "" : "s"}, ${comp.impact.affectedFragments} fragment${comp.impact.affectedFragments === 1 ? "" : "s"}` }),
30503
+ comp.changes.length === 0 ? /* @__PURE__ */ jsx49(Text39, { color: PALETTE.muted, children: " (no enumerated changes)" }) : comp.changes.map((change, ci) => /* @__PURE__ */ jsx49(Text39, { children: ` \u2022 ${formatBreakingChange(change, comp.current)}` }, `bd-detail-${ci}`)),
30504
+ /* @__PURE__ */ jsx49(Text39, { children: "[D/Esc] close detail" })
30464
30505
  ] });
30465
30506
  })(),
30466
- !dialogOpen && /* @__PURE__ */ jsx47(
30507
+ !dialogOpen && /* @__PURE__ */ jsx49(
30467
30508
  LivePreviewSummary,
30468
30509
  {
30469
30510
  enabled: livePreview,
@@ -30482,16 +30523,16 @@ function GenerateReviewStepView({
30482
30523
  const participantSet = cycleView.structural;
30483
30524
  const members = stillRejected.filter((n) => participantSet.has(n)).sort();
30484
30525
  const ancestors = stillRejected.filter((n) => !participantSet.has(n)).sort();
30485
- return /* @__PURE__ */ jsxs37(Box37, { flexDirection: "column", borderStyle: "single", borderColor: PALETTE.error, paddingX: 1, children: [
30486
- /* @__PURE__ */ jsx47(Text39, { color: PALETTE.error, bold: true, children: `Cyclic component graph \u2014 auto-rejected ${stillRejected.length} component${stillRejected.length === 1 ? "" : "s"}:` }),
30487
- members.length > 0 && /* @__PURE__ */ jsx47(Text39, { color: PALETTE.error, children: ` Cycle members: ${members.join(", ")}` }),
30488
- ancestors.length > 0 && /* @__PURE__ */ jsx47(Text39, { color: PALETTE.error, children: ` Ancestors: ${ancestors.join(", ")}` }),
30489
- /* @__PURE__ */ jsx47(Text39, { color: PALETTE.muted, children: undoSnapshot ? " [Ctrl+Z] undo \xB7 [r]/[a] manually toggle \xB7 [F] continue" : " [r]/[a] manually toggle \xB7 [F] continue" })
30526
+ return /* @__PURE__ */ jsxs37(Box36, { flexDirection: "column", borderStyle: "single", borderColor: PALETTE.error, paddingX: 1, children: [
30527
+ /* @__PURE__ */ jsx49(Text39, { color: PALETTE.error, bold: true, children: `Cyclic component graph \u2014 auto-rejected ${stillRejected.length} component${stillRejected.length === 1 ? "" : "s"}:` }),
30528
+ members.length > 0 && /* @__PURE__ */ jsx49(Text39, { color: PALETTE.error, children: ` Cycle members: ${members.join(", ")}` }),
30529
+ ancestors.length > 0 && /* @__PURE__ */ jsx49(Text39, { color: PALETTE.error, children: ` Ancestors: ${ancestors.join(", ")}` }),
30530
+ /* @__PURE__ */ jsx49(Text39, { color: PALETTE.muted, children: undoSnapshot ? " [Ctrl+Z] undo \xB7 [r]/[a] manually toggle \xB7 [F] continue" : " [r]/[a] manually toggle \xB7 [F] continue" })
30490
30531
  ] });
30491
30532
  })(),
30492
- /* @__PURE__ */ jsx47(ReviewEmptyComponentsWarning, { count: emptyCount, hidden: dialogOpen }),
30493
- /* @__PURE__ */ jsx47(ReviewFinalizeError, { message: finalizeError, hidden: dialogOpen }),
30494
- !dialogOpen && breakPanel.isOpen && /* @__PURE__ */ jsx47(
30533
+ /* @__PURE__ */ jsx49(ReviewEmptyComponentsWarning, { count: emptyCount, hidden: dialogOpen }),
30534
+ /* @__PURE__ */ jsx49(ReviewFinalizeError, { message: finalizeError, hidden: dialogOpen }),
30535
+ !dialogOpen && breakPanel.isOpen && /* @__PURE__ */ jsx49(
30495
30536
  BreakCyclePanel,
30496
30537
  {
30497
30538
  cycle: cycleRows[cyclesCursor],
@@ -30502,7 +30543,7 @@ function GenerateReviewStepView({
30502
30543
  height: panelHeight
30503
30544
  }
30504
30545
  ),
30505
- !dialogOpen && cyclePanel.isOpen && !breakPanel.isOpen && /* @__PURE__ */ jsx47(
30546
+ !dialogOpen && cyclePanel.isOpen && !breakPanel.isOpen && /* @__PURE__ */ jsx49(
30506
30547
  CycleDetailPanel,
30507
30548
  {
30508
30549
  cycles: cycleRows,
@@ -30512,8 +30553,8 @@ function GenerateReviewStepView({
30512
30553
  height: panelHeight
30513
30554
  }
30514
30555
  ),
30515
- !dialogOpen && !cyclePanel.isOpen && !breakPanel.isOpen && /* @__PURE__ */ jsxs37(Box37, { children: [
30516
- breakingPanel.isOpen ? /* @__PURE__ */ jsx47(
30556
+ !dialogOpen && !cyclePanel.isOpen && !breakPanel.isOpen && /* @__PURE__ */ jsxs37(Box36, { children: [
30557
+ breakingPanel.isOpen ? /* @__PURE__ */ jsx49(
30517
30558
  GotoBanner,
30518
30559
  {
30519
30560
  title: `Breaking changes \u2014 ${breakingRows[breakingCursor]?.componentName ?? "unknown component"}`,
@@ -30526,7 +30567,7 @@ function GenerateReviewStepView({
30526
30567
  width: sidebarWidth,
30527
30568
  footerHint: "[\u2191/\u2193] move \xB7 [Enter] jump \xB7 [D] detail \xB7 [Esc] close"
30528
30569
  }
30529
- ) : /* @__PURE__ */ jsx47(
30570
+ ) : /* @__PURE__ */ jsx49(
30530
30571
  GroupedSidebar,
30531
30572
  {
30532
30573
  items: groupedItems,
@@ -30567,7 +30608,7 @@ function GenerateReviewStepView({
30567
30608
  graph: sidebarGraph
30568
30609
  }
30569
30610
  ),
30570
- selected ? /* @__PURE__ */ jsx47(
30611
+ selected ? /* @__PURE__ */ jsx49(
30571
30612
  ReviewComponentPanel,
30572
30613
  {
30573
30614
  selectedKey: selected.key,
@@ -30599,12 +30640,12 @@ function GenerateReviewStepView({
30599
30640
  livePreview: livePreviewHook,
30600
30641
  livePreviewSpinner
30601
30642
  }
30602
- ) : /* @__PURE__ */ jsx47(ReviewNoSelection, {})
30643
+ ) : /* @__PURE__ */ jsx49(ReviewNoSelection, {})
30603
30644
  ] }),
30604
- !dialogOpen && cycleRows.length > 0 && !cyclePanel.isOpen && !breakPanel.isOpen && /* @__PURE__ */ jsxs37(Box37, { flexDirection: "column", children: [
30605
- /* @__PURE__ */ jsx47(Text39, { color: PALETTE.warning, children: `\u26A0 ${cycleRows.length} slot dependency cycle${cycleRows.length === 1 ? "" : "s"} detected \u2014 push will fail` }),
30645
+ !dialogOpen && cycleRows.length > 0 && !cyclePanel.isOpen && !breakPanel.isOpen && /* @__PURE__ */ jsxs37(Box36, { flexDirection: "column", children: [
30646
+ /* @__PURE__ */ jsx49(Text39, { color: PALETTE.warning, children: `\u26A0 ${cycleRows.length} slot dependency cycle${cycleRows.length === 1 ? "" : "s"} detected \u2014 push will fail` }),
30606
30647
  cycleRows.slice(0, 3).map((cycle, idx) => {
30607
- return /* @__PURE__ */ jsx47(
30648
+ return /* @__PURE__ */ jsx49(
30608
30649
  CyclePathLine,
30609
30650
  {
30610
30651
  segments: formatCyclePathSegments2(cycle),
@@ -30615,10 +30656,10 @@ function GenerateReviewStepView({
30615
30656
  `cyc-banner-${idx}`
30616
30657
  );
30617
30658
  }),
30618
- cycleRows.length > 3 && /* @__PURE__ */ jsx47(Text39, { color: PALETTE.warning, children: ` \u2026${cycleRows.length - 3} more` }),
30619
- /* @__PURE__ */ jsx47(Text39, { children: " press [c] for detail" })
30659
+ cycleRows.length > 3 && /* @__PURE__ */ jsx49(Text39, { color: PALETTE.warning, children: ` \u2026${cycleRows.length - 3} more` }),
30660
+ /* @__PURE__ */ jsx49(Text39, { children: " press [c] for detail" })
30620
30661
  ] }),
30621
- /* @__PURE__ */ jsx47(
30662
+ /* @__PURE__ */ jsx49(
30622
30663
  SearchMatchSummary,
30623
30664
  {
30624
30665
  open: searchOpen,
@@ -30629,7 +30670,7 @@ function GenerateReviewStepView({
30629
30670
  hidden: dialogOpen
30630
30671
  }
30631
30672
  ),
30632
- !dialogOpen && sidebarFocused && /* @__PURE__ */ jsx47(CompactControlBar, { hasGroupRoots, searchActive: searchOpen || searchQuery.length > 0 })
30673
+ !dialogOpen && sidebarFocused && /* @__PURE__ */ jsx49(CompactControlBar, { hasGroupRoots, searchActive: searchOpen || searchQuery.length > 0 })
30633
30674
  ] });
30634
30675
  }
30635
30676
  var HELP_SECTIONS2;
@@ -30745,17 +30786,17 @@ var init_generate_review_step = __esm({
30745
30786
  });
30746
30787
 
30747
30788
  // packages/experience-design-system-cli/src/tui/import/steps/10-flow/components/CustomPromptBanner.tsx
30748
- import { Box as Box38, Text as Text40 } from "ink";
30749
- import { jsx as jsx48, jsxs as jsxs38 } from "react/jsx-runtime";
30789
+ import { Box as Box37, Text as Text40 } from "ink";
30790
+ import { jsx as jsx50, jsxs as jsxs38 } from "react/jsx-runtime";
30750
30791
  function CustomPromptBanner({ generatePromptPath }) {
30751
30792
  if (!generatePromptPath) return null;
30752
- return /* @__PURE__ */ jsxs38(Box38, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
30753
- /* @__PURE__ */ jsx48(Text40, { color: PALETTE.warning, bold: true, children: "WARNING: Custom prompt active" }),
30793
+ return /* @__PURE__ */ jsxs38(Box37, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
30794
+ /* @__PURE__ */ jsx50(Text40, { color: PALETTE.warning, bold: true, children: "WARNING: Custom prompt active" }),
30754
30795
  generatePromptPath ? /* @__PURE__ */ jsxs38(Text40, { color: PALETTE.warning, children: [
30755
30796
  "components: ",
30756
30797
  generatePromptPath
30757
30798
  ] }) : null,
30758
- /* @__PURE__ */ jsx48(Text40, { color: PALETTE.warning, children: "Bundled invariants (utility-wrapper rejection, description content rules) do NOT apply." })
30799
+ /* @__PURE__ */ jsx50(Text40, { color: PALETTE.warning, children: "Bundled invariants (utility-wrapper rejection, description content rules) do NOT apply." })
30759
30800
  ] });
30760
30801
  }
30761
30802
  var init_CustomPromptBanner = __esm({
@@ -30784,15 +30825,15 @@ var init_contentful_urls2 = __esm({
30784
30825
  });
30785
30826
 
30786
30827
  // packages/experience-design-system-cli/src/tui/import/steps/10-flow/components/SpaceEnvironment.tsx
30787
- import { Box as Box39, Text as Text41 } from "ink";
30788
- import { jsx as jsx49, jsxs as jsxs39 } from "react/jsx-runtime";
30828
+ import { Box as Box38, Text as Text41 } from "ink";
30829
+ import { jsx as jsx51, jsxs as jsxs39 } from "react/jsx-runtime";
30789
30830
  function SpaceEnvironment({ spaceId, environmentId }) {
30790
- return /* @__PURE__ */ jsxs39(Box39, { gap: 1, marginTop: 1, children: [
30791
- /* @__PURE__ */ jsx49(Text41, { color: PALETTE.muted, children: "Space:" }),
30792
- /* @__PURE__ */ jsx49(Text41, { children: spaceId }),
30793
- /* @__PURE__ */ jsx49(Text41, { color: PALETTE.muted, children: "/" }),
30794
- /* @__PURE__ */ jsx49(Text41, { color: PALETTE.muted, children: "Environment:" }),
30795
- /* @__PURE__ */ jsx49(Text41, { children: environmentId })
30831
+ return /* @__PURE__ */ jsxs39(Box38, { gap: 1, marginTop: 1, children: [
30832
+ /* @__PURE__ */ jsx51(Text41, { color: PALETTE.muted, children: "Space:" }),
30833
+ /* @__PURE__ */ jsx51(Text41, { children: spaceId }),
30834
+ /* @__PURE__ */ jsx51(Text41, { color: PALETTE.muted, children: "/" }),
30835
+ /* @__PURE__ */ jsx51(Text41, { color: PALETTE.muted, children: "Environment:" }),
30836
+ /* @__PURE__ */ jsx51(Text41, { children: environmentId })
30796
30837
  ] });
30797
30838
  }
30798
30839
  var init_SpaceEnvironment = __esm({
@@ -30803,13 +30844,13 @@ var init_SpaceEnvironment = __esm({
30803
30844
  });
30804
30845
 
30805
30846
  // packages/experience-design-system-cli/src/tui/import/steps/10-flow/screens/DoneStep.tsx
30806
- import { Box as Box40, Text as Text42 } from "ink";
30807
- import { Fragment as Fragment15, jsx as jsx50, jsxs as jsxs40 } from "react/jsx-runtime";
30847
+ import { Box as Box39, Text as Text42 } from "ink";
30848
+ import { Fragment as Fragment17, jsx as jsx52, jsxs as jsxs40 } from "react/jsx-runtime";
30808
30849
  function EntityRows({ entity, label }) {
30809
30850
  const plural3 = (n) => `${n} ${label}${n !== 1 ? "s" : ""}`;
30810
- return /* @__PURE__ */ jsxs40(Fragment15, { children: [
30851
+ return /* @__PURE__ */ jsxs40(Fragment17, { children: [
30811
30852
  ACTIONS.filter((action) => entity[action] > 0).map((action) => /* @__PURE__ */ jsxs40(Text42, { children: [
30812
- /* @__PURE__ */ jsx50(Text42, { color: PALETTE.success, children: "\u2713" }),
30853
+ /* @__PURE__ */ jsx52(Text42, { color: PALETTE.success, children: "\u2713" }),
30813
30854
  " ",
30814
30855
  plural3(entity[action]),
30815
30856
  " ",
@@ -30823,9 +30864,9 @@ function EntityRows({ entity, label }) {
30823
30864
  ] });
30824
30865
  }
30825
30866
  function LinkRow({ title, url }) {
30826
- return /* @__PURE__ */ jsxs40(Box40, { flexDirection: "column", children: [
30827
- /* @__PURE__ */ jsx50(Text42, { color: PALETTE.muted, children: title }),
30828
- /* @__PURE__ */ jsx50(Text42, { color: PALETTE.accent, children: url })
30867
+ return /* @__PURE__ */ jsxs40(Box39, { flexDirection: "column", children: [
30868
+ /* @__PURE__ */ jsx52(Text42, { color: PALETTE.muted, children: title }),
30869
+ /* @__PURE__ */ jsx52(Text42, { color: PALETTE.accent, children: url })
30829
30870
  ] });
30830
30871
  }
30831
30872
  function DoneStep({
@@ -30849,14 +30890,14 @@ function DoneStep({
30849
30890
  const totalPushed = componentTypes.created + componentTypes.updated + componentTypes.removed + designTokens.created + designTokens.updated + designTokens.removed;
30850
30891
  const success = totalFailed === 0;
30851
30892
  const urlArgs = { host: host ?? "api.contentful.com", spaceId, environmentId };
30852
- return /* @__PURE__ */ jsxs40(Box40, { flexDirection: "column", children: [
30853
- /* @__PURE__ */ jsx50(StepHeader, { step: "done" }),
30854
- /* @__PURE__ */ jsxs40(Box40, { flexDirection: "column", gap: 1, paddingX: 2, paddingBottom: 1, children: [
30855
- success ? /* @__PURE__ */ jsx50(Text42, { bold: true, color: PALETTE.success, children: "Done!" }) : /* @__PURE__ */ jsx50(Text42, { bold: true, color: PALETTE.warning, children: "\u26A0 Finished with errors" }),
30856
- totalPushed === 0 && totalFailed === 0 && !summary ? /* @__PURE__ */ jsx50(Text42, { color: PALETTE.muted, children: credentialsSkipped ? "Nothing was pushed \u2014 you skipped the Contentful credentials, so the files were only saved locally." : "Nothing was pushed \u2014 everything was already up to date." }) : /* @__PURE__ */ jsxs40(Box40, { flexDirection: "column", children: [
30857
- /* @__PURE__ */ jsx50(EntityRows, { entity: componentTypes, label: "Component" }),
30858
- /* @__PURE__ */ jsx50(EntityRows, { entity: designTokens, label: "Design Token" }),
30859
- summary && /* @__PURE__ */ jsx50(Box40, { marginTop: 1, children: /* @__PURE__ */ jsxs40(Text42, { color: PALETTE.muted, children: [
30893
+ return /* @__PURE__ */ jsxs40(Box39, { flexDirection: "column", children: [
30894
+ /* @__PURE__ */ jsx52(StepHeader, { step: "done" }),
30895
+ /* @__PURE__ */ jsxs40(Box39, { flexDirection: "column", gap: 1, paddingX: 2, paddingBottom: 1, children: [
30896
+ success ? /* @__PURE__ */ jsx52(Text42, { bold: true, color: PALETTE.success, children: "Done!" }) : /* @__PURE__ */ jsx52(Text42, { bold: true, color: PALETTE.warning, children: "\u26A0 Finished with errors" }),
30897
+ totalPushed === 0 && totalFailed === 0 && !summary ? /* @__PURE__ */ jsx52(Text42, { color: PALETTE.muted, children: credentialsSkipped ? "Nothing was pushed \u2014 you skipped the Contentful credentials, so the files were only saved locally." : "Nothing was pushed \u2014 everything was already up to date." }) : /* @__PURE__ */ jsxs40(Box39, { flexDirection: "column", children: [
30898
+ /* @__PURE__ */ jsx52(EntityRows, { entity: componentTypes, label: "Component" }),
30899
+ /* @__PURE__ */ jsx52(EntityRows, { entity: designTokens, label: "Design Token" }),
30900
+ summary && /* @__PURE__ */ jsx52(Box39, { marginTop: 1, children: /* @__PURE__ */ jsxs40(Text42, { color: PALETTE.muted, children: [
30860
30901
  "Push result: ",
30861
30902
  summary.succeeded,
30862
30903
  "/",
@@ -30869,8 +30910,8 @@ function DoneStep({
30869
30910
  ] })
30870
30911
  ] }) })
30871
30912
  ] }),
30872
- failures.length > 0 && /* @__PURE__ */ jsxs40(Box40, { flexDirection: "column", children: [
30873
- /* @__PURE__ */ jsx50(Text42, { bold: true, color: PALETTE.error, children: "Failure details" }),
30913
+ failures.length > 0 && /* @__PURE__ */ jsxs40(Box39, { flexDirection: "column", children: [
30914
+ /* @__PURE__ */ jsx52(Text42, { bold: true, color: PALETTE.error, children: "Failure details" }),
30874
30915
  failures.map((failure) => /* @__PURE__ */ jsxs40(Text42, { color: PALETTE.error, children: [
30875
30916
  failure.entityType,
30876
30917
  " ",
@@ -30879,11 +30920,11 @@ function DoneStep({
30879
30920
  failure.message
30880
30921
  ] }, `${failure.entityType}:${failure.entityId}`))
30881
30922
  ] }),
30882
- /* @__PURE__ */ jsx50(SpaceEnvironment, { spaceId, environmentId }),
30883
- success && totalPushed > 0 && /* @__PURE__ */ jsxs40(Box40, { flexDirection: "column", gap: 1, children: [
30884
- /* @__PURE__ */ jsx50(Text42, { color: PALETTE.success, children: "Your design system is now in Contentful Experiences." }),
30885
- produced.components && /* @__PURE__ */ jsx50(LinkRow, { title: "View your components here:", url: buildPostPushUrl2(urlArgs) }),
30886
- produced.tokens && /* @__PURE__ */ jsx50(
30923
+ /* @__PURE__ */ jsx52(SpaceEnvironment, { spaceId, environmentId }),
30924
+ success && totalPushed > 0 && /* @__PURE__ */ jsxs40(Box39, { flexDirection: "column", gap: 1, children: [
30925
+ /* @__PURE__ */ jsx52(Text42, { color: PALETTE.success, children: "Your design system is now in Contentful Experiences." }),
30926
+ produced.components && /* @__PURE__ */ jsx52(LinkRow, { title: "View your components here:", url: buildPostPushUrl2(urlArgs) }),
30927
+ produced.tokens && /* @__PURE__ */ jsx52(
30887
30928
  LinkRow,
30888
30929
  {
30889
30930
  title: "View your design tokens here:",
@@ -30891,7 +30932,7 @@ function DoneStep({
30891
30932
  }
30892
30933
  )
30893
30934
  ] }),
30894
- /* @__PURE__ */ jsx50(ControlHints, { hints: [{ keys: "Enter / q", label: "Exit" }] })
30935
+ /* @__PURE__ */ jsx52(ControlHints, { hints: [{ keys: "Enter / q", label: "Exit" }] })
30895
30936
  ] })
30896
30937
  ] });
30897
30938
  }
@@ -30950,10 +30991,10 @@ var init_use_blinking_cursor = __esm({
30950
30991
 
30951
30992
  // packages/experience-design-system-cli/src/tui/import/steps/10-flow/screens/PathPrompt.tsx
30952
30993
  import { useState as useState27 } from "react";
30953
- import { Box as Box41, Text as Text43 } from "ink";
30994
+ import { Box as Box40, Text as Text43 } from "ink";
30954
30995
  import { readdirSync as readdirSync3 } from "node:fs";
30955
30996
  import { dirname as dirname16, basename as basename6, join as join21 } from "node:path";
30956
- import { jsx as jsx51, jsxs as jsxs41 } from "react/jsx-runtime";
30997
+ import { jsx as jsx53, jsxs as jsxs41 } from "react/jsx-runtime";
30957
30998
  function autocomplete(partial) {
30958
30999
  if (!partial) return null;
30959
31000
  const normalized = normalizePath(partial);
@@ -31010,19 +31051,19 @@ function PathPrompt({
31010
31051
  const shown = input || defaultPath;
31011
31052
  const isPlaceholder = input === "";
31012
31053
  const cursor = cursorVisible ? "\u2588" : " ";
31013
- return /* @__PURE__ */ jsxs41(Box41, { flexDirection: "column", children: [
31014
- /* @__PURE__ */ jsx51(StepHeader, { step: "push" }),
31015
- /* @__PURE__ */ jsxs41(Box41, { flexDirection: "column", gap: 1, paddingX: 2, paddingBottom: 1, children: [
31016
- /* @__PURE__ */ jsxs41(Box41, { gap: 1, children: [
31017
- /* @__PURE__ */ jsx51(Text43, { color: PALETTE.accent, children: "?" }),
31054
+ return /* @__PURE__ */ jsxs41(Box40, { flexDirection: "column", children: [
31055
+ /* @__PURE__ */ jsx53(StepHeader, { step: "push" }),
31056
+ /* @__PURE__ */ jsxs41(Box40, { flexDirection: "column", gap: 1, paddingX: 2, paddingBottom: 1, children: [
31057
+ /* @__PURE__ */ jsxs41(Box40, { gap: 1, children: [
31058
+ /* @__PURE__ */ jsx53(Text43, { color: PALETTE.accent, children: "?" }),
31018
31059
  /* @__PURE__ */ jsxs41(Text43, { bold: true, children: [
31019
31060
  label,
31020
31061
  ":"
31021
31062
  ] }),
31022
- /* @__PURE__ */ jsx51(Text43, { color: isPlaceholder ? PALETTE.muted : void 0, children: shown }),
31023
- /* @__PURE__ */ jsx51(Text43, { children: cursor })
31063
+ /* @__PURE__ */ jsx53(Text43, { color: isPlaceholder ? PALETTE.muted : void 0, children: shown }),
31064
+ /* @__PURE__ */ jsx53(Text43, { children: cursor })
31024
31065
  ] }),
31025
- /* @__PURE__ */ jsx51(
31066
+ /* @__PURE__ */ jsx53(
31026
31067
  ControlHints,
31027
31068
  {
31028
31069
  hints: [
@@ -31067,7 +31108,7 @@ var init_produced = __esm({
31067
31108
  // packages/experience-design-system-cli/src/tui/import/steps/10-flow/support/use-timed-spinner.tsx
31068
31109
  import { useEffect as useEffect19, useState as useState28 } from "react";
31069
31110
  import { Spinner as Spinner2 } from "@inkjs/ui";
31070
- import { jsx as jsx52 } from "react/jsx-runtime";
31111
+ import { jsx as jsx54 } from "react/jsx-runtime";
31071
31112
  function useTimedSpinner() {
31072
31113
  const [elapsedSeconds, setElapsedSeconds] = useState28(0);
31073
31114
  useEffect19(() => {
@@ -31079,7 +31120,7 @@ function useTimedSpinner() {
31079
31120
  const mins = Math.floor(elapsedSeconds / 60);
31080
31121
  const secs = elapsedSeconds % 60;
31081
31122
  return {
31082
- spinner: /* @__PURE__ */ jsx52(Spinner2, {}),
31123
+ spinner: /* @__PURE__ */ jsx54(Spinner2, {}),
31083
31124
  elapsed: mins > 0 ? `${mins}m ${secs}s` : `${secs}s`
31084
31125
  };
31085
31126
  }
@@ -31090,28 +31131,28 @@ var init_use_timed_spinner = __esm({
31090
31131
  });
31091
31132
 
31092
31133
  // packages/experience-design-system-cli/src/tui/import/steps/10-flow/screens/PushingStep.tsx
31093
- import { Box as Box42, Text as Text44 } from "ink";
31134
+ import { Box as Box41, Text as Text44 } from "ink";
31094
31135
  import { ProgressBar as ProgressBar2, ThemeProvider as ThemeProvider2 } from "@inkjs/ui";
31095
- import { jsx as jsx53, jsxs as jsxs42 } from "react/jsx-runtime";
31136
+ import { jsx as jsx55, jsxs as jsxs42 } from "react/jsx-runtime";
31096
31137
  function PushingStep({ progress, produced }) {
31097
31138
  const { elapsed } = useTimedSpinner();
31098
31139
  const operationId = progress && progress.kind === "queued" ? progress.operationId : null;
31099
31140
  const showGlobal = progress && progress.kind === "progress";
31100
31141
  const showCurrent = progress && progress.kind === "progress" && progress.current ? progress.current : null;
31101
- return /* @__PURE__ */ jsxs42(Box42, { flexDirection: "column", children: [
31102
- /* @__PURE__ */ jsx53(StepHeader, { step: "push" }),
31103
- /* @__PURE__ */ jsxs42(Box42, { flexDirection: "column", gap: 1, paddingX: 2, paddingBottom: 1, children: [
31142
+ return /* @__PURE__ */ jsxs42(Box41, { flexDirection: "column", children: [
31143
+ /* @__PURE__ */ jsx55(StepHeader, { step: "push" }),
31144
+ /* @__PURE__ */ jsxs42(Box41, { flexDirection: "column", gap: 1, paddingX: 2, paddingBottom: 1, children: [
31104
31145
  /* @__PURE__ */ jsxs42(Text44, { children: [
31105
31146
  "Writing ",
31106
31147
  writtenThings(produced),
31107
31148
  " to your Contentful space..."
31108
31149
  ] }),
31109
- operationId && /* @__PURE__ */ jsxs42(Box42, { gap: 1, children: [
31110
- /* @__PURE__ */ jsx53(Text44, { color: PALETTE.muted, children: "Operation:" }),
31111
- /* @__PURE__ */ jsx53(Text44, { children: operationId })
31150
+ operationId && /* @__PURE__ */ jsxs42(Box41, { gap: 1, children: [
31151
+ /* @__PURE__ */ jsx55(Text44, { color: PALETTE.muted, children: "Operation:" }),
31152
+ /* @__PURE__ */ jsx55(Text44, { children: operationId })
31112
31153
  ] }),
31113
- showGlobal && progress && progress.kind === "progress" && /* @__PURE__ */ jsx53(Box42, { gap: 1, flexDirection: "column", children: /* @__PURE__ */ jsxs42(Box42, { gap: 2, children: [
31114
- /* @__PURE__ */ jsx53(Box42, { width: 40, children: /* @__PURE__ */ jsx53(ThemeProvider2, { theme: PROGRESS_THEME, children: /* @__PURE__ */ jsx53(ProgressBar2, { value: Math.round(progress.processed / progress.total * 100) }) }) }),
31154
+ showGlobal && progress && progress.kind === "progress" && /* @__PURE__ */ jsx55(Box41, { gap: 1, flexDirection: "column", children: /* @__PURE__ */ jsxs42(Box41, { gap: 2, children: [
31155
+ /* @__PURE__ */ jsx55(Box41, { width: 40, children: /* @__PURE__ */ jsx55(ThemeProvider2, { theme: PROGRESS_THEME, children: /* @__PURE__ */ jsx55(ProgressBar2, { value: Math.round(progress.processed / progress.total * 100) }) }) }),
31115
31156
  /* @__PURE__ */ jsxs42(Text44, { color: PALETTE.muted, children: [
31116
31157
  progress.processed,
31117
31158
  "/",
@@ -31119,11 +31160,11 @@ function PushingStep({ progress, produced }) {
31119
31160
  " entities"
31120
31161
  ] })
31121
31162
  ] }) }),
31122
- showCurrent && /* @__PURE__ */ jsxs42(Box42, { gap: 1, children: [
31123
- /* @__PURE__ */ jsx53(Text44, { color: PALETTE.muted, children: "Now processing:" }),
31124
- /* @__PURE__ */ jsx53(Text44, { children: showCurrent })
31163
+ showCurrent && /* @__PURE__ */ jsxs42(Box41, { gap: 1, children: [
31164
+ /* @__PURE__ */ jsx55(Text44, { color: PALETTE.muted, children: "Now processing:" }),
31165
+ /* @__PURE__ */ jsx55(Text44, { children: showCurrent })
31125
31166
  ] }),
31126
- /* @__PURE__ */ jsx53(Box42, { marginTop: 1, children: /* @__PURE__ */ jsxs42(Text44, { color: PALETTE.muted, children: [
31167
+ /* @__PURE__ */ jsx55(Box41, { marginTop: 1, children: /* @__PURE__ */ jsxs42(Text44, { color: PALETTE.muted, children: [
31127
31168
  "Elapsed: ",
31128
31169
  elapsed
31129
31170
  ] }) })
@@ -31329,8 +31370,8 @@ var init_preview_confirmation_input = __esm({
31329
31370
 
31330
31371
  // packages/experience-design-system-cli/src/tui/import/steps/10-flow/screens/WizardPreviewStep.tsx
31331
31372
  import { useEffect as useEffect20, useState as useState29, useMemo as useMemo5 } from "react";
31332
- import { Box as Box43, Text as Text45 } from "ink";
31333
- import { Fragment as Fragment16, jsx as jsx54, jsxs as jsxs43 } from "react/jsx-runtime";
31373
+ import { Box as Box42, Text as Text45 } from "ink";
31374
+ import { Fragment as Fragment18, jsx as jsx56, jsxs as jsxs43 } from "react/jsx-runtime";
31334
31375
  function buildPreviewSummaryLines(preview) {
31335
31376
  const lines = [];
31336
31377
  const { components, tokens } = preview;
@@ -31582,11 +31623,11 @@ function WizardPreviewStep({
31582
31623
  return;
31583
31624
  }
31584
31625
  });
31585
- return /* @__PURE__ */ jsxs43(Box43, { flexDirection: "column", children: [
31586
- /* @__PURE__ */ jsx54(StepHeader, { step: "push" }),
31587
- /* @__PURE__ */ jsxs43(Box43, { flexDirection: "column", gap: 1, paddingX: 2, paddingBottom: 2, children: [
31588
- hasAnything ? /* @__PURE__ */ jsxs43(Fragment16, { children: [
31589
- /* @__PURE__ */ jsx54(Text45, { children: "Here's what will happen in your space:" }),
31626
+ return /* @__PURE__ */ jsxs43(Box42, { flexDirection: "column", children: [
31627
+ /* @__PURE__ */ jsx56(StepHeader, { step: "push" }),
31628
+ /* @__PURE__ */ jsxs43(Box42, { flexDirection: "column", gap: 1, paddingX: 2, paddingBottom: 2, children: [
31629
+ hasAnything ? /* @__PURE__ */ jsxs43(Fragment18, { children: [
31630
+ /* @__PURE__ */ jsx56(Text45, { children: "Here's what will happen in your space:" }),
31590
31631
  /* @__PURE__ */ jsxs43(
31591
31632
  WindowedPanel,
31592
31633
  {
@@ -31595,15 +31636,15 @@ function WizardPreviewStep({
31595
31636
  title: diffExpanded ? `Diff (${diffLines.length} lines)` : "",
31596
31637
  focused: false,
31597
31638
  children: [
31598
- activeLines.slice(boundedScrollOffset, boundedScrollOffset + viewportHeight).map((line) => /* @__PURE__ */ jsx54(Text45, { color: line.color, wrap: "truncate-end", children: line.text }, line.key)),
31599
- /* @__PURE__ */ jsx54(Text45, { color: PALETTE.muted, wrap: "truncate-end", children: formatPreviewScrollIndicator(activeLines.length, boundedScrollOffset, viewportHeight) })
31639
+ activeLines.slice(boundedScrollOffset, boundedScrollOffset + viewportHeight).map((line) => /* @__PURE__ */ jsx56(Text45, { color: line.color, wrap: "truncate-end", children: line.text }, line.key)),
31640
+ /* @__PURE__ */ jsx56(Text45, { color: PALETTE.muted, wrap: "truncate-end", children: formatPreviewScrollIndicator(activeLines.length, boundedScrollOffset, viewportHeight) })
31600
31641
  ]
31601
31642
  }
31602
31643
  )
31603
- ] }) : /* @__PURE__ */ jsx54(Text45, { color: PALETTE.muted, children: "Nothing to push \u2014 everything is already up to date." }),
31604
- breakingWithImpact && /* @__PURE__ */ jsx54(Box43, { marginTop: 1, children: /* @__PURE__ */ jsx54(Text45, { color: PALETTE.error, bold: true, children: "\u26A0 Breaking changes will affect downstream entities. Press Enter to acknowledge and apply." }) }),
31605
- /* @__PURE__ */ jsx54(SpaceEnvironment, { spaceId, environmentId }),
31606
- /* @__PURE__ */ jsx54(Box43, { marginTop: 1, children: /* @__PURE__ */ jsx54(
31644
+ ] }) : /* @__PURE__ */ jsx56(Text45, { color: PALETTE.muted, children: "Nothing to push \u2014 everything is already up to date." }),
31645
+ breakingWithImpact && /* @__PURE__ */ jsx56(Box42, { marginTop: 1, children: /* @__PURE__ */ jsx56(Text45, { color: PALETTE.error, bold: true, children: "\u26A0 Breaking changes will affect downstream entities. Press Enter to acknowledge and apply." }) }),
31646
+ /* @__PURE__ */ jsx56(SpaceEnvironment, { spaceId, environmentId }),
31647
+ /* @__PURE__ */ jsx56(Box42, { marginTop: 1, children: /* @__PURE__ */ jsx56(
31607
31648
  ControlHints,
31608
31649
  {
31609
31650
  hints: [
@@ -31649,8 +31690,8 @@ var init_run_teaser = __esm({
31649
31690
  });
31650
31691
 
31651
31692
  // packages/experience-design-system-cli/src/tui/import/steps/10-flow/flow/screen.tsx
31652
- import { Box as Box44 } from "ink";
31653
- import { jsx as jsx55, jsxs as jsxs44 } from "react/jsx-runtime";
31693
+ import { Box as Box43 } from "ink";
31694
+ import { jsx as jsx57, jsxs as jsxs44 } from "react/jsx-runtime";
31654
31695
  function canEditFromPreview(cdf) {
31655
31696
  if (!cdf) return false;
31656
31697
  return parseCDFComponents(cdf).components.length > 0;
@@ -31667,7 +31708,7 @@ function FlowScreen({
31667
31708
  const content = (() => {
31668
31709
  switch (state2.step) {
31669
31710
  case "final-review":
31670
- return /* @__PURE__ */ jsx55(
31711
+ return /* @__PURE__ */ jsx57(
31671
31712
  GenerateReviewStep,
31672
31713
  {
31673
31714
  extractSessionId: state2.extractSessionId,
@@ -31684,10 +31725,10 @@ function FlowScreen({
31684
31725
  }
31685
31726
  );
31686
31727
  case "previewing":
31687
- return /* @__PURE__ */ jsx55(RunningStep, { step: "push", description: "Computing diff against your Contentful space..." });
31728
+ return /* @__PURE__ */ jsx57(RunningStep, { step: "push", description: "Computing diff against your Contentful space..." });
31688
31729
  case "preview-gate":
31689
31730
  if (!state2.serverPreview) return null;
31690
- return /* @__PURE__ */ jsx55(
31731
+ return /* @__PURE__ */ jsx57(
31691
31732
  WizardPreviewStep,
31692
31733
  {
31693
31734
  preview: state2.serverPreview,
@@ -31699,9 +31740,9 @@ function FlowScreen({
31699
31740
  }
31700
31741
  );
31701
31742
  case "pushing":
31702
- return /* @__PURE__ */ jsx55(PushingStep, { progress: state2.pushProgress, produced });
31743
+ return /* @__PURE__ */ jsx57(PushingStep, { progress: state2.pushProgress, produced });
31703
31744
  case "path-prompt":
31704
- return /* @__PURE__ */ jsx55(
31745
+ return /* @__PURE__ */ jsx57(
31705
31746
  PathPrompt,
31706
31747
  {
31707
31748
  defaultPath: state2.outDir,
@@ -31710,10 +31751,10 @@ function FlowScreen({
31710
31751
  }
31711
31752
  );
31712
31753
  case "printing":
31713
- return /* @__PURE__ */ jsx55(RunningStep, { step: "push", description: "Writing output files to disk..." });
31754
+ return /* @__PURE__ */ jsx57(RunningStep, { step: "push", description: "Writing output files to disk..." });
31714
31755
  case "print-gate": {
31715
31756
  const teaser = buildRunTeaserLine(state2.lastRunId);
31716
- return /* @__PURE__ */ jsx55(
31757
+ return /* @__PURE__ */ jsx57(
31717
31758
  GateStep,
31718
31759
  {
31719
31760
  step: "push",
@@ -31728,7 +31769,7 @@ function FlowScreen({
31728
31769
  }
31729
31770
  case "done": {
31730
31771
  const totalFailed = state2.pushResult.componentTypes.failed + state2.pushResult.designTokens.failed;
31731
- return /* @__PURE__ */ jsx55(
31772
+ return /* @__PURE__ */ jsx57(
31732
31773
  DoneStep,
31733
31774
  {
31734
31775
  componentTypes: state2.pushResult.componentTypes,
@@ -31745,7 +31786,7 @@ function FlowScreen({
31745
31786
  );
31746
31787
  }
31747
31788
  case "preview-validation-error":
31748
- return /* @__PURE__ */ jsx55(
31789
+ return /* @__PURE__ */ jsx57(
31749
31790
  PreviewValidationErrorScreen,
31750
31791
  {
31751
31792
  errors: state2.previewValidationErrors,
@@ -31756,7 +31797,7 @@ function FlowScreen({
31756
31797
  }
31757
31798
  );
31758
31799
  case "error":
31759
- return /* @__PURE__ */ jsx55(
31800
+ return /* @__PURE__ */ jsx57(
31760
31801
  ErrorStep,
31761
31802
  {
31762
31803
  stepName: state2.errorStep,
@@ -31767,8 +31808,8 @@ function FlowScreen({
31767
31808
  );
31768
31809
  }
31769
31810
  })();
31770
- return /* @__PURE__ */ jsxs44(Box44, { flexDirection: "column", children: [
31771
- /* @__PURE__ */ jsx55(CustomPromptBanner, { generatePromptPath }),
31811
+ return /* @__PURE__ */ jsxs44(Box43, { flexDirection: "column", children: [
31812
+ /* @__PURE__ */ jsx57(CustomPromptBanner, { generatePromptPath }),
31772
31813
  content
31773
31814
  ] });
31774
31815
  }
@@ -32978,14 +33019,14 @@ var init_help_info = __esm({
32978
33019
 
32979
33020
  // packages/experience-design-system-cli/src/tui/help/PageContainer.tsx
32980
33021
  import { useEffect as useEffect22, useState as useState30 } from "react";
32981
- import { Box as Box45, Text as Text46, useInput as useInput12 } from "ink";
32982
- import { Fragment as Fragment17, jsx as jsx56, jsxs as jsxs45 } from "react/jsx-runtime";
33022
+ import { Box as Box44, Text as Text46, useInput as useInput10 } from "ink";
33023
+ import { Fragment as Fragment19, jsx as jsx58, jsxs as jsxs45 } from "react/jsx-runtime";
32983
33024
  function Section({ title, rows }) {
32984
- return /* @__PURE__ */ jsxs45(Box45, { flexDirection: "column", children: [
32985
- /* @__PURE__ */ jsx56(Text46, { bold: true, color: PALETTE.accent, children: title }),
32986
- rows.map((row) => /* @__PURE__ */ jsxs45(Box45, { gap: 1, children: [
32987
- /* @__PURE__ */ jsx56(Box45, { width: 16, flexShrink: 0, children: /* @__PURE__ */ jsx56(Text46, { color: PALETTE.muted, children: row.label }) }),
32988
- /* @__PURE__ */ jsx56(Text46, { children: row.value })
33025
+ return /* @__PURE__ */ jsxs45(Box44, { flexDirection: "column", children: [
33026
+ /* @__PURE__ */ jsx58(Text46, { bold: true, color: PALETTE.accent, children: title }),
33027
+ rows.map((row) => /* @__PURE__ */ jsxs45(Box44, { gap: 1, children: [
33028
+ /* @__PURE__ */ jsx58(Box44, { width: 16, flexShrink: 0, children: /* @__PURE__ */ jsx58(Text46, { color: PALETTE.muted, children: row.label }) }),
33029
+ /* @__PURE__ */ jsx58(Text46, { children: row.value })
32989
33030
  ] }, row.label))
32990
33031
  ] });
32991
33032
  }
@@ -32999,7 +33040,7 @@ function HelpScreen({ onDone }) {
32999
33040
  void finishDebugRun({ outputs: {}, status: "success", exitMethod });
33000
33041
  onDone();
33001
33042
  };
33002
- useInput12((input, key) => {
33043
+ useInput10((input, key) => {
33003
33044
  if (key.return) {
33004
33045
  leave("saved");
33005
33046
  return;
@@ -33009,14 +33050,14 @@ function HelpScreen({ onDone }) {
33009
33050
  return;
33010
33051
  }
33011
33052
  });
33012
- return /* @__PURE__ */ jsxs45(Box45, { flexDirection: "column", paddingX: 2, paddingY: 1, gap: 1, children: [
33013
- /* @__PURE__ */ jsx56(Text46, { bold: true, children: "Help" }),
33014
- info ? /* @__PURE__ */ jsxs45(Fragment17, { children: [
33015
- /* @__PURE__ */ jsx56(Section, { title: "Where things are stored", rows: info.storage }),
33016
- /* @__PURE__ */ jsx56(Section, { title: "Troubleshooting", rows: info.troubleshooting }),
33017
- /* @__PURE__ */ jsx56(Text46, { color: PALETTE.muted, children: "Hit a problem? Turn on Debug Mode in Settings, reproduce it, then share the session folder above. The CMA token is redacted from those logs." })
33018
- ] }) : /* @__PURE__ */ jsx56(Text46, { color: PALETTE.accent, children: "Loading..." }),
33019
- /* @__PURE__ */ jsx56(
33053
+ return /* @__PURE__ */ jsxs45(Box44, { flexDirection: "column", paddingX: 2, paddingY: 1, gap: 1, children: [
33054
+ /* @__PURE__ */ jsx58(Text46, { bold: true, children: "Help" }),
33055
+ info ? /* @__PURE__ */ jsxs45(Fragment19, { children: [
33056
+ /* @__PURE__ */ jsx58(Section, { title: "Where things are stored", rows: info.storage }),
33057
+ /* @__PURE__ */ jsx58(Section, { title: "Troubleshooting", rows: info.troubleshooting }),
33058
+ /* @__PURE__ */ jsx58(Text46, { color: PALETTE.muted, children: "Hit a problem? Turn on Debug Mode in Settings, reproduce it, then share the session folder above. The CMA token is redacted from those logs." })
33059
+ ] }) : /* @__PURE__ */ jsx58(Text46, { color: PALETTE.accent, children: "Loading..." }),
33060
+ /* @__PURE__ */ jsx58(
33020
33061
  ControlHints,
33021
33062
  {
33022
33063
  hints: [
@@ -33039,8 +33080,8 @@ var init_PageContainer2 = __esm({
33039
33080
 
33040
33081
  // packages/experience-design-system-cli/src/tui/settings/PageContainer.tsx
33041
33082
  import { useState as useState31 } from "react";
33042
- import { Box as Box46, Text as Text47, useInput as useInput13 } from "ink";
33043
- import { jsx as jsx57, jsxs as jsxs46 } from "react/jsx-runtime";
33083
+ import { Box as Box45, Text as Text47, useInput as useInput11 } from "ink";
33084
+ import { jsx as jsx59, jsxs as jsxs46 } from "react/jsx-runtime";
33044
33085
  function SettingsScreen({
33045
33086
  onNavigate,
33046
33087
  onBack
@@ -33051,7 +33092,7 @@ function SettingsScreen({
33051
33092
  { label: "Opt-in Analytics", screen: "settings-opt-in-analytics" },
33052
33093
  { label: "Debug Mode", screen: "settings-debug-mode" }
33053
33094
  ];
33054
- useInput13((input, key) => {
33095
+ useInput11((input, key) => {
33055
33096
  if (key.upArrow) {
33056
33097
  setFocusIdx((i) => (i - 1 + items.length) % items.length);
33057
33098
  return;
@@ -33071,15 +33112,15 @@ function SettingsScreen({
33071
33112
  onBack();
33072
33113
  }
33073
33114
  });
33074
- return /* @__PURE__ */ jsxs46(Box46, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
33075
- /* @__PURE__ */ jsx57(Text47, { bold: true, children: "Settings" }),
33076
- /* @__PURE__ */ jsx57(Text47, { color: PALETTE.muted, children: " " }),
33115
+ return /* @__PURE__ */ jsxs46(Box45, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
33116
+ /* @__PURE__ */ jsx59(Text47, { bold: true, children: "Settings" }),
33117
+ /* @__PURE__ */ jsx59(Text47, { color: PALETTE.muted, children: " " }),
33077
33118
  items.map((item, i) => /* @__PURE__ */ jsxs46(Text47, { color: i === focusIdx ? PALETTE.accent : void 0, children: [
33078
33119
  i === focusIdx ? "> " : " ",
33079
33120
  item.label
33080
33121
  ] }, item.label)),
33081
- /* @__PURE__ */ jsx57(Text47, { children: " " }),
33082
- /* @__PURE__ */ jsx57(
33122
+ /* @__PURE__ */ jsx59(Text47, { children: " " }),
33123
+ /* @__PURE__ */ jsx59(
33083
33124
  ControlHints,
33084
33125
  {
33085
33126
  hints: [
@@ -33388,14 +33429,14 @@ var init_agent_debug = __esm({
33388
33429
 
33389
33430
  // packages/experience-design-system-cli/src/tui/settings/configuration/agents/AgentStatusBadge.tsx
33390
33431
  import { Text as Text48 } from "ink";
33391
- import { jsx as jsx58 } from "react/jsx-runtime";
33432
+ import { jsx as jsx60 } from "react/jsx-runtime";
33392
33433
  function AgentStatusBadge({
33393
33434
  name,
33394
33435
  checks,
33395
33436
  binary
33396
33437
  }) {
33397
33438
  const { symbol, text, tone } = LIST_STATUS[checks ? statusFromChecks(name, checks, binary) : "checking"];
33398
- return /* @__PURE__ */ jsx58(Text48, { color: TONE_COLOR[tone], children: `${symbol} ${text}` });
33439
+ return /* @__PURE__ */ jsx60(Text48, { color: TONE_COLOR[tone], children: `${symbol} ${text}` });
33399
33440
  }
33400
33441
  var TONE_COLOR;
33401
33442
  var init_AgentStatusBadge = __esm({
@@ -33413,12 +33454,12 @@ var init_AgentStatusBadge = __esm({
33413
33454
 
33414
33455
  // packages/experience-design-system-cli/src/tui/settings/configuration/agents/AgentDetail.tsx
33415
33456
  import { useEffect as useEffect23, useState as useState32 } from "react";
33416
- import { Box as Box47, Text as Text49 } from "ink";
33417
- import { jsx as jsx59, jsxs as jsxs47 } from "react/jsx-runtime";
33457
+ import { Box as Box46, Text as Text49 } from "ink";
33458
+ import { jsx as jsx61, jsxs as jsxs47 } from "react/jsx-runtime";
33418
33459
  function StatusHeading() {
33419
- return /* @__PURE__ */ jsxs47(Box47, { gap: 1, children: [
33420
- /* @__PURE__ */ jsx59(Text49, { bold: true, color: PALETTE.muted, children: "STATUS" }),
33421
- /* @__PURE__ */ jsx59(Text49, { color: PALETTE.muted, children: "\xB7 read only" })
33460
+ return /* @__PURE__ */ jsxs47(Box46, { gap: 1, children: [
33461
+ /* @__PURE__ */ jsx61(Text49, { bold: true, color: PALETTE.muted, children: "STATUS" }),
33462
+ /* @__PURE__ */ jsx61(Text49, { color: PALETTE.muted, children: "\xB7 read only" })
33422
33463
  ] });
33423
33464
  }
33424
33465
  function AgentDetail({
@@ -33481,7 +33522,7 @@ function AgentDetail({
33481
33522
  };
33482
33523
  const formFields = fields(name);
33483
33524
  const labelWidth = formLabelWidth([...formFields, action]);
33484
- return /* @__PURE__ */ jsx59(
33525
+ return /* @__PURE__ */ jsx61(
33485
33526
  FieldForm,
33486
33527
  {
33487
33528
  title: `Settings \u203A Configuration \u203A Agents \u203A ${AGENT_LABELS[name]}`,
@@ -33498,9 +33539,9 @@ function AgentDetail({
33498
33539
  actions: [action],
33499
33540
  notice: testing ? null : notice,
33500
33541
  busy: saving || testing,
33501
- children: /* @__PURE__ */ jsxs47(Box47, { flexDirection: "column", marginTop: 1, children: [
33502
- /* @__PURE__ */ jsx59(StatusHeading, {}),
33503
- statusRows(name, checks, settings.binary).map((row) => /* @__PURE__ */ jsx59(FormReadOnlyRow, { label: row.label, labelWidth, children: /* @__PURE__ */ jsx59(Text49, { color: TONE_COLOR[row.tone], children: row.value }) }, row.label))
33542
+ children: /* @__PURE__ */ jsxs47(Box46, { flexDirection: "column", marginTop: 1, children: [
33543
+ /* @__PURE__ */ jsx61(StatusHeading, {}),
33544
+ statusRows(name, checks, settings.binary).map((row) => /* @__PURE__ */ jsx61(FormReadOnlyRow, { label: row.label, labelWidth, children: /* @__PURE__ */ jsx61(Text49, { color: TONE_COLOR[row.tone], children: row.value }) }, row.label))
33504
33545
  ] })
33505
33546
  }
33506
33547
  );
@@ -33526,8 +33567,8 @@ var init_AgentDetail = __esm({
33526
33567
 
33527
33568
  // packages/experience-design-system-cli/src/tui/settings/configuration/agents/AgentsScreen.tsx
33528
33569
  import { useEffect as useEffect24, useRef as useRef15, useState as useState33 } from "react";
33529
- import { Box as Box48, Text as Text50, useInput as useInput14 } from "ink";
33530
- import { Fragment as Fragment18, jsx as jsx60, jsxs as jsxs48 } from "react/jsx-runtime";
33570
+ import { Box as Box47, Text as Text50, useInput as useInput12 } from "ink";
33571
+ import { Fragment as Fragment20, jsx as jsx62, jsxs as jsxs48 } from "react/jsx-runtime";
33531
33572
  function AgentsScreen({ onDone }) {
33532
33573
  const [config, setConfig] = useState33(null);
33533
33574
  const [focus, setFocus] = useState33(0);
@@ -33603,7 +33644,7 @@ function AgentsScreen({ onDone }) {
33603
33644
  setNotice({ kind: "error", text: `Default agent not changed: ${visit.error}` });
33604
33645
  }).finally(() => setSaving(false));
33605
33646
  };
33606
- useInput14((input, key) => {
33647
+ useInput12((input, key) => {
33607
33648
  if (loadError && (key.escape || input === "q")) {
33608
33649
  endVisit(null);
33609
33650
  onDone();
@@ -33635,21 +33676,21 @@ function AgentsScreen({ onDone }) {
33635
33676
  }
33636
33677
  });
33637
33678
  if (!config) {
33638
- return /* @__PURE__ */ jsxs48(Box48, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
33639
- /* @__PURE__ */ jsx60(Text50, { bold: true, children: "Settings \u203A Configuration \u203A Agents" }),
33640
- /* @__PURE__ */ jsx60(Text50, { children: " " }),
33641
- loadError ? /* @__PURE__ */ jsxs48(Fragment18, { children: [
33679
+ return /* @__PURE__ */ jsxs48(Box47, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
33680
+ /* @__PURE__ */ jsx62(Text50, { bold: true, children: "Settings \u203A Configuration \u203A Agents" }),
33681
+ /* @__PURE__ */ jsx62(Text50, { children: " " }),
33682
+ loadError ? /* @__PURE__ */ jsxs48(Fragment20, { children: [
33642
33683
  /* @__PURE__ */ jsxs48(Text50, { color: PALETTE.error, children: [
33643
33684
  "\u2717 Could not read the settings: ",
33644
33685
  loadError
33645
33686
  ] }),
33646
- /* @__PURE__ */ jsx60(Text50, { children: " " }),
33647
- /* @__PURE__ */ jsx60(ControlHints, { hints: [{ keys: "Esc/q", label: "back" }] })
33648
- ] }) : /* @__PURE__ */ jsx60(Text50, { color: PALETTE.accent, children: "Loading..." })
33687
+ /* @__PURE__ */ jsx62(Text50, { children: " " }),
33688
+ /* @__PURE__ */ jsx62(ControlHints, { hints: [{ keys: "Esc/q", label: "back" }] })
33689
+ ] }) : /* @__PURE__ */ jsx62(Text50, { color: PALETTE.accent, children: "Loading..." })
33649
33690
  ] });
33650
33691
  }
33651
33692
  if (open) {
33652
- return /* @__PURE__ */ jsx60(
33693
+ return /* @__PURE__ */ jsx62(
33653
33694
  AgentDetail,
33654
33695
  {
33655
33696
  name: open,
@@ -33670,48 +33711,48 @@ function AgentsScreen({ onDone }) {
33670
33711
  );
33671
33712
  }
33672
33713
  const focusedAgent = AGENT_NAMES[focus];
33673
- return /* @__PURE__ */ jsxs48(Box48, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
33674
- /* @__PURE__ */ jsx60(Text50, { bold: true, children: "Settings \u203A Configuration \u203A Agents" }),
33675
- /* @__PURE__ */ jsx60(Text50, { children: " " }),
33676
- /* @__PURE__ */ jsx60(Text50, { color: PALETTE.muted, children: "The coding agent the CLI runs, and what was found for each one." }),
33677
- /* @__PURE__ */ jsx60(Text50, { children: " " }),
33678
- /* @__PURE__ */ jsxs48(Box48, { gap: 1, children: [
33679
- /* @__PURE__ */ jsx60(Text50, { color: PALETTE.muted, children: "Default agent" }),
33680
- /* @__PURE__ */ jsx60(Text50, { bold: true, children: AGENT_LABELS[config.defaultAgent] }),
33681
- saving && /* @__PURE__ */ jsx60(Text50, { color: PALETTE.accent, children: "\u2026 saving" })
33714
+ return /* @__PURE__ */ jsxs48(Box47, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
33715
+ /* @__PURE__ */ jsx62(Text50, { bold: true, children: "Settings \u203A Configuration \u203A Agents" }),
33716
+ /* @__PURE__ */ jsx62(Text50, { children: " " }),
33717
+ /* @__PURE__ */ jsx62(Text50, { color: PALETTE.muted, children: "The coding agent the CLI runs, and what was found for each one." }),
33718
+ /* @__PURE__ */ jsx62(Text50, { children: " " }),
33719
+ /* @__PURE__ */ jsxs48(Box47, { gap: 1, children: [
33720
+ /* @__PURE__ */ jsx62(Text50, { color: PALETTE.muted, children: "Default agent" }),
33721
+ /* @__PURE__ */ jsx62(Text50, { bold: true, children: AGENT_LABELS[config.defaultAgent] }),
33722
+ saving && /* @__PURE__ */ jsx62(Text50, { color: PALETTE.accent, children: "\u2026 saving" })
33682
33723
  ] }),
33683
- /* @__PURE__ */ jsxs48(Box48, { marginTop: 1, gap: 1, children: [
33684
- /* @__PURE__ */ jsx60(Text50, { children: " " }),
33685
- /* @__PURE__ */ jsx60(Text50, { children: " " }),
33686
- /* @__PURE__ */ jsx60(Box48, { width: NAME_WIDTH, flexShrink: 0, children: /* @__PURE__ */ jsx60(Text50, { color: PALETTE.muted, children: "AGENT" }) }),
33687
- /* @__PURE__ */ jsx60(Text50, { color: PALETTE.muted, children: "STATUS" })
33724
+ /* @__PURE__ */ jsxs48(Box47, { marginTop: 1, gap: 1, children: [
33725
+ /* @__PURE__ */ jsx62(Text50, { children: " " }),
33726
+ /* @__PURE__ */ jsx62(Text50, { children: " " }),
33727
+ /* @__PURE__ */ jsx62(Box47, { width: NAME_WIDTH, flexShrink: 0, children: /* @__PURE__ */ jsx62(Text50, { color: PALETTE.muted, children: "AGENT" }) }),
33728
+ /* @__PURE__ */ jsx62(Text50, { color: PALETTE.muted, children: "STATUS" })
33688
33729
  ] }),
33689
33730
  AGENT_NAMES.map((name) => {
33690
33731
  const isFocused = focusedAgent === name;
33691
- return /* @__PURE__ */ jsxs48(Box48, { gap: 1, children: [
33692
- /* @__PURE__ */ jsx60(Text50, { color: isFocused ? PALETTE.accent : void 0, children: isFocused ? "\u276F" : " " }),
33693
- /* @__PURE__ */ jsx60(Text50, { color: PALETTE.success, children: name === config.defaultAgent ? "\u2605" : " " }),
33694
- /* @__PURE__ */ jsx60(Box48, { width: NAME_WIDTH, flexShrink: 0, children: /* @__PURE__ */ jsx60(Text50, { bold: isFocused, color: isFocused ? PALETTE.accent : void 0, children: AGENT_LABELS[name] }) }),
33695
- /* @__PURE__ */ jsx60(AgentStatusBadge, { name, checks: checks[name], binary: config.agents[name].binary })
33732
+ return /* @__PURE__ */ jsxs48(Box47, { gap: 1, children: [
33733
+ /* @__PURE__ */ jsx62(Text50, { color: isFocused ? PALETTE.accent : void 0, children: isFocused ? "\u276F" : " " }),
33734
+ /* @__PURE__ */ jsx62(Text50, { color: PALETTE.success, children: name === config.defaultAgent ? "\u2605" : " " }),
33735
+ /* @__PURE__ */ jsx62(Box47, { width: NAME_WIDTH, flexShrink: 0, children: /* @__PURE__ */ jsx62(Text50, { bold: isFocused, color: isFocused ? PALETTE.accent : void 0, children: AGENT_LABELS[name] }) }),
33736
+ /* @__PURE__ */ jsx62(AgentStatusBadge, { name, checks: checks[name], binary: config.agents[name].binary })
33696
33737
  ] }, name);
33697
33738
  }),
33698
- /* @__PURE__ */ jsxs48(Box48, { flexDirection: "column", marginTop: 1, children: [
33699
- /* @__PURE__ */ jsx60(Text50, { color: PALETTE.muted, children: `\u2500 ${AGENT_LABELS[focusedAgent]} ${"\u2500".repeat(30)}` }),
33700
- panelRows(focusedAgent, checks[focusedAgent], config.agents[focusedAgent]).map((row) => /* @__PURE__ */ jsxs48(Box48, { gap: 1, paddingLeft: 1, children: [
33701
- /* @__PURE__ */ jsx60(Box48, { width: PANEL_LABEL_WIDTH, flexShrink: 0, children: /* @__PURE__ */ jsx60(Text50, { color: PALETTE.muted, children: row.label }) }),
33702
- /* @__PURE__ */ jsx60(Text50, { color: TONE_COLOR[row.tone], children: row.value })
33739
+ /* @__PURE__ */ jsxs48(Box47, { flexDirection: "column", marginTop: 1, children: [
33740
+ /* @__PURE__ */ jsx62(Text50, { color: PALETTE.muted, children: `\u2500 ${AGENT_LABELS[focusedAgent]} ${"\u2500".repeat(30)}` }),
33741
+ panelRows(focusedAgent, checks[focusedAgent], config.agents[focusedAgent]).map((row) => /* @__PURE__ */ jsxs48(Box47, { gap: 1, paddingLeft: 1, children: [
33742
+ /* @__PURE__ */ jsx62(Box47, { width: PANEL_LABEL_WIDTH, flexShrink: 0, children: /* @__PURE__ */ jsx62(Text50, { color: PALETTE.muted, children: row.label }) }),
33743
+ /* @__PURE__ */ jsx62(Text50, { color: TONE_COLOR[row.tone], children: row.value })
33703
33744
  ] }, row.label))
33704
33745
  ] }),
33705
- notice && /* @__PURE__ */ jsxs48(Fragment18, { children: [
33706
- /* @__PURE__ */ jsx60(Text50, { children: " " }),
33746
+ notice && /* @__PURE__ */ jsxs48(Fragment20, { children: [
33747
+ /* @__PURE__ */ jsx62(Text50, { children: " " }),
33707
33748
  /* @__PURE__ */ jsxs48(Text50, { bold: true, color: notice.kind === "success" ? PALETTE.success : PALETTE.error, children: [
33708
33749
  notice.kind === "success" ? "\u2713" : "\u2717",
33709
33750
  " ",
33710
33751
  notice.text
33711
33752
  ] })
33712
33753
  ] }),
33713
- /* @__PURE__ */ jsx60(Text50, { children: " " }),
33714
- /* @__PURE__ */ jsx60(
33754
+ /* @__PURE__ */ jsx62(Text50, { children: " " }),
33755
+ /* @__PURE__ */ jsx62(
33715
33756
  ControlHints,
33716
33757
  {
33717
33758
  hints: [
@@ -33776,8 +33817,8 @@ var init_project_store = __esm({
33776
33817
 
33777
33818
  // packages/experience-design-system-cli/src/tui/settings/configuration/project/ProjectScreen.tsx
33778
33819
  import { useEffect as useEffect25, useRef as useRef16, useState as useState34 } from "react";
33779
- import { Box as Box49, Text as Text51, useInput as useInput15 } from "ink";
33780
- import { Fragment as Fragment19, jsx as jsx61, jsxs as jsxs49 } from "react/jsx-runtime";
33820
+ import { Box as Box48, Text as Text51, useInput as useInput13 } from "ink";
33821
+ import { Fragment as Fragment21, jsx as jsx63, jsxs as jsxs49 } from "react/jsx-runtime";
33781
33822
  function debugFields(config) {
33782
33823
  return {
33783
33824
  space_id: config?.spaceId ?? "",
@@ -33839,24 +33880,24 @@ function ProjectScreen({ onDone }) {
33839
33880
  exitMethod: change.changed ? "saved" : "discarded"
33840
33881
  });
33841
33882
  };
33842
- useInput15((input, key) => {
33883
+ useInput13((input, key) => {
33843
33884
  if (!config && loadError && (key.escape || input === "q")) {
33844
33885
  endVisit(null);
33845
33886
  onDone();
33846
33887
  }
33847
33888
  });
33848
33889
  if (!config) {
33849
- return /* @__PURE__ */ jsxs49(Box49, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
33850
- /* @__PURE__ */ jsx61(Text51, { bold: true, children: "Settings \u203A Configuration \u203A Project" }),
33851
- /* @__PURE__ */ jsx61(Text51, { children: " " }),
33852
- loadError ? /* @__PURE__ */ jsxs49(Fragment19, { children: [
33890
+ return /* @__PURE__ */ jsxs49(Box48, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
33891
+ /* @__PURE__ */ jsx63(Text51, { bold: true, children: "Settings \u203A Configuration \u203A Project" }),
33892
+ /* @__PURE__ */ jsx63(Text51, { children: " " }),
33893
+ loadError ? /* @__PURE__ */ jsxs49(Fragment21, { children: [
33853
33894
  /* @__PURE__ */ jsxs49(Text51, { color: PALETTE.error, children: [
33854
33895
  "\u2717 Could not read the settings: ",
33855
33896
  loadError
33856
33897
  ] }),
33857
- /* @__PURE__ */ jsx61(Text51, { children: " " }),
33858
- /* @__PURE__ */ jsx61(ControlHints, { hints: [{ keys: "Esc/q", label: "back" }] })
33859
- ] }) : /* @__PURE__ */ jsx61(Text51, { color: PALETTE.accent, children: "Loading..." })
33898
+ /* @__PURE__ */ jsx63(Text51, { children: " " }),
33899
+ /* @__PURE__ */ jsx63(ControlHints, { hints: [{ keys: "Esc/q", label: "back" }] })
33900
+ ] }) : /* @__PURE__ */ jsx63(Text51, { color: PALETTE.accent, children: "Loading..." })
33860
33901
  ] });
33861
33902
  }
33862
33903
  const save = () => {
@@ -33877,7 +33918,7 @@ function ProjectScreen({ onDone }) {
33877
33918
  endVisit(config);
33878
33919
  onDone();
33879
33920
  };
33880
- return /* @__PURE__ */ jsx61(
33921
+ return /* @__PURE__ */ jsx63(
33881
33922
  FieldForm,
33882
33923
  {
33883
33924
  title: "Settings \u203A Configuration \u203A Project",
@@ -33923,13 +33964,13 @@ var init_ProjectScreen = __esm({
33923
33964
 
33924
33965
  // packages/experience-design-system-cli/src/tui/settings/configuration/ConfigurationScreen.tsx
33925
33966
  import { useState as useState35 } from "react";
33926
- import { Box as Box50, Text as Text52, useInput as useInput16 } from "ink";
33927
- import { jsx as jsx62, jsxs as jsxs50 } from "react/jsx-runtime";
33967
+ import { Box as Box49, Text as Text52, useInput as useInput14 } from "ink";
33968
+ import { jsx as jsx64, jsxs as jsxs50 } from "react/jsx-runtime";
33928
33969
  function ConfigurationScreen({ onDone }) {
33929
33970
  const [focus, setFocus] = useState35(0);
33930
33971
  const [open, setOpen] = useState35(null);
33931
33972
  const close = () => setOpen(null);
33932
- useInput16((input, key) => {
33973
+ useInput14((input, key) => {
33933
33974
  if (open) return;
33934
33975
  if (key.upArrow) {
33935
33976
  setFocus((i) => (i - 1 + SECTIONS.length) % SECTIONS.length);
@@ -33945,18 +33986,18 @@ function ConfigurationScreen({ onDone }) {
33945
33986
  }
33946
33987
  if (key.escape || input === "q") onDone();
33947
33988
  });
33948
- if (open === "project") return /* @__PURE__ */ jsx62(ProjectScreen, { onDone: close });
33949
- if (open === "agents") return /* @__PURE__ */ jsx62(AgentsScreen, { onDone: close });
33950
- return /* @__PURE__ */ jsxs50(Box50, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
33951
- /* @__PURE__ */ jsx62(Text52, { bold: true, children: "Settings \u203A Configuration" }),
33952
- /* @__PURE__ */ jsx62(Text52, { children: " " }),
33953
- SECTIONS.map((section, index) => /* @__PURE__ */ jsxs50(Box50, { gap: 1, children: [
33954
- /* @__PURE__ */ jsx62(Text52, { color: index === focus ? PALETTE.accent : void 0, children: index === focus ? "\u276F" : " " }),
33955
- /* @__PURE__ */ jsx62(Box50, { width: 9, flexShrink: 0, children: /* @__PURE__ */ jsx62(Text52, { bold: index === focus, color: index === focus ? PALETTE.accent : void 0, children: section.label }) }),
33956
- /* @__PURE__ */ jsx62(Text52, { color: PALETTE.muted, children: section.description })
33989
+ if (open === "project") return /* @__PURE__ */ jsx64(ProjectScreen, { onDone: close });
33990
+ if (open === "agents") return /* @__PURE__ */ jsx64(AgentsScreen, { onDone: close });
33991
+ return /* @__PURE__ */ jsxs50(Box49, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
33992
+ /* @__PURE__ */ jsx64(Text52, { bold: true, children: "Settings \u203A Configuration" }),
33993
+ /* @__PURE__ */ jsx64(Text52, { children: " " }),
33994
+ SECTIONS.map((section, index) => /* @__PURE__ */ jsxs50(Box49, { gap: 1, children: [
33995
+ /* @__PURE__ */ jsx64(Text52, { color: index === focus ? PALETTE.accent : void 0, children: index === focus ? "\u276F" : " " }),
33996
+ /* @__PURE__ */ jsx64(Box49, { width: 9, flexShrink: 0, children: /* @__PURE__ */ jsx64(Text52, { bold: index === focus, color: index === focus ? PALETTE.accent : void 0, children: section.label }) }),
33997
+ /* @__PURE__ */ jsx64(Text52, { color: PALETTE.muted, children: section.description })
33957
33998
  ] }, section.id)),
33958
- /* @__PURE__ */ jsx62(Text52, { children: " " }),
33959
- /* @__PURE__ */ jsx62(
33999
+ /* @__PURE__ */ jsx64(Text52, { children: " " }),
34000
+ /* @__PURE__ */ jsx64(
33960
34001
  ControlHints,
33961
34002
  {
33962
34003
  hints: [
@@ -33989,8 +34030,8 @@ var init_ConfigurationScreen = __esm({
33989
34030
 
33990
34031
  // packages/experience-design-system-cli/src/tui/settings/opt-in-analytics/screen.tsx
33991
34032
  import { useEffect as useEffect26, useState as useState36 } from "react";
33992
- import { Box as Box51, Text as Text53, useInput as useInput17 } from "ink";
33993
- import { Fragment as Fragment20, jsx as jsx63, jsxs as jsxs51 } from "react/jsx-runtime";
34033
+ import { Box as Box50, Text as Text53, useInput as useInput15 } from "ink";
34034
+ import { Fragment as Fragment22, jsx as jsx65, jsxs as jsxs51 } from "react/jsx-runtime";
33994
34035
  function OptInAnalyticsScreen({ onDone }) {
33995
34036
  const [loading, setLoading] = useState36(true);
33996
34037
  const [enabled, setEnabled] = useState36(true);
@@ -34006,7 +34047,7 @@ function OptInAnalyticsScreen({ onDone }) {
34006
34047
  });
34007
34048
  });
34008
34049
  }, []);
34009
- useInput17((input, key) => {
34050
+ useInput15((input, key) => {
34010
34051
  if (loading) return;
34011
34052
  if (key.return || input === " ") {
34012
34053
  setEnabled((current) => {
@@ -34021,21 +34062,21 @@ function OptInAnalyticsScreen({ onDone }) {
34021
34062
  onDone();
34022
34063
  }
34023
34064
  });
34024
- return /* @__PURE__ */ jsxs51(Box51, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
34025
- /* @__PURE__ */ jsx63(Text53, { bold: true, children: "Settings \u203A Opt-in Analytics" }),
34026
- /* @__PURE__ */ jsx63(Text53, { children: " " }),
34027
- loading ? /* @__PURE__ */ jsx63(Text53, { color: PALETTE.muted, children: "Loading\u2026" }) : /* @__PURE__ */ jsxs51(Fragment20, { children: [
34065
+ return /* @__PURE__ */ jsxs51(Box50, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
34066
+ /* @__PURE__ */ jsx65(Text53, { bold: true, children: "Settings \u203A Opt-in Analytics" }),
34067
+ /* @__PURE__ */ jsx65(Text53, { children: " " }),
34068
+ loading ? /* @__PURE__ */ jsx65(Text53, { color: PALETTE.muted, children: "Loading\u2026" }) : /* @__PURE__ */ jsxs51(Fragment22, { children: [
34028
34069
  /* @__PURE__ */ jsxs51(Text53, { children: [
34029
34070
  "Share anonymous usage data:",
34030
34071
  " ",
34031
- /* @__PURE__ */ jsx63(Text53, { bold: true, color: enabled ? PALETTE.success : PALETTE.muted, children: enabled ? "On" : "Off" })
34072
+ /* @__PURE__ */ jsx65(Text53, { bold: true, color: enabled ? PALETTE.success : PALETTE.muted, children: enabled ? "On" : "Off" })
34032
34073
  ] }),
34033
- /* @__PURE__ */ jsx63(Text53, { children: " " }),
34034
- /* @__PURE__ */ jsx63(Text53, { color: PALETTE.muted, children: "Shares which CLI commands are used and where imports succeed or fail." }),
34035
- /* @__PURE__ */ jsx63(Text53, { color: PALETTE.muted, children: "Never includes source code, file paths, credentials, or authored content." })
34074
+ /* @__PURE__ */ jsx65(Text53, { children: " " }),
34075
+ /* @__PURE__ */ jsx65(Text53, { color: PALETTE.muted, children: "Shares which CLI commands are used and where imports succeed or fail." }),
34076
+ /* @__PURE__ */ jsx65(Text53, { color: PALETTE.muted, children: "Never includes source code, file paths, credentials, or authored content." })
34036
34077
  ] }),
34037
- /* @__PURE__ */ jsx63(Text53, { children: " " }),
34038
- /* @__PURE__ */ jsx63(
34078
+ /* @__PURE__ */ jsx65(Text53, { children: " " }),
34079
+ /* @__PURE__ */ jsx65(
34039
34080
  ControlHints,
34040
34081
  {
34041
34082
  hints: [
@@ -34058,8 +34099,8 @@ var init_screen11 = __esm({
34058
34099
 
34059
34100
  // packages/experience-design-system-cli/src/tui/settings/debug-mode/screen.tsx
34060
34101
  import { useEffect as useEffect27, useRef as useRef17, useState as useState37 } from "react";
34061
- import { Box as Box52, Text as Text54, useInput as useInput18 } from "ink";
34062
- import { Fragment as Fragment21, jsx as jsx64, jsxs as jsxs52 } from "react/jsx-runtime";
34102
+ import { Box as Box51, Text as Text54, useInput as useInput16 } from "ink";
34103
+ import { Fragment as Fragment23, jsx as jsx66, jsxs as jsxs52 } from "react/jsx-runtime";
34063
34104
  function DebugModeScreen({ onDone }) {
34064
34105
  const [setting, setSetting] = useState37(null);
34065
34106
  const [focus, setFocus] = useState37("enabled");
@@ -34108,7 +34149,7 @@ function DebugModeScreen({ onDone }) {
34108
34149
  exitMethod: change.changed ? "saved" : "discarded"
34109
34150
  });
34110
34151
  };
34111
- useInput18((input, key) => {
34152
+ useInput16((input, key) => {
34112
34153
  if (!setting) return;
34113
34154
  if (key.upArrow || key.downArrow) {
34114
34155
  setFocus((current) => ROWS[(ROWS.indexOf(current) + (key.downArrow ? 1 : ROWS.length - 1)) % ROWS.length]);
@@ -34135,24 +34176,24 @@ function DebugModeScreen({ onDone }) {
34135
34176
  onDone();
34136
34177
  }
34137
34178
  });
34138
- const marker = (row) => /* @__PURE__ */ jsx64(Text54, { color: focus === row ? PALETTE.accent : void 0, children: focus === row ? "\u276F" : " " });
34139
- const label = (row, text) => /* @__PURE__ */ jsx64(Text54, { bold: focus === row, color: focus === row ? PALETTE.accent : PALETTE.muted, children: text });
34140
- return /* @__PURE__ */ jsxs52(Box52, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
34141
- /* @__PURE__ */ jsx64(Text54, { bold: true, children: "Settings \u203A Debug Mode" }),
34142
- /* @__PURE__ */ jsx64(Text54, { children: " " }),
34143
- setting ? /* @__PURE__ */ jsxs52(Fragment21, { children: [
34144
- /* @__PURE__ */ jsxs52(Box52, { gap: 1, children: [
34179
+ const marker = (row) => /* @__PURE__ */ jsx66(Text54, { color: focus === row ? PALETTE.accent : void 0, children: focus === row ? "\u276F" : " " });
34180
+ const label = (row, text) => /* @__PURE__ */ jsx66(Text54, { bold: focus === row, color: focus === row ? PALETTE.accent : PALETTE.muted, children: text });
34181
+ return /* @__PURE__ */ jsxs52(Box51, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
34182
+ /* @__PURE__ */ jsx66(Text54, { bold: true, children: "Settings \u203A Debug Mode" }),
34183
+ /* @__PURE__ */ jsx66(Text54, { children: " " }),
34184
+ setting ? /* @__PURE__ */ jsxs52(Fragment23, { children: [
34185
+ /* @__PURE__ */ jsxs52(Box51, { gap: 1, children: [
34145
34186
  marker("enabled"),
34146
34187
  label("enabled", "Debug logging:"),
34147
- /* @__PURE__ */ jsx64(Text54, { bold: true, color: setting.enabled ? PALETTE.success : PALETTE.muted, children: setting.enabled ? "On" : "Off" })
34188
+ /* @__PURE__ */ jsx66(Text54, { bold: true, color: setting.enabled ? PALETTE.success : PALETTE.muted, children: setting.enabled ? "On" : "Off" })
34148
34189
  ] }),
34149
- /* @__PURE__ */ jsxs52(Box52, { gap: 1, children: [
34190
+ /* @__PURE__ */ jsxs52(Box51, { gap: 1, children: [
34150
34191
  marker("retentionDays"),
34151
34192
  label("retentionDays", "Delete logs after:"),
34152
34193
  RETENTION_CHOICES.map((days) => {
34153
34194
  const highlighted = focus === "retentionDays" && days === pending;
34154
34195
  const saved = days === setting.retentionDays;
34155
- return /* @__PURE__ */ jsx64(
34196
+ return /* @__PURE__ */ jsx66(
34156
34197
  Text54,
34157
34198
  {
34158
34199
  bold: highlighted || saved,
@@ -34164,15 +34205,15 @@ function DebugModeScreen({ onDone }) {
34164
34205
  );
34165
34206
  })
34166
34207
  ] }),
34167
- /* @__PURE__ */ jsx64(Text54, { children: " " }),
34208
+ /* @__PURE__ */ jsx66(Text54, { children: " " }),
34168
34209
  notice ? /* @__PURE__ */ jsxs52(Text54, { color: notice.kind === "success" ? PALETTE.success : PALETTE.error, children: [
34169
34210
  notice.kind === "success" ? "\u2713" : "\u2717",
34170
34211
  " ",
34171
34212
  notice.text
34172
- ] }) : /* @__PURE__ */ jsx64(Text54, { color: PALETTE.muted, children: "\u2713 marks what is saved. Older logs are deleted the next time the CLI starts." })
34173
- ] }) : /* @__PURE__ */ jsx64(Text54, { color: PALETTE.muted, children: "Loading\u2026" }),
34174
- /* @__PURE__ */ jsx64(Text54, { children: " " }),
34175
- /* @__PURE__ */ jsx64(
34213
+ ] }) : /* @__PURE__ */ jsx66(Text54, { color: PALETTE.muted, children: "\u2713 marks what is saved. Older logs are deleted the next time the CLI starts." })
34214
+ ] }) : /* @__PURE__ */ jsx66(Text54, { color: PALETTE.muted, children: "Loading\u2026" }),
34215
+ /* @__PURE__ */ jsx66(Text54, { children: " " }),
34216
+ /* @__PURE__ */ jsx66(
34176
34217
  ControlHints,
34177
34218
  {
34178
34219
  hints: [
@@ -34210,7 +34251,7 @@ __export(app_exports, {
34210
34251
  runApp: () => runApp
34211
34252
  });
34212
34253
  import { useEffect as useEffect28, useState as useState38 } from "react";
34213
- import { Fragment as Fragment22, jsx as jsx65 } from "react/jsx-runtime";
34254
+ import { Fragment as Fragment24, jsx as jsx67 } from "react/jsx-runtime";
34214
34255
  function App({ importOptions, inkClear }) {
34215
34256
  const [screen, setScreen] = useState38("start");
34216
34257
  const [importExitCode, setImportExitCode] = useState38();
@@ -34401,9 +34442,9 @@ function App({ importOptions, inkClear }) {
34401
34442
  };
34402
34443
  switch (screen) {
34403
34444
  case "import":
34404
- if (showImportResult) return /* @__PURE__ */ jsx65(ImportScreen, { exitCode: importExitCode, onDone: finishImportResult });
34445
+ if (showImportResult) return /* @__PURE__ */ jsx67(ImportScreen, { exitCode: importExitCode, onDone: finishImportResult });
34405
34446
  if (flow && flowStart) {
34406
- return /* @__PURE__ */ jsx65(
34447
+ return /* @__PURE__ */ jsx67(
34407
34448
  FlowScreen,
34408
34449
  {
34409
34450
  state: flow.state,
@@ -34413,15 +34454,15 @@ function App({ importOptions, inkClear }) {
34413
34454
  }
34414
34455
  );
34415
34456
  }
34416
- if (importDefaults === void 0) return /* @__PURE__ */ jsx65(Fragment22, {});
34457
+ if (importDefaults === void 0) return /* @__PURE__ */ jsx67(Fragment24, {});
34417
34458
  if (target === void 0) {
34418
- return /* @__PURE__ */ jsx65(PreflightScreen, { onChoose: setTarget, onQuit: leaveImport });
34459
+ return /* @__PURE__ */ jsx67(PreflightScreen, { onChoose: setTarget, onQuit: leaveImport });
34419
34460
  }
34420
34461
  const inputStep = currentInputStep(target, answers);
34421
34462
  if (!extractionRun && !tokensOnlyRun && inputStep !== "credentials") {
34422
34463
  switch (inputStep) {
34423
34464
  case "project":
34424
- return /* @__PURE__ */ jsx65(
34465
+ return /* @__PURE__ */ jsx67(
34425
34466
  WelcomeScreen,
34426
34467
  {
34427
34468
  onContinue: (projectPath) => answer({ projectPath }),
@@ -34430,7 +34471,7 @@ function App({ importOptions, inkClear }) {
34430
34471
  }
34431
34472
  );
34432
34473
  case "token-file":
34433
- return /* @__PURE__ */ jsx65(
34474
+ return /* @__PURE__ */ jsx67(
34434
34475
  TokenInputScreen,
34435
34476
  {
34436
34477
  initialPath: importDefaults.tokenFile,
@@ -34439,7 +34480,7 @@ function App({ importOptions, inkClear }) {
34439
34480
  }
34440
34481
  );
34441
34482
  case "path-validation":
34442
- return /* @__PURE__ */ jsx65(
34483
+ return /* @__PURE__ */ jsx67(
34443
34484
  PathValidationScreen,
34444
34485
  {
34445
34486
  projectPath: answers.projectPath ?? "",
@@ -34453,9 +34494,9 @@ function App({ importOptions, inkClear }) {
34453
34494
  }
34454
34495
  if (tokensOnlyRun) {
34455
34496
  if (tokensOnly?.status === "done" && !tokensOnly.result.ok) {
34456
- return /* @__PURE__ */ jsx65(ErrorStep, { stepName: tokensOnly.result.step, message: tokensOnly.result.message, onExit: leaveImport });
34497
+ return /* @__PURE__ */ jsx67(ErrorStep, { stepName: tokensOnly.result.step, message: tokensOnly.result.message, onExit: leaveImport });
34457
34498
  }
34458
- return /* @__PURE__ */ jsx65(
34499
+ return /* @__PURE__ */ jsx67(
34459
34500
  RunningStep,
34460
34501
  {
34461
34502
  step: "generation",
@@ -34466,19 +34507,19 @@ function App({ importOptions, inkClear }) {
34466
34507
  }
34467
34508
  if (extractionRun) {
34468
34509
  if (extraction?.status === "done" && !extraction.result.ok) {
34469
- return /* @__PURE__ */ jsx65(ErrorStep, { stepName: extraction.result.step, message: extraction.result.message, onExit: leaveImport });
34510
+ return /* @__PURE__ */ jsx67(ErrorStep, { stepName: extraction.result.step, message: extraction.result.message, onExit: leaveImport });
34470
34511
  }
34471
34512
  if (extraction?.status === "running") {
34472
- return /* @__PURE__ */ jsx65(ExtractionScreen, { progress: extraction.progress, agent: extractionRun.input.agent });
34513
+ return /* @__PURE__ */ jsx67(ExtractionScreen, { progress: extraction.progress, agent: extractionRun.input.agent });
34473
34514
  }
34474
- return /* @__PURE__ */ jsx65(Fragment22, {});
34515
+ return /* @__PURE__ */ jsx67(Fragment24, {});
34475
34516
  }
34476
34517
  if (scopeRun && scopeFlow) {
34477
34518
  if (scopeFlow.status === "failed") {
34478
- return /* @__PURE__ */ jsx65(ErrorStep, { stepName: "scope gate", message: scopeFlow.message, onExit: leaveImport });
34519
+ return /* @__PURE__ */ jsx67(ErrorStep, { stepName: "scope gate", message: scopeFlow.message, onExit: leaveImport });
34479
34520
  }
34480
34521
  if (scopeFlow.status === "deciding") {
34481
- return /* @__PURE__ */ jsx65(
34522
+ return /* @__PURE__ */ jsx67(
34482
34523
  ScopeGateScreen,
34483
34524
  {
34484
34525
  components: scopeFlow.load.components,
@@ -34488,10 +34529,10 @@ function App({ importOptions, inkClear }) {
34488
34529
  );
34489
34530
  }
34490
34531
  if (generation?.status === "done" && !generation.result.ok) {
34491
- return /* @__PURE__ */ jsx65(ErrorStep, { stepName: generation.result.step, message: generation.result.message, onExit: leaveImport });
34532
+ return /* @__PURE__ */ jsx67(ErrorStep, { stepName: generation.result.step, message: generation.result.message, onExit: leaveImport });
34492
34533
  }
34493
34534
  if (generation?.status === "running") {
34494
- return /* @__PURE__ */ jsx65(
34535
+ return /* @__PURE__ */ jsx67(
34495
34536
  GenerationScreen,
34496
34537
  {
34497
34538
  progress: generation.progress,
@@ -34501,9 +34542,9 @@ function App({ importOptions, inkClear }) {
34501
34542
  }
34502
34543
  );
34503
34544
  }
34504
- return /* @__PURE__ */ jsx65(Fragment22, {});
34545
+ return /* @__PURE__ */ jsx67(Fragment24, {});
34505
34546
  }
34506
- return /* @__PURE__ */ jsx65(
34547
+ return /* @__PURE__ */ jsx67(
34507
34548
  CredentialsScreen,
34508
34549
  {
34509
34550
  initial: importDefaults.credentials,
@@ -34513,17 +34554,17 @@ function App({ importOptions, inkClear }) {
34513
34554
  }
34514
34555
  );
34515
34556
  case "help":
34516
- return /* @__PURE__ */ jsx65(HelpScreen, { onDone: goToStart });
34557
+ return /* @__PURE__ */ jsx67(HelpScreen, { onDone: goToStart });
34517
34558
  case "settings":
34518
- return /* @__PURE__ */ jsx65(SettingsScreen, { onNavigate: setScreen, onBack: goToStart });
34559
+ return /* @__PURE__ */ jsx67(SettingsScreen, { onNavigate: setScreen, onBack: goToStart });
34519
34560
  case "settings-configuration":
34520
- return /* @__PURE__ */ jsx65(ConfigurationScreen, { onDone: goToSettings });
34561
+ return /* @__PURE__ */ jsx67(ConfigurationScreen, { onDone: goToSettings });
34521
34562
  case "settings-opt-in-analytics":
34522
- return /* @__PURE__ */ jsx65(OptInAnalyticsScreen, { onDone: goToSettings });
34563
+ return /* @__PURE__ */ jsx67(OptInAnalyticsScreen, { onDone: goToSettings });
34523
34564
  case "settings-debug-mode":
34524
- return /* @__PURE__ */ jsx65(DebugModeScreen, { onDone: goToSettings });
34565
+ return /* @__PURE__ */ jsx67(DebugModeScreen, { onDone: goToSettings });
34525
34566
  case "start":
34526
- return /* @__PURE__ */ jsx65(HomeScreen, { onNavigate: setScreen });
34567
+ return /* @__PURE__ */ jsx67(HomeScreen, { onNavigate: setScreen });
34527
34568
  }
34528
34569
  }
34529
34570
  async function runApp(renderApp, importOptions) {
@@ -34531,7 +34572,7 @@ async function runApp(renderApp, importOptions) {
34531
34572
  instance.clear?.();
34532
34573
  process.stdout.write("\x1B[H\x1B[0J");
34533
34574
  };
34534
- const instance = renderApp(/* @__PURE__ */ jsx65(App, { importOptions, inkClear }));
34575
+ const instance = renderApp(/* @__PURE__ */ jsx67(App, { importOptions, inkClear }));
34535
34576
  await instance.waitUntilExit();
34536
34577
  }
34537
34578
  var init_app = __esm({