@fusion.dev/helix-headless 0.46.1 → 0.47.1
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 +29 -28
- package/dist/carousel/root/carousel-root.d.ts +42 -0
- package/dist/carousel/root/carousel-root.js +6 -2
- package/dist/data-table/root/data-table-root.d.ts +9 -0
- package/dist/table/cell/table-cell.d.ts +1 -1
- package/dist/table/column/table-column.d.ts +9 -6
- package/dist/table/root/table-root.d.ts +14 -2
- package/dist/table/row/table-row.d.ts +1 -1
- package/dist/tree/item/tree-item.d.ts +23 -10
- package/dist/tree/item/tree-item.js +1 -1
- package/dist/tree/root/tree-root.d.ts +1 -1
- package/package.json +5 -5
- package/types/jsx.d.ts +292 -46
- package/types/vue.d.ts +79 -13
package/custom-elements.json
CHANGED
|
@@ -9611,6 +9611,10 @@
|
|
|
9611
9611
|
"description": "The size one pane is laid out at. A sheet sets it and the component measures the run with it.",
|
|
9612
9612
|
"name": "--carousel-pane"
|
|
9613
9613
|
},
|
|
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`.",
|
|
9616
|
+
"name": "--carousel-per-view"
|
|
9617
|
+
},
|
|
9614
9618
|
{
|
|
9615
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`.",
|
|
9616
9620
|
"name": "--carousel-run-end"
|
|
@@ -9806,10 +9810,20 @@
|
|
|
9806
9810
|
"type": {
|
|
9807
9811
|
"text": "number | undefined"
|
|
9808
9812
|
},
|
|
9809
|
-
"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\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.",
|
|
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.",
|
|
9810
9814
|
"attribute": "per-view",
|
|
9811
9815
|
"reflects": true
|
|
9812
9816
|
},
|
|
9817
|
+
{
|
|
9818
|
+
"kind": "field",
|
|
9819
|
+
"name": "across",
|
|
9820
|
+
"type": {
|
|
9821
|
+
"text": "number"
|
|
9822
|
+
},
|
|
9823
|
+
"privacy": "private",
|
|
9824
|
+
"description": "`perView` as both tiers use it: a whole number of slides, 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\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.",
|
|
9825
|
+
"readonly": true
|
|
9826
|
+
},
|
|
9813
9827
|
{
|
|
9814
9828
|
"kind": "field",
|
|
9815
9829
|
"name": "positions",
|
|
@@ -10477,7 +10491,7 @@
|
|
|
10477
10491
|
"type": {
|
|
10478
10492
|
"text": "number | undefined"
|
|
10479
10493
|
},
|
|
10480
|
-
"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\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.",
|
|
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.",
|
|
10481
10495
|
"fieldName": "perView"
|
|
10482
10496
|
}
|
|
10483
10497
|
],
|
|
@@ -24494,7 +24508,7 @@
|
|
|
24494
24508
|
"declarations": [
|
|
24495
24509
|
{
|
|
24496
24510
|
"kind": "class",
|
|
24497
|
-
"description": "**The schema is markup and the data is a property.** Columns are declared as\n`helix-table-column` children, because a schema is small and something a\nreader should see in the HTML; rows are handed over as an array, because a\ntable that draws ten thousand elements cannot window them.\n\n```html\n<helix-data-table .rows=${rows} sort=\"name:asc\" page-size=\"20\">\n <helix-table-column field=\"name\" sortable>Name</helix-table-column>\n <helix-table-column field=\"size\" align=\"end\" sortable .cell=${bytes}>Size</helix-table-column>\n</helix-data-table>\n```\n\n`helix-table` takes rows as markup and is the right component for a table of\ntwelve things a person wrote out.\n\n**Sort and filter apply to the whole set, never the page.** Sorting the drawn\nwindow is correct on the first screen and wrong on every other one.\n\n**The cell values do not server-render.** The headings do, and the row\nelements do, but reading a cell needs the columns, and the columns are markup\nchildren Lit SSR does not hand this element. So a crawler sees a table of the\nright shape with nothing in it. That is the cost of the first paragraph: use\n`helix-table` where the served HTML has to carry the values.\n\n**`selectable` adds a column of checkboxes, keyed on `row-key`.** A row is\nselected by its identity rather than its position, so a selection survives a\nsort, a filter and a page. `selected` is the chosen keys, comma separated, the\nshape Listbox uses for a multiple choice, and like `sort` it is controlled\nwhen set and seeded by `default-selected`. The box in the heading selects every\nrow in the result, across pages, and shows a dash while only some are chosen.\nChoosing one of many, rather than several, is opening a row, and that is a\nlink or a button in a cell rather than a selection.\n\n**A reader can size and order the columns.** `resizable` on a column puts a\nseparator on its edge; `reorderable` on the table puts a grip on each heading\nthat has a `field`, moved by dragging or with the arrow keys. The order lands\nin `order` as fields, and the consumer's own markup is never rewritten: the\ntable assigns the headings to its header in that order instead.\n\n**`csv()` hands back the result as text**: every row the filter lets through,\nin the order on screen, in the columns on screen. Saving it is the page's\nbusiness, the same as any other file.",
|
|
24511
|
+
"description": "**The schema is markup and the data is a property.** Columns are declared as\n`helix-table-column` children, because a schema is small and something a\nreader should see in the HTML; rows are handed over as an array, because a\ntable that draws ten thousand elements cannot window them.\n\n```html\n<helix-data-table .rows=${rows} sort=\"name:asc\" page-size=\"20\">\n <helix-table-column field=\"name\" sortable>Name</helix-table-column>\n <helix-table-column field=\"size\" align=\"end\" sortable .cell=${bytes}>Size</helix-table-column>\n</helix-data-table>\n```\n\n`helix-table` takes rows as markup and is the right component for a table of\ntwelve things a person wrote out.\n\n**Sort and filter apply to the whole set, never the page.** Sorting the drawn\nwindow is correct on the first screen and wrong on every other one.\n\n**The cell values do not server-render.** The headings do, and the row\nelements do, but reading a cell needs the columns, and the columns are markup\nchildren Lit SSR does not hand this element. So a crawler sees a table of the\nright shape with nothing in it. That is the cost of the first paragraph: use\n`helix-table` where the served HTML has to carry the values.\n\n**`selectable` adds a column of checkboxes, keyed on `row-key`.** A row is\nselected by its identity rather than its position, so a selection survives a\nsort, a filter and a page. `selected` is the chosen keys, comma separated, the\nshape Listbox uses for a multiple choice, and like `sort` it is controlled\nwhen set and seeded by `default-selected`. The box in the heading selects every\nrow in the result, across pages, and shows a dash while only some are chosen.\nChoosing one of many, rather than several, is opening a row, and that is a\nlink or a button in a cell rather than a selection.\n\n**A reader can size and order the columns.** `resizable` on a column puts a\nseparator on its edge; `reorderable` on the table puts a grip on each heading\nthat has a `field`, moved by dragging or with the arrow keys. The order lands\nin `order` as fields, and the consumer's own markup is never rewritten: the\ntable assigns the headings to its header in that order instead.\n\n**`csv()` hands back the result as text**: every row the filter lets through,\nin the order on screen, in the columns on screen. Saving it is the page's\nbusiness, the same as any other file.\n\n**There is no `columns` attribute here, and `helix-table` has one.** The\ndifference is what a column is in each: here it is the schema, so a table\nwithout one has nothing to read a row with, and every column is a place to\nwrite a `width`. A `helix-table` holds cells a consumer wrote and can be\nwritten with no column at all, so its `columns` is where such a table is\nsized from. Written on this element the attribute is inert, which is the trap\nworth knowing when moving between the two. What both take is the CSS hook,\n`--data-table-columns` here and `--table-columns` there.",
|
|
24498
24512
|
"name": "HelixHeadlessDataTable",
|
|
24499
24513
|
"cssProperties": [
|
|
24500
24514
|
{
|
|
@@ -85507,7 +85521,7 @@
|
|
|
85507
85521
|
"summary": "One cell of a table.",
|
|
85508
85522
|
"helix": {
|
|
85509
85523
|
"since": "0.1.0",
|
|
85510
|
-
"status": "
|
|
85524
|
+
"status": "stable",
|
|
85511
85525
|
"documentation": "https://fusion.dev/helix/components/table",
|
|
85512
85526
|
"aliases": [
|
|
85513
85527
|
"Cell",
|
|
@@ -85600,7 +85614,7 @@
|
|
|
85600
85614
|
},
|
|
85601
85615
|
{
|
|
85602
85616
|
"kind": "class",
|
|
85603
|
-
"description": "**The column is the source of both its heading and its track.** Add one and\nthe table has another track; remove one and it does not.
|
|
85617
|
+
"description": "**The column is the source of both its heading and its track.** Add one and\nthe table has another track; remove one and it does not. That is what ties\nthe two together, and a table-level track list on its own does not: a list\nthat is accidentally the headings is invalid CSS a grid ignores in silence,\ndrawing the whole table as one column. `helix-table`'s `columns` is dealt out\na track at a time against the columns declared under it, so a heading among\nthe widths costs its own column a width and no more, and a list longer or\nshorter than the columns is trimmed or shared rather than being a second\ncount of them. A column's own `width` wins over the track in its place.\n\n**It is also where every per-column fact goes**, which is the reason\n`helix-data-table` needs no column config object. `field` names the key the\ncell reads, `sortable` says a reader may reorder by it, `align` says which\nedge the values line up against, and `cell` takes a function for anything the\nfield alone cannot express. The schema is markup and the data is a property:\na schema is small, declarative, and something a reader should be able to see\nin the HTML, and data is large and windowed.\n\n**The same element serves both tables**, the markup one and the data one. It\nis identified by a flag rather than by `instanceof`, so a `helix-table-column`\nworks inside either without the two roots sharing anything else.\n\n**It generates no box of its own**, the same as a row: the heading is a grid\nitem of the table, so it lines up with the cells under it rather than sitting\nin a wrapper that has to be kept the same width.\n\n**`hidden` takes the column out of the grid**, its heading and its track\nboth, so the columns after it keep their own widths and every row keeps its\ncells under their headings. `hidden=\"until-found\"` keeps its track, the\nheading being left drawn, as every Helix element leaves one with that value.\n`helix-data-table` draws the cells, so it leaves out the ones under a hidden\ncolumn. A `helix-table`'s cells are markup the consumer wrote, so hide them\nwith the column, as removing a column means removing its cells: a row with a\ncell more than the table has tracks wraps into the next.\n\n**A heading that does something holds a control that does it.** The host is\nthe column header, and a header is not focusable, so a sortable heading is a\n`<button>` inside it: the pattern for a sortable table, and the only way a\nreader on a keyboard reaches the sort at all. A column a reader may resize\ncarries a `separator` on its end edge, moved by dragging it or with the arrow\nkeys, and a column in a table that lets a reader reorder its columns carries\na grip the table moves.",
|
|
85604
85618
|
"name": "HelixHeadlessTableColumn",
|
|
85605
85619
|
"cssParts": [
|
|
85606
85620
|
{
|
|
@@ -86310,7 +86324,7 @@
|
|
|
86310
86324
|
"summary": "One column of a table: its heading, how wide it is, and what it reads.",
|
|
86311
86325
|
"helix": {
|
|
86312
86326
|
"since": "0.1.0",
|
|
86313
|
-
"status": "
|
|
86327
|
+
"status": "stable",
|
|
86314
86328
|
"documentation": "https://fusion.dev/helix/components/table",
|
|
86315
86329
|
"aliases": [
|
|
86316
86330
|
"Column header",
|
|
@@ -86409,10 +86423,6 @@
|
|
|
86409
86423
|
"description": "A grid rather than a `<table>`, so every column lines up across rows while\neach row stays a real element that can be styled, hidden, or made\ninteractive. Table layout gives column alignment and takes away almost\neverything else; grid gives both.\n\nThe cost is that the roles have to be declared, since a grid of divs is not a\ntable to anyone reading it. `table`, `row`, `cell`, and `columnheader` are\nall set explicitly, and rows are `display: contents` so their cells become\nitems of the one grid that does the aligning.\n\nThe properties below are written by this component and read by whoever draws\nit. A consumer sets none of them: they carry a number this element computed\nand CSS cannot, which is what lets a stylesheet on this tier draw the thing\nwithout measuring anything itself.",
|
|
86410
86424
|
"name": "HelixHeadlessTable",
|
|
86411
86425
|
"cssProperties": [
|
|
86412
|
-
{
|
|
86413
|
-
"description": "Track list for the columns.",
|
|
86414
|
-
"name": "--table-columns"
|
|
86415
|
-
},
|
|
86416
86426
|
{
|
|
86417
86427
|
"description": "The column track list this element worked out from the columns declared in it. Written by the component, read by the sheet that paints: a stylesheet takes it to lay the grid out, and setting it does nothing, because the component writes it inline on the very element that reads it and an inline declaration beats any sheet. `--table-columns` is the one to set.",
|
|
86418
86428
|
"name": "--table-template"
|
|
@@ -86450,7 +86460,7 @@
|
|
|
86450
86460
|
"text": "string"
|
|
86451
86461
|
},
|
|
86452
86462
|
"default": "''",
|
|
86453
|
-
"description": "The column widths as one track list, written once on the table.\n\nWith `helix-table-column` children, each track sizes the column in its\nplace, a hidden column counted, so hiding one takes its track with it and\nthe rest keep theirs. The columns decide how many tracks there are and this\nlist only how wide: a track past the last column is dropped, and a column\npast the last track shares what is left. With no columns declared it is\nthe whole track list. Tracks count as the grid counts them, so\n`minmax(0, 1fr)` is one and `repeat(2, 8rem)` is two, and one the grid\nwould refuse leaves its column at the default rather than taking the table\ndown to one column.\n\n**A column's own `width` wins over its track here.** The width is written\non the column it sizes, which is the more particular statement, and it is\nwhere a resize lands: a reader dragging a column's edge writes `width`, so\nwere this list to win, the drag would move the separator and leave the\ntrack where the list put it. This is the table's default for its columns,\nand each column may say otherwise.",
|
|
86463
|
+
"description": "The column widths as one track list, written once on the table.\n\nWith `helix-table-column` children, each track sizes the column in its\nplace, a hidden column counted, so hiding one takes its track with it and\nthe rest keep theirs. The columns decide how many tracks there are and this\nlist only how wide: a track past the last column is dropped, and a column\npast the last track shares what is left. With no columns declared it is\nthe whole track list. Tracks count as the grid counts them, so\n`minmax(0, 1fr)` is one and `repeat(2, 8rem)` is two, and one the grid\nwould refuse leaves its column at the default rather than taking the table\ndown to one column.\n\n**A column's own `width` wins over its track here.** The width is written\non the column it sizes, which is the more particular statement, and it is\nwhere a resize lands: a reader dragging a column's edge writes `width`, so\nwere this list to win, the drag would move the separator and leave the\ntrack where the list put it. This is the table's default for its columns,\nand each column may say otherwise.\n\n**It is also the only track list a server can send.** The shim has no tree\nto walk, so a render there knows of no columns and this attribute is the\nwhole answer: a table given one lays its grid out in the first paint, and a\ntable sized only by its columns is one track wide until it upgrades.\n\n**`helix-data-table` has none of this, and should not.** Its columns are\nits schema rather than an option, so there is always a column to write a\n`width` on and a list here would be a second way to say what that says.\nThis table's cells are markup, and a table written as rows of cells with no\n`helix-table-column` in it has nowhere else to be sized from. Both families\ntake the same CSS hook, `--table-columns` and `--data-table-columns`, which\nwins over whichever list the element worked out.",
|
|
86454
86464
|
"attribute": "columns"
|
|
86455
86465
|
},
|
|
86456
86466
|
{
|
|
@@ -87025,7 +87035,7 @@
|
|
|
87025
87035
|
"text": "string"
|
|
87026
87036
|
},
|
|
87027
87037
|
"default": "''",
|
|
87028
|
-
"description": "The column widths as one track list, written once on the table.\n\nWith `helix-table-column` children, each track sizes the column in its\nplace, a hidden column counted, so hiding one takes its track with it and\nthe rest keep theirs. The columns decide how many tracks there are and this\nlist only how wide: a track past the last column is dropped, and a column\npast the last track shares what is left. With no columns declared it is\nthe whole track list. Tracks count as the grid counts them, so\n`minmax(0, 1fr)` is one and `repeat(2, 8rem)` is two, and one the grid\nwould refuse leaves its column at the default rather than taking the table\ndown to one column.\n\n**A column's own `width` wins over its track here.** The width is written\non the column it sizes, which is the more particular statement, and it is\nwhere a resize lands: a reader dragging a column's edge writes `width`, so\nwere this list to win, the drag would move the separator and leave the\ntrack where the list put it. This is the table's default for its columns,\nand each column may say otherwise.",
|
|
87038
|
+
"description": "The column widths as one track list, written once on the table.\n\nWith `helix-table-column` children, each track sizes the column in its\nplace, a hidden column counted, so hiding one takes its track with it and\nthe rest keep theirs. The columns decide how many tracks there are and this\nlist only how wide: a track past the last column is dropped, and a column\npast the last track shares what is left. With no columns declared it is\nthe whole track list. Tracks count as the grid counts them, so\n`minmax(0, 1fr)` is one and `repeat(2, 8rem)` is two, and one the grid\nwould refuse leaves its column at the default rather than taking the table\ndown to one column.\n\n**A column's own `width` wins over its track here.** The width is written\non the column it sizes, which is the more particular statement, and it is\nwhere a resize lands: a reader dragging a column's edge writes `width`, so\nwere this list to win, the drag would move the separator and leave the\ntrack where the list put it. This is the table's default for its columns,\nand each column may say otherwise.\n\n**It is also the only track list a server can send.** The shim has no tree\nto walk, so a render there knows of no columns and this attribute is the\nwhole answer: a table given one lays its grid out in the first paint, and a\ntable sized only by its columns is one track wide until it upgrades.\n\n**`helix-data-table` has none of this, and should not.** Its columns are\nits schema rather than an option, so there is always a column to write a\n`width` on and a list here would be a second way to say what that says.\nThis table's cells are markup, and a table written as rows of cells with no\n`helix-table-column` in it has nowhere else to be sized from. Both families\ntake the same CSS hook, `--table-columns` and `--data-table-columns`, which\nwins over whichever list the element worked out.",
|
|
87029
87039
|
"fieldName": "columns"
|
|
87030
87040
|
},
|
|
87031
87041
|
{
|
|
@@ -87091,7 +87101,7 @@
|
|
|
87091
87101
|
"helix": {
|
|
87092
87102
|
"category": "data",
|
|
87093
87103
|
"since": "0.1.0",
|
|
87094
|
-
"status": "
|
|
87104
|
+
"status": "stable",
|
|
87095
87105
|
"documentation": "https://fusion.dev/helix/components/table",
|
|
87096
87106
|
"aliases": [
|
|
87097
87107
|
"DataTable",
|
|
@@ -87500,7 +87510,7 @@
|
|
|
87500
87510
|
"summary": "One row of a table.",
|
|
87501
87511
|
"helix": {
|
|
87502
87512
|
"since": "0.1.0",
|
|
87503
|
-
"status": "
|
|
87513
|
+
"status": "stable",
|
|
87504
87514
|
"documentation": "https://fusion.dev/helix/components/table",
|
|
87505
87515
|
"aliases": [
|
|
87506
87516
|
"Row",
|
|
@@ -102191,8 +102201,7 @@
|
|
|
102191
102201
|
"type": {
|
|
102192
102202
|
"text": "number | undefined"
|
|
102193
102203
|
},
|
|
102194
|
-
"description": "Depth from the root,
|
|
102195
|
-
"attribute": "level"
|
|
102204
|
+
"description": "Depth from the root, counted by the tree so indentation needs no CSS nesting.\n\n**Read rather than written, and no attribute at all.** The tree counts the\nitems a row sits inside and assigns this on every sync, so a value declared\nhere is overwritten before the first paint: measured at `level=\"2\"` on three\nrows of a flat list, all three back to 1 with `--tree-level: 1` on every\nrow. It carried an attribute and a shipped example setting it for as long as\nboth existed, which is a depth a consumer could state and nothing would\nhonor. Depth in this tree is where a row is, not what it claims: a branch's\nchildren go in its `children` slot, and that nesting is also what decides\nwhich rows a shut branch hides and which row the outward arrow moves to.\n\nNot reflected either. The tree assigns this after it upgrades, so an\nattribute here would be a change to markup the consumer rendered and\nhydration would report it. The indent it drives is written onto the row\ninstead, inside the shadow root, which is not part of the tree React\nhydrates."
|
|
102196
102205
|
},
|
|
102197
102206
|
{
|
|
102198
102207
|
"kind": "field",
|
|
@@ -102211,7 +102220,7 @@
|
|
|
102211
102220
|
"text": "boolean"
|
|
102212
102221
|
},
|
|
102213
102222
|
"default": "false",
|
|
102214
|
-
"description": "Whether this item is the current one.\n\nNot reflected, for the reason `level`
|
|
102223
|
+
"description": "Whether this item is the current one.\n\nNot reflected, for the reason `level` above gives in full: the tree assigns\nthis after it upgrades, so the attribute would be a change to markup the\nconsumer rendered and hydration would report it. Mirroring to\n`data-selected` on the host instead is the same fault under another name.\n\nThe stylesheet reads it from the row inside this shadow root, because the\nrow is not part of the tree React hydrates.",
|
|
102215
102224
|
"attribute": "selected"
|
|
102216
102225
|
},
|
|
102217
102226
|
{
|
|
@@ -102801,14 +102810,6 @@
|
|
|
102801
102810
|
"description": "Where this node goes, which makes its row a real link.\n\nUnset by default, and unreflected: a tree of choosable nodes is not a tree\nof links, and an empty `href` written onto every row would be a link to the\ncurrent page on every item a consumer never asked to be one.",
|
|
102802
102811
|
"fieldName": "href"
|
|
102803
102812
|
},
|
|
102804
|
-
{
|
|
102805
|
-
"name": "level",
|
|
102806
|
-
"type": {
|
|
102807
|
-
"text": "number | undefined"
|
|
102808
|
-
},
|
|
102809
|
-
"description": "Depth from the root, set by the tree so indentation needs no CSS nesting.\n\nNot reflected. The tree assigns this after it upgrades, so an attribute\nhere would be a change to markup the consumer rendered and hydration would\nreport it. The indent it drives is written onto the row instead, inside the\nshadow root, which is not part of the tree React hydrates.",
|
|
102810
|
-
"fieldName": "level"
|
|
102811
|
-
},
|
|
102812
102813
|
{
|
|
102813
102814
|
"name": "rel",
|
|
102814
102815
|
"type": {
|
|
@@ -102824,7 +102825,7 @@
|
|
|
102824
102825
|
"text": "boolean"
|
|
102825
102826
|
},
|
|
102826
102827
|
"default": "false",
|
|
102827
|
-
"description": "Whether this item is the current one.\n\nNot reflected, for the reason `level`
|
|
102828
|
+
"description": "Whether this item is the current one.\n\nNot reflected, for the reason `level` above gives in full: the tree assigns\nthis after it upgrades, so the attribute would be a change to markup the\nconsumer rendered and hydration would report it. Mirroring to\n`data-selected` on the host instead is the same fault under another name.\n\nThe stylesheet reads it from the row inside this shadow root, because the\nrow is not part of the tree React hydrates.",
|
|
102828
102829
|
"fieldName": "selected"
|
|
102829
102830
|
},
|
|
102830
102831
|
{
|
|
@@ -102902,7 +102903,7 @@
|
|
|
102902
102903
|
"summary": "One node in a tree.",
|
|
102903
102904
|
"helix": {
|
|
102904
102905
|
"since": "0.1.0",
|
|
102905
|
-
"status": "
|
|
102906
|
+
"status": "stable",
|
|
102906
102907
|
"documentation": "https://fusion.dev/helix/components/tree",
|
|
102907
102908
|
"aliases": [
|
|
102908
102909
|
"TreeNode",
|
|
@@ -103795,7 +103796,7 @@
|
|
|
103795
103796
|
"helix": {
|
|
103796
103797
|
"category": "navigation",
|
|
103797
103798
|
"since": "0.1.0",
|
|
103798
|
-
"status": "
|
|
103799
|
+
"status": "stable",
|
|
103799
103800
|
"documentation": "https://fusion.dev/helix/components/tree",
|
|
103800
103801
|
"aliases": [
|
|
103801
103802
|
"FileTree",
|
|
@@ -44,6 +44,7 @@ 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
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`.
|
|
48
49
|
*/
|
|
49
50
|
export declare class HelixHeadlessCarousel extends HelixElement {
|
|
@@ -161,12 +162,53 @@ export declare class HelixHeadlessCarousel extends HelixElement {
|
|
|
161
162
|
* offset the track has already reached: pressing next walks the dots to the
|
|
162
163
|
* end while the slides stop moving a third of the way through.
|
|
163
164
|
*
|
|
165
|
+
* **The number is published to the styles rather than enumerated by them**,
|
|
166
|
+
* as `--carousel-per-view` on the track, which is what keeps a width and a
|
|
167
|
+
* count from disagreeing. A sheet can only name a value it wrote a rule for,
|
|
168
|
+
* so the styled tier enumerated `per-view="2"` through `5` and called five a
|
|
169
|
+
* judgment; above it the pane fell back to one across while this file went on
|
|
170
|
+
* counting positions. Measured in Chromium over eight slides, six across gave
|
|
171
|
+
* three dots, a pane taking the whole track and five slides reachable only by
|
|
172
|
+
* dragging. Written from here there is no ceiling to exceed, and a consumer's
|
|
173
|
+
* own sheet reads the same declaration the styled one does. `runEnd` publishes
|
|
174
|
+
* its correction the same way and for the same reason.
|
|
175
|
+
*
|
|
176
|
+
* **On the track and not on the host.** A custom property on the host is a
|
|
177
|
+
* reflected attribute by another name: it would arrive on upgrade, and a
|
|
178
|
+
* consumer's server markup never had it. Inside the component's own shadow
|
|
179
|
+
* root it serializes with the rest of the template on the server, and the
|
|
180
|
+
* track's own declaration beats anything a consumer inherits in, so the
|
|
181
|
+
* attribute is the one answer to how wide a pane is.
|
|
182
|
+
*
|
|
183
|
+
* A value the track cannot honor is taken to the nearest one it can, by
|
|
184
|
+
* `across`, and both tiers read that rather than this.
|
|
185
|
+
*
|
|
164
186
|
* No default, because it reflects. A reflected property with a value writes
|
|
165
187
|
* its attribute on upgrade, and the host then carries something a consumer's
|
|
166
188
|
* server markup never had, which React reports as a mismatch. The one-across
|
|
167
189
|
* case is the absent attribute, and the styles read it that way.
|
|
168
190
|
*/
|
|
169
191
|
perView?: number;
|
|
192
|
+
/**
|
|
193
|
+
* `perView` as both tiers use it: a whole number of slides, one at least.
|
|
194
|
+
*
|
|
195
|
+
* **The clamp is here because the arithmetic is here**, and the two readers
|
|
196
|
+
* of this number have to be given the same one. A fraction is floored, since
|
|
197
|
+
* a position is a whole slide along: one and a half across leaves a last
|
|
198
|
+
* position the track runs out before reaching, which is the fault `goTo`
|
|
199
|
+
* already carries a comment about. Zero and a negative divide the track into
|
|
200
|
+
* nothing and into a pane facing the wrong way, and a non-numeric attribute
|
|
201
|
+
* parses to `NaN`, which `Math.max` propagates: it counted `NaN` positions,
|
|
202
|
+
* drew no indicators at all and left `index` at `NaN`. All of them read as
|
|
203
|
+
* one across, which is what a carousel with nothing sayable asked for.
|
|
204
|
+
*
|
|
205
|
+
* Not clamped to the number of slides. Six across four slides is four panes
|
|
206
|
+
* at a sixth of the track each and the one place to stand, which is what was
|
|
207
|
+
* asked for as nearly as it can be had, and the slide count is a fact the
|
|
208
|
+
* server does not have: clamping to it would draw one width there and another
|
|
209
|
+
* on upgrade.
|
|
210
|
+
*/
|
|
211
|
+
private get across();
|
|
170
212
|
/**
|
|
171
213
|
* How many distinct views the track holds, which is what the indicators count.
|
|
172
214
|
*
|
|
@@ -95,9 +95,12 @@ let HelixHeadlessCarousel = class HelixHeadlessCarousel extends HelixElement {
|
|
|
95
95
|
this.indexState = next;
|
|
96
96
|
this.requestUpdate('index', previous);
|
|
97
97
|
}
|
|
98
|
+
get across() {
|
|
99
|
+
const asked = this.perView ?? 1;
|
|
100
|
+
return Number.isFinite(asked) ? Math.max(1, Math.floor(asked)) : 1;
|
|
101
|
+
}
|
|
98
102
|
get positions() {
|
|
99
|
-
|
|
100
|
-
return Math.max(1, this.slides.length - across + 1);
|
|
103
|
+
return Math.max(1, this.slides.length - this.across + 1);
|
|
101
104
|
}
|
|
102
105
|
get panes() {
|
|
103
106
|
return [...(this.renderRoot?.querySelectorAll?.('[part="slide"]') ?? [])];
|
|
@@ -305,6 +308,7 @@ let HelixHeadlessCarousel = class HelixHeadlessCarousel extends HelixElement {
|
|
|
305
308
|
<div
|
|
306
309
|
data-scroller
|
|
307
310
|
part="track"
|
|
311
|
+
style=${`--carousel-per-view: ${this.across}`}
|
|
308
312
|
@scroll=${this.handleTrackScroll}
|
|
309
313
|
@scrollend=${this.handleScroll}
|
|
310
314
|
@pointerdown=${this.handleTake}
|
|
@@ -52,6 +52,15 @@ declare const HelixHeadlessDataTable_base: (new (...args: any[]) => import("@fus
|
|
|
52
52
|
* in the order on screen, in the columns on screen. Saving it is the page's
|
|
53
53
|
* business, the same as any other file.
|
|
54
54
|
*
|
|
55
|
+
* **There is no `columns` attribute here, and `helix-table` has one.** The
|
|
56
|
+
* difference is what a column is in each: here it is the schema, so a table
|
|
57
|
+
* without one has nothing to read a row with, and every column is a place to
|
|
58
|
+
* write a `width`. A `helix-table` holds cells a consumer wrote and can be
|
|
59
|
+
* written with no column at all, so its `columns` is where such a table is
|
|
60
|
+
* sized from. Written on this element the attribute is inert, which is the trap
|
|
61
|
+
* worth knowing when moving between the two. What both take is the CSS hook,
|
|
62
|
+
* `--data-table-columns` here and `--table-columns` there.
|
|
63
|
+
*
|
|
55
64
|
* @since 0.1.0
|
|
56
65
|
* @status stable
|
|
57
66
|
* @category data
|
|
@@ -35,11 +35,14 @@ export declare const edgeOf: (align: string | undefined) => string | undefined;
|
|
|
35
35
|
*
|
|
36
36
|
* @description
|
|
37
37
|
* **The column is the source of both its heading and its track.** Add one and
|
|
38
|
-
* the table has another track; remove one and it does not.
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
38
|
+
* the table has another track; remove one and it does not. That is what ties
|
|
39
|
+
* the two together, and a table-level track list on its own does not: a list
|
|
40
|
+
* that is accidentally the headings is invalid CSS a grid ignores in silence,
|
|
41
|
+
* drawing the whole table as one column. `helix-table`'s `columns` is dealt out
|
|
42
|
+
* a track at a time against the columns declared under it, so a heading among
|
|
43
|
+
* the widths costs its own column a width and no more, and a list longer or
|
|
44
|
+
* shorter than the columns is trimmed or shared rather than being a second
|
|
45
|
+
* count of them. A column's own `width` wins over the track in its place.
|
|
43
46
|
*
|
|
44
47
|
* **It is also where every per-column fact goes**, which is the reason
|
|
45
48
|
* `helix-data-table` needs no column config object. `field` names the key the
|
|
@@ -75,7 +78,7 @@ export declare const edgeOf: (align: string | undefined) => string | undefined;
|
|
|
75
78
|
* a grip the table moves.
|
|
76
79
|
*
|
|
77
80
|
* @since 0.1.0
|
|
78
|
-
* @status
|
|
81
|
+
* @status stable
|
|
79
82
|
* @aliases Column header, Th
|
|
80
83
|
* @documentation https://fusion.dev/helix/components/table
|
|
81
84
|
*
|
|
@@ -22,7 +22,7 @@ declare const HelixHeadlessTable_base: (new (...args: any[]) => import("@fusion.
|
|
|
22
22
|
* without measuring anything itself.
|
|
23
23
|
*
|
|
24
24
|
* @since 0.1.0
|
|
25
|
-
* @status
|
|
25
|
+
* @status stable
|
|
26
26
|
* @category data
|
|
27
27
|
* @aliases DataTable, Grid table
|
|
28
28
|
* @documentation https://fusion.dev/helix/components/table
|
|
@@ -34,7 +34,6 @@ declare const HelixHeadlessTable_base: (new (...args: any[]) => import("@fusion.
|
|
|
34
34
|
* @csspart loading - Shown while the rows are still on their way.
|
|
35
35
|
* @csspart table - The grid.
|
|
36
36
|
*
|
|
37
|
-
* @cssproperty --table-columns - Track list for the columns.
|
|
38
37
|
* @cssproperty --table-template - The column track list this element worked out from the columns declared in it. Written by the component, read by the sheet that paints: a stylesheet takes it to lay the grid out, and setting it does nothing, because the component writes it inline on the very element that reads it and an inline declaration beats any sheet. `--table-columns` is the one to set.
|
|
39
38
|
*/
|
|
40
39
|
export declare class HelixHeadlessTable extends HelixHeadlessTable_base {
|
|
@@ -57,6 +56,19 @@ export declare class HelixHeadlessTable extends HelixHeadlessTable_base {
|
|
|
57
56
|
* were this list to win, the drag would move the separator and leave the
|
|
58
57
|
* track where the list put it. This is the table's default for its columns,
|
|
59
58
|
* and each column may say otherwise.
|
|
59
|
+
*
|
|
60
|
+
* **It is also the only track list a server can send.** The shim has no tree
|
|
61
|
+
* to walk, so a render there knows of no columns and this attribute is the
|
|
62
|
+
* whole answer: a table given one lays its grid out in the first paint, and a
|
|
63
|
+
* table sized only by its columns is one track wide until it upgrades.
|
|
64
|
+
*
|
|
65
|
+
* **`helix-data-table` has none of this, and should not.** Its columns are
|
|
66
|
+
* its schema rather than an option, so there is always a column to write a
|
|
67
|
+
* `width` on and a list here would be a second way to say what that says.
|
|
68
|
+
* This table's cells are markup, and a table written as rows of cells with no
|
|
69
|
+
* `helix-table-column` in it has nowhere else to be sized from. Both families
|
|
70
|
+
* take the same CSS hook, `--table-columns` and `--data-table-columns`, which
|
|
71
|
+
* wins over whichever list the element worked out.
|
|
60
72
|
*/
|
|
61
73
|
columns: string;
|
|
62
74
|
/**
|
|
@@ -10,7 +10,7 @@ import { type PropertyValues, type TemplateResult } from 'lit';
|
|
|
10
10
|
* cells are laid out by the table algorithm.
|
|
11
11
|
*
|
|
12
12
|
* @since 0.1.0
|
|
13
|
-
* @status
|
|
13
|
+
* @status stable
|
|
14
14
|
* @aliases Row, TableRow
|
|
15
15
|
* @documentation https://fusion.dev/helix/components/table
|
|
16
16
|
*
|
|
@@ -24,7 +24,7 @@ declare const HelixHeadlessTreeItem_base: (new (...args: any[]) => import("@fusi
|
|
|
24
24
|
* click, no status bar. Given an `href` the row *is* an `<a>`.
|
|
25
25
|
*
|
|
26
26
|
* @since 0.1.0
|
|
27
|
-
* @status
|
|
27
|
+
* @status stable
|
|
28
28
|
* @aliases TreeNode, Branch, Leaf
|
|
29
29
|
* @documentation https://fusion.dev/helix/components/tree
|
|
30
30
|
*
|
|
@@ -59,12 +59,23 @@ export declare class HelixHeadlessTreeItem extends HelixHeadlessTreeItem_base {
|
|
|
59
59
|
*/
|
|
60
60
|
href: string;
|
|
61
61
|
/**
|
|
62
|
-
* Depth from the root,
|
|
62
|
+
* Depth from the root, counted by the tree so indentation needs no CSS nesting.
|
|
63
63
|
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
64
|
+
* **Read rather than written, and no attribute at all.** The tree counts the
|
|
65
|
+
* items a row sits inside and assigns this on every sync, so a value declared
|
|
66
|
+
* here is overwritten before the first paint: measured at `level="2"` on three
|
|
67
|
+
* rows of a flat list, all three back to 1 with `--tree-level: 1` on every
|
|
68
|
+
* row. It carried an attribute and a shipped example setting it for as long as
|
|
69
|
+
* both existed, which is a depth a consumer could state and nothing would
|
|
70
|
+
* honor. Depth in this tree is where a row is, not what it claims: a branch's
|
|
71
|
+
* children go in its `children` slot, and that nesting is also what decides
|
|
72
|
+
* which rows a shut branch hides and which row the outward arrow moves to.
|
|
73
|
+
*
|
|
74
|
+
* Not reflected either. The tree assigns this after it upgrades, so an
|
|
75
|
+
* attribute here would be a change to markup the consumer rendered and
|
|
76
|
+
* hydration would report it. The indent it drives is written onto the row
|
|
77
|
+
* instead, inside the shadow root, which is not part of the tree React
|
|
78
|
+
* hydrates.
|
|
68
79
|
*/
|
|
69
80
|
level?: number;
|
|
70
81
|
/**
|
|
@@ -79,7 +90,7 @@ export declare class HelixHeadlessTreeItem extends HelixHeadlessTreeItem_base {
|
|
|
79
90
|
/**
|
|
80
91
|
* Whether this item is the current one.
|
|
81
92
|
*
|
|
82
|
-
* Not reflected, for the reason `level`
|
|
93
|
+
* Not reflected, for the reason `level` above gives in full: the tree assigns
|
|
83
94
|
* this after it upgrades, so the attribute would be a change to markup the
|
|
84
95
|
* consumer rendered and hydration would report it. Mirroring to
|
|
85
96
|
* `data-selected` on the host instead is the same fault under another name.
|
|
@@ -111,9 +122,11 @@ export declare class HelixHeadlessTreeItem extends HelixHeadlessTreeItem_base {
|
|
|
111
122
|
private branch;
|
|
112
123
|
protected firstUpdated(changed: PropertyValues): void;
|
|
113
124
|
/**
|
|
114
|
-
* @internal
|
|
115
|
-
*
|
|
116
|
-
*
|
|
125
|
+
* @internal Whether this row holds children, read by the tree, which moves
|
|
126
|
+
* and opens differently for a branch. Public rather than protected because
|
|
127
|
+
* the tree is another element and there is no other way across; not a
|
|
128
|
+
* consumer's to read, and there is nothing to set: it is what the `children`
|
|
129
|
+
* slot was given, which is the markup they already wrote.
|
|
117
130
|
*/
|
|
118
131
|
get isBranch(): boolean;
|
|
119
132
|
/**
|
|
@@ -148,7 +148,7 @@ __decorate([
|
|
|
148
148
|
property()
|
|
149
149
|
], HelixHeadlessTreeItem.prototype, "href", void 0);
|
|
150
150
|
__decorate([
|
|
151
|
-
property({ attribute:
|
|
151
|
+
property({ attribute: false, type: Number })
|
|
152
152
|
], HelixHeadlessTreeItem.prototype, "level", void 0);
|
|
153
153
|
__decorate([
|
|
154
154
|
property()
|
|
@@ -14,7 +14,7 @@ declare const HelixHeadlessTree_base: (new (...args: any[]) => import("@fusion.d
|
|
|
14
14
|
* does not learn about the styled one.
|
|
15
15
|
*
|
|
16
16
|
* @since 0.1.0
|
|
17
|
-
* @status
|
|
17
|
+
* @status stable
|
|
18
18
|
* @category navigation
|
|
19
19
|
* @aliases FileTree, Navigation tree
|
|
20
20
|
* @documentation https://fusion.dev/helix/components/tree
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fusion.dev/helix-headless",
|
|
3
3
|
"description": "Headless component tier. Structure, accessibility, state, and form participation. No styling.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.47.1",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Ross Sheppard <ross.sheppard@fusion.dev>",
|
|
7
7
|
"repository": {
|
|
@@ -46,14 +46,14 @@
|
|
|
46
46
|
},
|
|
47
47
|
"bugs": "https://github.com/project-fusion/fusion/issues",
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@fusion.dev/helix-core": "0.
|
|
50
|
-
"@fusion.dev/helix-icons": "0.
|
|
49
|
+
"@fusion.dev/helix-core": "0.47.1",
|
|
50
|
+
"@fusion.dev/helix-icons": "0.47.1",
|
|
51
51
|
"uqr": "^0.1.3"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@custom-elements-manifest/analyzer": "^0.11.0",
|
|
55
|
-
"@fusion.dev/helix-cem": "0.
|
|
56
|
-
"@fusion.dev/helix-testing": "0.
|
|
55
|
+
"@fusion.dev/helix-cem": "0.47.1",
|
|
56
|
+
"@fusion.dev/helix-testing": "0.47.1",
|
|
57
57
|
"@fusion.dev/scripts": "0.0.0-dev",
|
|
58
58
|
"@happy-dom/global-registrator": "^20.0.0",
|
|
59
59
|
"@lit-labs/ssr": "^4.1.0",
|