@contentful/experience-design-system-cli 2.37.1-dev-build-a6ef2d40.0 → 2.37.1-dev-build-8a9493aa.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
@@ -2519,7 +2519,7 @@ function ControlHints({ hints }) {
2519
2519
  // packages/experience-design-system-cli/src/tui/home/home.tsx
2520
2520
  import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
2521
2521
  var VERSION = readPackageVersion();
2522
- var HEADING = "Design System Import";
2522
+ var HEADING = "Contentful Experiences";
2523
2523
  var MIN_TERMINAL_WIDTH = 164;
2524
2524
  var START_ITEMS = [
2525
2525
  { label: "Import", screen: "import" },
@@ -2849,7 +2849,6 @@ function StepHeader({ step }) {
2849
2849
  {
2850
2850
  justifyContent: "space-between",
2851
2851
  paddingX: 2,
2852
- paddingTop: 1,
2853
2852
  marginBottom: 1,
2854
2853
  borderStyle: "single",
2855
2854
  borderColor: PALETTE.border,
@@ -3121,19 +3120,17 @@ function WelcomeScreen({ onContinue, onQuit, initialPath = "" }) {
3121
3120
  const path5 = toProjectPath(value);
3122
3121
  if (path5) onContinue(path5);
3123
3122
  };
3124
- return /* @__PURE__ */ jsxs10(Box10, { flexDirection: "column", children: [
3125
- /* @__PURE__ */ jsx11(StepHeader, { step: "setup" }),
3126
- /* @__PURE__ */ jsxs10(Box10, { flexDirection: "column", gap: 1, paddingX: 2, paddingBottom: 1, children: [
3127
- /* @__PURE__ */ jsxs10(Box10, { flexDirection: "column", gap: 1, children: [
3128
- /* @__PURE__ */ jsx11(Text10, { color: PALETTE.text, children: "Where is your component library?" }),
3129
- /* @__PURE__ */ jsxs10(Box10, { children: [
3130
- /* @__PURE__ */ jsx11(Text10, { color: PALETTE.accent, children: "? " }),
3131
- /* @__PURE__ */ jsx11(Text10, { children: "Project path: " }),
3132
- /* @__PURE__ */ jsx11(ClearableTextInput, { value: projectPath, onChange: setProjectPath, onSubmit: submit })
3133
- ] })
3134
- ] }),
3135
- /* @__PURE__ */ jsx11(Box10, { children: /* @__PURE__ */ jsx11(ControlHints, { hints: WELCOME_CONTROLS }) })
3136
- ] })
3123
+ return /* @__PURE__ */ jsxs10(Box10, { flexDirection: "column", gap: 1, paddingX: 2, paddingY: 1, children: [
3124
+ /* @__PURE__ */ jsx11(Text10, { bold: true, color: PALETTE.accent, children: "Let's import your design system into Contentful." }),
3125
+ /* @__PURE__ */ jsxs10(Box10, { flexDirection: "column", gap: 1, children: [
3126
+ /* @__PURE__ */ jsx11(Text10, { children: "Where is your component library?" }),
3127
+ /* @__PURE__ */ jsxs10(Box10, { children: [
3128
+ /* @__PURE__ */ jsx11(Text10, { color: PALETTE.accent, children: "? " }),
3129
+ /* @__PURE__ */ jsx11(Text10, { children: "Project path: " }),
3130
+ /* @__PURE__ */ jsx11(ClearableTextInput, { value: projectPath, onChange: setProjectPath, onSubmit: submit })
3131
+ ] })
3132
+ ] }),
3133
+ /* @__PURE__ */ jsx11(Box10, { children: /* @__PURE__ */ jsx11(ControlHints, { hints: WELCOME_CONTROLS }) })
3137
3134
  ] });
3138
3135
  }
3139
3136
 
@@ -17242,9 +17239,6 @@ function FieldForm({
17242
17239
  onChange,
17243
17240
  onSave,
17244
17241
  saveLabel = "save",
17245
- enterAdvances = false,
17246
- onSkip,
17247
- skipLabel: skipLabel2 = "skip",
17248
17242
  onQuit,
17249
17243
  quitLabel = "back without saving",
17250
17244
  actions = [],
@@ -17276,10 +17270,6 @@ function FieldForm({
17276
17270
  onSave();
17277
17271
  return;
17278
17272
  }
17279
- if (input === "k" && onSkip) {
17280
- onSkip();
17281
- return;
17282
- }
17283
17273
  if (isClearKey(input, key) && currentField) {
17284
17274
  onChange(currentField.key, "");
17285
17275
  return;
@@ -17301,21 +17291,6 @@ function FieldForm({
17301
17291
  }
17302
17292
  }
17303
17293
  });
17304
- const isLastField = active === fields2.length - 1;
17305
- const submitField = () => {
17306
- if (!enterAdvances) {
17307
- setEditing(false);
17308
- return;
17309
- }
17310
- if (isLastField) {
17311
- setEditing(false);
17312
- onSave();
17313
- return;
17314
- }
17315
- const next = fields2[active + 1];
17316
- setValueBeforeEdit(values[next.key]);
17317
- setActive(active + 1);
17318
- };
17319
17294
  const pointer = (isActive) => /* @__PURE__ */ jsx14(Text13, { color: isActive ? PALETTE.accent : void 0, children: isActive ? "\u276F" : " " });
17320
17295
  return /* @__PURE__ */ jsxs13(Box13, { flexDirection: "column", children: [
17321
17296
  header,
@@ -17337,7 +17312,7 @@ function FieldForm({
17337
17312
  {
17338
17313
  value,
17339
17314
  onChange: (next) => onChange(field.key, next),
17340
- onSubmit: submitField,
17315
+ onSubmit: () => setEditing(false),
17341
17316
  mask: field.masked ? "\u2022" : void 0
17342
17317
  }
17343
17318
  ) : display ? /* @__PURE__ */ jsx14(Text13, { bold: true, children: display }) : (
@@ -17373,7 +17348,7 @@ function FieldForm({
17373
17348
  hints: editing ? [
17374
17349
  { keys: "type", label: "edit" },
17375
17350
  { keys: "\u2190/\u2192", label: "move cursor" },
17376
- { keys: "\u23CE", label: enterAdvances ? isLastField ? saveLabel : "next" : "done" },
17351
+ { keys: "\u23CE", label: "done" },
17377
17352
  { keys: "Ctrl+D", label: "clear" },
17378
17353
  { keys: "Esc", label: "cancel edit" }
17379
17354
  ] : [
@@ -17381,7 +17356,6 @@ function FieldForm({
17381
17356
  { keys: "\u23CE", label: currentAction ? currentAction.hint : "edit" },
17382
17357
  ...currentField ? [{ keys: "Ctrl+D", label: "clear" }] : [],
17383
17358
  { keys: "s", label: saveLabel },
17384
- ...onSkip ? [{ keys: "k", label: skipLabel2 }] : [],
17385
17359
  { keys: "Esc/q", label: quitLabel }
17386
17360
  ]
17387
17361
  }
@@ -17496,11 +17470,24 @@ function CredentialsScreen({
17496
17470
  setValues((current) => ({ ...current, [key]: value }));
17497
17471
  setNotice(null);
17498
17472
  },
17499
- enterAdvances: true,
17473
+ actions: [
17474
+ {
17475
+ label: "Continue",
17476
+ description: "Check the credentials and go on",
17477
+ runningText: "Validating credentials...",
17478
+ running: validating,
17479
+ hint: "continue",
17480
+ onRun: () => void submit()
17481
+ },
17482
+ {
17483
+ label: "Skip",
17484
+ description: "Save files only, nothing is pushed",
17485
+ hint: "skip",
17486
+ onRun: () => onDone({ skipped: true })
17487
+ }
17488
+ ],
17500
17489
  onSave: () => void submit(),
17501
17490
  saveLabel: "continue",
17502
- onSkip: () => onDone({ skipped: true }),
17503
- skipLabel: "skip, save files only",
17504
17491
  onQuit: onBack,
17505
17492
  quitLabel: "back",
17506
17493
  notice,
@@ -17511,10 +17498,6 @@ function CredentialsScreen({
17511
17498
  /* @__PURE__ */ jsx15(Text14, { color: PALETTE.muted, children: credentialsPurpose(tokensOnly) }),
17512
17499
  /* @__PURE__ */ jsx15(Text14, { color: PALETTE.muted, children: "Tip: save these under Settings \u2192 Configuration so they pre-fill here." })
17513
17500
  ] }),
17514
- validating && /* @__PURE__ */ jsxs14(Fragment2, { children: [
17515
- /* @__PURE__ */ jsx15(Text14, { children: " " }),
17516
- /* @__PURE__ */ jsx15(Text14, { color: PALETTE.accent, children: "Validating credentials..." })
17517
- ] }),
17518
17501
  !validating && !notice && !isUnchanged(normalize(values), initialValues) && /* @__PURE__ */ jsxs14(Fragment2, { children: [
17519
17502
  /* @__PURE__ */ jsx15(Text14, { children: " " }),
17520
17503
  /* @__PURE__ */ jsx15(Text14, { color: PALETTE.muted, children: "Changed values are saved after they validate." })
@@ -29320,7 +29303,6 @@ function ProjectScreen({ onDone }) {
29320
29303
  setNotice(null);
29321
29304
  visit.trail.record(`edited ${key}`);
29322
29305
  },
29323
- enterAdvances: true,
29324
29306
  onSave: save,
29325
29307
  onQuit: quit,
29326
29308
  notice,
package/dist/index.js CHANGED
@@ -18487,7 +18487,7 @@ var init_home = __esm({
18487
18487
  init_use_terminal_width();
18488
18488
  init_ControlHints();
18489
18489
  VERSION = readPackageVersion();
18490
- HEADING = "Design System Import";
18490
+ HEADING = "Contentful Experiences";
18491
18491
  MIN_TERMINAL_WIDTH = 164;
18492
18492
  START_ITEMS = [
18493
18493
  { label: "Import", screen: "import" },
@@ -18771,7 +18771,6 @@ function StepHeader({ step }) {
18771
18771
  {
18772
18772
  justifyContent: "space-between",
18773
18773
  paddingX: 2,
18774
- paddingTop: 1,
18775
18774
  marginBottom: 1,
18776
18775
  borderStyle: "single",
18777
18776
  borderColor: PALETTE.border,
@@ -19144,19 +19143,17 @@ function WelcomeScreen({ onContinue, onQuit, initialPath = "" }) {
19144
19143
  const path5 = toProjectPath(value);
19145
19144
  if (path5) onContinue(path5);
19146
19145
  };
19147
- return /* @__PURE__ */ jsxs10(Box10, { flexDirection: "column", children: [
19148
- /* @__PURE__ */ jsx11(StepHeader, { step: "setup" }),
19149
- /* @__PURE__ */ jsxs10(Box10, { flexDirection: "column", gap: 1, paddingX: 2, paddingBottom: 1, children: [
19150
- /* @__PURE__ */ jsxs10(Box10, { flexDirection: "column", gap: 1, children: [
19151
- /* @__PURE__ */ jsx11(Text10, { color: PALETTE.text, children: "Where is your component library?" }),
19152
- /* @__PURE__ */ jsxs10(Box10, { children: [
19153
- /* @__PURE__ */ jsx11(Text10, { color: PALETTE.accent, children: "? " }),
19154
- /* @__PURE__ */ jsx11(Text10, { children: "Project path: " }),
19155
- /* @__PURE__ */ jsx11(ClearableTextInput, { value: projectPath, onChange: setProjectPath, onSubmit: submit })
19156
- ] })
19157
- ] }),
19158
- /* @__PURE__ */ jsx11(Box10, { children: /* @__PURE__ */ jsx11(ControlHints, { hints: WELCOME_CONTROLS }) })
19159
- ] })
19146
+ return /* @__PURE__ */ jsxs10(Box10, { flexDirection: "column", gap: 1, paddingX: 2, paddingY: 1, children: [
19147
+ /* @__PURE__ */ jsx11(Text10, { bold: true, color: PALETTE.accent, children: "Let's import your design system into Contentful." }),
19148
+ /* @__PURE__ */ jsxs10(Box10, { flexDirection: "column", gap: 1, children: [
19149
+ /* @__PURE__ */ jsx11(Text10, { children: "Where is your component library?" }),
19150
+ /* @__PURE__ */ jsxs10(Box10, { children: [
19151
+ /* @__PURE__ */ jsx11(Text10, { color: PALETTE.accent, children: "? " }),
19152
+ /* @__PURE__ */ jsx11(Text10, { children: "Project path: " }),
19153
+ /* @__PURE__ */ jsx11(ClearableTextInput, { value: projectPath, onChange: setProjectPath, onSubmit: submit })
19154
+ ] })
19155
+ ] }),
19156
+ /* @__PURE__ */ jsx11(Box10, { children: /* @__PURE__ */ jsx11(ControlHints, { hints: WELCOME_CONTROLS }) })
19160
19157
  ] });
19161
19158
  }
19162
19159
  var init_screen2 = __esm({
@@ -19167,7 +19164,6 @@ var init_screen2 = __esm({
19167
19164
  init_controls4();
19168
19165
  init_logic5();
19169
19166
  init_ControlHints();
19170
- init_StepHeader();
19171
19167
  }
19172
19168
  });
19173
19169
 
@@ -19569,9 +19565,6 @@ function FieldForm({
19569
19565
  onChange,
19570
19566
  onSave,
19571
19567
  saveLabel = "save",
19572
- enterAdvances = false,
19573
- onSkip,
19574
- skipLabel: skipLabel2 = "skip",
19575
19568
  onQuit,
19576
19569
  quitLabel = "back without saving",
19577
19570
  actions = [],
@@ -19603,10 +19596,6 @@ function FieldForm({
19603
19596
  onSave();
19604
19597
  return;
19605
19598
  }
19606
- if (input === "k" && onSkip) {
19607
- onSkip();
19608
- return;
19609
- }
19610
19599
  if (isClearKey(input, key) && currentField) {
19611
19600
  onChange(currentField.key, "");
19612
19601
  return;
@@ -19628,21 +19617,6 @@ function FieldForm({
19628
19617
  }
19629
19618
  }
19630
19619
  });
19631
- const isLastField = active === fields2.length - 1;
19632
- const submitField = () => {
19633
- if (!enterAdvances) {
19634
- setEditing(false);
19635
- return;
19636
- }
19637
- if (isLastField) {
19638
- setEditing(false);
19639
- onSave();
19640
- return;
19641
- }
19642
- const next = fields2[active + 1];
19643
- setValueBeforeEdit(values[next.key]);
19644
- setActive(active + 1);
19645
- };
19646
19620
  const pointer = (isActive) => /* @__PURE__ */ jsx14(Text13, { color: isActive ? PALETTE.accent : void 0, children: isActive ? "\u276F" : " " });
19647
19621
  return /* @__PURE__ */ jsxs13(Box13, { flexDirection: "column", children: [
19648
19622
  header,
@@ -19664,7 +19638,7 @@ function FieldForm({
19664
19638
  {
19665
19639
  value,
19666
19640
  onChange: (next) => onChange(field.key, next),
19667
- onSubmit: submitField,
19641
+ onSubmit: () => setEditing(false),
19668
19642
  mask: field.masked ? "\u2022" : void 0
19669
19643
  }
19670
19644
  ) : display ? /* @__PURE__ */ jsx14(Text13, { bold: true, children: display }) : (
@@ -19700,7 +19674,7 @@ function FieldForm({
19700
19674
  hints: editing ? [
19701
19675
  { keys: "type", label: "edit" },
19702
19676
  { keys: "\u2190/\u2192", label: "move cursor" },
19703
- { keys: "\u23CE", label: enterAdvances ? isLastField ? saveLabel : "next" : "done" },
19677
+ { keys: "\u23CE", label: "done" },
19704
19678
  { keys: "Ctrl+D", label: "clear" },
19705
19679
  { keys: "Esc", label: "cancel edit" }
19706
19680
  ] : [
@@ -19708,7 +19682,6 @@ function FieldForm({
19708
19682
  { keys: "\u23CE", label: currentAction ? currentAction.hint : "edit" },
19709
19683
  ...currentField ? [{ keys: "Ctrl+D", label: "clear" }] : [],
19710
19684
  { keys: "s", label: saveLabel },
19711
- ...onSkip ? [{ keys: "k", label: skipLabel2 }] : [],
19712
19685
  { keys: "Esc/q", label: quitLabel }
19713
19686
  ]
19714
19687
  }
@@ -19847,11 +19820,24 @@ function CredentialsScreen({
19847
19820
  setValues((current) => ({ ...current, [key]: value }));
19848
19821
  setNotice(null);
19849
19822
  },
19850
- enterAdvances: true,
19823
+ actions: [
19824
+ {
19825
+ label: "Continue",
19826
+ description: "Check the credentials and go on",
19827
+ runningText: "Validating credentials...",
19828
+ running: validating,
19829
+ hint: "continue",
19830
+ onRun: () => void submit()
19831
+ },
19832
+ {
19833
+ label: "Skip",
19834
+ description: "Save files only, nothing is pushed",
19835
+ hint: "skip",
19836
+ onRun: () => onDone({ skipped: true })
19837
+ }
19838
+ ],
19851
19839
  onSave: () => void submit(),
19852
19840
  saveLabel: "continue",
19853
- onSkip: () => onDone({ skipped: true }),
19854
- skipLabel: "skip, save files only",
19855
19841
  onQuit: onBack,
19856
19842
  quitLabel: "back",
19857
19843
  notice,
@@ -19862,10 +19848,6 @@ function CredentialsScreen({
19862
19848
  /* @__PURE__ */ jsx15(Text14, { color: PALETTE.muted, children: credentialsPurpose(tokensOnly) }),
19863
19849
  /* @__PURE__ */ jsx15(Text14, { color: PALETTE.muted, children: "Tip: save these under Settings \u2192 Configuration so they pre-fill here." })
19864
19850
  ] }),
19865
- validating && /* @__PURE__ */ jsxs14(Fragment2, { children: [
19866
- /* @__PURE__ */ jsx15(Text14, { children: " " }),
19867
- /* @__PURE__ */ jsx15(Text14, { color: PALETTE.accent, children: "Validating credentials..." })
19868
- ] }),
19869
19851
  !validating && !notice && !isUnchanged(normalize(values), initialValues) && /* @__PURE__ */ jsxs14(Fragment2, { children: [
19870
19852
  /* @__PURE__ */ jsx15(Text14, { children: " " }),
19871
19853
  /* @__PURE__ */ jsx15(Text14, { color: PALETTE.muted, children: "Changed values are saved after they validate." })
@@ -32923,7 +32905,6 @@ function ProjectScreen({ onDone }) {
32923
32905
  setNotice(null);
32924
32906
  visit.trail.record(`edited ${key}`);
32925
32907
  },
32926
- enterAdvances: true,
32927
32908
  onSave: save,
32928
32909
  onQuit: quit,
32929
32910
  notice,
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-a6ef2d40.0",
3
+ "version": "2.37.1-dev-build-8a9493aa.0",
4
4
  "description": "Contentful Experiences design system import CLI",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -33,10 +33,8 @@ interface FieldFormProps<K extends string> {
33
33
  values: Record<K, string>;
34
34
  onChange: (key: K, value: string) => void;
35
35
  onSave: () => void;
36
+ /** What `s` does, in the control hints. */
36
37
  saveLabel?: string;
37
- enterAdvances?: boolean;
38
- onSkip?: () => void;
39
- skipLabel?: string;
40
38
  /** Leaves without saving. */
41
39
  onQuit: () => void;
42
40
  /** What Esc does, in the control hints. */
@@ -67,5 +65,5 @@ export declare function FormReadOnlyRow({ label, labelWidth, children, }: {
67
65
  * While one is open, keys type into it (so a "q" in a path is just a "q"), and Esc closes it and restores the old value.
68
66
  * Actions sit after the fields and take the same cursor: Enter runs one, and `c` does nothing on it.
69
67
  */
70
- export declare function FieldForm<K extends string>({ header, title, subtitle, fields, values, onChange, onSave, saveLabel, enterAdvances, onSkip, skipLabel, onQuit, quitLabel, actions, notice, busy, children, }: FieldFormProps<K>): React.ReactElement;
68
+ export declare function FieldForm<K extends string>({ header, title, subtitle, fields, values, onChange, onSave, saveLabel, onQuit, quitLabel, actions, notice, busy, children, }: FieldFormProps<K>): React.ReactElement;
71
69
  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-a6ef2d40.0",
3
+ "version": "2.37.1-dev-build-8a9493aa.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-a6ef2d40.0",
49
- "@contentful/experience-design-system-types": "2.37.1-dev-build-a6ef2d40.0"
48
+ "@contentful/experience-design-system-backend-pipeline": "2.37.1-dev-build-8a9493aa.0",
49
+ "@contentful/experience-design-system-types": "2.37.1-dev-build-8a9493aa.0"
50
50
  },
51
51
  "devDependencies": {
52
52
  "@tsconfig/node24": "^24.0.4",