@contentful/experience-design-system-cli 2.33.1-dev-build-5dce9a6.0 → 2.33.1-dev-build-c4ed223.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 -2
- package/dist/src/analytics/env.d.ts +0 -2
- package/dist/src/analytics/exit.d.ts +0 -1
- package/dist/src/analytics/index.d.ts +5 -9
- package/dist/src/analytics/tracker.d.ts +0 -1
- package/dist/src/analyze/build-analyze-view-rows.d.ts +0 -11
- package/dist/src/analyze/composite-closure.d.ts +2 -1
- package/dist/src/analyze/issue-inheritance.d.ts +0 -4
- package/dist/src/analyze/select/tui/components/ComponentRationalePanel.d.ts +0 -16
- package/dist/src/analyze/select/tui/components/FieldEditor.d.ts +2 -2
- package/dist/src/analyze/select/tui/components/HighlightedLine.d.ts +9 -0
- package/dist/src/analyze/select/tui/components/RationaleLine.d.ts +21 -0
- package/dist/src/analyze/select/tui/components/RationalePanel.d.ts +0 -12
- package/dist/src/analyze/select/tui/components/ScrollablePanel.d.ts +14 -0
- package/dist/src/analyze/select/tui/components/Sidebar.d.ts +6 -2
- package/dist/src/analyze/select/tui/components/wrap-text.d.ts +1 -0
- package/dist/src/analyze/select/tui/hooks/list-scroll-input.d.ts +13 -0
- package/dist/src/analyze/select/tui/hooks/useImmediateInput.d.ts +3 -4
- package/dist/src/analyze/select/tui/theme.d.ts +0 -1
- package/dist/src/analyze/select-agent/context-builder.d.ts +3 -3
- package/dist/src/analyze/select-agent/show-rationale.d.ts +0 -26
- package/dist/src/apply/api-client.d.ts +1 -3
- package/dist/src/host-utils.d.ts +0 -1
- package/dist/src/import/composition-options.d.ts +17 -0
- package/dist/src/import/orchestrator.d.ts +0 -1
- package/dist/src/import/picker-dispatch.d.ts +2 -0
- package/dist/src/import/print-prompt.d.ts +0 -1
- package/dist/src/import/tui/auto-filter-error.d.ts +0 -1
- package/dist/src/import/tui/components/LivePreviewSummary.d.ts +14 -0
- package/dist/src/import/tui/components/ReviewComponentPanel.d.ts +33 -0
- package/dist/src/import/tui/components/ReviewDetailsEditor.d.ts +13 -0
- package/dist/src/import/tui/components/ReviewDialogs.d.ts +28 -0
- package/dist/src/import/tui/components/ReviewStatus.d.ts +20 -0
- package/dist/src/import/tui/components/SearchMatchSummary.d.ts +11 -0
- package/dist/src/import/tui/components/SpaceEnvironment.d.ts +7 -0
- package/dist/src/import/tui/components/StepHeader.d.ts +8 -0
- package/dist/src/import/tui/final-review-host.d.ts +2 -12
- package/dist/src/import/tui/history.d.ts +2 -1
- package/dist/src/import/tui/hooks/review-input.d.ts +39 -0
- package/dist/src/import/tui/hooks/sidebar-search-state.d.ts +17 -0
- package/dist/src/import/tui/hooks/useReviewEditor.d.ts +49 -0
- package/dist/src/import/tui/hooks/useReviewPreview.d.ts +26 -0
- package/dist/src/import/tui/hooks/useReviewSession.d.ts +74 -0
- package/dist/src/import/tui/hooks/useReviewSurfaceState.d.ts +12 -0
- package/dist/src/import/tui/lineage-input.d.ts +18 -0
- package/dist/src/import/tui/preview-confirmation-input.d.ts +6 -0
- package/dist/src/import/tui/review-step-props.d.ts +14 -0
- package/dist/src/import/tui/scope-gate-columns.d.ts +0 -1
- package/dist/src/import/tui/scope-gate-host.d.ts +1 -1
- package/dist/src/import/tui/sidebar-help.d.ts +2 -0
- package/dist/src/import/tui/sidebar-input.d.ts +13 -0
- package/dist/src/import/tui/sidebar-navigation.d.ts +18 -0
- package/dist/src/import/tui/steps/AtomicGenerateReviewStep.d.ts +0 -15
- package/dist/src/import/tui/steps/GenerateReviewStep.d.ts +2 -14
- package/dist/src/import/tui/steps/review-details-panel.d.ts +26 -0
- package/dist/src/import/tui/steps/useTerminalColumns.d.ts +1 -0
- package/dist/src/import/tui/useFinalizePreview.d.ts +9 -1
- package/dist/src/import/tui/useLivePreview.d.ts +2 -1
- package/dist/src/index.js +5779 -5927
- package/dist/src/lib/agent-model-options.d.ts +0 -1
- package/dist/src/lib/agent-output.d.ts +5 -0
- package/dist/src/lib/component-patch.d.ts +12 -0
- package/dist/src/lib/contentful-urls.d.ts +2 -7
- package/dist/src/lib/error-parser.d.ts +2 -1
- package/dist/src/lib/path-exists.d.ts +1 -0
- package/dist/src/lib/terminal-capabilities.d.ts +3 -2
- package/dist/src/map-tokens/resolve-defaults.d.ts +3 -2
- package/dist/src/print/validate/validators/read-json-file.d.ts +10 -0
- package/dist/src/runs/export-helpers.d.ts +0 -14
- package/dist/src/runs/fingerprint.d.ts +2 -1
- package/dist/src/runs/push-helpers.d.ts +0 -5
- package/dist/src/runs/run-picker.d.ts +2 -1
- package/dist/src/runs/store.d.ts +3 -5
- package/dist/src/runs/wizard-launcher.d.ts +2 -0
- package/dist/src/runs/wizard-seed.d.ts +20 -0
- package/dist/src/session/db.d.ts +0 -19
- package/dist/src/session/migration.d.ts +0 -2
- package/dist/src/session/resolve-session-id.d.ts +1 -0
- package/dist/src/session/stats.d.ts +0 -1
- package/dist/src/setup/command.d.ts +0 -5
- package/dist/src/setup/prompt-helpers.d.ts +1 -0
- package/dist/src/tui/CommandCompletionView.d.ts +13 -0
- package/dist/src/tui/use-blinking-cursor.d.ts +1 -0
- package/dist/src/tui/use-timed-spinner.d.ts +5 -0
- package/dist/src/types.d.ts +1 -13
- package/package.json +6 -7
- package/dist/src/analyze/select/index.d.ts +0 -6
- package/dist/src/analyze/select/stdout.d.ts +0 -7
- package/dist/src/import/tui/steps/PreviewStep.d.ts +0 -21
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { type Dispatch, type SetStateAction } from 'react';
|
|
2
|
+
import { type TokenPropSuggestion, type TokenReviewToken } from '../../../analyze/select/tui/components/TokenReviewPanel.js';
|
|
3
|
+
import type { CdfReviewEntry } from './useReviewSession.js';
|
|
4
|
+
export type ReviewPanel = 'none' | 'prop-rationale' | 'component-rationale' | 'source' | 'token-review';
|
|
5
|
+
type UseReviewEditorOptions = {
|
|
6
|
+
components: CdfReviewEntry[];
|
|
7
|
+
selectedIdx: number;
|
|
8
|
+
extractSessionId: string;
|
|
9
|
+
availableTokens: TokenReviewToken[];
|
|
10
|
+
setComponents: Dispatch<SetStateAction<CdfReviewEntry[]>>;
|
|
11
|
+
pushHistorySnapshot: (entries: CdfReviewEntry[], label: string) => void;
|
|
12
|
+
onEditSaved: (entries: CdfReviewEntry[]) => void;
|
|
13
|
+
onTokenSaved: (entries: CdfReviewEntry[]) => void;
|
|
14
|
+
};
|
|
15
|
+
export type UseReviewEditorResult = {
|
|
16
|
+
panelOpen: ReviewPanel;
|
|
17
|
+
setPanelOpen: Dispatch<SetStateAction<ReviewPanel>>;
|
|
18
|
+
panelScrollOffset: number;
|
|
19
|
+
setPanelScrollOffset: Dispatch<SetStateAction<number>>;
|
|
20
|
+
jsonScrollOffset: number;
|
|
21
|
+
setJsonScrollOffset: Dispatch<SetStateAction<number>>;
|
|
22
|
+
textEntryActive: boolean;
|
|
23
|
+
setTextEntryActive: Dispatch<SetStateAction<boolean>>;
|
|
24
|
+
showJson: boolean;
|
|
25
|
+
setShowJson: Dispatch<SetStateAction<boolean>>;
|
|
26
|
+
showHiddenProps: boolean;
|
|
27
|
+
setShowHiddenProps: Dispatch<SetStateAction<boolean>>;
|
|
28
|
+
draftValue: string;
|
|
29
|
+
setDraftValue: Dispatch<SetStateAction<string>>;
|
|
30
|
+
saveError: string | null;
|
|
31
|
+
setSaveError: Dispatch<SetStateAction<string | null>>;
|
|
32
|
+
tokenReviewRow: number;
|
|
33
|
+
setTokenReviewRow: Dispatch<SetStateAction<number>>;
|
|
34
|
+
tokenReviewEditing: boolean;
|
|
35
|
+
setTokenReviewEditing: Dispatch<SetStateAction<boolean>>;
|
|
36
|
+
tokenReviewEditCursor: number;
|
|
37
|
+
setTokenReviewEditCursor: Dispatch<SetStateAction<number>>;
|
|
38
|
+
tokenReviewEditSelection: Set<string>;
|
|
39
|
+
setTokenReviewEditSelection: Dispatch<SetStateAction<Set<string>>>;
|
|
40
|
+
pendingGRef: {
|
|
41
|
+
current: boolean;
|
|
42
|
+
};
|
|
43
|
+
currentTokenSuggestions: () => TokenPropSuggestion[];
|
|
44
|
+
handleEditSave: () => void;
|
|
45
|
+
handleEditDiscard: () => void;
|
|
46
|
+
handleTokenEditSave: (suggestion: TokenPropSuggestion) => void;
|
|
47
|
+
};
|
|
48
|
+
export declare function useReviewEditor({ components, selectedIdx, extractSessionId, availableTokens, setComponents, pushHistorySnapshot, onEditSaved, onTokenSaved, }: UseReviewEditorOptions): UseReviewEditorResult;
|
|
49
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { ComponentTypeSummary, ServerPreviewResponse } from '@contentful/experience-design-system-types';
|
|
2
|
+
import type { PreviewAnnotation } from '../../../analyze/select/types.js';
|
|
3
|
+
import { type UseLivePreviewReturn } from '../useLivePreview.js';
|
|
4
|
+
export type UseReviewPreviewOptions = {
|
|
5
|
+
components: ReadonlyArray<{
|
|
6
|
+
key: string;
|
|
7
|
+
}>;
|
|
8
|
+
loading: boolean;
|
|
9
|
+
livePreview: boolean;
|
|
10
|
+
sessionId: string;
|
|
11
|
+
tokensPath: string;
|
|
12
|
+
spaceId: string;
|
|
13
|
+
environmentId: string;
|
|
14
|
+
cmaToken: string;
|
|
15
|
+
host: string;
|
|
16
|
+
deleteAllComponents?: boolean;
|
|
17
|
+
allowDeletions?: boolean;
|
|
18
|
+
onResult?: (response: ServerPreviewResponse) => void;
|
|
19
|
+
};
|
|
20
|
+
export type UseReviewPreviewResult = {
|
|
21
|
+
previewAnnotations: Map<string, PreviewAnnotation>;
|
|
22
|
+
removedComponents: ComponentTypeSummary[];
|
|
23
|
+
livePreviewHook: UseLivePreviewReturn;
|
|
24
|
+
livePreviewSpinner: string;
|
|
25
|
+
};
|
|
26
|
+
export declare function useReviewPreview({ components, loading, livePreview, sessionId, tokensPath, spaceId, environmentId, cmaToken, host, deleteAllComponents, allowDeletions, onResult, }: UseReviewPreviewOptions): UseReviewPreviewResult;
|
|
@@ -0,0 +1,74 @@
|
|
|
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 {};
|
|
@@ -0,0 +1,12 @@
|
|
|
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;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { LineageJumpable } from './hooks/useLineage.js';
|
|
2
|
+
type LineageInputKey = {
|
|
3
|
+
upArrow: boolean;
|
|
4
|
+
downArrow: boolean;
|
|
5
|
+
tab: boolean;
|
|
6
|
+
return: boolean;
|
|
7
|
+
};
|
|
8
|
+
export declare function handleLineageNavigation({ input, key, cursor, jumpables, onCursorChange, onJump, onClose, allowTab, }: {
|
|
9
|
+
input: string;
|
|
10
|
+
key: LineageInputKey;
|
|
11
|
+
cursor: number;
|
|
12
|
+
jumpables: LineageJumpable[];
|
|
13
|
+
onCursorChange: (update: number | ((current: number) => number)) => void;
|
|
14
|
+
onJump: (name: string) => void;
|
|
15
|
+
onClose: () => void;
|
|
16
|
+
allowTab: boolean;
|
|
17
|
+
}): boolean;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type Dispatch, type SetStateAction } from 'react';
|
|
2
|
+
type PreviewConfirmationKey = {
|
|
3
|
+
return: boolean;
|
|
4
|
+
};
|
|
5
|
+
export declare function usePreviewConfirmationInput(breakingWithImpact: boolean, allowDeletions: boolean, fetchedAllowDeletions: boolean, removedCount: number, onConfirm: (acknowledge: boolean, allowDeletions: boolean) => void, setAllowDeletions: Dispatch<SetStateAction<boolean>>): (input: string, key: PreviewConfirmationKey) => boolean;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type ReviewStepProps = {
|
|
2
|
+
extractSessionId: string;
|
|
3
|
+
tokenSessionId?: string | null;
|
|
4
|
+
onFinalize: (accepted: number, rejected: number, unresolved: number) => void;
|
|
5
|
+
onQuit: () => void;
|
|
6
|
+
livePreview?: boolean;
|
|
7
|
+
spaceId?: string;
|
|
8
|
+
environmentId?: string;
|
|
9
|
+
cmaToken?: string;
|
|
10
|
+
host?: string;
|
|
11
|
+
tokensPath?: string;
|
|
12
|
+
initialFinalizeError?: string | null;
|
|
13
|
+
allowDeletions?: boolean;
|
|
14
|
+
};
|
|
@@ -4,7 +4,6 @@ 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;
|
|
8
7
|
export declare function computeColumnWidths(totalWidth: number): {
|
|
9
8
|
layout: 'single' | 'three-column';
|
|
10
9
|
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
|
-
|
|
5
|
+
type AutoFilterStatus = 'idle' | 'running' | 'complete' | 'cancelled' | 'failed';
|
|
6
6
|
export type ScopeGateHostProps = {
|
|
7
7
|
components: ReadonlyArray<ScopeComponent>;
|
|
8
8
|
autoAccept: boolean;
|
|
@@ -0,0 +1,13 @@
|
|
|
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 {};
|
|
@@ -0,0 +1,18 @@
|
|
|
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,5 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { CDFComponentEntry } from '@contentful/experience-design-system-types';
|
|
3
2
|
type GenerateReviewStepProps = {
|
|
4
3
|
extractSessionId: string;
|
|
5
4
|
tokenSessionId?: string | null;
|
|
@@ -25,19 +24,5 @@ type GenerateReviewStepProps = {
|
|
|
25
24
|
*/
|
|
26
25
|
initialFinalizeError?: string | null;
|
|
27
26
|
};
|
|
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[];
|
|
42
27
|
export declare function AtomicGenerateReviewStep({ extractSessionId, tokenSessionId, onFinalize, onQuit, livePreview, spaceId, environmentId, cmaToken, host, tokensPath, initialFinalizeError, }: GenerateReviewStepProps): React.ReactElement;
|
|
43
28
|
export {};
|
|
@@ -1,19 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { BreakingChange, CDFComponentEntry, ComponentTypeSummary, DownstreamImpact, ServerPreviewResponse } from '@contentful/experience-design-system-types';
|
|
3
|
-
type
|
|
4
|
-
|
|
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
|
-
};
|
|
3
|
+
import type { ReviewStepProps } from '../review-step-props.js';
|
|
4
|
+
type GenerateReviewStepProps = ReviewStepProps;
|
|
17
5
|
export declare function sortComponentsForSidebar<T extends {
|
|
18
6
|
key: string;
|
|
19
7
|
entry: CDFComponentEntry;
|
|
@@ -0,0 +1,26 @@
|
|
|
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 {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useTerminalColumns(): number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ComponentTypeSummary } from '@contentful/experience-design-system-types';
|
|
2
|
-
|
|
2
|
+
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,6 +21,13 @@ 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;
|
|
24
31
|
/**
|
|
25
32
|
* Shared Finalize-dialog deletion preview, used by both the composite and
|
|
26
33
|
* atomic generate-review steps so the "what will this push delete" experience
|
|
@@ -34,3 +41,4 @@ export type UseFinalizePreviewReturn = {
|
|
|
34
41
|
* simply omits the deletion section.
|
|
35
42
|
*/
|
|
36
43
|
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
|
-
|
|
18
|
+
type LivePreviewStatus = 'idle' | 'running';
|
|
19
19
|
export type UseLivePreviewReturn = {
|
|
20
20
|
trigger: () => void;
|
|
21
21
|
status: LivePreviewStatus;
|
|
@@ -38,3 +38,4 @@ 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 {};
|