react-virtuoso 2.2.4 → 2.2.6-beta.2

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 (106) hide show
  1. package/dist/__examples.cc6a8f9f.js +162195 -0
  2. package/dist/__examples.cc6a8f9f.js.map +1 -0
  3. package/dist/__examples.html +27 -0
  4. package/dist/__examples.js +392 -0
  5. package/dist/__examples.js.map +1 -0
  6. package/dist/align-to-bottom.7fcd2087.js +196 -0
  7. package/dist/align-to-bottom.7fcd2087.js.map +1 -0
  8. package/dist/auto-prepend-items.bd7e9b90.js +263 -0
  9. package/dist/auto-prepend-items.bd7e9b90.js.map +1 -0
  10. package/dist/benchmark.66d31485.js +161 -0
  11. package/dist/benchmark.66d31485.js.map +1 -0
  12. package/dist/chat.d4f93b8b.js +365 -0
  13. package/dist/chat.d4f93b8b.js.map +1 -0
  14. package/dist/custom-components.5aeaa7ef.js +202 -0
  15. package/dist/custom-components.5aeaa7ef.js.map +1 -0
  16. package/dist/custom-scroller.b0240d14.js +180 -0
  17. package/dist/custom-scroller.b0240d14.js.map +1 -0
  18. package/dist/data.26707046.js +186 -0
  19. package/dist/data.26707046.js.map +1 -0
  20. package/dist/decrease-items.e2211e50.js +180 -0
  21. package/dist/decrease-items.e2211e50.js.map +1 -0
  22. package/dist/default-item-height.b77ada36.js +155 -0
  23. package/dist/default-item-height.b77ada36.js.map +1 -0
  24. package/dist/empty-placeholder.00607a6e.js +185 -0
  25. package/dist/empty-placeholder.00607a6e.js.map +1 -0
  26. package/dist/end-reached.8531e5b1.js +199 -0
  27. package/dist/end-reached.8531e5b1.js.map +1 -0
  28. package/dist/endless-scrolling.bc4101f0.js +205 -0
  29. package/dist/endless-scrolling.bc4101f0.js.map +1 -0
  30. package/dist/expandable-cards.5439f51b.js +222 -0
  31. package/dist/expandable-cards.5439f51b.js.map +1 -0
  32. package/dist/follow-output.4e36fca8.js +225 -0
  33. package/dist/follow-output.4e36fca8.js.map +1 -0
  34. package/dist/grid-optimize-rendering.b49e36f5.js +247 -0
  35. package/dist/grid-optimize-rendering.b49e36f5.js.map +1 -0
  36. package/dist/grid.d5d77b6a.js +244 -0
  37. package/dist/grid.d5d77b6a.js.map +1 -0
  38. package/dist/grouped-endless-scrolling.24985a0f.js +301 -0
  39. package/dist/grouped-endless-scrolling.24985a0f.js.map +1 -0
  40. package/dist/grouped-load-more.bce8f6e4.js +300 -0
  41. package/dist/grouped-load-more.bce8f6e4.js.map +1 -0
  42. package/dist/grouped-topmost-item.34960f5e.js +161 -0
  43. package/dist/grouped-topmost-item.34960f5e.js.map +1 -0
  44. package/dist/grouped.a2908632.js +160 -0
  45. package/dist/grouped.a2908632.js.map +1 -0
  46. package/dist/header-footer.49733d45.js +171 -0
  47. package/dist/header-footer.49733d45.js.map +1 -0
  48. package/dist/hello.54765c26.js +155 -0
  49. package/dist/hello.54765c26.js.map +1 -0
  50. package/dist/index.js +1 -1
  51. package/dist/index.js.map +1 -1
  52. package/dist/index.m.js +1 -1
  53. package/dist/index.m.js.map +1 -1
  54. package/dist/initial-from-zero.22ad1626.js +195 -0
  55. package/dist/initial-from-zero.22ad1626.js.map +1 -0
  56. package/dist/initial-scroll-top.90db1920.js +156 -0
  57. package/dist/initial-scroll-top.90db1920.js.map +1 -0
  58. package/dist/initial-topmost-item-default-height.43a95247.js +157 -0
  59. package/dist/initial-topmost-item-default-height.43a95247.js.map +1 -0
  60. package/dist/initial-topmost-item.61c0e169.js +158 -0
  61. package/dist/initial-topmost-item.61c0e169.js.map +1 -0
  62. package/dist/long-last-item.b56ff89c.js +157 -0
  63. package/dist/long-last-item.b56ff89c.js.map +1 -0
  64. package/dist/prepend-items.f2bda34b.js +188 -0
  65. package/dist/prepend-items.f2bda34b.js.map +1 -0
  66. package/dist/prepend-last-tall-item.168a9e65.js +175 -0
  67. package/dist/prepend-last-tall-item.168a9e65.js.map +1 -0
  68. package/dist/react-beautiful-dnd-window-scroller.0a227511.js +280 -0
  69. package/dist/react-beautiful-dnd-window-scroller.0a227511.js.map +1 -0
  70. package/dist/react-beautiful-dnd.817e9251.js +277 -0
  71. package/dist/react-beautiful-dnd.817e9251.js.map +1 -0
  72. package/dist/rerender.ddd61b7c.js +195 -0
  73. package/dist/rerender.ddd61b7c.js.map +1 -0
  74. package/dist/resize-loop.309b1dac.js +183 -0
  75. package/dist/resize-loop.309b1dac.js.map +1 -0
  76. package/dist/resizing-items.c09b5e1b.js +189 -0
  77. package/dist/resizing-items.c09b5e1b.js.map +1 -0
  78. package/dist/scroll-into-view.39b77fe9.js +203 -0
  79. package/dist/scroll-into-view.39b77fe9.js.map +1 -0
  80. package/dist/scroll-seek-placeholder.69fb85c6.js +179 -0
  81. package/dist/scroll-seek-placeholder.69fb85c6.js.map +1 -0
  82. package/dist/scroll-to-index.e72249cf.js +212 -0
  83. package/dist/scroll-to-index.e72249cf.js.map +1 -0
  84. package/dist/ssr.8f31b042.js +154 -0
  85. package/dist/ssr.8f31b042.js.map +1 -0
  86. package/dist/start-reached.2990ece7.js +219 -0
  87. package/dist/start-reached.2990ece7.js.map +1 -0
  88. package/dist/tall-item-reverse-scrolling.58bcd140.js +158 -0
  89. package/dist/tall-item-reverse-scrolling.58bcd140.js.map +1 -0
  90. package/dist/test-case-446.dce9595c.js +223 -0
  91. package/dist/test-case-446.dce9595c.js.map +1 -0
  92. package/dist/test-case-460.6d75ad1f.js +246 -0
  93. package/dist/test-case-460.6d75ad1f.js.map +1 -0
  94. package/dist/test-case-463.525f34ba.js +170 -0
  95. package/dist/test-case-463.525f34ba.js.map +1 -0
  96. package/dist/toggle-display-grouped.4f4ae058.js +184 -0
  97. package/dist/toggle-display-grouped.4f4ae058.js.map +1 -0
  98. package/dist/top-items.f724bf61.js +153 -0
  99. package/dist/top-items.f724bf61.js.map +1 -0
  100. package/dist/upward-scroll.d49e0815.js +157 -0
  101. package/dist/upward-scroll.d49e0815.js.map +1 -0
  102. package/dist/window-grid.b22094fd.js +234 -0
  103. package/dist/window-grid.b22094fd.js.map +1 -0
  104. package/dist/window-scroller.a979c6d6.js +163 -0
  105. package/dist/window-scroller.a979c6d6.js.map +1 -0
  106. package/package.json +6 -6
@@ -0,0 +1,161 @@
1
+ // modules are defined as an array
2
+ // [ module function, map of requires ]
3
+ //
4
+ // map of requires is short require name -> numeric require
5
+ //
6
+ // anything defined in a previous bundle is accessed via the
7
+ // orig method which is the require for previous bundles
8
+ parcelRequire = (function (modules, cache, entry, globalName) {
9
+ // Save the require from previous bundle to this closure if any
10
+ var previousRequire = typeof parcelRequire === 'function' && parcelRequire;
11
+ var nodeRequire = typeof require === 'function' && require;
12
+
13
+ function newRequire(name, jumped) {
14
+ if (!cache[name]) {
15
+ if (!modules[name]) {
16
+ // if we cannot find the module within our internal map or
17
+ // cache jump to the current global require ie. the last bundle
18
+ // that was added to the page.
19
+ var currentRequire = typeof parcelRequire === 'function' && parcelRequire;
20
+ if (!jumped && currentRequire) {
21
+ return currentRequire(name, true);
22
+ }
23
+
24
+ // If there are other bundles on this page the require from the
25
+ // previous one is saved to 'previousRequire'. Repeat this as
26
+ // many times as there are bundles until the module is found or
27
+ // we exhaust the require chain.
28
+ if (previousRequire) {
29
+ return previousRequire(name, true);
30
+ }
31
+
32
+ // Try the node require function if it exists.
33
+ if (nodeRequire && typeof name === 'string') {
34
+ return nodeRequire(name);
35
+ }
36
+
37
+ var err = new Error('Cannot find module \'' + name + '\'');
38
+ err.code = 'MODULE_NOT_FOUND';
39
+ throw err;
40
+ }
41
+
42
+ localRequire.resolve = resolve;
43
+ localRequire.cache = {};
44
+
45
+ var module = cache[name] = new newRequire.Module(name);
46
+
47
+ modules[name][0].call(module.exports, localRequire, module, module.exports, this);
48
+ }
49
+
50
+ return cache[name].exports;
51
+
52
+ function localRequire(x){
53
+ return newRequire(localRequire.resolve(x));
54
+ }
55
+
56
+ function resolve(x){
57
+ return modules[name][1][x] || x;
58
+ }
59
+ }
60
+
61
+ function Module(moduleName) {
62
+ this.id = moduleName;
63
+ this.bundle = newRequire;
64
+ this.exports = {};
65
+ }
66
+
67
+ newRequire.isParcelRequire = true;
68
+ newRequire.Module = Module;
69
+ newRequire.modules = modules;
70
+ newRequire.cache = cache;
71
+ newRequire.parent = previousRequire;
72
+ newRequire.register = function (id, exports) {
73
+ modules[id] = [function (require, module) {
74
+ module.exports = exports;
75
+ }, {}];
76
+ };
77
+
78
+ var error;
79
+ for (var i = 0; i < entry.length; i++) {
80
+ try {
81
+ newRequire(entry[i]);
82
+ } catch (e) {
83
+ // Save first error but execute all entries
84
+ if (!error) {
85
+ error = e;
86
+ }
87
+ }
88
+ }
89
+
90
+ if (entry.length) {
91
+ // Expose entry point to Node, AMD or browser globals
92
+ // Based on https://github.com/ForbesLindesay/umd/blob/master/template.js
93
+ var mainExports = newRequire(entry[entry.length - 1]);
94
+
95
+ // CommonJS
96
+ if (typeof exports === "object" && typeof module !== "undefined") {
97
+ module.exports = mainExports;
98
+
99
+ // RequireJS
100
+ } else if (typeof define === "function" && define.amd) {
101
+ define(function () {
102
+ return mainExports;
103
+ });
104
+
105
+ // <script>
106
+ } else if (globalName) {
107
+ this[globalName] = mainExports;
108
+ }
109
+ }
110
+
111
+ // Override the current require with this new one
112
+ parcelRequire = newRequire;
113
+
114
+ if (error) {
115
+ // throw error from earlier, _after updating parcelRequire_
116
+ throw error;
117
+ }
118
+
119
+ return newRequire;
120
+ })({"grouped-topmost-item.tsx":[function(require,module,exports) {
121
+ "use strict";
122
+
123
+ Object.defineProperty(exports, "__esModule", {
124
+ value: true
125
+ });
126
+ exports.default = App;
127
+
128
+ var React = _interopRequireWildcard(require("react"));
129
+
130
+ var _src = require("../src");
131
+
132
+ function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
133
+
134
+ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
135
+
136
+ function App() {
137
+ return React.createElement(_src.GroupedVirtuoso, {
138
+ initialTopMostItemIndex: 10,
139
+ groupCounts: Array.from({
140
+ length: 20
141
+ }).fill(3),
142
+ itemContent: function itemContent(index) {
143
+ return React.createElement("div", {
144
+ style: {
145
+ height: '20px'
146
+ }
147
+ }, "Item ", index);
148
+ },
149
+ groupContent: function groupContent(index) {
150
+ return React.createElement("div", {
151
+ style: {
152
+ height: '30px'
153
+ }
154
+ }, "Group ", index);
155
+ },
156
+ style: {
157
+ height: '300px'
158
+ }
159
+ });
160
+ }
161
+ },{"react":"../node_modules/react/index.js","../src":"../src/index.tsx"}]},{},[], null)
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["grouped-topmost-item.tsx"],"names":[],"mappings":";;;;;;;AAAA;;AACA;;;;;;AAEc,SAAU,GAAV,GAAa;AACzB,SACE,KAAA,CAAA,aAAA,CAAC,oBAAD,EAAgB;AACd,IAAA,uBAAuB,EAAE,EADX;AAEd,IAAA,WAAW,EAAE,KAAK,CAAC,IAAN,CAAW;AAAE,MAAA,MAAM,EAAE;AAAV,KAAX,EAA2B,IAA3B,CAAgC,CAAhC,CAFC;AAGd,IAAA,WAAW,EAAE,qBAAC,KAAD;AAAA,aAAW,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA;AAAK,QAAA,KAAK,EAAE;AAAE,UAAA,MAAM,EAAE;AAAV;AAAZ,OAAA,SAAA,EAAsC,KAAtC,CAAX;AAAA,KAHC;AAId,IAAA,YAAY,EAAE,sBAAC,KAAD;AAAA,aAAW,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA;AAAK,QAAA,KAAK,EAAE;AAAE,UAAA,MAAM,EAAE;AAAV;AAAZ,OAAA,UAAA,EAAuC,KAAvC,CAAX;AAAA,KAJA;AAKd,IAAA,KAAK,EAAE;AAAE,MAAA,MAAM,EAAE;AAAV;AALO,GAAhB,CADF;AASD","file":"grouped-topmost-item.34960f5e.js","sourceRoot":"../e2e","sourcesContent":["import * as React from 'react'\nimport { GroupedVirtuoso } from '../src'\n\nexport default function App() {\n return (\n <GroupedVirtuoso\n initialTopMostItemIndex={10}\n groupCounts={Array.from({ length: 20 }).fill(3) as number[]}\n itemContent={(index) => <div style={{ height: '20px' }}>Item {index}</div>}\n groupContent={(index) => <div style={{ height: '30px' }}>Group {index}</div>}\n style={{ height: '300px' }}\n />\n )\n}\n"]}
@@ -0,0 +1,160 @@
1
+ // modules are defined as an array
2
+ // [ module function, map of requires ]
3
+ //
4
+ // map of requires is short require name -> numeric require
5
+ //
6
+ // anything defined in a previous bundle is accessed via the
7
+ // orig method which is the require for previous bundles
8
+ parcelRequire = (function (modules, cache, entry, globalName) {
9
+ // Save the require from previous bundle to this closure if any
10
+ var previousRequire = typeof parcelRequire === 'function' && parcelRequire;
11
+ var nodeRequire = typeof require === 'function' && require;
12
+
13
+ function newRequire(name, jumped) {
14
+ if (!cache[name]) {
15
+ if (!modules[name]) {
16
+ // if we cannot find the module within our internal map or
17
+ // cache jump to the current global require ie. the last bundle
18
+ // that was added to the page.
19
+ var currentRequire = typeof parcelRequire === 'function' && parcelRequire;
20
+ if (!jumped && currentRequire) {
21
+ return currentRequire(name, true);
22
+ }
23
+
24
+ // If there are other bundles on this page the require from the
25
+ // previous one is saved to 'previousRequire'. Repeat this as
26
+ // many times as there are bundles until the module is found or
27
+ // we exhaust the require chain.
28
+ if (previousRequire) {
29
+ return previousRequire(name, true);
30
+ }
31
+
32
+ // Try the node require function if it exists.
33
+ if (nodeRequire && typeof name === 'string') {
34
+ return nodeRequire(name);
35
+ }
36
+
37
+ var err = new Error('Cannot find module \'' + name + '\'');
38
+ err.code = 'MODULE_NOT_FOUND';
39
+ throw err;
40
+ }
41
+
42
+ localRequire.resolve = resolve;
43
+ localRequire.cache = {};
44
+
45
+ var module = cache[name] = new newRequire.Module(name);
46
+
47
+ modules[name][0].call(module.exports, localRequire, module, module.exports, this);
48
+ }
49
+
50
+ return cache[name].exports;
51
+
52
+ function localRequire(x){
53
+ return newRequire(localRequire.resolve(x));
54
+ }
55
+
56
+ function resolve(x){
57
+ return modules[name][1][x] || x;
58
+ }
59
+ }
60
+
61
+ function Module(moduleName) {
62
+ this.id = moduleName;
63
+ this.bundle = newRequire;
64
+ this.exports = {};
65
+ }
66
+
67
+ newRequire.isParcelRequire = true;
68
+ newRequire.Module = Module;
69
+ newRequire.modules = modules;
70
+ newRequire.cache = cache;
71
+ newRequire.parent = previousRequire;
72
+ newRequire.register = function (id, exports) {
73
+ modules[id] = [function (require, module) {
74
+ module.exports = exports;
75
+ }, {}];
76
+ };
77
+
78
+ var error;
79
+ for (var i = 0; i < entry.length; i++) {
80
+ try {
81
+ newRequire(entry[i]);
82
+ } catch (e) {
83
+ // Save first error but execute all entries
84
+ if (!error) {
85
+ error = e;
86
+ }
87
+ }
88
+ }
89
+
90
+ if (entry.length) {
91
+ // Expose entry point to Node, AMD or browser globals
92
+ // Based on https://github.com/ForbesLindesay/umd/blob/master/template.js
93
+ var mainExports = newRequire(entry[entry.length - 1]);
94
+
95
+ // CommonJS
96
+ if (typeof exports === "object" && typeof module !== "undefined") {
97
+ module.exports = mainExports;
98
+
99
+ // RequireJS
100
+ } else if (typeof define === "function" && define.amd) {
101
+ define(function () {
102
+ return mainExports;
103
+ });
104
+
105
+ // <script>
106
+ } else if (globalName) {
107
+ this[globalName] = mainExports;
108
+ }
109
+ }
110
+
111
+ // Override the current require with this new one
112
+ parcelRequire = newRequire;
113
+
114
+ if (error) {
115
+ // throw error from earlier, _after updating parcelRequire_
116
+ throw error;
117
+ }
118
+
119
+ return newRequire;
120
+ })({"grouped.tsx":[function(require,module,exports) {
121
+ "use strict";
122
+
123
+ Object.defineProperty(exports, "__esModule", {
124
+ value: true
125
+ });
126
+ exports.default = App;
127
+
128
+ var React = _interopRequireWildcard(require("react"));
129
+
130
+ var _src = require("../src");
131
+
132
+ function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
133
+
134
+ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
135
+
136
+ function App() {
137
+ return React.createElement(_src.GroupedVirtuoso, {
138
+ groupCounts: Array.from({
139
+ length: 20
140
+ }).fill(3),
141
+ itemContent: function itemContent(index) {
142
+ return React.createElement("div", {
143
+ style: {
144
+ height: '20px'
145
+ }
146
+ }, "Item ", index);
147
+ },
148
+ groupContent: function groupContent(index) {
149
+ return React.createElement("div", {
150
+ style: {
151
+ height: '30px'
152
+ }
153
+ }, "Group ", index);
154
+ },
155
+ style: {
156
+ height: '300px'
157
+ }
158
+ });
159
+ }
160
+ },{"react":"../node_modules/react/index.js","../src":"../src/index.tsx"}]},{},[], null)
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["grouped.tsx"],"names":[],"mappings":";;;;;;;AAAA;;AACA;;;;;;AAEc,SAAU,GAAV,GAAa;AACzB,SACE,KAAA,CAAA,aAAA,CAAC,oBAAD,EAAgB;AACd,IAAA,WAAW,EAAE,KAAK,CAAC,IAAN,CAAW;AAAE,MAAA,MAAM,EAAE;AAAV,KAAX,EAA2B,IAA3B,CAAgC,CAAhC,CADC;AAEd,IAAA,WAAW,EAAE,qBAAC,KAAD;AAAA,aAAW,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA;AAAK,QAAA,KAAK,EAAE;AAAE,UAAA,MAAM,EAAE;AAAV;AAAZ,OAAA,SAAA,EAAsC,KAAtC,CAAX;AAAA,KAFC;AAGd,IAAA,YAAY,EAAE,sBAAC,KAAD;AAAA,aAAW,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA;AAAK,QAAA,KAAK,EAAE;AAAE,UAAA,MAAM,EAAE;AAAV;AAAZ,OAAA,UAAA,EAAuC,KAAvC,CAAX;AAAA,KAHA;AAId,IAAA,KAAK,EAAE;AAAE,MAAA,MAAM,EAAE;AAAV;AAJO,GAAhB,CADF;AAQD","file":"grouped.a2908632.js","sourceRoot":"../e2e","sourcesContent":["import * as React from 'react'\nimport { GroupedVirtuoso } from '../src'\n\nexport default function App() {\n return (\n <GroupedVirtuoso\n groupCounts={Array.from({ length: 20 }).fill(3) as number[]}\n itemContent={(index) => <div style={{ height: '20px' }}>Item {index}</div>}\n groupContent={(index) => <div style={{ height: '30px' }}>Group {index}</div>}\n style={{ height: '300px' }}\n />\n )\n}\n"]}
@@ -0,0 +1,171 @@
1
+ // modules are defined as an array
2
+ // [ module function, map of requires ]
3
+ //
4
+ // map of requires is short require name -> numeric require
5
+ //
6
+ // anything defined in a previous bundle is accessed via the
7
+ // orig method which is the require for previous bundles
8
+ parcelRequire = (function (modules, cache, entry, globalName) {
9
+ // Save the require from previous bundle to this closure if any
10
+ var previousRequire = typeof parcelRequire === 'function' && parcelRequire;
11
+ var nodeRequire = typeof require === 'function' && require;
12
+
13
+ function newRequire(name, jumped) {
14
+ if (!cache[name]) {
15
+ if (!modules[name]) {
16
+ // if we cannot find the module within our internal map or
17
+ // cache jump to the current global require ie. the last bundle
18
+ // that was added to the page.
19
+ var currentRequire = typeof parcelRequire === 'function' && parcelRequire;
20
+ if (!jumped && currentRequire) {
21
+ return currentRequire(name, true);
22
+ }
23
+
24
+ // If there are other bundles on this page the require from the
25
+ // previous one is saved to 'previousRequire'. Repeat this as
26
+ // many times as there are bundles until the module is found or
27
+ // we exhaust the require chain.
28
+ if (previousRequire) {
29
+ return previousRequire(name, true);
30
+ }
31
+
32
+ // Try the node require function if it exists.
33
+ if (nodeRequire && typeof name === 'string') {
34
+ return nodeRequire(name);
35
+ }
36
+
37
+ var err = new Error('Cannot find module \'' + name + '\'');
38
+ err.code = 'MODULE_NOT_FOUND';
39
+ throw err;
40
+ }
41
+
42
+ localRequire.resolve = resolve;
43
+ localRequire.cache = {};
44
+
45
+ var module = cache[name] = new newRequire.Module(name);
46
+
47
+ modules[name][0].call(module.exports, localRequire, module, module.exports, this);
48
+ }
49
+
50
+ return cache[name].exports;
51
+
52
+ function localRequire(x){
53
+ return newRequire(localRequire.resolve(x));
54
+ }
55
+
56
+ function resolve(x){
57
+ return modules[name][1][x] || x;
58
+ }
59
+ }
60
+
61
+ function Module(moduleName) {
62
+ this.id = moduleName;
63
+ this.bundle = newRequire;
64
+ this.exports = {};
65
+ }
66
+
67
+ newRequire.isParcelRequire = true;
68
+ newRequire.Module = Module;
69
+ newRequire.modules = modules;
70
+ newRequire.cache = cache;
71
+ newRequire.parent = previousRequire;
72
+ newRequire.register = function (id, exports) {
73
+ modules[id] = [function (require, module) {
74
+ module.exports = exports;
75
+ }, {}];
76
+ };
77
+
78
+ var error;
79
+ for (var i = 0; i < entry.length; i++) {
80
+ try {
81
+ newRequire(entry[i]);
82
+ } catch (e) {
83
+ // Save first error but execute all entries
84
+ if (!error) {
85
+ error = e;
86
+ }
87
+ }
88
+ }
89
+
90
+ if (entry.length) {
91
+ // Expose entry point to Node, AMD or browser globals
92
+ // Based on https://github.com/ForbesLindesay/umd/blob/master/template.js
93
+ var mainExports = newRequire(entry[entry.length - 1]);
94
+
95
+ // CommonJS
96
+ if (typeof exports === "object" && typeof module !== "undefined") {
97
+ module.exports = mainExports;
98
+
99
+ // RequireJS
100
+ } else if (typeof define === "function" && define.amd) {
101
+ define(function () {
102
+ return mainExports;
103
+ });
104
+
105
+ // <script>
106
+ } else if (globalName) {
107
+ this[globalName] = mainExports;
108
+ }
109
+ }
110
+
111
+ // Override the current require with this new one
112
+ parcelRequire = newRequire;
113
+
114
+ if (error) {
115
+ // throw error from earlier, _after updating parcelRequire_
116
+ throw error;
117
+ }
118
+
119
+ return newRequire;
120
+ })({"header-footer.tsx":[function(require,module,exports) {
121
+ "use strict";
122
+
123
+ Object.defineProperty(exports, "__esModule", {
124
+ value: true
125
+ });
126
+ exports.default = App;
127
+
128
+ var React = _interopRequireWildcard(require("react"));
129
+
130
+ var _src = require("../src");
131
+
132
+ function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
133
+
134
+ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
135
+
136
+ function App() {
137
+ return React.createElement(_src.Virtuoso, {
138
+ totalCount: 100,
139
+ topItemCount: 1,
140
+ components: {
141
+ Header: function Header() {
142
+ return React.createElement("div", {
143
+ style: {
144
+ height: 150
145
+ }
146
+ }, "Header");
147
+ },
148
+ Footer: function Footer() {
149
+ return React.createElement("div", {
150
+ style: {
151
+ height: 60
152
+ }
153
+ }, "Footer");
154
+ }
155
+ },
156
+ itemContent: function itemContent(index) {
157
+ return React.createElement("div", {
158
+ style: {
159
+ height: 100,
160
+ padding: '100px 0px',
161
+ background: 'gray'
162
+ }
163
+ }, "Item ", index);
164
+ },
165
+ style: {
166
+ height: 600
167
+ },
168
+ overscan: 150
169
+ });
170
+ }
171
+ },{"react":"../node_modules/react/index.js","../src":"../src/index.tsx"}]},{},[], null)
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["header-footer.tsx"],"names":[],"mappings":";;;;;;;AAAA;;AACA;;;;;;AAEc,SAAU,GAAV,GAAa;AACzB,SACE,KAAA,CAAA,aAAA,CAAC,aAAD,EAAS;AACP,IAAA,UAAU,EAAE,GADL;AAEP,IAAA,YAAY,EAAE,CAFP;AAGP,IAAA,UAAU,EAAE;AACV,MAAA,MAAM,EAAE;AAAA,eAAM,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA;AAAK,UAAA,KAAK,EAAE;AAAE,YAAA,MAAM,EAAE;AAAV;AAAZ,SAAA,EAA2B,QAA3B,CAAN;AAAA,OADE;AAEV,MAAA,MAAM,EAAE;AAAA,eAAM,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA;AAAK,UAAA,KAAK,EAAE;AAAE,YAAA,MAAM,EAAE;AAAV;AAAZ,SAAA,EAA0B,QAA1B,CAAN;AAAA;AAFE,KAHL;AAOP,IAAA,WAAW,EAAE,qBAAC,KAAD;AAAA,aAAW,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA;AAAK,QAAA,KAAK,EAAE;AAAE,UAAA,MAAM,EAAE,GAAV;AAAe,UAAA,OAAO,EAAE,WAAxB;AAAqC,UAAA,UAAU,EAAE;AAAjD;AAAZ,OAAA,SAAA,EAA6E,KAA7E,CAAX;AAAA,KAPN;AAQP,IAAA,KAAK,EAAE;AAAE,MAAA,MAAM,EAAE;AAAV,KARA;AASP,IAAA,QAAQ,EAAE;AATH,GAAT,CADF;AAaD","file":"header-footer.49733d45.js","sourceRoot":"../e2e","sourcesContent":["import * as React from 'react'\nimport { Virtuoso } from '../src'\n\nexport default function App() {\n return (\n <Virtuoso\n totalCount={100}\n topItemCount={1}\n components={{\n Header: () => <div style={{ height: 150 }}>Header</div>,\n Footer: () => <div style={{ height: 60 }}>Footer</div>,\n }}\n itemContent={(index) => <div style={{ height: 100, padding: '100px 0px', background: 'gray' }}>Item {index}</div>}\n style={{ height: 600 }}\n overscan={150}\n />\n )\n}\n"]}
@@ -0,0 +1,155 @@
1
+ // modules are defined as an array
2
+ // [ module function, map of requires ]
3
+ //
4
+ // map of requires is short require name -> numeric require
5
+ //
6
+ // anything defined in a previous bundle is accessed via the
7
+ // orig method which is the require for previous bundles
8
+ parcelRequire = (function (modules, cache, entry, globalName) {
9
+ // Save the require from previous bundle to this closure if any
10
+ var previousRequire = typeof parcelRequire === 'function' && parcelRequire;
11
+ var nodeRequire = typeof require === 'function' && require;
12
+
13
+ function newRequire(name, jumped) {
14
+ if (!cache[name]) {
15
+ if (!modules[name]) {
16
+ // if we cannot find the module within our internal map or
17
+ // cache jump to the current global require ie. the last bundle
18
+ // that was added to the page.
19
+ var currentRequire = typeof parcelRequire === 'function' && parcelRequire;
20
+ if (!jumped && currentRequire) {
21
+ return currentRequire(name, true);
22
+ }
23
+
24
+ // If there are other bundles on this page the require from the
25
+ // previous one is saved to 'previousRequire'. Repeat this as
26
+ // many times as there are bundles until the module is found or
27
+ // we exhaust the require chain.
28
+ if (previousRequire) {
29
+ return previousRequire(name, true);
30
+ }
31
+
32
+ // Try the node require function if it exists.
33
+ if (nodeRequire && typeof name === 'string') {
34
+ return nodeRequire(name);
35
+ }
36
+
37
+ var err = new Error('Cannot find module \'' + name + '\'');
38
+ err.code = 'MODULE_NOT_FOUND';
39
+ throw err;
40
+ }
41
+
42
+ localRequire.resolve = resolve;
43
+ localRequire.cache = {};
44
+
45
+ var module = cache[name] = new newRequire.Module(name);
46
+
47
+ modules[name][0].call(module.exports, localRequire, module, module.exports, this);
48
+ }
49
+
50
+ return cache[name].exports;
51
+
52
+ function localRequire(x){
53
+ return newRequire(localRequire.resolve(x));
54
+ }
55
+
56
+ function resolve(x){
57
+ return modules[name][1][x] || x;
58
+ }
59
+ }
60
+
61
+ function Module(moduleName) {
62
+ this.id = moduleName;
63
+ this.bundle = newRequire;
64
+ this.exports = {};
65
+ }
66
+
67
+ newRequire.isParcelRequire = true;
68
+ newRequire.Module = Module;
69
+ newRequire.modules = modules;
70
+ newRequire.cache = cache;
71
+ newRequire.parent = previousRequire;
72
+ newRequire.register = function (id, exports) {
73
+ modules[id] = [function (require, module) {
74
+ module.exports = exports;
75
+ }, {}];
76
+ };
77
+
78
+ var error;
79
+ for (var i = 0; i < entry.length; i++) {
80
+ try {
81
+ newRequire(entry[i]);
82
+ } catch (e) {
83
+ // Save first error but execute all entries
84
+ if (!error) {
85
+ error = e;
86
+ }
87
+ }
88
+ }
89
+
90
+ if (entry.length) {
91
+ // Expose entry point to Node, AMD or browser globals
92
+ // Based on https://github.com/ForbesLindesay/umd/blob/master/template.js
93
+ var mainExports = newRequire(entry[entry.length - 1]);
94
+
95
+ // CommonJS
96
+ if (typeof exports === "object" && typeof module !== "undefined") {
97
+ module.exports = mainExports;
98
+
99
+ // RequireJS
100
+ } else if (typeof define === "function" && define.amd) {
101
+ define(function () {
102
+ return mainExports;
103
+ });
104
+
105
+ // <script>
106
+ } else if (globalName) {
107
+ this[globalName] = mainExports;
108
+ }
109
+ }
110
+
111
+ // Override the current require with this new one
112
+ parcelRequire = newRequire;
113
+
114
+ if (error) {
115
+ // throw error from earlier, _after updating parcelRequire_
116
+ throw error;
117
+ }
118
+
119
+ return newRequire;
120
+ })({"hello.tsx":[function(require,module,exports) {
121
+ "use strict";
122
+
123
+ Object.defineProperty(exports, "__esModule", {
124
+ value: true
125
+ });
126
+ exports.default = App;
127
+
128
+ var React = _interopRequireWildcard(require("react"));
129
+
130
+ var _src = require("../src/");
131
+
132
+ function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
133
+
134
+ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
135
+
136
+ function App() {
137
+ return React.createElement(_src.Virtuoso, {
138
+ computeItemKey: function computeItemKey(key) {
139
+ return "item-".concat(key.toString());
140
+ },
141
+ initialItemCount: 30,
142
+ totalCount: 100,
143
+ itemContent: function itemContent(index) {
144
+ return React.createElement("div", {
145
+ style: {
146
+ height: 30
147
+ }
148
+ }, "Item ", index);
149
+ },
150
+ style: {
151
+ height: 300
152
+ }
153
+ });
154
+ }
155
+ },{"react":"../node_modules/react/index.js","../src/":"../src/index.tsx"}]},{},[], null)
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["hello.tsx"],"names":[],"mappings":";;;;;;;AAAA;;AACA;;;;;;AAEc,SAAU,GAAV,GAAa;AACzB,SACE,KAAA,CAAA,aAAA,CAAC,aAAD,EAAS;AACP,IAAA,cAAc,EAAE,wBAAC,GAAD;AAAA,4BAAyB,GAAG,CAAC,QAAJ,EAAzB;AAAA,KADT;AAEP,IAAA,gBAAgB,EAAE,EAFX;AAGP,IAAA,UAAU,EAAE,GAHL;AAIP,IAAA,WAAW,EAAE,qBAAC,KAAD;AAAA,aAAW,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA;AAAK,QAAA,KAAK,EAAE;AAAE,UAAA,MAAM,EAAE;AAAV;AAAZ,OAAA,SAAA,EAAkC,KAAlC,CAAX;AAAA,KAJN;AAKP,IAAA,KAAK,EAAE;AAAE,MAAA,MAAM,EAAE;AAAV;AALA,GAAT,CADF;AASD","file":"hello.54765c26.js","sourceRoot":"../e2e","sourcesContent":["import * as React from 'react'\nimport { Virtuoso } from '../src/'\n\nexport default function App() {\n return (\n <Virtuoso\n computeItemKey={(key: number) => `item-${key.toString()}`}\n initialItemCount={30}\n totalCount={100}\n itemContent={(index) => <div style={{ height: 30 }}>Item {index}</div>}\n style={{ height: 300 }}\n />\n )\n}\n"]}