@gitkraken/gitkraken-components 13.0.0-vnext.26 → 13.0.0-vnext.28

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.
@@ -5,7 +5,7 @@ import type { Sha } from '../../domain/commit/CommitTypes';
5
5
  import type { CssVariables } from '../../domain/generic/GenericTypes';
6
6
  import type { GraphCommitDescDisplayMode, GraphMarkerType, GraphSearchMode, GraphZone, GraphZoneType, ShiftSelectMode } from '../../domain/graph/GraphConstants';
7
7
  import type { ThrottledFn } from '../../domain/graph/GraphHelpers';
8
- import type { AbsoluteNodeLeftByColumn, AvatarUrlByEmail, AvatarUrlRequestedByEmail, ChildrenBySha, ColumnColorByColumn, DownstreamsByUpstream, EdgeByColumn, ExcludeByType, ExcludeRefsById, ExcludeRemotesByName, FormatCommitMessage, FormatRefShorthand, GetExternalIcon, GetMissingAvatar, GetMissingRefMetadata, GraphColumnSetting, GraphColumnsSettings, GraphContexts, GraphMarkerColors, GraphMarkerRowIndices, GraphPlatform, GraphRefGroup, GraphRow, GraphZoneModeConstants, GraphZonesByType, Head, HighlightedShas, IncludeOnlyRefsById, IncludeOnlyRemotesByName, IsRefShorthandValid, IsSelectedBySha, NodeOffsetByColumn, NodeOpacityByColumn, OnClearCurrentlyHoveredGraphCommit, OnClickCommit, OnClickGraphRef, OnClickGraphRow, OnClickRef, OnCommitContextMenu, OnCommitMessageChange, OnCurrentlyHoveredGraphCommit, OnDoubleClickCommit, OnDoubleClickGraphRef, OnDoubleClickGraphRow, OnDoubleClickRef, OnEmailsMissingAvatarUrls, OnFilterColumnClick, OnFormatCommitDateTime, OnGraphColumnReOrdered, OnGraphColumnResized, OnGraphColumnsReOrdered, OnGraphMouseEnter, OnGraphMouseLeave, OnGraphRefNodeHovered, OnGraphRefNodeUnhovered, OnGraphResized, OnGraphRowHovered, OnGraphRowUnhovered, OnGraphScrollForZone, OnGraphVisibleRowsChanged, OnGraphZoneResize, OnGraphZoneResizeEnd, OnLoadSelectedGraphRow, OnPopupGraphHeaderContextMenu, OnRefBeginDrag, OnRefCanDrag, OnRefCanDrop, OnRefContextMenu, OnRefCreate, OnRefCreateCancel, OnRefCreateContextMenu, OnRefDragEnter, OnRefDragLeave, OnRefDrop, OnRefEndDrag, OnRefNodeHovered, OnRefNodeUnhovered, OnRefShorthandChange, OnRefsMissingMetadata, OnRefZoneContextMenu, OnRefZoneHovered, OnRefZoneUnhovered, OnRowContextMenu, OnScrollForZone, OnSelectGraphRows, OnSettingsClick, OnShowMoreCommits, OnToggleRefNodesShown, OnToggleRefsVisibilityClick, OnWipMessageBlur, OnWipMessageFocus, ProcessedGraphRow, ProcessedGraphRowBySha, ReadonlyGraphRow, RefMetadataById, RefMetadataRequestedById, RefMetadataType, RefsMissingMetadata, Remote, ReserverInfoBySha, RowEdges, RowStats, RowStatsConstraints, ShaByRefId, Tag, TopAndBottomVisibleRowIndex } from '../../domain/graph/GraphTypes';
8
+ import type { AbsoluteNodeLeftByColumn, AvatarUrlByEmail, AvatarUrlRequestedByEmail, ChildrenBySha, ColumnColorByColumn, DownstreamsByUpstream, EdgeByColumn, ExcludeByType, ExcludeRefsById, ExcludeRemotesByName, FormatCommitMessage, FormatRefShorthand, GetExternalIcon, GetMissingAvatar, GetMissingRefMetadata, GraphColumnSetting, GraphColumnsSettings, GraphContexts, GraphMarkerColors, GraphMarkerRowIndices, GraphPlatform, GraphRefGroup, GraphRow, GraphZoneModeConstants, GraphZonesByType, Head, HighlightedShas, IncludeOnlyRefsById, IncludeOnlyRemotesByName, IsRefShorthandValid, IsSelectedBySha, NodeOffsetByColumn, NodeOpacityByColumn, OnClearCurrentlyHoveredGraphCommit, OnClickCommit, OnClickGraphRef, OnClickGraphRow, OnClickRef, OnColumnsCalculated, OnCommitContextMenu, OnCommitMessageChange, OnCurrentlyHoveredGraphCommit, OnDoubleClickCommit, OnDoubleClickGraphRef, OnDoubleClickGraphRow, OnDoubleClickRef, OnEmailsMissingAvatarUrls, OnFilterColumnClick, OnFormatCommitDateTime, OnGraphColumnReOrdered, OnGraphColumnResized, OnGraphColumnsReOrdered, OnGraphMouseEnter, OnGraphMouseLeave, OnGraphRefNodeHovered, OnGraphRefNodeUnhovered, OnGraphResized, OnGraphRowHovered, OnGraphRowUnhovered, OnGraphScrollForZone, OnGraphVisibleRowsChanged, OnGraphZoneResize, OnGraphZoneResizeEnd, OnLoadSelectedGraphRow, OnPopupGraphHeaderContextMenu, OnRefBeginDrag, OnRefCanDrag, OnRefCanDrop, OnRefContextMenu, OnRefCreate, OnRefCreateCancel, OnRefCreateContextMenu, OnRefDragEnter, OnRefDragLeave, OnRefDrop, OnRefEndDrag, OnRefNodeHovered, OnRefNodeUnhovered, OnRefShorthandChange, OnRefsMissingMetadata, OnRefZoneContextMenu, OnRefZoneHovered, OnRefZoneUnhovered, OnRowContextMenu, OnScrollForZone, OnSelectGraphRows, OnSettingsClick, OnShowMoreCommits, OnToggleRefNodesShown, OnToggleRefsVisibilityClick, OnWipMessageBlur, OnWipMessageFocus, ProcessedGraphRow, ProcessedGraphRowBySha, ReadonlyGraphRow, RefMetadataById, RefMetadataRequestedById, RefMetadataType, RefsMissingMetadata, Remote, ReserverInfoBySha, RowEdges, RowStats, RowStatsConstraints, ShaByRefId, Tag, TopAndBottomVisibleRowIndex } from '../../domain/graph/GraphTypes';
9
9
  import type { RowAdornmentProvider } from '../../domain/graph/rowAdornment/RowAdornmentTypes';
10
10
  import type { TranslationFn } from '../../domain/language/LanguageTypes';
11
11
  import type { CreateRefFormData, RefIconsPosition } from '../../domain/ref/RefTypes';
@@ -65,6 +65,12 @@ export interface StateProps {
65
65
  isInUnsupportedRebase?: boolean;
66
66
  isLoadingRows?: boolean;
67
67
  pendingCommitMessageSummary?: string;
68
+ /**
69
+ * Full name of the branch to pin to the left-most column (column 0).
70
+ * Example: "refs/heads/main" or "refs/remotes/origin/main"
71
+ * If null or undefined, no branch is pinned.
72
+ */
73
+ pinnedBranchFullName?: string | null;
68
74
  shiftSelectMode?: ShiftSelectMode;
69
75
  suppressNonRefRowTooltips?: boolean;
70
76
  refMetadataById?: RefMetadataById | null;
@@ -109,6 +115,12 @@ export interface DispatchProps {
109
115
  onGraphColumnsReOrdered?: OnGraphColumnsReOrdered;
110
116
  onFilterColumnClick?: OnFilterColumnClick;
111
117
  onColumnResized?: OnGraphColumnResized;
118
+ /**
119
+ * Callback invoked when column numbers are calculated for each commit.
120
+ * Receives a map of SHA → column number.
121
+ * Used to sync column layout data back to the parent application.
122
+ */
123
+ onColumnsCalculated?: OnColumnsCalculated;
112
124
  onFocusWipNodeInput?: OnWipMessageFocus;
113
125
  onMessageChange?: OnCommitMessageChange;
114
126
  onPopupGraphHeaderContextMenu?: OnPopupGraphHeaderContextMenu;
@@ -210,6 +222,7 @@ declare class GraphContainer extends React.Component<Props, ComponentState> impl
210
222
  private _autoLoadTimer?;
211
223
  reserverInfoBySha: ReserverInfoBySha;
212
224
  columnsUsed: ColumnsUsed;
225
+ private pinnedBranchShas;
213
226
  rowsStats?: Record<string, RowStats>;
214
227
  workDirStats: WorkDirStats;
215
228
  private _markerColorsCache;
@@ -453,7 +466,7 @@ declare class GraphContainer extends React.Component<Props, ComponentState> impl
453
466
  getEndingAndPassThroughEdgesByColumnFromPrevRow(graphRow: ProcessedGraphRow, prevRowEdges: RowEdges): RowEdges;
454
467
  getFinalEdgeStateForGraphAndRow(graphRow: ProcessedGraphRow, prevRowEdges: RowEdges): RowEdges;
455
468
  loadEdgesBySha(): void;
456
- processRows(graphRows?: GraphRow[]): void;
469
+ processRows(graphRows?: GraphRow[], pinnedBranchFullName?: string | null): void;
457
470
  getStartingEdgesByColumn(currentRow: ProcessedGraphRow): EdgeByColumn;
458
471
  formatCommitDateTimeCallback: OnFormatCommitDateTime;
459
472
  formatCommitMessageCallback: FormatCommitMessage;
@@ -517,12 +530,11 @@ declare class GraphContainer extends React.Component<Props, ComponentState> impl
517
530
  selectLast(shiftKey?: boolean, shiftSelectMode?: ShiftSelectMode): void;
518
531
  selectPageUp(shiftKey?: boolean, shiftSelectMode?: ShiftSelectMode): void;
519
532
  selectPageDown(shiftKey?: boolean, shiftSelectMode?: ShiftSelectMode): void;
520
- getAvailableColumnAndUseIt(): number;
521
533
  getColumns(graphRow: GraphRow): number;
522
534
  getFilteredHeadsForGraphRow(row: GraphRow, hasIncludes: boolean): Head[];
523
535
  getFilteredRemotesForGraphRow(row: GraphRow, hasIncludes: boolean): Remote[];
524
536
  getFilteredTagsForGraphRow(row: GraphRow, hasIncludes: boolean, rowHasVisibleChild: boolean): Tag[];
525
- loadRowsbySha(graphRows: GraphRow[]): void;
537
+ loadRowsbySha(graphRows: GraphRow[], pinnedBranchFullName?: string | null): void;
526
538
  updateRowStatsConstraints(): void;
527
539
  updateTimelines(): void;
528
540
  clearTimelines(): void;
@@ -6,6 +6,7 @@ import type { TranslationFn } from '../../../domain/language/LanguageTypes';
6
6
  import type { RefIconsPosition } from '../../../domain/ref/RefTypes';
7
7
  import type { OnClick, OnContextMenu, OnDoubleClick } from '../../../domain/ui/UiTypes';
8
8
  export type RefNodeProps = {
9
+ className?: string;
9
10
  enableShowHideRefsOptions: boolean;
10
11
  getExternalIcon: GetExternalIcon;
11
12
  groupIsHovered: boolean;
@@ -13,7 +14,9 @@ export type RefNodeProps = {
13
14
  hasRefs: boolean;
14
15
  isActive: boolean;
15
16
  isGhostRef: boolean;
17
+ isHidden?: boolean;
16
18
  isInUnsupportedRebase: boolean;
19
+ isPinned: boolean;
17
20
  isRefGroupIncluded: boolean;
18
21
  key?: string;
19
22
  onClick: OnClickRef;
@@ -30,9 +33,9 @@ export type RefNodeProps = {
30
33
  onMissingRefMetadata: GetMissingRefMetadata;
31
34
  onHideRefClick: OnHideRefClick;
32
35
  refGroup: GraphRefGroup;
33
- refGroupContext: GraphItemContext | null;
36
+ refGroupContext: GraphItemContext | null | undefined;
34
37
  refIconsPosition: RefIconsPosition;
35
- refMetadata: RefMetadataById | null;
38
+ refMetadata: RefMetadataById | null | undefined;
36
39
  fallbackRefMetadata?: RefMetadataById | null;
37
40
  sha: Sha;
38
41
  showRemoteNamesOnRefs: boolean;
@@ -43,11 +46,11 @@ export type RefNodeProps = {
43
46
  };
44
47
  export declare function getRefIconAndTooltipForRef(getExternalIcon: GetExternalIcon, ref: GraphRef, translate: TranslationFn, index?: number): ReactElement<any>;
45
48
  export default class RefNode extends React.PureComponent<RefNodeProps> {
46
- getContextForRefGroupIfExists(refGroup: GraphRefGroup, groupContext: GraphItemContext | null, useGroupContext?: boolean): GraphItemContext | undefined;
49
+ getContextForRefGroupIfExists(refGroup: GraphRefGroup, groupContext: GraphItemContext | null | undefined, useGroupContext?: boolean): GraphItemContext | null | undefined;
47
50
  getDecoratedRefIcon(key: string, icon: ReactElement<any>, metadataItem: RefMetadataItem, context?: GraphItemContext, className?: string): ReactElement<any>;
48
- getPullRequestIconsAndTooltipsForRef(refMetadata: RefMetadataById | null, ref: GraphRef, existingPullRequestIds: Set<number>): ReactElement<any>[] | null;
49
- getUpstreamIndicatorIconsAndTooltipsForRef(refMetadata: RefMetadataById | null, ref: GraphRef): ReactElement<any> | null;
50
- getIssueIconsAndTooltipsForRef(refMetadata: RefMetadataById | null, ref: GraphRef, existingIssuesIds: Set<string>): ReactElement<any>[] | null;
51
+ getPullRequestIconsAndTooltipsForRef(refMetadata: RefMetadataById | null | undefined, ref: GraphRef, existingPullRequestIds: Set<number>): ReactElement<any>[] | null;
52
+ getUpstreamIndicatorIconsAndTooltipsForRef(refMetadata: RefMetadataById | null | undefined, ref: GraphRef): ReactElement<any> | null;
53
+ getIssueIconsAndTooltipsForRef(refMetadata: RefMetadataById | null | undefined, ref: GraphRef, existingIssuesIds: Set<string>): ReactElement<any>[] | null;
51
54
  onContextMenu: OnContextMenu;
52
55
  onClick: OnClick;
53
56
  onClickMetadata: OnClickRefMetadata;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ type Props = React.ComponentProps<'div'> & {
3
+ className?: string;
4
+ isRefGhost: boolean;
5
+ isRefHidden: boolean;
6
+ isRefActive: boolean;
7
+ isRefPinned: boolean;
8
+ };
9
+ declare const RefNodeAnnotationTarget: React.ForwardRefExoticComponent<Omit<Props, "ref"> & React.RefAttributes<HTMLDivElement>>;
10
+ export default RefNodeAnnotationTarget;
@@ -22,10 +22,11 @@ type RefNodesProps = {
22
22
  numGraphColumns: number;
23
23
  onClickRef: OnClickRef;
24
24
  onMissingRefMetadata: GetMissingRefMetadata;
25
+ pinnedBranchFullName?: string | null;
25
26
  refGroupContexts: RefGroupContexts | null;
26
27
  refGroupsByName: RefGroup[];
27
28
  refIconsPosition: RefIconsPosition;
28
- refMetadata: RefMetadataById | null;
29
+ refMetadata: RefMetadataById | null | undefined;
29
30
  fallbackRefMetadata?: RefMetadataById | null;
30
31
  refNodeHovered: OnRefNodeHovered;
31
32
  onToggleRefNodesShown: OnToggleRefNodesShown;
@@ -43,5 +44,5 @@ type RefNodesProps = {
43
44
  type: CommitType;
44
45
  useColumnHeaderIcons: boolean;
45
46
  };
46
- declare function RefNodes({ enabledRefMetadataTypes, column, columnForColoring, context, enableShowHideRefsOptions, targetRef, hasActive, hasRefs, getExternalIcon, includeOnlyRefsById, includeOnlyRemotesByName, isGhostRef, isHovered, isInUnsupportedRebase, numGraphColumns, onMissingRefMetadata, refGroupContexts, refGroupsByName, refIconsPosition, refMetadata, fallbackRefMetadata, refNodeHovered, sha, showRemoteNamesOnRefs, showContextMenuForGroupedRef, onClickRef, onDoubleClickRef, onToggleRefNodesShown, onRefBeginDrag, onRefCanDrag, onRefCanDrop, onRefDragEnter, onRefDragLeave, onRefDrop, onRefEndDrag, translate, type, useColumnHeaderIcons, }: RefNodesProps): ReactElement<'span' | 'div'>;
47
+ declare function RefNodes({ enabledRefMetadataTypes, column, columnForColoring, context, enableShowHideRefsOptions, targetRef, hasActive, hasRefs, getExternalIcon, includeOnlyRefsById, includeOnlyRemotesByName, isGhostRef, isHovered, isInUnsupportedRebase, numGraphColumns, onMissingRefMetadata, pinnedBranchFullName, refGroupContexts, refGroupsByName, refIconsPosition, refMetadata, fallbackRefMetadata, refNodeHovered, sha, showRemoteNamesOnRefs, showContextMenuForGroupedRef, onClickRef, onDoubleClickRef, onToggleRefNodesShown, onRefBeginDrag, onRefCanDrag, onRefCanDrop, onRefDragEnter, onRefDragLeave, onRefDrop, onRefEndDrag, translate, type, useColumnHeaderIcons, }: RefNodesProps): ReactElement<'span' | 'div'>;
47
48
  export default RefNodes;
@@ -36,10 +36,11 @@ type RefZoneProps = {
36
36
  onRefDragLeave: OnRefDragLeave;
37
37
  onRefDrop: OnRefDrop;
38
38
  onRefEndDrag: OnRefEndDrag;
39
+ pinnedBranchFullName?: string | null;
39
40
  refGroupContexts: RefGroupContexts | null;
40
41
  refGroupsByName: GraphRefGroup[];
41
42
  refIconsPosition: RefIconsPosition;
42
- refMetadata: RefMetadataById | null;
43
+ refMetadata: RefMetadataById | null | undefined;
43
44
  fallbackRefMetadata?: RefMetadataById | null;
44
45
  refNodeHovered: OnRefNodeHovered;
45
46
  refNodeUnhovered: OnRefNodeUnhovered;
@@ -60,7 +61,7 @@ type RefZoneProps = {
60
61
  currentlyHoveredCommitSha: Sha | null;
61
62
  };
62
63
  export default class RefZone extends React.PureComponent<RefZoneProps> {
63
- popoverTargetRef: React.RefObject<HTMLDivElement>;
64
+ popoverTargetRef: React.RefObject<HTMLDivElement | null>;
64
65
  static defaultProps: RefZoneDefaultProps;
65
66
  componentDidUpdate(nextProps: RefZoneProps): void;
66
67
  onCustomToggleRefNodesShown: OnToggleRefNodesShown;
@@ -15,6 +15,7 @@ interface StateProps {
15
15
  isInUnsupportedRebase: boolean;
16
16
  isRefShorthandValid: IsRefShorthandValid;
17
17
  hoveredRefZoneSha?: Sha;
18
+ pinnedBranchFullName?: string | null;
18
19
  refIconsPosition: RefIconsPosition;
19
20
  refMetadataById?: RefMetadataById | null;
20
21
  fallbackRefMetadataById?: RefMetadataById | null;
@@ -31,6 +31,8 @@ export declare const REF_ZONE_MARGIN_LEFT = 2;
31
31
  export declare const REF_ZONE_MARGIN_RIGHT = 6;
32
32
  export declare const REF_NODE_ICON_WIDTH = 14;
33
33
  export declare const REF_NODE_ICON_MARGIN = 5;
34
+ export declare const REF_NODE_ACTIVE_ANNOTATION_ID = "gk-graph-ref-active";
35
+ export declare const REF_NODE_PINNED_ANNOTATION_ID = "gk-graph-ref-pinned";
34
36
  export declare const REF_NODE_ICON_SPACING: number;
35
37
  export declare const REF_NODE_OUTER_SPACING = 10;
36
38
  export declare const REF_ZONE_SHOW_ICON_WIDTH = 55;
@@ -17,7 +17,7 @@ export declare function hasScrolledToBottom(htmlElement: HTMLElement): boolean;
17
17
  export declare function hasScrolledToRight(htmlElement: HTMLElement): boolean;
18
18
  export declare function parseContext(context?: GraphItemContext | null): string | null;
19
19
  export declare function getRowStatsConstraints(stats: number[]): RowStatsConstraints;
20
- export declare function getOrAskForRefMetadata(ref: GraphRef, refMetadata: RefMetadataById | undefined, onMissingRefMetadata: GetMissingRefMetadata, refMetadataType?: RefMetadataType, fallbackRefMetadata?: RefMetadataById | null): RefMetadata | BaseMetadata | BaseMetadata[] | null | undefined;
20
+ export declare function getOrAskForRefMetadata(ref: GraphRef, refMetadata: RefMetadataById | undefined | null, onMissingRefMetadata: GetMissingRefMetadata, refMetadataType?: RefMetadataType, fallbackRefMetadata?: RefMetadataById | null): RefMetadata | BaseMetadata | BaseMetadata[] | null | undefined;
21
21
  export declare function getTimelineLabelAndValue(diffMs: number): {
22
22
  label: string;
23
23
  value: number;
@@ -145,6 +145,9 @@ export type HasSpecialChildBySha = {
145
145
  export type ReserverInfoBySha = {
146
146
  [id: Sha]: ReserverInfo;
147
147
  };
148
+ export type ColumnNumberBySha = {
149
+ [sha: Sha]: number;
150
+ };
148
151
  export type RefTargetFunc = () => Element | null | undefined;
149
152
  export type ColumnContentGenerator = () => ReactElement<any>;
150
153
  export type GraphItemContext = string | object;
@@ -406,7 +409,7 @@ export type DownstreamsByUpstream = {
406
409
  [upstreamName: string]: string[];
407
410
  };
408
411
  export type GraphPlatform = 'aix' | 'android' | 'darwin' | 'freebsd' | 'linux' | 'openbsd' | 'sunos' | 'win32' | 'cygwin';
409
- export type ExternalIconKeys = 'added' | 'author' | 'branch' | 'changes' | 'check' | 'commit' | 'datetime' | 'deleted' | 'files' | 'filter' | 'graph' | 'head' | 'hide' | `issue-${IssueTrackerType}` | 'loading' | 'message' | 'modified' | 'pull-request' | 'remote' | `remote-${HostingServiceType}` | 'renamed' | 'resolved' | 'settings' | 'show' | 'stash' | 'tag' | 'upstream-ahead' | 'upstream-behind' | 'warning' | 'worktree';
412
+ export type ExternalIconKeys = 'added' | 'author' | 'branch' | 'changes' | 'check' | 'commit' | 'datetime' | 'deleted' | 'files' | 'filter' | 'graph' | 'head' | 'hide' | `issue-${IssueTrackerType}` | 'loading' | 'message' | 'modified' | 'pin' | 'pull-request' | 'remote' | `remote-${HostingServiceType}` | 'renamed' | 'resolved' | 'settings' | 'show' | 'stash' | 'tag' | 'upstream-ahead' | 'upstream-behind' | 'warning' | 'worktree';
410
413
  export type GetExternalIcon = (key: ExternalIconKeys) => ReactElement<any>;
411
414
  export type GetMissingAvatar = (email: string, sha: string) => void;
412
415
  export type GetMissingRefMetadata = (id: string, types: RefMetadataType[]) => void;
@@ -479,7 +482,7 @@ export type OnToggleRefsVisibilityClick = (event: React.MouseEvent<any>, refs: G
479
482
  export interface GraphSelectionState {
480
483
  /** Whether the selected rows form a topologically contiguous selection (connected via parent-child relationships) */
481
484
  isContiguous: boolean;
482
- /** Whether the selection was made topologically (via shift+click following graph topology) */
485
+ /** Whether the selection was made topologically (via ctrl/shift+click following graph topology) */
483
486
  isTopological: boolean;
484
487
  }
485
488
  export type OnSelectGraphRows = (rows: ReadonlyGraphRow[], focusedRow: ReadonlyGraphRow | undefined, state: GraphSelectionState) => void;
@@ -493,4 +496,10 @@ export type OnGraphColumnResized = (graphZoneType: GraphZoneType, columnSettings
493
496
  export type OnShowMoreCommits = () => void;
494
497
  export type OnEmailsMissingAvatarUrls = (emails: AvatarUrlByEmail) => void;
495
498
  export type OnRefsMissingMetadata = (refs: RefsMissingMetadata) => void;
499
+ /**
500
+ * Callback invoked when column numbers are calculated for each commit.
501
+ * Receives a map of SHA → column number.
502
+ * Used to sync column layout data back to the parent application.
503
+ */
504
+ export type OnColumnsCalculated = (columnsBySha: ColumnNumberBySha) => void;
496
505
  export {};
@@ -0,0 +1,21 @@
1
+ import type { Sha } from '../commit/CommitTypes';
2
+ import type { GraphRow } from './GraphTypes';
3
+ /**
4
+ * Identifies commits that belong to the pinned branch by following the first-parent chain.
5
+ * Returns a Set of SHAs that are part of the pinned branch.
6
+ */
7
+ export declare function identifyPinnedBranchCommits(graphRows: GraphRow[], pinnedBranchFullName?: string | null): Set<Sha>;
8
+ /**
9
+ * Gets the next available column number, marking it as used.
10
+ * When reserveColumn0ForPinned is true, starts searching from column 1.
11
+ */
12
+ export declare function getAvailableColumnAndUseIt(columnsUsed: {
13
+ [column: number]: boolean;
14
+ }, reserveColumn0ForPinned?: boolean): number;
15
+ /**
16
+ * Determines the column number for a parent commit based on pinning status and parent index.
17
+ * For pinned parents, always reserve column 0; for non-pinned, use normal logic.
18
+ */
19
+ export declare function getParentColumn(columnsUsed: {
20
+ [column: number]: boolean;
21
+ }, isParentPinned: boolean, parentIndex: number, currentColumn: number, hasPinnedBranch: boolean): number;