@fusion.dev/helix-headless 0.103.0 → 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 +15 -3
- package/dist/map/root/map-root.d.ts +30 -0
- package/dist/map/root/map-root.js +14 -3
- package/package.json +5 -5
- package/types/jsx.d.ts +36 -2
- package/types/vue.d.ts +8 -1
package/custom-elements.json
CHANGED
|
@@ -55446,14 +55446,26 @@
|
|
|
55446
55446
|
"description": "**Helix draws no map.** There are no tiles here, no projection and no\nnetwork, and there should not be: a tile renderer is a library, and what a\ndesign system can add to MapLibre or Leaflet is the frame. The consumer slots\ntheir map and this owns the box, the name, the controls and the way out,\nwhich is the shape `VideoPlaylist` uses for a player it never renders.\n\n**The accessibility argument is the reason this exists**, and it was measured\nrather than assumed: a map embedded the ordinary way is a canvas with no role\nand no name, and it has *no node at all* in the accessibility tree. A reader\nusing a screen reader does not walk past it so much as never meet it. A named\nregion with controls in it is the whole of the difference.\n\n**The controls are buttons, and that is a deliberate choice against arrow\nkeys.** Arrows work here too, but what a screen reader does with them is not\nours to decide: macOS passes them through, Windows readers hold them for\ntheir own reading mode unless a page takes `role=\"application\"`, which costs\nthe reader their normal way of reading everything else in the frame. A button\nis findable and operable in every screen reader on every platform without\nthat bargain, so panning and zooming are buttons first and keys second.\n\n**Nothing here moves the map.** Both controls ask, through `helix-map-pan`\nand `helix-map-zoom`, and the consumer answers against whatever they slotted.\nA frame that moved the map would have to know whose map it was.",
|
|
55447
55447
|
"name": "HelixHeadlessMap",
|
|
55448
55448
|
"cssParts": [
|
|
55449
|
+
{
|
|
55450
|
+
"description": "The strip the credit sits in, under the map.",
|
|
55451
|
+
"name": "attribution"
|
|
55452
|
+
},
|
|
55449
55453
|
{
|
|
55450
55454
|
"description": "The group the pan and zoom buttons sit in.",
|
|
55451
55455
|
"name": "controls"
|
|
55452
55456
|
},
|
|
55457
|
+
{
|
|
55458
|
+
"description": "The strip below the map, for what a consumer slots there.",
|
|
55459
|
+
"name": "footer"
|
|
55460
|
+
},
|
|
55453
55461
|
{
|
|
55454
55462
|
"description": "The button that fills the screen.",
|
|
55455
55463
|
"name": "fullscreen"
|
|
55456
55464
|
},
|
|
55465
|
+
{
|
|
55466
|
+
"description": "The strip above the map, for what a consumer slots there.",
|
|
55467
|
+
"name": "header"
|
|
55468
|
+
},
|
|
55457
55469
|
{
|
|
55458
55470
|
"description": "The button that moves the map down.",
|
|
55459
55471
|
"name": "pan-down"
|
|
@@ -55553,7 +55565,7 @@
|
|
|
55553
55565
|
"text": "string"
|
|
55554
55566
|
},
|
|
55555
55567
|
"default": "''",
|
|
55556
|
-
"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.",
|
|
55557
55569
|
"attribute": "label"
|
|
55558
55570
|
},
|
|
55559
55571
|
{
|
|
@@ -55709,7 +55721,7 @@
|
|
|
55709
55721
|
"name": "handleKeydown",
|
|
55710
55722
|
"privacy": "private",
|
|
55711
55723
|
"readonly": true,
|
|
55712
|
-
"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."
|
|
55713
55725
|
},
|
|
55714
55726
|
{
|
|
55715
55727
|
"kind": "method",
|
|
@@ -56125,7 +56137,7 @@
|
|
|
56125
56137
|
"text": "string"
|
|
56126
56138
|
},
|
|
56127
56139
|
"default": "''",
|
|
56128
|
-
"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.",
|
|
56129
56141
|
"fieldName": "label"
|
|
56130
56142
|
},
|
|
56131
56143
|
{
|
|
@@ -46,8 +46,11 @@ export type MapControlsPlacement = 'top-start' | 'top-end' | 'bottom-start' | 'b
|
|
|
46
46
|
* @event {HelixMapPanEvent} helix-map-pan - The reader asked the map to move. Answer it against your own map.
|
|
47
47
|
* @event {HelixMapZoomEvent} helix-map-zoom - The reader asked the map to zoom, by a direction rather than to a level.
|
|
48
48
|
*
|
|
49
|
+
* @csspart attribution - The strip the credit sits in, under the map.
|
|
49
50
|
* @csspart controls - The group the pan and zoom buttons sit in.
|
|
51
|
+
* @csspart footer - The strip below the map, for what a consumer slots there.
|
|
50
52
|
* @csspart fullscreen - The button that fills the screen.
|
|
53
|
+
* @csspart header - The strip above the map, for what a consumer slots there.
|
|
51
54
|
* @csspart pan-down - The button that moves the map down.
|
|
52
55
|
* @csspart pan-end - The button that moves the map the way the text ends, which is right on an English page.
|
|
53
56
|
* @csspart pan-start - The button that moves the map the way the text starts, which is left on an English page.
|
|
@@ -117,6 +120,13 @@ export declare class HelixHeadlessMap extends HelixElement {
|
|
|
117
120
|
* There is no sensible default. "Map" names the widget rather than the place,
|
|
118
121
|
* and a reader meeting three of them on a page learns nothing from hearing the
|
|
119
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.
|
|
120
130
|
*/
|
|
121
131
|
label: string;
|
|
122
132
|
/**
|
|
@@ -156,6 +166,14 @@ export declare class HelixHeadlessMap extends HelixElement {
|
|
|
156
166
|
* `inlineStep` rather than a test against `ArrowLeft`, so the reader on a
|
|
157
167
|
* right-to-left page gets `end` from the key that points the way their text
|
|
158
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.
|
|
159
177
|
*/
|
|
160
178
|
private readonly handleKeydown;
|
|
161
179
|
/**
|
|
@@ -185,6 +203,18 @@ export declare class HelixHeadlessMap extends HelixElement {
|
|
|
185
203
|
* `drawIcon` names for `Trend`.
|
|
186
204
|
*/
|
|
187
205
|
private renderControls;
|
|
206
|
+
/**
|
|
207
|
+
* The frame, with each region in a box of its own.
|
|
208
|
+
*
|
|
209
|
+
* **The boxes are load-bearing rather than tidiness.** A `<slot>` is
|
|
210
|
+
* `display: contents`, so what lands in the grid is whatever a consumer
|
|
211
|
+
* assigned rather than the slot itself: with no header slotted, the viewport
|
|
212
|
+
* took the first row and the attribution took the `1fr`, and the map collapsed
|
|
213
|
+
* to the height of one line of text. Which slots a consumer fills is not
|
|
214
|
+
* something the layout may depend on, so each region is a box that holds its
|
|
215
|
+
* row whether or not anything is in it, and an empty one is a row of no
|
|
216
|
+
* height.
|
|
217
|
+
*/
|
|
188
218
|
protected render(): TemplateResult;
|
|
189
219
|
}
|
|
190
220
|
declare global {
|
|
@@ -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,18 +130,26 @@ 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}
|
|
133
138
|
@pointermove=${this.idle.stir}
|
|
134
139
|
>
|
|
135
|
-
<
|
|
140
|
+
<div part="header">
|
|
141
|
+
<slot name="header"></slot>
|
|
142
|
+
</div>
|
|
136
143
|
<div part="viewport">
|
|
137
144
|
<slot></slot>
|
|
138
145
|
</div>
|
|
139
146
|
${this.renderControls()}
|
|
140
|
-
<
|
|
141
|
-
|
|
147
|
+
<div part="footer">
|
|
148
|
+
<slot name="footer"></slot>
|
|
149
|
+
</div>
|
|
150
|
+
<div part="attribution">
|
|
151
|
+
<slot name="attribution"></slot>
|
|
152
|
+
</div>
|
|
142
153
|
</div>`;
|
|
143
154
|
}
|
|
144
155
|
};
|
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
|
*
|
|
@@ -27719,8 +27740,11 @@ export type CustomElements = {
|
|
|
27719
27740
|
*
|
|
27720
27741
|
* Custom selectors for styling elements within the component.
|
|
27721
27742
|
*
|
|
27743
|
+
* - `attribution`: The strip the credit sits in, under the map.
|
|
27722
27744
|
* - `controls`: The group the pan and zoom buttons sit in.
|
|
27745
|
+
* - `footer`: The strip below the map, for what a consumer slots there.
|
|
27723
27746
|
* - `fullscreen`: The button that fills the screen.
|
|
27747
|
+
* - `header`: The strip above the map, for what a consumer slots there.
|
|
27724
27748
|
* - `pan-down`: The button that moves the map down.
|
|
27725
27749
|
* - `pan-end`: The button that moves the map the way the text ends, which is right on an English page.
|
|
27726
27750
|
* - `pan-start`: The button that moves the map the way the text starts, which is left on an English page.
|
|
@@ -46163,6 +46187,13 @@ export type CustomElementsSolidJs = {
|
|
|
46163
46187
|
* There is no sensible default. "Map" names the widget rather than the place,
|
|
46164
46188
|
* and a reader meeting three of them on a page learns nothing from hearing the
|
|
46165
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.
|
|
46166
46197
|
* - `pan-label`/`panLabel`: What the controls are called, for a page not in English.
|
|
46167
46198
|
* - `pan-step`/`panStep`: How far one press moves the map, as a fraction of what is on screen.
|
|
46168
46199
|
*
|
|
@@ -46221,8 +46252,11 @@ export type CustomElementsSolidJs = {
|
|
|
46221
46252
|
*
|
|
46222
46253
|
* Custom selectors for styling elements within the component.
|
|
46223
46254
|
*
|
|
46255
|
+
* - `attribution`: The strip the credit sits in, under the map.
|
|
46224
46256
|
* - `controls`: The group the pan and zoom buttons sit in.
|
|
46257
|
+
* - `footer`: The strip below the map, for what a consumer slots there.
|
|
46225
46258
|
* - `fullscreen`: The button that fills the screen.
|
|
46259
|
+
* - `header`: The strip above the map, for what a consumer slots there.
|
|
46226
46260
|
* - `pan-down`: The button that moves the map down.
|
|
46227
46261
|
* - `pan-end`: The button that moves the map the way the text ends, which is right on an English page.
|
|
46228
46262
|
* - `pan-start`: The button that moves the map the way the text starts, which is left on an English page.
|
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;
|