@fusion.dev/helix-headless 0.198.0 → 0.199.1

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 (53) hide show
  1. package/api.json +1 -1
  2. package/custom-elements.json +8267 -2270
  3. package/dist/carousel/root/carousel-root.d.ts +14 -0
  4. package/dist/carousel/root/carousel-root.js +15 -1
  5. package/dist/element-events.generated.js +19 -0
  6. package/dist/graph/root/graph-root.d.ts +33 -0
  7. package/dist/graph/root/graph-root.js +57 -0
  8. package/dist/index.d.ts +4 -0
  9. package/dist/index.js +4 -0
  10. package/dist/map/raster/map-raster.d.ts +7 -3
  11. package/dist/map/raster/map-raster.js +5 -3
  12. package/dist/motion-toggle/index.d.ts +1 -0
  13. package/dist/motion-toggle/index.js +1 -0
  14. package/dist/motion-toggle/root/motion-toggle-root.d.ts +77 -0
  15. package/dist/motion-toggle/root/motion-toggle-root.js +56 -0
  16. package/dist/spatial-bar-chart/bars.d.ts +79 -0
  17. package/dist/spatial-bar-chart/bars.js +72 -0
  18. package/dist/spatial-bar-chart/index.d.ts +2 -0
  19. package/dist/spatial-bar-chart/index.js +2 -0
  20. package/dist/spatial-bar-chart/root/spatial-bar-chart-root.d.ts +245 -0
  21. package/dist/spatial-bar-chart/root/spatial-bar-chart-root.js +262 -0
  22. package/dist/spatial-ribbon-chart/index.d.ts +2 -0
  23. package/dist/spatial-ribbon-chart/index.js +2 -0
  24. package/dist/spatial-ribbon-chart/ribbons.d.ts +55 -0
  25. package/dist/spatial-ribbon-chart/ribbons.js +99 -0
  26. package/dist/spatial-ribbon-chart/root/spatial-ribbon-chart-root.d.ts +243 -0
  27. package/dist/spatial-ribbon-chart/root/spatial-ribbon-chart-root.js +259 -0
  28. package/dist/spatial-scatter-chart/field.d.ts +8 -0
  29. package/dist/spatial-scatter-chart/root/spatial-scatter-chart-root.d.ts +14 -0
  30. package/dist/spatial-scatter-chart/root/spatial-scatter-chart-root.js +20 -6
  31. package/dist/spatial-scatter-chart/view.d.ts +14 -1
  32. package/dist/spatial-scatter-chart/view.js +29 -9
  33. package/dist/spatial-surface-chart/grid.d.ts +22 -0
  34. package/dist/spatial-surface-chart/grid.js +67 -1
  35. package/dist/spatial-surface-chart/index.d.ts +1 -1
  36. package/dist/spatial-surface-chart/index.js +1 -1
  37. package/dist/spatial-surface-chart/root/spatial-surface-chart-root.d.ts +20 -0
  38. package/dist/spatial-surface-chart/root/spatial-surface-chart-root.js +38 -5
  39. package/dist/spatial-treemap/blocks.d.ts +106 -0
  40. package/dist/spatial-treemap/blocks.js +215 -0
  41. package/dist/spatial-treemap/index.d.ts +2 -0
  42. package/dist/spatial-treemap/index.js +2 -0
  43. package/dist/spatial-treemap/root/spatial-treemap-root.d.ts +236 -0
  44. package/dist/spatial-treemap/root/spatial-treemap-root.js +249 -0
  45. package/dist/video/root/video-root.d.ts +14 -0
  46. package/dist/video/root/video-root.js +30 -2
  47. package/examples.json +1 -1
  48. package/lint.json +1 -1
  49. package/package.json +5 -5
  50. package/types/jsx.d.ts +3037 -99
  51. package/types/svelte.d.ts +4 -0
  52. package/types/vue.d.ts +519 -3
  53. package/types/words.d.ts +149 -0
@@ -0,0 +1,215 @@
1
+ import { solid, ticks } from '@fusion.dev/helix-core';
2
+ import { niceRange } from '../spatial-scatter-chart/field.js';
3
+ import { inBox } from '../spatial-scatter-chart/view.js';
4
+ const HEIGHT = 0.6;
5
+ const SLAB = 0.06;
6
+ const GROUP_GAP = 0.05;
7
+ const BLOCK_GAP = 0.018;
8
+ const sum = (values) => values.reduce((total, value) => total + value, 0);
9
+ export const squarified = (sizes, within) => {
10
+ const total = sum(sizes);
11
+ const across = within.x1 - within.x0;
12
+ const deep = within.z1 - within.z0;
13
+ if (total <= 0 || across <= 0 || deep <= 0) {
14
+ return sizes.map(() => ({ ...within, x1: within.x0, z1: within.z0 }));
15
+ }
16
+ const areas = sizes.map((size) => (size / total) * across * deep);
17
+ const placed = [];
18
+ const free = { ...within };
19
+ const worst = (row, side) => {
20
+ const all = sum(row);
21
+ const [most, least] = [Math.max(...row), Math.min(...row)];
22
+ return Math.max((side * side * most) / (all * all), (all * all) / (side * side * least));
23
+ };
24
+ let at = 0;
25
+ while (at < areas.length) {
26
+ const wide = free.x1 - free.x0 >= free.z1 - free.z0;
27
+ const side = wide ? free.z1 - free.z0 : free.x1 - free.x0;
28
+ const row = [areas[at]];
29
+ let next = at + 1;
30
+ while (next < areas.length &&
31
+ worst([...row, areas[next]], side) <= worst(row, side)) {
32
+ row.push(areas[next]);
33
+ next++;
34
+ }
35
+ const thick = sum(row) / side;
36
+ let along = wide ? free.z0 : free.x0;
37
+ for (const area of row) {
38
+ const length = area / thick;
39
+ placed.push(wide
40
+ ? { x0: free.x0, x1: free.x0 + thick, z0: along, z1: along + length }
41
+ : { x0: along, x1: along + length, z0: free.z0, z1: free.z0 + thick });
42
+ along += length;
43
+ }
44
+ if (wide) {
45
+ free.x0 += thick;
46
+ }
47
+ else {
48
+ free.z0 += thick;
49
+ }
50
+ at = next;
51
+ }
52
+ return placed;
53
+ };
54
+ const inset = (area, gap) => {
55
+ const margin = Math.min(gap / 2, (area.x1 - area.x0) / 4, (area.z1 - area.z0) / 4);
56
+ return {
57
+ x0: area.x0 + margin,
58
+ x1: area.x1 - margin,
59
+ z0: area.z0 + margin,
60
+ z1: area.z1 - margin,
61
+ };
62
+ };
63
+ const FLOOR = { name: '', range: [-1, 1], rules: [], ticks: [] };
64
+ export const treemapOf = (rows, columns, groupBy = '') => {
65
+ const nameOf = (column) => column === undefined ? '' : (rows.find((row) => row.cells[column])?.cells[column]?.name ?? '');
66
+ const [sizeAt, heightAt] = columns.filter((column) => nameOf(column) !== groupBy);
67
+ const groups = [];
68
+ const blocks = [];
69
+ rows.forEach((row, at) => {
70
+ const size = sizeAt === undefined ? undefined : row.cells[sizeAt]?.value;
71
+ if (size === undefined || !Number.isFinite(size) || size <= 0) {
72
+ return;
73
+ }
74
+ const height = heightAt === undefined ? undefined : row.cells[heightAt]?.value;
75
+ const group = groupBy ? (row.cells.find((cell) => cell.name === groupBy)?.text ?? '') : '';
76
+ let groupIndex = groups.indexOf(group);
77
+ if (groupIndex < 0) {
78
+ groupIndex = groups.push(group) - 1;
79
+ }
80
+ blocks.push({
81
+ area: { x0: 0, x1: 0, z0: 0, z1: 0 },
82
+ group,
83
+ groupIndex,
84
+ height: Number.isFinite(height) ? height : undefined,
85
+ label: row.label,
86
+ row: at,
87
+ size,
88
+ });
89
+ });
90
+ const totals = groups.map((_, index) => sum(blocks.filter((block) => block.groupIndex === index).map((block) => block.size)));
91
+ const byTotal = groups
92
+ .map((_, index) => index)
93
+ .sort((one, other) => (totals[other] ?? 0) - (totals[one] ?? 0));
94
+ const shares = squarified(byTotal.map((index) => totals[index] ?? 0), { x0: -1, x1: 1, z0: -1, z1: 1 });
95
+ byTotal.forEach((index, at) => {
96
+ const share = shares[at];
97
+ if (!share) {
98
+ return;
99
+ }
100
+ const members = blocks
101
+ .filter((block) => block.groupIndex === index)
102
+ .sort((one, other) => other.size - one.size);
103
+ const areas = squarified(members.map((block) => block.size), groups.length > 1 ? inset(share, GROUP_GAP) : share);
104
+ members.forEach((block, place) => {
105
+ block.area = inset(areas[place], BLOCK_GAP);
106
+ });
107
+ });
108
+ const heights = blocks.flatMap((block) => (block.height === undefined ? [] : [block.height]));
109
+ const tall = heightAt !== undefined;
110
+ const [low, high] = [Math.min(0, ...heights), Math.max(0, ...heights)];
111
+ const range = !tall || low === high ? [0, 1] : niceRange(low, high);
112
+ return {
113
+ axes: {
114
+ extent: [1, tall ? HEIGHT : SLAB, 1],
115
+ x: FLOOR,
116
+ y: tall ? { name: nameOf(heightAt), range, ticks: ticks(range) } : { ...FLOOR, range },
117
+ z: FLOOR,
118
+ },
119
+ blocks,
120
+ groups,
121
+ height: nameOf(heightAt),
122
+ size: nameOf(sizeAt),
123
+ };
124
+ };
125
+ export const blocksDrawn = (field, projection) => {
126
+ const [ex, ey, ez] = field.axes.extent;
127
+ const zero = inBox(field.axes.y, 0) * ey;
128
+ const tall = field.height !== '';
129
+ return field.blocks.map((block, index) => {
130
+ const top = inBox(field.axes.y, tall ? (block.height ?? 0) : 1) * ey;
131
+ const base = Math.min(zero, top);
132
+ const height = Math.abs(top - zero);
133
+ const floor = {
134
+ x0: block.area.x0 * ex,
135
+ x1: block.area.x1 * ex,
136
+ y0: -block.area.z1 * ez,
137
+ y1: -block.area.z0 * ez,
138
+ };
139
+ const lifted = {
140
+ ...projection,
141
+ at: (px, py, pz = 0) => projection.at(px, py, pz + base),
142
+ };
143
+ const corners = [];
144
+ for (const cx of [floor.x0, floor.x1]) {
145
+ for (const cy of [floor.y0, floor.y1]) {
146
+ corners.push(lifted.at(cx, cy, 0), lifted.at(cx, cy, height));
147
+ }
148
+ }
149
+ return {
150
+ corners,
151
+ drawn: solid(lifted, 'block', (floor.x0 + floor.x1) / 2, (floor.y0 + floor.y1) / 2, floor.x1 - floor.x0, height, floor.y1 - floor.y0),
152
+ floor,
153
+ index,
154
+ };
155
+ });
156
+ };
157
+ const LEVEL = 1e-9;
158
+ export const paintOrder = (projection, blocks) => {
159
+ const [ax, ay] = projection.toward;
160
+ const along = (oneLow, oneHigh, otherLow, otherHigh, toward) => {
161
+ if (Math.abs(toward) < LEVEL) {
162
+ return 0;
163
+ }
164
+ if (oneHigh <= otherLow) {
165
+ return toward > 0 ? -1 : 1;
166
+ }
167
+ if (otherHigh <= oneLow) {
168
+ return toward > 0 ? 1 : -1;
169
+ }
170
+ return 0;
171
+ };
172
+ const count = blocks.length;
173
+ const after = Array.from({ length: count }, () => []);
174
+ const waiting = new Array(count).fill(0);
175
+ for (let one = 0; one < count; one++) {
176
+ for (let other = one + 1; other < count; other++) {
177
+ const [a, b] = [blocks[one].floor, blocks[other].floor];
178
+ const across = along(a.x0, a.x1, b.x0, b.x1, ax);
179
+ const back = along(a.y0, a.y1, b.y0, b.y1, ay);
180
+ const order = across !== 0 && back !== 0 && across !== back ? 0 : across || back;
181
+ if (order < 0) {
182
+ after[one]?.push(other);
183
+ waiting[other] = (waiting[other] ?? 0) + 1;
184
+ }
185
+ else if (order > 0) {
186
+ after[other]?.push(one);
187
+ waiting[one] = (waiting[one] ?? 0) + 1;
188
+ }
189
+ }
190
+ }
191
+ const depthOf = blocks.map((block) => projection.depth((block.floor.x0 + block.floor.x1) / 2, (block.floor.y0 + block.floor.y1) / 2));
192
+ const done = new Array(count).fill(false);
193
+ const order = [];
194
+ for (let step = 0; step < count; step++) {
195
+ let pick = -1;
196
+ for (let at = 0; at < count; at++) {
197
+ if (done[at]) {
198
+ continue;
199
+ }
200
+ const free = waiting[at] === 0;
201
+ const best = pick < 0 ? undefined : waiting[pick] === 0;
202
+ if (pick < 0 ||
203
+ (free && !best) ||
204
+ (free === best && (depthOf[at] ?? 0) < (depthOf[pick] ?? 0))) {
205
+ pick = at;
206
+ }
207
+ }
208
+ done[pick] = true;
209
+ order.push(blocks[pick]);
210
+ for (const next of after[pick] ?? []) {
211
+ waiting[next] = (waiting[next] ?? 0) - 1;
212
+ }
213
+ }
214
+ return order;
215
+ };
@@ -0,0 +1,2 @@
1
+ export { blocksDrawn, type DrawnBlock, type FloorArea, paintOrder, squarified, type TreemapBlock, type TreemapField, treemapOf, } from './blocks.js';
2
+ export { HelixHeadlessSpatialTreemap } from './root/spatial-treemap-root.js';
@@ -0,0 +1,2 @@
1
+ export { blocksDrawn, paintOrder, squarified, treemapOf, } from './blocks.js';
2
+ export { HelixHeadlessSpatialTreemap } from './root/spatial-treemap-root.js';
@@ -0,0 +1,236 @@
1
+ import { AriaForwardController, HelixElement } from '@fusion.dev/helix-core';
2
+ import { type PropertyValues, type TemplateResult } from 'lit';
3
+ import '../../tooltip/index.js';
4
+ import { type TreemapField } from '../blocks.js';
5
+ declare const HelixHeadlessSpatialTreemap_base: typeof HelixElement & (new (...args: any[]) => import("@fusion.dev/helix-core").MixinChartSourceInterface) & (new (...args: any[]) => import("@fusion.dev/helix-core").MixinChartStatusInterface);
6
+ /**
7
+ * @summary A treemap drawn in three dimensions, each item a block whose area is its size and whose height is a second measure.
8
+ *
9
+ * @description
10
+ * A 3D treemap shares a floor out among the rows of its table: **the first
11
+ * numeric column is each block's size, and its share of the floor is in
12
+ * proportion to it**. The second numeric column, where there is one, is each
13
+ * block's height, from zero, so one block shows two measures: how large an
14
+ * item is, and how it stands on another count, such as each service's
15
+ * requests and its errors. `group-by` names a column of text, such as a team,
16
+ * that gathers its rows into one part of the floor, in one color, and the
17
+ * part is as large as their total.
18
+ *
19
+ * **Each part is laid out as near to square as its share allows**, so two
20
+ * items compare by area, and the largest stand at the back left, where they
21
+ * hide the least. With no height column the blocks stand as one thin slab, a
22
+ * treemap seen in 3D.
23
+ *
24
+ * **Helix draws the frame, and the chart draws the blocks in 3D itself, in
25
+ * SVG**: a picture a print and a page without WebGL show too, which a drag
26
+ * or Shift with an arrow turns. Put a box inside the chart, and
27
+ * `connectSpatialTreemap` from `@fusion.dev/helix-plot`, given
28
+ * `threeTreemapDriver` from `@fusion.dev/helix-plot/three`, draws the blocks
29
+ * in it with three.js, lit and in perspective.
30
+ *
31
+ * **The table is the reading.** Every number is in it, and screen readers
32
+ * read it. The `summary` part names the number of items and groups and the
33
+ * range of their sizes, and describes the plot.
34
+ *
35
+ * **The plot is read by key, in the table's order.** It takes focus, named
36
+ * by `label` or the caption. The left and right arrows move from item to
37
+ * item, the down and up arrows among the item's measures, which the readout
38
+ * says first, and Home and End go to the first and the last item. Shift
39
+ * with an arrow turns the view, and Escape lets the item go.
40
+ *
41
+ * **A reading shows its row in a tooltip**, as on every chart: the block a
42
+ * mouse or a pen rests on, the block tapped, or the one the keys move to.
43
+ *
44
+ * **Readings are sent as every chart sends them.** `helix-reading-change`
45
+ * says each move of the reading, and `helix-reading-press` a block clicked
46
+ * or pressed with Enter or Space, each with the row of the table in `index`.
47
+ *
48
+ * **Keyboard.** The plot is one tab stop once it has readings.
49
+ *
50
+ * | Key | What it does |
51
+ * |---|---|
52
+ * | Tab | Moves focus to the plot. |
53
+ * | Right, Left | Moves to the next or the previous item, in the table's order. |
54
+ * | Down, Up | Moves among the item's measures, which the readout says first. |
55
+ * | Home, End | Moves to the first or the last item. |
56
+ * | Shift with an arrow | Turns the view across, or tilts it up and down. |
57
+ * | Enter, Space | Presses the item, which sends `helix-reading-press`. |
58
+ * | Escape | Lets the item go. |
59
+ *
60
+ * @since 0.199.0
61
+ * @status experimental
62
+ * @category charts
63
+ * @aliases 3D treemap, Isometric treemap, Treemap in 3D, City map chart
64
+ * @documentation https://fusion.dev/helix/components/spatial-treemap
65
+ *
66
+ * @slot - The renderer's box, which the 3D drawing is made in.
67
+ * @slot empty - Content shown when the table has no readings. Falls back to `empty-text`.
68
+ * @slot loading - Content shown while `loading` is set and there are no readings yet. Falls back to `loading-text`.
69
+ *
70
+ * @event {HelixPlotChangeEvent} helix-plot-change - The blocks or the block the keys rest on changed, which the renderer is told. It stays on the chart.
71
+ * @event {HelixPlotTurnEvent} helix-plot-turn - Shift with an arrow asked the view to turn, by a step across or up.
72
+ * @event {HelixReadingChangeEvent} helix-reading-change - The reading moved, or was put away: `index` is the row, or `-1` for none, with its `label` and the `pointerType` that moved it.
73
+ * @event {HelixReadingPressEvent} helix-reading-press - A block was clicked or pressed with Enter or Space, with the same detail as `helix-reading-change`.
74
+ *
75
+ * @csspart axis-name - The height's name, along its edge of the box, in the chart's own drawing.
76
+ * @csspart block - One block, its faces in its group's color.
77
+ * @csspart block-active - The block the pointer or the keys rest on. Set alongside `block`.
78
+ * @csspart drawing - The chart's own drawing in SVG: the box, its grid and numbers, and the blocks.
79
+ * @csspart empty - The words when the table has no readings: the `empty` slot, falling back to `empty-text`.
80
+ * @csspart face - One face of a block the view shows, shaded by which way it faces.
81
+ * @csspart fallback - The box the chart's own drawing fills, shown until a renderer has drawn and where none is connected. Hidden from screen readers.
82
+ * @csspart grid - The box's edges and its grid, in the chart's own drawing.
83
+ * @csspart live - The readout: a polite live region that says the item the keys moved to. Hide it visually.
84
+ * @csspart loading - The words while `loading` is set and there are no readings.
85
+ * @csspart mark - The invisible point the tooltip is anchored to, where the renderer draws the reading.
86
+ * @csspart plot - The box the drawing fills, which takes focus to be read by key. It is named by the host's `aria-labelledby` or `aria-label`, then by `label`, then by the caption of the table.
87
+ * @csspart ring - The outline around the block the pointer or the keys rest on, painted after it, so the blocks in front of it cover it.
88
+ * @csspart summary - The number of items and groups and the range of their sizes, written as a sentence for screen readers, which describes the plot. Hide it visually.
89
+ * @csspart table - The readings as a table, for a screen reader, rendered only where they were drawn from `data`. Hide it visually.
90
+ * @csspart tick - A height at a tick, along its edge of the box, in the chart's own drawing.
91
+ * @csspart tooltip - The bubble, forwarded from `Tooltip`.
92
+ * @csspart tooltip-anchor - The `Tooltip` element itself.
93
+ * @csspart tooltip-arrow - The bubble's point, forwarded from `Tooltip`.
94
+ * @csspart tooltip-arrow-bottom - The point while the bubble is below the reading, on its top edge. Set alongside `tooltip-arrow`.
95
+ * @csspart tooltip-arrow-left - The point while the bubble is left of the reading, on its right edge. Set alongside `tooltip-arrow`.
96
+ * @csspart tooltip-arrow-right - The point while the bubble is right of the reading, on its left edge. Set alongside `tooltip-arrow`.
97
+ * @csspart tooltip-arrow-top - The point while the bubble is above the reading, on its bottom edge. Set alongside `tooltip-arrow`.
98
+ * @csspart tooltip-bottom - The bubble while it is below the reading. Set alongside `tooltip`.
99
+ * @csspart tooltip-cell - One column's name and value inside the tooltip.
100
+ * @csspart tooltip-cell-current - The cell a chart's series keys rest on, which every chart's tooltip can mark. This chart marks none, since its readout says the measure. Set alongside `tooltip-cell`.
101
+ * @csspart tooltip-label - The row's own name inside the tooltip.
102
+ * @csspart tooltip-left - The bubble while it is left of the reading. Set alongside `tooltip`.
103
+ * @csspart tooltip-name - A column's name inside the tooltip.
104
+ * @csspart tooltip-right - The bubble while it is right of the reading. Set alongside `tooltip`.
105
+ * @csspart tooltip-top - The bubble while it is above the reading. Set alongside `tooltip`.
106
+ * @csspart tooltip-value - A column's value inside the tooltip.
107
+ *
108
+ * @cssproperty --spatial-treemap-shade - How far a block's face turns from the light, from 0 for its top. The component writes it on each face, and the stylesheet that shades the face reads it.
109
+ *
110
+ * @cssstate active - While a block is shown, under the pointer or the keys.
111
+ * @cssstate drawn - While a renderer has drawn the blocks, and the chart's own drawing is hidden.
112
+ * @cssstate empty - While the `empty` part stands in place of the readings.
113
+ * @cssstate loading - While the `loading` part stands in place of the readings.
114
+ */
115
+ export declare class HelixHeadlessSpatialTreemap extends HelixHeadlessSpatialTreemap_base {
116
+ /**
117
+ * The key this family's words are registered under, its styled tag:
118
+ * `registerWords('de', { 'helix-spatial-treemap': { emptyText: 'Keine Werte' } })`.
119
+ */
120
+ static words: string;
121
+ /** The column of text that gathers the rows into groups, by its heading. None by default. */
122
+ groupBy: string;
123
+ /**
124
+ * Draws no box: no edges, grid, numbers, or names, so the readings stand
125
+ * alone and fill the plot, as a picture on a product's own page does. The
126
+ * table, the summary, the tooltip, and the keys still carry every value,
127
+ * and a renderer draws no box either.
128
+ */
129
+ noBox: boolean;
130
+ /** The plot's name where the chart has none: no `aria-label`, `label`, or table caption. */
131
+ plotLabel: string;
132
+ /**
133
+ * The `summary` part's sentence. `{count}` and `{groups}` are the number
134
+ * of items and groups, written in the locale, and `{low}` and `{high}` the
135
+ * smallest and the largest size.
136
+ */
137
+ summaryLabel: string;
138
+ /** Whether a renderer has drawn the blocks, which hides the chart's own drawing. */
139
+ private rendered;
140
+ /** Where the chart's own drawing is seen from, which a drag or Shift with an arrow turns. */
141
+ private camera;
142
+ /** A drag across the chart's own drawing, which turns its view. */
143
+ private readonly drag;
144
+ /** Where the renderer draws the reading, which the tooltip points at. */
145
+ private place;
146
+ /** The field last told, kept so a change of it can be told. */
147
+ private last;
148
+ /** The block the keys rested on last, so a change of it can be told. */
149
+ private told;
150
+ /** Carries a host `aria-labelledby` and `aria-describedby` to the plot. */
151
+ protected readonly aria: AriaForwardController;
152
+ /**
153
+ * The table read as blocks. **The first numeric column is each block's
154
+ * size, and the second its height.** A renderer reads it.
155
+ */
156
+ get field(): TreemapField;
157
+ /** The field last read, and the rows, columns, and group column it was read from. */
158
+ private memo;
159
+ /** The block the keys or the pointer rest on, as its place in `field.blocks`, or `-1`. */
160
+ get active(): number;
161
+ /** The number of blocks, which the keys walk. */
162
+ get readings(): number;
163
+ /**
164
+ * Says whether a renderer has drawn the blocks, which hides the chart's own
165
+ * drawing or shows it again. Called by the connector.
166
+ */
167
+ rendererDrawn(on?: boolean): void;
168
+ /**
169
+ * Puts the reading on the block at `index`, or lets it go with `-1`, as a
170
+ * pointer resting on it in the renderer's drawing or a press there does.
171
+ * A touch keeps it until a tap lands elsewhere, and a mouse leaving a
172
+ * reading the keys moved to leaves it. Called by the connector.
173
+ */
174
+ requestActive(index: number, kind?: 'mouse' | 'pen' | 'touch'): void;
175
+ /**
176
+ * Says where the renderer draws the reading, as fractions of the plot from
177
+ * its top left, or `undefined` while it draws none. The tooltip points
178
+ * there. Called by the connector.
179
+ */
180
+ placeReading(at: {
181
+ x: number;
182
+ y: number;
183
+ } | undefined): void;
184
+ connectedCallback(): void;
185
+ protected updated(changed: PropertyValues): void;
186
+ /**
187
+ * Shift with an arrow turns the view, the chart's own drawing and the
188
+ * renderer's alike, and moves no reading.
189
+ */
190
+ private readonly onPlotKeydown;
191
+ /** The block a pointer event is over, or `-1`: the one in front, since the blocks are painted back to front. */
192
+ private blockAt;
193
+ /** A mouse or a pen over the chart's own drawing puts the reading on the block it rests on. */
194
+ private readonly onDrawingMove;
195
+ private readonly onDrawingDown;
196
+ /** A press the browser took back, such as for a scroll, which ends a drag as a release does. */
197
+ private readonly onDrawingCancel;
198
+ private readonly onDrawingLeave;
199
+ /**
200
+ * A tap is a touch reader's hover, unless it was a drag, which turned the
201
+ * view: it shows the block under it until a tap lands elsewhere.
202
+ */
203
+ private readonly onDrawingTap;
204
+ protected render(): TemplateResult;
205
+ /**
206
+ * The blocks in 3D, in SVG: the box with its height's grid and numbers, and
207
+ * each block on its part of the floor, standing from zero to its height,
208
+ * painted back to front, in its group's color and shaded by which way each
209
+ * face turns. The chart's own drawing, until a renderer has drawn and where
210
+ * none is connected.
211
+ */
212
+ private renderFallback;
213
+ /** One block, its faces in its group's color, each shaded by which way it faces. */
214
+ private renderBlock;
215
+ /** The readout: the item's row in words, once the keys have moved to one. */
216
+ private renderLive;
217
+ /**
218
+ * The reading's row in the tooltip, pointed at its block in the chart's own
219
+ * drawing, which holds it there.
220
+ */
221
+ private renderOwnTooltip;
222
+ /**
223
+ * The reading's row in the tooltip every chart shows, pointed at where the
224
+ * renderer draws it. Only once a renderer has drawn; until then the
225
+ * chart's own drawing holds the tooltip at the block.
226
+ */
227
+ private renderTooltip;
228
+ /** What the plot shows, in a sentence, which describes the plot. */
229
+ private renderSummary;
230
+ }
231
+ declare global {
232
+ interface HTMLElementTagNameMap {
233
+ 'helix-headless-spatial-treemap': HelixHeadlessSpatialTreemap;
234
+ }
235
+ }
236
+ export {};