@fusion.dev/helix 0.173.0 → 0.175.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 +257 -30
- package/dist/strands/palette.d.ts +1 -1
- package/dist/strands/path.d.ts +17 -6
- package/dist/strands/path.js +149 -43
- package/dist/strands/renderer.d.ts +14 -0
- package/dist/strands/renderer.js +14 -4
- package/dist/strands/root/strands-root.css.js +1 -1
- package/dist/strands/root/strands-root.d.ts +41 -10
- package/dist/strands/root/strands-root.js +32 -5
- package/dist/strands/shader.d.ts +3 -3
- package/dist/strands/shader.js +35 -12
- package/dist/strands/stop/strands-stop.d.ts +5 -5
- package/lint.json +1 -1
- package/package.json +6 -6
- package/types/jsx.d.ts +123 -47
- package/types/vue.d.ts +32 -11
package/custom-elements.json
CHANGED
|
@@ -68480,7 +68480,7 @@
|
|
|
68480
68480
|
"text": "Date"
|
|
68481
68481
|
},
|
|
68482
68482
|
"privacy": "private",
|
|
68483
|
-
"description": "The date the tab stop sits on, which is where the arrows move from.\n\nIt has to be a date the grid actually renders, so the month is compared\nwith its year. Comparing the month alone puts the stop on the same date a\nyear away, which is rendered nowhere, and the grid is left with no tab stop\nat all and no way into it from the keyboard.\n\nEach candidate is tested in turn rather than the first one winning\noutright. Where the last date focused is in some other month, the selected\ndate still holds the stop, then today, as the APG date picker and React\nAria's calendar put it, and only with none of them in view does it fall\nto the first of the month. Measured before today was a candidate: a\ncalendar with no value opened on October 5 with its stop on \"Thursday,\nOctober 1\".",
|
|
68483
|
+
"description": "The date the tab stop sits on, which is where the arrows move from.\n\nIt has to be a date the grid actually renders, so the month is compared\nwith its year. Comparing the month alone puts the stop on the same date a\nyear away, which is rendered nowhere, and the grid is left with no tab stop\nat all and no way into it from the keyboard.\n\nEach candidate is tested in turn rather than the first one winning\noutright. Where the last date focused is in some other month, the selected\ndate still holds the stop, then today, as the APG date picker and React\nAria's calendar put it, and only with none of them in view does it fall\nto the first of the month. Measured before today was a candidate: a\ncalendar with no value opened on October 5 with its stop on \"Thursday,\nOctober 1\".\n\nToday counts only where it can be chosen, and the fallback is the first\nday of the month that can, so a reader tabbing in lands on a date they can\npick. Measured before: with `min=\"2026-03-03\"`, the stop sat on \"Sunday,\nMarch 1, 2026\", unavailable. A month with nothing to choose keeps its\nfirst day, so the grid still has a way in.",
|
|
68484
68484
|
"readonly": true,
|
|
68485
68485
|
"inheritedFrom": {
|
|
68486
68486
|
"name": "HelixHeadlessDatePicker",
|
|
@@ -72929,7 +72929,7 @@
|
|
|
72929
72929
|
"name": "handleSubmit",
|
|
72930
72930
|
"privacy": "private",
|
|
72931
72931
|
"readonly": true,
|
|
72932
|
-
"description": "A `<form method=\"dialog\">` slotted into the dialog
|
|
72932
|
+
"description": "A `<form method=\"dialog\">` slotted into the dialog closes it.",
|
|
72933
72933
|
"inheritedFrom": {
|
|
72934
72934
|
"name": "HelixHeadlessDialog",
|
|
72935
72935
|
"module": "src/dialog/root/dialog-root.ts"
|
|
@@ -76947,6 +76947,17 @@
|
|
|
76947
76947
|
"module": "src/drawer/root/drawer-root.ts"
|
|
76948
76948
|
}
|
|
76949
76949
|
},
|
|
76950
|
+
{
|
|
76951
|
+
"kind": "field",
|
|
76952
|
+
"name": "handleSubmit",
|
|
76953
|
+
"privacy": "private",
|
|
76954
|
+
"readonly": true,
|
|
76955
|
+
"description": "A `<form method=\"dialog\">` slotted into the drawer closes it, as in `Dialog`.",
|
|
76956
|
+
"inheritedFrom": {
|
|
76957
|
+
"name": "HelixHeadlessDrawer",
|
|
76958
|
+
"module": "src/drawer/root/drawer-root.ts"
|
|
76959
|
+
}
|
|
76960
|
+
},
|
|
76950
76961
|
{
|
|
76951
76962
|
"kind": "method",
|
|
76952
76963
|
"name": "renderDismissIcon",
|
|
@@ -107775,7 +107786,7 @@
|
|
|
107775
107786
|
"text": "string"
|
|
107776
107787
|
},
|
|
107777
107788
|
"default": "''",
|
|
107778
|
-
"description": "The item's identifier. The root compares its `active` value against it.",
|
|
107789
|
+
"description": "The item's identifier. The root compares its `active` value against it.\nWithout one, the item is named by its place in the set, counted from 1.",
|
|
107779
107790
|
"attribute": "value",
|
|
107780
107791
|
"inheritedFrom": {
|
|
107781
107792
|
"name": "HelixHeadlessLightboxItem",
|
|
@@ -108228,7 +108239,7 @@
|
|
|
108228
108239
|
"text": "string"
|
|
108229
108240
|
},
|
|
108230
108241
|
"default": "''",
|
|
108231
|
-
"description": "The item's identifier. The root compares its `active` value against it.",
|
|
108242
|
+
"description": "The item's identifier. The root compares its `active` value against it.\nWithout one, the item is named by its place in the set, counted from 1.",
|
|
108232
108243
|
"fieldName": "value",
|
|
108233
108244
|
"inheritedFrom": {
|
|
108234
108245
|
"name": "HelixHeadlessLightboxItem",
|
|
@@ -109022,6 +109033,20 @@
|
|
|
109022
109033
|
"module": "src/lightbox/root/lightbox-root.ts"
|
|
109023
109034
|
}
|
|
109024
109035
|
},
|
|
109036
|
+
{
|
|
109037
|
+
"kind": "field",
|
|
109038
|
+
"name": "zoomStep",
|
|
109039
|
+
"type": {
|
|
109040
|
+
"text": "boolean"
|
|
109041
|
+
},
|
|
109042
|
+
"privacy": "private",
|
|
109043
|
+
"default": "false",
|
|
109044
|
+
"description": "Whether the zoom is changing by one discrete step, a key or a control, which is said at once.",
|
|
109045
|
+
"inheritedFrom": {
|
|
109046
|
+
"name": "HelixHeadlessLightbox",
|
|
109047
|
+
"module": "src/lightbox/root/lightbox-root.ts"
|
|
109048
|
+
}
|
|
109049
|
+
},
|
|
109025
109050
|
{
|
|
109026
109051
|
"kind": "method",
|
|
109027
109052
|
"name": "sayZoom",
|
|
@@ -109031,7 +109056,7 @@
|
|
|
109031
109056
|
"text": "void"
|
|
109032
109057
|
}
|
|
109033
109058
|
},
|
|
109034
|
-
"description": "Says the new scale in the live region
|
|
109059
|
+
"description": "Says the new scale in the live region: a moment after the last change of\na pinch, a drag or the wheel, and at once for a key or a zoom control,\nwhich is one change a reader is waiting to hear. Said only after the\npause, a reader pressing `+` heard nothing until it ended.",
|
|
109035
109060
|
"inheritedFrom": {
|
|
109036
109061
|
"name": "HelixHeadlessLightbox",
|
|
109037
109062
|
"module": "src/lightbox/root/lightbox-root.ts"
|
|
@@ -109380,6 +109405,29 @@
|
|
|
109380
109405
|
"module": "src/lightbox/root/lightbox-root.ts"
|
|
109381
109406
|
}
|
|
109382
109407
|
},
|
|
109408
|
+
{
|
|
109409
|
+
"kind": "method",
|
|
109410
|
+
"name": "stepZoom",
|
|
109411
|
+
"privacy": "private",
|
|
109412
|
+
"return": {
|
|
109413
|
+
"type": {
|
|
109414
|
+
"text": "void"
|
|
109415
|
+
}
|
|
109416
|
+
},
|
|
109417
|
+
"parameters": [
|
|
109418
|
+
{
|
|
109419
|
+
"name": "change",
|
|
109420
|
+
"type": {
|
|
109421
|
+
"text": "() => void"
|
|
109422
|
+
}
|
|
109423
|
+
}
|
|
109424
|
+
],
|
|
109425
|
+
"description": "Changes the zoom by one discrete step, which `sayZoom` says at once.",
|
|
109426
|
+
"inheritedFrom": {
|
|
109427
|
+
"name": "HelixHeadlessLightbox",
|
|
109428
|
+
"module": "src/lightbox/root/lightbox-root.ts"
|
|
109429
|
+
}
|
|
109430
|
+
},
|
|
109383
109431
|
{
|
|
109384
109432
|
"kind": "method",
|
|
109385
109433
|
"name": "toEnd",
|
|
@@ -109420,6 +109468,9 @@
|
|
|
109420
109468
|
{
|
|
109421
109469
|
"kind": "field",
|
|
109422
109470
|
"name": "shown",
|
|
109471
|
+
"type": {
|
|
109472
|
+
"text": "HelixHeadlessLightboxItem | undefined"
|
|
109473
|
+
},
|
|
109423
109474
|
"privacy": "private",
|
|
109424
109475
|
"description": "The item on screen: the one `active` names, or the first where it names none.",
|
|
109425
109476
|
"readonly": true,
|
|
@@ -109428,6 +109479,29 @@
|
|
|
109428
109479
|
"module": "src/lightbox/root/lightbox-root.ts"
|
|
109429
109480
|
}
|
|
109430
109481
|
},
|
|
109482
|
+
{
|
|
109483
|
+
"kind": "method",
|
|
109484
|
+
"name": "named",
|
|
109485
|
+
"privacy": "private",
|
|
109486
|
+
"return": {
|
|
109487
|
+
"type": {
|
|
109488
|
+
"text": "HelixHeadlessLightboxItem | undefined"
|
|
109489
|
+
}
|
|
109490
|
+
},
|
|
109491
|
+
"parameters": [
|
|
109492
|
+
{
|
|
109493
|
+
"name": "items",
|
|
109494
|
+
"type": {
|
|
109495
|
+
"text": "HelixHeadlessLightboxItem[]"
|
|
109496
|
+
}
|
|
109497
|
+
}
|
|
109498
|
+
],
|
|
109499
|
+
"description": "The item `active` names, by `value` or by place, or the first where it names none.",
|
|
109500
|
+
"inheritedFrom": {
|
|
109501
|
+
"name": "HelixHeadlessLightbox",
|
|
109502
|
+
"module": "src/lightbox/root/lightbox-root.ts"
|
|
109503
|
+
}
|
|
109504
|
+
},
|
|
109431
109505
|
{
|
|
109432
109506
|
"kind": "field",
|
|
109433
109507
|
"name": "handleBackdrop",
|
|
@@ -195529,7 +195603,7 @@
|
|
|
195529
195603
|
"description": "Turns a resolved color into bytes, `undefined` where it cannot."
|
|
195530
195604
|
}
|
|
195531
195605
|
],
|
|
195532
|
-
"description": "The palette, from the colors the canvas's stylesheet resolved for it.\n\n**Carried on color properties of the canvas, which a canvas never paints**,\nthe way `Aura` carries its ramp: a custom property is handed back as the\ntext that was written, and a color property is resolved by the engine first.\nRead there, each color takes the `--strands-*` hook a page wrote anywhere\nabove the element, and the token otherwise:\n\n- `color`: `--strands-glow`, or `primary`.\n- `text-decoration-color`: `--strands-tint`, or `
|
|
195606
|
+
"description": "The palette, from the colors the canvas's stylesheet resolved for it.\n\n**Carried on color properties of the canvas, which a canvas never paints**,\nthe way `Aura` carries its ramp: a custom property is handed back as the\ntext that was written, and a color property is resolved by the engine first.\nRead there, each color takes the `--strands-*` hook a page wrote anywhere\nabove the element, and the token otherwise:\n\n- `color`: `--strands-glow`, or `primary`.\n- `text-decoration-color`: `--strands-tint`, or `accent`.\n- `outline-color`: `--strands-ground`, or the background.\n- `caret-color` and `column-rule-color`: `--strands-peak`, or the dark and\n the light page's own peak.\n\n**The ground says which way the page runs**, read from its luminance rather\nthan asked of the color mode, which is a private token this tier may not\nreach for. A dark page adds light toward a bright peak; a light page darkens\ntoward a deep one, because light added to near-white is invisible."
|
|
195533
195607
|
}
|
|
195534
195608
|
],
|
|
195535
195609
|
"exports": [
|
|
@@ -195564,6 +195638,15 @@
|
|
|
195564
195638
|
"default": "96",
|
|
195565
195639
|
"description": "The most points a path may carry, which is the length of the shader's\nuniform array.\n\nWebGL2 guarantees 256 vertex uniform vectors, and this takes 96 of them. A\npage-long ribbon spends one point per half screen, so 96 covers a page more\nthan forty screens long; a longer one keeps its first 96 points and fades."
|
|
195566
195640
|
},
|
|
195641
|
+
{
|
|
195642
|
+
"kind": "variable",
|
|
195643
|
+
"name": "TURN",
|
|
195644
|
+
"type": {
|
|
195645
|
+
"text": "number"
|
|
195646
|
+
},
|
|
195647
|
+
"default": "0.5",
|
|
195648
|
+
"description": "The tightest any form turns, as a share of the box's height: the radius of\nits sharpest curve.\n\nHalf the height. A bend's apex a few dozen pixels round kinked the strands\nthat ran along its inside, and read as a fold in the light where every form\nis meant to be one sweep. `path.pure.spec.ts` measures it on every form."
|
|
195649
|
+
},
|
|
195567
195650
|
{
|
|
195568
195651
|
"kind": "function",
|
|
195569
195652
|
"name": "boxPath",
|
|
@@ -195592,7 +195675,14 @@
|
|
|
195592
195675
|
"type": {
|
|
195593
195676
|
"text": "number"
|
|
195594
195677
|
},
|
|
195595
|
-
"description": "The box's height, in CSS pixels.
|
|
195678
|
+
"description": "The box's height, in CSS pixels."
|
|
195679
|
+
},
|
|
195680
|
+
{
|
|
195681
|
+
"name": "width",
|
|
195682
|
+
"type": {
|
|
195683
|
+
"text": "number"
|
|
195684
|
+
},
|
|
195685
|
+
"description": "The box's width, in CSS pixels. `x` is a share of it, and a bend's apex is drawn in pixels so it keeps its radius at any shape."
|
|
195596
195686
|
}
|
|
195597
195687
|
],
|
|
195598
195688
|
"description": "The ribbon drawn inside its own box, which is what an element without\n`travel` shows."
|
|
@@ -195642,7 +195732,7 @@
|
|
|
195642
195732
|
"description": "The page's height, in CSS pixels."
|
|
195643
195733
|
}
|
|
195644
195734
|
],
|
|
195645
|
-
"description": "The ribbon laid down a whole page, which is what an element with `travel`\nshows.\n\nEach stop places its form at its target, in page order. Between two stops\nthe ribbon fills the gap with soft S-curves in `fill`'s place, except\nbetween two waves, where it turns off
|
|
195735
|
+
"description": "The ribbon laid down a whole page, which is what an element with `travel`\nshows.\n\nEach stop places its form at its target, in page order. Between two stops\nthe ribbon fills the gap with soft S-curves in `fill`'s place, except\nbetween two waves less than a screen and a half apart, where it turns off\nscreen so each wave reads alone.\nWithout stops, `fill` runs the length of the page: a bend opens the page and\na ribbon follows it, waves cross every screen and a third, and a ribbon\nmeanders the whole way. After a last wave the ribbon does not come back, so\nthe page ends on the wave."
|
|
195646
195736
|
},
|
|
195647
195737
|
{
|
|
195648
195738
|
"kind": "function",
|
|
@@ -195744,6 +195834,14 @@
|
|
|
195744
195834
|
"module": "src/strands/path.ts"
|
|
195745
195835
|
}
|
|
195746
195836
|
},
|
|
195837
|
+
{
|
|
195838
|
+
"kind": "js",
|
|
195839
|
+
"name": "TURN",
|
|
195840
|
+
"declaration": {
|
|
195841
|
+
"name": "TURN",
|
|
195842
|
+
"module": "src/strands/path.ts"
|
|
195843
|
+
}
|
|
195844
|
+
},
|
|
195747
195845
|
{
|
|
195748
195846
|
"kind": "js",
|
|
195749
195847
|
"name": "boxPath",
|
|
@@ -195808,6 +195906,20 @@
|
|
|
195808
195906
|
"default": "60",
|
|
195809
195907
|
"description": "The fewest, at `density` 0. Fewer stops reading as a ribbon at all."
|
|
195810
195908
|
},
|
|
195909
|
+
{
|
|
195910
|
+
"kind": "variable",
|
|
195911
|
+
"name": "DUST",
|
|
195912
|
+
"type": {
|
|
195913
|
+
"text": "number"
|
|
195914
|
+
},
|
|
195915
|
+
"default": "600",
|
|
195916
|
+
"description": "Specks of dust around the strands at a `dust` of `1`."
|
|
195917
|
+
},
|
|
195918
|
+
{
|
|
195919
|
+
"kind": "variable",
|
|
195920
|
+
"name": "MAX_DUST",
|
|
195921
|
+
"description": "The most specks a frame draws, at a `dust` of `4`."
|
|
195922
|
+
},
|
|
195811
195923
|
{
|
|
195812
195924
|
"kind": "class",
|
|
195813
195925
|
"description": "The pipeline, on one context: strands and dust added into a float buffer,\ntwo levels of bloom, and the composite over the page color.\n\n**Created whole or not at all.** `create` answers `null` when any program\nfails to link, so the element has one question to ask and one fallback to\ntake, and never draws half a pipeline.\n\n**Float buffers where the GPU offers them, and eight bits where it does not.**\nLight is added strand by strand, and a hot bend sums far past `1`; an eight\nbit buffer clips it, so there the energy is scaled down on the way in and\nback up in the composite, which keeps the bend hot at the cost of some\ngradation in the dimmest strands.",
|
|
@@ -196236,6 +196348,22 @@
|
|
|
196236
196348
|
"module": "src/strands/renderer.ts"
|
|
196237
196349
|
}
|
|
196238
196350
|
},
|
|
196351
|
+
{
|
|
196352
|
+
"kind": "js",
|
|
196353
|
+
"name": "DUST",
|
|
196354
|
+
"declaration": {
|
|
196355
|
+
"name": "DUST",
|
|
196356
|
+
"module": "src/strands/renderer.ts"
|
|
196357
|
+
}
|
|
196358
|
+
},
|
|
196359
|
+
{
|
|
196360
|
+
"kind": "js",
|
|
196361
|
+
"name": "MAX_DUST",
|
|
196362
|
+
"declaration": {
|
|
196363
|
+
"name": "MAX_DUST",
|
|
196364
|
+
"module": "src/strands/renderer.ts"
|
|
196365
|
+
}
|
|
196366
|
+
},
|
|
196239
196367
|
{
|
|
196240
196368
|
"kind": "js",
|
|
196241
196369
|
"name": "StrandsRenderer",
|
|
@@ -196272,7 +196400,7 @@
|
|
|
196272
196400
|
"declarations": [
|
|
196273
196401
|
{
|
|
196274
196402
|
"kind": "class",
|
|
196275
|
-
"description": "Hundreds of thin strands are drawn as one ribbon, and the light they add\ntogether is bloomed, so where they converge the ribbon burns hot. The ribbon\nmoves on its own all the time: it sways and breathes, its strands wave and\nroll over one another, and light runs along them.\n\nIts palette comes from the tokens. The strands are `--helix-color-primary`,\na few are `--helix-color-
|
|
196403
|
+
"description": "Hundreds of thin strands are drawn as one ribbon, and the light they add\ntogether is bloomed, so where they converge the ribbon burns hot. The ribbon\nmoves on its own all the time: it sways and breathes, its strands wave and\nroll over one another, and light runs along them.\n\nIts palette comes from the tokens. The strands are `--helix-color-primary`,\na few are `--helix-color-accent` for depth, and the page they light is\n`--helix-color-background`. On a light page the light becomes ink, because\nlight added to near-white cannot be seen.\n\n**Three forms, set with `variant`.** `bend` turns bright strands through one tight point, with its\narms opening to the right. `ribbon`, the default, is a broad, soft ribbon in\nlong curves. `waves` is sharp strands crossing the full width.\n\n**In its own box, by default.** The element fills the box it is given, the\nway an image does, and `at` places the bend's apex or the ribbon's axis across\nit. Content placed inside sits over the ribbon, in the `content` part.\n\n**Down the whole page, with `travel`.** The element fixes itself behind the\npage, on `--helix-layer-beneath`, and lays one ribbon from the top of the page to the\nbottom, so scrolling travels along it. Put `helix-strands-stop` elements\ninside to pin a form to a section: each names an element with `for` and says\nwhich form the ribbon takes there. Between stops the ribbon fills the gap in\nits own `variant`, and between two waves less than a screen and a half\napart it turns off screen so each wave reads alone. Set `z-index` on the\nelement to move it.\n\nThe ribbon stops moving in these cases:\n- `prefers-reduced-motion` is set. The element shows one still frame, and in\n `travel` still follows the scroll, without easing.\n- The element is off screen or in a background tab.\n\nIt shows a gradient from the same tokens in these cases, and matches\n`:state(fallback)` and sends `helix-strands-fallback` with the reason:\n- The renderer draws on the CPU, such as a headless browser or a machine with\n no usable GPU.\n- There is no WebGL, or the browser took the drawing context back.\n\nStrands is styled only and has behavior, as `Aura` does: its behavior is\ndrawing to a canvas, so there is no structure for a headless version to hold.",
|
|
196276
196404
|
"name": "HelixStrands",
|
|
196277
196405
|
"cssProperties": [
|
|
196278
196406
|
{
|
|
@@ -196288,7 +196416,7 @@
|
|
|
196288
196416
|
"name": "--strands-peak"
|
|
196289
196417
|
},
|
|
196290
196418
|
{
|
|
196291
|
-
"description": "The color of a few strands, for depth. Defaults to `--helix-color-
|
|
196419
|
+
"description": "The color of a few strands, for depth. Defaults to `--helix-color-accent`, which is the primary itself unless the theme relates an accent to the brand, as `accent: { from: 'brand', rotate: 40 }` does.",
|
|
196292
196420
|
"name": "--strands-tint"
|
|
196293
196421
|
}
|
|
196294
196422
|
],
|
|
@@ -196315,9 +196443,29 @@
|
|
|
196315
196443
|
"type": {
|
|
196316
196444
|
"text": "number | undefined"
|
|
196317
196445
|
},
|
|
196318
|
-
"description": "Where the form sits across the box, as a share of the width: the
|
|
196446
|
+
"description": "Where the form sits across the box, as a share of the width: the bend's\napex or the ribbon's axis. `0` is the left edge and `1` the right. A wave\ncrosses the whole width and does not read it. Unset, a bend's apex sits at `0.5`\nand a ribbon runs down the middle.\n\n**A share rather than a length**, so the ribbon keeps its place when the\nbox changes shape. Read inside a box only; in `travel` each stop has its\nown.",
|
|
196319
196447
|
"attribute": "at"
|
|
196320
196448
|
},
|
|
196449
|
+
{
|
|
196450
|
+
"kind": "field",
|
|
196451
|
+
"name": "bloom",
|
|
196452
|
+
"type": {
|
|
196453
|
+
"text": "number"
|
|
196454
|
+
},
|
|
196455
|
+
"default": "1",
|
|
196456
|
+
"description": "How much the glow around the strands adds, as a multiplier. `0` draws the\nstrands alone, crisp and dimmer, and `1` is the default glow.",
|
|
196457
|
+
"attribute": "bloom"
|
|
196458
|
+
},
|
|
196459
|
+
{
|
|
196460
|
+
"kind": "field",
|
|
196461
|
+
"name": "contrast",
|
|
196462
|
+
"type": {
|
|
196463
|
+
"text": "number"
|
|
196464
|
+
},
|
|
196465
|
+
"default": "1",
|
|
196466
|
+
"description": "How far apart the brightest and dimmest strands are, from `0`, most of\nthem alike, to `1`, a few burning bright over many faint ones. Clamped to\nthat range. The ribbon as a whole keeps its strength.",
|
|
196467
|
+
"attribute": "contrast"
|
|
196468
|
+
},
|
|
196321
196469
|
{
|
|
196322
196470
|
"kind": "field",
|
|
196323
196471
|
"name": "density",
|
|
@@ -196328,6 +196476,36 @@
|
|
|
196328
196476
|
"description": "How many strands the ribbon has, from `0`, sixty, to `1`, three hundred and\nforty. Clamped to that range.",
|
|
196329
196477
|
"attribute": "density"
|
|
196330
196478
|
},
|
|
196479
|
+
{
|
|
196480
|
+
"kind": "field",
|
|
196481
|
+
"name": "depth",
|
|
196482
|
+
"type": {
|
|
196483
|
+
"text": "number"
|
|
196484
|
+
},
|
|
196485
|
+
"default": "1",
|
|
196486
|
+
"description": "How much the ribbon's depth shows, from `0`, flat, to `1`. Clamped to that\nrange. The strands at the front of the ribbon's roll are drawn thicker,\nbrighter, and further from its axis, and those at the back thinner, dimmer,\nand out of focus.",
|
|
196487
|
+
"attribute": "depth"
|
|
196488
|
+
},
|
|
196489
|
+
{
|
|
196490
|
+
"kind": "field",
|
|
196491
|
+
"name": "drift",
|
|
196492
|
+
"type": {
|
|
196493
|
+
"text": "number"
|
|
196494
|
+
},
|
|
196495
|
+
"default": "1",
|
|
196496
|
+
"description": "How differently each strand moves, from `0`, the whole ribbon rolling and\nwaving as one, to `1`, each strand at its own pace and angle, crossing\nover the others. Clamped to that range.",
|
|
196497
|
+
"attribute": "drift"
|
|
196498
|
+
},
|
|
196499
|
+
{
|
|
196500
|
+
"kind": "field",
|
|
196501
|
+
"name": "dust",
|
|
196502
|
+
"type": {
|
|
196503
|
+
"text": "number"
|
|
196504
|
+
},
|
|
196505
|
+
"default": "1",
|
|
196506
|
+
"description": "How many specks of dust drift around the strands, as a multiplier: `0`\ndraws none, `1` six hundred, and `4`, the most, two thousand four\nhundred. They gather where the ribbon is brightest.",
|
|
196507
|
+
"attribute": "dust"
|
|
196508
|
+
},
|
|
196331
196509
|
{
|
|
196332
196510
|
"kind": "field",
|
|
196333
196511
|
"name": "gain",
|
|
@@ -196344,8 +196522,8 @@
|
|
|
196344
196522
|
"type": {
|
|
196345
196523
|
"text": "number"
|
|
196346
196524
|
},
|
|
196347
|
-
"default": "0
|
|
196348
|
-
"description": "The share of strands drawn out of focus where the ribbon is wide, from `0`,\nevery strand sharp, to `1`, every one soft. Clamped to that range. A tight\nform, such as a
|
|
196525
|
+
"default": "0",
|
|
196526
|
+
"description": "The share of strands drawn out of focus where the ribbon is wide, from `0`,\nevery strand sharp, to `1`, every one soft. Clamped to that range. A tight\nform, such as a bend's apex or a wave, stays sharp whatever this says.",
|
|
196349
196527
|
"attribute": "softness"
|
|
196350
196528
|
},
|
|
196351
196529
|
{
|
|
@@ -196383,7 +196561,7 @@
|
|
|
196383
196561
|
"kind": "field",
|
|
196384
196562
|
"name": "variant",
|
|
196385
196563
|
"type": {
|
|
196386
|
-
"text": "'
|
|
196564
|
+
"text": "'bend' | 'ribbon' | 'waves' | undefined"
|
|
196387
196565
|
},
|
|
196388
196566
|
"description": "The form the ribbon takes. When it is not set, the form is `ribbon`. In\n`travel`, the form of every stretch no stop claims.",
|
|
196389
196567
|
"attribute": "variant"
|
|
@@ -197217,9 +197395,27 @@
|
|
|
197217
197395
|
"type": {
|
|
197218
197396
|
"text": "number | undefined"
|
|
197219
197397
|
},
|
|
197220
|
-
"description": "Where the form sits across the box, as a share of the width: the
|
|
197398
|
+
"description": "Where the form sits across the box, as a share of the width: the bend's\napex or the ribbon's axis. `0` is the left edge and `1` the right. A wave\ncrosses the whole width and does not read it. Unset, a bend's apex sits at `0.5`\nand a ribbon runs down the middle.\n\n**A share rather than a length**, so the ribbon keeps its place when the\nbox changes shape. Read inside a box only; in `travel` each stop has its\nown.",
|
|
197221
197399
|
"fieldName": "at"
|
|
197222
197400
|
},
|
|
197401
|
+
{
|
|
197402
|
+
"name": "bloom",
|
|
197403
|
+
"type": {
|
|
197404
|
+
"text": "number"
|
|
197405
|
+
},
|
|
197406
|
+
"default": "1",
|
|
197407
|
+
"description": "How much the glow around the strands adds, as a multiplier. `0` draws the\nstrands alone, crisp and dimmer, and `1` is the default glow.",
|
|
197408
|
+
"fieldName": "bloom"
|
|
197409
|
+
},
|
|
197410
|
+
{
|
|
197411
|
+
"name": "contrast",
|
|
197412
|
+
"type": {
|
|
197413
|
+
"text": "number"
|
|
197414
|
+
},
|
|
197415
|
+
"default": "1",
|
|
197416
|
+
"description": "How far apart the brightest and dimmest strands are, from `0`, most of\nthem alike, to `1`, a few burning bright over many faint ones. Clamped to\nthat range. The ribbon as a whole keeps its strength.",
|
|
197417
|
+
"fieldName": "contrast"
|
|
197418
|
+
},
|
|
197223
197419
|
{
|
|
197224
197420
|
"name": "density",
|
|
197225
197421
|
"type": {
|
|
@@ -197229,6 +197425,33 @@
|
|
|
197229
197425
|
"description": "How many strands the ribbon has, from `0`, sixty, to `1`, three hundred and\nforty. Clamped to that range.",
|
|
197230
197426
|
"fieldName": "density"
|
|
197231
197427
|
},
|
|
197428
|
+
{
|
|
197429
|
+
"name": "depth",
|
|
197430
|
+
"type": {
|
|
197431
|
+
"text": "number"
|
|
197432
|
+
},
|
|
197433
|
+
"default": "1",
|
|
197434
|
+
"description": "How much the ribbon's depth shows, from `0`, flat, to `1`. Clamped to that\nrange. The strands at the front of the ribbon's roll are drawn thicker,\nbrighter, and further from its axis, and those at the back thinner, dimmer,\nand out of focus.",
|
|
197435
|
+
"fieldName": "depth"
|
|
197436
|
+
},
|
|
197437
|
+
{
|
|
197438
|
+
"name": "drift",
|
|
197439
|
+
"type": {
|
|
197440
|
+
"text": "number"
|
|
197441
|
+
},
|
|
197442
|
+
"default": "1",
|
|
197443
|
+
"description": "How differently each strand moves, from `0`, the whole ribbon rolling and\nwaving as one, to `1`, each strand at its own pace and angle, crossing\nover the others. Clamped to that range.",
|
|
197444
|
+
"fieldName": "drift"
|
|
197445
|
+
},
|
|
197446
|
+
{
|
|
197447
|
+
"name": "dust",
|
|
197448
|
+
"type": {
|
|
197449
|
+
"text": "number"
|
|
197450
|
+
},
|
|
197451
|
+
"default": "1",
|
|
197452
|
+
"description": "How many specks of dust drift around the strands, as a multiplier: `0`\ndraws none, `1` six hundred, and `4`, the most, two thousand four\nhundred. They gather where the ribbon is brightest.",
|
|
197453
|
+
"fieldName": "dust"
|
|
197454
|
+
},
|
|
197232
197455
|
{
|
|
197233
197456
|
"name": "gain",
|
|
197234
197457
|
"type": {
|
|
@@ -197243,8 +197466,8 @@
|
|
|
197243
197466
|
"type": {
|
|
197244
197467
|
"text": "number"
|
|
197245
197468
|
},
|
|
197246
|
-
"default": "0
|
|
197247
|
-
"description": "The share of strands drawn out of focus where the ribbon is wide, from `0`,\nevery strand sharp, to `1`, every one soft. Clamped to that range. A tight\nform, such as a
|
|
197469
|
+
"default": "0",
|
|
197470
|
+
"description": "The share of strands drawn out of focus where the ribbon is wide, from `0`,\nevery strand sharp, to `1`, every one soft. Clamped to that range. A tight\nform, such as a bend's apex or a wave, stays sharp whatever this says.",
|
|
197248
197471
|
"fieldName": "softness"
|
|
197249
197472
|
},
|
|
197250
197473
|
{
|
|
@@ -197277,7 +197500,7 @@
|
|
|
197277
197500
|
{
|
|
197278
197501
|
"name": "variant",
|
|
197279
197502
|
"type": {
|
|
197280
|
-
"text": "'
|
|
197503
|
+
"text": "'bend' | 'ribbon' | 'waves' | undefined"
|
|
197281
197504
|
},
|
|
197282
197505
|
"description": "The form the ribbon takes. When it is not set, the form is `ribbon`. In\n`travel`, the form of every stretch no stop claims.",
|
|
197283
197506
|
"fieldName": "variant"
|
|
@@ -197322,7 +197545,7 @@
|
|
|
197322
197545
|
"slug": "preview"
|
|
197323
197546
|
},
|
|
197324
197547
|
{
|
|
197325
|
-
"description": "A
|
|
197548
|
+
"description": "A bend turning at a quarter of the width, and another at three quarters.",
|
|
197326
197549
|
"slug": "at"
|
|
197327
197550
|
},
|
|
197328
197551
|
{
|
|
@@ -197334,11 +197557,15 @@
|
|
|
197334
197557
|
"slug": "density-and-softness"
|
|
197335
197558
|
},
|
|
197336
197559
|
{
|
|
197337
|
-
"description": "
|
|
197560
|
+
"description": "A flat ribbon that moves as one beside the default, deep one, whose strands each move their own way.",
|
|
197561
|
+
"slug": "depth-and-motion"
|
|
197562
|
+
},
|
|
197563
|
+
{
|
|
197564
|
+
"description": "One ribbon down the whole page: a bend through the opening section, soft ribbon after it, and a wave above the last section.",
|
|
197338
197565
|
"slug": "travel"
|
|
197339
197566
|
},
|
|
197340
197567
|
{
|
|
197341
|
-
"description": "The three forms: a bright
|
|
197568
|
+
"description": "The three forms: a bright bend, a soft ribbon, and sharp waves.",
|
|
197342
197569
|
"slug": "variants"
|
|
197343
197570
|
}
|
|
197344
197571
|
],
|
|
@@ -197376,7 +197603,7 @@
|
|
|
197376
197603
|
{
|
|
197377
197604
|
"kind": "variable",
|
|
197378
197605
|
"name": "LINE_VERTEX",
|
|
197379
|
-
"default": "`#version 300 es layout(location = 0) in vec2 aVert; layout(location = 1) in float aId; uniform float uDpr; uniform float uSoftness; uniform vec3 uGlow; uniform vec3 uTint; uniform vec3 uPeak; out float vSide; out vec3 vColor; ${PATH} void main() { float id = aId; float r5 = h1(id + 7.77); float r6 = h1(id + 9.19); float r7 = h1(id + 11.3); float t = mix(uT.x, uT.y, aVert.x); vec3 info; vec3 unused; vec3 a = strandAt(id, t, info); vec3 b = strandAt(id, t + (uT.y - uT.x) / 700.0, unused); vec2 tg = b.xy - a.xy; tg = length(tg) > 1e-4 ? normalize(tg) : vec2(0.0, 1.0); vec2 nrm = vec2(-tg.y, tg.x); float soft = smoothstep(0.06, 0.28, info.y) * step(1.0 - uSoftness, r6); float base = mix(0.35, 1.3, r7 * r7) * uDpr * (1.0 + 0.3 * a.z); float w = max(base + soft * mix(8.0, 36.0, r6) * uDpr, 1.0); float drawW = w + 2.5 * uDpr; vec2 res = uView * uDpr; vec2 px = a.xy * uDpr + nrm * aVert.y * drawW * 0.5; gl_Position = vec4(px.x / res.x * 2.0 - 1.0, 1.0 - px.y / res.y * 2.0, 0.0, 1.0); vSide = aVert.y * drawW / w; float shimmer = 0.5 + 0.5 * sin(info.z * 0.044 - uTime * (2.0 + 2.0 * r5) + r6 * 6.283); shimmer *= shimmer; float
|
|
197606
|
+
"default": "`#version 300 es layout(location = 0) in vec2 aVert; layout(location = 1) in float aId; uniform float uDpr; uniform float uSoftness; uniform float uContrast; uniform vec3 uGlow; uniform vec3 uTint; uniform vec3 uPeak; out float vSide; out vec3 vColor; ${PATH} void main() { float id = aId; float r5 = h1(id + 7.77); float r6 = h1(id + 9.19); float r7 = h1(id + 11.3); float t = mix(uT.x, uT.y, aVert.x); vec3 info; vec3 unused; vec3 a = strandAt(id, t, info); vec3 b = strandAt(id, t + (uT.y - uT.x) / 700.0, unused); vec2 tg = b.xy - a.xy; tg = length(tg) > 1e-4 ? normalize(tg) : vec2(0.0, 1.0); vec2 nrm = vec2(-tg.y, tg.x); float soft = smoothstep(0.06, 0.28, info.y) * step(1.0 - uSoftness, r6); /* Nearer is thicker, and the back of the ribbon falls out of focus: wider at the same energy, so it reads as haze behind the sharp strands. */ float base = mix(0.35, 1.3, r7 * r7) * uDpr * (1.0 + (0.3 + 0.5 * uDepth) * a.z); float focus = uDepth * smoothstep(-0.1, -0.9, a.z) * 10.0 * uDpr; float w = max(base + soft * mix(8.0, 36.0, r6) * uDpr + focus, 1.0); float drawW = w + 2.5 * uDpr; vec2 res = uView * uDpr; vec2 px = a.xy * uDpr + nrm * aVert.y * drawW * 0.5; gl_Position = vec4(px.x / res.x * 2.0 - 1.0, 1.0 - px.y / res.y * 2.0, 0.0, 1.0); vSide = aVert.y * drawW / w; float shimmer = 0.5 + 0.5 * sin(info.z * 0.044 - uTime * (2.0 + 2.0 * r5) + r6 * 6.283); shimmer *= shimmer; /* Contrast spreads the strands' brightness: a few burn and most fall back. The mean is held, so the ribbon as a whole keeps its strength. */ float spread = mix(1.4, 4.5, uContrast); float least = mix(0.25, 0.04, uContrast); float bright = mix(least, 1.0, pow(r5, spread)) * 0.5625 / (least + (1.0 - least) / (spread + 1.0)); float energy = min(base, w) / w; float fall = 0.3 + 0.5 * uDepth; float depth = (1.0 - fall * (1.0 - a.z) * 0.5) / (1.0 - fall * 0.5); float rest = mix(0.35, 0.15, uContrast); vec3 col = mix(uGlow, uTint, step(0.83, r6) * 0.9); col = mix(col, uPeak, step(0.93, r7) * 0.6); vColor = col * energy * info.x * (rest + (1.0 - rest) * shimmer) * bright * depth; } `",
|
|
197380
197607
|
"description": "Each strand as a ribbon of quads, wide enough to anti-alias and to blur."
|
|
197381
197608
|
},
|
|
197382
197609
|
{
|
|
@@ -197388,7 +197615,7 @@
|
|
|
197388
197615
|
{
|
|
197389
197616
|
"kind": "variable",
|
|
197390
197617
|
"name": "DUST_VERTEX",
|
|
197391
|
-
"default": "`#version 300 es uniform float uDpr; uniform float uStrands; uniform vec3 uGlow; uniform vec3 uPeak; out vec3 vColor; ${PATH} void main() { float id = float(gl_VertexID); float sid = floor(h1(id + 0.5) * uStrands); float r = h1(id + 2.3); float r2 = h1(id + 4.1); float t = mix(uT.x, uT.y, fract(r + uTime * 0.003 * (0.3 + r2))); vec3 info; vec3 a = strandAt(sid, t, info); vec2 off = (vec2(h1(id + 6.1), h1(id + 8.3)) - 0.5) * (24.0 + (150.0 + info.y * uView.x) * h1(id + 9.7)); vec2 res = uView * uDpr; vec2 px = (a.xy + off) * uDpr; gl_Position = vec4(px.x / res.x * 2.0 - 1.0, 1.0 - px.y / res.y * 2.0, 0.0, 1.0); gl_PointSize = mix(1.2, 3.4, r2 * r2) * uDpr; float tw = 0.35 + 0.65 * (0.5 + 0.5 * sin(uTime * (0.5 + 1.8 * r) + r2 * 40.0)); vColor = mix(uGlow, uPeak, 0.55) * tw * mix(0.2, 0.9, r) * info.x * 0.8; } `",
|
|
197618
|
+
"default": "`#version 300 es uniform float uDpr; uniform float uStrands; uniform vec3 uGlow; uniform vec3 uPeak; out vec3 vColor; ${PATH} void main() { float id = float(gl_VertexID); float sid = floor(h1(id + 0.5) * uStrands); float r = h1(id + 2.3); float r2 = h1(id + 4.1); float t = mix(uT.x, uT.y, fract(r + uTime * 0.003 * (0.3 + r2))); vec3 info; vec3 a = strandAt(sid, t, info); vec2 off = (vec2(h1(id + 6.1), h1(id + 8.3)) - 0.5) * (24.0 + (150.0 + info.y * uView.x) * h1(id + 9.7)); vec2 res = uView * uDpr; vec2 px = (a.xy + off) * uDpr; gl_Position = vec4(px.x / res.x * 2.0 - 1.0, 1.0 - px.y / res.y * 2.0, 0.0, 1.0); gl_PointSize = mix(1.2, 3.4, r2 * r2) * uDpr; float tw = 0.35 + 0.65 * (0.5 + 0.5 * sin(uTime * (0.5 + 1.8 * r) + r2 * 40.0)); /* By the root of the ribbon's brightness, so specks show along a dim ribbon as well as round a bright bend. */ vColor = mix(uGlow, uPeak, 0.55) * tw * mix(0.2, 0.9, r) * sqrt(info.x) * 0.8; } `",
|
|
197392
197619
|
"description": "Specks drifting along the strands, thickest where the ribbon is bright."
|
|
197393
197620
|
},
|
|
197394
197621
|
{
|
|
@@ -197417,7 +197644,7 @@
|
|
|
197417
197644
|
{
|
|
197418
197645
|
"kind": "variable",
|
|
197419
197646
|
"name": "COMPOSITE_FRAGMENT",
|
|
197420
|
-
"default": "`#version 300 es precision highp float; in vec2 vUv; uniform sampler2D uScene; uniform sampler2D uNear; uniform sampler2D uFar; uniform vec3 uGround; uniform vec3 uInk; uniform float uLight; uniform float uGain; out vec4 outColor; float hash(vec2 p) { return fract(sin(dot(p, vec2(12.9898, 78.233))) * 43758.5453); } void main() { vec3 e = texture(uScene, vUv).rgb + texture(uNear, vUv).rgb * 1.1 + texture(uFar, vUv).rgb * 0.9; e *= uGain; vec3 dark = 1.0 - (1.0 - uGround) * exp(-e); float lum = dot(e, vec3(0.3, 0.55, 0.15)); vec3 light = mix(uGround, uInk, 1.0 - exp(-lum * 1.4)); vec3 c = mix(dark, light, uLight); c += (hash(gl_FragCoord.xy) - 0.5) / 255.0; outColor = vec4(c, 1.0); } `",
|
|
197647
|
+
"default": "`#version 300 es precision highp float; in vec2 vUv; uniform sampler2D uScene; uniform sampler2D uNear; uniform sampler2D uFar; uniform vec3 uGround; uniform vec3 uInk; uniform float uLight; uniform float uGain; uniform float uBloom; out vec4 outColor; float hash(vec2 p) { return fract(sin(dot(p, vec2(12.9898, 78.233))) * 43758.5453); } void main() { vec3 e = texture(uScene, vUv).rgb + (texture(uNear, vUv).rgb * 1.1 + texture(uFar, vUv).rgb * 0.9) * uBloom; e *= uGain; vec3 dark = 1.0 - (1.0 - uGround) * exp(-e); float lum = dot(e, vec3(0.3, 0.55, 0.15)); vec3 light = mix(uGround, uInk, 1.0 - exp(-lum * 1.4)); vec3 c = mix(dark, light, uLight); c += (hash(gl_FragCoord.xy) - 0.5) / 255.0; outColor = vec4(c, 1.0); } `",
|
|
197421
197648
|
"description": "The light and its bloom over the page color.\n\nOn a dark page the light is screened onto the ground, so it saturates to\nthe peak rather than clipping. On a light page added light is invisible, so\nthe same energy darkens the ground toward the peak as ink. A step of noise\nunder a code value hides the banding a slow gradient shows on eight bits."
|
|
197422
197649
|
}
|
|
197423
197650
|
],
|
|
@@ -197514,7 +197741,7 @@
|
|
|
197514
197741
|
"declarations": [
|
|
197515
197742
|
{
|
|
197516
197743
|
"kind": "class",
|
|
197517
|
-
"description": "Placed inside a `helix-strands` with `travel`, a stop names an element with\n`for` and says which form the ribbon takes when the page reaches it: a `
|
|
197744
|
+
"description": "Placed inside a `helix-strands` with `travel`, a stop names an element with\n`for` and says which form the ribbon takes when the page reaches it: a `bend`\nturning through it, a `ribbon` passing through `at`, or `waves` crossing at\nits top edge. The stops are read in page order, whatever order they are\nwritten in, and a stop naming no element is skipped.\n\nA stop draws nothing itself and is never shown.\n\n**Every property is reflected**, because the parent watches its stops'\nattributes to lay the ribbon out again: a change made from script reaches the\npage as a change made in markup does. None has a default, so a stop writes\nnothing it was not given.",
|
|
197518
197745
|
"name": "HelixStrandsStop",
|
|
197519
197746
|
"members": [
|
|
197520
197747
|
{
|
|
@@ -197523,7 +197750,7 @@
|
|
|
197523
197750
|
"type": {
|
|
197524
197751
|
"text": "number | undefined"
|
|
197525
197752
|
},
|
|
197526
|
-
"description": "Where the form sits across the page, as a share of the width: the
|
|
197753
|
+
"description": "Where the form sits across the page, as a share of the width: the bend's\napex or the ribbon's axis. A wave crosses the whole width and does not\nread it. Unset, a bend's apex sits at `0.5` and a ribbon runs down the middle.",
|
|
197527
197754
|
"attribute": "at",
|
|
197528
197755
|
"reflects": true
|
|
197529
197756
|
},
|
|
@@ -197541,7 +197768,7 @@
|
|
|
197541
197768
|
"kind": "field",
|
|
197542
197769
|
"name": "variant",
|
|
197543
197770
|
"type": {
|
|
197544
|
-
"text": "'
|
|
197771
|
+
"text": "'bend' | 'ribbon' | 'waves' | undefined"
|
|
197545
197772
|
},
|
|
197546
197773
|
"description": "The form the ribbon takes at the element. When it is not set, the form is `ribbon`.",
|
|
197547
197774
|
"attribute": "variant",
|
|
@@ -197893,7 +198120,7 @@
|
|
|
197893
198120
|
"type": {
|
|
197894
198121
|
"text": "number | undefined"
|
|
197895
198122
|
},
|
|
197896
|
-
"description": "Where the form sits across the page, as a share of the width: the
|
|
198123
|
+
"description": "Where the form sits across the page, as a share of the width: the bend's\napex or the ribbon's axis. A wave crosses the whole width and does not\nread it. Unset, a bend's apex sits at `0.5` and a ribbon runs down the middle.",
|
|
197897
198124
|
"fieldName": "at"
|
|
197898
198125
|
},
|
|
197899
198126
|
{
|
|
@@ -197907,7 +198134,7 @@
|
|
|
197907
198134
|
{
|
|
197908
198135
|
"name": "variant",
|
|
197909
198136
|
"type": {
|
|
197910
|
-
"text": "'
|
|
198137
|
+
"text": "'bend' | 'ribbon' | 'waves' | undefined"
|
|
197911
198138
|
},
|
|
197912
198139
|
"description": "The form the ribbon takes at the element. When it is not set, the form is `ribbon`.",
|
|
197913
198140
|
"fieldName": "variant"
|
|
@@ -249123,6 +249350,6 @@
|
|
|
249123
249350
|
],
|
|
249124
249351
|
"helix": {
|
|
249125
249352
|
"package": "@fusion.dev/helix",
|
|
249126
|
-
"version": "0.
|
|
249353
|
+
"version": "0.175.0"
|
|
249127
249354
|
}
|
|
249128
249355
|
}
|
|
@@ -26,7 +26,7 @@ export declare const RESTING_PALETTE: StrandsPalette;
|
|
|
26
26
|
* above the element, and the token otherwise:
|
|
27
27
|
*
|
|
28
28
|
* - `color`: `--strands-glow`, or `primary`.
|
|
29
|
-
* - `text-decoration-color`: `--strands-tint`, or `
|
|
29
|
+
* - `text-decoration-color`: `--strands-tint`, or `accent`.
|
|
30
30
|
* - `outline-color`: `--strands-ground`, or the background.
|
|
31
31
|
* - `caret-color` and `column-rule-color`: `--strands-peak`, or the dark and
|
|
32
32
|
* the light page's own peak.
|
package/dist/strands/path.d.ts
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* screen are all arithmetic.
|
|
8
8
|
*/
|
|
9
9
|
/** The three forms the ribbon takes. */
|
|
10
|
-
export type StrandsVariant = '
|
|
10
|
+
export type StrandsVariant = 'bend' | 'ribbon' | 'waves';
|
|
11
11
|
/**
|
|
12
12
|
* One point on the centerline: `x` as a share of the width, `y` in CSS pixels,
|
|
13
13
|
* the ribbon's width as a share of the width, and its brightness from `0` to
|
|
@@ -38,6 +38,15 @@ export interface PlacedStop {
|
|
|
38
38
|
* than forty screens long; a longer one keeps its first 96 points and fades.
|
|
39
39
|
*/
|
|
40
40
|
export declare const MAX_POINTS = 96;
|
|
41
|
+
/**
|
|
42
|
+
* The tightest any form turns, as a share of the box's height: the radius of
|
|
43
|
+
* its sharpest curve.
|
|
44
|
+
*
|
|
45
|
+
* Half the height. A bend's apex a few dozen pixels round kinked the strands
|
|
46
|
+
* that ran along its inside, and read as a fold in the light where every form
|
|
47
|
+
* is meant to be one sweep. `path.pure.spec.ts` measures it on every form.
|
|
48
|
+
*/
|
|
49
|
+
export declare const TURN = 0.5;
|
|
41
50
|
/**
|
|
42
51
|
* The ribbon drawn inside its own box, which is what an element without
|
|
43
52
|
* `travel` shows.
|
|
@@ -45,18 +54,20 @@ export declare const MAX_POINTS = 96;
|
|
|
45
54
|
* @param variant The form to draw.
|
|
46
55
|
* @param at Where it sits across the box, as a share of the width. A wave
|
|
47
56
|
* crosses the whole width and does not read it.
|
|
48
|
-
* @param height The box's height, in CSS pixels.
|
|
49
|
-
*
|
|
57
|
+
* @param height The box's height, in CSS pixels.
|
|
58
|
+
* @param width The box's width, in CSS pixels. `x` is a share of it, and a
|
|
59
|
+
* bend's apex is drawn in pixels so it keeps its radius at any shape.
|
|
50
60
|
*/
|
|
51
|
-
export declare const boxPath: (variant: StrandsVariant, at: number | undefined, height: number) => PathPoint[];
|
|
61
|
+
export declare const boxPath: (variant: StrandsVariant, at: number | undefined, height: number, width: number) => PathPoint[];
|
|
52
62
|
/**
|
|
53
63
|
* The ribbon laid down a whole page, which is what an element with `travel`
|
|
54
64
|
* shows.
|
|
55
65
|
*
|
|
56
66
|
* Each stop places its form at its target, in page order. Between two stops
|
|
57
67
|
* the ribbon fills the gap with soft S-curves in `fill`'s place, except
|
|
58
|
-
* between two waves
|
|
59
|
-
*
|
|
68
|
+
* between two waves less than a screen and a half apart, where it turns off
|
|
69
|
+
* screen so each wave reads alone.
|
|
70
|
+
* Without stops, `fill` runs the length of the page: a bend opens the page and
|
|
60
71
|
* a ribbon follows it, waves cross every screen and a third, and a ribbon
|
|
61
72
|
* meanders the whole way. After a last wave the ribbon does not come back, so
|
|
62
73
|
* the page ends on the wave.
|