@contentful/experience-design-system-cli 2.37.1-dev-build-283166e5.0 → 2.37.1-dev-build-2aacedbd.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
@@ -3325,7 +3325,7 @@ function MenuScreen({
3325
3325
  rows = [],
3326
3326
  onChoose,
3327
3327
  onEscape,
3328
- escapeLabel = "back",
3328
+ dataTitle = "Details",
3329
3329
  busy = false,
3330
3330
  children
3331
3331
  }) {
@@ -3341,31 +3341,35 @@ function MenuScreen({
3341
3341
  return /* @__PURE__ */ jsxs11(Box11, { flexDirection: "column", children: [
3342
3342
  /* @__PURE__ */ jsx12(StepHeader, { step: "setup" }),
3343
3343
  /* @__PURE__ */ jsxs11(Box11, { flexDirection: "column", paddingX: 2, paddingBottom: 1, children: [
3344
- /* @__PURE__ */ jsx12(Text11, { bold: true, children: title }),
3344
+ /* @__PURE__ */ jsx12(Text11, { bold: true, color: PALETTE.text, children: title }),
3345
3345
  /* @__PURE__ */ jsx12(Text11, { children: " " }),
3346
3346
  subtitle && /* @__PURE__ */ jsxs11(Fragment2, { children: [
3347
3347
  /* @__PURE__ */ jsx12(Text11, { color: PALETTE.muted, children: subtitle }),
3348
3348
  /* @__PURE__ */ jsx12(Text11, { children: " " })
3349
3349
  ] }),
3350
+ /* @__PURE__ */ jsx12(Text11, { bold: true, color: PALETTE.accent, children: "ACTIONS" }),
3350
3351
  menu.map((item, index) => {
3351
3352
  const focused = index === focus;
3352
3353
  return /* @__PURE__ */ jsxs11(Box11, { gap: 1, children: [
3353
- /* @__PURE__ */ jsx12(Text11, { color: focused ? PALETTE.accent : void 0, children: focused ? "\u276F" : " " }),
3354
- /* @__PURE__ */ jsx12(Box11, { width: labelWidth, flexShrink: 0, children: /* @__PURE__ */ jsx12(Text11, { bold: focused, color: focused ? PALETTE.accent : PALETTE.muted, children: item.label }) }),
3354
+ /* @__PURE__ */ jsx12(Text11, { bold: true, color: PALETTE.accent, children: focused ? "\u276F" : " " }),
3355
+ /* @__PURE__ */ jsx12(Box11, { width: labelWidth, flexShrink: 0, children: /* @__PURE__ */ jsx12(Text11, { bold: focused, color: focused ? PALETTE.accent : PALETTE.text, children: item.label }) }),
3355
3356
  /* @__PURE__ */ jsx12(Text11, { color: PALETTE.muted, children: item.description })
3356
3357
  ] }, item.choice);
3357
3358
  }),
3358
- rows.length > 0 && /* @__PURE__ */ jsx12(Text11, { children: " " }),
3359
- rows.map((row) => /* @__PURE__ */ jsx12(FormReadOnlyRow, { label: row.label, labelWidth, children: /* @__PURE__ */ jsx12(Text11, { bold: row.value !== "", children: row.value || "(empty)" }) }, row.label)),
3360
- children,
3361
- /* @__PURE__ */ jsx12(Text11, { children: " " }),
3362
- /* @__PURE__ */ jsx12(
3363
- ControlHints,
3359
+ (rows.length > 0 || children) && /* @__PURE__ */ jsxs11(
3360
+ Box11,
3364
3361
  {
3365
- hints: [
3366
- { keys: "\u2191/\u2193", label: "move" },
3367
- { keys: "\u23CE", label: menu[focus].label.toLowerCase() },
3368
- { keys: "Esc", label: escapeLabel }
3362
+ flexDirection: "column",
3363
+ marginTop: 1,
3364
+ borderStyle: "single",
3365
+ borderColor: PALETTE.border,
3366
+ borderBottom: false,
3367
+ borderLeft: false,
3368
+ borderRight: false,
3369
+ children: [
3370
+ /* @__PURE__ */ jsx12(Text11, { bold: true, color: PALETTE.muted, children: dataTitle.toUpperCase() }),
3371
+ rows.map((row) => /* @__PURE__ */ jsx12(FormReadOnlyRow, { label: row.label, labelWidth, children: /* @__PURE__ */ jsx12(Text11, { color: row.value ? PALETTE.text : PALETTE.muted, children: row.value || "(empty)" }) }, row.label)),
3372
+ children
3369
3373
  ]
3370
3374
  }
3371
3375
  )
@@ -18155,15 +18159,11 @@ import { jsx as jsx16, jsxs as jsxs13 } from "react/jsx-runtime";
18155
18159
  var BACK = { choice: "back", label: "Back", description: "Go back" };
18156
18160
  var MENUS = {
18157
18161
  scanning: [BACK],
18158
- ready: [
18159
- { choice: "continue", label: "Continue", description: "Use these files and go on" },
18160
- { choice: "change-path", label: "Change path", description: "Pick a different folder" },
18161
- BACK
18162
- ],
18162
+ ready: [{ choice: "continue", label: "Continue", description: "Use these files and go on" }, BACK],
18163
18163
  failed: [{ choice: "change-path", label: "Try a different path", description: "Pick a different folder" }, BACK]
18164
18164
  };
18165
18165
  function Row({ row }) {
18166
- return /* @__PURE__ */ jsxs13(Text13, { color: row.tone === "accent" ? PALETTE.accent : row.tone === "muted" ? PALETTE.muted : void 0, children: [
18166
+ return /* @__PURE__ */ jsxs13(Text13, { color: row.tone === "accent" ? PALETTE.accent : row.tone === "muted" ? PALETTE.muted : PALETTE.text, children: [
18167
18167
  " \u2022 ",
18168
18168
  String(row.count).padStart(3),
18169
18169
  " ",
@@ -18188,8 +18188,8 @@ function Summary({
18188
18188
  const { total, rows, warning } = summarize(scan.counts, { hasTokens });
18189
18189
  return /* @__PURE__ */ jsxs13(Box13, { flexDirection: "column", gap: 1, children: [
18190
18190
  /* @__PURE__ */ jsxs13(Text13, { children: [
18191
- "Scanned ",
18192
- /* @__PURE__ */ jsx16(Text13, { bold: true, children: path5 })
18191
+ /* @__PURE__ */ jsx16(Text13, { color: PALETTE.muted, children: "Scanned " }),
18192
+ /* @__PURE__ */ jsx16(Text13, { color: PALETTE.text, children: path5 })
18193
18193
  ] }),
18194
18194
  /* @__PURE__ */ jsxs13(Box13, { flexDirection: "column", children: [
18195
18195
  /* @__PURE__ */ jsxs13(Text13, { color: PALETTE.success, children: [
@@ -18226,16 +18226,26 @@ function PathValidationScreen({
18226
18226
  };
18227
18227
  return (
18228
18228
  // keyed by phase: the menu changes length, so its focus starts over
18229
- /* @__PURE__ */ jsxs13(MenuScreen, { title: "Scan", menu: MENUS[phase], onChoose: choose, onEscape: onBack, children: [
18230
- /* @__PURE__ */ jsx16(Text13, { children: " " }),
18231
- scan === void 0 && /* @__PURE__ */ jsxs13(Text13, { color: PALETTE.muted, children: [
18232
- "Scanning ",
18233
- /* @__PURE__ */ jsx16(Text13, { bold: true, children: resolvedPath }),
18234
- "..."
18235
- ] }),
18236
- scan?.ok === false && /* @__PURE__ */ jsx16(Failure, { scan, path: resolvedPath }),
18237
- scan?.ok === true && /* @__PURE__ */ jsx16(Summary, { scan, path: resolvedPath, hasTokens })
18238
- ] }, phase)
18229
+ /* @__PURE__ */ jsxs13(
18230
+ MenuScreen,
18231
+ {
18232
+ title: "Scan",
18233
+ dataTitle: "Scan result",
18234
+ menu: MENUS[phase],
18235
+ onChoose: choose,
18236
+ onEscape: onBack,
18237
+ children: [
18238
+ scan === void 0 && /* @__PURE__ */ jsxs13(Text13, { color: PALETTE.muted, children: [
18239
+ "Scanning ",
18240
+ /* @__PURE__ */ jsx16(Text13, { bold: true, children: resolvedPath }),
18241
+ "..."
18242
+ ] }),
18243
+ scan?.ok === false && /* @__PURE__ */ jsx16(Failure, { scan, path: resolvedPath }),
18244
+ scan?.ok === true && /* @__PURE__ */ jsx16(Summary, { scan, path: resolvedPath, hasTokens })
18245
+ ]
18246
+ },
18247
+ phase
18248
+ )
18239
18249
  );
18240
18250
  }
18241
18251
 
package/dist/index.js CHANGED
@@ -20175,7 +20175,7 @@ function MenuScreen({
20175
20175
  rows = [],
20176
20176
  onChoose,
20177
20177
  onEscape,
20178
- escapeLabel = "back",
20178
+ dataTitle = "Details",
20179
20179
  busy = false,
20180
20180
  children
20181
20181
  }) {
@@ -20191,31 +20191,35 @@ function MenuScreen({
20191
20191
  return /* @__PURE__ */ jsxs11(Box11, { flexDirection: "column", children: [
20192
20192
  /* @__PURE__ */ jsx12(StepHeader, { step: "setup" }),
20193
20193
  /* @__PURE__ */ jsxs11(Box11, { flexDirection: "column", paddingX: 2, paddingBottom: 1, children: [
20194
- /* @__PURE__ */ jsx12(Text11, { bold: true, children: title }),
20194
+ /* @__PURE__ */ jsx12(Text11, { bold: true, color: PALETTE.text, children: title }),
20195
20195
  /* @__PURE__ */ jsx12(Text11, { children: " " }),
20196
20196
  subtitle && /* @__PURE__ */ jsxs11(Fragment2, { children: [
20197
20197
  /* @__PURE__ */ jsx12(Text11, { color: PALETTE.muted, children: subtitle }),
20198
20198
  /* @__PURE__ */ jsx12(Text11, { children: " " })
20199
20199
  ] }),
20200
+ /* @__PURE__ */ jsx12(Text11, { bold: true, color: PALETTE.accent, children: "ACTIONS" }),
20200
20201
  menu.map((item, index) => {
20201
20202
  const focused = index === focus;
20202
20203
  return /* @__PURE__ */ jsxs11(Box11, { gap: 1, children: [
20203
- /* @__PURE__ */ jsx12(Text11, { color: focused ? PALETTE.accent : void 0, children: focused ? "\u276F" : " " }),
20204
- /* @__PURE__ */ jsx12(Box11, { width: labelWidth, flexShrink: 0, children: /* @__PURE__ */ jsx12(Text11, { bold: focused, color: focused ? PALETTE.accent : PALETTE.muted, children: item.label }) }),
20204
+ /* @__PURE__ */ jsx12(Text11, { bold: true, color: PALETTE.accent, children: focused ? "\u276F" : " " }),
20205
+ /* @__PURE__ */ jsx12(Box11, { width: labelWidth, flexShrink: 0, children: /* @__PURE__ */ jsx12(Text11, { bold: focused, color: focused ? PALETTE.accent : PALETTE.text, children: item.label }) }),
20205
20206
  /* @__PURE__ */ jsx12(Text11, { color: PALETTE.muted, children: item.description })
20206
20207
  ] }, item.choice);
20207
20208
  }),
20208
- rows.length > 0 && /* @__PURE__ */ jsx12(Text11, { children: " " }),
20209
- rows.map((row) => /* @__PURE__ */ jsx12(FormReadOnlyRow, { label: row.label, labelWidth, children: /* @__PURE__ */ jsx12(Text11, { bold: row.value !== "", children: row.value || "(empty)" }) }, row.label)),
20210
- children,
20211
- /* @__PURE__ */ jsx12(Text11, { children: " " }),
20212
- /* @__PURE__ */ jsx12(
20213
- ControlHints,
20209
+ (rows.length > 0 || children) && /* @__PURE__ */ jsxs11(
20210
+ Box11,
20214
20211
  {
20215
- hints: [
20216
- { keys: "\u2191/\u2193", label: "move" },
20217
- { keys: "\u23CE", label: menu[focus].label.toLowerCase() },
20218
- { keys: "Esc", label: escapeLabel }
20212
+ flexDirection: "column",
20213
+ marginTop: 1,
20214
+ borderStyle: "single",
20215
+ borderColor: PALETTE.border,
20216
+ borderBottom: false,
20217
+ borderLeft: false,
20218
+ borderRight: false,
20219
+ children: [
20220
+ /* @__PURE__ */ jsx12(Text11, { bold: true, color: PALETTE.muted, children: dataTitle.toUpperCase() }),
20221
+ rows.map((row) => /* @__PURE__ */ jsx12(FormReadOnlyRow, { label: row.label, labelWidth, children: /* @__PURE__ */ jsx12(Text11, { color: row.value ? PALETTE.text : PALETTE.muted, children: row.value || "(empty)" }) }, row.label)),
20222
+ children
20219
20223
  ]
20220
20224
  }
20221
20225
  )
@@ -20226,7 +20230,6 @@ var init_MenuScreen = __esm({
20226
20230
  "packages/experience-design-system-cli/src/tui/shared/components/MenuScreen.tsx"() {
20227
20231
  "use strict";
20228
20232
  init_theme();
20229
- init_ControlHints();
20230
20233
  init_FieldForm();
20231
20234
  init_StepHeader();
20232
20235
  }
@@ -20586,7 +20589,7 @@ import { useEffect as useEffect4, useMemo, useState as useState8 } from "react";
20586
20589
  import { Box as Box13, Text as Text13 } from "ink";
20587
20590
  import { jsx as jsx16, jsxs as jsxs13 } from "react/jsx-runtime";
20588
20591
  function Row({ row }) {
20589
- return /* @__PURE__ */ jsxs13(Text13, { color: row.tone === "accent" ? PALETTE.accent : row.tone === "muted" ? PALETTE.muted : void 0, children: [
20592
+ return /* @__PURE__ */ jsxs13(Text13, { color: row.tone === "accent" ? PALETTE.accent : row.tone === "muted" ? PALETTE.muted : PALETTE.text, children: [
20590
20593
  " \u2022 ",
20591
20594
  String(row.count).padStart(3),
20592
20595
  " ",
@@ -20611,8 +20614,8 @@ function Summary({
20611
20614
  const { total, rows, warning } = summarize(scan.counts, { hasTokens });
20612
20615
  return /* @__PURE__ */ jsxs13(Box13, { flexDirection: "column", gap: 1, children: [
20613
20616
  /* @__PURE__ */ jsxs13(Text13, { children: [
20614
- "Scanned ",
20615
- /* @__PURE__ */ jsx16(Text13, { bold: true, children: path5 })
20617
+ /* @__PURE__ */ jsx16(Text13, { color: PALETTE.muted, children: "Scanned " }),
20618
+ /* @__PURE__ */ jsx16(Text13, { color: PALETTE.text, children: path5 })
20616
20619
  ] }),
20617
20620
  /* @__PURE__ */ jsxs13(Box13, { flexDirection: "column", children: [
20618
20621
  /* @__PURE__ */ jsxs13(Text13, { color: PALETTE.success, children: [
@@ -20649,16 +20652,26 @@ function PathValidationScreen({
20649
20652
  };
20650
20653
  return (
20651
20654
  // keyed by phase: the menu changes length, so its focus starts over
20652
- /* @__PURE__ */ jsxs13(MenuScreen, { title: "Scan", menu: MENUS[phase], onChoose: choose, onEscape: onBack, children: [
20653
- /* @__PURE__ */ jsx16(Text13, { children: " " }),
20654
- scan === void 0 && /* @__PURE__ */ jsxs13(Text13, { color: PALETTE.muted, children: [
20655
- "Scanning ",
20656
- /* @__PURE__ */ jsx16(Text13, { bold: true, children: resolvedPath }),
20657
- "..."
20658
- ] }),
20659
- scan?.ok === false && /* @__PURE__ */ jsx16(Failure, { scan, path: resolvedPath }),
20660
- scan?.ok === true && /* @__PURE__ */ jsx16(Summary, { scan, path: resolvedPath, hasTokens })
20661
- ] }, phase)
20655
+ /* @__PURE__ */ jsxs13(
20656
+ MenuScreen,
20657
+ {
20658
+ title: "Scan",
20659
+ dataTitle: "Scan result",
20660
+ menu: MENUS[phase],
20661
+ onChoose: choose,
20662
+ onEscape: onBack,
20663
+ children: [
20664
+ scan === void 0 && /* @__PURE__ */ jsxs13(Text13, { color: PALETTE.muted, children: [
20665
+ "Scanning ",
20666
+ /* @__PURE__ */ jsx16(Text13, { bold: true, children: resolvedPath }),
20667
+ "..."
20668
+ ] }),
20669
+ scan?.ok === false && /* @__PURE__ */ jsx16(Failure, { scan, path: resolvedPath }),
20670
+ scan?.ok === true && /* @__PURE__ */ jsx16(Summary, { scan, path: resolvedPath, hasTokens })
20671
+ ]
20672
+ },
20673
+ phase
20674
+ )
20662
20675
  );
20663
20676
  }
20664
20677
  var BACK, MENUS;
@@ -20673,11 +20686,7 @@ var init_screen4 = __esm({
20673
20686
  BACK = { choice: "back", label: "Back", description: "Go back" };
20674
20687
  MENUS = {
20675
20688
  scanning: [BACK],
20676
- ready: [
20677
- { choice: "continue", label: "Continue", description: "Use these files and go on" },
20678
- { choice: "change-path", label: "Change path", description: "Pick a different folder" },
20679
- BACK
20680
- ],
20689
+ ready: [{ choice: "continue", label: "Continue", description: "Use these files and go on" }, BACK],
20681
20690
  failed: [{ choice: "change-path", label: "Try a different path", description: "Pick a different folder" }, BACK]
20682
20691
  };
20683
20692
  }
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/experience-design-system-cli",
3
- "version": "2.37.1-dev-build-283166e5.0",
3
+ "version": "2.37.1-dev-build-2aacedbd.0",
4
4
  "description": "Contentful Experiences design system import CLI",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -19,7 +19,8 @@ interface MenuScreenProps<C extends string> {
19
19
  onChoose: (choice: C) => void;
20
20
  /** What Esc does. */
21
21
  onEscape: () => void;
22
- escapeLabel?: string;
22
+ /** The heading over the read-only part, which sits under a divider and is never focusable. */
23
+ dataTitle?: string;
23
24
  /** Ignores keys while something is in flight. */
24
25
  busy?: boolean;
25
26
  /** Shown after the rows, for read-only content that belongs to the same screen. */
@@ -29,5 +30,5 @@ interface MenuScreenProps<C extends string> {
29
30
  * The layout the setup steps share: a title, a menu of actions on top, the read-only data below it and the key hints.
30
31
  * Values are never edited here; an `Edit` item opens the step's own input instead.
31
32
  */
32
- export declare function MenuScreen<C extends string>({ title, subtitle, menu, rows, onChoose, onEscape, escapeLabel, busy, children, }: MenuScreenProps<C>): React.ReactElement;
33
+ export declare function MenuScreen<C extends string>({ title, subtitle, menu, rows, onChoose, onEscape, dataTitle, busy, children, }: MenuScreenProps<C>): React.ReactElement;
33
34
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/experience-design-system-cli",
3
- "version": "2.37.1-dev-build-283166e5.0",
3
+ "version": "2.37.1-dev-build-2aacedbd.0",
4
4
  "description": "Contentful Experiences design system import CLI",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -45,8 +45,8 @@
45
45
  "ts-morph": "^27.0.2",
46
46
  "typescript": "^5.9.3",
47
47
  "zod": "^4.6.5",
48
- "@contentful/experience-design-system-types": "2.37.1-dev-build-283166e5.0",
49
- "@contentful/experience-design-system-backend-pipeline": "2.37.1-dev-build-283166e5.0"
48
+ "@contentful/experience-design-system-backend-pipeline": "2.37.1-dev-build-2aacedbd.0",
49
+ "@contentful/experience-design-system-types": "2.37.1-dev-build-2aacedbd.0"
50
50
  },
51
51
  "devDependencies": {
52
52
  "@tsconfig/node24": "^24.0.4",