@vitessce/vit-s 3.9.2 → 3.9.4
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/dist/index.js +787 -68
- package/package.json +15 -15
package/dist/index.js
CHANGED
|
@@ -19,7 +19,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
19
19
|
});
|
|
20
20
|
var _overrides, _overrides2, _use_suffix_request, _FetchStore_instances, merge_init_fn, _bytes, _encoder, _data, _stride, _TypedArray, _BYTES_PER_ELEMENT, _shape, _endian, _encoder_config, _decoder_config, _order, _inverseOrder, _shape2, _strides, _metadata, _metadata2, _a2, _focused, _cleanup, _setup, _b, _online, _cleanup2, _setup2, _c, _gcTimeout, _d, _initialState, _revertState, _cache, _client, _retryer, _defaultOptions, _abortSignalConsumed, _Query_instances, dispatch_fn, _e, _queries, _f, _observers, _mutationCache, _retryer2, _Mutation_instances, dispatch_fn2, _g, _mutations, _scopes, _mutationId, _h, _queryCache, _mutationCache2, _defaultOptions2, _queryDefaults, _mutationDefaults, _mountCount, _unsubscribeFocus, _unsubscribeOnline, _i, _client2, _currentQuery, _currentQueryInitialState, _currentResult, _currentResultState, _currentResultOptions, _currentThenable, _selectError, _selectFn, _selectResult, _lastQueryWithDefinedData, _staleTimeoutId, _refetchIntervalId, _currentRefetchInterval, _trackedProps, _QueryObserver_instances, executeFetch_fn, updateStaleTimeout_fn, computeRefetchInterval_fn, updateRefetchInterval_fn, updateTimers_fn, clearStaleTimeout_fn, clearRefetchInterval_fn, updateQuery_fn, notify_fn, _j, _client3, _result, _queries2, _options, _observers2, _combinedResult, _lastCombine, _lastResult, _observerMatches, _QueriesObserver_instances, trackResult_fn, combineResult_fn, findMatchingObservers_fn, onUpdate_fn, notify_fn2, _k;
|
|
21
21
|
import * as React$1 from "react";
|
|
22
|
-
import React__default, { useContext, forwardRef, useRef, useMemo, createContext, createElement, isValidElement, cloneElement, Children, useCallback, Component, useState,
|
|
22
|
+
import React__default, { useContext, forwardRef, useRef, useMemo, createContext, createElement, isValidElement, cloneElement, Children, PureComponent, useEffect, useCallback, Component, useState, useLayoutEffect } from "react";
|
|
23
23
|
import * as ReactDOM from "react-dom";
|
|
24
24
|
import ReactDOM__default from "react-dom";
|
|
25
25
|
function sheetForTag(tag) {
|
|
@@ -415,9 +415,9 @@ function parse(value, root2, parent, rule, rules, rulesets, pseudo, points, decl
|
|
|
415
415
|
function ruleset(value, root2, parent, index, offset2, rules, points, type, props, children, length2) {
|
|
416
416
|
var post = offset2 - 1;
|
|
417
417
|
var rule = offset2 === 0 ? rules : [""];
|
|
418
|
-
var
|
|
418
|
+
var size2 = sizeof(rule);
|
|
419
419
|
for (var i2 = 0, j = 0, k = 0; i2 < index; ++i2)
|
|
420
|
-
for (var x = 0, y = substr(value, post + 1, post = abs(j = points[i2])), z2 = value; x <
|
|
420
|
+
for (var x = 0, y = substr(value, post + 1, post = abs(j = points[i2])), z2 = value; x < size2; ++x)
|
|
421
421
|
if (z2 = trim(j > 0 ? rule[x] + " " + y : replace(y, /&\f/g, rule[x])))
|
|
422
422
|
props[k++] = z2;
|
|
423
423
|
return node(value, root2, parent, offset2 === 0 ? RULESET : type, props, children, length2);
|
|
@@ -7671,17 +7671,17 @@ function createTypography(palette, typography) {
|
|
|
7671
7671
|
}
|
|
7672
7672
|
}
|
|
7673
7673
|
const coef = fontSize / 14;
|
|
7674
|
-
const pxToRem = pxToRem2 || ((
|
|
7675
|
-
const buildVariant = (fontWeight,
|
|
7674
|
+
const pxToRem = pxToRem2 || ((size2) => `${size2 / htmlFontSize * coef}rem`);
|
|
7675
|
+
const buildVariant = (fontWeight, size2, lineHeight, letterSpacing, casing) => ({
|
|
7676
7676
|
fontFamily,
|
|
7677
7677
|
fontWeight,
|
|
7678
|
-
fontSize: pxToRem(
|
|
7678
|
+
fontSize: pxToRem(size2),
|
|
7679
7679
|
// Unitless following https://meyerweb.com/eric/thoughts/2006/02/08/unitless-line-heights/
|
|
7680
7680
|
lineHeight,
|
|
7681
7681
|
// The letter spacing was designed for the Roboto font-family. Using the same letter-spacing
|
|
7682
7682
|
// across font-families can cause issues with the kerning.
|
|
7683
7683
|
...fontFamily === defaultFontFamily ? {
|
|
7684
|
-
letterSpacing: `${round$1(letterSpacing /
|
|
7684
|
+
letterSpacing: `${round$1(letterSpacing / size2)}em`
|
|
7685
7685
|
} : {},
|
|
7686
7686
|
...casing,
|
|
7687
7687
|
...allVariants
|
|
@@ -11195,7 +11195,7 @@ const CircularProgress = /* @__PURE__ */ React$1.forwardRef(function CircularPro
|
|
|
11195
11195
|
className,
|
|
11196
11196
|
color: color2 = "primary",
|
|
11197
11197
|
disableShrink = false,
|
|
11198
|
-
size = 40,
|
|
11198
|
+
size: size2 = 40,
|
|
11199
11199
|
style: style2,
|
|
11200
11200
|
thickness = 3.6,
|
|
11201
11201
|
value = 0,
|
|
@@ -11206,7 +11206,7 @@ const CircularProgress = /* @__PURE__ */ React$1.forwardRef(function CircularPro
|
|
|
11206
11206
|
...props,
|
|
11207
11207
|
color: color2,
|
|
11208
11208
|
disableShrink,
|
|
11209
|
-
size,
|
|
11209
|
+
size: size2,
|
|
11210
11210
|
thickness,
|
|
11211
11211
|
value,
|
|
11212
11212
|
variant
|
|
@@ -11225,8 +11225,8 @@ const CircularProgress = /* @__PURE__ */ React$1.forwardRef(function CircularPro
|
|
|
11225
11225
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(CircularProgressRoot, {
|
|
11226
11226
|
className: clsx$1(classes.root, className),
|
|
11227
11227
|
style: {
|
|
11228
|
-
width:
|
|
11229
|
-
height:
|
|
11228
|
+
width: size2,
|
|
11229
|
+
height: size2,
|
|
11230
11230
|
...rootStyle,
|
|
11231
11231
|
...style2
|
|
11232
11232
|
},
|
|
@@ -11326,11 +11326,11 @@ const useUtilityClasses$f = (ownerState) => {
|
|
|
11326
11326
|
disabled,
|
|
11327
11327
|
color: color2,
|
|
11328
11328
|
edge,
|
|
11329
|
-
size,
|
|
11329
|
+
size: size2,
|
|
11330
11330
|
loading
|
|
11331
11331
|
} = ownerState;
|
|
11332
11332
|
const slots = {
|
|
11333
|
-
root: ["root", loading && "loading", disabled && "disabled", color2 !== "default" && `color${capitalize$1(color2)}`, edge && `edge${capitalize$1(edge)}`, `size${capitalize$1(
|
|
11333
|
+
root: ["root", loading && "loading", disabled && "disabled", color2 !== "default" && `color${capitalize$1(color2)}`, edge && `edge${capitalize$1(edge)}`, `size${capitalize$1(size2)}`],
|
|
11334
11334
|
loadingIndicator: ["loadingIndicator"],
|
|
11335
11335
|
loadingWrapper: ["loadingWrapper"]
|
|
11336
11336
|
};
|
|
@@ -11483,7 +11483,7 @@ const IconButton = /* @__PURE__ */ React$1.forwardRef(function IconButton2(inPro
|
|
|
11483
11483
|
color: color2 = "default",
|
|
11484
11484
|
disabled = false,
|
|
11485
11485
|
disableFocusRipple = false,
|
|
11486
|
-
size = "medium",
|
|
11486
|
+
size: size2 = "medium",
|
|
11487
11487
|
id: idProp,
|
|
11488
11488
|
loading = null,
|
|
11489
11489
|
loadingIndicator: loadingIndicatorProp,
|
|
@@ -11503,7 +11503,7 @@ const IconButton = /* @__PURE__ */ React$1.forwardRef(function IconButton2(inPro
|
|
|
11503
11503
|
disableFocusRipple,
|
|
11504
11504
|
loading,
|
|
11505
11505
|
loadingIndicator,
|
|
11506
|
-
size
|
|
11506
|
+
size: size2
|
|
11507
11507
|
};
|
|
11508
11508
|
const classes = useUtilityClasses$f(ownerState);
|
|
11509
11509
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(IconButtonRoot, {
|
|
@@ -14249,13 +14249,13 @@ const useUtilityClasses$c = (ownerState) => {
|
|
|
14249
14249
|
hiddenLabel,
|
|
14250
14250
|
multiline,
|
|
14251
14251
|
readOnly,
|
|
14252
|
-
size,
|
|
14252
|
+
size: size2,
|
|
14253
14253
|
startAdornment,
|
|
14254
14254
|
type
|
|
14255
14255
|
} = ownerState;
|
|
14256
14256
|
const slots = {
|
|
14257
|
-
root: ["root", `color${capitalize$1(color2)}`, disabled && "disabled", error && "error", fullWidth && "fullWidth", focused && "focused", formControl && "formControl",
|
|
14258
|
-
input: ["input", disabled && "disabled", type === "search" && "inputTypeSearch", multiline && "inputMultiline",
|
|
14257
|
+
root: ["root", `color${capitalize$1(color2)}`, disabled && "disabled", error && "error", fullWidth && "fullWidth", focused && "focused", formControl && "formControl", size2 && size2 !== "medium" && `size${capitalize$1(size2)}`, multiline && "multiline", startAdornment && "adornedStart", endAdornment && "adornedEnd", hiddenLabel && "hiddenLabel", readOnly && "readOnly"],
|
|
14258
|
+
input: ["input", disabled && "disabled", type === "search" && "inputTypeSearch", multiline && "inputMultiline", size2 === "small" && "inputSizeSmall", hiddenLabel && "inputHiddenLabel", startAdornment && "inputAdornedStart", endAdornment && "inputAdornedEnd", readOnly && "readOnly"]
|
|
14259
14259
|
};
|
|
14260
14260
|
return composeClasses(slots, getInputBaseUtilityClass, classes);
|
|
14261
14261
|
};
|
|
@@ -14290,8 +14290,8 @@ const InputBaseRoot = styled("div", {
|
|
|
14290
14290
|
}, {
|
|
14291
14291
|
props: ({
|
|
14292
14292
|
ownerState,
|
|
14293
|
-
size
|
|
14294
|
-
}) => ownerState.multiline &&
|
|
14293
|
+
size: size2
|
|
14294
|
+
}) => ownerState.multiline && size2 === "small",
|
|
14295
14295
|
style: {
|
|
14296
14296
|
paddingTop: 1
|
|
14297
14297
|
}
|
|
@@ -14473,7 +14473,7 @@ const InputBase = /* @__PURE__ */ React$1.forwardRef(function InputBase2(inProps
|
|
|
14473
14473
|
readOnly,
|
|
14474
14474
|
renderSuffix,
|
|
14475
14475
|
rows,
|
|
14476
|
-
size,
|
|
14476
|
+
size: size2,
|
|
14477
14477
|
slotProps = {},
|
|
14478
14478
|
slots = {},
|
|
14479
14479
|
startAdornment,
|
|
@@ -15129,6 +15129,10 @@ ClickAwayListener.propTypes = {
|
|
|
15129
15129
|
{
|
|
15130
15130
|
ClickAwayListener["propTypes"] = exactProp(ClickAwayListener.propTypes);
|
|
15131
15131
|
}
|
|
15132
|
+
function getScrollbarSize$1(win = window) {
|
|
15133
|
+
const documentWidth = win.document.documentElement.clientWidth;
|
|
15134
|
+
return win.innerWidth - documentWidth;
|
|
15135
|
+
}
|
|
15132
15136
|
const styles = {
|
|
15133
15137
|
entering: {
|
|
15134
15138
|
opacity: 1
|
|
@@ -15990,10 +15994,6 @@ List.propTypes = {
|
|
|
15990
15994
|
};
|
|
15991
15995
|
const listItemTextClasses = generateUtilityClasses("MuiListItemText", ["root", "multiline", "dense", "inset", "primary", "secondary"]);
|
|
15992
15996
|
const listItemIconClasses = generateUtilityClasses("MuiListItemIcon", ["root", "alignItemsFlexStart"]);
|
|
15993
|
-
function getScrollbarSize(win = window) {
|
|
15994
|
-
const documentWidth = win.document.documentElement.clientWidth;
|
|
15995
|
-
return win.innerWidth - documentWidth;
|
|
15996
|
-
}
|
|
15997
15997
|
function nextItem(list, item, disableListWrap) {
|
|
15998
15998
|
if (list === item) {
|
|
15999
15999
|
return list.firstChild;
|
|
@@ -16082,7 +16082,7 @@ const MenuList = /* @__PURE__ */ React$1.forwardRef(function MenuList2(props, re
|
|
|
16082
16082
|
}) => {
|
|
16083
16083
|
const noExplicitWidth = !listRef.current.style.width;
|
|
16084
16084
|
if (containerElement.clientHeight < listRef.current.clientHeight && noExplicitWidth) {
|
|
16085
|
-
const scrollbarSize = `${getScrollbarSize(ownerWindow(containerElement))}px`;
|
|
16085
|
+
const scrollbarSize = `${getScrollbarSize$1(ownerWindow(containerElement))}px`;
|
|
16086
16086
|
listRef.current.style[direction === "rtl" ? "paddingLeft" : "paddingRight"] = scrollbarSize;
|
|
16087
16087
|
listRef.current.style.width = `calc(100% + ${scrollbarSize})`;
|
|
16088
16088
|
}
|
|
@@ -17254,7 +17254,7 @@ const Table = /* @__PURE__ */ React$1.forwardRef(function Table2(inProps, ref) {
|
|
|
17254
17254
|
className,
|
|
17255
17255
|
component = defaultComponent$2,
|
|
17256
17256
|
padding: padding2 = "normal",
|
|
17257
|
-
size = "medium",
|
|
17257
|
+
size: size2 = "medium",
|
|
17258
17258
|
stickyHeader = false,
|
|
17259
17259
|
...other
|
|
17260
17260
|
} = props;
|
|
@@ -17262,15 +17262,15 @@ const Table = /* @__PURE__ */ React$1.forwardRef(function Table2(inProps, ref) {
|
|
|
17262
17262
|
...props,
|
|
17263
17263
|
component,
|
|
17264
17264
|
padding: padding2,
|
|
17265
|
-
size,
|
|
17265
|
+
size: size2,
|
|
17266
17266
|
stickyHeader
|
|
17267
17267
|
};
|
|
17268
17268
|
const classes = useUtilityClasses$4(ownerState);
|
|
17269
17269
|
const table = React$1.useMemo(() => ({
|
|
17270
17270
|
padding: padding2,
|
|
17271
|
-
size,
|
|
17271
|
+
size: size2,
|
|
17272
17272
|
stickyHeader
|
|
17273
|
-
}), [padding2,
|
|
17273
|
+
}), [padding2, size2, stickyHeader]);
|
|
17274
17274
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(TableContext.Provider, {
|
|
17275
17275
|
value: table,
|
|
17276
17276
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(TableRoot, {
|
|
@@ -17416,11 +17416,11 @@ const useUtilityClasses$2 = (ownerState) => {
|
|
|
17416
17416
|
variant,
|
|
17417
17417
|
align,
|
|
17418
17418
|
padding: padding2,
|
|
17419
|
-
size,
|
|
17419
|
+
size: size2,
|
|
17420
17420
|
stickyHeader
|
|
17421
17421
|
} = ownerState;
|
|
17422
17422
|
const slots = {
|
|
17423
|
-
root: ["root", variant, stickyHeader && "stickyHeader", align !== "inherit" && `align${capitalize$1(align)}`, padding2 !== "normal" && `padding${capitalize$1(padding2)}`, `size${capitalize$1(
|
|
17423
|
+
root: ["root", variant, stickyHeader && "stickyHeader", align !== "inherit" && `align${capitalize$1(align)}`, padding2 !== "normal" && `padding${capitalize$1(padding2)}`, `size${capitalize$1(size2)}`]
|
|
17424
17424
|
};
|
|
17425
17425
|
return composeClasses(slots, getTableCellUtilityClass, classes);
|
|
17426
17426
|
};
|
|
@@ -18783,13 +18783,13 @@ function toValue(str, measurement, popperOffsets2, referenceOffsets) {
|
|
|
18783
18783
|
var rect = getClientRect(element);
|
|
18784
18784
|
return rect[measurement] / 100 * value;
|
|
18785
18785
|
} else if (unit === "vh" || unit === "vw") {
|
|
18786
|
-
var
|
|
18786
|
+
var size2 = void 0;
|
|
18787
18787
|
if (unit === "vh") {
|
|
18788
|
-
|
|
18788
|
+
size2 = Math.max(document.documentElement.clientHeight, window.innerHeight || 0);
|
|
18789
18789
|
} else {
|
|
18790
|
-
|
|
18790
|
+
size2 = Math.max(document.documentElement.clientWidth, window.innerWidth || 0);
|
|
18791
18791
|
}
|
|
18792
|
-
return
|
|
18792
|
+
return size2 / 100 * value;
|
|
18793
18793
|
} else {
|
|
18794
18794
|
return value;
|
|
18795
18795
|
}
|
|
@@ -19577,6 +19577,668 @@ function ScopedGlobalStyles(props) {
|
|
|
19577
19577
|
}, [parentClassName, styles2]);
|
|
19578
19578
|
return component;
|
|
19579
19579
|
}
|
|
19580
|
+
var safeIsNaN = Number.isNaN || function ponyfill(value) {
|
|
19581
|
+
return typeof value === "number" && value !== value;
|
|
19582
|
+
};
|
|
19583
|
+
function isEqual$1(first, second) {
|
|
19584
|
+
if (first === second) {
|
|
19585
|
+
return true;
|
|
19586
|
+
}
|
|
19587
|
+
if (safeIsNaN(first) && safeIsNaN(second)) {
|
|
19588
|
+
return true;
|
|
19589
|
+
}
|
|
19590
|
+
return false;
|
|
19591
|
+
}
|
|
19592
|
+
function areInputsEqual(newInputs, lastInputs) {
|
|
19593
|
+
if (newInputs.length !== lastInputs.length) {
|
|
19594
|
+
return false;
|
|
19595
|
+
}
|
|
19596
|
+
for (var i2 = 0; i2 < newInputs.length; i2++) {
|
|
19597
|
+
if (!isEqual$1(newInputs[i2], lastInputs[i2])) {
|
|
19598
|
+
return false;
|
|
19599
|
+
}
|
|
19600
|
+
}
|
|
19601
|
+
return true;
|
|
19602
|
+
}
|
|
19603
|
+
function memoizeOne(resultFn, isEqual2) {
|
|
19604
|
+
if (isEqual2 === void 0) {
|
|
19605
|
+
isEqual2 = areInputsEqual;
|
|
19606
|
+
}
|
|
19607
|
+
var lastThis;
|
|
19608
|
+
var lastArgs = [];
|
|
19609
|
+
var lastResult;
|
|
19610
|
+
var calledOnce = false;
|
|
19611
|
+
function memoized() {
|
|
19612
|
+
var newArgs = [];
|
|
19613
|
+
for (var _i2 = 0; _i2 < arguments.length; _i2++) {
|
|
19614
|
+
newArgs[_i2] = arguments[_i2];
|
|
19615
|
+
}
|
|
19616
|
+
if (calledOnce && lastThis === this && isEqual2(newArgs, lastArgs)) {
|
|
19617
|
+
return lastResult;
|
|
19618
|
+
}
|
|
19619
|
+
lastResult = resultFn.apply(this, newArgs);
|
|
19620
|
+
calledOnce = true;
|
|
19621
|
+
lastThis = this;
|
|
19622
|
+
lastArgs = newArgs;
|
|
19623
|
+
return lastResult;
|
|
19624
|
+
}
|
|
19625
|
+
return memoized;
|
|
19626
|
+
}
|
|
19627
|
+
var hasNativePerformanceNow = typeof performance === "object" && typeof performance.now === "function";
|
|
19628
|
+
var now$1 = hasNativePerformanceNow ? function() {
|
|
19629
|
+
return performance.now();
|
|
19630
|
+
} : function() {
|
|
19631
|
+
return Date.now();
|
|
19632
|
+
};
|
|
19633
|
+
function cancelTimeout(timeoutID) {
|
|
19634
|
+
cancelAnimationFrame(timeoutID.id);
|
|
19635
|
+
}
|
|
19636
|
+
function requestTimeout(callback, delay) {
|
|
19637
|
+
var start2 = now$1();
|
|
19638
|
+
function tick() {
|
|
19639
|
+
if (now$1() - start2 >= delay) {
|
|
19640
|
+
callback.call(null);
|
|
19641
|
+
} else {
|
|
19642
|
+
timeoutID.id = requestAnimationFrame(tick);
|
|
19643
|
+
}
|
|
19644
|
+
}
|
|
19645
|
+
var timeoutID = {
|
|
19646
|
+
id: requestAnimationFrame(tick)
|
|
19647
|
+
};
|
|
19648
|
+
return timeoutID;
|
|
19649
|
+
}
|
|
19650
|
+
var size = -1;
|
|
19651
|
+
function getScrollbarSize(recalculate) {
|
|
19652
|
+
if (recalculate === void 0) {
|
|
19653
|
+
recalculate = false;
|
|
19654
|
+
}
|
|
19655
|
+
if (size === -1 || recalculate) {
|
|
19656
|
+
var div = document.createElement("div");
|
|
19657
|
+
var style2 = div.style;
|
|
19658
|
+
style2.width = "50px";
|
|
19659
|
+
style2.height = "50px";
|
|
19660
|
+
style2.overflow = "scroll";
|
|
19661
|
+
document.body.appendChild(div);
|
|
19662
|
+
size = div.offsetWidth - div.clientWidth;
|
|
19663
|
+
document.body.removeChild(div);
|
|
19664
|
+
}
|
|
19665
|
+
return size;
|
|
19666
|
+
}
|
|
19667
|
+
var cachedRTLResult = null;
|
|
19668
|
+
function getRTLOffsetType(recalculate) {
|
|
19669
|
+
if (recalculate === void 0) {
|
|
19670
|
+
recalculate = false;
|
|
19671
|
+
}
|
|
19672
|
+
if (cachedRTLResult === null || recalculate) {
|
|
19673
|
+
var outerDiv = document.createElement("div");
|
|
19674
|
+
var outerStyle = outerDiv.style;
|
|
19675
|
+
outerStyle.width = "50px";
|
|
19676
|
+
outerStyle.height = "50px";
|
|
19677
|
+
outerStyle.overflow = "scroll";
|
|
19678
|
+
outerStyle.direction = "rtl";
|
|
19679
|
+
var innerDiv = document.createElement("div");
|
|
19680
|
+
var innerStyle = innerDiv.style;
|
|
19681
|
+
innerStyle.width = "100px";
|
|
19682
|
+
innerStyle.height = "100px";
|
|
19683
|
+
outerDiv.appendChild(innerDiv);
|
|
19684
|
+
document.body.appendChild(outerDiv);
|
|
19685
|
+
if (outerDiv.scrollLeft > 0) {
|
|
19686
|
+
cachedRTLResult = "positive-descending";
|
|
19687
|
+
} else {
|
|
19688
|
+
outerDiv.scrollLeft = 1;
|
|
19689
|
+
if (outerDiv.scrollLeft === 0) {
|
|
19690
|
+
cachedRTLResult = "negative";
|
|
19691
|
+
} else {
|
|
19692
|
+
cachedRTLResult = "positive-ascending";
|
|
19693
|
+
}
|
|
19694
|
+
}
|
|
19695
|
+
document.body.removeChild(outerDiv);
|
|
19696
|
+
return cachedRTLResult;
|
|
19697
|
+
}
|
|
19698
|
+
return cachedRTLResult;
|
|
19699
|
+
}
|
|
19700
|
+
var IS_SCROLLING_DEBOUNCE_INTERVAL$1 = 150;
|
|
19701
|
+
var defaultItemKey$1 = function defaultItemKey3(index, data) {
|
|
19702
|
+
return index;
|
|
19703
|
+
};
|
|
19704
|
+
var devWarningsDirection = null;
|
|
19705
|
+
var devWarningsTagName$1 = null;
|
|
19706
|
+
{
|
|
19707
|
+
if (typeof window !== "undefined" && typeof window.WeakSet !== "undefined") {
|
|
19708
|
+
devWarningsDirection = /* @__PURE__ */ new WeakSet();
|
|
19709
|
+
devWarningsTagName$1 = /* @__PURE__ */ new WeakSet();
|
|
19710
|
+
}
|
|
19711
|
+
}
|
|
19712
|
+
function createListComponent(_ref) {
|
|
19713
|
+
var _class;
|
|
19714
|
+
var getItemOffset3 = _ref.getItemOffset, getEstimatedTotalSize4 = _ref.getEstimatedTotalSize, getItemSize3 = _ref.getItemSize, getOffsetForIndexAndAlignment5 = _ref.getOffsetForIndexAndAlignment, getStartIndexForOffset3 = _ref.getStartIndexForOffset, getStopIndexForStartIndex3 = _ref.getStopIndexForStartIndex, initInstanceProps5 = _ref.initInstanceProps, shouldResetStyleCacheOnItemSizeChange = _ref.shouldResetStyleCacheOnItemSizeChange, validateProps5 = _ref.validateProps;
|
|
19715
|
+
return _class = /* @__PURE__ */ function(_PureComponent) {
|
|
19716
|
+
_inheritsLoose(List3, _PureComponent);
|
|
19717
|
+
function List3(props) {
|
|
19718
|
+
var _this;
|
|
19719
|
+
_this = _PureComponent.call(this, props) || this;
|
|
19720
|
+
_this._instanceProps = initInstanceProps5(_this.props, _assertThisInitialized(_this));
|
|
19721
|
+
_this._outerRef = void 0;
|
|
19722
|
+
_this._resetIsScrollingTimeoutId = null;
|
|
19723
|
+
_this.state = {
|
|
19724
|
+
instance: _assertThisInitialized(_this),
|
|
19725
|
+
isScrolling: false,
|
|
19726
|
+
scrollDirection: "forward",
|
|
19727
|
+
scrollOffset: typeof _this.props.initialScrollOffset === "number" ? _this.props.initialScrollOffset : 0,
|
|
19728
|
+
scrollUpdateWasRequested: false
|
|
19729
|
+
};
|
|
19730
|
+
_this._callOnItemsRendered = void 0;
|
|
19731
|
+
_this._callOnItemsRendered = memoizeOne(function(overscanStartIndex, overscanStopIndex, visibleStartIndex, visibleStopIndex) {
|
|
19732
|
+
return _this.props.onItemsRendered({
|
|
19733
|
+
overscanStartIndex,
|
|
19734
|
+
overscanStopIndex,
|
|
19735
|
+
visibleStartIndex,
|
|
19736
|
+
visibleStopIndex
|
|
19737
|
+
});
|
|
19738
|
+
});
|
|
19739
|
+
_this._callOnScroll = void 0;
|
|
19740
|
+
_this._callOnScroll = memoizeOne(function(scrollDirection, scrollOffset, scrollUpdateWasRequested) {
|
|
19741
|
+
return _this.props.onScroll({
|
|
19742
|
+
scrollDirection,
|
|
19743
|
+
scrollOffset,
|
|
19744
|
+
scrollUpdateWasRequested
|
|
19745
|
+
});
|
|
19746
|
+
});
|
|
19747
|
+
_this._getItemStyle = void 0;
|
|
19748
|
+
_this._getItemStyle = function(index) {
|
|
19749
|
+
var _this$props = _this.props, direction = _this$props.direction, itemSize = _this$props.itemSize, layout = _this$props.layout;
|
|
19750
|
+
var itemStyleCache = _this._getItemStyleCache(shouldResetStyleCacheOnItemSizeChange && itemSize, shouldResetStyleCacheOnItemSizeChange && layout, shouldResetStyleCacheOnItemSizeChange && direction);
|
|
19751
|
+
var style2;
|
|
19752
|
+
if (itemStyleCache.hasOwnProperty(index)) {
|
|
19753
|
+
style2 = itemStyleCache[index];
|
|
19754
|
+
} else {
|
|
19755
|
+
var _offset = getItemOffset3(_this.props, index, _this._instanceProps);
|
|
19756
|
+
var size2 = getItemSize3(_this.props, index, _this._instanceProps);
|
|
19757
|
+
var isHorizontal = direction === "horizontal" || layout === "horizontal";
|
|
19758
|
+
var isRtl = direction === "rtl";
|
|
19759
|
+
var offsetHorizontal = isHorizontal ? _offset : 0;
|
|
19760
|
+
itemStyleCache[index] = style2 = {
|
|
19761
|
+
position: "absolute",
|
|
19762
|
+
left: isRtl ? void 0 : offsetHorizontal,
|
|
19763
|
+
right: isRtl ? offsetHorizontal : void 0,
|
|
19764
|
+
top: !isHorizontal ? _offset : 0,
|
|
19765
|
+
height: !isHorizontal ? size2 : "100%",
|
|
19766
|
+
width: isHorizontal ? size2 : "100%"
|
|
19767
|
+
};
|
|
19768
|
+
}
|
|
19769
|
+
return style2;
|
|
19770
|
+
};
|
|
19771
|
+
_this._getItemStyleCache = void 0;
|
|
19772
|
+
_this._getItemStyleCache = memoizeOne(function(_, __, ___) {
|
|
19773
|
+
return {};
|
|
19774
|
+
});
|
|
19775
|
+
_this._onScrollHorizontal = function(event) {
|
|
19776
|
+
var _event$currentTarget = event.currentTarget, clientWidth = _event$currentTarget.clientWidth, scrollLeft = _event$currentTarget.scrollLeft, scrollWidth = _event$currentTarget.scrollWidth;
|
|
19777
|
+
_this.setState(function(prevState) {
|
|
19778
|
+
if (prevState.scrollOffset === scrollLeft) {
|
|
19779
|
+
return null;
|
|
19780
|
+
}
|
|
19781
|
+
var direction = _this.props.direction;
|
|
19782
|
+
var scrollOffset = scrollLeft;
|
|
19783
|
+
if (direction === "rtl") {
|
|
19784
|
+
switch (getRTLOffsetType()) {
|
|
19785
|
+
case "negative":
|
|
19786
|
+
scrollOffset = -scrollLeft;
|
|
19787
|
+
break;
|
|
19788
|
+
case "positive-descending":
|
|
19789
|
+
scrollOffset = scrollWidth - clientWidth - scrollLeft;
|
|
19790
|
+
break;
|
|
19791
|
+
}
|
|
19792
|
+
}
|
|
19793
|
+
scrollOffset = Math.max(0, Math.min(scrollOffset, scrollWidth - clientWidth));
|
|
19794
|
+
return {
|
|
19795
|
+
isScrolling: true,
|
|
19796
|
+
scrollDirection: prevState.scrollOffset < scrollOffset ? "forward" : "backward",
|
|
19797
|
+
scrollOffset,
|
|
19798
|
+
scrollUpdateWasRequested: false
|
|
19799
|
+
};
|
|
19800
|
+
}, _this._resetIsScrollingDebounced);
|
|
19801
|
+
};
|
|
19802
|
+
_this._onScrollVertical = function(event) {
|
|
19803
|
+
var _event$currentTarget2 = event.currentTarget, clientHeight = _event$currentTarget2.clientHeight, scrollHeight = _event$currentTarget2.scrollHeight, scrollTop = _event$currentTarget2.scrollTop;
|
|
19804
|
+
_this.setState(function(prevState) {
|
|
19805
|
+
if (prevState.scrollOffset === scrollTop) {
|
|
19806
|
+
return null;
|
|
19807
|
+
}
|
|
19808
|
+
var scrollOffset = Math.max(0, Math.min(scrollTop, scrollHeight - clientHeight));
|
|
19809
|
+
return {
|
|
19810
|
+
isScrolling: true,
|
|
19811
|
+
scrollDirection: prevState.scrollOffset < scrollOffset ? "forward" : "backward",
|
|
19812
|
+
scrollOffset,
|
|
19813
|
+
scrollUpdateWasRequested: false
|
|
19814
|
+
};
|
|
19815
|
+
}, _this._resetIsScrollingDebounced);
|
|
19816
|
+
};
|
|
19817
|
+
_this._outerRefSetter = function(ref) {
|
|
19818
|
+
var outerRef = _this.props.outerRef;
|
|
19819
|
+
_this._outerRef = ref;
|
|
19820
|
+
if (typeof outerRef === "function") {
|
|
19821
|
+
outerRef(ref);
|
|
19822
|
+
} else if (outerRef != null && typeof outerRef === "object" && outerRef.hasOwnProperty("current")) {
|
|
19823
|
+
outerRef.current = ref;
|
|
19824
|
+
}
|
|
19825
|
+
};
|
|
19826
|
+
_this._resetIsScrollingDebounced = function() {
|
|
19827
|
+
if (_this._resetIsScrollingTimeoutId !== null) {
|
|
19828
|
+
cancelTimeout(_this._resetIsScrollingTimeoutId);
|
|
19829
|
+
}
|
|
19830
|
+
_this._resetIsScrollingTimeoutId = requestTimeout(_this._resetIsScrolling, IS_SCROLLING_DEBOUNCE_INTERVAL$1);
|
|
19831
|
+
};
|
|
19832
|
+
_this._resetIsScrolling = function() {
|
|
19833
|
+
_this._resetIsScrollingTimeoutId = null;
|
|
19834
|
+
_this.setState({
|
|
19835
|
+
isScrolling: false
|
|
19836
|
+
}, function() {
|
|
19837
|
+
_this._getItemStyleCache(-1, null);
|
|
19838
|
+
});
|
|
19839
|
+
};
|
|
19840
|
+
return _this;
|
|
19841
|
+
}
|
|
19842
|
+
List3.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, prevState) {
|
|
19843
|
+
validateSharedProps$1(nextProps, prevState);
|
|
19844
|
+
validateProps5(nextProps);
|
|
19845
|
+
return null;
|
|
19846
|
+
};
|
|
19847
|
+
var _proto = List3.prototype;
|
|
19848
|
+
_proto.scrollTo = function scrollTo(scrollOffset) {
|
|
19849
|
+
scrollOffset = Math.max(0, scrollOffset);
|
|
19850
|
+
this.setState(function(prevState) {
|
|
19851
|
+
if (prevState.scrollOffset === scrollOffset) {
|
|
19852
|
+
return null;
|
|
19853
|
+
}
|
|
19854
|
+
return {
|
|
19855
|
+
scrollDirection: prevState.scrollOffset < scrollOffset ? "forward" : "backward",
|
|
19856
|
+
scrollOffset,
|
|
19857
|
+
scrollUpdateWasRequested: true
|
|
19858
|
+
};
|
|
19859
|
+
}, this._resetIsScrollingDebounced);
|
|
19860
|
+
};
|
|
19861
|
+
_proto.scrollToItem = function scrollToItem(index, align) {
|
|
19862
|
+
if (align === void 0) {
|
|
19863
|
+
align = "auto";
|
|
19864
|
+
}
|
|
19865
|
+
var _this$props2 = this.props, itemCount = _this$props2.itemCount, layout = _this$props2.layout;
|
|
19866
|
+
var scrollOffset = this.state.scrollOffset;
|
|
19867
|
+
index = Math.max(0, Math.min(index, itemCount - 1));
|
|
19868
|
+
var scrollbarSize = 0;
|
|
19869
|
+
if (this._outerRef) {
|
|
19870
|
+
var outerRef = this._outerRef;
|
|
19871
|
+
if (layout === "vertical") {
|
|
19872
|
+
scrollbarSize = outerRef.scrollWidth > outerRef.clientWidth ? getScrollbarSize() : 0;
|
|
19873
|
+
} else {
|
|
19874
|
+
scrollbarSize = outerRef.scrollHeight > outerRef.clientHeight ? getScrollbarSize() : 0;
|
|
19875
|
+
}
|
|
19876
|
+
}
|
|
19877
|
+
this.scrollTo(getOffsetForIndexAndAlignment5(this.props, index, align, scrollOffset, this._instanceProps, scrollbarSize));
|
|
19878
|
+
};
|
|
19879
|
+
_proto.componentDidMount = function componentDidMount() {
|
|
19880
|
+
var _this$props3 = this.props, direction = _this$props3.direction, initialScrollOffset = _this$props3.initialScrollOffset, layout = _this$props3.layout;
|
|
19881
|
+
if (typeof initialScrollOffset === "number" && this._outerRef != null) {
|
|
19882
|
+
var outerRef = this._outerRef;
|
|
19883
|
+
if (direction === "horizontal" || layout === "horizontal") {
|
|
19884
|
+
outerRef.scrollLeft = initialScrollOffset;
|
|
19885
|
+
} else {
|
|
19886
|
+
outerRef.scrollTop = initialScrollOffset;
|
|
19887
|
+
}
|
|
19888
|
+
}
|
|
19889
|
+
this._callPropsCallbacks();
|
|
19890
|
+
};
|
|
19891
|
+
_proto.componentDidUpdate = function componentDidUpdate() {
|
|
19892
|
+
var _this$props4 = this.props, direction = _this$props4.direction, layout = _this$props4.layout;
|
|
19893
|
+
var _this$state = this.state, scrollOffset = _this$state.scrollOffset, scrollUpdateWasRequested = _this$state.scrollUpdateWasRequested;
|
|
19894
|
+
if (scrollUpdateWasRequested && this._outerRef != null) {
|
|
19895
|
+
var outerRef = this._outerRef;
|
|
19896
|
+
if (direction === "horizontal" || layout === "horizontal") {
|
|
19897
|
+
if (direction === "rtl") {
|
|
19898
|
+
switch (getRTLOffsetType()) {
|
|
19899
|
+
case "negative":
|
|
19900
|
+
outerRef.scrollLeft = -scrollOffset;
|
|
19901
|
+
break;
|
|
19902
|
+
case "positive-ascending":
|
|
19903
|
+
outerRef.scrollLeft = scrollOffset;
|
|
19904
|
+
break;
|
|
19905
|
+
default:
|
|
19906
|
+
var clientWidth = outerRef.clientWidth, scrollWidth = outerRef.scrollWidth;
|
|
19907
|
+
outerRef.scrollLeft = scrollWidth - clientWidth - scrollOffset;
|
|
19908
|
+
break;
|
|
19909
|
+
}
|
|
19910
|
+
} else {
|
|
19911
|
+
outerRef.scrollLeft = scrollOffset;
|
|
19912
|
+
}
|
|
19913
|
+
} else {
|
|
19914
|
+
outerRef.scrollTop = scrollOffset;
|
|
19915
|
+
}
|
|
19916
|
+
}
|
|
19917
|
+
this._callPropsCallbacks();
|
|
19918
|
+
};
|
|
19919
|
+
_proto.componentWillUnmount = function componentWillUnmount() {
|
|
19920
|
+
if (this._resetIsScrollingTimeoutId !== null) {
|
|
19921
|
+
cancelTimeout(this._resetIsScrollingTimeoutId);
|
|
19922
|
+
}
|
|
19923
|
+
};
|
|
19924
|
+
_proto.render = function render() {
|
|
19925
|
+
var _this$props5 = this.props, children = _this$props5.children, className = _this$props5.className, direction = _this$props5.direction, height2 = _this$props5.height, innerRef = _this$props5.innerRef, innerElementType = _this$props5.innerElementType, innerTagName = _this$props5.innerTagName, itemCount = _this$props5.itemCount, itemData = _this$props5.itemData, _this$props5$itemKey = _this$props5.itemKey, itemKey = _this$props5$itemKey === void 0 ? defaultItemKey$1 : _this$props5$itemKey, layout = _this$props5.layout, outerElementType = _this$props5.outerElementType, outerTagName = _this$props5.outerTagName, style2 = _this$props5.style, useIsScrolling = _this$props5.useIsScrolling, width2 = _this$props5.width;
|
|
19926
|
+
var isScrolling = this.state.isScrolling;
|
|
19927
|
+
var isHorizontal = direction === "horizontal" || layout === "horizontal";
|
|
19928
|
+
var onScroll = isHorizontal ? this._onScrollHorizontal : this._onScrollVertical;
|
|
19929
|
+
var _this$_getRangeToRend = this._getRangeToRender(), startIndex = _this$_getRangeToRend[0], stopIndex = _this$_getRangeToRend[1];
|
|
19930
|
+
var items = [];
|
|
19931
|
+
if (itemCount > 0) {
|
|
19932
|
+
for (var _index = startIndex; _index <= stopIndex; _index++) {
|
|
19933
|
+
items.push(createElement(children, {
|
|
19934
|
+
data: itemData,
|
|
19935
|
+
key: itemKey(_index, itemData),
|
|
19936
|
+
index: _index,
|
|
19937
|
+
isScrolling: useIsScrolling ? isScrolling : void 0,
|
|
19938
|
+
style: this._getItemStyle(_index)
|
|
19939
|
+
}));
|
|
19940
|
+
}
|
|
19941
|
+
}
|
|
19942
|
+
var estimatedTotalSize = getEstimatedTotalSize4(this.props, this._instanceProps);
|
|
19943
|
+
return createElement(outerElementType || outerTagName || "div", {
|
|
19944
|
+
className,
|
|
19945
|
+
onScroll,
|
|
19946
|
+
ref: this._outerRefSetter,
|
|
19947
|
+
style: _extends$1({
|
|
19948
|
+
position: "relative",
|
|
19949
|
+
height: height2,
|
|
19950
|
+
width: width2,
|
|
19951
|
+
overflow: "auto",
|
|
19952
|
+
WebkitOverflowScrolling: "touch",
|
|
19953
|
+
willChange: "transform",
|
|
19954
|
+
direction
|
|
19955
|
+
}, style2)
|
|
19956
|
+
}, createElement(innerElementType || innerTagName || "div", {
|
|
19957
|
+
children: items,
|
|
19958
|
+
ref: innerRef,
|
|
19959
|
+
style: {
|
|
19960
|
+
height: isHorizontal ? "100%" : estimatedTotalSize,
|
|
19961
|
+
pointerEvents: isScrolling ? "none" : void 0,
|
|
19962
|
+
width: isHorizontal ? estimatedTotalSize : "100%"
|
|
19963
|
+
}
|
|
19964
|
+
}));
|
|
19965
|
+
};
|
|
19966
|
+
_proto._callPropsCallbacks = function _callPropsCallbacks() {
|
|
19967
|
+
if (typeof this.props.onItemsRendered === "function") {
|
|
19968
|
+
var itemCount = this.props.itemCount;
|
|
19969
|
+
if (itemCount > 0) {
|
|
19970
|
+
var _this$_getRangeToRend2 = this._getRangeToRender(), _overscanStartIndex = _this$_getRangeToRend2[0], _overscanStopIndex = _this$_getRangeToRend2[1], _visibleStartIndex = _this$_getRangeToRend2[2], _visibleStopIndex = _this$_getRangeToRend2[3];
|
|
19971
|
+
this._callOnItemsRendered(_overscanStartIndex, _overscanStopIndex, _visibleStartIndex, _visibleStopIndex);
|
|
19972
|
+
}
|
|
19973
|
+
}
|
|
19974
|
+
if (typeof this.props.onScroll === "function") {
|
|
19975
|
+
var _this$state2 = this.state, _scrollDirection = _this$state2.scrollDirection, _scrollOffset = _this$state2.scrollOffset, _scrollUpdateWasRequested = _this$state2.scrollUpdateWasRequested;
|
|
19976
|
+
this._callOnScroll(_scrollDirection, _scrollOffset, _scrollUpdateWasRequested);
|
|
19977
|
+
}
|
|
19978
|
+
};
|
|
19979
|
+
_proto._getRangeToRender = function _getRangeToRender() {
|
|
19980
|
+
var _this$props6 = this.props, itemCount = _this$props6.itemCount, overscanCount = _this$props6.overscanCount;
|
|
19981
|
+
var _this$state3 = this.state, isScrolling = _this$state3.isScrolling, scrollDirection = _this$state3.scrollDirection, scrollOffset = _this$state3.scrollOffset;
|
|
19982
|
+
if (itemCount === 0) {
|
|
19983
|
+
return [0, 0, 0, 0];
|
|
19984
|
+
}
|
|
19985
|
+
var startIndex = getStartIndexForOffset3(this.props, scrollOffset, this._instanceProps);
|
|
19986
|
+
var stopIndex = getStopIndexForStartIndex3(this.props, startIndex, scrollOffset, this._instanceProps);
|
|
19987
|
+
var overscanBackward = !isScrolling || scrollDirection === "backward" ? Math.max(1, overscanCount) : 1;
|
|
19988
|
+
var overscanForward = !isScrolling || scrollDirection === "forward" ? Math.max(1, overscanCount) : 1;
|
|
19989
|
+
return [Math.max(0, startIndex - overscanBackward), Math.max(0, Math.min(itemCount - 1, stopIndex + overscanForward)), startIndex, stopIndex];
|
|
19990
|
+
};
|
|
19991
|
+
return List3;
|
|
19992
|
+
}(PureComponent), _class.defaultProps = {
|
|
19993
|
+
direction: "ltr",
|
|
19994
|
+
itemData: void 0,
|
|
19995
|
+
layout: "vertical",
|
|
19996
|
+
overscanCount: 2,
|
|
19997
|
+
useIsScrolling: false
|
|
19998
|
+
}, _class;
|
|
19999
|
+
}
|
|
20000
|
+
var validateSharedProps$1 = function validateSharedProps3(_ref2, _ref3) {
|
|
20001
|
+
var children = _ref2.children, direction = _ref2.direction, height2 = _ref2.height, layout = _ref2.layout, innerTagName = _ref2.innerTagName, outerTagName = _ref2.outerTagName, width2 = _ref2.width;
|
|
20002
|
+
var instance = _ref3.instance;
|
|
20003
|
+
{
|
|
20004
|
+
if (innerTagName != null || outerTagName != null) {
|
|
20005
|
+
if (devWarningsTagName$1 && !devWarningsTagName$1.has(instance)) {
|
|
20006
|
+
devWarningsTagName$1.add(instance);
|
|
20007
|
+
console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead.");
|
|
20008
|
+
}
|
|
20009
|
+
}
|
|
20010
|
+
var isHorizontal = direction === "horizontal" || layout === "horizontal";
|
|
20011
|
+
switch (direction) {
|
|
20012
|
+
case "horizontal":
|
|
20013
|
+
case "vertical":
|
|
20014
|
+
if (devWarningsDirection && !devWarningsDirection.has(instance)) {
|
|
20015
|
+
devWarningsDirection.add(instance);
|
|
20016
|
+
console.warn('The direction prop should be either "ltr" (default) or "rtl". Please use the layout prop to specify "vertical" (default) or "horizontal" orientation.');
|
|
20017
|
+
}
|
|
20018
|
+
break;
|
|
20019
|
+
case "ltr":
|
|
20020
|
+
case "rtl":
|
|
20021
|
+
break;
|
|
20022
|
+
default:
|
|
20023
|
+
throw Error('An invalid "direction" prop has been specified. Value should be either "ltr" or "rtl". ' + ('"' + direction + '" was specified.'));
|
|
20024
|
+
}
|
|
20025
|
+
switch (layout) {
|
|
20026
|
+
case "horizontal":
|
|
20027
|
+
case "vertical":
|
|
20028
|
+
break;
|
|
20029
|
+
default:
|
|
20030
|
+
throw Error('An invalid "layout" prop has been specified. Value should be either "horizontal" or "vertical". ' + ('"' + layout + '" was specified.'));
|
|
20031
|
+
}
|
|
20032
|
+
if (children == null) {
|
|
20033
|
+
throw Error('An invalid "children" prop has been specified. Value should be a React component. ' + ('"' + (children === null ? "null" : typeof children) + '" was specified.'));
|
|
20034
|
+
}
|
|
20035
|
+
if (isHorizontal && typeof width2 !== "number") {
|
|
20036
|
+
throw Error('An invalid "width" prop has been specified. Horizontal lists must specify a number for width. ' + ('"' + (width2 === null ? "null" : typeof width2) + '" was specified.'));
|
|
20037
|
+
} else if (!isHorizontal && typeof height2 !== "number") {
|
|
20038
|
+
throw Error('An invalid "height" prop has been specified. Vertical lists must specify a number for height. ' + ('"' + (height2 === null ? "null" : typeof height2) + '" was specified.'));
|
|
20039
|
+
}
|
|
20040
|
+
}
|
|
20041
|
+
};
|
|
20042
|
+
var DEFAULT_ESTIMATED_ITEM_SIZE$1 = 50;
|
|
20043
|
+
var getItemMetadata$1 = function getItemMetadata3(props, index, instanceProps) {
|
|
20044
|
+
var _ref = props, itemSize = _ref.itemSize;
|
|
20045
|
+
var itemMetadataMap = instanceProps.itemMetadataMap, lastMeasuredIndex = instanceProps.lastMeasuredIndex;
|
|
20046
|
+
if (index > lastMeasuredIndex) {
|
|
20047
|
+
var offset2 = 0;
|
|
20048
|
+
if (lastMeasuredIndex >= 0) {
|
|
20049
|
+
var itemMetadata = itemMetadataMap[lastMeasuredIndex];
|
|
20050
|
+
offset2 = itemMetadata.offset + itemMetadata.size;
|
|
20051
|
+
}
|
|
20052
|
+
for (var i2 = lastMeasuredIndex + 1; i2 <= index; i2++) {
|
|
20053
|
+
var size2 = itemSize(i2);
|
|
20054
|
+
itemMetadataMap[i2] = {
|
|
20055
|
+
offset: offset2,
|
|
20056
|
+
size: size2
|
|
20057
|
+
};
|
|
20058
|
+
offset2 += size2;
|
|
20059
|
+
}
|
|
20060
|
+
instanceProps.lastMeasuredIndex = index;
|
|
20061
|
+
}
|
|
20062
|
+
return itemMetadataMap[index];
|
|
20063
|
+
};
|
|
20064
|
+
var findNearestItem$1 = function findNearestItem3(props, instanceProps, offset2) {
|
|
20065
|
+
var itemMetadataMap = instanceProps.itemMetadataMap, lastMeasuredIndex = instanceProps.lastMeasuredIndex;
|
|
20066
|
+
var lastMeasuredItemOffset = lastMeasuredIndex > 0 ? itemMetadataMap[lastMeasuredIndex].offset : 0;
|
|
20067
|
+
if (lastMeasuredItemOffset >= offset2) {
|
|
20068
|
+
return findNearestItemBinarySearch$1(props, instanceProps, lastMeasuredIndex, 0, offset2);
|
|
20069
|
+
} else {
|
|
20070
|
+
return findNearestItemExponentialSearch$1(props, instanceProps, Math.max(0, lastMeasuredIndex), offset2);
|
|
20071
|
+
}
|
|
20072
|
+
};
|
|
20073
|
+
var findNearestItemBinarySearch$1 = function findNearestItemBinarySearch3(props, instanceProps, high, low, offset2) {
|
|
20074
|
+
while (low <= high) {
|
|
20075
|
+
var middle = low + Math.floor((high - low) / 2);
|
|
20076
|
+
var currentOffset = getItemMetadata$1(props, middle, instanceProps).offset;
|
|
20077
|
+
if (currentOffset === offset2) {
|
|
20078
|
+
return middle;
|
|
20079
|
+
} else if (currentOffset < offset2) {
|
|
20080
|
+
low = middle + 1;
|
|
20081
|
+
} else if (currentOffset > offset2) {
|
|
20082
|
+
high = middle - 1;
|
|
20083
|
+
}
|
|
20084
|
+
}
|
|
20085
|
+
if (low > 0) {
|
|
20086
|
+
return low - 1;
|
|
20087
|
+
} else {
|
|
20088
|
+
return 0;
|
|
20089
|
+
}
|
|
20090
|
+
};
|
|
20091
|
+
var findNearestItemExponentialSearch$1 = function findNearestItemExponentialSearch3(props, instanceProps, index, offset2) {
|
|
20092
|
+
var itemCount = props.itemCount;
|
|
20093
|
+
var interval = 1;
|
|
20094
|
+
while (index < itemCount && getItemMetadata$1(props, index, instanceProps).offset < offset2) {
|
|
20095
|
+
index += interval;
|
|
20096
|
+
interval *= 2;
|
|
20097
|
+
}
|
|
20098
|
+
return findNearestItemBinarySearch$1(props, instanceProps, Math.min(index, itemCount - 1), Math.floor(index / 2), offset2);
|
|
20099
|
+
};
|
|
20100
|
+
var getEstimatedTotalSize = function getEstimatedTotalSize2(_ref2, _ref3) {
|
|
20101
|
+
var itemCount = _ref2.itemCount;
|
|
20102
|
+
var itemMetadataMap = _ref3.itemMetadataMap, estimatedItemSize = _ref3.estimatedItemSize, lastMeasuredIndex = _ref3.lastMeasuredIndex;
|
|
20103
|
+
var totalSizeOfMeasuredItems = 0;
|
|
20104
|
+
if (lastMeasuredIndex >= itemCount) {
|
|
20105
|
+
lastMeasuredIndex = itemCount - 1;
|
|
20106
|
+
}
|
|
20107
|
+
if (lastMeasuredIndex >= 0) {
|
|
20108
|
+
var itemMetadata = itemMetadataMap[lastMeasuredIndex];
|
|
20109
|
+
totalSizeOfMeasuredItems = itemMetadata.offset + itemMetadata.size;
|
|
20110
|
+
}
|
|
20111
|
+
var numUnmeasuredItems = itemCount - lastMeasuredIndex - 1;
|
|
20112
|
+
var totalSizeOfUnmeasuredItems = numUnmeasuredItems * estimatedItemSize;
|
|
20113
|
+
return totalSizeOfMeasuredItems + totalSizeOfUnmeasuredItems;
|
|
20114
|
+
};
|
|
20115
|
+
var VariableSizeList$1 = /* @__PURE__ */ createListComponent({
|
|
20116
|
+
getItemOffset: function getItemOffset(props, index, instanceProps) {
|
|
20117
|
+
return getItemMetadata$1(props, index, instanceProps).offset;
|
|
20118
|
+
},
|
|
20119
|
+
getItemSize: function getItemSize(props, index, instanceProps) {
|
|
20120
|
+
return instanceProps.itemMetadataMap[index].size;
|
|
20121
|
+
},
|
|
20122
|
+
getEstimatedTotalSize,
|
|
20123
|
+
getOffsetForIndexAndAlignment: function getOffsetForIndexAndAlignment3(props, index, align, scrollOffset, instanceProps, scrollbarSize) {
|
|
20124
|
+
var direction = props.direction, height2 = props.height, layout = props.layout, width2 = props.width;
|
|
20125
|
+
var isHorizontal = direction === "horizontal" || layout === "horizontal";
|
|
20126
|
+
var size2 = isHorizontal ? width2 : height2;
|
|
20127
|
+
var itemMetadata = getItemMetadata$1(props, index, instanceProps);
|
|
20128
|
+
var estimatedTotalSize = getEstimatedTotalSize(props, instanceProps);
|
|
20129
|
+
var maxOffset = Math.max(0, Math.min(estimatedTotalSize - size2, itemMetadata.offset));
|
|
20130
|
+
var minOffset = Math.max(0, itemMetadata.offset - size2 + itemMetadata.size + scrollbarSize);
|
|
20131
|
+
if (align === "smart") {
|
|
20132
|
+
if (scrollOffset >= minOffset - size2 && scrollOffset <= maxOffset + size2) {
|
|
20133
|
+
align = "auto";
|
|
20134
|
+
} else {
|
|
20135
|
+
align = "center";
|
|
20136
|
+
}
|
|
20137
|
+
}
|
|
20138
|
+
switch (align) {
|
|
20139
|
+
case "start":
|
|
20140
|
+
return maxOffset;
|
|
20141
|
+
case "end":
|
|
20142
|
+
return minOffset;
|
|
20143
|
+
case "center":
|
|
20144
|
+
return Math.round(minOffset + (maxOffset - minOffset) / 2);
|
|
20145
|
+
case "auto":
|
|
20146
|
+
default:
|
|
20147
|
+
if (scrollOffset >= minOffset && scrollOffset <= maxOffset) {
|
|
20148
|
+
return scrollOffset;
|
|
20149
|
+
} else if (scrollOffset < minOffset) {
|
|
20150
|
+
return minOffset;
|
|
20151
|
+
} else {
|
|
20152
|
+
return maxOffset;
|
|
20153
|
+
}
|
|
20154
|
+
}
|
|
20155
|
+
},
|
|
20156
|
+
getStartIndexForOffset: function getStartIndexForOffset(props, offset2, instanceProps) {
|
|
20157
|
+
return findNearestItem$1(props, instanceProps, offset2);
|
|
20158
|
+
},
|
|
20159
|
+
getStopIndexForStartIndex: function getStopIndexForStartIndex(props, startIndex, scrollOffset, instanceProps) {
|
|
20160
|
+
var direction = props.direction, height2 = props.height, itemCount = props.itemCount, layout = props.layout, width2 = props.width;
|
|
20161
|
+
var isHorizontal = direction === "horizontal" || layout === "horizontal";
|
|
20162
|
+
var size2 = isHorizontal ? width2 : height2;
|
|
20163
|
+
var itemMetadata = getItemMetadata$1(props, startIndex, instanceProps);
|
|
20164
|
+
var maxOffset = scrollOffset + size2;
|
|
20165
|
+
var offset2 = itemMetadata.offset + itemMetadata.size;
|
|
20166
|
+
var stopIndex = startIndex;
|
|
20167
|
+
while (stopIndex < itemCount - 1 && offset2 < maxOffset) {
|
|
20168
|
+
stopIndex++;
|
|
20169
|
+
offset2 += getItemMetadata$1(props, stopIndex, instanceProps).size;
|
|
20170
|
+
}
|
|
20171
|
+
return stopIndex;
|
|
20172
|
+
},
|
|
20173
|
+
initInstanceProps: function initInstanceProps2(props, instance) {
|
|
20174
|
+
var _ref4 = props, estimatedItemSize = _ref4.estimatedItemSize;
|
|
20175
|
+
var instanceProps = {
|
|
20176
|
+
itemMetadataMap: {},
|
|
20177
|
+
estimatedItemSize: estimatedItemSize || DEFAULT_ESTIMATED_ITEM_SIZE$1,
|
|
20178
|
+
lastMeasuredIndex: -1
|
|
20179
|
+
};
|
|
20180
|
+
instance.resetAfterIndex = function(index, shouldForceUpdate) {
|
|
20181
|
+
if (shouldForceUpdate === void 0) {
|
|
20182
|
+
shouldForceUpdate = true;
|
|
20183
|
+
}
|
|
20184
|
+
instanceProps.lastMeasuredIndex = Math.min(instanceProps.lastMeasuredIndex, index - 1);
|
|
20185
|
+
instance._getItemStyleCache(-1);
|
|
20186
|
+
if (shouldForceUpdate) {
|
|
20187
|
+
instance.forceUpdate();
|
|
20188
|
+
}
|
|
20189
|
+
};
|
|
20190
|
+
return instanceProps;
|
|
20191
|
+
},
|
|
20192
|
+
shouldResetStyleCacheOnItemSizeChange: false,
|
|
20193
|
+
validateProps: function validateProps2(_ref5) {
|
|
20194
|
+
var itemSize = _ref5.itemSize;
|
|
20195
|
+
{
|
|
20196
|
+
if (typeof itemSize !== "function") {
|
|
20197
|
+
throw Error('An invalid "itemSize" prop has been specified. Value should be a function. ' + ('"' + (itemSize === null ? "null" : typeof itemSize) + '" was specified.'));
|
|
20198
|
+
}
|
|
20199
|
+
}
|
|
20200
|
+
}
|
|
20201
|
+
});
|
|
20202
|
+
const VariableSizeList = VariableSizeList$1;
|
|
20203
|
+
const LIST_ROW_HEIGHT = 48;
|
|
20204
|
+
makeStyles()(() => ({
|
|
20205
|
+
searchInput: {
|
|
20206
|
+
lineHeight: "initial",
|
|
20207
|
+
height: "auto !important"
|
|
20208
|
+
}
|
|
20209
|
+
}));
|
|
20210
|
+
const OuterElementContext = React__default.createContext({});
|
|
20211
|
+
const OuterElementType = React__default.forwardRef((props, ref) => {
|
|
20212
|
+
const outerProps = React__default.useContext(OuterElementContext);
|
|
20213
|
+
return jsxRuntimeExports.jsx("div", { ref, ...props, ...outerProps });
|
|
20214
|
+
});
|
|
20215
|
+
function ListRow(props) {
|
|
20216
|
+
const { data, index, style: style2 } = props;
|
|
20217
|
+
const dataSet = data[index];
|
|
20218
|
+
const inlineStyle = {
|
|
20219
|
+
...style2,
|
|
20220
|
+
top: style2.top + 8
|
|
20221
|
+
};
|
|
20222
|
+
const [props0, option, getItemLabel] = dataSet;
|
|
20223
|
+
const { key, ...optionProps } = props0;
|
|
20224
|
+
return jsxRuntimeExports.jsx(Typography, { component: "li", ...optionProps, noWrap: true, style: inlineStyle, children: getItemLabel(option) }, key);
|
|
20225
|
+
}
|
|
20226
|
+
function useResetCache(itemCount) {
|
|
20227
|
+
const ref = useRef(null);
|
|
20228
|
+
useEffect(() => {
|
|
20229
|
+
if (ref.current != null) {
|
|
20230
|
+
ref.current.resetAfterIndex(0, true);
|
|
20231
|
+
}
|
|
20232
|
+
}, [itemCount]);
|
|
20233
|
+
return ref;
|
|
20234
|
+
}
|
|
20235
|
+
React__default.forwardRef((props, ref) => {
|
|
20236
|
+
const { children, ...other } = props;
|
|
20237
|
+
const items = children;
|
|
20238
|
+
const itemCount = items.length;
|
|
20239
|
+
const gridRef = useResetCache(itemCount);
|
|
20240
|
+
return jsxRuntimeExports.jsx("div", { ref, children: jsxRuntimeExports.jsx(OuterElementContext.Provider, { value: other, children: jsxRuntimeExports.jsx(VariableSizeList, { height: Math.min(8, itemCount) * LIST_ROW_HEIGHT, itemSize: () => LIST_ROW_HEIGHT, width: "100%", innerElementType: "ul", outerElementType: OuterElementType, overscanCount: 5, ref: gridRef, itemCount, itemData: items, children: ListRow }) }) });
|
|
20241
|
+
});
|
|
19580
20242
|
function readBlobAsArrayBuffer(blob) {
|
|
19581
20243
|
if (blob.arrayBuffer) {
|
|
19582
20244
|
return blob.arrayBuffer();
|
|
@@ -20103,10 +20765,10 @@ function decodeBuffer(uint8View, isUTF8) {
|
|
|
20103
20765
|
return utf8Decoder.decode(uint8View);
|
|
20104
20766
|
}
|
|
20105
20767
|
async function findEndOfCentralDirector(reader, totalLength) {
|
|
20106
|
-
const
|
|
20107
|
-
const readStart = totalLength -
|
|
20108
|
-
const data = await readAs(reader, readStart,
|
|
20109
|
-
for (let i2 =
|
|
20768
|
+
const size2 = Math.min(EOCDR_WITHOUT_COMMENT_SIZE + MAX_COMMENT_SIZE, totalLength);
|
|
20769
|
+
const readStart = totalLength - size2;
|
|
20770
|
+
const data = await readAs(reader, readStart, size2);
|
|
20771
|
+
for (let i2 = size2 - EOCDR_WITHOUT_COMMENT_SIZE; i2 >= 0; --i2) {
|
|
20110
20772
|
if (getUint32LE(data, i2) !== EOCDR_SIGNATURE) {
|
|
20111
20773
|
continue;
|
|
20112
20774
|
}
|
|
@@ -20395,6 +21057,13 @@ function assert$1(expression, msg = "") {
|
|
|
20395
21057
|
if (!expression)
|
|
20396
21058
|
throw new Error(msg);
|
|
20397
21059
|
}
|
|
21060
|
+
function isZipEntryInternal(entry) {
|
|
21061
|
+
if (!("compressionMethod" in entry) || !("_rawEntry" in entry)) {
|
|
21062
|
+
return false;
|
|
21063
|
+
}
|
|
21064
|
+
const rawEntry = entry._rawEntry;
|
|
21065
|
+
return typeof entry.compressionMethod === "number" && typeof rawEntry === "object" && rawEntry !== null && "relativeOffsetOfLocalHeader" in rawEntry && typeof rawEntry.relativeOffsetOfLocalHeader === "number";
|
|
21066
|
+
}
|
|
20398
21067
|
class BlobReader2 {
|
|
20399
21068
|
constructor(blob) {
|
|
20400
21069
|
this.blob = blob;
|
|
@@ -20427,18 +21096,19 @@ class HTTPRangeReader {
|
|
|
20427
21096
|
}
|
|
20428
21097
|
return this.length;
|
|
20429
21098
|
}
|
|
20430
|
-
async read(offset2,
|
|
20431
|
-
if (
|
|
21099
|
+
async read(offset2, size2) {
|
|
21100
|
+
if (size2 === 0) {
|
|
20432
21101
|
return new Uint8Array(0);
|
|
20433
21102
|
}
|
|
20434
|
-
const req = await fetch_range(this.url, offset2,
|
|
20435
|
-
assert$1(req.ok, `failed http request ${this.url}, status: ${req.status} offset: ${offset2} size: ${
|
|
21103
|
+
const req = await fetch_range(this.url, offset2, size2, __privateGet(this, _overrides));
|
|
21104
|
+
assert$1(req.ok, `failed http request ${this.url}, status: ${req.status} offset: ${offset2} size: ${size2}: ${req.statusText}`);
|
|
20436
21105
|
return new Uint8Array(await req.arrayBuffer());
|
|
20437
21106
|
}
|
|
20438
21107
|
}
|
|
20439
21108
|
_overrides = new WeakMap();
|
|
20440
21109
|
class ZipFileStore {
|
|
20441
21110
|
constructor(reader, opts = {}) {
|
|
21111
|
+
this.reader = reader;
|
|
20442
21112
|
this.info = unzip(reader).then((info) => {
|
|
20443
21113
|
if (opts.transformEntries) {
|
|
20444
21114
|
info.entries = opts.transformEntries(info.entries);
|
|
@@ -20446,12 +21116,46 @@ class ZipFileStore {
|
|
|
20446
21116
|
return info;
|
|
20447
21117
|
});
|
|
20448
21118
|
}
|
|
21119
|
+
/**
|
|
21120
|
+
* Compute the byte offset where entry data begins in the zip file.
|
|
21121
|
+
* This requires reading the local file header to get filename and extra field lengths.
|
|
21122
|
+
*/
|
|
21123
|
+
async getEntryDataOffset(entry) {
|
|
21124
|
+
const localHeaderOffset = entry._rawEntry.relativeOffsetOfLocalHeader;
|
|
21125
|
+
const header = await this.reader.read(localHeaderOffset, 30);
|
|
21126
|
+
const fileNameLength = header[26] + header[27] * 256;
|
|
21127
|
+
const extraFieldLength = header[28] + header[29] * 256;
|
|
21128
|
+
return localHeaderOffset + 30 + fileNameLength + extraFieldLength;
|
|
21129
|
+
}
|
|
20449
21130
|
async get(key) {
|
|
20450
21131
|
let entry = (await this.info).entries[strip_prefix(key)];
|
|
20451
21132
|
if (!entry)
|
|
20452
21133
|
return;
|
|
20453
21134
|
return new Uint8Array(await entry.arrayBuffer());
|
|
20454
21135
|
}
|
|
21136
|
+
async getRange(key, range2) {
|
|
21137
|
+
const entry = (await this.info).entries[strip_prefix(key)];
|
|
21138
|
+
if (!entry)
|
|
21139
|
+
return void 0;
|
|
21140
|
+
if (!isZipEntryInternal(entry)) {
|
|
21141
|
+
throw new Error("ZipFileStore.getRange requires internal unzipit properties that are not available. This may indicate an incompatible version of unzipit.");
|
|
21142
|
+
}
|
|
21143
|
+
if (entry.compressionMethod !== 0) {
|
|
21144
|
+
const bytes = await this.get(key);
|
|
21145
|
+
if (!bytes)
|
|
21146
|
+
return void 0;
|
|
21147
|
+
if ("suffixLength" in range2) {
|
|
21148
|
+
return bytes.slice(-range2.suffixLength);
|
|
21149
|
+
}
|
|
21150
|
+
return bytes.slice(range2.offset, range2.offset + range2.length);
|
|
21151
|
+
}
|
|
21152
|
+
const dataOffset = await this.getEntryDataOffset(entry);
|
|
21153
|
+
if ("suffixLength" in range2) {
|
|
21154
|
+
const start2 = dataOffset + entry.size - range2.suffixLength;
|
|
21155
|
+
return this.reader.read(start2, range2.suffixLength);
|
|
21156
|
+
}
|
|
21157
|
+
return this.reader.read(dataOffset + range2.offset, range2.length);
|
|
21158
|
+
}
|
|
20455
21159
|
async has(key) {
|
|
20456
21160
|
return strip_prefix(key) in (await this.info).entries;
|
|
20457
21161
|
}
|
|
@@ -20722,6 +21426,9 @@ function get_ctr(data_type) {
|
|
|
20722
21426
|
let [, kind, chars] = match2;
|
|
20723
21427
|
return (kind === "U" ? UnicodeStringArray : ByteStringArray).bind(null, Number(chars));
|
|
20724
21428
|
}
|
|
21429
|
+
if (data_type === "string") {
|
|
21430
|
+
return globalThis.Array;
|
|
21431
|
+
}
|
|
20725
21432
|
let ctr = {
|
|
20726
21433
|
int8: Int8Array,
|
|
20727
21434
|
int16: Int16Array,
|
|
@@ -20843,7 +21550,7 @@ function is_dtype(dtype, query) {
|
|
|
20843
21550
|
let is_boolean = dtype === "bool";
|
|
20844
21551
|
if (query === "boolean")
|
|
20845
21552
|
return is_boolean;
|
|
20846
|
-
let is_string = dtype.startsWith("v2:U") || dtype.startsWith("v2:S");
|
|
21553
|
+
let is_string = dtype.startsWith("v2:U") || dtype.startsWith("v2:S") || dtype === "string";
|
|
20847
21554
|
if (query === "string")
|
|
20848
21555
|
return is_string;
|
|
20849
21556
|
let is_bigint = dtype === "int64" || dtype === "uint64";
|
|
@@ -21118,11 +21825,11 @@ function empty_like(chunk, order2) {
|
|
|
21118
21825
|
function convert_array_order(src, target) {
|
|
21119
21826
|
let out = empty_like(src, target);
|
|
21120
21827
|
let n_dims = src.shape.length;
|
|
21121
|
-
let
|
|
21828
|
+
let size2 = src.data.length;
|
|
21122
21829
|
let index = Array(n_dims).fill(0);
|
|
21123
21830
|
let src_data = proxy(src.data);
|
|
21124
21831
|
let out_data = proxy(out.data);
|
|
21125
|
-
for (let src_idx = 0; src_idx <
|
|
21832
|
+
for (let src_idx = 0; src_idx < size2; src_idx++) {
|
|
21126
21833
|
let out_idx = 0;
|
|
21127
21834
|
for (let dim = 0; dim < n_dims; dim++) {
|
|
21128
21835
|
out_idx += index[dim] * out.stride[dim];
|
|
@@ -21309,7 +22016,7 @@ async function load_codecs(chunk_meta) {
|
|
|
21309
22016
|
return { array_to_array, array_to_bytes, bytes_to_bytes };
|
|
21310
22017
|
}
|
|
21311
22018
|
function is_typed_array_like_meta(meta) {
|
|
21312
|
-
return meta.data_type !== "v2:object";
|
|
22019
|
+
return meta.data_type !== "v2:object" && meta.data_type !== "string";
|
|
21313
22020
|
}
|
|
21314
22021
|
class NodeNotFoundError extends Error {
|
|
21315
22022
|
constructor(context, options = {}) {
|
|
@@ -21394,7 +22101,7 @@ function create_sharded_chunk_getter(location, shard_shape, encode_shard_key, sh
|
|
|
21394
22101
|
codecs: sharding_config.index_codecs
|
|
21395
22102
|
});
|
|
21396
22103
|
let cache = {};
|
|
21397
|
-
return async (chunk_coord) => {
|
|
22104
|
+
return async (chunk_coord, options) => {
|
|
21398
22105
|
let shard_coord = chunk_coord.map((d, i2) => Math.floor(d / index_shape[i2]));
|
|
21399
22106
|
let shard_path = location.resolve(encode_shard_key(shard_coord)).path;
|
|
21400
22107
|
let index;
|
|
@@ -21405,7 +22112,7 @@ function create_sharded_chunk_getter(location, shard_shape, encode_shard_key, sh
|
|
|
21405
22112
|
let index_size = 16 * index_shape.reduce((a2, b) => a2 * b, 1);
|
|
21406
22113
|
let bytes = await get_range(shard_path, {
|
|
21407
22114
|
suffixLength: index_size + checksum_size
|
|
21408
|
-
});
|
|
22115
|
+
}, options);
|
|
21409
22116
|
index = cache[shard_path] = bytes ? await index_codec.decode(bytes) : null;
|
|
21410
22117
|
}
|
|
21411
22118
|
if (index === null) {
|
|
@@ -21421,7 +22128,7 @@ function create_sharded_chunk_getter(location, shard_shape, encode_shard_key, sh
|
|
|
21421
22128
|
return get_range(shard_path, {
|
|
21422
22129
|
offset: Number(offset2),
|
|
21423
22130
|
length: Number(length2)
|
|
21424
|
-
});
|
|
22131
|
+
}, options);
|
|
21425
22132
|
};
|
|
21426
22133
|
}
|
|
21427
22134
|
var _a;
|
|
@@ -21524,8 +22231,8 @@ let Array$1 = (_a2 = class extends (_a = Location, _a) {
|
|
|
21524
22231
|
let context = this[CONTEXT_MARKER];
|
|
21525
22232
|
let maybe_bytes = await context.get_chunk_bytes(chunk_coords, options);
|
|
21526
22233
|
if (!maybe_bytes) {
|
|
21527
|
-
let
|
|
21528
|
-
let data = new context.TypedArray(
|
|
22234
|
+
let size2 = context.chunk_shape.reduce((a2, b) => a2 * b, 1);
|
|
22235
|
+
let data = new context.TypedArray(size2);
|
|
21529
22236
|
data.fill(context.fill_value);
|
|
21530
22237
|
return {
|
|
21531
22238
|
data,
|
|
@@ -25260,9 +25967,9 @@ function mapCacheHas(key) {
|
|
|
25260
25967
|
return getMapData(this, key).has(key);
|
|
25261
25968
|
}
|
|
25262
25969
|
function mapCacheSet(key, value) {
|
|
25263
|
-
var data = getMapData(this, key),
|
|
25970
|
+
var data = getMapData(this, key), size2 = data.size;
|
|
25264
25971
|
data.set(key, value);
|
|
25265
|
-
this.size += data.size ==
|
|
25972
|
+
this.size += data.size == size2 ? 0 : 1;
|
|
25266
25973
|
return this;
|
|
25267
25974
|
}
|
|
25268
25975
|
function MapCache(entries) {
|
|
@@ -29052,8 +29759,8 @@ class ZodSet extends ZodType {
|
|
|
29052
29759
|
maxSize: { value: maxSize, message: errorUtil.toString(message) }
|
|
29053
29760
|
});
|
|
29054
29761
|
}
|
|
29055
|
-
size(
|
|
29056
|
-
return this.min(
|
|
29762
|
+
size(size2, message) {
|
|
29763
|
+
return this.min(size2, message).max(size2, message);
|
|
29057
29764
|
}
|
|
29058
29765
|
nonempty(message) {
|
|
29059
29766
|
return this.min(1, message);
|
|
@@ -33120,6 +33827,7 @@ const ViewType$1 = {
|
|
|
33120
33827
|
OBS_SET_COMPOSITION_BAR_PLOT: "obsSetCompositionBarPlot",
|
|
33121
33828
|
FEATURE_SET_ENRICHMENT_BAR_PLOT: "featureSetEnrichmentBarPlot",
|
|
33122
33829
|
BIOMARKER_SELECT: "biomarkerSelect",
|
|
33830
|
+
BIOMARKER_SELECT_ALT: "biomarkerSelectAlt",
|
|
33123
33831
|
COMPARATIVE_HEADING: "comparativeHeading",
|
|
33124
33832
|
LINK_CONTROLLER: "linkController",
|
|
33125
33833
|
NEUROGLANCER: "neuroglancer",
|
|
@@ -34322,6 +35030,17 @@ const AUTO_INDEPENDENT_COORDINATION_TYPES = [
|
|
|
34322
35030
|
CoordinationType$1.OBS_SET_FILTER
|
|
34323
35031
|
// TODO: create coordination types for internal state of the biomarker selection view?
|
|
34324
35032
|
],
|
|
35033
|
+
[ViewType$1.BIOMARKER_SELECT_ALT]: [
|
|
35034
|
+
CoordinationType$1.DATASET,
|
|
35035
|
+
CoordinationType$1.OBS_TYPE,
|
|
35036
|
+
CoordinationType$1.SAMPLE_TYPE,
|
|
35037
|
+
CoordinationType$1.FEATURE_SELECTION,
|
|
35038
|
+
CoordinationType$1.SAMPLE_SET_SELECTION,
|
|
35039
|
+
CoordinationType$1.SAMPLE_SET_FILTER,
|
|
35040
|
+
CoordinationType$1.OBS_SET_SELECTION,
|
|
35041
|
+
CoordinationType$1.OBS_SET_FILTER
|
|
35042
|
+
// TODO: create coordination types for internal state of the biomarker selection view?
|
|
35043
|
+
],
|
|
34325
35044
|
[ViewType$1.COMPARATIVE_HEADING]: [
|
|
34326
35045
|
CoordinationType$1.DATASET,
|
|
34327
35046
|
CoordinationType$1.OBS_TYPE,
|
|
@@ -34367,7 +35086,7 @@ const AUTO_INDEPENDENT_COORDINATION_TYPES = [
|
|
|
34367
35086
|
CoordinationType$1.HIERARCHY_LEVELS
|
|
34368
35087
|
]
|
|
34369
35088
|
});
|
|
34370
|
-
const version = "3.9.
|
|
35089
|
+
const version = "3.9.4";
|
|
34371
35090
|
const META_VERSION = {
|
|
34372
35091
|
version
|
|
34373
35092
|
};
|
|
@@ -35038,7 +35757,7 @@ const sharedThemeOptions = {
|
|
|
35038
35757
|
// Use px instead of rem, so that sizing is consistent despite the root element font-size.
|
|
35039
35758
|
// Reference: https://github.com/mui/material-ui/blob/627c08fc/src/styles/createTypography.js
|
|
35040
35759
|
typography: {
|
|
35041
|
-
pxToRem: (
|
|
35760
|
+
pxToRem: (size2) => `${size2}px`,
|
|
35042
35761
|
display4: {
|
|
35043
35762
|
fontSize: "112px"
|
|
35044
35763
|
},
|
|
@@ -38048,9 +38767,9 @@ function require_mapCacheSet() {
|
|
|
38048
38767
|
hasRequired_mapCacheSet = 1;
|
|
38049
38768
|
var getMapData2 = require_getMapData();
|
|
38050
38769
|
function mapCacheSet2(key, value) {
|
|
38051
|
-
var data = getMapData2(this, key),
|
|
38770
|
+
var data = getMapData2(this, key), size2 = data.size;
|
|
38052
38771
|
data.set(key, value);
|
|
38053
|
-
this.size += data.size ==
|
|
38772
|
+
this.size += data.size == size2 ? 0 : 1;
|
|
38054
38773
|
return this;
|
|
38055
38774
|
}
|
|
38056
38775
|
_mapCacheSet = mapCacheSet2;
|
|
@@ -41610,14 +42329,14 @@ function requireResizableBox() {
|
|
|
41610
42329
|
propsHeight: _this.props.height
|
|
41611
42330
|
};
|
|
41612
42331
|
_this.onResize = function(e2, data) {
|
|
41613
|
-
var
|
|
42332
|
+
var size2 = data.size;
|
|
41614
42333
|
if (_this.props.onResize) {
|
|
41615
42334
|
e2.persist == null ? void 0 : e2.persist();
|
|
41616
|
-
_this.setState(
|
|
42335
|
+
_this.setState(size2, function() {
|
|
41617
42336
|
return _this.props.onResize && _this.props.onResize(e2, data);
|
|
41618
42337
|
});
|
|
41619
42338
|
} else {
|
|
41620
|
-
_this.setState(
|
|
42339
|
+
_this.setState(size2);
|
|
41621
42340
|
}
|
|
41622
42341
|
};
|
|
41623
42342
|
return _this;
|
|
@@ -42227,23 +42946,23 @@ function requireGridItem() {
|
|
|
42227
42946
|
* @return {Function} Handler function.
|
|
42228
42947
|
*/
|
|
42229
42948
|
function onResizeHandler(e2, _ref4, handlerName) {
|
|
42230
|
-
var node2 = _ref4.node,
|
|
42949
|
+
var node2 = _ref4.node, size2 = _ref4.size;
|
|
42231
42950
|
var handler = this.props[handlerName];
|
|
42232
42951
|
if (!handler) return;
|
|
42233
42952
|
var _this$props7 = this.props, cols = _this$props7.cols, x = _this$props7.x, y = _this$props7.y, i2 = _this$props7.i, maxH = _this$props7.maxH, minH = _this$props7.minH;
|
|
42234
42953
|
var _this$props8 = this.props, minW = _this$props8.minW, maxW = _this$props8.maxW;
|
|
42235
|
-
var _calcWH = (0, _calculateUtils.calcWH)(this.getPositionParams(),
|
|
42954
|
+
var _calcWH = (0, _calculateUtils.calcWH)(this.getPositionParams(), size2.width, size2.height, x, y), w = _calcWH.w, h = _calcWH.h;
|
|
42236
42955
|
minW = Math.max(minW, 1);
|
|
42237
42956
|
maxW = Math.min(maxW, cols - x);
|
|
42238
42957
|
w = (0, _calculateUtils.clamp)(w, minW, maxW);
|
|
42239
42958
|
h = (0, _calculateUtils.clamp)(h, minH, maxH);
|
|
42240
42959
|
this.setState({
|
|
42241
|
-
resizing: handlerName === "onResizeStop" ? null :
|
|
42960
|
+
resizing: handlerName === "onResizeStop" ? null : size2
|
|
42242
42961
|
});
|
|
42243
42962
|
handler.call(this, i2, w, h, {
|
|
42244
42963
|
e: e2,
|
|
42245
42964
|
node: node2,
|
|
42246
|
-
size
|
|
42965
|
+
size: size2
|
|
42247
42966
|
});
|
|
42248
42967
|
}
|
|
42249
42968
|
)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitessce/vit-s",
|
|
3
|
-
"version": "3.9.
|
|
3
|
+
"version": "3.9.4",
|
|
4
4
|
"author": "HIDIVE Lab at HMS",
|
|
5
5
|
"homepage": "http://vitessce.io",
|
|
6
6
|
"repository": {
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
],
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"@tanstack/react-query": "^5.80.2",
|
|
20
|
-
"@zarrita/storage": "0.1.
|
|
20
|
+
"@zarrita/storage": "0.1.4",
|
|
21
21
|
"clsx": "^1.1.1",
|
|
22
22
|
"d3-array": "^2.4.0",
|
|
23
23
|
"fast-deep-equal": "^3.1.3",
|
|
@@ -30,18 +30,18 @@
|
|
|
30
30
|
"react-aria": "^3.28.0",
|
|
31
31
|
"react-error-boundary": "^5.0.0",
|
|
32
32
|
"@placemarkio/flat-drop-files": "^1.0.2",
|
|
33
|
-
"zarrita": "0.
|
|
34
|
-
"@vitessce/styles": "3.9.
|
|
35
|
-
"@vitessce/
|
|
36
|
-
"@vitessce/error": "3.9.
|
|
37
|
-
"@vitessce/
|
|
38
|
-
"@vitessce/
|
|
39
|
-
"@vitessce/
|
|
40
|
-
"@vitessce/sets-utils": "3.9.
|
|
41
|
-
"@vitessce/
|
|
42
|
-
"@vitessce/
|
|
43
|
-
"@vitessce/
|
|
44
|
-
"@vitessce/
|
|
33
|
+
"zarrita": "0.6.1",
|
|
34
|
+
"@vitessce/styles": "3.9.4",
|
|
35
|
+
"@vitessce/constants-internal": "3.9.4",
|
|
36
|
+
"@vitessce/error": "3.9.4",
|
|
37
|
+
"@vitessce/plugins": "3.9.4",
|
|
38
|
+
"@vitessce/schemas": "3.9.4",
|
|
39
|
+
"@vitessce/utils": "3.9.4",
|
|
40
|
+
"@vitessce/sets-utils": "3.9.4",
|
|
41
|
+
"@vitessce/abstract": "3.9.4",
|
|
42
|
+
"@vitessce/zarr-utils": "3.9.4",
|
|
43
|
+
"@vitessce/globals": "3.9.4",
|
|
44
|
+
"@vitessce/config": "3.9.4"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@testing-library/jest-dom": "^6.6.3",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"react-dom": "18.3.1",
|
|
51
51
|
"vite": "^7.0.0",
|
|
52
52
|
"vitest": "^3.1.4",
|
|
53
|
-
"@vitessce/types": "3.9.
|
|
53
|
+
"@vitessce/types": "3.9.4"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
56
|
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
|