@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/types/svelte.d.ts CHANGED
@@ -62,11 +62,14 @@ declare module 'svelte/elements' {
62
62
  'helix-headless-input': CustomElements['helix-headless-input']
63
63
  'helix-headless-kbd': CustomElements['helix-headless-kbd']
64
64
  'helix-headless-legend': CustomElements['helix-headless-legend']
65
+ 'helix-headless-lightbox-item': CustomElements['helix-headless-lightbox-item']
66
+ 'helix-headless-lightbox': CustomElements['helix-headless-lightbox']
65
67
  'helix-headless-line-chart': CustomElements['helix-headless-line-chart']
66
68
  'helix-headless-list-item': CustomElements['helix-headless-list-item']
67
69
  'helix-headless-list': CustomElements['helix-headless-list']
68
70
  'helix-headless-listbox': CustomElements['helix-headless-listbox']
69
71
  'helix-headless-loader': CustomElements['helix-headless-loader']
72
+ 'helix-headless-map': CustomElements['helix-headless-map']
70
73
  'helix-headless-megamenu': CustomElements['helix-headless-megamenu']
71
74
  'helix-headless-menu-item': CustomElements['helix-headless-menu-item']
72
75
  'helix-headless-menu': CustomElements['helix-headless-menu']
package/types/vue.d.ts CHANGED
@@ -57,11 +57,14 @@ import type {
57
57
  HelixHeadlessInput,
58
58
  HelixHeadlessKbd,
59
59
  HelixHeadlessLegend,
60
+ HelixHeadlessLightboxItem,
61
+ HelixHeadlessLightbox,
60
62
  HelixHeadlessLineChart,
61
63
  HelixHeadlessListItem,
62
64
  HelixHeadlessList,
63
65
  HelixHeadlessListbox,
64
66
  HelixHeadlessLoader,
67
+ HelixHeadlessMap,
65
68
  HelixHeadlessMegamenu,
66
69
  HelixHeadlessMenuItem,
67
70
  HelixHeadlessMenu,
@@ -155,12 +158,14 @@ import type {
155
158
  HelixFacetEvent,
156
159
  HelixResizeEvent,
157
160
  HelixShortcutEvent,
158
- HelixReadEvent,
159
161
  HelixActivateEvent,
162
+ HelixBeforeActivateEvent,
163
+ HelixMapPanEvent,
164
+ HelixMapZoomEvent,
165
+ HelixReadEvent,
160
166
  HelixCompleteEvent,
161
167
  HelixBeforeCollapseEvent,
162
168
  HelixBeforeResizeEvent,
163
- HelixBeforeActivateEvent,
164
169
  HelixTourAskEvent,
165
170
  HelixNextEvent,
166
171
  HelixPreviousEvent,
@@ -4361,6 +4366,119 @@ shadow root reads a table in that root rather than one in the document.
4361
4366
 
4362
4367
  export type HelixHeadlessLegendVueEvents = {};
4363
4368
 
4369
+ export type HelixHeadlessLightboxItemVueProps = {
4370
+ /** Whether this is the one being shown.
4371
+
4372
+ Written by the root, which is the only thing that sees the set. */
4373
+ current?: (HelixHeadlessLightboxItem["current"]) | undefined;
4374
+ /** What this item is called, for the reading that says where the reader is. */
4375
+ label?: (HelixHeadlessLightboxItem["label"]) | undefined;
4376
+ /** What names this item, and what `active` on the root is compared against. */
4377
+ value?: (HelixHeadlessLightboxItem["value"]) | undefined;
4378
+ };
4379
+
4380
+ export type HelixHeadlessLightboxItemVueEvents = {};
4381
+
4382
+ /** `HelixHeadlessLightbox` component event */
4383
+ export type HelixHeadlessLightboxElementEvent<E = Event> = TypedEvent<
4384
+ HelixHeadlessLightbox,
4385
+ E
4386
+ >;
4387
+ /** `helix-activate` event type */
4388
+ export type HelixHeadlessLightboxHelixActivateElementEvent =
4389
+ HelixHeadlessLightboxElementEvent<HelixActivateEvent>;
4390
+ /** `helix-before-activate` event type */
4391
+ export type HelixHeadlessLightboxHelixBeforeActivateElementEvent =
4392
+ HelixHeadlessLightboxElementEvent<HelixBeforeActivateEvent>;
4393
+ /** `helix-before-close` event type */
4394
+ export type HelixHeadlessLightboxHelixBeforeCloseElementEvent =
4395
+ HelixHeadlessLightboxElementEvent<HelixBeforeCloseEvent>;
4396
+ /** `helix-before-open` event type */
4397
+ export type HelixHeadlessLightboxHelixBeforeOpenElementEvent =
4398
+ HelixHeadlessLightboxElementEvent<HelixBeforeOpenEvent>;
4399
+
4400
+ export type HelixHeadlessLightboxVueProps = {
4401
+ /** How long the reader may be still before the chrome hides, in milliseconds.
4402
+
4403
+ Zero keeps it up, which is what a viewer with a caption worth reading
4404
+ wants. The wait is only ever about idling: whether anything else should
4405
+ keep the chrome up is the consumer's to decide with this. */
4406
+ "idle-delay"?: (HelixHeadlessLightbox["idleDelay"] | `${number}`) | undefined;
4407
+ /** How long the reader may be still before the chrome hides, in milliseconds.
4408
+
4409
+ Zero keeps it up, which is what a viewer with a caption worth reading
4410
+ wants. The wait is only ever about idling: whether anything else should
4411
+ keep the chrome up is the consumer's to decide with this. */
4412
+ idleDelay?: (HelixHeadlessLightbox["idleDelay"]) | undefined;
4413
+ /** Accessible name for the viewer. */
4414
+ label?: (HelixHeadlessLightbox["label"]) | undefined;
4415
+ /** Whether walking past the end comes back to the beginning. */
4416
+ loop?: (HelixHeadlessLightbox["loop"]) | undefined;
4417
+ /** The reading that says where in the set the reader is, with `{index}` and
4418
+ `{count}` filled in.
4419
+
4420
+ Announced rather than only drawn, because the picture changing under a
4421
+ reader who cannot see it is otherwise silent. A consumer who has their own
4422
+ counter in the chrome can empty this and say it themselves. */
4423
+ "status-label"?: (HelixHeadlessLightbox["statusLabel"]) | undefined;
4424
+ /** The reading that says where in the set the reader is, with `{index}` and
4425
+ `{count}` filled in.
4426
+
4427
+ Announced rather than only drawn, because the picture changing under a
4428
+ reader who cannot see it is otherwise silent. A consumer who has their own
4429
+ counter in the chrome can empty this and say it themselves. */
4430
+ statusLabel?: (HelixHeadlessLightbox["statusLabel"]) | undefined;
4431
+ /** Which item is current, by its `value`.
4432
+
4433
+ Not `option.active`, which is the option the keyboard is on: that is a
4434
+ different question from which one is chosen.
4435
+
4436
+ Writing always applies, so `<helix-tabs active="one">` starts on that
4437
+ tab, and `default-active` is how markup says where to start without
4438
+ naming the current one. */
4439
+ active?: (HelixHeadlessLightbox["active"]) | undefined;
4440
+ /** Which item the markup declared current.
4441
+
4442
+ Ignored once `active` is written. */
4443
+ "default-active"?: (HelixHeadlessLightbox["defaultActive"]) | undefined;
4444
+ /** Which item the markup declared current.
4445
+
4446
+ Ignored once `active` is written. */
4447
+ defaultActive?: (HelixHeadlessLightbox["defaultActive"]) | undefined;
4448
+ /** Whether the element is open.
4449
+
4450
+ One property, not two, so `dialog.open` answers the question anyone
4451
+ asking it meant. Writing always applies; `<helix-dialog open>` is the
4452
+ same statement in markup.
4453
+
4454
+ **Not reflected, and that is required rather than tidy.** Reflection
4455
+ writes the resolved state back as an attribute, so an element that opened
4456
+ itself would put `open` on its own host: cloned, serialized for
4457
+ hydration, or diffed by a framework, it comes back holding whatever the
4458
+ last reader did rather than what the author wrote. `:state(open)` carries
4459
+ the resolved state for stylesheets, which is what the mirror is for. */
4460
+ open?: (HelixHeadlessLightbox["open"]) | undefined;
4461
+ /** Whether the markup declared it open. Ignored once `open` is written. */
4462
+ "default-open"?: (HelixHeadlessLightbox["defaultOpen"]) | undefined;
4463
+ /** Whether the markup declared it open. Ignored once `open` is written. */
4464
+ defaultOpen?: (HelixHeadlessLightbox["defaultOpen"]) | undefined;
4465
+ };
4466
+
4467
+ export type HelixHeadlessLightboxVueEvents = {
4468
+ /** Relayed, because the platform's own does not escape. */
4469
+ close: HelixHeadlessLightboxElementEvent;
4470
+ /** Fired once the shown item has moved, so the element already holds it. */
4471
+ "helix-activate": HelixHeadlessLightboxHelixActivateElementEvent;
4472
+ /** Fired before the shown item changes, and cancelable. The only way to refuse one. */
4473
+ "helix-before-activate": HelixHeadlessLightboxHelixBeforeActivateElementEvent;
4474
+ /** Fired before it closes, and cancelable. */
4475
+ "helix-before-close": HelixHeadlessLightboxHelixBeforeCloseElementEvent;
4476
+ /** Fired before it opens, and cancelable. */
4477
+ "helix-before-open": HelixHeadlessLightboxHelixBeforeOpenElementEvent;
4478
+ /** Says the state moved, carrying `newState` and `oldState`. */
4479
+ toggle: HelixHeadlessLightboxElementEvent;
4480
+ };
4481
+
4364
4482
  export type HelixHeadlessLineChartVueProps = {
4365
4483
  /** Whether a wash is drawn under each line, each from the floor on its own.
4366
4484
  The washes overlap rather than add up: for parts that make a total, use
@@ -4677,6 +4795,76 @@ export type HelixHeadlessLoaderVueProps = {
4677
4795
 
4678
4796
  export type HelixHeadlessLoaderVueEvents = {};
4679
4797
 
4798
+ /** `HelixHeadlessMap` component event */
4799
+ export type HelixHeadlessMapElementEvent<E = Event> = TypedEvent<
4800
+ HelixHeadlessMap,
4801
+ E
4802
+ >;
4803
+ /** `helix-map-pan` event type */
4804
+ export type HelixHeadlessMapHelixMapPanElementEvent =
4805
+ HelixHeadlessMapElementEvent<HelixMapPanEvent>;
4806
+ /** `helix-map-zoom` event type */
4807
+ export type HelixHeadlessMapHelixMapZoomElementEvent =
4808
+ HelixHeadlessMapElementEvent<HelixMapZoomEvent>;
4809
+
4810
+ export type HelixHeadlessMapVueProps = {
4811
+ /** What the control that fills the screen is called. */
4812
+ "fullscreen-label"?: (HelixHeadlessMap["fullscreenLabel"]) | undefined;
4813
+ /** What the control that fills the screen is called. */
4814
+ fullscreenLabel?: (HelixHeadlessMap["fullscreenLabel"]) | undefined;
4815
+ /** How long the reader may be still before the chrome hides, in milliseconds.
4816
+
4817
+ Zero keeps it up, which is the default: a map's controls are how a keyboard
4818
+ reader operates it, and chrome that hides itself by default would be this
4819
+ component undoing its own argument. Set it for a display map nobody drives. */
4820
+ "idle-delay"?: (HelixHeadlessMap["idleDelay"] | `${number}`) | undefined;
4821
+ /** How long the reader may be still before the chrome hides, in milliseconds.
4822
+
4823
+ Zero keeps it up, which is the default: a map's controls are how a keyboard
4824
+ reader operates it, and chrome that hides itself by default would be this
4825
+ component undoing its own argument. Set it for a display map nobody drives. */
4826
+ idleDelay?: (HelixHeadlessMap["idleDelay"]) | undefined;
4827
+ /** Accessible name for the map, which is the one thing a consumer must write.
4828
+
4829
+ There is no sensible default. "Map" names the widget rather than the place,
4830
+ and a reader meeting three of them on a page learns nothing from hearing the
4831
+ same word three times. */
4832
+ label?: (HelixHeadlessMap["label"]) | undefined;
4833
+ /** What the controls are called, for a page not in English. */
4834
+ "pan-label"?: (HelixHeadlessMap["panLabel"]) | undefined;
4835
+ /** What the controls are called, for a page not in English. */
4836
+ panLabel?: (HelixHeadlessMap["panLabel"]) | undefined;
4837
+ /** How far one press moves the map, as a fraction of what is on screen.
4838
+
4839
+ A fraction rather than a distance, because this frame does not know the
4840
+ scale of what is inside it: a quarter of the viewport is the same gesture at
4841
+ street level and at country level, and a consumer who wants metres can
4842
+ multiply by their own. */
4843
+ "pan-step"?: (HelixHeadlessMap["panStep"] | `${number}`) | undefined;
4844
+ /** How far one press moves the map, as a fraction of what is on screen.
4845
+
4846
+ A fraction rather than a distance, because this frame does not know the
4847
+ scale of what is inside it: a quarter of the viewport is the same gesture at
4848
+ street level and at country level, and a consumer who wants metres can
4849
+ multiply by their own. */
4850
+ panStep?: (HelixHeadlessMap["panStep"]) | undefined;
4851
+ /** What the zoom controls are called. */
4852
+ "zoom-in-label"?: (HelixHeadlessMap["zoomInLabel"]) | undefined;
4853
+ /** What the zoom controls are called. */
4854
+ zoomInLabel?: (HelixHeadlessMap["zoomInLabel"]) | undefined;
4855
+ /** What the zoom control that goes the other way is called. */
4856
+ "zoom-out-label"?: (HelixHeadlessMap["zoomOutLabel"]) | undefined;
4857
+ /** What the zoom control that goes the other way is called. */
4858
+ zoomOutLabel?: (HelixHeadlessMap["zoomOutLabel"]) | undefined;
4859
+ };
4860
+
4861
+ export type HelixHeadlessMapVueEvents = {
4862
+ /** The reader asked the map to move. Answer it against your own map. */
4863
+ "helix-map-pan": HelixHeadlessMapHelixMapPanElementEvent;
4864
+ /** The reader asked the map to zoom, by a direction rather than to a level. */
4865
+ "helix-map-zoom": HelixHeadlessMapHelixMapZoomElementEvent;
4866
+ };
4867
+
4680
4868
  /** `HelixHeadlessMegamenu` component event */
4681
4869
  export type HelixHeadlessMegamenuElementEvent<E = Event> = TypedEvent<
4682
4870
  HelixHeadlessMegamenu,
@@ -9673,6 +9861,18 @@ export interface WcToolkitVueGlobalComponents {
9673
9861
  HelixHeadlessLegendVueProps,
9674
9862
  HelixHeadlessLegendVueEvents
9675
9863
  >;
9864
+ /** A wrapper around whatever the consumer opened, which is the whole of what it is: a picture, a frame of video, a chart. The family shows one at a time and this is how it says which, so the content stays the consumer's and the arithmetic stays the root's. Hidden rather than unmounted while another item is current, for the reason 'TabPanel' gives: what is in the markup is what a crawler reads and what a server sent, and an '<img>' that has already decoded does not decode again when the reader walks back to it. */
9865
+ "helix-headless-lightbox-item": DefineCustomElement<
9866
+ HelixHeadlessLightboxItem,
9867
+ HelixHeadlessLightboxItemVueProps,
9868
+ HelixHeadlessLightboxItemVueEvents
9869
+ >;
9870
+ /** **A lightbox is chrome around a picture rather than a picture.** It draws nothing of its own: what it shows is whatever the consumer opened, so this earns its place on the frame, the keyboard and the reading that says where in the set the reader is. **The modal half is the platform's.** A real '<dialog>' opened with 'showModal()' brings the top layer, a backdrop, Escape and 'inert' behind it, and this repository has already removed one hand-written focus trap for being worse than that: 'inert' on the rest of the document is something no JavaScript trap can achieve. Every way it can close comes back through 'requestOpen', which is what 'Dialog' and 'Drawer' both do and for the reason they both give. **The set is this component's own and not 'Carousel''s.** A carousel is a track: a scroller with snap points, per-view arithmetic and stops it can rest between. A lightbox shows one thing at a time and has no track, so what it needs is which item is current, which is 'active' and the same pair 'Tabs' uses. The arrow keys move the picture under a reader whose focus stays in the dialog, which is also why 'KeyboardNavigationController' is not the right tool: that one moves focus between focusable items, and these are pictures. **Chrome hides while the reader is still**, on 'IdleController', and comes back on a pointer move or a focus. 'fullscreen' is 'FullscreenController', the same pair 'Video' holds and the only two it shares. */
9871
+ "helix-headless-lightbox": DefineCustomElement<
9872
+ HelixHeadlessLightbox,
9873
+ HelixHeadlessLightboxVueProps,
9874
+ HelixHeadlessLightboxVueEvents
9875
+ >;
9676
9876
  /** The chart for a shape rather than for a quantity, which is what decides the one thing a bar chart is not allowed to do. **It measures from its own range and not from zero, deliberately.** 'BarChart' refuses that switch because a bar's length *is* its value, so a baseline anywhere else makes the lengths proportional to nothing. A line claims no such thing: it says where the readings went, and forcing zero into the range of a series that moves between 980 and 1020 flattens the entire shape into a rule across the top of the box. The two rules are opposite because the two charts answer opposite questions, and 'zero' is here for the case where the distance from nothing is the point. **One scale across every series**, the same as the bar chart, because two series drawn to different scales are two charts sharing a picture. **Not the chart for a total made of parts.** 'area' washes each series from the floor on its own, so they overlap; 'Area Chart' stacks them, so the top edge is the total and each band is a share. A line chart answers how each series moved, an area chart how the whole is made up. **The labels are HTML beside the drawing rather than '<text>' inside it**, for the reason 'BarChart' records: an '<svg>' that fills its box scales its type with everything else, the same 'font-size' arriving at 10px in a narrow chart and 43px in a wide one, and there is no non-scaling-font to answer it the way 'vector-effect' answers strokes. The table is the accessible representation and this drawing is 'aria-hidden'. A reader who wants the numbers gets the numbers, not a described picture. */
9677
9877
  "helix-headless-line-chart": DefineCustomElement<
9678
9878
  HelixHeadlessLineChart,
@@ -9703,6 +9903,12 @@ export interface WcToolkitVueGlobalComponents {
9703
9903
  HelixHeadlessLoaderVueProps,
9704
9904
  HelixHeadlessLoaderVueEvents
9705
9905
  >;
9906
+ /** **Helix draws no map.** There are no tiles here, no projection and no network, and there should not be: a tile renderer is a library, and what a design system can add to MapLibre or Leaflet is the frame. The consumer slots their map and this owns the box, the name, the controls and the way out, which is the shape 'VideoPlaylist' uses for a player it never renders. **The accessibility argument is the reason this exists**, and it was measured rather than assumed: a map embedded the ordinary way is a canvas with no role and no name, and it has *no node at all* in the accessibility tree. A reader using a screen reader does not walk past it so much as never meet it. A named region with controls in it is the whole of the difference. **The controls are buttons, and that is a deliberate choice against arrow keys.** Arrows work here too, but what a screen reader does with them is not ours to decide: macOS passes them through, Windows readers hold them for their own reading mode unless a page takes 'role="application"', which costs the reader their normal way of reading everything else in the frame. A button is findable and operable in every screen reader on every platform without that bargain, so panning and zooming are buttons first and keys second. **Nothing here moves the map.** Both controls ask, through 'helix-map-pan' and 'helix-map-zoom', and the consumer answers against whatever they slotted. A frame that moved the map would have to know whose map it was. */
9907
+ "helix-headless-map": DefineCustomElement<
9908
+ HelixHeadlessMap,
9909
+ HelixHeadlessMapVueProps,
9910
+ HelixHeadlessMapVueEvents
9911
+ >;
9706
9912
  /** **A disclosure, not a menu, and that is the whole design.** 'role="menu"' and 'menuitem' are for an application's commands: they take over the arrow keys, announce "menu" to a reader who asked for navigation, and put every link inside a role that is not a link. This is a button that shows and hides a region of the consumer's own anchors, which leaves a middle click, a modified click and the status bar working. 'Menu' remains right for a row of commands. **It renders no links.** A router renders its own anchor and cannot render one inside this shadow root, so the panel is a slot and what goes in it is the lists and headings the consumer wrote. **It opens on hover, and a press is always the fallback.** 'open-on' says which, and hover is the resting value because a nav bar is where a reader expects to sweep along a row and see each section. */
9707
9913
  "helix-headless-megamenu": DefineCustomElement<
9708
9914
  HelixHeadlessMegamenu,