@contentful/experience-design-system-cli 2.38.1-dev-build-40e920ee.0 → 2.38.1-dev-build-8e139f2f.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
@@ -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(Box21, { marginTop: 1, children: /* @__PURE__ */ jsx24(Text21, { color: PALETTE.muted, children: footerHint }) })
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.${input.hasTokens ? "\nUsing your design tokens for prop resolution." : ""}`;
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 [h] help [s] source [Esc] exit panel`;
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: `Review mapped tokens \u2014 ${componentName} \xB7 ${current.propName}${current.kinds.length > 0 ? ` (${current.kinds.join(", ")})` : ""}` }),
24658
- /* @__PURE__ */ jsx39(Text32, { color: PALETTE.muted, wrap: "truncate", children: `Tick the tokens this property may use (${rangeLabel}).` }),
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: `Review mapped tokens \u2014 ${componentName}` }),
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}${s.kinds.length > 0 ? ` (${s.kinds.join(", ")})` : ""}` }) }),
24700
- /* @__PURE__ */ jsx39(
24701
- Text32,
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, { color: PALETTE.muted, children: "[\u2191/\u2193] move [Enter] edit allowed tokens [Esc] close" })
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__ */ jsx42(Fragment10, { children: reviewEditor.panelOpen === "token-review" ? "" : sidebarFocused ? sidebarFooter : reviewEditor.showJson ? " [\u2191\u2193] scroll [Ctrl+u/d] half-page [gg/G] top/bottom [Tab] focus list" : " [Tab] focus list [Enter] edit fields" + (reviewEditor.currentTokenSuggestions().length > 0 ? " [t] review mapped tokens" : "") });
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, kinds, paths, suggested: [...allowed], allowed };
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: "Review mapped tokens" }
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 && reviewEditor.panelOpen !== "token-review" && /* @__PURE__ */ jsx48(CompactControlBar, { hasGroupRoots, searchActive: searchOpen || searchQuery.length > 0 })
27554
+ !dialogOpen && sidebarFocused && /* @__PURE__ */ jsx48(CompactControlBar, { hasGroupRoots, searchActive: searchOpen || searchQuery.length > 0 })
27559
27555
  ] });
27560
27556
  }
27561
27557
 
@@ -27759,7 +27755,8 @@ function PathPrompt({
27759
27755
  defaultPath,
27760
27756
  onSubmit,
27761
27757
  onCancel,
27762
- label = "Save to"
27758
+ label = "Save to",
27759
+ summary
27763
27760
  }) {
27764
27761
  const [input, setInput] = useState28("");
27765
27762
  const cursorVisible = useBlinkingCursor();
@@ -27793,6 +27790,7 @@ function PathPrompt({
27793
27790
  return /* @__PURE__ */ jsxs42(Box42, { flexDirection: "column", children: [
27794
27791
  /* @__PURE__ */ jsx52(StepHeader, { step: "push" }),
27795
27792
  /* @__PURE__ */ jsxs42(Box42, { flexDirection: "column", gap: 1, paddingX: 2, paddingBottom: 1, children: [
27793
+ summary && /* @__PURE__ */ jsx52(Text44, { color: PALETTE.muted, children: summary }),
27796
27794
  /* @__PURE__ */ jsxs42(Box42, { gap: 1, children: [
27797
27795
  /* @__PURE__ */ jsx52(Text44, { color: PALETTE.accent, children: "?" }),
27798
27796
  /* @__PURE__ */ jsxs42(Text44, { bold: true, children: [
@@ -27827,9 +27825,15 @@ function producedOf(state2) {
27827
27825
  function fileSummaryLabel({ components }) {
27828
27826
  return components ? "components.json" : "components.json (design tokens only)";
27829
27827
  }
27830
- function writtenThings({ components, tokens }) {
27831
- if (components && tokens) return "component types and design tokens";
27832
- return tokens ? "design tokens" : "component types";
27828
+ function counted(count, noun) {
27829
+ if (!count) return `${noun}s`;
27830
+ return `${count} ${noun}${count === 1 ? "" : "s"}`;
27831
+ }
27832
+ function countedThings({ components, tokens }, counts = {}) {
27833
+ const parts = [];
27834
+ if (components || !tokens) parts.push(counted(counts.components, "component type"));
27835
+ if (tokens) parts.push(counted(counts.tokens, "design token"));
27836
+ return parts.join(" and ");
27833
27837
  }
27834
27838
 
27835
27839
  // packages/experience-design-system-cli/src/tui/import/steps/10-flow/support/use-timed-spinner.tsx
@@ -27854,18 +27858,21 @@ function useTimedSpinner() {
27854
27858
 
27855
27859
  // packages/experience-design-system-cli/src/tui/import/steps/10-flow/screens/PushingStep.tsx
27856
27860
  import { jsx as jsx54, jsxs as jsxs43 } from "react/jsx-runtime";
27857
- function PushingStep({ progress, produced }) {
27858
- const { elapsed } = useTimedSpinner();
27861
+ function PushingStep({ progress, produced, counts }) {
27862
+ const { spinner, elapsed } = useTimedSpinner();
27859
27863
  const operationId = progress && progress.kind === "queued" ? progress.operationId : null;
27860
27864
  const showGlobal = progress && progress.kind === "progress";
27861
27865
  const showCurrent = progress && progress.kind === "progress" && progress.current ? progress.current : null;
27862
27866
  return /* @__PURE__ */ jsxs43(Box43, { flexDirection: "column", children: [
27863
27867
  /* @__PURE__ */ jsx54(StepHeader, { step: "push" }),
27864
27868
  /* @__PURE__ */ jsxs43(Box43, { flexDirection: "column", gap: 1, paddingX: 2, paddingBottom: 1, children: [
27865
- /* @__PURE__ */ jsxs43(Text45, { children: [
27866
- "Writing ",
27867
- writtenThings(produced),
27868
- " to your Contentful space..."
27869
+ /* @__PURE__ */ jsxs43(Box43, { gap: 1, children: [
27870
+ spinner,
27871
+ /* @__PURE__ */ jsxs43(Text45, { children: [
27872
+ "Writing ",
27873
+ countedThings(produced, counts),
27874
+ " to your Contentful space..."
27875
+ ] })
27869
27876
  ] }),
27870
27877
  operationId && /* @__PURE__ */ jsxs43(Box43, { gap: 1, children: [
27871
27878
  /* @__PURE__ */ jsx54(Text45, { color: PALETTE.muted, children: "Operation:" }),
@@ -28034,20 +28041,12 @@ function diffProperty(name, old, newDef) {
28034
28041
  diffs.push({ key: `${name}-new`, color: PALETTE.success, text: `+ ${name}: ${formatPropDef(newDef)}` });
28035
28042
  return diffs;
28036
28043
  }
28037
- function formatDefault(value) {
28038
- const sys = value?.sys;
28039
- if (sys?.linkType === "Contentful:DesignToken" && typeof sys.urn === "string") {
28040
- const name = sys.urn.split("/designTokens/")[1];
28041
- if (name) return name;
28042
- }
28043
- return JSON.stringify(value);
28044
- }
28045
28044
  function formatOldProp(prop) {
28046
28045
  const parts = [];
28047
28046
  if (prop.type) parts.push(prop.type);
28048
28047
  if (prop.category) parts.push(prop.category);
28049
28048
  parts.push(prop.required ? "required" : "optional");
28050
- if (prop.default !== void 0) parts.push(`default=${formatDefault(prop.default)}`);
28049
+ if (prop.default !== void 0) parts.push(`default=${JSON.stringify(prop.default)}`);
28051
28050
  return parts.join(", ");
28052
28051
  }
28053
28052
  function formatPropDef(def) {
@@ -28056,7 +28055,7 @@ function formatPropDef(def) {
28056
28055
  if (def["$category"]) parts.push(def["$category"]);
28057
28056
  if (def["$required"] === true) parts.push("required");
28058
28057
  else parts.push("optional");
28059
- if (def["$default"] !== void 0) parts.push(`default=${formatDefault(def["$default"])}`);
28058
+ if (def["$default"] !== void 0) parts.push(`default=${JSON.stringify(def["$default"])}`);
28060
28059
  return parts.join(", ");
28061
28060
  }
28062
28061
 
@@ -28392,6 +28391,8 @@ function FlowScreen({
28392
28391
  onExit
28393
28392
  }) {
28394
28393
  const produced = producedOf(state2);
28394
+ const counts = { components: state2.generatedAcceptedCount, tokens: state2.tokenCount };
28395
+ const things = countedThings(produced, counts);
28395
28396
  const quit = () => onExit(0);
28396
28397
  const content = (() => {
28397
28398
  switch (state2.step) {
@@ -28413,7 +28414,7 @@ function FlowScreen({
28413
28414
  }
28414
28415
  );
28415
28416
  case "previewing":
28416
- return /* @__PURE__ */ jsx56(RunningStep, { step: "push", description: "Computing diff against your Contentful space..." });
28417
+ return /* @__PURE__ */ jsx56(RunningStep, { step: "push", description: `Computing diff for ${things} against your Contentful space...` });
28417
28418
  case "preview-gate":
28418
28419
  if (!state2.serverPreview) return null;
28419
28420
  return /* @__PURE__ */ jsx56(
@@ -28428,11 +28429,12 @@ function FlowScreen({
28428
28429
  }
28429
28430
  );
28430
28431
  case "pushing":
28431
- return /* @__PURE__ */ jsx56(PushingStep, { progress: state2.pushProgress, produced });
28432
+ return /* @__PURE__ */ jsx56(PushingStep, { progress: state2.pushProgress, produced, counts });
28432
28433
  case "path-prompt":
28433
28434
  return /* @__PURE__ */ jsx56(
28434
28435
  PathPrompt,
28435
28436
  {
28437
+ summary: `Saving ${things}${state2.credentialsSkipped ? "" : " and pushing them to your Contentful space"}.`,
28436
28438
  defaultPath: state2.outDir,
28437
28439
  onSubmit: (submitted) => void controller.submitPath(submitted),
28438
28440
  onCancel: quit
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(Box21, { marginTop: 1, children: /* @__PURE__ */ jsx24(Text21, { color: PALETTE.muted, children: footerHint }) })
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.${input.hasTokens ? "\nUsing your design tokens for prop resolution." : ""}`;
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 [h] help [s] source [Esc] exit panel`;
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: `Review mapped tokens \u2014 ${componentName} \xB7 ${current.propName}${current.kinds.length > 0 ? ` (${current.kinds.join(", ")})` : ""}` }),
27740
- /* @__PURE__ */ jsx39(Text32, { color: PALETTE.muted, wrap: "truncate", children: `Tick the tokens this property may use (${rangeLabel}).` }),
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: `Review mapped tokens \u2014 ${componentName}` }),
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}${s.kinds.length > 0 ? ` (${s.kinds.join(", ")})` : ""}` }) }),
27782
- /* @__PURE__ */ jsx39(
27783
- Text32,
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, { color: PALETTE.muted, children: "[\u2191/\u2193] move [Enter] edit allowed tokens [Esc] close" })
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__ */ jsx42(Fragment10, { children: reviewEditor.panelOpen === "token-review" ? "" : sidebarFocused ? sidebarFooter : reviewEditor.showJson ? " [\u2191\u2193] scroll [Ctrl+u/d] half-page [gg/G] top/bottom [Tab] focus list" : " [Tab] focus list [Enter] edit fields" + (reviewEditor.currentTokenSuggestions().length > 0 ? " [t] review mapped tokens" : "") });
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, kinds, paths, suggested: [...allowed], allowed };
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 && reviewEditor.panelOpen !== "token-review" && /* @__PURE__ */ jsx48(CompactControlBar, { hasGroupRoots, searchActive: searchOpen || searchQuery.length > 0 })
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: "Review mapped tokens" }
30809
+ { keys: "t", label: "Token review" }
30814
30810
  ]
30815
30811
  },
30816
30812
  {
@@ -31078,7 +31074,8 @@ function PathPrompt({
31078
31074
  defaultPath,
31079
31075
  onSubmit,
31080
31076
  onCancel,
31081
- label = "Save to"
31077
+ label = "Save to",
31078
+ summary
31082
31079
  }) {
31083
31080
  const [input, setInput] = useState28("");
31084
31081
  const cursorVisible = useBlinkingCursor();
@@ -31112,6 +31109,7 @@ function PathPrompt({
31112
31109
  return /* @__PURE__ */ jsxs42(Box42, { flexDirection: "column", children: [
31113
31110
  /* @__PURE__ */ jsx52(StepHeader, { step: "push" }),
31114
31111
  /* @__PURE__ */ jsxs42(Box42, { flexDirection: "column", gap: 1, paddingX: 2, paddingBottom: 1, children: [
31112
+ summary && /* @__PURE__ */ jsx52(Text44, { color: PALETTE.muted, children: summary }),
31115
31113
  /* @__PURE__ */ jsxs42(Box42, { gap: 1, children: [
31116
31114
  /* @__PURE__ */ jsx52(Text44, { color: PALETTE.accent, children: "?" }),
31117
31115
  /* @__PURE__ */ jsxs42(Text44, { bold: true, children: [
@@ -31153,9 +31151,15 @@ function producedOf(state2) {
31153
31151
  function fileSummaryLabel({ components }) {
31154
31152
  return components ? "components.json" : "components.json (design tokens only)";
31155
31153
  }
31156
- function writtenThings({ components, tokens }) {
31157
- if (components && tokens) return "component types and design tokens";
31158
- return tokens ? "design tokens" : "component types";
31154
+ function counted(count, noun) {
31155
+ if (!count) return `${noun}s`;
31156
+ return `${count} ${noun}${count === 1 ? "" : "s"}`;
31157
+ }
31158
+ function countedThings({ components, tokens }, counts = {}) {
31159
+ const parts = [];
31160
+ if (components || !tokens) parts.push(counted(counts.components, "component type"));
31161
+ if (tokens) parts.push(counted(counts.tokens, "design token"));
31162
+ return parts.join(" and ");
31159
31163
  }
31160
31164
  var init_produced = __esm({
31161
31165
  "packages/experience-design-system-cli/src/tui/import/steps/10-flow/support/produced.ts"() {
@@ -31192,18 +31196,21 @@ var init_use_timed_spinner = __esm({
31192
31196
  import { Box as Box43, Text as Text45 } from "ink";
31193
31197
  import { ProgressBar as ProgressBar2, ThemeProvider as ThemeProvider2 } from "@inkjs/ui";
31194
31198
  import { jsx as jsx54, jsxs as jsxs43 } from "react/jsx-runtime";
31195
- function PushingStep({ progress, produced }) {
31196
- const { elapsed } = useTimedSpinner();
31199
+ function PushingStep({ progress, produced, counts }) {
31200
+ const { spinner, elapsed } = useTimedSpinner();
31197
31201
  const operationId = progress && progress.kind === "queued" ? progress.operationId : null;
31198
31202
  const showGlobal = progress && progress.kind === "progress";
31199
31203
  const showCurrent = progress && progress.kind === "progress" && progress.current ? progress.current : null;
31200
31204
  return /* @__PURE__ */ jsxs43(Box43, { flexDirection: "column", children: [
31201
31205
  /* @__PURE__ */ jsx54(StepHeader, { step: "push" }),
31202
31206
  /* @__PURE__ */ jsxs43(Box43, { flexDirection: "column", gap: 1, paddingX: 2, paddingBottom: 1, children: [
31203
- /* @__PURE__ */ jsxs43(Text45, { children: [
31204
- "Writing ",
31205
- writtenThings(produced),
31206
- " to your Contentful space..."
31207
+ /* @__PURE__ */ jsxs43(Box43, { gap: 1, children: [
31208
+ spinner,
31209
+ /* @__PURE__ */ jsxs43(Text45, { children: [
31210
+ "Writing ",
31211
+ countedThings(produced, counts),
31212
+ " to your Contentful space..."
31213
+ ] })
31207
31214
  ] }),
31208
31215
  operationId && /* @__PURE__ */ jsxs43(Box43, { gap: 1, children: [
31209
31216
  /* @__PURE__ */ jsx54(Text45, { color: PALETTE.muted, children: "Operation:" }),
@@ -31378,20 +31385,12 @@ function diffProperty(name, old, newDef) {
31378
31385
  diffs.push({ key: `${name}-new`, color: PALETTE.success, text: `+ ${name}: ${formatPropDef(newDef)}` });
31379
31386
  return diffs;
31380
31387
  }
31381
- function formatDefault(value) {
31382
- const sys = value?.sys;
31383
- if (sys?.linkType === "Contentful:DesignToken" && typeof sys.urn === "string") {
31384
- const name = sys.urn.split("/designTokens/")[1];
31385
- if (name) return name;
31386
- }
31387
- return JSON.stringify(value);
31388
- }
31389
31388
  function formatOldProp(prop) {
31390
31389
  const parts = [];
31391
31390
  if (prop.type) parts.push(prop.type);
31392
31391
  if (prop.category) parts.push(prop.category);
31393
31392
  parts.push(prop.required ? "required" : "optional");
31394
- if (prop.default !== void 0) parts.push(`default=${formatDefault(prop.default)}`);
31393
+ if (prop.default !== void 0) parts.push(`default=${JSON.stringify(prop.default)}`);
31395
31394
  return parts.join(", ");
31396
31395
  }
31397
31396
  function formatPropDef(def) {
@@ -31400,7 +31399,7 @@ function formatPropDef(def) {
31400
31399
  if (def["$category"]) parts.push(def["$category"]);
31401
31400
  if (def["$required"] === true) parts.push("required");
31402
31401
  else parts.push("optional");
31403
- if (def["$default"] !== void 0) parts.push(`default=${formatDefault(def["$default"])}`);
31402
+ if (def["$default"] !== void 0) parts.push(`default=${JSON.stringify(def["$default"])}`);
31404
31403
  return parts.join(", ");
31405
31404
  }
31406
31405
  var init_preview_diff = __esm({
@@ -31770,6 +31769,8 @@ function FlowScreen({
31770
31769
  onExit
31771
31770
  }) {
31772
31771
  const produced = producedOf(state2);
31772
+ const counts = { components: state2.generatedAcceptedCount, tokens: state2.tokenCount };
31773
+ const things = countedThings(produced, counts);
31773
31774
  const quit = () => onExit(0);
31774
31775
  const content = (() => {
31775
31776
  switch (state2.step) {
@@ -31791,7 +31792,7 @@ function FlowScreen({
31791
31792
  }
31792
31793
  );
31793
31794
  case "previewing":
31794
- return /* @__PURE__ */ jsx56(RunningStep, { step: "push", description: "Computing diff against your Contentful space..." });
31795
+ return /* @__PURE__ */ jsx56(RunningStep, { step: "push", description: `Computing diff for ${things} against your Contentful space...` });
31795
31796
  case "preview-gate":
31796
31797
  if (!state2.serverPreview) return null;
31797
31798
  return /* @__PURE__ */ jsx56(
@@ -31806,11 +31807,12 @@ function FlowScreen({
31806
31807
  }
31807
31808
  );
31808
31809
  case "pushing":
31809
- return /* @__PURE__ */ jsx56(PushingStep, { progress: state2.pushProgress, produced });
31810
+ return /* @__PURE__ */ jsx56(PushingStep, { progress: state2.pushProgress, produced, counts });
31810
31811
  case "path-prompt":
31811
31812
  return /* @__PURE__ */ jsx56(
31812
31813
  PathPrompt,
31813
31814
  {
31815
+ summary: `Saving ${things}${state2.credentialsSkipped ? "" : " and pushing them to your Contentful space"}.`,
31814
31816
  defaultPath: state2.outDir,
31815
31817
  onSubmit: (submitted) => void controller.submitPath(submitted),
31816
31818
  onCancel: quit
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/experience-design-system-cli",
3
- "version": "2.38.1-dev-build-40e920ee.0",
3
+ "version": "2.38.1-dev-build-8e139f2f.0",
4
4
  "description": "Contentful Experiences design system import CLI",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -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 {};
@@ -1,7 +1,6 @@
1
1
  import React from 'react';
2
2
  export type TokenPropSuggestion = {
3
3
  propName: string;
4
- kinds: string[];
5
4
  paths: string[];
6
5
  suggested: string[];
7
6
  allowed: string[];
@@ -12,7 +12,6 @@ export type TokenReviewToken = {
12
12
  };
13
13
  export type TokenPropSuggestion = {
14
14
  propName: string;
15
- kinds: string[];
16
15
  paths: string[];
17
16
  suggested: string[];
18
17
  allowed: string[];
@@ -4,5 +4,7 @@ export type PathPromptProps = {
4
4
  onSubmit: (path: string) => void;
5
5
  onCancel: () => void;
6
6
  label?: string;
7
+ /** What is being saved, shown above the path, such as "Saving 42 design tokens." */
8
+ summary?: string;
7
9
  };
8
- export declare function PathPrompt({ defaultPath, onSubmit, onCancel, label, }: PathPromptProps): React.ReactElement;
10
+ export declare function PathPrompt({ defaultPath, onSubmit, onCancel, label, summary, }: PathPromptProps): React.ReactElement;
@@ -1,9 +1,10 @@
1
1
  import React from 'react';
2
2
  import type { PushProgress } from '../support/push-progress.js';
3
- import { type Produced } from '../support/produced.js';
3
+ import { type Produced, type ProducedCounts } from '../support/produced.js';
4
4
  type PushingStepProps = {
5
5
  progress: PushProgress;
6
6
  produced: Produced;
7
+ counts: ProducedCounts;
7
8
  };
8
- export declare function PushingStep({ progress, produced }: PushingStepProps): React.ReactElement;
9
+ export declare function PushingStep({ progress, produced, counts }: PushingStepProps): React.ReactElement;
9
10
  export {};
@@ -11,5 +11,15 @@ export declare function producedOf(state: Pick<FlowState, 'extractSessionId' | '
11
11
  * holds just the tokens, and calling it a components file would mislead.
12
12
  */
13
13
  export declare function fileSummaryLabel({ components }: Produced): string;
14
+ /** How many of each thing a run writes. A missing or zero count is left out of the wording, never shown as "0". */
15
+ export interface ProducedCounts {
16
+ components?: number;
17
+ tokens?: number;
18
+ }
19
+ /**
20
+ * "12 component types and 42 design tokens", "42 design tokens", or "component types": the things this run writes, with
21
+ * how many of each when known.
22
+ */
23
+ export declare function countedThings({ components, tokens }: Produced, counts?: ProducedCounts): string;
14
24
  /** "component types and design tokens", "design tokens", or "component types": the things this run writes. */
15
- export declare function writtenThings({ components, tokens }: Produced): string;
25
+ export declare function writtenThings(produced: Produced): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/experience-design-system-cli",
3
- "version": "2.38.1-dev-build-40e920ee.0",
3
+ "version": "2.38.1-dev-build-8e139f2f.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.38.1-dev-build-40e920ee.0",
49
- "@contentful/experience-design-system-types": "2.38.1-dev-build-40e920ee.0"
48
+ "@contentful/experience-design-system-backend-pipeline": "2.38.1-dev-build-8e139f2f.0",
49
+ "@contentful/experience-design-system-types": "2.38.1-dev-build-8e139f2f.0"
50
50
  },
51
51
  "devDependencies": {
52
52
  "@tsconfig/node24": "^24.0.4",