@fusion.dev/helix-core 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/custom-elements.json
CHANGED
|
@@ -5475,6 +5475,14 @@
|
|
|
5475
5475
|
"module": "./utils/draw-icon/draw-icon.js"
|
|
5476
5476
|
}
|
|
5477
5477
|
},
|
|
5478
|
+
{
|
|
5479
|
+
"kind": "js",
|
|
5480
|
+
"name": "CHART_PLOT",
|
|
5481
|
+
"declaration": {
|
|
5482
|
+
"name": "CHART_PLOT",
|
|
5483
|
+
"module": "./utils/draw-tooltip/draw-tooltip.js"
|
|
5484
|
+
}
|
|
5485
|
+
},
|
|
5478
5486
|
{
|
|
5479
5487
|
"kind": "js",
|
|
5480
5488
|
"name": "drawTooltip",
|
|
@@ -8999,6 +9007,15 @@
|
|
|
8999
9007
|
"kind": "javascript-module",
|
|
9000
9008
|
"path": "src/utils/draw-tooltip/draw-tooltip.ts",
|
|
9001
9009
|
"declarations": [
|
|
9010
|
+
{
|
|
9011
|
+
"kind": "variable",
|
|
9012
|
+
"name": "CHART_PLOT",
|
|
9013
|
+
"type": {
|
|
9014
|
+
"text": "string"
|
|
9015
|
+
},
|
|
9016
|
+
"default": "'helix-chart-plot'",
|
|
9017
|
+
"description": "The id every chart puts on its plot, and the boundary a bubble is kept inside.\n\n**A name six templates and this file have to agree on is a name that will\nstop agreeing**, which is `PALETTE`'s argument and it holds harder here: the\nfailure is silent. `within` resolves through `getElementById`, so a plot\nrenamed on one side returns null, the boundary falls back to the viewport,\nand the bubble goes back to hanging past the drawing with nothing reported\nanywhere.\n\nFixed rather than generated, for the reason the mark's id below gives: it is\nscoped to one chart's shadow root, where it is the only one."
|
|
9018
|
+
},
|
|
9002
9019
|
{
|
|
9003
9020
|
"kind": "function",
|
|
9004
9021
|
"name": "drawTooltip",
|
|
@@ -9038,6 +9055,14 @@
|
|
|
9038
9055
|
}
|
|
9039
9056
|
],
|
|
9040
9057
|
"exports": [
|
|
9058
|
+
{
|
|
9059
|
+
"kind": "js",
|
|
9060
|
+
"name": "CHART_PLOT",
|
|
9061
|
+
"declaration": {
|
|
9062
|
+
"name": "CHART_PLOT",
|
|
9063
|
+
"module": "src/utils/draw-tooltip/draw-tooltip.ts"
|
|
9064
|
+
}
|
|
9065
|
+
},
|
|
9041
9066
|
{
|
|
9042
9067
|
"kind": "js",
|
|
9043
9068
|
"name": "drawTooltip",
|
package/dist/index.d.ts
CHANGED
|
@@ -34,7 +34,7 @@ export { closestInstance } from './utils/closest-instance/closest-instance.js';
|
|
|
34
34
|
export { createSheet } from './utils/create-sheet/create-sheet.js';
|
|
35
35
|
export { customElement, definedTags, duplicateRegistrations, } from './utils/custom-element/custom-element.js';
|
|
36
36
|
export { type DrawIconOptions, drawIcon } from './utils/draw-icon/draw-icon.js';
|
|
37
|
-
export { drawTooltip } from './utils/draw-tooltip/draw-tooltip.js';
|
|
37
|
+
export { CHART_PLOT, drawTooltip } from './utils/draw-tooltip/draw-tooltip.js';
|
|
38
38
|
export { elapsedTime } from './utils/elapsed-time/elapsed-time.js';
|
|
39
39
|
export { deepActiveElement, deepContains, focusableElements, } from './utils/focusable-elements/focusable-elements.js';
|
|
40
40
|
export { formatNumbers } from './utils/format-numbers/format-numbers.js';
|
package/dist/index.js
CHANGED
|
@@ -34,7 +34,7 @@ export { closestInstance } from './utils/closest-instance/closest-instance.js';
|
|
|
34
34
|
export { createSheet } from './utils/create-sheet/create-sheet.js';
|
|
35
35
|
export { customElement, definedTags, duplicateRegistrations, } from './utils/custom-element/custom-element.js';
|
|
36
36
|
export { drawIcon } from './utils/draw-icon/draw-icon.js';
|
|
37
|
-
export { drawTooltip } from './utils/draw-tooltip/draw-tooltip.js';
|
|
37
|
+
export { CHART_PLOT, drawTooltip } from './utils/draw-tooltip/draw-tooltip.js';
|
|
38
38
|
export { elapsedTime } from './utils/elapsed-time/elapsed-time.js';
|
|
39
39
|
export { deepActiveElement, deepContains, focusableElements, } from './utils/focusable-elements/focusable-elements.js';
|
|
40
40
|
export { formatNumbers } from './utils/format-numbers/format-numbers.js';
|
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
import { nothing, type TemplateResult } from 'lit';
|
|
2
2
|
import { type StaticValue } from 'lit/static-html.js';
|
|
3
3
|
import type { Row } from '../read-series/read-series.js';
|
|
4
|
+
/**
|
|
5
|
+
* The id every chart puts on its plot, and the boundary a bubble is kept inside.
|
|
6
|
+
*
|
|
7
|
+
* **A name six templates and this file have to agree on is a name that will
|
|
8
|
+
* stop agreeing**, which is `PALETTE`'s argument and it holds harder here: the
|
|
9
|
+
* failure is silent. `within` resolves through `getElementById`, so a plot
|
|
10
|
+
* renamed on one side returns null, the boundary falls back to the viewport,
|
|
11
|
+
* and the bubble goes back to hanging past the drawing with nothing reported
|
|
12
|
+
* anywhere.
|
|
13
|
+
*
|
|
14
|
+
* Fixed rather than generated, for the reason the mark's id below gives: it is
|
|
15
|
+
* scoped to one chart's shadow root, where it is the only one.
|
|
16
|
+
*/
|
|
17
|
+
export declare const CHART_PLOT = "helix-chart-plot";
|
|
4
18
|
/** Where a tooltip points, in the plot's own percentages, and which side it prefers. */
|
|
5
19
|
export interface TooltipAt {
|
|
6
20
|
/**
|
|
@@ -2,6 +2,7 @@ import { nothing } from 'lit';
|
|
|
2
2
|
import { styleMap } from 'lit/directives/style-map.js';
|
|
3
3
|
import { html } from 'lit/static-html.js';
|
|
4
4
|
import { seriesIndex } from '../../mixins/mixin-chart-source/mixin-chart-source.js';
|
|
5
|
+
export const CHART_PLOT = 'helix-chart-plot';
|
|
5
6
|
export const drawTooltip = (rows, at, tag, where) => {
|
|
6
7
|
const row = rows[at];
|
|
7
8
|
if (!row || rows.length === 0) {
|
|
@@ -30,7 +31,7 @@ export const drawTooltip = (rows, at, tag, where) => {
|
|
|
30
31
|
open
|
|
31
32
|
part="tooltip-anchor"
|
|
32
33
|
placement=${place.placement}
|
|
33
|
-
within
|
|
34
|
+
within=${CHART_PLOT}
|
|
34
35
|
>
|
|
35
36
|
<div aria-hidden="true" slot="content">
|
|
36
37
|
<span part="tooltip-label">${row.label}</span>
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fusion.dev/helix-core",
|
|
3
3
|
"description": "Helix element primitives: base classes, mixins, decorators, utilities.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.36.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Ross Sheppard <ross.sheppard@fusion.dev>",
|
|
7
7
|
"repository": {
|
|
@@ -34,12 +34,12 @@
|
|
|
34
34
|
"bugs": "https://github.com/project-fusion/fusion/issues",
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@floating-ui/dom": "^1.8.0",
|
|
37
|
-
"@fusion.dev/helix-icons": "0.
|
|
37
|
+
"@fusion.dev/helix-icons": "0.36.0"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@custom-elements-manifest/analyzer": "^0.11.0",
|
|
41
|
-
"@fusion.dev/helix-cem": "0.
|
|
42
|
-
"@fusion.dev/helix-testing": "0.
|
|
41
|
+
"@fusion.dev/helix-cem": "0.36.0",
|
|
42
|
+
"@fusion.dev/helix-testing": "0.36.0",
|
|
43
43
|
"lit": "^3.2.1"
|
|
44
44
|
},
|
|
45
45
|
"homepage": "https://fusion.dev",
|