@gitkraken/gitkraken-components 13.0.0-vnext.32 → 13.0.0-vnext.34
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/components/graph/rowAdornment/WipStatsPillLayer.d.ts +23 -0
- package/dist/components/graph/rowAdornment/WipStatsPillOverlay.d.ts +22 -0
- package/dist/domain/graph/rowAdornment/RowAdornmentHelpers.d.ts +16 -0
- package/dist/index.js +7 -7
- package/dist/styles.css +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { Sha } from '../../../domain/commit/CommitTypes';
|
|
3
|
+
import type { GetExternalIcon, ProcessedGraphRow } from '../../../domain/graph/GraphTypes';
|
|
4
|
+
import type { TranslationFn } from '../../../domain/language/LanguageTypes';
|
|
5
|
+
import type { WipNodeMetadataBySha, WorkDirStats } from '../../../domain/workdir/WorkDirTypes';
|
|
6
|
+
interface WipStatsPillLayerProps {
|
|
7
|
+
getVisibleRows: () => ProcessedGraphRow[];
|
|
8
|
+
selectedShas: Set<Sha>;
|
|
9
|
+
hoveredSha?: Sha;
|
|
10
|
+
hasVerticalScrollbar?: boolean;
|
|
11
|
+
workDirStats?: WorkDirStats;
|
|
12
|
+
wipNodeMetadataBySha?: WipNodeMetadataBySha;
|
|
13
|
+
wipMessageEditable: boolean;
|
|
14
|
+
getExternalIcon: GetExternalIcon;
|
|
15
|
+
translate: TranslationFn;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Renders a row-anchored WIP stats pill overlay for each visible WIP row.
|
|
19
|
+
* Mirrors the structure of `RowAdornmentLayer` but is purely render-driven —
|
|
20
|
+
* no provider, cache, or async resolution.
|
|
21
|
+
*/
|
|
22
|
+
declare function WipStatsPillLayer({ getVisibleRows, selectedShas, hoveredSha, hasVerticalScrollbar, workDirStats, wipNodeMetadataBySha, wipMessageEditable, getExternalIcon, translate, }: WipStatsPillLayerProps): React.ReactElement | null;
|
|
23
|
+
export default WipStatsPillLayer;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { Sha } from '../../../domain/commit/CommitTypes';
|
|
3
|
+
import type { GetExternalIcon } from '../../../domain/graph/GraphTypes';
|
|
4
|
+
import type { TranslationFn } from '../../../domain/language/LanguageTypes';
|
|
5
|
+
import type { WorkDirStats } from '../../../domain/workdir/WorkDirTypes';
|
|
6
|
+
interface WipStatsPillOverlayProps {
|
|
7
|
+
sha: Sha;
|
|
8
|
+
workDirStats: WorkDirStats;
|
|
9
|
+
getExternalIcon: GetExternalIcon;
|
|
10
|
+
translate: TranslationFn;
|
|
11
|
+
isHovered?: boolean;
|
|
12
|
+
isSelected?: boolean;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Renders the WIP stats pill as a row-anchored overlay at the right edge of the row,
|
|
16
|
+
* escaping the message column's clipping. The pill's right edge is anchored to the row
|
|
17
|
+
* adornment's left edge (when present) so the pill shifts left as adornments appear;
|
|
18
|
+
* when no adornment is mounted, `anchor()` falls back to the CSS-controlled default
|
|
19
|
+
* right offset.
|
|
20
|
+
*/
|
|
21
|
+
declare function WipStatsPillOverlay({ sha, workDirStats, getExternalIcon, translate, isHovered, isSelected, }: WipStatsPillOverlayProps): React.ReactElement;
|
|
22
|
+
export default WipStatsPillOverlay;
|
|
@@ -1,4 +1,13 @@
|
|
|
1
|
+
import type { CSSProperties } from 'react';
|
|
1
2
|
import type { Sha } from '../../commit/CommitTypes';
|
|
3
|
+
/**
|
|
4
|
+
* `CSSProperties` extended with CSS anchor-positioning properties that React's typings
|
|
5
|
+
* don't yet ship. Used by overlays that participate in the row-anchor system.
|
|
6
|
+
*/
|
|
7
|
+
export interface AnchorCSSProperties extends CSSProperties {
|
|
8
|
+
anchorName?: string;
|
|
9
|
+
positionAnchor?: string;
|
|
10
|
+
}
|
|
2
11
|
/**
|
|
3
12
|
* Builds the CSS `<dashed-ident>` used to tie a graph row's `anchor-name`
|
|
4
13
|
* to the overlay's `position-anchor`. Shas are arbitrary caller-provided
|
|
@@ -12,3 +21,10 @@ import type { Sha } from '../../commit/CommitTypes';
|
|
|
12
21
|
* already legal inside a CSS ident and pass through unchanged.
|
|
13
22
|
*/
|
|
14
23
|
export declare function getRowAnchorName(sha: Sha): string;
|
|
24
|
+
/**
|
|
25
|
+
* Per-sha anchor for the rendered row adornment overlay. Used by sibling overlays
|
|
26
|
+
* (e.g. the WIP stats pill) to position themselves to the LEFT of the adornment via
|
|
27
|
+
* `right: anchor(<this-name> left, <fallback>)`. When no adornment is mounted for the
|
|
28
|
+
* sha, the anchor doesn't exist and consumers fall back to the supplied default.
|
|
29
|
+
*/
|
|
30
|
+
export declare function getRowAdornmentAnchorName(sha: Sha): string;
|