@gitkraken/gitkraken-components 13.0.0-vnext.27 → 13.0.0-vnext.29

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 (31) hide show
  1. package/README.md +4 -0
  2. package/dist/components/graph/GraphContainer.d.ts +69 -11
  3. package/dist/components/graph/commitzone/CommitZone.d.ts +2 -1
  4. package/dist/components/graph/commitzone/edges/Arc.d.ts +2 -2
  5. package/dist/components/graph/commitzone/edges/EndingEdge.d.ts +2 -2
  6. package/dist/components/graph/commitzone/edges/PassThroughEdge.d.ts +2 -2
  7. package/dist/components/graph/commitzone/edges/StartingEdge.d.ts +2 -2
  8. package/dist/components/graph/common/GenericGraphZone.d.ts +3 -1
  9. package/dist/components/graph/refzone/RefNode.d.ts +9 -6
  10. package/dist/components/graph/refzone/RefNodeAnnotationTarget.d.ts +10 -0
  11. package/dist/components/graph/refzone/RefNodes.d.ts +3 -2
  12. package/dist/components/graph/refzone/RefZone.d.ts +5 -3
  13. package/dist/components/graph/rowRenderers/CommitMessageZoneRow.d.ts +2 -1
  14. package/dist/components/graph/rowRenderers/CommitZoneRow.d.ts +2 -0
  15. package/dist/components/graph/rowRenderers/RefZoneRow.d.ts +1 -0
  16. package/dist/domain/commit/CommitHelpers.d.ts +2 -2
  17. package/dist/domain/commit/CommitTypes.d.ts +1 -0
  18. package/dist/domain/edge/EdgeHelpers.d.ts +4 -4
  19. package/dist/domain/graph/GraphConstants.d.ts +3 -1
  20. package/dist/domain/graph/GraphEdgeHelpers.d.ts +34 -0
  21. package/dist/domain/graph/GraphHelpers.d.ts +7 -1
  22. package/dist/domain/graph/GraphTypes.d.ts +56 -4
  23. package/dist/domain/graph/PinnedBranchHelpers.d.ts +21 -0
  24. package/dist/domain/graph/ScopedGraphHelpers.d.ts +15 -0
  25. package/dist/domain/graph/row/ProcessedGraphRowObj.d.ts +2 -1
  26. package/dist/domain/graph/rowAdornment/RowAdornmentHelpers.d.ts +14 -0
  27. package/dist/domain/workdir/WorkDirHelpers.d.ts +50 -0
  28. package/dist/domain/workdir/WorkDirTypes.d.ts +51 -0
  29. package/dist/index.js +11 -11
  30. package/dist/styles.css +1 -1
  31. package/package.json +27 -27
package/README.md CHANGED
@@ -16,4 +16,8 @@ This is a shared module between the GitKraken app and GitLens to share React com
16
16
  }
17
17
  ```
18
18
 
19
+ ## Guides
20
+
21
+ - [Multi-WIP rows](./docs/multi-wip-rows.md) — rendering secondary (per-worktree) WIP rows, deferred stats loading, and stale-while-revalidate invalidation.
22
+
19
23
  [CHANGELOG](./CHANGELOG.md)
@@ -5,12 +5,12 @@ 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, ExcludeByType, ExcludeRefsById, ExcludeRemotesByName, FormatCommitMessage, FormatRefShorthand, GetExternalIcon, GetMissingAvatar, GetMissingRefMetadata, GraphColumnSetting, GraphColumnsSettings, GraphContexts, GraphMarkerColors, GraphMarkerRowIndices, GraphPlatform, GraphRefGroup, GraphRow, GraphScope, 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, 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';
12
12
  import type { OnKeyDown, OnKeyUp, OnMouseDown, OnResizeParams } from '../../domain/ui/UiTypes';
13
- import type { WorkDirStats } from '../../domain/workdir/WorkDirTypes';
13
+ import type { OnVisibleWipShasChanged, OnWipShasMissingStats, VisibleWipShas, WipNodeMetadataBySha, WipShasMissingStats, WorkDirStats } from '../../domain/workdir/WorkDirTypes';
14
14
  import type { IGraphContainer } from './IGraphContainer';
15
15
  type ClearScrollToIndex = () => void;
16
16
  type OnZoneEnter = (e: React.MouseEvent<any>, zoneType: GraphZoneType, hoveredRefGroup?: GraphRefGroup, hoveredSha?: Sha) => void;
@@ -47,6 +47,12 @@ export interface StateProps {
47
47
  isRefShorthandValid?: IsRefShorthandValid;
48
48
  showGhostRefsOnRowHover?: boolean;
49
49
  showRemoteNamesOnRefs?: boolean;
50
+ /**
51
+ * Whether stash rows can keep otherwise-unreferenced parent commits visible.
52
+ * Defaults to true for backwards compatibility. When false, a stash is shown
53
+ * only if its parent commit would already be visible for some other reason.
54
+ */
55
+ stashesAnchorCommits?: boolean;
50
56
  enabledRefMetadataTypes?: RefMetadataType[];
51
57
  enabledScrollMarkerTypes?: GraphMarkerType[];
52
58
  scrollRowPadding?: number;
@@ -65,6 +71,25 @@ export interface StateProps {
65
71
  isInUnsupportedRebase?: boolean;
66
72
  isLoadingRows?: boolean;
67
73
  pendingCommitMessageSummary?: string;
74
+ /**
75
+ * Full name of the branch to pin to the left-most column (column 0).
76
+ * Example: "refs/heads/main" or "refs/remotes/origin/main"
77
+ * If null or undefined, no branch is pinned.
78
+ */
79
+ pinnedBranchFullName?: string | null;
80
+ /**
81
+ * Narrow the graph to commits reachable from a specific branch, its upstream (if any), and
82
+ * a merge-target tip commit. Anchors (tips + merge target) show all their refs and never
83
+ * propagate child refs to their parents. When an anchor's real parents are hidden, a
84
+ * synthetic wavy dashed edge is drawn to its nearest visible ancestor.
85
+ */
86
+ scope?: GraphScope;
87
+ /**
88
+ * Fired when the helper determined that an anchor cannot reach a visible ancestor within the
89
+ * loaded graphRows (merge base not loaded). Consumer should fetch more data and re-render.
90
+ * Called once per processing pass, only when the set actually changes.
91
+ */
92
+ onScopeAnchorsUnreachable?: (unreachableAnchors: Set<Sha>) => void;
68
93
  shiftSelectMode?: ShiftSelectMode;
69
94
  suppressNonRefRowTooltips?: boolean;
70
95
  refMetadataById?: RefMetadataById | null;
@@ -77,8 +102,23 @@ export interface StateProps {
77
102
  useAuthorInitialsForAvatars: boolean;
78
103
  rowsStats?: Record<string, RowStats>;
79
104
  rowsStatsLoading?: boolean;
105
+ /**
106
+ * Controls when the WIP row is inserted into the graph.
107
+ * - 'auto' (default): shown only when there are pending working-tree changes.
108
+ * - 'always': shown even with a clean working tree, anchored at HEAD.
109
+ */
110
+ wipVisibility?: 'always' | 'auto';
80
111
  wipMessageEditable?: boolean;
81
112
  workDirStats?: WorkDirStats;
113
+ wipNodeMetadataBySha?: WipNodeMetadataBySha;
114
+ /**
115
+ * Settle delay (ms) for the internal scroll-settle debounce that drives both
116
+ * `onVisibleWipShasChanged` and `onWipShasMissingStats`. Each scroll/visible-range change
117
+ * resets the timer; the callbacks fire once activity stops for this long. Raise it (e.g. 350)
118
+ * to avoid firing stats requests for rows that are only momentarily visible during fast scrolls.
119
+ * Defaults to 100.
120
+ */
121
+ wipShasSettleDelayMs?: number;
82
122
  /**
83
123
  * Provider for row adornments.
84
124
  * Graph subscribes to invalidate events and calls provide/resolve as needed.
@@ -109,6 +149,12 @@ export interface DispatchProps {
109
149
  onGraphColumnsReOrdered?: OnGraphColumnsReOrdered;
110
150
  onFilterColumnClick?: OnFilterColumnClick;
111
151
  onColumnResized?: OnGraphColumnResized;
152
+ /**
153
+ * Callback invoked when column numbers are calculated for each commit.
154
+ * Receives a map of SHA → column number.
155
+ * Used to sync column layout data back to the parent application.
156
+ */
157
+ onColumnsCalculated?: OnColumnsCalculated;
112
158
  onFocusWipNodeInput?: OnWipMessageFocus;
113
159
  onMessageChange?: OnCommitMessageChange;
114
160
  onPopupGraphHeaderContextMenu?: OnPopupGraphHeaderContextMenu;
@@ -126,6 +172,8 @@ export interface DispatchProps {
126
172
  onGraphMouseLeave?: OnGraphMouseLeave;
127
173
  onEmailsMissingAvatarUrls?: OnEmailsMissingAvatarUrls;
128
174
  onRefsMissingMetadata?: OnRefsMissingMetadata;
175
+ onWipShasMissingStats?: OnWipShasMissingStats;
176
+ onVisibleWipShasChanged?: OnVisibleWipShasChanged;
129
177
  }
130
178
  interface Props extends OwnProps, StateProps, DispatchProps {
131
179
  }
@@ -210,6 +258,10 @@ declare class GraphContainer extends React.Component<Props, ComponentState> impl
210
258
  private _autoLoadTimer?;
211
259
  reserverInfoBySha: ReserverInfoBySha;
212
260
  columnsUsed: ColumnsUsed;
261
+ private pinnedBranchShas;
262
+ private scopeVisibility;
263
+ private syntheticEdgeChildShas;
264
+ private _lastReportedUnreachable;
213
265
  rowsStats?: Record<string, RowStats>;
214
266
  workDirStats: WorkDirStats;
215
267
  private _markerColorsCache;
@@ -235,6 +287,9 @@ declare class GraphContainer extends React.Component<Props, ComponentState> impl
235
287
  pendingMissingRefsMetadata: RefsMissingMetadata;
236
288
  requestedMissingRefsMetadata: RefMetadataRequestedById;
237
289
  previousRefMetadataById: RefMetadataById | null;
290
+ requestedMissingWipStats: WipShasMissingStats;
291
+ visibleWipShasTimer?: ReturnType<typeof setTimeout>;
292
+ lastFiredVisibleWipShas: VisibleWipShas | undefined;
238
293
  branchUpstreamRowIndices: number[];
239
294
  downstreamsByUpstream: DownstreamsByUpstream;
240
295
  timelinesInterval?: ReturnType<typeof setInterval>;
@@ -449,12 +504,8 @@ declare class GraphContainer extends React.Component<Props, ComponentState> impl
449
504
  initializeGraphZones(zoneSettings: GraphColumnsSettings | undefined, zoneOrdering: GraphZoneType[], width: number): GraphZone[];
450
505
  maybeSortGraphZoneOrderingFromSettings(zoneSettings?: GraphColumnsSettings): void;
451
506
  updateZonesFromSettings(zoneSettings?: GraphColumnsSettings): void;
452
- getEdgeColumnMaxes(sha: Sha): number;
453
- getEndingAndPassThroughEdgesByColumnFromPrevRow(graphRow: ProcessedGraphRow, prevRowEdges: RowEdges): RowEdges;
454
- getFinalEdgeStateForGraphAndRow(graphRow: ProcessedGraphRow, prevRowEdges: RowEdges): RowEdges;
455
507
  loadEdgesBySha(): void;
456
- processRows(graphRows?: GraphRow[]): void;
457
- getStartingEdgesByColumn(currentRow: ProcessedGraphRow): EdgeByColumn;
508
+ processRows(graphRows?: GraphRow[], pinnedBranchFullName?: string | null): void;
458
509
  formatCommitDateTimeCallback: OnFormatCommitDateTime;
459
510
  formatCommitMessageCallback: FormatCommitMessage;
460
511
  formatRefShorthandCallback: FormatRefShorthand;
@@ -463,6 +514,7 @@ declare class GraphContainer extends React.Component<Props, ComponentState> impl
463
514
  getIconCallback: GetExternalIcon;
464
515
  onMissingAvatar: GetMissingAvatar;
465
516
  onMissingRefMetadata: GetMissingRefMetadata;
517
+ scheduleVisibleWipShasUpdate: () => void;
466
518
  selectNext(shiftKey?: boolean, topological?: boolean, shiftSelectMode?: ShiftSelectMode): void;
467
519
  selectPrevious(shiftKey?: boolean, topological?: boolean, shiftSelectMode?: ShiftSelectMode): void;
468
520
  /**
@@ -517,12 +569,18 @@ declare class GraphContainer extends React.Component<Props, ComponentState> impl
517
569
  selectLast(shiftKey?: boolean, shiftSelectMode?: ShiftSelectMode): void;
518
570
  selectPageUp(shiftKey?: boolean, shiftSelectMode?: ShiftSelectMode): void;
519
571
  selectPageDown(shiftKey?: boolean, shiftSelectMode?: ShiftSelectMode): void;
520
- getAvailableColumnAndUseIt(): number;
521
- getColumns(graphRow: GraphRow): number;
572
+ /**
573
+ * Computes the column for a row.
574
+ *
575
+ * `parentsOverride` lets callers supply a different parent list than `graphRow.parents` —
576
+ * used by the scoped-graph feature to reserve lanes against synthetic ancestors when a
577
+ * row's real parents are hidden by scope filtering. Avoids mutating row.parents.
578
+ */
579
+ getColumns(graphRow: GraphRow, parentsOverride?: Sha[]): number;
522
580
  getFilteredHeadsForGraphRow(row: GraphRow, hasIncludes: boolean): Head[];
523
581
  getFilteredRemotesForGraphRow(row: GraphRow, hasIncludes: boolean): Remote[];
524
- getFilteredTagsForGraphRow(row: GraphRow, hasIncludes: boolean, rowHasVisibleChild: boolean): Tag[];
525
- loadRowsbySha(graphRows: GraphRow[]): void;
582
+ getBaseFilteredTagsForGraphRow(row: GraphRow, hasIncludesWithTags: boolean): Tag[];
583
+ loadRowsbySha(graphRows: GraphRow[], pinnedBranchFullName?: string | null): void;
526
584
  updateRowStatsConstraints(): void;
527
585
  updateTimelines(): void;
528
586
  clearTimelines(): void;
@@ -2,7 +2,7 @@ import type { ReactElement } from 'react';
2
2
  import * as React from 'react';
3
3
  import type { CommitType, Sha } from '../../../domain/commit/CommitTypes';
4
4
  import type { CssVariables, Style } from '../../../domain/generic/GenericTypes';
5
- import type { ColumnColorByColumn, GetExternalIcon, GraphItemContext, GraphZoneModeConstants, OnClearCurrentlyHoveredGraphCommit, OnClickCommit, OnCommitContextMenu, OnCurrentlyHoveredGraphCommit, OnDoubleClickCommit, RowEdges } from '../../../domain/graph/GraphTypes';
5
+ import type { ColumnColorByColumn, GetExternalIcon, GraphItemContext, GraphZoneModeConstants, OnClearCurrentlyHoveredGraphCommit, OnClickCommit, OnCommitContextMenu, OnCurrentlyHoveredGraphCommit, OnDoubleClickCommit, RowEdges, ScopeBoundaryKind } from '../../../domain/graph/GraphTypes';
6
6
  import type { TranslationFn } from '../../../domain/language/LanguageTypes';
7
7
  type Props = {
8
8
  authorEmail: string;
@@ -38,6 +38,7 @@ type Props = {
38
38
  rightGutterBoxShadowAlpha: number;
39
39
  rightGutterWidth: number;
40
40
  rowContext?: GraphItemContext;
41
+ scopeBoundaryKind?: ScopeBoundaryKind;
41
42
  scrollLeft: number;
42
43
  setAsCurrentlyHoveredGraphCommit: OnCurrentlyHoveredGraphCommit;
43
44
  sha: Sha;
@@ -1,4 +1,4 @@
1
- import type { CommitType } from '../../../../domain/commit/CommitTypes';
1
+ import type { EdgeCommitType } from '../../../../domain/commit/CommitTypes';
2
2
  import type { ArcEndpointAngle, ColumnColor, SvgElement } from '../../../../domain/graph/GraphTypes';
3
- declare function getArc(color: ColumnColor, endAngle: ArcEndpointAngle, startAngle: ArcEndpointAngle, type: CommitType, x: number, y: number, strokeWidth: number, isCompact?: boolean): SvgElement;
3
+ declare function getArc(color: ColumnColor, endAngle: ArcEndpointAngle, startAngle: ArcEndpointAngle, type: EdgeCommitType, x: number, y: number, strokeWidth: number, isCompact?: boolean): SvgElement;
4
4
  export default getArc;
@@ -1,4 +1,4 @@
1
- import type { CommitType } from '../../../../domain/commit/CommitTypes';
1
+ import type { EdgeCommitType } from '../../../../domain/commit/CommitTypes';
2
2
  import type { ColumnColorByColumn, SvgElement } from '../../../../domain/graph/GraphTypes';
3
3
  export declare function clearEndingEdgeCacheCache(): void;
4
- export declare function getEndingEdge(edgeColumn: number, nodeColumn: number, type: CommitType, columnColorByColumn: ColumnColorByColumn, columnWidth: number, gutterWidth: number, strokeWidth: number, isCompact?: boolean): SvgElement;
4
+ export declare function getEndingEdge(edgeColumn: number, nodeColumn: number, type: EdgeCommitType, columnColorByColumn: ColumnColorByColumn, columnWidth: number, gutterWidth: number, strokeWidth: number, isCompact?: boolean): SvgElement;
@@ -1,4 +1,4 @@
1
- import type { CommitType } from '../../../../domain/commit/CommitTypes';
1
+ import type { EdgeCommitType } from '../../../../domain/commit/CommitTypes';
2
2
  import type { ColumnColorByColumn, SvgElement } from '../../../../domain/graph/GraphTypes';
3
3
  export declare function clearPassThroughEdgeCache(): void;
4
- export declare function getPassThroughEdge(column: number, type: CommitType, columnColorByColumn: ColumnColorByColumn, columnWidth: number, gutterWidth: number, strokeWidth: number, isCompact?: boolean): SvgElement;
4
+ export declare function getPassThroughEdge(column: number, type: EdgeCommitType, columnColorByColumn: ColumnColorByColumn, columnWidth: number, gutterWidth: number, strokeWidth: number, isCompact?: boolean): SvgElement;
@@ -1,4 +1,4 @@
1
- import type { CommitType } from '../../../../domain/commit/CommitTypes';
1
+ import type { EdgeCommitType } from '../../../../domain/commit/CommitTypes';
2
2
  import type { ColumnColorByColumn, SvgElement } from '../../../../domain/graph/GraphTypes';
3
3
  export declare function clearStartingEdgeCache(): void;
4
- export declare function getStartingEdge(edgeColumn: number, nodeColumn: number, type: CommitType, columnColorByColumn: ColumnColorByColumn, columnWidth: number, gutterWidth: number, strokeWidth: number, isCompact?: boolean): SvgElement;
4
+ export declare function getStartingEdge(edgeColumn: number, nodeColumn: number, type: EdgeCommitType, columnColorByColumn: ColumnColorByColumn, columnWidth: number, gutterWidth: number, strokeWidth: number, isCompact?: boolean): SvgElement;
@@ -3,7 +3,7 @@ import * as React from 'react';
3
3
  import type { CommitType, Sha } from '../../../domain/commit/CommitTypes';
4
4
  import type { Style } from '../../../domain/generic/GenericTypes';
5
5
  import type { GraphZoneType } from '../../../domain/graph/GraphConstants';
6
- import type { GetExternalIcon, GraphItemContext, OnClearCurrentlyHoveredGraphCommit, OnClickCommit, OnCommitContextMenu, OnCurrentlyHoveredGraphCommit, OnDoubleClickCommit } from '../../../domain/graph/GraphTypes';
6
+ import type { GetExternalIcon, GraphItemContext, OnClearCurrentlyHoveredGraphCommit, OnClickCommit, OnCommitContextMenu, OnCurrentlyHoveredGraphCommit, OnDoubleClickCommit, ScopeBoundaryKind } from '../../../domain/graph/GraphTypes';
7
7
  import type { ChildrenElements } from '../../../domain/ui/UiTypes';
8
8
  type Props = {
9
9
  clearCurrentlyHoveredGraphCommit: OnClearCurrentlyHoveredGraphCommit;
@@ -15,6 +15,7 @@ type Props = {
15
15
  dimRowsOfSelectedCommit?: boolean;
16
16
  getExternalIcon: GetExternalIcon;
17
17
  graphZoneType: GraphZoneType;
18
+ hasActive?: boolean;
18
19
  hasAvatars?: boolean;
19
20
  highlightRowsOnRefHover: boolean;
20
21
  isDimmedMergeCommitRow: boolean;
@@ -29,6 +30,7 @@ type Props = {
29
30
  onClickCommit: OnClickCommit;
30
31
  onDoubleClickCommit: OnDoubleClickCommit;
31
32
  rowContext?: GraphItemContext | null;
33
+ scopeBoundaryKind?: ScopeBoundaryKind;
32
34
  setAsCurrentlyHoveredGraphCommit: OnCurrentlyHoveredGraphCommit;
33
35
  sha: Sha;
34
36
  showColorStrip?: boolean;
@@ -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;
@@ -2,7 +2,7 @@ import type { ReactElement } from 'react';
2
2
  import React from 'react';
3
3
  import type { CommitType, Sha } from '../../../domain/commit/CommitTypes';
4
4
  import type { Style } from '../../../domain/generic/GenericTypes';
5
- import type { GetExternalIcon, GetMissingRefMetadata, GraphItemContext, GraphRefGroup, IncludeOnlyRefsById, IncludeOnlyRemotesByName, OnClearCurrentlyHoveredGraphCommit, OnClickRef, OnDoubleClickRef, OnRefBeginDrag, OnRefCanDrag, OnRefCanDrop, OnRefDragEnter, OnRefDragLeave, OnRefDrop, OnRefEndDrag, OnRefNodeHovered, OnRefNodeUnhovered, OnRefZoneContextMenu, OnRefZoneHovered, OnRefZoneUnhovered, OnToggleRefNodesShown, RefGroupContexts, RefMetadataById, RefMetadataType } from '../../../domain/graph/GraphTypes';
5
+ import type { GetExternalIcon, GetMissingRefMetadata, GraphItemContext, GraphRefGroup, IncludeOnlyRefsById, IncludeOnlyRemotesByName, OnClearCurrentlyHoveredGraphCommit, OnClickRef, OnDoubleClickRef, OnRefBeginDrag, OnRefCanDrag, OnRefCanDrop, OnRefDragEnter, OnRefDragLeave, OnRefDrop, OnRefEndDrag, OnRefNodeHovered, OnRefNodeUnhovered, OnRefZoneContextMenu, OnRefZoneHovered, OnRefZoneUnhovered, OnToggleRefNodesShown, RefGroupContexts, RefMetadataById, RefMetadataType, ScopeBoundaryKind } from '../../../domain/graph/GraphTypes';
6
6
  import type { TranslationFn } from '../../../domain/language/LanguageTypes';
7
7
  import type { RefIconsPosition } from '../../../domain/ref/RefTypes';
8
8
  type RefZoneDefaultProps = {
@@ -12,6 +12,7 @@ type RefZoneProps = {
12
12
  column: number;
13
13
  columnForColoring?: number;
14
14
  context: GraphItemContext | null;
15
+ scopeBoundaryKind?: ScopeBoundaryKind;
15
16
  enableShowHideRefsOptions: boolean;
16
17
  showGhostRefsOnRowHover: boolean;
17
18
  getExternalIcon: GetExternalIcon;
@@ -36,10 +37,11 @@ type RefZoneProps = {
36
37
  onRefDragLeave: OnRefDragLeave;
37
38
  onRefDrop: OnRefDrop;
38
39
  onRefEndDrag: OnRefEndDrag;
40
+ pinnedBranchFullName?: string | null;
39
41
  refGroupContexts: RefGroupContexts | null;
40
42
  refGroupsByName: GraphRefGroup[];
41
43
  refIconsPosition: RefIconsPosition;
42
- refMetadata: RefMetadataById | null;
44
+ refMetadata: RefMetadataById | null | undefined;
43
45
  fallbackRefMetadata?: RefMetadataById | null;
44
46
  refNodeHovered: OnRefNodeHovered;
45
47
  refNodeUnhovered: OnRefNodeUnhovered;
@@ -60,7 +62,7 @@ type RefZoneProps = {
60
62
  currentlyHoveredCommitSha: Sha | null;
61
63
  };
62
64
  export default class RefZone extends React.PureComponent<RefZoneProps> {
63
- popoverTargetRef: React.RefObject<HTMLDivElement>;
65
+ popoverTargetRef: React.RefObject<HTMLDivElement | null>;
64
66
  static defaultProps: RefZoneDefaultProps;
65
67
  componentDidUpdate(nextProps: RefZoneProps): void;
66
68
  onCustomToggleRefNodesShown: OnToggleRefNodesShown;
@@ -2,12 +2,13 @@ import type { GridCellRenderer } from 'react-virtualized';
2
2
  import type { GraphCommitDescDisplayMode } from '../../../domain/graph/GraphConstants';
3
3
  import type { CommonGraphRowDispatchProps, CommonGraphRowProps, OnCommitMessageChange, OnWipMessageBlur, OnWipMessageFocus } from '../../../domain/graph/GraphTypes';
4
4
  import type { GetRealKeyForCellFunc } from '../../../domain/reactvirtualized/ReactVirtualizedHelpers';
5
- import type { WorkDirStats } from '../../../domain/workdir/WorkDirTypes';
5
+ import type { WipNodeMetadataBySha, WorkDirStats } from '../../../domain/workdir/WorkDirTypes';
6
6
  interface StateProps {
7
7
  graphCommitDescDisplayMode: GraphCommitDescDisplayMode;
8
8
  isCommitting: boolean;
9
9
  pendingCommitMessageSummary: string;
10
10
  workDirStats?: WorkDirStats;
11
+ wipNodeMetadataBySha?: WipNodeMetadataBySha;
11
12
  wipMessageEditable: boolean;
12
13
  }
13
14
  interface DispatchProps {
@@ -1,9 +1,11 @@
1
1
  import type { GridCellRenderer } from 'react-virtualized';
2
2
  import type { AvatarUrlByEmail, ColumnColorByColumn, CommonGraphRowDispatchProps, CommonGraphRowProps, GetMissingAvatar, GraphZoneModeConstants, NodeOffsetByColumn, NodeOpacityByColumn } from '../../../domain/graph/GraphTypes';
3
3
  import type { GetRealKeyForCellFunc } from '../../../domain/reactvirtualized/ReactVirtualizedHelpers';
4
+ import type { WipNodeMetadataBySha } from '../../../domain/workdir/WorkDirTypes';
4
5
  interface OwnProps {
5
6
  avatarUrlByEmail: AvatarUrlByEmail;
6
7
  graphZoneModeConstants: GraphZoneModeConstants;
8
+ wipNodeMetadataBySha?: WipNodeMetadataBySha;
7
9
  height: number;
8
10
  onMissingAvatar: GetMissingAvatar;
9
11
  columnColorByColumn: ColumnColorByColumn;
@@ -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;
@@ -1,5 +1,5 @@
1
- import type { Author, CommitType, Sha, ShortSha } from './CommitTypes';
2
- export declare const hasPendingChanges: (type: CommitType) => boolean;
1
+ import type { Author, EdgeCommitType, Sha, ShortSha } from './CommitTypes';
2
+ export declare const hasPendingChanges: (type: EdgeCommitType) => boolean;
3
3
  export declare const getShortSha: (sha?: Sha | null, shaLength?: number) => ShortSha;
4
4
  export declare function getCommitMessageDescription(commitMessage: string, lineEnding?: string): string;
5
5
  export declare function getCommitMessageCoauthors(commitMessageDescription: string): Author[];
@@ -3,6 +3,7 @@ export type Sha = string;
3
3
  export type ShortSha = string;
4
4
  export type WorkDirType = typeof mergeConflictNodeType | typeof unsupportedRebaseWarningNodeType | typeof workDirType;
5
5
  export type CommitType = typeof commitNodeType | typeof mergeNodeType | typeof stashNodeType | WorkDirType;
6
+ export type EdgeCommitType = CommitType | 'synthetic-edge';
6
7
  export type Author = {
7
8
  name: string;
8
9
  email: string;
@@ -1,10 +1,10 @@
1
- import type { CommitType } from '../commit/CommitTypes';
1
+ import type { EdgeCommitType } from '../commit/CommitTypes';
2
2
  import type { ColumnColor, LineSvgProps, RowEdges, SvgElement, SvgElementName, SvgProps, SvgStyles } from '../graph/GraphTypes';
3
3
  export declare function getXValueAtColumn(column: number, columnWidth: number, gutterWidth: number, isCompact?: boolean): number;
4
4
  export declare function clearXValueAtColumnCache(): void;
5
5
  export declare function getSvgElement(element: SvgElementName, props: SvgProps): SvgElement;
6
6
  export declare function getLineElement(props: LineSvgProps): SvgElement;
7
- export declare function getSvgStyles(type: CommitType, color: ColumnColor, strokeWidth: number, isCompact?: boolean): SvgStyles;
8
- export declare function buildStartingOrEndingEdgeHash(edgeColumn: number, nodeColumn: number, type: CommitType | undefined, isCompact?: boolean): string;
9
- export declare function buildPassThroughEdgeHash(column: number, type: CommitType | undefined, isCompact?: boolean): string;
7
+ export declare function getSvgStyles(type: EdgeCommitType, color: ColumnColor, strokeWidth: number, isCompact?: boolean): SvgStyles;
8
+ export declare function buildStartingOrEndingEdgeHash(edgeColumn: number, nodeColumn: number, type: EdgeCommitType | undefined, isCompact?: boolean): string;
9
+ export declare function buildPassThroughEdgeHash(column: number, type: EdgeCommitType | undefined, isCompact?: boolean): string;
10
10
  export declare function buildEdgeHash(edges: RowEdges, edgeColumnMax: number, nodeColumn: number, isCompact?: boolean): string;
@@ -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;
@@ -89,7 +91,7 @@ export declare enum GraphColumnMode {
89
91
  Rich = "rich",
90
92
  Text = "text"
91
93
  }
92
- export type GraphMarkerType = 'head' | 'highlights' | 'localBranches' | 'pullRequests' | 'remoteBranches' | 'selection' | 'stashes' | 'tags' | 'upstream';
94
+ export type GraphMarkerType = 'head' | 'highlights' | 'localBranches' | 'pullRequests' | 'remoteBranches' | 'selection' | 'stashes' | 'tags' | 'upstream' | 'wip';
93
95
  export declare enum GraphMarkerShape {
94
96
  Block = "block",
95
97
  FullLine = "fullLine",
@@ -0,0 +1,34 @@
1
+ import type { Sha } from '../commit/CommitTypes';
2
+ import type { EdgeByColumn, ProcessedGraphRow, RowEdges } from './GraphTypes';
3
+ /**
4
+ * Derives the ending/passThrough edges that the current row inherits from the previous row's
5
+ * edge state. For each column the previous row occupied, the inherited edge is either:
6
+ * - an ending, if its parentSha matches the current row's sha
7
+ * - a passThrough, otherwise
8
+ *
9
+ * Between a concurrent passThrough and starting in the same column (which can happen when a
10
+ * chain above passes through a row that also starts a new edge in the same lane), we prefer
11
+ * the non-pending (real commit/merge) edge so that a WIP/synthetic edge doesn't shadow a
12
+ * real commit chain mid-flight. The bare fallback still carries pending edges forward when
13
+ * that's the only thing available.
14
+ */
15
+ export declare function getEndingAndPassThroughEdgesByColumnFromPrevRow(currentSha: Sha, prevRowEdges: RowEdges): RowEdges;
16
+ /**
17
+ * Builds the set of starting edges for a row — one per parent it points to. Edges for rows
18
+ * in `syntheticEdgeChildShas` are tagged `synthetic-edge` so the renderer draws them wavy.
19
+ *
20
+ * `columnBySha` maps already-processed shas to their assigned column. This is used for the
21
+ * non-first parents of a row (which reserve lanes beside the row's own column). The first
22
+ * parent lives on the current row's own column.
23
+ */
24
+ export declare function getStartingEdgesByColumn(currentRow: ProcessedGraphRow, columnBySha: (sha: Sha) => number | undefined, syntheticEdgeChildShas: Set<Sha>): EdgeByColumn;
25
+ /**
26
+ * Composes the full edge state for a row: inherited ending/passThrough edges from the prev
27
+ * row merged with this row's own starting edges.
28
+ */
29
+ export declare function getFinalEdgeStateForGraphAndRow(currentRow: ProcessedGraphRow, prevRowEdges: RowEdges, columnBySha: (sha: Sha) => number | undefined, syntheticEdgeChildShas: Set<Sha>): RowEdges;
30
+ /**
31
+ * Returns the highest column index present in an edges map. Edges render from column 0 up
32
+ * to (inclusive) this value, so the caller uses it as a loop bound when emitting SVG.
33
+ */
34
+ export declare function getEdgeColumnMax(edges: RowEdges | undefined | null): number;
@@ -9,6 +9,11 @@ import { GraphColumnMode } from './GraphConstants';
9
9
  import type { BaseMetadata, ExternalIconKeys, GetMissingRefMetadata, GraphColumnWidthConstraints, GraphItemContext, GraphRef, GraphRefGroup, GraphRow, GraphZoneModeConstants, Head, HighlightedShas, ProcessedGraphRow, ProcessedGraphRowBySha, Ref, RefMetadata, RefMetadataById, RefMetadataType, RowStatsConstraints } from './GraphTypes';
10
10
  export type DebouncableFn = (...args: any) => void;
11
11
  export type DebouncedFn = (...args: any) => void;
12
+ export type CachedRowVisibilityState = {
13
+ hasBaseFilteredTags: boolean;
14
+ hasFilteredBranches: boolean;
15
+ };
16
+ export declare function getVisibleRowShasWithoutStashAnchoring(graphRows: GraphRow[], cachedRowVisibilityByIndex: CachedRowVisibilityState[], tagsRequireBranchOrVisibleChild: boolean): Set<Sha>;
12
17
  export declare const debounceFrame: (func: DebouncableFn) => DebouncedFn;
13
18
  export type ThrottleableFn = (...args: any) => void;
14
19
  export type ThrottledFn = (...args: any) => void;
@@ -17,7 +22,7 @@ export declare function hasScrolledToBottom(htmlElement: HTMLElement): boolean;
17
22
  export declare function hasScrolledToRight(htmlElement: HTMLElement): boolean;
18
23
  export declare function parseContext(context?: GraphItemContext | null): string | null;
19
24
  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;
25
+ export declare function getOrAskForRefMetadata(ref: GraphRef, refMetadata: RefMetadataById | undefined | null, onMissingRefMetadata: GetMissingRefMetadata, refMetadataType?: RefMetadataType, fallbackRefMetadata?: RefMetadataById | null): RefMetadata | BaseMetadata | BaseMetadata[] | null | undefined;
21
26
  export declare function getTimelineLabelAndValue(diffMs: number): {
22
27
  label: string;
23
28
  value: number;
@@ -65,6 +70,7 @@ export declare function getHeadRefShaFromGraphRows(graphRows: GraphRow[]): Sha |
65
70
  export declare function isWorkDirNodeType(nodeType: CommitType): boolean;
66
71
  export declare function isCommitNodeType(nodeType: CommitType): boolean;
67
72
  export declare function workDirStatsHaveChanges(workDirStats?: WorkDirStats): boolean;
73
+ export declare function shouldShowWorkDirRow(workDirStats: WorkDirStats | undefined, wipVisibility: 'always' | 'auto' | undefined): boolean;
68
74
  export declare function hasSingleSelectedSha(selectedShas: Set<Sha>): boolean;
69
75
  export declare function isSingleSelected(selectedShas: Set<Sha>, sha: Sha): boolean;
70
76
  export declare function getScrollToAlignment(rowHeight: number, clientHeight: number, scrollTop: number, scrollToIndex: number): Alignment;