@contentful/experience-design-system-cli 2.37.1-dev-build-8b126ca1.0 → 2.37.1-dev-build-aa3ffe6f.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 +1 -1
- package/legacy/dist/src/index.js +8572 -18583
- package/legacy/package.json +1 -1
- package/package.json +4 -4
- package/legacy/dist/src/analyze/cycle-view.d.ts +0 -7
- package/legacy/dist/src/import/agent-model-resolve.d.ts +0 -27
- package/legacy/dist/src/import/command.d.ts +0 -2
- package/legacy/dist/src/import/composition-options.d.ts +0 -7
- package/legacy/dist/src/import/cycle-auto-reject.d.ts +0 -4
- package/legacy/dist/src/import/path-utils.d.ts +0 -15
- package/legacy/dist/src/import/tui/CustomPromptBanner.d.ts +0 -5
- package/legacy/dist/src/import/tui/WizardApp.d.ts +0 -24
- package/legacy/dist/src/import/tui/autocomplete.d.ts +0 -5
- package/legacy/dist/src/import/tui/components/CompactControlBar.d.ts +0 -4
- package/legacy/dist/src/import/tui/components/LegendEntry.d.ts +0 -2
- package/legacy/dist/src/import/tui/components/LivePreviewSummary.d.ts +0 -14
- package/legacy/dist/src/import/tui/components/ReviewComponentPanel.d.ts +0 -33
- package/legacy/dist/src/import/tui/components/ReviewDetailsEditor.d.ts +0 -15
- package/legacy/dist/src/import/tui/components/ReviewDialogs.d.ts +0 -28
- package/legacy/dist/src/import/tui/components/ReviewStatus.d.ts +0 -15
- package/legacy/dist/src/import/tui/components/SearchMatchSummary.d.ts +0 -11
- package/legacy/dist/src/import/tui/components/SpaceEnvironment.d.ts +0 -7
- package/legacy/dist/src/import/tui/components/StepHeader.d.ts +0 -8
- package/legacy/dist/src/import/tui/cycle-panel-scroll.d.ts +0 -8
- package/legacy/dist/src/import/tui/group-collapse.d.ts +0 -2
- package/legacy/dist/src/import/tui/handoff.d.ts +0 -36
- package/legacy/dist/src/import/tui/history.d.ts +0 -23
- package/legacy/dist/src/import/tui/hooks/review-input.d.ts +0 -39
- package/legacy/dist/src/import/tui/hooks/sidebar-search-state.d.ts +0 -17
- package/legacy/dist/src/import/tui/hooks/useOverlayPanel.d.ts +0 -13
- package/legacy/dist/src/import/tui/hooks/useReviewEditor.d.ts +0 -49
- package/legacy/dist/src/import/tui/hooks/useReviewPreview.d.ts +0 -25
- package/legacy/dist/src/import/tui/hooks/useReviewSession.d.ts +0 -95
- package/legacy/dist/src/import/tui/hooks/useReviewSurfaceState.d.ts +0 -12
- package/legacy/dist/src/import/tui/lineage-layout.d.ts +0 -68
- package/legacy/dist/src/import/tui/preview-confirmation-input.d.ts +0 -5
- package/legacy/dist/src/import/tui/push-progress.d.ts +0 -9
- package/legacy/dist/src/import/tui/run-print-files-helpers.d.ts +0 -26
- package/legacy/dist/src/import/tui/run-teaser.d.ts +0 -5
- package/legacy/dist/src/import/tui/runLivePreview.d.ts +0 -45
- package/legacy/dist/src/import/tui/sidebar-help.d.ts +0 -2
- package/legacy/dist/src/import/tui/sidebar-input.d.ts +0 -13
- package/legacy/dist/src/import/tui/sidebar-navigation.d.ts +0 -18
- package/legacy/dist/src/import/tui/sidebar-width.d.ts +0 -1
- package/legacy/dist/src/import/tui/step-filters.d.ts +0 -19
- package/legacy/dist/src/import/tui/steps/DoneStep.d.ts +0 -28
- package/legacy/dist/src/import/tui/steps/ErrorStep.d.ts +0 -10
- package/legacy/dist/src/import/tui/steps/GateStep.d.ts +0 -15
- package/legacy/dist/src/import/tui/steps/GenerateReviewStep.d.ts +0 -37
- package/legacy/dist/src/import/tui/steps/PreviewValidationErrorStep.d.ts +0 -11
- package/legacy/dist/src/import/tui/steps/PushingStep.d.ts +0 -9
- package/legacy/dist/src/import/tui/steps/RunningStep.d.ts +0 -32
- package/legacy/dist/src/import/tui/steps/WizardPreviewStep.d.ts +0 -21
- package/legacy/dist/src/import/tui/steps/auto-reject-decision.d.ts +0 -7
- package/legacy/dist/src/import/tui/steps/breaking-change-format.d.ts +0 -2
- package/legacy/dist/src/import/tui/steps/enumerate-cycle-breaks.d.ts +0 -14
- package/legacy/dist/src/import/tui/steps/preview-diff.d.ts +0 -10
- package/legacy/dist/src/import/tui/steps/review-details-panel.d.ts +0 -26
- package/legacy/dist/src/import/tui/steps/review-json-panel.d.ts +0 -7
- package/legacy/dist/src/import/tui/useFinalizePreview.d.ts +0 -39
- package/legacy/dist/src/import/tui/useLivePreview.d.ts +0 -39
- package/legacy/dist/src/import/tui/wizard-422-helpers.d.ts +0 -48
- package/legacy/dist/src/import/tui/wizard-state-transitions.d.ts +0 -30
- package/legacy/dist/src/runs/path-prompt.d.ts +0 -8
- package/legacy/dist/src/tui/use-blinking-cursor.d.ts +0 -1
- package/legacy/dist/src/tui/use-timed-spinner.d.ts +0 -4
|
@@ -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,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,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,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,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 {};
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import type { ServerPreviewResponse } from '@contentful/experience-design-system-types';
|
|
2
|
-
export type UseLivePreviewOptions = {
|
|
3
|
-
enabled: boolean;
|
|
4
|
-
sessionId: string;
|
|
5
|
-
tokensPath: string;
|
|
6
|
-
spaceId: string;
|
|
7
|
-
environmentId: string;
|
|
8
|
-
cmaToken: string;
|
|
9
|
-
host: string;
|
|
10
|
-
onResult: (response: ServerPreviewResponse | null) => void;
|
|
11
|
-
debounceMs?: number;
|
|
12
|
-
/** Preview an empty-but-present CDF document (delete-all diff) when nothing
|
|
13
|
-
* is accepted, so the final-review UI can show what a push would delete. */
|
|
14
|
-
deleteAllComponents?: boolean;
|
|
15
|
-
};
|
|
16
|
-
type LivePreviewStatus = 'idle' | 'running';
|
|
17
|
-
export type UseLivePreviewReturn = {
|
|
18
|
-
trigger: () => void;
|
|
19
|
-
status: LivePreviewStatus;
|
|
20
|
-
disabled: boolean;
|
|
21
|
-
};
|
|
22
|
-
/**
|
|
23
|
-
* Hook that owns the post-save live-preview side effect for the wizard's
|
|
24
|
-
* final-review step. Centralizes:
|
|
25
|
-
*
|
|
26
|
-
* - 500ms debounce so rapid Ctrl+S spam collapses to a single API call.
|
|
27
|
-
* - Generation tag on every fire so a stale in-flight call's response is
|
|
28
|
-
* discarded if a newer fire has already kicked off (in lieu of an
|
|
29
|
-
* AbortController for v1).
|
|
30
|
-
* - Disable-for-session on 401/403: subsequent triggers no-op until the
|
|
31
|
-
* wizard exits. One-line stderr warning. No modal, no re-prompt — the
|
|
32
|
-
* operator is mid-edit and we must not interrupt the flow.
|
|
33
|
-
* - Status state for the sidebar spinner (`'idle' | 'running'`).
|
|
34
|
-
*
|
|
35
|
-
* Cred-missing / disabled / not-enabled cases short-circuit BEFORE the timer
|
|
36
|
-
* is set so we don't accumulate dead timers.
|
|
37
|
-
*/
|
|
38
|
-
export declare function useLivePreview(opts: UseLivePreviewOptions): UseLivePreviewReturn;
|
|
39
|
-
export {};
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { ApiError, type PreviewValidationError } from '../../apply/api-client.js';
|
|
2
|
-
import { patchReviewStateWithValidationErrors, rejectComponentsByName } from '../../analyze/select/command.js';
|
|
3
|
-
export type Preview422Outcome = {
|
|
4
|
-
kind: 'validation-error';
|
|
5
|
-
errors: PreviewValidationError[];
|
|
6
|
-
missingNames: string[];
|
|
7
|
-
} | {
|
|
8
|
-
kind: 'unparseable';
|
|
9
|
-
message: string;
|
|
10
|
-
} | {
|
|
11
|
-
kind: 'not-422';
|
|
12
|
-
};
|
|
13
|
-
/**
|
|
14
|
-
* Decide what to do with an `ApiError` raised by `previewImport()`.
|
|
15
|
-
* Returns `not-422` if the caller should fall through to its other branches
|
|
16
|
-
* (404 / 401 / 403 / generic), `unparseable` if the body cannot be parsed
|
|
17
|
-
* into structured component-level errors (caller should route to the generic
|
|
18
|
-
* error step), or `validation-error` with the patched-state side effects
|
|
19
|
-
* already applied.
|
|
20
|
-
*
|
|
21
|
-
* Pure decision logic + a single delegated side effect to
|
|
22
|
-
* `patchReviewStateWithValidationErrors`. Extracted from `WizardApp.runPreview`
|
|
23
|
-
* so the routing is unit-testable without driving the full TUI.
|
|
24
|
-
*/
|
|
25
|
-
export declare function handlePreview422(err: ApiError, extractSessionId: string | null, patchFn?: typeof patchReviewStateWithValidationErrors): Promise<Preview422Outcome>;
|
|
26
|
-
/**
|
|
27
|
-
* The WizardState patch the wizard should spread into any update that
|
|
28
|
-
* transitions OUT of the preview-validation-error step (e.g. into
|
|
29
|
-
* preview-gate after a successful retry). Without this, the validation-error
|
|
30
|
-
* arrays linger in state and any future code path that reads them sees stale
|
|
31
|
-
* data from a prior failed attempt.
|
|
32
|
-
*/
|
|
33
|
-
export declare function clearedValidationErrorState(): {
|
|
34
|
-
previewValidationErrors: PreviewValidationError[];
|
|
35
|
-
previewValidationMissingNames: string[];
|
|
36
|
-
};
|
|
37
|
-
/**
|
|
38
|
-
* Run the "skip and retry" side effect: dedup the offending component
|
|
39
|
-
* names from a list of errors and call `rejectComponentsByName`. Returns
|
|
40
|
-
* the deduped names so the caller can log them or include them in test
|
|
41
|
-
* assertions. No-op when sessionId is null or errors are empty.
|
|
42
|
-
*
|
|
43
|
-
* The DB update inside `rejectComponentsByName` is what makes the next
|
|
44
|
-
* preview see a CDF document with the offenders excluded — see SP-3 retro
|
|
45
|
-
* Bug 1: writing to the JSON state file alone is not enough because
|
|
46
|
-
* `loadCDFComponents` reads from the pipeline DB.
|
|
47
|
-
*/
|
|
48
|
-
export declare function applySkipValidationErrors(sessionId: string | null, errors: PreviewValidationError[], rejectFn?: typeof rejectComponentsByName): Promise<string[]>;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
export declare function shouldGenerateAfterScopeGate(opts: {
|
|
2
|
-
acceptedCount: number;
|
|
3
|
-
}): boolean;
|
|
4
|
-
export declare function shouldGenerateAfterCredentialsValidated(opts: {
|
|
5
|
-
acceptedCount: number;
|
|
6
|
-
}): boolean;
|
|
7
|
-
export declare function shouldSkipFinalReviewAfterCredentials(state: {
|
|
8
|
-
generateSessionId: string | null;
|
|
9
|
-
finalReviewPassed: boolean;
|
|
10
|
-
}): boolean;
|
|
11
|
-
export declare function resolveNoCacheForGenerate(opts: {
|
|
12
|
-
cliNoCache: boolean;
|
|
13
|
-
}): boolean;
|
|
14
|
-
export declare function shouldBypassPreview(state: {
|
|
15
|
-
credentialsSkipped: boolean;
|
|
16
|
-
}): boolean;
|
|
17
|
-
export declare function buildSkippedPreviewTransition(): {
|
|
18
|
-
step: 'done';
|
|
19
|
-
serverPreview: null;
|
|
20
|
-
};
|
|
21
|
-
export type CycleGateAction = 'block' | 'proceed';
|
|
22
|
-
export declare function resolveCycleGateAction(opts: {
|
|
23
|
-
hasCycles: boolean;
|
|
24
|
-
}): CycleGateAction;
|
|
25
|
-
export declare function shouldRefusePush(state: {
|
|
26
|
-
credentialsSkipped: boolean;
|
|
27
|
-
}): boolean;
|
|
28
|
-
export declare function buildSkippedPushTransition(): {
|
|
29
|
-
step: 'print-gate';
|
|
30
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export type PathPromptProps = {
|
|
3
|
-
defaultPath: string;
|
|
4
|
-
onSubmit: (path: string) => void;
|
|
5
|
-
onCancel: () => void;
|
|
6
|
-
label?: string;
|
|
7
|
-
};
|
|
8
|
-
export declare function PathPrompt({ defaultPath, onSubmit, onCancel, label, }: PathPromptProps): React.ReactElement;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function useBlinkingCursor(): boolean;
|