@fusion.dev/helix-headless 0.182.2 → 0.183.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 +143 -15
- package/dist/bar-chart/root/bar-chart-root.d.ts +1 -0
- package/dist/bar-chart/root/bar-chart-root.js +3 -2
- package/dist/heatmap/root/heatmap-root.d.ts +11 -1
- package/dist/heatmap/root/heatmap-root.js +17 -9
- package/dist/virtual-list/reorder/virtual-list-reorder.js +5 -1
- package/dist/virtual-list/root/virtual-list-root.d.ts +95 -17
- package/dist/virtual-list/root/virtual-list-root.js +123 -28
- package/lint.json +1 -1
- package/package.json +5 -5
- package/types/jsx.d.ts +108 -20
- package/types/vue.d.ts +11 -3
package/custom-elements.json
CHANGED
|
@@ -7132,6 +7132,10 @@
|
|
|
7132
7132
|
"description": "A far end below zero, whose far end is its bottom, or its inline start when the bars run across. Set together with `bar-end`.",
|
|
7133
7133
|
"name": "bar-end-negative"
|
|
7134
7134
|
},
|
|
7135
|
+
{
|
|
7136
|
+
"description": "A bar below zero, standing alone or any segment of a stack below it, whose base is its top, or its inline end when the bars run across. Set together with `bar`.",
|
|
7137
|
+
"name": "bar-negative"
|
|
7138
|
+
},
|
|
7135
7139
|
{
|
|
7136
7140
|
"description": "The far stop of a bar's gradient, where one is used.",
|
|
7137
7141
|
"name": "bar-wash-end"
|
|
@@ -80378,7 +80382,7 @@
|
|
|
80378
80382
|
},
|
|
80379
80383
|
"privacy": "private",
|
|
80380
80384
|
"default": "-1",
|
|
80381
|
-
"description": "Where a range taken in with Shift starts: the cell last pressed, or none."
|
|
80385
|
+
"description": "Where a range taken in with Shift starts: the row of the table whose cell\nwas last pressed, or none.\n\n**The row, and not the cell's place among those drawn.** A narrow strip\ndraws the newest whole columns, so a resize that drops or adds a column\nmoves every cell's place, and an anchor kept as a place started the next\nrange on another day."
|
|
80382
80386
|
},
|
|
80383
80387
|
{
|
|
80384
80388
|
"kind": "field",
|
|
@@ -80586,6 +80590,16 @@
|
|
|
80586
80590
|
"description": "The readings actually drawn, newest kept.\n\nThe tail rather than the head: a status strip that drops the newest days to\nkeep the oldest is answering a question nobody asked.",
|
|
80587
80591
|
"readonly": true
|
|
80588
80592
|
},
|
|
80593
|
+
{
|
|
80594
|
+
"kind": "field",
|
|
80595
|
+
"name": "dropped",
|
|
80596
|
+
"type": {
|
|
80597
|
+
"text": "number"
|
|
80598
|
+
},
|
|
80599
|
+
"privacy": "private",
|
|
80600
|
+
"description": "How many of the oldest rows a narrow strip leaves undrawn.",
|
|
80601
|
+
"readonly": true
|
|
80602
|
+
},
|
|
80589
80603
|
{
|
|
80590
80604
|
"kind": "field",
|
|
80591
80605
|
"name": "readings",
|
|
@@ -200068,7 +200082,7 @@
|
|
|
200068
200082
|
"declarations": [
|
|
200069
200083
|
{
|
|
200070
200084
|
"kind": "class",
|
|
200071
|
-
"description": "The items arrive as data, in one of two ways:\n\n- `items` takes an array. A framework sets it as a property, and React\n hydration keeps it.\n- `for` names a `<script type=\"application/json\">` that holds an array, which\n a server sends as markup.\n\nEach item is drawn into a row in one of two ways:\n\n- `renderItem` is a function from an item and its index to the row's\n content: a Lit template, a string, or a DOM node.\n- A `<template>` child defines one row. `data-field=\"name\"` fills an element\n with the item's `name` as text, and `data-field-href=\"url\"` writes the\n item's `url` into `href`, the same for any attribute. A field may be a path\n of keys, such as `author.name`.\n\nRows are your markup in the light DOM, so your stylesheet styles them.\n\n**A grid.** `columns` lays the items out that many to a line, as a grid of\nequal columns, and windows the set a line at a time, as React Aria's grid\nlayout does. Each item draws one element, a cell of the grid, and\n`estimate` is the height of a line. `min-column-width` lays out as many\ncolumns as fit the box instead, as React Aria's grid layout does with its\nsmallest item size, and follows the box as it resizes. `gap` spaces the rows, and the columns\nof a grid, by a number of pixels the list counts in each row's place.\n\n**Across.** `orientation=\"horizontal\"` lays the items out along a line and\nscrolls it sideways, as a strip of cards does, windowed the same way:\n`estimate` is then an item's width, and the box needs an inline size.\n\n**Sections.** `section-field` names the field of each item that says which\nsection it is in, and the list draws a header before each section's items,\nas React Aria's list box sections do. Each section is an element with the\n`group` role, named by its header, which is its first child and carries\n`data-header`, so your stylesheet styles it, such as with `position:\nsticky`. A section starts wherever the field changes, so give the items in\norder. The window counts the headers with the items, and a section the\nwindow starts inside is drawn with its header. `renderSection` draws a\nheader of your own.\n\n**Keyboard.** The list is one tab stop.\n\n| Key | What it does |\n|---|---|\n| Down, Up | Moves to the next or the previous item, or in a grid to the item in the same column on the next or the previous line. |\n| Right, Left | In a grid, moves to the next or the previous item along the line, the other way round on a right-to-left page. In a list that runs across, moves to the next or the previous item the same way, and Down and Up are left to the row. |\n| Home, End | Moves to the first or the last item. |\n| Page Down, Page Up | Moves by the number of items, or of lines in a grid, on screen. |\n| A letter or a word | Moves to the next item whose text starts with what you typed. |\n| Escape | Lets go of every chosen item, in a list with `selection-mode`. |\n| Alt with Up or Down | In a `reorderable` list, moves the item a place. Alt with Home or End moves it to either end. |\n| Tab | Moves into the focused row's own links and buttons, then out of the list. |\n\nAn item that is not drawn is scrolled into view and focused, so a keyboard\nreaches the whole set. The row a reader last focused keeps the tab stop and\nstays drawn when it scrolls away, so Tab and Shift+Tab come back to it, as\nReact Aria's collections do. In a list nobody has focused yet, the stop\nmoves to the first row on screen. Typing matches each item's\n`text-field`, which is the first `data-field` of the row template by default,\nor the item itself when it is a string or a number.\n\nEach row says its place in the whole set with `aria-posinset` and\n`aria-setsize`, so a screen reader says \"4,000 of 10,000\". The row holding\nfocus stays drawn when it scrolls out.\n\n**Selecting.** `selection-mode` makes the list a list box a reader chooses\nfrom: `single` selects one item and `multiple` any number. Space or a press\nselects an item, Shift with Space, an arrow, Home, End or a press takes in\nthe items from the last one chosen, and Control or Command with A selects\nthem all, in `multiple`. Escape lets go of every chosen item, and keeps the\nkey from the dialog or menu around the list while there was something to\nlet go of. `value` holds the chosen items' keys, separated by commas, in\nthe order of the set: `key-field` names each item's key, and a string or a\nnumber item is its own key. A change asks with `helix-before-change` and\ntells with `change`. Each row is an `option` marked `aria-selected`, so a\nrow's own links and buttons are not reached there: keep those to a list\nwithout `selection-mode`.\n\n`selection-behavior=\"replace\"` selects the item pressed alone, as a file\nlist does, and the arrow keys carry the selection with them. Control or\nCommand with a press or with Space adds or takes out one item, and with an\narrow moves without selecting.\n\n**Disabled items.** `disabled-keys` names items by their keys, separated by\ncommas. Their rows carry `aria-disabled`, the keys and typing pass over\nthem, and a press, Space, or Control with A does not select them.\n\n**Rows a stylesheet can tell apart.** A chosen row carries `data-selected`,\na disabled one `data-disabled`, as React Aria's rows do, and the row the\nkeys are on, which holds the tab stop, `data-active`, whether or not the\nlist has focus.\n\n**Loading more.** `helix-range-change` fires as the items on screen change,\nand `range` holds them. `helix-load-more` fires once a reader is within one\nscreen of the end, once for each length of the set: add to `items` and it can\nfire again. While you fetch, set `loading`: the list is busy, and a row after\nthe last item says \"Loading more\" (`loading-label`, or your own content in\nthe `loading` slot). `scrollToIndex` takes a reader to an item.\n\n**Moving items** is a separate import, `@fusion.dev/helix/virtual-list/reorder`,\nas React Aria's drag and drop is. With it imported, `reorderable` lets a\nreader move items in a list of one column without sections:\n\n- Alt with Up or Down moves the item the keys are on a place, and Alt with\n Home or End to either end, as the APG's rearrangeable listbox does.\n- A pointer drags a whole row. A press that does not travel is still a\n press. The list scrolls near an edge, and an item far down a long set is\n reached by dragging to the edge.\n- A drop sends `helix-before-reorder`, which you can refuse, and then\n `helix-reorder`, whose `keys` hold every item's key in the new order.\n **You move the items**: set `items` to them in that order. The keys stay\n on the item that moved.\n- Each move is said in a region screen readers announce. The row being\n dragged carries `data-dragging`, and the row a drop would land beside\n `data-drop-before` or `data-drop-after`.\n\n**An empty list.** Set `empty-label`, or put your own content in the `empty`\nslot, for a row shown when there are no items and none are loading, such as\n\"No messages yet\" and a link to write one. Without either, an empty list\nshows nothing, since a list whose items have not arrived yet has not said\nit has none.\n\nThe list takes the `empty` state while it has read its items and holds none,\nand the `loading` state while `loading` is set, so your stylesheet can\nchange the box around it for either. A list with no name is reported once\nin a development build. Name it with `label` or `aria-label`.\n\n**Row height.** Rows are placed by `estimate` until they are drawn. Then the\nlist reads the drawn rows' height once and places every row by it, so a\nwrong estimate still reaches the last item. Set `measured` for rows of\ndifferent heights. Once the list draws rows of different heights, such as\nrows that wrap on a narrow screen, it places each row by its own height\nwhether `measured` is set or not.\n\nThe list follows its source. A new `items` array, an edit to the script's\ntext, or a script replaced under the same id draws the new rows. A row that\nstays in view keeps its element as the list scrolls.\n\nThe viewport scrolls on this tier. It carries `data-scroller`, and `core`\nships `[data-scroller] { overflow: auto }` into every shadow root, so\n`scrollTop` works with no stylesheet. You still need to set a block size.",
|
|
200085
|
+
"description": "The items arrive as data, in one of two ways:\n\n- `items` takes an array. A framework sets it as a property, and React\n hydration keeps it.\n- `for` names a `<script type=\"application/json\">` that holds an array, which\n a server sends as markup.\n\nEach item is drawn into a row in one of two ways:\n\n- `renderItem` is a function from an item and its index to the row's\n content: a Lit template, a string, or a DOM node.\n- A `<template>` child defines one row. `data-field=\"name\"` fills an element\n with the item's `name` as text, and `data-field-href=\"url\"` writes the\n item's `url` into `href`, the same for any attribute. A field may be a path\n of keys, such as `author.name`.\n\nRows are your markup in the light DOM, so your stylesheet styles them.\n\n**A grid.** `columns` lays the items out that many to a line, as a grid of\nequal columns, and windows the set a line at a time, as React Aria's grid\nlayout does. Each item draws one element, a cell of the grid, and\n`estimate` is the height of a line. `min-column-width` lays out as many\ncolumns as fit the box instead, as React Aria's grid layout does with its\nsmallest item size, and follows the box as it resizes. `gap` spaces the rows, and the columns\nof a grid, by a number of pixels the list counts in each row's place.\n\nA grid without `selection-mode` is a grid to a reader, as the APG's grid\nand React Aria's grid list are: the box is a `grid` with `aria-rowcount`\nand `aria-colcount`, each line drawn is a `row` with `aria-rowindex`, and\neach item a `gridcell` with `aria-colindex`. Each line is a slot of the\nlist's own, so your rows stay its children: give an item one element. With\n`selection-mode` it stays a list box of options, as React Aria's list box\nin a grid layout does.\n\n**A waterfall.** `layout=\"waterfall\"` puts each item, in the order of the\nset, under the column that ends highest so far, the leftmost of a tie, as a\nwall of photos of different heights is, and as React Aria's waterfall\nlayout and TanStack Virtual's lanes do. `columns`, or `min-column-width`,\nsays how many columns. Every item is measured, at the width of its column,\nand placed at its column and its height, so items of any height leave no\nholes. The list draws the items that reach into the box, and the item\nholding focus. A reader hears a list, or a list box, in the order of the\nset, which is also the order Tab and a screen reader's own keys take.\n\nIn a waterfall, Down and Up move along the column to the next or the\nprevious item in it, Right and Left move to the next or the previous\ncolumn, to the item there that sits beside this one the most, or the\nnearest above where none does, and Page Down and Page Up move a box down\nor up the column. Home and End go to the first and the last item of the\nset, and Shift with a key takes in the items between in the order of the\nset.\n\n**Across.** `orientation=\"horizontal\"` lays the items out along a line and\nscrolls it sideways, as a strip of cards does, windowed the same way:\n`estimate` is then an item's width, and the box needs an inline size.\n\n**Sections.** `section-field` names the field of each item that says which\nsection it is in, and the list draws a header before each section's items,\nas React Aria's list box sections do. Each section is an element with the\n`group` role, named by its header, which is its first child and carries\n`data-header`, so your stylesheet styles it, such as with `position:\nsticky`. A section starts wherever the field changes, so give the items in\norder. The window counts the headers with the items, and a section the\nwindow starts inside is drawn with its header. `renderSection` draws a\nheader of your own.\n\n**Keyboard.** The list is one tab stop.\n\n| Key | What it does |\n|---|---|\n| Down, Up | Moves to the next or the previous item, or in a grid to the item in the same column on the next or the previous line, or in a waterfall to the next or the previous item down the same column. |\n| Right, Left | In a grid, moves to the next or the previous item along the line, the other way round on a right-to-left page. In a waterfall, moves to the item beside in the next or the previous column. In a list that runs across, moves to the next or the previous item the same way, and Down and Up are left to the row. |\n| Home, End | Moves to the first or the last item. In a grid without `selection-mode`, to the first or the last item of the line. |\n| Control or Command with Home or End | In a grid without `selection-mode`, moves to the first or the last item. |\n| Page Down, Page Up | Moves by the number of items, or of lines in a grid, on screen, or in a waterfall a box down or up the column. |\n| A letter or a word | Moves to the next item whose text starts with what you typed. |\n| Escape | Lets go of every chosen item, in a list with `selection-mode`. |\n| Alt with Up or Down | In a `reorderable` list, moves the item a place. Alt with Home or End moves it to either end. |\n| Tab | Moves into the focused row's own links and buttons, then out of the list. |\n\nAn item that is not drawn is scrolled into view and focused, so a keyboard\nreaches the whole set. The row a reader last focused keeps the tab stop and\nstays drawn when it scrolls away, so Tab and Shift+Tab come back to it, as\nReact Aria's collections do. In a list nobody has focused yet, the stop\nmoves to the first row on screen. Typing matches each item's\n`text-field`, which is the first `data-field` of the row template by default,\nor the item itself when it is a string or a number.\n\nEach row says its place in the whole set with `aria-posinset` and\n`aria-setsize`, so a screen reader says \"4,000 of 10,000\", and each cell of\na grid its line and its column. The row holding focus stays drawn when it\nscrolls out.\n\n**Selecting.** `selection-mode` makes the list a list box a reader chooses\nfrom: `single` selects one item and `multiple` any number. Space or a press\nselects an item, Shift with Space, an arrow, Home, End or a press takes in\nthe items from the last one chosen, and Control or Command with A selects\nthem all, in `multiple`. Escape lets go of every chosen item, and keeps the\nkey from the dialog or menu around the list while there was something to\nlet go of. `value` holds the chosen items' keys, separated by commas, in\nthe order of the set: `key-field` names each item's key, and a string or a\nnumber item is its own key. A change asks with `helix-before-change` and\ntells with `change`. Each row is an `option` marked `aria-selected`, so a\nrow's own links and buttons are not reached there: keep those to a list\nwithout `selection-mode`.\n\n`selection-behavior=\"replace\"` selects the item pressed alone, as a file\nlist does, and the arrow keys carry the selection with them. Control or\nCommand with a press or with Space adds or takes out one item, and with an\narrow moves without selecting.\n\n**Disabled items.** `disabled-keys` names items by their keys, separated by\ncommas. Their rows carry `aria-disabled`, the keys and typing pass over\nthem, and a press, Space, or Control with A does not select them.\n\n**Rows a stylesheet can tell apart.** A chosen row carries `data-selected`,\na disabled one `data-disabled`, as React Aria's rows do, and the row the\nkeys are on, which holds the tab stop, `data-active`, whether or not the\nlist has focus.\n\n**Loading more.** `helix-range-change` fires as the items on screen change,\nand `range` holds them. `helix-load-more` fires once a reader is within one\nscreen of the end, once for each length of the set: add to `items` and it can\nfire again. While you fetch, set `loading`: the list is busy, and a row after\nthe last item says \"Loading more\" (`loading-label`, or your own content in\nthe `loading` slot). `scrollToIndex` takes a reader to an item.\n\n**Moving items** is a separate import, `@fusion.dev/helix/virtual-list/reorder`,\nas React Aria's drag and drop is. With it imported, `reorderable` lets a\nreader move items in a list of one column without sections:\n\n- Alt with Up or Down moves the item the keys are on a place, and Alt with\n Home or End to either end, as the APG's rearrangeable listbox does.\n- A pointer drags a whole row. A press that does not travel is still a\n press. The list scrolls near an edge, and an item far down a long set is\n reached by dragging to the edge.\n- A drop sends `helix-before-reorder`, which you can refuse, and then\n `helix-reorder`, whose `keys` hold every item's key in the new order.\n **You move the items**: set `items` to them in that order. The keys stay\n on the item that moved.\n- Each move is said in a region screen readers announce. The row being\n dragged carries `data-dragging`, and the row a drop would land beside\n `data-drop-before` or `data-drop-after`.\n\n**An empty list.** Set `empty-label`, or put your own content in the `empty`\nslot, for a row shown when there are no items and none are loading, such as\n\"No messages yet\" and a link to write one. Without either, an empty list\nshows nothing, since a list whose items have not arrived yet has not said\nit has none.\n\nThe list takes the `empty` state while it has read its items and holds none,\nand the `loading` state while `loading` is set, so your stylesheet can\nchange the box around it for either. A list with no name is reported once\nin a development build. Name it with `label` or `aria-label`.\n\n**Row height.** Rows are placed by `estimate` until they are drawn. Then the\nlist reads the drawn rows' height once and places every row by it, so a\nwrong estimate still reaches the last item. Set `measured` for rows of\ndifferent heights. Once the list draws rows of different heights, such as\nrows that wrap on a narrow screen, it places each row by its own height\nwhether `measured` is set or not.\n\nThe list follows its source. A new `items` array, an edit to the script's\ntext, or a script replaced under the same id draws the new rows. A row that\nstays in view keeps its element as the list scrolls.\n\nThe viewport scrolls on this tier. It carries `data-scroller`, and `core`\nships `[data-scroller] { overflow: auto }` into every shadow root, so\n`scrollTop` works with no stylesheet. You still need to set a block size.",
|
|
200072
200086
|
"name": "HelixHeadlessVirtualList",
|
|
200073
200087
|
"cssParts": [
|
|
200074
200088
|
{
|
|
@@ -200220,6 +200234,16 @@
|
|
|
200220
200234
|
"description": "The list's name, read by screen readers, because only some of its rows\nare rendered at a time.\n\nAn `aria-label` or `aria-labelledby` on the host names the list too, and\nwins over this.",
|
|
200221
200235
|
"attribute": "label"
|
|
200222
200236
|
},
|
|
200237
|
+
{
|
|
200238
|
+
"kind": "field",
|
|
200239
|
+
"name": "layout",
|
|
200240
|
+
"type": {
|
|
200241
|
+
"text": "'grid' | 'waterfall'"
|
|
200242
|
+
},
|
|
200243
|
+
"default": "'grid'",
|
|
200244
|
+
"description": "How items of more than one column are laid out. `grid`, the default, puts\nthem in lines of equal columns. `waterfall` puts each item, in the order\nof the set, under the column that ends highest, as a wall of photos of\ndifferent heights is: `columns`, or `min-column-width`, says how many\ncolumns. Rows of a waterfall are measured, and Up and Down move along a\ncolumn.",
|
|
200245
|
+
"attribute": "layout"
|
|
200246
|
+
},
|
|
200223
200247
|
{
|
|
200224
200248
|
"kind": "field",
|
|
200225
200249
|
"name": "loading",
|
|
@@ -200270,7 +200294,7 @@
|
|
|
200270
200294
|
"text": "'horizontal' | 'vertical'"
|
|
200271
200295
|
},
|
|
200272
200296
|
"default": "'vertical'",
|
|
200273
|
-
"description": "Which way the list runs. `horizontal` lays the items out along a line\nand scrolls it sideways: Left and Right move between items, the other\nway round on a right-to-left page, and `estimate` is an item's width. A\ngrid always
|
|
200297
|
+
"description": "Which way the list runs. `horizontal` lays the items out along a line\nand scrolls it sideways: Left and Right move between items, the other\nway round on a right-to-left page, and `estimate` is an item's width. A\ngrid and a waterfall always run down.",
|
|
200274
200298
|
"attribute": "orientation"
|
|
200275
200299
|
},
|
|
200276
200300
|
{
|
|
@@ -200296,7 +200320,7 @@
|
|
|
200296
200320
|
"text": "boolean"
|
|
200297
200321
|
},
|
|
200298
200322
|
"default": "false",
|
|
200299
|
-
"description": "Lets a reader move items, once `@fusion.dev/helix/virtual-list/reorder`\n(or `@fusion.dev/helix-headless/virtual-list/reorder`) is imported: Alt\nwith an arrow moves the row the keys are on, and a pointer drags a row.\nThe list moves no item itself: you move your `items` on `helix-reorder`.\nWithout that import it does nothing, so a list that never moves items\ncarries none of the code. A list of one column, without sections.",
|
|
200323
|
+
"description": "Lets a reader move items, once `@fusion.dev/helix/virtual-list/reorder`\n(or `@fusion.dev/helix-headless/virtual-list/reorder`) is imported: Alt\nwith an arrow moves the row the keys are on, and a pointer drags a row.\nThe list moves no item itself: you move your `items` on `helix-reorder`.\nWithout that import it does nothing, so a list that never moves items\ncarries none of the code. A list of one column, without sections or a\nwaterfall.",
|
|
200300
200324
|
"attribute": "reorderable"
|
|
200301
200325
|
},
|
|
200302
200326
|
{
|
|
@@ -200481,7 +200505,7 @@
|
|
|
200481
200505
|
"name": "virtualize",
|
|
200482
200506
|
"privacy": "private",
|
|
200483
200507
|
"readonly": true,
|
|
200484
|
-
"default": "new VirtualizeController(this, { container: () => this.partNamed('viewport'), count: () => this.sections ? this.data.length + this.sections.starts.length : Math.ceil(this.data.length / this.across), estimate: () => this.estimate, gap: () => this.space, horizontal: () => this.horizontal, measured: () => this.measured, rows: () => this.lines(), })"
|
|
200508
|
+
"default": "new VirtualizeController(this, { container: () => this.partNamed('viewport'), count: () => this.sections ? this.data.length + this.sections.starts.length : Math.ceil(this.data.length / this.across), estimate: () => this.estimate, gap: () => this.space, horizontal: () => this.horizontal, measured: () => this.measured, rows: () => this.lines(), waterfall: () => { this.lanes.lanes = this.columnCount return this.waterfall ? this.lanes : undefined }, })"
|
|
200485
200509
|
},
|
|
200486
200510
|
{
|
|
200487
200511
|
"kind": "field",
|
|
@@ -200502,6 +200526,34 @@
|
|
|
200502
200526
|
"description": "The gap in pixels, none where it is not a positive number.",
|
|
200503
200527
|
"readonly": true
|
|
200504
200528
|
},
|
|
200529
|
+
{
|
|
200530
|
+
"kind": "field",
|
|
200531
|
+
"name": "lanes",
|
|
200532
|
+
"privacy": "private",
|
|
200533
|
+
"readonly": true,
|
|
200534
|
+
"default": "new Waterfall()",
|
|
200535
|
+
"description": "Where each item of a waterfall stands, which the controller places."
|
|
200536
|
+
},
|
|
200537
|
+
{
|
|
200538
|
+
"kind": "field",
|
|
200539
|
+
"name": "waterfall",
|
|
200540
|
+
"type": {
|
|
200541
|
+
"text": "boolean"
|
|
200542
|
+
},
|
|
200543
|
+
"privacy": "private",
|
|
200544
|
+
"description": "Whether the items are laid out as a waterfall, each down a column.",
|
|
200545
|
+
"readonly": true
|
|
200546
|
+
},
|
|
200547
|
+
{
|
|
200548
|
+
"kind": "field",
|
|
200549
|
+
"name": "lined",
|
|
200550
|
+
"type": {
|
|
200551
|
+
"text": "boolean"
|
|
200552
|
+
},
|
|
200553
|
+
"privacy": "private",
|
|
200554
|
+
"description": "Whether the list is a grid a reader reads, and not a list box: lines of\ncolumns with no `selection-mode`, which are `grid`, `row` and `gridcell`\nto a reader, as the APG's grid and React Aria's grid list are.",
|
|
200555
|
+
"readonly": true
|
|
200556
|
+
},
|
|
200505
200557
|
{
|
|
200506
200558
|
"kind": "field",
|
|
200507
200559
|
"name": "across",
|
|
@@ -200509,7 +200561,17 @@
|
|
|
200509
200561
|
"text": "number"
|
|
200510
200562
|
},
|
|
200511
200563
|
"privacy": "private",
|
|
200512
|
-
"description": "How many items a line holds
|
|
200564
|
+
"description": "How many items a line holds, which a waterfall draws one at a time: its\ncolumns are not lines.",
|
|
200565
|
+
"readonly": true
|
|
200566
|
+
},
|
|
200567
|
+
{
|
|
200568
|
+
"kind": "field",
|
|
200569
|
+
"name": "columnCount",
|
|
200570
|
+
"type": {
|
|
200571
|
+
"text": "number"
|
|
200572
|
+
},
|
|
200573
|
+
"privacy": "private",
|
|
200574
|
+
"description": "How many columns there are: as many as fit at `min-column-width` where\nit is set and the box has a width, and `columns` otherwise, at least one.",
|
|
200513
200575
|
"readonly": true
|
|
200514
200576
|
},
|
|
200515
200577
|
{
|
|
@@ -200535,11 +200597,11 @@
|
|
|
200535
200597
|
"kind": "field",
|
|
200536
200598
|
"name": "measuredAcross",
|
|
200537
200599
|
"type": {
|
|
200538
|
-
"text": "number"
|
|
200600
|
+
"text": "number | string"
|
|
200539
200601
|
},
|
|
200540
200602
|
"privacy": "private",
|
|
200541
200603
|
"default": "1",
|
|
200542
|
-
"description": "The items to a line the measurements were taken at."
|
|
200604
|
+
"description": "The items to a line the measurements were taken at, or a waterfall's columns and width."
|
|
200543
200605
|
},
|
|
200544
200606
|
{
|
|
200545
200607
|
"kind": "method",
|
|
@@ -200550,7 +200612,7 @@
|
|
|
200550
200612
|
"text": "void"
|
|
200551
200613
|
}
|
|
200552
200614
|
},
|
|
200553
|
-
"description": "Watches the box for its width while `min-column-width` asks for it."
|
|
200615
|
+
"description": "Watches the box for its width while `min-column-width` asks for it, or a\nwaterfall, whose items are as tall as their width makes them."
|
|
200554
200616
|
},
|
|
200555
200617
|
{
|
|
200556
200618
|
"kind": "method",
|
|
@@ -200597,7 +200659,7 @@
|
|
|
200597
200659
|
"text": "boolean"
|
|
200598
200660
|
},
|
|
200599
200661
|
"privacy": "private",
|
|
200600
|
-
"description": "Whether the list runs across, which a grid never
|
|
200662
|
+
"description": "Whether the list runs across, which a grid and a waterfall never do.",
|
|
200601
200663
|
"readonly": true
|
|
200602
200664
|
},
|
|
200603
200665
|
{
|
|
@@ -200861,6 +200923,43 @@
|
|
|
200861
200923
|
"readonly": true,
|
|
200862
200924
|
"description": "Moves between items with the keys `stepIndex` names.\n\nOnly from a row itself. A key pressed in a row's own link, button or field\nis that control's, so a field in a row keeps its arrows."
|
|
200863
200925
|
},
|
|
200926
|
+
{
|
|
200927
|
+
"kind": "method",
|
|
200928
|
+
"name": "inWaterfall",
|
|
200929
|
+
"privacy": "private",
|
|
200930
|
+
"return": {
|
|
200931
|
+
"type": {
|
|
200932
|
+
"text": "number | undefined"
|
|
200933
|
+
}
|
|
200934
|
+
},
|
|
200935
|
+
"parameters": [
|
|
200936
|
+
{
|
|
200937
|
+
"name": "key",
|
|
200938
|
+
"type": {
|
|
200939
|
+
"text": "string"
|
|
200940
|
+
}
|
|
200941
|
+
},
|
|
200942
|
+
{
|
|
200943
|
+
"name": "at",
|
|
200944
|
+
"type": {
|
|
200945
|
+
"text": "number"
|
|
200946
|
+
}
|
|
200947
|
+
},
|
|
200948
|
+
{
|
|
200949
|
+
"name": "count",
|
|
200950
|
+
"type": {
|
|
200951
|
+
"text": "number"
|
|
200952
|
+
}
|
|
200953
|
+
},
|
|
200954
|
+
{
|
|
200955
|
+
"name": "forward",
|
|
200956
|
+
"type": {
|
|
200957
|
+
"text": "string"
|
|
200958
|
+
}
|
|
200959
|
+
}
|
|
200960
|
+
],
|
|
200961
|
+
"description": "Where a key goes in a waterfall, through the columns `Waterfall.step`\nreads: along the column for Down, Up, Page Down and Page Up, and to the\nitem beside in the next column or the one before for the keys along the\nline, the other way round on a right-to-left page. Past a disabled item,\non the same way."
|
|
200962
|
+
},
|
|
200864
200963
|
{
|
|
200865
200964
|
"kind": "method",
|
|
200866
200965
|
"name": "keyAt",
|
|
@@ -201052,7 +201151,7 @@
|
|
|
201052
201151
|
}
|
|
201053
201152
|
}
|
|
201054
201153
|
],
|
|
201055
|
-
"description": "Writes a row's role, and whether it is chosen in a list that selects:\n`option` with `aria-selected` there, and `listitem
|
|
201154
|
+
"description": "Writes a row's role, and whether it is chosen in a list that selects:\n`option` with `aria-selected` there, `gridcell` in a grid, and `listitem`\notherwise, and `aria-disabled` on an item `disabled-keys` names. Every\npass, since a choice changes no row's content.\n\nIts place too: `aria-posinset` and `aria-setsize` in a list, and in a\ngrid its column, with the line's `row` given by the slot it is drawn in.\n\n`data-selected` and `data-disabled` say the same to a stylesheet, as\nReact Aria's rows do, so one rule reads the same in either kind of list."
|
|
201056
201155
|
},
|
|
201057
201156
|
{
|
|
201058
201157
|
"kind": "method",
|
|
@@ -201077,7 +201176,7 @@
|
|
|
201077
201176
|
}
|
|
201078
201177
|
}
|
|
201079
201178
|
],
|
|
201080
|
-
"description": "Writes a row
|
|
201179
|
+
"description": "Writes which item a row drew, for the controller to measure it against:\nthe real index, the same one `aria-posinset` carries one higher.\n\n`mark` writes the place a reader hears from it, the real index and the\nreal total, not the position in the window. A reader arrowing through\nthis should hear where they are in the set."
|
|
201081
201180
|
},
|
|
201082
201181
|
{
|
|
201083
201182
|
"kind": "method",
|
|
@@ -201149,6 +201248,26 @@
|
|
|
201149
201248
|
"privacy": "private",
|
|
201150
201249
|
"description": "The sections the rows were last placed in."
|
|
201151
201250
|
},
|
|
201251
|
+
{
|
|
201252
|
+
"kind": "field",
|
|
201253
|
+
"name": "placedWaterfall",
|
|
201254
|
+
"type": {
|
|
201255
|
+
"text": "boolean"
|
|
201256
|
+
},
|
|
201257
|
+
"privacy": "private",
|
|
201258
|
+
"default": "false",
|
|
201259
|
+
"description": "Whether the rows were last placed in a waterfall."
|
|
201260
|
+
},
|
|
201261
|
+
{
|
|
201262
|
+
"kind": "field",
|
|
201263
|
+
"name": "drawnLines",
|
|
201264
|
+
"type": {
|
|
201265
|
+
"text": "number[]"
|
|
201266
|
+
},
|
|
201267
|
+
"privacy": "private",
|
|
201268
|
+
"default": "[]",
|
|
201269
|
+
"description": "The lines of a grid drawn on the last pass, each a `row` the render draws a slot in."
|
|
201270
|
+
},
|
|
201152
201271
|
{
|
|
201153
201272
|
"kind": "field",
|
|
201154
201273
|
"name": "headedBy",
|
|
@@ -201676,6 +201795,15 @@
|
|
|
201676
201795
|
"description": "The list's name, read by screen readers, because only some of its rows\nare rendered at a time.\n\nAn `aria-label` or `aria-labelledby` on the host names the list too, and\nwins over this.",
|
|
201677
201796
|
"fieldName": "label"
|
|
201678
201797
|
},
|
|
201798
|
+
{
|
|
201799
|
+
"name": "layout",
|
|
201800
|
+
"type": {
|
|
201801
|
+
"text": "'grid' | 'waterfall'"
|
|
201802
|
+
},
|
|
201803
|
+
"default": "'grid'",
|
|
201804
|
+
"description": "How items of more than one column are laid out. `grid`, the default, puts\nthem in lines of equal columns. `waterfall` puts each item, in the order\nof the set, under the column that ends highest, as a wall of photos of\ndifferent heights is: `columns`, or `min-column-width`, says how many\ncolumns. Rows of a waterfall are measured, and Up and Down move along a\ncolumn.",
|
|
201805
|
+
"fieldName": "layout"
|
|
201806
|
+
},
|
|
201679
201807
|
{
|
|
201680
201808
|
"name": "loading",
|
|
201681
201809
|
"type": {
|
|
@@ -201718,7 +201846,7 @@
|
|
|
201718
201846
|
"text": "'horizontal' | 'vertical'"
|
|
201719
201847
|
},
|
|
201720
201848
|
"default": "'vertical'",
|
|
201721
|
-
"description": "Which way the list runs. `horizontal` lays the items out along a line\nand scrolls it sideways: Left and Right move between items, the other\nway round on a right-to-left page, and `estimate` is an item's width. A\ngrid always
|
|
201849
|
+
"description": "Which way the list runs. `horizontal` lays the items out along a line\nand scrolls it sideways: Left and Right move between items, the other\nway round on a right-to-left page, and `estimate` is an item's width. A\ngrid and a waterfall always run down.",
|
|
201722
201850
|
"fieldName": "orientation"
|
|
201723
201851
|
},
|
|
201724
201852
|
{
|
|
@@ -201727,7 +201855,7 @@
|
|
|
201727
201855
|
"text": "boolean"
|
|
201728
201856
|
},
|
|
201729
201857
|
"default": "false",
|
|
201730
|
-
"description": "Lets a reader move items, once `@fusion.dev/helix/virtual-list/reorder`\n(or `@fusion.dev/helix-headless/virtual-list/reorder`) is imported: Alt\nwith an arrow moves the row the keys are on, and a pointer drags a row.\nThe list moves no item itself: you move your `items` on `helix-reorder`.\nWithout that import it does nothing, so a list that never moves items\ncarries none of the code. A list of one column, without sections.",
|
|
201858
|
+
"description": "Lets a reader move items, once `@fusion.dev/helix/virtual-list/reorder`\n(or `@fusion.dev/helix-headless/virtual-list/reorder`) is imported: Alt\nwith an arrow moves the row the keys are on, and a pointer drags a row.\nThe list moves no item itself: you move your `items` on `helix-reorder`.\nWithout that import it does nothing, so a list that never moves items\ncarries none of the code. A list of one column, without sections or a\nwaterfall.",
|
|
201731
201859
|
"fieldName": "reorderable"
|
|
201732
201860
|
},
|
|
201733
201861
|
{
|
|
@@ -202020,6 +202148,6 @@
|
|
|
202020
202148
|
],
|
|
202021
202149
|
"helix": {
|
|
202022
202150
|
"package": "@fusion.dev/helix-headless",
|
|
202023
|
-
"version": "0.
|
|
202151
|
+
"version": "0.183.0"
|
|
202024
202152
|
}
|
|
202025
202153
|
}
|
|
@@ -80,6 +80,7 @@ declare const HelixHeadlessBarChart_base: typeof HelixElement & (new (...args: a
|
|
|
80
80
|
* @csspart bar - One column. Under `stacked`, one segment of a category's column.
|
|
81
81
|
* @csspart bar-end - The bar at a column's far end, the end away from zero, which is the end to round. A column standing alone is its own far end. Under `stacked`, the last positive segment above zero and the last negative one below it. Its `data-end` is `positive` or `negative`. A blank or a zero is never the end. Set together with `bar`.
|
|
82
82
|
* @csspart bar-end-negative - A far end below zero, whose far end is its bottom, or its inline start when the bars run across. Set together with `bar-end`.
|
|
83
|
+
* @csspart bar-negative - A bar below zero, standing alone or any segment of a stack below it, whose base is its top, or its inline end when the bars run across. Set together with `bar`.
|
|
83
84
|
* @csspart bar-wash-end - The far stop of a bar's gradient, where one is used.
|
|
84
85
|
* @csspart bar-wash-start - The stop of a bar's gradient at its base.
|
|
85
86
|
* @csspart baseline - The line the columns stand on.
|
|
@@ -120,6 +120,7 @@ let HelixHeadlessBarChart = class HelixHeadlessBarChart extends MixinChartStatus
|
|
|
120
120
|
? `--chart-series: var(--bar-chart-tone-${ink}, var(--chart-series-${seriesIndex(tone)})); --chart-bar-wash: url(#helix-bar-wash-tone-${ink})`
|
|
121
121
|
: `--chart-series: var(--chart-series-${seriesIndex(tone)}); --chart-bar-wash: url(#helix-bar-wash-${seriesIndex(tone)})`;
|
|
122
122
|
const below = end === 'negative';
|
|
123
|
+
const sinks = value < (from ?? 0);
|
|
123
124
|
return sideways
|
|
124
125
|
? svg `<rect
|
|
125
126
|
data-end=${end ?? nothing}
|
|
@@ -127,7 +128,7 @@ let HelixHeadlessBarChart = class HelixHeadlessBarChart extends MixinChartStatus
|
|
|
127
128
|
data-tone=${ink ?? nothing}
|
|
128
129
|
height=${thickness}
|
|
129
130
|
style=${paint}
|
|
130
|
-
part="bar${end ? ' bar-end' : ''}${below ? ' bar-end-negative' : ''}"
|
|
131
|
+
part="bar${sinks ? ' bar-negative' : ''}${end ? ' bar-end' : ''}${below ? ' bar-end-negative' : ''}"
|
|
131
132
|
width=${size}
|
|
132
133
|
x=${along}
|
|
133
134
|
y=${across}
|
|
@@ -138,7 +139,7 @@ let HelixHeadlessBarChart = class HelixHeadlessBarChart extends MixinChartStatus
|
|
|
138
139
|
data-tone=${ink ?? nothing}
|
|
139
140
|
height=${size}
|
|
140
141
|
style=${paint}
|
|
141
|
-
part="bar${end ? ' bar-end' : ''}${below ? ' bar-end-negative' : ''}"
|
|
142
|
+
part="bar${sinks ? ' bar-negative' : ''}${end ? ' bar-end' : ''}${below ? ' bar-end-negative' : ''}"
|
|
142
143
|
width=${thickness}
|
|
143
144
|
x=${across}
|
|
144
145
|
y=${along}
|
|
@@ -333,7 +333,15 @@ export declare class HelixHeadlessHeatmap extends HelixHeadlessHeatmap_base {
|
|
|
333
333
|
protected readonly aria: AriaForwardController;
|
|
334
334
|
private observer;
|
|
335
335
|
private announced;
|
|
336
|
-
/**
|
|
336
|
+
/**
|
|
337
|
+
* Where a range taken in with Shift starts: the row of the table whose cell
|
|
338
|
+
* was last pressed, or none.
|
|
339
|
+
*
|
|
340
|
+
* **The row, and not the cell's place among those drawn.** A narrow strip
|
|
341
|
+
* draws the newest whole columns, so a resize that drops or adds a column
|
|
342
|
+
* moves every cell's place, and an anchor kept as a place started the next
|
|
343
|
+
* range on another day.
|
|
344
|
+
*/
|
|
337
345
|
private anchor;
|
|
338
346
|
/** The cell the keys rested on before the key now being handled moved them. */
|
|
339
347
|
private left;
|
|
@@ -436,6 +444,8 @@ export declare class HelixHeadlessHeatmap extends HelixHeadlessHeatmap_base {
|
|
|
436
444
|
* keep the oldest is answering a question nobody asked.
|
|
437
445
|
*/
|
|
438
446
|
private get drawn();
|
|
447
|
+
/** How many of the oldest rows a narrow strip leaves undrawn. */
|
|
448
|
+
private get dropped();
|
|
439
449
|
/**
|
|
440
450
|
* The number of cells drawn, which the keys walk.
|
|
441
451
|
*
|
|
@@ -54,8 +54,9 @@ let HelixHeadlessHeatmap = class HelixHeadlessHeatmap extends MixinChartStatus(M
|
|
|
54
54
|
this.stretch(at);
|
|
55
55
|
return;
|
|
56
56
|
}
|
|
57
|
-
const keys = this.keysOf(this.
|
|
58
|
-
const
|
|
57
|
+
const keys = this.keysOf(this.points);
|
|
58
|
+
const from = keys[this.anchor] === undefined ? -1 : this.anchor;
|
|
59
|
+
const added = rangeAdd(commaList(this.value), keys, from, this.dropped + at);
|
|
59
60
|
if (added) {
|
|
60
61
|
this.choose(added.join(', '));
|
|
61
62
|
}
|
|
@@ -125,21 +126,25 @@ let HelixHeadlessHeatmap = class HelixHeadlessHeatmap extends MixinChartStatus(M
|
|
|
125
126
|
if (!mode || key === undefined || key === '') {
|
|
126
127
|
return;
|
|
127
128
|
}
|
|
128
|
-
this.anchor = index;
|
|
129
|
+
this.anchor = this.dropped + index;
|
|
129
130
|
this.base = undefined;
|
|
130
131
|
this.choose(pressedValue(mode, this.value, key));
|
|
131
132
|
}
|
|
132
133
|
stretch(to) {
|
|
133
|
-
const
|
|
134
|
-
|
|
135
|
-
|
|
134
|
+
const all = this.keysOf(this.points);
|
|
135
|
+
const dropped = this.dropped;
|
|
136
|
+
if (all[this.anchor] === undefined) {
|
|
137
|
+
this.anchor = dropped + (this.left < 0 ? to : this.left);
|
|
136
138
|
}
|
|
137
139
|
if (this.base === undefined || this.value !== this.shaped) {
|
|
138
|
-
const corner =
|
|
140
|
+
const corner = all[this.anchor];
|
|
139
141
|
this.base = commaList(this.value).filter((one) => one !== corner);
|
|
140
142
|
}
|
|
141
|
-
const
|
|
142
|
-
const
|
|
143
|
+
const rows = this.rowCount;
|
|
144
|
+
const shift = (rows - (dropped % rows)) % rows;
|
|
145
|
+
const taken = rectangleOf(all.length + shift, rows, this.anchor + shift, dropped + to + shift)
|
|
146
|
+
.filter((at) => at >= shift)
|
|
147
|
+
.map((at) => all[at - shift] ?? '');
|
|
143
148
|
this.choose(inSequence([...this.base, ...taken].filter(Boolean), all).join(', '));
|
|
144
149
|
this.shaped = this.value;
|
|
145
150
|
}
|
|
@@ -182,6 +187,9 @@ let HelixHeadlessHeatmap = class HelixHeadlessHeatmap extends MixinChartStatus(M
|
|
|
182
187
|
const all = this.points;
|
|
183
188
|
return all.slice(Math.max(0, all.length - this.room));
|
|
184
189
|
}
|
|
190
|
+
get dropped() {
|
|
191
|
+
return Math.max(0, this.points.length - this.room);
|
|
192
|
+
}
|
|
185
193
|
get readings() {
|
|
186
194
|
return this.drawn.length;
|
|
187
195
|
}
|
|
@@ -57,7 +57,11 @@ export class VirtualListReorderController {
|
|
|
57
57
|
}
|
|
58
58
|
get enabled() {
|
|
59
59
|
const host = this.host;
|
|
60
|
-
return (host.reorderable &&
|
|
60
|
+
return (host.reorderable &&
|
|
61
|
+
host.columns <= 1 &&
|
|
62
|
+
host.minColumnWidth <= 0 &&
|
|
63
|
+
host.sectionField === '' &&
|
|
64
|
+
host.layout !== 'waterfall');
|
|
61
65
|
}
|
|
62
66
|
hostUpdated() {
|
|
63
67
|
queueMicrotask(() => this.mark());
|