@contentful/experience-design-system-cli 2.37.1-dev-build-758ea601.0 → 2.37.1-dev-build-8f86e838.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
|
@@ -2765,20 +2765,6 @@ function ClearableTextInput({ onChange, ...props }) {
|
|
|
2765
2765
|
import { useInput as useInput5 } from "ink";
|
|
2766
2766
|
|
|
2767
2767
|
// packages/experience-design-system-cli/src/tui/import/steps/01-welcome/logic.ts
|
|
2768
|
-
function overviewFor(target) {
|
|
2769
|
-
const push = { description: "Push to Contentful", ai: false };
|
|
2770
|
-
if (target === "tokens") return [{ description: "Generate design tokens from your token file", ai: true }, push];
|
|
2771
|
-
const components = [
|
|
2772
|
-
{
|
|
2773
|
-
description: target === "both" ? "Extract components and generate tokens" : "Extract components from your codebase",
|
|
2774
|
-
ai: true
|
|
2775
|
-
},
|
|
2776
|
-
{ description: "Review what was extracted", ai: false },
|
|
2777
|
-
{ description: "Generate component definitions", ai: true },
|
|
2778
|
-
{ description: "Review generated definitions", ai: false }
|
|
2779
|
-
];
|
|
2780
|
-
return [...components, push];
|
|
2781
|
-
}
|
|
2782
2768
|
function shouldQuit(key) {
|
|
2783
2769
|
return key.escape;
|
|
2784
2770
|
}
|
|
@@ -2803,15 +2789,25 @@ function useWelcomeControls(onQuit) {
|
|
|
2803
2789
|
import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
2804
2790
|
var OVERVIEW_BOX_MAX_WIDTH = 90;
|
|
2805
2791
|
var AI_MARKER = "\u273B";
|
|
2792
|
+
var OVERVIEW = [
|
|
2793
|
+
{
|
|
2794
|
+
label: "Step 1",
|
|
2795
|
+
description: "Extract components from your codebase",
|
|
2796
|
+
ai: true
|
|
2797
|
+
},
|
|
2798
|
+
{ label: "Step 2", description: "Review what was extracted", ai: false },
|
|
2799
|
+
{
|
|
2800
|
+
label: "Step 3",
|
|
2801
|
+
description: "Generate component definitions",
|
|
2802
|
+
ai: true
|
|
2803
|
+
},
|
|
2804
|
+
{ label: "Step 4", description: "Review generated definitions", ai: false },
|
|
2805
|
+
{ label: "Step 5", description: "Push to Contentful", ai: false }
|
|
2806
|
+
];
|
|
2806
2807
|
var AI_DISCLOSURE = [
|
|
2807
2808
|
"Steps marked \u273B use your local AI agent, which may send relevant code to your AI provider under your agreement with them. Contentful does not receive that code, or the prompts and responses. AI suggestions can be wrong or incomplete, so review and edit them before importing."
|
|
2808
2809
|
];
|
|
2809
|
-
function WelcomeScreen({
|
|
2810
|
-
target,
|
|
2811
|
-
onContinue,
|
|
2812
|
-
onQuit,
|
|
2813
|
-
initialPath = ""
|
|
2814
|
-
}) {
|
|
2810
|
+
function WelcomeScreen({ onContinue, onQuit, initialPath = "" }) {
|
|
2815
2811
|
const [projectPath, setProjectPath] = useState4(initialPath);
|
|
2816
2812
|
useWelcomeControls(onQuit);
|
|
2817
2813
|
const submit = (value) => {
|
|
@@ -2831,14 +2827,11 @@ function WelcomeScreen({
|
|
|
2831
2827
|
width: OVERVIEW_BOX_MAX_WIDTH,
|
|
2832
2828
|
flexShrink: 1,
|
|
2833
2829
|
children: [
|
|
2834
|
-
|
|
2835
|
-
/* @__PURE__ */ jsx6(Box4, { flexShrink: 0, children: /* @__PURE__ */
|
|
2836
|
-
"Step ",
|
|
2837
|
-
index + 1
|
|
2838
|
-
] }) }),
|
|
2830
|
+
OVERVIEW.map((item) => /* @__PURE__ */ jsxs4(Box4, { gap: 1, children: [
|
|
2831
|
+
/* @__PURE__ */ jsx6(Box4, { flexShrink: 0, children: /* @__PURE__ */ jsx6(Text5, { bold: true, children: item.label }) }),
|
|
2839
2832
|
/* @__PURE__ */ jsx6(Text5, { color: PALETTE.muted, wrap: "truncate-end", children: item.description }),
|
|
2840
2833
|
item.ai && /* @__PURE__ */ jsx6(Text5, { bold: true, color: PALETTE.accent, children: AI_MARKER })
|
|
2841
|
-
] }, item.
|
|
2834
|
+
] }, item.label)),
|
|
2842
2835
|
/* @__PURE__ */ jsxs4(Box4, { flexDirection: "column", marginTop: 1, children: [
|
|
2843
2836
|
/* @__PURE__ */ jsxs4(Text5, { bold: true, children: [
|
|
2844
2837
|
/* @__PURE__ */ jsx6(Text5, { color: PALETTE.accent, children: AI_MARKER }),
|
|
@@ -29785,7 +29778,6 @@ function App({ importOptions, inkClear }) {
|
|
|
29785
29778
|
return /* @__PURE__ */ jsx64(
|
|
29786
29779
|
WelcomeScreen,
|
|
29787
29780
|
{
|
|
29788
|
-
target,
|
|
29789
29781
|
onContinue: (projectPath) => answer({ projectPath }),
|
|
29790
29782
|
onQuit: () => goBackFrom("project"),
|
|
29791
29783
|
initialPath: importDefaults.componentDir
|
package/dist/index.js
CHANGED
|
@@ -18685,20 +18685,6 @@ var init_ClearableTextInput = __esm({
|
|
|
18685
18685
|
});
|
|
18686
18686
|
|
|
18687
18687
|
// packages/experience-design-system-cli/src/tui/import/steps/01-welcome/logic.ts
|
|
18688
|
-
function overviewFor(target) {
|
|
18689
|
-
const push = { description: "Push to Contentful", ai: false };
|
|
18690
|
-
if (target === "tokens") return [{ description: "Generate design tokens from your token file", ai: true }, push];
|
|
18691
|
-
const components = [
|
|
18692
|
-
{
|
|
18693
|
-
description: target === "both" ? "Extract components and generate tokens" : "Extract components from your codebase",
|
|
18694
|
-
ai: true
|
|
18695
|
-
},
|
|
18696
|
-
{ description: "Review what was extracted", ai: false },
|
|
18697
|
-
{ description: "Generate component definitions", ai: true },
|
|
18698
|
-
{ description: "Review generated definitions", ai: false }
|
|
18699
|
-
];
|
|
18700
|
-
return [...components, push];
|
|
18701
|
-
}
|
|
18702
18688
|
function shouldQuit(key) {
|
|
18703
18689
|
return key.escape;
|
|
18704
18690
|
}
|
|
@@ -18736,12 +18722,7 @@ var init_controls2 = __esm({
|
|
|
18736
18722
|
import { useState as useState4 } from "react";
|
|
18737
18723
|
import { Box as Box4, Text as Text5 } from "ink";
|
|
18738
18724
|
import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
18739
|
-
function WelcomeScreen({
|
|
18740
|
-
target,
|
|
18741
|
-
onContinue,
|
|
18742
|
-
onQuit,
|
|
18743
|
-
initialPath = ""
|
|
18744
|
-
}) {
|
|
18725
|
+
function WelcomeScreen({ onContinue, onQuit, initialPath = "" }) {
|
|
18745
18726
|
const [projectPath, setProjectPath] = useState4(initialPath);
|
|
18746
18727
|
useWelcomeControls(onQuit);
|
|
18747
18728
|
const submit = (value) => {
|
|
@@ -18761,14 +18742,11 @@ function WelcomeScreen({
|
|
|
18761
18742
|
width: OVERVIEW_BOX_MAX_WIDTH,
|
|
18762
18743
|
flexShrink: 1,
|
|
18763
18744
|
children: [
|
|
18764
|
-
|
|
18765
|
-
/* @__PURE__ */ jsx6(Box4, { flexShrink: 0, children: /* @__PURE__ */
|
|
18766
|
-
"Step ",
|
|
18767
|
-
index + 1
|
|
18768
|
-
] }) }),
|
|
18745
|
+
OVERVIEW.map((item) => /* @__PURE__ */ jsxs4(Box4, { gap: 1, children: [
|
|
18746
|
+
/* @__PURE__ */ jsx6(Box4, { flexShrink: 0, children: /* @__PURE__ */ jsx6(Text5, { bold: true, children: item.label }) }),
|
|
18769
18747
|
/* @__PURE__ */ jsx6(Text5, { color: PALETTE.muted, wrap: "truncate-end", children: item.description }),
|
|
18770
18748
|
item.ai && /* @__PURE__ */ jsx6(Text5, { bold: true, color: PALETTE.accent, children: AI_MARKER })
|
|
18771
|
-
] }, item.
|
|
18749
|
+
] }, item.label)),
|
|
18772
18750
|
/* @__PURE__ */ jsxs4(Box4, { flexDirection: "column", marginTop: 1, children: [
|
|
18773
18751
|
/* @__PURE__ */ jsxs4(Text5, { bold: true, children: [
|
|
18774
18752
|
/* @__PURE__ */ jsx6(Text5, { color: PALETTE.accent, children: AI_MARKER }),
|
|
@@ -18795,7 +18773,7 @@ function WelcomeScreen({
|
|
|
18795
18773
|
] }, control.keys)) })
|
|
18796
18774
|
] });
|
|
18797
18775
|
}
|
|
18798
|
-
var OVERVIEW_BOX_MAX_WIDTH, AI_MARKER, AI_DISCLOSURE;
|
|
18776
|
+
var OVERVIEW_BOX_MAX_WIDTH, AI_MARKER, OVERVIEW, AI_DISCLOSURE;
|
|
18799
18777
|
var init_screen2 = __esm({
|
|
18800
18778
|
"packages/experience-design-system-cli/src/tui/import/steps/01-welcome/screen.tsx"() {
|
|
18801
18779
|
"use strict";
|
|
@@ -18805,6 +18783,21 @@ var init_screen2 = __esm({
|
|
|
18805
18783
|
init_logic2();
|
|
18806
18784
|
OVERVIEW_BOX_MAX_WIDTH = 90;
|
|
18807
18785
|
AI_MARKER = "\u273B";
|
|
18786
|
+
OVERVIEW = [
|
|
18787
|
+
{
|
|
18788
|
+
label: "Step 1",
|
|
18789
|
+
description: "Extract components from your codebase",
|
|
18790
|
+
ai: true
|
|
18791
|
+
},
|
|
18792
|
+
{ label: "Step 2", description: "Review what was extracted", ai: false },
|
|
18793
|
+
{
|
|
18794
|
+
label: "Step 3",
|
|
18795
|
+
description: "Generate component definitions",
|
|
18796
|
+
ai: true
|
|
18797
|
+
},
|
|
18798
|
+
{ label: "Step 4", description: "Review generated definitions", ai: false },
|
|
18799
|
+
{ label: "Step 5", description: "Push to Contentful", ai: false }
|
|
18800
|
+
];
|
|
18808
18801
|
AI_DISCLOSURE = [
|
|
18809
18802
|
"Steps marked \u273B use your local AI agent, which may send relevant code to your AI provider under your agreement with them. Contentful does not receive that code, or the prompts and responses. AI suggestions can be wrong or incomplete, so review and edit them before importing."
|
|
18810
18803
|
];
|
|
@@ -33406,7 +33399,6 @@ function App({ importOptions, inkClear }) {
|
|
|
33406
33399
|
return /* @__PURE__ */ jsx64(
|
|
33407
33400
|
WelcomeScreen,
|
|
33408
33401
|
{
|
|
33409
|
-
target,
|
|
33410
33402
|
onContinue: (projectPath) => answer({ projectPath }),
|
|
33411
33403
|
onQuit: () => goBackFrom("project"),
|
|
33412
33404
|
initialPath: importDefaults.componentDir
|
package/dist/package.json
CHANGED
|
@@ -1,14 +1,6 @@
|
|
|
1
|
-
import type { ImportTarget } from '../00-preflight/logic.js';
|
|
2
1
|
interface QuitKey {
|
|
3
2
|
escape: boolean;
|
|
4
3
|
}
|
|
5
|
-
interface OverviewStep {
|
|
6
|
-
description: string;
|
|
7
|
-
/** Whether the step uses the user's local AI agent. */
|
|
8
|
-
ai: boolean;
|
|
9
|
-
}
|
|
10
|
-
/** The steps the user is about to go through, as the welcome screen lists them, for what they chose to generate. */
|
|
11
|
-
export declare function overviewFor(target: ImportTarget): readonly OverviewStep[];
|
|
12
4
|
export declare function shouldQuit(key: QuitKey): boolean;
|
|
13
5
|
export declare function toProjectPath(value: string): string | null;
|
|
14
6
|
export {};
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { ImportTarget } from '../00-preflight/logic.js';
|
|
3
2
|
interface WelcomeScreenProps {
|
|
4
|
-
target: ImportTarget;
|
|
5
3
|
onContinue: (projectPath: string) => void;
|
|
6
4
|
onQuit: () => void;
|
|
7
5
|
initialPath?: string;
|
|
8
6
|
}
|
|
9
|
-
export declare function WelcomeScreen({
|
|
7
|
+
export declare function WelcomeScreen({ onContinue, onQuit, initialPath }: WelcomeScreenProps): React.ReactElement;
|
|
10
8
|
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-8f86e838.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-backend-pipeline": "2.37.1-dev-build-
|
|
49
|
-
"@contentful/experience-design-system-types": "2.37.1-dev-build-
|
|
48
|
+
"@contentful/experience-design-system-backend-pipeline": "2.37.1-dev-build-8f86e838.0",
|
|
49
|
+
"@contentful/experience-design-system-types": "2.37.1-dev-build-8f86e838.0"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@tsconfig/node24": "^24.0.4",
|