@fusion.dev/helix 0.99.0 → 0.101.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
@@ -82,6 +82,8 @@ import type {
82
82
  HelixInput,
83
83
  HelixKbd,
84
84
  HelixLegend,
85
+ HelixLightbox,
86
+ HelixLightboxItem,
85
87
  HelixLineChart,
86
88
  HelixList,
87
89
  HelixListItem,
@@ -10536,6 +10538,222 @@ shadow root reads a table in that root rather than one in the document.
10536
10538
  textContent?: (string | number) | undefined;
10537
10539
  };
10538
10540
 
10541
+ export type HelixLightboxItemProps = {
10542
+ /** Whether this is the one being shown.
10543
+
10544
+ Written by the root, which is the only thing that sees the set. */
10545
+ current?: (HelixLightboxItem["current"]) | undefined;
10546
+ /** What this item is called, for the reading that says where the reader is. */
10547
+ label?: (HelixLightboxItem["label"]) | undefined;
10548
+ /** What names this item, and what `active` on the root is compared against. */
10549
+ value?: (HelixLightboxItem["value"]) | undefined;
10550
+ };
10551
+
10552
+ export type HelixLightboxItemSolidJsProps = {
10553
+ /** Whether this is the one being shown.
10554
+
10555
+ Written by the root, which is the only thing that sees the set. */
10556
+ "prop:current"?: (HelixLightboxItem["current"]) | undefined;
10557
+ /** What this item is called, for the reading that says where the reader is. */
10558
+ "prop:label"?: (HelixLightboxItem["label"]) | undefined;
10559
+ /** What names this item, and what `active` on the root is compared against. */
10560
+ "prop:value"?: (HelixLightboxItem["value"]) | undefined;
10561
+
10562
+ /** Set the innerHTML of the element */
10563
+ innerHTML?: (string) | undefined;
10564
+ /** Set the textContent of the element */
10565
+ textContent?: (string | number) | undefined;
10566
+ };
10567
+
10568
+ /** `HelixLightbox` component event */
10569
+ export type HelixLightboxElementEvent<E = Event> = TypedEvent<HelixLightbox, E>;
10570
+ /** `helix-activate` event type */
10571
+ export type HelixLightboxHelixActivateElementEvent =
10572
+ HelixLightboxElementEvent<HelixActivateEvent>;
10573
+ /** `helix-before-activate` event type */
10574
+ export type HelixLightboxHelixBeforeActivateElementEvent =
10575
+ HelixLightboxElementEvent<HelixBeforeActivateEvent>;
10576
+ /** `helix-before-close` event type */
10577
+ export type HelixLightboxHelixBeforeCloseElementEvent =
10578
+ HelixLightboxElementEvent<HelixBeforeCloseEvent>;
10579
+ /** `helix-before-open` event type */
10580
+ export type HelixLightboxHelixBeforeOpenElementEvent =
10581
+ HelixLightboxElementEvent<HelixBeforeOpenEvent>;
10582
+
10583
+ export type HelixLightboxProps = {
10584
+ /** Which item is current, by its `value`.
10585
+
10586
+ Not `option.active`, which is the option the keyboard is on: that is a
10587
+ different question from which one is chosen.
10588
+
10589
+ Writing always applies, so `<helix-tabs active="one">` starts on that
10590
+ tab, and `default-active` is how markup says where to start without
10591
+ naming the current one. */
10592
+ active?: (HelixLightbox["active"]) | undefined;
10593
+ /** Which item the markup declared current.
10594
+
10595
+ Ignored once `active` is written. */
10596
+ "default-active"?: (HelixLightbox["defaultActive"]) | undefined;
10597
+ /** Which item the markup declared current.
10598
+
10599
+ Ignored once `active` is written. */
10600
+ defaultActive?: (HelixLightbox["defaultActive"]) | undefined;
10601
+ /** Whether the element is open.
10602
+
10603
+ One property, not two, so `dialog.open` answers the question anyone
10604
+ asking it meant. Writing always applies; `<helix-dialog open>` is the
10605
+ same statement in markup.
10606
+
10607
+ **Not reflected, and that is required rather than tidy.** Reflection
10608
+ writes the resolved state back as an attribute, so an element that opened
10609
+ itself would put `open` on its own host: cloned, serialized for
10610
+ hydration, or diffed by a framework, it comes back holding whatever the
10611
+ last reader did rather than what the author wrote. `:state(open)` carries
10612
+ the resolved state for stylesheets, which is what the mirror is for. */
10613
+ open?: (HelixLightbox["open"]) | undefined;
10614
+ /** Whether the markup declared it open. Ignored once `open` is written. */
10615
+ "default-open"?: (HelixLightbox["defaultOpen"]) | undefined;
10616
+ /** Whether the markup declared it open. Ignored once `open` is written. */
10617
+ defaultOpen?: (HelixLightbox["defaultOpen"]) | undefined;
10618
+ /** How long the reader may be still before the chrome hides, in milliseconds.
10619
+
10620
+ Zero keeps it up, which is what a viewer with a caption worth reading
10621
+ wants. The wait is only ever about idling: whether anything else should
10622
+ keep the chrome up is the consumer's to decide with this. */
10623
+ "idle-delay"?: (HelixLightbox["idleDelay"] | `${number}`) | undefined;
10624
+ /** How long the reader may be still before the chrome hides, in milliseconds.
10625
+
10626
+ Zero keeps it up, which is what a viewer with a caption worth reading
10627
+ wants. The wait is only ever about idling: whether anything else should
10628
+ keep the chrome up is the consumer's to decide with this. */
10629
+ idleDelay?: (HelixLightbox["idleDelay"]) | undefined;
10630
+ /** Accessible name for the viewer. */
10631
+ label?: (HelixLightbox["label"]) | undefined;
10632
+ /** Whether walking past the end comes back to the beginning. */
10633
+ loop?: (HelixLightbox["loop"]) | undefined;
10634
+ /** The reading that says where in the set the reader is, with `{index}` and
10635
+ `{count}` filled in.
10636
+
10637
+ Announced rather than only drawn, because the picture changing under a
10638
+ reader who cannot see it is otherwise silent. A consumer who has their own
10639
+ counter in the chrome can empty this and say it themselves. */
10640
+ "status-label"?: (HelixLightbox["statusLabel"]) | undefined;
10641
+ /** The reading that says where in the set the reader is, with `{index}` and
10642
+ `{count}` filled in.
10643
+
10644
+ Announced rather than only drawn, because the picture changing under a
10645
+ reader who cannot see it is otherwise silent. A consumer who has their own
10646
+ counter in the chrome can empty this and say it themselves. */
10647
+ statusLabel?: (HelixLightbox["statusLabel"]) | undefined;
10648
+
10649
+ /** Fired once the shown item has moved, so the element already holds it. */
10650
+ "onhelix-activate"?: ((e: HelixLightboxHelixActivateElementEvent) => void) | undefined;
10651
+ /** Relayed, because the platform's own does not escape. */
10652
+ onclose?: ((e: HelixLightboxElementEvent) => void) | undefined;
10653
+ /** Fired before the shown item changes, and cancelable. The only way to refuse one. */
10654
+ "onhelix-before-activate"?: ((
10655
+ e: HelixLightboxHelixBeforeActivateElementEvent,
10656
+ ) => void) | undefined;
10657
+ /** Fired before it closes, and cancelable. */
10658
+ "onhelix-before-close"?: ((
10659
+ e: HelixLightboxHelixBeforeCloseElementEvent,
10660
+ ) => void) | undefined;
10661
+ /** Fired before it opens, and cancelable. */
10662
+ "onhelix-before-open"?: ((e: HelixLightboxHelixBeforeOpenElementEvent) => void) | undefined;
10663
+ /** Says the state moved, carrying `newState` and `oldState`. */
10664
+ ontoggle?: ((e: HelixLightboxElementEvent) => void) | undefined;
10665
+ };
10666
+
10667
+ export type HelixLightboxSolidJsProps = {
10668
+ /** Which item is current, by its `value`.
10669
+
10670
+ Not `option.active`, which is the option the keyboard is on: that is a
10671
+ different question from which one is chosen.
10672
+
10673
+ Writing always applies, so `<helix-tabs active="one">` starts on that
10674
+ tab, and `default-active` is how markup says where to start without
10675
+ naming the current one. */
10676
+ "prop:active"?: (HelixLightbox["active"]) | undefined;
10677
+ /** Which item the markup declared current.
10678
+
10679
+ Ignored once `active` is written. */
10680
+ "attr:default-active"?: (HelixLightbox["defaultActive"]) | undefined;
10681
+ /** Which item the markup declared current.
10682
+
10683
+ Ignored once `active` is written. */
10684
+ "prop:defaultActive"?: (HelixLightbox["defaultActive"]) | undefined;
10685
+ /** Whether the element is open.
10686
+
10687
+ One property, not two, so `dialog.open` answers the question anyone
10688
+ asking it meant. Writing always applies; `<helix-dialog open>` is the
10689
+ same statement in markup.
10690
+
10691
+ **Not reflected, and that is required rather than tidy.** Reflection
10692
+ writes the resolved state back as an attribute, so an element that opened
10693
+ itself would put `open` on its own host: cloned, serialized for
10694
+ hydration, or diffed by a framework, it comes back holding whatever the
10695
+ last reader did rather than what the author wrote. `:state(open)` carries
10696
+ the resolved state for stylesheets, which is what the mirror is for. */
10697
+ "prop:open"?: (HelixLightbox["open"]) | undefined;
10698
+ /** Whether the markup declared it open. Ignored once `open` is written. */
10699
+ "bool:default-open"?: (HelixLightbox["defaultOpen"]) | undefined;
10700
+ /** Whether the markup declared it open. Ignored once `open` is written. */
10701
+ "prop:defaultOpen"?: (HelixLightbox["defaultOpen"]) | undefined;
10702
+ /** How long the reader may be still before the chrome hides, in milliseconds.
10703
+
10704
+ Zero keeps it up, which is what a viewer with a caption worth reading
10705
+ wants. The wait is only ever about idling: whether anything else should
10706
+ keep the chrome up is the consumer's to decide with this. */
10707
+ "attr:idle-delay"?: (HelixLightbox["idleDelay"] | `${number}`) | undefined;
10708
+ /** How long the reader may be still before the chrome hides, in milliseconds.
10709
+
10710
+ Zero keeps it up, which is what a viewer with a caption worth reading
10711
+ wants. The wait is only ever about idling: whether anything else should
10712
+ keep the chrome up is the consumer's to decide with this. */
10713
+ "prop:idleDelay"?: (HelixLightbox["idleDelay"]) | undefined;
10714
+ /** Accessible name for the viewer. */
10715
+ "prop:label"?: (HelixLightbox["label"]) | undefined;
10716
+ /** Whether walking past the end comes back to the beginning. */
10717
+ "prop:loop"?: (HelixLightbox["loop"]) | undefined;
10718
+ /** The reading that says where in the set the reader is, with `{index}` and
10719
+ `{count}` filled in.
10720
+
10721
+ Announced rather than only drawn, because the picture changing under a
10722
+ reader who cannot see it is otherwise silent. A consumer who has their own
10723
+ counter in the chrome can empty this and say it themselves. */
10724
+ "attr:status-label"?: (HelixLightbox["statusLabel"]) | undefined;
10725
+ /** The reading that says where in the set the reader is, with `{index}` and
10726
+ `{count}` filled in.
10727
+
10728
+ Announced rather than only drawn, because the picture changing under a
10729
+ reader who cannot see it is otherwise silent. A consumer who has their own
10730
+ counter in the chrome can empty this and say it themselves. */
10731
+ "prop:statusLabel"?: (HelixLightbox["statusLabel"]) | undefined;
10732
+ /** Fired once the shown item has moved, so the element already holds it. */
10733
+ "on:helix-activate"?: ((e: HelixLightboxHelixActivateElementEvent) => void) | undefined;
10734
+ /** Relayed, because the platform's own does not escape. */
10735
+ "on:close"?: ((e: HelixLightboxElementEvent) => void) | undefined;
10736
+ /** Fired before the shown item changes, and cancelable. The only way to refuse one. */
10737
+ "on:helix-before-activate"?: ((
10738
+ e: HelixLightboxHelixBeforeActivateElementEvent,
10739
+ ) => void) | undefined;
10740
+ /** Fired before it closes, and cancelable. */
10741
+ "on:helix-before-close"?: ((
10742
+ e: HelixLightboxHelixBeforeCloseElementEvent,
10743
+ ) => void) | undefined;
10744
+ /** Fired before it opens, and cancelable. */
10745
+ "on:helix-before-open"?: ((
10746
+ e: HelixLightboxHelixBeforeOpenElementEvent,
10747
+ ) => void) | undefined;
10748
+ /** Says the state moved, carrying `newState` and `oldState`. */
10749
+ "on:toggle"?: ((e: HelixLightboxElementEvent) => void) | undefined;
10750
+
10751
+ /** Set the innerHTML of the element */
10752
+ innerHTML?: (string) | undefined;
10753
+ /** Set the textContent of the element */
10754
+ textContent?: (string | number) | undefined;
10755
+ };
10756
+
10539
10757
  export type HelixLineChartProps = {
10540
10758
  /** How much ink the lines claim.
10541
10759
 
@@ -30391,6 +30609,225 @@ export type CustomElements = {
30391
30609
  HelixLegendProps & BaseProps<HelixLegend> & BaseEvents<HelixLegend>
30392
30610
  >;
30393
30611
 
30612
+ /**
30613
+ * Presentation only: the box centers what it was given and holds it inside the
30614
+ * viewport rather than sizing it, because what is in here is the consumer's and
30615
+ * may be a picture, a frame of video or a chart. Which item is shown, and the
30616
+ * arithmetic that decides, is the base class.
30617
+ *
30618
+ * ## Attributes & Properties
30619
+ *
30620
+ * Component attributes and properties that can be applied to the element or by using JavaScript.
30621
+ *
30622
+ * - `current`: Whether this is the one being shown.
30623
+ *
30624
+ * Written by the root, which is the only thing that sees the set.
30625
+ * - `label`: What this item is called, for the reading that says where the reader is.
30626
+ * - `value`: What names this item, and what `active` on the root is compared against.
30627
+ * - `whenSettled`: Resolves a frame after the first update, when transitions are switched on.
30628
+ *
30629
+ * **Named `whenSettled` because `settled` is taken four times over**, by
30630
+ * Image, Splitter and both color controls, none of them about transitions. A
30631
+ * base class takes the name every subclass then cannot use.
30632
+ *
30633
+ * **The state it reports cannot be watched, which is why this exists.** A
30634
+ * custom state is deliberately not in the DOM, so there is no
30635
+ * `MutationObserver` equivalent for `ElementInternals.states`. Await this
30636
+ * instead.
30637
+ *
30638
+ * Separate from `updateComplete`, which resolves in the microtask checkpoint
30639
+ * the suppression is still active in. That is the distinction `readyToMove`
30640
+ * in `@fusion.dev/helix-testing` is written around.
30641
+ *
30642
+ * It never resolves where `requestAnimationFrame` never fires, which is a
30643
+ * server, a hidden tab, and happy-dom. Callers that must not hang there race
30644
+ * it against a timeout, as the happy-dom harness's `readyToMove` does. The
30645
+ * browser harness's awaits it alone: a browser always runs the frame, and a
30646
+ * timer beside it was a bet on how long one takes, which a busy run lost. (property only) (readonly)
30647
+ *
30648
+ * ## Slots
30649
+ *
30650
+ * Areas where markup can be added to the component.
30651
+ *
30652
+ * - `(default)`: What is being shown.
30653
+ * - `description`: A line under it saying what it is.
30654
+ *
30655
+ * ## CSS Custom Properties
30656
+ *
30657
+ * CSS variables available for styling the component.
30658
+ *
30659
+ * - `--lightbox-item-description-color`: Color of the line under the content. (default: `undefined`)
30660
+ * - `--lightbox-item-gap`: Space between the content and the line under it. (default: `undefined`)
30661
+ *
30662
+ * ## CSS Parts
30663
+ *
30664
+ * Custom selectors for styling elements within the component.
30665
+ *
30666
+ * - `item`: The box the content is shown in.
30667
+ *
30668
+ * ## CSS States
30669
+ *
30670
+ * These can be used to apply styling when a component is in a given state.
30671
+ *
30672
+ * - `current`: While this is the item the lightbox is showing.
30673
+ * - `settled`: Set a frame after the first render. Transitions are held off until it is, so an element never animates its own arrival.
30674
+ */
30675
+ "helix-lightbox-item": Partial<
30676
+ HelixLightboxItemProps & BaseProps<HelixLightboxItem> & BaseEvents<HelixLightboxItem>
30677
+ >;
30678
+
30679
+ /**
30680
+ * **A takeover rather than a panel, which is the whole difference from
30681
+ * `Dialog`.** A dialog is a thing over the page and stops short of the edges to
30682
+ * say so; a lightbox is the page for as long as it is open. The scrim is heavier
30683
+ * for the same reason: what is behind it is not meant to be read.
30684
+ *
30685
+ * **A dark region that says so once**, with `color-scheme: dark` on the host,
30686
+ * which is `Video`'s answer to the same problem: the chrome is the consumer's
30687
+ * own components and they resolve their own tokens, so without a scheme on the
30688
+ * region they draw page-colored ink on a black room and disappear into it.
30689
+ *
30690
+ * The chrome fades rather than leaves while the reader is still, because a bar
30691
+ * that is removed from the layout takes the picture's size with it and the
30692
+ * reader watches it jump every time they stop moving.
30693
+ *
30694
+ * ## Attributes & Properties
30695
+ *
30696
+ * Component attributes and properties that can be applied to the element or by using JavaScript.
30697
+ *
30698
+ * - `active`: Which item is current, by its `value`.
30699
+ *
30700
+ * Not `option.active`, which is the option the keyboard is on: that is a
30701
+ * different question from which one is chosen.
30702
+ *
30703
+ * Writing always applies, so `<helix-tabs active="one">` starts on that
30704
+ * tab, and `default-active` is how markup says where to start without
30705
+ * naming the current one.
30706
+ * - `default-active`/`defaultActive`: Which item the markup declared current.
30707
+ *
30708
+ * Ignored once `active` is written.
30709
+ * - `open`: Whether the element is open.
30710
+ *
30711
+ * One property, not two, so `dialog.open` answers the question anyone
30712
+ * asking it meant. Writing always applies; `<helix-dialog open>` is the
30713
+ * same statement in markup.
30714
+ *
30715
+ * **Not reflected, and that is required rather than tidy.** Reflection
30716
+ * writes the resolved state back as an attribute, so an element that opened
30717
+ * itself would put `open` on its own host: cloned, serialized for
30718
+ * hydration, or diffed by a framework, it comes back holding whatever the
30719
+ * last reader did rather than what the author wrote. `:state(open)` carries
30720
+ * the resolved state for stylesheets, which is what the mirror is for.
30721
+ * - `default-open`/`defaultOpen`: Whether the markup declared it open. Ignored once `open` is written.
30722
+ * - `idle-delay`/`idleDelay`: How long the reader may be still before the chrome hides, in milliseconds.
30723
+ *
30724
+ * Zero keeps it up, which is what a viewer with a caption worth reading
30725
+ * wants. The wait is only ever about idling: whether anything else should
30726
+ * keep the chrome up is the consumer's to decide with this.
30727
+ * - `label`: Accessible name for the viewer.
30728
+ * - `loop`: Whether walking past the end comes back to the beginning.
30729
+ * - `status-label`/`statusLabel`: The reading that says where in the set the reader is, with `{index}` and
30730
+ * `{count}` filled in.
30731
+ *
30732
+ * Announced rather than only drawn, because the picture changing under a
30733
+ * reader who cannot see it is otherwise silent. A consumer who has their own
30734
+ * counter in the chrome can empty this and say it themselves.
30735
+ * - `whenSettled`: Resolves a frame after the first update, when transitions are switched on.
30736
+ *
30737
+ * **Named `whenSettled` because `settled` is taken four times over**, by
30738
+ * Image, Splitter and both color controls, none of them about transitions. A
30739
+ * base class takes the name every subclass then cannot use.
30740
+ *
30741
+ * **The state it reports cannot be watched, which is why this exists.** A
30742
+ * custom state is deliberately not in the DOM, so there is no
30743
+ * `MutationObserver` equivalent for `ElementInternals.states`. Await this
30744
+ * instead.
30745
+ *
30746
+ * Separate from `updateComplete`, which resolves in the microtask checkpoint
30747
+ * the suppression is still active in. That is the distinction `readyToMove`
30748
+ * in `@fusion.dev/helix-testing` is written around.
30749
+ *
30750
+ * It never resolves where `requestAnimationFrame` never fires, which is a
30751
+ * server, a hidden tab, and happy-dom. Callers that must not hang there race
30752
+ * it against a timeout, as the happy-dom harness's `readyToMove` does. The
30753
+ * browser harness's awaits it alone: a browser always runs the frame, and a
30754
+ * timer beside it was a bet on how long one takes, which a busy run lost. (property only) (readonly)
30755
+ *
30756
+ * ## Events
30757
+ *
30758
+ * Events that will be emitted by the component.
30759
+ *
30760
+ * - `helix-activate`: Fired once the shown item has moved, so the element already holds it.
30761
+ * - `close`: Relayed, because the platform's own does not escape.
30762
+ * - `helix-before-activate`: Fired before the shown item changes, and cancelable. The only way to refuse one.
30763
+ * - `helix-before-close`: Fired before it closes, and cancelable.
30764
+ * - `helix-before-open`: Fired before it opens, and cancelable.
30765
+ * - `toggle`: Says the state moved, carrying `newState` and `oldState`.
30766
+ *
30767
+ * ## Slots
30768
+ *
30769
+ * Areas where markup can be added to the component.
30770
+ *
30771
+ * - `(default)`: The items, which are `<helix-headless-lightbox-item>` elements.
30772
+ * - `footer`: Chrome below the item, such as a counter or a thumbnail strip.
30773
+ * - `header`: Chrome above the item, such as a title and a close button.
30774
+ *
30775
+ * ## Methods
30776
+ *
30777
+ * Methods that can be called to access component functionality.
30778
+ *
30779
+ * - `requestActive(next: string) => boolean`: Requests a new current item, and reports whether the request stood.
30780
+ *
30781
+ * Announces before it acts, so `preventDefault()` on the `helix-before-activate` is
30782
+ * a refusal and nothing moves. Unlike a native control, nothing has moved
30783
+ * by the time this runs, so refusing is simply not writing: there is
30784
+ * nothing to put back. Nobody refusing means the set updates itself,
30785
+ * whether or not a consumer declared `active`, a declared property being a
30786
+ * seed and a correction.
30787
+ * - `requestOpen(next: boolean) => boolean`: Requests an open-state change, and reports whether it was applied.
30788
+ *
30789
+ * Announces before it acts, so `preventDefault()` on the `helix-before-open` or
30790
+ * `helix-before-close` is a refusal and nothing moves. Nobody refusing means the
30791
+ * element opens or closes itself, whether or not a consumer declared
30792
+ * `open`: a declared property is a seed and a correction, and a consumer
30793
+ * who wants the decision for themselves refuses it and assigns their own.
30794
+ * - `toggleOpen() => boolean`: Requests the opposite of the current state.
30795
+ * - `show() => void`: Opens the viewer, which makes the rest of the page inert.
30796
+ * - `close() => void`: Asks to close, which a consumer may refuse.
30797
+ * - `next() => void`: Shows the next item, or the first where it is past the end and looping.
30798
+ * - `previous() => void`: Shows the previous item, or the last where it is past the start and looping.
30799
+ * - `toggleFullscreen() => void`: Fills the screen with the viewer, or comes back.
30800
+ *
30801
+ * ## CSS Custom Properties
30802
+ *
30803
+ * CSS variables available for styling the component.
30804
+ *
30805
+ * - `--lightbox-foreground`: Color of the chrome drawn over the content. (default: `undefined`)
30806
+ * - `--lightbox-gap`: Space between the chrome and the content. (default: `undefined`)
30807
+ * - `--lightbox-padding`: Inset from the edges of the screen. (default: `undefined`)
30808
+ * - `--lightbox-scrim`: The wash over the page behind the viewer. Set on the host, where a token still resolves: a `var()` written inside `::backdrop` cannot see one. (default: `undefined`)
30809
+ *
30810
+ * ## CSS Parts
30811
+ *
30812
+ * Custom selectors for styling elements within the component.
30813
+ *
30814
+ * - `dialog`: The native dialog element.
30815
+ * - `live`: The region that says which item is shown.
30816
+ * - `viewport`: The box the current item is shown in.
30817
+ *
30818
+ * ## CSS States
30819
+ *
30820
+ * These can be used to apply styling when a component is in a given state.
30821
+ *
30822
+ * - `fullscreen`: While the viewer fills the screen.
30823
+ * - `idle`: While the reader has been still long enough to hide the chrome.
30824
+ * - `open`: While the viewer is open.
30825
+ * - `settled`: Set a frame after the first render. Transitions are held off until it is, so an element never animates its own arrival.
30826
+ */
30827
+ "helix-lightbox": Partial<
30828
+ HelixLightboxProps & BaseProps<HelixLightbox> & BaseEvents<HelixLightbox>
30829
+ >;
30830
+
30394
30831
  /**
30395
30832
  * The lines take the series palette in order, so a chart of one is series one
30396
30833
  * and a chart of four is the first four, and a legend beside it maps the same
@@ -50239,6 +50676,231 @@ export type CustomElementsSolidJs = {
50239
50676
  BaseEvents<HelixLegend>
50240
50677
  >;
50241
50678
 
50679
+ /**
50680
+ * Presentation only: the box centers what it was given and holds it inside the
50681
+ * viewport rather than sizing it, because what is in here is the consumer's and
50682
+ * may be a picture, a frame of video or a chart. Which item is shown, and the
50683
+ * arithmetic that decides, is the base class.
50684
+ *
50685
+ * ## Attributes & Properties
50686
+ *
50687
+ * Component attributes and properties that can be applied to the element or by using JavaScript.
50688
+ *
50689
+ * - `current`: Whether this is the one being shown.
50690
+ *
50691
+ * Written by the root, which is the only thing that sees the set.
50692
+ * - `label`: What this item is called, for the reading that says where the reader is.
50693
+ * - `value`: What names this item, and what `active` on the root is compared against.
50694
+ * - `whenSettled`: Resolves a frame after the first update, when transitions are switched on.
50695
+ *
50696
+ * **Named `whenSettled` because `settled` is taken four times over**, by
50697
+ * Image, Splitter and both color controls, none of them about transitions. A
50698
+ * base class takes the name every subclass then cannot use.
50699
+ *
50700
+ * **The state it reports cannot be watched, which is why this exists.** A
50701
+ * custom state is deliberately not in the DOM, so there is no
50702
+ * `MutationObserver` equivalent for `ElementInternals.states`. Await this
50703
+ * instead.
50704
+ *
50705
+ * Separate from `updateComplete`, which resolves in the microtask checkpoint
50706
+ * the suppression is still active in. That is the distinction `readyToMove`
50707
+ * in `@fusion.dev/helix-testing` is written around.
50708
+ *
50709
+ * It never resolves where `requestAnimationFrame` never fires, which is a
50710
+ * server, a hidden tab, and happy-dom. Callers that must not hang there race
50711
+ * it against a timeout, as the happy-dom harness's `readyToMove` does. The
50712
+ * browser harness's awaits it alone: a browser always runs the frame, and a
50713
+ * timer beside it was a bet on how long one takes, which a busy run lost. (property only) (readonly)
50714
+ *
50715
+ * ## Slots
50716
+ *
50717
+ * Areas where markup can be added to the component.
50718
+ *
50719
+ * - `(default)`: What is being shown.
50720
+ * - `description`: A line under it saying what it is.
50721
+ *
50722
+ * ## CSS Custom Properties
50723
+ *
50724
+ * CSS variables available for styling the component.
50725
+ *
50726
+ * - `--lightbox-item-description-color`: Color of the line under the content. (default: `undefined`)
50727
+ * - `--lightbox-item-gap`: Space between the content and the line under it. (default: `undefined`)
50728
+ *
50729
+ * ## CSS Parts
50730
+ *
50731
+ * Custom selectors for styling elements within the component.
50732
+ *
50733
+ * - `item`: The box the content is shown in.
50734
+ *
50735
+ * ## CSS States
50736
+ *
50737
+ * These can be used to apply styling when a component is in a given state.
50738
+ *
50739
+ * - `current`: While this is the item the lightbox is showing.
50740
+ * - `settled`: Set a frame after the first render. Transitions are held off until it is, so an element never animates its own arrival.
50741
+ */
50742
+ "helix-lightbox-item": Partial<
50743
+ HelixLightboxItemProps &
50744
+ HelixLightboxItemSolidJsProps &
50745
+ BaseProps<HelixLightboxItem> &
50746
+ BaseEvents<HelixLightboxItem>
50747
+ >;
50748
+
50749
+ /**
50750
+ * **A takeover rather than a panel, which is the whole difference from
50751
+ * `Dialog`.** A dialog is a thing over the page and stops short of the edges to
50752
+ * say so; a lightbox is the page for as long as it is open. The scrim is heavier
50753
+ * for the same reason: what is behind it is not meant to be read.
50754
+ *
50755
+ * **A dark region that says so once**, with `color-scheme: dark` on the host,
50756
+ * which is `Video`'s answer to the same problem: the chrome is the consumer's
50757
+ * own components and they resolve their own tokens, so without a scheme on the
50758
+ * region they draw page-colored ink on a black room and disappear into it.
50759
+ *
50760
+ * The chrome fades rather than leaves while the reader is still, because a bar
50761
+ * that is removed from the layout takes the picture's size with it and the
50762
+ * reader watches it jump every time they stop moving.
50763
+ *
50764
+ * ## Attributes & Properties
50765
+ *
50766
+ * Component attributes and properties that can be applied to the element or by using JavaScript.
50767
+ *
50768
+ * - `active`: Which item is current, by its `value`.
50769
+ *
50770
+ * Not `option.active`, which is the option the keyboard is on: that is a
50771
+ * different question from which one is chosen.
50772
+ *
50773
+ * Writing always applies, so `<helix-tabs active="one">` starts on that
50774
+ * tab, and `default-active` is how markup says where to start without
50775
+ * naming the current one.
50776
+ * - `default-active`/`defaultActive`: Which item the markup declared current.
50777
+ *
50778
+ * Ignored once `active` is written.
50779
+ * - `open`: Whether the element is open.
50780
+ *
50781
+ * One property, not two, so `dialog.open` answers the question anyone
50782
+ * asking it meant. Writing always applies; `<helix-dialog open>` is the
50783
+ * same statement in markup.
50784
+ *
50785
+ * **Not reflected, and that is required rather than tidy.** Reflection
50786
+ * writes the resolved state back as an attribute, so an element that opened
50787
+ * itself would put `open` on its own host: cloned, serialized for
50788
+ * hydration, or diffed by a framework, it comes back holding whatever the
50789
+ * last reader did rather than what the author wrote. `:state(open)` carries
50790
+ * the resolved state for stylesheets, which is what the mirror is for.
50791
+ * - `default-open`/`defaultOpen`: Whether the markup declared it open. Ignored once `open` is written.
50792
+ * - `idle-delay`/`idleDelay`: How long the reader may be still before the chrome hides, in milliseconds.
50793
+ *
50794
+ * Zero keeps it up, which is what a viewer with a caption worth reading
50795
+ * wants. The wait is only ever about idling: whether anything else should
50796
+ * keep the chrome up is the consumer's to decide with this.
50797
+ * - `label`: Accessible name for the viewer.
50798
+ * - `loop`: Whether walking past the end comes back to the beginning.
50799
+ * - `status-label`/`statusLabel`: The reading that says where in the set the reader is, with `{index}` and
50800
+ * `{count}` filled in.
50801
+ *
50802
+ * Announced rather than only drawn, because the picture changing under a
50803
+ * reader who cannot see it is otherwise silent. A consumer who has their own
50804
+ * counter in the chrome can empty this and say it themselves.
50805
+ * - `whenSettled`: Resolves a frame after the first update, when transitions are switched on.
50806
+ *
50807
+ * **Named `whenSettled` because `settled` is taken four times over**, by
50808
+ * Image, Splitter and both color controls, none of them about transitions. A
50809
+ * base class takes the name every subclass then cannot use.
50810
+ *
50811
+ * **The state it reports cannot be watched, which is why this exists.** A
50812
+ * custom state is deliberately not in the DOM, so there is no
50813
+ * `MutationObserver` equivalent for `ElementInternals.states`. Await this
50814
+ * instead.
50815
+ *
50816
+ * Separate from `updateComplete`, which resolves in the microtask checkpoint
50817
+ * the suppression is still active in. That is the distinction `readyToMove`
50818
+ * in `@fusion.dev/helix-testing` is written around.
50819
+ *
50820
+ * It never resolves where `requestAnimationFrame` never fires, which is a
50821
+ * server, a hidden tab, and happy-dom. Callers that must not hang there race
50822
+ * it against a timeout, as the happy-dom harness's `readyToMove` does. The
50823
+ * browser harness's awaits it alone: a browser always runs the frame, and a
50824
+ * timer beside it was a bet on how long one takes, which a busy run lost. (property only) (readonly)
50825
+ *
50826
+ * ## Events
50827
+ *
50828
+ * Events that will be emitted by the component.
50829
+ *
50830
+ * - `helix-activate`: Fired once the shown item has moved, so the element already holds it.
50831
+ * - `close`: Relayed, because the platform's own does not escape.
50832
+ * - `helix-before-activate`: Fired before the shown item changes, and cancelable. The only way to refuse one.
50833
+ * - `helix-before-close`: Fired before it closes, and cancelable.
50834
+ * - `helix-before-open`: Fired before it opens, and cancelable.
50835
+ * - `toggle`: Says the state moved, carrying `newState` and `oldState`.
50836
+ *
50837
+ * ## Slots
50838
+ *
50839
+ * Areas where markup can be added to the component.
50840
+ *
50841
+ * - `(default)`: The items, which are `<helix-headless-lightbox-item>` elements.
50842
+ * - `footer`: Chrome below the item, such as a counter or a thumbnail strip.
50843
+ * - `header`: Chrome above the item, such as a title and a close button.
50844
+ *
50845
+ * ## Methods
50846
+ *
50847
+ * Methods that can be called to access component functionality.
50848
+ *
50849
+ * - `requestActive(next: string) => boolean`: Requests a new current item, and reports whether the request stood.
50850
+ *
50851
+ * Announces before it acts, so `preventDefault()` on the `helix-before-activate` is
50852
+ * a refusal and nothing moves. Unlike a native control, nothing has moved
50853
+ * by the time this runs, so refusing is simply not writing: there is
50854
+ * nothing to put back. Nobody refusing means the set updates itself,
50855
+ * whether or not a consumer declared `active`, a declared property being a
50856
+ * seed and a correction.
50857
+ * - `requestOpen(next: boolean) => boolean`: Requests an open-state change, and reports whether it was applied.
50858
+ *
50859
+ * Announces before it acts, so `preventDefault()` on the `helix-before-open` or
50860
+ * `helix-before-close` is a refusal and nothing moves. Nobody refusing means the
50861
+ * element opens or closes itself, whether or not a consumer declared
50862
+ * `open`: a declared property is a seed and a correction, and a consumer
50863
+ * who wants the decision for themselves refuses it and assigns their own.
50864
+ * - `toggleOpen() => boolean`: Requests the opposite of the current state.
50865
+ * - `show() => void`: Opens the viewer, which makes the rest of the page inert.
50866
+ * - `close() => void`: Asks to close, which a consumer may refuse.
50867
+ * - `next() => void`: Shows the next item, or the first where it is past the end and looping.
50868
+ * - `previous() => void`: Shows the previous item, or the last where it is past the start and looping.
50869
+ * - `toggleFullscreen() => void`: Fills the screen with the viewer, or comes back.
50870
+ *
50871
+ * ## CSS Custom Properties
50872
+ *
50873
+ * CSS variables available for styling the component.
50874
+ *
50875
+ * - `--lightbox-foreground`: Color of the chrome drawn over the content. (default: `undefined`)
50876
+ * - `--lightbox-gap`: Space between the chrome and the content. (default: `undefined`)
50877
+ * - `--lightbox-padding`: Inset from the edges of the screen. (default: `undefined`)
50878
+ * - `--lightbox-scrim`: The wash over the page behind the viewer. Set on the host, where a token still resolves: a `var()` written inside `::backdrop` cannot see one. (default: `undefined`)
50879
+ *
50880
+ * ## CSS Parts
50881
+ *
50882
+ * Custom selectors for styling elements within the component.
50883
+ *
50884
+ * - `dialog`: The native dialog element.
50885
+ * - `live`: The region that says which item is shown.
50886
+ * - `viewport`: The box the current item is shown in.
50887
+ *
50888
+ * ## CSS States
50889
+ *
50890
+ * These can be used to apply styling when a component is in a given state.
50891
+ *
50892
+ * - `fullscreen`: While the viewer fills the screen.
50893
+ * - `idle`: While the reader has been still long enough to hide the chrome.
50894
+ * - `open`: While the viewer is open.
50895
+ * - `settled`: Set a frame after the first render. Transitions are held off until it is, so an element never animates its own arrival.
50896
+ */
50897
+ "helix-lightbox": Partial<
50898
+ HelixLightboxProps &
50899
+ HelixLightboxSolidJsProps &
50900
+ BaseProps<HelixLightbox> &
50901
+ BaseEvents<HelixLightbox>
50902
+ >;
50903
+
50242
50904
  /**
50243
50905
  * The lines take the series palette in order, so a chart of one is series one
50244
50906
  * and a chart of four is the first four, and a legend beside it maps the same
@@ -61710,6 +62372,18 @@ export type CustomCssProperties = {
61710
62372
  "--legend-swatch-size"?: (string) | undefined;
61711
62373
  /** Width of the edge an `outlined` or `subtle` swatch is drawn with. */
61712
62374
  "--legend-swatch-stroke"?: (string) | undefined;
62375
+ /** Color of the line under the content. */
62376
+ "--lightbox-item-description-color"?: (string) | undefined;
62377
+ /** Space between the content and the line under it. */
62378
+ "--lightbox-item-gap"?: (string) | undefined;
62379
+ /** Color of the chrome drawn over the content. */
62380
+ "--lightbox-foreground"?: (string) | undefined;
62381
+ /** Space between the chrome and the content. */
62382
+ "--lightbox-gap"?: (string) | undefined;
62383
+ /** Inset from the edges of the screen. */
62384
+ "--lightbox-padding"?: (string) | undefined;
62385
+ /** The wash over the page behind the viewer. Set on the host, where a token still resolves: a `var()` written inside `::backdrop` cannot see one. */
62386
+ "--lightbox-scrim"?: (string) | undefined;
61713
62387
  /** A fill for the middle of a `ring` terminus, which is otherwise open. One name across this family and Sparkline, the two reading one shared sheet. */
61714
62388
  "--chart-terminus-hole"?: (string) | undefined;
61715
62389
  /** Size of the mark on each series' last reading. One name across this family and Sparkline, the two reading one shared sheet. */