@contentful/experience-design-system-cli 2.37.1-dev-build-8b126ca1.0 → 2.37.1-dev-build-f0533497.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 (75) hide show
  1. package/dist/app.js +11929 -3783
  2. package/dist/index.js +18109 -8913
  3. package/dist/package.json +1 -1
  4. package/dist/src/tui/import/steps/06-extraction/find-skill-path.d.ts +1 -0
  5. package/dist/src/tui/import/steps/06-extraction/logic.d.ts +4 -25
  6. package/dist/src/tui/import/steps/06-extraction/run.d.ts +13 -11
  7. package/dist/src/tui/import/steps/06-extraction/selection.d.ts +1 -1
  8. package/dist/src/tui/import/steps/06-extraction/types.d.ts +3 -1
  9. package/legacy/dist/package.json +4 -1
  10. package/legacy/dist/src/index.js +14983 -19537
  11. package/legacy/package.json +1 -1
  12. package/package.json +4 -4
  13. package/dist/src/tui/import/steps/06-extraction/processes.d.ts +0 -45
  14. package/legacy/dist/src/analyze/cycle-view.d.ts +0 -7
  15. package/legacy/dist/src/import/agent-model-resolve.d.ts +0 -27
  16. package/legacy/dist/src/import/command.d.ts +0 -2
  17. package/legacy/dist/src/import/composition-options.d.ts +0 -7
  18. package/legacy/dist/src/import/cycle-auto-reject.d.ts +0 -4
  19. package/legacy/dist/src/import/path-utils.d.ts +0 -15
  20. package/legacy/dist/src/import/tui/CustomPromptBanner.d.ts +0 -5
  21. package/legacy/dist/src/import/tui/WizardApp.d.ts +0 -24
  22. package/legacy/dist/src/import/tui/autocomplete.d.ts +0 -5
  23. package/legacy/dist/src/import/tui/components/CompactControlBar.d.ts +0 -4
  24. package/legacy/dist/src/import/tui/components/LegendEntry.d.ts +0 -2
  25. package/legacy/dist/src/import/tui/components/LivePreviewSummary.d.ts +0 -14
  26. package/legacy/dist/src/import/tui/components/ReviewComponentPanel.d.ts +0 -33
  27. package/legacy/dist/src/import/tui/components/ReviewDetailsEditor.d.ts +0 -15
  28. package/legacy/dist/src/import/tui/components/ReviewDialogs.d.ts +0 -28
  29. package/legacy/dist/src/import/tui/components/ReviewStatus.d.ts +0 -15
  30. package/legacy/dist/src/import/tui/components/SearchMatchSummary.d.ts +0 -11
  31. package/legacy/dist/src/import/tui/components/SpaceEnvironment.d.ts +0 -7
  32. package/legacy/dist/src/import/tui/components/StepHeader.d.ts +0 -8
  33. package/legacy/dist/src/import/tui/cycle-panel-scroll.d.ts +0 -8
  34. package/legacy/dist/src/import/tui/group-collapse.d.ts +0 -2
  35. package/legacy/dist/src/import/tui/handoff.d.ts +0 -36
  36. package/legacy/dist/src/import/tui/history.d.ts +0 -23
  37. package/legacy/dist/src/import/tui/hooks/review-input.d.ts +0 -39
  38. package/legacy/dist/src/import/tui/hooks/sidebar-search-state.d.ts +0 -17
  39. package/legacy/dist/src/import/tui/hooks/useOverlayPanel.d.ts +0 -13
  40. package/legacy/dist/src/import/tui/hooks/useReviewEditor.d.ts +0 -49
  41. package/legacy/dist/src/import/tui/hooks/useReviewPreview.d.ts +0 -25
  42. package/legacy/dist/src/import/tui/hooks/useReviewSession.d.ts +0 -95
  43. package/legacy/dist/src/import/tui/hooks/useReviewSurfaceState.d.ts +0 -12
  44. package/legacy/dist/src/import/tui/lineage-layout.d.ts +0 -68
  45. package/legacy/dist/src/import/tui/preview-confirmation-input.d.ts +0 -5
  46. package/legacy/dist/src/import/tui/push-progress.d.ts +0 -9
  47. package/legacy/dist/src/import/tui/run-print-files-helpers.d.ts +0 -26
  48. package/legacy/dist/src/import/tui/run-teaser.d.ts +0 -5
  49. package/legacy/dist/src/import/tui/runLivePreview.d.ts +0 -45
  50. package/legacy/dist/src/import/tui/sidebar-help.d.ts +0 -2
  51. package/legacy/dist/src/import/tui/sidebar-input.d.ts +0 -13
  52. package/legacy/dist/src/import/tui/sidebar-navigation.d.ts +0 -18
  53. package/legacy/dist/src/import/tui/sidebar-width.d.ts +0 -1
  54. package/legacy/dist/src/import/tui/step-filters.d.ts +0 -19
  55. package/legacy/dist/src/import/tui/steps/DoneStep.d.ts +0 -28
  56. package/legacy/dist/src/import/tui/steps/ErrorStep.d.ts +0 -10
  57. package/legacy/dist/src/import/tui/steps/GateStep.d.ts +0 -15
  58. package/legacy/dist/src/import/tui/steps/GenerateReviewStep.d.ts +0 -37
  59. package/legacy/dist/src/import/tui/steps/PreviewValidationErrorStep.d.ts +0 -11
  60. package/legacy/dist/src/import/tui/steps/PushingStep.d.ts +0 -9
  61. package/legacy/dist/src/import/tui/steps/RunningStep.d.ts +0 -32
  62. package/legacy/dist/src/import/tui/steps/WizardPreviewStep.d.ts +0 -21
  63. package/legacy/dist/src/import/tui/steps/auto-reject-decision.d.ts +0 -7
  64. package/legacy/dist/src/import/tui/steps/breaking-change-format.d.ts +0 -2
  65. package/legacy/dist/src/import/tui/steps/enumerate-cycle-breaks.d.ts +0 -14
  66. package/legacy/dist/src/import/tui/steps/preview-diff.d.ts +0 -10
  67. package/legacy/dist/src/import/tui/steps/review-details-panel.d.ts +0 -26
  68. package/legacy/dist/src/import/tui/steps/review-json-panel.d.ts +0 -7
  69. package/legacy/dist/src/import/tui/useFinalizePreview.d.ts +0 -39
  70. package/legacy/dist/src/import/tui/useLivePreview.d.ts +0 -39
  71. package/legacy/dist/src/import/tui/wizard-422-helpers.d.ts +0 -48
  72. package/legacy/dist/src/import/tui/wizard-state-transitions.d.ts +0 -30
  73. package/legacy/dist/src/runs/path-prompt.d.ts +0 -8
  74. package/legacy/dist/src/tui/use-blinking-cursor.d.ts +0 -1
  75. package/legacy/dist/src/tui/use-timed-spinner.d.ts +0 -4
@@ -1,95 +0,0 @@
1
- import type { DatabaseSync } from 'node:sqlite';
2
- import { type Dispatch, type SetStateAction } from 'react';
3
- import type { CDFComponentEntry } from '@contentful/experience-design-system-types';
4
- import { type ComponentRationale, type ComponentReviewMetadata } from '../../../session/db.js';
5
- import { type TokenReviewToken } from '../../../analyze/select/tui/components/TokenReviewPanel.js';
6
- import type { ReviewComponentStatus } from '../../../analyze/select/types.js';
7
- import { type HistorySnapshot } from '../history.js';
8
- export type CdfReviewEntry = {
9
- key: string;
10
- entry: CDFComponentEntry;
11
- status: ReviewComponentStatus;
12
- };
13
- export type ReviewSessionLoadResult<TExtra = undefined> = {
14
- entries: CdfReviewEntry[];
15
- tokens: TokenReviewToken[];
16
- error: string | null;
17
- extra?: TExtra;
18
- };
19
- export type ReviewSessionLoaderOptions<TExtra = undefined> = {
20
- extractSessionId: string;
21
- tokenSessionId?: string | null;
22
- loadExtra?: (db: DatabaseSync, sessionId: string) => TExtra;
23
- sortEntries: (entries: CdfReviewEntry[], extra: TExtra | undefined) => CdfReviewEntry[];
24
- };
25
- export declare function loadReviewSessionState<TExtra = undefined>({ extractSessionId, tokenSessionId, loadExtra, sortEntries, }: ReviewSessionLoaderOptions<TExtra>): ReviewSessionLoadResult<TExtra>;
26
- type UseReviewSessionOptions<TExtra> = {
27
- loadSession: () => ReviewSessionLoadResult<TExtra>;
28
- tokensPath?: string;
29
- onExtraLoaded?: (extra: TExtra | undefined) => void;
30
- };
31
- type UseReviewSessionResult<TExtra> = {
32
- components: CdfReviewEntry[];
33
- setComponents: Dispatch<SetStateAction<CdfReviewEntry[]>>;
34
- loading: boolean;
35
- loadError: string | null;
36
- availableTokens: TokenReviewToken[];
37
- reloadFromSave: () => ReviewSessionLoadResult<TExtra> | null;
38
- };
39
- export declare function useReviewSession<TExtra = undefined>({ loadSession, tokensPath, onExtraLoaded, }: UseReviewSessionOptions<TExtra>): UseReviewSessionResult<TExtra>;
40
- type UseReviewMetadataOptions = {
41
- components: CdfReviewEntry[];
42
- selectedIdx: number;
43
- extractSessionId: string;
44
- };
45
- export declare function useReviewMetadata({ components, selectedIdx, extractSessionId }: UseReviewMetadataOptions): {
46
- reviewMetadata: ComponentReviewMetadata | null;
47
- componentRationale: ComponentRationale | null;
48
- };
49
- export declare function createReviewHistorySnapshot(components: CdfReviewEntry[], options?: {
50
- autoRejected?: readonly string[];
51
- undoSnapshot?: ReadonlyMap<string, ReviewComponentStatus> | null;
52
- }): HistorySnapshot;
53
- type UseReviewHistoryOptions = {
54
- loading: boolean;
55
- components: CdfReviewEntry[];
56
- createSnapshot: (components: CdfReviewEntry[]) => HistorySnapshot;
57
- applySnapshot: (snapshot: HistorySnapshot) => void;
58
- };
59
- export declare function useReviewHistory({ loading, components, createSnapshot, applySnapshot }: UseReviewHistoryOptions): {
60
- historySeededRef: {
61
- current: boolean;
62
- };
63
- pushHistorySnapshot: (entries: CdfReviewEntry[], label: string) => void;
64
- handleUndo: () => void;
65
- handleRedo: () => void;
66
- resetHistory: (snapshot: HistorySnapshot) => void;
67
- };
68
- export type ReviewFinalizeCounts = {
69
- accepted: number;
70
- rejected: number;
71
- unresolved: number;
72
- };
73
- export declare function finalizeReviewSession(extractSessionId: string, components: CdfReviewEntry[]): ReviewFinalizeCounts;
74
- export type UseReviewFinalizeOptions = {
75
- showFinalize: boolean;
76
- extractSessionId: string;
77
- tokensPath: string;
78
- spaceId: string;
79
- environmentId: string;
80
- cmaToken: string;
81
- host: string;
82
- components: CdfReviewEntry[];
83
- onFinalize: (accepted: number, rejected: number, unresolved: number) => void;
84
- };
85
- /**
86
- * Shared by both the composite and atomic generate-review steps: the Finalize
87
- * dialog's scoped preview (`useReviewFinalizePreview`) plus the confirm
88
- * handler that reclassifies rejected/unresolved components and reports the
89
- * final counts back to the wizard.
90
- */
91
- export declare function useReviewFinalize({ showFinalize, extractSessionId, tokensPath, spaceId, environmentId, cmaToken, host, components, onFinalize, }: UseReviewFinalizeOptions): {
92
- finalizePreview: import("../useFinalizePreview.js").UseFinalizePreviewReturn;
93
- handleFinalizeConfirm: () => void;
94
- };
95
- export {};
@@ -1,12 +0,0 @@
1
- import { type Dispatch, type SetStateAction } from 'react';
2
- export type UseReviewSurfaceStateResult = {
3
- sidebarFocused: boolean;
4
- setSidebarFocused: Dispatch<SetStateAction<boolean>>;
5
- showFinalize: boolean;
6
- setShowFinalize: Dispatch<SetStateAction<boolean>>;
7
- showQuit: boolean;
8
- setShowQuit: Dispatch<SetStateAction<boolean>>;
9
- finalizeError: string | null;
10
- setFinalizeError: Dispatch<SetStateAction<string | null>>;
11
- };
12
- export declare function useReviewSurfaceState(initialFinalizeError?: string | null): UseReviewSurfaceStateResult;
@@ -1,68 +0,0 @@
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
- /** Floors — both surfaces stay usable even on a small terminal. */
6
- export declare const SIDEBAR_MIN = 4;
7
- export declare const MIN_PANEL_ROWS = 4;
8
- /**
9
- * Fallback when `stdout.rows` is unavailable (piped output, tests). No TTY
10
- * means Ink is not interactively repainting, so there is no flicker risk — we
11
- * assume enough height for a terminal-sized sidebar so the non-interactive
12
- * render is complete and unclipped.
13
- */
14
- export declare const FALLBACK_ROWS = 40;
15
- /**
16
- * Vertical space consumed by everything ABOVE/BELOW the columns row. The panel
17
- * shares the columns row, so the fit constraint while open is simply
18
- * `FIXED_OVERHEAD + panelBoxHeight <= rows`.
19
- */
20
- export declare const FIXED_OVERHEAD: number;
21
- export declare const PANEL_BOX_CHROME = 6;
22
- /**
23
- * L2e — fixed vertical chrome around the sidebar in the BASE (no-panel) case,
24
- * counting EVERYTHING that is not a variable sidebar entry row: the wizard
25
- * header bar, the counter strip (with its blank separator), the cycle banner,
26
- * the nothing-selected /
27
- * AI-exclusion hint, the GroupedSidebar box borders + scroll indicator, the
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.
30
- */
31
- export declare const BASE_CHROME_OVERHEAD = 18;
32
- export interface LineageLayoutInput {
33
- /** Terminal height in rows (`stdout.rows`, or the fallback). */
34
- rows: number;
35
- /** Whether the lineage panel is currently open. */
36
- panelOpen: boolean;
37
- /** Number of lineage entries — caps the panel window so it never over-allocates. */
38
- entryCount?: number;
39
- }
40
- export interface LineageLayout {
41
- /** Rows the sidebar should render (`visibleCount`). Constant across open/closed. */
42
- sidebarVisible: number;
43
- /** Rows a sidebar replacement panel should window to (`maxRows`). */
44
- panelMaxRows: number;
45
- }
46
- /**
47
- * The sidebar height is constant (the panel replaces it in the same slot, so
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.
50
- */
51
- export declare function computeLineageLayout({ rows, panelOpen, entryCount }: LineageLayoutInput): LineageLayout;
52
- export interface SidebarBudget {
53
- /** Rows the GroupedSidebar should render (`visibleCount`). */
54
- sidebarVisibleCount: number;
55
- /** Rows a sidebar replacement panel should window to (`maxRows`). */
56
- panelMaxRows: number;
57
- }
58
- /**
59
- * L2e — autoscale the BASE frame to the terminal height. Even with the lineage
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.
63
- *
64
- * Floor: `BASE_CHROME_OVERHEAD + SIDEBAR_MIN`. Below it `SIDEBAR_MIN`
65
- * (usability) intentionally wins over the fit — a terminal that small can't
66
- * host the chrome regardless.
67
- */
68
- export declare function computeSidebarBudget({ rows, panelOpen, entryCount }: LineageLayoutInput): SidebarBudget;
@@ -1,5 +0,0 @@
1
- type PreviewConfirmationKey = {
2
- return: boolean;
3
- };
4
- export declare function usePreviewConfirmationInput(breakingWithImpact: boolean, onConfirm: (acknowledge: boolean) => void): (input: string, key: PreviewConfirmationKey) => boolean;
5
- export {};
@@ -1,9 +0,0 @@
1
- export type PushProgress = {
2
- kind: 'queued';
3
- operationId: string;
4
- } | {
5
- kind: 'progress';
6
- processed: number;
7
- total: number;
8
- current: string | null;
9
- } | null;
@@ -1,26 +0,0 @@
1
- /**
2
- * Computes the wizard state patch applied after `runPrintFiles` successfully
3
- * writes components.json. Default behavior transitions to the print-gate
4
- * confirm screen. When `skipGate: true` is passed (used by the "save AND push"
5
- * path), the transition is suppressed so the caller can chain into
6
- * `runPreview` without an intermediate gate render.
7
- *
8
- * When `outDir` is provided (Task 4 — operator chose a custom save path via
9
- * the inline path-prompt), it is folded into the patch so the wizard's
10
- * `state.outDir` reflects the chosen path. Subsequent reads (e.g. the
11
- * appendRun call, the print-gate's summary) pick it up automatically.
12
- */
13
- export type NextStateAfterPrintInput = {
14
- skipGate?: boolean;
15
- componentsPath: string;
16
- outDir?: string;
17
- };
18
- export type NextStateAfterPrintOutput = {
19
- componentsPath: string;
20
- outDir?: string;
21
- } | {
22
- step: 'print-gate';
23
- componentsPath: string;
24
- outDir?: string;
25
- };
26
- export declare function nextStateAfterPrint(opts: NextStateAfterPrintInput): NextStateAfterPrintOutput;
@@ -1,5 +0,0 @@
1
- /**
2
- * Task 8 — one-line teaser appended at the end of every successful run.
3
- * Format pinned in dsi-tui-local-save-tooling-spec.md Part 6.
4
- */
5
- export declare function buildRunTeaserLine(runId: string | null | undefined): string;
@@ -1,45 +0,0 @@
1
- import type { ServerPreviewResponse } from '@contentful/experience-design-system-types';
2
- export declare class TimeoutError extends Error {
3
- constructor(message?: string);
4
- }
5
- export type LivePreviewResult = {
6
- generation: number;
7
- response: ServerPreviewResponse | null;
8
- };
9
- export type RunLivePreviewOptions = {
10
- sessionId: string;
11
- tokensPath: string;
12
- spaceId: string;
13
- environmentId: string;
14
- cmaToken: string;
15
- host: string;
16
- generation: number;
17
- timeoutMs?: number;
18
- /** When true and no components are accepted, preview an empty-but-present
19
- * components manifest so the server returns the full delete-all diff
20
- * (every existing component as `removed`) instead of rejecting an empty
21
- * manifest. Lets the final-review UI show what a push would delete. */
22
- deleteAllComponents?: boolean;
23
- /** Restrict the preview to these component keys (the operator's accepted
24
- * set). Undefined = all generated components in the session. An empty set
25
- * narrows to zero components — pair with `deleteAllComponents` to preview a
26
- * full delete. Lets the Finalize dialog show exactly what the accepted push
27
- * would delete, independent of the session's on-disk generated rows. */
28
- acceptedKeys?: ReadonlySet<string>;
29
- };
30
- /**
31
- * Pure async helper used by `useLivePreview` to re-fire `previewImport` after a
32
- * FieldEditor save in the wizard's final-review step. A side-effect-bearing
33
- * pure orchestrator that owns no React state.
34
- *
35
- * Skips silently (returns `{ response: null }`) when any of `spaceId`,
36
- * `environmentId`, or `cmaToken` is missing — live preview is an enhancement
37
- * and the caller treats `null` as a no-op. Throws on API errors so the caller
38
- * (`useLivePreview`) can downgrade to local-only mode on 401/403 and log a
39
- * warning otherwise. Wraps the API call in a timeout so a hung backend doesn't
40
- * leave the spinner stuck.
41
- *
42
- * Does NOT run the second-pass seeding from `WizardApp.runPreview`; that's a
43
- * one-shot wizard-step concern and would re-seed on every save.
44
- */
45
- export declare function runLivePreview(opts: RunLivePreviewOptions): Promise<LivePreviewResult>;
@@ -1,2 +0,0 @@
1
- import type { HelpSection } from '../../analyze/select/tui/components/HelpOverlay.js';
2
- export declare function createSidebarViewsHelpSection(includeBreaking: boolean): HelpSection;
@@ -1,13 +0,0 @@
1
- type SearchInputKey = {
2
- tab: boolean;
3
- backspace: boolean;
4
- };
5
- type SearchInputOptions = {
6
- query: string;
7
- names: string[];
8
- setQuery: (value: string | ((current: string) => string)) => void;
9
- setCandidates: (value: string[]) => void;
10
- };
11
- export declare function handleSidebarSearchInput(input: string, key: SearchInputKey, { query, names, setQuery, setCandidates }: SearchInputOptions): boolean;
12
- export declare function formatSearchMatchSummary(matches: number, total: number): string;
13
- export {};
@@ -1,18 +0,0 @@
1
- import type { ComponentGraphNode, Closure } from '../../analyze/composite-closure.js';
2
- import { type GroupedSidebarItem } from '../../analyze/select/tui/components/GroupedSidebar.js';
3
- export declare function collectExpandedGroupRoots(closures: Map<string, Closure>, cycleParticipants: Iterable<string>): Set<string>;
4
- export declare function computeSidebarViewToggle({ currentView, currentKey, currentScroll, visibleCount, items, cycleParticipants, expandedGroups, graph, showFlatTier, }: {
5
- currentView: 'grouped' | 'flat';
6
- currentKey: string | null | undefined;
7
- currentScroll: number;
8
- visibleCount: number;
9
- items: GroupedSidebarItem[];
10
- cycleParticipants: Set<string>;
11
- expandedGroups: Set<string>;
12
- graph: ComponentGraphNode[];
13
- showFlatTier?: boolean;
14
- }): {
15
- view: 'grouped' | 'flat';
16
- cursor: number;
17
- scroll: number;
18
- };
@@ -1 +0,0 @@
1
- export declare function computeSidebarWidth(terminalWidth: number): number;
@@ -1,19 +0,0 @@
1
- export type FilterCategory = 'broken' | 'cycles' | 'deleted';
2
- export interface FilterDataSources {
3
- /** Component keys that participate in a slot cycle. */
4
- cycles?: Iterable<string>;
5
- /** Component keys the step considers "broken" (issue/warning/AI-flagged). */
6
- broken?: Iterable<string>;
7
- /** Component keys marked for deletion (GenerateReview only). */
8
- deleted?: Iterable<string>;
9
- }
10
- export declare function computeFilterKeys(input: {
11
- filters: Iterable<FilterCategory>;
12
- data: FilterDataSources;
13
- }): Set<string> | undefined;
14
- export declare function intersectFilterKeys(a: Set<string> | undefined, b: Set<string> | undefined): Set<string> | undefined;
15
- export declare function buildFlatDimPredicate(input: {
16
- viewMode: 'grouped' | 'flat';
17
- searchQuery: string;
18
- filterVisibleKeys: Set<string> | undefined;
19
- }): ((componentKey: string) => boolean) | undefined;
@@ -1,28 +0,0 @@
1
- import React from 'react';
2
- type EntityResult = {
3
- created: number;
4
- updated: number;
5
- removed: number;
6
- failed: number;
7
- };
8
- type DoneStepProps = {
9
- componentTypes: EntityResult;
10
- designTokens: EntityResult;
11
- summary?: {
12
- total: number;
13
- succeeded: number;
14
- failed: number;
15
- };
16
- spaceId: string;
17
- environmentId: string;
18
- host?: string;
19
- runTeaser?: string;
20
- failures?: Array<{
21
- entityType: string;
22
- entityId: string;
23
- message: string;
24
- }>;
25
- onExit: () => void;
26
- };
27
- export declare function DoneStep({ componentTypes, designTokens, summary, spaceId, environmentId, host, failures, onExit, }: DoneStepProps): React.ReactElement;
28
- export {};
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- type ErrorStepProps = {
3
- stepName: string;
4
- message: string;
5
- onExit: () => void;
6
- onRetryCredentials?: () => void;
7
- onAcknowledgeBreakingChanges?: () => void;
8
- };
9
- export declare function ErrorStep({ stepName, message, onExit, onRetryCredentials, onAcknowledgeBreakingChanges, }: ErrorStepProps): React.ReactElement;
10
- export {};
@@ -1,15 +0,0 @@
1
- import React from 'react';
2
- type GateStepProps = {
3
- successMessage: string;
4
- summary?: string;
5
- context?: string;
6
- continueLabel?: string;
7
- skipLabel?: string;
8
- onContinue: () => void;
9
- onSkip?: () => void;
10
- onQuit: () => void;
11
- showSkip?: boolean;
12
- intent?: 'success' | 'error';
13
- };
14
- export declare function GateStep({ successMessage, summary, context, continueLabel, skipLabel, onContinue, onSkip, onQuit, showSkip, intent, }: GateStepProps): React.ReactElement;
15
- export {};
@@ -1,37 +0,0 @@
1
- import React from 'react';
2
- import type { BreakingChange, CDFComponentEntry, ComponentTypeSummary, DownstreamImpact, ServerPreviewResponse } from '@contentful/experience-design-system-types';
3
- type GenerateReviewStepProps = {
4
- extractSessionId: string | null;
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
- };
16
- export declare function sortComponentsForSidebar<T extends {
17
- key: string;
18
- entry: CDFComponentEntry;
19
- }>(components: T[], cycleParticipants?: Set<string>): T[];
20
- export { computeCycleAutoRejectTargets } from '../../cycle-auto-reject.js';
21
- export interface BreakingComponent {
22
- componentName: string;
23
- changes: BreakingChange[];
24
- impact?: DownstreamImpact;
25
- current?: ComponentTypeSummary;
26
- }
27
- export interface BreakingRow {
28
- label: string;
29
- componentName: string;
30
- focusTarget?: {
31
- kind: 'prop' | 'slot';
32
- name: string;
33
- };
34
- }
35
- export declare function buildBreakingRows(breakingChanges: BreakingComponent[]): BreakingRow[];
36
- export declare function deriveBreakingChanges(response: ServerPreviewResponse): BreakingComponent[];
37
- export declare function GenerateReviewStep(props: GenerateReviewStepProps): React.ReactElement;
@@ -1,11 +0,0 @@
1
- import React from 'react';
2
- import type { PreviewValidationError } from '../../../apply/api-client.js';
3
- type PreviewValidationErrorStepProps = {
4
- errors: PreviewValidationError[];
5
- missingNames: string[];
6
- onEdit: () => void;
7
- onSkip: () => void;
8
- onQuit: () => void;
9
- };
10
- export declare function PreviewValidationErrorStep({ errors, missingNames, onEdit, onSkip, onQuit, }: PreviewValidationErrorStepProps): React.ReactElement;
11
- export {};
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- import type { PushProgress } from '../push-progress.js';
3
- type PushingStepProps = {
4
- stepNumber: number;
5
- totalSteps: number;
6
- progress: PushProgress;
7
- };
8
- export declare function PushingStep({ stepNumber, totalSteps, progress }: PushingStepProps): React.ReactElement;
9
- export {};
@@ -1,32 +0,0 @@
1
- import React from 'react';
2
- type Progress = {
3
- done: number;
4
- total: number;
5
- };
6
- type RunningStepProps = {
7
- stepNumber: number;
8
- totalSteps: number;
9
- title: string;
10
- description: string;
11
- detail?: string;
12
- detailComplete?: boolean;
13
- /** Progress for the detail row (displays as progress bar + ratio). */
14
- detailProgress?: Progress;
15
- /** Optional second progress line (own spinner) — e.g. composition resolution
16
- * running after the file scan on the extracting screen. */
17
- secondaryDetail?: string;
18
- secondaryComplete?: boolean;
19
- /** Progress for the secondary detail row (displays as progress bar + ratio). */
20
- secondaryProgress?: Progress;
21
- /** Optional third progress line for another concurrent stage. */
22
- tertiaryDetail?: string;
23
- tertiaryComplete?: boolean;
24
- /** Optional fourth progress line for another concurrent stage. */
25
- quaternaryDetail?: string;
26
- quaternaryComplete?: boolean;
27
- /** Optional fifth progress line for another concurrent stage. */
28
- quinaryDetail?: string;
29
- quinaryComplete?: boolean;
30
- };
31
- export declare function RunningStep({ stepNumber, totalSteps, title, description, detail, detailComplete, detailProgress, secondaryDetail, secondaryComplete, secondaryProgress, tertiaryDetail, tertiaryComplete, quaternaryDetail, quaternaryComplete, quinaryDetail, quinaryComplete, }: RunningStepProps): React.ReactElement;
32
- export {};
@@ -1,21 +0,0 @@
1
- import React from 'react';
2
- import type { ServerPreviewResponse } from '@contentful/experience-design-system-types';
3
- export interface PreviewDiffLine {
4
- key: string;
5
- color: string;
6
- text: string;
7
- }
8
- export declare function buildPreviewSummaryLines(preview: ServerPreviewResponse): PreviewDiffLine[];
9
- export declare function buildPreviewDiffLines(preview: ServerPreviewResponse): PreviewDiffLine[];
10
- type WizardPreviewStepProps = {
11
- preview: ServerPreviewResponse;
12
- spaceId: string;
13
- environmentId: string;
14
- stepNumber: number;
15
- totalSteps: number;
16
- onConfirm: (acknowledge: boolean) => void;
17
- onEdit?: () => void;
18
- onQuit: () => void;
19
- };
20
- export declare function WizardPreviewStep({ preview, spaceId, environmentId, stepNumber, totalSteps, onConfirm, onEdit, onQuit, }: WizardPreviewStepProps): React.ReactElement;
21
- export {};
@@ -1,7 +0,0 @@
1
- export interface AutoRejectDecisionInput {
2
- loading: boolean;
3
- autoRejectFired: boolean;
4
- hasCycle: boolean;
5
- }
6
- export type AutoRejectDecision = 'fire' | 'skip';
7
- export declare function computeAutoRejectDecision(input: AutoRejectDecisionInput): AutoRejectDecision;
@@ -1,2 +0,0 @@
1
- import type { BreakingChange, ComponentTypeSummary } from '@contentful/experience-design-system-types';
2
- export declare function formatBreakingChange(bc: BreakingChange, current?: Pick<ComponentTypeSummary, 'fullProperties'>): string;
@@ -1,14 +0,0 @@
1
- import type { CDFComponentEntry } from '@contentful/experience-design-system-types';
2
- import type { SlotCycle, SlotEdge } from '../../../analyze/cycle-detection.js';
3
- export type BreakEdge = SlotEdge;
4
- /** Row shape accepted by {@link enumerateCycleBreaks}. */
5
- export interface BreakEnumComponent {
6
- key: string;
7
- entry: CDFComponentEntry;
8
- }
9
- export declare function enumerateCycleBreaks(cycle: Pick<SlotCycle, 'edges'>, components: BreakEnumComponent[]): BreakEdge[];
10
- export declare function shouldBreakOverlayGoFullScreen({ rows, edgeCount, reservedChrome, }: {
11
- rows: number;
12
- edgeCount: number;
13
- reservedChrome?: number;
14
- }): boolean;
@@ -1,10 +0,0 @@
1
- import type { ChangeClassification, ComponentTypeSummary, PropertySummary } from '@contentful/experience-design-system-types';
2
- export interface PropertyDiffLine {
3
- key: string;
4
- color: 'green' | 'red' | 'yellow';
5
- text: string;
6
- }
7
- export declare function computeComponentDiffLines(current: ComponentTypeSummary, proposed: Record<string, unknown>, changeClassification?: ChangeClassification): PropertyDiffLine[];
8
- export declare function diffProperty(name: string, old: PropertySummary, newDef: Record<string, unknown>): PropertyDiffLine[];
9
- export declare function formatOldProp(prop: PropertySummary): string;
10
- export declare function formatPropDef(def: Record<string, unknown>): string;
@@ -1,26 +0,0 @@
1
- import React from 'react';
2
- import { type TokenPropSuggestion } from '../../../analyze/select/tui/components/TokenReviewPanel.js';
3
- import type { ComponentRationale, ComponentReviewMetadata } from '../../../session/db.js';
4
- type ReviewPanel = 'none' | 'prop-rationale' | 'component-rationale' | 'source' | 'token-review';
5
- export type ReviewDetailsPanelProps = {
6
- selectedKey: string;
7
- panelOpen: ReviewPanel;
8
- componentRationale: ComponentRationale | null;
9
- reviewMetadata: ComponentReviewMetadata | null;
10
- panelScrollOffset: number;
11
- width: number;
12
- height: number;
13
- sourceBorderColor?: string;
14
- tokenSuggestions: TokenPropSuggestion[];
15
- tokenReviewRow: number;
16
- tokenReviewEditing: boolean;
17
- tokenReviewEditCursor: number;
18
- tokenReviewEditSelection: Set<string>;
19
- showJson: boolean;
20
- jsonValue: string;
21
- jsonScrollOffset: number;
22
- sidebarFocused: boolean;
23
- editor: React.ReactNode;
24
- };
25
- export declare function ReviewDetailsPanel({ selectedKey, panelOpen, componentRationale, reviewMetadata, panelScrollOffset, width, height, sourceBorderColor, tokenSuggestions, tokenReviewRow, tokenReviewEditing, tokenReviewEditCursor, tokenReviewEditSelection, showJson, jsonValue, jsonScrollOffset, sidebarFocused, editor, }: ReviewDetailsPanelProps): React.ReactElement;
26
- export {};
@@ -1,7 +0,0 @@
1
- import type { CDFComponentEntry } from '@contentful/experience-design-system-types';
2
- type ReviewJsonComponent = {
3
- key: string;
4
- entry: CDFComponentEntry;
5
- };
6
- export declare function getReviewJsonPanelValue(selected: ReviewJsonComponent | null, showHiddenProps: boolean): string;
7
- export {};
@@ -1,39 +0,0 @@
1
- import type { ComponentTypeSummary } from '@contentful/experience-design-system-types';
2
- type FinalizePreviewStatus = 'idle' | 'running' | 'done' | 'error';
3
- export type UseFinalizePreviewOptions = {
4
- /** True while the Finalize dialog is open. Toggling true (re)fires the preview. */
5
- open: boolean;
6
- extractSessionId: string | null;
7
- tokensPath: string;
8
- spaceId: string;
9
- environmentId: string;
10
- cmaToken: string;
11
- host: string;
12
- /** Component keys the operator has accepted; drives the scoped preview. */
13
- acceptedKeys: ReadonlySet<string>;
14
- };
15
- export type UseFinalizePreviewReturn = {
16
- status: FinalizePreviewStatus;
17
- removed: ComponentTypeSummary[];
18
- scrollOffset: number;
19
- /** Adjust the removed-list scroll (clamped to the window). */
20
- scrollBy: (delta: number) => void;
21
- };
22
- export type UseReviewFinalizePreviewOptions = Omit<UseFinalizePreviewOptions, 'acceptedKeys'> & {
23
- components: ReadonlyArray<{
24
- key: string;
25
- status: string;
26
- }>;
27
- };
28
- export declare function useReviewFinalizePreview({ components, ...options }: UseReviewFinalizePreviewOptions): UseFinalizePreviewReturn;
29
- /**
30
- * Shared Finalize-dialog preview, used by both the composite and atomic
31
- * generate-review steps.
32
- *
33
- * When the dialog opens it fires a preview scoped to the ACCEPTED set (so the
34
- * result reflects exactly what the push does, independent of the session's
35
- * not-yet-reclassified generated rows), tracks loading/error, and owns the
36
- * scroll offset for the preview list.
37
- */
38
- export declare function useFinalizePreview(opts: UseFinalizePreviewOptions): UseFinalizePreviewReturn;
39
- export {};