@contentful/experience-design-system-cli 2.37.1-dev-build-91ca3bb8.0 → 2.37.1-dev-build-a7704a7f.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 (183) hide show
  1. package/dist/app.js +248 -999
  2. package/dist/index.js +319 -1217
  3. package/dist/package.json +1 -1
  4. package/dist/src/tui/settings/contentful-configuration/ContentfulConfigScreen.d.ts +0 -1
  5. package/package.json +3 -3
  6. package/dist/src/commands/forwarded.d.ts +0 -2
  7. package/dist/src/legacy/forwarded-import-args.d.ts +0 -1
  8. package/dist/src/legacy/legacy-cli-path.d.ts +0 -1
  9. package/dist/src/legacy/run-legacy.d.ts +0 -1
  10. package/dist/src/tui/help/file-locations.d.ts +0 -23
  11. package/dist/src/tui/settings/agents/AgentDetail.d.ts +0 -13
  12. package/dist/src/tui/settings/agents/AgentScreens.d.ts +0 -11
  13. package/dist/src/tui/settings/agents/AgentStatusBadge.d.ts +0 -10
  14. package/dist/src/tui/settings/agents/agent-status.d.ts +0 -80
  15. package/dist/src/tui/settings/agents/agent-store.d.ts +0 -17
  16. package/dist/src/tui/settings/agents/apply-binary-overrides.d.ts +0 -13
  17. package/dist/src/tui/settings/contentful-configuration/ProjectConfigScreen.d.ts +0 -5
  18. package/dist/src/tui/settings/shared/FieldForm.d.ts +0 -35
  19. package/legacy/bin/cli.js +0 -58
  20. package/legacy/dist/package.json +0 -76
  21. package/legacy/dist/src/analytics/exit.d.ts +0 -4
  22. package/legacy/dist/src/analytics/index.d.ts +0 -3
  23. package/legacy/dist/src/analyze/composite-closure.d.ts +0 -26
  24. package/legacy/dist/src/analyze/composition/apply-mapping.d.ts +0 -22
  25. package/legacy/dist/src/analyze/composition/candidate-files.d.ts +0 -34
  26. package/legacy/dist/src/analyze/composition/composition-cache-key.d.ts +0 -18
  27. package/legacy/dist/src/analyze/composition/interchange-schema.d.ts +0 -17
  28. package/legacy/dist/src/analyze/composition/manifest-doc-evidence.d.ts +0 -49
  29. package/legacy/dist/src/analyze/composition/merge-edges.d.ts +0 -19
  30. package/legacy/dist/src/analyze/composition/parse-map-edges.d.ts +0 -16
  31. package/legacy/dist/src/analyze/composition/prompt-loader.d.ts +0 -3
  32. package/legacy/dist/src/analyze/composition/resolve-mapping-cli.d.ts +0 -10
  33. package/legacy/dist/src/analyze/composition/resolve-mapping.d.ts +0 -59
  34. package/legacy/dist/src/analyze/cycle-detection.d.ts +0 -27
  35. package/legacy/dist/src/analyze/extract-command.d.ts +0 -7
  36. package/legacy/dist/src/analyze/fuzzy-search.d.ts +0 -3
  37. package/legacy/dist/src/analyze/issue-inheritance.d.ts +0 -8
  38. package/legacy/dist/src/analyze/lineage.d.ts +0 -29
  39. package/legacy/dist/src/analyze/search-neighborhood.d.ts +0 -3
  40. package/legacy/dist/src/analyze/select/command.d.ts +0 -27
  41. package/legacy/dist/src/analyze/select/parser.d.ts +0 -6
  42. package/legacy/dist/src/analyze/select/persistence.d.ts +0 -22
  43. package/legacy/dist/src/analyze/select/preview-annotations.d.ts +0 -26
  44. package/legacy/dist/src/analyze/select/tui/LegacySelectApp.d.ts +0 -8
  45. package/legacy/dist/src/analyze/select/tui/components/ComponentDetail.d.ts +0 -19
  46. package/legacy/dist/src/analyze/select/tui/components/ComponentRationalePanel.d.ts +0 -10
  47. package/legacy/dist/src/analyze/select/tui/components/FieldEditor.d.ts +0 -67
  48. package/legacy/dist/src/analyze/select/tui/components/FinalizeDialog.d.ts +0 -22
  49. package/legacy/dist/src/analyze/select/tui/components/GotoBanner.d.ts +0 -31
  50. package/legacy/dist/src/analyze/select/tui/components/GroupedSidebar.d.ts +0 -94
  51. package/legacy/dist/src/analyze/select/tui/components/HelpOverlay.d.ts +0 -21
  52. package/legacy/dist/src/analyze/select/tui/components/HighlightedLine.d.ts +0 -9
  53. package/legacy/dist/src/analyze/select/tui/components/JsonEditor.d.ts +0 -10
  54. package/legacy/dist/src/analyze/select/tui/components/JsonPanel.d.ts +0 -11
  55. package/legacy/dist/src/analyze/select/tui/components/PreviewSummaryBar.d.ts +0 -8
  56. package/legacy/dist/src/analyze/select/tui/components/QuitDialog.d.ts +0 -8
  57. package/legacy/dist/src/analyze/select/tui/components/RationaleLine.d.ts +0 -21
  58. package/legacy/dist/src/analyze/select/tui/components/RationalePanel.d.ts +0 -15
  59. package/legacy/dist/src/analyze/select/tui/components/ScrollablePanel.d.ts +0 -14
  60. package/legacy/dist/src/analyze/select/tui/components/Sidebar.d.ts +0 -29
  61. package/legacy/dist/src/analyze/select/tui/components/SourcePanel.d.ts +0 -11
  62. package/legacy/dist/src/analyze/select/tui/components/StatusBar.d.ts +0 -11
  63. package/legacy/dist/src/analyze/select/tui/components/TokenReviewPanel.d.ts +0 -30
  64. package/legacy/dist/src/analyze/select/tui/components/TopBar.d.ts +0 -10
  65. package/legacy/dist/src/analyze/select/tui/components/removed-components-text.d.ts +0 -7
  66. package/legacy/dist/src/analyze/select/tui/components/wrap-text.d.ts +0 -1
  67. package/legacy/dist/src/analyze/select/tui/hooks/list-scroll-input.d.ts +0 -13
  68. package/legacy/dist/src/analyze/select/tui/hooks/scroll-offset.d.ts +0 -30
  69. package/legacy/dist/src/analyze/select/tui/hooks/useImmediateInput.d.ts +0 -19
  70. package/legacy/dist/src/analyze/select/tui/hooks/useKeymap.d.ts +0 -24
  71. package/legacy/dist/src/analyze/select/tui/hooks/useSession.d.ts +0 -19
  72. package/legacy/dist/src/analyze/select/tui/hooks/useUndo.d.ts +0 -8
  73. package/legacy/dist/src/analyze/select/tui/theme.d.ts +0 -18
  74. package/legacy/dist/src/analyze/select/types.d.ts +0 -54
  75. package/legacy/dist/src/analyze/selection-cascade.d.ts +0 -3
  76. package/legacy/dist/src/analyze/slot-graph.d.ts +0 -11
  77. package/legacy/dist/src/apply/api-client.d.ts +0 -64
  78. package/legacy/dist/src/apply/command.d.ts +0 -43
  79. package/legacy/dist/src/apply/preview-utils.d.ts +0 -12
  80. package/legacy/dist/src/apply/tokens.d.ts +0 -1
  81. package/legacy/dist/src/apply/tui/ServerApplyView.d.ts +0 -34
  82. package/legacy/dist/src/apply/tui/ServerPreviewView.d.ts +0 -9
  83. package/legacy/dist/src/credentials-store.d.ts +0 -18
  84. package/legacy/dist/src/doctor/checks.d.ts +0 -5
  85. package/legacy/dist/src/doctor/command.d.ts +0 -2
  86. package/legacy/dist/src/doctor/report.d.ts +0 -7
  87. package/legacy/dist/src/generate/command.d.ts +0 -2
  88. package/legacy/dist/src/generate/tui/GenerateView.d.ts +0 -12
  89. package/legacy/dist/src/helpers/build-contentful-management-client.d.ts +0 -7
  90. package/legacy/dist/src/helpers/fetch-and-persist-existing-contentful-entities.d.ts +0 -29
  91. package/legacy/dist/src/helpers/fetch-existing-contentful-entities.d.ts +0 -11
  92. package/legacy/dist/src/helpers/find-nearly-matching-component.d.ts +0 -7
  93. package/legacy/dist/src/helpers/read-existing-contentful-entities-from-session.d.ts +0 -7
  94. package/legacy/dist/src/helpers/summarize-existing-contentful-entities.d.ts +0 -50
  95. package/legacy/dist/src/host-utils.d.ts +0 -3
  96. package/legacy/dist/src/index.d.ts +0 -1
  97. package/legacy/dist/src/index.js +0 -25166
  98. package/legacy/dist/src/lib/agent-definitions.d.ts +0 -14
  99. package/legacy/dist/src/lib/agent-model-options.d.ts +0 -15
  100. package/legacy/dist/src/lib/agent-output.d.ts +0 -5
  101. package/legacy/dist/src/lib/cli-errors.d.ts +0 -2
  102. package/legacy/dist/src/lib/cli-path.d.ts +0 -4
  103. package/legacy/dist/src/lib/command-options.d.ts +0 -3
  104. package/legacy/dist/src/lib/component-patch.d.ts +0 -12
  105. package/legacy/dist/src/lib/contentful-urls.d.ts +0 -15
  106. package/legacy/dist/src/lib/debug-logger.d.ts +0 -39
  107. package/legacy/dist/src/lib/debug-preamble.d.ts +0 -7
  108. package/legacy/dist/src/lib/error-parser.d.ts +0 -40
  109. package/legacy/dist/src/lib/path-exists.d.ts +0 -1
  110. package/legacy/dist/src/lib/prompt-overrides.d.ts +0 -38
  111. package/legacy/dist/src/lib/terminal-capabilities.d.ts +0 -29
  112. package/legacy/dist/src/lib/user-agent.d.ts +0 -7
  113. package/legacy/dist/src/map-tokens/apply.d.ts +0 -12
  114. package/legacy/dist/src/map-tokens/command.d.ts +0 -2
  115. package/legacy/dist/src/map-tokens/resolve-defaults.d.ts +0 -32
  116. package/legacy/dist/src/map-tokens/tui/MapTokensView.d.ts +0 -13
  117. package/legacy/dist/src/output/format.d.ts +0 -23
  118. package/legacy/dist/src/print/command.d.ts +0 -11
  119. package/legacy/dist/src/print/validate/tui/ValidateView.d.ts +0 -15
  120. package/legacy/dist/src/print/validate/validators/cdf-validator.d.ts +0 -2
  121. package/legacy/dist/src/print/validate/validators/dtcg-validator.d.ts +0 -2
  122. package/legacy/dist/src/print/validate/validators/format-errors.d.ts +0 -12
  123. package/legacy/dist/src/print/validate/validators/read-json-file.d.ts +0 -10
  124. package/legacy/dist/src/program.d.ts +0 -25
  125. package/legacy/dist/src/runs/fingerprint.d.ts +0 -36
  126. package/legacy/dist/src/runs/save-path-resolver.d.ts +0 -11
  127. package/legacy/dist/src/runs/store.d.ts +0 -65
  128. package/legacy/dist/src/session/cache-keys.d.ts +0 -22
  129. package/legacy/dist/src/session/core/cdf/cdf-mappers.d.ts +0 -3
  130. package/legacy/dist/src/session/core/components/derive-component-id.d.ts +0 -1
  131. package/legacy/dist/src/session/core/components/hash-component-shape.d.ts +0 -5
  132. package/legacy/dist/src/session/core/shared/index-rows-by-key.d.ts +0 -1
  133. package/legacy/dist/src/session/core/tokens/build-dtcg-groups.d.ts +0 -12
  134. package/legacy/dist/src/session/core/tokens/build-dtcg-tokens.d.ts +0 -3
  135. package/legacy/dist/src/session/core/tokens/hash-token-content.d.ts +0 -1
  136. package/legacy/dist/src/session/db.d.ts +0 -200
  137. package/legacy/dist/src/session/migration.d.ts +0 -2
  138. package/legacy/dist/src/session/repositories/sessions/read.d.ts +0 -11
  139. package/legacy/dist/src/session/repositories/sessions/write.d.ts +0 -3
  140. package/legacy/dist/src/session/repositories/shared/with-transaction.d.ts +0 -2
  141. package/legacy/dist/src/session/repositories/steps/read.d.ts +0 -2
  142. package/legacy/dist/src/session/repositories/steps/write.d.ts +0 -5
  143. package/legacy/dist/src/session/repositories/tokens/read.d.ts +0 -15
  144. package/legacy/dist/src/session/repositories/tokens/write.d.ts +0 -16
  145. package/legacy/dist/src/session/resolve-session-id.d.ts +0 -1
  146. package/legacy/dist/src/session/services/session-resolver.d.ts +0 -9
  147. package/legacy/dist/src/session/services/tokens/apply-tool-calls.d.ts +0 -8
  148. package/legacy/dist/src/session/services/tokens/replace-raw-prop-token-paths.d.ts +0 -3
  149. package/legacy/dist/src/session/services/tokens/replace-raw-token-name-paths.d.ts +0 -3
  150. package/legacy/dist/src/session/services/tokens/store-dtcg-tokens.d.ts +0 -3
  151. package/legacy/dist/src/session/session-id.d.ts +0 -1
  152. package/legacy/dist/src/session/source-excerpt.d.ts +0 -26
  153. package/legacy/dist/src/setup/SetupScreen.d.ts +0 -28
  154. package/legacy/dist/src/setup/SetupStepper.d.ts +0 -7
  155. package/legacy/dist/src/setup/command.d.ts +0 -3
  156. package/legacy/dist/src/setup/lib/checks.d.ts +0 -57
  157. package/legacy/dist/src/setup/lib/shell.d.ts +0 -12
  158. package/legacy/dist/src/setup/steps/CodingAgentScreen.d.ts +0 -20
  159. package/legacy/dist/src/setup/steps/ContentfulCredentialsScreen.d.ts +0 -11
  160. package/legacy/dist/src/setup/steps/StepLayout.d.ts +0 -20
  161. package/legacy/dist/src/setup/steps/preferences/AnalyticsScreen.d.ts +0 -5
  162. package/legacy/dist/src/setup/steps/preferences/BooleanInput.d.ts +0 -21
  163. package/legacy/dist/src/setup/steps/preferences/ColorPreferenceScreen.d.ts +0 -5
  164. package/legacy/dist/src/setup/steps/preferences/CustomPromptScreen.d.ts +0 -14
  165. package/legacy/dist/src/setup/steps/preferences/DebugLogsScreen.d.ts +0 -5
  166. package/legacy/dist/src/setup/steps/preferences/PreferencesMenu.d.ts +0 -26
  167. package/legacy/dist/src/setup/steps/prerequisites/PrerequisitesScreen.d.ts +0 -16
  168. package/legacy/dist/src/setup/steps/prerequisites/build.d.ts +0 -2
  169. package/legacy/dist/src/setup/steps/prerequisites/deps.d.ts +0 -33
  170. package/legacy/dist/src/setup/steps/prerequisites/index.d.ts +0 -4
  171. package/legacy/dist/src/setup/steps/prerequisites/node.d.ts +0 -2
  172. package/legacy/dist/src/setup/steps/prerequisites/pnpm.d.ts +0 -2
  173. package/legacy/dist/src/tui/CommandCompletionView.d.ts +0 -13
  174. package/legacy/dist/src/tui/render-with-goodbye.d.ts +0 -7
  175. package/legacy/dist/src/tui/use-terminal-size.d.ts +0 -6
  176. package/legacy/dist/src/tui/windowed-panel.d.ts +0 -37
  177. package/legacy/dist/src/types.d.ts +0 -2
  178. package/legacy/package.json +0 -85
  179. package/legacy/prompts/composition-edges.md +0 -11
  180. package/legacy/skills/generate-components.md +0 -612
  181. package/legacy/skills/generate-tokens.md +0 -194
  182. package/legacy/skills/map-tokens.md +0 -102
  183. package/legacy/skills/select-components.md +0 -235
@@ -1,59 +0,0 @@
1
- import type { RawComponentDefinition } from '../../types.js';
2
- import type { CompositionEdge } from './interchange-schema.js';
3
- import { type EdgeConflict } from './merge-edges.js';
4
- export type ResolveMappingResult = {
5
- components: RawComponentDefinition[];
6
- edges: CompositionEdge[];
7
- conflicts: EdgeConflict[];
8
- warnings: string[];
9
- };
10
- /**
11
- * Orchestrate composition-edge acquisition and enrichment.
12
- *
13
- * Sources by rank: typed-slot / "code slots" (2) > structural usage evidence
14
- * (3) > manifest (4) > doc (5) > adapter-resolved / extraEdges (6) >
15
- * edge-emitting agent (7). Manifest/doc edges are computed deterministically outside
16
- * this function (see manifest-doc-evidence.ts) and joined via `extraEdges`.
17
- * ALL sources — including the code slots already on the incoming components —
18
- * are fed into one ranked merge and unioned; non-conflicting edges from every
19
- * source survive, and on a conflict (same parent+child, different slot) the
20
- * higher-rank source wins and the loser is recorded. The edge-emitting agent runs only when
21
- * `forceAgent` is set OR there is residue a higher-rank source
22
- * didn't cover (routing/cost optimization) — `forceAgent` bypasses that
23
- * suppression but never changes rank.
24
- *
25
- * `runAgentFn` is injected (returns the agent's raw stdout) so this is
26
- * testable without spawning a subprocess.
27
- */
28
- export declare function resolveMapping(input: {
29
- components: RawComponentDefinition[];
30
- forceAgent?: boolean;
31
- files: Array<{
32
- path: string;
33
- content: string;
34
- }>;
35
- runAgentFn: (opts: {
36
- prompt: string;
37
- files: Array<{
38
- path: string;
39
- content: string;
40
- }>;
41
- }) => Promise<string>;
42
- buildPrompt?: (files: Array<{
43
- path: string;
44
- content: string;
45
- }>, componentNames: string[]) => string;
46
- /**
47
- * Custom instruction preamble (from `--prompt composition=...`). Replaces the
48
- * default guidance line ONLY; the machine-readable output contract + the
49
- * component-name allowlist + candidate files are always appended so the
50
- * JSONL parser keeps working regardless of the override.
51
- */
52
- promptOverride?: string;
53
- /**
54
- * Pre-resolved edges from an external source (e.g. manifest or documentation)
55
- * path). They join the ranked merge at their own provenance rank alongside
56
- * code slots and other automatic mapping sources.
57
- */
58
- extraEdges?: CompositionEdge[];
59
- }): Promise<ResolveMappingResult>;
@@ -1,27 +0,0 @@
1
- /** A directed edge in the slot-dependency graph. */
2
- export interface SlotEdge {
3
- fromComponent: string;
4
- slotName: string;
5
- toComponent: string;
6
- }
7
- /** A single elementary cycle, with `path[0] === path[path.length - 1]`. */
8
- export interface SlotCycle {
9
- path: string[];
10
- edges: SlotEdge[];
11
- }
12
- /** Input shape mirroring the slot definition on CDFComponentEntry. */
13
- export interface ComponentSlotInfo {
14
- name: string;
15
- slots: Array<{
16
- name: string;
17
- allowedComponents?: string[];
18
- }>;
19
- }
20
- export declare function findSlotCycles(components: ComponentSlotInfo[]): SlotCycle[];
21
- export declare function suggestCycleBreakEdge(cycle: SlotCycle, allCycles: SlotCycle[]): SlotEdge;
22
- export declare function formatCyclePath(cycle: SlotCycle, maxHops?: number): string;
23
- export interface CyclePathSegment {
24
- kind: 'component' | 'slot' | 'arrow';
25
- text: string;
26
- }
27
- export declare function formatCyclePathSegments(cycle: SlotCycle, maxHops?: number): CyclePathSegment[];
@@ -1,7 +0,0 @@
1
- import type { Command } from 'commander';
2
- export declare function resolveExtractNoCache(opts: {
3
- cache?: boolean;
4
- noCache?: boolean;
5
- }): boolean;
6
- export declare function collectSourceFiles(directory: string, onProgress?: (scannedCount: number) => void): Promise<string[]>;
7
- export declare function registerInternalExtractCommand(program: Command): void;
@@ -1,3 +0,0 @@
1
- export declare function fuzzyMatches(query: string, text: string): boolean;
2
- export declare function fuzzyScore(query: string, text: string): number | null;
3
- export declare function fuzzyFilter(query: string, candidates: string[]): string[];
@@ -1,8 +0,0 @@
1
- import type { Closure, NodeStatus } from './composite-closure.js';
2
- export interface RenderStatus {
3
- status: NodeStatus;
4
- isOwn: boolean;
5
- sourceComponents: string[];
6
- }
7
- export declare function computeRenderStatuses(closure: Closure, directIssues: Map<string, NodeStatus>): Map<string, RenderStatus>;
8
- export declare function pickDrillTarget(ancestor: string, closure: Closure, directIssues: Map<string, NodeStatus>): string | null;
@@ -1,29 +0,0 @@
1
- import type { ComponentGraphNode } from './composite-closure.js';
2
- export interface LineageParentEdge {
3
- parent: string;
4
- slotName: string;
5
- }
6
- export interface LineageEdge {
7
- from: string;
8
- slotName: string;
9
- to: string;
10
- }
11
- export type LineageChain = LineageEdge[];
12
- export declare function findDirectParents(target: string, components: ComponentGraphNode[]): LineageParentEdge[];
13
- export declare function findAllAncestors(target: string, components: ComponentGraphNode[]): Set<string>;
14
- export declare function findAllAncestorChains(target: string, components: ComponentGraphNode[]): LineageChain[];
15
- export interface AncestorTreeNode {
16
- name: string;
17
- incomingSlotName?: string;
18
- depth: number;
19
- shared: boolean;
20
- cycle: boolean;
21
- parents: AncestorTreeNode[];
22
- }
23
- export declare function buildAncestorTree(target: string, components: ComponentGraphNode[]): AncestorTreeNode;
24
- export interface AncestorTreeLine {
25
- text: string;
26
- jumpTarget?: string;
27
- depth: number;
28
- }
29
- export declare function renderAncestorTree(node: AncestorTreeNode): AncestorTreeLine[];
@@ -1,3 +0,0 @@
1
- import type { ComponentGraphNode } from './composite-closure.js';
2
- export declare function computeDirectNeighborhood(matches: Iterable<string>, graph: ComponentGraphNode[]): Set<string>;
3
- export declare function findAllAncestors(target: string, graph: ComponentGraphNode[]): Set<string>;
@@ -1,27 +0,0 @@
1
- import type { ReviewSessionSnapshot } from './types.js';
2
- import type { PreviewValidationError } from '../../apply/api-client.js';
3
- /**
4
- * Load components from the pipeline DB and re-run extraction validation.
5
- *
6
- * `validationIssues` is intentionally not persisted (the validator is pure
7
- * and cheap to re-run), so any cold-start of the review state needs to
8
- * recompute it before building the review snapshot.
9
- */
10
- export declare function loadAndValidateForReview(sessionId: string, projectRoot: string | undefined): Promise<ReviewSessionSnapshot>;
11
- /**
12
- * Synthesize SERVER_VALIDATION_FAILED issues onto the review state file's
13
- * matching components for the wizard's 422 recovery path.
14
- */
15
- export declare function patchReviewStateWithValidationErrors(sessionId: string, errors: PreviewValidationError[], opts?: {
16
- artifactsRoot?: string;
17
- }): Promise<{
18
- patchedNames: string[];
19
- missingNames: string[];
20
- }>;
21
- /**
22
- * Exclude components whose names appear in `names` from the next preview/push.
23
- * Used by the wizard's "skip and retry" path after a 422.
24
- */
25
- export declare function rejectComponentsByName(sessionId: string, names: string[], opts?: {
26
- artifactsRoot?: string;
27
- }): Promise<void>;
@@ -1,6 +0,0 @@
1
- import type { RawComponentDefinition } from '../../types.js';
2
- import type { ReviewSessionSnapshot } from './types.js';
3
- export type LoadReviewInputOptions = {
4
- reviewRoot?: string;
5
- };
6
- export declare function loadReviewInput(components: RawComponentDefinition[], options?: LoadReviewInputOptions): Promise<ReviewSessionSnapshot>;
@@ -1,22 +0,0 @@
1
- import type { DatabaseSync } from 'node:sqlite';
2
- import type { ReviewSessionPaths, ReviewSessionSnapshot } from './types.js';
3
- export declare function getRefineArtifactsRoot(): string;
4
- export declare function getRefineSessionPaths(sessionId: string, artifactsRoot: string): Promise<ReviewSessionPaths>;
5
- export declare function saveReviewState(statePath: string, session: ReviewSessionSnapshot): Promise<void>;
6
- export declare function appendReviewEvent(eventsPath: string, event: {
7
- type: string;
8
- payload: Record<string, unknown>;
9
- }): Promise<void>;
10
- export declare function ensureRefineSession(sessionId: string, artifactsRoot: string, initialSnapshot: ReviewSessionSnapshot): Promise<ReviewSessionSnapshot>;
11
- /**
12
- * Persist scope-gate decisions to `current-review-state.json` so downstream
13
- * consumers (notably `loadAcceptedNames` in `generate components`) can filter
14
- * out rejected components. The wizard's scope-gate doesn't drive the rich
15
- * `analyze select` TUI, so fields that file consumes (resolvedSourcePath,
16
- * sourceCode) are populated with safe placeholders. Only `name` and `status`
17
- * matter for `loadAcceptedNames`.
18
- */
19
- export declare function writeScopeDecisionsSnapshot(db: DatabaseSync, sessionId: string, decisions: {
20
- accepted: string[];
21
- rejected: string[];
22
- }): Promise<void>;
@@ -1,26 +0,0 @@
1
- import type { ServerPreviewResponse } from '@contentful/experience-design-system-types';
2
- import type { PreviewAnnotation } from './types.js';
3
- /**
4
- * Pure mapper from a `ServerPreviewResponse` to a per-component-name
5
- * `PreviewAnnotation` map. Consumed by the wizard's final-review sidebar
6
- * (and any other surface that wants to render diff badges next to a
7
- * component row).
8
- *
9
- * The `new` bucket of `ServerPreviewResponse.components` is `CDFComponentEntry[]`
10
- * — those entries do NOT carry a `name` field on the wire (the name is the
11
- * KEY in the parent CDF document). So instead of trying to read names off
12
- * entries, we derive the "new" set as:
13
- *
14
- * new = localNames \ (unchangedNames ∪ changedNames ∪ removedNames)
15
- *
16
- * Callers must pass the local CDF document's component keys as `localNames`
17
- * so we can perform the set difference. Removed components from the server
18
- * that aren't in the local document are still annotated as `'removed'` (so
19
- * the detail panel can list them).
20
- *
21
- * Precedence: `breaking` > `changed` > `removed` > `new`.
22
- *
23
- * Unchanged entries are omitted from the map — callers should treat
24
- * `map.get(name) === undefined` as "no annotation".
25
- */
26
- export declare function applyPreviewAnnotations(preview: ServerPreviewResponse, localNames: readonly string[]): Map<string, PreviewAnnotation>;
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- type AppProps = {
3
- sessionId: string;
4
- artifactsRoot: string;
5
- reviewRoot?: string;
6
- };
7
- export declare function App({ sessionId, artifactsRoot, reviewRoot }: AppProps): React.ReactElement;
8
- export {};
@@ -1,19 +0,0 @@
1
- import React from 'react';
2
- import type { PreviewAnnotation, ReviewComponentDetail } from '../../types.js';
3
- type ComponentDetailProps = {
4
- component: ReviewComponentDetail;
5
- sourceCode: string | null;
6
- draftValue: string;
7
- editMode: boolean;
8
- sourceVisible: boolean;
9
- jsonScrollOffset: number;
10
- sourceScrollX: number;
11
- sourceScrollY: number;
12
- terminalWidth: number;
13
- previewAnnotation?: PreviewAnnotation;
14
- onSaveDraft: (value: string) => void;
15
- onDiscardDraft: () => void;
16
- onScrollChange: (offset: number) => void;
17
- };
18
- export declare function ComponentDetail({ component, sourceCode, draftValue, editMode, sourceVisible, jsonScrollOffset, sourceScrollX, sourceScrollY, terminalWidth, previewAnnotation, onSaveDraft, onDiscardDraft, }: ComponentDetailProps): React.ReactElement;
19
- export {};
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- import type { ComponentRationale } from '../../../../session/db.js';
3
- export type ComponentRationalePanelProps = {
4
- data: ComponentRationale;
5
- scrollOffset: number;
6
- width: number;
7
- height: number;
8
- active: boolean;
9
- };
10
- export declare function ComponentRationalePanel({ data, scrollOffset, width, height, active, }: ComponentRationalePanelProps): React.ReactElement;
@@ -1,67 +0,0 @@
1
- import React from 'react';
2
- import { findSlotCycles, type ComponentSlotInfo } from '../../../cycle-detection.js';
3
- type PropMetadata = {
4
- rationale?: string | null;
5
- sourceStartLine?: number | null;
6
- sourceEndLine?: number | null;
7
- };
8
- export type FieldEditorMetadata = {
9
- /** Absolute path to the component's source file. Null/undefined = unknown. */
10
- sourcePath?: string | null;
11
- /** Full source text of the component (used by the source-view panel). */
12
- componentSource?: string | null;
13
- /** Per-prop metadata keyed by prop name. */
14
- props?: Record<string, PropMetadata>;
15
- };
16
- export type FieldEditorProps = {
17
- value: string;
18
- width: number;
19
- height: number;
20
- fixedHeight?: boolean;
21
- active?: boolean;
22
- onChange: (value: string) => void;
23
- onSave: () => void;
24
- onDiscard: () => void;
25
- onExit?: () => void;
26
- metadata?: FieldEditorMetadata;
27
- onTogglePropRationale?: () => void;
28
- propRationaleKey?: string;
29
- onToggleComponentRationale?: () => void;
30
- componentRationaleKey?: string;
31
- onToggleSourceExternal?: () => void;
32
- onTextEntryActiveChange?: (active: boolean) => void;
33
- projectSlotGraph?: ComponentSlotInfo[];
34
- currentComponentName?: string;
35
- onDirtyChange?: (isDirty: boolean) => void;
36
- discardTrigger?: number;
37
- initialFocusTarget?: {
38
- kind: 'description';
39
- } | {
40
- kind: 'prop' | 'slot';
41
- name: string;
42
- };
43
- showHiddenProps?: boolean;
44
- showInlineRationales?: boolean;
45
- /** Pinned inside the box above the rows, in row and field-edit modes. Counts as `headerHeight` rows. */
46
- header?: React.ReactNode;
47
- headerHeight?: number;
48
- };
49
- export declare function simulateGraphWithCandidate(projectSlotGraph: ComponentSlotInfo[], selfName: string, currentSlots: {
50
- name: string;
51
- allowedComponents: string[];
52
- }[], targetSlotName: string, candidate: string): ComponentSlotInfo[];
53
- export declare function introducesNewCycle(before: ReturnType<typeof findSlotCycles>, next: ReturnType<typeof findSlotCycles>): boolean;
54
- export declare function computeAllowedComponentCandidates(projectSlotGraph: ComponentSlotInfo[], selfName: string, currentSlots: {
55
- name: string;
56
- allowedComponents: string[];
57
- }[], targetSlotName: string): string[];
58
- export declare function simulateGraphWithReplacement(projectSlotGraph: ComponentSlotInfo[], selfName: string, currentSlots: {
59
- name: string;
60
- allowedComponents: string[];
61
- }[], targetSlotName: string, replaceIndex: number, candidate: string): ComponentSlotInfo[];
62
- export declare function computeAllowedComponentReplacementCandidates(projectSlotGraph: ComponentSlotInfo[], selfName: string, currentSlots: {
63
- name: string;
64
- allowedComponents: string[];
65
- }[], targetSlotName: string, replaceIndex: number): string[];
66
- 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, header, headerHeight, }: FieldEditorProps): React.ReactElement;
67
- export {};
@@ -1,22 +0,0 @@
1
- import React from 'react';
2
- import type { ComponentTypeSummary } from '@contentful/experience-design-system-types';
3
- /** Max removed-component lines shown at once; the rest scroll with arrow keys.
4
- * Exported so the parent's scroll-offset clamping stays in sync. */
5
- export declare const FINALIZE_REMOVED_WINDOW = 6;
6
- type FinalizeDialogProps = {
7
- accepted: number;
8
- rejected: number;
9
- needsReview: number;
10
- onConfirm: () => void;
11
- onCancel: () => void;
12
- /** Components that will be DELETED from the target space on push, from a
13
- * preview scoped to the accepted set. */
14
- removed?: ComponentTypeSummary[];
15
- /** Status of the accepted-set preview fired when the dialog opened. While
16
- * 'running', the deletion section shows a spinner instead of a (stale) list. */
17
- previewStatus?: 'idle' | 'running' | 'done' | 'error';
18
- /** Scroll offset into the removed list (owned by the parent; arrow keys adjust it). */
19
- removedScrollOffset?: number;
20
- };
21
- export declare function FinalizeDialog({ accepted, rejected, needsReview, onConfirm, onCancel, removed, previewStatus, removedScrollOffset, }: FinalizeDialogProps): React.ReactElement;
22
- export {};
@@ -1,31 +0,0 @@
1
- import React from 'react';
2
- export interface GotoRow {
3
- label: string;
4
- jumpTarget: string;
5
- kind?: string;
6
- }
7
- export interface GotoBannerProps {
8
- title: string;
9
- rows: GotoRow[];
10
- /** Index used to highlight + window. Indexes `rows` directly by default. */
11
- cursor: number;
12
- /**
13
- * Override the row index the cursor sits on, when `cursor` indexes a subset
14
- * (e.g. a jumpable projection) rather than `rows`. Windowing and the default
15
- * highlight center on this instead of `cursor` when provided.
16
- */
17
- cursorRowIndex?: number;
18
- /** Max rows rendered at once. Larger lists window around the cursor. */
19
- maxRows?: number;
20
- /** Constrain the box to a fixed column width (e.g. the sidebar slot). */
21
- width?: number;
22
- /** Footer keybinding hint. Rendered dim below the list when given. */
23
- footerHint?: string;
24
- /**
25
- * Escape hatch for feature-specific row rendering. Receives the row, its
26
- * index into `rows`, and whether the cursor is on it. Falls back to a
27
- * generic pointer row.
28
- */
29
- renderRow?: (row: GotoRow, index: number, isCursor: boolean) => React.ReactElement;
30
- }
31
- export declare function GotoBanner({ title, rows, cursor, cursorRowIndex, maxRows, width, footerHint, renderRow, }: GotoBannerProps): React.ReactElement;
@@ -1,94 +0,0 @@
1
- import React from 'react';
2
- import type { CDFComponentEntry } from '@contentful/experience-design-system-types';
3
- import { type ComponentGraphNode, type NodeStatus } from '../../../composite-closure.js';
4
- import type { RenderStatus } from '../../../issue-inheritance.js';
5
- import type { PreviewAnnotation } from '../../types.js';
6
- export interface GroupedSidebarItem {
7
- key: string;
8
- entry: CDFComponentEntry;
9
- status: NodeStatus;
10
- }
11
- export interface GroupedSidebarProps {
12
- items: GroupedSidebarItem[];
13
- cycleParticipants?: Set<string>;
14
- selectedIdx: number;
15
- selectedRowIdx?: number;
16
- onSelect: (idx: number) => void;
17
- expandedGroups: Set<string>;
18
- onToggleExpanded: (rootName: string) => void;
19
- width: number;
20
- height?: number;
21
- title?: string;
22
- wrapLabels?: boolean;
23
- focused: boolean;
24
- renderStatusByKey?: Map<string, RenderStatus>;
25
- previewAnnotationByKey?: Map<string, PreviewAnnotation>;
26
- scrollOffset?: number;
27
- visibleCount?: number;
28
- alwaysExpanded?: boolean;
29
- showFlatTier?: boolean;
30
- selectionStateByKey?: Map<string, 'accepted' | 'rejected' | 'undecided'>;
31
- aiFlaggedByKey?: Map<string, boolean>;
32
- dimPredicate?: (componentKey: string) => boolean;
33
- viewMode?: 'grouped' | 'flat';
34
- visibleRows?: VisibleRow[];
35
- graph: ComponentGraphNode[];
36
- filterVisibleKeys?: Set<string>;
37
- }
38
- type RowKind = 'cycle' | 'empty' | 'group-root' | 'group-child' | 'standalone' | 'flat' | 'flat-header';
39
- export interface VisibleRow {
40
- kind: RowKind;
41
- key: string;
42
- label: string;
43
- indent: number;
44
- aggregateGlyph?: string | null;
45
- sharedSuffix?: boolean;
46
- cycleChild?: boolean;
47
- itemIdx: number;
48
- rootName?: string;
49
- }
50
- export declare function buildVisibleRows(props: {
51
- items: GroupedSidebarItem[];
52
- cycleParticipants: Set<string>;
53
- expandedGroups: Set<string>;
54
- alwaysExpanded?: boolean;
55
- showFlatTier?: boolean;
56
- viewMode?: 'grouped' | 'flat';
57
- graph: ComponentGraphNode[];
58
- filterVisibleKeys?: Set<string>;
59
- }): VisibleRow[];
60
- export declare function visibleItemOrder(props: {
61
- items: GroupedSidebarItem[];
62
- cycleParticipants: Set<string>;
63
- expandedGroups: Set<string>;
64
- alwaysExpanded?: boolean;
65
- showFlatTier?: boolean;
66
- graph: ComponentGraphNode[];
67
- }): number[];
68
- export declare function labelStyleFor(input: {
69
- row: VisibleRow;
70
- isCursor: boolean;
71
- wouldDim: boolean;
72
- }): {
73
- color: string | undefined;
74
- bold: boolean;
75
- dim: boolean;
76
- };
77
- export declare function selectionGlyphStyleFor(selState: 'accepted' | 'rejected' | 'undecided' | undefined, isCycleRow: boolean): {
78
- glyph: string | null;
79
- color: string | undefined;
80
- dim: boolean;
81
- bold: boolean;
82
- };
83
- export declare function inheritanceGlyphStyleFor(input: {
84
- status: RenderStatus['status'] | undefined;
85
- isOwn: boolean;
86
- isCursor: boolean;
87
- }): {
88
- glyph: string | null;
89
- color: string | undefined;
90
- dim: boolean;
91
- bold: boolean;
92
- };
93
- export declare function GroupedSidebar(props: GroupedSidebarProps): React.ReactElement;
94
- export {};
@@ -1,21 +0,0 @@
1
- import React from 'react';
2
- export type HelpSection = {
3
- title: string;
4
- entries: {
5
- keys: string;
6
- label: string;
7
- }[];
8
- };
9
- type HelpOverlayProps = {
10
- mode: 'analyze' | 'validate' | 'review';
11
- sections?: undefined;
12
- onClose: () => void;
13
- handleInput?: boolean;
14
- } | {
15
- mode?: undefined;
16
- sections: HelpSection[];
17
- onClose: () => void;
18
- handleInput?: boolean;
19
- };
20
- export declare function HelpOverlay(props: HelpOverlayProps): React.ReactElement;
21
- export {};
@@ -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,10 +0,0 @@
1
- import React from 'react';
2
- type JsonEditorProps = {
3
- value: string;
4
- width: number;
5
- height: number;
6
- onSave: (value: string) => void;
7
- onDiscard: () => void;
8
- };
9
- export declare function JsonEditor({ value, width, height, onSave, onDiscard }: JsonEditorProps): React.ReactElement;
10
- export {};
@@ -1,11 +0,0 @@
1
- import React from 'react';
2
- type JsonPanelProps = {
3
- label: string;
4
- value: string;
5
- scrollOffset: number;
6
- width: number;
7
- height: number;
8
- active: boolean;
9
- };
10
- export declare function JsonPanel({ label, value, scrollOffset, width, height, active }: JsonPanelProps): React.ReactElement;
11
- export {};
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- import type { ServerPreviewResponse } from '@contentful/experience-design-system-types';
3
- type PreviewSummaryBarProps = {
4
- preview: ServerPreviewResponse | null;
5
- loading: boolean;
6
- };
7
- export declare function PreviewSummaryBar({ preview, loading }: PreviewSummaryBarProps): React.ReactElement;
8
- export {};
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- type QuitDialogProps = {
3
- hasUnsavedDrafts: boolean;
4
- onConfirm: () => void;
5
- onCancel: () => void;
6
- };
7
- export declare function QuitDialog({ hasUnsavedDrafts, onConfirm, onCancel }: QuitDialogProps): React.ReactElement;
8
- export {};
@@ -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,15 +0,0 @@
1
- import React from 'react';
2
- export type RationaleRow = {
3
- name: string;
4
- kind: 'prop' | 'slot';
5
- rationale: string;
6
- };
7
- export type RationalePanelProps = {
8
- componentName: string;
9
- rows: RationaleRow[];
10
- scrollOffset: number;
11
- width: number;
12
- height: number;
13
- active: boolean;
14
- };
15
- export declare function RationalePanel({ componentName, rows, scrollOffset, width, height, active, }: RationalePanelProps): React.ReactElement;
@@ -1,14 +0,0 @@
1
- import React from 'react';
2
- type ScrollablePanelProps = {
3
- title: string;
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({ title, width, height, active, totalLines, visibleStart, visibleEnd, borderColor, children, }: ScrollablePanelProps): React.ReactElement;
14
- export {};
@@ -1,29 +0,0 @@
1
- import React from 'react';
2
- import type { PreviewAnnotation, ReviewComponentSummary, ReviewComponentStatus } from '../../types.js';
3
- export declare function previewBadge(annotation: PreviewAnnotation | undefined): PreviewBadgeValue | null;
4
- export type PreviewBadgeValue = {
5
- char: string;
6
- color: string;
7
- bold?: boolean;
8
- dim?: boolean;
9
- };
10
- export declare function PreviewBadge({ badge, highlighted, }: {
11
- badge: PreviewBadgeValue | null;
12
- highlighted?: boolean;
13
- }): React.ReactElement;
14
- type SidebarProps = {
15
- components: ReviewComponentSummary[];
16
- selectedId: string | null;
17
- focused: boolean;
18
- scrollOffset: number;
19
- visibleCount: number;
20
- onSelect: (id: string) => void;
21
- onScrollChange: (offset: number) => void;
22
- collapsed?: boolean;
23
- width?: number;
24
- };
25
- export declare function statusIcon(status: ReviewComponentStatus, validationErrorCount: number, _validationWarningCount: number): string;
26
- export declare function statusColor(status: ReviewComponentStatus, validationErrorCount: number, validationWarningCount: number): string;
27
- export declare function sortComponentsForSidebar(components: ReviewComponentSummary[]): ReviewComponentSummary[];
28
- export declare function Sidebar({ components, selectedId, focused, scrollOffset, visibleCount, collapsed, width: widthProp, }: SidebarProps): React.ReactElement;
29
- export {};