@fusion.dev/helix-headless 0.50.0 → 0.52.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 +111 -16
- package/dist/carousel/root/carousel-root.d.ts +150 -7
- package/dist/carousel/root/carousel-root.js +82 -9
- package/dist/splitter/root/splitter-root.d.ts +56 -19
- package/dist/splitter/root/splitter-root.js +5 -6
- package/package.json +5 -5
- package/types/jsx.d.ts +175 -21
- package/types/vue.d.ts +52 -4
package/custom-elements.json
CHANGED
|
@@ -9612,12 +9612,16 @@
|
|
|
9612
9612
|
"name": "--carousel-pane"
|
|
9613
9613
|
},
|
|
9614
9614
|
{
|
|
9615
|
-
"description": "How many slides go across, written onto the track by the component so a sheet divides the track by the same number the positions are counted from. Read it rather than selecting on `per-view`, which cannot be enumerated without a ceiling. See `perView`.",
|
|
9615
|
+
"description": "How many slides go across, written onto the track by the component so a sheet divides the track by the same number the positions are counted from. Read it rather than selecting on `per-view`, which cannot be enumerated without a ceiling. Under `per-view=\"auto\"` the component writes nothing and the sheet declares it instead, so the same name answers in both modes. See `perView`.",
|
|
9616
9616
|
"name": "--carousel-per-view"
|
|
9617
9617
|
},
|
|
9618
9618
|
{
|
|
9619
9619
|
"description": "How far short of a whole pixel the run ends, on the last slide alone, for a sheet to take up as `margin-inline-end`. See `runEnd`.",
|
|
9620
9620
|
"name": "--carousel-run-end"
|
|
9621
|
+
},
|
|
9622
|
+
{
|
|
9623
|
+
"description": "The narrowest a slide may be laid out, which is what `per-view=\"auto\"` fits the track with. A length, since the sheet divides by it. Unset is the whole track, which is one across.",
|
|
9624
|
+
"name": "--carousel-slide-min"
|
|
9621
9625
|
}
|
|
9622
9626
|
],
|
|
9623
9627
|
"cssParts": [
|
|
@@ -9808,20 +9812,40 @@
|
|
|
9808
9812
|
"kind": "field",
|
|
9809
9813
|
"name": "perView",
|
|
9810
9814
|
"type": {
|
|
9811
|
-
"text": "number | undefined"
|
|
9815
|
+
"text": "number | 'auto' | undefined"
|
|
9812
9816
|
},
|
|
9813
|
-
"description": "How many slides are shown across the track at once. Absent shows one.\n\n**Here rather than on the styled tier, because it decides how many places\nthe track can stop.** From the stylesheet it looks like a width, one rule\nper value setting a custom property that the slides divide the track by.\nBut a carousel showing four of six slides has three positions, not six, and\neverything that counts positions is in this file. Declared up there, `goTo`\nclamps to the last *slide*, so three of the six indicators point at an\noffset the track has already reached: pressing next walks the dots to the\nend while the slides stop moving a third of the way through.\n\n**The number is published to the styles rather than enumerated by them**,\nas `--carousel-per-view` on the track, which is what keeps a width and a\ncount from disagreeing. A sheet can only name a value it wrote a rule for,\nso the styled tier enumerated `per-view=\"2\"` through `5` and called five a\njudgment; above it the pane fell back to one across while this file went on\ncounting positions. Measured in Chromium over eight slides, six across gave\nthree dots, a pane taking the whole track and five slides reachable only by\ndragging. Written from here there is no ceiling to exceed, and a consumer's\nown sheet reads the same declaration the styled one does. `runEnd` publishes\nits correction the same way and for the same reason.\n\n**On the track and not on the host.** A custom property on the host is a\nreflected attribute by another name: it would arrive on upgrade, and a\nconsumer's server markup never had it. Inside the component's own shadow\nroot it serializes with the rest of the template on the server, and the\ntrack's own declaration beats anything a consumer inherits in, so the\nattribute is the one answer to how wide a pane is.\n\nA value the track cannot honor is taken to the nearest one it can, by\n`across`, and both tiers read that rather than this.\n\nNo default, because it reflects. A reflected property with a value writes\nits attribute on upgrade, and the host then carries something a consumer's\nserver markup never had, which React reports as a mismatch. The one-across\ncase is the absent attribute, and the styles read it that way.",
|
|
9817
|
+
"description": "How many slides are shown across the track at once. Absent shows one.\n\n**Here rather than on the styled tier, because it decides how many places\nthe track can stop.** From the stylesheet it looks like a width, one rule\nper value setting a custom property that the slides divide the track by.\nBut a carousel showing four of six slides has three positions, not six, and\neverything that counts positions is in this file. Declared up there, `goTo`\nclamps to the last *slide*, so three of the six indicators point at an\noffset the track has already reached: pressing next walks the dots to the\nend while the slides stop moving a third of the way through.\n\n**The number is published to the styles rather than enumerated by them**,\nas `--carousel-per-view` on the track, which is what keeps a width and a\ncount from disagreeing. A sheet can only name a value it wrote a rule for,\nso the styled tier enumerated `per-view=\"2\"` through `5` and called five a\njudgment; above it the pane fell back to one across while this file went on\ncounting positions. Measured in Chromium over eight slides, six across gave\nthree dots, a pane taking the whole track and five slides reachable only by\ndragging. Written from here there is no ceiling to exceed, and a consumer's\nown sheet reads the same declaration the styled one does. `runEnd` publishes\nits correction the same way and for the same reason.\n\n**On the track and not on the host.** A custom property on the host is a\nreflected attribute by another name: it would arrive on upgrade, and a\nconsumer's server markup never had it. Inside the component's own shadow\nroot it serializes with the rest of the template on the server, and the\ntrack's own declaration beats anything a consumer inherits in, so the\nattribute is the one answer to how wide a pane is.\n\nA value the track cannot honor is taken to the nearest one it can, by\n`across`, and both tiers read that rather than this.\n\n**`auto` fits as many as the track can hold**, at `--carousel-slide-min`\napiece, and nothing is written onto the track: the count is the sheet's,\nand the sheet's alone, because it is the one number here CSS can work out\nfor itself. Everything it takes is a length the sheet already has, so the\npanes are laid out at their final width by the first rule that runs, on a\nserver's markup as on the client's, and no script is waited on. That is the\nwhole reason a declared count was ever the only option: a carousel that\nasks how wide its container is can only ask on the client, so the panes go\ndown at one width and move to another when the answer arrives. Written\ninline the count would outrank the sheet that computes it, which is why an\n`auto` track is handed nothing. A count stays for the design that calls for\nexactly three.\n\nThe styled sheet says how it divides, and the headless `auto` example\ncarries the same three lines for a consumer writing their own.\n\n**A value rather than the resting behavior**, which is what the\nresponsiveness policy asks of every axis that a box decides: a splitter\nturns on `orientation=\"auto\"` and a plain one does not turn at all. Fitting\nchanges what the carousel *does*, since how many are across is how many\nplaces the track can stop, so a carousel that had not asked for it would\nfind its position count moving with the window.\n\nNo default, because it reflects. A reflected property with a value writes\nits attribute on upgrade, and the host then carries something a consumer's\nserver markup never had, which React reports as a mismatch. The one-across\ncase is the absent attribute, and the styles read it that way.",
|
|
9814
9818
|
"attribute": "per-view",
|
|
9815
9819
|
"reflects": true
|
|
9816
9820
|
},
|
|
9817
9821
|
{
|
|
9818
9822
|
"kind": "field",
|
|
9819
|
-
"name": "
|
|
9823
|
+
"name": "clamped",
|
|
9820
9824
|
"type": {
|
|
9821
9825
|
"text": "number"
|
|
9822
9826
|
},
|
|
9823
9827
|
"privacy": "private",
|
|
9824
|
-
"description": "`perView` as both tiers use it: a whole number
|
|
9828
|
+
"description": "A declared `perView` as both tiers use it: a whole number, one at least.\n\n**The clamp is here because the arithmetic is here**, and the two readers\nof this number have to be given the same one. A fraction is floored, since\na position is a whole slide along: one and a half across leaves a last\nposition the track runs out before reaching, which is the fault `goTo`\nalready carries a comment about. Zero and a negative divide the track into\nnothing and into a pane facing the wrong way, and a non-numeric attribute\nparses to `NaN`, which `Math.max` propagates: it counted `NaN` positions,\ndrew no indicators at all and left `index` at `NaN`. All of them read as\none across, which is what a carousel with nothing sayable asked for.\n\n**A vertical `auto` is one of them.** Fitting divides the room the page\ngave the track, and a vertical track's room is a height the consumer chose\nwith `--carousel-block-size`: there is nothing there to fit against that\nthey did not already decide, so the count is theirs to state. It also\ncannot be had cheaply, the block axis wanting `container-type: size`, which\nlays a track out as empty wherever its height is not definite.\n\nNot clamped to the number of slides. Six across four slides is four panes\nat a sixth of the track each and the one place to stand, which is what was\nasked for as nearly as it can be had, and the slide count is a fact the\nserver does not have: clamping to it would draw one width there and another\non upgrade.",
|
|
9829
|
+
"readonly": true
|
|
9830
|
+
},
|
|
9831
|
+
{
|
|
9832
|
+
"kind": "field",
|
|
9833
|
+
"name": "fits",
|
|
9834
|
+
"type": {
|
|
9835
|
+
"text": "boolean"
|
|
9836
|
+
},
|
|
9837
|
+
"privacy": "private",
|
|
9838
|
+
"description": "Whether the track is fitting slides to its own box rather than to a count.",
|
|
9839
|
+
"readonly": true
|
|
9840
|
+
},
|
|
9841
|
+
{
|
|
9842
|
+
"kind": "field",
|
|
9843
|
+
"name": "across",
|
|
9844
|
+
"type": {
|
|
9845
|
+
"text": "number | undefined"
|
|
9846
|
+
},
|
|
9847
|
+
"privacy": "private",
|
|
9848
|
+
"description": "How many slides go across, and `undefined` while a fitted track is unlaid.\n\n**Undefined is the honest answer and the indicators read it as one**, which\nis the whole of how a fitted carousel keeps from drawing a run of dots at\none length and correcting it at another. The count a fitted track goes\nacross is whatever its box resolved to, so nothing knows it until there is\na box: not the server, which has no layout, and not the render that draws\nthe panes, layout being what follows a render rather than what precedes it.\nThe dots wait for it, which costs them nothing, because a server serves no\nindicators for any carousel, `slides` being empty there.\n\nMeasured 16 Sep 2026 in Chromium 151.0.7922.34 and WebKit 26.5, recording\nevery run of dots a carousel has from the upgrade on: a fitted one goes\nnone, then five, and never another number; a declared one goes straight to\nsix. What a reader can see is the run missing, never the run wrong.",
|
|
9825
9849
|
"readonly": true
|
|
9826
9850
|
},
|
|
9827
9851
|
{
|
|
@@ -9830,9 +9854,76 @@
|
|
|
9830
9854
|
"type": {
|
|
9831
9855
|
"text": "number"
|
|
9832
9856
|
},
|
|
9833
|
-
"description": "How many distinct views the track holds, which is what the indicators count.\n\nA window of `perView` slides sliding one at a time over `n` of them stops\n`n - perView + 1` times, so six slides four across is three: 0 to 3, 1 to 4,\n2 to 5. One at minimum, since a carousel showing everything it has still\nhas the one place to be.",
|
|
9857
|
+
"description": "How many distinct views the track holds, which is what the indicators count.\n\nA window of `perView` slides sliding one at a time over `n` of them stops\n`n - perView + 1` times, so six slides four across is three: 0 to 3, 1 to 4,\n2 to 5. One at minimum, since a carousel showing everything it has still\nhas the one place to be.\n\nOne across until a fitted track has been laid out, which is the same answer\na carousel that has never been told anything gives, and the dots are\nwithheld rather than counted from it. See `across`.",
|
|
9834
9858
|
"readonly": true
|
|
9835
9859
|
},
|
|
9860
|
+
{
|
|
9861
|
+
"kind": "method",
|
|
9862
|
+
"name": "measure",
|
|
9863
|
+
"privacy": "private",
|
|
9864
|
+
"return": {
|
|
9865
|
+
"type": {
|
|
9866
|
+
"text": "number | undefined"
|
|
9867
|
+
}
|
|
9868
|
+
},
|
|
9869
|
+
"description": "How many slides the box turned out to hold, from the pane it laid out.\n\n**The measurement asks what happened rather than what was asked for**, and\nthat is why it is the pane's width and not the count in the declaration.\nThe sheet divides the track by `--carousel-per-view`, which under `auto` is\narithmetic rather than a number, and a consumer's own sheet may divide it\nsome other way entirely or grow the panes to fill a track holding\neverything it has. Reading the box back gets the same answer as the\ndeclaration wherever the two agree and the true one wherever they do not,\nso a width and a count cannot disagree in either direction.\n\nThe sheet's own arithmetic run backward, on the lengths that were actually\nused: a gap added to the room, divided by a pane and a gap. Rounded,\nbecause the pane a sheet lays out is a sixty-fourth off its exact share by\ndesign and the quotient lands a ten-thousandth off a whole number.\n\nUndefined where there is nothing to measure, which is a harness rather than\na browser: happy-dom lays nothing out and reports zero for every box, and a\ncount taken from zeros would be a number with no layout behind it."
|
|
9870
|
+
},
|
|
9871
|
+
{
|
|
9872
|
+
"kind": "field",
|
|
9873
|
+
"name": "readFit",
|
|
9874
|
+
"privacy": "private",
|
|
9875
|
+
"readonly": true,
|
|
9876
|
+
"description": "Takes the reading, and puts the index back inside what it leaves.\n\n**A fitted carousel's last position moves with the window**, which a\ndeclared one's never does: eight slides at one across has eight places to\nstand and four across has five, so a track widened while the reader sits on\nthe last of them is a track resting somewhere it can no longer be. Through\n`goTo`, so the correction goes out as the same cancelable announcement\nevery other index change does and a consumer holding `index` hears it\nrather than being overwritten.\n\nOnly on a change, so the observer's own re-render cannot feed itself."
|
|
9877
|
+
},
|
|
9878
|
+
{
|
|
9879
|
+
"kind": "method",
|
|
9880
|
+
"name": "handed",
|
|
9881
|
+
"privacy": "private",
|
|
9882
|
+
"return": {
|
|
9883
|
+
"type": {
|
|
9884
|
+
"text": "string | typeof nothing"
|
|
9885
|
+
}
|
|
9886
|
+
},
|
|
9887
|
+
"description": "The count handed to the styles, and nothing at all where they work it out.\n\nA declared count is this file's: it decides how many places the track can\nstop, so the number the panes are divided by has to be the number the\npositions were counted from, and writing it on the track inside the\ncomponent's own shadow root is what keeps a sheet from having to enumerate\nthe values it will answer for.\n\nA fitted one is the sheet's, and handing it anything would take it back: an\ninline declaration outranks every rule short of `!important`, so a track\ntold `1` here could never be told three by the rule that fits it. The\nabsence is not a gap either, because the rule that computes the count\ndeclares it on this same element, which beats anything a consumer inherits\nin exactly as the inline one did."
|
|
9888
|
+
},
|
|
9889
|
+
{
|
|
9890
|
+
"kind": "field",
|
|
9891
|
+
"name": "fitted",
|
|
9892
|
+
"type": {
|
|
9893
|
+
"text": "number | undefined"
|
|
9894
|
+
},
|
|
9895
|
+
"privacy": "private",
|
|
9896
|
+
"description": "What the box resolved to, and `undefined` until it has been laid out."
|
|
9897
|
+
},
|
|
9898
|
+
{
|
|
9899
|
+
"kind": "field",
|
|
9900
|
+
"name": "sizes",
|
|
9901
|
+
"type": {
|
|
9902
|
+
"text": "ResizeObserver | undefined"
|
|
9903
|
+
},
|
|
9904
|
+
"privacy": "private",
|
|
9905
|
+
"description": "Watches the pane a fitted track laid out, while `auto` is what was asked."
|
|
9906
|
+
},
|
|
9907
|
+
{
|
|
9908
|
+
"kind": "field",
|
|
9909
|
+
"name": "watched",
|
|
9910
|
+
"type": {
|
|
9911
|
+
"text": "HTMLElement | undefined"
|
|
9912
|
+
},
|
|
9913
|
+
"privacy": "private",
|
|
9914
|
+
"description": "The pane being watched, so a re-rendered run moves the watch with it."
|
|
9915
|
+
},
|
|
9916
|
+
{
|
|
9917
|
+
"kind": "method",
|
|
9918
|
+
"name": "watchPane",
|
|
9919
|
+
"privacy": "private",
|
|
9920
|
+
"return": {
|
|
9921
|
+
"type": {
|
|
9922
|
+
"text": "void"
|
|
9923
|
+
}
|
|
9924
|
+
},
|
|
9925
|
+
"description": "Starts or stops watching, according to what the count was asked to be.\n\n**The pane and not the track, because both questions move it.** A narrower\ntrack divides into a narrower pane, and so does a slide arriving or leaving\nwhere the panes grow to fill a track holding everything it has. A watch on\nthe track answers the first and sleeps through the second.\n\n**An observation is delivered after layout and inside the same rendering\nstep**, and the update it asks for is a microtask on the end of it, so the\ndots are added to a frame that has not been painted. Taking the reading\nfrom `updated` instead would be the same arithmetic one Lit warning\nearlier, and the warning is about the right thing: a render that has to\nread layout is a render that has to run twice.\n\nCalled from `connectedCallback`, `firstUpdated` and `updated`, so a\nconsumer switching to `auto` after mount is watched, one switching away\nstops being, and a carousel moved in the DOM is watched again. Observing is\nwhat asks for the first reading, so the watch is rebuilt rather than kept\nacross a mode change."
|
|
9926
|
+
},
|
|
9836
9927
|
{
|
|
9837
9928
|
"kind": "field",
|
|
9838
9929
|
"name": "panes",
|
|
@@ -9897,7 +9988,7 @@
|
|
|
9897
9988
|
}
|
|
9898
9989
|
}
|
|
9899
9990
|
],
|
|
9900
|
-
"description": "The leading padding the track keeps for a slide to draw its own edge in.\n\nA styled track carries one so a slide's shadow and focus ring have\nsomewhere to go: a scroll container clips at its padding box, and a slide\nflush against that edge loses whatever it paints outside itself. The\nheadless tier has no stylesheet and so no padding, and this reads zero\nthere, which is why both tiers can share the arithmetic below.\n\nPhysical sides rather than logical, to match the physical `offsetLeft` and\n`offsetTop` it is subtracted from
|
|
9991
|
+
"description": "The leading padding the track keeps for a slide to draw its own edge in.\n\nA styled track carries one so a slide's shadow and focus ring have\nsomewhere to go: a scroll container clips at its padding box, and a slide\nflush against that edge loses whatever it paints outside itself. The\nheadless tier has no stylesheet and so no padding, and this reads zero\nthere, which is why both tiers can share the arithmetic below.\n\nPhysical sides rather than logical, to match the physical `offsetLeft` and\n`offsetTop` it is subtracted from.\n\n**The side read is the side the track scrolls on, and not one side standing\nfor four.** They are one length on a track laid out at the defaults and\nstop being one the moment a consumer raises `--carousel-bleed`, which the\nhook exists to invite: a slide on `--helix-shadow-lg` reaches 44px and is\ntold to ask for it. So a horizontal track's room is its inline padding and\na vertical one's is its block padding, and each sheet puts the bleed where\nthe scroller clips. Reading one side for both would have a vertical track\nmeasuring a length nothing on its axis was laid out with."
|
|
9901
9992
|
},
|
|
9902
9993
|
{
|
|
9903
9994
|
"kind": "method",
|
|
@@ -10489,9 +10580,9 @@
|
|
|
10489
10580
|
{
|
|
10490
10581
|
"name": "per-view",
|
|
10491
10582
|
"type": {
|
|
10492
|
-
"text": "number | undefined"
|
|
10583
|
+
"text": "number | 'auto' | undefined"
|
|
10493
10584
|
},
|
|
10494
|
-
"description": "How many slides are shown across the track at once. Absent shows one.\n\n**Here rather than on the styled tier, because it decides how many places\nthe track can stop.** From the stylesheet it looks like a width, one rule\nper value setting a custom property that the slides divide the track by.\nBut a carousel showing four of six slides has three positions, not six, and\neverything that counts positions is in this file. Declared up there, `goTo`\nclamps to the last *slide*, so three of the six indicators point at an\noffset the track has already reached: pressing next walks the dots to the\nend while the slides stop moving a third of the way through.\n\n**The number is published to the styles rather than enumerated by them**,\nas `--carousel-per-view` on the track, which is what keeps a width and a\ncount from disagreeing. A sheet can only name a value it wrote a rule for,\nso the styled tier enumerated `per-view=\"2\"` through `5` and called five a\njudgment; above it the pane fell back to one across while this file went on\ncounting positions. Measured in Chromium over eight slides, six across gave\nthree dots, a pane taking the whole track and five slides reachable only by\ndragging. Written from here there is no ceiling to exceed, and a consumer's\nown sheet reads the same declaration the styled one does. `runEnd` publishes\nits correction the same way and for the same reason.\n\n**On the track and not on the host.** A custom property on the host is a\nreflected attribute by another name: it would arrive on upgrade, and a\nconsumer's server markup never had it. Inside the component's own shadow\nroot it serializes with the rest of the template on the server, and the\ntrack's own declaration beats anything a consumer inherits in, so the\nattribute is the one answer to how wide a pane is.\n\nA value the track cannot honor is taken to the nearest one it can, by\n`across`, and both tiers read that rather than this.\n\nNo default, because it reflects. A reflected property with a value writes\nits attribute on upgrade, and the host then carries something a consumer's\nserver markup never had, which React reports as a mismatch. The one-across\ncase is the absent attribute, and the styles read it that way.",
|
|
10585
|
+
"description": "How many slides are shown across the track at once. Absent shows one.\n\n**Here rather than on the styled tier, because it decides how many places\nthe track can stop.** From the stylesheet it looks like a width, one rule\nper value setting a custom property that the slides divide the track by.\nBut a carousel showing four of six slides has three positions, not six, and\neverything that counts positions is in this file. Declared up there, `goTo`\nclamps to the last *slide*, so three of the six indicators point at an\noffset the track has already reached: pressing next walks the dots to the\nend while the slides stop moving a third of the way through.\n\n**The number is published to the styles rather than enumerated by them**,\nas `--carousel-per-view` on the track, which is what keeps a width and a\ncount from disagreeing. A sheet can only name a value it wrote a rule for,\nso the styled tier enumerated `per-view=\"2\"` through `5` and called five a\njudgment; above it the pane fell back to one across while this file went on\ncounting positions. Measured in Chromium over eight slides, six across gave\nthree dots, a pane taking the whole track and five slides reachable only by\ndragging. Written from here there is no ceiling to exceed, and a consumer's\nown sheet reads the same declaration the styled one does. `runEnd` publishes\nits correction the same way and for the same reason.\n\n**On the track and not on the host.** A custom property on the host is a\nreflected attribute by another name: it would arrive on upgrade, and a\nconsumer's server markup never had it. Inside the component's own shadow\nroot it serializes with the rest of the template on the server, and the\ntrack's own declaration beats anything a consumer inherits in, so the\nattribute is the one answer to how wide a pane is.\n\nA value the track cannot honor is taken to the nearest one it can, by\n`across`, and both tiers read that rather than this.\n\n**`auto` fits as many as the track can hold**, at `--carousel-slide-min`\napiece, and nothing is written onto the track: the count is the sheet's,\nand the sheet's alone, because it is the one number here CSS can work out\nfor itself. Everything it takes is a length the sheet already has, so the\npanes are laid out at their final width by the first rule that runs, on a\nserver's markup as on the client's, and no script is waited on. That is the\nwhole reason a declared count was ever the only option: a carousel that\nasks how wide its container is can only ask on the client, so the panes go\ndown at one width and move to another when the answer arrives. Written\ninline the count would outrank the sheet that computes it, which is why an\n`auto` track is handed nothing. A count stays for the design that calls for\nexactly three.\n\nThe styled sheet says how it divides, and the headless `auto` example\ncarries the same three lines for a consumer writing their own.\n\n**A value rather than the resting behavior**, which is what the\nresponsiveness policy asks of every axis that a box decides: a splitter\nturns on `orientation=\"auto\"` and a plain one does not turn at all. Fitting\nchanges what the carousel *does*, since how many are across is how many\nplaces the track can stop, so a carousel that had not asked for it would\nfind its position count moving with the window.\n\nNo default, because it reflects. A reflected property with a value writes\nits attribute on upgrade, and the host then carries something a consumer's\nserver markup never had, which React reports as a mismatch. The one-across\ncase is the absent attribute, and the styles read it that way.",
|
|
10495
10586
|
"fieldName": "perView"
|
|
10496
10587
|
}
|
|
10497
10588
|
],
|
|
@@ -10503,7 +10594,7 @@
|
|
|
10503
10594
|
"helix": {
|
|
10504
10595
|
"category": "layout",
|
|
10505
10596
|
"since": "0.1.0",
|
|
10506
|
-
"status": "
|
|
10597
|
+
"status": "stable",
|
|
10507
10598
|
"documentation": "https://fusion.dev/helix/components/carousel",
|
|
10508
10599
|
"aliases": [
|
|
10509
10600
|
"Slider",
|
|
@@ -10518,6 +10609,10 @@
|
|
|
10518
10609
|
"description": "The same carousel on the headless tier, with every rule written by hand.",
|
|
10519
10610
|
"slug": "preview"
|
|
10520
10611
|
},
|
|
10612
|
+
{
|
|
10613
|
+
"description": "As many slides as the track holds, from a minimum width and no count.",
|
|
10614
|
+
"slug": "auto"
|
|
10615
|
+
},
|
|
10521
10616
|
{
|
|
10522
10617
|
"description": "Three slides across, with the pane, the gap and the run's end written by hand.",
|
|
10523
10618
|
"slug": "several-across"
|
|
@@ -80833,7 +80928,7 @@
|
|
|
80833
80928
|
"declarations": [
|
|
80834
80929
|
{
|
|
80835
80930
|
"kind": "class",
|
|
80836
|
-
"description": "**One axis, and nesting is how you get two.** A splitter inside a splitter\ngives back the cross, and gives the three-pane and four-pane arrangements a\nsingle divider never had.\n\n**Where two of them cross there is a corner, and it moves both.** A splitter\nslotted into a pane of another, at right angles to it, grows a handle at the\ncrossing: `move` under the pointer, both arrow axes on the keyboard, and a\ndrag that carries the two positions at once. It appears at `firstUpdated`\nrather than in the served markup, being an affordance rather than content,\nand a splitter with no corner yet is a splitter with two working dividers.\n\n**The divider is a real `role=\"separator\"` with `aria-valuenow`**, moved by\nthe arrow keys as well as by pointer, with `Home` and `End` taking it to its\nbounds. A drag in progress is a state rather than `:hover`, so both dividers\na corner moves are lit for as long as it moves them.\n\n**It goes where it is put, all the way to either end.** `min` and `max` are\nnothing and everything unless a consumer says otherwise, because a divider\nthat stops short of the edge gives a reader no way to put a pane away.\n\n**A pane can be shut, and that is not the same as a divider at the edge.**\nThe geometry is identical and the knowledge is not: only a shut pane knows\nwhere to open back to. So `collapsed` is a second state rather than a reading\nof the position, and the position it opens to is the
|
|
80931
|
+
"description": "**One axis, and nesting is how you get two.** A splitter inside a splitter\ngives back the cross, and gives the three-pane and four-pane arrangements a\nsingle divider never had.\n\n**Where two of them cross there is a corner, and it moves both.** A splitter\nslotted into a pane of another, at right angles to it, grows a handle at the\ncrossing: `move` under the pointer, both arrow axes on the keyboard, and a\ndrag that carries the two positions at once. It appears at `firstUpdated`\nrather than in the served markup, being an affordance rather than content,\nand a splitter with no corner yet is a splitter with two working dividers.\n\n**The divider is a real `role=\"separator\"` with `aria-valuenow`**, moved by\nthe arrow keys as well as by pointer, with `Home` and `End` taking it to its\nbounds. A drag in progress is a state rather than `:hover`, so both dividers\na corner moves are lit for as long as it moves them.\n\n**It goes where it is put, all the way to either end.** `min` and `max` are\nnothing and everything unless a consumer says otherwise, because a divider\nthat stops short of the edge gives a reader no way to put a pane away.\n\n**A pane can be shut, and that is not the same as a divider at the edge.**\nThe geometry is identical and the knowledge is not: only a shut pane knows\nwhere to open back to. So `collapsed` is a second state rather than a reading\nof the position, and the position it opens to is where the gesture that shut\nit began, whichever gesture that was: a drag takes its reading on the press,\nand every other door takes it in `settle`, nothing having been applied there\nyet. `collapsed-size` keeps a sliver showing where a pane has a tab strip\nworth leaving, and collapse overrides `min` and `max`, which is what those\nare for.",
|
|
80837
80932
|
"name": "HelixHeadlessSplitter",
|
|
80838
80933
|
"cssProperties": [
|
|
80839
80934
|
{
|
|
@@ -81054,7 +81149,7 @@
|
|
|
81054
81149
|
},
|
|
81055
81150
|
"privacy": "private",
|
|
81056
81151
|
"default": "undefined",
|
|
81057
|
-
"description": "Where the divider was before the gesture that may be about to shut it.\n\nA drag writes a position on every pointer move, so by the time it reaches\nthe edge the number it started from is gone. Taken once, on the press, and\nwritten back if the gesture ends shut, so the pane opens to where it was\nrather than to the edge it was dragged against."
|
|
81152
|
+
"description": "Where the divider was before the gesture that may be about to shut it.\n\nA drag writes a position on every pointer move, so by the time it reaches\nthe edge the number it started from is gone. Taken once, on the press, and\nwritten back if the gesture ends shut, so the pane opens to where it was\nrather than to the edge it was dragged against.\n\n**A pointer gesture only, because it is the only one that loses it**, and\n`settle` answers for the rest from `began`: a key and a double click apply\nnothing before they settle, so where the divider is at the top of that\nmethod is where it was. Read once and cleared there, exactly as `began` is,\nand for the second reason as well as the first. Left standing it measured\nthe next gesture against the last one's press, so a collapse pressed from\n20 reopened at the 60 a drag had started from an hour earlier."
|
|
81058
81153
|
},
|
|
81059
81154
|
{
|
|
81060
81155
|
"kind": "field",
|
|
@@ -81304,7 +81399,7 @@
|
|
|
81304
81399
|
}
|
|
81305
81400
|
}
|
|
81306
81401
|
],
|
|
81307
|
-
"description": "Says the arrangement has settled, so a consumer can keep it.\n\nThrough the audited path, so a consumer who owns `position` is told what was\nasked for and decides, and one who does not has already had it applied.\n\n**
|
|
81402
|
+
"description": "Says the arrangement has settled, so a consumer can keep it.\n\nThrough the audited path, so a consumer who owns `position` is told what was\nasked for and decides, and one who does not has already had it applied.\n\n**A refused resize ends the resize and not the gesture.** `shutAt` reads the\nposition the gesture ended on, so the collapse is computed from a number the\nconsumer may have declined, and the reading this replaces was that the two\nare therefore one decision: refuse the first and the second cannot stand.\nThat is a reasonable thing to believe about a splitter nobody else owns, and\nit takes \"no\" to mean the gesture is over. What it misses is that a consumer\nwho owns the position refuses in order to *take* the decision, not to end\nit. The sandbox two folders away refuses every `helix-before-resize` from\nthe splitter inside it, re-announces the same move in its own vocabulary and\nwrites the answer back through `position`, which is what makes it the single\ndecision point; returning on its refusal left `panel-collapsed-size` inert\nthere, the shipped `with-a-panel` example measuring a 0px panel against the\n36 it asks for. So the collapse is reached either way and is refused, or\nnot, on its own.\n\n**Which is honest because the collapse carries its own position.** A shut\npane sits at `collapsed-size`, which is where `position` reads it from once\n`collapsed` is set, and never at the number the resize named: refuse a drag\nto 100 on a splitter with `collapsed-size=\"10\"`, allow the collapse, and the\ndivider is at 90. Nothing writes the refused number either, `requestChange`\napplying nothing when it is refused and the collapse below writing the open\nposition back over whatever a drag had already drawn, so a consumer who says\nno to the position and yes to the collapse gets the pane shut and keeps the\nnumber they had to reopen to. The two coincide only where `collapsed-size`\nis zero, and the states differ even there: a shut pane knows where to open\nback to and a divider parked at the edge does not.\n\nRefusing the collapse alone still leaves the resize, which is the other way\nround and is coherent: the divider goes where the drag put it and the pane\nis not declared shut.\n\n**The open position is taken here for every door but the pointer's, which\nis the same split `began` makes and for the same reason.** A drag has\noverwritten the position on the way to the edge, so it reads it on the\npress; a key, a double click and `moveTo` apply nothing until the request\nbelow, so where the divider is at the top of this method is where it was.\nCaptured on the press alone, the class docstring's promise that a shut pane\nknows where to open back to held for a drag and for nothing else: measured\n17 Sep 2026, `Home` on a splitter resting at 60 shut the start pane and\nreopened it at 0, the resize above having written the edge and the collapse\nhaving nothing to put back. Stale, it was worse than absent, `opened` never\nbeing cleared: a press at 60, then a key collapse from 20, reopened at 60.\n\n**A gesture that moved nothing announces nothing, and this is the one place\nthat can say so.** A change carrying the position the divider already had\nrewrites a consumer's stored value from a gesture that moved nothing:\nharmless where the value round-trips exactly, and not where it does not,\nwhich is any consumer storing pixels and dividing by a box. The separator's\n`pointerup` held that as an early return of its own and was the only door\nwith one. There are five: the separator's pointer and arrows, the corner's\npointer and arrows, and a double click through `reset`, and `moveTo` is a\nsixth a consumer can open. Measured in Chromium 17 Sep 2026 on the built\nbundle, every door but the guarded one announced a move of zero: a corner\npress with nothing between announced on both splitters, `Home` on a divider\nalready at its minimum announced, and a double click on one already at its\ndefault announced.\n\n**Measured against where the gesture began, and not against `position`.**\n`move` applies as it goes, so by the time a drag settles the position is\nalready the number about to be announced, and comparing those two would\nsilence every drag there is. `began` is the press; a discrete path takes\nnone and compares against the position, which for it is the same thing.\n\n**Per divider rather than per gesture, which is the corner's question.** The\ncorner drives two at once, so \"moved nothing\" cannot mean \"neither moved\":\na drag along one axis moves one of them, and the other would be announcing\na number nobody asked to change. Each settles on its own and guards on its\nown, so the one that moved still announces while the one that did not stays\nquiet. That is also why the guard cannot live in `handleCornerUp`, which\nonly ever sees the pair.\n\n**The collapse counts as movement, because a refusal can leave the two\ndisagreeing.** A consumer who refuses `helix-before-collapse` has a pane at\nthe edge that is not declared shut, and a guard reading the position alone\nwould then never offer the collapse again: `Home` is already at the\nminimum, so every later press is a move of zero."
|
|
81308
81403
|
},
|
|
81309
81404
|
{
|
|
81310
81405
|
"kind": "field",
|
|
@@ -81808,7 +81903,7 @@
|
|
|
81808
81903
|
"type": {
|
|
81809
81904
|
"text": "HelixBeforeCollapseEvent"
|
|
81810
81905
|
},
|
|
81811
|
-
"description": "Fired before a pane shuts or reopens,
|
|
81906
|
+
"description": "Fired before a pane shuts or reopens, whether or not the resize that reached it was allowed, and carrying its own position: a shut pane sits at `collapsed-size` rather than at the number the resize named. Cancelable: refusing it leaves the pane as it was and the divider where the gesture put it.",
|
|
81812
81907
|
"name": "helix-before-collapse",
|
|
81813
81908
|
"reactProp": "onhelix-before-collapse"
|
|
81814
81909
|
},
|
|
@@ -81816,7 +81911,7 @@
|
|
|
81816
81911
|
"type": {
|
|
81817
81912
|
"text": "HelixBeforeResizeEvent"
|
|
81818
81913
|
},
|
|
81819
|
-
"description": "Fired before the divider settles, and only where the gesture moved it: a press that moved nothing, a drag that came back, an arrow with nowhere left to go and a corner that moved the other divider are all silent on this one. Cancelable: refusing it takes the
|
|
81914
|
+
"description": "Fired before the divider settles, and only where the gesture moved it: a press that moved nothing, a drag that came back, an arrow with nowhere left to go and a corner that moved the other divider are all silent on this one. Cancelable: refusing it takes the position and leaves the rest of the gesture, so a collapse the gesture reached is still announced and still yours to refuse. A drag has already drawn itself by then and holds where it was dropped until the consumer assigns their own.",
|
|
81820
81915
|
"name": "helix-before-resize",
|
|
81821
81916
|
"reactProp": "onhelix-before-resize"
|
|
81822
81917
|
}
|
|
@@ -81926,7 +82021,7 @@
|
|
|
81926
82021
|
"helix": {
|
|
81927
82022
|
"category": "layout",
|
|
81928
82023
|
"since": "0.1.0",
|
|
81929
|
-
"status": "
|
|
82024
|
+
"status": "stable",
|
|
81930
82025
|
"documentation": "https://fusion.dev/helix/components/splitter",
|
|
81931
82026
|
"aliases": [
|
|
81932
82027
|
"SplitPane",
|
|
@@ -20,7 +20,7 @@ import { type PropertyValues, type TemplateResult } from 'lit';
|
|
|
20
20
|
* performs, and it is first in the tab order.
|
|
21
21
|
*
|
|
22
22
|
* @since 0.1.0
|
|
23
|
-
* @status
|
|
23
|
+
* @status stable
|
|
24
24
|
* @category layout
|
|
25
25
|
* @aliases Slider, Gallery, Slideshow
|
|
26
26
|
* @documentation https://fusion.dev/helix/components/carousel
|
|
@@ -44,8 +44,9 @@ import { type PropertyValues, type TemplateResult } from 'lit';
|
|
|
44
44
|
*
|
|
45
45
|
* @cssproperty --carousel-gap - Space between slides. A sheet sets it and the component measures the run with it.
|
|
46
46
|
* @cssproperty --carousel-pane - The size one pane is laid out at. A sheet sets it and the component measures the run with it.
|
|
47
|
-
* @cssproperty --carousel-per-view - How many slides go across, written onto the track by the component so a sheet divides the track by the same number the positions are counted from. Read it rather than selecting on `per-view`, which cannot be enumerated without a ceiling. See `perView`.
|
|
47
|
+
* @cssproperty --carousel-per-view - How many slides go across, written onto the track by the component so a sheet divides the track by the same number the positions are counted from. Read it rather than selecting on `per-view`, which cannot be enumerated without a ceiling. Under `per-view="auto"` the component writes nothing and the sheet declares it instead, so the same name answers in both modes. See `perView`.
|
|
48
48
|
* @cssproperty --carousel-run-end - How far short of a whole pixel the run ends, on the last slide alone, for a sheet to take up as `margin-inline-end`. See `runEnd`.
|
|
49
|
+
* @cssproperty --carousel-slide-min - The narrowest a slide may be laid out, which is what `per-view="auto"` fits the track with. A length, since the sheet divides by it. Unset is the whole track, which is one across.
|
|
49
50
|
*/
|
|
50
51
|
export declare class HelixHeadlessCarousel extends HelixElement {
|
|
51
52
|
/**
|
|
@@ -183,14 +184,37 @@ export declare class HelixHeadlessCarousel extends HelixElement {
|
|
|
183
184
|
* A value the track cannot honor is taken to the nearest one it can, by
|
|
184
185
|
* `across`, and both tiers read that rather than this.
|
|
185
186
|
*
|
|
187
|
+
* **`auto` fits as many as the track can hold**, at `--carousel-slide-min`
|
|
188
|
+
* apiece, and nothing is written onto the track: the count is the sheet's,
|
|
189
|
+
* and the sheet's alone, because it is the one number here CSS can work out
|
|
190
|
+
* for itself. Everything it takes is a length the sheet already has, so the
|
|
191
|
+
* panes are laid out at their final width by the first rule that runs, on a
|
|
192
|
+
* server's markup as on the client's, and no script is waited on. That is the
|
|
193
|
+
* whole reason a declared count was ever the only option: a carousel that
|
|
194
|
+
* asks how wide its container is can only ask on the client, so the panes go
|
|
195
|
+
* down at one width and move to another when the answer arrives. Written
|
|
196
|
+
* inline the count would outrank the sheet that computes it, which is why an
|
|
197
|
+
* `auto` track is handed nothing. A count stays for the design that calls for
|
|
198
|
+
* exactly three.
|
|
199
|
+
*
|
|
200
|
+
* The styled sheet says how it divides, and the headless `auto` example
|
|
201
|
+
* carries the same three lines for a consumer writing their own.
|
|
202
|
+
*
|
|
203
|
+
* **A value rather than the resting behavior**, which is what the
|
|
204
|
+
* responsiveness policy asks of every axis that a box decides: a splitter
|
|
205
|
+
* turns on `orientation="auto"` and a plain one does not turn at all. Fitting
|
|
206
|
+
* changes what the carousel *does*, since how many are across is how many
|
|
207
|
+
* places the track can stop, so a carousel that had not asked for it would
|
|
208
|
+
* find its position count moving with the window.
|
|
209
|
+
*
|
|
186
210
|
* No default, because it reflects. A reflected property with a value writes
|
|
187
211
|
* its attribute on upgrade, and the host then carries something a consumer's
|
|
188
212
|
* server markup never had, which React reports as a mismatch. The one-across
|
|
189
213
|
* case is the absent attribute, and the styles read it that way.
|
|
190
214
|
*/
|
|
191
|
-
perView?: number;
|
|
215
|
+
perView?: number | 'auto';
|
|
192
216
|
/**
|
|
193
|
-
* `perView` as both tiers use it: a whole number
|
|
217
|
+
* A declared `perView` as both tiers use it: a whole number, one at least.
|
|
194
218
|
*
|
|
195
219
|
* **The clamp is here because the arithmetic is here**, and the two readers
|
|
196
220
|
* of this number have to be given the same one. A fraction is floored, since
|
|
@@ -202,12 +226,39 @@ export declare class HelixHeadlessCarousel extends HelixElement {
|
|
|
202
226
|
* drew no indicators at all and left `index` at `NaN`. All of them read as
|
|
203
227
|
* one across, which is what a carousel with nothing sayable asked for.
|
|
204
228
|
*
|
|
229
|
+
* **A vertical `auto` is one of them.** Fitting divides the room the page
|
|
230
|
+
* gave the track, and a vertical track's room is a height the consumer chose
|
|
231
|
+
* with `--carousel-block-size`: there is nothing there to fit against that
|
|
232
|
+
* they did not already decide, so the count is theirs to state. It also
|
|
233
|
+
* cannot be had cheaply, the block axis wanting `container-type: size`, which
|
|
234
|
+
* lays a track out as empty wherever its height is not definite.
|
|
235
|
+
*
|
|
205
236
|
* Not clamped to the number of slides. Six across four slides is four panes
|
|
206
237
|
* at a sixth of the track each and the one place to stand, which is what was
|
|
207
238
|
* asked for as nearly as it can be had, and the slide count is a fact the
|
|
208
239
|
* server does not have: clamping to it would draw one width there and another
|
|
209
240
|
* on upgrade.
|
|
210
241
|
*/
|
|
242
|
+
private get clamped();
|
|
243
|
+
/** Whether the track is fitting slides to its own box rather than to a count. */
|
|
244
|
+
private get fits();
|
|
245
|
+
/**
|
|
246
|
+
* How many slides go across, and `undefined` while a fitted track is unlaid.
|
|
247
|
+
*
|
|
248
|
+
* **Undefined is the honest answer and the indicators read it as one**, which
|
|
249
|
+
* is the whole of how a fitted carousel keeps from drawing a run of dots at
|
|
250
|
+
* one length and correcting it at another. The count a fitted track goes
|
|
251
|
+
* across is whatever its box resolved to, so nothing knows it until there is
|
|
252
|
+
* a box: not the server, which has no layout, and not the render that draws
|
|
253
|
+
* the panes, layout being what follows a render rather than what precedes it.
|
|
254
|
+
* The dots wait for it, which costs them nothing, because a server serves no
|
|
255
|
+
* indicators for any carousel, `slides` being empty there.
|
|
256
|
+
*
|
|
257
|
+
* Measured 16 Sep 2026 in Chromium 151.0.7922.34 and WebKit 26.5, recording
|
|
258
|
+
* every run of dots a carousel has from the upgrade on: a fitted one goes
|
|
259
|
+
* none, then five, and never another number; a declared one goes straight to
|
|
260
|
+
* six. What a reader can see is the run missing, never the run wrong.
|
|
261
|
+
*/
|
|
211
262
|
private get across();
|
|
212
263
|
/**
|
|
213
264
|
* How many distinct views the track holds, which is what the indicators count.
|
|
@@ -216,8 +267,93 @@ export declare class HelixHeadlessCarousel extends HelixElement {
|
|
|
216
267
|
* `n - perView + 1` times, so six slides four across is three: 0 to 3, 1 to 4,
|
|
217
268
|
* 2 to 5. One at minimum, since a carousel showing everything it has still
|
|
218
269
|
* has the one place to be.
|
|
270
|
+
*
|
|
271
|
+
* One across until a fitted track has been laid out, which is the same answer
|
|
272
|
+
* a carousel that has never been told anything gives, and the dots are
|
|
273
|
+
* withheld rather than counted from it. See `across`.
|
|
219
274
|
*/
|
|
220
275
|
get positions(): number;
|
|
276
|
+
/**
|
|
277
|
+
* How many slides the box turned out to hold, from the pane it laid out.
|
|
278
|
+
*
|
|
279
|
+
* **The measurement asks what happened rather than what was asked for**, and
|
|
280
|
+
* that is why it is the pane's width and not the count in the declaration.
|
|
281
|
+
* The sheet divides the track by `--carousel-per-view`, which under `auto` is
|
|
282
|
+
* arithmetic rather than a number, and a consumer's own sheet may divide it
|
|
283
|
+
* some other way entirely or grow the panes to fill a track holding
|
|
284
|
+
* everything it has. Reading the box back gets the same answer as the
|
|
285
|
+
* declaration wherever the two agree and the true one wherever they do not,
|
|
286
|
+
* so a width and a count cannot disagree in either direction.
|
|
287
|
+
*
|
|
288
|
+
* The sheet's own arithmetic run backward, on the lengths that were actually
|
|
289
|
+
* used: a gap added to the room, divided by a pane and a gap. Rounded,
|
|
290
|
+
* because the pane a sheet lays out is a sixty-fourth off its exact share by
|
|
291
|
+
* design and the quotient lands a ten-thousandth off a whole number.
|
|
292
|
+
*
|
|
293
|
+
* Undefined where there is nothing to measure, which is a harness rather than
|
|
294
|
+
* a browser: happy-dom lays nothing out and reports zero for every box, and a
|
|
295
|
+
* count taken from zeros would be a number with no layout behind it.
|
|
296
|
+
*/
|
|
297
|
+
private measure;
|
|
298
|
+
/**
|
|
299
|
+
* Takes the reading, and puts the index back inside what it leaves.
|
|
300
|
+
*
|
|
301
|
+
* **A fitted carousel's last position moves with the window**, which a
|
|
302
|
+
* declared one's never does: eight slides at one across has eight places to
|
|
303
|
+
* stand and four across has five, so a track widened while the reader sits on
|
|
304
|
+
* the last of them is a track resting somewhere it can no longer be. Through
|
|
305
|
+
* `goTo`, so the correction goes out as the same cancelable announcement
|
|
306
|
+
* every other index change does and a consumer holding `index` hears it
|
|
307
|
+
* rather than being overwritten.
|
|
308
|
+
*
|
|
309
|
+
* Only on a change, so the observer's own re-render cannot feed itself.
|
|
310
|
+
*/
|
|
311
|
+
private readonly readFit;
|
|
312
|
+
/**
|
|
313
|
+
* The count handed to the styles, and nothing at all where they work it out.
|
|
314
|
+
*
|
|
315
|
+
* A declared count is this file's: it decides how many places the track can
|
|
316
|
+
* stop, so the number the panes are divided by has to be the number the
|
|
317
|
+
* positions were counted from, and writing it on the track inside the
|
|
318
|
+
* component's own shadow root is what keeps a sheet from having to enumerate
|
|
319
|
+
* the values it will answer for.
|
|
320
|
+
*
|
|
321
|
+
* A fitted one is the sheet's, and handing it anything would take it back: an
|
|
322
|
+
* inline declaration outranks every rule short of `!important`, so a track
|
|
323
|
+
* told `1` here could never be told three by the rule that fits it. The
|
|
324
|
+
* absence is not a gap either, because the rule that computes the count
|
|
325
|
+
* declares it on this same element, which beats anything a consumer inherits
|
|
326
|
+
* in exactly as the inline one did.
|
|
327
|
+
*/
|
|
328
|
+
private handed;
|
|
329
|
+
/** What the box resolved to, and `undefined` until it has been laid out. */
|
|
330
|
+
private fitted;
|
|
331
|
+
/** Watches the pane a fitted track laid out, while `auto` is what was asked. */
|
|
332
|
+
private sizes;
|
|
333
|
+
/** The pane being watched, so a re-rendered run moves the watch with it. */
|
|
334
|
+
private watched;
|
|
335
|
+
/**
|
|
336
|
+
* Starts or stops watching, according to what the count was asked to be.
|
|
337
|
+
*
|
|
338
|
+
* **The pane and not the track, because both questions move it.** A narrower
|
|
339
|
+
* track divides into a narrower pane, and so does a slide arriving or leaving
|
|
340
|
+
* where the panes grow to fill a track holding everything it has. A watch on
|
|
341
|
+
* the track answers the first and sleeps through the second.
|
|
342
|
+
*
|
|
343
|
+
* **An observation is delivered after layout and inside the same rendering
|
|
344
|
+
* step**, and the update it asks for is a microtask on the end of it, so the
|
|
345
|
+
* dots are added to a frame that has not been painted. Taking the reading
|
|
346
|
+
* from `updated` instead would be the same arithmetic one Lit warning
|
|
347
|
+
* earlier, and the warning is about the right thing: a render that has to
|
|
348
|
+
* read layout is a render that has to run twice.
|
|
349
|
+
*
|
|
350
|
+
* Called from `connectedCallback`, `firstUpdated` and `updated`, so a
|
|
351
|
+
* consumer switching to `auto` after mount is watched, one switching away
|
|
352
|
+
* stops being, and a carousel moved in the DOM is watched again. Observing is
|
|
353
|
+
* what asks for the first reading, so the watch is rebuilt rather than kept
|
|
354
|
+
* across a mode change.
|
|
355
|
+
*/
|
|
356
|
+
private watchPane;
|
|
221
357
|
/**
|
|
222
358
|
* The panes rendered for the slides, in order. Empty until the first render.
|
|
223
359
|
*
|
|
@@ -254,9 +390,16 @@ export declare class HelixHeadlessCarousel extends HelixElement {
|
|
|
254
390
|
* there, which is why both tiers can share the arithmetic below.
|
|
255
391
|
*
|
|
256
392
|
* Physical sides rather than logical, to match the physical `offsetLeft` and
|
|
257
|
-
* `offsetTop` it is subtracted from.
|
|
258
|
-
*
|
|
259
|
-
*
|
|
393
|
+
* `offsetTop` it is subtracted from.
|
|
394
|
+
*
|
|
395
|
+
* **The side read is the side the track scrolls on, and not one side standing
|
|
396
|
+
* for four.** They are one length on a track laid out at the defaults and
|
|
397
|
+
* stop being one the moment a consumer raises `--carousel-bleed`, which the
|
|
398
|
+
* hook exists to invite: a slide on `--helix-shadow-lg` reaches 44px and is
|
|
399
|
+
* told to ask for it. So a horizontal track's room is its inline padding and
|
|
400
|
+
* a vertical one's is its block padding, and each sheet puts the bleed where
|
|
401
|
+
* the scroller clips. Reading one side for both would have a vertical track
|
|
402
|
+
* measuring a length nothing on its axis was laid out with.
|
|
260
403
|
*/
|
|
261
404
|
private bleed;
|
|
262
405
|
/**
|