@fusion.dev/helix-headless 0.100.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.
- package/custom-elements.json +4478 -2166
- package/dist/dialog/root/dialog-root.d.ts +1 -1
- package/dist/element-events.generated.js +9 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/lightbox/index.d.ts +2 -0
- package/dist/lightbox/index.js +2 -0
- package/dist/lightbox/item/lightbox-item.d.ts +60 -0
- package/dist/lightbox/item/lightbox-item.js +45 -0
- package/dist/lightbox/root/lightbox-root.d.ts +176 -0
- package/dist/lightbox/root/lightbox-root.js +212 -0
- package/dist/map/index.d.ts +1 -0
- package/dist/map/index.js +1 -0
- package/dist/map/root/map-root.d.ts +142 -0
- package/dist/map/root/map-root.js +161 -0
- package/package.json +5 -5
- package/types/jsx.d.ts +1049 -0
- package/types/svelte.d.ts +3 -0
- package/types/vue.d.ts +208 -2
package/types/jsx.d.ts
CHANGED
|
@@ -74,11 +74,14 @@ import type {
|
|
|
74
74
|
HelixHeadlessInput,
|
|
75
75
|
HelixHeadlessKbd,
|
|
76
76
|
HelixHeadlessLegend,
|
|
77
|
+
HelixHeadlessLightbox,
|
|
78
|
+
HelixHeadlessLightboxItem,
|
|
77
79
|
HelixHeadlessLineChart,
|
|
78
80
|
HelixHeadlessList,
|
|
79
81
|
HelixHeadlessListItem,
|
|
80
82
|
HelixHeadlessListbox,
|
|
81
83
|
HelixHeadlessLoader,
|
|
84
|
+
HelixHeadlessMap,
|
|
82
85
|
HelixHeadlessMegamenu,
|
|
83
86
|
HelixHeadlessMenu,
|
|
84
87
|
HelixHeadlessMenuItem,
|
|
@@ -148,6 +151,8 @@ import type {
|
|
|
148
151
|
HelixHeadlessVideoPlaylistMenu,
|
|
149
152
|
HelixHeadlessVirtualList,
|
|
150
153
|
HelixHistoryEvent,
|
|
154
|
+
HelixMapPanEvent,
|
|
155
|
+
HelixMapZoomEvent,
|
|
151
156
|
HelixNavigateEvent,
|
|
152
157
|
HelixNextEvent,
|
|
153
158
|
HelixPreviousEvent,
|
|
@@ -8525,6 +8530,231 @@ shadow root reads a table in that root rather than one in the document.
|
|
|
8525
8530
|
textContent?: (string | number) | undefined;
|
|
8526
8531
|
};
|
|
8527
8532
|
|
|
8533
|
+
export type HelixHeadlessLightboxItemProps = {
|
|
8534
|
+
/** Whether this is the one being shown.
|
|
8535
|
+
|
|
8536
|
+
Written by the root, which is the only thing that sees the set. */
|
|
8537
|
+
current?: (HelixHeadlessLightboxItem["current"]) | undefined;
|
|
8538
|
+
/** What this item is called, for the reading that says where the reader is. */
|
|
8539
|
+
label?: (HelixHeadlessLightboxItem["label"]) | undefined;
|
|
8540
|
+
/** What names this item, and what `active` on the root is compared against. */
|
|
8541
|
+
value?: (HelixHeadlessLightboxItem["value"]) | undefined;
|
|
8542
|
+
};
|
|
8543
|
+
|
|
8544
|
+
export type HelixHeadlessLightboxItemSolidJsProps = {
|
|
8545
|
+
/** Whether this is the one being shown.
|
|
8546
|
+
|
|
8547
|
+
Written by the root, which is the only thing that sees the set. */
|
|
8548
|
+
"prop:current"?: (HelixHeadlessLightboxItem["current"]) | undefined;
|
|
8549
|
+
/** What this item is called, for the reading that says where the reader is. */
|
|
8550
|
+
"prop:label"?: (HelixHeadlessLightboxItem["label"]) | undefined;
|
|
8551
|
+
/** What names this item, and what `active` on the root is compared against. */
|
|
8552
|
+
"prop:value"?: (HelixHeadlessLightboxItem["value"]) | undefined;
|
|
8553
|
+
|
|
8554
|
+
/** Set the innerHTML of the element */
|
|
8555
|
+
innerHTML?: (string) | undefined;
|
|
8556
|
+
/** Set the textContent of the element */
|
|
8557
|
+
textContent?: (string | number) | undefined;
|
|
8558
|
+
};
|
|
8559
|
+
|
|
8560
|
+
/** `HelixHeadlessLightbox` component event */
|
|
8561
|
+
export type HelixHeadlessLightboxElementEvent<E = Event> = TypedEvent<
|
|
8562
|
+
HelixHeadlessLightbox,
|
|
8563
|
+
E
|
|
8564
|
+
>;
|
|
8565
|
+
/** `helix-activate` event type */
|
|
8566
|
+
export type HelixHeadlessLightboxHelixActivateElementEvent =
|
|
8567
|
+
HelixHeadlessLightboxElementEvent<HelixActivateEvent>;
|
|
8568
|
+
/** `helix-before-activate` event type */
|
|
8569
|
+
export type HelixHeadlessLightboxHelixBeforeActivateElementEvent =
|
|
8570
|
+
HelixHeadlessLightboxElementEvent<HelixBeforeActivateEvent>;
|
|
8571
|
+
/** `helix-before-close` event type */
|
|
8572
|
+
export type HelixHeadlessLightboxHelixBeforeCloseElementEvent =
|
|
8573
|
+
HelixHeadlessLightboxElementEvent<HelixBeforeCloseEvent>;
|
|
8574
|
+
/** `helix-before-open` event type */
|
|
8575
|
+
export type HelixHeadlessLightboxHelixBeforeOpenElementEvent =
|
|
8576
|
+
HelixHeadlessLightboxElementEvent<HelixBeforeOpenEvent>;
|
|
8577
|
+
|
|
8578
|
+
export type HelixHeadlessLightboxProps = {
|
|
8579
|
+
/** How long the reader may be still before the chrome hides, in milliseconds.
|
|
8580
|
+
|
|
8581
|
+
Zero keeps it up, which is what a viewer with a caption worth reading
|
|
8582
|
+
wants. The wait is only ever about idling: whether anything else should
|
|
8583
|
+
keep the chrome up is the consumer's to decide with this. */
|
|
8584
|
+
"idle-delay"?: (HelixHeadlessLightbox["idleDelay"] | `${number}`) | undefined;
|
|
8585
|
+
/** How long the reader may be still before the chrome hides, in milliseconds.
|
|
8586
|
+
|
|
8587
|
+
Zero keeps it up, which is what a viewer with a caption worth reading
|
|
8588
|
+
wants. The wait is only ever about idling: whether anything else should
|
|
8589
|
+
keep the chrome up is the consumer's to decide with this. */
|
|
8590
|
+
idleDelay?: (HelixHeadlessLightbox["idleDelay"]) | undefined;
|
|
8591
|
+
/** Accessible name for the viewer. */
|
|
8592
|
+
label?: (HelixHeadlessLightbox["label"]) | undefined;
|
|
8593
|
+
/** Whether walking past the end comes back to the beginning. */
|
|
8594
|
+
loop?: (HelixHeadlessLightbox["loop"]) | undefined;
|
|
8595
|
+
/** The reading that says where in the set the reader is, with `{index}` and
|
|
8596
|
+
`{count}` filled in.
|
|
8597
|
+
|
|
8598
|
+
Announced rather than only drawn, because the picture changing under a
|
|
8599
|
+
reader who cannot see it is otherwise silent. A consumer who has their own
|
|
8600
|
+
counter in the chrome can empty this and say it themselves. */
|
|
8601
|
+
"status-label"?: (HelixHeadlessLightbox["statusLabel"]) | undefined;
|
|
8602
|
+
/** The reading that says where in the set the reader is, with `{index}` and
|
|
8603
|
+
`{count}` filled in.
|
|
8604
|
+
|
|
8605
|
+
Announced rather than only drawn, because the picture changing under a
|
|
8606
|
+
reader who cannot see it is otherwise silent. A consumer who has their own
|
|
8607
|
+
counter in the chrome can empty this and say it themselves. */
|
|
8608
|
+
statusLabel?: (HelixHeadlessLightbox["statusLabel"]) | undefined;
|
|
8609
|
+
/** Which item is current, by its `value`.
|
|
8610
|
+
|
|
8611
|
+
Not `option.active`, which is the option the keyboard is on: that is a
|
|
8612
|
+
different question from which one is chosen.
|
|
8613
|
+
|
|
8614
|
+
Writing always applies, so `<helix-tabs active="one">` starts on that
|
|
8615
|
+
tab, and `default-active` is how markup says where to start without
|
|
8616
|
+
naming the current one. */
|
|
8617
|
+
active?: (HelixHeadlessLightbox["active"]) | undefined;
|
|
8618
|
+
/** Which item the markup declared current.
|
|
8619
|
+
|
|
8620
|
+
Ignored once `active` is written. */
|
|
8621
|
+
"default-active"?: (HelixHeadlessLightbox["defaultActive"]) | undefined;
|
|
8622
|
+
/** Which item the markup declared current.
|
|
8623
|
+
|
|
8624
|
+
Ignored once `active` is written. */
|
|
8625
|
+
defaultActive?: (HelixHeadlessLightbox["defaultActive"]) | undefined;
|
|
8626
|
+
/** Whether the element is open.
|
|
8627
|
+
|
|
8628
|
+
One property, not two, so `dialog.open` answers the question anyone
|
|
8629
|
+
asking it meant. Writing always applies; `<helix-dialog open>` is the
|
|
8630
|
+
same statement in markup.
|
|
8631
|
+
|
|
8632
|
+
**Not reflected, and that is required rather than tidy.** Reflection
|
|
8633
|
+
writes the resolved state back as an attribute, so an element that opened
|
|
8634
|
+
itself would put `open` on its own host: cloned, serialized for
|
|
8635
|
+
hydration, or diffed by a framework, it comes back holding whatever the
|
|
8636
|
+
last reader did rather than what the author wrote. `:state(open)` carries
|
|
8637
|
+
the resolved state for stylesheets, which is what the mirror is for. */
|
|
8638
|
+
open?: (HelixHeadlessLightbox["open"]) | undefined;
|
|
8639
|
+
/** Whether the markup declared it open. Ignored once `open` is written. */
|
|
8640
|
+
"default-open"?: (HelixHeadlessLightbox["defaultOpen"]) | undefined;
|
|
8641
|
+
/** Whether the markup declared it open. Ignored once `open` is written. */
|
|
8642
|
+
defaultOpen?: (HelixHeadlessLightbox["defaultOpen"]) | undefined;
|
|
8643
|
+
|
|
8644
|
+
/** Relayed, because the platform's own does not escape. */
|
|
8645
|
+
onclose?: ((e: HelixHeadlessLightboxElementEvent) => void) | undefined;
|
|
8646
|
+
/** Fired once the shown item has moved, so the element already holds it. */
|
|
8647
|
+
"onhelix-activate"?: ((
|
|
8648
|
+
e: HelixHeadlessLightboxHelixActivateElementEvent,
|
|
8649
|
+
) => void) | undefined;
|
|
8650
|
+
/** Fired before the shown item changes, and cancelable. The only way to refuse one. */
|
|
8651
|
+
"onhelix-before-activate"?: ((
|
|
8652
|
+
e: HelixHeadlessLightboxHelixBeforeActivateElementEvent,
|
|
8653
|
+
) => void) | undefined;
|
|
8654
|
+
/** Fired before it closes, and cancelable. */
|
|
8655
|
+
"onhelix-before-close"?: ((
|
|
8656
|
+
e: HelixHeadlessLightboxHelixBeforeCloseElementEvent,
|
|
8657
|
+
) => void) | undefined;
|
|
8658
|
+
/** Fired before it opens, and cancelable. */
|
|
8659
|
+
"onhelix-before-open"?: ((
|
|
8660
|
+
e: HelixHeadlessLightboxHelixBeforeOpenElementEvent,
|
|
8661
|
+
) => void) | undefined;
|
|
8662
|
+
/** Says the state moved, carrying `newState` and `oldState`. */
|
|
8663
|
+
ontoggle?: ((e: HelixHeadlessLightboxElementEvent) => void) | undefined;
|
|
8664
|
+
};
|
|
8665
|
+
|
|
8666
|
+
export type HelixHeadlessLightboxSolidJsProps = {
|
|
8667
|
+
/** How long the reader may be still before the chrome hides, in milliseconds.
|
|
8668
|
+
|
|
8669
|
+
Zero keeps it up, which is what a viewer with a caption worth reading
|
|
8670
|
+
wants. The wait is only ever about idling: whether anything else should
|
|
8671
|
+
keep the chrome up is the consumer's to decide with this. */
|
|
8672
|
+
"attr:idle-delay"?: (HelixHeadlessLightbox["idleDelay"] | `${number}`) | undefined;
|
|
8673
|
+
/** How long the reader may be still before the chrome hides, in milliseconds.
|
|
8674
|
+
|
|
8675
|
+
Zero keeps it up, which is what a viewer with a caption worth reading
|
|
8676
|
+
wants. The wait is only ever about idling: whether anything else should
|
|
8677
|
+
keep the chrome up is the consumer's to decide with this. */
|
|
8678
|
+
"prop:idleDelay"?: (HelixHeadlessLightbox["idleDelay"]) | undefined;
|
|
8679
|
+
/** Accessible name for the viewer. */
|
|
8680
|
+
"prop:label"?: (HelixHeadlessLightbox["label"]) | undefined;
|
|
8681
|
+
/** Whether walking past the end comes back to the beginning. */
|
|
8682
|
+
"prop:loop"?: (HelixHeadlessLightbox["loop"]) | undefined;
|
|
8683
|
+
/** The reading that says where in the set the reader is, with `{index}` and
|
|
8684
|
+
`{count}` filled in.
|
|
8685
|
+
|
|
8686
|
+
Announced rather than only drawn, because the picture changing under a
|
|
8687
|
+
reader who cannot see it is otherwise silent. A consumer who has their own
|
|
8688
|
+
counter in the chrome can empty this and say it themselves. */
|
|
8689
|
+
"attr:status-label"?: (HelixHeadlessLightbox["statusLabel"]) | undefined;
|
|
8690
|
+
/** The reading that says where in the set the reader is, with `{index}` and
|
|
8691
|
+
`{count}` filled in.
|
|
8692
|
+
|
|
8693
|
+
Announced rather than only drawn, because the picture changing under a
|
|
8694
|
+
reader who cannot see it is otherwise silent. A consumer who has their own
|
|
8695
|
+
counter in the chrome can empty this and say it themselves. */
|
|
8696
|
+
"prop:statusLabel"?: (HelixHeadlessLightbox["statusLabel"]) | undefined;
|
|
8697
|
+
/** Which item is current, by its `value`.
|
|
8698
|
+
|
|
8699
|
+
Not `option.active`, which is the option the keyboard is on: that is a
|
|
8700
|
+
different question from which one is chosen.
|
|
8701
|
+
|
|
8702
|
+
Writing always applies, so `<helix-tabs active="one">` starts on that
|
|
8703
|
+
tab, and `default-active` is how markup says where to start without
|
|
8704
|
+
naming the current one. */
|
|
8705
|
+
"prop:active"?: (HelixHeadlessLightbox["active"]) | undefined;
|
|
8706
|
+
/** Which item the markup declared current.
|
|
8707
|
+
|
|
8708
|
+
Ignored once `active` is written. */
|
|
8709
|
+
"attr:default-active"?: (HelixHeadlessLightbox["defaultActive"]) | undefined;
|
|
8710
|
+
/** Which item the markup declared current.
|
|
8711
|
+
|
|
8712
|
+
Ignored once `active` is written. */
|
|
8713
|
+
"prop:defaultActive"?: (HelixHeadlessLightbox["defaultActive"]) | undefined;
|
|
8714
|
+
/** Whether the element is open.
|
|
8715
|
+
|
|
8716
|
+
One property, not two, so `dialog.open` answers the question anyone
|
|
8717
|
+
asking it meant. Writing always applies; `<helix-dialog open>` is the
|
|
8718
|
+
same statement in markup.
|
|
8719
|
+
|
|
8720
|
+
**Not reflected, and that is required rather than tidy.** Reflection
|
|
8721
|
+
writes the resolved state back as an attribute, so an element that opened
|
|
8722
|
+
itself would put `open` on its own host: cloned, serialized for
|
|
8723
|
+
hydration, or diffed by a framework, it comes back holding whatever the
|
|
8724
|
+
last reader did rather than what the author wrote. `:state(open)` carries
|
|
8725
|
+
the resolved state for stylesheets, which is what the mirror is for. */
|
|
8726
|
+
"prop:open"?: (HelixHeadlessLightbox["open"]) | undefined;
|
|
8727
|
+
/** Whether the markup declared it open. Ignored once `open` is written. */
|
|
8728
|
+
"bool:default-open"?: (HelixHeadlessLightbox["defaultOpen"]) | undefined;
|
|
8729
|
+
/** Whether the markup declared it open. Ignored once `open` is written. */
|
|
8730
|
+
"prop:defaultOpen"?: (HelixHeadlessLightbox["defaultOpen"]) | undefined;
|
|
8731
|
+
/** Relayed, because the platform's own does not escape. */
|
|
8732
|
+
"on:close"?: ((e: HelixHeadlessLightboxElementEvent) => void) | undefined;
|
|
8733
|
+
/** Fired once the shown item has moved, so the element already holds it. */
|
|
8734
|
+
"on:helix-activate"?: ((
|
|
8735
|
+
e: HelixHeadlessLightboxHelixActivateElementEvent,
|
|
8736
|
+
) => void) | undefined;
|
|
8737
|
+
/** Fired before the shown item changes, and cancelable. The only way to refuse one. */
|
|
8738
|
+
"on:helix-before-activate"?: ((
|
|
8739
|
+
e: HelixHeadlessLightboxHelixBeforeActivateElementEvent,
|
|
8740
|
+
) => void) | undefined;
|
|
8741
|
+
/** Fired before it closes, and cancelable. */
|
|
8742
|
+
"on:helix-before-close"?: ((
|
|
8743
|
+
e: HelixHeadlessLightboxHelixBeforeCloseElementEvent,
|
|
8744
|
+
) => void) | undefined;
|
|
8745
|
+
/** Fired before it opens, and cancelable. */
|
|
8746
|
+
"on:helix-before-open"?: ((
|
|
8747
|
+
e: HelixHeadlessLightboxHelixBeforeOpenElementEvent,
|
|
8748
|
+
) => void) | undefined;
|
|
8749
|
+
/** Says the state moved, carrying `newState` and `oldState`. */
|
|
8750
|
+
"on:toggle"?: ((e: HelixHeadlessLightboxElementEvent) => void) | undefined;
|
|
8751
|
+
|
|
8752
|
+
/** Set the innerHTML of the element */
|
|
8753
|
+
innerHTML?: (string) | undefined;
|
|
8754
|
+
/** Set the textContent of the element */
|
|
8755
|
+
textContent?: (string | number) | undefined;
|
|
8756
|
+
};
|
|
8757
|
+
|
|
8528
8758
|
export type HelixHeadlessLineChartProps = {
|
|
8529
8759
|
/** Whether a wash is drawn under each line, each from the floor on its own.
|
|
8530
8760
|
The washes overlap rather than add up: for parts that make a total, use
|
|
@@ -9153,6 +9383,134 @@ export type HelixHeadlessLoaderSolidJsProps = {
|
|
|
9153
9383
|
textContent?: (string | number) | undefined;
|
|
9154
9384
|
};
|
|
9155
9385
|
|
|
9386
|
+
/** `HelixHeadlessMap` component event */
|
|
9387
|
+
export type HelixHeadlessMapElementEvent<E = Event> = TypedEvent<
|
|
9388
|
+
HelixHeadlessMap,
|
|
9389
|
+
E
|
|
9390
|
+
>;
|
|
9391
|
+
/** `helix-map-pan` event type */
|
|
9392
|
+
export type HelixHeadlessMapHelixMapPanElementEvent =
|
|
9393
|
+
HelixHeadlessMapElementEvent<HelixMapPanEvent>;
|
|
9394
|
+
/** `helix-map-zoom` event type */
|
|
9395
|
+
export type HelixHeadlessMapHelixMapZoomElementEvent =
|
|
9396
|
+
HelixHeadlessMapElementEvent<HelixMapZoomEvent>;
|
|
9397
|
+
|
|
9398
|
+
export type HelixHeadlessMapProps = {
|
|
9399
|
+
/** What the control that fills the screen is called. */
|
|
9400
|
+
"fullscreen-label"?: (HelixHeadlessMap["fullscreenLabel"]) | undefined;
|
|
9401
|
+
/** What the control that fills the screen is called. */
|
|
9402
|
+
fullscreenLabel?: (HelixHeadlessMap["fullscreenLabel"]) | undefined;
|
|
9403
|
+
/** How long the reader may be still before the chrome hides, in milliseconds.
|
|
9404
|
+
|
|
9405
|
+
Zero keeps it up, which is the default: a map's controls are how a keyboard
|
|
9406
|
+
reader operates it, and chrome that hides itself by default would be this
|
|
9407
|
+
component undoing its own argument. Set it for a display map nobody drives. */
|
|
9408
|
+
"idle-delay"?: (HelixHeadlessMap["idleDelay"] | `${number}`) | undefined;
|
|
9409
|
+
/** How long the reader may be still before the chrome hides, in milliseconds.
|
|
9410
|
+
|
|
9411
|
+
Zero keeps it up, which is the default: a map's controls are how a keyboard
|
|
9412
|
+
reader operates it, and chrome that hides itself by default would be this
|
|
9413
|
+
component undoing its own argument. Set it for a display map nobody drives. */
|
|
9414
|
+
idleDelay?: (HelixHeadlessMap["idleDelay"]) | undefined;
|
|
9415
|
+
/** Accessible name for the map, which is the one thing a consumer must write.
|
|
9416
|
+
|
|
9417
|
+
There is no sensible default. "Map" names the widget rather than the place,
|
|
9418
|
+
and a reader meeting three of them on a page learns nothing from hearing the
|
|
9419
|
+
same word three times. */
|
|
9420
|
+
label?: (HelixHeadlessMap["label"]) | undefined;
|
|
9421
|
+
/** What the controls are called, for a page not in English. */
|
|
9422
|
+
"pan-label"?: (HelixHeadlessMap["panLabel"]) | undefined;
|
|
9423
|
+
/** What the controls are called, for a page not in English. */
|
|
9424
|
+
panLabel?: (HelixHeadlessMap["panLabel"]) | undefined;
|
|
9425
|
+
/** How far one press moves the map, as a fraction of what is on screen.
|
|
9426
|
+
|
|
9427
|
+
A fraction rather than a distance, because this frame does not know the
|
|
9428
|
+
scale of what is inside it: a quarter of the viewport is the same gesture at
|
|
9429
|
+
street level and at country level, and a consumer who wants metres can
|
|
9430
|
+
multiply by their own. */
|
|
9431
|
+
"pan-step"?: (HelixHeadlessMap["panStep"] | `${number}`) | undefined;
|
|
9432
|
+
/** How far one press moves the map, as a fraction of what is on screen.
|
|
9433
|
+
|
|
9434
|
+
A fraction rather than a distance, because this frame does not know the
|
|
9435
|
+
scale of what is inside it: a quarter of the viewport is the same gesture at
|
|
9436
|
+
street level and at country level, and a consumer who wants metres can
|
|
9437
|
+
multiply by their own. */
|
|
9438
|
+
panStep?: (HelixHeadlessMap["panStep"]) | undefined;
|
|
9439
|
+
/** What the zoom controls are called. */
|
|
9440
|
+
"zoom-in-label"?: (HelixHeadlessMap["zoomInLabel"]) | undefined;
|
|
9441
|
+
/** What the zoom controls are called. */
|
|
9442
|
+
zoomInLabel?: (HelixHeadlessMap["zoomInLabel"]) | undefined;
|
|
9443
|
+
/** What the zoom control that goes the other way is called. */
|
|
9444
|
+
"zoom-out-label"?: (HelixHeadlessMap["zoomOutLabel"]) | undefined;
|
|
9445
|
+
/** What the zoom control that goes the other way is called. */
|
|
9446
|
+
zoomOutLabel?: (HelixHeadlessMap["zoomOutLabel"]) | undefined;
|
|
9447
|
+
|
|
9448
|
+
/** The reader asked the map to move. Answer it against your own map. */
|
|
9449
|
+
"onhelix-map-pan"?: ((e: HelixHeadlessMapHelixMapPanElementEvent) => void) | undefined;
|
|
9450
|
+
/** The reader asked the map to zoom, by a direction rather than to a level. */
|
|
9451
|
+
"onhelix-map-zoom"?: ((e: HelixHeadlessMapHelixMapZoomElementEvent) => void) | undefined;
|
|
9452
|
+
};
|
|
9453
|
+
|
|
9454
|
+
export type HelixHeadlessMapSolidJsProps = {
|
|
9455
|
+
/** What the control that fills the screen is called. */
|
|
9456
|
+
"attr:fullscreen-label"?: (HelixHeadlessMap["fullscreenLabel"]) | undefined;
|
|
9457
|
+
/** What the control that fills the screen is called. */
|
|
9458
|
+
"prop:fullscreenLabel"?: (HelixHeadlessMap["fullscreenLabel"]) | undefined;
|
|
9459
|
+
/** How long the reader may be still before the chrome hides, in milliseconds.
|
|
9460
|
+
|
|
9461
|
+
Zero keeps it up, which is the default: a map's controls are how a keyboard
|
|
9462
|
+
reader operates it, and chrome that hides itself by default would be this
|
|
9463
|
+
component undoing its own argument. Set it for a display map nobody drives. */
|
|
9464
|
+
"attr:idle-delay"?: (HelixHeadlessMap["idleDelay"] | `${number}`) | undefined;
|
|
9465
|
+
/** How long the reader may be still before the chrome hides, in milliseconds.
|
|
9466
|
+
|
|
9467
|
+
Zero keeps it up, which is the default: a map's controls are how a keyboard
|
|
9468
|
+
reader operates it, and chrome that hides itself by default would be this
|
|
9469
|
+
component undoing its own argument. Set it for a display map nobody drives. */
|
|
9470
|
+
"prop:idleDelay"?: (HelixHeadlessMap["idleDelay"]) | undefined;
|
|
9471
|
+
/** Accessible name for the map, which is the one thing a consumer must write.
|
|
9472
|
+
|
|
9473
|
+
There is no sensible default. "Map" names the widget rather than the place,
|
|
9474
|
+
and a reader meeting three of them on a page learns nothing from hearing the
|
|
9475
|
+
same word three times. */
|
|
9476
|
+
"prop:label"?: (HelixHeadlessMap["label"]) | undefined;
|
|
9477
|
+
/** What the controls are called, for a page not in English. */
|
|
9478
|
+
"attr:pan-label"?: (HelixHeadlessMap["panLabel"]) | undefined;
|
|
9479
|
+
/** What the controls are called, for a page not in English. */
|
|
9480
|
+
"prop:panLabel"?: (HelixHeadlessMap["panLabel"]) | undefined;
|
|
9481
|
+
/** How far one press moves the map, as a fraction of what is on screen.
|
|
9482
|
+
|
|
9483
|
+
A fraction rather than a distance, because this frame does not know the
|
|
9484
|
+
scale of what is inside it: a quarter of the viewport is the same gesture at
|
|
9485
|
+
street level and at country level, and a consumer who wants metres can
|
|
9486
|
+
multiply by their own. */
|
|
9487
|
+
"attr:pan-step"?: (HelixHeadlessMap["panStep"] | `${number}`) | undefined;
|
|
9488
|
+
/** How far one press moves the map, as a fraction of what is on screen.
|
|
9489
|
+
|
|
9490
|
+
A fraction rather than a distance, because this frame does not know the
|
|
9491
|
+
scale of what is inside it: a quarter of the viewport is the same gesture at
|
|
9492
|
+
street level and at country level, and a consumer who wants metres can
|
|
9493
|
+
multiply by their own. */
|
|
9494
|
+
"prop:panStep"?: (HelixHeadlessMap["panStep"]) | undefined;
|
|
9495
|
+
/** What the zoom controls are called. */
|
|
9496
|
+
"attr:zoom-in-label"?: (HelixHeadlessMap["zoomInLabel"]) | undefined;
|
|
9497
|
+
/** What the zoom controls are called. */
|
|
9498
|
+
"prop:zoomInLabel"?: (HelixHeadlessMap["zoomInLabel"]) | undefined;
|
|
9499
|
+
/** What the zoom control that goes the other way is called. */
|
|
9500
|
+
"attr:zoom-out-label"?: (HelixHeadlessMap["zoomOutLabel"]) | undefined;
|
|
9501
|
+
/** What the zoom control that goes the other way is called. */
|
|
9502
|
+
"prop:zoomOutLabel"?: (HelixHeadlessMap["zoomOutLabel"]) | undefined;
|
|
9503
|
+
/** The reader asked the map to move. Answer it against your own map. */
|
|
9504
|
+
"on:helix-map-pan"?: ((e: HelixHeadlessMapHelixMapPanElementEvent) => void) | undefined;
|
|
9505
|
+
/** The reader asked the map to zoom, by a direction rather than to a level. */
|
|
9506
|
+
"on:helix-map-zoom"?: ((e: HelixHeadlessMapHelixMapZoomElementEvent) => void) | undefined;
|
|
9507
|
+
|
|
9508
|
+
/** Set the innerHTML of the element */
|
|
9509
|
+
innerHTML?: (string) | undefined;
|
|
9510
|
+
/** Set the textContent of the element */
|
|
9511
|
+
textContent?: (string | number) | undefined;
|
|
9512
|
+
};
|
|
9513
|
+
|
|
9156
9514
|
/** `HelixHeadlessMegamenu` component event */
|
|
9157
9515
|
export type HelixHeadlessMegamenuElementEvent<E = Event> = TypedEvent<
|
|
9158
9516
|
HelixHeadlessMegamenu,
|
|
@@ -26157,6 +26515,227 @@ export type CustomElements = {
|
|
|
26157
26515
|
HelixHeadlessLegendProps & BaseProps<HelixHeadlessLegend> & BaseEvents<HelixHeadlessLegend>
|
|
26158
26516
|
>;
|
|
26159
26517
|
|
|
26518
|
+
/**
|
|
26519
|
+
* A wrapper around whatever the consumer opened, which is the whole of what it
|
|
26520
|
+
* is: a picture, a frame of video, a chart. The family shows one at a time and
|
|
26521
|
+
* this is how it says which, so the content stays the consumer's and the
|
|
26522
|
+
* arithmetic stays the root's.
|
|
26523
|
+
*
|
|
26524
|
+
* Hidden rather than unmounted while another item is current, for the reason
|
|
26525
|
+
* `TabPanel` gives: what is in the markup is what a crawler reads and what a
|
|
26526
|
+
* server sent, and an `<img>` that has already decoded does not decode again
|
|
26527
|
+
* when the reader walks back to it.
|
|
26528
|
+
*
|
|
26529
|
+
* ## Attributes & Properties
|
|
26530
|
+
*
|
|
26531
|
+
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
|
26532
|
+
*
|
|
26533
|
+
* - `current`: Whether this is the one being shown.
|
|
26534
|
+
*
|
|
26535
|
+
* Written by the root, which is the only thing that sees the set.
|
|
26536
|
+
* - `label`: What this item is called, for the reading that says where the reader is.
|
|
26537
|
+
* - `value`: What names this item, and what `active` on the root is compared against.
|
|
26538
|
+
* - `whenSettled`: Resolves a frame after the first update, when transitions are switched on.
|
|
26539
|
+
*
|
|
26540
|
+
* **Named `whenSettled` because `settled` is taken four times over**, by
|
|
26541
|
+
* Image, Splitter and both color controls, none of them about transitions. A
|
|
26542
|
+
* base class takes the name every subclass then cannot use.
|
|
26543
|
+
*
|
|
26544
|
+
* **The state it reports cannot be watched, which is why this exists.** A
|
|
26545
|
+
* custom state is deliberately not in the DOM, so there is no
|
|
26546
|
+
* `MutationObserver` equivalent for `ElementInternals.states`. Await this
|
|
26547
|
+
* instead.
|
|
26548
|
+
*
|
|
26549
|
+
* Separate from `updateComplete`, which resolves in the microtask checkpoint
|
|
26550
|
+
* the suppression is still active in. That is the distinction `readyToMove`
|
|
26551
|
+
* in `@fusion.dev/helix-testing` is written around.
|
|
26552
|
+
*
|
|
26553
|
+
* It never resolves where `requestAnimationFrame` never fires, which is a
|
|
26554
|
+
* server, a hidden tab, and happy-dom. Callers that must not hang there race
|
|
26555
|
+
* it against a timeout, as the happy-dom harness's `readyToMove` does. The
|
|
26556
|
+
* browser harness's awaits it alone: a browser always runs the frame, and a
|
|
26557
|
+
* timer beside it was a bet on how long one takes, which a busy run lost. (property only) (readonly)
|
|
26558
|
+
*
|
|
26559
|
+
* ## Slots
|
|
26560
|
+
*
|
|
26561
|
+
* Areas where markup can be added to the component.
|
|
26562
|
+
*
|
|
26563
|
+
* - `(default)`: What is being shown.
|
|
26564
|
+
* - `description`: A line under it saying what it is.
|
|
26565
|
+
*
|
|
26566
|
+
* ## CSS Parts
|
|
26567
|
+
*
|
|
26568
|
+
* Custom selectors for styling elements within the component.
|
|
26569
|
+
*
|
|
26570
|
+
* - `item`: The box the content is shown in.
|
|
26571
|
+
*
|
|
26572
|
+
* ## CSS States
|
|
26573
|
+
*
|
|
26574
|
+
* These can be used to apply styling when a component is in a given state.
|
|
26575
|
+
*
|
|
26576
|
+
* - `current`: While this is the item the lightbox is showing.
|
|
26577
|
+
* - `settled`: Set a frame after the first render. Transitions are held off until it is, so an element never animates its own arrival.
|
|
26578
|
+
*/
|
|
26579
|
+
"helix-headless-lightbox-item": Partial<
|
|
26580
|
+
HelixHeadlessLightboxItemProps &
|
|
26581
|
+
BaseProps<HelixHeadlessLightboxItem> &
|
|
26582
|
+
BaseEvents<HelixHeadlessLightboxItem>
|
|
26583
|
+
>;
|
|
26584
|
+
|
|
26585
|
+
/**
|
|
26586
|
+
* **A lightbox is chrome around a picture rather than a picture.** It draws
|
|
26587
|
+
* nothing of its own: what it shows is whatever the consumer opened, so this
|
|
26588
|
+
* earns its place on the frame, the keyboard and the reading that says where in
|
|
26589
|
+
* the set the reader is.
|
|
26590
|
+
*
|
|
26591
|
+
* **The modal half is the platform's.** A real `<dialog>` opened with
|
|
26592
|
+
* `showModal()` brings the top layer, a backdrop, Escape and `inert` behind it,
|
|
26593
|
+
* and this repository has already removed one hand-written focus trap for being
|
|
26594
|
+
* worse than that: `inert` on the rest of the document is something no
|
|
26595
|
+
* JavaScript trap can achieve. Every way it can close comes back through
|
|
26596
|
+
* `requestOpen`, which is what `Dialog` and `Drawer` both do and for the reason
|
|
26597
|
+
* they both give.
|
|
26598
|
+
*
|
|
26599
|
+
* **The set is this component's own and not `Carousel`'s.** A carousel is a
|
|
26600
|
+
* track: a scroller with snap points, per-view arithmetic and stops it can rest
|
|
26601
|
+
* between. A lightbox shows one thing at a time and has no track, so what it
|
|
26602
|
+
* needs is which item is current, which is `active` and the same pair `Tabs`
|
|
26603
|
+
* uses. The arrow keys move the picture under a reader whose focus stays in the
|
|
26604
|
+
* dialog, which is also why `KeyboardNavigationController` is not the right
|
|
26605
|
+
* tool: that one moves focus between focusable items, and these are pictures.
|
|
26606
|
+
*
|
|
26607
|
+
* **Chrome hides while the reader is still**, on `IdleController`, and comes
|
|
26608
|
+
* back on a pointer move or a focus. `fullscreen` is `FullscreenController`, the
|
|
26609
|
+
* same pair `Video` holds and the only two it shares.
|
|
26610
|
+
*
|
|
26611
|
+
* ## Attributes & Properties
|
|
26612
|
+
*
|
|
26613
|
+
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
|
26614
|
+
*
|
|
26615
|
+
* - `idle-delay`/`idleDelay`: How long the reader may be still before the chrome hides, in milliseconds.
|
|
26616
|
+
*
|
|
26617
|
+
* Zero keeps it up, which is what a viewer with a caption worth reading
|
|
26618
|
+
* wants. The wait is only ever about idling: whether anything else should
|
|
26619
|
+
* keep the chrome up is the consumer's to decide with this.
|
|
26620
|
+
* - `label`: Accessible name for the viewer.
|
|
26621
|
+
* - `loop`: Whether walking past the end comes back to the beginning.
|
|
26622
|
+
* - `status-label`/`statusLabel`: The reading that says where in the set the reader is, with `{index}` and
|
|
26623
|
+
* `{count}` filled in.
|
|
26624
|
+
*
|
|
26625
|
+
* Announced rather than only drawn, because the picture changing under a
|
|
26626
|
+
* reader who cannot see it is otherwise silent. A consumer who has their own
|
|
26627
|
+
* counter in the chrome can empty this and say it themselves.
|
|
26628
|
+
* - `active`: Which item is current, by its `value`.
|
|
26629
|
+
*
|
|
26630
|
+
* Not `option.active`, which is the option the keyboard is on: that is a
|
|
26631
|
+
* different question from which one is chosen.
|
|
26632
|
+
*
|
|
26633
|
+
* Writing always applies, so `<helix-tabs active="one">` starts on that
|
|
26634
|
+
* tab, and `default-active` is how markup says where to start without
|
|
26635
|
+
* naming the current one.
|
|
26636
|
+
* - `default-active`/`defaultActive`: Which item the markup declared current.
|
|
26637
|
+
*
|
|
26638
|
+
* Ignored once `active` is written.
|
|
26639
|
+
* - `open`: Whether the element is open.
|
|
26640
|
+
*
|
|
26641
|
+
* One property, not two, so `dialog.open` answers the question anyone
|
|
26642
|
+
* asking it meant. Writing always applies; `<helix-dialog open>` is the
|
|
26643
|
+
* same statement in markup.
|
|
26644
|
+
*
|
|
26645
|
+
* **Not reflected, and that is required rather than tidy.** Reflection
|
|
26646
|
+
* writes the resolved state back as an attribute, so an element that opened
|
|
26647
|
+
* itself would put `open` on its own host: cloned, serialized for
|
|
26648
|
+
* hydration, or diffed by a framework, it comes back holding whatever the
|
|
26649
|
+
* last reader did rather than what the author wrote. `:state(open)` carries
|
|
26650
|
+
* the resolved state for stylesheets, which is what the mirror is for.
|
|
26651
|
+
* - `default-open`/`defaultOpen`: Whether the markup declared it open. Ignored once `open` is written.
|
|
26652
|
+
* - `whenSettled`: Resolves a frame after the first update, when transitions are switched on.
|
|
26653
|
+
*
|
|
26654
|
+
* **Named `whenSettled` because `settled` is taken four times over**, by
|
|
26655
|
+
* Image, Splitter and both color controls, none of them about transitions. A
|
|
26656
|
+
* base class takes the name every subclass then cannot use.
|
|
26657
|
+
*
|
|
26658
|
+
* **The state it reports cannot be watched, which is why this exists.** A
|
|
26659
|
+
* custom state is deliberately not in the DOM, so there is no
|
|
26660
|
+
* `MutationObserver` equivalent for `ElementInternals.states`. Await this
|
|
26661
|
+
* instead.
|
|
26662
|
+
*
|
|
26663
|
+
* Separate from `updateComplete`, which resolves in the microtask checkpoint
|
|
26664
|
+
* the suppression is still active in. That is the distinction `readyToMove`
|
|
26665
|
+
* in `@fusion.dev/helix-testing` is written around.
|
|
26666
|
+
*
|
|
26667
|
+
* It never resolves where `requestAnimationFrame` never fires, which is a
|
|
26668
|
+
* server, a hidden tab, and happy-dom. Callers that must not hang there race
|
|
26669
|
+
* it against a timeout, as the happy-dom harness's `readyToMove` does. The
|
|
26670
|
+
* browser harness's awaits it alone: a browser always runs the frame, and a
|
|
26671
|
+
* timer beside it was a bet on how long one takes, which a busy run lost. (property only) (readonly)
|
|
26672
|
+
*
|
|
26673
|
+
* ## Events
|
|
26674
|
+
*
|
|
26675
|
+
* Events that will be emitted by the component.
|
|
26676
|
+
*
|
|
26677
|
+
* - `close`: Relayed, because the platform's own does not escape.
|
|
26678
|
+
* - `helix-activate`: Fired once the shown item has moved, so the element already holds it.
|
|
26679
|
+
* - `helix-before-activate`: Fired before the shown item changes, and cancelable. The only way to refuse one.
|
|
26680
|
+
* - `helix-before-close`: Fired before it closes, and cancelable.
|
|
26681
|
+
* - `helix-before-open`: Fired before it opens, and cancelable.
|
|
26682
|
+
* - `toggle`: Says the state moved, carrying `newState` and `oldState`.
|
|
26683
|
+
*
|
|
26684
|
+
* ## Slots
|
|
26685
|
+
*
|
|
26686
|
+
* Areas where markup can be added to the component.
|
|
26687
|
+
*
|
|
26688
|
+
* - `(default)`: The items, which are `<helix-headless-lightbox-item>` elements.
|
|
26689
|
+
* - `footer`: Chrome below the item, such as a counter or a thumbnail strip.
|
|
26690
|
+
* - `header`: Chrome above the item, such as a title and a close button.
|
|
26691
|
+
*
|
|
26692
|
+
* ## Methods
|
|
26693
|
+
*
|
|
26694
|
+
* Methods that can be called to access component functionality.
|
|
26695
|
+
*
|
|
26696
|
+
* - `show() => void`: Opens the viewer, which makes the rest of the page inert.
|
|
26697
|
+
* - `close() => void`: Asks to close, which a consumer may refuse.
|
|
26698
|
+
* - `next() => void`: Shows the next item, or the first where it is past the end and looping.
|
|
26699
|
+
* - `previous() => void`: Shows the previous item, or the last where it is past the start and looping.
|
|
26700
|
+
* - `toggleFullscreen() => void`: Fills the screen with the viewer, or comes back.
|
|
26701
|
+
* - `requestActive(next: string) => boolean`: Requests a new current item, and reports whether the request stood.
|
|
26702
|
+
*
|
|
26703
|
+
* Announces before it acts, so `preventDefault()` on the `helix-before-activate` is
|
|
26704
|
+
* a refusal and nothing moves. Unlike a native control, nothing has moved
|
|
26705
|
+
* by the time this runs, so refusing is simply not writing: there is
|
|
26706
|
+
* nothing to put back. Nobody refusing means the set updates itself,
|
|
26707
|
+
* whether or not a consumer declared `active`, a declared property being a
|
|
26708
|
+
* seed and a correction.
|
|
26709
|
+
* - `requestOpen(next: boolean) => boolean`: Requests an open-state change, and reports whether it was applied.
|
|
26710
|
+
*
|
|
26711
|
+
* Announces before it acts, so `preventDefault()` on the `helix-before-open` or
|
|
26712
|
+
* `helix-before-close` is a refusal and nothing moves. Nobody refusing means the
|
|
26713
|
+
* element opens or closes itself, whether or not a consumer declared
|
|
26714
|
+
* `open`: a declared property is a seed and a correction, and a consumer
|
|
26715
|
+
* who wants the decision for themselves refuses it and assigns their own.
|
|
26716
|
+
* - `toggleOpen() => boolean`: Requests the opposite of the current state.
|
|
26717
|
+
*
|
|
26718
|
+
* ## CSS Parts
|
|
26719
|
+
*
|
|
26720
|
+
* Custom selectors for styling elements within the component.
|
|
26721
|
+
*
|
|
26722
|
+
* - `dialog`: The native dialog element.
|
|
26723
|
+
* - `live`: The region that says which item is shown.
|
|
26724
|
+
* - `viewport`: The box the current item is shown in.
|
|
26725
|
+
*
|
|
26726
|
+
* ## CSS States
|
|
26727
|
+
*
|
|
26728
|
+
* These can be used to apply styling when a component is in a given state.
|
|
26729
|
+
*
|
|
26730
|
+
* - `fullscreen`: While the viewer fills the screen.
|
|
26731
|
+
* - `idle`: While the reader has been still long enough to hide the chrome.
|
|
26732
|
+
* - `open`: While the viewer is open.
|
|
26733
|
+
* - `settled`: Set a frame after the first render. Transitions are held off until it is, so an element never animates its own arrival.
|
|
26734
|
+
*/
|
|
26735
|
+
"helix-headless-lightbox": Partial<
|
|
26736
|
+
HelixHeadlessLightboxProps & BaseProps<HelixHeadlessLightbox> & BaseEvents<HelixHeadlessLightbox>
|
|
26737
|
+
>;
|
|
26738
|
+
|
|
26160
26739
|
/**
|
|
26161
26740
|
* The chart for a shape rather than for a quantity, which is what decides the
|
|
26162
26741
|
* one thing a bar chart is not allowed to do.
|
|
@@ -26906,6 +27485,127 @@ export type CustomElements = {
|
|
|
26906
27485
|
HelixHeadlessLoaderProps & BaseProps<HelixHeadlessLoader> & BaseEvents<HelixHeadlessLoader>
|
|
26907
27486
|
>;
|
|
26908
27487
|
|
|
27488
|
+
/**
|
|
27489
|
+
* **Helix draws no map.** There are no tiles here, no projection and no
|
|
27490
|
+
* network, and there should not be: a tile renderer is a library, and what a
|
|
27491
|
+
* design system can add to MapLibre or Leaflet is the frame. The consumer slots
|
|
27492
|
+
* their map and this owns the box, the name, the controls and the way out,
|
|
27493
|
+
* which is the shape `VideoPlaylist` uses for a player it never renders.
|
|
27494
|
+
*
|
|
27495
|
+
* **The accessibility argument is the reason this exists**, and it was measured
|
|
27496
|
+
* rather than assumed: a map embedded the ordinary way is a canvas with no role
|
|
27497
|
+
* and no name, and it has *no node at all* in the accessibility tree. A reader
|
|
27498
|
+
* using a screen reader does not walk past it so much as never meet it. A named
|
|
27499
|
+
* region with controls in it is the whole of the difference.
|
|
27500
|
+
*
|
|
27501
|
+
* **The controls are buttons, and that is a deliberate choice against arrow
|
|
27502
|
+
* keys.** Arrows work here too, but what a screen reader does with them is not
|
|
27503
|
+
* ours to decide: macOS passes them through, Windows readers hold them for
|
|
27504
|
+
* their own reading mode unless a page takes `role="application"`, which costs
|
|
27505
|
+
* the reader their normal way of reading everything else in the frame. A button
|
|
27506
|
+
* is findable and operable in every screen reader on every platform without
|
|
27507
|
+
* that bargain, so panning and zooming are buttons first and keys second.
|
|
27508
|
+
*
|
|
27509
|
+
* **Nothing here moves the map.** Both controls ask, through `helix-map-pan`
|
|
27510
|
+
* and `helix-map-zoom`, and the consumer answers against whatever they slotted.
|
|
27511
|
+
* A frame that moved the map would have to know whose map it was.
|
|
27512
|
+
*
|
|
27513
|
+
* ## Attributes & Properties
|
|
27514
|
+
*
|
|
27515
|
+
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
|
27516
|
+
*
|
|
27517
|
+
* - `fullscreen-label`/`fullscreenLabel`: What the control that fills the screen is called.
|
|
27518
|
+
* - `idle-delay`/`idleDelay`: How long the reader may be still before the chrome hides, in milliseconds.
|
|
27519
|
+
*
|
|
27520
|
+
* Zero keeps it up, which is the default: a map's controls are how a keyboard
|
|
27521
|
+
* reader operates it, and chrome that hides itself by default would be this
|
|
27522
|
+
* component undoing its own argument. Set it for a display map nobody drives.
|
|
27523
|
+
* - `label`: Accessible name for the map, which is the one thing a consumer must write.
|
|
27524
|
+
*
|
|
27525
|
+
* There is no sensible default. "Map" names the widget rather than the place,
|
|
27526
|
+
* and a reader meeting three of them on a page learns nothing from hearing the
|
|
27527
|
+
* same word three times.
|
|
27528
|
+
* - `pan-label`/`panLabel`: What the controls are called, for a page not in English.
|
|
27529
|
+
* - `pan-step`/`panStep`: How far one press moves the map, as a fraction of what is on screen.
|
|
27530
|
+
*
|
|
27531
|
+
* A fraction rather than a distance, because this frame does not know the
|
|
27532
|
+
* scale of what is inside it: a quarter of the viewport is the same gesture at
|
|
27533
|
+
* street level and at country level, and a consumer who wants metres can
|
|
27534
|
+
* multiply by their own.
|
|
27535
|
+
* - `zoom-in-label`/`zoomInLabel`: What the zoom controls are called.
|
|
27536
|
+
* - `zoom-out-label`/`zoomOutLabel`: What the zoom control that goes the other way is called.
|
|
27537
|
+
* - `whenSettled`: Resolves a frame after the first update, when transitions are switched on.
|
|
27538
|
+
*
|
|
27539
|
+
* **Named `whenSettled` because `settled` is taken four times over**, by
|
|
27540
|
+
* Image, Splitter and both color controls, none of them about transitions. A
|
|
27541
|
+
* base class takes the name every subclass then cannot use.
|
|
27542
|
+
*
|
|
27543
|
+
* **The state it reports cannot be watched, which is why this exists.** A
|
|
27544
|
+
* custom state is deliberately not in the DOM, so there is no
|
|
27545
|
+
* `MutationObserver` equivalent for `ElementInternals.states`. Await this
|
|
27546
|
+
* instead.
|
|
27547
|
+
*
|
|
27548
|
+
* Separate from `updateComplete`, which resolves in the microtask checkpoint
|
|
27549
|
+
* the suppression is still active in. That is the distinction `readyToMove`
|
|
27550
|
+
* in `@fusion.dev/helix-testing` is written around.
|
|
27551
|
+
*
|
|
27552
|
+
* It never resolves where `requestAnimationFrame` never fires, which is a
|
|
27553
|
+
* server, a hidden tab, and happy-dom. Callers that must not hang there race
|
|
27554
|
+
* it against a timeout, as the happy-dom harness's `readyToMove` does. The
|
|
27555
|
+
* browser harness's awaits it alone: a browser always runs the frame, and a
|
|
27556
|
+
* timer beside it was a bet on how long one takes, which a busy run lost. (property only) (readonly)
|
|
27557
|
+
*
|
|
27558
|
+
* ## Events
|
|
27559
|
+
*
|
|
27560
|
+
* Events that will be emitted by the component.
|
|
27561
|
+
*
|
|
27562
|
+
* - `helix-map-pan`: The reader asked the map to move. Answer it against your own map.
|
|
27563
|
+
* - `helix-map-zoom`: The reader asked the map to zoom, by a direction rather than to a level.
|
|
27564
|
+
*
|
|
27565
|
+
* ## Slots
|
|
27566
|
+
*
|
|
27567
|
+
* Areas where markup can be added to the component.
|
|
27568
|
+
*
|
|
27569
|
+
* - `(default)`: The map, which is the consumer's own.
|
|
27570
|
+
* - `attribution`: Whoever the tiles belong to, which most licenses require you to say.
|
|
27571
|
+
* - `footer`: Chrome below the map, such as a legend or a scale.
|
|
27572
|
+
* - `header`: Chrome above the map, such as a title or a search field.
|
|
27573
|
+
*
|
|
27574
|
+
* ## Methods
|
|
27575
|
+
*
|
|
27576
|
+
* Methods that can be called to access component functionality.
|
|
27577
|
+
*
|
|
27578
|
+
* - `toggleFullscreen() => void`: Fills the screen with the frame, or comes back.
|
|
27579
|
+
* - `pan(to: Way) => void`: Asks for the map to move, which the consumer answers.
|
|
27580
|
+
* - `zoom(by: number) => void`: Asks for the map to zoom, `1` in and `-1` out.
|
|
27581
|
+
*
|
|
27582
|
+
* ## CSS Parts
|
|
27583
|
+
*
|
|
27584
|
+
* Custom selectors for styling elements within the component.
|
|
27585
|
+
*
|
|
27586
|
+
* - `controls`: The group the pan and zoom buttons sit in.
|
|
27587
|
+
* - `fullscreen`: The button that fills the screen.
|
|
27588
|
+
* - `pan-down`: The button that moves the map down.
|
|
27589
|
+
* - `pan-end`: The button that moves the map the way the text ends, which is right on an English page.
|
|
27590
|
+
* - `pan-start`: The button that moves the map the way the text starts, which is left on an English page.
|
|
27591
|
+
* - `pan-up`: The button that moves the map up.
|
|
27592
|
+
* - `region`: The named region the map is slotted into.
|
|
27593
|
+
* - `viewport`: The box the map is drawn in.
|
|
27594
|
+
* - `zoom-in`: The button that zooms in.
|
|
27595
|
+
* - `zoom-out`: The button that zooms out.
|
|
27596
|
+
*
|
|
27597
|
+
* ## CSS States
|
|
27598
|
+
*
|
|
27599
|
+
* These can be used to apply styling when a component is in a given state.
|
|
27600
|
+
*
|
|
27601
|
+
* - `fullscreen`: While the frame fills the screen.
|
|
27602
|
+
* - `idle`: While the reader has been still long enough to hide the chrome.
|
|
27603
|
+
* - `settled`: Set a frame after the first render. Transitions are held off until it is, so an element never animates its own arrival.
|
|
27604
|
+
*/
|
|
27605
|
+
"helix-headless-map": Partial<
|
|
27606
|
+
HelixHeadlessMapProps & BaseProps<HelixHeadlessMap> & BaseEvents<HelixHeadlessMap>
|
|
27607
|
+
>;
|
|
27608
|
+
|
|
26909
27609
|
/**
|
|
26910
27610
|
* **A disclosure, not a menu, and that is the whole design.** `role="menu"` and
|
|
26911
27611
|
* `menuitem` are for an application's commands: they take over the arrow keys,
|
|
@@ -44264,6 +44964,231 @@ export type CustomElementsSolidJs = {
|
|
|
44264
44964
|
BaseEvents<HelixHeadlessLegend>
|
|
44265
44965
|
>;
|
|
44266
44966
|
|
|
44967
|
+
/**
|
|
44968
|
+
* A wrapper around whatever the consumer opened, which is the whole of what it
|
|
44969
|
+
* is: a picture, a frame of video, a chart. The family shows one at a time and
|
|
44970
|
+
* this is how it says which, so the content stays the consumer's and the
|
|
44971
|
+
* arithmetic stays the root's.
|
|
44972
|
+
*
|
|
44973
|
+
* Hidden rather than unmounted while another item is current, for the reason
|
|
44974
|
+
* `TabPanel` gives: what is in the markup is what a crawler reads and what a
|
|
44975
|
+
* server sent, and an `<img>` that has already decoded does not decode again
|
|
44976
|
+
* when the reader walks back to it.
|
|
44977
|
+
*
|
|
44978
|
+
* ## Attributes & Properties
|
|
44979
|
+
*
|
|
44980
|
+
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
|
44981
|
+
*
|
|
44982
|
+
* - `current`: Whether this is the one being shown.
|
|
44983
|
+
*
|
|
44984
|
+
* Written by the root, which is the only thing that sees the set.
|
|
44985
|
+
* - `label`: What this item is called, for the reading that says where the reader is.
|
|
44986
|
+
* - `value`: What names this item, and what `active` on the root is compared against.
|
|
44987
|
+
* - `whenSettled`: Resolves a frame after the first update, when transitions are switched on.
|
|
44988
|
+
*
|
|
44989
|
+
* **Named `whenSettled` because `settled` is taken four times over**, by
|
|
44990
|
+
* Image, Splitter and both color controls, none of them about transitions. A
|
|
44991
|
+
* base class takes the name every subclass then cannot use.
|
|
44992
|
+
*
|
|
44993
|
+
* **The state it reports cannot be watched, which is why this exists.** A
|
|
44994
|
+
* custom state is deliberately not in the DOM, so there is no
|
|
44995
|
+
* `MutationObserver` equivalent for `ElementInternals.states`. Await this
|
|
44996
|
+
* instead.
|
|
44997
|
+
*
|
|
44998
|
+
* Separate from `updateComplete`, which resolves in the microtask checkpoint
|
|
44999
|
+
* the suppression is still active in. That is the distinction `readyToMove`
|
|
45000
|
+
* in `@fusion.dev/helix-testing` is written around.
|
|
45001
|
+
*
|
|
45002
|
+
* It never resolves where `requestAnimationFrame` never fires, which is a
|
|
45003
|
+
* server, a hidden tab, and happy-dom. Callers that must not hang there race
|
|
45004
|
+
* it against a timeout, as the happy-dom harness's `readyToMove` does. The
|
|
45005
|
+
* browser harness's awaits it alone: a browser always runs the frame, and a
|
|
45006
|
+
* timer beside it was a bet on how long one takes, which a busy run lost. (property only) (readonly)
|
|
45007
|
+
*
|
|
45008
|
+
* ## Slots
|
|
45009
|
+
*
|
|
45010
|
+
* Areas where markup can be added to the component.
|
|
45011
|
+
*
|
|
45012
|
+
* - `(default)`: What is being shown.
|
|
45013
|
+
* - `description`: A line under it saying what it is.
|
|
45014
|
+
*
|
|
45015
|
+
* ## CSS Parts
|
|
45016
|
+
*
|
|
45017
|
+
* Custom selectors for styling elements within the component.
|
|
45018
|
+
*
|
|
45019
|
+
* - `item`: The box the content is shown in.
|
|
45020
|
+
*
|
|
45021
|
+
* ## CSS States
|
|
45022
|
+
*
|
|
45023
|
+
* These can be used to apply styling when a component is in a given state.
|
|
45024
|
+
*
|
|
45025
|
+
* - `current`: While this is the item the lightbox is showing.
|
|
45026
|
+
* - `settled`: Set a frame after the first render. Transitions are held off until it is, so an element never animates its own arrival.
|
|
45027
|
+
*/
|
|
45028
|
+
"helix-headless-lightbox-item": Partial<
|
|
45029
|
+
HelixHeadlessLightboxItemProps &
|
|
45030
|
+
HelixHeadlessLightboxItemSolidJsProps &
|
|
45031
|
+
BaseProps<HelixHeadlessLightboxItem> &
|
|
45032
|
+
BaseEvents<HelixHeadlessLightboxItem>
|
|
45033
|
+
>;
|
|
45034
|
+
|
|
45035
|
+
/**
|
|
45036
|
+
* **A lightbox is chrome around a picture rather than a picture.** It draws
|
|
45037
|
+
* nothing of its own: what it shows is whatever the consumer opened, so this
|
|
45038
|
+
* earns its place on the frame, the keyboard and the reading that says where in
|
|
45039
|
+
* the set the reader is.
|
|
45040
|
+
*
|
|
45041
|
+
* **The modal half is the platform's.** A real `<dialog>` opened with
|
|
45042
|
+
* `showModal()` brings the top layer, a backdrop, Escape and `inert` behind it,
|
|
45043
|
+
* and this repository has already removed one hand-written focus trap for being
|
|
45044
|
+
* worse than that: `inert` on the rest of the document is something no
|
|
45045
|
+
* JavaScript trap can achieve. Every way it can close comes back through
|
|
45046
|
+
* `requestOpen`, which is what `Dialog` and `Drawer` both do and for the reason
|
|
45047
|
+
* they both give.
|
|
45048
|
+
*
|
|
45049
|
+
* **The set is this component's own and not `Carousel`'s.** A carousel is a
|
|
45050
|
+
* track: a scroller with snap points, per-view arithmetic and stops it can rest
|
|
45051
|
+
* between. A lightbox shows one thing at a time and has no track, so what it
|
|
45052
|
+
* needs is which item is current, which is `active` and the same pair `Tabs`
|
|
45053
|
+
* uses. The arrow keys move the picture under a reader whose focus stays in the
|
|
45054
|
+
* dialog, which is also why `KeyboardNavigationController` is not the right
|
|
45055
|
+
* tool: that one moves focus between focusable items, and these are pictures.
|
|
45056
|
+
*
|
|
45057
|
+
* **Chrome hides while the reader is still**, on `IdleController`, and comes
|
|
45058
|
+
* back on a pointer move or a focus. `fullscreen` is `FullscreenController`, the
|
|
45059
|
+
* same pair `Video` holds and the only two it shares.
|
|
45060
|
+
*
|
|
45061
|
+
* ## Attributes & Properties
|
|
45062
|
+
*
|
|
45063
|
+
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
|
45064
|
+
*
|
|
45065
|
+
* - `idle-delay`/`idleDelay`: How long the reader may be still before the chrome hides, in milliseconds.
|
|
45066
|
+
*
|
|
45067
|
+
* Zero keeps it up, which is what a viewer with a caption worth reading
|
|
45068
|
+
* wants. The wait is only ever about idling: whether anything else should
|
|
45069
|
+
* keep the chrome up is the consumer's to decide with this.
|
|
45070
|
+
* - `label`: Accessible name for the viewer.
|
|
45071
|
+
* - `loop`: Whether walking past the end comes back to the beginning.
|
|
45072
|
+
* - `status-label`/`statusLabel`: The reading that says where in the set the reader is, with `{index}` and
|
|
45073
|
+
* `{count}` filled in.
|
|
45074
|
+
*
|
|
45075
|
+
* Announced rather than only drawn, because the picture changing under a
|
|
45076
|
+
* reader who cannot see it is otherwise silent. A consumer who has their own
|
|
45077
|
+
* counter in the chrome can empty this and say it themselves.
|
|
45078
|
+
* - `active`: Which item is current, by its `value`.
|
|
45079
|
+
*
|
|
45080
|
+
* Not `option.active`, which is the option the keyboard is on: that is a
|
|
45081
|
+
* different question from which one is chosen.
|
|
45082
|
+
*
|
|
45083
|
+
* Writing always applies, so `<helix-tabs active="one">` starts on that
|
|
45084
|
+
* tab, and `default-active` is how markup says where to start without
|
|
45085
|
+
* naming the current one.
|
|
45086
|
+
* - `default-active`/`defaultActive`: Which item the markup declared current.
|
|
45087
|
+
*
|
|
45088
|
+
* Ignored once `active` is written.
|
|
45089
|
+
* - `open`: Whether the element is open.
|
|
45090
|
+
*
|
|
45091
|
+
* One property, not two, so `dialog.open` answers the question anyone
|
|
45092
|
+
* asking it meant. Writing always applies; `<helix-dialog open>` is the
|
|
45093
|
+
* same statement in markup.
|
|
45094
|
+
*
|
|
45095
|
+
* **Not reflected, and that is required rather than tidy.** Reflection
|
|
45096
|
+
* writes the resolved state back as an attribute, so an element that opened
|
|
45097
|
+
* itself would put `open` on its own host: cloned, serialized for
|
|
45098
|
+
* hydration, or diffed by a framework, it comes back holding whatever the
|
|
45099
|
+
* last reader did rather than what the author wrote. `:state(open)` carries
|
|
45100
|
+
* the resolved state for stylesheets, which is what the mirror is for.
|
|
45101
|
+
* - `default-open`/`defaultOpen`: Whether the markup declared it open. Ignored once `open` is written.
|
|
45102
|
+
* - `whenSettled`: Resolves a frame after the first update, when transitions are switched on.
|
|
45103
|
+
*
|
|
45104
|
+
* **Named `whenSettled` because `settled` is taken four times over**, by
|
|
45105
|
+
* Image, Splitter and both color controls, none of them about transitions. A
|
|
45106
|
+
* base class takes the name every subclass then cannot use.
|
|
45107
|
+
*
|
|
45108
|
+
* **The state it reports cannot be watched, which is why this exists.** A
|
|
45109
|
+
* custom state is deliberately not in the DOM, so there is no
|
|
45110
|
+
* `MutationObserver` equivalent for `ElementInternals.states`. Await this
|
|
45111
|
+
* instead.
|
|
45112
|
+
*
|
|
45113
|
+
* Separate from `updateComplete`, which resolves in the microtask checkpoint
|
|
45114
|
+
* the suppression is still active in. That is the distinction `readyToMove`
|
|
45115
|
+
* in `@fusion.dev/helix-testing` is written around.
|
|
45116
|
+
*
|
|
45117
|
+
* It never resolves where `requestAnimationFrame` never fires, which is a
|
|
45118
|
+
* server, a hidden tab, and happy-dom. Callers that must not hang there race
|
|
45119
|
+
* it against a timeout, as the happy-dom harness's `readyToMove` does. The
|
|
45120
|
+
* browser harness's awaits it alone: a browser always runs the frame, and a
|
|
45121
|
+
* timer beside it was a bet on how long one takes, which a busy run lost. (property only) (readonly)
|
|
45122
|
+
*
|
|
45123
|
+
* ## Events
|
|
45124
|
+
*
|
|
45125
|
+
* Events that will be emitted by the component.
|
|
45126
|
+
*
|
|
45127
|
+
* - `close`: Relayed, because the platform's own does not escape.
|
|
45128
|
+
* - `helix-activate`: Fired once the shown item has moved, so the element already holds it.
|
|
45129
|
+
* - `helix-before-activate`: Fired before the shown item changes, and cancelable. The only way to refuse one.
|
|
45130
|
+
* - `helix-before-close`: Fired before it closes, and cancelable.
|
|
45131
|
+
* - `helix-before-open`: Fired before it opens, and cancelable.
|
|
45132
|
+
* - `toggle`: Says the state moved, carrying `newState` and `oldState`.
|
|
45133
|
+
*
|
|
45134
|
+
* ## Slots
|
|
45135
|
+
*
|
|
45136
|
+
* Areas where markup can be added to the component.
|
|
45137
|
+
*
|
|
45138
|
+
* - `(default)`: The items, which are `<helix-headless-lightbox-item>` elements.
|
|
45139
|
+
* - `footer`: Chrome below the item, such as a counter or a thumbnail strip.
|
|
45140
|
+
* - `header`: Chrome above the item, such as a title and a close button.
|
|
45141
|
+
*
|
|
45142
|
+
* ## Methods
|
|
45143
|
+
*
|
|
45144
|
+
* Methods that can be called to access component functionality.
|
|
45145
|
+
*
|
|
45146
|
+
* - `show() => void`: Opens the viewer, which makes the rest of the page inert.
|
|
45147
|
+
* - `close() => void`: Asks to close, which a consumer may refuse.
|
|
45148
|
+
* - `next() => void`: Shows the next item, or the first where it is past the end and looping.
|
|
45149
|
+
* - `previous() => void`: Shows the previous item, or the last where it is past the start and looping.
|
|
45150
|
+
* - `toggleFullscreen() => void`: Fills the screen with the viewer, or comes back.
|
|
45151
|
+
* - `requestActive(next: string) => boolean`: Requests a new current item, and reports whether the request stood.
|
|
45152
|
+
*
|
|
45153
|
+
* Announces before it acts, so `preventDefault()` on the `helix-before-activate` is
|
|
45154
|
+
* a refusal and nothing moves. Unlike a native control, nothing has moved
|
|
45155
|
+
* by the time this runs, so refusing is simply not writing: there is
|
|
45156
|
+
* nothing to put back. Nobody refusing means the set updates itself,
|
|
45157
|
+
* whether or not a consumer declared `active`, a declared property being a
|
|
45158
|
+
* seed and a correction.
|
|
45159
|
+
* - `requestOpen(next: boolean) => boolean`: Requests an open-state change, and reports whether it was applied.
|
|
45160
|
+
*
|
|
45161
|
+
* Announces before it acts, so `preventDefault()` on the `helix-before-open` or
|
|
45162
|
+
* `helix-before-close` is a refusal and nothing moves. Nobody refusing means the
|
|
45163
|
+
* element opens or closes itself, whether or not a consumer declared
|
|
45164
|
+
* `open`: a declared property is a seed and a correction, and a consumer
|
|
45165
|
+
* who wants the decision for themselves refuses it and assigns their own.
|
|
45166
|
+
* - `toggleOpen() => boolean`: Requests the opposite of the current state.
|
|
45167
|
+
*
|
|
45168
|
+
* ## CSS Parts
|
|
45169
|
+
*
|
|
45170
|
+
* Custom selectors for styling elements within the component.
|
|
45171
|
+
*
|
|
45172
|
+
* - `dialog`: The native dialog element.
|
|
45173
|
+
* - `live`: The region that says which item is shown.
|
|
45174
|
+
* - `viewport`: The box the current item is shown in.
|
|
45175
|
+
*
|
|
45176
|
+
* ## CSS States
|
|
45177
|
+
*
|
|
45178
|
+
* These can be used to apply styling when a component is in a given state.
|
|
45179
|
+
*
|
|
45180
|
+
* - `fullscreen`: While the viewer fills the screen.
|
|
45181
|
+
* - `idle`: While the reader has been still long enough to hide the chrome.
|
|
45182
|
+
* - `open`: While the viewer is open.
|
|
45183
|
+
* - `settled`: Set a frame after the first render. Transitions are held off until it is, so an element never animates its own arrival.
|
|
45184
|
+
*/
|
|
45185
|
+
"helix-headless-lightbox": Partial<
|
|
45186
|
+
HelixHeadlessLightboxProps &
|
|
45187
|
+
HelixHeadlessLightboxSolidJsProps &
|
|
45188
|
+
BaseProps<HelixHeadlessLightbox> &
|
|
45189
|
+
BaseEvents<HelixHeadlessLightbox>
|
|
45190
|
+
>;
|
|
45191
|
+
|
|
44267
45192
|
/**
|
|
44268
45193
|
* The chart for a shape rather than for a quantity, which is what decides the
|
|
44269
45194
|
* one thing a bar chart is not allowed to do.
|
|
@@ -45028,6 +45953,130 @@ export type CustomElementsSolidJs = {
|
|
|
45028
45953
|
BaseEvents<HelixHeadlessLoader>
|
|
45029
45954
|
>;
|
|
45030
45955
|
|
|
45956
|
+
/**
|
|
45957
|
+
* **Helix draws no map.** There are no tiles here, no projection and no
|
|
45958
|
+
* network, and there should not be: a tile renderer is a library, and what a
|
|
45959
|
+
* design system can add to MapLibre or Leaflet is the frame. The consumer slots
|
|
45960
|
+
* their map and this owns the box, the name, the controls and the way out,
|
|
45961
|
+
* which is the shape `VideoPlaylist` uses for a player it never renders.
|
|
45962
|
+
*
|
|
45963
|
+
* **The accessibility argument is the reason this exists**, and it was measured
|
|
45964
|
+
* rather than assumed: a map embedded the ordinary way is a canvas with no role
|
|
45965
|
+
* and no name, and it has *no node at all* in the accessibility tree. A reader
|
|
45966
|
+
* using a screen reader does not walk past it so much as never meet it. A named
|
|
45967
|
+
* region with controls in it is the whole of the difference.
|
|
45968
|
+
*
|
|
45969
|
+
* **The controls are buttons, and that is a deliberate choice against arrow
|
|
45970
|
+
* keys.** Arrows work here too, but what a screen reader does with them is not
|
|
45971
|
+
* ours to decide: macOS passes them through, Windows readers hold them for
|
|
45972
|
+
* their own reading mode unless a page takes `role="application"`, which costs
|
|
45973
|
+
* the reader their normal way of reading everything else in the frame. A button
|
|
45974
|
+
* is findable and operable in every screen reader on every platform without
|
|
45975
|
+
* that bargain, so panning and zooming are buttons first and keys second.
|
|
45976
|
+
*
|
|
45977
|
+
* **Nothing here moves the map.** Both controls ask, through `helix-map-pan`
|
|
45978
|
+
* and `helix-map-zoom`, and the consumer answers against whatever they slotted.
|
|
45979
|
+
* A frame that moved the map would have to know whose map it was.
|
|
45980
|
+
*
|
|
45981
|
+
* ## Attributes & Properties
|
|
45982
|
+
*
|
|
45983
|
+
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
|
45984
|
+
*
|
|
45985
|
+
* - `fullscreen-label`/`fullscreenLabel`: What the control that fills the screen is called.
|
|
45986
|
+
* - `idle-delay`/`idleDelay`: How long the reader may be still before the chrome hides, in milliseconds.
|
|
45987
|
+
*
|
|
45988
|
+
* Zero keeps it up, which is the default: a map's controls are how a keyboard
|
|
45989
|
+
* reader operates it, and chrome that hides itself by default would be this
|
|
45990
|
+
* component undoing its own argument. Set it for a display map nobody drives.
|
|
45991
|
+
* - `label`: Accessible name for the map, which is the one thing a consumer must write.
|
|
45992
|
+
*
|
|
45993
|
+
* There is no sensible default. "Map" names the widget rather than the place,
|
|
45994
|
+
* and a reader meeting three of them on a page learns nothing from hearing the
|
|
45995
|
+
* same word three times.
|
|
45996
|
+
* - `pan-label`/`panLabel`: What the controls are called, for a page not in English.
|
|
45997
|
+
* - `pan-step`/`panStep`: How far one press moves the map, as a fraction of what is on screen.
|
|
45998
|
+
*
|
|
45999
|
+
* A fraction rather than a distance, because this frame does not know the
|
|
46000
|
+
* scale of what is inside it: a quarter of the viewport is the same gesture at
|
|
46001
|
+
* street level and at country level, and a consumer who wants metres can
|
|
46002
|
+
* multiply by their own.
|
|
46003
|
+
* - `zoom-in-label`/`zoomInLabel`: What the zoom controls are called.
|
|
46004
|
+
* - `zoom-out-label`/`zoomOutLabel`: What the zoom control that goes the other way is called.
|
|
46005
|
+
* - `whenSettled`: Resolves a frame after the first update, when transitions are switched on.
|
|
46006
|
+
*
|
|
46007
|
+
* **Named `whenSettled` because `settled` is taken four times over**, by
|
|
46008
|
+
* Image, Splitter and both color controls, none of them about transitions. A
|
|
46009
|
+
* base class takes the name every subclass then cannot use.
|
|
46010
|
+
*
|
|
46011
|
+
* **The state it reports cannot be watched, which is why this exists.** A
|
|
46012
|
+
* custom state is deliberately not in the DOM, so there is no
|
|
46013
|
+
* `MutationObserver` equivalent for `ElementInternals.states`. Await this
|
|
46014
|
+
* instead.
|
|
46015
|
+
*
|
|
46016
|
+
* Separate from `updateComplete`, which resolves in the microtask checkpoint
|
|
46017
|
+
* the suppression is still active in. That is the distinction `readyToMove`
|
|
46018
|
+
* in `@fusion.dev/helix-testing` is written around.
|
|
46019
|
+
*
|
|
46020
|
+
* It never resolves where `requestAnimationFrame` never fires, which is a
|
|
46021
|
+
* server, a hidden tab, and happy-dom. Callers that must not hang there race
|
|
46022
|
+
* it against a timeout, as the happy-dom harness's `readyToMove` does. The
|
|
46023
|
+
* browser harness's awaits it alone: a browser always runs the frame, and a
|
|
46024
|
+
* timer beside it was a bet on how long one takes, which a busy run lost. (property only) (readonly)
|
|
46025
|
+
*
|
|
46026
|
+
* ## Events
|
|
46027
|
+
*
|
|
46028
|
+
* Events that will be emitted by the component.
|
|
46029
|
+
*
|
|
46030
|
+
* - `helix-map-pan`: The reader asked the map to move. Answer it against your own map.
|
|
46031
|
+
* - `helix-map-zoom`: The reader asked the map to zoom, by a direction rather than to a level.
|
|
46032
|
+
*
|
|
46033
|
+
* ## Slots
|
|
46034
|
+
*
|
|
46035
|
+
* Areas where markup can be added to the component.
|
|
46036
|
+
*
|
|
46037
|
+
* - `(default)`: The map, which is the consumer's own.
|
|
46038
|
+
* - `attribution`: Whoever the tiles belong to, which most licenses require you to say.
|
|
46039
|
+
* - `footer`: Chrome below the map, such as a legend or a scale.
|
|
46040
|
+
* - `header`: Chrome above the map, such as a title or a search field.
|
|
46041
|
+
*
|
|
46042
|
+
* ## Methods
|
|
46043
|
+
*
|
|
46044
|
+
* Methods that can be called to access component functionality.
|
|
46045
|
+
*
|
|
46046
|
+
* - `toggleFullscreen() => void`: Fills the screen with the frame, or comes back.
|
|
46047
|
+
* - `pan(to: Way) => void`: Asks for the map to move, which the consumer answers.
|
|
46048
|
+
* - `zoom(by: number) => void`: Asks for the map to zoom, `1` in and `-1` out.
|
|
46049
|
+
*
|
|
46050
|
+
* ## CSS Parts
|
|
46051
|
+
*
|
|
46052
|
+
* Custom selectors for styling elements within the component.
|
|
46053
|
+
*
|
|
46054
|
+
* - `controls`: The group the pan and zoom buttons sit in.
|
|
46055
|
+
* - `fullscreen`: The button that fills the screen.
|
|
46056
|
+
* - `pan-down`: The button that moves the map down.
|
|
46057
|
+
* - `pan-end`: The button that moves the map the way the text ends, which is right on an English page.
|
|
46058
|
+
* - `pan-start`: The button that moves the map the way the text starts, which is left on an English page.
|
|
46059
|
+
* - `pan-up`: The button that moves the map up.
|
|
46060
|
+
* - `region`: The named region the map is slotted into.
|
|
46061
|
+
* - `viewport`: The box the map is drawn in.
|
|
46062
|
+
* - `zoom-in`: The button that zooms in.
|
|
46063
|
+
* - `zoom-out`: The button that zooms out.
|
|
46064
|
+
*
|
|
46065
|
+
* ## CSS States
|
|
46066
|
+
*
|
|
46067
|
+
* These can be used to apply styling when a component is in a given state.
|
|
46068
|
+
*
|
|
46069
|
+
* - `fullscreen`: While the frame fills the screen.
|
|
46070
|
+
* - `idle`: While the reader has been still long enough to hide the chrome.
|
|
46071
|
+
* - `settled`: Set a frame after the first render. Transitions are held off until it is, so an element never animates its own arrival.
|
|
46072
|
+
*/
|
|
46073
|
+
"helix-headless-map": Partial<
|
|
46074
|
+
HelixHeadlessMapProps &
|
|
46075
|
+
HelixHeadlessMapSolidJsProps &
|
|
46076
|
+
BaseProps<HelixHeadlessMap> &
|
|
46077
|
+
BaseEvents<HelixHeadlessMap>
|
|
46078
|
+
>;
|
|
46079
|
+
|
|
45031
46080
|
/**
|
|
45032
46081
|
* **A disclosure, not a menu, and that is the whole design.** `role="menu"` and
|
|
45033
46082
|
* `menuitem` are for an application's commands: they take over the arrow keys,
|