@fusion.dev/helix-headless 0.115.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 +218 -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 +114 -0
- package/types/vue.d.ts +35 -0
package/custom-elements.json
CHANGED
|
@@ -67213,6 +67213,14 @@
|
|
|
67213
67213
|
"description": "The button that makes the map fill the screen.",
|
|
67214
67214
|
"name": "fullscreen"
|
|
67215
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
|
+
},
|
|
67216
67224
|
{
|
|
67217
67225
|
"description": "The strip above the map.",
|
|
67218
67226
|
"name": "header"
|
|
@@ -67337,6 +67345,16 @@
|
|
|
67337
67345
|
}
|
|
67338
67346
|
],
|
|
67339
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
|
+
},
|
|
67340
67358
|
{
|
|
67341
67359
|
"kind": "field",
|
|
67342
67360
|
"name": "bearing",
|
|
@@ -67377,6 +67395,15 @@
|
|
|
67377
67395
|
"description": "What screen readers hear when the map is tilted back to looking straight down.",
|
|
67378
67396
|
"attribute": "flat-label"
|
|
67379
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
|
+
},
|
|
67380
67407
|
{
|
|
67381
67408
|
"kind": "field",
|
|
67382
67409
|
"name": "hybridLabel",
|
|
@@ -67557,6 +67584,36 @@
|
|
|
67557
67584
|
"description": "What screen readers hear when the map is turned. `{degrees}` is the way the\ntop of the map faces, clockwise from north.",
|
|
67558
67585
|
"attribute": "turned-label"
|
|
67559
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
|
+
},
|
|
67560
67617
|
{
|
|
67561
67618
|
"kind": "field",
|
|
67562
67619
|
"name": "zoomedLabel",
|
|
@@ -67916,6 +67973,119 @@
|
|
|
67916
67973
|
"privacy": "private",
|
|
67917
67974
|
"readonly": true
|
|
67918
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
|
+
},
|
|
67919
68089
|
{
|
|
67920
68090
|
"kind": "field",
|
|
67921
68091
|
"name": "handleSlotChange",
|
|
@@ -69011,6 +69181,15 @@
|
|
|
69011
69181
|
}
|
|
69012
69182
|
],
|
|
69013
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
|
+
},
|
|
69014
69193
|
{
|
|
69015
69194
|
"name": "bearing",
|
|
69016
69195
|
"type": {
|
|
@@ -69047,6 +69226,14 @@
|
|
|
69047
69226
|
"description": "What screen readers hear when the map is tilted back to looking straight down.",
|
|
69048
69227
|
"fieldName": "flatLabel"
|
|
69049
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
|
+
},
|
|
69050
69237
|
{
|
|
69051
69238
|
"name": "hybrid-label",
|
|
69052
69239
|
"type": {
|
|
@@ -69208,6 +69395,33 @@
|
|
|
69208
69395
|
"description": "What screen readers hear when the map is turned. `{degrees}` is the way the\ntop of the map faces, clockwise from north.",
|
|
69209
69396
|
"fieldName": "turnedLabel"
|
|
69210
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
|
+
},
|
|
69211
69425
|
{
|
|
69212
69426
|
"name": "zoomed-label",
|
|
69213
69427
|
"type": {
|
|
@@ -69392,6 +69606,10 @@
|
|
|
69392
69606
|
"description": "The map has been drawn whole, after `helix-map-ready`.",
|
|
69393
69607
|
"name": "ready"
|
|
69394
69608
|
},
|
|
69609
|
+
{
|
|
69610
|
+
"description": "A map with `gestures=\"activate\"` has been pressed and has the gestures.",
|
|
69611
|
+
"name": "using"
|
|
69612
|
+
},
|
|
69395
69613
|
{
|
|
69396
69614
|
"description": "Set one frame after the first render. Transitions wait for it, so an element does not animate its own arrival.",
|
|
69397
69615
|
"name": "settled",
|
|
@@ -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
|
@@ -12068,6 +12068,12 @@ export type HelixHeadlessMapHelixMapZoomElementEvent =
|
|
|
12068
12068
|
HelixHeadlessMapElementEvent<HelixMapZoomEvent>;
|
|
12069
12069
|
|
|
12070
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;
|
|
12071
12077
|
/** The map's rotation, in degrees clockwise from north. `connectMap` keeps it
|
|
12072
12078
|
current, and the Face north button's needle turns with it. */
|
|
12073
12079
|
bearing?: (HelixHeadlessMap["bearing"]) | undefined;
|
|
@@ -12082,6 +12088,19 @@ the map zooms in, and pressing one zooms in to its places. */
|
|
|
12082
12088
|
"flat-label"?: (HelixHeadlessMap["flatLabel"]) | undefined;
|
|
12083
12089
|
/** What screen readers hear when the map is tilted back to looking straight down. */
|
|
12084
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;
|
|
12085
12104
|
/** The Hybrid map type's name. */
|
|
12086
12105
|
"hybrid-label"?: (HelixHeadlessMap["hybridLabel"]) | undefined;
|
|
12087
12106
|
/** The Hybrid map type's name. */
|
|
@@ -12163,6 +12182,22 @@ top of the map faces, clockwise from north. */
|
|
|
12163
12182
|
/** What screen readers hear when the map is turned. `{degrees}` is the way the
|
|
12164
12183
|
top of the map faces, clockwise from north. */
|
|
12165
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;
|
|
12166
12201
|
/** What screen readers hear after a zoom. `{level}` is the zoom level. */
|
|
12167
12202
|
"zoomed-label"?: (HelixHeadlessMap["zoomedLabel"]) | undefined;
|
|
12168
12203
|
/** What screen readers hear after a zoom. `{level}` is the zoom level. */
|
|
@@ -12325,6 +12360,12 @@ at any zoom, and a consumer who wants their own units multiplies by them. */
|
|
|
12325
12360
|
};
|
|
12326
12361
|
|
|
12327
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;
|
|
12328
12369
|
/** The map's rotation, in degrees clockwise from north. `connectMap` keeps it
|
|
12329
12370
|
current, and the Face north button's needle turns with it. */
|
|
12330
12371
|
"prop:bearing"?: (HelixHeadlessMap["bearing"]) | undefined;
|
|
@@ -12339,6 +12380,19 @@ the map zooms in, and pressing one zooms in to its places. */
|
|
|
12339
12380
|
"attr:flat-label"?: (HelixHeadlessMap["flatLabel"]) | undefined;
|
|
12340
12381
|
/** What screen readers hear when the map is tilted back to looking straight down. */
|
|
12341
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;
|
|
12342
12396
|
/** The Hybrid map type's name. */
|
|
12343
12397
|
"attr:hybrid-label"?: (HelixHeadlessMap["hybridLabel"]) | undefined;
|
|
12344
12398
|
/** The Hybrid map type's name. */
|
|
@@ -12420,6 +12474,22 @@ top of the map faces, clockwise from north. */
|
|
|
12420
12474
|
/** What screen readers hear when the map is turned. `{degrees}` is the way the
|
|
12421
12475
|
top of the map faces, clockwise from north. */
|
|
12422
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;
|
|
12423
12493
|
/** What screen readers hear after a zoom. `{level}` is the zoom level. */
|
|
12424
12494
|
"attr:zoomed-label"?: (HelixHeadlessMap["zoomedLabel"]) | undefined;
|
|
12425
12495
|
/** What screen readers hear after a zoom. `{level}` is the zoom level. */
|
|
@@ -33141,12 +33211,26 @@ export type CustomElements = {
|
|
|
33141
33211
|
*
|
|
33142
33212
|
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
|
33143
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"`.
|
|
33144
33216
|
* - `bearing`: The map's rotation, in degrees clockwise from north. `connectMap` keeps it
|
|
33145
33217
|
* current, and the Face north button's needle turns with it.
|
|
33146
33218
|
* - `cluster`: Combines markers that would overlap into one count. Counts split apart as
|
|
33147
33219
|
* the map zooms in, and pressing one zooms in to its places.
|
|
33148
33220
|
* - `face-north-label`/`faceNorthLabel`: The Face north button's label.
|
|
33149
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.
|
|
33150
33234
|
* - `hybrid-label`/`hybridLabel`: The Hybrid map type's name.
|
|
33151
33235
|
* - `label`: The map's name, read by screen readers. Name the place, such as "Delivery
|
|
33152
33236
|
* area", so that several maps on one page can be told apart. Required.
|
|
@@ -33173,6 +33257,11 @@ export type CustomElements = {
|
|
|
33173
33257
|
* - `tilt-label`/`tiltLabel`: The 3D button's label.
|
|
33174
33258
|
* - `turned-label`/`turnedLabel`: What screen readers hear when the map is turned. `{degrees}` is the way the
|
|
33175
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.
|
|
33176
33265
|
* - `zoomed-label`/`zoomedLabel`: What screen readers hear after a zoom. `{level}` is the zoom level.
|
|
33177
33266
|
* - `zoom-level`/`zoomLevel`: How far the map is zoomed, in its renderer's levels. `connectMap` keeps it
|
|
33178
33267
|
* current, and the map says it after a zoom.
|
|
@@ -33333,6 +33422,8 @@ export type CustomElements = {
|
|
|
33333
33422
|
* - `face-north`: The compass: its needle points north as the map turns, and pressing it turns the map to face north.
|
|
33334
33423
|
* - `footer`: The strip below the map.
|
|
33335
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.
|
|
33336
33427
|
* - `header`: The strip above the map.
|
|
33337
33428
|
* - `layer`: One entry in the list of the map's layers.
|
|
33338
33429
|
* - `layer-choice`: One layer's tile in the layers menu, pressed while the layer is shown.
|
|
@@ -33367,6 +33458,7 @@ export type CustomElements = {
|
|
|
33367
33458
|
* - `fullscreen`: The map fills the screen.
|
|
33368
33459
|
* - `idle`: The user has been still long enough for the header and footer to fade.
|
|
33369
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.
|
|
33370
33462
|
* - `settled`: Set one frame after the first render. Transitions wait for it, so an element does not animate its own arrival.
|
|
33371
33463
|
*/
|
|
33372
33464
|
"helix-headless-map": Partial<
|
|
@@ -53238,12 +53330,26 @@ export type CustomElementsSolidJs = {
|
|
|
53238
53330
|
*
|
|
53239
53331
|
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
|
53240
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"`.
|
|
53241
53335
|
* - `bearing`: The map's rotation, in degrees clockwise from north. `connectMap` keeps it
|
|
53242
53336
|
* current, and the Face north button's needle turns with it.
|
|
53243
53337
|
* - `cluster`: Combines markers that would overlap into one count. Counts split apart as
|
|
53244
53338
|
* the map zooms in, and pressing one zooms in to its places.
|
|
53245
53339
|
* - `face-north-label`/`faceNorthLabel`: The Face north button's label.
|
|
53246
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.
|
|
53247
53353
|
* - `hybrid-label`/`hybridLabel`: The Hybrid map type's name.
|
|
53248
53354
|
* - `label`: The map's name, read by screen readers. Name the place, such as "Delivery
|
|
53249
53355
|
* area", so that several maps on one page can be told apart. Required.
|
|
@@ -53270,6 +53376,11 @@ export type CustomElementsSolidJs = {
|
|
|
53270
53376
|
* - `tilt-label`/`tiltLabel`: The 3D button's label.
|
|
53271
53377
|
* - `turned-label`/`turnedLabel`: What screen readers hear when the map is turned. `{degrees}` is the way the
|
|
53272
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.
|
|
53273
53384
|
* - `zoomed-label`/`zoomedLabel`: What screen readers hear after a zoom. `{level}` is the zoom level.
|
|
53274
53385
|
* - `zoom-level`/`zoomLevel`: How far the map is zoomed, in its renderer's levels. `connectMap` keeps it
|
|
53275
53386
|
* current, and the map says it after a zoom.
|
|
@@ -53430,6 +53541,8 @@ export type CustomElementsSolidJs = {
|
|
|
53430
53541
|
* - `face-north`: The compass: its needle points north as the map turns, and pressing it turns the map to face north.
|
|
53431
53542
|
* - `footer`: The strip below the map.
|
|
53432
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.
|
|
53433
53546
|
* - `header`: The strip above the map.
|
|
53434
53547
|
* - `layer`: One entry in the list of the map's layers.
|
|
53435
53548
|
* - `layer-choice`: One layer's tile in the layers menu, pressed while the layer is shown.
|
|
@@ -53464,6 +53577,7 @@ export type CustomElementsSolidJs = {
|
|
|
53464
53577
|
* - `fullscreen`: The map fills the screen.
|
|
53465
53578
|
* - `idle`: The user has been still long enough for the header and footer to fade.
|
|
53466
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.
|
|
53467
53581
|
* - `settled`: Set one frame after the first render. Transitions wait for it, so an element does not animate its own arrival.
|
|
53468
53582
|
*/
|
|
53469
53583
|
"helix-headless-map": Partial<
|
package/types/vue.d.ts
CHANGED
|
@@ -6198,6 +6198,12 @@ export type HelixHeadlessMapHelixMapZoomElementEvent =
|
|
|
6198
6198
|
HelixHeadlessMapElementEvent<HelixMapZoomEvent>;
|
|
6199
6199
|
|
|
6200
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;
|
|
6201
6207
|
/** The map's rotation, in degrees clockwise from north. `connectMap` keeps it
|
|
6202
6208
|
current, and the Face north button's needle turns with it. */
|
|
6203
6209
|
bearing?: (HelixHeadlessMap["bearing"]) | undefined;
|
|
@@ -6212,6 +6218,19 @@ the map zooms in, and pressing one zooms in to its places. */
|
|
|
6212
6218
|
"flat-label"?: (HelixHeadlessMap["flatLabel"]) | undefined;
|
|
6213
6219
|
/** What screen readers hear when the map is tilted back to looking straight down. */
|
|
6214
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;
|
|
6215
6234
|
/** The Hybrid map type's name. */
|
|
6216
6235
|
"hybrid-label"?: (HelixHeadlessMap["hybridLabel"]) | undefined;
|
|
6217
6236
|
/** The Hybrid map type's name. */
|
|
@@ -6293,6 +6312,22 @@ top of the map faces, clockwise from north. */
|
|
|
6293
6312
|
/** What screen readers hear when the map is turned. `{degrees}` is the way the
|
|
6294
6313
|
top of the map faces, clockwise from north. */
|
|
6295
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;
|
|
6296
6331
|
/** What screen readers hear after a zoom. `{level}` is the zoom level. */
|
|
6297
6332
|
"zoomed-label"?: (HelixHeadlessMap["zoomedLabel"]) | undefined;
|
|
6298
6333
|
/** What screen readers hear after a zoom. `{level}` is the zoom level. */
|