@fusion.dev/helix 0.101.0 → 0.103.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/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,233 @@ 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
+ /** Which of the controls this frame draws, as a list of what to keep.
11514
+
11515
+ **A list rather than a switch, because the overlap is not symmetric.**
11516
+ Every map library draws zoom controls and none of them draws pan buttons:
11517
+ MapLibre's navigation control is zoom and a compass, Leaflet's is zoom,
11518
+ Google's is zoom. So a consumer slotting one of those has our zoom twice
11519
+ over and our pan pad not at all, and a single switch would make them choose
11520
+ between a duplicate and nothing.
11521
+
11522
+ `none` draws none of them, which is the right answer where the slotted map
11523
+ already has controls a reader can find: what this family argues for is that
11524
+ *a* findable control exists, never that it is ours. The methods stay public
11525
+ either way, so a consumer drawing their own chrome can still drive the
11526
+ frame.
11527
+
11528
+ Absent is all three, which is this library's rule that a resting value is an
11529
+ attribute's absence, and it is what the stylesheet asks about: the layout
11530
+ rules are written against `[controls]:not([controls~="zoom"])` rather than
11531
+ the bare negation, or a frame that named no list at all would be laid out as
11532
+ though it had dropped everything. */
11533
+ controls?: (HelixMap["controls"]) | undefined;
11534
+ /** Which corner the controls sit in.
11535
+
11536
+ **Configurable because there is no safe default**, and this is a collision
11537
+ rather than a taste: MapLibre puts its own controls at the top end, Leaflet
11538
+ and OpenLayers at the top start, Google's zoom at the bottom end. Whichever
11539
+ corner this took would land on somebody's, which is why every one of those
11540
+ libraries made it a setting too.
11541
+
11542
+ Logical corners rather than left and right, so a right-to-left page moves
11543
+ them without a consumer writing a second rule.
11544
+
11545
+ Absent is the top end, which is this library's rule that a resting value is
11546
+ an attribute's absence: a default that reflected would write an attribute
11547
+ onto every host that no server sent and nobody asked for. */
11548
+ "controls-placement"?: (HelixMap["controlsPlacement"]) | undefined;
11549
+ /** Which corner the controls sit in.
11550
+
11551
+ **Configurable because there is no safe default**, and this is a collision
11552
+ rather than a taste: MapLibre puts its own controls at the top end, Leaflet
11553
+ and OpenLayers at the top start, Google's zoom at the bottom end. Whichever
11554
+ corner this took would land on somebody's, which is why every one of those
11555
+ libraries made it a setting too.
11556
+
11557
+ Logical corners rather than left and right, so a right-to-left page moves
11558
+ them without a consumer writing a second rule.
11559
+
11560
+ Absent is the top end, which is this library's rule that a resting value is
11561
+ an attribute's absence: a default that reflected would write an attribute
11562
+ onto every host that no server sent and nobody asked for. */
11563
+ controlsPlacement?: (HelixMap["controlsPlacement"]) | undefined;
11564
+ /** What the control that fills the screen is called. */
11565
+ "fullscreen-label"?: (HelixMap["fullscreenLabel"]) | undefined;
11566
+ /** What the control that fills the screen is called. */
11567
+ fullscreenLabel?: (HelixMap["fullscreenLabel"]) | undefined;
11568
+ /** How long the reader may be still before the chrome hides, in milliseconds.
11569
+
11570
+ Zero keeps it up, which is the default: a map's controls are how a keyboard
11571
+ reader operates it, and chrome that hides itself by default would be this
11572
+ component undoing its own argument. Set it for a display map nobody drives. */
11573
+ "idle-delay"?: (HelixMap["idleDelay"] | `${number}`) | undefined;
11574
+ /** How long the reader may be still before the chrome hides, in milliseconds.
11575
+
11576
+ Zero keeps it up, which is the default: a map's controls are how a keyboard
11577
+ reader operates it, and chrome that hides itself by default would be this
11578
+ component undoing its own argument. Set it for a display map nobody drives. */
11579
+ idleDelay?: (HelixMap["idleDelay"]) | undefined;
11580
+ /** Accessible name for the map, which is the one thing a consumer must write.
11581
+
11582
+ There is no sensible default. "Map" names the widget rather than the place,
11583
+ and a reader meeting three of them on a page learns nothing from hearing the
11584
+ same word three times. */
11585
+ label?: (HelixMap["label"]) | undefined;
11586
+ /** What the controls are called, for a page not in English. */
11587
+ "pan-label"?: (HelixMap["panLabel"]) | undefined;
11588
+ /** What the controls are called, for a page not in English. */
11589
+ panLabel?: (HelixMap["panLabel"]) | undefined;
11590
+ /** How far one press moves the map, as a fraction of what is on screen.
11591
+
11592
+ A fraction rather than a distance, because this frame does not know the
11593
+ scale of what is inside it: a quarter of the viewport is the same gesture at
11594
+ street level and at country level, and a consumer who wants metres can
11595
+ multiply by their own. */
11596
+ "pan-step"?: (HelixMap["panStep"] | `${number}`) | undefined;
11597
+ /** How far one press moves the map, as a fraction of what is on screen.
11598
+
11599
+ A fraction rather than a distance, because this frame does not know the
11600
+ scale of what is inside it: a quarter of the viewport is the same gesture at
11601
+ street level and at country level, and a consumer who wants metres can
11602
+ multiply by their own. */
11603
+ panStep?: (HelixMap["panStep"]) | undefined;
11604
+ /** What the zoom controls are called. */
11605
+ "zoom-in-label"?: (HelixMap["zoomInLabel"]) | undefined;
11606
+ /** What the zoom controls are called. */
11607
+ zoomInLabel?: (HelixMap["zoomInLabel"]) | undefined;
11608
+ /** What the zoom control that goes the other way is called. */
11609
+ "zoom-out-label"?: (HelixMap["zoomOutLabel"]) | undefined;
11610
+ /** What the zoom control that goes the other way is called. */
11611
+ zoomOutLabel?: (HelixMap["zoomOutLabel"]) | undefined;
11612
+
11613
+ /** The reader asked the map to move. Answer it against your own map. */
11614
+ "onhelix-map-pan"?: ((e: HelixMapHelixMapPanElementEvent) => void) | undefined;
11615
+ /** The reader asked the map to zoom, by a direction rather than to a level. */
11616
+ "onhelix-map-zoom"?: ((e: HelixMapHelixMapZoomElementEvent) => void) | undefined;
11617
+ };
11618
+
11619
+ export type HelixMapSolidJsProps = {
11620
+ /** Which of the controls this frame draws, as a list of what to keep.
11621
+
11622
+ **A list rather than a switch, because the overlap is not symmetric.**
11623
+ Every map library draws zoom controls and none of them draws pan buttons:
11624
+ MapLibre's navigation control is zoom and a compass, Leaflet's is zoom,
11625
+ Google's is zoom. So a consumer slotting one of those has our zoom twice
11626
+ over and our pan pad not at all, and a single switch would make them choose
11627
+ between a duplicate and nothing.
11628
+
11629
+ `none` draws none of them, which is the right answer where the slotted map
11630
+ already has controls a reader can find: what this family argues for is that
11631
+ *a* findable control exists, never that it is ours. The methods stay public
11632
+ either way, so a consumer drawing their own chrome can still drive the
11633
+ frame.
11634
+
11635
+ Absent is all three, which is this library's rule that a resting value is an
11636
+ attribute's absence, and it is what the stylesheet asks about: the layout
11637
+ rules are written against `[controls]:not([controls~="zoom"])` rather than
11638
+ the bare negation, or a frame that named no list at all would be laid out as
11639
+ though it had dropped everything. */
11640
+ "prop:controls"?: (HelixMap["controls"]) | undefined;
11641
+ /** Which corner the controls sit in.
11642
+
11643
+ **Configurable because there is no safe default**, and this is a collision
11644
+ rather than a taste: MapLibre puts its own controls at the top end, Leaflet
11645
+ and OpenLayers at the top start, Google's zoom at the bottom end. Whichever
11646
+ corner this took would land on somebody's, which is why every one of those
11647
+ libraries made it a setting too.
11648
+
11649
+ Logical corners rather than left and right, so a right-to-left page moves
11650
+ them without a consumer writing a second rule.
11651
+
11652
+ Absent is the top end, which is this library's rule that a resting value is
11653
+ an attribute's absence: a default that reflected would write an attribute
11654
+ onto every host that no server sent and nobody asked for. */
11655
+ "attr:controls-placement"?: (HelixMap["controlsPlacement"]) | undefined;
11656
+ /** Which corner the controls sit in.
11657
+
11658
+ **Configurable because there is no safe default**, and this is a collision
11659
+ rather than a taste: MapLibre puts its own controls at the top end, Leaflet
11660
+ and OpenLayers at the top start, Google's zoom at the bottom end. Whichever
11661
+ corner this took would land on somebody's, which is why every one of those
11662
+ libraries made it a setting too.
11663
+
11664
+ Logical corners rather than left and right, so a right-to-left page moves
11665
+ them without a consumer writing a second rule.
11666
+
11667
+ Absent is the top end, which is this library's rule that a resting value is
11668
+ an attribute's absence: a default that reflected would write an attribute
11669
+ onto every host that no server sent and nobody asked for. */
11670
+ "prop:controlsPlacement"?: (HelixMap["controlsPlacement"]) | undefined;
11671
+ /** What the control that fills the screen is called. */
11672
+ "attr:fullscreen-label"?: (HelixMap["fullscreenLabel"]) | undefined;
11673
+ /** What the control that fills the screen is called. */
11674
+ "prop:fullscreenLabel"?: (HelixMap["fullscreenLabel"]) | undefined;
11675
+ /** How long the reader may be still before the chrome hides, in milliseconds.
11676
+
11677
+ Zero keeps it up, which is the default: a map's controls are how a keyboard
11678
+ reader operates it, and chrome that hides itself by default would be this
11679
+ component undoing its own argument. Set it for a display map nobody drives. */
11680
+ "attr:idle-delay"?: (HelixMap["idleDelay"] | `${number}`) | undefined;
11681
+ /** How long the reader may be still before the chrome hides, in milliseconds.
11682
+
11683
+ Zero keeps it up, which is the default: a map's controls are how a keyboard
11684
+ reader operates it, and chrome that hides itself by default would be this
11685
+ component undoing its own argument. Set it for a display map nobody drives. */
11686
+ "prop:idleDelay"?: (HelixMap["idleDelay"]) | undefined;
11687
+ /** Accessible name for the map, which is the one thing a consumer must write.
11688
+
11689
+ There is no sensible default. "Map" names the widget rather than the place,
11690
+ and a reader meeting three of them on a page learns nothing from hearing the
11691
+ same word three times. */
11692
+ "prop:label"?: (HelixMap["label"]) | undefined;
11693
+ /** What the controls are called, for a page not in English. */
11694
+ "attr:pan-label"?: (HelixMap["panLabel"]) | undefined;
11695
+ /** What the controls are called, for a page not in English. */
11696
+ "prop:panLabel"?: (HelixMap["panLabel"]) | undefined;
11697
+ /** How far one press moves the map, as a fraction of what is on screen.
11698
+
11699
+ A fraction rather than a distance, because this frame does not know the
11700
+ scale of what is inside it: a quarter of the viewport is the same gesture at
11701
+ street level and at country level, and a consumer who wants metres can
11702
+ multiply by their own. */
11703
+ "attr:pan-step"?: (HelixMap["panStep"] | `${number}`) | undefined;
11704
+ /** How far one press moves the map, as a fraction of what is on screen.
11705
+
11706
+ A fraction rather than a distance, because this frame does not know the
11707
+ scale of what is inside it: a quarter of the viewport is the same gesture at
11708
+ street level and at country level, and a consumer who wants metres can
11709
+ multiply by their own. */
11710
+ "prop:panStep"?: (HelixMap["panStep"]) | undefined;
11711
+ /** What the zoom controls are called. */
11712
+ "attr:zoom-in-label"?: (HelixMap["zoomInLabel"]) | undefined;
11713
+ /** What the zoom controls are called. */
11714
+ "prop:zoomInLabel"?: (HelixMap["zoomInLabel"]) | undefined;
11715
+ /** What the zoom control that goes the other way is called. */
11716
+ "attr:zoom-out-label"?: (HelixMap["zoomOutLabel"]) | undefined;
11717
+ /** What the zoom control that goes the other way is called. */
11718
+ "prop:zoomOutLabel"?: (HelixMap["zoomOutLabel"]) | undefined;
11719
+ /** The reader asked the map to move. Answer it against your own map. */
11720
+ "on:helix-map-pan"?: ((e: HelixMapHelixMapPanElementEvent) => void) | undefined;
11721
+ /** The reader asked the map to zoom, by a direction rather than to a level. */
11722
+ "on:helix-map-zoom"?: ((e: HelixMapHelixMapZoomElementEvent) => void) | undefined;
11723
+
11724
+ /** Set the innerHTML of the element */
11725
+ innerHTML?: (string) | undefined;
11726
+ /** Set the textContent of the element */
11727
+ textContent?: (string | number) | undefined;
11728
+ };
11729
+
11500
11730
  /** `HelixMegamenu` component event */
11501
11731
  export type HelixMegamenuElementEvent<E = Event> = TypedEvent<HelixMegamenu, E>;
11502
11732
  /** `helix-before-close` event type */
@@ -31630,6 +31860,152 @@ export type CustomElements = {
31630
31860
  HelixLoaderProps & BaseProps<HelixLoader> & BaseEvents<HelixLoader>
31631
31861
  >;
31632
31862
 
31863
+ /**
31864
+ * Presentation only: a bordered well with the controls over it, at the corner
31865
+ * every map puts them. What the frame is for, and why the controls are buttons
31866
+ * rather than arrow keys, is the base class.
31867
+ *
31868
+ * **The controls do not fade with the chrome.** A reader who has gone still has
31869
+ * not stopped needing the only controls this frame offers, so the idle state
31870
+ * takes the header and footer a consumer slotted and leaves the buttons alone.
31871
+ *
31872
+ * ## Attributes & Properties
31873
+ *
31874
+ * Component attributes and properties that can be applied to the element or by using JavaScript.
31875
+ *
31876
+ * - `controls`: Which of the controls this frame draws, as a list of what to keep.
31877
+ *
31878
+ * **A list rather than a switch, because the overlap is not symmetric.**
31879
+ * Every map library draws zoom controls and none of them draws pan buttons:
31880
+ * MapLibre's navigation control is zoom and a compass, Leaflet's is zoom,
31881
+ * Google's is zoom. So a consumer slotting one of those has our zoom twice
31882
+ * over and our pan pad not at all, and a single switch would make them choose
31883
+ * between a duplicate and nothing.
31884
+ *
31885
+ * `none` draws none of them, which is the right answer where the slotted map
31886
+ * already has controls a reader can find: what this family argues for is that
31887
+ * *a* findable control exists, never that it is ours. The methods stay public
31888
+ * either way, so a consumer drawing their own chrome can still drive the
31889
+ * frame.
31890
+ *
31891
+ * Absent is all three, which is this library's rule that a resting value is an
31892
+ * attribute's absence, and it is what the stylesheet asks about: the layout
31893
+ * rules are written against `[controls]:not([controls~="zoom"])` rather than
31894
+ * the bare negation, or a frame that named no list at all would be laid out as
31895
+ * though it had dropped everything.
31896
+ * - `controls-placement`/`controlsPlacement`: Which corner the controls sit in.
31897
+ *
31898
+ * **Configurable because there is no safe default**, and this is a collision
31899
+ * rather than a taste: MapLibre puts its own controls at the top end, Leaflet
31900
+ * and OpenLayers at the top start, Google's zoom at the bottom end. Whichever
31901
+ * corner this took would land on somebody's, which is why every one of those
31902
+ * libraries made it a setting too.
31903
+ *
31904
+ * Logical corners rather than left and right, so a right-to-left page moves
31905
+ * them without a consumer writing a second rule.
31906
+ *
31907
+ * Absent is the top end, which is this library's rule that a resting value is
31908
+ * an attribute's absence: a default that reflected would write an attribute
31909
+ * onto every host that no server sent and nobody asked for.
31910
+ * - `fullscreen-label`/`fullscreenLabel`: What the control that fills the screen is called.
31911
+ * - `idle-delay`/`idleDelay`: How long the reader may be still before the chrome hides, in milliseconds.
31912
+ *
31913
+ * Zero keeps it up, which is the default: a map's controls are how a keyboard
31914
+ * reader operates it, and chrome that hides itself by default would be this
31915
+ * component undoing its own argument. Set it for a display map nobody drives.
31916
+ * - `label`: Accessible name for the map, which is the one thing a consumer must write.
31917
+ *
31918
+ * There is no sensible default. "Map" names the widget rather than the place,
31919
+ * and a reader meeting three of them on a page learns nothing from hearing the
31920
+ * same word three times.
31921
+ * - `pan-label`/`panLabel`: What the controls are called, for a page not in English.
31922
+ * - `pan-step`/`panStep`: How far one press moves the map, as a fraction of what is on screen.
31923
+ *
31924
+ * A fraction rather than a distance, because this frame does not know the
31925
+ * scale of what is inside it: a quarter of the viewport is the same gesture at
31926
+ * street level and at country level, and a consumer who wants metres can
31927
+ * multiply by their own.
31928
+ * - `zoom-in-label`/`zoomInLabel`: What the zoom controls are called.
31929
+ * - `zoom-out-label`/`zoomOutLabel`: What the zoom control that goes the other way is called.
31930
+ * - `whenSettled`: Resolves a frame after the first update, when transitions are switched on.
31931
+ *
31932
+ * **Named `whenSettled` because `settled` is taken four times over**, by
31933
+ * Image, Splitter and both color controls, none of them about transitions. A
31934
+ * base class takes the name every subclass then cannot use.
31935
+ *
31936
+ * **The state it reports cannot be watched, which is why this exists.** A
31937
+ * custom state is deliberately not in the DOM, so there is no
31938
+ * `MutationObserver` equivalent for `ElementInternals.states`. Await this
31939
+ * instead.
31940
+ *
31941
+ * Separate from `updateComplete`, which resolves in the microtask checkpoint
31942
+ * the suppression is still active in. That is the distinction `readyToMove`
31943
+ * in `@fusion.dev/helix-testing` is written around.
31944
+ *
31945
+ * It never resolves where `requestAnimationFrame` never fires, which is a
31946
+ * server, a hidden tab, and happy-dom. Callers that must not hang there race
31947
+ * it against a timeout, as the happy-dom harness's `readyToMove` does. The
31948
+ * browser harness's awaits it alone: a browser always runs the frame, and a
31949
+ * timer beside it was a bet on how long one takes, which a busy run lost. (property only) (readonly)
31950
+ *
31951
+ * ## Events
31952
+ *
31953
+ * Events that will be emitted by the component.
31954
+ *
31955
+ * - `helix-map-pan`: The reader asked the map to move. Answer it against your own map.
31956
+ * - `helix-map-zoom`: The reader asked the map to zoom, by a direction rather than to a level.
31957
+ *
31958
+ * ## Slots
31959
+ *
31960
+ * Areas where markup can be added to the component.
31961
+ *
31962
+ * - `(default)`: The map, which is the consumer's own.
31963
+ * - `attribution`: Whoever the tiles belong to, which most licenses require you to say.
31964
+ * - `footer`: Chrome below the map, such as a legend or a scale.
31965
+ * - `header`: Chrome above the map, such as a title or a search field.
31966
+ *
31967
+ * ## Methods
31968
+ *
31969
+ * Methods that can be called to access component functionality.
31970
+ *
31971
+ * - `toggleFullscreen() => void`: Fills the screen with the frame, or comes back.
31972
+ * - `pan(to: Way) => void`: Asks for the map to move, which the consumer answers.
31973
+ * - `zoom(by: number) => void`: Asks for the map to zoom, `1` in and `-1` out.
31974
+ *
31975
+ * ## CSS Custom Properties
31976
+ *
31977
+ * CSS variables available for styling the component.
31978
+ *
31979
+ * - `--map-background-color`: The well behind the map, seen while tiles are on their way. (default: `undefined`)
31980
+ * - `--map-block-size`: How tall the frame is. A length, since the map fills it. (default: `undefined`)
31981
+ * - `--map-border-color`: Color of the frame's edge. (default: `undefined`)
31982
+ * - `--map-control-background-color`: The ground under the pan and zoom buttons. (default: `undefined`)
31983
+ *
31984
+ * ## CSS Parts
31985
+ *
31986
+ * Custom selectors for styling elements within the component.
31987
+ *
31988
+ * - `controls`: The group the pan and zoom buttons sit in.
31989
+ * - `fullscreen`: The button that fills the screen.
31990
+ * - `pan-down`: The button that moves the map down.
31991
+ * - `pan-end`: The button that moves the map the way the text ends, which is right on an English page.
31992
+ * - `pan-start`: The button that moves the map the way the text starts, which is left on an English page.
31993
+ * - `pan-up`: The button that moves the map up.
31994
+ * - `region`: The named region the map is slotted into.
31995
+ * - `viewport`: The box the map is drawn in.
31996
+ * - `zoom-in`: The button that zooms in.
31997
+ * - `zoom-out`: The button that zooms out.
31998
+ *
31999
+ * ## CSS States
32000
+ *
32001
+ * These can be used to apply styling when a component is in a given state.
32002
+ *
32003
+ * - `fullscreen`: While the frame fills the screen.
32004
+ * - `idle`: While the reader has been still long enough to hide the chrome.
32005
+ * - `settled`: Set a frame after the first render. Transitions are held off until it is, so an element never animates its own arrival.
32006
+ */
32007
+ "helix-map": Partial<HelixMapProps & BaseProps<HelixMap> & BaseEvents<HelixMap>>;
32008
+
31633
32009
  /**
31634
32010
  * Presentation only: the trigger, and the panel it opens as a grid of columns.
31635
32011
  * Everything about what opens it and what closes it is the base class.
@@ -51717,6 +52093,154 @@ export type CustomElementsSolidJs = {
51717
52093
  BaseEvents<HelixLoader>
51718
52094
  >;
51719
52095
 
52096
+ /**
52097
+ * Presentation only: a bordered well with the controls over it, at the corner
52098
+ * every map puts them. What the frame is for, and why the controls are buttons
52099
+ * rather than arrow keys, is the base class.
52100
+ *
52101
+ * **The controls do not fade with the chrome.** A reader who has gone still has
52102
+ * not stopped needing the only controls this frame offers, so the idle state
52103
+ * takes the header and footer a consumer slotted and leaves the buttons alone.
52104
+ *
52105
+ * ## Attributes & Properties
52106
+ *
52107
+ * Component attributes and properties that can be applied to the element or by using JavaScript.
52108
+ *
52109
+ * - `controls`: Which of the controls this frame draws, as a list of what to keep.
52110
+ *
52111
+ * **A list rather than a switch, because the overlap is not symmetric.**
52112
+ * Every map library draws zoom controls and none of them draws pan buttons:
52113
+ * MapLibre's navigation control is zoom and a compass, Leaflet's is zoom,
52114
+ * Google's is zoom. So a consumer slotting one of those has our zoom twice
52115
+ * over and our pan pad not at all, and a single switch would make them choose
52116
+ * between a duplicate and nothing.
52117
+ *
52118
+ * `none` draws none of them, which is the right answer where the slotted map
52119
+ * already has controls a reader can find: what this family argues for is that
52120
+ * *a* findable control exists, never that it is ours. The methods stay public
52121
+ * either way, so a consumer drawing their own chrome can still drive the
52122
+ * frame.
52123
+ *
52124
+ * Absent is all three, which is this library's rule that a resting value is an
52125
+ * attribute's absence, and it is what the stylesheet asks about: the layout
52126
+ * rules are written against `[controls]:not([controls~="zoom"])` rather than
52127
+ * the bare negation, or a frame that named no list at all would be laid out as
52128
+ * though it had dropped everything.
52129
+ * - `controls-placement`/`controlsPlacement`: Which corner the controls sit in.
52130
+ *
52131
+ * **Configurable because there is no safe default**, and this is a collision
52132
+ * rather than a taste: MapLibre puts its own controls at the top end, Leaflet
52133
+ * and OpenLayers at the top start, Google's zoom at the bottom end. Whichever
52134
+ * corner this took would land on somebody's, which is why every one of those
52135
+ * libraries made it a setting too.
52136
+ *
52137
+ * Logical corners rather than left and right, so a right-to-left page moves
52138
+ * them without a consumer writing a second rule.
52139
+ *
52140
+ * Absent is the top end, which is this library's rule that a resting value is
52141
+ * an attribute's absence: a default that reflected would write an attribute
52142
+ * onto every host that no server sent and nobody asked for.
52143
+ * - `fullscreen-label`/`fullscreenLabel`: What the control that fills the screen is called.
52144
+ * - `idle-delay`/`idleDelay`: How long the reader may be still before the chrome hides, in milliseconds.
52145
+ *
52146
+ * Zero keeps it up, which is the default: a map's controls are how a keyboard
52147
+ * reader operates it, and chrome that hides itself by default would be this
52148
+ * component undoing its own argument. Set it for a display map nobody drives.
52149
+ * - `label`: Accessible name for the map, which is the one thing a consumer must write.
52150
+ *
52151
+ * There is no sensible default. "Map" names the widget rather than the place,
52152
+ * and a reader meeting three of them on a page learns nothing from hearing the
52153
+ * same word three times.
52154
+ * - `pan-label`/`panLabel`: What the controls are called, for a page not in English.
52155
+ * - `pan-step`/`panStep`: How far one press moves the map, as a fraction of what is on screen.
52156
+ *
52157
+ * A fraction rather than a distance, because this frame does not know the
52158
+ * scale of what is inside it: a quarter of the viewport is the same gesture at
52159
+ * street level and at country level, and a consumer who wants metres can
52160
+ * multiply by their own.
52161
+ * - `zoom-in-label`/`zoomInLabel`: What the zoom controls are called.
52162
+ * - `zoom-out-label`/`zoomOutLabel`: What the zoom control that goes the other way is called.
52163
+ * - `whenSettled`: Resolves a frame after the first update, when transitions are switched on.
52164
+ *
52165
+ * **Named `whenSettled` because `settled` is taken four times over**, by
52166
+ * Image, Splitter and both color controls, none of them about transitions. A
52167
+ * base class takes the name every subclass then cannot use.
52168
+ *
52169
+ * **The state it reports cannot be watched, which is why this exists.** A
52170
+ * custom state is deliberately not in the DOM, so there is no
52171
+ * `MutationObserver` equivalent for `ElementInternals.states`. Await this
52172
+ * instead.
52173
+ *
52174
+ * Separate from `updateComplete`, which resolves in the microtask checkpoint
52175
+ * the suppression is still active in. That is the distinction `readyToMove`
52176
+ * in `@fusion.dev/helix-testing` is written around.
52177
+ *
52178
+ * It never resolves where `requestAnimationFrame` never fires, which is a
52179
+ * server, a hidden tab, and happy-dom. Callers that must not hang there race
52180
+ * it against a timeout, as the happy-dom harness's `readyToMove` does. The
52181
+ * browser harness's awaits it alone: a browser always runs the frame, and a
52182
+ * timer beside it was a bet on how long one takes, which a busy run lost. (property only) (readonly)
52183
+ *
52184
+ * ## Events
52185
+ *
52186
+ * Events that will be emitted by the component.
52187
+ *
52188
+ * - `helix-map-pan`: The reader asked the map to move. Answer it against your own map.
52189
+ * - `helix-map-zoom`: The reader asked the map to zoom, by a direction rather than to a level.
52190
+ *
52191
+ * ## Slots
52192
+ *
52193
+ * Areas where markup can be added to the component.
52194
+ *
52195
+ * - `(default)`: The map, which is the consumer's own.
52196
+ * - `attribution`: Whoever the tiles belong to, which most licenses require you to say.
52197
+ * - `footer`: Chrome below the map, such as a legend or a scale.
52198
+ * - `header`: Chrome above the map, such as a title or a search field.
52199
+ *
52200
+ * ## Methods
52201
+ *
52202
+ * Methods that can be called to access component functionality.
52203
+ *
52204
+ * - `toggleFullscreen() => void`: Fills the screen with the frame, or comes back.
52205
+ * - `pan(to: Way) => void`: Asks for the map to move, which the consumer answers.
52206
+ * - `zoom(by: number) => void`: Asks for the map to zoom, `1` in and `-1` out.
52207
+ *
52208
+ * ## CSS Custom Properties
52209
+ *
52210
+ * CSS variables available for styling the component.
52211
+ *
52212
+ * - `--map-background-color`: The well behind the map, seen while tiles are on their way. (default: `undefined`)
52213
+ * - `--map-block-size`: How tall the frame is. A length, since the map fills it. (default: `undefined`)
52214
+ * - `--map-border-color`: Color of the frame's edge. (default: `undefined`)
52215
+ * - `--map-control-background-color`: The ground under the pan and zoom buttons. (default: `undefined`)
52216
+ *
52217
+ * ## CSS Parts
52218
+ *
52219
+ * Custom selectors for styling elements within the component.
52220
+ *
52221
+ * - `controls`: The group the pan and zoom buttons sit in.
52222
+ * - `fullscreen`: The button that fills the screen.
52223
+ * - `pan-down`: The button that moves the map down.
52224
+ * - `pan-end`: The button that moves the map the way the text ends, which is right on an English page.
52225
+ * - `pan-start`: The button that moves the map the way the text starts, which is left on an English page.
52226
+ * - `pan-up`: The button that moves the map up.
52227
+ * - `region`: The named region the map is slotted into.
52228
+ * - `viewport`: The box the map is drawn in.
52229
+ * - `zoom-in`: The button that zooms in.
52230
+ * - `zoom-out`: The button that zooms out.
52231
+ *
52232
+ * ## CSS States
52233
+ *
52234
+ * These can be used to apply styling when a component is in a given state.
52235
+ *
52236
+ * - `fullscreen`: While the frame fills the screen.
52237
+ * - `idle`: While the reader has been still long enough to hide the chrome.
52238
+ * - `settled`: Set a frame after the first render. Transitions are held off until it is, so an element never animates its own arrival.
52239
+ */
52240
+ "helix-map": Partial<
52241
+ HelixMapProps & HelixMapSolidJsProps & BaseProps<HelixMap> & BaseEvents<HelixMap>
52242
+ >;
52243
+
51720
52244
  /**
51721
52245
  * Presentation only: the trigger, and the panel it opens as a grid of columns.
51722
52246
  * Everything about what opens it and what closes it is the base class.
@@ -62432,6 +62956,14 @@ export type CustomCssProperties = {
62432
62956
  "--loader-size"?: (string) | undefined;
62433
62957
  /** Color of the circle behind it. */
62434
62958
  "--loader-track-color"?: (string) | undefined;
62959
+ /** The well behind the map, seen while tiles are on their way. */
62960
+ "--map-background-color"?: (string) | undefined;
62961
+ /** How tall the frame is. A length, since the map fills it. */
62962
+ "--map-block-size"?: (string) | undefined;
62963
+ /** Color of the frame's edge. */
62964
+ "--map-border-color"?: (string) | undefined;
62965
+ /** The ground under the pan and zoom buttons. */
62966
+ "--map-control-background-color"?: (string) | undefined;
62435
62967
  /** 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
62968
  "--megamenu-backdrop"?: (string) | undefined;
62437
62969
  /** 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']