@legendapp/list 2.1.0-next.0 → 2.1.0-next.1
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/index.js +128 -600
- package/index.mjs +62 -534
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -1,459 +1,14 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
1
|
+
import * as React4 from 'react';
|
|
2
|
+
import React4__default, { forwardRef, useReducer, useEffect, createContext, useRef, useState, useMemo, useImperativeHandle, useCallback, useLayoutEffect, memo, useContext } from 'react';
|
|
3
3
|
import { useSyncExternalStore } from 'use-sync-external-store/shim';
|
|
4
|
+
import { unstable_batchedUpdates } from 'react-dom';
|
|
4
5
|
|
|
5
|
-
|
|
6
|
-
var __defProp = Object.defineProperty;
|
|
7
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
8
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
9
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
10
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
11
|
-
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
12
|
-
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
13
|
-
}) : x)(function(x) {
|
|
14
|
-
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
15
|
-
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
16
|
-
});
|
|
17
|
-
var __commonJS = (cb, mod) => function __require2() {
|
|
18
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
19
|
-
};
|
|
20
|
-
var __copyProps = (to, from, except, desc) => {
|
|
21
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
22
|
-
for (let key of __getOwnPropNames(from))
|
|
23
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
24
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
25
|
-
}
|
|
26
|
-
return to;
|
|
27
|
-
};
|
|
28
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
29
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
30
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
31
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
32
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
33
|
-
!mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
34
|
-
mod
|
|
35
|
-
));
|
|
36
|
-
|
|
37
|
-
// node_modules/react-dom/cjs/react-dom.production.js
|
|
38
|
-
var require_react_dom_production = __commonJS({
|
|
39
|
-
"node_modules/react-dom/cjs/react-dom.production.js"(exports) {
|
|
40
|
-
var React12 = __require("react");
|
|
41
|
-
function formatProdErrorMessage(code) {
|
|
42
|
-
var url = "https://react.dev/errors/" + code;
|
|
43
|
-
if (1 < arguments.length) {
|
|
44
|
-
url += "?args[]=" + encodeURIComponent(arguments[1]);
|
|
45
|
-
for (var i = 2; i < arguments.length; i++)
|
|
46
|
-
url += "&args[]=" + encodeURIComponent(arguments[i]);
|
|
47
|
-
}
|
|
48
|
-
return "Minified React error #" + code + "; visit " + url + " for the full message or use the non-minified dev environment for full errors and additional helpful warnings.";
|
|
49
|
-
}
|
|
50
|
-
function noop2() {
|
|
51
|
-
}
|
|
52
|
-
var Internals = {
|
|
53
|
-
d: {
|
|
54
|
-
f: noop2,
|
|
55
|
-
r: function() {
|
|
56
|
-
throw Error(formatProdErrorMessage(522));
|
|
57
|
-
},
|
|
58
|
-
D: noop2,
|
|
59
|
-
C: noop2,
|
|
60
|
-
L: noop2,
|
|
61
|
-
m: noop2,
|
|
62
|
-
X: noop2,
|
|
63
|
-
S: noop2,
|
|
64
|
-
M: noop2
|
|
65
|
-
},
|
|
66
|
-
p: 0,
|
|
67
|
-
findDOMNode: null
|
|
68
|
-
};
|
|
69
|
-
var REACT_PORTAL_TYPE = Symbol.for("react.portal");
|
|
70
|
-
function createPortal$1(children, containerInfo, implementation) {
|
|
71
|
-
var key = 3 < arguments.length && void 0 !== arguments[3] ? arguments[3] : null;
|
|
72
|
-
return {
|
|
73
|
-
$$typeof: REACT_PORTAL_TYPE,
|
|
74
|
-
key: null == key ? null : "" + key,
|
|
75
|
-
children,
|
|
76
|
-
containerInfo,
|
|
77
|
-
implementation
|
|
78
|
-
};
|
|
79
|
-
}
|
|
80
|
-
var ReactSharedInternals = React12.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
|
|
81
|
-
function getCrossOriginStringAs(as, input) {
|
|
82
|
-
if ("font" === as) return "";
|
|
83
|
-
if ("string" === typeof input)
|
|
84
|
-
return "use-credentials" === input ? input : "";
|
|
85
|
-
}
|
|
86
|
-
exports.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = Internals;
|
|
87
|
-
exports.createPortal = function(children, container) {
|
|
88
|
-
var key = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : null;
|
|
89
|
-
if (!container || 1 !== container.nodeType && 9 !== container.nodeType && 11 !== container.nodeType)
|
|
90
|
-
throw Error(formatProdErrorMessage(299));
|
|
91
|
-
return createPortal$1(children, container, null, key);
|
|
92
|
-
};
|
|
93
|
-
exports.flushSync = function(fn) {
|
|
94
|
-
var previousTransition = ReactSharedInternals.T, previousUpdatePriority = Internals.p;
|
|
95
|
-
try {
|
|
96
|
-
if (ReactSharedInternals.T = null, Internals.p = 2, fn) return fn();
|
|
97
|
-
} finally {
|
|
98
|
-
ReactSharedInternals.T = previousTransition, Internals.p = previousUpdatePriority, Internals.d.f();
|
|
99
|
-
}
|
|
100
|
-
};
|
|
101
|
-
exports.preconnect = function(href, options) {
|
|
102
|
-
"string" === typeof href && (options ? (options = options.crossOrigin, options = "string" === typeof options ? "use-credentials" === options ? options : "" : void 0) : options = null, Internals.d.C(href, options));
|
|
103
|
-
};
|
|
104
|
-
exports.prefetchDNS = function(href) {
|
|
105
|
-
"string" === typeof href && Internals.d.D(href);
|
|
106
|
-
};
|
|
107
|
-
exports.preinit = function(href, options) {
|
|
108
|
-
if ("string" === typeof href && options && "string" === typeof options.as) {
|
|
109
|
-
var as = options.as, crossOrigin = getCrossOriginStringAs(as, options.crossOrigin), integrity = "string" === typeof options.integrity ? options.integrity : void 0, fetchPriority = "string" === typeof options.fetchPriority ? options.fetchPriority : void 0;
|
|
110
|
-
"style" === as ? Internals.d.S(
|
|
111
|
-
href,
|
|
112
|
-
"string" === typeof options.precedence ? options.precedence : void 0,
|
|
113
|
-
{
|
|
114
|
-
crossOrigin,
|
|
115
|
-
integrity,
|
|
116
|
-
fetchPriority
|
|
117
|
-
}
|
|
118
|
-
) : "script" === as && Internals.d.X(href, {
|
|
119
|
-
crossOrigin,
|
|
120
|
-
integrity,
|
|
121
|
-
fetchPriority,
|
|
122
|
-
nonce: "string" === typeof options.nonce ? options.nonce : void 0
|
|
123
|
-
});
|
|
124
|
-
}
|
|
125
|
-
};
|
|
126
|
-
exports.preinitModule = function(href, options) {
|
|
127
|
-
if ("string" === typeof href)
|
|
128
|
-
if ("object" === typeof options && null !== options) {
|
|
129
|
-
if (null == options.as || "script" === options.as) {
|
|
130
|
-
var crossOrigin = getCrossOriginStringAs(
|
|
131
|
-
options.as,
|
|
132
|
-
options.crossOrigin
|
|
133
|
-
);
|
|
134
|
-
Internals.d.M(href, {
|
|
135
|
-
crossOrigin,
|
|
136
|
-
integrity: "string" === typeof options.integrity ? options.integrity : void 0,
|
|
137
|
-
nonce: "string" === typeof options.nonce ? options.nonce : void 0
|
|
138
|
-
});
|
|
139
|
-
}
|
|
140
|
-
} else null == options && Internals.d.M(href);
|
|
141
|
-
};
|
|
142
|
-
exports.preload = function(href, options) {
|
|
143
|
-
if ("string" === typeof href && "object" === typeof options && null !== options && "string" === typeof options.as) {
|
|
144
|
-
var as = options.as, crossOrigin = getCrossOriginStringAs(as, options.crossOrigin);
|
|
145
|
-
Internals.d.L(href, as, {
|
|
146
|
-
crossOrigin,
|
|
147
|
-
integrity: "string" === typeof options.integrity ? options.integrity : void 0,
|
|
148
|
-
nonce: "string" === typeof options.nonce ? options.nonce : void 0,
|
|
149
|
-
type: "string" === typeof options.type ? options.type : void 0,
|
|
150
|
-
fetchPriority: "string" === typeof options.fetchPriority ? options.fetchPriority : void 0,
|
|
151
|
-
referrerPolicy: "string" === typeof options.referrerPolicy ? options.referrerPolicy : void 0,
|
|
152
|
-
imageSrcSet: "string" === typeof options.imageSrcSet ? options.imageSrcSet : void 0,
|
|
153
|
-
imageSizes: "string" === typeof options.imageSizes ? options.imageSizes : void 0,
|
|
154
|
-
media: "string" === typeof options.media ? options.media : void 0
|
|
155
|
-
});
|
|
156
|
-
}
|
|
157
|
-
};
|
|
158
|
-
exports.preloadModule = function(href, options) {
|
|
159
|
-
if ("string" === typeof href)
|
|
160
|
-
if (options) {
|
|
161
|
-
var crossOrigin = getCrossOriginStringAs(options.as, options.crossOrigin);
|
|
162
|
-
Internals.d.m(href, {
|
|
163
|
-
as: "string" === typeof options.as && "script" !== options.as ? options.as : void 0,
|
|
164
|
-
crossOrigin,
|
|
165
|
-
integrity: "string" === typeof options.integrity ? options.integrity : void 0
|
|
166
|
-
});
|
|
167
|
-
} else Internals.d.m(href);
|
|
168
|
-
};
|
|
169
|
-
exports.requestFormReset = function(form) {
|
|
170
|
-
Internals.d.r(form);
|
|
171
|
-
};
|
|
172
|
-
exports.unstable_batchedUpdates = function(fn, a) {
|
|
173
|
-
return fn(a);
|
|
174
|
-
};
|
|
175
|
-
exports.useFormState = function(action, initialState, permalink) {
|
|
176
|
-
return ReactSharedInternals.H.useFormState(action, initialState, permalink);
|
|
177
|
-
};
|
|
178
|
-
exports.useFormStatus = function() {
|
|
179
|
-
return ReactSharedInternals.H.useHostTransitionStatus();
|
|
180
|
-
};
|
|
181
|
-
exports.version = "19.1.1";
|
|
182
|
-
}
|
|
183
|
-
});
|
|
184
|
-
|
|
185
|
-
// node_modules/react-dom/cjs/react-dom.development.js
|
|
186
|
-
var require_react_dom_development = __commonJS({
|
|
187
|
-
"node_modules/react-dom/cjs/react-dom.development.js"(exports) {
|
|
188
|
-
"production" !== process.env.NODE_ENV && function() {
|
|
189
|
-
function noop2() {
|
|
190
|
-
}
|
|
191
|
-
function testStringCoercion(value) {
|
|
192
|
-
return "" + value;
|
|
193
|
-
}
|
|
194
|
-
function createPortal$1(children, containerInfo, implementation) {
|
|
195
|
-
var key = 3 < arguments.length && void 0 !== arguments[3] ? arguments[3] : null;
|
|
196
|
-
try {
|
|
197
|
-
testStringCoercion(key);
|
|
198
|
-
var JSCompiler_inline_result = false;
|
|
199
|
-
} catch (e) {
|
|
200
|
-
JSCompiler_inline_result = true;
|
|
201
|
-
}
|
|
202
|
-
JSCompiler_inline_result && (console.error(
|
|
203
|
-
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
204
|
-
"function" === typeof Symbol && Symbol.toStringTag && key[Symbol.toStringTag] || key.constructor.name || "Object"
|
|
205
|
-
), testStringCoercion(key));
|
|
206
|
-
return {
|
|
207
|
-
$$typeof: REACT_PORTAL_TYPE,
|
|
208
|
-
key: null == key ? null : "" + key,
|
|
209
|
-
children,
|
|
210
|
-
containerInfo,
|
|
211
|
-
implementation
|
|
212
|
-
};
|
|
213
|
-
}
|
|
214
|
-
function getCrossOriginStringAs(as, input) {
|
|
215
|
-
if ("font" === as) return "";
|
|
216
|
-
if ("string" === typeof input)
|
|
217
|
-
return "use-credentials" === input ? input : "";
|
|
218
|
-
}
|
|
219
|
-
function getValueDescriptorExpectingObjectForWarning(thing) {
|
|
220
|
-
return null === thing ? "`null`" : void 0 === thing ? "`undefined`" : "" === thing ? "an empty string" : 'something with type "' + typeof thing + '"';
|
|
221
|
-
}
|
|
222
|
-
function getValueDescriptorExpectingEnumForWarning(thing) {
|
|
223
|
-
return null === thing ? "`null`" : void 0 === thing ? "`undefined`" : "" === thing ? "an empty string" : "string" === typeof thing ? JSON.stringify(thing) : "number" === typeof thing ? "`" + thing + "`" : 'something with type "' + typeof thing + '"';
|
|
224
|
-
}
|
|
225
|
-
function resolveDispatcher() {
|
|
226
|
-
var dispatcher = ReactSharedInternals.H;
|
|
227
|
-
null === dispatcher && console.error(
|
|
228
|
-
"Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem."
|
|
229
|
-
);
|
|
230
|
-
return dispatcher;
|
|
231
|
-
}
|
|
232
|
-
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
233
|
-
var React12 = __require("react"), Internals = {
|
|
234
|
-
d: {
|
|
235
|
-
f: noop2,
|
|
236
|
-
r: function() {
|
|
237
|
-
throw Error(
|
|
238
|
-
"Invalid form element. requestFormReset must be passed a form that was rendered by React."
|
|
239
|
-
);
|
|
240
|
-
},
|
|
241
|
-
D: noop2,
|
|
242
|
-
C: noop2,
|
|
243
|
-
L: noop2,
|
|
244
|
-
m: noop2,
|
|
245
|
-
X: noop2,
|
|
246
|
-
S: noop2,
|
|
247
|
-
M: noop2
|
|
248
|
-
},
|
|
249
|
-
p: 0,
|
|
250
|
-
findDOMNode: null
|
|
251
|
-
}, REACT_PORTAL_TYPE = Symbol.for("react.portal"), ReactSharedInternals = React12.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
|
|
252
|
-
"function" === typeof Map && null != Map.prototype && "function" === typeof Map.prototype.forEach && "function" === typeof Set && null != Set.prototype && "function" === typeof Set.prototype.clear && "function" === typeof Set.prototype.forEach || console.error(
|
|
253
|
-
"React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"
|
|
254
|
-
);
|
|
255
|
-
exports.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = Internals;
|
|
256
|
-
exports.createPortal = function(children, container) {
|
|
257
|
-
var key = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : null;
|
|
258
|
-
if (!container || 1 !== container.nodeType && 9 !== container.nodeType && 11 !== container.nodeType)
|
|
259
|
-
throw Error("Target container is not a DOM element.");
|
|
260
|
-
return createPortal$1(children, container, null, key);
|
|
261
|
-
};
|
|
262
|
-
exports.flushSync = function(fn) {
|
|
263
|
-
var previousTransition = ReactSharedInternals.T, previousUpdatePriority = Internals.p;
|
|
264
|
-
try {
|
|
265
|
-
if (ReactSharedInternals.T = null, Internals.p = 2, fn)
|
|
266
|
-
return fn();
|
|
267
|
-
} finally {
|
|
268
|
-
ReactSharedInternals.T = previousTransition, Internals.p = previousUpdatePriority, Internals.d.f() && console.error(
|
|
269
|
-
"flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task."
|
|
270
|
-
);
|
|
271
|
-
}
|
|
272
|
-
};
|
|
273
|
-
exports.preconnect = function(href, options) {
|
|
274
|
-
"string" === typeof href && href ? null != options && "object" !== typeof options ? console.error(
|
|
275
|
-
"ReactDOM.preconnect(): Expected the `options` argument (second) to be an object but encountered %s instead. The only supported option at this time is `crossOrigin` which accepts a string.",
|
|
276
|
-
getValueDescriptorExpectingEnumForWarning(options)
|
|
277
|
-
) : null != options && "string" !== typeof options.crossOrigin && console.error(
|
|
278
|
-
"ReactDOM.preconnect(): Expected the `crossOrigin` option (second argument) to be a string but encountered %s instead. Try removing this option or passing a string value instead.",
|
|
279
|
-
getValueDescriptorExpectingObjectForWarning(options.crossOrigin)
|
|
280
|
-
) : console.error(
|
|
281
|
-
"ReactDOM.preconnect(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",
|
|
282
|
-
getValueDescriptorExpectingObjectForWarning(href)
|
|
283
|
-
);
|
|
284
|
-
"string" === typeof href && (options ? (options = options.crossOrigin, options = "string" === typeof options ? "use-credentials" === options ? options : "" : void 0) : options = null, Internals.d.C(href, options));
|
|
285
|
-
};
|
|
286
|
-
exports.prefetchDNS = function(href) {
|
|
287
|
-
if ("string" !== typeof href || !href)
|
|
288
|
-
console.error(
|
|
289
|
-
"ReactDOM.prefetchDNS(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",
|
|
290
|
-
getValueDescriptorExpectingObjectForWarning(href)
|
|
291
|
-
);
|
|
292
|
-
else if (1 < arguments.length) {
|
|
293
|
-
var options = arguments[1];
|
|
294
|
-
"object" === typeof options && options.hasOwnProperty("crossOrigin") ? console.error(
|
|
295
|
-
"ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. It looks like the you are attempting to set a crossOrigin property for this DNS lookup hint. Browsers do not perform DNS queries using CORS and setting this attribute on the resource hint has no effect. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",
|
|
296
|
-
getValueDescriptorExpectingEnumForWarning(options)
|
|
297
|
-
) : console.error(
|
|
298
|
-
"ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",
|
|
299
|
-
getValueDescriptorExpectingEnumForWarning(options)
|
|
300
|
-
);
|
|
301
|
-
}
|
|
302
|
-
"string" === typeof href && Internals.d.D(href);
|
|
303
|
-
};
|
|
304
|
-
exports.preinit = function(href, options) {
|
|
305
|
-
"string" === typeof href && href ? null == options || "object" !== typeof options ? console.error(
|
|
306
|
-
"ReactDOM.preinit(): Expected the `options` argument (second) to be an object with an `as` property describing the type of resource to be preinitialized but encountered %s instead.",
|
|
307
|
-
getValueDescriptorExpectingEnumForWarning(options)
|
|
308
|
-
) : "style" !== options.as && "script" !== options.as && console.error(
|
|
309
|
-
'ReactDOM.preinit(): Expected the `as` property in the `options` argument (second) to contain a valid value describing the type of resource to be preinitialized but encountered %s instead. Valid values for `as` are "style" and "script".',
|
|
310
|
-
getValueDescriptorExpectingEnumForWarning(options.as)
|
|
311
|
-
) : console.error(
|
|
312
|
-
"ReactDOM.preinit(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",
|
|
313
|
-
getValueDescriptorExpectingObjectForWarning(href)
|
|
314
|
-
);
|
|
315
|
-
if ("string" === typeof href && options && "string" === typeof options.as) {
|
|
316
|
-
var as = options.as, crossOrigin = getCrossOriginStringAs(as, options.crossOrigin), integrity = "string" === typeof options.integrity ? options.integrity : void 0, fetchPriority = "string" === typeof options.fetchPriority ? options.fetchPriority : void 0;
|
|
317
|
-
"style" === as ? Internals.d.S(
|
|
318
|
-
href,
|
|
319
|
-
"string" === typeof options.precedence ? options.precedence : void 0,
|
|
320
|
-
{
|
|
321
|
-
crossOrigin,
|
|
322
|
-
integrity,
|
|
323
|
-
fetchPriority
|
|
324
|
-
}
|
|
325
|
-
) : "script" === as && Internals.d.X(href, {
|
|
326
|
-
crossOrigin,
|
|
327
|
-
integrity,
|
|
328
|
-
fetchPriority,
|
|
329
|
-
nonce: "string" === typeof options.nonce ? options.nonce : void 0
|
|
330
|
-
});
|
|
331
|
-
}
|
|
332
|
-
};
|
|
333
|
-
exports.preinitModule = function(href, options) {
|
|
334
|
-
var encountered = "";
|
|
335
|
-
"string" === typeof href && href || (encountered += " The `href` argument encountered was " + getValueDescriptorExpectingObjectForWarning(href) + ".");
|
|
336
|
-
void 0 !== options && "object" !== typeof options ? encountered += " The `options` argument encountered was " + getValueDescriptorExpectingObjectForWarning(options) + "." : options && "as" in options && "script" !== options.as && (encountered += " The `as` option encountered was " + getValueDescriptorExpectingEnumForWarning(options.as) + ".");
|
|
337
|
-
if (encountered)
|
|
338
|
-
console.error(
|
|
339
|
-
"ReactDOM.preinitModule(): Expected up to two arguments, a non-empty `href` string and, optionally, an `options` object with a valid `as` property.%s",
|
|
340
|
-
encountered
|
|
341
|
-
);
|
|
342
|
-
else
|
|
343
|
-
switch (encountered = options && "string" === typeof options.as ? options.as : "script", encountered) {
|
|
344
|
-
case "script":
|
|
345
|
-
break;
|
|
346
|
-
default:
|
|
347
|
-
encountered = getValueDescriptorExpectingEnumForWarning(encountered), console.error(
|
|
348
|
-
'ReactDOM.preinitModule(): Currently the only supported "as" type for this function is "script" but received "%s" instead. This warning was generated for `href` "%s". In the future other module types will be supported, aligning with the import-attributes proposal. Learn more here: (https://github.com/tc39/proposal-import-attributes)',
|
|
349
|
-
encountered,
|
|
350
|
-
href
|
|
351
|
-
);
|
|
352
|
-
}
|
|
353
|
-
if ("string" === typeof href)
|
|
354
|
-
if ("object" === typeof options && null !== options) {
|
|
355
|
-
if (null == options.as || "script" === options.as)
|
|
356
|
-
encountered = getCrossOriginStringAs(
|
|
357
|
-
options.as,
|
|
358
|
-
options.crossOrigin
|
|
359
|
-
), Internals.d.M(href, {
|
|
360
|
-
crossOrigin: encountered,
|
|
361
|
-
integrity: "string" === typeof options.integrity ? options.integrity : void 0,
|
|
362
|
-
nonce: "string" === typeof options.nonce ? options.nonce : void 0
|
|
363
|
-
});
|
|
364
|
-
} else null == options && Internals.d.M(href);
|
|
365
|
-
};
|
|
366
|
-
exports.preload = function(href, options) {
|
|
367
|
-
var encountered = "";
|
|
368
|
-
"string" === typeof href && href || (encountered += " The `href` argument encountered was " + getValueDescriptorExpectingObjectForWarning(href) + ".");
|
|
369
|
-
null == options || "object" !== typeof options ? encountered += " The `options` argument encountered was " + getValueDescriptorExpectingObjectForWarning(options) + "." : "string" === typeof options.as && options.as || (encountered += " The `as` option encountered was " + getValueDescriptorExpectingObjectForWarning(options.as) + ".");
|
|
370
|
-
encountered && console.error(
|
|
371
|
-
'ReactDOM.preload(): Expected two arguments, a non-empty `href` string and an `options` object with an `as` property valid for a `<link rel="preload" as="..." />` tag.%s',
|
|
372
|
-
encountered
|
|
373
|
-
);
|
|
374
|
-
if ("string" === typeof href && "object" === typeof options && null !== options && "string" === typeof options.as) {
|
|
375
|
-
encountered = options.as;
|
|
376
|
-
var crossOrigin = getCrossOriginStringAs(
|
|
377
|
-
encountered,
|
|
378
|
-
options.crossOrigin
|
|
379
|
-
);
|
|
380
|
-
Internals.d.L(href, encountered, {
|
|
381
|
-
crossOrigin,
|
|
382
|
-
integrity: "string" === typeof options.integrity ? options.integrity : void 0,
|
|
383
|
-
nonce: "string" === typeof options.nonce ? options.nonce : void 0,
|
|
384
|
-
type: "string" === typeof options.type ? options.type : void 0,
|
|
385
|
-
fetchPriority: "string" === typeof options.fetchPriority ? options.fetchPriority : void 0,
|
|
386
|
-
referrerPolicy: "string" === typeof options.referrerPolicy ? options.referrerPolicy : void 0,
|
|
387
|
-
imageSrcSet: "string" === typeof options.imageSrcSet ? options.imageSrcSet : void 0,
|
|
388
|
-
imageSizes: "string" === typeof options.imageSizes ? options.imageSizes : void 0,
|
|
389
|
-
media: "string" === typeof options.media ? options.media : void 0
|
|
390
|
-
});
|
|
391
|
-
}
|
|
392
|
-
};
|
|
393
|
-
exports.preloadModule = function(href, options) {
|
|
394
|
-
var encountered = "";
|
|
395
|
-
"string" === typeof href && href || (encountered += " The `href` argument encountered was " + getValueDescriptorExpectingObjectForWarning(href) + ".");
|
|
396
|
-
void 0 !== options && "object" !== typeof options ? encountered += " The `options` argument encountered was " + getValueDescriptorExpectingObjectForWarning(options) + "." : options && "as" in options && "string" !== typeof options.as && (encountered += " The `as` option encountered was " + getValueDescriptorExpectingObjectForWarning(options.as) + ".");
|
|
397
|
-
encountered && console.error(
|
|
398
|
-
'ReactDOM.preloadModule(): Expected two arguments, a non-empty `href` string and, optionally, an `options` object with an `as` property valid for a `<link rel="modulepreload" as="..." />` tag.%s',
|
|
399
|
-
encountered
|
|
400
|
-
);
|
|
401
|
-
"string" === typeof href && (options ? (encountered = getCrossOriginStringAs(
|
|
402
|
-
options.as,
|
|
403
|
-
options.crossOrigin
|
|
404
|
-
), Internals.d.m(href, {
|
|
405
|
-
as: "string" === typeof options.as && "script" !== options.as ? options.as : void 0,
|
|
406
|
-
crossOrigin: encountered,
|
|
407
|
-
integrity: "string" === typeof options.integrity ? options.integrity : void 0
|
|
408
|
-
})) : Internals.d.m(href));
|
|
409
|
-
};
|
|
410
|
-
exports.requestFormReset = function(form) {
|
|
411
|
-
Internals.d.r(form);
|
|
412
|
-
};
|
|
413
|
-
exports.unstable_batchedUpdates = function(fn, a) {
|
|
414
|
-
return fn(a);
|
|
415
|
-
};
|
|
416
|
-
exports.useFormState = function(action, initialState, permalink) {
|
|
417
|
-
return resolveDispatcher().useFormState(action, initialState, permalink);
|
|
418
|
-
};
|
|
419
|
-
exports.useFormStatus = function() {
|
|
420
|
-
return resolveDispatcher().useHostTransitionStatus();
|
|
421
|
-
};
|
|
422
|
-
exports.version = "19.1.1";
|
|
423
|
-
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
424
|
-
}();
|
|
425
|
-
}
|
|
426
|
-
});
|
|
427
|
-
|
|
428
|
-
// node_modules/react-dom/index.js
|
|
429
|
-
var require_react_dom = __commonJS({
|
|
430
|
-
"node_modules/react-dom/index.js"(exports, module) {
|
|
431
|
-
function checkDCE() {
|
|
432
|
-
if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === "undefined" || typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== "function") {
|
|
433
|
-
return;
|
|
434
|
-
}
|
|
435
|
-
if (process.env.NODE_ENV !== "production") {
|
|
436
|
-
throw new Error("^_^");
|
|
437
|
-
}
|
|
438
|
-
try {
|
|
439
|
-
__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE);
|
|
440
|
-
} catch (err) {
|
|
441
|
-
console.error(err);
|
|
442
|
-
}
|
|
443
|
-
}
|
|
444
|
-
if (process.env.NODE_ENV === "production") {
|
|
445
|
-
checkDCE();
|
|
446
|
-
module.exports = require_react_dom_production();
|
|
447
|
-
} else {
|
|
448
|
-
module.exports = require_react_dom_development();
|
|
449
|
-
}
|
|
450
|
-
}
|
|
451
|
-
});
|
|
6
|
+
// src/components/LegendList.tsx
|
|
452
7
|
var AnimatedView = forwardRef(function AnimatedView2(props, ref) {
|
|
453
|
-
return /* @__PURE__ */
|
|
8
|
+
return /* @__PURE__ */ React4.createElement("div", { ref, ...props });
|
|
454
9
|
});
|
|
455
10
|
var View = forwardRef(function View2(props, ref) {
|
|
456
|
-
return /* @__PURE__ */
|
|
11
|
+
return /* @__PURE__ */ React4.createElement("div", { ref, ...props });
|
|
457
12
|
});
|
|
458
13
|
var Text = View;
|
|
459
14
|
|
|
@@ -461,9 +16,9 @@ var Text = View;
|
|
|
461
16
|
var createAnimatedValue = (value) => value;
|
|
462
17
|
|
|
463
18
|
// src/state/state.tsx
|
|
464
|
-
var ContextState =
|
|
19
|
+
var ContextState = React4.createContext(null);
|
|
465
20
|
function StateProvider({ children }) {
|
|
466
|
-
const [value] =
|
|
21
|
+
const [value] = React4.useState(() => ({
|
|
467
22
|
animatedScrollY: createAnimatedValue(0),
|
|
468
23
|
columnWrapperStyle: void 0,
|
|
469
24
|
internalState: void 0,
|
|
@@ -482,10 +37,10 @@ function StateProvider({ children }) {
|
|
|
482
37
|
]),
|
|
483
38
|
viewRefs: /* @__PURE__ */ new Map()
|
|
484
39
|
}));
|
|
485
|
-
return /* @__PURE__ */
|
|
40
|
+
return /* @__PURE__ */ React4.createElement(ContextState.Provider, { value }, children);
|
|
486
41
|
}
|
|
487
42
|
function useStateContext() {
|
|
488
|
-
return
|
|
43
|
+
return React4.useContext(ContextState);
|
|
489
44
|
}
|
|
490
45
|
function createSelectorFunctionsArr(ctx, signalNames) {
|
|
491
46
|
let lastValues = [];
|
|
@@ -555,23 +110,23 @@ function getContentSize(ctx) {
|
|
|
555
110
|
return headerSize + footerSize + totalSize + stylePaddingTop;
|
|
556
111
|
}
|
|
557
112
|
function useArr$(signalNames) {
|
|
558
|
-
const ctx =
|
|
559
|
-
const { subscribe, get } =
|
|
113
|
+
const ctx = React4.useContext(ContextState);
|
|
114
|
+
const { subscribe, get } = React4.useMemo(() => createSelectorFunctionsArr(ctx, signalNames), [ctx, signalNames]);
|
|
560
115
|
const value = useSyncExternalStore(subscribe, get);
|
|
561
116
|
return value;
|
|
562
117
|
}
|
|
563
118
|
function useSelector$(signalName, selector) {
|
|
564
|
-
const ctx =
|
|
565
|
-
const { subscribe, get } =
|
|
119
|
+
const ctx = React4.useContext(ContextState);
|
|
120
|
+
const { subscribe, get } = React4.useMemo(() => createSelectorFunctionsArr(ctx, [signalName]), [ctx, signalName]);
|
|
566
121
|
const value = useSyncExternalStore(subscribe, () => selector(get()[0]));
|
|
567
122
|
return value;
|
|
568
123
|
}
|
|
569
124
|
|
|
570
125
|
// src/components/DebugView.tsx
|
|
571
126
|
var DebugRow = ({ children }) => {
|
|
572
|
-
return /* @__PURE__ */
|
|
127
|
+
return /* @__PURE__ */ React4.createElement(View, { style: { alignItems: "center", flexDirection: "row", justifyContent: "space-between" } }, children);
|
|
573
128
|
};
|
|
574
|
-
var DebugView =
|
|
129
|
+
var DebugView = React4.memo(function DebugView2({ state }) {
|
|
575
130
|
const ctx = useStateContext();
|
|
576
131
|
const [totalSize = 0, scrollAdjust = 0, rawScroll = 0, scroll = 0, _numContainers = 0, _numContainersPooled = 0] = useArr$([
|
|
577
132
|
"totalSize",
|
|
@@ -586,7 +141,7 @@ var DebugView = React3.memo(function DebugView2({ state }) {
|
|
|
586
141
|
useInterval(() => {
|
|
587
142
|
forceUpdate();
|
|
588
143
|
}, 100);
|
|
589
|
-
return /* @__PURE__ */
|
|
144
|
+
return /* @__PURE__ */ React4.createElement(
|
|
590
145
|
View,
|
|
591
146
|
{
|
|
592
147
|
pointerEvents: "none",
|
|
@@ -602,12 +157,12 @@ var DebugView = React3.memo(function DebugView2({ state }) {
|
|
|
602
157
|
top: 0
|
|
603
158
|
}
|
|
604
159
|
},
|
|
605
|
-
/* @__PURE__ */
|
|
606
|
-
/* @__PURE__ */
|
|
607
|
-
/* @__PURE__ */
|
|
608
|
-
/* @__PURE__ */
|
|
609
|
-
/* @__PURE__ */
|
|
610
|
-
/* @__PURE__ */
|
|
160
|
+
/* @__PURE__ */ React4.createElement(DebugRow, null, /* @__PURE__ */ React4.createElement(Text, null, "TotalSize:"), /* @__PURE__ */ React4.createElement(Text, null, totalSize.toFixed(2))),
|
|
161
|
+
/* @__PURE__ */ React4.createElement(DebugRow, null, /* @__PURE__ */ React4.createElement(Text, null, "ContentSize:"), /* @__PURE__ */ React4.createElement(Text, null, contentSize.toFixed(2))),
|
|
162
|
+
/* @__PURE__ */ React4.createElement(DebugRow, null, /* @__PURE__ */ React4.createElement(Text, null, "At end:"), /* @__PURE__ */ React4.createElement(Text, null, String(state.isAtEnd))),
|
|
163
|
+
/* @__PURE__ */ React4.createElement(DebugRow, null, /* @__PURE__ */ React4.createElement(Text, null, "ScrollAdjust:"), /* @__PURE__ */ React4.createElement(Text, null, scrollAdjust.toFixed(2))),
|
|
164
|
+
/* @__PURE__ */ React4.createElement(DebugRow, null, /* @__PURE__ */ React4.createElement(Text, null, "RawScroll: "), /* @__PURE__ */ React4.createElement(Text, null, rawScroll.toFixed(2))),
|
|
165
|
+
/* @__PURE__ */ React4.createElement(DebugRow, null, /* @__PURE__ */ React4.createElement(Text, null, "ComputedScroll: "), /* @__PURE__ */ React4.createElement(Text, null, scroll.toFixed(2)))
|
|
611
166
|
);
|
|
612
167
|
});
|
|
613
168
|
function useInterval(callback, delay) {
|
|
@@ -693,7 +248,7 @@ function useSyncLayout({
|
|
|
693
248
|
var LayoutView = ({ onLayoutChange, refView, children, ...rest }) => {
|
|
694
249
|
const ref = refView != null ? refView : useRef();
|
|
695
250
|
useSyncLayout({ onLayoutChange, ref });
|
|
696
|
-
return /* @__PURE__ */
|
|
251
|
+
return /* @__PURE__ */ React4.createElement("div", { ...rest, ref }, children);
|
|
697
252
|
};
|
|
698
253
|
|
|
699
254
|
// src/constants.ts
|
|
@@ -714,7 +269,7 @@ var PositionViewState = typedMemo(function PositionView({
|
|
|
714
269
|
const [position = POSITION_OUT_OF_VIEW] = useArr$([`containerPosition${id}`]);
|
|
715
270
|
const base = Array.isArray(style) ? Object.assign({}, ...style) : style;
|
|
716
271
|
const combinedStyle = horizontal ? { ...base, left: position } : { ...base, top: position };
|
|
717
|
-
return /* @__PURE__ */
|
|
272
|
+
return /* @__PURE__ */ React4.createElement(LayoutView, { refView, style: combinedStyle, ...rest });
|
|
718
273
|
});
|
|
719
274
|
var PositionViewSticky = typedMemo(function PositionViewSticky2({
|
|
720
275
|
id,
|
|
@@ -725,7 +280,7 @@ var PositionViewSticky = typedMemo(function PositionViewSticky2({
|
|
|
725
280
|
...rest
|
|
726
281
|
}) {
|
|
727
282
|
const [position = POSITION_OUT_OF_VIEW] = useArr$([`containerPosition${id}`]);
|
|
728
|
-
const viewStyle =
|
|
283
|
+
const viewStyle = React4.useMemo(() => {
|
|
729
284
|
const base = Array.isArray(style) ? Object.assign({}, ...style) : style;
|
|
730
285
|
const axisStyle = horizontal ? { transform: `translateX(${position}px)` } : { top: position };
|
|
731
286
|
return {
|
|
@@ -734,13 +289,13 @@ var PositionViewSticky = typedMemo(function PositionViewSticky2({
|
|
|
734
289
|
...axisStyle
|
|
735
290
|
};
|
|
736
291
|
}, [style, position, horizontal, index]);
|
|
737
|
-
return /* @__PURE__ */
|
|
292
|
+
return /* @__PURE__ */ React4.createElement(LayoutView, { refView, style: viewStyle, ...rest });
|
|
738
293
|
});
|
|
739
294
|
var PositionView2 = PositionViewState;
|
|
740
295
|
function Separator({ ItemSeparatorComponent, itemKey, leadingItem }) {
|
|
741
296
|
const [lastItemKeys] = useArr$(["lastItemKeys"]);
|
|
742
297
|
const isALastItem = lastItemKeys.includes(itemKey);
|
|
743
|
-
return isALastItem ? null : /* @__PURE__ */
|
|
298
|
+
return isALastItem ? null : /* @__PURE__ */ React4.createElement(ItemSeparatorComponent, { leadingItem });
|
|
744
299
|
}
|
|
745
300
|
|
|
746
301
|
// src/constants-platform.ts
|
|
@@ -985,7 +540,7 @@ var Container = typedMemo(function Container2({
|
|
|
985
540
|
}
|
|
986
541
|
};
|
|
987
542
|
const PositionComponent = isSticky ? PositionViewSticky : PositionView2;
|
|
988
|
-
return /* @__PURE__ */
|
|
543
|
+
return /* @__PURE__ */ React4.createElement(ContextContainer.Provider, { value: contextValue }, /* @__PURE__ */ React4.createElement(
|
|
989
544
|
PositionComponent,
|
|
990
545
|
{
|
|
991
546
|
horizontal,
|
|
@@ -997,7 +552,7 @@ var Container = typedMemo(function Container2({
|
|
|
997
552
|
style
|
|
998
553
|
},
|
|
999
554
|
renderedItem,
|
|
1000
|
-
renderedItemInfo && ItemSeparatorComponent && /* @__PURE__ */
|
|
555
|
+
renderedItemInfo && ItemSeparatorComponent && /* @__PURE__ */ React4.createElement(
|
|
1001
556
|
Separator,
|
|
1002
557
|
{
|
|
1003
558
|
ItemSeparatorComponent,
|
|
@@ -1146,7 +701,7 @@ var ContainersInner = typedMemo(function ContainersInner2({ horizontal, numColum
|
|
|
1146
701
|
}
|
|
1147
702
|
}
|
|
1148
703
|
}
|
|
1149
|
-
return /* @__PURE__ */
|
|
704
|
+
return /* @__PURE__ */ React4.createElement("div", { ref, style }, children);
|
|
1150
705
|
});
|
|
1151
706
|
var Containers = typedMemo(function Containers2({
|
|
1152
707
|
horizontal,
|
|
@@ -1160,7 +715,7 @@ var Containers = typedMemo(function Containers2({
|
|
|
1160
715
|
const containers = [];
|
|
1161
716
|
for (let i = 0; i < numContainers; i++) {
|
|
1162
717
|
containers.push(
|
|
1163
|
-
/* @__PURE__ */
|
|
718
|
+
/* @__PURE__ */ React4.createElement(
|
|
1164
719
|
Container,
|
|
1165
720
|
{
|
|
1166
721
|
getRenderedItem: getRenderedItem2,
|
|
@@ -1174,10 +729,10 @@ var Containers = typedMemo(function Containers2({
|
|
|
1174
729
|
)
|
|
1175
730
|
);
|
|
1176
731
|
}
|
|
1177
|
-
return /* @__PURE__ */
|
|
732
|
+
return /* @__PURE__ */ React4.createElement(ContainersInner, { horizontal, numColumns, waitForInitialLayout }, containers);
|
|
1178
733
|
});
|
|
1179
|
-
var DevNumbers = __DEV__ &&
|
|
1180
|
-
return Array.from({ length: 100 }).map((_, index) => /* @__PURE__ */
|
|
734
|
+
var DevNumbers = __DEV__ && React4.memo(function DevNumbers2() {
|
|
735
|
+
return Array.from({ length: 100 }).map((_, index) => /* @__PURE__ */ React4.createElement(
|
|
1181
736
|
View,
|
|
1182
737
|
{
|
|
1183
738
|
key: index,
|
|
@@ -1189,7 +744,7 @@ var DevNumbers = __DEV__ && React3.memo(function DevNumbers2() {
|
|
|
1189
744
|
width: "100%"
|
|
1190
745
|
}
|
|
1191
746
|
},
|
|
1192
|
-
/* @__PURE__ */
|
|
747
|
+
/* @__PURE__ */ React4.createElement(Text, { style: { color: "red" } }, index * 100)
|
|
1193
748
|
));
|
|
1194
749
|
});
|
|
1195
750
|
var ListComponentScrollView = forwardRef(function ListComponentScrollView2({
|
|
@@ -1344,7 +899,7 @@ var ListComponentScrollView = forwardRef(function ListComponentScrollView2({
|
|
|
1344
899
|
minWidth: horizontal ? "100%" : void 0,
|
|
1345
900
|
...contentContainerStyle
|
|
1346
901
|
};
|
|
1347
|
-
return /* @__PURE__ */
|
|
902
|
+
return /* @__PURE__ */ React4.createElement("div", { ref: scrollRef, style: scrollViewStyle, ...props }, refreshControl, /* @__PURE__ */ React4.createElement("div", { ref: contentRef, style: contentStyle }, children));
|
|
1348
903
|
});
|
|
1349
904
|
function useValueListener$(key, callback) {
|
|
1350
905
|
const ctx = useStateContext();
|
|
@@ -1358,8 +913,8 @@ function useValueListener$(key, callback) {
|
|
|
1358
913
|
// src/components/ScrollAdjust.tsx
|
|
1359
914
|
function ScrollAdjust() {
|
|
1360
915
|
const ctx = useStateContext();
|
|
1361
|
-
const lastScrollOffsetRef =
|
|
1362
|
-
const callback =
|
|
916
|
+
const lastScrollOffsetRef = React4.useRef(0);
|
|
917
|
+
const callback = React4.useCallback(() => {
|
|
1363
918
|
var _a;
|
|
1364
919
|
const scrollAdjust = peek$(ctx, "scrollAdjust");
|
|
1365
920
|
const scrollAdjustUserOffset = peek$(ctx, "scrollAdjustUserOffset");
|
|
@@ -1393,21 +948,21 @@ function useValue$(key, params) {
|
|
|
1393
948
|
|
|
1394
949
|
// src/components/ListComponent.tsx
|
|
1395
950
|
var getComponent = (Component) => {
|
|
1396
|
-
if (
|
|
951
|
+
if (React4.isValidElement(Component)) {
|
|
1397
952
|
return Component;
|
|
1398
953
|
}
|
|
1399
954
|
if (Component) {
|
|
1400
|
-
return /* @__PURE__ */
|
|
955
|
+
return /* @__PURE__ */ React4.createElement(Component, null);
|
|
1401
956
|
}
|
|
1402
957
|
return null;
|
|
1403
958
|
};
|
|
1404
959
|
var Padding = () => {
|
|
1405
960
|
const animPaddingTop = useValue$("alignItemsPaddingTop");
|
|
1406
|
-
return /* @__PURE__ */
|
|
961
|
+
return /* @__PURE__ */ React4.createElement(AnimatedView, { style: { paddingTop: animPaddingTop } });
|
|
1407
962
|
};
|
|
1408
963
|
var PaddingDevMode = () => {
|
|
1409
964
|
const animPaddingTop = useValue$("alignItemsPaddingTop");
|
|
1410
|
-
return /* @__PURE__ */
|
|
965
|
+
return /* @__PURE__ */ React4.createElement(React4.Fragment, null, /* @__PURE__ */ React4.createElement(AnimatedView, { style: { paddingTop: animPaddingTop } }), /* @__PURE__ */ React4.createElement(
|
|
1411
966
|
AnimatedView,
|
|
1412
967
|
{
|
|
1413
968
|
style: {
|
|
@@ -1450,12 +1005,12 @@ var ListComponent = typedMemo(function ListComponent2({
|
|
|
1450
1005
|
...rest
|
|
1451
1006
|
}) {
|
|
1452
1007
|
const ctx = useStateContext();
|
|
1453
|
-
const refHeader =
|
|
1008
|
+
const refHeader = React4.useRef(null);
|
|
1454
1009
|
const ScrollComponent = renderScrollComponent ? useMemo(
|
|
1455
|
-
() =>
|
|
1010
|
+
() => React4.forwardRef((props, ref) => renderScrollComponent({ ...props, ref })),
|
|
1456
1011
|
[renderScrollComponent]
|
|
1457
1012
|
) : ListComponentScrollView;
|
|
1458
|
-
|
|
1013
|
+
React4.useEffect(() => {
|
|
1459
1014
|
if (canRender) {
|
|
1460
1015
|
setTimeout(() => {
|
|
1461
1016
|
scrollAdjustHandler.setMounted();
|
|
@@ -1469,7 +1024,7 @@ var ListComponent = typedMemo(function ListComponent2({
|
|
|
1469
1024
|
if (base && base.height === "100%") return base;
|
|
1470
1025
|
return { ...base || {}, height: "100%" };
|
|
1471
1026
|
}, [horizontal, (contentContainerStyle == null ? void 0 : contentContainerStyle.height) === "100%" ? 1 : 0]);
|
|
1472
|
-
return /* @__PURE__ */
|
|
1027
|
+
return /* @__PURE__ */ React4.createElement(
|
|
1473
1028
|
SnapOrScroll,
|
|
1474
1029
|
{
|
|
1475
1030
|
...rest,
|
|
@@ -1483,9 +1038,9 @@ var ListComponent = typedMemo(function ListComponent2({
|
|
|
1483
1038
|
ScrollComponent: snapToIndices ? ScrollComponent : void 0,
|
|
1484
1039
|
style
|
|
1485
1040
|
},
|
|
1486
|
-
maintainVisibleContentPosition && /* @__PURE__ */
|
|
1487
|
-
ENABLE_DEVMODE ? /* @__PURE__ */
|
|
1488
|
-
ListHeaderComponent && /* @__PURE__ */
|
|
1041
|
+
maintainVisibleContentPosition && /* @__PURE__ */ React4.createElement(ScrollAdjust, null),
|
|
1042
|
+
ENABLE_DEVMODE ? /* @__PURE__ */ React4.createElement(PaddingDevMode, null) : /* @__PURE__ */ React4.createElement(Padding, null),
|
|
1043
|
+
ListHeaderComponent && /* @__PURE__ */ React4.createElement(
|
|
1489
1044
|
LayoutView,
|
|
1490
1045
|
{
|
|
1491
1046
|
onLayoutChange: onLayoutHeader,
|
|
@@ -1495,7 +1050,7 @@ var ListComponent = typedMemo(function ListComponent2({
|
|
|
1495
1050
|
getComponent(ListHeaderComponent)
|
|
1496
1051
|
),
|
|
1497
1052
|
ListEmptyComponent && getComponent(ListEmptyComponent),
|
|
1498
|
-
canRender && /* @__PURE__ */
|
|
1053
|
+
canRender && /* @__PURE__ */ React4.createElement(
|
|
1499
1054
|
Containers,
|
|
1500
1055
|
{
|
|
1501
1056
|
getRenderedItem: getRenderedItem2,
|
|
@@ -1506,7 +1061,7 @@ var ListComponent = typedMemo(function ListComponent2({
|
|
|
1506
1061
|
waitForInitialLayout
|
|
1507
1062
|
}
|
|
1508
1063
|
),
|
|
1509
|
-
ListFooterComponent && /* @__PURE__ */
|
|
1064
|
+
ListFooterComponent && /* @__PURE__ */ React4.createElement(
|
|
1510
1065
|
LayoutView,
|
|
1511
1066
|
{
|
|
1512
1067
|
onLayoutChange: (layout) => {
|
|
@@ -1517,7 +1072,7 @@ var ListComponent = typedMemo(function ListComponent2({
|
|
|
1517
1072
|
},
|
|
1518
1073
|
getComponent(ListFooterComponent)
|
|
1519
1074
|
),
|
|
1520
|
-
__DEV__ && ENABLE_DEVMODE && /* @__PURE__ */
|
|
1075
|
+
__DEV__ && ENABLE_DEVMODE && /* @__PURE__ */ React4.createElement(DevNumbers, null)
|
|
1521
1076
|
);
|
|
1522
1077
|
});
|
|
1523
1078
|
|
|
@@ -2072,9 +1627,6 @@ function maybeUpdateViewabilityCallback(ctx, configId, containerId, viewToken) {
|
|
|
2072
1627
|
cb == null ? void 0 : cb(viewToken);
|
|
2073
1628
|
}
|
|
2074
1629
|
|
|
2075
|
-
// src/platform/batchedUpdates.ts
|
|
2076
|
-
var import_react_dom = __toESM(require_react_dom());
|
|
2077
|
-
|
|
2078
1630
|
// src/utils/checkAllSizesKnown.ts
|
|
2079
1631
|
function checkAllSizesKnown(state) {
|
|
2080
1632
|
const { startBuffered, endBuffered, sizesKnown } = state;
|
|
@@ -2405,7 +1957,7 @@ function handleStickyRecycling(ctx, state, stickyArray, scroll, scrollBuffer, pe
|
|
|
2405
1957
|
}
|
|
2406
1958
|
}
|
|
2407
1959
|
function calculateItemsInView(ctx, state, params = {}) {
|
|
2408
|
-
|
|
1960
|
+
unstable_batchedUpdates(() => {
|
|
2409
1961
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
2410
1962
|
const {
|
|
2411
1963
|
columns,
|
|
@@ -3144,7 +2696,7 @@ function getRenderedItem(ctx, state, key) {
|
|
|
3144
2696
|
item: data[index],
|
|
3145
2697
|
type: getItemType ? (_a = getItemType(data[index], index)) != null ? _a : "" : ""
|
|
3146
2698
|
};
|
|
3147
|
-
renderedItem = isFunction(renderItem) ? renderItem(itemProps) :
|
|
2699
|
+
renderedItem = isFunction(renderItem) ? renderItem(itemProps) : React4__default.createElement(renderItem, itemProps);
|
|
3148
2700
|
}
|
|
3149
2701
|
return { index, item: data[index], renderedItem };
|
|
3150
2702
|
}
|
|
@@ -3255,14 +2807,14 @@ var LegendList = typedMemo(
|
|
|
3255
2807
|
const isChildrenMode = children !== void 0 && dataProp === void 0;
|
|
3256
2808
|
const processedProps = isChildrenMode ? {
|
|
3257
2809
|
...restProps,
|
|
3258
|
-
data: (isArray(children) ? children :
|
|
2810
|
+
data: (isArray(children) ? children : React4.Children.toArray(children)).flat(1),
|
|
3259
2811
|
renderItem: ({ item }) => item
|
|
3260
2812
|
} : {
|
|
3261
2813
|
...restProps,
|
|
3262
2814
|
data: dataProp || [],
|
|
3263
2815
|
renderItem: renderItemProp
|
|
3264
2816
|
};
|
|
3265
|
-
return /* @__PURE__ */
|
|
2817
|
+
return /* @__PURE__ */ React4.createElement(StateProvider, null, /* @__PURE__ */ React4.createElement(LegendListInner, { ...processedProps, ref: forwardedRef }));
|
|
3266
2818
|
})
|
|
3267
2819
|
);
|
|
3268
2820
|
var LegendListInner = typedForwardRef(function LegendListInner2(props, forwardedRef) {
|
|
@@ -3317,7 +2869,7 @@ var LegendListInner = typedForwardRef(function LegendListInner2(props, forwarded
|
|
|
3317
2869
|
} = props;
|
|
3318
2870
|
const [renderNum, setRenderNum] = useState(0);
|
|
3319
2871
|
const initialScroll = initialScrollIndexProp || initialScrollOffsetProp ? typeof initialScrollIndexProp === "object" ? { index: initialScrollIndexProp.index || 0, viewOffset: initialScrollIndexProp.viewOffset || 0 } : { index: initialScrollIndexProp || 0, viewOffset: initialScrollOffsetProp || 0 } : void 0;
|
|
3320
|
-
const [canRender, setCanRender] =
|
|
2872
|
+
const [canRender, setCanRender] = React4.useState(!IsNewArchitecture);
|
|
3321
2873
|
const contentContainerStyle = { ...StyleSheet.flatten(contentContainerStyleProp) };
|
|
3322
2874
|
const style = { ...StyleSheet.flatten(styleProp) };
|
|
3323
2875
|
const stylePaddingTopState = extractPadding(style, contentContainerStyle, "Top");
|
|
@@ -3649,7 +3201,7 @@ var LegendListInner = typedForwardRef(function LegendListInner2(props, forwarded
|
|
|
3649
3201
|
[]
|
|
3650
3202
|
);
|
|
3651
3203
|
const onScrollHandler = useStickyScrollHandler(stickyIndices, horizontal, ctx, fns.onScroll);
|
|
3652
|
-
return /* @__PURE__ */
|
|
3204
|
+
return /* @__PURE__ */ React4.createElement(React4.Fragment, null, /* @__PURE__ */ React4.createElement(
|
|
3653
3205
|
ListComponent,
|
|
3654
3206
|
{
|
|
3655
3207
|
...rest,
|
|
@@ -3676,9 +3228,9 @@ var LegendListInner = typedForwardRef(function LegendListInner2(props, forwarded
|
|
|
3676
3228
|
},
|
|
3677
3229
|
onScroll: onScrollHandler,
|
|
3678
3230
|
recycleItems,
|
|
3679
|
-
refreshControl: refreshControl ? stylePaddingTopState > 0 ?
|
|
3231
|
+
refreshControl: refreshControl ? stylePaddingTopState > 0 ? React4.cloneElement(refreshControl, {
|
|
3680
3232
|
progressViewOffset: (refreshControl.props.progressViewOffset || 0) + stylePaddingTopState
|
|
3681
|
-
}) : refreshControl : onRefresh && /* @__PURE__ */
|
|
3233
|
+
}) : refreshControl : onRefresh && /* @__PURE__ */ React4.createElement(
|
|
3682
3234
|
RefreshControl,
|
|
3683
3235
|
{
|
|
3684
3236
|
onRefresh,
|
|
@@ -3694,31 +3246,7 @@ var LegendListInner = typedForwardRef(function LegendListInner2(props, forwarded
|
|
|
3694
3246
|
updateItemSize: fns.updateItemSize,
|
|
3695
3247
|
waitForInitialLayout
|
|
3696
3248
|
}
|
|
3697
|
-
), __DEV__ && ENABLE_DEBUG_VIEW && /* @__PURE__ */
|
|
3249
|
+
), __DEV__ && ENABLE_DEBUG_VIEW && /* @__PURE__ */ React4.createElement(DebugView, { state: refState.current }));
|
|
3698
3250
|
});
|
|
3699
|
-
/*! Bundled license information:
|
|
3700
|
-
|
|
3701
|
-
react-dom/cjs/react-dom.production.js:
|
|
3702
|
-
(**
|
|
3703
|
-
* @license React
|
|
3704
|
-
* react-dom.production.js
|
|
3705
|
-
*
|
|
3706
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3707
|
-
*
|
|
3708
|
-
* This source code is licensed under the MIT license found in the
|
|
3709
|
-
* LICENSE file in the root directory of this source tree.
|
|
3710
|
-
*)
|
|
3711
|
-
|
|
3712
|
-
react-dom/cjs/react-dom.development.js:
|
|
3713
|
-
(**
|
|
3714
|
-
* @license React
|
|
3715
|
-
* react-dom.development.js
|
|
3716
|
-
*
|
|
3717
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3718
|
-
*
|
|
3719
|
-
* This source code is licensed under the MIT license found in the
|
|
3720
|
-
* LICENSE file in the root directory of this source tree.
|
|
3721
|
-
*)
|
|
3722
|
-
*/
|
|
3723
3251
|
|
|
3724
3252
|
export { LegendList, useIsLastItem, useListScrollSize, useRecyclingEffect, useRecyclingState, useSyncLayout2 as useSyncLayout, useViewability, useViewabilityAmount };
|