@fusion.dev/helix-headless 0.17.2 → 0.19.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
|
@@ -26648,7 +26648,7 @@
|
|
|
26648
26648
|
"declarations": [
|
|
26649
26649
|
{
|
|
26650
26650
|
"kind": "class",
|
|
26651
|
-
"description": "**The tokens are the consumer's own elements, slotted.** What a filter narrows\nby belongs to the consumer's model rather than to this element: a facet with a\nprefix, a saved query, a range. So they are slotted rather than rendered from\na list of strings, and removing one is a request this element makes rather\nthan a change it applies. Combobox is the other way round, and that is the\ndifference between the two: its tokens are a view of a selection it owns,\ndrawn from options it was handed.\n\n**`value` is the text being typed, not the tokens**, which is what makes this\na field a consumer can listen to. Every keystroke announces `input` with the\ntext on the element, so a table narrows as the reader types. The tokens need\nno reporting back, being markup the consumer already holds.\n\nBackspace on an empty field asks the last token to go, through the same\n`helix-dismiss` its own remove control fires, so a consumer who handled the\npointer has already handled the keyboard.\n\n**It can suggest what to type next, and it never learns the grammar.** Slot\n`helix-option` elements into `suggestions` and the field shows them, moves\nthrough them with the arrows, and lets Enter press one; the option fires its\nown `helix-select` and the consumer decides what choosing meant. Deciding\n*what* to suggest is theirs too: keys before a colon and values after it are\nthe same panel with different contents, which is all a two-level filter is,\nand the parse that tells them apart belongs where the domain does.\n\n**The panel opens when there is something in it and closes when there is\nnot**, rather than on a choice. A reader who picks a key wants its values\nnext, and closing on the choice would shut the panel between two renders. Use\n`selectionStart` and `setSelectionRange` to write a completion back and put\nthe caret after it, or the next parse reads the wrong term.",
|
|
26651
|
+
"description": "**The tokens are the consumer's own elements, slotted.** What a filter narrows\nby belongs to the consumer's model rather than to this element: a facet with a\nprefix, a saved query, a range. So they are slotted rather than rendered from\na list of strings, and removing one is a request this element makes rather\nthan a change it applies. Combobox is the other way round, and that is the\ndifference between the two: its tokens are a view of a selection it owns,\ndrawn from options it was handed.\n\n**`value` is the text being typed, not the tokens**, which is what makes this\na field a consumer can listen to. Every keystroke announces `input` with the\ntext on the element, so a table narrows as the reader types. The tokens need\nno reporting back, being markup the consumer already holds.\n\nBackspace on an empty field asks the last token to go, through the same\n`helix-dismiss` its own remove control fires, so a consumer who handled the\npointer has already handled the keyboard.\n\n**It can suggest what to type next, and it never learns the grammar.** Slot\n`helix-option` elements into `suggestions` and the field shows them, moves\nthrough them with the arrows, and lets Enter press one; the option fires its\nown `helix-select` and the consumer decides what choosing meant. Deciding\n*what* to suggest is theirs too: keys before a colon and values after it are\nthe same panel with different contents, which is all a two-level filter is,\nand the parse that tells them apart belongs where the domain does.\n\n**The panel opens when there is something in it and closes when there is\nnot**, rather than on a choice. A reader who picks a key wants its values\nnext, and closing on the choice would shut the panel between two renders. Use\n`selectionStart` and `setSelectionRange` to write a completion back and put\nthe caret after it, or the next parse reads the wrong term.\n\n**Three things here have three different owners, and only one of them is a\ncontrolled property.**\n\n`value` is the text, and it is uncontrolled by default: the reader types, the\nelement applies it, and `input` says so. **Writing `value` does not take that\nover.** It is a seed and a correction, so a consumer who sets it and then\nexpects the field to hold still will watch the next keystroke overwrite them.\nOwnership is taken by refusing `helix-before-change` and writing the value\nyou want, which is the same shape every field in this library uses and is\nworth saying out loud here because the property looks like React's.\n`default-value` seeds the field without claiming anything.\n\n`open` is the suggestions panel, and it is the ordinary controlled pair:\nrefuse `helix-before-open` or `helix-before-close` to take the decision, and\n`default-open` to seed it.\n\nThe tokens are neither, because they are not state. They are the consumer's\nown elements in a slot, so there is nothing for this to own and nothing to\nreport back: a token goes when the consumer removes it from their markup,\nhaving been asked by `helix-dismiss`.",
|
|
26652
26652
|
"name": "HelixHeadlessFilterInput",
|
|
26653
26653
|
"cssParts": [
|
|
26654
26654
|
{
|
|
@@ -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",
|
|
@@ -36,6 +36,27 @@ declare const HelixHeadlessFilterInput_base: (new (...args: any[]) => import("@f
|
|
|
36
36
|
* `selectionStart` and `setSelectionRange` to write a completion back and put
|
|
37
37
|
* the caret after it, or the next parse reads the wrong term.
|
|
38
38
|
*
|
|
39
|
+
* **Three things here have three different owners, and only one of them is a
|
|
40
|
+
* controlled property.**
|
|
41
|
+
*
|
|
42
|
+
* `value` is the text, and it is uncontrolled by default: the reader types, the
|
|
43
|
+
* element applies it, and `input` says so. **Writing `value` does not take that
|
|
44
|
+
* over.** It is a seed and a correction, so a consumer who sets it and then
|
|
45
|
+
* expects the field to hold still will watch the next keystroke overwrite them.
|
|
46
|
+
* Ownership is taken by refusing `helix-before-change` and writing the value
|
|
47
|
+
* you want, which is the same shape every field in this library uses and is
|
|
48
|
+
* worth saying out loud here because the property looks like React's.
|
|
49
|
+
* `default-value` seeds the field without claiming anything.
|
|
50
|
+
*
|
|
51
|
+
* `open` is the suggestions panel, and it is the ordinary controlled pair:
|
|
52
|
+
* refuse `helix-before-open` or `helix-before-close` to take the decision, and
|
|
53
|
+
* `default-open` to seed it.
|
|
54
|
+
*
|
|
55
|
+
* The tokens are neither, because they are not state. They are the consumer's
|
|
56
|
+
* own elements in a slot, so there is nothing for this to own and nothing to
|
|
57
|
+
* report back: a token goes when the consumer removes it from their markup,
|
|
58
|
+
* having been asked by `helix-dismiss`.
|
|
59
|
+
*
|
|
39
60
|
* @since 0.1.0
|
|
40
61
|
* @status experimental
|
|
41
62
|
* @category forms
|
|
@@ -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.19.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.19.0",
|
|
49
|
+
"@fusion.dev/helix-icons": "0.19.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.19.0",
|
|
55
|
+
"@fusion.dev/helix-testing": "0.19.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",
|
package/types/jsx.d.ts
CHANGED
|
@@ -20707,6 +20707,27 @@ export type CustomElements = {
|
|
|
20707
20707
|
* `selectionStart` and `setSelectionRange` to write a completion back and put
|
|
20708
20708
|
* the caret after it, or the next parse reads the wrong term.
|
|
20709
20709
|
*
|
|
20710
|
+
* **Three things here have three different owners, and only one of them is a
|
|
20711
|
+
* controlled property.**
|
|
20712
|
+
*
|
|
20713
|
+
* `value` is the text, and it is uncontrolled by default: the reader types, the
|
|
20714
|
+
* element applies it, and `input` says so. **Writing `value` does not take that
|
|
20715
|
+
* over.** It is a seed and a correction, so a consumer who sets it and then
|
|
20716
|
+
* expects the field to hold still will watch the next keystroke overwrite them.
|
|
20717
|
+
* Ownership is taken by refusing `helix-before-change` and writing the value
|
|
20718
|
+
* you want, which is the same shape every field in this library uses and is
|
|
20719
|
+
* worth saying out loud here because the property looks like React's.
|
|
20720
|
+
* `default-value` seeds the field without claiming anything.
|
|
20721
|
+
*
|
|
20722
|
+
* `open` is the suggestions panel, and it is the ordinary controlled pair:
|
|
20723
|
+
* refuse `helix-before-open` or `helix-before-close` to take the decision, and
|
|
20724
|
+
* `default-open` to seed it.
|
|
20725
|
+
*
|
|
20726
|
+
* The tokens are neither, because they are not state. They are the consumer's
|
|
20727
|
+
* own elements in a slot, so there is nothing for this to own and nothing to
|
|
20728
|
+
* report back: a token goes when the consumer removes it from their markup,
|
|
20729
|
+
* having been asked by `helix-dismiss`.
|
|
20730
|
+
*
|
|
20710
20731
|
* ## Attributes & Properties
|
|
20711
20732
|
*
|
|
20712
20733
|
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
|
@@ -35221,6 +35242,27 @@ export type CustomElementsSolidJs = {
|
|
|
35221
35242
|
* `selectionStart` and `setSelectionRange` to write a completion back and put
|
|
35222
35243
|
* the caret after it, or the next parse reads the wrong term.
|
|
35223
35244
|
*
|
|
35245
|
+
* **Three things here have three different owners, and only one of them is a
|
|
35246
|
+
* controlled property.**
|
|
35247
|
+
*
|
|
35248
|
+
* `value` is the text, and it is uncontrolled by default: the reader types, the
|
|
35249
|
+
* element applies it, and `input` says so. **Writing `value` does not take that
|
|
35250
|
+
* over.** It is a seed and a correction, so a consumer who sets it and then
|
|
35251
|
+
* expects the field to hold still will watch the next keystroke overwrite them.
|
|
35252
|
+
* Ownership is taken by refusing `helix-before-change` and writing the value
|
|
35253
|
+
* you want, which is the same shape every field in this library uses and is
|
|
35254
|
+
* worth saying out loud here because the property looks like React's.
|
|
35255
|
+
* `default-value` seeds the field without claiming anything.
|
|
35256
|
+
*
|
|
35257
|
+
* `open` is the suggestions panel, and it is the ordinary controlled pair:
|
|
35258
|
+
* refuse `helix-before-open` or `helix-before-close` to take the decision, and
|
|
35259
|
+
* `default-open` to seed it.
|
|
35260
|
+
*
|
|
35261
|
+
* The tokens are neither, because they are not state. They are the consumer's
|
|
35262
|
+
* own elements in a slot, so there is nothing for this to own and nothing to
|
|
35263
|
+
* report back: a token goes when the consumer removes it from their markup,
|
|
35264
|
+
* having been asked by `helix-dismiss`.
|
|
35265
|
+
*
|
|
35224
35266
|
* ## Attributes & Properties
|
|
35225
35267
|
*
|
|
35226
35268
|
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
package/types/vue.d.ts
CHANGED
|
@@ -8390,7 +8390,7 @@ export interface WcToolkitVueGlobalComponents {
|
|
|
8390
8390
|
HelixHeadlessFileInputVueProps,
|
|
8391
8391
|
HelixHeadlessFileInputVueEvents
|
|
8392
8392
|
>;
|
|
8393
|
-
/** **The tokens are the consumer's own elements, slotted.** What a filter narrows by belongs to the consumer's model rather than to this element: a facet with a prefix, a saved query, a range. So they are slotted rather than rendered from a list of strings, and removing one is a request this element makes rather than a change it applies. Combobox is the other way round, and that is the difference between the two: its tokens are a view of a selection it owns, drawn from options it was handed. **'value' is the text being typed, not the tokens**, which is what makes this a field a consumer can listen to. Every keystroke announces 'input' with the text on the element, so a table narrows as the reader types. The tokens need no reporting back, being markup the consumer already holds. Backspace on an empty field asks the last token to go, through the same 'helix-dismiss' its own remove control fires, so a consumer who handled the pointer has already handled the keyboard. **It can suggest what to type next, and it never learns the grammar.** Slot 'helix-option' elements into 'suggestions' and the field shows them, moves through them with the arrows, and lets Enter press one; the option fires its own 'helix-select' and the consumer decides what choosing meant. Deciding *what* to suggest is theirs too: keys before a colon and values after it are the same panel with different contents, which is all a two-level filter is, and the parse that tells them apart belongs where the domain does. **The panel opens when there is something in it and closes when there is not**, rather than on a choice. A reader who picks a key wants its values next, and closing on the choice would shut the panel between two renders. Use 'selectionStart' and 'setSelectionRange' to write a completion back and put the caret after it, or the next parse reads the wrong term. */
|
|
8393
|
+
/** **The tokens are the consumer's own elements, slotted.** What a filter narrows by belongs to the consumer's model rather than to this element: a facet with a prefix, a saved query, a range. So they are slotted rather than rendered from a list of strings, and removing one is a request this element makes rather than a change it applies. Combobox is the other way round, and that is the difference between the two: its tokens are a view of a selection it owns, drawn from options it was handed. **'value' is the text being typed, not the tokens**, which is what makes this a field a consumer can listen to. Every keystroke announces 'input' with the text on the element, so a table narrows as the reader types. The tokens need no reporting back, being markup the consumer already holds. Backspace on an empty field asks the last token to go, through the same 'helix-dismiss' its own remove control fires, so a consumer who handled the pointer has already handled the keyboard. **It can suggest what to type next, and it never learns the grammar.** Slot 'helix-option' elements into 'suggestions' and the field shows them, moves through them with the arrows, and lets Enter press one; the option fires its own 'helix-select' and the consumer decides what choosing meant. Deciding *what* to suggest is theirs too: keys before a colon and values after it are the same panel with different contents, which is all a two-level filter is, and the parse that tells them apart belongs where the domain does. **The panel opens when there is something in it and closes when there is not**, rather than on a choice. A reader who picks a key wants its values next, and closing on the choice would shut the panel between two renders. Use 'selectionStart' and 'setSelectionRange' to write a completion back and put the caret after it, or the next parse reads the wrong term. **Three things here have three different owners, and only one of them is a controlled property.** 'value' is the text, and it is uncontrolled by default: the reader types, the element applies it, and 'input' says so. **Writing 'value' does not take that over.** It is a seed and a correction, so a consumer who sets it and then expects the field to hold still will watch the next keystroke overwrite them. Ownership is taken by refusing 'helix-before-change' and writing the value you want, which is the same shape every field in this library uses and is worth saying out loud here because the property looks like React's. 'default-value' seeds the field without claiming anything. 'open' is the suggestions panel, and it is the ordinary controlled pair: refuse 'helix-before-open' or 'helix-before-close' to take the decision, and 'default-open' to seed it. The tokens are neither, because they are not state. They are the consumer's own elements in a slot, so there is nothing for this to own and nothing to report back: a token goes when the consumer removes it from their markup, having been asked by 'helix-dismiss'. */
|
|
8394
8394
|
"helix-headless-filter-input": DefineCustomElement<
|
|
8395
8395
|
HelixHeadlessFilterInput,
|
|
8396
8396
|
HelixHeadlessFilterInputVueProps,
|