@fusion.dev/helix 0.101.0 → 0.102.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.
@@ -85,6 +85,7 @@ registerElementEvents({
85
85
  'toggle',
86
86
  ],
87
87
  'helix-listbox': ['change', 'helix-before-change', 'helix-filter', 'input'],
88
+ 'helix-map': ['helix-map-pan', 'helix-map-zoom'],
88
89
  'helix-megamenu': ['helix-before-close', 'helix-before-open', 'toggle'],
89
90
  'helix-menu': ['helix-before-close', 'helix-before-open', 'helix-select', 'toggle'],
90
91
  'helix-menu-item': ['helix-select'],
package/dist/index.d.ts CHANGED
@@ -57,6 +57,7 @@ export * from './line-chart/index.js';
57
57
  export * from './list/index.js';
58
58
  export * from './listbox/index.js';
59
59
  export * from './loader/index.js';
60
+ export * from './map/index.js';
60
61
  export * from './megamenu/index.js';
61
62
  export * from './menu/index.js';
62
63
  export * from './meter/index.js';
package/dist/index.js CHANGED
@@ -52,6 +52,7 @@ export * from './line-chart/index.js';
52
52
  export * from './list/index.js';
53
53
  export * from './listbox/index.js';
54
54
  export * from './loader/index.js';
55
+ export * from './map/index.js';
55
56
  export * from './megamenu/index.js';
56
57
  export * from './menu/index.js';
57
58
  export * from './meter/index.js';
@@ -0,0 +1 @@
1
+ export { HelixMap } from './root/map-root.js';
@@ -0,0 +1 @@
1
+ export { HelixMap } from './root/map-root.js';
@@ -0,0 +1 @@
1
+ export declare const styles: import("lit").CSSResult;
@@ -0,0 +1,112 @@
1
+ import { createSheet } from '@fusion.dev/helix-core';
2
+ export const styles = createSheet(`:host {
3
+ display: contents;
4
+ }
5
+
6
+ [part="region"] {
7
+ background-color: var(--map-background-color, var(--helix-color-surface-sunken));
8
+ block-size: var(--map-block-size, 24rem);
9
+ border: var(--helix-border-thin) solid var(--map-border-color, var(--helix-color-border));
10
+ border-radius: var(--helix-radii-sm);
11
+ box-sizing: border-box;
12
+ display: grid;
13
+ grid-template-rows: auto 1fr auto auto;
14
+ overflow: hidden;
15
+ position: relative;
16
+ }
17
+
18
+ [part="region"]:focus-within {
19
+ outline: var(--helix-size-focus-ring) solid var(--helix-color-focus-ring);
20
+ outline-offset: calc(var(--helix-size-focus-offset) * -1);
21
+ }
22
+
23
+ [part="viewport"] {
24
+ min-block-size: 0;
25
+ overflow: hidden;
26
+ position: relative;
27
+ }
28
+
29
+ [part="viewport"] ::slotted(*) {
30
+ block-size: 100%;
31
+ inline-size: 100%;
32
+ }
33
+
34
+ [part="controls"] {
35
+ display: grid;
36
+ gap: var(--helix-space-2xs);
37
+
38
+ grid-template-areas:
39
+ ". up . zoomin"
40
+ "start . end zoomout"
41
+ ". down . full";
42
+ inset-block-start: var(--helix-space-sm);
43
+ inset-inline-end: var(--helix-space-sm);
44
+ position: absolute;
45
+ transition: opacity var(--helix-duration-fast) var(--helix-easing-standard);
46
+ }
47
+
48
+ [part="pan-up"] {
49
+ grid-area: up;
50
+ }
51
+ [part="pan-down"] {
52
+ grid-area: down;
53
+ }
54
+ [part="pan-start"] {
55
+ grid-area: start;
56
+ }
57
+ [part="pan-end"] {
58
+ grid-area: end;
59
+ }
60
+ [part="zoom-in"] {
61
+ grid-area: zoomin;
62
+ }
63
+ [part="zoom-out"] {
64
+ grid-area: zoomout;
65
+ }
66
+ [part="fullscreen"] {
67
+ grid-area: full;
68
+ }
69
+
70
+ [part="controls"] button {
71
+ align-items: center;
72
+ background-color: var(--map-control-background-color, var(--helix-color-surface-overlay));
73
+ border: var(--helix-border-thin) solid var(--helix-color-border);
74
+ border-radius: var(--helix-radii-sm);
75
+ block-size: var(--helix-size-control-sm);
76
+ color: var(--helix-color-foreground);
77
+ cursor: pointer;
78
+ display: inline-flex;
79
+ font-family: var(--helix-font-sans);
80
+ font-size: var(--helix-text-sm);
81
+ inline-size: var(--helix-size-control-sm);
82
+ justify-content: center;
83
+ padding: 0;
84
+ }
85
+
86
+ [part="controls"] button:hover {
87
+ background-color: var(--helix-color-surface-raised);
88
+ }
89
+
90
+ :host(:state(idle)) ::slotted([slot="header"]),
91
+ :host(:state(idle)) ::slotted([slot="footer"]) {
92
+ opacity: 0;
93
+ transition: opacity var(--helix-duration-fast) var(--helix-easing-standard);
94
+ }
95
+
96
+ ::slotted([slot="attribution"]) {
97
+ color: var(--helix-color-foreground-subtle);
98
+ font-size: var(--helix-text-xs);
99
+ padding: var(--helix-space-2xs) var(--helix-space-xs);
100
+ }
101
+
102
+ :host(:state(fullscreen)) [part="region"] {
103
+ block-size: 100dvh;
104
+ border: none;
105
+ border-radius: 0;
106
+ }
107
+
108
+ @media print {
109
+ [part="controls"] {
110
+ display: none;
111
+ }
112
+ }`);
@@ -0,0 +1,33 @@
1
+ import { HelixHeadlessMap } from '@fusion.dev/helix-headless/map';
2
+ import type { CSSResultGroup } from 'lit';
3
+ /**
4
+ * @summary A frame around somebody else's map.
5
+ *
6
+ * @description
7
+ * Presentation only: a bordered well with the controls over it, at the corner
8
+ * every map puts them. What the frame is for, and why the controls are buttons
9
+ * rather than arrow keys, is the base class.
10
+ *
11
+ * **The controls do not fade with the chrome.** A reader who has gone still has
12
+ * not stopped needing the only controls this frame offers, so the idle state
13
+ * takes the header and footer a consumer slotted and leaves the buttons alone.
14
+ *
15
+ * @since 0.100.0
16
+ * @status stable
17
+ * @category media
18
+ * @aliases Map frame, Map container, Geo
19
+ * @documentation https://fusion.dev/helix/components/map
20
+ *
21
+ * @cssproperty --map-background-color - The well behind the map, seen while tiles are on their way.
22
+ * @cssproperty --map-block-size - How tall the frame is. A length, since the map fills it.
23
+ * @cssproperty --map-border-color - Color of the frame's edge.
24
+ * @cssproperty --map-control-background-color - The ground under the pan and zoom buttons.
25
+ */
26
+ export declare class HelixMap extends HelixHeadlessMap {
27
+ static styles: CSSResultGroup;
28
+ }
29
+ declare global {
30
+ interface HTMLElementTagNameMap {
31
+ 'helix-map': HelixMap;
32
+ }
33
+ }
@@ -0,0 +1,16 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import { customElement } from '@fusion.dev/helix-core';
8
+ import { HelixHeadlessMap } from '@fusion.dev/helix-headless/map';
9
+ import { styles } from './map-root.css.js';
10
+ let HelixMap = class HelixMap extends HelixHeadlessMap {
11
+ static { this.styles = styles; }
12
+ };
13
+ HelixMap = __decorate([
14
+ customElement('helix-map')
15
+ ], HelixMap);
16
+ export { HelixMap };
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.101.0",
4
+ "version": "0.102.0",
5
5
  "license": "MIT",
6
6
  "author": "Ross Sheppard <ross.sheppard@fusion.dev>",
7
7
  "repository": {
@@ -47,13 +47,13 @@
47
47
  },
48
48
  "bugs": "https://github.com/project-fusion/fusion/issues",
49
49
  "dependencies": {
50
- "@fusion.dev/helix-core": "0.101.0",
51
- "@fusion.dev/helix-headless": "0.101.0",
52
- "@fusion.dev/helix-styles": "0.101.0"
50
+ "@fusion.dev/helix-core": "0.102.0",
51
+ "@fusion.dev/helix-headless": "0.102.0",
52
+ "@fusion.dev/helix-styles": "0.102.0"
53
53
  },
54
54
  "devDependencies": {
55
- "@fusion.dev/helix-cem": "0.101.0",
56
- "@fusion.dev/helix-testing": "0.101.0",
55
+ "@fusion.dev/helix-cem": "0.102.0",
56
+ "@fusion.dev/helix-testing": "0.102.0",
57
57
  "@fusion.dev/scripts": "0.0.0-dev",
58
58
  "@happy-dom/global-registrator": "^20.0.0",
59
59
  "@lit-labs/ssr": "^4.1.0",
package/types/jsx.d.ts CHANGED
@@ -89,6 +89,9 @@ import type {
89
89
  HelixListItem,
90
90
  HelixListbox,
91
91
  HelixLoader,
92
+ HelixMap,
93
+ HelixMapPanEvent,
94
+ HelixMapZoomEvent,
92
95
  HelixMegamenu,
93
96
  HelixMenu,
94
97
  HelixMenuItem,
@@ -11497,6 +11500,131 @@ around a logo reads as chrome bolted to the brand. */
11497
11500
  textContent?: (string | number) | undefined;
11498
11501
  };
11499
11502
 
11503
+ /** `HelixMap` component event */
11504
+ export type HelixMapElementEvent<E = Event> = TypedEvent<HelixMap, E>;
11505
+ /** `helix-map-pan` event type */
11506
+ export type HelixMapHelixMapPanElementEvent =
11507
+ HelixMapElementEvent<HelixMapPanEvent>;
11508
+ /** `helix-map-zoom` event type */
11509
+ export type HelixMapHelixMapZoomElementEvent =
11510
+ HelixMapElementEvent<HelixMapZoomEvent>;
11511
+
11512
+ export type HelixMapProps = {
11513
+ /** What the control that fills the screen is called. */
11514
+ "fullscreen-label"?: (HelixMap["fullscreenLabel"]) | undefined;
11515
+ /** What the control that fills the screen is called. */
11516
+ fullscreenLabel?: (HelixMap["fullscreenLabel"]) | undefined;
11517
+ /** How long the reader may be still before the chrome hides, in milliseconds.
11518
+
11519
+ Zero keeps it up, which is the default: a map's controls are how a keyboard
11520
+ reader operates it, and chrome that hides itself by default would be this
11521
+ component undoing its own argument. Set it for a display map nobody drives. */
11522
+ "idle-delay"?: (HelixMap["idleDelay"] | `${number}`) | undefined;
11523
+ /** How long the reader may be still before the chrome hides, in milliseconds.
11524
+
11525
+ Zero keeps it up, which is the default: a map's controls are how a keyboard
11526
+ reader operates it, and chrome that hides itself by default would be this
11527
+ component undoing its own argument. Set it for a display map nobody drives. */
11528
+ idleDelay?: (HelixMap["idleDelay"]) | undefined;
11529
+ /** Accessible name for the map, which is the one thing a consumer must write.
11530
+
11531
+ There is no sensible default. "Map" names the widget rather than the place,
11532
+ and a reader meeting three of them on a page learns nothing from hearing the
11533
+ same word three times. */
11534
+ label?: (HelixMap["label"]) | undefined;
11535
+ /** What the controls are called, for a page not in English. */
11536
+ "pan-label"?: (HelixMap["panLabel"]) | undefined;
11537
+ /** What the controls are called, for a page not in English. */
11538
+ panLabel?: (HelixMap["panLabel"]) | undefined;
11539
+ /** How far one press moves the map, as a fraction of what is on screen.
11540
+
11541
+ A fraction rather than a distance, because this frame does not know the
11542
+ scale of what is inside it: a quarter of the viewport is the same gesture at
11543
+ street level and at country level, and a consumer who wants metres can
11544
+ multiply by their own. */
11545
+ "pan-step"?: (HelixMap["panStep"] | `${number}`) | undefined;
11546
+ /** How far one press moves the map, as a fraction of what is on screen.
11547
+
11548
+ A fraction rather than a distance, because this frame does not know the
11549
+ scale of what is inside it: a quarter of the viewport is the same gesture at
11550
+ street level and at country level, and a consumer who wants metres can
11551
+ multiply by their own. */
11552
+ panStep?: (HelixMap["panStep"]) | undefined;
11553
+ /** What the zoom controls are called. */
11554
+ "zoom-in-label"?: (HelixMap["zoomInLabel"]) | undefined;
11555
+ /** What the zoom controls are called. */
11556
+ zoomInLabel?: (HelixMap["zoomInLabel"]) | undefined;
11557
+ /** What the zoom control that goes the other way is called. */
11558
+ "zoom-out-label"?: (HelixMap["zoomOutLabel"]) | undefined;
11559
+ /** What the zoom control that goes the other way is called. */
11560
+ zoomOutLabel?: (HelixMap["zoomOutLabel"]) | undefined;
11561
+
11562
+ /** The reader asked the map to move. Answer it against your own map. */
11563
+ "onhelix-map-pan"?: ((e: HelixMapHelixMapPanElementEvent) => void) | undefined;
11564
+ /** The reader asked the map to zoom, by a direction rather than to a level. */
11565
+ "onhelix-map-zoom"?: ((e: HelixMapHelixMapZoomElementEvent) => void) | undefined;
11566
+ };
11567
+
11568
+ export type HelixMapSolidJsProps = {
11569
+ /** What the control that fills the screen is called. */
11570
+ "attr:fullscreen-label"?: (HelixMap["fullscreenLabel"]) | undefined;
11571
+ /** What the control that fills the screen is called. */
11572
+ "prop:fullscreenLabel"?: (HelixMap["fullscreenLabel"]) | undefined;
11573
+ /** How long the reader may be still before the chrome hides, in milliseconds.
11574
+
11575
+ Zero keeps it up, which is the default: a map's controls are how a keyboard
11576
+ reader operates it, and chrome that hides itself by default would be this
11577
+ component undoing its own argument. Set it for a display map nobody drives. */
11578
+ "attr:idle-delay"?: (HelixMap["idleDelay"] | `${number}`) | undefined;
11579
+ /** How long the reader may be still before the chrome hides, in milliseconds.
11580
+
11581
+ Zero keeps it up, which is the default: a map's controls are how a keyboard
11582
+ reader operates it, and chrome that hides itself by default would be this
11583
+ component undoing its own argument. Set it for a display map nobody drives. */
11584
+ "prop:idleDelay"?: (HelixMap["idleDelay"]) | undefined;
11585
+ /** Accessible name for the map, which is the one thing a consumer must write.
11586
+
11587
+ There is no sensible default. "Map" names the widget rather than the place,
11588
+ and a reader meeting three of them on a page learns nothing from hearing the
11589
+ same word three times. */
11590
+ "prop:label"?: (HelixMap["label"]) | undefined;
11591
+ /** What the controls are called, for a page not in English. */
11592
+ "attr:pan-label"?: (HelixMap["panLabel"]) | undefined;
11593
+ /** What the controls are called, for a page not in English. */
11594
+ "prop:panLabel"?: (HelixMap["panLabel"]) | undefined;
11595
+ /** How far one press moves the map, as a fraction of what is on screen.
11596
+
11597
+ A fraction rather than a distance, because this frame does not know the
11598
+ scale of what is inside it: a quarter of the viewport is the same gesture at
11599
+ street level and at country level, and a consumer who wants metres can
11600
+ multiply by their own. */
11601
+ "attr:pan-step"?: (HelixMap["panStep"] | `${number}`) | undefined;
11602
+ /** How far one press moves the map, as a fraction of what is on screen.
11603
+
11604
+ A fraction rather than a distance, because this frame does not know the
11605
+ scale of what is inside it: a quarter of the viewport is the same gesture at
11606
+ street level and at country level, and a consumer who wants metres can
11607
+ multiply by their own. */
11608
+ "prop:panStep"?: (HelixMap["panStep"]) | undefined;
11609
+ /** What the zoom controls are called. */
11610
+ "attr:zoom-in-label"?: (HelixMap["zoomInLabel"]) | undefined;
11611
+ /** What the zoom controls are called. */
11612
+ "prop:zoomInLabel"?: (HelixMap["zoomInLabel"]) | undefined;
11613
+ /** What the zoom control that goes the other way is called. */
11614
+ "attr:zoom-out-label"?: (HelixMap["zoomOutLabel"]) | undefined;
11615
+ /** What the zoom control that goes the other way is called. */
11616
+ "prop:zoomOutLabel"?: (HelixMap["zoomOutLabel"]) | undefined;
11617
+ /** The reader asked the map to move. Answer it against your own map. */
11618
+ "on:helix-map-pan"?: ((e: HelixMapHelixMapPanElementEvent) => void) | undefined;
11619
+ /** The reader asked the map to zoom, by a direction rather than to a level. */
11620
+ "on:helix-map-zoom"?: ((e: HelixMapHelixMapZoomElementEvent) => void) | undefined;
11621
+
11622
+ /** Set the innerHTML of the element */
11623
+ innerHTML?: (string) | undefined;
11624
+ /** Set the textContent of the element */
11625
+ textContent?: (string | number) | undefined;
11626
+ };
11627
+
11500
11628
  /** `HelixMegamenu` component event */
11501
11629
  export type HelixMegamenuElementEvent<E = Event> = TypedEvent<HelixMegamenu, E>;
11502
11630
  /** `helix-before-close` event type */
@@ -31630,6 +31758,118 @@ export type CustomElements = {
31630
31758
  HelixLoaderProps & BaseProps<HelixLoader> & BaseEvents<HelixLoader>
31631
31759
  >;
31632
31760
 
31761
+ /**
31762
+ * Presentation only: a bordered well with the controls over it, at the corner
31763
+ * every map puts them. What the frame is for, and why the controls are buttons
31764
+ * rather than arrow keys, is the base class.
31765
+ *
31766
+ * **The controls do not fade with the chrome.** A reader who has gone still has
31767
+ * not stopped needing the only controls this frame offers, so the idle state
31768
+ * takes the header and footer a consumer slotted and leaves the buttons alone.
31769
+ *
31770
+ * ## Attributes & Properties
31771
+ *
31772
+ * Component attributes and properties that can be applied to the element or by using JavaScript.
31773
+ *
31774
+ * - `fullscreen-label`/`fullscreenLabel`: What the control that fills the screen is called.
31775
+ * - `idle-delay`/`idleDelay`: How long the reader may be still before the chrome hides, in milliseconds.
31776
+ *
31777
+ * Zero keeps it up, which is the default: a map's controls are how a keyboard
31778
+ * reader operates it, and chrome that hides itself by default would be this
31779
+ * component undoing its own argument. Set it for a display map nobody drives.
31780
+ * - `label`: Accessible name for the map, which is the one thing a consumer must write.
31781
+ *
31782
+ * There is no sensible default. "Map" names the widget rather than the place,
31783
+ * and a reader meeting three of them on a page learns nothing from hearing the
31784
+ * same word three times.
31785
+ * - `pan-label`/`panLabel`: What the controls are called, for a page not in English.
31786
+ * - `pan-step`/`panStep`: How far one press moves the map, as a fraction of what is on screen.
31787
+ *
31788
+ * A fraction rather than a distance, because this frame does not know the
31789
+ * scale of what is inside it: a quarter of the viewport is the same gesture at
31790
+ * street level and at country level, and a consumer who wants metres can
31791
+ * multiply by their own.
31792
+ * - `zoom-in-label`/`zoomInLabel`: What the zoom controls are called.
31793
+ * - `zoom-out-label`/`zoomOutLabel`: What the zoom control that goes the other way is called.
31794
+ * - `whenSettled`: Resolves a frame after the first update, when transitions are switched on.
31795
+ *
31796
+ * **Named `whenSettled` because `settled` is taken four times over**, by
31797
+ * Image, Splitter and both color controls, none of them about transitions. A
31798
+ * base class takes the name every subclass then cannot use.
31799
+ *
31800
+ * **The state it reports cannot be watched, which is why this exists.** A
31801
+ * custom state is deliberately not in the DOM, so there is no
31802
+ * `MutationObserver` equivalent for `ElementInternals.states`. Await this
31803
+ * instead.
31804
+ *
31805
+ * Separate from `updateComplete`, which resolves in the microtask checkpoint
31806
+ * the suppression is still active in. That is the distinction `readyToMove`
31807
+ * in `@fusion.dev/helix-testing` is written around.
31808
+ *
31809
+ * It never resolves where `requestAnimationFrame` never fires, which is a
31810
+ * server, a hidden tab, and happy-dom. Callers that must not hang there race
31811
+ * it against a timeout, as the happy-dom harness's `readyToMove` does. The
31812
+ * browser harness's awaits it alone: a browser always runs the frame, and a
31813
+ * timer beside it was a bet on how long one takes, which a busy run lost. (property only) (readonly)
31814
+ *
31815
+ * ## Events
31816
+ *
31817
+ * Events that will be emitted by the component.
31818
+ *
31819
+ * - `helix-map-pan`: The reader asked the map to move. Answer it against your own map.
31820
+ * - `helix-map-zoom`: The reader asked the map to zoom, by a direction rather than to a level.
31821
+ *
31822
+ * ## Slots
31823
+ *
31824
+ * Areas where markup can be added to the component.
31825
+ *
31826
+ * - `(default)`: The map, which is the consumer's own.
31827
+ * - `attribution`: Whoever the tiles belong to, which most licenses require you to say.
31828
+ * - `footer`: Chrome below the map, such as a legend or a scale.
31829
+ * - `header`: Chrome above the map, such as a title or a search field.
31830
+ *
31831
+ * ## Methods
31832
+ *
31833
+ * Methods that can be called to access component functionality.
31834
+ *
31835
+ * - `toggleFullscreen() => void`: Fills the screen with the frame, or comes back.
31836
+ * - `pan(to: Way) => void`: Asks for the map to move, which the consumer answers.
31837
+ * - `zoom(by: number) => void`: Asks for the map to zoom, `1` in and `-1` out.
31838
+ *
31839
+ * ## CSS Custom Properties
31840
+ *
31841
+ * CSS variables available for styling the component.
31842
+ *
31843
+ * - `--map-background-color`: The well behind the map, seen while tiles are on their way. (default: `undefined`)
31844
+ * - `--map-block-size`: How tall the frame is. A length, since the map fills it. (default: `undefined`)
31845
+ * - `--map-border-color`: Color of the frame's edge. (default: `undefined`)
31846
+ * - `--map-control-background-color`: The ground under the pan and zoom buttons. (default: `undefined`)
31847
+ *
31848
+ * ## CSS Parts
31849
+ *
31850
+ * Custom selectors for styling elements within the component.
31851
+ *
31852
+ * - `controls`: The group the pan and zoom buttons sit in.
31853
+ * - `fullscreen`: The button that fills the screen.
31854
+ * - `pan-down`: The button that moves the map down.
31855
+ * - `pan-end`: The button that moves the map the way the text ends, which is right on an English page.
31856
+ * - `pan-start`: The button that moves the map the way the text starts, which is left on an English page.
31857
+ * - `pan-up`: The button that moves the map up.
31858
+ * - `region`: The named region the map is slotted into.
31859
+ * - `viewport`: The box the map is drawn in.
31860
+ * - `zoom-in`: The button that zooms in.
31861
+ * - `zoom-out`: The button that zooms out.
31862
+ *
31863
+ * ## CSS States
31864
+ *
31865
+ * These can be used to apply styling when a component is in a given state.
31866
+ *
31867
+ * - `fullscreen`: While the frame fills the screen.
31868
+ * - `idle`: While the reader has been still long enough to hide the chrome.
31869
+ * - `settled`: Set a frame after the first render. Transitions are held off until it is, so an element never animates its own arrival.
31870
+ */
31871
+ "helix-map": Partial<HelixMapProps & BaseProps<HelixMap> & BaseEvents<HelixMap>>;
31872
+
31633
31873
  /**
31634
31874
  * Presentation only: the trigger, and the panel it opens as a grid of columns.
31635
31875
  * Everything about what opens it and what closes it is the base class.
@@ -51717,6 +51957,120 @@ export type CustomElementsSolidJs = {
51717
51957
  BaseEvents<HelixLoader>
51718
51958
  >;
51719
51959
 
51960
+ /**
51961
+ * Presentation only: a bordered well with the controls over it, at the corner
51962
+ * every map puts them. What the frame is for, and why the controls are buttons
51963
+ * rather than arrow keys, is the base class.
51964
+ *
51965
+ * **The controls do not fade with the chrome.** A reader who has gone still has
51966
+ * not stopped needing the only controls this frame offers, so the idle state
51967
+ * takes the header and footer a consumer slotted and leaves the buttons alone.
51968
+ *
51969
+ * ## Attributes & Properties
51970
+ *
51971
+ * Component attributes and properties that can be applied to the element or by using JavaScript.
51972
+ *
51973
+ * - `fullscreen-label`/`fullscreenLabel`: What the control that fills the screen is called.
51974
+ * - `idle-delay`/`idleDelay`: How long the reader may be still before the chrome hides, in milliseconds.
51975
+ *
51976
+ * Zero keeps it up, which is the default: a map's controls are how a keyboard
51977
+ * reader operates it, and chrome that hides itself by default would be this
51978
+ * component undoing its own argument. Set it for a display map nobody drives.
51979
+ * - `label`: Accessible name for the map, which is the one thing a consumer must write.
51980
+ *
51981
+ * There is no sensible default. "Map" names the widget rather than the place,
51982
+ * and a reader meeting three of them on a page learns nothing from hearing the
51983
+ * same word three times.
51984
+ * - `pan-label`/`panLabel`: What the controls are called, for a page not in English.
51985
+ * - `pan-step`/`panStep`: How far one press moves the map, as a fraction of what is on screen.
51986
+ *
51987
+ * A fraction rather than a distance, because this frame does not know the
51988
+ * scale of what is inside it: a quarter of the viewport is the same gesture at
51989
+ * street level and at country level, and a consumer who wants metres can
51990
+ * multiply by their own.
51991
+ * - `zoom-in-label`/`zoomInLabel`: What the zoom controls are called.
51992
+ * - `zoom-out-label`/`zoomOutLabel`: What the zoom control that goes the other way is called.
51993
+ * - `whenSettled`: Resolves a frame after the first update, when transitions are switched on.
51994
+ *
51995
+ * **Named `whenSettled` because `settled` is taken four times over**, by
51996
+ * Image, Splitter and both color controls, none of them about transitions. A
51997
+ * base class takes the name every subclass then cannot use.
51998
+ *
51999
+ * **The state it reports cannot be watched, which is why this exists.** A
52000
+ * custom state is deliberately not in the DOM, so there is no
52001
+ * `MutationObserver` equivalent for `ElementInternals.states`. Await this
52002
+ * instead.
52003
+ *
52004
+ * Separate from `updateComplete`, which resolves in the microtask checkpoint
52005
+ * the suppression is still active in. That is the distinction `readyToMove`
52006
+ * in `@fusion.dev/helix-testing` is written around.
52007
+ *
52008
+ * It never resolves where `requestAnimationFrame` never fires, which is a
52009
+ * server, a hidden tab, and happy-dom. Callers that must not hang there race
52010
+ * it against a timeout, as the happy-dom harness's `readyToMove` does. The
52011
+ * browser harness's awaits it alone: a browser always runs the frame, and a
52012
+ * timer beside it was a bet on how long one takes, which a busy run lost. (property only) (readonly)
52013
+ *
52014
+ * ## Events
52015
+ *
52016
+ * Events that will be emitted by the component.
52017
+ *
52018
+ * - `helix-map-pan`: The reader asked the map to move. Answer it against your own map.
52019
+ * - `helix-map-zoom`: The reader asked the map to zoom, by a direction rather than to a level.
52020
+ *
52021
+ * ## Slots
52022
+ *
52023
+ * Areas where markup can be added to the component.
52024
+ *
52025
+ * - `(default)`: The map, which is the consumer's own.
52026
+ * - `attribution`: Whoever the tiles belong to, which most licenses require you to say.
52027
+ * - `footer`: Chrome below the map, such as a legend or a scale.
52028
+ * - `header`: Chrome above the map, such as a title or a search field.
52029
+ *
52030
+ * ## Methods
52031
+ *
52032
+ * Methods that can be called to access component functionality.
52033
+ *
52034
+ * - `toggleFullscreen() => void`: Fills the screen with the frame, or comes back.
52035
+ * - `pan(to: Way) => void`: Asks for the map to move, which the consumer answers.
52036
+ * - `zoom(by: number) => void`: Asks for the map to zoom, `1` in and `-1` out.
52037
+ *
52038
+ * ## CSS Custom Properties
52039
+ *
52040
+ * CSS variables available for styling the component.
52041
+ *
52042
+ * - `--map-background-color`: The well behind the map, seen while tiles are on their way. (default: `undefined`)
52043
+ * - `--map-block-size`: How tall the frame is. A length, since the map fills it. (default: `undefined`)
52044
+ * - `--map-border-color`: Color of the frame's edge. (default: `undefined`)
52045
+ * - `--map-control-background-color`: The ground under the pan and zoom buttons. (default: `undefined`)
52046
+ *
52047
+ * ## CSS Parts
52048
+ *
52049
+ * Custom selectors for styling elements within the component.
52050
+ *
52051
+ * - `controls`: The group the pan and zoom buttons sit in.
52052
+ * - `fullscreen`: The button that fills the screen.
52053
+ * - `pan-down`: The button that moves the map down.
52054
+ * - `pan-end`: The button that moves the map the way the text ends, which is right on an English page.
52055
+ * - `pan-start`: The button that moves the map the way the text starts, which is left on an English page.
52056
+ * - `pan-up`: The button that moves the map up.
52057
+ * - `region`: The named region the map is slotted into.
52058
+ * - `viewport`: The box the map is drawn in.
52059
+ * - `zoom-in`: The button that zooms in.
52060
+ * - `zoom-out`: The button that zooms out.
52061
+ *
52062
+ * ## CSS States
52063
+ *
52064
+ * These can be used to apply styling when a component is in a given state.
52065
+ *
52066
+ * - `fullscreen`: While the frame fills the screen.
52067
+ * - `idle`: While the reader has been still long enough to hide the chrome.
52068
+ * - `settled`: Set a frame after the first render. Transitions are held off until it is, so an element never animates its own arrival.
52069
+ */
52070
+ "helix-map": Partial<
52071
+ HelixMapProps & HelixMapSolidJsProps & BaseProps<HelixMap> & BaseEvents<HelixMap>
52072
+ >;
52073
+
51720
52074
  /**
51721
52075
  * Presentation only: the trigger, and the panel it opens as a grid of columns.
51722
52076
  * Everything about what opens it and what closes it is the base class.
@@ -62432,6 +62786,14 @@ export type CustomCssProperties = {
62432
62786
  "--loader-size"?: (string) | undefined;
62433
62787
  /** Color of the circle behind it. */
62434
62788
  "--loader-track-color"?: (string) | undefined;
62789
+ /** The well behind the map, seen while tiles are on their way. */
62790
+ "--map-background-color"?: (string) | undefined;
62791
+ /** How tall the frame is. A length, since the map fills it. */
62792
+ "--map-block-size"?: (string) | undefined;
62793
+ /** Color of the frame's edge. */
62794
+ "--map-border-color"?: (string) | undefined;
62795
+ /** The ground under the pan and zoom buttons. */
62796
+ "--map-control-background-color"?: (string) | undefined;
62435
62797
  /** A filter behind the panel, which is `none` until one is asked for: this family carries no `material`, so the pair is two hooks rather than a word. */
62436
62798
  "--megamenu-backdrop"?: (string) | undefined;
62437
62799
  /** The panel's own fill. */
package/types/svelte.d.ts CHANGED
@@ -72,6 +72,7 @@ declare module 'svelte/elements' {
72
72
  'helix-list': CustomElements['helix-list']
73
73
  'helix-listbox': CustomElements['helix-listbox']
74
74
  'helix-loader': CustomElements['helix-loader']
75
+ 'helix-map': CustomElements['helix-map']
75
76
  'helix-megamenu': CustomElements['helix-megamenu']
76
77
  'helix-menu-item': CustomElements['helix-menu-item']
77
78
  'helix-menu': CustomElements['helix-menu']