@contentful/experience-design-system-cli 2.33.1-dev-build-1b6f259.0 → 2.33.1-dev-build-a73f696.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/dist/package.json +2 -1
  2. package/dist/src/analytics/env.d.ts +2 -0
  3. package/dist/src/analytics/exit.d.ts +1 -0
  4. package/dist/src/analytics/index.d.ts +9 -5
  5. package/dist/src/analytics/tracker.d.ts +1 -0
  6. package/dist/src/analyze/build-analyze-view-rows.d.ts +11 -0
  7. package/dist/src/analyze/composite-closure.d.ts +1 -2
  8. package/dist/src/analyze/issue-inheritance.d.ts +4 -0
  9. package/dist/src/analyze/select/index.d.ts +6 -0
  10. package/dist/src/analyze/select/stdout.d.ts +7 -0
  11. package/dist/src/analyze/select/tui/components/ComponentRationalePanel.d.ts +16 -0
  12. package/dist/src/analyze/select/tui/components/FieldEditor.d.ts +2 -2
  13. package/dist/src/analyze/select/tui/components/RationalePanel.d.ts +12 -0
  14. package/dist/src/analyze/select/tui/components/Sidebar.d.ts +2 -6
  15. package/dist/src/analyze/select/tui/hooks/useImmediateInput.d.ts +4 -3
  16. package/dist/src/analyze/select/tui/theme.d.ts +1 -0
  17. package/dist/src/analyze/select-agent/context-builder.d.ts +3 -3
  18. package/dist/src/analyze/select-agent/show-rationale.d.ts +26 -0
  19. package/dist/src/apply/api-client.d.ts +3 -1
  20. package/dist/src/host-utils.d.ts +1 -0
  21. package/dist/src/import/orchestrator.d.ts +1 -0
  22. package/dist/src/import/picker-dispatch.d.ts +0 -2
  23. package/dist/src/import/print-prompt.d.ts +1 -0
  24. package/dist/src/import/tui/auto-filter-error.d.ts +1 -0
  25. package/dist/src/import/tui/final-review-host.d.ts +12 -2
  26. package/dist/src/import/tui/history.d.ts +1 -2
  27. package/dist/src/import/tui/scope-gate-columns.d.ts +1 -0
  28. package/dist/src/import/tui/scope-gate-host.d.ts +1 -1
  29. package/dist/src/import/tui/steps/AtomicGenerateReviewStep.d.ts +15 -0
  30. package/dist/src/import/tui/steps/GenerateReviewStep.d.ts +14 -2
  31. package/dist/src/import/tui/steps/PreviewStep.d.ts +21 -0
  32. package/dist/src/import/tui/useFinalizePreview.d.ts +1 -9
  33. package/dist/src/import/tui/useLivePreview.d.ts +1 -2
  34. package/dist/src/index.js +5859 -5711
  35. package/dist/src/lib/agent-model-options.d.ts +1 -0
  36. package/dist/src/lib/contentful-urls.d.ts +7 -2
  37. package/dist/src/lib/error-parser.d.ts +1 -2
  38. package/dist/src/lib/terminal-capabilities.d.ts +2 -3
  39. package/dist/src/map-tokens/resolve-defaults.d.ts +2 -3
  40. package/dist/src/runs/export-helpers.d.ts +14 -0
  41. package/dist/src/runs/fingerprint.d.ts +1 -2
  42. package/dist/src/runs/push-helpers.d.ts +5 -0
  43. package/dist/src/runs/run-picker.d.ts +1 -2
  44. package/dist/src/runs/store.d.ts +5 -3
  45. package/dist/src/session/db.d.ts +19 -0
  46. package/dist/src/session/migration.d.ts +2 -0
  47. package/dist/src/session/stats.d.ts +1 -0
  48. package/dist/src/setup/command.d.ts +5 -0
  49. package/dist/src/types.d.ts +13 -1
  50. package/package.json +7 -6
  51. package/dist/src/analyze/select/tui/components/HighlightedLine.d.ts +0 -9
  52. package/dist/src/analyze/select/tui/components/RationaleLine.d.ts +0 -21
  53. package/dist/src/analyze/select/tui/components/ScrollablePanel.d.ts +0 -14
  54. package/dist/src/analyze/select/tui/components/wrap-text.d.ts +0 -1
  55. package/dist/src/analyze/select/tui/hooks/list-scroll-input.d.ts +0 -13
  56. package/dist/src/import/composition-options.d.ts +0 -17
  57. package/dist/src/import/tui/components/LivePreviewSummary.d.ts +0 -14
  58. package/dist/src/import/tui/components/ReviewComponentPanel.d.ts +0 -33
  59. package/dist/src/import/tui/components/ReviewDetailsEditor.d.ts +0 -13
  60. package/dist/src/import/tui/components/ReviewDialogs.d.ts +0 -28
  61. package/dist/src/import/tui/components/ReviewStatus.d.ts +0 -20
  62. package/dist/src/import/tui/components/SearchMatchSummary.d.ts +0 -11
  63. package/dist/src/import/tui/components/SpaceEnvironment.d.ts +0 -7
  64. package/dist/src/import/tui/components/StepHeader.d.ts +0 -8
  65. package/dist/src/import/tui/hooks/review-input.d.ts +0 -39
  66. package/dist/src/import/tui/hooks/sidebar-search-state.d.ts +0 -17
  67. package/dist/src/import/tui/hooks/useReviewEditor.d.ts +0 -49
  68. package/dist/src/import/tui/hooks/useReviewPreview.d.ts +0 -26
  69. package/dist/src/import/tui/hooks/useReviewSession.d.ts +0 -74
  70. package/dist/src/import/tui/hooks/useReviewSurfaceState.d.ts +0 -12
  71. package/dist/src/import/tui/lineage-input.d.ts +0 -18
  72. package/dist/src/import/tui/preview-confirmation-input.d.ts +0 -6
  73. package/dist/src/import/tui/review-step-props.d.ts +0 -14
  74. package/dist/src/import/tui/sidebar-help.d.ts +0 -2
  75. package/dist/src/import/tui/sidebar-input.d.ts +0 -13
  76. package/dist/src/import/tui/sidebar-navigation.d.ts +0 -18
  77. package/dist/src/import/tui/steps/review-details-panel.d.ts +0 -26
  78. package/dist/src/import/tui/steps/useTerminalColumns.d.ts +0 -1
  79. package/dist/src/lib/agent-output.d.ts +0 -5
  80. package/dist/src/lib/component-patch.d.ts +0 -12
  81. package/dist/src/lib/path-exists.d.ts +0 -1
  82. package/dist/src/print/validate/validators/read-json-file.d.ts +0 -10
  83. package/dist/src/runs/wizard-launcher.d.ts +0 -2
  84. package/dist/src/runs/wizard-seed.d.ts +0 -20
  85. package/dist/src/session/resolve-session-id.d.ts +0 -1
  86. package/dist/src/setup/prompt-helpers.d.ts +0 -1
  87. package/dist/src/tui/CommandCompletionView.d.ts +0 -13
  88. package/dist/src/tui/use-blinking-cursor.d.ts +0 -1
  89. package/dist/src/tui/use-timed-spinner.d.ts +0 -5
@@ -1,6 +1,7 @@
1
1
  import type { Command } from 'commander';
2
2
  export declare const AGENT_DESCRIPTION: string;
3
3
  export declare const MODEL_DESCRIPTION = "Model to use (defaults to a lightweight per-agent model; override with EDS_AGENT_MODEL_<AGENT>)";
4
+ export declare const BEDROCK_DESCRIPTION: string;
4
5
  export interface AgentModelOptionsConfig {
5
6
  agentDescription?: string;
6
7
  includeModel?: boolean;
@@ -6,12 +6,17 @@
6
6
  * formatter so the wizard, `apply push`, and `apply select` all emit the same
7
7
  * URL shape.
8
8
  */
9
- type PostPushView = 'components' | 'design_tokens';
9
+ export type PostPushView = 'components' | 'design_tokens';
10
10
  export interface BuildPostPushUrlInput {
11
11
  host: string;
12
12
  spaceId: string;
13
13
  environmentId: string;
14
14
  view?: PostPushView;
15
15
  }
16
+ /**
17
+ * Map a Contentful API host to the corresponding webapp host. For api.*.com
18
+ * inputs this swaps the `api.` prefix to `app.`; any other host is returned
19
+ * as-is (callers get the raw host, no guessing).
20
+ */
21
+ export declare function apiHostToAppHost(host: string): string;
16
22
  export declare function buildPostPushUrl({ host, spaceId, environmentId, view }: BuildPostPushUrlInput): string;
17
- export {};
@@ -10,7 +10,7 @@ export interface ParsedEdsiError {
10
10
  /** Validation details supplied by the API, normalized for terminal output. */
11
11
  diagnostics?: ErrorDiagnostic[];
12
12
  }
13
- interface ErrorDiagnostic {
13
+ export interface ErrorDiagnostic {
14
14
  message: string;
15
15
  component?: string;
16
16
  /**
@@ -37,4 +37,3 @@ export declare function formatEdsiError(raw: unknown, opts?: {
37
37
  raw?: string;
38
38
  }): string;
39
39
  export declare function formatApiError(error: ApiErrorLike, verbose?: boolean): string;
40
- export {};
@@ -1,9 +1,9 @@
1
- type TerminalInput = {
1
+ export type TerminalInput = {
2
2
  isTTY?: boolean;
3
3
  isRaw?: boolean;
4
4
  setRawMode?: (enabled: boolean) => unknown;
5
5
  };
6
- type TerminalOutput = {
6
+ export type TerminalOutput = {
7
7
  isTTY?: boolean;
8
8
  };
9
9
  export type InteractiveTerminalSupport = {
@@ -26,4 +26,3 @@ export type RequireInteractiveTerminalOptions = TerminalCapabilityOptions & {
26
26
  alternative?: string;
27
27
  };
28
28
  export declare function requireInteractiveTerminal(options?: RequireInteractiveTerminalOptions): void;
29
- export {};
@@ -10,8 +10,8 @@ export interface DTCGTokenLeaf {
10
10
  path: string;
11
11
  type: string;
12
12
  }
13
- type UnresolvedTokenDefaultReason = 'no_match' | 'ambiguous' | 'type_mismatch';
14
- interface UnresolvedTokenDefault {
13
+ export type UnresolvedTokenDefaultReason = 'no_match' | 'ambiguous' | 'type_mismatch';
14
+ export interface UnresolvedTokenDefault {
15
15
  rawDefault: string;
16
16
  tokenKind: string | null;
17
17
  reason: UnresolvedTokenDefaultReason;
@@ -29,4 +29,3 @@ export interface ResolveTokenDefaultsResult {
29
29
  * identifies exactly one leaf compatible with the property's token kind.
30
30
  */
31
31
  export declare function resolveTokenDefaults(defaults: readonly RawDesignTokenDefault[], leaves: readonly DTCGTokenLeaf[]): ResolveTokenDefaultsResult;
32
- export {};
@@ -1,4 +1,18 @@
1
1
  import { findCliPath } from '../lib/cli-path.js';
2
+ export type PrintResult = {
3
+ ok: true;
4
+ } | {
5
+ ok: false;
6
+ error: string;
7
+ };
8
+ export declare function printComponentsFromSession(opts: {
9
+ sessionId: string;
10
+ outPath: string;
11
+ }): Promise<PrintResult>;
12
+ export declare function printTokensFromSession(opts: {
13
+ sessionId: string;
14
+ outPath: string;
15
+ }): Promise<PrintResult>;
2
16
  /** Internal test surface. Not part of the public API. */
3
17
  export declare const __testing: {
4
18
  findCliPath: typeof findCliPath;
@@ -1,4 +1,4 @@
1
- type SourceFileEntry = {
1
+ export type SourceFileEntry = {
2
2
  mtime: string;
3
3
  componentName?: string;
4
4
  };
@@ -45,4 +45,3 @@ export declare function buildSavedFingerprint(input: {
45
45
  componentsJson: string | Buffer | null;
46
46
  tokensJson: string | Buffer | null;
47
47
  }): SavedFingerprint;
48
- export {};
@@ -1,3 +1,4 @@
1
+ import { findCliPath } from '../lib/cli-path.js';
1
2
  export type PushSessionResult = {
2
3
  ok: true;
3
4
  } | {
@@ -18,3 +19,7 @@ export type PushSessionOptions = {
18
19
  * file I/O — that is the whole point of --push-from-run.
19
20
  */
20
21
  export declare function pushRunSession(opts: PushSessionOptions): Promise<PushSessionResult>;
22
+ /** Internal test surface. Not part of the public API. */
23
+ export declare const __testing: {
24
+ findCliPath: typeof findCliPath;
25
+ };
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import type { RunRecord } from './store.js';
3
- type RunPickerAction = 'push' | 'modify' | 'new';
3
+ export type RunPickerAction = 'push' | 'modify' | 'new';
4
4
  export type RunPickerSelection = {
5
5
  /** null only when `action === 'new'`. */
6
6
  runId: string | null;
@@ -15,4 +15,3 @@ export type RunPickerProps = {
15
15
  onCancel: () => void;
16
16
  };
17
17
  export declare function RunPicker({ runs, staleRunIds, onSelect, onCancel }: RunPickerProps): React.ReactElement;
18
- export {};
@@ -1,5 +1,6 @@
1
1
  import type { CompositionMode } from '../lib/composition-mode.js';
2
2
  export declare const RUNS_FILE_VERSION: 3;
3
+ export declare const RUNS_FILE_CAP = 200;
3
4
  /** Versions this CLI can read. v1 / v2 files are auto-migrated in memory;
4
5
  * new writes always use the latest version. */
5
6
  export declare const READABLE_VERSIONS: Set<number>;
@@ -8,7 +9,7 @@ export declare const READABLE_VERSIONS: Set<number>;
8
9
  * mtime (ISO 8601) at the moment the run record was written and, when
9
10
  * known, the component name extracted from it (first-seen wins on
10
11
  * collisions). */
11
- type SourceFingerprint = {
12
+ export type SourceFingerprint = {
12
13
  files: Record<string, {
13
14
  mtime: string;
14
15
  componentName?: string;
@@ -19,7 +20,7 @@ type SourceFingerprint = {
19
20
  };
20
21
  /** SHA-256 hashes of the JSON artifacts the wizard wrote to disk. Used on
21
22
  * replay to detect manual edits to components.json / tokens.json. */
22
- type SavedFingerprint = {
23
+ export type SavedFingerprint = {
23
24
  componentsJsonHash: string | null;
24
25
  tokensJsonHash: string | null;
25
26
  };
@@ -66,6 +67,7 @@ export type RunsFile = {
66
67
  runs: RunRecord[];
67
68
  };
68
69
  export declare function runsFilePath(): string;
70
+ export declare function generateUlid(now?: number): string;
69
71
  export type AppendInput = Omit<RunRecord, 'id' | 'createdAt'> & Partial<Pick<RunRecord, 'id' | 'createdAt'>>;
70
72
  export declare function appendRun(input: AppendInput): Promise<RunRecord>;
71
73
  export type ListOptions = {
@@ -77,5 +79,5 @@ export type ListOptions = {
77
79
  export declare function listRuns(opts?: ListOptions): Promise<RunRecord[]>;
78
80
  export declare function getRun(id: string): Promise<RunRecord>;
79
81
  export declare function updateRun(id: string, patch: Partial<Omit<RunRecord, 'id'>>): Promise<RunRecord>;
82
+ export declare function findRunBySavePath(savePath: string): Promise<RunRecord | null>;
80
83
  export declare function findAllRunsBySavePath(savePath: string): Promise<RunRecord[]>;
81
- export {};
@@ -16,7 +16,26 @@ export { storeDtcgTokens as storeDTCGTokens } from './services/tokens/store-dtcg
16
16
  export { applyTokenToolCalls, type ApplyTokenToolCallsResult } from './services/tokens/apply-tool-calls.js';
17
17
  export { replaceRawTokenNamePaths } from './services/tokens/replace-raw-token-name-paths.js';
18
18
  export { replaceRawPropTokenPaths } from './services/tokens/replace-raw-prop-token-paths.js';
19
+ export type StepStatus = 'pending' | 'complete' | 'failed' | 'interrupted';
19
20
  export type CommandName = 'analyze extract' | 'analyze select' | 'generate components' | 'generate tokens' | 'generate edit' | 'apply preview' | 'apply select' | 'apply push' | 'print components' | 'print tokens' | 'map tokens' | 'fetch existing entities' | 'import';
21
+ export interface SessionRow {
22
+ id: string;
23
+ name: string | null;
24
+ created_at: string;
25
+ updated_at: string;
26
+ }
27
+ export interface StepRow {
28
+ id: number;
29
+ session_id: string;
30
+ command: string;
31
+ status: StepStatus;
32
+ started_at: string;
33
+ completed_at: string | null;
34
+ inputs: string;
35
+ outputs: string;
36
+ error: string | null;
37
+ updated_at: string;
38
+ }
20
39
  export declare function getPipelineDbPath(): string;
21
40
  export declare function openPipelineDb(dbPath?: string): DatabaseSync;
22
41
  export interface ApplyToolCallsResult {
@@ -1,2 +1,4 @@
1
1
  import { DatabaseSync } from 'node:sqlite';
2
+ export declare function getReviewsDir(): string;
3
+ export declare function getLegacyImportDbPath(): string;
2
4
  export declare function runMigrationIfNeeded(db: DatabaseSync): void;
@@ -23,4 +23,5 @@ export interface SessionStats {
23
23
  } | null;
24
24
  }
25
25
  export declare function getStats(db: DatabaseSync, dbPath: string): SessionStats;
26
+ export declare function formatBytes(bytes: number): string;
26
27
  export declare function formatStatsText(stats: SessionStats): string;
@@ -1,5 +1,10 @@
1
1
  import type { Command } from 'commander';
2
+ import type { AgentName } from '@contentful/experience-design-system-generation';
2
3
  export declare function promptCodexModel(ask?: (q: string) => Promise<string>): Promise<string | undefined>;
4
+ export declare function setupAgent(): Promise<{
5
+ agent: AgentName | undefined;
6
+ agentModel: string | undefined;
7
+ }>;
3
8
  export type SkillPromptKind = 'select' | 'generate';
4
9
  /**
5
10
  * Prompt the operator for a custom skill prompt path. Returns the resolved
@@ -1,2 +1,14 @@
1
- export type { ExtractionValidationIssue, RawPropDefinition, RawSlotDefinition, RawComponentDefinition, } from '@contentful/experience-design-system-extraction';
1
+ import type { DesignTokenType } from '@contentful/experience-design-system-types';
2
+ export type { ExtractionValidationIssueCode, ExtractionValidationIssue, RawPropDefinition, RawSlotDefinition, RawComponentDefinition, ComponentExtractionResult, ExtractorProgress, ExtractorOptions, ComponentExtractor, } from '@contentful/experience-design-system-extraction';
2
3
  export { stripScoringFields } from '@contentful/experience-design-system-extraction';
4
+ export interface RawTokenDefinition {
5
+ name: string;
6
+ value: string;
7
+ source: 'css' | 'tailwind' | 'style-dictionary';
8
+ inferredKind: DesignTokenType | string;
9
+ ambiguous: boolean;
10
+ }
11
+ export interface TokenExtractor {
12
+ name: string;
13
+ extract(projectRoot: string): Promise<RawTokenDefinition[]>;
14
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/experience-design-system-cli",
3
- "version": "2.33.1-dev-build-1b6f259.0",
3
+ "version": "2.33.1-dev-build-a73f696.0",
4
4
  "description": "Contentful Experiences design system import CLI",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -36,11 +36,12 @@
36
36
  "ink": "^5.2.1",
37
37
  "react": "^18.3.1",
38
38
  "react-devtools-core": "^4.19.1",
39
+ "react-dom": "^18.3.1",
39
40
  "svelte": "^5.56.4",
40
41
  "ts-morph": "^27.0.2",
41
42
  "typescript": "^5.9.3",
42
- "@contentful/experience-design-system-cli-v2": "2.33.1-dev-build-1b6f259.0",
43
- "@contentful/experience-design-system-types": "2.33.1-dev-build-1b6f259.0"
43
+ "@contentful/experience-design-system-cli-v2": "2.33.1-dev-build-a73f696.0",
44
+ "@contentful/experience-design-system-types": "2.33.1-dev-build-a73f696.0"
44
45
  },
45
46
  "devDependencies": {
46
47
  "@tsconfig/node24": "^24.0.4",
@@ -52,9 +53,9 @@
52
53
  "ink-testing-library": "^4.0.0",
53
54
  "typescript-eslint": "^8.67.0",
54
55
  "vitest": "^4.0.16",
55
- "@contentful/experience-design-system-client": "2.33.1-dev-build-1b6f259.0",
56
- "@contentful/experience-design-system-extraction": "2.33.1-dev-build-1b6f259.0",
57
- "@contentful/experience-design-system-generation": "2.33.1-dev-build-1b6f259.0"
56
+ "@contentful/experience-design-system-extraction": "2.33.1-dev-build-a73f696.0",
57
+ "@contentful/experience-design-system-generation": "2.33.1-dev-build-a73f696.0",
58
+ "@contentful/experience-design-system-client": "2.33.1-dev-build-a73f696.0"
58
59
  },
59
60
  "repository": {
60
61
  "type": "git",
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- export type HighlightPart = {
3
- text: string;
4
- color?: string;
5
- dim?: boolean;
6
- };
7
- export declare function HighlightedLine({ parts }: {
8
- parts: readonly HighlightPart[];
9
- }): React.ReactElement;
@@ -1,21 +0,0 @@
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;
@@ -1,14 +0,0 @@
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 +0,0 @@
1
- export declare function wrapText(text: string, innerWidth: number): string[];
@@ -1,13 +0,0 @@
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,17 +0,0 @@
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;
@@ -1,14 +0,0 @@
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 {};
@@ -1,33 +0,0 @@
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 {};
@@ -1,13 +0,0 @@
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 {};
@@ -1,28 +0,0 @@
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;
@@ -1,20 +0,0 @@
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;
@@ -1,11 +0,0 @@
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,7 +0,0 @@
1
- import React from 'react';
2
- type SpaceEnvironmentProps = {
3
- spaceId: string;
4
- environmentId: string;
5
- };
6
- export declare function SpaceEnvironment({ spaceId, environmentId }: SpaceEnvironmentProps): React.ReactElement;
7
- export {};
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- type StepHeaderProps = {
3
- stepNumber: number;
4
- totalSteps: number;
5
- title: string;
6
- };
7
- export declare function StepHeader({ stepNumber, totalSteps, title }: StepHeaderProps): React.ReactElement;
8
- export {};
@@ -1,39 +0,0 @@
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 {};
@@ -1,17 +0,0 @@
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
- };
@@ -1,49 +0,0 @@
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 {};