@fusion.dev/helix-headless 0.103.1 → 0.103.2
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 +3 -3
- package/dist/map/root/map-root.d.ts +15 -0
- package/dist/map/root/map-root.js +5 -0
- package/package.json +5 -5
- package/types/jsx.d.ts +30 -2
- package/types/vue.d.ts +8 -1
package/custom-elements.json
CHANGED
|
@@ -55565,7 +55565,7 @@
|
|
|
55565
55565
|
"text": "string"
|
|
55566
55566
|
},
|
|
55567
55567
|
"default": "''",
|
|
55568
|
-
"description": "Accessible name for the map, which is the one thing a consumer must write.\n\nThere is no sensible default. \"Map\" names the widget rather than the place,\nand a reader meeting three of them on a page learns nothing from hearing the\nsame word three times.",
|
|
55568
|
+
"description": "Accessible name for the map, which is the one thing a consumer must write.\n\nThere is no sensible default. \"Map\" names the widget rather than the place,\nand a reader meeting three of them on a page learns nothing from hearing the\nsame word three times.\n\n**The region is a tab stop**, so the keys are reachable however the controls\nare configured: the listener is on the region, and without a stop of its own\na frame at `controls=\"none\"` around a map with nothing focusable in it had\narrow keys no reader could ever press. `aria-keyshortcuts` says which keys\nrather than spelling them into the name, which would otherwise be read out\nat every encounter.",
|
|
55569
55569
|
"attribute": "label"
|
|
55570
55570
|
},
|
|
55571
55571
|
{
|
|
@@ -55721,7 +55721,7 @@
|
|
|
55721
55721
|
"name": "handleKeydown",
|
|
55722
55722
|
"privacy": "private",
|
|
55723
55723
|
"readonly": true,
|
|
55724
|
-
"description": "The arrow keys, which are the second way rather than the only one.\n\n`inlineStep` rather than a test against `ArrowLeft`, so the reader on a\nright-to-left page gets `end` from the key that points the way their text\nruns, which is what the pan buttons say too."
|
|
55724
|
+
"description": "The arrow keys, which are the second way rather than the only one.\n\n`inlineStep` rather than a test against `ArrowLeft`, so the reader on a\nright-to-left page gets `end` from the key that points the way their text\nruns, which is what the pan buttons say too.\n\n**Only from this frame's own chrome, and that is the difference between one\nmove and two.** MapLibre and Leaflet both answer the arrow keys themselves,\nso a press inside a slotted map moves it once on its own and once more on\nthe event this would have sent: every press moving twice, and the consumer\nwith no way to tell which half to turn off. A press that started in the\nshadow root is this frame's to relay; anything from the map belongs to the\nmap."
|
|
55725
55725
|
},
|
|
55726
55726
|
{
|
|
55727
55727
|
"kind": "method",
|
|
@@ -56137,7 +56137,7 @@
|
|
|
56137
56137
|
"text": "string"
|
|
56138
56138
|
},
|
|
56139
56139
|
"default": "''",
|
|
56140
|
-
"description": "Accessible name for the map, which is the one thing a consumer must write.\n\nThere is no sensible default. \"Map\" names the widget rather than the place,\nand a reader meeting three of them on a page learns nothing from hearing the\nsame word three times.",
|
|
56140
|
+
"description": "Accessible name for the map, which is the one thing a consumer must write.\n\nThere is no sensible default. \"Map\" names the widget rather than the place,\nand a reader meeting three of them on a page learns nothing from hearing the\nsame word three times.\n\n**The region is a tab stop**, so the keys are reachable however the controls\nare configured: the listener is on the region, and without a stop of its own\na frame at `controls=\"none\"` around a map with nothing focusable in it had\narrow keys no reader could ever press. `aria-keyshortcuts` says which keys\nrather than spelling them into the name, which would otherwise be read out\nat every encounter.",
|
|
56141
56141
|
"fieldName": "label"
|
|
56142
56142
|
},
|
|
56143
56143
|
{
|
|
@@ -120,6 +120,13 @@ export declare class HelixHeadlessMap extends HelixElement {
|
|
|
120
120
|
* There is no sensible default. "Map" names the widget rather than the place,
|
|
121
121
|
* and a reader meeting three of them on a page learns nothing from hearing the
|
|
122
122
|
* same word three times.
|
|
123
|
+
*
|
|
124
|
+
* **The region is a tab stop**, so the keys are reachable however the controls
|
|
125
|
+
* are configured: the listener is on the region, and without a stop of its own
|
|
126
|
+
* a frame at `controls="none"` around a map with nothing focusable in it had
|
|
127
|
+
* arrow keys no reader could ever press. `aria-keyshortcuts` says which keys
|
|
128
|
+
* rather than spelling them into the name, which would otherwise be read out
|
|
129
|
+
* at every encounter.
|
|
123
130
|
*/
|
|
124
131
|
label: string;
|
|
125
132
|
/**
|
|
@@ -159,6 +166,14 @@ export declare class HelixHeadlessMap extends HelixElement {
|
|
|
159
166
|
* `inlineStep` rather than a test against `ArrowLeft`, so the reader on a
|
|
160
167
|
* right-to-left page gets `end` from the key that points the way their text
|
|
161
168
|
* runs, which is what the pan buttons say too.
|
|
169
|
+
*
|
|
170
|
+
* **Only from this frame's own chrome, and that is the difference between one
|
|
171
|
+
* move and two.** MapLibre and Leaflet both answer the arrow keys themselves,
|
|
172
|
+
* so a press inside a slotted map moves it once on its own and once more on
|
|
173
|
+
* the event this would have sent: every press moving twice, and the consumer
|
|
174
|
+
* with no way to tell which half to turn off. A press that started in the
|
|
175
|
+
* shadow root is this frame's to relay; anything from the map belongs to the
|
|
176
|
+
* map.
|
|
162
177
|
*/
|
|
163
178
|
private readonly handleKeydown;
|
|
164
179
|
/**
|
|
@@ -26,6 +26,9 @@ let HelixHeadlessMap = class HelixHeadlessMap extends HelixElement {
|
|
|
26
26
|
this.resting = resting;
|
|
27
27
|
});
|
|
28
28
|
this.handleKeydown = (event) => {
|
|
29
|
+
if (!this.renderRoot.contains(event.target)) {
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
29
32
|
const along = inlineStep(this, event.key);
|
|
30
33
|
if (along === 1) {
|
|
31
34
|
event.preventDefault();
|
|
@@ -127,6 +130,8 @@ let HelixHeadlessMap = class HelixHeadlessMap extends HelixElement {
|
|
|
127
130
|
part="region"
|
|
128
131
|
role="group"
|
|
129
132
|
aria-label=${this.label || 'Map'}
|
|
133
|
+
aria-keyshortcuts="ArrowUp ArrowDown ArrowLeft ArrowRight Plus Minus"
|
|
134
|
+
tabindex="0"
|
|
130
135
|
@focusin=${this.idle.stir}
|
|
131
136
|
@keydown=${this.handleKeydown}
|
|
132
137
|
@pointerleave=${this.idle.leave}
|
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.103.
|
|
4
|
+
"version": "0.103.2",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Ross Sheppard <ross.sheppard@fusion.dev>",
|
|
7
7
|
"repository": {
|
|
@@ -46,13 +46,13 @@
|
|
|
46
46
|
},
|
|
47
47
|
"bugs": "https://github.com/project-fusion/fusion/issues",
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@fusion.dev/helix-core": "0.103.
|
|
50
|
-
"@fusion.dev/helix-icons": "0.103.
|
|
49
|
+
"@fusion.dev/helix-core": "0.103.2",
|
|
50
|
+
"@fusion.dev/helix-icons": "0.103.2",
|
|
51
51
|
"uqr": "^0.1.3"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
|
-
"@fusion.dev/helix-cem": "0.103.
|
|
55
|
-
"@fusion.dev/helix-testing": "0.103.
|
|
54
|
+
"@fusion.dev/helix-cem": "0.103.2",
|
|
55
|
+
"@fusion.dev/helix-testing": "0.103.2",
|
|
56
56
|
"@fusion.dev/scripts": "0.0.0-dev",
|
|
57
57
|
"@happy-dom/global-registrator": "^20.0.0",
|
|
58
58
|
"@lit-labs/ssr": "^4.1.0",
|
package/types/jsx.d.ts
CHANGED
|
@@ -9467,7 +9467,14 @@ component undoing its own argument. Set it for a display map nobody drives. */
|
|
|
9467
9467
|
|
|
9468
9468
|
There is no sensible default. "Map" names the widget rather than the place,
|
|
9469
9469
|
and a reader meeting three of them on a page learns nothing from hearing the
|
|
9470
|
-
same word three times.
|
|
9470
|
+
same word three times.
|
|
9471
|
+
|
|
9472
|
+
**The region is a tab stop**, so the keys are reachable however the controls
|
|
9473
|
+
are configured: the listener is on the region, and without a stop of its own
|
|
9474
|
+
a frame at `controls="none"` around a map with nothing focusable in it had
|
|
9475
|
+
arrow keys no reader could ever press. `aria-keyshortcuts` says which keys
|
|
9476
|
+
rather than spelling them into the name, which would otherwise be read out
|
|
9477
|
+
at every encounter. */
|
|
9471
9478
|
label?: (HelixHeadlessMap["label"]) | undefined;
|
|
9472
9479
|
/** What the controls are called, for a page not in English. */
|
|
9473
9480
|
"pan-label"?: (HelixHeadlessMap["panLabel"]) | undefined;
|
|
@@ -9574,7 +9581,14 @@ component undoing its own argument. Set it for a display map nobody drives. */
|
|
|
9574
9581
|
|
|
9575
9582
|
There is no sensible default. "Map" names the widget rather than the place,
|
|
9576
9583
|
and a reader meeting three of them on a page learns nothing from hearing the
|
|
9577
|
-
same word three times.
|
|
9584
|
+
same word three times.
|
|
9585
|
+
|
|
9586
|
+
**The region is a tab stop**, so the keys are reachable however the controls
|
|
9587
|
+
are configured: the listener is on the region, and without a stop of its own
|
|
9588
|
+
a frame at `controls="none"` around a map with nothing focusable in it had
|
|
9589
|
+
arrow keys no reader could ever press. `aria-keyshortcuts` says which keys
|
|
9590
|
+
rather than spelling them into the name, which would otherwise be read out
|
|
9591
|
+
at every encounter. */
|
|
9578
9592
|
"prop:label"?: (HelixHeadlessMap["label"]) | undefined;
|
|
9579
9593
|
/** What the controls are called, for a page not in English. */
|
|
9580
9594
|
"attr:pan-label"?: (HelixHeadlessMap["panLabel"]) | undefined;
|
|
@@ -27661,6 +27675,13 @@ export type CustomElements = {
|
|
|
27661
27675
|
* There is no sensible default. "Map" names the widget rather than the place,
|
|
27662
27676
|
* and a reader meeting three of them on a page learns nothing from hearing the
|
|
27663
27677
|
* same word three times.
|
|
27678
|
+
*
|
|
27679
|
+
* **The region is a tab stop**, so the keys are reachable however the controls
|
|
27680
|
+
* are configured: the listener is on the region, and without a stop of its own
|
|
27681
|
+
* a frame at `controls="none"` around a map with nothing focusable in it had
|
|
27682
|
+
* arrow keys no reader could ever press. `aria-keyshortcuts` says which keys
|
|
27683
|
+
* rather than spelling them into the name, which would otherwise be read out
|
|
27684
|
+
* at every encounter.
|
|
27664
27685
|
* - `pan-label`/`panLabel`: What the controls are called, for a page not in English.
|
|
27665
27686
|
* - `pan-step`/`panStep`: How far one press moves the map, as a fraction of what is on screen.
|
|
27666
27687
|
*
|
|
@@ -46166,6 +46187,13 @@ export type CustomElementsSolidJs = {
|
|
|
46166
46187
|
* There is no sensible default. "Map" names the widget rather than the place,
|
|
46167
46188
|
* and a reader meeting three of them on a page learns nothing from hearing the
|
|
46168
46189
|
* same word three times.
|
|
46190
|
+
*
|
|
46191
|
+
* **The region is a tab stop**, so the keys are reachable however the controls
|
|
46192
|
+
* are configured: the listener is on the region, and without a stop of its own
|
|
46193
|
+
* a frame at `controls="none"` around a map with nothing focusable in it had
|
|
46194
|
+
* arrow keys no reader could ever press. `aria-keyshortcuts` says which keys
|
|
46195
|
+
* rather than spelling them into the name, which would otherwise be read out
|
|
46196
|
+
* at every encounter.
|
|
46169
46197
|
* - `pan-label`/`panLabel`: What the controls are called, for a page not in English.
|
|
46170
46198
|
* - `pan-step`/`panStep`: How far one press moves the map, as a fraction of what is on screen.
|
|
46171
46199
|
*
|
package/types/vue.d.ts
CHANGED
|
@@ -4879,7 +4879,14 @@ component undoing its own argument. Set it for a display map nobody drives. */
|
|
|
4879
4879
|
|
|
4880
4880
|
There is no sensible default. "Map" names the widget rather than the place,
|
|
4881
4881
|
and a reader meeting three of them on a page learns nothing from hearing the
|
|
4882
|
-
same word three times.
|
|
4882
|
+
same word three times.
|
|
4883
|
+
|
|
4884
|
+
**The region is a tab stop**, so the keys are reachable however the controls
|
|
4885
|
+
are configured: the listener is on the region, and without a stop of its own
|
|
4886
|
+
a frame at `controls="none"` around a map with nothing focusable in it had
|
|
4887
|
+
arrow keys no reader could ever press. `aria-keyshortcuts` says which keys
|
|
4888
|
+
rather than spelling them into the name, which would otherwise be read out
|
|
4889
|
+
at every encounter. */
|
|
4883
4890
|
label?: (HelixHeadlessMap["label"]) | undefined;
|
|
4884
4891
|
/** What the controls are called, for a page not in English. */
|
|
4885
4892
|
"pan-label"?: (HelixHeadlessMap["panLabel"]) | undefined;
|