@gearbox-protocol/ui-kit 4.0.0-next.57 → 4.0.0-next.58
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/cjs/components/graph/graph.cjs +1 -1
- package/dist/cjs/components/graph/index.cjs +1 -1
- package/dist/cjs/components/index.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/esm/components/graph/graph.js +488 -478
- package/dist/esm/components/graph/index.js +18 -17
- package/dist/esm/components/index.js +323 -322
- package/dist/esm/index.js +410 -409
- package/dist/types/components/graph/graph.d.ts +25 -4
- package/package.json +1 -1
|
@@ -31,6 +31,27 @@ export interface SeriesConfig {
|
|
|
31
31
|
}
|
|
32
32
|
/** Chart-instance key: stable `id` when set, otherwise the display `label`. */
|
|
33
33
|
export declare function seriesIdentity(series: Pick<SeriesConfig, "id" | "label">): string;
|
|
34
|
+
export interface VisibleLogicalRangeInput {
|
|
35
|
+
readonly lastIndex: number;
|
|
36
|
+
readonly width: number;
|
|
37
|
+
readonly padLeft: boolean;
|
|
38
|
+
readonly padRight: boolean;
|
|
39
|
+
readonly paddingPx?: number;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Logical range that shows every bar, plus optional plot-area air so a
|
|
43
|
+
* centred `dd MMM` date label is not clipped by the frame.
|
|
44
|
+
*
|
|
45
|
+
* Computed from the point count rather than `getVisibleLogicalRange()`:
|
|
46
|
+
* `setVisibleRange` in lightweight-charts is applied on the next animation
|
|
47
|
+
* frame, so reading the scale back immediately returns the previous (or
|
|
48
|
+
* default `barSpacing: 6`) window and a follow-up `setVisibleLogicalRange`
|
|
49
|
+
* would replace the full-period request with a truncated one.
|
|
50
|
+
*/
|
|
51
|
+
export declare function visibleLogicalRangeFor({ lastIndex, width, padLeft, padRight, paddingPx, }: VisibleLogicalRangeInput): {
|
|
52
|
+
from: number;
|
|
53
|
+
to: number;
|
|
54
|
+
} | null;
|
|
34
55
|
export type VerticalLineOptions = Partial<{
|
|
35
56
|
color: string;
|
|
36
57
|
labelText: string;
|
|
@@ -206,10 +227,10 @@ export interface GraphProps {
|
|
|
206
227
|
*/
|
|
207
228
|
yScaleMinMultiple?: number;
|
|
208
229
|
/**
|
|
209
|
-
* Minimum visible time (unix seconds).
|
|
210
|
-
*
|
|
211
|
-
*
|
|
212
|
-
*
|
|
230
|
+
* Minimum visible time (unix seconds). When set, leading whitespace is
|
|
231
|
+
* injected so a later-starting series still occupies the selected window.
|
|
232
|
+
* It does not change the logical range applied below: `timeToIndex` with
|
|
233
|
+
* `findNearest` already snaps a time before the first point to index 0.
|
|
213
234
|
*/
|
|
214
235
|
visibleTimeFrom?: number;
|
|
215
236
|
/**
|