@fusion.dev/helix-headless 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/custom-elements.json +1565 -1
- package/dist/dialog/root/dialog-root.d.ts +1 -1
- package/dist/element-events.generated.js +8 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/lightbox/index.d.ts +2 -0
- package/dist/lightbox/index.js +2 -0
- package/dist/lightbox/item/lightbox-item.d.ts +60 -0
- package/dist/lightbox/item/lightbox-item.js +45 -0
- package/dist/lightbox/root/lightbox-root.d.ts +176 -0
- package/dist/lightbox/root/lightbox-root.js +212 -0
- package/package.json +5 -5
- package/types/jsx.d.ts +673 -0
- package/types/svelte.d.ts +2 -0
- package/types/vue.d.ts +129 -2
package/types/svelte.d.ts
CHANGED
|
@@ -62,6 +62,8 @@ 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']
|
package/types/vue.d.ts
CHANGED
|
@@ -57,6 +57,8 @@ import type {
|
|
|
57
57
|
HelixHeadlessInput,
|
|
58
58
|
HelixHeadlessKbd,
|
|
59
59
|
HelixHeadlessLegend,
|
|
60
|
+
HelixHeadlessLightboxItem,
|
|
61
|
+
HelixHeadlessLightbox,
|
|
60
62
|
HelixHeadlessLineChart,
|
|
61
63
|
HelixHeadlessListItem,
|
|
62
64
|
HelixHeadlessList,
|
|
@@ -155,12 +157,12 @@ import type {
|
|
|
155
157
|
HelixFacetEvent,
|
|
156
158
|
HelixResizeEvent,
|
|
157
159
|
HelixShortcutEvent,
|
|
158
|
-
HelixReadEvent,
|
|
159
160
|
HelixActivateEvent,
|
|
161
|
+
HelixBeforeActivateEvent,
|
|
162
|
+
HelixReadEvent,
|
|
160
163
|
HelixCompleteEvent,
|
|
161
164
|
HelixBeforeCollapseEvent,
|
|
162
165
|
HelixBeforeResizeEvent,
|
|
163
|
-
HelixBeforeActivateEvent,
|
|
164
166
|
HelixTourAskEvent,
|
|
165
167
|
HelixNextEvent,
|
|
166
168
|
HelixPreviousEvent,
|
|
@@ -4361,6 +4363,119 @@ shadow root reads a table in that root rather than one in the document.
|
|
|
4361
4363
|
|
|
4362
4364
|
export type HelixHeadlessLegendVueEvents = {};
|
|
4363
4365
|
|
|
4366
|
+
export type HelixHeadlessLightboxItemVueProps = {
|
|
4367
|
+
/** Whether this is the one being shown.
|
|
4368
|
+
|
|
4369
|
+
Written by the root, which is the only thing that sees the set. */
|
|
4370
|
+
current?: (HelixHeadlessLightboxItem["current"]) | undefined;
|
|
4371
|
+
/** What this item is called, for the reading that says where the reader is. */
|
|
4372
|
+
label?: (HelixHeadlessLightboxItem["label"]) | undefined;
|
|
4373
|
+
/** What names this item, and what `active` on the root is compared against. */
|
|
4374
|
+
value?: (HelixHeadlessLightboxItem["value"]) | undefined;
|
|
4375
|
+
};
|
|
4376
|
+
|
|
4377
|
+
export type HelixHeadlessLightboxItemVueEvents = {};
|
|
4378
|
+
|
|
4379
|
+
/** `HelixHeadlessLightbox` component event */
|
|
4380
|
+
export type HelixHeadlessLightboxElementEvent<E = Event> = TypedEvent<
|
|
4381
|
+
HelixHeadlessLightbox,
|
|
4382
|
+
E
|
|
4383
|
+
>;
|
|
4384
|
+
/** `helix-activate` event type */
|
|
4385
|
+
export type HelixHeadlessLightboxHelixActivateElementEvent =
|
|
4386
|
+
HelixHeadlessLightboxElementEvent<HelixActivateEvent>;
|
|
4387
|
+
/** `helix-before-activate` event type */
|
|
4388
|
+
export type HelixHeadlessLightboxHelixBeforeActivateElementEvent =
|
|
4389
|
+
HelixHeadlessLightboxElementEvent<HelixBeforeActivateEvent>;
|
|
4390
|
+
/** `helix-before-close` event type */
|
|
4391
|
+
export type HelixHeadlessLightboxHelixBeforeCloseElementEvent =
|
|
4392
|
+
HelixHeadlessLightboxElementEvent<HelixBeforeCloseEvent>;
|
|
4393
|
+
/** `helix-before-open` event type */
|
|
4394
|
+
export type HelixHeadlessLightboxHelixBeforeOpenElementEvent =
|
|
4395
|
+
HelixHeadlessLightboxElementEvent<HelixBeforeOpenEvent>;
|
|
4396
|
+
|
|
4397
|
+
export type HelixHeadlessLightboxVueProps = {
|
|
4398
|
+
/** How long the reader may be still before the chrome hides, in milliseconds.
|
|
4399
|
+
|
|
4400
|
+
Zero keeps it up, which is what a viewer with a caption worth reading
|
|
4401
|
+
wants. The wait is only ever about idling: whether anything else should
|
|
4402
|
+
keep the chrome up is the consumer's to decide with this. */
|
|
4403
|
+
"idle-delay"?: (HelixHeadlessLightbox["idleDelay"] | `${number}`) | undefined;
|
|
4404
|
+
/** How long the reader may be still before the chrome hides, in milliseconds.
|
|
4405
|
+
|
|
4406
|
+
Zero keeps it up, which is what a viewer with a caption worth reading
|
|
4407
|
+
wants. The wait is only ever about idling: whether anything else should
|
|
4408
|
+
keep the chrome up is the consumer's to decide with this. */
|
|
4409
|
+
idleDelay?: (HelixHeadlessLightbox["idleDelay"]) | undefined;
|
|
4410
|
+
/** Accessible name for the viewer. */
|
|
4411
|
+
label?: (HelixHeadlessLightbox["label"]) | undefined;
|
|
4412
|
+
/** Whether walking past the end comes back to the beginning. */
|
|
4413
|
+
loop?: (HelixHeadlessLightbox["loop"]) | undefined;
|
|
4414
|
+
/** The reading that says where in the set the reader is, with `{index}` and
|
|
4415
|
+
`{count}` filled in.
|
|
4416
|
+
|
|
4417
|
+
Announced rather than only drawn, because the picture changing under a
|
|
4418
|
+
reader who cannot see it is otherwise silent. A consumer who has their own
|
|
4419
|
+
counter in the chrome can empty this and say it themselves. */
|
|
4420
|
+
"status-label"?: (HelixHeadlessLightbox["statusLabel"]) | undefined;
|
|
4421
|
+
/** The reading that says where in the set the reader is, with `{index}` and
|
|
4422
|
+
`{count}` filled in.
|
|
4423
|
+
|
|
4424
|
+
Announced rather than only drawn, because the picture changing under a
|
|
4425
|
+
reader who cannot see it is otherwise silent. A consumer who has their own
|
|
4426
|
+
counter in the chrome can empty this and say it themselves. */
|
|
4427
|
+
statusLabel?: (HelixHeadlessLightbox["statusLabel"]) | undefined;
|
|
4428
|
+
/** Which item is current, by its `value`.
|
|
4429
|
+
|
|
4430
|
+
Not `option.active`, which is the option the keyboard is on: that is a
|
|
4431
|
+
different question from which one is chosen.
|
|
4432
|
+
|
|
4433
|
+
Writing always applies, so `<helix-tabs active="one">` starts on that
|
|
4434
|
+
tab, and `default-active` is how markup says where to start without
|
|
4435
|
+
naming the current one. */
|
|
4436
|
+
active?: (HelixHeadlessLightbox["active"]) | undefined;
|
|
4437
|
+
/** Which item the markup declared current.
|
|
4438
|
+
|
|
4439
|
+
Ignored once `active` is written. */
|
|
4440
|
+
"default-active"?: (HelixHeadlessLightbox["defaultActive"]) | undefined;
|
|
4441
|
+
/** Which item the markup declared current.
|
|
4442
|
+
|
|
4443
|
+
Ignored once `active` is written. */
|
|
4444
|
+
defaultActive?: (HelixHeadlessLightbox["defaultActive"]) | undefined;
|
|
4445
|
+
/** Whether the element is open.
|
|
4446
|
+
|
|
4447
|
+
One property, not two, so `dialog.open` answers the question anyone
|
|
4448
|
+
asking it meant. Writing always applies; `<helix-dialog open>` is the
|
|
4449
|
+
same statement in markup.
|
|
4450
|
+
|
|
4451
|
+
**Not reflected, and that is required rather than tidy.** Reflection
|
|
4452
|
+
writes the resolved state back as an attribute, so an element that opened
|
|
4453
|
+
itself would put `open` on its own host: cloned, serialized for
|
|
4454
|
+
hydration, or diffed by a framework, it comes back holding whatever the
|
|
4455
|
+
last reader did rather than what the author wrote. `:state(open)` carries
|
|
4456
|
+
the resolved state for stylesheets, which is what the mirror is for. */
|
|
4457
|
+
open?: (HelixHeadlessLightbox["open"]) | undefined;
|
|
4458
|
+
/** Whether the markup declared it open. Ignored once `open` is written. */
|
|
4459
|
+
"default-open"?: (HelixHeadlessLightbox["defaultOpen"]) | undefined;
|
|
4460
|
+
/** Whether the markup declared it open. Ignored once `open` is written. */
|
|
4461
|
+
defaultOpen?: (HelixHeadlessLightbox["defaultOpen"]) | undefined;
|
|
4462
|
+
};
|
|
4463
|
+
|
|
4464
|
+
export type HelixHeadlessLightboxVueEvents = {
|
|
4465
|
+
/** Relayed, because the platform's own does not escape. */
|
|
4466
|
+
close: HelixHeadlessLightboxElementEvent;
|
|
4467
|
+
/** Fired once the shown item has moved, so the element already holds it. */
|
|
4468
|
+
"helix-activate": HelixHeadlessLightboxHelixActivateElementEvent;
|
|
4469
|
+
/** Fired before the shown item changes, and cancelable. The only way to refuse one. */
|
|
4470
|
+
"helix-before-activate": HelixHeadlessLightboxHelixBeforeActivateElementEvent;
|
|
4471
|
+
/** Fired before it closes, and cancelable. */
|
|
4472
|
+
"helix-before-close": HelixHeadlessLightboxHelixBeforeCloseElementEvent;
|
|
4473
|
+
/** Fired before it opens, and cancelable. */
|
|
4474
|
+
"helix-before-open": HelixHeadlessLightboxHelixBeforeOpenElementEvent;
|
|
4475
|
+
/** Says the state moved, carrying `newState` and `oldState`. */
|
|
4476
|
+
toggle: HelixHeadlessLightboxElementEvent;
|
|
4477
|
+
};
|
|
4478
|
+
|
|
4364
4479
|
export type HelixHeadlessLineChartVueProps = {
|
|
4365
4480
|
/** Whether a wash is drawn under each line, each from the floor on its own.
|
|
4366
4481
|
The washes overlap rather than add up: for parts that make a total, use
|
|
@@ -9673,6 +9788,18 @@ export interface WcToolkitVueGlobalComponents {
|
|
|
9673
9788
|
HelixHeadlessLegendVueProps,
|
|
9674
9789
|
HelixHeadlessLegendVueEvents
|
|
9675
9790
|
>;
|
|
9791
|
+
/** 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. */
|
|
9792
|
+
"helix-headless-lightbox-item": DefineCustomElement<
|
|
9793
|
+
HelixHeadlessLightboxItem,
|
|
9794
|
+
HelixHeadlessLightboxItemVueProps,
|
|
9795
|
+
HelixHeadlessLightboxItemVueEvents
|
|
9796
|
+
>;
|
|
9797
|
+
/** **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. */
|
|
9798
|
+
"helix-headless-lightbox": DefineCustomElement<
|
|
9799
|
+
HelixHeadlessLightbox,
|
|
9800
|
+
HelixHeadlessLightboxVueProps,
|
|
9801
|
+
HelixHeadlessLightboxVueEvents
|
|
9802
|
+
>;
|
|
9676
9803
|
/** 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
9804
|
"helix-headless-line-chart": DefineCustomElement<
|
|
9678
9805
|
HelixHeadlessLineChart,
|