@contentful/experience-design-system-cli 2.33.1-dev-build-5dce9a6.0 → 2.33.1-dev-build-a1a8b45.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
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentful/experience-design-system-cli",
|
|
3
|
-
"version": "2.33.1-dev-build-
|
|
3
|
+
"version": "2.33.1-dev-build-a1a8b45.0",
|
|
4
4
|
"description": "Contentful Experiences design system import CLI",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -47,7 +47,6 @@
|
|
|
47
47
|
"ink": "^5.2.1",
|
|
48
48
|
"react": "^18.3.1",
|
|
49
49
|
"react-devtools-core": "^4.19.1",
|
|
50
|
-
"react-dom": "^18.3.1",
|
|
51
50
|
"svelte": "^5.56.4",
|
|
52
51
|
"ts-morph": "^27.0.2",
|
|
53
52
|
"typescript": "^5.9.3"
|
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
/** Merge pipeline analytics env into a subprocess environment. */
|
|
2
|
-
export declare function analyticsEnvForSubprocess(env: NodeJS.ProcessEnv, analyticsSessionId: string): NodeJS.ProcessEnv;
|
|
3
1
|
/** Debug + pipeline analytics env for orchestrator subprocesses. */
|
|
4
2
|
export declare function pipelineSubprocessEnv(env: NodeJS.ProcessEnv, analyticsSessionId: string): NodeJS.ProcessEnv;
|
|
@@ -2,4 +2,3 @@ import type { ApiError } from '../apply/api-client.js';
|
|
|
2
2
|
import type { CommandFailure } from './types.js';
|
|
3
3
|
export declare function exitWithAnalytics(code: number, fields?: CommandFailure): Promise<never>;
|
|
4
4
|
export declare function failureFromApiError(error: ApiError): CommandFailure;
|
|
5
|
-
export declare function failureFromUnknown(error: unknown): CommandFailure;
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
5
|
-
export { isPipelineAnalyticsChild, resolveAnalyticsSessionId } from './session.js';
|
|
6
|
-
export { normalizeCommand } from './normalize.js';
|
|
7
|
-
export { getOsName } from './os.js';
|
|
8
|
-
export { bindAnalyticsSession, bindAnalyticsSessionId, completeActiveCommand, emitSessionStarted, enrichCommandResult, failActiveCommand, getBoundSessionId, noteCommandStart, resetAnalyticsStateForTests, setCommandContext, } from './tracker.js';
|
|
1
|
+
export { exitWithAnalytics, failureFromApiError } from './exit.js';
|
|
2
|
+
export { flushAnalytics, setPersistedAnalyticsDisabled } from './client.js';
|
|
3
|
+
export { isPipelineAnalyticsChild } from './session.js';
|
|
4
|
+
export { bindAnalyticsSession, bindAnalyticsSessionId, completeActiveCommand, emitSessionStarted, enrichCommandResult, failActiveCommand, noteCommandStart, } from './tracker.js';
|
|
9
5
|
export { recordApplyOutcome, recordContentfulContext } from './apply.js';
|
|
10
|
-
export type {
|
|
6
|
+
export type { CommandFailure } from './types.js';
|
|
@@ -7,7 +7,6 @@ export declare function bindAnalyticsSessionId(sessionId: string | undefined, co
|
|
|
7
7
|
export declare function setCommandContext(context: CommandContext): void;
|
|
8
8
|
/** Merge optional completion fields before the terminal event fires. */
|
|
9
9
|
export declare function enrichCommandResult(fields: CommandCompletion): void;
|
|
10
|
-
export declare function getBoundSessionId(): string | undefined;
|
|
11
10
|
/** Bind the pipeline session and emit invoked once both command and session are known. */
|
|
12
11
|
export declare function bindAnalyticsSession(id: string, context?: CommandContext): Promise<void>;
|
|
13
12
|
/** Emit session_started once per new pipeline head. */
|
|
@@ -1,17 +1,6 @@
|
|
|
1
1
|
import type { RawComponentDefinition } from '../types.js';
|
|
2
2
|
import type { AnalyzeViewResult } from './tui/AnalyzeView.js';
|
|
3
3
|
type AnalyzeViewRow = AnalyzeViewResult['components'][number];
|
|
4
|
-
/**
|
|
5
|
-
* Convention used by both halves of the warnings split:
|
|
6
|
-
* per-component warnings start with `<ComponentName>:` and are attached to
|
|
7
|
-
* the matching row by `buildAnalyzeViewRows` below; everything else falls
|
|
8
|
-
* through to `partitionGlobalWarnings` and renders at the top of the panel.
|
|
9
|
-
*
|
|
10
|
-
* Centralized so the two halves can't drift. If the prefix shape ever changes
|
|
11
|
-
* (e.g. requiring a space after the colon), update `WARNING_PREFIX_SUFFIX`
|
|
12
|
-
* and both call sites pick it up.
|
|
13
|
-
*/
|
|
14
|
-
export declare const WARNING_PREFIX_SUFFIX = ":";
|
|
15
4
|
export declare function isWarningForComponent(warning: string, componentName: string): boolean;
|
|
16
5
|
/**
|
|
17
6
|
* Split warnings into "global" (none of the surviving component-name prefixes
|
|
@@ -5,7 +5,7 @@ export interface ComponentGraphNode {
|
|
|
5
5
|
allowedComponents?: string[];
|
|
6
6
|
}>;
|
|
7
7
|
}
|
|
8
|
-
|
|
8
|
+
interface ClosureNode {
|
|
9
9
|
name: string;
|
|
10
10
|
depth: number;
|
|
11
11
|
path: string[];
|
|
@@ -23,3 +23,4 @@ export declare function computeClosure(root: string, components: ComponentGraphN
|
|
|
23
23
|
export declare function computeAllClosures(components: ComponentGraphNode[], selected?: Set<string>): Map<string, Closure>;
|
|
24
24
|
export declare function aggregateStatus(closure: Closure, perNodeStatus: Map<string, NodeStatus>): NodeStatus;
|
|
25
25
|
export declare function findSharedDeps(closures: Map<string, Closure>): Map<string, string[]>;
|
|
26
|
+
export {};
|
|
@@ -7,20 +7,4 @@ export type ComponentRationalePanelProps = {
|
|
|
7
7
|
height: number;
|
|
8
8
|
active: boolean;
|
|
9
9
|
};
|
|
10
|
-
type RenderedLine = {
|
|
11
|
-
kind: 'heading';
|
|
12
|
-
text: string;
|
|
13
|
-
} | {
|
|
14
|
-
kind: 'text';
|
|
15
|
-
text: string;
|
|
16
|
-
dim?: boolean;
|
|
17
|
-
} | {
|
|
18
|
-
kind: 'list-name';
|
|
19
|
-
text: string;
|
|
20
|
-
sublabel?: string;
|
|
21
|
-
} | {
|
|
22
|
-
kind: 'blank';
|
|
23
|
-
};
|
|
24
|
-
export declare function renderComponentRationaleLines(data: ComponentRationale, innerWidth: number): RenderedLine[];
|
|
25
10
|
export declare function ComponentRationalePanel({ data, scrollOffset, width, height, active, }: ComponentRationalePanelProps): React.ReactElement;
|
|
26
|
-
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { findSlotCycles, type ComponentSlotInfo } from '../../../cycle-detection.js';
|
|
3
|
-
|
|
3
|
+
type PropMetadata = {
|
|
4
4
|
rationale?: string | null;
|
|
5
5
|
sourceStartLine?: number | null;
|
|
6
6
|
sourceEndLine?: number | null;
|
|
@@ -13,7 +13,7 @@ export type FieldEditorMetadata = {
|
|
|
13
13
|
/** Per-prop metadata keyed by prop name. */
|
|
14
14
|
props?: Record<string, PropMetadata>;
|
|
15
15
|
};
|
|
16
|
-
type FieldEditorProps = {
|
|
16
|
+
export type FieldEditorProps = {
|
|
17
17
|
value: string;
|
|
18
18
|
width: number;
|
|
19
19
|
height: number;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type RationaleLineData = {
|
|
3
|
+
kind: 'heading';
|
|
4
|
+
text: string;
|
|
5
|
+
} | {
|
|
6
|
+
kind: 'text';
|
|
7
|
+
text: string;
|
|
8
|
+
dim?: boolean;
|
|
9
|
+
} | {
|
|
10
|
+
kind: 'label';
|
|
11
|
+
text: string;
|
|
12
|
+
prefix?: string;
|
|
13
|
+
suffix?: string;
|
|
14
|
+
color?: string;
|
|
15
|
+
} | {
|
|
16
|
+
kind: 'blank';
|
|
17
|
+
};
|
|
18
|
+
export declare function RationaleLine({ line, active }: {
|
|
19
|
+
line: RationaleLineData;
|
|
20
|
+
active: boolean;
|
|
21
|
+
}): React.ReactElement;
|
|
@@ -12,16 +12,4 @@ export type RationalePanelProps = {
|
|
|
12
12
|
height: number;
|
|
13
13
|
active: boolean;
|
|
14
14
|
};
|
|
15
|
-
type RenderedLine = {
|
|
16
|
-
kind: 'name';
|
|
17
|
-
text: string;
|
|
18
|
-
isSlot: boolean;
|
|
19
|
-
} | {
|
|
20
|
-
kind: 'text';
|
|
21
|
-
text: string;
|
|
22
|
-
} | {
|
|
23
|
-
kind: 'blank';
|
|
24
|
-
};
|
|
25
|
-
export declare function renderRationaleLines(rows: RationaleRow[], innerWidth: number): RenderedLine[];
|
|
26
15
|
export declare function RationalePanel({ componentName, rows, scrollOffset, width, height, active, }: RationalePanelProps): React.ReactElement;
|
|
27
|
-
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type ScrollablePanelProps = {
|
|
3
|
+
header: React.ReactNode;
|
|
4
|
+
width: number;
|
|
5
|
+
height: number;
|
|
6
|
+
active: boolean;
|
|
7
|
+
totalLines: number;
|
|
8
|
+
visibleStart: number;
|
|
9
|
+
visibleEnd: number;
|
|
10
|
+
borderColor?: string;
|
|
11
|
+
children: React.ReactNode;
|
|
12
|
+
};
|
|
13
|
+
export declare function ScrollablePanel({ header, width, height, active, totalLines, visibleStart, visibleEnd, borderColor, children, }: ScrollablePanelProps): React.ReactElement;
|
|
14
|
+
export {};
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { PreviewAnnotation, ReviewComponentSummary, ReviewComponentStatus } from '../../types.js';
|
|
3
|
-
export declare function previewBadge(annotation: PreviewAnnotation | undefined):
|
|
3
|
+
export declare function previewBadge(annotation: PreviewAnnotation | undefined): PreviewBadgeValue | null;
|
|
4
|
+
export type PreviewBadgeValue = {
|
|
4
5
|
char: string;
|
|
5
6
|
color: string;
|
|
6
7
|
bold?: boolean;
|
|
7
8
|
dim?: boolean;
|
|
8
|
-
}
|
|
9
|
+
};
|
|
10
|
+
export declare function PreviewBadge({ badge }: {
|
|
11
|
+
badge: PreviewBadgeValue | null;
|
|
12
|
+
}): React.ReactElement;
|
|
9
13
|
type SidebarProps = {
|
|
10
14
|
components: ReviewComponentSummary[];
|
|
11
15
|
selectedId: string | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function wrapText(text: string, innerWidth: number): string[];
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
type ListScrollKey = {
|
|
2
|
+
upArrow: boolean;
|
|
3
|
+
downArrow: boolean;
|
|
4
|
+
return: boolean;
|
|
5
|
+
};
|
|
6
|
+
type ListScrollOptions = {
|
|
7
|
+
onExit: () => void;
|
|
8
|
+
onScroll: (update: number | ((current: number) => number)) => void;
|
|
9
|
+
maxOffset?: number;
|
|
10
|
+
endOffset: number;
|
|
11
|
+
};
|
|
12
|
+
export declare function handleListScrollInput(input: string, key: ListScrollKey, { onExit, onScroll, maxOffset, endOffset }: ListScrollOptions): boolean;
|
|
13
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
type
|
|
1
|
+
export type ImmediateInputKey = {
|
|
2
2
|
upArrow: boolean;
|
|
3
3
|
downArrow: boolean;
|
|
4
4
|
leftArrow: boolean;
|
|
@@ -15,6 +15,5 @@ type Key = {
|
|
|
15
15
|
delete: boolean;
|
|
16
16
|
meta: boolean;
|
|
17
17
|
};
|
|
18
|
-
type
|
|
19
|
-
export declare function useImmediateInput(handler:
|
|
20
|
-
export {};
|
|
18
|
+
export type ImmediateInputHandler = (input: string, key: ImmediateInputKey) => void;
|
|
19
|
+
export declare function useImmediateInput(handler: ImmediateInputHandler): void;
|
|
@@ -11,5 +11,4 @@ export declare const PALETTE: {
|
|
|
11
11
|
readonly subtle: "#DDE5EC";
|
|
12
12
|
readonly bg: "#EFF2F6";
|
|
13
13
|
};
|
|
14
|
-
export type PaletteRole = keyof typeof PALETTE;
|
|
15
14
|
export declare function statusPaletteColor(status: ReviewComponentStatus, validationErrorCount: number, validationWarningCount: number): string;
|
|
@@ -5,18 +5,18 @@ export type SelectionContextSummary = {
|
|
|
5
5
|
resolverReferenceCount: number;
|
|
6
6
|
hasParentUsageSite: boolean;
|
|
7
7
|
};
|
|
8
|
-
|
|
8
|
+
type SelectionImportSummary = {
|
|
9
9
|
source: string;
|
|
10
10
|
names: string[];
|
|
11
11
|
local: boolean;
|
|
12
12
|
resolvedPath?: string;
|
|
13
13
|
};
|
|
14
|
-
|
|
14
|
+
type SelectionFileSummary = {
|
|
15
15
|
path: string;
|
|
16
16
|
exports: string[];
|
|
17
17
|
codeSnippet: string;
|
|
18
18
|
};
|
|
19
|
-
|
|
19
|
+
type SelectionReference = {
|
|
20
20
|
path: string;
|
|
21
21
|
snippet: string;
|
|
22
22
|
};
|
|
@@ -1,29 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Read-only rationale view for the `analyze select-agent --show-rationale` flag.
|
|
3
|
-
*
|
|
4
|
-
* Reads the rationale data already persisted by a previous `analyze select-agent`
|
|
5
|
-
* run (component-level decision + reject reason on raw_components; per-prop
|
|
6
|
-
* rationale on raw_props — both populated by the writer path in command.ts and
|
|
7
|
-
* the rationale columns added in the schema migration for PR #52). No LLM
|
|
8
|
-
* invocation, no schema changes.
|
|
9
|
-
*
|
|
10
|
-
* Schema-version assertion: if the rationale columns are absent (older DB),
|
|
11
|
-
* throw with a clear message pointing at the remediation step.
|
|
12
|
-
*/
|
|
13
|
-
export interface RationaleRow {
|
|
14
|
-
name: string;
|
|
15
|
-
decision: 'accepted' | 'rejected' | 'needs-review' | 'extracted';
|
|
16
|
-
reason: string | null;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Resolves which session to read from. If `sessionFlag` is provided, asserts
|
|
20
|
-
* the session exists and has at least one raw component; otherwise falls back
|
|
21
|
-
* to the most recent completed `analyze select` step.
|
|
22
|
-
*/
|
|
23
|
-
export declare function resolveRationaleSession(sessionFlag: string | undefined, dbPath?: string): string;
|
|
24
|
-
export declare function loadRationaleRows(sessionId: string, dbPath?: string): RationaleRow[];
|
|
25
|
-
export declare function formatRationaleTable(rows: RationaleRow[]): string;
|
|
26
|
-
export declare function formatRationaleJson(rows: RationaleRow[]): string;
|
|
27
1
|
/**
|
|
28
2
|
* Top-level dispatch for `analyze select-agent --show-rationale`. Pure I/O
|
|
29
3
|
* boundary: reads DB, writes formatted output to stdout, throws on error.
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type { ManifestPayload, ServerPreviewResponse, ApplyOperationResponse
|
|
2
|
-
export declare const DEFAULT_HOST = "https://api.contentful.com";
|
|
1
|
+
import type { ManifestPayload, ServerPreviewResponse, ApplyOperationResponse } from '@contentful/experience-design-system-types';
|
|
3
2
|
export declare const PREVIEW_ERROR_PREFIX = "preview failed:";
|
|
4
3
|
export declare const APPLY_ERROR_PREFIX = "apply failed:";
|
|
5
4
|
export declare const VALIDATION_FAILED_CODE = "\"ValidationFailed\"";
|
|
@@ -38,7 +37,6 @@ export interface PreviewValidationError {
|
|
|
38
37
|
* the field-level detail.
|
|
39
38
|
*/
|
|
40
39
|
export declare function parsePreviewValidationErrors(body: string): PreviewValidationError[];
|
|
41
|
-
export declare function sanitizeBreakingChanges(raw: unknown): BreakingChange[];
|
|
42
40
|
export declare class ImportApiClient {
|
|
43
41
|
private host;
|
|
44
42
|
private token;
|
package/dist/src/host-utils.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export declare const DEFAULT_API_HOST = "https://api.contentful.com";
|
|
2
1
|
export declare const DEFAULT_CONFIGURED_HOST = "api.contentful.com";
|
|
3
2
|
export declare function toConfiguredHost(host?: string): string | undefined;
|
|
4
3
|
export declare function toApiHost(host?: string): string;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export type CompositionOptionInput = {
|
|
2
|
+
compositionMap?: string;
|
|
3
|
+
compositionAgent?: boolean;
|
|
4
|
+
compositionAgentMode?: string;
|
|
5
|
+
compositionRefresh?: boolean;
|
|
6
|
+
generateMap?: string;
|
|
7
|
+
prompt?: string[];
|
|
8
|
+
};
|
|
9
|
+
export type CompositionForwardingOptions = {
|
|
10
|
+
compositionMap?: string;
|
|
11
|
+
compositionAgent?: boolean;
|
|
12
|
+
compositionAgentMode?: string;
|
|
13
|
+
compositionRefresh?: boolean;
|
|
14
|
+
generateMap?: string;
|
|
15
|
+
promptOverrides?: string[];
|
|
16
|
+
};
|
|
17
|
+
export declare function buildCompositionForwardingOptions(options: CompositionOptionInput): CompositionForwardingOptions;
|
|
@@ -23,4 +23,6 @@ export type PickerDispatchDeps = {
|
|
|
23
23
|
*/
|
|
24
24
|
pickerPushRun?: typeof pickerPushRunFn;
|
|
25
25
|
};
|
|
26
|
+
export declare function buildPickerCredentialOptions(opts: Pick<PickerDispatchOptions, 'spaceId' | 'environmentId' | 'cmaToken' | 'host' | 'force'>): Pick<PickerDispatchOptions, 'spaceId' | 'environmentId' | 'cmaToken' | 'host' | 'force'>;
|
|
27
|
+
export declare function buildPickerModifyOptions(opts: Pick<PickerDispatchOptions, 'outDir' | 'overwrite' | 'saveAsNew' | 'force'>): Pick<PickerDispatchOptions, 'outDir' | 'overwrite' | 'saveAsNew' | 'force'>;
|
|
26
28
|
export declare function dispatchPickerSelection(selection: RunPickerSelection, opts: PickerDispatchOptions, deps: PickerDispatchDeps): Promise<void>;
|
|
@@ -13,7 +13,6 @@
|
|
|
13
13
|
* declarative and lets the deprecation notice be asserted from tests without
|
|
14
14
|
* spawning the full pipeline.
|
|
15
15
|
*/
|
|
16
|
-
export declare const DRY_RUN_DEPRECATION_NOTICE: string;
|
|
17
16
|
export type PromptFlags = {
|
|
18
17
|
/** True when the user passed --dry-run. */
|
|
19
18
|
dryRun?: boolean;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { PreviewAnnotation } from '../../../analyze/select/types.js';
|
|
3
|
+
import type { UseLivePreviewReturn } from '../useLivePreview.js';
|
|
4
|
+
type LivePreviewSummaryProps = {
|
|
5
|
+
enabled: boolean;
|
|
6
|
+
previewAnnotations: ReadonlyMap<string, PreviewAnnotation>;
|
|
7
|
+
status: UseLivePreviewReturn['status'];
|
|
8
|
+
disabled: boolean;
|
|
9
|
+
spinner: string;
|
|
10
|
+
removedCount?: number;
|
|
11
|
+
showRemovedListHint?: boolean;
|
|
12
|
+
};
|
|
13
|
+
export declare function LivePreviewSummary({ enabled, previewAnnotations, status, disabled, spinner, removedCount, showRemovedListHint, }: LivePreviewSummaryProps): React.ReactElement | null;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { CDFComponentEntry } from '@contentful/experience-design-system-types';
|
|
3
|
+
import type { CdfReviewEntry } from '../hooks/useReviewSession.js';
|
|
4
|
+
import type { UseReviewEditorResult } from '../hooks/useReviewEditor.js';
|
|
5
|
+
import type { UseLivePreviewReturn } from '../useLivePreview.js';
|
|
6
|
+
import { type ReviewDetailsEditorProps } from './ReviewDetailsEditor.js';
|
|
7
|
+
type ReviewDetailsEditorConfig = Pick<ReviewDetailsEditorProps, 'componentRationale' | 'reviewMetadata' | 'reviewEditor' | 'width' | 'height' | 'sourceBorderColor' | 'jsonValue' | 'sidebarFocused' | 'fieldEditor'>;
|
|
8
|
+
export type ReviewComponentPanelProps = ReviewDetailsEditorConfig & {
|
|
9
|
+
selectedKey: string;
|
|
10
|
+
selectedEntry: CDFComponentEntry;
|
|
11
|
+
saveError: string | null;
|
|
12
|
+
sidebarFooter: React.ReactNode;
|
|
13
|
+
livePreview: Pick<UseLivePreviewReturn, 'status' | 'disabled'>;
|
|
14
|
+
livePreviewSpinner: string;
|
|
15
|
+
};
|
|
16
|
+
type ReviewFieldEditor = ReviewDetailsEditorProps['fieldEditor'];
|
|
17
|
+
export declare function buildReviewFieldEditor(reviewEditor: UseReviewEditorResult, selectedJson: string, onExit: () => void, overrides?: Partial<ReviewFieldEditor>): ReviewFieldEditor;
|
|
18
|
+
export declare function getReviewSelectionState(components: ReadonlyArray<CdfReviewEntry>, selectedIdx: number, showHiddenProps: boolean): {
|
|
19
|
+
selected: CdfReviewEntry | null;
|
|
20
|
+
selectedJson: string;
|
|
21
|
+
visibleJsonPanelValue: string;
|
|
22
|
+
};
|
|
23
|
+
export declare function ReviewEmptyComponentsWarning({ count, hidden, }: {
|
|
24
|
+
count: number;
|
|
25
|
+
hidden: boolean;
|
|
26
|
+
}): React.ReactElement | null;
|
|
27
|
+
export declare function ReviewNoSelection(): React.ReactElement;
|
|
28
|
+
export declare function ReviewFinalizeError({ message, hidden, }: {
|
|
29
|
+
message: string | null;
|
|
30
|
+
hidden: boolean;
|
|
31
|
+
}): React.ReactElement | null;
|
|
32
|
+
export declare function ReviewComponentPanel({ selectedKey, selectedEntry, componentRationale, reviewMetadata, reviewEditor, width, height, sourceBorderColor, jsonValue, sidebarFocused, fieldEditor, saveError, sidebarFooter, livePreview, livePreviewSpinner, }: ReviewComponentPanelProps): React.ReactElement;
|
|
33
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type FieldEditorProps } from '../../../analyze/select/tui/components/FieldEditor.js';
|
|
3
|
+
import { type ReviewDetailsPanelProps } from '../steps/review-details-panel.js';
|
|
4
|
+
import type { UseReviewEditorResult } from '../hooks/useReviewEditor.js';
|
|
5
|
+
type ReviewEditorPanelState = Pick<UseReviewEditorResult, 'panelOpen' | 'panelScrollOffset' | 'tokenReviewRow' | 'tokenReviewEditing' | 'tokenReviewEditCursor' | 'tokenReviewEditSelection' | 'showJson' | 'jsonScrollOffset' | 'currentTokenSuggestions'>;
|
|
6
|
+
export type ReviewDetailsEditorProps = Omit<ReviewDetailsPanelProps, 'editor' | 'panelOpen' | 'panelScrollOffset' | 'tokenSuggestions' | 'tokenReviewRow' | 'tokenReviewEditing' | 'tokenReviewEditCursor' | 'tokenReviewEditSelection' | 'showJson' | 'jsonScrollOffset'> & {
|
|
7
|
+
reviewEditor: ReviewEditorPanelState;
|
|
8
|
+
fieldEditor: Omit<FieldEditorProps, 'active' | 'height' | 'metadata' | 'width'> & {
|
|
9
|
+
key?: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export declare function ReviewDetailsEditor({ selectedKey, componentRationale, reviewMetadata, width, height, sourceBorderColor, jsonValue, sidebarFocused, reviewEditor, fieldEditor, }: ReviewDetailsEditorProps): React.ReactElement;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ComponentTypeSummary } from '@contentful/experience-design-system-types';
|
|
3
|
+
import type { UseFinalizePreviewReturn } from '../useFinalizePreview.js';
|
|
4
|
+
import type { UseReviewSurfaceStateResult } from '../hooks/useReviewSurfaceState.js';
|
|
5
|
+
import { type ReviewStatusEntry } from './ReviewStatus.js';
|
|
6
|
+
export type ReviewFinalizeDialogsProps = {
|
|
7
|
+
showFinalize: boolean;
|
|
8
|
+
showQuit: boolean;
|
|
9
|
+
components: ReadonlyArray<ReviewStatusEntry>;
|
|
10
|
+
removed?: ComponentTypeSummary[];
|
|
11
|
+
previewStatus?: 'idle' | 'running' | 'done' | 'error';
|
|
12
|
+
removedScrollOffset?: number;
|
|
13
|
+
onFinalizeConfirm: () => void;
|
|
14
|
+
onFinalizeCancel: () => void;
|
|
15
|
+
onQuitConfirm: () => void;
|
|
16
|
+
onQuitCancel: () => void;
|
|
17
|
+
};
|
|
18
|
+
export declare function ReviewFinalizeDialogs({ showFinalize, showQuit, components, removed, previewStatus, removedScrollOffset, onFinalizeConfirm, onFinalizeCancel, onQuitConfirm, onQuitCancel, }: ReviewFinalizeDialogsProps): React.ReactElement;
|
|
19
|
+
export declare function ReviewStepDialogs({ surfaceState, components, finalizePreview, onFinalize, onQuit, }: {
|
|
20
|
+
surfaceState: UseReviewSurfaceStateResult;
|
|
21
|
+
components: ReadonlyArray<ReviewStatusEntry>;
|
|
22
|
+
finalizePreview: UseFinalizePreviewReturn;
|
|
23
|
+
onFinalize: () => void;
|
|
24
|
+
onQuit: () => void;
|
|
25
|
+
}): React.ReactElement;
|
|
26
|
+
export declare function ReviewReloadDialog({ open }: {
|
|
27
|
+
open: boolean;
|
|
28
|
+
}): React.ReactElement | null;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ReviewComponentStatus } from '../../../analyze/select/types.js';
|
|
3
|
+
export type ReviewStatusCounts = {
|
|
4
|
+
accepted: number;
|
|
5
|
+
rejected: number;
|
|
6
|
+
needsReview: number;
|
|
7
|
+
};
|
|
8
|
+
export type ReviewStatusEntry = {
|
|
9
|
+
status: ReviewComponentStatus;
|
|
10
|
+
};
|
|
11
|
+
export declare function countReviewStatuses(entries: ReadonlyArray<ReviewStatusEntry>): ReviewStatusCounts;
|
|
12
|
+
export declare function ReviewStatusBar({ entries, onApproveAll, onFinalize, }: {
|
|
13
|
+
entries: ReadonlyArray<ReviewStatusEntry>;
|
|
14
|
+
onApproveAll: () => void;
|
|
15
|
+
onFinalize: () => void;
|
|
16
|
+
}): React.ReactElement;
|
|
17
|
+
export declare function ReviewLoadingState(): React.ReactElement;
|
|
18
|
+
export declare function ReviewLoadError({ message }: {
|
|
19
|
+
message: string;
|
|
20
|
+
}): React.ReactElement;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type SearchMatchSummaryProps = {
|
|
3
|
+
open: boolean;
|
|
4
|
+
query: string;
|
|
5
|
+
matches: number;
|
|
6
|
+
total: number;
|
|
7
|
+
autocompleteCandidates: string[];
|
|
8
|
+
hidden?: boolean;
|
|
9
|
+
marginTop?: number;
|
|
10
|
+
};
|
|
11
|
+
export declare function SearchMatchSummary({ open, query, matches, total, autocompleteCandidates, hidden, marginTop, }: SearchMatchSummaryProps): React.ReactElement | null;
|
|
@@ -1,20 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { CompositionMode } from '../../lib/composition-mode.js';
|
|
3
|
-
|
|
3
|
+
import type { ReviewStepProps } from './review-step-props.js';
|
|
4
|
+
export type FinalReviewHostProps = Omit<ReviewStepProps, 'extractSessionId'> & {
|
|
4
5
|
extractSessionId: string | null;
|
|
5
|
-
tokenSessionId?: string | null;
|
|
6
6
|
generatedCount: number;
|
|
7
7
|
autoAccept: boolean;
|
|
8
8
|
compositionMode?: CompositionMode;
|
|
9
|
-
onFinalize: (accepted: number, rejected: number, unresolved: number) => void;
|
|
10
|
-
onQuit: () => void;
|
|
11
|
-
livePreview?: boolean;
|
|
12
|
-
spaceId?: string;
|
|
13
|
-
environmentId?: string;
|
|
14
|
-
cmaToken?: string;
|
|
15
|
-
host?: string;
|
|
16
|
-
tokensPath?: string;
|
|
17
|
-
initialFinalizeError?: string | null;
|
|
18
|
-
allowDeletions?: boolean;
|
|
19
9
|
};
|
|
20
10
|
export declare function FinalReviewHost({ extractSessionId, tokenSessionId, generatedCount, autoAccept, compositionMode, onFinalize, onQuit, livePreview, spaceId, environmentId, cmaToken, host, tokensPath, initialFinalizeError, allowDeletions, }: FinalReviewHostProps): React.ReactElement;
|
|
@@ -5,7 +5,7 @@ export interface HistorySnapshot {
|
|
|
5
5
|
autoRejected: string[];
|
|
6
6
|
undoSnapshot: Map<string, ReviewComponentStatus> | null;
|
|
7
7
|
}
|
|
8
|
-
|
|
8
|
+
interface CdfReviewEntrySnapshot {
|
|
9
9
|
key: string;
|
|
10
10
|
entry: CDFComponentEntry;
|
|
11
11
|
status: ReviewComponentStatus;
|
|
@@ -20,3 +20,4 @@ export interface HistoryStack {
|
|
|
20
20
|
size(): number;
|
|
21
21
|
}
|
|
22
22
|
export declare function createHistoryStack(seed: HistorySnapshot, maxDepth?: number): HistoryStack;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { ImmediateInputKey } from '../../../analyze/select/tui/hooks/useImmediateInput.js';
|
|
2
|
+
import type { UseReviewEditorResult } from './useReviewEditor.js';
|
|
3
|
+
type ReviewOverlayInputState = {
|
|
4
|
+
loading: boolean;
|
|
5
|
+
loadError: string | null;
|
|
6
|
+
showFinalize: boolean;
|
|
7
|
+
dialogOpen: boolean;
|
|
8
|
+
showHelp?: boolean;
|
|
9
|
+
showReloadDialog: boolean;
|
|
10
|
+
finalizePreview: {
|
|
11
|
+
scrollBy: (delta: number) => void;
|
|
12
|
+
};
|
|
13
|
+
reloadFromSave: () => void;
|
|
14
|
+
setShowReloadDialog: (open: boolean) => void;
|
|
15
|
+
onQuit: () => void;
|
|
16
|
+
handleUndo: () => void;
|
|
17
|
+
handleRedo: () => void;
|
|
18
|
+
};
|
|
19
|
+
export declare function handleReviewOverlayInput(input: string, key: ImmediateInputKey, state: ReviewOverlayInputState): boolean;
|
|
20
|
+
type TokenReviewInputState = Pick<UseReviewEditorResult, 'panelOpen' | 'setPanelOpen' | 'tokenReviewRow' | 'setTokenReviewRow' | 'tokenReviewEditing' | 'setTokenReviewEditing' | 'tokenReviewEditCursor' | 'setTokenReviewEditCursor' | 'tokenReviewEditSelection' | 'setTokenReviewEditSelection' | 'currentTokenSuggestions' | 'handleTokenEditSave'>;
|
|
21
|
+
type RationalePanelInputState = Pick<UseReviewEditorResult, 'panelOpen' | 'setPanelOpen' | 'panelScrollOffset' | 'setPanelScrollOffset'> & {
|
|
22
|
+
propKey: string;
|
|
23
|
+
componentKey: string;
|
|
24
|
+
};
|
|
25
|
+
export type ReviewPanelShortcutState = TokenReviewInputState & RationalePanelInputState & {
|
|
26
|
+
textEntryActive: boolean;
|
|
27
|
+
showJson: boolean;
|
|
28
|
+
};
|
|
29
|
+
export declare function handleReviewPanelShortcuts(input: string, key: ImmediateInputKey, state: ReviewPanelShortcutState): boolean;
|
|
30
|
+
export type ReviewViewToggleInputState = Pick<UseReviewEditorResult, 'setShowJson' | 'setShowHiddenProps' | 'setJsonScrollOffset' | 'pendingGRef'>;
|
|
31
|
+
export declare function handleReviewViewToggleInput(input: string, state: ReviewViewToggleInputState): boolean;
|
|
32
|
+
type JsonPanelInputState = Pick<UseReviewEditorResult, 'jsonScrollOffset' | 'setJsonScrollOffset' | 'pendingGRef'> & {
|
|
33
|
+
sidebarFocused: boolean;
|
|
34
|
+
showJson: boolean;
|
|
35
|
+
jsonValue: string;
|
|
36
|
+
height: number;
|
|
37
|
+
};
|
|
38
|
+
export declare function handleJsonPanelInput(input: string, key: ImmediateInputKey, state: JsonPanelInputState): boolean;
|
|
39
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { FilterCategory } from '../step-filters.js';
|
|
2
|
+
export declare function useSidebarSearchState(): {
|
|
3
|
+
searchOpen: boolean;
|
|
4
|
+
setSearchOpen: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
5
|
+
searchQuery: string;
|
|
6
|
+
setSearchQuery: import("react").Dispatch<import("react").SetStateAction<string>>;
|
|
7
|
+
autocompleteCandidates: string[];
|
|
8
|
+
setAutocompleteCandidates: import("react").Dispatch<import("react").SetStateAction<string[]>>;
|
|
9
|
+
jumpFilterTarget: string | null;
|
|
10
|
+
setJumpFilterTarget: import("react").Dispatch<import("react").SetStateAction<string | null>>;
|
|
11
|
+
columnOneView: "flat" | "grouped";
|
|
12
|
+
setColumnOneView: import("react").Dispatch<import("react").SetStateAction<"flat" | "grouped">>;
|
|
13
|
+
activeFilters: Set<FilterCategory>;
|
|
14
|
+
setActiveFilters: import("react").Dispatch<import("react").SetStateAction<Set<FilterCategory>>>;
|
|
15
|
+
showHelp: boolean;
|
|
16
|
+
setShowHelp: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
17
|
+
};
|