@contentful/experience-design-system-cli 2.27.1-dev-build-c0edf3e.0 → 2.27.1-dev-build-7cd07de.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/package.json
CHANGED
package/dist/src/index.js
CHANGED
|
@@ -21758,6 +21758,14 @@ function PropRow({
|
|
|
21758
21758
|
activeField === "category" && /* @__PURE__ */ jsx44(Picker, { value: prop.category, active: true }),
|
|
21759
21759
|
/* @__PURE__ */ jsx44(Text43, { dimColor: !selected, children: "req:" }),
|
|
21760
21760
|
activeField === "required" ? /* @__PURE__ */ jsx44(Toggle, { value: prop.required, active: true }) : /* @__PURE__ */ jsx44(Toggle, { value: prop.required, active: false }),
|
|
21761
|
+
prop.type === "enum" && /* @__PURE__ */ jsxs43(Fragment12, { children: [
|
|
21762
|
+
/* @__PURE__ */ jsx44(Text43, { dimColor: !selected, children: "values:" }),
|
|
21763
|
+
/* @__PURE__ */ jsxs43(Text43, { color: selected ? PALETTE.warning : PALETTE.inverse, children: [
|
|
21764
|
+
"[",
|
|
21765
|
+
prop.values.join(", "),
|
|
21766
|
+
"]"
|
|
21767
|
+
] })
|
|
21768
|
+
] }),
|
|
21761
21769
|
prop.type === "token" && /* @__PURE__ */ jsxs43(Fragment12, { children: [
|
|
21762
21770
|
/* @__PURE__ */ jsx44(Text43, { dimColor: !selected, children: "kind:" }),
|
|
21763
21771
|
activeField === "tokenKind" ? /* @__PURE__ */ jsx44(Picker, { value: prop.tokenKind || DESIGN_TOKEN_TYPES2[0], active: true }) : /* @__PURE__ */ jsx44(Text43, { color: selected ? PALETTE.success : PALETTE.inverse, children: prop.tokenKind || "\u2014" })
|
|
@@ -21789,7 +21797,7 @@ function PropRow({
|
|
|
21789
21797
|
const text = `~ ${rationale}`;
|
|
21790
21798
|
return text.length > max ? text.slice(0, max - 1) + "\u2026" : text;
|
|
21791
21799
|
})() }) }, rowKey ? `rationale-${rowKey}` : void 0),
|
|
21792
|
-
selected && prop.type === "enum" && /* @__PURE__ */ jsxs43(Box41, { paddingLeft: 2, flexDirection: "column", children: [
|
|
21800
|
+
selected && prop.type === "enum" && activeField === "values" && /* @__PURE__ */ jsxs43(Box41, { paddingLeft: 2, flexDirection: "column", children: [
|
|
21793
21801
|
/* @__PURE__ */ jsxs43(Box41, { children: [
|
|
21794
21802
|
/* @__PURE__ */ jsx44(Text43, { dimColor: true, children: "values:" }),
|
|
21795
21803
|
activeField === "values" && /* @__PURE__ */ jsx44(Text43, { dimColor: true, children: " [a]dd [e]dit [r]emove [\u2191\u2193] navigate [K/J] reorder" })
|
|
@@ -22013,31 +22021,40 @@ function FieldEditor({
|
|
|
22013
22021
|
const [editorState, setEditorState] = useState23(initialState);
|
|
22014
22022
|
const [parseErr] = useState23(parseError);
|
|
22015
22023
|
const initialFocus = (() => {
|
|
22016
|
-
if (initialFocusTarget) {
|
|
22017
|
-
|
|
22018
|
-
|
|
22019
|
-
|
|
22020
|
-
|
|
22021
|
-
|
|
22022
|
-
|
|
22023
|
-
|
|
22024
|
-
|
|
22025
|
-
|
|
22026
|
-
|
|
22027
|
-
|
|
22028
|
-
|
|
22029
|
-
|
|
22030
|
-
|
|
22031
|
-
|
|
22032
|
-
|
|
22033
|
-
|
|
22034
|
-
|
|
22035
|
-
|
|
22036
|
-
|
|
22037
|
-
|
|
22038
|
-
|
|
22039
|
-
|
|
22040
|
-
|
|
22024
|
+
if (initialFocusTarget?.kind === "description") {
|
|
22025
|
+
return {
|
|
22026
|
+
focusLevel: "componentDescription",
|
|
22027
|
+
inSlots: false,
|
|
22028
|
+
propIdx: 0,
|
|
22029
|
+
slotIdx: 0,
|
|
22030
|
+
activeField: null,
|
|
22031
|
+
textCursor: 0
|
|
22032
|
+
};
|
|
22033
|
+
}
|
|
22034
|
+
if (initialFocusTarget?.kind === "prop") {
|
|
22035
|
+
const idx = initialState.props.findIndex((p) => p.name === initialFocusTarget.name);
|
|
22036
|
+
if (idx >= 0) {
|
|
22037
|
+
return {
|
|
22038
|
+
focusLevel: "prop",
|
|
22039
|
+
inSlots: false,
|
|
22040
|
+
propIdx: idx,
|
|
22041
|
+
slotIdx: 0,
|
|
22042
|
+
activeField: null,
|
|
22043
|
+
textCursor: 0
|
|
22044
|
+
};
|
|
22045
|
+
}
|
|
22046
|
+
}
|
|
22047
|
+
if (initialFocusTarget?.kind === "slot") {
|
|
22048
|
+
const idx = initialState.slots.findIndex((s) => s.name === initialFocusTarget.name);
|
|
22049
|
+
if (idx >= 0) {
|
|
22050
|
+
return {
|
|
22051
|
+
focusLevel: "slot",
|
|
22052
|
+
inSlots: true,
|
|
22053
|
+
propIdx: 0,
|
|
22054
|
+
slotIdx: idx,
|
|
22055
|
+
activeField: null,
|
|
22056
|
+
textCursor: 0
|
|
22057
|
+
};
|
|
22041
22058
|
}
|
|
22042
22059
|
}
|
|
22043
22060
|
if (initialState.props.length > 0) {
|
|
@@ -22073,7 +22090,7 @@ function FieldEditor({
|
|
|
22073
22090
|
const [propIdx, setPropIdx] = useState23(initialFocus.propIdx);
|
|
22074
22091
|
const [slotIdx, setSlotIdx] = useState23(initialFocus.slotIdx);
|
|
22075
22092
|
const [inSlots, setInSlots] = useState23(initialFocus.inSlots);
|
|
22076
|
-
const [inComponentDesc, setInComponentDesc] = useState23(
|
|
22093
|
+
const [inComponentDesc, setInComponentDesc] = useState23(initialFocus.focusLevel === "componentDescription");
|
|
22077
22094
|
const [activeField, setActiveField] = useState23(initialFocus.activeField);
|
|
22078
22095
|
const [textCursor, setTextCursor] = useState23(initialFocus.textCursor);
|
|
22079
22096
|
const [valueCursor, setValueCursor] = useState23(0);
|
|
@@ -22766,26 +22783,17 @@ function FieldEditor({
|
|
|
22766
22783
|
borderStyle: "single",
|
|
22767
22784
|
borderColor: hasEmptyProperties ? PALETTE.warning : PALETTE.info,
|
|
22768
22785
|
children: [
|
|
22769
|
-
/* @__PURE__ */ jsx44(Text43, { bold: true, color: hasEmptyProperties ? PALETTE.warning : PALETTE.info, children: "FIELDS [Ctrl+S save \xB7 Esc discard]" }),
|
|
22770
22786
|
hasEmptyProperties && /* @__PURE__ */ jsx44(Text43, { color: PALETTE.warning, children: "\u26A0 No properties classified for this component. The LLM didn't find anything to classify. Reject this component or add fields manually." }),
|
|
22771
22787
|
/* @__PURE__ */ jsx44(Box41, { flexDirection: "column", width: innerWidth, children: visibleRowSlice.map((row, i) => {
|
|
22772
22788
|
if (row.kind === "header") {
|
|
22773
|
-
return /* @__PURE__ */ jsx44(
|
|
22774
|
-
Text43,
|
|
22775
|
-
{
|
|
22776
|
-
bold: true,
|
|
22777
|
-
color: row.section === "slots" ? PALETTE.info : row.section === "hidden" ? PALETTE.warning : PALETTE.success,
|
|
22778
|
-
children: row.label
|
|
22779
|
-
},
|
|
22780
|
-
`header-${i}`
|
|
22781
|
-
);
|
|
22789
|
+
return /* @__PURE__ */ jsx44(Text43, { bold: true, color: PALETTE.success, children: row.label }, `header-${i}`);
|
|
22782
22790
|
}
|
|
22783
22791
|
if (row.kind === "component-description") {
|
|
22784
22792
|
const isSelected2 = inComponentDesc;
|
|
22785
22793
|
const isEditing = isSelected2 && focusLevel === "field" && activeField === "description";
|
|
22786
22794
|
const desc = editorState.componentDescription;
|
|
22787
|
-
return /* @__PURE__ */
|
|
22788
|
-
/* @__PURE__ */ jsx44(
|
|
22795
|
+
return /* @__PURE__ */ jsx44(Box41, { flexDirection: "column", children: /* @__PURE__ */ jsxs43(Box41, { gap: 1, children: [
|
|
22796
|
+
/* @__PURE__ */ jsx44(
|
|
22789
22797
|
Text43,
|
|
22790
22798
|
{
|
|
22791
22799
|
color: isSelected2 ? PALETTE.inverse : PALETTE.info,
|
|
@@ -22793,13 +22801,13 @@ function FieldEditor({
|
|
|
22793
22801
|
backgroundColor: isSelected2 ? "blue" : void 0,
|
|
22794
22802
|
children: " description: "
|
|
22795
22803
|
}
|
|
22796
|
-
)
|
|
22797
|
-
isEditing ? /* @__PURE__ */
|
|
22804
|
+
),
|
|
22805
|
+
isEditing ? /* @__PURE__ */ jsxs43(Box41, { flexGrow: 1, borderStyle: "round", borderColor: PALETTE.info, paddingX: 1, children: [
|
|
22798
22806
|
/* @__PURE__ */ jsx44(Text43, { children: desc.slice(0, textCursor) }),
|
|
22799
22807
|
/* @__PURE__ */ jsx44(Text43, { inverse: cursorVisible, children: desc[textCursor] ?? (cursorVisible ? "\u2588" : " ") }),
|
|
22800
22808
|
/* @__PURE__ */ jsx44(Text43, { children: desc.slice(textCursor + 1) })
|
|
22801
|
-
] })
|
|
22802
|
-
] }, `component-description-${i}`);
|
|
22809
|
+
] }) : /* @__PURE__ */ jsx44(Text43, { color: isSelected2 ? PALETTE.warning : PALETTE.inverse, dimColor: !desc, children: desc || "(none \u2014 Return to edit)" })
|
|
22810
|
+
] }) }, `component-description-${i}`);
|
|
22803
22811
|
}
|
|
22804
22812
|
if (row.kind === "prop") {
|
|
22805
22813
|
const p = props[row.idx];
|
|
@@ -25303,7 +25311,7 @@ function GenerateReviewStep({
|
|
|
25303
25311
|
currentComponentName: selected.key,
|
|
25304
25312
|
onDirtyChange: setEditorDirty,
|
|
25305
25313
|
discardTrigger,
|
|
25306
|
-
initialFocusTarget: pendingEditorFocus && pendingEditorFocus.componentName === selected.key ? pendingEditorFocus.target :
|
|
25314
|
+
initialFocusTarget: pendingEditorFocus && pendingEditorFocus.componentName === selected.key ? pendingEditorFocus.target : { kind: "description" }
|
|
25307
25315
|
},
|
|
25308
25316
|
pendingEditorFocus && pendingEditorFocus.componentName === selected.key ? `${selected.key}::${pendingEditorFocus.target.kind}:${pendingEditorFocus.target.name}` : selected.key
|
|
25309
25317
|
),
|
|
@@ -26206,7 +26214,8 @@ function AtomicGenerateReviewStep({
|
|
|
26206
26214
|
setPanelOpen("source");
|
|
26207
26215
|
setPanelScrollOffset(() => 0);
|
|
26208
26216
|
},
|
|
26209
|
-
onTextEntryActiveChange: setTextEntryActive
|
|
26217
|
+
onTextEntryActiveChange: setTextEntryActive,
|
|
26218
|
+
initialFocusTarget: { kind: "description" }
|
|
26210
26219
|
},
|
|
26211
26220
|
selected.key
|
|
26212
26221
|
),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentful/experience-design-system-cli",
|
|
3
|
-
"version": "2.27.1-dev-build-
|
|
3
|
+
"version": "2.27.1-dev-build-7cd07de.0",
|
|
4
4
|
"description": "Contentful Experiences design system import CLI",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"svelte": "^5.56.4",
|
|
40
40
|
"ts-morph": "^27.0.2",
|
|
41
41
|
"typescript": "^5.9.3",
|
|
42
|
-
"@contentful/experience-design-system-types": "2.27.1-dev-build-
|
|
42
|
+
"@contentful/experience-design-system-types": "2.27.1-dev-build-7cd07de.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@tsconfig/node24": "^24.0.4",
|
|
@@ -51,9 +51,9 @@
|
|
|
51
51
|
"ink-testing-library": "^4.0.0",
|
|
52
52
|
"typescript-eslint": "^8.67.0",
|
|
53
53
|
"vitest": "^4.0.16",
|
|
54
|
-
"@contentful/experience-design-system-client": "2.27.1-dev-build-
|
|
55
|
-
"@contentful/experience-design-system-
|
|
56
|
-
"@contentful/experience-design-system-
|
|
54
|
+
"@contentful/experience-design-system-client": "2.27.1-dev-build-7cd07de.0",
|
|
55
|
+
"@contentful/experience-design-system-generation": "2.27.1-dev-build-7cd07de.0",
|
|
56
|
+
"@contentful/experience-design-system-extraction": "2.27.1-dev-build-7cd07de.0"
|
|
57
57
|
},
|
|
58
58
|
"repository": {
|
|
59
59
|
"type": "git",
|