@fusion.dev/helix-headless 0.35.1 → 0.36.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.
- package/dist/area-chart/root/area-chart-root.js +3 -3
- package/dist/bar-chart/root/bar-chart-root.js +3 -3
- package/dist/donut-chart/root/donut-chart-root.js +2 -2
- package/dist/heatmap/root/heatmap-root.js +2 -2
- package/dist/line-chart/root/line-chart-root.js +3 -3
- package/dist/scatter-chart/root/scatter-chart-root.js +3 -3
- package/package.json +5 -5
|
@@ -4,7 +4,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
import { customElement, drawTooltip, formatNumbers, HelixElement, linear, linePath, MixinChartSource, seriesIndex, ticks, } from '@fusion.dev/helix-core';
|
|
7
|
+
import { CHART_PLOT, customElement, drawTooltip, formatNumbers, HelixElement, linear, linePath, MixinChartSource, seriesIndex, ticks, } from '@fusion.dev/helix-core';
|
|
8
8
|
import { html, nothing, svg } from 'lit';
|
|
9
9
|
import { property } from 'lit/decorators.js';
|
|
10
10
|
import '../../tooltip/index.js';
|
|
@@ -70,7 +70,7 @@ let HelixHeadlessAreaChart = class HelixHeadlessAreaChart extends MixinChartSour
|
|
|
70
70
|
const rows = this.sourceRows;
|
|
71
71
|
const stack = this.stack;
|
|
72
72
|
if (rows.length === 0 || stack.columns.length === 0) {
|
|
73
|
-
return html `<div id
|
|
73
|
+
return html `<div id=${CHART_PLOT} part="plot"></div>`;
|
|
74
74
|
}
|
|
75
75
|
const top = this.share ? 1 : Math.max(0, ...stack.totals);
|
|
76
76
|
const domain = [0, top > 0 ? top : 1];
|
|
@@ -82,7 +82,7 @@ let HelixHeadlessAreaChart = class HelixHeadlessAreaChart extends MixinChartSour
|
|
|
82
82
|
}
|
|
83
83
|
renderPlot(stack, count, x, y, domain) {
|
|
84
84
|
const order = stack.layers.map((_, depth) => depth).reverse();
|
|
85
|
-
return html `<div aria-hidden="true" id
|
|
85
|
+
return html `<div aria-hidden="true" id=${CHART_PLOT} part="plot">
|
|
86
86
|
<svg part="svg"
|
|
87
87
|
data-mirror
|
|
88
88
|
preserveAspectRatio="none"
|
|
@@ -4,7 +4,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
import { customElement, drawTooltip, extent, HelixElement, linear, linePath, MixinChartSource, seriesIndex, ticks, } from '@fusion.dev/helix-core';
|
|
7
|
+
import { CHART_PLOT, customElement, drawTooltip, extent, HelixElement, linear, linePath, MixinChartSource, seriesIndex, ticks, } from '@fusion.dev/helix-core';
|
|
8
8
|
import { html, nothing, svg } from 'lit';
|
|
9
9
|
import { property } from 'lit/decorators.js';
|
|
10
10
|
import '../../tooltip/index.js';
|
|
@@ -36,7 +36,7 @@ let HelixHeadlessBarChart = class HelixHeadlessBarChart extends MixinChartSource
|
|
|
36
36
|
const series = this.series;
|
|
37
37
|
const categories = series[0]?.points.map((point) => point.label) ?? [];
|
|
38
38
|
if (categories.length === 0) {
|
|
39
|
-
return html `<div id
|
|
39
|
+
return html `<div id=${CHART_PLOT} part="plot"></div>`;
|
|
40
40
|
}
|
|
41
41
|
const scaled = this.scaled;
|
|
42
42
|
const own = (one) => scaled.has(one.name.trim().toLowerCase());
|
|
@@ -103,7 +103,7 @@ let HelixHeadlessBarChart = class HelixHeadlessBarChart extends MixinChartSource
|
|
|
103
103
|
};
|
|
104
104
|
return html `<div
|
|
105
105
|
aria-hidden="true"
|
|
106
|
-
id
|
|
106
|
+
id=${CHART_PLOT}
|
|
107
107
|
part="plot"
|
|
108
108
|
>
|
|
109
109
|
<svg part="svg"
|
|
@@ -4,7 +4,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
import { customElement, drawTooltip, HelixElement, MixinChartSource, seriesIndex, } from '@fusion.dev/helix-core';
|
|
7
|
+
import { CHART_PLOT, customElement, drawTooltip, HelixElement, MixinChartSource, seriesIndex, } from '@fusion.dev/helix-core';
|
|
8
8
|
import { html, nothing, svg } from 'lit';
|
|
9
9
|
import { property } from 'lit/decorators.js';
|
|
10
10
|
import '../../tooltip/index.js';
|
|
@@ -60,7 +60,7 @@ let HelixHeadlessDonutChart = class HelixHeadlessDonutChart extends MixinChartSo
|
|
|
60
60
|
renderPlot(shares) {
|
|
61
61
|
return html `<div
|
|
62
62
|
aria-hidden="true"
|
|
63
|
-
id
|
|
63
|
+
id=${CHART_PLOT}
|
|
64
64
|
part="plot"
|
|
65
65
|
style="--donut-chart-stroke: ${this.thickness}"
|
|
66
66
|
>
|
|
@@ -4,7 +4,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
import { customElement, drawTooltip, HelixElement, HelixResizeEvent, hostAria, MixinChartSource, slotFilled, } from '@fusion.dev/helix-core';
|
|
7
|
+
import { CHART_PLOT, customElement, drawTooltip, HelixElement, HelixResizeEvent, hostAria, MixinChartSource, slotFilled, } from '@fusion.dev/helix-core';
|
|
8
8
|
import { html, nothing } from 'lit';
|
|
9
9
|
import { property, state } from 'lit/decorators.js';
|
|
10
10
|
import '../../tooltip/index.js';
|
|
@@ -125,7 +125,7 @@ let HelixHeadlessHeatmap = class HelixHeadlessHeatmap extends MixinChartSource(H
|
|
|
125
125
|
const cells = this.drawn;
|
|
126
126
|
return html `<div
|
|
127
127
|
part="strip"
|
|
128
|
-
id
|
|
128
|
+
id=${CHART_PLOT}
|
|
129
129
|
style="--heatmap-rows: ${this.rowCount}"
|
|
130
130
|
@pointerover=${this.onPointerOver}
|
|
131
131
|
@pointerleave=${this.onPointerLeave}
|
|
@@ -4,7 +4,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
import { customElement, drawTooltip, extent, HelixElement, linear, linePath, MixinChartSource, seriesIndex, ticks, } from '@fusion.dev/helix-core';
|
|
7
|
+
import { CHART_PLOT, customElement, drawTooltip, extent, HelixElement, linear, linePath, MixinChartSource, seriesIndex, ticks, } from '@fusion.dev/helix-core';
|
|
8
8
|
import { html, nothing, svg } from 'lit';
|
|
9
9
|
import { property } from 'lit/decorators.js';
|
|
10
10
|
import '../../tooltip/index.js';
|
|
@@ -46,7 +46,7 @@ let HelixHeadlessLineChart = class HelixHeadlessLineChart extends MixinChartSour
|
|
|
46
46
|
const series = this.series;
|
|
47
47
|
const readings = series[0]?.points.map((point) => point.label) ?? [];
|
|
48
48
|
if (readings.length === 0) {
|
|
49
|
-
return html `<div id
|
|
49
|
+
return html `<div id=${CHART_PLOT} part="plot"></div>`;
|
|
50
50
|
}
|
|
51
51
|
const domain = this.range(series);
|
|
52
52
|
const y = linear(domain, [HEIGHT, 0]);
|
|
@@ -64,7 +64,7 @@ let HelixHeadlessLineChart = class HelixHeadlessLineChart extends MixinChartSour
|
|
|
64
64
|
: undefined;
|
|
65
65
|
return html `<div
|
|
66
66
|
aria-hidden="true"
|
|
67
|
-
id
|
|
67
|
+
id=${CHART_PLOT}
|
|
68
68
|
part="plot"
|
|
69
69
|
style=${holes ? `--_line-chart-holes: ${holes}` : nothing}
|
|
70
70
|
>
|
|
@@ -4,7 +4,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
import { customElement, drawTooltip, extent, formatNumbers, HelixElement, linear, MixinChartSource, seriesIndex, ticks, } from '@fusion.dev/helix-core';
|
|
7
|
+
import { CHART_PLOT, customElement, drawTooltip, extent, formatNumbers, HelixElement, linear, MixinChartSource, seriesIndex, ticks, } from '@fusion.dev/helix-core';
|
|
8
8
|
import { html, nothing, svg } from 'lit';
|
|
9
9
|
import { property } from 'lit/decorators.js';
|
|
10
10
|
import '../../tooltip/index.js';
|
|
@@ -125,7 +125,7 @@ let HelixHeadlessScatterChart = class HelixHeadlessScatterChart extends MixinCha
|
|
|
125
125
|
this.drawn = field.points;
|
|
126
126
|
if (field.points.length === 0) {
|
|
127
127
|
return html `<div dir="ltr" part="plane">
|
|
128
|
-
<div id
|
|
128
|
+
<div id=${CHART_PLOT} part="plot"></div>
|
|
129
129
|
</div>`;
|
|
130
130
|
}
|
|
131
131
|
const format = formatNumbers('');
|
|
@@ -146,7 +146,7 @@ let HelixHeadlessScatterChart = class HelixHeadlessScatterChart extends MixinCha
|
|
|
146
146
|
}
|
|
147
147
|
renderPlot(field, along, up) {
|
|
148
148
|
const at = this.pointer.at;
|
|
149
|
-
return html `<div aria-hidden="true" id
|
|
149
|
+
return html `<div aria-hidden="true" id=${CHART_PLOT} part="plot">
|
|
150
150
|
<svg part="svg"
|
|
151
151
|
preserveAspectRatio="none"
|
|
152
152
|
viewBox="0 0 ${WIDTH} ${HEIGHT}"
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fusion.dev/helix-headless",
|
|
3
3
|
"description": "Headless component tier. Structure, accessibility, state, and form participation. No styling.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.36.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Ross Sheppard <ross.sheppard@fusion.dev>",
|
|
7
7
|
"repository": {
|
|
@@ -46,14 +46,14 @@
|
|
|
46
46
|
},
|
|
47
47
|
"bugs": "https://github.com/project-fusion/fusion/issues",
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@fusion.dev/helix-core": "0.
|
|
50
|
-
"@fusion.dev/helix-icons": "0.
|
|
49
|
+
"@fusion.dev/helix-core": "0.36.0",
|
|
50
|
+
"@fusion.dev/helix-icons": "0.36.0",
|
|
51
51
|
"uqr": "^0.1.3"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@custom-elements-manifest/analyzer": "^0.11.0",
|
|
55
|
-
"@fusion.dev/helix-cem": "0.
|
|
56
|
-
"@fusion.dev/helix-testing": "0.
|
|
55
|
+
"@fusion.dev/helix-cem": "0.36.0",
|
|
56
|
+
"@fusion.dev/helix-testing": "0.36.0",
|
|
57
57
|
"@fusion.dev/scripts": "0.0.0-dev",
|
|
58
58
|
"@happy-dom/global-registrator": "^20.0.0",
|
|
59
59
|
"@lit-labs/ssr": "^4.1.0",
|