@fusion.dev/helix-headless 0.0.0-dev → 0.0.2
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/custom-elements.json +4513 -4483
- package/dist/accordion/item/accordion-item.d.ts +13 -15
- package/dist/accordion/item/accordion-item.js +15 -17
- package/dist/announcement/root/announcement-root.d.ts +7 -25
- package/dist/announcement/root/announcement-root.js +7 -20
- package/dist/app-header/root/app-header-root.d.ts +10 -17
- package/dist/app-header/root/app-header-root.js +9 -18
- package/dist/avatar/group/avatar-group.d.ts +10 -19
- package/dist/avatar/group/avatar-group.js +12 -17
- package/dist/avatar/root/avatar-root.d.ts +8 -8
- package/dist/avatar/root/avatar-root.js +19 -20
- package/dist/badge/root/badge-root.d.ts +6 -6
- package/dist/badge/root/badge-root.js +13 -13
- package/dist/bar-chart/root/bar-chart-root.d.ts +21 -29
- package/dist/bar-chart/root/bar-chart-root.js +42 -57
- package/dist/breadcrumbs/breadcrumb/breadcrumb.d.ts +12 -18
- package/dist/breadcrumbs/breadcrumb/breadcrumb.js +13 -16
- package/dist/breadcrumbs/root/breadcrumbs-root.d.ts +9 -28
- package/dist/breadcrumbs/root/breadcrumbs-root.js +9 -28
- package/dist/button/root/button-root.d.ts +84 -94
- package/dist/button/root/button-root.js +82 -92
- package/dist/callout/root/callout-root.d.ts +4 -5
- package/dist/carousel/root/carousel-root.d.ts +59 -71
- package/dist/carousel/root/carousel-root.js +73 -101
- package/dist/chat/composer/chat-composer.d.ts +29 -33
- package/dist/chat/composer/chat-composer.js +40 -44
- package/dist/chat/message/chat-message.d.ts +25 -25
- package/dist/chat/message/chat-message.js +26 -26
- package/dist/chat/root/chat-root.d.ts +28 -41
- package/dist/chat/root/chat-root.js +27 -40
- package/dist/checkbox/root/checkbox-root.d.ts +10 -12
- package/dist/checkbox/root/checkbox-root.js +29 -35
- package/dist/checkbox-group/root/checkbox-group-root.d.ts +32 -45
- package/dist/checkbox-group/root/checkbox-group-root.js +53 -79
- package/dist/code-block/root/code-block-root.d.ts +3 -4
- package/dist/code-block/root/code-block-root.js +8 -12
- package/dist/color-input/root/color-input-root.d.ts +36 -37
- package/dist/color-input/root/color-input-root.js +29 -34
- package/dist/color-picker/color.d.ts +7 -8
- package/dist/color-picker/color.js +7 -8
- package/dist/color-picker/root/color-picker-root.d.ts +55 -57
- package/dist/color-picker/root/color-picker-root.js +60 -64
- package/dist/combobox/root/combobox-root.d.ts +53 -58
- package/dist/combobox/root/combobox-root.js +85 -94
- package/dist/command/root/command-root.d.ts +8 -8
- package/dist/command/root/command-root.js +29 -33
- package/dist/copy-button/root/copy-button-root.d.ts +21 -24
- package/dist/copy-button/root/copy-button-root.js +25 -35
- package/dist/data-table/root/data-table-root.d.ts +77 -76
- package/dist/data-table/root/data-table-root.js +95 -84
- package/dist/data-table/root/order.d.ts +2 -2
- package/dist/data-table/root/order.js +1 -3
- package/dist/date-input/root/date-input-root.d.ts +88 -93
- package/dist/date-input/root/date-input-root.js +147 -158
- package/dist/date-picker/root/date-picker-root.d.ts +75 -83
- package/dist/date-picker/root/date-picker-root.js +120 -143
- package/dist/dialog/root/dialog-root.d.ts +41 -24
- package/dist/dialog/root/dialog-root.js +47 -24
- package/dist/divider/root/divider-root.d.ts +5 -6
- package/dist/divider/root/divider-root.js +4 -5
- package/dist/donut-chart/root/donut-chart-root.d.ts +22 -25
- package/dist/donut-chart/root/donut-chart-root.js +37 -51
- package/dist/drawer/root/drawer-root.d.ts +24 -29
- package/dist/drawer/root/drawer-root.js +15 -22
- package/dist/drilldown/item/drilldown-item.d.ts +14 -14
- package/dist/drilldown/item/drilldown-item.js +24 -26
- package/dist/drilldown/root/drilldown-root.d.ts +8 -10
- package/dist/drilldown/root/drilldown-root.js +6 -7
- package/dist/element-events.generated.js +1 -1
- package/dist/file-input/root/file-input-root.d.ts +20 -24
- package/dist/file-input/root/file-input-root.js +42 -57
- package/dist/format-date/root/format-date-root.js +1 -1
- package/dist/heatmap/root/buckets.d.ts +8 -8
- package/dist/heatmap/root/buckets.js +8 -8
- package/dist/heatmap/root/heatmap-root.d.ts +57 -63
- package/dist/heatmap/root/heatmap-root.js +72 -83
- package/dist/icon/root/icon-root.d.ts +4 -4
- package/dist/icon/root/icon-root.js +9 -9
- package/dist/icon-button/root/icon-button-root.d.ts +4 -6
- package/dist/icon-button/root/icon-button-root.js +4 -6
- package/dist/image/root/image-root.d.ts +49 -59
- package/dist/image/root/image-root.js +55 -65
- package/dist/index.d.ts +5 -5
- package/dist/index.js +5 -5
- package/dist/input/root/input-root.d.ts +61 -85
- package/dist/input/root/input-root.js +79 -106
- package/dist/kbd/root/kbd-root.d.ts +8 -7
- package/dist/kbd/root/kbd-root.js +71 -11
- package/dist/legend/root/legend-root.d.ts +1 -1
- package/dist/legend/root/legend-root.js +4 -5
- package/dist/line-chart/root/line-chart-root.d.ts +26 -30
- package/dist/line-chart/root/line-chart-root.js +10 -10
- package/dist/list/item/list-item.d.ts +14 -18
- package/dist/list/item/list-item.js +18 -22
- package/dist/list/root/list-root.d.ts +4 -4
- package/dist/list/root/list-root.js +3 -3
- package/dist/listbox/root/listbox-root.d.ts +31 -58
- package/dist/listbox/root/listbox-root.js +66 -109
- package/dist/megamenu/root/megamenu-root.d.ts +34 -35
- package/dist/megamenu/root/megamenu-root.js +53 -58
- package/dist/menu/item/menu-item.d.ts +39 -53
- package/dist/menu/item/menu-item.js +50 -64
- package/dist/menu/root/menu-root.d.ts +30 -40
- package/dist/menu/root/menu-root.js +49 -82
- package/dist/meter/root/meter-root.d.ts +49 -53
- package/dist/meter/root/meter-root.js +22 -27
- package/dist/navigation/root/navigation-root.js +11 -19
- package/dist/notifications/notification/notification.d.ts +16 -22
- package/dist/notifications/notification/notification.js +21 -27
- package/dist/notifications/root/notifications-root.d.ts +31 -39
- package/dist/notifications/root/notifications-root.js +41 -52
- package/dist/number-input/root/number-input-root.d.ts +31 -33
- package/dist/number-input/root/number-input-root.js +37 -39
- package/dist/option/root/option-root.d.ts +73 -74
- package/dist/option/root/option-root.js +62 -64
- package/dist/outline/root/outline-root.d.ts +38 -44
- package/dist/outline/root/outline-root.js +66 -82
- package/dist/pagination/root/pagination-root.d.ts +87 -92
- package/dist/pagination/root/pagination-root.js +116 -123
- package/dist/pagination/size/pagination-size.d.ts +31 -50
- package/dist/pagination/size/pagination-size.js +35 -55
- package/dist/pagination/summary/pagination-summary.d.ts +12 -12
- package/dist/pagination/summary/pagination-summary.js +18 -18
- package/dist/pin-input/root/pin-input-root.d.ts +53 -70
- package/dist/pin-input/root/pin-input-root.js +74 -94
- package/dist/popover/root/popover-root.d.ts +15 -20
- package/dist/popover/root/popover-root.js +19 -36
- package/dist/progress/root/progress-root.d.ts +12 -14
- package/dist/progress/root/progress-root.js +22 -25
- package/dist/qr-code/root/qr-code-root.d.ts +11 -11
- package/dist/qr-code/root/qr-code-root.js +12 -14
- package/dist/radio/group/radio-group.js +19 -26
- package/dist/radio/root/radio-root.d.ts +12 -13
- package/dist/radio/root/radio-root.js +12 -13
- package/dist/rating/root/rating-root.d.ts +25 -30
- package/dist/rating/root/rating-root.js +43 -50
- package/dist/scroll-area/root/scroll-area-root.d.ts +11 -14
- package/dist/scroll-area/root/scroll-area-root.js +39 -33
- package/dist/select/root/select-root.d.ts +7 -12
- package/dist/select/root/select-root.js +40 -55
- package/dist/slider/root/slider-root.d.ts +53 -60
- package/dist/slider/root/slider-root.js +74 -85
- package/dist/sparkline/root/sparkline-root.d.ts +43 -47
- package/dist/sparkline/root/sparkline-root.js +23 -32
- package/dist/speed-dial/item/speed-dial-item.d.ts +6 -6
- package/dist/speed-dial/item/speed-dial-item.js +9 -9
- package/dist/speed-dial/root/speed-dial-root.d.ts +21 -25
- package/dist/speed-dial/root/speed-dial-root.js +32 -40
- package/dist/splitter/root/splitter-root.d.ts +98 -111
- package/dist/splitter/root/splitter-root.js +96 -123
- package/dist/stat/root/stat-root.d.ts +2 -7
- package/dist/stat/root/stat-root.js +0 -5
- package/dist/steps/step/step.d.ts +19 -24
- package/dist/steps/step/step.js +27 -32
- package/dist/switch/root/switch-root.js +2 -2
- package/dist/table/column/table-column.d.ts +54 -60
- package/dist/table/column/table-column.js +95 -68
- package/dist/table/root/table-root.d.ts +5 -6
- package/dist/table/root/table-root.js +7 -10
- package/dist/tabs/panel/tab-panel.d.ts +21 -25
- package/dist/tabs/panel/tab-panel.js +25 -29
- package/dist/tabs/root/tabs-root.d.ts +25 -34
- package/dist/tabs/root/tabs-root.js +22 -28
- package/dist/tabs/tab/tab.d.ts +12 -12
- package/dist/tabs/tab/tab.js +19 -20
- package/dist/textarea/root/textarea-root.d.ts +36 -36
- package/dist/textarea/root/textarea-root.js +43 -47
- package/dist/time-input/root/time-input-root.d.ts +58 -68
- package/dist/time-input/root/time-input-root.js +62 -77
- package/dist/time-picker/root/time-picker-root.d.ts +73 -79
- package/dist/time-picker/root/time-picker-root.js +72 -84
- package/dist/timeline/item/timeline-item.d.ts +8 -11
- package/dist/timeline/item/timeline-item.js +8 -11
- package/dist/timeline/root/timeline-root.d.ts +5 -7
- package/dist/timeline/root/timeline-root.js +5 -7
- package/dist/toast/item/toast-item.d.ts +9 -27
- package/dist/toast/item/toast-item.js +19 -41
- package/dist/toast/root/toast-root.d.ts +10 -14
- package/dist/toast/root/toast-root.js +4 -5
- package/dist/toggle/group/toggle-group.d.ts +6 -15
- package/dist/toggle/group/toggle-group.js +21 -36
- package/dist/toggle/root/toggle-root.d.ts +26 -27
- package/dist/toggle/root/toggle-root.js +30 -31
- package/dist/toolbar/root/toolbar-root.d.ts +7 -10
- package/dist/toolbar/root/toolbar-root.js +10 -14
- package/dist/tooltip/root/tooltip-root.d.ts +52 -59
- package/dist/tooltip/root/tooltip-root.js +98 -93
- package/dist/tour/root/tour-root.d.ts +19 -23
- package/dist/tour/root/tour-root.js +31 -41
- package/dist/tour/stop/tour-stop.d.ts +14 -15
- package/dist/tour/stop/tour-stop.js +31 -34
- package/dist/tree/item/tree-item.d.ts +30 -35
- package/dist/tree/item/tree-item.js +43 -55
- package/dist/tree/root/tree-root.d.ts +7 -10
- package/dist/tree/root/tree-root.js +33 -42
- package/dist/trend/root/trend-root.d.ts +3 -5
- package/dist/trend/root/trend-root.js +5 -9
- package/dist/video/root/video-root.d.ts +100 -124
- package/dist/video/root/video-root.js +142 -176
- package/dist/video-playlist/item/video-playlist-item.d.ts +16 -16
- package/dist/video-playlist/item/video-playlist-item.js +24 -24
- package/dist/video-playlist/menu/video-playlist-menu.d.ts +5 -8
- package/dist/video-playlist/menu/video-playlist-menu.js +20 -29
- package/dist/video-playlist/root/video-playlist-root.d.ts +16 -11
- package/dist/video-playlist/root/video-playlist-root.js +21 -25
- package/dist/virtual-list/root/virtual-list-root.d.ts +8 -12
- package/dist/virtual-list/root/virtual-list-root.js +11 -16
- package/jsx.d.ts +9797 -12561
- package/package.json +6 -6
- package/vue.d.ts +2684 -3228
|
@@ -3,19 +3,19 @@ import { nothing, type PropertyValues, type TemplateResult } from 'lit';
|
|
|
3
3
|
import '../../tooltip/index.js';
|
|
4
4
|
declare const HelixHeadlessHeatmap_base: typeof HelixElement & (new (...args: any[]) => import("@fusion.dev/helix-core").MixinChartSourceInterface);
|
|
5
5
|
/**
|
|
6
|
-
* @summary A strip of cells
|
|
6
|
+
* @summary A strip of cells colored by how each one went: uptime, contributions, activity.
|
|
7
7
|
*
|
|
8
8
|
* @description
|
|
9
9
|
* **One family covers both readings, and the split people expect does not
|
|
10
|
-
* exist.**
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
10
|
+
* exist.** The argument for two is that a contribution graph needs a continuous
|
|
11
|
+
* ramp where uptime needs a category. GitHub's contribution graph is five
|
|
12
|
+
* discrete levels rather than a gradient, so a cell that takes a tone covers
|
|
13
|
+
* both: `rows="1"` is a status strip, `rows="7"` is a contribution graph, and
|
|
14
|
+
* heatmap is the name of that.
|
|
15
15
|
*
|
|
16
16
|
* **What it cannot be is a bar chart with flat values**, and the data model is
|
|
17
17
|
* what closes that rather than taste: chart color is per *series* everywhere
|
|
18
|
-
* else here, `--chart-series-1` through `-15`, so ninety differently
|
|
18
|
+
* else here, `--chart-series-1` through `-15`, so ninety differently colored
|
|
19
19
|
* cells would be ninety series.
|
|
20
20
|
*
|
|
21
21
|
* The data is a real `<table>` named by `for`, the same convention every chart
|
|
@@ -35,13 +35,12 @@ declare const HelixHeadlessHeatmap_base: typeof HelixElement & (new (...args: an
|
|
|
35
35
|
* so what a name is worth is the answering tier's to say: `helix/styled` points
|
|
36
36
|
* the semantic names at the theme's status colors and the numbered ones at a
|
|
37
37
|
* ramp, and a consumer on `headless` declares the same names as whatever they
|
|
38
|
-
* like.
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
* `background-color: var(--heatmap-tone, …)`
|
|
42
|
-
* cell
|
|
43
|
-
*
|
|
44
|
-
* same fault for the same reason.
|
|
38
|
+
* like. Reaching for `var(--helix-color-${tone})` here is the dependency the
|
|
39
|
+
* tiers exist to prevent, and it fails loudly rather than quietly: off-tier that
|
|
40
|
+
* property is not undefined, it is *invalid*, so
|
|
41
|
+
* `background-color: var(--heatmap-tone, …)` declines its own fallback and every
|
|
42
|
+
* cell comes out transparent, leaving a blank page under a row of footer text.
|
|
43
|
+
* `shared/chart/series.css` records the same fault in Bar Chart.
|
|
45
44
|
*
|
|
46
45
|
* **On a narrow container it draws fewer cells rather than thinner ones.**
|
|
47
46
|
* Ninety cells in 320 pixels is three and a half pixels each, which is a smear
|
|
@@ -83,6 +82,7 @@ declare const HelixHeadlessHeatmap_base: typeof HelixElement & (new (...args: an
|
|
|
83
82
|
* @cssproperty --heatmap-cell-radius - How far a cell's corners are rounded.
|
|
84
83
|
* @cssproperty --heatmap-cell-size - The size a cell wants on both axes, where neither is given its own.
|
|
85
84
|
* @cssproperty --heatmap-gap - Space between cells. Zero is a continuous field rather than a grid of tiles.
|
|
85
|
+
* @cssproperty --heatmap-rows - How many rows the strip lays out. Written by the component from the data, read by the tier that draws it.
|
|
86
86
|
* @cssproperty --heatmap-tone - The tone of the cell this is set on. Written by the component, read by the sheet that paints.
|
|
87
87
|
* @cssproperty --heatmap-tone-1 - The quietest step of the magnitude ramp, reached by `tones="1 …"`.
|
|
88
88
|
* @cssproperty --heatmap-tone-2 - The second step of the magnitude ramp.
|
|
@@ -98,6 +98,35 @@ declare const HelixHeadlessHeatmap_base: typeof HelixElement & (new (...args: an
|
|
|
98
98
|
* @cssproperty --heatmap-tone-warning - What `warning` is worth.
|
|
99
99
|
*/
|
|
100
100
|
export declare class HelixHeadlessHeatmap extends HelixHeadlessHeatmap_base {
|
|
101
|
+
/**
|
|
102
|
+
* Shown when the table has no readings in it.
|
|
103
|
+
*/
|
|
104
|
+
emptyText: string;
|
|
105
|
+
/**
|
|
106
|
+
* Space between cells, in CSS pixels, for the same reason `min-cell` is a
|
|
107
|
+
* number.
|
|
108
|
+
*/
|
|
109
|
+
gap: number;
|
|
110
|
+
/**
|
|
111
|
+
* The smallest a cell may get before the strip draws fewer of them, in CSS pixels.
|
|
112
|
+
*
|
|
113
|
+
* **Set this only to overrule what the strip actually draws.** The arithmetic
|
|
114
|
+
* needs a width in pixels and the width is a length the stylesheet resolves,
|
|
115
|
+
* so a number written here that disagrees with the sheet is a promise the
|
|
116
|
+
* consumer has to keep by hand, and the one number a summary is told to trust
|
|
117
|
+
* is the one it gets wrong.
|
|
118
|
+
*
|
|
119
|
+
* The strip measures itself, so `--heatmap-cell-inline-size` and `--heatmap-gap` are
|
|
120
|
+
* enough on their own and these two are the estimate used until the first
|
|
121
|
+
* measurement lands. Writing the attribute pins the value and stops the
|
|
122
|
+
* measurement being consulted, which is what a container query or a transition
|
|
123
|
+
* on the cell size wants, where what is drawn this frame is not what the
|
|
124
|
+
* arithmetic should plan around.
|
|
125
|
+
*
|
|
126
|
+
* Zero turns the dropping off altogether, which is right for a strip in a
|
|
127
|
+
* container that cannot get narrow.
|
|
128
|
+
*/
|
|
129
|
+
minCell: number;
|
|
101
130
|
/**
|
|
102
131
|
* How many rows the strip has.
|
|
103
132
|
*
|
|
@@ -124,42 +153,11 @@ export declare class HelixHeadlessHeatmap extends HelixHeadlessHeatmap_base {
|
|
|
124
153
|
* **`"1"` through `"5"` are a ramp and everything else is a category**, which
|
|
125
154
|
* is the distinction a heatmap lives or dies on: magnitude has to be one hue
|
|
126
155
|
* getting louder, because a reader compares two cells by weight and cannot
|
|
127
|
-
* compare two hues at all.
|
|
128
|
-
*
|
|
129
|
-
*
|
|
156
|
+
* compare two hues at all. `tones="surface info accent success primary"` for a
|
|
157
|
+
* commit count is five unrelated hues for five amounts, which is confetti with
|
|
158
|
+
* no order in it.
|
|
130
159
|
*/
|
|
131
160
|
tones: string;
|
|
132
|
-
/**
|
|
133
|
-
* The smallest a cell may get before the strip draws fewer of them, in CSS pixels.
|
|
134
|
-
*
|
|
135
|
-
* **Set this only to overrule what the strip actually draws.** The arithmetic
|
|
136
|
-
* needs a width in pixels and the width is a length the stylesheet resolves,
|
|
137
|
-
* so for as long as this was the only answer it was a promise the consumer had
|
|
138
|
-
* to keep by hand: it sat at 8 against a sheet drawing 12, the arithmetic
|
|
139
|
-
* believed a cell cost 10 pixels where it cost 16, and a ninety day strip ran
|
|
140
|
-
* 940 pixels wide out of a 592 pixel box while `visible` reported 59. The one
|
|
141
|
-
* number a summary is told to trust was the number that was wrong.
|
|
142
|
-
*
|
|
143
|
-
* The strip is measured now, so `--heatmap-cell-inline-size` and `--heatmap-gap` are
|
|
144
|
-
* enough on their own and these two are the estimate used until the first
|
|
145
|
-
* measurement lands. Writing the attribute pins the value and stops the
|
|
146
|
-
* measurement being consulted, which is what a container query or a transition
|
|
147
|
-
* on the cell size wants, where what is drawn this frame is not what the
|
|
148
|
-
* arithmetic should plan around.
|
|
149
|
-
*
|
|
150
|
-
* Zero turns the dropping off altogether, which is right for a strip in a
|
|
151
|
-
* container that cannot get narrow.
|
|
152
|
-
*/
|
|
153
|
-
minCell: number;
|
|
154
|
-
/**
|
|
155
|
-
* Space between cells, in CSS pixels, for the same reason `min-cell` is a
|
|
156
|
-
* number.
|
|
157
|
-
*/
|
|
158
|
-
gap: number;
|
|
159
|
-
/**
|
|
160
|
-
* Shown when the table has no readings in it.
|
|
161
|
-
*/
|
|
162
|
-
emptyText: string;
|
|
163
161
|
/**
|
|
164
162
|
* How many cells are actually drawn.
|
|
165
163
|
*
|
|
@@ -265,13 +263,11 @@ export declare class HelixHeadlessHeatmap extends HelixHeadlessHeatmap_base {
|
|
|
265
263
|
/**
|
|
266
264
|
* Says on the footer whether any of its three slots holds anything.
|
|
267
265
|
*
|
|
268
|
-
* **
|
|
269
|
-
*
|
|
270
|
-
*
|
|
271
|
-
*
|
|
272
|
-
*
|
|
273
|
-
* fill, and would have been false either way. Both verified in a browser. A
|
|
274
|
-
* heatmap with no legend and no summary still reserved the row for one.
|
|
266
|
+
* **A stylesheet cannot ask.** `[part="footer"]:not(:has(slot:has(*)))` is two
|
|
267
|
+
* faults at once: `:has()` may not be nested inside `:has()`, so the selector
|
|
268
|
+
* fails to parse and the rule is discarded whole; and a slot's assigned nodes
|
|
269
|
+
* are not its DOM children, so `slot:has(*)` reports fallback content rather
|
|
270
|
+
* than the fill, and is false either way. Both verified in a browser.
|
|
275
271
|
*/
|
|
276
272
|
private markEmpty;
|
|
277
273
|
/**
|
|
@@ -289,15 +285,13 @@ export declare class HelixHeadlessHeatmap extends HelixHeadlessHeatmap_base {
|
|
|
289
285
|
/**
|
|
290
286
|
* The bubble over the cell a pointer is resting on.
|
|
291
287
|
*
|
|
292
|
-
* **One tooltip that moves, which is what every other chart here does
|
|
293
|
-
*
|
|
294
|
-
*
|
|
295
|
-
*
|
|
296
|
-
*
|
|
297
|
-
* one however many readings there are. `drawTooltip` is their shared markup
|
|
298
|
-
* and this is the fourth caller.
|
|
288
|
+
* **One tooltip that moves, which is what every other chart here does.** Bar
|
|
289
|
+
* Chart, Line Chart and Donut Chart each render a single anchor against an
|
|
290
|
+
* invisible mark and move the mark, so the count is one however many readings
|
|
291
|
+
* there are, rather than one element per cell. `drawTooltip` is their shared
|
|
292
|
+
* markup and this is the fourth caller.
|
|
299
293
|
*
|
|
300
|
-
* What it buys over
|
|
294
|
+
* What it buys over a native `title` is the row rather than the reading.
|
|
301
295
|
* `sourceRows` carries every column of the table including the ones nothing
|
|
302
296
|
* was plotted from, so a cell reads "11 Jun 2026 / Uptime 81.2% / Note Partial
|
|
303
297
|
* outage" where `title` could only ever say the two values this component
|
|
@@ -10,19 +10,19 @@ import { property, state } from 'lit/decorators.js';
|
|
|
10
10
|
import '../../tooltip/index.js';
|
|
11
11
|
import { fits, numbers, toneOf, words } from './buckets.js';
|
|
12
12
|
/**
|
|
13
|
-
* @summary A strip of cells
|
|
13
|
+
* @summary A strip of cells colored by how each one went: uptime, contributions, activity.
|
|
14
14
|
*
|
|
15
15
|
* @description
|
|
16
16
|
* **One family covers both readings, and the split people expect does not
|
|
17
|
-
* exist.**
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
17
|
+
* exist.** The argument for two is that a contribution graph needs a continuous
|
|
18
|
+
* ramp where uptime needs a category. GitHub's contribution graph is five
|
|
19
|
+
* discrete levels rather than a gradient, so a cell that takes a tone covers
|
|
20
|
+
* both: `rows="1"` is a status strip, `rows="7"` is a contribution graph, and
|
|
21
|
+
* heatmap is the name of that.
|
|
22
22
|
*
|
|
23
23
|
* **What it cannot be is a bar chart with flat values**, and the data model is
|
|
24
24
|
* what closes that rather than taste: chart color is per *series* everywhere
|
|
25
|
-
* else here, `--chart-series-1` through `-15`, so ninety differently
|
|
25
|
+
* else here, `--chart-series-1` through `-15`, so ninety differently colored
|
|
26
26
|
* cells would be ninety series.
|
|
27
27
|
*
|
|
28
28
|
* The data is a real `<table>` named by `for`, the same convention every chart
|
|
@@ -42,13 +42,12 @@ import { fits, numbers, toneOf, words } from './buckets.js';
|
|
|
42
42
|
* so what a name is worth is the answering tier's to say: `helix/styled` points
|
|
43
43
|
* the semantic names at the theme's status colors and the numbered ones at a
|
|
44
44
|
* ramp, and a consumer on `headless` declares the same names as whatever they
|
|
45
|
-
* like.
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
* `background-color: var(--heatmap-tone, …)`
|
|
49
|
-
* cell
|
|
50
|
-
*
|
|
51
|
-
* same fault for the same reason.
|
|
45
|
+
* like. Reaching for `var(--helix-color-${tone})` here is the dependency the
|
|
46
|
+
* tiers exist to prevent, and it fails loudly rather than quietly: off-tier that
|
|
47
|
+
* property is not undefined, it is *invalid*, so
|
|
48
|
+
* `background-color: var(--heatmap-tone, …)` declines its own fallback and every
|
|
49
|
+
* cell comes out transparent, leaving a blank page under a row of footer text.
|
|
50
|
+
* `shared/chart/series.css` records the same fault in Bar Chart.
|
|
52
51
|
*
|
|
53
52
|
* **On a narrow container it draws fewer cells rather than thinner ones.**
|
|
54
53
|
* Ninety cells in 320 pixels is three and a half pixels each, which is a smear
|
|
@@ -90,6 +89,7 @@ import { fits, numbers, toneOf, words } from './buckets.js';
|
|
|
90
89
|
* @cssproperty --heatmap-cell-radius - How far a cell's corners are rounded.
|
|
91
90
|
* @cssproperty --heatmap-cell-size - The size a cell wants on both axes, where neither is given its own.
|
|
92
91
|
* @cssproperty --heatmap-gap - Space between cells. Zero is a continuous field rather than a grid of tiles.
|
|
92
|
+
* @cssproperty --heatmap-rows - How many rows the strip lays out. Written by the component from the data, read by the tier that draws it.
|
|
93
93
|
* @cssproperty --heatmap-tone - The tone of the cell this is set on. Written by the component, read by the sheet that paints.
|
|
94
94
|
* @cssproperty --heatmap-tone-1 - The quietest step of the magnitude ramp, reached by `tones="1 …"`.
|
|
95
95
|
* @cssproperty --heatmap-tone-2 - The second step of the magnitude ramp.
|
|
@@ -107,6 +107,35 @@ import { fits, numbers, toneOf, words } from './buckets.js';
|
|
|
107
107
|
let HelixHeadlessHeatmap = class HelixHeadlessHeatmap extends MixinChartSource(HelixElement) {
|
|
108
108
|
constructor() {
|
|
109
109
|
super(...arguments);
|
|
110
|
+
/**
|
|
111
|
+
* Shown when the table has no readings in it.
|
|
112
|
+
*/
|
|
113
|
+
this.emptyText = 'No readings';
|
|
114
|
+
/**
|
|
115
|
+
* Space between cells, in CSS pixels, for the same reason `min-cell` is a
|
|
116
|
+
* number.
|
|
117
|
+
*/
|
|
118
|
+
this.gap = 2;
|
|
119
|
+
/**
|
|
120
|
+
* The smallest a cell may get before the strip draws fewer of them, in CSS pixels.
|
|
121
|
+
*
|
|
122
|
+
* **Set this only to overrule what the strip actually draws.** The arithmetic
|
|
123
|
+
* needs a width in pixels and the width is a length the stylesheet resolves,
|
|
124
|
+
* so a number written here that disagrees with the sheet is a promise the
|
|
125
|
+
* consumer has to keep by hand, and the one number a summary is told to trust
|
|
126
|
+
* is the one it gets wrong.
|
|
127
|
+
*
|
|
128
|
+
* The strip measures itself, so `--heatmap-cell-inline-size` and `--heatmap-gap` are
|
|
129
|
+
* enough on their own and these two are the estimate used until the first
|
|
130
|
+
* measurement lands. Writing the attribute pins the value and stops the
|
|
131
|
+
* measurement being consulted, which is what a container query or a transition
|
|
132
|
+
* on the cell size wants, where what is drawn this frame is not what the
|
|
133
|
+
* arithmetic should plan around.
|
|
134
|
+
*
|
|
135
|
+
* Zero turns the dropping off altogether, which is right for a strip in a
|
|
136
|
+
* container that cannot get narrow.
|
|
137
|
+
*/
|
|
138
|
+
this.minCell = 8;
|
|
110
139
|
/**
|
|
111
140
|
* How many rows the strip has.
|
|
112
141
|
*
|
|
@@ -133,42 +162,11 @@ let HelixHeadlessHeatmap = class HelixHeadlessHeatmap extends MixinChartSource(H
|
|
|
133
162
|
* **`"1"` through `"5"` are a ramp and everything else is a category**, which
|
|
134
163
|
* is the distinction a heatmap lives or dies on: magnitude has to be one hue
|
|
135
164
|
* getting louder, because a reader compares two cells by weight and cannot
|
|
136
|
-
* compare two hues at all.
|
|
137
|
-
*
|
|
138
|
-
*
|
|
165
|
+
* compare two hues at all. `tones="surface info accent success primary"` for a
|
|
166
|
+
* commit count is five unrelated hues for five amounts, which is confetti with
|
|
167
|
+
* no order in it.
|
|
139
168
|
*/
|
|
140
169
|
this.tones = '';
|
|
141
|
-
/**
|
|
142
|
-
* The smallest a cell may get before the strip draws fewer of them, in CSS pixels.
|
|
143
|
-
*
|
|
144
|
-
* **Set this only to overrule what the strip actually draws.** The arithmetic
|
|
145
|
-
* needs a width in pixels and the width is a length the stylesheet resolves,
|
|
146
|
-
* so for as long as this was the only answer it was a promise the consumer had
|
|
147
|
-
* to keep by hand: it sat at 8 against a sheet drawing 12, the arithmetic
|
|
148
|
-
* believed a cell cost 10 pixels where it cost 16, and a ninety day strip ran
|
|
149
|
-
* 940 pixels wide out of a 592 pixel box while `visible` reported 59. The one
|
|
150
|
-
* number a summary is told to trust was the number that was wrong.
|
|
151
|
-
*
|
|
152
|
-
* The strip is measured now, so `--heatmap-cell-inline-size` and `--heatmap-gap` are
|
|
153
|
-
* enough on their own and these two are the estimate used until the first
|
|
154
|
-
* measurement lands. Writing the attribute pins the value and stops the
|
|
155
|
-
* measurement being consulted, which is what a container query or a transition
|
|
156
|
-
* on the cell size wants, where what is drawn this frame is not what the
|
|
157
|
-
* arithmetic should plan around.
|
|
158
|
-
*
|
|
159
|
-
* Zero turns the dropping off altogether, which is right for a strip in a
|
|
160
|
-
* container that cannot get narrow.
|
|
161
|
-
*/
|
|
162
|
-
this.minCell = 8;
|
|
163
|
-
/**
|
|
164
|
-
* Space between cells, in CSS pixels, for the same reason `min-cell` is a
|
|
165
|
-
* number.
|
|
166
|
-
*/
|
|
167
|
-
this.gap = 2;
|
|
168
|
-
/**
|
|
169
|
-
* Shown when the table has no readings in it.
|
|
170
|
-
*/
|
|
171
|
-
this.emptyText = 'No readings';
|
|
172
170
|
/**
|
|
173
171
|
* The width last measured, or nothing before the first measurement.
|
|
174
172
|
*
|
|
@@ -349,13 +347,11 @@ let HelixHeadlessHeatmap = class HelixHeadlessHeatmap extends MixinChartSource(H
|
|
|
349
347
|
/**
|
|
350
348
|
* Says on the footer whether any of its three slots holds anything.
|
|
351
349
|
*
|
|
352
|
-
* **
|
|
353
|
-
*
|
|
354
|
-
*
|
|
355
|
-
*
|
|
356
|
-
*
|
|
357
|
-
* fill, and would have been false either way. Both verified in a browser. A
|
|
358
|
-
* heatmap with no legend and no summary still reserved the row for one.
|
|
350
|
+
* **A stylesheet cannot ask.** `[part="footer"]:not(:has(slot:has(*)))` is two
|
|
351
|
+
* faults at once: `:has()` may not be nested inside `:has()`, so the selector
|
|
352
|
+
* fails to parse and the rule is discarded whole; and a slot's assigned nodes
|
|
353
|
+
* are not its DOM children, so `slot:has(*)` reports fallback content rather
|
|
354
|
+
* than the fill, and is false either way. Both verified in a browser.
|
|
359
355
|
*/
|
|
360
356
|
markEmpty() {
|
|
361
357
|
this.markRegion('footer', ['start', 'summary', 'end']);
|
|
@@ -382,16 +378,11 @@ let HelixHeadlessHeatmap = class HelixHeadlessHeatmap extends MixinChartSource(H
|
|
|
382
378
|
/* Written here rather than reflected, and announced only on a change: a
|
|
383
379
|
consumer recomputing a summary from this is doing work, and an event per
|
|
384
380
|
resize frame is work per frame.
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
above claimed writing here made the server's output and a hydrating
|
|
391
|
-
consumer's markup agree, and it does the reverse: `updated` runs in the
|
|
392
|
-
same microtask checkpoint as `firstUpdated`, before React need have
|
|
393
|
-
reached the node, so `visible="0"` was an attribute no server sent. That
|
|
394
|
-
is the fault `data-settled` was found for four times. */
|
|
381
|
+
|
|
382
|
+
**Nothing measured yet is the absence of the attribute.** `updated` runs
|
|
383
|
+
in the same microtask checkpoint as `firstUpdated`, before React need have
|
|
384
|
+
reached the node, so writing `visible="0"` here is an attribute no server
|
|
385
|
+
sent. That is the fault `data-settled` was found for. */
|
|
395
386
|
const showing = this.visible;
|
|
396
387
|
const written = showing > 0 ? String(showing) : null;
|
|
397
388
|
if (this.getAttribute('visible') !== written) {
|
|
@@ -414,7 +405,7 @@ let HelixHeadlessHeatmap = class HelixHeadlessHeatmap extends MixinChartSource(H
|
|
|
414
405
|
return html `<div
|
|
415
406
|
part="strip"
|
|
416
407
|
id="helix-chart-plot"
|
|
417
|
-
style="--
|
|
408
|
+
style="--heatmap-rows: ${this.rowCount}"
|
|
418
409
|
@pointerover=${this.onPointerOver}
|
|
419
410
|
@pointerleave=${this.onPointerLeave}
|
|
420
411
|
>
|
|
@@ -451,15 +442,13 @@ let HelixHeadlessHeatmap = class HelixHeadlessHeatmap extends MixinChartSource(H
|
|
|
451
442
|
/**
|
|
452
443
|
* The bubble over the cell a pointer is resting on.
|
|
453
444
|
*
|
|
454
|
-
* **One tooltip that moves, which is what every other chart here does
|
|
455
|
-
*
|
|
456
|
-
*
|
|
457
|
-
*
|
|
458
|
-
*
|
|
459
|
-
* one however many readings there are. `drawTooltip` is their shared markup
|
|
460
|
-
* and this is the fourth caller.
|
|
445
|
+
* **One tooltip that moves, which is what every other chart here does.** Bar
|
|
446
|
+
* Chart, Line Chart and Donut Chart each render a single anchor against an
|
|
447
|
+
* invisible mark and move the mark, so the count is one however many readings
|
|
448
|
+
* there are, rather than one element per cell. `drawTooltip` is their shared
|
|
449
|
+
* markup and this is the fourth caller.
|
|
461
450
|
*
|
|
462
|
-
* What it buys over
|
|
451
|
+
* What it buys over a native `title` is the row rather than the reading.
|
|
463
452
|
* `sourceRows` carries every column of the table including the ones nothing
|
|
464
453
|
* was plotted from, so a cell reads "11 Jun 2026 / Uptime 81.2% / Note Partial
|
|
465
454
|
* outage" where `title` could only ever say the two values this component
|
|
@@ -493,6 +482,15 @@ let HelixHeadlessHeatmap = class HelixHeadlessHeatmap extends MixinChartSource(H
|
|
|
493
482
|
});
|
|
494
483
|
}
|
|
495
484
|
};
|
|
485
|
+
__decorate([
|
|
486
|
+
property({ attribute: 'empty-text' })
|
|
487
|
+
], HelixHeadlessHeatmap.prototype, "emptyText", void 0);
|
|
488
|
+
__decorate([
|
|
489
|
+
property({ type: Number })
|
|
490
|
+
], HelixHeadlessHeatmap.prototype, "gap", void 0);
|
|
491
|
+
__decorate([
|
|
492
|
+
property({ attribute: 'min-cell', type: Number })
|
|
493
|
+
], HelixHeadlessHeatmap.prototype, "minCell", void 0);
|
|
496
494
|
__decorate([
|
|
497
495
|
property({ type: Number })
|
|
498
496
|
], HelixHeadlessHeatmap.prototype, "rows", void 0);
|
|
@@ -502,15 +500,6 @@ __decorate([
|
|
|
502
500
|
__decorate([
|
|
503
501
|
property()
|
|
504
502
|
], HelixHeadlessHeatmap.prototype, "tones", void 0);
|
|
505
|
-
__decorate([
|
|
506
|
-
property({ attribute: 'min-cell', type: Number })
|
|
507
|
-
], HelixHeadlessHeatmap.prototype, "minCell", void 0);
|
|
508
|
-
__decorate([
|
|
509
|
-
property({ type: Number })
|
|
510
|
-
], HelixHeadlessHeatmap.prototype, "gap", void 0);
|
|
511
|
-
__decorate([
|
|
512
|
-
property({ attribute: 'empty-text' })
|
|
513
|
-
], HelixHeadlessHeatmap.prototype, "emptyText", void 0);
|
|
514
503
|
__decorate([
|
|
515
504
|
state()
|
|
516
505
|
], HelixHeadlessHeatmap.prototype, "width", void 0);
|
|
@@ -36,14 +36,14 @@ import { nothing, type TemplateResult } from 'lit';
|
|
|
36
36
|
* @csspart svg - The rendered SVG.
|
|
37
37
|
*/
|
|
38
38
|
export declare class HelixHeadlessIcon extends HelixElement {
|
|
39
|
-
/**
|
|
40
|
-
* Name of the icon in the Helix set.
|
|
41
|
-
*/
|
|
42
|
-
name: string;
|
|
43
39
|
/**
|
|
44
40
|
* Accessible name, for an icon that is not decorative.
|
|
45
41
|
*/
|
|
46
42
|
label: string;
|
|
43
|
+
/**
|
|
44
|
+
* Name of the icon in the Helix set.
|
|
45
|
+
*/
|
|
46
|
+
name: string;
|
|
47
47
|
protected render(): TemplateResult | typeof nothing;
|
|
48
48
|
}
|
|
49
49
|
declare global {
|
|
@@ -47,19 +47,19 @@ import { unsafeSVG } from 'lit/directives/unsafe-svg.js';
|
|
|
47
47
|
let HelixHeadlessIcon = class HelixHeadlessIcon extends HelixElement {
|
|
48
48
|
constructor() {
|
|
49
49
|
super(...arguments);
|
|
50
|
-
/**
|
|
51
|
-
* Name of the icon in the Helix set.
|
|
52
|
-
*/
|
|
53
|
-
this.name = '';
|
|
54
50
|
/**
|
|
55
51
|
* Accessible name, for an icon that is not decorative.
|
|
56
52
|
*/
|
|
57
53
|
this.label = '';
|
|
54
|
+
/**
|
|
55
|
+
* Name of the icon in the Helix set.
|
|
56
|
+
*/
|
|
57
|
+
this.name = '';
|
|
58
58
|
}
|
|
59
59
|
render() {
|
|
60
|
-
/* Own keys only.
|
|
61
|
-
inherited `Object.prototype` key
|
|
62
|
-
|
|
60
|
+
/* Own keys only. A truthiness check on a plain-object index lets an
|
|
61
|
+
inherited `Object.prototype` key through, and the component renders a
|
|
62
|
+
sized, empty `<svg viewBox="">` rather than nothing at all. */
|
|
63
63
|
const icon = Object.hasOwn(icons, this.name) ? icons[this.name] : undefined;
|
|
64
64
|
if (!icon) {
|
|
65
65
|
return nothing;
|
|
@@ -83,10 +83,10 @@ let HelixHeadlessIcon = class HelixHeadlessIcon extends HelixElement {
|
|
|
83
83
|
};
|
|
84
84
|
__decorate([
|
|
85
85
|
property()
|
|
86
|
-
], HelixHeadlessIcon.prototype, "
|
|
86
|
+
], HelixHeadlessIcon.prototype, "label", void 0);
|
|
87
87
|
__decorate([
|
|
88
88
|
property()
|
|
89
|
-
], HelixHeadlessIcon.prototype, "
|
|
89
|
+
], HelixHeadlessIcon.prototype, "name", void 0);
|
|
90
90
|
HelixHeadlessIcon = __decorate([
|
|
91
91
|
customElement('helix-headless-icon')
|
|
92
92
|
], HelixHeadlessIcon);
|
|
@@ -10,12 +10,10 @@ import { HelixHeadlessButton } from '../../button/root/button-root.js';
|
|
|
10
10
|
* toolbar becomes unusable without sight. `label` is not optional in practice,
|
|
11
11
|
* and having a component that says so is what makes it reviewable.
|
|
12
12
|
*
|
|
13
|
-
* **Registered, so it can be rendered and not only subclassed.**
|
|
14
|
-
* icon button
|
|
15
|
-
* `helix-headless-icon-button`
|
|
16
|
-
*
|
|
17
|
-
* needs one, such as an announcement's dismiss control, can now render it
|
|
18
|
-
* without reaching into the styled tier for a tag that would never upgrade.
|
|
13
|
+
* **Registered, so it can be rendered and not only subclassed.** Anything in
|
|
14
|
+
* this tier needing an icon button, such as an announcement's dismiss control,
|
|
15
|
+
* renders `helix-headless-icon-button` rather than reaching into the styled tier
|
|
16
|
+
* for a tag that would never upgrade.
|
|
19
17
|
*
|
|
20
18
|
* Top-level rather than `Button.Icon`, because a namespace means composition
|
|
21
19
|
* and an icon-only button is not part of a button. It is a button with
|
|
@@ -17,12 +17,10 @@ import { HelixHeadlessButton } from '../../button/root/button-root.js';
|
|
|
17
17
|
* toolbar becomes unusable without sight. `label` is not optional in practice,
|
|
18
18
|
* and having a component that says so is what makes it reviewable.
|
|
19
19
|
*
|
|
20
|
-
* **Registered, so it can be rendered and not only subclassed.**
|
|
21
|
-
* icon button
|
|
22
|
-
* `helix-headless-icon-button`
|
|
23
|
-
*
|
|
24
|
-
* needs one, such as an announcement's dismiss control, can now render it
|
|
25
|
-
* without reaching into the styled tier for a tag that would never upgrade.
|
|
20
|
+
* **Registered, so it can be rendered and not only subclassed.** Anything in
|
|
21
|
+
* this tier needing an icon button, such as an announcement's dismiss control,
|
|
22
|
+
* renders `helix-headless-icon-button` rather than reaching into the styled tier
|
|
23
|
+
* for a tag that would never upgrade.
|
|
26
24
|
*
|
|
27
25
|
* Top-level rather than `Button.Icon`, because a namespace means composition
|
|
28
26
|
* and an icon-only button is not part of a button. It is a button with
|