@fusion.dev/helix 0.161.0 → 0.162.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 +2501 -13
- package/dist/aura/root/aura-root.d.ts +0 -49
- package/dist/aura/root/aura-root.js +2 -16
- package/dist/element-events.generated.js +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/strands/index.d.ts +2 -0
- package/dist/strands/index.js +2 -0
- package/dist/strands/palette.d.ts +42 -0
- package/dist/strands/palette.js +24 -0
- package/dist/strands/path.d.ts +89 -0
- package/dist/strands/path.js +153 -0
- package/dist/strands/renderer.d.ts +84 -0
- package/dist/strands/renderer.js +255 -0
- package/dist/strands/root/strands-root.css.d.ts +1 -0
- package/dist/strands/root/strands-root.css.js +8 -0
- package/dist/strands/root/strands-root.d.ts +230 -0
- package/dist/strands/root/strands-root.js +466 -0
- package/dist/strands/shader.d.ts +22 -0
- package/dist/strands/shader.js +198 -0
- package/dist/strands/stop/strands-stop.css.d.ts +1 -0
- package/dist/strands/stop/strands-stop.css.js +2 -0
- package/dist/strands/stop/strands-stop.d.ts +44 -0
- package/dist/strands/stop/strands-stop.js +29 -0
- package/lint.json +1 -1
- package/package.json +6 -6
- package/types/jsx.d.ts +496 -0
- package/types/svelte.d.ts +2 -0
- package/types/vue.d.ts +81 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fusion.dev/helix",
|
|
3
3
|
"description": "Styled component tier. Extends the headless tier with token-driven presentation.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.162.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Ross Sheppard <ross.sheppard@fusion.dev>",
|
|
7
7
|
"repository": {
|
|
@@ -54,13 +54,13 @@
|
|
|
54
54
|
},
|
|
55
55
|
"bugs": "https://github.com/project-fusion/fusion/issues",
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@fusion.dev/helix-core": "0.
|
|
58
|
-
"@fusion.dev/helix-headless": "0.
|
|
59
|
-
"@fusion.dev/helix-styles": "0.
|
|
57
|
+
"@fusion.dev/helix-core": "0.162.0",
|
|
58
|
+
"@fusion.dev/helix-headless": "0.162.0",
|
|
59
|
+
"@fusion.dev/helix-styles": "0.162.0"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
|
-
"@fusion.dev/helix-cem": "0.
|
|
63
|
-
"@fusion.dev/helix-testing": "0.
|
|
62
|
+
"@fusion.dev/helix-cem": "0.162.0",
|
|
63
|
+
"@fusion.dev/helix-testing": "0.162.0",
|
|
64
64
|
"@fusion.dev/scripts": "0.0.0-dev",
|
|
65
65
|
"@happy-dom/global-registrator": "^20.14.5",
|
|
66
66
|
"@lit-labs/ssr": "^4.1.0",
|
package/types/jsx.d.ts
CHANGED
|
@@ -213,6 +213,9 @@ import type {
|
|
|
213
213
|
HelixStatGroup,
|
|
214
214
|
HelixStep,
|
|
215
215
|
HelixSteps,
|
|
216
|
+
HelixStrands,
|
|
217
|
+
HelixStrandsFallbackEvent,
|
|
218
|
+
HelixStrandsStop,
|
|
216
219
|
HelixSwitch,
|
|
217
220
|
HelixTab,
|
|
218
221
|
HelixTabPanel,
|
|
@@ -32468,6 +32471,121 @@ with `linear`. Ark UI's skippable step. */
|
|
|
32468
32471
|
textContent?: (string | number) | undefined;
|
|
32469
32472
|
};
|
|
32470
32473
|
|
|
32474
|
+
/** `HelixStrands` component event */
|
|
32475
|
+
export type HelixStrandsElementEvent<E = Event> = TypedEvent<HelixStrands, E>;
|
|
32476
|
+
/** `helix-strands-fallback` event type */
|
|
32477
|
+
export type HelixStrandsHelixStrandsFallbackElementEvent =
|
|
32478
|
+
HelixStrandsElementEvent<HelixStrandsFallbackEvent>;
|
|
32479
|
+
|
|
32480
|
+
export type HelixStrandsProps = {
|
|
32481
|
+
/** Where the form sits across the box, as a share of the width: the fan's
|
|
32482
|
+
bend or the ribbon's axis. `0` is the left edge and `1` the right. A wave
|
|
32483
|
+
crosses the whole width and does not read it. Unset, a fan bends at `0.4`
|
|
32484
|
+
and a ribbon runs down the middle.
|
|
32485
|
+
|
|
32486
|
+
**A share rather than a length**, so the ribbon keeps its place when the
|
|
32487
|
+
box changes shape. Read inside a box only; in `travel` each stop has its
|
|
32488
|
+
own. */
|
|
32489
|
+
at?: (HelixStrands["at"]) | undefined;
|
|
32490
|
+
/** How many strands the ribbon has, from `0`, sixty, to `1`, three hundred and
|
|
32491
|
+
forty. Clamped to that range. */
|
|
32492
|
+
density?: (HelixStrands["density"]) | undefined;
|
|
32493
|
+
/** Overall brightness, as a multiplier on the light. */
|
|
32494
|
+
gain?: (HelixStrands["gain"]) | undefined;
|
|
32495
|
+
/** The share of strands drawn out of focus where the ribbon is wide, from `0`,
|
|
32496
|
+
every strand sharp, to `1`, every one soft. Clamped to that range. A tight
|
|
32497
|
+
form, such as a fan's bend or a wave, stays sharp whatever this says. */
|
|
32498
|
+
softness?: (HelixStrands["softness"]) | undefined;
|
|
32499
|
+
/** How fast the ribbon moves, as a multiplier on time. `0` holds it still. */
|
|
32500
|
+
speed?: (HelixStrands["speed"]) | undefined;
|
|
32501
|
+
/** How wide the ribbon is, as a multiplier on each form's own width. */
|
|
32502
|
+
spread?: (HelixStrands["spread"]) | undefined;
|
|
32503
|
+
/** Whether the ribbon is laid down the whole page, so scrolling travels along
|
|
32504
|
+
it.
|
|
32505
|
+
|
|
32506
|
+
Reflected because the stylesheet selects on it: in `travel` the host fixes
|
|
32507
|
+
itself to the viewport, behind the page. */
|
|
32508
|
+
travel?: (HelixStrands["travel"]) | undefined;
|
|
32509
|
+
/** The form the ribbon takes. When it is not set, the form is `ribbon`. In
|
|
32510
|
+
`travel`, the form of every stretch no stop claims. */
|
|
32511
|
+
variant?: (HelixStrands["variant"]) | undefined;
|
|
32512
|
+
|
|
32513
|
+
/** Fired each time the element stops drawing its ribbon and shows its gradient, with the reason. */
|
|
32514
|
+
"onhelix-strands-fallback"?: ((
|
|
32515
|
+
e: HelixStrandsHelixStrandsFallbackElementEvent,
|
|
32516
|
+
) => void) | undefined;
|
|
32517
|
+
};
|
|
32518
|
+
|
|
32519
|
+
export type HelixStrandsSolidJsProps = {
|
|
32520
|
+
/** Where the form sits across the box, as a share of the width: the fan's
|
|
32521
|
+
bend or the ribbon's axis. `0` is the left edge and `1` the right. A wave
|
|
32522
|
+
crosses the whole width and does not read it. Unset, a fan bends at `0.4`
|
|
32523
|
+
and a ribbon runs down the middle.
|
|
32524
|
+
|
|
32525
|
+
**A share rather than a length**, so the ribbon keeps its place when the
|
|
32526
|
+
box changes shape. Read inside a box only; in `travel` each stop has its
|
|
32527
|
+
own. */
|
|
32528
|
+
"prop:at"?: (HelixStrands["at"]) | undefined;
|
|
32529
|
+
/** How many strands the ribbon has, from `0`, sixty, to `1`, three hundred and
|
|
32530
|
+
forty. Clamped to that range. */
|
|
32531
|
+
"prop:density"?: (HelixStrands["density"]) | undefined;
|
|
32532
|
+
/** Overall brightness, as a multiplier on the light. */
|
|
32533
|
+
"prop:gain"?: (HelixStrands["gain"]) | undefined;
|
|
32534
|
+
/** The share of strands drawn out of focus where the ribbon is wide, from `0`,
|
|
32535
|
+
every strand sharp, to `1`, every one soft. Clamped to that range. A tight
|
|
32536
|
+
form, such as a fan's bend or a wave, stays sharp whatever this says. */
|
|
32537
|
+
"prop:softness"?: (HelixStrands["softness"]) | undefined;
|
|
32538
|
+
/** How fast the ribbon moves, as a multiplier on time. `0` holds it still. */
|
|
32539
|
+
"prop:speed"?: (HelixStrands["speed"]) | undefined;
|
|
32540
|
+
/** How wide the ribbon is, as a multiplier on each form's own width. */
|
|
32541
|
+
"prop:spread"?: (HelixStrands["spread"]) | undefined;
|
|
32542
|
+
/** Whether the ribbon is laid down the whole page, so scrolling travels along
|
|
32543
|
+
it.
|
|
32544
|
+
|
|
32545
|
+
Reflected because the stylesheet selects on it: in `travel` the host fixes
|
|
32546
|
+
itself to the viewport, behind the page. */
|
|
32547
|
+
"prop:travel"?: (HelixStrands["travel"]) | undefined;
|
|
32548
|
+
/** The form the ribbon takes. When it is not set, the form is `ribbon`. In
|
|
32549
|
+
`travel`, the form of every stretch no stop claims. */
|
|
32550
|
+
"prop:variant"?: (HelixStrands["variant"]) | undefined;
|
|
32551
|
+
/** Fired each time the element stops drawing its ribbon and shows its gradient, with the reason. */
|
|
32552
|
+
"on:helix-strands-fallback"?: ((
|
|
32553
|
+
e: HelixStrandsHelixStrandsFallbackElementEvent,
|
|
32554
|
+
) => void) | undefined;
|
|
32555
|
+
|
|
32556
|
+
/** Set the innerHTML of the element */
|
|
32557
|
+
innerHTML?: (string) | undefined;
|
|
32558
|
+
/** Set the textContent of the element */
|
|
32559
|
+
textContent?: (string | number) | undefined;
|
|
32560
|
+
};
|
|
32561
|
+
|
|
32562
|
+
export type HelixStrandsStopProps = {
|
|
32563
|
+
/** Where the form sits across the page, as a share of the width: the fan's
|
|
32564
|
+
bend or the ribbon's axis. A wave crosses the whole width and does not
|
|
32565
|
+
read it. Unset, a fan bends at `0.4` and a ribbon runs down the middle. */
|
|
32566
|
+
at?: (HelixStrandsStop["at"]) | undefined;
|
|
32567
|
+
/** The id of the element the form is pinned to, in the same tree as the stop. */
|
|
32568
|
+
for?: (HelixStrandsStop["for"]) | undefined;
|
|
32569
|
+
/** The form the ribbon takes at the element. When it is not set, the form is `ribbon`. */
|
|
32570
|
+
variant?: (HelixStrandsStop["variant"]) | undefined;
|
|
32571
|
+
};
|
|
32572
|
+
|
|
32573
|
+
export type HelixStrandsStopSolidJsProps = {
|
|
32574
|
+
/** Where the form sits across the page, as a share of the width: the fan's
|
|
32575
|
+
bend or the ribbon's axis. A wave crosses the whole width and does not
|
|
32576
|
+
read it. Unset, a fan bends at `0.4` and a ribbon runs down the middle. */
|
|
32577
|
+
"prop:at"?: (HelixStrandsStop["at"]) | undefined;
|
|
32578
|
+
/** The id of the element the form is pinned to, in the same tree as the stop. */
|
|
32579
|
+
"prop:for"?: (HelixStrandsStop["for"]) | undefined;
|
|
32580
|
+
/** The form the ribbon takes at the element. When it is not set, the form is `ribbon`. */
|
|
32581
|
+
"prop:variant"?: (HelixStrandsStop["variant"]) | undefined;
|
|
32582
|
+
|
|
32583
|
+
/** Set the innerHTML of the element */
|
|
32584
|
+
innerHTML?: (string) | undefined;
|
|
32585
|
+
/** Set the textContent of the element */
|
|
32586
|
+
textContent?: (string | number) | undefined;
|
|
32587
|
+
};
|
|
32588
|
+
|
|
32471
32589
|
/** `HelixSwitch` component event */
|
|
32472
32590
|
export type HelixSwitchElementEvent<E = Event> = TypedEvent<HelixSwitch, E>;
|
|
32473
32591
|
/** `helix-before-toggle` event type */
|
|
@@ -63556,6 +63674,188 @@ export type CustomElements = {
|
|
|
63556
63674
|
*/
|
|
63557
63675
|
"helix-step": Partial<HelixStepProps & BaseProps<HelixStep> & BaseEvents<HelixStep>>;
|
|
63558
63676
|
|
|
63677
|
+
/**
|
|
63678
|
+
* Hundreds of thin strands are drawn as one ribbon, and the light they add
|
|
63679
|
+
* together is bloomed, so where they converge the ribbon burns hot. The ribbon
|
|
63680
|
+
* moves on its own all the time: it sways and breathes, its strands wave and
|
|
63681
|
+
* roll over one another, and light runs along them.
|
|
63682
|
+
*
|
|
63683
|
+
* Its palette comes from the tokens. The strands are `--helix-color-primary`,
|
|
63684
|
+
* a few are `--helix-color-info` for depth, and the page they light is
|
|
63685
|
+
* `--helix-color-background`. On a light page the light becomes ink, because
|
|
63686
|
+
* light added to near-white cannot be seen.
|
|
63687
|
+
*
|
|
63688
|
+
* **Three forms, set with `variant`.** `fan` is a tight, bright bend with its
|
|
63689
|
+
* arms opening to the right. `ribbon`, the default, is a broad, soft ribbon in
|
|
63690
|
+
* long curves. `waves` is sharp strands crossing the full width.
|
|
63691
|
+
*
|
|
63692
|
+
* **In its own box, by default.** The element fills the box it is given, the
|
|
63693
|
+
* way an image does, and `at` places the fan's bend or the ribbon's axis across
|
|
63694
|
+
* it. Content placed inside sits over the ribbon, in the `content` part.
|
|
63695
|
+
*
|
|
63696
|
+
* **Down the whole page, with `travel`.** The element fixes itself behind the
|
|
63697
|
+
* page, on `--helix-layer-beneath`, and lays one ribbon from the top of the page to the
|
|
63698
|
+
* bottom, so scrolling travels along it. Put `helix-strands-stop` elements
|
|
63699
|
+
* inside to pin a form to a section: each names an element with `for` and says
|
|
63700
|
+
* which form the ribbon takes there. Between stops the ribbon fills the gap in
|
|
63701
|
+
* its own `variant`, and between two waves it turns off screen so each wave
|
|
63702
|
+
* reads alone. Set `z-index` on the element to move it.
|
|
63703
|
+
*
|
|
63704
|
+
* The ribbon stops moving in these cases:
|
|
63705
|
+
* - `prefers-reduced-motion` is set. The element shows one still frame, and in
|
|
63706
|
+
* `travel` still follows the scroll, without easing.
|
|
63707
|
+
* - The element is off screen or in a background tab.
|
|
63708
|
+
*
|
|
63709
|
+
* It shows a gradient from the same tokens in these cases, and matches
|
|
63710
|
+
* `:state(fallback)` and sends `helix-strands-fallback` with the reason:
|
|
63711
|
+
* - The renderer draws on the CPU, such as a headless browser or a machine with
|
|
63712
|
+
* no usable GPU.
|
|
63713
|
+
* - There is no WebGL, or the browser took the drawing context back.
|
|
63714
|
+
*
|
|
63715
|
+
* Strands is styled only and has behavior, as `Aura` does: its behavior is
|
|
63716
|
+
* drawing to a canvas, so there is no structure for a headless version to hold.
|
|
63717
|
+
*
|
|
63718
|
+
* ## Attributes & Properties
|
|
63719
|
+
*
|
|
63720
|
+
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
|
63721
|
+
*
|
|
63722
|
+
* - `at`: Where the form sits across the box, as a share of the width: the fan's
|
|
63723
|
+
* bend or the ribbon's axis. `0` is the left edge and `1` the right. A wave
|
|
63724
|
+
* crosses the whole width and does not read it. Unset, a fan bends at `0.4`
|
|
63725
|
+
* and a ribbon runs down the middle.
|
|
63726
|
+
*
|
|
63727
|
+
* **A share rather than a length**, so the ribbon keeps its place when the
|
|
63728
|
+
* box changes shape. Read inside a box only; in `travel` each stop has its
|
|
63729
|
+
* own.
|
|
63730
|
+
* - `density`: How many strands the ribbon has, from `0`, sixty, to `1`, three hundred and
|
|
63731
|
+
* forty. Clamped to that range.
|
|
63732
|
+
* - `gain`: Overall brightness, as a multiplier on the light.
|
|
63733
|
+
* - `softness`: The share of strands drawn out of focus where the ribbon is wide, from `0`,
|
|
63734
|
+
* every strand sharp, to `1`, every one soft. Clamped to that range. A tight
|
|
63735
|
+
* form, such as a fan's bend or a wave, stays sharp whatever this says.
|
|
63736
|
+
* - `speed`: How fast the ribbon moves, as a multiplier on time. `0` holds it still.
|
|
63737
|
+
* - `spread`: How wide the ribbon is, as a multiplier on each form's own width.
|
|
63738
|
+
* - `travel`: Whether the ribbon is laid down the whole page, so scrolling travels along
|
|
63739
|
+
* it.
|
|
63740
|
+
*
|
|
63741
|
+
* Reflected because the stylesheet selects on it: in `travel` the host fixes
|
|
63742
|
+
* itself to the viewport, behind the page.
|
|
63743
|
+
* - `variant`: The form the ribbon takes. When it is not set, the form is `ribbon`. In
|
|
63744
|
+
* `travel`, the form of every stretch no stop claims.
|
|
63745
|
+
* - `whenSettled`: Resolves a frame after the first update, when transitions are switched on.
|
|
63746
|
+
*
|
|
63747
|
+
* **Named `whenSettled` because `settled` is taken four times over**, by
|
|
63748
|
+
* Image, Splitter and both color controls, none of them about transitions. A
|
|
63749
|
+
* base class takes the name every subclass then cannot use.
|
|
63750
|
+
*
|
|
63751
|
+
* **The state it reports cannot be watched, which is why this exists.** A
|
|
63752
|
+
* custom state is deliberately not in the DOM, so there is no
|
|
63753
|
+
* `MutationObserver` equivalent for `ElementInternals.states`. Await this
|
|
63754
|
+
* instead.
|
|
63755
|
+
*
|
|
63756
|
+
* Separate from `updateComplete`, which resolves in the microtask checkpoint
|
|
63757
|
+
* the suppression is still active in. That is the distinction `readyToMove`
|
|
63758
|
+
* in `@fusion.dev/helix-testing` is written around.
|
|
63759
|
+
*
|
|
63760
|
+
* It never resolves where `requestAnimationFrame` never fires, which is a
|
|
63761
|
+
* server, a hidden tab, and happy-dom. Callers that must not hang there race
|
|
63762
|
+
* it against a timeout, as the happy-dom harness's `readyToMove` does. The
|
|
63763
|
+
* browser harness's awaits it alone: a browser always runs the frame, and a
|
|
63764
|
+
* timer beside it was a bet on how long one takes, which a busy run lost. (property only) (readonly)
|
|
63765
|
+
*
|
|
63766
|
+
* ## Events
|
|
63767
|
+
*
|
|
63768
|
+
* Events that will be emitted by the component.
|
|
63769
|
+
*
|
|
63770
|
+
* - `helix-strands-fallback`: Fired each time the element stops drawing its ribbon and shows its gradient, with the reason.
|
|
63771
|
+
*
|
|
63772
|
+
* ## Slots
|
|
63773
|
+
*
|
|
63774
|
+
* Areas where markup can be added to the component.
|
|
63775
|
+
*
|
|
63776
|
+
* - `(default)`: Content drawn over the ribbon, such as a heading, and the `helix-strands-stop` elements that pin its forms in `travel`.
|
|
63777
|
+
*
|
|
63778
|
+
* ## CSS Custom Properties
|
|
63779
|
+
*
|
|
63780
|
+
* CSS variables available for styling the component.
|
|
63781
|
+
*
|
|
63782
|
+
* - `--strands-glow`: The color of most strands. Defaults to `--helix-color-primary`.
|
|
63783
|
+
* - `--strands-ground`: The page the light is added to. Defaults to `--helix-color-background`.
|
|
63784
|
+
* - `--strands-peak`: The hottest strands, and on a light page the ink the light darkens toward. Defaults to `--helix-color-primary-hover` on a dark page and `--helix-color-primary-active` on a light one.
|
|
63785
|
+
* - `--strands-tint`: The color of a few strands, for depth. Defaults to `--helix-color-info`.
|
|
63786
|
+
*
|
|
63787
|
+
* ## CSS Parts
|
|
63788
|
+
*
|
|
63789
|
+
* Custom selectors for styling elements within the component.
|
|
63790
|
+
*
|
|
63791
|
+
* - `canvas`: The surface the ribbon draws into.
|
|
63792
|
+
* - `content`: The box over the ribbon that holds the content. It covers the element.
|
|
63793
|
+
*
|
|
63794
|
+
* ## CSS States
|
|
63795
|
+
*
|
|
63796
|
+
* These can be used to apply styling when a component is in a given state.
|
|
63797
|
+
*
|
|
63798
|
+
* - `fallback`: The element shows its gradient: the renderer draws on the CPU, there is no WebGL, or the browser took the context back. Cleared once the ribbon draws again.
|
|
63799
|
+
* - `settled`: Set one frame after the first render. Transitions wait for it, so an element does not animate its own arrival.
|
|
63800
|
+
*/
|
|
63801
|
+
"helix-strands": Partial<
|
|
63802
|
+
HelixStrandsProps & BaseProps<HelixStrands> & BaseEvents<HelixStrands>
|
|
63803
|
+
>;
|
|
63804
|
+
|
|
63805
|
+
/**
|
|
63806
|
+
* Placed inside a `helix-strands` with `travel`, a stop names an element with
|
|
63807
|
+
* `for` and says which form the ribbon takes when the page reaches it: a `fan`
|
|
63808
|
+
* bending through it, a `ribbon` passing through `at`, or `waves` crossing at
|
|
63809
|
+
* its top edge. The stops are read in page order, whatever order they are
|
|
63810
|
+
* written in, and a stop naming no element is skipped.
|
|
63811
|
+
*
|
|
63812
|
+
* A stop draws nothing itself and is never shown.
|
|
63813
|
+
*
|
|
63814
|
+
* **Every property is reflected**, because the parent watches its stops'
|
|
63815
|
+
* attributes to lay the ribbon out again: a change made from script reaches the
|
|
63816
|
+
* page as a change made in markup does. None has a default, so a stop writes
|
|
63817
|
+
* nothing it was not given.
|
|
63818
|
+
*
|
|
63819
|
+
* ## Attributes & Properties
|
|
63820
|
+
*
|
|
63821
|
+
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
|
63822
|
+
*
|
|
63823
|
+
* - `at`: Where the form sits across the page, as a share of the width: the fan's
|
|
63824
|
+
* bend or the ribbon's axis. A wave crosses the whole width and does not
|
|
63825
|
+
* read it. Unset, a fan bends at `0.4` and a ribbon runs down the middle.
|
|
63826
|
+
* - `for`: The id of the element the form is pinned to, in the same tree as the stop.
|
|
63827
|
+
* - `variant`: The form the ribbon takes at the element. When it is not set, the form is `ribbon`.
|
|
63828
|
+
* - `whenSettled`: Resolves a frame after the first update, when transitions are switched on.
|
|
63829
|
+
*
|
|
63830
|
+
* **Named `whenSettled` because `settled` is taken four times over**, by
|
|
63831
|
+
* Image, Splitter and both color controls, none of them about transitions. A
|
|
63832
|
+
* base class takes the name every subclass then cannot use.
|
|
63833
|
+
*
|
|
63834
|
+
* **The state it reports cannot be watched, which is why this exists.** A
|
|
63835
|
+
* custom state is deliberately not in the DOM, so there is no
|
|
63836
|
+
* `MutationObserver` equivalent for `ElementInternals.states`. Await this
|
|
63837
|
+
* instead.
|
|
63838
|
+
*
|
|
63839
|
+
* Separate from `updateComplete`, which resolves in the microtask checkpoint
|
|
63840
|
+
* the suppression is still active in. That is the distinction `readyToMove`
|
|
63841
|
+
* in `@fusion.dev/helix-testing` is written around.
|
|
63842
|
+
*
|
|
63843
|
+
* It never resolves where `requestAnimationFrame` never fires, which is a
|
|
63844
|
+
* server, a hidden tab, and happy-dom. Callers that must not hang there race
|
|
63845
|
+
* it against a timeout, as the happy-dom harness's `readyToMove` does. The
|
|
63846
|
+
* browser harness's awaits it alone: a browser always runs the frame, and a
|
|
63847
|
+
* timer beside it was a bet on how long one takes, which a busy run lost. (property only) (readonly)
|
|
63848
|
+
*
|
|
63849
|
+
* ## CSS States
|
|
63850
|
+
*
|
|
63851
|
+
* These can be used to apply styling when a component is in a given state.
|
|
63852
|
+
*
|
|
63853
|
+
* - `settled`: Set one frame after the first render. Transitions wait for it, so an element does not animate its own arrival.
|
|
63854
|
+
*/
|
|
63855
|
+
"helix-strands-stop": Partial<
|
|
63856
|
+
HelixStrandsStopProps & BaseProps<HelixStrandsStop> & BaseEvents<HelixStrandsStop>
|
|
63857
|
+
>;
|
|
63858
|
+
|
|
63559
63859
|
/**
|
|
63560
63860
|
* A thumb moves along a track. The switch is the one place in Helix where color
|
|
63561
63861
|
* means "on". A checkbox has a tick, and a switch has no mark, so the fill is
|
|
@@ -92648,6 +92948,194 @@ export type CustomElementsSolidJs = {
|
|
|
92648
92948
|
HelixStepProps & HelixStepSolidJsProps & BaseProps<HelixStep> & BaseEvents<HelixStep>
|
|
92649
92949
|
>;
|
|
92650
92950
|
|
|
92951
|
+
/**
|
|
92952
|
+
* Hundreds of thin strands are drawn as one ribbon, and the light they add
|
|
92953
|
+
* together is bloomed, so where they converge the ribbon burns hot. The ribbon
|
|
92954
|
+
* moves on its own all the time: it sways and breathes, its strands wave and
|
|
92955
|
+
* roll over one another, and light runs along them.
|
|
92956
|
+
*
|
|
92957
|
+
* Its palette comes from the tokens. The strands are `--helix-color-primary`,
|
|
92958
|
+
* a few are `--helix-color-info` for depth, and the page they light is
|
|
92959
|
+
* `--helix-color-background`. On a light page the light becomes ink, because
|
|
92960
|
+
* light added to near-white cannot be seen.
|
|
92961
|
+
*
|
|
92962
|
+
* **Three forms, set with `variant`.** `fan` is a tight, bright bend with its
|
|
92963
|
+
* arms opening to the right. `ribbon`, the default, is a broad, soft ribbon in
|
|
92964
|
+
* long curves. `waves` is sharp strands crossing the full width.
|
|
92965
|
+
*
|
|
92966
|
+
* **In its own box, by default.** The element fills the box it is given, the
|
|
92967
|
+
* way an image does, and `at` places the fan's bend or the ribbon's axis across
|
|
92968
|
+
* it. Content placed inside sits over the ribbon, in the `content` part.
|
|
92969
|
+
*
|
|
92970
|
+
* **Down the whole page, with `travel`.** The element fixes itself behind the
|
|
92971
|
+
* page, on `--helix-layer-beneath`, and lays one ribbon from the top of the page to the
|
|
92972
|
+
* bottom, so scrolling travels along it. Put `helix-strands-stop` elements
|
|
92973
|
+
* inside to pin a form to a section: each names an element with `for` and says
|
|
92974
|
+
* which form the ribbon takes there. Between stops the ribbon fills the gap in
|
|
92975
|
+
* its own `variant`, and between two waves it turns off screen so each wave
|
|
92976
|
+
* reads alone. Set `z-index` on the element to move it.
|
|
92977
|
+
*
|
|
92978
|
+
* The ribbon stops moving in these cases:
|
|
92979
|
+
* - `prefers-reduced-motion` is set. The element shows one still frame, and in
|
|
92980
|
+
* `travel` still follows the scroll, without easing.
|
|
92981
|
+
* - The element is off screen or in a background tab.
|
|
92982
|
+
*
|
|
92983
|
+
* It shows a gradient from the same tokens in these cases, and matches
|
|
92984
|
+
* `:state(fallback)` and sends `helix-strands-fallback` with the reason:
|
|
92985
|
+
* - The renderer draws on the CPU, such as a headless browser or a machine with
|
|
92986
|
+
* no usable GPU.
|
|
92987
|
+
* - There is no WebGL, or the browser took the drawing context back.
|
|
92988
|
+
*
|
|
92989
|
+
* Strands is styled only and has behavior, as `Aura` does: its behavior is
|
|
92990
|
+
* drawing to a canvas, so there is no structure for a headless version to hold.
|
|
92991
|
+
*
|
|
92992
|
+
* ## Attributes & Properties
|
|
92993
|
+
*
|
|
92994
|
+
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
|
92995
|
+
*
|
|
92996
|
+
* - `at`: Where the form sits across the box, as a share of the width: the fan's
|
|
92997
|
+
* bend or the ribbon's axis. `0` is the left edge and `1` the right. A wave
|
|
92998
|
+
* crosses the whole width and does not read it. Unset, a fan bends at `0.4`
|
|
92999
|
+
* and a ribbon runs down the middle.
|
|
93000
|
+
*
|
|
93001
|
+
* **A share rather than a length**, so the ribbon keeps its place when the
|
|
93002
|
+
* box changes shape. Read inside a box only; in `travel` each stop has its
|
|
93003
|
+
* own.
|
|
93004
|
+
* - `density`: How many strands the ribbon has, from `0`, sixty, to `1`, three hundred and
|
|
93005
|
+
* forty. Clamped to that range.
|
|
93006
|
+
* - `gain`: Overall brightness, as a multiplier on the light.
|
|
93007
|
+
* - `softness`: The share of strands drawn out of focus where the ribbon is wide, from `0`,
|
|
93008
|
+
* every strand sharp, to `1`, every one soft. Clamped to that range. A tight
|
|
93009
|
+
* form, such as a fan's bend or a wave, stays sharp whatever this says.
|
|
93010
|
+
* - `speed`: How fast the ribbon moves, as a multiplier on time. `0` holds it still.
|
|
93011
|
+
* - `spread`: How wide the ribbon is, as a multiplier on each form's own width.
|
|
93012
|
+
* - `travel`: Whether the ribbon is laid down the whole page, so scrolling travels along
|
|
93013
|
+
* it.
|
|
93014
|
+
*
|
|
93015
|
+
* Reflected because the stylesheet selects on it: in `travel` the host fixes
|
|
93016
|
+
* itself to the viewport, behind the page.
|
|
93017
|
+
* - `variant`: The form the ribbon takes. When it is not set, the form is `ribbon`. In
|
|
93018
|
+
* `travel`, the form of every stretch no stop claims.
|
|
93019
|
+
* - `whenSettled`: Resolves a frame after the first update, when transitions are switched on.
|
|
93020
|
+
*
|
|
93021
|
+
* **Named `whenSettled` because `settled` is taken four times over**, by
|
|
93022
|
+
* Image, Splitter and both color controls, none of them about transitions. A
|
|
93023
|
+
* base class takes the name every subclass then cannot use.
|
|
93024
|
+
*
|
|
93025
|
+
* **The state it reports cannot be watched, which is why this exists.** A
|
|
93026
|
+
* custom state is deliberately not in the DOM, so there is no
|
|
93027
|
+
* `MutationObserver` equivalent for `ElementInternals.states`. Await this
|
|
93028
|
+
* instead.
|
|
93029
|
+
*
|
|
93030
|
+
* Separate from `updateComplete`, which resolves in the microtask checkpoint
|
|
93031
|
+
* the suppression is still active in. That is the distinction `readyToMove`
|
|
93032
|
+
* in `@fusion.dev/helix-testing` is written around.
|
|
93033
|
+
*
|
|
93034
|
+
* It never resolves where `requestAnimationFrame` never fires, which is a
|
|
93035
|
+
* server, a hidden tab, and happy-dom. Callers that must not hang there race
|
|
93036
|
+
* it against a timeout, as the happy-dom harness's `readyToMove` does. The
|
|
93037
|
+
* browser harness's awaits it alone: a browser always runs the frame, and a
|
|
93038
|
+
* timer beside it was a bet on how long one takes, which a busy run lost. (property only) (readonly)
|
|
93039
|
+
*
|
|
93040
|
+
* ## Events
|
|
93041
|
+
*
|
|
93042
|
+
* Events that will be emitted by the component.
|
|
93043
|
+
*
|
|
93044
|
+
* - `helix-strands-fallback`: Fired each time the element stops drawing its ribbon and shows its gradient, with the reason.
|
|
93045
|
+
*
|
|
93046
|
+
* ## Slots
|
|
93047
|
+
*
|
|
93048
|
+
* Areas where markup can be added to the component.
|
|
93049
|
+
*
|
|
93050
|
+
* - `(default)`: Content drawn over the ribbon, such as a heading, and the `helix-strands-stop` elements that pin its forms in `travel`.
|
|
93051
|
+
*
|
|
93052
|
+
* ## CSS Custom Properties
|
|
93053
|
+
*
|
|
93054
|
+
* CSS variables available for styling the component.
|
|
93055
|
+
*
|
|
93056
|
+
* - `--strands-glow`: The color of most strands. Defaults to `--helix-color-primary`.
|
|
93057
|
+
* - `--strands-ground`: The page the light is added to. Defaults to `--helix-color-background`.
|
|
93058
|
+
* - `--strands-peak`: The hottest strands, and on a light page the ink the light darkens toward. Defaults to `--helix-color-primary-hover` on a dark page and `--helix-color-primary-active` on a light one.
|
|
93059
|
+
* - `--strands-tint`: The color of a few strands, for depth. Defaults to `--helix-color-info`.
|
|
93060
|
+
*
|
|
93061
|
+
* ## CSS Parts
|
|
93062
|
+
*
|
|
93063
|
+
* Custom selectors for styling elements within the component.
|
|
93064
|
+
*
|
|
93065
|
+
* - `canvas`: The surface the ribbon draws into.
|
|
93066
|
+
* - `content`: The box over the ribbon that holds the content. It covers the element.
|
|
93067
|
+
*
|
|
93068
|
+
* ## CSS States
|
|
93069
|
+
*
|
|
93070
|
+
* These can be used to apply styling when a component is in a given state.
|
|
93071
|
+
*
|
|
93072
|
+
* - `fallback`: The element shows its gradient: the renderer draws on the CPU, there is no WebGL, or the browser took the context back. Cleared once the ribbon draws again.
|
|
93073
|
+
* - `settled`: Set one frame after the first render. Transitions wait for it, so an element does not animate its own arrival.
|
|
93074
|
+
*/
|
|
93075
|
+
"helix-strands": Partial<
|
|
93076
|
+
HelixStrandsProps &
|
|
93077
|
+
HelixStrandsSolidJsProps &
|
|
93078
|
+
BaseProps<HelixStrands> &
|
|
93079
|
+
BaseEvents<HelixStrands>
|
|
93080
|
+
>;
|
|
93081
|
+
|
|
93082
|
+
/**
|
|
93083
|
+
* Placed inside a `helix-strands` with `travel`, a stop names an element with
|
|
93084
|
+
* `for` and says which form the ribbon takes when the page reaches it: a `fan`
|
|
93085
|
+
* bending through it, a `ribbon` passing through `at`, or `waves` crossing at
|
|
93086
|
+
* its top edge. The stops are read in page order, whatever order they are
|
|
93087
|
+
* written in, and a stop naming no element is skipped.
|
|
93088
|
+
*
|
|
93089
|
+
* A stop draws nothing itself and is never shown.
|
|
93090
|
+
*
|
|
93091
|
+
* **Every property is reflected**, because the parent watches its stops'
|
|
93092
|
+
* attributes to lay the ribbon out again: a change made from script reaches the
|
|
93093
|
+
* page as a change made in markup does. None has a default, so a stop writes
|
|
93094
|
+
* nothing it was not given.
|
|
93095
|
+
*
|
|
93096
|
+
* ## Attributes & Properties
|
|
93097
|
+
*
|
|
93098
|
+
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
|
93099
|
+
*
|
|
93100
|
+
* - `at`: Where the form sits across the page, as a share of the width: the fan's
|
|
93101
|
+
* bend or the ribbon's axis. A wave crosses the whole width and does not
|
|
93102
|
+
* read it. Unset, a fan bends at `0.4` and a ribbon runs down the middle.
|
|
93103
|
+
* - `for`: The id of the element the form is pinned to, in the same tree as the stop.
|
|
93104
|
+
* - `variant`: The form the ribbon takes at the element. When it is not set, the form is `ribbon`.
|
|
93105
|
+
* - `whenSettled`: Resolves a frame after the first update, when transitions are switched on.
|
|
93106
|
+
*
|
|
93107
|
+
* **Named `whenSettled` because `settled` is taken four times over**, by
|
|
93108
|
+
* Image, Splitter and both color controls, none of them about transitions. A
|
|
93109
|
+
* base class takes the name every subclass then cannot use.
|
|
93110
|
+
*
|
|
93111
|
+
* **The state it reports cannot be watched, which is why this exists.** A
|
|
93112
|
+
* custom state is deliberately not in the DOM, so there is no
|
|
93113
|
+
* `MutationObserver` equivalent for `ElementInternals.states`. Await this
|
|
93114
|
+
* instead.
|
|
93115
|
+
*
|
|
93116
|
+
* Separate from `updateComplete`, which resolves in the microtask checkpoint
|
|
93117
|
+
* the suppression is still active in. That is the distinction `readyToMove`
|
|
93118
|
+
* in `@fusion.dev/helix-testing` is written around.
|
|
93119
|
+
*
|
|
93120
|
+
* It never resolves where `requestAnimationFrame` never fires, which is a
|
|
93121
|
+
* server, a hidden tab, and happy-dom. Callers that must not hang there race
|
|
93122
|
+
* it against a timeout, as the happy-dom harness's `readyToMove` does. The
|
|
93123
|
+
* browser harness's awaits it alone: a browser always runs the frame, and a
|
|
93124
|
+
* timer beside it was a bet on how long one takes, which a busy run lost. (property only) (readonly)
|
|
93125
|
+
*
|
|
93126
|
+
* ## CSS States
|
|
93127
|
+
*
|
|
93128
|
+
* These can be used to apply styling when a component is in a given state.
|
|
93129
|
+
*
|
|
93130
|
+
* - `settled`: Set one frame after the first render. Transitions wait for it, so an element does not animate its own arrival.
|
|
93131
|
+
*/
|
|
93132
|
+
"helix-strands-stop": Partial<
|
|
93133
|
+
HelixStrandsStopProps &
|
|
93134
|
+
HelixStrandsStopSolidJsProps &
|
|
93135
|
+
BaseProps<HelixStrandsStop> &
|
|
93136
|
+
BaseEvents<HelixStrandsStop>
|
|
93137
|
+
>;
|
|
93138
|
+
|
|
92651
93139
|
/**
|
|
92652
93140
|
* A thumb moves along a track. The switch is the one place in Helix where color
|
|
92653
93141
|
* means "on". A checkbox has a tick, and a switch has no mark, so the fill is
|
|
@@ -100423,6 +100911,14 @@ export type CustomCssProperties = {
|
|
|
100423
100911
|
"--steps-progress-track-color"?: (string) | undefined;
|
|
100424
100912
|
/** How far through the sequence is, as a percentage, written on the `progress` part. */
|
|
100425
100913
|
"--steps-progress"?: (string) | undefined;
|
|
100914
|
+
/** The color of most strands. Defaults to `--helix-color-primary`. */
|
|
100915
|
+
"--strands-glow"?: (string) | undefined;
|
|
100916
|
+
/** The page the light is added to. Defaults to `--helix-color-background`. */
|
|
100917
|
+
"--strands-ground"?: (string) | undefined;
|
|
100918
|
+
/** The hottest strands, and on a light page the ink the light darkens toward. Defaults to `--helix-color-primary-hover` on a dark page and `--helix-color-primary-active` on a light one. */
|
|
100919
|
+
"--strands-peak"?: (string) | undefined;
|
|
100920
|
+
/** The color of a few strands, for depth. Defaults to `--helix-color-info`. */
|
|
100921
|
+
"--strands-tint"?: (string) | undefined;
|
|
100426
100922
|
/** Height of the track. The width follows it. */
|
|
100427
100923
|
"--switch-block-size"?: (string) | undefined;
|
|
100428
100924
|
/** Color of the icon on the thumb. Without it, the icon is muted while off and takes the on color while on. */
|
package/types/svelte.d.ts
CHANGED
|
@@ -157,6 +157,8 @@ declare module 'svelte/elements' {
|
|
|
157
157
|
'helix-stat': Helix<'helix-stat'>
|
|
158
158
|
'helix-steps': Helix<'helix-steps'>
|
|
159
159
|
'helix-step': Helix<'helix-step'>
|
|
160
|
+
'helix-strands': Helix<'helix-strands'>
|
|
161
|
+
'helix-strands-stop': Helix<'helix-strands-stop'>
|
|
160
162
|
'helix-switch': Helix<'helix-switch'>
|
|
161
163
|
'helix-table-cell': Helix<'helix-table-cell'>
|
|
162
164
|
'helix-table-column': Helix<'helix-table-column'>
|