@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/app.js CHANGED
@@ -3104,9 +3104,9 @@ function PreflightScreen({ onChoose, onQuit }) {
3104
3104
  ] });
3105
3105
  }
3106
3106
 
3107
- // packages/experience-design-system-cli/src/tui/shared/components/PathStepScreen.tsx
3108
- import { useState as useState7 } from "react";
3109
- import { Box as Box12, Text as Text12, useInput as useInput9 } from "ink";
3107
+ // packages/experience-design-system-cli/src/tui/import/steps/01-welcome/screen.tsx
3108
+ import { useState as useState5 } from "react";
3109
+ import { Box as Box10, Text as Text10 } from "ink";
3110
3110
 
3111
3111
  // packages/experience-design-system-cli/src/tui/shared/components/ClearableTextInput.tsx
3112
3112
  import { useRef } from "react";
@@ -3137,400 +3137,83 @@ function ClearableTextInput({ onChange, ...props }) {
3137
3137
  );
3138
3138
  }
3139
3139
 
3140
- // packages/experience-design-system-cli/src/tui/shared/components/MenuScreen.tsx
3141
- import { useState as useState6 } from "react";
3142
- import { Box as Box11, Text as Text11, useInput as useInput8 } from "ink";
3140
+ // packages/experience-design-system-cli/src/tui/import/steps/01-welcome/controls.ts
3141
+ import { useInput as useInput7 } from "ink";
3143
3142
 
3144
- // packages/experience-design-system-cli/src/tui/shared/components/FieldForm.tsx
3145
- import { useState as useState5 } from "react";
3146
- import { Box as Box10, Text as Text10, useInput as useInput7 } from "ink";
3147
- import { Fragment, jsx as jsx11, jsxs as jsxs10 } from "react/jsx-runtime";
3148
- function formLabelWidth(rows) {
3149
- return Math.max(...rows.map((row) => row.label.length));
3150
- }
3151
- function FormReadOnlyRow({
3152
- label,
3153
- labelWidth,
3154
- children
3155
- }) {
3156
- return /* @__PURE__ */ jsxs10(Box10, { gap: 1, children: [
3157
- /* @__PURE__ */ jsx11(Text10, { children: " " }),
3158
- /* @__PURE__ */ jsx11(Box10, { width: labelWidth, flexShrink: 0, children: /* @__PURE__ */ jsx11(Text10, { color: PALETTE.muted, children: label }) }),
3159
- children
3160
- ] });
3143
+ // packages/experience-design-system-cli/src/tui/import/steps/01-welcome/logic.ts
3144
+ function shouldQuit(key) {
3145
+ return key.escape;
3161
3146
  }
3162
- function FieldForm({
3163
- header,
3164
- title,
3165
- subtitle,
3166
- fields: fields2,
3167
- values,
3168
- onChange,
3169
- onSave,
3170
- saveLabel = "save",
3171
- enterAdvances = false,
3172
- onSkip,
3173
- skipLabel: skipLabel2 = "skip",
3174
- onQuit,
3175
- quitLabel = "back without saving",
3176
- actions = [],
3177
- notice,
3178
- busy = false,
3179
- children
3180
- }) {
3181
- const [active, setActive] = useState5(0);
3182
- const [editing, setEditing] = useState5(false);
3183
- const [valueBeforeEdit, setValueBeforeEdit] = useState5("");
3184
- const rowCount = fields2.length + actions.length;
3185
- const labelWidth = formLabelWidth([...fields2, ...actions]);
3186
- const currentField = active < fields2.length ? fields2[active] : void 0;
3187
- const currentAction = currentField ? void 0 : actions[active - fields2.length];
3188
- useInput7((input, key) => {
3189
- if (busy) return;
3190
- if (editing) {
3191
- if (key.escape && currentField) {
3192
- onChange(currentField.key, valueBeforeEdit);
3193
- setEditing(false);
3194
- }
3195
- return;
3196
- }
3197
- if (key.escape || input === "q") {
3198
- onQuit();
3199
- return;
3200
- }
3201
- if (input === "s") {
3202
- onSave();
3203
- return;
3204
- }
3205
- if (input === "k" && onSkip) {
3206
- onSkip();
3207
- return;
3208
- }
3209
- if (isClearKey(input, key) && currentField) {
3210
- onChange(currentField.key, "");
3211
- return;
3212
- }
3213
- if (key.tab || key.downArrow) {
3214
- setActive((i) => (i + 1) % rowCount);
3215
- return;
3216
- }
3217
- if (key.upArrow) {
3218
- setActive((i) => (i - 1 + rowCount) % rowCount);
3219
- return;
3220
- }
3221
- if (key.return) {
3222
- if (currentField) {
3223
- setValueBeforeEdit(values[currentField.key]);
3224
- setEditing(true);
3225
- } else {
3226
- currentAction?.onRun();
3227
- }
3228
- }
3229
- });
3230
- const isLastField = active === fields2.length - 1;
3231
- const submitField = () => {
3232
- if (!enterAdvances) {
3233
- setEditing(false);
3234
- return;
3235
- }
3236
- if (isLastField) {
3237
- setEditing(false);
3238
- onSave();
3239
- return;
3240
- }
3241
- const next = fields2[active + 1];
3242
- setValueBeforeEdit(values[next.key]);
3243
- setActive(active + 1);
3244
- };
3245
- const pointer = (isActive) => /* @__PURE__ */ jsx11(Text10, { color: isActive ? PALETTE.accent : void 0, children: isActive ? "\u276F" : " " });
3246
- return /* @__PURE__ */ jsxs10(Box10, { flexDirection: "column", children: [
3247
- header,
3248
- /* @__PURE__ */ jsxs10(Box10, { flexDirection: "column", paddingX: 2, paddingTop: header ? 0 : 1, paddingBottom: 1, children: [
3249
- /* @__PURE__ */ jsx11(Text10, { bold: true, children: title }),
3250
- /* @__PURE__ */ jsx11(Text10, { children: " " }),
3251
- subtitle && /* @__PURE__ */ jsx11(Text10, { color: PALETTE.muted, children: subtitle }),
3252
- /* @__PURE__ */ jsx11(Text10, { children: " " }),
3253
- /* @__PURE__ */ jsxs10(Box10, { flexDirection: "column", children: [
3254
- fields2.map((field, index) => {
3255
- const isActive = index === active;
3256
- const value = values[field.key];
3257
- const display = field.masked ? "\u2022".repeat(value.length) : value;
3258
- return /* @__PURE__ */ jsxs10(Box10, { gap: 1, children: [
3259
- pointer(isActive),
3260
- /* @__PURE__ */ jsx11(Box10, { width: labelWidth, flexShrink: 0, children: /* @__PURE__ */ jsx11(Text10, { bold: isActive, color: isActive ? PALETTE.accent : PALETTE.muted, children: field.label }) }),
3261
- isActive && editing ? /* @__PURE__ */ jsx11(
3262
- ClearableTextInput,
3263
- {
3264
- value,
3265
- onChange: (next) => onChange(field.key, next),
3266
- onSubmit: submitField,
3267
- mask: field.masked ? "\u2022" : void 0
3268
- }
3269
- ) : display ? /* @__PURE__ */ jsx11(Text10, { bold: true, children: display }) : (
3270
- // An empty value shows its hint (or "(empty)") in the value's place, not after an empty element, so the
3271
- // text starts in the same column as every other row's.
3272
- /* @__PURE__ */ jsx11(Text10, { color: PALETTE.muted, children: field.hint ?? "(empty)" })
3273
- ),
3274
- display && field.hint && /* @__PURE__ */ jsx11(Text10, { color: PALETTE.muted, children: field.hint })
3275
- ] }, field.key);
3276
- }),
3277
- actions.map((action, index) => {
3278
- const isActive = fields2.length + index === active;
3279
- return /* @__PURE__ */ jsxs10(Box10, { gap: 1, children: [
3280
- pointer(isActive),
3281
- /* @__PURE__ */ jsx11(Box10, { width: labelWidth, flexShrink: 0, children: /* @__PURE__ */ jsx11(Text10, { bold: isActive, color: isActive ? PALETTE.accent : PALETTE.muted, children: action.label }) }),
3282
- /* @__PURE__ */ jsx11(Text10, { color: action.running ? PALETTE.accent : PALETTE.muted, children: action.running ? action.runningText ?? "running..." : action.description })
3283
- ] }, action.label);
3284
- })
3285
- ] }),
3286
- notice && /* @__PURE__ */ jsxs10(Fragment, { children: [
3287
- /* @__PURE__ */ jsx11(Text10, { children: " " }),
3288
- /* @__PURE__ */ jsxs10(Text10, { color: notice.kind === "success" ? PALETTE.success : PALETTE.error, children: [
3289
- notice.kind === "success" ? "\u2713" : "\u2717",
3290
- " ",
3291
- notice.text
3292
- ] })
3293
- ] }),
3294
- children,
3295
- /* @__PURE__ */ jsx11(Text10, { children: " " }),
3296
- /* @__PURE__ */ jsx11(
3297
- ControlHints,
3298
- {
3299
- hints: editing ? [
3300
- { keys: "type", label: "edit" },
3301
- { keys: "\u2190/\u2192", label: "move cursor" },
3302
- { keys: "\u23CE", label: enterAdvances ? isLastField ? saveLabel : "next" : "done" },
3303
- { keys: "Ctrl+D", label: "clear" },
3304
- { keys: "Esc", label: "cancel edit" }
3305
- ] : [
3306
- { keys: "\u2191/\u2193", label: "move" },
3307
- { keys: "\u23CE", label: currentAction ? currentAction.hint : "edit" },
3308
- ...currentField ? [{ keys: "Ctrl+D", label: "clear" }] : [],
3309
- { keys: "s", label: saveLabel },
3310
- ...onSkip ? [{ keys: "k", label: skipLabel2 }] : [],
3311
- { keys: "Esc/q", label: quitLabel }
3312
- ]
3313
- }
3314
- )
3315
- ] })
3316
- ] });
3147
+ function toProjectPath(value) {
3148
+ const projectPath = value.trim();
3149
+ return projectPath === "" ? null : projectPath;
3317
3150
  }
3318
3151
 
3319
- // packages/experience-design-system-cli/src/tui/shared/components/MenuScreen.tsx
3320
- import { Fragment as Fragment2, jsx as jsx12, jsxs as jsxs11 } from "react/jsx-runtime";
3321
- function MenuScreen({
3322
- title,
3323
- subtitle,
3324
- menu,
3325
- rows = [],
3326
- onChoose,
3327
- onEscape,
3328
- dataTitle = "Details",
3329
- busy = false,
3330
- children
3331
- }) {
3332
- const [focus, setFocus] = useState6(0);
3333
- useInput8((_input, key) => {
3334
- if (busy) return;
3335
- if (key.escape) onEscape();
3336
- else if (key.return) onChoose(menu[focus].choice);
3337
- else if (key.upArrow) setFocus((current) => (current - 1 + menu.length) % menu.length);
3338
- else if (key.downArrow || key.tab) setFocus((current) => (current + 1) % menu.length);
3152
+ // packages/experience-design-system-cli/src/tui/import/steps/01-welcome/controls.ts
3153
+ var WELCOME_CONTROLS = [
3154
+ { keys: "Enter", label: "Continue" },
3155
+ { keys: "Ctrl+D", label: "Clear" },
3156
+ { keys: "Esc", label: "Back" }
3157
+ ];
3158
+ function useWelcomeControls(onQuit) {
3159
+ useInput7((_input, key) => {
3160
+ if (shouldQuit(key)) onQuit();
3339
3161
  });
3340
- const labelWidth = formLabelWidth([...menu, ...rows]);
3341
- return /* @__PURE__ */ jsxs11(Box11, { flexDirection: "column", children: [
3342
- /* @__PURE__ */ jsx12(StepHeader, { step: "setup" }),
3343
- /* @__PURE__ */ jsxs11(Box11, { flexDirection: "column", paddingX: 2, paddingBottom: 1, children: [
3344
- /* @__PURE__ */ jsx12(Text11, { bold: true, children: title }),
3345
- /* @__PURE__ */ jsx12(Text11, { children: " " }),
3346
- subtitle && /* @__PURE__ */ jsxs11(Fragment2, { children: [
3347
- /* @__PURE__ */ jsx12(Text11, { color: PALETTE.muted, children: subtitle }),
3348
- /* @__PURE__ */ jsx12(Text11, { children: " " })
3349
- ] }),
3350
- /* @__PURE__ */ jsx12(Text11, { color: PALETTE.muted, children: "ACTIONS" }),
3351
- menu.map((item, index) => {
3352
- const focused = index === focus;
3353
- return /* @__PURE__ */ jsxs11(Box11, { gap: 1, children: [
3354
- /* @__PURE__ */ jsx12(Text11, { color: focused ? PALETTE.accent : void 0, children: focused ? "\u276F" : " " }),
3355
- /* @__PURE__ */ jsx12(Box11, { width: labelWidth, flexShrink: 0, children: /* @__PURE__ */ jsx12(Text11, { bold: focused, color: focused ? PALETTE.accent : void 0, children: item.label }) }),
3356
- /* @__PURE__ */ jsx12(Text11, { color: PALETTE.muted, children: item.description })
3357
- ] }, item.choice);
3358
- }),
3359
- (rows.length > 0 || children) && /* @__PURE__ */ jsxs11(
3360
- Box11,
3361
- {
3362
- flexDirection: "column",
3363
- marginTop: 1,
3364
- borderStyle: "single",
3365
- borderColor: PALETTE.border,
3366
- borderBottom: false,
3367
- borderLeft: false,
3368
- borderRight: false,
3369
- children: [
3370
- /* @__PURE__ */ jsx12(Text11, { color: PALETTE.muted, children: dataTitle.toUpperCase() }),
3371
- rows.map((row) => /* @__PURE__ */ jsx12(FormReadOnlyRow, { label: row.label, labelWidth, children: /* @__PURE__ */ jsx12(Text11, { bold: row.value !== "", children: row.value || "(empty)" }) }, row.label)),
3372
- children
3373
- ]
3374
- }
3375
- )
3376
- ] })
3377
- ] });
3378
3162
  }
3379
3163
 
3380
- // packages/experience-design-system-cli/src/tui/shared/components/PathStepScreen.tsx
3381
- import { Fragment as Fragment3, jsx as jsx13, jsxs as jsxs12 } from "react/jsx-runtime";
3382
- var MENU = [
3383
- { choice: "continue", label: "Continue", description: "Use this path and go on" },
3384
- { choice: "edit", label: "Edit", description: "Change the path" },
3385
- { choice: "back", label: "Back", description: "Go back" }
3386
- ];
3387
- function PathStepScreen({
3388
- title,
3389
- subtitle,
3390
- label,
3391
- initialPath = "",
3392
- toPath,
3393
- check,
3394
- onContinue,
3395
- onBack
3396
- }) {
3397
- const [value, setValue] = useState7(initialPath);
3398
- const [savedValue, setSavedValue] = useState7(toPath(initialPath) === null ? "" : initialPath);
3399
- const [editing, setEditing] = useState7(toPath(initialPath) === null);
3400
- const [failure, setFailure] = useState7(null);
3401
- useInput9(
3402
- (_input, key) => {
3403
- if (!key.escape) return;
3404
- if (savedValue === "") {
3405
- onBack();
3406
- return;
3407
- }
3408
- setValue(savedValue);
3409
- setFailure(null);
3410
- setEditing(false);
3411
- },
3412
- { isActive: editing }
3413
- );
3414
- const choose = (choice) => {
3415
- if (choice === "edit") {
3416
- setFailure(null);
3417
- setEditing(true);
3418
- return;
3419
- }
3420
- if (choice === "back") {
3421
- onBack();
3422
- return;
3423
- }
3424
- const path5 = toPath(value);
3425
- if (path5 === null) return;
3426
- const result = check(path5);
3427
- if (result.ok) onContinue(result.path);
3428
- else setFailure({ error: result.error, resolvedPath: result.resolvedPath });
3429
- };
3430
- const submit = (typed) => {
3431
- if (toPath(typed) === null) {
3432
- setFailure({ error: `Enter the ${label.toLowerCase()}.` });
3433
- return;
3434
- }
3435
- setSavedValue(typed);
3436
- setEditing(false);
3164
+ // packages/experience-design-system-cli/src/tui/import/steps/01-welcome/screen.tsx
3165
+ import { jsx as jsx11, jsxs as jsxs10 } from "react/jsx-runtime";
3166
+ function WelcomeScreen({ onContinue, onQuit, initialPath = "" }) {
3167
+ const [projectPath, setProjectPath] = useState5(initialPath);
3168
+ useWelcomeControls(onQuit);
3169
+ const submit = (value) => {
3170
+ const path5 = toProjectPath(value);
3171
+ if (path5) onContinue(path5);
3437
3172
  };
3438
- const failureLines = failure && /* @__PURE__ */ jsxs12(Fragment3, { children: [
3439
- /* @__PURE__ */ jsx13(Text12, { children: " " }),
3440
- /* @__PURE__ */ jsxs12(Text12, { color: PALETTE.error, children: [
3441
- "\u2717 ",
3442
- failure.error
3443
- ] }),
3444
- failure.resolvedPath && /* @__PURE__ */ jsxs12(Text12, { color: PALETTE.muted, children: [
3445
- " Resolved to: ",
3446
- failure.resolvedPath
3447
- ] })
3448
- ] });
3449
- if (!editing) {
3450
- return /* @__PURE__ */ jsx13(
3451
- MenuScreen,
3452
- {
3453
- title,
3454
- subtitle,
3455
- menu: MENU,
3456
- rows: [{ label, value: savedValue }],
3457
- onChoose: choose,
3458
- onEscape: onBack,
3459
- children: failureLines
3460
- }
3461
- );
3462
- }
3463
- return /* @__PURE__ */ jsxs12(Box12, { flexDirection: "column", children: [
3464
- /* @__PURE__ */ jsx13(StepHeader, { step: "setup" }),
3465
- /* @__PURE__ */ jsxs12(Box12, { flexDirection: "column", paddingX: 2, paddingBottom: 1, children: [
3466
- /* @__PURE__ */ jsx13(Text12, { bold: true, children: title }),
3467
- /* @__PURE__ */ jsx13(Text12, { children: " " }),
3468
- /* @__PURE__ */ jsx13(Text12, { color: PALETTE.muted, children: subtitle }),
3469
- /* @__PURE__ */ jsx13(Text12, { children: " " }),
3470
- /* @__PURE__ */ jsxs12(Box12, { gap: 1, children: [
3471
- /* @__PURE__ */ jsx13(Text12, { color: PALETTE.accent, children: "?" }),
3472
- /* @__PURE__ */ jsxs12(Text12, { children: [
3473
- label,
3474
- ":"
3475
- ] }),
3476
- /* @__PURE__ */ jsx13(
3477
- ClearableTextInput,
3478
- {
3479
- value,
3480
- onChange: (next) => {
3481
- setValue(next);
3482
- setFailure(null);
3483
- },
3484
- onSubmit: submit
3485
- }
3486
- )
3173
+ return /* @__PURE__ */ jsxs10(Box10, { flexDirection: "column", children: [
3174
+ /* @__PURE__ */ jsx11(StepHeader, { step: "setup" }),
3175
+ /* @__PURE__ */ jsxs10(Box10, { flexDirection: "column", gap: 1, paddingX: 2, paddingBottom: 1, children: [
3176
+ /* @__PURE__ */ jsxs10(Box10, { flexDirection: "column", gap: 1, children: [
3177
+ /* @__PURE__ */ jsx11(Text10, { color: PALETTE.text, children: "Where is your component library?" }),
3178
+ /* @__PURE__ */ jsxs10(Box10, { children: [
3179
+ /* @__PURE__ */ jsx11(Text10, { color: PALETTE.accent, children: "? " }),
3180
+ /* @__PURE__ */ jsx11(Text10, { children: "Project path: " }),
3181
+ /* @__PURE__ */ jsx11(ClearableTextInput, { value: projectPath, onChange: setProjectPath, onSubmit: submit })
3182
+ ] })
3487
3183
  ] }),
3488
- failureLines,
3489
- /* @__PURE__ */ jsx13(Text12, { children: " " }),
3490
- /* @__PURE__ */ jsx13(
3491
- ControlHints,
3492
- {
3493
- hints: [
3494
- { keys: "\u23CE", label: "done" },
3495
- { keys: "Ctrl+D", label: "clear" },
3496
- { keys: "Esc", label: savedValue === "" ? "back" : "cancel edit" }
3497
- ]
3498
- }
3499
- )
3184
+ /* @__PURE__ */ jsx11(Box10, { children: /* @__PURE__ */ jsx11(ControlHints, { hints: WELCOME_CONTROLS }) })
3500
3185
  ] })
3501
3186
  ] });
3502
3187
  }
3503
3188
 
3504
- // packages/experience-design-system-cli/src/tui/import/steps/01-welcome/logic.ts
3505
- function toProjectPath(value) {
3506
- const projectPath = value.trim();
3507
- return projectPath === "" ? null : projectPath;
3508
- }
3189
+ // packages/experience-design-system-cli/src/tui/import/steps/02-token-input/screen.tsx
3190
+ import { useState as useState6 } from "react";
3191
+ import { Box as Box11, Text as Text11 } from "ink";
3509
3192
 
3510
- // packages/experience-design-system-cli/src/tui/import/steps/01-welcome/screen.tsx
3511
- import { jsx as jsx14 } from "react/jsx-runtime";
3512
- function WelcomeScreen({ onContinue, onQuit, initialPath = "" }) {
3513
- return /* @__PURE__ */ jsx14(
3514
- PathStepScreen,
3515
- {
3516
- title: "Where is your component library?",
3517
- subtitle: "The folder with your components. You can use ~, relative, or absolute paths.",
3518
- label: "Project path",
3519
- initialPath,
3520
- toPath: toProjectPath,
3521
- check: (path5) => ({ ok: true, path: path5 }),
3522
- onContinue,
3523
- onBack: onQuit
3524
- }
3525
- );
3526
- }
3193
+ // packages/experience-design-system-cli/src/tui/import/steps/02-token-input/controls.ts
3194
+ import { useInput as useInput8 } from "ink";
3527
3195
 
3528
3196
  // packages/experience-design-system-cli/src/tui/import/steps/02-token-input/logic.ts
3197
+ function shouldGoBack(key) {
3198
+ return key.escape;
3199
+ }
3529
3200
  function toTokenPath(value) {
3530
3201
  const tokenPath = value.trim();
3531
3202
  return tokenPath === "" ? null : tokenPath;
3532
3203
  }
3533
3204
 
3205
+ // packages/experience-design-system-cli/src/tui/import/steps/02-token-input/controls.ts
3206
+ var TOKEN_INPUT_CONTROLS = [
3207
+ { keys: "Enter", label: "Continue" },
3208
+ { keys: "Ctrl+D", label: "Clear" },
3209
+ { keys: "Esc", label: "Back" }
3210
+ ];
3211
+ function useTokenInputControls(onBack) {
3212
+ useInput8((_input, key) => {
3213
+ if (shouldGoBack(key)) onBack();
3214
+ });
3215
+ }
3216
+
3534
3217
  // packages/experience-design-system-cli/src/tui/import/steps/02-token-input/validate-path.ts
3535
3218
  import { statSync } from "node:fs";
3536
3219
 
@@ -3571,26 +3254,153 @@ function validateTokenPath(rawPath) {
3571
3254
  }
3572
3255
 
3573
3256
  // packages/experience-design-system-cli/src/tui/import/steps/02-token-input/screen.tsx
3574
- import { jsx as jsx15 } from "react/jsx-runtime";
3257
+ import { jsx as jsx12, jsxs as jsxs11 } from "react/jsx-runtime";
3575
3258
  function TokenInputScreen({ onConfirm, onBack, initialPath = "" }) {
3576
- return /* @__PURE__ */ jsx15(
3577
- PathStepScreen,
3578
- {
3579
- title: "Design tokens",
3580
- 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).",
3581
- label: "Token path",
3582
- initialPath,
3583
- toPath: toTokenPath,
3584
- check: validateTokenPath,
3585
- onContinue: onConfirm,
3586
- onBack
3259
+ const [tokenPath, setTokenPath] = useState6(initialPath);
3260
+ const [failure, setFailure] = useState6(null);
3261
+ useTokenInputControls(onBack);
3262
+ const change = (value) => {
3263
+ setTokenPath(value);
3264
+ setFailure(null);
3265
+ };
3266
+ const submit = (value) => {
3267
+ const rawPath = toTokenPath(value);
3268
+ if (!rawPath) {
3269
+ setFailure({ error: "Enter the path to your token file." });
3270
+ return;
3587
3271
  }
3588
- );
3272
+ const check = validateTokenPath(rawPath);
3273
+ if (check.ok) onConfirm(check.path);
3274
+ else setFailure({ error: check.error, resolvedPath: check.resolvedPath });
3275
+ };
3276
+ return /* @__PURE__ */ jsxs11(Box11, { flexDirection: "column", children: [
3277
+ /* @__PURE__ */ jsx12(StepHeader, { step: "setup" }),
3278
+ /* @__PURE__ */ jsxs11(Box11, { flexDirection: "column", gap: 1, paddingX: 2, paddingBottom: 1, children: [
3279
+ /* @__PURE__ */ jsx12(Text11, { bold: true, children: "Design tokens" }),
3280
+ /* @__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)." }),
3281
+ /* @__PURE__ */ jsxs11(Box11, { flexDirection: "column", children: [
3282
+ /* @__PURE__ */ jsxs11(Box11, { gap: 1, children: [
3283
+ /* @__PURE__ */ jsx12(Text11, { color: PALETTE.accent, children: "?" }),
3284
+ /* @__PURE__ */ jsx12(Text11, { children: "Token path:" }),
3285
+ /* @__PURE__ */ jsx12(ClearableTextInput, { value: tokenPath, onChange: change, onSubmit: submit })
3286
+ ] }),
3287
+ failure && /* @__PURE__ */ jsxs11(Box11, { flexDirection: "column", children: [
3288
+ /* @__PURE__ */ jsxs11(Text11, { color: PALETTE.error, children: [
3289
+ "\u2717 ",
3290
+ failure.error
3291
+ ] }),
3292
+ failure.resolvedPath && /* @__PURE__ */ jsxs11(Text11, { color: PALETTE.muted, children: [
3293
+ " Resolved to: ",
3294
+ failure.resolvedPath
3295
+ ] })
3296
+ ] })
3297
+ ] }),
3298
+ /* @__PURE__ */ jsx12(Box11, { marginTop: 1, children: /* @__PURE__ */ jsx12(ControlHints, { hints: TOKEN_INPUT_CONTROLS }) })
3299
+ ] })
3300
+ ] });
3589
3301
  }
3590
3302
 
3591
3303
  // packages/experience-design-system-cli/src/tui/import/steps/03-path-validation/screen.tsx
3592
- import { useEffect as useEffect4, useMemo, useState as useState8 } from "react";
3593
- import { Box as Box13, Text as Text13 } from "ink";
3304
+ import { useEffect as useEffect4, useMemo, useState as useState7 } from "react";
3305
+ import { Box as Box12, Text as Text12 } from "ink";
3306
+
3307
+ // packages/experience-design-system-cli/src/tui/import/steps/03-path-validation/controls.ts
3308
+ import { useInput as useInput9 } from "ink";
3309
+
3310
+ // packages/experience-design-system-cli/src/tui/import/steps/03-path-validation/logic.ts
3311
+ var COMPONENT_CATEGORIES = ["tsx", "ts", "vue", "astro", "jsx", "js"];
3312
+ var ROW_LABELS = {
3313
+ tsx: ".tsx files",
3314
+ ts: ".ts files",
3315
+ vue: ".vue files",
3316
+ astro: ".astro files",
3317
+ jsx: ".jsx files",
3318
+ js: ".js files",
3319
+ json: ".json files (design tokens)",
3320
+ other: "other (ignored)"
3321
+ };
3322
+ var ROW_ORDER = ["tsx", "ts", "vue", "astro", "jsx", "js", "json", "other"];
3323
+ function describeFailure(failure, path5) {
3324
+ switch (failure) {
3325
+ case "is-file":
3326
+ return {
3327
+ headline: "That's a file, not a directory.",
3328
+ hints: [
3329
+ "Provide the path to your component library's root folder, not a specific file.",
3330
+ "Example: ~/projects/my-design-system"
3331
+ ]
3332
+ };
3333
+ case "not-found":
3334
+ return {
3335
+ headline: `Directory not found: ${path5}`,
3336
+ hints: ["Double-check the path and try again. Tip: you can use ~, relative, or absolute paths."]
3337
+ };
3338
+ case "permission-denied":
3339
+ return {
3340
+ headline: `Permission denied: ${path5}`,
3341
+ hints: ["You don't have read access to this directory."]
3342
+ };
3343
+ case "not-directory":
3344
+ return { headline: `Not a directory: ${path5}`, hints: [] };
3345
+ case "unreadable":
3346
+ return { headline: `Cannot access: ${path5}`, hints: [] };
3347
+ }
3348
+ }
3349
+ function summarize(counts, { hasTokens = true } = {}) {
3350
+ const rows = ROW_ORDER.filter((category) => counts[category] > 0).map((category) => {
3351
+ if (category === "json" && !hasTokens) return { label: ".json files (ignored)", count: counts.json, tone: "muted" };
3352
+ const tone = category === "json" ? "accent" : category === "other" ? "muted" : "default";
3353
+ return { label: ROW_LABELS[category], count: counts[category], tone };
3354
+ });
3355
+ const componentFiles = COMPONENT_CATEGORIES.reduce((sum, category) => sum + counts[category], 0);
3356
+ if (componentFiles > 0) return { total: counts.total, rows };
3357
+ if (hasTokens && counts.json > 0) {
3358
+ return { total: counts.total, rows, warning: "No component files found \u2014 only token files detected." };
3359
+ }
3360
+ return {
3361
+ total: counts.total,
3362
+ rows,
3363
+ warning: hasTokens ? "No component or token files found. Try a different path." : "No component files found. Try a different path."
3364
+ };
3365
+ }
3366
+ function phaseOf(scan) {
3367
+ if (scan === void 0) return "scanning";
3368
+ return scan.ok ? "ready" : "failed";
3369
+ }
3370
+ function keyAction(phase, input, key) {
3371
+ if (key.escape) return "back";
3372
+ if (phase === "ready") {
3373
+ if (key.return) return "confirm";
3374
+ if (input === "e") return "change-path";
3375
+ }
3376
+ if (phase === "failed" && (key.return || input === "e")) return "change-path";
3377
+ return void 0;
3378
+ }
3379
+
3380
+ // packages/experience-design-system-cli/src/tui/import/steps/03-path-validation/controls.ts
3381
+ var CONTROLS = {
3382
+ scanning: [{ keys: "Esc", label: "Back" }],
3383
+ ready: [
3384
+ { keys: "Enter", label: "Yes, continue" },
3385
+ { keys: "e", label: "Change path" },
3386
+ { keys: "Esc", label: "Back" }
3387
+ ],
3388
+ failed: [
3389
+ { keys: "Enter/e", label: "Try a different path" },
3390
+ { keys: "Esc", label: "Back" }
3391
+ ]
3392
+ };
3393
+ function controlsFor(phase) {
3394
+ return CONTROLS[phase];
3395
+ }
3396
+ function usePathValidationControls(phase, handlers) {
3397
+ useInput9((input, key) => {
3398
+ const action = keyAction(phase, input, key);
3399
+ if (action === "confirm") handlers.onConfirm();
3400
+ else if (action === "change-path") handlers.onChangePath();
3401
+ else if (action === "back") handlers.onBack();
3402
+ });
3403
+ }
3594
3404
 
3595
3405
  // packages/experience-design-system-backend-pipeline/dist/src/persistence/src/session/repositories/db.js
3596
3406
  import { DatabaseSync } from "node:sqlite";
@@ -18068,102 +17878,35 @@ async function runGenerateComponentsSession(request) {
18068
17878
  renamedSlotsCount,
18069
17879
  duplicateNames,
18070
17880
  droppedAllowedComponents: dropped,
18071
- emptySession: false
18072
- };
18073
- } finally {
18074
- db.close();
18075
- }
18076
- }
18077
-
18078
- // packages/experience-design-system-cli/src/tui/import/steps/03-path-validation/helpers/scan-files.ts
18079
- function scanFiles(directory) {
18080
- return toScanResult(collectFiles(directory));
18081
- }
18082
- function toScanResult(outcome) {
18083
- if (!outcome.ok) return { ok: false, failure: outcome.failure };
18084
- return {
18085
- ok: true,
18086
- counts: foldSvelteAndMdIntoOther(outcome.result.counts),
18087
- filePaths: outcome.result.filePaths,
18088
- warnings: outcome.result.warnings
18089
- };
18090
- }
18091
- function foldSvelteAndMdIntoOther(counts) {
18092
- const { svelte, md, ...rest } = counts;
18093
- return { ...rest, other: rest.other + svelte + md };
18094
- }
18095
-
18096
- // packages/experience-design-system-cli/src/tui/import/steps/03-path-validation/logic.ts
18097
- var COMPONENT_CATEGORIES = ["tsx", "ts", "vue", "astro", "jsx", "js"];
18098
- var ROW_LABELS = {
18099
- tsx: ".tsx files",
18100
- ts: ".ts files",
18101
- vue: ".vue files",
18102
- astro: ".astro files",
18103
- jsx: ".jsx files",
18104
- js: ".js files",
18105
- json: ".json files (design tokens)",
18106
- other: "other (ignored)"
18107
- };
18108
- var ROW_ORDER = ["tsx", "ts", "vue", "astro", "jsx", "js", "json", "other"];
18109
- function describeFailure(failure, path5) {
18110
- switch (failure) {
18111
- case "is-file":
18112
- return {
18113
- headline: "That's a file, not a directory.",
18114
- hints: [
18115
- "Provide the path to your component library's root folder, not a specific file.",
18116
- "Example: ~/projects/my-design-system"
18117
- ]
18118
- };
18119
- case "not-found":
18120
- return {
18121
- headline: `Directory not found: ${path5}`,
18122
- hints: ["Double-check the path and try again. Tip: you can use ~, relative, or absolute paths."]
18123
- };
18124
- case "permission-denied":
18125
- return {
18126
- headline: `Permission denied: ${path5}`,
18127
- hints: ["You don't have read access to this directory."]
18128
- };
18129
- case "not-directory":
18130
- return { headline: `Not a directory: ${path5}`, hints: [] };
18131
- case "unreadable":
18132
- return { headline: `Cannot access: ${path5}`, hints: [] };
17881
+ emptySession: false
17882
+ };
17883
+ } finally {
17884
+ db.close();
18133
17885
  }
18134
17886
  }
18135
- function summarize(counts, { hasTokens = true } = {}) {
18136
- const rows = ROW_ORDER.filter((category) => counts[category] > 0).map((category) => {
18137
- if (category === "json" && !hasTokens) return { label: ".json files (ignored)", count: counts.json, tone: "muted" };
18138
- const tone = category === "json" ? "accent" : category === "other" ? "muted" : "default";
18139
- return { label: ROW_LABELS[category], count: counts[category], tone };
18140
- });
18141
- const componentFiles = COMPONENT_CATEGORIES.reduce((sum, category) => sum + counts[category], 0);
18142
- if (componentFiles > 0) return { total: counts.total, rows };
18143
- if (hasTokens && counts.json > 0) {
18144
- return { total: counts.total, rows, warning: "No component files found \u2014 only token files detected." };
18145
- }
17887
+
17888
+ // packages/experience-design-system-cli/src/tui/import/steps/03-path-validation/helpers/scan-files.ts
17889
+ function scanFiles(directory) {
17890
+ return toScanResult(collectFiles(directory));
17891
+ }
17892
+ function toScanResult(outcome) {
17893
+ if (!outcome.ok) return { ok: false, failure: outcome.failure };
18146
17894
  return {
18147
- total: counts.total,
18148
- rows,
18149
- warning: hasTokens ? "No component or token files found. Try a different path." : "No component files found. Try a different path."
17895
+ ok: true,
17896
+ counts: foldSvelteAndMdIntoOther(outcome.result.counts),
17897
+ filePaths: outcome.result.filePaths,
17898
+ warnings: outcome.result.warnings
18150
17899
  };
18151
17900
  }
18152
- function phaseOf(scan) {
18153
- if (scan === void 0) return "scanning";
18154
- return scan.ok ? "ready" : "failed";
17901
+ function foldSvelteAndMdIntoOther(counts) {
17902
+ const { svelte, md, ...rest } = counts;
17903
+ return { ...rest, other: rest.other + svelte + md };
18155
17904
  }
18156
17905
 
18157
17906
  // packages/experience-design-system-cli/src/tui/import/steps/03-path-validation/screen.tsx
18158
- import { jsx as jsx16, jsxs as jsxs13 } from "react/jsx-runtime";
18159
- var BACK = { choice: "back", label: "Back", description: "Go back" };
18160
- var MENUS = {
18161
- scanning: [BACK],
18162
- ready: [{ choice: "continue", label: "Continue", description: "Use these files and go on" }, BACK],
18163
- failed: [{ choice: "change-path", label: "Try a different path", description: "Pick a different folder" }, BACK]
18164
- };
17907
+ import { jsx as jsx13, jsxs as jsxs12 } from "react/jsx-runtime";
18165
17908
  function Row({ row }) {
18166
- return /* @__PURE__ */ jsxs13(Text13, { color: row.tone === "accent" ? PALETTE.accent : row.tone === "muted" ? PALETTE.muted : void 0, children: [
17909
+ return /* @__PURE__ */ jsxs12(Text12, { color: row.tone === "accent" ? PALETTE.accent : row.tone === "muted" ? PALETTE.muted : void 0, children: [
18167
17910
  " \u2022 ",
18168
17911
  String(row.count).padStart(3),
18169
17912
  " ",
@@ -18172,12 +17915,12 @@ function Row({ row }) {
18172
17915
  }
18173
17916
  function Failure({ scan, path: path5 }) {
18174
17917
  const { headline, hints } = describeFailure(scan.failure, path5);
18175
- return /* @__PURE__ */ jsxs13(Box13, { flexDirection: "column", children: [
18176
- /* @__PURE__ */ jsxs13(Text13, { color: PALETTE.error, children: [
17918
+ return /* @__PURE__ */ jsxs12(Box12, { flexDirection: "column", children: [
17919
+ /* @__PURE__ */ jsxs12(Text12, { color: PALETTE.error, children: [
18177
17920
  "\u2717 ",
18178
17921
  headline
18179
17922
  ] }),
18180
- hints.map((hint) => /* @__PURE__ */ jsx16(Text13, { color: PALETTE.muted, children: hint }, hint))
17923
+ hints.map((hint) => /* @__PURE__ */ jsx13(Text12, { color: PALETTE.muted, children: hint }, hint))
18181
17924
  ] });
18182
17925
  }
18183
17926
  function Summary({
@@ -18186,23 +17929,24 @@ function Summary({
18186
17929
  hasTokens
18187
17930
  }) {
18188
17931
  const { total, rows, warning } = summarize(scan.counts, { hasTokens });
18189
- return /* @__PURE__ */ jsxs13(Box13, { flexDirection: "column", gap: 1, children: [
18190
- /* @__PURE__ */ jsxs13(Text13, { children: [
17932
+ return /* @__PURE__ */ jsxs12(Box12, { flexDirection: "column", gap: 1, children: [
17933
+ /* @__PURE__ */ jsxs12(Text12, { children: [
18191
17934
  "Scanned ",
18192
- /* @__PURE__ */ jsx16(Text13, { bold: true, children: path5 })
17935
+ /* @__PURE__ */ jsx13(Text12, { bold: true, children: path5 })
18193
17936
  ] }),
18194
- /* @__PURE__ */ jsxs13(Box13, { flexDirection: "column", children: [
18195
- /* @__PURE__ */ jsxs13(Text13, { color: PALETTE.success, children: [
17937
+ /* @__PURE__ */ jsxs12(Box12, { flexDirection: "column", children: [
17938
+ /* @__PURE__ */ jsxs12(Text12, { color: PALETTE.success, children: [
18196
17939
  "\u2713 Found ",
18197
17940
  total,
18198
17941
  " files:"
18199
17942
  ] }),
18200
- rows.map((row) => /* @__PURE__ */ jsx16(Row, { row }, row.label))
17943
+ rows.map((row) => /* @__PURE__ */ jsx13(Row, { row }, row.label))
18201
17944
  ] }),
18202
- warning && /* @__PURE__ */ jsxs13(Text13, { color: PALETTE.warning, children: [
17945
+ warning && /* @__PURE__ */ jsxs12(Text12, { color: PALETTE.warning, children: [
18203
17946
  "\u26A0 ",
18204
17947
  warning
18205
- ] })
17948
+ ] }),
17949
+ /* @__PURE__ */ jsx13(Text12, { children: "Does this look right?" })
18206
17950
  ] });
18207
17951
  }
18208
17952
  function PathValidationScreen({
@@ -18213,45 +17957,211 @@ function PathValidationScreen({
18213
17957
  hasTokens = true
18214
17958
  }) {
18215
17959
  const resolvedPath = useMemo(() => resolveUserPath(projectPath), [projectPath]);
18216
- const [scan, setScan] = useState8();
17960
+ const [scan, setScan] = useState7();
18217
17961
  useEffect4(() => {
18218
17962
  setScan(scanFiles(resolvedPath));
18219
17963
  }, [resolvedPath]);
18220
17964
  const phase = phaseOf(scan);
18221
- const choose = (choice) => {
18222
- if (choice === "continue") {
17965
+ usePathValidationControls(phase, {
17966
+ onConfirm: () => {
18223
17967
  if (scan?.ok) onConfirm({ projectPath: resolvedPath, filePaths: scan.filePaths });
18224
- } else if (choice === "change-path") onChangePath();
18225
- else onBack();
18226
- };
18227
- return (
18228
- // keyed by phase: the menu changes length, so its focus starts over
18229
- /* @__PURE__ */ jsxs13(
18230
- MenuScreen,
18231
- {
18232
- title: "Scan",
18233
- dataTitle: "Scan result",
18234
- menu: MENUS[phase],
18235
- onChoose: choose,
18236
- onEscape: onBack,
18237
- children: [
18238
- scan === void 0 && /* @__PURE__ */ jsxs13(Text13, { color: PALETTE.muted, children: [
18239
- "Scanning ",
18240
- /* @__PURE__ */ jsx16(Text13, { bold: true, children: resolvedPath }),
18241
- "..."
18242
- ] }),
18243
- scan?.ok === false && /* @__PURE__ */ jsx16(Failure, { scan, path: resolvedPath }),
18244
- scan?.ok === true && /* @__PURE__ */ jsx16(Summary, { scan, path: resolvedPath, hasTokens })
18245
- ]
18246
- },
18247
- phase
18248
- )
18249
- );
17968
+ },
17969
+ onChangePath,
17970
+ onBack
17971
+ });
17972
+ return /* @__PURE__ */ jsxs12(Box12, { flexDirection: "column", children: [
17973
+ /* @__PURE__ */ jsx13(StepHeader, { step: "setup" }),
17974
+ /* @__PURE__ */ jsxs12(Box12, { flexDirection: "column", gap: 1, paddingX: 2, paddingBottom: 1, children: [
17975
+ scan === void 0 && /* @__PURE__ */ jsxs12(Text12, { color: PALETTE.muted, children: [
17976
+ "Scanning ",
17977
+ /* @__PURE__ */ jsx13(Text12, { bold: true, children: resolvedPath }),
17978
+ "..."
17979
+ ] }),
17980
+ scan?.ok === false && /* @__PURE__ */ jsx13(Failure, { scan, path: resolvedPath }),
17981
+ scan?.ok === true && /* @__PURE__ */ jsx13(Summary, { scan, path: resolvedPath, hasTokens }),
17982
+ /* @__PURE__ */ jsx13(Box12, { marginTop: 1, children: /* @__PURE__ */ jsx13(ControlHints, { hints: controlsFor(phase) }) })
17983
+ ] })
17984
+ ] });
18250
17985
  }
18251
17986
 
18252
17987
  // packages/experience-design-system-cli/src/tui/import/steps/04-credentials/screen.tsx
18253
17988
  import { useRef as useRef2, useState as useState9 } from "react";
18254
- import { Text as Text14 } from "ink";
17989
+ import { Box as Box14, Text as Text14, useInput as useInput11 } from "ink";
17990
+
17991
+ // packages/experience-design-system-cli/src/tui/shared/components/FieldForm.tsx
17992
+ import { useState as useState8 } from "react";
17993
+ import { Box as Box13, Text as Text13, useInput as useInput10 } from "ink";
17994
+ import { Fragment, jsx as jsx14, jsxs as jsxs13 } from "react/jsx-runtime";
17995
+ function formLabelWidth(rows) {
17996
+ return Math.max(...rows.map((row) => row.label.length));
17997
+ }
17998
+ function FormReadOnlyRow({
17999
+ label,
18000
+ labelWidth,
18001
+ children
18002
+ }) {
18003
+ return /* @__PURE__ */ jsxs13(Box13, { gap: 1, children: [
18004
+ /* @__PURE__ */ jsx14(Text13, { children: " " }),
18005
+ /* @__PURE__ */ jsx14(Box13, { width: labelWidth, flexShrink: 0, children: /* @__PURE__ */ jsx14(Text13, { color: PALETTE.muted, children: label }) }),
18006
+ children
18007
+ ] });
18008
+ }
18009
+ function FieldForm({
18010
+ header,
18011
+ title,
18012
+ subtitle,
18013
+ fields: fields2,
18014
+ values,
18015
+ onChange,
18016
+ onSave,
18017
+ saveLabel = "save",
18018
+ enterAdvances = false,
18019
+ onSkip,
18020
+ skipLabel: skipLabel2 = "skip",
18021
+ onQuit,
18022
+ quitLabel = "back without saving",
18023
+ actions = [],
18024
+ notice,
18025
+ busy = false,
18026
+ children
18027
+ }) {
18028
+ const [active, setActive] = useState8(0);
18029
+ const [editing, setEditing] = useState8(false);
18030
+ const [valueBeforeEdit, setValueBeforeEdit] = useState8("");
18031
+ const rowCount = fields2.length + actions.length;
18032
+ const labelWidth = formLabelWidth([...fields2, ...actions]);
18033
+ const currentField = active < fields2.length ? fields2[active] : void 0;
18034
+ const currentAction = currentField ? void 0 : actions[active - fields2.length];
18035
+ useInput10((input, key) => {
18036
+ if (busy) return;
18037
+ if (editing) {
18038
+ if (key.escape && currentField) {
18039
+ onChange(currentField.key, valueBeforeEdit);
18040
+ setEditing(false);
18041
+ }
18042
+ return;
18043
+ }
18044
+ if (key.escape || input === "q") {
18045
+ onQuit();
18046
+ return;
18047
+ }
18048
+ if (input === "s") {
18049
+ onSave();
18050
+ return;
18051
+ }
18052
+ if (input === "k" && onSkip) {
18053
+ onSkip();
18054
+ return;
18055
+ }
18056
+ if (isClearKey(input, key) && currentField) {
18057
+ onChange(currentField.key, "");
18058
+ return;
18059
+ }
18060
+ if (key.tab || key.downArrow) {
18061
+ setActive((i) => (i + 1) % rowCount);
18062
+ return;
18063
+ }
18064
+ if (key.upArrow) {
18065
+ setActive((i) => (i - 1 + rowCount) % rowCount);
18066
+ return;
18067
+ }
18068
+ if (key.return) {
18069
+ if (currentField) {
18070
+ setValueBeforeEdit(values[currentField.key]);
18071
+ setEditing(true);
18072
+ } else {
18073
+ currentAction?.onRun();
18074
+ }
18075
+ }
18076
+ });
18077
+ const isLastField = active === fields2.length - 1;
18078
+ const submitField = () => {
18079
+ if (!enterAdvances) {
18080
+ setEditing(false);
18081
+ return;
18082
+ }
18083
+ if (isLastField) {
18084
+ setEditing(false);
18085
+ onSave();
18086
+ return;
18087
+ }
18088
+ const next = fields2[active + 1];
18089
+ setValueBeforeEdit(values[next.key]);
18090
+ setActive(active + 1);
18091
+ };
18092
+ const pointer = (isActive) => /* @__PURE__ */ jsx14(Text13, { color: isActive ? PALETTE.accent : void 0, children: isActive ? "\u276F" : " " });
18093
+ return /* @__PURE__ */ jsxs13(Box13, { flexDirection: "column", children: [
18094
+ header,
18095
+ /* @__PURE__ */ jsxs13(Box13, { flexDirection: "column", paddingX: 2, paddingTop: header ? 0 : 1, paddingBottom: 1, children: [
18096
+ /* @__PURE__ */ jsx14(Text13, { bold: true, children: title }),
18097
+ /* @__PURE__ */ jsx14(Text13, { children: " " }),
18098
+ subtitle && /* @__PURE__ */ jsx14(Text13, { color: PALETTE.muted, children: subtitle }),
18099
+ /* @__PURE__ */ jsx14(Text13, { children: " " }),
18100
+ /* @__PURE__ */ jsxs13(Box13, { flexDirection: "column", children: [
18101
+ fields2.map((field, index) => {
18102
+ const isActive = index === active;
18103
+ const value = values[field.key];
18104
+ const display = field.masked ? "\u2022".repeat(value.length) : value;
18105
+ return /* @__PURE__ */ jsxs13(Box13, { gap: 1, children: [
18106
+ pointer(isActive),
18107
+ /* @__PURE__ */ jsx14(Box13, { width: labelWidth, flexShrink: 0, children: /* @__PURE__ */ jsx14(Text13, { bold: isActive, color: isActive ? PALETTE.accent : PALETTE.muted, children: field.label }) }),
18108
+ isActive && editing ? /* @__PURE__ */ jsx14(
18109
+ ClearableTextInput,
18110
+ {
18111
+ value,
18112
+ onChange: (next) => onChange(field.key, next),
18113
+ onSubmit: submitField,
18114
+ mask: field.masked ? "\u2022" : void 0
18115
+ }
18116
+ ) : display ? /* @__PURE__ */ jsx14(Text13, { bold: true, children: display }) : (
18117
+ // An empty value shows its hint (or "(empty)") in the value's place, not after an empty element, so the
18118
+ // text starts in the same column as every other row's.
18119
+ /* @__PURE__ */ jsx14(Text13, { color: PALETTE.muted, children: field.hint ?? "(empty)" })
18120
+ ),
18121
+ display && field.hint && /* @__PURE__ */ jsx14(Text13, { color: PALETTE.muted, children: field.hint })
18122
+ ] }, field.key);
18123
+ }),
18124
+ actions.map((action, index) => {
18125
+ const isActive = fields2.length + index === active;
18126
+ return /* @__PURE__ */ jsxs13(Box13, { gap: 1, children: [
18127
+ pointer(isActive),
18128
+ /* @__PURE__ */ jsx14(Box13, { width: labelWidth, flexShrink: 0, children: /* @__PURE__ */ jsx14(Text13, { bold: isActive, color: isActive ? PALETTE.accent : PALETTE.muted, children: action.label }) }),
18129
+ /* @__PURE__ */ jsx14(Text13, { color: action.running ? PALETTE.accent : PALETTE.muted, children: action.running ? action.runningText ?? "running..." : action.description })
18130
+ ] }, action.label);
18131
+ })
18132
+ ] }),
18133
+ notice && /* @__PURE__ */ jsxs13(Fragment, { children: [
18134
+ /* @__PURE__ */ jsx14(Text13, { children: " " }),
18135
+ /* @__PURE__ */ jsxs13(Text13, { color: notice.kind === "success" ? PALETTE.success : PALETTE.error, children: [
18136
+ notice.kind === "success" ? "\u2713" : "\u2717",
18137
+ " ",
18138
+ notice.text
18139
+ ] })
18140
+ ] }),
18141
+ children,
18142
+ /* @__PURE__ */ jsx14(Text13, { children: " " }),
18143
+ /* @__PURE__ */ jsx14(
18144
+ ControlHints,
18145
+ {
18146
+ hints: editing ? [
18147
+ { keys: "type", label: "edit" },
18148
+ { keys: "\u2190/\u2192", label: "move cursor" },
18149
+ { keys: "\u23CE", label: enterAdvances ? isLastField ? saveLabel : "next" : "done" },
18150
+ { keys: "Ctrl+D", label: "clear" },
18151
+ { keys: "Esc", label: "cancel edit" }
18152
+ ] : [
18153
+ { keys: "\u2191/\u2193", label: "move" },
18154
+ { keys: "\u23CE", label: currentAction ? currentAction.hint : "edit" },
18155
+ ...currentField ? [{ keys: "Ctrl+D", label: "clear" }] : [],
18156
+ { keys: "s", label: saveLabel },
18157
+ ...onSkip ? [{ keys: "k", label: skipLabel2 }] : [],
18158
+ { keys: "Esc/q", label: quitLabel }
18159
+ ]
18160
+ }
18161
+ )
18162
+ ] })
18163
+ ] });
18164
+ }
18255
18165
 
18256
18166
  // packages/experience-design-system-cli/src/tui/import/steps/04-credentials/logic.ts
18257
18167
  var FIELDS = ["spaceId", "environmentId", "cmaToken", "host"];
@@ -18309,19 +18219,80 @@ function toUserError(error, host) {
18309
18219
  }
18310
18220
 
18311
18221
  // packages/experience-design-system-cli/src/tui/import/steps/04-credentials/screen.tsx
18312
- import { Fragment as Fragment4, jsx as jsx17, jsxs as jsxs14 } from "react/jsx-runtime";
18222
+ import { Fragment as Fragment2, jsx as jsx15, jsxs as jsxs14 } from "react/jsx-runtime";
18313
18223
  var FIELDS2 = [
18314
18224
  { key: "spaceId", label: "Space ID" },
18315
18225
  { key: "environmentId", label: "Environment ID" },
18316
18226
  { key: "cmaToken", label: "CMA Token", masked: true },
18317
18227
  { key: "host", label: "API Host", hint: "(default: api.contentful.com \xB7 EU spaces: api.eu.contentful.com)" }
18318
18228
  ];
18319
- var MENU2 = [
18229
+ var MENU = [
18320
18230
  { choice: "continue", label: "Continue", description: "Check the credentials and go on" },
18321
- { choice: "edit", label: "Edit", description: "Change the credentials" },
18322
- { choice: "skip", label: "Skip", description: "Save files only, nothing is pushed" },
18323
- { choice: "quit", label: "Quit", description: "Go back" }
18231
+ { choice: "edit", label: "Edit", description: "Change the credentials" }
18324
18232
  ];
18233
+ function CredentialsReview({
18234
+ values,
18235
+ subtitle,
18236
+ notice,
18237
+ validating,
18238
+ onChoose,
18239
+ children
18240
+ }) {
18241
+ const [focus, setFocus] = useState9(0);
18242
+ useInput11((_input, key) => {
18243
+ if (validating) return;
18244
+ if (key.escape) onChoose("quit");
18245
+ else if (key.return) onChoose(MENU[focus].choice);
18246
+ else if (key.upArrow) setFocus((current) => (current - 1 + MENU.length) % MENU.length);
18247
+ else if (key.downArrow || key.tab) setFocus((current) => (current + 1) % MENU.length);
18248
+ });
18249
+ const labelWidth = formLabelWidth([...FIELDS2, ...MENU]);
18250
+ return /* @__PURE__ */ jsxs14(Box14, { flexDirection: "column", children: [
18251
+ /* @__PURE__ */ jsx15(StepHeader, { step: "setup" }),
18252
+ /* @__PURE__ */ jsxs14(Box14, { flexDirection: "column", paddingX: 2, paddingBottom: 1, children: [
18253
+ /* @__PURE__ */ jsx15(Text14, { bold: true, children: "Contentful Credentials" }),
18254
+ /* @__PURE__ */ jsx15(Text14, { children: " " }),
18255
+ /* @__PURE__ */ jsx15(Text14, { color: PALETTE.muted, children: subtitle }),
18256
+ /* @__PURE__ */ jsx15(Text14, { children: " " }),
18257
+ MENU.map((item, index) => {
18258
+ const focused = index === focus;
18259
+ return /* @__PURE__ */ jsxs14(Box14, { gap: 1, children: [
18260
+ /* @__PURE__ */ jsx15(Text14, { color: focused ? PALETTE.accent : void 0, children: focused ? "\u276F" : " " }),
18261
+ /* @__PURE__ */ jsx15(Box14, { width: labelWidth, flexShrink: 0, children: /* @__PURE__ */ jsx15(Text14, { bold: focused, color: focused ? PALETTE.accent : PALETTE.muted, children: item.label }) }),
18262
+ /* @__PURE__ */ jsx15(Text14, { color: PALETTE.muted, children: item.description })
18263
+ ] }, item.choice);
18264
+ }),
18265
+ /* @__PURE__ */ jsx15(Text14, { children: " " }),
18266
+ FIELDS2.map((field) => {
18267
+ const value = values[field.key];
18268
+ 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);
18269
+ }),
18270
+ notice && /* @__PURE__ */ jsxs14(Fragment2, { children: [
18271
+ /* @__PURE__ */ jsx15(Text14, { children: " " }),
18272
+ /* @__PURE__ */ jsxs14(Text14, { color: PALETTE.error, children: [
18273
+ "\u2717 ",
18274
+ notice.text
18275
+ ] })
18276
+ ] }),
18277
+ validating && /* @__PURE__ */ jsxs14(Fragment2, { children: [
18278
+ /* @__PURE__ */ jsx15(Text14, { children: " " }),
18279
+ /* @__PURE__ */ jsx15(Text14, { color: PALETTE.accent, children: "Validating credentials..." })
18280
+ ] }),
18281
+ children,
18282
+ /* @__PURE__ */ jsx15(Text14, { children: " " }),
18283
+ /* @__PURE__ */ jsx15(
18284
+ ControlHints,
18285
+ {
18286
+ hints: [
18287
+ { keys: "\u2191/\u2193", label: "move" },
18288
+ { keys: "\u23CE", label: MENU[focus].label.toLowerCase() },
18289
+ { keys: "Esc", label: "back" }
18290
+ ]
18291
+ }
18292
+ )
18293
+ ] })
18294
+ ] });
18295
+ }
18325
18296
  function CredentialsScreen({
18326
18297
  onDone,
18327
18298
  onBack,
@@ -18360,47 +18331,18 @@ function CredentialsScreen({
18360
18331
  else if (choice === "edit") {
18361
18332
  setNotice(null);
18362
18333
  setEditing(true);
18363
- } else if (choice === "skip") onDone({ skipped: true });
18364
- else onBack();
18334
+ } else onBack();
18365
18335
  };
18366
18336
  if (!editing) {
18367
- return /* @__PURE__ */ jsxs14(
18368
- MenuScreen,
18369
- {
18370
- title: "Contentful Credentials",
18371
- subtitle,
18372
- menu: MENU2,
18373
- rows: FIELDS2.map((field) => ({
18374
- label: field.label,
18375
- value: field.masked ? "\u2022".repeat(values[field.key].length) : values[field.key]
18376
- })),
18377
- onChoose: choose,
18378
- onEscape: onBack,
18379
- busy: validating,
18380
- children: [
18381
- notice && /* @__PURE__ */ jsxs14(Fragment4, { children: [
18382
- /* @__PURE__ */ jsx17(Text14, { children: " " }),
18383
- /* @__PURE__ */ jsxs14(Text14, { color: PALETTE.error, children: [
18384
- "\u2717 ",
18385
- notice.text
18386
- ] })
18387
- ] }),
18388
- validating && /* @__PURE__ */ jsxs14(Fragment4, { children: [
18389
- /* @__PURE__ */ jsx17(Text14, { children: " " }),
18390
- /* @__PURE__ */ jsx17(Text14, { color: PALETTE.accent, children: "Validating credentials..." })
18391
- ] }),
18392
- !isUnchanged(normalize(values), initialValues) && /* @__PURE__ */ jsxs14(Fragment4, { children: [
18393
- /* @__PURE__ */ jsx17(Text14, { children: " " }),
18394
- /* @__PURE__ */ jsx17(Text14, { color: PALETTE.muted, children: "Changed values are saved after they validate." })
18395
- ] })
18396
- ]
18397
- }
18398
- );
18337
+ return /* @__PURE__ */ jsx15(CredentialsReview, { values, subtitle, notice, validating, onChoose: choose, children: !isUnchanged(normalize(values), initialValues) && /* @__PURE__ */ jsxs14(Fragment2, { children: [
18338
+ /* @__PURE__ */ jsx15(Text14, { children: " " }),
18339
+ /* @__PURE__ */ jsx15(Text14, { color: PALETTE.muted, children: "Changed values are saved after they validate." })
18340
+ ] }) });
18399
18341
  }
18400
18342
  return /* @__PURE__ */ jsxs14(
18401
18343
  FieldForm,
18402
18344
  {
18403
- header: /* @__PURE__ */ jsx17(StepHeader, { step: "setup" }),
18345
+ header: /* @__PURE__ */ jsx15(StepHeader, { step: "setup" }),
18404
18346
  title: "Contentful Credentials",
18405
18347
  subtitle,
18406
18348
  fields: FIELDS2,
@@ -18417,18 +18359,18 @@ function CredentialsScreen({
18417
18359
  notice,
18418
18360
  busy: validating,
18419
18361
  children: [
18420
- !prefilled && /* @__PURE__ */ jsxs14(Fragment4, { children: [
18421
- /* @__PURE__ */ jsx17(Text14, { children: " " }),
18422
- /* @__PURE__ */ jsx17(Text14, { color: PALETTE.muted, children: credentialsPurpose(tokensOnly) }),
18423
- /* @__PURE__ */ jsx17(Text14, { color: PALETTE.muted, children: "Tip: save these under Settings \u2192 Configuration so they pre-fill here." })
18362
+ !prefilled && /* @__PURE__ */ jsxs14(Fragment2, { children: [
18363
+ /* @__PURE__ */ jsx15(Text14, { children: " " }),
18364
+ /* @__PURE__ */ jsx15(Text14, { color: PALETTE.muted, children: credentialsPurpose(tokensOnly) }),
18365
+ /* @__PURE__ */ jsx15(Text14, { color: PALETTE.muted, children: "Tip: save these under Settings \u2192 Configuration so they pre-fill here." })
18424
18366
  ] }),
18425
- validating && /* @__PURE__ */ jsxs14(Fragment4, { children: [
18426
- /* @__PURE__ */ jsx17(Text14, { children: " " }),
18427
- /* @__PURE__ */ jsx17(Text14, { color: PALETTE.accent, children: "Validating credentials..." })
18367
+ validating && /* @__PURE__ */ jsxs14(Fragment2, { children: [
18368
+ /* @__PURE__ */ jsx15(Text14, { children: " " }),
18369
+ /* @__PURE__ */ jsx15(Text14, { color: PALETTE.accent, children: "Validating credentials..." })
18428
18370
  ] }),
18429
- !validating && !notice && !isUnchanged(normalize(values), initialValues) && /* @__PURE__ */ jsxs14(Fragment4, { children: [
18430
- /* @__PURE__ */ jsx17(Text14, { children: " " }),
18431
- /* @__PURE__ */ jsx17(Text14, { color: PALETTE.muted, children: "Changed values are saved after they validate." })
18371
+ !validating && !notice && !isUnchanged(normalize(values), initialValues) && /* @__PURE__ */ jsxs14(Fragment2, { children: [
18372
+ /* @__PURE__ */ jsx15(Text14, { children: " " }),
18373
+ /* @__PURE__ */ jsx15(Text14, { color: PALETTE.muted, children: "Changed values are saved after they validate." })
18432
18374
  ] })
18433
18375
  ]
18434
18376
  }
@@ -18517,9 +18459,9 @@ function resolveAgentChoice(flag, stored) {
18517
18459
  }
18518
18460
 
18519
18461
  // packages/experience-design-system-cli/src/tui/import/steps/06-extraction/screen.tsx
18520
- import { jsx as jsx18 } from "react/jsx-runtime";
18462
+ import { jsx as jsx16 } from "react/jsx-runtime";
18521
18463
  function ExtractionScreen({ progress, agent }) {
18522
- return /* @__PURE__ */ jsx18(
18464
+ return /* @__PURE__ */ jsx16(
18523
18465
  RunningStep,
18524
18466
  {
18525
18467
  step: "extraction",
@@ -18869,11 +18811,11 @@ function useTokensOnly(input) {
18869
18811
  }
18870
18812
 
18871
18813
  // packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/screen.tsx
18872
- import { Box as Box23, Text as Text25 } from "ink";
18814
+ import { Box as Box24, Text as Text25 } from "ink";
18873
18815
 
18874
18816
  // packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/panels/added-column.tsx
18875
18817
  import React10 from "react";
18876
- import { Box as Box15, Text as Text16 } from "ink";
18818
+ import { Box as Box16, Text as Text16 } from "ink";
18877
18819
  import figures2 from "figures";
18878
18820
 
18879
18821
  // packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/columns.ts
@@ -18980,8 +18922,8 @@ function computeColumnWindow(total, cursor, visibleCount) {
18980
18922
  }
18981
18923
 
18982
18924
  // packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/windowed-panel.tsx
18983
- import { Box as Box14, Text as Text15 } from "ink";
18984
- import { jsx as jsx19, jsxs as jsxs15 } from "react/jsx-runtime";
18925
+ import { Box as Box15, Text as Text15 } from "ink";
18926
+ import { jsx as jsx17, jsxs as jsxs15 } from "react/jsx-runtime";
18985
18927
  var MIN_TERMINAL_PANEL_HEIGHT = 5;
18986
18928
  function terminalPanelHeight(rows, reservedRows = 4) {
18987
18929
  return Math.max(MIN_TERMINAL_PANEL_HEIGHT, rows - reservedRows);
@@ -18997,8 +18939,8 @@ function FixedPanel({
18997
18939
  clipOverflow = true,
18998
18940
  children
18999
18941
  }) {
19000
- return /* @__PURE__ */ jsx19(
19001
- Box14,
18942
+ return /* @__PURE__ */ jsx17(
18943
+ Box15,
19002
18944
  {
19003
18945
  flexDirection: "column",
19004
18946
  width,
@@ -19023,7 +18965,7 @@ function WindowedPanel({ width, height, title, focused, children }) {
19023
18965
  ...height === void 0 ? {} : { height },
19024
18966
  focused,
19025
18967
  children: [
19026
- title && /* @__PURE__ */ jsx19(WindowedPanelHeader, { title, width, focused }),
18968
+ title && /* @__PURE__ */ jsx17(WindowedPanelHeader, { title, width, focused }),
19027
18969
  children
19028
18970
  ]
19029
18971
  }
@@ -19034,9 +18976,9 @@ function WindowedPanelHeader({
19034
18976
  width,
19035
18977
  focused
19036
18978
  }) {
19037
- return /* @__PURE__ */ jsxs15(Box14, { flexDirection: "column", children: [
19038
- /* @__PURE__ */ jsx19(Text15, { bold: true, color: PALETTE.accent, inverse: focused, children: title }),
19039
- /* @__PURE__ */ jsx19(Text15, { color: PALETTE.muted, children: "\u2500".repeat(Math.max(0, width - 2)) })
18979
+ return /* @__PURE__ */ jsxs15(Box15, { flexDirection: "column", children: [
18980
+ /* @__PURE__ */ jsx17(Text15, { bold: true, color: PALETTE.accent, inverse: focused, children: title }),
18981
+ /* @__PURE__ */ jsx17(Text15, { color: PALETTE.muted, children: "\u2500".repeat(Math.max(0, width - 2)) })
19040
18982
  ] });
19041
18983
  }
19042
18984
  function formatWindowIndicator(direction, count) {
@@ -19045,22 +18987,22 @@ function formatWindowIndicator(direction, count) {
19045
18987
  }
19046
18988
  function WindowFooter({ above, below }) {
19047
18989
  const parts = [above > 0 ? `\u2191 ${above}` : "", below > 0 ? `\u2193 ${below}` : ""].filter(Boolean);
19048
- return /* @__PURE__ */ jsx19(Text15, { color: PALETTE.muted, children: parts.length === 0 ? " " : `${parts.join(" \xB7 ")} more` });
18990
+ return /* @__PURE__ */ jsx17(Text15, { color: PALETTE.muted, children: parts.length === 0 ? " " : `${parts.join(" \xB7 ")} more` });
19049
18991
  }
19050
18992
  function WindowIndicator({ direction, count }) {
19051
- return /* @__PURE__ */ jsx19(Text15, { color: PALETTE.muted, children: formatWindowIndicator(direction, count) });
18993
+ return /* @__PURE__ */ jsx17(Text15, { color: PALETTE.muted, children: formatWindowIndicator(direction, count) });
19052
18994
  }
19053
18995
 
19054
18996
  // packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/panels/added-column.tsx
19055
- import { jsx as jsx20, jsxs as jsxs16 } from "react/jsx-runtime";
18997
+ import { jsx as jsx18, jsxs as jsxs16 } from "react/jsx-runtime";
19056
18998
  function AddedColumn(props) {
19057
18999
  const { title, width, height, entries, cursor, focused, aiFlaggedByKey, visibleCount } = props;
19058
19000
  const reserveAiBadge = entries.some((e) => aiFlaggedByKey?.get(e.name) === true);
19059
19001
  const firstNonCycleIdx = entries.findIndex((e) => !e.isCycle);
19060
19002
  const window = computeColumnWindow(entries.length, cursor, Math.max(1, visibleCount));
19061
19003
  return /* @__PURE__ */ jsxs16(WindowedPanel, { width, height, title, focused, children: [
19062
- /* @__PURE__ */ jsx20(WindowIndicator, { direction: "up", count: window.above }),
19063
- entries.length === 0 ? /* @__PURE__ */ jsx20(Text16, { color: PALETTE.muted, children: "(none)" }) : entries.slice(window.start, window.end).map((entry, vi) => {
19004
+ /* @__PURE__ */ jsx18(WindowIndicator, { direction: "up", count: window.above }),
19005
+ entries.length === 0 ? /* @__PURE__ */ jsx18(Text16, { color: PALETTE.muted, children: "(none)" }) : entries.slice(window.start, window.end).map((entry, vi) => {
19064
19006
  const i = window.start + vi;
19065
19007
  const isSelected = i === cursor;
19066
19008
  const isCursor = focused && isSelected;
@@ -19068,12 +19010,12 @@ function AddedColumn(props) {
19068
19010
  const showSeparator = firstNonCycleIdx > 0 && i === firstNonCycleIdx;
19069
19011
  const style = sideColumnLabelStyle({ isCycle: entry.isCycle, isSelected, focused });
19070
19012
  return /* @__PURE__ */ jsxs16(React10.Fragment, { children: [
19071
- showSeparator && /* @__PURE__ */ jsx20(Text16, { color: PALETTE.muted, children: "\u2500".repeat(Math.max(0, width - 2)) }),
19072
- /* @__PURE__ */ jsxs16(Box15, { children: [
19073
- isCursor ? /* @__PURE__ */ jsx20(Text16, { color: PALETTE.accent, bold: true, children: figures2.pointer }) : /* @__PURE__ */ jsx20(Text16, { children: " " }),
19074
- reserveAiBadge && (aiFlagged ? /* @__PURE__ */ jsx20(Text16, { color: PALETTE.warning, bold: true, children: " [\xD7]" }) : /* @__PURE__ */ jsx20(Text16, { children: " " })),
19075
- entry.isCycle && /* @__PURE__ */ jsx20(Text16, { color: isCursor ? PALETTE.accent : PALETTE.warning, bold: true, underline: style.nameUnderline, children: " \u26A0" }),
19076
- /* @__PURE__ */ jsx20(
19013
+ showSeparator && /* @__PURE__ */ jsx18(Text16, { color: PALETTE.muted, children: "\u2500".repeat(Math.max(0, width - 2)) }),
19014
+ /* @__PURE__ */ jsxs16(Box16, { children: [
19015
+ isCursor ? /* @__PURE__ */ jsx18(Text16, { color: PALETTE.accent, bold: true, children: figures2.pointer }) : /* @__PURE__ */ jsx18(Text16, { children: " " }),
19016
+ reserveAiBadge && (aiFlagged ? /* @__PURE__ */ jsx18(Text16, { color: PALETTE.warning, bold: true, children: " [\xD7]" }) : /* @__PURE__ */ jsx18(Text16, { children: " " })),
19017
+ entry.isCycle && /* @__PURE__ */ jsx18(Text16, { color: isCursor ? PALETTE.accent : PALETTE.warning, bold: true, underline: style.nameUnderline, children: " \u26A0" }),
19018
+ /* @__PURE__ */ jsx18(
19077
19019
  Text16,
19078
19020
  {
19079
19021
  color: style.nameColor,
@@ -19087,14 +19029,14 @@ function AddedColumn(props) {
19087
19029
  ] })
19088
19030
  ] }, entry.name);
19089
19031
  }),
19090
- /* @__PURE__ */ jsx20(WindowIndicator, { direction: "down", count: window.below })
19032
+ /* @__PURE__ */ jsx18(WindowIndicator, { direction: "down", count: window.below })
19091
19033
  ] });
19092
19034
  }
19093
19035
 
19094
19036
  // packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/panels/cycles-panel.tsx
19095
- import { Box as Box16, Text as Text17 } from "ink";
19037
+ import { Box as Box17, Text as Text17 } from "ink";
19096
19038
  import figures3 from "figures";
19097
- import { jsx as jsx21, jsxs as jsxs17 } from "react/jsx-runtime";
19039
+ import { jsx as jsx19, jsxs as jsxs17 } from "react/jsx-runtime";
19098
19040
  function cycleLabel(cycle, index) {
19099
19041
  const parts = [];
19100
19042
  for (let i = 0; i < cycle.edges.length; i++) {
@@ -19105,36 +19047,36 @@ function cycleLabel(cycle, index) {
19105
19047
  return `Cycle ${index + 1}: ${parts.join(" \u2192 ")}`;
19106
19048
  }
19107
19049
  function CyclesPanel({ cycles, cursor }) {
19108
- return /* @__PURE__ */ jsxs17(Box16, { flexDirection: "column", borderStyle: "single", borderColor: PALETTE.warning, paddingX: 1, marginTop: 1, children: [
19109
- /* @__PURE__ */ jsx21(Text17, { bold: true, color: PALETTE.warning, children: `Cycles detected (${cycles.length}):` }),
19110
- /* @__PURE__ */ jsx21(Text17, { children: " " }),
19050
+ return /* @__PURE__ */ jsxs17(Box17, { flexDirection: "column", borderStyle: "single", borderColor: PALETTE.warning, paddingX: 1, marginTop: 1, children: [
19051
+ /* @__PURE__ */ jsx19(Text17, { bold: true, color: PALETTE.warning, children: `Cycles detected (${cycles.length}):` }),
19052
+ /* @__PURE__ */ jsx19(Text17, { children: " " }),
19111
19053
  cycles.map((cycle, i) => {
19112
19054
  const isCursor = i === cursor;
19113
19055
  return /* @__PURE__ */ jsxs17(Text17, { children: [
19114
- isCursor ? /* @__PURE__ */ jsx21(Text17, { color: PALETTE.accent, bold: true, children: figures3.pointer }) : /* @__PURE__ */ jsx21(Text17, { children: " " }),
19115
- /* @__PURE__ */ jsx21(Text17, { color: PALETTE.warning, inverse: isCursor, children: " " + cycleLabel(cycle, i) })
19056
+ isCursor ? /* @__PURE__ */ jsx19(Text17, { color: PALETTE.accent, bold: true, children: figures3.pointer }) : /* @__PURE__ */ jsx19(Text17, { children: " " }),
19057
+ /* @__PURE__ */ jsx19(Text17, { color: PALETTE.warning, inverse: isCursor, children: " " + cycleLabel(cycle, i) })
19116
19058
  ] }, i);
19117
19059
  }),
19118
- /* @__PURE__ */ jsx21(Text17, { children: "[\u2191/\u2193] move \xB7 [Enter] jump \xB7 [c/Esc] close" })
19060
+ /* @__PURE__ */ jsx19(Text17, { children: "[\u2191/\u2193] move \xB7 [Enter] jump \xB7 [c/Esc] close" })
19119
19061
  ] });
19120
19062
  }
19121
19063
 
19122
19064
  // packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/panels/reject-prompt.tsx
19123
- import { Box as Box17, Text as Text18 } from "ink";
19124
- import { jsx as jsx22, jsxs as jsxs18 } from "react/jsx-runtime";
19065
+ import { Box as Box18, Text as Text18 } from "ink";
19066
+ import { jsx as jsx20, jsxs as jsxs18 } from "react/jsx-runtime";
19125
19067
  function RejectPrompt({ pending }) {
19126
- return /* @__PURE__ */ jsxs18(Box17, { flexDirection: "column", borderStyle: "single", borderColor: PALETTE.warning, paddingX: 1, marginTop: 1, children: [
19127
- /* @__PURE__ */ jsx22(Text18, { bold: true, color: PALETTE.warning, children: `Rejecting ${pending.target} will:` }),
19128
- pending.ancestors.length > 0 && /* @__PURE__ */ jsx22(Text18, { children: `- Reject ancestors: ${pending.ancestors.join(", ")}` }),
19129
- pending.descendants.length > 0 && /* @__PURE__ */ jsx22(Text18, { children: `- Deselect descendants: ${pending.descendants.join(", ")}` }),
19130
- /* @__PURE__ */ jsx22(Text18, { children: "[y] confirm \xB7 [n]/[Esc] cancel" })
19068
+ return /* @__PURE__ */ jsxs18(Box18, { flexDirection: "column", borderStyle: "single", borderColor: PALETTE.warning, paddingX: 1, marginTop: 1, children: [
19069
+ /* @__PURE__ */ jsx20(Text18, { bold: true, color: PALETTE.warning, children: `Rejecting ${pending.target} will:` }),
19070
+ pending.ancestors.length > 0 && /* @__PURE__ */ jsx20(Text18, { children: `- Reject ancestors: ${pending.ancestors.join(", ")}` }),
19071
+ pending.descendants.length > 0 && /* @__PURE__ */ jsx20(Text18, { children: `- Deselect descendants: ${pending.descendants.join(", ")}` }),
19072
+ /* @__PURE__ */ jsx20(Text18, { children: "[y] confirm \xB7 [n]/[Esc] cancel" })
19131
19073
  ] });
19132
19074
  }
19133
19075
 
19134
19076
  // packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/CompactControlBar.tsx
19135
- import { jsx as jsx23 } from "react/jsx-runtime";
19077
+ import { jsx as jsx21 } from "react/jsx-runtime";
19136
19078
  function CompactControlBar({ hasGroupRoots, searchActive }) {
19137
- return /* @__PURE__ */ jsx23(
19079
+ return /* @__PURE__ */ jsx21(
19138
19080
  ControlHints,
19139
19081
  {
19140
19082
  hints: [
@@ -19151,8 +19093,8 @@ function CompactControlBar({ hasGroupRoots, searchActive }) {
19151
19093
  }
19152
19094
 
19153
19095
  // packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/CounterStrip.tsx
19154
- import { Box as Box18, Text as Text19 } from "ink";
19155
- import { jsx as jsx24, jsxs as jsxs19 } from "react/jsx-runtime";
19096
+ import { Box as Box19, Text as Text19 } from "ink";
19097
+ import { jsx as jsx22, jsxs as jsxs19 } from "react/jsx-runtime";
19156
19098
  function CounterStrip(props) {
19157
19099
  const { counters, totalWidth } = props;
19158
19100
  const condensed = totalWidth < 60;
@@ -19160,32 +19102,32 @@ function CounterStrip(props) {
19160
19102
  const labelRej = condensed ? "Rej" : "Rejected";
19161
19103
  const labelUnd = condensed ? "Und" : "Undecided";
19162
19104
  const sep = condensed ? " | " : " ";
19163
- return /* @__PURE__ */ jsx24(Box18, { children: /* @__PURE__ */ jsxs19(Text19, { children: [
19105
+ return /* @__PURE__ */ jsx22(Box19, { children: /* @__PURE__ */ jsxs19(Text19, { children: [
19164
19106
  /* @__PURE__ */ jsxs19(Text19, { color: PALETTE.muted, children: [
19165
19107
  labelGrp,
19166
19108
  " "
19167
19109
  ] }),
19168
- /* @__PURE__ */ jsx24(Text19, { bold: true, children: counters.groups }),
19169
- /* @__PURE__ */ jsx24(Text19, { color: PALETTE.muted, children: sep }),
19110
+ /* @__PURE__ */ jsx22(Text19, { bold: true, children: counters.groups }),
19111
+ /* @__PURE__ */ jsx22(Text19, { color: PALETTE.muted, children: sep }),
19170
19112
  /* @__PURE__ */ jsxs19(Text19, { color: PALETTE.muted, children: [
19171
19113
  labelRej,
19172
19114
  " "
19173
19115
  ] }),
19174
- /* @__PURE__ */ jsx24(Text19, { bold: true, children: counters.rejected }),
19175
- /* @__PURE__ */ jsx24(Text19, { color: PALETTE.muted, children: sep }),
19116
+ /* @__PURE__ */ jsx22(Text19, { bold: true, children: counters.rejected }),
19117
+ /* @__PURE__ */ jsx22(Text19, { color: PALETTE.muted, children: sep }),
19176
19118
  /* @__PURE__ */ jsxs19(Text19, { color: PALETTE.muted, children: [
19177
19119
  labelUnd,
19178
19120
  " "
19179
19121
  ] }),
19180
- /* @__PURE__ */ jsx24(Text19, { bold: true, children: counters.undecided }),
19181
- /* @__PURE__ */ jsx24(Text19, { color: PALETTE.muted, children: sep })
19122
+ /* @__PURE__ */ jsx22(Text19, { bold: true, children: counters.undecided }),
19123
+ /* @__PURE__ */ jsx22(Text19, { color: PALETTE.muted, children: sep })
19182
19124
  ] }) });
19183
19125
  }
19184
19126
 
19185
19127
  // packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/GotoBanner.tsx
19186
19128
  import figures4 from "figures";
19187
- import { Box as Box19, Text as Text20 } from "ink";
19188
- import { jsx as jsx25, jsxs as jsxs20 } from "react/jsx-runtime";
19129
+ import { Box as Box20, Text as Text20 } from "ink";
19130
+ import { jsx as jsx23, jsxs as jsxs20 } from "react/jsx-runtime";
19189
19131
  var DEFAULT_MAX_ROWS = 15;
19190
19132
  function windowStart(rowCount, highlightIndex, maxRows) {
19191
19133
  if (rowCount <= maxRows) return 0;
@@ -19197,8 +19139,8 @@ function windowStart(rowCount, highlightIndex, maxRows) {
19197
19139
  }
19198
19140
  function defaultRenderRow(row, index, isCursor) {
19199
19141
  return /* @__PURE__ */ jsxs20(Text20, { children: [
19200
- isCursor ? /* @__PURE__ */ jsx25(Text20, { color: PALETTE.accent, bold: true, children: figures4.pointer }) : /* @__PURE__ */ jsx25(Text20, { children: " " }),
19201
- /* @__PURE__ */ jsx25(Text20, { inverse: isCursor, children: " " + row.label })
19142
+ isCursor ? /* @__PURE__ */ jsx23(Text20, { color: PALETTE.accent, bold: true, children: figures4.pointer }) : /* @__PURE__ */ jsx23(Text20, { children: " " }),
19143
+ /* @__PURE__ */ jsx23(Text20, { inverse: isCursor, children: " " + row.label })
19202
19144
  ] }, index);
19203
19145
  }
19204
19146
  function GotoBanner({
@@ -19218,7 +19160,7 @@ function GotoBanner({
19218
19160
  const moreAbove = start;
19219
19161
  const moreBelow = rows.length - end;
19220
19162
  return /* @__PURE__ */ jsxs20(
19221
- Box19,
19163
+ Box20,
19222
19164
  {
19223
19165
  flexDirection: "column",
19224
19166
  borderStyle: "single",
@@ -19228,14 +19170,14 @@ function GotoBanner({
19228
19170
  width,
19229
19171
  flexShrink: 0,
19230
19172
  children: [
19231
- /* @__PURE__ */ jsx25(Text20, { bold: true, children: title }),
19232
- moreAbove > 0 && /* @__PURE__ */ jsx25(Text20, { color: PALETTE.muted, children: ` \u25B2 ${moreAbove} more` }),
19173
+ /* @__PURE__ */ jsx23(Text20, { bold: true, children: title }),
19174
+ moreAbove > 0 && /* @__PURE__ */ jsx23(Text20, { color: PALETTE.muted, children: ` \u25B2 ${moreAbove} more` }),
19233
19175
  visible.map((row, vi) => {
19234
19176
  const i = start + vi;
19235
19177
  return renderRow(row, i, i === highlightIndex);
19236
19178
  }),
19237
- moreBelow > 0 && /* @__PURE__ */ jsx25(Text20, { color: PALETTE.muted, children: ` \u25BC ${moreBelow} more` }),
19238
- footerHint !== void 0 && /* @__PURE__ */ jsx25(Text20, { color: PALETTE.muted, children: footerHint })
19179
+ moreBelow > 0 && /* @__PURE__ */ jsx23(Text20, { color: PALETTE.muted, children: ` \u25BC ${moreBelow} more` }),
19180
+ footerHint !== void 0 && /* @__PURE__ */ jsx23(Text20, { color: PALETTE.muted, children: footerHint })
19239
19181
  ]
19240
19182
  }
19241
19183
  );
@@ -19243,7 +19185,7 @@ function GotoBanner({
19243
19185
 
19244
19186
  // packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/GroupedSidebar.tsx
19245
19187
  import figures5 from "figures";
19246
- import { Box as Box20, Text as Text22 } from "ink";
19188
+ import { Box as Box21, Text as Text22 } from "ink";
19247
19189
 
19248
19190
  // packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/graph/cycle-detection.ts
19249
19191
  function buildGraph(components) {
@@ -19584,7 +19526,7 @@ function findSharedDeps(closures) {
19584
19526
 
19585
19527
  // packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/badge.tsx
19586
19528
  import { Text as Text21 } from "ink";
19587
- import { jsx as jsx26 } from "react/jsx-runtime";
19529
+ import { jsx as jsx24 } from "react/jsx-runtime";
19588
19530
  function previewBadge(annotation) {
19589
19531
  switch (annotation) {
19590
19532
  case "new":
@@ -19603,11 +19545,11 @@ function PreviewBadge({
19603
19545
  badge,
19604
19546
  highlighted = false
19605
19547
  }) {
19606
- return badge ? /* @__PURE__ */ jsx26(Text21, { color: !highlighted && badge.dim ? PALETTE.muted : badge.color, bold: badge.bold, children: badge.char }) : /* @__PURE__ */ jsx26(Text21, { children: " " });
19548
+ return badge ? /* @__PURE__ */ jsx24(Text21, { color: !highlighted && badge.dim ? PALETTE.muted : badge.color, bold: badge.bold, children: badge.char }) : /* @__PURE__ */ jsx24(Text21, { children: " " });
19607
19549
  }
19608
19550
 
19609
19551
  // packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/GroupedSidebar.tsx
19610
- import { jsx as jsx27, jsxs as jsxs21 } from "react/jsx-runtime";
19552
+ import { jsx as jsx25, jsxs as jsxs21 } from "react/jsx-runtime";
19611
19553
  var GLYPH_EXPAND_COLLAPSED = "\u25B8";
19612
19554
  var GLYPH_EXPAND_EXPANDED = "\u25BE";
19613
19555
  var GLYPH_TREE_MID = "\u251C\u2500";
@@ -20063,11 +20005,11 @@ function GroupedSidebar(props) {
20063
20005
  isOwn: rs?.isOwn ?? false,
20064
20006
  isCursor
20065
20007
  });
20066
- return /* @__PURE__ */ jsxs21(Box20, { children: [
20067
- isCursor ? /* @__PURE__ */ jsx27(Text22, { color: PALETTE.accent, bold: true, children: figures5.pointer }) : /* @__PURE__ */ jsx27(Text22, { children: " " }),
20068
- /* @__PURE__ */ jsx27(PreviewBadge, { badge, highlighted: isSelected }),
20069
- selectionStateByKey !== void 0 && (selGlyph && !isSynthetic ? /* @__PURE__ */ jsx27(Text22, { color: !isSelected && selDim ? PALETTE.muted : selColor, bold: selBold, children: " " + selGlyph }) : /* @__PURE__ */ jsx27(Text22, { children: " " })),
20070
- aiFlaggedByKey !== void 0 && (aiFlagged ? /* @__PURE__ */ jsx27(Text22, { color: PALETTE.warning, bold: true, children: " [\xD7]" }) : /* @__PURE__ */ jsx27(Text22, { children: " " })),
20008
+ return /* @__PURE__ */ jsxs21(Box21, { children: [
20009
+ isCursor ? /* @__PURE__ */ jsx25(Text22, { color: PALETTE.accent, bold: true, children: figures5.pointer }) : /* @__PURE__ */ jsx25(Text22, { children: " " }),
20010
+ /* @__PURE__ */ jsx25(PreviewBadge, { badge, highlighted: isSelected }),
20011
+ selectionStateByKey !== void 0 && (selGlyph && !isSynthetic ? /* @__PURE__ */ jsx25(Text22, { color: !isSelected && selDim ? PALETTE.muted : selColor, bold: selBold, children: " " + selGlyph }) : /* @__PURE__ */ jsx25(Text22, { children: " " })),
20012
+ aiFlaggedByKey !== void 0 && (aiFlagged ? /* @__PURE__ */ jsx25(Text22, { color: PALETTE.warning, bold: true, children: " [\xD7]" }) : /* @__PURE__ */ jsx25(Text22, { children: " " })),
20071
20013
  /* @__PURE__ */ jsxs21(
20072
20014
  Text22,
20073
20015
  {
@@ -20082,16 +20024,16 @@ function GroupedSidebar(props) {
20082
20024
  ]
20083
20025
  }
20084
20026
  ),
20085
- inheritanceStyle.glyph && /* @__PURE__ */ jsx27(Text22, { color: inheritanceStyle.dim ? PALETTE.muted : inheritanceStyle.color, bold: inheritanceStyle.bold, children: " " + inheritanceStyle.glyph })
20027
+ inheritanceStyle.glyph && /* @__PURE__ */ jsx25(Text22, { color: inheritanceStyle.dim ? PALETTE.muted : inheritanceStyle.color, bold: inheritanceStyle.bold, children: " " + inheritanceStyle.glyph })
20086
20028
  ] }, row.key);
20087
20029
  }),
20088
- windowed && /* @__PURE__ */ jsx27(WindowFooter, { above: start, below: Math.max(0, allRows.length - end) })
20030
+ windowed && /* @__PURE__ */ jsx25(WindowFooter, { above: start, below: Math.max(0, allRows.length - end) })
20089
20031
  ] });
20090
20032
  }
20091
20033
 
20092
20034
  // packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/HelpOverlay.tsx
20093
20035
  import React11 from "react";
20094
- import { Box as Box21, Text as Text23 } from "ink";
20036
+ import { Box as Box22, Text as Text23 } from "ink";
20095
20037
 
20096
20038
  // packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/hooks/useImmediateInput.ts
20097
20039
  import { useLayoutEffect, useRef as useRef5 } from "react";
@@ -20190,7 +20132,7 @@ function useTerminalSize() {
20190
20132
  }
20191
20133
 
20192
20134
  // packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/HelpOverlay.tsx
20193
- import { Fragment as Fragment5, jsx as jsx28, jsxs as jsxs22 } from "react/jsx-runtime";
20135
+ import { Fragment as Fragment3, jsx as jsx26, jsxs as jsxs22 } from "react/jsx-runtime";
20194
20136
  function HelpOverlay(props) {
20195
20137
  const { onClose } = props;
20196
20138
  const { columns: terminalColumns, rows: terminalRows } = useTerminalSize();
@@ -20202,7 +20144,7 @@ function HelpOverlay(props) {
20202
20144
  }, props.handleInput !== false);
20203
20145
  if (props.sections) {
20204
20146
  return /* @__PURE__ */ jsxs22(
20205
- Box21,
20147
+ Box22,
20206
20148
  {
20207
20149
  flexDirection: "column",
20208
20150
  borderStyle: "round",
@@ -20211,11 +20153,11 @@ function HelpOverlay(props) {
20211
20153
  height: panelHeight,
20212
20154
  overflowY: "hidden",
20213
20155
  children: [
20214
- /* @__PURE__ */ jsx28(Text23, { bold: true, children: "\u2500".repeat(titleRule) + " Help " + "\u2500".repeat(titleRule) }),
20156
+ /* @__PURE__ */ jsx26(Text23, { bold: true, children: "\u2500".repeat(titleRule) + " Help " + "\u2500".repeat(titleRule) }),
20215
20157
  props.sections.map((section) => /* @__PURE__ */ jsxs22(React11.Fragment, { children: [
20216
- /* @__PURE__ */ jsx28(Text23, { children: " " }),
20217
- /* @__PURE__ */ jsx28(Text23, { bold: true, children: section.title }),
20218
- section.entries.map((entry) => /* @__PURE__ */ jsx28(Text23, { children: entry.keys ? " " + entry.keys.padEnd(16) + " " + entry.label : " " + entry.label }, entry.keys + entry.label))
20158
+ /* @__PURE__ */ jsx26(Text23, { children: " " }),
20159
+ /* @__PURE__ */ jsx26(Text23, { bold: true, children: section.title }),
20160
+ section.entries.map((entry) => /* @__PURE__ */ jsx26(Text23, { children: entry.keys ? " " + entry.keys.padEnd(16) + " " + entry.label : " " + entry.label }, entry.keys + entry.label))
20219
20161
  ] }, section.title))
20220
20162
  ]
20221
20163
  }
@@ -20223,7 +20165,7 @@ function HelpOverlay(props) {
20223
20165
  }
20224
20166
  const mode = props.mode;
20225
20167
  return /* @__PURE__ */ jsxs22(
20226
- Box21,
20168
+ Box22,
20227
20169
  {
20228
20170
  flexDirection: "column",
20229
20171
  borderStyle: "round",
@@ -20232,38 +20174,38 @@ function HelpOverlay(props) {
20232
20174
  height: panelHeight,
20233
20175
  overflowY: "hidden",
20234
20176
  children: [
20235
- /* @__PURE__ */ jsx28(Text23, { bold: true, children: "\u2500".repeat(titleRule) + " Help " + "\u2500".repeat(titleRule) }),
20236
- /* @__PURE__ */ jsx28(Text23, { children: " " }),
20237
- /* @__PURE__ */ jsx28(Text23, { bold: true, children: "Navigation" }),
20238
- /* @__PURE__ */ jsx28(Text23, { children: " \u2191 / k / PgUp Scroll up" }),
20239
- /* @__PURE__ */ jsx28(Text23, { children: " \u2193 / j / PgDn Scroll down" }),
20240
- /* @__PURE__ */ jsx28(Text23, { children: " g / Home Jump to top" }),
20241
- /* @__PURE__ */ jsx28(Text23, { children: " G / End Jump to bottom" }),
20242
- mode === "review" && /* @__PURE__ */ jsxs22(Fragment5, { children: [
20243
- /* @__PURE__ */ jsx28(Text23, { children: " " }),
20244
- /* @__PURE__ */ jsx28(Text23, { bold: true, children: "[Review mode only]" }),
20245
- /* @__PURE__ */ jsx28(Text23, { children: " Tab Toggle sidebar/detail" }),
20246
- /* @__PURE__ */ jsx28(Text23, { children: " a Accept component" }),
20247
- /* @__PURE__ */ jsx28(Text23, { children: " r Reject component" }),
20248
- /* @__PURE__ */ jsx28(Text23, { children: " e Edit proposal" }),
20249
- /* @__PURE__ */ jsx28(Text23, { children: " s Toggle source code" }),
20250
- /* @__PURE__ */ jsx28(Text23, { children: " A Approve all" }),
20251
- /* @__PURE__ */ jsx28(Text23, { children: " F Open finalize dialog" }),
20252
- /* @__PURE__ */ jsx28(Text23, { children: " Ctrl+S Save draft" }),
20253
- /* @__PURE__ */ jsx28(Text23, { children: " Ctrl+Z Undo" }),
20254
- /* @__PURE__ */ jsx28(Text23, { children: " Ctrl+Y Redo" }),
20255
- /* @__PURE__ */ jsx28(Text23, { children: " Esc Exit edit / close" })
20177
+ /* @__PURE__ */ jsx26(Text23, { bold: true, children: "\u2500".repeat(titleRule) + " Help " + "\u2500".repeat(titleRule) }),
20178
+ /* @__PURE__ */ jsx26(Text23, { children: " " }),
20179
+ /* @__PURE__ */ jsx26(Text23, { bold: true, children: "Navigation" }),
20180
+ /* @__PURE__ */ jsx26(Text23, { children: " \u2191 / k / PgUp Scroll up" }),
20181
+ /* @__PURE__ */ jsx26(Text23, { children: " \u2193 / j / PgDn Scroll down" }),
20182
+ /* @__PURE__ */ jsx26(Text23, { children: " g / Home Jump to top" }),
20183
+ /* @__PURE__ */ jsx26(Text23, { children: " G / End Jump to bottom" }),
20184
+ mode === "review" && /* @__PURE__ */ jsxs22(Fragment3, { children: [
20185
+ /* @__PURE__ */ jsx26(Text23, { children: " " }),
20186
+ /* @__PURE__ */ jsx26(Text23, { bold: true, children: "[Review mode only]" }),
20187
+ /* @__PURE__ */ jsx26(Text23, { children: " Tab Toggle sidebar/detail" }),
20188
+ /* @__PURE__ */ jsx26(Text23, { children: " a Accept component" }),
20189
+ /* @__PURE__ */ jsx26(Text23, { children: " r Reject component" }),
20190
+ /* @__PURE__ */ jsx26(Text23, { children: " e Edit proposal" }),
20191
+ /* @__PURE__ */ jsx26(Text23, { children: " s Toggle source code" }),
20192
+ /* @__PURE__ */ jsx26(Text23, { children: " A Approve all" }),
20193
+ /* @__PURE__ */ jsx26(Text23, { children: " F Open finalize dialog" }),
20194
+ /* @__PURE__ */ jsx26(Text23, { children: " Ctrl+S Save draft" }),
20195
+ /* @__PURE__ */ jsx26(Text23, { children: " Ctrl+Z Undo" }),
20196
+ /* @__PURE__ */ jsx26(Text23, { children: " Ctrl+Y Redo" }),
20197
+ /* @__PURE__ */ jsx26(Text23, { children: " Esc Exit edit / close" })
20256
20198
  ] }),
20257
- /* @__PURE__ */ jsx28(Text23, { children: " " }),
20258
- /* @__PURE__ */ jsx28(Text23, { children: " h Close help" }),
20259
- /* @__PURE__ */ jsx28(Text23, { children: " q Quit" })
20199
+ /* @__PURE__ */ jsx26(Text23, { children: " " }),
20200
+ /* @__PURE__ */ jsx26(Text23, { children: " h Close help" }),
20201
+ /* @__PURE__ */ jsx26(Text23, { children: " q Quit" })
20260
20202
  ]
20261
20203
  }
20262
20204
  );
20263
20205
  }
20264
20206
 
20265
20207
  // packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/SearchMatchSummary.tsx
20266
- import { Box as Box22, Text as Text24 } from "ink";
20208
+ import { Box as Box23, Text as Text24 } from "ink";
20267
20209
 
20268
20210
  // packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/autocomplete.ts
20269
20211
  function longestCommonPrefix(names) {
@@ -20320,7 +20262,7 @@ function formatSearchMatchSummary(matches, total) {
20320
20262
  }
20321
20263
 
20322
20264
  // packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/SearchMatchSummary.tsx
20323
- import { Fragment as Fragment6, jsx as jsx29, jsxs as jsxs23 } from "react/jsx-runtime";
20265
+ import { Fragment as Fragment4, jsx as jsx27, jsxs as jsxs23 } from "react/jsx-runtime";
20324
20266
  function SearchMatchSummary({
20325
20267
  open,
20326
20268
  query,
@@ -20331,17 +20273,17 @@ function SearchMatchSummary({
20331
20273
  marginTop
20332
20274
  }) {
20333
20275
  if (hidden) return null;
20334
- return /* @__PURE__ */ jsxs23(Fragment6, { children: [
20335
- open && /* @__PURE__ */ jsxs23(Box22, { marginTop, flexDirection: "column", children: [
20276
+ return /* @__PURE__ */ jsxs23(Fragment4, { children: [
20277
+ open && /* @__PURE__ */ jsxs23(Box23, { marginTop, flexDirection: "column", children: [
20336
20278
  /* @__PURE__ */ jsxs23(Text24, { children: [
20337
20279
  `/${query}`,
20338
- /* @__PURE__ */ jsx29(Text24, { color: PALETTE.accent, children: "\u258E" }),
20339
- query && /* @__PURE__ */ jsx29(Text24, { color: PALETTE.muted, children: formatSearchMatchSummary(matches, total) }),
20340
- /* @__PURE__ */ jsx29(Text24, { children: " \xB7 [Esc] leave" })
20280
+ /* @__PURE__ */ jsx27(Text24, { color: PALETTE.accent, children: "\u258E" }),
20281
+ query && /* @__PURE__ */ jsx27(Text24, { color: PALETTE.muted, children: formatSearchMatchSummary(matches, total) }),
20282
+ /* @__PURE__ */ jsx27(Text24, { children: " \xB7 [Esc] leave" })
20341
20283
  ] }),
20342
- autocompleteCandidates.length > 1 && /* @__PURE__ */ jsx29(Text24, { color: PALETTE.muted, children: ` possibilities: ${autocompleteCandidates.join(" \xB7 ").slice(0, 120)}` })
20284
+ autocompleteCandidates.length > 1 && /* @__PURE__ */ jsx27(Text24, { color: PALETTE.muted, children: ` possibilities: ${autocompleteCandidates.join(" \xB7 ").slice(0, 120)}` })
20343
20285
  ] }),
20344
- !open && query && /* @__PURE__ */ jsx29(Box22, { marginTop, children: /* @__PURE__ */ jsx29(Text24, { children: `/${query}${formatSearchMatchSummary(matches, total)} \xB7 [Esc] clear` }) })
20286
+ !open && query && /* @__PURE__ */ jsx27(Box23, { marginTop, children: /* @__PURE__ */ jsx27(Text24, { children: `/${query}${formatSearchMatchSummary(matches, total)} \xB7 [Esc] clear` }) })
20345
20287
  ] });
20346
20288
  }
20347
20289
 
@@ -21479,7 +21421,7 @@ function useScopeGate({ components, onConfirm, onQuit }) {
21479
21421
  }
21480
21422
 
21481
21423
  // packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/screen.tsx
21482
- import { Fragment as Fragment7, jsx as jsx30, jsxs as jsxs24 } from "react/jsx-runtime";
21424
+ import { Fragment as Fragment5, jsx as jsx28, jsxs as jsxs24 } from "react/jsx-runtime";
21483
21425
  var HELP_SECTIONS = [
21484
21426
  {
21485
21427
  title: "Navigation",
@@ -21519,29 +21461,29 @@ var HELP_SECTIONS = [
21519
21461
  ];
21520
21462
  function ScopeGateScreen(props) {
21521
21463
  if (props.components.length === 0) {
21522
- 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." }) });
21464
+ 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." }) });
21523
21465
  }
21524
- return /* @__PURE__ */ jsx30(ScopeGateView, { ...props });
21466
+ return /* @__PURE__ */ jsx28(ScopeGateView, { ...props });
21525
21467
  }
21526
21468
  function ScopeGateView({ components, onConfirm, onQuit }) {
21527
21469
  const gate = useScopeGate({ components, onConfirm, onQuit });
21528
21470
  const { search, graph, columnPlan, panelLayout, counters } = gate;
21529
21471
  if (gate.showHelp) {
21530
- return /* @__PURE__ */ jsx30(HelpOverlay, { sections: HELP_SECTIONS, handleInput: false, onClose: gate.closeHelp });
21472
+ return /* @__PURE__ */ jsx28(HelpOverlay, { sections: HELP_SECTIONS, handleInput: false, onClose: gate.closeHelp });
21531
21473
  }
21532
- return /* @__PURE__ */ jsxs24(Box23, { flexDirection: "column", children: [
21533
- /* @__PURE__ */ jsx30(StepHeader, { step: "scope-gate" }),
21534
- /* @__PURE__ */ jsxs24(Box23, { flexDirection: "column", paddingX: 2, children: [
21535
- /* @__PURE__ */ jsxs24(Box23, { flexDirection: "row", flexWrap: "wrap", children: [
21536
- /* @__PURE__ */ jsx30(CounterStrip, { counters, totalWidth: gate.totalWidth }),
21474
+ return /* @__PURE__ */ jsxs24(Box24, { flexDirection: "column", children: [
21475
+ /* @__PURE__ */ jsx28(StepHeader, { step: "scope-gate" }),
21476
+ /* @__PURE__ */ jsxs24(Box24, { flexDirection: "column", paddingX: 2, children: [
21477
+ /* @__PURE__ */ jsxs24(Box24, { flexDirection: "row", flexWrap: "wrap", children: [
21478
+ /* @__PURE__ */ jsx28(CounterStrip, { counters, totalWidth: gate.totalWidth }),
21537
21479
  gate.aiExcludedCount > 0 && /* @__PURE__ */ jsxs24(Text25, { color: PALETTE.muted, children: [
21538
21480
  `${gate.aiExcludedCount} component${gate.aiExcludedCount === 1 ? "" : "s"} flagged by AI`,
21539
- gate.aiRows.length > 0 && /* @__PURE__ */ jsx30(Text25, { color: PALETTE.accent, children: " \u2014 press [x] to see why" })
21481
+ gate.aiRows.length > 0 && /* @__PURE__ */ jsx28(Text25, { color: PALETTE.accent, children: " \u2014 press [x] to see why" })
21540
21482
  ] })
21541
21483
  ] }),
21542
- 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." }) }),
21543
- /* @__PURE__ */ jsxs24(Box23, { flexDirection: "row", alignItems: "stretch", children: [
21544
- gate.aiRationalePanelOpen ? /* @__PURE__ */ jsx30(
21484
+ 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." }) }),
21485
+ /* @__PURE__ */ jsxs24(Box24, { flexDirection: "row", alignItems: "stretch", children: [
21486
+ gate.aiRationalePanelOpen ? /* @__PURE__ */ jsx28(
21545
21487
  GotoBanner,
21546
21488
  {
21547
21489
  title: `Review flags (${gate.aiExcludedCount})`,
@@ -21551,7 +21493,7 @@ function ScopeGateView({ components, onConfirm, onQuit }) {
21551
21493
  width: columnPlan.main,
21552
21494
  footerHint: "[\u2191/\u2193] move \xB7 [Enter] jump \xB7 [x/Esc] close"
21553
21495
  }
21554
- ) : /* @__PURE__ */ jsx30(
21496
+ ) : /* @__PURE__ */ jsx28(
21555
21497
  GroupedSidebar,
21556
21498
  {
21557
21499
  items: gate.groupedItems,
@@ -21579,9 +21521,9 @@ function ScopeGateView({ components, onConfirm, onQuit }) {
21579
21521
  graph: graph.nodes
21580
21522
  }
21581
21523
  ),
21582
- columnPlan.layout === "two-column" && /* @__PURE__ */ jsxs24(Fragment7, { children: [
21583
- /* @__PURE__ */ jsx30(Box23, { width: 2, flexShrink: 0 }),
21584
- /* @__PURE__ */ jsx30(
21524
+ columnPlan.layout === "two-column" && /* @__PURE__ */ jsxs24(Fragment5, { children: [
21525
+ /* @__PURE__ */ jsx28(Box24, { width: 2, flexShrink: 0 }),
21526
+ /* @__PURE__ */ jsx28(
21585
21527
  AddedColumn,
21586
21528
  {
21587
21529
  width: columnPlan.added,
@@ -21596,9 +21538,9 @@ function ScopeGateView({ components, onConfirm, onQuit }) {
21596
21538
  )
21597
21539
  ] })
21598
21540
  ] }),
21599
- gate.cyclesPanelOpen && /* @__PURE__ */ jsx30(CyclesPanel, { cycles: gate.slotCycles, cursor: gate.cyclesCursor }),
21600
- gate.pendingRejectCascade && /* @__PURE__ */ jsx30(RejectPrompt, { pending: gate.pendingRejectCascade }),
21601
- /* @__PURE__ */ jsx30(
21541
+ gate.cyclesPanelOpen && /* @__PURE__ */ jsx28(CyclesPanel, { cycles: gate.slotCycles, cursor: gate.cyclesCursor }),
21542
+ gate.pendingRejectCascade && /* @__PURE__ */ jsx28(RejectPrompt, { pending: gate.pendingRejectCascade }),
21543
+ /* @__PURE__ */ jsx28(
21602
21544
  SearchMatchSummary,
21603
21545
  {
21604
21546
  open: search.searchOpen,
@@ -21609,7 +21551,7 @@ function ScopeGateView({ components, onConfirm, onQuit }) {
21609
21551
  marginTop: 1
21610
21552
  }
21611
21553
  ),
21612
- /* @__PURE__ */ jsx30(
21554
+ /* @__PURE__ */ jsx28(
21613
21555
  CompactControlBar,
21614
21556
  {
21615
21557
  hasGroupRoots: gate.hasGroupRoots,
@@ -21719,14 +21661,14 @@ function progressRows2(progress, agent) {
21719
21661
  }
21720
21662
 
21721
21663
  // packages/experience-design-system-cli/src/tui/import/steps/08-generation/screen.tsx
21722
- import { jsx as jsx31 } from "react/jsx-runtime";
21664
+ import { jsx as jsx29 } from "react/jsx-runtime";
21723
21665
  function GenerationScreen({
21724
21666
  progress,
21725
21667
  agent,
21726
21668
  acceptedCount,
21727
21669
  hasTokens
21728
21670
  }) {
21729
- return /* @__PURE__ */ jsx31(
21671
+ return /* @__PURE__ */ jsx29(
21730
21672
  RunningStep,
21731
21673
  {
21732
21674
  step: "generation",
@@ -21950,7 +21892,7 @@ function buildFlowStart(input) {
21950
21892
  }
21951
21893
 
21952
21894
  // packages/experience-design-system-cli/src/tui/import/steps/10-flow/flow/screen.tsx
21953
- import { Box as Box43 } from "ink";
21895
+ import { Box as Box44 } from "ink";
21954
21896
 
21955
21897
  // packages/experience-design-system-types/dist/src/cdf/validate.js
21956
21898
  import { Ajv as Ajv2 } from "ajv";
@@ -22270,7 +22212,7 @@ function skipLabel(matchedNames) {
22270
22212
  }
22271
22213
 
22272
22214
  // packages/experience-design-system-cli/src/tui/import/steps/preview-validation-error/screen.tsx
22273
- import { jsx as jsx32 } from "react/jsx-runtime";
22215
+ import { jsx as jsx30 } from "react/jsx-runtime";
22274
22216
  function PreviewValidationErrorScreen({
22275
22217
  errors,
22276
22218
  missingNames,
@@ -22279,7 +22221,7 @@ function PreviewValidationErrorScreen({
22279
22221
  onQuit
22280
22222
  }) {
22281
22223
  const matchedNames = matchedComponentNames(errors, missingNames);
22282
- return /* @__PURE__ */ jsx32(
22224
+ return /* @__PURE__ */ jsx30(
22283
22225
  GateStep,
22284
22226
  {
22285
22227
  intent: "error",
@@ -22315,7 +22257,7 @@ function getReviewJsonPanelValue(selected, showHiddenProps) {
22315
22257
  }
22316
22258
 
22317
22259
  // packages/experience-design-system-cli/src/tui/import/steps/09-review/generate-review-step.tsx
22318
- import { Box as Box36, Text as Text39 } from "ink";
22260
+ import { Box as Box37, Text as Text39 } from "ink";
22319
22261
 
22320
22262
  // packages/experience-design-system-cli/src/tui/import/steps/09-review/graph/cycle-view.ts
22321
22263
  function computeCycleView(components) {
@@ -22554,12 +22496,12 @@ function enumerateCycleBreaks(cycle, components) {
22554
22496
  }
22555
22497
 
22556
22498
  // packages/experience-design-system-cli/src/tui/import/steps/09-review/components/ReviewComponentPanel.tsx
22557
- import { Box as Box30, Text as Text33 } from "ink";
22499
+ import { Box as Box31, Text as Text33 } from "ink";
22558
22500
 
22559
22501
  // packages/experience-design-system-cli/src/tui/import/steps/09-review/components/FieldEditor.tsx
22560
22502
  import React12, { useEffect as useEffect11, useLayoutEffect as useLayoutEffect2, useState as useState18 } from "react";
22561
22503
  import figures6 from "figures";
22562
- import { Box as Box24, measureElement, Text as Text26 } from "ink";
22504
+ import { Box as Box25, measureElement, Text as Text26 } from "ink";
22563
22505
 
22564
22506
  // packages/experience-design-system-cli/src/tui/import/steps/09-review/scroll-offset.ts
22565
22507
  function computeNextScrollOffset(current, input, key, totalLines, panelHeight) {
@@ -22590,7 +22532,7 @@ function computeNextScrollOffset(current, input, key, totalLines, panelHeight) {
22590
22532
  }
22591
22533
 
22592
22534
  // packages/experience-design-system-cli/src/tui/import/steps/09-review/components/FieldEditor.tsx
22593
- import { Fragment as Fragment8, jsx as jsx33, jsxs as jsxs25 } from "react/jsx-runtime";
22535
+ import { Fragment as Fragment6, jsx as jsx31, jsxs as jsxs25 } from "react/jsx-runtime";
22594
22536
  function createCommonRowProps(selected, focusLevel, editingField, textCursor, valueCursor, cursorVisible, editingValue, valueText, width) {
22595
22537
  return {
22596
22538
  selected,
@@ -22728,14 +22670,14 @@ function serializeState(state2, originalJson) {
22728
22670
  return JSON.stringify(entry, null, 2);
22729
22671
  }
22730
22672
  function Picker({ value, active }) {
22731
- return /* @__PURE__ */ jsxs25(Box24, { children: [
22732
- active && /* @__PURE__ */ jsx33(Text26, { color: PALETTE.warning, children: "\u2039" }),
22733
- /* @__PURE__ */ jsx33(Text26, { color: active ? PALETTE.warning : void 0, bold: active, children: value }),
22734
- active && /* @__PURE__ */ jsx33(Text26, { color: PALETTE.warning, children: "\u203A" })
22673
+ return /* @__PURE__ */ jsxs25(Box25, { children: [
22674
+ active && /* @__PURE__ */ jsx31(Text26, { color: PALETTE.warning, children: "\u2039" }),
22675
+ /* @__PURE__ */ jsx31(Text26, { color: active ? PALETTE.warning : void 0, bold: active, children: value }),
22676
+ active && /* @__PURE__ */ jsx31(Text26, { color: PALETTE.warning, children: "\u203A" })
22735
22677
  ] });
22736
22678
  }
22737
22679
  function Toggle({ value, active }) {
22738
- return /* @__PURE__ */ jsx33(Box24, { children: /* @__PURE__ */ jsx33(Text26, { color: active ? PALETTE.warning : value ? PALETTE.success : PALETTE.border, children: value ? "[\u2713]" : "[ ]" }) });
22680
+ return /* @__PURE__ */ jsx31(Box25, { children: /* @__PURE__ */ jsx31(Text26, { color: active ? PALETTE.warning : value ? PALETTE.success : PALETTE.border, children: value ? "[\u2713]" : "[ ]" }) });
22739
22681
  }
22740
22682
  function InlinePropField({
22741
22683
  label,
@@ -22744,7 +22686,7 @@ function InlinePropField({
22744
22686
  flexible = false,
22745
22687
  width
22746
22688
  }) {
22747
- return /* @__PURE__ */ jsxs25(Box24, { width, gap: 1, flexShrink: flexible ? 1 : 0, flexGrow: flexible ? 1 : 0, flexWrap: "wrap", children: [
22689
+ return /* @__PURE__ */ jsxs25(Box25, { width, gap: 1, flexShrink: flexible ? 1 : 0, flexGrow: flexible ? 1 : 0, flexWrap: "wrap", children: [
22748
22690
  /* @__PURE__ */ jsxs25(Text26, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, wrap: "truncate-end", children: [
22749
22691
  focused ? "\u203A " : " ",
22750
22692
  label
@@ -22758,19 +22700,19 @@ function RequiredField({
22758
22700
  editingField,
22759
22701
  activeField
22760
22702
  }) {
22761
- return /* @__PURE__ */ jsx33(InlinePropField, { label: "req:", focused, children: /* @__PURE__ */ jsx33(Toggle, { value, active: editingField && activeField === "required" }) });
22703
+ return /* @__PURE__ */ jsx31(InlinePropField, { label: "req:", focused, children: /* @__PURE__ */ jsx31(Toggle, { value, active: editingField && activeField === "required" }) });
22762
22704
  }
22763
22705
  function DefaultValueRow({
22764
22706
  display,
22765
22707
  active,
22766
22708
  focused
22767
22709
  }) {
22768
- return /* @__PURE__ */ jsxs25(Box24, { gap: 1, flexWrap: "wrap", flexShrink: 0, children: [
22710
+ return /* @__PURE__ */ jsxs25(Box25, { gap: 1, flexWrap: "wrap", flexShrink: 0, children: [
22769
22711
  /* @__PURE__ */ jsxs25(Text26, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, children: [
22770
22712
  focused ? "\u203A " : " ",
22771
22713
  "default:"
22772
22714
  ] }),
22773
- active ? /* @__PURE__ */ jsx33(Picker, { value: display, active: true }) : /* @__PURE__ */ jsx33(Text26, { wrap: "wrap", children: display })
22715
+ active ? /* @__PURE__ */ jsx31(Picker, { value: display, active: true }) : /* @__PURE__ */ jsx31(Text26, { wrap: "wrap", children: display })
22774
22716
  ] });
22775
22717
  }
22776
22718
  function RowLabel({
@@ -22798,10 +22740,10 @@ function ValueInputRow({
22798
22740
  valueText,
22799
22741
  cursorVisible
22800
22742
  }) {
22801
- return /* @__PURE__ */ jsxs25(Box24, { paddingLeft: 2, children: [
22802
- /* @__PURE__ */ jsx33(Text26, { color: PALETTE.accent, children: mode === "edit" ? "\u270E " : "+ " }),
22803
- /* @__PURE__ */ jsx33(Text26, { children: valueText }),
22804
- /* @__PURE__ */ jsx33(Text26, { inverse: cursorVisible, children: " " })
22743
+ return /* @__PURE__ */ jsxs25(Box25, { paddingLeft: 2, children: [
22744
+ /* @__PURE__ */ jsx31(Text26, { color: PALETTE.accent, children: mode === "edit" ? "\u270E " : "+ " }),
22745
+ /* @__PURE__ */ jsx31(Text26, { children: valueText }),
22746
+ /* @__PURE__ */ jsx31(Text26, { inverse: cursorVisible, children: " " })
22805
22747
  ] });
22806
22748
  }
22807
22749
  function EditableListItem({
@@ -22814,9 +22756,9 @@ function EditableListItem({
22814
22756
  }) {
22815
22757
  const isBeingEdited = editingValue?.mode === "edit" && editingValue.index === index;
22816
22758
  if (isBeingEdited) {
22817
- return /* @__PURE__ */ jsx33(ValueInputRow, { mode: "edit", valueText, cursorVisible });
22759
+ return /* @__PURE__ */ jsx31(ValueInputRow, { mode: "edit", valueText, cursorVisible });
22818
22760
  }
22819
- return /* @__PURE__ */ jsx33(Box24, { gap: 1, paddingLeft: 2, children: /* @__PURE__ */ jsx33(Text26, { color: active ? PALETTE.accent : void 0, children: active ? `${figures6.pointer} ${value}` : ` ${value}` }) });
22761
+ return /* @__PURE__ */ jsx31(Box25, { gap: 1, paddingLeft: 2, children: /* @__PURE__ */ jsx31(Text26, { color: active ? PALETTE.accent : void 0, children: active ? `${figures6.pointer} ${value}` : ` ${value}` }) });
22820
22762
  }
22821
22763
  function EditableValueList({
22822
22764
  values,
@@ -22829,9 +22771,9 @@ function EditableValueList({
22829
22771
  emptyPaddingLeft,
22830
22772
  showAddInput
22831
22773
  }) {
22832
- return /* @__PURE__ */ jsxs25(Fragment8, { children: [
22833
- 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 }) })),
22834
- values.map((value, index) => /* @__PURE__ */ jsx33(
22774
+ return /* @__PURE__ */ jsxs25(Fragment6, { children: [
22775
+ 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 }) })),
22776
+ values.map((value, index) => /* @__PURE__ */ jsx31(
22835
22777
  EditableListItem,
22836
22778
  {
22837
22779
  value,
@@ -22843,7 +22785,7 @@ function EditableValueList({
22843
22785
  },
22844
22786
  index
22845
22787
  )),
22846
- showAddInput && editingValue?.mode === "add" && /* @__PURE__ */ jsx33(ValueInputRow, { mode: "add", valueText, cursorVisible })
22788
+ showAddInput && editingValue?.mode === "add" && /* @__PURE__ */ jsx31(ValueInputRow, { mode: "add", valueText, cursorVisible })
22847
22789
  ] });
22848
22790
  }
22849
22791
  function DefaultSubRow({
@@ -22855,51 +22797,51 @@ function DefaultSubRow({
22855
22797
  }) {
22856
22798
  const cursor = cursorVisible ? "\u2588" : " ";
22857
22799
  if (prop.type === "richtext" || prop.type === "media" || prop.type === "link") {
22858
- return /* @__PURE__ */ jsxs25(Box24, { gap: 1, flexShrink: 0, children: [
22800
+ return /* @__PURE__ */ jsxs25(Box25, { gap: 1, flexShrink: 0, children: [
22859
22801
  /* @__PURE__ */ jsxs25(Text26, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, children: [
22860
22802
  focused ? "\u203A " : " ",
22861
22803
  "default:"
22862
22804
  ] }),
22863
- /* @__PURE__ */ jsx33(Text26, { color: focused ? void 0 : PALETTE.muted, children: "(not applicable)" })
22805
+ /* @__PURE__ */ jsx31(Text26, { color: focused ? void 0 : PALETTE.muted, children: "(not applicable)" })
22864
22806
  ] });
22865
22807
  }
22866
22808
  if (prop.type === "boolean") {
22867
22809
  const display = prop.default === true ? "true" : prop.default === false ? "false" : "(unset)";
22868
- return /* @__PURE__ */ jsx33(DefaultValueRow, { display, active, focused });
22810
+ return /* @__PURE__ */ jsx31(DefaultValueRow, { display, active, focused });
22869
22811
  }
22870
22812
  if (prop.type === "enum") {
22871
22813
  if (prop.values.length === 0) {
22872
- return /* @__PURE__ */ jsxs25(Box24, { gap: 1, flexShrink: 0, children: [
22814
+ return /* @__PURE__ */ jsxs25(Box25, { gap: 1, flexShrink: 0, children: [
22873
22815
  /* @__PURE__ */ jsxs25(Text26, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, children: [
22874
22816
  focused ? "\u203A " : " ",
22875
22817
  "default:"
22876
22818
  ] }),
22877
- /* @__PURE__ */ jsx33(Text26, { color: focused ? void 0 : PALETTE.muted, children: "(no values defined)" })
22819
+ /* @__PURE__ */ jsx31(Text26, { color: focused ? void 0 : PALETTE.muted, children: "(no values defined)" })
22878
22820
  ] });
22879
22821
  }
22880
22822
  const display = typeof prop.default === "string" && prop.default !== "" ? prop.default : "(unset)";
22881
- return /* @__PURE__ */ jsx33(DefaultValueRow, { display, active, focused });
22823
+ return /* @__PURE__ */ jsx31(DefaultValueRow, { display, active, focused });
22882
22824
  }
22883
22825
  const value = typeof prop.default === "string" ? prop.default : "";
22884
22826
  if (active) {
22885
- return /* @__PURE__ */ jsxs25(Box24, { flexDirection: "row", flexShrink: 0, children: [
22827
+ return /* @__PURE__ */ jsxs25(Box25, { flexDirection: "row", flexShrink: 0, children: [
22886
22828
  /* @__PURE__ */ jsxs25(Text26, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, children: [
22887
22829
  focused ? "\u203A " : " ",
22888
22830
  "default:"
22889
22831
  ] }),
22890
- /* @__PURE__ */ jsxs25(Box24, { flexGrow: 1, borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
22891
- /* @__PURE__ */ jsx33(Text26, { children: value.slice(0, textCursor) }),
22892
- /* @__PURE__ */ jsx33(Text26, { inverse: cursorVisible, children: value[textCursor] ?? cursor }),
22893
- /* @__PURE__ */ jsx33(Text26, { children: value.slice(textCursor + 1) })
22832
+ /* @__PURE__ */ jsxs25(Box25, { flexGrow: 1, borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
22833
+ /* @__PURE__ */ jsx31(Text26, { children: value.slice(0, textCursor) }),
22834
+ /* @__PURE__ */ jsx31(Text26, { inverse: cursorVisible, children: value[textCursor] ?? cursor }),
22835
+ /* @__PURE__ */ jsx31(Text26, { children: value.slice(textCursor + 1) })
22894
22836
  ] })
22895
22837
  ] });
22896
22838
  }
22897
- return /* @__PURE__ */ jsxs25(Box24, { gap: 1, flexShrink: 0, children: [
22839
+ return /* @__PURE__ */ jsxs25(Box25, { gap: 1, flexShrink: 0, children: [
22898
22840
  /* @__PURE__ */ jsxs25(Text26, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, children: [
22899
22841
  focused ? "\u203A " : " ",
22900
22842
  "default:"
22901
22843
  ] }),
22902
- /* @__PURE__ */ jsx33(Text26, { color: focused || value ? void 0 : PALETTE.muted, children: value || "(none)" })
22844
+ /* @__PURE__ */ jsx31(Text26, { color: focused || value ? void 0 : PALETTE.muted, children: value || "(none)" })
22903
22845
  ] });
22904
22846
  }
22905
22847
  function DescriptionField({
@@ -22914,20 +22856,20 @@ function DescriptionField({
22914
22856
  paddingLeft = 2
22915
22857
  }) {
22916
22858
  if (compact) {
22917
- return /* @__PURE__ */ jsxs25(Box24, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: [
22859
+ return /* @__PURE__ */ jsxs25(Box25, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: [
22918
22860
  /* @__PURE__ */ jsxs25(Text26, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, children: [
22919
22861
  focused ? "\u203A " : " ",
22920
22862
  label
22921
22863
  ] }),
22922
- /* @__PURE__ */ jsx33(Text26, { wrap: "truncate-end", color: value ? void 0 : PALETTE.muted, children: value || "\u2014" })
22864
+ /* @__PURE__ */ jsx31(Text26, { wrap: "truncate-end", color: value ? void 0 : PALETTE.muted, children: value || "\u2014" })
22923
22865
  ] });
22924
22866
  }
22925
- return /* @__PURE__ */ jsxs25(Box24, { paddingLeft, flexDirection: "column", width, flexShrink: 0, children: [
22867
+ return /* @__PURE__ */ jsxs25(Box25, { paddingLeft, flexDirection: "column", width, flexShrink: 0, children: [
22926
22868
  /* @__PURE__ */ jsxs25(Text26, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, children: [
22927
22869
  focused ? "\u203A " : " ",
22928
22870
  label
22929
22871
  ] }),
22930
- editing ? /* @__PURE__ */ jsx33(EditableDescription, { cursorVisible, value, textCursor }) : /* @__PURE__ */ jsx33(Text26, { wrap: "wrap", children: value || "\u2014" })
22872
+ editing ? /* @__PURE__ */ jsx31(EditableDescription, { cursorVisible, value, textCursor }) : /* @__PURE__ */ jsx31(Text26, { wrap: "wrap", children: value || "\u2014" })
22931
22873
  ] });
22932
22874
  }
22933
22875
  function EditableDescription({
@@ -22937,7 +22879,7 @@ function EditableDescription({
22937
22879
  }) {
22938
22880
  return /* @__PURE__ */ jsxs25(Text26, { wrap: "wrap", children: [
22939
22881
  value.slice(0, textCursor),
22940
- /* @__PURE__ */ jsx33(Text26, { inverse: cursorVisible, children: value[textCursor] ?? " " }),
22882
+ /* @__PURE__ */ jsx31(Text26, { inverse: cursorVisible, children: value[textCursor] ?? " " }),
22941
22883
  value.slice(textCursor + 1)
22942
22884
  ] });
22943
22885
  }
@@ -22958,9 +22900,9 @@ function PropRow({
22958
22900
  }) {
22959
22901
  const descFocused = activeField === "description";
22960
22902
  const descActive = editingField && descFocused;
22961
- return /* @__PURE__ */ jsxs25(Box24, { flexDirection: "column", width, flexShrink: 0, children: [
22962
- /* @__PURE__ */ jsx33(Box24, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: /* @__PURE__ */ jsx33(RowLabel, { name: prop.name, selected }) }),
22963
- /* @__PURE__ */ jsx33(
22903
+ return /* @__PURE__ */ jsxs25(Box25, { flexDirection: "column", width, flexShrink: 0, children: [
22904
+ /* @__PURE__ */ jsx31(Box25, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: /* @__PURE__ */ jsx31(RowLabel, { name: prop.name, selected }) }),
22905
+ /* @__PURE__ */ jsx31(
22964
22906
  DescriptionField,
22965
22907
  {
22966
22908
  value: prop.description,
@@ -22973,8 +22915,8 @@ function PropRow({
22973
22915
  paddingLeft: 0
22974
22916
  }
22975
22917
  ),
22976
- /* @__PURE__ */ jsxs25(Box24, { flexDirection: "column", width, flexShrink: 0, children: [
22977
- /* @__PURE__ */ jsx33(
22918
+ /* @__PURE__ */ jsxs25(Box25, { flexDirection: "column", width, flexShrink: 0, children: [
22919
+ /* @__PURE__ */ jsx31(
22978
22920
  RequiredField,
22979
22921
  {
22980
22922
  value: prop.required,
@@ -22983,10 +22925,10 @@ function PropRow({
22983
22925
  activeField
22984
22926
  }
22985
22927
  ),
22986
- /* @__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 }) })
22928
+ /* @__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 }) })
22987
22929
  ] }),
22988
- 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" }) }),
22989
- prop.type === "enum" && /* @__PURE__ */ jsxs25(Box24, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: [
22930
+ 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" }) }),
22931
+ prop.type === "enum" && /* @__PURE__ */ jsxs25(Box25, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: [
22990
22932
  /* @__PURE__ */ jsxs25(Text26, { color: activeField === "values" ? PALETTE.warning : PALETTE.muted, bold: activeField === "values", children: [
22991
22933
  activeField === "values" ? "\u203A " : " ",
22992
22934
  "values:"
@@ -22997,7 +22939,7 @@ function PropRow({
22997
22939
  "]"
22998
22940
  ] })
22999
22941
  ] }),
23000
- /* @__PURE__ */ jsx33(
22942
+ /* @__PURE__ */ jsx31(
23001
22943
  DefaultSubRow,
23002
22944
  {
23003
22945
  prop,
@@ -23007,12 +22949,12 @@ function PropRow({
23007
22949
  cursorVisible
23008
22950
  }
23009
22951
  ),
23010
- prop.type === "token" && prop.category === "design" && /* @__PURE__ */ jsxs25(Box24, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: [
22952
+ prop.type === "token" && prop.category === "design" && /* @__PURE__ */ jsxs25(Box25, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: [
23011
22953
  /* @__PURE__ */ jsxs25(Text26, { color: activeField === "allowed" ? PALETTE.warning : PALETTE.muted, bold: activeField === "allowed", children: [
23012
22954
  activeField === "allowed" ? "\u203A " : " ",
23013
22955
  "allowed:"
23014
22956
  ] }),
23015
- 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(
22957
+ 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(
23016
22958
  Text26,
23017
22959
  {
23018
22960
  color: activeField !== "allowed" && prop.allowed.length === 0 ? PALETTE.muted : void 0,
@@ -23021,17 +22963,17 @@ function PropRow({
23021
22963
  }
23022
22964
  )
23023
22965
  ] }),
23024
- selected && showRationale && rationale && rationale.trim().length > 0 && /* @__PURE__ */ jsx33(Box24, { paddingLeft: 2, children: /* @__PURE__ */ jsx33(Text26, { color: PALETTE.muted, children: (() => {
22966
+ selected && showRationale && rationale && rationale.trim().length > 0 && /* @__PURE__ */ jsx31(Box25, { paddingLeft: 2, children: /* @__PURE__ */ jsx31(Text26, { color: PALETTE.muted, children: (() => {
23025
22967
  const max = Math.max(8, width - 8);
23026
22968
  const text = `~ ${rationale}`;
23027
22969
  return text.length > max ? text.slice(0, max - 1) + "\u2026" : text;
23028
22970
  })() }) }, rowKey ? `rationale-${rowKey}` : void 0),
23029
- selected && prop.type === "enum" && activeField === "values" && /* @__PURE__ */ jsxs25(Box24, { paddingLeft: 2, flexDirection: "column", children: [
23030
- /* @__PURE__ */ jsxs25(Box24, { children: [
23031
- /* @__PURE__ */ jsx33(Text26, { color: PALETTE.muted, children: "values:" }),
23032
- activeField === "values" && /* @__PURE__ */ jsx33(Text26, { children: " [a] add [e] edit [r] remove [\u2191\u2193] navigate [K/J] reorder" })
22971
+ selected && prop.type === "enum" && activeField === "values" && /* @__PURE__ */ jsxs25(Box25, { paddingLeft: 2, flexDirection: "column", children: [
22972
+ /* @__PURE__ */ jsxs25(Box25, { children: [
22973
+ /* @__PURE__ */ jsx31(Text26, { color: PALETTE.muted, children: "values:" }),
22974
+ activeField === "values" && /* @__PURE__ */ jsx31(Text26, { children: " [a] add [e] edit [r] remove [\u2191\u2193] navigate [K/J] reorder" })
23033
22975
  ] }),
23034
- /* @__PURE__ */ jsx33(
22976
+ /* @__PURE__ */ jsx31(
23035
22977
  EditableValueList,
23036
22978
  {
23037
22979
  values: prop.values,
@@ -23061,9 +23003,9 @@ function SlotRow({
23061
23003
  pickerCandidates,
23062
23004
  pickerCursor
23063
23005
  }) {
23064
- return /* @__PURE__ */ jsxs25(Box24, { flexDirection: "column", width, flexShrink: 0, children: [
23065
- /* @__PURE__ */ jsx33(Box24, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: /* @__PURE__ */ jsx33(RowLabel, { name: slot.name, selected, trailing: false }) }),
23066
- /* @__PURE__ */ jsx33(
23006
+ return /* @__PURE__ */ jsxs25(Box25, { flexDirection: "column", width, flexShrink: 0, children: [
23007
+ /* @__PURE__ */ jsx31(Box25, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: /* @__PURE__ */ jsx31(RowLabel, { name: slot.name, selected, trailing: false }) }),
23008
+ /* @__PURE__ */ jsx31(
23067
23009
  DescriptionField,
23068
23010
  {
23069
23011
  value: slot.description,
@@ -23076,7 +23018,7 @@ function SlotRow({
23076
23018
  paddingLeft: 0
23077
23019
  }
23078
23020
  ),
23079
- /* @__PURE__ */ jsx33(Box24, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: /* @__PURE__ */ jsx33(
23021
+ /* @__PURE__ */ jsx31(Box25, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: /* @__PURE__ */ jsx31(
23080
23022
  RequiredField,
23081
23023
  {
23082
23024
  value: slot.required,
@@ -23085,7 +23027,7 @@ function SlotRow({
23085
23027
  activeField
23086
23028
  }
23087
23029
  ) }),
23088
- !(selected && editingField && activeField === "allowedComponents") && /* @__PURE__ */ jsxs25(Box24, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: [
23030
+ !(selected && editingField && activeField === "allowedComponents") && /* @__PURE__ */ jsxs25(Box25, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: [
23089
23031
  /* @__PURE__ */ jsxs25(
23090
23032
  Text26,
23091
23033
  {
@@ -23097,10 +23039,10 @@ function SlotRow({
23097
23039
  ]
23098
23040
  }
23099
23041
  ),
23100
- slot.allowedComponents.length === 0 ? /* @__PURE__ */ jsx33(Text26, { color: PALETTE.muted, children: "(any)" }) : /* @__PURE__ */ jsx33(Text26, { wrap: "wrap", children: slot.allowedComponents.join(", ") })
23042
+ slot.allowedComponents.length === 0 ? /* @__PURE__ */ jsx31(Text26, { color: PALETTE.muted, children: "(any)" }) : /* @__PURE__ */ jsx31(Text26, { wrap: "wrap", children: slot.allowedComponents.join(", ") })
23101
23043
  ] }),
23102
- selected && editingField && activeField === "allowedComponents" && /* @__PURE__ */ jsxs25(Box24, { flexDirection: "column", children: [
23103
- /* @__PURE__ */ jsxs25(Box24, { children: [
23044
+ selected && editingField && activeField === "allowedComponents" && /* @__PURE__ */ jsxs25(Box25, { flexDirection: "column", children: [
23045
+ /* @__PURE__ */ jsxs25(Box25, { children: [
23104
23046
  /* @__PURE__ */ jsxs25(
23105
23047
  Text26,
23106
23048
  {
@@ -23112,9 +23054,9 @@ function SlotRow({
23112
23054
  ]
23113
23055
  }
23114
23056
  ),
23115
- 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" })
23057
+ 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" })
23116
23058
  ] }),
23117
- /* @__PURE__ */ jsx33(
23059
+ /* @__PURE__ */ jsx31(
23118
23060
  EditableValueList,
23119
23061
  {
23120
23062
  values: slot.allowedComponents,
@@ -23128,21 +23070,21 @@ function SlotRow({
23128
23070
  showAddInput: editingField && activeField === "allowedComponents"
23129
23071
  }
23130
23072
  ),
23131
- 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)" }) : (() => {
23073
+ 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)" }) : (() => {
23132
23074
  const filtered = valueText.length === 0 ? pickerCandidates : pickerCandidates.filter((n) => n.toLowerCase().includes(valueText.toLowerCase()));
23133
23075
  if (filtered.length === 0) {
23134
- return /* @__PURE__ */ jsx33(Text26, { color: PALETTE.muted, children: "(no candidates match \u2014 Enter to add as free text)" });
23076
+ return /* @__PURE__ */ jsx31(Text26, { color: PALETTE.muted, children: "(no candidates match \u2014 Enter to add as free text)" });
23135
23077
  }
23136
23078
  const cursor = pickerCursor % filtered.length;
23137
23079
  const MAX_VISIBLE = 5;
23138
23080
  const start = Math.max(0, Math.min(filtered.length - MAX_VISIBLE, cursor - 2));
23139
23081
  const slice = filtered.slice(start, start + MAX_VISIBLE);
23140
- return /* @__PURE__ */ jsxs25(Box24, { flexDirection: "column", children: [
23141
- /* @__PURE__ */ jsx33(Text26, { color: PALETTE.muted, children: " candidates (\u2191\u2193 cycle, Enter to add):" }),
23082
+ return /* @__PURE__ */ jsxs25(Box25, { flexDirection: "column", children: [
23083
+ /* @__PURE__ */ jsx31(Text26, { color: PALETTE.muted, children: " candidates (\u2191\u2193 cycle, Enter to add):" }),
23142
23084
  slice.map((name, i) => {
23143
23085
  const absIdx = start + i;
23144
23086
  const isCursor = absIdx === cursor;
23145
- return /* @__PURE__ */ jsx33(Text26, { color: isCursor ? PALETTE.accent : PALETTE.muted, children: isCursor ? ` ${figures6.pointer} ${name}` : ` ${name}` }, name);
23087
+ return /* @__PURE__ */ jsx31(Text26, { color: isCursor ? PALETTE.accent : PALETTE.muted, children: isCursor ? ` ${figures6.pointer} ${name}` : ` ${name}` }, name);
23146
23088
  })
23147
23089
  ] });
23148
23090
  })() })
@@ -23971,18 +23913,18 @@ function FieldEditor({
23971
23913
  });
23972
23914
  const innerWidth = Math.max(1, width - 2);
23973
23915
  if (parseErr) {
23974
- return /* @__PURE__ */ jsxs25(Box24, { flexDirection: "column", width, borderStyle: "single", borderColor: PALETTE.error, children: [
23975
- /* @__PURE__ */ jsx33(Text26, { bold: true, color: PALETTE.error, children: "FIELD EDITOR \u2014 parse error" }),
23976
- /* @__PURE__ */ jsx33(Text26, { color: PALETTE.error, children: parseErr }),
23977
- /* @__PURE__ */ jsx33(Text26, { color: PALETTE.muted, children: "Cannot display structured editor. Fix the JSON first." })
23916
+ return /* @__PURE__ */ jsxs25(Box25, { flexDirection: "column", width, borderStyle: "single", borderColor: PALETTE.error, children: [
23917
+ /* @__PURE__ */ jsx31(Text26, { bold: true, color: PALETTE.error, children: "FIELD EDITOR \u2014 parse error" }),
23918
+ /* @__PURE__ */ jsx31(Text26, { color: PALETTE.error, children: parseErr }),
23919
+ /* @__PURE__ */ jsx31(Text26, { color: PALETTE.muted, children: "Cannot display structured editor. Fix the JSON first." })
23978
23920
  ] });
23979
23921
  }
23980
23922
  if (props.length === 0 && slots.length === 0) {
23981
- return /* @__PURE__ */ jsxs25(Box24, { flexDirection: "column", width, borderStyle: "single", borderColor: PALETTE.warning, children: [
23982
- /* @__PURE__ */ jsx33(Text26, { bold: true, color: PALETTE.warning, children: "FIELD EDITOR \u2014 no fields" }),
23983
- /* @__PURE__ */ jsx33(Text26, { color: PALETTE.warning, children: "\u26A0 No properties classified for this component. The LLM didn't find anything to classify." }),
23984
- /* @__PURE__ */ jsx33(Text26, { color: PALETTE.muted, children: "You can add fields manually below or reject this component." }),
23985
- /* @__PURE__ */ jsx33(Text26, { color: PALETTE.muted, children: "Enter to save \xB7 Esc to discard" })
23923
+ return /* @__PURE__ */ jsxs25(Box25, { flexDirection: "column", width, borderStyle: "single", borderColor: PALETTE.warning, children: [
23924
+ /* @__PURE__ */ jsx31(Text26, { bold: true, color: PALETTE.warning, children: "FIELD EDITOR \u2014 no fields" }),
23925
+ /* @__PURE__ */ jsx31(Text26, { color: PALETTE.warning, children: "\u26A0 No properties classified for this component. The LLM didn't find anything to classify." }),
23926
+ /* @__PURE__ */ jsx31(Text26, { color: PALETTE.muted, children: "You can add fields manually below or reject this component." }),
23927
+ /* @__PURE__ */ jsx31(Text26, { color: PALETTE.muted, children: "Enter to save \xB7 Esc to discard" })
23986
23928
  ] });
23987
23929
  }
23988
23930
  const hasEmptyProperties = props.length === 0 && slots.length === 0;
@@ -24111,12 +24053,12 @@ function FieldEditor({
24111
24053
  const renderRow = (row, index) => {
24112
24054
  const key = rowKey(row, index);
24113
24055
  if (row.kind === "header") {
24114
- return /* @__PURE__ */ jsx33(Box24, { flexDirection: "column", paddingTop: 1, children: /* @__PURE__ */ jsx33(Text26, { bold: true, color: PALETTE.success, children: row.label }) }, key);
24056
+ return /* @__PURE__ */ jsx31(Box25, { flexDirection: "column", paddingTop: 1, children: /* @__PURE__ */ jsx31(Text26, { bold: true, color: PALETTE.success, children: row.label }) }, key);
24115
24057
  }
24116
24058
  if (row.kind === "component-description") {
24117
24059
  const isSelected2 = inComponentDesc && active;
24118
24060
  const isEditing = isSelected2 && focusLevel === "field" && editingField && activeField === "description";
24119
- return /* @__PURE__ */ jsx33(
24061
+ return /* @__PURE__ */ jsx31(
24120
24062
  DescriptionField,
24121
24063
  {
24122
24064
  value: editorState.componentDescription,
@@ -24147,7 +24089,7 @@ function FieldEditor({
24147
24089
  valueText,
24148
24090
  innerWidth
24149
24091
  );
24150
- return /* @__PURE__ */ jsx33(
24092
+ return /* @__PURE__ */ jsx31(
24151
24093
  PropRow,
24152
24094
  {
24153
24095
  prop: p,
@@ -24174,7 +24116,7 @@ function FieldEditor({
24174
24116
  valueText,
24175
24117
  innerWidth
24176
24118
  );
24177
- return /* @__PURE__ */ jsx33(
24119
+ return /* @__PURE__ */ jsx31(
24178
24120
  SlotRow,
24179
24121
  {
24180
24122
  slot: s,
@@ -24195,9 +24137,9 @@ function FieldEditor({
24195
24137
  borderStyle: "single",
24196
24138
  borderColor: hasEmptyProperties ? PALETTE.warning : active ? PALETTE.accent : PALETTE.border,
24197
24139
  children: [
24198
- 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." }),
24140
+ 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." }),
24199
24141
  header,
24200
- /* @__PURE__ */ jsx33(Box24, { flexDirection: "column", width: innerWidth, flexShrink: 0, children: focusLevel === "field" && !inComponentDesc && currentProp ? /* @__PURE__ */ jsx33(
24142
+ /* @__PURE__ */ jsx31(Box25, { flexDirection: "column", width: innerWidth, flexShrink: 0, children: focusLevel === "field" && !inComponentDesc && currentProp ? /* @__PURE__ */ jsx31(
24201
24143
  PropRow,
24202
24144
  {
24203
24145
  prop: currentProp,
@@ -24213,7 +24155,7 @@ function FieldEditor({
24213
24155
  rationale: metadata?.props?.[currentProp.name]?.rationale ?? null,
24214
24156
  showRationale: showInlineRationales
24215
24157
  }
24216
- ) : focusLevel === "field" && inSlots && currentSlot ? /* @__PURE__ */ jsx33(
24158
+ ) : focusLevel === "field" && inSlots && currentSlot ? /* @__PURE__ */ jsx31(
24217
24159
  SlotRow,
24218
24160
  {
24219
24161
  slot: currentSlot,
@@ -24232,8 +24174,8 @@ function FieldEditor({
24232
24174
  ) : visibleRowSlice.map((row, index) => {
24233
24175
  const absoluteIndex = scrollStart + index;
24234
24176
  const key = rowKey(row, absoluteIndex);
24235
- return /* @__PURE__ */ jsx33(
24236
- Box24,
24177
+ return /* @__PURE__ */ jsx31(
24178
+ Box25,
24237
24179
  {
24238
24180
  ref: (node) => {
24239
24181
  if (node) rowMeasureRefs.current.set(key, node);
@@ -24246,7 +24188,7 @@ function FieldEditor({
24246
24188
  `visible-${key}`
24247
24189
  );
24248
24190
  }) }),
24249
- categoryBelow && /* @__PURE__ */ jsx33(Text26, { color: PALETTE.success, bold: true, children: `(${categoryBelow} below)` }),
24191
+ categoryBelow && /* @__PURE__ */ jsx31(Text26, { color: PALETTE.success, bold: true, children: `(${categoryBelow} below)` }),
24250
24192
  sourceOpen && !onToggleSourceExternal && (() => {
24251
24193
  const propMeta = !inSlots && !inComponentDesc && currentProp ? metadata?.props?.[currentProp.name] : void 0;
24252
24194
  const start = propMeta?.sourceStartLine ?? null;
@@ -24255,49 +24197,49 @@ function FieldEditor({
24255
24197
  const src = metadata?.componentSource ?? null;
24256
24198
  const headerPath = path5 ?? "<unknown source path>";
24257
24199
  if (!start || !end2 || !src) {
24258
- return /* @__PURE__ */ jsxs25(Box24, { flexDirection: "column", borderStyle: "single", borderColor: "gray", paddingX: 1, children: [
24259
- /* @__PURE__ */ jsx33(Text26, { color: PALETTE.muted, bold: true, children: `source: ${headerPath}` }),
24260
- /* @__PURE__ */ jsx33(Text26, { color: PALETTE.muted, children: "(no source location captured for this prop)" }),
24261
- /* @__PURE__ */ jsx33(Text26, { children: "[s] close" })
24200
+ return /* @__PURE__ */ jsxs25(Box25, { flexDirection: "column", borderStyle: "single", borderColor: "gray", paddingX: 1, children: [
24201
+ /* @__PURE__ */ jsx31(Text26, { color: PALETTE.muted, bold: true, children: `source: ${headerPath}` }),
24202
+ /* @__PURE__ */ jsx31(Text26, { color: PALETTE.muted, children: "(no source location captured for this prop)" }),
24203
+ /* @__PURE__ */ jsx31(Text26, { children: "[s] close" })
24262
24204
  ] });
24263
24205
  }
24264
24206
  const lines = src.split("\n").slice(Math.max(0, start - 1), end2);
24265
- return /* @__PURE__ */ jsxs25(Box24, { flexDirection: "column", borderStyle: "single", borderColor: "gray", paddingX: 1, children: [
24266
- /* @__PURE__ */ jsx33(Text26, { color: PALETTE.muted, bold: true, children: `${headerPath}: lines ${start}\u2013${end2}` }),
24267
- lines.map((ln, i) => /* @__PURE__ */ jsx33(Text26, { color: PALETTE.muted, children: ln }, `source-line-${i}`)),
24268
- /* @__PURE__ */ jsx33(Text26, { children: "[s] close \xB7 [Esc] close" })
24207
+ return /* @__PURE__ */ jsxs25(Box25, { flexDirection: "column", borderStyle: "single", borderColor: "gray", paddingX: 1, children: [
24208
+ /* @__PURE__ */ jsx31(Text26, { color: PALETTE.muted, bold: true, children: `${headerPath}: lines ${start}\u2013${end2}` }),
24209
+ lines.map((ln, i) => /* @__PURE__ */ jsx31(Text26, { color: PALETTE.muted, children: ln }, `source-line-${i}`)),
24210
+ /* @__PURE__ */ jsx31(Text26, { children: "[s] close \xB7 [Esc] close" })
24269
24211
  ] });
24270
24212
  })(),
24271
- showHelp && /* @__PURE__ */ jsxs25(Box24, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.accent, paddingX: 1, children: [
24272
- /* @__PURE__ */ jsx33(Text26, { bold: true, color: PALETTE.accent, children: "Keybindings" }),
24273
- /* @__PURE__ */ jsx33(Text26, { children: " " }),
24274
- /* @__PURE__ */ jsx33(Text26, { bold: true, children: "Row navigation" }),
24275
- /* @__PURE__ */ jsx33(Text26, { children: " \u2191/\u2193 move between rows" }),
24276
- /* @__PURE__ */ jsx33(Text26, { children: " Enter edit fields on the current row" }),
24277
- /* @__PURE__ */ jsx33(Text26, { children: " Esc exit the panel" }),
24278
- /* @__PURE__ */ jsx33(Text26, { children: " " }),
24279
- /* @__PURE__ */ jsx33(Text26, { bold: true, children: "Field editing" }),
24280
- /* @__PURE__ */ jsx33(Text26, { children: " \u2191/\u2193/\u2190\u2192 cycle through fields" }),
24281
- /* @__PURE__ */ jsx33(Text26, { children: " \u2190/\u2192 cycle picker values \xB7 move cursor in text inputs" }),
24282
- /* @__PURE__ */ jsx33(Text26, { children: " Space/Enter toggle required" }),
24283
- /* @__PURE__ */ jsx33(Text26, { children: " Type edit description / string default" }),
24284
- /* @__PURE__ */ jsx33(Text26, { children: " Esc exit field-edit back to the row" }),
24285
- /* @__PURE__ */ jsx33(Text26, { children: " " }),
24286
- /* @__PURE__ */ jsx33(Text26, { bold: true, children: "Values / allowedComponents" }),
24287
- /* @__PURE__ */ jsx33(Text26, { children: " a / e / r add \xB7 edit \xB7 remove" }),
24288
- /* @__PURE__ */ jsx33(Text26, { children: " \u2191\u2193 navigate the list" }),
24289
- /* @__PURE__ */ jsx33(Text26, { children: " K / J reorder up \xB7 down" }),
24290
- /* @__PURE__ */ jsx33(Text26, { children: " " }),
24291
- /* @__PURE__ */ jsx33(Text26, { bold: true, children: "Panels" }),
24292
- /* @__PURE__ */ jsx33(Text26, { children: " s toggle source-view for the current prop" }),
24293
- /* @__PURE__ */ jsx33(Text26, { children: " " + propRationaleKey.padEnd(16) + " toggle prop rationale panel" }),
24294
- /* @__PURE__ */ jsx33(Text26, { children: " " + componentRationaleKey.padEnd(16) + " toggle component rationale panel" }),
24295
- /* @__PURE__ */ jsx33(Text26, { children: " ? toggle this overlay" }),
24296
- /* @__PURE__ */ jsx33(Text26, { children: " " }),
24297
- /* @__PURE__ */ jsx33(Text26, { color: PALETTE.muted, children: "press ? or Esc to close" })
24213
+ showHelp && /* @__PURE__ */ jsxs25(Box25, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.accent, paddingX: 1, children: [
24214
+ /* @__PURE__ */ jsx31(Text26, { bold: true, color: PALETTE.accent, children: "Keybindings" }),
24215
+ /* @__PURE__ */ jsx31(Text26, { children: " " }),
24216
+ /* @__PURE__ */ jsx31(Text26, { bold: true, children: "Row navigation" }),
24217
+ /* @__PURE__ */ jsx31(Text26, { children: " \u2191/\u2193 move between rows" }),
24218
+ /* @__PURE__ */ jsx31(Text26, { children: " Enter edit fields on the current row" }),
24219
+ /* @__PURE__ */ jsx31(Text26, { children: " Esc exit the panel" }),
24220
+ /* @__PURE__ */ jsx31(Text26, { children: " " }),
24221
+ /* @__PURE__ */ jsx31(Text26, { bold: true, children: "Field editing" }),
24222
+ /* @__PURE__ */ jsx31(Text26, { children: " \u2191/\u2193/\u2190\u2192 cycle through fields" }),
24223
+ /* @__PURE__ */ jsx31(Text26, { children: " \u2190/\u2192 cycle picker values \xB7 move cursor in text inputs" }),
24224
+ /* @__PURE__ */ jsx31(Text26, { children: " Space/Enter toggle required" }),
24225
+ /* @__PURE__ */ jsx31(Text26, { children: " Type edit description / string default" }),
24226
+ /* @__PURE__ */ jsx31(Text26, { children: " Esc exit field-edit back to the row" }),
24227
+ /* @__PURE__ */ jsx31(Text26, { children: " " }),
24228
+ /* @__PURE__ */ jsx31(Text26, { bold: true, children: "Values / allowedComponents" }),
24229
+ /* @__PURE__ */ jsx31(Text26, { children: " a / e / r add \xB7 edit \xB7 remove" }),
24230
+ /* @__PURE__ */ jsx31(Text26, { children: " \u2191\u2193 navigate the list" }),
24231
+ /* @__PURE__ */ jsx31(Text26, { children: " K / J reorder up \xB7 down" }),
24232
+ /* @__PURE__ */ jsx31(Text26, { children: " " }),
24233
+ /* @__PURE__ */ jsx31(Text26, { bold: true, children: "Panels" }),
24234
+ /* @__PURE__ */ jsx31(Text26, { children: " s toggle source-view for the current prop" }),
24235
+ /* @__PURE__ */ jsx31(Text26, { children: " " + propRationaleKey.padEnd(16) + " toggle prop rationale panel" }),
24236
+ /* @__PURE__ */ jsx31(Text26, { children: " " + componentRationaleKey.padEnd(16) + " toggle component rationale panel" }),
24237
+ /* @__PURE__ */ jsx31(Text26, { children: " ? toggle this overlay" }),
24238
+ /* @__PURE__ */ jsx31(Text26, { children: " " }),
24239
+ /* @__PURE__ */ jsx31(Text26, { color: PALETTE.muted, children: "press ? or Esc to close" })
24298
24240
  ] }),
24299
- validationError && /* @__PURE__ */ jsx33(Text26, { color: PALETTE.error, children: "\u2717 " + validationError }),
24300
- /* @__PURE__ */ jsx33(Box24, { paddingTop: 1, children: /* @__PURE__ */ jsx33(Text26, { color: PALETTE.muted, children: modeLabel }) })
24241
+ validationError && /* @__PURE__ */ jsx31(Text26, { color: PALETTE.error, children: "\u2717 " + validationError }),
24242
+ /* @__PURE__ */ jsx31(Box25, { paddingTop: 1, children: /* @__PURE__ */ jsx31(Text26, { color: PALETTE.muted, children: modeLabel }) })
24301
24243
  ]
24302
24244
  }
24303
24245
  );
@@ -24307,7 +24249,7 @@ function FieldEditor({
24307
24249
  import { Text as Text32 } from "ink";
24308
24250
 
24309
24251
  // packages/experience-design-system-cli/src/tui/import/steps/09-review/components/ComponentRationalePanel.tsx
24310
- import { Box as Box26, Text as Text28 } from "ink";
24252
+ import { Box as Box27, Text as Text28 } from "ink";
24311
24253
 
24312
24254
  // packages/experience-design-system-cli/src/tui/import/steps/09-review/components/wrap-text.ts
24313
24255
  function appendLongWordChunks(word, width, lines) {
@@ -24342,27 +24284,27 @@ function wrapText(text, innerWidth) {
24342
24284
  }
24343
24285
 
24344
24286
  // packages/experience-design-system-cli/src/tui/import/steps/09-review/components/RationaleLine.tsx
24345
- import { Box as Box25, Text as Text27 } from "ink";
24346
- import { jsx as jsx34, jsxs as jsxs26 } from "react/jsx-runtime";
24287
+ import { Box as Box26, Text as Text27 } from "ink";
24288
+ import { jsx as jsx32, jsxs as jsxs26 } from "react/jsx-runtime";
24347
24289
  function RationaleLine({ line, active }) {
24348
24290
  if (line.kind === "blank") {
24349
- return /* @__PURE__ */ jsx34(Box25, { children: /* @__PURE__ */ jsx34(Text27, { children: " " }) });
24291
+ return /* @__PURE__ */ jsx32(Box26, { children: /* @__PURE__ */ jsx32(Text27, { children: " " }) });
24350
24292
  }
24351
24293
  if (line.kind === "heading") {
24352
- return /* @__PURE__ */ jsx34(Box25, { children: /* @__PURE__ */ jsx34(Text27, { bold: true, color: active ? PALETTE.accent : PALETTE.muted, children: line.text }) });
24294
+ return /* @__PURE__ */ jsx32(Box26, { children: /* @__PURE__ */ jsx32(Text27, { bold: true, color: active ? PALETTE.accent : PALETTE.muted, children: line.text }) });
24353
24295
  }
24354
24296
  if (line.kind === "label") {
24355
- return /* @__PURE__ */ jsxs26(Box25, { children: [
24356
- line.prefix && /* @__PURE__ */ jsx34(Text27, { children: line.prefix }),
24357
- /* @__PURE__ */ jsx34(Text27, { bold: true, color: active ? line.color : PALETTE.muted, children: line.text }),
24358
- line.suffix && /* @__PURE__ */ jsx34(Text27, { color: PALETTE.muted, children: line.suffix })
24297
+ return /* @__PURE__ */ jsxs26(Box26, { children: [
24298
+ line.prefix && /* @__PURE__ */ jsx32(Text27, { children: line.prefix }),
24299
+ /* @__PURE__ */ jsx32(Text27, { bold: true, color: active ? line.color : PALETTE.muted, children: line.text }),
24300
+ line.suffix && /* @__PURE__ */ jsx32(Text27, { color: PALETTE.muted, children: line.suffix })
24359
24301
  ] });
24360
24302
  }
24361
- return /* @__PURE__ */ jsx34(Box25, { children: /* @__PURE__ */ jsx34(Text27, { color: !active || line.dim ? PALETTE.muted : void 0, children: line.text }) });
24303
+ return /* @__PURE__ */ jsx32(Box26, { children: /* @__PURE__ */ jsx32(Text27, { color: !active || line.dim ? PALETTE.muted : void 0, children: line.text }) });
24362
24304
  }
24363
24305
 
24364
24306
  // packages/experience-design-system-cli/src/tui/import/steps/09-review/components/ComponentRationalePanel.tsx
24365
- import { jsx as jsx35, jsxs as jsxs27 } from "react/jsx-runtime";
24307
+ import { jsx as jsx33, jsxs as jsxs27 } from "react/jsx-runtime";
24366
24308
  var PLACEHOLDER = "(no rationale captured)";
24367
24309
  function renderComponentRationaleLines(data, innerWidth) {
24368
24310
  const out = [];
@@ -24431,7 +24373,7 @@ function ComponentRationalePanel({
24431
24373
  const visibleStart = totalLines === 0 ? 0 : scrollOffset + 1;
24432
24374
  const visibleEnd = Math.min(totalLines, scrollOffset + contentHeight);
24433
24375
  return /* @__PURE__ */ jsxs27(
24434
- Box26,
24376
+ Box27,
24435
24377
  {
24436
24378
  flexDirection: "column",
24437
24379
  width,
@@ -24439,27 +24381,27 @@ function ComponentRationalePanel({
24439
24381
  borderStyle: "single",
24440
24382
  borderColor: active ? PALETTE.text : void 0,
24441
24383
  children: [
24442
- /* @__PURE__ */ jsx35(Box26, { children: /* @__PURE__ */ jsx35(Text28, { bold: true, color: active ? void 0 : PALETTE.muted, children: `Component rationale: ${data.name}` }) }),
24443
- visible.map((line, i) => /* @__PURE__ */ jsx35(RationaleLine, { line, active }, i)),
24444
- /* @__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" }) })
24384
+ /* @__PURE__ */ jsx33(Box27, { children: /* @__PURE__ */ jsx33(Text28, { bold: true, color: active ? void 0 : PALETTE.muted, children: `Component rationale: ${data.name}` }) }),
24385
+ visible.map((line, i) => /* @__PURE__ */ jsx33(RationaleLine, { line, active }, i)),
24386
+ /* @__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" }) })
24445
24387
  ]
24446
24388
  }
24447
24389
  );
24448
24390
  }
24449
24391
 
24450
24392
  // packages/experience-design-system-cli/src/tui/import/steps/09-review/components/JsonPanel.tsx
24451
- import { Box as Box28 } from "ink";
24393
+ import { Box as Box29 } from "ink";
24452
24394
 
24453
24395
  // packages/experience-design-system-cli/src/tui/import/steps/09-review/components/HighlightedLine.tsx
24454
24396
  import { Text as Text29 } from "ink";
24455
- import { Fragment as Fragment9, jsx as jsx36 } from "react/jsx-runtime";
24397
+ import { Fragment as Fragment7, jsx as jsx34 } from "react/jsx-runtime";
24456
24398
  function HighlightedLine({ parts }) {
24457
- return /* @__PURE__ */ jsx36(Fragment9, { children: parts.map((part, i) => /* @__PURE__ */ jsx36(Text29, { color: part.dim ? PALETTE.muted : part.color, children: part.text }, i)) });
24399
+ return /* @__PURE__ */ jsx34(Fragment7, { children: parts.map((part, i) => /* @__PURE__ */ jsx34(Text29, { color: part.dim ? PALETTE.muted : part.color, children: part.text }, i)) });
24458
24400
  }
24459
24401
 
24460
24402
  // packages/experience-design-system-cli/src/tui/import/steps/09-review/components/ScrollablePanel.tsx
24461
- import { Box as Box27, Text as Text30 } from "ink";
24462
- import { Fragment as Fragment10, jsx as jsx37, jsxs as jsxs28 } from "react/jsx-runtime";
24403
+ import { Box as Box28, Text as Text30 } from "ink";
24404
+ import { Fragment as Fragment8, jsx as jsx35, jsxs as jsxs28 } from "react/jsx-runtime";
24463
24405
  function ScrollablePanel({
24464
24406
  title,
24465
24407
  width,
@@ -24472,12 +24414,12 @@ function ScrollablePanel({
24472
24414
  children
24473
24415
  }) {
24474
24416
  const overflowed = totalLines > height;
24475
- return /* @__PURE__ */ jsxs28(Box27, { flexDirection: "column", width, height: height + 2, borderStyle: "single", borderColor, children: [
24476
- /* @__PURE__ */ jsxs28(Box27, { children: [
24477
- /* @__PURE__ */ jsx37(Text30, { bold: true, color: active ? void 0 : PALETTE.muted, children: title }),
24478
- overflowed && /* @__PURE__ */ jsxs28(Fragment10, { children: [
24479
- /* @__PURE__ */ jsx37(Box27, { flexGrow: 1 }),
24480
- /* @__PURE__ */ jsx37(Text30, { color: active ? void 0 : PALETTE.muted, children: `\u2195 ${visibleStart}-${visibleEnd}/${totalLines}` })
24417
+ return /* @__PURE__ */ jsxs28(Box28, { flexDirection: "column", width, height: height + 2, borderStyle: "single", borderColor, children: [
24418
+ /* @__PURE__ */ jsxs28(Box28, { children: [
24419
+ /* @__PURE__ */ jsx35(Text30, { bold: true, color: active ? void 0 : PALETTE.muted, children: title }),
24420
+ overflowed && /* @__PURE__ */ jsxs28(Fragment8, { children: [
24421
+ /* @__PURE__ */ jsx35(Box28, { flexGrow: 1 }),
24422
+ /* @__PURE__ */ jsx35(Text30, { color: active ? void 0 : PALETTE.muted, children: `\u2195 ${visibleStart}-${visibleEnd}/${totalLines}` })
24481
24423
  ] })
24482
24424
  ] }),
24483
24425
  children
@@ -24485,7 +24427,7 @@ function ScrollablePanel({
24485
24427
  }
24486
24428
 
24487
24429
  // packages/experience-design-system-cli/src/tui/import/steps/09-review/components/JsonPanel.tsx
24488
- import { jsx as jsx38 } from "react/jsx-runtime";
24430
+ import { jsx as jsx36 } from "react/jsx-runtime";
24489
24431
  function highlightJson(line) {
24490
24432
  const parts = [];
24491
24433
  let remaining = line;
@@ -24523,7 +24465,7 @@ function highlightJson(line) {
24523
24465
  parts.push({ text: remaining[0] });
24524
24466
  remaining = remaining.slice(1);
24525
24467
  }
24526
- return /* @__PURE__ */ jsx38(HighlightedLine, { parts });
24468
+ return /* @__PURE__ */ jsx36(HighlightedLine, { parts });
24527
24469
  }
24528
24470
  function truncateLine(line, maxWidth) {
24529
24471
  if (line.length <= maxWidth) return line;
@@ -24536,7 +24478,7 @@ function JsonPanel({ label, value, scrollOffset, width, height, active }) {
24536
24478
  const totalLines = allLines.length;
24537
24479
  const visibleStart = totalLines === 0 ? 0 : scrollOffset + 1;
24538
24480
  const visibleEnd = Math.min(totalLines, scrollOffset + height);
24539
- return /* @__PURE__ */ jsx38(
24481
+ return /* @__PURE__ */ jsx36(
24540
24482
  ScrollablePanel,
24541
24483
  {
24542
24484
  title: label,
@@ -24549,14 +24491,14 @@ function JsonPanel({ label, value, scrollOffset, width, height, active }) {
24549
24491
  borderColor: active ? "white" : void 0,
24550
24492
  children: visibleLines.map((line, i) => {
24551
24493
  const truncated = truncateLine(line, innerWidth);
24552
- return /* @__PURE__ */ jsx38(Box28, { children: highlightJson(truncated) }, i);
24494
+ return /* @__PURE__ */ jsx36(Box29, { children: highlightJson(truncated) }, i);
24553
24495
  })
24554
24496
  }
24555
24497
  );
24556
24498
  }
24557
24499
 
24558
24500
  // packages/experience-design-system-cli/src/tui/import/steps/09-review/components/RationalePanel.tsx
24559
- import { jsx as jsx39 } from "react/jsx-runtime";
24501
+ import { jsx as jsx37 } from "react/jsx-runtime";
24560
24502
  function renderRationaleLines(rows, innerWidth) {
24561
24503
  const out = [];
24562
24504
  rows.forEach((row, idx) => {
@@ -24589,7 +24531,7 @@ function RationalePanel({
24589
24531
  const visible = allLines.slice(scrollOffset, scrollOffset + height);
24590
24532
  const visibleStart = totalLines === 0 ? 0 : scrollOffset + 1;
24591
24533
  const visibleEnd = Math.min(totalLines, scrollOffset + height);
24592
- return /* @__PURE__ */ jsx39(
24534
+ return /* @__PURE__ */ jsx37(
24593
24535
  ScrollablePanel,
24594
24536
  {
24595
24537
  title: `RATIONALE \u2014 ${componentName}`,
@@ -24600,15 +24542,15 @@ function RationalePanel({
24600
24542
  visibleStart,
24601
24543
  visibleEnd,
24602
24544
  borderColor: active ? PALETTE.text : void 0,
24603
- children: visible.map((line, i) => /* @__PURE__ */ jsx39(RationaleLine, { line, active }, i))
24545
+ children: visible.map((line, i) => /* @__PURE__ */ jsx37(RationaleLine, { line, active }, i))
24604
24546
  }
24605
24547
  );
24606
24548
  }
24607
24549
 
24608
24550
  // packages/experience-design-system-cli/src/tui/import/steps/09-review/components/TokenReviewPanel.tsx
24609
24551
  import figures7 from "figures";
24610
- import { Box as Box29, Text as Text31 } from "ink";
24611
- import { jsx as jsx40, jsxs as jsxs29 } from "react/jsx-runtime";
24552
+ import { Box as Box30, Text as Text31 } from "ink";
24553
+ import { jsx as jsx38, jsxs as jsxs29 } from "react/jsx-runtime";
24612
24554
  function TokenReviewPanel({
24613
24555
  componentName,
24614
24556
  suggestions,
@@ -24628,7 +24570,7 @@ function TokenReviewPanel({
24628
24570
  const visiblePaths = current.paths.slice(scrollStart, scrollStart + visibleCount);
24629
24571
  const rangeLabel = current.paths.length === 0 ? "no compatible tokens" : `${scrollStart + 1}-${scrollStart + visiblePaths.length} of ${current.paths.length}`;
24630
24572
  return /* @__PURE__ */ jsxs29(
24631
- Box29,
24573
+ Box30,
24632
24574
  {
24633
24575
  flexDirection: "column",
24634
24576
  width,
@@ -24636,15 +24578,15 @@ function TokenReviewPanel({
24636
24578
  borderStyle: "single",
24637
24579
  borderColor: active ? PALETTE.text : void 0,
24638
24580
  children: [
24639
- /* @__PURE__ */ jsx40(Text31, { bold: true, color: active ? void 0 : PALETTE.muted, wrap: "truncate", children: `TOKEN REVIEW \u2014 ${componentName} \xB7 ${current.propName} (edit allowed)` }),
24640
- /* @__PURE__ */ jsx40(Text31, { color: PALETTE.muted, wrap: "truncate", children: `select which tokens are allowed (${rangeLabel})` }),
24641
- /* @__PURE__ */ jsx40(Text31, { children: " " }),
24642
- current.paths.length === 0 && /* @__PURE__ */ jsx40(Text31, { color: PALETTE.muted, children: "(no compatible tokens found for this token kind)" }),
24581
+ /* @__PURE__ */ jsx38(Text31, { bold: true, color: active ? void 0 : PALETTE.muted, wrap: "truncate", children: `TOKEN REVIEW \u2014 ${componentName} \xB7 ${current.propName} (edit allowed)` }),
24582
+ /* @__PURE__ */ jsx38(Text31, { color: PALETTE.muted, wrap: "truncate", children: `select which tokens are allowed (${rangeLabel})` }),
24583
+ /* @__PURE__ */ jsx38(Text31, { children: " " }),
24584
+ current.paths.length === 0 && /* @__PURE__ */ jsx38(Text31, { color: PALETTE.muted, children: "(no compatible tokens found for this token kind)" }),
24643
24585
  visiblePaths.map((path5, i) => {
24644
24586
  const pathIndex = scrollStart + i;
24645
24587
  const checked = editSelection.has(path5);
24646
24588
  const focused = pathIndex === editCursor;
24647
- return /* @__PURE__ */ jsx40(Box29, { children: /* @__PURE__ */ jsx40(
24589
+ return /* @__PURE__ */ jsx38(Box30, { children: /* @__PURE__ */ jsx38(
24648
24590
  Text31,
24649
24591
  {
24650
24592
  color: focused ? PALETTE.accent : active ? void 0 : PALETTE.muted,
@@ -24654,15 +24596,15 @@ function TokenReviewPanel({
24654
24596
  }
24655
24597
  ) }, path5);
24656
24598
  }),
24657
- /* @__PURE__ */ jsx40(Text31, { children: " " }),
24658
- /* @__PURE__ */ jsx40(Text31, { color: PALETTE.muted, wrap: "truncate", children: "[\u2191/\u2193] move [Space] toggle" }),
24659
- /* @__PURE__ */ jsx40(Text31, { color: PALETTE.muted, wrap: "truncate", children: "[Ctrl+S] save [Esc] cancel" })
24599
+ /* @__PURE__ */ jsx38(Text31, { children: " " }),
24600
+ /* @__PURE__ */ jsx38(Text31, { color: PALETTE.muted, wrap: "truncate", children: "[\u2191/\u2193] move [Space] toggle" }),
24601
+ /* @__PURE__ */ jsx38(Text31, { color: PALETTE.muted, wrap: "truncate", children: "[Ctrl+S] save [Esc] cancel" })
24660
24602
  ]
24661
24603
  }
24662
24604
  );
24663
24605
  }
24664
24606
  return /* @__PURE__ */ jsxs29(
24665
- Box29,
24607
+ Box30,
24666
24608
  {
24667
24609
  flexDirection: "column",
24668
24610
  width,
@@ -24670,25 +24612,25 @@ function TokenReviewPanel({
24670
24612
  borderStyle: "single",
24671
24613
  borderColor: active ? PALETTE.text : void 0,
24672
24614
  children: [
24673
- /* @__PURE__ */ jsx40(Text31, { bold: true, color: active ? void 0 : PALETTE.muted, children: `TOKEN REVIEW \u2014 ${componentName}` }),
24674
- suggestions.length === 0 && /* @__PURE__ */ jsx40(Text31, { color: PALETTE.muted, children: "(no token suggestions for this component)" }),
24615
+ /* @__PURE__ */ jsx38(Text31, { bold: true, color: active ? void 0 : PALETTE.muted, children: `TOKEN REVIEW \u2014 ${componentName}` }),
24616
+ suggestions.length === 0 && /* @__PURE__ */ jsx38(Text31, { color: PALETTE.muted, children: "(no token suggestions for this component)" }),
24675
24617
  suggestions.map((s, i) => {
24676
24618
  const focused = i === selectedRow;
24677
- return /* @__PURE__ */ jsxs29(Box29, { flexDirection: "column", children: [
24678
- /* @__PURE__ */ jsx40(Box29, { children: /* @__PURE__ */ jsx40(Text31, { color: focused ? PALETTE.accent : active ? void 0 : PALETTE.muted, bold: focused, children: `${focused ? figures7.pointer : " "} ${s.propName}` }) }),
24679
- /* @__PURE__ */ jsx40(Text31, { color: PALETTE.muted, children: ` suggested: ${s.suggested.join(", ")}` }),
24680
- /* @__PURE__ */ jsx40(Text31, { color: PALETTE.muted, children: ` allowed: ${s.allowed.join(", ")}` })
24619
+ return /* @__PURE__ */ jsxs29(Box30, { flexDirection: "column", children: [
24620
+ /* @__PURE__ */ jsx38(Box30, { children: /* @__PURE__ */ jsx38(Text31, { color: focused ? PALETTE.accent : active ? void 0 : PALETTE.muted, bold: focused, children: `${focused ? figures7.pointer : " "} ${s.propName}` }) }),
24621
+ /* @__PURE__ */ jsx38(Text31, { color: PALETTE.muted, children: ` suggested: ${s.suggested.join(", ")}` }),
24622
+ /* @__PURE__ */ jsx38(Text31, { color: PALETTE.muted, children: ` allowed: ${s.allowed.join(", ")}` })
24681
24623
  ] }, s.propName);
24682
24624
  }),
24683
- /* @__PURE__ */ jsx40(Text31, { children: " " }),
24684
- /* @__PURE__ */ jsx40(Text31, { children: "[\u2191/\u2193] move [Enter] edit allowed [Esc] close" })
24625
+ /* @__PURE__ */ jsx38(Text31, { children: " " }),
24626
+ /* @__PURE__ */ jsx38(Text31, { children: "[\u2191/\u2193] move [Enter] edit allowed [Esc] close" })
24685
24627
  ]
24686
24628
  }
24687
24629
  );
24688
24630
  }
24689
24631
 
24690
24632
  // packages/experience-design-system-cli/src/tui/import/steps/09-review/review-details-panel.tsx
24691
- import { Fragment as Fragment11, jsx as jsx41, jsxs as jsxs30 } from "react/jsx-runtime";
24633
+ import { Fragment as Fragment9, jsx as jsx39, jsxs as jsxs30 } from "react/jsx-runtime";
24692
24634
  function ReviewDetailsPanel({
24693
24635
  selectedKey,
24694
24636
  panelOpen,
@@ -24723,7 +24665,7 @@ function ReviewDetailsPanel({
24723
24665
  rationale: s.rationale ?? ""
24724
24666
  }))
24725
24667
  ];
24726
- return /* @__PURE__ */ jsx41(
24668
+ return /* @__PURE__ */ jsx39(
24727
24669
  RationalePanel,
24728
24670
  {
24729
24671
  componentName: componentRationale?.name ?? selectedKey,
@@ -24736,7 +24678,7 @@ function ReviewDetailsPanel({
24736
24678
  );
24737
24679
  }
24738
24680
  if (panelOpen === "component-rationale") {
24739
- return /* @__PURE__ */ jsx41(
24681
+ return /* @__PURE__ */ jsx39(
24740
24682
  ComponentRationalePanel,
24741
24683
  {
24742
24684
  data: componentRationale ?? {
@@ -24762,13 +24704,13 @@ function ReviewDetailsPanel({
24762
24704
  const sourceLineCount = Math.max(1, height - 4);
24763
24705
  const lines = source ? source.split("\n").slice(panelScrollOffset, panelScrollOffset + sourceLineCount) : [];
24764
24706
  return /* @__PURE__ */ jsxs30(FixedPanel, { width, height, borderStyle: "single", borderColor: sourceBorderColor, paddingLeft: 1, children: [
24765
- /* @__PURE__ */ jsx41(Text32, { color: PALETTE.muted, bold: true, wrap: "truncate-end", children: `source: ${headerPath}` }),
24766
- 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)" }),
24767
- /* @__PURE__ */ jsx41(Text32, { color: PALETTE.muted, wrap: "truncate-end", children: "[s/Esc] close" })
24707
+ /* @__PURE__ */ jsx39(Text32, { color: PALETTE.muted, bold: true, wrap: "truncate-end", children: `source: ${headerPath}` }),
24708
+ 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)" }),
24709
+ /* @__PURE__ */ jsx39(Text32, { color: PALETTE.muted, wrap: "truncate-end", children: "[s/Esc] close" })
24768
24710
  ] });
24769
24711
  }
24770
24712
  if (panelOpen === "token-review") {
24771
- return /* @__PURE__ */ jsx41(
24713
+ return /* @__PURE__ */ jsx39(
24772
24714
  TokenReviewPanel,
24773
24715
  {
24774
24716
  componentName: selectedKey,
@@ -24784,7 +24726,7 @@ function ReviewDetailsPanel({
24784
24726
  );
24785
24727
  }
24786
24728
  if (showJson) {
24787
- return /* @__PURE__ */ jsx41(
24729
+ return /* @__PURE__ */ jsx39(
24788
24730
  JsonPanel,
24789
24731
  {
24790
24732
  label: "GENERATED DEFINITION (read-only)",
@@ -24796,11 +24738,11 @@ function ReviewDetailsPanel({
24796
24738
  }
24797
24739
  );
24798
24740
  }
24799
- return /* @__PURE__ */ jsx41(Fragment11, { children: editor });
24741
+ return /* @__PURE__ */ jsx39(Fragment9, { children: editor });
24800
24742
  }
24801
24743
 
24802
24744
  // packages/experience-design-system-cli/src/tui/import/steps/09-review/components/ReviewDetailsEditor.tsx
24803
- import { jsx as jsx42 } from "react/jsx-runtime";
24745
+ import { jsx as jsx40 } from "react/jsx-runtime";
24804
24746
  import { createElement } from "react";
24805
24747
  function toFieldEditorMetadata(reviewMetadata) {
24806
24748
  if (!reviewMetadata) return void 0;
@@ -24834,7 +24776,7 @@ function ReviewDetailsEditor({
24834
24776
  jsonScrollOffset,
24835
24777
  currentTokenSuggestions
24836
24778
  } = reviewEditor;
24837
- return /* @__PURE__ */ jsx42(
24779
+ return /* @__PURE__ */ jsx40(
24838
24780
  ReviewDetailsPanel,
24839
24781
  {
24840
24782
  selectedKey,
@@ -24874,7 +24816,7 @@ function ReviewDetailsEditor({
24874
24816
  }
24875
24817
 
24876
24818
  // packages/experience-design-system-cli/src/tui/import/steps/09-review/components/ReviewComponentPanel.tsx
24877
- import { Fragment as Fragment12, jsx as jsx43, jsxs as jsxs31 } from "react/jsx-runtime";
24819
+ import { Fragment as Fragment10, jsx as jsx41, jsxs as jsxs31 } from "react/jsx-runtime";
24878
24820
  function buildReviewFieldEditor(reviewEditor, selectedJson, onExit, overrides = {}) {
24879
24821
  return {
24880
24822
  value: reviewEditor.draftValue || selectedJson,
@@ -24914,17 +24856,17 @@ function ReviewEmptyComponentsWarning({
24914
24856
  hidden
24915
24857
  }) {
24916
24858
  if (hidden || count === 0) return null;
24917
- return /* @__PURE__ */ jsx43(Text33, { color: PALETTE.warning, children: `\u26A0 ${count} component${count === 1 ? "" : "s"} had no classifiable props \u2014 review with care` });
24859
+ return /* @__PURE__ */ jsx41(Text33, { color: PALETTE.warning, children: `\u26A0 ${count} component${count === 1 ? "" : "s"} had no classifiable props \u2014 review with care` });
24918
24860
  }
24919
24861
  function ReviewNoSelection() {
24920
- return /* @__PURE__ */ jsx43(Box30, { flexGrow: 1, paddingLeft: 1, flexDirection: "column", children: /* @__PURE__ */ jsx43(Text33, { color: PALETTE.muted, children: "No component selected" }) });
24862
+ return /* @__PURE__ */ jsx41(Box31, { flexGrow: 1, paddingLeft: 1, flexDirection: "column", children: /* @__PURE__ */ jsx41(Text33, { color: PALETTE.muted, children: "No component selected" }) });
24921
24863
  }
24922
24864
  function ReviewFinalizeError({
24923
24865
  message,
24924
24866
  hidden
24925
24867
  }) {
24926
24868
  if (hidden || !message) return null;
24927
- return /* @__PURE__ */ jsx43(Text33, { color: PALETTE.error, children: `\u26A0 ${message}` });
24869
+ return /* @__PURE__ */ jsx41(Text33, { color: PALETTE.error, children: `\u26A0 ${message}` });
24928
24870
  }
24929
24871
  function ReviewPanelFooter({
24930
24872
  reviewEditor,
@@ -24933,10 +24875,10 @@ function ReviewPanelFooter({
24933
24875
  livePreview,
24934
24876
  livePreviewSpinner
24935
24877
  }) {
24936
- return /* @__PURE__ */ jsxs31(Fragment12, { children: [
24878
+ return /* @__PURE__ */ jsxs31(Fragment10, { children: [
24937
24879
  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" : ""),
24938
- livePreview.status === "running" && /* @__PURE__ */ jsx43(Text33, { children: ` ${livePreviewSpinner} live preview` }),
24939
- livePreview.disabled && /* @__PURE__ */ jsx43(Text33, { children: " \xB7 live preview disabled" })
24880
+ livePreview.status === "running" && /* @__PURE__ */ jsx41(Text33, { children: ` ${livePreviewSpinner} live preview` }),
24881
+ livePreview.disabled && /* @__PURE__ */ jsx41(Text33, { children: " \xB7 live preview disabled" })
24940
24882
  ] });
24941
24883
  }
24942
24884
  function ReviewComponentTitle({
@@ -24945,9 +24887,9 @@ function ReviewComponentTitle({
24945
24887
  slotCount,
24946
24888
  sidebarFocused
24947
24889
  }) {
24948
- return /* @__PURE__ */ jsxs31(Box30, { paddingLeft: 2, paddingBottom: 1, children: [
24949
- /* @__PURE__ */ jsx43(Text33, { bold: true, wrap: "truncate-end", children: selectedKey }),
24950
- /* @__PURE__ */ jsx43(Box30, { flexGrow: 1 }),
24890
+ return /* @__PURE__ */ jsxs31(Box31, { paddingLeft: 2, paddingBottom: 1, children: [
24891
+ /* @__PURE__ */ jsx41(Text33, { bold: true, wrap: "truncate-end", children: selectedKey }),
24892
+ /* @__PURE__ */ jsx41(Box31, { flexGrow: 1 }),
24951
24893
  /* @__PURE__ */ jsxs31(Text33, { color: PALETTE.muted, wrap: "truncate-end", children: [
24952
24894
  propCount,
24953
24895
  " prop",
@@ -24979,8 +24921,8 @@ function ReviewComponentPanel({
24979
24921
  const slotCount = selectedEntry.$slots ? Object.keys(selectedEntry.$slots).length : 0;
24980
24922
  const contentHeight = Math.max(1, height - 2);
24981
24923
  const contentWidth = Math.max(1, width - 1);
24982
- 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: [
24983
- /* @__PURE__ */ jsx43(Box30, { width: contentWidth, height: contentHeight, flexShrink: 0, overflowY: "hidden", children: /* @__PURE__ */ jsx43(
24924
+ 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: [
24925
+ /* @__PURE__ */ jsx41(Box31, { width: contentWidth, height: contentHeight, flexShrink: 0, overflowY: "hidden", children: /* @__PURE__ */ jsx41(
24984
24926
  ReviewDetailsEditor,
24985
24927
  {
24986
24928
  selectedKey,
@@ -24993,7 +24935,7 @@ function ReviewComponentPanel({
24993
24935
  jsonValue,
24994
24936
  sidebarFocused,
24995
24937
  fieldEditor,
24996
- header: /* @__PURE__ */ jsx43(
24938
+ header: /* @__PURE__ */ jsx41(
24997
24939
  ReviewComponentTitle,
24998
24940
  {
24999
24941
  selectedKey,
@@ -25004,8 +24946,8 @@ function ReviewComponentPanel({
25004
24946
  )
25005
24947
  }
25006
24948
  ) }),
25007
- /* @__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 : " " }) }),
25008
- /* @__PURE__ */ jsx43(Box30, { width: contentWidth, height: 1, flexShrink: 0, children: /* @__PURE__ */ jsx43(Text33, { color: PALETTE.muted, wrap: "truncate-end", children: /* @__PURE__ */ jsx43(
24949
+ /* @__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 : " " }) }),
24950
+ /* @__PURE__ */ jsx41(Box31, { width: contentWidth, height: 1, flexShrink: 0, children: /* @__PURE__ */ jsx41(Text33, { color: PALETTE.muted, wrap: "truncate-end", children: /* @__PURE__ */ jsx41(
25009
24951
  ReviewPanelFooter,
25010
24952
  {
25011
24953
  reviewEditor,
@@ -25019,8 +24961,8 @@ function ReviewComponentPanel({
25019
24961
  }
25020
24962
 
25021
24963
  // packages/experience-design-system-cli/src/tui/import/steps/09-review/components/ReviewStatus.tsx
25022
- import { Box as Box31, Text as Text34 } from "ink";
25023
- import { jsx as jsx44, jsxs as jsxs32 } from "react/jsx-runtime";
24964
+ import { Box as Box32, Text as Text34 } from "ink";
24965
+ import { jsx as jsx42, jsxs as jsxs32 } from "react/jsx-runtime";
25024
24966
  function countReviewStatuses(entries) {
25025
24967
  return entries.reduce(
25026
24968
  (counts, entry) => {
@@ -25033,13 +24975,13 @@ function countReviewStatuses(entries) {
25033
24975
  );
25034
24976
  }
25035
24977
  function ReviewLoadingState() {
25036
- return /* @__PURE__ */ jsx44(Box31, { paddingX: 2, paddingY: 1, children: /* @__PURE__ */ jsx44(Text34, { color: PALETTE.muted, children: "Loading generated definitions..." }) });
24978
+ return /* @__PURE__ */ jsx42(Box32, { paddingX: 2, paddingY: 1, children: /* @__PURE__ */ jsx42(Text34, { color: PALETTE.muted, children: "Loading generated definitions..." }) });
25037
24979
  }
25038
24980
  function ReviewLoadError({ message }) {
25039
- return /* @__PURE__ */ jsxs32(Box31, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
25040
- /* @__PURE__ */ jsx44(Text34, { color: PALETTE.error, children: message }),
25041
- /* @__PURE__ */ jsx44(Text34, { children: " " }),
25042
- /* @__PURE__ */ jsx44(ControlHints, { hints: [{ keys: "q / Enter / Esc", label: "Quit" }] })
24981
+ return /* @__PURE__ */ jsxs32(Box32, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
24982
+ /* @__PURE__ */ jsx42(Text34, { color: PALETTE.error, children: message }),
24983
+ /* @__PURE__ */ jsx42(Text34, { children: " " }),
24984
+ /* @__PURE__ */ jsx42(ControlHints, { hints: [{ keys: "q / Enter / Esc", label: "Quit" }] })
25043
24985
  ] });
25044
24986
  }
25045
24987
 
@@ -25239,8 +25181,8 @@ async function runLivePreview(opts) {
25239
25181
  }
25240
25182
 
25241
25183
  // packages/experience-design-system-cli/src/tui/import/steps/09-review/components/FinalizeDialog.tsx
25242
- import { Box as Box32, Text as Text35 } from "ink";
25243
- import { Fragment as Fragment13, jsx as jsx45, jsxs as jsxs33 } from "react/jsx-runtime";
25184
+ import { Box as Box33, Text as Text35 } from "ink";
25185
+ import { Fragment as Fragment11, jsx as jsx43, jsxs as jsxs33 } from "react/jsx-runtime";
25244
25186
  var FINALIZE_REMOVED_WINDOW = 6;
25245
25187
  function FinalizeDialog({
25246
25188
  accepted,
@@ -25269,51 +25211,51 @@ function FinalizeDialog({
25269
25211
  const windowed = removed.slice(offset, offset + FINALIZE_REMOVED_WINDOW);
25270
25212
  const hasMoreBelow = offset + FINALIZE_REMOVED_WINDOW < removed.length;
25271
25213
  const hasMoreAbove = offset > 0;
25272
- return /* @__PURE__ */ jsx45(Box32, { width: "100%", paddingX: 2, children: /* @__PURE__ */ jsxs33(Box32, { flexDirection: "column", alignItems: "flex-start", children: [
25273
- /* @__PURE__ */ jsx45(Text35, { bold: true, children: "Finalize" }),
25274
- /* @__PURE__ */ jsx45(Text35, { children: " " }),
25214
+ return /* @__PURE__ */ jsx43(Box33, { width: "100%", paddingX: 2, children: /* @__PURE__ */ jsxs33(Box33, { flexDirection: "column", alignItems: "flex-start", children: [
25215
+ /* @__PURE__ */ jsx43(Text35, { bold: true, children: "Finalize" }),
25216
+ /* @__PURE__ */ jsx43(Text35, { children: " " }),
25275
25217
  /* @__PURE__ */ jsxs33(Text35, { children: [
25276
25218
  /* @__PURE__ */ jsxs33(Text35, { color: PALETTE.success, children: [
25277
25219
  accepted,
25278
25220
  " accepted"
25279
25221
  ] }),
25280
- /* @__PURE__ */ jsx45(Text35, { children: " \xB7 " }),
25222
+ /* @__PURE__ */ jsx43(Text35, { children: " \xB7 " }),
25281
25223
  /* @__PURE__ */ jsxs33(Text35, { color: PALETTE.error, children: [
25282
25224
  rejected,
25283
25225
  " rejected"
25284
25226
  ] }),
25285
- /* @__PURE__ */ jsx45(Text35, { children: " \xB7 " }),
25227
+ /* @__PURE__ */ jsx43(Text35, { children: " \xB7 " }),
25286
25228
  /* @__PURE__ */ jsxs33(Text35, { color: PALETTE.muted, children: [
25287
25229
  needsReview,
25288
25230
  " unresolved"
25289
25231
  ] })
25290
25232
  ] }),
25291
- /* @__PURE__ */ jsx45(Text35, { children: " " }),
25292
- noneAccepted && /* @__PURE__ */ jsxs33(Fragment13, { children: [
25293
- /* @__PURE__ */ jsx45(Text35, { bold: true, color: PALETTE.warning, children: "\u26A0 No components are accepted \u2014 nothing will be pushed." }),
25294
- /* @__PURE__ */ jsx45(Text35, { color: PALETTE.warning, children: "Accept at least one component ([a] a row, [A] accept all) to push." }),
25295
- /* @__PURE__ */ jsx45(Text35, { children: " " })
25233
+ /* @__PURE__ */ jsx43(Text35, { children: " " }),
25234
+ noneAccepted && /* @__PURE__ */ jsxs33(Fragment11, { children: [
25235
+ /* @__PURE__ */ jsx43(Text35, { bold: true, color: PALETTE.warning, children: "\u26A0 No components are accepted \u2014 nothing will be pushed." }),
25236
+ /* @__PURE__ */ jsx43(Text35, { color: PALETTE.warning, children: "Accept at least one component ([a] a row, [A] accept all) to push." }),
25237
+ /* @__PURE__ */ jsx43(Text35, { children: " " })
25296
25238
  ] }),
25297
- !allResolved && /* @__PURE__ */ jsxs33(Fragment13, { children: [
25298
- /* @__PURE__ */ jsx45(Text35, { color: PALETTE.warning, children: "\u26A0 " + needsReview + " unresolved component" + (needsReview === 1 ? "" : "s") + " will not be pushed." }),
25299
- /* @__PURE__ */ jsx45(Text35, { color: PALETTE.warning, children: "Only explicitly accepted components ship." }),
25300
- /* @__PURE__ */ jsx45(Text35, { children: " " })
25239
+ !allResolved && /* @__PURE__ */ jsxs33(Fragment11, { children: [
25240
+ /* @__PURE__ */ jsx43(Text35, { color: PALETTE.warning, children: "\u26A0 " + needsReview + " unresolved component" + (needsReview === 1 ? "" : "s") + " will not be pushed." }),
25241
+ /* @__PURE__ */ jsx43(Text35, { color: PALETTE.warning, children: "Only explicitly accepted components ship." }),
25242
+ /* @__PURE__ */ jsx43(Text35, { children: " " })
25301
25243
  ] }),
25302
- /* @__PURE__ */ jsxs33(Box32, { flexDirection: "column", height: 2, children: [
25303
- 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: " " }),
25304
- /* @__PURE__ */ jsx45(Text35, { children: " " })
25244
+ /* @__PURE__ */ jsxs33(Box33, { flexDirection: "column", height: 2, children: [
25245
+ 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: " " }),
25246
+ /* @__PURE__ */ jsx43(Text35, { children: " " })
25305
25247
  ] }),
25306
- previewStatus === "done" && removed.length > 0 && /* @__PURE__ */ jsxs33(Fragment13, { children: [
25307
- /* @__PURE__ */ jsx45(Text35, { bold: true, color: PALETTE.error, children: removedComponentsHeader(removed.length, false) }),
25308
- hasMoreAbove && /* @__PURE__ */ jsx45(Text35, { color: PALETTE.muted, children: "\u2191 more above" }),
25309
- windowed.map((rc) => /* @__PURE__ */ jsx45(Text35, { color: PALETTE.error, children: removedComponentLine(rc) }, rc.id)),
25310
- hasMoreBelow && /* @__PURE__ */ jsx45(Text35, { color: PALETTE.muted, children: "\u2193 more below" }),
25311
- removed.length > FINALIZE_REMOVED_WINDOW && /* @__PURE__ */ jsx45(Text35, { children: "[\u2191\u2193] scroll deletions" }),
25312
- /* @__PURE__ */ jsx45(Text35, { children: " " })
25248
+ previewStatus === "done" && removed.length > 0 && /* @__PURE__ */ jsxs33(Fragment11, { children: [
25249
+ /* @__PURE__ */ jsx43(Text35, { bold: true, color: PALETTE.error, children: removedComponentsHeader(removed.length, false) }),
25250
+ hasMoreAbove && /* @__PURE__ */ jsx43(Text35, { color: PALETTE.muted, children: "\u2191 more above" }),
25251
+ windowed.map((rc) => /* @__PURE__ */ jsx43(Text35, { color: PALETTE.error, children: removedComponentLine(rc) }, rc.id)),
25252
+ hasMoreBelow && /* @__PURE__ */ jsx43(Text35, { color: PALETTE.muted, children: "\u2193 more below" }),
25253
+ removed.length > FINALIZE_REMOVED_WINDOW && /* @__PURE__ */ jsx43(Text35, { children: "[\u2191\u2193] scroll deletions" }),
25254
+ /* @__PURE__ */ jsx43(Text35, { children: " " })
25313
25255
  ] }),
25314
- /* @__PURE__ */ jsx45(Text35, { children: noneAccepted ? "Confirm exit with nothing accepted?" : allResolved ? "Save decisions and exit? All components resolved." : "Save decisions and exit?" }),
25315
- /* @__PURE__ */ jsx45(Text35, { children: " " }),
25316
- /* @__PURE__ */ jsx45(
25256
+ /* @__PURE__ */ jsx43(Text35, { children: noneAccepted ? "Confirm exit with nothing accepted?" : allResolved ? "Save decisions and exit? All components resolved." : "Save decisions and exit?" }),
25257
+ /* @__PURE__ */ jsx43(Text35, { children: " " }),
25258
+ /* @__PURE__ */ jsx43(
25317
25259
  ControlHints,
25318
25260
  {
25319
25261
  hints: [
@@ -25726,11 +25668,11 @@ function useReviewSurfaceState(initialFinalizeError = null) {
25726
25668
  }
25727
25669
 
25728
25670
  // packages/experience-design-system-cli/src/tui/import/steps/09-review/components/ReviewDialogs.tsx
25729
- import { Box as Box34, Text as Text37 } from "ink";
25671
+ import { Box as Box35, Text as Text37 } from "ink";
25730
25672
 
25731
25673
  // packages/experience-design-system-cli/src/tui/import/steps/09-review/components/QuitDialog.tsx
25732
- import { Box as Box33, Text as Text36 } from "ink";
25733
- import { Fragment as Fragment14, jsx as jsx46, jsxs as jsxs34 } from "react/jsx-runtime";
25674
+ import { Box as Box34, Text as Text36 } from "ink";
25675
+ import { Fragment as Fragment12, jsx as jsx44, jsxs as jsxs34 } from "react/jsx-runtime";
25734
25676
  function QuitDialog({ hasUnsavedDrafts, onConfirm, onCancel }) {
25735
25677
  useImmediateInput((input, key) => {
25736
25678
  if (input === "y" || key.return) {
@@ -25739,16 +25681,16 @@ function QuitDialog({ hasUnsavedDrafts, onConfirm, onCancel }) {
25739
25681
  onCancel();
25740
25682
  }
25741
25683
  });
25742
- return /* @__PURE__ */ jsxs34(Box33, { flexDirection: "column", borderStyle: "round", padding: 1, width: 50, children: [
25743
- /* @__PURE__ */ jsx46(Text36, { bold: true, children: "\u2500".repeat(19) + " Quit " + "\u2500".repeat(19) }),
25744
- /* @__PURE__ */ jsx46(Text36, { children: " " }),
25745
- hasUnsavedDrafts ? /* @__PURE__ */ jsxs34(Fragment14, { children: [
25746
- /* @__PURE__ */ jsx46(Text36, { children: "You have unsaved draft edits." }),
25747
- /* @__PURE__ */ jsx46(Text36, { children: "Session state is preserved \u2014 you can resume" }),
25748
- /* @__PURE__ */ jsx46(Text36, { children: "by running the same review command again." })
25749
- ] }) : /* @__PURE__ */ jsx46(Text36, { children: "Session is saved. Quit without finalizing?" }),
25750
- /* @__PURE__ */ jsx46(Text36, { children: " " }),
25751
- /* @__PURE__ */ jsx46(
25684
+ return /* @__PURE__ */ jsxs34(Box34, { flexDirection: "column", borderStyle: "round", padding: 1, width: 50, children: [
25685
+ /* @__PURE__ */ jsx44(Text36, { bold: true, children: "\u2500".repeat(19) + " Quit " + "\u2500".repeat(19) }),
25686
+ /* @__PURE__ */ jsx44(Text36, { children: " " }),
25687
+ hasUnsavedDrafts ? /* @__PURE__ */ jsxs34(Fragment12, { children: [
25688
+ /* @__PURE__ */ jsx44(Text36, { children: "You have unsaved draft edits." }),
25689
+ /* @__PURE__ */ jsx44(Text36, { children: "Session state is preserved \u2014 you can resume" }),
25690
+ /* @__PURE__ */ jsx44(Text36, { children: "by running the same review command again." })
25691
+ ] }) : /* @__PURE__ */ jsx44(Text36, { children: "Session is saved. Quit without finalizing?" }),
25692
+ /* @__PURE__ */ jsx44(Text36, { children: " " }),
25693
+ /* @__PURE__ */ jsx44(
25752
25694
  ControlHints,
25753
25695
  {
25754
25696
  hints: [
@@ -25761,7 +25703,7 @@ function QuitDialog({ hasUnsavedDrafts, onConfirm, onCancel }) {
25761
25703
  }
25762
25704
 
25763
25705
  // packages/experience-design-system-cli/src/tui/import/steps/09-review/components/ReviewDialogs.tsx
25764
- import { Fragment as Fragment15, jsx as jsx47, jsxs as jsxs35 } from "react/jsx-runtime";
25706
+ import { Fragment as Fragment13, jsx as jsx45, jsxs as jsxs35 } from "react/jsx-runtime";
25765
25707
  function ReviewFinalizeDialogs({
25766
25708
  showFinalize,
25767
25709
  showQuit,
@@ -25775,8 +25717,8 @@ function ReviewFinalizeDialogs({
25775
25717
  onQuitCancel
25776
25718
  }) {
25777
25719
  const { accepted, rejected, needsReview } = countReviewStatuses(components);
25778
- return /* @__PURE__ */ jsxs35(Fragment15, { children: [
25779
- showFinalize && /* @__PURE__ */ jsx47(
25720
+ return /* @__PURE__ */ jsxs35(Fragment13, { children: [
25721
+ showFinalize && /* @__PURE__ */ jsx45(
25780
25722
  FinalizeDialog,
25781
25723
  {
25782
25724
  accepted,
@@ -25789,7 +25731,7 @@ function ReviewFinalizeDialogs({
25789
25731
  onCancel: onFinalizeCancel
25790
25732
  }
25791
25733
  ),
25792
- showQuit && /* @__PURE__ */ jsx47(QuitDialog, { hasUnsavedDrafts: false, onConfirm: onQuitConfirm, onCancel: onQuitCancel })
25734
+ showQuit && /* @__PURE__ */ jsx45(QuitDialog, { hasUnsavedDrafts: false, onConfirm: onQuitConfirm, onCancel: onQuitCancel })
25793
25735
  ] });
25794
25736
  }
25795
25737
  function ReviewStepDialogs({
@@ -25799,7 +25741,7 @@ function ReviewStepDialogs({
25799
25741
  onFinalize,
25800
25742
  onQuit
25801
25743
  }) {
25802
- return /* @__PURE__ */ jsx47(
25744
+ return /* @__PURE__ */ jsx45(
25803
25745
  ReviewFinalizeDialogs,
25804
25746
  {
25805
25747
  showFinalize: surfaceState.showFinalize,
@@ -25817,12 +25759,12 @@ function ReviewStepDialogs({
25817
25759
  }
25818
25760
  function ReviewReloadDialog({ open }) {
25819
25761
  if (!open) return null;
25820
- return /* @__PURE__ */ jsxs35(Box34, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
25821
- /* @__PURE__ */ jsx47(Text37, { bold: true, color: PALETTE.warning, children: "Reload from saved state?" }),
25822
- /* @__PURE__ */ jsx47(Text37, { children: "Unsaved in-memory changes will be lost." }),
25823
- /* @__PURE__ */ jsx47(Text37, { children: " " }),
25824
- /* @__PURE__ */ jsx47(Text37, { children: " [Enter] Confirm" }),
25825
- /* @__PURE__ */ jsx47(Text37, { children: " [Esc] Cancel" })
25762
+ return /* @__PURE__ */ jsxs35(Box35, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
25763
+ /* @__PURE__ */ jsx45(Text37, { bold: true, color: PALETTE.warning, children: "Reload from saved state?" }),
25764
+ /* @__PURE__ */ jsx45(Text37, { children: "Unsaved in-memory changes will be lost." }),
25765
+ /* @__PURE__ */ jsx45(Text37, { children: " " }),
25766
+ /* @__PURE__ */ jsx45(Text37, { children: " [Enter] Confirm" }),
25767
+ /* @__PURE__ */ jsx45(Text37, { children: " [Esc] Cancel" })
25826
25768
  ] });
25827
25769
  }
25828
25770
 
@@ -26189,8 +26131,8 @@ function useReviewPreview({
26189
26131
  }
26190
26132
 
26191
26133
  // packages/experience-design-system-cli/src/tui/import/steps/09-review/components/LivePreviewSummary.tsx
26192
- import { Box as Box35, Text as Text38 } from "ink";
26193
- import { jsx as jsx48, jsxs as jsxs36 } from "react/jsx-runtime";
26134
+ import { Box as Box36, Text as Text38 } from "ink";
26135
+ import { jsx as jsx46, jsxs as jsxs36 } from "react/jsx-runtime";
26194
26136
  function LivePreviewSummary({
26195
26137
  enabled,
26196
26138
  previewAnnotations,
@@ -26204,24 +26146,24 @@ function LivePreviewSummary({
26204
26146
  const counts = { new: 0, changed: 0, removed: 0, breaking: 0 };
26205
26147
  for (const annotation of previewAnnotations.values()) counts[annotation] += 1;
26206
26148
  const hasCounts = counts.new + counts.changed + counts.removed + counts.breaking > 0;
26207
- if (disabled) return /* @__PURE__ */ jsx48(Text38, { color: PALETTE.muted, children: "Preview: disabled (creds rejected)" });
26208
- if (status === "running" && !hasCounts) return /* @__PURE__ */ jsx48(Text38, { color: PALETTE.muted, children: `Preview: ${spinner} running...` });
26149
+ if (disabled) return /* @__PURE__ */ jsx46(Text38, { color: PALETTE.muted, children: "Preview: disabled (creds rejected)" });
26150
+ if (status === "running" && !hasCounts) return /* @__PURE__ */ jsx46(Text38, { color: PALETTE.muted, children: `Preview: ${spinner} running...` });
26209
26151
  if (!hasCounts) return null;
26210
- return /* @__PURE__ */ jsxs36(Box35, { children: [
26211
- /* @__PURE__ */ jsx48(Text38, { children: "Preview: " }),
26212
- /* @__PURE__ */ jsx48(Text38, { color: PALETTE.success, children: `${counts.new} new` }),
26213
- /* @__PURE__ */ jsx48(Text38, { children: " \xB7 " }),
26214
- /* @__PURE__ */ jsx48(Text38, { color: PALETTE.warning, children: `${counts.changed} changed` }),
26215
- /* @__PURE__ */ jsx48(Text38, { children: " \xB7 " }),
26216
- /* @__PURE__ */ jsx48(Text38, { color: PALETTE.muted, children: `${counts.removed} removed` }),
26217
- showRemovedListHint && removedCount > 0 && /* @__PURE__ */ jsx48(Text38, { children: " ([d] removed list)" }),
26218
- /* @__PURE__ */ jsx48(Text38, { children: " \xB7 " }),
26219
- /* @__PURE__ */ jsx48(Text38, { color: PALETTE.error, bold: true, children: `${counts.breaking} breaking` })
26152
+ return /* @__PURE__ */ jsxs36(Box36, { children: [
26153
+ /* @__PURE__ */ jsx46(Text38, { children: "Preview: " }),
26154
+ /* @__PURE__ */ jsx46(Text38, { color: PALETTE.success, children: `${counts.new} new` }),
26155
+ /* @__PURE__ */ jsx46(Text38, { children: " \xB7 " }),
26156
+ /* @__PURE__ */ jsx46(Text38, { color: PALETTE.warning, children: `${counts.changed} changed` }),
26157
+ /* @__PURE__ */ jsx46(Text38, { children: " \xB7 " }),
26158
+ /* @__PURE__ */ jsx46(Text38, { color: PALETTE.muted, children: `${counts.removed} removed` }),
26159
+ showRemovedListHint && removedCount > 0 && /* @__PURE__ */ jsx46(Text38, { children: " ([d] removed list)" }),
26160
+ /* @__PURE__ */ jsx46(Text38, { children: " \xB7 " }),
26161
+ /* @__PURE__ */ jsx46(Text38, { color: PALETTE.error, bold: true, children: `${counts.breaking} breaking` })
26220
26162
  ] });
26221
26163
  }
26222
26164
 
26223
26165
  // packages/experience-design-system-cli/src/tui/import/steps/09-review/generate-review-step.tsx
26224
- import { Fragment as Fragment16, jsx as jsx49, jsxs as jsxs37 } from "react/jsx-runtime";
26166
+ import { Fragment as Fragment14, jsx as jsx47, jsxs as jsxs37 } from "react/jsx-runtime";
26225
26167
  function sortComponentsForSidebar(components, cycleParticipants) {
26226
26168
  const isEmpty2 = (entry) => Object.keys(entry.$properties ?? {}).length === 0 && Object.keys(entry.$slots ?? {}).length === 0;
26227
26169
  const tier = (c2) => {
@@ -26265,7 +26207,7 @@ function CyclePathLine({
26265
26207
  return /* @__PURE__ */ jsxs37(Text39, { color: highlightLine ? PALETTE.warning : void 0, children: [
26266
26208
  prefix,
26267
26209
  segments.map(
26268
- (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)
26210
+ (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)
26269
26211
  )
26270
26212
  ] });
26271
26213
  }
@@ -26277,31 +26219,31 @@ function CycleDetailPanel({
26277
26219
  height
26278
26220
  }) {
26279
26221
  const lines = [
26280
- /* @__PURE__ */ jsx49(Text39, { bold: true, color: PALETTE.warning, children: `SLOT DEPENDENCY CYCLES (${cycles.length})` }, "cyc-title"),
26281
- /* @__PURE__ */ jsx49(Text39, { color: PALETTE.muted, children: "push will fail until these are resolved" }, "cyc-sub"),
26282
- /* @__PURE__ */ jsx49(Text39, { color: PALETTE.muted, children: "Reject a cycle member or remove a slot edge to break the cycle." }, "cyc-guidance"),
26283
- /* @__PURE__ */ jsx49(Text39, { children: " " }, "cyc-space")
26222
+ /* @__PURE__ */ jsx47(Text39, { bold: true, color: PALETTE.warning, children: `SLOT DEPENDENCY CYCLES (${cycles.length})` }, "cyc-title"),
26223
+ /* @__PURE__ */ jsx47(Text39, { color: PALETTE.muted, children: "push will fail until these are resolved" }, "cyc-sub"),
26224
+ /* @__PURE__ */ jsx47(Text39, { color: PALETTE.muted, children: "Reject a cycle member or remove a slot edge to break the cycle." }, "cyc-guidance"),
26225
+ /* @__PURE__ */ jsx47(Text39, { children: " " }, "cyc-space")
26284
26226
  ];
26285
26227
  cycles.forEach((cycle, index) => {
26286
26228
  const nodeCount = new Set(cycle.path).size;
26287
26229
  const isCursor = index === cursor;
26288
26230
  lines.push(
26289
- /* @__PURE__ */ jsx49(Text39, { bold: true, inverse: isCursor, children: `${isCursor ? figures8.pointer : " "} Cycle ${index + 1} (${nodeCount} component${nodeCount === 1 ? "" : "s"}):` }, `cyc-h-${index}`),
26290
- /* @__PURE__ */ jsx49(CyclePathLine, { segments: formatCyclePathSegments2(cycle, 16), prefix: " " }, `cyc-p-${index}`)
26231
+ /* @__PURE__ */ jsx47(Text39, { bold: true, inverse: isCursor, children: `${isCursor ? figures8.pointer : " "} Cycle ${index + 1} (${nodeCount} component${nodeCount === 1 ? "" : "s"}):` }, `cyc-h-${index}`),
26232
+ /* @__PURE__ */ jsx47(CyclePathLine, { segments: formatCyclePathSegments2(cycle, 16), prefix: " " }, `cyc-p-${index}`)
26291
26233
  );
26292
26234
  if (cycle.suggestedBreak) {
26293
26235
  lines.push(
26294
- /* @__PURE__ */ jsx49(Text39, { color: PALETTE.muted, children: ` Suggested fix: remove [${cycle.suggestedBreak.slotName}] from ${cycle.suggestedBreak.fromComponent}` }, `cyc-fix-${index}`)
26236
+ /* @__PURE__ */ jsx47(Text39, { color: PALETTE.muted, children: ` Suggested fix: remove [${cycle.suggestedBreak.slotName}] from ${cycle.suggestedBreak.fromComponent}` }, `cyc-fix-${index}`)
26295
26237
  );
26296
26238
  }
26297
- lines.push(/* @__PURE__ */ jsx49(Text39, { children: " " }, `cyc-s-${index}`));
26239
+ lines.push(/* @__PURE__ */ jsx47(Text39, { children: " " }, `cyc-s-${index}`));
26298
26240
  });
26299
26241
  const footer = "[\u2191\u2193] move [Enter] fix cycle [c/q/Esc] close";
26300
26242
  const viewportHeight = Math.max(1, height - 3);
26301
26243
  const visible = lines.slice(scrollOffset, scrollOffset + viewportHeight - 1);
26302
26244
  return /* @__PURE__ */ jsxs37(FixedPanel, { width, height, borderStyle: "round", borderColor: PALETTE.warning, paddingLeft: 1, children: [
26303
26245
  visible,
26304
- /* @__PURE__ */ jsx49(Text39, { color: PALETTE.muted, children: footer })
26246
+ /* @__PURE__ */ jsx47(Text39, { color: PALETTE.muted, children: footer })
26305
26247
  ] });
26306
26248
  }
26307
26249
  function BreakCyclePanel({
@@ -26313,13 +26255,13 @@ function BreakCyclePanel({
26313
26255
  height
26314
26256
  }) {
26315
26257
  return /* @__PURE__ */ jsxs37(FixedPanel, { width, height, borderStyle: "round", borderColor: PALETTE.warning, paddingLeft: 1, children: [
26316
- /* @__PURE__ */ jsx49(Text39, { bold: true, color: PALETTE.warning, children: "BREAK CYCLE \u2014 remove a slot edge" }),
26317
- cycle && /* @__PURE__ */ jsx49(CyclePathLine, { segments: formatCyclePathSegments2(cycle), prefix: " ", highlightComponents: true }),
26318
- /* @__PURE__ */ jsx49(Text39, { color: PALETTE.muted, children: cycle ? "Deleting an edge removes it from $allowedComponents (undo with Ctrl+Z)." : "No cycle highlighted." }),
26319
- /* @__PURE__ */ jsx49(Text39, { children: " " }),
26320
- edges.length > 0 && /* @__PURE__ */ jsx49(Text39, { color: PALETTE.muted, children: "remove slot edge:" }),
26321
- 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}`)),
26322
- 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" })
26258
+ /* @__PURE__ */ jsx47(Text39, { bold: true, color: PALETTE.warning, children: "BREAK CYCLE \u2014 remove a slot edge" }),
26259
+ cycle && /* @__PURE__ */ jsx47(CyclePathLine, { segments: formatCyclePathSegments2(cycle), prefix: " ", highlightComponents: true }),
26260
+ /* @__PURE__ */ jsx47(Text39, { color: PALETTE.muted, children: cycle ? "Deleting an edge removes it from $allowedComponents (undo with Ctrl+Z)." : "No cycle highlighted." }),
26261
+ /* @__PURE__ */ jsx47(Text39, { children: " " }),
26262
+ edges.length > 0 && /* @__PURE__ */ jsx47(Text39, { color: PALETTE.muted, children: "remove slot edge:" }),
26263
+ 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}`)),
26264
+ 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" })
26323
26265
  ] });
26324
26266
  }
26325
26267
  var HELP_SECTIONS2 = [
@@ -26425,9 +26367,9 @@ function deriveBreakingChanges(response) {
26425
26367
  }
26426
26368
  function GenerateReviewStep(props) {
26427
26369
  if (!props.extractSessionId) {
26428
- 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." }) });
26370
+ 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." }) });
26429
26371
  }
26430
- return /* @__PURE__ */ jsx49(GenerateReviewStepView, { ...props, extractSessionId: props.extractSessionId });
26372
+ return /* @__PURE__ */ jsx47(GenerateReviewStepView, { ...props, extractSessionId: props.extractSessionId });
26431
26373
  }
26432
26374
  function GenerateReviewStepView({
26433
26375
  extractSessionId,
@@ -27284,13 +27226,13 @@ function GenerateReviewStepView({
27284
27226
  }
27285
27227
  });
27286
27228
  if (loading) {
27287
- return /* @__PURE__ */ jsx49(ReviewLoadingState, {});
27229
+ return /* @__PURE__ */ jsx47(ReviewLoadingState, {});
27288
27230
  }
27289
27231
  if (loadError) {
27290
- return /* @__PURE__ */ jsx49(ReviewLoadError, { message: loadError });
27232
+ return /* @__PURE__ */ jsx47(ReviewLoadError, { message: loadError });
27291
27233
  }
27292
27234
  if (showHelp) {
27293
- return /* @__PURE__ */ jsx49(HelpOverlay, { sections: HELP_SECTIONS2, handleInput: false, onClose: () => setShowHelp(false) });
27235
+ return /* @__PURE__ */ jsx47(HelpOverlay, { sections: HELP_SECTIONS2, handleInput: false, onClose: () => setShowHelp(false) });
27294
27236
  }
27295
27237
  const { selected, selectedJson, visibleJsonPanelValue } = getReviewSelectionState(
27296
27238
  components,
@@ -27330,9 +27272,9 @@ function GenerateReviewStepView({
27330
27272
  for (const c2 of closures.values()) if (c2.nodes.length > 1) return true;
27331
27273
  return false;
27332
27274
  })();
27333
- return /* @__PURE__ */ jsxs37(Box36, { flexDirection: "column", children: [
27334
- /* @__PURE__ */ jsx49(StepHeader, { step: "review" }),
27335
- /* @__PURE__ */ jsx49(
27275
+ return /* @__PURE__ */ jsxs37(Box37, { flexDirection: "column", children: [
27276
+ /* @__PURE__ */ jsx47(StepHeader, { step: "review" }),
27277
+ /* @__PURE__ */ jsx47(
27336
27278
  ReviewStepDialogs,
27337
27279
  {
27338
27280
  surfaceState: reviewSurface,
@@ -27342,15 +27284,15 @@ function GenerateReviewStepView({
27342
27284
  onQuit
27343
27285
  }
27344
27286
  ),
27345
- /* @__PURE__ */ jsx49(ReviewReloadDialog, { open: showReloadDialog && !dialogOpen }),
27346
- removedComponents.length > 0 && !dialogOpen && /* @__PURE__ */ jsxs37(Box36, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.error, paddingX: 1, children: [
27347
- /* @__PURE__ */ jsx49(Text39, { bold: true, color: PALETTE.error, children: removedComponentsHeader(removedComponents.length, true) }),
27348
- !removedBannerCollapsed && /* @__PURE__ */ jsxs37(Fragment16, { children: [
27349
- /* @__PURE__ */ jsx49(Text39, { children: " " }),
27350
- removedComponents.map((rc) => /* @__PURE__ */ jsx49(Text39, { children: removedComponentLine(rc) }, rc.id))
27287
+ /* @__PURE__ */ jsx47(ReviewReloadDialog, { open: showReloadDialog && !dialogOpen }),
27288
+ removedComponents.length > 0 && !dialogOpen && /* @__PURE__ */ jsxs37(Box37, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.error, paddingX: 1, children: [
27289
+ /* @__PURE__ */ jsx47(Text39, { bold: true, color: PALETTE.error, children: removedComponentsHeader(removedComponents.length, true) }),
27290
+ !removedBannerCollapsed && /* @__PURE__ */ jsxs37(Fragment14, { children: [
27291
+ /* @__PURE__ */ jsx47(Text39, { children: " " }),
27292
+ removedComponents.map((rc) => /* @__PURE__ */ jsx47(Text39, { children: removedComponentLine(rc) }, rc.id))
27351
27293
  ] })
27352
27294
  ] }),
27353
- breakingChanges.length > 0 && !dialogOpen && /* @__PURE__ */ jsx49(Box36, { paddingX: 1, children: /* @__PURE__ */ jsx49(
27295
+ breakingChanges.length > 0 && !dialogOpen && /* @__PURE__ */ jsx47(Box37, { paddingX: 1, children: /* @__PURE__ */ jsx47(
27354
27296
  Text39,
27355
27297
  {
27356
27298
  color: PALETTE.warning,
@@ -27361,14 +27303,14 @@ function GenerateReviewStepView({
27361
27303
  const row = breakingRows[breakingCursor];
27362
27304
  const comp = row ? breakingChanges.find((b) => b.componentName === row.componentName) : void 0;
27363
27305
  if (!comp) return null;
27364
- return /* @__PURE__ */ jsxs37(Box36, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
27365
- /* @__PURE__ */ jsx49(Text39, { bold: true, color: PALETTE.warning, children: `Breaking changes \u2014 ${comp.componentName}` }),
27366
- 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"}` }),
27367
- 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}`)),
27368
- /* @__PURE__ */ jsx49(Text39, { children: "[D/Esc] close detail" })
27306
+ return /* @__PURE__ */ jsxs37(Box37, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
27307
+ /* @__PURE__ */ jsx47(Text39, { bold: true, color: PALETTE.warning, children: `Breaking changes \u2014 ${comp.componentName}` }),
27308
+ 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"}` }),
27309
+ 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}`)),
27310
+ /* @__PURE__ */ jsx47(Text39, { children: "[D/Esc] close detail" })
27369
27311
  ] });
27370
27312
  })(),
27371
- !dialogOpen && /* @__PURE__ */ jsx49(
27313
+ !dialogOpen && /* @__PURE__ */ jsx47(
27372
27314
  LivePreviewSummary,
27373
27315
  {
27374
27316
  enabled: livePreview,
@@ -27387,16 +27329,16 @@ function GenerateReviewStepView({
27387
27329
  const participantSet = cycleView.structural;
27388
27330
  const members = stillRejected.filter((n) => participantSet.has(n)).sort();
27389
27331
  const ancestors = stillRejected.filter((n) => !participantSet.has(n)).sort();
27390
- return /* @__PURE__ */ jsxs37(Box36, { flexDirection: "column", borderStyle: "single", borderColor: PALETTE.error, paddingX: 1, children: [
27391
- /* @__PURE__ */ jsx49(Text39, { color: PALETTE.error, bold: true, children: `Cyclic component graph \u2014 auto-rejected ${stillRejected.length} component${stillRejected.length === 1 ? "" : "s"}:` }),
27392
- members.length > 0 && /* @__PURE__ */ jsx49(Text39, { color: PALETTE.error, children: ` Cycle members: ${members.join(", ")}` }),
27393
- ancestors.length > 0 && /* @__PURE__ */ jsx49(Text39, { color: PALETTE.error, children: ` Ancestors: ${ancestors.join(", ")}` }),
27394
- /* @__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" })
27332
+ return /* @__PURE__ */ jsxs37(Box37, { flexDirection: "column", borderStyle: "single", borderColor: PALETTE.error, paddingX: 1, children: [
27333
+ /* @__PURE__ */ jsx47(Text39, { color: PALETTE.error, bold: true, children: `Cyclic component graph \u2014 auto-rejected ${stillRejected.length} component${stillRejected.length === 1 ? "" : "s"}:` }),
27334
+ members.length > 0 && /* @__PURE__ */ jsx47(Text39, { color: PALETTE.error, children: ` Cycle members: ${members.join(", ")}` }),
27335
+ ancestors.length > 0 && /* @__PURE__ */ jsx47(Text39, { color: PALETTE.error, children: ` Ancestors: ${ancestors.join(", ")}` }),
27336
+ /* @__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" })
27395
27337
  ] });
27396
27338
  })(),
27397
- /* @__PURE__ */ jsx49(ReviewEmptyComponentsWarning, { count: emptyCount, hidden: dialogOpen }),
27398
- /* @__PURE__ */ jsx49(ReviewFinalizeError, { message: finalizeError, hidden: dialogOpen }),
27399
- !dialogOpen && breakPanel.isOpen && /* @__PURE__ */ jsx49(
27339
+ /* @__PURE__ */ jsx47(ReviewEmptyComponentsWarning, { count: emptyCount, hidden: dialogOpen }),
27340
+ /* @__PURE__ */ jsx47(ReviewFinalizeError, { message: finalizeError, hidden: dialogOpen }),
27341
+ !dialogOpen && breakPanel.isOpen && /* @__PURE__ */ jsx47(
27400
27342
  BreakCyclePanel,
27401
27343
  {
27402
27344
  cycle: cycleRows[cyclesCursor],
@@ -27407,7 +27349,7 @@ function GenerateReviewStepView({
27407
27349
  height: panelHeight
27408
27350
  }
27409
27351
  ),
27410
- !dialogOpen && cyclePanel.isOpen && !breakPanel.isOpen && /* @__PURE__ */ jsx49(
27352
+ !dialogOpen && cyclePanel.isOpen && !breakPanel.isOpen && /* @__PURE__ */ jsx47(
27411
27353
  CycleDetailPanel,
27412
27354
  {
27413
27355
  cycles: cycleRows,
@@ -27417,8 +27359,8 @@ function GenerateReviewStepView({
27417
27359
  height: panelHeight
27418
27360
  }
27419
27361
  ),
27420
- !dialogOpen && !cyclePanel.isOpen && !breakPanel.isOpen && /* @__PURE__ */ jsxs37(Box36, { children: [
27421
- breakingPanel.isOpen ? /* @__PURE__ */ jsx49(
27362
+ !dialogOpen && !cyclePanel.isOpen && !breakPanel.isOpen && /* @__PURE__ */ jsxs37(Box37, { children: [
27363
+ breakingPanel.isOpen ? /* @__PURE__ */ jsx47(
27422
27364
  GotoBanner,
27423
27365
  {
27424
27366
  title: `Breaking changes \u2014 ${breakingRows[breakingCursor]?.componentName ?? "unknown component"}`,
@@ -27431,7 +27373,7 @@ function GenerateReviewStepView({
27431
27373
  width: sidebarWidth,
27432
27374
  footerHint: "[\u2191/\u2193] move \xB7 [Enter] jump \xB7 [D] detail \xB7 [Esc] close"
27433
27375
  }
27434
- ) : /* @__PURE__ */ jsx49(
27376
+ ) : /* @__PURE__ */ jsx47(
27435
27377
  GroupedSidebar,
27436
27378
  {
27437
27379
  items: groupedItems,
@@ -27472,7 +27414,7 @@ function GenerateReviewStepView({
27472
27414
  graph: sidebarGraph
27473
27415
  }
27474
27416
  ),
27475
- selected ? /* @__PURE__ */ jsx49(
27417
+ selected ? /* @__PURE__ */ jsx47(
27476
27418
  ReviewComponentPanel,
27477
27419
  {
27478
27420
  selectedKey: selected.key,
@@ -27504,12 +27446,12 @@ function GenerateReviewStepView({
27504
27446
  livePreview: livePreviewHook,
27505
27447
  livePreviewSpinner
27506
27448
  }
27507
- ) : /* @__PURE__ */ jsx49(ReviewNoSelection, {})
27449
+ ) : /* @__PURE__ */ jsx47(ReviewNoSelection, {})
27508
27450
  ] }),
27509
- !dialogOpen && cycleRows.length > 0 && !cyclePanel.isOpen && !breakPanel.isOpen && /* @__PURE__ */ jsxs37(Box36, { flexDirection: "column", children: [
27510
- /* @__PURE__ */ jsx49(Text39, { color: PALETTE.warning, children: `\u26A0 ${cycleRows.length} slot dependency cycle${cycleRows.length === 1 ? "" : "s"} detected \u2014 push will fail` }),
27451
+ !dialogOpen && cycleRows.length > 0 && !cyclePanel.isOpen && !breakPanel.isOpen && /* @__PURE__ */ jsxs37(Box37, { flexDirection: "column", children: [
27452
+ /* @__PURE__ */ jsx47(Text39, { color: PALETTE.warning, children: `\u26A0 ${cycleRows.length} slot dependency cycle${cycleRows.length === 1 ? "" : "s"} detected \u2014 push will fail` }),
27511
27453
  cycleRows.slice(0, 3).map((cycle, idx) => {
27512
- return /* @__PURE__ */ jsx49(
27454
+ return /* @__PURE__ */ jsx47(
27513
27455
  CyclePathLine,
27514
27456
  {
27515
27457
  segments: formatCyclePathSegments2(cycle),
@@ -27520,10 +27462,10 @@ function GenerateReviewStepView({
27520
27462
  `cyc-banner-${idx}`
27521
27463
  );
27522
27464
  }),
27523
- cycleRows.length > 3 && /* @__PURE__ */ jsx49(Text39, { color: PALETTE.warning, children: ` \u2026${cycleRows.length - 3} more` }),
27524
- /* @__PURE__ */ jsx49(Text39, { children: " press [c] for detail" })
27465
+ cycleRows.length > 3 && /* @__PURE__ */ jsx47(Text39, { color: PALETTE.warning, children: ` \u2026${cycleRows.length - 3} more` }),
27466
+ /* @__PURE__ */ jsx47(Text39, { children: " press [c] for detail" })
27525
27467
  ] }),
27526
- /* @__PURE__ */ jsx49(
27468
+ /* @__PURE__ */ jsx47(
27527
27469
  SearchMatchSummary,
27528
27470
  {
27529
27471
  open: searchOpen,
@@ -27534,27 +27476,27 @@ function GenerateReviewStepView({
27534
27476
  hidden: dialogOpen
27535
27477
  }
27536
27478
  ),
27537
- !dialogOpen && sidebarFocused && /* @__PURE__ */ jsx49(CompactControlBar, { hasGroupRoots, searchActive: searchOpen || searchQuery.length > 0 })
27479
+ !dialogOpen && sidebarFocused && /* @__PURE__ */ jsx47(CompactControlBar, { hasGroupRoots, searchActive: searchOpen || searchQuery.length > 0 })
27538
27480
  ] });
27539
27481
  }
27540
27482
 
27541
27483
  // packages/experience-design-system-cli/src/tui/import/steps/10-flow/components/CustomPromptBanner.tsx
27542
- import { Box as Box37, Text as Text40 } from "ink";
27543
- import { jsx as jsx50, jsxs as jsxs38 } from "react/jsx-runtime";
27484
+ import { Box as Box38, Text as Text40 } from "ink";
27485
+ import { jsx as jsx48, jsxs as jsxs38 } from "react/jsx-runtime";
27544
27486
  function CustomPromptBanner({ generatePromptPath }) {
27545
27487
  if (!generatePromptPath) return null;
27546
- return /* @__PURE__ */ jsxs38(Box37, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
27547
- /* @__PURE__ */ jsx50(Text40, { color: PALETTE.warning, bold: true, children: "WARNING: Custom prompt active" }),
27488
+ return /* @__PURE__ */ jsxs38(Box38, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
27489
+ /* @__PURE__ */ jsx48(Text40, { color: PALETTE.warning, bold: true, children: "WARNING: Custom prompt active" }),
27548
27490
  generatePromptPath ? /* @__PURE__ */ jsxs38(Text40, { color: PALETTE.warning, children: [
27549
27491
  "components: ",
27550
27492
  generatePromptPath
27551
27493
  ] }) : null,
27552
- /* @__PURE__ */ jsx50(Text40, { color: PALETTE.warning, children: "Bundled invariants (utility-wrapper rejection, description content rules) do NOT apply." })
27494
+ /* @__PURE__ */ jsx48(Text40, { color: PALETTE.warning, children: "Bundled invariants (utility-wrapper rejection, description content rules) do NOT apply." })
27553
27495
  ] });
27554
27496
  }
27555
27497
 
27556
27498
  // packages/experience-design-system-cli/src/tui/import/steps/10-flow/screens/DoneStep.tsx
27557
- import { Box as Box39, Text as Text42 } from "ink";
27499
+ import { Box as Box40, Text as Text42 } from "ink";
27558
27500
 
27559
27501
  // packages/experience-design-system-cli/src/tui/import/steps/10-flow/support/contentful-urls.ts
27560
27502
  function normalizeHost(host) {
@@ -27570,26 +27512,26 @@ function buildPostPushUrl2({ host, spaceId, environmentId, view = "components" }
27570
27512
  }
27571
27513
 
27572
27514
  // packages/experience-design-system-cli/src/tui/import/steps/10-flow/components/SpaceEnvironment.tsx
27573
- import { Box as Box38, Text as Text41 } from "ink";
27574
- import { jsx as jsx51, jsxs as jsxs39 } from "react/jsx-runtime";
27515
+ import { Box as Box39, Text as Text41 } from "ink";
27516
+ import { jsx as jsx49, jsxs as jsxs39 } from "react/jsx-runtime";
27575
27517
  function SpaceEnvironment({ spaceId, environmentId }) {
27576
- return /* @__PURE__ */ jsxs39(Box38, { gap: 1, marginTop: 1, children: [
27577
- /* @__PURE__ */ jsx51(Text41, { color: PALETTE.muted, children: "Space:" }),
27578
- /* @__PURE__ */ jsx51(Text41, { children: spaceId }),
27579
- /* @__PURE__ */ jsx51(Text41, { color: PALETTE.muted, children: "/" }),
27580
- /* @__PURE__ */ jsx51(Text41, { color: PALETTE.muted, children: "Environment:" }),
27581
- /* @__PURE__ */ jsx51(Text41, { children: environmentId })
27518
+ return /* @__PURE__ */ jsxs39(Box39, { gap: 1, marginTop: 1, children: [
27519
+ /* @__PURE__ */ jsx49(Text41, { color: PALETTE.muted, children: "Space:" }),
27520
+ /* @__PURE__ */ jsx49(Text41, { children: spaceId }),
27521
+ /* @__PURE__ */ jsx49(Text41, { color: PALETTE.muted, children: "/" }),
27522
+ /* @__PURE__ */ jsx49(Text41, { color: PALETTE.muted, children: "Environment:" }),
27523
+ /* @__PURE__ */ jsx49(Text41, { children: environmentId })
27582
27524
  ] });
27583
27525
  }
27584
27526
 
27585
27527
  // packages/experience-design-system-cli/src/tui/import/steps/10-flow/screens/DoneStep.tsx
27586
- import { Fragment as Fragment17, jsx as jsx52, jsxs as jsxs40 } from "react/jsx-runtime";
27528
+ import { Fragment as Fragment15, jsx as jsx50, jsxs as jsxs40 } from "react/jsx-runtime";
27587
27529
  var ACTIONS = ["created", "updated", "removed"];
27588
27530
  function EntityRows({ entity, label }) {
27589
27531
  const plural3 = (n) => `${n} ${label}${n !== 1 ? "s" : ""}`;
27590
- return /* @__PURE__ */ jsxs40(Fragment17, { children: [
27532
+ return /* @__PURE__ */ jsxs40(Fragment15, { children: [
27591
27533
  ACTIONS.filter((action) => entity[action] > 0).map((action) => /* @__PURE__ */ jsxs40(Text42, { children: [
27592
- /* @__PURE__ */ jsx52(Text42, { color: PALETTE.success, children: "\u2713" }),
27534
+ /* @__PURE__ */ jsx50(Text42, { color: PALETTE.success, children: "\u2713" }),
27593
27535
  " ",
27594
27536
  plural3(entity[action]),
27595
27537
  " ",
@@ -27603,9 +27545,9 @@ function EntityRows({ entity, label }) {
27603
27545
  ] });
27604
27546
  }
27605
27547
  function LinkRow({ title, url }) {
27606
- return /* @__PURE__ */ jsxs40(Box39, { flexDirection: "column", children: [
27607
- /* @__PURE__ */ jsx52(Text42, { color: PALETTE.muted, children: title }),
27608
- /* @__PURE__ */ jsx52(Text42, { color: PALETTE.accent, children: url })
27548
+ return /* @__PURE__ */ jsxs40(Box40, { flexDirection: "column", children: [
27549
+ /* @__PURE__ */ jsx50(Text42, { color: PALETTE.muted, children: title }),
27550
+ /* @__PURE__ */ jsx50(Text42, { color: PALETTE.accent, children: url })
27609
27551
  ] });
27610
27552
  }
27611
27553
  function DoneStep({
@@ -27629,14 +27571,14 @@ function DoneStep({
27629
27571
  const totalPushed = componentTypes.created + componentTypes.updated + componentTypes.removed + designTokens.created + designTokens.updated + designTokens.removed;
27630
27572
  const success = totalFailed === 0;
27631
27573
  const urlArgs = { host: host ?? "api.contentful.com", spaceId, environmentId };
27632
- return /* @__PURE__ */ jsxs40(Box39, { flexDirection: "column", children: [
27633
- /* @__PURE__ */ jsx52(StepHeader, { step: "done" }),
27634
- /* @__PURE__ */ jsxs40(Box39, { flexDirection: "column", gap: 1, paddingX: 2, paddingBottom: 1, children: [
27635
- success ? /* @__PURE__ */ jsx52(Text42, { bold: true, color: PALETTE.success, children: "Done!" }) : /* @__PURE__ */ jsx52(Text42, { bold: true, color: PALETTE.warning, children: "\u26A0 Finished with errors" }),
27636
- 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: [
27637
- /* @__PURE__ */ jsx52(EntityRows, { entity: componentTypes, label: "Component" }),
27638
- /* @__PURE__ */ jsx52(EntityRows, { entity: designTokens, label: "Design Token" }),
27639
- summary && /* @__PURE__ */ jsx52(Box39, { marginTop: 1, children: /* @__PURE__ */ jsxs40(Text42, { color: PALETTE.muted, children: [
27574
+ return /* @__PURE__ */ jsxs40(Box40, { flexDirection: "column", children: [
27575
+ /* @__PURE__ */ jsx50(StepHeader, { step: "done" }),
27576
+ /* @__PURE__ */ jsxs40(Box40, { flexDirection: "column", gap: 1, paddingX: 2, paddingBottom: 1, children: [
27577
+ success ? /* @__PURE__ */ jsx50(Text42, { bold: true, color: PALETTE.success, children: "Done!" }) : /* @__PURE__ */ jsx50(Text42, { bold: true, color: PALETTE.warning, children: "\u26A0 Finished with errors" }),
27578
+ 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: [
27579
+ /* @__PURE__ */ jsx50(EntityRows, { entity: componentTypes, label: "Component" }),
27580
+ /* @__PURE__ */ jsx50(EntityRows, { entity: designTokens, label: "Design Token" }),
27581
+ summary && /* @__PURE__ */ jsx50(Box40, { marginTop: 1, children: /* @__PURE__ */ jsxs40(Text42, { color: PALETTE.muted, children: [
27640
27582
  "Push result: ",
27641
27583
  summary.succeeded,
27642
27584
  "/",
@@ -27649,8 +27591,8 @@ function DoneStep({
27649
27591
  ] })
27650
27592
  ] }) })
27651
27593
  ] }),
27652
- failures.length > 0 && /* @__PURE__ */ jsxs40(Box39, { flexDirection: "column", children: [
27653
- /* @__PURE__ */ jsx52(Text42, { bold: true, color: PALETTE.error, children: "Failure details" }),
27594
+ failures.length > 0 && /* @__PURE__ */ jsxs40(Box40, { flexDirection: "column", children: [
27595
+ /* @__PURE__ */ jsx50(Text42, { bold: true, color: PALETTE.error, children: "Failure details" }),
27654
27596
  failures.map((failure) => /* @__PURE__ */ jsxs40(Text42, { color: PALETTE.error, children: [
27655
27597
  failure.entityType,
27656
27598
  " ",
@@ -27659,11 +27601,11 @@ function DoneStep({
27659
27601
  failure.message
27660
27602
  ] }, `${failure.entityType}:${failure.entityId}`))
27661
27603
  ] }),
27662
- /* @__PURE__ */ jsx52(SpaceEnvironment, { spaceId, environmentId }),
27663
- success && totalPushed > 0 && /* @__PURE__ */ jsxs40(Box39, { flexDirection: "column", gap: 1, children: [
27664
- /* @__PURE__ */ jsx52(Text42, { color: PALETTE.success, children: "Your design system is now in Contentful Experiences." }),
27665
- produced.components && /* @__PURE__ */ jsx52(LinkRow, { title: "View your components here:", url: buildPostPushUrl2(urlArgs) }),
27666
- produced.tokens && /* @__PURE__ */ jsx52(
27604
+ /* @__PURE__ */ jsx50(SpaceEnvironment, { spaceId, environmentId }),
27605
+ success && totalPushed > 0 && /* @__PURE__ */ jsxs40(Box40, { flexDirection: "column", gap: 1, children: [
27606
+ /* @__PURE__ */ jsx50(Text42, { color: PALETTE.success, children: "Your design system is now in Contentful Experiences." }),
27607
+ produced.components && /* @__PURE__ */ jsx50(LinkRow, { title: "View your components here:", url: buildPostPushUrl2(urlArgs) }),
27608
+ produced.tokens && /* @__PURE__ */ jsx50(
27667
27609
  LinkRow,
27668
27610
  {
27669
27611
  title: "View your design tokens here:",
@@ -27671,14 +27613,14 @@ function DoneStep({
27671
27613
  }
27672
27614
  )
27673
27615
  ] }),
27674
- /* @__PURE__ */ jsx52(ControlHints, { hints: [{ keys: "Enter / q", label: "Exit" }] })
27616
+ /* @__PURE__ */ jsx50(ControlHints, { hints: [{ keys: "Enter / q", label: "Exit" }] })
27675
27617
  ] })
27676
27618
  ] });
27677
27619
  }
27678
27620
 
27679
27621
  // packages/experience-design-system-cli/src/tui/import/steps/10-flow/screens/PathPrompt.tsx
27680
27622
  import { useState as useState27 } from "react";
27681
- import { Box as Box40, Text as Text43 } from "ink";
27623
+ import { Box as Box41, Text as Text43 } from "ink";
27682
27624
  import { readdirSync as readdirSync3 } from "node:fs";
27683
27625
  import { dirname as dirname16, basename as basename6, join as join20 } from "node:path";
27684
27626
 
@@ -27712,7 +27654,7 @@ function useBlinkingCursor() {
27712
27654
  }
27713
27655
 
27714
27656
  // packages/experience-design-system-cli/src/tui/import/steps/10-flow/screens/PathPrompt.tsx
27715
- import { jsx as jsx53, jsxs as jsxs41 } from "react/jsx-runtime";
27657
+ import { jsx as jsx51, jsxs as jsxs41 } from "react/jsx-runtime";
27716
27658
  function autocomplete(partial) {
27717
27659
  if (!partial) return null;
27718
27660
  const normalized = normalizePath(partial);
@@ -27769,19 +27711,19 @@ function PathPrompt({
27769
27711
  const shown = input || defaultPath;
27770
27712
  const isPlaceholder = input === "";
27771
27713
  const cursor = cursorVisible ? "\u2588" : " ";
27772
- return /* @__PURE__ */ jsxs41(Box40, { flexDirection: "column", children: [
27773
- /* @__PURE__ */ jsx53(StepHeader, { step: "push" }),
27774
- /* @__PURE__ */ jsxs41(Box40, { flexDirection: "column", gap: 1, paddingX: 2, paddingBottom: 1, children: [
27775
- /* @__PURE__ */ jsxs41(Box40, { gap: 1, children: [
27776
- /* @__PURE__ */ jsx53(Text43, { color: PALETTE.accent, children: "?" }),
27714
+ return /* @__PURE__ */ jsxs41(Box41, { flexDirection: "column", children: [
27715
+ /* @__PURE__ */ jsx51(StepHeader, { step: "push" }),
27716
+ /* @__PURE__ */ jsxs41(Box41, { flexDirection: "column", gap: 1, paddingX: 2, paddingBottom: 1, children: [
27717
+ /* @__PURE__ */ jsxs41(Box41, { gap: 1, children: [
27718
+ /* @__PURE__ */ jsx51(Text43, { color: PALETTE.accent, children: "?" }),
27777
27719
  /* @__PURE__ */ jsxs41(Text43, { bold: true, children: [
27778
27720
  label,
27779
27721
  ":"
27780
27722
  ] }),
27781
- /* @__PURE__ */ jsx53(Text43, { color: isPlaceholder ? PALETTE.muted : void 0, children: shown }),
27782
- /* @__PURE__ */ jsx53(Text43, { children: cursor })
27723
+ /* @__PURE__ */ jsx51(Text43, { color: isPlaceholder ? PALETTE.muted : void 0, children: shown }),
27724
+ /* @__PURE__ */ jsx51(Text43, { children: cursor })
27783
27725
  ] }),
27784
- /* @__PURE__ */ jsx53(
27726
+ /* @__PURE__ */ jsx51(
27785
27727
  ControlHints,
27786
27728
  {
27787
27729
  hints: [
@@ -27796,7 +27738,7 @@ function PathPrompt({
27796
27738
  }
27797
27739
 
27798
27740
  // packages/experience-design-system-cli/src/tui/import/steps/10-flow/screens/PushingStep.tsx
27799
- import { Box as Box41, Text as Text44 } from "ink";
27741
+ import { Box as Box42, Text as Text44 } from "ink";
27800
27742
  import { ProgressBar as ProgressBar2, ThemeProvider as ThemeProvider2 } from "@inkjs/ui";
27801
27743
 
27802
27744
  // packages/experience-design-system-cli/src/tui/import/steps/10-flow/support/produced.ts
@@ -27814,7 +27756,7 @@ function writtenThings({ components, tokens }) {
27814
27756
  // packages/experience-design-system-cli/src/tui/import/steps/10-flow/support/use-timed-spinner.tsx
27815
27757
  import { useEffect as useEffect19, useState as useState28 } from "react";
27816
27758
  import { Spinner as Spinner2 } from "@inkjs/ui";
27817
- import { jsx as jsx54 } from "react/jsx-runtime";
27759
+ import { jsx as jsx52 } from "react/jsx-runtime";
27818
27760
  function useTimedSpinner() {
27819
27761
  const [elapsedSeconds, setElapsedSeconds] = useState28(0);
27820
27762
  useEffect19(() => {
@@ -27826,32 +27768,32 @@ function useTimedSpinner() {
27826
27768
  const mins = Math.floor(elapsedSeconds / 60);
27827
27769
  const secs = elapsedSeconds % 60;
27828
27770
  return {
27829
- spinner: /* @__PURE__ */ jsx54(Spinner2, {}),
27771
+ spinner: /* @__PURE__ */ jsx52(Spinner2, {}),
27830
27772
  elapsed: mins > 0 ? `${mins}m ${secs}s` : `${secs}s`
27831
27773
  };
27832
27774
  }
27833
27775
 
27834
27776
  // packages/experience-design-system-cli/src/tui/import/steps/10-flow/screens/PushingStep.tsx
27835
- import { jsx as jsx55, jsxs as jsxs42 } from "react/jsx-runtime";
27777
+ import { jsx as jsx53, jsxs as jsxs42 } from "react/jsx-runtime";
27836
27778
  function PushingStep({ progress, produced }) {
27837
27779
  const { elapsed } = useTimedSpinner();
27838
27780
  const operationId = progress && progress.kind === "queued" ? progress.operationId : null;
27839
27781
  const showGlobal = progress && progress.kind === "progress";
27840
27782
  const showCurrent = progress && progress.kind === "progress" && progress.current ? progress.current : null;
27841
- return /* @__PURE__ */ jsxs42(Box41, { flexDirection: "column", children: [
27842
- /* @__PURE__ */ jsx55(StepHeader, { step: "push" }),
27843
- /* @__PURE__ */ jsxs42(Box41, { flexDirection: "column", gap: 1, paddingX: 2, paddingBottom: 1, children: [
27783
+ return /* @__PURE__ */ jsxs42(Box42, { flexDirection: "column", children: [
27784
+ /* @__PURE__ */ jsx53(StepHeader, { step: "push" }),
27785
+ /* @__PURE__ */ jsxs42(Box42, { flexDirection: "column", gap: 1, paddingX: 2, paddingBottom: 1, children: [
27844
27786
  /* @__PURE__ */ jsxs42(Text44, { children: [
27845
27787
  "Writing ",
27846
27788
  writtenThings(produced),
27847
27789
  " to your Contentful space..."
27848
27790
  ] }),
27849
- operationId && /* @__PURE__ */ jsxs42(Box41, { gap: 1, children: [
27850
- /* @__PURE__ */ jsx55(Text44, { color: PALETTE.muted, children: "Operation:" }),
27851
- /* @__PURE__ */ jsx55(Text44, { children: operationId })
27791
+ operationId && /* @__PURE__ */ jsxs42(Box42, { gap: 1, children: [
27792
+ /* @__PURE__ */ jsx53(Text44, { color: PALETTE.muted, children: "Operation:" }),
27793
+ /* @__PURE__ */ jsx53(Text44, { children: operationId })
27852
27794
  ] }),
27853
- showGlobal && progress && progress.kind === "progress" && /* @__PURE__ */ jsx55(Box41, { gap: 1, flexDirection: "column", children: /* @__PURE__ */ jsxs42(Box41, { gap: 2, children: [
27854
- /* @__PURE__ */ jsx55(Box41, { width: 40, children: /* @__PURE__ */ jsx55(ThemeProvider2, { theme: PROGRESS_THEME, children: /* @__PURE__ */ jsx55(ProgressBar2, { value: Math.round(progress.processed / progress.total * 100) }) }) }),
27795
+ showGlobal && progress && progress.kind === "progress" && /* @__PURE__ */ jsx53(Box42, { gap: 1, flexDirection: "column", children: /* @__PURE__ */ jsxs42(Box42, { gap: 2, children: [
27796
+ /* @__PURE__ */ jsx53(Box42, { width: 40, children: /* @__PURE__ */ jsx53(ThemeProvider2, { theme: PROGRESS_THEME, children: /* @__PURE__ */ jsx53(ProgressBar2, { value: Math.round(progress.processed / progress.total * 100) }) }) }),
27855
27797
  /* @__PURE__ */ jsxs42(Text44, { color: PALETTE.muted, children: [
27856
27798
  progress.processed,
27857
27799
  "/",
@@ -27859,11 +27801,11 @@ function PushingStep({ progress, produced }) {
27859
27801
  " entities"
27860
27802
  ] })
27861
27803
  ] }) }),
27862
- showCurrent && /* @__PURE__ */ jsxs42(Box41, { gap: 1, children: [
27863
- /* @__PURE__ */ jsx55(Text44, { color: PALETTE.muted, children: "Now processing:" }),
27864
- /* @__PURE__ */ jsx55(Text44, { children: showCurrent })
27804
+ showCurrent && /* @__PURE__ */ jsxs42(Box42, { gap: 1, children: [
27805
+ /* @__PURE__ */ jsx53(Text44, { color: PALETTE.muted, children: "Now processing:" }),
27806
+ /* @__PURE__ */ jsx53(Text44, { children: showCurrent })
27865
27807
  ] }),
27866
- /* @__PURE__ */ jsx55(Box41, { marginTop: 1, children: /* @__PURE__ */ jsxs42(Text44, { color: PALETTE.muted, children: [
27808
+ /* @__PURE__ */ jsx53(Box42, { marginTop: 1, children: /* @__PURE__ */ jsxs42(Text44, { color: PALETTE.muted, children: [
27867
27809
  "Elapsed: ",
27868
27810
  elapsed
27869
27811
  ] }) })
@@ -27873,7 +27815,7 @@ function PushingStep({ progress, produced }) {
27873
27815
 
27874
27816
  // packages/experience-design-system-cli/src/tui/import/steps/10-flow/screens/WizardPreviewStep.tsx
27875
27817
  import { useEffect as useEffect20, useState as useState29, useMemo as useMemo5 } from "react";
27876
- import { Box as Box42, Text as Text45 } from "ink";
27818
+ import { Box as Box43, Text as Text45 } from "ink";
27877
27819
 
27878
27820
  // packages/experience-design-system-cli/src/tui/import/steps/10-flow/support/preview-diff.ts
27879
27821
  function computeComponentDiffLines(current, proposed, changeClassification) {
@@ -28051,7 +27993,7 @@ function usePreviewConfirmationInput(breakingWithImpact, onConfirm) {
28051
27993
  }
28052
27994
 
28053
27995
  // packages/experience-design-system-cli/src/tui/import/steps/10-flow/screens/WizardPreviewStep.tsx
28054
- import { Fragment as Fragment18, jsx as jsx56, jsxs as jsxs43 } from "react/jsx-runtime";
27996
+ import { Fragment as Fragment16, jsx as jsx54, jsxs as jsxs43 } from "react/jsx-runtime";
28055
27997
  function buildPreviewSummaryLines(preview) {
28056
27998
  const lines = [];
28057
27999
  const { components, tokens } = preview;
@@ -28303,11 +28245,11 @@ function WizardPreviewStep({
28303
28245
  return;
28304
28246
  }
28305
28247
  });
28306
- return /* @__PURE__ */ jsxs43(Box42, { flexDirection: "column", children: [
28307
- /* @__PURE__ */ jsx56(StepHeader, { step: "push" }),
28308
- /* @__PURE__ */ jsxs43(Box42, { flexDirection: "column", gap: 1, paddingX: 2, paddingBottom: 2, children: [
28309
- hasAnything ? /* @__PURE__ */ jsxs43(Fragment18, { children: [
28310
- /* @__PURE__ */ jsx56(Text45, { children: "Here's what will happen in your space:" }),
28248
+ return /* @__PURE__ */ jsxs43(Box43, { flexDirection: "column", children: [
28249
+ /* @__PURE__ */ jsx54(StepHeader, { step: "push" }),
28250
+ /* @__PURE__ */ jsxs43(Box43, { flexDirection: "column", gap: 1, paddingX: 2, paddingBottom: 2, children: [
28251
+ hasAnything ? /* @__PURE__ */ jsxs43(Fragment16, { children: [
28252
+ /* @__PURE__ */ jsx54(Text45, { children: "Here's what will happen in your space:" }),
28311
28253
  /* @__PURE__ */ jsxs43(
28312
28254
  WindowedPanel,
28313
28255
  {
@@ -28316,15 +28258,15 @@ function WizardPreviewStep({
28316
28258
  title: diffExpanded ? `Diff (${diffLines.length} lines)` : "",
28317
28259
  focused: false,
28318
28260
  children: [
28319
- activeLines.slice(boundedScrollOffset, boundedScrollOffset + viewportHeight).map((line) => /* @__PURE__ */ jsx56(Text45, { color: line.color, wrap: "truncate-end", children: line.text }, line.key)),
28320
- /* @__PURE__ */ jsx56(Text45, { color: PALETTE.muted, wrap: "truncate-end", children: formatPreviewScrollIndicator(activeLines.length, boundedScrollOffset, viewportHeight) })
28261
+ activeLines.slice(boundedScrollOffset, boundedScrollOffset + viewportHeight).map((line) => /* @__PURE__ */ jsx54(Text45, { color: line.color, wrap: "truncate-end", children: line.text }, line.key)),
28262
+ /* @__PURE__ */ jsx54(Text45, { color: PALETTE.muted, wrap: "truncate-end", children: formatPreviewScrollIndicator(activeLines.length, boundedScrollOffset, viewportHeight) })
28321
28263
  ]
28322
28264
  }
28323
28265
  )
28324
- ] }) : /* @__PURE__ */ jsx56(Text45, { color: PALETTE.muted, children: "Nothing to push \u2014 everything is already up to date." }),
28325
- 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." }) }),
28326
- /* @__PURE__ */ jsx56(SpaceEnvironment, { spaceId, environmentId }),
28327
- /* @__PURE__ */ jsx56(Box42, { marginTop: 1, children: /* @__PURE__ */ jsx56(
28266
+ ] }) : /* @__PURE__ */ jsx54(Text45, { color: PALETTE.muted, children: "Nothing to push \u2014 everything is already up to date." }),
28267
+ 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." }) }),
28268
+ /* @__PURE__ */ jsx54(SpaceEnvironment, { spaceId, environmentId }),
28269
+ /* @__PURE__ */ jsx54(Box43, { marginTop: 1, children: /* @__PURE__ */ jsx54(
28328
28270
  ControlHints,
28329
28271
  {
28330
28272
  hints: [
@@ -28350,7 +28292,7 @@ function buildRunTeaserLine(runId) {
28350
28292
  }
28351
28293
 
28352
28294
  // packages/experience-design-system-cli/src/tui/import/steps/10-flow/flow/screen.tsx
28353
- import { jsx as jsx57, jsxs as jsxs44 } from "react/jsx-runtime";
28295
+ import { jsx as jsx55, jsxs as jsxs44 } from "react/jsx-runtime";
28354
28296
  function canEditFromPreview(cdf) {
28355
28297
  if (!cdf) return false;
28356
28298
  return parseCDFComponents(cdf).components.length > 0;
@@ -28367,7 +28309,7 @@ function FlowScreen({
28367
28309
  const content = (() => {
28368
28310
  switch (state2.step) {
28369
28311
  case "final-review":
28370
- return /* @__PURE__ */ jsx57(
28312
+ return /* @__PURE__ */ jsx55(
28371
28313
  GenerateReviewStep,
28372
28314
  {
28373
28315
  extractSessionId: state2.extractSessionId,
@@ -28384,10 +28326,10 @@ function FlowScreen({
28384
28326
  }
28385
28327
  );
28386
28328
  case "previewing":
28387
- return /* @__PURE__ */ jsx57(RunningStep, { step: "push", description: "Computing diff against your Contentful space..." });
28329
+ return /* @__PURE__ */ jsx55(RunningStep, { step: "push", description: "Computing diff against your Contentful space..." });
28388
28330
  case "preview-gate":
28389
28331
  if (!state2.serverPreview) return null;
28390
- return /* @__PURE__ */ jsx57(
28332
+ return /* @__PURE__ */ jsx55(
28391
28333
  WizardPreviewStep,
28392
28334
  {
28393
28335
  preview: state2.serverPreview,
@@ -28399,9 +28341,9 @@ function FlowScreen({
28399
28341
  }
28400
28342
  );
28401
28343
  case "pushing":
28402
- return /* @__PURE__ */ jsx57(PushingStep, { progress: state2.pushProgress, produced });
28344
+ return /* @__PURE__ */ jsx55(PushingStep, { progress: state2.pushProgress, produced });
28403
28345
  case "path-prompt":
28404
- return /* @__PURE__ */ jsx57(
28346
+ return /* @__PURE__ */ jsx55(
28405
28347
  PathPrompt,
28406
28348
  {
28407
28349
  defaultPath: state2.outDir,
@@ -28410,10 +28352,10 @@ function FlowScreen({
28410
28352
  }
28411
28353
  );
28412
28354
  case "printing":
28413
- return /* @__PURE__ */ jsx57(RunningStep, { step: "push", description: "Writing output files to disk..." });
28355
+ return /* @__PURE__ */ jsx55(RunningStep, { step: "push", description: "Writing output files to disk..." });
28414
28356
  case "print-gate": {
28415
28357
  const teaser = buildRunTeaserLine(state2.lastRunId);
28416
- return /* @__PURE__ */ jsx57(
28358
+ return /* @__PURE__ */ jsx55(
28417
28359
  GateStep,
28418
28360
  {
28419
28361
  step: "push",
@@ -28428,7 +28370,7 @@ function FlowScreen({
28428
28370
  }
28429
28371
  case "done": {
28430
28372
  const totalFailed = state2.pushResult.componentTypes.failed + state2.pushResult.designTokens.failed;
28431
- return /* @__PURE__ */ jsx57(
28373
+ return /* @__PURE__ */ jsx55(
28432
28374
  DoneStep,
28433
28375
  {
28434
28376
  componentTypes: state2.pushResult.componentTypes,
@@ -28445,7 +28387,7 @@ function FlowScreen({
28445
28387
  );
28446
28388
  }
28447
28389
  case "preview-validation-error":
28448
- return /* @__PURE__ */ jsx57(
28390
+ return /* @__PURE__ */ jsx55(
28449
28391
  PreviewValidationErrorScreen,
28450
28392
  {
28451
28393
  errors: state2.previewValidationErrors,
@@ -28456,7 +28398,7 @@ function FlowScreen({
28456
28398
  }
28457
28399
  );
28458
28400
  case "error":
28459
- return /* @__PURE__ */ jsx57(
28401
+ return /* @__PURE__ */ jsx55(
28460
28402
  ErrorStep,
28461
28403
  {
28462
28404
  stepName: state2.errorStep,
@@ -28467,8 +28409,8 @@ function FlowScreen({
28467
28409
  );
28468
28410
  }
28469
28411
  })();
28470
- return /* @__PURE__ */ jsxs44(Box43, { flexDirection: "column", children: [
28471
- /* @__PURE__ */ jsx57(CustomPromptBanner, { generatePromptPath }),
28412
+ return /* @__PURE__ */ jsxs44(Box44, { flexDirection: "column", children: [
28413
+ /* @__PURE__ */ jsx55(CustomPromptBanner, { generatePromptPath }),
28472
28414
  content
28473
28415
  ] });
28474
28416
  }
@@ -29241,7 +29183,7 @@ function useFlow(start, options = {}) {
29241
29183
 
29242
29184
  // packages/experience-design-system-cli/src/tui/help/PageContainer.tsx
29243
29185
  import { useEffect as useEffect22, useState as useState30 } from "react";
29244
- import { Box as Box44, Text as Text46, useInput as useInput10 } from "ink";
29186
+ import { Box as Box45, Text as Text46, useInput as useInput12 } from "ink";
29245
29187
  init_debug_store();
29246
29188
 
29247
29189
  // packages/experience-design-system-cli/src/tui/help/help-info.ts
@@ -29302,13 +29244,13 @@ async function readHelpInfo() {
29302
29244
  }
29303
29245
 
29304
29246
  // packages/experience-design-system-cli/src/tui/help/PageContainer.tsx
29305
- import { Fragment as Fragment19, jsx as jsx58, jsxs as jsxs45 } from "react/jsx-runtime";
29247
+ import { Fragment as Fragment17, jsx as jsx56, jsxs as jsxs45 } from "react/jsx-runtime";
29306
29248
  function Section({ title, rows }) {
29307
- return /* @__PURE__ */ jsxs45(Box44, { flexDirection: "column", children: [
29308
- /* @__PURE__ */ jsx58(Text46, { bold: true, color: PALETTE.accent, children: title }),
29309
- rows.map((row) => /* @__PURE__ */ jsxs45(Box44, { gap: 1, children: [
29310
- /* @__PURE__ */ jsx58(Box44, { width: 16, flexShrink: 0, children: /* @__PURE__ */ jsx58(Text46, { color: PALETTE.muted, children: row.label }) }),
29311
- /* @__PURE__ */ jsx58(Text46, { children: row.value })
29249
+ return /* @__PURE__ */ jsxs45(Box45, { flexDirection: "column", children: [
29250
+ /* @__PURE__ */ jsx56(Text46, { bold: true, color: PALETTE.accent, children: title }),
29251
+ rows.map((row) => /* @__PURE__ */ jsxs45(Box45, { gap: 1, children: [
29252
+ /* @__PURE__ */ jsx56(Box45, { width: 16, flexShrink: 0, children: /* @__PURE__ */ jsx56(Text46, { color: PALETTE.muted, children: row.label }) }),
29253
+ /* @__PURE__ */ jsx56(Text46, { children: row.value })
29312
29254
  ] }, row.label))
29313
29255
  ] });
29314
29256
  }
@@ -29322,7 +29264,7 @@ function HelpScreen({ onDone }) {
29322
29264
  void finishDebugRun({ outputs: {}, status: "success", exitMethod });
29323
29265
  onDone();
29324
29266
  };
29325
- useInput10((input, key) => {
29267
+ useInput12((input, key) => {
29326
29268
  if (key.return) {
29327
29269
  leave("saved");
29328
29270
  return;
@@ -29332,14 +29274,14 @@ function HelpScreen({ onDone }) {
29332
29274
  return;
29333
29275
  }
29334
29276
  });
29335
- return /* @__PURE__ */ jsxs45(Box44, { flexDirection: "column", paddingX: 2, paddingY: 1, gap: 1, children: [
29336
- /* @__PURE__ */ jsx58(Text46, { bold: true, children: "Help" }),
29337
- info ? /* @__PURE__ */ jsxs45(Fragment19, { children: [
29338
- /* @__PURE__ */ jsx58(Section, { title: "Where things are stored", rows: info.storage }),
29339
- /* @__PURE__ */ jsx58(Section, { title: "Troubleshooting", rows: info.troubleshooting }),
29340
- /* @__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." })
29341
- ] }) : /* @__PURE__ */ jsx58(Text46, { color: PALETTE.accent, children: "Loading..." }),
29342
- /* @__PURE__ */ jsx58(
29277
+ return /* @__PURE__ */ jsxs45(Box45, { flexDirection: "column", paddingX: 2, paddingY: 1, gap: 1, children: [
29278
+ /* @__PURE__ */ jsx56(Text46, { bold: true, children: "Help" }),
29279
+ info ? /* @__PURE__ */ jsxs45(Fragment17, { children: [
29280
+ /* @__PURE__ */ jsx56(Section, { title: "Where things are stored", rows: info.storage }),
29281
+ /* @__PURE__ */ jsx56(Section, { title: "Troubleshooting", rows: info.troubleshooting }),
29282
+ /* @__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." })
29283
+ ] }) : /* @__PURE__ */ jsx56(Text46, { color: PALETTE.accent, children: "Loading..." }),
29284
+ /* @__PURE__ */ jsx56(
29343
29285
  ControlHints,
29344
29286
  {
29345
29287
  hints: [
@@ -29353,8 +29295,8 @@ function HelpScreen({ onDone }) {
29353
29295
 
29354
29296
  // packages/experience-design-system-cli/src/tui/settings/PageContainer.tsx
29355
29297
  import { useState as useState31 } from "react";
29356
- import { Box as Box45, Text as Text47, useInput as useInput11 } from "ink";
29357
- import { jsx as jsx59, jsxs as jsxs46 } from "react/jsx-runtime";
29298
+ import { Box as Box46, Text as Text47, useInput as useInput13 } from "ink";
29299
+ import { jsx as jsx57, jsxs as jsxs46 } from "react/jsx-runtime";
29358
29300
  function SettingsScreen({
29359
29301
  onNavigate,
29360
29302
  onBack
@@ -29365,7 +29307,7 @@ function SettingsScreen({
29365
29307
  { label: "Opt-in Analytics", screen: "settings-opt-in-analytics" },
29366
29308
  { label: "Debug Mode", screen: "settings-debug-mode" }
29367
29309
  ];
29368
- useInput11((input, key) => {
29310
+ useInput13((input, key) => {
29369
29311
  if (key.upArrow) {
29370
29312
  setFocusIdx((i) => (i - 1 + items.length) % items.length);
29371
29313
  return;
@@ -29385,15 +29327,15 @@ function SettingsScreen({
29385
29327
  onBack();
29386
29328
  }
29387
29329
  });
29388
- return /* @__PURE__ */ jsxs46(Box45, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
29389
- /* @__PURE__ */ jsx59(Text47, { bold: true, children: "Settings" }),
29390
- /* @__PURE__ */ jsx59(Text47, { color: PALETTE.muted, children: " " }),
29330
+ return /* @__PURE__ */ jsxs46(Box46, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
29331
+ /* @__PURE__ */ jsx57(Text47, { bold: true, children: "Settings" }),
29332
+ /* @__PURE__ */ jsx57(Text47, { color: PALETTE.muted, children: " " }),
29391
29333
  items.map((item, i) => /* @__PURE__ */ jsxs46(Text47, { color: i === focusIdx ? PALETTE.accent : void 0, children: [
29392
29334
  i === focusIdx ? "> " : " ",
29393
29335
  item.label
29394
29336
  ] }, item.label)),
29395
- /* @__PURE__ */ jsx59(Text47, { children: " " }),
29396
- /* @__PURE__ */ jsx59(
29337
+ /* @__PURE__ */ jsx57(Text47, { children: " " }),
29338
+ /* @__PURE__ */ jsx57(
29397
29339
  ControlHints,
29398
29340
  {
29399
29341
  hints: [
@@ -29408,11 +29350,11 @@ function SettingsScreen({
29408
29350
 
29409
29351
  // packages/experience-design-system-cli/src/tui/settings/configuration/ConfigurationScreen.tsx
29410
29352
  import { useState as useState35 } from "react";
29411
- import { Box as Box49, Text as Text52, useInput as useInput14 } from "ink";
29353
+ import { Box as Box50, Text as Text52, useInput as useInput16 } from "ink";
29412
29354
 
29413
29355
  // packages/experience-design-system-cli/src/tui/settings/configuration/agents/AgentsScreen.tsx
29414
29356
  import { useEffect as useEffect24, useRef as useRef15, useState as useState33 } from "react";
29415
- import { Box as Box47, Text as Text50, useInput as useInput12 } from "ink";
29357
+ import { Box as Box48, Text as Text50, useInput as useInput14 } from "ink";
29416
29358
  init_debug_store();
29417
29359
 
29418
29360
  // packages/experience-design-system-cli/src/tui/settings/shared/debug-trail.ts
@@ -29741,11 +29683,11 @@ async function writeAgentConfig(config) {
29741
29683
 
29742
29684
  // packages/experience-design-system-cli/src/tui/settings/configuration/agents/AgentDetail.tsx
29743
29685
  import { useEffect as useEffect23, useState as useState32 } from "react";
29744
- import { Box as Box46, Text as Text49 } from "ink";
29686
+ import { Box as Box47, Text as Text49 } from "ink";
29745
29687
 
29746
29688
  // packages/experience-design-system-cli/src/tui/settings/configuration/agents/AgentStatusBadge.tsx
29747
29689
  import { Text as Text48 } from "ink";
29748
- import { jsx as jsx60 } from "react/jsx-runtime";
29690
+ import { jsx as jsx58 } from "react/jsx-runtime";
29749
29691
  var TONE_COLOR = {
29750
29692
  ok: PALETTE.success,
29751
29693
  bad: PALETTE.error,
@@ -29757,7 +29699,7 @@ function AgentStatusBadge({
29757
29699
  binary
29758
29700
  }) {
29759
29701
  const { symbol, text, tone } = LIST_STATUS[checks ? statusFromChecks(name, checks, binary) : "checking"];
29760
- return /* @__PURE__ */ jsx60(Text48, { color: TONE_COLOR[tone], children: `${symbol} ${text}` });
29702
+ return /* @__PURE__ */ jsx58(Text48, { color: TONE_COLOR[tone], children: `${symbol} ${text}` });
29761
29703
  }
29762
29704
 
29763
29705
  // packages/experience-design-system-cli/src/tui/settings/configuration/agents/apply-binary-overrides.ts
@@ -29779,16 +29721,16 @@ function applyBinaryOverrides(config) {
29779
29721
  }
29780
29722
 
29781
29723
  // packages/experience-design-system-cli/src/tui/settings/configuration/agents/AgentDetail.tsx
29782
- import { jsx as jsx61, jsxs as jsxs47 } from "react/jsx-runtime";
29724
+ import { jsx as jsx59, jsxs as jsxs47 } from "react/jsx-runtime";
29783
29725
  var fields = (name) => [
29784
29726
  { key: "binary", label: "Command path", hint: `(empty: \`${AGENT_BINARIES[name]}\` from the PATH)` },
29785
29727
  { key: "model", label: "Model", hint: `(empty: ${defaultModelLabel(name)})` }
29786
29728
  ];
29787
29729
  var INSPECT_DELAY_MS = 400;
29788
29730
  function StatusHeading() {
29789
- return /* @__PURE__ */ jsxs47(Box46, { gap: 1, children: [
29790
- /* @__PURE__ */ jsx61(Text49, { bold: true, color: PALETTE.muted, children: "STATUS" }),
29791
- /* @__PURE__ */ jsx61(Text49, { color: PALETTE.muted, children: "\xB7 read only" })
29731
+ return /* @__PURE__ */ jsxs47(Box47, { gap: 1, children: [
29732
+ /* @__PURE__ */ jsx59(Text49, { bold: true, color: PALETTE.muted, children: "STATUS" }),
29733
+ /* @__PURE__ */ jsx59(Text49, { color: PALETTE.muted, children: "\xB7 read only" })
29792
29734
  ] });
29793
29735
  }
29794
29736
  function AgentDetail({
@@ -29851,7 +29793,7 @@ function AgentDetail({
29851
29793
  };
29852
29794
  const formFields = fields(name);
29853
29795
  const labelWidth = formLabelWidth([...formFields, action]);
29854
- return /* @__PURE__ */ jsx61(
29796
+ return /* @__PURE__ */ jsx59(
29855
29797
  FieldForm,
29856
29798
  {
29857
29799
  title: `Settings \u203A Configuration \u203A Agents \u203A ${AGENT_LABELS[name]}`,
@@ -29868,16 +29810,16 @@ function AgentDetail({
29868
29810
  actions: [action],
29869
29811
  notice: testing ? null : notice,
29870
29812
  busy: saving || testing,
29871
- children: /* @__PURE__ */ jsxs47(Box46, { flexDirection: "column", marginTop: 1, children: [
29872
- /* @__PURE__ */ jsx61(StatusHeading, {}),
29873
- 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))
29813
+ children: /* @__PURE__ */ jsxs47(Box47, { flexDirection: "column", marginTop: 1, children: [
29814
+ /* @__PURE__ */ jsx59(StatusHeading, {}),
29815
+ 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))
29874
29816
  ] })
29875
29817
  }
29876
29818
  );
29877
29819
  }
29878
29820
 
29879
29821
  // packages/experience-design-system-cli/src/tui/settings/configuration/agents/AgentsScreen.tsx
29880
- import { Fragment as Fragment20, jsx as jsx62, jsxs as jsxs48 } from "react/jsx-runtime";
29822
+ import { Fragment as Fragment18, jsx as jsx60, jsxs as jsxs48 } from "react/jsx-runtime";
29881
29823
  var NAME_WIDTH = 16;
29882
29824
  var PANEL_LABEL_WIDTH = "Command".length;
29883
29825
  function AgentsScreen({ onDone }) {
@@ -29955,7 +29897,7 @@ function AgentsScreen({ onDone }) {
29955
29897
  setNotice({ kind: "error", text: `Default agent not changed: ${visit.error}` });
29956
29898
  }).finally(() => setSaving(false));
29957
29899
  };
29958
- useInput12((input, key) => {
29900
+ useInput14((input, key) => {
29959
29901
  if (loadError && (key.escape || input === "q")) {
29960
29902
  endVisit(null);
29961
29903
  onDone();
@@ -29987,21 +29929,21 @@ function AgentsScreen({ onDone }) {
29987
29929
  }
29988
29930
  });
29989
29931
  if (!config) {
29990
- return /* @__PURE__ */ jsxs48(Box47, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
29991
- /* @__PURE__ */ jsx62(Text50, { bold: true, children: "Settings \u203A Configuration \u203A Agents" }),
29992
- /* @__PURE__ */ jsx62(Text50, { children: " " }),
29993
- loadError ? /* @__PURE__ */ jsxs48(Fragment20, { children: [
29932
+ return /* @__PURE__ */ jsxs48(Box48, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
29933
+ /* @__PURE__ */ jsx60(Text50, { bold: true, children: "Settings \u203A Configuration \u203A Agents" }),
29934
+ /* @__PURE__ */ jsx60(Text50, { children: " " }),
29935
+ loadError ? /* @__PURE__ */ jsxs48(Fragment18, { children: [
29994
29936
  /* @__PURE__ */ jsxs48(Text50, { color: PALETTE.error, children: [
29995
29937
  "\u2717 Could not read the settings: ",
29996
29938
  loadError
29997
29939
  ] }),
29998
- /* @__PURE__ */ jsx62(Text50, { children: " " }),
29999
- /* @__PURE__ */ jsx62(ControlHints, { hints: [{ keys: "Esc/q", label: "back" }] })
30000
- ] }) : /* @__PURE__ */ jsx62(Text50, { color: PALETTE.accent, children: "Loading..." })
29940
+ /* @__PURE__ */ jsx60(Text50, { children: " " }),
29941
+ /* @__PURE__ */ jsx60(ControlHints, { hints: [{ keys: "Esc/q", label: "back" }] })
29942
+ ] }) : /* @__PURE__ */ jsx60(Text50, { color: PALETTE.accent, children: "Loading..." })
30001
29943
  ] });
30002
29944
  }
30003
29945
  if (open) {
30004
- return /* @__PURE__ */ jsx62(
29946
+ return /* @__PURE__ */ jsx60(
30005
29947
  AgentDetail,
30006
29948
  {
30007
29949
  name: open,
@@ -30022,48 +29964,48 @@ function AgentsScreen({ onDone }) {
30022
29964
  );
30023
29965
  }
30024
29966
  const focusedAgent = AGENT_NAMES[focus];
30025
- return /* @__PURE__ */ jsxs48(Box47, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
30026
- /* @__PURE__ */ jsx62(Text50, { bold: true, children: "Settings \u203A Configuration \u203A Agents" }),
30027
- /* @__PURE__ */ jsx62(Text50, { children: " " }),
30028
- /* @__PURE__ */ jsx62(Text50, { color: PALETTE.muted, children: "The coding agent the CLI runs, and what was found for each one." }),
30029
- /* @__PURE__ */ jsx62(Text50, { children: " " }),
30030
- /* @__PURE__ */ jsxs48(Box47, { gap: 1, children: [
30031
- /* @__PURE__ */ jsx62(Text50, { color: PALETTE.muted, children: "Default agent" }),
30032
- /* @__PURE__ */ jsx62(Text50, { bold: true, children: AGENT_LABELS[config.defaultAgent] }),
30033
- saving && /* @__PURE__ */ jsx62(Text50, { color: PALETTE.accent, children: "\u2026 saving" })
29967
+ return /* @__PURE__ */ jsxs48(Box48, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
29968
+ /* @__PURE__ */ jsx60(Text50, { bold: true, children: "Settings \u203A Configuration \u203A Agents" }),
29969
+ /* @__PURE__ */ jsx60(Text50, { children: " " }),
29970
+ /* @__PURE__ */ jsx60(Text50, { color: PALETTE.muted, children: "The coding agent the CLI runs, and what was found for each one." }),
29971
+ /* @__PURE__ */ jsx60(Text50, { children: " " }),
29972
+ /* @__PURE__ */ jsxs48(Box48, { gap: 1, children: [
29973
+ /* @__PURE__ */ jsx60(Text50, { color: PALETTE.muted, children: "Default agent" }),
29974
+ /* @__PURE__ */ jsx60(Text50, { bold: true, children: AGENT_LABELS[config.defaultAgent] }),
29975
+ saving && /* @__PURE__ */ jsx60(Text50, { color: PALETTE.accent, children: "\u2026 saving" })
30034
29976
  ] }),
30035
- /* @__PURE__ */ jsxs48(Box47, { marginTop: 1, gap: 1, children: [
30036
- /* @__PURE__ */ jsx62(Text50, { children: " " }),
30037
- /* @__PURE__ */ jsx62(Text50, { children: " " }),
30038
- /* @__PURE__ */ jsx62(Box47, { width: NAME_WIDTH, flexShrink: 0, children: /* @__PURE__ */ jsx62(Text50, { color: PALETTE.muted, children: "AGENT" }) }),
30039
- /* @__PURE__ */ jsx62(Text50, { color: PALETTE.muted, children: "STATUS" })
29977
+ /* @__PURE__ */ jsxs48(Box48, { marginTop: 1, gap: 1, children: [
29978
+ /* @__PURE__ */ jsx60(Text50, { children: " " }),
29979
+ /* @__PURE__ */ jsx60(Text50, { children: " " }),
29980
+ /* @__PURE__ */ jsx60(Box48, { width: NAME_WIDTH, flexShrink: 0, children: /* @__PURE__ */ jsx60(Text50, { color: PALETTE.muted, children: "AGENT" }) }),
29981
+ /* @__PURE__ */ jsx60(Text50, { color: PALETTE.muted, children: "STATUS" })
30040
29982
  ] }),
30041
29983
  AGENT_NAMES.map((name) => {
30042
29984
  const isFocused = focusedAgent === name;
30043
- return /* @__PURE__ */ jsxs48(Box47, { gap: 1, children: [
30044
- /* @__PURE__ */ jsx62(Text50, { color: isFocused ? PALETTE.accent : void 0, children: isFocused ? "\u276F" : " " }),
30045
- /* @__PURE__ */ jsx62(Text50, { color: PALETTE.success, children: name === config.defaultAgent ? "\u2605" : " " }),
30046
- /* @__PURE__ */ jsx62(Box47, { width: NAME_WIDTH, flexShrink: 0, children: /* @__PURE__ */ jsx62(Text50, { bold: isFocused, color: isFocused ? PALETTE.accent : void 0, children: AGENT_LABELS[name] }) }),
30047
- /* @__PURE__ */ jsx62(AgentStatusBadge, { name, checks: checks[name], binary: config.agents[name].binary })
29985
+ return /* @__PURE__ */ jsxs48(Box48, { gap: 1, children: [
29986
+ /* @__PURE__ */ jsx60(Text50, { color: isFocused ? PALETTE.accent : void 0, children: isFocused ? "\u276F" : " " }),
29987
+ /* @__PURE__ */ jsx60(Text50, { color: PALETTE.success, children: name === config.defaultAgent ? "\u2605" : " " }),
29988
+ /* @__PURE__ */ jsx60(Box48, { width: NAME_WIDTH, flexShrink: 0, children: /* @__PURE__ */ jsx60(Text50, { bold: isFocused, color: isFocused ? PALETTE.accent : void 0, children: AGENT_LABELS[name] }) }),
29989
+ /* @__PURE__ */ jsx60(AgentStatusBadge, { name, checks: checks[name], binary: config.agents[name].binary })
30048
29990
  ] }, name);
30049
29991
  }),
30050
- /* @__PURE__ */ jsxs48(Box47, { flexDirection: "column", marginTop: 1, children: [
30051
- /* @__PURE__ */ jsx62(Text50, { color: PALETTE.muted, children: `\u2500 ${AGENT_LABELS[focusedAgent]} ${"\u2500".repeat(30)}` }),
30052
- panelRows(focusedAgent, checks[focusedAgent], config.agents[focusedAgent]).map((row) => /* @__PURE__ */ jsxs48(Box47, { gap: 1, paddingLeft: 1, children: [
30053
- /* @__PURE__ */ jsx62(Box47, { width: PANEL_LABEL_WIDTH, flexShrink: 0, children: /* @__PURE__ */ jsx62(Text50, { color: PALETTE.muted, children: row.label }) }),
30054
- /* @__PURE__ */ jsx62(Text50, { color: TONE_COLOR[row.tone], children: row.value })
29992
+ /* @__PURE__ */ jsxs48(Box48, { flexDirection: "column", marginTop: 1, children: [
29993
+ /* @__PURE__ */ jsx60(Text50, { color: PALETTE.muted, children: `\u2500 ${AGENT_LABELS[focusedAgent]} ${"\u2500".repeat(30)}` }),
29994
+ panelRows(focusedAgent, checks[focusedAgent], config.agents[focusedAgent]).map((row) => /* @__PURE__ */ jsxs48(Box48, { gap: 1, paddingLeft: 1, children: [
29995
+ /* @__PURE__ */ jsx60(Box48, { width: PANEL_LABEL_WIDTH, flexShrink: 0, children: /* @__PURE__ */ jsx60(Text50, { color: PALETTE.muted, children: row.label }) }),
29996
+ /* @__PURE__ */ jsx60(Text50, { color: TONE_COLOR[row.tone], children: row.value })
30055
29997
  ] }, row.label))
30056
29998
  ] }),
30057
- notice && /* @__PURE__ */ jsxs48(Fragment20, { children: [
30058
- /* @__PURE__ */ jsx62(Text50, { children: " " }),
29999
+ notice && /* @__PURE__ */ jsxs48(Fragment18, { children: [
30000
+ /* @__PURE__ */ jsx60(Text50, { children: " " }),
30059
30001
  /* @__PURE__ */ jsxs48(Text50, { bold: true, color: notice.kind === "success" ? PALETTE.success : PALETTE.error, children: [
30060
30002
  notice.kind === "success" ? "\u2713" : "\u2717",
30061
30003
  " ",
30062
30004
  notice.text
30063
30005
  ] })
30064
30006
  ] }),
30065
- /* @__PURE__ */ jsx62(Text50, { children: " " }),
30066
- /* @__PURE__ */ jsx62(
30007
+ /* @__PURE__ */ jsx60(Text50, { children: " " }),
30008
+ /* @__PURE__ */ jsx60(
30067
30009
  ControlHints,
30068
30010
  {
30069
30011
  hints: [
@@ -30079,7 +30021,7 @@ function AgentsScreen({ onDone }) {
30079
30021
 
30080
30022
  // packages/experience-design-system-cli/src/tui/settings/configuration/project/ProjectScreen.tsx
30081
30023
  import { useEffect as useEffect25, useRef as useRef16, useState as useState34 } from "react";
30082
- import { Box as Box48, Text as Text51, useInput as useInput13 } from "ink";
30024
+ import { Box as Box49, Text as Text51, useInput as useInput15 } from "ink";
30083
30025
  init_debug_store();
30084
30026
 
30085
30027
  // packages/experience-design-system-cli/src/tui/settings/configuration/project/project-store.ts
@@ -30108,7 +30050,7 @@ async function writeCredentials(config) {
30108
30050
  }
30109
30051
 
30110
30052
  // packages/experience-design-system-cli/src/tui/settings/configuration/project/ProjectScreen.tsx
30111
- import { Fragment as Fragment21, jsx as jsx63, jsxs as jsxs49 } from "react/jsx-runtime";
30053
+ import { Fragment as Fragment19, jsx as jsx61, jsxs as jsxs49 } from "react/jsx-runtime";
30112
30054
  var FIELDS3 = [
30113
30055
  { key: "spaceId", label: "Space ID" },
30114
30056
  { key: "environmentId", label: "Environment ID" },
@@ -30181,24 +30123,24 @@ function ProjectScreen({ onDone }) {
30181
30123
  exitMethod: change.changed ? "saved" : "discarded"
30182
30124
  });
30183
30125
  };
30184
- useInput13((input, key) => {
30126
+ useInput15((input, key) => {
30185
30127
  if (!config && loadError && (key.escape || input === "q")) {
30186
30128
  endVisit(null);
30187
30129
  onDone();
30188
30130
  }
30189
30131
  });
30190
30132
  if (!config) {
30191
- return /* @__PURE__ */ jsxs49(Box48, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
30192
- /* @__PURE__ */ jsx63(Text51, { bold: true, children: "Settings \u203A Configuration \u203A Project" }),
30193
- /* @__PURE__ */ jsx63(Text51, { children: " " }),
30194
- loadError ? /* @__PURE__ */ jsxs49(Fragment21, { children: [
30133
+ return /* @__PURE__ */ jsxs49(Box49, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
30134
+ /* @__PURE__ */ jsx61(Text51, { bold: true, children: "Settings \u203A Configuration \u203A Project" }),
30135
+ /* @__PURE__ */ jsx61(Text51, { children: " " }),
30136
+ loadError ? /* @__PURE__ */ jsxs49(Fragment19, { children: [
30195
30137
  /* @__PURE__ */ jsxs49(Text51, { color: PALETTE.error, children: [
30196
30138
  "\u2717 Could not read the settings: ",
30197
30139
  loadError
30198
30140
  ] }),
30199
- /* @__PURE__ */ jsx63(Text51, { children: " " }),
30200
- /* @__PURE__ */ jsx63(ControlHints, { hints: [{ keys: "Esc/q", label: "back" }] })
30201
- ] }) : /* @__PURE__ */ jsx63(Text51, { color: PALETTE.accent, children: "Loading..." })
30141
+ /* @__PURE__ */ jsx61(Text51, { children: " " }),
30142
+ /* @__PURE__ */ jsx61(ControlHints, { hints: [{ keys: "Esc/q", label: "back" }] })
30143
+ ] }) : /* @__PURE__ */ jsx61(Text51, { color: PALETTE.accent, children: "Loading..." })
30202
30144
  ] });
30203
30145
  }
30204
30146
  const save = () => {
@@ -30219,7 +30161,7 @@ function ProjectScreen({ onDone }) {
30219
30161
  endVisit(config);
30220
30162
  onDone();
30221
30163
  };
30222
- return /* @__PURE__ */ jsx63(
30164
+ return /* @__PURE__ */ jsx61(
30223
30165
  FieldForm,
30224
30166
  {
30225
30167
  title: "Settings \u203A Configuration \u203A Project",
@@ -30241,7 +30183,7 @@ function ProjectScreen({ onDone }) {
30241
30183
  }
30242
30184
 
30243
30185
  // packages/experience-design-system-cli/src/tui/settings/configuration/ConfigurationScreen.tsx
30244
- import { jsx as jsx64, jsxs as jsxs50 } from "react/jsx-runtime";
30186
+ import { jsx as jsx62, jsxs as jsxs50 } from "react/jsx-runtime";
30245
30187
  var SECTIONS = [
30246
30188
  {
30247
30189
  id: "project",
@@ -30254,7 +30196,7 @@ function ConfigurationScreen({ onDone }) {
30254
30196
  const [focus, setFocus] = useState35(0);
30255
30197
  const [open, setOpen] = useState35(null);
30256
30198
  const close = () => setOpen(null);
30257
- useInput14((input, key) => {
30199
+ useInput16((input, key) => {
30258
30200
  if (open) return;
30259
30201
  if (key.upArrow) {
30260
30202
  setFocus((i) => (i - 1 + SECTIONS.length) % SECTIONS.length);
@@ -30270,18 +30212,18 @@ function ConfigurationScreen({ onDone }) {
30270
30212
  }
30271
30213
  if (key.escape || input === "q") onDone();
30272
30214
  });
30273
- if (open === "project") return /* @__PURE__ */ jsx64(ProjectScreen, { onDone: close });
30274
- if (open === "agents") return /* @__PURE__ */ jsx64(AgentsScreen, { onDone: close });
30275
- return /* @__PURE__ */ jsxs50(Box49, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
30276
- /* @__PURE__ */ jsx64(Text52, { bold: true, children: "Settings \u203A Configuration" }),
30277
- /* @__PURE__ */ jsx64(Text52, { children: " " }),
30278
- SECTIONS.map((section, index) => /* @__PURE__ */ jsxs50(Box49, { gap: 1, children: [
30279
- /* @__PURE__ */ jsx64(Text52, { color: index === focus ? PALETTE.accent : void 0, children: index === focus ? "\u276F" : " " }),
30280
- /* @__PURE__ */ jsx64(Box49, { width: 9, flexShrink: 0, children: /* @__PURE__ */ jsx64(Text52, { bold: index === focus, color: index === focus ? PALETTE.accent : void 0, children: section.label }) }),
30281
- /* @__PURE__ */ jsx64(Text52, { color: PALETTE.muted, children: section.description })
30215
+ if (open === "project") return /* @__PURE__ */ jsx62(ProjectScreen, { onDone: close });
30216
+ if (open === "agents") return /* @__PURE__ */ jsx62(AgentsScreen, { onDone: close });
30217
+ return /* @__PURE__ */ jsxs50(Box50, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
30218
+ /* @__PURE__ */ jsx62(Text52, { bold: true, children: "Settings \u203A Configuration" }),
30219
+ /* @__PURE__ */ jsx62(Text52, { children: " " }),
30220
+ SECTIONS.map((section, index) => /* @__PURE__ */ jsxs50(Box50, { gap: 1, children: [
30221
+ /* @__PURE__ */ jsx62(Text52, { color: index === focus ? PALETTE.accent : void 0, children: index === focus ? "\u276F" : " " }),
30222
+ /* @__PURE__ */ jsx62(Box50, { width: 9, flexShrink: 0, children: /* @__PURE__ */ jsx62(Text52, { bold: index === focus, color: index === focus ? PALETTE.accent : void 0, children: section.label }) }),
30223
+ /* @__PURE__ */ jsx62(Text52, { color: PALETTE.muted, children: section.description })
30282
30224
  ] }, section.id)),
30283
- /* @__PURE__ */ jsx64(Text52, { children: " " }),
30284
- /* @__PURE__ */ jsx64(
30225
+ /* @__PURE__ */ jsx62(Text52, { children: " " }),
30226
+ /* @__PURE__ */ jsx62(
30285
30227
  ControlHints,
30286
30228
  {
30287
30229
  hints: [
@@ -30296,7 +30238,7 @@ function ConfigurationScreen({ onDone }) {
30296
30238
 
30297
30239
  // packages/experience-design-system-cli/src/tui/settings/opt-in-analytics/screen.tsx
30298
30240
  import { useEffect as useEffect26, useState as useState36 } from "react";
30299
- import { Box as Box50, Text as Text53, useInput as useInput15 } from "ink";
30241
+ import { Box as Box51, Text as Text53, useInput as useInput17 } from "ink";
30300
30242
 
30301
30243
  // packages/experience-design-system-cli/src/tui/settings/opt-in-analytics/analytics-store.ts
30302
30244
  async function readAnalyticsSetting() {
@@ -30315,7 +30257,7 @@ async function writeAnalyticsSetting(setting) {
30315
30257
 
30316
30258
  // packages/experience-design-system-cli/src/tui/settings/opt-in-analytics/screen.tsx
30317
30259
  init_debug_store();
30318
- import { Fragment as Fragment22, jsx as jsx65, jsxs as jsxs51 } from "react/jsx-runtime";
30260
+ import { Fragment as Fragment20, jsx as jsx63, jsxs as jsxs51 } from "react/jsx-runtime";
30319
30261
  function OptInAnalyticsScreen({ onDone }) {
30320
30262
  const [loading, setLoading] = useState36(true);
30321
30263
  const [enabled, setEnabled] = useState36(true);
@@ -30331,7 +30273,7 @@ function OptInAnalyticsScreen({ onDone }) {
30331
30273
  });
30332
30274
  });
30333
30275
  }, []);
30334
- useInput15((input, key) => {
30276
+ useInput17((input, key) => {
30335
30277
  if (loading) return;
30336
30278
  if (key.return || input === " ") {
30337
30279
  setEnabled((current) => {
@@ -30346,21 +30288,21 @@ function OptInAnalyticsScreen({ onDone }) {
30346
30288
  onDone();
30347
30289
  }
30348
30290
  });
30349
- return /* @__PURE__ */ jsxs51(Box50, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
30350
- /* @__PURE__ */ jsx65(Text53, { bold: true, children: "Settings \u203A Opt-in Analytics" }),
30351
- /* @__PURE__ */ jsx65(Text53, { children: " " }),
30352
- loading ? /* @__PURE__ */ jsx65(Text53, { color: PALETTE.muted, children: "Loading\u2026" }) : /* @__PURE__ */ jsxs51(Fragment22, { children: [
30291
+ return /* @__PURE__ */ jsxs51(Box51, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
30292
+ /* @__PURE__ */ jsx63(Text53, { bold: true, children: "Settings \u203A Opt-in Analytics" }),
30293
+ /* @__PURE__ */ jsx63(Text53, { children: " " }),
30294
+ loading ? /* @__PURE__ */ jsx63(Text53, { color: PALETTE.muted, children: "Loading\u2026" }) : /* @__PURE__ */ jsxs51(Fragment20, { children: [
30353
30295
  /* @__PURE__ */ jsxs51(Text53, { children: [
30354
30296
  "Share anonymous usage data:",
30355
30297
  " ",
30356
- /* @__PURE__ */ jsx65(Text53, { bold: true, color: enabled ? PALETTE.success : PALETTE.muted, children: enabled ? "On" : "Off" })
30298
+ /* @__PURE__ */ jsx63(Text53, { bold: true, color: enabled ? PALETTE.success : PALETTE.muted, children: enabled ? "On" : "Off" })
30357
30299
  ] }),
30358
- /* @__PURE__ */ jsx65(Text53, { children: " " }),
30359
- /* @__PURE__ */ jsx65(Text53, { color: PALETTE.muted, children: "Shares which CLI commands are used and where imports succeed or fail." }),
30360
- /* @__PURE__ */ jsx65(Text53, { color: PALETTE.muted, children: "Never includes source code, file paths, credentials, or authored content." })
30300
+ /* @__PURE__ */ jsx63(Text53, { children: " " }),
30301
+ /* @__PURE__ */ jsx63(Text53, { color: PALETTE.muted, children: "Shares which CLI commands are used and where imports succeed or fail." }),
30302
+ /* @__PURE__ */ jsx63(Text53, { color: PALETTE.muted, children: "Never includes source code, file paths, credentials, or authored content." })
30361
30303
  ] }),
30362
- /* @__PURE__ */ jsx65(Text53, { children: " " }),
30363
- /* @__PURE__ */ jsx65(
30304
+ /* @__PURE__ */ jsx63(Text53, { children: " " }),
30305
+ /* @__PURE__ */ jsx63(
30364
30306
  ControlHints,
30365
30307
  {
30366
30308
  hints: [
@@ -30374,10 +30316,10 @@ function OptInAnalyticsScreen({ onDone }) {
30374
30316
 
30375
30317
  // packages/experience-design-system-cli/src/tui/settings/debug-mode/screen.tsx
30376
30318
  import { useEffect as useEffect27, useRef as useRef17, useState as useState37 } from "react";
30377
- import { Box as Box51, Text as Text54, useInput as useInput16 } from "ink";
30319
+ import { Box as Box52, Text as Text54, useInput as useInput18 } from "ink";
30378
30320
  init_debug_mode_store();
30379
30321
  init_debug_store();
30380
- import { Fragment as Fragment23, jsx as jsx66, jsxs as jsxs52 } from "react/jsx-runtime";
30322
+ import { Fragment as Fragment21, jsx as jsx64, jsxs as jsxs52 } from "react/jsx-runtime";
30381
30323
  var ROWS = ["enabled", "retentionDays"];
30382
30324
  var snapshotOf2 = (setting) => ({
30383
30325
  enabled: String(setting.enabled),
@@ -30431,7 +30373,7 @@ function DebugModeScreen({ onDone }) {
30431
30373
  exitMethod: change.changed ? "saved" : "discarded"
30432
30374
  });
30433
30375
  };
30434
- useInput16((input, key) => {
30376
+ useInput18((input, key) => {
30435
30377
  if (!setting) return;
30436
30378
  if (key.upArrow || key.downArrow) {
30437
30379
  setFocus((current) => ROWS[(ROWS.indexOf(current) + (key.downArrow ? 1 : ROWS.length - 1)) % ROWS.length]);
@@ -30458,24 +30400,24 @@ function DebugModeScreen({ onDone }) {
30458
30400
  onDone();
30459
30401
  }
30460
30402
  });
30461
- const marker = (row) => /* @__PURE__ */ jsx66(Text54, { color: focus === row ? PALETTE.accent : void 0, children: focus === row ? "\u276F" : " " });
30462
- const label = (row, text) => /* @__PURE__ */ jsx66(Text54, { bold: focus === row, color: focus === row ? PALETTE.accent : PALETTE.muted, children: text });
30463
- return /* @__PURE__ */ jsxs52(Box51, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
30464
- /* @__PURE__ */ jsx66(Text54, { bold: true, children: "Settings \u203A Debug Mode" }),
30465
- /* @__PURE__ */ jsx66(Text54, { children: " " }),
30466
- setting ? /* @__PURE__ */ jsxs52(Fragment23, { children: [
30467
- /* @__PURE__ */ jsxs52(Box51, { gap: 1, children: [
30403
+ const marker = (row) => /* @__PURE__ */ jsx64(Text54, { color: focus === row ? PALETTE.accent : void 0, children: focus === row ? "\u276F" : " " });
30404
+ const label = (row, text) => /* @__PURE__ */ jsx64(Text54, { bold: focus === row, color: focus === row ? PALETTE.accent : PALETTE.muted, children: text });
30405
+ return /* @__PURE__ */ jsxs52(Box52, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
30406
+ /* @__PURE__ */ jsx64(Text54, { bold: true, children: "Settings \u203A Debug Mode" }),
30407
+ /* @__PURE__ */ jsx64(Text54, { children: " " }),
30408
+ setting ? /* @__PURE__ */ jsxs52(Fragment21, { children: [
30409
+ /* @__PURE__ */ jsxs52(Box52, { gap: 1, children: [
30468
30410
  marker("enabled"),
30469
30411
  label("enabled", "Debug logging:"),
30470
- /* @__PURE__ */ jsx66(Text54, { bold: true, color: setting.enabled ? PALETTE.success : PALETTE.muted, children: setting.enabled ? "On" : "Off" })
30412
+ /* @__PURE__ */ jsx64(Text54, { bold: true, color: setting.enabled ? PALETTE.success : PALETTE.muted, children: setting.enabled ? "On" : "Off" })
30471
30413
  ] }),
30472
- /* @__PURE__ */ jsxs52(Box51, { gap: 1, children: [
30414
+ /* @__PURE__ */ jsxs52(Box52, { gap: 1, children: [
30473
30415
  marker("retentionDays"),
30474
30416
  label("retentionDays", "Delete logs after:"),
30475
30417
  RETENTION_CHOICES.map((days) => {
30476
30418
  const highlighted = focus === "retentionDays" && days === pending;
30477
30419
  const saved = days === setting.retentionDays;
30478
- return /* @__PURE__ */ jsx66(
30420
+ return /* @__PURE__ */ jsx64(
30479
30421
  Text54,
30480
30422
  {
30481
30423
  bold: highlighted || saved,
@@ -30487,15 +30429,15 @@ function DebugModeScreen({ onDone }) {
30487
30429
  );
30488
30430
  })
30489
30431
  ] }),
30490
- /* @__PURE__ */ jsx66(Text54, { children: " " }),
30432
+ /* @__PURE__ */ jsx64(Text54, { children: " " }),
30491
30433
  notice ? /* @__PURE__ */ jsxs52(Text54, { color: notice.kind === "success" ? PALETTE.success : PALETTE.error, children: [
30492
30434
  notice.kind === "success" ? "\u2713" : "\u2717",
30493
30435
  " ",
30494
30436
  notice.text
30495
- ] }) : /* @__PURE__ */ jsx66(Text54, { color: PALETTE.muted, children: "\u2713 marks what is saved. Older logs are deleted the next time the CLI starts." })
30496
- ] }) : /* @__PURE__ */ jsx66(Text54, { color: PALETTE.muted, children: "Loading\u2026" }),
30497
- /* @__PURE__ */ jsx66(Text54, { children: " " }),
30498
- /* @__PURE__ */ jsx66(
30437
+ ] }) : /* @__PURE__ */ jsx64(Text54, { color: PALETTE.muted, children: "\u2713 marks what is saved. Older logs are deleted the next time the CLI starts." })
30438
+ ] }) : /* @__PURE__ */ jsx64(Text54, { color: PALETTE.muted, children: "Loading\u2026" }),
30439
+ /* @__PURE__ */ jsx64(Text54, { children: " " }),
30440
+ /* @__PURE__ */ jsx64(
30499
30441
  ControlHints,
30500
30442
  {
30501
30443
  hints: [
@@ -30512,7 +30454,7 @@ function DebugModeScreen({ onDone }) {
30512
30454
  }
30513
30455
 
30514
30456
  // packages/experience-design-system-cli/app.tsx
30515
- import { Fragment as Fragment24, jsx as jsx67 } from "react/jsx-runtime";
30457
+ import { Fragment as Fragment22, jsx as jsx65 } from "react/jsx-runtime";
30516
30458
  function App({ importOptions, inkClear }) {
30517
30459
  const [screen, setScreen] = useState38("start");
30518
30460
  const [importExitCode, setImportExitCode] = useState38();
@@ -30703,9 +30645,9 @@ function App({ importOptions, inkClear }) {
30703
30645
  };
30704
30646
  switch (screen) {
30705
30647
  case "import":
30706
- if (showImportResult) return /* @__PURE__ */ jsx67(ImportScreen, { exitCode: importExitCode, onDone: finishImportResult });
30648
+ if (showImportResult) return /* @__PURE__ */ jsx65(ImportScreen, { exitCode: importExitCode, onDone: finishImportResult });
30707
30649
  if (flow && flowStart) {
30708
- return /* @__PURE__ */ jsx67(
30650
+ return /* @__PURE__ */ jsx65(
30709
30651
  FlowScreen,
30710
30652
  {
30711
30653
  state: flow.state,
@@ -30715,15 +30657,15 @@ function App({ importOptions, inkClear }) {
30715
30657
  }
30716
30658
  );
30717
30659
  }
30718
- if (importDefaults === void 0) return /* @__PURE__ */ jsx67(Fragment24, {});
30660
+ if (importDefaults === void 0) return /* @__PURE__ */ jsx65(Fragment22, {});
30719
30661
  if (target === void 0) {
30720
- return /* @__PURE__ */ jsx67(PreflightScreen, { onChoose: setTarget, onQuit: leaveImport });
30662
+ return /* @__PURE__ */ jsx65(PreflightScreen, { onChoose: setTarget, onQuit: leaveImport });
30721
30663
  }
30722
30664
  const inputStep = currentInputStep(target, answers);
30723
30665
  if (!extractionRun && !tokensOnlyRun && inputStep !== "credentials") {
30724
30666
  switch (inputStep) {
30725
30667
  case "project":
30726
- return /* @__PURE__ */ jsx67(
30668
+ return /* @__PURE__ */ jsx65(
30727
30669
  WelcomeScreen,
30728
30670
  {
30729
30671
  onContinue: (projectPath) => answer({ projectPath }),
@@ -30732,7 +30674,7 @@ function App({ importOptions, inkClear }) {
30732
30674
  }
30733
30675
  );
30734
30676
  case "token-file":
30735
- return /* @__PURE__ */ jsx67(
30677
+ return /* @__PURE__ */ jsx65(
30736
30678
  TokenInputScreen,
30737
30679
  {
30738
30680
  initialPath: importDefaults.tokenFile,
@@ -30741,7 +30683,7 @@ function App({ importOptions, inkClear }) {
30741
30683
  }
30742
30684
  );
30743
30685
  case "path-validation":
30744
- return /* @__PURE__ */ jsx67(
30686
+ return /* @__PURE__ */ jsx65(
30745
30687
  PathValidationScreen,
30746
30688
  {
30747
30689
  projectPath: answers.projectPath ?? "",
@@ -30755,9 +30697,9 @@ function App({ importOptions, inkClear }) {
30755
30697
  }
30756
30698
  if (tokensOnlyRun) {
30757
30699
  if (tokensOnly?.status === "done" && !tokensOnly.result.ok) {
30758
- return /* @__PURE__ */ jsx67(ErrorStep, { stepName: tokensOnly.result.step, message: tokensOnly.result.message, onExit: leaveImport });
30700
+ return /* @__PURE__ */ jsx65(ErrorStep, { stepName: tokensOnly.result.step, message: tokensOnly.result.message, onExit: leaveImport });
30759
30701
  }
30760
- return /* @__PURE__ */ jsx67(
30702
+ return /* @__PURE__ */ jsx65(
30761
30703
  RunningStep,
30762
30704
  {
30763
30705
  step: "generation",
@@ -30768,19 +30710,19 @@ function App({ importOptions, inkClear }) {
30768
30710
  }
30769
30711
  if (extractionRun) {
30770
30712
  if (extraction?.status === "done" && !extraction.result.ok) {
30771
- return /* @__PURE__ */ jsx67(ErrorStep, { stepName: extraction.result.step, message: extraction.result.message, onExit: leaveImport });
30713
+ return /* @__PURE__ */ jsx65(ErrorStep, { stepName: extraction.result.step, message: extraction.result.message, onExit: leaveImport });
30772
30714
  }
30773
30715
  if (extraction?.status === "running") {
30774
- return /* @__PURE__ */ jsx67(ExtractionScreen, { progress: extraction.progress, agent: extractionRun.input.agent });
30716
+ return /* @__PURE__ */ jsx65(ExtractionScreen, { progress: extraction.progress, agent: extractionRun.input.agent });
30775
30717
  }
30776
- return /* @__PURE__ */ jsx67(Fragment24, {});
30718
+ return /* @__PURE__ */ jsx65(Fragment22, {});
30777
30719
  }
30778
30720
  if (scopeRun && scopeFlow) {
30779
30721
  if (scopeFlow.status === "failed") {
30780
- return /* @__PURE__ */ jsx67(ErrorStep, { stepName: "scope gate", message: scopeFlow.message, onExit: leaveImport });
30722
+ return /* @__PURE__ */ jsx65(ErrorStep, { stepName: "scope gate", message: scopeFlow.message, onExit: leaveImport });
30781
30723
  }
30782
30724
  if (scopeFlow.status === "deciding") {
30783
- return /* @__PURE__ */ jsx67(
30725
+ return /* @__PURE__ */ jsx65(
30784
30726
  ScopeGateScreen,
30785
30727
  {
30786
30728
  components: scopeFlow.load.components,
@@ -30790,10 +30732,10 @@ function App({ importOptions, inkClear }) {
30790
30732
  );
30791
30733
  }
30792
30734
  if (generation?.status === "done" && !generation.result.ok) {
30793
- return /* @__PURE__ */ jsx67(ErrorStep, { stepName: generation.result.step, message: generation.result.message, onExit: leaveImport });
30735
+ return /* @__PURE__ */ jsx65(ErrorStep, { stepName: generation.result.step, message: generation.result.message, onExit: leaveImport });
30794
30736
  }
30795
30737
  if (generation?.status === "running") {
30796
- return /* @__PURE__ */ jsx67(
30738
+ return /* @__PURE__ */ jsx65(
30797
30739
  GenerationScreen,
30798
30740
  {
30799
30741
  progress: generation.progress,
@@ -30803,9 +30745,9 @@ function App({ importOptions, inkClear }) {
30803
30745
  }
30804
30746
  );
30805
30747
  }
30806
- return /* @__PURE__ */ jsx67(Fragment24, {});
30748
+ return /* @__PURE__ */ jsx65(Fragment22, {});
30807
30749
  }
30808
- return /* @__PURE__ */ jsx67(
30750
+ return /* @__PURE__ */ jsx65(
30809
30751
  CredentialsScreen,
30810
30752
  {
30811
30753
  initial: importDefaults.credentials,
@@ -30815,17 +30757,17 @@ function App({ importOptions, inkClear }) {
30815
30757
  }
30816
30758
  );
30817
30759
  case "help":
30818
- return /* @__PURE__ */ jsx67(HelpScreen, { onDone: goToStart });
30760
+ return /* @__PURE__ */ jsx65(HelpScreen, { onDone: goToStart });
30819
30761
  case "settings":
30820
- return /* @__PURE__ */ jsx67(SettingsScreen, { onNavigate: setScreen, onBack: goToStart });
30762
+ return /* @__PURE__ */ jsx65(SettingsScreen, { onNavigate: setScreen, onBack: goToStart });
30821
30763
  case "settings-configuration":
30822
- return /* @__PURE__ */ jsx67(ConfigurationScreen, { onDone: goToSettings });
30764
+ return /* @__PURE__ */ jsx65(ConfigurationScreen, { onDone: goToSettings });
30823
30765
  case "settings-opt-in-analytics":
30824
- return /* @__PURE__ */ jsx67(OptInAnalyticsScreen, { onDone: goToSettings });
30766
+ return /* @__PURE__ */ jsx65(OptInAnalyticsScreen, { onDone: goToSettings });
30825
30767
  case "settings-debug-mode":
30826
- return /* @__PURE__ */ jsx67(DebugModeScreen, { onDone: goToSettings });
30768
+ return /* @__PURE__ */ jsx65(DebugModeScreen, { onDone: goToSettings });
30827
30769
  case "start":
30828
- return /* @__PURE__ */ jsx67(HomeScreen, { onNavigate: setScreen });
30770
+ return /* @__PURE__ */ jsx65(HomeScreen, { onNavigate: setScreen });
30829
30771
  }
30830
30772
  }
30831
30773
  async function runApp(renderApp, importOptions) {
@@ -30833,7 +30775,7 @@ async function runApp(renderApp, importOptions) {
30833
30775
  instance.clear?.();
30834
30776
  process.stdout.write("\x1B[H\x1B[0J");
30835
30777
  };
30836
- const instance = renderApp(/* @__PURE__ */ jsx67(App, { importOptions, inkClear }));
30778
+ const instance = renderApp(/* @__PURE__ */ jsx65(App, { importOptions, inkClear }));
30837
30779
  await instance.waitUntilExit();
30838
30780
  }
30839
30781
  export {