@fusion.dev/helix-core 0.172.0 → 0.174.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
|
@@ -2755,6 +2755,25 @@
|
|
|
2755
2755
|
}
|
|
2756
2756
|
}
|
|
2757
2757
|
},
|
|
2758
|
+
{
|
|
2759
|
+
"kind": "method",
|
|
2760
|
+
"name": "span",
|
|
2761
|
+
"privacy": "private",
|
|
2762
|
+
"return": {
|
|
2763
|
+
"type": {
|
|
2764
|
+
"text": "Pick<DOMRect, 'bottom' | 'height' | 'left' | 'right' | 'top' | 'width'>"
|
|
2765
|
+
}
|
|
2766
|
+
},
|
|
2767
|
+
"parameters": [
|
|
2768
|
+
{
|
|
2769
|
+
"name": "active",
|
|
2770
|
+
"type": {
|
|
2771
|
+
"text": "HTMLElement"
|
|
2772
|
+
}
|
|
2773
|
+
}
|
|
2774
|
+
],
|
|
2775
|
+
"description": "The box from `active` through the element `through` names, or `active`'s own."
|
|
2776
|
+
},
|
|
2758
2777
|
{
|
|
2759
2778
|
"kind": "method",
|
|
2760
2779
|
"name": "stopWaiting",
|
|
@@ -33791,7 +33810,7 @@
|
|
|
33791
33810
|
"type": {
|
|
33792
33811
|
"text": "string"
|
|
33793
33812
|
},
|
|
33794
|
-
"default": "'0.
|
|
33813
|
+
"default": "'0.174.0'",
|
|
33795
33814
|
"description": "The version of the package this file ships in.\n\n**Written by `fusion/scripts/version.mjs`** wherever it writes the package's\n`package.json`, and stamped back into the repository beside it after a\nrelease, so the two never disagree; a spec beside this holds them to it.\nNothing else in the running code knows which release it is."
|
|
33796
33815
|
}
|
|
33797
33816
|
],
|
|
@@ -34351,6 +34370,6 @@
|
|
|
34351
34370
|
],
|
|
34352
34371
|
"helix": {
|
|
34353
34372
|
"package": "@fusion.dev/helix-core",
|
|
34354
|
-
"version": "0.
|
|
34373
|
+
"version": "0.174.0"
|
|
34355
34374
|
}
|
|
34356
34375
|
}
|
|
@@ -21,6 +21,12 @@ export interface IndicatorOptions {
|
|
|
21
21
|
* re-read costs nothing and needs no bookkeeping about who is watched.
|
|
22
22
|
*/
|
|
23
23
|
observe?: () => readonly Element[];
|
|
24
|
+
/**
|
|
25
|
+
* The last element marked, where the mark runs from `active` through several,
|
|
26
|
+
* as an outline marking every section on screen. The mark then covers both
|
|
27
|
+
* and everything between. Absent, or the same element, it covers `active`.
|
|
28
|
+
*/
|
|
29
|
+
through?: () => HTMLElement | null | undefined;
|
|
24
30
|
/**
|
|
25
31
|
* The box the mark is positioned against, which is its containing block.
|
|
26
32
|
*
|
|
@@ -96,6 +102,8 @@ export declare class IndicatorController implements ReactiveController {
|
|
|
96
102
|
*/
|
|
97
103
|
private waiting;
|
|
98
104
|
place(): void;
|
|
105
|
+
/** The box from `active` through the element `through` names, or `active`'s own. */
|
|
106
|
+
private span;
|
|
99
107
|
/** Takes the pending listener and its guard off, wherever they came from. */
|
|
100
108
|
private stopWaiting;
|
|
101
109
|
}
|
|
@@ -35,7 +35,7 @@ export class IndicatorController {
|
|
|
35
35
|
indicator.removeAttribute('data-placed');
|
|
36
36
|
return;
|
|
37
37
|
}
|
|
38
|
-
const box =
|
|
38
|
+
const box = this.span(active);
|
|
39
39
|
const own = surface.getBoundingClientRect();
|
|
40
40
|
if (box.width === 0 && box.height === 0) {
|
|
41
41
|
return;
|
|
@@ -69,6 +69,19 @@ export class IndicatorController {
|
|
|
69
69
|
this.waiting = { on: indicator, settle };
|
|
70
70
|
this.settling = setTimeout(settle, 1000);
|
|
71
71
|
}
|
|
72
|
+
span(active) {
|
|
73
|
+
const first = active.getBoundingClientRect();
|
|
74
|
+
const end = this.options.through?.();
|
|
75
|
+
if (!end || end === active) {
|
|
76
|
+
return first;
|
|
77
|
+
}
|
|
78
|
+
const last = end.getBoundingClientRect();
|
|
79
|
+
const top = Math.min(first.top, last.top);
|
|
80
|
+
const bottom = Math.max(first.bottom, last.bottom);
|
|
81
|
+
const left = Math.min(first.left, last.left);
|
|
82
|
+
const right = Math.max(first.right, last.right);
|
|
83
|
+
return { bottom, height: bottom - top, left, right, top, width: right - left };
|
|
84
|
+
}
|
|
72
85
|
stopWaiting() {
|
|
73
86
|
clearTimeout(this.settling);
|
|
74
87
|
this.settling = undefined;
|
package/dist/version.d.ts
CHANGED
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.174.0';
|
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.174.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Ross Sheppard <ross.sheppard@fusion.dev>",
|
|
7
7
|
"repository": {
|
|
@@ -62,11 +62,11 @@
|
|
|
62
62
|
"bugs": "https://github.com/project-fusion/fusion/issues",
|
|
63
63
|
"dependencies": {
|
|
64
64
|
"@floating-ui/dom": "^1.8.0",
|
|
65
|
-
"@fusion.dev/helix-icons": "0.
|
|
65
|
+
"@fusion.dev/helix-icons": "0.174.0"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
|
-
"@fusion.dev/helix-cem": "0.
|
|
69
|
-
"@fusion.dev/helix-testing": "0.
|
|
68
|
+
"@fusion.dev/helix-cem": "0.174.0",
|
|
69
|
+
"@fusion.dev/helix-testing": "0.174.0",
|
|
70
70
|
"@lit-labs/ssr": "^4.1.0",
|
|
71
71
|
"lit": "^3.2.1"
|
|
72
72
|
},
|