react-window 2.0.0-alpha.1 → 2.0.0-alpha.3
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/LICENSE.md +21 -0
- package/dist/react-window.cjs +1 -1
- package/dist/react-window.d.ts +23 -8
- package/dist/react-window.js +242 -230
- package/docs/assets/index-C0dH_qJq.js +67 -0
- package/docs/assets/index-DuD8RcK_.css +1 -0
- package/docs/generated/code-snippets/CellComponent.json +2 -2
- package/docs/generated/code-snippets/FixedHeightList.json +2 -2
- package/docs/generated/code-snippets/FixedHeightRowComponent.json +2 -2
- package/docs/generated/code-snippets/FlexboxLayout.json +2 -2
- package/docs/generated/code-snippets/Grid.json +2 -2
- package/docs/generated/code-snippets/ListVariableRowHeights.json +2 -2
- package/docs/generated/code-snippets/columnWidth.json +2 -2
- package/docs/generated/code-snippets/gridRefClickEventHandler.json +2 -2
- package/docs/generated/code-snippets/listRefClickEventHandler.json +2 -2
- package/docs/generated/code-snippets/rowHeight.json +2 -2
- package/docs/generated/code-snippets/useGridCallbackRef.json +4 -0
- package/docs/generated/code-snippets/useGridRef.json +2 -2
- package/docs/generated/code-snippets/useGridRefImport.json +1 -1
- package/docs/generated/code-snippets/useListCallbackRef.json +4 -0
- package/docs/generated/code-snippets/useListRef.json +2 -2
- package/docs/generated/code-snippets/useListRefImport.json +1 -1
- package/docs/generated/js-docs/Grid.json +44 -28
- package/docs/index.html +2 -2
- package/docs/stats.html +1 -1
- package/package.json +1 -1
- package/docs/assets/index-B8YZlUKM.js +0 -67
- package/docs/assets/index-BMf3NlnJ.css +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
{
|
|
2
|
-
"javaScript": "<span class=\"tok-keyword\">function</span><span class=\"\"> </span><span class=\"tok-variableName tok-definition\">Example</span><span class=\"tok-punctuation\">(</span><span class=\"tok-variableName tok-definition\">props</span><span class=\"tok-punctuation\">)</span><span class=\"\"> </span><span class=\"tok-punctuation\">{</span><span class=\"\"></span><
|
|
3
|
-
"typeScript": "<span class=\"tok-keyword\">function</span><span class=\"\"> </span><span class=\"tok-variableName tok-definition\">Example</span><span class=\"tok-punctuation\">(</span><span class=\"tok-variableName tok-definition\">props</span><span class=\"tok-punctuation\">:</span><span class=\"\"> </span><span class=\"tok-typeName\">Props</span><span class=\"tok-punctuation\">)</span><span class=\"\"> </span><span class=\"tok-punctuation\">{</span><span class=\"\"></span><
|
|
2
|
+
"javaScript": "<div style=\"min-height: 1rem; padding-left: 2ch; text-indent: -2ch;\"><span class=\"tok-keyword\">function</span><span class=\"\"> </span><span class=\"tok-variableName tok-definition\">Example</span><span class=\"tok-punctuation\">(</span><span class=\"tok-variableName tok-definition\">props</span><span class=\"tok-punctuation\">)</span><span class=\"\"> </span><span class=\"tok-punctuation\">{</span><span class=\"\"></span></div>\n<div style=\"min-height: 1rem; padding-left: 4ch; text-indent: -2ch;\"><span class=\"\"></span><span class=\"tok-keyword\">const</span><span class=\"\"> </span><span class=\"tok-variableName tok-definition\">listRef</span><span class=\"\"> </span><span class=\"tok-operator\">=</span><span class=\"\"> </span><span class=\"tok-variableName\">useListRef</span><span class=\"tok-punctuation\">(</span><span class=\"tok-keyword\">null</span><span class=\"tok-punctuation\">)</span><span class=\"tok-punctuation\">;</span><span class=\"\"></span></div>\n<div style=\"min-height: 1rem; padding-left: 2ch; text-indent: -2ch;\"><span class=\"\"></span></div>\n<div style=\"min-height: 1rem; padding-left: 4ch; text-indent: -2ch;\"><span class=\"\"></span><span class=\"tok-keyword\">return</span><span class=\"\"> </span><span class=\"tok-punctuation\"><</span><span class=\"tok-typeName\">List</span><span class=\"\"> </span><span class=\"tok-propertyName\">listRef</span><span class=\"tok-operator\">=</span><span class=\"tok-punctuation\">{</span><span class=\"tok-variableName\">listRef</span><span class=\"tok-punctuation\">}</span><span class=\"\"> </span><span class=\"tok-punctuation\">{</span><span class=\"tok-punctuation\">...</span><span class=\"tok-variableName\">props</span><span class=\"tok-punctuation\">}</span><span class=\"\"> </span><span class=\"tok-punctuation\">/></span><span class=\"tok-punctuation\">;</span><span class=\"\"></span></div>\n<div style=\"min-height: 1rem; padding-left: 2ch; text-indent: -2ch;\"><span class=\"\"></span><span class=\"tok-punctuation\">}</span></div>",
|
|
3
|
+
"typeScript": "<div style=\"min-height: 1rem; padding-left: 2ch; text-indent: -2ch;\"><span class=\"tok-keyword\">function</span><span class=\"\"> </span><span class=\"tok-variableName tok-definition\">Example</span><span class=\"tok-punctuation\">(</span><span class=\"tok-variableName tok-definition\">props</span><span class=\"tok-punctuation\">:</span><span class=\"\"> </span><span class=\"tok-typeName\">Props</span><span class=\"tok-punctuation\">)</span><span class=\"\"> </span><span class=\"tok-punctuation\">{</span><span class=\"\"></span></div>\n<div style=\"min-height: 1rem; padding-left: 4ch; text-indent: -2ch;\"><span class=\"\"></span><span class=\"tok-keyword\">const</span><span class=\"\"> </span><span class=\"tok-variableName tok-definition\">listRef</span><span class=\"\"> </span><span class=\"tok-operator\">=</span><span class=\"\"> </span><span class=\"tok-variableName\">useListRef</span><span class=\"tok-punctuation\">(</span><span class=\"tok-keyword\">null</span><span class=\"tok-punctuation\">)</span><span class=\"tok-punctuation\">;</span><span class=\"\"></span></div>\n<div style=\"min-height: 1rem; padding-left: 2ch; text-indent: -2ch;\"><span class=\"\"></span></div>\n<div style=\"min-height: 1rem; padding-left: 4ch; text-indent: -2ch;\"><span class=\"\"></span><span class=\"tok-keyword\">return</span><span class=\"\"> </span><span class=\"tok-punctuation\"><</span><span class=\"tok-typeName\">List</span><span class=\"\"> </span><span class=\"tok-propertyName\">listRef</span><span class=\"tok-operator\">=</span><span class=\"tok-punctuation\">{</span><span class=\"tok-variableName\">listRef</span><span class=\"tok-punctuation\">}</span><span class=\"\"> </span><span class=\"tok-punctuation\">{</span><span class=\"tok-punctuation\">...</span><span class=\"tok-variableName\">props</span><span class=\"tok-punctuation\">}</span><span class=\"\"> </span><span class=\"tok-punctuation\">/></span><span class=\"tok-punctuation\">;</span><span class=\"\"></span></div>\n<div style=\"min-height: 1rem; padding-left: 2ch; text-indent: -2ch;\"><span class=\"\"></span><span class=\"tok-punctuation\">}</span></div>"
|
|
4
4
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
{
|
|
2
|
-
"javaScript": "<span class=\"tok-keyword\">import</span><span class=\"\"> </span><span class=\"tok-punctuation\">{</span><span class=\"\"> </span><span class=\"tok-variableName tok-definition\">useListRef</span><span class=\"\"> </span><span class=\"tok-punctuation\">}</span><span class=\"\"> </span><span class=\"tok-keyword\">from</span><span class=\"\"> </span><span class=\"tok-string\">\"react-window\"</span><span class=\"tok-punctuation\">;</span>"
|
|
2
|
+
"javaScript": "<div style=\"min-height: 1rem; padding-left: 2ch; text-indent: -2ch;\"><span class=\"tok-keyword\">import</span><span class=\"\"> </span><span class=\"tok-punctuation\">{</span><span class=\"\"> </span><span class=\"tok-variableName tok-definition\">useListRef</span><span class=\"\"> </span><span class=\"tok-punctuation\">}</span><span class=\"\"> </span><span class=\"tok-keyword\">from</span><span class=\"\"> </span><span class=\"tok-string\">\"react-window\"</span><span class=\"tok-punctuation\">;</span></div>"
|
|
3
3
|
}
|
|
@@ -9,7 +9,15 @@
|
|
|
9
9
|
"defaultValue": null,
|
|
10
10
|
"description": "CSS class name.",
|
|
11
11
|
"name": "className",
|
|
12
|
+
"parent": {
|
|
13
|
+
"fileName": "react-window/node_modules/.pnpm/@types+react@19.1.8/node_modules/@types/react/index.d.ts",
|
|
14
|
+
"name": "HTMLAttributes"
|
|
15
|
+
},
|
|
12
16
|
"declarations": [
|
|
17
|
+
{
|
|
18
|
+
"fileName": "react-window/node_modules/.pnpm/@types+react@19.1.8/node_modules/@types/react/index.d.ts",
|
|
19
|
+
"name": "HTMLAttributes"
|
|
20
|
+
},
|
|
13
21
|
{
|
|
14
22
|
"fileName": "react-window/lib/components/grid/types.ts",
|
|
15
23
|
"name": "TypeLiteral"
|
|
@@ -29,6 +37,41 @@
|
|
|
29
37
|
]
|
|
30
38
|
}
|
|
31
39
|
},
|
|
40
|
+
"style": {
|
|
41
|
+
"defaultValue": null,
|
|
42
|
+
"description": "Optional CSS properties.\nThe grid of cells will fill the height and width defined by this style.",
|
|
43
|
+
"name": "style",
|
|
44
|
+
"parent": {
|
|
45
|
+
"fileName": "react-window/node_modules/.pnpm/@types+react@19.1.8/node_modules/@types/react/index.d.ts",
|
|
46
|
+
"name": "HTMLAttributes"
|
|
47
|
+
},
|
|
48
|
+
"declarations": [
|
|
49
|
+
{
|
|
50
|
+
"fileName": "react-window/node_modules/.pnpm/@types+react@19.1.8/node_modules/@types/react/index.d.ts",
|
|
51
|
+
"name": "HTMLAttributes"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"fileName": "react-window/lib/components/grid/types.ts",
|
|
55
|
+
"name": "TypeLiteral"
|
|
56
|
+
}
|
|
57
|
+
],
|
|
58
|
+
"required": false,
|
|
59
|
+
"type": {
|
|
60
|
+
"name": "enum",
|
|
61
|
+
"raw": "CSSProperties | undefined",
|
|
62
|
+
"value": [
|
|
63
|
+
{
|
|
64
|
+
"value": "undefined"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"value": "CSSProperties",
|
|
68
|
+
"description": "",
|
|
69
|
+
"fullComment": "",
|
|
70
|
+
"tags": {}
|
|
71
|
+
}
|
|
72
|
+
]
|
|
73
|
+
}
|
|
74
|
+
},
|
|
32
75
|
"defaultHeight": {
|
|
33
76
|
"defaultValue": {
|
|
34
77
|
"value": "0"
|
|
@@ -83,7 +126,7 @@
|
|
|
83
126
|
},
|
|
84
127
|
"cellComponent": {
|
|
85
128
|
"defaultValue": null,
|
|
86
|
-
"description": "React component responsible for rendering a cell.\n\nThis component will receive an `index` and `style` prop by default.\nAdditionally it will receive prop values passed to `cellProps`.\n\n⚠️ The prop types for this component are exported as `
|
|
129
|
+
"description": "React component responsible for rendering a cell.\n\nThis component will receive an `index` and `style` prop by default.\nAdditionally it will receive prop values passed to `cellProps`.\n\n⚠️ The prop types for this component are exported as `CellComponentProps`",
|
|
87
130
|
"name": "cellComponent",
|
|
88
131
|
"declarations": [
|
|
89
132
|
{
|
|
@@ -286,33 +329,6 @@
|
|
|
286
329
|
}
|
|
287
330
|
]
|
|
288
331
|
}
|
|
289
|
-
},
|
|
290
|
-
"style": {
|
|
291
|
-
"defaultValue": null,
|
|
292
|
-
"description": "Optional CSS properties.\nThe grid of cells will fill the height and width defined by this style.",
|
|
293
|
-
"name": "style",
|
|
294
|
-
"declarations": [
|
|
295
|
-
{
|
|
296
|
-
"fileName": "react-window/lib/components/grid/types.ts",
|
|
297
|
-
"name": "TypeLiteral"
|
|
298
|
-
}
|
|
299
|
-
],
|
|
300
|
-
"required": false,
|
|
301
|
-
"type": {
|
|
302
|
-
"name": "enum",
|
|
303
|
-
"raw": "CSSProperties | undefined",
|
|
304
|
-
"value": [
|
|
305
|
-
{
|
|
306
|
-
"value": "undefined"
|
|
307
|
-
},
|
|
308
|
-
{
|
|
309
|
-
"value": "CSSProperties",
|
|
310
|
-
"description": "",
|
|
311
|
-
"fullComment": "",
|
|
312
|
-
"tags": {}
|
|
313
|
-
}
|
|
314
|
-
]
|
|
315
|
-
}
|
|
316
332
|
}
|
|
317
333
|
}
|
|
318
334
|
}
|
package/docs/index.html
CHANGED
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
/>
|
|
21
21
|
<meta property="og:image:width" content="1500" />
|
|
22
22
|
<meta property="og:image:height" content="500" />
|
|
23
|
-
<script type="module" crossorigin src="/assets/index-
|
|
24
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
23
|
+
<script type="module" crossorigin src="/assets/index-C0dH_qJq.js"></script>
|
|
24
|
+
<link rel="stylesheet" crossorigin href="/assets/index-DuD8RcK_.css">
|
|
25
25
|
</head>
|
|
26
26
|
<body>
|
|
27
27
|
<div id="root"></div>
|