@fusion.dev/helix-headless 0.17.2 → 0.18.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
|
@@ -76554,6 +76554,13 @@
|
|
|
76554
76554
|
"readonly": true,
|
|
76555
76555
|
"description": "Restarts the wait, on anything that counts as the reader being here.\n\nPointer movement and focus both count, and both have to: a reader using the\nkeyboard never moves a pointer, and a bar that only answered the mouse\nwould leave them nothing to look at."
|
|
76556
76556
|
},
|
|
76557
|
+
{
|
|
76558
|
+
"kind": "field",
|
|
76559
|
+
"name": "handlePicture",
|
|
76560
|
+
"privacy": "private",
|
|
76561
|
+
"readonly": true,
|
|
76562
|
+
"description": "A press on the picture plays or pauses it.\n\n**The picture is the biggest target a player has**, and on every other\nplayer a reader has used it is the one that stops the thing. A component\nthat spends the whole frame on a video and then asks for a 32 pixel button\nis one that works only for people who know where the button is.\n\n**Two cases where it must not.** The first is `controls`, where the browser\ndraws its own bar over the picture and owns what a press on it means: acting\nas well would toggle twice, once here and once in the UA, which cancels out\nand looks broken.\n\nThe second is a player whose chrome has gone idle. There, the first press is\nasking for the controls back rather than asking to pause, which is what\nevery touch player does: `stir` brings them, and the press is spent. A\nsecond press, with the bar showing, means what it says. This is also why the\ncheck is `idle` rather than a pointer-type test: it is the same answer for a\nmouse left resting until the bar faded."
|
|
76563
|
+
},
|
|
76557
76564
|
{
|
|
76558
76565
|
"kind": "field",
|
|
76559
76566
|
"name": "handleFullscreenChange",
|
|
@@ -593,6 +593,27 @@ export declare class HelixHeadlessVideo extends HelixElement {
|
|
|
593
593
|
* would leave them nothing to look at.
|
|
594
594
|
*/
|
|
595
595
|
private readonly stir;
|
|
596
|
+
/**
|
|
597
|
+
* A press on the picture plays or pauses it.
|
|
598
|
+
*
|
|
599
|
+
* **The picture is the biggest target a player has**, and on every other
|
|
600
|
+
* player a reader has used it is the one that stops the thing. A component
|
|
601
|
+
* that spends the whole frame on a video and then asks for a 32 pixel button
|
|
602
|
+
* is one that works only for people who know where the button is.
|
|
603
|
+
*
|
|
604
|
+
* **Two cases where it must not.** The first is `controls`, where the browser
|
|
605
|
+
* draws its own bar over the picture and owns what a press on it means: acting
|
|
606
|
+
* as well would toggle twice, once here and once in the UA, which cancels out
|
|
607
|
+
* and looks broken.
|
|
608
|
+
*
|
|
609
|
+
* The second is a player whose chrome has gone idle. There, the first press is
|
|
610
|
+
* asking for the controls back rather than asking to pause, which is what
|
|
611
|
+
* every touch player does: `stir` brings them, and the press is spent. A
|
|
612
|
+
* second press, with the bar showing, means what it says. This is also why the
|
|
613
|
+
* check is `idle` rather than a pointer-type test: it is the same answer for a
|
|
614
|
+
* mouse left resting until the bar faded.
|
|
615
|
+
*/
|
|
616
|
+
private readonly handlePicture;
|
|
596
617
|
private readonly handleFullscreenChange;
|
|
597
618
|
/**
|
|
598
619
|
* The keys every player uses, bound to this element rather than the document.
|
|
@@ -157,6 +157,16 @@ let HelixHeadlessVideo = class HelixHeadlessVideo extends HelixElement {
|
|
|
157
157
|
}, this.idleDelay);
|
|
158
158
|
}
|
|
159
159
|
};
|
|
160
|
+
this.handlePicture = () => {
|
|
161
|
+
if (this.controls) {
|
|
162
|
+
return;
|
|
163
|
+
}
|
|
164
|
+
if (this.idle) {
|
|
165
|
+
this.stir();
|
|
166
|
+
return;
|
|
167
|
+
}
|
|
168
|
+
this.toggle();
|
|
169
|
+
};
|
|
160
170
|
this.handleFullscreenChange = () => {
|
|
161
171
|
this.full = document.fullscreenElement === this;
|
|
162
172
|
};
|
|
@@ -841,6 +851,7 @@ let HelixHeadlessVideo = class HelixHeadlessVideo extends HelixElement {
|
|
|
841
851
|
?loop=${this.loop}
|
|
842
852
|
?muted=${this.defaultMuted}
|
|
843
853
|
?playsinline=${this.playsInline}
|
|
854
|
+
@click=${this.handlePicture}
|
|
844
855
|
@loadedmetadata=${this.handleLoaded}
|
|
845
856
|
@timeupdate=${this.handleTime}
|
|
846
857
|
@volumechange=${this.handleVolume}
|
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.18.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Ross Sheppard <ross.sheppard@fusion.dev>",
|
|
7
7
|
"repository": {
|
|
@@ -45,14 +45,14 @@
|
|
|
45
45
|
},
|
|
46
46
|
"bugs": "https://github.com/project-fusion/fusion/issues",
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@fusion.dev/helix-core": "0.
|
|
49
|
-
"@fusion.dev/helix-icons": "0.
|
|
48
|
+
"@fusion.dev/helix-core": "0.18.0",
|
|
49
|
+
"@fusion.dev/helix-icons": "0.18.0",
|
|
50
50
|
"uqr": "^0.1.3"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@custom-elements-manifest/analyzer": "^0.11.0",
|
|
54
|
-
"@fusion.dev/helix-cem": "0.
|
|
55
|
-
"@fusion.dev/helix-testing": "0.
|
|
54
|
+
"@fusion.dev/helix-cem": "0.18.0",
|
|
55
|
+
"@fusion.dev/helix-testing": "0.18.0",
|
|
56
56
|
"@fusion.dev/scripts": "0.0.0-dev",
|
|
57
57
|
"@happy-dom/global-registrator": "^20.0.0",
|
|
58
58
|
"@lit-labs/ssr": "^3.3.0",
|