@contentful/experience-design-system-cli 2.34.5-dev-build-0dbc122c.0 → 2.34.5-dev-build-5cdf5961.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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/experience-design-system-cli",
3
- "version": "2.34.5-dev-build-0dbc122c.0",
3
+ "version": "2.34.5-dev-build-5cdf5961.0",
4
4
  "description": "Contentful Experiences design system import CLI",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -1,11 +1,3 @@
1
- export type WizardStepAfterScope = 'generating' | 'push-decision-gate';
2
- export type WizardStepAfterCredentials = 'generating' | 'push-decision-gate';
3
- export declare function nextStepAfterScopeGate(opts: {
4
- acceptedCount: number;
5
- }): WizardStepAfterScope;
6
- export declare function nextStepAfterCredentialsValidated(opts: {
7
- acceptedCount: number;
8
- }): WizardStepAfterCredentials;
9
1
  export declare function shouldGenerateAfterScopeGate(opts: {
10
2
  acceptedCount: number;
11
3
  }): boolean;
@@ -23,7 +15,7 @@ export declare function shouldBypassPreview(state: {
23
15
  credentialsSkipped: boolean;
24
16
  }): boolean;
25
17
  export declare function buildSkippedPreviewTransition(): {
26
- step: 'print-gate';
18
+ step: 'done';
27
19
  serverPreview: null;
28
20
  };
29
21
  export type CycleGateAction = 'block' | 'proceed';
package/dist/src/index.js CHANGED
@@ -9424,7 +9424,7 @@ function PathValidationStep({
9424
9424
  onChangePath,
9425
9425
  onQuit
9426
9426
  }) {
9427
- const [counts, setCounts] = useState6(null);
9427
+ const [counts, setCounts] = useState6(() => fileCountsCache.get(projectPath) ?? null);
9428
9428
  const [error, setError] = useState6(null);
9429
9429
  useEffect3(() => {
9430
9430
  void (async () => {
@@ -9445,6 +9445,7 @@ Example: ~/projects/my-design-system`
9445
9445
  return;
9446
9446
  }
9447
9447
  const result = await countFiles(projectPath);
9448
+ fileCountsCache.set(projectPath, result);
9448
9449
  setCounts(result);
9449
9450
  } catch (e) {
9450
9451
  const code = e.code;
@@ -9584,12 +9585,13 @@ You don't have read access to this directory.`);
9584
9585
  ] })
9585
9586
  ] });
9586
9587
  }
9587
- var IGNORE_DIRS;
9588
+ var fileCountsCache, IGNORE_DIRS;
9588
9589
  var init_PathValidationStep = __esm({
9589
9590
  "packages/experience-design-system-cli/src/import/tui/steps/PathValidationStep.tsx"() {
9590
9591
  "use strict";
9591
9592
  init_theme();
9592
9593
  init_useImmediateInput();
9594
+ fileCountsCache = /* @__PURE__ */ new Map();
9593
9595
  IGNORE_DIRS = /* @__PURE__ */ new Set([
9594
9596
  "node_modules",
9595
9597
  "dist",
@@ -21404,9 +21406,9 @@ var init_scroll_offset = __esm({
21404
21406
  });
21405
21407
 
21406
21408
  // packages/experience-design-system-cli/src/analyze/select/tui/components/FieldEditor.tsx
21407
- import React14, { useEffect as useEffect8, useState as useState15 } from "react";
21409
+ import React14, { useEffect as useEffect8, useLayoutEffect as useLayoutEffect2, useState as useState15 } from "react";
21408
21410
  import figures4 from "figures";
21409
- import { Box as Box29, Text as Text30 } from "ink";
21411
+ import { Box as Box29, measureElement, Text as Text30 } from "ink";
21410
21412
  import {
21411
21413
  CDF_PROPERTY_TYPES,
21412
21414
  CDF_PROPERTY_CATEGORIES,
@@ -21438,7 +21440,10 @@ function parseToState(json) {
21438
21440
  try {
21439
21441
  parsed = JSON.parse(json);
21440
21442
  } catch (e) {
21441
- return { state: { componentDescription: "", props: [], slots: [] }, error: String(e) };
21443
+ return {
21444
+ state: { componentDescription: "", props: [], slots: [] },
21445
+ error: String(e)
21446
+ };
21442
21447
  }
21443
21448
  if (typeof parsed !== "object" || parsed === null) {
21444
21449
  return {
@@ -21564,13 +21569,23 @@ function InlinePropField({
21564
21569
  selected,
21565
21570
  focused = false,
21566
21571
  children,
21567
- flexible = false
21572
+ flexible = false,
21573
+ width
21568
21574
  }) {
21569
- return /* @__PURE__ */ jsxs30(Box29, { gap: 1, flexShrink: flexible ? 1 : 0, flexGrow: flexible ? 1 : 0, children: [
21570
- /* @__PURE__ */ jsxs30(Text30, { color: focused ? PALETTE.warning : void 0, bold: focused, dimColor: !selected && !focused, children: [
21571
- focused ? "\u203A " : " ",
21572
- label
21573
- ] }),
21575
+ return /* @__PURE__ */ jsxs30(Box29, { width, gap: 1, flexShrink: flexible ? 1 : 0, flexGrow: flexible ? 1 : 0, flexWrap: "wrap", children: [
21576
+ /* @__PURE__ */ jsxs30(
21577
+ Text30,
21578
+ {
21579
+ color: focused ? PALETTE.warning : void 0,
21580
+ bold: focused,
21581
+ dimColor: !selected && !focused,
21582
+ wrap: "truncate-end",
21583
+ children: [
21584
+ focused ? "\u203A " : " ",
21585
+ label
21586
+ ]
21587
+ }
21588
+ ),
21574
21589
  children
21575
21590
  ] });
21576
21591
  }
@@ -21579,15 +21594,12 @@ function DefaultValueRow({
21579
21594
  active,
21580
21595
  focused
21581
21596
  }) {
21582
- return /* @__PURE__ */ jsxs30(Box29, { paddingLeft: 2, gap: 1, children: [
21583
- /* @__PURE__ */ jsx33(DefaultLabel, { focused }),
21584
- active ? /* @__PURE__ */ jsx33(Picker, { value: display, active: true }) : /* @__PURE__ */ jsx33(Text30, { color: PALETTE.inverse, children: display })
21585
- ] });
21586
- }
21587
- function DefaultLabel({ focused }) {
21588
- return /* @__PURE__ */ jsxs30(Text30, { color: focused ? PALETTE.warning : void 0, bold: focused, dimColor: !focused, children: [
21589
- focused ? "\u203A " : " ",
21590
- "default:"
21597
+ return /* @__PURE__ */ jsxs30(Box29, { paddingLeft: 2, gap: 1, flexWrap: "wrap", flexShrink: 0, children: [
21598
+ /* @__PURE__ */ jsxs30(Text30, { color: focused ? PALETTE.warning : void 0, bold: focused, dimColor: !focused, children: [
21599
+ focused ? "\u203A " : " ",
21600
+ "default:"
21601
+ ] }),
21602
+ active ? /* @__PURE__ */ jsx33(Picker, { value: display, active: true }) : /* @__PURE__ */ jsx33(Text30, { color: PALETTE.inverse, wrap: "wrap", children: display })
21591
21603
  ] });
21592
21604
  }
21593
21605
  function RowLabel({ name, selected }) {
@@ -21668,7 +21680,7 @@ function DefaultSubRow({
21668
21680
  }) {
21669
21681
  const cursor = cursorVisible ? "\u2588" : " ";
21670
21682
  if (prop.type === "richtext" || prop.type === "media" || prop.type === "link") {
21671
- return /* @__PURE__ */ jsxs30(Box29, { paddingLeft: 2, gap: 1, children: [
21683
+ return /* @__PURE__ */ jsxs30(Box29, { paddingLeft: 2, gap: 1, flexShrink: 0, children: [
21672
21684
  /* @__PURE__ */ jsxs30(Text30, { color: focused ? PALETTE.warning : void 0, bold: focused, dimColor: !focused, children: [
21673
21685
  focused ? "\u203A " : " ",
21674
21686
  "default:"
@@ -21682,7 +21694,7 @@ function DefaultSubRow({
21682
21694
  }
21683
21695
  if (prop.type === "enum") {
21684
21696
  if (prop.values.length === 0) {
21685
- return /* @__PURE__ */ jsxs30(Box29, { paddingLeft: 2, gap: 1, children: [
21697
+ return /* @__PURE__ */ jsxs30(Box29, { paddingLeft: 2, gap: 1, flexShrink: 0, children: [
21686
21698
  /* @__PURE__ */ jsxs30(Text30, { color: focused ? PALETTE.warning : void 0, bold: focused, dimColor: !focused, children: [
21687
21699
  focused ? "\u203A " : " ",
21688
21700
  "default:"
@@ -21695,8 +21707,11 @@ function DefaultSubRow({
21695
21707
  }
21696
21708
  const value = typeof prop.default === "string" ? prop.default : "";
21697
21709
  if (active) {
21698
- return /* @__PURE__ */ jsxs30(Box29, { paddingLeft: 2, flexDirection: "row", children: [
21699
- /* @__PURE__ */ jsx33(DefaultLabel, { focused }),
21710
+ return /* @__PURE__ */ jsxs30(Box29, { paddingLeft: 2, flexDirection: "row", flexShrink: 0, children: [
21711
+ /* @__PURE__ */ jsxs30(Text30, { color: focused ? PALETTE.warning : void 0, bold: focused, dimColor: !focused, children: [
21712
+ focused ? "\u203A " : " ",
21713
+ "default:"
21714
+ ] }),
21700
21715
  /* @__PURE__ */ jsxs30(Box29, { flexGrow: 1, borderStyle: "round", borderColor: PALETTE.info, paddingX: 1, children: [
21701
21716
  /* @__PURE__ */ jsx33(Text30, { children: value.slice(0, textCursor) }),
21702
21717
  /* @__PURE__ */ jsx33(Text30, { inverse: cursorVisible, children: value[textCursor] ?? cursor }),
@@ -21704,8 +21719,11 @@ function DefaultSubRow({
21704
21719
  ] })
21705
21720
  ] });
21706
21721
  }
21707
- return /* @__PURE__ */ jsxs30(Box29, { paddingLeft: 2, gap: 1, children: [
21708
- /* @__PURE__ */ jsx33(DefaultLabel, { focused }),
21722
+ return /* @__PURE__ */ jsxs30(Box29, { paddingLeft: 2, gap: 1, flexShrink: 0, children: [
21723
+ /* @__PURE__ */ jsxs30(Text30, { color: focused ? PALETTE.warning : void 0, bold: focused, dimColor: !focused, children: [
21724
+ focused ? "\u203A " : " ",
21725
+ "default:"
21726
+ ] }),
21709
21727
  /* @__PURE__ */ jsx33(Text30, { color: value ? PALETTE.inverse : void 0, dimColor: !value, children: value || "(none)" })
21710
21728
  ] });
21711
21729
  }
@@ -21720,24 +21738,40 @@ function DescriptionField({
21720
21738
  compact = false
21721
21739
  }) {
21722
21740
  const cursor = cursorVisible ? "\u2588" : " ";
21723
- const outerWidth = width === void 0 ? void 0 : Math.max(1, width - 2);
21724
- const contentWidth = outerWidth === void 0 ? void 0 : Math.max(1, outerWidth - 2);
21725
21741
  if (compact) {
21726
- return /* @__PURE__ */ jsxs30(Box29, { paddingLeft: 2, width: outerWidth, children: [
21742
+ return /* @__PURE__ */ jsxs30(Box29, { paddingLeft: 2, width, flexShrink: 0, children: [
21727
21743
  /* @__PURE__ */ jsx33(Text30, { dimColor: true, children: ` ${label}` }),
21728
21744
  /* @__PURE__ */ jsx33(Text30, { wrap: "truncate-end", color: value ? PALETTE.success : void 0, dimColor: !value, children: ` ${value || "\u2014"}` })
21729
21745
  ] });
21730
21746
  }
21731
- return /* @__PURE__ */ jsxs30(Box29, { paddingLeft: 2, flexDirection: "column", width: outerWidth, children: [
21747
+ return /* @__PURE__ */ jsxs30(Box29, { paddingLeft: 2, flexDirection: "column", width, flexShrink: 0, children: [
21732
21748
  /* @__PURE__ */ jsxs30(Text30, { color: focused ? PALETTE.warning : void 0, bold: focused, dimColor: !focused, children: [
21733
21749
  focused ? "\u203A " : " ",
21734
21750
  label
21735
21751
  ] }),
21736
- /* @__PURE__ */ jsx33(Box29, { width: contentWidth, borderStyle: "round", borderColor: focused ? PALETTE.info : PALETTE.border, paddingX: 1, children: editing ? /* @__PURE__ */ jsxs30(Fragment10, { children: [
21737
- /* @__PURE__ */ jsx33(Text30, { children: value.slice(0, textCursor) }),
21738
- /* @__PURE__ */ jsx33(Text30, { inverse: cursorVisible, children: value[textCursor] ?? cursor }),
21739
- /* @__PURE__ */ jsx33(Text30, { children: value.slice(textCursor + 1) })
21740
- ] }) : /* @__PURE__ */ jsx33(Text30, { color: PALETTE.success, wrap: "wrap", children: value || "\u2014" }) })
21752
+ /* @__PURE__ */ jsx33(
21753
+ Box29,
21754
+ {
21755
+ flexDirection: "column",
21756
+ borderStyle: "round",
21757
+ borderColor: focused ? PALETTE.info : PALETTE.border,
21758
+ paddingX: 1,
21759
+ flexShrink: 0,
21760
+ children: editing ? /* @__PURE__ */ jsx33(EditableDescription, { cursor, cursorVisible, value, textCursor }) : /* @__PURE__ */ jsx33(Text30, { color: PALETTE.success, wrap: "wrap", children: value || "\u2014" })
21761
+ }
21762
+ )
21763
+ ] });
21764
+ }
21765
+ function EditableDescription({
21766
+ cursor,
21767
+ cursorVisible,
21768
+ value,
21769
+ textCursor
21770
+ }) {
21771
+ return /* @__PURE__ */ jsxs30(Text30, { wrap: "wrap", children: [
21772
+ value.slice(0, textCursor),
21773
+ /* @__PURE__ */ jsx33(Text30, { inverse: cursorVisible, children: cursor }),
21774
+ value.slice(textCursor)
21741
21775
  ] });
21742
21776
  }
21743
21777
  function PropRow({
@@ -21752,28 +21786,30 @@ function PropRow({
21752
21786
  valueText,
21753
21787
  width,
21754
21788
  rationale,
21789
+ showRationale,
21755
21790
  rowKey
21756
21791
  }) {
21757
21792
  const descFocused = activeField === "description";
21758
21793
  const descActive = editingField && descFocused;
21759
- return /* @__PURE__ */ jsxs30(Box29, { flexDirection: "column", width, children: [
21760
- /* @__PURE__ */ jsxs30(Box29, { gap: 1, flexWrap: "wrap", children: [
21794
+ return /* @__PURE__ */ jsxs30(Box29, { flexDirection: "column", width, flexShrink: 0, children: [
21795
+ /* @__PURE__ */ jsxs30(Box29, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: [
21761
21796
  /* @__PURE__ */ jsx33(RowLabel, { name: prop.name, selected }),
21762
- /* @__PURE__ */ jsx33(InlinePropField, { label: "type:", selected, focused: activeField === "type", children: editingField && activeField === "type" ? /* @__PURE__ */ jsx33(Picker, { value: prop.type, active: true }) : /* @__PURE__ */ jsx33(Text30, { color: selected ? PALETTE.warning : PALETTE.inverse, children: prop.type }) }),
21763
- /* @__PURE__ */ jsx33(
21764
- InlinePropField,
21765
- {
21766
- label: "category:",
21767
- selected,
21768
- focused: activeField === "category",
21769
- flexible: editingField && activeField === "category",
21770
- children: editingField && activeField === "category" ? /* @__PURE__ */ jsx33(Text30, { color: selected ? PALETTE.warning : PALETTE.inverse, bold: true, wrap: "wrap", children: `[Enter] switch to ${categorySwitchTarget(prop.category)} property` }) : /* @__PURE__ */ jsx33(Text30, { color: selected ? PALETTE.warning : PALETTE.inverse, children: prop.category })
21771
- }
21772
- ),
21773
- /* @__PURE__ */ jsx33(InlinePropField, { label: "req:", selected, focused: activeField === "required", children: /* @__PURE__ */ jsx33(Toggle, { value: prop.required, active: editingField && activeField === "required" }) }),
21774
- prop.type === "token" && /* @__PURE__ */ jsx33(InlinePropField, { label: "kind:", selected, focused: activeField === "tokenKind", children: editingField && activeField === "tokenKind" ? /* @__PURE__ */ jsx33(Picker, { value: prop.tokenKind || DESIGN_TOKEN_TYPES2[0], active: true }) : /* @__PURE__ */ jsx33(Text30, { color: selected ? PALETTE.success : PALETTE.inverse, children: prop.tokenKind || "\u2014" }) })
21797
+ /* @__PURE__ */ jsx33(InlinePropField, { label: "type:", selected, focused: activeField === "type", children: editingField && activeField === "type" ? /* @__PURE__ */ jsx33(Picker, { value: prop.type, active: true }) : /* @__PURE__ */ jsx33(Text30, { color: selected ? PALETTE.warning : PALETTE.inverse, children: prop.type }) })
21775
21798
  ] }),
21776
- prop.type === "enum" && /* @__PURE__ */ jsxs30(Box29, { paddingLeft: 2, gap: 1, flexWrap: "wrap", children: [
21799
+ /* @__PURE__ */ jsx33(
21800
+ InlinePropField,
21801
+ {
21802
+ label: "category:",
21803
+ selected,
21804
+ focused: activeField === "category",
21805
+ flexible: editingField && activeField === "category",
21806
+ width,
21807
+ children: editingField && activeField === "category" ? /* @__PURE__ */ jsx33(Text30, { color: selected ? PALETTE.warning : PALETTE.inverse, bold: true, wrap: "wrap", children: `[Enter] switch to ${categorySwitchTarget(prop.category)} property` }) : /* @__PURE__ */ jsx33(Text30, { color: selected ? PALETTE.warning : PALETTE.inverse, wrap: "wrap", children: prop.category })
21808
+ }
21809
+ ),
21810
+ /* @__PURE__ */ jsx33(InlinePropField, { label: "req:", selected, focused: activeField === "required", width, children: /* @__PURE__ */ jsx33(Toggle, { value: prop.required, active: editingField && activeField === "required" }) }),
21811
+ prop.type === "token" && /* @__PURE__ */ jsx33(InlinePropField, { label: "kind:", selected, focused: activeField === "tokenKind", width, children: editingField && activeField === "tokenKind" ? /* @__PURE__ */ jsx33(Picker, { value: prop.tokenKind || DESIGN_TOKEN_TYPES2[0], active: true }) : /* @__PURE__ */ jsx33(Text30, { color: selected ? PALETTE.success : PALETTE.inverse, wrap: "wrap", children: prop.tokenKind || "\u2014" }) }),
21812
+ prop.type === "enum" && /* @__PURE__ */ jsxs30(Box29, { paddingLeft: 2, flexDirection: "column", width, flexShrink: 0, children: [
21777
21813
  /* @__PURE__ */ jsxs30(
21778
21814
  Text30,
21779
21815
  {
@@ -21786,7 +21822,7 @@ function PropRow({
21786
21822
  ]
21787
21823
  }
21788
21824
  ),
21789
- /* @__PURE__ */ jsx33(Box29, { flexGrow: 1, children: /* @__PURE__ */ jsxs30(Text30, { color: selected ? PALETTE.warning : PALETTE.inverse, wrap: "wrap", children: [
21825
+ /* @__PURE__ */ jsx33(Box29, { paddingLeft: 2, width: Math.max(1, width - 4), children: /* @__PURE__ */ jsxs30(Text30, { color: selected ? PALETTE.warning : PALETTE.inverse, wrap: "wrap", children: [
21790
21826
  "[",
21791
21827
  prop.values.join(", "),
21792
21828
  "]"
@@ -21814,7 +21850,7 @@ function PropRow({
21814
21850
  compact: !selected
21815
21851
  }
21816
21852
  ),
21817
- selected && prop.type === "token" && prop.category === "design" && /* @__PURE__ */ jsxs30(Box29, { paddingLeft: 2, flexDirection: "row", gap: 1, children: [
21853
+ selected && prop.type === "token" && prop.category === "design" && /* @__PURE__ */ jsxs30(Box29, { paddingLeft: 2, flexDirection: "column", width, flexShrink: 0, children: [
21818
21854
  /* @__PURE__ */ jsxs30(
21819
21855
  Text30,
21820
21856
  {
@@ -21827,9 +21863,17 @@ function PropRow({
21827
21863
  ]
21828
21864
  }
21829
21865
  ),
21830
- editingField && activeField === "allowed" ? /* @__PURE__ */ jsx33(Box29, { flexGrow: 1, borderStyle: "round", borderColor: PALETTE.info, paddingX: 1, children: /* @__PURE__ */ jsx33(Text30, { dimColor: true, children: "press [t] to edit allowed tokens" }) }) : /* @__PURE__ */ jsx33(Text30, { color: prop.allowed.length > 0 ? PALETTE.info : void 0, dimColor: prop.allowed.length === 0, children: prop.allowed.length > 0 ? prop.allowed.join(", ") : "(any)" })
21866
+ editingField && activeField === "allowed" ? /* @__PURE__ */ jsx33(Box29, { width: Math.max(1, width - 4), borderStyle: "round", borderColor: PALETTE.info, paddingX: 1, children: /* @__PURE__ */ jsx33(Text30, { dimColor: true, children: "press [t] to edit allowed tokens" }) }) : /* @__PURE__ */ jsx33(
21867
+ Text30,
21868
+ {
21869
+ color: prop.allowed.length > 0 ? PALETTE.info : void 0,
21870
+ dimColor: prop.allowed.length === 0,
21871
+ wrap: "wrap",
21872
+ children: prop.allowed.length > 0 ? prop.allowed.join(", ") : "(any)"
21873
+ }
21874
+ )
21831
21875
  ] }),
21832
- selected && rationale && rationale.trim().length > 0 && /* @__PURE__ */ jsx33(Box29, { paddingLeft: 2, children: /* @__PURE__ */ jsx33(Text30, { dimColor: true, children: (() => {
21876
+ selected && showRationale && rationale && rationale.trim().length > 0 && /* @__PURE__ */ jsx33(Box29, { paddingLeft: 2, children: /* @__PURE__ */ jsx33(Text30, { dimColor: true, children: (() => {
21833
21877
  const max = Math.max(8, width - 8);
21834
21878
  const text = `~ ${rationale}`;
21835
21879
  return text.length > max ? text.slice(0, max - 1) + "\u2026" : text;
@@ -21869,10 +21913,10 @@ function SlotRow({
21869
21913
  pickerCandidates,
21870
21914
  pickerCursor
21871
21915
  }) {
21872
- return /* @__PURE__ */ jsxs30(Box29, { flexDirection: "column", width, children: [
21873
- /* @__PURE__ */ jsxs30(Box29, { gap: 1, flexWrap: "wrap", children: [
21916
+ return /* @__PURE__ */ jsxs30(Box29, { flexDirection: "column", width, flexShrink: 0, children: [
21917
+ /* @__PURE__ */ jsxs30(Box29, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: [
21874
21918
  /* @__PURE__ */ jsx33(RowLabel, { name: slot.name, selected }),
21875
- /* @__PURE__ */ jsx33(InlinePropField, { label: "req:", selected, focused: activeField === "required", children: /* @__PURE__ */ jsx33(Toggle, { value: slot.required, active: editingField && activeField === "required" }) })
21919
+ /* @__PURE__ */ jsx33(InlinePropField, { label: "req:", selected, focused: activeField === "required", width, children: /* @__PURE__ */ jsx33(Toggle, { value: slot.required, active: editingField && activeField === "required" }) })
21876
21920
  ] }),
21877
21921
  !selected && /* @__PURE__ */ jsxs30(Box29, { paddingLeft: 2, gap: 1, flexWrap: "wrap", children: [
21878
21922
  /* @__PURE__ */ jsxs30(
@@ -22070,6 +22114,8 @@ function FieldEditor({
22070
22114
  const [parseErr] = useState15(parseError);
22071
22115
  const [listScrollStart, setListScrollStart] = useState15(0);
22072
22116
  const initialFocusScrollApplied = React14.useRef(false);
22117
+ const [rowHeights, setRowHeights] = useState15({});
22118
+ const rowMeasureRefs = React14.useRef(/* @__PURE__ */ new Map());
22073
22119
  const initialFocus = (() => {
22074
22120
  if (initialFocusTarget?.kind === "description") {
22075
22121
  return {
@@ -22174,9 +22220,21 @@ function FieldEditor({
22174
22220
  );
22175
22221
  const propGroups = React14.useMemo(
22176
22222
  () => [
22177
- { kind: "content", label: "\u2500\u2500 CONTENT PROPERTIES", indexes: contentPropIndexes },
22178
- { kind: "design", label: "\u2500\u2500 DESIGN PROPERTIES", indexes: designPropIndexes },
22179
- { kind: "hidden", label: "\u2500\u2500 OTHER / HIDDEN", indexes: hiddenPropIndexes }
22223
+ {
22224
+ kind: "content",
22225
+ label: "\u2500\u2500 CONTENT PROPERTIES",
22226
+ indexes: contentPropIndexes
22227
+ },
22228
+ {
22229
+ kind: "design",
22230
+ label: "\u2500\u2500 DESIGN PROPERTIES",
22231
+ indexes: designPropIndexes
22232
+ },
22233
+ {
22234
+ kind: "hidden",
22235
+ label: "\u2500\u2500 OTHER / HIDDEN",
22236
+ indexes: hiddenPropIndexes
22237
+ }
22180
22238
  ],
22181
22239
  [contentPropIndexes, designPropIndexes, hiddenPropIndexes]
22182
22240
  );
@@ -22263,6 +22321,12 @@ function FieldEditor({
22263
22321
  }
22264
22322
  return;
22265
22323
  }
22324
+ if (key.ctrl && input === "s") {
22325
+ initialStateRef.current = editorState;
22326
+ onDirtyChange?.(false);
22327
+ onSave();
22328
+ return;
22329
+ }
22266
22330
  const inDescriptionTextEntryForHelp = focusLevel === "field" && editingField && activeField === "description";
22267
22331
  const inStringDefaultTextEntryForHelp = focusLevel === "field" && editingField && activeField === "default" && currentProp != null && (currentProp.type === "string" || currentProp.type === "token");
22268
22332
  const inValueListTextEntry = editingValue != null;
@@ -22384,12 +22448,6 @@ function FieldEditor({
22384
22448
  }
22385
22449
  return;
22386
22450
  }
22387
- if (key.ctrl && input === "s") {
22388
- initialStateRef.current = editorState;
22389
- onDirtyChange?.(false);
22390
- onSave();
22391
- return;
22392
- }
22393
22451
  const inStringDefaultTextEntry = focusLevel === "field" && editingField && activeField === "default" && currentProp != null && (currentProp.type === "string" || currentProp.type === "token");
22394
22452
  const rationaleKeyAllowed = !key.ctrl && !key.meta && !inDescriptionTextEntry && !inComponentDescTextEntry && !inStringDefaultTextEntry && !inValueListTextEntry;
22395
22453
  if (input === propRationaleKey && rationaleKeyAllowed && onTogglePropRationale) {
@@ -22716,18 +22774,18 @@ function FieldEditor({
22716
22774
  setValueCursor((c2) => c2 - 1);
22717
22775
  return;
22718
22776
  }
22719
- if (input === "K" && valueCursor > 0) {
22720
- const nextVals = swapValues(currentValueList, valueCursor - 1, valueCursor);
22721
- setCurrentValueList(nextVals);
22722
- setValueCursor((c2) => c2 - 1);
22723
- return;
22724
- }
22725
22777
  if (key.shift && key.downArrow && valueCursor < currentValueList.length - 1) {
22726
22778
  const nextVals = swapValues(currentValueList, valueCursor, valueCursor + 1);
22727
22779
  setCurrentValueList(nextVals);
22728
22780
  setValueCursor((c2) => c2 + 1);
22729
22781
  return;
22730
22782
  }
22783
+ if (input === "K" && valueCursor > 0) {
22784
+ const nextVals = swapValues(currentValueList, valueCursor - 1, valueCursor);
22785
+ setCurrentValueList(nextVals);
22786
+ setValueCursor((c2) => c2 - 1);
22787
+ return;
22788
+ }
22731
22789
  if (input === "J" && valueCursor < currentValueList.length - 1) {
22732
22790
  const nextVals = swapValues(currentValueList, valueCursor, valueCursor + 1);
22733
22791
  setCurrentValueList(nextVals);
@@ -22813,11 +22871,19 @@ function FieldEditor({
22813
22871
  rows.push({ kind: "component-description" });
22814
22872
  for (const group of propGroups.filter((candidate) => candidate.kind !== "hidden")) {
22815
22873
  if (group.indexes.length === 0) continue;
22816
- rows.push({ kind: "header", label: `${group.label} (${group.indexes.length}) `, section: group.kind });
22874
+ rows.push({
22875
+ kind: "header",
22876
+ label: `${group.label} (${group.indexes.length}) `,
22877
+ section: group.kind
22878
+ });
22817
22879
  group.indexes.forEach((idx) => rows.push({ kind: "prop", idx }));
22818
22880
  }
22819
22881
  if (slots.length > 0) {
22820
- rows.push({ kind: "header", label: `\u2500\u2500 SLOTS (${slots.length}) `, section: "slots" });
22882
+ rows.push({
22883
+ kind: "header",
22884
+ label: `\u2500\u2500 SLOTS (${slots.length}) `,
22885
+ section: "slots"
22886
+ });
22821
22887
  slots.forEach((_, i) => rows.push({ kind: "slot", idx: i }));
22822
22888
  }
22823
22889
  const hiddenGroup = propGroups.find((group) => group.kind === "hidden");
@@ -22832,28 +22898,150 @@ function FieldEditor({
22832
22898
  const selectedRowIdx = rows.findIndex(
22833
22899
  (r) => r.kind === "prop" && !inSlots && !inComponentDesc && r.idx === propIdx || r.kind === "slot" && inSlots && r.idx === slotIdx || r.kind === "component-description" && inComponentDesc
22834
22900
  );
22835
- const visibleRows = focusLevel === "field" || initialFocusTarget ? 1 : fixedHeight ? Math.max(1, Math.floor((height - 3) / 3)) : rows.length;
22901
+ const rowKey = (row, index) => {
22902
+ const selected = row.kind === "prop" && !inSlots && !inComponentDesc && row.idx === propIdx || row.kind === "slot" && inSlots && row.idx === slotIdx || row.kind === "component-description" && inComponentDesc;
22903
+ const base = row.kind === "component-description" || row.kind === "header" ? `${row.kind}-${index}` : `${row.kind}-${row.idx}`;
22904
+ return `${base}-${selected ? "selected" : "normal"}`;
22905
+ };
22906
+ const rowHeight = (row, index) => rowHeights[rowKey(row, index)] ?? 1;
22907
+ const contentHeight = Math.max(1, height - 2 - (hasEmptyProperties ? 1 : 0) - 1);
22908
+ const visibleEnd = (start) => {
22909
+ if (focusLevel === "field") return Math.min(rows.length, start + 1);
22910
+ let used = 0;
22911
+ let end2 = start;
22912
+ while (end2 < rows.length) {
22913
+ const nextHeight = rowHeight(rows[end2], end2);
22914
+ if (end2 > start && used + nextHeight > contentHeight) break;
22915
+ used += nextHeight;
22916
+ end2 += 1;
22917
+ }
22918
+ return Math.max(start + 1, end2);
22919
+ };
22836
22920
  useEffect8(() => {
22837
22921
  if (focusLevel === "field" || selectedRowIdx < 0) return;
22838
22922
  setListScrollStart((previous) => {
22839
- const maxStart = Math.max(0, rows.length - visibleRows);
22840
22923
  if (initialFocusTarget && !initialFocusScrollApplied.current) {
22841
22924
  initialFocusScrollApplied.current = true;
22842
- return Math.min(selectedRowIdx, maxStart);
22925
+ return Math.min(selectedRowIdx, Math.max(0, rows.length - 1));
22843
22926
  }
22844
- const clamped = Math.min(previous, maxStart);
22927
+ const clamped = Math.min(previous, Math.max(0, rows.length - 1));
22928
+ const end2 = visibleEnd(clamped);
22845
22929
  if (selectedRowIdx < clamped) return selectedRowIdx;
22846
- if (selectedRowIdx >= clamped + visibleRows) {
22847
- return Math.min(maxStart, selectedRowIdx - visibleRows + 1);
22930
+ if (selectedRowIdx >= end2) {
22931
+ let start = selectedRowIdx;
22932
+ let used = rowHeight(rows[selectedRowIdx], selectedRowIdx);
22933
+ while (start > 0) {
22934
+ const previousHeight = rowHeight(rows[start - 1], start - 1);
22935
+ if (used + previousHeight > contentHeight) break;
22936
+ start -= 1;
22937
+ used += previousHeight;
22938
+ }
22939
+ return start;
22848
22940
  }
22849
22941
  return clamped;
22850
22942
  });
22851
- }, [focusLevel, rows.length, selectedRowIdx, visibleRows]);
22852
- const scrollStart = Math.min(listScrollStart, Math.max(0, rows.length - visibleRows));
22853
- const nextHeader = rows.slice(scrollStart + visibleRows).find((row) => row.kind === "header");
22943
+ }, [contentHeight, focusLevel, rowHeights, rows, selectedRowIdx]);
22944
+ const scrollStart = Math.min(listScrollStart, Math.max(0, rows.length - 1));
22945
+ const end = visibleEnd(scrollStart);
22946
+ const nextHeader = rows.slice(end).find((row) => row.kind === "header");
22854
22947
  const categoryBelow = focusLevel !== "field" && nextHeader?.kind === "header" ? nextHeader.label.replace(/^──\s*/, "").trim() : null;
22855
- const visibleRowSlice = rows.slice(scrollStart, scrollStart + visibleRows);
22948
+ const visibleRowSlice = rows.slice(scrollStart, end);
22949
+ useLayoutEffect2(() => {
22950
+ const nextHeights = {};
22951
+ for (const [key, node] of rowMeasureRefs.current) {
22952
+ const measuredHeight = measureElement(node).height;
22953
+ if (measuredHeight > 0) nextHeights[key] = measuredHeight;
22954
+ }
22955
+ setRowHeights((previous) => {
22956
+ let changed = false;
22957
+ const next = { ...previous };
22958
+ for (const [key, height2] of Object.entries(nextHeights)) {
22959
+ if (next[key] !== height2) {
22960
+ next[key] = height2;
22961
+ changed = true;
22962
+ }
22963
+ }
22964
+ return changed ? next : previous;
22965
+ });
22966
+ });
22856
22967
  const focusedSlotPickerCandidates = focusLevel === "field" && inSlots && editingValue?.mode === "add" && activeField === "allowedComponents" && projectSlotGraph && currentComponentName && currentSlot ? computeAllowedComponentCandidates(projectSlotGraph, currentComponentName, slots, currentSlot.name) : null;
22968
+ const renderRow = (row, index) => {
22969
+ const key = rowKey(row, index);
22970
+ if (row.kind === "header") {
22971
+ return /* @__PURE__ */ jsx33(Text30, { bold: true, color: PALETTE.success, children: row.label }, key);
22972
+ }
22973
+ if (row.kind === "component-description") {
22974
+ const isSelected2 = inComponentDesc && active;
22975
+ const isEditing = isSelected2 && focusLevel === "field" && editingField && activeField === "description";
22976
+ return /* @__PURE__ */ jsx33(
22977
+ DescriptionField,
22978
+ {
22979
+ value: editorState.componentDescription,
22980
+ focused: isSelected2,
22981
+ editing: isEditing,
22982
+ textCursor,
22983
+ cursorVisible,
22984
+ width: innerWidth,
22985
+ label: "description:",
22986
+ compact: !isSelected2
22987
+ },
22988
+ key
22989
+ );
22990
+ }
22991
+ if (row.kind === "prop") {
22992
+ const p = props[row.idx];
22993
+ const isSelected2 = !inSlots && !inComponentDesc && row.idx === propIdx;
22994
+ const propMeta = metadata?.props?.[p.name];
22995
+ const commonRowProps2 = createCommonRowProps(
22996
+ isSelected2,
22997
+ focusLevel,
22998
+ editingField,
22999
+ textCursor,
23000
+ valueCursor,
23001
+ cursorVisible,
23002
+ editingValue,
23003
+ valueText,
23004
+ innerWidth
23005
+ );
23006
+ return /* @__PURE__ */ jsx33(
23007
+ PropRow,
23008
+ {
23009
+ prop: p,
23010
+ ...commonRowProps2,
23011
+ activeField: isSelected2 && focusLevel === "field" ? activeField : null,
23012
+ rationale: propMeta?.rationale ?? null,
23013
+ showRationale: showInlineRationales,
23014
+ rowKey: String(row.idx)
23015
+ },
23016
+ key
23017
+ );
23018
+ }
23019
+ const s = slots[row.idx];
23020
+ const isSelected = inSlots && row.idx === slotIdx;
23021
+ const slotPickerCandidates = isSelected && editingValue?.mode === "add" && activeField === "allowedComponents" && projectSlotGraph && currentComponentName ? computeAllowedComponentCandidates(projectSlotGraph, currentComponentName, slots, s.name) : null;
23022
+ const commonRowProps = createCommonRowProps(
23023
+ isSelected,
23024
+ focusLevel,
23025
+ editingField,
23026
+ textCursor,
23027
+ valueCursor,
23028
+ cursorVisible,
23029
+ editingValue,
23030
+ valueText,
23031
+ innerWidth
23032
+ );
23033
+ return /* @__PURE__ */ jsx33(
23034
+ SlotRow,
23035
+ {
23036
+ slot: s,
23037
+ ...commonRowProps,
23038
+ activeField: isSelected && focusLevel === "field" ? activeField : null,
23039
+ pickerCandidates: slotPickerCandidates,
23040
+ pickerCursor
23041
+ },
23042
+ key
23043
+ );
23044
+ };
22857
23045
  return /* @__PURE__ */ jsxs30(
22858
23046
  FixedPanel,
22859
23047
  {
@@ -22864,7 +23052,7 @@ function FieldEditor({
22864
23052
  borderColor: hasEmptyProperties ? PALETTE.warning : PALETTE.info,
22865
23053
  children: [
22866
23054
  hasEmptyProperties && /* @__PURE__ */ jsx33(Text30, { 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." }),
22867
- /* @__PURE__ */ jsx33(Box29, { flexDirection: "column", width: innerWidth, children: focusLevel === "field" && !inComponentDesc && currentProp ? /* @__PURE__ */ jsx33(
23055
+ /* @__PURE__ */ jsx33(Box29, { flexDirection: "column", width: innerWidth, flexShrink: 0, children: focusLevel === "field" && !inComponentDesc && currentProp ? /* @__PURE__ */ jsx33(
22868
23056
  PropRow,
22869
23057
  {
22870
23058
  prop: currentProp,
@@ -22877,7 +23065,8 @@ function FieldEditor({
22877
23065
  editingValue,
22878
23066
  valueText,
22879
23067
  width: innerWidth,
22880
- rationale: metadata?.props?.[currentProp.name]?.rationale ?? null
23068
+ rationale: metadata?.props?.[currentProp.name]?.rationale ?? null,
23069
+ showRationale: showInlineRationales
22881
23070
  }
22882
23071
  ) : focusLevel === "field" && inSlots && currentSlot ? /* @__PURE__ */ jsx33(
22883
23072
  SlotRow,
@@ -22895,100 +23084,41 @@ function FieldEditor({
22895
23084
  pickerCandidates: focusedSlotPickerCandidates,
22896
23085
  pickerCursor
22897
23086
  }
22898
- ) : visibleRowSlice.map((row, i) => {
22899
- if (row.kind === "header") {
22900
- return /* @__PURE__ */ jsx33(Text30, { bold: true, color: PALETTE.success, children: row.label }, `header-${i}`);
22901
- }
22902
- if (row.kind === "component-description") {
22903
- const isSelected2 = inComponentDesc && active;
22904
- const isEditing = isSelected2 && focusLevel === "field" && editingField && activeField === "description";
22905
- const desc = editorState.componentDescription;
22906
- return /* @__PURE__ */ jsx33(
22907
- DescriptionField,
22908
- {
22909
- value: desc,
22910
- focused: isSelected2,
22911
- editing: isEditing,
22912
- textCursor,
22913
- cursorVisible,
22914
- width: innerWidth,
22915
- label: "description:",
22916
- compact: !isSelected2
22917
- },
22918
- `component-description-${i}`
22919
- );
22920
- }
22921
- if (row.kind === "prop") {
22922
- const p = props[row.idx];
22923
- const isSelected2 = !inSlots && !inComponentDesc && row.idx === propIdx;
22924
- const propMeta = metadata?.props?.[p.name];
22925
- const commonRowProps2 = createCommonRowProps(
22926
- isSelected2,
22927
- focusLevel,
22928
- editingField,
22929
- textCursor,
22930
- valueCursor,
22931
- cursorVisible,
22932
- editingValue,
22933
- valueText,
22934
- innerWidth
22935
- );
22936
- return /* @__PURE__ */ jsx33(
22937
- PropRow,
22938
- {
22939
- prop: p,
22940
- ...commonRowProps2,
22941
- activeField: isSelected2 && focusLevel === "field" ? activeField : null,
22942
- rationale: showInlineRationales ? propMeta?.rationale ?? null : null,
22943
- rowKey: String(row.idx)
22944
- },
22945
- `prop-${row.idx}`
22946
- );
22947
- }
22948
- const s = slots[row.idx];
22949
- const isSelected = inSlots && row.idx === slotIdx;
22950
- const slotPickerCandidates = isSelected && editingValue?.mode === "add" && activeField === "allowedComponents" && projectSlotGraph && currentComponentName ? computeAllowedComponentCandidates(projectSlotGraph, currentComponentName, slots, s.name) : null;
22951
- const commonRowProps = createCommonRowProps(
22952
- isSelected,
22953
- focusLevel,
22954
- editingField,
22955
- textCursor,
22956
- valueCursor,
22957
- cursorVisible,
22958
- editingValue,
22959
- valueText,
22960
- innerWidth
22961
- );
23087
+ ) : visibleRowSlice.map((row, index) => {
23088
+ const absoluteIndex = scrollStart + index;
23089
+ const key = rowKey(row, absoluteIndex);
22962
23090
  return /* @__PURE__ */ jsx33(
22963
- SlotRow,
23091
+ Box29,
22964
23092
  {
22965
- slot: s,
22966
- ...commonRowProps,
22967
- activeField: isSelected && focusLevel === "field" ? activeField : null,
22968
- pickerCandidates: slotPickerCandidates,
22969
- pickerCursor
23093
+ ref: (node) => {
23094
+ if (node) rowMeasureRefs.current.set(key, node);
23095
+ else rowMeasureRefs.current.delete(key);
23096
+ },
23097
+ width: innerWidth,
23098
+ flexShrink: 0,
23099
+ children: renderRow(row, absoluteIndex)
22970
23100
  },
22971
- `slot-${row.idx}`
23101
+ `visible-${key}`
22972
23102
  );
22973
23103
  }) }),
22974
23104
  categoryBelow && /* @__PURE__ */ jsx33(Text30, { color: PALETTE.success, bold: true, children: `(${categoryBelow} below)` }),
22975
23105
  sourceOpen && !onToggleSourceExternal && (() => {
22976
23106
  const propMeta = !inSlots && !inComponentDesc && currentProp ? metadata?.props?.[currentProp.name] : void 0;
22977
23107
  const start = propMeta?.sourceStartLine ?? null;
22978
- const end = propMeta?.sourceEndLine ?? null;
23108
+ const end2 = propMeta?.sourceEndLine ?? null;
22979
23109
  const path = metadata?.sourcePath ?? null;
22980
23110
  const src = metadata?.componentSource ?? null;
22981
23111
  const headerPath = path ?? "<unknown source path>";
22982
- if (!start || !end || !src) {
23112
+ if (!start || !end2 || !src) {
22983
23113
  return /* @__PURE__ */ jsxs30(Box29, { flexDirection: "column", borderStyle: "single", borderColor: "gray", paddingX: 1, children: [
22984
23114
  /* @__PURE__ */ jsx33(Text30, { dimColor: true, bold: true, children: `source: ${headerPath}` }),
22985
23115
  /* @__PURE__ */ jsx33(Text30, { dimColor: true, children: "(no source location captured for this prop)" }),
22986
23116
  /* @__PURE__ */ jsx33(Text30, { dimColor: true, children: "[s] close" })
22987
23117
  ] });
22988
23118
  }
22989
- const lines = src.split("\n").slice(Math.max(0, start - 1), end);
23119
+ const lines = src.split("\n").slice(Math.max(0, start - 1), end2);
22990
23120
  return /* @__PURE__ */ jsxs30(Box29, { flexDirection: "column", borderStyle: "single", borderColor: "gray", paddingX: 1, children: [
22991
- /* @__PURE__ */ jsx33(Text30, { dimColor: true, bold: true, children: `${headerPath}: lines ${start}\u2013${end}` }),
23121
+ /* @__PURE__ */ jsx33(Text30, { dimColor: true, bold: true, children: `${headerPath}: lines ${start}\u2013${end2}` }),
22992
23122
  lines.map((ln, i) => /* @__PURE__ */ jsx33(Text30, { dimColor: true, children: ln }, `source-line-${i}`)),
22993
23123
  /* @__PURE__ */ jsx33(Text30, { dimColor: true, children: "[s] close \xB7 [Esc] close" })
22994
23124
  ] });
@@ -23015,7 +23145,6 @@ function FieldEditor({
23015
23145
  /* @__PURE__ */ jsx33(Text30, { children: " " }),
23016
23146
  /* @__PURE__ */ jsx33(Text30, { bold: true, children: "Panels" }),
23017
23147
  /* @__PURE__ */ jsx33(Text30, { children: " s toggle source-view for the current prop" }),
23018
- /* @__PURE__ */ jsx33(Text30, { children: " Ctrl+S save field edits" }),
23019
23148
  /* @__PURE__ */ jsx33(Text30, { children: " " + propRationaleKey.padEnd(16) + " toggle prop rationale panel" }),
23020
23149
  /* @__PURE__ */ jsx33(Text30, { children: " " + componentRationaleKey.padEnd(16) + " toggle component rationale panel" }),
23021
23150
  /* @__PURE__ */ jsx33(Text30, { children: " ? toggle this overlay" }),
@@ -26576,7 +26705,7 @@ function shouldBypassPreview(state) {
26576
26705
  return state.credentialsSkipped === true;
26577
26706
  }
26578
26707
  function buildSkippedPreviewTransition() {
26579
- return { step: "print-gate", serverPreview: null };
26708
+ return { step: "done", serverPreview: null };
26580
26709
  }
26581
26710
  function resolveCycleGateAction(opts) {
26582
26711
  if (!opts.hasCycles) return "proceed";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/experience-design-system-cli",
3
- "version": "2.34.5-dev-build-0dbc122c.0",
3
+ "version": "2.34.5-dev-build-5cdf5961.0",
4
4
  "description": "Contentful Experiences design system import CLI",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -41,8 +41,8 @@
41
41
  "svelte": "^5.56.4",
42
42
  "ts-morph": "^27.0.2",
43
43
  "typescript": "^5.9.3",
44
- "@contentful/experience-design-system-types": "2.34.5-dev-build-0dbc122c.0",
45
- "@contentful/experience-design-system-cli-v2": "2.34.5-dev-build-0dbc122c.0"
44
+ "@contentful/experience-design-system-types": "2.34.5-dev-build-5cdf5961.0",
45
+ "@contentful/experience-design-system-cli-v2": "2.34.5-dev-build-5cdf5961.0"
46
46
  },
47
47
  "devDependencies": {
48
48
  "@tsconfig/node24": "^24.0.4",
@@ -54,9 +54,9 @@
54
54
  "ink-testing-library": "^4.0.0",
55
55
  "typescript-eslint": "^8.67.0",
56
56
  "vitest": "^4.0.16",
57
- "@contentful/experience-design-system-extraction": "2.34.5-dev-build-0dbc122c.0",
58
- "@contentful/experience-design-system-client": "2.34.5-dev-build-0dbc122c.0",
59
- "@contentful/experience-design-system-generation": "2.34.5-dev-build-0dbc122c.0"
57
+ "@contentful/experience-design-system-client": "2.34.5-dev-build-5cdf5961.0",
58
+ "@contentful/experience-design-system-extraction": "2.34.5-dev-build-5cdf5961.0",
59
+ "@contentful/experience-design-system-generation": "2.34.5-dev-build-5cdf5961.0"
60
60
  },
61
61
  "repository": {
62
62
  "type": "git",
@@ -1,8 +0,0 @@
1
- import type { PushDecisionChoice } from './steps/PushDecisionGateStep.js';
2
- export type GateAction = 'save-and-push' | 'push-only' | 'save-only';
3
- /**
4
- * Maps a `PushDecisionGateStep` choice to the wizard action it triggers.
5
- * Centralizing this keeps the gate component free of wizard-side semantics
6
- * and gives us a unit-testable seam between UI choice and side-effect.
7
- */
8
- export declare function chooseGateAction(choice: PushDecisionChoice): GateAction;
@@ -1,12 +0,0 @@
1
- import React from 'react';
2
- export type PushDecisionChoice = 'both' | 'push-only' | 'save-only';
3
- type PushDecisionGateStepProps = {
4
- summary: string;
5
- context: string;
6
- fileList: string;
7
- onChoice: (choice: PushDecisionChoice) => void;
8
- onQuit: () => void;
9
- pushDisabled?: boolean;
10
- };
11
- export declare function PushDecisionGateStep({ summary, context, onChoice, onQuit, pushDisabled, }: PushDecisionGateStepProps): React.ReactElement;
12
- export {};
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- export type SaveConflictGateProps = {
3
- path: string;
4
- onOverwrite: () => void;
5
- onNew: () => void;
6
- onCancel: () => void;
7
- };
8
- export declare function SaveConflictGate({ path, onOverwrite, onNew, onCancel }: SaveConflictGateProps): React.ReactElement;