@react-stately/virtualizer 3.0.0-nightly-641446f65-240905

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.
Files changed (71) hide show
  1. package/README.md +3 -0
  2. package/dist/Layout.main.js +43 -0
  3. package/dist/Layout.main.js.map +1 -0
  4. package/dist/Layout.mjs +38 -0
  5. package/dist/Layout.module.js +38 -0
  6. package/dist/Layout.module.js.map +1 -0
  7. package/dist/LayoutInfo.main.js +51 -0
  8. package/dist/LayoutInfo.main.js.map +1 -0
  9. package/dist/LayoutInfo.mjs +46 -0
  10. package/dist/LayoutInfo.module.js +46 -0
  11. package/dist/LayoutInfo.module.js.map +1 -0
  12. package/dist/OverscanManager.main.js +52 -0
  13. package/dist/OverscanManager.main.js.map +1 -0
  14. package/dist/OverscanManager.mjs +47 -0
  15. package/dist/OverscanManager.module.js +47 -0
  16. package/dist/OverscanManager.module.js.map +1 -0
  17. package/dist/Point.main.js +40 -0
  18. package/dist/Point.main.js.map +1 -0
  19. package/dist/Point.mjs +35 -0
  20. package/dist/Point.module.js +35 -0
  21. package/dist/Point.module.js.map +1 -0
  22. package/dist/Rect.main.js +130 -0
  23. package/dist/Rect.main.js.map +1 -0
  24. package/dist/Rect.mjs +125 -0
  25. package/dist/Rect.module.js +125 -0
  26. package/dist/Rect.module.js.map +1 -0
  27. package/dist/ReusableView.main.js +56 -0
  28. package/dist/ReusableView.main.js.map +1 -0
  29. package/dist/ReusableView.mjs +51 -0
  30. package/dist/ReusableView.module.js +51 -0
  31. package/dist/ReusableView.module.js.map +1 -0
  32. package/dist/Size.main.js +40 -0
  33. package/dist/Size.main.js.map +1 -0
  34. package/dist/Size.mjs +35 -0
  35. package/dist/Size.module.js +35 -0
  36. package/dist/Size.module.js.map +1 -0
  37. package/dist/Virtualizer.main.js +233 -0
  38. package/dist/Virtualizer.main.js.map +1 -0
  39. package/dist/Virtualizer.mjs +228 -0
  40. package/dist/Virtualizer.module.js +228 -0
  41. package/dist/Virtualizer.module.js.map +1 -0
  42. package/dist/import.mjs +29 -0
  43. package/dist/main.js +40 -0
  44. package/dist/main.js.map +1 -0
  45. package/dist/module.js +29 -0
  46. package/dist/module.js.map +1 -0
  47. package/dist/types.d.ts +347 -0
  48. package/dist/types.d.ts.map +1 -0
  49. package/dist/useVirtualizerState.main.js +94 -0
  50. package/dist/useVirtualizerState.main.js.map +1 -0
  51. package/dist/useVirtualizerState.mjs +89 -0
  52. package/dist/useVirtualizerState.module.js +89 -0
  53. package/dist/useVirtualizerState.module.js.map +1 -0
  54. package/dist/utils.main.js +27 -0
  55. package/dist/utils.main.js.map +1 -0
  56. package/dist/utils.mjs +22 -0
  57. package/dist/utils.module.js +22 -0
  58. package/dist/utils.module.js.map +1 -0
  59. package/package.json +36 -0
  60. package/src/Layout.ts +93 -0
  61. package/src/LayoutInfo.ts +108 -0
  62. package/src/OverscanManager.ts +56 -0
  63. package/src/Point.ts +45 -0
  64. package/src/Rect.ts +191 -0
  65. package/src/ReusableView.ts +83 -0
  66. package/src/Size.ts +43 -0
  67. package/src/Virtualizer.ts +347 -0
  68. package/src/index.ts +23 -0
  69. package/src/types.ts +43 -0
  70. package/src/useVirtualizerState.ts +110 -0
  71. package/src/utils.ts +30 -0
@@ -0,0 +1,228 @@
1
+ import {isSetEqual as $fc36f9a046a9ce79$export$a8d0d0c8d1c5df64} from "./utils.module.js";
2
+ import {OverscanManager as $364191b3decf3697$export$4455ee6afb38dcbb} from "./OverscanManager.module.js";
3
+ import {Rect as $60423f92c7f9ad87$export$c79fc6492f3af13d} from "./Rect.module.js";
4
+ import {ReusableView as $ad1d98aa8f0c31b4$export$1a5223887c560441} from "./ReusableView.module.js";
5
+ import {Size as $ee1bfa90a957fb8a$export$cb6da89c6af1a8ec} from "./Size.module.js";
6
+
7
+ /*
8
+ * Copyright 2020 Adobe. All rights reserved.
9
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
10
+ * you may not use this file except in compliance with the License. You may obtain a copy
11
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software distributed under
14
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
15
+ * OF ANY KIND, either express or implied. See the License for the specific language
16
+ * governing permissions and limitations under the License.
17
+ */
18
+
19
+
20
+
21
+
22
+ class $38b9490c1cca8fc4$export$89be5a243e59c4b2 {
23
+ /** Returns whether the given key, or an ancestor, is persisted. */ isPersistedKey(key) {
24
+ // Quick check if the key is directly in the set of persisted keys.
25
+ if (this.persistedKeys.has(key)) return true;
26
+ // If not, check if the key is an ancestor of any of the persisted keys.
27
+ for (let k of this.persistedKeys)while(k != null){
28
+ let layoutInfo = this.layout.getLayoutInfo(k);
29
+ if (!layoutInfo) break;
30
+ k = layoutInfo.parentKey;
31
+ if (k === key) return true;
32
+ }
33
+ return false;
34
+ }
35
+ getParentView(layoutInfo) {
36
+ return layoutInfo.parentKey != null ? this._visibleViews.get(layoutInfo.parentKey) : this._rootView;
37
+ }
38
+ getReusableView(layoutInfo) {
39
+ let parentView = this.getParentView(layoutInfo);
40
+ let view = parentView.getReusableView(layoutInfo.type);
41
+ view.layoutInfo = layoutInfo;
42
+ this._renderView(view);
43
+ return view;
44
+ }
45
+ _renderView(reusableView) {
46
+ let { type: type, key: key } = reusableView.layoutInfo;
47
+ reusableView.content = this.collection.getItem(key);
48
+ reusableView.rendered = this._renderContent(type, reusableView.content);
49
+ }
50
+ _renderContent(type, content) {
51
+ let cached = this._renderedContent.get(content);
52
+ if (cached != null) return cached;
53
+ let rendered = this.delegate.renderView(type, content);
54
+ if (content) this._renderedContent.set(content, rendered);
55
+ return rendered;
56
+ }
57
+ /**
58
+ * Returns the key for the item view currently at the given point.
59
+ */ keyAtPoint(point) {
60
+ let rect = new (0, $60423f92c7f9ad87$export$c79fc6492f3af13d)(point.x, point.y, 1, 1);
61
+ let layoutInfos = rect.area === 0 ? [] : this.layout.getVisibleLayoutInfos(rect);
62
+ // Layout may return multiple layout infos in the case of
63
+ // persisted keys, so find the first one that actually intersects.
64
+ for (let layoutInfo of layoutInfos){
65
+ if (layoutInfo.rect.intersects(rect)) return layoutInfo.key;
66
+ }
67
+ return null;
68
+ }
69
+ relayout(context = {}) {
70
+ // Update the layout
71
+ this.layout.update(context);
72
+ this.contentSize = this.layout.getContentSize();
73
+ // Constrain scroll position.
74
+ // If the content changed, scroll to the top.
75
+ let visibleRect = this.visibleRect;
76
+ let contentOffsetX = context.contentChanged ? 0 : visibleRect.x;
77
+ let contentOffsetY = context.contentChanged ? 0 : visibleRect.y;
78
+ contentOffsetX = Math.max(0, Math.min(this.contentSize.width - visibleRect.width, contentOffsetX));
79
+ contentOffsetY = Math.max(0, Math.min(this.contentSize.height - visibleRect.height, contentOffsetY));
80
+ if (contentOffsetX !== visibleRect.x || contentOffsetY !== visibleRect.y) {
81
+ // If the offset changed, trigger a new re-render.
82
+ let rect = new (0, $60423f92c7f9ad87$export$c79fc6492f3af13d)(contentOffsetX, contentOffsetY, visibleRect.width, visibleRect.height);
83
+ this.delegate.setVisibleRect(rect);
84
+ } else this.updateSubviews();
85
+ }
86
+ getVisibleLayoutInfos() {
87
+ let isTestEnv = false;
88
+ let isClientWidthMocked = isTestEnv && typeof HTMLElement !== 'undefined' && Object.getOwnPropertyNames(HTMLElement.prototype).includes('clientWidth');
89
+ let isClientHeightMocked = isTestEnv && typeof HTMLElement !== 'undefined' && Object.getOwnPropertyNames(HTMLElement.prototype).includes('clientHeight');
90
+ let rect;
91
+ if (isTestEnv && !(isClientWidthMocked && isClientHeightMocked)) rect = new (0, $60423f92c7f9ad87$export$c79fc6492f3af13d)(0, 0, this.contentSize.width, this.contentSize.height);
92
+ else rect = this._overscanManager.getOverscannedRect();
93
+ let layoutInfos = rect.area === 0 ? [] : this.layout.getVisibleLayoutInfos(rect);
94
+ let map = new Map;
95
+ for (let layoutInfo of layoutInfos)map.set(layoutInfo.key, layoutInfo);
96
+ return map;
97
+ }
98
+ updateSubviews() {
99
+ let visibleLayoutInfos = this.getVisibleLayoutInfos();
100
+ let removed = new Set();
101
+ for (let [key, view] of this._visibleViews){
102
+ let layoutInfo = visibleLayoutInfos.get(key);
103
+ // If a view's parent changed, treat it as a delete and re-create in the new parent.
104
+ if (!layoutInfo || view.parent !== this.getParentView(layoutInfo)) {
105
+ this._visibleViews.delete(key);
106
+ view.parent.reuseChild(view);
107
+ removed.add(view); // Defer removing in case we reuse this view.
108
+ }
109
+ }
110
+ for (let [key, layoutInfo] of visibleLayoutInfos){
111
+ let view = this._visibleViews.get(key);
112
+ if (!view) {
113
+ view = this.getReusableView(layoutInfo);
114
+ view.parent.children.add(view);
115
+ this._visibleViews.set(key, view);
116
+ removed.delete(view);
117
+ } else {
118
+ view.layoutInfo = layoutInfo;
119
+ let item = this.collection.getItem(layoutInfo.key);
120
+ if (view.content !== item) {
121
+ this._renderedContent.delete(view.content);
122
+ this._renderView(view);
123
+ }
124
+ }
125
+ }
126
+ // The remaining views in `removed` were not reused to render new items.
127
+ // They should be removed from the DOM. We also clear the reusable view queue
128
+ // here since there's no point holding onto views that have been removed.
129
+ // Doing so hurts performance in the future when reusing elements due to FIFO order.
130
+ for (let view of removed){
131
+ view.parent.children.delete(view);
132
+ view.parent.reusableViews.clear();
133
+ }
134
+ // Reordering DOM nodes is costly, so we defer this until scrolling stops.
135
+ // DOM order does not affect visual order (due to absolute positioning),
136
+ // but does matter for assistive technology users.
137
+ if (!this._isScrolling) // Layout infos must be in topological order (parents before children).
138
+ for (let key of visibleLayoutInfos.keys()){
139
+ let view = this._visibleViews.get(key);
140
+ view.parent.children.delete(view);
141
+ view.parent.children.add(view);
142
+ }
143
+ }
144
+ /** Performs layout and updates visible views as needed. */ render(opts) {
145
+ let mutableThis = this;
146
+ let needsLayout = false;
147
+ let offsetChanged = false;
148
+ let sizeChanged = false;
149
+ let itemSizeChanged = false;
150
+ let needsUpdate = false;
151
+ if (opts.collection !== this.collection) {
152
+ mutableThis.collection = opts.collection;
153
+ needsLayout = true;
154
+ }
155
+ if (opts.layout !== this.layout) {
156
+ if (this.layout) this.layout.virtualizer = null;
157
+ opts.layout.virtualizer = this;
158
+ mutableThis.layout = opts.layout;
159
+ needsLayout = true;
160
+ }
161
+ if (opts.persistedKeys && !(0, $fc36f9a046a9ce79$export$a8d0d0c8d1c5df64)(opts.persistedKeys, this.persistedKeys)) {
162
+ mutableThis.persistedKeys = opts.persistedKeys;
163
+ needsUpdate = true;
164
+ }
165
+ if (!this.visibleRect.equals(opts.visibleRect)) {
166
+ this._overscanManager.setVisibleRect(opts.visibleRect);
167
+ let shouldInvalidate = this.layout.shouldInvalidate(opts.visibleRect, this.visibleRect);
168
+ if (shouldInvalidate) {
169
+ offsetChanged = !opts.visibleRect.pointEquals(this.visibleRect);
170
+ sizeChanged = !opts.visibleRect.sizeEquals(this.visibleRect);
171
+ needsLayout = true;
172
+ } else needsUpdate = true;
173
+ mutableThis.visibleRect = opts.visibleRect;
174
+ }
175
+ if (opts.invalidationContext !== this._invalidationContext) {
176
+ if (opts.invalidationContext) {
177
+ sizeChanged || (sizeChanged = opts.invalidationContext.sizeChanged || false);
178
+ offsetChanged || (offsetChanged = opts.invalidationContext.offsetChanged || false);
179
+ itemSizeChanged || (itemSizeChanged = opts.invalidationContext.itemSizeChanged || false);
180
+ needsLayout || (needsLayout = itemSizeChanged || sizeChanged || offsetChanged);
181
+ needsLayout || (needsLayout = opts.invalidationContext.layoutOptions !== this._invalidationContext.layoutOptions);
182
+ }
183
+ this._invalidationContext = opts.invalidationContext;
184
+ }
185
+ if (opts.isScrolling !== this._isScrolling) {
186
+ this._isScrolling = opts.isScrolling;
187
+ if (!opts.isScrolling) // Update to fix the DOM order after scrolling.
188
+ needsUpdate = true;
189
+ }
190
+ if (needsLayout) this.relayout({
191
+ offsetChanged: offsetChanged,
192
+ sizeChanged: sizeChanged,
193
+ itemSizeChanged: itemSizeChanged,
194
+ layoutOptions: this._invalidationContext.layoutOptions
195
+ });
196
+ else if (needsUpdate) this.updateSubviews();
197
+ return Array.from(this._rootView.children);
198
+ }
199
+ getVisibleView(key) {
200
+ return this._visibleViews.get(key);
201
+ }
202
+ invalidate(context) {
203
+ this.delegate.invalidate(context);
204
+ }
205
+ updateItemSize(key, size) {
206
+ if (!this.layout.updateItemSize) return;
207
+ let changed = this.layout.updateItemSize(key, size);
208
+ if (changed) this.invalidate({
209
+ itemSizeChanged: true
210
+ });
211
+ }
212
+ constructor(delegate){
213
+ this.delegate = delegate;
214
+ this.contentSize = new (0, $ee1bfa90a957fb8a$export$cb6da89c6af1a8ec);
215
+ this.visibleRect = new (0, $60423f92c7f9ad87$export$c79fc6492f3af13d);
216
+ this.persistedKeys = new Set();
217
+ this._visibleViews = new Map();
218
+ this._renderedContent = new WeakMap();
219
+ this._rootView = new (0, $ad1d98aa8f0c31b4$export$1a5223887c560441)(this);
220
+ this._isScrolling = false;
221
+ this._invalidationContext = null;
222
+ this._overscanManager = new (0, $364191b3decf3697$export$4455ee6afb38dcbb)();
223
+ }
224
+ }
225
+
226
+
227
+ export {$38b9490c1cca8fc4$export$89be5a243e59c4b2 as Virtualizer};
228
+ //# sourceMappingURL=Virtualizer.module.js.map
@@ -0,0 +1 @@
1
+ {"mappings":";;;;;;AAAA;;;;;;;;;;CAUC;;;;;AA6BM,MAAM;IAsCX,iEAAiE,GACjE,eAAe,GAAQ,EAAE;QACvB,mEAAmE;QACnE,IAAI,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,MACzB,OAAO;QAGT,wEAAwE;QACxE,KAAK,IAAI,KAAK,IAAI,CAAC,aAAa,CAC9B,MAAO,KAAK,KAAM;YAChB,IAAI,aAAa,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC;YAC3C,IAAI,CAAC,YACH;YAGF,IAAI,WAAW,SAAS;YAExB,IAAI,MAAM,KACR,OAAO;QAEX;QAGF,OAAO;IACT;IAEQ,cAAc,UAAsB,EAAkC;QAC5E,OAAO,WAAW,SAAS,IAAI,OAAO,IAAI,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AQ,EAAE,IAAU,EAAE;QACnC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,cAAc,EAC7B;QAGF,IAAI,UAAU,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,KAAK;QAC9C,IAAI,SACF,IAAI,CAAC,UAAU,CAAC;YACd,iBAAiB;QACnB;IAEJ;IAzRA,YAAY,QAAmC,CAAE;QAC/C,IAAI,CAAC,QAAQ,GAAG;QAChB,IAAI,CAAC,WAAW,GAAG,IAAI,CAAA,GAAA,yCAAG;QAC1B,IAAI,CAAC,WAAW,GAAG,IAAI,CAAA,GAAA,yCAAG;QAC1B,IAAI,CAAC,aAAa,GAAG,IAAI;QACzB,IAAI,CAAC,aAAa,GAAG,IAAI;QACzB,IAAI,CAAC,gBAAgB,GAAG,IAAI;QAC5B,IAAI,CAAC,SAAS,GAAG,IAAI,CAAA,GAAA,yCAAW,EAAE,IAAI;QACtC,IAAI,CAAC,YAAY,GAAG;QACpB,IAAI,CAAC,oBAAoB,GAAG;QAC5B,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAA,GAAA,yCAAc;IAC5C;AA+QF","sources":["packages/@react-stately/virtualizer/src/Virtualizer.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {Collection, Key} from '@react-types/shared';\nimport {InvalidationContext, Mutable, VirtualizerDelegate, VirtualizerRenderOptions} from './types';\nimport {isSetEqual} from './utils';\nimport {Layout} from './Layout';\nimport {LayoutInfo} from './LayoutInfo';\nimport {OverscanManager} from './OverscanManager';\nimport {Point} from './Point';\nimport {Rect} from './Rect';\nimport {ReusableView} from './ReusableView';\nimport {Size} from './Size';\n\n/**\n * The Virtualizer class renders a scrollable collection of data using customizable layouts.\n * It supports very large collections by only rendering visible views to the DOM, reusing\n * them as you scroll. Virtualizer can present any type of view, including non-item views\n * such as section headers and footers.\n *\n * Virtualizer uses {@link Layout} objects to compute what views should be visible, and how\n * to position and style them. This means that virtualizer can have its items arranged in\n * a stack, a grid, a circle, or any other layout you can think of. The layout can be changed\n * dynamically at runtime as well.\n *\n * Layouts produce information on what views should appear in the virtualizer, but do not create\n * the views themselves directly. It is the responsibility of the {@link VirtualizerDelegate} object\n * to render elements for each layout info. The virtualizer manages a set of {@link ReusableView} objects,\n * which are reused as the user scrolls by swapping their content with cached elements returned by the delegate.\n */\nexport class Virtualizer<T extends object, V> {\n /**\n * The virtualizer delegate. The delegate is used by the virtualizer\n * to create and configure views.\n */\n delegate: VirtualizerDelegate<T, V>;\n\n /** The current content of the virtualizer. */\n readonly collection: Collection<T>;\n /** The layout object that determines the visible views. */\n readonly layout: Layout<T>;\n /** The size of the scrollable content. */\n readonly contentSize: Size;\n /** The currently visible rectangle. */\n readonly visibleRect: Rect;\n /** The set of persisted keys that are always present in the DOM, even if not currently in view. */\n readonly persistedKeys: Set<Key>;\n\n private _visibleViews: Map<Key, ReusableView<T, V>>;\n private _renderedContent: WeakMap<T, V>;\n private _rootView: ReusableView<T, V>;\n private _isScrolling: boolean;\n private _invalidationContext: InvalidationContext | null;\n private _overscanManager: OverscanManager;\n\n constructor(delegate: VirtualizerDelegate<T, V>) {\n this.delegate = delegate;\n this.contentSize = new Size;\n this.visibleRect = new Rect;\n this.persistedKeys = new Set();\n this._visibleViews = new Map();\n this._renderedContent = new WeakMap();\n this._rootView = new ReusableView(this);\n this._isScrolling = false;\n this._invalidationContext = null;\n this._overscanManager = new OverscanManager();\n }\n\n /** Returns whether the given key, or an ancestor, is persisted. */\n isPersistedKey(key: Key) {\n // Quick check if the key is directly in the set of persisted keys.\n if (this.persistedKeys.has(key)) {\n return true;\n }\n\n // If not, check if the key is an ancestor of any of the persisted keys.\n for (let k of this.persistedKeys) {\n while (k != null) {\n let layoutInfo = this.layout.getLayoutInfo(k);\n if (!layoutInfo) {\n break;\n }\n\n k = layoutInfo.parentKey;\n\n if (k === key) {\n return true;\n }\n }\n }\n\n return false;\n }\n\n private getParentView(layoutInfo: LayoutInfo): ReusableView<T, V> | undefined {\n return layoutInfo.parentKey != null ? this._visibleViews.get(layoutInfo.parentKey) : this._rootView;\n }\n\n private getReusableView(layoutInfo: LayoutInfo): ReusableView<T, V> {\n let parentView = this.getParentView(layoutInfo)!;\n let view = parentView.getReusableView(layoutInfo.type);\n view.layoutInfo = layoutInfo;\n this._renderView(view);\n return view;\n }\n\n private _renderView(reusableView: ReusableView<T, V>) {\n let {type, key} = reusableView.layoutInfo;\n reusableView.content = this.collection.getItem(key);\n reusableView.rendered = this._renderContent(type, reusableView.content);\n }\n\n private _renderContent(type: string, content: T) {\n let cached = this._renderedContent.get(content);\n if (cached != null) {\n return cached;\n }\n\n let rendered = this.delegate.renderView(type, content);\n if (content) {\n this._renderedContent.set(content, rendered);\n }\n return rendered;\n }\n\n /**\n * Returns the key for the item view currently at the given point.\n */\n keyAtPoint(point: Point): Key | null {\n let rect = new Rect(point.x, point.y, 1, 1);\n let layoutInfos = rect.area === 0 ? [] : this.layout.getVisibleLayoutInfos(rect);\n\n // Layout may return multiple layout infos in the case of\n // persisted keys, so find the first one that actually intersects.\n for (let layoutInfo of layoutInfos) {\n if (layoutInfo.rect.intersects(rect)) {\n return layoutInfo.key;\n }\n }\n\n return null;\n }\n\n private relayout(context: InvalidationContext = {}) {\n // Update the layout\n this.layout.update(context);\n (this as Mutable<this>).contentSize = this.layout.getContentSize();\n\n // Constrain scroll position.\n // If the content changed, scroll to the top.\n let visibleRect = this.visibleRect;\n let contentOffsetX = context.contentChanged ? 0 : visibleRect.x;\n let contentOffsetY = context.contentChanged ? 0 : visibleRect.y;\n contentOffsetX = Math.max(0, Math.min(this.contentSize.width - visibleRect.width, contentOffsetX));\n contentOffsetY = Math.max(0, Math.min(this.contentSize.height - visibleRect.height, contentOffsetY));\n\n if (contentOffsetX !== visibleRect.x || contentOffsetY !== visibleRect.y) {\n // If the offset changed, trigger a new re-render.\n let rect = new Rect(contentOffsetX, contentOffsetY, visibleRect.width, visibleRect.height);\n this.delegate.setVisibleRect(rect);\n } else {\n this.updateSubviews();\n }\n }\n\n getVisibleLayoutInfos() {\n let isTestEnv = process.env.NODE_ENV === 'test' && !process.env.VIRT_ON;\n let isClientWidthMocked = isTestEnv && typeof HTMLElement !== 'undefined' && Object.getOwnPropertyNames(HTMLElement.prototype).includes('clientWidth');\n let isClientHeightMocked = isTestEnv && typeof HTMLElement !== 'undefined' && Object.getOwnPropertyNames(HTMLElement.prototype).includes('clientHeight');\n\n let rect: Rect;\n if (isTestEnv && !(isClientWidthMocked && isClientHeightMocked)) {\n rect = new Rect(0, 0, this.contentSize.width, this.contentSize.height);\n } else {\n rect = this._overscanManager.getOverscannedRect();\n }\n\n let layoutInfos = rect.area === 0 ? [] : this.layout.getVisibleLayoutInfos(rect);\n let map = new Map;\n for (let layoutInfo of layoutInfos) {\n map.set(layoutInfo.key, layoutInfo);\n }\n\n return map;\n }\n\n private updateSubviews() {\n let visibleLayoutInfos = this.getVisibleLayoutInfos();\n\n let removed = new Set<ReusableView<T, V>>();\n for (let [key, view] of this._visibleViews) {\n let layoutInfo = visibleLayoutInfos.get(key);\n // If a view's parent changed, treat it as a delete and re-create in the new parent.\n if (!layoutInfo || view.parent !== this.getParentView(layoutInfo)) {\n this._visibleViews.delete(key);\n view.parent.reuseChild(view);\n removed.add(view); // Defer removing in case we reuse this view.\n }\n }\n\n for (let [key, layoutInfo] of visibleLayoutInfos) {\n let view = this._visibleViews.get(key);\n if (!view) {\n view = this.getReusableView(layoutInfo);\n view.parent.children.add(view);\n this._visibleViews.set(key, view);\n removed.delete(view);\n } else {\n view.layoutInfo = layoutInfo;\n\n let item = this.collection.getItem(layoutInfo.key);\n if (view.content !== item) {\n this._renderedContent.delete(view.content);\n this._renderView(view);\n }\n }\n }\n\n // The remaining views in `removed` were not reused to render new items.\n // They should be removed from the DOM. We also clear the reusable view queue\n // here since there's no point holding onto views that have been removed.\n // Doing so hurts performance in the future when reusing elements due to FIFO order.\n for (let view of removed) {\n view.parent.children.delete(view);\n view.parent.reusableViews.clear();\n }\n\n // Reordering DOM nodes is costly, so we defer this until scrolling stops.\n // DOM order does not affect visual order (due to absolute positioning),\n // but does matter for assistive technology users.\n if (!this._isScrolling) {\n // Layout infos must be in topological order (parents before children).\n for (let key of visibleLayoutInfos.keys()) {\n let view = this._visibleViews.get(key)!;\n view.parent.children.delete(view);\n view.parent.children.add(view);\n }\n }\n }\n\n /** Performs layout and updates visible views as needed. */\n render(opts: VirtualizerRenderOptions<T>): ReusableView<T, V>[] {\n let mutableThis: Mutable<this> = this;\n let needsLayout = false;\n let offsetChanged = false;\n let sizeChanged = false;\n let itemSizeChanged = false;\n let needsUpdate = false;\n\n if (opts.collection !== this.collection) {\n mutableThis.collection = opts.collection;\n needsLayout = true;\n }\n\n if (opts.layout !== this.layout) {\n if (this.layout) {\n this.layout.virtualizer = null;\n }\n\n opts.layout.virtualizer = this;\n mutableThis.layout = opts.layout;\n needsLayout = true;\n }\n\n if (opts.persistedKeys && !isSetEqual(opts.persistedKeys, this.persistedKeys)) {\n mutableThis.persistedKeys = opts.persistedKeys;\n needsUpdate = true;\n }\n\n if (!this.visibleRect.equals(opts.visibleRect)) {\n this._overscanManager.setVisibleRect(opts.visibleRect);\n let shouldInvalidate = this.layout.shouldInvalidate(opts.visibleRect, this.visibleRect);\n\n if (shouldInvalidate) {\n offsetChanged = !opts.visibleRect.pointEquals(this.visibleRect);\n sizeChanged = !opts.visibleRect.sizeEquals(this.visibleRect);\n needsLayout = true;\n } else {\n needsUpdate = true;\n }\n\n mutableThis.visibleRect = opts.visibleRect;\n }\n\n if (opts.invalidationContext !== this._invalidationContext) {\n if (opts.invalidationContext) {\n sizeChanged ||= opts.invalidationContext.sizeChanged || false;\n offsetChanged ||= opts.invalidationContext.offsetChanged || false;\n itemSizeChanged ||= opts.invalidationContext.itemSizeChanged || false;\n needsLayout ||= itemSizeChanged || sizeChanged || offsetChanged;\n needsLayout ||= opts.invalidationContext.layoutOptions !== this._invalidationContext.layoutOptions;\n }\n this._invalidationContext = opts.invalidationContext;\n }\n\n if (opts.isScrolling !== this._isScrolling) {\n this._isScrolling = opts.isScrolling;\n if (!opts.isScrolling) {\n // Update to fix the DOM order after scrolling.\n needsUpdate = true;\n }\n }\n\n if (needsLayout) {\n this.relayout({\n offsetChanged,\n sizeChanged,\n itemSizeChanged,\n layoutOptions: this._invalidationContext.layoutOptions\n });\n } else if (needsUpdate) {\n this.updateSubviews();\n }\n\n return Array.from(this._rootView.children);\n }\n\n getVisibleView(key: Key): ReusableView<T, V> | undefined {\n return this._visibleViews.get(key);\n }\n\n invalidate(context: InvalidationContext) {\n this.delegate.invalidate(context);\n }\n\n updateItemSize(key: Key, size: Size) {\n if (!this.layout.updateItemSize) {\n return;\n }\n\n let changed = this.layout.updateItemSize(key, size);\n if (changed) {\n this.invalidate({\n itemSizeChanged: true\n });\n }\n }\n}\n"],"names":[],"version":3,"file":"Virtualizer.module.js.map"}
@@ -0,0 +1,29 @@
1
+ import {Layout as $c74cda7d31af1253$export$c84671f46d6a1ca} from "./Layout.mjs";
2
+ import {LayoutInfo as $d7fd61009c21d0bb$export$7e0eeb9da702a085} from "./LayoutInfo.mjs";
3
+ import {Point as $3041db3296945e6e$export$baf26146a414f24a} from "./Point.mjs";
4
+ import {Rect as $60423f92c7f9ad87$export$c79fc6492f3af13d} from "./Rect.mjs";
5
+ import {Size as $ee1bfa90a957fb8a$export$cb6da89c6af1a8ec} from "./Size.mjs";
6
+ import {ReusableView as $ad1d98aa8f0c31b4$export$1a5223887c560441} from "./ReusableView.mjs";
7
+ import {useVirtualizerState as $fc0b13b484ac1194$export$1505db82fe357e65} from "./useVirtualizerState.mjs";
8
+
9
+ /*
10
+ * Copyright 2020 Adobe. All rights reserved.
11
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
12
+ * you may not use this file except in compliance with the License. You may obtain a copy
13
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
14
+ *
15
+ * Unless required by applicable law or agreed to in writing, software distributed under
16
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
17
+ * OF ANY KIND, either express or implied. See the License for the specific language
18
+ * governing permissions and limitations under the License.
19
+ */
20
+
21
+
22
+
23
+
24
+
25
+
26
+
27
+
28
+ export {$c74cda7d31af1253$export$c84671f46d6a1ca as Layout, $d7fd61009c21d0bb$export$7e0eeb9da702a085 as LayoutInfo, $3041db3296945e6e$export$baf26146a414f24a as Point, $60423f92c7f9ad87$export$c79fc6492f3af13d as Rect, $ee1bfa90a957fb8a$export$cb6da89c6af1a8ec as Size, $ad1d98aa8f0c31b4$export$1a5223887c560441 as ReusableView, $fc0b13b484ac1194$export$1505db82fe357e65 as useVirtualizerState};
29
+ //# sourceMappingURL=module.js.map
package/dist/main.js ADDED
@@ -0,0 +1,40 @@
1
+ var $ac14d65a0ec196dd$exports = require("./Layout.main.js");
2
+ var $8a899922c0a55745$exports = require("./LayoutInfo.main.js");
3
+ var $f89f15d7f52bce29$exports = require("./Point.main.js");
4
+ var $41b7691783731623$exports = require("./Rect.main.js");
5
+ var $064492b79924894c$exports = require("./Size.main.js");
6
+ var $197a1781bd47f5b9$exports = require("./ReusableView.main.js");
7
+ var $f02ef43b5e8eee9b$exports = require("./useVirtualizerState.main.js");
8
+
9
+
10
+ function $parcel$export(e, n, v, s) {
11
+ Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
12
+ }
13
+
14
+ $parcel$export(module.exports, "Layout", () => $ac14d65a0ec196dd$exports.Layout);
15
+ $parcel$export(module.exports, "LayoutInfo", () => $8a899922c0a55745$exports.LayoutInfo);
16
+ $parcel$export(module.exports, "Point", () => $f89f15d7f52bce29$exports.Point);
17
+ $parcel$export(module.exports, "Rect", () => $41b7691783731623$exports.Rect);
18
+ $parcel$export(module.exports, "Size", () => $064492b79924894c$exports.Size);
19
+ $parcel$export(module.exports, "ReusableView", () => $197a1781bd47f5b9$exports.ReusableView);
20
+ $parcel$export(module.exports, "useVirtualizerState", () => $f02ef43b5e8eee9b$exports.useVirtualizerState);
21
+ /*
22
+ * Copyright 2020 Adobe. All rights reserved.
23
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
24
+ * you may not use this file except in compliance with the License. You may obtain a copy
25
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
26
+ *
27
+ * Unless required by applicable law or agreed to in writing, software distributed under
28
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
29
+ * OF ANY KIND, either express or implied. See the License for the specific language
30
+ * governing permissions and limitations under the License.
31
+ */
32
+
33
+
34
+
35
+
36
+
37
+
38
+
39
+
40
+ //# sourceMappingURL=main.js.map
@@ -0,0 +1 @@
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC","sources":["packages/@react-stately/virtualizer/src/index.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nexport type {InvalidationContext} from './types';\nexport type {VirtualizerState} from './useVirtualizerState';\nexport type {RectCorner} from './Rect';\n\nexport {Layout} from './Layout';\nexport {LayoutInfo} from './LayoutInfo';\nexport {Point} from './Point';\nexport {Rect} from './Rect';\nexport {Size} from './Size';\nexport {ReusableView} from './ReusableView';\nexport {useVirtualizerState} from './useVirtualizerState';\n"],"names":[],"version":3,"file":"main.js.map"}
package/dist/module.js ADDED
@@ -0,0 +1,29 @@
1
+ import {Layout as $c74cda7d31af1253$export$c84671f46d6a1ca} from "./Layout.module.js";
2
+ import {LayoutInfo as $d7fd61009c21d0bb$export$7e0eeb9da702a085} from "./LayoutInfo.module.js";
3
+ import {Point as $3041db3296945e6e$export$baf26146a414f24a} from "./Point.module.js";
4
+ import {Rect as $60423f92c7f9ad87$export$c79fc6492f3af13d} from "./Rect.module.js";
5
+ import {Size as $ee1bfa90a957fb8a$export$cb6da89c6af1a8ec} from "./Size.module.js";
6
+ import {ReusableView as $ad1d98aa8f0c31b4$export$1a5223887c560441} from "./ReusableView.module.js";
7
+ import {useVirtualizerState as $fc0b13b484ac1194$export$1505db82fe357e65} from "./useVirtualizerState.module.js";
8
+
9
+ /*
10
+ * Copyright 2020 Adobe. All rights reserved.
11
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
12
+ * you may not use this file except in compliance with the License. You may obtain a copy
13
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
14
+ *
15
+ * Unless required by applicable law or agreed to in writing, software distributed under
16
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
17
+ * OF ANY KIND, either express or implied. See the License for the specific language
18
+ * governing permissions and limitations under the License.
19
+ */
20
+
21
+
22
+
23
+
24
+
25
+
26
+
27
+
28
+ export {$c74cda7d31af1253$export$c84671f46d6a1ca as Layout, $d7fd61009c21d0bb$export$7e0eeb9da702a085 as LayoutInfo, $3041db3296945e6e$export$baf26146a414f24a as Point, $60423f92c7f9ad87$export$c79fc6492f3af13d as Rect, $ee1bfa90a957fb8a$export$cb6da89c6af1a8ec as Size, $ad1d98aa8f0c31b4$export$1a5223887c560441 as ReusableView, $fc0b13b484ac1194$export$1505db82fe357e65 as useVirtualizerState};
29
+ //# sourceMappingURL=module.js.map
@@ -0,0 +1 @@
1
+ {"mappings":";;;;;;;;AAAA;;;;;;;;;;CAUC","sources":["packages/@react-stately/virtualizer/src/index.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nexport type {InvalidationContext} from './types';\nexport type {VirtualizerState} from './useVirtualizerState';\nexport type {RectCorner} from './Rect';\n\nexport {Layout} from './Layout';\nexport {LayoutInfo} from './LayoutInfo';\nexport {Point} from './Point';\nexport {Rect} from './Rect';\nexport {Size} from './Size';\nexport {ReusableView} from './ReusableView';\nexport {useVirtualizerState} from './useVirtualizerState';\n"],"names":[],"version":3,"file":"module.js.map"}