@contentful/experience-design-system-cli 2.37.1-dev-build-acc2abfe.0 → 2.37.1-dev-build-76b10f7f.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,434 +19981,82 @@ var init_ClearableTextInput = __esm({
19981
19981
  }
19982
19982
  });
19983
19983
 
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));
19990
- }
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
- ] });
19984
+ // packages/experience-design-system-cli/src/tui/import/steps/01-welcome/logic.ts
19985
+ function shouldQuit(key) {
19986
+ return key.escape;
20001
19987
  }
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
- ] });
19988
+ function toProjectPath(value) {
19989
+ const projectPath = value.trim();
19990
+ return projectPath === "" ? null : projectPath;
20157
19991
  }
20158
- var init_FieldForm = __esm({
20159
- "packages/experience-design-system-cli/src/tui/shared/components/FieldForm.tsx"() {
19992
+ var init_logic5 = __esm({
19993
+ "packages/experience-design-system-cli/src/tui/import/steps/01-welcome/logic.ts"() {
20160
19994
  "use strict";
20161
- init_theme();
20162
- init_ControlHints();
20163
- init_ClearableTextInput();
20164
19995
  }
20165
19996
  });
20166
19997
 
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
- dataTitle = "Details",
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);
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();
20189
20003
  });
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
- /* @__PURE__ */ jsx12(Text11, { color: PALETTE.muted, children: "ACTIONS" }),
20201
- menu.map((item, index) => {
20202
- const focused = index === focus;
20203
- return /* @__PURE__ */ jsxs11(Box11, { gap: 1, children: [
20204
- /* @__PURE__ */ jsx12(Text11, { color: focused ? PALETTE.accent : void 0, children: focused ? "\u276F" : " " }),
20205
- /* @__PURE__ */ jsx12(Box11, { width: labelWidth, flexShrink: 0, children: /* @__PURE__ */ jsx12(Text11, { bold: focused, color: focused ? PALETTE.accent : void 0, children: item.label }) }),
20206
- /* @__PURE__ */ jsx12(Text11, { color: PALETTE.muted, children: item.description })
20207
- ] }, item.choice);
20208
- }),
20209
- (rows.length > 0 || children) && /* @__PURE__ */ jsxs11(
20210
- Box11,
20211
- {
20212
- flexDirection: "column",
20213
- marginTop: 1,
20214
- borderStyle: "single",
20215
- borderColor: PALETTE.border,
20216
- borderBottom: false,
20217
- borderLeft: false,
20218
- borderRight: false,
20219
- children: [
20220
- /* @__PURE__ */ jsx12(Text11, { color: PALETTE.muted, children: dataTitle.toUpperCase() }),
20221
- rows.map((row) => /* @__PURE__ */ jsx12(FormReadOnlyRow, { label: row.label, labelWidth, children: /* @__PURE__ */ jsx12(Text11, { bold: row.value !== "", children: row.value || "(empty)" }) }, row.label)),
20222
- children
20223
- ]
20224
- }
20225
- )
20226
- ] })
20227
- ] });
20228
20004
  }
20229
- var init_MenuScreen = __esm({
20230
- "packages/experience-design-system-cli/src/tui/shared/components/MenuScreen.tsx"() {
20005
+ var WELCOME_CONTROLS;
20006
+ var init_controls4 = __esm({
20007
+ "packages/experience-design-system-cli/src/tui/import/steps/01-welcome/controls.ts"() {
20231
20008
  "use strict";
20232
- init_theme();
20233
- init_FieldForm();
20234
- init_StepHeader();
20009
+ init_logic5();
20010
+ WELCOME_CONTROLS = [
20011
+ { keys: "Enter", label: "Continue" },
20012
+ { keys: "Ctrl+D", label: "Clear" },
20013
+ { keys: "Esc", label: "Back" }
20014
+ ];
20235
20015
  }
20236
20016
  });
20237
20017
 
20238
- // packages/experience-design-system-cli/src/tui/shared/components/PathStepScreen.tsx
20239
- import { useState as useState7 } from "react";
20240
- import { Box as Box12, Text as Text12, useInput as useInput9 } from "ink";
20241
- import { Fragment as Fragment3, jsx as jsx13, jsxs as jsxs12 } from "react/jsx-runtime";
20242
- function PathStepScreen({
20243
- title,
20244
- subtitle,
20245
- label,
20246
- initialPath = "",
20247
- toPath,
20248
- check,
20249
- onContinue,
20250
- onBack
20251
- }) {
20252
- const [value, setValue] = useState7(initialPath);
20253
- const [savedValue, setSavedValue] = useState7(toPath(initialPath) === null ? "" : initialPath);
20254
- const [editing, setEditing] = useState7(toPath(initialPath) === null);
20255
- const [failure, setFailure] = useState7(null);
20256
- useInput9(
20257
- (_input, key) => {
20258
- if (!key.escape) return;
20259
- if (savedValue === "") {
20260
- onBack();
20261
- return;
20262
- }
20263
- setValue(savedValue);
20264
- setFailure(null);
20265
- setEditing(false);
20266
- },
20267
- { isActive: editing }
20268
- );
20269
- const choose = (choice) => {
20270
- if (choice === "edit") {
20271
- setFailure(null);
20272
- setEditing(true);
20273
- return;
20274
- }
20275
- if (choice === "back") {
20276
- onBack();
20277
- return;
20278
- }
20279
- const path5 = toPath(value);
20280
- if (path5 === null) return;
20281
- const result = check(path5);
20282
- if (result.ok) onContinue(result.path);
20283
- else setFailure({ error: result.error, resolvedPath: result.resolvedPath });
20284
- };
20285
- const submit = (typed) => {
20286
- if (toPath(typed) === null) {
20287
- setFailure({ error: `Enter the ${label.toLowerCase()}.` });
20288
- return;
20289
- }
20290
- setSavedValue(typed);
20291
- setEditing(false);
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);
20292
20028
  };
20293
- const failureLines = failure && /* @__PURE__ */ jsxs12(Fragment3, { children: [
20294
- /* @__PURE__ */ jsx13(Text12, { children: " " }),
20295
- /* @__PURE__ */ jsxs12(Text12, { color: PALETTE.error, children: [
20296
- "\u2717 ",
20297
- failure.error
20298
- ] }),
20299
- failure.resolvedPath && /* @__PURE__ */ jsxs12(Text12, { color: PALETTE.muted, children: [
20300
- " Resolved to: ",
20301
- failure.resolvedPath
20302
- ] })
20303
- ] });
20304
- if (!editing) {
20305
- return /* @__PURE__ */ jsx13(
20306
- MenuScreen,
20307
- {
20308
- title,
20309
- subtitle,
20310
- menu: MENU,
20311
- rows: [{ label, value: savedValue }],
20312
- onChoose: choose,
20313
- onEscape: onBack,
20314
- children: failureLines
20315
- }
20316
- );
20317
- }
20318
- return /* @__PURE__ */ jsxs12(Box12, { flexDirection: "column", children: [
20319
- /* @__PURE__ */ jsx13(StepHeader, { step: "setup" }),
20320
- /* @__PURE__ */ jsxs12(Box12, { flexDirection: "column", paddingX: 2, paddingBottom: 1, children: [
20321
- /* @__PURE__ */ jsx13(Text12, { bold: true, children: title }),
20322
- /* @__PURE__ */ jsx13(Text12, { children: " " }),
20323
- /* @__PURE__ */ jsx13(Text12, { color: PALETTE.muted, children: subtitle }),
20324
- /* @__PURE__ */ jsx13(Text12, { children: " " }),
20325
- /* @__PURE__ */ jsxs12(Box12, { gap: 1, children: [
20326
- /* @__PURE__ */ jsx13(Text12, { color: PALETTE.accent, children: "?" }),
20327
- /* @__PURE__ */ jsxs12(Text12, { children: [
20328
- label,
20329
- ":"
20330
- ] }),
20331
- /* @__PURE__ */ jsx13(
20332
- ClearableTextInput,
20333
- {
20334
- value,
20335
- onChange: (next) => {
20336
- setValue(next);
20337
- setFailure(null);
20338
- },
20339
- onSubmit: submit
20340
- }
20341
- )
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
+ ] })
20342
20039
  ] }),
20343
- failureLines,
20344
- /* @__PURE__ */ jsx13(Text12, { children: " " }),
20345
- /* @__PURE__ */ jsx13(
20346
- ControlHints,
20347
- {
20348
- hints: [
20349
- { keys: "\u23CE", label: "done" },
20350
- { keys: "Ctrl+D", label: "clear" },
20351
- { keys: "Esc", label: savedValue === "" ? "back" : "cancel edit" }
20352
- ]
20353
- }
20354
- )
20040
+ /* @__PURE__ */ jsx11(Box10, { children: /* @__PURE__ */ jsx11(ControlHints, { hints: WELCOME_CONTROLS }) })
20355
20041
  ] })
20356
20042
  ] });
20357
20043
  }
20358
- var MENU;
20359
- var init_PathStepScreen = __esm({
20360
- "packages/experience-design-system-cli/src/tui/shared/components/PathStepScreen.tsx"() {
20044
+ var init_screen2 = __esm({
20045
+ "packages/experience-design-system-cli/src/tui/import/steps/01-welcome/screen.tsx"() {
20361
20046
  "use strict";
20362
20047
  init_theme();
20363
20048
  init_ClearableTextInput();
20049
+ init_controls4();
20050
+ init_logic5();
20364
20051
  init_ControlHints();
20365
- init_MenuScreen();
20366
20052
  init_StepHeader();
20367
- MENU = [
20368
- { choice: "continue", label: "Continue", description: "Use this path and go on" },
20369
- { choice: "edit", label: "Edit", description: "Change the path" },
20370
- { choice: "back", label: "Back", description: "Go back" }
20371
- ];
20372
- }
20373
- });
20374
-
20375
- // packages/experience-design-system-cli/src/tui/import/steps/01-welcome/logic.ts
20376
- function toProjectPath(value) {
20377
- const projectPath = value.trim();
20378
- return projectPath === "" ? null : projectPath;
20379
- }
20380
- var init_logic5 = __esm({
20381
- "packages/experience-design-system-cli/src/tui/import/steps/01-welcome/logic.ts"() {
20382
- "use strict";
20383
- }
20384
- });
20385
-
20386
- // packages/experience-design-system-cli/src/tui/import/steps/01-welcome/screen.tsx
20387
- import { jsx as jsx14 } from "react/jsx-runtime";
20388
- function WelcomeScreen({ onContinue, onQuit, initialPath = "" }) {
20389
- return /* @__PURE__ */ jsx14(
20390
- PathStepScreen,
20391
- {
20392
- title: "Where is your component library?",
20393
- subtitle: "The folder with your components. You can use ~, relative, or absolute paths.",
20394
- label: "Project path",
20395
- initialPath,
20396
- toPath: toProjectPath,
20397
- check: (path5) => ({ ok: true, path: path5 }),
20398
- onContinue,
20399
- onBack: onQuit
20400
- }
20401
- );
20402
- }
20403
- var init_screen2 = __esm({
20404
- "packages/experience-design-system-cli/src/tui/import/steps/01-welcome/screen.tsx"() {
20405
- "use strict";
20406
- init_PathStepScreen();
20407
- init_logic5();
20408
20053
  }
20409
20054
  });
20410
20055
 
20411
20056
  // packages/experience-design-system-cli/src/tui/import/steps/02-token-input/logic.ts
20057
+ function shouldGoBack(key) {
20058
+ return key.escape;
20059
+ }
20412
20060
  function toTokenPath(value) {
20413
20061
  const tokenPath = value.trim();
20414
20062
  return tokenPath === "" ? null : tokenPath;
@@ -20419,6 +20067,26 @@ var init_logic6 = __esm({
20419
20067
  }
20420
20068
  });
20421
20069
 
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
+ });
20076
+ }
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"() {
20080
+ "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
+ }
20088
+ });
20089
+
20422
20090
  // packages/experience-design-system-cli/src/tui/import/resolve-user-path.ts
20423
20091
  import { homedir as homedir3 } from "node:os";
20424
20092
  import { resolve as resolve20 } from "node:path";
@@ -20468,52 +20136,63 @@ var init_validate_path = __esm({
20468
20136
  });
20469
20137
 
20470
20138
  // packages/experience-design-system-cli/src/tui/import/steps/02-token-input/screen.tsx
20471
- import { jsx as jsx15 } from "react/jsx-runtime";
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";
20472
20142
  function TokenInputScreen({ onConfirm, onBack, initialPath = "" }) {
20473
- return /* @__PURE__ */ jsx15(
20474
- PathStepScreen,
20475
- {
20476
- title: "Design tokens",
20477
- 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).",
20478
- label: "Token path",
20479
- initialPath,
20480
- toPath: toTokenPath,
20481
- check: validateTokenPath,
20482
- onContinue: onConfirm,
20483
- onBack
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;
20484
20155
  }
20485
- );
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
+ ] });
20486
20185
  }
20487
20186
  var init_screen3 = __esm({
20488
20187
  "packages/experience-design-system-cli/src/tui/import/steps/02-token-input/screen.tsx"() {
20489
20188
  "use strict";
20490
- init_PathStepScreen();
20189
+ init_theme();
20190
+ init_ClearableTextInput();
20191
+ init_controls5();
20491
20192
  init_logic6();
20492
20193
  init_validate_path();
20493
- }
20494
- });
20495
-
20496
- // packages/experience-design-system-cli/src/tui/import/steps/03-path-validation/helpers/scan-files.ts
20497
- function scanFiles(directory) {
20498
- return toScanResult(collectFiles(directory));
20499
- }
20500
- function toScanResult(outcome) {
20501
- if (!outcome.ok) return { ok: false, failure: outcome.failure };
20502
- return {
20503
- ok: true,
20504
- counts: foldSvelteAndMdIntoOther(outcome.result.counts),
20505
- filePaths: outcome.result.filePaths,
20506
- warnings: outcome.result.warnings
20507
- };
20508
- }
20509
- function foldSvelteAndMdIntoOther(counts) {
20510
- const { svelte, md, ...rest } = counts;
20511
- return { ...rest, other: rest.other + svelte + md };
20512
- }
20513
- var init_scan_files = __esm({
20514
- "packages/experience-design-system-cli/src/tui/import/steps/03-path-validation/helpers/scan-files.ts"() {
20515
- "use strict";
20516
- init_src3();
20194
+ init_ControlHints();
20195
+ init_StepHeader();
20517
20196
  }
20518
20197
  });
20519
20198
 
@@ -20561,35 +20240,101 @@ function summarize(counts, { hasTokens = true } = {}) {
20561
20240
  warning: hasTokens ? "No component or token files found. Try a different path." : "No component files found. Try a different path."
20562
20241
  };
20563
20242
  }
20564
- function phaseOf(scan) {
20565
- if (scan === void 0) return "scanning";
20566
- return scan.ok ? "ready" : "failed";
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
20319
+ };
20320
+ }
20321
+ function foldSvelteAndMdIntoOther(counts) {
20322
+ const { svelte, md, ...rest } = counts;
20323
+ return { ...rest, other: rest.other + svelte + md };
20567
20324
  }
20568
- var COMPONENT_CATEGORIES, ROW_LABELS, ROW_ORDER;
20569
- var init_logic7 = __esm({
20570
- "packages/experience-design-system-cli/src/tui/import/steps/03-path-validation/logic.ts"() {
20325
+ var init_scan_files = __esm({
20326
+ "packages/experience-design-system-cli/src/tui/import/steps/03-path-validation/helpers/scan-files.ts"() {
20571
20327
  "use strict";
20572
- COMPONENT_CATEGORIES = ["tsx", "ts", "vue", "astro", "jsx", "js"];
20573
- ROW_LABELS = {
20574
- tsx: ".tsx files",
20575
- ts: ".ts files",
20576
- vue: ".vue files",
20577
- astro: ".astro files",
20578
- jsx: ".jsx files",
20579
- js: ".js files",
20580
- json: ".json files (design tokens)",
20581
- other: "other (ignored)"
20582
- };
20583
- ROW_ORDER = ["tsx", "ts", "vue", "astro", "jsx", "js", "json", "other"];
20328
+ init_src3();
20584
20329
  }
20585
20330
  });
20586
20331
 
20587
20332
  // packages/experience-design-system-cli/src/tui/import/steps/03-path-validation/screen.tsx
20588
- import { useEffect as useEffect4, useMemo, useState as useState8 } from "react";
20589
- import { Box as Box13, Text as Text13 } from "ink";
20590
- import { jsx as jsx16, jsxs as jsxs13 } from "react/jsx-runtime";
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";
20591
20336
  function Row({ row }) {
20592
- return /* @__PURE__ */ jsxs13(Text13, { color: row.tone === "accent" ? PALETTE.accent : row.tone === "muted" ? PALETTE.muted : void 0, children: [
20337
+ return /* @__PURE__ */ jsxs12(Text12, { color: row.tone === "accent" ? PALETTE.accent : row.tone === "muted" ? PALETTE.muted : void 0, children: [
20593
20338
  " \u2022 ",
20594
20339
  String(row.count).padStart(3),
20595
20340
  " ",
@@ -20598,12 +20343,12 @@ function Row({ row }) {
20598
20343
  }
20599
20344
  function Failure({ scan, path: path5 }) {
20600
20345
  const { headline, hints } = describeFailure(scan.failure, path5);
20601
- return /* @__PURE__ */ jsxs13(Box13, { flexDirection: "column", children: [
20602
- /* @__PURE__ */ jsxs13(Text13, { color: PALETTE.error, children: [
20346
+ return /* @__PURE__ */ jsxs12(Box12, { flexDirection: "column", children: [
20347
+ /* @__PURE__ */ jsxs12(Text12, { color: PALETTE.error, children: [
20603
20348
  "\u2717 ",
20604
20349
  headline
20605
20350
  ] }),
20606
- hints.map((hint) => /* @__PURE__ */ jsx16(Text13, { color: PALETTE.muted, children: hint }, hint))
20351
+ hints.map((hint) => /* @__PURE__ */ jsx13(Text12, { color: PALETTE.muted, children: hint }, hint))
20607
20352
  ] });
20608
20353
  }
20609
20354
  function Summary({
@@ -20612,23 +20357,24 @@ function Summary({
20612
20357
  hasTokens
20613
20358
  }) {
20614
20359
  const { total, rows, warning } = summarize(scan.counts, { hasTokens });
20615
- return /* @__PURE__ */ jsxs13(Box13, { flexDirection: "column", gap: 1, children: [
20616
- /* @__PURE__ */ jsxs13(Text13, { children: [
20360
+ return /* @__PURE__ */ jsxs12(Box12, { flexDirection: "column", gap: 1, children: [
20361
+ /* @__PURE__ */ jsxs12(Text12, { children: [
20617
20362
  "Scanned ",
20618
- /* @__PURE__ */ jsx16(Text13, { bold: true, children: path5 })
20363
+ /* @__PURE__ */ jsx13(Text12, { bold: true, children: path5 })
20619
20364
  ] }),
20620
- /* @__PURE__ */ jsxs13(Box13, { flexDirection: "column", children: [
20621
- /* @__PURE__ */ jsxs13(Text13, { color: PALETTE.success, children: [
20365
+ /* @__PURE__ */ jsxs12(Box12, { flexDirection: "column", children: [
20366
+ /* @__PURE__ */ jsxs12(Text12, { color: PALETTE.success, children: [
20622
20367
  "\u2713 Found ",
20623
20368
  total,
20624
20369
  " files:"
20625
20370
  ] }),
20626
- rows.map((row) => /* @__PURE__ */ jsx16(Row, { row }, row.label))
20371
+ rows.map((row) => /* @__PURE__ */ jsx13(Row, { row }, row.label))
20627
20372
  ] }),
20628
- warning && /* @__PURE__ */ jsxs13(Text13, { color: PALETTE.warning, children: [
20373
+ warning && /* @__PURE__ */ jsxs12(Text12, { color: PALETTE.warning, children: [
20629
20374
  "\u26A0 ",
20630
20375
  warning
20631
- ] })
20376
+ ] }),
20377
+ /* @__PURE__ */ jsx13(Text12, { children: "Does this look right?" })
20632
20378
  ] });
20633
20379
  }
20634
20380
  function PathValidationScreen({
@@ -20639,56 +20385,225 @@ function PathValidationScreen({
20639
20385
  hasTokens = true
20640
20386
  }) {
20641
20387
  const resolvedPath = useMemo(() => resolveUserPath(projectPath), [projectPath]);
20642
- const [scan, setScan] = useState8();
20388
+ const [scan, setScan] = useState7();
20643
20389
  useEffect4(() => {
20644
20390
  setScan(scanFiles(resolvedPath));
20645
20391
  }, [resolvedPath]);
20646
20392
  const phase = phaseOf(scan);
20647
- const choose = (choice) => {
20648
- if (choice === "continue") {
20393
+ usePathValidationControls(phase, {
20394
+ onConfirm: () => {
20649
20395
  if (scan?.ok) onConfirm({ projectPath: resolvedPath, filePaths: scan.filePaths });
20650
- } else if (choice === "change-path") onChangePath();
20651
- else onBack();
20652
- };
20653
- return (
20654
- // keyed by phase: the menu changes length, so its focus starts over
20655
- /* @__PURE__ */ jsxs13(
20656
- MenuScreen,
20657
- {
20658
- title: "Scan",
20659
- dataTitle: "Scan result",
20660
- menu: MENUS[phase],
20661
- onChoose: choose,
20662
- onEscape: onBack,
20663
- children: [
20664
- scan === void 0 && /* @__PURE__ */ jsxs13(Text13, { color: PALETTE.muted, children: [
20665
- "Scanning ",
20666
- /* @__PURE__ */ jsx16(Text13, { bold: true, children: resolvedPath }),
20667
- "..."
20668
- ] }),
20669
- scan?.ok === false && /* @__PURE__ */ jsx16(Failure, { scan, path: resolvedPath }),
20670
- scan?.ok === true && /* @__PURE__ */ jsx16(Summary, { scan, path: resolvedPath, hasTokens })
20671
- ]
20672
- },
20673
- phase
20674
- )
20675
- );
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: [
20404
+ "Scanning ",
20405
+ /* @__PURE__ */ jsx13(Text12, { bold: true, children: resolvedPath }),
20406
+ "..."
20407
+ ] }),
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
+ ] });
20676
20413
  }
20677
- var BACK, MENUS;
20678
20414
  var init_screen4 = __esm({
20679
20415
  "packages/experience-design-system-cli/src/tui/import/steps/03-path-validation/screen.tsx"() {
20680
20416
  "use strict";
20681
20417
  init_theme();
20682
20418
  init_resolve_user_path();
20419
+ init_controls6();
20683
20420
  init_scan_files();
20684
20421
  init_logic7();
20685
- init_MenuScreen();
20686
- BACK = { choice: "back", label: "Back", description: "Go back" };
20687
- MENUS = {
20688
- scanning: [BACK],
20689
- ready: [{ choice: "continue", label: "Continue", description: "Use these files and go on" }, BACK],
20690
- failed: [{ choice: "change-path", label: "Try a different path", description: "Pick a different folder" }, BACK]
20691
- };
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();
20692
20607
  }
20693
20608
  });
20694
20609
 
@@ -20769,8 +20684,71 @@ var init_validate4 = __esm({
20769
20684
 
20770
20685
  // packages/experience-design-system-cli/src/tui/import/steps/04-credentials/screen.tsx
20771
20686
  import { useRef as useRef2, useState as useState9 } from "react";
20772
- import { Text as Text14 } from "ink";
20773
- import { Fragment as Fragment4, jsx as jsx17, jsxs as jsxs14 } from "react/jsx-runtime";
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
+ }
20774
20752
  function CredentialsScreen({
20775
20753
  onDone,
20776
20754
  onBack,
@@ -20809,47 +20787,18 @@ function CredentialsScreen({
20809
20787
  else if (choice === "edit") {
20810
20788
  setNotice(null);
20811
20789
  setEditing(true);
20812
- } else if (choice === "skip") onDone({ skipped: true });
20813
- else onBack();
20790
+ } else onBack();
20814
20791
  };
20815
20792
  if (!editing) {
20816
- return /* @__PURE__ */ jsxs14(
20817
- MenuScreen,
20818
- {
20819
- title: "Contentful Credentials",
20820
- subtitle,
20821
- menu: MENU2,
20822
- rows: FIELDS2.map((field) => ({
20823
- label: field.label,
20824
- value: field.masked ? "\u2022".repeat(values[field.key].length) : values[field.key]
20825
- })),
20826
- onChoose: choose,
20827
- onEscape: onBack,
20828
- busy: validating,
20829
- children: [
20830
- notice && /* @__PURE__ */ jsxs14(Fragment4, { children: [
20831
- /* @__PURE__ */ jsx17(Text14, { children: " " }),
20832
- /* @__PURE__ */ jsxs14(Text14, { color: PALETTE.error, children: [
20833
- "\u2717 ",
20834
- notice.text
20835
- ] })
20836
- ] }),
20837
- validating && /* @__PURE__ */ jsxs14(Fragment4, { children: [
20838
- /* @__PURE__ */ jsx17(Text14, { children: " " }),
20839
- /* @__PURE__ */ jsx17(Text14, { color: PALETTE.accent, children: "Validating credentials..." })
20840
- ] }),
20841
- !isUnchanged(normalize(values), initialValues) && /* @__PURE__ */ jsxs14(Fragment4, { children: [
20842
- /* @__PURE__ */ jsx17(Text14, { children: " " }),
20843
- /* @__PURE__ */ jsx17(Text14, { color: PALETTE.muted, children: "Changed values are saved after they validate." })
20844
- ] })
20845
- ]
20846
- }
20847
- );
20793
+ return /* @__PURE__ */ jsx15(CredentialsReview, { values, subtitle, notice, validating, onChoose: choose, children: !isUnchanged(normalize(values), initialValues) && /* @__PURE__ */ jsxs14(Fragment2, { children: [
20794
+ /* @__PURE__ */ jsx15(Text14, { children: " " }),
20795
+ /* @__PURE__ */ jsx15(Text14, { color: PALETTE.muted, children: "Changed values are saved after they validate." })
20796
+ ] }) });
20848
20797
  }
20849
20798
  return /* @__PURE__ */ jsxs14(
20850
20799
  FieldForm,
20851
20800
  {
20852
- header: /* @__PURE__ */ jsx17(StepHeader, { step: "setup" }),
20801
+ header: /* @__PURE__ */ jsx15(StepHeader, { step: "setup" }),
20853
20802
  title: "Contentful Credentials",
20854
20803
  subtitle,
20855
20804
  fields: FIELDS2,
@@ -20866,30 +20815,30 @@ function CredentialsScreen({
20866
20815
  notice,
20867
20816
  busy: validating,
20868
20817
  children: [
20869
- !prefilled && /* @__PURE__ */ jsxs14(Fragment4, { children: [
20870
- /* @__PURE__ */ jsx17(Text14, { children: " " }),
20871
- /* @__PURE__ */ jsx17(Text14, { color: PALETTE.muted, children: credentialsPurpose(tokensOnly) }),
20872
- /* @__PURE__ */ jsx17(Text14, { color: PALETTE.muted, children: "Tip: save these under Settings \u2192 Configuration so they pre-fill here." })
20818
+ !prefilled && /* @__PURE__ */ jsxs14(Fragment2, { children: [
20819
+ /* @__PURE__ */ jsx15(Text14, { children: " " }),
20820
+ /* @__PURE__ */ jsx15(Text14, { color: PALETTE.muted, children: credentialsPurpose(tokensOnly) }),
20821
+ /* @__PURE__ */ jsx15(Text14, { color: PALETTE.muted, children: "Tip: save these under Settings \u2192 Configuration so they pre-fill here." })
20873
20822
  ] }),
20874
- validating && /* @__PURE__ */ jsxs14(Fragment4, { children: [
20875
- /* @__PURE__ */ jsx17(Text14, { children: " " }),
20876
- /* @__PURE__ */ jsx17(Text14, { color: PALETTE.accent, children: "Validating credentials..." })
20823
+ validating && /* @__PURE__ */ jsxs14(Fragment2, { children: [
20824
+ /* @__PURE__ */ jsx15(Text14, { children: " " }),
20825
+ /* @__PURE__ */ jsx15(Text14, { color: PALETTE.accent, children: "Validating credentials..." })
20877
20826
  ] }),
20878
- !validating && !notice && !isUnchanged(normalize(values), initialValues) && /* @__PURE__ */ jsxs14(Fragment4, { children: [
20879
- /* @__PURE__ */ jsx17(Text14, { children: " " }),
20880
- /* @__PURE__ */ jsx17(Text14, { color: PALETTE.muted, children: "Changed values are saved after they validate." })
20827
+ !validating && !notice && !isUnchanged(normalize(values), initialValues) && /* @__PURE__ */ jsxs14(Fragment2, { children: [
20828
+ /* @__PURE__ */ jsx15(Text14, { children: " " }),
20829
+ /* @__PURE__ */ jsx15(Text14, { color: PALETTE.muted, children: "Changed values are saved after they validate." })
20881
20830
  ] })
20882
20831
  ]
20883
20832
  }
20884
20833
  );
20885
20834
  }
20886
- var FIELDS2, MENU2;
20835
+ var FIELDS2, MENU;
20887
20836
  var init_screen5 = __esm({
20888
20837
  "packages/experience-design-system-cli/src/tui/import/steps/04-credentials/screen.tsx"() {
20889
20838
  "use strict";
20890
20839
  init_theme();
20891
20840
  init_FieldForm();
20892
- init_MenuScreen();
20841
+ init_ControlHints();
20893
20842
  init_StepHeader();
20894
20843
  init_logic8();
20895
20844
  init_validate4();
@@ -20899,11 +20848,9 @@ var init_screen5 = __esm({
20899
20848
  { key: "cmaToken", label: "CMA Token", masked: true },
20900
20849
  { key: "host", label: "API Host", hint: "(default: api.contentful.com \xB7 EU spaces: api.eu.contentful.com)" }
20901
20850
  ];
20902
- MENU2 = [
20851
+ MENU = [
20903
20852
  { choice: "continue", label: "Continue", description: "Check the credentials and go on" },
20904
- { choice: "edit", label: "Edit", description: "Change the credentials" },
20905
- { choice: "skip", label: "Skip", description: "Save files only, nothing is pushed" },
20906
- { choice: "quit", label: "Quit", description: "Go back" }
20853
+ { choice: "edit", label: "Edit", description: "Change the credentials" }
20907
20854
  ];
20908
20855
  }
20909
20856
  });
@@ -20996,9 +20943,9 @@ var init_logic9 = __esm({
20996
20943
  });
20997
20944
 
20998
20945
  // packages/experience-design-system-cli/src/tui/import/steps/06-extraction/screen.tsx
20999
- import { jsx as jsx18 } from "react/jsx-runtime";
20946
+ import { jsx as jsx16 } from "react/jsx-runtime";
21000
20947
  function ExtractionScreen({ progress, agent }) {
21001
- return /* @__PURE__ */ jsx18(
20948
+ return /* @__PURE__ */ jsx16(
21002
20949
  RunningStep,
21003
20950
  {
21004
20951
  step: "extraction",
@@ -21514,8 +21461,8 @@ var init_columns = __esm({
21514
21461
  });
21515
21462
 
21516
21463
  // packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/windowed-panel.tsx
21517
- import { Box as Box14, Text as Text15 } from "ink";
21518
- import { jsx as jsx19, jsxs as jsxs15 } from "react/jsx-runtime";
21464
+ import { Box as Box15, Text as Text15 } from "ink";
21465
+ import { jsx as jsx17, jsxs as jsxs15 } from "react/jsx-runtime";
21519
21466
  function terminalPanelHeight(rows, reservedRows = 4) {
21520
21467
  return Math.max(MIN_TERMINAL_PANEL_HEIGHT, rows - reservedRows);
21521
21468
  }
@@ -21530,8 +21477,8 @@ function FixedPanel({
21530
21477
  clipOverflow = true,
21531
21478
  children
21532
21479
  }) {
21533
- return /* @__PURE__ */ jsx19(
21534
- Box14,
21480
+ return /* @__PURE__ */ jsx17(
21481
+ Box15,
21535
21482
  {
21536
21483
  flexDirection: "column",
21537
21484
  width,
@@ -21556,7 +21503,7 @@ function WindowedPanel({ width, height, title, focused, children }) {
21556
21503
  ...height === void 0 ? {} : { height },
21557
21504
  focused,
21558
21505
  children: [
21559
- title && /* @__PURE__ */ jsx19(WindowedPanelHeader, { title, width, focused }),
21506
+ title && /* @__PURE__ */ jsx17(WindowedPanelHeader, { title, width, focused }),
21560
21507
  children
21561
21508
  ]
21562
21509
  }
@@ -21567,9 +21514,9 @@ function WindowedPanelHeader({
21567
21514
  width,
21568
21515
  focused
21569
21516
  }) {
21570
- return /* @__PURE__ */ jsxs15(Box14, { flexDirection: "column", children: [
21571
- /* @__PURE__ */ jsx19(Text15, { bold: true, color: PALETTE.accent, inverse: focused, children: title }),
21572
- /* @__PURE__ */ jsx19(Text15, { color: PALETTE.muted, children: "\u2500".repeat(Math.max(0, width - 2)) })
21517
+ return /* @__PURE__ */ jsxs15(Box15, { flexDirection: "column", children: [
21518
+ /* @__PURE__ */ jsx17(Text15, { bold: true, color: PALETTE.accent, inverse: focused, children: title }),
21519
+ /* @__PURE__ */ jsx17(Text15, { color: PALETTE.muted, children: "\u2500".repeat(Math.max(0, width - 2)) })
21573
21520
  ] });
21574
21521
  }
21575
21522
  function formatWindowIndicator(direction, count) {
@@ -21578,10 +21525,10 @@ function formatWindowIndicator(direction, count) {
21578
21525
  }
21579
21526
  function WindowFooter({ above, below }) {
21580
21527
  const parts = [above > 0 ? `\u2191 ${above}` : "", below > 0 ? `\u2193 ${below}` : ""].filter(Boolean);
21581
- return /* @__PURE__ */ jsx19(Text15, { color: PALETTE.muted, children: parts.length === 0 ? " " : `${parts.join(" \xB7 ")} more` });
21528
+ return /* @__PURE__ */ jsx17(Text15, { color: PALETTE.muted, children: parts.length === 0 ? " " : `${parts.join(" \xB7 ")} more` });
21582
21529
  }
21583
21530
  function WindowIndicator({ direction, count }) {
21584
- return /* @__PURE__ */ jsx19(Text15, { color: PALETTE.muted, children: formatWindowIndicator(direction, count) });
21531
+ return /* @__PURE__ */ jsx17(Text15, { color: PALETTE.muted, children: formatWindowIndicator(direction, count) });
21585
21532
  }
21586
21533
  var MIN_TERMINAL_PANEL_HEIGHT;
21587
21534
  var init_windowed_panel = __esm({
@@ -21594,17 +21541,17 @@ var init_windowed_panel = __esm({
21594
21541
 
21595
21542
  // packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/panels/added-column.tsx
21596
21543
  import React10 from "react";
21597
- import { Box as Box15, Text as Text16 } from "ink";
21544
+ import { Box as Box16, Text as Text16 } from "ink";
21598
21545
  import figures2 from "figures";
21599
- import { jsx as jsx20, jsxs as jsxs16 } from "react/jsx-runtime";
21546
+ import { jsx as jsx18, jsxs as jsxs16 } from "react/jsx-runtime";
21600
21547
  function AddedColumn(props) {
21601
21548
  const { title, width, height, entries, cursor, focused, aiFlaggedByKey, visibleCount } = props;
21602
21549
  const reserveAiBadge = entries.some((e) => aiFlaggedByKey?.get(e.name) === true);
21603
21550
  const firstNonCycleIdx = entries.findIndex((e) => !e.isCycle);
21604
21551
  const window = computeColumnWindow(entries.length, cursor, Math.max(1, visibleCount));
21605
21552
  return /* @__PURE__ */ jsxs16(WindowedPanel, { width, height, title, focused, children: [
21606
- /* @__PURE__ */ jsx20(WindowIndicator, { direction: "up", count: window.above }),
21607
- entries.length === 0 ? /* @__PURE__ */ jsx20(Text16, { color: PALETTE.muted, children: "(none)" }) : entries.slice(window.start, window.end).map((entry, vi) => {
21553
+ /* @__PURE__ */ jsx18(WindowIndicator, { direction: "up", count: window.above }),
21554
+ entries.length === 0 ? /* @__PURE__ */ jsx18(Text16, { color: PALETTE.muted, children: "(none)" }) : entries.slice(window.start, window.end).map((entry, vi) => {
21608
21555
  const i = window.start + vi;
21609
21556
  const isSelected = i === cursor;
21610
21557
  const isCursor = focused && isSelected;
@@ -21612,12 +21559,12 @@ function AddedColumn(props) {
21612
21559
  const showSeparator = firstNonCycleIdx > 0 && i === firstNonCycleIdx;
21613
21560
  const style = sideColumnLabelStyle({ isCycle: entry.isCycle, isSelected, focused });
21614
21561
  return /* @__PURE__ */ jsxs16(React10.Fragment, { children: [
21615
- showSeparator && /* @__PURE__ */ jsx20(Text16, { color: PALETTE.muted, children: "\u2500".repeat(Math.max(0, width - 2)) }),
21616
- /* @__PURE__ */ jsxs16(Box15, { children: [
21617
- isCursor ? /* @__PURE__ */ jsx20(Text16, { color: PALETTE.accent, bold: true, children: figures2.pointer }) : /* @__PURE__ */ jsx20(Text16, { children: " " }),
21618
- reserveAiBadge && (aiFlagged ? /* @__PURE__ */ jsx20(Text16, { color: PALETTE.warning, bold: true, children: " [\xD7]" }) : /* @__PURE__ */ jsx20(Text16, { children: " " })),
21619
- entry.isCycle && /* @__PURE__ */ jsx20(Text16, { color: isCursor ? PALETTE.accent : PALETTE.warning, bold: true, underline: style.nameUnderline, children: " \u26A0" }),
21620
- /* @__PURE__ */ jsx20(
21562
+ showSeparator && /* @__PURE__ */ jsx18(Text16, { color: PALETTE.muted, children: "\u2500".repeat(Math.max(0, width - 2)) }),
21563
+ /* @__PURE__ */ jsxs16(Box16, { children: [
21564
+ isCursor ? /* @__PURE__ */ jsx18(Text16, { color: PALETTE.accent, bold: true, children: figures2.pointer }) : /* @__PURE__ */ jsx18(Text16, { children: " " }),
21565
+ reserveAiBadge && (aiFlagged ? /* @__PURE__ */ jsx18(Text16, { color: PALETTE.warning, bold: true, children: " [\xD7]" }) : /* @__PURE__ */ jsx18(Text16, { children: " " })),
21566
+ entry.isCycle && /* @__PURE__ */ jsx18(Text16, { color: isCursor ? PALETTE.accent : PALETTE.warning, bold: true, underline: style.nameUnderline, children: " \u26A0" }),
21567
+ /* @__PURE__ */ jsx18(
21621
21568
  Text16,
21622
21569
  {
21623
21570
  color: style.nameColor,
@@ -21631,7 +21578,7 @@ function AddedColumn(props) {
21631
21578
  ] })
21632
21579
  ] }, entry.name);
21633
21580
  }),
21634
- /* @__PURE__ */ jsx20(WindowIndicator, { direction: "down", count: window.below })
21581
+ /* @__PURE__ */ jsx18(WindowIndicator, { direction: "down", count: window.below })
21635
21582
  ] });
21636
21583
  }
21637
21584
  var init_added_column = __esm({
@@ -21644,9 +21591,9 @@ var init_added_column = __esm({
21644
21591
  });
21645
21592
 
21646
21593
  // packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/panels/cycles-panel.tsx
21647
- import { Box as Box16, Text as Text17 } from "ink";
21594
+ import { Box as Box17, Text as Text17 } from "ink";
21648
21595
  import figures3 from "figures";
21649
- import { jsx as jsx21, jsxs as jsxs17 } from "react/jsx-runtime";
21596
+ import { jsx as jsx19, jsxs as jsxs17 } from "react/jsx-runtime";
21650
21597
  function cycleLabel(cycle, index) {
21651
21598
  const parts = [];
21652
21599
  for (let i = 0; i < cycle.edges.length; i++) {
@@ -21657,17 +21604,17 @@ function cycleLabel(cycle, index) {
21657
21604
  return `Cycle ${index + 1}: ${parts.join(" \u2192 ")}`;
21658
21605
  }
21659
21606
  function CyclesPanel({ cycles, cursor }) {
21660
- return /* @__PURE__ */ jsxs17(Box16, { flexDirection: "column", borderStyle: "single", borderColor: PALETTE.warning, paddingX: 1, marginTop: 1, children: [
21661
- /* @__PURE__ */ jsx21(Text17, { bold: true, color: PALETTE.warning, children: `Cycles detected (${cycles.length}):` }),
21662
- /* @__PURE__ */ jsx21(Text17, { children: " " }),
21607
+ return /* @__PURE__ */ jsxs17(Box17, { flexDirection: "column", borderStyle: "single", borderColor: PALETTE.warning, paddingX: 1, marginTop: 1, children: [
21608
+ /* @__PURE__ */ jsx19(Text17, { bold: true, color: PALETTE.warning, children: `Cycles detected (${cycles.length}):` }),
21609
+ /* @__PURE__ */ jsx19(Text17, { children: " " }),
21663
21610
  cycles.map((cycle, i) => {
21664
21611
  const isCursor = i === cursor;
21665
21612
  return /* @__PURE__ */ jsxs17(Text17, { children: [
21666
- isCursor ? /* @__PURE__ */ jsx21(Text17, { color: PALETTE.accent, bold: true, children: figures3.pointer }) : /* @__PURE__ */ jsx21(Text17, { children: " " }),
21667
- /* @__PURE__ */ jsx21(Text17, { color: PALETTE.warning, inverse: isCursor, children: " " + cycleLabel(cycle, i) })
21613
+ isCursor ? /* @__PURE__ */ jsx19(Text17, { color: PALETTE.accent, bold: true, children: figures3.pointer }) : /* @__PURE__ */ jsx19(Text17, { children: " " }),
21614
+ /* @__PURE__ */ jsx19(Text17, { color: PALETTE.warning, inverse: isCursor, children: " " + cycleLabel(cycle, i) })
21668
21615
  ] }, i);
21669
21616
  }),
21670
- /* @__PURE__ */ jsx21(Text17, { children: "[\u2191/\u2193] move \xB7 [Enter] jump \xB7 [c/Esc] close" })
21617
+ /* @__PURE__ */ jsx19(Text17, { children: "[\u2191/\u2193] move \xB7 [Enter] jump \xB7 [c/Esc] close" })
21671
21618
  ] });
21672
21619
  }
21673
21620
  var init_cycles_panel = __esm({
@@ -21678,14 +21625,14 @@ var init_cycles_panel = __esm({
21678
21625
  });
21679
21626
 
21680
21627
  // packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/panels/reject-prompt.tsx
21681
- import { Box as Box17, Text as Text18 } from "ink";
21682
- import { jsx as jsx22, jsxs as jsxs18 } from "react/jsx-runtime";
21628
+ import { Box as Box18, Text as Text18 } from "ink";
21629
+ import { jsx as jsx20, jsxs as jsxs18 } from "react/jsx-runtime";
21683
21630
  function RejectPrompt({ pending }) {
21684
- return /* @__PURE__ */ jsxs18(Box17, { flexDirection: "column", borderStyle: "single", borderColor: PALETTE.warning, paddingX: 1, marginTop: 1, children: [
21685
- /* @__PURE__ */ jsx22(Text18, { bold: true, color: PALETTE.warning, children: `Rejecting ${pending.target} will:` }),
21686
- pending.ancestors.length > 0 && /* @__PURE__ */ jsx22(Text18, { children: `- Reject ancestors: ${pending.ancestors.join(", ")}` }),
21687
- pending.descendants.length > 0 && /* @__PURE__ */ jsx22(Text18, { children: `- Deselect descendants: ${pending.descendants.join(", ")}` }),
21688
- /* @__PURE__ */ jsx22(Text18, { children: "[y] confirm \xB7 [n]/[Esc] cancel" })
21631
+ return /* @__PURE__ */ jsxs18(Box18, { flexDirection: "column", borderStyle: "single", borderColor: PALETTE.warning, paddingX: 1, marginTop: 1, children: [
21632
+ /* @__PURE__ */ jsx20(Text18, { bold: true, color: PALETTE.warning, children: `Rejecting ${pending.target} will:` }),
21633
+ pending.ancestors.length > 0 && /* @__PURE__ */ jsx20(Text18, { children: `- Reject ancestors: ${pending.ancestors.join(", ")}` }),
21634
+ pending.descendants.length > 0 && /* @__PURE__ */ jsx20(Text18, { children: `- Deselect descendants: ${pending.descendants.join(", ")}` }),
21635
+ /* @__PURE__ */ jsx20(Text18, { children: "[y] confirm \xB7 [n]/[Esc] cancel" })
21689
21636
  ] });
21690
21637
  }
21691
21638
  var init_reject_prompt = __esm({
@@ -21696,9 +21643,9 @@ var init_reject_prompt = __esm({
21696
21643
  });
21697
21644
 
21698
21645
  // packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/CompactControlBar.tsx
21699
- import { jsx as jsx23 } from "react/jsx-runtime";
21646
+ import { jsx as jsx21 } from "react/jsx-runtime";
21700
21647
  function CompactControlBar({ hasGroupRoots, searchActive }) {
21701
- return /* @__PURE__ */ jsx23(
21648
+ return /* @__PURE__ */ jsx21(
21702
21649
  ControlHints,
21703
21650
  {
21704
21651
  hints: [
@@ -21721,8 +21668,8 @@ var init_CompactControlBar = __esm({
21721
21668
  });
21722
21669
 
21723
21670
  // packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/CounterStrip.tsx
21724
- import { Box as Box18, Text as Text19 } from "ink";
21725
- import { jsx as jsx24, jsxs as jsxs19 } from "react/jsx-runtime";
21671
+ import { Box as Box19, Text as Text19 } from "ink";
21672
+ import { jsx as jsx22, jsxs as jsxs19 } from "react/jsx-runtime";
21726
21673
  function CounterStrip(props) {
21727
21674
  const { counters, totalWidth } = props;
21728
21675
  const condensed = totalWidth < 60;
@@ -21730,25 +21677,25 @@ function CounterStrip(props) {
21730
21677
  const labelRej = condensed ? "Rej" : "Rejected";
21731
21678
  const labelUnd = condensed ? "Und" : "Undecided";
21732
21679
  const sep = condensed ? " | " : " ";
21733
- return /* @__PURE__ */ jsx24(Box18, { children: /* @__PURE__ */ jsxs19(Text19, { children: [
21680
+ return /* @__PURE__ */ jsx22(Box19, { children: /* @__PURE__ */ jsxs19(Text19, { children: [
21734
21681
  /* @__PURE__ */ jsxs19(Text19, { color: PALETTE.muted, children: [
21735
21682
  labelGrp,
21736
21683
  " "
21737
21684
  ] }),
21738
- /* @__PURE__ */ jsx24(Text19, { bold: true, children: counters.groups }),
21739
- /* @__PURE__ */ jsx24(Text19, { color: PALETTE.muted, children: sep }),
21685
+ /* @__PURE__ */ jsx22(Text19, { bold: true, children: counters.groups }),
21686
+ /* @__PURE__ */ jsx22(Text19, { color: PALETTE.muted, children: sep }),
21740
21687
  /* @__PURE__ */ jsxs19(Text19, { color: PALETTE.muted, children: [
21741
21688
  labelRej,
21742
21689
  " "
21743
21690
  ] }),
21744
- /* @__PURE__ */ jsx24(Text19, { bold: true, children: counters.rejected }),
21745
- /* @__PURE__ */ jsx24(Text19, { color: PALETTE.muted, children: sep }),
21691
+ /* @__PURE__ */ jsx22(Text19, { bold: true, children: counters.rejected }),
21692
+ /* @__PURE__ */ jsx22(Text19, { color: PALETTE.muted, children: sep }),
21746
21693
  /* @__PURE__ */ jsxs19(Text19, { color: PALETTE.muted, children: [
21747
21694
  labelUnd,
21748
21695
  " "
21749
21696
  ] }),
21750
- /* @__PURE__ */ jsx24(Text19, { bold: true, children: counters.undecided }),
21751
- /* @__PURE__ */ jsx24(Text19, { color: PALETTE.muted, children: sep })
21697
+ /* @__PURE__ */ jsx22(Text19, { bold: true, children: counters.undecided }),
21698
+ /* @__PURE__ */ jsx22(Text19, { color: PALETTE.muted, children: sep })
21752
21699
  ] }) });
21753
21700
  }
21754
21701
  var init_CounterStrip = __esm({
@@ -21760,8 +21707,8 @@ var init_CounterStrip = __esm({
21760
21707
 
21761
21708
  // packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/GotoBanner.tsx
21762
21709
  import figures4 from "figures";
21763
- import { Box as Box19, Text as Text20 } from "ink";
21764
- import { jsx as jsx25, jsxs as jsxs20 } from "react/jsx-runtime";
21710
+ import { Box as Box20, Text as Text20 } from "ink";
21711
+ import { jsx as jsx23, jsxs as jsxs20 } from "react/jsx-runtime";
21765
21712
  function windowStart(rowCount, highlightIndex, maxRows) {
21766
21713
  if (rowCount <= maxRows) return 0;
21767
21714
  const maxStart = rowCount - maxRows;
@@ -21772,8 +21719,8 @@ function windowStart(rowCount, highlightIndex, maxRows) {
21772
21719
  }
21773
21720
  function defaultRenderRow(row, index, isCursor) {
21774
21721
  return /* @__PURE__ */ jsxs20(Text20, { children: [
21775
- isCursor ? /* @__PURE__ */ jsx25(Text20, { color: PALETTE.accent, bold: true, children: figures4.pointer }) : /* @__PURE__ */ jsx25(Text20, { children: " " }),
21776
- /* @__PURE__ */ jsx25(Text20, { inverse: isCursor, children: " " + row.label })
21722
+ isCursor ? /* @__PURE__ */ jsx23(Text20, { color: PALETTE.accent, bold: true, children: figures4.pointer }) : /* @__PURE__ */ jsx23(Text20, { children: " " }),
21723
+ /* @__PURE__ */ jsx23(Text20, { inverse: isCursor, children: " " + row.label })
21777
21724
  ] }, index);
21778
21725
  }
21779
21726
  function GotoBanner({
@@ -21793,7 +21740,7 @@ function GotoBanner({
21793
21740
  const moreAbove = start;
21794
21741
  const moreBelow = rows.length - end;
21795
21742
  return /* @__PURE__ */ jsxs20(
21796
- Box19,
21743
+ Box20,
21797
21744
  {
21798
21745
  flexDirection: "column",
21799
21746
  borderStyle: "single",
@@ -21803,14 +21750,14 @@ function GotoBanner({
21803
21750
  width,
21804
21751
  flexShrink: 0,
21805
21752
  children: [
21806
- /* @__PURE__ */ jsx25(Text20, { bold: true, children: title }),
21807
- moreAbove > 0 && /* @__PURE__ */ jsx25(Text20, { color: PALETTE.muted, children: ` \u25B2 ${moreAbove} more` }),
21753
+ /* @__PURE__ */ jsx23(Text20, { bold: true, children: title }),
21754
+ moreAbove > 0 && /* @__PURE__ */ jsx23(Text20, { color: PALETTE.muted, children: ` \u25B2 ${moreAbove} more` }),
21808
21755
  visible.map((row, vi) => {
21809
21756
  const i = start + vi;
21810
21757
  return renderRow(row, i, i === highlightIndex);
21811
21758
  }),
21812
- moreBelow > 0 && /* @__PURE__ */ jsx25(Text20, { color: PALETTE.muted, children: ` \u25BC ${moreBelow} more` }),
21813
- footerHint !== void 0 && /* @__PURE__ */ jsx25(Text20, { color: PALETTE.muted, children: footerHint })
21759
+ moreBelow > 0 && /* @__PURE__ */ jsx23(Text20, { color: PALETTE.muted, children: ` \u25BC ${moreBelow} more` }),
21760
+ footerHint !== void 0 && /* @__PURE__ */ jsx23(Text20, { color: PALETTE.muted, children: footerHint })
21814
21761
  ]
21815
21762
  }
21816
21763
  );
@@ -22174,7 +22121,7 @@ var init_composite_closure = __esm({
22174
22121
 
22175
22122
  // packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/badge.tsx
22176
22123
  import { Text as Text21 } from "ink";
22177
- import { jsx as jsx26 } from "react/jsx-runtime";
22124
+ import { jsx as jsx24 } from "react/jsx-runtime";
22178
22125
  function previewBadge(annotation) {
22179
22126
  switch (annotation) {
22180
22127
  case "new":
@@ -22193,7 +22140,7 @@ function PreviewBadge({
22193
22140
  badge,
22194
22141
  highlighted = false
22195
22142
  }) {
22196
- return badge ? /* @__PURE__ */ jsx26(Text21, { color: !highlighted && badge.dim ? PALETTE.muted : badge.color, bold: badge.bold, children: badge.char }) : /* @__PURE__ */ jsx26(Text21, { children: " " });
22143
+ return badge ? /* @__PURE__ */ jsx24(Text21, { color: !highlighted && badge.dim ? PALETTE.muted : badge.color, bold: badge.bold, children: badge.char }) : /* @__PURE__ */ jsx24(Text21, { children: " " });
22197
22144
  }
22198
22145
  var init_badge = __esm({
22199
22146
  "packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/badge.tsx"() {
@@ -22204,8 +22151,8 @@ var init_badge = __esm({
22204
22151
 
22205
22152
  // packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/GroupedSidebar.tsx
22206
22153
  import figures5 from "figures";
22207
- import { Box as Box20, Text as Text22 } from "ink";
22208
- import { jsx as jsx27, jsxs as jsxs21 } from "react/jsx-runtime";
22154
+ import { Box as Box21, Text as Text22 } from "ink";
22155
+ import { jsx as jsx25, jsxs as jsxs21 } from "react/jsx-runtime";
22209
22156
  function hasDirectChild(node) {
22210
22157
  return node.slots.some((slot) => (slot.allowedComponents ?? []).some((target) => target !== node.name));
22211
22158
  }
@@ -22655,11 +22602,11 @@ function GroupedSidebar(props) {
22655
22602
  isOwn: rs?.isOwn ?? false,
22656
22603
  isCursor
22657
22604
  });
22658
- return /* @__PURE__ */ jsxs21(Box20, { children: [
22659
- isCursor ? /* @__PURE__ */ jsx27(Text22, { color: PALETTE.accent, bold: true, children: figures5.pointer }) : /* @__PURE__ */ jsx27(Text22, { children: " " }),
22660
- /* @__PURE__ */ jsx27(PreviewBadge, { badge, highlighted: isSelected }),
22661
- selectionStateByKey !== void 0 && (selGlyph && !isSynthetic ? /* @__PURE__ */ jsx27(Text22, { color: !isSelected && selDim ? PALETTE.muted : selColor, bold: selBold, children: " " + selGlyph }) : /* @__PURE__ */ jsx27(Text22, { children: " " })),
22662
- aiFlaggedByKey !== void 0 && (aiFlagged ? /* @__PURE__ */ jsx27(Text22, { color: PALETTE.warning, bold: true, children: " [\xD7]" }) : /* @__PURE__ */ jsx27(Text22, { children: " " })),
22605
+ return /* @__PURE__ */ jsxs21(Box21, { children: [
22606
+ isCursor ? /* @__PURE__ */ jsx25(Text22, { color: PALETTE.accent, bold: true, children: figures5.pointer }) : /* @__PURE__ */ jsx25(Text22, { children: " " }),
22607
+ /* @__PURE__ */ jsx25(PreviewBadge, { badge, highlighted: isSelected }),
22608
+ selectionStateByKey !== void 0 && (selGlyph && !isSynthetic ? /* @__PURE__ */ jsx25(Text22, { color: !isSelected && selDim ? PALETTE.muted : selColor, bold: selBold, children: " " + selGlyph }) : /* @__PURE__ */ jsx25(Text22, { children: " " })),
22609
+ aiFlaggedByKey !== void 0 && (aiFlagged ? /* @__PURE__ */ jsx25(Text22, { color: PALETTE.warning, bold: true, children: " [\xD7]" }) : /* @__PURE__ */ jsx25(Text22, { children: " " })),
22663
22610
  /* @__PURE__ */ jsxs21(
22664
22611
  Text22,
22665
22612
  {
@@ -22674,10 +22621,10 @@ function GroupedSidebar(props) {
22674
22621
  ]
22675
22622
  }
22676
22623
  ),
22677
- inheritanceStyle.glyph && /* @__PURE__ */ jsx27(Text22, { color: inheritanceStyle.dim ? PALETTE.muted : inheritanceStyle.color, bold: inheritanceStyle.bold, children: " " + inheritanceStyle.glyph })
22624
+ inheritanceStyle.glyph && /* @__PURE__ */ jsx25(Text22, { color: inheritanceStyle.dim ? PALETTE.muted : inheritanceStyle.color, bold: inheritanceStyle.bold, children: " " + inheritanceStyle.glyph })
22678
22625
  ] }, row.key);
22679
22626
  }),
22680
- windowed && /* @__PURE__ */ jsx27(WindowFooter, { above: start, below: Math.max(0, allRows.length - end) })
22627
+ windowed && /* @__PURE__ */ jsx25(WindowFooter, { above: start, below: Math.max(0, allRows.length - end) })
22681
22628
  ] });
22682
22629
  }
22683
22630
  var GLYPH_EXPAND_COLLAPSED, GLYPH_EXPAND_EXPANDED, GLYPH_TREE_MID, GLYPH_TREE_LAST, GLYPH_WARN, GLYPH_ERROR;
@@ -22806,8 +22753,8 @@ var init_use_terminal_size = __esm({
22806
22753
 
22807
22754
  // packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/HelpOverlay.tsx
22808
22755
  import React11 from "react";
22809
- import { Box as Box21, Text as Text23 } from "ink";
22810
- import { Fragment as Fragment5, jsx as jsx28, jsxs as jsxs22 } from "react/jsx-runtime";
22756
+ import { Box as Box22, Text as Text23 } from "ink";
22757
+ import { Fragment as Fragment3, jsx as jsx26, jsxs as jsxs22 } from "react/jsx-runtime";
22811
22758
  function HelpOverlay(props) {
22812
22759
  const { onClose } = props;
22813
22760
  const { columns: terminalColumns, rows: terminalRows } = useTerminalSize();
@@ -22819,7 +22766,7 @@ function HelpOverlay(props) {
22819
22766
  }, props.handleInput !== false);
22820
22767
  if (props.sections) {
22821
22768
  return /* @__PURE__ */ jsxs22(
22822
- Box21,
22769
+ Box22,
22823
22770
  {
22824
22771
  flexDirection: "column",
22825
22772
  borderStyle: "round",
@@ -22828,11 +22775,11 @@ function HelpOverlay(props) {
22828
22775
  height: panelHeight,
22829
22776
  overflowY: "hidden",
22830
22777
  children: [
22831
- /* @__PURE__ */ jsx28(Text23, { bold: true, children: "\u2500".repeat(titleRule) + " Help " + "\u2500".repeat(titleRule) }),
22778
+ /* @__PURE__ */ jsx26(Text23, { bold: true, children: "\u2500".repeat(titleRule) + " Help " + "\u2500".repeat(titleRule) }),
22832
22779
  props.sections.map((section) => /* @__PURE__ */ jsxs22(React11.Fragment, { children: [
22833
- /* @__PURE__ */ jsx28(Text23, { children: " " }),
22834
- /* @__PURE__ */ jsx28(Text23, { bold: true, children: section.title }),
22835
- section.entries.map((entry) => /* @__PURE__ */ jsx28(Text23, { children: entry.keys ? " " + entry.keys.padEnd(16) + " " + entry.label : " " + entry.label }, entry.keys + entry.label))
22780
+ /* @__PURE__ */ jsx26(Text23, { children: " " }),
22781
+ /* @__PURE__ */ jsx26(Text23, { bold: true, children: section.title }),
22782
+ section.entries.map((entry) => /* @__PURE__ */ jsx26(Text23, { children: entry.keys ? " " + entry.keys.padEnd(16) + " " + entry.label : " " + entry.label }, entry.keys + entry.label))
22836
22783
  ] }, section.title))
22837
22784
  ]
22838
22785
  }
@@ -22840,7 +22787,7 @@ function HelpOverlay(props) {
22840
22787
  }
22841
22788
  const mode = props.mode;
22842
22789
  return /* @__PURE__ */ jsxs22(
22843
- Box21,
22790
+ Box22,
22844
22791
  {
22845
22792
  flexDirection: "column",
22846
22793
  borderStyle: "round",
@@ -22849,31 +22796,31 @@ function HelpOverlay(props) {
22849
22796
  height: panelHeight,
22850
22797
  overflowY: "hidden",
22851
22798
  children: [
22852
- /* @__PURE__ */ jsx28(Text23, { bold: true, children: "\u2500".repeat(titleRule) + " Help " + "\u2500".repeat(titleRule) }),
22853
- /* @__PURE__ */ jsx28(Text23, { children: " " }),
22854
- /* @__PURE__ */ jsx28(Text23, { bold: true, children: "Navigation" }),
22855
- /* @__PURE__ */ jsx28(Text23, { children: " \u2191 / k / PgUp Scroll up" }),
22856
- /* @__PURE__ */ jsx28(Text23, { children: " \u2193 / j / PgDn Scroll down" }),
22857
- /* @__PURE__ */ jsx28(Text23, { children: " g / Home Jump to top" }),
22858
- /* @__PURE__ */ jsx28(Text23, { children: " G / End Jump to bottom" }),
22859
- mode === "review" && /* @__PURE__ */ jsxs22(Fragment5, { children: [
22860
- /* @__PURE__ */ jsx28(Text23, { children: " " }),
22861
- /* @__PURE__ */ jsx28(Text23, { bold: true, children: "[Review mode only]" }),
22862
- /* @__PURE__ */ jsx28(Text23, { children: " Tab Toggle sidebar/detail" }),
22863
- /* @__PURE__ */ jsx28(Text23, { children: " a Accept component" }),
22864
- /* @__PURE__ */ jsx28(Text23, { children: " r Reject component" }),
22865
- /* @__PURE__ */ jsx28(Text23, { children: " e Edit proposal" }),
22866
- /* @__PURE__ */ jsx28(Text23, { children: " s Toggle source code" }),
22867
- /* @__PURE__ */ jsx28(Text23, { children: " A Approve all" }),
22868
- /* @__PURE__ */ jsx28(Text23, { children: " F Open finalize dialog" }),
22869
- /* @__PURE__ */ jsx28(Text23, { children: " Ctrl+S Save draft" }),
22870
- /* @__PURE__ */ jsx28(Text23, { children: " Ctrl+Z Undo" }),
22871
- /* @__PURE__ */ jsx28(Text23, { children: " Ctrl+Y Redo" }),
22872
- /* @__PURE__ */ jsx28(Text23, { children: " Esc Exit edit / close" })
22799
+ /* @__PURE__ */ jsx26(Text23, { bold: true, children: "\u2500".repeat(titleRule) + " Help " + "\u2500".repeat(titleRule) }),
22800
+ /* @__PURE__ */ jsx26(Text23, { children: " " }),
22801
+ /* @__PURE__ */ jsx26(Text23, { bold: true, children: "Navigation" }),
22802
+ /* @__PURE__ */ jsx26(Text23, { children: " \u2191 / k / PgUp Scroll up" }),
22803
+ /* @__PURE__ */ jsx26(Text23, { children: " \u2193 / j / PgDn Scroll down" }),
22804
+ /* @__PURE__ */ jsx26(Text23, { children: " g / Home Jump to top" }),
22805
+ /* @__PURE__ */ jsx26(Text23, { children: " G / End Jump to bottom" }),
22806
+ mode === "review" && /* @__PURE__ */ jsxs22(Fragment3, { children: [
22807
+ /* @__PURE__ */ jsx26(Text23, { children: " " }),
22808
+ /* @__PURE__ */ jsx26(Text23, { bold: true, children: "[Review mode only]" }),
22809
+ /* @__PURE__ */ jsx26(Text23, { children: " Tab Toggle sidebar/detail" }),
22810
+ /* @__PURE__ */ jsx26(Text23, { children: " a Accept component" }),
22811
+ /* @__PURE__ */ jsx26(Text23, { children: " r Reject component" }),
22812
+ /* @__PURE__ */ jsx26(Text23, { children: " e Edit proposal" }),
22813
+ /* @__PURE__ */ jsx26(Text23, { children: " s Toggle source code" }),
22814
+ /* @__PURE__ */ jsx26(Text23, { children: " A Approve all" }),
22815
+ /* @__PURE__ */ jsx26(Text23, { children: " F Open finalize dialog" }),
22816
+ /* @__PURE__ */ jsx26(Text23, { children: " Ctrl+S Save draft" }),
22817
+ /* @__PURE__ */ jsx26(Text23, { children: " Ctrl+Z Undo" }),
22818
+ /* @__PURE__ */ jsx26(Text23, { children: " Ctrl+Y Redo" }),
22819
+ /* @__PURE__ */ jsx26(Text23, { children: " Esc Exit edit / close" })
22873
22820
  ] }),
22874
- /* @__PURE__ */ jsx28(Text23, { children: " " }),
22875
- /* @__PURE__ */ jsx28(Text23, { children: " h Close help" }),
22876
- /* @__PURE__ */ jsx28(Text23, { children: " q Quit" })
22821
+ /* @__PURE__ */ jsx26(Text23, { children: " " }),
22822
+ /* @__PURE__ */ jsx26(Text23, { children: " h Close help" }),
22823
+ /* @__PURE__ */ jsx26(Text23, { children: " q Quit" })
22877
22824
  ]
22878
22825
  }
22879
22826
  );
@@ -22953,8 +22900,8 @@ var init_sidebar_input = __esm({
22953
22900
  });
22954
22901
 
22955
22902
  // packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/SearchMatchSummary.tsx
22956
- import { Box as Box22, Text as Text24 } from "ink";
22957
- import { Fragment as Fragment6, jsx as jsx29, jsxs as jsxs23 } from "react/jsx-runtime";
22903
+ import { Box as Box23, Text as Text24 } from "ink";
22904
+ import { Fragment as Fragment4, jsx as jsx27, jsxs as jsxs23 } from "react/jsx-runtime";
22958
22905
  function SearchMatchSummary({
22959
22906
  open,
22960
22907
  query,
@@ -22965,17 +22912,17 @@ function SearchMatchSummary({
22965
22912
  marginTop
22966
22913
  }) {
22967
22914
  if (hidden) return null;
22968
- return /* @__PURE__ */ jsxs23(Fragment6, { children: [
22969
- open && /* @__PURE__ */ jsxs23(Box22, { marginTop, flexDirection: "column", children: [
22915
+ return /* @__PURE__ */ jsxs23(Fragment4, { children: [
22916
+ open && /* @__PURE__ */ jsxs23(Box23, { marginTop, flexDirection: "column", children: [
22970
22917
  /* @__PURE__ */ jsxs23(Text24, { children: [
22971
22918
  `/${query}`,
22972
- /* @__PURE__ */ jsx29(Text24, { color: PALETTE.accent, children: "\u258E" }),
22973
- query && /* @__PURE__ */ jsx29(Text24, { color: PALETTE.muted, children: formatSearchMatchSummary(matches, total) }),
22974
- /* @__PURE__ */ jsx29(Text24, { children: " \xB7 [Esc] leave" })
22919
+ /* @__PURE__ */ jsx27(Text24, { color: PALETTE.accent, children: "\u258E" }),
22920
+ query && /* @__PURE__ */ jsx27(Text24, { color: PALETTE.muted, children: formatSearchMatchSummary(matches, total) }),
22921
+ /* @__PURE__ */ jsx27(Text24, { children: " \xB7 [Esc] leave" })
22975
22922
  ] }),
22976
- autocompleteCandidates.length > 1 && /* @__PURE__ */ jsx29(Text24, { color: PALETTE.muted, children: ` possibilities: ${autocompleteCandidates.join(" \xB7 ").slice(0, 120)}` })
22923
+ autocompleteCandidates.length > 1 && /* @__PURE__ */ jsx27(Text24, { color: PALETTE.muted, children: ` possibilities: ${autocompleteCandidates.join(" \xB7 ").slice(0, 120)}` })
22977
22924
  ] }),
22978
- !open && query && /* @__PURE__ */ jsx29(Box22, { marginTop, children: /* @__PURE__ */ jsx29(Text24, { children: `/${query}${formatSearchMatchSummary(matches, total)} \xB7 [Esc] clear` }) })
22925
+ !open && query && /* @__PURE__ */ jsx27(Box23, { marginTop, children: /* @__PURE__ */ jsx27(Text24, { children: `/${query}${formatSearchMatchSummary(matches, total)} \xB7 [Esc] clear` }) })
22979
22926
  ] });
22980
22927
  }
22981
22928
  var init_SearchMatchSummary = __esm({
@@ -24235,33 +24182,33 @@ var init_use_scope_gate = __esm({
24235
24182
  });
24236
24183
 
24237
24184
  // packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/screen.tsx
24238
- import { Box as Box23, Text as Text25 } from "ink";
24239
- import { Fragment as Fragment7, jsx as jsx30, jsxs as jsxs24 } from "react/jsx-runtime";
24185
+ import { Box as Box24, Text as Text25 } from "ink";
24186
+ import { Fragment as Fragment5, jsx as jsx28, jsxs as jsxs24 } from "react/jsx-runtime";
24240
24187
  function ScopeGateScreen(props) {
24241
24188
  if (props.components.length === 0) {
24242
- 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." }) });
24189
+ 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." }) });
24243
24190
  }
24244
- return /* @__PURE__ */ jsx30(ScopeGateView, { ...props });
24191
+ return /* @__PURE__ */ jsx28(ScopeGateView, { ...props });
24245
24192
  }
24246
24193
  function ScopeGateView({ components, onConfirm, onQuit }) {
24247
24194
  const gate = useScopeGate({ components, onConfirm, onQuit });
24248
24195
  const { search, graph, columnPlan, panelLayout, counters } = gate;
24249
24196
  if (gate.showHelp) {
24250
- return /* @__PURE__ */ jsx30(HelpOverlay, { sections: HELP_SECTIONS, handleInput: false, onClose: gate.closeHelp });
24197
+ return /* @__PURE__ */ jsx28(HelpOverlay, { sections: HELP_SECTIONS, handleInput: false, onClose: gate.closeHelp });
24251
24198
  }
24252
- return /* @__PURE__ */ jsxs24(Box23, { flexDirection: "column", children: [
24253
- /* @__PURE__ */ jsx30(StepHeader, { step: "scope-gate" }),
24254
- /* @__PURE__ */ jsxs24(Box23, { flexDirection: "column", paddingX: 2, children: [
24255
- /* @__PURE__ */ jsxs24(Box23, { flexDirection: "row", flexWrap: "wrap", children: [
24256
- /* @__PURE__ */ jsx30(CounterStrip, { counters, totalWidth: gate.totalWidth }),
24199
+ return /* @__PURE__ */ jsxs24(Box24, { flexDirection: "column", children: [
24200
+ /* @__PURE__ */ jsx28(StepHeader, { step: "scope-gate" }),
24201
+ /* @__PURE__ */ jsxs24(Box24, { flexDirection: "column", paddingX: 2, children: [
24202
+ /* @__PURE__ */ jsxs24(Box24, { flexDirection: "row", flexWrap: "wrap", children: [
24203
+ /* @__PURE__ */ jsx28(CounterStrip, { counters, totalWidth: gate.totalWidth }),
24257
24204
  gate.aiExcludedCount > 0 && /* @__PURE__ */ jsxs24(Text25, { color: PALETTE.muted, children: [
24258
24205
  `${gate.aiExcludedCount} component${gate.aiExcludedCount === 1 ? "" : "s"} flagged by AI`,
24259
- gate.aiRows.length > 0 && /* @__PURE__ */ jsx30(Text25, { color: PALETTE.accent, children: " \u2014 press [x] to see why" })
24206
+ gate.aiRows.length > 0 && /* @__PURE__ */ jsx28(Text25, { color: PALETTE.accent, children: " \u2014 press [x] to see why" })
24260
24207
  ] })
24261
24208
  ] }),
24262
- 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." }) }),
24263
- /* @__PURE__ */ jsxs24(Box23, { flexDirection: "row", alignItems: "stretch", children: [
24264
- gate.aiRationalePanelOpen ? /* @__PURE__ */ jsx30(
24209
+ 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." }) }),
24210
+ /* @__PURE__ */ jsxs24(Box24, { flexDirection: "row", alignItems: "stretch", children: [
24211
+ gate.aiRationalePanelOpen ? /* @__PURE__ */ jsx28(
24265
24212
  GotoBanner,
24266
24213
  {
24267
24214
  title: `Review flags (${gate.aiExcludedCount})`,
@@ -24271,7 +24218,7 @@ function ScopeGateView({ components, onConfirm, onQuit }) {
24271
24218
  width: columnPlan.main,
24272
24219
  footerHint: "[\u2191/\u2193] move \xB7 [Enter] jump \xB7 [x/Esc] close"
24273
24220
  }
24274
- ) : /* @__PURE__ */ jsx30(
24221
+ ) : /* @__PURE__ */ jsx28(
24275
24222
  GroupedSidebar,
24276
24223
  {
24277
24224
  items: gate.groupedItems,
@@ -24299,9 +24246,9 @@ function ScopeGateView({ components, onConfirm, onQuit }) {
24299
24246
  graph: graph.nodes
24300
24247
  }
24301
24248
  ),
24302
- columnPlan.layout === "two-column" && /* @__PURE__ */ jsxs24(Fragment7, { children: [
24303
- /* @__PURE__ */ jsx30(Box23, { width: 2, flexShrink: 0 }),
24304
- /* @__PURE__ */ jsx30(
24249
+ columnPlan.layout === "two-column" && /* @__PURE__ */ jsxs24(Fragment5, { children: [
24250
+ /* @__PURE__ */ jsx28(Box24, { width: 2, flexShrink: 0 }),
24251
+ /* @__PURE__ */ jsx28(
24305
24252
  AddedColumn,
24306
24253
  {
24307
24254
  width: columnPlan.added,
@@ -24316,9 +24263,9 @@ function ScopeGateView({ components, onConfirm, onQuit }) {
24316
24263
  )
24317
24264
  ] })
24318
24265
  ] }),
24319
- gate.cyclesPanelOpen && /* @__PURE__ */ jsx30(CyclesPanel, { cycles: gate.slotCycles, cursor: gate.cyclesCursor }),
24320
- gate.pendingRejectCascade && /* @__PURE__ */ jsx30(RejectPrompt, { pending: gate.pendingRejectCascade }),
24321
- /* @__PURE__ */ jsx30(
24266
+ gate.cyclesPanelOpen && /* @__PURE__ */ jsx28(CyclesPanel, { cycles: gate.slotCycles, cursor: gate.cyclesCursor }),
24267
+ gate.pendingRejectCascade && /* @__PURE__ */ jsx28(RejectPrompt, { pending: gate.pendingRejectCascade }),
24268
+ /* @__PURE__ */ jsx28(
24322
24269
  SearchMatchSummary,
24323
24270
  {
24324
24271
  open: search.searchOpen,
@@ -24329,7 +24276,7 @@ function ScopeGateView({ components, onConfirm, onQuit }) {
24329
24276
  marginTop: 1
24330
24277
  }
24331
24278
  ),
24332
- /* @__PURE__ */ jsx30(
24279
+ /* @__PURE__ */ jsx28(
24333
24280
  CompactControlBar,
24334
24281
  {
24335
24282
  hasGroupRoots: gate.hasGroupRoots,
@@ -24519,14 +24466,14 @@ var init_logic10 = __esm({
24519
24466
  });
24520
24467
 
24521
24468
  // packages/experience-design-system-cli/src/tui/import/steps/08-generation/screen.tsx
24522
- import { jsx as jsx31 } from "react/jsx-runtime";
24469
+ import { jsx as jsx29 } from "react/jsx-runtime";
24523
24470
  function GenerationScreen({
24524
24471
  progress,
24525
24472
  agent,
24526
24473
  acceptedCount,
24527
24474
  hasTokens
24528
24475
  }) {
24529
- return /* @__PURE__ */ jsx31(
24476
+ return /* @__PURE__ */ jsx29(
24530
24477
  RunningStep,
24531
24478
  {
24532
24479
  step: "generation",
@@ -25207,7 +25154,7 @@ var init_logic11 = __esm({
25207
25154
  });
25208
25155
 
25209
25156
  // packages/experience-design-system-cli/src/tui/import/steps/preview-validation-error/screen.tsx
25210
- import { jsx as jsx32 } from "react/jsx-runtime";
25157
+ import { jsx as jsx30 } from "react/jsx-runtime";
25211
25158
  function PreviewValidationErrorScreen({
25212
25159
  errors,
25213
25160
  missingNames,
@@ -25216,7 +25163,7 @@ function PreviewValidationErrorScreen({
25216
25163
  onQuit
25217
25164
  }) {
25218
25165
  const matchedNames = matchedComponentNames(errors, missingNames);
25219
- return /* @__PURE__ */ jsx32(
25166
+ return /* @__PURE__ */ jsx30(
25220
25167
  GateStep,
25221
25168
  {
25222
25169
  intent: "error",
@@ -25590,8 +25537,8 @@ var init_scroll_offset = __esm({
25590
25537
  // packages/experience-design-system-cli/src/tui/import/steps/09-review/components/FieldEditor.tsx
25591
25538
  import React12, { useEffect as useEffect11, useLayoutEffect as useLayoutEffect2, useState as useState18 } from "react";
25592
25539
  import figures6 from "figures";
25593
- import { Box as Box24, measureElement, Text as Text26 } from "ink";
25594
- import { Fragment as Fragment8, jsx as jsx33, jsxs as jsxs25 } from "react/jsx-runtime";
25540
+ import { Box as Box25, measureElement, Text as Text26 } from "ink";
25541
+ import { Fragment as Fragment6, jsx as jsx31, jsxs as jsxs25 } from "react/jsx-runtime";
25595
25542
  function createCommonRowProps(selected, focusLevel, editingField, textCursor, valueCursor, cursorVisible, editingValue, valueText, width) {
25596
25543
  return {
25597
25544
  selected,
@@ -25729,14 +25676,14 @@ function serializeState(state2, originalJson) {
25729
25676
  return JSON.stringify(entry, null, 2);
25730
25677
  }
25731
25678
  function Picker({ value, active }) {
25732
- return /* @__PURE__ */ jsxs25(Box24, { children: [
25733
- active && /* @__PURE__ */ jsx33(Text26, { color: PALETTE.warning, children: "\u2039" }),
25734
- /* @__PURE__ */ jsx33(Text26, { color: active ? PALETTE.warning : void 0, bold: active, children: value }),
25735
- active && /* @__PURE__ */ jsx33(Text26, { color: PALETTE.warning, children: "\u203A" })
25679
+ return /* @__PURE__ */ jsxs25(Box25, { children: [
25680
+ active && /* @__PURE__ */ jsx31(Text26, { color: PALETTE.warning, children: "\u2039" }),
25681
+ /* @__PURE__ */ jsx31(Text26, { color: active ? PALETTE.warning : void 0, bold: active, children: value }),
25682
+ active && /* @__PURE__ */ jsx31(Text26, { color: PALETTE.warning, children: "\u203A" })
25736
25683
  ] });
25737
25684
  }
25738
25685
  function Toggle({ value, active }) {
25739
- return /* @__PURE__ */ jsx33(Box24, { children: /* @__PURE__ */ jsx33(Text26, { color: active ? PALETTE.warning : value ? PALETTE.success : PALETTE.border, children: value ? "[\u2713]" : "[ ]" }) });
25686
+ return /* @__PURE__ */ jsx31(Box25, { children: /* @__PURE__ */ jsx31(Text26, { color: active ? PALETTE.warning : value ? PALETTE.success : PALETTE.border, children: value ? "[\u2713]" : "[ ]" }) });
25740
25687
  }
25741
25688
  function InlinePropField({
25742
25689
  label,
@@ -25745,7 +25692,7 @@ function InlinePropField({
25745
25692
  flexible = false,
25746
25693
  width
25747
25694
  }) {
25748
- return /* @__PURE__ */ jsxs25(Box24, { width, gap: 1, flexShrink: flexible ? 1 : 0, flexGrow: flexible ? 1 : 0, flexWrap: "wrap", children: [
25695
+ return /* @__PURE__ */ jsxs25(Box25, { width, gap: 1, flexShrink: flexible ? 1 : 0, flexGrow: flexible ? 1 : 0, flexWrap: "wrap", children: [
25749
25696
  /* @__PURE__ */ jsxs25(Text26, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, wrap: "truncate-end", children: [
25750
25697
  focused ? "\u203A " : " ",
25751
25698
  label
@@ -25759,19 +25706,19 @@ function RequiredField({
25759
25706
  editingField,
25760
25707
  activeField
25761
25708
  }) {
25762
- return /* @__PURE__ */ jsx33(InlinePropField, { label: "req:", focused, children: /* @__PURE__ */ jsx33(Toggle, { value, active: editingField && activeField === "required" }) });
25709
+ return /* @__PURE__ */ jsx31(InlinePropField, { label: "req:", focused, children: /* @__PURE__ */ jsx31(Toggle, { value, active: editingField && activeField === "required" }) });
25763
25710
  }
25764
25711
  function DefaultValueRow({
25765
25712
  display,
25766
25713
  active,
25767
25714
  focused
25768
25715
  }) {
25769
- return /* @__PURE__ */ jsxs25(Box24, { gap: 1, flexWrap: "wrap", flexShrink: 0, children: [
25716
+ return /* @__PURE__ */ jsxs25(Box25, { gap: 1, flexWrap: "wrap", flexShrink: 0, children: [
25770
25717
  /* @__PURE__ */ jsxs25(Text26, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, children: [
25771
25718
  focused ? "\u203A " : " ",
25772
25719
  "default:"
25773
25720
  ] }),
25774
- active ? /* @__PURE__ */ jsx33(Picker, { value: display, active: true }) : /* @__PURE__ */ jsx33(Text26, { wrap: "wrap", children: display })
25721
+ active ? /* @__PURE__ */ jsx31(Picker, { value: display, active: true }) : /* @__PURE__ */ jsx31(Text26, { wrap: "wrap", children: display })
25775
25722
  ] });
25776
25723
  }
25777
25724
  function RowLabel({
@@ -25799,10 +25746,10 @@ function ValueInputRow({
25799
25746
  valueText,
25800
25747
  cursorVisible
25801
25748
  }) {
25802
- return /* @__PURE__ */ jsxs25(Box24, { paddingLeft: 2, children: [
25803
- /* @__PURE__ */ jsx33(Text26, { color: PALETTE.accent, children: mode === "edit" ? "\u270E " : "+ " }),
25804
- /* @__PURE__ */ jsx33(Text26, { children: valueText }),
25805
- /* @__PURE__ */ jsx33(Text26, { inverse: cursorVisible, children: " " })
25749
+ return /* @__PURE__ */ jsxs25(Box25, { paddingLeft: 2, children: [
25750
+ /* @__PURE__ */ jsx31(Text26, { color: PALETTE.accent, children: mode === "edit" ? "\u270E " : "+ " }),
25751
+ /* @__PURE__ */ jsx31(Text26, { children: valueText }),
25752
+ /* @__PURE__ */ jsx31(Text26, { inverse: cursorVisible, children: " " })
25806
25753
  ] });
25807
25754
  }
25808
25755
  function EditableListItem({
@@ -25815,9 +25762,9 @@ function EditableListItem({
25815
25762
  }) {
25816
25763
  const isBeingEdited = editingValue?.mode === "edit" && editingValue.index === index;
25817
25764
  if (isBeingEdited) {
25818
- return /* @__PURE__ */ jsx33(ValueInputRow, { mode: "edit", valueText, cursorVisible });
25765
+ return /* @__PURE__ */ jsx31(ValueInputRow, { mode: "edit", valueText, cursorVisible });
25819
25766
  }
25820
- return /* @__PURE__ */ jsx33(Box24, { gap: 1, paddingLeft: 2, children: /* @__PURE__ */ jsx33(Text26, { color: active ? PALETTE.accent : void 0, children: active ? `${figures6.pointer} ${value}` : ` ${value}` }) });
25767
+ return /* @__PURE__ */ jsx31(Box25, { gap: 1, paddingLeft: 2, children: /* @__PURE__ */ jsx31(Text26, { color: active ? PALETTE.accent : void 0, children: active ? `${figures6.pointer} ${value}` : ` ${value}` }) });
25821
25768
  }
25822
25769
  function EditableValueList({
25823
25770
  values,
@@ -25830,9 +25777,9 @@ function EditableValueList({
25830
25777
  emptyPaddingLeft,
25831
25778
  showAddInput
25832
25779
  }) {
25833
- return /* @__PURE__ */ jsxs25(Fragment8, { children: [
25834
- 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 }) })),
25835
- values.map((value, index) => /* @__PURE__ */ jsx33(
25780
+ return /* @__PURE__ */ jsxs25(Fragment6, { children: [
25781
+ 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 }) })),
25782
+ values.map((value, index) => /* @__PURE__ */ jsx31(
25836
25783
  EditableListItem,
25837
25784
  {
25838
25785
  value,
@@ -25844,7 +25791,7 @@ function EditableValueList({
25844
25791
  },
25845
25792
  index
25846
25793
  )),
25847
- showAddInput && editingValue?.mode === "add" && /* @__PURE__ */ jsx33(ValueInputRow, { mode: "add", valueText, cursorVisible })
25794
+ showAddInput && editingValue?.mode === "add" && /* @__PURE__ */ jsx31(ValueInputRow, { mode: "add", valueText, cursorVisible })
25848
25795
  ] });
25849
25796
  }
25850
25797
  function DefaultSubRow({
@@ -25856,51 +25803,51 @@ function DefaultSubRow({
25856
25803
  }) {
25857
25804
  const cursor = cursorVisible ? "\u2588" : " ";
25858
25805
  if (prop.type === "richtext" || prop.type === "media" || prop.type === "link") {
25859
- return /* @__PURE__ */ jsxs25(Box24, { gap: 1, flexShrink: 0, children: [
25806
+ return /* @__PURE__ */ jsxs25(Box25, { gap: 1, flexShrink: 0, children: [
25860
25807
  /* @__PURE__ */ jsxs25(Text26, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, children: [
25861
25808
  focused ? "\u203A " : " ",
25862
25809
  "default:"
25863
25810
  ] }),
25864
- /* @__PURE__ */ jsx33(Text26, { color: focused ? void 0 : PALETTE.muted, children: "(not applicable)" })
25811
+ /* @__PURE__ */ jsx31(Text26, { color: focused ? void 0 : PALETTE.muted, children: "(not applicable)" })
25865
25812
  ] });
25866
25813
  }
25867
25814
  if (prop.type === "boolean") {
25868
25815
  const display = prop.default === true ? "true" : prop.default === false ? "false" : "(unset)";
25869
- return /* @__PURE__ */ jsx33(DefaultValueRow, { display, active, focused });
25816
+ return /* @__PURE__ */ jsx31(DefaultValueRow, { display, active, focused });
25870
25817
  }
25871
25818
  if (prop.type === "enum") {
25872
25819
  if (prop.values.length === 0) {
25873
- return /* @__PURE__ */ jsxs25(Box24, { gap: 1, flexShrink: 0, children: [
25820
+ return /* @__PURE__ */ jsxs25(Box25, { gap: 1, flexShrink: 0, children: [
25874
25821
  /* @__PURE__ */ jsxs25(Text26, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, children: [
25875
25822
  focused ? "\u203A " : " ",
25876
25823
  "default:"
25877
25824
  ] }),
25878
- /* @__PURE__ */ jsx33(Text26, { color: focused ? void 0 : PALETTE.muted, children: "(no values defined)" })
25825
+ /* @__PURE__ */ jsx31(Text26, { color: focused ? void 0 : PALETTE.muted, children: "(no values defined)" })
25879
25826
  ] });
25880
25827
  }
25881
25828
  const display = typeof prop.default === "string" && prop.default !== "" ? prop.default : "(unset)";
25882
- return /* @__PURE__ */ jsx33(DefaultValueRow, { display, active, focused });
25829
+ return /* @__PURE__ */ jsx31(DefaultValueRow, { display, active, focused });
25883
25830
  }
25884
25831
  const value = typeof prop.default === "string" ? prop.default : "";
25885
25832
  if (active) {
25886
- return /* @__PURE__ */ jsxs25(Box24, { flexDirection: "row", flexShrink: 0, children: [
25833
+ return /* @__PURE__ */ jsxs25(Box25, { flexDirection: "row", flexShrink: 0, children: [
25887
25834
  /* @__PURE__ */ jsxs25(Text26, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, children: [
25888
25835
  focused ? "\u203A " : " ",
25889
25836
  "default:"
25890
25837
  ] }),
25891
- /* @__PURE__ */ jsxs25(Box24, { flexGrow: 1, borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
25892
- /* @__PURE__ */ jsx33(Text26, { children: value.slice(0, textCursor) }),
25893
- /* @__PURE__ */ jsx33(Text26, { inverse: cursorVisible, children: value[textCursor] ?? cursor }),
25894
- /* @__PURE__ */ jsx33(Text26, { children: value.slice(textCursor + 1) })
25838
+ /* @__PURE__ */ jsxs25(Box25, { flexGrow: 1, borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
25839
+ /* @__PURE__ */ jsx31(Text26, { children: value.slice(0, textCursor) }),
25840
+ /* @__PURE__ */ jsx31(Text26, { inverse: cursorVisible, children: value[textCursor] ?? cursor }),
25841
+ /* @__PURE__ */ jsx31(Text26, { children: value.slice(textCursor + 1) })
25895
25842
  ] })
25896
25843
  ] });
25897
25844
  }
25898
- return /* @__PURE__ */ jsxs25(Box24, { gap: 1, flexShrink: 0, children: [
25845
+ return /* @__PURE__ */ jsxs25(Box25, { gap: 1, flexShrink: 0, children: [
25899
25846
  /* @__PURE__ */ jsxs25(Text26, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, children: [
25900
25847
  focused ? "\u203A " : " ",
25901
25848
  "default:"
25902
25849
  ] }),
25903
- /* @__PURE__ */ jsx33(Text26, { color: focused || value ? void 0 : PALETTE.muted, children: value || "(none)" })
25850
+ /* @__PURE__ */ jsx31(Text26, { color: focused || value ? void 0 : PALETTE.muted, children: value || "(none)" })
25904
25851
  ] });
25905
25852
  }
25906
25853
  function DescriptionField({
@@ -25915,20 +25862,20 @@ function DescriptionField({
25915
25862
  paddingLeft = 2
25916
25863
  }) {
25917
25864
  if (compact) {
25918
- return /* @__PURE__ */ jsxs25(Box24, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: [
25865
+ return /* @__PURE__ */ jsxs25(Box25, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: [
25919
25866
  /* @__PURE__ */ jsxs25(Text26, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, children: [
25920
25867
  focused ? "\u203A " : " ",
25921
25868
  label
25922
25869
  ] }),
25923
- /* @__PURE__ */ jsx33(Text26, { wrap: "truncate-end", color: value ? void 0 : PALETTE.muted, children: value || "\u2014" })
25870
+ /* @__PURE__ */ jsx31(Text26, { wrap: "truncate-end", color: value ? void 0 : PALETTE.muted, children: value || "\u2014" })
25924
25871
  ] });
25925
25872
  }
25926
- return /* @__PURE__ */ jsxs25(Box24, { paddingLeft, flexDirection: "column", width, flexShrink: 0, children: [
25873
+ return /* @__PURE__ */ jsxs25(Box25, { paddingLeft, flexDirection: "column", width, flexShrink: 0, children: [
25927
25874
  /* @__PURE__ */ jsxs25(Text26, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, children: [
25928
25875
  focused ? "\u203A " : " ",
25929
25876
  label
25930
25877
  ] }),
25931
- editing ? /* @__PURE__ */ jsx33(EditableDescription, { cursorVisible, value, textCursor }) : /* @__PURE__ */ jsx33(Text26, { wrap: "wrap", children: value || "\u2014" })
25878
+ editing ? /* @__PURE__ */ jsx31(EditableDescription, { cursorVisible, value, textCursor }) : /* @__PURE__ */ jsx31(Text26, { wrap: "wrap", children: value || "\u2014" })
25932
25879
  ] });
25933
25880
  }
25934
25881
  function EditableDescription({
@@ -25938,7 +25885,7 @@ function EditableDescription({
25938
25885
  }) {
25939
25886
  return /* @__PURE__ */ jsxs25(Text26, { wrap: "wrap", children: [
25940
25887
  value.slice(0, textCursor),
25941
- /* @__PURE__ */ jsx33(Text26, { inverse: cursorVisible, children: value[textCursor] ?? " " }),
25888
+ /* @__PURE__ */ jsx31(Text26, { inverse: cursorVisible, children: value[textCursor] ?? " " }),
25942
25889
  value.slice(textCursor + 1)
25943
25890
  ] });
25944
25891
  }
@@ -25959,9 +25906,9 @@ function PropRow({
25959
25906
  }) {
25960
25907
  const descFocused = activeField === "description";
25961
25908
  const descActive = editingField && descFocused;
25962
- return /* @__PURE__ */ jsxs25(Box24, { flexDirection: "column", width, flexShrink: 0, children: [
25963
- /* @__PURE__ */ jsx33(Box24, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: /* @__PURE__ */ jsx33(RowLabel, { name: prop.name, selected }) }),
25964
- /* @__PURE__ */ jsx33(
25909
+ return /* @__PURE__ */ jsxs25(Box25, { flexDirection: "column", width, flexShrink: 0, children: [
25910
+ /* @__PURE__ */ jsx31(Box25, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: /* @__PURE__ */ jsx31(RowLabel, { name: prop.name, selected }) }),
25911
+ /* @__PURE__ */ jsx31(
25965
25912
  DescriptionField,
25966
25913
  {
25967
25914
  value: prop.description,
@@ -25974,8 +25921,8 @@ function PropRow({
25974
25921
  paddingLeft: 0
25975
25922
  }
25976
25923
  ),
25977
- /* @__PURE__ */ jsxs25(Box24, { flexDirection: "column", width, flexShrink: 0, children: [
25978
- /* @__PURE__ */ jsx33(
25924
+ /* @__PURE__ */ jsxs25(Box25, { flexDirection: "column", width, flexShrink: 0, children: [
25925
+ /* @__PURE__ */ jsx31(
25979
25926
  RequiredField,
25980
25927
  {
25981
25928
  value: prop.required,
@@ -25984,10 +25931,10 @@ function PropRow({
25984
25931
  activeField
25985
25932
  }
25986
25933
  ),
25987
- /* @__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 }) })
25934
+ /* @__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 }) })
25988
25935
  ] }),
25989
- 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" }) }),
25990
- prop.type === "enum" && /* @__PURE__ */ jsxs25(Box24, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: [
25936
+ 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" }) }),
25937
+ prop.type === "enum" && /* @__PURE__ */ jsxs25(Box25, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: [
25991
25938
  /* @__PURE__ */ jsxs25(Text26, { color: activeField === "values" ? PALETTE.warning : PALETTE.muted, bold: activeField === "values", children: [
25992
25939
  activeField === "values" ? "\u203A " : " ",
25993
25940
  "values:"
@@ -25998,7 +25945,7 @@ function PropRow({
25998
25945
  "]"
25999
25946
  ] })
26000
25947
  ] }),
26001
- /* @__PURE__ */ jsx33(
25948
+ /* @__PURE__ */ jsx31(
26002
25949
  DefaultSubRow,
26003
25950
  {
26004
25951
  prop,
@@ -26008,12 +25955,12 @@ function PropRow({
26008
25955
  cursorVisible
26009
25956
  }
26010
25957
  ),
26011
- prop.type === "token" && prop.category === "design" && /* @__PURE__ */ jsxs25(Box24, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: [
25958
+ prop.type === "token" && prop.category === "design" && /* @__PURE__ */ jsxs25(Box25, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: [
26012
25959
  /* @__PURE__ */ jsxs25(Text26, { color: activeField === "allowed" ? PALETTE.warning : PALETTE.muted, bold: activeField === "allowed", children: [
26013
25960
  activeField === "allowed" ? "\u203A " : " ",
26014
25961
  "allowed:"
26015
25962
  ] }),
26016
- 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(
25963
+ 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(
26017
25964
  Text26,
26018
25965
  {
26019
25966
  color: activeField !== "allowed" && prop.allowed.length === 0 ? PALETTE.muted : void 0,
@@ -26022,17 +25969,17 @@ function PropRow({
26022
25969
  }
26023
25970
  )
26024
25971
  ] }),
26025
- selected && showRationale && rationale && rationale.trim().length > 0 && /* @__PURE__ */ jsx33(Box24, { paddingLeft: 2, children: /* @__PURE__ */ jsx33(Text26, { color: PALETTE.muted, children: (() => {
25972
+ selected && showRationale && rationale && rationale.trim().length > 0 && /* @__PURE__ */ jsx31(Box25, { paddingLeft: 2, children: /* @__PURE__ */ jsx31(Text26, { color: PALETTE.muted, children: (() => {
26026
25973
  const max = Math.max(8, width - 8);
26027
25974
  const text = `~ ${rationale}`;
26028
25975
  return text.length > max ? text.slice(0, max - 1) + "\u2026" : text;
26029
25976
  })() }) }, rowKey ? `rationale-${rowKey}` : void 0),
26030
- selected && prop.type === "enum" && activeField === "values" && /* @__PURE__ */ jsxs25(Box24, { paddingLeft: 2, flexDirection: "column", children: [
26031
- /* @__PURE__ */ jsxs25(Box24, { children: [
26032
- /* @__PURE__ */ jsx33(Text26, { color: PALETTE.muted, children: "values:" }),
26033
- activeField === "values" && /* @__PURE__ */ jsx33(Text26, { children: " [a] add [e] edit [r] remove [\u2191\u2193] navigate [K/J] reorder" })
25977
+ selected && prop.type === "enum" && activeField === "values" && /* @__PURE__ */ jsxs25(Box25, { paddingLeft: 2, flexDirection: "column", children: [
25978
+ /* @__PURE__ */ jsxs25(Box25, { children: [
25979
+ /* @__PURE__ */ jsx31(Text26, { color: PALETTE.muted, children: "values:" }),
25980
+ activeField === "values" && /* @__PURE__ */ jsx31(Text26, { children: " [a] add [e] edit [r] remove [\u2191\u2193] navigate [K/J] reorder" })
26034
25981
  ] }),
26035
- /* @__PURE__ */ jsx33(
25982
+ /* @__PURE__ */ jsx31(
26036
25983
  EditableValueList,
26037
25984
  {
26038
25985
  values: prop.values,
@@ -26062,9 +26009,9 @@ function SlotRow({
26062
26009
  pickerCandidates,
26063
26010
  pickerCursor
26064
26011
  }) {
26065
- return /* @__PURE__ */ jsxs25(Box24, { flexDirection: "column", width, flexShrink: 0, children: [
26066
- /* @__PURE__ */ jsx33(Box24, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: /* @__PURE__ */ jsx33(RowLabel, { name: slot.name, selected, trailing: false }) }),
26067
- /* @__PURE__ */ jsx33(
26012
+ return /* @__PURE__ */ jsxs25(Box25, { flexDirection: "column", width, flexShrink: 0, children: [
26013
+ /* @__PURE__ */ jsx31(Box25, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: /* @__PURE__ */ jsx31(RowLabel, { name: slot.name, selected, trailing: false }) }),
26014
+ /* @__PURE__ */ jsx31(
26068
26015
  DescriptionField,
26069
26016
  {
26070
26017
  value: slot.description,
@@ -26077,7 +26024,7 @@ function SlotRow({
26077
26024
  paddingLeft: 0
26078
26025
  }
26079
26026
  ),
26080
- /* @__PURE__ */ jsx33(Box24, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: /* @__PURE__ */ jsx33(
26027
+ /* @__PURE__ */ jsx31(Box25, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: /* @__PURE__ */ jsx31(
26081
26028
  RequiredField,
26082
26029
  {
26083
26030
  value: slot.required,
@@ -26086,7 +26033,7 @@ function SlotRow({
26086
26033
  activeField
26087
26034
  }
26088
26035
  ) }),
26089
- !(selected && editingField && activeField === "allowedComponents") && /* @__PURE__ */ jsxs25(Box24, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: [
26036
+ !(selected && editingField && activeField === "allowedComponents") && /* @__PURE__ */ jsxs25(Box25, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: [
26090
26037
  /* @__PURE__ */ jsxs25(
26091
26038
  Text26,
26092
26039
  {
@@ -26098,10 +26045,10 @@ function SlotRow({
26098
26045
  ]
26099
26046
  }
26100
26047
  ),
26101
- slot.allowedComponents.length === 0 ? /* @__PURE__ */ jsx33(Text26, { color: PALETTE.muted, children: "(any)" }) : /* @__PURE__ */ jsx33(Text26, { wrap: "wrap", children: slot.allowedComponents.join(", ") })
26048
+ slot.allowedComponents.length === 0 ? /* @__PURE__ */ jsx31(Text26, { color: PALETTE.muted, children: "(any)" }) : /* @__PURE__ */ jsx31(Text26, { wrap: "wrap", children: slot.allowedComponents.join(", ") })
26102
26049
  ] }),
26103
- selected && editingField && activeField === "allowedComponents" && /* @__PURE__ */ jsxs25(Box24, { flexDirection: "column", children: [
26104
- /* @__PURE__ */ jsxs25(Box24, { children: [
26050
+ selected && editingField && activeField === "allowedComponents" && /* @__PURE__ */ jsxs25(Box25, { flexDirection: "column", children: [
26051
+ /* @__PURE__ */ jsxs25(Box25, { children: [
26105
26052
  /* @__PURE__ */ jsxs25(
26106
26053
  Text26,
26107
26054
  {
@@ -26113,9 +26060,9 @@ function SlotRow({
26113
26060
  ]
26114
26061
  }
26115
26062
  ),
26116
- 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" })
26063
+ 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" })
26117
26064
  ] }),
26118
- /* @__PURE__ */ jsx33(
26065
+ /* @__PURE__ */ jsx31(
26119
26066
  EditableValueList,
26120
26067
  {
26121
26068
  values: slot.allowedComponents,
@@ -26129,21 +26076,21 @@ function SlotRow({
26129
26076
  showAddInput: editingField && activeField === "allowedComponents"
26130
26077
  }
26131
26078
  ),
26132
- 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)" }) : (() => {
26079
+ 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)" }) : (() => {
26133
26080
  const filtered = valueText.length === 0 ? pickerCandidates : pickerCandidates.filter((n) => n.toLowerCase().includes(valueText.toLowerCase()));
26134
26081
  if (filtered.length === 0) {
26135
- return /* @__PURE__ */ jsx33(Text26, { color: PALETTE.muted, children: "(no candidates match \u2014 Enter to add as free text)" });
26082
+ return /* @__PURE__ */ jsx31(Text26, { color: PALETTE.muted, children: "(no candidates match \u2014 Enter to add as free text)" });
26136
26083
  }
26137
26084
  const cursor = pickerCursor % filtered.length;
26138
26085
  const MAX_VISIBLE = 5;
26139
26086
  const start = Math.max(0, Math.min(filtered.length - MAX_VISIBLE, cursor - 2));
26140
26087
  const slice = filtered.slice(start, start + MAX_VISIBLE);
26141
- return /* @__PURE__ */ jsxs25(Box24, { flexDirection: "column", children: [
26142
- /* @__PURE__ */ jsx33(Text26, { color: PALETTE.muted, children: " candidates (\u2191\u2193 cycle, Enter to add):" }),
26088
+ return /* @__PURE__ */ jsxs25(Box25, { flexDirection: "column", children: [
26089
+ /* @__PURE__ */ jsx31(Text26, { color: PALETTE.muted, children: " candidates (\u2191\u2193 cycle, Enter to add):" }),
26143
26090
  slice.map((name, i) => {
26144
26091
  const absIdx = start + i;
26145
26092
  const isCursor = absIdx === cursor;
26146
- return /* @__PURE__ */ jsx33(Text26, { color: isCursor ? PALETTE.accent : PALETTE.muted, children: isCursor ? ` ${figures6.pointer} ${name}` : ` ${name}` }, name);
26093
+ return /* @__PURE__ */ jsx31(Text26, { color: isCursor ? PALETTE.accent : PALETTE.muted, children: isCursor ? ` ${figures6.pointer} ${name}` : ` ${name}` }, name);
26147
26094
  })
26148
26095
  ] });
26149
26096
  })() })
@@ -26971,18 +26918,18 @@ function FieldEditor({
26971
26918
  });
26972
26919
  const innerWidth = Math.max(1, width - 2);
26973
26920
  if (parseErr) {
26974
- return /* @__PURE__ */ jsxs25(Box24, { flexDirection: "column", width, borderStyle: "single", borderColor: PALETTE.error, children: [
26975
- /* @__PURE__ */ jsx33(Text26, { bold: true, color: PALETTE.error, children: "FIELD EDITOR \u2014 parse error" }),
26976
- /* @__PURE__ */ jsx33(Text26, { color: PALETTE.error, children: parseErr }),
26977
- /* @__PURE__ */ jsx33(Text26, { color: PALETTE.muted, children: "Cannot display structured editor. Fix the JSON first." })
26921
+ return /* @__PURE__ */ jsxs25(Box25, { flexDirection: "column", width, borderStyle: "single", borderColor: PALETTE.error, children: [
26922
+ /* @__PURE__ */ jsx31(Text26, { bold: true, color: PALETTE.error, children: "FIELD EDITOR \u2014 parse error" }),
26923
+ /* @__PURE__ */ jsx31(Text26, { color: PALETTE.error, children: parseErr }),
26924
+ /* @__PURE__ */ jsx31(Text26, { color: PALETTE.muted, children: "Cannot display structured editor. Fix the JSON first." })
26978
26925
  ] });
26979
26926
  }
26980
26927
  if (props.length === 0 && slots.length === 0) {
26981
- return /* @__PURE__ */ jsxs25(Box24, { flexDirection: "column", width, borderStyle: "single", borderColor: PALETTE.warning, children: [
26982
- /* @__PURE__ */ jsx33(Text26, { bold: true, color: PALETTE.warning, children: "FIELD EDITOR \u2014 no fields" }),
26983
- /* @__PURE__ */ jsx33(Text26, { color: PALETTE.warning, children: "\u26A0 No properties classified for this component. The LLM didn't find anything to classify." }),
26984
- /* @__PURE__ */ jsx33(Text26, { color: PALETTE.muted, children: "You can add fields manually below or reject this component." }),
26985
- /* @__PURE__ */ jsx33(Text26, { color: PALETTE.muted, children: "Enter to save \xB7 Esc to discard" })
26928
+ return /* @__PURE__ */ jsxs25(Box25, { flexDirection: "column", width, borderStyle: "single", borderColor: PALETTE.warning, children: [
26929
+ /* @__PURE__ */ jsx31(Text26, { bold: true, color: PALETTE.warning, children: "FIELD EDITOR \u2014 no fields" }),
26930
+ /* @__PURE__ */ jsx31(Text26, { color: PALETTE.warning, children: "\u26A0 No properties classified for this component. The LLM didn't find anything to classify." }),
26931
+ /* @__PURE__ */ jsx31(Text26, { color: PALETTE.muted, children: "You can add fields manually below or reject this component." }),
26932
+ /* @__PURE__ */ jsx31(Text26, { color: PALETTE.muted, children: "Enter to save \xB7 Esc to discard" })
26986
26933
  ] });
26987
26934
  }
26988
26935
  const hasEmptyProperties = props.length === 0 && slots.length === 0;
@@ -27111,12 +27058,12 @@ function FieldEditor({
27111
27058
  const renderRow = (row, index) => {
27112
27059
  const key = rowKey(row, index);
27113
27060
  if (row.kind === "header") {
27114
- return /* @__PURE__ */ jsx33(Box24, { flexDirection: "column", paddingTop: 1, children: /* @__PURE__ */ jsx33(Text26, { bold: true, color: PALETTE.success, children: row.label }) }, key);
27061
+ return /* @__PURE__ */ jsx31(Box25, { flexDirection: "column", paddingTop: 1, children: /* @__PURE__ */ jsx31(Text26, { bold: true, color: PALETTE.success, children: row.label }) }, key);
27115
27062
  }
27116
27063
  if (row.kind === "component-description") {
27117
27064
  const isSelected2 = inComponentDesc && active;
27118
27065
  const isEditing = isSelected2 && focusLevel === "field" && editingField && activeField === "description";
27119
- return /* @__PURE__ */ jsx33(
27066
+ return /* @__PURE__ */ jsx31(
27120
27067
  DescriptionField,
27121
27068
  {
27122
27069
  value: editorState.componentDescription,
@@ -27147,7 +27094,7 @@ function FieldEditor({
27147
27094
  valueText,
27148
27095
  innerWidth
27149
27096
  );
27150
- return /* @__PURE__ */ jsx33(
27097
+ return /* @__PURE__ */ jsx31(
27151
27098
  PropRow,
27152
27099
  {
27153
27100
  prop: p,
@@ -27174,7 +27121,7 @@ function FieldEditor({
27174
27121
  valueText,
27175
27122
  innerWidth
27176
27123
  );
27177
- return /* @__PURE__ */ jsx33(
27124
+ return /* @__PURE__ */ jsx31(
27178
27125
  SlotRow,
27179
27126
  {
27180
27127
  slot: s,
@@ -27195,9 +27142,9 @@ function FieldEditor({
27195
27142
  borderStyle: "single",
27196
27143
  borderColor: hasEmptyProperties ? PALETTE.warning : active ? PALETTE.accent : PALETTE.border,
27197
27144
  children: [
27198
- 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." }),
27145
+ 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." }),
27199
27146
  header,
27200
- /* @__PURE__ */ jsx33(Box24, { flexDirection: "column", width: innerWidth, flexShrink: 0, children: focusLevel === "field" && !inComponentDesc && currentProp ? /* @__PURE__ */ jsx33(
27147
+ /* @__PURE__ */ jsx31(Box25, { flexDirection: "column", width: innerWidth, flexShrink: 0, children: focusLevel === "field" && !inComponentDesc && currentProp ? /* @__PURE__ */ jsx31(
27201
27148
  PropRow,
27202
27149
  {
27203
27150
  prop: currentProp,
@@ -27213,7 +27160,7 @@ function FieldEditor({
27213
27160
  rationale: metadata?.props?.[currentProp.name]?.rationale ?? null,
27214
27161
  showRationale: showInlineRationales
27215
27162
  }
27216
- ) : focusLevel === "field" && inSlots && currentSlot ? /* @__PURE__ */ jsx33(
27163
+ ) : focusLevel === "field" && inSlots && currentSlot ? /* @__PURE__ */ jsx31(
27217
27164
  SlotRow,
27218
27165
  {
27219
27166
  slot: currentSlot,
@@ -27232,8 +27179,8 @@ function FieldEditor({
27232
27179
  ) : visibleRowSlice.map((row, index) => {
27233
27180
  const absoluteIndex = scrollStart + index;
27234
27181
  const key = rowKey(row, absoluteIndex);
27235
- return /* @__PURE__ */ jsx33(
27236
- Box24,
27182
+ return /* @__PURE__ */ jsx31(
27183
+ Box25,
27237
27184
  {
27238
27185
  ref: (node) => {
27239
27186
  if (node) rowMeasureRefs.current.set(key, node);
@@ -27246,7 +27193,7 @@ function FieldEditor({
27246
27193
  `visible-${key}`
27247
27194
  );
27248
27195
  }) }),
27249
- categoryBelow && /* @__PURE__ */ jsx33(Text26, { color: PALETTE.success, bold: true, children: `(${categoryBelow} below)` }),
27196
+ categoryBelow && /* @__PURE__ */ jsx31(Text26, { color: PALETTE.success, bold: true, children: `(${categoryBelow} below)` }),
27250
27197
  sourceOpen && !onToggleSourceExternal && (() => {
27251
27198
  const propMeta = !inSlots && !inComponentDesc && currentProp ? metadata?.props?.[currentProp.name] : void 0;
27252
27199
  const start = propMeta?.sourceStartLine ?? null;
@@ -27255,49 +27202,49 @@ function FieldEditor({
27255
27202
  const src = metadata?.componentSource ?? null;
27256
27203
  const headerPath = path5 ?? "<unknown source path>";
27257
27204
  if (!start || !end2 || !src) {
27258
- return /* @__PURE__ */ jsxs25(Box24, { flexDirection: "column", borderStyle: "single", borderColor: "gray", paddingX: 1, children: [
27259
- /* @__PURE__ */ jsx33(Text26, { color: PALETTE.muted, bold: true, children: `source: ${headerPath}` }),
27260
- /* @__PURE__ */ jsx33(Text26, { color: PALETTE.muted, children: "(no source location captured for this prop)" }),
27261
- /* @__PURE__ */ jsx33(Text26, { children: "[s] close" })
27205
+ return /* @__PURE__ */ jsxs25(Box25, { flexDirection: "column", borderStyle: "single", borderColor: "gray", paddingX: 1, children: [
27206
+ /* @__PURE__ */ jsx31(Text26, { color: PALETTE.muted, bold: true, children: `source: ${headerPath}` }),
27207
+ /* @__PURE__ */ jsx31(Text26, { color: PALETTE.muted, children: "(no source location captured for this prop)" }),
27208
+ /* @__PURE__ */ jsx31(Text26, { children: "[s] close" })
27262
27209
  ] });
27263
27210
  }
27264
27211
  const lines = src.split("\n").slice(Math.max(0, start - 1), end2);
27265
- return /* @__PURE__ */ jsxs25(Box24, { flexDirection: "column", borderStyle: "single", borderColor: "gray", paddingX: 1, children: [
27266
- /* @__PURE__ */ jsx33(Text26, { color: PALETTE.muted, bold: true, children: `${headerPath}: lines ${start}\u2013${end2}` }),
27267
- lines.map((ln, i) => /* @__PURE__ */ jsx33(Text26, { color: PALETTE.muted, children: ln }, `source-line-${i}`)),
27268
- /* @__PURE__ */ jsx33(Text26, { children: "[s] close \xB7 [Esc] close" })
27212
+ return /* @__PURE__ */ jsxs25(Box25, { flexDirection: "column", borderStyle: "single", borderColor: "gray", paddingX: 1, children: [
27213
+ /* @__PURE__ */ jsx31(Text26, { color: PALETTE.muted, bold: true, children: `${headerPath}: lines ${start}\u2013${end2}` }),
27214
+ lines.map((ln, i) => /* @__PURE__ */ jsx31(Text26, { color: PALETTE.muted, children: ln }, `source-line-${i}`)),
27215
+ /* @__PURE__ */ jsx31(Text26, { children: "[s] close \xB7 [Esc] close" })
27269
27216
  ] });
27270
27217
  })(),
27271
- showHelp && /* @__PURE__ */ jsxs25(Box24, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.accent, paddingX: 1, children: [
27272
- /* @__PURE__ */ jsx33(Text26, { bold: true, color: PALETTE.accent, children: "Keybindings" }),
27273
- /* @__PURE__ */ jsx33(Text26, { children: " " }),
27274
- /* @__PURE__ */ jsx33(Text26, { bold: true, children: "Row navigation" }),
27275
- /* @__PURE__ */ jsx33(Text26, { children: " \u2191/\u2193 move between rows" }),
27276
- /* @__PURE__ */ jsx33(Text26, { children: " Enter edit fields on the current row" }),
27277
- /* @__PURE__ */ jsx33(Text26, { children: " Esc exit the panel" }),
27278
- /* @__PURE__ */ jsx33(Text26, { children: " " }),
27279
- /* @__PURE__ */ jsx33(Text26, { bold: true, children: "Field editing" }),
27280
- /* @__PURE__ */ jsx33(Text26, { children: " \u2191/\u2193/\u2190\u2192 cycle through fields" }),
27281
- /* @__PURE__ */ jsx33(Text26, { children: " \u2190/\u2192 cycle picker values \xB7 move cursor in text inputs" }),
27282
- /* @__PURE__ */ jsx33(Text26, { children: " Space/Enter toggle required" }),
27283
- /* @__PURE__ */ jsx33(Text26, { children: " Type edit description / string default" }),
27284
- /* @__PURE__ */ jsx33(Text26, { children: " Esc exit field-edit back to the row" }),
27285
- /* @__PURE__ */ jsx33(Text26, { children: " " }),
27286
- /* @__PURE__ */ jsx33(Text26, { bold: true, children: "Values / allowedComponents" }),
27287
- /* @__PURE__ */ jsx33(Text26, { children: " a / e / r add \xB7 edit \xB7 remove" }),
27288
- /* @__PURE__ */ jsx33(Text26, { children: " \u2191\u2193 navigate the list" }),
27289
- /* @__PURE__ */ jsx33(Text26, { children: " K / J reorder up \xB7 down" }),
27290
- /* @__PURE__ */ jsx33(Text26, { children: " " }),
27291
- /* @__PURE__ */ jsx33(Text26, { bold: true, children: "Panels" }),
27292
- /* @__PURE__ */ jsx33(Text26, { children: " s toggle source-view for the current prop" }),
27293
- /* @__PURE__ */ jsx33(Text26, { children: " " + propRationaleKey.padEnd(16) + " toggle prop rationale panel" }),
27294
- /* @__PURE__ */ jsx33(Text26, { children: " " + componentRationaleKey.padEnd(16) + " toggle component rationale panel" }),
27295
- /* @__PURE__ */ jsx33(Text26, { children: " ? toggle this overlay" }),
27296
- /* @__PURE__ */ jsx33(Text26, { children: " " }),
27297
- /* @__PURE__ */ jsx33(Text26, { color: PALETTE.muted, children: "press ? or Esc to close" })
27218
+ showHelp && /* @__PURE__ */ jsxs25(Box25, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.accent, paddingX: 1, children: [
27219
+ /* @__PURE__ */ jsx31(Text26, { bold: true, color: PALETTE.accent, children: "Keybindings" }),
27220
+ /* @__PURE__ */ jsx31(Text26, { children: " " }),
27221
+ /* @__PURE__ */ jsx31(Text26, { bold: true, children: "Row navigation" }),
27222
+ /* @__PURE__ */ jsx31(Text26, { children: " \u2191/\u2193 move between rows" }),
27223
+ /* @__PURE__ */ jsx31(Text26, { children: " Enter edit fields on the current row" }),
27224
+ /* @__PURE__ */ jsx31(Text26, { children: " Esc exit the panel" }),
27225
+ /* @__PURE__ */ jsx31(Text26, { children: " " }),
27226
+ /* @__PURE__ */ jsx31(Text26, { bold: true, children: "Field editing" }),
27227
+ /* @__PURE__ */ jsx31(Text26, { children: " \u2191/\u2193/\u2190\u2192 cycle through fields" }),
27228
+ /* @__PURE__ */ jsx31(Text26, { children: " \u2190/\u2192 cycle picker values \xB7 move cursor in text inputs" }),
27229
+ /* @__PURE__ */ jsx31(Text26, { children: " Space/Enter toggle required" }),
27230
+ /* @__PURE__ */ jsx31(Text26, { children: " Type edit description / string default" }),
27231
+ /* @__PURE__ */ jsx31(Text26, { children: " Esc exit field-edit back to the row" }),
27232
+ /* @__PURE__ */ jsx31(Text26, { children: " " }),
27233
+ /* @__PURE__ */ jsx31(Text26, { bold: true, children: "Values / allowedComponents" }),
27234
+ /* @__PURE__ */ jsx31(Text26, { children: " a / e / r add \xB7 edit \xB7 remove" }),
27235
+ /* @__PURE__ */ jsx31(Text26, { children: " \u2191\u2193 navigate the list" }),
27236
+ /* @__PURE__ */ jsx31(Text26, { children: " K / J reorder up \xB7 down" }),
27237
+ /* @__PURE__ */ jsx31(Text26, { children: " " }),
27238
+ /* @__PURE__ */ jsx31(Text26, { bold: true, children: "Panels" }),
27239
+ /* @__PURE__ */ jsx31(Text26, { children: " s toggle source-view for the current prop" }),
27240
+ /* @__PURE__ */ jsx31(Text26, { children: " " + propRationaleKey.padEnd(16) + " toggle prop rationale panel" }),
27241
+ /* @__PURE__ */ jsx31(Text26, { children: " " + componentRationaleKey.padEnd(16) + " toggle component rationale panel" }),
27242
+ /* @__PURE__ */ jsx31(Text26, { children: " ? toggle this overlay" }),
27243
+ /* @__PURE__ */ jsx31(Text26, { children: " " }),
27244
+ /* @__PURE__ */ jsx31(Text26, { color: PALETTE.muted, children: "press ? or Esc to close" })
27298
27245
  ] }),
27299
- validationError && /* @__PURE__ */ jsx33(Text26, { color: PALETTE.error, children: "\u2717 " + validationError }),
27300
- /* @__PURE__ */ jsx33(Box24, { paddingTop: 1, children: /* @__PURE__ */ jsx33(Text26, { color: PALETTE.muted, children: modeLabel }) })
27246
+ validationError && /* @__PURE__ */ jsx31(Text26, { color: PALETTE.error, children: "\u2717 " + validationError }),
27247
+ /* @__PURE__ */ jsx31(Box25, { paddingTop: 1, children: /* @__PURE__ */ jsx31(Text26, { color: PALETTE.muted, children: modeLabel }) })
27301
27248
  ]
27302
27249
  }
27303
27250
  );
@@ -27354,23 +27301,23 @@ var init_wrap_text = __esm({
27354
27301
  });
27355
27302
 
27356
27303
  // packages/experience-design-system-cli/src/tui/import/steps/09-review/components/RationaleLine.tsx
27357
- import { Box as Box25, Text as Text27 } from "ink";
27358
- import { jsx as jsx34, jsxs as jsxs26 } from "react/jsx-runtime";
27304
+ import { Box as Box26, Text as Text27 } from "ink";
27305
+ import { jsx as jsx32, jsxs as jsxs26 } from "react/jsx-runtime";
27359
27306
  function RationaleLine({ line, active }) {
27360
27307
  if (line.kind === "blank") {
27361
- return /* @__PURE__ */ jsx34(Box25, { children: /* @__PURE__ */ jsx34(Text27, { children: " " }) });
27308
+ return /* @__PURE__ */ jsx32(Box26, { children: /* @__PURE__ */ jsx32(Text27, { children: " " }) });
27362
27309
  }
27363
27310
  if (line.kind === "heading") {
27364
- return /* @__PURE__ */ jsx34(Box25, { children: /* @__PURE__ */ jsx34(Text27, { bold: true, color: active ? PALETTE.accent : PALETTE.muted, children: line.text }) });
27311
+ return /* @__PURE__ */ jsx32(Box26, { children: /* @__PURE__ */ jsx32(Text27, { bold: true, color: active ? PALETTE.accent : PALETTE.muted, children: line.text }) });
27365
27312
  }
27366
27313
  if (line.kind === "label") {
27367
- return /* @__PURE__ */ jsxs26(Box25, { children: [
27368
- line.prefix && /* @__PURE__ */ jsx34(Text27, { children: line.prefix }),
27369
- /* @__PURE__ */ jsx34(Text27, { bold: true, color: active ? line.color : PALETTE.muted, children: line.text }),
27370
- line.suffix && /* @__PURE__ */ jsx34(Text27, { color: PALETTE.muted, children: line.suffix })
27314
+ return /* @__PURE__ */ jsxs26(Box26, { children: [
27315
+ line.prefix && /* @__PURE__ */ jsx32(Text27, { children: line.prefix }),
27316
+ /* @__PURE__ */ jsx32(Text27, { bold: true, color: active ? line.color : PALETTE.muted, children: line.text }),
27317
+ line.suffix && /* @__PURE__ */ jsx32(Text27, { color: PALETTE.muted, children: line.suffix })
27371
27318
  ] });
27372
27319
  }
27373
- return /* @__PURE__ */ jsx34(Box25, { children: /* @__PURE__ */ jsx34(Text27, { color: !active || line.dim ? PALETTE.muted : void 0, children: line.text }) });
27320
+ return /* @__PURE__ */ jsx32(Box26, { children: /* @__PURE__ */ jsx32(Text27, { color: !active || line.dim ? PALETTE.muted : void 0, children: line.text }) });
27374
27321
  }
27375
27322
  var init_RationaleLine = __esm({
27376
27323
  "packages/experience-design-system-cli/src/tui/import/steps/09-review/components/RationaleLine.tsx"() {
@@ -27380,8 +27327,8 @@ var init_RationaleLine = __esm({
27380
27327
  });
27381
27328
 
27382
27329
  // packages/experience-design-system-cli/src/tui/import/steps/09-review/components/ComponentRationalePanel.tsx
27383
- import { Box as Box26, Text as Text28 } from "ink";
27384
- import { jsx as jsx35, jsxs as jsxs27 } from "react/jsx-runtime";
27330
+ import { Box as Box27, Text as Text28 } from "ink";
27331
+ import { jsx as jsx33, jsxs as jsxs27 } from "react/jsx-runtime";
27385
27332
  function renderComponentRationaleLines(data, innerWidth) {
27386
27333
  const out = [];
27387
27334
  const pushSection = (heading, body) => {
@@ -27449,7 +27396,7 @@ function ComponentRationalePanel({
27449
27396
  const visibleStart = totalLines === 0 ? 0 : scrollOffset + 1;
27450
27397
  const visibleEnd = Math.min(totalLines, scrollOffset + contentHeight);
27451
27398
  return /* @__PURE__ */ jsxs27(
27452
- Box26,
27399
+ Box27,
27453
27400
  {
27454
27401
  flexDirection: "column",
27455
27402
  width,
@@ -27457,9 +27404,9 @@ function ComponentRationalePanel({
27457
27404
  borderStyle: "single",
27458
27405
  borderColor: active ? PALETTE.text : void 0,
27459
27406
  children: [
27460
- /* @__PURE__ */ jsx35(Box26, { children: /* @__PURE__ */ jsx35(Text28, { bold: true, color: active ? void 0 : PALETTE.muted, children: `Component rationale: ${data.name}` }) }),
27461
- visible.map((line, i) => /* @__PURE__ */ jsx35(RationaleLine, { line, active }, i)),
27462
- /* @__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" }) })
27407
+ /* @__PURE__ */ jsx33(Box27, { children: /* @__PURE__ */ jsx33(Text28, { bold: true, color: active ? void 0 : PALETTE.muted, children: `Component rationale: ${data.name}` }) }),
27408
+ visible.map((line, i) => /* @__PURE__ */ jsx33(RationaleLine, { line, active }, i)),
27409
+ /* @__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" }) })
27463
27410
  ]
27464
27411
  }
27465
27412
  );
@@ -27477,9 +27424,9 @@ var init_ComponentRationalePanel = __esm({
27477
27424
 
27478
27425
  // packages/experience-design-system-cli/src/tui/import/steps/09-review/components/HighlightedLine.tsx
27479
27426
  import { Text as Text29 } from "ink";
27480
- import { Fragment as Fragment9, jsx as jsx36 } from "react/jsx-runtime";
27427
+ import { Fragment as Fragment7, jsx as jsx34 } from "react/jsx-runtime";
27481
27428
  function HighlightedLine({ parts }) {
27482
- return /* @__PURE__ */ jsx36(Fragment9, { children: parts.map((part, i) => /* @__PURE__ */ jsx36(Text29, { color: part.dim ? PALETTE.muted : part.color, children: part.text }, i)) });
27429
+ return /* @__PURE__ */ jsx34(Fragment7, { children: parts.map((part, i) => /* @__PURE__ */ jsx34(Text29, { color: part.dim ? PALETTE.muted : part.color, children: part.text }, i)) });
27483
27430
  }
27484
27431
  var init_HighlightedLine = __esm({
27485
27432
  "packages/experience-design-system-cli/src/tui/import/steps/09-review/components/HighlightedLine.tsx"() {
@@ -27489,8 +27436,8 @@ var init_HighlightedLine = __esm({
27489
27436
  });
27490
27437
 
27491
27438
  // packages/experience-design-system-cli/src/tui/import/steps/09-review/components/ScrollablePanel.tsx
27492
- import { Box as Box27, Text as Text30 } from "ink";
27493
- import { Fragment as Fragment10, jsx as jsx37, jsxs as jsxs28 } from "react/jsx-runtime";
27439
+ import { Box as Box28, Text as Text30 } from "ink";
27440
+ import { Fragment as Fragment8, jsx as jsx35, jsxs as jsxs28 } from "react/jsx-runtime";
27494
27441
  function ScrollablePanel({
27495
27442
  title,
27496
27443
  width,
@@ -27503,12 +27450,12 @@ function ScrollablePanel({
27503
27450
  children
27504
27451
  }) {
27505
27452
  const overflowed = totalLines > height;
27506
- return /* @__PURE__ */ jsxs28(Box27, { flexDirection: "column", width, height: height + 2, borderStyle: "single", borderColor, children: [
27507
- /* @__PURE__ */ jsxs28(Box27, { children: [
27508
- /* @__PURE__ */ jsx37(Text30, { bold: true, color: active ? void 0 : PALETTE.muted, children: title }),
27509
- overflowed && /* @__PURE__ */ jsxs28(Fragment10, { children: [
27510
- /* @__PURE__ */ jsx37(Box27, { flexGrow: 1 }),
27511
- /* @__PURE__ */ jsx37(Text30, { color: active ? void 0 : PALETTE.muted, children: `\u2195 ${visibleStart}-${visibleEnd}/${totalLines}` })
27453
+ return /* @__PURE__ */ jsxs28(Box28, { flexDirection: "column", width, height: height + 2, borderStyle: "single", borderColor, children: [
27454
+ /* @__PURE__ */ jsxs28(Box28, { children: [
27455
+ /* @__PURE__ */ jsx35(Text30, { bold: true, color: active ? void 0 : PALETTE.muted, children: title }),
27456
+ overflowed && /* @__PURE__ */ jsxs28(Fragment8, { children: [
27457
+ /* @__PURE__ */ jsx35(Box28, { flexGrow: 1 }),
27458
+ /* @__PURE__ */ jsx35(Text30, { color: active ? void 0 : PALETTE.muted, children: `\u2195 ${visibleStart}-${visibleEnd}/${totalLines}` })
27512
27459
  ] })
27513
27460
  ] }),
27514
27461
  children
@@ -27522,8 +27469,8 @@ var init_ScrollablePanel = __esm({
27522
27469
  });
27523
27470
 
27524
27471
  // packages/experience-design-system-cli/src/tui/import/steps/09-review/components/JsonPanel.tsx
27525
- import { Box as Box28 } from "ink";
27526
- import { jsx as jsx38 } from "react/jsx-runtime";
27472
+ import { Box as Box29 } from "ink";
27473
+ import { jsx as jsx36 } from "react/jsx-runtime";
27527
27474
  function highlightJson(line) {
27528
27475
  const parts = [];
27529
27476
  let remaining = line;
@@ -27561,7 +27508,7 @@ function highlightJson(line) {
27561
27508
  parts.push({ text: remaining[0] });
27562
27509
  remaining = remaining.slice(1);
27563
27510
  }
27564
- return /* @__PURE__ */ jsx38(HighlightedLine, { parts });
27511
+ return /* @__PURE__ */ jsx36(HighlightedLine, { parts });
27565
27512
  }
27566
27513
  function truncateLine(line, maxWidth) {
27567
27514
  if (line.length <= maxWidth) return line;
@@ -27574,7 +27521,7 @@ function JsonPanel({ label, value, scrollOffset, width, height, active }) {
27574
27521
  const totalLines = allLines.length;
27575
27522
  const visibleStart = totalLines === 0 ? 0 : scrollOffset + 1;
27576
27523
  const visibleEnd = Math.min(totalLines, scrollOffset + height);
27577
- return /* @__PURE__ */ jsx38(
27524
+ return /* @__PURE__ */ jsx36(
27578
27525
  ScrollablePanel,
27579
27526
  {
27580
27527
  title: label,
@@ -27587,7 +27534,7 @@ function JsonPanel({ label, value, scrollOffset, width, height, active }) {
27587
27534
  borderColor: active ? "white" : void 0,
27588
27535
  children: visibleLines.map((line, i) => {
27589
27536
  const truncated = truncateLine(line, innerWidth);
27590
- return /* @__PURE__ */ jsx38(Box28, { children: highlightJson(truncated) }, i);
27537
+ return /* @__PURE__ */ jsx36(Box29, { children: highlightJson(truncated) }, i);
27591
27538
  })
27592
27539
  }
27593
27540
  );
@@ -27601,7 +27548,7 @@ var init_JsonPanel = __esm({
27601
27548
  });
27602
27549
 
27603
27550
  // packages/experience-design-system-cli/src/tui/import/steps/09-review/components/RationalePanel.tsx
27604
- import { jsx as jsx39 } from "react/jsx-runtime";
27551
+ import { jsx as jsx37 } from "react/jsx-runtime";
27605
27552
  function renderRationaleLines(rows, innerWidth) {
27606
27553
  const out = [];
27607
27554
  rows.forEach((row, idx) => {
@@ -27634,7 +27581,7 @@ function RationalePanel({
27634
27581
  const visible = allLines.slice(scrollOffset, scrollOffset + height);
27635
27582
  const visibleStart = totalLines === 0 ? 0 : scrollOffset + 1;
27636
27583
  const visibleEnd = Math.min(totalLines, scrollOffset + height);
27637
- return /* @__PURE__ */ jsx39(
27584
+ return /* @__PURE__ */ jsx37(
27638
27585
  ScrollablePanel,
27639
27586
  {
27640
27587
  title: `RATIONALE \u2014 ${componentName}`,
@@ -27645,7 +27592,7 @@ function RationalePanel({
27645
27592
  visibleStart,
27646
27593
  visibleEnd,
27647
27594
  borderColor: active ? PALETTE.text : void 0,
27648
- children: visible.map((line, i) => /* @__PURE__ */ jsx39(RationaleLine, { line, active }, i))
27595
+ children: visible.map((line, i) => /* @__PURE__ */ jsx37(RationaleLine, { line, active }, i))
27649
27596
  }
27650
27597
  );
27651
27598
  }
@@ -27661,8 +27608,8 @@ var init_RationalePanel = __esm({
27661
27608
 
27662
27609
  // packages/experience-design-system-cli/src/tui/import/steps/09-review/components/TokenReviewPanel.tsx
27663
27610
  import figures7 from "figures";
27664
- import { Box as Box29, Text as Text31 } from "ink";
27665
- import { jsx as jsx40, jsxs as jsxs29 } from "react/jsx-runtime";
27611
+ import { Box as Box30, Text as Text31 } from "ink";
27612
+ import { jsx as jsx38, jsxs as jsxs29 } from "react/jsx-runtime";
27666
27613
  function TokenReviewPanel({
27667
27614
  componentName,
27668
27615
  suggestions,
@@ -27682,7 +27629,7 @@ function TokenReviewPanel({
27682
27629
  const visiblePaths = current.paths.slice(scrollStart, scrollStart + visibleCount);
27683
27630
  const rangeLabel = current.paths.length === 0 ? "no compatible tokens" : `${scrollStart + 1}-${scrollStart + visiblePaths.length} of ${current.paths.length}`;
27684
27631
  return /* @__PURE__ */ jsxs29(
27685
- Box29,
27632
+ Box30,
27686
27633
  {
27687
27634
  flexDirection: "column",
27688
27635
  width,
@@ -27690,15 +27637,15 @@ function TokenReviewPanel({
27690
27637
  borderStyle: "single",
27691
27638
  borderColor: active ? PALETTE.text : void 0,
27692
27639
  children: [
27693
- /* @__PURE__ */ jsx40(Text31, { bold: true, color: active ? void 0 : PALETTE.muted, wrap: "truncate", children: `TOKEN REVIEW \u2014 ${componentName} \xB7 ${current.propName} (edit allowed)` }),
27694
- /* @__PURE__ */ jsx40(Text31, { color: PALETTE.muted, wrap: "truncate", children: `select which tokens are allowed (${rangeLabel})` }),
27695
- /* @__PURE__ */ jsx40(Text31, { children: " " }),
27696
- current.paths.length === 0 && /* @__PURE__ */ jsx40(Text31, { color: PALETTE.muted, children: "(no compatible tokens found for this token kind)" }),
27640
+ /* @__PURE__ */ jsx38(Text31, { bold: true, color: active ? void 0 : PALETTE.muted, wrap: "truncate", children: `TOKEN REVIEW \u2014 ${componentName} \xB7 ${current.propName} (edit allowed)` }),
27641
+ /* @__PURE__ */ jsx38(Text31, { color: PALETTE.muted, wrap: "truncate", children: `select which tokens are allowed (${rangeLabel})` }),
27642
+ /* @__PURE__ */ jsx38(Text31, { children: " " }),
27643
+ current.paths.length === 0 && /* @__PURE__ */ jsx38(Text31, { color: PALETTE.muted, children: "(no compatible tokens found for this token kind)" }),
27697
27644
  visiblePaths.map((path5, i) => {
27698
27645
  const pathIndex = scrollStart + i;
27699
27646
  const checked = editSelection.has(path5);
27700
27647
  const focused = pathIndex === editCursor;
27701
- return /* @__PURE__ */ jsx40(Box29, { children: /* @__PURE__ */ jsx40(
27648
+ return /* @__PURE__ */ jsx38(Box30, { children: /* @__PURE__ */ jsx38(
27702
27649
  Text31,
27703
27650
  {
27704
27651
  color: focused ? PALETTE.accent : active ? void 0 : PALETTE.muted,
@@ -27708,15 +27655,15 @@ function TokenReviewPanel({
27708
27655
  }
27709
27656
  ) }, path5);
27710
27657
  }),
27711
- /* @__PURE__ */ jsx40(Text31, { children: " " }),
27712
- /* @__PURE__ */ jsx40(Text31, { color: PALETTE.muted, wrap: "truncate", children: "[\u2191/\u2193] move [Space] toggle" }),
27713
- /* @__PURE__ */ jsx40(Text31, { color: PALETTE.muted, wrap: "truncate", children: "[Ctrl+S] save [Esc] cancel" })
27658
+ /* @__PURE__ */ jsx38(Text31, { children: " " }),
27659
+ /* @__PURE__ */ jsx38(Text31, { color: PALETTE.muted, wrap: "truncate", children: "[\u2191/\u2193] move [Space] toggle" }),
27660
+ /* @__PURE__ */ jsx38(Text31, { color: PALETTE.muted, wrap: "truncate", children: "[Ctrl+S] save [Esc] cancel" })
27714
27661
  ]
27715
27662
  }
27716
27663
  );
27717
27664
  }
27718
27665
  return /* @__PURE__ */ jsxs29(
27719
- Box29,
27666
+ Box30,
27720
27667
  {
27721
27668
  flexDirection: "column",
27722
27669
  width,
@@ -27724,18 +27671,18 @@ function TokenReviewPanel({
27724
27671
  borderStyle: "single",
27725
27672
  borderColor: active ? PALETTE.text : void 0,
27726
27673
  children: [
27727
- /* @__PURE__ */ jsx40(Text31, { bold: true, color: active ? void 0 : PALETTE.muted, children: `TOKEN REVIEW \u2014 ${componentName}` }),
27728
- suggestions.length === 0 && /* @__PURE__ */ jsx40(Text31, { color: PALETTE.muted, children: "(no token suggestions for this component)" }),
27674
+ /* @__PURE__ */ jsx38(Text31, { bold: true, color: active ? void 0 : PALETTE.muted, children: `TOKEN REVIEW \u2014 ${componentName}` }),
27675
+ suggestions.length === 0 && /* @__PURE__ */ jsx38(Text31, { color: PALETTE.muted, children: "(no token suggestions for this component)" }),
27729
27676
  suggestions.map((s, i) => {
27730
27677
  const focused = i === selectedRow;
27731
- return /* @__PURE__ */ jsxs29(Box29, { flexDirection: "column", children: [
27732
- /* @__PURE__ */ jsx40(Box29, { children: /* @__PURE__ */ jsx40(Text31, { color: focused ? PALETTE.accent : active ? void 0 : PALETTE.muted, bold: focused, children: `${focused ? figures7.pointer : " "} ${s.propName}` }) }),
27733
- /* @__PURE__ */ jsx40(Text31, { color: PALETTE.muted, children: ` suggested: ${s.suggested.join(", ")}` }),
27734
- /* @__PURE__ */ jsx40(Text31, { color: PALETTE.muted, children: ` allowed: ${s.allowed.join(", ")}` })
27678
+ return /* @__PURE__ */ jsxs29(Box30, { flexDirection: "column", children: [
27679
+ /* @__PURE__ */ jsx38(Box30, { children: /* @__PURE__ */ jsx38(Text31, { color: focused ? PALETTE.accent : active ? void 0 : PALETTE.muted, bold: focused, children: `${focused ? figures7.pointer : " "} ${s.propName}` }) }),
27680
+ /* @__PURE__ */ jsx38(Text31, { color: PALETTE.muted, children: ` suggested: ${s.suggested.join(", ")}` }),
27681
+ /* @__PURE__ */ jsx38(Text31, { color: PALETTE.muted, children: ` allowed: ${s.allowed.join(", ")}` })
27735
27682
  ] }, s.propName);
27736
27683
  }),
27737
- /* @__PURE__ */ jsx40(Text31, { children: " " }),
27738
- /* @__PURE__ */ jsx40(Text31, { children: "[\u2191/\u2193] move [Enter] edit allowed [Esc] close" })
27684
+ /* @__PURE__ */ jsx38(Text31, { children: " " }),
27685
+ /* @__PURE__ */ jsx38(Text31, { children: "[\u2191/\u2193] move [Enter] edit allowed [Esc] close" })
27739
27686
  ]
27740
27687
  }
27741
27688
  );
@@ -27749,7 +27696,7 @@ var init_TokenReviewPanel = __esm({
27749
27696
 
27750
27697
  // packages/experience-design-system-cli/src/tui/import/steps/09-review/review-details-panel.tsx
27751
27698
  import { Text as Text32 } from "ink";
27752
- import { Fragment as Fragment11, jsx as jsx41, jsxs as jsxs30 } from "react/jsx-runtime";
27699
+ import { Fragment as Fragment9, jsx as jsx39, jsxs as jsxs30 } from "react/jsx-runtime";
27753
27700
  function ReviewDetailsPanel({
27754
27701
  selectedKey,
27755
27702
  panelOpen,
@@ -27784,7 +27731,7 @@ function ReviewDetailsPanel({
27784
27731
  rationale: s.rationale ?? ""
27785
27732
  }))
27786
27733
  ];
27787
- return /* @__PURE__ */ jsx41(
27734
+ return /* @__PURE__ */ jsx39(
27788
27735
  RationalePanel,
27789
27736
  {
27790
27737
  componentName: componentRationale?.name ?? selectedKey,
@@ -27797,7 +27744,7 @@ function ReviewDetailsPanel({
27797
27744
  );
27798
27745
  }
27799
27746
  if (panelOpen === "component-rationale") {
27800
- return /* @__PURE__ */ jsx41(
27747
+ return /* @__PURE__ */ jsx39(
27801
27748
  ComponentRationalePanel,
27802
27749
  {
27803
27750
  data: componentRationale ?? {
@@ -27823,13 +27770,13 @@ function ReviewDetailsPanel({
27823
27770
  const sourceLineCount = Math.max(1, height - 4);
27824
27771
  const lines = source ? source.split("\n").slice(panelScrollOffset, panelScrollOffset + sourceLineCount) : [];
27825
27772
  return /* @__PURE__ */ jsxs30(FixedPanel, { width, height, borderStyle: "single", borderColor: sourceBorderColor, paddingLeft: 1, children: [
27826
- /* @__PURE__ */ jsx41(Text32, { color: PALETTE.muted, bold: true, wrap: "truncate-end", children: `source: ${headerPath}` }),
27827
- 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)" }),
27828
- /* @__PURE__ */ jsx41(Text32, { color: PALETTE.muted, wrap: "truncate-end", children: "[s/Esc] close" })
27773
+ /* @__PURE__ */ jsx39(Text32, { color: PALETTE.muted, bold: true, wrap: "truncate-end", children: `source: ${headerPath}` }),
27774
+ 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)" }),
27775
+ /* @__PURE__ */ jsx39(Text32, { color: PALETTE.muted, wrap: "truncate-end", children: "[s/Esc] close" })
27829
27776
  ] });
27830
27777
  }
27831
27778
  if (panelOpen === "token-review") {
27832
- return /* @__PURE__ */ jsx41(
27779
+ return /* @__PURE__ */ jsx39(
27833
27780
  TokenReviewPanel,
27834
27781
  {
27835
27782
  componentName: selectedKey,
@@ -27845,7 +27792,7 @@ function ReviewDetailsPanel({
27845
27792
  );
27846
27793
  }
27847
27794
  if (showJson) {
27848
- return /* @__PURE__ */ jsx41(
27795
+ return /* @__PURE__ */ jsx39(
27849
27796
  JsonPanel,
27850
27797
  {
27851
27798
  label: "GENERATED DEFINITION (read-only)",
@@ -27857,7 +27804,7 @@ function ReviewDetailsPanel({
27857
27804
  }
27858
27805
  );
27859
27806
  }
27860
- return /* @__PURE__ */ jsx41(Fragment11, { children: editor });
27807
+ return /* @__PURE__ */ jsx39(Fragment9, { children: editor });
27861
27808
  }
27862
27809
  var init_review_details_panel = __esm({
27863
27810
  "packages/experience-design-system-cli/src/tui/import/steps/09-review/review-details-panel.tsx"() {
@@ -27872,7 +27819,7 @@ var init_review_details_panel = __esm({
27872
27819
  });
27873
27820
 
27874
27821
  // packages/experience-design-system-cli/src/tui/import/steps/09-review/components/ReviewDetailsEditor.tsx
27875
- import { jsx as jsx42 } from "react/jsx-runtime";
27822
+ import { jsx as jsx40 } from "react/jsx-runtime";
27876
27823
  import { createElement } from "react";
27877
27824
  function toFieldEditorMetadata(reviewMetadata) {
27878
27825
  if (!reviewMetadata) return void 0;
@@ -27906,7 +27853,7 @@ function ReviewDetailsEditor({
27906
27853
  jsonScrollOffset,
27907
27854
  currentTokenSuggestions
27908
27855
  } = reviewEditor;
27909
- return /* @__PURE__ */ jsx42(
27856
+ return /* @__PURE__ */ jsx40(
27910
27857
  ReviewDetailsPanel,
27911
27858
  {
27912
27859
  selectedKey,
@@ -27953,8 +27900,8 @@ var init_ReviewDetailsEditor = __esm({
27953
27900
  });
27954
27901
 
27955
27902
  // packages/experience-design-system-cli/src/tui/import/steps/09-review/components/ReviewComponentPanel.tsx
27956
- import { Box as Box30, Text as Text33 } from "ink";
27957
- import { Fragment as Fragment12, jsx as jsx43, jsxs as jsxs31 } from "react/jsx-runtime";
27903
+ import { Box as Box31, Text as Text33 } from "ink";
27904
+ import { Fragment as Fragment10, jsx as jsx41, jsxs as jsxs31 } from "react/jsx-runtime";
27958
27905
  function buildReviewFieldEditor(reviewEditor, selectedJson, onExit, overrides = {}) {
27959
27906
  return {
27960
27907
  value: reviewEditor.draftValue || selectedJson,
@@ -27994,17 +27941,17 @@ function ReviewEmptyComponentsWarning({
27994
27941
  hidden
27995
27942
  }) {
27996
27943
  if (hidden || count === 0) return null;
27997
- return /* @__PURE__ */ jsx43(Text33, { color: PALETTE.warning, children: `\u26A0 ${count} component${count === 1 ? "" : "s"} had no classifiable props \u2014 review with care` });
27944
+ return /* @__PURE__ */ jsx41(Text33, { color: PALETTE.warning, children: `\u26A0 ${count} component${count === 1 ? "" : "s"} had no classifiable props \u2014 review with care` });
27998
27945
  }
27999
27946
  function ReviewNoSelection() {
28000
- return /* @__PURE__ */ jsx43(Box30, { flexGrow: 1, paddingLeft: 1, flexDirection: "column", children: /* @__PURE__ */ jsx43(Text33, { color: PALETTE.muted, children: "No component selected" }) });
27947
+ return /* @__PURE__ */ jsx41(Box31, { flexGrow: 1, paddingLeft: 1, flexDirection: "column", children: /* @__PURE__ */ jsx41(Text33, { color: PALETTE.muted, children: "No component selected" }) });
28001
27948
  }
28002
27949
  function ReviewFinalizeError({
28003
27950
  message,
28004
27951
  hidden
28005
27952
  }) {
28006
27953
  if (hidden || !message) return null;
28007
- return /* @__PURE__ */ jsx43(Text33, { color: PALETTE.error, children: `\u26A0 ${message}` });
27954
+ return /* @__PURE__ */ jsx41(Text33, { color: PALETTE.error, children: `\u26A0 ${message}` });
28008
27955
  }
28009
27956
  function ReviewPanelFooter({
28010
27957
  reviewEditor,
@@ -28013,10 +27960,10 @@ function ReviewPanelFooter({
28013
27960
  livePreview,
28014
27961
  livePreviewSpinner
28015
27962
  }) {
28016
- return /* @__PURE__ */ jsxs31(Fragment12, { children: [
27963
+ return /* @__PURE__ */ jsxs31(Fragment10, { children: [
28017
27964
  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" : ""),
28018
- livePreview.status === "running" && /* @__PURE__ */ jsx43(Text33, { children: ` ${livePreviewSpinner} live preview` }),
28019
- livePreview.disabled && /* @__PURE__ */ jsx43(Text33, { children: " \xB7 live preview disabled" })
27965
+ livePreview.status === "running" && /* @__PURE__ */ jsx41(Text33, { children: ` ${livePreviewSpinner} live preview` }),
27966
+ livePreview.disabled && /* @__PURE__ */ jsx41(Text33, { children: " \xB7 live preview disabled" })
28020
27967
  ] });
28021
27968
  }
28022
27969
  function ReviewComponentTitle({
@@ -28025,9 +27972,9 @@ function ReviewComponentTitle({
28025
27972
  slotCount,
28026
27973
  sidebarFocused
28027
27974
  }) {
28028
- return /* @__PURE__ */ jsxs31(Box30, { paddingLeft: 2, paddingBottom: 1, children: [
28029
- /* @__PURE__ */ jsx43(Text33, { bold: true, wrap: "truncate-end", children: selectedKey }),
28030
- /* @__PURE__ */ jsx43(Box30, { flexGrow: 1 }),
27975
+ return /* @__PURE__ */ jsxs31(Box31, { paddingLeft: 2, paddingBottom: 1, children: [
27976
+ /* @__PURE__ */ jsx41(Text33, { bold: true, wrap: "truncate-end", children: selectedKey }),
27977
+ /* @__PURE__ */ jsx41(Box31, { flexGrow: 1 }),
28031
27978
  /* @__PURE__ */ jsxs31(Text33, { color: PALETTE.muted, wrap: "truncate-end", children: [
28032
27979
  propCount,
28033
27980
  " prop",
@@ -28059,8 +28006,8 @@ function ReviewComponentPanel({
28059
28006
  const slotCount = selectedEntry.$slots ? Object.keys(selectedEntry.$slots).length : 0;
28060
28007
  const contentHeight = Math.max(1, height - 2);
28061
28008
  const contentWidth = Math.max(1, width - 1);
28062
- 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: [
28063
- /* @__PURE__ */ jsx43(Box30, { width: contentWidth, height: contentHeight, flexShrink: 0, overflowY: "hidden", children: /* @__PURE__ */ jsx43(
28009
+ 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: [
28010
+ /* @__PURE__ */ jsx41(Box31, { width: contentWidth, height: contentHeight, flexShrink: 0, overflowY: "hidden", children: /* @__PURE__ */ jsx41(
28064
28011
  ReviewDetailsEditor,
28065
28012
  {
28066
28013
  selectedKey,
@@ -28073,7 +28020,7 @@ function ReviewComponentPanel({
28073
28020
  jsonValue,
28074
28021
  sidebarFocused,
28075
28022
  fieldEditor,
28076
- header: /* @__PURE__ */ jsx43(
28023
+ header: /* @__PURE__ */ jsx41(
28077
28024
  ReviewComponentTitle,
28078
28025
  {
28079
28026
  selectedKey,
@@ -28084,8 +28031,8 @@ function ReviewComponentPanel({
28084
28031
  )
28085
28032
  }
28086
28033
  ) }),
28087
- /* @__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 : " " }) }),
28088
- /* @__PURE__ */ jsx43(Box30, { width: contentWidth, height: 1, flexShrink: 0, children: /* @__PURE__ */ jsx43(Text33, { color: PALETTE.muted, wrap: "truncate-end", children: /* @__PURE__ */ jsx43(
28034
+ /* @__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 : " " }) }),
28035
+ /* @__PURE__ */ jsx41(Box31, { width: contentWidth, height: 1, flexShrink: 0, children: /* @__PURE__ */ jsx41(Text33, { color: PALETTE.muted, wrap: "truncate-end", children: /* @__PURE__ */ jsx41(
28089
28036
  ReviewPanelFooter,
28090
28037
  {
28091
28038
  reviewEditor,
@@ -28108,8 +28055,8 @@ var init_ReviewComponentPanel = __esm({
28108
28055
  });
28109
28056
 
28110
28057
  // packages/experience-design-system-cli/src/tui/import/steps/09-review/components/ReviewStatus.tsx
28111
- import { Box as Box31, Text as Text34 } from "ink";
28112
- import { jsx as jsx44, jsxs as jsxs32 } from "react/jsx-runtime";
28058
+ import { Box as Box32, Text as Text34 } from "ink";
28059
+ import { jsx as jsx42, jsxs as jsxs32 } from "react/jsx-runtime";
28113
28060
  function countReviewStatuses(entries) {
28114
28061
  return entries.reduce(
28115
28062
  (counts, entry) => {
@@ -28122,13 +28069,13 @@ function countReviewStatuses(entries) {
28122
28069
  );
28123
28070
  }
28124
28071
  function ReviewLoadingState() {
28125
- return /* @__PURE__ */ jsx44(Box31, { paddingX: 2, paddingY: 1, children: /* @__PURE__ */ jsx44(Text34, { color: PALETTE.muted, children: "Loading generated definitions..." }) });
28072
+ return /* @__PURE__ */ jsx42(Box32, { paddingX: 2, paddingY: 1, children: /* @__PURE__ */ jsx42(Text34, { color: PALETTE.muted, children: "Loading generated definitions..." }) });
28126
28073
  }
28127
28074
  function ReviewLoadError({ message }) {
28128
- return /* @__PURE__ */ jsxs32(Box31, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
28129
- /* @__PURE__ */ jsx44(Text34, { color: PALETTE.error, children: message }),
28130
- /* @__PURE__ */ jsx44(Text34, { children: " " }),
28131
- /* @__PURE__ */ jsx44(ControlHints, { hints: [{ keys: "q / Enter / Esc", label: "Quit" }] })
28075
+ return /* @__PURE__ */ jsxs32(Box32, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
28076
+ /* @__PURE__ */ jsx42(Text34, { color: PALETTE.error, children: message }),
28077
+ /* @__PURE__ */ jsx42(Text34, { children: " " }),
28078
+ /* @__PURE__ */ jsx42(ControlHints, { hints: [{ keys: "q / Enter / Esc", label: "Quit" }] })
28132
28079
  ] });
28133
28080
  }
28134
28081
  var init_ReviewStatus = __esm({
@@ -28352,8 +28299,8 @@ var init_run_live_preview = __esm({
28352
28299
  });
28353
28300
 
28354
28301
  // packages/experience-design-system-cli/src/tui/import/steps/09-review/components/FinalizeDialog.tsx
28355
- import { Box as Box32, Text as Text35 } from "ink";
28356
- import { Fragment as Fragment13, jsx as jsx45, jsxs as jsxs33 } from "react/jsx-runtime";
28302
+ import { Box as Box33, Text as Text35 } from "ink";
28303
+ import { Fragment as Fragment11, jsx as jsx43, jsxs as jsxs33 } from "react/jsx-runtime";
28357
28304
  function FinalizeDialog({
28358
28305
  accepted,
28359
28306
  rejected,
@@ -28381,51 +28328,51 @@ function FinalizeDialog({
28381
28328
  const windowed = removed.slice(offset, offset + FINALIZE_REMOVED_WINDOW);
28382
28329
  const hasMoreBelow = offset + FINALIZE_REMOVED_WINDOW < removed.length;
28383
28330
  const hasMoreAbove = offset > 0;
28384
- return /* @__PURE__ */ jsx45(Box32, { width: "100%", paddingX: 2, children: /* @__PURE__ */ jsxs33(Box32, { flexDirection: "column", alignItems: "flex-start", children: [
28385
- /* @__PURE__ */ jsx45(Text35, { bold: true, children: "Finalize" }),
28386
- /* @__PURE__ */ jsx45(Text35, { children: " " }),
28331
+ return /* @__PURE__ */ jsx43(Box33, { width: "100%", paddingX: 2, children: /* @__PURE__ */ jsxs33(Box33, { flexDirection: "column", alignItems: "flex-start", children: [
28332
+ /* @__PURE__ */ jsx43(Text35, { bold: true, children: "Finalize" }),
28333
+ /* @__PURE__ */ jsx43(Text35, { children: " " }),
28387
28334
  /* @__PURE__ */ jsxs33(Text35, { children: [
28388
28335
  /* @__PURE__ */ jsxs33(Text35, { color: PALETTE.success, children: [
28389
28336
  accepted,
28390
28337
  " accepted"
28391
28338
  ] }),
28392
- /* @__PURE__ */ jsx45(Text35, { children: " \xB7 " }),
28339
+ /* @__PURE__ */ jsx43(Text35, { children: " \xB7 " }),
28393
28340
  /* @__PURE__ */ jsxs33(Text35, { color: PALETTE.error, children: [
28394
28341
  rejected,
28395
28342
  " rejected"
28396
28343
  ] }),
28397
- /* @__PURE__ */ jsx45(Text35, { children: " \xB7 " }),
28344
+ /* @__PURE__ */ jsx43(Text35, { children: " \xB7 " }),
28398
28345
  /* @__PURE__ */ jsxs33(Text35, { color: PALETTE.muted, children: [
28399
28346
  needsReview,
28400
28347
  " unresolved"
28401
28348
  ] })
28402
28349
  ] }),
28403
- /* @__PURE__ */ jsx45(Text35, { children: " " }),
28404
- noneAccepted && /* @__PURE__ */ jsxs33(Fragment13, { children: [
28405
- /* @__PURE__ */ jsx45(Text35, { bold: true, color: PALETTE.warning, children: "\u26A0 No components are accepted \u2014 nothing will be pushed." }),
28406
- /* @__PURE__ */ jsx45(Text35, { color: PALETTE.warning, children: "Accept at least one component ([a] a row, [A] accept all) to push." }),
28407
- /* @__PURE__ */ jsx45(Text35, { children: " " })
28350
+ /* @__PURE__ */ jsx43(Text35, { children: " " }),
28351
+ noneAccepted && /* @__PURE__ */ jsxs33(Fragment11, { children: [
28352
+ /* @__PURE__ */ jsx43(Text35, { bold: true, color: PALETTE.warning, children: "\u26A0 No components are accepted \u2014 nothing will be pushed." }),
28353
+ /* @__PURE__ */ jsx43(Text35, { color: PALETTE.warning, children: "Accept at least one component ([a] a row, [A] accept all) to push." }),
28354
+ /* @__PURE__ */ jsx43(Text35, { children: " " })
28408
28355
  ] }),
28409
- !allResolved && /* @__PURE__ */ jsxs33(Fragment13, { children: [
28410
- /* @__PURE__ */ jsx45(Text35, { color: PALETTE.warning, children: "\u26A0 " + needsReview + " unresolved component" + (needsReview === 1 ? "" : "s") + " will not be pushed." }),
28411
- /* @__PURE__ */ jsx45(Text35, { color: PALETTE.warning, children: "Only explicitly accepted components ship." }),
28412
- /* @__PURE__ */ jsx45(Text35, { children: " " })
28356
+ !allResolved && /* @__PURE__ */ jsxs33(Fragment11, { children: [
28357
+ /* @__PURE__ */ jsx43(Text35, { color: PALETTE.warning, children: "\u26A0 " + needsReview + " unresolved component" + (needsReview === 1 ? "" : "s") + " will not be pushed." }),
28358
+ /* @__PURE__ */ jsx43(Text35, { color: PALETTE.warning, children: "Only explicitly accepted components ship." }),
28359
+ /* @__PURE__ */ jsx43(Text35, { children: " " })
28413
28360
  ] }),
28414
- /* @__PURE__ */ jsxs33(Box32, { flexDirection: "column", height: 2, children: [
28415
- 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: " " }),
28416
- /* @__PURE__ */ jsx45(Text35, { children: " " })
28361
+ /* @__PURE__ */ jsxs33(Box33, { flexDirection: "column", height: 2, children: [
28362
+ 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: " " }),
28363
+ /* @__PURE__ */ jsx43(Text35, { children: " " })
28417
28364
  ] }),
28418
- previewStatus === "done" && removed.length > 0 && /* @__PURE__ */ jsxs33(Fragment13, { children: [
28419
- /* @__PURE__ */ jsx45(Text35, { bold: true, color: PALETTE.error, children: removedComponentsHeader(removed.length, false) }),
28420
- hasMoreAbove && /* @__PURE__ */ jsx45(Text35, { color: PALETTE.muted, children: "\u2191 more above" }),
28421
- windowed.map((rc) => /* @__PURE__ */ jsx45(Text35, { color: PALETTE.error, children: removedComponentLine(rc) }, rc.id)),
28422
- hasMoreBelow && /* @__PURE__ */ jsx45(Text35, { color: PALETTE.muted, children: "\u2193 more below" }),
28423
- removed.length > FINALIZE_REMOVED_WINDOW && /* @__PURE__ */ jsx45(Text35, { children: "[\u2191\u2193] scroll deletions" }),
28424
- /* @__PURE__ */ jsx45(Text35, { children: " " })
28365
+ previewStatus === "done" && removed.length > 0 && /* @__PURE__ */ jsxs33(Fragment11, { children: [
28366
+ /* @__PURE__ */ jsx43(Text35, { bold: true, color: PALETTE.error, children: removedComponentsHeader(removed.length, false) }),
28367
+ hasMoreAbove && /* @__PURE__ */ jsx43(Text35, { color: PALETTE.muted, children: "\u2191 more above" }),
28368
+ windowed.map((rc) => /* @__PURE__ */ jsx43(Text35, { color: PALETTE.error, children: removedComponentLine(rc) }, rc.id)),
28369
+ hasMoreBelow && /* @__PURE__ */ jsx43(Text35, { color: PALETTE.muted, children: "\u2193 more below" }),
28370
+ removed.length > FINALIZE_REMOVED_WINDOW && /* @__PURE__ */ jsx43(Text35, { children: "[\u2191\u2193] scroll deletions" }),
28371
+ /* @__PURE__ */ jsx43(Text35, { children: " " })
28425
28372
  ] }),
28426
- /* @__PURE__ */ jsx45(Text35, { children: noneAccepted ? "Confirm exit with nothing accepted?" : allResolved ? "Save decisions and exit? All components resolved." : "Save decisions and exit?" }),
28427
- /* @__PURE__ */ jsx45(Text35, { children: " " }),
28428
- /* @__PURE__ */ jsx45(
28373
+ /* @__PURE__ */ jsx43(Text35, { children: noneAccepted ? "Confirm exit with nothing accepted?" : allResolved ? "Save decisions and exit? All components resolved." : "Save decisions and exit?" }),
28374
+ /* @__PURE__ */ jsx43(Text35, { children: " " }),
28375
+ /* @__PURE__ */ jsx43(
28429
28376
  ControlHints,
28430
28377
  {
28431
28378
  hints: [
@@ -28882,8 +28829,8 @@ var init_use_review_surface_state = __esm({
28882
28829
  });
28883
28830
 
28884
28831
  // packages/experience-design-system-cli/src/tui/import/steps/09-review/components/QuitDialog.tsx
28885
- import { Box as Box33, Text as Text36 } from "ink";
28886
- import { Fragment as Fragment14, jsx as jsx46, jsxs as jsxs34 } from "react/jsx-runtime";
28832
+ import { Box as Box34, Text as Text36 } from "ink";
28833
+ import { Fragment as Fragment12, jsx as jsx44, jsxs as jsxs34 } from "react/jsx-runtime";
28887
28834
  function QuitDialog({ hasUnsavedDrafts, onConfirm, onCancel }) {
28888
28835
  useImmediateInput((input, key) => {
28889
28836
  if (input === "y" || key.return) {
@@ -28892,16 +28839,16 @@ function QuitDialog({ hasUnsavedDrafts, onConfirm, onCancel }) {
28892
28839
  onCancel();
28893
28840
  }
28894
28841
  });
28895
- return /* @__PURE__ */ jsxs34(Box33, { flexDirection: "column", borderStyle: "round", padding: 1, width: 50, children: [
28896
- /* @__PURE__ */ jsx46(Text36, { bold: true, children: "\u2500".repeat(19) + " Quit " + "\u2500".repeat(19) }),
28897
- /* @__PURE__ */ jsx46(Text36, { children: " " }),
28898
- hasUnsavedDrafts ? /* @__PURE__ */ jsxs34(Fragment14, { children: [
28899
- /* @__PURE__ */ jsx46(Text36, { children: "You have unsaved draft edits." }),
28900
- /* @__PURE__ */ jsx46(Text36, { children: "Session state is preserved \u2014 you can resume" }),
28901
- /* @__PURE__ */ jsx46(Text36, { children: "by running the same review command again." })
28902
- ] }) : /* @__PURE__ */ jsx46(Text36, { children: "Session is saved. Quit without finalizing?" }),
28903
- /* @__PURE__ */ jsx46(Text36, { children: " " }),
28904
- /* @__PURE__ */ jsx46(
28842
+ return /* @__PURE__ */ jsxs34(Box34, { flexDirection: "column", borderStyle: "round", padding: 1, width: 50, children: [
28843
+ /* @__PURE__ */ jsx44(Text36, { bold: true, children: "\u2500".repeat(19) + " Quit " + "\u2500".repeat(19) }),
28844
+ /* @__PURE__ */ jsx44(Text36, { children: " " }),
28845
+ hasUnsavedDrafts ? /* @__PURE__ */ jsxs34(Fragment12, { children: [
28846
+ /* @__PURE__ */ jsx44(Text36, { children: "You have unsaved draft edits." }),
28847
+ /* @__PURE__ */ jsx44(Text36, { children: "Session state is preserved \u2014 you can resume" }),
28848
+ /* @__PURE__ */ jsx44(Text36, { children: "by running the same review command again." })
28849
+ ] }) : /* @__PURE__ */ jsx44(Text36, { children: "Session is saved. Quit without finalizing?" }),
28850
+ /* @__PURE__ */ jsx44(Text36, { children: " " }),
28851
+ /* @__PURE__ */ jsx44(
28905
28852
  ControlHints,
28906
28853
  {
28907
28854
  hints: [
@@ -28921,8 +28868,8 @@ var init_QuitDialog = __esm({
28921
28868
  });
28922
28869
 
28923
28870
  // packages/experience-design-system-cli/src/tui/import/steps/09-review/components/ReviewDialogs.tsx
28924
- import { Box as Box34, Text as Text37 } from "ink";
28925
- import { Fragment as Fragment15, jsx as jsx47, jsxs as jsxs35 } from "react/jsx-runtime";
28871
+ import { Box as Box35, Text as Text37 } from "ink";
28872
+ import { Fragment as Fragment13, jsx as jsx45, jsxs as jsxs35 } from "react/jsx-runtime";
28926
28873
  function ReviewFinalizeDialogs({
28927
28874
  showFinalize,
28928
28875
  showQuit,
@@ -28936,8 +28883,8 @@ function ReviewFinalizeDialogs({
28936
28883
  onQuitCancel
28937
28884
  }) {
28938
28885
  const { accepted, rejected, needsReview } = countReviewStatuses(components);
28939
- return /* @__PURE__ */ jsxs35(Fragment15, { children: [
28940
- showFinalize && /* @__PURE__ */ jsx47(
28886
+ return /* @__PURE__ */ jsxs35(Fragment13, { children: [
28887
+ showFinalize && /* @__PURE__ */ jsx45(
28941
28888
  FinalizeDialog,
28942
28889
  {
28943
28890
  accepted,
@@ -28950,7 +28897,7 @@ function ReviewFinalizeDialogs({
28950
28897
  onCancel: onFinalizeCancel
28951
28898
  }
28952
28899
  ),
28953
- showQuit && /* @__PURE__ */ jsx47(QuitDialog, { hasUnsavedDrafts: false, onConfirm: onQuitConfirm, onCancel: onQuitCancel })
28900
+ showQuit && /* @__PURE__ */ jsx45(QuitDialog, { hasUnsavedDrafts: false, onConfirm: onQuitConfirm, onCancel: onQuitCancel })
28954
28901
  ] });
28955
28902
  }
28956
28903
  function ReviewStepDialogs({
@@ -28960,7 +28907,7 @@ function ReviewStepDialogs({
28960
28907
  onFinalize,
28961
28908
  onQuit
28962
28909
  }) {
28963
- return /* @__PURE__ */ jsx47(
28910
+ return /* @__PURE__ */ jsx45(
28964
28911
  ReviewFinalizeDialogs,
28965
28912
  {
28966
28913
  showFinalize: surfaceState.showFinalize,
@@ -28978,12 +28925,12 @@ function ReviewStepDialogs({
28978
28925
  }
28979
28926
  function ReviewReloadDialog({ open }) {
28980
28927
  if (!open) return null;
28981
- return /* @__PURE__ */ jsxs35(Box34, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
28982
- /* @__PURE__ */ jsx47(Text37, { bold: true, color: PALETTE.warning, children: "Reload from saved state?" }),
28983
- /* @__PURE__ */ jsx47(Text37, { children: "Unsaved in-memory changes will be lost." }),
28984
- /* @__PURE__ */ jsx47(Text37, { children: " " }),
28985
- /* @__PURE__ */ jsx47(Text37, { children: " [Enter] Confirm" }),
28986
- /* @__PURE__ */ jsx47(Text37, { children: " [Esc] Cancel" })
28928
+ return /* @__PURE__ */ jsxs35(Box35, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
28929
+ /* @__PURE__ */ jsx45(Text37, { bold: true, color: PALETTE.warning, children: "Reload from saved state?" }),
28930
+ /* @__PURE__ */ jsx45(Text37, { children: "Unsaved in-memory changes will be lost." }),
28931
+ /* @__PURE__ */ jsx45(Text37, { children: " " }),
28932
+ /* @__PURE__ */ jsx45(Text37, { children: " [Enter] Confirm" }),
28933
+ /* @__PURE__ */ jsx45(Text37, { children: " [Esc] Cancel" })
28987
28934
  ] });
28988
28935
  }
28989
28936
  var init_ReviewDialogs = __esm({
@@ -29385,8 +29332,8 @@ var init_use_review_preview = __esm({
29385
29332
  });
29386
29333
 
29387
29334
  // packages/experience-design-system-cli/src/tui/import/steps/09-review/components/LivePreviewSummary.tsx
29388
- import { Box as Box35, Text as Text38 } from "ink";
29389
- import { jsx as jsx48, jsxs as jsxs36 } from "react/jsx-runtime";
29335
+ import { Box as Box36, Text as Text38 } from "ink";
29336
+ import { jsx as jsx46, jsxs as jsxs36 } from "react/jsx-runtime";
29390
29337
  function LivePreviewSummary({
29391
29338
  enabled,
29392
29339
  previewAnnotations,
@@ -29400,19 +29347,19 @@ function LivePreviewSummary({
29400
29347
  const counts = { new: 0, changed: 0, removed: 0, breaking: 0 };
29401
29348
  for (const annotation of previewAnnotations.values()) counts[annotation] += 1;
29402
29349
  const hasCounts = counts.new + counts.changed + counts.removed + counts.breaking > 0;
29403
- if (disabled) return /* @__PURE__ */ jsx48(Text38, { color: PALETTE.muted, children: "Preview: disabled (creds rejected)" });
29404
- if (status === "running" && !hasCounts) return /* @__PURE__ */ jsx48(Text38, { color: PALETTE.muted, children: `Preview: ${spinner} running...` });
29350
+ if (disabled) return /* @__PURE__ */ jsx46(Text38, { color: PALETTE.muted, children: "Preview: disabled (creds rejected)" });
29351
+ if (status === "running" && !hasCounts) return /* @__PURE__ */ jsx46(Text38, { color: PALETTE.muted, children: `Preview: ${spinner} running...` });
29405
29352
  if (!hasCounts) return null;
29406
- return /* @__PURE__ */ jsxs36(Box35, { children: [
29407
- /* @__PURE__ */ jsx48(Text38, { children: "Preview: " }),
29408
- /* @__PURE__ */ jsx48(Text38, { color: PALETTE.success, children: `${counts.new} new` }),
29409
- /* @__PURE__ */ jsx48(Text38, { children: " \xB7 " }),
29410
- /* @__PURE__ */ jsx48(Text38, { color: PALETTE.warning, children: `${counts.changed} changed` }),
29411
- /* @__PURE__ */ jsx48(Text38, { children: " \xB7 " }),
29412
- /* @__PURE__ */ jsx48(Text38, { color: PALETTE.muted, children: `${counts.removed} removed` }),
29413
- showRemovedListHint && removedCount > 0 && /* @__PURE__ */ jsx48(Text38, { children: " ([d] removed list)" }),
29414
- /* @__PURE__ */ jsx48(Text38, { children: " \xB7 " }),
29415
- /* @__PURE__ */ jsx48(Text38, { color: PALETTE.error, bold: true, children: `${counts.breaking} breaking` })
29353
+ return /* @__PURE__ */ jsxs36(Box36, { children: [
29354
+ /* @__PURE__ */ jsx46(Text38, { children: "Preview: " }),
29355
+ /* @__PURE__ */ jsx46(Text38, { color: PALETTE.success, children: `${counts.new} new` }),
29356
+ /* @__PURE__ */ jsx46(Text38, { children: " \xB7 " }),
29357
+ /* @__PURE__ */ jsx46(Text38, { color: PALETTE.warning, children: `${counts.changed} changed` }),
29358
+ /* @__PURE__ */ jsx46(Text38, { children: " \xB7 " }),
29359
+ /* @__PURE__ */ jsx46(Text38, { color: PALETTE.muted, children: `${counts.removed} removed` }),
29360
+ showRemovedListHint && removedCount > 0 && /* @__PURE__ */ jsx46(Text38, { children: " ([d] removed list)" }),
29361
+ /* @__PURE__ */ jsx46(Text38, { children: " \xB7 " }),
29362
+ /* @__PURE__ */ jsx46(Text38, { color: PALETTE.error, bold: true, children: `${counts.breaking} breaking` })
29416
29363
  ] });
29417
29364
  }
29418
29365
  var init_LivePreviewSummary = __esm({
@@ -29425,8 +29372,8 @@ var init_LivePreviewSummary = __esm({
29425
29372
  // packages/experience-design-system-cli/src/tui/import/steps/09-review/generate-review-step.tsx
29426
29373
  import { useCallback as useCallback5, useEffect as useEffect17, useMemo as useMemo4, useRef as useRef13, useState as useState25 } from "react";
29427
29374
  import figures8 from "figures";
29428
- import { Box as Box36, Text as Text39 } from "ink";
29429
- import { Fragment as Fragment16, jsx as jsx49, jsxs as jsxs37 } from "react/jsx-runtime";
29375
+ import { Box as Box37, Text as Text39 } from "ink";
29376
+ import { Fragment as Fragment14, jsx as jsx47, jsxs as jsxs37 } from "react/jsx-runtime";
29430
29377
  function sortComponentsForSidebar(components, cycleParticipants) {
29431
29378
  const isEmpty2 = (entry) => Object.keys(entry.$properties ?? {}).length === 0 && Object.keys(entry.$slots ?? {}).length === 0;
29432
29379
  const tier = (c2) => {
@@ -29470,7 +29417,7 @@ function CyclePathLine({
29470
29417
  return /* @__PURE__ */ jsxs37(Text39, { color: highlightLine ? PALETTE.warning : void 0, children: [
29471
29418
  prefix,
29472
29419
  segments.map(
29473
- (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)
29420
+ (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)
29474
29421
  )
29475
29422
  ] });
29476
29423
  }
@@ -29482,31 +29429,31 @@ function CycleDetailPanel({
29482
29429
  height
29483
29430
  }) {
29484
29431
  const lines = [
29485
- /* @__PURE__ */ jsx49(Text39, { bold: true, color: PALETTE.warning, children: `SLOT DEPENDENCY CYCLES (${cycles.length})` }, "cyc-title"),
29486
- /* @__PURE__ */ jsx49(Text39, { color: PALETTE.muted, children: "push will fail until these are resolved" }, "cyc-sub"),
29487
- /* @__PURE__ */ jsx49(Text39, { color: PALETTE.muted, children: "Reject a cycle member or remove a slot edge to break the cycle." }, "cyc-guidance"),
29488
- /* @__PURE__ */ jsx49(Text39, { children: " " }, "cyc-space")
29432
+ /* @__PURE__ */ jsx47(Text39, { bold: true, color: PALETTE.warning, children: `SLOT DEPENDENCY CYCLES (${cycles.length})` }, "cyc-title"),
29433
+ /* @__PURE__ */ jsx47(Text39, { color: PALETTE.muted, children: "push will fail until these are resolved" }, "cyc-sub"),
29434
+ /* @__PURE__ */ jsx47(Text39, { color: PALETTE.muted, children: "Reject a cycle member or remove a slot edge to break the cycle." }, "cyc-guidance"),
29435
+ /* @__PURE__ */ jsx47(Text39, { children: " " }, "cyc-space")
29489
29436
  ];
29490
29437
  cycles.forEach((cycle, index) => {
29491
29438
  const nodeCount = new Set(cycle.path).size;
29492
29439
  const isCursor = index === cursor;
29493
29440
  lines.push(
29494
- /* @__PURE__ */ jsx49(Text39, { bold: true, inverse: isCursor, children: `${isCursor ? figures8.pointer : " "} Cycle ${index + 1} (${nodeCount} component${nodeCount === 1 ? "" : "s"}):` }, `cyc-h-${index}`),
29495
- /* @__PURE__ */ jsx49(CyclePathLine, { segments: formatCyclePathSegments2(cycle, 16), prefix: " " }, `cyc-p-${index}`)
29441
+ /* @__PURE__ */ jsx47(Text39, { bold: true, inverse: isCursor, children: `${isCursor ? figures8.pointer : " "} Cycle ${index + 1} (${nodeCount} component${nodeCount === 1 ? "" : "s"}):` }, `cyc-h-${index}`),
29442
+ /* @__PURE__ */ jsx47(CyclePathLine, { segments: formatCyclePathSegments2(cycle, 16), prefix: " " }, `cyc-p-${index}`)
29496
29443
  );
29497
29444
  if (cycle.suggestedBreak) {
29498
29445
  lines.push(
29499
- /* @__PURE__ */ jsx49(Text39, { color: PALETTE.muted, children: ` Suggested fix: remove [${cycle.suggestedBreak.slotName}] from ${cycle.suggestedBreak.fromComponent}` }, `cyc-fix-${index}`)
29446
+ /* @__PURE__ */ jsx47(Text39, { color: PALETTE.muted, children: ` Suggested fix: remove [${cycle.suggestedBreak.slotName}] from ${cycle.suggestedBreak.fromComponent}` }, `cyc-fix-${index}`)
29500
29447
  );
29501
29448
  }
29502
- lines.push(/* @__PURE__ */ jsx49(Text39, { children: " " }, `cyc-s-${index}`));
29449
+ lines.push(/* @__PURE__ */ jsx47(Text39, { children: " " }, `cyc-s-${index}`));
29503
29450
  });
29504
29451
  const footer = "[\u2191\u2193] move [Enter] fix cycle [c/q/Esc] close";
29505
29452
  const viewportHeight = Math.max(1, height - 3);
29506
29453
  const visible = lines.slice(scrollOffset, scrollOffset + viewportHeight - 1);
29507
29454
  return /* @__PURE__ */ jsxs37(FixedPanel, { width, height, borderStyle: "round", borderColor: PALETTE.warning, paddingLeft: 1, children: [
29508
29455
  visible,
29509
- /* @__PURE__ */ jsx49(Text39, { color: PALETTE.muted, children: footer })
29456
+ /* @__PURE__ */ jsx47(Text39, { color: PALETTE.muted, children: footer })
29510
29457
  ] });
29511
29458
  }
29512
29459
  function BreakCyclePanel({
@@ -29518,13 +29465,13 @@ function BreakCyclePanel({
29518
29465
  height
29519
29466
  }) {
29520
29467
  return /* @__PURE__ */ jsxs37(FixedPanel, { width, height, borderStyle: "round", borderColor: PALETTE.warning, paddingLeft: 1, children: [
29521
- /* @__PURE__ */ jsx49(Text39, { bold: true, color: PALETTE.warning, children: "BREAK CYCLE \u2014 remove a slot edge" }),
29522
- cycle && /* @__PURE__ */ jsx49(CyclePathLine, { segments: formatCyclePathSegments2(cycle), prefix: " ", highlightComponents: true }),
29523
- /* @__PURE__ */ jsx49(Text39, { color: PALETTE.muted, children: cycle ? "Deleting an edge removes it from $allowedComponents (undo with Ctrl+Z)." : "No cycle highlighted." }),
29524
- /* @__PURE__ */ jsx49(Text39, { children: " " }),
29525
- edges.length > 0 && /* @__PURE__ */ jsx49(Text39, { color: PALETTE.muted, children: "remove slot edge:" }),
29526
- 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}`)),
29527
- 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" })
29468
+ /* @__PURE__ */ jsx47(Text39, { bold: true, color: PALETTE.warning, children: "BREAK CYCLE \u2014 remove a slot edge" }),
29469
+ cycle && /* @__PURE__ */ jsx47(CyclePathLine, { segments: formatCyclePathSegments2(cycle), prefix: " ", highlightComponents: true }),
29470
+ /* @__PURE__ */ jsx47(Text39, { color: PALETTE.muted, children: cycle ? "Deleting an edge removes it from $allowedComponents (undo with Ctrl+Z)." : "No cycle highlighted." }),
29471
+ /* @__PURE__ */ jsx47(Text39, { children: " " }),
29472
+ edges.length > 0 && /* @__PURE__ */ jsx47(Text39, { color: PALETTE.muted, children: "remove slot edge:" }),
29473
+ 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}`)),
29474
+ 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" })
29528
29475
  ] });
29529
29476
  }
29530
29477
  function buildBreakingRows(breakingChanges) {
@@ -29570,9 +29517,9 @@ function deriveBreakingChanges(response) {
29570
29517
  }
29571
29518
  function GenerateReviewStep(props) {
29572
29519
  if (!props.extractSessionId) {
29573
- 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." }) });
29520
+ 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." }) });
29574
29521
  }
29575
- return /* @__PURE__ */ jsx49(GenerateReviewStepView, { ...props, extractSessionId: props.extractSessionId });
29522
+ return /* @__PURE__ */ jsx47(GenerateReviewStepView, { ...props, extractSessionId: props.extractSessionId });
29576
29523
  }
29577
29524
  function GenerateReviewStepView({
29578
29525
  extractSessionId,
@@ -30429,13 +30376,13 @@ function GenerateReviewStepView({
30429
30376
  }
30430
30377
  });
30431
30378
  if (loading) {
30432
- return /* @__PURE__ */ jsx49(ReviewLoadingState, {});
30379
+ return /* @__PURE__ */ jsx47(ReviewLoadingState, {});
30433
30380
  }
30434
30381
  if (loadError) {
30435
- return /* @__PURE__ */ jsx49(ReviewLoadError, { message: loadError });
30382
+ return /* @__PURE__ */ jsx47(ReviewLoadError, { message: loadError });
30436
30383
  }
30437
30384
  if (showHelp) {
30438
- return /* @__PURE__ */ jsx49(HelpOverlay, { sections: HELP_SECTIONS2, handleInput: false, onClose: () => setShowHelp(false) });
30385
+ return /* @__PURE__ */ jsx47(HelpOverlay, { sections: HELP_SECTIONS2, handleInput: false, onClose: () => setShowHelp(false) });
30439
30386
  }
30440
30387
  const { selected, selectedJson, visibleJsonPanelValue } = getReviewSelectionState(
30441
30388
  components,
@@ -30475,9 +30422,9 @@ function GenerateReviewStepView({
30475
30422
  for (const c2 of closures.values()) if (c2.nodes.length > 1) return true;
30476
30423
  return false;
30477
30424
  })();
30478
- return /* @__PURE__ */ jsxs37(Box36, { flexDirection: "column", children: [
30479
- /* @__PURE__ */ jsx49(StepHeader, { step: "review" }),
30480
- /* @__PURE__ */ jsx49(
30425
+ return /* @__PURE__ */ jsxs37(Box37, { flexDirection: "column", children: [
30426
+ /* @__PURE__ */ jsx47(StepHeader, { step: "review" }),
30427
+ /* @__PURE__ */ jsx47(
30481
30428
  ReviewStepDialogs,
30482
30429
  {
30483
30430
  surfaceState: reviewSurface,
@@ -30487,15 +30434,15 @@ function GenerateReviewStepView({
30487
30434
  onQuit
30488
30435
  }
30489
30436
  ),
30490
- /* @__PURE__ */ jsx49(ReviewReloadDialog, { open: showReloadDialog && !dialogOpen }),
30491
- removedComponents.length > 0 && !dialogOpen && /* @__PURE__ */ jsxs37(Box36, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.error, paddingX: 1, children: [
30492
- /* @__PURE__ */ jsx49(Text39, { bold: true, color: PALETTE.error, children: removedComponentsHeader(removedComponents.length, true) }),
30493
- !removedBannerCollapsed && /* @__PURE__ */ jsxs37(Fragment16, { children: [
30494
- /* @__PURE__ */ jsx49(Text39, { children: " " }),
30495
- removedComponents.map((rc) => /* @__PURE__ */ jsx49(Text39, { children: removedComponentLine(rc) }, rc.id))
30437
+ /* @__PURE__ */ jsx47(ReviewReloadDialog, { open: showReloadDialog && !dialogOpen }),
30438
+ removedComponents.length > 0 && !dialogOpen && /* @__PURE__ */ jsxs37(Box37, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.error, paddingX: 1, children: [
30439
+ /* @__PURE__ */ jsx47(Text39, { bold: true, color: PALETTE.error, children: removedComponentsHeader(removedComponents.length, true) }),
30440
+ !removedBannerCollapsed && /* @__PURE__ */ jsxs37(Fragment14, { children: [
30441
+ /* @__PURE__ */ jsx47(Text39, { children: " " }),
30442
+ removedComponents.map((rc) => /* @__PURE__ */ jsx47(Text39, { children: removedComponentLine(rc) }, rc.id))
30496
30443
  ] })
30497
30444
  ] }),
30498
- breakingChanges.length > 0 && !dialogOpen && /* @__PURE__ */ jsx49(Box36, { paddingX: 1, children: /* @__PURE__ */ jsx49(
30445
+ breakingChanges.length > 0 && !dialogOpen && /* @__PURE__ */ jsx47(Box37, { paddingX: 1, children: /* @__PURE__ */ jsx47(
30499
30446
  Text39,
30500
30447
  {
30501
30448
  color: PALETTE.warning,
@@ -30506,14 +30453,14 @@ function GenerateReviewStepView({
30506
30453
  const row = breakingRows[breakingCursor];
30507
30454
  const comp = row ? breakingChanges.find((b) => b.componentName === row.componentName) : void 0;
30508
30455
  if (!comp) return null;
30509
- return /* @__PURE__ */ jsxs37(Box36, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
30510
- /* @__PURE__ */ jsx49(Text39, { bold: true, color: PALETTE.warning, children: `Breaking changes \u2014 ${comp.componentName}` }),
30511
- 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"}` }),
30512
- 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}`)),
30513
- /* @__PURE__ */ jsx49(Text39, { children: "[D/Esc] close detail" })
30456
+ return /* @__PURE__ */ jsxs37(Box37, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
30457
+ /* @__PURE__ */ jsx47(Text39, { bold: true, color: PALETTE.warning, children: `Breaking changes \u2014 ${comp.componentName}` }),
30458
+ 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"}` }),
30459
+ 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}`)),
30460
+ /* @__PURE__ */ jsx47(Text39, { children: "[D/Esc] close detail" })
30514
30461
  ] });
30515
30462
  })(),
30516
- !dialogOpen && /* @__PURE__ */ jsx49(
30463
+ !dialogOpen && /* @__PURE__ */ jsx47(
30517
30464
  LivePreviewSummary,
30518
30465
  {
30519
30466
  enabled: livePreview,
@@ -30532,16 +30479,16 @@ function GenerateReviewStepView({
30532
30479
  const participantSet = cycleView.structural;
30533
30480
  const members = stillRejected.filter((n) => participantSet.has(n)).sort();
30534
30481
  const ancestors = stillRejected.filter((n) => !participantSet.has(n)).sort();
30535
- return /* @__PURE__ */ jsxs37(Box36, { flexDirection: "column", borderStyle: "single", borderColor: PALETTE.error, paddingX: 1, children: [
30536
- /* @__PURE__ */ jsx49(Text39, { color: PALETTE.error, bold: true, children: `Cyclic component graph \u2014 auto-rejected ${stillRejected.length} component${stillRejected.length === 1 ? "" : "s"}:` }),
30537
- members.length > 0 && /* @__PURE__ */ jsx49(Text39, { color: PALETTE.error, children: ` Cycle members: ${members.join(", ")}` }),
30538
- ancestors.length > 0 && /* @__PURE__ */ jsx49(Text39, { color: PALETTE.error, children: ` Ancestors: ${ancestors.join(", ")}` }),
30539
- /* @__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" })
30482
+ return /* @__PURE__ */ jsxs37(Box37, { flexDirection: "column", borderStyle: "single", borderColor: PALETTE.error, paddingX: 1, children: [
30483
+ /* @__PURE__ */ jsx47(Text39, { color: PALETTE.error, bold: true, children: `Cyclic component graph \u2014 auto-rejected ${stillRejected.length} component${stillRejected.length === 1 ? "" : "s"}:` }),
30484
+ members.length > 0 && /* @__PURE__ */ jsx47(Text39, { color: PALETTE.error, children: ` Cycle members: ${members.join(", ")}` }),
30485
+ ancestors.length > 0 && /* @__PURE__ */ jsx47(Text39, { color: PALETTE.error, children: ` Ancestors: ${ancestors.join(", ")}` }),
30486
+ /* @__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" })
30540
30487
  ] });
30541
30488
  })(),
30542
- /* @__PURE__ */ jsx49(ReviewEmptyComponentsWarning, { count: emptyCount, hidden: dialogOpen }),
30543
- /* @__PURE__ */ jsx49(ReviewFinalizeError, { message: finalizeError, hidden: dialogOpen }),
30544
- !dialogOpen && breakPanel.isOpen && /* @__PURE__ */ jsx49(
30489
+ /* @__PURE__ */ jsx47(ReviewEmptyComponentsWarning, { count: emptyCount, hidden: dialogOpen }),
30490
+ /* @__PURE__ */ jsx47(ReviewFinalizeError, { message: finalizeError, hidden: dialogOpen }),
30491
+ !dialogOpen && breakPanel.isOpen && /* @__PURE__ */ jsx47(
30545
30492
  BreakCyclePanel,
30546
30493
  {
30547
30494
  cycle: cycleRows[cyclesCursor],
@@ -30552,7 +30499,7 @@ function GenerateReviewStepView({
30552
30499
  height: panelHeight
30553
30500
  }
30554
30501
  ),
30555
- !dialogOpen && cyclePanel.isOpen && !breakPanel.isOpen && /* @__PURE__ */ jsx49(
30502
+ !dialogOpen && cyclePanel.isOpen && !breakPanel.isOpen && /* @__PURE__ */ jsx47(
30556
30503
  CycleDetailPanel,
30557
30504
  {
30558
30505
  cycles: cycleRows,
@@ -30562,8 +30509,8 @@ function GenerateReviewStepView({
30562
30509
  height: panelHeight
30563
30510
  }
30564
30511
  ),
30565
- !dialogOpen && !cyclePanel.isOpen && !breakPanel.isOpen && /* @__PURE__ */ jsxs37(Box36, { children: [
30566
- breakingPanel.isOpen ? /* @__PURE__ */ jsx49(
30512
+ !dialogOpen && !cyclePanel.isOpen && !breakPanel.isOpen && /* @__PURE__ */ jsxs37(Box37, { children: [
30513
+ breakingPanel.isOpen ? /* @__PURE__ */ jsx47(
30567
30514
  GotoBanner,
30568
30515
  {
30569
30516
  title: `Breaking changes \u2014 ${breakingRows[breakingCursor]?.componentName ?? "unknown component"}`,
@@ -30576,7 +30523,7 @@ function GenerateReviewStepView({
30576
30523
  width: sidebarWidth,
30577
30524
  footerHint: "[\u2191/\u2193] move \xB7 [Enter] jump \xB7 [D] detail \xB7 [Esc] close"
30578
30525
  }
30579
- ) : /* @__PURE__ */ jsx49(
30526
+ ) : /* @__PURE__ */ jsx47(
30580
30527
  GroupedSidebar,
30581
30528
  {
30582
30529
  items: groupedItems,
@@ -30617,7 +30564,7 @@ function GenerateReviewStepView({
30617
30564
  graph: sidebarGraph
30618
30565
  }
30619
30566
  ),
30620
- selected ? /* @__PURE__ */ jsx49(
30567
+ selected ? /* @__PURE__ */ jsx47(
30621
30568
  ReviewComponentPanel,
30622
30569
  {
30623
30570
  selectedKey: selected.key,
@@ -30649,12 +30596,12 @@ function GenerateReviewStepView({
30649
30596
  livePreview: livePreviewHook,
30650
30597
  livePreviewSpinner
30651
30598
  }
30652
- ) : /* @__PURE__ */ jsx49(ReviewNoSelection, {})
30599
+ ) : /* @__PURE__ */ jsx47(ReviewNoSelection, {})
30653
30600
  ] }),
30654
- !dialogOpen && cycleRows.length > 0 && !cyclePanel.isOpen && !breakPanel.isOpen && /* @__PURE__ */ jsxs37(Box36, { flexDirection: "column", children: [
30655
- /* @__PURE__ */ jsx49(Text39, { color: PALETTE.warning, children: `\u26A0 ${cycleRows.length} slot dependency cycle${cycleRows.length === 1 ? "" : "s"} detected \u2014 push will fail` }),
30601
+ !dialogOpen && cycleRows.length > 0 && !cyclePanel.isOpen && !breakPanel.isOpen && /* @__PURE__ */ jsxs37(Box37, { flexDirection: "column", children: [
30602
+ /* @__PURE__ */ jsx47(Text39, { color: PALETTE.warning, children: `\u26A0 ${cycleRows.length} slot dependency cycle${cycleRows.length === 1 ? "" : "s"} detected \u2014 push will fail` }),
30656
30603
  cycleRows.slice(0, 3).map((cycle, idx) => {
30657
- return /* @__PURE__ */ jsx49(
30604
+ return /* @__PURE__ */ jsx47(
30658
30605
  CyclePathLine,
30659
30606
  {
30660
30607
  segments: formatCyclePathSegments2(cycle),
@@ -30665,10 +30612,10 @@ function GenerateReviewStepView({
30665
30612
  `cyc-banner-${idx}`
30666
30613
  );
30667
30614
  }),
30668
- cycleRows.length > 3 && /* @__PURE__ */ jsx49(Text39, { color: PALETTE.warning, children: ` \u2026${cycleRows.length - 3} more` }),
30669
- /* @__PURE__ */ jsx49(Text39, { children: " press [c] for detail" })
30615
+ cycleRows.length > 3 && /* @__PURE__ */ jsx47(Text39, { color: PALETTE.warning, children: ` \u2026${cycleRows.length - 3} more` }),
30616
+ /* @__PURE__ */ jsx47(Text39, { children: " press [c] for detail" })
30670
30617
  ] }),
30671
- /* @__PURE__ */ jsx49(
30618
+ /* @__PURE__ */ jsx47(
30672
30619
  SearchMatchSummary,
30673
30620
  {
30674
30621
  open: searchOpen,
@@ -30679,7 +30626,7 @@ function GenerateReviewStepView({
30679
30626
  hidden: dialogOpen
30680
30627
  }
30681
30628
  ),
30682
- !dialogOpen && sidebarFocused && /* @__PURE__ */ jsx49(CompactControlBar, { hasGroupRoots, searchActive: searchOpen || searchQuery.length > 0 })
30629
+ !dialogOpen && sidebarFocused && /* @__PURE__ */ jsx47(CompactControlBar, { hasGroupRoots, searchActive: searchOpen || searchQuery.length > 0 })
30683
30630
  ] });
30684
30631
  }
30685
30632
  var HELP_SECTIONS2;
@@ -30795,17 +30742,17 @@ var init_generate_review_step = __esm({
30795
30742
  });
30796
30743
 
30797
30744
  // packages/experience-design-system-cli/src/tui/import/steps/10-flow/components/CustomPromptBanner.tsx
30798
- import { Box as Box37, Text as Text40 } from "ink";
30799
- import { jsx as jsx50, jsxs as jsxs38 } from "react/jsx-runtime";
30745
+ import { Box as Box38, Text as Text40 } from "ink";
30746
+ import { jsx as jsx48, jsxs as jsxs38 } from "react/jsx-runtime";
30800
30747
  function CustomPromptBanner({ generatePromptPath }) {
30801
30748
  if (!generatePromptPath) return null;
30802
- return /* @__PURE__ */ jsxs38(Box37, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
30803
- /* @__PURE__ */ jsx50(Text40, { color: PALETTE.warning, bold: true, children: "WARNING: Custom prompt active" }),
30749
+ return /* @__PURE__ */ jsxs38(Box38, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
30750
+ /* @__PURE__ */ jsx48(Text40, { color: PALETTE.warning, bold: true, children: "WARNING: Custom prompt active" }),
30804
30751
  generatePromptPath ? /* @__PURE__ */ jsxs38(Text40, { color: PALETTE.warning, children: [
30805
30752
  "components: ",
30806
30753
  generatePromptPath
30807
30754
  ] }) : null,
30808
- /* @__PURE__ */ jsx50(Text40, { color: PALETTE.warning, children: "Bundled invariants (utility-wrapper rejection, description content rules) do NOT apply." })
30755
+ /* @__PURE__ */ jsx48(Text40, { color: PALETTE.warning, children: "Bundled invariants (utility-wrapper rejection, description content rules) do NOT apply." })
30809
30756
  ] });
30810
30757
  }
30811
30758
  var init_CustomPromptBanner = __esm({
@@ -30834,15 +30781,15 @@ var init_contentful_urls2 = __esm({
30834
30781
  });
30835
30782
 
30836
30783
  // packages/experience-design-system-cli/src/tui/import/steps/10-flow/components/SpaceEnvironment.tsx
30837
- import { Box as Box38, Text as Text41 } from "ink";
30838
- import { jsx as jsx51, jsxs as jsxs39 } from "react/jsx-runtime";
30784
+ import { Box as Box39, Text as Text41 } from "ink";
30785
+ import { jsx as jsx49, jsxs as jsxs39 } from "react/jsx-runtime";
30839
30786
  function SpaceEnvironment({ spaceId, environmentId }) {
30840
- return /* @__PURE__ */ jsxs39(Box38, { gap: 1, marginTop: 1, children: [
30841
- /* @__PURE__ */ jsx51(Text41, { color: PALETTE.muted, children: "Space:" }),
30842
- /* @__PURE__ */ jsx51(Text41, { children: spaceId }),
30843
- /* @__PURE__ */ jsx51(Text41, { color: PALETTE.muted, children: "/" }),
30844
- /* @__PURE__ */ jsx51(Text41, { color: PALETTE.muted, children: "Environment:" }),
30845
- /* @__PURE__ */ jsx51(Text41, { children: environmentId })
30787
+ return /* @__PURE__ */ jsxs39(Box39, { gap: 1, marginTop: 1, children: [
30788
+ /* @__PURE__ */ jsx49(Text41, { color: PALETTE.muted, children: "Space:" }),
30789
+ /* @__PURE__ */ jsx49(Text41, { children: spaceId }),
30790
+ /* @__PURE__ */ jsx49(Text41, { color: PALETTE.muted, children: "/" }),
30791
+ /* @__PURE__ */ jsx49(Text41, { color: PALETTE.muted, children: "Environment:" }),
30792
+ /* @__PURE__ */ jsx49(Text41, { children: environmentId })
30846
30793
  ] });
30847
30794
  }
30848
30795
  var init_SpaceEnvironment = __esm({
@@ -30853,13 +30800,13 @@ var init_SpaceEnvironment = __esm({
30853
30800
  });
30854
30801
 
30855
30802
  // packages/experience-design-system-cli/src/tui/import/steps/10-flow/screens/DoneStep.tsx
30856
- import { Box as Box39, Text as Text42 } from "ink";
30857
- import { Fragment as Fragment17, jsx as jsx52, jsxs as jsxs40 } from "react/jsx-runtime";
30803
+ import { Box as Box40, Text as Text42 } from "ink";
30804
+ import { Fragment as Fragment15, jsx as jsx50, jsxs as jsxs40 } from "react/jsx-runtime";
30858
30805
  function EntityRows({ entity, label }) {
30859
30806
  const plural3 = (n) => `${n} ${label}${n !== 1 ? "s" : ""}`;
30860
- return /* @__PURE__ */ jsxs40(Fragment17, { children: [
30807
+ return /* @__PURE__ */ jsxs40(Fragment15, { children: [
30861
30808
  ACTIONS.filter((action) => entity[action] > 0).map((action) => /* @__PURE__ */ jsxs40(Text42, { children: [
30862
- /* @__PURE__ */ jsx52(Text42, { color: PALETTE.success, children: "\u2713" }),
30809
+ /* @__PURE__ */ jsx50(Text42, { color: PALETTE.success, children: "\u2713" }),
30863
30810
  " ",
30864
30811
  plural3(entity[action]),
30865
30812
  " ",
@@ -30873,9 +30820,9 @@ function EntityRows({ entity, label }) {
30873
30820
  ] });
30874
30821
  }
30875
30822
  function LinkRow({ title, url }) {
30876
- return /* @__PURE__ */ jsxs40(Box39, { flexDirection: "column", children: [
30877
- /* @__PURE__ */ jsx52(Text42, { color: PALETTE.muted, children: title }),
30878
- /* @__PURE__ */ jsx52(Text42, { color: PALETTE.accent, children: url })
30823
+ return /* @__PURE__ */ jsxs40(Box40, { flexDirection: "column", children: [
30824
+ /* @__PURE__ */ jsx50(Text42, { color: PALETTE.muted, children: title }),
30825
+ /* @__PURE__ */ jsx50(Text42, { color: PALETTE.accent, children: url })
30879
30826
  ] });
30880
30827
  }
30881
30828
  function DoneStep({
@@ -30899,14 +30846,14 @@ function DoneStep({
30899
30846
  const totalPushed = componentTypes.created + componentTypes.updated + componentTypes.removed + designTokens.created + designTokens.updated + designTokens.removed;
30900
30847
  const success = totalFailed === 0;
30901
30848
  const urlArgs = { host: host ?? "api.contentful.com", spaceId, environmentId };
30902
- return /* @__PURE__ */ jsxs40(Box39, { flexDirection: "column", children: [
30903
- /* @__PURE__ */ jsx52(StepHeader, { step: "done" }),
30904
- /* @__PURE__ */ jsxs40(Box39, { flexDirection: "column", gap: 1, paddingX: 2, paddingBottom: 1, children: [
30905
- success ? /* @__PURE__ */ jsx52(Text42, { bold: true, color: PALETTE.success, children: "Done!" }) : /* @__PURE__ */ jsx52(Text42, { bold: true, color: PALETTE.warning, children: "\u26A0 Finished with errors" }),
30906
- 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: [
30907
- /* @__PURE__ */ jsx52(EntityRows, { entity: componentTypes, label: "Component" }),
30908
- /* @__PURE__ */ jsx52(EntityRows, { entity: designTokens, label: "Design Token" }),
30909
- summary && /* @__PURE__ */ jsx52(Box39, { marginTop: 1, children: /* @__PURE__ */ jsxs40(Text42, { color: PALETTE.muted, children: [
30849
+ return /* @__PURE__ */ jsxs40(Box40, { flexDirection: "column", children: [
30850
+ /* @__PURE__ */ jsx50(StepHeader, { step: "done" }),
30851
+ /* @__PURE__ */ jsxs40(Box40, { flexDirection: "column", gap: 1, paddingX: 2, paddingBottom: 1, children: [
30852
+ success ? /* @__PURE__ */ jsx50(Text42, { bold: true, color: PALETTE.success, children: "Done!" }) : /* @__PURE__ */ jsx50(Text42, { bold: true, color: PALETTE.warning, children: "\u26A0 Finished with errors" }),
30853
+ 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: [
30854
+ /* @__PURE__ */ jsx50(EntityRows, { entity: componentTypes, label: "Component" }),
30855
+ /* @__PURE__ */ jsx50(EntityRows, { entity: designTokens, label: "Design Token" }),
30856
+ summary && /* @__PURE__ */ jsx50(Box40, { marginTop: 1, children: /* @__PURE__ */ jsxs40(Text42, { color: PALETTE.muted, children: [
30910
30857
  "Push result: ",
30911
30858
  summary.succeeded,
30912
30859
  "/",
@@ -30919,8 +30866,8 @@ function DoneStep({
30919
30866
  ] })
30920
30867
  ] }) })
30921
30868
  ] }),
30922
- failures.length > 0 && /* @__PURE__ */ jsxs40(Box39, { flexDirection: "column", children: [
30923
- /* @__PURE__ */ jsx52(Text42, { bold: true, color: PALETTE.error, children: "Failure details" }),
30869
+ failures.length > 0 && /* @__PURE__ */ jsxs40(Box40, { flexDirection: "column", children: [
30870
+ /* @__PURE__ */ jsx50(Text42, { bold: true, color: PALETTE.error, children: "Failure details" }),
30924
30871
  failures.map((failure) => /* @__PURE__ */ jsxs40(Text42, { color: PALETTE.error, children: [
30925
30872
  failure.entityType,
30926
30873
  " ",
@@ -30929,11 +30876,11 @@ function DoneStep({
30929
30876
  failure.message
30930
30877
  ] }, `${failure.entityType}:${failure.entityId}`))
30931
30878
  ] }),
30932
- /* @__PURE__ */ jsx52(SpaceEnvironment, { spaceId, environmentId }),
30933
- success && totalPushed > 0 && /* @__PURE__ */ jsxs40(Box39, { flexDirection: "column", gap: 1, children: [
30934
- /* @__PURE__ */ jsx52(Text42, { color: PALETTE.success, children: "Your design system is now in Contentful Experiences." }),
30935
- produced.components && /* @__PURE__ */ jsx52(LinkRow, { title: "View your components here:", url: buildPostPushUrl2(urlArgs) }),
30936
- produced.tokens && /* @__PURE__ */ jsx52(
30879
+ /* @__PURE__ */ jsx50(SpaceEnvironment, { spaceId, environmentId }),
30880
+ success && totalPushed > 0 && /* @__PURE__ */ jsxs40(Box40, { flexDirection: "column", gap: 1, children: [
30881
+ /* @__PURE__ */ jsx50(Text42, { color: PALETTE.success, children: "Your design system is now in Contentful Experiences." }),
30882
+ produced.components && /* @__PURE__ */ jsx50(LinkRow, { title: "View your components here:", url: buildPostPushUrl2(urlArgs) }),
30883
+ produced.tokens && /* @__PURE__ */ jsx50(
30937
30884
  LinkRow,
30938
30885
  {
30939
30886
  title: "View your design tokens here:",
@@ -30941,7 +30888,7 @@ function DoneStep({
30941
30888
  }
30942
30889
  )
30943
30890
  ] }),
30944
- /* @__PURE__ */ jsx52(ControlHints, { hints: [{ keys: "Enter / q", label: "Exit" }] })
30891
+ /* @__PURE__ */ jsx50(ControlHints, { hints: [{ keys: "Enter / q", label: "Exit" }] })
30945
30892
  ] })
30946
30893
  ] });
30947
30894
  }
@@ -31000,10 +30947,10 @@ var init_use_blinking_cursor = __esm({
31000
30947
 
31001
30948
  // packages/experience-design-system-cli/src/tui/import/steps/10-flow/screens/PathPrompt.tsx
31002
30949
  import { useState as useState27 } from "react";
31003
- import { Box as Box40, Text as Text43 } from "ink";
30950
+ import { Box as Box41, Text as Text43 } from "ink";
31004
30951
  import { readdirSync as readdirSync3 } from "node:fs";
31005
30952
  import { dirname as dirname16, basename as basename6, join as join21 } from "node:path";
31006
- import { jsx as jsx53, jsxs as jsxs41 } from "react/jsx-runtime";
30953
+ import { jsx as jsx51, jsxs as jsxs41 } from "react/jsx-runtime";
31007
30954
  function autocomplete(partial) {
31008
30955
  if (!partial) return null;
31009
30956
  const normalized = normalizePath(partial);
@@ -31060,19 +31007,19 @@ function PathPrompt({
31060
31007
  const shown = input || defaultPath;
31061
31008
  const isPlaceholder = input === "";
31062
31009
  const cursor = cursorVisible ? "\u2588" : " ";
31063
- return /* @__PURE__ */ jsxs41(Box40, { flexDirection: "column", children: [
31064
- /* @__PURE__ */ jsx53(StepHeader, { step: "push" }),
31065
- /* @__PURE__ */ jsxs41(Box40, { flexDirection: "column", gap: 1, paddingX: 2, paddingBottom: 1, children: [
31066
- /* @__PURE__ */ jsxs41(Box40, { gap: 1, children: [
31067
- /* @__PURE__ */ jsx53(Text43, { color: PALETTE.accent, children: "?" }),
31010
+ return /* @__PURE__ */ jsxs41(Box41, { flexDirection: "column", children: [
31011
+ /* @__PURE__ */ jsx51(StepHeader, { step: "push" }),
31012
+ /* @__PURE__ */ jsxs41(Box41, { flexDirection: "column", gap: 1, paddingX: 2, paddingBottom: 1, children: [
31013
+ /* @__PURE__ */ jsxs41(Box41, { gap: 1, children: [
31014
+ /* @__PURE__ */ jsx51(Text43, { color: PALETTE.accent, children: "?" }),
31068
31015
  /* @__PURE__ */ jsxs41(Text43, { bold: true, children: [
31069
31016
  label,
31070
31017
  ":"
31071
31018
  ] }),
31072
- /* @__PURE__ */ jsx53(Text43, { color: isPlaceholder ? PALETTE.muted : void 0, children: shown }),
31073
- /* @__PURE__ */ jsx53(Text43, { children: cursor })
31019
+ /* @__PURE__ */ jsx51(Text43, { color: isPlaceholder ? PALETTE.muted : void 0, children: shown }),
31020
+ /* @__PURE__ */ jsx51(Text43, { children: cursor })
31074
31021
  ] }),
31075
- /* @__PURE__ */ jsx53(
31022
+ /* @__PURE__ */ jsx51(
31076
31023
  ControlHints,
31077
31024
  {
31078
31025
  hints: [
@@ -31117,7 +31064,7 @@ var init_produced = __esm({
31117
31064
  // packages/experience-design-system-cli/src/tui/import/steps/10-flow/support/use-timed-spinner.tsx
31118
31065
  import { useEffect as useEffect19, useState as useState28 } from "react";
31119
31066
  import { Spinner as Spinner2 } from "@inkjs/ui";
31120
- import { jsx as jsx54 } from "react/jsx-runtime";
31067
+ import { jsx as jsx52 } from "react/jsx-runtime";
31121
31068
  function useTimedSpinner() {
31122
31069
  const [elapsedSeconds, setElapsedSeconds] = useState28(0);
31123
31070
  useEffect19(() => {
@@ -31129,7 +31076,7 @@ function useTimedSpinner() {
31129
31076
  const mins = Math.floor(elapsedSeconds / 60);
31130
31077
  const secs = elapsedSeconds % 60;
31131
31078
  return {
31132
- spinner: /* @__PURE__ */ jsx54(Spinner2, {}),
31079
+ spinner: /* @__PURE__ */ jsx52(Spinner2, {}),
31133
31080
  elapsed: mins > 0 ? `${mins}m ${secs}s` : `${secs}s`
31134
31081
  };
31135
31082
  }
@@ -31140,28 +31087,28 @@ var init_use_timed_spinner = __esm({
31140
31087
  });
31141
31088
 
31142
31089
  // packages/experience-design-system-cli/src/tui/import/steps/10-flow/screens/PushingStep.tsx
31143
- import { Box as Box41, Text as Text44 } from "ink";
31090
+ import { Box as Box42, Text as Text44 } from "ink";
31144
31091
  import { ProgressBar as ProgressBar2, ThemeProvider as ThemeProvider2 } from "@inkjs/ui";
31145
- import { jsx as jsx55, jsxs as jsxs42 } from "react/jsx-runtime";
31092
+ import { jsx as jsx53, jsxs as jsxs42 } from "react/jsx-runtime";
31146
31093
  function PushingStep({ progress, produced }) {
31147
31094
  const { elapsed } = useTimedSpinner();
31148
31095
  const operationId = progress && progress.kind === "queued" ? progress.operationId : null;
31149
31096
  const showGlobal = progress && progress.kind === "progress";
31150
31097
  const showCurrent = progress && progress.kind === "progress" && progress.current ? progress.current : null;
31151
- return /* @__PURE__ */ jsxs42(Box41, { flexDirection: "column", children: [
31152
- /* @__PURE__ */ jsx55(StepHeader, { step: "push" }),
31153
- /* @__PURE__ */ jsxs42(Box41, { flexDirection: "column", gap: 1, paddingX: 2, paddingBottom: 1, children: [
31098
+ return /* @__PURE__ */ jsxs42(Box42, { flexDirection: "column", children: [
31099
+ /* @__PURE__ */ jsx53(StepHeader, { step: "push" }),
31100
+ /* @__PURE__ */ jsxs42(Box42, { flexDirection: "column", gap: 1, paddingX: 2, paddingBottom: 1, children: [
31154
31101
  /* @__PURE__ */ jsxs42(Text44, { children: [
31155
31102
  "Writing ",
31156
31103
  writtenThings(produced),
31157
31104
  " to your Contentful space..."
31158
31105
  ] }),
31159
- operationId && /* @__PURE__ */ jsxs42(Box41, { gap: 1, children: [
31160
- /* @__PURE__ */ jsx55(Text44, { color: PALETTE.muted, children: "Operation:" }),
31161
- /* @__PURE__ */ jsx55(Text44, { children: operationId })
31106
+ operationId && /* @__PURE__ */ jsxs42(Box42, { gap: 1, children: [
31107
+ /* @__PURE__ */ jsx53(Text44, { color: PALETTE.muted, children: "Operation:" }),
31108
+ /* @__PURE__ */ jsx53(Text44, { children: operationId })
31162
31109
  ] }),
31163
- showGlobal && progress && progress.kind === "progress" && /* @__PURE__ */ jsx55(Box41, { gap: 1, flexDirection: "column", children: /* @__PURE__ */ jsxs42(Box41, { gap: 2, children: [
31164
- /* @__PURE__ */ jsx55(Box41, { width: 40, children: /* @__PURE__ */ jsx55(ThemeProvider2, { theme: PROGRESS_THEME, children: /* @__PURE__ */ jsx55(ProgressBar2, { value: Math.round(progress.processed / progress.total * 100) }) }) }),
31110
+ showGlobal && progress && progress.kind === "progress" && /* @__PURE__ */ jsx53(Box42, { gap: 1, flexDirection: "column", children: /* @__PURE__ */ jsxs42(Box42, { gap: 2, children: [
31111
+ /* @__PURE__ */ jsx53(Box42, { width: 40, children: /* @__PURE__ */ jsx53(ThemeProvider2, { theme: PROGRESS_THEME, children: /* @__PURE__ */ jsx53(ProgressBar2, { value: Math.round(progress.processed / progress.total * 100) }) }) }),
31165
31112
  /* @__PURE__ */ jsxs42(Text44, { color: PALETTE.muted, children: [
31166
31113
  progress.processed,
31167
31114
  "/",
@@ -31169,11 +31116,11 @@ function PushingStep({ progress, produced }) {
31169
31116
  " entities"
31170
31117
  ] })
31171
31118
  ] }) }),
31172
- showCurrent && /* @__PURE__ */ jsxs42(Box41, { gap: 1, children: [
31173
- /* @__PURE__ */ jsx55(Text44, { color: PALETTE.muted, children: "Now processing:" }),
31174
- /* @__PURE__ */ jsx55(Text44, { children: showCurrent })
31119
+ showCurrent && /* @__PURE__ */ jsxs42(Box42, { gap: 1, children: [
31120
+ /* @__PURE__ */ jsx53(Text44, { color: PALETTE.muted, children: "Now processing:" }),
31121
+ /* @__PURE__ */ jsx53(Text44, { children: showCurrent })
31175
31122
  ] }),
31176
- /* @__PURE__ */ jsx55(Box41, { marginTop: 1, children: /* @__PURE__ */ jsxs42(Text44, { color: PALETTE.muted, children: [
31123
+ /* @__PURE__ */ jsx53(Box42, { marginTop: 1, children: /* @__PURE__ */ jsxs42(Text44, { color: PALETTE.muted, children: [
31177
31124
  "Elapsed: ",
31178
31125
  elapsed
31179
31126
  ] }) })
@@ -31379,8 +31326,8 @@ var init_preview_confirmation_input = __esm({
31379
31326
 
31380
31327
  // packages/experience-design-system-cli/src/tui/import/steps/10-flow/screens/WizardPreviewStep.tsx
31381
31328
  import { useEffect as useEffect20, useState as useState29, useMemo as useMemo5 } from "react";
31382
- import { Box as Box42, Text as Text45 } from "ink";
31383
- import { Fragment as Fragment18, jsx as jsx56, jsxs as jsxs43 } from "react/jsx-runtime";
31329
+ import { Box as Box43, Text as Text45 } from "ink";
31330
+ import { Fragment as Fragment16, jsx as jsx54, jsxs as jsxs43 } from "react/jsx-runtime";
31384
31331
  function buildPreviewSummaryLines(preview) {
31385
31332
  const lines = [];
31386
31333
  const { components, tokens } = preview;
@@ -31632,11 +31579,11 @@ function WizardPreviewStep({
31632
31579
  return;
31633
31580
  }
31634
31581
  });
31635
- return /* @__PURE__ */ jsxs43(Box42, { flexDirection: "column", children: [
31636
- /* @__PURE__ */ jsx56(StepHeader, { step: "push" }),
31637
- /* @__PURE__ */ jsxs43(Box42, { flexDirection: "column", gap: 1, paddingX: 2, paddingBottom: 2, children: [
31638
- hasAnything ? /* @__PURE__ */ jsxs43(Fragment18, { children: [
31639
- /* @__PURE__ */ jsx56(Text45, { children: "Here's what will happen in your space:" }),
31582
+ return /* @__PURE__ */ jsxs43(Box43, { flexDirection: "column", children: [
31583
+ /* @__PURE__ */ jsx54(StepHeader, { step: "push" }),
31584
+ /* @__PURE__ */ jsxs43(Box43, { flexDirection: "column", gap: 1, paddingX: 2, paddingBottom: 2, children: [
31585
+ hasAnything ? /* @__PURE__ */ jsxs43(Fragment16, { children: [
31586
+ /* @__PURE__ */ jsx54(Text45, { children: "Here's what will happen in your space:" }),
31640
31587
  /* @__PURE__ */ jsxs43(
31641
31588
  WindowedPanel,
31642
31589
  {
@@ -31645,15 +31592,15 @@ function WizardPreviewStep({
31645
31592
  title: diffExpanded ? `Diff (${diffLines.length} lines)` : "",
31646
31593
  focused: false,
31647
31594
  children: [
31648
- activeLines.slice(boundedScrollOffset, boundedScrollOffset + viewportHeight).map((line) => /* @__PURE__ */ jsx56(Text45, { color: line.color, wrap: "truncate-end", children: line.text }, line.key)),
31649
- /* @__PURE__ */ jsx56(Text45, { color: PALETTE.muted, wrap: "truncate-end", children: formatPreviewScrollIndicator(activeLines.length, boundedScrollOffset, viewportHeight) })
31595
+ activeLines.slice(boundedScrollOffset, boundedScrollOffset + viewportHeight).map((line) => /* @__PURE__ */ jsx54(Text45, { color: line.color, wrap: "truncate-end", children: line.text }, line.key)),
31596
+ /* @__PURE__ */ jsx54(Text45, { color: PALETTE.muted, wrap: "truncate-end", children: formatPreviewScrollIndicator(activeLines.length, boundedScrollOffset, viewportHeight) })
31650
31597
  ]
31651
31598
  }
31652
31599
  )
31653
- ] }) : /* @__PURE__ */ jsx56(Text45, { color: PALETTE.muted, children: "Nothing to push \u2014 everything is already up to date." }),
31654
- 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." }) }),
31655
- /* @__PURE__ */ jsx56(SpaceEnvironment, { spaceId, environmentId }),
31656
- /* @__PURE__ */ jsx56(Box42, { marginTop: 1, children: /* @__PURE__ */ jsx56(
31600
+ ] }) : /* @__PURE__ */ jsx54(Text45, { color: PALETTE.muted, children: "Nothing to push \u2014 everything is already up to date." }),
31601
+ 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." }) }),
31602
+ /* @__PURE__ */ jsx54(SpaceEnvironment, { spaceId, environmentId }),
31603
+ /* @__PURE__ */ jsx54(Box43, { marginTop: 1, children: /* @__PURE__ */ jsx54(
31657
31604
  ControlHints,
31658
31605
  {
31659
31606
  hints: [
@@ -31699,8 +31646,8 @@ var init_run_teaser = __esm({
31699
31646
  });
31700
31647
 
31701
31648
  // packages/experience-design-system-cli/src/tui/import/steps/10-flow/flow/screen.tsx
31702
- import { Box as Box43 } from "ink";
31703
- import { jsx as jsx57, jsxs as jsxs44 } from "react/jsx-runtime";
31649
+ import { Box as Box44 } from "ink";
31650
+ import { jsx as jsx55, jsxs as jsxs44 } from "react/jsx-runtime";
31704
31651
  function canEditFromPreview(cdf) {
31705
31652
  if (!cdf) return false;
31706
31653
  return parseCDFComponents(cdf).components.length > 0;
@@ -31717,7 +31664,7 @@ function FlowScreen({
31717
31664
  const content = (() => {
31718
31665
  switch (state2.step) {
31719
31666
  case "final-review":
31720
- return /* @__PURE__ */ jsx57(
31667
+ return /* @__PURE__ */ jsx55(
31721
31668
  GenerateReviewStep,
31722
31669
  {
31723
31670
  extractSessionId: state2.extractSessionId,
@@ -31734,10 +31681,10 @@ function FlowScreen({
31734
31681
  }
31735
31682
  );
31736
31683
  case "previewing":
31737
- return /* @__PURE__ */ jsx57(RunningStep, { step: "push", description: "Computing diff against your Contentful space..." });
31684
+ return /* @__PURE__ */ jsx55(RunningStep, { step: "push", description: "Computing diff against your Contentful space..." });
31738
31685
  case "preview-gate":
31739
31686
  if (!state2.serverPreview) return null;
31740
- return /* @__PURE__ */ jsx57(
31687
+ return /* @__PURE__ */ jsx55(
31741
31688
  WizardPreviewStep,
31742
31689
  {
31743
31690
  preview: state2.serverPreview,
@@ -31749,9 +31696,9 @@ function FlowScreen({
31749
31696
  }
31750
31697
  );
31751
31698
  case "pushing":
31752
- return /* @__PURE__ */ jsx57(PushingStep, { progress: state2.pushProgress, produced });
31699
+ return /* @__PURE__ */ jsx55(PushingStep, { progress: state2.pushProgress, produced });
31753
31700
  case "path-prompt":
31754
- return /* @__PURE__ */ jsx57(
31701
+ return /* @__PURE__ */ jsx55(
31755
31702
  PathPrompt,
31756
31703
  {
31757
31704
  defaultPath: state2.outDir,
@@ -31760,10 +31707,10 @@ function FlowScreen({
31760
31707
  }
31761
31708
  );
31762
31709
  case "printing":
31763
- return /* @__PURE__ */ jsx57(RunningStep, { step: "push", description: "Writing output files to disk..." });
31710
+ return /* @__PURE__ */ jsx55(RunningStep, { step: "push", description: "Writing output files to disk..." });
31764
31711
  case "print-gate": {
31765
31712
  const teaser = buildRunTeaserLine(state2.lastRunId);
31766
- return /* @__PURE__ */ jsx57(
31713
+ return /* @__PURE__ */ jsx55(
31767
31714
  GateStep,
31768
31715
  {
31769
31716
  step: "push",
@@ -31778,7 +31725,7 @@ function FlowScreen({
31778
31725
  }
31779
31726
  case "done": {
31780
31727
  const totalFailed = state2.pushResult.componentTypes.failed + state2.pushResult.designTokens.failed;
31781
- return /* @__PURE__ */ jsx57(
31728
+ return /* @__PURE__ */ jsx55(
31782
31729
  DoneStep,
31783
31730
  {
31784
31731
  componentTypes: state2.pushResult.componentTypes,
@@ -31795,7 +31742,7 @@ function FlowScreen({
31795
31742
  );
31796
31743
  }
31797
31744
  case "preview-validation-error":
31798
- return /* @__PURE__ */ jsx57(
31745
+ return /* @__PURE__ */ jsx55(
31799
31746
  PreviewValidationErrorScreen,
31800
31747
  {
31801
31748
  errors: state2.previewValidationErrors,
@@ -31806,7 +31753,7 @@ function FlowScreen({
31806
31753
  }
31807
31754
  );
31808
31755
  case "error":
31809
- return /* @__PURE__ */ jsx57(
31756
+ return /* @__PURE__ */ jsx55(
31810
31757
  ErrorStep,
31811
31758
  {
31812
31759
  stepName: state2.errorStep,
@@ -31817,8 +31764,8 @@ function FlowScreen({
31817
31764
  );
31818
31765
  }
31819
31766
  })();
31820
- return /* @__PURE__ */ jsxs44(Box43, { flexDirection: "column", children: [
31821
- /* @__PURE__ */ jsx57(CustomPromptBanner, { generatePromptPath }),
31767
+ return /* @__PURE__ */ jsxs44(Box44, { flexDirection: "column", children: [
31768
+ /* @__PURE__ */ jsx55(CustomPromptBanner, { generatePromptPath }),
31822
31769
  content
31823
31770
  ] });
31824
31771
  }
@@ -33028,14 +32975,14 @@ var init_help_info = __esm({
33028
32975
 
33029
32976
  // packages/experience-design-system-cli/src/tui/help/PageContainer.tsx
33030
32977
  import { useEffect as useEffect22, useState as useState30 } from "react";
33031
- import { Box as Box44, Text as Text46, useInput as useInput10 } from "ink";
33032
- import { Fragment as Fragment19, jsx as jsx58, jsxs as jsxs45 } from "react/jsx-runtime";
32978
+ import { Box as Box45, Text as Text46, useInput as useInput12 } from "ink";
32979
+ import { Fragment as Fragment17, jsx as jsx56, jsxs as jsxs45 } from "react/jsx-runtime";
33033
32980
  function Section({ title, rows }) {
33034
- return /* @__PURE__ */ jsxs45(Box44, { flexDirection: "column", children: [
33035
- /* @__PURE__ */ jsx58(Text46, { bold: true, color: PALETTE.accent, children: title }),
33036
- rows.map((row) => /* @__PURE__ */ jsxs45(Box44, { gap: 1, children: [
33037
- /* @__PURE__ */ jsx58(Box44, { width: 16, flexShrink: 0, children: /* @__PURE__ */ jsx58(Text46, { color: PALETTE.muted, children: row.label }) }),
33038
- /* @__PURE__ */ jsx58(Text46, { children: row.value })
32981
+ return /* @__PURE__ */ jsxs45(Box45, { flexDirection: "column", children: [
32982
+ /* @__PURE__ */ jsx56(Text46, { bold: true, color: PALETTE.accent, children: title }),
32983
+ rows.map((row) => /* @__PURE__ */ jsxs45(Box45, { gap: 1, children: [
32984
+ /* @__PURE__ */ jsx56(Box45, { width: 16, flexShrink: 0, children: /* @__PURE__ */ jsx56(Text46, { color: PALETTE.muted, children: row.label }) }),
32985
+ /* @__PURE__ */ jsx56(Text46, { children: row.value })
33039
32986
  ] }, row.label))
33040
32987
  ] });
33041
32988
  }
@@ -33049,7 +32996,7 @@ function HelpScreen({ onDone }) {
33049
32996
  void finishDebugRun({ outputs: {}, status: "success", exitMethod });
33050
32997
  onDone();
33051
32998
  };
33052
- useInput10((input, key) => {
32999
+ useInput12((input, key) => {
33053
33000
  if (key.return) {
33054
33001
  leave("saved");
33055
33002
  return;
@@ -33059,14 +33006,14 @@ function HelpScreen({ onDone }) {
33059
33006
  return;
33060
33007
  }
33061
33008
  });
33062
- return /* @__PURE__ */ jsxs45(Box44, { flexDirection: "column", paddingX: 2, paddingY: 1, gap: 1, children: [
33063
- /* @__PURE__ */ jsx58(Text46, { bold: true, children: "Help" }),
33064
- info ? /* @__PURE__ */ jsxs45(Fragment19, { children: [
33065
- /* @__PURE__ */ jsx58(Section, { title: "Where things are stored", rows: info.storage }),
33066
- /* @__PURE__ */ jsx58(Section, { title: "Troubleshooting", rows: info.troubleshooting }),
33067
- /* @__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." })
33068
- ] }) : /* @__PURE__ */ jsx58(Text46, { color: PALETTE.accent, children: "Loading..." }),
33069
- /* @__PURE__ */ jsx58(
33009
+ return /* @__PURE__ */ jsxs45(Box45, { flexDirection: "column", paddingX: 2, paddingY: 1, gap: 1, children: [
33010
+ /* @__PURE__ */ jsx56(Text46, { bold: true, children: "Help" }),
33011
+ info ? /* @__PURE__ */ jsxs45(Fragment17, { children: [
33012
+ /* @__PURE__ */ jsx56(Section, { title: "Where things are stored", rows: info.storage }),
33013
+ /* @__PURE__ */ jsx56(Section, { title: "Troubleshooting", rows: info.troubleshooting }),
33014
+ /* @__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." })
33015
+ ] }) : /* @__PURE__ */ jsx56(Text46, { color: PALETTE.accent, children: "Loading..." }),
33016
+ /* @__PURE__ */ jsx56(
33070
33017
  ControlHints,
33071
33018
  {
33072
33019
  hints: [
@@ -33089,8 +33036,8 @@ var init_PageContainer2 = __esm({
33089
33036
 
33090
33037
  // packages/experience-design-system-cli/src/tui/settings/PageContainer.tsx
33091
33038
  import { useState as useState31 } from "react";
33092
- import { Box as Box45, Text as Text47, useInput as useInput11 } from "ink";
33093
- import { jsx as jsx59, jsxs as jsxs46 } from "react/jsx-runtime";
33039
+ import { Box as Box46, Text as Text47, useInput as useInput13 } from "ink";
33040
+ import { jsx as jsx57, jsxs as jsxs46 } from "react/jsx-runtime";
33094
33041
  function SettingsScreen({
33095
33042
  onNavigate,
33096
33043
  onBack
@@ -33101,7 +33048,7 @@ function SettingsScreen({
33101
33048
  { label: "Opt-in Analytics", screen: "settings-opt-in-analytics" },
33102
33049
  { label: "Debug Mode", screen: "settings-debug-mode" }
33103
33050
  ];
33104
- useInput11((input, key) => {
33051
+ useInput13((input, key) => {
33105
33052
  if (key.upArrow) {
33106
33053
  setFocusIdx((i) => (i - 1 + items.length) % items.length);
33107
33054
  return;
@@ -33121,15 +33068,15 @@ function SettingsScreen({
33121
33068
  onBack();
33122
33069
  }
33123
33070
  });
33124
- return /* @__PURE__ */ jsxs46(Box45, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
33125
- /* @__PURE__ */ jsx59(Text47, { bold: true, children: "Settings" }),
33126
- /* @__PURE__ */ jsx59(Text47, { color: PALETTE.muted, children: " " }),
33071
+ return /* @__PURE__ */ jsxs46(Box46, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
33072
+ /* @__PURE__ */ jsx57(Text47, { bold: true, children: "Settings" }),
33073
+ /* @__PURE__ */ jsx57(Text47, { color: PALETTE.muted, children: " " }),
33127
33074
  items.map((item, i) => /* @__PURE__ */ jsxs46(Text47, { color: i === focusIdx ? PALETTE.accent : void 0, children: [
33128
33075
  i === focusIdx ? "> " : " ",
33129
33076
  item.label
33130
33077
  ] }, item.label)),
33131
- /* @__PURE__ */ jsx59(Text47, { children: " " }),
33132
- /* @__PURE__ */ jsx59(
33078
+ /* @__PURE__ */ jsx57(Text47, { children: " " }),
33079
+ /* @__PURE__ */ jsx57(
33133
33080
  ControlHints,
33134
33081
  {
33135
33082
  hints: [
@@ -33438,14 +33385,14 @@ var init_agent_debug = __esm({
33438
33385
 
33439
33386
  // packages/experience-design-system-cli/src/tui/settings/configuration/agents/AgentStatusBadge.tsx
33440
33387
  import { Text as Text48 } from "ink";
33441
- import { jsx as jsx60 } from "react/jsx-runtime";
33388
+ import { jsx as jsx58 } from "react/jsx-runtime";
33442
33389
  function AgentStatusBadge({
33443
33390
  name,
33444
33391
  checks,
33445
33392
  binary
33446
33393
  }) {
33447
33394
  const { symbol, text, tone } = LIST_STATUS[checks ? statusFromChecks(name, checks, binary) : "checking"];
33448
- return /* @__PURE__ */ jsx60(Text48, { color: TONE_COLOR[tone], children: `${symbol} ${text}` });
33395
+ return /* @__PURE__ */ jsx58(Text48, { color: TONE_COLOR[tone], children: `${symbol} ${text}` });
33449
33396
  }
33450
33397
  var TONE_COLOR;
33451
33398
  var init_AgentStatusBadge = __esm({
@@ -33463,12 +33410,12 @@ var init_AgentStatusBadge = __esm({
33463
33410
 
33464
33411
  // packages/experience-design-system-cli/src/tui/settings/configuration/agents/AgentDetail.tsx
33465
33412
  import { useEffect as useEffect23, useState as useState32 } from "react";
33466
- import { Box as Box46, Text as Text49 } from "ink";
33467
- import { jsx as jsx61, jsxs as jsxs47 } from "react/jsx-runtime";
33413
+ import { Box as Box47, Text as Text49 } from "ink";
33414
+ import { jsx as jsx59, jsxs as jsxs47 } from "react/jsx-runtime";
33468
33415
  function StatusHeading() {
33469
- return /* @__PURE__ */ jsxs47(Box46, { gap: 1, children: [
33470
- /* @__PURE__ */ jsx61(Text49, { bold: true, color: PALETTE.muted, children: "STATUS" }),
33471
- /* @__PURE__ */ jsx61(Text49, { color: PALETTE.muted, children: "\xB7 read only" })
33416
+ return /* @__PURE__ */ jsxs47(Box47, { gap: 1, children: [
33417
+ /* @__PURE__ */ jsx59(Text49, { bold: true, color: PALETTE.muted, children: "STATUS" }),
33418
+ /* @__PURE__ */ jsx59(Text49, { color: PALETTE.muted, children: "\xB7 read only" })
33472
33419
  ] });
33473
33420
  }
33474
33421
  function AgentDetail({
@@ -33531,7 +33478,7 @@ function AgentDetail({
33531
33478
  };
33532
33479
  const formFields = fields(name);
33533
33480
  const labelWidth = formLabelWidth([...formFields, action]);
33534
- return /* @__PURE__ */ jsx61(
33481
+ return /* @__PURE__ */ jsx59(
33535
33482
  FieldForm,
33536
33483
  {
33537
33484
  title: `Settings \u203A Configuration \u203A Agents \u203A ${AGENT_LABELS[name]}`,
@@ -33548,9 +33495,9 @@ function AgentDetail({
33548
33495
  actions: [action],
33549
33496
  notice: testing ? null : notice,
33550
33497
  busy: saving || testing,
33551
- children: /* @__PURE__ */ jsxs47(Box46, { flexDirection: "column", marginTop: 1, children: [
33552
- /* @__PURE__ */ jsx61(StatusHeading, {}),
33553
- 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))
33498
+ children: /* @__PURE__ */ jsxs47(Box47, { flexDirection: "column", marginTop: 1, children: [
33499
+ /* @__PURE__ */ jsx59(StatusHeading, {}),
33500
+ 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))
33554
33501
  ] })
33555
33502
  }
33556
33503
  );
@@ -33576,8 +33523,8 @@ var init_AgentDetail = __esm({
33576
33523
 
33577
33524
  // packages/experience-design-system-cli/src/tui/settings/configuration/agents/AgentsScreen.tsx
33578
33525
  import { useEffect as useEffect24, useRef as useRef15, useState as useState33 } from "react";
33579
- import { Box as Box47, Text as Text50, useInput as useInput12 } from "ink";
33580
- import { Fragment as Fragment20, jsx as jsx62, jsxs as jsxs48 } from "react/jsx-runtime";
33526
+ import { Box as Box48, Text as Text50, useInput as useInput14 } from "ink";
33527
+ import { Fragment as Fragment18, jsx as jsx60, jsxs as jsxs48 } from "react/jsx-runtime";
33581
33528
  function AgentsScreen({ onDone }) {
33582
33529
  const [config, setConfig] = useState33(null);
33583
33530
  const [focus, setFocus] = useState33(0);
@@ -33653,7 +33600,7 @@ function AgentsScreen({ onDone }) {
33653
33600
  setNotice({ kind: "error", text: `Default agent not changed: ${visit.error}` });
33654
33601
  }).finally(() => setSaving(false));
33655
33602
  };
33656
- useInput12((input, key) => {
33603
+ useInput14((input, key) => {
33657
33604
  if (loadError && (key.escape || input === "q")) {
33658
33605
  endVisit(null);
33659
33606
  onDone();
@@ -33685,21 +33632,21 @@ function AgentsScreen({ onDone }) {
33685
33632
  }
33686
33633
  });
33687
33634
  if (!config) {
33688
- return /* @__PURE__ */ jsxs48(Box47, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
33689
- /* @__PURE__ */ jsx62(Text50, { bold: true, children: "Settings \u203A Configuration \u203A Agents" }),
33690
- /* @__PURE__ */ jsx62(Text50, { children: " " }),
33691
- loadError ? /* @__PURE__ */ jsxs48(Fragment20, { children: [
33635
+ return /* @__PURE__ */ jsxs48(Box48, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
33636
+ /* @__PURE__ */ jsx60(Text50, { bold: true, children: "Settings \u203A Configuration \u203A Agents" }),
33637
+ /* @__PURE__ */ jsx60(Text50, { children: " " }),
33638
+ loadError ? /* @__PURE__ */ jsxs48(Fragment18, { children: [
33692
33639
  /* @__PURE__ */ jsxs48(Text50, { color: PALETTE.error, children: [
33693
33640
  "\u2717 Could not read the settings: ",
33694
33641
  loadError
33695
33642
  ] }),
33696
- /* @__PURE__ */ jsx62(Text50, { children: " " }),
33697
- /* @__PURE__ */ jsx62(ControlHints, { hints: [{ keys: "Esc/q", label: "back" }] })
33698
- ] }) : /* @__PURE__ */ jsx62(Text50, { color: PALETTE.accent, children: "Loading..." })
33643
+ /* @__PURE__ */ jsx60(Text50, { children: " " }),
33644
+ /* @__PURE__ */ jsx60(ControlHints, { hints: [{ keys: "Esc/q", label: "back" }] })
33645
+ ] }) : /* @__PURE__ */ jsx60(Text50, { color: PALETTE.accent, children: "Loading..." })
33699
33646
  ] });
33700
33647
  }
33701
33648
  if (open) {
33702
- return /* @__PURE__ */ jsx62(
33649
+ return /* @__PURE__ */ jsx60(
33703
33650
  AgentDetail,
33704
33651
  {
33705
33652
  name: open,
@@ -33720,48 +33667,48 @@ function AgentsScreen({ onDone }) {
33720
33667
  );
33721
33668
  }
33722
33669
  const focusedAgent = AGENT_NAMES[focus];
33723
- return /* @__PURE__ */ jsxs48(Box47, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
33724
- /* @__PURE__ */ jsx62(Text50, { bold: true, children: "Settings \u203A Configuration \u203A Agents" }),
33725
- /* @__PURE__ */ jsx62(Text50, { children: " " }),
33726
- /* @__PURE__ */ jsx62(Text50, { color: PALETTE.muted, children: "The coding agent the CLI runs, and what was found for each one." }),
33727
- /* @__PURE__ */ jsx62(Text50, { children: " " }),
33728
- /* @__PURE__ */ jsxs48(Box47, { gap: 1, children: [
33729
- /* @__PURE__ */ jsx62(Text50, { color: PALETTE.muted, children: "Default agent" }),
33730
- /* @__PURE__ */ jsx62(Text50, { bold: true, children: AGENT_LABELS[config.defaultAgent] }),
33731
- saving && /* @__PURE__ */ jsx62(Text50, { color: PALETTE.accent, children: "\u2026 saving" })
33670
+ return /* @__PURE__ */ jsxs48(Box48, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
33671
+ /* @__PURE__ */ jsx60(Text50, { bold: true, children: "Settings \u203A Configuration \u203A Agents" }),
33672
+ /* @__PURE__ */ jsx60(Text50, { children: " " }),
33673
+ /* @__PURE__ */ jsx60(Text50, { color: PALETTE.muted, children: "The coding agent the CLI runs, and what was found for each one." }),
33674
+ /* @__PURE__ */ jsx60(Text50, { children: " " }),
33675
+ /* @__PURE__ */ jsxs48(Box48, { gap: 1, children: [
33676
+ /* @__PURE__ */ jsx60(Text50, { color: PALETTE.muted, children: "Default agent" }),
33677
+ /* @__PURE__ */ jsx60(Text50, { bold: true, children: AGENT_LABELS[config.defaultAgent] }),
33678
+ saving && /* @__PURE__ */ jsx60(Text50, { color: PALETTE.accent, children: "\u2026 saving" })
33732
33679
  ] }),
33733
- /* @__PURE__ */ jsxs48(Box47, { marginTop: 1, gap: 1, children: [
33734
- /* @__PURE__ */ jsx62(Text50, { children: " " }),
33735
- /* @__PURE__ */ jsx62(Text50, { children: " " }),
33736
- /* @__PURE__ */ jsx62(Box47, { width: NAME_WIDTH, flexShrink: 0, children: /* @__PURE__ */ jsx62(Text50, { color: PALETTE.muted, children: "AGENT" }) }),
33737
- /* @__PURE__ */ jsx62(Text50, { color: PALETTE.muted, children: "STATUS" })
33680
+ /* @__PURE__ */ jsxs48(Box48, { marginTop: 1, gap: 1, children: [
33681
+ /* @__PURE__ */ jsx60(Text50, { children: " " }),
33682
+ /* @__PURE__ */ jsx60(Text50, { children: " " }),
33683
+ /* @__PURE__ */ jsx60(Box48, { width: NAME_WIDTH, flexShrink: 0, children: /* @__PURE__ */ jsx60(Text50, { color: PALETTE.muted, children: "AGENT" }) }),
33684
+ /* @__PURE__ */ jsx60(Text50, { color: PALETTE.muted, children: "STATUS" })
33738
33685
  ] }),
33739
33686
  AGENT_NAMES.map((name) => {
33740
33687
  const isFocused = focusedAgent === name;
33741
- return /* @__PURE__ */ jsxs48(Box47, { gap: 1, children: [
33742
- /* @__PURE__ */ jsx62(Text50, { color: isFocused ? PALETTE.accent : void 0, children: isFocused ? "\u276F" : " " }),
33743
- /* @__PURE__ */ jsx62(Text50, { color: PALETTE.success, children: name === config.defaultAgent ? "\u2605" : " " }),
33744
- /* @__PURE__ */ jsx62(Box47, { width: NAME_WIDTH, flexShrink: 0, children: /* @__PURE__ */ jsx62(Text50, { bold: isFocused, color: isFocused ? PALETTE.accent : void 0, children: AGENT_LABELS[name] }) }),
33745
- /* @__PURE__ */ jsx62(AgentStatusBadge, { name, checks: checks[name], binary: config.agents[name].binary })
33688
+ return /* @__PURE__ */ jsxs48(Box48, { gap: 1, children: [
33689
+ /* @__PURE__ */ jsx60(Text50, { color: isFocused ? PALETTE.accent : void 0, children: isFocused ? "\u276F" : " " }),
33690
+ /* @__PURE__ */ jsx60(Text50, { color: PALETTE.success, children: name === config.defaultAgent ? "\u2605" : " " }),
33691
+ /* @__PURE__ */ jsx60(Box48, { width: NAME_WIDTH, flexShrink: 0, children: /* @__PURE__ */ jsx60(Text50, { bold: isFocused, color: isFocused ? PALETTE.accent : void 0, children: AGENT_LABELS[name] }) }),
33692
+ /* @__PURE__ */ jsx60(AgentStatusBadge, { name, checks: checks[name], binary: config.agents[name].binary })
33746
33693
  ] }, name);
33747
33694
  }),
33748
- /* @__PURE__ */ jsxs48(Box47, { flexDirection: "column", marginTop: 1, children: [
33749
- /* @__PURE__ */ jsx62(Text50, { color: PALETTE.muted, children: `\u2500 ${AGENT_LABELS[focusedAgent]} ${"\u2500".repeat(30)}` }),
33750
- panelRows(focusedAgent, checks[focusedAgent], config.agents[focusedAgent]).map((row) => /* @__PURE__ */ jsxs48(Box47, { gap: 1, paddingLeft: 1, children: [
33751
- /* @__PURE__ */ jsx62(Box47, { width: PANEL_LABEL_WIDTH, flexShrink: 0, children: /* @__PURE__ */ jsx62(Text50, { color: PALETTE.muted, children: row.label }) }),
33752
- /* @__PURE__ */ jsx62(Text50, { color: TONE_COLOR[row.tone], children: row.value })
33695
+ /* @__PURE__ */ jsxs48(Box48, { flexDirection: "column", marginTop: 1, children: [
33696
+ /* @__PURE__ */ jsx60(Text50, { color: PALETTE.muted, children: `\u2500 ${AGENT_LABELS[focusedAgent]} ${"\u2500".repeat(30)}` }),
33697
+ panelRows(focusedAgent, checks[focusedAgent], config.agents[focusedAgent]).map((row) => /* @__PURE__ */ jsxs48(Box48, { gap: 1, paddingLeft: 1, children: [
33698
+ /* @__PURE__ */ jsx60(Box48, { width: PANEL_LABEL_WIDTH, flexShrink: 0, children: /* @__PURE__ */ jsx60(Text50, { color: PALETTE.muted, children: row.label }) }),
33699
+ /* @__PURE__ */ jsx60(Text50, { color: TONE_COLOR[row.tone], children: row.value })
33753
33700
  ] }, row.label))
33754
33701
  ] }),
33755
- notice && /* @__PURE__ */ jsxs48(Fragment20, { children: [
33756
- /* @__PURE__ */ jsx62(Text50, { children: " " }),
33702
+ notice && /* @__PURE__ */ jsxs48(Fragment18, { children: [
33703
+ /* @__PURE__ */ jsx60(Text50, { children: " " }),
33757
33704
  /* @__PURE__ */ jsxs48(Text50, { bold: true, color: notice.kind === "success" ? PALETTE.success : PALETTE.error, children: [
33758
33705
  notice.kind === "success" ? "\u2713" : "\u2717",
33759
33706
  " ",
33760
33707
  notice.text
33761
33708
  ] })
33762
33709
  ] }),
33763
- /* @__PURE__ */ jsx62(Text50, { children: " " }),
33764
- /* @__PURE__ */ jsx62(
33710
+ /* @__PURE__ */ jsx60(Text50, { children: " " }),
33711
+ /* @__PURE__ */ jsx60(
33765
33712
  ControlHints,
33766
33713
  {
33767
33714
  hints: [
@@ -33826,8 +33773,8 @@ var init_project_store = __esm({
33826
33773
 
33827
33774
  // packages/experience-design-system-cli/src/tui/settings/configuration/project/ProjectScreen.tsx
33828
33775
  import { useEffect as useEffect25, useRef as useRef16, useState as useState34 } from "react";
33829
- import { Box as Box48, Text as Text51, useInput as useInput13 } from "ink";
33830
- import { Fragment as Fragment21, jsx as jsx63, jsxs as jsxs49 } from "react/jsx-runtime";
33776
+ import { Box as Box49, Text as Text51, useInput as useInput15 } from "ink";
33777
+ import { Fragment as Fragment19, jsx as jsx61, jsxs as jsxs49 } from "react/jsx-runtime";
33831
33778
  function debugFields(config) {
33832
33779
  return {
33833
33780
  space_id: config?.spaceId ?? "",
@@ -33889,24 +33836,24 @@ function ProjectScreen({ onDone }) {
33889
33836
  exitMethod: change.changed ? "saved" : "discarded"
33890
33837
  });
33891
33838
  };
33892
- useInput13((input, key) => {
33839
+ useInput15((input, key) => {
33893
33840
  if (!config && loadError && (key.escape || input === "q")) {
33894
33841
  endVisit(null);
33895
33842
  onDone();
33896
33843
  }
33897
33844
  });
33898
33845
  if (!config) {
33899
- return /* @__PURE__ */ jsxs49(Box48, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
33900
- /* @__PURE__ */ jsx63(Text51, { bold: true, children: "Settings \u203A Configuration \u203A Project" }),
33901
- /* @__PURE__ */ jsx63(Text51, { children: " " }),
33902
- loadError ? /* @__PURE__ */ jsxs49(Fragment21, { children: [
33846
+ return /* @__PURE__ */ jsxs49(Box49, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
33847
+ /* @__PURE__ */ jsx61(Text51, { bold: true, children: "Settings \u203A Configuration \u203A Project" }),
33848
+ /* @__PURE__ */ jsx61(Text51, { children: " " }),
33849
+ loadError ? /* @__PURE__ */ jsxs49(Fragment19, { children: [
33903
33850
  /* @__PURE__ */ jsxs49(Text51, { color: PALETTE.error, children: [
33904
33851
  "\u2717 Could not read the settings: ",
33905
33852
  loadError
33906
33853
  ] }),
33907
- /* @__PURE__ */ jsx63(Text51, { children: " " }),
33908
- /* @__PURE__ */ jsx63(ControlHints, { hints: [{ keys: "Esc/q", label: "back" }] })
33909
- ] }) : /* @__PURE__ */ jsx63(Text51, { color: PALETTE.accent, children: "Loading..." })
33854
+ /* @__PURE__ */ jsx61(Text51, { children: " " }),
33855
+ /* @__PURE__ */ jsx61(ControlHints, { hints: [{ keys: "Esc/q", label: "back" }] })
33856
+ ] }) : /* @__PURE__ */ jsx61(Text51, { color: PALETTE.accent, children: "Loading..." })
33910
33857
  ] });
33911
33858
  }
33912
33859
  const save = () => {
@@ -33927,7 +33874,7 @@ function ProjectScreen({ onDone }) {
33927
33874
  endVisit(config);
33928
33875
  onDone();
33929
33876
  };
33930
- return /* @__PURE__ */ jsx63(
33877
+ return /* @__PURE__ */ jsx61(
33931
33878
  FieldForm,
33932
33879
  {
33933
33880
  title: "Settings \u203A Configuration \u203A Project",
@@ -33973,13 +33920,13 @@ var init_ProjectScreen = __esm({
33973
33920
 
33974
33921
  // packages/experience-design-system-cli/src/tui/settings/configuration/ConfigurationScreen.tsx
33975
33922
  import { useState as useState35 } from "react";
33976
- import { Box as Box49, Text as Text52, useInput as useInput14 } from "ink";
33977
- import { jsx as jsx64, jsxs as jsxs50 } from "react/jsx-runtime";
33923
+ import { Box as Box50, Text as Text52, useInput as useInput16 } from "ink";
33924
+ import { jsx as jsx62, jsxs as jsxs50 } from "react/jsx-runtime";
33978
33925
  function ConfigurationScreen({ onDone }) {
33979
33926
  const [focus, setFocus] = useState35(0);
33980
33927
  const [open, setOpen] = useState35(null);
33981
33928
  const close = () => setOpen(null);
33982
- useInput14((input, key) => {
33929
+ useInput16((input, key) => {
33983
33930
  if (open) return;
33984
33931
  if (key.upArrow) {
33985
33932
  setFocus((i) => (i - 1 + SECTIONS.length) % SECTIONS.length);
@@ -33995,18 +33942,18 @@ function ConfigurationScreen({ onDone }) {
33995
33942
  }
33996
33943
  if (key.escape || input === "q") onDone();
33997
33944
  });
33998
- if (open === "project") return /* @__PURE__ */ jsx64(ProjectScreen, { onDone: close });
33999
- if (open === "agents") return /* @__PURE__ */ jsx64(AgentsScreen, { onDone: close });
34000
- return /* @__PURE__ */ jsxs50(Box49, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
34001
- /* @__PURE__ */ jsx64(Text52, { bold: true, children: "Settings \u203A Configuration" }),
34002
- /* @__PURE__ */ jsx64(Text52, { children: " " }),
34003
- SECTIONS.map((section, index) => /* @__PURE__ */ jsxs50(Box49, { gap: 1, children: [
34004
- /* @__PURE__ */ jsx64(Text52, { color: index === focus ? PALETTE.accent : void 0, children: index === focus ? "\u276F" : " " }),
34005
- /* @__PURE__ */ jsx64(Box49, { width: 9, flexShrink: 0, children: /* @__PURE__ */ jsx64(Text52, { bold: index === focus, color: index === focus ? PALETTE.accent : void 0, children: section.label }) }),
34006
- /* @__PURE__ */ jsx64(Text52, { color: PALETTE.muted, children: section.description })
33945
+ if (open === "project") return /* @__PURE__ */ jsx62(ProjectScreen, { onDone: close });
33946
+ if (open === "agents") return /* @__PURE__ */ jsx62(AgentsScreen, { onDone: close });
33947
+ return /* @__PURE__ */ jsxs50(Box50, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
33948
+ /* @__PURE__ */ jsx62(Text52, { bold: true, children: "Settings \u203A Configuration" }),
33949
+ /* @__PURE__ */ jsx62(Text52, { children: " " }),
33950
+ SECTIONS.map((section, index) => /* @__PURE__ */ jsxs50(Box50, { gap: 1, children: [
33951
+ /* @__PURE__ */ jsx62(Text52, { color: index === focus ? PALETTE.accent : void 0, children: index === focus ? "\u276F" : " " }),
33952
+ /* @__PURE__ */ jsx62(Box50, { width: 9, flexShrink: 0, children: /* @__PURE__ */ jsx62(Text52, { bold: index === focus, color: index === focus ? PALETTE.accent : void 0, children: section.label }) }),
33953
+ /* @__PURE__ */ jsx62(Text52, { color: PALETTE.muted, children: section.description })
34007
33954
  ] }, section.id)),
34008
- /* @__PURE__ */ jsx64(Text52, { children: " " }),
34009
- /* @__PURE__ */ jsx64(
33955
+ /* @__PURE__ */ jsx62(Text52, { children: " " }),
33956
+ /* @__PURE__ */ jsx62(
34010
33957
  ControlHints,
34011
33958
  {
34012
33959
  hints: [
@@ -34039,8 +33986,8 @@ var init_ConfigurationScreen = __esm({
34039
33986
 
34040
33987
  // packages/experience-design-system-cli/src/tui/settings/opt-in-analytics/screen.tsx
34041
33988
  import { useEffect as useEffect26, useState as useState36 } from "react";
34042
- import { Box as Box50, Text as Text53, useInput as useInput15 } from "ink";
34043
- import { Fragment as Fragment22, jsx as jsx65, jsxs as jsxs51 } from "react/jsx-runtime";
33989
+ import { Box as Box51, Text as Text53, useInput as useInput17 } from "ink";
33990
+ import { Fragment as Fragment20, jsx as jsx63, jsxs as jsxs51 } from "react/jsx-runtime";
34044
33991
  function OptInAnalyticsScreen({ onDone }) {
34045
33992
  const [loading, setLoading] = useState36(true);
34046
33993
  const [enabled, setEnabled] = useState36(true);
@@ -34056,7 +34003,7 @@ function OptInAnalyticsScreen({ onDone }) {
34056
34003
  });
34057
34004
  });
34058
34005
  }, []);
34059
- useInput15((input, key) => {
34006
+ useInput17((input, key) => {
34060
34007
  if (loading) return;
34061
34008
  if (key.return || input === " ") {
34062
34009
  setEnabled((current) => {
@@ -34071,21 +34018,21 @@ function OptInAnalyticsScreen({ onDone }) {
34071
34018
  onDone();
34072
34019
  }
34073
34020
  });
34074
- return /* @__PURE__ */ jsxs51(Box50, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
34075
- /* @__PURE__ */ jsx65(Text53, { bold: true, children: "Settings \u203A Opt-in Analytics" }),
34076
- /* @__PURE__ */ jsx65(Text53, { children: " " }),
34077
- loading ? /* @__PURE__ */ jsx65(Text53, { color: PALETTE.muted, children: "Loading\u2026" }) : /* @__PURE__ */ jsxs51(Fragment22, { children: [
34021
+ return /* @__PURE__ */ jsxs51(Box51, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
34022
+ /* @__PURE__ */ jsx63(Text53, { bold: true, children: "Settings \u203A Opt-in Analytics" }),
34023
+ /* @__PURE__ */ jsx63(Text53, { children: " " }),
34024
+ loading ? /* @__PURE__ */ jsx63(Text53, { color: PALETTE.muted, children: "Loading\u2026" }) : /* @__PURE__ */ jsxs51(Fragment20, { children: [
34078
34025
  /* @__PURE__ */ jsxs51(Text53, { children: [
34079
34026
  "Share anonymous usage data:",
34080
34027
  " ",
34081
- /* @__PURE__ */ jsx65(Text53, { bold: true, color: enabled ? PALETTE.success : PALETTE.muted, children: enabled ? "On" : "Off" })
34028
+ /* @__PURE__ */ jsx63(Text53, { bold: true, color: enabled ? PALETTE.success : PALETTE.muted, children: enabled ? "On" : "Off" })
34082
34029
  ] }),
34083
- /* @__PURE__ */ jsx65(Text53, { children: " " }),
34084
- /* @__PURE__ */ jsx65(Text53, { color: PALETTE.muted, children: "Shares which CLI commands are used and where imports succeed or fail." }),
34085
- /* @__PURE__ */ jsx65(Text53, { color: PALETTE.muted, children: "Never includes source code, file paths, credentials, or authored content." })
34030
+ /* @__PURE__ */ jsx63(Text53, { children: " " }),
34031
+ /* @__PURE__ */ jsx63(Text53, { color: PALETTE.muted, children: "Shares which CLI commands are used and where imports succeed or fail." }),
34032
+ /* @__PURE__ */ jsx63(Text53, { color: PALETTE.muted, children: "Never includes source code, file paths, credentials, or authored content." })
34086
34033
  ] }),
34087
- /* @__PURE__ */ jsx65(Text53, { children: " " }),
34088
- /* @__PURE__ */ jsx65(
34034
+ /* @__PURE__ */ jsx63(Text53, { children: " " }),
34035
+ /* @__PURE__ */ jsx63(
34089
34036
  ControlHints,
34090
34037
  {
34091
34038
  hints: [
@@ -34108,8 +34055,8 @@ var init_screen11 = __esm({
34108
34055
 
34109
34056
  // packages/experience-design-system-cli/src/tui/settings/debug-mode/screen.tsx
34110
34057
  import { useEffect as useEffect27, useRef as useRef17, useState as useState37 } from "react";
34111
- import { Box as Box51, Text as Text54, useInput as useInput16 } from "ink";
34112
- import { Fragment as Fragment23, jsx as jsx66, jsxs as jsxs52 } from "react/jsx-runtime";
34058
+ import { Box as Box52, Text as Text54, useInput as useInput18 } from "ink";
34059
+ import { Fragment as Fragment21, jsx as jsx64, jsxs as jsxs52 } from "react/jsx-runtime";
34113
34060
  function DebugModeScreen({ onDone }) {
34114
34061
  const [setting, setSetting] = useState37(null);
34115
34062
  const [focus, setFocus] = useState37("enabled");
@@ -34158,7 +34105,7 @@ function DebugModeScreen({ onDone }) {
34158
34105
  exitMethod: change.changed ? "saved" : "discarded"
34159
34106
  });
34160
34107
  };
34161
- useInput16((input, key) => {
34108
+ useInput18((input, key) => {
34162
34109
  if (!setting) return;
34163
34110
  if (key.upArrow || key.downArrow) {
34164
34111
  setFocus((current) => ROWS[(ROWS.indexOf(current) + (key.downArrow ? 1 : ROWS.length - 1)) % ROWS.length]);
@@ -34185,24 +34132,24 @@ function DebugModeScreen({ onDone }) {
34185
34132
  onDone();
34186
34133
  }
34187
34134
  });
34188
- const marker = (row) => /* @__PURE__ */ jsx66(Text54, { color: focus === row ? PALETTE.accent : void 0, children: focus === row ? "\u276F" : " " });
34189
- const label = (row, text) => /* @__PURE__ */ jsx66(Text54, { bold: focus === row, color: focus === row ? PALETTE.accent : PALETTE.muted, children: text });
34190
- return /* @__PURE__ */ jsxs52(Box51, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
34191
- /* @__PURE__ */ jsx66(Text54, { bold: true, children: "Settings \u203A Debug Mode" }),
34192
- /* @__PURE__ */ jsx66(Text54, { children: " " }),
34193
- setting ? /* @__PURE__ */ jsxs52(Fragment23, { children: [
34194
- /* @__PURE__ */ jsxs52(Box51, { gap: 1, children: [
34135
+ const marker = (row) => /* @__PURE__ */ jsx64(Text54, { color: focus === row ? PALETTE.accent : void 0, children: focus === row ? "\u276F" : " " });
34136
+ const label = (row, text) => /* @__PURE__ */ jsx64(Text54, { bold: focus === row, color: focus === row ? PALETTE.accent : PALETTE.muted, children: text });
34137
+ return /* @__PURE__ */ jsxs52(Box52, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
34138
+ /* @__PURE__ */ jsx64(Text54, { bold: true, children: "Settings \u203A Debug Mode" }),
34139
+ /* @__PURE__ */ jsx64(Text54, { children: " " }),
34140
+ setting ? /* @__PURE__ */ jsxs52(Fragment21, { children: [
34141
+ /* @__PURE__ */ jsxs52(Box52, { gap: 1, children: [
34195
34142
  marker("enabled"),
34196
34143
  label("enabled", "Debug logging:"),
34197
- /* @__PURE__ */ jsx66(Text54, { bold: true, color: setting.enabled ? PALETTE.success : PALETTE.muted, children: setting.enabled ? "On" : "Off" })
34144
+ /* @__PURE__ */ jsx64(Text54, { bold: true, color: setting.enabled ? PALETTE.success : PALETTE.muted, children: setting.enabled ? "On" : "Off" })
34198
34145
  ] }),
34199
- /* @__PURE__ */ jsxs52(Box51, { gap: 1, children: [
34146
+ /* @__PURE__ */ jsxs52(Box52, { gap: 1, children: [
34200
34147
  marker("retentionDays"),
34201
34148
  label("retentionDays", "Delete logs after:"),
34202
34149
  RETENTION_CHOICES.map((days) => {
34203
34150
  const highlighted = focus === "retentionDays" && days === pending;
34204
34151
  const saved = days === setting.retentionDays;
34205
- return /* @__PURE__ */ jsx66(
34152
+ return /* @__PURE__ */ jsx64(
34206
34153
  Text54,
34207
34154
  {
34208
34155
  bold: highlighted || saved,
@@ -34214,15 +34161,15 @@ function DebugModeScreen({ onDone }) {
34214
34161
  );
34215
34162
  })
34216
34163
  ] }),
34217
- /* @__PURE__ */ jsx66(Text54, { children: " " }),
34164
+ /* @__PURE__ */ jsx64(Text54, { children: " " }),
34218
34165
  notice ? /* @__PURE__ */ jsxs52(Text54, { color: notice.kind === "success" ? PALETTE.success : PALETTE.error, children: [
34219
34166
  notice.kind === "success" ? "\u2713" : "\u2717",
34220
34167
  " ",
34221
34168
  notice.text
34222
- ] }) : /* @__PURE__ */ jsx66(Text54, { color: PALETTE.muted, children: "\u2713 marks what is saved. Older logs are deleted the next time the CLI starts." })
34223
- ] }) : /* @__PURE__ */ jsx66(Text54, { color: PALETTE.muted, children: "Loading\u2026" }),
34224
- /* @__PURE__ */ jsx66(Text54, { children: " " }),
34225
- /* @__PURE__ */ jsx66(
34169
+ ] }) : /* @__PURE__ */ jsx64(Text54, { color: PALETTE.muted, children: "\u2713 marks what is saved. Older logs are deleted the next time the CLI starts." })
34170
+ ] }) : /* @__PURE__ */ jsx64(Text54, { color: PALETTE.muted, children: "Loading\u2026" }),
34171
+ /* @__PURE__ */ jsx64(Text54, { children: " " }),
34172
+ /* @__PURE__ */ jsx64(
34226
34173
  ControlHints,
34227
34174
  {
34228
34175
  hints: [
@@ -34260,7 +34207,7 @@ __export(app_exports, {
34260
34207
  runApp: () => runApp
34261
34208
  });
34262
34209
  import { useEffect as useEffect28, useState as useState38 } from "react";
34263
- import { Fragment as Fragment24, jsx as jsx67 } from "react/jsx-runtime";
34210
+ import { Fragment as Fragment22, jsx as jsx65 } from "react/jsx-runtime";
34264
34211
  function App({ importOptions, inkClear }) {
34265
34212
  const [screen, setScreen] = useState38("start");
34266
34213
  const [importExitCode, setImportExitCode] = useState38();
@@ -34451,9 +34398,9 @@ function App({ importOptions, inkClear }) {
34451
34398
  };
34452
34399
  switch (screen) {
34453
34400
  case "import":
34454
- if (showImportResult) return /* @__PURE__ */ jsx67(ImportScreen, { exitCode: importExitCode, onDone: finishImportResult });
34401
+ if (showImportResult) return /* @__PURE__ */ jsx65(ImportScreen, { exitCode: importExitCode, onDone: finishImportResult });
34455
34402
  if (flow && flowStart) {
34456
- return /* @__PURE__ */ jsx67(
34403
+ return /* @__PURE__ */ jsx65(
34457
34404
  FlowScreen,
34458
34405
  {
34459
34406
  state: flow.state,
@@ -34463,15 +34410,15 @@ function App({ importOptions, inkClear }) {
34463
34410
  }
34464
34411
  );
34465
34412
  }
34466
- if (importDefaults === void 0) return /* @__PURE__ */ jsx67(Fragment24, {});
34413
+ if (importDefaults === void 0) return /* @__PURE__ */ jsx65(Fragment22, {});
34467
34414
  if (target === void 0) {
34468
- return /* @__PURE__ */ jsx67(PreflightScreen, { onChoose: setTarget, onQuit: leaveImport });
34415
+ return /* @__PURE__ */ jsx65(PreflightScreen, { onChoose: setTarget, onQuit: leaveImport });
34469
34416
  }
34470
34417
  const inputStep = currentInputStep(target, answers);
34471
34418
  if (!extractionRun && !tokensOnlyRun && inputStep !== "credentials") {
34472
34419
  switch (inputStep) {
34473
34420
  case "project":
34474
- return /* @__PURE__ */ jsx67(
34421
+ return /* @__PURE__ */ jsx65(
34475
34422
  WelcomeScreen,
34476
34423
  {
34477
34424
  onContinue: (projectPath) => answer({ projectPath }),
@@ -34480,7 +34427,7 @@ function App({ importOptions, inkClear }) {
34480
34427
  }
34481
34428
  );
34482
34429
  case "token-file":
34483
- return /* @__PURE__ */ jsx67(
34430
+ return /* @__PURE__ */ jsx65(
34484
34431
  TokenInputScreen,
34485
34432
  {
34486
34433
  initialPath: importDefaults.tokenFile,
@@ -34489,7 +34436,7 @@ function App({ importOptions, inkClear }) {
34489
34436
  }
34490
34437
  );
34491
34438
  case "path-validation":
34492
- return /* @__PURE__ */ jsx67(
34439
+ return /* @__PURE__ */ jsx65(
34493
34440
  PathValidationScreen,
34494
34441
  {
34495
34442
  projectPath: answers.projectPath ?? "",
@@ -34503,9 +34450,9 @@ function App({ importOptions, inkClear }) {
34503
34450
  }
34504
34451
  if (tokensOnlyRun) {
34505
34452
  if (tokensOnly?.status === "done" && !tokensOnly.result.ok) {
34506
- return /* @__PURE__ */ jsx67(ErrorStep, { stepName: tokensOnly.result.step, message: tokensOnly.result.message, onExit: leaveImport });
34453
+ return /* @__PURE__ */ jsx65(ErrorStep, { stepName: tokensOnly.result.step, message: tokensOnly.result.message, onExit: leaveImport });
34507
34454
  }
34508
- return /* @__PURE__ */ jsx67(
34455
+ return /* @__PURE__ */ jsx65(
34509
34456
  RunningStep,
34510
34457
  {
34511
34458
  step: "generation",
@@ -34516,19 +34463,19 @@ function App({ importOptions, inkClear }) {
34516
34463
  }
34517
34464
  if (extractionRun) {
34518
34465
  if (extraction?.status === "done" && !extraction.result.ok) {
34519
- return /* @__PURE__ */ jsx67(ErrorStep, { stepName: extraction.result.step, message: extraction.result.message, onExit: leaveImport });
34466
+ return /* @__PURE__ */ jsx65(ErrorStep, { stepName: extraction.result.step, message: extraction.result.message, onExit: leaveImport });
34520
34467
  }
34521
34468
  if (extraction?.status === "running") {
34522
- return /* @__PURE__ */ jsx67(ExtractionScreen, { progress: extraction.progress, agent: extractionRun.input.agent });
34469
+ return /* @__PURE__ */ jsx65(ExtractionScreen, { progress: extraction.progress, agent: extractionRun.input.agent });
34523
34470
  }
34524
- return /* @__PURE__ */ jsx67(Fragment24, {});
34471
+ return /* @__PURE__ */ jsx65(Fragment22, {});
34525
34472
  }
34526
34473
  if (scopeRun && scopeFlow) {
34527
34474
  if (scopeFlow.status === "failed") {
34528
- return /* @__PURE__ */ jsx67(ErrorStep, { stepName: "scope gate", message: scopeFlow.message, onExit: leaveImport });
34475
+ return /* @__PURE__ */ jsx65(ErrorStep, { stepName: "scope gate", message: scopeFlow.message, onExit: leaveImport });
34529
34476
  }
34530
34477
  if (scopeFlow.status === "deciding") {
34531
- return /* @__PURE__ */ jsx67(
34478
+ return /* @__PURE__ */ jsx65(
34532
34479
  ScopeGateScreen,
34533
34480
  {
34534
34481
  components: scopeFlow.load.components,
@@ -34538,10 +34485,10 @@ function App({ importOptions, inkClear }) {
34538
34485
  );
34539
34486
  }
34540
34487
  if (generation?.status === "done" && !generation.result.ok) {
34541
- return /* @__PURE__ */ jsx67(ErrorStep, { stepName: generation.result.step, message: generation.result.message, onExit: leaveImport });
34488
+ return /* @__PURE__ */ jsx65(ErrorStep, { stepName: generation.result.step, message: generation.result.message, onExit: leaveImport });
34542
34489
  }
34543
34490
  if (generation?.status === "running") {
34544
- return /* @__PURE__ */ jsx67(
34491
+ return /* @__PURE__ */ jsx65(
34545
34492
  GenerationScreen,
34546
34493
  {
34547
34494
  progress: generation.progress,
@@ -34551,9 +34498,9 @@ function App({ importOptions, inkClear }) {
34551
34498
  }
34552
34499
  );
34553
34500
  }
34554
- return /* @__PURE__ */ jsx67(Fragment24, {});
34501
+ return /* @__PURE__ */ jsx65(Fragment22, {});
34555
34502
  }
34556
- return /* @__PURE__ */ jsx67(
34503
+ return /* @__PURE__ */ jsx65(
34557
34504
  CredentialsScreen,
34558
34505
  {
34559
34506
  initial: importDefaults.credentials,
@@ -34563,17 +34510,17 @@ function App({ importOptions, inkClear }) {
34563
34510
  }
34564
34511
  );
34565
34512
  case "help":
34566
- return /* @__PURE__ */ jsx67(HelpScreen, { onDone: goToStart });
34513
+ return /* @__PURE__ */ jsx65(HelpScreen, { onDone: goToStart });
34567
34514
  case "settings":
34568
- return /* @__PURE__ */ jsx67(SettingsScreen, { onNavigate: setScreen, onBack: goToStart });
34515
+ return /* @__PURE__ */ jsx65(SettingsScreen, { onNavigate: setScreen, onBack: goToStart });
34569
34516
  case "settings-configuration":
34570
- return /* @__PURE__ */ jsx67(ConfigurationScreen, { onDone: goToSettings });
34517
+ return /* @__PURE__ */ jsx65(ConfigurationScreen, { onDone: goToSettings });
34571
34518
  case "settings-opt-in-analytics":
34572
- return /* @__PURE__ */ jsx67(OptInAnalyticsScreen, { onDone: goToSettings });
34519
+ return /* @__PURE__ */ jsx65(OptInAnalyticsScreen, { onDone: goToSettings });
34573
34520
  case "settings-debug-mode":
34574
- return /* @__PURE__ */ jsx67(DebugModeScreen, { onDone: goToSettings });
34521
+ return /* @__PURE__ */ jsx65(DebugModeScreen, { onDone: goToSettings });
34575
34522
  case "start":
34576
- return /* @__PURE__ */ jsx67(HomeScreen, { onNavigate: setScreen });
34523
+ return /* @__PURE__ */ jsx65(HomeScreen, { onNavigate: setScreen });
34577
34524
  }
34578
34525
  }
34579
34526
  async function runApp(renderApp, importOptions) {
@@ -34581,7 +34528,7 @@ async function runApp(renderApp, importOptions) {
34581
34528
  instance.clear?.();
34582
34529
  process.stdout.write("\x1B[H\x1B[0J");
34583
34530
  };
34584
- const instance = renderApp(/* @__PURE__ */ jsx67(App, { importOptions, inkClear }));
34531
+ const instance = renderApp(/* @__PURE__ */ jsx65(App, { importOptions, inkClear }));
34585
34532
  await instance.waitUntilExit();
34586
34533
  }
34587
34534
  var init_app = __esm({