@fusion.dev/helix-headless 0.5.0 → 0.7.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.
@@ -17182,6 +17182,14 @@
17182
17182
  }
17183
17183
  ],
17184
17184
  "cssParts": [
17185
+ {
17186
+ "description": "The room the rows below the window would have taken. Windowed only.",
17187
+ "name": "after"
17188
+ },
17189
+ {
17190
+ "description": "The room the rows above the window would have taken. Windowed only.",
17191
+ "name": "before"
17192
+ },
17185
17193
  {
17186
17194
  "description": "One cell.",
17187
17195
  "name": "cell"
@@ -17286,13 +17294,13 @@
17286
17294
  },
17287
17295
  {
17288
17296
  "kind": "field",
17289
- "name": "key",
17297
+ "name": "estimate",
17290
17298
  "type": {
17291
- "text": "string"
17299
+ "text": "number"
17292
17300
  },
17293
- "default": "''",
17294
- "description": "The field naming a row's stable identity.\n\n**Needed before selection exists, not after.** Lit keys the rendered rows by\nit, so a sort moves a row's element rather than rewriting every cell in\nplace, which is what keeps focus inside a cell and keeps a CSS transition\nattached to the row it belongs to. Left unset the index is the key, which is\ncorrect only while nothing reorders: it is why this defaults to something\nthat works and is worth setting anyway.",
17295
- "attribute": "key"
17301
+ "default": "32",
17302
+ "description": "How tall a row is taken to be before it has been drawn, in pixels.\n\nOnly read while `windowed`, and a starting guess rather than a claim: a\ncell that wraps makes its row taller than its neighbors, and the window\nreplaces this with what each row came to as it draws. It still has to be\nclose, because it is what the scrollbar is built from before anything has\nbeen measured.",
17303
+ "attribute": "estimate"
17296
17304
  },
17297
17305
  {
17298
17306
  "kind": "field",
@@ -17305,13 +17313,13 @@
17305
17313
  },
17306
17314
  {
17307
17315
  "kind": "field",
17308
- "name": "label",
17316
+ "name": "key",
17309
17317
  "type": {
17310
17318
  "text": "string"
17311
17319
  },
17312
17320
  "default": "''",
17313
- "description": "Accessible name for the grid.",
17314
- "attribute": "label"
17321
+ "description": "The field naming a row's stable identity.\n\n**Needed before selection exists, not after.** Lit keys the rendered rows by\nit, so a sort moves a row's element rather than rewriting every cell in\nplace, which is what keeps focus inside a cell and keeps a CSS transition\nattached to the row it belongs to. Left unset the index is the key, which is\ncorrect only while nothing reorders: it is why this defaults to something\nthat works and is worth setting anyway.",
17322
+ "attribute": "key"
17315
17323
  },
17316
17324
  {
17317
17325
  "kind": "field",
@@ -17324,13 +17332,13 @@
17324
17332
  },
17325
17333
  {
17326
17334
  "kind": "field",
17327
- "name": "mode",
17335
+ "name": "label",
17328
17336
  "type": {
17329
- "text": "'client' | 'server'"
17337
+ "text": "string"
17330
17338
  },
17331
- "default": "'client'",
17332
- "description": "Whether this element does the work or asks the consumer to.\n\n`client` filters, sorts and pages `rows` itself. `server` applies none of\nthem: `rows` is the page, `total` is the size of the whole result, and the\nthree events are requests the consumer answers by fetching. Past some size\nthe client cannot hold the data, so this is not an optimization, it is the\nonly mode that works, and it is here from the start because adding it later\ninverts the data flow.",
17333
- "attribute": "mode"
17339
+ "default": "''",
17340
+ "description": "Accessible name for the grid.",
17341
+ "attribute": "label"
17334
17342
  },
17335
17343
  {
17336
17344
  "kind": "field",
@@ -17341,6 +17349,16 @@
17341
17349
  "description": "The page on show, from 1.\n\nClamped on the way out, so what this reports is the page it drew: a\nbookmarked link to page 99 of a result that has since shrunk reads back as\nthe last page rather than as 99.",
17342
17350
  "attribute": "page"
17343
17351
  },
17352
+ {
17353
+ "kind": "field",
17354
+ "name": "mode",
17355
+ "type": {
17356
+ "text": "'client' | 'server'"
17357
+ },
17358
+ "default": "'client'",
17359
+ "description": "Whether this element does the work or asks the consumer to.\n\n`client` filters, sorts and pages `rows` itself. `server` applies none of\nthem: `rows` is the page, `total` is the size of the whole result, and the\nthree events are requests the consumer answers by fetching. Past some size\nthe client cannot hold the data, so this is not an optimization, it is the\nonly mode that works, and it is here from the start because adding it later\ninverts the data flow.",
17360
+ "attribute": "mode"
17361
+ },
17344
17362
  {
17345
17363
  "kind": "field",
17346
17364
  "name": "rows",
@@ -17369,6 +17387,17 @@
17369
17387
  "description": "How many rows the whole result has, where this element cannot count them.\n\nOnly read in `server` mode, where `rows` is one page and its length says\nnothing about the result. Ignored in `client` mode rather than trusted,\nbecause two sources for one count is the mistake, and here the array is the\none that cannot be stale.",
17370
17388
  "attribute": "total"
17371
17389
  },
17390
+ {
17391
+ "kind": "field",
17392
+ "name": "windowed",
17393
+ "type": {
17394
+ "text": "boolean"
17395
+ },
17396
+ "default": "false",
17397
+ "description": "Draws the rows in view and stands empty space in for the rest.\n\n**Not a `mode`.** `mode` says where the rows come from and who filtered\nthem; this says how many of the ones we hold get drawn. They are\nindependent: a consumer fetching five thousand rows a chunk at a time wants\n`mode=\"server\"` and this at once, and folding this into `mode` would be an\nAPI that forbids that combination for no reason.\n\n**Composes with `paginated` rather than excluding it.** A window over a\npage is coherent -- the page is the slice of the result, the window is the\npart of that slice on screen -- and the arithmetic is the same either way,\nso there is nothing to forbid. Together they suit a table paging at a\nthousand rows, where the page is a reasonable fetch and a poor render.\n\nOff by default. Windowing costs a scroll listener, a measurement per row\ndrawn, and a `block-size` on the scrolling box, and a table of twenty rows\nshould pay none of them.",
17398
+ "attribute": "windowed",
17399
+ "reflects": true
17400
+ },
17372
17401
  {
17373
17402
  "kind": "field",
17374
17403
  "name": "paginated",
@@ -17423,6 +17452,72 @@
17423
17452
  "privacy": "private",
17424
17453
  "default": "undefined"
17425
17454
  },
17455
+ {
17456
+ "kind": "field",
17457
+ "name": "virtualize",
17458
+ "privacy": "private",
17459
+ "readonly": true,
17460
+ "default": "new VirtualizeController(this, { /* Null while `windowed` is off, which is what keeps the controller inert rather than conditionally constructed: a controller is built once and this property can change at runtime. */ container: () => this.windowed ? this.renderRoot.querySelector<HTMLElement>('[part=\"table\"]') : null, count: () => this.available, estimate: () => this.estimate, /* Always measured when windowing at all. The uniform path converts offset to index by division and is right when rows are one height; a grid whose cells wrap is the case it is wrong for. */ measured: () => this.windowed, rows: () => (this.windowed ? this.drawn() : []), })"
17461
+ },
17462
+ {
17463
+ "kind": "method",
17464
+ "name": "drawn",
17465
+ "privacy": "private",
17466
+ "return": {
17467
+ "type": {
17468
+ "text": "{ element: HTMLElement; index: number }[]"
17469
+ }
17470
+ },
17471
+ "description": "The rows in the shadow tree, each with the row of the page it drew.\n\n**Read off `data-index` rather than counted.** `hostUpdated` runs before\n`updated`, so what is in the tree when the controller asks is the previous\nwindow; counting from the current one would record the right heights\nagainst the wrong rows every time the window moved."
17472
+ },
17473
+ {
17474
+ "kind": "field",
17475
+ "name": "available",
17476
+ "type": {
17477
+ "text": "number"
17478
+ },
17479
+ "privacy": "private",
17480
+ "description": "How many rows there are to window over: the page, or the result.\n\n**Read off the held arrangement rather than counted afresh**, because the\ncontroller asks this on every scroll and `matched` walks the whole result\nwhenever a filter is on. Held, a scroll through a filtered table of five\nthousand rows costs a lookup; counted, it costs five thousand comparisons a\nframe, which is the cost windowing was added to avoid.\n\n`matched` still answers where nothing is windowing, which is the path that\nholds nothing and should not start.",
17481
+ "readonly": true
17482
+ },
17483
+ {
17484
+ "kind": "field",
17485
+ "name": "held",
17486
+ "type": {
17487
+ "text": "{ key: string; source: readonly DataRow[]; value: Arranged } | undefined"
17488
+ },
17489
+ "privacy": "private",
17490
+ "description": "The arranged result, kept between renders.\n\n**A window moves and the order does not.** Every scroll that reveals a row\nre-renders, and deriving that render from `rows` would filter and sort the\nwhole result again each time: 23.7ms at five thousand rows, three frames\nspent before a cell is drawn. Held against the inputs that change it, a\nscroll costs a slice.\n\nOnly the windowed path uses this. A paged table re-renders when the reader\nasks for a page, which is rare enough that holding a second copy of the\nresult to save a sort is the wrong trade."
17491
+ },
17492
+ {
17493
+ "kind": "method",
17494
+ "name": "arrange",
17495
+ "privacy": "private",
17496
+ "return": {
17497
+ "type": {
17498
+ "text": "Arranged"
17499
+ }
17500
+ }
17501
+ },
17502
+ {
17503
+ "kind": "method",
17504
+ "name": "windowOf",
17505
+ "privacy": "private",
17506
+ "return": {
17507
+ "type": {
17508
+ "text": "DataRow[]"
17509
+ }
17510
+ },
17511
+ "parameters": [
17512
+ {
17513
+ "name": "rows",
17514
+ "type": {
17515
+ "text": "DataRow[]"
17516
+ }
17517
+ }
17518
+ ],
17519
+ "description": "The part of a page the reader can see, which is every row when not windowed."
17520
+ },
17426
17521
  {
17427
17522
  "kind": "field",
17428
17523
  "name": "tableColumns",
@@ -17491,13 +17586,13 @@
17491
17586
  }
17492
17587
  }
17493
17588
  ],
17494
- "description": "Says so when a table is asked to draw more than it comfortably can.\n\n**The component renders every row it is given and defaults to doing so.**\n`defaultPageSize` is `0`, so `paginated` is false unless a consumer asks,\nwhich means the out-of-the-box arrangement is the unbounded one and nothing\nabout it says that a result of any size will simply be drawn.\n\n**Windowing was refused**, which is worth recording because it is the\nobvious answer. This element already has two mechanisms: `paginated` with a\n`page-size`, and `mode=\"server\"` where `rows` is one page, `total` is the\nwhole result and `aria-rowcount` already reports the result rather than the\nwindow, which is the hard half of virtualization done correctly. A third\nwould fight the first two, and virtualizing a grid means variable row\nheights, a sticky header and keeping `aria-rowindex` honest against a result\nthe element is no longer holding. `VirtualizeController` exists for the case\nwhere the rows are a flat list and this is not that.\n\nWarned once per element, in a browser only: a warning during a server render\nis one nobody can act on and one that would print per request."
17589
+ "description": "Says so when a table is asked to draw more than it comfortably can.\n\n**The component renders every row it is given and defaults to doing so.**\n`defaultPageSize` is `0`, so `paginated` is false unless a consumer asks,\nwhich means the out-of-the-box arrangement is the unbounded one and nothing\nabout it says that a result of any size will simply be drawn.\n\n**Windowing was refused here, and is now `windowed`.** The refusal is kept\nbecause most of it was right, and because what changed is not that somebody\ndisagreed with it. It rested on four claims: that a third mechanism would\nfight `paginated` and `mode=\"server\"`; that a grid has rows of different\nheights; that it needs a sticky header; and that `aria-rowindex` has to keep\ndescribing a result the element no longer holds in full.\n\nThree stopped being true. `VirtualizeController` learnt to measure each row\nand place the next by what the one above came to, which is the variable\nheights. `aria-rowindex` was already result-relative because paging needed\nit, so a window is a second offset on arithmetic that existed. And the\nsticky header is one `position: sticky` on the heading cells rather than on\n`[part=\"head\"]`, which is `display: contents` and generates no box to stick\n-- that is why it looked hard and is not.\n\nThe first was avoided rather than answered. `windowed` is not a `mode` and\ndoes not exclude `paginated`: it says how much of what we hold gets drawn,\nwhere `mode` says where it came from, so there is no third axis to fight the\nother two. What survives is the cost, which is why windowing is off by\ndefault and why this warning still fires for a table that has none of them.\n\nWarned once per element, in a browser only: a warning during a server render\nis one nobody can act on and one that would print per request."
17495
17590
  },
17496
17591
  {
17497
17592
  "kind": "field",
17498
17593
  "name": "view",
17499
17594
  "type": {
17500
- "text": "{ matched: number; rows: DataRow[]; total: number }"
17595
+ "text": "{\n available: number\n matched: number\n rows: DataRow[]\n total: number\n }"
17501
17596
  },
17502
17597
  "privacy": "private",
17503
17598
  "description": "The rows to draw, and the counts around them.\n\nIn `server` mode this element applies nothing: `rows` is already the page,\n`total` is the result, and both counts come from the consumer. Anything else\nwould be this element filtering a page it was handed, which narrows one\nscreen and calls it a search.",
@@ -17767,7 +17862,63 @@
17767
17862
  }
17768
17863
  }
17769
17864
  ],
17770
- "description": "A row's place in the whole result, counting the header as row 1.\n\n**The number describes the result and not the window**, which is the whole\nreason a virtualized or paged grid needs `aria-rowindex` at all: a screen\nreader on page three should hear row 41, and a grid whose indices restart at\nevery page tells a reader the result is twenty rows long however many it has."
17865
+ "description": "A row's place in the whole result, counting the header as row 1.\n\n**The number describes the result and not the window**, which is the whole\nreason a virtualized or paged grid needs `aria-rowindex` at all: a screen\nreader on page three should hear row 41, and a grid whose indices restart at\nevery page tells a reader the result is twenty rows long however many it has.\n\nA window is the second offset and stacks on the page: with both on, row one\nof the window is the page's start plus how far down the page it begins."
17866
+ },
17867
+ {
17868
+ "kind": "field",
17869
+ "name": "placement",
17870
+ "type": {
17871
+ "text": "string"
17872
+ },
17873
+ "privacy": "private",
17874
+ "description": "What decides which row is at which index, as one comparable value.\n\nNot the rows themselves: those are compared by identity beside this, and a\nconsumer handing back an equal array is handing back the same rows in the\nsame order whatever object it is.",
17875
+ "readonly": true
17876
+ },
17877
+ {
17878
+ "kind": "field",
17879
+ "name": "measuredAgainst",
17880
+ "type": {
17881
+ "text": "string"
17882
+ },
17883
+ "privacy": "private",
17884
+ "default": "''",
17885
+ "description": "The signature the recorded heights were measured against."
17886
+ },
17887
+ {
17888
+ "kind": "field",
17889
+ "name": "windowStart",
17890
+ "type": {
17891
+ "text": "number"
17892
+ },
17893
+ "privacy": "private",
17894
+ "description": "Where the window begins in the page, which is the top when there is none.",
17895
+ "readonly": true
17896
+ },
17897
+ {
17898
+ "kind": "method",
17899
+ "name": "renderSpacer",
17900
+ "privacy": "private",
17901
+ "return": {
17902
+ "type": {
17903
+ "text": "TemplateResult | typeof nothing"
17904
+ }
17905
+ },
17906
+ "parameters": [
17907
+ {
17908
+ "name": "end",
17909
+ "type": {
17910
+ "text": "'after' | 'before'"
17911
+ }
17912
+ }
17913
+ ],
17914
+ "description": "The room the rows outside the window would have taken.\n\n**`role=\"presentation\"`, because this is geometry standing inside a\n`rowgroup`.** A bare `div` there is a child the role does not allow, and a\nscreen reader walking the rows would meet something that is not one. The\nroom itself is what keeps the scrollbar honest: a box that scrolls twenty\nrows while claiming ten thousand gives a thumb the size of its track."
17915
+ },
17916
+ {
17917
+ "kind": "field",
17918
+ "name": "handleScroll",
17919
+ "privacy": "private",
17920
+ "readonly": true,
17921
+ "description": "The controller owns the geometry; this is only what tells it to look again."
17771
17922
  },
17772
17923
  {
17773
17924
  "kind": "field",
@@ -18163,13 +18314,13 @@
18163
18314
  "fieldName": "defaultSort"
18164
18315
  },
18165
18316
  {
18166
- "name": "key",
18317
+ "name": "estimate",
18167
18318
  "type": {
18168
- "text": "string"
18319
+ "text": "number"
18169
18320
  },
18170
- "default": "''",
18171
- "description": "The field naming a row's stable identity.\n\n**Needed before selection exists, not after.** Lit keys the rendered rows by\nit, so a sort moves a row's element rather than rewriting every cell in\nplace, which is what keeps focus inside a cell and keeps a CSS transition\nattached to the row it belongs to. Left unset the index is the key, which is\ncorrect only while nothing reorders: it is why this defaults to something\nthat works and is worth setting anyway.",
18172
- "fieldName": "key"
18321
+ "default": "32",
18322
+ "description": "How tall a row is taken to be before it has been drawn, in pixels.\n\nOnly read while `windowed`, and a starting guess rather than a claim: a\ncell that wraps makes its row taller than its neighbors, and the window\nreplaces this with what each row came to as it draws. It still has to be\nclose, because it is what the scrollbar is built from before anything has\nbeen measured.",
18323
+ "fieldName": "estimate"
18173
18324
  },
18174
18325
  {
18175
18326
  "name": "sort",
@@ -18180,13 +18331,13 @@
18180
18331
  "fieldName": "sort"
18181
18332
  },
18182
18333
  {
18183
- "name": "label",
18334
+ "name": "key",
18184
18335
  "type": {
18185
18336
  "text": "string"
18186
18337
  },
18187
18338
  "default": "''",
18188
- "description": "Accessible name for the grid.",
18189
- "fieldName": "label"
18339
+ "description": "The field naming a row's stable identity.\n\n**Needed before selection exists, not after.** Lit keys the rendered rows by\nit, so a sort moves a row's element rather than rewriting every cell in\nplace, which is what keeps focus inside a cell and keeps a CSS transition\nattached to the row it belongs to. Left unset the index is the key, which is\ncorrect only while nothing reorders: it is why this defaults to something\nthat works and is worth setting anyway.",
18340
+ "fieldName": "key"
18190
18341
  },
18191
18342
  {
18192
18343
  "name": "filter",
@@ -18197,13 +18348,13 @@
18197
18348
  "fieldName": "filter"
18198
18349
  },
18199
18350
  {
18200
- "name": "mode",
18351
+ "name": "label",
18201
18352
  "type": {
18202
- "text": "'client' | 'server'"
18353
+ "text": "string"
18203
18354
  },
18204
- "default": "'client'",
18205
- "description": "Whether this element does the work or asks the consumer to.\n\n`client` filters, sorts and pages `rows` itself. `server` applies none of\nthem: `rows` is the page, `total` is the size of the whole result, and the\nthree events are requests the consumer answers by fetching. Past some size\nthe client cannot hold the data, so this is not an optimization, it is the\nonly mode that works, and it is here from the start because adding it later\ninverts the data flow.",
18206
- "fieldName": "mode"
18355
+ "default": "''",
18356
+ "description": "Accessible name for the grid.",
18357
+ "fieldName": "label"
18207
18358
  },
18208
18359
  {
18209
18360
  "name": "page",
@@ -18213,6 +18364,15 @@
18213
18364
  "description": "The page on show, from 1.\n\nClamped on the way out, so what this reports is the page it drew: a\nbookmarked link to page 99 of a result that has since shrunk reads back as\nthe last page rather than as 99.",
18214
18365
  "fieldName": "page"
18215
18366
  },
18367
+ {
18368
+ "name": "mode",
18369
+ "type": {
18370
+ "text": "'client' | 'server'"
18371
+ },
18372
+ "default": "'client'",
18373
+ "description": "Whether this element does the work or asks the consumer to.\n\n`client` filters, sorts and pages `rows` itself. `server` applies none of\nthem: `rows` is the page, `total` is the size of the whole result, and the\nthree events are requests the consumer answers by fetching. Past some size\nthe client cannot hold the data, so this is not an optimization, it is the\nonly mode that works, and it is here from the start because adding it later\ninverts the data flow.",
18374
+ "fieldName": "mode"
18375
+ },
18216
18376
  {
18217
18377
  "name": "page-size",
18218
18378
  "type": {
@@ -18230,6 +18390,15 @@
18230
18390
  "description": "How many rows the whole result has, where this element cannot count them.\n\nOnly read in `server` mode, where `rows` is one page and its length says\nnothing about the result. Ignored in `client` mode rather than trusted,\nbecause two sources for one count is the mistake, and here the array is the\none that cannot be stale.",
18231
18391
  "fieldName": "total"
18232
18392
  },
18393
+ {
18394
+ "name": "windowed",
18395
+ "type": {
18396
+ "text": "boolean"
18397
+ },
18398
+ "default": "false",
18399
+ "description": "Draws the rows in view and stands empty space in for the rest.\n\n**Not a `mode`.** `mode` says where the rows come from and who filtered\nthem; this says how many of the ones we hold get drawn. They are\nindependent: a consumer fetching five thousand rows a chunk at a time wants\n`mode=\"server\"` and this at once, and folding this into `mode` would be an\nAPI that forbids that combination for no reason.\n\n**Composes with `paginated` rather than excluding it.** A window over a\npage is coherent -- the page is the slice of the result, the window is the\npart of that slice on screen -- and the arithmetic is the same either way,\nso there is nothing to forbid. Together they suit a table paging at a\nthousand rows, where the page is a reasonable fetch and a poor render.\n\nOff by default. Windowing costs a scroll listener, a measurement per row\ndrawn, and a `block-size` on the scrolling box, and a table of twenty rows\nshould pay none of them.",
18400
+ "fieldName": "windowed"
18401
+ },
18233
18402
  {
18234
18403
  "name": "paginated",
18235
18404
  "type": {
@@ -18490,6 +18659,36 @@
18490
18659
  ],
18491
18660
  "description": "One page of rows, clamped.\n\nA page past the end returns the last page rather than nothing, because the\nusual way to be past the end is a bookmarked link after the result shrank, and\nan empty table is a worse answer than the last page of a smaller one. The\nsame clamp `helix-pagination` already applies to what it reports."
18492
18661
  },
18662
+ {
18663
+ "kind": "function",
18664
+ "name": "arranged",
18665
+ "return": {
18666
+ "type": {
18667
+ "text": "Arranged"
18668
+ }
18669
+ },
18670
+ "parameters": [
18671
+ {
18672
+ "name": "rows",
18673
+ "type": {
18674
+ "text": "readonly DataRow[]"
18675
+ }
18676
+ },
18677
+ {
18678
+ "name": "axes",
18679
+ "type": {
18680
+ "text": "readonly Axis[]"
18681
+ }
18682
+ },
18683
+ {
18684
+ "name": "{ query, spec }",
18685
+ "type": {
18686
+ "text": "{ query: string; spec: string }"
18687
+ }
18688
+ }
18689
+ ],
18690
+ "description": "Filtering and sorting, with nothing taken off the end.\n\n**Split out of `ordered` because a window moves and this does not.** A table\ndrawing a window on a result re-renders every time a scroll reveals a row,\nand deriving that render from the whole result means filtering and sorting it\nagain each time: 23.7ms at five thousand rows, a frame budget spent three\ntimes over before a cell is drawn. A caller that keeps this between renders\npays it once per change to the data rather than once per frame.\n\nThe two steps stay together for the reason `ordered` gives below: sorting a\npage is the classic bug, and one function doing both is what makes calling\nthem in the wrong order impossible."
18691
+ },
18493
18692
  {
18494
18693
  "kind": "function",
18495
18694
  "name": "ordered",
@@ -18570,6 +18769,14 @@
18570
18769
  "module": "src/data-table/root/order.ts"
18571
18770
  }
18572
18771
  },
18772
+ {
18773
+ "kind": "js",
18774
+ "name": "arranged",
18775
+ "declaration": {
18776
+ "name": "arranged",
18777
+ "module": "src/data-table/root/order.ts"
18778
+ }
18779
+ },
18573
18780
  {
18574
18781
  "kind": "js",
18575
18782
  "name": "ordered",
@@ -74918,7 +75125,7 @@
74918
75125
  "text": "number"
74919
75126
  },
74920
75127
  "default": "32",
74921
- "description": "How tall one row is, in pixels, used to map scroll offset to an index.",
75128
+ "description": "How tall one row is, in pixels, used to map scroll offset to an index.\n\nAn estimate rather than a measurement while `measured` is off, which is\nright whenever the rows really are one height and is the cheaper of the two.",
74922
75129
  "attribute": "estimate"
74923
75130
  },
74924
75131
  {
@@ -74941,6 +75148,16 @@
74941
75148
  "description": "What the list is called, since the rendered rows are only a window on it.",
74942
75149
  "attribute": "label"
74943
75150
  },
75151
+ {
75152
+ "kind": "field",
75153
+ "name": "measured",
75154
+ "type": {
75155
+ "text": "boolean"
75156
+ },
75157
+ "default": "false",
75158
+ "description": "Places rows by what they came to rather than by `estimate`.\n\n**Off by default, because the straight line is better when it holds.** One\nestimate makes offset and index convert by division, which can never\ndisagree with itself; measuring is what a set of genuinely different\nheights needs and costs a read of each row as it renders. A list of\none-line rows should leave this alone.",
75159
+ "attribute": "measured"
75160
+ },
74944
75161
  {
74945
75162
  "kind": "field",
74946
75163
  "name": "rows",
@@ -74956,7 +75173,18 @@
74956
75173
  "name": "virtualize",
74957
75174
  "privacy": "private",
74958
75175
  "readonly": true,
74959
- "default": "new VirtualizeController(this, { container: () => this.renderRoot.querySelector<HTMLElement>('[part=\"viewport\"]'), count: () => this.rows.length, estimate: () => this.estimate, })"
75176
+ "default": "new VirtualizeController(this, { container: () => this.renderRoot.querySelector<HTMLElement>('[part=\"viewport\"]'), count: () => this.rows.length, estimate: () => this.estimate, measured: () => this.measured, rows: () => this.drawn(), })"
75177
+ },
75178
+ {
75179
+ "kind": "method",
75180
+ "name": "drawn",
75181
+ "privacy": "private",
75182
+ "return": {
75183
+ "type": {
75184
+ "text": "{ element: HTMLElement; index: number }[]"
75185
+ }
75186
+ },
75187
+ "description": "The rows in the tree, each with the item it drew.\n\n**Read off `data-index` rather than counted**, because what is in the tree\nwhen the controller asks is what `place` appended on the *previous* pass:\n`hostUpdated` runs before `updated`, so counting from the current window\nwould record the right heights against the wrong items every time the\nwindow moved."
74960
75188
  },
74961
75189
  {
74962
75190
  "kind": "method",
@@ -75160,7 +75388,7 @@
75160
75388
  "text": "number"
75161
75389
  },
75162
75390
  "default": "32",
75163
- "description": "How tall one row is, in pixels, used to map scroll offset to an index.",
75391
+ "description": "How tall one row is, in pixels, used to map scroll offset to an index.\n\nAn estimate rather than a measurement while `measured` is off, which is\nright whenever the rows really are one height and is the cheaper of the two.",
75164
75392
  "fieldName": "estimate"
75165
75393
  },
75166
75394
  {
@@ -75180,6 +75408,15 @@
75180
75408
  "default": "''",
75181
75409
  "description": "What the list is called, since the rendered rows are only a window on it.",
75182
75410
  "fieldName": "label"
75411
+ },
75412
+ {
75413
+ "name": "measured",
75414
+ "type": {
75415
+ "text": "boolean"
75416
+ },
75417
+ "default": "false",
75418
+ "description": "Places rows by what they came to rather than by `estimate`.\n\n**Off by default, because the straight line is better when it holds.** One\nestimate makes offset and index convert by division, which can never\ndisagree with itself; measuring is what a set of genuinely different\nheights needs and costs a read of each row as it renders. A list of\none-line rows should leave this alone.",
75419
+ "fieldName": "measured"
75183
75420
  }
75184
75421
  ],
75185
75422
  "superclass": {