@weng-lab/visualization 1.2.2 → 1.2.3

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.
@@ -0,0 +1,4 @@
1
+ import { HeatmapProps } from './types';
2
+ declare const Heatmap: ({ data, onClick, ref, downloadFileName, colors, xLabel, yLabel, tooltipBody, margin, gap, isRect, }: HeatmapProps) => import("react/jsx-runtime").JSX.Element;
3
+ export default Heatmap;
4
+ //# sourceMappingURL=Heatmap.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Heatmap.d.ts","sourceRoot":"","sources":["../../../../src/components/Heatmap/Heatmap.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAyB,MAAM,SAAS,CAAC;AASnE,QAAA,MAAM,OAAO,GAAI,qGAYd,YAAY,4CAoOd,CAAC;AAEF,eAAe,OAAO,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { default as Heatmap } from './Heatmap';
2
+ export { Heatmap };
3
+ export type * from './types';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Heatmap/index.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,WAAW,CAAA;AAC/B,OAAO,EAAE,OAAO,EAAE,CAAA;AAClB,mBAAmB,SAAS,CAAA"}
@@ -0,0 +1,36 @@
1
+ import { ReactElement } from 'react';
2
+ import { DownloadPlotHandle } from '../../utility';
3
+ import { RectCell } from '@visx/heatmap/lib/heatmaps/HeatmapRect';
4
+ import { CircleCell } from '@visx/heatmap/lib/heatmaps/HeatmapCircle';
5
+ export type RowDatum<R extends object = Record<string, unknown>> = {
6
+ rowName: string;
7
+ count: number;
8
+ metadata?: R;
9
+ };
10
+ export type ColumnDatum<C extends object = Record<string, unknown>, R extends object = Record<string, unknown>> = {
11
+ columnName: string;
12
+ rows: RowDatum<R>[];
13
+ metadata?: C;
14
+ };
15
+ export type HeatmapProps<C extends object = Record<string, unknown>, R extends object = Record<string, unknown>> = {
16
+ data: ColumnDatum<C, R>[];
17
+ onClick?: (bin: RectCell<ColumnDatum, RowDatum> | CircleCell<ColumnDatum, RowDatum>) => void;
18
+ ref?: React.Ref<DownloadPlotHandle>;
19
+ downloadFileName?: string;
20
+ /**
21
+ * Colors for the gradient. At least two required for the gradient, additional can be passed to define midpoints.
22
+ */
23
+ colors: [string, string, ...string[]];
24
+ xLabel?: string;
25
+ yLabel?: string;
26
+ tooltipBody?: (bin: RectCell<ColumnDatum, RowDatum> | CircleCell<ColumnDatum, RowDatum>) => ReactElement;
27
+ gap?: number;
28
+ isRect?: boolean;
29
+ margin?: {
30
+ top: number;
31
+ right: number;
32
+ bottom: number;
33
+ left: number;
34
+ };
35
+ };
36
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/Heatmap/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,0CAA0C,CAAC;AAoBtE,MAAM,MAAM,QAAQ,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI;IAC/D,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,CAAC,CAAC;CAChB,CAAA;AAED,MAAM,MAAM,WAAW,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC,SAAS,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI;IAC9G,UAAU,EAAE,MAAM,CAAC;IACnB,IAA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"Visualization components for the Weng/Moore Labs suite of genomics web resources",
5
5
  "type": "module",
6
6
  "module": "dist/visualization.es.js",