@contentful/experience-design-system-cli 2.37.1-dev-build-283166e5.0 → 2.37.1-dev-build-acc2abfe.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 +37 -27
- package/dist/index.js +37 -28
- package/dist/package.json +1 -1
- package/dist/src/tui/shared/components/MenuScreen.d.ts +3 -2
- package/package.json +3 -3
package/dist/app.js
CHANGED
|
@@ -3325,7 +3325,7 @@ function MenuScreen({
|
|
|
3325
3325
|
rows = [],
|
|
3326
3326
|
onChoose,
|
|
3327
3327
|
onEscape,
|
|
3328
|
-
|
|
3328
|
+
dataTitle = "Details",
|
|
3329
3329
|
busy = false,
|
|
3330
3330
|
children
|
|
3331
3331
|
}) {
|
|
@@ -3347,25 +3347,29 @@ function MenuScreen({
|
|
|
3347
3347
|
/* @__PURE__ */ jsx12(Text11, { color: PALETTE.muted, children: subtitle }),
|
|
3348
3348
|
/* @__PURE__ */ jsx12(Text11, { children: " " })
|
|
3349
3349
|
] }),
|
|
3350
|
+
/* @__PURE__ */ jsx12(Text11, { color: PALETTE.muted, children: "ACTIONS" }),
|
|
3350
3351
|
menu.map((item, index) => {
|
|
3351
3352
|
const focused = index === focus;
|
|
3352
3353
|
return /* @__PURE__ */ jsxs11(Box11, { gap: 1, children: [
|
|
3353
3354
|
/* @__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 :
|
|
3355
|
+
/* @__PURE__ */ jsx12(Box11, { width: labelWidth, flexShrink: 0, children: /* @__PURE__ */ jsx12(Text11, { bold: focused, color: focused ? PALETTE.accent : void 0, 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__ */
|
|
3359
|
-
|
|
3360
|
-
children,
|
|
3361
|
-
/* @__PURE__ */ jsx12(Text11, { children: " " }),
|
|
3362
|
-
/* @__PURE__ */ jsx12(
|
|
3363
|
-
ControlHints,
|
|
3359
|
+
(rows.length > 0 || children) && /* @__PURE__ */ jsxs11(
|
|
3360
|
+
Box11,
|
|
3364
3361
|
{
|
|
3365
|
-
|
|
3366
|
-
|
|
3367
|
-
|
|
3368
|
-
|
|
3362
|
+
flexDirection: "column",
|
|
3363
|
+
marginTop: 1,
|
|
3364
|
+
borderStyle: "single",
|
|
3365
|
+
borderColor: PALETTE.border,
|
|
3366
|
+
borderBottom: false,
|
|
3367
|
+
borderLeft: false,
|
|
3368
|
+
borderRight: false,
|
|
3369
|
+
children: [
|
|
3370
|
+
/* @__PURE__ */ jsx12(Text11, { color: PALETTE.muted, children: dataTitle.toUpperCase() }),
|
|
3371
|
+
rows.map((row) => /* @__PURE__ */ jsx12(FormReadOnlyRow, { label: row.label, labelWidth, children: /* @__PURE__ */ jsx12(Text11, { bold: row.value !== "", children: row.value || "(empty)" }) }, row.label)),
|
|
3372
|
+
children
|
|
3369
3373
|
]
|
|
3370
3374
|
}
|
|
3371
3375
|
)
|
|
@@ -18155,11 +18159,7 @@ 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 }) {
|
|
@@ -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(
|
|
18230
|
-
|
|
18231
|
-
|
|
18232
|
-
|
|
18233
|
-
|
|
18234
|
-
|
|
18235
|
-
|
|
18236
|
-
|
|
18237
|
-
|
|
18238
|
-
|
|
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
|
-
|
|
20178
|
+
dataTitle = "Details",
|
|
20179
20179
|
busy = false,
|
|
20180
20180
|
children
|
|
20181
20181
|
}) {
|
|
@@ -20197,25 +20197,29 @@ function MenuScreen({
|
|
|
20197
20197
|
/* @__PURE__ */ jsx12(Text11, { color: PALETTE.muted, children: subtitle }),
|
|
20198
20198
|
/* @__PURE__ */ jsx12(Text11, { children: " " })
|
|
20199
20199
|
] }),
|
|
20200
|
+
/* @__PURE__ */ jsx12(Text11, { color: PALETTE.muted, children: "ACTIONS" }),
|
|
20200
20201
|
menu.map((item, index) => {
|
|
20201
20202
|
const focused = index === focus;
|
|
20202
20203
|
return /* @__PURE__ */ jsxs11(Box11, { gap: 1, children: [
|
|
20203
20204
|
/* @__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 :
|
|
20205
|
+
/* @__PURE__ */ jsx12(Box11, { width: labelWidth, flexShrink: 0, children: /* @__PURE__ */ jsx12(Text11, { bold: focused, color: focused ? PALETTE.accent : void 0, 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__ */
|
|
20209
|
-
|
|
20210
|
-
children,
|
|
20211
|
-
/* @__PURE__ */ jsx12(Text11, { children: " " }),
|
|
20212
|
-
/* @__PURE__ */ jsx12(
|
|
20213
|
-
ControlHints,
|
|
20209
|
+
(rows.length > 0 || children) && /* @__PURE__ */ jsxs11(
|
|
20210
|
+
Box11,
|
|
20214
20211
|
{
|
|
20215
|
-
|
|
20216
|
-
|
|
20217
|
-
|
|
20218
|
-
|
|
20212
|
+
flexDirection: "column",
|
|
20213
|
+
marginTop: 1,
|
|
20214
|
+
borderStyle: "single",
|
|
20215
|
+
borderColor: PALETTE.border,
|
|
20216
|
+
borderBottom: false,
|
|
20217
|
+
borderLeft: false,
|
|
20218
|
+
borderRight: false,
|
|
20219
|
+
children: [
|
|
20220
|
+
/* @__PURE__ */ jsx12(Text11, { color: PALETTE.muted, children: dataTitle.toUpperCase() }),
|
|
20221
|
+
rows.map((row) => /* @__PURE__ */ jsx12(FormReadOnlyRow, { label: row.label, labelWidth, children: /* @__PURE__ */ jsx12(Text11, { bold: row.value !== "", children: row.value || "(empty)" }) }, row.label)),
|
|
20222
|
+
children
|
|
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
|
}
|
|
@@ -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(
|
|
20653
|
-
|
|
20654
|
-
|
|
20655
|
-
|
|
20656
|
-
|
|
20657
|
-
|
|
20658
|
-
|
|
20659
|
-
|
|
20660
|
-
|
|
20661
|
-
|
|
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
|
@@ -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
|
-
|
|
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,
|
|
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-
|
|
3
|
+
"version": "2.37.1-dev-build-acc2abfe.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-
|
|
49
|
-
"@contentful/experience-design-system-
|
|
48
|
+
"@contentful/experience-design-system-backend-pipeline": "2.37.1-dev-build-acc2abfe.0",
|
|
49
|
+
"@contentful/experience-design-system-types": "2.37.1-dev-build-acc2abfe.0"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@tsconfig/node24": "^24.0.4",
|