@contentful/experience-design-system-cli 2.33.1-dev-build-1b6f259.0 → 2.33.1-dev-build-db909d4.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.
Files changed (89) hide show
  1. package/dist/package.json +2 -1
  2. package/dist/src/analytics/env.d.ts +2 -0
  3. package/dist/src/analytics/exit.d.ts +1 -0
  4. package/dist/src/analytics/index.d.ts +9 -5
  5. package/dist/src/analytics/tracker.d.ts +1 -0
  6. package/dist/src/analyze/build-analyze-view-rows.d.ts +11 -0
  7. package/dist/src/analyze/composite-closure.d.ts +1 -2
  8. package/dist/src/analyze/issue-inheritance.d.ts +4 -0
  9. package/dist/src/analyze/select/index.d.ts +6 -0
  10. package/dist/src/analyze/select/stdout.d.ts +7 -0
  11. package/dist/src/analyze/select/tui/components/ComponentRationalePanel.d.ts +16 -0
  12. package/dist/src/analyze/select/tui/components/FieldEditor.d.ts +2 -2
  13. package/dist/src/analyze/select/tui/components/RationalePanel.d.ts +12 -0
  14. package/dist/src/analyze/select/tui/components/Sidebar.d.ts +2 -6
  15. package/dist/src/analyze/select/tui/hooks/useImmediateInput.d.ts +4 -3
  16. package/dist/src/analyze/select/tui/theme.d.ts +1 -0
  17. package/dist/src/analyze/select-agent/context-builder.d.ts +3 -3
  18. package/dist/src/analyze/select-agent/show-rationale.d.ts +26 -0
  19. package/dist/src/apply/api-client.d.ts +3 -1
  20. package/dist/src/host-utils.d.ts +1 -0
  21. package/dist/src/import/orchestrator.d.ts +1 -0
  22. package/dist/src/import/picker-dispatch.d.ts +0 -2
  23. package/dist/src/import/print-prompt.d.ts +1 -0
  24. package/dist/src/import/tui/auto-filter-error.d.ts +1 -0
  25. package/dist/src/import/tui/final-review-host.d.ts +12 -2
  26. package/dist/src/import/tui/history.d.ts +1 -2
  27. package/dist/src/import/tui/scope-gate-columns.d.ts +1 -0
  28. package/dist/src/import/tui/scope-gate-host.d.ts +1 -1
  29. package/dist/src/import/tui/steps/AtomicGenerateReviewStep.d.ts +15 -0
  30. package/dist/src/import/tui/steps/GenerateReviewStep.d.ts +14 -2
  31. package/dist/src/import/tui/steps/PreviewStep.d.ts +21 -0
  32. package/dist/src/import/tui/useFinalizePreview.d.ts +1 -9
  33. package/dist/src/import/tui/useLivePreview.d.ts +1 -2
  34. package/dist/src/index.js +5859 -5711
  35. package/dist/src/lib/agent-model-options.d.ts +1 -0
  36. package/dist/src/lib/contentful-urls.d.ts +7 -2
  37. package/dist/src/lib/error-parser.d.ts +1 -2
  38. package/dist/src/lib/terminal-capabilities.d.ts +2 -3
  39. package/dist/src/map-tokens/resolve-defaults.d.ts +2 -3
  40. package/dist/src/runs/export-helpers.d.ts +14 -0
  41. package/dist/src/runs/fingerprint.d.ts +1 -2
  42. package/dist/src/runs/push-helpers.d.ts +5 -0
  43. package/dist/src/runs/run-picker.d.ts +1 -2
  44. package/dist/src/runs/store.d.ts +5 -3
  45. package/dist/src/session/db.d.ts +19 -0
  46. package/dist/src/session/migration.d.ts +2 -0
  47. package/dist/src/session/stats.d.ts +1 -0
  48. package/dist/src/setup/command.d.ts +5 -0
  49. package/dist/src/types.d.ts +13 -1
  50. package/package.json +7 -6
  51. package/dist/src/analyze/select/tui/components/HighlightedLine.d.ts +0 -9
  52. package/dist/src/analyze/select/tui/components/RationaleLine.d.ts +0 -21
  53. package/dist/src/analyze/select/tui/components/ScrollablePanel.d.ts +0 -14
  54. package/dist/src/analyze/select/tui/components/wrap-text.d.ts +0 -1
  55. package/dist/src/analyze/select/tui/hooks/list-scroll-input.d.ts +0 -13
  56. package/dist/src/import/composition-options.d.ts +0 -17
  57. package/dist/src/import/tui/components/LivePreviewSummary.d.ts +0 -14
  58. package/dist/src/import/tui/components/ReviewComponentPanel.d.ts +0 -33
  59. package/dist/src/import/tui/components/ReviewDetailsEditor.d.ts +0 -13
  60. package/dist/src/import/tui/components/ReviewDialogs.d.ts +0 -28
  61. package/dist/src/import/tui/components/ReviewStatus.d.ts +0 -20
  62. package/dist/src/import/tui/components/SearchMatchSummary.d.ts +0 -11
  63. package/dist/src/import/tui/components/SpaceEnvironment.d.ts +0 -7
  64. package/dist/src/import/tui/components/StepHeader.d.ts +0 -8
  65. package/dist/src/import/tui/hooks/review-input.d.ts +0 -39
  66. package/dist/src/import/tui/hooks/sidebar-search-state.d.ts +0 -17
  67. package/dist/src/import/tui/hooks/useReviewEditor.d.ts +0 -49
  68. package/dist/src/import/tui/hooks/useReviewPreview.d.ts +0 -26
  69. package/dist/src/import/tui/hooks/useReviewSession.d.ts +0 -74
  70. package/dist/src/import/tui/hooks/useReviewSurfaceState.d.ts +0 -12
  71. package/dist/src/import/tui/lineage-input.d.ts +0 -18
  72. package/dist/src/import/tui/preview-confirmation-input.d.ts +0 -6
  73. package/dist/src/import/tui/review-step-props.d.ts +0 -14
  74. package/dist/src/import/tui/sidebar-help.d.ts +0 -2
  75. package/dist/src/import/tui/sidebar-input.d.ts +0 -13
  76. package/dist/src/import/tui/sidebar-navigation.d.ts +0 -18
  77. package/dist/src/import/tui/steps/review-details-panel.d.ts +0 -26
  78. package/dist/src/import/tui/steps/useTerminalColumns.d.ts +0 -1
  79. package/dist/src/lib/agent-output.d.ts +0 -5
  80. package/dist/src/lib/component-patch.d.ts +0 -12
  81. package/dist/src/lib/path-exists.d.ts +0 -1
  82. package/dist/src/print/validate/validators/read-json-file.d.ts +0 -10
  83. package/dist/src/runs/wizard-launcher.d.ts +0 -2
  84. package/dist/src/runs/wizard-seed.d.ts +0 -20
  85. package/dist/src/session/resolve-session-id.d.ts +0 -1
  86. package/dist/src/setup/prompt-helpers.d.ts +0 -1
  87. package/dist/src/tui/CommandCompletionView.d.ts +0 -13
  88. package/dist/src/tui/use-blinking-cursor.d.ts +0 -1
  89. package/dist/src/tui/use-timed-spinner.d.ts +0 -5
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/experience-design-system-cli",
3
- "version": "2.33.1-dev-build-1b6f259.0",
3
+ "version": "2.33.1-dev-build-db909d4.0",
4
4
  "description": "Contentful Experiences design system import CLI",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -47,6 +47,7 @@
47
47
  "ink": "^5.2.1",
48
48
  "react": "^18.3.1",
49
49
  "react-devtools-core": "^4.19.1",
50
+ "react-dom": "^18.3.1",
50
51
  "svelte": "^5.56.4",
51
52
  "ts-morph": "^27.0.2",
52
53
  "typescript": "^5.9.3"
@@ -1,2 +1,4 @@
1
+ /** Merge pipeline analytics env into a subprocess environment. */
2
+ export declare function analyticsEnvForSubprocess(env: NodeJS.ProcessEnv, analyticsSessionId: string): NodeJS.ProcessEnv;
1
3
  /** Debug + pipeline analytics env for orchestrator subprocesses. */
2
4
  export declare function pipelineSubprocessEnv(env: NodeJS.ProcessEnv, analyticsSessionId: string): NodeJS.ProcessEnv;
@@ -2,3 +2,4 @@ import type { ApiError } from '../apply/api-client.js';
2
2
  import type { CommandFailure } from './types.js';
3
3
  export declare function exitWithAnalytics(code: number, fields?: CommandFailure): Promise<never>;
4
4
  export declare function failureFromApiError(error: ApiError): CommandFailure;
5
+ export declare function failureFromUnknown(error: unknown): CommandFailure;
@@ -1,6 +1,10 @@
1
- export { exitWithAnalytics, failureFromApiError } from './exit.js';
2
- export { flushAnalytics, setPersistedAnalyticsDisabled } from './client.js';
3
- export { isPipelineAnalyticsChild } from './session.js';
4
- export { bindAnalyticsSession, bindAnalyticsSessionId, completeActiveCommand, emitSessionStarted, enrichCommandResult, failActiveCommand, noteCommandStart, } from './tracker.js';
1
+ export { ANALYTICS_SESSION_ENV, IMPORT_PIPELINE_ENV } from './constants.js';
2
+ export { analyticsEnvForSubprocess, pipelineSubprocessEnv } from './env.js';
3
+ export { exitWithAnalytics, failureFromApiError, failureFromUnknown } from './exit.js';
4
+ export { analyticsEnabled, cliVersion, flushAnalytics, resetAnalyticsClientForTests, setPersistedAnalyticsDisabled, trackEvent, } from './client.js';
5
+ export { isPipelineAnalyticsChild, resolveAnalyticsSessionId } from './session.js';
6
+ export { normalizeCommand } from './normalize.js';
7
+ export { getOsName } from './os.js';
8
+ export { bindAnalyticsSession, bindAnalyticsSessionId, completeActiveCommand, emitSessionStarted, enrichCommandResult, failActiveCommand, getBoundSessionId, noteCommandStart, resetAnalyticsStateForTests, setCommandContext, } from './tracker.js';
5
9
  export { recordApplyOutcome, recordContentfulContext } from './apply.js';
6
- export type { CommandFailure } from './types.js';
10
+ export type { CommandCompletion, CommandContext, CommandFailure, DsiCliCommand, EntryCommand, OsName, WriteResult, } from './types.js';
@@ -7,6 +7,7 @@ export declare function bindAnalyticsSessionId(sessionId: string | undefined, co
7
7
  export declare function setCommandContext(context: CommandContext): void;
8
8
  /** Merge optional completion fields before the terminal event fires. */
9
9
  export declare function enrichCommandResult(fields: CommandCompletion): void;
10
+ export declare function getBoundSessionId(): string | undefined;
10
11
  /** Bind the pipeline session and emit invoked once both command and session are known. */
11
12
  export declare function bindAnalyticsSession(id: string, context?: CommandContext): Promise<void>;
12
13
  /** Emit session_started once per new pipeline head. */
@@ -1,6 +1,17 @@
1
1
  import type { RawComponentDefinition } from '../types.js';
2
2
  import type { AnalyzeViewResult } from './tui/AnalyzeView.js';
3
3
  type AnalyzeViewRow = AnalyzeViewResult['components'][number];
4
+ /**
5
+ * Convention used by both halves of the warnings split:
6
+ * per-component warnings start with `<ComponentName>:` and are attached to
7
+ * the matching row by `buildAnalyzeViewRows` below; everything else falls
8
+ * through to `partitionGlobalWarnings` and renders at the top of the panel.
9
+ *
10
+ * Centralized so the two halves can't drift. If the prefix shape ever changes
11
+ * (e.g. requiring a space after the colon), update `WARNING_PREFIX_SUFFIX`
12
+ * and both call sites pick it up.
13
+ */
14
+ export declare const WARNING_PREFIX_SUFFIX = ":";
4
15
  export declare function isWarningForComponent(warning: string, componentName: string): boolean;
5
16
  /**
6
17
  * Split warnings into "global" (none of the surviving component-name prefixes
@@ -5,7 +5,7 @@ export interface ComponentGraphNode {
5
5
  allowedComponents?: string[];
6
6
  }>;
7
7
  }
8
- interface ClosureNode {
8
+ export interface ClosureNode {
9
9
  name: string;
10
10
  depth: number;
11
11
  path: string[];
@@ -23,4 +23,3 @@ export declare function computeClosure(root: string, components: ComponentGraphN
23
23
  export declare function computeAllClosures(components: ComponentGraphNode[], selected?: Set<string>): Map<string, Closure>;
24
24
  export declare function aggregateStatus(closure: Closure, perNodeStatus: Map<string, NodeStatus>): NodeStatus;
25
25
  export declare function findSharedDeps(closures: Map<string, Closure>): Map<string, string[]>;
26
- export {};
@@ -1,4 +1,8 @@
1
1
  import type { Closure, NodeStatus } from './composite-closure.js';
2
+ export interface IssueLocation {
3
+ component: string;
4
+ status: NodeStatus;
5
+ }
2
6
  export interface RenderStatus {
3
7
  status: NodeStatus;
4
8
  isOwn: boolean;
@@ -0,0 +1,6 @@
1
+ export { registerAnalyzeEditCommand } from './command.js';
2
+ export { loadReviewInput } from './parser.js';
3
+ export { appendReviewEvent, ensureRefineSession, getRefineArtifactsRoot, getRefineSessionPaths, saveReviewState, } from './persistence.js';
4
+ export { formatFinalizeContract } from './stdout.js';
5
+ export type { ReviewComponentRecord, ReviewComponentSummary, ReviewComponentStatus, ReviewEvent, ReviewSessionPaths, ReviewSessionSnapshot, ReviewSessionSummary, } from './types.js';
6
+ export { createReviewSessionSummary } from './types.js';
@@ -0,0 +1,7 @@
1
+ export type FinalizeContractInput = {
2
+ sessionDir: string;
3
+ accepted: number;
4
+ rejected: number;
5
+ excluded: number;
6
+ };
7
+ export declare function formatFinalizeContract(input: FinalizeContractInput): string;
@@ -7,4 +7,20 @@ export type ComponentRationalePanelProps = {
7
7
  height: number;
8
8
  active: boolean;
9
9
  };
10
+ type RenderedLine = {
11
+ kind: 'heading';
12
+ text: string;
13
+ } | {
14
+ kind: 'text';
15
+ text: string;
16
+ dim?: boolean;
17
+ } | {
18
+ kind: 'list-name';
19
+ text: string;
20
+ sublabel?: string;
21
+ } | {
22
+ kind: 'blank';
23
+ };
24
+ export declare function renderComponentRationaleLines(data: ComponentRationale, innerWidth: number): RenderedLine[];
10
25
  export declare function ComponentRationalePanel({ data, scrollOffset, width, height, active, }: ComponentRationalePanelProps): React.ReactElement;
26
+ export {};
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { findSlotCycles, type ComponentSlotInfo } from '../../../cycle-detection.js';
3
- type PropMetadata = {
3
+ export type PropMetadata = {
4
4
  rationale?: string | null;
5
5
  sourceStartLine?: number | null;
6
6
  sourceEndLine?: number | null;
@@ -13,7 +13,7 @@ export type FieldEditorMetadata = {
13
13
  /** Per-prop metadata keyed by prop name. */
14
14
  props?: Record<string, PropMetadata>;
15
15
  };
16
- export type FieldEditorProps = {
16
+ type FieldEditorProps = {
17
17
  value: string;
18
18
  width: number;
19
19
  height: number;
@@ -12,4 +12,16 @@ export type RationalePanelProps = {
12
12
  height: number;
13
13
  active: boolean;
14
14
  };
15
+ type RenderedLine = {
16
+ kind: 'name';
17
+ text: string;
18
+ isSlot: boolean;
19
+ } | {
20
+ kind: 'text';
21
+ text: string;
22
+ } | {
23
+ kind: 'blank';
24
+ };
25
+ export declare function renderRationaleLines(rows: RationaleRow[], innerWidth: number): RenderedLine[];
15
26
  export declare function RationalePanel({ componentName, rows, scrollOffset, width, height, active, }: RationalePanelProps): React.ReactElement;
27
+ export {};
@@ -1,15 +1,11 @@
1
1
  import React from 'react';
2
2
  import type { PreviewAnnotation, ReviewComponentSummary, ReviewComponentStatus } from '../../types.js';
3
- export declare function previewBadge(annotation: PreviewAnnotation | undefined): PreviewBadgeValue | null;
4
- export type PreviewBadgeValue = {
3
+ export declare function previewBadge(annotation: PreviewAnnotation | undefined): {
5
4
  char: string;
6
5
  color: string;
7
6
  bold?: boolean;
8
7
  dim?: boolean;
9
- };
10
- export declare function PreviewBadge({ badge }: {
11
- badge: PreviewBadgeValue | null;
12
- }): React.ReactElement;
8
+ } | null;
13
9
  type SidebarProps = {
14
10
  components: ReviewComponentSummary[];
15
11
  selectedId: string | null;
@@ -1,4 +1,4 @@
1
- export type ImmediateInputKey = {
1
+ type Key = {
2
2
  upArrow: boolean;
3
3
  downArrow: boolean;
4
4
  leftArrow: boolean;
@@ -15,5 +15,6 @@ export type ImmediateInputKey = {
15
15
  delete: boolean;
16
16
  meta: boolean;
17
17
  };
18
- export type ImmediateInputHandler = (input: string, key: ImmediateInputKey) => void;
19
- export declare function useImmediateInput(handler: ImmediateInputHandler): void;
18
+ type InputHandler = (input: string, key: Key) => void;
19
+ export declare function useImmediateInput(handler: InputHandler): void;
20
+ export {};
@@ -11,4 +11,5 @@ export declare const PALETTE: {
11
11
  readonly subtle: "#DDE5EC";
12
12
  readonly bg: "#EFF2F6";
13
13
  };
14
+ export type PaletteRole = keyof typeof PALETTE;
14
15
  export declare function statusPaletteColor(status: ReviewComponentStatus, validationErrorCount: number, validationWarningCount: number): string;
@@ -5,18 +5,18 @@ export type SelectionContextSummary = {
5
5
  resolverReferenceCount: number;
6
6
  hasParentUsageSite: boolean;
7
7
  };
8
- type SelectionImportSummary = {
8
+ export type SelectionImportSummary = {
9
9
  source: string;
10
10
  names: string[];
11
11
  local: boolean;
12
12
  resolvedPath?: string;
13
13
  };
14
- type SelectionFileSummary = {
14
+ export type SelectionFileSummary = {
15
15
  path: string;
16
16
  exports: string[];
17
17
  codeSnippet: string;
18
18
  };
19
- type SelectionReference = {
19
+ export type SelectionReference = {
20
20
  path: string;
21
21
  snippet: string;
22
22
  };
@@ -1,3 +1,29 @@
1
+ /**
2
+ * Read-only rationale view for the `analyze select-agent --show-rationale` flag.
3
+ *
4
+ * Reads the rationale data already persisted by a previous `analyze select-agent`
5
+ * run (component-level decision + reject reason on raw_components; per-prop
6
+ * rationale on raw_props — both populated by the writer path in command.ts and
7
+ * the rationale columns added in the schema migration for PR #52). No LLM
8
+ * invocation, no schema changes.
9
+ *
10
+ * Schema-version assertion: if the rationale columns are absent (older DB),
11
+ * throw with a clear message pointing at the remediation step.
12
+ */
13
+ export interface RationaleRow {
14
+ name: string;
15
+ decision: 'accepted' | 'rejected' | 'needs-review' | 'extracted';
16
+ reason: string | null;
17
+ }
18
+ /**
19
+ * Resolves which session to read from. If `sessionFlag` is provided, asserts
20
+ * the session exists and has at least one raw component; otherwise falls back
21
+ * to the most recent completed `analyze select` step.
22
+ */
23
+ export declare function resolveRationaleSession(sessionFlag: string | undefined, dbPath?: string): string;
24
+ export declare function loadRationaleRows(sessionId: string, dbPath?: string): RationaleRow[];
25
+ export declare function formatRationaleTable(rows: RationaleRow[]): string;
26
+ export declare function formatRationaleJson(rows: RationaleRow[]): string;
1
27
  /**
2
28
  * Top-level dispatch for `analyze select-agent --show-rationale`. Pure I/O
3
29
  * boundary: reads DB, writes formatted output to stdout, throws on error.
@@ -1,4 +1,5 @@
1
- import type { ManifestPayload, ServerPreviewResponse, ApplyOperationResponse } from '@contentful/experience-design-system-types';
1
+ import type { ManifestPayload, ServerPreviewResponse, ApplyOperationResponse, BreakingChange } from '@contentful/experience-design-system-types';
2
+ export declare const DEFAULT_HOST = "https://api.contentful.com";
2
3
  export declare const PREVIEW_ERROR_PREFIX = "preview failed:";
3
4
  export declare const APPLY_ERROR_PREFIX = "apply failed:";
4
5
  export declare const VALIDATION_FAILED_CODE = "\"ValidationFailed\"";
@@ -37,6 +38,7 @@ export interface PreviewValidationError {
37
38
  * the field-level detail.
38
39
  */
39
40
  export declare function parsePreviewValidationErrors(body: string): PreviewValidationError[];
41
+ export declare function sanitizeBreakingChanges(raw: unknown): BreakingChange[];
40
42
  export declare class ImportApiClient {
41
43
  private host;
42
44
  private token;
@@ -1,3 +1,4 @@
1
+ export declare const DEFAULT_API_HOST = "https://api.contentful.com";
1
2
  export declare const DEFAULT_CONFIGURED_HOST = "api.contentful.com";
2
3
  export declare function toConfiguredHost(host?: string): string | undefined;
3
4
  export declare function toApiHost(host?: string): string;
@@ -53,6 +53,7 @@ export interface PipelineResult {
53
53
  report: string[];
54
54
  };
55
55
  }
56
+ export declare const SLOT_CYCLE_MARKER = "manifest:components/slot-cycles";
56
57
  export declare function isSlotCycleError(result: {
57
58
  exitCode: number;
58
59
  stderr: string;
@@ -23,6 +23,4 @@ export type PickerDispatchDeps = {
23
23
  */
24
24
  pickerPushRun?: typeof pickerPushRunFn;
25
25
  };
26
- export declare function buildPickerCredentialOptions(opts: Pick<PickerDispatchOptions, 'spaceId' | 'environmentId' | 'cmaToken' | 'host' | 'force'>): Pick<PickerDispatchOptions, 'spaceId' | 'environmentId' | 'cmaToken' | 'host' | 'force'>;
27
- export declare function buildPickerModifyOptions(opts: Pick<PickerDispatchOptions, 'outDir' | 'overwrite' | 'saveAsNew' | 'force'>): Pick<PickerDispatchOptions, 'outDir' | 'overwrite' | 'saveAsNew' | 'force'>;
28
26
  export declare function dispatchPickerSelection(selection: RunPickerSelection, opts: PickerDispatchOptions, deps: PickerDispatchDeps): Promise<void>;
@@ -13,6 +13,7 @@
13
13
  * declarative and lets the deprecation notice be asserted from tests without
14
14
  * spawning the full pipeline.
15
15
  */
16
+ export declare const DRY_RUN_DEPRECATION_NOTICE: string;
16
17
  export type PromptFlags = {
17
18
  /** True when the user passed --dry-run. */
18
19
  dryRun?: boolean;
@@ -1 +1,2 @@
1
+ export declare function stripAnsi(s: string): string;
1
2
  export declare function buildAutoFilterErrorTail(raw: string): string;
@@ -1,10 +1,20 @@
1
1
  import React from 'react';
2
2
  import type { CompositionMode } from '../../lib/composition-mode.js';
3
- import type { ReviewStepProps } from './review-step-props.js';
4
- export type FinalReviewHostProps = Omit<ReviewStepProps, 'extractSessionId'> & {
3
+ export type FinalReviewHostProps = {
5
4
  extractSessionId: string | null;
5
+ tokenSessionId?: string | null;
6
6
  generatedCount: number;
7
7
  autoAccept: boolean;
8
8
  compositionMode?: CompositionMode;
9
+ onFinalize: (accepted: number, rejected: number, unresolved: number) => void;
10
+ onQuit: () => void;
11
+ livePreview?: boolean;
12
+ spaceId?: string;
13
+ environmentId?: string;
14
+ cmaToken?: string;
15
+ host?: string;
16
+ tokensPath?: string;
17
+ initialFinalizeError?: string | null;
18
+ allowDeletions?: boolean;
9
19
  };
10
20
  export declare function FinalReviewHost({ extractSessionId, tokenSessionId, generatedCount, autoAccept, compositionMode, onFinalize, onQuit, livePreview, spaceId, environmentId, cmaToken, host, tokensPath, initialFinalizeError, allowDeletions, }: FinalReviewHostProps): React.ReactElement;
@@ -5,7 +5,7 @@ export interface HistorySnapshot {
5
5
  autoRejected: string[];
6
6
  undoSnapshot: Map<string, ReviewComponentStatus> | null;
7
7
  }
8
- interface CdfReviewEntrySnapshot {
8
+ export interface CdfReviewEntrySnapshot {
9
9
  key: string;
10
10
  entry: CDFComponentEntry;
11
11
  status: ReviewComponentStatus;
@@ -20,4 +20,3 @@ export interface HistoryStack {
20
20
  size(): number;
21
21
  }
22
22
  export declare function createHistoryStack(seed: HistorySnapshot, maxDepth?: number): HistoryStack;
23
- export {};
@@ -4,6 +4,7 @@ export interface ScopeComponentLike {
4
4
  name: string;
5
5
  }
6
6
  export type Decision = 'accepted' | 'rejected' | 'undecided';
7
+ export declare const THREE_COLUMN_MIN_WIDTH = 120;
7
8
  export declare function computeColumnWidths(totalWidth: number): {
8
9
  layout: 'single' | 'three-column';
9
10
  main: number;
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import type { ScopeComponent } from './steps/ScopeGateStep.js';
3
3
  import type { CompositionMode } from '../../lib/composition-mode.js';
4
4
  export type { ScopeComponent };
5
- type AutoFilterStatus = 'idle' | 'running' | 'complete' | 'cancelled' | 'failed';
5
+ export type AutoFilterStatus = 'idle' | 'running' | 'complete' | 'cancelled' | 'failed';
6
6
  export type ScopeGateHostProps = {
7
7
  components: ReadonlyArray<ScopeComponent>;
8
8
  autoAccept: boolean;
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ import type { CDFComponentEntry } from '@contentful/experience-design-system-types';
2
3
  type GenerateReviewStepProps = {
3
4
  extractSessionId: string;
4
5
  tokenSessionId?: string | null;
@@ -24,5 +25,19 @@ type GenerateReviewStepProps = {
24
25
  */
25
26
  initialFinalizeError?: string | null;
26
27
  };
28
+ /**
29
+ * Sort components for the final-review sidebar so the underlying data array
30
+ * matches the visual order. Empty components (zero classified $properties)
31
+ * surface at the top via the warning-tier path in Sidebar.tsx; we mirror that
32
+ * here so `selectedIdx` indexes into the same order the user sees. Without
33
+ * this, j/k navigation lands on different rows than the visually-selected
34
+ * one (INTEG-4259).
35
+ *
36
+ * Within each tier (empty / non-empty) we tie-break alphabetically by `key`.
37
+ */
38
+ export declare function sortComponentsForSidebar<T extends {
39
+ key: string;
40
+ entry: CDFComponentEntry;
41
+ }>(components: T[]): T[];
27
42
  export declare function AtomicGenerateReviewStep({ extractSessionId, tokenSessionId, onFinalize, onQuit, livePreview, spaceId, environmentId, cmaToken, host, tokensPath, initialFinalizeError, }: GenerateReviewStepProps): React.ReactElement;
28
43
  export {};
@@ -1,7 +1,19 @@
1
1
  import React from 'react';
2
2
  import type { BreakingChange, CDFComponentEntry, ComponentTypeSummary, DownstreamImpact, ServerPreviewResponse } from '@contentful/experience-design-system-types';
3
- import type { ReviewStepProps } from '../review-step-props.js';
4
- type GenerateReviewStepProps = ReviewStepProps;
3
+ type GenerateReviewStepProps = {
4
+ extractSessionId: string;
5
+ tokenSessionId?: string | null;
6
+ onFinalize: (accepted: number, rejected: number, unresolved: number) => void;
7
+ onQuit: () => void;
8
+ livePreview?: boolean;
9
+ spaceId?: string;
10
+ environmentId?: string;
11
+ cmaToken?: string;
12
+ host?: string;
13
+ tokensPath?: string;
14
+ initialFinalizeError?: string | null;
15
+ allowDeletions?: boolean;
16
+ };
5
17
  export declare function sortComponentsForSidebar<T extends {
6
18
  key: string;
7
19
  entry: CDFComponentEntry;
@@ -0,0 +1,21 @@
1
+ import React from 'react';
2
+ type EntitySummary = {
3
+ created: number;
4
+ updated: number;
5
+ unchanged: number;
6
+ conflicts: number;
7
+ failed: number;
8
+ };
9
+ type PreviewStepProps = {
10
+ componentTypes: EntitySummary;
11
+ designTokens: EntitySummary;
12
+ spaceId: string;
13
+ environmentId: string;
14
+ stepNumber: number;
15
+ totalSteps: number;
16
+ onConfirm: () => void;
17
+ onSaveFiles?: () => void;
18
+ onQuit: () => void;
19
+ };
20
+ export declare function PreviewStep({ componentTypes, designTokens, spaceId, environmentId, stepNumber, totalSteps, onConfirm, onSaveFiles, onQuit, }: PreviewStepProps): React.ReactElement;
21
+ export {};
@@ -1,5 +1,5 @@
1
1
  import type { ComponentTypeSummary } from '@contentful/experience-design-system-types';
2
- type FinalizePreviewStatus = 'idle' | 'running' | 'done' | 'error';
2
+ export type FinalizePreviewStatus = 'idle' | 'running' | 'done' | 'error';
3
3
  export type UseFinalizePreviewOptions = {
4
4
  /** True while the Finalize dialog is open. Toggling true (re)fires the preview. */
5
5
  open: boolean;
@@ -21,13 +21,6 @@ export type UseFinalizePreviewReturn = {
21
21
  /** Adjust the removed-list scroll (clamped to the window). */
22
22
  scrollBy: (delta: number) => void;
23
23
  };
24
- export type UseReviewFinalizePreviewOptions = Omit<UseFinalizePreviewOptions, 'acceptedKeys'> & {
25
- components: ReadonlyArray<{
26
- key: string;
27
- status: string;
28
- }>;
29
- };
30
- export declare function useReviewFinalizePreview({ components, ...options }: UseReviewFinalizePreviewOptions): UseFinalizePreviewReturn;
31
24
  /**
32
25
  * Shared Finalize-dialog deletion preview, used by both the composite and
33
26
  * atomic generate-review steps so the "what will this push delete" experience
@@ -41,4 +34,3 @@ export declare function useReviewFinalizePreview({ components, ...options }: Use
41
34
  * simply omits the deletion section.
42
35
  */
43
36
  export declare function useFinalizePreview(opts: UseFinalizePreviewOptions): UseFinalizePreviewReturn;
44
- export {};
@@ -15,7 +15,7 @@ export type UseLivePreviewOptions = {
15
15
  /** Forwarded verbatim to `runLivePreview`/`previewImport`. */
16
16
  allowDeletions?: boolean;
17
17
  };
18
- type LivePreviewStatus = 'idle' | 'running';
18
+ export type LivePreviewStatus = 'idle' | 'running';
19
19
  export type UseLivePreviewReturn = {
20
20
  trigger: () => void;
21
21
  status: LivePreviewStatus;
@@ -38,4 +38,3 @@ export type UseLivePreviewReturn = {
38
38
  * is set so we don't accumulate dead timers.
39
39
  */
40
40
  export declare function useLivePreview(opts: UseLivePreviewOptions): UseLivePreviewReturn;
41
- export {};