@contentful/experience-design-system-cli 2.34.5-dev-build-d408bfc4.0 → 2.34.5-dev-build-d0fcb46e.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/experience-design-system-cli",
3
- "version": "2.34.5-dev-build-d408bfc4.0",
3
+ "version": "2.34.5-dev-build-d0fcb46e.0",
4
4
  "description": "Contentful Experiences design system import CLI",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ import type { LineageEntry, LineageJumpable } from '../../../../import/tui/hooks/useLineage.js';
3
+ export interface LineagePanelProps {
4
+ focusedComponentKey: string;
5
+ entries: LineageEntry[];
6
+ /** Index into the jumpables list — NOT into entries. */
7
+ cursor: number;
8
+ jumpables: LineageJumpable[];
9
+ /** Max entry rows rendered at once. Larger lineages window around the cursor. */
10
+ maxRows?: number;
11
+ /** Constrain the panel box to a fixed column width (e.g. the sidebar slot). */
12
+ width?: number;
13
+ }
14
+ export declare function LineagePanel({ focusedComponentKey, entries, cursor, jumpables, maxRows, width, }: LineagePanelProps): React.ReactElement;
@@ -9,6 +9,11 @@ export type ReviewStatusEntry = {
9
9
  status: ReviewComponentStatus;
10
10
  };
11
11
  export declare function countReviewStatuses(entries: ReadonlyArray<ReviewStatusEntry>): ReviewStatusCounts;
12
+ export declare function ReviewStatusBar({ entries, onApproveAll, onFinalize, }: {
13
+ entries: ReadonlyArray<ReviewStatusEntry>;
14
+ onApproveAll: () => void;
15
+ onFinalize: () => void;
16
+ }): React.ReactElement;
12
17
  export declare function ReviewLoadingState(): React.ReactElement;
13
18
  export declare function ReviewLoadError({ message }: {
14
19
  message: string;
@@ -0,0 +1,32 @@
1
+ import { type ComponentGraphNode } from '../../../analyze/composite-closure.js';
2
+ export type LineageEntry = {
3
+ kind: 'section';
4
+ label: string;
5
+ } | {
6
+ kind: 'ancestor';
7
+ label: string;
8
+ jumpTarget: string;
9
+ } | {
10
+ kind: 'descendant';
11
+ label: string;
12
+ jumpTarget: string;
13
+ } | {
14
+ kind: 'empty';
15
+ label: string;
16
+ };
17
+ export interface LineageJumpable {
18
+ /** Original index into the `entries` array — callers highlight the source row. */
19
+ i: number;
20
+ entry: LineageEntry;
21
+ }
22
+ export interface UseLineageResult {
23
+ entries: LineageEntry[];
24
+ /**
25
+ * Jumpable entries — those the operator can Tab/Enter to. Excludes
26
+ * `section` / `empty` rows. Order matches `entries` minus the non-jumpable
27
+ * rows; each item carries the original `entries` index so callers can
28
+ * highlight the source row.
29
+ */
30
+ jumpables: LineageJumpable[];
31
+ }
32
+ export declare function useLineage(focusedKey: string | null, graph: ComponentGraphNode[]): UseLineageResult;
@@ -0,0 +1,18 @@
1
+ import type { LineageJumpable } from './hooks/useLineage.js';
2
+ type LineageInputKey = {
3
+ upArrow: boolean;
4
+ downArrow: boolean;
5
+ tab: boolean;
6
+ return: boolean;
7
+ };
8
+ export declare function handleLineageNavigation({ key, cursor, jumpables, onCursorChange, onJump, onClose, allowTab, }: {
9
+ input?: string;
10
+ key: LineageInputKey;
11
+ cursor: number;
12
+ jumpables: LineageJumpable[];
13
+ onCursorChange: (update: number | ((current: number) => number)) => void;
14
+ onJump: (name: string) => void;
15
+ onClose: () => void;
16
+ allowTab: boolean;
17
+ }): boolean;
18
+ export {};
@@ -40,7 +40,7 @@ export interface LineageLayoutInput {
40
40
  export interface LineageLayout {
41
41
  /** Rows the sidebar should render (`visibleCount`). Constant across open/closed. */
42
42
  sidebarVisible: number;
43
- /** Rows a sidebar replacement panel should window to (`maxRows`). */
43
+ /** Rows the LineagePanel should window to (`maxRows`). */
44
44
  panelMaxRows: number;
45
45
  }
46
46
  /**
@@ -52,7 +52,7 @@ export declare function computeLineageLayout({ rows, panelOpen, entryCount }: Li
52
52
  export interface SidebarBudget {
53
53
  /** Rows the GroupedSidebar should render (`visibleCount`). */
54
54
  sidebarVisibleCount: number;
55
- /** Rows a sidebar replacement panel should window to (`maxRows`). */
55
+ /** Rows the LineagePanel should window to (`maxRows`). */
56
56
  panelMaxRows: number;
57
57
  }
58
58
  /**