@rcarls/rc-virtual-scroller 0.0.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.
- package/CHANGELOG.md +96 -0
- package/README.md +164 -5
- package/dist/custom-elements.json +878 -0
- package/dist/rc-virtual-scroller-BA_t6Xkx.js +403 -0
- package/dist/rc-virtual-scroller-BA_t6Xkx.js.map +1 -0
- package/dist/rc-virtual-scroller-define.js +6 -0
- package/dist/rc-virtual-scroller-define.js.map +1 -0
- package/dist/rc-virtual-scroller.js +5 -0
- package/dist/rc-virtual-scroller.js.map +1 -0
- package/dist/types/packages/rc-virtual-scroller/src/define.d.ts +1 -0
- package/dist/types/packages/rc-virtual-scroller/src/index.d.ts +1 -0
- package/dist/types/packages/rc-virtual-scroller/src/range.d.ts +31 -0
- package/dist/types/packages/rc-virtual-scroller/src/rc-virtual-scroller.d.ts +211 -0
- package/dist/types/packages/rc-virtual-scroller/src/rc-virtual-scroller.styles.d.ts +2 -0
- package/dist/types/packages/rc-virtual-scroller/src/sample.d.ts +15 -0
- package/package.json +58 -7
|
@@ -0,0 +1,878 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": "1.0.0",
|
|
3
|
+
"readme": "",
|
|
4
|
+
"modules": [
|
|
5
|
+
{
|
|
6
|
+
"kind": "javascript-module",
|
|
7
|
+
"path": "src/define.ts",
|
|
8
|
+
"declarations": [],
|
|
9
|
+
"exports": [
|
|
10
|
+
{
|
|
11
|
+
"kind": "custom-element-definition",
|
|
12
|
+
"name": "rc-virtual-scroller",
|
|
13
|
+
"declaration": {
|
|
14
|
+
"name": "RCVirtualScroller",
|
|
15
|
+
"module": "/src/index.js"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"kind": "js",
|
|
20
|
+
"name": "*",
|
|
21
|
+
"declaration": {
|
|
22
|
+
"name": "*",
|
|
23
|
+
"module": "src/index.js"
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
]
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"kind": "javascript-module",
|
|
30
|
+
"path": "src/index.ts",
|
|
31
|
+
"declarations": [],
|
|
32
|
+
"exports": [
|
|
33
|
+
{
|
|
34
|
+
"kind": "js",
|
|
35
|
+
"name": "*",
|
|
36
|
+
"declaration": {
|
|
37
|
+
"name": "*",
|
|
38
|
+
"module": "src/rc-virtual-scroller.js"
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
]
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"kind": "javascript-module",
|
|
45
|
+
"path": "src/range.ts",
|
|
46
|
+
"declarations": [
|
|
47
|
+
{
|
|
48
|
+
"kind": "function",
|
|
49
|
+
"name": "whole",
|
|
50
|
+
"return": {
|
|
51
|
+
"type": {
|
|
52
|
+
"text": "number"
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"parameters": [
|
|
56
|
+
{
|
|
57
|
+
"name": "value",
|
|
58
|
+
"type": {
|
|
59
|
+
"text": "number"
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"name": "fallback",
|
|
64
|
+
"default": "0"
|
|
65
|
+
}
|
|
66
|
+
],
|
|
67
|
+
"description": "A finite, nonnegative integer configuration value."
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"kind": "function",
|
|
71
|
+
"name": "positive",
|
|
72
|
+
"return": {
|
|
73
|
+
"type": {
|
|
74
|
+
"text": "number"
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"parameters": [
|
|
78
|
+
{
|
|
79
|
+
"name": "value",
|
|
80
|
+
"type": {
|
|
81
|
+
"text": "number"
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
],
|
|
85
|
+
"description": "A finite positive pixel estimate, or zero when unavailable."
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"kind": "function",
|
|
89
|
+
"name": "calculateWindow",
|
|
90
|
+
"return": {
|
|
91
|
+
"type": {
|
|
92
|
+
"text": "WindowRange"
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
"parameters": [
|
|
96
|
+
{
|
|
97
|
+
"name": "input",
|
|
98
|
+
"type": {
|
|
99
|
+
"text": "WindowInput"
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
],
|
|
103
|
+
"description": "Calculate a contiguous window from validated, logical layout facts."
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"kind": "function",
|
|
107
|
+
"name": "resolvedTracks",
|
|
108
|
+
"return": {
|
|
109
|
+
"type": {
|
|
110
|
+
"text": "number[] | null"
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
"parameters": [
|
|
114
|
+
{
|
|
115
|
+
"name": "value",
|
|
116
|
+
"type": {
|
|
117
|
+
"text": "string"
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
],
|
|
121
|
+
"description": "Read resolved pixel tracks, ignoring CSS grid line-name annotations."
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"kind": "function",
|
|
125
|
+
"name": "trackSpan",
|
|
126
|
+
"return": {
|
|
127
|
+
"type": {
|
|
128
|
+
"text": "number | null"
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
"parameters": [
|
|
132
|
+
{
|
|
133
|
+
"name": "start",
|
|
134
|
+
"type": {
|
|
135
|
+
"text": "string"
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"name": "end",
|
|
140
|
+
"type": {
|
|
141
|
+
"text": "string"
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"name": "count",
|
|
146
|
+
"type": {
|
|
147
|
+
"text": "number"
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
],
|
|
151
|
+
"description": "Resolve the deliberately small, numeric subset of grid span syntax we support."
|
|
152
|
+
}
|
|
153
|
+
],
|
|
154
|
+
"exports": [
|
|
155
|
+
{
|
|
156
|
+
"kind": "js",
|
|
157
|
+
"name": "whole",
|
|
158
|
+
"declaration": {
|
|
159
|
+
"name": "whole",
|
|
160
|
+
"module": "src/range.ts"
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
"kind": "js",
|
|
165
|
+
"name": "positive",
|
|
166
|
+
"declaration": {
|
|
167
|
+
"name": "positive",
|
|
168
|
+
"module": "src/range.ts"
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"kind": "js",
|
|
173
|
+
"name": "calculateWindow",
|
|
174
|
+
"declaration": {
|
|
175
|
+
"name": "calculateWindow",
|
|
176
|
+
"module": "src/range.ts"
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
"kind": "js",
|
|
181
|
+
"name": "resolvedTracks",
|
|
182
|
+
"declaration": {
|
|
183
|
+
"name": "resolvedTracks",
|
|
184
|
+
"module": "src/range.ts"
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
"kind": "js",
|
|
189
|
+
"name": "trackSpan",
|
|
190
|
+
"declaration": {
|
|
191
|
+
"name": "trackSpan",
|
|
192
|
+
"module": "src/range.ts"
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
]
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"kind": "javascript-module",
|
|
199
|
+
"path": "src/rc-virtual-scroller.ts",
|
|
200
|
+
"declarations": [
|
|
201
|
+
{
|
|
202
|
+
"kind": "class",
|
|
203
|
+
"description": "Reports which slice of a long collection is currently on screen and reserves\nthe scroll space for the rest, so the consumer can render a few dozen items\ninstead of a few thousand.\n\nThe element is deliberately headless: it never creates, recycles, or\npositions item DOM. It measures geometry, dispatches\n`rc-virtual-scroller-range`, and sizes two spacers around the default slot.\nThe consumer slots its own single container element (a `<ul>`, an\n`<rc-list>`, a `<table>` body) and renders `detail.start`..`detail.end` into\nit with whatever framework it already uses. That keeps the markup, the CSS\nlayout, and the accessibility semantics with the code that owns them, and it\nmeans a native `grid-template-columns: repeat(auto-fill, ...)` keeps working\nuntouched.\n\n`axis` is logical. `block` (the default) windows lines stacked the way\nparagraphs stack, which is vertical in horizontal writing modes and\nhorizontal in vertical ones. `inline` windows a row of items running the way\ntext runs, such as a horizontal shelf; the slotted container then lays its\nitems along the inline axis (`display: flex`, or a grid with\n`grid-auto-flow: column`). Direction and writing mode are read from the\nelement's own computed style, so RTL and vertical text need no configuration.\n\nVirtualization requires sequential DOM-order items with uniform line pitch\nand capacity (the final line may be partial). Regular grids, uniform numeric\nspans, lists, and nonwrapping shelves are measured from CSS. Use\n`items-per-line` for ambiguous grid capacity; it does not enable variable\npitch, masonry, dense placement, or reordered items. Detectably unsupported\nlayouts render the full collection and warn in development. `item-size` is\nonly a bootstrap estimate. Hidden layouts retain their last valid window.\n\nAccessibility is the consumer's, because the consumer owns the roles. A\nvirtualized set must still tell assistive technology its real size: put\n`aria-setsize` (the true total) and `aria-posinset` (the item's real index,\nnot its DOM position) on each item, or `aria-rowcount` / `aria-rowindex` for\na grid. See the package README. The one part this element does handle is\nfocus: the reported range is always widened to include the focused item, so\nscrolling never silently drops focus to `<body>`.",
|
|
204
|
+
"name": "RCVirtualScroller",
|
|
205
|
+
"cssParts": [
|
|
206
|
+
{
|
|
207
|
+
"description": "Space along the scrolling axis standing in for the lines before the range.",
|
|
208
|
+
"name": "spacer-start"
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
"description": "Space along the scrolling axis standing in for the lines after the range.",
|
|
212
|
+
"name": "spacer-end"
|
|
213
|
+
}
|
|
214
|
+
],
|
|
215
|
+
"slots": [
|
|
216
|
+
{
|
|
217
|
+
"description": "The consumer's single container element, holding only the items in the current range.",
|
|
218
|
+
"name": ""
|
|
219
|
+
}
|
|
220
|
+
],
|
|
221
|
+
"members": [
|
|
222
|
+
{
|
|
223
|
+
"kind": "field",
|
|
224
|
+
"name": "enabledWarnings",
|
|
225
|
+
"static": true
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
"kind": "field",
|
|
229
|
+
"name": "axis",
|
|
230
|
+
"type": {
|
|
231
|
+
"text": "RCVirtualScrollerAxis"
|
|
232
|
+
},
|
|
233
|
+
"default": "'block'",
|
|
234
|
+
"description": "Logical axis to window along.",
|
|
235
|
+
"attribute": "axis",
|
|
236
|
+
"reflects": true
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
"kind": "field",
|
|
240
|
+
"name": "_count",
|
|
241
|
+
"type": {
|
|
242
|
+
"text": "number"
|
|
243
|
+
},
|
|
244
|
+
"privacy": "private",
|
|
245
|
+
"default": "0"
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
"kind": "field",
|
|
249
|
+
"name": "_itemSize",
|
|
250
|
+
"type": {
|
|
251
|
+
"text": "number"
|
|
252
|
+
},
|
|
253
|
+
"privacy": "private",
|
|
254
|
+
"default": "0"
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
"kind": "field",
|
|
258
|
+
"name": "_overscan",
|
|
259
|
+
"type": {
|
|
260
|
+
"text": "number"
|
|
261
|
+
},
|
|
262
|
+
"privacy": "private",
|
|
263
|
+
"default": "2"
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
"kind": "field",
|
|
267
|
+
"name": "_capacity",
|
|
268
|
+
"type": {
|
|
269
|
+
"text": "number"
|
|
270
|
+
},
|
|
271
|
+
"privacy": "private",
|
|
272
|
+
"default": "0"
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
"kind": "field",
|
|
276
|
+
"name": "count",
|
|
277
|
+
"type": {
|
|
278
|
+
"text": "number"
|
|
279
|
+
},
|
|
280
|
+
"description": "Total collection size, normalized to a nonnegative integer. Invalid values become zero. Host writes are silent.",
|
|
281
|
+
"attribute": "count"
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
"kind": "field",
|
|
285
|
+
"name": "itemSize",
|
|
286
|
+
"type": {
|
|
287
|
+
"text": "number"
|
|
288
|
+
},
|
|
289
|
+
"description": "Estimated line pitch in pixels, used for the first frame and whenever no\nline is available to measure. Get this roughly right: it is what the very\nfirst `rc-virtual-scroller-range` is computed from, and what a restored\nscroll position lands against. Invalid or nonpositive values become zero.\nHost writes are silent.",
|
|
290
|
+
"attribute": "item-size"
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
"kind": "field",
|
|
294
|
+
"name": "itemsPerLine",
|
|
295
|
+
"type": {
|
|
296
|
+
"text": "number"
|
|
297
|
+
},
|
|
298
|
+
"description": "Grid capacity override, normalized to a nonnegative integer; zero means automatic. Host writes are silent.",
|
|
299
|
+
"attribute": "items-per-line"
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
"kind": "field",
|
|
303
|
+
"name": "overscan",
|
|
304
|
+
"type": {
|
|
305
|
+
"text": "number"
|
|
306
|
+
},
|
|
307
|
+
"description": "Extra lines beyond each viewport edge, floored to an integer. Invalid/negative values become two. Host writes are silent.",
|
|
308
|
+
"attribute": "overscan"
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
"kind": "field",
|
|
312
|
+
"name": "disabled",
|
|
313
|
+
"type": {
|
|
314
|
+
"text": "boolean"
|
|
315
|
+
},
|
|
316
|
+
"default": "false",
|
|
317
|
+
"description": "Reports the whole collection as the range and stops measuring. An escape\nhatch for short collections, printing, and A/B measurement; the consumer's\nrender path stays the same either way.",
|
|
318
|
+
"attribute": "disabled",
|
|
319
|
+
"reflects": true
|
|
320
|
+
},
|
|
321
|
+
{
|
|
322
|
+
"kind": "field",
|
|
323
|
+
"name": "scrollTarget",
|
|
324
|
+
"type": {
|
|
325
|
+
"text": "Element | null"
|
|
326
|
+
},
|
|
327
|
+
"default": "null",
|
|
328
|
+
"description": "The scroll container to measure against. Defaults to the nearest scrolling\nancestor. Set this when the ancestor only becomes scrollable after its own\nupgrade, or when the intended scrollport is further up than the first\n`overflow: auto` element."
|
|
329
|
+
},
|
|
330
|
+
{
|
|
331
|
+
"kind": "field",
|
|
332
|
+
"name": "first",
|
|
333
|
+
"type": {
|
|
334
|
+
"text": "number"
|
|
335
|
+
},
|
|
336
|
+
"description": "Read-only first reported item index, also exposed as the computed `first` attribute.",
|
|
337
|
+
"readonly": true
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
"kind": "field",
|
|
341
|
+
"name": "last",
|
|
342
|
+
"type": {
|
|
343
|
+
"text": "number"
|
|
344
|
+
},
|
|
345
|
+
"description": "Read-only last reported item index, or -1 for an empty range; also exposed as `last`.",
|
|
346
|
+
"readonly": true
|
|
347
|
+
},
|
|
348
|
+
{
|
|
349
|
+
"kind": "field",
|
|
350
|
+
"name": "range",
|
|
351
|
+
"type": {
|
|
352
|
+
"text": "RCVirtualScrollerRangeDetail | null"
|
|
353
|
+
},
|
|
354
|
+
"description": "The most recently reported range, or `null` before the first measurement.\nThe element measures on its own schedule, which can be before a consumer\nhas attached its listener; render from this once when subscribing, then\nfollow `rc-virtual-scroller-range`. Identical ranges are never re-sent, so\na subscriber that skips this can wait for an event that will not come.",
|
|
355
|
+
"readonly": true
|
|
356
|
+
},
|
|
357
|
+
{
|
|
358
|
+
"kind": "field",
|
|
359
|
+
"name": "_spacerStart",
|
|
360
|
+
"type": {
|
|
361
|
+
"text": "number"
|
|
362
|
+
},
|
|
363
|
+
"privacy": "private",
|
|
364
|
+
"default": "0"
|
|
365
|
+
},
|
|
366
|
+
{
|
|
367
|
+
"kind": "field",
|
|
368
|
+
"name": "_spacerEnd",
|
|
369
|
+
"type": {
|
|
370
|
+
"text": "number"
|
|
371
|
+
},
|
|
372
|
+
"privacy": "private",
|
|
373
|
+
"default": "0"
|
|
374
|
+
},
|
|
375
|
+
{
|
|
376
|
+
"kind": "field",
|
|
377
|
+
"name": "_frame",
|
|
378
|
+
"privacy": "private",
|
|
379
|
+
"readonly": true,
|
|
380
|
+
"default": "new RafScheduler(this)"
|
|
381
|
+
},
|
|
382
|
+
{
|
|
383
|
+
"kind": "field",
|
|
384
|
+
"name": "_geometry",
|
|
385
|
+
"type": {
|
|
386
|
+
"text": "Geometry"
|
|
387
|
+
},
|
|
388
|
+
"privacy": "private",
|
|
389
|
+
"default": "{ itemsPerLine: 1, lineSize: 0, measured: false }"
|
|
390
|
+
},
|
|
391
|
+
{
|
|
392
|
+
"kind": "field",
|
|
393
|
+
"name": "_needsSample",
|
|
394
|
+
"type": {
|
|
395
|
+
"text": "boolean"
|
|
396
|
+
},
|
|
397
|
+
"privacy": "private",
|
|
398
|
+
"default": "true"
|
|
399
|
+
},
|
|
400
|
+
{
|
|
401
|
+
"kind": "field",
|
|
402
|
+
"name": "_resetGeometry",
|
|
403
|
+
"type": {
|
|
404
|
+
"text": "boolean"
|
|
405
|
+
},
|
|
406
|
+
"privacy": "private",
|
|
407
|
+
"default": "false"
|
|
408
|
+
},
|
|
409
|
+
{
|
|
410
|
+
"kind": "field",
|
|
411
|
+
"name": "_unsupported",
|
|
412
|
+
"type": {
|
|
413
|
+
"text": "boolean"
|
|
414
|
+
},
|
|
415
|
+
"privacy": "private",
|
|
416
|
+
"default": "false"
|
|
417
|
+
},
|
|
418
|
+
{
|
|
419
|
+
"kind": "field",
|
|
420
|
+
"name": "_warnedLayouts",
|
|
421
|
+
"privacy": "private",
|
|
422
|
+
"readonly": true,
|
|
423
|
+
"default": "new Set<string>()"
|
|
424
|
+
},
|
|
425
|
+
{
|
|
426
|
+
"kind": "field",
|
|
427
|
+
"name": "_$container",
|
|
428
|
+
"type": {
|
|
429
|
+
"text": "Element | null"
|
|
430
|
+
},
|
|
431
|
+
"privacy": "private",
|
|
432
|
+
"default": "null"
|
|
433
|
+
},
|
|
434
|
+
{
|
|
435
|
+
"kind": "field",
|
|
436
|
+
"name": "_$scrollSource",
|
|
437
|
+
"type": {
|
|
438
|
+
"text": "EventTarget | null"
|
|
439
|
+
},
|
|
440
|
+
"privacy": "private",
|
|
441
|
+
"default": "null"
|
|
442
|
+
},
|
|
443
|
+
{
|
|
444
|
+
"kind": "field",
|
|
445
|
+
"name": "_contentObserver",
|
|
446
|
+
"type": {
|
|
447
|
+
"text": "MutationObserver | null"
|
|
448
|
+
},
|
|
449
|
+
"privacy": "private",
|
|
450
|
+
"default": "null"
|
|
451
|
+
},
|
|
452
|
+
{
|
|
453
|
+
"kind": "field",
|
|
454
|
+
"name": "_flow",
|
|
455
|
+
"type": {
|
|
456
|
+
"text": "Flow"
|
|
457
|
+
},
|
|
458
|
+
"privacy": "private",
|
|
459
|
+
"default": "HORIZONTAL_LTR_FLOW",
|
|
460
|
+
"description": "The host's own flow, resolved with the scroll target rather than per frame."
|
|
461
|
+
},
|
|
462
|
+
{
|
|
463
|
+
"kind": "field",
|
|
464
|
+
"name": "_resolvedTarget",
|
|
465
|
+
"type": {
|
|
466
|
+
"text": "Element | null"
|
|
467
|
+
},
|
|
468
|
+
"privacy": "private",
|
|
469
|
+
"default": "null"
|
|
470
|
+
},
|
|
471
|
+
{
|
|
472
|
+
"kind": "field",
|
|
473
|
+
"name": "_resizeObserver",
|
|
474
|
+
"type": {
|
|
475
|
+
"text": "ResizeObserver | null"
|
|
476
|
+
},
|
|
477
|
+
"privacy": "private",
|
|
478
|
+
"default": "null"
|
|
479
|
+
},
|
|
480
|
+
{
|
|
481
|
+
"kind": "field",
|
|
482
|
+
"name": "_unobserveLocale",
|
|
483
|
+
"type": {
|
|
484
|
+
"text": "(() => void) | null"
|
|
485
|
+
},
|
|
486
|
+
"privacy": "private",
|
|
487
|
+
"default": "null"
|
|
488
|
+
},
|
|
489
|
+
{
|
|
490
|
+
"kind": "field",
|
|
491
|
+
"name": "_lastDetail",
|
|
492
|
+
"type": {
|
|
493
|
+
"text": "RCVirtualScrollerRangeDetail | null"
|
|
494
|
+
},
|
|
495
|
+
"privacy": "private",
|
|
496
|
+
"default": "null"
|
|
497
|
+
},
|
|
498
|
+
{
|
|
499
|
+
"kind": "field",
|
|
500
|
+
"name": "_needsResolve",
|
|
501
|
+
"type": {
|
|
502
|
+
"text": "boolean"
|
|
503
|
+
},
|
|
504
|
+
"privacy": "private",
|
|
505
|
+
"default": "true",
|
|
506
|
+
"description": "Set when the surrounding layout changed enough to re-find the scrollport."
|
|
507
|
+
},
|
|
508
|
+
{
|
|
509
|
+
"kind": "method",
|
|
510
|
+
"name": "scrollToIndex",
|
|
511
|
+
"return": {
|
|
512
|
+
"type": {
|
|
513
|
+
"text": "void"
|
|
514
|
+
}
|
|
515
|
+
},
|
|
516
|
+
"parameters": [
|
|
517
|
+
{
|
|
518
|
+
"name": "index",
|
|
519
|
+
"type": {
|
|
520
|
+
"text": "number"
|
|
521
|
+
}
|
|
522
|
+
},
|
|
523
|
+
{
|
|
524
|
+
"name": "options",
|
|
525
|
+
"default": "{}",
|
|
526
|
+
"type": {
|
|
527
|
+
"text": "{ align?: RCVirtualScrollerAlign; behavior?: ScrollBehavior }"
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
],
|
|
531
|
+
"description": "Scrolls the item at `index` into view along `axis`. Accurate to the current\nline pitch, which means accurate to `item-size` until at least one line has\nrendered."
|
|
532
|
+
},
|
|
533
|
+
{
|
|
534
|
+
"kind": "method",
|
|
535
|
+
"name": "measure",
|
|
536
|
+
"return": {
|
|
537
|
+
"type": {
|
|
538
|
+
"text": "void"
|
|
539
|
+
}
|
|
540
|
+
},
|
|
541
|
+
"description": "Re-measures the slotted container and re-evaluates the range. Call this\nwhen something outside the element's own observers changed the item size,\nsuch as a font load or a theme swap."
|
|
542
|
+
},
|
|
543
|
+
{
|
|
544
|
+
"kind": "field",
|
|
545
|
+
"name": "_requestEvaluate",
|
|
546
|
+
"privacy": "private",
|
|
547
|
+
"readonly": true,
|
|
548
|
+
"description": "Schedules an evaluation. `RafScheduler` keeps only the most recently\nscheduled callback, so every path has to funnel through this single one:\na scroll arriving between a resize and its frame must not be able to drop\nthe resize's work."
|
|
549
|
+
},
|
|
550
|
+
{
|
|
551
|
+
"kind": "field",
|
|
552
|
+
"name": "_requestSample",
|
|
553
|
+
"privacy": "private",
|
|
554
|
+
"readonly": true
|
|
555
|
+
},
|
|
556
|
+
{
|
|
557
|
+
"kind": "field",
|
|
558
|
+
"name": "_requestResolve",
|
|
559
|
+
"privacy": "private",
|
|
560
|
+
"readonly": true,
|
|
561
|
+
"description": "Requests an evaluation that re-finds the scrollport and flow first."
|
|
562
|
+
},
|
|
563
|
+
{
|
|
564
|
+
"kind": "method",
|
|
565
|
+
"name": "_attachScrollTarget",
|
|
566
|
+
"privacy": "private",
|
|
567
|
+
"return": {
|
|
568
|
+
"type": {
|
|
569
|
+
"text": "Element | null"
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
},
|
|
573
|
+
{
|
|
574
|
+
"kind": "method",
|
|
575
|
+
"name": "_detachScrollTarget",
|
|
576
|
+
"privacy": "private",
|
|
577
|
+
"return": {
|
|
578
|
+
"type": {
|
|
579
|
+
"text": "void"
|
|
580
|
+
}
|
|
581
|
+
}
|
|
582
|
+
},
|
|
583
|
+
{
|
|
584
|
+
"kind": "method",
|
|
585
|
+
"name": "_portViewportRect",
|
|
586
|
+
"privacy": "private",
|
|
587
|
+
"return": {
|
|
588
|
+
"type": {
|
|
589
|
+
"text": "DOMRect"
|
|
590
|
+
}
|
|
591
|
+
},
|
|
592
|
+
"parameters": [
|
|
593
|
+
{
|
|
594
|
+
"name": "target",
|
|
595
|
+
"type": {
|
|
596
|
+
"text": "Element"
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
],
|
|
600
|
+
"description": "The scroll target's visible client box in viewport coordinates."
|
|
601
|
+
},
|
|
602
|
+
{
|
|
603
|
+
"kind": "method",
|
|
604
|
+
"name": "_documentScroller",
|
|
605
|
+
"privacy": "private",
|
|
606
|
+
"return": {
|
|
607
|
+
"type": {
|
|
608
|
+
"text": "Element"
|
|
609
|
+
}
|
|
610
|
+
}
|
|
611
|
+
},
|
|
612
|
+
{
|
|
613
|
+
"kind": "method",
|
|
614
|
+
"name": "_view",
|
|
615
|
+
"privacy": "private",
|
|
616
|
+
"return": {
|
|
617
|
+
"type": {
|
|
618
|
+
"text": "{ viewStart: number; viewSize: number }"
|
|
619
|
+
}
|
|
620
|
+
},
|
|
621
|
+
"parameters": [
|
|
622
|
+
{
|
|
623
|
+
"name": "target",
|
|
624
|
+
"type": {
|
|
625
|
+
"text": "Element"
|
|
626
|
+
}
|
|
627
|
+
}
|
|
628
|
+
],
|
|
629
|
+
"description": "Where the visible part of the scroll target sits relative to the host,\nmeasured from the host's start edge along `axis` in the host's own flow.\nWorking from the two rects rather than from `scrollTop`/`scrollLeft`\nkeeps the arithmetic identical in every writing mode and direction.\nReported in the host's own CSS pixels, the unit its spacers are written in."
|
|
630
|
+
},
|
|
631
|
+
{
|
|
632
|
+
"kind": "method",
|
|
633
|
+
"name": "_effectiveLineSize",
|
|
634
|
+
"privacy": "private",
|
|
635
|
+
"return": {
|
|
636
|
+
"type": {
|
|
637
|
+
"text": "number"
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
},
|
|
641
|
+
{
|
|
642
|
+
"kind": "method",
|
|
643
|
+
"name": "_observeLayout",
|
|
644
|
+
"privacy": "private",
|
|
645
|
+
"return": {
|
|
646
|
+
"type": {
|
|
647
|
+
"text": "void"
|
|
648
|
+
}
|
|
649
|
+
},
|
|
650
|
+
"description": "Rebind observers only when their actual targets changed."
|
|
651
|
+
},
|
|
652
|
+
{
|
|
653
|
+
"kind": "field",
|
|
654
|
+
"name": "_observingLayout",
|
|
655
|
+
"type": {
|
|
656
|
+
"text": "boolean"
|
|
657
|
+
},
|
|
658
|
+
"privacy": "private",
|
|
659
|
+
"default": "false"
|
|
660
|
+
},
|
|
661
|
+
{
|
|
662
|
+
"kind": "method",
|
|
663
|
+
"name": "_focusedIndex",
|
|
664
|
+
"privacy": "private",
|
|
665
|
+
"return": {
|
|
666
|
+
"type": {
|
|
667
|
+
"text": "number"
|
|
668
|
+
}
|
|
669
|
+
},
|
|
670
|
+
"parameters": [
|
|
671
|
+
{
|
|
672
|
+
"name": "$container",
|
|
673
|
+
"type": {
|
|
674
|
+
"text": "Element"
|
|
675
|
+
}
|
|
676
|
+
}
|
|
677
|
+
],
|
|
678
|
+
"description": "Focus retargets to a closed shadow host. Stop at the item that owns it,\nrather than asking ordinary contains() to cross a shadow boundary."
|
|
679
|
+
},
|
|
680
|
+
{
|
|
681
|
+
"kind": "method",
|
|
682
|
+
"name": "_evaluate",
|
|
683
|
+
"privacy": "private",
|
|
684
|
+
"return": {
|
|
685
|
+
"type": {
|
|
686
|
+
"text": "void"
|
|
687
|
+
}
|
|
688
|
+
}
|
|
689
|
+
},
|
|
690
|
+
{
|
|
691
|
+
"kind": "method",
|
|
692
|
+
"name": "_applyRange",
|
|
693
|
+
"privacy": "private",
|
|
694
|
+
"return": {
|
|
695
|
+
"type": {
|
|
696
|
+
"text": "void"
|
|
697
|
+
}
|
|
698
|
+
},
|
|
699
|
+
"parameters": [
|
|
700
|
+
{
|
|
701
|
+
"name": "start",
|
|
702
|
+
"type": {
|
|
703
|
+
"text": "number"
|
|
704
|
+
}
|
|
705
|
+
},
|
|
706
|
+
{
|
|
707
|
+
"name": "end",
|
|
708
|
+
"type": {
|
|
709
|
+
"text": "number"
|
|
710
|
+
}
|
|
711
|
+
},
|
|
712
|
+
{
|
|
713
|
+
"name": "spacerStart",
|
|
714
|
+
"type": {
|
|
715
|
+
"text": "number"
|
|
716
|
+
}
|
|
717
|
+
},
|
|
718
|
+
{
|
|
719
|
+
"name": "spacerEnd",
|
|
720
|
+
"type": {
|
|
721
|
+
"text": "number"
|
|
722
|
+
}
|
|
723
|
+
}
|
|
724
|
+
]
|
|
725
|
+
}
|
|
726
|
+
],
|
|
727
|
+
"events": [
|
|
728
|
+
{
|
|
729
|
+
"name": "rc-virtual-scroller-range",
|
|
730
|
+
"type": {
|
|
731
|
+
"text": "CustomEvent"
|
|
732
|
+
},
|
|
733
|
+
"description": "The visible range changed, or its geometry was re-measured."
|
|
734
|
+
}
|
|
735
|
+
],
|
|
736
|
+
"attributes": [
|
|
737
|
+
{
|
|
738
|
+
"description": "Logical axis to window along.",
|
|
739
|
+
"name": "axis",
|
|
740
|
+
"type": {
|
|
741
|
+
"text": "RCVirtualScrollerAxis"
|
|
742
|
+
},
|
|
743
|
+
"default": "'block'",
|
|
744
|
+
"fieldName": "axis"
|
|
745
|
+
},
|
|
746
|
+
{
|
|
747
|
+
"description": "Total collection size, normalized to a nonnegative integer. Invalid values become zero. Host writes are silent.",
|
|
748
|
+
"name": "count",
|
|
749
|
+
"type": {
|
|
750
|
+
"text": "number"
|
|
751
|
+
},
|
|
752
|
+
"fieldName": "count"
|
|
753
|
+
},
|
|
754
|
+
{
|
|
755
|
+
"description": "Estimated line pitch in pixels, used for the first frame and whenever no\nline is available to measure. Get this roughly right: it is what the very\nfirst `rc-virtual-scroller-range` is computed from, and what a restored\nscroll position lands against. Invalid or nonpositive values become zero.\nHost writes are silent.",
|
|
756
|
+
"name": "item-size",
|
|
757
|
+
"type": {
|
|
758
|
+
"text": "number"
|
|
759
|
+
},
|
|
760
|
+
"fieldName": "itemSize"
|
|
761
|
+
},
|
|
762
|
+
{
|
|
763
|
+
"description": "Grid capacity override, normalized to a nonnegative integer; zero means automatic. Host writes are silent.",
|
|
764
|
+
"name": "items-per-line",
|
|
765
|
+
"type": {
|
|
766
|
+
"text": "number"
|
|
767
|
+
},
|
|
768
|
+
"fieldName": "itemsPerLine"
|
|
769
|
+
},
|
|
770
|
+
{
|
|
771
|
+
"description": "Extra lines beyond each viewport edge, floored to an integer. Invalid/negative values become two. Host writes are silent.",
|
|
772
|
+
"name": "overscan",
|
|
773
|
+
"type": {
|
|
774
|
+
"text": "number"
|
|
775
|
+
},
|
|
776
|
+
"fieldName": "overscan"
|
|
777
|
+
},
|
|
778
|
+
{
|
|
779
|
+
"description": "Reports the whole collection as the range and stops measuring. An escape\nhatch for short collections, printing, and A/B measurement; the consumer's\nrender path stays the same either way.",
|
|
780
|
+
"name": "disabled",
|
|
781
|
+
"type": {
|
|
782
|
+
"text": "boolean"
|
|
783
|
+
},
|
|
784
|
+
"default": "false",
|
|
785
|
+
"fieldName": "disabled"
|
|
786
|
+
},
|
|
787
|
+
{
|
|
788
|
+
"description": "Reflected, computed. First item index in the current range.",
|
|
789
|
+
"name": "first"
|
|
790
|
+
},
|
|
791
|
+
{
|
|
792
|
+
"description": "Reflected, computed. Last item index in the current range, inclusive. `-1` when the range is empty.",
|
|
793
|
+
"name": "last"
|
|
794
|
+
}
|
|
795
|
+
],
|
|
796
|
+
"superclass": {
|
|
797
|
+
"name": "LitElement",
|
|
798
|
+
"package": "lit"
|
|
799
|
+
},
|
|
800
|
+
"tagName": "rc-virtual-scroller",
|
|
801
|
+
"customElement": true
|
|
802
|
+
}
|
|
803
|
+
],
|
|
804
|
+
"exports": [
|
|
805
|
+
{
|
|
806
|
+
"kind": "js",
|
|
807
|
+
"name": "RCVirtualScroller",
|
|
808
|
+
"declaration": {
|
|
809
|
+
"name": "RCVirtualScroller",
|
|
810
|
+
"module": "src/rc-virtual-scroller.ts"
|
|
811
|
+
}
|
|
812
|
+
}
|
|
813
|
+
]
|
|
814
|
+
},
|
|
815
|
+
{
|
|
816
|
+
"kind": "javascript-module",
|
|
817
|
+
"path": "src/sample.ts",
|
|
818
|
+
"declarations": [
|
|
819
|
+
{
|
|
820
|
+
"kind": "function",
|
|
821
|
+
"name": "sampleLayout",
|
|
822
|
+
"return": {
|
|
823
|
+
"type": {
|
|
824
|
+
"text": "LayoutSample"
|
|
825
|
+
}
|
|
826
|
+
},
|
|
827
|
+
"parameters": [
|
|
828
|
+
{
|
|
829
|
+
"name": "$container",
|
|
830
|
+
"type": {
|
|
831
|
+
"text": "Element"
|
|
832
|
+
}
|
|
833
|
+
},
|
|
834
|
+
{
|
|
835
|
+
"name": "axis",
|
|
836
|
+
"type": {
|
|
837
|
+
"text": "LogicalAxis"
|
|
838
|
+
}
|
|
839
|
+
},
|
|
840
|
+
{
|
|
841
|
+
"name": "flow",
|
|
842
|
+
"type": {
|
|
843
|
+
"text": "Flow"
|
|
844
|
+
}
|
|
845
|
+
},
|
|
846
|
+
{
|
|
847
|
+
"name": "override",
|
|
848
|
+
"type": {
|
|
849
|
+
"text": "number"
|
|
850
|
+
}
|
|
851
|
+
},
|
|
852
|
+
{
|
|
853
|
+
"name": "previous",
|
|
854
|
+
"type": {
|
|
855
|
+
"text": "Geometry"
|
|
856
|
+
}
|
|
857
|
+
},
|
|
858
|
+
{
|
|
859
|
+
"name": "hostZoom",
|
|
860
|
+
"default": "1"
|
|
861
|
+
}
|
|
862
|
+
],
|
|
863
|
+
"description": "Sample regular line geometry without changing the consumer's layout.\nGeometry is reported in the host's CSS pixels, whatever units each\nmeasurement is read in."
|
|
864
|
+
}
|
|
865
|
+
],
|
|
866
|
+
"exports": [
|
|
867
|
+
{
|
|
868
|
+
"kind": "js",
|
|
869
|
+
"name": "sampleLayout",
|
|
870
|
+
"declaration": {
|
|
871
|
+
"name": "sampleLayout",
|
|
872
|
+
"module": "src/sample.ts"
|
|
873
|
+
}
|
|
874
|
+
}
|
|
875
|
+
]
|
|
876
|
+
}
|
|
877
|
+
]
|
|
878
|
+
}
|