@contentful/experience-design-system-cli 2.34.5-dev-build-13ecfbdc.0 → 2.34.5-dev-build-5cd8bcd6.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-13ecfbdc.0",
3
+ "version": "2.34.5-dev-build-5cd8bcd6.0",
4
4
  "description": "Contentful Experiences design system import CLI",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -1,6 +1,8 @@
1
1
  export type CompositionCliOptions = {
2
2
  /** `--composition-refresh` — force edge emission to run even over resolved residue. */
3
3
  compositionRefresh?: boolean;
4
+ /** `--no-cache` — force the composition agent to rerun with the rest of the pipeline. */
5
+ noCache?: boolean;
4
6
  };
5
7
  export type ResolvedCompositionSources = {
6
8
  forceAgent: boolean;
@@ -1,3 +1,7 @@
1
1
  import type { Command } from 'commander';
2
+ export declare function resolveExtractNoCache(opts: {
3
+ cache?: boolean;
4
+ noCache?: boolean;
5
+ }): boolean;
2
6
  export declare function collectSourceFiles(directory: string, onProgress?: (scannedCount: number) => void): Promise<string[]>;
3
7
  export declare function registerInternalExtractCommand(program: Command): void;
@@ -40,6 +40,7 @@ export type FieldEditorProps = {
40
40
  name: string;
41
41
  };
42
42
  showHiddenProps?: boolean;
43
+ showInlineRationales?: boolean;
43
44
  };
44
45
  export declare function simulateGraphWithCandidate(projectSlotGraph: ComponentSlotInfo[], selfName: string, currentSlots: {
45
46
  name: string;
@@ -58,5 +59,5 @@ export declare function computeAllowedComponentReplacementCandidates(projectSlot
58
59
  name: string;
59
60
  allowedComponents: string[];
60
61
  }[], targetSlotName: string, replaceIndex: number): string[];
61
- export declare function FieldEditor({ value, width, height, active, onChange, onSave, onDiscard, onExit, metadata, onTogglePropRationale, propRationaleKey, onToggleComponentRationale, componentRationaleKey, onToggleSourceExternal, onTextEntryActiveChange, projectSlotGraph, currentComponentName, onDirtyChange, discardTrigger, initialFocusTarget, showHiddenProps, }: FieldEditorProps): React.ReactElement;
62
+ export declare function FieldEditor({ value, width, height, active, onChange, onSave, onDiscard, onExit, metadata, onTogglePropRationale, propRationaleKey, onToggleComponentRationale, componentRationaleKey, onToggleSourceExternal, onTextEntryActiveChange, projectSlotGraph, currentComponentName, onDirtyChange, discardTrigger, initialFocusTarget, showHiddenProps, showInlineRationales, }: FieldEditorProps): React.ReactElement;
62
63
  export {};
@@ -17,6 +17,9 @@ export interface GroupedSidebarProps {
17
17
  expandedGroups: Set<string>;
18
18
  onToggleExpanded: (rootName: string) => void;
19
19
  width: number;
20
+ height?: number;
21
+ title?: string;
22
+ wrapLabels?: boolean;
20
23
  focused: boolean;
21
24
  renderStatusByKey?: Map<string, RenderStatus>;
22
25
  previewAnnotationByKey?: Map<string, PreviewAnnotation>;
@@ -10,10 +10,12 @@ type HelpOverlayProps = {
10
10
  mode: 'analyze' | 'validate' | 'review';
11
11
  sections?: undefined;
12
12
  onClose: () => void;
13
+ handleInput?: boolean;
13
14
  } | {
14
15
  mode?: undefined;
15
16
  sections: HelpSection[];
16
17
  onClose: () => void;
18
+ handleInput?: boolean;
17
19
  };
18
20
  export declare function HelpOverlay(props: HelpOverlayProps): React.ReactElement;
19
21
  export {};
@@ -7,8 +7,9 @@ export type PreviewBadgeValue = {
7
7
  bold?: boolean;
8
8
  dim?: boolean;
9
9
  };
10
- export declare function PreviewBadge({ badge }: {
10
+ export declare function PreviewBadge({ badge, highlighted, }: {
11
11
  badge: PreviewBadgeValue | null;
12
+ highlighted?: boolean;
12
13
  }): React.ReactElement;
13
14
  type SidebarProps = {
14
15
  components: ReviewComponentSummary[];
@@ -8,15 +8,16 @@
8
8
  * binding (caller should NOT update state in that case).
9
9
  *
10
10
  * Supported bindings:
11
- * - j / downArrow → +1 line
12
- * - k / upArrow → -1 line
11
+ * - downArrow → +1 line
12
+ * - upArrow → -1 line
13
13
  * - Ctrl+d → +half-page (floor(panelHeight / 2))
14
14
  * - Ctrl+u → -half-page
15
15
  * - PageDown → +panelHeight
16
16
  * - PageUp → -panelHeight
17
17
  * - G → jump to maxOffset
18
18
  *
19
- * `g` (single-tap) and `gg` (double-tap → jump to 0) are handled separately
19
+ * `j`/`k` are intentionally not handled here because they are field-navigation
20
+ * keys in the editor. `g` (single-tap) and `gg` (double-tap → jump to 0) are handled separately
20
21
  * by the caller via a pending-flag ref, since they need transient state.
21
22
  */
22
23
  export type ScrollKeyState = {
@@ -16,4 +16,4 @@ export type ImmediateInputKey = {
16
16
  meta: boolean;
17
17
  };
18
18
  export type ImmediateInputHandler = (input: string, key: ImmediateInputKey) => void;
19
- export declare function useImmediateInput(handler: ImmediateInputHandler): void;
19
+ export declare function useImmediateInput(handler: ImmediateInputHandler, enabled?: boolean): void;
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  import type { CDFDocument, CDFComponentEntry, DTCGTokenEntry } from '@contentful/experience-design-system-types';
3
+ import { type AgentAuthStatus } from '@contentful/experience-design-system-generation';
3
4
  export declare function buildGenerateComponentsArgs(opts: {
4
5
  sessionId: string;
5
6
  tokensPath?: string;
@@ -59,5 +60,6 @@ export type WizardAppProps = {
59
60
  generatePromptPath?: string;
60
61
  skipMapTokens?: boolean;
61
62
  initialRawTokensPath?: string;
63
+ initialAgentAuth?: Promise<AgentAuthStatus>;
62
64
  };
63
- export declare function WizardApp({ initialSpaceId, initialEnvironmentId, initialCmaToken, initialHost, initialAgent, initialModel, bedrock, initialProjectPath, host, promptOverrides, noCache, livePreview, generatePromptPath, skipMapTokens, initialRawTokensPath, }?: WizardAppProps): React.ReactElement;
65
+ export declare function WizardApp({ initialSpaceId, initialEnvironmentId, initialCmaToken, initialHost, initialAgent, initialModel, bedrock, initialProjectPath, host, promptOverrides, noCache, livePreview, generatePromptPath, skipMapTokens, initialRawTokensPath, initialAgentAuth, }?: WizardAppProps): React.ReactElement;
@@ -0,0 +1,4 @@
1
+ export declare function CompactControlBar({ hasGroupRoots, searchActive }: {
2
+ hasGroupRoots: boolean;
3
+ searchActive: boolean;
4
+ }): import("react/jsx-runtime").JSX.Element;
@@ -1,15 +1,15 @@
1
- /** Sidebar height (rows) — unchanged whether or not the panel is open. */
2
- export declare const VISIBLE_COUNT = 20;
3
- /** Panel window ceiling (matches LineagePanel's DEFAULT_MAX_ROWS from L2b). */
4
- export declare const MAX_PANEL_ROWS = 15;
1
+ /** Maximum layout rows; the active terminal height determines the actual budget. */
2
+ export declare const VISIBLE_COUNT = 200;
3
+ /** Maximum supported panel window; normal terminals remain terminal-sized. */
4
+ export declare const MAX_PANEL_ROWS = 200;
5
5
  /** Floors — both surfaces stay usable even on a small terminal. */
6
6
  export declare const SIDEBAR_MIN = 4;
7
7
  export declare const MIN_PANEL_ROWS = 4;
8
8
  /**
9
9
  * Fallback when `stdout.rows` is unavailable (piped output, tests). No TTY
10
10
  * means Ink is not interactively repainting, so there is no flicker risk — we
11
- * assume enough height for the FULL sidebar (BASE_CHROME_OVERHEAD + the full
12
- * VISIBLE_COUNT) so the non-interactive render is complete and unclipped.
11
+ * assume enough height for a terminal-sized sidebar so the non-interactive
12
+ * render is complete and unclipped.
13
13
  */
14
14
  export declare const FALLBACK_ROWS = 40;
15
15
  /**
@@ -22,16 +22,13 @@ export declare const PANEL_BOX_CHROME = 6;
22
22
  /**
23
23
  * L2e — fixed vertical chrome around the sidebar in the BASE (no-panel) case,
24
24
  * counting EVERYTHING that is not a variable sidebar entry row: the wizard
25
- * header bar, the "✓ Extraction complete" + "Found N…" intro, the counter
26
- * strip (with its blank separator), the cycle banner, the nothing-selected /
25
+ * header bar, the counter strip (with its blank separator), the cycle banner,
26
+ * the nothing-selected /
27
27
  * AI-exclusion hint, the GroupedSidebar box borders + scroll indicator, the
28
- * focused-detail block, and the wrapping legend region. Measured via the PTY
29
- * harness against the react-ux-matrix fixture (cycles present = a tall case):
30
- * the base frame was 39 lines with a 20-row sidebar after the legend row-gap
31
- * compression, i.e. ≈19 lines of chrome. We use 20 for a one-line safety
32
- * margin so the total frame stays strictly within `stdout.rows`.
28
+ * focused-detail block, and the wrapping legend region. The value intentionally
29
+ * leaves a small safety margin so resize-induced wrapping does not overflow.
33
30
  */
34
- export declare const BASE_CHROME_OVERHEAD = 20;
31
+ export declare const BASE_CHROME_OVERHEAD = 18;
35
32
  export interface LineageLayoutInput {
36
33
  /** Terminal height in rows (`stdout.rows`, or the fallback). */
37
34
  rows: number;
@@ -48,9 +45,8 @@ export interface LineageLayout {
48
45
  }
49
46
  /**
50
47
  * The sidebar height is constant (the panel replaces it in the same slot, so
51
- * there is nothing to shrink). When the panel is open its entry window is sized
52
- * to fit the sidebar's footprint AND the terminal — never taller than the
53
- * sidebar was, so opening lineage cannot grow the frame past `rows`.
48
+ * there is nothing to shrink). Both values are derived from the terminal so
49
+ * resizing grows or shrinks the viewport without content-driven layout changes.
54
50
  */
55
51
  export declare function computeLineageLayout({ rows, panelOpen, entryCount }: LineageLayoutInput): LineageLayout;
56
52
  export interface SidebarBudget {
@@ -61,12 +57,9 @@ export interface SidebarBudget {
61
57
  }
62
58
  /**
63
59
  * L2e — autoscale the BASE frame to the terminal height. Even with the lineage
64
- * panel closed, a fixed 20-row sidebar plus the always-on chrome can exceed a
65
- * small terminal's rows, so plain Ink (no alt-screen) full-repaints (`\x1b[2J`)
66
- * on every cursor move = flicker. This sizes the sidebar's visible-row budget
67
- * from `stdout.rows` minus `BASE_CHROME_OVERHEAD` so the whole frame fits at
68
- * 24/30/40 rows, and unifies the panel-open sizing with `computeLineageLayout`
69
- * so BOTH cases stay within the terminal.
60
+ * panel closed, the visible-row budget follows `stdout.rows` minus
61
+ * `BASE_CHROME_OVERHEAD` so the whole frame stays within the terminal while
62
+ * preserving the shared panel-open sizing behavior.
70
63
  *
71
64
  * Floor: `BASE_CHROME_OVERHEAD + SIDEBAR_MIN`. Below it `SIDEBAR_MIN`
72
65
  * (usability) intentionally wins over the fit — a terminal that small can't
@@ -5,4 +5,5 @@ export declare function runSelectionAgent(options: {
5
5
  model?: string;
6
6
  promptText?: string;
7
7
  promptPath?: string;
8
+ noCache?: boolean;
8
9
  }): Promise<void>;
@@ -4,23 +4,29 @@ export interface ScopeComponentLike {
4
4
  name: string;
5
5
  }
6
6
  export type Decision = 'accepted' | 'rejected' | 'undecided';
7
+ export declare const SCOPE_GATE_MAIN_COLUMN_WIDTH = 54;
8
+ export declare const ACCEPTED_COMPONENTS_COLUMN_WIDTH = 36;
9
+ export interface ScopeGatePanelLayout {
10
+ height: number;
11
+ mainVisibleCount: number;
12
+ sideVisibleCount: number;
13
+ }
14
+ /**
15
+ * All scope-gate panels share one terminal-sized frame. Panels with a header
16
+ * therefore receive the same content rows because every scope-gate panel has
17
+ * the same header and indicator chrome.
18
+ */
19
+ export declare function computePanelLayout(mainVisibleCount: number): ScopeGatePanelLayout;
7
20
  export declare function computeColumnWidths(totalWidth: number): {
8
- layout: 'single' | 'three-column';
21
+ layout: 'single' | 'two-column';
9
22
  main: number;
10
23
  added: number;
11
- groups: number;
12
24
  };
13
25
  export interface AddedComponentEntry {
14
26
  name: string;
15
27
  isCycle: boolean;
16
28
  }
17
- export interface AddedGroupEntry {
18
- name: string;
19
- depCount: number;
20
- isCycle: boolean;
21
- }
22
29
  export declare function buildAddedComponentsList(components: ScopeComponentLike[], stateByKey: Map<string, Decision>, cycleParticipants?: Set<string>): AddedComponentEntry[];
23
- export declare function buildAddedGroupsList(closures: Map<string, Closure>, stateByKey: Map<string, Decision>, cycleParticipants?: Set<string>, cycleUnits?: Map<string, Set<string>>): AddedGroupEntry[];
24
30
  export declare function computeCounters(components: ScopeComponentLike[], closures: Map<string, Closure>, stateByKey: Map<string, Decision>): {
25
31
  accepted: number;
26
32
  rejected: number;
@@ -14,12 +14,15 @@ type CredentialsStepProps = {
14
14
  * (Change 1 of the wizard prefetch refactor).
15
15
  */
16
16
  validating?: boolean;
17
+ /** Background validation of unchanged prefilled credentials; input remains editable. */
18
+ backgroundValidating?: boolean;
17
19
  /** Inline status describing in-flight background generation prefetch. */
18
20
  generatePrefetchStatus?: 'idle' | 'running' | 'complete' | 'failed';
19
21
  /** Error message from a failed generation prefetch (rendered as a banner). */
20
22
  generatePrefetchError?: string | null;
21
23
  /** Called when the user submits with any field changed from its initial value */
22
24
  onConfirm: (spaceId: string, environmentId: string, cmaToken: string, host: string) => void;
25
+ onValuesChange?: (spaceId: string, environmentId: string, cmaToken: string, host: string) => void;
23
26
  /** Called when the user submits without changing any field (use existing creds as-is) */
24
27
  onContinue?: (spaceId: string, environmentId: string, cmaToken: string, host: string) => void;
25
28
  onQuit: () => void;
@@ -36,5 +39,5 @@ type CredentialsStepProps = {
36
39
  */
37
40
  onSkip?: () => void;
38
41
  };
39
- export declare function CredentialsStep({ summary, error: externalError, initialSpaceId, initialEnvironmentId, initialCmaToken, initialHost, validating, generatePrefetchStatus, generatePrefetchError, onConfirm, onContinue, onQuit, onRetryPrefetch, onSkip, }: CredentialsStepProps): React.ReactElement;
42
+ export declare function CredentialsStep({ summary, error: externalError, initialSpaceId, initialEnvironmentId, initialCmaToken, initialHost, validating, backgroundValidating, generatePrefetchStatus, generatePrefetchError, onConfirm, onValuesChange, onContinue, onQuit, onRetryPrefetch, onSkip, }: CredentialsStepProps): React.ReactElement;
40
43
  export {};
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  type GateStepProps = {
3
3
  successMessage: string;
4
4
  summary?: string;
5
- context: string;
5
+ context?: string;
6
6
  continueLabel?: string;
7
7
  skipLabel?: string;
8
8
  onContinue: () => void;
@@ -5,9 +5,20 @@ type RunningStepProps = {
5
5
  title: string;
6
6
  description: string;
7
7
  detail?: string;
8
+ detailComplete?: boolean;
8
9
  /** Optional second progress line (own spinner) — e.g. composition resolution
9
10
  * running after the file scan on the extracting screen. */
10
11
  secondaryDetail?: string;
12
+ secondaryComplete?: boolean;
13
+ /** Optional third progress line for another concurrent stage. */
14
+ tertiaryDetail?: string;
15
+ tertiaryComplete?: boolean;
16
+ /** Optional fourth progress line for another concurrent stage. */
17
+ quaternaryDetail?: string;
18
+ quaternaryComplete?: boolean;
19
+ /** Optional fifth progress line for another concurrent stage. */
20
+ quinaryDetail?: string;
21
+ quinaryComplete?: boolean;
11
22
  };
12
- export declare function RunningStep({ stepNumber, totalSteps, title, description, detail, secondaryDetail, }: RunningStepProps): React.ReactElement;
23
+ export declare function RunningStep({ stepNumber, totalSteps, title, description, detail, detailComplete, secondaryDetail, secondaryComplete, tertiaryDetail, tertiaryComplete, quaternaryDetail, quaternaryComplete, quinaryDetail, quinaryComplete, }: RunningStepProps): React.ReactElement;
13
24
  export {};
@@ -5,6 +5,7 @@ export interface PreviewDiffLine {
5
5
  color: string;
6
6
  text: string;
7
7
  }
8
+ export declare function buildPreviewSummaryLines(preview: ServerPreviewResponse): PreviewDiffLine[];
8
9
  export declare function buildPreviewDiffLines(preview: ServerPreviewResponse): PreviewDiffLine[];
9
10
  type WizardPreviewStepProps = {
10
11
  preview: ServerPreviewResponse;
@@ -6,6 +6,12 @@ export declare function nextStepAfterScopeGate(opts: {
6
6
  export declare function nextStepAfterCredentialsValidated(opts: {
7
7
  acceptedCount: number;
8
8
  }): WizardStepAfterCredentials;
9
+ export declare function shouldGenerateAfterScopeGate(opts: {
10
+ acceptedCount: number;
11
+ }): boolean;
12
+ export declare function shouldGenerateAfterCredentialsValidated(opts: {
13
+ acceptedCount: number;
14
+ }): boolean;
9
15
  export declare function shouldSkipFinalReviewAfterCredentials(state: {
10
16
  generateSessionId: string | null;
11
17
  finalReviewPassed: boolean;
@@ -17,7 +23,7 @@ export declare function shouldBypassPreview(state: {
17
23
  credentialsSkipped: boolean;
18
24
  }): boolean;
19
25
  export declare function buildSkippedPreviewTransition(): {
20
- step: 'push-decision-gate';
26
+ step: 'print-gate';
21
27
  serverPreview: null;
22
28
  };
23
29
  export type CycleGateAction = 'block' | 'proceed';