@fusion.dev/helix-headless 0.114.0 → 0.116.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 +255 -1
- package/dist/map/area/map-area.d.ts +18 -0
- package/dist/map/area/map-area.js +7 -0
- package/dist/map/root/map-root.d.ts +78 -0
- package/dist/map/root/map-root.js +137 -1
- package/package.json +5 -5
- package/types/jsx.d.ts +166 -0
- package/types/vue.d.ts +50 -1
package/custom-elements.json
CHANGED
|
@@ -62448,9 +62448,28 @@
|
|
|
62448
62448
|
"declarations": [
|
|
62449
62449
|
{
|
|
62450
62450
|
"kind": "class",
|
|
62451
|
-
"description": "`connectMap` fills the shape as a layer of the map, under its place names.\nThe frame lists each area by its `label` and `description` for screen\nreaders.",
|
|
62451
|
+
"description": "`connectMap` fills the shape as a layer of the map, under its place names.\nThe frame lists each area by its `label` and `description` for screen\nreaders.\n\nSet `caption` to draw words on the map with the area, such as a letter for a\nsearch sector, in a color that reads on the map. It is drawn rather than\nfocusable, so it adds nothing to the tab order, and a screen reader reads\nthe area's `label` in the frame's list.",
|
|
62452
62452
|
"name": "HelixHeadlessMapArea",
|
|
62453
62453
|
"members": [
|
|
62454
|
+
{
|
|
62455
|
+
"kind": "field",
|
|
62456
|
+
"name": "caption",
|
|
62457
|
+
"type": {
|
|
62458
|
+
"text": "string | undefined"
|
|
62459
|
+
},
|
|
62460
|
+
"description": "Words drawn on the map with the area, such as `A` for a search sector.\nUnset, nothing is drawn. Keep it short: it is a caption on a map, and the\narea's `label` is what a screen reader hears.",
|
|
62461
|
+
"attribute": "caption"
|
|
62462
|
+
},
|
|
62463
|
+
{
|
|
62464
|
+
"kind": "field",
|
|
62465
|
+
"name": "captionPlacement",
|
|
62466
|
+
"type": {
|
|
62467
|
+
"text": "'inside' | 'outside'"
|
|
62468
|
+
},
|
|
62469
|
+
"default": "'inside'",
|
|
62470
|
+
"description": "Where the caption stands. `inside`, the default, at the point of the area\nfurthest from its edges. `outside`, just above the area's northernmost\npoint, clear of the shape, for an area whose caption would cover what is\nin it.",
|
|
62471
|
+
"attribute": "caption-placement"
|
|
62472
|
+
},
|
|
62454
62473
|
{
|
|
62455
62474
|
"kind": "field",
|
|
62456
62475
|
"name": "description",
|
|
@@ -62834,6 +62853,23 @@
|
|
|
62834
62853
|
}
|
|
62835
62854
|
],
|
|
62836
62855
|
"attributes": [
|
|
62856
|
+
{
|
|
62857
|
+
"name": "caption",
|
|
62858
|
+
"type": {
|
|
62859
|
+
"text": "string | undefined"
|
|
62860
|
+
},
|
|
62861
|
+
"description": "Words drawn on the map with the area, such as `A` for a search sector.\nUnset, nothing is drawn. Keep it short: it is a caption on a map, and the\narea's `label` is what a screen reader hears.",
|
|
62862
|
+
"fieldName": "caption"
|
|
62863
|
+
},
|
|
62864
|
+
{
|
|
62865
|
+
"name": "caption-placement",
|
|
62866
|
+
"type": {
|
|
62867
|
+
"text": "'inside' | 'outside'"
|
|
62868
|
+
},
|
|
62869
|
+
"default": "'inside'",
|
|
62870
|
+
"description": "Where the caption stands. `inside`, the default, at the point of the area\nfurthest from its edges. `outside`, just above the area's northernmost\npoint, clear of the shape, for an area whose caption would cover what is\nin it.",
|
|
62871
|
+
"fieldName": "captionPlacement"
|
|
62872
|
+
},
|
|
62837
62873
|
{
|
|
62838
62874
|
"name": "description",
|
|
62839
62875
|
"type": {
|
|
@@ -67177,6 +67213,14 @@
|
|
|
67177
67213
|
"description": "The button that makes the map fill the screen.",
|
|
67178
67214
|
"name": "fullscreen"
|
|
67179
67215
|
},
|
|
67216
|
+
{
|
|
67217
|
+
"description": "Words over the map for a moment when it lets a gesture pass to the page, such as how to zoom it.",
|
|
67218
|
+
"name": "gesture-hint"
|
|
67219
|
+
},
|
|
67220
|
+
{
|
|
67221
|
+
"description": "The line shown while a map with `gestures=\"activate\"` has the gestures.",
|
|
67222
|
+
"name": "gesture-status"
|
|
67223
|
+
},
|
|
67180
67224
|
{
|
|
67181
67225
|
"description": "The strip above the map.",
|
|
67182
67226
|
"name": "header"
|
|
@@ -67301,6 +67345,16 @@
|
|
|
67301
67345
|
}
|
|
67302
67346
|
],
|
|
67303
67347
|
"members": [
|
|
67348
|
+
{
|
|
67349
|
+
"kind": "field",
|
|
67350
|
+
"name": "activateHintLabel",
|
|
67351
|
+
"type": {
|
|
67352
|
+
"text": "string"
|
|
67353
|
+
},
|
|
67354
|
+
"default": "'Press the map to use it'",
|
|
67355
|
+
"description": "The hint shown when a map waiting to be pressed is scrolled or swiped\nover, with `gestures=\"activate\"`.",
|
|
67356
|
+
"attribute": "activate-hint-label"
|
|
67357
|
+
},
|
|
67304
67358
|
{
|
|
67305
67359
|
"kind": "field",
|
|
67306
67360
|
"name": "bearing",
|
|
@@ -67341,6 +67395,15 @@
|
|
|
67341
67395
|
"description": "What screen readers hear when the map is tilted back to looking straight down.",
|
|
67342
67396
|
"attribute": "flat-label"
|
|
67343
67397
|
},
|
|
67398
|
+
{
|
|
67399
|
+
"kind": "field",
|
|
67400
|
+
"name": "gestures",
|
|
67401
|
+
"type": {
|
|
67402
|
+
"text": "'activate' | 'always' | 'cooperative' | undefined"
|
|
67403
|
+
},
|
|
67404
|
+
"description": "Which gestures the map takes from the page.\n\n- `always`, which unset is: the wheel zooms the map and one finger pans\n it, for a map that is the page, such as a full-screen view.\n- `cooperative`: the wheel and one finger scroll the page, and the map\n takes Ctrl or ⌘ with the wheel, and two fingers. The frame says so\n when a gesture passes to the page. Best for a map embedded in a page.\n- `activate`: the map takes nothing until it is pressed, and gives it\n back on Escape, when the pointer leaves it, or on a press elsewhere.\n\nThe keyboard and the frame's buttons work in every mode. The renderer is\ntold through the connector, so MapLibre and Leaflet behave alike.",
|
|
67405
|
+
"attribute": "gestures"
|
|
67406
|
+
},
|
|
67344
67407
|
{
|
|
67345
67408
|
"kind": "field",
|
|
67346
67409
|
"name": "hybridLabel",
|
|
@@ -67521,6 +67584,36 @@
|
|
|
67521
67584
|
"description": "What screen readers hear when the map is turned. `{degrees}` is the way the\ntop of the map faces, clockwise from north.",
|
|
67522
67585
|
"attribute": "turned-label"
|
|
67523
67586
|
},
|
|
67587
|
+
{
|
|
67588
|
+
"kind": "field",
|
|
67589
|
+
"name": "twoFingerHintLabel",
|
|
67590
|
+
"type": {
|
|
67591
|
+
"text": "string"
|
|
67592
|
+
},
|
|
67593
|
+
"default": "'Use two fingers to move the map'",
|
|
67594
|
+
"description": "The hint shown when one finger swipes over a map with `gestures=\"cooperative\"`.",
|
|
67595
|
+
"attribute": "two-finger-hint-label"
|
|
67596
|
+
},
|
|
67597
|
+
{
|
|
67598
|
+
"kind": "field",
|
|
67599
|
+
"name": "usingLabel",
|
|
67600
|
+
"type": {
|
|
67601
|
+
"text": "string"
|
|
67602
|
+
},
|
|
67603
|
+
"default": "'Using the map. Press Escape to scroll the page again.'",
|
|
67604
|
+
"description": "The line shown while a map with `gestures=\"activate\"` has the gestures.",
|
|
67605
|
+
"attribute": "using-label"
|
|
67606
|
+
},
|
|
67607
|
+
{
|
|
67608
|
+
"kind": "field",
|
|
67609
|
+
"name": "wheelHintLabel",
|
|
67610
|
+
"type": {
|
|
67611
|
+
"text": "string"
|
|
67612
|
+
},
|
|
67613
|
+
"default": "'Use {key} and scroll to zoom the map'",
|
|
67614
|
+
"description": "The hint shown when the wheel scrolls past a map with\n`gestures=\"cooperative\"`, with `{key}`, which is ⌘ on a Mac and Ctrl\nelsewhere, as the renderer reads it.",
|
|
67615
|
+
"attribute": "wheel-hint-label"
|
|
67616
|
+
},
|
|
67524
67617
|
{
|
|
67525
67618
|
"kind": "field",
|
|
67526
67619
|
"name": "zoomedLabel",
|
|
@@ -67880,6 +67973,119 @@
|
|
|
67880
67973
|
"privacy": "private",
|
|
67881
67974
|
"readonly": true
|
|
67882
67975
|
},
|
|
67976
|
+
{
|
|
67977
|
+
"kind": "field",
|
|
67978
|
+
"name": "hint",
|
|
67979
|
+
"type": {
|
|
67980
|
+
"text": "string"
|
|
67981
|
+
},
|
|
67982
|
+
"privacy": "private",
|
|
67983
|
+
"default": "''",
|
|
67984
|
+
"description": "The hint on the map while one shows, put there by a gesture the map let pass."
|
|
67985
|
+
},
|
|
67986
|
+
{
|
|
67987
|
+
"kind": "field",
|
|
67988
|
+
"name": "hinting",
|
|
67989
|
+
"type": {
|
|
67990
|
+
"text": "ReturnType<typeof setTimeout> | undefined"
|
|
67991
|
+
},
|
|
67992
|
+
"privacy": "private",
|
|
67993
|
+
"description": "When the hint goes."
|
|
67994
|
+
},
|
|
67995
|
+
{
|
|
67996
|
+
"kind": "field",
|
|
67997
|
+
"name": "hintAt",
|
|
67998
|
+
"type": {
|
|
67999
|
+
"text": "{ x: number; y: number } | undefined"
|
|
68000
|
+
},
|
|
68001
|
+
"privacy": "private",
|
|
68002
|
+
"description": "Where the gesture was, in the map's box, which the hint is shown at:\nwhere the reader is looking, and on the map wherever a page laid its own\ncontent over the rest of it."
|
|
68003
|
+
},
|
|
68004
|
+
{
|
|
68005
|
+
"kind": "field",
|
|
68006
|
+
"name": "taken",
|
|
68007
|
+
"type": {
|
|
68008
|
+
"text": "boolean"
|
|
68009
|
+
},
|
|
68010
|
+
"privacy": "private",
|
|
68011
|
+
"default": "false",
|
|
68012
|
+
"description": "Whether a map with `gestures=\"activate\"` has been pressed, and has the gestures."
|
|
68013
|
+
},
|
|
68014
|
+
{
|
|
68015
|
+
"kind": "method",
|
|
68016
|
+
"name": "showHint",
|
|
68017
|
+
"privacy": "private",
|
|
68018
|
+
"return": {
|
|
68019
|
+
"type": {
|
|
68020
|
+
"text": "void"
|
|
68021
|
+
}
|
|
68022
|
+
},
|
|
68023
|
+
"parameters": [
|
|
68024
|
+
{
|
|
68025
|
+
"name": "words",
|
|
68026
|
+
"type": {
|
|
68027
|
+
"text": "string"
|
|
68028
|
+
}
|
|
68029
|
+
},
|
|
68030
|
+
{
|
|
68031
|
+
"name": "at",
|
|
68032
|
+
"optional": true,
|
|
68033
|
+
"type": {
|
|
68034
|
+
"text": "{ clientX: number; clientY: number }"
|
|
68035
|
+
}
|
|
68036
|
+
}
|
|
68037
|
+
],
|
|
68038
|
+
"description": "Shows a hint over the map for a moment, where the gesture was."
|
|
68039
|
+
},
|
|
68040
|
+
{
|
|
68041
|
+
"kind": "field",
|
|
68042
|
+
"name": "handleWheel",
|
|
68043
|
+
"privacy": "private",
|
|
68044
|
+
"readonly": true,
|
|
68045
|
+
"description": "A wheel the map let pass to the page, which is said: a reader scrolling\nthe page past a map that did not zoom is told why, and how to zoom it.\n**Ctrl or ⌘ with the wheel is the map's**, and is what a trackpad's pinch\narrives as."
|
|
68046
|
+
},
|
|
68047
|
+
{
|
|
68048
|
+
"kind": "field",
|
|
68049
|
+
"name": "handleTouchMove",
|
|
68050
|
+
"privacy": "private",
|
|
68051
|
+
"readonly": true,
|
|
68052
|
+
"description": "One finger moving over the map, which scrolls the page, and is said."
|
|
68053
|
+
},
|
|
68054
|
+
{
|
|
68055
|
+
"kind": "field",
|
|
68056
|
+
"name": "handleTake",
|
|
68057
|
+
"privacy": "private",
|
|
68058
|
+
"readonly": true,
|
|
68059
|
+
"description": "A press on the map itself, which hands a waiting map the gestures."
|
|
68060
|
+
},
|
|
68061
|
+
{
|
|
68062
|
+
"kind": "field",
|
|
68063
|
+
"name": "handleGiveBackKey",
|
|
68064
|
+
"privacy": "private",
|
|
68065
|
+
"readonly": true,
|
|
68066
|
+
"description": "Escape, which gives the page its scroll back."
|
|
68067
|
+
},
|
|
68068
|
+
{
|
|
68069
|
+
"kind": "field",
|
|
68070
|
+
"name": "handleGiveBackOutside",
|
|
68071
|
+
"privacy": "private",
|
|
68072
|
+
"readonly": true,
|
|
68073
|
+
"description": "A press anywhere else on the page, which gives it its scroll back."
|
|
68074
|
+
},
|
|
68075
|
+
{
|
|
68076
|
+
"kind": "field",
|
|
68077
|
+
"name": "handleGiveBackBlur",
|
|
68078
|
+
"privacy": "private",
|
|
68079
|
+
"readonly": true,
|
|
68080
|
+
"description": "The window losing focus, as a reader switching away does."
|
|
68081
|
+
},
|
|
68082
|
+
{
|
|
68083
|
+
"kind": "field",
|
|
68084
|
+
"name": "handleLeave",
|
|
68085
|
+
"privacy": "private",
|
|
68086
|
+
"readonly": true,
|
|
68087
|
+
"description": "The pointer leaving the frame. **Heard on the frame and not the map's\ncanvas**, which a pointer resting on a marker has left, since markers\nstand outside it. **A mouse or a pen and never a finger**, whose\n`pointerleave` is the finger lifting: a tap took the map and gave it back\nin one."
|
|
68088
|
+
},
|
|
67883
68089
|
{
|
|
67884
68090
|
"kind": "field",
|
|
67885
68091
|
"name": "handleSlotChange",
|
|
@@ -68975,6 +69181,15 @@
|
|
|
68975
69181
|
}
|
|
68976
69182
|
],
|
|
68977
69183
|
"attributes": [
|
|
69184
|
+
{
|
|
69185
|
+
"name": "activate-hint-label",
|
|
69186
|
+
"type": {
|
|
69187
|
+
"text": "string"
|
|
69188
|
+
},
|
|
69189
|
+
"default": "'Press the map to use it'",
|
|
69190
|
+
"description": "The hint shown when a map waiting to be pressed is scrolled or swiped\nover, with `gestures=\"activate\"`.",
|
|
69191
|
+
"fieldName": "activateHintLabel"
|
|
69192
|
+
},
|
|
68978
69193
|
{
|
|
68979
69194
|
"name": "bearing",
|
|
68980
69195
|
"type": {
|
|
@@ -69011,6 +69226,14 @@
|
|
|
69011
69226
|
"description": "What screen readers hear when the map is tilted back to looking straight down.",
|
|
69012
69227
|
"fieldName": "flatLabel"
|
|
69013
69228
|
},
|
|
69229
|
+
{
|
|
69230
|
+
"name": "gestures",
|
|
69231
|
+
"type": {
|
|
69232
|
+
"text": "'activate' | 'always' | 'cooperative' | undefined"
|
|
69233
|
+
},
|
|
69234
|
+
"description": "Which gestures the map takes from the page.\n\n- `always`, which unset is: the wheel zooms the map and one finger pans\n it, for a map that is the page, such as a full-screen view.\n- `cooperative`: the wheel and one finger scroll the page, and the map\n takes Ctrl or ⌘ with the wheel, and two fingers. The frame says so\n when a gesture passes to the page. Best for a map embedded in a page.\n- `activate`: the map takes nothing until it is pressed, and gives it\n back on Escape, when the pointer leaves it, or on a press elsewhere.\n\nThe keyboard and the frame's buttons work in every mode. The renderer is\ntold through the connector, so MapLibre and Leaflet behave alike.",
|
|
69235
|
+
"fieldName": "gestures"
|
|
69236
|
+
},
|
|
69014
69237
|
{
|
|
69015
69238
|
"name": "hybrid-label",
|
|
69016
69239
|
"type": {
|
|
@@ -69172,6 +69395,33 @@
|
|
|
69172
69395
|
"description": "What screen readers hear when the map is turned. `{degrees}` is the way the\ntop of the map faces, clockwise from north.",
|
|
69173
69396
|
"fieldName": "turnedLabel"
|
|
69174
69397
|
},
|
|
69398
|
+
{
|
|
69399
|
+
"name": "two-finger-hint-label",
|
|
69400
|
+
"type": {
|
|
69401
|
+
"text": "string"
|
|
69402
|
+
},
|
|
69403
|
+
"default": "'Use two fingers to move the map'",
|
|
69404
|
+
"description": "The hint shown when one finger swipes over a map with `gestures=\"cooperative\"`.",
|
|
69405
|
+
"fieldName": "twoFingerHintLabel"
|
|
69406
|
+
},
|
|
69407
|
+
{
|
|
69408
|
+
"name": "using-label",
|
|
69409
|
+
"type": {
|
|
69410
|
+
"text": "string"
|
|
69411
|
+
},
|
|
69412
|
+
"default": "'Using the map. Press Escape to scroll the page again.'",
|
|
69413
|
+
"description": "The line shown while a map with `gestures=\"activate\"` has the gestures.",
|
|
69414
|
+
"fieldName": "usingLabel"
|
|
69415
|
+
},
|
|
69416
|
+
{
|
|
69417
|
+
"name": "wheel-hint-label",
|
|
69418
|
+
"type": {
|
|
69419
|
+
"text": "string"
|
|
69420
|
+
},
|
|
69421
|
+
"default": "'Use {key} and scroll to zoom the map'",
|
|
69422
|
+
"description": "The hint shown when the wheel scrolls past a map with\n`gestures=\"cooperative\"`, with `{key}`, which is ⌘ on a Mac and Ctrl\nelsewhere, as the renderer reads it.",
|
|
69423
|
+
"fieldName": "wheelHintLabel"
|
|
69424
|
+
},
|
|
69175
69425
|
{
|
|
69176
69426
|
"name": "zoomed-label",
|
|
69177
69427
|
"type": {
|
|
@@ -69356,6 +69606,10 @@
|
|
|
69356
69606
|
"description": "The map has been drawn whole, after `helix-map-ready`.",
|
|
69357
69607
|
"name": "ready"
|
|
69358
69608
|
},
|
|
69609
|
+
{
|
|
69610
|
+
"description": "A map with `gestures=\"activate\"` has been pressed and has the gestures.",
|
|
69611
|
+
"name": "using"
|
|
69612
|
+
},
|
|
69359
69613
|
{
|
|
69360
69614
|
"description": "Set one frame after the first render. Transitions wait for it, so an element does not animate its own arrival.",
|
|
69361
69615
|
"name": "settled",
|
|
@@ -9,6 +9,11 @@ import { type MapPoint } from '../route/map-route.js';
|
|
|
9
9
|
* The frame lists each area by its `label` and `description` for screen
|
|
10
10
|
* readers.
|
|
11
11
|
*
|
|
12
|
+
* Set `caption` to draw words on the map with the area, such as a letter for a
|
|
13
|
+
* search sector, in a color that reads on the map. It is drawn rather than
|
|
14
|
+
* focusable, so it adds nothing to the tab order, and a screen reader reads
|
|
15
|
+
* the area's `label` in the frame's list.
|
|
16
|
+
*
|
|
12
17
|
* @since 0.105.0
|
|
13
18
|
* @status experimental
|
|
14
19
|
* @category media
|
|
@@ -18,6 +23,19 @@ import { type MapPoint } from '../route/map-route.js';
|
|
|
18
23
|
* @event {HelixMapPartChangeEvent} helix-map-part-change - The area's points, name, or color changed. Used by `connectMap`; pages do not need to listen for it.
|
|
19
24
|
*/
|
|
20
25
|
export declare class HelixHeadlessMapArea extends HelixElement {
|
|
26
|
+
/**
|
|
27
|
+
* Words drawn on the map with the area, such as `A` for a search sector.
|
|
28
|
+
* Unset, nothing is drawn. Keep it short: it is a caption on a map, and the
|
|
29
|
+
* area's `label` is what a screen reader hears.
|
|
30
|
+
*/
|
|
31
|
+
caption?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Where the caption stands. `inside`, the default, at the point of the area
|
|
34
|
+
* furthest from its edges. `outside`, just above the area's northernmost
|
|
35
|
+
* point, clear of the shape, for an area whose caption would cover what is
|
|
36
|
+
* in it.
|
|
37
|
+
*/
|
|
38
|
+
captionPlacement: 'inside' | 'outside';
|
|
21
39
|
/** More about the area. Read after its label in the frame's list. */
|
|
22
40
|
description?: string;
|
|
23
41
|
/**
|
|
@@ -11,6 +11,7 @@ import { pointsConverter } from '../route/map-route.js';
|
|
|
11
11
|
let HelixHeadlessMapArea = class HelixHeadlessMapArea extends HelixElement {
|
|
12
12
|
constructor() {
|
|
13
13
|
super(...arguments);
|
|
14
|
+
this.captionPlacement = 'inside';
|
|
14
15
|
this.isMapLayer = true;
|
|
15
16
|
this.layerKind = 'area';
|
|
16
17
|
this.label = 'Area';
|
|
@@ -23,6 +24,12 @@ let HelixHeadlessMapArea = class HelixHeadlessMapArea extends HelixElement {
|
|
|
23
24
|
return nothing;
|
|
24
25
|
}
|
|
25
26
|
};
|
|
27
|
+
__decorate([
|
|
28
|
+
property()
|
|
29
|
+
], HelixHeadlessMapArea.prototype, "caption", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
property({ attribute: 'caption-placement' })
|
|
32
|
+
], HelixHeadlessMapArea.prototype, "captionPlacement", void 0);
|
|
26
33
|
__decorate([
|
|
27
34
|
property()
|
|
28
35
|
], HelixHeadlessMapArea.prototype, "description", void 0);
|
|
@@ -81,6 +81,8 @@ declare const HelixHeadlessMap_base: (new (...args: any[]) => import("@fusion.de
|
|
|
81
81
|
* @csspart face-north - The compass: its needle points north as the map turns, and pressing it turns the map to face north.
|
|
82
82
|
* @csspart footer - The strip below the map.
|
|
83
83
|
* @csspart fullscreen - The button that makes the map fill the screen.
|
|
84
|
+
* @csspart gesture-hint - Words over the map for a moment when it lets a gesture pass to the page, such as how to zoom it.
|
|
85
|
+
* @csspart gesture-status - The line shown while a map with `gestures="activate"` has the gestures.
|
|
84
86
|
* @csspart header - The strip above the map.
|
|
85
87
|
* @csspart layer - One entry in the list of the map's layers.
|
|
86
88
|
* @csspart layer-choice - One layer's tile in the layers menu, pressed while the layer is shown.
|
|
@@ -113,8 +115,14 @@ declare const HelixHeadlessMap_base: (new (...args: any[]) => import("@fusion.de
|
|
|
113
115
|
* @cssstate fullscreen - The map fills the screen.
|
|
114
116
|
* @cssstate idle - The user has been still long enough for the header and footer to fade.
|
|
115
117
|
* @cssstate ready - The map has been drawn whole, after `helix-map-ready`.
|
|
118
|
+
* @cssstate using - A map with `gestures="activate"` has been pressed and has the gestures.
|
|
116
119
|
*/
|
|
117
120
|
export declare class HelixHeadlessMap extends HelixHeadlessMap_base {
|
|
121
|
+
/**
|
|
122
|
+
* The hint shown when a map waiting to be pressed is scrolled or swiped
|
|
123
|
+
* over, with `gestures="activate"`.
|
|
124
|
+
*/
|
|
125
|
+
activateHintLabel: string;
|
|
118
126
|
/**
|
|
119
127
|
* The map's rotation, in degrees clockwise from north. `connectMap` keeps it
|
|
120
128
|
* current, and the Face north button's needle turns with it.
|
|
@@ -129,6 +137,21 @@ export declare class HelixHeadlessMap extends HelixHeadlessMap_base {
|
|
|
129
137
|
faceNorthLabel: string;
|
|
130
138
|
/** What screen readers hear when the map is tilted back to looking straight down. */
|
|
131
139
|
flatLabel: string;
|
|
140
|
+
/**
|
|
141
|
+
* Which gestures the map takes from the page.
|
|
142
|
+
*
|
|
143
|
+
* - `always`, which unset is: the wheel zooms the map and one finger pans
|
|
144
|
+
* it, for a map that is the page, such as a full-screen view.
|
|
145
|
+
* - `cooperative`: the wheel and one finger scroll the page, and the map
|
|
146
|
+
* takes Ctrl or ⌘ with the wheel, and two fingers. The frame says so
|
|
147
|
+
* when a gesture passes to the page. Best for a map embedded in a page.
|
|
148
|
+
* - `activate`: the map takes nothing until it is pressed, and gives it
|
|
149
|
+
* back on Escape, when the pointer leaves it, or on a press elsewhere.
|
|
150
|
+
*
|
|
151
|
+
* The keyboard and the frame's buttons work in every mode. The renderer is
|
|
152
|
+
* told through the connector, so MapLibre and Leaflet behave alike.
|
|
153
|
+
*/
|
|
154
|
+
gestures?: 'activate' | 'always' | 'cooperative';
|
|
132
155
|
/** The Hybrid map type's name. */
|
|
133
156
|
hybridLabel: string;
|
|
134
157
|
/**
|
|
@@ -190,6 +213,16 @@ export declare class HelixHeadlessMap extends HelixHeadlessMap_base {
|
|
|
190
213
|
* top of the map faces, clockwise from north.
|
|
191
214
|
*/
|
|
192
215
|
turnedLabel: string;
|
|
216
|
+
/** The hint shown when one finger swipes over a map with `gestures="cooperative"`. */
|
|
217
|
+
twoFingerHintLabel: string;
|
|
218
|
+
/** The line shown while a map with `gestures="activate"` has the gestures. */
|
|
219
|
+
usingLabel: string;
|
|
220
|
+
/**
|
|
221
|
+
* The hint shown when the wheel scrolls past a map with
|
|
222
|
+
* `gestures="cooperative"`, with `{key}`, which is ⌘ on a Mac and Ctrl
|
|
223
|
+
* elsewhere, as the renderer reads it.
|
|
224
|
+
*/
|
|
225
|
+
wheelHintLabel: string;
|
|
193
226
|
/**
|
|
194
227
|
* What screen readers hear after a zoom. `{level}` is the zoom level.
|
|
195
228
|
*/
|
|
@@ -315,6 +348,51 @@ export declare class HelixHeadlessMap extends HelixHeadlessMap_base {
|
|
|
315
348
|
*/
|
|
316
349
|
private readonly handleMarkerKeydown;
|
|
317
350
|
private readonly handleMarkerKeyup;
|
|
351
|
+
/** The hint on the map while one shows, put there by a gesture the map let pass. */
|
|
352
|
+
private hint;
|
|
353
|
+
/** When the hint goes. */
|
|
354
|
+
private hinting;
|
|
355
|
+
/**
|
|
356
|
+
* Where the gesture was, in the map's box, which the hint is shown at:
|
|
357
|
+
* where the reader is looking, and on the map wherever a page laid its own
|
|
358
|
+
* content over the rest of it.
|
|
359
|
+
*/
|
|
360
|
+
private hintAt;
|
|
361
|
+
/** Whether a map with `gestures="activate"` has been pressed, and has the gestures. */
|
|
362
|
+
private taken;
|
|
363
|
+
/**
|
|
364
|
+
* @internal Which gestures the renderer takes, which `connectMap` tells it:
|
|
365
|
+
* all of them, the cooperative set, or none, while an `activate` map waits
|
|
366
|
+
* to be pressed.
|
|
367
|
+
*/
|
|
368
|
+
get gestureMode(): 'cooperative' | 'free' | 'off';
|
|
369
|
+
/** Shows a hint over the map for a moment, where the gesture was. */
|
|
370
|
+
private showHint;
|
|
371
|
+
/**
|
|
372
|
+
* A wheel the map let pass to the page, which is said: a reader scrolling
|
|
373
|
+
* the page past a map that did not zoom is told why, and how to zoom it.
|
|
374
|
+
* **Ctrl or ⌘ with the wheel is the map's**, and is what a trackpad's pinch
|
|
375
|
+
* arrives as.
|
|
376
|
+
*/
|
|
377
|
+
private readonly handleWheel;
|
|
378
|
+
/** One finger moving over the map, which scrolls the page, and is said. */
|
|
379
|
+
private readonly handleTouchMove;
|
|
380
|
+
/** A press on the map itself, which hands a waiting map the gestures. */
|
|
381
|
+
private readonly handleTake;
|
|
382
|
+
/** Escape, which gives the page its scroll back. */
|
|
383
|
+
private readonly handleGiveBackKey;
|
|
384
|
+
/** A press anywhere else on the page, which gives it its scroll back. */
|
|
385
|
+
private readonly handleGiveBackOutside;
|
|
386
|
+
/** The window losing focus, as a reader switching away does. */
|
|
387
|
+
private readonly handleGiveBackBlur;
|
|
388
|
+
/**
|
|
389
|
+
* The pointer leaving the frame. **Heard on the frame and not the map's
|
|
390
|
+
* canvas**, which a pointer resting on a marker has left, since markers
|
|
391
|
+
* stand outside it. **A mouse or a pen and never a finger**, whose
|
|
392
|
+
* `pointerleave` is the finger lifting: a tap took the map and gave it back
|
|
393
|
+
* in one.
|
|
394
|
+
*/
|
|
395
|
+
private readonly handleLeave;
|
|
318
396
|
/** A marker added or taken away is a walk of a different length. */
|
|
319
397
|
private readonly handleSlotChange;
|
|
320
398
|
connectedCallback(): void;
|
|
@@ -37,10 +37,12 @@ const TILT_STEP = 10;
|
|
|
37
37
|
const TILTED = 50;
|
|
38
38
|
const placed = (marker) => Number.isFinite(marker.lat) && Number.isFinite(marker.lng);
|
|
39
39
|
const ASK_LAPSES = 3000;
|
|
40
|
+
const HINT_SHOWS = 1600;
|
|
40
41
|
const SETTLES = 400;
|
|
41
42
|
let HelixHeadlessMap = class HelixHeadlessMap extends MixinViewport(HelixElement) {
|
|
42
43
|
constructor() {
|
|
43
44
|
super(...arguments);
|
|
45
|
+
this.activateHintLabel = 'Press the map to use it';
|
|
44
46
|
this.bearing = 0;
|
|
45
47
|
this.cluster = false;
|
|
46
48
|
this.faceNorthLabel = 'Face north';
|
|
@@ -63,6 +65,9 @@ let HelixHeadlessMap = class HelixHeadlessMap extends MixinViewport(HelixElement
|
|
|
63
65
|
this.tiltedLabel = 'Tilted {degrees} degrees';
|
|
64
66
|
this.tiltLabel = 'Show in 3D';
|
|
65
67
|
this.turnedLabel = 'Facing {degrees} degrees';
|
|
68
|
+
this.twoFingerHintLabel = 'Use two fingers to move the map';
|
|
69
|
+
this.usingLabel = 'Using the map. Press Escape to scroll the page again.';
|
|
70
|
+
this.wheelHintLabel = 'Use {key} and scroll to zoom the map';
|
|
66
71
|
this.zoomedLabel = 'Zoom level {level}';
|
|
67
72
|
this.said = '';
|
|
68
73
|
this.asked = undefined;
|
|
@@ -131,6 +136,61 @@ let HelixHeadlessMap = class HelixHeadlessMap extends MixinViewport(HelixElement
|
|
|
131
136
|
this.activate(marker);
|
|
132
137
|
}
|
|
133
138
|
};
|
|
139
|
+
this.hint = '';
|
|
140
|
+
this.taken = false;
|
|
141
|
+
this.handleWheel = (event) => {
|
|
142
|
+
if (this.gestures === 'cooperative' && !(event.ctrlKey || event.metaKey)) {
|
|
143
|
+
const mac = typeof navigator !== 'undefined' && navigator.userAgent.includes('Mac');
|
|
144
|
+
this.showHint(fillTemplate(this.wheelHintLabel, { key: mac ? '⌘' : 'Ctrl' }), event);
|
|
145
|
+
}
|
|
146
|
+
else if (this.gestures === 'activate' && !this.taken) {
|
|
147
|
+
this.showHint(this.activateHintLabel, event);
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
this.handleTouchMove = (event) => {
|
|
151
|
+
const finger = event.touches[0];
|
|
152
|
+
if (event.touches.length !== 1) {
|
|
153
|
+
return;
|
|
154
|
+
}
|
|
155
|
+
if (this.gestures === 'cooperative') {
|
|
156
|
+
this.showHint(this.twoFingerHintLabel, finger);
|
|
157
|
+
}
|
|
158
|
+
else if (this.gestures === 'activate' && !this.taken) {
|
|
159
|
+
this.showHint(this.activateHintLabel, finger);
|
|
160
|
+
}
|
|
161
|
+
};
|
|
162
|
+
this.handleTake = (event) => {
|
|
163
|
+
const viewport = this.partNamed('viewport');
|
|
164
|
+
if (this.gestures !== 'activate' || this.taken || !viewport) {
|
|
165
|
+
return;
|
|
166
|
+
}
|
|
167
|
+
const path = event.composedPath();
|
|
168
|
+
const onMap = path.includes(viewport) ||
|
|
169
|
+
path.some((one) => one instanceof Element && one.parentElement === this && one.slot === '');
|
|
170
|
+
if (onMap) {
|
|
171
|
+
this.taken = true;
|
|
172
|
+
this.hint = '';
|
|
173
|
+
}
|
|
174
|
+
};
|
|
175
|
+
this.handleGiveBackKey = (event) => {
|
|
176
|
+
if (event.key === 'Escape' && this.taken) {
|
|
177
|
+
this.taken = false;
|
|
178
|
+
}
|
|
179
|
+
};
|
|
180
|
+
this.handleGiveBackOutside = (event) => {
|
|
181
|
+
if (!event.composedPath().includes(this)) {
|
|
182
|
+
this.taken = false;
|
|
183
|
+
}
|
|
184
|
+
};
|
|
185
|
+
this.handleGiveBackBlur = () => {
|
|
186
|
+
this.taken = false;
|
|
187
|
+
};
|
|
188
|
+
this.handleLeave = (event) => {
|
|
189
|
+
this.idle.leave();
|
|
190
|
+
if (event.pointerType !== 'touch') {
|
|
191
|
+
this.taken = false;
|
|
192
|
+
}
|
|
193
|
+
};
|
|
134
194
|
this.handleSlotChange = () => {
|
|
135
195
|
this.requestUpdate();
|
|
136
196
|
};
|
|
@@ -243,6 +303,24 @@ let HelixHeadlessMap = class HelixHeadlessMap extends MixinViewport(HelixElement
|
|
|
243
303
|
}
|
|
244
304
|
this.dispatchEvent(new HelixActivateEvent({ value: marker.name || marker.label || '' }));
|
|
245
305
|
}
|
|
306
|
+
get gestureMode() {
|
|
307
|
+
if (this.gestures === 'cooperative') {
|
|
308
|
+
return 'cooperative';
|
|
309
|
+
}
|
|
310
|
+
return this.gestures === 'activate' && !this.taken ? 'off' : 'free';
|
|
311
|
+
}
|
|
312
|
+
showHint(words, at) {
|
|
313
|
+
const box = this.partNamed('viewport')?.getBoundingClientRect();
|
|
314
|
+
this.hintAt =
|
|
315
|
+
at && box && box.width > 0 && box.height > 0
|
|
316
|
+
? { x: (at.clientX - box.left) / box.width, y: (at.clientY - box.top) / box.height }
|
|
317
|
+
: undefined;
|
|
318
|
+
this.hint = words;
|
|
319
|
+
clearTimeout(this.hinting);
|
|
320
|
+
this.hinting = setTimeout(() => {
|
|
321
|
+
this.hint = '';
|
|
322
|
+
}, HINT_SHOWS);
|
|
323
|
+
}
|
|
246
324
|
connectedCallback() {
|
|
247
325
|
super.connectedCallback();
|
|
248
326
|
this.addEventListener(HelixMapPartChangeEvent.eventName, this.handlePartChange);
|
|
@@ -250,6 +328,10 @@ let HelixHeadlessMap = class HelixHeadlessMap extends MixinViewport(HelixElement
|
|
|
250
328
|
this.addEventListener('focusin', this.handleFocusIn);
|
|
251
329
|
this.addEventListener('keydown', this.handleMarkerKeydown);
|
|
252
330
|
this.addEventListener('keyup', this.handleMarkerKeyup);
|
|
331
|
+
this.addEventListener('keydown', this.handleGiveBackKey);
|
|
332
|
+
this.addEventListener('pointerdown', this.handleTake);
|
|
333
|
+
this.addEventListener('touchmove', this.handleTouchMove, { passive: true });
|
|
334
|
+
this.addEventListener('wheel', this.handleWheel, { passive: true });
|
|
253
335
|
this.hiding = new MutationObserver(() => this.requestUpdate());
|
|
254
336
|
this.hiding.observe(this, { attributeFilter: ['hidden'], attributes: true, subtree: true });
|
|
255
337
|
}
|
|
@@ -264,6 +346,14 @@ let HelixHeadlessMap = class HelixHeadlessMap extends MixinViewport(HelixElement
|
|
|
264
346
|
this.removeEventListener('focusin', this.handleFocusIn);
|
|
265
347
|
this.removeEventListener('keydown', this.handleMarkerKeydown);
|
|
266
348
|
this.removeEventListener('keyup', this.handleMarkerKeyup);
|
|
349
|
+
this.removeEventListener('keydown', this.handleGiveBackKey);
|
|
350
|
+
this.removeEventListener('pointerdown', this.handleTake);
|
|
351
|
+
this.removeEventListener('touchmove', this.handleTouchMove);
|
|
352
|
+
this.removeEventListener('wheel', this.handleWheel);
|
|
353
|
+
clearTimeout(this.hinting);
|
|
354
|
+
this.taken = false;
|
|
355
|
+
document.removeEventListener('pointerdown', this.handleGiveBackOutside);
|
|
356
|
+
window.removeEventListener('blur', this.handleGiveBackBlur);
|
|
267
357
|
}
|
|
268
358
|
firstUpdated(changed) {
|
|
269
359
|
super.firstUpdated(changed);
|
|
@@ -274,6 +364,20 @@ let HelixHeadlessMap = class HelixHeadlessMap extends MixinViewport(HelixElement
|
|
|
274
364
|
if (changed.has('mapType')) {
|
|
275
365
|
this.dispatchEvent(new HelixMapPartChangeEvent({ kind: 'layer' }));
|
|
276
366
|
}
|
|
367
|
+
if (changed.has('gestures') || changed.has('taken')) {
|
|
368
|
+
if (this.gestures !== 'activate' && this.taken) {
|
|
369
|
+
this.taken = false;
|
|
370
|
+
}
|
|
371
|
+
if (this.taken) {
|
|
372
|
+
document.addEventListener('pointerdown', this.handleGiveBackOutside);
|
|
373
|
+
window.addEventListener('blur', this.handleGiveBackBlur);
|
|
374
|
+
}
|
|
375
|
+
else {
|
|
376
|
+
document.removeEventListener('pointerdown', this.handleGiveBackOutside);
|
|
377
|
+
window.removeEventListener('blur', this.handleGiveBackBlur);
|
|
378
|
+
}
|
|
379
|
+
this.dispatchEvent(new HelixMapPartChangeEvent({ kind: 'gestures' }));
|
|
380
|
+
}
|
|
277
381
|
if (changed.has('layersOpen')) {
|
|
278
382
|
if (this.layersOpen) {
|
|
279
383
|
document.addEventListener('pointerdown', this.handleOutside);
|
|
@@ -515,6 +619,7 @@ let HelixHeadlessMap = class HelixHeadlessMap extends MixinViewport(HelixElement
|
|
|
515
619
|
hostAria(this.internals, { label: this.label });
|
|
516
620
|
this.toggleState('fullscreen', this.filled);
|
|
517
621
|
this.toggleState('idle', this.resting);
|
|
622
|
+
this.toggleState('using', this.taken);
|
|
518
623
|
}
|
|
519
624
|
renderLayers() {
|
|
520
625
|
const layers = this.layers.filter((layer) => this.shown(layer));
|
|
@@ -534,7 +639,7 @@ let HelixHeadlessMap = class HelixHeadlessMap extends MixinViewport(HelixElement
|
|
|
534
639
|
tabindex="0"
|
|
535
640
|
@focusin=${this.idle.stir}
|
|
536
641
|
@keydown=${this.handleKeydown}
|
|
537
|
-
@pointerleave=${this.
|
|
642
|
+
@pointerleave=${this.handleLeave}
|
|
538
643
|
@pointermove=${this.idle.stir}
|
|
539
644
|
>
|
|
540
645
|
<div part="header">
|
|
@@ -542,6 +647,13 @@ let HelixHeadlessMap = class HelixHeadlessMap extends MixinViewport(HelixElement
|
|
|
542
647
|
</div>
|
|
543
648
|
<div part="viewport">
|
|
544
649
|
<slot @slotchange=${this.handleSlotChange}></slot>
|
|
650
|
+
<div
|
|
651
|
+
part="gesture-hint"
|
|
652
|
+
aria-hidden="true"
|
|
653
|
+
?hidden=${this.hint === ''}
|
|
654
|
+
style=${this.hintAt ? `--_map-hint-x: ${(this.hintAt.x * 100).toFixed(2)}%; --_map-hint-y: ${(this.hintAt.y * 100).toFixed(2)}%` : nothing}
|
|
655
|
+
>${this.hint}</div>
|
|
656
|
+
<div part="gesture-status" aria-hidden="true" ?hidden=${!this.taken}>${this.usingLabel}</div>
|
|
545
657
|
</div>
|
|
546
658
|
${this.renderLayers()}
|
|
547
659
|
${this.renderControls()}
|
|
@@ -555,6 +667,9 @@ let HelixHeadlessMap = class HelixHeadlessMap extends MixinViewport(HelixElement
|
|
|
555
667
|
</div>`;
|
|
556
668
|
}
|
|
557
669
|
};
|
|
670
|
+
__decorate([
|
|
671
|
+
property({ attribute: 'activate-hint-label' })
|
|
672
|
+
], HelixHeadlessMap.prototype, "activateHintLabel", void 0);
|
|
558
673
|
__decorate([
|
|
559
674
|
property({ type: Number })
|
|
560
675
|
], HelixHeadlessMap.prototype, "bearing", void 0);
|
|
@@ -567,6 +682,9 @@ __decorate([
|
|
|
567
682
|
__decorate([
|
|
568
683
|
property({ attribute: 'flat-label' })
|
|
569
684
|
], HelixHeadlessMap.prototype, "flatLabel", void 0);
|
|
685
|
+
__decorate([
|
|
686
|
+
property()
|
|
687
|
+
], HelixHeadlessMap.prototype, "gestures", void 0);
|
|
570
688
|
__decorate([
|
|
571
689
|
property({ attribute: 'hybrid-label' })
|
|
572
690
|
], HelixHeadlessMap.prototype, "hybridLabel", void 0);
|
|
@@ -624,6 +742,15 @@ __decorate([
|
|
|
624
742
|
__decorate([
|
|
625
743
|
property({ attribute: 'turned-label' })
|
|
626
744
|
], HelixHeadlessMap.prototype, "turnedLabel", void 0);
|
|
745
|
+
__decorate([
|
|
746
|
+
property({ attribute: 'two-finger-hint-label' })
|
|
747
|
+
], HelixHeadlessMap.prototype, "twoFingerHintLabel", void 0);
|
|
748
|
+
__decorate([
|
|
749
|
+
property({ attribute: 'using-label' })
|
|
750
|
+
], HelixHeadlessMap.prototype, "usingLabel", void 0);
|
|
751
|
+
__decorate([
|
|
752
|
+
property({ attribute: 'wheel-hint-label' })
|
|
753
|
+
], HelixHeadlessMap.prototype, "wheelHintLabel", void 0);
|
|
627
754
|
__decorate([
|
|
628
755
|
property({ attribute: 'zoomed-label' })
|
|
629
756
|
], HelixHeadlessMap.prototype, "zoomedLabel", void 0);
|
|
@@ -639,6 +766,15 @@ __decorate([
|
|
|
639
766
|
__decorate([
|
|
640
767
|
state()
|
|
641
768
|
], HelixHeadlessMap.prototype, "stop", void 0);
|
|
769
|
+
__decorate([
|
|
770
|
+
state()
|
|
771
|
+
], HelixHeadlessMap.prototype, "hint", void 0);
|
|
772
|
+
__decorate([
|
|
773
|
+
state()
|
|
774
|
+
], HelixHeadlessMap.prototype, "hintAt", void 0);
|
|
775
|
+
__decorate([
|
|
776
|
+
state()
|
|
777
|
+
], HelixHeadlessMap.prototype, "taken", void 0);
|
|
642
778
|
HelixHeadlessMap = __decorate([
|
|
643
779
|
customElement('helix-headless-map')
|
|
644
780
|
], HelixHeadlessMap);
|
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.116.0",
|
|
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.
|
|
50
|
-
"@fusion.dev/helix-icons": "0.
|
|
49
|
+
"@fusion.dev/helix-core": "0.116.0",
|
|
50
|
+
"@fusion.dev/helix-icons": "0.116.0",
|
|
51
51
|
"uqr": "^0.1.3"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
|
-
"@fusion.dev/helix-cem": "0.
|
|
55
|
-
"@fusion.dev/helix-testing": "0.
|
|
54
|
+
"@fusion.dev/helix-cem": "0.116.0",
|
|
55
|
+
"@fusion.dev/helix-testing": "0.116.0",
|
|
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
|
@@ -11474,6 +11474,20 @@ export type HelixHeadlessMapAreaHelixMapPartChangeElementEvent =
|
|
|
11474
11474
|
HelixHeadlessMapAreaElementEvent<HelixMapPartChangeEvent>;
|
|
11475
11475
|
|
|
11476
11476
|
export type HelixHeadlessMapAreaProps = {
|
|
11477
|
+
/** Words drawn on the map with the area, such as `A` for a search sector.
|
|
11478
|
+
Unset, nothing is drawn. Keep it short: it is a caption on a map, and the
|
|
11479
|
+
area's `label` is what a screen reader hears. */
|
|
11480
|
+
caption?: (HelixHeadlessMapArea["caption"]) | undefined;
|
|
11481
|
+
/** Where the caption stands. `inside`, the default, at the point of the area
|
|
11482
|
+
furthest from its edges. `outside`, just above the area's northernmost
|
|
11483
|
+
point, clear of the shape, for an area whose caption would cover what is
|
|
11484
|
+
in it. */
|
|
11485
|
+
"caption-placement"?: (HelixHeadlessMapArea["captionPlacement"]) | undefined;
|
|
11486
|
+
/** Where the caption stands. `inside`, the default, at the point of the area
|
|
11487
|
+
furthest from its edges. `outside`, just above the area's northernmost
|
|
11488
|
+
point, clear of the shape, for an area whose caption would cover what is
|
|
11489
|
+
in it. */
|
|
11490
|
+
captionPlacement?: (HelixHeadlessMapArea["captionPlacement"]) | undefined;
|
|
11477
11491
|
/** More about the area. Read after its label in the frame's list. */
|
|
11478
11492
|
description?: (HelixHeadlessMapArea["description"]) | undefined;
|
|
11479
11493
|
/** A name this layer shares with other layers, such as a route and its
|
|
@@ -11494,6 +11508,20 @@ first. */
|
|
|
11494
11508
|
};
|
|
11495
11509
|
|
|
11496
11510
|
export type HelixHeadlessMapAreaSolidJsProps = {
|
|
11511
|
+
/** Words drawn on the map with the area, such as `A` for a search sector.
|
|
11512
|
+
Unset, nothing is drawn. Keep it short: it is a caption on a map, and the
|
|
11513
|
+
area's `label` is what a screen reader hears. */
|
|
11514
|
+
"prop:caption"?: (HelixHeadlessMapArea["caption"]) | undefined;
|
|
11515
|
+
/** Where the caption stands. `inside`, the default, at the point of the area
|
|
11516
|
+
furthest from its edges. `outside`, just above the area's northernmost
|
|
11517
|
+
point, clear of the shape, for an area whose caption would cover what is
|
|
11518
|
+
in it. */
|
|
11519
|
+
"attr:caption-placement"?: (HelixHeadlessMapArea["captionPlacement"]) | undefined;
|
|
11520
|
+
/** Where the caption stands. `inside`, the default, at the point of the area
|
|
11521
|
+
furthest from its edges. `outside`, just above the area's northernmost
|
|
11522
|
+
point, clear of the shape, for an area whose caption would cover what is
|
|
11523
|
+
in it. */
|
|
11524
|
+
"prop:captionPlacement"?: (HelixHeadlessMapArea["captionPlacement"]) | undefined;
|
|
11497
11525
|
/** More about the area. Read after its label in the frame's list. */
|
|
11498
11526
|
"prop:description"?: (HelixHeadlessMapArea["description"]) | undefined;
|
|
11499
11527
|
/** A name this layer shares with other layers, such as a route and its
|
|
@@ -12040,6 +12068,12 @@ export type HelixHeadlessMapHelixMapZoomElementEvent =
|
|
|
12040
12068
|
HelixHeadlessMapElementEvent<HelixMapZoomEvent>;
|
|
12041
12069
|
|
|
12042
12070
|
export type HelixHeadlessMapProps = {
|
|
12071
|
+
/** The hint shown when a map waiting to be pressed is scrolled or swiped
|
|
12072
|
+
over, with `gestures="activate"`. */
|
|
12073
|
+
"activate-hint-label"?: (HelixHeadlessMap["activateHintLabel"]) | undefined;
|
|
12074
|
+
/** The hint shown when a map waiting to be pressed is scrolled or swiped
|
|
12075
|
+
over, with `gestures="activate"`. */
|
|
12076
|
+
activateHintLabel?: (HelixHeadlessMap["activateHintLabel"]) | undefined;
|
|
12043
12077
|
/** The map's rotation, in degrees clockwise from north. `connectMap` keeps it
|
|
12044
12078
|
current, and the Face north button's needle turns with it. */
|
|
12045
12079
|
bearing?: (HelixHeadlessMap["bearing"]) | undefined;
|
|
@@ -12054,6 +12088,19 @@ the map zooms in, and pressing one zooms in to its places. */
|
|
|
12054
12088
|
"flat-label"?: (HelixHeadlessMap["flatLabel"]) | undefined;
|
|
12055
12089
|
/** What screen readers hear when the map is tilted back to looking straight down. */
|
|
12056
12090
|
flatLabel?: (HelixHeadlessMap["flatLabel"]) | undefined;
|
|
12091
|
+
/** Which gestures the map takes from the page.
|
|
12092
|
+
|
|
12093
|
+
- `always`, which unset is: the wheel zooms the map and one finger pans
|
|
12094
|
+
it, for a map that is the page, such as a full-screen view.
|
|
12095
|
+
- `cooperative`: the wheel and one finger scroll the page, and the map
|
|
12096
|
+
takes Ctrl or ⌘ with the wheel, and two fingers. The frame says so
|
|
12097
|
+
when a gesture passes to the page. Best for a map embedded in a page.
|
|
12098
|
+
- `activate`: the map takes nothing until it is pressed, and gives it
|
|
12099
|
+
back on Escape, when the pointer leaves it, or on a press elsewhere.
|
|
12100
|
+
|
|
12101
|
+
The keyboard and the frame's buttons work in every mode. The renderer is
|
|
12102
|
+
told through the connector, so MapLibre and Leaflet behave alike. */
|
|
12103
|
+
gestures?: (HelixHeadlessMap["gestures"]) | undefined;
|
|
12057
12104
|
/** The Hybrid map type's name. */
|
|
12058
12105
|
"hybrid-label"?: (HelixHeadlessMap["hybridLabel"]) | undefined;
|
|
12059
12106
|
/** The Hybrid map type's name. */
|
|
@@ -12135,6 +12182,22 @@ top of the map faces, clockwise from north. */
|
|
|
12135
12182
|
/** What screen readers hear when the map is turned. `{degrees}` is the way the
|
|
12136
12183
|
top of the map faces, clockwise from north. */
|
|
12137
12184
|
turnedLabel?: (HelixHeadlessMap["turnedLabel"]) | undefined;
|
|
12185
|
+
/** The hint shown when one finger swipes over a map with `gestures="cooperative"`. */
|
|
12186
|
+
"two-finger-hint-label"?: (HelixHeadlessMap["twoFingerHintLabel"]) | undefined;
|
|
12187
|
+
/** The hint shown when one finger swipes over a map with `gestures="cooperative"`. */
|
|
12188
|
+
twoFingerHintLabel?: (HelixHeadlessMap["twoFingerHintLabel"]) | undefined;
|
|
12189
|
+
/** The line shown while a map with `gestures="activate"` has the gestures. */
|
|
12190
|
+
"using-label"?: (HelixHeadlessMap["usingLabel"]) | undefined;
|
|
12191
|
+
/** The line shown while a map with `gestures="activate"` has the gestures. */
|
|
12192
|
+
usingLabel?: (HelixHeadlessMap["usingLabel"]) | undefined;
|
|
12193
|
+
/** The hint shown when the wheel scrolls past a map with
|
|
12194
|
+
`gestures="cooperative"`, with `{key}`, which is ⌘ on a Mac and Ctrl
|
|
12195
|
+
elsewhere, as the renderer reads it. */
|
|
12196
|
+
"wheel-hint-label"?: (HelixHeadlessMap["wheelHintLabel"]) | undefined;
|
|
12197
|
+
/** The hint shown when the wheel scrolls past a map with
|
|
12198
|
+
`gestures="cooperative"`, with `{key}`, which is ⌘ on a Mac and Ctrl
|
|
12199
|
+
elsewhere, as the renderer reads it. */
|
|
12200
|
+
wheelHintLabel?: (HelixHeadlessMap["wheelHintLabel"]) | undefined;
|
|
12138
12201
|
/** What screen readers hear after a zoom. `{level}` is the zoom level. */
|
|
12139
12202
|
"zoomed-label"?: (HelixHeadlessMap["zoomedLabel"]) | undefined;
|
|
12140
12203
|
/** What screen readers hear after a zoom. `{level}` is the zoom level. */
|
|
@@ -12297,6 +12360,12 @@ at any zoom, and a consumer who wants their own units multiplies by them. */
|
|
|
12297
12360
|
};
|
|
12298
12361
|
|
|
12299
12362
|
export type HelixHeadlessMapSolidJsProps = {
|
|
12363
|
+
/** The hint shown when a map waiting to be pressed is scrolled or swiped
|
|
12364
|
+
over, with `gestures="activate"`. */
|
|
12365
|
+
"attr:activate-hint-label"?: (HelixHeadlessMap["activateHintLabel"]) | undefined;
|
|
12366
|
+
/** The hint shown when a map waiting to be pressed is scrolled or swiped
|
|
12367
|
+
over, with `gestures="activate"`. */
|
|
12368
|
+
"prop:activateHintLabel"?: (HelixHeadlessMap["activateHintLabel"]) | undefined;
|
|
12300
12369
|
/** The map's rotation, in degrees clockwise from north. `connectMap` keeps it
|
|
12301
12370
|
current, and the Face north button's needle turns with it. */
|
|
12302
12371
|
"prop:bearing"?: (HelixHeadlessMap["bearing"]) | undefined;
|
|
@@ -12311,6 +12380,19 @@ the map zooms in, and pressing one zooms in to its places. */
|
|
|
12311
12380
|
"attr:flat-label"?: (HelixHeadlessMap["flatLabel"]) | undefined;
|
|
12312
12381
|
/** What screen readers hear when the map is tilted back to looking straight down. */
|
|
12313
12382
|
"prop:flatLabel"?: (HelixHeadlessMap["flatLabel"]) | undefined;
|
|
12383
|
+
/** Which gestures the map takes from the page.
|
|
12384
|
+
|
|
12385
|
+
- `always`, which unset is: the wheel zooms the map and one finger pans
|
|
12386
|
+
it, for a map that is the page, such as a full-screen view.
|
|
12387
|
+
- `cooperative`: the wheel and one finger scroll the page, and the map
|
|
12388
|
+
takes Ctrl or ⌘ with the wheel, and two fingers. The frame says so
|
|
12389
|
+
when a gesture passes to the page. Best for a map embedded in a page.
|
|
12390
|
+
- `activate`: the map takes nothing until it is pressed, and gives it
|
|
12391
|
+
back on Escape, when the pointer leaves it, or on a press elsewhere.
|
|
12392
|
+
|
|
12393
|
+
The keyboard and the frame's buttons work in every mode. The renderer is
|
|
12394
|
+
told through the connector, so MapLibre and Leaflet behave alike. */
|
|
12395
|
+
"prop:gestures"?: (HelixHeadlessMap["gestures"]) | undefined;
|
|
12314
12396
|
/** The Hybrid map type's name. */
|
|
12315
12397
|
"attr:hybrid-label"?: (HelixHeadlessMap["hybridLabel"]) | undefined;
|
|
12316
12398
|
/** The Hybrid map type's name. */
|
|
@@ -12392,6 +12474,22 @@ top of the map faces, clockwise from north. */
|
|
|
12392
12474
|
/** What screen readers hear when the map is turned. `{degrees}` is the way the
|
|
12393
12475
|
top of the map faces, clockwise from north. */
|
|
12394
12476
|
"prop:turnedLabel"?: (HelixHeadlessMap["turnedLabel"]) | undefined;
|
|
12477
|
+
/** The hint shown when one finger swipes over a map with `gestures="cooperative"`. */
|
|
12478
|
+
"attr:two-finger-hint-label"?: (HelixHeadlessMap["twoFingerHintLabel"]) | undefined;
|
|
12479
|
+
/** The hint shown when one finger swipes over a map with `gestures="cooperative"`. */
|
|
12480
|
+
"prop:twoFingerHintLabel"?: (HelixHeadlessMap["twoFingerHintLabel"]) | undefined;
|
|
12481
|
+
/** The line shown while a map with `gestures="activate"` has the gestures. */
|
|
12482
|
+
"attr:using-label"?: (HelixHeadlessMap["usingLabel"]) | undefined;
|
|
12483
|
+
/** The line shown while a map with `gestures="activate"` has the gestures. */
|
|
12484
|
+
"prop:usingLabel"?: (HelixHeadlessMap["usingLabel"]) | undefined;
|
|
12485
|
+
/** The hint shown when the wheel scrolls past a map with
|
|
12486
|
+
`gestures="cooperative"`, with `{key}`, which is ⌘ on a Mac and Ctrl
|
|
12487
|
+
elsewhere, as the renderer reads it. */
|
|
12488
|
+
"attr:wheel-hint-label"?: (HelixHeadlessMap["wheelHintLabel"]) | undefined;
|
|
12489
|
+
/** The hint shown when the wheel scrolls past a map with
|
|
12490
|
+
`gestures="cooperative"`, with `{key}`, which is ⌘ on a Mac and Ctrl
|
|
12491
|
+
elsewhere, as the renderer reads it. */
|
|
12492
|
+
"prop:wheelHintLabel"?: (HelixHeadlessMap["wheelHintLabel"]) | undefined;
|
|
12395
12493
|
/** What screen readers hear after a zoom. `{level}` is the zoom level. */
|
|
12396
12494
|
"attr:zoomed-label"?: (HelixHeadlessMap["zoomedLabel"]) | undefined;
|
|
12397
12495
|
/** What screen readers hear after a zoom. `{level}` is the zoom level. */
|
|
@@ -32495,10 +32593,22 @@ export type CustomElements = {
|
|
|
32495
32593
|
* The frame lists each area by its `label` and `description` for screen
|
|
32496
32594
|
* readers.
|
|
32497
32595
|
*
|
|
32596
|
+
* Set `caption` to draw words on the map with the area, such as a letter for a
|
|
32597
|
+
* search sector, in a color that reads on the map. It is drawn rather than
|
|
32598
|
+
* focusable, so it adds nothing to the tab order, and a screen reader reads
|
|
32599
|
+
* the area's `label` in the frame's list.
|
|
32600
|
+
*
|
|
32498
32601
|
* ## Attributes & Properties
|
|
32499
32602
|
*
|
|
32500
32603
|
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
|
32501
32604
|
*
|
|
32605
|
+
* - `caption`: Words drawn on the map with the area, such as `A` for a search sector.
|
|
32606
|
+
* Unset, nothing is drawn. Keep it short: it is a caption on a map, and the
|
|
32607
|
+
* area's `label` is what a screen reader hears.
|
|
32608
|
+
* - `caption-placement`/`captionPlacement`: Where the caption stands. `inside`, the default, at the point of the area
|
|
32609
|
+
* furthest from its edges. `outside`, just above the area's northernmost
|
|
32610
|
+
* point, clear of the shape, for an area whose caption would cover what is
|
|
32611
|
+
* in it.
|
|
32502
32612
|
* - `description`: More about the area. Read after its label in the frame's list.
|
|
32503
32613
|
* - `group`: A name this layer shares with other layers, such as a route and its
|
|
32504
32614
|
* dotted legs. The layers menu shows layers in the same group as one entry,
|
|
@@ -33101,12 +33211,26 @@ export type CustomElements = {
|
|
|
33101
33211
|
*
|
|
33102
33212
|
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
|
33103
33213
|
*
|
|
33214
|
+
* - `activate-hint-label`/`activateHintLabel`: The hint shown when a map waiting to be pressed is scrolled or swiped
|
|
33215
|
+
* over, with `gestures="activate"`.
|
|
33104
33216
|
* - `bearing`: The map's rotation, in degrees clockwise from north. `connectMap` keeps it
|
|
33105
33217
|
* current, and the Face north button's needle turns with it.
|
|
33106
33218
|
* - `cluster`: Combines markers that would overlap into one count. Counts split apart as
|
|
33107
33219
|
* the map zooms in, and pressing one zooms in to its places.
|
|
33108
33220
|
* - `face-north-label`/`faceNorthLabel`: The Face north button's label.
|
|
33109
33221
|
* - `flat-label`/`flatLabel`: What screen readers hear when the map is tilted back to looking straight down.
|
|
33222
|
+
* - `gestures`: Which gestures the map takes from the page.
|
|
33223
|
+
*
|
|
33224
|
+
* - `always`, which unset is: the wheel zooms the map and one finger pans
|
|
33225
|
+
* it, for a map that is the page, such as a full-screen view.
|
|
33226
|
+
* - `cooperative`: the wheel and one finger scroll the page, and the map
|
|
33227
|
+
* takes Ctrl or ⌘ with the wheel, and two fingers. The frame says so
|
|
33228
|
+
* when a gesture passes to the page. Best for a map embedded in a page.
|
|
33229
|
+
* - `activate`: the map takes nothing until it is pressed, and gives it
|
|
33230
|
+
* back on Escape, when the pointer leaves it, or on a press elsewhere.
|
|
33231
|
+
*
|
|
33232
|
+
* The keyboard and the frame's buttons work in every mode. The renderer is
|
|
33233
|
+
* told through the connector, so MapLibre and Leaflet behave alike.
|
|
33110
33234
|
* - `hybrid-label`/`hybridLabel`: The Hybrid map type's name.
|
|
33111
33235
|
* - `label`: The map's name, read by screen readers. Name the place, such as "Delivery
|
|
33112
33236
|
* area", so that several maps on one page can be told apart. Required.
|
|
@@ -33133,6 +33257,11 @@ export type CustomElements = {
|
|
|
33133
33257
|
* - `tilt-label`/`tiltLabel`: The 3D button's label.
|
|
33134
33258
|
* - `turned-label`/`turnedLabel`: What screen readers hear when the map is turned. `{degrees}` is the way the
|
|
33135
33259
|
* top of the map faces, clockwise from north.
|
|
33260
|
+
* - `two-finger-hint-label`/`twoFingerHintLabel`: The hint shown when one finger swipes over a map with `gestures="cooperative"`.
|
|
33261
|
+
* - `using-label`/`usingLabel`: The line shown while a map with `gestures="activate"` has the gestures.
|
|
33262
|
+
* - `wheel-hint-label`/`wheelHintLabel`: The hint shown when the wheel scrolls past a map with
|
|
33263
|
+
* `gestures="cooperative"`, with `{key}`, which is ⌘ on a Mac and Ctrl
|
|
33264
|
+
* elsewhere, as the renderer reads it.
|
|
33136
33265
|
* - `zoomed-label`/`zoomedLabel`: What screen readers hear after a zoom. `{level}` is the zoom level.
|
|
33137
33266
|
* - `zoom-level`/`zoomLevel`: How far the map is zoomed, in its renderer's levels. `connectMap` keeps it
|
|
33138
33267
|
* current, and the map says it after a zoom.
|
|
@@ -33293,6 +33422,8 @@ export type CustomElements = {
|
|
|
33293
33422
|
* - `face-north`: The compass: its needle points north as the map turns, and pressing it turns the map to face north.
|
|
33294
33423
|
* - `footer`: The strip below the map.
|
|
33295
33424
|
* - `fullscreen`: The button that makes the map fill the screen.
|
|
33425
|
+
* - `gesture-hint`: Words over the map for a moment when it lets a gesture pass to the page, such as how to zoom it.
|
|
33426
|
+
* - `gesture-status`: The line shown while a map with `gestures="activate"` has the gestures.
|
|
33296
33427
|
* - `header`: The strip above the map.
|
|
33297
33428
|
* - `layer`: One entry in the list of the map's layers.
|
|
33298
33429
|
* - `layer-choice`: One layer's tile in the layers menu, pressed while the layer is shown.
|
|
@@ -33327,6 +33458,7 @@ export type CustomElements = {
|
|
|
33327
33458
|
* - `fullscreen`: The map fills the screen.
|
|
33328
33459
|
* - `idle`: The user has been still long enough for the header and footer to fade.
|
|
33329
33460
|
* - `ready`: The map has been drawn whole, after `helix-map-ready`.
|
|
33461
|
+
* - `using`: A map with `gestures="activate"` has been pressed and has the gestures.
|
|
33330
33462
|
* - `settled`: Set one frame after the first render. Transitions wait for it, so an element does not animate its own arrival.
|
|
33331
33463
|
*/
|
|
33332
33464
|
"helix-headless-map": Partial<
|
|
@@ -52564,10 +52696,22 @@ export type CustomElementsSolidJs = {
|
|
|
52564
52696
|
* The frame lists each area by its `label` and `description` for screen
|
|
52565
52697
|
* readers.
|
|
52566
52698
|
*
|
|
52699
|
+
* Set `caption` to draw words on the map with the area, such as a letter for a
|
|
52700
|
+
* search sector, in a color that reads on the map. It is drawn rather than
|
|
52701
|
+
* focusable, so it adds nothing to the tab order, and a screen reader reads
|
|
52702
|
+
* the area's `label` in the frame's list.
|
|
52703
|
+
*
|
|
52567
52704
|
* ## Attributes & Properties
|
|
52568
52705
|
*
|
|
52569
52706
|
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
|
52570
52707
|
*
|
|
52708
|
+
* - `caption`: Words drawn on the map with the area, such as `A` for a search sector.
|
|
52709
|
+
* Unset, nothing is drawn. Keep it short: it is a caption on a map, and the
|
|
52710
|
+
* area's `label` is what a screen reader hears.
|
|
52711
|
+
* - `caption-placement`/`captionPlacement`: Where the caption stands. `inside`, the default, at the point of the area
|
|
52712
|
+
* furthest from its edges. `outside`, just above the area's northernmost
|
|
52713
|
+
* point, clear of the shape, for an area whose caption would cover what is
|
|
52714
|
+
* in it.
|
|
52571
52715
|
* - `description`: More about the area. Read after its label in the frame's list.
|
|
52572
52716
|
* - `group`: A name this layer shares with other layers, such as a route and its
|
|
52573
52717
|
* dotted legs. The layers menu shows layers in the same group as one entry,
|
|
@@ -53186,12 +53330,26 @@ export type CustomElementsSolidJs = {
|
|
|
53186
53330
|
*
|
|
53187
53331
|
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
|
53188
53332
|
*
|
|
53333
|
+
* - `activate-hint-label`/`activateHintLabel`: The hint shown when a map waiting to be pressed is scrolled or swiped
|
|
53334
|
+
* over, with `gestures="activate"`.
|
|
53189
53335
|
* - `bearing`: The map's rotation, in degrees clockwise from north. `connectMap` keeps it
|
|
53190
53336
|
* current, and the Face north button's needle turns with it.
|
|
53191
53337
|
* - `cluster`: Combines markers that would overlap into one count. Counts split apart as
|
|
53192
53338
|
* the map zooms in, and pressing one zooms in to its places.
|
|
53193
53339
|
* - `face-north-label`/`faceNorthLabel`: The Face north button's label.
|
|
53194
53340
|
* - `flat-label`/`flatLabel`: What screen readers hear when the map is tilted back to looking straight down.
|
|
53341
|
+
* - `gestures`: Which gestures the map takes from the page.
|
|
53342
|
+
*
|
|
53343
|
+
* - `always`, which unset is: the wheel zooms the map and one finger pans
|
|
53344
|
+
* it, for a map that is the page, such as a full-screen view.
|
|
53345
|
+
* - `cooperative`: the wheel and one finger scroll the page, and the map
|
|
53346
|
+
* takes Ctrl or ⌘ with the wheel, and two fingers. The frame says so
|
|
53347
|
+
* when a gesture passes to the page. Best for a map embedded in a page.
|
|
53348
|
+
* - `activate`: the map takes nothing until it is pressed, and gives it
|
|
53349
|
+
* back on Escape, when the pointer leaves it, or on a press elsewhere.
|
|
53350
|
+
*
|
|
53351
|
+
* The keyboard and the frame's buttons work in every mode. The renderer is
|
|
53352
|
+
* told through the connector, so MapLibre and Leaflet behave alike.
|
|
53195
53353
|
* - `hybrid-label`/`hybridLabel`: The Hybrid map type's name.
|
|
53196
53354
|
* - `label`: The map's name, read by screen readers. Name the place, such as "Delivery
|
|
53197
53355
|
* area", so that several maps on one page can be told apart. Required.
|
|
@@ -53218,6 +53376,11 @@ export type CustomElementsSolidJs = {
|
|
|
53218
53376
|
* - `tilt-label`/`tiltLabel`: The 3D button's label.
|
|
53219
53377
|
* - `turned-label`/`turnedLabel`: What screen readers hear when the map is turned. `{degrees}` is the way the
|
|
53220
53378
|
* top of the map faces, clockwise from north.
|
|
53379
|
+
* - `two-finger-hint-label`/`twoFingerHintLabel`: The hint shown when one finger swipes over a map with `gestures="cooperative"`.
|
|
53380
|
+
* - `using-label`/`usingLabel`: The line shown while a map with `gestures="activate"` has the gestures.
|
|
53381
|
+
* - `wheel-hint-label`/`wheelHintLabel`: The hint shown when the wheel scrolls past a map with
|
|
53382
|
+
* `gestures="cooperative"`, with `{key}`, which is ⌘ on a Mac and Ctrl
|
|
53383
|
+
* elsewhere, as the renderer reads it.
|
|
53221
53384
|
* - `zoomed-label`/`zoomedLabel`: What screen readers hear after a zoom. `{level}` is the zoom level.
|
|
53222
53385
|
* - `zoom-level`/`zoomLevel`: How far the map is zoomed, in its renderer's levels. `connectMap` keeps it
|
|
53223
53386
|
* current, and the map says it after a zoom.
|
|
@@ -53378,6 +53541,8 @@ export type CustomElementsSolidJs = {
|
|
|
53378
53541
|
* - `face-north`: The compass: its needle points north as the map turns, and pressing it turns the map to face north.
|
|
53379
53542
|
* - `footer`: The strip below the map.
|
|
53380
53543
|
* - `fullscreen`: The button that makes the map fill the screen.
|
|
53544
|
+
* - `gesture-hint`: Words over the map for a moment when it lets a gesture pass to the page, such as how to zoom it.
|
|
53545
|
+
* - `gesture-status`: The line shown while a map with `gestures="activate"` has the gestures.
|
|
53381
53546
|
* - `header`: The strip above the map.
|
|
53382
53547
|
* - `layer`: One entry in the list of the map's layers.
|
|
53383
53548
|
* - `layer-choice`: One layer's tile in the layers menu, pressed while the layer is shown.
|
|
@@ -53412,6 +53577,7 @@ export type CustomElementsSolidJs = {
|
|
|
53412
53577
|
* - `fullscreen`: The map fills the screen.
|
|
53413
53578
|
* - `idle`: The user has been still long enough for the header and footer to fade.
|
|
53414
53579
|
* - `ready`: The map has been drawn whole, after `helix-map-ready`.
|
|
53580
|
+
* - `using`: A map with `gestures="activate"` has been pressed and has the gestures.
|
|
53415
53581
|
* - `settled`: Set one frame after the first render. Transitions wait for it, so an element does not animate its own arrival.
|
|
53416
53582
|
*/
|
|
53417
53583
|
"helix-headless-map": Partial<
|
package/types/vue.d.ts
CHANGED
|
@@ -5872,6 +5872,20 @@ export type HelixHeadlessMapAreaHelixMapPartChangeElementEvent =
|
|
|
5872
5872
|
HelixHeadlessMapAreaElementEvent<HelixMapPartChangeEvent>;
|
|
5873
5873
|
|
|
5874
5874
|
export type HelixHeadlessMapAreaVueProps = {
|
|
5875
|
+
/** Words drawn on the map with the area, such as `A` for a search sector.
|
|
5876
|
+
Unset, nothing is drawn. Keep it short: it is a caption on a map, and the
|
|
5877
|
+
area's `label` is what a screen reader hears. */
|
|
5878
|
+
caption?: (HelixHeadlessMapArea["caption"]) | undefined;
|
|
5879
|
+
/** Where the caption stands. `inside`, the default, at the point of the area
|
|
5880
|
+
furthest from its edges. `outside`, just above the area's northernmost
|
|
5881
|
+
point, clear of the shape, for an area whose caption would cover what is
|
|
5882
|
+
in it. */
|
|
5883
|
+
"caption-placement"?: (HelixHeadlessMapArea["captionPlacement"]) | undefined;
|
|
5884
|
+
/** Where the caption stands. `inside`, the default, at the point of the area
|
|
5885
|
+
furthest from its edges. `outside`, just above the area's northernmost
|
|
5886
|
+
point, clear of the shape, for an area whose caption would cover what is
|
|
5887
|
+
in it. */
|
|
5888
|
+
captionPlacement?: (HelixHeadlessMapArea["captionPlacement"]) | undefined;
|
|
5875
5889
|
/** More about the area. Read after its label in the frame's list. */
|
|
5876
5890
|
description?: (HelixHeadlessMapArea["description"]) | undefined;
|
|
5877
5891
|
/** A name this layer shares with other layers, such as a route and its
|
|
@@ -6184,6 +6198,12 @@ export type HelixHeadlessMapHelixMapZoomElementEvent =
|
|
|
6184
6198
|
HelixHeadlessMapElementEvent<HelixMapZoomEvent>;
|
|
6185
6199
|
|
|
6186
6200
|
export type HelixHeadlessMapVueProps = {
|
|
6201
|
+
/** The hint shown when a map waiting to be pressed is scrolled or swiped
|
|
6202
|
+
over, with `gestures="activate"`. */
|
|
6203
|
+
"activate-hint-label"?: (HelixHeadlessMap["activateHintLabel"]) | undefined;
|
|
6204
|
+
/** The hint shown when a map waiting to be pressed is scrolled or swiped
|
|
6205
|
+
over, with `gestures="activate"`. */
|
|
6206
|
+
activateHintLabel?: (HelixHeadlessMap["activateHintLabel"]) | undefined;
|
|
6187
6207
|
/** The map's rotation, in degrees clockwise from north. `connectMap` keeps it
|
|
6188
6208
|
current, and the Face north button's needle turns with it. */
|
|
6189
6209
|
bearing?: (HelixHeadlessMap["bearing"]) | undefined;
|
|
@@ -6198,6 +6218,19 @@ the map zooms in, and pressing one zooms in to its places. */
|
|
|
6198
6218
|
"flat-label"?: (HelixHeadlessMap["flatLabel"]) | undefined;
|
|
6199
6219
|
/** What screen readers hear when the map is tilted back to looking straight down. */
|
|
6200
6220
|
flatLabel?: (HelixHeadlessMap["flatLabel"]) | undefined;
|
|
6221
|
+
/** Which gestures the map takes from the page.
|
|
6222
|
+
|
|
6223
|
+
- `always`, which unset is: the wheel zooms the map and one finger pans
|
|
6224
|
+
it, for a map that is the page, such as a full-screen view.
|
|
6225
|
+
- `cooperative`: the wheel and one finger scroll the page, and the map
|
|
6226
|
+
takes Ctrl or ⌘ with the wheel, and two fingers. The frame says so
|
|
6227
|
+
when a gesture passes to the page. Best for a map embedded in a page.
|
|
6228
|
+
- `activate`: the map takes nothing until it is pressed, and gives it
|
|
6229
|
+
back on Escape, when the pointer leaves it, or on a press elsewhere.
|
|
6230
|
+
|
|
6231
|
+
The keyboard and the frame's buttons work in every mode. The renderer is
|
|
6232
|
+
told through the connector, so MapLibre and Leaflet behave alike. */
|
|
6233
|
+
gestures?: (HelixHeadlessMap["gestures"]) | undefined;
|
|
6201
6234
|
/** The Hybrid map type's name. */
|
|
6202
6235
|
"hybrid-label"?: (HelixHeadlessMap["hybridLabel"]) | undefined;
|
|
6203
6236
|
/** The Hybrid map type's name. */
|
|
@@ -6279,6 +6312,22 @@ top of the map faces, clockwise from north. */
|
|
|
6279
6312
|
/** What screen readers hear when the map is turned. `{degrees}` is the way the
|
|
6280
6313
|
top of the map faces, clockwise from north. */
|
|
6281
6314
|
turnedLabel?: (HelixHeadlessMap["turnedLabel"]) | undefined;
|
|
6315
|
+
/** The hint shown when one finger swipes over a map with `gestures="cooperative"`. */
|
|
6316
|
+
"two-finger-hint-label"?: (HelixHeadlessMap["twoFingerHintLabel"]) | undefined;
|
|
6317
|
+
/** The hint shown when one finger swipes over a map with `gestures="cooperative"`. */
|
|
6318
|
+
twoFingerHintLabel?: (HelixHeadlessMap["twoFingerHintLabel"]) | undefined;
|
|
6319
|
+
/** The line shown while a map with `gestures="activate"` has the gestures. */
|
|
6320
|
+
"using-label"?: (HelixHeadlessMap["usingLabel"]) | undefined;
|
|
6321
|
+
/** The line shown while a map with `gestures="activate"` has the gestures. */
|
|
6322
|
+
usingLabel?: (HelixHeadlessMap["usingLabel"]) | undefined;
|
|
6323
|
+
/** The hint shown when the wheel scrolls past a map with
|
|
6324
|
+
`gestures="cooperative"`, with `{key}`, which is ⌘ on a Mac and Ctrl
|
|
6325
|
+
elsewhere, as the renderer reads it. */
|
|
6326
|
+
"wheel-hint-label"?: (HelixHeadlessMap["wheelHintLabel"]) | undefined;
|
|
6327
|
+
/** The hint shown when the wheel scrolls past a map with
|
|
6328
|
+
`gestures="cooperative"`, with `{key}`, which is ⌘ on a Mac and Ctrl
|
|
6329
|
+
elsewhere, as the renderer reads it. */
|
|
6330
|
+
wheelHintLabel?: (HelixHeadlessMap["wheelHintLabel"]) | undefined;
|
|
6282
6331
|
/** What screen readers hear after a zoom. `{level}` is the zoom level. */
|
|
6283
6332
|
"zoomed-label"?: (HelixHeadlessMap["zoomedLabel"]) | undefined;
|
|
6284
6333
|
/** What screen readers hear after a zoom. `{level}` is the zoom level. */
|
|
@@ -12140,7 +12189,7 @@ export interface WcToolkitVueGlobalComponents {
|
|
|
12140
12189
|
HelixHeadlessLoaderVueProps,
|
|
12141
12190
|
HelixHeadlessLoaderVueEvents
|
|
12142
12191
|
>;
|
|
12143
|
-
/** 'connectMap' fills the shape as a layer of the map, under its place names. The frame lists each area by its 'label' and 'description' for screen readers. */
|
|
12192
|
+
/** 'connectMap' fills the shape as a layer of the map, under its place names. The frame lists each area by its 'label' and 'description' for screen readers. Set 'caption' to draw words on the map with the area, such as a letter for a search sector, in a color that reads on the map. It is drawn rather than focusable, so it adds nothing to the tab order, and a screen reader reads the area's 'label' in the frame's list. */
|
|
12144
12193
|
"helix-headless-map-area": DefineCustomElement<
|
|
12145
12194
|
HelixHeadlessMapArea,
|
|
12146
12195
|
HelixHeadlessMapAreaVueProps,
|