@contentful/experience-design-system-cli 2.34.5-dev-build-bbf13dae.0 → 2.34.5-dev-build-7ebabd5d.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/dist/src/analyze/select/tui/components/FieldEditor.d.ts +3 -1
- package/dist/src/analyze/select/tui/components/FinalizeDialog.d.ts +2 -2
- package/dist/src/analyze/select/tui/components/GroupedSidebar.d.ts +3 -0
- package/dist/src/analyze/select/tui/components/HelpOverlay.d.ts +2 -0
- package/dist/src/analyze/select/tui/components/Sidebar.d.ts +2 -1
- package/dist/src/analyze/select/tui/hooks/scroll-offset.d.ts +4 -3
- package/dist/src/analyze/select/tui/hooks/useImmediateInput.d.ts +1 -1
- package/dist/src/import/tui/WizardApp.d.ts +3 -1
- package/dist/src/import/tui/components/CompactControlBar.d.ts +6 -0
- package/dist/src/import/tui/components/ReviewStatus.d.ts +0 -5
- package/dist/src/import/tui/hooks/review-input.d.ts +1 -1
- package/dist/src/import/tui/lineage-layout.d.ts +18 -25
- package/dist/src/import/tui/scope-gate-columns.d.ts +14 -8
- package/dist/src/import/tui/steps/GateStep.d.ts +1 -1
- package/dist/src/import/tui/steps/WizardPreviewStep.d.ts +1 -0
- package/dist/src/import/tui/wizard-state-transitions.d.ts +7 -1
- package/dist/src/index.js +2520 -2575
- package/dist/src/tui/render-with-goodbye.d.ts +6 -0
- package/dist/src/tui/use-terminal-size.d.ts +6 -0
- package/dist/src/tui/windowed-panel.d.ts +37 -0
- package/package.json +6 -6
- package/dist/src/analyze/select/tui/components/LineagePanel.d.ts +0 -14
- package/dist/src/import/tui/hooks/useLineage.d.ts +0 -32
- package/dist/src/import/tui/lineage-input.d.ts +0 -18
package/dist/package.json
CHANGED
|
@@ -17,6 +17,7 @@ export type FieldEditorProps = {
|
|
|
17
17
|
value: string;
|
|
18
18
|
width: number;
|
|
19
19
|
height: number;
|
|
20
|
+
fixedHeight?: boolean;
|
|
20
21
|
active?: boolean;
|
|
21
22
|
onChange: (value: string) => void;
|
|
22
23
|
onSave: () => void;
|
|
@@ -40,6 +41,7 @@ export type FieldEditorProps = {
|
|
|
40
41
|
name: string;
|
|
41
42
|
};
|
|
42
43
|
showHiddenProps?: boolean;
|
|
44
|
+
showInlineRationales?: boolean;
|
|
43
45
|
};
|
|
44
46
|
export declare function simulateGraphWithCandidate(projectSlotGraph: ComponentSlotInfo[], selfName: string, currentSlots: {
|
|
45
47
|
name: string;
|
|
@@ -58,5 +60,5 @@ export declare function computeAllowedComponentReplacementCandidates(projectSlot
|
|
|
58
60
|
name: string;
|
|
59
61
|
allowedComponents: string[];
|
|
60
62
|
}[], targetSlotName: string, replaceIndex: number): string[];
|
|
61
|
-
export declare function FieldEditor({ value, width, height, active, onChange, onSave, onDiscard, onExit, metadata, onTogglePropRationale, propRationaleKey, onToggleComponentRationale, componentRationaleKey, onToggleSourceExternal, onTextEntryActiveChange, projectSlotGraph, currentComponentName, onDirtyChange, discardTrigger, initialFocusTarget, showHiddenProps, }: FieldEditorProps): React.ReactElement;
|
|
63
|
+
export declare function FieldEditor({ value, width, height, fixedHeight, active, onChange, onSave, onDiscard, onExit, metadata, onTogglePropRationale, propRationaleKey, onToggleComponentRationale, componentRationaleKey, onToggleSourceExternal, onTextEntryActiveChange, projectSlotGraph, currentComponentName, onDirtyChange, discardTrigger, initialFocusTarget, showHiddenProps, showInlineRationales, }: FieldEditorProps): React.ReactElement;
|
|
62
64
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { ComponentTypeSummary } from '@contentful/experience-design-system-types';
|
|
3
|
-
/** Max removed-component lines shown at once; the rest scroll with
|
|
3
|
+
/** Max removed-component lines shown at once; the rest scroll with arrow keys.
|
|
4
4
|
* Exported so the parent's scroll-offset clamping stays in sync. */
|
|
5
5
|
export declare const FINALIZE_REMOVED_WINDOW = 6;
|
|
6
6
|
type FinalizeDialogProps = {
|
|
@@ -15,7 +15,7 @@ type FinalizeDialogProps = {
|
|
|
15
15
|
/** Status of the accepted-set preview fired when the dialog opened. While
|
|
16
16
|
* 'running', the deletion section shows a spinner instead of a (stale) list. */
|
|
17
17
|
previewStatus?: 'idle' | 'running' | 'done' | 'error';
|
|
18
|
-
/** Scroll offset into the removed list (owned by the parent;
|
|
18
|
+
/** Scroll offset into the removed list (owned by the parent; arrow keys adjust it). */
|
|
19
19
|
removedScrollOffset?: number;
|
|
20
20
|
};
|
|
21
21
|
export declare function FinalizeDialog({ accepted, rejected, needsReview, onConfirm, onCancel, removed, previewStatus, removedScrollOffset, }: FinalizeDialogProps): React.ReactElement;
|
|
@@ -17,6 +17,9 @@ export interface GroupedSidebarProps {
|
|
|
17
17
|
expandedGroups: Set<string>;
|
|
18
18
|
onToggleExpanded: (rootName: string) => void;
|
|
19
19
|
width: number;
|
|
20
|
+
height?: number;
|
|
21
|
+
title?: string;
|
|
22
|
+
wrapLabels?: boolean;
|
|
20
23
|
focused: boolean;
|
|
21
24
|
renderStatusByKey?: Map<string, RenderStatus>;
|
|
22
25
|
previewAnnotationByKey?: Map<string, PreviewAnnotation>;
|
|
@@ -10,10 +10,12 @@ type HelpOverlayProps = {
|
|
|
10
10
|
mode: 'analyze' | 'validate' | 'review';
|
|
11
11
|
sections?: undefined;
|
|
12
12
|
onClose: () => void;
|
|
13
|
+
handleInput?: boolean;
|
|
13
14
|
} | {
|
|
14
15
|
mode?: undefined;
|
|
15
16
|
sections: HelpSection[];
|
|
16
17
|
onClose: () => void;
|
|
18
|
+
handleInput?: boolean;
|
|
17
19
|
};
|
|
18
20
|
export declare function HelpOverlay(props: HelpOverlayProps): React.ReactElement;
|
|
19
21
|
export {};
|
|
@@ -7,8 +7,9 @@ export type PreviewBadgeValue = {
|
|
|
7
7
|
bold?: boolean;
|
|
8
8
|
dim?: boolean;
|
|
9
9
|
};
|
|
10
|
-
export declare function PreviewBadge({ badge }: {
|
|
10
|
+
export declare function PreviewBadge({ badge, highlighted, }: {
|
|
11
11
|
badge: PreviewBadgeValue | null;
|
|
12
|
+
highlighted?: boolean;
|
|
12
13
|
}): React.ReactElement;
|
|
13
14
|
type SidebarProps = {
|
|
14
15
|
components: ReviewComponentSummary[];
|
|
@@ -8,15 +8,16 @@
|
|
|
8
8
|
* binding (caller should NOT update state in that case).
|
|
9
9
|
*
|
|
10
10
|
* Supported bindings:
|
|
11
|
-
* -
|
|
12
|
-
* -
|
|
11
|
+
* - downArrow → +1 line
|
|
12
|
+
* - upArrow → -1 line
|
|
13
13
|
* - Ctrl+d → +half-page (floor(panelHeight / 2))
|
|
14
14
|
* - Ctrl+u → -half-page
|
|
15
15
|
* - PageDown → +panelHeight
|
|
16
16
|
* - PageUp → -panelHeight
|
|
17
17
|
* - G → jump to maxOffset
|
|
18
18
|
*
|
|
19
|
-
* `
|
|
19
|
+
* `j`/`k` are intentionally not handled here because they are field-navigation
|
|
20
|
+
* keys in the editor. `g` (single-tap) and `gg` (double-tap → jump to 0) are handled separately
|
|
20
21
|
* by the caller via a pending-flag ref, since they need transient state.
|
|
21
22
|
*/
|
|
22
23
|
export type ScrollKeyState = {
|
|
@@ -16,4 +16,4 @@ export type ImmediateInputKey = {
|
|
|
16
16
|
meta: boolean;
|
|
17
17
|
};
|
|
18
18
|
export type ImmediateInputHandler = (input: string, key: ImmediateInputKey) => void;
|
|
19
|
-
export declare function useImmediateInput(handler: ImmediateInputHandler): void;
|
|
19
|
+
export declare function useImmediateInput(handler: ImmediateInputHandler, enabled?: boolean): void;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { CDFDocument, CDFComponentEntry, DTCGTokenEntry } from '@contentful/experience-design-system-types';
|
|
3
|
+
import { type AgentAuthStatus } from '@contentful/experience-design-system-generation';
|
|
3
4
|
export declare function buildGenerateComponentsArgs(opts: {
|
|
4
5
|
sessionId: string;
|
|
5
6
|
tokensPath?: string;
|
|
@@ -59,5 +60,6 @@ export type WizardAppProps = {
|
|
|
59
60
|
generatePromptPath?: string;
|
|
60
61
|
skipMapTokens?: boolean;
|
|
61
62
|
initialRawTokensPath?: string;
|
|
63
|
+
initialAgentAuth?: Promise<AgentAuthStatus>;
|
|
62
64
|
};
|
|
63
|
-
export declare function WizardApp({ initialSpaceId, initialEnvironmentId, initialCmaToken, initialHost, initialAgent, initialModel, bedrock, initialProjectPath, host, promptOverrides, noCache, livePreview, generatePromptPath, skipMapTokens, initialRawTokensPath, }?: WizardAppProps): React.ReactElement;
|
|
65
|
+
export declare function WizardApp({ initialSpaceId, initialEnvironmentId, initialCmaToken, initialHost, initialAgent, initialModel, bedrock, initialProjectPath, host, promptOverrides, noCache, livePreview, generatePromptPath, skipMapTokens, initialRawTokensPath, initialAgentAuth, }?: WizardAppProps): React.ReactElement;
|
|
@@ -9,11 +9,6 @@ export type ReviewStatusEntry = {
|
|
|
9
9
|
status: ReviewComponentStatus;
|
|
10
10
|
};
|
|
11
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
12
|
export declare function ReviewLoadingState(): React.ReactElement;
|
|
18
13
|
export declare function ReviewLoadError({ message }: {
|
|
19
14
|
message: string;
|
|
@@ -27,7 +27,7 @@ export type ReviewPanelShortcutState = TokenReviewInputState & RationalePanelInp
|
|
|
27
27
|
showJson: boolean;
|
|
28
28
|
};
|
|
29
29
|
export declare function handleReviewPanelShortcuts(input: string, key: ImmediateInputKey, state: ReviewPanelShortcutState): boolean;
|
|
30
|
-
export type ReviewViewToggleInputState = Pick<UseReviewEditorResult, 'setShowJson' | '
|
|
30
|
+
export type ReviewViewToggleInputState = Pick<UseReviewEditorResult, 'setShowJson' | 'setJsonScrollOffset' | 'pendingGRef'>;
|
|
31
31
|
export declare function handleReviewViewToggleInput(input: string, state: ReviewViewToggleInputState): boolean;
|
|
32
32
|
type JsonPanelInputState = Pick<UseReviewEditorResult, 'jsonScrollOffset' | 'setJsonScrollOffset' | 'pendingGRef'> & {
|
|
33
33
|
sidebarFocused: boolean;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
/**
|
|
2
|
-
export declare const VISIBLE_COUNT =
|
|
3
|
-
/**
|
|
4
|
-
export declare const MAX_PANEL_ROWS =
|
|
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
5
|
/** Floors — both surfaces stay usable even on a small terminal. */
|
|
6
6
|
export declare const SIDEBAR_MIN = 4;
|
|
7
7
|
export declare const MIN_PANEL_ROWS = 4;
|
|
8
8
|
/**
|
|
9
9
|
* Fallback when `stdout.rows` is unavailable (piped output, tests). No TTY
|
|
10
10
|
* means Ink is not interactively repainting, so there is no flicker risk — we
|
|
11
|
-
* assume enough height for
|
|
12
|
-
*
|
|
11
|
+
* assume enough height for a terminal-sized sidebar so the non-interactive
|
|
12
|
+
* render is complete and unclipped.
|
|
13
13
|
*/
|
|
14
14
|
export declare const FALLBACK_ROWS = 40;
|
|
15
15
|
/**
|
|
@@ -22,16 +22,13 @@ export declare const PANEL_BOX_CHROME = 6;
|
|
|
22
22
|
/**
|
|
23
23
|
* L2e — fixed vertical chrome around the sidebar in the BASE (no-panel) case,
|
|
24
24
|
* counting EVERYTHING that is not a variable sidebar entry row: the wizard
|
|
25
|
-
* header bar, the
|
|
26
|
-
*
|
|
25
|
+
* header bar, the counter strip (with its blank separator), the cycle banner,
|
|
26
|
+
* the nothing-selected /
|
|
27
27
|
* AI-exclusion hint, the GroupedSidebar box borders + scroll indicator, the
|
|
28
|
-
* focused-detail block, and the wrapping legend region.
|
|
29
|
-
*
|
|
30
|
-
* the base frame was 39 lines with a 20-row sidebar after the legend row-gap
|
|
31
|
-
* compression, i.e. ≈19 lines of chrome. We use 20 for a one-line safety
|
|
32
|
-
* margin so the total frame stays strictly within `stdout.rows`.
|
|
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.
|
|
33
30
|
*/
|
|
34
|
-
export declare const BASE_CHROME_OVERHEAD =
|
|
31
|
+
export declare const BASE_CHROME_OVERHEAD = 18;
|
|
35
32
|
export interface LineageLayoutInput {
|
|
36
33
|
/** Terminal height in rows (`stdout.rows`, or the fallback). */
|
|
37
34
|
rows: number;
|
|
@@ -43,30 +40,26 @@ export interface LineageLayoutInput {
|
|
|
43
40
|
export interface LineageLayout {
|
|
44
41
|
/** Rows the sidebar should render (`visibleCount`). Constant across open/closed. */
|
|
45
42
|
sidebarVisible: number;
|
|
46
|
-
/** Rows
|
|
43
|
+
/** Rows a sidebar replacement panel should window to (`maxRows`). */
|
|
47
44
|
panelMaxRows: number;
|
|
48
45
|
}
|
|
49
46
|
/**
|
|
50
47
|
* The sidebar height is constant (the panel replaces it in the same slot, so
|
|
51
|
-
* there is nothing to shrink).
|
|
52
|
-
*
|
|
53
|
-
* sidebar was, so opening lineage cannot grow the frame past `rows`.
|
|
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.
|
|
54
50
|
*/
|
|
55
51
|
export declare function computeLineageLayout({ rows, panelOpen, entryCount }: LineageLayoutInput): LineageLayout;
|
|
56
52
|
export interface SidebarBudget {
|
|
57
53
|
/** Rows the GroupedSidebar should render (`visibleCount`). */
|
|
58
54
|
sidebarVisibleCount: number;
|
|
59
|
-
/** Rows
|
|
55
|
+
/** Rows a sidebar replacement panel should window to (`maxRows`). */
|
|
60
56
|
panelMaxRows: number;
|
|
61
57
|
}
|
|
62
58
|
/**
|
|
63
59
|
* L2e — autoscale the BASE frame to the terminal height. Even with the lineage
|
|
64
|
-
* panel closed,
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
* from `stdout.rows` minus `BASE_CHROME_OVERHEAD` so the whole frame fits at
|
|
68
|
-
* 24/30/40 rows, and unifies the panel-open sizing with `computeLineageLayout`
|
|
69
|
-
* so BOTH cases stay within the terminal.
|
|
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.
|
|
70
63
|
*
|
|
71
64
|
* Floor: `BASE_CHROME_OVERHEAD + SIDEBAR_MIN`. Below it `SIDEBAR_MIN`
|
|
72
65
|
* (usability) intentionally wins over the fit — a terminal that small can't
|
|
@@ -4,23 +4,29 @@ export interface ScopeComponentLike {
|
|
|
4
4
|
name: string;
|
|
5
5
|
}
|
|
6
6
|
export type Decision = 'accepted' | 'rejected' | 'undecided';
|
|
7
|
+
export declare const SCOPE_GATE_MAIN_COLUMN_WIDTH = 54;
|
|
8
|
+
export declare const ACCEPTED_COMPONENTS_COLUMN_WIDTH = 36;
|
|
9
|
+
export interface ScopeGatePanelLayout {
|
|
10
|
+
height: number;
|
|
11
|
+
mainVisibleCount: number;
|
|
12
|
+
sideVisibleCount: number;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* All scope-gate panels share one terminal-sized frame. Panels with a header
|
|
16
|
+
* therefore receive the same content rows because every scope-gate panel has
|
|
17
|
+
* the same header and indicator chrome.
|
|
18
|
+
*/
|
|
19
|
+
export declare function computePanelLayout(mainVisibleCount: number): ScopeGatePanelLayout;
|
|
7
20
|
export declare function computeColumnWidths(totalWidth: number): {
|
|
8
|
-
layout: 'single' | '
|
|
21
|
+
layout: 'single' | 'two-column';
|
|
9
22
|
main: number;
|
|
10
23
|
added: number;
|
|
11
|
-
groups: number;
|
|
12
24
|
};
|
|
13
25
|
export interface AddedComponentEntry {
|
|
14
26
|
name: string;
|
|
15
27
|
isCycle: boolean;
|
|
16
28
|
}
|
|
17
|
-
export interface AddedGroupEntry {
|
|
18
|
-
name: string;
|
|
19
|
-
depCount: number;
|
|
20
|
-
isCycle: boolean;
|
|
21
|
-
}
|
|
22
29
|
export declare function buildAddedComponentsList(components: ScopeComponentLike[], stateByKey: Map<string, Decision>, cycleParticipants?: Set<string>): AddedComponentEntry[];
|
|
23
|
-
export declare function buildAddedGroupsList(closures: Map<string, Closure>, stateByKey: Map<string, Decision>, cycleParticipants?: Set<string>, cycleUnits?: Map<string, Set<string>>): AddedGroupEntry[];
|
|
24
30
|
export declare function computeCounters(components: ScopeComponentLike[], closures: Map<string, Closure>, stateByKey: Map<string, Decision>): {
|
|
25
31
|
accepted: number;
|
|
26
32
|
rejected: number;
|
|
@@ -5,6 +5,7 @@ export interface PreviewDiffLine {
|
|
|
5
5
|
color: string;
|
|
6
6
|
text: string;
|
|
7
7
|
}
|
|
8
|
+
export declare function buildPreviewSummaryLines(preview: ServerPreviewResponse): PreviewDiffLine[];
|
|
8
9
|
export declare function buildPreviewDiffLines(preview: ServerPreviewResponse): PreviewDiffLine[];
|
|
9
10
|
type WizardPreviewStepProps = {
|
|
10
11
|
preview: ServerPreviewResponse;
|
|
@@ -6,6 +6,12 @@ export declare function nextStepAfterScopeGate(opts: {
|
|
|
6
6
|
export declare function nextStepAfterCredentialsValidated(opts: {
|
|
7
7
|
acceptedCount: number;
|
|
8
8
|
}): WizardStepAfterCredentials;
|
|
9
|
+
export declare function shouldGenerateAfterScopeGate(opts: {
|
|
10
|
+
acceptedCount: number;
|
|
11
|
+
}): boolean;
|
|
12
|
+
export declare function shouldGenerateAfterCredentialsValidated(opts: {
|
|
13
|
+
acceptedCount: number;
|
|
14
|
+
}): boolean;
|
|
9
15
|
export declare function shouldSkipFinalReviewAfterCredentials(state: {
|
|
10
16
|
generateSessionId: string | null;
|
|
11
17
|
finalReviewPassed: boolean;
|
|
@@ -17,7 +23,7 @@ export declare function shouldBypassPreview(state: {
|
|
|
17
23
|
credentialsSkipped: boolean;
|
|
18
24
|
}): boolean;
|
|
19
25
|
export declare function buildSkippedPreviewTransition(): {
|
|
20
|
-
step: '
|
|
26
|
+
step: 'print-gate';
|
|
21
27
|
serverPreview: null;
|
|
22
28
|
};
|
|
23
29
|
export type CycleGateAction = 'block' | 'proceed';
|