react-cheminfo 0.15.0 → 0.16.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.
Files changed (142) hide show
  1. package/README.md +96 -0
  2. package/lib/core.d.ts +1 -0
  3. package/lib/core.d.ts.map +1 -1
  4. package/lib/core.js +1 -0
  5. package/lib/core.js.map +1 -1
  6. package/lib/credits/core/credits.d.ts +17 -0
  7. package/lib/credits/core/credits.d.ts.map +1 -1
  8. package/lib/credits/core/credits.js +20 -0
  9. package/lib/credits/core/credits.js.map +1 -1
  10. package/lib/ecosystem/core/sites.d.ts.map +1 -1
  11. package/lib/ecosystem/core/sites.js +40 -0
  12. package/lib/ecosystem/core/sites.js.map +1 -1
  13. package/lib/ecosystem/core/types.d.ts +1 -1
  14. package/lib/ecosystem/core/types.d.ts.map +1 -1
  15. package/lib/ecosystem/ui/glyphs.d.ts.map +1 -1
  16. package/lib/ecosystem/ui/glyphs.js +11 -0
  17. package/lib/ecosystem/ui/glyphs.js.map +1 -1
  18. package/lib/parallel/core/index.d.ts +27 -0
  19. package/lib/parallel/core/index.d.ts.map +1 -0
  20. package/lib/parallel/core/index.js +20 -0
  21. package/lib/parallel/core/index.js.map +1 -0
  22. package/lib/parallel/core/parallelAxes.d.ts +103 -0
  23. package/lib/parallel/core/parallelAxes.d.ts.map +1 -0
  24. package/lib/parallel/core/parallelAxes.js +146 -0
  25. package/lib/parallel/core/parallelAxes.js.map +1 -0
  26. package/lib/parallel/core/parallelBrush.d.ts +79 -0
  27. package/lib/parallel/core/parallelBrush.d.ts.map +1 -0
  28. package/lib/parallel/core/parallelBrush.js +99 -0
  29. package/lib/parallel/core/parallelBrush.js.map +1 -0
  30. package/lib/parallel/core/parallelExtent.d.ts +28 -0
  31. package/lib/parallel/core/parallelExtent.d.ts.map +1 -0
  32. package/lib/parallel/core/parallelExtent.js +47 -0
  33. package/lib/parallel/core/parallelExtent.js.map +1 -0
  34. package/lib/parallel/core/parallelFilter.d.ts +36 -0
  35. package/lib/parallel/core/parallelFilter.d.ts.map +1 -0
  36. package/lib/parallel/core/parallelFilter.js +74 -0
  37. package/lib/parallel/core/parallelFilter.js.map +1 -0
  38. package/lib/parallel/core/parallelHit.d.ts +47 -0
  39. package/lib/parallel/core/parallelHit.d.ts.map +1 -0
  40. package/lib/parallel/core/parallelHit.js +81 -0
  41. package/lib/parallel/core/parallelHit.js.map +1 -0
  42. package/lib/parallel/core/parallelPaint.d.ts +104 -0
  43. package/lib/parallel/core/parallelPaint.d.ts.map +1 -0
  44. package/lib/parallel/core/parallelPaint.js +160 -0
  45. package/lib/parallel/core/parallelPaint.js.map +1 -0
  46. package/lib/parallel/core/parallelPalette.d.ts +31 -0
  47. package/lib/parallel/core/parallelPalette.d.ts.map +1 -0
  48. package/lib/parallel/core/parallelPalette.js +68 -0
  49. package/lib/parallel/core/parallelPalette.js.map +1 -0
  50. package/lib/parallel/core/parallelTicks.d.ts +34 -0
  51. package/lib/parallel/core/parallelTicks.d.ts.map +1 -0
  52. package/lib/parallel/core/parallelTicks.js +116 -0
  53. package/lib/parallel/core/parallelTicks.js.map +1 -0
  54. package/lib/parallel/core/parallelTypes.d.ts +129 -0
  55. package/lib/parallel/core/parallelTypes.d.ts.map +1 -0
  56. package/lib/parallel/core/parallelTypes.js +29 -0
  57. package/lib/parallel/core/parallelTypes.js.map +1 -0
  58. package/lib/parallel/ui/ParallelAxesLayer.d.ts +28 -0
  59. package/lib/parallel/ui/ParallelAxesLayer.d.ts.map +1 -0
  60. package/lib/parallel/ui/ParallelAxesLayer.js +29 -0
  61. package/lib/parallel/ui/ParallelAxesLayer.js.map +1 -0
  62. package/lib/parallel/ui/ParallelCoordinates.d.ts +21 -0
  63. package/lib/parallel/ui/ParallelCoordinates.d.ts.map +1 -0
  64. package/lib/parallel/ui/ParallelCoordinates.js +109 -0
  65. package/lib/parallel/ui/ParallelCoordinates.js.map +1 -0
  66. package/lib/parallel/ui/ParallelLabels.d.ts +26 -0
  67. package/lib/parallel/ui/ParallelLabels.d.ts.map +1 -0
  68. package/lib/parallel/ui/ParallelLabels.js +25 -0
  69. package/lib/parallel/ui/ParallelLabels.js.map +1 -0
  70. package/lib/parallel/ui/ParallelTooltip.d.ts +26 -0
  71. package/lib/parallel/ui/ParallelTooltip.d.ts.map +1 -0
  72. package/lib/parallel/ui/ParallelTooltip.js +30 -0
  73. package/lib/parallel/ui/ParallelTooltip.js.map +1 -0
  74. package/lib/parallel/ui/index.d.ts +25 -0
  75. package/lib/parallel/ui/index.d.ts.map +1 -0
  76. package/lib/parallel/ui/index.js +18 -0
  77. package/lib/parallel/ui/index.js.map +1 -0
  78. package/lib/parallel/ui/parallelCoordinatesProps.d.ts +185 -0
  79. package/lib/parallel/ui/parallelCoordinatesProps.d.ts.map +1 -0
  80. package/lib/parallel/ui/parallelCoordinatesProps.js +11 -0
  81. package/lib/parallel/ui/parallelCoordinatesProps.js.map +1 -0
  82. package/lib/parallel/ui/parallelGestureModel.d.ts +52 -0
  83. package/lib/parallel/ui/parallelGestureModel.d.ts.map +1 -0
  84. package/lib/parallel/ui/parallelGestureModel.js +80 -0
  85. package/lib/parallel/ui/parallelGestureModel.js.map +1 -0
  86. package/lib/parallel/ui/parallelInk.d.ts +76 -0
  87. package/lib/parallel/ui/parallelInk.d.ts.map +1 -0
  88. package/lib/parallel/ui/parallelInk.js +113 -0
  89. package/lib/parallel/ui/parallelInk.js.map +1 -0
  90. package/lib/parallel/ui/parallelPlotModel.d.ts +55 -0
  91. package/lib/parallel/ui/parallelPlotModel.d.ts.map +1 -0
  92. package/lib/parallel/ui/parallelPlotModel.js +113 -0
  93. package/lib/parallel/ui/parallelPlotModel.js.map +1 -0
  94. package/lib/parallel/ui/parallelStyles.d.ts +83 -0
  95. package/lib/parallel/ui/parallelStyles.d.ts.map +1 -0
  96. package/lib/parallel/ui/parallelStyles.js +131 -0
  97. package/lib/parallel/ui/parallelStyles.js.map +1 -0
  98. package/lib/parallel/ui/useParallelCanvas.d.ts +49 -0
  99. package/lib/parallel/ui/useParallelCanvas.d.ts.map +1 -0
  100. package/lib/parallel/ui/useParallelCanvas.js +58 -0
  101. package/lib/parallel/ui/useParallelCanvas.js.map +1 -0
  102. package/lib/parallel/ui/useParallelGesture.d.ts +67 -0
  103. package/lib/parallel/ui/useParallelGesture.d.ts.map +1 -0
  104. package/lib/parallel/ui/useParallelGesture.js +139 -0
  105. package/lib/parallel/ui/useParallelGesture.js.map +1 -0
  106. package/lib/structure/ui/useToolbarFloor.d.ts.map +1 -1
  107. package/lib/structure/ui/useToolbarFloor.js +29 -22
  108. package/lib/structure/ui/useToolbarFloor.js.map +1 -1
  109. package/lib/ui.d.ts +1 -0
  110. package/lib/ui.d.ts.map +1 -1
  111. package/lib/ui.js +1 -0
  112. package/lib/ui.js.map +1 -1
  113. package/package.json +1 -1
  114. package/src/core.ts +1 -0
  115. package/src/credits/core/credits.ts +21 -0
  116. package/src/ecosystem/core/sites.ts +40 -0
  117. package/src/ecosystem/core/types.ts +4 -1
  118. package/src/ecosystem/ui/glyphs.tsx +46 -0
  119. package/src/parallel/core/index.ts +80 -0
  120. package/src/parallel/core/parallelAxes.ts +207 -0
  121. package/src/parallel/core/parallelBrush.ts +145 -0
  122. package/src/parallel/core/parallelExtent.ts +56 -0
  123. package/src/parallel/core/parallelFilter.ts +94 -0
  124. package/src/parallel/core/parallelHit.ts +106 -0
  125. package/src/parallel/core/parallelPaint.ts +231 -0
  126. package/src/parallel/core/parallelPalette.ts +80 -0
  127. package/src/parallel/core/parallelTicks.ts +164 -0
  128. package/src/parallel/core/parallelTypes.ts +147 -0
  129. package/src/parallel/ui/ParallelAxesLayer.tsx +123 -0
  130. package/src/parallel/ui/ParallelCoordinates.tsx +233 -0
  131. package/src/parallel/ui/ParallelLabels.tsx +56 -0
  132. package/src/parallel/ui/ParallelTooltip.tsx +55 -0
  133. package/src/parallel/ui/index.ts +50 -0
  134. package/src/parallel/ui/parallelCoordinatesProps.ts +199 -0
  135. package/src/parallel/ui/parallelGestureModel.ts +109 -0
  136. package/src/parallel/ui/parallelInk.ts +182 -0
  137. package/src/parallel/ui/parallelPlotModel.ts +130 -0
  138. package/src/parallel/ui/parallelStyles.ts +146 -0
  139. package/src/parallel/ui/useParallelCanvas.ts +104 -0
  140. package/src/parallel/ui/useParallelGesture.ts +227 -0
  141. package/src/structure/ui/useToolbarFloor.ts +27 -22
  142. package/src/ui.ts +1 -0
@@ -0,0 +1,129 @@
1
+ /**
2
+ * What a parallel-coordinates figure is asked to draw: one axis per column,
3
+ * the intervals the reader brushed on them, and the quantity the lines are
4
+ * coloured by.
5
+ *
6
+ * The figure itself is index-based — every axis hands over its column as an
7
+ * `ArrayLike<number>` read in place — so a repaint costs an indexed read per
8
+ * value rather than a call. {@link parallelAxisOf} is the one place a row type
9
+ * is named, and it is run once per data change rather than once per repaint.
10
+ */
11
+ import type { ColorScale } from '../../color/core/interpolate.ts';
12
+ /** How a value is placed along an axis. */
13
+ export type ParallelAxisScale = 'linear' | 'log';
14
+ /** One labelled graduation a caller writes itself. */
15
+ export interface ParallelTick {
16
+ /** Where it sits, in the axis's own units. */
17
+ value: number;
18
+ /** What is written beside it. */
19
+ label: string;
20
+ }
21
+ /** One vertical axis of a parallel-coordinates figure, and the column it draws. */
22
+ export interface ParallelAxis {
23
+ /**
24
+ * A stable key, which is how a brushed range is reported and how a caller
25
+ * names the axis the colour is read from. Never an index: axes are added and
26
+ * reordered, and a range keyed on a position outlives the axis it belonged
27
+ * to.
28
+ */
29
+ id: string;
30
+ /** What it is called, written over the axis. */
31
+ label: string;
32
+ /**
33
+ * Every row's value, in the figure's row order. Read in place — nothing is
34
+ * copied — so a `Float64Array` is the cheapest thing to pass.
35
+ */
36
+ values: ArrayLike<number>;
37
+ /**
38
+ * The two ends of the axis, low first. Left out, they are the column's own
39
+ * smallest and largest finite value, and a column with no spread at all is
40
+ * opened by half a unit on each side so that it still draws.
41
+ * @default undefined — the column's own range
42
+ */
43
+ domain?: readonly [number, number];
44
+ /**
45
+ * How values are placed between the ends. `log` needs a domain whose low end
46
+ * is above zero; a value at or below zero is pinned to the low end.
47
+ * @default 'linear'
48
+ */
49
+ scale?: ParallelAxisScale;
50
+ /**
51
+ * How a tick is written. Left out, the ticks carry as many decimals as the
52
+ * spacing needs.
53
+ * @default undefined
54
+ */
55
+ format?: (value: number) => string;
56
+ /**
57
+ * The graduations, written out by the caller — what a coded quantity needs,
58
+ * where `0`, `1`, `2` should read `none`, `low`, `high`.
59
+ * @default undefined — the figure graduates the axis itself
60
+ */
61
+ ticks?: readonly ParallelTick[];
62
+ /**
63
+ * Roughly how many graduations to aim for, when the figure picks them.
64
+ * @default 5
65
+ */
66
+ tickCount?: number;
67
+ /**
68
+ * Whether the ends are rounded outward to whole tick steps. Off, so the axis
69
+ * ends exactly on the data — a reader comparing two molecules on a drug
70
+ * score must see the best one touch the top of its axis, not float below a
71
+ * round number nothing reached.
72
+ * @default false
73
+ */
74
+ nice?: boolean;
75
+ /**
76
+ * The unit written after the axis name, e.g. `g/mol`.
77
+ * @default '' — nothing is written
78
+ */
79
+ unit?: string;
80
+ }
81
+ /** An interval kept on one axis, in that axis's own units, low first. */
82
+ export type ParallelRange = readonly [number, number];
83
+ /** Which rows a set of brushes keeps, keyed by axis id. */
84
+ export type ParallelRanges = Readonly<Record<string, ParallelRange | null>>;
85
+ /** How the lines are coloured. */
86
+ export interface ParallelColorBy {
87
+ /** The quantity read for each row, in the figure's row order. */
88
+ values: ArrayLike<number>;
89
+ /**
90
+ * The value at the low end of the ramp.
91
+ * @default the smallest finite value
92
+ */
93
+ min?: number;
94
+ /**
95
+ * The value at its high end.
96
+ * @default the largest finite value
97
+ */
98
+ max?: number;
99
+ /**
100
+ * The ramp, as the registry hands it over or as a plain list of colours.
101
+ * @default viridis — `resolveColorScale(DEFAULT_COLOR_SCALE_ID).scale`
102
+ */
103
+ scale?: ColorScale | readonly string[];
104
+ /**
105
+ * Whether the quantity is read on a base-10 logarithmic ramp.
106
+ * @default false
107
+ */
108
+ logarithmic?: boolean;
109
+ }
110
+ /** An axis described by the field to read off each row, rather than by its column. */
111
+ export type ParallelAxisSource<Row> = Omit<ParallelAxis, 'values'> & {
112
+ /**
113
+ * The value this axis reads off one row. Called once per row per data
114
+ * change, never per repaint.
115
+ */
116
+ readonly value: (row: Row) => number;
117
+ };
118
+ /**
119
+ * One axis built by reading a field off each row.
120
+ *
121
+ * The one place a row type is named: the figure itself reads numbers out of a
122
+ * typed array, so a repaint costs an indexed read rather than a call per
123
+ * value. Call it inside a `useMemo` keyed on the rows.
124
+ * @param rows - The rows, in the order the figure will index them.
125
+ * @param axis - The axis, with the field to read instead of its values.
126
+ * @returns The axis, with its values filled in.
127
+ */
128
+ export declare function parallelAxisOf<Row>(rows: readonly Row[], axis: ParallelAxisSource<Row>): ParallelAxis;
129
+ //# sourceMappingURL=parallelTypes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parallelTypes.d.ts","sourceRoot":"","sources":["../../../src/parallel/core/parallelTypes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAElE,2CAA2C;AAC3C,MAAM,MAAM,iBAAiB,GAAG,QAAQ,GAAG,KAAK,CAAC;AAEjD,sDAAsD;AACtD,MAAM,WAAW,YAAY;IAC3B,8CAA8C;IAC9C,KAAK,EAAE,MAAM,CAAC;IACd,iCAAiC;IACjC,KAAK,EAAE,MAAM,CAAC;CACf;AAED,mFAAmF;AACnF,MAAM,WAAW,YAAY;IAC3B;;;;;OAKG;IACH,EAAE,EAAE,MAAM,CAAC;IACX,gDAAgD;IAChD,KAAK,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,MAAM,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;IAC1B;;;;;OAKG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACnC;;;;OAIG;IACH,KAAK,CAAC,EAAE,iB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 * What a parallel-coordinates figure is asked to draw: one axis per column,
3
+ * the intervals the reader brushed on them, and the quantity the lines are
4
+ * coloured by.
5
+ *
6
+ * The figure itself is index-based — every axis hands over its column as an
7
+ * `ArrayLike<number>` read in place — so a repaint costs an indexed read per
8
+ * value rather than a call. {@link parallelAxisOf} is the one place a row type
9
+ * is named, and it is run once per data change rather than once per repaint.
10
+ */
11
+ /**
12
+ * One axis built by reading a field off each row.
13
+ *
14
+ * The one place a row type is named: the figure itself reads numbers out of a
15
+ * typed array, so a repaint costs an indexed read rather than a call per
16
+ * value. Call it inside a `useMemo` keyed on the rows.
17
+ * @param rows - The rows, in the order the figure will index them.
18
+ * @param axis - The axis, with the field to read instead of its values.
19
+ * @returns The axis, with its values filled in.
20
+ */
21
+ export function parallelAxisOf(rows, axis) {
22
+ const { value, ...rest } = axis;
23
+ const values = new Float64Array(rows.length);
24
+ for (let row = 0; row < rows.length; row++) {
25
+ values[row] = value(rows[row]);
26
+ }
27
+ return { ...rest, values };
28
+ }
29
+ //# sourceMappingURL=parallelTypes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parallelTypes.js","sourceRoot":"","sources":["../../../src/parallel/core/parallelTypes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAqHH;;;;;;;;;GASG;AACH,MAAM,UAAU,cAAc,CAC5B,IAAoB,EACpB,IAA6B;IAE7B,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,GAAG,IAAI,CAAC;IAChC,MAAM,MAAM,GAAG,IAAI,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC7C,KAAK,IAAI,GAAG,GAAG,CAAC,EAAE,GAAG,GAAG,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,EAAE,CAAC;QAC3C,MAAM,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC,GAAG,CAAQ,CAAC,CAAC;IACxC,CAAC;IACD,OAAO,EAAE,GAAG,IAAI,EAAE,MAAM,EAAE,CAAC;AAC7B,CAAC"}
@@ -0,0 +1,28 @@
1
+ import type { ReactElement } from 'react';
2
+ import type { ParallelAxisLayout } from '../core/parallelAxes.ts';
3
+ import type { ParallelBand } from '../core/parallelBrush.ts';
4
+ /** What {@link ParallelAxesLayer} draws. */
5
+ export interface ParallelAxesLayerProps {
6
+ /** The axes, from left to right, already placed and graduated. */
7
+ layouts: readonly ParallelAxisLayout[];
8
+ /** Height of the drawing area, in pixels. */
9
+ innerHeight: number;
10
+ /** The band each axis carries right now, the one being dragged included. */
11
+ bands: ReadonlyMap<string, ParallelBand>;
12
+ /** The ink the axes, their ticks and their labels are drawn in. */
13
+ axisInk: string;
14
+ /** The ink a band is filled and outlined in. */
15
+ bandInk: string;
16
+ }
17
+ /**
18
+ * The axes, their graduations and the intervals brushed on them.
19
+ *
20
+ * Every axis carries a `data-parallel-brush` rectangle over the strip a press
21
+ * on it reaches, which nothing points at: one surface over the whole figure
22
+ * takes every event, so the rectangle exists to be found — by a test driving
23
+ * a drag, and by a reader's eye, which is the same thing.
24
+ * @param props - See {@link ParallelAxesLayerProps}.
25
+ * @returns The axes.
26
+ */
27
+ export declare function ParallelAxesLayer(props: ParallelAxesLayerProps): ReactElement;
28
+ //# sourceMappingURL=ParallelAxesLayer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ParallelAxesLayer.d.ts","sourceRoot":"","sources":["../../../src/parallel/ui/ParallelAxesLayer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAE1C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAElE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAY7D,4CAA4C;AAC5C,MAAM,WAAW,sBAAsB;IACrC,kEAAkE;IAClE,OAAO,EAAE,SAAS,kBAAkB,EAAE,CAAC;IACvC,6CAA6C;IAC7C,WAAW,EAAE,MAAM,CAAC;IACpB,4EAA4E;IAC5E,KAAK,EAAE,WAAW,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;IACzC,mEAAmE;IACnE,OAAO,EAAE,MAAM,CAAC;IAChB,gDAAgD;IAChD,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,GAAG,YAAY,CAmD7E"}
@@ -0,0 +1,29 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { PARALLEL_MARGIN, parallelValueToY } from "../core/parallelAxes.js";
3
+ import { PARALLEL_BRUSH_HALF_WIDTH } from "../core/parallelBrush.js";
4
+ import { PARALLEL_HANDLE_HEIGHT, PARALLEL_TICK_LABEL_INSET, PARALLEL_TICK_LABEL_STYLE, PARALLEL_TICK_LENGTH, parallelBandStyle, parallelHandleStyle, } from "./parallelStyles.js";
5
+ /**
6
+ * The axes, their graduations and the intervals brushed on them.
7
+ *
8
+ * Every axis carries a `data-parallel-brush` rectangle over the strip a press
9
+ * on it reaches, which nothing points at: one surface over the whole figure
10
+ * takes every event, so the rectangle exists to be found — by a test driving
11
+ * a drag, and by a reader's eye, which is the same thing.
12
+ * @param props - See {@link ParallelAxesLayerProps}.
13
+ * @returns The axes.
14
+ */
15
+ export function ParallelAxesLayer(props) {
16
+ const { layouts, innerHeight, bands, axisInk, bandInk } = props;
17
+ const stroke = { stroke: axisInk };
18
+ return (_jsx("g", { transform: `translate(${PARALLEL_MARGIN.left},${PARALLEL_MARGIN.top})`, style: { fill: axisInk }, textAnchor: "middle", children: layouts.map((layout) => {
19
+ const band = bands.get(layout.id) ?? null;
20
+ return (_jsxs("g", { className: "parallel-axis", "data-parallel-axis": layout.id, transform: `translate(${layout.x},0)`, children: [_jsx("line", { y2: innerHeight, style: stroke }), layout.ticks.map((tick) => (_jsxs("g", { transform: `translate(0,${parallelValueToY(tick.value, layout)})`, children: [_jsx("line", { x1: -PARALLEL_TICK_LENGTH, style: stroke }), _jsx("text", { x: -PARALLEL_TICK_LABEL_INSET, dy: "0.32em", textAnchor: "end", style: PARALLEL_TICK_LABEL_STYLE, children: tick.label })] }, tick.value))), _jsx("rect", { "data-parallel-brush": layout.id, x: -PARALLEL_BRUSH_HALF_WIDTH, y: 0, width: PARALLEL_BRUSH_HALF_WIDTH * 2, height: Math.max(0, innerHeight), fill: "transparent", pointerEvents: "none" }), band === null ? null : _jsx(BrushBand, { band: band, ink: bandInk })] }, layout.id));
21
+ }) }));
22
+ }
23
+ function BrushBand(props) {
24
+ const { band, ink } = props;
25
+ const height = Math.max(0, band.bottom - band.top);
26
+ const width = PARALLEL_BRUSH_HALF_WIDTH * 2;
27
+ return (_jsxs("g", { className: "parallel-axis-band", pointerEvents: "none", children: [_jsx("rect", { x: -PARALLEL_BRUSH_HALF_WIDTH, y: band.top, width: width, height: height, style: parallelBandStyle(ink) }), _jsx("rect", { x: -PARALLEL_BRUSH_HALF_WIDTH, y: band.top - PARALLEL_HANDLE_HEIGHT / 2, width: width, height: PARALLEL_HANDLE_HEIGHT, style: parallelHandleStyle(ink) }), _jsx("rect", { x: -PARALLEL_BRUSH_HALF_WIDTH, y: band.bottom - PARALLEL_HANDLE_HEIGHT / 2, width: width, height: PARALLEL_HANDLE_HEIGHT, style: parallelHandleStyle(ink) })] }));
28
+ }
29
+ //# sourceMappingURL=ParallelAxesLayer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ParallelAxesLayer.js","sourceRoot":"","sources":["../../../src/parallel/ui/ParallelAxesLayer.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAE5E,OAAO,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AAErE,OAAO,EACL,sBAAsB,EACtB,yBAAyB,EACzB,yBAAyB,EACzB,oBAAoB,EACpB,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,qBAAqB,CAAC;AAgB7B;;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AAG,CAAC,GAC/B,IACA,CACL,CAAC;AACJ,CAAC"}
@@ -0,0 +1,21 @@
1
+ import type { ReactElement } from 'react';
2
+ import type { ParallelCoordinatesProps } from './parallelCoordinatesProps.ts';
3
+ /**
4
+ * One vertical axis per column, one line per row, and a brush on every axis.
5
+ *
6
+ * It is told nothing about what the rows are: a library of molecules, a set of
7
+ * runs and a table of measurements all arrive as one `ArrayLike<number>` per
8
+ * axis, read in place. The lines are painted into a canvas because ten
9
+ * thousand of them are not ten thousand elements; everything the reader points
10
+ * at, brushes or reads is SVG and HTML over the top.
11
+ *
12
+ * The brush reports on release, never while the band is being dragged, so a
13
+ * table filtering on the same intervals re-renders once per gesture. What it
14
+ * keeps is `parallelIncludedMask`, which that table should filter with — two
15
+ * definitions of "kept" is how a figure and the list under it come to disagree.
16
+ * @param props - See {@link ParallelCoordinatesProps}.
17
+ * @returns The figure, or what the caller asked to show in its place when
18
+ * there is nothing to draw.
19
+ */
20
+ export declare function ParallelCoordinates(props: ParallelCoordinatesProps): ReactElement;
21
+ //# sourceMappingURL=ParallelCoordinates.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ParallelCoordinates.d.ts","sourceRoot":"","sources":["../../../src/parallel/ui/ParallelCoordinates.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAoB1C,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AA0B9E;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,wBAAwB,GAC9B,YAAY,CAiKd"}
@@ -0,0 +1,109 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { useMemo, useState } from 'react';
3
+ import { OverlayLayer } from "../../overlay/ui/OverlayLayer.js";
4
+ import { joinClassNames } from "../../shared/ui/joinClassNames.js";
5
+ import { PARALLEL_MARGIN, parallelAxisLayouts } from "../core/parallelAxes.js";
6
+ import { parallelIncludedMask } from "../core/parallelFilter.js";
7
+ import { parallelColorSteps, parallelPalette, } from "../core/parallelPalette.js";
8
+ import { ParallelAxesLayer } from "./ParallelAxesLayer.js";
9
+ import { ParallelLabels } from "./ParallelLabels.js";
10
+ import { ParallelTooltip } from "./ParallelTooltip.js";
11
+ import { useParallelInk } from "./parallelInk.js";
12
+ import { parallelColorOf, parallelFigureLabel, parallelHighlightsOf, parallelIsBrushed, parallelRowCount, } from "./parallelPlotModel.js";
13
+ import { PARALLEL_SVG_STYLE, parallelCanvasStyle, parallelFigureStyle, } from "./parallelStyles.js";
14
+ import { useParallelCanvas } from "./useParallelCanvas.js";
15
+ import { useParallelGesture } from "./useParallelGesture.js";
16
+ /** Height the figure takes when the caller names none. */
17
+ const DEFAULT_HEIGHT = 320;
18
+ /** The smallest drawing area the figure will lay out, in pixels. */
19
+ const SMALLEST_SIDE = 10;
20
+ /** No axis is brushed, shared so an uncontrolled figure never rebuilds it. */
21
+ const NO_RANGES = Object.freeze({});
22
+ /**
23
+ * One vertical axis per column, one line per row, and a brush on every axis.
24
+ *
25
+ * It is told nothing about what the rows are: a library of molecules, a set of
26
+ * runs and a table of measurements all arrive as one `ArrayLike<number>` per
27
+ * axis, read in place. The lines are painted into a canvas because ten
28
+ * thousand of them are not ten thousand elements; everything the reader points
29
+ * at, brushes or reads is SVG and HTML over the top.
30
+ *
31
+ * The brush reports on release, never while the band is being dragged, so a
32
+ * table filtering on the same intervals re-renders once per gesture. What it
33
+ * keeps is `parallelIncludedMask`, which that table should filter with — two
34
+ * definitions of "kept" is how a figure and the list under it come to disagree.
35
+ * @param props - See {@link ParallelCoordinatesProps}.
36
+ * @returns The figure, or what the caller asked to show in its place when
37
+ * there is nothing to draw.
38
+ */
39
+ export function ParallelCoordinates(props) {
40
+ const { axes, width, height = DEFAULT_HEIGHT, empty, overlay } = props;
41
+ const { selected, renderTooltip, renderAxisLabel } = props;
42
+ const { className, testId, ink: inkProp, label: given } = props;
43
+ const { ranges: ownedRanges, defaultRanges, included: givenMask } = props;
44
+ const { color: givenColor, colorAxis, onRangeChange: report } = props;
45
+ const { onRangePreview, hovered, onHoverChange, onRowClick } = props;
46
+ const count = parallelRowCount(axes, props.count);
47
+ const innerWidth = Math.max(width - PARALLEL_MARGIN.left - PARALLEL_MARGIN.right, SMALLEST_SIDE);
48
+ const innerHeight = Math.max(height - PARALLEL_MARGIN.top - PARALLEL_MARGIN.bottom, SMALLEST_SIDE);
49
+ const [ownRanges, setOwnRanges] = useState(defaultRanges ?? NO_RANGES);
50
+ const ranges = ownedRanges ?? ownRanges;
51
+ const layouts = useMemo(() => parallelAxisLayouts(axes, count, innerWidth, innerHeight), [axes, count, innerWidth, innerHeight]);
52
+ const values = useMemo(() => columnsOf(axes), [axes]);
53
+ const { ink, ref: figure } = useParallelInk(inkProp);
54
+ const color = useMemo(() => parallelColorOf(givenColor, colorAxis, axes), [givenColor, colorAxis, axes]);
55
+ const steps = useMemo(() => (color === undefined ? null : parallelColorSteps(color, count)), [color, count]);
56
+ const palette = useMemo(() => (color === undefined ? [] : parallelPalette(color.scale)), [color]);
57
+ const included = useMemo(() => {
58
+ if (givenMask !== undefined)
59
+ return givenMask;
60
+ if (!parallelIsBrushed(axes, ranges))
61
+ return null;
62
+ return parallelIncludedMask(axes, ranges, count);
63
+ }, [givenMask, axes, ranges, count]);
64
+ function commitRange(axisId, range) {
65
+ if (ownedRanges === undefined) {
66
+ setOwnRanges((previous) => ({ ...previous, [axisId]: range }));
67
+ }
68
+ report?.(axisId, range);
69
+ }
70
+ const gesture = useParallelGesture({
71
+ layouts,
72
+ values,
73
+ count,
74
+ innerHeight,
75
+ included,
76
+ ranges,
77
+ onRangeChange: commitRange,
78
+ onRangePreview,
79
+ hovered,
80
+ onHoverChange,
81
+ onRowClick,
82
+ });
83
+ const highlights = useMemo(() => parallelHighlightsOf(selected, gesture.hovered, ink.selection, ink.hover), [selected, gesture.hovered, ink.selection, ink.hover]);
84
+ const { lines: lineCanvas, marks: markCanvas } = useParallelCanvas({
85
+ width,
86
+ height,
87
+ layouts,
88
+ values,
89
+ count,
90
+ included,
91
+ steps,
92
+ palette,
93
+ highlights,
94
+ ink,
95
+ });
96
+ const label = given ?? parallelFigureLabel(axes, count);
97
+ const canvasStyle = parallelCanvasStyle(height);
98
+ const hover = gesture.pointer === null || gesture.hovered < 0
99
+ ? null
100
+ : { index: gesture.hovered, ...gesture.pointer };
101
+ return (_jsxs("div", { ref: figure, className: joinClassNames('parallel-coordinates', className), style: parallelFigureStyle(height), "data-testid": testId, children: [count === 0 || layouts.length === 0 ? (empty) : (_jsxs(_Fragment, { children: [_jsx("canvas", { ref: lineCanvas, className: "parallel-coordinates-canvas", style: canvasStyle }), _jsx("canvas", { ref: markCanvas, className: "parallel-coordinates-canvas", style: canvasStyle }), _jsxs("svg", { width: Math.max(0, width), height: Math.max(0, height), style: PARALLEL_SVG_STYLE, role: "img", "aria-label": label, children: [_jsx(ParallelAxesLayer, { layouts: layouts, innerHeight: innerHeight, bands: gesture.bands, axisInk: ink.axis, bandInk: ink.selection }), _jsx("rect", { x: 0, y: 0, width: Math.max(0, width), height: Math.max(0, height), fill: "transparent", onClick: gesture.onClick, ...gesture.surface })] }), _jsx(ParallelLabels, { axes: axes, layouts: layouts, render: renderAxisLabel }), hover === null || renderTooltip === undefined ? null : (_jsx(ParallelTooltip, { x: hover.x, y: hover.y, boxWidth: width, boxHeight: height, children: renderTooltip(hover) }))] })), overlay === undefined ? null : (_jsx(OverlayLayer, { width: width, busy: gesture.brushing, children: overlay }))] }));
102
+ }
103
+ function columnsOf(axes) {
104
+ const columns = [];
105
+ for (const axis of axes)
106
+ columns.push(axis.values);
107
+ return columns;
108
+ }
109
+ //# sourceMappingURL=ParallelCoordinates.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ParallelCoordinates.js","sourceRoot":"","sources":["../../../src/parallel/ui/ParallelCoordinates.tsx"],"names":[],"mappings":";AACA,OAAO,E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AAS,EAAE,MAAM,YAEhB,aAAa,CAAC,KAAK,CAAC,GACL,CACnB,IACA,CACJ,EACA,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAC9B,KAAC,YAAY,IAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,CAAC,QAAQ,YAC/C,OAAO,GACK,CAChB,IACG,CACP,CAAC;AACJ,CAAC;AAED,SAAS,SAAS,CAAC,IAA6B;IAC9C,MAAM,OAAO,GAA6B,EAAE,CAAC;IAC7C,KAAK,MAAM,IAAI,IAAI,IAAI;QAAE,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACnD,OAAO,OAAO,CAAC;AACjB,CAAC"}
@@ -0,0 +1,26 @@
1
+ import type { ReactElement, ReactNode } from 'react';
2
+ import type { ParallelAxisLayout } from '../core/parallelAxes.ts';
3
+ import type { ParallelAxis } from '../core/parallelTypes.ts';
4
+ /** What {@link ParallelLabels} writes. */
5
+ export interface ParallelLabelsProps {
6
+ /** The axes as the caller described them, for a caller's own renderer. */
7
+ axes: readonly ParallelAxis[];
8
+ /** The same axes, placed, so each name sits over its own axis. */
9
+ layouts: readonly ParallelAxisLayout[];
10
+ /**
11
+ * How a name is written. Left out, it is the label and the unit after it.
12
+ * @default undefined
13
+ */
14
+ render?: ((axis: ParallelAxis, index: number) => ReactNode) | undefined;
15
+ }
16
+ /**
17
+ * The axis names, as HTML over the figure.
18
+ *
19
+ * HTML rather than SVG text so that a name can carry a tooltip explaining what
20
+ * the axis measures. The layer lets every pointer event through and only the
21
+ * names themselves take it back, so a brush started under a name still starts.
22
+ * @param props - See {@link ParallelLabelsProps}.
23
+ * @returns The names.
24
+ */
25
+ export declare function ParallelLabels(props: ParallelLabelsProps): ReactElement;
26
+ //# sourceMappingURL=ParallelLabels.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ParallelLabels.d.ts","sourceRoot":"","sources":["../../../src/parallel/ui/ParallelLabels.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAErD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAElE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAI7D,0CAA0C;AAC1C,MAAM,WAAW,mBAAmB;IAClC,0EAA0E;IAC1E,IAAI,EAAE,SAAS,YAAY,EAAE,CAAC;IAC9B,kEAAkE;IAClE,OAAO,EAAE,SAAS,kBAAkB,EAAE,CAAC;IACvC;;;OAGG;IACH,MAAM,CAAC,EAAE,CAAC,CAAC,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,KAAK,SAAS,CAAC,GAAG,SAAS,CAAC;CACzE;AAED;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,GAAG,YAAY,CAqBvE"}
@@ -0,0 +1,25 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { PARALLEL_MARGIN } from "../core/parallelAxes.js";
3
+ import { PARALLEL_LABELS_STYLE, parallelLabelStyle } from "./parallelStyles.js";
4
+ /**
5
+ * The axis names, as HTML over the figure.
6
+ *
7
+ * HTML rather than SVG text so that a name can carry a tooltip explaining what
8
+ * the axis measures. The layer lets every pointer event through and only the
9
+ * names themselves take it back, so a brush started under a name still starts.
10
+ * @param props - See {@link ParallelLabelsProps}.
11
+ * @returns The names.
12
+ */
13
+ export function ParallelLabels(props) {
14
+ const { axes, layouts, render } = props;
15
+ return (_jsx("div", { className: "parallel-coordinates-labels", style: PARALLEL_LABELS_STYLE, children: layouts.map((layout, index) => {
16
+ const axis = axes[index];
17
+ return (_jsx("div", { className: "parallel-axis-label", style: parallelLabelStyle(PARALLEL_MARGIN.left + layout.x), children: axis !== undefined && render !== undefined
18
+ ? render(axis, index)
19
+ : defaultLabel(layout) }, layout.id));
20
+ }) }));
21
+ }
22
+ function defaultLabel(layout) {
23
+ return layout.unit === '' ? layout.label : `${layout.label} (${layout.unit})`;
24
+ }
25
+ //# sourceMappingURL=ParallelLabels.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ParallelLabels.js","sourceRoot":"","sources":["../../../src/parallel/ui/ParallelLabels.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAG1D,OAAO,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAehF;;;;;;;;GAQG;AACH,MAAM,UAAU,cAAc,CAAC,KAA0B;IACvD,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;IAExC,OAAO,CACL,cAAK,SAAS,EAAC,6BAA6B,EAAC,KAAK,EAAE,qBAAqB,YACtE,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;YAC7B,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC;YACzB,OAAO,CACL,cAEE,SAAS,EAAC,qBAAqB,EAC/B,KAAK,EAAE,kBAAkB,CAAC,eAAe,CAAC,IAAI,GAAG,MAAM,CAAC,CAAC,CAAC,YAEzD,IAAI,KAAK,SAAS,IAAI,MAAM,KAAK,SAAS;oBACzC,CAAC,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC;oBACrB,CAAC,CAAC,YAAY,CAAC,MAAM,CAAC,IANnB,MAAM,CAAC,EAAE,CAOV,CACP,CAAC;QACJ,CAAC,CAAC,GACE,CACP,CAAC;AACJ,CAAC;AAED,SAAS,YAAY,CAAC,MAA0B;IAC9C,OAAO,MAAM,CAAC,IAAI,KAAK,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,KAAK,KAAK,MAAM,CAAC,IAAI,GAAG,CAAC;AAChF,CAAC"}
@@ -0,0 +1,26 @@
1
+ import type { ReactElement, ReactNode } from 'react';
2
+ /** What {@link ParallelTooltip} shows, and where. */
3
+ export interface ParallelTooltipProps {
4
+ /** Where the pointer is, in pixels from the figure's left edge. */
5
+ x: number;
6
+ /** Where it is, in pixels from its top edge. */
7
+ y: number;
8
+ /** Width of the figure, so the card is flipped rather than clipped. */
9
+ boxWidth: number;
10
+ /** Its height. */
11
+ boxHeight: number;
12
+ /** What the card says, written by the caller. */
13
+ children: ReactNode;
14
+ }
15
+ /**
16
+ * The card over the row under the pointer.
17
+ *
18
+ * It measures itself and flips rather than being clipped, because a card that
19
+ * runs off the bottom right of a figure is exactly where a reader points last
20
+ * — and it never takes the pointer, so moving towards it never dismisses it by
21
+ * moving off the line underneath.
22
+ * @param props - See {@link ParallelTooltipProps}.
23
+ * @returns The card.
24
+ */
25
+ export declare function ParallelTooltip(props: ParallelTooltipProps): ReactElement;
26
+ //# sourceMappingURL=ParallelTooltip.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ParallelTooltip.d.ts","sourceRoot":"","sources":["../../../src/parallel/ui/ParallelTooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAQrD,qDAAqD;AACrD,MAAM,WAAW,oBAAoB;IACnC,mEAAmE;IACnE,CAAC,EAAE,MAAM,CAAC;IACV,gDAAgD;IAChD,CAAC,EAAE,MAAM,CAAC;IACV,uEAAuE;IACvE,QAAQ,EAAE,MAAM,CAAC;IACjB,kBAAkB;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,iDAAiD;IACjD,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,GAAG,YAAY,CAsBzE"}
@@ -0,0 +1,30 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useRef } from 'react';
3
+ import { useContainerSize } from "../../hooks/ui/useContainerSize.js";
4
+ import { placeOverlayCard } from "../../overlay/core/placeOverlayCard.js";
5
+ import { parallelTooltipStyle } from "./parallelStyles.js";
6
+ /**
7
+ * The card over the row under the pointer.
8
+ *
9
+ * It measures itself and flips rather than being clipped, because a card that
10
+ * runs off the bottom right of a figure is exactly where a reader points last
11
+ * — and it never takes the pointer, so moving towards it never dismisses it by
12
+ * moving off the line underneath.
13
+ * @param props - See {@link ParallelTooltipProps}.
14
+ * @returns The card.
15
+ */
16
+ export function ParallelTooltip(props) {
17
+ const { x, y, boxWidth, boxHeight, children } = props;
18
+ const card = useRef(null);
19
+ const size = useContainerSize(card);
20
+ const placed = placeOverlayCard({
21
+ pointerX: x,
22
+ pointerY: y,
23
+ cardWidth: size.width,
24
+ cardHeight: size.height,
25
+ boxWidth,
26
+ boxHeight,
27
+ });
28
+ return (_jsx("div", { ref: card, className: "parallel-coordinates-tooltip", style: parallelTooltipStyle(placed.left, placed.top), children: children }));
29
+ }
30
+ //# sourceMappingURL=ParallelTooltip.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ParallelTooltip.js","sourceRoot":"","sources":["../../../src/parallel/ui/ParallelTooltip.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AACtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAE1E,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAgB3D;;;;;;;;;GASG;AACH,MAAM,UAAU,eAAe,CAAC,KAA2B;IACzD,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IACtD,MAAM,IAAI,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAC1C,MAAM,IAAI,GAAG,gBAAgB,CAAC,IAAI,CAAC,CAAC;IACpC,MAAM,MAAM,GAAG,gBAAgB,CAAC;QAC9B,QAAQ,EAAE,CAAC;QACX,QAAQ,EAAE,CAAC;QACX,SAAS,EAAE,IAAI,CAAC,KAAK;QACrB,UAAU,EAAE,IAAI,CAAC,MAAM;QACvB,QAAQ;QACR,SAAS;KACV,CAAC,CAAC;IAEH,OAAO,CACL,cACE,GAAG,EAAE,IAAI,EACT,SAAS,EAAC,8BAA8B,EACxC,KAAK,EAAE,oBAAoB,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,GAAG,CAAC,YAEnD,QAAQ,GACL,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * A parallel-coordinates figure the reader can interrogate: brush any axis to
3
+ * keep an interval of it, rest on a line for what is known about that row, and
4
+ * colour every line by whichever column answers the question being asked.
5
+ *
6
+ * Nothing here knows what the rows are. The same figure draws a library of
7
+ * molecules, a set of experimental runs and a table of measurements, which is
8
+ * why it is its own domain rather than part of the first viewer to want one.
9
+ */
10
+ export { ParallelAxesLayer } from './ParallelAxesLayer.tsx';
11
+ export type { ParallelAxesLayerProps } from './ParallelAxesLayer.tsx';
12
+ export { ParallelCoordinates } from './ParallelCoordinates.tsx';
13
+ export type { ParallelCoordinatesProps, ParallelHover, ParallelInk, } from './parallelCoordinatesProps.ts';
14
+ export type { ParallelInkBinding, ParallelInkValues, ParallelTokenInk, } from './parallelInk.ts';
15
+ export { parallelInkFrom, readParallelInk, readParallelTokens, useParallelInk, } from './parallelInk.ts';
16
+ export { ParallelLabels } from './ParallelLabels.tsx';
17
+ export type { ParallelLabelsProps } from './ParallelLabels.tsx';
18
+ export { parallelColorOf, parallelFigureLabel, parallelHighlightsOf, parallelIsBrushed, parallelRowCount, } from './parallelPlotModel.ts';
19
+ export { ParallelTooltip } from './ParallelTooltip.tsx';
20
+ export type { ParallelTooltipProps } from './ParallelTooltip.tsx';
21
+ export type { ParallelCanvasOptions, ParallelCanvases, } from './useParallelCanvas.ts';
22
+ export { useParallelCanvas } from './useParallelCanvas.ts';
23
+ export type { ParallelGesture, ParallelGestureOptions, } from './useParallelGesture.ts';
24
+ export { useParallelGesture } from './useParallelGesture.ts';
25
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/parallel/ui/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,YAAY,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,YAAY,EACV,wBAAwB,EACxB,aAAa,EACb,WAAW,GACZ,MAAM,+BAA+B,CAAC;AACvC,YAAY,EACV,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,eAAe,EACf,eAAe,EACf,kBAAkB,EAClB,cAAc,GACf,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,YAAY,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,oBAAoB,EACpB,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,YAAY,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAClE,YAAY,EACV,qBAAqB,EACrB,gBAAgB,GACjB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,YAAY,EACV,eAAe,EACf,sBAAsB,GACvB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * A parallel-coordinates figure the reader can interrogate: brush any axis to
3
+ * keep an interval of it, rest on a line for what is known about that row, and
4
+ * colour every line by whichever column answers the question being asked.
5
+ *
6
+ * Nothing here knows what the rows are. The same figure draws a library of
7
+ * molecules, a set of experimental runs and a table of measurements, which is
8
+ * why it is its own domain rather than part of the first viewer to want one.
9
+ */
10
+ export { ParallelAxesLayer } from "./ParallelAxesLayer.js";
11
+ export { ParallelCoordinates } from "./ParallelCoordinates.js";
12
+ export { parallelInkFrom, readParallelInk, readParallelTokens, useParallelInk, } from "./parallelInk.js";
13
+ export { ParallelLabels } from "./ParallelLabels.js";
14
+ export { parallelColorOf, parallelFigureLabel, parallelHighlightsOf, parallelIsBrushed, parallelRowCount, } from "./parallelPlotModel.js";
15
+ export { ParallelTooltip } from "./ParallelTooltip.js";
16
+ export { useParallelCanvas } from "./useParallelCanvas.js";
17
+ export { useParallelGesture } from "./useParallelGesture.js";
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/parallel/ui/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAyB,CAAC;AAE5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA2B,CAAC;AAWhE,OAAO,EACL,eAAe,EACf,eAAe,EACf,kBAAkB,EAClB,cAAc,GACf,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAsB,CAAC;AAEtD,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,oBAAoB,EACpB,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAuB,CAAC;AAMxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAK3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC"}