@fusion.dev/helix 0.112.0 → 0.114.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 +114 -2
- package/dist/element-events.generated.js +1 -0
- package/dist/map/root/map-root.css.js +45 -0
- package/dist/map/root/map-root.d.ts +22 -1
- package/dist/map/root/map-root.js +10 -0
- package/package.json +6 -6
- package/types/jsx.d.ts +99 -3
- package/types/vue.d.ts +25 -2
package/custom-elements.json
CHANGED
|
@@ -83172,7 +83172,7 @@
|
|
|
83172
83172
|
"declarations": [
|
|
83173
83173
|
{
|
|
83174
83174
|
"kind": "class",
|
|
83175
|
-
"description": "The styled frame: a bordered box with the pan and zoom buttons in its top\ncorner. The buttons stay visible when the header and footer fade.",
|
|
83175
|
+
"description": "The styled frame: a bordered box with the pan and zoom buttons in its top\ncorner. The buttons stay visible when the header and footer fade.\n\nSet `fill` to lay the map behind a page's own content, such as a hero whose\nwords decide its height: the frame covers its container, which needs a\nposition of its own, such as `position: relative`. Set `credit-placement`\nto draw the map's credit compact in a corner over the map, which suits a\nmap the width of the page.",
|
|
83176
83176
|
"name": "HelixMap",
|
|
83177
83177
|
"cssProperties": [
|
|
83178
83178
|
{
|
|
@@ -83180,7 +83180,7 @@
|
|
|
83180
83180
|
"name": "--map-background-color"
|
|
83181
83181
|
},
|
|
83182
83182
|
{
|
|
83183
|
-
"description": "The frame's height, as a length.",
|
|
83183
|
+
"description": "The frame's height, as a length. Ignored with `fill`, where the container decides it.",
|
|
83184
83184
|
"name": "--map-block-size"
|
|
83185
83185
|
},
|
|
83186
83186
|
{
|
|
@@ -83201,6 +83201,27 @@
|
|
|
83201
83201
|
}
|
|
83202
83202
|
],
|
|
83203
83203
|
"members": [
|
|
83204
|
+
{
|
|
83205
|
+
"kind": "field",
|
|
83206
|
+
"name": "creditPlacement",
|
|
83207
|
+
"type": {
|
|
83208
|
+
"text": "'bottom-end' | 'bottom-start' | undefined"
|
|
83209
|
+
},
|
|
83210
|
+
"description": "Where the map's credit is drawn. Unset, it is a strip under the map.\n`bottom-end` or `bottom-start` draws it in that corner over the map, on\none line that shows the whole credit on hover or focus, the form\nOpenStreetMap's attribution guidance accepts for a small credit. Keep it\nclear of a corner the controls are in.",
|
|
83211
|
+
"attribute": "credit-placement",
|
|
83212
|
+
"reflects": true
|
|
83213
|
+
},
|
|
83214
|
+
{
|
|
83215
|
+
"kind": "field",
|
|
83216
|
+
"name": "fill",
|
|
83217
|
+
"type": {
|
|
83218
|
+
"text": "boolean"
|
|
83219
|
+
},
|
|
83220
|
+
"default": "false",
|
|
83221
|
+
"description": "Covers the container instead of taking a height of its own, for a map\nbehind a page's content. The container needs a position, such as\n`position: relative`. The frame draws no border or corners then, since\nthe container's edge is the map's.",
|
|
83222
|
+
"attribute": "fill",
|
|
83223
|
+
"reflects": true
|
|
83224
|
+
},
|
|
83204
83225
|
{
|
|
83205
83226
|
"kind": "field",
|
|
83206
83227
|
"name": "material",
|
|
@@ -84147,6 +84168,56 @@
|
|
|
84147
84168
|
"module": "src/map/root/map-root.ts"
|
|
84148
84169
|
}
|
|
84149
84170
|
},
|
|
84171
|
+
{
|
|
84172
|
+
"kind": "field",
|
|
84173
|
+
"name": "ready",
|
|
84174
|
+
"type": {
|
|
84175
|
+
"text": "boolean"
|
|
84176
|
+
},
|
|
84177
|
+
"description": "Whether the map has been drawn whole, which `drawn()` says. For a page that\nconnects after `helix-map-ready` has been sent, and missed it.",
|
|
84178
|
+
"readonly": true,
|
|
84179
|
+
"inheritedFrom": {
|
|
84180
|
+
"name": "HelixHeadlessMap",
|
|
84181
|
+
"module": "src/map/root/map-root.ts"
|
|
84182
|
+
}
|
|
84183
|
+
},
|
|
84184
|
+
{
|
|
84185
|
+
"kind": "field",
|
|
84186
|
+
"name": "whole",
|
|
84187
|
+
"type": {
|
|
84188
|
+
"text": "boolean"
|
|
84189
|
+
},
|
|
84190
|
+
"privacy": "private",
|
|
84191
|
+
"default": "false",
|
|
84192
|
+
"description": "What `ready` reads, written by `drawn()`.",
|
|
84193
|
+
"inheritedFrom": {
|
|
84194
|
+
"name": "HelixHeadlessMap",
|
|
84195
|
+
"module": "src/map/root/map-root.ts"
|
|
84196
|
+
}
|
|
84197
|
+
},
|
|
84198
|
+
{
|
|
84199
|
+
"kind": "method",
|
|
84200
|
+
"name": "drawn",
|
|
84201
|
+
"return": {
|
|
84202
|
+
"type": {
|
|
84203
|
+
"text": "void"
|
|
84204
|
+
}
|
|
84205
|
+
},
|
|
84206
|
+
"parameters": [
|
|
84207
|
+
{
|
|
84208
|
+
"name": "whole",
|
|
84209
|
+
"default": "true"
|
|
84210
|
+
}
|
|
84211
|
+
],
|
|
84212
|
+
"description": "Says the map has been drawn whole, or with `false`, that it no longer is.\n\n**Called by whatever draws the map**, as `connectMap` does once its driver\nhas every tile the view needs and the ground where there is terrain, and\nwith `false` when it disconnects. A page drawing its own map calls it when\nthat map is finished. The first call after the map was not drawn sends\n`helix-map-ready` and turns on `:state(ready)`, so a page can wait on the\nevent or select on the state, and a page that connects late reads `ready`.",
|
|
84213
|
+
"type": {
|
|
84214
|
+
"text": "drawn(whole = true) => void"
|
|
84215
|
+
},
|
|
84216
|
+
"inheritedFrom": {
|
|
84217
|
+
"name": "HelixHeadlessMap",
|
|
84218
|
+
"module": "src/map/root/map-root.ts"
|
|
84219
|
+
}
|
|
84220
|
+
},
|
|
84150
84221
|
{
|
|
84151
84222
|
"kind": "method",
|
|
84152
84223
|
"name": "say",
|
|
@@ -85025,6 +85096,23 @@
|
|
|
85025
85096
|
}
|
|
85026
85097
|
],
|
|
85027
85098
|
"attributes": [
|
|
85099
|
+
{
|
|
85100
|
+
"name": "credit-placement",
|
|
85101
|
+
"type": {
|
|
85102
|
+
"text": "'bottom-end' | 'bottom-start' | undefined"
|
|
85103
|
+
},
|
|
85104
|
+
"description": "Where the map's credit is drawn. Unset, it is a strip under the map.\n`bottom-end` or `bottom-start` draws it in that corner over the map, on\none line that shows the whole credit on hover or focus, the form\nOpenStreetMap's attribution guidance accepts for a small credit. Keep it\nclear of a corner the controls are in.",
|
|
85105
|
+
"fieldName": "creditPlacement"
|
|
85106
|
+
},
|
|
85107
|
+
{
|
|
85108
|
+
"name": "fill",
|
|
85109
|
+
"type": {
|
|
85110
|
+
"text": "boolean"
|
|
85111
|
+
},
|
|
85112
|
+
"default": "false",
|
|
85113
|
+
"description": "Covers the container instead of taking a height of its own, for a map\nbehind a page's content. The container needs a position, such as\n`position: relative`. The frame draws no border or corners then, since\nthe container's edge is the map's.",
|
|
85114
|
+
"fieldName": "fill"
|
|
85115
|
+
},
|
|
85028
85116
|
{
|
|
85029
85117
|
"name": "material",
|
|
85030
85118
|
"type": {
|
|
@@ -85520,6 +85608,10 @@
|
|
|
85520
85608
|
"description": "A frame around a map, with pan and zoom buttons and the map credit.",
|
|
85521
85609
|
"slug": "preview"
|
|
85522
85610
|
},
|
|
85611
|
+
{
|
|
85612
|
+
"description": "A map behind a page's own words, filling a hero whose words decide its height, with its credit in a corner and no landmarks.",
|
|
85613
|
+
"slug": "behind-content"
|
|
85614
|
+
},
|
|
85523
85615
|
{
|
|
85524
85616
|
"description": "Buildings raised to their real heights on a tilted map of downtown Austin.",
|
|
85525
85617
|
"slug": "buildings"
|
|
@@ -85914,6 +86006,18 @@
|
|
|
85914
86006
|
"module": "src/map/root/map-root.ts"
|
|
85915
86007
|
}
|
|
85916
86008
|
},
|
|
86009
|
+
{
|
|
86010
|
+
"type": {
|
|
86011
|
+
"text": "HelixMapReadyEvent"
|
|
86012
|
+
},
|
|
86013
|
+
"description": "The map has been drawn whole: its style, every tile the view needs, and the ground where it has terrain. Sent once per connection. Show a map that is finished on it, where it would otherwise draw in stages.",
|
|
86014
|
+
"name": "helix-map-ready",
|
|
86015
|
+
"reactProp": "onhelix-map-ready",
|
|
86016
|
+
"inheritedFrom": {
|
|
86017
|
+
"name": "HelixHeadlessMap",
|
|
86018
|
+
"module": "src/map/root/map-root.ts"
|
|
86019
|
+
}
|
|
86020
|
+
},
|
|
85917
86021
|
{
|
|
85918
86022
|
"type": {
|
|
85919
86023
|
"text": "HelixMapRotateEvent"
|
|
@@ -85968,6 +86072,14 @@
|
|
|
85968
86072
|
"module": "src/map/root/map-root.ts"
|
|
85969
86073
|
}
|
|
85970
86074
|
},
|
|
86075
|
+
{
|
|
86076
|
+
"description": "The map has been drawn whole, after `helix-map-ready`.",
|
|
86077
|
+
"name": "ready",
|
|
86078
|
+
"inheritedFrom": {
|
|
86079
|
+
"name": "HelixHeadlessMap",
|
|
86080
|
+
"module": "src/map/root/map-root.ts"
|
|
86081
|
+
}
|
|
86082
|
+
},
|
|
85971
86083
|
{
|
|
85972
86084
|
"description": "Set one frame after the first render. Transitions wait for it, so an element does not animate its own arrival.",
|
|
85973
86085
|
"name": "settled",
|
|
@@ -15,6 +15,15 @@ overflow: hidden;
|
|
|
15
15
|
position: relative;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
+
:host([fill]) [part="region"] {
|
|
19
|
+
block-size: auto;
|
|
20
|
+
border: none;
|
|
21
|
+
border-radius: 0;
|
|
22
|
+
container-type: size;
|
|
23
|
+
inset: 0;
|
|
24
|
+
position: absolute;
|
|
25
|
+
}
|
|
26
|
+
|
|
18
27
|
[part="viewport"] {
|
|
19
28
|
isolation: isolate;
|
|
20
29
|
min-block-size: 0;
|
|
@@ -54,6 +63,38 @@ font-size: var(--helix-text-xs);
|
|
|
54
63
|
padding: var(--helix-space-2xs) var(--helix-space-xs);
|
|
55
64
|
}
|
|
56
65
|
|
|
66
|
+
:host([credit-placement]) [part="attribution"] {
|
|
67
|
+
inset-block-end: var(--helix-space-2xs);
|
|
68
|
+
max-inline-size: calc(100% - var(--helix-space-2xs) * 2);
|
|
69
|
+
position: absolute;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
:host([credit-placement="bottom-end"]) [part="attribution"] {
|
|
73
|
+
inset-inline-end: var(--helix-space-2xs);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
:host([credit-placement="bottom-start"]) [part="attribution"] {
|
|
77
|
+
inset-inline-start: var(--helix-space-2xs);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
:host([credit-placement]) ::slotted([slot="attribution"]) {
|
|
81
|
+
backdrop-filter: var(--helix-material-backdrop);
|
|
82
|
+
background-color: var(--helix-material-translucent);
|
|
83
|
+
border-block-start: none;
|
|
84
|
+
border-radius: var(--helix-radii-sm);
|
|
85
|
+
color: var(--helix-color-foreground-muted);
|
|
86
|
+
overflow: hidden;
|
|
87
|
+
padding: var(--helix-space-none) var(--helix-space-xs);
|
|
88
|
+
text-overflow: ellipsis;
|
|
89
|
+
white-space: nowrap;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
:host([credit-placement])
|
|
93
|
+
[part="attribution"]:is(:hover, :focus-within)
|
|
94
|
+
::slotted([slot="attribution"]) {
|
|
95
|
+
white-space: normal;
|
|
96
|
+
}
|
|
97
|
+
|
|
57
98
|
:host([material="glass"]) [part="controls"] button {
|
|
58
99
|
backdrop-filter: var(--helix-material-backdrop);
|
|
59
100
|
background-color: var(--viewport-control-background-color, var(--helix-material-translucent));
|
|
@@ -187,6 +228,10 @@ padding: var(--helix-space-sm);
|
|
|
187
228
|
position: absolute;
|
|
188
229
|
}
|
|
189
230
|
|
|
231
|
+
:host([fill]) [part="layers-menu"] {
|
|
232
|
+
max-block-size: calc(100cqb - var(--helix-space-sm) * 2);
|
|
233
|
+
}
|
|
234
|
+
|
|
190
235
|
[part="layers-menu"][hidden] {
|
|
191
236
|
display: none;
|
|
192
237
|
}
|
|
@@ -7,6 +7,12 @@ import type { CSSResultGroup } from 'lit';
|
|
|
7
7
|
* The styled frame: a bordered box with the pan and zoom buttons in its top
|
|
8
8
|
* corner. The buttons stay visible when the header and footer fade.
|
|
9
9
|
*
|
|
10
|
+
* Set `fill` to lay the map behind a page's own content, such as a hero whose
|
|
11
|
+
* words decide its height: the frame covers its container, which needs a
|
|
12
|
+
* position of its own, such as `position: relative`. Set `credit-placement`
|
|
13
|
+
* to draw the map's credit compact in a corner over the map, which suits a
|
|
14
|
+
* map the width of the page.
|
|
15
|
+
*
|
|
10
16
|
* @since 0.100.0
|
|
11
17
|
* @status experimental
|
|
12
18
|
* @category media
|
|
@@ -14,11 +20,26 @@ import type { CSSResultGroup } from 'lit';
|
|
|
14
20
|
* @documentation https://fusion.dev/helix/components/map
|
|
15
21
|
*
|
|
16
22
|
* @cssproperty --map-background-color - The color behind the map while tiles load.
|
|
17
|
-
* @cssproperty --map-block-size - The frame's height, as a length.
|
|
23
|
+
* @cssproperty --map-block-size - The frame's height, as a length. Ignored with `fill`, where the container decides it.
|
|
18
24
|
* @cssproperty --map-border-color - The frame's border color.
|
|
19
25
|
* @cssproperty --viewport-control-background-color - The background of the pan and zoom buttons. Canvas uses the same property.
|
|
20
26
|
*/
|
|
21
27
|
export declare class HelixMap extends HelixHeadlessMap {
|
|
28
|
+
/**
|
|
29
|
+
* Where the map's credit is drawn. Unset, it is a strip under the map.
|
|
30
|
+
* `bottom-end` or `bottom-start` draws it in that corner over the map, on
|
|
31
|
+
* one line that shows the whole credit on hover or focus, the form
|
|
32
|
+
* OpenStreetMap's attribution guidance accepts for a small credit. Keep it
|
|
33
|
+
* clear of a corner the controls are in.
|
|
34
|
+
*/
|
|
35
|
+
creditPlacement?: 'bottom-end' | 'bottom-start';
|
|
36
|
+
/**
|
|
37
|
+
* Covers the container instead of taking a height of its own, for a map
|
|
38
|
+
* behind a page's content. The container needs a position, such as
|
|
39
|
+
* `position: relative`. The frame draws no border or corners then, since
|
|
40
|
+
* the container's edge is the map's.
|
|
41
|
+
*/
|
|
42
|
+
fill: boolean;
|
|
22
43
|
/**
|
|
23
44
|
* The background of the pan and zoom buttons. Leave unset for solid. `glass`
|
|
24
45
|
* shows the map through a blur, `frosted` blurs more, and `transparent` has
|
|
@@ -11,8 +11,18 @@ import { styles as liveStyles } from '../../shared/live/live.css.js';
|
|
|
11
11
|
import { styles as viewportStyles } from '../../shared/viewport/viewport.css.js';
|
|
12
12
|
import { styles } from './map-root.css.js';
|
|
13
13
|
let HelixMap = class HelixMap extends HelixHeadlessMap {
|
|
14
|
+
constructor() {
|
|
15
|
+
super(...arguments);
|
|
16
|
+
this.fill = false;
|
|
17
|
+
}
|
|
14
18
|
static { this.styles = [liveStyles, viewportStyles, styles]; }
|
|
15
19
|
};
|
|
20
|
+
__decorate([
|
|
21
|
+
property({ attribute: 'credit-placement', reflect: true })
|
|
22
|
+
], HelixMap.prototype, "creditPlacement", void 0);
|
|
23
|
+
__decorate([
|
|
24
|
+
property({ reflect: true, type: Boolean })
|
|
25
|
+
], HelixMap.prototype, "fill", void 0);
|
|
16
26
|
__decorate([
|
|
17
27
|
property({ reflect: true })
|
|
18
28
|
], HelixMap.prototype, "material", void 0);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fusion.dev/helix",
|
|
3
3
|
"description": "Styled component tier. Extends the headless tier with token-driven presentation.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.114.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Ross Sheppard <ross.sheppard@fusion.dev>",
|
|
7
7
|
"repository": {
|
|
@@ -51,13 +51,13 @@
|
|
|
51
51
|
},
|
|
52
52
|
"bugs": "https://github.com/project-fusion/fusion/issues",
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@fusion.dev/helix-core": "0.
|
|
55
|
-
"@fusion.dev/helix-headless": "0.
|
|
56
|
-
"@fusion.dev/helix-styles": "0.
|
|
54
|
+
"@fusion.dev/helix-core": "0.114.0",
|
|
55
|
+
"@fusion.dev/helix-headless": "0.114.0",
|
|
56
|
+
"@fusion.dev/helix-styles": "0.114.0"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
|
-
"@fusion.dev/helix-cem": "0.
|
|
60
|
-
"@fusion.dev/helix-testing": "0.
|
|
59
|
+
"@fusion.dev/helix-cem": "0.114.0",
|
|
60
|
+
"@fusion.dev/helix-testing": "0.114.0",
|
|
61
61
|
"@fusion.dev/scripts": "0.0.0-dev",
|
|
62
62
|
"@happy-dom/global-registrator": "^20.0.0",
|
|
63
63
|
"@lit-labs/ssr": "^4.1.0",
|
package/types/jsx.d.ts
CHANGED
|
@@ -112,6 +112,7 @@ import type {
|
|
|
112
112
|
HelixMapPoints,
|
|
113
113
|
HelixMapPosition,
|
|
114
114
|
HelixMapRaster,
|
|
115
|
+
HelixMapReadyEvent,
|
|
115
116
|
HelixMapRotateEvent,
|
|
116
117
|
HelixMapRoute,
|
|
117
118
|
HelixMapTerrain,
|
|
@@ -14227,6 +14228,9 @@ export type HelixMapHelixMapPanElementEvent =
|
|
|
14227
14228
|
/** `helix-map-part-change` event type */
|
|
14228
14229
|
export type HelixMapHelixMapPartChangeElementEvent =
|
|
14229
14230
|
HelixMapElementEvent<HelixMapPartChangeEvent>;
|
|
14231
|
+
/** `helix-map-ready` event type */
|
|
14232
|
+
export type HelixMapHelixMapReadyElementEvent =
|
|
14233
|
+
HelixMapElementEvent<HelixMapReadyEvent>;
|
|
14230
14234
|
/** `helix-map-rotate` event type */
|
|
14231
14235
|
export type HelixMapHelixMapRotateElementEvent =
|
|
14232
14236
|
HelixMapElementEvent<HelixMapRotateEvent>;
|
|
@@ -14238,6 +14242,23 @@ export type HelixMapHelixMapZoomElementEvent =
|
|
|
14238
14242
|
HelixMapElementEvent<HelixMapZoomEvent>;
|
|
14239
14243
|
|
|
14240
14244
|
export type HelixMapProps = {
|
|
14245
|
+
/** Where the map's credit is drawn. Unset, it is a strip under the map.
|
|
14246
|
+
`bottom-end` or `bottom-start` draws it in that corner over the map, on
|
|
14247
|
+
one line that shows the whole credit on hover or focus, the form
|
|
14248
|
+
OpenStreetMap's attribution guidance accepts for a small credit. Keep it
|
|
14249
|
+
clear of a corner the controls are in. */
|
|
14250
|
+
"credit-placement"?: (HelixMap["creditPlacement"]) | undefined;
|
|
14251
|
+
/** Where the map's credit is drawn. Unset, it is a strip under the map.
|
|
14252
|
+
`bottom-end` or `bottom-start` draws it in that corner over the map, on
|
|
14253
|
+
one line that shows the whole credit on hover or focus, the form
|
|
14254
|
+
OpenStreetMap's attribution guidance accepts for a small credit. Keep it
|
|
14255
|
+
clear of a corner the controls are in. */
|
|
14256
|
+
creditPlacement?: (HelixMap["creditPlacement"]) | undefined;
|
|
14257
|
+
/** Covers the container instead of taking a height of its own, for a map
|
|
14258
|
+
behind a page's content. The container needs a position, such as
|
|
14259
|
+
`position: relative`. The frame draws no border or corners then, since
|
|
14260
|
+
the container's edge is the map's. */
|
|
14261
|
+
fill?: (HelixMap["fill"]) | undefined;
|
|
14241
14262
|
/** The background of the pan and zoom buttons. Leave unset for solid. `glass`
|
|
14242
14263
|
shows the map through a blur, `frosted` blurs more, and `transparent` has
|
|
14243
14264
|
no background. Your theme sets how see-through each one is. */
|
|
@@ -14484,6 +14505,8 @@ current, and the map says it after a zoom. */
|
|
|
14484
14505
|
"onhelix-map-part-change"?: ((
|
|
14485
14506
|
e: HelixMapHelixMapPartChangeElementEvent,
|
|
14486
14507
|
) => void) | undefined;
|
|
14508
|
+
/** The map has been drawn whole: its style, every tile the view needs, and the ground where it has terrain. Sent once per connection. Show a map that is finished on it, where it would otherwise draw in stages. */
|
|
14509
|
+
"onhelix-map-ready"?: ((e: HelixMapHelixMapReadyElementEvent) => void) | undefined;
|
|
14487
14510
|
/** A rotate or Face north button, or Shift with Left or Right, was pressed. Turn your map in response. */
|
|
14488
14511
|
"onhelix-map-rotate"?: ((e: HelixMapHelixMapRotateElementEvent) => void) | undefined;
|
|
14489
14512
|
/** The 3D button, or Shift with Up or Down, was pressed. Tilt your map in response. */
|
|
@@ -14493,6 +14516,23 @@ current, and the map says it after a zoom. */
|
|
|
14493
14516
|
};
|
|
14494
14517
|
|
|
14495
14518
|
export type HelixMapSolidJsProps = {
|
|
14519
|
+
/** Where the map's credit is drawn. Unset, it is a strip under the map.
|
|
14520
|
+
`bottom-end` or `bottom-start` draws it in that corner over the map, on
|
|
14521
|
+
one line that shows the whole credit on hover or focus, the form
|
|
14522
|
+
OpenStreetMap's attribution guidance accepts for a small credit. Keep it
|
|
14523
|
+
clear of a corner the controls are in. */
|
|
14524
|
+
"attr:credit-placement"?: (HelixMap["creditPlacement"]) | undefined;
|
|
14525
|
+
/** Where the map's credit is drawn. Unset, it is a strip under the map.
|
|
14526
|
+
`bottom-end` or `bottom-start` draws it in that corner over the map, on
|
|
14527
|
+
one line that shows the whole credit on hover or focus, the form
|
|
14528
|
+
OpenStreetMap's attribution guidance accepts for a small credit. Keep it
|
|
14529
|
+
clear of a corner the controls are in. */
|
|
14530
|
+
"prop:creditPlacement"?: (HelixMap["creditPlacement"]) | undefined;
|
|
14531
|
+
/** Covers the container instead of taking a height of its own, for a map
|
|
14532
|
+
behind a page's content. The container needs a position, such as
|
|
14533
|
+
`position: relative`. The frame draws no border or corners then, since
|
|
14534
|
+
the container's edge is the map's. */
|
|
14535
|
+
"prop:fill"?: (HelixMap["fill"]) | undefined;
|
|
14496
14536
|
/** The background of the pan and zoom buttons. Leave unset for solid. `glass`
|
|
14497
14537
|
shows the map through a blur, `frosted` blurs more, and `transparent` has
|
|
14498
14538
|
no background. Your theme sets how see-through each one is. */
|
|
@@ -14738,6 +14778,8 @@ current, and the map says it after a zoom. */
|
|
|
14738
14778
|
"on:helix-map-part-change"?: ((
|
|
14739
14779
|
e: HelixMapHelixMapPartChangeElementEvent,
|
|
14740
14780
|
) => void) | undefined;
|
|
14781
|
+
/** The map has been drawn whole: its style, every tile the view needs, and the ground where it has terrain. Sent once per connection. Show a map that is finished on it, where it would otherwise draw in stages. */
|
|
14782
|
+
"on:helix-map-ready"?: ((e: HelixMapHelixMapReadyElementEvent) => void) | undefined;
|
|
14741
14783
|
/** A rotate or Face north button, or Shift with Left or Right, was pressed. Turn your map in response. */
|
|
14742
14784
|
"on:helix-map-rotate"?: ((e: HelixMapHelixMapRotateElementEvent) => void) | undefined;
|
|
14743
14785
|
/** The 3D button, or Shift with Up or Down, was pressed. Tilt your map in response. */
|
|
@@ -37542,10 +37584,25 @@ export type CustomElements = {
|
|
|
37542
37584
|
* The styled frame: a bordered box with the pan and zoom buttons in its top
|
|
37543
37585
|
* corner. The buttons stay visible when the header and footer fade.
|
|
37544
37586
|
*
|
|
37587
|
+
* Set `fill` to lay the map behind a page's own content, such as a hero whose
|
|
37588
|
+
* words decide its height: the frame covers its container, which needs a
|
|
37589
|
+
* position of its own, such as `position: relative`. Set `credit-placement`
|
|
37590
|
+
* to draw the map's credit compact in a corner over the map, which suits a
|
|
37591
|
+
* map the width of the page.
|
|
37592
|
+
*
|
|
37545
37593
|
* ## Attributes & Properties
|
|
37546
37594
|
*
|
|
37547
37595
|
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
|
37548
37596
|
*
|
|
37597
|
+
* - `credit-placement`/`creditPlacement`: Where the map's credit is drawn. Unset, it is a strip under the map.
|
|
37598
|
+
* `bottom-end` or `bottom-start` draws it in that corner over the map, on
|
|
37599
|
+
* one line that shows the whole credit on hover or focus, the form
|
|
37600
|
+
* OpenStreetMap's attribution guidance accepts for a small credit. Keep it
|
|
37601
|
+
* clear of a corner the controls are in.
|
|
37602
|
+
* - `fill`: Covers the container instead of taking a height of its own, for a map
|
|
37603
|
+
* behind a page's content. The container needs a position, such as
|
|
37604
|
+
* `position: relative`. The frame draws no border or corners then, since
|
|
37605
|
+
* the container's edge is the map's.
|
|
37549
37606
|
* - `material`: The background of the pan and zoom buttons. Leave unset for solid. `glass`
|
|
37550
37607
|
* shows the map through a blur, `frosted` blurs more, and `transparent` has
|
|
37551
37608
|
* no background. Your theme sets how see-through each one is.
|
|
@@ -37646,6 +37703,8 @@ export type CustomElements = {
|
|
|
37646
37703
|
* - `zoomed-label`/`zoomedLabel`: What screen readers hear after a zoom. `{level}` is the zoom level.
|
|
37647
37704
|
* - `zoom-level`/`zoomLevel`: How far the map is zoomed, in its renderer's levels. `connectMap` keeps it
|
|
37648
37705
|
* current, and the map says it after a zoom.
|
|
37706
|
+
* - `ready`: Whether the map has been drawn whole, which `drawn()` says. For a page that
|
|
37707
|
+
* connects after `helix-map-ready` has been sent, and missed it. (property only) (readonly)
|
|
37649
37708
|
* - `whenSettled`: Resolves a frame after the first update, when transitions are switched on.
|
|
37650
37709
|
*
|
|
37651
37710
|
* **Named `whenSettled` because `settled` is taken four times over**, by
|
|
@@ -37675,6 +37734,7 @@ export type CustomElements = {
|
|
|
37675
37734
|
* - `helix-map-cluster`: A cluster was pressed. Sent from the marker that shows the cluster, with the names of its places.
|
|
37676
37735
|
* - `helix-map-pan`: A pan button or arrow key was pressed. Move your map in response.
|
|
37677
37736
|
* - `helix-map-part-change`: Clustering was turned on or off. Used by `connectMap`; pages do not need to listen for it.
|
|
37737
|
+
* - `helix-map-ready`: The map has been drawn whole: its style, every tile the view needs, and the ground where it has terrain. Sent once per connection. Show a map that is finished on it, where it would otherwise draw in stages.
|
|
37678
37738
|
* - `helix-map-rotate`: A rotate or Face north button, or Shift with Left or Right, was pressed. Turn your map in response.
|
|
37679
37739
|
* - `helix-map-tilt`: The 3D button, or Shift with Up or Down, was pressed. Tilt your map in response.
|
|
37680
37740
|
* - `helix-map-zoom`: A zoom button or key was pressed, with a direction. Zoom your map in response.
|
|
@@ -37709,6 +37769,14 @@ export type CustomElements = {
|
|
|
37709
37769
|
* animation is one sentence, and it is the view's state where there is one:
|
|
37710
37770
|
* the zoom level, the way the map faces, its tilt. A pan has no state to
|
|
37711
37771
|
* say, so it says which way the map moved.
|
|
37772
|
+
* - `drawn(whole = true) => void`: Says the map has been drawn whole, or with `false`, that it no longer is.
|
|
37773
|
+
*
|
|
37774
|
+
* **Called by whatever draws the map**, as `connectMap` does once its driver
|
|
37775
|
+
* has every tile the view needs and the ground where there is terrain, and
|
|
37776
|
+
* with `false` when it disconnects. A page drawing its own map calls it when
|
|
37777
|
+
* that map is finished. The first call after the map was not drawn sends
|
|
37778
|
+
* `helix-map-ready` and turns on `:state(ready)`, so a page can wait on the
|
|
37779
|
+
* event or select on the state, and a page that connects late reads `ready`.
|
|
37712
37780
|
* - `rotate(by: number) => void`: Turns the map by some degrees, clockwise where positive.
|
|
37713
37781
|
* - `faceNorth() => void`: Turns the map to face north.
|
|
37714
37782
|
* - `tilt(by: number) => void`: Tilts the map by some degrees, toward the horizon where positive.
|
|
@@ -37719,7 +37787,7 @@ export type CustomElements = {
|
|
|
37719
37787
|
* CSS variables available for styling the component.
|
|
37720
37788
|
*
|
|
37721
37789
|
* - `--map-background-color`: The color behind the map while tiles load. (default: `undefined`)
|
|
37722
|
-
* - `--map-block-size`: The frame's height, as a length. (default: `undefined`)
|
|
37790
|
+
* - `--map-block-size`: The frame's height, as a length. Ignored with `fill`, where the container decides it. (default: `undefined`)
|
|
37723
37791
|
* - `--map-border-color`: The frame's border color. (default: `undefined`)
|
|
37724
37792
|
* - `--viewport-control-background-color`: The background of the pan and zoom buttons. Canvas uses the same property. (default: `undefined`)
|
|
37725
37793
|
* - `--map-needle-turn`: How far the needle turns to point north, as an angle. The frame writes it from `bearing`. (default: `undefined`)
|
|
@@ -37767,6 +37835,7 @@ export type CustomElements = {
|
|
|
37767
37835
|
*
|
|
37768
37836
|
* - `fullscreen`: The map fills the screen.
|
|
37769
37837
|
* - `idle`: The user has been still long enough for the header and footer to fade.
|
|
37838
|
+
* - `ready`: The map has been drawn whole, after `helix-map-ready`.
|
|
37770
37839
|
* - `settled`: Set one frame after the first render. Transitions wait for it, so an element does not animate its own arrival.
|
|
37771
37840
|
*/
|
|
37772
37841
|
"helix-map": Partial<HelixMapProps & BaseProps<HelixMap> & BaseEvents<HelixMap>>;
|
|
@@ -59541,10 +59610,25 @@ export type CustomElementsSolidJs = {
|
|
|
59541
59610
|
* The styled frame: a bordered box with the pan and zoom buttons in its top
|
|
59542
59611
|
* corner. The buttons stay visible when the header and footer fade.
|
|
59543
59612
|
*
|
|
59613
|
+
* Set `fill` to lay the map behind a page's own content, such as a hero whose
|
|
59614
|
+
* words decide its height: the frame covers its container, which needs a
|
|
59615
|
+
* position of its own, such as `position: relative`. Set `credit-placement`
|
|
59616
|
+
* to draw the map's credit compact in a corner over the map, which suits a
|
|
59617
|
+
* map the width of the page.
|
|
59618
|
+
*
|
|
59544
59619
|
* ## Attributes & Properties
|
|
59545
59620
|
*
|
|
59546
59621
|
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
|
59547
59622
|
*
|
|
59623
|
+
* - `credit-placement`/`creditPlacement`: Where the map's credit is drawn. Unset, it is a strip under the map.
|
|
59624
|
+
* `bottom-end` or `bottom-start` draws it in that corner over the map, on
|
|
59625
|
+
* one line that shows the whole credit on hover or focus, the form
|
|
59626
|
+
* OpenStreetMap's attribution guidance accepts for a small credit. Keep it
|
|
59627
|
+
* clear of a corner the controls are in.
|
|
59628
|
+
* - `fill`: Covers the container instead of taking a height of its own, for a map
|
|
59629
|
+
* behind a page's content. The container needs a position, such as
|
|
59630
|
+
* `position: relative`. The frame draws no border or corners then, since
|
|
59631
|
+
* the container's edge is the map's.
|
|
59548
59632
|
* - `material`: The background of the pan and zoom buttons. Leave unset for solid. `glass`
|
|
59549
59633
|
* shows the map through a blur, `frosted` blurs more, and `transparent` has
|
|
59550
59634
|
* no background. Your theme sets how see-through each one is.
|
|
@@ -59645,6 +59729,8 @@ export type CustomElementsSolidJs = {
|
|
|
59645
59729
|
* - `zoomed-label`/`zoomedLabel`: What screen readers hear after a zoom. `{level}` is the zoom level.
|
|
59646
59730
|
* - `zoom-level`/`zoomLevel`: How far the map is zoomed, in its renderer's levels. `connectMap` keeps it
|
|
59647
59731
|
* current, and the map says it after a zoom.
|
|
59732
|
+
* - `ready`: Whether the map has been drawn whole, which `drawn()` says. For a page that
|
|
59733
|
+
* connects after `helix-map-ready` has been sent, and missed it. (property only) (readonly)
|
|
59648
59734
|
* - `whenSettled`: Resolves a frame after the first update, when transitions are switched on.
|
|
59649
59735
|
*
|
|
59650
59736
|
* **Named `whenSettled` because `settled` is taken four times over**, by
|
|
@@ -59674,6 +59760,7 @@ export type CustomElementsSolidJs = {
|
|
|
59674
59760
|
* - `helix-map-cluster`: A cluster was pressed. Sent from the marker that shows the cluster, with the names of its places.
|
|
59675
59761
|
* - `helix-map-pan`: A pan button or arrow key was pressed. Move your map in response.
|
|
59676
59762
|
* - `helix-map-part-change`: Clustering was turned on or off. Used by `connectMap`; pages do not need to listen for it.
|
|
59763
|
+
* - `helix-map-ready`: The map has been drawn whole: its style, every tile the view needs, and the ground where it has terrain. Sent once per connection. Show a map that is finished on it, where it would otherwise draw in stages.
|
|
59677
59764
|
* - `helix-map-rotate`: A rotate or Face north button, or Shift with Left or Right, was pressed. Turn your map in response.
|
|
59678
59765
|
* - `helix-map-tilt`: The 3D button, or Shift with Up or Down, was pressed. Tilt your map in response.
|
|
59679
59766
|
* - `helix-map-zoom`: A zoom button or key was pressed, with a direction. Zoom your map in response.
|
|
@@ -59708,6 +59795,14 @@ export type CustomElementsSolidJs = {
|
|
|
59708
59795
|
* animation is one sentence, and it is the view's state where there is one:
|
|
59709
59796
|
* the zoom level, the way the map faces, its tilt. A pan has no state to
|
|
59710
59797
|
* say, so it says which way the map moved.
|
|
59798
|
+
* - `drawn(whole = true) => void`: Says the map has been drawn whole, or with `false`, that it no longer is.
|
|
59799
|
+
*
|
|
59800
|
+
* **Called by whatever draws the map**, as `connectMap` does once its driver
|
|
59801
|
+
* has every tile the view needs and the ground where there is terrain, and
|
|
59802
|
+
* with `false` when it disconnects. A page drawing its own map calls it when
|
|
59803
|
+
* that map is finished. The first call after the map was not drawn sends
|
|
59804
|
+
* `helix-map-ready` and turns on `:state(ready)`, so a page can wait on the
|
|
59805
|
+
* event or select on the state, and a page that connects late reads `ready`.
|
|
59711
59806
|
* - `rotate(by: number) => void`: Turns the map by some degrees, clockwise where positive.
|
|
59712
59807
|
* - `faceNorth() => void`: Turns the map to face north.
|
|
59713
59808
|
* - `tilt(by: number) => void`: Tilts the map by some degrees, toward the horizon where positive.
|
|
@@ -59718,7 +59813,7 @@ export type CustomElementsSolidJs = {
|
|
|
59718
59813
|
* CSS variables available for styling the component.
|
|
59719
59814
|
*
|
|
59720
59815
|
* - `--map-background-color`: The color behind the map while tiles load. (default: `undefined`)
|
|
59721
|
-
* - `--map-block-size`: The frame's height, as a length. (default: `undefined`)
|
|
59816
|
+
* - `--map-block-size`: The frame's height, as a length. Ignored with `fill`, where the container decides it. (default: `undefined`)
|
|
59722
59817
|
* - `--map-border-color`: The frame's border color. (default: `undefined`)
|
|
59723
59818
|
* - `--viewport-control-background-color`: The background of the pan and zoom buttons. Canvas uses the same property. (default: `undefined`)
|
|
59724
59819
|
* - `--map-needle-turn`: How far the needle turns to point north, as an angle. The frame writes it from `bearing`. (default: `undefined`)
|
|
@@ -59766,6 +59861,7 @@ export type CustomElementsSolidJs = {
|
|
|
59766
59861
|
*
|
|
59767
59862
|
* - `fullscreen`: The map fills the screen.
|
|
59768
59863
|
* - `idle`: The user has been still long enough for the header and footer to fade.
|
|
59864
|
+
* - `ready`: The map has been drawn whole, after `helix-map-ready`.
|
|
59769
59865
|
* - `settled`: Set one frame after the first render. Transitions wait for it, so an element does not animate its own arrival.
|
|
59770
59866
|
*/
|
|
59771
59867
|
"helix-map": Partial<
|
|
@@ -70862,7 +70958,7 @@ export type CustomCssProperties = {
|
|
|
70862
70958
|
"--map-position-size"?: (string) | undefined;
|
|
70863
70959
|
/** The color behind the map while tiles load. */
|
|
70864
70960
|
"--map-background-color"?: (string) | undefined;
|
|
70865
|
-
/** The frame's height, as a length. */
|
|
70961
|
+
/** The frame's height, as a length. Ignored with `fill`, where the container decides it. */
|
|
70866
70962
|
"--map-block-size"?: (string) | undefined;
|
|
70867
70963
|
/** The frame's border color. */
|
|
70868
70964
|
"--map-border-color"?: (string) | undefined;
|
package/types/vue.d.ts
CHANGED
|
@@ -192,6 +192,7 @@ import type {
|
|
|
192
192
|
HelixMapPartChangeEvent,
|
|
193
193
|
HelixMapClusterEvent,
|
|
194
194
|
HelixMapPanEvent,
|
|
195
|
+
HelixMapReadyEvent,
|
|
195
196
|
HelixMapRotateEvent,
|
|
196
197
|
HelixMapTiltEvent,
|
|
197
198
|
HelixMapZoomEvent,
|
|
@@ -7290,6 +7291,9 @@ export type HelixMapHelixMapPanElementEvent =
|
|
|
7290
7291
|
/** `helix-map-part-change` event type */
|
|
7291
7292
|
export type HelixMapHelixMapPartChangeElementEvent =
|
|
7292
7293
|
HelixMapElementEvent<HelixMapPartChangeEvent>;
|
|
7294
|
+
/** `helix-map-ready` event type */
|
|
7295
|
+
export type HelixMapHelixMapReadyElementEvent =
|
|
7296
|
+
HelixMapElementEvent<HelixMapReadyEvent>;
|
|
7293
7297
|
/** `helix-map-rotate` event type */
|
|
7294
7298
|
export type HelixMapHelixMapRotateElementEvent =
|
|
7295
7299
|
HelixMapElementEvent<HelixMapRotateEvent>;
|
|
@@ -7301,6 +7305,23 @@ export type HelixMapHelixMapZoomElementEvent =
|
|
|
7301
7305
|
HelixMapElementEvent<HelixMapZoomEvent>;
|
|
7302
7306
|
|
|
7303
7307
|
export type HelixMapVueProps = {
|
|
7308
|
+
/** Where the map's credit is drawn. Unset, it is a strip under the map.
|
|
7309
|
+
`bottom-end` or `bottom-start` draws it in that corner over the map, on
|
|
7310
|
+
one line that shows the whole credit on hover or focus, the form
|
|
7311
|
+
OpenStreetMap's attribution guidance accepts for a small credit. Keep it
|
|
7312
|
+
clear of a corner the controls are in. */
|
|
7313
|
+
"credit-placement"?: (HelixMap["creditPlacement"]) | undefined;
|
|
7314
|
+
/** Where the map's credit is drawn. Unset, it is a strip under the map.
|
|
7315
|
+
`bottom-end` or `bottom-start` draws it in that corner over the map, on
|
|
7316
|
+
one line that shows the whole credit on hover or focus, the form
|
|
7317
|
+
OpenStreetMap's attribution guidance accepts for a small credit. Keep it
|
|
7318
|
+
clear of a corner the controls are in. */
|
|
7319
|
+
creditPlacement?: (HelixMap["creditPlacement"]) | undefined;
|
|
7320
|
+
/** Covers the container instead of taking a height of its own, for a map
|
|
7321
|
+
behind a page's content. The container needs a position, such as
|
|
7322
|
+
`position: relative`. The frame draws no border or corners then, since
|
|
7323
|
+
the container's edge is the map's. */
|
|
7324
|
+
fill?: (HelixMap["fill"]) | undefined;
|
|
7304
7325
|
/** The background of the pan and zoom buttons. Leave unset for solid. `glass`
|
|
7305
7326
|
shows the map through a blur, `frosted` blurs more, and `transparent` has
|
|
7306
7327
|
no background. Your theme sets how see-through each one is. */
|
|
@@ -7547,6 +7568,8 @@ export type HelixMapVueEvents = {
|
|
|
7547
7568
|
"helix-map-pan": HelixMapHelixMapPanElementEvent;
|
|
7548
7569
|
/** Clustering was turned on or off. Used by `connectMap`; pages do not need to listen for it. */
|
|
7549
7570
|
"helix-map-part-change": HelixMapHelixMapPartChangeElementEvent;
|
|
7571
|
+
/** The map has been drawn whole: its style, every tile the view needs, and the ground where it has terrain. Sent once per connection. Show a map that is finished on it, where it would otherwise draw in stages. */
|
|
7572
|
+
"helix-map-ready": HelixMapHelixMapReadyElementEvent;
|
|
7550
7573
|
/** A rotate or Face north button, or Shift with Left or Right, was pressed. Turn your map in response. */
|
|
7551
7574
|
"helix-map-rotate": HelixMapHelixMapRotateElementEvent;
|
|
7552
7575
|
/** The 3D button, or Shift with Up or Down, was pressed. Tilt your map in response. */
|
|
@@ -14059,7 +14082,7 @@ export type CustomCssProperties = {
|
|
|
14059
14082
|
"--map-position-size"?: (string) | undefined;
|
|
14060
14083
|
/** The color behind the map while tiles load. */
|
|
14061
14084
|
"--map-background-color"?: (string) | undefined;
|
|
14062
|
-
/** The frame's height, as a length. */
|
|
14085
|
+
/** The frame's height, as a length. Ignored with `fill`, where the container decides it. */
|
|
14063
14086
|
"--map-block-size"?: (string) | undefined;
|
|
14064
14087
|
/** The frame's border color. */
|
|
14065
14088
|
"--map-border-color"?: (string) | undefined;
|
|
@@ -15045,7 +15068,7 @@ export interface WcToolkitVueGlobalComponents {
|
|
|
15045
15068
|
HelixMapRasterVueProps,
|
|
15046
15069
|
HelixMapRasterVueEvents
|
|
15047
15070
|
>;
|
|
15048
|
-
/** The styled frame: a bordered box with the pan and zoom buttons in its top corner. The buttons stay visible when the header and footer fade. */
|
|
15071
|
+
/** The styled frame: a bordered box with the pan and zoom buttons in its top corner. The buttons stay visible when the header and footer fade. Set 'fill' to lay the map behind a page's own content, such as a hero whose words decide its height: the frame covers its container, which needs a position of its own, such as 'position: relative'. Set 'credit-placement' to draw the map's credit compact in a corner over the map, which suits a map the width of the page. */
|
|
15049
15072
|
"helix-map": DefineCustomElement<
|
|
15050
15073
|
HelixMap,
|
|
15051
15074
|
HelixMapVueProps,
|