@contentful/experience-design-system-cli 2.38.0 → 2.38.1-dev-build-6d903339.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 (189) hide show
  1. package/dist/app.d.ts +3 -6
  2. package/dist/app.js +28155 -642
  3. package/dist/index.js +32060 -421
  4. package/dist/package.json +8 -3
  5. package/dist/src/commands/import-options.d.ts +12 -0
  6. package/dist/src/commands/import.d.ts +2 -1
  7. package/dist/src/tui/home/home.theme.d.ts +1 -2
  8. package/dist/src/tui/import/resolve-user-path.d.ts +1 -0
  9. package/dist/src/tui/import/shared/error-step/controls.d.ts +7 -0
  10. package/{legacy/dist/src/import/tui/steps/ErrorStep.d.ts → dist/src/tui/import/shared/error-step/error-step.d.ts} +2 -2
  11. package/dist/src/tui/import/shared/error-step/logic.d.ts +15 -0
  12. package/dist/src/tui/import/shared/gate-step/controls.d.ts +8 -0
  13. package/dist/src/tui/import/shared/gate-step/gate-step.d.ts +14 -0
  14. package/dist/src/tui/import/shared/gate-step/logic.d.ts +11 -0
  15. package/dist/src/tui/import/shared/index.d.ts +3 -0
  16. package/dist/src/tui/import/shared/running-step/logic.d.ts +12 -0
  17. package/dist/src/tui/import/shared/running-step/running-step.d.ts +11 -0
  18. package/dist/src/tui/import/shared/running-step/theme.d.ts +3 -0
  19. package/dist/src/tui/import/shared/running-step/use-elapsed.d.ts +1 -0
  20. package/dist/src/tui/import/steps/03-path-validation/controls.d.ts +13 -0
  21. package/dist/src/tui/import/steps/03-path-validation/helpers/scan-files.d.ts +10 -0
  22. package/dist/src/tui/import/steps/03-path-validation/logic.d.ts +43 -0
  23. package/dist/src/tui/import/steps/03-path-validation/screen.d.ts +12 -0
  24. package/dist/src/tui/import/steps/04-credentials/controls.d.ts +21 -0
  25. package/dist/src/tui/import/steps/04-credentials/logic.d.ts +15 -0
  26. package/dist/src/tui/import/steps/04-credentials/screen.d.ts +17 -0
  27. package/dist/src/tui/import/steps/04-credentials/validate.d.ts +8 -0
  28. package/dist/src/tui/import/steps/05-token-reuse/logic.d.ts +21 -0
  29. package/dist/src/tui/import/steps/05-token-reuse/screen.d.ts +10 -0
  30. package/dist/src/tui/import/steps/06-extraction/find-skill-path.d.ts +1 -0
  31. package/dist/src/tui/import/steps/06-extraction/logic.d.ts +48 -0
  32. package/dist/src/tui/import/steps/06-extraction/run.d.ts +26 -0
  33. package/dist/src/tui/import/steps/06-extraction/screen.d.ts +10 -0
  34. package/dist/src/tui/import/steps/06-extraction/selection.d.ts +18 -0
  35. package/dist/src/tui/import/steps/06-extraction/types.d.ts +46 -0
  36. package/dist/src/tui/import/steps/06-extraction/use-extraction.d.ts +14 -0
  37. package/dist/src/tui/import/steps/07-scope-gate/cache-check.d.ts +17 -0
  38. package/{legacy/dist/src/import/tui/scope-gate-columns.d.ts → dist/src/tui/import/steps/07-scope-gate/columns.d.ts} +22 -2
  39. package/dist/src/tui/import/steps/07-scope-gate/graph/composite-closure.d.ts +26 -0
  40. package/dist/src/tui/import/steps/07-scope-gate/graph/cycle-detection.d.ts +27 -0
  41. package/dist/src/tui/import/steps/07-scope-gate/graph/fuzzy-search.d.ts +3 -0
  42. package/dist/src/tui/import/steps/07-scope-gate/graph/index.d.ts +33 -0
  43. package/dist/src/tui/import/steps/07-scope-gate/graph/lineage.d.ts +29 -0
  44. package/dist/src/tui/import/steps/07-scope-gate/graph/search-neighborhood.d.ts +3 -0
  45. package/dist/src/tui/import/steps/07-scope-gate/graph/slot-graph.d.ts +11 -0
  46. package/dist/src/tui/import/steps/07-scope-gate/keymap.d.ts +84 -0
  47. package/dist/src/tui/import/steps/07-scope-gate/load.d.ts +8 -0
  48. package/dist/src/tui/import/steps/07-scope-gate/panels/added-column.d.ts +15 -0
  49. package/dist/src/tui/import/steps/07-scope-gate/panels/cycles-panel.d.ts +8 -0
  50. package/dist/src/tui/import/steps/07-scope-gate/panels/reject-prompt.d.ts +5 -0
  51. package/dist/src/tui/import/steps/07-scope-gate/screen.d.ts +9 -0
  52. package/dist/src/tui/import/steps/07-scope-gate/sidebar/components/GotoBanner.d.ts +32 -0
  53. package/dist/src/tui/import/steps/07-scope-gate/sidebar/components/GroupedSidebar.d.ts +93 -0
  54. package/dist/src/tui/import/steps/07-scope-gate/sidebar/components/HelpOverlay.d.ts +21 -0
  55. package/dist/src/tui/import/steps/07-scope-gate/sidebar/components/badge.d.ts +13 -0
  56. package/dist/src/tui/import/steps/07-scope-gate/sidebar/components/windowed-panel.d.ts +31 -0
  57. package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/07-scope-gate/sidebar}/group-collapse.d.ts +1 -1
  58. package/dist/src/tui/import/steps/07-scope-gate/sidebar/hooks/use-terminal-size.d.ts +6 -0
  59. package/dist/src/tui/import/steps/07-scope-gate/sidebar/hooks/useImmediateInput.d.ts +19 -0
  60. package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/07-scope-gate/sidebar}/sidebar-help.d.ts +1 -1
  61. package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/07-scope-gate/sidebar}/sidebar-navigation.d.ts +2 -2
  62. package/dist/src/tui/import/steps/07-scope-gate/sidebar/theme.d.ts +8 -0
  63. package/dist/src/tui/import/steps/07-scope-gate/sidebar/types.d.ts +7 -0
  64. package/dist/src/tui/import/steps/07-scope-gate/state.d.ts +19 -0
  65. package/dist/src/tui/import/steps/07-scope-gate/types.d.ts +24 -0
  66. package/dist/src/tui/import/steps/07-scope-gate/use-scope-gate-flow.d.ts +27 -0
  67. package/dist/src/tui/import/steps/07-scope-gate/use-scope-gate.d.ts +76 -0
  68. package/dist/src/tui/import/steps/08-generation/logic.d.ts +27 -0
  69. package/dist/src/tui/import/steps/08-generation/map-tokens.d.ts +14 -0
  70. package/dist/src/tui/import/steps/08-generation/run.d.ts +22 -0
  71. package/dist/src/tui/import/steps/08-generation/save-decisions.d.ts +8 -0
  72. package/dist/src/tui/import/steps/08-generation/screen.d.ts +12 -0
  73. package/dist/src/tui/import/steps/08-generation/types.d.ts +47 -0
  74. package/dist/src/tui/import/steps/08-generation/use-generation.d.ts +14 -0
  75. package/dist/src/tui/import/steps/09-review/components/ComponentRationalePanel.d.ts +10 -0
  76. package/dist/src/tui/import/steps/09-review/components/FieldEditor.d.ts +67 -0
  77. package/dist/src/tui/import/steps/09-review/components/FinalizeDialog.d.ts +22 -0
  78. package/dist/src/tui/import/steps/09-review/components/HighlightedLine.d.ts +9 -0
  79. package/dist/src/tui/import/steps/09-review/components/JsonPanel.d.ts +11 -0
  80. package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/09-review}/components/LivePreviewSummary.d.ts +2 -2
  81. package/dist/src/tui/import/steps/09-review/components/QuitDialog.d.ts +8 -0
  82. package/dist/src/tui/import/steps/09-review/components/RationaleLine.d.ts +21 -0
  83. package/dist/src/tui/import/steps/09-review/components/RationalePanel.d.ts +15 -0
  84. package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/09-review}/components/ReviewComponentPanel.d.ts +3 -3
  85. package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/09-review}/components/ReviewDetailsEditor.d.ts +3 -3
  86. package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/09-review}/components/ReviewDialogs.d.ts +2 -2
  87. package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/09-review}/components/ReviewStatus.d.ts +1 -1
  88. package/dist/src/tui/import/steps/09-review/components/ScrollablePanel.d.ts +14 -0
  89. package/dist/src/tui/import/steps/09-review/components/TokenReviewPanel.d.ts +30 -0
  90. package/dist/src/tui/import/steps/09-review/components/removed-components-text.d.ts +7 -0
  91. package/dist/src/tui/import/steps/09-review/components/wrap-text.d.ts +1 -0
  92. package/{legacy/dist/src/import/tui/steps/GenerateReviewStep.d.ts → dist/src/tui/import/steps/09-review/generate-review-step.d.ts} +1 -1
  93. package/{legacy/dist/src/import → dist/src/tui/import/steps/09-review/graph}/cycle-auto-reject.d.ts +1 -1
  94. package/{legacy/dist/src/analyze → dist/src/tui/import/steps/09-review/graph}/cycle-view.d.ts +2 -2
  95. package/dist/src/tui/import/steps/09-review/graph/issue-inheritance.d.ts +8 -0
  96. package/dist/src/tui/import/steps/09-review/graph/selection-cascade.d.ts +3 -0
  97. package/{legacy/dist/src/import/tui/steps → dist/src/tui/import/steps/09-review/helpers}/enumerate-cycle-breaks.d.ts +1 -1
  98. package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/09-review}/history.d.ts +1 -1
  99. package/dist/src/tui/import/steps/09-review/preview-annotations.d.ts +26 -0
  100. package/{legacy/dist/src/import/tui/steps → dist/src/tui/import/steps/09-review}/review-details-panel.d.ts +2 -2
  101. package/{legacy/dist/src/import/tui/hooks → dist/src/tui/import/steps/09-review}/review-input.d.ts +2 -2
  102. package/{legacy/dist/src/import/tui/runLivePreview.d.ts → dist/src/tui/import/steps/09-review/run-live-preview.d.ts} +2 -3
  103. package/dist/src/tui/import/steps/09-review/scroll-offset.d.ts +30 -0
  104. package/dist/src/tui/import/steps/09-review/session.d.ts +26 -0
  105. package/dist/src/tui/import/steps/09-review/theme.d.ts +9 -0
  106. package/dist/src/tui/import/steps/09-review/token-suggestions.d.ts +8 -0
  107. package/dist/src/tui/import/steps/09-review/types.d.ts +19 -0
  108. package/{legacy/dist/src/import/tui/hooks/useReviewEditor.d.ts → dist/src/tui/import/steps/09-review/use-review-editor.d.ts} +1 -3
  109. package/{legacy/dist/src/import/tui/hooks/useReviewPreview.d.ts → dist/src/tui/import/steps/09-review/use-review-preview.d.ts} +2 -2
  110. package/{legacy/dist/src/import/tui/hooks/useReviewSession.d.ts → dist/src/tui/import/steps/09-review/use-review-session.d.ts} +5 -35
  111. package/dist/src/tui/import/steps/10-flow/flow/build-flow-start.d.ts +21 -0
  112. package/dist/src/tui/import/steps/10-flow/flow/controller.d.ts +65 -0
  113. package/dist/src/tui/import/steps/10-flow/flow/preview.d.ts +56 -0
  114. package/dist/src/tui/import/steps/10-flow/flow/push.d.ts +43 -0
  115. package/dist/src/tui/import/steps/10-flow/flow/save.d.ts +50 -0
  116. package/dist/src/tui/import/steps/10-flow/flow/screen.d.ts +17 -0
  117. package/dist/src/tui/import/steps/10-flow/flow/types.d.ts +71 -0
  118. package/dist/src/tui/import/steps/10-flow/flow/use-flow.d.ts +9 -0
  119. package/{legacy/dist/src/import/tui/steps → dist/src/tui/import/steps/10-flow/screens}/PushingStep.d.ts +1 -1
  120. package/{legacy/dist/src/import/tui/steps → dist/src/tui/import/steps/10-flow/screens}/WizardPreviewStep.d.ts +0 -1
  121. package/dist/src/tui/import/steps/10-flow/support/contentful-urls.d.ts +15 -0
  122. package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/10-flow/support}/wizard-state-transitions.d.ts +0 -13
  123. package/dist/src/tui/import/steps/10-flow/theme.d.ts +13 -0
  124. package/dist/src/tui/import/steps/index.d.ts +4 -0
  125. package/dist/src/tui/import/steps/preview-validation-error/logic.d.ts +12 -0
  126. package/dist/src/tui/import/steps/preview-validation-error/screen.d.ts +11 -0
  127. package/dist/src/tui/user-agent.d.ts +5 -0
  128. package/legacy/dist/package.json +4 -1
  129. package/legacy/dist/src/analyze/select/tui/components/ScrollablePanel.d.ts +2 -2
  130. package/legacy/dist/src/analyze/select/tui/theme.d.ts +1 -1
  131. package/legacy/dist/src/index.js +15073 -23076
  132. package/legacy/package.json +8 -3
  133. package/package.json +8 -3
  134. package/skills/generate-components.md +612 -0
  135. package/skills/generate-tokens.md +194 -0
  136. package/skills/map-tokens.md +102 -0
  137. package/skills/select-components.md +235 -0
  138. package/dist/src/tui/import/spawn-v1-import.d.ts +0 -29
  139. package/dist/src/tui/import/terminal-input.d.ts +0 -2
  140. package/legacy/dist/src/import/agent-model-resolve.d.ts +0 -27
  141. package/legacy/dist/src/import/command.d.ts +0 -2
  142. package/legacy/dist/src/import/composition-options.d.ts +0 -7
  143. package/legacy/dist/src/import/tui/WizardApp.d.ts +0 -67
  144. package/legacy/dist/src/import/tui/run-selection-agent.d.ts +0 -9
  145. package/legacy/dist/src/import/tui/runScopeGate.d.ts +0 -12
  146. package/legacy/dist/src/import/tui/spawn-generate.d.ts +0 -33
  147. package/legacy/dist/src/import/tui/steps/CredentialsStep.d.ts +0 -43
  148. package/legacy/dist/src/import/tui/steps/GateStep.d.ts +0 -15
  149. package/legacy/dist/src/import/tui/steps/PathValidationStep.d.ts +0 -10
  150. package/legacy/dist/src/import/tui/steps/PreviewValidationErrorStep.d.ts +0 -11
  151. package/legacy/dist/src/import/tui/steps/RunningStep.d.ts +0 -32
  152. package/legacy/dist/src/import/tui/steps/ScopeGateStep.d.ts +0 -48
  153. package/legacy/dist/src/import/tui/steps/TokenInputStep.d.ts +0 -8
  154. package/legacy/dist/src/import/tui/steps/WelcomeStep.d.ts +0 -7
  155. package/legacy/dist/src/import/tui/wizard-422-helpers.d.ts +0 -48
  156. package/legacy/dist/src/import/tui/wizard-generate-progress.d.ts +0 -21
  157. /package/{legacy/dist/src/analyze → dist/src/tui/import/steps/07-scope-gate/graph}/scope-gate-cascade.d.ts +0 -0
  158. /package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/07-scope-gate/sidebar}/ai-flag.d.ts +0 -0
  159. /package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/07-scope-gate/sidebar}/autocomplete.d.ts +0 -0
  160. /package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/07-scope-gate/sidebar}/components/CompactControlBar.d.ts +0 -0
  161. /package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/07-scope-gate/sidebar}/components/CounterStrip.d.ts +0 -0
  162. /package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/07-scope-gate/sidebar}/components/LegendEntry.d.ts +0 -0
  163. /package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/07-scope-gate/sidebar}/components/SearchMatchSummary.d.ts +0 -0
  164. /package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/07-scope-gate/sidebar}/hooks/sidebar-search-state.d.ts +0 -0
  165. /package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/07-scope-gate/sidebar}/hooks/useOverlayPanel.d.ts +0 -0
  166. /package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/07-scope-gate/sidebar}/lineage-layout.d.ts +0 -0
  167. /package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/07-scope-gate/sidebar}/sidebar-input.d.ts +0 -0
  168. /package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/07-scope-gate/sidebar}/step-filters.d.ts +0 -0
  169. /package/{legacy/dist/src/import/tui/steps → dist/src/tui/import/steps/09-review/helpers}/auto-reject-decision.d.ts +0 -0
  170. /package/{legacy/dist/src/import/tui/steps → dist/src/tui/import/steps/09-review/helpers}/breaking-change-format.d.ts +0 -0
  171. /package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/09-review/helpers}/cycle-panel-scroll.d.ts +0 -0
  172. /package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/09-review/helpers}/sidebar-width.d.ts +0 -0
  173. /package/{legacy/dist/src/import/tui/steps → dist/src/tui/import/steps/09-review}/review-json-panel.d.ts +0 -0
  174. /package/{legacy/dist/src/import/tui/useFinalizePreview.d.ts → dist/src/tui/import/steps/09-review/use-finalize-preview.d.ts} +0 -0
  175. /package/{legacy/dist/src/import/tui/useLivePreview.d.ts → dist/src/tui/import/steps/09-review/use-live-preview.d.ts} +0 -0
  176. /package/{legacy/dist/src/import/tui/hooks/useReviewSurfaceState.d.ts → dist/src/tui/import/steps/09-review/use-review-surface-state.d.ts} +0 -0
  177. /package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/10-flow/components}/CustomPromptBanner.d.ts +0 -0
  178. /package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/10-flow}/components/SpaceEnvironment.d.ts +0 -0
  179. /package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/10-flow}/components/StepHeader.d.ts +0 -0
  180. /package/{legacy/dist/src/import/tui/steps → dist/src/tui/import/steps/10-flow/screens}/DoneStep.d.ts +0 -0
  181. /package/{legacy/dist/src/runs/path-prompt.d.ts → dist/src/tui/import/steps/10-flow/screens/PathPrompt.d.ts} +0 -0
  182. /package/{legacy/dist/src/import → dist/src/tui/import/steps/10-flow/support}/path-utils.d.ts +0 -0
  183. /package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/10-flow/support}/preview-confirmation-input.d.ts +0 -0
  184. /package/{legacy/dist/src/import/tui/steps → dist/src/tui/import/steps/10-flow/support}/preview-diff.d.ts +0 -0
  185. /package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/10-flow/support}/push-progress.d.ts +0 -0
  186. /package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/10-flow/support}/run-print-files-helpers.d.ts +0 -0
  187. /package/{legacy/dist/src/import/tui → dist/src/tui/import/steps/10-flow/support}/run-teaser.d.ts +0 -0
  188. /package/{legacy/dist/src/tui → dist/src/tui/import/steps/10-flow/support}/use-blinking-cursor.d.ts +0 -0
  189. /package/{legacy/dist/src/tui → dist/src/tui/import/steps/10-flow/support}/use-timed-spinner.d.ts +0 -0
@@ -0,0 +1,76 @@
1
+ import type { ScopeComponent, ScopeDecisions } from './types.js';
2
+ interface UseScopeGateOptions {
3
+ components: ScopeComponent[];
4
+ onConfirm: (decisions: ScopeDecisions) => void;
5
+ onQuit: () => void;
6
+ }
7
+ type FocusedColumn = 'main' | 'added-components';
8
+ export interface PendingRejectCascade {
9
+ target: string;
10
+ ancestors: string[];
11
+ descendants: string[];
12
+ }
13
+ export declare function useScopeGate({ components, onConfirm, onQuit }: UseScopeGateOptions): {
14
+ totalWidth: number;
15
+ columnPlan: {
16
+ layout: "single" | "two-column";
17
+ main: number;
18
+ added: number;
19
+ };
20
+ panelLayout: import("./columns.js").ScopeGatePanelLayout;
21
+ visibleCount: number;
22
+ panelMaxRows: number;
23
+ groupedItems: import("./graph/index.js").SidebarItem[];
24
+ graph: import("./graph/index.js").ScopeGraph;
25
+ hasGroupRoots: boolean;
26
+ expandedGroups: Set<string>;
27
+ toggleExpanded: (rootName: string) => void;
28
+ visibleRows: import("./sidebar/components/GroupedSidebar.js").VisibleRow[];
29
+ safeCursor: number;
30
+ scrollOffset: number;
31
+ selectionStateByKey: Map<string, "accepted" | "rejected" | "undecided">;
32
+ aiFlaggedByKey: Map<string, boolean>;
33
+ dimPredicate: ((componentKey: string) => boolean) | undefined;
34
+ columnOneView: "flat" | "grouped";
35
+ focusedColumn: FocusedColumn;
36
+ showHelp: boolean;
37
+ closeHelp: () => void;
38
+ cyclesPanelOpen: boolean;
39
+ cyclesCursor: number;
40
+ slotCycles: import("./graph/cycle-detection.js").SlotCycle[];
41
+ aiRationalePanelOpen: boolean;
42
+ aiCursor: number;
43
+ aiRows: {
44
+ label: string;
45
+ jumpTarget: string;
46
+ }[];
47
+ aiExcludedCount: number;
48
+ pendingRejectCascade: PendingRejectCascade | null;
49
+ addedComponents: import("./columns.js").AddedComponentEntry[];
50
+ safeAddedComponentsCursor: number;
51
+ counters: {
52
+ accepted: number;
53
+ rejected: number;
54
+ undecided: number;
55
+ groups: number;
56
+ total: number;
57
+ };
58
+ search: {
59
+ searchOpen: boolean;
60
+ setSearchOpen: import("react").Dispatch<import("react").SetStateAction<boolean>>;
61
+ searchQuery: string;
62
+ setSearchQuery: import("react").Dispatch<import("react").SetStateAction<string>>;
63
+ autocompleteCandidates: string[];
64
+ setAutocompleteCandidates: import("react").Dispatch<import("react").SetStateAction<string[]>>;
65
+ jumpFilterTarget: string | null;
66
+ setJumpFilterTarget: import("react").Dispatch<import("react").SetStateAction<string | null>>;
67
+ columnOneView: "flat" | "grouped";
68
+ setColumnOneView: import("react").Dispatch<import("react").SetStateAction<"flat" | "grouped">>;
69
+ activeFilters: Set<import("./sidebar/step-filters.js").FilterCategory>;
70
+ setActiveFilters: import("react").Dispatch<import("react").SetStateAction<Set<import("./sidebar/step-filters.js").FilterCategory>>>;
71
+ showHelp: boolean;
72
+ setShowHelp: import("react").Dispatch<import("react").SetStateAction<boolean>>;
73
+ };
74
+ searchMatches: string[];
75
+ };
76
+ export {};
@@ -0,0 +1,27 @@
1
+ import type { GenerationProgress } from './types.js';
2
+ export declare function initialProgress(): GenerationProgress;
3
+ /** Token mapping runs only when there is something to map and tokens to map it from. */
4
+ export declare function shouldRunMapTokens(counts: {
5
+ mappablePropCount: number;
6
+ rawTokenCount: number;
7
+ }): boolean;
8
+ /** "5 components accepted." or, with some left out, "5 components accepted, 2 excluded due to validation errors." */
9
+ export declare function formatAcceptanceSummary(counts: {
10
+ accepted: number;
11
+ autoRejected: number;
12
+ }): string;
13
+ /** The screen's description: what was accepted, what is happening to it, and whether the tokens are used. */
14
+ export declare function describeGeneration(input: {
15
+ acceptedCount: number;
16
+ agent: string;
17
+ hasTokens: boolean;
18
+ }): string;
19
+ /** The rows the generating screen shows for this progress. */
20
+ export declare function progressRows(progress: GenerationProgress, agent: string): Array<{
21
+ text: string;
22
+ complete: boolean;
23
+ progress?: {
24
+ done: number;
25
+ total: number;
26
+ };
27
+ }>;
@@ -0,0 +1,14 @@
1
+ import type { GenerationInput } from './types.js';
2
+ export interface MapTokensPlan {
3
+ /** False when there is nothing to map, in which case the command is not run. */
4
+ eligible: boolean;
5
+ mappablePropCount: number;
6
+ rawTokenCount: number;
7
+ }
8
+ /**
9
+ * Prepares the generated session for token mapping and says whether it is worth running. The map tokens command works
10
+ * on one session, so the token universe is copied into the generated one: from the token session when extraction made
11
+ * one, or restored from the saved tokens.json when an existing catalog was reused (there is no token session then).
12
+ * Then it counts the design props that are tokens and the raw tokens. Reads and writes the pipeline database.
13
+ */
14
+ export declare function prepareMapTokens(input: Pick<GenerationInput, 'tokenSessionId' | 'tokensPath'>, generatedSessionId: string): Promise<MapTokensPlan>;
@@ -0,0 +1,22 @@
1
+ import { checkAgentAuth, runGenerateComponentsSession, runMapTokens } from '@contentful/experience-design-system-backend-pipeline';
2
+ import { prepareMapTokens } from './map-tokens.js';
3
+ import { saveDecisions } from './save-decisions.js';
4
+ import type { GenerationInput, GenerationProgress, GenerationResult } from './types.js';
5
+ export interface GenerationDeps {
6
+ checkAgentAuth: typeof checkAgentAuth;
7
+ saveDecisions: typeof saveDecisions;
8
+ runGenerate: typeof runGenerateComponentsSession;
9
+ runMapTokens: typeof runMapTokens;
10
+ prepareMapTokens: typeof prepareMapTokens;
11
+ }
12
+ /**
13
+ * The whole stage, in the order the wizard ran it:
14
+ * 1. Wait for the cache check that ran while the scope gate was open, then save the decisions. Both write to the
15
+ * pipeline database and the cache has to be restored first. With nothing accepted the stage ends here.
16
+ * 2. Generate the accepted components in-process. The orchestrator handles per-component cache lookup, so the names
17
+ * from the cache check are forwarded as `precomputedCachedNames` to skip a redundant lookup.
18
+ * 3. Map tokens onto the generated session. Skipped when there is nothing to map.
19
+ * A failed token mapping after a successful generation is an error to show. It neither retries nor throws away what was
20
+ * generated.
21
+ */
22
+ export declare function runGeneration(input: GenerationInput, onProgress: (progress: GenerationProgress) => void, deps?: GenerationDeps): Promise<GenerationResult>;
@@ -0,0 +1,8 @@
1
+ import type { GenerationInput } from './types.js';
2
+ /**
3
+ * Applies the scope decisions to the session and writes the review snapshot that `generate components` reads to leave
4
+ * out rejected components. Without the snapshot the generator would process rejected components anyway.
5
+ * Uses `applyScopeDecisions` and `writeScopeDecisionsSnapshot` from backend-pipeline, which are identical to legacy's.
6
+ * Both write to the pipeline database, so this runs only after the cache check has finished restoring into it.
7
+ */
8
+ export declare function saveDecisions(input: Pick<GenerationInput, 'sessionId' | 'decisions'>): Promise<void>;
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import type { GenerationProgress } from './types.js';
3
+ interface GenerationScreenProps {
4
+ progress: GenerationProgress;
5
+ agent: string;
6
+ acceptedCount: number;
7
+ hasTokens: boolean;
8
+ stepNumber: number;
9
+ totalSteps: number;
10
+ }
11
+ export declare function GenerationScreen({ progress, agent, acceptedCount, hasTokens, stepNumber, totalSteps, }: GenerationScreenProps): React.ReactElement;
12
+ export {};
@@ -0,0 +1,47 @@
1
+ import type { GenerationHandoff } from '@contentful/experience-design-system-types/handoff';
2
+ export interface GenerationInput {
3
+ /** The extraction session the scope was decided on. */
4
+ sessionId: string;
5
+ decisions: {
6
+ accepted: string[];
7
+ rejected: string[];
8
+ };
9
+ /**
10
+ * The cache check that ran while the scope gate was open, which restores cached definitions into the pipeline
11
+ * database. The stage waits for it before saving the decisions, since both write to that database.
12
+ */
13
+ cachedNames: Promise<string[]>;
14
+ tokensPath: string;
15
+ /** The token session extraction recorded, or null when an existing tokens.json was reused. */
16
+ tokenSessionId: string | null;
17
+ existingEntitiesPath: string | null;
18
+ agent: string;
19
+ agentModel?: string;
20
+ promptOverrides: string[];
21
+ /** A custom prompt for `generate components`, saved in the config. Passed to the command as it is. */
22
+ generatePromptPath?: string;
23
+ noCache: boolean;
24
+ /** Whether a token catalog is in use. It changes the wording of the screen, not what runs. */
25
+ hasTokens: boolean;
26
+ }
27
+ /** One line per thing the screen shows, in the order it shows them. */
28
+ export interface GenerationProgress {
29
+ /** Components finished, out of the total, and the one being worked on. Null until the first progress line. */
30
+ components: {
31
+ done: number;
32
+ total: number;
33
+ current: string;
34
+ } | null;
35
+ mapTokens: 'idle' | 'running' | 'complete';
36
+ /** Whether token mapping will run at all; unknown until the generated components have been looked at. */
37
+ mapTokensEligible: boolean | null;
38
+ }
39
+ export type GenerationStepName = 'save decisions' | 'generate components' | 'map tokens' | `${string} auth check`;
40
+ export type GenerationResult = {
41
+ ok: true;
42
+ generation: GenerationHandoff;
43
+ } | {
44
+ ok: false;
45
+ step: GenerationStepName;
46
+ message: string;
47
+ };
@@ -0,0 +1,14 @@
1
+ import type { GenerationInput, GenerationProgress, GenerationResult } from './types.js';
2
+ export type GenerationState = {
3
+ status: 'running';
4
+ progress: GenerationProgress;
5
+ } | {
6
+ status: 'done';
7
+ result: GenerationResult;
8
+ };
9
+ /**
10
+ * Runs the generation stage once for the given input and reports its progress. Passing a different input starts a new
11
+ * run; passing nothing leaves the stage idle. A run that finishes after the input changed or the screen went away is
12
+ * ignored.
13
+ */
14
+ export declare function useGeneration(input: GenerationInput | undefined): GenerationState | undefined;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import type { ComponentRationale } from '@contentful/experience-design-system-backend-pipeline';
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;
@@ -0,0 +1,67 @@
1
+ import React from 'react';
2
+ import { findSlotCycles, type ComponentSlotInfo } from '../../07-scope-gate/graph/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 {};
@@ -0,0 +1,22 @@
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 {};
@@ -0,0 +1,9 @@
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;
@@ -0,0 +1,11 @@
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,6 +1,6 @@
1
1
  import React from 'react';
2
- import type { PreviewAnnotation } from '../../../analyze/select/types.js';
3
- import type { UseLivePreviewReturn } from '../useLivePreview.js';
2
+ import type { PreviewAnnotation } from '../types.js';
3
+ import type { UseLivePreviewReturn } from '../use-live-preview.js';
4
4
  type LivePreviewSummaryProps = {
5
5
  enabled: boolean;
6
6
  previewAnnotations: ReadonlyMap<string, PreviewAnnotation>;
@@ -0,0 +1,8 @@
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 {};
@@ -0,0 +1,21 @@
1
+ import React from 'react';
2
+ export type RationaleLineData = {
3
+ kind: 'heading';
4
+ text: string;
5
+ } | {
6
+ kind: 'text';
7
+ text: string;
8
+ dim?: boolean;
9
+ } | {
10
+ kind: 'label';
11
+ text: string;
12
+ prefix?: string;
13
+ suffix?: string;
14
+ color?: string;
15
+ } | {
16
+ kind: 'blank';
17
+ };
18
+ export declare function RationaleLine({ line, active }: {
19
+ line: RationaleLineData;
20
+ active: boolean;
21
+ }): React.ReactElement;
@@ -0,0 +1,15 @@
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,8 +1,8 @@
1
1
  import React from 'react';
2
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';
3
+ import type { CdfReviewEntry } from '../types.js';
4
+ import type { UseReviewEditorResult } from '../use-review-editor.js';
5
+ import type { UseLivePreviewReturn } from '../use-live-preview.js';
6
6
  import { type ReviewDetailsEditorProps } from './ReviewDetailsEditor.js';
7
7
  type ReviewDetailsEditorConfig = Pick<ReviewDetailsEditorProps, 'componentRationale' | 'reviewMetadata' | 'reviewEditor' | 'width' | 'height' | 'sourceBorderColor' | 'jsonValue' | 'sidebarFocused' | 'fieldEditor'>;
8
8
  export type ReviewComponentPanelProps = ReviewDetailsEditorConfig & {
@@ -1,7 +1,7 @@
1
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';
2
+ import { type FieldEditorProps } from './FieldEditor.js';
3
+ import { type ReviewDetailsPanelProps } from '../review-details-panel.js';
4
+ import type { UseReviewEditorResult } from '../use-review-editor.js';
5
5
  type ReviewEditorPanelState = Pick<UseReviewEditorResult, 'panelOpen' | 'panelScrollOffset' | 'tokenReviewRow' | 'tokenReviewEditing' | 'tokenReviewEditCursor' | 'tokenReviewEditSelection' | 'showJson' | 'jsonScrollOffset' | 'currentTokenSuggestions'>;
6
6
  export type ReviewDetailsEditorProps = Omit<ReviewDetailsPanelProps, 'editor' | 'panelOpen' | 'panelScrollOffset' | 'tokenSuggestions' | 'tokenReviewRow' | 'tokenReviewEditing' | 'tokenReviewEditCursor' | 'tokenReviewEditSelection' | 'showJson' | 'jsonScrollOffset'> & {
7
7
  reviewEditor: ReviewEditorPanelState;
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
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';
3
+ import type { UseFinalizePreviewReturn } from '../use-finalize-preview.js';
4
+ import type { UseReviewSurfaceStateResult } from '../use-review-surface-state.js';
5
5
  import { type ReviewStatusEntry } from './ReviewStatus.js';
6
6
  export type ReviewFinalizeDialogsProps = {
7
7
  showFinalize: boolean;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import type { ReviewComponentStatus } from '../../../analyze/select/types.js';
2
+ import type { ReviewComponentStatus } from '../types.js';
3
3
  export type ReviewStatusCounts = {
4
4
  accepted: number;
5
5
  rejected: number;
@@ -0,0 +1,14 @@
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 {};
@@ -0,0 +1,30 @@
1
+ import React from 'react';
2
+ import type { CDFComponentEntry } from '@contentful/experience-design-system-types';
3
+ export type TokenPropSuggestion = {
4
+ propName: string;
5
+ paths: string[];
6
+ suggested: string[];
7
+ allowed: string[];
8
+ };
9
+ export type TokenReviewToken = {
10
+ path: string;
11
+ kind: string;
12
+ };
13
+ /**
14
+ * Design-token props on `entry` with a declared token kind. `paths` is the
15
+ * full compatible token universe when a token catalog is available; `allowed`
16
+ * remains the current subset.
17
+ */
18
+ export declare function collectTokenSuggestions(entry: CDFComponentEntry, availableTokens?: TokenReviewToken[]): TokenPropSuggestion[];
19
+ export type TokenReviewPanelProps = {
20
+ componentName: string;
21
+ suggestions: TokenPropSuggestion[];
22
+ selectedRow: number;
23
+ editing: boolean;
24
+ editCursor: number;
25
+ editSelection: Set<string>;
26
+ width: number;
27
+ height: number;
28
+ active: boolean;
29
+ };
30
+ export declare function TokenReviewPanel({ componentName, suggestions, selectedRow, editing, editCursor, editSelection, width, height, active, }: TokenReviewPanelProps): React.ReactElement;
@@ -0,0 +1,7 @@
1
+ import type { ComponentTypeSummary } from '@contentful/experience-design-system-types';
2
+ /** Header line for the removed-components surfaces (deletion panel + finalize
3
+ * dialog). Kept in one place so both read identically. `withExpandHint` adds
4
+ * the panel's "[d] to expand/collapse" affordance, which the dialog omits. */
5
+ export declare function removedComponentsHeader(count: number, withExpandHint: boolean): string;
6
+ /** One bullet line per removed component, matching the deletion panel. */
7
+ export declare function removedComponentLine(rc: ComponentTypeSummary): string;
@@ -0,0 +1 @@
1
+ export declare function wrapText(text: string, innerWidth: number): string[];
@@ -17,7 +17,7 @@ export declare function sortComponentsForSidebar<T extends {
17
17
  key: string;
18
18
  entry: CDFComponentEntry;
19
19
  }>(components: T[], cycleParticipants?: Set<string>): T[];
20
- export { computeCycleAutoRejectTargets } from '../../cycle-auto-reject.js';
20
+ export { computeCycleAutoRejectTargets } from './graph/cycle-auto-reject.js';
21
21
  export interface BreakingComponent {
22
22
  componentName: string;
23
23
  changes: BreakingChange[];
@@ -1,4 +1,4 @@
1
- import type { ComponentGraphNode } from '../analyze/composite-closure.js';
1
+ import type { ComponentGraphNode } from '../../07-scope-gate/graph/composite-closure.js';
2
2
  export declare function computeCycleAutoRejectTargets(slotCycles: Array<{
3
3
  path: string[];
4
4
  }>, graph: ComponentGraphNode[]): Set<string>;
@@ -1,5 +1,5 @@
1
- import type { SlotCycle } from './cycle-detection.js';
2
- import { type SlotGraphInput } from './slot-graph.js';
1
+ import type { SlotCycle } from '../../07-scope-gate/graph/cycle-detection.js';
2
+ import { type SlotGraphInput } from '../../07-scope-gate/graph/slot-graph.js';
3
3
  export interface CycleView {
4
4
  pushBlocking: SlotCycle[];
5
5
  structural: Set<string>;
@@ -0,0 +1,8 @@
1
+ import type { Closure, NodeStatus } from '../../07-scope-gate/graph/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;
@@ -0,0 +1,3 @@
1
+ import type { ComponentGraphNode } from '../../07-scope-gate/graph/composite-closure.js';
2
+ export declare function computeRejectCascade(target: string, components: ComponentGraphNode[]): Set<string>;
3
+ export declare function computeAcceptCascade(target: string, components: ComponentGraphNode[]): Set<string>;
@@ -1,5 +1,5 @@
1
1
  import type { CDFComponentEntry } from '@contentful/experience-design-system-types';
2
- import type { SlotCycle, SlotEdge } from '../../../analyze/cycle-detection.js';
2
+ import type { SlotCycle, SlotEdge } from '../../07-scope-gate/graph/cycle-detection.js';
3
3
  export type BreakEdge = SlotEdge;
4
4
  /** Row shape accepted by {@link enumerateCycleBreaks}. */
5
5
  export interface BreakEnumComponent {
@@ -1,5 +1,5 @@
1
1
  import type { CDFComponentEntry } from '@contentful/experience-design-system-types';
2
- import type { ReviewComponentStatus } from '../../analyze/select/types.js';
2
+ import type { ReviewComponentStatus } from './types.js';
3
3
  export interface HistorySnapshot {
4
4
  components: CdfReviewEntrySnapshot[];
5
5
  autoRejected: string[];
@@ -0,0 +1,26 @@
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,6 +1,6 @@
1
1
  import React from 'react';
2
- import { type TokenPropSuggestion } from '../../../analyze/select/tui/components/TokenReviewPanel.js';
3
- import type { ComponentRationale, ComponentReviewMetadata } from '../../../session/db.js';
2
+ import { type TokenPropSuggestion } from './components/TokenReviewPanel.js';
3
+ import type { ComponentRationale, ComponentReviewMetadata } from '@contentful/experience-design-system-backend-pipeline';
4
4
  type ReviewPanel = 'none' | 'prop-rationale' | 'component-rationale' | 'source' | 'token-review';
5
5
  export type ReviewDetailsPanelProps = {
6
6
  selectedKey: string;
@@ -1,5 +1,5 @@
1
- import type { ImmediateInputKey } from '../../../analyze/select/tui/hooks/useImmediateInput.js';
2
- import type { UseReviewEditorResult } from './useReviewEditor.js';
1
+ import type { ImmediateInputKey } from '../07-scope-gate/sidebar/hooks/useImmediateInput.js';
2
+ import type { UseReviewEditorResult } from './use-review-editor.js';
3
3
  type ReviewOverlayInputState = {
4
4
  loading: boolean;
5
5
  loadError: string | null;