@contentful/experience-design-system-cli 2.37.1-dev-build-a7704a7f.0 → 2.37.1-dev-build-daf73756.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
@@ -2336,25 +2336,48 @@ import { useEffect as useEffect26, useState as useState33 } from "react";
2336
2336
  import { useEffect as useEffect2, useState as useState2 } from "react";
2337
2337
  import { Box, Text as Text2, useApp, useInput } from "ink";
2338
2338
 
2339
- // packages/experience-design-system-cli/src/tui/home/home.theme.ts
2340
- var BRAND = {
2341
- blue: "#1773EB",
2342
- green: "#00C459",
2343
- orange: "#E44F20",
2344
- yellow: "#FFDA00",
2345
- white: "#FFFFFF",
2346
- slate: "#8B8D91",
2347
- steel: "#C4D1DE"
2339
+ // packages/experience-design-system-cli/src/tui/theme.ts
2340
+ var DARK = {
2341
+ text: "#f7f9fa",
2342
+ // gray100
2343
+ muted: "#aec1cc",
2344
+ // gray400
2345
+ border: "#aec1cc",
2346
+ // gray400
2347
+ accent: "#40a0ff",
2348
+ // blue400
2349
+ error: "#ff707d",
2350
+ // red400
2351
+ success: "#5DB057",
2352
+ // green400
2353
+ warning: "#FFC835"
2354
+ // yellow500
2348
2355
  };
2349
- var PALETTE = {
2350
- accent: BRAND.blue,
2351
- success: BRAND.green,
2352
- error: BRAND.orange,
2353
- warning: BRAND.yellow,
2354
- muted: BRAND.slate,
2355
- border: BRAND.steel
2356
+ var LIGHT = {
2357
+ text: "#111B2B",
2358
+ // gray900
2359
+ muted: "#5A657C",
2360
+ // gray600
2361
+ border: "#5A657C",
2362
+ // gray600
2363
+ accent: "#0059c8",
2364
+ // semantic primary
2365
+ error: "#bd002a",
2366
+ // semantic negative
2367
+ success: "#006D23",
2368
+ // semantic positive
2369
+ warning: "#CC4500"
2370
+ // semantic warning
2356
2371
  };
2357
- var BRAND_RAMP = [BRAND.blue, BRAND.orange, BRAND.yellow];
2372
+ function detectColorMode(env = process.env) {
2373
+ const bg = env.COLORFGBG?.split(";").pop();
2374
+ if (bg === "7" || bg === "15") return "light";
2375
+ return "dark";
2376
+ }
2377
+ var PALETTE = detectColorMode() === "light" ? LIGHT : DARK;
2378
+
2379
+ // packages/experience-design-system-cli/src/tui/home/home.theme.ts
2380
+ var BRAND_RAMP = ["#1773EB", "#E44F20", "#FFDA00"];
2358
2381
  var BAR_CELL = "\u2501";
2359
2382
  function brandBar(width, ramp = BRAND_RAMP) {
2360
2383
  if (width <= 0 || ramp.length === 0) return [];
@@ -2397,7 +2420,7 @@ function useTerminalWidth() {
2397
2420
  import { Text } from "ink";
2398
2421
  import { jsx } from "react/jsx-runtime";
2399
2422
  function ControlHints({ hints }) {
2400
- return /* @__PURE__ */ jsx(Text, { children: hints.map((hint) => `[${hint.keys}] ${hint.label}`).join(" \xB7 ") });
2423
+ return /* @__PURE__ */ jsx(Text, { color: PALETTE.muted, children: hints.map((hint) => `[${hint.keys}] ${hint.label}`).join(" \xB7 ") });
2401
2424
  }
2402
2425
 
2403
2426
  // packages/experience-design-system-cli/src/tui/home/home.tsx
@@ -2566,20 +2589,19 @@ function WelcomeScreen({ onContinue, onQuit, initialPath = "" }) {
2566
2589
  if (path5) onContinue(path5);
2567
2590
  };
2568
2591
  return /* @__PURE__ */ jsxs3(Box3, { flexDirection: "column", gap: 1, paddingX: 2, paddingY: 1, children: [
2569
- /* @__PURE__ */ jsx4(Text4, { bold: true, color: PALETTE.success, children: "\u{1F44B} Hey! Let's import your design system into Contentful." }),
2570
- /* @__PURE__ */ jsx4(Text4, { color: PALETTE.muted, children: "I'll walk you through 5 steps to get your components into Contentful ExO." }),
2592
+ /* @__PURE__ */ jsx4(Text4, { bold: true, color: PALETTE.success, children: "Let's import your design system into Contentful." }),
2571
2593
  /* @__PURE__ */ jsxs3(Box3, { flexDirection: "column", children: [
2572
- /* @__PURE__ */ jsx4(Text4, { dimColor: true, children: RULE }),
2594
+ /* @__PURE__ */ jsx4(Text4, { color: PALETTE.muted, children: RULE }),
2573
2595
  OVERVIEW.map((item) => /* @__PURE__ */ jsxs3(Box3, { gap: 1, children: [
2574
2596
  /* @__PURE__ */ jsx4(Text4, { bold: true, children: item.label }),
2575
2597
  /* @__PURE__ */ jsx4(Text4, { color: PALETTE.muted, children: item.description })
2576
2598
  ] }, item.label)),
2577
- /* @__PURE__ */ jsx4(Text4, { dimColor: true, children: RULE })
2599
+ /* @__PURE__ */ jsx4(Text4, { color: PALETTE.muted, children: RULE })
2578
2600
  ] }),
2579
2601
  /* @__PURE__ */ jsxs3(Box3, { flexDirection: "column", gap: 1, children: [
2580
2602
  /* @__PURE__ */ jsx4(Text4, { children: "Where is your component library?" }),
2581
- /* @__PURE__ */ jsxs3(Box3, { gap: 1, children: [
2582
- /* @__PURE__ */ jsx4(Text4, { color: PALETTE.accent, children: "?" }),
2603
+ /* @__PURE__ */ jsxs3(Box3, { children: [
2604
+ /* @__PURE__ */ jsx4(Text4, { color: PALETTE.text, children: "?" }),
2583
2605
  /* @__PURE__ */ jsx4(Text4, { children: "Project path:" }),
2584
2606
  /* @__PURE__ */ jsx4(TextInput, { value: projectPath, onChange: setProjectPath, onSubmit: submit })
2585
2607
  ] })
@@ -4625,8 +4647,30 @@ function applyScopeDecisions(db, sessionId, decisions) {
4625
4647
  const placeholders = accepted.map(() => "?").join(",");
4626
4648
  db.prepare(`UPDATE raw_components SET status = 'generated' WHERE session_id = ? AND name IN (${placeholders})`).run(sessionId, ...accepted);
4627
4649
  }
4650
+ removeSlotAllowedComponents(db, sessionId, decisions.excludedSlotEdges ?? [], rejected);
4628
4651
  db.prepare("UPDATE sessions SET updated_at = ? WHERE id = ?").run(now, sessionId);
4629
4652
  }
4653
+ function removeSlotAllowedComponents(db, sessionId, edges, rejectedNames) {
4654
+ if (edges.length === 0 && rejectedNames.length === 0)
4655
+ return;
4656
+ const componentId = db.prepare("SELECT component_id FROM raw_components WHERE session_id = ? AND name = ?");
4657
+ const removeEdge = db.prepare("DELETE FROM raw_slot_allowed_components WHERE session_id = ? AND component_id = ? AND allowed_component = ?");
4658
+ const removeEverywhere = db.prepare("DELETE FROM raw_slot_allowed_components WHERE session_id = ? AND allowed_component = ?");
4659
+ db.exec("BEGIN");
4660
+ try {
4661
+ for (const edge of edges) {
4662
+ const row = componentId.get(sessionId, edge.parent);
4663
+ if (row)
4664
+ removeEdge.run(sessionId, row.component_id, edge.child);
4665
+ }
4666
+ for (const name of rejectedNames)
4667
+ removeEverywhere.run(sessionId, name);
4668
+ db.exec("COMMIT");
4669
+ } catch (e) {
4670
+ db.exec("ROLLBACK");
4671
+ throw e;
4672
+ }
4673
+ }
4630
4674
  function findLatestSessionForCommand(db, command) {
4631
4675
  return getLatestCompletedSessionForCommand(db, command);
4632
4676
  }
@@ -17080,7 +17124,7 @@ function foldSvelteAndMdIntoOther(counts) {
17080
17124
  // packages/experience-design-system-cli/src/tui/import/steps/03-path-validation/screen.tsx
17081
17125
  import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
17082
17126
  function Row({ row }) {
17083
- return /* @__PURE__ */ jsxs5(Text6, { color: row.tone === "accent" ? PALETTE.accent : void 0, dimColor: row.tone === "muted", children: [
17127
+ return /* @__PURE__ */ jsxs5(Text6, { color: row.tone === "accent" ? PALETTE.accent : row.tone === "muted" ? PALETTE.muted : void 0, children: [
17084
17128
  " \u2022 ",
17085
17129
  String(row.count).padStart(3),
17086
17130
  " ",
@@ -17094,7 +17138,7 @@ function Failure({ scan, path: path5 }) {
17094
17138
  "\u2717 ",
17095
17139
  headline
17096
17140
  ] }),
17097
- hints.map((hint) => /* @__PURE__ */ jsx6(Text6, { dimColor: true, children: hint }, hint))
17141
+ hints.map((hint) => /* @__PURE__ */ jsx6(Text6, { color: PALETTE.muted, children: hint }, hint))
17098
17142
  ] });
17099
17143
  }
17100
17144
  function Summary({ scan, path: path5 }) {
@@ -17139,14 +17183,14 @@ function PathValidationScreen({
17139
17183
  onBack
17140
17184
  });
17141
17185
  return /* @__PURE__ */ jsxs5(Box5, { flexDirection: "column", gap: 1, paddingX: 2, paddingY: 1, children: [
17142
- scan === void 0 && /* @__PURE__ */ jsxs5(Text6, { dimColor: true, children: [
17186
+ scan === void 0 && /* @__PURE__ */ jsxs5(Text6, { color: PALETTE.muted, children: [
17143
17187
  "Scanning ",
17144
17188
  /* @__PURE__ */ jsx6(Text6, { bold: true, children: resolvedPath }),
17145
17189
  "..."
17146
17190
  ] }),
17147
17191
  scan?.ok === false && /* @__PURE__ */ jsx6(Failure, { scan, path: resolvedPath }),
17148
17192
  scan?.ok === true && /* @__PURE__ */ jsx6(Summary, { scan, path: resolvedPath }),
17149
- /* @__PURE__ */ jsx6(Box5, { marginTop: 1, gap: 3, children: controlsFor(phase).map((control) => /* @__PURE__ */ jsxs5(Text6, { dimColor: true, children: [
17193
+ /* @__PURE__ */ jsx6(Box5, { marginTop: 1, gap: 3, children: controlsFor(phase).map((control) => /* @__PURE__ */ jsxs5(Text6, { color: PALETTE.muted, children: [
17150
17194
  "[",
17151
17195
  control.keys,
17152
17196
  "] ",
@@ -17298,8 +17342,8 @@ function CredentialsScreen({
17298
17342
  /* @__PURE__ */ jsx7(Text7, { bold: true, children: "Contentful credentials" }),
17299
17343
  /* @__PURE__ */ jsx7(Text7, { children: prefilled ? "Credentials pre-filled from the configuration settings." : "Enter the Contentful space you want to import into." }),
17300
17344
  !prefilled && /* @__PURE__ */ jsxs6(Fragment, { children: [
17301
- /* @__PURE__ */ jsx7(Text7, { dimColor: true, children: "We use it to check what components already exist and to push your import. If you skip, files are saved locally and nothing is pushed." }),
17302
- /* @__PURE__ */ jsx7(Text7, { dimColor: true, children: "Tip: save these under Settings \u2192 Configuration so they pre-fill here." })
17345
+ /* @__PURE__ */ jsx7(Text7, { color: PALETTE.muted, children: "We use it to check what components already exist and to push your import. If you skip, files are saved locally and nothing is pushed." }),
17346
+ /* @__PURE__ */ jsx7(Text7, { color: PALETTE.muted, children: "Tip: save these under Settings \u2192 Configuration so they pre-fill here." })
17303
17347
  ] })
17304
17348
  ] }),
17305
17349
  /* @__PURE__ */ jsx7(Box6, { flexDirection: "column", children: FIELDS.map((field) => /* @__PURE__ */ jsxs6(Box6, { gap: 1, children: [
@@ -17320,14 +17364,14 @@ function CredentialsScreen({
17320
17364
  }
17321
17365
  )
17322
17366
  ] }, field)) }),
17323
- active === "host" && /* @__PURE__ */ jsx7(Text7, { dimColor: true, children: "Default: api.contentful.com \xB7 EU spaces: api.eu.contentful.com" }),
17367
+ active === "host" && /* @__PURE__ */ jsx7(Text7, { color: PALETTE.muted, children: "Default: api.contentful.com \xB7 EU spaces: api.eu.contentful.com" }),
17324
17368
  error && /* @__PURE__ */ jsxs6(Text7, { color: PALETTE.error, children: [
17325
17369
  "\u2717 ",
17326
17370
  error
17327
17371
  ] }),
17328
17372
  validating && /* @__PURE__ */ jsx7(Text7, { color: PALETTE.accent, children: "Validating credentials..." }),
17329
- !validating && !error && !isUnchanged(normalize(values), initialValues) && /* @__PURE__ */ jsx7(Text7, { dimColor: true, children: "Changed values are saved after they validate." }),
17330
- /* @__PURE__ */ jsx7(Box6, { marginTop: 1, gap: 3, children: CREDENTIALS_CONTROLS.map((control) => /* @__PURE__ */ jsxs6(Text7, { dimColor: true, children: [
17373
+ !validating && !error && !isUnchanged(normalize(values), initialValues) && /* @__PURE__ */ jsx7(Text7, { color: PALETTE.muted, children: "Changed values are saved after they validate." }),
17374
+ /* @__PURE__ */ jsx7(Box6, { marginTop: 1, gap: 3, children: CREDENTIALS_CONTROLS.map((control) => /* @__PURE__ */ jsxs6(Text7, { color: PALETTE.muted, children: [
17331
17375
  "[",
17332
17376
  control.keys,
17333
17377
  "] ",
@@ -17391,7 +17435,7 @@ function ErrorStep({
17391
17435
  " failed"
17392
17436
  ] }),
17393
17437
  /* @__PURE__ */ jsx8(Text8, { color: PALETTE.error, children: message }),
17394
- /* @__PURE__ */ jsx8(Box7, { marginTop: 1, gap: 3, children: controls.map((control) => /* @__PURE__ */ jsxs7(Text8, { dimColor: true, children: [
17438
+ /* @__PURE__ */ jsx8(Box7, { marginTop: 1, gap: 3, children: controls.map((control) => /* @__PURE__ */ jsxs7(Text8, { color: PALETTE.muted, children: [
17395
17439
  "[",
17396
17440
  control.keys,
17397
17441
  "] ",
@@ -17456,7 +17500,7 @@ function GateStep({
17456
17500
  ] }),
17457
17501
  summary && /* @__PURE__ */ jsx9(Text9, { color: PALETTE.muted, children: summary }),
17458
17502
  context && /* @__PURE__ */ jsx9(Box8, { marginTop: 1, children: /* @__PURE__ */ jsx9(Text9, { children: context }) }),
17459
- /* @__PURE__ */ jsx9(Box8, { marginTop: 1, gap: 3, children: gateControls(continueLabel, skipLabel2, onSkip !== void 0).map((control) => /* @__PURE__ */ jsxs8(Text9, { dimColor: true, children: [
17503
+ /* @__PURE__ */ jsx9(Box8, { marginTop: 1, gap: 3, children: gateControls(continueLabel, skipLabel2, onSkip !== void 0).map((control) => /* @__PURE__ */ jsxs8(Text9, { color: PALETTE.muted, children: [
17460
17504
  "[",
17461
17505
  control.keys,
17462
17506
  "] ",
@@ -17489,7 +17533,7 @@ var PROGRESS_THEME = extendTheme(defaultTheme, {
17489
17533
  components: {
17490
17534
  ProgressBar: {
17491
17535
  styles: {
17492
- completed: () => ({ color: "blue" })
17536
+ completed: () => ({ color: PALETTE.accent })
17493
17537
  }
17494
17538
  }
17495
17539
  }
@@ -17538,9 +17582,9 @@ function RunningStep({
17538
17582
  const elapsed = useElapsed();
17539
17583
  return /* @__PURE__ */ jsxs9(Box9, { flexDirection: "column", gap: 1, paddingX: 2, paddingY: 1, children: [
17540
17584
  /* @__PURE__ */ jsxs9(Box9, { flexDirection: "column", children: [
17541
- /* @__PURE__ */ jsx10(Text10, { dimColor: true, children: RULE2 }),
17585
+ /* @__PURE__ */ jsx10(Text10, { color: PALETTE.muted, children: RULE2 }),
17542
17586
  /* @__PURE__ */ jsx10(Text10, { bold: true, children: stepLabel(stepNumber, totalSteps, title) }),
17543
- /* @__PURE__ */ jsx10(Text10, { dimColor: true, children: RULE2 })
17587
+ /* @__PURE__ */ jsx10(Text10, { color: PALETTE.muted, children: RULE2 })
17544
17588
  ] }),
17545
17589
  /* @__PURE__ */ jsx10(Text10, { children: description }),
17546
17590
  /* @__PURE__ */ jsx10(Box9, { marginTop: 1, flexDirection: "column", gap: 1, children: lines.map((line, index) => /* @__PURE__ */ jsx10(Line, { line }, index)) }),
@@ -18197,7 +18241,7 @@ function WindowedPanelHeader({
18197
18241
  }) {
18198
18242
  return /* @__PURE__ */ jsxs10(Box10, { flexDirection: "column", children: [
18199
18243
  /* @__PURE__ */ jsx13(Text11, { bold: true, color: PALETTE2.info, inverse: focused, children: title }),
18200
- /* @__PURE__ */ jsx13(Text11, { dimColor: true, children: "\u2500".repeat(Math.max(0, width - 2)) })
18244
+ /* @__PURE__ */ jsx13(Text11, { color: PALETTE2.muted, children: "\u2500".repeat(Math.max(0, width - 2)) })
18201
18245
  ] });
18202
18246
  }
18203
18247
  function formatWindowIndicator(direction, count) {
@@ -18225,7 +18269,7 @@ function AddedColumn(props) {
18225
18269
  const showSeparator = firstNonCycleIdx > 0 && i === firstNonCycleIdx;
18226
18270
  const style = sideColumnLabelStyle({ isCycle: entry.isCycle, isSelected, focused });
18227
18271
  return /* @__PURE__ */ jsxs11(React6.Fragment, { children: [
18228
- showSeparator && /* @__PURE__ */ jsx14(Text12, { dimColor: true, children: "\u2500".repeat(Math.max(0, width - 2)) }),
18272
+ showSeparator && /* @__PURE__ */ jsx14(Text12, { color: PALETTE2.muted, children: "\u2500".repeat(Math.max(0, width - 2)) }),
18229
18273
  /* @__PURE__ */ jsxs11(Box11, { children: [
18230
18274
  isCursor ? /* @__PURE__ */ jsx14(Text12, { color: PALETTE2.info, bold: true, children: figures.pointer }) : /* @__PURE__ */ jsx14(Text12, { children: " " }),
18231
18275
  reserveAiBadge && (aiFlagged ? /* @__PURE__ */ jsx14(Text12, { color: PALETTE2.warning, bold: true, children: " [\xD7]" }) : /* @__PURE__ */ jsx14(Text12, { children: " " })),
@@ -18888,7 +18932,7 @@ function buildVisibleRows(props) {
18888
18932
  if (visited.has(target)) continue;
18889
18933
  visited.add(target);
18890
18934
  const isCycleMember = cycleParticipants.has(target);
18891
- out.push({ name: target, depth: cur.depth + 1, isCycleMember });
18935
+ out.push({ name: target, depth: cur.depth + 1, isCycleMember, parent: cur.name });
18892
18936
  queue.push({ name: target, depth: cur.depth + 1 });
18893
18937
  }
18894
18938
  }
@@ -18935,7 +18979,8 @@ function buildVisibleRows(props) {
18935
18979
  sharedSuffix,
18936
18980
  cycleChild: child.isCycleMember || void 0,
18937
18981
  itemIdx: childRec?.idx ?? -1,
18938
- rootName: key
18982
+ rootName: key,
18983
+ parentName: child.parent
18939
18984
  });
18940
18985
  });
18941
18986
  }
@@ -19018,13 +19063,19 @@ function buildVisibleRows(props) {
19018
19063
  injectedChildren.push({
19019
19064
  name: target,
19020
19065
  depth: parentDepth + 1,
19021
- isCycleChild: true
19066
+ isCycleChild: true,
19067
+ parent: parentName
19022
19068
  });
19023
19069
  }
19024
19070
  };
19025
19071
  emitCycleChildrenOf(root, 0);
19026
19072
  for (const c2 of closureChildren) {
19027
- injectedChildren.push({ name: c2.name, depth: c2.depth, isCycleChild: false });
19073
+ injectedChildren.push({
19074
+ name: c2.name,
19075
+ depth: c2.depth,
19076
+ isCycleChild: false,
19077
+ parent: c2.path[c2.path.length - 2] ?? root
19078
+ });
19028
19079
  emitCycleChildrenOf(c2.name, c2.depth);
19029
19080
  }
19030
19081
  const isLastAtDepth = (idx) => {
@@ -19058,7 +19109,8 @@ function buildVisibleRows(props) {
19058
19109
  sharedSuffix,
19059
19110
  cycleChild: child.isCycleChild || void 0,
19060
19111
  itemIdx: childRec?.idx ?? -1,
19061
- rootName: root
19112
+ rootName: root,
19113
+ parentName: child.parent
19062
19114
  });
19063
19115
  });
19064
19116
  }
@@ -19216,7 +19268,7 @@ function GroupedSidebar(props) {
19216
19268
  const rs = itemName ? renderStatusByKey?.get(itemName) : void 0;
19217
19269
  const badge = itemName ? previewBadge(previewAnnotationByKey?.get(itemName)) : null;
19218
19270
  const showInheritance = rs !== void 0 && row.kind !== "cycle" && row.kind !== "empty" && row.kind !== "group-root";
19219
- const supportsSelectionGlyph = selectionStateByKey !== void 0 && itemName !== void 0 && (row.kind === "standalone" || row.kind === "group-root" || row.kind === "group-child" || row.kind === "flat" || row.kind === "cycle");
19271
+ const supportsSelectionGlyph = selectionStateByKey !== void 0 && itemName !== void 0 && (row.kind === "standalone" || row.kind === "group-root" || row.kind === "group-child" || row.kind === "flat" || row.kind === "empty" || row.kind === "cycle");
19220
19272
  const selState = supportsSelectionGlyph ? selectionStateByKey.get(itemName) ?? "undecided" : void 0;
19221
19273
  const isCycleRow = row.kind === "cycle";
19222
19274
  const selStyle = selectionGlyphStyleFor(selState, isCycleRow);
@@ -19246,7 +19298,7 @@ function GroupedSidebar(props) {
19246
19298
  color: isSelected ? PALETTE2.info : labelStyle.dim ? PALETTE2.muted : labelStyle.color,
19247
19299
  bold: isSelected || labelStyle.bold,
19248
19300
  inverse: false,
19249
- underline: isSelected && !focused,
19301
+ underline: isSelected && focused,
19250
19302
  wrap: wrapLabels ? "wrap" : "truncate",
19251
19303
  children: [
19252
19304
  " ",
@@ -19905,6 +19957,7 @@ function resolveKey(mode, key, ctx) {
19905
19957
  function resolveMain(key, ctx) {
19906
19958
  const { input } = key;
19907
19959
  const inMain = ctx.focusedColumn === "main";
19960
+ if (key.ctrl && input === "z") return { type: "undo" };
19908
19961
  if (input === "q" || key.escape) {
19909
19962
  if (key.escape && ctx.jumpFilterActive) return { type: "clear-jump-filter" };
19910
19963
  if (key.escape && ctx.searchActive) return { type: "clear-search" };
@@ -20174,21 +20227,42 @@ function rejectNeedsConfirmation(graph, name, state2) {
20174
20227
  const ancestors = toReject.filter((n) => n !== name);
20175
20228
  return ancestors.length + toDeselect.length >= 2;
20176
20229
  }
20177
- function partitionDecisions(components, state2) {
20230
+ function removeSlotChild(components, edge) {
20231
+ return components.map(
20232
+ (component) => component.name === edge.parent ? {
20233
+ ...component,
20234
+ slots: component.slots?.map((slot) => ({
20235
+ ...slot,
20236
+ allowedComponents: slot.allowedComponents.filter((name) => name !== edge.child)
20237
+ }))
20238
+ } : component
20239
+ );
20240
+ }
20241
+ function withoutSlotChildren(components, removedEdges) {
20242
+ return removedEdges.reduce(removeSlotChild, components);
20243
+ }
20244
+ function partitionDecisions(components, state2, removedEdges) {
20178
20245
  const accepted = [];
20179
20246
  const rejected = [];
20180
20247
  for (const c2 of components) {
20181
20248
  if (state2.get(c2.name) === "accepted") accepted.push(c2.name);
20182
20249
  else rejected.push(c2.name);
20183
20250
  }
20184
- return { accepted, rejected };
20251
+ const rejectedNames = new Set(rejected);
20252
+ const excludedSlotEdges = removedEdges.filter((e) => !rejectedNames.has(e.parent) && !rejectedNames.has(e.child));
20253
+ return { accepted, rejected, excludedSlotEdges };
20185
20254
  }
20186
20255
 
20187
20256
  // packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/use-scope-gate.ts
20188
- function useScopeGate({ components, onConfirm, onQuit }) {
20257
+ function useScopeGate({ components: loadedComponents, onConfirm, onQuit }) {
20189
20258
  const { columns: totalWidth, rows: terminalRows } = useTerminalSize();
20190
20259
  const columnPlan = useMemo2(() => computeColumnWidths(totalWidth), [totalWidth]);
20191
20260
  const [decisions, setDecisions] = useState12(/* @__PURE__ */ new Map());
20261
+ const [removedEdges, setRemovedEdges] = useState12([]);
20262
+ const components = useMemo2(
20263
+ () => withoutSlotChildren(loadedComponents, removedEdges),
20264
+ [loadedComponents, removedEdges]
20265
+ );
20192
20266
  const [nav, setNav] = useState12({ cursor: 0, scrollOffset: 0 });
20193
20267
  const [focusedColumn, setFocusedColumn] = useState12("main");
20194
20268
  const [addedComponentsCursor, setAddedComponentsCursor] = useState12(0);
@@ -20361,6 +20435,14 @@ function useScopeGate({ components, onConfirm, onQuit }) {
20361
20435
  return void 0;
20362
20436
  }
20363
20437
  };
20438
+ const focusedNestedEdge = () => {
20439
+ const row = visibleRows[safeCursor];
20440
+ if (row?.kind !== "group-child" || !row.parentName || row.itemIdx < 0) return void 0;
20441
+ const child = groupedItems[row.itemIdx]?.key;
20442
+ return child ? { parent: row.parentName, child } : void 0;
20443
+ };
20444
+ const removeFromParentSlot = (edge) => setRemovedEdges((edges) => [...edges, edge]);
20445
+ const undoSlotRemoval = () => setRemovedEdges((edges) => edges.slice(0, -1));
20364
20446
  const jumpCursorTo = (name) => {
20365
20447
  let idx = -1;
20366
20448
  for (let i = 0; i < visibleRows.length; i++) {
@@ -20460,7 +20542,7 @@ function useScopeGate({ components, onConfirm, onQuit }) {
20460
20542
  onQuit();
20461
20543
  return;
20462
20544
  case "confirm":
20463
- onConfirm(partitionDecisions(components, decisions));
20545
+ onConfirm(partitionDecisions(components, decisions, removedEdges));
20464
20546
  return;
20465
20547
  case "close-help":
20466
20548
  setShowHelp(false);
@@ -20513,6 +20595,11 @@ function useScopeGate({ components, onConfirm, onQuit }) {
20513
20595
  return;
20514
20596
  }
20515
20597
  case "reject": {
20598
+ const edge = focusedColumn === "main" ? focusedNestedEdge() : void 0;
20599
+ if (edge) {
20600
+ removeFromParentSlot(edge);
20601
+ return;
20602
+ }
20516
20603
  const key = focusedColumn === "added-components" ? addedComponents[safeAddedComponentsCursor]?.name : focusedRowKey();
20517
20604
  if (key) requestReject(key);
20518
20605
  return;
@@ -20520,6 +20607,9 @@ function useScopeGate({ components, onConfirm, onQuit }) {
20520
20607
  case "toggle-all":
20521
20608
  decide({ type: "toggle-all" });
20522
20609
  return;
20610
+ case "undo":
20611
+ undoSlotRemoval();
20612
+ return;
20523
20613
  case "accept-unflagged":
20524
20614
  decide({ type: "accept-unflagged" });
20525
20615
  return;
@@ -21470,17 +21560,6 @@ function PreviewValidationErrorScreen({
21470
21560
  import { useCallback as useCallback5, useEffect as useEffect16, useMemo as useMemo4, useRef as useRef11, useState as useState22 } from "react";
21471
21561
  import figures7 from "figures";
21472
21562
 
21473
- // packages/experience-design-system-cli/src/tui/import/steps/09-review/theme.ts
21474
- var PALETTE3 = {
21475
- info: PALETTE.accent,
21476
- success: PALETTE.success,
21477
- error: PALETTE.error,
21478
- warning: PALETTE.warning,
21479
- muted: PALETTE.muted,
21480
- border: PALETTE.border,
21481
- inverse: "#FFFFFF"
21482
- };
21483
-
21484
21563
  // packages/experience-design-system-cli/src/tui/import/steps/09-review/review-json-panel.ts
21485
21564
  var HIDDEN_PROP_CATEGORIES = /* @__PURE__ */ new Set(["state", "unattached"]);
21486
21565
  function getReviewJsonPanelValue(selected, showHiddenProps) {
@@ -21911,13 +21990,13 @@ function serializeState(state2, originalJson) {
21911
21990
  }
21912
21991
  function Picker({ value, active }) {
21913
21992
  return /* @__PURE__ */ jsxs22(Box21, { children: [
21914
- active && /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.warning, children: "\u2039" }),
21915
- /* @__PURE__ */ jsx27(Text23, { color: active ? PALETTE3.warning : void 0, bold: active, children: value }),
21916
- active && /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.warning, children: "\u203A" })
21993
+ active && /* @__PURE__ */ jsx27(Text23, { color: PALETTE.warning, children: "\u2039" }),
21994
+ /* @__PURE__ */ jsx27(Text23, { color: active ? PALETTE.warning : void 0, bold: active, children: value }),
21995
+ active && /* @__PURE__ */ jsx27(Text23, { color: PALETTE.warning, children: "\u203A" })
21917
21996
  ] });
21918
21997
  }
21919
21998
  function Toggle({ value, active }) {
21920
- return /* @__PURE__ */ jsx27(Box21, { children: /* @__PURE__ */ jsx27(Text23, { color: active ? PALETTE3.warning : value ? PALETTE3.success : PALETTE3.border, children: value ? "[\u2713]" : "[ ]" }) });
21999
+ return /* @__PURE__ */ jsx27(Box21, { children: /* @__PURE__ */ jsx27(Text23, { color: active ? PALETTE.warning : value ? PALETTE.success : PALETTE.border, children: value ? "[\u2713]" : "[ ]" }) });
21921
22000
  }
21922
22001
  function InlinePropField({
21923
22002
  label,
@@ -21927,7 +22006,7 @@ function InlinePropField({
21927
22006
  width
21928
22007
  }) {
21929
22008
  return /* @__PURE__ */ jsxs22(Box21, { width, gap: 1, flexShrink: flexible ? 1 : 0, flexGrow: flexible ? 1 : 0, flexWrap: "wrap", children: [
21930
- /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE3.warning : PALETTE3.muted, bold: focused, wrap: "truncate-end", children: [
22009
+ /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, wrap: "truncate-end", children: [
21931
22010
  focused ? "\u203A " : " ",
21932
22011
  label
21933
22012
  ] }),
@@ -21948,7 +22027,7 @@ function DefaultValueRow({
21948
22027
  focused
21949
22028
  }) {
21950
22029
  return /* @__PURE__ */ jsxs22(Box21, { gap: 1, flexWrap: "wrap", flexShrink: 0, children: [
21951
- /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE3.warning : PALETTE3.muted, bold: focused, children: [
22030
+ /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, children: [
21952
22031
  focused ? "\u203A " : " ",
21953
22032
  "default:"
21954
22033
  ] }),
@@ -21963,9 +22042,9 @@ function RowLabel({
21963
22042
  return /* @__PURE__ */ jsxs22(
21964
22043
  Text23,
21965
22044
  {
21966
- color: selected ? PALETTE3.inverse : PALETTE3.info,
22045
+ color: selected ? "#FFFFFF" : PALETTE.accent,
21967
22046
  bold: selected,
21968
- backgroundColor: selected ? "blue" : void 0,
22047
+ backgroundColor: selected ? PALETTE.accent : void 0,
21969
22048
  wrap: "truncate-end",
21970
22049
  children: [
21971
22050
  " ",
@@ -21981,7 +22060,7 @@ function ValueInputRow({
21981
22060
  cursorVisible
21982
22061
  }) {
21983
22062
  return /* @__PURE__ */ jsxs22(Box21, { paddingLeft: 2, children: [
21984
- /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.info, children: mode === "edit" ? "\u270E " : "+ " }),
22063
+ /* @__PURE__ */ jsx27(Text23, { color: PALETTE.accent, children: mode === "edit" ? "\u270E " : "+ " }),
21985
22064
  /* @__PURE__ */ jsx27(Text23, { children: valueText }),
21986
22065
  /* @__PURE__ */ jsx27(Text23, { inverse: cursorVisible, children: " " })
21987
22066
  ] });
@@ -21998,7 +22077,7 @@ function EditableListItem({
21998
22077
  if (isBeingEdited) {
21999
22078
  return /* @__PURE__ */ jsx27(ValueInputRow, { mode: "edit", valueText, cursorVisible });
22000
22079
  }
22001
- return /* @__PURE__ */ jsx27(Box21, { gap: 1, paddingLeft: 2, children: /* @__PURE__ */ jsx27(Text23, { color: active ? PALETTE3.info : void 0, children: active ? `${figures5.pointer} ${value}` : ` ${value}` }) });
22080
+ return /* @__PURE__ */ jsx27(Box21, { gap: 1, paddingLeft: 2, children: /* @__PURE__ */ jsx27(Text23, { color: active ? PALETTE.accent : void 0, children: active ? `${figures5.pointer} ${value}` : ` ${value}` }) });
22002
22081
  }
22003
22082
  function EditableValueList({
22004
22083
  values,
@@ -22012,7 +22091,7 @@ function EditableValueList({
22012
22091
  showAddInput
22013
22092
  }) {
22014
22093
  return /* @__PURE__ */ jsxs22(Fragment5, { children: [
22015
- values.length === 0 && !editingValue && (emptyPaddingLeft === void 0 ? /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, children: emptyMessage }) : /* @__PURE__ */ jsx27(Box21, { paddingLeft: emptyPaddingLeft, children: /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, children: emptyMessage }) })),
22094
+ values.length === 0 && !editingValue && (emptyPaddingLeft === void 0 ? /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: emptyMessage }) : /* @__PURE__ */ jsx27(Box21, { paddingLeft: emptyPaddingLeft, children: /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: emptyMessage }) })),
22016
22095
  values.map((value, index) => /* @__PURE__ */ jsx27(
22017
22096
  EditableListItem,
22018
22097
  {
@@ -22038,11 +22117,11 @@ function DefaultSubRow({
22038
22117
  const cursor = cursorVisible ? "\u2588" : " ";
22039
22118
  if (prop.type === "richtext" || prop.type === "media" || prop.type === "link") {
22040
22119
  return /* @__PURE__ */ jsxs22(Box21, { gap: 1, flexShrink: 0, children: [
22041
- /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE3.warning : PALETTE3.muted, bold: focused, children: [
22120
+ /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, children: [
22042
22121
  focused ? "\u203A " : " ",
22043
22122
  "default:"
22044
22123
  ] }),
22045
- /* @__PURE__ */ jsx27(Text23, { color: focused ? void 0 : PALETTE3.muted, children: "(not applicable)" })
22124
+ /* @__PURE__ */ jsx27(Text23, { color: focused ? void 0 : PALETTE.muted, children: "(not applicable)" })
22046
22125
  ] });
22047
22126
  }
22048
22127
  if (prop.type === "boolean") {
@@ -22052,11 +22131,11 @@ function DefaultSubRow({
22052
22131
  if (prop.type === "enum") {
22053
22132
  if (prop.values.length === 0) {
22054
22133
  return /* @__PURE__ */ jsxs22(Box21, { gap: 1, flexShrink: 0, children: [
22055
- /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE3.warning : PALETTE3.muted, bold: focused, children: [
22134
+ /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, children: [
22056
22135
  focused ? "\u203A " : " ",
22057
22136
  "default:"
22058
22137
  ] }),
22059
- /* @__PURE__ */ jsx27(Text23, { color: focused ? void 0 : PALETTE3.muted, children: "(no values defined)" })
22138
+ /* @__PURE__ */ jsx27(Text23, { color: focused ? void 0 : PALETTE.muted, children: "(no values defined)" })
22060
22139
  ] });
22061
22140
  }
22062
22141
  const display = typeof prop.default === "string" && prop.default !== "" ? prop.default : "(unset)";
@@ -22065,11 +22144,11 @@ function DefaultSubRow({
22065
22144
  const value = typeof prop.default === "string" ? prop.default : "";
22066
22145
  if (active) {
22067
22146
  return /* @__PURE__ */ jsxs22(Box21, { flexDirection: "row", flexShrink: 0, children: [
22068
- /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE3.warning : PALETTE3.muted, bold: focused, children: [
22147
+ /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, children: [
22069
22148
  focused ? "\u203A " : " ",
22070
22149
  "default:"
22071
22150
  ] }),
22072
- /* @__PURE__ */ jsxs22(Box21, { flexGrow: 1, borderStyle: "round", borderColor: PALETTE3.warning, paddingX: 1, children: [
22151
+ /* @__PURE__ */ jsxs22(Box21, { flexGrow: 1, borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
22073
22152
  /* @__PURE__ */ jsx27(Text23, { children: value.slice(0, textCursor) }),
22074
22153
  /* @__PURE__ */ jsx27(Text23, { inverse: cursorVisible, children: value[textCursor] ?? cursor }),
22075
22154
  /* @__PURE__ */ jsx27(Text23, { children: value.slice(textCursor + 1) })
@@ -22077,11 +22156,11 @@ function DefaultSubRow({
22077
22156
  ] });
22078
22157
  }
22079
22158
  return /* @__PURE__ */ jsxs22(Box21, { gap: 1, flexShrink: 0, children: [
22080
- /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE3.warning : PALETTE3.muted, bold: focused, children: [
22159
+ /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, children: [
22081
22160
  focused ? "\u203A " : " ",
22082
22161
  "default:"
22083
22162
  ] }),
22084
- /* @__PURE__ */ jsx27(Text23, { color: focused || value ? void 0 : PALETTE3.muted, children: value || "(none)" })
22163
+ /* @__PURE__ */ jsx27(Text23, { color: focused || value ? void 0 : PALETTE.muted, children: value || "(none)" })
22085
22164
  ] });
22086
22165
  }
22087
22166
  function DescriptionField({
@@ -22097,15 +22176,15 @@ function DescriptionField({
22097
22176
  }) {
22098
22177
  if (compact) {
22099
22178
  return /* @__PURE__ */ jsxs22(Box21, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: [
22100
- /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE3.warning : PALETTE3.muted, bold: focused, children: [
22179
+ /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, children: [
22101
22180
  focused ? "\u203A " : " ",
22102
22181
  label
22103
22182
  ] }),
22104
- /* @__PURE__ */ jsx27(Text23, { wrap: "truncate-end", color: value ? void 0 : PALETTE3.muted, children: value || "\u2014" })
22183
+ /* @__PURE__ */ jsx27(Text23, { wrap: "truncate-end", color: value ? void 0 : PALETTE.muted, children: value || "\u2014" })
22105
22184
  ] });
22106
22185
  }
22107
22186
  return /* @__PURE__ */ jsxs22(Box21, { paddingLeft, flexDirection: "column", width, flexShrink: 0, children: [
22108
- /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE3.warning : PALETTE3.muted, bold: focused, children: [
22187
+ /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, children: [
22109
22188
  focused ? "\u203A " : " ",
22110
22189
  label
22111
22190
  ] }),
@@ -22169,7 +22248,7 @@ function PropRow({
22169
22248
  ] }),
22170
22249
  prop.type === "token" && /* @__PURE__ */ jsx27(InlinePropField, { label: "kind:", focused: activeField === "tokenKind", width, children: editingField && activeField === "tokenKind" ? /* @__PURE__ */ jsx27(Picker, { value: prop.tokenKind || DESIGN_TOKEN_TYPES2[0], active: true }) : /* @__PURE__ */ jsx27(Text23, { wrap: "wrap", children: prop.tokenKind || "\u2014" }) }),
22171
22250
  prop.type === "enum" && /* @__PURE__ */ jsxs22(Box21, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: [
22172
- /* @__PURE__ */ jsxs22(Text23, { color: activeField === "values" ? PALETTE3.warning : PALETTE3.muted, bold: activeField === "values", children: [
22251
+ /* @__PURE__ */ jsxs22(Text23, { color: activeField === "values" ? PALETTE.warning : PALETTE.muted, bold: activeField === "values", children: [
22173
22252
  activeField === "values" ? "\u203A " : " ",
22174
22253
  "values:"
22175
22254
  ] }),
@@ -22190,27 +22269,27 @@ function PropRow({
22190
22269
  }
22191
22270
  ),
22192
22271
  prop.type === "token" && prop.category === "design" && /* @__PURE__ */ jsxs22(Box21, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: [
22193
- /* @__PURE__ */ jsxs22(Text23, { color: activeField === "allowed" ? PALETTE3.warning : PALETTE3.muted, bold: activeField === "allowed", children: [
22272
+ /* @__PURE__ */ jsxs22(Text23, { color: activeField === "allowed" ? PALETTE.warning : PALETTE.muted, bold: activeField === "allowed", children: [
22194
22273
  activeField === "allowed" ? "\u203A " : " ",
22195
22274
  "allowed:"
22196
22275
  ] }),
22197
- editingField && activeField === "allowed" ? /* @__PURE__ */ jsx27(Box21, { width: Math.max(1, width - 4), borderStyle: "round", borderColor: PALETTE3.warning, paddingX: 1, children: /* @__PURE__ */ jsx27(Text23, { children: "press [t] to edit allowed tokens" }) }) : /* @__PURE__ */ jsx27(
22276
+ editingField && activeField === "allowed" ? /* @__PURE__ */ jsx27(Box21, { width: Math.max(1, width - 4), borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: /* @__PURE__ */ jsx27(Text23, { children: "press [t] to edit allowed tokens" }) }) : /* @__PURE__ */ jsx27(
22198
22277
  Text23,
22199
22278
  {
22200
- color: activeField !== "allowed" && prop.allowed.length === 0 ? PALETTE3.muted : void 0,
22279
+ color: activeField !== "allowed" && prop.allowed.length === 0 ? PALETTE.muted : void 0,
22201
22280
  wrap: "wrap",
22202
22281
  children: prop.allowed.length > 0 ? prop.allowed.join(", ") : "(any)"
22203
22282
  }
22204
22283
  )
22205
22284
  ] }),
22206
- selected && showRationale && rationale && rationale.trim().length > 0 && /* @__PURE__ */ jsx27(Box21, { paddingLeft: 2, children: /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, children: (() => {
22285
+ selected && showRationale && rationale && rationale.trim().length > 0 && /* @__PURE__ */ jsx27(Box21, { paddingLeft: 2, children: /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: (() => {
22207
22286
  const max = Math.max(8, width - 8);
22208
22287
  const text = `~ ${rationale}`;
22209
22288
  return text.length > max ? text.slice(0, max - 1) + "\u2026" : text;
22210
22289
  })() }) }, rowKey ? `rationale-${rowKey}` : void 0),
22211
22290
  selected && prop.type === "enum" && activeField === "values" && /* @__PURE__ */ jsxs22(Box21, { paddingLeft: 2, flexDirection: "column", children: [
22212
22291
  /* @__PURE__ */ jsxs22(Box21, { children: [
22213
- /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, children: "values:" }),
22292
+ /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: "values:" }),
22214
22293
  activeField === "values" && /* @__PURE__ */ jsx27(Text23, { children: " [a] add [e] edit [r] remove [\u2191\u2193] navigate [K/J] reorder" })
22215
22294
  ] }),
22216
22295
  /* @__PURE__ */ jsx27(
@@ -22271,7 +22350,7 @@ function SlotRow({
22271
22350
  /* @__PURE__ */ jsxs22(
22272
22351
  Text23,
22273
22352
  {
22274
- color: activeField === "allowedComponents" ? PALETTE3.warning : PALETTE3.muted,
22353
+ color: activeField === "allowedComponents" ? PALETTE.warning : PALETTE.muted,
22275
22354
  bold: activeField === "allowedComponents",
22276
22355
  children: [
22277
22356
  activeField === "allowedComponents" ? "\u203A " : " ",
@@ -22279,14 +22358,14 @@ function SlotRow({
22279
22358
  ]
22280
22359
  }
22281
22360
  ),
22282
- slot.allowedComponents.length === 0 ? /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, children: "(any)" }) : /* @__PURE__ */ jsx27(Text23, { wrap: "wrap", children: slot.allowedComponents.join(", ") })
22361
+ slot.allowedComponents.length === 0 ? /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: "(any)" }) : /* @__PURE__ */ jsx27(Text23, { wrap: "wrap", children: slot.allowedComponents.join(", ") })
22283
22362
  ] }),
22284
22363
  selected && editingField && activeField === "allowedComponents" && /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", children: [
22285
22364
  /* @__PURE__ */ jsxs22(Box21, { children: [
22286
22365
  /* @__PURE__ */ jsxs22(
22287
22366
  Text23,
22288
22367
  {
22289
- color: activeField === "allowedComponents" ? PALETTE3.warning : PALETTE3.muted,
22368
+ color: activeField === "allowedComponents" ? PALETTE.warning : PALETTE.muted,
22290
22369
  bold: activeField === "allowedComponents",
22291
22370
  children: [
22292
22371
  activeField === "allowedComponents" ? "\u203A " : " ",
@@ -22294,7 +22373,7 @@ function SlotRow({
22294
22373
  ]
22295
22374
  }
22296
22375
  ),
22297
- editingField && activeField === "allowedComponents" && /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.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" })
22376
+ editingField && activeField === "allowedComponents" && /* @__PURE__ */ jsx27(Text23, { 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" })
22298
22377
  ] }),
22299
22378
  /* @__PURE__ */ jsx27(
22300
22379
  EditableValueList,
@@ -22310,21 +22389,21 @@ function SlotRow({
22310
22389
  showAddInput: editingField && activeField === "allowedComponents"
22311
22390
  }
22312
22391
  ),
22313
- editingField && editingValue?.mode === "add" && activeField === "allowedComponents" && pickerCandidates !== null && /* @__PURE__ */ jsx27(Box21, { paddingLeft: 2, flexDirection: "column", children: pickerCandidates.length === 0 ? /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, children: "(no valid components to add \u2014 all remaining candidates would create cycles)" }) : (() => {
22392
+ editingField && editingValue?.mode === "add" && activeField === "allowedComponents" && pickerCandidates !== null && /* @__PURE__ */ jsx27(Box21, { paddingLeft: 2, flexDirection: "column", children: pickerCandidates.length === 0 ? /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: "(no valid components to add \u2014 all remaining candidates would create cycles)" }) : (() => {
22314
22393
  const filtered = valueText.length === 0 ? pickerCandidates : pickerCandidates.filter((n) => n.toLowerCase().includes(valueText.toLowerCase()));
22315
22394
  if (filtered.length === 0) {
22316
- return /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, children: "(no candidates match \u2014 Enter to add as free text)" });
22395
+ return /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: "(no candidates match \u2014 Enter to add as free text)" });
22317
22396
  }
22318
22397
  const cursor = pickerCursor % filtered.length;
22319
22398
  const MAX_VISIBLE = 5;
22320
22399
  const start = Math.max(0, Math.min(filtered.length - MAX_VISIBLE, cursor - 2));
22321
22400
  const slice = filtered.slice(start, start + MAX_VISIBLE);
22322
22401
  return /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", children: [
22323
- /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, children: " candidates (\u2191\u2193 cycle, Enter to add):" }),
22402
+ /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: " candidates (\u2191\u2193 cycle, Enter to add):" }),
22324
22403
  slice.map((name, i) => {
22325
22404
  const absIdx = start + i;
22326
22405
  const isCursor = absIdx === cursor;
22327
- return /* @__PURE__ */ jsx27(Text23, { color: isCursor ? PALETTE3.info : PALETTE3.muted, children: isCursor ? ` ${figures5.pointer} ${name}` : ` ${name}` }, name);
22406
+ return /* @__PURE__ */ jsx27(Text23, { color: isCursor ? PALETTE.accent : PALETTE.muted, children: isCursor ? ` ${figures5.pointer} ${name}` : ` ${name}` }, name);
22328
22407
  })
22329
22408
  ] });
22330
22409
  })() })
@@ -23153,18 +23232,18 @@ function FieldEditor({
23153
23232
  });
23154
23233
  const innerWidth = Math.max(1, width - 2);
23155
23234
  if (parseErr) {
23156
- return /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", width, borderStyle: "single", borderColor: PALETTE3.error, children: [
23157
- /* @__PURE__ */ jsx27(Text23, { bold: true, color: PALETTE3.error, children: "FIELD EDITOR \u2014 parse error" }),
23158
- /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.error, children: parseErr }),
23159
- /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, children: "Cannot display structured editor. Fix the JSON first." })
23235
+ return /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", width, borderStyle: "single", borderColor: PALETTE.error, children: [
23236
+ /* @__PURE__ */ jsx27(Text23, { bold: true, color: PALETTE.error, children: "FIELD EDITOR \u2014 parse error" }),
23237
+ /* @__PURE__ */ jsx27(Text23, { color: PALETTE.error, children: parseErr }),
23238
+ /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: "Cannot display structured editor. Fix the JSON first." })
23160
23239
  ] });
23161
23240
  }
23162
23241
  if (props.length === 0 && slots.length === 0) {
23163
- return /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", width, borderStyle: "single", borderColor: PALETTE3.warning, children: [
23164
- /* @__PURE__ */ jsx27(Text23, { bold: true, color: PALETTE3.warning, children: "FIELD EDITOR \u2014 no fields" }),
23165
- /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.warning, children: "\u26A0 No properties classified for this component. The LLM didn't find anything to classify." }),
23166
- /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, children: "You can add fields manually below or reject this component." }),
23167
- /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, children: "Enter to save \xB7 Esc to discard" })
23242
+ return /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", width, borderStyle: "single", borderColor: PALETTE.warning, children: [
23243
+ /* @__PURE__ */ jsx27(Text23, { bold: true, color: PALETTE.warning, children: "FIELD EDITOR \u2014 no fields" }),
23244
+ /* @__PURE__ */ jsx27(Text23, { color: PALETTE.warning, children: "\u26A0 No properties classified for this component. The LLM didn't find anything to classify." }),
23245
+ /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: "There is nothing to edit here." }),
23246
+ /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: active ? "[Esc] go back to the list" : "In the list: [r] reject this component \xB7 [a] accept it" })
23168
23247
  ] });
23169
23248
  }
23170
23249
  const hasEmptyProperties = props.length === 0 && slots.length === 0;
@@ -23293,7 +23372,7 @@ function FieldEditor({
23293
23372
  const renderRow = (row, index) => {
23294
23373
  const key = rowKey(row, index);
23295
23374
  if (row.kind === "header") {
23296
- return /* @__PURE__ */ jsx27(Box21, { flexDirection: "column", paddingTop: 1, children: /* @__PURE__ */ jsx27(Text23, { bold: true, color: PALETTE3.success, children: row.label }) }, key);
23375
+ return /* @__PURE__ */ jsx27(Box21, { flexDirection: "column", paddingTop: 1, children: /* @__PURE__ */ jsx27(Text23, { bold: true, color: PALETTE.success, children: row.label }) }, key);
23297
23376
  }
23298
23377
  if (row.kind === "component-description") {
23299
23378
  const isSelected2 = inComponentDesc && active;
@@ -23375,11 +23454,11 @@ function FieldEditor({
23375
23454
  ...fixedHeight ? { height } : { minHeight: height },
23376
23455
  clipOverflow: fixedHeight,
23377
23456
  borderStyle: "single",
23378
- borderColor: hasEmptyProperties ? PALETTE3.warning : active ? PALETTE3.info : PALETTE3.border,
23457
+ borderColor: hasEmptyProperties ? PALETTE.warning : active ? PALETTE.accent : PALETTE.border,
23379
23458
  children: [
23380
- hasEmptyProperties && /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.warning, children: "\u26A0 No properties classified for this component. The LLM didn't find anything to classify. Reject this component or add fields manually." }),
23459
+ hasEmptyProperties && /* @__PURE__ */ jsx27(Text23, { 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." }),
23381
23460
  header,
23382
- /* @__PURE__ */ jsx27(Box21, { flexDirection: "column", width: innerWidth, flexShrink: 0, children: focusLevel === "field" && !inComponentDesc && currentProp ? /* @__PURE__ */ jsx27(
23461
+ /* @__PURE__ */ jsx27(Box21, { flexDirection: "column", width: innerWidth, flexShrink: 0, children: focusLevel === "field" && !inComponentDesc && !inSlots && currentProp ? /* @__PURE__ */ jsx27(
23383
23462
  PropRow,
23384
23463
  {
23385
23464
  prop: currentProp,
@@ -23428,7 +23507,7 @@ function FieldEditor({
23428
23507
  `visible-${key}`
23429
23508
  );
23430
23509
  }) }),
23431
- categoryBelow && /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.success, bold: true, children: `(${categoryBelow} below)` }),
23510
+ categoryBelow && /* @__PURE__ */ jsx27(Text23, { color: PALETTE.success, bold: true, children: `(${categoryBelow} below)` }),
23432
23511
  sourceOpen && !onToggleSourceExternal && (() => {
23433
23512
  const propMeta = !inSlots && !inComponentDesc && currentProp ? metadata?.props?.[currentProp.name] : void 0;
23434
23513
  const start = propMeta?.sourceStartLine ?? null;
@@ -23438,20 +23517,20 @@ function FieldEditor({
23438
23517
  const headerPath = path5 ?? "<unknown source path>";
23439
23518
  if (!start || !end2 || !src) {
23440
23519
  return /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", borderStyle: "single", borderColor: "gray", paddingX: 1, children: [
23441
- /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, bold: true, children: `source: ${headerPath}` }),
23442
- /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, children: "(no source location captured for this prop)" }),
23520
+ /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, bold: true, children: `source: ${headerPath}` }),
23521
+ /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: "(no source location captured for this prop)" }),
23443
23522
  /* @__PURE__ */ jsx27(Text23, { children: "[s] close" })
23444
23523
  ] });
23445
23524
  }
23446
23525
  const lines = src.split("\n").slice(Math.max(0, start - 1), end2);
23447
23526
  return /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", borderStyle: "single", borderColor: "gray", paddingX: 1, children: [
23448
- /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, bold: true, children: `${headerPath}: lines ${start}\u2013${end2}` }),
23449
- lines.map((ln, i) => /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, children: ln }, `source-line-${i}`)),
23527
+ /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, bold: true, children: `${headerPath}: lines ${start}\u2013${end2}` }),
23528
+ lines.map((ln, i) => /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: ln }, `source-line-${i}`)),
23450
23529
  /* @__PURE__ */ jsx27(Text23, { children: "[s] close \xB7 [Esc] close" })
23451
23530
  ] });
23452
23531
  })(),
23453
- showHelp && /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE3.info, paddingX: 1, children: [
23454
- /* @__PURE__ */ jsx27(Text23, { bold: true, color: PALETTE3.info, children: "Keybindings" }),
23532
+ showHelp && /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.accent, paddingX: 1, children: [
23533
+ /* @__PURE__ */ jsx27(Text23, { bold: true, color: PALETTE.accent, children: "Keybindings" }),
23455
23534
  /* @__PURE__ */ jsx27(Text23, { children: " " }),
23456
23535
  /* @__PURE__ */ jsx27(Text23, { bold: true, children: "Row navigation" }),
23457
23536
  /* @__PURE__ */ jsx27(Text23, { children: " \u2191/\u2193 move between rows" }),
@@ -23476,10 +23555,10 @@ function FieldEditor({
23476
23555
  /* @__PURE__ */ jsx27(Text23, { children: " " + componentRationaleKey.padEnd(16) + " toggle component rationale panel" }),
23477
23556
  /* @__PURE__ */ jsx27(Text23, { children: " ? toggle this overlay" }),
23478
23557
  /* @__PURE__ */ jsx27(Text23, { children: " " }),
23479
- /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, children: "press ? or Esc to close" })
23558
+ /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: "press ? or Esc to close" })
23480
23559
  ] }),
23481
- validationError && /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.error, children: "\u2717 " + validationError }),
23482
- /* @__PURE__ */ jsx27(Box21, { paddingTop: 1, children: /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, children: modeLabel }) })
23560
+ validationError && /* @__PURE__ */ jsx27(Text23, { color: PALETTE.error, children: "\u2717 " + validationError }),
23561
+ /* @__PURE__ */ jsx27(Box21, { paddingTop: 1, children: /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: modeLabel }) })
23483
23562
  ]
23484
23563
  }
23485
23564
  );
@@ -23531,16 +23610,16 @@ function RationaleLine({ line, active }) {
23531
23610
  return /* @__PURE__ */ jsx28(Box22, { children: /* @__PURE__ */ jsx28(Text24, { children: " " }) });
23532
23611
  }
23533
23612
  if (line.kind === "heading") {
23534
- return /* @__PURE__ */ jsx28(Box22, { children: /* @__PURE__ */ jsx28(Text24, { bold: true, color: active ? PALETTE3.info : PALETTE3.muted, children: line.text }) });
23613
+ return /* @__PURE__ */ jsx28(Box22, { children: /* @__PURE__ */ jsx28(Text24, { bold: true, color: active ? PALETTE.accent : PALETTE.muted, children: line.text }) });
23535
23614
  }
23536
23615
  if (line.kind === "label") {
23537
23616
  return /* @__PURE__ */ jsxs23(Box22, { children: [
23538
23617
  line.prefix && /* @__PURE__ */ jsx28(Text24, { children: line.prefix }),
23539
- /* @__PURE__ */ jsx28(Text24, { bold: true, color: active ? line.color : PALETTE3.muted, children: line.text }),
23540
- line.suffix && /* @__PURE__ */ jsx28(Text24, { color: PALETTE3.muted, children: line.suffix })
23618
+ /* @__PURE__ */ jsx28(Text24, { bold: true, color: active ? line.color : PALETTE.muted, children: line.text }),
23619
+ line.suffix && /* @__PURE__ */ jsx28(Text24, { color: PALETTE.muted, children: line.suffix })
23541
23620
  ] });
23542
23621
  }
23543
- return /* @__PURE__ */ jsx28(Box22, { children: /* @__PURE__ */ jsx28(Text24, { color: !active || line.dim ? PALETTE3.muted : void 0, children: line.text }) });
23622
+ return /* @__PURE__ */ jsx28(Box22, { children: /* @__PURE__ */ jsx28(Text24, { color: !active || line.dim ? PALETTE.muted : void 0, children: line.text }) });
23544
23623
  }
23545
23624
 
23546
23625
  // packages/experience-design-system-cli/src/tui/import/steps/09-review/components/ComponentRationalePanel.tsx
@@ -23619,9 +23698,9 @@ function ComponentRationalePanel({
23619
23698
  width,
23620
23699
  height: height + 2,
23621
23700
  borderStyle: "single",
23622
- borderColor: active ? PALETTE3.inverse : void 0,
23701
+ borderColor: active ? PALETTE.text : void 0,
23623
23702
  children: [
23624
- /* @__PURE__ */ jsx29(Box23, { children: /* @__PURE__ */ jsx29(Text25, { bold: true, color: active ? void 0 : PALETTE3.muted, children: `Component rationale: ${data.name}` }) }),
23703
+ /* @__PURE__ */ jsx29(Box23, { children: /* @__PURE__ */ jsx29(Text25, { bold: true, color: active ? void 0 : PALETTE.muted, children: `Component rationale: ${data.name}` }) }),
23625
23704
  visible.map((line, i) => /* @__PURE__ */ jsx29(RationaleLine, { line, active }, i)),
23626
23705
  /* @__PURE__ */ jsx29(Box23, { children: overflowed ? /* @__PURE__ */ jsx29(Text25, { children: `${visibleStart}-${visibleEnd}/${totalLines} [\u2191\u2193] scroll [I/Esc] close` }) : /* @__PURE__ */ jsx29(Text25, { children: "[I/Esc] close" }) })
23627
23706
  ]
@@ -23636,7 +23715,7 @@ import { Box as Box25 } from "ink";
23636
23715
  import { Text as Text26 } from "ink";
23637
23716
  import { Fragment as Fragment6, jsx as jsx30 } from "react/jsx-runtime";
23638
23717
  function HighlightedLine({ parts }) {
23639
- return /* @__PURE__ */ jsx30(Fragment6, { children: parts.map((part, i) => /* @__PURE__ */ jsx30(Text26, { color: part.dim ? PALETTE3.muted : part.color, children: part.text }, i)) });
23718
+ return /* @__PURE__ */ jsx30(Fragment6, { children: parts.map((part, i) => /* @__PURE__ */ jsx30(Text26, { color: part.dim ? PALETTE.muted : part.color, children: part.text }, i)) });
23640
23719
  }
23641
23720
 
23642
23721
  // packages/experience-design-system-cli/src/tui/import/steps/09-review/components/ScrollablePanel.tsx
@@ -23656,10 +23735,10 @@ function ScrollablePanel({
23656
23735
  const overflowed = totalLines > height;
23657
23736
  return /* @__PURE__ */ jsxs25(Box24, { flexDirection: "column", width, height: height + 2, borderStyle: "single", borderColor, children: [
23658
23737
  /* @__PURE__ */ jsxs25(Box24, { children: [
23659
- /* @__PURE__ */ jsx31(Text27, { bold: true, color: active ? void 0 : PALETTE3.muted, children: title }),
23738
+ /* @__PURE__ */ jsx31(Text27, { bold: true, color: active ? void 0 : PALETTE.muted, children: title }),
23660
23739
  overflowed && /* @__PURE__ */ jsxs25(Fragment7, { children: [
23661
23740
  /* @__PURE__ */ jsx31(Box24, { flexGrow: 1 }),
23662
- /* @__PURE__ */ jsx31(Text27, { color: active ? void 0 : PALETTE3.muted, children: `\u2195 ${visibleStart}-${visibleEnd}/${totalLines}` })
23741
+ /* @__PURE__ */ jsx31(Text27, { color: active ? void 0 : PALETTE.muted, children: `\u2195 ${visibleStart}-${visibleEnd}/${totalLines}` })
23663
23742
  ] })
23664
23743
  ] }),
23665
23744
  children
@@ -23745,7 +23824,7 @@ function renderRationaleLines(rows, innerWidth) {
23745
23824
  out.push({
23746
23825
  kind: "label",
23747
23826
  text: row.name,
23748
- color: PALETTE3.info,
23827
+ color: PALETTE.accent,
23749
23828
  suffix: row.kind === "slot" ? " (slot)" : void 0
23750
23829
  });
23751
23830
  for (const line of wrapText(row.rationale, innerWidth)) {
@@ -23781,7 +23860,7 @@ function RationalePanel({
23781
23860
  totalLines,
23782
23861
  visibleStart,
23783
23862
  visibleEnd,
23784
- borderColor: active ? PALETTE3.inverse : void 0,
23863
+ borderColor: active ? PALETTE.text : void 0,
23785
23864
  children: visible.map((line, i) => /* @__PURE__ */ jsx33(RationaleLine, { line, active }, i))
23786
23865
  }
23787
23866
  );
@@ -23816,21 +23895,29 @@ function TokenReviewPanel({
23816
23895
  width,
23817
23896
  height: height + 2,
23818
23897
  borderStyle: "single",
23819
- borderColor: active ? PALETTE3.inverse : void 0,
23898
+ borderColor: active ? PALETTE.text : void 0,
23820
23899
  children: [
23821
- /* @__PURE__ */ jsx34(Text28, { bold: true, color: active ? void 0 : PALETTE3.muted, wrap: "truncate", children: `TOKEN REVIEW \u2014 ${componentName} \xB7 ${current.propName} (edit allowed)` }),
23822
- /* @__PURE__ */ jsx34(Text28, { color: PALETTE3.muted, wrap: "truncate", children: `select which tokens are allowed (${rangeLabel})` }),
23900
+ /* @__PURE__ */ jsx34(Text28, { bold: true, color: active ? void 0 : PALETTE.muted, wrap: "truncate", children: `TOKEN REVIEW \u2014 ${componentName} \xB7 ${current.propName} (edit allowed)` }),
23901
+ /* @__PURE__ */ jsx34(Text28, { color: PALETTE.muted, wrap: "truncate", children: `select which tokens are allowed (${rangeLabel})` }),
23823
23902
  /* @__PURE__ */ jsx34(Text28, { children: " " }),
23824
- current.paths.length === 0 && /* @__PURE__ */ jsx34(Text28, { color: PALETTE3.muted, children: "(no compatible tokens found for this token kind)" }),
23903
+ current.paths.length === 0 && /* @__PURE__ */ jsx34(Text28, { color: PALETTE.muted, children: "(no compatible tokens found for this token kind)" }),
23825
23904
  visiblePaths.map((path5, i) => {
23826
23905
  const pathIndex = scrollStart + i;
23827
23906
  const checked = editSelection.has(path5);
23828
23907
  const focused = pathIndex === editCursor;
23829
- return /* @__PURE__ */ jsx34(Box26, { children: /* @__PURE__ */ jsx34(Text28, { color: focused ? PALETTE3.info : active ? void 0 : PALETTE3.muted, bold: focused, wrap: "truncate", children: ` [${checked ? "x" : " "}] ${path5}` }) }, path5);
23908
+ return /* @__PURE__ */ jsx34(Box26, { children: /* @__PURE__ */ jsx34(
23909
+ Text28,
23910
+ {
23911
+ color: focused ? PALETTE.accent : active ? void 0 : PALETTE.muted,
23912
+ bold: focused,
23913
+ wrap: "truncate",
23914
+ children: ` [${checked ? "x" : " "}] ${path5}`
23915
+ }
23916
+ ) }, path5);
23830
23917
  }),
23831
23918
  /* @__PURE__ */ jsx34(Text28, { children: " " }),
23832
- /* @__PURE__ */ jsx34(Text28, { color: PALETTE3.muted, wrap: "truncate", children: "[\u2191/\u2193] move [Space] toggle" }),
23833
- /* @__PURE__ */ jsx34(Text28, { color: PALETTE3.muted, wrap: "truncate", children: "[Ctrl+S] save [Esc] cancel" })
23919
+ /* @__PURE__ */ jsx34(Text28, { color: PALETTE.muted, wrap: "truncate", children: "[\u2191/\u2193] move [Space] toggle" }),
23920
+ /* @__PURE__ */ jsx34(Text28, { color: PALETTE.muted, wrap: "truncate", children: "[Ctrl+S] save [Esc] cancel" })
23834
23921
  ]
23835
23922
  }
23836
23923
  );
@@ -23842,16 +23929,16 @@ function TokenReviewPanel({
23842
23929
  width,
23843
23930
  height: height + 2,
23844
23931
  borderStyle: "single",
23845
- borderColor: active ? PALETTE3.inverse : void 0,
23932
+ borderColor: active ? PALETTE.text : void 0,
23846
23933
  children: [
23847
- /* @__PURE__ */ jsx34(Text28, { bold: true, color: active ? void 0 : PALETTE3.muted, children: `TOKEN REVIEW \u2014 ${componentName}` }),
23848
- suggestions.length === 0 && /* @__PURE__ */ jsx34(Text28, { color: PALETTE3.muted, children: "(no token suggestions for this component)" }),
23934
+ /* @__PURE__ */ jsx34(Text28, { bold: true, color: active ? void 0 : PALETTE.muted, children: `TOKEN REVIEW \u2014 ${componentName}` }),
23935
+ suggestions.length === 0 && /* @__PURE__ */ jsx34(Text28, { color: PALETTE.muted, children: "(no token suggestions for this component)" }),
23849
23936
  suggestions.map((s, i) => {
23850
23937
  const focused = i === selectedRow;
23851
23938
  return /* @__PURE__ */ jsxs26(Box26, { flexDirection: "column", children: [
23852
- /* @__PURE__ */ jsx34(Box26, { children: /* @__PURE__ */ jsx34(Text28, { color: focused ? PALETTE3.info : active ? void 0 : PALETTE3.muted, bold: focused, children: `${focused ? figures6.pointer : " "} ${s.propName}` }) }),
23853
- /* @__PURE__ */ jsx34(Text28, { color: PALETTE3.muted, children: ` suggested: ${s.suggested.join(", ")}` }),
23854
- /* @__PURE__ */ jsx34(Text28, { color: PALETTE3.muted, children: ` allowed: ${s.allowed.join(", ")}` })
23939
+ /* @__PURE__ */ jsx34(Box26, { children: /* @__PURE__ */ jsx34(Text28, { color: focused ? PALETTE.accent : active ? void 0 : PALETTE.muted, bold: focused, children: `${focused ? figures6.pointer : " "} ${s.propName}` }) }),
23940
+ /* @__PURE__ */ jsx34(Text28, { color: PALETTE.muted, children: ` suggested: ${s.suggested.join(", ")}` }),
23941
+ /* @__PURE__ */ jsx34(Text28, { color: PALETTE.muted, children: ` allowed: ${s.allowed.join(", ")}` })
23855
23942
  ] }, s.propName);
23856
23943
  }),
23857
23944
  /* @__PURE__ */ jsx34(Text28, { children: " " }),
@@ -23936,9 +24023,9 @@ function ReviewDetailsPanel({
23936
24023
  const sourceLineCount = Math.max(1, height - 4);
23937
24024
  const lines = source ? source.split("\n").slice(panelScrollOffset, panelScrollOffset + sourceLineCount) : [];
23938
24025
  return /* @__PURE__ */ jsxs27(FixedPanel, { width, height, borderStyle: "single", borderColor: sourceBorderColor, paddingLeft: 1, children: [
23939
- /* @__PURE__ */ jsx35(Text29, { color: PALETTE3.muted, bold: true, wrap: "truncate-end", children: `source: ${headerPath}` }),
23940
- source ? lines.map((line, index) => /* @__PURE__ */ jsx35(Text29, { color: PALETTE3.muted, wrap: "truncate-end", children: line }, `source-line-${index}`)) : /* @__PURE__ */ jsx35(Text29, { color: PALETTE3.muted, children: "(no source captured)" }),
23941
- /* @__PURE__ */ jsx35(Text29, { color: PALETTE3.muted, wrap: "truncate-end", children: "[s/Esc] close" })
24026
+ /* @__PURE__ */ jsx35(Text29, { color: PALETTE.muted, bold: true, wrap: "truncate-end", children: `source: ${headerPath}` }),
24027
+ source ? lines.map((line, index) => /* @__PURE__ */ jsx35(Text29, { color: PALETTE.muted, wrap: "truncate-end", children: line }, `source-line-${index}`)) : /* @__PURE__ */ jsx35(Text29, { color: PALETTE.muted, children: "(no source captured)" }),
24028
+ /* @__PURE__ */ jsx35(Text29, { color: PALETTE.muted, wrap: "truncate-end", children: "[s/Esc] close" })
23942
24029
  ] });
23943
24030
  }
23944
24031
  if (panelOpen === "token-review") {
@@ -24088,17 +24175,17 @@ function ReviewEmptyComponentsWarning({
24088
24175
  hidden
24089
24176
  }) {
24090
24177
  if (hidden || count === 0) return null;
24091
- return /* @__PURE__ */ jsx37(Text30, { color: PALETTE3.warning, children: `\u26A0 ${count} component${count === 1 ? "" : "s"} had no classifiable props \u2014 review with care` });
24178
+ return /* @__PURE__ */ jsx37(Text30, { color: PALETTE.warning, children: `\u26A0 ${count} component${count === 1 ? "" : "s"} had no classifiable props \u2014 review with care` });
24092
24179
  }
24093
24180
  function ReviewNoSelection() {
24094
- return /* @__PURE__ */ jsx37(Box27, { flexGrow: 1, paddingLeft: 1, flexDirection: "column", children: /* @__PURE__ */ jsx37(Text30, { color: PALETTE3.muted, children: "No component selected" }) });
24181
+ return /* @__PURE__ */ jsx37(Box27, { flexGrow: 1, paddingLeft: 1, flexDirection: "column", children: /* @__PURE__ */ jsx37(Text30, { color: PALETTE.muted, children: "No component selected" }) });
24095
24182
  }
24096
24183
  function ReviewFinalizeError({
24097
24184
  message,
24098
24185
  hidden
24099
24186
  }) {
24100
24187
  if (hidden || !message) return null;
24101
- return /* @__PURE__ */ jsx37(Text30, { color: PALETTE3.error, children: `\u26A0 ${message}` });
24188
+ return /* @__PURE__ */ jsx37(Text30, { color: PALETTE.error, children: `\u26A0 ${message}` });
24102
24189
  }
24103
24190
  function ReviewPanelFooter({
24104
24191
  reviewEditor,
@@ -24122,7 +24209,7 @@ function ReviewComponentTitle({
24122
24209
  return /* @__PURE__ */ jsxs28(Box27, { paddingLeft: 2, paddingBottom: 1, children: [
24123
24210
  /* @__PURE__ */ jsx37(Text30, { bold: true, wrap: "truncate-end", children: selectedKey }),
24124
24211
  /* @__PURE__ */ jsx37(Box27, { flexGrow: 1 }),
24125
- /* @__PURE__ */ jsxs28(Text30, { color: PALETTE3.muted, wrap: "truncate-end", children: [
24212
+ /* @__PURE__ */ jsxs28(Text30, { color: PALETTE.muted, wrap: "truncate-end", children: [
24126
24213
  propCount,
24127
24214
  " prop",
24128
24215
  propCount !== 1 ? "s" : "",
@@ -24178,8 +24265,8 @@ function ReviewComponentPanel({
24178
24265
  )
24179
24266
  }
24180
24267
  ) }),
24181
- /* @__PURE__ */ jsx37(Box27, { width: contentWidth, height: 1, flexShrink: 0, children: /* @__PURE__ */ jsx37(Text30, { color: saveError ? PALETTE3.error : void 0, wrap: "truncate-end", children: saveError ? "\u2717 " + saveError : " " }) }),
24182
- /* @__PURE__ */ jsx37(Box27, { width: contentWidth, height: 1, flexShrink: 0, children: /* @__PURE__ */ jsx37(Text30, { color: PALETTE3.muted, wrap: "truncate-end", children: /* @__PURE__ */ jsx37(
24268
+ /* @__PURE__ */ jsx37(Box27, { width: contentWidth, height: 1, flexShrink: 0, children: /* @__PURE__ */ jsx37(Text30, { color: saveError ? PALETTE.error : void 0, wrap: "truncate-end", children: saveError ? "\u2717 " + saveError : " " }) }),
24269
+ /* @__PURE__ */ jsx37(Box27, { width: contentWidth, height: 1, flexShrink: 0, children: /* @__PURE__ */ jsx37(Text30, { color: PALETTE.muted, wrap: "truncate-end", children: /* @__PURE__ */ jsx37(
24183
24270
  ReviewPanelFooter,
24184
24271
  {
24185
24272
  reviewEditor,
@@ -24207,11 +24294,11 @@ function countReviewStatuses(entries) {
24207
24294
  );
24208
24295
  }
24209
24296
  function ReviewLoadingState() {
24210
- return /* @__PURE__ */ jsx38(Box28, { paddingX: 2, paddingY: 1, children: /* @__PURE__ */ jsx38(Text31, { color: PALETTE3.muted, children: "Loading generated definitions..." }) });
24297
+ return /* @__PURE__ */ jsx38(Box28, { paddingX: 2, paddingY: 1, children: /* @__PURE__ */ jsx38(Text31, { color: PALETTE.muted, children: "Loading generated definitions..." }) });
24211
24298
  }
24212
24299
  function ReviewLoadError({ message }) {
24213
24300
  return /* @__PURE__ */ jsxs29(Box28, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
24214
- /* @__PURE__ */ jsx38(Text31, { color: PALETTE3.error, children: message }),
24301
+ /* @__PURE__ */ jsx38(Text31, { color: PALETTE.error, children: message }),
24215
24302
  /* @__PURE__ */ jsx38(Text31, { children: " " }),
24216
24303
  /* @__PURE__ */ jsx38(Text31, { children: "[q / Enter / Esc] Quit" })
24217
24304
  ] });
@@ -24288,6 +24375,7 @@ function finalizeReviewSession(extractSessionId, components) {
24288
24375
  db.exec("ROLLBACK");
24289
24376
  throw error;
24290
24377
  }
24378
+ removeSlotAllowedComponents(db, extractSessionId, [], toReject);
24291
24379
  } finally {
24292
24380
  db.close();
24293
24381
  }
@@ -24447,41 +24535,41 @@ function FinalizeDialog({
24447
24535
  /* @__PURE__ */ jsx39(Text32, { bold: true, children: "\u2500".repeat(22) + " Finalize " + "\u2500".repeat(22) }),
24448
24536
  /* @__PURE__ */ jsx39(Text32, { children: " " }),
24449
24537
  /* @__PURE__ */ jsxs30(Text32, { children: [
24450
- /* @__PURE__ */ jsxs30(Text32, { color: PALETTE3.success, children: [
24538
+ /* @__PURE__ */ jsxs30(Text32, { color: PALETTE.success, children: [
24451
24539
  accepted,
24452
24540
  " accepted"
24453
24541
  ] }),
24454
24542
  /* @__PURE__ */ jsx39(Text32, { children: " \xB7 " }),
24455
- /* @__PURE__ */ jsxs30(Text32, { color: PALETTE3.error, children: [
24543
+ /* @__PURE__ */ jsxs30(Text32, { color: PALETTE.error, children: [
24456
24544
  rejected,
24457
24545
  " rejected"
24458
24546
  ] }),
24459
24547
  /* @__PURE__ */ jsx39(Text32, { children: " \xB7 " }),
24460
- /* @__PURE__ */ jsxs30(Text32, { color: PALETTE3.muted, children: [
24548
+ /* @__PURE__ */ jsxs30(Text32, { color: PALETTE.muted, children: [
24461
24549
  needsReview,
24462
24550
  " unresolved"
24463
24551
  ] })
24464
24552
  ] }),
24465
24553
  /* @__PURE__ */ jsx39(Text32, { children: " " }),
24466
24554
  noneAccepted && /* @__PURE__ */ jsxs30(Fragment10, { children: [
24467
- /* @__PURE__ */ jsx39(Text32, { bold: true, color: PALETTE3.warning, children: "\u26A0 No components are accepted \u2014 nothing will be pushed." }),
24468
- /* @__PURE__ */ jsx39(Text32, { color: PALETTE3.warning, children: "Accept at least one component ([a] a row, [A] accept all) to push." }),
24555
+ /* @__PURE__ */ jsx39(Text32, { bold: true, color: PALETTE.warning, children: "\u26A0 No components are accepted \u2014 nothing will be pushed." }),
24556
+ /* @__PURE__ */ jsx39(Text32, { color: PALETTE.warning, children: "Accept at least one component ([a] a row, [A] accept all) to push." }),
24469
24557
  /* @__PURE__ */ jsx39(Text32, { children: " " })
24470
24558
  ] }),
24471
24559
  !allResolved && /* @__PURE__ */ jsxs30(Fragment10, { children: [
24472
- /* @__PURE__ */ jsx39(Text32, { color: PALETTE3.warning, children: "\u26A0 " + needsReview + " unresolved component" + (needsReview === 1 ? "" : "s") + " will not be pushed." }),
24473
- /* @__PURE__ */ jsx39(Text32, { color: PALETTE3.warning, children: "Only explicitly accepted components ship." }),
24560
+ /* @__PURE__ */ jsx39(Text32, { color: PALETTE.warning, children: "\u26A0 " + needsReview + " unresolved component" + (needsReview === 1 ? "" : "s") + " will not be pushed." }),
24561
+ /* @__PURE__ */ jsx39(Text32, { color: PALETTE.warning, children: "Only explicitly accepted components ship." }),
24474
24562
  /* @__PURE__ */ jsx39(Text32, { children: " " })
24475
24563
  ] }),
24476
24564
  /* @__PURE__ */ jsxs30(Box29, { flexDirection: "column", height: 2, children: [
24477
- previewStatus === "running" ? /* @__PURE__ */ jsx39(Text32, { color: PALETTE3.muted, children: "Previewing deletions against the target space\u2026" }) : previewStatus === "error" ? /* @__PURE__ */ jsx39(Text32, { color: PALETTE3.warning, children: "\u26A0 Could not preview deletions (the push will still proceed)." }) : /* @__PURE__ */ jsx39(Text32, { children: " " }),
24565
+ previewStatus === "running" ? /* @__PURE__ */ jsx39(Text32, { color: PALETTE.muted, children: "Previewing deletions against the target space\u2026" }) : previewStatus === "error" ? /* @__PURE__ */ jsx39(Text32, { color: PALETTE.warning, children: "\u26A0 Could not preview deletions (the push will still proceed)." }) : /* @__PURE__ */ jsx39(Text32, { children: " " }),
24478
24566
  /* @__PURE__ */ jsx39(Text32, { children: " " })
24479
24567
  ] }),
24480
24568
  previewStatus === "done" && removed.length > 0 && /* @__PURE__ */ jsxs30(Fragment10, { children: [
24481
- /* @__PURE__ */ jsx39(Text32, { bold: true, color: PALETTE3.error, children: removedComponentsHeader(removed.length, false) }),
24482
- hasMoreAbove && /* @__PURE__ */ jsx39(Text32, { color: PALETTE3.muted, children: "\u2191 more above" }),
24483
- windowed.map((rc) => /* @__PURE__ */ jsx39(Text32, { color: PALETTE3.error, children: removedComponentLine(rc) }, rc.id)),
24484
- hasMoreBelow && /* @__PURE__ */ jsx39(Text32, { color: PALETTE3.muted, children: "\u2193 more below" }),
24569
+ /* @__PURE__ */ jsx39(Text32, { bold: true, color: PALETTE.error, children: removedComponentsHeader(removed.length, false) }),
24570
+ hasMoreAbove && /* @__PURE__ */ jsx39(Text32, { color: PALETTE.muted, children: "\u2191 more above" }),
24571
+ windowed.map((rc) => /* @__PURE__ */ jsx39(Text32, { color: PALETTE.error, children: removedComponentLine(rc) }, rc.id)),
24572
+ hasMoreBelow && /* @__PURE__ */ jsx39(Text32, { color: PALETTE.muted, children: "\u2193 more below" }),
24485
24573
  removed.length > FINALIZE_REMOVED_WINDOW && /* @__PURE__ */ jsx39(Text32, { children: "[\u2191\u2193] scroll deletions" }),
24486
24574
  /* @__PURE__ */ jsx39(Text32, { children: " " })
24487
24575
  ] }),
@@ -24975,8 +25063,8 @@ function ReviewStepDialogs({
24975
25063
  }
24976
25064
  function ReviewReloadDialog({ open }) {
24977
25065
  if (!open) return null;
24978
- return /* @__PURE__ */ jsxs32(Box31, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE3.warning, paddingX: 1, children: [
24979
- /* @__PURE__ */ jsx41(Text34, { bold: true, color: PALETTE3.warning, children: "Reload from saved state?" }),
25066
+ return /* @__PURE__ */ jsxs32(Box31, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
25067
+ /* @__PURE__ */ jsx41(Text34, { bold: true, color: PALETTE.warning, children: "Reload from saved state?" }),
24980
25068
  /* @__PURE__ */ jsx41(Text34, { children: "Unsaved in-memory changes will be lost." }),
24981
25069
  /* @__PURE__ */ jsx41(Text34, { children: " " }),
24982
25070
  /* @__PURE__ */ jsx41(Text34, { children: " [Enter] Confirm" }),
@@ -25362,19 +25450,19 @@ function LivePreviewSummary({
25362
25450
  const counts = { new: 0, changed: 0, removed: 0, breaking: 0 };
25363
25451
  for (const annotation of previewAnnotations.values()) counts[annotation] += 1;
25364
25452
  const hasCounts = counts.new + counts.changed + counts.removed + counts.breaking > 0;
25365
- if (disabled) return /* @__PURE__ */ jsx42(Text35, { color: PALETTE3.muted, children: "Preview: disabled (creds rejected)" });
25366
- if (status === "running" && !hasCounts) return /* @__PURE__ */ jsx42(Text35, { color: PALETTE3.muted, children: `Preview: ${spinner} running...` });
25453
+ if (disabled) return /* @__PURE__ */ jsx42(Text35, { color: PALETTE.muted, children: "Preview: disabled (creds rejected)" });
25454
+ if (status === "running" && !hasCounts) return /* @__PURE__ */ jsx42(Text35, { color: PALETTE.muted, children: `Preview: ${spinner} running...` });
25367
25455
  if (!hasCounts) return null;
25368
25456
  return /* @__PURE__ */ jsxs33(Box32, { children: [
25369
25457
  /* @__PURE__ */ jsx42(Text35, { children: "Preview: " }),
25370
- /* @__PURE__ */ jsx42(Text35, { color: PALETTE3.success, children: `${counts.new} new` }),
25458
+ /* @__PURE__ */ jsx42(Text35, { color: PALETTE.success, children: `${counts.new} new` }),
25371
25459
  /* @__PURE__ */ jsx42(Text35, { children: " \xB7 " }),
25372
- /* @__PURE__ */ jsx42(Text35, { color: PALETTE3.warning, children: `${counts.changed} changed` }),
25460
+ /* @__PURE__ */ jsx42(Text35, { color: PALETTE.warning, children: `${counts.changed} changed` }),
25373
25461
  /* @__PURE__ */ jsx42(Text35, { children: " \xB7 " }),
25374
- /* @__PURE__ */ jsx42(Text35, { color: PALETTE3.muted, children: `${counts.removed} removed` }),
25462
+ /* @__PURE__ */ jsx42(Text35, { color: PALETTE.muted, children: `${counts.removed} removed` }),
25375
25463
  showRemovedListHint && removedCount > 0 && /* @__PURE__ */ jsx42(Text35, { children: " ([d] removed list)" }),
25376
25464
  /* @__PURE__ */ jsx42(Text35, { children: " \xB7 " }),
25377
- /* @__PURE__ */ jsx42(Text35, { color: PALETTE3.error, bold: true, children: `${counts.breaking} breaking` })
25465
+ /* @__PURE__ */ jsx42(Text35, { color: PALETTE.error, bold: true, children: `${counts.breaking} breaking` })
25378
25466
  ] });
25379
25467
  }
25380
25468
 
@@ -25420,10 +25508,10 @@ function CyclePathLine({
25420
25508
  highlightComponents = false,
25421
25509
  highlightLine = false
25422
25510
  }) {
25423
- return /* @__PURE__ */ jsxs34(Text36, { color: highlightLine ? PALETTE3.warning : void 0, children: [
25511
+ return /* @__PURE__ */ jsxs34(Text36, { color: highlightLine ? PALETTE.warning : void 0, children: [
25424
25512
  prefix,
25425
25513
  segments.map(
25426
- (segment, index) => segment.kind === "slot" ? /* @__PURE__ */ jsx43(Text36, { color: PALETTE3.info, children: segment.text }, index) : segment.kind === "arrow" ? /* @__PURE__ */ jsx43(Text36, { color: PALETTE3.muted, children: segment.text }, index) : /* @__PURE__ */ jsx43(Text36, { color: highlightComponents ? PALETTE3.warning : void 0, children: segment.text }, index)
25514
+ (segment, index) => segment.kind === "slot" ? /* @__PURE__ */ jsx43(Text36, { color: PALETTE.accent, children: segment.text }, index) : segment.kind === "arrow" ? /* @__PURE__ */ jsx43(Text36, { color: PALETTE.muted, children: segment.text }, index) : /* @__PURE__ */ jsx43(Text36, { color: highlightComponents ? PALETTE.warning : void 0, children: segment.text }, index)
25427
25515
  )
25428
25516
  ] });
25429
25517
  }
@@ -25435,9 +25523,9 @@ function CycleDetailPanel({
25435
25523
  height
25436
25524
  }) {
25437
25525
  const lines = [
25438
- /* @__PURE__ */ jsx43(Text36, { bold: true, color: PALETTE3.warning, children: `SLOT DEPENDENCY CYCLES (${cycles.length})` }, "cyc-title"),
25439
- /* @__PURE__ */ jsx43(Text36, { color: PALETTE3.muted, children: "push will fail until these are resolved" }, "cyc-sub"),
25440
- /* @__PURE__ */ jsx43(Text36, { color: PALETTE3.muted, children: "Reject a cycle member or remove a slot edge to break the cycle." }, "cyc-guidance"),
25526
+ /* @__PURE__ */ jsx43(Text36, { bold: true, color: PALETTE.warning, children: `SLOT DEPENDENCY CYCLES (${cycles.length})` }, "cyc-title"),
25527
+ /* @__PURE__ */ jsx43(Text36, { color: PALETTE.muted, children: "push will fail until these are resolved" }, "cyc-sub"),
25528
+ /* @__PURE__ */ jsx43(Text36, { color: PALETTE.muted, children: "Reject a cycle member or remove a slot edge to break the cycle." }, "cyc-guidance"),
25441
25529
  /* @__PURE__ */ jsx43(Text36, { children: " " }, "cyc-space")
25442
25530
  ];
25443
25531
  cycles.forEach((cycle, index) => {
@@ -25449,7 +25537,7 @@ function CycleDetailPanel({
25449
25537
  );
25450
25538
  if (cycle.suggestedBreak) {
25451
25539
  lines.push(
25452
- /* @__PURE__ */ jsx43(Text36, { color: PALETTE3.muted, children: ` Suggested fix: remove [${cycle.suggestedBreak.slotName}] from ${cycle.suggestedBreak.fromComponent}` }, `cyc-fix-${index}`)
25540
+ /* @__PURE__ */ jsx43(Text36, { color: PALETTE.muted, children: ` Suggested fix: remove [${cycle.suggestedBreak.slotName}] from ${cycle.suggestedBreak.fromComponent}` }, `cyc-fix-${index}`)
25453
25541
  );
25454
25542
  }
25455
25543
  lines.push(/* @__PURE__ */ jsx43(Text36, { children: " " }, `cyc-s-${index}`));
@@ -25457,9 +25545,9 @@ function CycleDetailPanel({
25457
25545
  const footer = "[\u2191\u2193] move [Enter] fix cycle [c/q/Esc] close";
25458
25546
  const viewportHeight = Math.max(1, height - 3);
25459
25547
  const visible = lines.slice(scrollOffset, scrollOffset + viewportHeight - 1);
25460
- return /* @__PURE__ */ jsxs34(FixedPanel, { width, height, borderStyle: "round", borderColor: PALETTE3.warning, paddingLeft: 1, children: [
25548
+ return /* @__PURE__ */ jsxs34(FixedPanel, { width, height, borderStyle: "round", borderColor: PALETTE.warning, paddingLeft: 1, children: [
25461
25549
  visible,
25462
- /* @__PURE__ */ jsx43(Text36, { color: PALETTE3.muted, children: footer })
25550
+ /* @__PURE__ */ jsx43(Text36, { color: PALETTE.muted, children: footer })
25463
25551
  ] });
25464
25552
  }
25465
25553
  function BreakCyclePanel({
@@ -25470,14 +25558,14 @@ function BreakCyclePanel({
25470
25558
  width,
25471
25559
  height
25472
25560
  }) {
25473
- return /* @__PURE__ */ jsxs34(FixedPanel, { width, height, borderStyle: "round", borderColor: PALETTE3.warning, paddingLeft: 1, children: [
25474
- /* @__PURE__ */ jsx43(Text36, { bold: true, color: PALETTE3.warning, children: "BREAK CYCLE \u2014 remove a slot edge" }),
25561
+ return /* @__PURE__ */ jsxs34(FixedPanel, { width, height, borderStyle: "round", borderColor: PALETTE.warning, paddingLeft: 1, children: [
25562
+ /* @__PURE__ */ jsx43(Text36, { bold: true, color: PALETTE.warning, children: "BREAK CYCLE \u2014 remove a slot edge" }),
25475
25563
  cycle && /* @__PURE__ */ jsx43(CyclePathLine, { segments: formatCyclePathSegments2(cycle), prefix: " ", highlightComponents: true }),
25476
- /* @__PURE__ */ jsx43(Text36, { color: PALETTE3.muted, children: cycle ? "Deleting an edge removes it from $allowedComponents (undo with Ctrl+Z)." : "No cycle highlighted." }),
25564
+ /* @__PURE__ */ jsx43(Text36, { color: PALETTE.muted, children: cycle ? "Deleting an edge removes it from $allowedComponents (undo with Ctrl+Z)." : "No cycle highlighted." }),
25477
25565
  /* @__PURE__ */ jsx43(Text36, { children: " " }),
25478
- edges.length > 0 && /* @__PURE__ */ jsx43(Text36, { color: PALETTE3.muted, children: "remove slot edge:" }),
25566
+ edges.length > 0 && /* @__PURE__ */ jsx43(Text36, { color: PALETTE.muted, children: "remove slot edge:" }),
25479
25567
  edges.map((edge, index) => /* @__PURE__ */ jsx43(Text36, { inverse: index === cursor, children: `${index === cursor ? figures7.pointer : " "} remove '${edge.toComponent}' from ${edge.fromComponent}.$slots.${edge.slotName}.$allowedComponents` }, `${edge.fromComponent}-${edge.slotName}-${edge.toComponent}`)),
25480
- confirming ? /* @__PURE__ */ jsx43(Text36, { bold: true, color: PALETTE3.warning, children: "Delete this slot edge? [y] confirm [n] cancel" }) : /* @__PURE__ */ jsx43(Text36, { children: "[\u2191\u2193] move [Enter] delete [x/Esc] close" })
25568
+ confirming ? /* @__PURE__ */ jsx43(Text36, { bold: true, color: PALETTE.warning, children: "Delete this slot edge? [y] confirm [n] cancel" }) : /* @__PURE__ */ jsx43(Text36, { children: "[\u2191\u2193] move [Enter] delete [x/Esc] close" })
25481
25569
  ] });
25482
25570
  }
25483
25571
  var HELP_SECTIONS2 = [
@@ -25583,7 +25671,7 @@ function deriveBreakingChanges(response) {
25583
25671
  }
25584
25672
  function GenerateReviewStep(props) {
25585
25673
  if (!props.extractSessionId) {
25586
- return /* @__PURE__ */ jsx43(Box33, { paddingX: 2, paddingY: 1, children: /* @__PURE__ */ jsx43(Text36, { color: PALETTE3.error, children: "Error: no session ID \u2014 cannot load generated definitions." }) });
25674
+ return /* @__PURE__ */ jsx43(Box33, { paddingX: 2, paddingY: 1, children: /* @__PURE__ */ jsx43(Text36, { color: PALETTE.error, children: "Error: no session ID \u2014 cannot load generated definitions." }) });
25587
25675
  }
25588
25676
  return /* @__PURE__ */ jsx43(GenerateReviewStepView, { ...props, extractSessionId: props.extractSessionId });
25589
25677
  }
@@ -26019,33 +26107,50 @@ function GenerateReviewStepView({
26019
26107
  const cycle = cycleRows[cyclesCursor];
26020
26108
  return cycle ? enumerateCycleBreaks(cycle, components) : [];
26021
26109
  }, [cycleRows, cyclesCursor, components]);
26022
- const handleBreakEdge = (edge) => {
26023
- const target = components.find((component) => component.key === edge.fromComponent);
26024
- const slot = target?.entry.$slots?.[edge.slotName];
26025
- if (!target || !slot || !Array.isArray(slot.$allowedComponents)) return;
26026
- const nextEntry = {
26027
- ...target.entry,
26028
- $slots: {
26029
- ...target.entry.$slots,
26030
- [edge.slotName]: {
26031
- ...slot,
26032
- $allowedComponents: slot.$allowedComponents.filter((value) => value !== edge.toComponent)
26033
- }
26034
- }
26035
- };
26110
+ const saveSlotChange = (parentKey, nextEntry, historyLabel) => {
26036
26111
  const next = components.map(
26037
- (component) => component.key === target.key ? { ...component, entry: nextEntry } : component
26112
+ (component) => component.key === parentKey ? { ...component, entry: nextEntry } : component
26038
26113
  );
26039
26114
  setComponents(next);
26040
26115
  const db = openPipelineDb();
26041
26116
  try {
26042
- storeCDFComponents(db, extractSessionId, [{ key: target.key, entry: nextEntry }]);
26117
+ storeCDFComponents(db, extractSessionId, [{ key: parentKey, entry: nextEntry }]);
26043
26118
  } finally {
26044
26119
  db.close();
26045
26120
  }
26046
26121
  recomputeCycles(next);
26047
26122
  livePreviewHook.trigger();
26048
- pushHistorySnapshot(next, "break-cycle-edge");
26123
+ pushHistorySnapshot(next, historyLabel);
26124
+ };
26125
+ const handleBreakEdge = (edge) => {
26126
+ const target = components.find((component) => component.key === edge.fromComponent);
26127
+ const slot = target?.entry.$slots?.[edge.slotName];
26128
+ if (!target || !slot || !Array.isArray(slot.$allowedComponents)) return;
26129
+ saveSlotChange(
26130
+ target.key,
26131
+ {
26132
+ ...target.entry,
26133
+ $slots: {
26134
+ ...target.entry.$slots,
26135
+ [edge.slotName]: {
26136
+ ...slot,
26137
+ $allowedComponents: slot.$allowedComponents.filter((value) => value !== edge.toComponent)
26138
+ }
26139
+ }
26140
+ },
26141
+ "break-cycle-edge"
26142
+ );
26143
+ };
26144
+ const handleRemoveSlotChild = (parentKey, childKey) => {
26145
+ const parent = components.find((component) => component.key === parentKey);
26146
+ if (!parent?.entry.$slots) return;
26147
+ const slots = Object.fromEntries(
26148
+ Object.entries(parent.entry.$slots).map(([slotName, slot]) => [
26149
+ slotName,
26150
+ Array.isArray(slot.$allowedComponents) ? { ...slot, $allowedComponents: slot.$allowedComponents.filter((value) => value !== childKey) } : slot
26151
+ ])
26152
+ );
26153
+ saveSlotChange(parentKey, { ...parent.entry, $slots: slots }, "remove-slot-child");
26049
26154
  };
26050
26155
  const handleRejectComponent = (key) => {
26051
26156
  const rejectCascade2 = computeRejectCascade(key, componentGraph);
@@ -26375,6 +26480,11 @@ function GenerateReviewStepView({
26375
26480
  if (input === "r") {
26376
26481
  const current = components[selectedIdx];
26377
26482
  if (!current) return;
26483
+ const row = visibleRowsMemo[cursorRowIdx];
26484
+ if (row?.kind === "group-child" && row.parentName) {
26485
+ handleRemoveSlotChild(row.parentName, current.key);
26486
+ return;
26487
+ }
26378
26488
  handleRejectComponent(current.key);
26379
26489
  return;
26380
26490
  }
@@ -26500,8 +26610,8 @@ function GenerateReviewStepView({
26500
26610
  }
26501
26611
  ),
26502
26612
  /* @__PURE__ */ jsx43(ReviewReloadDialog, { open: showReloadDialog && !dialogOpen }),
26503
- removedComponents.length > 0 && !dialogOpen && /* @__PURE__ */ jsxs34(Box33, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE3.error, paddingX: 1, children: [
26504
- /* @__PURE__ */ jsx43(Text36, { bold: true, color: PALETTE3.error, children: removedComponentsHeader(removedComponents.length, true) }),
26613
+ removedComponents.length > 0 && !dialogOpen && /* @__PURE__ */ jsxs34(Box33, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.error, paddingX: 1, children: [
26614
+ /* @__PURE__ */ jsx43(Text36, { bold: true, color: PALETTE.error, children: removedComponentsHeader(removedComponents.length, true) }),
26505
26615
  !removedBannerCollapsed && /* @__PURE__ */ jsxs34(Fragment13, { children: [
26506
26616
  /* @__PURE__ */ jsx43(Text36, { children: " " }),
26507
26617
  removedComponents.map((rc) => /* @__PURE__ */ jsx43(Text36, { children: removedComponentLine(rc) }, rc.id))
@@ -26510,7 +26620,7 @@ function GenerateReviewStepView({
26510
26620
  breakingChanges.length > 0 && !dialogOpen && /* @__PURE__ */ jsx43(Box33, { paddingX: 1, children: /* @__PURE__ */ jsx43(
26511
26621
  Text36,
26512
26622
  {
26513
- color: PALETTE3.warning,
26623
+ color: PALETTE.warning,
26514
26624
  children: `[b] ${breakingChanges.length} breaking change${breakingChanges.length === 1 ? "" : "s"}`
26515
26625
  }
26516
26626
  ) }),
@@ -26518,10 +26628,10 @@ function GenerateReviewStepView({
26518
26628
  const row = breakingRows[breakingCursor];
26519
26629
  const comp = row ? breakingChanges.find((b) => b.componentName === row.componentName) : void 0;
26520
26630
  if (!comp) return null;
26521
- return /* @__PURE__ */ jsxs34(Box33, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE3.warning, paddingX: 1, children: [
26522
- /* @__PURE__ */ jsx43(Text36, { bold: true, color: PALETTE3.warning, children: `Breaking changes \u2014 ${comp.componentName}` }),
26523
- comp.impact && /* @__PURE__ */ jsx43(Text36, { color: PALETTE3.muted, children: ` affects ${comp.impact.affectedExperiences} experience${comp.impact.affectedExperiences === 1 ? "" : "s"}, ${comp.impact.affectedFragments} fragment${comp.impact.affectedFragments === 1 ? "" : "s"}` }),
26524
- comp.changes.length === 0 ? /* @__PURE__ */ jsx43(Text36, { color: PALETTE3.muted, children: " (no enumerated changes)" }) : comp.changes.map((change, ci) => /* @__PURE__ */ jsx43(Text36, { children: ` \u2022 ${formatBreakingChange(change, comp.current)}` }, `bd-detail-${ci}`)),
26631
+ return /* @__PURE__ */ jsxs34(Box33, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
26632
+ /* @__PURE__ */ jsx43(Text36, { bold: true, color: PALETTE.warning, children: `Breaking changes \u2014 ${comp.componentName}` }),
26633
+ comp.impact && /* @__PURE__ */ jsx43(Text36, { color: PALETTE.muted, children: ` affects ${comp.impact.affectedExperiences} experience${comp.impact.affectedExperiences === 1 ? "" : "s"}, ${comp.impact.affectedFragments} fragment${comp.impact.affectedFragments === 1 ? "" : "s"}` }),
26634
+ comp.changes.length === 0 ? /* @__PURE__ */ jsx43(Text36, { color: PALETTE.muted, children: " (no enumerated changes)" }) : comp.changes.map((change, ci) => /* @__PURE__ */ jsx43(Text36, { children: ` \u2022 ${formatBreakingChange(change, comp.current)}` }, `bd-detail-${ci}`)),
26525
26635
  /* @__PURE__ */ jsx43(Text36, { children: "[D/Esc] close detail" })
26526
26636
  ] });
26527
26637
  })(),
@@ -26544,11 +26654,11 @@ function GenerateReviewStepView({
26544
26654
  const participantSet = cycleView.structural;
26545
26655
  const members = stillRejected.filter((n) => participantSet.has(n)).sort();
26546
26656
  const ancestors = stillRejected.filter((n) => !participantSet.has(n)).sort();
26547
- return /* @__PURE__ */ jsxs34(Box33, { flexDirection: "column", borderStyle: "single", borderColor: PALETTE3.error, paddingX: 1, children: [
26548
- /* @__PURE__ */ jsx43(Text36, { color: PALETTE3.error, bold: true, children: `Cyclic component graph \u2014 auto-rejected ${stillRejected.length} component${stillRejected.length === 1 ? "" : "s"}:` }),
26549
- members.length > 0 && /* @__PURE__ */ jsx43(Text36, { color: PALETTE3.error, children: ` Cycle members: ${members.join(", ")}` }),
26550
- ancestors.length > 0 && /* @__PURE__ */ jsx43(Text36, { color: PALETTE3.error, children: ` Ancestors: ${ancestors.join(", ")}` }),
26551
- /* @__PURE__ */ jsx43(Text36, { color: PALETTE3.muted, children: undoSnapshot ? " [Ctrl+Z] undo \xB7 [r]/[a] manually toggle \xB7 [F] continue" : " [r]/[a] manually toggle \xB7 [F] continue" })
26657
+ return /* @__PURE__ */ jsxs34(Box33, { flexDirection: "column", borderStyle: "single", borderColor: PALETTE.error, paddingX: 1, children: [
26658
+ /* @__PURE__ */ jsx43(Text36, { color: PALETTE.error, bold: true, children: `Cyclic component graph \u2014 auto-rejected ${stillRejected.length} component${stillRejected.length === 1 ? "" : "s"}:` }),
26659
+ members.length > 0 && /* @__PURE__ */ jsx43(Text36, { color: PALETTE.error, children: ` Cycle members: ${members.join(", ")}` }),
26660
+ ancestors.length > 0 && /* @__PURE__ */ jsx43(Text36, { color: PALETTE.error, children: ` Ancestors: ${ancestors.join(", ")}` }),
26661
+ /* @__PURE__ */ jsx43(Text36, { color: PALETTE.muted, children: undoSnapshot ? " [Ctrl+Z] undo \xB7 [r]/[a] manually toggle \xB7 [F] continue" : " [r]/[a] manually toggle \xB7 [F] continue" })
26552
26662
  ] });
26553
26663
  })(),
26554
26664
  /* @__PURE__ */ jsx43(ReviewEmptyComponentsWarning, { count: emptyCount, hidden: dialogOpen }),
@@ -26664,7 +26774,7 @@ function GenerateReviewStepView({
26664
26774
  ) : /* @__PURE__ */ jsx43(ReviewNoSelection, {})
26665
26775
  ] }),
26666
26776
  !dialogOpen && cycleRows.length > 0 && !cyclePanel.isOpen && !breakPanel.isOpen && /* @__PURE__ */ jsxs34(Box33, { flexDirection: "column", children: [
26667
- /* @__PURE__ */ jsx43(Text36, { color: PALETTE3.warning, children: `\u26A0 ${cycleRows.length} slot dependency cycle${cycleRows.length === 1 ? "" : "s"} detected \u2014 push will fail` }),
26777
+ /* @__PURE__ */ jsx43(Text36, { color: PALETTE.warning, children: `\u26A0 ${cycleRows.length} slot dependency cycle${cycleRows.length === 1 ? "" : "s"} detected \u2014 push will fail` }),
26668
26778
  cycleRows.slice(0, 3).map((cycle, idx) => {
26669
26779
  return /* @__PURE__ */ jsx43(
26670
26780
  CyclePathLine,
@@ -26677,7 +26787,7 @@ function GenerateReviewStepView({
26677
26787
  `cyc-banner-${idx}`
26678
26788
  );
26679
26789
  }),
26680
- cycleRows.length > 3 && /* @__PURE__ */ jsx43(Text36, { color: PALETTE3.warning, children: ` \u2026${cycleRows.length - 3} more` }),
26790
+ cycleRows.length > 3 && /* @__PURE__ */ jsx43(Text36, { color: PALETTE.warning, children: ` \u2026${cycleRows.length - 3} more` }),
26681
26791
  /* @__PURE__ */ jsx43(Text36, { children: " press [c] for detail" })
26682
26792
  ] }),
26683
26793
  /* @__PURE__ */ jsx43(
@@ -26697,36 +26807,16 @@ function GenerateReviewStepView({
26697
26807
 
26698
26808
  // packages/experience-design-system-cli/src/tui/import/steps/10-flow/components/CustomPromptBanner.tsx
26699
26809
  import { Box as Box34, Text as Text37 } from "ink";
26700
-
26701
- // packages/experience-design-system-cli/src/tui/import/steps/10-flow/theme.ts
26702
- import { defaultTheme as defaultTheme2, extendTheme as extendTheme2 } from "@inkjs/ui";
26703
- var PALETTE4 = {
26704
- ...PALETTE3,
26705
- link: "#58A6FF"
26706
- };
26707
- var INK_UI_THEME = extendTheme2(defaultTheme2, {
26708
- components: {
26709
- ProgressBar: {
26710
- styles: {
26711
- completed: () => ({
26712
- color: "blue"
26713
- })
26714
- }
26715
- }
26716
- }
26717
- });
26718
-
26719
- // packages/experience-design-system-cli/src/tui/import/steps/10-flow/components/CustomPromptBanner.tsx
26720
26810
  import { jsx as jsx44, jsxs as jsxs35 } from "react/jsx-runtime";
26721
26811
  function CustomPromptBanner({ generatePromptPath }) {
26722
26812
  if (!generatePromptPath) return null;
26723
- return /* @__PURE__ */ jsxs35(Box34, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE4.warning, paddingX: 1, children: [
26724
- /* @__PURE__ */ jsx44(Text37, { color: PALETTE4.warning, bold: true, children: "WARNING: Custom prompt active" }),
26725
- generatePromptPath ? /* @__PURE__ */ jsxs35(Text37, { color: PALETTE4.warning, children: [
26813
+ return /* @__PURE__ */ jsxs35(Box34, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
26814
+ /* @__PURE__ */ jsx44(Text37, { color: PALETTE.warning, bold: true, children: "WARNING: Custom prompt active" }),
26815
+ generatePromptPath ? /* @__PURE__ */ jsxs35(Text37, { color: PALETTE.warning, children: [
26726
26816
  "components: ",
26727
26817
  generatePromptPath
26728
26818
  ] }) : null,
26729
- /* @__PURE__ */ jsx44(Text37, { color: PALETTE4.warning, children: "Bundled invariants (utility-wrapper rejection, description content rules) do NOT apply." })
26819
+ /* @__PURE__ */ jsx44(Text37, { color: PALETTE.warning, children: "Bundled invariants (utility-wrapper rejection, description content rules) do NOT apply." })
26730
26820
  ] });
26731
26821
  }
26732
26822
 
@@ -26751,10 +26841,10 @@ import { Box as Box35, Text as Text38 } from "ink";
26751
26841
  import { jsx as jsx45, jsxs as jsxs36 } from "react/jsx-runtime";
26752
26842
  function SpaceEnvironment({ spaceId, environmentId }) {
26753
26843
  return /* @__PURE__ */ jsxs36(Box35, { gap: 1, marginTop: 1, children: [
26754
- /* @__PURE__ */ jsx45(Text38, { color: PALETTE4.muted, children: "Space:" }),
26844
+ /* @__PURE__ */ jsx45(Text38, { color: PALETTE.muted, children: "Space:" }),
26755
26845
  /* @__PURE__ */ jsx45(Text38, { children: spaceId }),
26756
- /* @__PURE__ */ jsx45(Text38, { color: PALETTE4.muted, children: "/" }),
26757
- /* @__PURE__ */ jsx45(Text38, { color: PALETTE4.muted, children: "Environment:" }),
26846
+ /* @__PURE__ */ jsx45(Text38, { color: PALETTE.muted, children: "/" }),
26847
+ /* @__PURE__ */ jsx45(Text38, { color: PALETTE.muted, children: "Environment:" }),
26758
26848
  /* @__PURE__ */ jsx45(Text38, { children: environmentId })
26759
26849
  ] });
26760
26850
  }
@@ -26766,13 +26856,13 @@ function EntityRows({ entity, label }) {
26766
26856
  const plural3 = (n) => `${n} ${label}${n !== 1 ? "s" : ""}`;
26767
26857
  return /* @__PURE__ */ jsxs37(Fragment14, { children: [
26768
26858
  ACTIONS.filter((action) => entity[action] > 0).map((action) => /* @__PURE__ */ jsxs37(Text39, { children: [
26769
- /* @__PURE__ */ jsx46(Text39, { color: PALETTE4.success, children: "\u2713" }),
26859
+ /* @__PURE__ */ jsx46(Text39, { color: PALETTE.success, children: "\u2713" }),
26770
26860
  " ",
26771
26861
  plural3(entity[action]),
26772
26862
  " ",
26773
26863
  action
26774
26864
  ] }, action)),
26775
- entity.failed > 0 && /* @__PURE__ */ jsxs37(Text39, { color: PALETTE4.error, children: [
26865
+ entity.failed > 0 && /* @__PURE__ */ jsxs37(Text39, { color: PALETTE.error, children: [
26776
26866
  "\u2717 ",
26777
26867
  plural3(entity.failed),
26778
26868
  " failed \u2014 check logs above"
@@ -26781,8 +26871,8 @@ function EntityRows({ entity, label }) {
26781
26871
  }
26782
26872
  function LinkRow({ title, url }) {
26783
26873
  return /* @__PURE__ */ jsxs37(Box36, { flexDirection: "column", children: [
26784
- /* @__PURE__ */ jsx46(Text39, { color: PALETTE4.muted, children: title }),
26785
- /* @__PURE__ */ jsx46(Text39, { color: PALETTE4.link, children: url })
26874
+ /* @__PURE__ */ jsx46(Text39, { color: PALETTE.muted, children: title }),
26875
+ /* @__PURE__ */ jsx46(Text39, { color: PALETTE.accent, children: url })
26786
26876
  ] });
26787
26877
  }
26788
26878
  function DoneStep({
@@ -26805,17 +26895,17 @@ function DoneStep({
26805
26895
  const success = totalFailed === 0;
26806
26896
  const urlArgs = { host: host ?? "api.contentful.com", spaceId, environmentId };
26807
26897
  return /* @__PURE__ */ jsxs37(Box36, { flexDirection: "column", gap: 1, paddingX: 2, paddingY: 1, children: [
26808
- success ? /* @__PURE__ */ jsx46(Text39, { bold: true, color: PALETTE4.success, children: "Done!" }) : /* @__PURE__ */ jsx46(Text39, { bold: true, color: PALETTE4.warning, children: "\u26A0 Finished with errors" }),
26809
- totalPushed === 0 && totalFailed === 0 && !summary ? /* @__PURE__ */ jsx46(Text39, { color: PALETTE4.muted, children: "Nothing was pushed \u2014 everything was already up to date." }) : /* @__PURE__ */ jsxs37(Box36, { flexDirection: "column", children: [
26898
+ success ? /* @__PURE__ */ jsx46(Text39, { bold: true, color: PALETTE.success, children: "Done!" }) : /* @__PURE__ */ jsx46(Text39, { bold: true, color: PALETTE.warning, children: "\u26A0 Finished with errors" }),
26899
+ totalPushed === 0 && totalFailed === 0 && !summary ? /* @__PURE__ */ jsx46(Text39, { color: PALETTE.muted, children: "Nothing was pushed \u2014 everything was already up to date." }) : /* @__PURE__ */ jsxs37(Box36, { flexDirection: "column", children: [
26810
26900
  /* @__PURE__ */ jsx46(EntityRows, { entity: componentTypes, label: "Component Type" }),
26811
26901
  /* @__PURE__ */ jsx46(EntityRows, { entity: designTokens, label: "Design Token" }),
26812
- summary && /* @__PURE__ */ jsx46(Box36, { marginTop: 1, children: /* @__PURE__ */ jsxs37(Text39, { color: PALETTE4.muted, children: [
26902
+ summary && /* @__PURE__ */ jsx46(Box36, { marginTop: 1, children: /* @__PURE__ */ jsxs37(Text39, { color: PALETTE.muted, children: [
26813
26903
  "Push result: ",
26814
26904
  summary.succeeded,
26815
26905
  "/",
26816
26906
  summary.total,
26817
26907
  " succeeded",
26818
- summary.failed > 0 && /* @__PURE__ */ jsxs37(Text39, { color: PALETTE4.error, children: [
26908
+ summary.failed > 0 && /* @__PURE__ */ jsxs37(Text39, { color: PALETTE.error, children: [
26819
26909
  ", ",
26820
26910
  summary.failed,
26821
26911
  " failed"
@@ -26823,8 +26913,8 @@ function DoneStep({
26823
26913
  ] }) })
26824
26914
  ] }),
26825
26915
  failures.length > 0 && /* @__PURE__ */ jsxs37(Box36, { flexDirection: "column", children: [
26826
- /* @__PURE__ */ jsx46(Text39, { bold: true, color: PALETTE4.error, children: "Failure details" }),
26827
- failures.map((failure) => /* @__PURE__ */ jsxs37(Text39, { color: PALETTE4.error, children: [
26916
+ /* @__PURE__ */ jsx46(Text39, { bold: true, color: PALETTE.error, children: "Failure details" }),
26917
+ failures.map((failure) => /* @__PURE__ */ jsxs37(Text39, { color: PALETTE.error, children: [
26828
26918
  failure.entityType,
26829
26919
  " ",
26830
26920
  failure.entityId,
@@ -26834,7 +26924,7 @@ function DoneStep({
26834
26924
  ] }),
26835
26925
  /* @__PURE__ */ jsx46(SpaceEnvironment, { spaceId, environmentId }),
26836
26926
  success && totalPushed > 0 && /* @__PURE__ */ jsxs37(Box36, { flexDirection: "column", gap: 1, children: [
26837
- /* @__PURE__ */ jsx46(Text39, { color: PALETTE4.success, children: "Your design system is now in Contentful Experiences." }),
26927
+ /* @__PURE__ */ jsx46(Text39, { color: PALETTE.success, children: "Your design system is now in Contentful Experiences." }),
26838
26928
  /* @__PURE__ */ jsx46(LinkRow, { title: "View your components here:", url: buildPostPushUrl2(urlArgs) }),
26839
26929
  /* @__PURE__ */ jsx46(
26840
26930
  LinkRow,
@@ -26943,12 +27033,12 @@ function PathPrompt({
26943
27033
  const cursor = cursorVisible ? "\u2588" : " ";
26944
27034
  return /* @__PURE__ */ jsxs38(Box37, { flexDirection: "column", gap: 1, paddingX: 2, paddingY: 1, children: [
26945
27035
  /* @__PURE__ */ jsxs38(Box37, { gap: 1, children: [
26946
- /* @__PURE__ */ jsx47(Text40, { color: "cyan", children: "?" }),
27036
+ /* @__PURE__ */ jsx47(Text40, { color: PALETTE.accent, children: "?" }),
26947
27037
  /* @__PURE__ */ jsxs38(Text40, { bold: true, children: [
26948
27038
  label,
26949
27039
  ":"
26950
27040
  ] }),
26951
- /* @__PURE__ */ jsx47(Text40, { color: isPlaceholder ? PALETTE4.muted : void 0, children: shown }),
27041
+ /* @__PURE__ */ jsx47(Text40, { color: isPlaceholder ? PALETTE.muted : void 0, children: shown }),
26952
27042
  /* @__PURE__ */ jsx47(Text40, { children: cursor })
26953
27043
  ] }),
26954
27044
  /* @__PURE__ */ jsxs38(Box37, { gap: 3, children: [
@@ -26968,7 +27058,7 @@ import { Box as Box38, Text as Text41 } from "ink";
26968
27058
  import { jsx as jsx48, jsxs as jsxs39 } from "react/jsx-runtime";
26969
27059
  function StepHeader({ stepNumber, totalSteps, title }) {
26970
27060
  return /* @__PURE__ */ jsxs39(Box38, { flexDirection: "column", gap: 0, children: [
26971
- /* @__PURE__ */ jsx48(Text41, { dimColor: true, children: "\u2500".repeat(40) }),
27061
+ /* @__PURE__ */ jsx48(Text41, { color: PALETTE.muted, children: "\u2500".repeat(40) }),
26972
27062
  /* @__PURE__ */ jsxs39(Box38, { gap: 1, children: [
26973
27063
  /* @__PURE__ */ jsxs39(Text41, { bold: true, children: [
26974
27064
  "Step ",
@@ -26979,7 +27069,7 @@ function StepHeader({ stepNumber, totalSteps, title }) {
26979
27069
  /* @__PURE__ */ jsx48(Text41, { bold: true, children: "\u2014" }),
26980
27070
  /* @__PURE__ */ jsx48(Text41, { bold: true, children: title })
26981
27071
  ] }),
26982
- /* @__PURE__ */ jsx48(Text41, { dimColor: true, children: "\u2500".repeat(40) })
27072
+ /* @__PURE__ */ jsx48(Text41, { color: PALETTE.muted, children: "\u2500".repeat(40) })
26983
27073
  ] });
26984
27074
  }
26985
27075
 
@@ -27014,12 +27104,12 @@ function PushingStep({ stepNumber, totalSteps, progress }) {
27014
27104
  /* @__PURE__ */ jsx50(StepHeader, { stepNumber, totalSteps, title: "Push to Contentful" }),
27015
27105
  /* @__PURE__ */ jsx50(Text42, { children: "Writing component types and design tokens to your Contentful space..." }),
27016
27106
  operationId && /* @__PURE__ */ jsxs40(Box39, { gap: 1, children: [
27017
- /* @__PURE__ */ jsx50(Text42, { color: PALETTE4.muted, children: "Operation:" }),
27107
+ /* @__PURE__ */ jsx50(Text42, { color: PALETTE.muted, children: "Operation:" }),
27018
27108
  /* @__PURE__ */ jsx50(Text42, { children: operationId })
27019
27109
  ] }),
27020
27110
  showGlobal && progress && progress.kind === "progress" && /* @__PURE__ */ jsx50(Box39, { gap: 1, flexDirection: "column", children: /* @__PURE__ */ jsxs40(Box39, { gap: 2, children: [
27021
- /* @__PURE__ */ jsx50(Box39, { width: 40, children: /* @__PURE__ */ jsx50(ThemeProvider2, { theme: INK_UI_THEME, children: /* @__PURE__ */ jsx50(ProgressBar2, { value: Math.round(progress.processed / progress.total * 100) }) }) }),
27022
- /* @__PURE__ */ jsxs40(Text42, { color: PALETTE4.muted, children: [
27111
+ /* @__PURE__ */ jsx50(Box39, { width: 40, children: /* @__PURE__ */ jsx50(ThemeProvider2, { theme: PROGRESS_THEME, children: /* @__PURE__ */ jsx50(ProgressBar2, { value: Math.round(progress.processed / progress.total * 100) }) }) }),
27112
+ /* @__PURE__ */ jsxs40(Text42, { color: PALETTE.muted, children: [
27023
27113
  progress.processed,
27024
27114
  "/",
27025
27115
  progress.total,
@@ -27027,10 +27117,10 @@ function PushingStep({ stepNumber, totalSteps, progress }) {
27027
27117
  ] })
27028
27118
  ] }) }),
27029
27119
  showCurrent && /* @__PURE__ */ jsxs40(Box39, { gap: 1, children: [
27030
- /* @__PURE__ */ jsx50(Text42, { color: PALETTE4.muted, children: "Now processing:" }),
27120
+ /* @__PURE__ */ jsx50(Text42, { color: PALETTE.muted, children: "Now processing:" }),
27031
27121
  /* @__PURE__ */ jsx50(Text42, { children: showCurrent })
27032
27122
  ] }),
27033
- /* @__PURE__ */ jsx50(Box39, { marginTop: 1, children: /* @__PURE__ */ jsxs40(Text42, { color: PALETTE4.muted, children: [
27123
+ /* @__PURE__ */ jsx50(Box39, { marginTop: 1, children: /* @__PURE__ */ jsxs40(Text42, { color: PALETTE.muted, children: [
27034
27124
  "Elapsed: ",
27035
27125
  elapsed
27036
27126
  ] }) })
@@ -27220,25 +27310,25 @@ function buildPreviewSummaryLines(preview) {
27220
27310
  if (components.new.length > 0) {
27221
27311
  lines.push({
27222
27312
  key: "summary-components-new",
27223
- color: PALETTE4.success,
27313
+ color: PALETTE.success,
27224
27314
  text: ` \uFF0B ${components.new.length} components will be created`
27225
27315
  });
27226
27316
  for (const [index, item] of components.new.entries()) {
27227
27317
  const name = item.key ?? item.$name ?? "unknown";
27228
- lines.push({ key: `summary-components-new-${index}`, color: PALETTE4.success, text: ` + ${name}` });
27318
+ lines.push({ key: `summary-components-new-${index}`, color: PALETTE.success, text: ` + ${name}` });
27229
27319
  }
27230
27320
  }
27231
27321
  if (components.changed.length > 0) {
27232
27322
  lines.push({
27233
27323
  key: "summary-components-changed",
27234
- color: PALETTE4.warning,
27324
+ color: PALETTE.warning,
27235
27325
  text: ` \uFF5E ${components.changed.length} components will be updated`
27236
27326
  });
27237
27327
  for (const [index, item] of components.changed.entries()) {
27238
27328
  const isBreaking = item.changeClassification?.classification === "breaking";
27239
27329
  lines.push({
27240
27330
  key: `summary-components-changed-${index}`,
27241
- color: isBreaking ? PALETTE4.error : PALETTE4.warning,
27331
+ color: isBreaking ? PALETTE.error : PALETTE.warning,
27242
27332
  text: ` ${isBreaking ? "\u26A0" : "~"} ${item.current.name}`
27243
27333
  });
27244
27334
  }
@@ -27246,11 +27336,11 @@ function buildPreviewSummaryLines(preview) {
27246
27336
  if (components.removed.length > 0) {
27247
27337
  lines.push({
27248
27338
  key: "summary-components-removed",
27249
- color: PALETTE4.warning,
27339
+ color: PALETTE.warning,
27250
27340
  text: ` \u2298 ${components.removed.length} components will be skipped`
27251
27341
  });
27252
27342
  for (const [index, item] of components.removed.entries()) {
27253
- lines.push({ key: `summary-components-removed-${index}`, color: PALETTE4.warning, text: ` \u2298 ${item.name}` });
27343
+ lines.push({ key: `summary-components-removed-${index}`, color: PALETTE.warning, text: ` \u2298 ${item.name}` });
27254
27344
  }
27255
27345
  }
27256
27346
  if (components.unchanged.length > 0) {
@@ -27263,21 +27353,21 @@ function buildPreviewSummaryLines(preview) {
27263
27353
  if (tokens.new.length > 0) {
27264
27354
  lines.push({
27265
27355
  key: "summary-tokens-new",
27266
- color: PALETTE4.success,
27356
+ color: PALETTE.success,
27267
27357
  text: ` \uFF0B ${tokens.new.length} design tokens will be created`
27268
27358
  });
27269
27359
  }
27270
27360
  if (tokens.changed.length > 0) {
27271
27361
  lines.push({
27272
27362
  key: "summary-tokens-changed",
27273
- color: PALETTE4.warning,
27363
+ color: PALETTE.warning,
27274
27364
  text: ` \uFF5E ${tokens.changed.length} design tokens will be updated`
27275
27365
  });
27276
27366
  }
27277
27367
  if (tokens.removed.length > 0) {
27278
27368
  lines.push({
27279
27369
  key: "summary-tokens-removed",
27280
- color: PALETTE4.warning,
27370
+ color: PALETTE.warning,
27281
27371
  text: ` \u2298 ${tokens.removed.length} design tokens will be skipped`
27282
27372
  });
27283
27373
  }
@@ -27321,12 +27411,12 @@ function getPreviewScrollOffset(input, downArrow, upArrow, diffExpanded, current
27321
27411
  function appendChangedPreviewLine(lines, keyPrefix, name, hasPendingDraftChanges, changeClassification) {
27322
27412
  lines.push({
27323
27413
  key: `${keyPrefix}-h-${name}`,
27324
- color: PALETTE4.warning,
27414
+ color: PALETTE.warning,
27325
27415
  text: ` ~ ${name}${hasPendingDraftChanges ? " \u26A1 has pending draft changes" : ""}`
27326
27416
  });
27327
27417
  if (changeClassification?.classification !== "breaking") return;
27328
27418
  const reasons = changeClassification.breakingChanges.map((bc) => `${"slotId" in bc ? bc.slotId : bc.propertyId}: ${bc.reason}`).join(", ");
27329
- lines.push({ key: `${keyPrefix}-b-${name}`, color: PALETTE4.error, text: ` \u26A0 BREAKING: ${reasons}` });
27419
+ lines.push({ key: `${keyPrefix}-b-${name}`, color: PALETTE.error, text: ` \u26A0 BREAKING: ${reasons}` });
27330
27420
  }
27331
27421
  function buildPreviewDiffLines(preview) {
27332
27422
  const lines = [];
@@ -27334,12 +27424,12 @@ function buildPreviewDiffLines(preview) {
27334
27424
  for (const item of components.new) {
27335
27425
  const raw = item;
27336
27426
  const name = raw.key ?? raw.$name ?? "unknown";
27337
- lines.push({ key: `comp-new-${name}`, color: PALETTE4.success, text: ` + ${name}` });
27427
+ lines.push({ key: `comp-new-${name}`, color: PALETTE.success, text: ` + ${name}` });
27338
27428
  const slots = raw.$slots ?? {};
27339
27429
  for (const slotName of Object.keys(slots).sort()) {
27340
27430
  lines.push({
27341
27431
  key: `comp-new-${name}-slot-${slotName}`,
27342
- color: PALETTE4.success,
27432
+ color: PALETTE.success,
27343
27433
  text: ` slot: ${slotName}`
27344
27434
  });
27345
27435
  const allowed = slots[slotName]?.["$allowedComponents"];
@@ -27347,14 +27437,14 @@ function buildPreviewDiffLines(preview) {
27347
27437
  const names = allowed.filter((n) => typeof n === "string");
27348
27438
  lines.push({
27349
27439
  key: `comp-new-${name}-slot-${slotName}-allow`,
27350
- color: PALETTE4.success,
27440
+ color: PALETTE.success,
27351
27441
  text: ` allowedComponents: [${names.join(", ")}]`
27352
27442
  });
27353
27443
  }
27354
27444
  }
27355
27445
  }
27356
27446
  for (const item of components.removed) {
27357
- lines.push({ key: `comp-rm-${item.name}`, color: PALETTE4.error, text: ` - ${item.name}` });
27447
+ lines.push({ key: `comp-rm-${item.name}`, color: PALETTE.error, text: ` - ${item.name}` });
27358
27448
  }
27359
27449
  for (const item of components.changed) {
27360
27450
  appendChangedPreviewLine(lines, "comp", item.current.name, item.hasPendingDraftChanges, item.changeClassification);
@@ -27385,10 +27475,10 @@ function buildPreviewDiffLines(preview) {
27385
27475
  for (const item of tokens.new) {
27386
27476
  const raw = item;
27387
27477
  const name = raw.name ?? raw.path ?? "unknown";
27388
- lines.push({ key: `tok-new-${name}`, color: PALETTE4.success, text: ` + ${name}` });
27478
+ lines.push({ key: `tok-new-${name}`, color: PALETTE.success, text: ` + ${name}` });
27389
27479
  }
27390
27480
  for (const item of tokens.removed) {
27391
- lines.push({ key: `tok-rm-${item.name}`, color: PALETTE4.error, text: ` - ${item.name}` });
27481
+ lines.push({ key: `tok-rm-${item.name}`, color: PALETTE.error, text: ` - ${item.name}` });
27392
27482
  }
27393
27483
  for (const item of tokens.changed) {
27394
27484
  const tokenName = item.current.name;
@@ -27479,13 +27569,13 @@ function WizardPreviewStep({
27479
27569
  title: diffExpanded ? `Diff (${diffLines.length} lines)` : "",
27480
27570
  focused: false,
27481
27571
  children: [
27482
- activeLines.slice(boundedScrollOffset, boundedScrollOffset + viewportHeight).map((line) => /* @__PURE__ */ jsx51(Text43, { color: line.color === "gray" ? PALETTE4.muted : line.color, wrap: "truncate-end", children: line.text }, line.key)),
27483
- /* @__PURE__ */ jsx51(Text43, { color: PALETTE4.muted, wrap: "truncate-end", children: formatPreviewScrollIndicator(activeLines.length, boundedScrollOffset, viewportHeight) })
27572
+ activeLines.slice(boundedScrollOffset, boundedScrollOffset + viewportHeight).map((line) => /* @__PURE__ */ jsx51(Text43, { color: line.color === "gray" ? PALETTE.muted : line.color, wrap: "truncate-end", children: line.text }, line.key)),
27573
+ /* @__PURE__ */ jsx51(Text43, { color: PALETTE.muted, wrap: "truncate-end", children: formatPreviewScrollIndicator(activeLines.length, boundedScrollOffset, viewportHeight) })
27484
27574
  ]
27485
27575
  }
27486
27576
  )
27487
- ] }) : /* @__PURE__ */ jsx51(Text43, { color: PALETTE4.muted, children: "Nothing to push \u2014 everything is already up to date." }),
27488
- breakingWithImpact && /* @__PURE__ */ jsx51(Box40, { marginTop: 1, children: /* @__PURE__ */ jsx51(Text43, { color: PALETTE4.error, bold: true, children: "\u26A0 Breaking changes will affect downstream entities. Press Enter to acknowledge and apply." }) }),
27577
+ ] }) : /* @__PURE__ */ jsx51(Text43, { color: PALETTE.muted, children: "Nothing to push \u2014 everything is already up to date." }),
27578
+ breakingWithImpact && /* @__PURE__ */ jsx51(Box40, { marginTop: 1, children: /* @__PURE__ */ jsx51(Text43, { color: PALETTE.error, bold: true, children: "\u26A0 Breaking changes will affect downstream entities. Press Enter to acknowledge and apply." }) }),
27489
27579
  /* @__PURE__ */ jsx51(SpaceEnvironment, { spaceId, environmentId }),
27490
27580
  /* @__PURE__ */ jsxs41(Box40, { gap: 3, marginTop: 1, children: [
27491
27581
  /* @__PURE__ */ jsx51(Text43, { children: "[Enter] Push to Contentful" }),
@@ -28527,8 +28617,8 @@ function SettingsScreen({
28527
28617
  });
28528
28618
  return /* @__PURE__ */ jsxs44(Box43, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
28529
28619
  /* @__PURE__ */ jsx54(Text45, { bold: true, children: "Settings" }),
28530
- /* @__PURE__ */ jsx54(Text45, { children: " " }),
28531
- items.map((item, i) => /* @__PURE__ */ jsxs44(Text45, { color: i === focusIdx ? "cyan" : void 0, children: [
28620
+ /* @__PURE__ */ jsx54(Text45, { color: PALETTE.muted, children: " " }),
28621
+ items.map((item, i) => /* @__PURE__ */ jsxs44(Text45, { color: i === focusIdx ? PALETTE.accent : void 0, children: [
28532
28622
  i === focusIdx ? "> " : " ",
28533
28623
  item.label
28534
28624
  ] }, item.label)),