@fusion.dev/helix-headless 0.100.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
@@ -74,6 +74,8 @@ import type {
74
74
  HelixHeadlessInput,
75
75
  HelixHeadlessKbd,
76
76
  HelixHeadlessLegend,
77
+ HelixHeadlessLightbox,
78
+ HelixHeadlessLightboxItem,
77
79
  HelixHeadlessLineChart,
78
80
  HelixHeadlessList,
79
81
  HelixHeadlessListItem,
@@ -8525,6 +8527,231 @@ shadow root reads a table in that root rather than one in the document.
8525
8527
  textContent?: (string | number) | undefined;
8526
8528
  };
8527
8529
 
8530
+ export type HelixHeadlessLightboxItemProps = {
8531
+ /** Whether this is the one being shown.
8532
+
8533
+ Written by the root, which is the only thing that sees the set. */
8534
+ current?: (HelixHeadlessLightboxItem["current"]) | undefined;
8535
+ /** What this item is called, for the reading that says where the reader is. */
8536
+ label?: (HelixHeadlessLightboxItem["label"]) | undefined;
8537
+ /** What names this item, and what `active` on the root is compared against. */
8538
+ value?: (HelixHeadlessLightboxItem["value"]) | undefined;
8539
+ };
8540
+
8541
+ export type HelixHeadlessLightboxItemSolidJsProps = {
8542
+ /** Whether this is the one being shown.
8543
+
8544
+ Written by the root, which is the only thing that sees the set. */
8545
+ "prop:current"?: (HelixHeadlessLightboxItem["current"]) | undefined;
8546
+ /** What this item is called, for the reading that says where the reader is. */
8547
+ "prop:label"?: (HelixHeadlessLightboxItem["label"]) | undefined;
8548
+ /** What names this item, and what `active` on the root is compared against. */
8549
+ "prop:value"?: (HelixHeadlessLightboxItem["value"]) | undefined;
8550
+
8551
+ /** Set the innerHTML of the element */
8552
+ innerHTML?: (string) | undefined;
8553
+ /** Set the textContent of the element */
8554
+ textContent?: (string | number) | undefined;
8555
+ };
8556
+
8557
+ /** `HelixHeadlessLightbox` component event */
8558
+ export type HelixHeadlessLightboxElementEvent<E = Event> = TypedEvent<
8559
+ HelixHeadlessLightbox,
8560
+ E
8561
+ >;
8562
+ /** `helix-activate` event type */
8563
+ export type HelixHeadlessLightboxHelixActivateElementEvent =
8564
+ HelixHeadlessLightboxElementEvent<HelixActivateEvent>;
8565
+ /** `helix-before-activate` event type */
8566
+ export type HelixHeadlessLightboxHelixBeforeActivateElementEvent =
8567
+ HelixHeadlessLightboxElementEvent<HelixBeforeActivateEvent>;
8568
+ /** `helix-before-close` event type */
8569
+ export type HelixHeadlessLightboxHelixBeforeCloseElementEvent =
8570
+ HelixHeadlessLightboxElementEvent<HelixBeforeCloseEvent>;
8571
+ /** `helix-before-open` event type */
8572
+ export type HelixHeadlessLightboxHelixBeforeOpenElementEvent =
8573
+ HelixHeadlessLightboxElementEvent<HelixBeforeOpenEvent>;
8574
+
8575
+ export type HelixHeadlessLightboxProps = {
8576
+ /** How long the reader may be still before the chrome hides, in milliseconds.
8577
+
8578
+ Zero keeps it up, which is what a viewer with a caption worth reading
8579
+ wants. The wait is only ever about idling: whether anything else should
8580
+ keep the chrome up is the consumer's to decide with this. */
8581
+ "idle-delay"?: (HelixHeadlessLightbox["idleDelay"] | `${number}`) | undefined;
8582
+ /** How long the reader may be still before the chrome hides, in milliseconds.
8583
+
8584
+ Zero keeps it up, which is what a viewer with a caption worth reading
8585
+ wants. The wait is only ever about idling: whether anything else should
8586
+ keep the chrome up is the consumer's to decide with this. */
8587
+ idleDelay?: (HelixHeadlessLightbox["idleDelay"]) | undefined;
8588
+ /** Accessible name for the viewer. */
8589
+ label?: (HelixHeadlessLightbox["label"]) | undefined;
8590
+ /** Whether walking past the end comes back to the beginning. */
8591
+ loop?: (HelixHeadlessLightbox["loop"]) | undefined;
8592
+ /** The reading that says where in the set the reader is, with `{index}` and
8593
+ `{count}` filled in.
8594
+
8595
+ Announced rather than only drawn, because the picture changing under a
8596
+ reader who cannot see it is otherwise silent. A consumer who has their own
8597
+ counter in the chrome can empty this and say it themselves. */
8598
+ "status-label"?: (HelixHeadlessLightbox["statusLabel"]) | undefined;
8599
+ /** The reading that says where in the set the reader is, with `{index}` and
8600
+ `{count}` filled in.
8601
+
8602
+ Announced rather than only drawn, because the picture changing under a
8603
+ reader who cannot see it is otherwise silent. A consumer who has their own
8604
+ counter in the chrome can empty this and say it themselves. */
8605
+ statusLabel?: (HelixHeadlessLightbox["statusLabel"]) | undefined;
8606
+ /** Which item is current, by its `value`.
8607
+
8608
+ Not `option.active`, which is the option the keyboard is on: that is a
8609
+ different question from which one is chosen.
8610
+
8611
+ Writing always applies, so `<helix-tabs active="one">` starts on that
8612
+ tab, and `default-active` is how markup says where to start without
8613
+ naming the current one. */
8614
+ active?: (HelixHeadlessLightbox["active"]) | undefined;
8615
+ /** Which item the markup declared current.
8616
+
8617
+ Ignored once `active` is written. */
8618
+ "default-active"?: (HelixHeadlessLightbox["defaultActive"]) | undefined;
8619
+ /** Which item the markup declared current.
8620
+
8621
+ Ignored once `active` is written. */
8622
+ defaultActive?: (HelixHeadlessLightbox["defaultActive"]) | undefined;
8623
+ /** Whether the element is open.
8624
+
8625
+ One property, not two, so `dialog.open` answers the question anyone
8626
+ asking it meant. Writing always applies; `<helix-dialog open>` is the
8627
+ same statement in markup.
8628
+
8629
+ **Not reflected, and that is required rather than tidy.** Reflection
8630
+ writes the resolved state back as an attribute, so an element that opened
8631
+ itself would put `open` on its own host: cloned, serialized for
8632
+ hydration, or diffed by a framework, it comes back holding whatever the
8633
+ last reader did rather than what the author wrote. `:state(open)` carries
8634
+ the resolved state for stylesheets, which is what the mirror is for. */
8635
+ open?: (HelixHeadlessLightbox["open"]) | undefined;
8636
+ /** Whether the markup declared it open. Ignored once `open` is written. */
8637
+ "default-open"?: (HelixHeadlessLightbox["defaultOpen"]) | undefined;
8638
+ /** Whether the markup declared it open. Ignored once `open` is written. */
8639
+ defaultOpen?: (HelixHeadlessLightbox["defaultOpen"]) | undefined;
8640
+
8641
+ /** Relayed, because the platform's own does not escape. */
8642
+ onclose?: ((e: HelixHeadlessLightboxElementEvent) => void) | undefined;
8643
+ /** Fired once the shown item has moved, so the element already holds it. */
8644
+ "onhelix-activate"?: ((
8645
+ e: HelixHeadlessLightboxHelixActivateElementEvent,
8646
+ ) => void) | undefined;
8647
+ /** Fired before the shown item changes, and cancelable. The only way to refuse one. */
8648
+ "onhelix-before-activate"?: ((
8649
+ e: HelixHeadlessLightboxHelixBeforeActivateElementEvent,
8650
+ ) => void) | undefined;
8651
+ /** Fired before it closes, and cancelable. */
8652
+ "onhelix-before-close"?: ((
8653
+ e: HelixHeadlessLightboxHelixBeforeCloseElementEvent,
8654
+ ) => void) | undefined;
8655
+ /** Fired before it opens, and cancelable. */
8656
+ "onhelix-before-open"?: ((
8657
+ e: HelixHeadlessLightboxHelixBeforeOpenElementEvent,
8658
+ ) => void) | undefined;
8659
+ /** Says the state moved, carrying `newState` and `oldState`. */
8660
+ ontoggle?: ((e: HelixHeadlessLightboxElementEvent) => void) | undefined;
8661
+ };
8662
+
8663
+ export type HelixHeadlessLightboxSolidJsProps = {
8664
+ /** How long the reader may be still before the chrome hides, in milliseconds.
8665
+
8666
+ Zero keeps it up, which is what a viewer with a caption worth reading
8667
+ wants. The wait is only ever about idling: whether anything else should
8668
+ keep the chrome up is the consumer's to decide with this. */
8669
+ "attr:idle-delay"?: (HelixHeadlessLightbox["idleDelay"] | `${number}`) | undefined;
8670
+ /** How long the reader may be still before the chrome hides, in milliseconds.
8671
+
8672
+ Zero keeps it up, which is what a viewer with a caption worth reading
8673
+ wants. The wait is only ever about idling: whether anything else should
8674
+ keep the chrome up is the consumer's to decide with this. */
8675
+ "prop:idleDelay"?: (HelixHeadlessLightbox["idleDelay"]) | undefined;
8676
+ /** Accessible name for the viewer. */
8677
+ "prop:label"?: (HelixHeadlessLightbox["label"]) | undefined;
8678
+ /** Whether walking past the end comes back to the beginning. */
8679
+ "prop:loop"?: (HelixHeadlessLightbox["loop"]) | undefined;
8680
+ /** The reading that says where in the set the reader is, with `{index}` and
8681
+ `{count}` filled in.
8682
+
8683
+ Announced rather than only drawn, because the picture changing under a
8684
+ reader who cannot see it is otherwise silent. A consumer who has their own
8685
+ counter in the chrome can empty this and say it themselves. */
8686
+ "attr:status-label"?: (HelixHeadlessLightbox["statusLabel"]) | undefined;
8687
+ /** The reading that says where in the set the reader is, with `{index}` and
8688
+ `{count}` filled in.
8689
+
8690
+ Announced rather than only drawn, because the picture changing under a
8691
+ reader who cannot see it is otherwise silent. A consumer who has their own
8692
+ counter in the chrome can empty this and say it themselves. */
8693
+ "prop:statusLabel"?: (HelixHeadlessLightbox["statusLabel"]) | undefined;
8694
+ /** Which item is current, by its `value`.
8695
+
8696
+ Not `option.active`, which is the option the keyboard is on: that is a
8697
+ different question from which one is chosen.
8698
+
8699
+ Writing always applies, so `<helix-tabs active="one">` starts on that
8700
+ tab, and `default-active` is how markup says where to start without
8701
+ naming the current one. */
8702
+ "prop:active"?: (HelixHeadlessLightbox["active"]) | undefined;
8703
+ /** Which item the markup declared current.
8704
+
8705
+ Ignored once `active` is written. */
8706
+ "attr:default-active"?: (HelixHeadlessLightbox["defaultActive"]) | undefined;
8707
+ /** Which item the markup declared current.
8708
+
8709
+ Ignored once `active` is written. */
8710
+ "prop:defaultActive"?: (HelixHeadlessLightbox["defaultActive"]) | undefined;
8711
+ /** Whether the element is open.
8712
+
8713
+ One property, not two, so `dialog.open` answers the question anyone
8714
+ asking it meant. Writing always applies; `<helix-dialog open>` is the
8715
+ same statement in markup.
8716
+
8717
+ **Not reflected, and that is required rather than tidy.** Reflection
8718
+ writes the resolved state back as an attribute, so an element that opened
8719
+ itself would put `open` on its own host: cloned, serialized for
8720
+ hydration, or diffed by a framework, it comes back holding whatever the
8721
+ last reader did rather than what the author wrote. `:state(open)` carries
8722
+ the resolved state for stylesheets, which is what the mirror is for. */
8723
+ "prop:open"?: (HelixHeadlessLightbox["open"]) | undefined;
8724
+ /** Whether the markup declared it open. Ignored once `open` is written. */
8725
+ "bool:default-open"?: (HelixHeadlessLightbox["defaultOpen"]) | undefined;
8726
+ /** Whether the markup declared it open. Ignored once `open` is written. */
8727
+ "prop:defaultOpen"?: (HelixHeadlessLightbox["defaultOpen"]) | undefined;
8728
+ /** Relayed, because the platform's own does not escape. */
8729
+ "on:close"?: ((e: HelixHeadlessLightboxElementEvent) => void) | undefined;
8730
+ /** Fired once the shown item has moved, so the element already holds it. */
8731
+ "on:helix-activate"?: ((
8732
+ e: HelixHeadlessLightboxHelixActivateElementEvent,
8733
+ ) => void) | undefined;
8734
+ /** Fired before the shown item changes, and cancelable. The only way to refuse one. */
8735
+ "on:helix-before-activate"?: ((
8736
+ e: HelixHeadlessLightboxHelixBeforeActivateElementEvent,
8737
+ ) => void) | undefined;
8738
+ /** Fired before it closes, and cancelable. */
8739
+ "on:helix-before-close"?: ((
8740
+ e: HelixHeadlessLightboxHelixBeforeCloseElementEvent,
8741
+ ) => void) | undefined;
8742
+ /** Fired before it opens, and cancelable. */
8743
+ "on:helix-before-open"?: ((
8744
+ e: HelixHeadlessLightboxHelixBeforeOpenElementEvent,
8745
+ ) => void) | undefined;
8746
+ /** Says the state moved, carrying `newState` and `oldState`. */
8747
+ "on:toggle"?: ((e: HelixHeadlessLightboxElementEvent) => void) | undefined;
8748
+
8749
+ /** Set the innerHTML of the element */
8750
+ innerHTML?: (string) | undefined;
8751
+ /** Set the textContent of the element */
8752
+ textContent?: (string | number) | undefined;
8753
+ };
8754
+
8528
8755
  export type HelixHeadlessLineChartProps = {
8529
8756
  /** Whether a wash is drawn under each line, each from the floor on its own.
8530
8757
  The washes overlap rather than add up: for parts that make a total, use
@@ -26157,6 +26384,227 @@ export type CustomElements = {
26157
26384
  HelixHeadlessLegendProps & BaseProps<HelixHeadlessLegend> & BaseEvents<HelixHeadlessLegend>
26158
26385
  >;
26159
26386
 
26387
+ /**
26388
+ * A wrapper around whatever the consumer opened, which is the whole of what it
26389
+ * is: a picture, a frame of video, a chart. The family shows one at a time and
26390
+ * this is how it says which, so the content stays the consumer's and the
26391
+ * arithmetic stays the root's.
26392
+ *
26393
+ * Hidden rather than unmounted while another item is current, for the reason
26394
+ * `TabPanel` gives: what is in the markup is what a crawler reads and what a
26395
+ * server sent, and an `<img>` that has already decoded does not decode again
26396
+ * when the reader walks back to it.
26397
+ *
26398
+ * ## Attributes & Properties
26399
+ *
26400
+ * Component attributes and properties that can be applied to the element or by using JavaScript.
26401
+ *
26402
+ * - `current`: Whether this is the one being shown.
26403
+ *
26404
+ * Written by the root, which is the only thing that sees the set.
26405
+ * - `label`: What this item is called, for the reading that says where the reader is.
26406
+ * - `value`: What names this item, and what `active` on the root is compared against.
26407
+ * - `whenSettled`: Resolves a frame after the first update, when transitions are switched on.
26408
+ *
26409
+ * **Named `whenSettled` because `settled` is taken four times over**, by
26410
+ * Image, Splitter and both color controls, none of them about transitions. A
26411
+ * base class takes the name every subclass then cannot use.
26412
+ *
26413
+ * **The state it reports cannot be watched, which is why this exists.** A
26414
+ * custom state is deliberately not in the DOM, so there is no
26415
+ * `MutationObserver` equivalent for `ElementInternals.states`. Await this
26416
+ * instead.
26417
+ *
26418
+ * Separate from `updateComplete`, which resolves in the microtask checkpoint
26419
+ * the suppression is still active in. That is the distinction `readyToMove`
26420
+ * in `@fusion.dev/helix-testing` is written around.
26421
+ *
26422
+ * It never resolves where `requestAnimationFrame` never fires, which is a
26423
+ * server, a hidden tab, and happy-dom. Callers that must not hang there race
26424
+ * it against a timeout, as the happy-dom harness's `readyToMove` does. The
26425
+ * browser harness's awaits it alone: a browser always runs the frame, and a
26426
+ * timer beside it was a bet on how long one takes, which a busy run lost. (property only) (readonly)
26427
+ *
26428
+ * ## Slots
26429
+ *
26430
+ * Areas where markup can be added to the component.
26431
+ *
26432
+ * - `(default)`: What is being shown.
26433
+ * - `description`: A line under it saying what it is.
26434
+ *
26435
+ * ## CSS Parts
26436
+ *
26437
+ * Custom selectors for styling elements within the component.
26438
+ *
26439
+ * - `item`: The box the content is shown in.
26440
+ *
26441
+ * ## CSS States
26442
+ *
26443
+ * These can be used to apply styling when a component is in a given state.
26444
+ *
26445
+ * - `current`: While this is the item the lightbox is showing.
26446
+ * - `settled`: Set a frame after the first render. Transitions are held off until it is, so an element never animates its own arrival.
26447
+ */
26448
+ "helix-headless-lightbox-item": Partial<
26449
+ HelixHeadlessLightboxItemProps &
26450
+ BaseProps<HelixHeadlessLightboxItem> &
26451
+ BaseEvents<HelixHeadlessLightboxItem>
26452
+ >;
26453
+
26454
+ /**
26455
+ * **A lightbox is chrome around a picture rather than a picture.** It draws
26456
+ * nothing of its own: what it shows is whatever the consumer opened, so this
26457
+ * earns its place on the frame, the keyboard and the reading that says where in
26458
+ * the set the reader is.
26459
+ *
26460
+ * **The modal half is the platform's.** A real `<dialog>` opened with
26461
+ * `showModal()` brings the top layer, a backdrop, Escape and `inert` behind it,
26462
+ * and this repository has already removed one hand-written focus trap for being
26463
+ * worse than that: `inert` on the rest of the document is something no
26464
+ * JavaScript trap can achieve. Every way it can close comes back through
26465
+ * `requestOpen`, which is what `Dialog` and `Drawer` both do and for the reason
26466
+ * they both give.
26467
+ *
26468
+ * **The set is this component's own and not `Carousel`'s.** A carousel is a
26469
+ * track: a scroller with snap points, per-view arithmetic and stops it can rest
26470
+ * between. A lightbox shows one thing at a time and has no track, so what it
26471
+ * needs is which item is current, which is `active` and the same pair `Tabs`
26472
+ * uses. The arrow keys move the picture under a reader whose focus stays in the
26473
+ * dialog, which is also why `KeyboardNavigationController` is not the right
26474
+ * tool: that one moves focus between focusable items, and these are pictures.
26475
+ *
26476
+ * **Chrome hides while the reader is still**, on `IdleController`, and comes
26477
+ * back on a pointer move or a focus. `fullscreen` is `FullscreenController`, the
26478
+ * same pair `Video` holds and the only two it shares.
26479
+ *
26480
+ * ## Attributes & Properties
26481
+ *
26482
+ * Component attributes and properties that can be applied to the element or by using JavaScript.
26483
+ *
26484
+ * - `idle-delay`/`idleDelay`: How long the reader may be still before the chrome hides, in milliseconds.
26485
+ *
26486
+ * Zero keeps it up, which is what a viewer with a caption worth reading
26487
+ * wants. The wait is only ever about idling: whether anything else should
26488
+ * keep the chrome up is the consumer's to decide with this.
26489
+ * - `label`: Accessible name for the viewer.
26490
+ * - `loop`: Whether walking past the end comes back to the beginning.
26491
+ * - `status-label`/`statusLabel`: The reading that says where in the set the reader is, with `{index}` and
26492
+ * `{count}` filled in.
26493
+ *
26494
+ * Announced rather than only drawn, because the picture changing under a
26495
+ * reader who cannot see it is otherwise silent. A consumer who has their own
26496
+ * counter in the chrome can empty this and say it themselves.
26497
+ * - `active`: Which item is current, by its `value`.
26498
+ *
26499
+ * Not `option.active`, which is the option the keyboard is on: that is a
26500
+ * different question from which one is chosen.
26501
+ *
26502
+ * Writing always applies, so `<helix-tabs active="one">` starts on that
26503
+ * tab, and `default-active` is how markup says where to start without
26504
+ * naming the current one.
26505
+ * - `default-active`/`defaultActive`: Which item the markup declared current.
26506
+ *
26507
+ * Ignored once `active` is written.
26508
+ * - `open`: Whether the element is open.
26509
+ *
26510
+ * One property, not two, so `dialog.open` answers the question anyone
26511
+ * asking it meant. Writing always applies; `<helix-dialog open>` is the
26512
+ * same statement in markup.
26513
+ *
26514
+ * **Not reflected, and that is required rather than tidy.** Reflection
26515
+ * writes the resolved state back as an attribute, so an element that opened
26516
+ * itself would put `open` on its own host: cloned, serialized for
26517
+ * hydration, or diffed by a framework, it comes back holding whatever the
26518
+ * last reader did rather than what the author wrote. `:state(open)` carries
26519
+ * the resolved state for stylesheets, which is what the mirror is for.
26520
+ * - `default-open`/`defaultOpen`: Whether the markup declared it open. Ignored once `open` is written.
26521
+ * - `whenSettled`: Resolves a frame after the first update, when transitions are switched on.
26522
+ *
26523
+ * **Named `whenSettled` because `settled` is taken four times over**, by
26524
+ * Image, Splitter and both color controls, none of them about transitions. A
26525
+ * base class takes the name every subclass then cannot use.
26526
+ *
26527
+ * **The state it reports cannot be watched, which is why this exists.** A
26528
+ * custom state is deliberately not in the DOM, so there is no
26529
+ * `MutationObserver` equivalent for `ElementInternals.states`. Await this
26530
+ * instead.
26531
+ *
26532
+ * Separate from `updateComplete`, which resolves in the microtask checkpoint
26533
+ * the suppression is still active in. That is the distinction `readyToMove`
26534
+ * in `@fusion.dev/helix-testing` is written around.
26535
+ *
26536
+ * It never resolves where `requestAnimationFrame` never fires, which is a
26537
+ * server, a hidden tab, and happy-dom. Callers that must not hang there race
26538
+ * it against a timeout, as the happy-dom harness's `readyToMove` does. The
26539
+ * browser harness's awaits it alone: a browser always runs the frame, and a
26540
+ * timer beside it was a bet on how long one takes, which a busy run lost. (property only) (readonly)
26541
+ *
26542
+ * ## Events
26543
+ *
26544
+ * Events that will be emitted by the component.
26545
+ *
26546
+ * - `close`: Relayed, because the platform's own does not escape.
26547
+ * - `helix-activate`: Fired once the shown item has moved, so the element already holds it.
26548
+ * - `helix-before-activate`: Fired before the shown item changes, and cancelable. The only way to refuse one.
26549
+ * - `helix-before-close`: Fired before it closes, and cancelable.
26550
+ * - `helix-before-open`: Fired before it opens, and cancelable.
26551
+ * - `toggle`: Says the state moved, carrying `newState` and `oldState`.
26552
+ *
26553
+ * ## Slots
26554
+ *
26555
+ * Areas where markup can be added to the component.
26556
+ *
26557
+ * - `(default)`: The items, which are `<helix-headless-lightbox-item>` elements.
26558
+ * - `footer`: Chrome below the item, such as a counter or a thumbnail strip.
26559
+ * - `header`: Chrome above the item, such as a title and a close button.
26560
+ *
26561
+ * ## Methods
26562
+ *
26563
+ * Methods that can be called to access component functionality.
26564
+ *
26565
+ * - `show() => void`: Opens the viewer, which makes the rest of the page inert.
26566
+ * - `close() => void`: Asks to close, which a consumer may refuse.
26567
+ * - `next() => void`: Shows the next item, or the first where it is past the end and looping.
26568
+ * - `previous() => void`: Shows the previous item, or the last where it is past the start and looping.
26569
+ * - `toggleFullscreen() => void`: Fills the screen with the viewer, or comes back.
26570
+ * - `requestActive(next: string) => boolean`: Requests a new current item, and reports whether the request stood.
26571
+ *
26572
+ * Announces before it acts, so `preventDefault()` on the `helix-before-activate` is
26573
+ * a refusal and nothing moves. Unlike a native control, nothing has moved
26574
+ * by the time this runs, so refusing is simply not writing: there is
26575
+ * nothing to put back. Nobody refusing means the set updates itself,
26576
+ * whether or not a consumer declared `active`, a declared property being a
26577
+ * seed and a correction.
26578
+ * - `requestOpen(next: boolean) => boolean`: Requests an open-state change, and reports whether it was applied.
26579
+ *
26580
+ * Announces before it acts, so `preventDefault()` on the `helix-before-open` or
26581
+ * `helix-before-close` is a refusal and nothing moves. Nobody refusing means the
26582
+ * element opens or closes itself, whether or not a consumer declared
26583
+ * `open`: a declared property is a seed and a correction, and a consumer
26584
+ * who wants the decision for themselves refuses it and assigns their own.
26585
+ * - `toggleOpen() => boolean`: Requests the opposite of the current state.
26586
+ *
26587
+ * ## CSS Parts
26588
+ *
26589
+ * Custom selectors for styling elements within the component.
26590
+ *
26591
+ * - `dialog`: The native dialog element.
26592
+ * - `live`: The region that says which item is shown.
26593
+ * - `viewport`: The box the current item is shown in.
26594
+ *
26595
+ * ## CSS States
26596
+ *
26597
+ * These can be used to apply styling when a component is in a given state.
26598
+ *
26599
+ * - `fullscreen`: While the viewer fills the screen.
26600
+ * - `idle`: While the reader has been still long enough to hide the chrome.
26601
+ * - `open`: While the viewer is open.
26602
+ * - `settled`: Set a frame after the first render. Transitions are held off until it is, so an element never animates its own arrival.
26603
+ */
26604
+ "helix-headless-lightbox": Partial<
26605
+ HelixHeadlessLightboxProps & BaseProps<HelixHeadlessLightbox> & BaseEvents<HelixHeadlessLightbox>
26606
+ >;
26607
+
26160
26608
  /**
26161
26609
  * The chart for a shape rather than for a quantity, which is what decides the
26162
26610
  * one thing a bar chart is not allowed to do.
@@ -44264,6 +44712,231 @@ export type CustomElementsSolidJs = {
44264
44712
  BaseEvents<HelixHeadlessLegend>
44265
44713
  >;
44266
44714
 
44715
+ /**
44716
+ * A wrapper around whatever the consumer opened, which is the whole of what it
44717
+ * is: a picture, a frame of video, a chart. The family shows one at a time and
44718
+ * this is how it says which, so the content stays the consumer's and the
44719
+ * arithmetic stays the root's.
44720
+ *
44721
+ * Hidden rather than unmounted while another item is current, for the reason
44722
+ * `TabPanel` gives: what is in the markup is what a crawler reads and what a
44723
+ * server sent, and an `<img>` that has already decoded does not decode again
44724
+ * when the reader walks back to it.
44725
+ *
44726
+ * ## Attributes & Properties
44727
+ *
44728
+ * Component attributes and properties that can be applied to the element or by using JavaScript.
44729
+ *
44730
+ * - `current`: Whether this is the one being shown.
44731
+ *
44732
+ * Written by the root, which is the only thing that sees the set.
44733
+ * - `label`: What this item is called, for the reading that says where the reader is.
44734
+ * - `value`: What names this item, and what `active` on the root is compared against.
44735
+ * - `whenSettled`: Resolves a frame after the first update, when transitions are switched on.
44736
+ *
44737
+ * **Named `whenSettled` because `settled` is taken four times over**, by
44738
+ * Image, Splitter and both color controls, none of them about transitions. A
44739
+ * base class takes the name every subclass then cannot use.
44740
+ *
44741
+ * **The state it reports cannot be watched, which is why this exists.** A
44742
+ * custom state is deliberately not in the DOM, so there is no
44743
+ * `MutationObserver` equivalent for `ElementInternals.states`. Await this
44744
+ * instead.
44745
+ *
44746
+ * Separate from `updateComplete`, which resolves in the microtask checkpoint
44747
+ * the suppression is still active in. That is the distinction `readyToMove`
44748
+ * in `@fusion.dev/helix-testing` is written around.
44749
+ *
44750
+ * It never resolves where `requestAnimationFrame` never fires, which is a
44751
+ * server, a hidden tab, and happy-dom. Callers that must not hang there race
44752
+ * it against a timeout, as the happy-dom harness's `readyToMove` does. The
44753
+ * browser harness's awaits it alone: a browser always runs the frame, and a
44754
+ * timer beside it was a bet on how long one takes, which a busy run lost. (property only) (readonly)
44755
+ *
44756
+ * ## Slots
44757
+ *
44758
+ * Areas where markup can be added to the component.
44759
+ *
44760
+ * - `(default)`: What is being shown.
44761
+ * - `description`: A line under it saying what it is.
44762
+ *
44763
+ * ## CSS Parts
44764
+ *
44765
+ * Custom selectors for styling elements within the component.
44766
+ *
44767
+ * - `item`: The box the content is shown in.
44768
+ *
44769
+ * ## CSS States
44770
+ *
44771
+ * These can be used to apply styling when a component is in a given state.
44772
+ *
44773
+ * - `current`: While this is the item the lightbox is showing.
44774
+ * - `settled`: Set a frame after the first render. Transitions are held off until it is, so an element never animates its own arrival.
44775
+ */
44776
+ "helix-headless-lightbox-item": Partial<
44777
+ HelixHeadlessLightboxItemProps &
44778
+ HelixHeadlessLightboxItemSolidJsProps &
44779
+ BaseProps<HelixHeadlessLightboxItem> &
44780
+ BaseEvents<HelixHeadlessLightboxItem>
44781
+ >;
44782
+
44783
+ /**
44784
+ * **A lightbox is chrome around a picture rather than a picture.** It draws
44785
+ * nothing of its own: what it shows is whatever the consumer opened, so this
44786
+ * earns its place on the frame, the keyboard and the reading that says where in
44787
+ * the set the reader is.
44788
+ *
44789
+ * **The modal half is the platform's.** A real `<dialog>` opened with
44790
+ * `showModal()` brings the top layer, a backdrop, Escape and `inert` behind it,
44791
+ * and this repository has already removed one hand-written focus trap for being
44792
+ * worse than that: `inert` on the rest of the document is something no
44793
+ * JavaScript trap can achieve. Every way it can close comes back through
44794
+ * `requestOpen`, which is what `Dialog` and `Drawer` both do and for the reason
44795
+ * they both give.
44796
+ *
44797
+ * **The set is this component's own and not `Carousel`'s.** A carousel is a
44798
+ * track: a scroller with snap points, per-view arithmetic and stops it can rest
44799
+ * between. A lightbox shows one thing at a time and has no track, so what it
44800
+ * needs is which item is current, which is `active` and the same pair `Tabs`
44801
+ * uses. The arrow keys move the picture under a reader whose focus stays in the
44802
+ * dialog, which is also why `KeyboardNavigationController` is not the right
44803
+ * tool: that one moves focus between focusable items, and these are pictures.
44804
+ *
44805
+ * **Chrome hides while the reader is still**, on `IdleController`, and comes
44806
+ * back on a pointer move or a focus. `fullscreen` is `FullscreenController`, the
44807
+ * same pair `Video` holds and the only two it shares.
44808
+ *
44809
+ * ## Attributes & Properties
44810
+ *
44811
+ * Component attributes and properties that can be applied to the element or by using JavaScript.
44812
+ *
44813
+ * - `idle-delay`/`idleDelay`: How long the reader may be still before the chrome hides, in milliseconds.
44814
+ *
44815
+ * Zero keeps it up, which is what a viewer with a caption worth reading
44816
+ * wants. The wait is only ever about idling: whether anything else should
44817
+ * keep the chrome up is the consumer's to decide with this.
44818
+ * - `label`: Accessible name for the viewer.
44819
+ * - `loop`: Whether walking past the end comes back to the beginning.
44820
+ * - `status-label`/`statusLabel`: The reading that says where in the set the reader is, with `{index}` and
44821
+ * `{count}` filled in.
44822
+ *
44823
+ * Announced rather than only drawn, because the picture changing under a
44824
+ * reader who cannot see it is otherwise silent. A consumer who has their own
44825
+ * counter in the chrome can empty this and say it themselves.
44826
+ * - `active`: Which item is current, by its `value`.
44827
+ *
44828
+ * Not `option.active`, which is the option the keyboard is on: that is a
44829
+ * different question from which one is chosen.
44830
+ *
44831
+ * Writing always applies, so `<helix-tabs active="one">` starts on that
44832
+ * tab, and `default-active` is how markup says where to start without
44833
+ * naming the current one.
44834
+ * - `default-active`/`defaultActive`: Which item the markup declared current.
44835
+ *
44836
+ * Ignored once `active` is written.
44837
+ * - `open`: Whether the element is open.
44838
+ *
44839
+ * One property, not two, so `dialog.open` answers the question anyone
44840
+ * asking it meant. Writing always applies; `<helix-dialog open>` is the
44841
+ * same statement in markup.
44842
+ *
44843
+ * **Not reflected, and that is required rather than tidy.** Reflection
44844
+ * writes the resolved state back as an attribute, so an element that opened
44845
+ * itself would put `open` on its own host: cloned, serialized for
44846
+ * hydration, or diffed by a framework, it comes back holding whatever the
44847
+ * last reader did rather than what the author wrote. `:state(open)` carries
44848
+ * the resolved state for stylesheets, which is what the mirror is for.
44849
+ * - `default-open`/`defaultOpen`: Whether the markup declared it open. Ignored once `open` is written.
44850
+ * - `whenSettled`: Resolves a frame after the first update, when transitions are switched on.
44851
+ *
44852
+ * **Named `whenSettled` because `settled` is taken four times over**, by
44853
+ * Image, Splitter and both color controls, none of them about transitions. A
44854
+ * base class takes the name every subclass then cannot use.
44855
+ *
44856
+ * **The state it reports cannot be watched, which is why this exists.** A
44857
+ * custom state is deliberately not in the DOM, so there is no
44858
+ * `MutationObserver` equivalent for `ElementInternals.states`. Await this
44859
+ * instead.
44860
+ *
44861
+ * Separate from `updateComplete`, which resolves in the microtask checkpoint
44862
+ * the suppression is still active in. That is the distinction `readyToMove`
44863
+ * in `@fusion.dev/helix-testing` is written around.
44864
+ *
44865
+ * It never resolves where `requestAnimationFrame` never fires, which is a
44866
+ * server, a hidden tab, and happy-dom. Callers that must not hang there race
44867
+ * it against a timeout, as the happy-dom harness's `readyToMove` does. The
44868
+ * browser harness's awaits it alone: a browser always runs the frame, and a
44869
+ * timer beside it was a bet on how long one takes, which a busy run lost. (property only) (readonly)
44870
+ *
44871
+ * ## Events
44872
+ *
44873
+ * Events that will be emitted by the component.
44874
+ *
44875
+ * - `close`: Relayed, because the platform's own does not escape.
44876
+ * - `helix-activate`: Fired once the shown item has moved, so the element already holds it.
44877
+ * - `helix-before-activate`: Fired before the shown item changes, and cancelable. The only way to refuse one.
44878
+ * - `helix-before-close`: Fired before it closes, and cancelable.
44879
+ * - `helix-before-open`: Fired before it opens, and cancelable.
44880
+ * - `toggle`: Says the state moved, carrying `newState` and `oldState`.
44881
+ *
44882
+ * ## Slots
44883
+ *
44884
+ * Areas where markup can be added to the component.
44885
+ *
44886
+ * - `(default)`: The items, which are `<helix-headless-lightbox-item>` elements.
44887
+ * - `footer`: Chrome below the item, such as a counter or a thumbnail strip.
44888
+ * - `header`: Chrome above the item, such as a title and a close button.
44889
+ *
44890
+ * ## Methods
44891
+ *
44892
+ * Methods that can be called to access component functionality.
44893
+ *
44894
+ * - `show() => void`: Opens the viewer, which makes the rest of the page inert.
44895
+ * - `close() => void`: Asks to close, which a consumer may refuse.
44896
+ * - `next() => void`: Shows the next item, or the first where it is past the end and looping.
44897
+ * - `previous() => void`: Shows the previous item, or the last where it is past the start and looping.
44898
+ * - `toggleFullscreen() => void`: Fills the screen with the viewer, or comes back.
44899
+ * - `requestActive(next: string) => boolean`: Requests a new current item, and reports whether the request stood.
44900
+ *
44901
+ * Announces before it acts, so `preventDefault()` on the `helix-before-activate` is
44902
+ * a refusal and nothing moves. Unlike a native control, nothing has moved
44903
+ * by the time this runs, so refusing is simply not writing: there is
44904
+ * nothing to put back. Nobody refusing means the set updates itself,
44905
+ * whether or not a consumer declared `active`, a declared property being a
44906
+ * seed and a correction.
44907
+ * - `requestOpen(next: boolean) => boolean`: Requests an open-state change, and reports whether it was applied.
44908
+ *
44909
+ * Announces before it acts, so `preventDefault()` on the `helix-before-open` or
44910
+ * `helix-before-close` is a refusal and nothing moves. Nobody refusing means the
44911
+ * element opens or closes itself, whether or not a consumer declared
44912
+ * `open`: a declared property is a seed and a correction, and a consumer
44913
+ * who wants the decision for themselves refuses it and assigns their own.
44914
+ * - `toggleOpen() => boolean`: Requests the opposite of the current state.
44915
+ *
44916
+ * ## CSS Parts
44917
+ *
44918
+ * Custom selectors for styling elements within the component.
44919
+ *
44920
+ * - `dialog`: The native dialog element.
44921
+ * - `live`: The region that says which item is shown.
44922
+ * - `viewport`: The box the current item is shown in.
44923
+ *
44924
+ * ## CSS States
44925
+ *
44926
+ * These can be used to apply styling when a component is in a given state.
44927
+ *
44928
+ * - `fullscreen`: While the viewer fills the screen.
44929
+ * - `idle`: While the reader has been still long enough to hide the chrome.
44930
+ * - `open`: While the viewer is open.
44931
+ * - `settled`: Set a frame after the first render. Transitions are held off until it is, so an element never animates its own arrival.
44932
+ */
44933
+ "helix-headless-lightbox": Partial<
44934
+ HelixHeadlessLightboxProps &
44935
+ HelixHeadlessLightboxSolidJsProps &
44936
+ BaseProps<HelixHeadlessLightbox> &
44937
+ BaseEvents<HelixHeadlessLightbox>
44938
+ >;
44939
+
44267
44940
  /**
44268
44941
  * The chart for a shape rather than for a quantity, which is what decides the
44269
44942
  * one thing a bar chart is not allowed to do.