@contentful/experience-design-system-cli 2.38.1-dev-build-dda16770.0 → 2.39.1-dev-build-61afabf3.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 -45
- package/dist/index.js +33 -45
- package/dist/package.json +1 -1
- package/dist/src/tui/import/steps/09-review/components/ReviewComponentPanel.d.ts +4 -1
- package/dist/src/tui/import/steps/09-review/components/TokenReviewPanel.d.ts +0 -1
- package/dist/src/tui/import/steps/09-review/types.d.ts +0 -1
- package/package.json +3 -3
package/dist/app.js
CHANGED
|
@@ -19198,7 +19198,6 @@ function GotoBanner({
|
|
|
19198
19198
|
borderStyle: "single",
|
|
19199
19199
|
borderColor: PALETTE.accent,
|
|
19200
19200
|
paddingX: 1,
|
|
19201
|
-
paddingBottom: 1,
|
|
19202
19201
|
marginTop: width === void 0 ? 1 : 0,
|
|
19203
19202
|
width,
|
|
19204
19203
|
flexShrink: 0,
|
|
@@ -19210,7 +19209,7 @@ function GotoBanner({
|
|
|
19210
19209
|
return renderRow(row, i, i === highlightIndex);
|
|
19211
19210
|
}),
|
|
19212
19211
|
moreBelow > 0 && /* @__PURE__ */ jsx24(Text21, { color: PALETTE.muted, children: ` \u25BC ${moreBelow} more` }),
|
|
19213
|
-
footerHint !== void 0 && /* @__PURE__ */ jsx24(
|
|
19212
|
+
footerHint !== void 0 && /* @__PURE__ */ jsx24(Text21, { color: PALETTE.muted, children: footerHint })
|
|
19214
19213
|
]
|
|
19215
19214
|
}
|
|
19216
19215
|
);
|
|
@@ -21715,7 +21714,7 @@ var capitalize = (name) => name.charAt(0).toUpperCase() + name.slice(1);
|
|
|
21715
21714
|
function describeGeneration(input) {
|
|
21716
21715
|
const agent = capitalize(input.agent);
|
|
21717
21716
|
return `${formatAcceptanceSummary({ accepted: input.acceptedCount, autoRejected: 0 })}
|
|
21718
|
-
${agent} is reading each selected component and writing a Contentful component definition for it
|
|
21717
|
+
${agent} is reading each selected component and writing a Contentful component definition for it${input.hasTokens ? " Using your design tokens for prop resolution." : ""}`;
|
|
21719
21718
|
}
|
|
21720
21719
|
function progressRows2(progress, agent) {
|
|
21721
21720
|
const name = capitalize(agent);
|
|
@@ -24026,7 +24025,7 @@ function FieldEditor({
|
|
|
24026
24025
|
if (rationaleOpen) {
|
|
24027
24026
|
return "[\u2191\u2193] scroll [i/Esc] close rationale panel";
|
|
24028
24027
|
}
|
|
24029
|
-
return `[\u2191\u2193] navigate [Enter] edit fields [
|
|
24028
|
+
return `[\u2191\u2193] navigate rows [Enter] edit fields [s] source [${propRationaleKey}] prop rationale [${componentRationaleKey}] component rationale [h] help [Esc] exit panel`;
|
|
24030
24029
|
})();
|
|
24031
24030
|
const rows = [];
|
|
24032
24031
|
rows.push({ kind: "component-description" });
|
|
@@ -24654,8 +24653,8 @@ function TokenReviewPanel({
|
|
|
24654
24653
|
borderStyle: "single",
|
|
24655
24654
|
borderColor: active ? PALETTE.text : void 0,
|
|
24656
24655
|
children: [
|
|
24657
|
-
/* @__PURE__ */ jsx39(Text32, { bold: true, color: active ? void 0 : PALETTE.muted, wrap: "truncate", children: `
|
|
24658
|
-
/* @__PURE__ */ jsx39(Text32, { color: PALETTE.muted, wrap: "truncate", children: `
|
|
24656
|
+
/* @__PURE__ */ jsx39(Text32, { bold: true, color: active ? void 0 : PALETTE.muted, wrap: "truncate", children: `TOKEN REVIEW \u2014 ${componentName} \xB7 ${current.propName} (edit allowed)` }),
|
|
24657
|
+
/* @__PURE__ */ jsx39(Text32, { color: PALETTE.muted, wrap: "truncate", children: `select which tokens are allowed (${rangeLabel})` }),
|
|
24659
24658
|
/* @__PURE__ */ jsx39(Text32, { children: " " }),
|
|
24660
24659
|
current.paths.length === 0 && /* @__PURE__ */ jsx39(Text32, { color: PALETTE.muted, children: "(no compatible tokens found for this token kind)" }),
|
|
24661
24660
|
visiblePaths.map((path5, i) => {
|
|
@@ -24688,33 +24687,18 @@ function TokenReviewPanel({
|
|
|
24688
24687
|
borderStyle: "single",
|
|
24689
24688
|
borderColor: active ? PALETTE.text : void 0,
|
|
24690
24689
|
children: [
|
|
24691
|
-
/* @__PURE__ */ jsx39(Text32, { bold: true, color: active ? void 0 : PALETTE.muted, children: `
|
|
24692
|
-
/* @__PURE__ */ jsx39(Text32, { color: PALETTE.muted, wrap: "truncate", children: `${componentName} has ${suggestions.length} design ${suggestions.length === 1 ? "prop" : "props"} of type token. Select which tokens are allowed for each property.` }),
|
|
24693
|
-
/* @__PURE__ */ jsx39(Text32, { color: PALETTE.muted, wrap: "truncate", children: "Suggested tokens come from the agent. Allowed tokens are what editors can pick in Contentful." }),
|
|
24694
|
-
/* @__PURE__ */ jsx39(Text32, { children: " " }),
|
|
24690
|
+
/* @__PURE__ */ jsx39(Text32, { bold: true, color: active ? void 0 : PALETTE.muted, children: `TOKEN REVIEW \u2014 ${componentName}` }),
|
|
24695
24691
|
suggestions.length === 0 && /* @__PURE__ */ jsx39(Text32, { color: PALETTE.muted, children: "(no token suggestions for this component)" }),
|
|
24696
24692
|
suggestions.map((s, i) => {
|
|
24697
24693
|
const focused = i === selectedRow;
|
|
24698
24694
|
return /* @__PURE__ */ jsxs30(Box31, { flexDirection: "column", children: [
|
|
24699
|
-
/* @__PURE__ */ jsx39(Box31, { children: /* @__PURE__ */ jsx39(Text32, { color: focused ? PALETTE.accent : active ? void 0 : PALETTE.muted, bold: focused, children: `${focused ? figures7.pointer : " "} ${s.propName}
|
|
24700
|
-
/* @__PURE__ */ jsx39(
|
|
24701
|
-
|
|
24702
|
-
{
|
|
24703
|
-
color: PALETTE.muted,
|
|
24704
|
-
children: ` suggested: ${s.suggested.length > 0 ? s.suggested.join(", ") : "none"}`
|
|
24705
|
-
}
|
|
24706
|
-
),
|
|
24707
|
-
/* @__PURE__ */ jsx39(
|
|
24708
|
-
Text32,
|
|
24709
|
-
{
|
|
24710
|
-
color: PALETTE.muted,
|
|
24711
|
-
children: ` allowed: ${s.allowed.length > 0 ? s.allowed.join(", ") : "none (any token)"}`
|
|
24712
|
-
}
|
|
24713
|
-
),
|
|
24714
|
-
/* @__PURE__ */ jsx39(Text32, { children: " " })
|
|
24695
|
+
/* @__PURE__ */ jsx39(Box31, { children: /* @__PURE__ */ jsx39(Text32, { color: focused ? PALETTE.accent : active ? void 0 : PALETTE.muted, bold: focused, children: `${focused ? figures7.pointer : " "} ${s.propName}` }) }),
|
|
24696
|
+
/* @__PURE__ */ jsx39(Text32, { color: PALETTE.muted, children: ` suggested: ${s.suggested.join(", ")}` }),
|
|
24697
|
+
/* @__PURE__ */ jsx39(Text32, { color: PALETTE.muted, children: ` allowed: ${s.allowed.join(", ")}` })
|
|
24715
24698
|
] }, s.propName);
|
|
24716
24699
|
}),
|
|
24717
|
-
/* @__PURE__ */ jsx39(Text32, {
|
|
24700
|
+
/* @__PURE__ */ jsx39(Text32, { children: " " }),
|
|
24701
|
+
/* @__PURE__ */ jsx39(Text32, { children: "[\u2191/\u2193] move [Enter] edit allowed [Esc] close" })
|
|
24718
24702
|
]
|
|
24719
24703
|
}
|
|
24720
24704
|
);
|
|
@@ -24962,9 +24946,15 @@ function ReviewFinalizeError({
|
|
|
24962
24946
|
function ReviewPanelFooter({
|
|
24963
24947
|
reviewEditor,
|
|
24964
24948
|
sidebarFocused,
|
|
24965
|
-
sidebarFooter
|
|
24949
|
+
sidebarFooter,
|
|
24950
|
+
livePreview,
|
|
24951
|
+
livePreviewSpinner
|
|
24966
24952
|
}) {
|
|
24967
|
-
return /* @__PURE__ */
|
|
24953
|
+
return /* @__PURE__ */ jsxs32(Fragment10, { children: [
|
|
24954
|
+
reviewEditor.panelOpen === "token-review" ? " [\u2191/\u2193] move [Enter] edit allowed [Esc] close" : sidebarFocused ? sidebarFooter : reviewEditor.showJson ? " [\u2191\u2193] scroll [Ctrl+u/d] half-page [gg/G] top/bottom [Tab] focus list" : " [Tab] focus list (edit fields)" + (reviewEditor.currentTokenSuggestions().length > 0 ? " [t] token review" : ""),
|
|
24955
|
+
livePreview.status === "running" && /* @__PURE__ */ jsx42(Text34, { children: ` ${livePreviewSpinner} live preview` }),
|
|
24956
|
+
livePreview.disabled && /* @__PURE__ */ jsx42(Text34, { children: " \xB7 live preview disabled" })
|
|
24957
|
+
] });
|
|
24968
24958
|
}
|
|
24969
24959
|
function ReviewComponentTitle({
|
|
24970
24960
|
selectedKey,
|
|
@@ -24998,7 +24988,9 @@ function ReviewComponentPanel({
|
|
|
24998
24988
|
sidebarFocused,
|
|
24999
24989
|
fieldEditor,
|
|
25000
24990
|
saveError,
|
|
25001
|
-
sidebarFooter
|
|
24991
|
+
sidebarFooter,
|
|
24992
|
+
livePreview,
|
|
24993
|
+
livePreviewSpinner
|
|
25002
24994
|
}) {
|
|
25003
24995
|
const propCount = Object.keys(selectedEntry.$properties).length;
|
|
25004
24996
|
const slotCount = selectedEntry.$slots ? Object.keys(selectedEntry.$slots).length : 0;
|
|
@@ -25035,7 +25027,9 @@ function ReviewComponentPanel({
|
|
|
25035
25027
|
{
|
|
25036
25028
|
reviewEditor,
|
|
25037
25029
|
sidebarFocused,
|
|
25038
|
-
sidebarFooter
|
|
25030
|
+
sidebarFooter,
|
|
25031
|
+
livePreview,
|
|
25032
|
+
livePreviewSpinner
|
|
25039
25033
|
}
|
|
25040
25034
|
) }) })
|
|
25041
25035
|
] }) });
|
|
@@ -25579,7 +25573,7 @@ function collectTokenSuggestions(entry, availableTokens = []) {
|
|
|
25579
25573
|
const compatiblePaths = new Set(compatible);
|
|
25580
25574
|
const allowed = availableTokens.length > 0 ? persistedAllowed.filter((path5) => compatiblePaths.has(path5)) : persistedAllowed;
|
|
25581
25575
|
const paths = availableTokens.length > 0 ? compatible : allowed;
|
|
25582
|
-
return { propName,
|
|
25576
|
+
return { propName, paths, suggested: [...allowed], allowed };
|
|
25583
25577
|
});
|
|
25584
25578
|
}
|
|
25585
25579
|
|
|
@@ -26375,7 +26369,7 @@ var HELP_SECTIONS2 = [
|
|
|
26375
26369
|
{ keys: "P", label: "Component rationale" },
|
|
26376
26370
|
{ keys: "s", label: "Source code snippet" },
|
|
26377
26371
|
{ keys: "J", label: "Toggle JSON" },
|
|
26378
|
-
{ keys: "t", label: "
|
|
26372
|
+
{ keys: "t", label: "Token review" }
|
|
26379
26373
|
]
|
|
26380
26374
|
},
|
|
26381
26375
|
{
|
|
@@ -27523,7 +27517,9 @@ function GenerateReviewStepView({
|
|
|
27523
27517
|
initialFocusTarget: pendingEditorFocus && pendingEditorFocus.componentName === selected.key ? pendingEditorFocus.target : { kind: "description" }
|
|
27524
27518
|
}
|
|
27525
27519
|
),
|
|
27526
|
-
saveError: reviewEditor.saveError
|
|
27520
|
+
saveError: reviewEditor.saveError,
|
|
27521
|
+
livePreview: livePreviewHook,
|
|
27522
|
+
livePreviewSpinner
|
|
27527
27523
|
}
|
|
27528
27524
|
) : /* @__PURE__ */ jsx48(ReviewNoSelection, {})
|
|
27529
27525
|
] }),
|
|
@@ -27555,7 +27551,7 @@ function GenerateReviewStepView({
|
|
|
27555
27551
|
hidden: dialogOpen
|
|
27556
27552
|
}
|
|
27557
27553
|
),
|
|
27558
|
-
!dialogOpen && sidebarFocused &&
|
|
27554
|
+
!dialogOpen && sidebarFocused && /* @__PURE__ */ jsx48(CompactControlBar, { hasGroupRoots, searchActive: searchOpen || searchQuery.length > 0 })
|
|
27559
27555
|
] });
|
|
27560
27556
|
}
|
|
27561
27557
|
|
|
@@ -28045,20 +28041,12 @@ function diffProperty(name, old, newDef) {
|
|
|
28045
28041
|
diffs.push({ key: `${name}-new`, color: PALETTE.success, text: `+ ${name}: ${formatPropDef(newDef)}` });
|
|
28046
28042
|
return diffs;
|
|
28047
28043
|
}
|
|
28048
|
-
function formatDefault(value) {
|
|
28049
|
-
const sys = value?.sys;
|
|
28050
|
-
if (sys?.linkType === "Contentful:DesignToken" && typeof sys.urn === "string") {
|
|
28051
|
-
const name = sys.urn.split("/designTokens/")[1];
|
|
28052
|
-
if (name) return name;
|
|
28053
|
-
}
|
|
28054
|
-
return JSON.stringify(value);
|
|
28055
|
-
}
|
|
28056
28044
|
function formatOldProp(prop) {
|
|
28057
28045
|
const parts = [];
|
|
28058
28046
|
if (prop.type) parts.push(prop.type);
|
|
28059
28047
|
if (prop.category) parts.push(prop.category);
|
|
28060
28048
|
parts.push(prop.required ? "required" : "optional");
|
|
28061
|
-
if (prop.default !== void 0) parts.push(`default=${
|
|
28049
|
+
if (prop.default !== void 0) parts.push(`default=${JSON.stringify(prop.default)}`);
|
|
28062
28050
|
return parts.join(", ");
|
|
28063
28051
|
}
|
|
28064
28052
|
function formatPropDef(def) {
|
|
@@ -28067,7 +28055,7 @@ function formatPropDef(def) {
|
|
|
28067
28055
|
if (def["$category"]) parts.push(def["$category"]);
|
|
28068
28056
|
if (def["$required"] === true) parts.push("required");
|
|
28069
28057
|
else parts.push("optional");
|
|
28070
|
-
if (def["$default"] !== void 0) parts.push(`default=${
|
|
28058
|
+
if (def["$default"] !== void 0) parts.push(`default=${JSON.stringify(def["$default"])}`);
|
|
28071
28059
|
return parts.join(", ");
|
|
28072
28060
|
}
|
|
28073
28061
|
|
package/dist/index.js
CHANGED
|
@@ -21792,7 +21792,6 @@ function GotoBanner({
|
|
|
21792
21792
|
borderStyle: "single",
|
|
21793
21793
|
borderColor: PALETTE.accent,
|
|
21794
21794
|
paddingX: 1,
|
|
21795
|
-
paddingBottom: 1,
|
|
21796
21795
|
marginTop: width === void 0 ? 1 : 0,
|
|
21797
21796
|
width,
|
|
21798
21797
|
flexShrink: 0,
|
|
@@ -21804,7 +21803,7 @@ function GotoBanner({
|
|
|
21804
21803
|
return renderRow(row, i, i === highlightIndex);
|
|
21805
21804
|
}),
|
|
21806
21805
|
moreBelow > 0 && /* @__PURE__ */ jsx24(Text21, { color: PALETTE.muted, children: ` \u25BC ${moreBelow} more` }),
|
|
21807
|
-
footerHint !== void 0 && /* @__PURE__ */ jsx24(
|
|
21806
|
+
footerHint !== void 0 && /* @__PURE__ */ jsx24(Text21, { color: PALETTE.muted, children: footerHint })
|
|
21808
21807
|
]
|
|
21809
21808
|
}
|
|
21810
21809
|
);
|
|
@@ -24536,7 +24535,7 @@ function formatAcceptanceSummary(counts) {
|
|
|
24536
24535
|
function describeGeneration(input) {
|
|
24537
24536
|
const agent = capitalize(input.agent);
|
|
24538
24537
|
return `${formatAcceptanceSummary({ accepted: input.acceptedCount, autoRejected: 0 })}
|
|
24539
|
-
${agent} is reading each selected component and writing a Contentful component definition for it
|
|
24538
|
+
${agent} is reading each selected component and writing a Contentful component definition for it${input.hasTokens ? " Using your design tokens for prop resolution." : ""}`;
|
|
24540
24539
|
}
|
|
24541
24540
|
function progressRows2(progress, agent) {
|
|
24542
24541
|
const name = capitalize(agent);
|
|
@@ -27054,7 +27053,7 @@ function FieldEditor({
|
|
|
27054
27053
|
if (rationaleOpen) {
|
|
27055
27054
|
return "[\u2191\u2193] scroll [i/Esc] close rationale panel";
|
|
27056
27055
|
}
|
|
27057
|
-
return `[\u2191\u2193] navigate [Enter] edit fields [
|
|
27056
|
+
return `[\u2191\u2193] navigate rows [Enter] edit fields [s] source [${propRationaleKey}] prop rationale [${componentRationaleKey}] component rationale [h] help [Esc] exit panel`;
|
|
27058
27057
|
})();
|
|
27059
27058
|
const rows = [];
|
|
27060
27059
|
rows.push({ kind: "component-description" });
|
|
@@ -27736,8 +27735,8 @@ function TokenReviewPanel({
|
|
|
27736
27735
|
borderStyle: "single",
|
|
27737
27736
|
borderColor: active ? PALETTE.text : void 0,
|
|
27738
27737
|
children: [
|
|
27739
|
-
/* @__PURE__ */ jsx39(Text32, { bold: true, color: active ? void 0 : PALETTE.muted, wrap: "truncate", children: `
|
|
27740
|
-
/* @__PURE__ */ jsx39(Text32, { color: PALETTE.muted, wrap: "truncate", children: `
|
|
27738
|
+
/* @__PURE__ */ jsx39(Text32, { bold: true, color: active ? void 0 : PALETTE.muted, wrap: "truncate", children: `TOKEN REVIEW \u2014 ${componentName} \xB7 ${current.propName} (edit allowed)` }),
|
|
27739
|
+
/* @__PURE__ */ jsx39(Text32, { color: PALETTE.muted, wrap: "truncate", children: `select which tokens are allowed (${rangeLabel})` }),
|
|
27741
27740
|
/* @__PURE__ */ jsx39(Text32, { children: " " }),
|
|
27742
27741
|
current.paths.length === 0 && /* @__PURE__ */ jsx39(Text32, { color: PALETTE.muted, children: "(no compatible tokens found for this token kind)" }),
|
|
27743
27742
|
visiblePaths.map((path5, i) => {
|
|
@@ -27770,33 +27769,18 @@ function TokenReviewPanel({
|
|
|
27770
27769
|
borderStyle: "single",
|
|
27771
27770
|
borderColor: active ? PALETTE.text : void 0,
|
|
27772
27771
|
children: [
|
|
27773
|
-
/* @__PURE__ */ jsx39(Text32, { bold: true, color: active ? void 0 : PALETTE.muted, children: `
|
|
27774
|
-
/* @__PURE__ */ jsx39(Text32, { color: PALETTE.muted, wrap: "truncate", children: `${componentName} has ${suggestions.length} design ${suggestions.length === 1 ? "prop" : "props"} of type token. Select which tokens are allowed for each property.` }),
|
|
27775
|
-
/* @__PURE__ */ jsx39(Text32, { color: PALETTE.muted, wrap: "truncate", children: "Suggested tokens come from the agent. Allowed tokens are what editors can pick in Contentful." }),
|
|
27776
|
-
/* @__PURE__ */ jsx39(Text32, { children: " " }),
|
|
27772
|
+
/* @__PURE__ */ jsx39(Text32, { bold: true, color: active ? void 0 : PALETTE.muted, children: `TOKEN REVIEW \u2014 ${componentName}` }),
|
|
27777
27773
|
suggestions.length === 0 && /* @__PURE__ */ jsx39(Text32, { color: PALETTE.muted, children: "(no token suggestions for this component)" }),
|
|
27778
27774
|
suggestions.map((s, i) => {
|
|
27779
27775
|
const focused = i === selectedRow;
|
|
27780
27776
|
return /* @__PURE__ */ jsxs30(Box31, { flexDirection: "column", children: [
|
|
27781
|
-
/* @__PURE__ */ jsx39(Box31, { children: /* @__PURE__ */ jsx39(Text32, { color: focused ? PALETTE.accent : active ? void 0 : PALETTE.muted, bold: focused, children: `${focused ? figures7.pointer : " "} ${s.propName}
|
|
27782
|
-
/* @__PURE__ */ jsx39(
|
|
27783
|
-
|
|
27784
|
-
{
|
|
27785
|
-
color: PALETTE.muted,
|
|
27786
|
-
children: ` suggested: ${s.suggested.length > 0 ? s.suggested.join(", ") : "none"}`
|
|
27787
|
-
}
|
|
27788
|
-
),
|
|
27789
|
-
/* @__PURE__ */ jsx39(
|
|
27790
|
-
Text32,
|
|
27791
|
-
{
|
|
27792
|
-
color: PALETTE.muted,
|
|
27793
|
-
children: ` allowed: ${s.allowed.length > 0 ? s.allowed.join(", ") : "none (any token)"}`
|
|
27794
|
-
}
|
|
27795
|
-
),
|
|
27796
|
-
/* @__PURE__ */ jsx39(Text32, { children: " " })
|
|
27777
|
+
/* @__PURE__ */ jsx39(Box31, { children: /* @__PURE__ */ jsx39(Text32, { color: focused ? PALETTE.accent : active ? void 0 : PALETTE.muted, bold: focused, children: `${focused ? figures7.pointer : " "} ${s.propName}` }) }),
|
|
27778
|
+
/* @__PURE__ */ jsx39(Text32, { color: PALETTE.muted, children: ` suggested: ${s.suggested.join(", ")}` }),
|
|
27779
|
+
/* @__PURE__ */ jsx39(Text32, { color: PALETTE.muted, children: ` allowed: ${s.allowed.join(", ")}` })
|
|
27797
27780
|
] }, s.propName);
|
|
27798
27781
|
}),
|
|
27799
|
-
/* @__PURE__ */ jsx39(Text32, {
|
|
27782
|
+
/* @__PURE__ */ jsx39(Text32, { children: " " }),
|
|
27783
|
+
/* @__PURE__ */ jsx39(Text32, { children: "[\u2191/\u2193] move [Enter] edit allowed [Esc] close" })
|
|
27800
27784
|
]
|
|
27801
27785
|
}
|
|
27802
27786
|
);
|
|
@@ -28070,9 +28054,15 @@ function ReviewFinalizeError({
|
|
|
28070
28054
|
function ReviewPanelFooter({
|
|
28071
28055
|
reviewEditor,
|
|
28072
28056
|
sidebarFocused,
|
|
28073
|
-
sidebarFooter
|
|
28057
|
+
sidebarFooter,
|
|
28058
|
+
livePreview,
|
|
28059
|
+
livePreviewSpinner
|
|
28074
28060
|
}) {
|
|
28075
|
-
return /* @__PURE__ */
|
|
28061
|
+
return /* @__PURE__ */ jsxs32(Fragment10, { children: [
|
|
28062
|
+
reviewEditor.panelOpen === "token-review" ? " [\u2191/\u2193] move [Enter] edit allowed [Esc] close" : sidebarFocused ? sidebarFooter : reviewEditor.showJson ? " [\u2191\u2193] scroll [Ctrl+u/d] half-page [gg/G] top/bottom [Tab] focus list" : " [Tab] focus list (edit fields)" + (reviewEditor.currentTokenSuggestions().length > 0 ? " [t] token review" : ""),
|
|
28063
|
+
livePreview.status === "running" && /* @__PURE__ */ jsx42(Text34, { children: ` ${livePreviewSpinner} live preview` }),
|
|
28064
|
+
livePreview.disabled && /* @__PURE__ */ jsx42(Text34, { children: " \xB7 live preview disabled" })
|
|
28065
|
+
] });
|
|
28076
28066
|
}
|
|
28077
28067
|
function ReviewComponentTitle({
|
|
28078
28068
|
selectedKey,
|
|
@@ -28106,7 +28096,9 @@ function ReviewComponentPanel({
|
|
|
28106
28096
|
sidebarFocused,
|
|
28107
28097
|
fieldEditor,
|
|
28108
28098
|
saveError,
|
|
28109
|
-
sidebarFooter
|
|
28099
|
+
sidebarFooter,
|
|
28100
|
+
livePreview,
|
|
28101
|
+
livePreviewSpinner
|
|
28110
28102
|
}) {
|
|
28111
28103
|
const propCount = Object.keys(selectedEntry.$properties).length;
|
|
28112
28104
|
const slotCount = selectedEntry.$slots ? Object.keys(selectedEntry.$slots).length : 0;
|
|
@@ -28143,7 +28135,9 @@ function ReviewComponentPanel({
|
|
|
28143
28135
|
{
|
|
28144
28136
|
reviewEditor,
|
|
28145
28137
|
sidebarFocused,
|
|
28146
|
-
sidebarFooter
|
|
28138
|
+
sidebarFooter,
|
|
28139
|
+
livePreview,
|
|
28140
|
+
livePreviewSpinner
|
|
28147
28141
|
}
|
|
28148
28142
|
) }) })
|
|
28149
28143
|
] }) });
|
|
@@ -28745,7 +28739,7 @@ function collectTokenSuggestions(entry, availableTokens = []) {
|
|
|
28745
28739
|
const compatiblePaths = new Set(compatible);
|
|
28746
28740
|
const allowed = availableTokens.length > 0 ? persistedAllowed.filter((path5) => compatiblePaths.has(path5)) : persistedAllowed;
|
|
28747
28741
|
const paths = availableTokens.length > 0 ? compatible : allowed;
|
|
28748
|
-
return { propName,
|
|
28742
|
+
return { propName, paths, suggested: [...allowed], allowed };
|
|
28749
28743
|
});
|
|
28750
28744
|
}
|
|
28751
28745
|
var init_token_suggestions = __esm({
|
|
@@ -30696,7 +30690,9 @@ function GenerateReviewStepView({
|
|
|
30696
30690
|
initialFocusTarget: pendingEditorFocus && pendingEditorFocus.componentName === selected.key ? pendingEditorFocus.target : { kind: "description" }
|
|
30697
30691
|
}
|
|
30698
30692
|
),
|
|
30699
|
-
saveError: reviewEditor.saveError
|
|
30693
|
+
saveError: reviewEditor.saveError,
|
|
30694
|
+
livePreview: livePreviewHook,
|
|
30695
|
+
livePreviewSpinner
|
|
30700
30696
|
}
|
|
30701
30697
|
) : /* @__PURE__ */ jsx48(ReviewNoSelection, {})
|
|
30702
30698
|
] }),
|
|
@@ -30728,7 +30724,7 @@ function GenerateReviewStepView({
|
|
|
30728
30724
|
hidden: dialogOpen
|
|
30729
30725
|
}
|
|
30730
30726
|
),
|
|
30731
|
-
!dialogOpen && sidebarFocused &&
|
|
30727
|
+
!dialogOpen && sidebarFocused && /* @__PURE__ */ jsx48(CompactControlBar, { hasGroupRoots, searchActive: searchOpen || searchQuery.length > 0 })
|
|
30732
30728
|
] });
|
|
30733
30729
|
}
|
|
30734
30730
|
var HELP_SECTIONS2;
|
|
@@ -30810,7 +30806,7 @@ var init_generate_review_step = __esm({
|
|
|
30810
30806
|
{ keys: "P", label: "Component rationale" },
|
|
30811
30807
|
{ keys: "s", label: "Source code snippet" },
|
|
30812
30808
|
{ keys: "J", label: "Toggle JSON" },
|
|
30813
|
-
{ keys: "t", label: "
|
|
30809
|
+
{ keys: "t", label: "Token review" }
|
|
30814
30810
|
]
|
|
30815
30811
|
},
|
|
30816
30812
|
{
|
|
@@ -31389,20 +31385,12 @@ function diffProperty(name, old, newDef) {
|
|
|
31389
31385
|
diffs.push({ key: `${name}-new`, color: PALETTE.success, text: `+ ${name}: ${formatPropDef(newDef)}` });
|
|
31390
31386
|
return diffs;
|
|
31391
31387
|
}
|
|
31392
|
-
function formatDefault(value) {
|
|
31393
|
-
const sys = value?.sys;
|
|
31394
|
-
if (sys?.linkType === "Contentful:DesignToken" && typeof sys.urn === "string") {
|
|
31395
|
-
const name = sys.urn.split("/designTokens/")[1];
|
|
31396
|
-
if (name) return name;
|
|
31397
|
-
}
|
|
31398
|
-
return JSON.stringify(value);
|
|
31399
|
-
}
|
|
31400
31388
|
function formatOldProp(prop) {
|
|
31401
31389
|
const parts = [];
|
|
31402
31390
|
if (prop.type) parts.push(prop.type);
|
|
31403
31391
|
if (prop.category) parts.push(prop.category);
|
|
31404
31392
|
parts.push(prop.required ? "required" : "optional");
|
|
31405
|
-
if (prop.default !== void 0) parts.push(`default=${
|
|
31393
|
+
if (prop.default !== void 0) parts.push(`default=${JSON.stringify(prop.default)}`);
|
|
31406
31394
|
return parts.join(", ");
|
|
31407
31395
|
}
|
|
31408
31396
|
function formatPropDef(def) {
|
|
@@ -31411,7 +31399,7 @@ function formatPropDef(def) {
|
|
|
31411
31399
|
if (def["$category"]) parts.push(def["$category"]);
|
|
31412
31400
|
if (def["$required"] === true) parts.push("required");
|
|
31413
31401
|
else parts.push("optional");
|
|
31414
|
-
if (def["$default"] !== void 0) parts.push(`default=${
|
|
31402
|
+
if (def["$default"] !== void 0) parts.push(`default=${JSON.stringify(def["$default"])}`);
|
|
31415
31403
|
return parts.join(", ");
|
|
31416
31404
|
}
|
|
31417
31405
|
var init_preview_diff = __esm({
|
package/dist/package.json
CHANGED
|
@@ -2,6 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import type { CDFComponentEntry } from '@contentful/experience-design-system-types';
|
|
3
3
|
import type { CdfReviewEntry } from '../types.js';
|
|
4
4
|
import type { UseReviewEditorResult } from '../use-review-editor.js';
|
|
5
|
+
import type { UseLivePreviewReturn } from '../use-live-preview.js';
|
|
5
6
|
import { type ReviewDetailsEditorProps } from './ReviewDetailsEditor.js';
|
|
6
7
|
type ReviewDetailsEditorConfig = Pick<ReviewDetailsEditorProps, 'componentRationale' | 'reviewMetadata' | 'reviewEditor' | 'width' | 'height' | 'sourceBorderColor' | 'jsonValue' | 'sidebarFocused' | 'fieldEditor'>;
|
|
7
8
|
export type ReviewComponentPanelProps = ReviewDetailsEditorConfig & {
|
|
@@ -9,6 +10,8 @@ export type ReviewComponentPanelProps = ReviewDetailsEditorConfig & {
|
|
|
9
10
|
selectedEntry: CDFComponentEntry;
|
|
10
11
|
saveError: string | null;
|
|
11
12
|
sidebarFooter?: React.ReactNode;
|
|
13
|
+
livePreview: Pick<UseLivePreviewReturn, 'status' | 'disabled'>;
|
|
14
|
+
livePreviewSpinner: string;
|
|
12
15
|
};
|
|
13
16
|
type ReviewFieldEditor = ReviewDetailsEditorProps['fieldEditor'];
|
|
14
17
|
export declare function buildReviewFieldEditor(reviewEditor: UseReviewEditorResult, selectedJson: string, onExit: () => void, overrides?: Partial<ReviewFieldEditor>): ReviewFieldEditor;
|
|
@@ -26,5 +29,5 @@ export declare function ReviewFinalizeError({ message, hidden, }: {
|
|
|
26
29
|
message: string | null;
|
|
27
30
|
hidden: boolean;
|
|
28
31
|
}): React.ReactElement | null;
|
|
29
|
-
export declare function ReviewComponentPanel({ selectedKey, selectedEntry, componentRationale, reviewMetadata, reviewEditor, width, height, sourceBorderColor, jsonValue, sidebarFocused, fieldEditor, saveError, sidebarFooter, }: ReviewComponentPanelProps): React.ReactElement;
|
|
32
|
+
export declare function ReviewComponentPanel({ selectedKey, selectedEntry, componentRationale, reviewMetadata, reviewEditor, width, height, sourceBorderColor, jsonValue, sidebarFocused, fieldEditor, saveError, sidebarFooter, livePreview, livePreviewSpinner, }: ReviewComponentPanelProps): React.ReactElement;
|
|
30
33
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentful/experience-design-system-cli",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.39.1-dev-build-61afabf3.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-types": "2.39.1-dev-build-61afabf3.0",
|
|
49
|
+
"@contentful/experience-design-system-backend-pipeline": "2.39.1-dev-build-61afabf3.0"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@tsconfig/node24": "^24.0.4",
|