@contentful/experience-design-system-cli 2.37.1-dev-build-6d56b670.0 → 2.37.1-dev-build-a6ef2d40.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 +33 -18
- package/dist/index.js +33 -18
- package/dist/package.json +1 -1
- package/dist/src/tui/shared/components/FieldForm.d.ts +4 -2
- package/package.json +3 -3
package/dist/app.js
CHANGED
|
@@ -17242,6 +17242,9 @@ function FieldForm({
|
|
|
17242
17242
|
onChange,
|
|
17243
17243
|
onSave,
|
|
17244
17244
|
saveLabel = "save",
|
|
17245
|
+
enterAdvances = false,
|
|
17246
|
+
onSkip,
|
|
17247
|
+
skipLabel: skipLabel2 = "skip",
|
|
17245
17248
|
onQuit,
|
|
17246
17249
|
quitLabel = "back without saving",
|
|
17247
17250
|
actions = [],
|
|
@@ -17273,6 +17276,10 @@ function FieldForm({
|
|
|
17273
17276
|
onSave();
|
|
17274
17277
|
return;
|
|
17275
17278
|
}
|
|
17279
|
+
if (input === "k" && onSkip) {
|
|
17280
|
+
onSkip();
|
|
17281
|
+
return;
|
|
17282
|
+
}
|
|
17276
17283
|
if (isClearKey(input, key) && currentField) {
|
|
17277
17284
|
onChange(currentField.key, "");
|
|
17278
17285
|
return;
|
|
@@ -17294,6 +17301,21 @@ function FieldForm({
|
|
|
17294
17301
|
}
|
|
17295
17302
|
}
|
|
17296
17303
|
});
|
|
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
|
+
};
|
|
17297
17319
|
const pointer = (isActive) => /* @__PURE__ */ jsx14(Text13, { color: isActive ? PALETTE.accent : void 0, children: isActive ? "\u276F" : " " });
|
|
17298
17320
|
return /* @__PURE__ */ jsxs13(Box13, { flexDirection: "column", children: [
|
|
17299
17321
|
header,
|
|
@@ -17315,7 +17337,7 @@ function FieldForm({
|
|
|
17315
17337
|
{
|
|
17316
17338
|
value,
|
|
17317
17339
|
onChange: (next) => onChange(field.key, next),
|
|
17318
|
-
onSubmit:
|
|
17340
|
+
onSubmit: submitField,
|
|
17319
17341
|
mask: field.masked ? "\u2022" : void 0
|
|
17320
17342
|
}
|
|
17321
17343
|
) : display ? /* @__PURE__ */ jsx14(Text13, { bold: true, children: display }) : (
|
|
@@ -17351,7 +17373,7 @@ function FieldForm({
|
|
|
17351
17373
|
hints: editing ? [
|
|
17352
17374
|
{ keys: "type", label: "edit" },
|
|
17353
17375
|
{ keys: "\u2190/\u2192", label: "move cursor" },
|
|
17354
|
-
{ keys: "\u23CE", label: "done" },
|
|
17376
|
+
{ keys: "\u23CE", label: enterAdvances ? isLastField ? saveLabel : "next" : "done" },
|
|
17355
17377
|
{ keys: "Ctrl+D", label: "clear" },
|
|
17356
17378
|
{ keys: "Esc", label: "cancel edit" }
|
|
17357
17379
|
] : [
|
|
@@ -17359,6 +17381,7 @@ function FieldForm({
|
|
|
17359
17381
|
{ keys: "\u23CE", label: currentAction ? currentAction.hint : "edit" },
|
|
17360
17382
|
...currentField ? [{ keys: "Ctrl+D", label: "clear" }] : [],
|
|
17361
17383
|
{ keys: "s", label: saveLabel },
|
|
17384
|
+
...onSkip ? [{ keys: "k", label: skipLabel2 }] : [],
|
|
17362
17385
|
{ keys: "Esc/q", label: quitLabel }
|
|
17363
17386
|
]
|
|
17364
17387
|
}
|
|
@@ -17473,24 +17496,11 @@ function CredentialsScreen({
|
|
|
17473
17496
|
setValues((current) => ({ ...current, [key]: value }));
|
|
17474
17497
|
setNotice(null);
|
|
17475
17498
|
},
|
|
17476
|
-
|
|
17477
|
-
{
|
|
17478
|
-
label: "Continue",
|
|
17479
|
-
description: "Check the credentials and go on",
|
|
17480
|
-
runningText: "Validating credentials...",
|
|
17481
|
-
running: validating,
|
|
17482
|
-
hint: "continue",
|
|
17483
|
-
onRun: () => void submit()
|
|
17484
|
-
},
|
|
17485
|
-
{
|
|
17486
|
-
label: "Skip",
|
|
17487
|
-
description: "Save files only, nothing is pushed",
|
|
17488
|
-
hint: "skip",
|
|
17489
|
-
onRun: () => onDone({ skipped: true })
|
|
17490
|
-
}
|
|
17491
|
-
],
|
|
17499
|
+
enterAdvances: true,
|
|
17492
17500
|
onSave: () => void submit(),
|
|
17493
17501
|
saveLabel: "continue",
|
|
17502
|
+
onSkip: () => onDone({ skipped: true }),
|
|
17503
|
+
skipLabel: "skip, save files only",
|
|
17494
17504
|
onQuit: onBack,
|
|
17495
17505
|
quitLabel: "back",
|
|
17496
17506
|
notice,
|
|
@@ -17501,6 +17511,10 @@ function CredentialsScreen({
|
|
|
17501
17511
|
/* @__PURE__ */ jsx15(Text14, { color: PALETTE.muted, children: credentialsPurpose(tokensOnly) }),
|
|
17502
17512
|
/* @__PURE__ */ jsx15(Text14, { color: PALETTE.muted, children: "Tip: save these under Settings \u2192 Configuration so they pre-fill here." })
|
|
17503
17513
|
] }),
|
|
17514
|
+
validating && /* @__PURE__ */ jsxs14(Fragment2, { children: [
|
|
17515
|
+
/* @__PURE__ */ jsx15(Text14, { children: " " }),
|
|
17516
|
+
/* @__PURE__ */ jsx15(Text14, { color: PALETTE.accent, children: "Validating credentials..." })
|
|
17517
|
+
] }),
|
|
17504
17518
|
!validating && !notice && !isUnchanged(normalize(values), initialValues) && /* @__PURE__ */ jsxs14(Fragment2, { children: [
|
|
17505
17519
|
/* @__PURE__ */ jsx15(Text14, { children: " " }),
|
|
17506
17520
|
/* @__PURE__ */ jsx15(Text14, { color: PALETTE.muted, children: "Changed values are saved after they validate." })
|
|
@@ -29306,6 +29320,7 @@ function ProjectScreen({ onDone }) {
|
|
|
29306
29320
|
setNotice(null);
|
|
29307
29321
|
visit.trail.record(`edited ${key}`);
|
|
29308
29322
|
},
|
|
29323
|
+
enterAdvances: true,
|
|
29309
29324
|
onSave: save,
|
|
29310
29325
|
onQuit: quit,
|
|
29311
29326
|
notice,
|
package/dist/index.js
CHANGED
|
@@ -19569,6 +19569,9 @@ function FieldForm({
|
|
|
19569
19569
|
onChange,
|
|
19570
19570
|
onSave,
|
|
19571
19571
|
saveLabel = "save",
|
|
19572
|
+
enterAdvances = false,
|
|
19573
|
+
onSkip,
|
|
19574
|
+
skipLabel: skipLabel2 = "skip",
|
|
19572
19575
|
onQuit,
|
|
19573
19576
|
quitLabel = "back without saving",
|
|
19574
19577
|
actions = [],
|
|
@@ -19600,6 +19603,10 @@ function FieldForm({
|
|
|
19600
19603
|
onSave();
|
|
19601
19604
|
return;
|
|
19602
19605
|
}
|
|
19606
|
+
if (input === "k" && onSkip) {
|
|
19607
|
+
onSkip();
|
|
19608
|
+
return;
|
|
19609
|
+
}
|
|
19603
19610
|
if (isClearKey(input, key) && currentField) {
|
|
19604
19611
|
onChange(currentField.key, "");
|
|
19605
19612
|
return;
|
|
@@ -19621,6 +19628,21 @@ function FieldForm({
|
|
|
19621
19628
|
}
|
|
19622
19629
|
}
|
|
19623
19630
|
});
|
|
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
|
+
};
|
|
19624
19646
|
const pointer = (isActive) => /* @__PURE__ */ jsx14(Text13, { color: isActive ? PALETTE.accent : void 0, children: isActive ? "\u276F" : " " });
|
|
19625
19647
|
return /* @__PURE__ */ jsxs13(Box13, { flexDirection: "column", children: [
|
|
19626
19648
|
header,
|
|
@@ -19642,7 +19664,7 @@ function FieldForm({
|
|
|
19642
19664
|
{
|
|
19643
19665
|
value,
|
|
19644
19666
|
onChange: (next) => onChange(field.key, next),
|
|
19645
|
-
onSubmit:
|
|
19667
|
+
onSubmit: submitField,
|
|
19646
19668
|
mask: field.masked ? "\u2022" : void 0
|
|
19647
19669
|
}
|
|
19648
19670
|
) : display ? /* @__PURE__ */ jsx14(Text13, { bold: true, children: display }) : (
|
|
@@ -19678,7 +19700,7 @@ function FieldForm({
|
|
|
19678
19700
|
hints: editing ? [
|
|
19679
19701
|
{ keys: "type", label: "edit" },
|
|
19680
19702
|
{ keys: "\u2190/\u2192", label: "move cursor" },
|
|
19681
|
-
{ keys: "\u23CE", label: "done" },
|
|
19703
|
+
{ keys: "\u23CE", label: enterAdvances ? isLastField ? saveLabel : "next" : "done" },
|
|
19682
19704
|
{ keys: "Ctrl+D", label: "clear" },
|
|
19683
19705
|
{ keys: "Esc", label: "cancel edit" }
|
|
19684
19706
|
] : [
|
|
@@ -19686,6 +19708,7 @@ function FieldForm({
|
|
|
19686
19708
|
{ keys: "\u23CE", label: currentAction ? currentAction.hint : "edit" },
|
|
19687
19709
|
...currentField ? [{ keys: "Ctrl+D", label: "clear" }] : [],
|
|
19688
19710
|
{ keys: "s", label: saveLabel },
|
|
19711
|
+
...onSkip ? [{ keys: "k", label: skipLabel2 }] : [],
|
|
19689
19712
|
{ keys: "Esc/q", label: quitLabel }
|
|
19690
19713
|
]
|
|
19691
19714
|
}
|
|
@@ -19824,24 +19847,11 @@ function CredentialsScreen({
|
|
|
19824
19847
|
setValues((current) => ({ ...current, [key]: value }));
|
|
19825
19848
|
setNotice(null);
|
|
19826
19849
|
},
|
|
19827
|
-
|
|
19828
|
-
{
|
|
19829
|
-
label: "Continue",
|
|
19830
|
-
description: "Check the credentials and go on",
|
|
19831
|
-
runningText: "Validating credentials...",
|
|
19832
|
-
running: validating,
|
|
19833
|
-
hint: "continue",
|
|
19834
|
-
onRun: () => void submit()
|
|
19835
|
-
},
|
|
19836
|
-
{
|
|
19837
|
-
label: "Skip",
|
|
19838
|
-
description: "Save files only, nothing is pushed",
|
|
19839
|
-
hint: "skip",
|
|
19840
|
-
onRun: () => onDone({ skipped: true })
|
|
19841
|
-
}
|
|
19842
|
-
],
|
|
19850
|
+
enterAdvances: true,
|
|
19843
19851
|
onSave: () => void submit(),
|
|
19844
19852
|
saveLabel: "continue",
|
|
19853
|
+
onSkip: () => onDone({ skipped: true }),
|
|
19854
|
+
skipLabel: "skip, save files only",
|
|
19845
19855
|
onQuit: onBack,
|
|
19846
19856
|
quitLabel: "back",
|
|
19847
19857
|
notice,
|
|
@@ -19852,6 +19862,10 @@ function CredentialsScreen({
|
|
|
19852
19862
|
/* @__PURE__ */ jsx15(Text14, { color: PALETTE.muted, children: credentialsPurpose(tokensOnly) }),
|
|
19853
19863
|
/* @__PURE__ */ jsx15(Text14, { color: PALETTE.muted, children: "Tip: save these under Settings \u2192 Configuration so they pre-fill here." })
|
|
19854
19864
|
] }),
|
|
19865
|
+
validating && /* @__PURE__ */ jsxs14(Fragment2, { children: [
|
|
19866
|
+
/* @__PURE__ */ jsx15(Text14, { children: " " }),
|
|
19867
|
+
/* @__PURE__ */ jsx15(Text14, { color: PALETTE.accent, children: "Validating credentials..." })
|
|
19868
|
+
] }),
|
|
19855
19869
|
!validating && !notice && !isUnchanged(normalize(values), initialValues) && /* @__PURE__ */ jsxs14(Fragment2, { children: [
|
|
19856
19870
|
/* @__PURE__ */ jsx15(Text14, { children: " " }),
|
|
19857
19871
|
/* @__PURE__ */ jsx15(Text14, { color: PALETTE.muted, children: "Changed values are saved after they validate." })
|
|
@@ -32909,6 +32923,7 @@ function ProjectScreen({ onDone }) {
|
|
|
32909
32923
|
setNotice(null);
|
|
32910
32924
|
visit.trail.record(`edited ${key}`);
|
|
32911
32925
|
},
|
|
32926
|
+
enterAdvances: true,
|
|
32912
32927
|
onSave: save,
|
|
32913
32928
|
onQuit: quit,
|
|
32914
32929
|
notice,
|
package/dist/package.json
CHANGED
|
@@ -33,8 +33,10 @@ 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. */
|
|
37
36
|
saveLabel?: string;
|
|
37
|
+
enterAdvances?: boolean;
|
|
38
|
+
onSkip?: () => void;
|
|
39
|
+
skipLabel?: string;
|
|
38
40
|
/** Leaves without saving. */
|
|
39
41
|
onQuit: () => void;
|
|
40
42
|
/** What Esc does, in the control hints. */
|
|
@@ -65,5 +67,5 @@ export declare function FormReadOnlyRow({ label, labelWidth, children, }: {
|
|
|
65
67
|
* 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.
|
|
66
68
|
* Actions sit after the fields and take the same cursor: Enter runs one, and `c` does nothing on it.
|
|
67
69
|
*/
|
|
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;
|
|
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;
|
|
69
71
|
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-a6ef2d40.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-a6ef2d40.0",
|
|
49
|
+
"@contentful/experience-design-system-types": "2.37.1-dev-build-a6ef2d40.0"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@tsconfig/node24": "^24.0.4",
|