@dskripchenko/ui 1.9.0 → 1.10.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.
@@ -22,8 +22,8 @@ declare const __VLS_component: import('vue').DefineComponent<UidGridProps, {}, {
22
22
  as: string;
23
23
  justify: "start" | "center" | "end" | "stretch";
24
24
  gap: string;
25
- align: "start" | "center" | "end" | "stretch";
26
25
  cols: number | string;
26
+ align: "start" | "center" | "end" | "stretch";
27
27
  rowGap: string;
28
28
  colGap: string;
29
29
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
@@ -0,0 +1,68 @@
1
+ import { HeatmapColorScaleName } from './colorScales.js';
2
+ export interface HeatmapMatrixCell {
3
+ row: string;
4
+ col: string;
5
+ rowIndex: number;
6
+ colIndex: number;
7
+ value: number | null;
8
+ }
9
+ export type HeatmapMatrixColLabels = 'auto' | 'horizontal' | 'rotated';
10
+ export interface UidHeatmapMatrixProps {
11
+ rows: string[];
12
+ cols: string[];
13
+ values: ReadonlyArray<ReadonlyArray<number | null | undefined>>;
14
+ colorScale?: HeatmapColorScaleName | (string & {}) | string[];
15
+ min?: number;
16
+ max?: number;
17
+ formatValue?: (value: number) => string;
18
+ cellHeight?: number;
19
+ minCellWidth?: number;
20
+ gap?: number;
21
+ colLabels?: HeatmapMatrixColLabels;
22
+ showLegend?: boolean;
23
+ ariaLabel?: string;
24
+ }
25
+ declare function __VLS_template(): {
26
+ attrs: Partial<{}>;
27
+ slots: Readonly<{
28
+ tooltip?(props: {
29
+ cell: HeatmapMatrixCell;
30
+ formatted: string;
31
+ }): unknown;
32
+ }> & {
33
+ tooltip?(props: {
34
+ cell: HeatmapMatrixCell;
35
+ formatted: string;
36
+ }): unknown;
37
+ };
38
+ refs: {
39
+ rootRef: HTMLDivElement;
40
+ rowHeaderRef: HTMLDivElement;
41
+ tooltipRef: HTMLDivElement;
42
+ };
43
+ rootEl: HTMLDivElement;
44
+ };
45
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
46
+ declare const __VLS_component: import('vue').DefineComponent<UidHeatmapMatrixProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<UidHeatmapMatrixProps> & Readonly<{}>, {
47
+ min: number;
48
+ max: number;
49
+ formatValue: (value: number) => string;
50
+ ariaLabel: string;
51
+ gap: number;
52
+ showLegend: boolean;
53
+ colorScale: HeatmapColorScaleName | (string & {}) | string[];
54
+ cellHeight: number;
55
+ minCellWidth: number;
56
+ colLabels: HeatmapMatrixColLabels;
57
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
58
+ rootRef: HTMLDivElement;
59
+ rowHeaderRef: HTMLDivElement;
60
+ tooltipRef: HTMLDivElement;
61
+ }, HTMLDivElement>;
62
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
63
+ export default _default;
64
+ type __VLS_WithTemplateSlots<T, S> = T & {
65
+ new (): {
66
+ $slots: S;
67
+ };
68
+ };
@@ -0,0 +1,8 @@
1
+ export type HeatmapColorScaleName = 'default' | 'viridis' | 'magma' | 'plasma' | 'inferno' | 'blues' | 'greens' | 'reds';
2
+ export declare const HEATMAP_DEFAULT_LOW = "color-mix(in srgb, var(--uid-heatmap-matrix-color) 14%, var(--uid-color-bg))";
3
+ export declare const HEATMAP_DEFAULT_HIGH = "var(--uid-heatmap-matrix-color)";
4
+ export declare const heatmapColorScales: Record<HeatmapColorScaleName, readonly string[]>;
5
+ export declare function isHeatmapColorScaleName(value: string): value is HeatmapColorScaleName;
6
+ export declare function resolveHeatmapStops(scale: string | readonly string[] | undefined): string[];
7
+ export declare function heatmapColorAt(stops: readonly string[], t: number): string;
8
+ export declare function heatmapGradient(stops: readonly string[]): string;
@@ -1,2 +1,6 @@
1
1
  export { default as UidHeatmap } from './UidHeatmap.vue';
2
2
  export type { UidHeatmapProps, HeatmapPoint } from './UidHeatmap.vue';
3
+ export { default as UidHeatmapMatrix } from './UidHeatmapMatrix.vue';
4
+ export type { UidHeatmapMatrixProps, HeatmapMatrixCell, HeatmapMatrixColLabels } from './UidHeatmapMatrix.vue';
5
+ export { heatmapColorScales, resolveHeatmapStops, heatmapColorAt } from './colorScales.js';
6
+ export type { HeatmapColorScaleName } from './colorScales.js';