@tanstack/query-devtools 5.105.3 → 5.106.0
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/build/Devtools-C6d4y1zP.js +1270 -0
- package/build/Devtools-C6d4y1zP.js.map +1 -0
- package/build/{Devtools-DICxXjAp.js → Devtools-DN7p-sdp.js} +2866 -524
- package/build/{Devtools-2V_Pd-w1.cjs → Devtools-DwGQtvng.cjs} +2844 -502
- package/build/Devtools-he_mAvFk.cjs +1269 -0
- package/build/{DevtoolsComponent-CLOdqERu.js → DevtoolsComponent-CJQXyYNJ.js} +3 -2
- package/build/DevtoolsComponent-D4pZpbHT.cjs +2 -0
- package/build/{DevtoolsComponent-BAslf3AU.cjs → DevtoolsComponent-D8sLZqb7.cjs} +3 -2
- package/build/{DevtoolsComponent-D1MmpObN.js → DevtoolsComponent-DQLY23gz.js} +3 -2
- package/build/{DevtoolsComponent-D1MmpObN.js.map → DevtoolsComponent-DQLY23gz.js.map} +1 -1
- package/build/DevtoolsPanelComponent-BLDfq2ww.cjs +2 -0
- package/build/{DevtoolsPanelComponent-BZiLbaMl.js → DevtoolsPanelComponent-CXpcIZT1.js} +3 -2
- package/build/{DevtoolsPanelComponent-CRFy_L77.js → DevtoolsPanelComponent-CmWcNhgP.js} +3 -2
- package/build/{DevtoolsPanelComponent-CRFy_L77.js.map → DevtoolsPanelComponent-CmWcNhgP.js.map} +1 -1
- package/build/{DevtoolsPanelComponent-BIzP-MqF.cjs → DevtoolsPanelComponent-Dpyndu31.cjs} +3 -2
- package/build/dev.cjs +4 -3
- package/build/dev.js +4 -3
- package/build/index.cjs +2 -1
- package/build/index.d.cts +1 -0
- package/build/index.d.cts.map +1 -1
- package/build/index.d.ts +1 -0
- package/build/index.d.ts.map +1 -1
- package/build/index.js +2 -1
- package/build/index.js.map +1 -1
- package/build/{utils-CiEaQT28.cjs → utils-CzP8C7c0.cjs} +170 -51
- package/build/{utils-CsIEjnKb.js → utils-D7iZi04l.js} +147 -52
- package/build/utils-DC2pN79q.js +3 -0
- package/build/utils-DC2pN79q.js.map +1 -0
- package/build/utils-DJl-N7L2.cjs +2 -0
- package/package.json +4 -3
- package/src/Devtools.tsx +75 -165
- package/src/Explorer.tsx +349 -28
- package/src/VirtualList.tsx +105 -0
- package/src/explorerSearch.ts +159 -0
- package/src/nativeObjectType.ts +70 -0
- package/src/utils.tsx +74 -34
- package/build/Devtools-CD2ZvU1I.js +0 -1238
- package/build/Devtools-CD2ZvU1I.js.map +0 -1
- package/build/Devtools-DDcV5oIp.cjs +0 -1237
- package/build/DevtoolsComponent-zpIDe7Wu.cjs +0 -1
- package/build/DevtoolsPanelComponent-DJuL4CDS.cjs +0 -1
- package/build/utils-CpoIvKO8.cjs +0 -1
- package/build/utils-LNrmpo6y.js +0 -2
- package/build/utils-LNrmpo6y.js.map +0 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
/* @refresh skip */
|
|
2
|
+
import { $ as on, A as template, B as createComponent, C as delegateEvents, D as setAttribute, F as Index, G as createRenderEffect, H as createContext, I as Match, J as createUniqueId, K as createRoot, L as Show, M as $PROXY, N as $TRACK, O as setStyleProperty, P as For, Q as mergeProps, R as Switch, S as clearDelegatedEvents, T as memo$1, U as createEffect, V as createComputed, W as createMemo, Y as getListener, _ as stringify, at as useTransition, b as addEventListener, c as getQueryStatusLabel, d as mutationSortFns, et as onCleanup, g as serialize, h as getNativeObjectType, i as getMutationStatusColor, it as useContext, j as use, k as spread, l as getSidedProp, m as updateNestedDataByPath, n as deleteNestedDataByPath, nt as splitProps, o as getQueryStatusColor, p as sortFns, q as createSignal, r as displayValue, rt as untrack, s as getQueryStatusColorByLabel, t as convertRemToPixels, tt as onMount, u as isPlainObject, v as Dynamic, w as insert, x as className, y as Portal, z as batch } from "./utils-D7iZi04l.js";
|
|
2
3
|
const isNonNullable = (i) => i != null;
|
|
3
4
|
const filterNonNullable = (arr) => arr.filter(isNonNullable);
|
|
4
5
|
/**
|
|
@@ -55,7 +56,7 @@ function handleDiffArray(current, prev, handleAdded, handleRemoved) {
|
|
|
55
56
|
for (prevEl of prev) if (!current.includes(prevEl)) handleRemoved(prevEl);
|
|
56
57
|
for (currEl of current) if (!prev.includes(currEl)) handleAdded(currEl);
|
|
57
58
|
}
|
|
58
|
-
// ../../node_modules/.pnpm/@solid-primitives+storage@1.3.11_solid-js@1.9.
|
|
59
|
+
// ../../node_modules/.pnpm/@solid-primitives+storage@1.3.11_solid-js@1.9.18/node_modules/@solid-primitives/storage/dist/index.js
|
|
59
60
|
function createStorage(props) {
|
|
60
61
|
const [error, setError] = createSignal();
|
|
61
62
|
const handleError = props?.throw ? (err, fallback) => {
|
|
@@ -1078,7 +1079,7 @@ function clsx() {
|
|
|
1078
1079
|
for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
|
|
1079
1080
|
return n;
|
|
1080
1081
|
}
|
|
1081
|
-
// ../../node_modules/.pnpm/@solid-primitives+transition-group@1.1.2_solid-js@1.9.
|
|
1082
|
+
// ../../node_modules/.pnpm/@solid-primitives+transition-group@1.1.2_solid-js@1.9.18/node_modules/@solid-primitives/transition-group/dist/index.js
|
|
1082
1083
|
const noop$1 = () => {};
|
|
1083
1084
|
/**
|
|
1084
1085
|
* Create an element list transition interface for changes to the list of elements.
|
|
@@ -1173,7 +1174,7 @@ function createListTransition(source, options) {
|
|
|
1173
1174
|
});
|
|
1174
1175
|
}, options.appear ? [] : initSource.slice());
|
|
1175
1176
|
}
|
|
1176
|
-
// ../../node_modules/.pnpm/@solid-primitives+refs@1.1.3_solid-js@1.9.
|
|
1177
|
+
// ../../node_modules/.pnpm/@solid-primitives+refs@1.1.3_solid-js@1.9.18/node_modules/@solid-primitives/refs/dist/index.js
|
|
1177
1178
|
/**
|
|
1178
1179
|
* Utility for chaining multiple `ref` assignments with `props.ref` forwarding.
|
|
1179
1180
|
* @param refs list of ref setters. Can be a `props.ref` prop for ref forwarding or a setter to a local variable (`el => ref = el`).
|
|
@@ -1235,7 +1236,7 @@ function resolveElements(fn, predicate = defaultElementPredicate, serverPredicat
|
|
|
1235
1236
|
};
|
|
1236
1237
|
return memo;
|
|
1237
1238
|
}
|
|
1238
|
-
// ../../node_modules/.pnpm/solid-transition-group@0.2.3_solid-js@1.9.
|
|
1239
|
+
// ../../node_modules/.pnpm/solid-transition-group@0.2.3_solid-js@1.9.18/node_modules/solid-transition-group/dist/index.js
|
|
1239
1240
|
function createClassnames(props) {
|
|
1240
1241
|
return createMemo(() => {
|
|
1241
1242
|
const name = props.name || "s";
|
|
@@ -1347,7 +1348,71 @@ var TransitionGroup = (props) => {
|
|
|
1347
1348
|
}
|
|
1348
1349
|
});
|
|
1349
1350
|
};
|
|
1350
|
-
// ../../node_modules/.pnpm/@solid-primitives+
|
|
1351
|
+
// ../../node_modules/.pnpm/@solid-primitives+event-listener@2.4.6_solid-js@1.9.18/node_modules/@solid-primitives/event-listener/dist/eventListener.js
|
|
1352
|
+
function makeEventListener(target, type, handler, options) {
|
|
1353
|
+
target.addEventListener(type, handler, options);
|
|
1354
|
+
return tryOnCleanup(target.removeEventListener.bind(target, type, handler, options));
|
|
1355
|
+
}
|
|
1356
|
+
function createEventListener(targets, type, handler, options) {
|
|
1357
|
+
const attachListeners = () => {
|
|
1358
|
+
asArray(access$1(targets)).forEach((el) => {
|
|
1359
|
+
if (el) asArray(access$1(type)).forEach((type) => makeEventListener(el, type, handler, options));
|
|
1360
|
+
});
|
|
1361
|
+
};
|
|
1362
|
+
if (typeof targets === "function") createEffect(attachListeners);
|
|
1363
|
+
else createRenderEffect(attachListeners);
|
|
1364
|
+
}
|
|
1365
|
+
// ../../node_modules/.pnpm/@solid-primitives+resize-observer@2.2.0_solid-js@1.9.18/node_modules/@solid-primitives/resize-observer/dist/index.js
|
|
1366
|
+
/**
|
|
1367
|
+
* Instantiate a new ResizeObserver that automatically get's disposed on cleanup.
|
|
1368
|
+
*
|
|
1369
|
+
* @param callback handler called once element size changes
|
|
1370
|
+
* @param options ResizeObserver options
|
|
1371
|
+
* @returns `observe` and `unobserve` functions
|
|
1372
|
+
*/
|
|
1373
|
+
function makeResizeObserver(callback, options) {
|
|
1374
|
+
const observer = new ResizeObserver(callback);
|
|
1375
|
+
onCleanup(observer.disconnect.bind(observer));
|
|
1376
|
+
return {
|
|
1377
|
+
observe: (ref) => observer.observe(ref, options),
|
|
1378
|
+
unobserve: observer.unobserve.bind(observer)
|
|
1379
|
+
};
|
|
1380
|
+
}
|
|
1381
|
+
/**
|
|
1382
|
+
* Create resize observer instance, listening for changes to size of the reactive {@link targets} array.
|
|
1383
|
+
*
|
|
1384
|
+
* @param targets Elements to be observed. Can be a reactive signal or store top-level array.
|
|
1385
|
+
* @param onResize - Function handler to trigger on element resize
|
|
1386
|
+
*
|
|
1387
|
+
* @example
|
|
1388
|
+
* ```tsx
|
|
1389
|
+
* let ref
|
|
1390
|
+
* createResizeObserver(() => ref, ({ width, height }, el) => {
|
|
1391
|
+
* if (el === ref) console.log(width, height)
|
|
1392
|
+
* });
|
|
1393
|
+
* <div ref={ref}/>
|
|
1394
|
+
* ```
|
|
1395
|
+
*/
|
|
1396
|
+
function createResizeObserver(targets, onResize, options) {
|
|
1397
|
+
const previousMap = /* @__PURE__ */ new WeakMap(), { observe, unobserve } = makeResizeObserver((entries) => {
|
|
1398
|
+
for (const entry of entries) {
|
|
1399
|
+
const { contentRect, target } = entry, width = Math.round(contentRect.width), height = Math.round(contentRect.height), previous = previousMap.get(target);
|
|
1400
|
+
if (!previous || previous.width !== width || previous.height !== height) {
|
|
1401
|
+
onResize(contentRect, target, entry);
|
|
1402
|
+
previousMap.set(target, {
|
|
1403
|
+
width,
|
|
1404
|
+
height
|
|
1405
|
+
});
|
|
1406
|
+
}
|
|
1407
|
+
}
|
|
1408
|
+
}, options);
|
|
1409
|
+
createEffect((prev) => {
|
|
1410
|
+
const refs = filterNonNullable(asArray(access$1(targets)));
|
|
1411
|
+
handleDiffArray(refs, prev, observe, unobserve);
|
|
1412
|
+
return refs;
|
|
1413
|
+
}, []);
|
|
1414
|
+
}
|
|
1415
|
+
// ../../node_modules/.pnpm/@solid-primitives+keyed@1.5.3_solid-js@1.9.18/node_modules/@solid-primitives/keyed/dist/index.js
|
|
1351
1416
|
const FALLBACK = Symbol("fallback");
|
|
1352
1417
|
function dispose(list) {
|
|
1353
1418
|
for (const o of list) o.dispose();
|
|
@@ -1446,71 +1511,7 @@ function Key(props) {
|
|
|
1446
1511
|
const { by } = props;
|
|
1447
1512
|
return createMemo(keyArray(() => props.each, typeof by === "function" ? by : (v) => v[by], props.children, "fallback" in props ? { fallback: () => props.fallback } : void 0));
|
|
1448
1513
|
}
|
|
1449
|
-
// ../../node_modules/.pnpm/@solid-primitives+
|
|
1450
|
-
function makeEventListener(target, type, handler, options) {
|
|
1451
|
-
target.addEventListener(type, handler, options);
|
|
1452
|
-
return tryOnCleanup(target.removeEventListener.bind(target, type, handler, options));
|
|
1453
|
-
}
|
|
1454
|
-
function createEventListener(targets, type, handler, options) {
|
|
1455
|
-
const attachListeners = () => {
|
|
1456
|
-
asArray(access$1(targets)).forEach((el) => {
|
|
1457
|
-
if (el) asArray(access$1(type)).forEach((type) => makeEventListener(el, type, handler, options));
|
|
1458
|
-
});
|
|
1459
|
-
};
|
|
1460
|
-
if (typeof targets === "function") createEffect(attachListeners);
|
|
1461
|
-
else createRenderEffect(attachListeners);
|
|
1462
|
-
}
|
|
1463
|
-
// ../../node_modules/.pnpm/@solid-primitives+resize-observer@2.2.0_solid-js@1.9.15/node_modules/@solid-primitives/resize-observer/dist/index.js
|
|
1464
|
-
/**
|
|
1465
|
-
* Instantiate a new ResizeObserver that automatically get's disposed on cleanup.
|
|
1466
|
-
*
|
|
1467
|
-
* @param callback handler called once element size changes
|
|
1468
|
-
* @param options ResizeObserver options
|
|
1469
|
-
* @returns `observe` and `unobserve` functions
|
|
1470
|
-
*/
|
|
1471
|
-
function makeResizeObserver(callback, options) {
|
|
1472
|
-
const observer = new ResizeObserver(callback);
|
|
1473
|
-
onCleanup(observer.disconnect.bind(observer));
|
|
1474
|
-
return {
|
|
1475
|
-
observe: (ref) => observer.observe(ref, options),
|
|
1476
|
-
unobserve: observer.unobserve.bind(observer)
|
|
1477
|
-
};
|
|
1478
|
-
}
|
|
1479
|
-
/**
|
|
1480
|
-
* Create resize observer instance, listening for changes to size of the reactive {@link targets} array.
|
|
1481
|
-
*
|
|
1482
|
-
* @param targets Elements to be observed. Can be a reactive signal or store top-level array.
|
|
1483
|
-
* @param onResize - Function handler to trigger on element resize
|
|
1484
|
-
*
|
|
1485
|
-
* @example
|
|
1486
|
-
* ```tsx
|
|
1487
|
-
* let ref
|
|
1488
|
-
* createResizeObserver(() => ref, ({ width, height }, el) => {
|
|
1489
|
-
* if (el === ref) console.log(width, height)
|
|
1490
|
-
* });
|
|
1491
|
-
* <div ref={ref}/>
|
|
1492
|
-
* ```
|
|
1493
|
-
*/
|
|
1494
|
-
function createResizeObserver(targets, onResize, options) {
|
|
1495
|
-
const previousMap = /* @__PURE__ */ new WeakMap(), { observe, unobserve } = makeResizeObserver((entries) => {
|
|
1496
|
-
for (const entry of entries) {
|
|
1497
|
-
const { contentRect, target } = entry, width = Math.round(contentRect.width), height = Math.round(contentRect.height), previous = previousMap.get(target);
|
|
1498
|
-
if (!previous || previous.width !== width || previous.height !== height) {
|
|
1499
|
-
onResize(contentRect, target, entry);
|
|
1500
|
-
previousMap.set(target, {
|
|
1501
|
-
width,
|
|
1502
|
-
height
|
|
1503
|
-
});
|
|
1504
|
-
}
|
|
1505
|
-
}
|
|
1506
|
-
}, options);
|
|
1507
|
-
createEffect((prev) => {
|
|
1508
|
-
const refs = filterNonNullable(asArray(access$1(targets)));
|
|
1509
|
-
handleDiffArray(refs, prev, observe, unobserve);
|
|
1510
|
-
return refs;
|
|
1511
|
-
}, []);
|
|
1512
|
-
}
|
|
1513
|
-
// ../../node_modules/.pnpm/@solid-primitives+props@3.2.3_solid-js@1.9.15/node_modules/@solid-primitives/props/dist/combineProps.js
|
|
1514
|
+
// ../../node_modules/.pnpm/@solid-primitives+props@3.2.3_solid-js@1.9.18/node_modules/@solid-primitives/props/dist/combineProps.js
|
|
1514
1515
|
const extractCSSregex = /((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g;
|
|
1515
1516
|
/**
|
|
1516
1517
|
* converts inline string styles to object form
|
|
@@ -1534,7 +1535,7 @@ function combineStyle(a, b) {
|
|
|
1534
1535
|
...b
|
|
1535
1536
|
};
|
|
1536
1537
|
}
|
|
1537
|
-
// ../../node_modules/.pnpm/@kobalte+utils@0.9.2_solid-js@1.9.
|
|
1538
|
+
// ../../node_modules/.pnpm/@kobalte+utils@0.9.2_solid-js@1.9.18/node_modules/@kobalte/utils/dist/index.js
|
|
1538
1539
|
function addItemToArray(array, item, index = -1) {
|
|
1539
1540
|
if (!(index in array)) return [...array, item];
|
|
1540
1541
|
return [
|
|
@@ -1898,7 +1899,7 @@ var visuallyHiddenStyles = {
|
|
|
1898
1899
|
width: "1px",
|
|
1899
1900
|
"white-space": "nowrap"
|
|
1900
1901
|
};
|
|
1901
|
-
// ../../node_modules/.pnpm/@kobalte+core@0.13.14_solid-js@1.9.
|
|
1902
|
+
// ../../node_modules/.pnpm/@kobalte+core@0.13.14_solid-js@1.9.18/node_modules/@kobalte/core/dist/chunk/3NGA46QE.js
|
|
1902
1903
|
function buildNodes(params) {
|
|
1903
1904
|
let index = params.startIndex ?? 0;
|
|
1904
1905
|
const level = params.startLevel ?? 0;
|
|
@@ -1992,7 +1993,7 @@ function createCollection(props, deps = []) {
|
|
|
1992
1993
|
return props.factory(nodes);
|
|
1993
1994
|
});
|
|
1994
1995
|
}
|
|
1995
|
-
// ../../node_modules/.pnpm/@kobalte+core@0.13.14_solid-js@1.9.
|
|
1996
|
+
// ../../node_modules/.pnpm/@kobalte+core@0.13.14_solid-js@1.9.18/node_modules/@kobalte/core/dist/chunk/7TPOQ36Z.js
|
|
1996
1997
|
var RTL_SCRIPTS = /* @__PURE__ */ new Set([
|
|
1997
1998
|
"Avst",
|
|
1998
1999
|
"Arab",
|
|
@@ -2090,7 +2091,7 @@ function createCollator(options) {
|
|
|
2090
2091
|
return collator;
|
|
2091
2092
|
});
|
|
2092
2093
|
}
|
|
2093
|
-
// ../../node_modules/.pnpm/@kobalte+core@0.13.14_solid-js@1.9.
|
|
2094
|
+
// ../../node_modules/.pnpm/@kobalte+core@0.13.14_solid-js@1.9.18/node_modules/@kobalte/core/dist/chunk/BLN63FDC.js
|
|
2094
2095
|
function createControllableSignal(props) {
|
|
2095
2096
|
const [_value, _setValue] = createSignal(props.defaultValue?.());
|
|
2096
2097
|
const isControlled = createMemo(() => props.value?.() !== void 0);
|
|
@@ -2117,7 +2118,7 @@ function createControllableArraySignal(props) {
|
|
|
2117
2118
|
const value = () => _value() ?? [];
|
|
2118
2119
|
return [value, setValue];
|
|
2119
2120
|
}
|
|
2120
|
-
// ../../node_modules/.pnpm/@kobalte+core@0.13.14_solid-js@1.9.
|
|
2121
|
+
// ../../node_modules/.pnpm/@kobalte+core@0.13.14_solid-js@1.9.18/node_modules/@kobalte/core/dist/chunk/3D6FM2PJ.js
|
|
2121
2122
|
var Selection = class _Selection extends Set {
|
|
2122
2123
|
anchorKey;
|
|
2123
2124
|
currentKey;
|
|
@@ -2830,7 +2831,7 @@ function createListState(props) {
|
|
|
2830
2831
|
selectionManager: () => selectionManager
|
|
2831
2832
|
};
|
|
2832
2833
|
}
|
|
2833
|
-
// ../../node_modules/.pnpm/@kobalte+core@0.13.14_solid-js@1.9.
|
|
2834
|
+
// ../../node_modules/.pnpm/@kobalte+core@0.13.14_solid-js@1.9.18/node_modules/@kobalte/core/dist/chunk/7CVNMTYF.js
|
|
2834
2835
|
var DomCollectionContext = createContext();
|
|
2835
2836
|
function useOptionalDomCollectionContext() {
|
|
2836
2837
|
return useContext(DomCollectionContext);
|
|
@@ -2954,7 +2955,7 @@ function createDomCollectionItem(props) {
|
|
|
2954
2955
|
onCleanup(unregister);
|
|
2955
2956
|
});
|
|
2956
2957
|
}
|
|
2957
|
-
// ../../node_modules/.pnpm/@kobalte+core@0.13.14_solid-js@1.9.
|
|
2958
|
+
// ../../node_modules/.pnpm/@kobalte+core@0.13.14_solid-js@1.9.18/node_modules/@kobalte/core/dist/chunk/6Y7B2NEO.js
|
|
2958
2959
|
function Polymorphic(props) {
|
|
2959
2960
|
const [local, others] = splitProps(props, ["as"]);
|
|
2960
2961
|
if (!local.as) throw new Error("[kobalte]: Polymorphic is missing the required `as` prop.");
|
|
@@ -2962,7 +2963,7 @@ function Polymorphic(props) {
|
|
|
2962
2963
|
return local.as;
|
|
2963
2964
|
} }));
|
|
2964
2965
|
}
|
|
2965
|
-
// ../../node_modules/.pnpm/@kobalte+core@0.13.14_solid-js@1.9.
|
|
2966
|
+
// ../../node_modules/.pnpm/@kobalte+core@0.13.14_solid-js@1.9.18/node_modules/@kobalte/core/dist/chunk/5ZKAE4VZ.js
|
|
2966
2967
|
var __defProp = Object.defineProperty;
|
|
2967
2968
|
var __export = (target, all) => {
|
|
2968
2969
|
for (var name in all) __defProp(target, name, {
|
|
@@ -2970,9 +2971,9 @@ var __export = (target, all) => {
|
|
|
2970
2971
|
enumerable: true
|
|
2971
2972
|
});
|
|
2972
2973
|
};
|
|
2973
|
-
// ../../node_modules/.pnpm/@corvu+utils@0.4.2_solid-js@1.9.
|
|
2974
|
+
// ../../node_modules/.pnpm/@corvu+utils@0.4.2_solid-js@1.9.18/node_modules/@corvu/utils/dist/chunk/ZV6G25TT.js
|
|
2974
2975
|
var access = (v) => typeof v === "function" ? v() : v;
|
|
2975
|
-
// ../../node_modules/.pnpm/solid-presence@0.2.0_solid-js@1.9.
|
|
2976
|
+
// ../../node_modules/.pnpm/solid-presence@0.2.0_solid-js@1.9.18/node_modules/solid-presence/dist/index.js
|
|
2976
2977
|
var createPresence = (props) => {
|
|
2977
2978
|
const refStyles = createMemo(() => {
|
|
2978
2979
|
const element = access(props.element);
|
|
@@ -3026,7 +3027,7 @@ var createPresence = (props) => {
|
|
|
3026
3027
|
};
|
|
3027
3028
|
};
|
|
3028
3029
|
var index_default$1 = createPresence;
|
|
3029
|
-
// ../../node_modules/.pnpm/@kobalte+core@0.13.14_solid-js@1.9.
|
|
3030
|
+
// ../../node_modules/.pnpm/@kobalte+core@0.13.14_solid-js@1.9.18/node_modules/@kobalte/core/dist/chunk/2YCOH52P.js
|
|
3030
3031
|
var DATA_TOP_LAYER_ATTR = "data-kb-top-layer";
|
|
3031
3032
|
var originalBodyPointerEvents;
|
|
3032
3033
|
var hasDisabledBodyPointerEvents = false;
|
|
@@ -3092,7 +3093,7 @@ var layerStack = {
|
|
|
3092
3093
|
disableBodyPointerEvents,
|
|
3093
3094
|
restoreBodyPointerEvents
|
|
3094
3095
|
};
|
|
3095
|
-
// ../../node_modules/.pnpm/@kobalte+core@0.13.14_solid-js@1.9.
|
|
3096
|
+
// ../../node_modules/.pnpm/@kobalte+core@0.13.14_solid-js@1.9.18/node_modules/@kobalte/core/dist/chunk/ET5T45DO.js
|
|
3096
3097
|
function createTagName(ref, fallback) {
|
|
3097
3098
|
const [tagName, setTagName] = createSignal(stringOrUndefined(fallback?.()));
|
|
3098
3099
|
createEffect(() => {
|
|
@@ -3171,14 +3172,290 @@ function ButtonRoot(props) {
|
|
|
3171
3172
|
}, others));
|
|
3172
3173
|
}
|
|
3173
3174
|
var Button = ButtonRoot;
|
|
3174
|
-
// ../../node_modules/.pnpm/@kobalte+core@0.13.14_solid-js@1.9.
|
|
3175
|
+
// ../../node_modules/.pnpm/@kobalte+core@0.13.14_solid-js@1.9.18/node_modules/@kobalte/core/dist/chunk/E4R2EMM4.js
|
|
3175
3176
|
function createRegisterId(setter) {
|
|
3176
3177
|
return (id) => {
|
|
3177
3178
|
setter(id);
|
|
3178
3179
|
return () => setter(void 0);
|
|
3179
3180
|
};
|
|
3180
3181
|
}
|
|
3181
|
-
// ../../node_modules/.pnpm
|
|
3182
|
+
// ../../node_modules/.pnpm/solid-js@1.9.18/node_modules/solid-js/store/dist/store.js
|
|
3183
|
+
const $RAW = Symbol("store-raw");
|
|
3184
|
+
const $NODE = Symbol("store-node");
|
|
3185
|
+
const $HAS = Symbol("store-has");
|
|
3186
|
+
const $SELF = Symbol("store-self");
|
|
3187
|
+
function wrap$1(value) {
|
|
3188
|
+
let p = value[$PROXY];
|
|
3189
|
+
if (!p) {
|
|
3190
|
+
Object.defineProperty(value, $PROXY, { value: p = new Proxy(value, proxyTraps$1) });
|
|
3191
|
+
if (!Array.isArray(value)) {
|
|
3192
|
+
const keys = Object.keys(value), desc = Object.getOwnPropertyDescriptors(value), proto = Object.getPrototypeOf(value);
|
|
3193
|
+
const isClass = proto !== null && value !== null && typeof value === "object" && !Array.isArray(value) && proto !== Object.prototype;
|
|
3194
|
+
if (isClass) {
|
|
3195
|
+
const descriptors = Object.getOwnPropertyDescriptors(proto);
|
|
3196
|
+
keys.push(...Object.keys(descriptors));
|
|
3197
|
+
Object.assign(desc, descriptors);
|
|
3198
|
+
}
|
|
3199
|
+
for (let i = 0, l = keys.length; i < l; i++) {
|
|
3200
|
+
const prop = keys[i];
|
|
3201
|
+
if (isClass && prop === "constructor") continue;
|
|
3202
|
+
if (desc[prop].get) Object.defineProperty(value, prop, {
|
|
3203
|
+
configurable: true,
|
|
3204
|
+
enumerable: desc[prop].enumerable,
|
|
3205
|
+
get: desc[prop].get.bind(p)
|
|
3206
|
+
});
|
|
3207
|
+
}
|
|
3208
|
+
}
|
|
3209
|
+
}
|
|
3210
|
+
return p;
|
|
3211
|
+
}
|
|
3212
|
+
function isWrappable(obj) {
|
|
3213
|
+
let proto;
|
|
3214
|
+
return obj != null && typeof obj === "object" && (obj[$PROXY] || !(proto = Object.getPrototypeOf(obj)) || proto === Object.prototype || Array.isArray(obj));
|
|
3215
|
+
}
|
|
3216
|
+
function unwrap(item, set = /* @__PURE__ */ new Set()) {
|
|
3217
|
+
let result, unwrapped, v, prop;
|
|
3218
|
+
if (result = item != null && item[$RAW]) return result;
|
|
3219
|
+
if (!isWrappable(item) || set.has(item)) return item;
|
|
3220
|
+
if (Array.isArray(item)) {
|
|
3221
|
+
if (Object.isFrozen(item)) item = item.slice(0);
|
|
3222
|
+
else set.add(item);
|
|
3223
|
+
for (let i = 0, l = item.length; i < l; i++) {
|
|
3224
|
+
v = item[i];
|
|
3225
|
+
if ((unwrapped = unwrap(v, set)) !== v) item[i] = unwrapped;
|
|
3226
|
+
}
|
|
3227
|
+
} else {
|
|
3228
|
+
if (Object.isFrozen(item)) item = Object.assign({}, item);
|
|
3229
|
+
else set.add(item);
|
|
3230
|
+
const keys = Object.keys(item), desc = Object.getOwnPropertyDescriptors(item);
|
|
3231
|
+
for (let i = 0, l = keys.length; i < l; i++) {
|
|
3232
|
+
prop = keys[i];
|
|
3233
|
+
if (desc[prop].get) continue;
|
|
3234
|
+
v = item[prop];
|
|
3235
|
+
if ((unwrapped = unwrap(v, set)) !== v) item[prop] = unwrapped;
|
|
3236
|
+
}
|
|
3237
|
+
}
|
|
3238
|
+
return item;
|
|
3239
|
+
}
|
|
3240
|
+
function getNodes(target, symbol) {
|
|
3241
|
+
let nodes = target[symbol];
|
|
3242
|
+
if (!nodes) Object.defineProperty(target, symbol, { value: nodes = Object.create(null) });
|
|
3243
|
+
return nodes;
|
|
3244
|
+
}
|
|
3245
|
+
function getNode(nodes, property, value) {
|
|
3246
|
+
if (nodes[property]) return nodes[property];
|
|
3247
|
+
const [s, set] = createSignal(value, {
|
|
3248
|
+
equals: false,
|
|
3249
|
+
internal: true
|
|
3250
|
+
});
|
|
3251
|
+
s.$ = set;
|
|
3252
|
+
return nodes[property] = s;
|
|
3253
|
+
}
|
|
3254
|
+
function proxyDescriptor$1(target, property) {
|
|
3255
|
+
const desc = Reflect.getOwnPropertyDescriptor(target, property);
|
|
3256
|
+
if (!desc || desc.get || !desc.configurable || property === $PROXY || property === $NODE) return desc;
|
|
3257
|
+
delete desc.value;
|
|
3258
|
+
delete desc.writable;
|
|
3259
|
+
desc.get = () => target[$PROXY][property];
|
|
3260
|
+
return desc;
|
|
3261
|
+
}
|
|
3262
|
+
function trackSelf(target) {
|
|
3263
|
+
getListener() && getNode(getNodes(target, $NODE), $SELF)();
|
|
3264
|
+
}
|
|
3265
|
+
function ownKeys(target) {
|
|
3266
|
+
trackSelf(target);
|
|
3267
|
+
return Reflect.ownKeys(target);
|
|
3268
|
+
}
|
|
3269
|
+
const proxyTraps$1 = {
|
|
3270
|
+
get(target, property, receiver) {
|
|
3271
|
+
if (property === $RAW) return target;
|
|
3272
|
+
if (property === $PROXY) return receiver;
|
|
3273
|
+
if (property === $TRACK) {
|
|
3274
|
+
trackSelf(target);
|
|
3275
|
+
return receiver;
|
|
3276
|
+
}
|
|
3277
|
+
const nodes = getNodes(target, $NODE);
|
|
3278
|
+
const tracked = nodes[property];
|
|
3279
|
+
let value = tracked ? tracked() : target[property];
|
|
3280
|
+
if (property === $NODE || property === $HAS || property === "__proto__") return value;
|
|
3281
|
+
if (!tracked) {
|
|
3282
|
+
const desc = Object.getOwnPropertyDescriptor(target, property);
|
|
3283
|
+
if (getListener() && (typeof value !== "function" || Object.prototype.hasOwnProperty.call(target, property)) && !(desc && desc.get)) value = getNode(nodes, property, value)();
|
|
3284
|
+
}
|
|
3285
|
+
return isWrappable(value) ? wrap$1(value) : value;
|
|
3286
|
+
},
|
|
3287
|
+
has(target, property) {
|
|
3288
|
+
if (property === $RAW || property === $PROXY || property === $TRACK || property === $NODE || property === $HAS || property === "__proto__") return true;
|
|
3289
|
+
getListener() && getNode(getNodes(target, $HAS), property)();
|
|
3290
|
+
return property in target;
|
|
3291
|
+
},
|
|
3292
|
+
set() {
|
|
3293
|
+
return true;
|
|
3294
|
+
},
|
|
3295
|
+
deleteProperty() {
|
|
3296
|
+
return true;
|
|
3297
|
+
},
|
|
3298
|
+
ownKeys,
|
|
3299
|
+
getOwnPropertyDescriptor: proxyDescriptor$1
|
|
3300
|
+
};
|
|
3301
|
+
function setProperty(state, property, value, deleting = false) {
|
|
3302
|
+
if (property === "__proto__") return;
|
|
3303
|
+
if (!deleting && state[property] === value) return;
|
|
3304
|
+
const prev = state[property], len = state.length;
|
|
3305
|
+
if (value === void 0) {
|
|
3306
|
+
delete state[property];
|
|
3307
|
+
if (state[$HAS] && state[$HAS][property] && prev !== void 0) state[$HAS][property].$();
|
|
3308
|
+
} else {
|
|
3309
|
+
state[property] = value;
|
|
3310
|
+
if (state[$HAS] && state[$HAS][property] && prev === void 0) state[$HAS][property].$();
|
|
3311
|
+
}
|
|
3312
|
+
let nodes = getNodes(state, $NODE), node;
|
|
3313
|
+
if (node = getNode(nodes, property, prev)) node.$(() => value);
|
|
3314
|
+
if (Array.isArray(state) && state.length !== len) {
|
|
3315
|
+
for (let i = state.length; i < len; i++) (node = nodes[i]) && node.$();
|
|
3316
|
+
(node = getNode(nodes, "length", len)) && node.$(state.length);
|
|
3317
|
+
}
|
|
3318
|
+
(node = nodes[$SELF]) && node.$();
|
|
3319
|
+
}
|
|
3320
|
+
function mergeStoreNode(state, value) {
|
|
3321
|
+
const keys = Object.keys(value);
|
|
3322
|
+
for (let i = 0; i < keys.length; i += 1) {
|
|
3323
|
+
const key = keys[i];
|
|
3324
|
+
if (isUnsafeKey$1(key)) continue;
|
|
3325
|
+
setProperty(state, key, value[key]);
|
|
3326
|
+
}
|
|
3327
|
+
}
|
|
3328
|
+
function isUnsafeKey$1(property) {
|
|
3329
|
+
return property === "__proto__" || property === "constructor" || property === "prototype";
|
|
3330
|
+
}
|
|
3331
|
+
function updateArray(current, next) {
|
|
3332
|
+
if (typeof next === "function") next = next(current);
|
|
3333
|
+
next = unwrap(next);
|
|
3334
|
+
if (Array.isArray(next)) {
|
|
3335
|
+
if (current === next) return;
|
|
3336
|
+
let i = 0, len = next.length;
|
|
3337
|
+
for (; i < len; i++) {
|
|
3338
|
+
const value = next[i];
|
|
3339
|
+
if (current[i] !== value) setProperty(current, i, value);
|
|
3340
|
+
}
|
|
3341
|
+
setProperty(current, "length", len);
|
|
3342
|
+
} else mergeStoreNode(current, next);
|
|
3343
|
+
}
|
|
3344
|
+
function updatePath(current, path, traversed = []) {
|
|
3345
|
+
let part, prev = current;
|
|
3346
|
+
if (path.length > 1) {
|
|
3347
|
+
part = path.shift();
|
|
3348
|
+
const partType = typeof part, isArray = Array.isArray(current);
|
|
3349
|
+
if (partType === "string" && (part === "__proto__" || path.length > 1 && isUnsafeKey$1(part))) return;
|
|
3350
|
+
if (Array.isArray(part)) {
|
|
3351
|
+
for (let i = 0; i < part.length; i++) updatePath(current, [part[i]].concat(path), traversed);
|
|
3352
|
+
return;
|
|
3353
|
+
} else if (isArray && partType === "function") {
|
|
3354
|
+
for (let i = 0; i < current.length; i++) if (part(current[i], i)) updatePath(current, [i].concat(path), traversed);
|
|
3355
|
+
return;
|
|
3356
|
+
} else if (isArray && partType === "object") {
|
|
3357
|
+
const { from = 0, to = current.length - 1, by = 1 } = part;
|
|
3358
|
+
for (let i = from; i <= to; i += by) updatePath(current, [i].concat(path), traversed);
|
|
3359
|
+
return;
|
|
3360
|
+
} else if (path.length > 1) {
|
|
3361
|
+
updatePath(current[part], path, [part].concat(traversed));
|
|
3362
|
+
return;
|
|
3363
|
+
}
|
|
3364
|
+
prev = current[part];
|
|
3365
|
+
traversed = [part].concat(traversed);
|
|
3366
|
+
}
|
|
3367
|
+
let value = path[0];
|
|
3368
|
+
if (typeof value === "function") {
|
|
3369
|
+
value = value(prev, traversed);
|
|
3370
|
+
if (value === prev) return;
|
|
3371
|
+
}
|
|
3372
|
+
if (part === void 0 && value == void 0) return;
|
|
3373
|
+
value = unwrap(value);
|
|
3374
|
+
if (part === void 0 || isWrappable(prev) && isWrappable(value) && !Array.isArray(value)) mergeStoreNode(prev, value);
|
|
3375
|
+
else setProperty(current, part, value);
|
|
3376
|
+
}
|
|
3377
|
+
function createStore(...[store, options]) {
|
|
3378
|
+
const unwrappedStore = unwrap(store || {});
|
|
3379
|
+
const isArray = Array.isArray(unwrappedStore);
|
|
3380
|
+
const wrappedStore = wrap$1(unwrappedStore);
|
|
3381
|
+
function setStore(...args) {
|
|
3382
|
+
batch(() => {
|
|
3383
|
+
isArray && args.length === 1 ? updateArray(unwrappedStore, args[0]) : updatePath(unwrappedStore, args);
|
|
3384
|
+
});
|
|
3385
|
+
}
|
|
3386
|
+
return [wrappedStore, setStore];
|
|
3387
|
+
}
|
|
3388
|
+
const $ROOT = Symbol("store-root");
|
|
3389
|
+
function isUnsafeKey(property) {
|
|
3390
|
+
return property === "__proto__" || property === "constructor" || property === "prototype";
|
|
3391
|
+
}
|
|
3392
|
+
function applyState(target, parent, property, merge, key) {
|
|
3393
|
+
if (isUnsafeKey(property)) return;
|
|
3394
|
+
const previous = parent[property];
|
|
3395
|
+
if (target === previous) return;
|
|
3396
|
+
const isArray = Array.isArray(target);
|
|
3397
|
+
if (property !== $ROOT && (!isWrappable(target) || !isWrappable(previous) || isArray !== Array.isArray(previous) || key && target[key] !== previous[key])) {
|
|
3398
|
+
setProperty(parent, property, target);
|
|
3399
|
+
return;
|
|
3400
|
+
}
|
|
3401
|
+
if (isArray) {
|
|
3402
|
+
if (target.length && previous.length && (!merge || key && target[0] && target[0][key] != null)) {
|
|
3403
|
+
let i, j, start, end, newEnd, item, newIndicesNext, keyVal;
|
|
3404
|
+
for (start = 0, end = Math.min(previous.length, target.length); start < end && (previous[start] === target[start] || key && previous[start] && target[start] && previous[start][key] && previous[start][key] === target[start][key]); start++) applyState(target[start], previous, start, merge, key);
|
|
3405
|
+
const temp = new Array(target.length), newIndices = /* @__PURE__ */ new Map();
|
|
3406
|
+
for (end = previous.length - 1, newEnd = target.length - 1; end >= start && newEnd >= start && (previous[end] === target[newEnd] || key && previous[end] && target[newEnd] && previous[end][key] && previous[end][key] === target[newEnd][key]); end--, newEnd--) temp[newEnd] = previous[end];
|
|
3407
|
+
if (start > newEnd || start > end) {
|
|
3408
|
+
for (j = start; j <= newEnd; j++) setProperty(previous, j, target[j]);
|
|
3409
|
+
for (; j < target.length; j++) {
|
|
3410
|
+
setProperty(previous, j, temp[j]);
|
|
3411
|
+
applyState(target[j], previous, j, merge, key);
|
|
3412
|
+
}
|
|
3413
|
+
if (previous.length > target.length) setProperty(previous, "length", target.length);
|
|
3414
|
+
return;
|
|
3415
|
+
}
|
|
3416
|
+
newIndicesNext = new Array(newEnd + 1);
|
|
3417
|
+
for (j = newEnd; j >= start; j--) {
|
|
3418
|
+
item = target[j];
|
|
3419
|
+
keyVal = key && item ? item[key] : item;
|
|
3420
|
+
i = newIndices.get(keyVal);
|
|
3421
|
+
newIndicesNext[j] = i === void 0 ? -1 : i;
|
|
3422
|
+
newIndices.set(keyVal, j);
|
|
3423
|
+
}
|
|
3424
|
+
for (i = start; i <= end; i++) {
|
|
3425
|
+
item = previous[i];
|
|
3426
|
+
keyVal = key && item ? item[key] : item;
|
|
3427
|
+
j = newIndices.get(keyVal);
|
|
3428
|
+
if (j !== void 0 && j !== -1) {
|
|
3429
|
+
temp[j] = previous[i];
|
|
3430
|
+
j = newIndicesNext[j];
|
|
3431
|
+
newIndices.set(keyVal, j);
|
|
3432
|
+
}
|
|
3433
|
+
}
|
|
3434
|
+
for (j = start; j < target.length; j++) if (j in temp) {
|
|
3435
|
+
setProperty(previous, j, temp[j]);
|
|
3436
|
+
applyState(target[j], previous, j, merge, key);
|
|
3437
|
+
} else setProperty(previous, j, target[j]);
|
|
3438
|
+
} else for (let i = 0, len = target.length; i < len; i++) applyState(target[i], previous, i, merge, key);
|
|
3439
|
+
if (previous.length > target.length) setProperty(previous, "length", target.length);
|
|
3440
|
+
return;
|
|
3441
|
+
}
|
|
3442
|
+
const targetKeys = Object.keys(target);
|
|
3443
|
+
for (let i = 0, len = targetKeys.length; i < len; i++) {
|
|
3444
|
+
if (isUnsafeKey(targetKeys[i])) continue;
|
|
3445
|
+
applyState(target[targetKeys[i]], previous, targetKeys[i], merge, key);
|
|
3446
|
+
}
|
|
3447
|
+
const previousKeys = Object.keys(previous);
|
|
3448
|
+
for (let i = 0, len = previousKeys.length; i < len; i++) if (target[previousKeys[i]] === void 0) setProperty(previous, previousKeys[i], void 0);
|
|
3449
|
+
}
|
|
3450
|
+
function reconcile(value, options = {}) {
|
|
3451
|
+
const { merge, key = "id" } = options, v = unwrap(value);
|
|
3452
|
+
return (state) => {
|
|
3453
|
+
if (!isWrappable(state) || !isWrappable(v)) return v;
|
|
3454
|
+
const res = applyState(v, { [$ROOT]: state }, $ROOT, merge, key);
|
|
3455
|
+
return res === void 0 ? state : res;
|
|
3456
|
+
};
|
|
3457
|
+
}
|
|
3458
|
+
// ../../node_modules/.pnpm/@kobalte+core@0.13.14_solid-js@1.9.18/node_modules/@kobalte/core/dist/chunk/YGDQXQ2B.js
|
|
3182
3459
|
function createToggleState(props = {}) {
|
|
3183
3460
|
const [isSelected, _setIsSelected] = createControllableBooleanSignal({
|
|
3184
3461
|
value: () => access$1(props.isSelected),
|
|
@@ -4476,14 +4753,14 @@ const computePosition = (reference, floating, options) => {
|
|
|
4476
4753
|
platform: platformWithCache
|
|
4477
4754
|
});
|
|
4478
4755
|
};
|
|
4479
|
-
// ../../node_modules/.pnpm/@kobalte+core@0.13.14_solid-js@1.9.
|
|
4756
|
+
// ../../node_modules/.pnpm/@kobalte+core@0.13.14_solid-js@1.9.18/node_modules/@kobalte/core/dist/chunk/BK63AFY4.js
|
|
4480
4757
|
var PopperContext = createContext();
|
|
4481
4758
|
function usePopperContext() {
|
|
4482
4759
|
const context = useContext(PopperContext);
|
|
4483
4760
|
if (context === void 0) throw new Error("[kobalte]: `usePopperContext` must be used within a `Popper` component");
|
|
4484
4761
|
return context;
|
|
4485
4762
|
}
|
|
4486
|
-
var _tmpl$$
|
|
4763
|
+
var _tmpl$$4 = /* @__PURE__ */ template(`<svg display="block" viewBox="0 0 30 30" style="transform:scale(1.02)"><g><path fill="none" d="M23,27.8c1.1,1.2,3.4,2.2,5,2.2h2H0h2c1.7,0,3.9-1,5-2.2l6.6-7.2c0.7-0.8,2-0.8,2.7,0L23,27.8L23,27.8z"></path><path stroke="none" d="M23,27.8c1.1,1.2,3.4,2.2,5,2.2h2H0h2c1.7,0,3.9-1,5-2.2l6.6-7.2c0.7-0.8,2-0.8,2.7,0L23,27.8L23,27.8z">`);
|
|
4487
4764
|
var DEFAULT_SIZE = 30;
|
|
4488
4765
|
var HALF_DEFAULT_SIZE = DEFAULT_SIZE / 2;
|
|
4489
4766
|
var ROTATION_DEG = {
|
|
@@ -4531,7 +4808,7 @@ function PopperArrow(props) {
|
|
|
4531
4808
|
}, local.style);
|
|
4532
4809
|
}
|
|
4533
4810
|
}, others, { get children() {
|
|
4534
|
-
const _el$ = _tmpl$$
|
|
4811
|
+
const _el$ = _tmpl$$4(), _el$2 = _el$.firstChild;
|
|
4535
4812
|
createRenderEffect(() => setAttribute(_el$2, "transform", rotate()));
|
|
4536
4813
|
return _el$;
|
|
4537
4814
|
} }));
|
|
@@ -4749,7 +5026,7 @@ var Popper = Object.assign(PopperRoot, {
|
|
|
4749
5026
|
usePopperContext,
|
|
4750
5027
|
Positioner: PopperPositioner
|
|
4751
5028
|
});
|
|
4752
|
-
// ../../node_modules/.pnpm/@kobalte+core@0.13.14_solid-js@1.9.
|
|
5029
|
+
// ../../node_modules/.pnpm/@kobalte+core@0.13.14_solid-js@1.9.18/node_modules/@kobalte/core/dist/chunk/QEMPLYZX.js
|
|
4753
5030
|
function createEscapeKeyDown(props) {
|
|
4754
5031
|
const handleKeyDown = (event) => {
|
|
4755
5032
|
if (event.key === EventKey.Escape) props.onEscapeKeyDown?.(event);
|
|
@@ -4763,7 +5040,7 @@ function createEscapeKeyDown(props) {
|
|
|
4763
5040
|
});
|
|
4764
5041
|
});
|
|
4765
5042
|
}
|
|
4766
|
-
// ../../node_modules/.pnpm/@kobalte+core@0.13.14_solid-js@1.9.
|
|
5043
|
+
// ../../node_modules/.pnpm/@kobalte+core@0.13.14_solid-js@1.9.18/node_modules/@kobalte/core/dist/chunk/3MORIDD7.js
|
|
4767
5044
|
function getEventTarget(event) {
|
|
4768
5045
|
const target = (typeof event.composedPath === "function" ? event.composedPath() : void 0)?.[0] ?? event.target;
|
|
4769
5046
|
return target instanceof Element ? target : null;
|
|
@@ -4858,7 +5135,7 @@ function createInteractOutside(props, ref) {
|
|
|
4858
5135
|
});
|
|
4859
5136
|
});
|
|
4860
5137
|
}
|
|
4861
|
-
// ../../node_modules/.pnpm/@kobalte+core@0.13.14_solid-js@1.9.
|
|
5138
|
+
// ../../node_modules/.pnpm/@kobalte+core@0.13.14_solid-js@1.9.18/node_modules/@kobalte/core/dist/chunk/EGUPPEWQ.js
|
|
4862
5139
|
var DismissableLayerContext = createContext();
|
|
4863
5140
|
function useOptionalDismissableLayerContext() {
|
|
4864
5141
|
return useContext(DismissableLayerContext);
|
|
@@ -4962,7 +5239,7 @@ function DismissableLayer(props) {
|
|
|
4962
5239
|
}
|
|
4963
5240
|
});
|
|
4964
5241
|
}
|
|
4965
|
-
// ../../node_modules/.pnpm/@kobalte+core@0.13.14_solid-js@1.9.
|
|
5242
|
+
// ../../node_modules/.pnpm/@kobalte+core@0.13.14_solid-js@1.9.18/node_modules/@kobalte/core/dist/chunk/7LCANGHD.js
|
|
4966
5243
|
function createDisclosureState(props = {}) {
|
|
4967
5244
|
const [isOpen, setIsOpen] = createControllableBooleanSignal({
|
|
4968
5245
|
value: () => access$1(props.open),
|
|
@@ -4986,7 +5263,7 @@ function createDisclosureState(props = {}) {
|
|
|
4986
5263
|
toggle
|
|
4987
5264
|
};
|
|
4988
5265
|
}
|
|
4989
|
-
// ../../node_modules/.pnpm/@kobalte+core@0.13.14_solid-js@1.9.
|
|
5266
|
+
// ../../node_modules/.pnpm/@kobalte+core@0.13.14_solid-js@1.9.18/node_modules/@kobalte/core/dist/chunk/YKGT7A57.js
|
|
4990
5267
|
var FORM_CONTROL_PROP_NAMES = [
|
|
4991
5268
|
"id",
|
|
4992
5269
|
"name",
|
|
@@ -5054,7 +5331,7 @@ function FormControlDescription(props) {
|
|
|
5054
5331
|
createEffect(() => onCleanup(context.registerDescription(mergedProps.id)));
|
|
5055
5332
|
return createComponent(Polymorphic, mergeProps({ as: "div" }, () => context.dataset(), mergedProps));
|
|
5056
5333
|
}
|
|
5057
|
-
// ../../node_modules/.pnpm/@kobalte+core@0.13.14_solid-js@1.9.
|
|
5334
|
+
// ../../node_modules/.pnpm/@kobalte+core@0.13.14_solid-js@1.9.18/node_modules/@kobalte/core/dist/chunk/I2LBZHJH.js
|
|
5058
5335
|
var ListKeyboardDelegate = class {
|
|
5059
5336
|
collection;
|
|
5060
5337
|
ref;
|
|
@@ -5162,7 +5439,7 @@ function createSelectableList(props, ref, scrollRef) {
|
|
|
5162
5439
|
orientation: () => access$1(props.orientation)
|
|
5163
5440
|
}, ref, scrollRef);
|
|
5164
5441
|
}
|
|
5165
|
-
// ../../node_modules/.pnpm/@kobalte+core@0.13.14_solid-js@1.9.
|
|
5442
|
+
// ../../node_modules/.pnpm/@kobalte+core@0.13.14_solid-js@1.9.18/node_modules/@kobalte/core/dist/chunk/G3KI2B4X.js
|
|
5166
5443
|
var AUTOFOCUS_ON_MOUNT_EVENT = "focusScope.autoFocusOnMount";
|
|
5167
5444
|
var AUTOFOCUS_ON_UNMOUNT_EVENT = "focusScope.autoFocusOnUnmount";
|
|
5168
5445
|
var EVENT_OPTIONS = {
|
|
@@ -5315,9 +5592,9 @@ function createFocusScope(props, ref) {
|
|
|
5315
5592
|
});
|
|
5316
5593
|
});
|
|
5317
5594
|
}
|
|
5318
|
-
// ../../node_modules/.pnpm/@kobalte+core@0.13.14_solid-js@1.9.
|
|
5595
|
+
// ../../node_modules/.pnpm/@kobalte+core@0.13.14_solid-js@1.9.18/node_modules/@kobalte/core/dist/chunk/YA7DCYMB.js
|
|
5319
5596
|
var DATA_LIVE_ANNOUNCER_ATTR = "data-live-announcer";
|
|
5320
|
-
// ../../node_modules/.pnpm/@kobalte+core@0.13.14_solid-js@1.9.
|
|
5597
|
+
// ../../node_modules/.pnpm/@kobalte+core@0.13.14_solid-js@1.9.18/node_modules/@kobalte/core/dist/chunk/2FYCRCMB.js
|
|
5321
5598
|
function createHideOutside(props) {
|
|
5322
5599
|
createEffect(() => {
|
|
5323
5600
|
if (access$1(props.isDisabled)) return;
|
|
@@ -5405,7 +5682,7 @@ function ariaHideOutside(targets, root = document.body) {
|
|
|
5405
5682
|
} else observerStack.splice(observerStack.indexOf(observerWrapper), 1);
|
|
5406
5683
|
};
|
|
5407
5684
|
}
|
|
5408
|
-
// ../../node_modules/.pnpm/@kobalte+core@0.13.14_solid-js@1.9.
|
|
5685
|
+
// ../../node_modules/.pnpm/@kobalte+core@0.13.14_solid-js@1.9.18/node_modules/@kobalte/core/dist/chunk/7ZHN3PYD.js
|
|
5409
5686
|
function FormControlLabel(props) {
|
|
5410
5687
|
let ref;
|
|
5411
5688
|
const context = useFormControlContext();
|
|
@@ -5420,11 +5697,11 @@ function FormControlLabel(props) {
|
|
|
5420
5697
|
typeof _ref$ === "function" && _ref$(r$);
|
|
5421
5698
|
},
|
|
5422
5699
|
get ["for"]() {
|
|
5423
|
-
return memo(() => tagName() === "label")() ? context.fieldId() : void 0;
|
|
5700
|
+
return memo$1(() => tagName() === "label")() ? context.fieldId() : void 0;
|
|
5424
5701
|
}
|
|
5425
5702
|
}, () => context.dataset(), others));
|
|
5426
5703
|
}
|
|
5427
|
-
// ../../node_modules/.pnpm/@kobalte+core@0.13.14_solid-js@1.9.
|
|
5704
|
+
// ../../node_modules/.pnpm/@kobalte+core@0.13.14_solid-js@1.9.18/node_modules/@kobalte/core/dist/chunk/ANN3A2QM.js
|
|
5428
5705
|
function createFormResetListener(element, handler) {
|
|
5429
5706
|
createEffect(on(element, (element2) => {
|
|
5430
5707
|
if (element2 == null) return;
|
|
@@ -5442,7 +5719,7 @@ function getClosestForm(element) {
|
|
|
5442
5719
|
function isFormElement(element) {
|
|
5443
5720
|
return element.matches("textarea, input, select, button");
|
|
5444
5721
|
}
|
|
5445
|
-
// ../../node_modules/.pnpm/@kobalte+core@0.13.14_solid-js@1.9.
|
|
5722
|
+
// ../../node_modules/.pnpm/@kobalte+core@0.13.14_solid-js@1.9.18/node_modules/@kobalte/core/dist/chunk/ICNSTULC.js
|
|
5446
5723
|
function FormControlErrorMessage(props) {
|
|
5447
5724
|
const context = useFormControlContext();
|
|
5448
5725
|
const mergedProps = mergeDefaultProps({ id: context.generateId("error-message") }, props);
|
|
@@ -5461,7 +5738,7 @@ function FormControlErrorMessage(props) {
|
|
|
5461
5738
|
}
|
|
5462
5739
|
});
|
|
5463
5740
|
}
|
|
5464
|
-
// ../../node_modules/.pnpm/@corvu+utils@0.4.2_solid-js@1.9.
|
|
5741
|
+
// ../../node_modules/.pnpm/@corvu+utils@0.4.2_solid-js@1.9.18/node_modules/@corvu/utils/dist/chunk/SEUPK2SH.js
|
|
5465
5742
|
var contains = (wrapper, target) => {
|
|
5466
5743
|
if (wrapper.contains(target)) return true;
|
|
5467
5744
|
let currentElement = target;
|
|
@@ -5471,7 +5748,7 @@ var contains = (wrapper, target) => {
|
|
|
5471
5748
|
}
|
|
5472
5749
|
return false;
|
|
5473
5750
|
};
|
|
5474
|
-
// ../../node_modules/.pnpm/@corvu+utils@0.4.2_solid-js@1.9.
|
|
5751
|
+
// ../../node_modules/.pnpm/@corvu+utils@0.4.2_solid-js@1.9.18/node_modules/@corvu/utils/dist/create/style.js
|
|
5475
5752
|
var activeStyles = /* @__PURE__ */ new Map();
|
|
5476
5753
|
var createStyle = (props) => {
|
|
5477
5754
|
createEffect(() => {
|
|
@@ -5504,7 +5781,7 @@ var createStyle = (props) => {
|
|
|
5504
5781
|
});
|
|
5505
5782
|
};
|
|
5506
5783
|
var style_default = createStyle;
|
|
5507
|
-
// ../../node_modules/.pnpm/@corvu+utils@0.4.2_solid-js@1.9.
|
|
5784
|
+
// ../../node_modules/.pnpm/@corvu+utils@0.4.2_solid-js@1.9.18/node_modules/@corvu/utils/dist/scroll/index.js
|
|
5508
5785
|
var getScrollDimensions = (element, axis) => {
|
|
5509
5786
|
switch (axis) {
|
|
5510
5787
|
case "x": return [
|
|
@@ -5542,7 +5819,7 @@ var getScrollAtLocation = (location, axis, stopAt) => {
|
|
|
5542
5819
|
} while (currentElement && !wrapperReached);
|
|
5543
5820
|
return [availableScroll, availableScrollTop];
|
|
5544
5821
|
};
|
|
5545
|
-
// ../../node_modules/.pnpm/solid-prevent-scroll@0.1.11_solid-js@1.9.
|
|
5822
|
+
// ../../node_modules/.pnpm/solid-prevent-scroll@0.1.11_solid-js@1.9.18/node_modules/solid-prevent-scroll/dist/index.js
|
|
5546
5823
|
var [preventScrollStack, setPreventScrollStack] = createSignal([]);
|
|
5547
5824
|
var isActive = (id) => preventScrollStack().indexOf(id) === preventScrollStack().length - 1;
|
|
5548
5825
|
var createPreventScroll = (props) => {
|
|
@@ -5656,7 +5933,7 @@ var wouldScroll = (target, axis, delta, wrapper) => {
|
|
|
5656
5933
|
return true;
|
|
5657
5934
|
};
|
|
5658
5935
|
var index_default = createPreventScroll;
|
|
5659
|
-
// ../../node_modules/.pnpm/@kobalte+core@0.13.14_solid-js@1.9.
|
|
5936
|
+
// ../../node_modules/.pnpm/@kobalte+core@0.13.14_solid-js@1.9.18/node_modules/@kobalte/core/dist/chunk/DBKNBLZP.js
|
|
5660
5937
|
var radio_group_exports = {};
|
|
5661
5938
|
__export(radio_group_exports, {
|
|
5662
5939
|
Description: () => FormControlDescription,
|
|
@@ -6013,7 +6290,7 @@ var RadioGroup = Object.assign(RadioGroupRoot, {
|
|
|
6013
6290
|
ItemLabel: RadioGroupItemLabel,
|
|
6014
6291
|
Label: RadioGroupLabel
|
|
6015
6292
|
});
|
|
6016
|
-
// ../../node_modules/.pnpm/@kobalte+core@0.13.14_solid-js@1.9.
|
|
6293
|
+
// ../../node_modules/.pnpm/@kobalte+core@0.13.14_solid-js@1.9.18/node_modules/@kobalte/core/dist/chunk/77ALM4RG.js
|
|
6017
6294
|
var MenubarContext = createContext();
|
|
6018
6295
|
function useOptionalMenubarContext() {
|
|
6019
6296
|
return useContext(MenubarContext);
|
|
@@ -6553,7 +6830,7 @@ function MenuTrigger(props) {
|
|
|
6553
6830
|
return context.isOpen();
|
|
6554
6831
|
},
|
|
6555
6832
|
get ["aria-controls"]() {
|
|
6556
|
-
return memo(() => !!context.isOpen())() ? context.contentId() : void 0;
|
|
6833
|
+
return memo$1(() => !!context.isOpen())() ? context.contentId() : void 0;
|
|
6557
6834
|
},
|
|
6558
6835
|
get ["data-highlighted"]() {
|
|
6559
6836
|
return key() !== void 0 && optionalMenubarContext?.value() === key() ? true : void 0;
|
|
@@ -6706,7 +6983,7 @@ function MenuContentBase(props) {
|
|
|
6706
6983
|
return createComponent(Popper.Positioner, { get children() {
|
|
6707
6984
|
return createComponent(DismissableLayer, mergeProps({
|
|
6708
6985
|
get disableOutsidePointerEvents() {
|
|
6709
|
-
return memo(() => !!isRootModalContent())() && context.isOpen();
|
|
6986
|
+
return memo$1(() => !!isRootModalContent())() && context.isOpen();
|
|
6710
6987
|
},
|
|
6711
6988
|
get excludedElements() {
|
|
6712
6989
|
return [context.triggerRef];
|
|
@@ -7144,7 +7421,7 @@ function MenuSubTrigger(props) {
|
|
|
7144
7421
|
return context.isOpen();
|
|
7145
7422
|
},
|
|
7146
7423
|
get ["aria-controls"]() {
|
|
7147
|
-
return memo(() => !!context.isOpen())() ? context.contentId() : void 0;
|
|
7424
|
+
return memo$1(() => !!context.isOpen())() ? context.contentId() : void 0;
|
|
7148
7425
|
},
|
|
7149
7426
|
get ["aria-disabled"]() {
|
|
7150
7427
|
return local.disabled;
|
|
@@ -7207,7 +7484,7 @@ function SeparatorRoot(props) {
|
|
|
7207
7484
|
}, others));
|
|
7208
7485
|
}
|
|
7209
7486
|
var Separator = SeparatorRoot;
|
|
7210
|
-
// ../../node_modules/.pnpm/@kobalte+core@0.13.14_solid-js@1.9.
|
|
7487
|
+
// ../../node_modules/.pnpm/@kobalte+core@0.13.14_solid-js@1.9.18/node_modules/@kobalte/core/dist/chunk/VPR4IPXB.js
|
|
7211
7488
|
var dropdown_menu_exports = {};
|
|
7212
7489
|
__export(dropdown_menu_exports, {
|
|
7213
7490
|
Arrow: () => PopperArrow,
|
|
@@ -7567,8 +7844,8 @@ const tokens = {
|
|
|
7567
7844
|
}
|
|
7568
7845
|
};
|
|
7569
7846
|
// src/icons/index.tsx
|
|
7570
|
-
var _tmpl$$
|
|
7571
|
-
var _tmpl$2$
|
|
7847
|
+
var _tmpl$$3 = /*#__PURE__*/ template(`<svg width=14 height=14 viewBox="0 0 14 14"fill=none xmlns=http://www.w3.org/2000/svg><path d="M13 13L9.00007 9M10.3333 5.66667C10.3333 8.244 8.244 10.3333 5.66667 10.3333C3.08934 10.3333 1 8.244 1 5.66667C1 3.08934 3.08934 1 5.66667 1C8.244 1 10.3333 3.08934 10.3333 5.66667Z"stroke=currentColor stroke-width=1.66667 stroke-linecap=round stroke-linejoin=round>`);
|
|
7848
|
+
var _tmpl$2$3 = /*#__PURE__*/ template(`<svg width=24 height=24 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path d="M9 3H15M3 6H21M19 6L18.2987 16.5193C18.1935 18.0975 18.1409 18.8867 17.8 19.485C17.4999 20.0118 17.0472 20.4353 16.5017 20.6997C15.882 21 15.0911 21 13.5093 21H10.4907C8.90891 21 8.11803 21 7.49834 20.6997C6.95276 20.4353 6.50009 20.0118 6.19998 19.485C5.85911 18.8867 5.8065 18.0975 5.70129 16.5193L5 6M10 10.5V15.5M14 10.5V15.5"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round>`);
|
|
7572
7849
|
var _tmpl$3$2 = /*#__PURE__*/ template(`<svg width=10 height=6 viewBox="0 0 10 6"fill=none xmlns=http://www.w3.org/2000/svg><path d="M1 1L5 5L9 1"stroke=currentColor stroke-width=1.66667 stroke-linecap=round stroke-linejoin=round>`);
|
|
7573
7850
|
var _tmpl$4$2 = /*#__PURE__*/ template(`<svg width=12 height=12 viewBox="0 0 16 16"fill=none xmlns=http://www.w3.org/2000/svg><path d="M8 13.3333V2.66667M8 2.66667L4 6.66667M8 2.66667L12 6.66667"stroke=currentColor stroke-width=1.66667 stroke-linecap=round stroke-linejoin=round>`);
|
|
7574
7851
|
var _tmpl$5$2 = /*#__PURE__*/ template(`<svg width=12 height=12 viewBox="0 0 16 16"fill=none xmlns=http://www.w3.org/2000/svg><path d="M8 2.66667V13.3333M8 13.3333L4 9.33333M8 13.3333L12 9.33333"stroke=currentColor stroke-width=1.66667 stroke-linecap=round stroke-linejoin=round>`);
|
|
@@ -7579,8 +7856,8 @@ var _tmpl$9$2 = /*#__PURE__*/ template(`<svg viewBox="0 0 24 24"height=12 width=
|
|
|
7579
7856
|
var _tmpl$0$2 = /*#__PURE__*/ template(`<svg viewBox="0 0 24 24"height=12 width=12 fill=none xmlns=http://www.w3.org/2000/svg><path d="M8 21h8m-4-4v4m-5.2-4h10.4c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C22 14.72 22 13.88 22 12.2V7.8c0-1.68 0-2.52-.327-3.162a3 3 0 0 0-1.311-1.311C19.72 3 18.88 3 17.2 3H6.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C2 5.28 2 6.12 2 7.8v4.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C4.28 17 5.12 17 6.8 17Z"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round>`);
|
|
7580
7857
|
var _tmpl$1$2 = /*#__PURE__*/ template(`<svg stroke=currentColor fill=currentColor stroke-width=0 viewBox="0 0 24 24"height=1em width=1em xmlns=http://www.w3.org/2000/svg><path fill=none d="M0 0h24v24H0z"></path><path d="M1 9l2 2c4.97-4.97 13.03-4.97 18 0l2-2C16.93 2.93 7.08 2.93 1 9zm8 8l3 3 3-3a4.237 4.237 0 00-6 0zm-4-4l2 2a7.074 7.074 0 0110 0l2-2C15.14 9.14 8.87 9.14 5 13z">`);
|
|
7581
7858
|
var _tmpl$10$2 = /*#__PURE__*/ template(`<svg stroke-width=0 viewBox="0 0 24 24"height=1em width=1em xmlns=http://www.w3.org/2000/svg><path fill=none d="M24 .01c0-.01 0-.01 0 0L0 0v24h24V.01zM0 0h24v24H0V0zm0 0h24v24H0V0z"></path><path d="M22.99 9C19.15 5.16 13.8 3.76 8.84 4.78l2.52 2.52c3.47-.17 6.99 1.05 9.63 3.7l2-2zm-4 4a9.793 9.793 0 00-4.49-2.56l3.53 3.53.96-.97zM2 3.05L5.07 6.1C3.6 6.82 2.22 7.78 1 9l1.99 2c1.24-1.24 2.67-2.16 4.2-2.77l2.24 2.24A9.684 9.684 0 005 13v.01L6.99 15a7.042 7.042 0 014.92-2.06L18.98 20l1.27-1.26L3.29 1.79 2 3.05zM9 17l3 3 3-3a4.237 4.237 0 00-6 0z">`);
|
|
7582
|
-
var _tmpl$11$
|
|
7583
|
-
var _tmpl$12$
|
|
7859
|
+
var _tmpl$11$2 = /*#__PURE__*/ template(`<svg width=24 height=24 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path d="M9.3951 19.3711L9.97955 20.6856C10.1533 21.0768 10.4368 21.4093 10.7958 21.6426C11.1547 21.8759 11.5737 22.0001 12.0018 22C12.4299 22.0001 12.8488 21.8759 13.2078 21.6426C13.5667 21.4093 13.8503 21.0768 14.024 20.6856L14.6084 19.3711C14.8165 18.9047 15.1664 18.5159 15.6084 18.26C16.0532 18.0034 16.5678 17.8941 17.0784 17.9478L18.5084 18.1C18.9341 18.145 19.3637 18.0656 19.7451 17.8713C20.1265 17.6771 20.4434 17.3763 20.6573 17.0056C20.8715 16.635 20.9735 16.2103 20.9511 15.7829C20.9286 15.3555 20.7825 14.9438 20.5307 14.5978L19.684 13.4344C19.3825 13.0171 19.2214 12.5148 19.224 12C19.2239 11.4866 19.3865 10.9864 19.6884 10.5711L20.5351 9.40778C20.787 9.06175 20.933 8.65007 20.9555 8.22267C20.978 7.79528 20.8759 7.37054 20.6618 7C20.4479 6.62923 20.131 6.32849 19.7496 6.13423C19.3681 5.93997 18.9386 5.86053 18.5129 5.90556L17.0829 6.05778C16.5722 6.11141 16.0577 6.00212 15.6129 5.74556C15.17 5.48825 14.82 5.09736 14.6129 4.62889L14.024 3.31444C13.8503 2.92317 13.5667 2.59072 13.2078 2.3574C12.8488 2.12408 12.4299 1.99993 12.0018 2C11.5737 1.99993 11.1547 2.12408 10.7958 2.3574C10.4368 2.59072 10.1533 2.92317 9.97955 3.31444L9.3951 4.62889C9.18803 5.09736 8.83798 5.48825 8.3951 5.74556C7.95032 6.00212 7.43577 6.11141 6.9251 6.05778L5.49066 5.90556C5.06499 5.86053 4.6354 5.93997 4.25397 6.13423C3.87255 6.32849 3.55567 6.62923 3.34177 7C3.12759 7.37054 3.02555 7.79528 3.04804 8.22267C3.07052 8.65007 3.21656 9.06175 3.46844 9.40778L4.3151 10.5711C4.61704 10.9864 4.77964 11.4866 4.77955 12C4.77964 12.5134 4.61704 13.0137 4.3151 13.4289L3.46844 14.5922C3.21656 14.9382 3.07052 15.3499 3.04804 15.7773C3.02555 16.2047 3.12759 16.6295 3.34177 17C3.55589 17.3706 3.8728 17.6712 4.25417 17.8654C4.63554 18.0596 5.06502 18.1392 5.49066 18.0944L6.92066 17.9422C7.43133 17.8886 7.94587 17.9979 8.39066 18.2544C8.83519 18.511 9.18687 18.902 9.3951 19.3711Z"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round></path><path d="M12 15C13.6568 15 15 13.6569 15 12C15 10.3431 13.6568 9 12 9C10.3431 9 8.99998 10.3431 8.99998 12C8.99998 13.6569 10.3431 15 12 15Z"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round>`);
|
|
7860
|
+
var _tmpl$12$2 = /*#__PURE__*/ template(`<svg width=24 height=24 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path d="M16 21H16.2C17.8802 21 18.7202 21 19.362 20.673C19.9265 20.3854 20.3854 19.9265 20.673 19.362C21 18.7202 21 17.8802 21 16.2V7.8C21 6.11984 21 5.27976 20.673 4.63803C20.3854 4.07354 19.9265 3.6146 19.362 3.32698C18.7202 3 17.8802 3 16.2 3H7.8C6.11984 3 5.27976 3 4.63803 3.32698C4.07354 3.6146 3.6146 4.07354 3.32698 4.63803C3 5.27976 3 6.11984 3 7.8V8M11.5 12.5L17 7M17 7H12M17 7V12M6.2 21H8.8C9.9201 21 10.4802 21 10.908 20.782C11.2843 20.5903 11.5903 20.2843 11.782 19.908C12 19.4802 12 18.9201 12 17.8V15.2C12 14.0799 12 13.5198 11.782 13.092C11.5903 12.7157 11.2843 12.4097 10.908 12.218C10.4802 12 9.92011 12 8.8 12H6.2C5.0799 12 4.51984 12 4.09202 12.218C3.71569 12.4097 3.40973 12.7157 3.21799 13.092C3 13.5198 3 14.0799 3 15.2V17.8C3 18.9201 3 19.4802 3.21799 19.908C3.40973 20.2843 3.71569 20.5903 4.09202 20.782C4.51984 21 5.07989 21 6.2 21Z"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round>`);
|
|
7584
7861
|
var _tmpl$13$1 = /*#__PURE__*/ template(`<svg width=24 height=24 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path class=copier d="M8 8V5.2C8 4.0799 8 3.51984 8.21799 3.09202C8.40973 2.71569 8.71569 2.40973 9.09202 2.21799C9.51984 2 10.0799 2 11.2 2H18.8C19.9201 2 20.4802 2 20.908 2.21799C21.2843 2.40973 21.5903 2.71569 21.782 3.09202C22 3.51984 22 4.0799 22 5.2V12.8C22 13.9201 22 14.4802 21.782 14.908C21.5903 15.2843 21.2843 15.5903 20.908 15.782C20.4802 16 19.9201 16 18.8 16H16M5.2 22H12.8C13.9201 22 14.4802 22 14.908 21.782C15.2843 21.5903 15.5903 21.2843 15.782 20.908C16 20.4802 16 19.9201 16 18.8V11.2C16 10.0799 16 9.51984 15.782 9.09202C15.5903 8.71569 15.2843 8.40973 14.908 8.21799C14.4802 8 13.9201 8 12.8 8H5.2C4.0799 8 3.51984 8 3.09202 8.21799C2.71569 8.40973 2.40973 8.71569 2.21799 9.09202C2 9.51984 2 10.0799 2 11.2V18.8C2 19.9201 2 20.4802 2.21799 20.908C2.40973 21.2843 2.71569 21.5903 3.09202 21.782C3.51984 22 4.07989 22 5.2 22Z"stroke-width=2 stroke-linecap=round stroke-linejoin=round stroke=currentColor>`);
|
|
7585
7862
|
var _tmpl$14$1 = /*#__PURE__*/ template(`<svg width=24 height=24 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path d="M2.5 21.4998L8.04927 19.3655C8.40421 19.229 8.58168 19.1607 8.74772 19.0716C8.8952 18.9924 9.0358 18.901 9.16804 18.7984C9.31692 18.6829 9.45137 18.5484 9.72028 18.2795L21 6.99982C22.1046 5.89525 22.1046 4.10438 21 2.99981C19.8955 1.89525 18.1046 1.89524 17 2.99981L5.72028 14.2795C5.45138 14.5484 5.31692 14.6829 5.20139 14.8318C5.09877 14.964 5.0074 15.1046 4.92823 15.2521C4.83911 15.4181 4.77085 15.5956 4.63433 15.9506L2.5 21.4998ZM2.5 21.4998L4.55812 16.1488C4.7054 15.7659 4.77903 15.5744 4.90534 15.4867C5.01572 15.4101 5.1523 15.3811 5.2843 15.4063C5.43533 15.4351 5.58038 15.5802 5.87048 15.8703L8.12957 18.1294C8.41967 18.4195 8.56472 18.5645 8.59356 18.7155C8.61877 18.8475 8.58979 18.9841 8.51314 19.0945C8.42545 19.2208 8.23399 19.2944 7.85107 19.4417L2.5 21.4998Z"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round>`);
|
|
7586
7863
|
var _tmpl$15$1 = /*#__PURE__*/ template(`<svg width=24 height=24 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path d="M7.5 12L10.5 15L16.5 9M7.8 21H16.2C17.8802 21 18.7202 21 19.362 20.673C19.9265 20.3854 20.3854 19.9265 20.673 19.362C21 18.7202 21 17.8802 21 16.2V7.8C21 6.11984 21 5.27976 20.673 4.63803C20.3854 4.07354 19.9265 3.6146 19.362 3.32698C18.7202 3 17.8802 3 16.2 3H7.8C6.11984 3 5.27976 3 4.63803 3.32698C4.07354 3.6146 3.6146 4.07354 3.32698 4.63803C3 5.27976 3 6.11984 3 7.8V16.2C3 17.8802 3 18.7202 3.32698 19.362C3.6146 19.9265 4.07354 20.3854 4.63803 20.673C5.27976 21 6.11984 21 7.8 21Z"stroke-width=2 stroke-linecap=round stroke-linejoin=round>`);
|
|
@@ -7597,14 +7874,14 @@ var _tmpl$23$1 = /*#__PURE__*/ template(`<svg version=1.0 viewBox="0 0 633 633">
|
|
|
7597
7874
|
* @returns The icon's SVG element.
|
|
7598
7875
|
*/
|
|
7599
7876
|
function Search() {
|
|
7600
|
-
return _tmpl$$
|
|
7877
|
+
return _tmpl$$3();
|
|
7601
7878
|
}
|
|
7602
7879
|
/**
|
|
7603
7880
|
* Renders the trash icon.
|
|
7604
7881
|
* @returns The icon's SVG element.
|
|
7605
7882
|
*/
|
|
7606
7883
|
function Trash() {
|
|
7607
|
-
return _tmpl$2$
|
|
7884
|
+
return _tmpl$2$3();
|
|
7608
7885
|
}
|
|
7609
7886
|
/**
|
|
7610
7887
|
* Renders the chevron-down icon.
|
|
@@ -7681,14 +7958,14 @@ function Offline() {
|
|
|
7681
7958
|
* @returns The icon's SVG element.
|
|
7682
7959
|
*/
|
|
7683
7960
|
function Settings() {
|
|
7684
|
-
return _tmpl$11$
|
|
7961
|
+
return _tmpl$11$2();
|
|
7685
7962
|
}
|
|
7686
7963
|
/**
|
|
7687
7964
|
* Renders the picture-in-picture icon.
|
|
7688
7965
|
* @returns The icon's SVG element.
|
|
7689
7966
|
*/
|
|
7690
7967
|
function PiPIcon() {
|
|
7691
|
-
return _tmpl$12$
|
|
7968
|
+
return _tmpl$12$2();
|
|
7692
7969
|
}
|
|
7693
7970
|
/**
|
|
7694
7971
|
* Renders the copy icon.
|
|
@@ -8009,19 +8286,120 @@ const ThemeContext = createContext(() => "dark");
|
|
|
8009
8286
|
function useTheme() {
|
|
8010
8287
|
return useContext(ThemeContext);
|
|
8011
8288
|
}
|
|
8289
|
+
// src/explorerSearch.ts
|
|
8290
|
+
/**
|
|
8291
|
+
* Converts only primitive values to searchable text.
|
|
8292
|
+
* @param value - The inspected value.
|
|
8293
|
+
* @returns Primitive text, or undefined for objects and functions.
|
|
8294
|
+
*/
|
|
8295
|
+
function primitiveText(value) {
|
|
8296
|
+
if (value === null) return "null";
|
|
8297
|
+
switch (typeof value) {
|
|
8298
|
+
case "string":
|
|
8299
|
+
case "number":
|
|
8300
|
+
case "boolean":
|
|
8301
|
+
case "bigint":
|
|
8302
|
+
case "symbol":
|
|
8303
|
+
case "undefined": return String(value);
|
|
8304
|
+
default: return;
|
|
8305
|
+
}
|
|
8306
|
+
}
|
|
8307
|
+
/**
|
|
8308
|
+
* Reads finite entries through native collection methods and own descriptors.
|
|
8309
|
+
* Accessors and user-defined iterators or key conversions are not evaluated.
|
|
8310
|
+
* @param value - The inspected value.
|
|
8311
|
+
* @returns Original entries, or undefined for opaque values.
|
|
8312
|
+
*/
|
|
8313
|
+
function searchEntries(value) {
|
|
8314
|
+
try {
|
|
8315
|
+
if (value === null || typeof value !== "object" || ArrayBuffer.isView(value)) return;
|
|
8316
|
+
const type = getNativeObjectType(value);
|
|
8317
|
+
if (type === "String") return void 0;
|
|
8318
|
+
if (type === "Map") return Array.from(Map.prototype.entries.call(value), ([key, entry]) => ({
|
|
8319
|
+
key,
|
|
8320
|
+
label: primitiveText(key) ?? "[Object key]",
|
|
8321
|
+
value: entry
|
|
8322
|
+
}));
|
|
8323
|
+
if (type === "Set") return Array.from(Set.prototype.values.call(value), (entry, index) => ({
|
|
8324
|
+
key: String(index),
|
|
8325
|
+
label: String(index),
|
|
8326
|
+
value: entry
|
|
8327
|
+
}));
|
|
8328
|
+
const entries = Object.entries(Object.getOwnPropertyDescriptors(value)).filter(([, descriptor]) => descriptor.enumerable).map(([key, descriptor]) => ({
|
|
8329
|
+
key,
|
|
8330
|
+
label: key,
|
|
8331
|
+
value: descriptor.value,
|
|
8332
|
+
accessor: !("value" in descriptor)
|
|
8333
|
+
}));
|
|
8334
|
+
if (!Array.isArray(value) && Object.getPrototypeOf(value) !== Object.prototype && Object.getPrototypeOf(value) !== null && !entries.some((entry) => !entry.accessor && typeof entry.value !== "function")) return;
|
|
8335
|
+
return entries;
|
|
8336
|
+
} catch {
|
|
8337
|
+
return;
|
|
8338
|
+
}
|
|
8339
|
+
}
|
|
8340
|
+
/**
|
|
8341
|
+
* Builds one search tree, stopping ancestor cycles while visiting shared siblings.
|
|
8342
|
+
* @param rootValue - The current root data.
|
|
8343
|
+
* @param term - The case-normalized literal search term.
|
|
8344
|
+
* @returns Match and safe rendering metadata for every original entry.
|
|
8345
|
+
*/
|
|
8346
|
+
function searchExplorer(rootValue, term) {
|
|
8347
|
+
const ancestors = /* @__PURE__ */ new Set();
|
|
8348
|
+
/**
|
|
8349
|
+
* Visits one original path with its current ancestors.
|
|
8350
|
+
* @param value - The entry value.
|
|
8351
|
+
* @param label - The entry label; absent for the synthetic root.
|
|
8352
|
+
* @param accessor - Whether reading the entry would invoke a getter.
|
|
8353
|
+
* @param depth - The current nesting depth.
|
|
8354
|
+
* @returns The entry's match metadata.
|
|
8355
|
+
*/
|
|
8356
|
+
function visit(value, label, accessor = false, depth = 0) {
|
|
8357
|
+
const labelMatch = label?.toLowerCase().includes(term) ?? false;
|
|
8358
|
+
const text = accessor ? void 0 : primitiveText(value);
|
|
8359
|
+
const valueMatch = text?.toLowerCase().includes(term) ?? false;
|
|
8360
|
+
const children = /* @__PURE__ */ new Map();
|
|
8361
|
+
const match = {
|
|
8362
|
+
label: labelMatch,
|
|
8363
|
+
value: valueMatch,
|
|
8364
|
+
hasMatch: labelMatch || valueMatch,
|
|
8365
|
+
kind: accessor ? "accessor" : text !== void 0 ? "value" : "opaque",
|
|
8366
|
+
children
|
|
8367
|
+
};
|
|
8368
|
+
if (accessor || text !== void 0) return match;
|
|
8369
|
+
if (depth > 500) return match;
|
|
8370
|
+
if (ancestors.has(value)) {
|
|
8371
|
+
match.kind = "circular";
|
|
8372
|
+
return match;
|
|
8373
|
+
}
|
|
8374
|
+
const entries = searchEntries(value);
|
|
8375
|
+
if (!entries) return match;
|
|
8376
|
+
match.kind = "branch";
|
|
8377
|
+
ancestors.add(value);
|
|
8378
|
+
for (const entry of entries) {
|
|
8379
|
+
const child = visit(entry.value, entry.label, entry.accessor, depth + 1);
|
|
8380
|
+
children.set(entry.key, child);
|
|
8381
|
+
match.hasMatch ||= child.hasMatch;
|
|
8382
|
+
}
|
|
8383
|
+
ancestors.delete(value);
|
|
8384
|
+
return match;
|
|
8385
|
+
}
|
|
8386
|
+
return visit(rootValue);
|
|
8387
|
+
}
|
|
8012
8388
|
// src/Explorer.tsx
|
|
8013
|
-
var _tmpl$$
|
|
8014
|
-
var _tmpl$2$
|
|
8389
|
+
var _tmpl$$2 = /*#__PURE__*/ template(`<span><svg width=16 height=16 viewBox="0 0 16 16"fill=none xmlns=http://www.w3.org/2000/svg><path d="M6 12L10 8L6 4"stroke-width=2 stroke-linecap=round stroke-linejoin=round>`);
|
|
8390
|
+
var _tmpl$2$2 = /*#__PURE__*/ template(`<button title="Copy object to clipboard">`);
|
|
8015
8391
|
var _tmpl$3$1 = /*#__PURE__*/ template(`<button title="Remove all items"aria-label="Remove all items">`);
|
|
8016
8392
|
var _tmpl$4$1 = /*#__PURE__*/ template(`<button title="Delete item"aria-label="Delete item">`);
|
|
8017
8393
|
var _tmpl$5$1 = /*#__PURE__*/ template(`<button title="Toggle value"aria-label="Toggle value">`);
|
|
8018
|
-
var _tmpl$6$1 = /*#__PURE__*/ template(`<button
|
|
8019
|
-
var _tmpl$7$1 = /*#__PURE__*/ template(`<div>`);
|
|
8020
|
-
var _tmpl$8$1 = /*#__PURE__*/ template(`<
|
|
8021
|
-
var _tmpl$9$1 = /*#__PURE__*/ template(`<
|
|
8022
|
-
var _tmpl$0$1 = /*#__PURE__*/ template(`<span
|
|
8023
|
-
var _tmpl$1$1 = /*#__PURE__*/ template(`<
|
|
8024
|
-
var _tmpl$10$1 = /*#__PURE__*/ template(`<
|
|
8394
|
+
var _tmpl$6$1 = /*#__PURE__*/ template(`<button type=button aria-label="Clear search">Clear`);
|
|
8395
|
+
var _tmpl$7$1 = /*#__PURE__*/ template(`<div><div><input type=search aria-label="Search data"placeholder="Search data"></div><div role=status aria-live=polite>`);
|
|
8396
|
+
var _tmpl$8$1 = /*#__PURE__*/ template(`<button title="Bulk Edit Data"aria-label="Bulk Edit Data">`);
|
|
8397
|
+
var _tmpl$9$1 = /*#__PURE__*/ template(`<div>`);
|
|
8398
|
+
var _tmpl$0$1 = /*#__PURE__*/ template(`<div><button> <span></span> <span> `);
|
|
8399
|
+
var _tmpl$1$1 = /*#__PURE__*/ template(`<input>`);
|
|
8400
|
+
var _tmpl$10$1 = /*#__PURE__*/ template(`<span>`);
|
|
8401
|
+
var _tmpl$11$1 = /*#__PURE__*/ template(`<div><label>:`);
|
|
8402
|
+
var _tmpl$12$1 = /*#__PURE__*/ template(`<div><div><button> [<!>...<!>]`);
|
|
8025
8403
|
/**
|
|
8026
8404
|
* Chunk elements in the array by size.
|
|
8027
8405
|
*
|
|
@@ -8050,7 +8428,7 @@ const Expander = (props) => {
|
|
|
8050
8428
|
return theme() === "dark" ? darkStyles$1(css) : lightStyles$1(css);
|
|
8051
8429
|
});
|
|
8052
8430
|
return (() => {
|
|
8053
|
-
var _el$ = _tmpl$$
|
|
8431
|
+
var _el$ = _tmpl$$2();
|
|
8054
8432
|
createRenderEffect(() => className(_el$, clsx(styles().expander, css`
|
|
8055
8433
|
transform: rotate(${props.expanded ? 90 : 0}deg);
|
|
8056
8434
|
`, props.expanded && css`
|
|
@@ -8069,7 +8447,7 @@ const CopyButton = (props) => {
|
|
|
8069
8447
|
});
|
|
8070
8448
|
const [copyState, setCopyState] = createSignal("NoCopy");
|
|
8071
8449
|
return (() => {
|
|
8072
|
-
var _el$2 = _tmpl$2$
|
|
8450
|
+
var _el$2 = _tmpl$2$2();
|
|
8073
8451
|
addEventListener(_el$2, "click", copyState() === "NoCopy" ? () => {
|
|
8074
8452
|
navigator.clipboard.writeText(stringify(props.value)).then(() => {
|
|
8075
8453
|
setCopyState("SuccessCopy");
|
|
@@ -8202,6 +8580,166 @@ const ToggleValueButton = (props) => {
|
|
|
8202
8580
|
})();
|
|
8203
8581
|
};
|
|
8204
8582
|
/**
|
|
8583
|
+
* Adds nested data search without changing the explorer's manual expansion.
|
|
8584
|
+
* @param props - Data explorer options and the selected query or mutation identity.
|
|
8585
|
+
* @returns The search controls and the original data tree.
|
|
8586
|
+
*/
|
|
8587
|
+
function SearchableExplorer(props) {
|
|
8588
|
+
const theme = useTheme();
|
|
8589
|
+
const css = useQueryDevtoolsContext().shadowDOMTarget ? u.bind({ target: useQueryDevtoolsContext().shadowDOMTarget }) : u;
|
|
8590
|
+
const styles = createMemo(() => theme() === "dark" ? darkStyles$1(css) : lightStyles$1(css));
|
|
8591
|
+
const [term, setTerm] = createSignal("");
|
|
8592
|
+
const [debouncedTerm, setDebouncedTerm] = createSignal("");
|
|
8593
|
+
const clear = () => {
|
|
8594
|
+
setTerm("");
|
|
8595
|
+
setDebouncedTerm("");
|
|
8596
|
+
};
|
|
8597
|
+
const searchKey = createMemo(() => props.searchKey);
|
|
8598
|
+
createEffect(on(searchKey, clear));
|
|
8599
|
+
createEffect(() => {
|
|
8600
|
+
const next = term().toLowerCase();
|
|
8601
|
+
if (!next) {
|
|
8602
|
+
setDebouncedTerm("");
|
|
8603
|
+
return;
|
|
8604
|
+
}
|
|
8605
|
+
const timeout = setTimeout(() => setDebouncedTerm(next), 150);
|
|
8606
|
+
onCleanup(() => clearTimeout(timeout));
|
|
8607
|
+
});
|
|
8608
|
+
const search = createMemo(() => {
|
|
8609
|
+
const activeTerm = debouncedTerm();
|
|
8610
|
+
return activeTerm ? {
|
|
8611
|
+
term: activeTerm,
|
|
8612
|
+
match: searchExplorer(props.value, activeTerm)
|
|
8613
|
+
} : void 0;
|
|
8614
|
+
});
|
|
8615
|
+
const highlightName = `tsqd-data-search-${createUniqueId()}`;
|
|
8616
|
+
const [nativeHighlight, setNativeHighlight] = createSignal();
|
|
8617
|
+
let root;
|
|
8618
|
+
onMount(() => {
|
|
8619
|
+
const view = root.ownerDocument.defaultView;
|
|
8620
|
+
const registry = view.CSS.highlights;
|
|
8621
|
+
createEffect(on(search, () => {
|
|
8622
|
+
const highlight = new view.Highlight();
|
|
8623
|
+
registry.set(highlightName, highlight);
|
|
8624
|
+
setNativeHighlight(highlight);
|
|
8625
|
+
onCleanup(() => {
|
|
8626
|
+
registry.delete(highlightName);
|
|
8627
|
+
highlight.clear();
|
|
8628
|
+
});
|
|
8629
|
+
}));
|
|
8630
|
+
});
|
|
8631
|
+
const nativeHighlightStyle = createMemo(() => css`
|
|
8632
|
+
& ::highlight(${highlightName}) {
|
|
8633
|
+
color: ${theme() === "dark" ? tokens.colors.gray[100] : tokens.colors.gray[900]};
|
|
8634
|
+
background-color: ${theme() === "dark" ? tokens.colors.yellow[900] : tokens.colors.yellow[200]};
|
|
8635
|
+
}
|
|
8636
|
+
`);
|
|
8637
|
+
return (() => {
|
|
8638
|
+
var _el$6 = _tmpl$7$1(), _el$7 = _el$6.firstChild, _el$8 = _el$7.firstChild, _el$0 = _el$7.nextSibling;
|
|
8639
|
+
var _ref$ = root;
|
|
8640
|
+
typeof _ref$ === "function" ? use(_ref$, _el$6) : root = _el$6;
|
|
8641
|
+
_el$8.$$keydown = (event) => {
|
|
8642
|
+
if (event.key === "Escape") {
|
|
8643
|
+
event.stopPropagation();
|
|
8644
|
+
clear();
|
|
8645
|
+
}
|
|
8646
|
+
};
|
|
8647
|
+
_el$8.$$input = (event) => setTerm(event.currentTarget.value);
|
|
8648
|
+
insert(_el$7, createComponent(Show, {
|
|
8649
|
+
get when() {
|
|
8650
|
+
return term();
|
|
8651
|
+
},
|
|
8652
|
+
get children() {
|
|
8653
|
+
var _el$9 = _tmpl$6$1();
|
|
8654
|
+
_el$9.$$click = clear;
|
|
8655
|
+
createRenderEffect(() => className(_el$9, styles().clearSearch));
|
|
8656
|
+
return _el$9;
|
|
8657
|
+
}
|
|
8658
|
+
}), null);
|
|
8659
|
+
insert(_el$0, () => search() && !search().match.hasMatch ? "No matches" : "");
|
|
8660
|
+
insert(_el$6, createComponent(Explorer, mergeProps(props, {
|
|
8661
|
+
get search() {
|
|
8662
|
+
return search();
|
|
8663
|
+
},
|
|
8664
|
+
get highlight() {
|
|
8665
|
+
return nativeHighlight();
|
|
8666
|
+
}
|
|
8667
|
+
})), null);
|
|
8668
|
+
createRenderEffect((_p$) => {
|
|
8669
|
+
var _v$5 = nativeHighlightStyle(), _v$6 = styles().search, _v$7 = styles().searchInput;
|
|
8670
|
+
_v$5 !== _p$.e && className(_el$6, _p$.e = _v$5);
|
|
8671
|
+
_v$6 !== _p$.t && className(_el$7, _p$.t = _v$6);
|
|
8672
|
+
_v$7 !== _p$.a && className(_el$8, _p$.a = _v$7);
|
|
8673
|
+
return _p$;
|
|
8674
|
+
}, {
|
|
8675
|
+
e: void 0,
|
|
8676
|
+
t: void 0,
|
|
8677
|
+
a: void 0
|
|
8678
|
+
});
|
|
8679
|
+
createRenderEffect(() => _el$8.value = term());
|
|
8680
|
+
return _el$6;
|
|
8681
|
+
})();
|
|
8682
|
+
}
|
|
8683
|
+
const MAX_HIGHLIGHT_RANGES = 1e3;
|
|
8684
|
+
/**
|
|
8685
|
+
* Marks literal, case-insensitive matches in a label or primitive value.
|
|
8686
|
+
* @param props - The text, normalized search term, and shared highlight instance.
|
|
8687
|
+
* @returns Text with matching substrings marked.
|
|
8688
|
+
*/
|
|
8689
|
+
function HighlightedText(props) {
|
|
8690
|
+
const matches = createMemo(() => {
|
|
8691
|
+
const term = props.term;
|
|
8692
|
+
if (!term) return [];
|
|
8693
|
+
const lower = props.text.toLowerCase();
|
|
8694
|
+
let originalStart = 0;
|
|
8695
|
+
let originalEnd = 0;
|
|
8696
|
+
let lowercaseEnd = 0;
|
|
8697
|
+
const originalPosition = (index) => {
|
|
8698
|
+
while (lowercaseEnd <= index) {
|
|
8699
|
+
const character = String.fromCodePoint(props.text.codePointAt(originalEnd));
|
|
8700
|
+
originalStart = originalEnd;
|
|
8701
|
+
originalEnd += character.length;
|
|
8702
|
+
lowercaseEnd += character.toLowerCase().length;
|
|
8703
|
+
}
|
|
8704
|
+
return {
|
|
8705
|
+
start: originalStart,
|
|
8706
|
+
end: originalEnd
|
|
8707
|
+
};
|
|
8708
|
+
};
|
|
8709
|
+
const ranges = [];
|
|
8710
|
+
let index = lower.indexOf(term);
|
|
8711
|
+
while (index !== -1 && ranges.length < MAX_HIGHLIGHT_RANGES) {
|
|
8712
|
+
const from = originalPosition(index).start;
|
|
8713
|
+
const to = originalPosition(index + term.length - 1).end;
|
|
8714
|
+
ranges.push({
|
|
8715
|
+
start: from,
|
|
8716
|
+
end: to
|
|
8717
|
+
});
|
|
8718
|
+
index = lower.indexOf(term, index + term.length);
|
|
8719
|
+
}
|
|
8720
|
+
return ranges;
|
|
8721
|
+
});
|
|
8722
|
+
const text = document.createTextNode("");
|
|
8723
|
+
createEffect(() => {
|
|
8724
|
+
text.data = props.text;
|
|
8725
|
+
const highlight = props.highlight;
|
|
8726
|
+
if (!highlight) return;
|
|
8727
|
+
const ranges = [];
|
|
8728
|
+
for (const match of matches()) {
|
|
8729
|
+
if (highlight.size >= MAX_HIGHLIGHT_RANGES) break;
|
|
8730
|
+
const range = text.ownerDocument.createRange();
|
|
8731
|
+
range.setStart(text, match.start);
|
|
8732
|
+
range.setEnd(text, match.end);
|
|
8733
|
+
highlight.add(range);
|
|
8734
|
+
ranges.push(range);
|
|
8735
|
+
}
|
|
8736
|
+
onCleanup(() => {
|
|
8737
|
+
for (const range of ranges) highlight.delete(range);
|
|
8738
|
+
});
|
|
8739
|
+
});
|
|
8740
|
+
return text;
|
|
8741
|
+
}
|
|
8742
|
+
/**
|
|
8205
8743
|
* Checks whether a value is iterable.
|
|
8206
8744
|
* @param x - The value to check.
|
|
8207
8745
|
* @returns `true` if `x` has a `Symbol.iterator` method.
|
|
@@ -8224,66 +8762,133 @@ function Explorer(props) {
|
|
|
8224
8762
|
});
|
|
8225
8763
|
const queryClient = useQueryDevtoolsContext().client;
|
|
8226
8764
|
const [expanded, setExpanded] = createSignal((props.defaultExpanded || []).includes(props.label));
|
|
8227
|
-
const
|
|
8765
|
+
const hasSearchMatchingChild = () => !!props.search && [...props.search.match.children.values()].some((child) => child.hasMatch);
|
|
8766
|
+
const isExpanded = () => expanded() || hasSearchMatchingChild();
|
|
8767
|
+
const toggleExpanded = () => {
|
|
8768
|
+
if (!hasSearchMatchingChild()) setExpanded((old) => !old);
|
|
8769
|
+
};
|
|
8228
8770
|
const [expandedPages, setExpandedPages] = createSignal([]);
|
|
8771
|
+
const nativeObjectType = createMemo(() => getNativeObjectType(props.value));
|
|
8772
|
+
const childrenEditable = createMemo(() => props.editable && (Array.isArray(props.value) || nativeObjectType() === "Map" || nativeObjectType() === "Set" || isPlainObject(props.value)));
|
|
8229
8773
|
const subEntries = createMemo(() => {
|
|
8774
|
+
if (props.search) return props.search.match.kind === "branch" ? searchEntries(props.value) ?? [] : [];
|
|
8230
8775
|
if (Array.isArray(props.value)) return props.value.map((d, i) => ({
|
|
8231
8776
|
label: i.toString(),
|
|
8777
|
+
key: i.toString(),
|
|
8232
8778
|
value: d
|
|
8233
8779
|
}));
|
|
8234
|
-
else if (
|
|
8235
|
-
|
|
8236
|
-
|
|
8237
|
-
|
|
8238
|
-
|
|
8239
|
-
|
|
8240
|
-
|
|
8241
|
-
|
|
8242
|
-
|
|
8243
|
-
}
|
|
8780
|
+
else if (nativeObjectType() === "Map") return Array.from(Map.prototype.entries.call(props.value), ([key, val]) => ({
|
|
8781
|
+
label: primitiveText(key) ?? "[Object key]",
|
|
8782
|
+
key,
|
|
8783
|
+
value: val
|
|
8784
|
+
}));
|
|
8785
|
+
else if (nativeObjectType() === "Set") return Array.from(Set.prototype.values.call(props.value), (val, i) => ({
|
|
8786
|
+
label: i.toString(),
|
|
8787
|
+
key: i.toString(),
|
|
8788
|
+
value: val
|
|
8789
|
+
}));
|
|
8790
|
+
else if (props.value !== null && typeof props.value === "object" && isIterable(props.value) && typeof props.value[Symbol.iterator] === "function") return Array.from(props.value, (val, i) => ({
|
|
8791
|
+
label: i.toString(),
|
|
8792
|
+
key: i.toString(),
|
|
8793
|
+
value: val
|
|
8794
|
+
}));
|
|
8795
|
+
else if (typeof props.value === "object" && props.value !== null) return Object.entries(props.value).map(([key, val]) => ({
|
|
8244
8796
|
label: key,
|
|
8797
|
+
key,
|
|
8245
8798
|
value: val
|
|
8246
8799
|
}));
|
|
8247
8800
|
return [];
|
|
8248
8801
|
});
|
|
8249
8802
|
const type = createMemo(() => {
|
|
8803
|
+
if (props.search) {
|
|
8804
|
+
if (Array.isArray(props.value)) return "array";
|
|
8805
|
+
if (nativeObjectType() === "Map" || nativeObjectType() === "Set") return "Iterable";
|
|
8806
|
+
return props.value === null ? "object" : typeof props.value;
|
|
8807
|
+
}
|
|
8250
8808
|
if (Array.isArray(props.value)) return "array";
|
|
8251
8809
|
else if (props.value !== null && typeof props.value === "object" && isIterable(props.value) && typeof props.value[Symbol.iterator] === "function") return "Iterable";
|
|
8252
8810
|
else if (typeof props.value === "object" && props.value !== null) return "object";
|
|
8253
8811
|
return typeof props.value;
|
|
8254
8812
|
});
|
|
8255
8813
|
const subEntryPages = createMemo(() => chunkArray(subEntries(), 100));
|
|
8814
|
+
const pageHasMatch = (index) => !!(props.search && subEntryPages()[index]?.some((entry) => props.search?.match.children.get(entry.key)?.hasMatch));
|
|
8815
|
+
const matchingPage = createMemo(() => subEntryPages().findIndex((_, index) => pageHasMatch(index)));
|
|
8816
|
+
const isPageExpanded = (index) => expandedPages().includes(index) || matchingPage() === index;
|
|
8817
|
+
const childSearch = (key) => {
|
|
8818
|
+
const search = props.search;
|
|
8819
|
+
const match = search?.match.children.get(key);
|
|
8820
|
+
return search && match ? {
|
|
8821
|
+
term: search.term,
|
|
8822
|
+
match
|
|
8823
|
+
} : void 0;
|
|
8824
|
+
};
|
|
8825
|
+
const label = () => createComponent(HighlightedText, {
|
|
8826
|
+
get text() {
|
|
8827
|
+
return props.label;
|
|
8828
|
+
},
|
|
8829
|
+
get term() {
|
|
8830
|
+
return memo$1(() => !!props.search?.match.label)() ? props.search.term : void 0;
|
|
8831
|
+
},
|
|
8832
|
+
get highlight() {
|
|
8833
|
+
return props.highlight;
|
|
8834
|
+
}
|
|
8835
|
+
});
|
|
8836
|
+
const valueText = () => {
|
|
8837
|
+
if (!props.search) return displayValue(props.value);
|
|
8838
|
+
switch (props.search.match.kind) {
|
|
8839
|
+
case "circular": return "[Circular]";
|
|
8840
|
+
case "accessor": return "[Getter]";
|
|
8841
|
+
case "opaque": return "[Object]";
|
|
8842
|
+
case "branch": return Array.isArray(props.value) ? "[]" : nativeObjectType() === "Map" ? "Map(0)" : nativeObjectType() === "Set" ? "Set(0)" : "{}";
|
|
8843
|
+
case "value": return primitiveText(props.value);
|
|
8844
|
+
}
|
|
8845
|
+
};
|
|
8846
|
+
const renderedValue = () => [
|
|
8847
|
+
memo$1(() => props.search && typeof props.value === "string" ? "\"" : ""),
|
|
8848
|
+
createComponent(HighlightedText, {
|
|
8849
|
+
get text() {
|
|
8850
|
+
return valueText() ?? "";
|
|
8851
|
+
},
|
|
8852
|
+
get term() {
|
|
8853
|
+
return memo$1(() => !!props.search?.match.value)() ? props.search.term : void 0;
|
|
8854
|
+
},
|
|
8855
|
+
get highlight() {
|
|
8856
|
+
return props.highlight;
|
|
8857
|
+
}
|
|
8858
|
+
}),
|
|
8859
|
+
memo$1(() => props.search && typeof props.value === "string" ? "\"" : "")
|
|
8860
|
+
];
|
|
8256
8861
|
const currentDataPath = props.dataPath ?? [];
|
|
8257
8862
|
const inputId = createUniqueId();
|
|
8258
8863
|
return (() => {
|
|
8259
|
-
var _el$
|
|
8260
|
-
insert(_el$
|
|
8864
|
+
var _el$1 = _tmpl$9$1();
|
|
8865
|
+
insert(_el$1, createComponent(Show, {
|
|
8261
8866
|
get when() {
|
|
8262
8867
|
return subEntryPages().length;
|
|
8263
8868
|
},
|
|
8264
8869
|
get children() {
|
|
8265
8870
|
return [(() => {
|
|
8266
|
-
var _el$
|
|
8267
|
-
_el$
|
|
8268
|
-
insert(_el$
|
|
8269
|
-
return
|
|
8270
|
-
} }), _el$
|
|
8271
|
-
insert(_el$
|
|
8272
|
-
insert(_el$
|
|
8273
|
-
insert(_el$
|
|
8274
|
-
insert(_el$
|
|
8275
|
-
insert(_el$
|
|
8871
|
+
var _el$10 = _tmpl$0$1(), _el$11 = _el$10.firstChild, _el$12 = _el$11.firstChild, _el$13 = _el$12.nextSibling, _el$15 = _el$13.nextSibling.nextSibling, _el$16 = _el$15.firstChild;
|
|
8872
|
+
_el$11.$$click = () => toggleExpanded();
|
|
8873
|
+
insert(_el$11, createComponent(Expander, { get expanded() {
|
|
8874
|
+
return isExpanded();
|
|
8875
|
+
} }), _el$12);
|
|
8876
|
+
insert(_el$13, label);
|
|
8877
|
+
insert(_el$15, () => String(type()).toLowerCase() === "iterable" ? "(Iterable) " : "", _el$16);
|
|
8878
|
+
insert(_el$15, () => subEntries().length, _el$16);
|
|
8879
|
+
insert(_el$15, () => subEntries().length > 1 ? `items` : `item`, null);
|
|
8880
|
+
insert(_el$10, createComponent(Show, {
|
|
8276
8881
|
get when() {
|
|
8277
8882
|
return props.editable;
|
|
8278
8883
|
},
|
|
8279
8884
|
get children() {
|
|
8280
|
-
var _el$
|
|
8281
|
-
insert(_el$
|
|
8885
|
+
var _el$17 = _tmpl$9$1();
|
|
8886
|
+
insert(_el$17, createComponent(CopyButton, { get value() {
|
|
8282
8887
|
return props.value;
|
|
8283
8888
|
} }), null);
|
|
8284
|
-
insert(_el$
|
|
8889
|
+
insert(_el$17, createComponent(Show, {
|
|
8285
8890
|
get when() {
|
|
8286
|
-
return memo(() => !!props.itemsDeletable)() && props.activeQuery !== void 0;
|
|
8891
|
+
return memo$1(() => !!props.itemsDeletable)() && props.activeQuery !== void 0;
|
|
8287
8892
|
},
|
|
8288
8893
|
get children() {
|
|
8289
8894
|
return createComponent(DeleteItemButton, {
|
|
@@ -8294,9 +8899,9 @@ function Explorer(props) {
|
|
|
8294
8899
|
});
|
|
8295
8900
|
}
|
|
8296
8901
|
}), null);
|
|
8297
|
-
insert(_el$
|
|
8902
|
+
insert(_el$17, createComponent(Show, {
|
|
8298
8903
|
get when() {
|
|
8299
|
-
return memo(() => type() === "array")() && props.activeQuery !== void 0;
|
|
8904
|
+
return memo$1(() => type() === "array")() && props.activeQuery !== void 0;
|
|
8300
8905
|
},
|
|
8301
8906
|
get children() {
|
|
8302
8907
|
return createComponent(ClearArrayButton, {
|
|
@@ -8307,30 +8912,30 @@ function Explorer(props) {
|
|
|
8307
8912
|
});
|
|
8308
8913
|
}
|
|
8309
8914
|
}), null);
|
|
8310
|
-
insert(_el$
|
|
8915
|
+
insert(_el$17, createComponent(Show, {
|
|
8311
8916
|
get when() {
|
|
8312
|
-
return memo(() =>
|
|
8917
|
+
return memo$1(() => !!(!!props.onEdit && !props.search))() && !serialize(props.value).meta;
|
|
8313
8918
|
},
|
|
8314
8919
|
get children() {
|
|
8315
|
-
var _el$
|
|
8316
|
-
_el$
|
|
8920
|
+
var _el$18 = _tmpl$8$1();
|
|
8921
|
+
_el$18.$$click = () => {
|
|
8317
8922
|
props.onEdit?.();
|
|
8318
8923
|
};
|
|
8319
|
-
insert(_el$
|
|
8320
|
-
createRenderEffect(() => className(_el$
|
|
8321
|
-
return _el$
|
|
8924
|
+
insert(_el$18, createComponent(Pencil, {}));
|
|
8925
|
+
createRenderEffect(() => className(_el$18, styles().actionButton));
|
|
8926
|
+
return _el$18;
|
|
8322
8927
|
}
|
|
8323
8928
|
}), null);
|
|
8324
|
-
createRenderEffect(() => className(_el$
|
|
8325
|
-
return _el$
|
|
8929
|
+
createRenderEffect(() => className(_el$17, styles().actions));
|
|
8930
|
+
return _el$17;
|
|
8326
8931
|
}
|
|
8327
8932
|
}), null);
|
|
8328
8933
|
createRenderEffect((_p$) => {
|
|
8329
|
-
var _v$
|
|
8330
|
-
_v$
|
|
8331
|
-
_v$
|
|
8332
|
-
_v$
|
|
8333
|
-
_v$
|
|
8934
|
+
var _v$8 = styles().expanderButtonContainer, _v$9 = styles().expanderButton, _v$0 = isExpanded() ? "true" : "false", _v$1 = styles().info;
|
|
8935
|
+
_v$8 !== _p$.e && className(_el$10, _p$.e = _v$8);
|
|
8936
|
+
_v$9 !== _p$.t && className(_el$11, _p$.t = _v$9);
|
|
8937
|
+
_v$0 !== _p$.a && setAttribute(_el$11, "aria-expanded", _p$.a = _v$0);
|
|
8938
|
+
_v$1 !== _p$.o && className(_el$15, _p$.o = _v$1);
|
|
8334
8939
|
return _p$;
|
|
8335
8940
|
}, {
|
|
8336
8941
|
e: void 0,
|
|
@@ -8338,10 +8943,10 @@ function Explorer(props) {
|
|
|
8338
8943
|
a: void 0,
|
|
8339
8944
|
o: void 0
|
|
8340
8945
|
});
|
|
8341
|
-
return _el$
|
|
8946
|
+
return _el$10;
|
|
8342
8947
|
})(), createComponent(Show, {
|
|
8343
8948
|
get when() {
|
|
8344
|
-
return
|
|
8949
|
+
return isExpanded();
|
|
8345
8950
|
},
|
|
8346
8951
|
get children() {
|
|
8347
8952
|
return [createComponent(Show, {
|
|
@@ -8349,12 +8954,12 @@ function Explorer(props) {
|
|
|
8349
8954
|
return subEntryPages().length === 1;
|
|
8350
8955
|
},
|
|
8351
8956
|
get children() {
|
|
8352
|
-
var _el$
|
|
8353
|
-
insert(_el$
|
|
8957
|
+
var _el$19 = _tmpl$9$1();
|
|
8958
|
+
insert(_el$19, createComponent(Key, {
|
|
8354
8959
|
get each() {
|
|
8355
8960
|
return subEntries();
|
|
8356
8961
|
},
|
|
8357
|
-
by: (item) => item.
|
|
8962
|
+
by: (item) => item.key,
|
|
8358
8963
|
children: (entry) => {
|
|
8359
8964
|
return createComponent(Explorer, {
|
|
8360
8965
|
get defaultExpanded() {
|
|
@@ -8363,14 +8968,20 @@ function Explorer(props) {
|
|
|
8363
8968
|
get label() {
|
|
8364
8969
|
return entry().label;
|
|
8365
8970
|
},
|
|
8971
|
+
get search() {
|
|
8972
|
+
return childSearch(entry().key);
|
|
8973
|
+
},
|
|
8974
|
+
get highlight() {
|
|
8975
|
+
return props.highlight;
|
|
8976
|
+
},
|
|
8366
8977
|
get value() {
|
|
8367
8978
|
return entry().value;
|
|
8368
8979
|
},
|
|
8369
8980
|
get editable() {
|
|
8370
|
-
return
|
|
8981
|
+
return childrenEditable();
|
|
8371
8982
|
},
|
|
8372
8983
|
get dataPath() {
|
|
8373
|
-
return [...currentDataPath, entry().
|
|
8984
|
+
return [...currentDataPath, entry().key];
|
|
8374
8985
|
},
|
|
8375
8986
|
get activeQuery() {
|
|
8376
8987
|
return props.activeQuery;
|
|
@@ -8381,39 +8992,42 @@ function Explorer(props) {
|
|
|
8381
8992
|
});
|
|
8382
8993
|
}
|
|
8383
8994
|
}));
|
|
8384
|
-
createRenderEffect(() => className(_el$
|
|
8385
|
-
return _el$
|
|
8995
|
+
createRenderEffect(() => className(_el$19, styles().subEntry));
|
|
8996
|
+
return _el$19;
|
|
8386
8997
|
}
|
|
8387
8998
|
}), createComponent(Show, {
|
|
8388
8999
|
get when() {
|
|
8389
9000
|
return subEntryPages().length > 1;
|
|
8390
9001
|
},
|
|
8391
9002
|
get children() {
|
|
8392
|
-
var _el$
|
|
8393
|
-
insert(_el$
|
|
9003
|
+
var _el$20 = _tmpl$9$1();
|
|
9004
|
+
insert(_el$20, createComponent(Index, {
|
|
8394
9005
|
get each() {
|
|
8395
9006
|
return subEntryPages();
|
|
8396
9007
|
},
|
|
8397
9008
|
children: (entries, index) => (() => {
|
|
8398
|
-
var _el$
|
|
8399
|
-
_el$
|
|
8400
|
-
_el$
|
|
8401
|
-
|
|
8402
|
-
|
|
8403
|
-
}
|
|
8404
|
-
insert(_el$
|
|
8405
|
-
|
|
8406
|
-
|
|
9009
|
+
var _el$26 = _tmpl$12$1(), _el$27 = _el$26.firstChild, _el$28 = _el$27.firstChild, _el$29 = _el$28.firstChild, _el$32 = _el$29.nextSibling, _el$33 = _el$32.nextSibling.nextSibling;
|
|
9010
|
+
_el$33.nextSibling;
|
|
9011
|
+
_el$28.$$click = () => {
|
|
9012
|
+
if (matchingPage() === index) return;
|
|
9013
|
+
setExpandedPages((old) => old.includes(index) ? old.filter((d) => d !== index) : [...old, index]);
|
|
9014
|
+
};
|
|
9015
|
+
insert(_el$28, createComponent(Expander, { get expanded() {
|
|
9016
|
+
return isPageExpanded(index);
|
|
9017
|
+
} }), _el$29);
|
|
9018
|
+
insert(_el$28, index * 100, _el$32);
|
|
9019
|
+
insert(_el$28, index * 100 + 100 - 1, _el$33);
|
|
9020
|
+
insert(_el$27, createComponent(Show, {
|
|
8407
9021
|
get when() {
|
|
8408
|
-
return
|
|
9022
|
+
return isPageExpanded(index);
|
|
8409
9023
|
},
|
|
8410
9024
|
get children() {
|
|
8411
|
-
var _el$
|
|
8412
|
-
insert(_el$
|
|
9025
|
+
var _el$34 = _tmpl$9$1();
|
|
9026
|
+
insert(_el$34, createComponent(Key, {
|
|
8413
9027
|
get each() {
|
|
8414
9028
|
return entries();
|
|
8415
9029
|
},
|
|
8416
|
-
by: (entry) => entry.
|
|
9030
|
+
by: (entry) => entry.key,
|
|
8417
9031
|
children: (entry) => createComponent(Explorer, {
|
|
8418
9032
|
get defaultExpanded() {
|
|
8419
9033
|
return props.defaultExpanded;
|
|
@@ -8421,96 +9035,108 @@ function Explorer(props) {
|
|
|
8421
9035
|
get label() {
|
|
8422
9036
|
return entry().label;
|
|
8423
9037
|
},
|
|
9038
|
+
get search() {
|
|
9039
|
+
return childSearch(entry().key);
|
|
9040
|
+
},
|
|
9041
|
+
get highlight() {
|
|
9042
|
+
return props.highlight;
|
|
9043
|
+
},
|
|
8424
9044
|
get value() {
|
|
8425
9045
|
return entry().value;
|
|
8426
9046
|
},
|
|
8427
9047
|
get editable() {
|
|
8428
|
-
return
|
|
9048
|
+
return childrenEditable();
|
|
8429
9049
|
},
|
|
8430
9050
|
get dataPath() {
|
|
8431
|
-
return [...currentDataPath, entry().
|
|
9051
|
+
return [...currentDataPath, entry().key];
|
|
8432
9052
|
},
|
|
8433
9053
|
get activeQuery() {
|
|
8434
9054
|
return props.activeQuery;
|
|
8435
9055
|
}
|
|
8436
9056
|
})
|
|
8437
9057
|
}));
|
|
8438
|
-
createRenderEffect(() => className(_el$
|
|
8439
|
-
return _el$
|
|
9058
|
+
createRenderEffect(() => className(_el$34, styles().subEntry));
|
|
9059
|
+
return _el$34;
|
|
8440
9060
|
}
|
|
8441
9061
|
}), null);
|
|
8442
9062
|
createRenderEffect((_p$) => {
|
|
8443
|
-
var _v$
|
|
8444
|
-
_v$
|
|
8445
|
-
_v$
|
|
9063
|
+
var _v$15 = styles().entry, _v$16 = clsx(styles().expanderButton, pageHasMatch(index) && styles().highlight), _v$17 = isPageExpanded(index), _v$18 = pageHasMatch(index) ? "Contains search matches" : void 0;
|
|
9064
|
+
_v$15 !== _p$.e && className(_el$27, _p$.e = _v$15);
|
|
9065
|
+
_v$16 !== _p$.t && className(_el$28, _p$.t = _v$16);
|
|
9066
|
+
_v$17 !== _p$.a && setAttribute(_el$28, "aria-expanded", _p$.a = _v$17);
|
|
9067
|
+
_v$18 !== _p$.o && setAttribute(_el$28, "aria-description", _p$.o = _v$18);
|
|
8446
9068
|
return _p$;
|
|
8447
9069
|
}, {
|
|
8448
9070
|
e: void 0,
|
|
8449
|
-
t: void 0
|
|
9071
|
+
t: void 0,
|
|
9072
|
+
a: void 0,
|
|
9073
|
+
o: void 0
|
|
8450
9074
|
});
|
|
8451
|
-
return _el$
|
|
9075
|
+
return _el$26;
|
|
8452
9076
|
})()
|
|
8453
9077
|
}));
|
|
8454
|
-
createRenderEffect(() => className(_el$
|
|
8455
|
-
return _el$
|
|
9078
|
+
createRenderEffect(() => className(_el$20, styles().subEntry));
|
|
9079
|
+
return _el$20;
|
|
8456
9080
|
}
|
|
8457
9081
|
})];
|
|
8458
9082
|
}
|
|
8459
9083
|
})];
|
|
8460
9084
|
}
|
|
8461
9085
|
}), null);
|
|
8462
|
-
insert(_el$
|
|
9086
|
+
insert(_el$1, createComponent(Show, {
|
|
8463
9087
|
get when() {
|
|
8464
9088
|
return subEntryPages().length === 0;
|
|
8465
9089
|
},
|
|
8466
9090
|
get children() {
|
|
8467
|
-
var _el$
|
|
8468
|
-
setAttribute(_el$
|
|
8469
|
-
insert(_el$
|
|
8470
|
-
insert(_el$
|
|
9091
|
+
var _el$21 = _tmpl$11$1(), _el$22 = _el$21.firstChild, _el$23 = _el$22.firstChild;
|
|
9092
|
+
setAttribute(_el$22, "for", inputId);
|
|
9093
|
+
insert(_el$22, label, _el$23);
|
|
9094
|
+
insert(_el$21, createComponent(Show, {
|
|
8471
9095
|
get when() {
|
|
8472
|
-
return memo(() => !!(props.editable && props.activeQuery !== void 0))() && (type() === "string" || type() === "number" || type() === "boolean");
|
|
9096
|
+
return memo$1(() => !!(props.editable && props.activeQuery !== void 0))() && (type() === "string" || type() === "number" || type() === "boolean");
|
|
8473
9097
|
},
|
|
8474
9098
|
get fallback() {
|
|
8475
9099
|
return (() => {
|
|
8476
|
-
var _el$
|
|
8477
|
-
insert(_el$
|
|
8478
|
-
createRenderEffect(() => className(_el$
|
|
8479
|
-
return _el$
|
|
9100
|
+
var _el$35 = _tmpl$10$1();
|
|
9101
|
+
insert(_el$35, renderedValue);
|
|
9102
|
+
createRenderEffect(() => className(_el$35, styles().value));
|
|
9103
|
+
return _el$35;
|
|
8480
9104
|
})();
|
|
8481
9105
|
},
|
|
8482
9106
|
get children() {
|
|
8483
9107
|
return [createComponent(Show, {
|
|
8484
9108
|
get when() {
|
|
8485
|
-
return memo(() => !!(props.editable && props.activeQuery !== void 0))() && (type() === "string" || type() === "number");
|
|
9109
|
+
return memo$1(() => !!(props.editable && props.activeQuery !== void 0))() && (type() === "string" || type() === "number");
|
|
8486
9110
|
},
|
|
8487
9111
|
get children() {
|
|
8488
|
-
var _el$
|
|
8489
|
-
_el$
|
|
9112
|
+
var _el$24 = _tmpl$1$1();
|
|
9113
|
+
_el$24.addEventListener("change", (changeEvent) => {
|
|
8490
9114
|
const oldData = props.activeQuery.state.data;
|
|
8491
9115
|
const newData = updateNestedDataByPath(oldData, currentDataPath, type() === "number" ? changeEvent.target.valueAsNumber : changeEvent.target.value);
|
|
8492
9116
|
queryClient.setQueryData(props.activeQuery.queryKey, newData);
|
|
8493
9117
|
});
|
|
8494
|
-
setAttribute(_el$
|
|
9118
|
+
setAttribute(_el$24, "id", inputId);
|
|
8495
9119
|
createRenderEffect((_p$) => {
|
|
8496
|
-
var _v$
|
|
8497
|
-
_v$
|
|
8498
|
-
_v$
|
|
9120
|
+
var _v$10 = type() === "number" ? "number" : "text", _v$11 = clsx(styles().value, styles().editableInput, props.search?.match.value && styles().highlight), _v$12 = props.search?.match.value || void 0;
|
|
9121
|
+
_v$10 !== _p$.e && setAttribute(_el$24, "type", _p$.e = _v$10);
|
|
9122
|
+
_v$11 !== _p$.t && className(_el$24, _p$.t = _v$11);
|
|
9123
|
+
_v$12 !== _p$.a && setAttribute(_el$24, "data-search-match", _p$.a = _v$12);
|
|
8499
9124
|
return _p$;
|
|
8500
9125
|
}, {
|
|
8501
9126
|
e: void 0,
|
|
8502
|
-
t: void 0
|
|
9127
|
+
t: void 0,
|
|
9128
|
+
a: void 0
|
|
8503
9129
|
});
|
|
8504
|
-
createRenderEffect(() => _el$
|
|
8505
|
-
return _el$
|
|
9130
|
+
createRenderEffect(() => _el$24.value = props.value);
|
|
9131
|
+
return _el$24;
|
|
8506
9132
|
}
|
|
8507
9133
|
}), createComponent(Show, {
|
|
8508
9134
|
get when() {
|
|
8509
9135
|
return type() === "boolean";
|
|
8510
9136
|
},
|
|
8511
9137
|
get children() {
|
|
8512
|
-
var _el$
|
|
8513
|
-
insert(_el$
|
|
9138
|
+
var _el$25 = _tmpl$10$1();
|
|
9139
|
+
insert(_el$25, createComponent(ToggleValueButton, {
|
|
8514
9140
|
get activeQuery() {
|
|
8515
9141
|
return props.activeQuery;
|
|
8516
9142
|
},
|
|
@@ -8519,16 +9145,16 @@ function Explorer(props) {
|
|
|
8519
9145
|
return props.value;
|
|
8520
9146
|
}
|
|
8521
9147
|
}), null);
|
|
8522
|
-
insert(_el$
|
|
8523
|
-
createRenderEffect(() => className(_el$
|
|
8524
|
-
return _el$
|
|
9148
|
+
insert(_el$25, renderedValue, null);
|
|
9149
|
+
createRenderEffect(() => className(_el$25, clsx(styles().value, styles().actions, styles().editableInput)));
|
|
9150
|
+
return _el$25;
|
|
8525
9151
|
}
|
|
8526
9152
|
})];
|
|
8527
9153
|
}
|
|
8528
9154
|
}), null);
|
|
8529
|
-
insert(_el$
|
|
9155
|
+
insert(_el$21, createComponent(Show, {
|
|
8530
9156
|
get when() {
|
|
8531
|
-
return memo(() => !!(props.editable && props.itemsDeletable))() && props.activeQuery !== void 0;
|
|
9157
|
+
return memo$1(() => !!(props.editable && props.itemsDeletable))() && props.activeQuery !== void 0;
|
|
8532
9158
|
},
|
|
8533
9159
|
get children() {
|
|
8534
9160
|
return createComponent(DeleteItemButton, {
|
|
@@ -8540,25 +9166,51 @@ function Explorer(props) {
|
|
|
8540
9166
|
}
|
|
8541
9167
|
}), null);
|
|
8542
9168
|
createRenderEffect((_p$) => {
|
|
8543
|
-
var _v$
|
|
8544
|
-
_v$
|
|
8545
|
-
_v$
|
|
9169
|
+
var _v$13 = styles().row, _v$14 = styles().label;
|
|
9170
|
+
_v$13 !== _p$.e && className(_el$21, _p$.e = _v$13);
|
|
9171
|
+
_v$14 !== _p$.t && className(_el$22, _p$.t = _v$14);
|
|
8546
9172
|
return _p$;
|
|
8547
9173
|
}, {
|
|
8548
9174
|
e: void 0,
|
|
8549
9175
|
t: void 0
|
|
8550
9176
|
});
|
|
8551
|
-
return _el$
|
|
9177
|
+
return _el$21;
|
|
8552
9178
|
}
|
|
8553
9179
|
}), null);
|
|
8554
|
-
createRenderEffect(() => className(_el$
|
|
8555
|
-
return _el$
|
|
9180
|
+
createRenderEffect(() => className(_el$1, styles().entry));
|
|
9181
|
+
return _el$1;
|
|
8556
9182
|
})();
|
|
8557
9183
|
}
|
|
8558
9184
|
const stylesFactory$1 = (theme, css) => {
|
|
8559
9185
|
const { colors, font, size, border } = tokens;
|
|
8560
9186
|
const t = (light, dark) => theme === "light" ? light : dark;
|
|
8561
9187
|
return {
|
|
9188
|
+
search: css`
|
|
9189
|
+
display: flex;
|
|
9190
|
+
gap: ${size[2]};
|
|
9191
|
+
margin-bottom: ${size[2]};
|
|
9192
|
+
`,
|
|
9193
|
+
searchInput: css`
|
|
9194
|
+
min-width: 0;
|
|
9195
|
+
flex: 1;
|
|
9196
|
+
padding: ${size[1]} ${size[2]};
|
|
9197
|
+
color: inherit;
|
|
9198
|
+
background: ${t(colors.gray[100], colors.darkGray[600])};
|
|
9199
|
+
border: 1px solid ${t(colors.gray[300], colors.darkGray[400])};
|
|
9200
|
+
border-radius: ${border.radius.xs};
|
|
9201
|
+
`,
|
|
9202
|
+
clearSearch: css`
|
|
9203
|
+
color: inherit;
|
|
9204
|
+
background: transparent;
|
|
9205
|
+
border: none;
|
|
9206
|
+
cursor: pointer;
|
|
9207
|
+
`,
|
|
9208
|
+
highlight: css`
|
|
9209
|
+
&& {
|
|
9210
|
+
color: ${t(colors.gray[900], colors.gray[100])};
|
|
9211
|
+
background-color: ${t(colors.yellow[200], colors.yellow[900])};
|
|
9212
|
+
}
|
|
9213
|
+
`,
|
|
8562
9214
|
entry: css`
|
|
8563
9215
|
& * {
|
|
8564
9216
|
font-size: ${font.size.xs};
|
|
@@ -8687,7 +9339,1684 @@ const stylesFactory$1 = (theme, css) => {
|
|
|
8687
9339
|
};
|
|
8688
9340
|
const lightStyles$1 = (css) => stylesFactory$1("light", css);
|
|
8689
9341
|
const darkStyles$1 = (css) => stylesFactory$1("dark", css);
|
|
8690
|
-
delegateEvents([
|
|
9342
|
+
delegateEvents([
|
|
9343
|
+
"click",
|
|
9344
|
+
"input",
|
|
9345
|
+
"keydown"
|
|
9346
|
+
]);
|
|
9347
|
+
// ../../node_modules/.pnpm/@tanstack+virtual-core@3.19.10/node_modules/@tanstack/virtual-core/dist/esm/lazy-measurements.js
|
|
9348
|
+
function getMeasurementKey(item) {
|
|
9349
|
+
return typeof item === "object" ? item.key : item;
|
|
9350
|
+
}
|
|
9351
|
+
function createLazyMeasurementsView(cache, flat) {
|
|
9352
|
+
const count = cache.length;
|
|
9353
|
+
return new Proxy(cache, { get(target, prop, receiver) {
|
|
9354
|
+
if (typeof prop === "string") {
|
|
9355
|
+
const c = prop.charCodeAt(0);
|
|
9356
|
+
if (c >= 48 && c <= 57) {
|
|
9357
|
+
const i = +prop;
|
|
9358
|
+
if (Number.isInteger(i) && i >= 0 && i < count) {
|
|
9359
|
+
let v = target[i];
|
|
9360
|
+
if (typeof v !== "object") {
|
|
9361
|
+
const s = flat[i * 2];
|
|
9362
|
+
v = target[i] = {
|
|
9363
|
+
index: i,
|
|
9364
|
+
key: v,
|
|
9365
|
+
start: s,
|
|
9366
|
+
size: flat[i * 2 + 1],
|
|
9367
|
+
end: s + flat[i * 2 + 1],
|
|
9368
|
+
lane: 0
|
|
9369
|
+
};
|
|
9370
|
+
}
|
|
9371
|
+
return v;
|
|
9372
|
+
}
|
|
9373
|
+
}
|
|
9374
|
+
if (prop === "length") return count;
|
|
9375
|
+
}
|
|
9376
|
+
return Reflect.get(target, prop, receiver);
|
|
9377
|
+
} });
|
|
9378
|
+
}
|
|
9379
|
+
// ../../node_modules/.pnpm/@tanstack+virtual-core@3.19.10/node_modules/@tanstack/virtual-core/dist/esm/utils.js
|
|
9380
|
+
function memo(getDeps, fn, opts) {
|
|
9381
|
+
let deps = opts.initialDeps ?? [];
|
|
9382
|
+
let result;
|
|
9383
|
+
let isInitial = true;
|
|
9384
|
+
function memoizedFunction() {
|
|
9385
|
+
var _a;
|
|
9386
|
+
const debugEnabled = !!opts.key && !!((_a = opts.debug) == null ? void 0 : _a.call(opts));
|
|
9387
|
+
let depTime = 0;
|
|
9388
|
+
if (debugEnabled) depTime = Date.now();
|
|
9389
|
+
const newDeps = getDeps();
|
|
9390
|
+
if (!(newDeps.length !== deps.length || newDeps.some((dep, index) => deps[index] !== dep))) return result;
|
|
9391
|
+
deps = newDeps;
|
|
9392
|
+
let resultTime = 0;
|
|
9393
|
+
if (debugEnabled) resultTime = Date.now();
|
|
9394
|
+
result = fn(...newDeps);
|
|
9395
|
+
if (debugEnabled) {
|
|
9396
|
+
const depEndTime = Math.round((Date.now() - depTime) * 100) / 100;
|
|
9397
|
+
const resultEndTime = Math.round((Date.now() - resultTime) * 100) / 100;
|
|
9398
|
+
const resultFpsPercentage = resultEndTime / 16;
|
|
9399
|
+
const pad = (str, num) => {
|
|
9400
|
+
str = String(str);
|
|
9401
|
+
while (str.length < num) str = " " + str;
|
|
9402
|
+
return str;
|
|
9403
|
+
};
|
|
9404
|
+
console.info(`%c⏱ ${pad(resultEndTime, 5)} /${pad(depEndTime, 5)} ms`, `
|
|
9405
|
+
font-size: .6rem;
|
|
9406
|
+
font-weight: bold;
|
|
9407
|
+
color: hsl(${Math.max(0, Math.min(120 - 120 * resultFpsPercentage, 120))}deg 100% 31%);`, opts == null ? void 0 : opts.key);
|
|
9408
|
+
}
|
|
9409
|
+
if ((opts == null ? void 0 : opts.onChange) && !(isInitial && opts.skipInitialOnChange)) opts.onChange(result);
|
|
9410
|
+
isInitial = false;
|
|
9411
|
+
return result;
|
|
9412
|
+
}
|
|
9413
|
+
memoizedFunction.updateDeps = (newDeps) => {
|
|
9414
|
+
deps = newDeps;
|
|
9415
|
+
};
|
|
9416
|
+
return memoizedFunction;
|
|
9417
|
+
}
|
|
9418
|
+
function notUndefined(value, msg) {
|
|
9419
|
+
if (value === void 0) throw new Error(`Unexpected undefined${msg ? `: ${msg}` : ""}`);
|
|
9420
|
+
else return value;
|
|
9421
|
+
}
|
|
9422
|
+
const approxEqual = (a, b) => Math.abs(a - b) < 1.01;
|
|
9423
|
+
const debounce = (targetWindow, fn, ms) => {
|
|
9424
|
+
let timeoutId;
|
|
9425
|
+
return Object.assign(function(...args) {
|
|
9426
|
+
targetWindow.clearTimeout(timeoutId);
|
|
9427
|
+
timeoutId = targetWindow.setTimeout(() => fn.apply(this, args), ms);
|
|
9428
|
+
}, { cancel: () => {
|
|
9429
|
+
targetWindow.clearTimeout(timeoutId);
|
|
9430
|
+
} });
|
|
9431
|
+
};
|
|
9432
|
+
// ../../node_modules/.pnpm/@tanstack+virtual-core@3.19.10/node_modules/@tanstack/virtual-core/dist/esm/scroll-classifier.js
|
|
9433
|
+
function classifyScrollEvent({ offset, isScrolling, elementMax, holdOffset, scrollOffset, pendingWrite, clampedMaxAtWrite }) {
|
|
9434
|
+
var _a;
|
|
9435
|
+
if (isScrolling && pendingWrite === null && offset === scrollOffset) return "spurious";
|
|
9436
|
+
if (pendingWrite !== null && Math.abs(offset - pendingWrite.target) < 1.5) return "readBack";
|
|
9437
|
+
if (pendingWrite !== null && !pendingWrite.smooth && elementMax !== null && pendingWrite.target > elementMax + holdOffset + .5 && Math.abs(offset - (elementMax + holdOffset)) < 1.5) return "clampedReadBack";
|
|
9438
|
+
if (pendingWrite !== null && !pendingWrite.smooth && ((_a = pendingWrite.lowMaxes) == null ? void 0 : _a.some((max) => Math.abs(offset - max) < 1.5))) return "clampedReadBack";
|
|
9439
|
+
if (clampedMaxAtWrite !== null && Math.abs(offset - clampedMaxAtWrite) < 1.5) return "clampedEcho";
|
|
9440
|
+
return "external";
|
|
9441
|
+
}
|
|
9442
|
+
const isAnimating = (phase) => phase === "smooth" || phase === "smoothFinishing";
|
|
9443
|
+
function externalRetiresCommand({ kind, offset, command, target }) {
|
|
9444
|
+
return kind !== "spurious" && kind !== "readBack" && kind !== "clampedReadBack" && (command == null ? void 0 : command.index) != null && command.phase !== "queued" && !isAnimating(command.phase) && !approxEqual(offset, command.lastTargetOffset) && !approxEqual(offset, target()) && kind !== "clampedEcho";
|
|
9445
|
+
}
|
|
9446
|
+
const FLING_WINDOW_MS = 40;
|
|
9447
|
+
function flingSpedUp(samples) {
|
|
9448
|
+
const last = samples[samples.length - 1];
|
|
9449
|
+
if (last === void 0) return false;
|
|
9450
|
+
let j = samples.length - 2;
|
|
9451
|
+
while (j >= 0 && last.t - samples[j].t < FLING_WINDOW_MS) j--;
|
|
9452
|
+
if (j < 0) return false;
|
|
9453
|
+
const mid = samples[j];
|
|
9454
|
+
let k = j - 1;
|
|
9455
|
+
while (k >= 0 && mid.t - samples[k].t < FLING_WINDOW_MS) k--;
|
|
9456
|
+
if (k < 0) return false;
|
|
9457
|
+
const first = samples[k];
|
|
9458
|
+
const recent = (last.offset - mid.offset) / (last.t - mid.t);
|
|
9459
|
+
const before = (mid.offset - first.offset) / (mid.t - first.t);
|
|
9460
|
+
return recent * before >= 0 && Math.abs(recent) >= 2 * Math.abs(before) && Math.abs(recent) - Math.abs(before) >= .8;
|
|
9461
|
+
}
|
|
9462
|
+
function flingCaught(samples) {
|
|
9463
|
+
const last = samples[samples.length - 1];
|
|
9464
|
+
if (last === void 0) return false;
|
|
9465
|
+
let j = samples.length - 2;
|
|
9466
|
+
while (j >= 0 && last.t - samples[j].t < FLING_WINDOW_MS) j--;
|
|
9467
|
+
if (j < 0) return false;
|
|
9468
|
+
const from = samples[j];
|
|
9469
|
+
return Math.abs(last.offset - from.offset) / (last.t - from.t) >= .05;
|
|
9470
|
+
}
|
|
9471
|
+
// ../../node_modules/.pnpm/@tanstack+virtual-core@3.19.10/node_modules/@tanstack/virtual-core/dist/esm/ios-gesture.js
|
|
9472
|
+
let _isIOSResult;
|
|
9473
|
+
const isIOSWebKit = () => {
|
|
9474
|
+
if (_isIOSResult !== void 0) return _isIOSResult;
|
|
9475
|
+
if (typeof navigator === "undefined") return _isIOSResult = false;
|
|
9476
|
+
if (/iP(hone|od|ad)/.test(navigator.userAgent)) return _isIOSResult = true;
|
|
9477
|
+
const mtp = navigator.maxTouchPoints;
|
|
9478
|
+
return _isIOSResult = navigator.platform === "MacIntel" && mtp !== void 0 && mtp > 0;
|
|
9479
|
+
};
|
|
9480
|
+
let _iosMomentumOverridesWritesResult;
|
|
9481
|
+
const iosMomentumOverridesWrites = () => {
|
|
9482
|
+
if (_iosMomentumOverridesWritesResult !== void 0) return _iosMomentumOverridesWritesResult;
|
|
9483
|
+
return _iosMomentumOverridesWritesResult = isIOSWebKit() && typeof CSS !== "undefined" && typeof CSS.supports === "function" && CSS.supports("overflow-anchor: auto");
|
|
9484
|
+
};
|
|
9485
|
+
const momentumOverridesWrites = () => !isIOSWebKit() || iosMomentumOverridesWrites();
|
|
9486
|
+
const touchListenerOptions = {
|
|
9487
|
+
capture: true,
|
|
9488
|
+
passive: true
|
|
9489
|
+
};
|
|
9490
|
+
var IosGesture = class {
|
|
9491
|
+
constructor(host) {
|
|
9492
|
+
this.host = host;
|
|
9493
|
+
this._touch = null;
|
|
9494
|
+
this.inMotion = () => this._touch !== null && this._touch.phase !== "lateFling";
|
|
9495
|
+
this.dragging = () => {
|
|
9496
|
+
var _a;
|
|
9497
|
+
return ((_a = this._touch) == null ? void 0 : _a.phase) === "down" && this._touch.moved;
|
|
9498
|
+
};
|
|
9499
|
+
this.tail = () => {
|
|
9500
|
+
var _a;
|
|
9501
|
+
return ((_a = this._touch) == null ? void 0 : _a.phase) === "tail" ? this._touch.moved ? "fling" : "tap" : null;
|
|
9502
|
+
};
|
|
9503
|
+
this.onScroll = ({ isScrolling, ownReadBack, moved, external }) => {
|
|
9504
|
+
var _a, _b, _c;
|
|
9505
|
+
if (isScrolling && ((_a = this._touch) == null ? void 0 : _a.phase) === "tail") this._openTail(this._touch.moved || !ownReadBack, false);
|
|
9506
|
+
else if (((_b = this._touch) == null ? void 0 : _b.phase) === "lateFling") {
|
|
9507
|
+
if (this.host.now() > this._touch.until) this._touch = null;
|
|
9508
|
+
else if (external && isScrolling && moved) this._openTail(true, false);
|
|
9509
|
+
}
|
|
9510
|
+
if (!ownReadBack && isScrolling && moved && ((_c = this._touch) == null ? void 0 : _c.phase) === "down") {
|
|
9511
|
+
this._touch.moved = true;
|
|
9512
|
+
return true;
|
|
9513
|
+
}
|
|
9514
|
+
return false;
|
|
9515
|
+
};
|
|
9516
|
+
this.touchStart = () => {
|
|
9517
|
+
this.end();
|
|
9518
|
+
this._touch = {
|
|
9519
|
+
phase: "down",
|
|
9520
|
+
moved: false
|
|
9521
|
+
};
|
|
9522
|
+
};
|
|
9523
|
+
this.touchEnd = () => {
|
|
9524
|
+
var _a;
|
|
9525
|
+
const moved = ((_a = this._touch) == null ? void 0 : _a.phase) === "down" && this._touch.moved;
|
|
9526
|
+
this.end();
|
|
9527
|
+
this._openTail(moved, moved);
|
|
9528
|
+
};
|
|
9529
|
+
this.end = () => {
|
|
9530
|
+
var _a;
|
|
9531
|
+
const win = this.host.getWindow();
|
|
9532
|
+
if (((_a = this._touch) == null ? void 0 : _a.phase) === "tail" && win != null) win.clearTimeout(this._touch.timerId);
|
|
9533
|
+
this._touch = null;
|
|
9534
|
+
};
|
|
9535
|
+
this.listen = (target) => {
|
|
9536
|
+
const onTouchStart = () => this.touchStart();
|
|
9537
|
+
const onTouchEnd = () => this.touchEnd();
|
|
9538
|
+
target.addEventListener("touchstart", onTouchStart, touchListenerOptions);
|
|
9539
|
+
target.addEventListener("touchend", onTouchEnd, touchListenerOptions);
|
|
9540
|
+
target.addEventListener("touchcancel", onTouchEnd, touchListenerOptions);
|
|
9541
|
+
return () => {
|
|
9542
|
+
target.removeEventListener("touchstart", onTouchStart, touchListenerOptions);
|
|
9543
|
+
target.removeEventListener("touchend", onTouchEnd, touchListenerOptions);
|
|
9544
|
+
target.removeEventListener("touchcancel", onTouchEnd, touchListenerOptions);
|
|
9545
|
+
this.end();
|
|
9546
|
+
};
|
|
9547
|
+
};
|
|
9548
|
+
this._openTail = (moved, awaitingFling) => {
|
|
9549
|
+
const win = this.host.getWindow();
|
|
9550
|
+
if (win == null) return;
|
|
9551
|
+
this.end();
|
|
9552
|
+
const tail = {
|
|
9553
|
+
phase: "tail",
|
|
9554
|
+
moved,
|
|
9555
|
+
awaitingFling,
|
|
9556
|
+
timerId: win.setTimeout(() => {
|
|
9557
|
+
if (this.host.tailStillMoving()) {
|
|
9558
|
+
this._openTail(tail.moved, tail.awaitingFling);
|
|
9559
|
+
return;
|
|
9560
|
+
}
|
|
9561
|
+
this._touch = tail.awaitingFling ? {
|
|
9562
|
+
phase: "lateFling",
|
|
9563
|
+
until: this.host.now() + 1e3
|
|
9564
|
+
} : null;
|
|
9565
|
+
this.host.onTailClosed();
|
|
9566
|
+
}, 150)
|
|
9567
|
+
};
|
|
9568
|
+
this._touch = tail;
|
|
9569
|
+
};
|
|
9570
|
+
}
|
|
9571
|
+
get touch() {
|
|
9572
|
+
return this._touch;
|
|
9573
|
+
}
|
|
9574
|
+
};
|
|
9575
|
+
// ../../node_modules/.pnpm/@tanstack+virtual-core@3.19.10/node_modules/@tanstack/virtual-core/dist/esm/index.js
|
|
9576
|
+
const getRect = (element) => {
|
|
9577
|
+
const { clientWidth, clientHeight } = element;
|
|
9578
|
+
return {
|
|
9579
|
+
width: clientWidth,
|
|
9580
|
+
height: clientHeight
|
|
9581
|
+
};
|
|
9582
|
+
};
|
|
9583
|
+
const createFrameQueue = (targetWindow) => {
|
|
9584
|
+
const ids = /* @__PURE__ */ new Set();
|
|
9585
|
+
return {
|
|
9586
|
+
schedule: (fn) => {
|
|
9587
|
+
const id = targetWindow.requestAnimationFrame(() => {
|
|
9588
|
+
ids.delete(id);
|
|
9589
|
+
fn();
|
|
9590
|
+
});
|
|
9591
|
+
ids.add(id);
|
|
9592
|
+
},
|
|
9593
|
+
cancel: () => {
|
|
9594
|
+
ids.forEach((id) => targetWindow.cancelAnimationFrame(id));
|
|
9595
|
+
ids.clear();
|
|
9596
|
+
}
|
|
9597
|
+
};
|
|
9598
|
+
};
|
|
9599
|
+
const defaultKeyExtractor = (index) => index;
|
|
9600
|
+
const defaultRangeExtractor = (range) => {
|
|
9601
|
+
const overscan = range.overscan * Math.max(range.lanes ?? 1, 1);
|
|
9602
|
+
const start = Math.max(range.startIndex - overscan, 0);
|
|
9603
|
+
const len = Math.min(range.endIndex + overscan, range.count - 1) - start + 1;
|
|
9604
|
+
const arr = new Array(len);
|
|
9605
|
+
for (let i = 0; i < len; i++) arr[i] = start + i;
|
|
9606
|
+
return arr;
|
|
9607
|
+
};
|
|
9608
|
+
const observeElementRect = (instance, cb) => {
|
|
9609
|
+
const element = instance.scrollElement;
|
|
9610
|
+
if (!element) return;
|
|
9611
|
+
const targetWindow = instance.targetWindow;
|
|
9612
|
+
if (!targetWindow) return;
|
|
9613
|
+
const handler = (rect) => {
|
|
9614
|
+
const { width, height } = rect;
|
|
9615
|
+
cb({
|
|
9616
|
+
width: Math.round(width),
|
|
9617
|
+
height: Math.round(height)
|
|
9618
|
+
});
|
|
9619
|
+
};
|
|
9620
|
+
handler(getRect(element));
|
|
9621
|
+
if (!targetWindow.ResizeObserver) return () => {};
|
|
9622
|
+
const frames = createFrameQueue(targetWindow);
|
|
9623
|
+
const observer = new targetWindow.ResizeObserver(() => {
|
|
9624
|
+
const run = () => {
|
|
9625
|
+
handler(getRect(element));
|
|
9626
|
+
};
|
|
9627
|
+
instance.options.useAnimationFrameWithResizeObserver ? frames.schedule(run) : run();
|
|
9628
|
+
});
|
|
9629
|
+
observer.observe(element, { box: "content-box" });
|
|
9630
|
+
return () => {
|
|
9631
|
+
observer.unobserve(element);
|
|
9632
|
+
frames.cancel();
|
|
9633
|
+
};
|
|
9634
|
+
};
|
|
9635
|
+
const addEventListenerOptions = { passive: true };
|
|
9636
|
+
const supportsScrollend = typeof window == "undefined" ? true : "onscrollend" in window;
|
|
9637
|
+
const observeOffset = (instance, cb, readOffset) => {
|
|
9638
|
+
const element = instance.scrollElement;
|
|
9639
|
+
if (!element) return;
|
|
9640
|
+
const targetWindow = instance.targetWindow;
|
|
9641
|
+
if (!targetWindow) return;
|
|
9642
|
+
const registerScrollendEvent = instance.options.useScrollendEvent && supportsScrollend;
|
|
9643
|
+
let offset = 0;
|
|
9644
|
+
const fallback = registerScrollendEvent ? null : debounce(targetWindow, () => cb(readOffset(element), false), instance.options.isScrollingResetDelay);
|
|
9645
|
+
const createHandler = (isScrolling) => () => {
|
|
9646
|
+
offset = readOffset(element);
|
|
9647
|
+
fallback?.();
|
|
9648
|
+
cb(offset, isScrolling);
|
|
9649
|
+
};
|
|
9650
|
+
const handler = createHandler(true);
|
|
9651
|
+
const endHandler = createHandler(false);
|
|
9652
|
+
element.addEventListener("scroll", handler, addEventListenerOptions);
|
|
9653
|
+
if (registerScrollendEvent) element.addEventListener("scrollend", endHandler, addEventListenerOptions);
|
|
9654
|
+
return () => {
|
|
9655
|
+
element.removeEventListener("scroll", handler);
|
|
9656
|
+
if (registerScrollendEvent) element.removeEventListener("scrollend", endHandler);
|
|
9657
|
+
fallback?.cancel();
|
|
9658
|
+
};
|
|
9659
|
+
};
|
|
9660
|
+
const observeElementOffset = (instance, cb) => observeOffset(instance, cb, (el) => {
|
|
9661
|
+
const { horizontal, isRtl } = instance.options;
|
|
9662
|
+
return horizontal ? el.scrollLeft * (isRtl && -1 || 1) : el.scrollTop;
|
|
9663
|
+
});
|
|
9664
|
+
const measureElement = (element, entry, instance) => {
|
|
9665
|
+
if (instance.options.useCachedMeasurements) {
|
|
9666
|
+
const index = instance.indexFromElement(element);
|
|
9667
|
+
const key = instance.options.getItemKey(index);
|
|
9668
|
+
return instance.itemSizeCache.get(key) ?? instance.options.estimateSize(index);
|
|
9669
|
+
}
|
|
9670
|
+
if (entry == null ? void 0 : entry.borderBoxSize) {
|
|
9671
|
+
const box = entry.borderBoxSize[0];
|
|
9672
|
+
if (box) return Math.round(box[instance.options.horizontal ? "inlineSize" : "blockSize"]);
|
|
9673
|
+
}
|
|
9674
|
+
if (!entry) {
|
|
9675
|
+
const index = instance.indexFromElement(element);
|
|
9676
|
+
const key = instance.options.getItemKey(index);
|
|
9677
|
+
const cachedSize = instance.itemSizeCache.get(key);
|
|
9678
|
+
if (cachedSize !== void 0) return cachedSize;
|
|
9679
|
+
}
|
|
9680
|
+
return element[instance.options.horizontal ? "offsetWidth" : "offsetHeight"];
|
|
9681
|
+
};
|
|
9682
|
+
const scrollWithAdjustments = (offset, { adjustments = 0, behavior }, instance) => {
|
|
9683
|
+
var _a, _b;
|
|
9684
|
+
(_b = (_a = instance.scrollElement) == null ? void 0 : _a.scrollTo) == null || _b.call(_a, {
|
|
9685
|
+
[instance.options.horizontal ? "left" : "top"]: offset + adjustments,
|
|
9686
|
+
behavior
|
|
9687
|
+
});
|
|
9688
|
+
};
|
|
9689
|
+
const elementScroll = scrollWithAdjustments;
|
|
9690
|
+
const initialScrollPhase = (behavior, atTarget) => behavior === "smooth" ? atTarget ? "smoothLanded" : "smooth" : "instant";
|
|
9691
|
+
const isSmoothScroll = (state) => (state == null ? void 0 : state.phase) === "smooth" || (state == null ? void 0 : state.phase) === "smoothLanded";
|
|
9692
|
+
function isAppendWithTrim(prevCount, nextCount, getPreviousKey, getNextKey) {
|
|
9693
|
+
if (nextCount === 0) return false;
|
|
9694
|
+
const firstKey = getNextKey(0);
|
|
9695
|
+
const removedKeys = /* @__PURE__ */ new Set();
|
|
9696
|
+
let removedCount = 0;
|
|
9697
|
+
while (removedCount < prevCount) {
|
|
9698
|
+
const key = getPreviousKey(removedCount);
|
|
9699
|
+
if (key === firstKey) break;
|
|
9700
|
+
removedKeys.add(key);
|
|
9701
|
+
removedCount++;
|
|
9702
|
+
}
|
|
9703
|
+
const retainedCount = prevCount - removedCount;
|
|
9704
|
+
if (retainedCount === 0 || retainedCount >= nextCount) return false;
|
|
9705
|
+
for (let i = 0; i < retainedCount; i++) if (getNextKey(i) !== getPreviousKey(removedCount + i)) return false;
|
|
9706
|
+
for (let i = retainedCount; i < nextCount; i++) if (removedKeys.has(getNextKey(i))) return false;
|
|
9707
|
+
return true;
|
|
9708
|
+
}
|
|
9709
|
+
var Virtualizer = class {
|
|
9710
|
+
constructor(opts) {
|
|
9711
|
+
this.unsubs = [];
|
|
9712
|
+
this.scrollElement = null;
|
|
9713
|
+
this.targetWindow = null;
|
|
9714
|
+
this.isScrolling = false;
|
|
9715
|
+
this.scrollState = null;
|
|
9716
|
+
this.measurementsCache = [];
|
|
9717
|
+
this._singleLaneMeasurements = null;
|
|
9718
|
+
this.itemSizeCache = /* @__PURE__ */ new Map();
|
|
9719
|
+
this.itemSizeCacheVersion = 0;
|
|
9720
|
+
this.laneAssignments = /* @__PURE__ */ new Map();
|
|
9721
|
+
this.pendingMin = null;
|
|
9722
|
+
this.prevLanes = void 0;
|
|
9723
|
+
this.lanesChangedFlag = false;
|
|
9724
|
+
this.lanesSettling = false;
|
|
9725
|
+
this.pendingScrollAnchor = null;
|
|
9726
|
+
this.scrollRect = null;
|
|
9727
|
+
this.scrollOffset = null;
|
|
9728
|
+
this.scrollDirection = null;
|
|
9729
|
+
this._holdOffset = 0;
|
|
9730
|
+
this._reportedOverscroll = false;
|
|
9731
|
+
this._iosGesture = new IosGesture({
|
|
9732
|
+
getWindow: () => this.targetWindow,
|
|
9733
|
+
now: () => this.now(),
|
|
9734
|
+
tailStillMoving: () => {
|
|
9735
|
+
const state = this.scrollState;
|
|
9736
|
+
if ((state == null ? void 0 : state.phase) !== "queued" || this.pendingWrite !== null) return false;
|
|
9737
|
+
const now = this._readElementOffset();
|
|
9738
|
+
if (now === null || this._lastElementOffset === null || Math.abs(now - this._lastElementOffset) < 1) return false;
|
|
9739
|
+
this._lastElementOffset = now;
|
|
9740
|
+
state.samples = [...state.samples ?? [], {
|
|
9741
|
+
t: this.now(),
|
|
9742
|
+
offset: now
|
|
9743
|
+
}];
|
|
9744
|
+
return true;
|
|
9745
|
+
},
|
|
9746
|
+
onTailClosed: () => {
|
|
9747
|
+
const state = this.scrollState;
|
|
9748
|
+
if ((state == null ? void 0 : state.phase) === "queued" && flingCaught(state.samples ?? [])) this.scrollState = null;
|
|
9749
|
+
this._flushHoldIfReady(true);
|
|
9750
|
+
this._writeAwaitingCommand();
|
|
9751
|
+
this._retryClampedAdjustment();
|
|
9752
|
+
}
|
|
9753
|
+
});
|
|
9754
|
+
this._lastElementOffset = null;
|
|
9755
|
+
this.pendingWrite = null;
|
|
9756
|
+
this._clampedAdjustment = null;
|
|
9757
|
+
this.elementsCache = /* @__PURE__ */ new Map();
|
|
9758
|
+
this._resizeBatch = null;
|
|
9759
|
+
this.now = () => {
|
|
9760
|
+
var _a, _b, _c;
|
|
9761
|
+
return ((_c = (_b = (_a = this.targetWindow) == null ? void 0 : _a.performance) == null ? void 0 : _b.now) == null ? void 0 : _c.call(_b)) ?? Date.now();
|
|
9762
|
+
};
|
|
9763
|
+
this.observer = /* @__PURE__ */ (() => {
|
|
9764
|
+
let _ro = null;
|
|
9765
|
+
let _frames = null;
|
|
9766
|
+
let delivering = false;
|
|
9767
|
+
let observeQueued = false;
|
|
9768
|
+
const pendingObservations = /* @__PURE__ */ new Set();
|
|
9769
|
+
const get = () => {
|
|
9770
|
+
if (_ro) return _ro;
|
|
9771
|
+
const targetWindow = this.targetWindow;
|
|
9772
|
+
if (!targetWindow || !targetWindow.ResizeObserver) return null;
|
|
9773
|
+
const frames = _frames = createFrameQueue(targetWindow);
|
|
9774
|
+
return _ro = new targetWindow.ResizeObserver((entries) => {
|
|
9775
|
+
const run = () => {
|
|
9776
|
+
const batch = { sync: false };
|
|
9777
|
+
this._resizeBatch = batch;
|
|
9778
|
+
try {
|
|
9779
|
+
entries.forEach(measureEntry);
|
|
9780
|
+
} finally {
|
|
9781
|
+
this._resizeBatch = null;
|
|
9782
|
+
if (batch.notify) {
|
|
9783
|
+
this.notify(batch.sync);
|
|
9784
|
+
this._noteClampMax();
|
|
9785
|
+
this._flushHoldIfReady(true);
|
|
9786
|
+
this._retryClampedAdjustment();
|
|
9787
|
+
this.measureElement(null);
|
|
9788
|
+
}
|
|
9789
|
+
}
|
|
9790
|
+
};
|
|
9791
|
+
if (this.options.useAnimationFrameWithResizeObserver) frames.schedule(run);
|
|
9792
|
+
else {
|
|
9793
|
+
delivering = true;
|
|
9794
|
+
try {
|
|
9795
|
+
run();
|
|
9796
|
+
} finally {
|
|
9797
|
+
delivering = false;
|
|
9798
|
+
}
|
|
9799
|
+
}
|
|
9800
|
+
});
|
|
9801
|
+
};
|
|
9802
|
+
const measureEntry = (entry) => {
|
|
9803
|
+
const node = entry.target;
|
|
9804
|
+
const index = this.indexFromElement(node);
|
|
9805
|
+
if (!node.isConnected) {
|
|
9806
|
+
this.observer.unobserve(node);
|
|
9807
|
+
for (const [cacheKey, cachedNode] of this.elementsCache) if (cachedNode === node) {
|
|
9808
|
+
this.elementsCache.delete(cacheKey);
|
|
9809
|
+
break;
|
|
9810
|
+
}
|
|
9811
|
+
return;
|
|
9812
|
+
}
|
|
9813
|
+
if (!this.isIndexInRange(index)) return;
|
|
9814
|
+
if (this.shouldMeasureDuringScroll(index)) this.resizeItem(index, this.options.measureElement(node, entry, this));
|
|
9815
|
+
};
|
|
9816
|
+
return {
|
|
9817
|
+
disconnect: () => {
|
|
9818
|
+
var _a;
|
|
9819
|
+
(_a = get()) == null || _a.disconnect();
|
|
9820
|
+
_frames?.cancel();
|
|
9821
|
+
pendingObservations.clear();
|
|
9822
|
+
observeQueued = false;
|
|
9823
|
+
_ro = null;
|
|
9824
|
+
_frames = null;
|
|
9825
|
+
},
|
|
9826
|
+
observe: (target) => {
|
|
9827
|
+
const observer = get();
|
|
9828
|
+
if (!observer) return;
|
|
9829
|
+
if (!delivering) {
|
|
9830
|
+
observer.observe(target, { box: "border-box" });
|
|
9831
|
+
return;
|
|
9832
|
+
}
|
|
9833
|
+
pendingObservations.add(target);
|
|
9834
|
+
if (!observeQueued) {
|
|
9835
|
+
observeQueued = true;
|
|
9836
|
+
_frames?.schedule(() => {
|
|
9837
|
+
observeQueued = false;
|
|
9838
|
+
pendingObservations.forEach((node) => {
|
|
9839
|
+
if (node.isConnected) _ro?.observe(node, { box: "border-box" });
|
|
9840
|
+
});
|
|
9841
|
+
pendingObservations.clear();
|
|
9842
|
+
});
|
|
9843
|
+
}
|
|
9844
|
+
},
|
|
9845
|
+
unobserve: (target) => {
|
|
9846
|
+
var _a;
|
|
9847
|
+
pendingObservations.delete(target);
|
|
9848
|
+
(_a = get()) == null || _a.unobserve(target);
|
|
9849
|
+
}
|
|
9850
|
+
};
|
|
9851
|
+
})();
|
|
9852
|
+
this.range = null;
|
|
9853
|
+
this.setOptions = (opts2) => {
|
|
9854
|
+
var _a;
|
|
9855
|
+
const merged = {
|
|
9856
|
+
debug: false,
|
|
9857
|
+
initialOffset: 0,
|
|
9858
|
+
overscan: 1,
|
|
9859
|
+
paddingStart: 0,
|
|
9860
|
+
paddingEnd: 0,
|
|
9861
|
+
scrollPaddingStart: 0,
|
|
9862
|
+
scrollPaddingEnd: 0,
|
|
9863
|
+
horizontal: false,
|
|
9864
|
+
getItemKey: defaultKeyExtractor,
|
|
9865
|
+
rangeExtractor: defaultRangeExtractor,
|
|
9866
|
+
onChange: () => {},
|
|
9867
|
+
measureElement,
|
|
9868
|
+
initialRect: {
|
|
9869
|
+
width: 0,
|
|
9870
|
+
height: 0
|
|
9871
|
+
},
|
|
9872
|
+
scrollMargin: 0,
|
|
9873
|
+
gap: 0,
|
|
9874
|
+
indexAttribute: "data-index",
|
|
9875
|
+
initialMeasurementsCache: [],
|
|
9876
|
+
lanes: 1,
|
|
9877
|
+
anchorTo: "start",
|
|
9878
|
+
followOnAppend: false,
|
|
9879
|
+
scrollEndThreshold: 1,
|
|
9880
|
+
isScrollingResetDelay: 150,
|
|
9881
|
+
enabled: true,
|
|
9882
|
+
isRtl: false,
|
|
9883
|
+
useScrollendEvent: false,
|
|
9884
|
+
useAnimationFrameWithResizeObserver: false,
|
|
9885
|
+
laneAssignmentMode: "estimate",
|
|
9886
|
+
useCachedMeasurements: false
|
|
9887
|
+
};
|
|
9888
|
+
for (const key in opts2) {
|
|
9889
|
+
const v = opts2[key];
|
|
9890
|
+
if (v !== void 0) merged[key] = v;
|
|
9891
|
+
}
|
|
9892
|
+
const prevOptions = this.options;
|
|
9893
|
+
let anchor = null;
|
|
9894
|
+
let followOnAppend = null;
|
|
9895
|
+
let edgeKeysChanged = false;
|
|
9896
|
+
if (prevOptions !== void 0 && prevOptions.enabled && merged.enabled && merged.anchorTo === "end" && this.scrollElement !== null) {
|
|
9897
|
+
const prevCount = prevOptions.count;
|
|
9898
|
+
const nextCount = merged.count;
|
|
9899
|
+
const measurements = this.getMeasurements();
|
|
9900
|
+
const previousItems = ((_a = this._singleLaneMeasurements) == null ? void 0 : _a.items) ?? measurements;
|
|
9901
|
+
const getPreviousKey = (index) => getMeasurementKey(previousItems[index]);
|
|
9902
|
+
const prevFirstKey = prevCount > 0 ? getPreviousKey(0) : null;
|
|
9903
|
+
const prevLastKey = prevCount > 0 ? getPreviousKey(prevCount - 1) : null;
|
|
9904
|
+
if (nextCount !== prevCount || prevCount > 0 && nextCount > 0 && (merged.getItemKey(0) !== prevFirstKey || merged.getItemKey(nextCount - 1) !== prevLastKey)) {
|
|
9905
|
+
edgeKeysChanged = true;
|
|
9906
|
+
const item = prevCount > 0 ? this.getVirtualItemForOffset(this.getScrollOffset()) ?? measurements[0] : null;
|
|
9907
|
+
if (item) anchor = [item.key, this.getScrollOffset() - item.start];
|
|
9908
|
+
const behavior = merged.followOnAppend === true ? "auto" : merged.followOnAppend || null;
|
|
9909
|
+
if (behavior && nextCount > 0 && this.isAtEnd(prevOptions.scrollEndThreshold) && (prevCount === 0 || merged.getItemKey(nextCount - 1) !== prevLastKey)) {
|
|
9910
|
+
if (nextCount > prevCount || isAppendWithTrim(prevCount, nextCount, getPreviousKey, merged.getItemKey)) followOnAppend = behavior;
|
|
9911
|
+
}
|
|
9912
|
+
}
|
|
9913
|
+
}
|
|
9914
|
+
this.options = merged;
|
|
9915
|
+
if (edgeKeysChanged) {
|
|
9916
|
+
this.pendingMin = 0;
|
|
9917
|
+
this.itemSizeCacheVersion++;
|
|
9918
|
+
}
|
|
9919
|
+
let anchorDelta = null;
|
|
9920
|
+
if (anchor && this.scrollOffset !== null && !this._awaitingCommandReadBack()) {
|
|
9921
|
+
const [anchorKey, anchorOffset] = anchor;
|
|
9922
|
+
const newMeasurements = this.getMeasurements();
|
|
9923
|
+
const { count, getItemKey } = this.options;
|
|
9924
|
+
let idx = 0;
|
|
9925
|
+
while (idx < count && getItemKey(idx) !== anchorKey) idx++;
|
|
9926
|
+
if (idx < count) {
|
|
9927
|
+
const anchorItem = newMeasurements[idx];
|
|
9928
|
+
if (anchorItem) {
|
|
9929
|
+
const newOffset = Math.max(0, anchorItem.start + anchorOffset);
|
|
9930
|
+
if (!followOnAppend && newOffset !== this.scrollOffset) {
|
|
9931
|
+
anchorDelta = newOffset - this.scrollOffset;
|
|
9932
|
+
this.scrollOffset = newOffset;
|
|
9933
|
+
}
|
|
9934
|
+
}
|
|
9935
|
+
}
|
|
9936
|
+
}
|
|
9937
|
+
if (followOnAppend) this.pendingScrollAnchor = {
|
|
9938
|
+
kind: "follow",
|
|
9939
|
+
behavior: followOnAppend
|
|
9940
|
+
};
|
|
9941
|
+
else if (anchorDelta !== null) {
|
|
9942
|
+
if (this._canWriteScroll()) this.pendingScrollAnchor = {
|
|
9943
|
+
kind: "anchor",
|
|
9944
|
+
delta: anchorDelta
|
|
9945
|
+
};
|
|
9946
|
+
else {
|
|
9947
|
+
this._holdOffset += anchorDelta;
|
|
9948
|
+
this._followOffsetTarget(anchorDelta);
|
|
9949
|
+
}
|
|
9950
|
+
}
|
|
9951
|
+
};
|
|
9952
|
+
this.notify = (sync) => {
|
|
9953
|
+
var _a, _b;
|
|
9954
|
+
(_b = (_a = this.options).onChange) == null || _b.call(_a, this, sync);
|
|
9955
|
+
};
|
|
9956
|
+
this.maybeNotify = memo(() => {
|
|
9957
|
+
this.calculateRange();
|
|
9958
|
+
return [
|
|
9959
|
+
this.isScrolling,
|
|
9960
|
+
this.range ? this.range.startIndex : null,
|
|
9961
|
+
this.range ? this.range.endIndex : null
|
|
9962
|
+
];
|
|
9963
|
+
}, (isScrolling) => {
|
|
9964
|
+
this.notify(isScrolling);
|
|
9965
|
+
}, {
|
|
9966
|
+
key: "maybeNotify",
|
|
9967
|
+
debug: () => this.options.debug,
|
|
9968
|
+
initialDeps: [
|
|
9969
|
+
this.isScrolling,
|
|
9970
|
+
this.range ? this.range.startIndex : null,
|
|
9971
|
+
this.range ? this.range.endIndex : null
|
|
9972
|
+
]
|
|
9973
|
+
});
|
|
9974
|
+
this.cleanup = () => {
|
|
9975
|
+
var _a;
|
|
9976
|
+
this.unsubs.filter(Boolean).forEach((d) => d());
|
|
9977
|
+
this.unsubs = [];
|
|
9978
|
+
this.observer.disconnect();
|
|
9979
|
+
if (this.rafId != null && this.targetWindow) {
|
|
9980
|
+
this.targetWindow.cancelAnimationFrame(this.rafId);
|
|
9981
|
+
this.rafId = null;
|
|
9982
|
+
}
|
|
9983
|
+
this.scrollState = null;
|
|
9984
|
+
(_a = this._momentumStop) == null || _a.restore();
|
|
9985
|
+
this._momentumStop = null;
|
|
9986
|
+
this.isScrolling = false;
|
|
9987
|
+
this.scrollDirection = null;
|
|
9988
|
+
this._holdOffset = 0;
|
|
9989
|
+
this._reportedOverscroll = false;
|
|
9990
|
+
this._clampedAdjustment = null;
|
|
9991
|
+
this.pendingWrite = null;
|
|
9992
|
+
this.scrollElement = null;
|
|
9993
|
+
this.targetWindow = null;
|
|
9994
|
+
};
|
|
9995
|
+
this._didMount = () => {
|
|
9996
|
+
return () => {
|
|
9997
|
+
this.cleanup();
|
|
9998
|
+
};
|
|
9999
|
+
};
|
|
10000
|
+
this._willUpdate = () => {
|
|
10001
|
+
var _a;
|
|
10002
|
+
const scrollElement = this.options.enabled ? this.options.getScrollElement() : null;
|
|
10003
|
+
if (this.scrollElement !== scrollElement) {
|
|
10004
|
+
this.cleanup();
|
|
10005
|
+
if (!scrollElement) {
|
|
10006
|
+
this.maybeNotify();
|
|
10007
|
+
return;
|
|
10008
|
+
}
|
|
10009
|
+
this.scrollElement = scrollElement;
|
|
10010
|
+
if (this.scrollElement && "ownerDocument" in this.scrollElement) this.targetWindow = this.scrollElement.ownerDocument.defaultView;
|
|
10011
|
+
else this.targetWindow = ((_a = this.scrollElement) == null ? void 0 : _a.window) ?? null;
|
|
10012
|
+
this.elementsCache.forEach((cached) => {
|
|
10013
|
+
this.observer.observe(cached);
|
|
10014
|
+
});
|
|
10015
|
+
this.unsubs.push(this.options.observeElementRect(this, (rect) => {
|
|
10016
|
+
this.scrollRect = rect;
|
|
10017
|
+
this.maybeNotify();
|
|
10018
|
+
}));
|
|
10019
|
+
this.unsubs.push(this.options.observeElementOffset(this, (offset, isScrolling) => {
|
|
10020
|
+
var _a2, _b, _c, _d;
|
|
10021
|
+
const elementMax = isScrolling ? this._elementMaxScrollOffset() : null;
|
|
10022
|
+
const wasOverscrolled = this._reportedOverscroll;
|
|
10023
|
+
this._reportedOverscroll = offset < 0 || elementMax !== null && offset > elementMax + 1;
|
|
10024
|
+
const elementOffset = offset;
|
|
10025
|
+
this._lastElementOffset = elementOffset;
|
|
10026
|
+
offset = this._toLayoutOffset(offset);
|
|
10027
|
+
const kind = this._classifyScrollEvent(offset, isScrolling, elementMax);
|
|
10028
|
+
if (kind === "spurious") return;
|
|
10029
|
+
if (kind === "readBack") offset = this.pendingWrite.target;
|
|
10030
|
+
else if (kind === "clampedReadBack" && ((_a2 = this.scrollState) == null ? void 0 : _a2.index) != null && offset < this.getMaxScrollOffset() - 1.5) this.scrollState.lastTargetOffset = offset;
|
|
10031
|
+
else if (externalRetiresCommand({
|
|
10032
|
+
kind,
|
|
10033
|
+
offset,
|
|
10034
|
+
command: this.scrollState,
|
|
10035
|
+
target: () => this.getScrollStateTarget(this.scrollState)
|
|
10036
|
+
})) this.scrollState = null;
|
|
10037
|
+
this.pendingWrite = null;
|
|
10038
|
+
if (this._clampedAdjustment !== null && Math.abs(offset - this._clampedAdjustment.maxAtWrite) >= 1.5) this._clampedAdjustment = null;
|
|
10039
|
+
const prevOffset = this.getScrollOffset();
|
|
10040
|
+
const prevDirection = this.scrollDirection;
|
|
10041
|
+
this.scrollDirection = isScrolling ? prevOffset === offset ? this.scrollDirection : prevOffset < offset ? "forward" : "backward" : null;
|
|
10042
|
+
this.scrollOffset = offset;
|
|
10043
|
+
this.isScrolling = isScrolling;
|
|
10044
|
+
const queued = this.scrollState;
|
|
10045
|
+
if ((queued == null ? void 0 : queued.phase) === "queued" && kind === "external" && isScrolling) {
|
|
10046
|
+
if (wasOverscrolled || this._reportedOverscroll) queued.samples = [];
|
|
10047
|
+
else {
|
|
10048
|
+
const t = this.now();
|
|
10049
|
+
queued.samples = [...(queued.samples ?? []).filter((sample) => t - sample.t <= 200), {
|
|
10050
|
+
t,
|
|
10051
|
+
offset: elementOffset
|
|
10052
|
+
}];
|
|
10053
|
+
if (prevDirection !== null && this.scrollDirection !== prevDirection || flingSpedUp(queued.samples)) this.scrollState = null;
|
|
10054
|
+
}
|
|
10055
|
+
}
|
|
10056
|
+
if (this._iosGesture.onScroll({
|
|
10057
|
+
isScrolling,
|
|
10058
|
+
ownReadBack: kind === "readBack",
|
|
10059
|
+
moved: offset !== prevOffset,
|
|
10060
|
+
external: kind === "external" && ((_b = this.scrollState) == null ? void 0 : _b.phase) !== "smooth" && ((_c = this.scrollState) == null ? void 0 : _c.phase) !== "smoothFinishing"
|
|
10061
|
+
}) && ((_d = this.scrollState) == null ? void 0 : _d.phase) === "queued") this.scrollState = null;
|
|
10062
|
+
this._flushHoldIfReady(true);
|
|
10063
|
+
if (this.scrollState) this.scheduleScrollReconcile();
|
|
10064
|
+
this.maybeNotify();
|
|
10065
|
+
}));
|
|
10066
|
+
if ("addEventListener" in this.scrollElement) this.unsubs.push(this._iosGesture.listen(this.scrollElement));
|
|
10067
|
+
this._scrollToOffset(this.getScrollOffset());
|
|
10068
|
+
}
|
|
10069
|
+
this._noteClampMax();
|
|
10070
|
+
const anchor = this.pendingScrollAnchor;
|
|
10071
|
+
this.pendingScrollAnchor = null;
|
|
10072
|
+
if (anchor && this.scrollElement && this.options.enabled) {
|
|
10073
|
+
if (anchor.kind === "anchor") {
|
|
10074
|
+
if (!this._canWriteScroll()) {
|
|
10075
|
+
this._holdOffset += anchor.delta;
|
|
10076
|
+
this._followOffsetTarget(anchor.delta);
|
|
10077
|
+
this.notify(false);
|
|
10078
|
+
} else if (isSmoothScroll(this.scrollState) && !approxEqual(this.getScrollOffset() - anchor.delta, this.scrollState.lastTargetOffset));
|
|
10079
|
+
else {
|
|
10080
|
+
this._followOffsetTarget(anchor.delta);
|
|
10081
|
+
this._scrollToOffset(this.getScrollOffset());
|
|
10082
|
+
}
|
|
10083
|
+
} else this.scrollToEnd({ behavior: anchor.behavior });
|
|
10084
|
+
}
|
|
10085
|
+
this._flushHoldIfReady(false);
|
|
10086
|
+
this._retryClampedAdjustment();
|
|
10087
|
+
};
|
|
10088
|
+
this._classifyScrollEvent = (offset, isScrolling, elementMax) => {
|
|
10089
|
+
var _a;
|
|
10090
|
+
return classifyScrollEvent({
|
|
10091
|
+
offset,
|
|
10092
|
+
isScrolling,
|
|
10093
|
+
elementMax,
|
|
10094
|
+
holdOffset: this._holdOffset,
|
|
10095
|
+
scrollOffset: this.scrollOffset,
|
|
10096
|
+
pendingWrite: this.pendingWrite,
|
|
10097
|
+
clampedMaxAtWrite: ((_a = this._clampedAdjustment) == null ? void 0 : _a.maxAtWrite) ?? null
|
|
10098
|
+
});
|
|
10099
|
+
};
|
|
10100
|
+
this._retryClampedAdjustment = () => {
|
|
10101
|
+
if (this._clampedAdjustment === null || !this.scrollElement || !this.options.enabled || !this._canWriteScroll()) return;
|
|
10102
|
+
const { target, maxAtWrite } = this._clampedAdjustment;
|
|
10103
|
+
const max = this.getMaxScrollOffset();
|
|
10104
|
+
if (max > maxAtWrite + .5) {
|
|
10105
|
+
this._clampedAdjustment = target > max + .5 ? {
|
|
10106
|
+
target,
|
|
10107
|
+
maxAtWrite: max
|
|
10108
|
+
} : null;
|
|
10109
|
+
this._scrollToOffset(target);
|
|
10110
|
+
}
|
|
10111
|
+
};
|
|
10112
|
+
this._writeAwaitingCommand = () => {
|
|
10113
|
+
const state = this.scrollState;
|
|
10114
|
+
if (state === null || state.phase !== "queued") return;
|
|
10115
|
+
const { behavior } = state;
|
|
10116
|
+
this.getMeasurements();
|
|
10117
|
+
const offset = this.getScrollStateTarget(state);
|
|
10118
|
+
state.lastTargetOffset = offset;
|
|
10119
|
+
this._clampedAdjustment = null;
|
|
10120
|
+
state.phase = initialScrollPhase(behavior, state.index != null && approxEqual(offset, this.getScrollOffset()));
|
|
10121
|
+
this._scrollToOffset(offset, { behavior });
|
|
10122
|
+
this.scheduleScrollReconcile();
|
|
10123
|
+
};
|
|
10124
|
+
this._readElementOffset = () => {
|
|
10125
|
+
const el = this.scrollElement;
|
|
10126
|
+
if (el == null) return null;
|
|
10127
|
+
const { horizontal, isRtl } = this.options;
|
|
10128
|
+
if (typeof el.scrollTop === "number") return horizontal ? el.scrollLeft * (isRtl && -1 || 1) : el.scrollTop;
|
|
10129
|
+
if (typeof el.scrollY === "number") return horizontal ? el.scrollX : el.scrollY;
|
|
10130
|
+
return null;
|
|
10131
|
+
};
|
|
10132
|
+
this._canWriteScroll = () => !(isIOSWebKit() && this._iosGesture.inMotion()) && !this._reportedOverscroll;
|
|
10133
|
+
this._flushHoldIfReady = (sync) => {
|
|
10134
|
+
var _a;
|
|
10135
|
+
if (this._holdOffset === 0) return;
|
|
10136
|
+
if (!this.scrollElement || !this.options.enabled) return;
|
|
10137
|
+
if (!this._canWriteScroll()) return;
|
|
10138
|
+
if (((_a = this.scrollState) == null ? void 0 : _a.phase) === "smooth") return;
|
|
10139
|
+
this._holdOffset = 0;
|
|
10140
|
+
if (this.scrollOffset !== null && this.scrollOffset < 0) this.scrollOffset = 0;
|
|
10141
|
+
this.notify(sync);
|
|
10142
|
+
const target = this.getCommandWrittenOffset() ?? this.getScrollOffset();
|
|
10143
|
+
this._clampedAdjustment = this._clampedBy(target);
|
|
10144
|
+
this._scrollToOffset(target);
|
|
10145
|
+
};
|
|
10146
|
+
this.rafId = null;
|
|
10147
|
+
this.getSize = () => {
|
|
10148
|
+
if (!this.options.enabled) {
|
|
10149
|
+
this.scrollRect = null;
|
|
10150
|
+
return 0;
|
|
10151
|
+
}
|
|
10152
|
+
this.scrollRect = this.scrollRect ?? this.options.initialRect;
|
|
10153
|
+
return this.scrollRect[this.options.horizontal ? "width" : "height"];
|
|
10154
|
+
};
|
|
10155
|
+
this.getScrollOffset = () => {
|
|
10156
|
+
if (!this.options.enabled) {
|
|
10157
|
+
this.scrollOffset = null;
|
|
10158
|
+
return 0;
|
|
10159
|
+
}
|
|
10160
|
+
this.scrollOffset = this.scrollOffset ?? (typeof this.options.initialOffset === "function" ? this.options.initialOffset() : this.options.initialOffset);
|
|
10161
|
+
return this.scrollOffset;
|
|
10162
|
+
};
|
|
10163
|
+
this.getMeasurementOptions = memo(() => [
|
|
10164
|
+
this.options.count,
|
|
10165
|
+
this.options.paddingStart,
|
|
10166
|
+
this.options.scrollMargin,
|
|
10167
|
+
this.options.getItemKey,
|
|
10168
|
+
this.options.enabled,
|
|
10169
|
+
this.options.lanes,
|
|
10170
|
+
this.options.laneAssignmentMode,
|
|
10171
|
+
this.options.gap
|
|
10172
|
+
], (count, paddingStart, scrollMargin, getItemKey, enabled, lanes, laneAssignmentMode, gap) => {
|
|
10173
|
+
if (this.prevLanes !== void 0 && this.prevLanes !== lanes) this.lanesChangedFlag = true;
|
|
10174
|
+
this.prevLanes = lanes;
|
|
10175
|
+
this.pendingMin = null;
|
|
10176
|
+
return {
|
|
10177
|
+
count,
|
|
10178
|
+
paddingStart,
|
|
10179
|
+
scrollMargin,
|
|
10180
|
+
getItemKey,
|
|
10181
|
+
enabled,
|
|
10182
|
+
lanes,
|
|
10183
|
+
laneAssignmentMode,
|
|
10184
|
+
gap
|
|
10185
|
+
};
|
|
10186
|
+
}, { key: false });
|
|
10187
|
+
this.isIndexInRange = (index) => index >= 0 && index < this.options.count;
|
|
10188
|
+
this.getMeasurements = memo(() => [this.getMeasurementOptions(), this.itemSizeCacheVersion], ({ count, paddingStart, scrollMargin, getItemKey, enabled, lanes, laneAssignmentMode, gap }, _itemSizeCacheVersion) => {
|
|
10189
|
+
var _a;
|
|
10190
|
+
const itemSizeCache = this.itemSizeCache;
|
|
10191
|
+
if (!enabled) {
|
|
10192
|
+
this.measurementsCache = [];
|
|
10193
|
+
this._singleLaneMeasurements = null;
|
|
10194
|
+
this.itemSizeCache.clear();
|
|
10195
|
+
this.laneAssignments.clear();
|
|
10196
|
+
return [];
|
|
10197
|
+
}
|
|
10198
|
+
if (this.laneAssignments.size > count) {
|
|
10199
|
+
for (const index of this.laneAssignments.keys()) if (index >= count) this.laneAssignments.delete(index);
|
|
10200
|
+
}
|
|
10201
|
+
if (this.lanesChangedFlag) {
|
|
10202
|
+
this.lanesChangedFlag = false;
|
|
10203
|
+
this.lanesSettling = true;
|
|
10204
|
+
this.measurementsCache = [];
|
|
10205
|
+
this._singleLaneMeasurements = null;
|
|
10206
|
+
this.itemSizeCache.clear();
|
|
10207
|
+
this.laneAssignments.clear();
|
|
10208
|
+
this.pendingMin = null;
|
|
10209
|
+
}
|
|
10210
|
+
if (this.measurementsCache.length === 0 && !this.lanesSettling) {
|
|
10211
|
+
this.measurementsCache = this.options.initialMeasurementsCache;
|
|
10212
|
+
this.measurementsCache.forEach((item) => {
|
|
10213
|
+
this.itemSizeCache.set(item.key, item.size);
|
|
10214
|
+
});
|
|
10215
|
+
}
|
|
10216
|
+
const min = this.lanesSettling ? 0 : this.pendingMin ?? 0;
|
|
10217
|
+
this.pendingMin = null;
|
|
10218
|
+
if (this.lanesSettling && this.measurementsCache.length === count) this.lanesSettling = false;
|
|
10219
|
+
if (lanes === 1) {
|
|
10220
|
+
const need = count * 2;
|
|
10221
|
+
let flat = (_a = this._singleLaneMeasurements) == null ? void 0 : _a.flat;
|
|
10222
|
+
if (!flat || flat.length < need) {
|
|
10223
|
+
const next = new Float64Array(need);
|
|
10224
|
+
if (flat && min > 0) next.set(flat.subarray(0, min * 2));
|
|
10225
|
+
flat = next;
|
|
10226
|
+
}
|
|
10227
|
+
const items = min === 0 ? new Array(count) : this._singleLaneMeasurements.items.slice();
|
|
10228
|
+
let runningStart;
|
|
10229
|
+
if (min === 0) runningStart = paddingStart + scrollMargin;
|
|
10230
|
+
else {
|
|
10231
|
+
const prevIdx = min - 1;
|
|
10232
|
+
runningStart = flat[prevIdx * 2] + flat[prevIdx * 2 + 1] + gap;
|
|
10233
|
+
}
|
|
10234
|
+
for (let i = min; i < count; i++) {
|
|
10235
|
+
const key = getItemKey(i);
|
|
10236
|
+
items[i] = key;
|
|
10237
|
+
const measuredSize = itemSizeCache.get(key);
|
|
10238
|
+
const size = typeof measuredSize === "number" ? measuredSize : this.options.estimateSize(i);
|
|
10239
|
+
flat[i * 2] = runningStart;
|
|
10240
|
+
flat[i * 2 + 1] = size;
|
|
10241
|
+
runningStart += size + gap;
|
|
10242
|
+
}
|
|
10243
|
+
this._singleLaneMeasurements = {
|
|
10244
|
+
flat,
|
|
10245
|
+
items
|
|
10246
|
+
};
|
|
10247
|
+
const view = createLazyMeasurementsView(items, flat);
|
|
10248
|
+
this.measurementsCache = view;
|
|
10249
|
+
return view;
|
|
10250
|
+
}
|
|
10251
|
+
const measurements = this.measurementsCache.slice(0, min);
|
|
10252
|
+
const laneLastIndex = new Array(lanes).fill(void 0);
|
|
10253
|
+
const laneEnds = new Float64Array(lanes);
|
|
10254
|
+
let filledLanes = 0;
|
|
10255
|
+
for (let m = 0; m < min; m++) {
|
|
10256
|
+
const item = measurements[m];
|
|
10257
|
+
if (item) {
|
|
10258
|
+
if (laneLastIndex[item.lane] === void 0) filledLanes++;
|
|
10259
|
+
laneLastIndex[item.lane] = m;
|
|
10260
|
+
laneEnds[item.lane] = item.end;
|
|
10261
|
+
}
|
|
10262
|
+
}
|
|
10263
|
+
for (let i = min; i < count; i++) {
|
|
10264
|
+
const key = getItemKey(i);
|
|
10265
|
+
const cachedLane = this.laneAssignments.get(i);
|
|
10266
|
+
let lane;
|
|
10267
|
+
let start;
|
|
10268
|
+
const shouldCacheLane = laneAssignmentMode === "estimate" || itemSizeCache.has(key);
|
|
10269
|
+
if (cachedLane !== void 0 && this.options.lanes > 1) {
|
|
10270
|
+
lane = cachedLane;
|
|
10271
|
+
const prevIndex = laneLastIndex[lane];
|
|
10272
|
+
const prevInLane = prevIndex !== void 0 ? measurements[prevIndex] : void 0;
|
|
10273
|
+
start = prevInLane ? prevInLane.end + gap : paddingStart + scrollMargin;
|
|
10274
|
+
} else if (filledLanes === lanes) {
|
|
10275
|
+
let bestLane = 0;
|
|
10276
|
+
let bestEnd = laneEnds[0];
|
|
10277
|
+
let bestIdx = laneLastIndex[0];
|
|
10278
|
+
for (let l = 1; l < lanes; l++) {
|
|
10279
|
+
const e = laneEnds[l];
|
|
10280
|
+
if (e < bestEnd || e === bestEnd && laneLastIndex[l] < bestIdx) {
|
|
10281
|
+
bestLane = l;
|
|
10282
|
+
bestEnd = e;
|
|
10283
|
+
bestIdx = laneLastIndex[l];
|
|
10284
|
+
}
|
|
10285
|
+
}
|
|
10286
|
+
lane = bestLane;
|
|
10287
|
+
start = bestEnd + gap;
|
|
10288
|
+
if (shouldCacheLane) this.laneAssignments.set(i, lane);
|
|
10289
|
+
} else {
|
|
10290
|
+
lane = i % this.options.lanes;
|
|
10291
|
+
start = paddingStart + scrollMargin;
|
|
10292
|
+
if (shouldCacheLane) this.laneAssignments.set(i, lane);
|
|
10293
|
+
}
|
|
10294
|
+
const measuredSize = itemSizeCache.get(key);
|
|
10295
|
+
const size = typeof measuredSize === "number" ? measuredSize : this.options.estimateSize(i);
|
|
10296
|
+
const end = start + size;
|
|
10297
|
+
measurements[i] = {
|
|
10298
|
+
index: i,
|
|
10299
|
+
start,
|
|
10300
|
+
size,
|
|
10301
|
+
end,
|
|
10302
|
+
key,
|
|
10303
|
+
lane
|
|
10304
|
+
};
|
|
10305
|
+
if (laneLastIndex[lane] === void 0) filledLanes++;
|
|
10306
|
+
laneLastIndex[lane] = i;
|
|
10307
|
+
laneEnds[lane] = end;
|
|
10308
|
+
}
|
|
10309
|
+
this.measurementsCache = measurements;
|
|
10310
|
+
return measurements;
|
|
10311
|
+
}, {
|
|
10312
|
+
key: "getMeasurements",
|
|
10313
|
+
debug: () => this.options.debug
|
|
10314
|
+
});
|
|
10315
|
+
this.calculateRange = memo(() => [
|
|
10316
|
+
this.getMeasurements(),
|
|
10317
|
+
this.getSize(),
|
|
10318
|
+
this.getScrollOffset(),
|
|
10319
|
+
this.options.lanes,
|
|
10320
|
+
this._getLayoutTotalSize() + this.options.scrollMargin
|
|
10321
|
+
], (measurements, outerSize, scrollOffset, lanes, listEnd) => {
|
|
10322
|
+
if (measurements.length === 0 || outerSize === 0) {
|
|
10323
|
+
this.range = null;
|
|
10324
|
+
return null;
|
|
10325
|
+
}
|
|
10326
|
+
const maxScrollOffset = Math.max(listEnd - outerSize, 0);
|
|
10327
|
+
this.range = calculateRangeImpl(measurements, outerSize, Math.min(scrollOffset, maxScrollOffset), lanes, lanes === 1 && this._singleLaneMeasurements !== null ? this._singleLaneMeasurements.flat : null);
|
|
10328
|
+
return this.range;
|
|
10329
|
+
}, {
|
|
10330
|
+
key: "calculateRange",
|
|
10331
|
+
debug: () => this.options.debug
|
|
10332
|
+
});
|
|
10333
|
+
this.getVirtualIndexes = memo(() => {
|
|
10334
|
+
let startIndex = null;
|
|
10335
|
+
let endIndex = null;
|
|
10336
|
+
const range = this.calculateRange();
|
|
10337
|
+
if (range) {
|
|
10338
|
+
startIndex = range.startIndex;
|
|
10339
|
+
endIndex = range.endIndex;
|
|
10340
|
+
}
|
|
10341
|
+
this.maybeNotify.updateDeps([
|
|
10342
|
+
this.isScrolling,
|
|
10343
|
+
startIndex,
|
|
10344
|
+
endIndex
|
|
10345
|
+
]);
|
|
10346
|
+
return [
|
|
10347
|
+
this.options.rangeExtractor,
|
|
10348
|
+
this.options.overscan,
|
|
10349
|
+
this.options.count,
|
|
10350
|
+
startIndex,
|
|
10351
|
+
endIndex,
|
|
10352
|
+
this.options.lanes
|
|
10353
|
+
];
|
|
10354
|
+
}, (rangeExtractor, overscan, count, startIndex, endIndex, lanes) => {
|
|
10355
|
+
return startIndex === null || endIndex === null ? [] : rangeExtractor({
|
|
10356
|
+
startIndex,
|
|
10357
|
+
endIndex,
|
|
10358
|
+
overscan,
|
|
10359
|
+
count,
|
|
10360
|
+
lanes
|
|
10361
|
+
});
|
|
10362
|
+
}, {
|
|
10363
|
+
key: "getVirtualIndexes",
|
|
10364
|
+
debug: () => this.options.debug
|
|
10365
|
+
});
|
|
10366
|
+
this.indexFromElement = (node) => {
|
|
10367
|
+
const attributeName = this.options.indexAttribute;
|
|
10368
|
+
const indexStr = node.getAttribute(attributeName);
|
|
10369
|
+
if (!indexStr) {
|
|
10370
|
+
console.warn(`Missing attribute name '${attributeName}={index}' on measured element.`);
|
|
10371
|
+
return -1;
|
|
10372
|
+
}
|
|
10373
|
+
return parseInt(indexStr, 10);
|
|
10374
|
+
};
|
|
10375
|
+
this.shouldMeasureDuringScroll = (index) => {
|
|
10376
|
+
var _a;
|
|
10377
|
+
if (!isSmoothScroll(this.scrollState)) return true;
|
|
10378
|
+
const scrollIndex = this.scrollState.index ?? ((_a = this.getVirtualItemForOffset(this.scrollState.lastTargetOffset)) == null ? void 0 : _a.index);
|
|
10379
|
+
if (scrollIndex !== void 0 && this.range) {
|
|
10380
|
+
const bufferSize = Math.max(this.options.overscan, Math.ceil((this.range.endIndex - this.range.startIndex) / 2));
|
|
10381
|
+
const minIndex = Math.max(0, scrollIndex - bufferSize);
|
|
10382
|
+
const maxIndex = Math.min(this.options.count - 1, scrollIndex + bufferSize);
|
|
10383
|
+
return index >= minIndex && index <= maxIndex;
|
|
10384
|
+
}
|
|
10385
|
+
return true;
|
|
10386
|
+
};
|
|
10387
|
+
this.measureElement = (node) => {
|
|
10388
|
+
if (!node) {
|
|
10389
|
+
this.elementsCache.forEach((cached, key2) => {
|
|
10390
|
+
if (!cached.isConnected) {
|
|
10391
|
+
this.observer.unobserve(cached);
|
|
10392
|
+
this.elementsCache.delete(key2);
|
|
10393
|
+
}
|
|
10394
|
+
});
|
|
10395
|
+
return;
|
|
10396
|
+
}
|
|
10397
|
+
const index = this.indexFromElement(node);
|
|
10398
|
+
if (!this.isIndexInRange(index)) return;
|
|
10399
|
+
const key = this.options.getItemKey(index);
|
|
10400
|
+
const prevNode = this.elementsCache.get(key);
|
|
10401
|
+
if (prevNode !== node) {
|
|
10402
|
+
if (prevNode) this.observer.unobserve(prevNode);
|
|
10403
|
+
this.observer.observe(node);
|
|
10404
|
+
this.elementsCache.set(key, node);
|
|
10405
|
+
}
|
|
10406
|
+
if (node.isConnected && (!this.isScrolling || this.scrollState) && this.shouldMeasureDuringScroll(index)) this.resizeItem(index, this.options.measureElement(node, void 0, this));
|
|
10407
|
+
};
|
|
10408
|
+
this.resizeItem = (index, size) => {
|
|
10409
|
+
var _a, _b, _c;
|
|
10410
|
+
if (!this.isIndexInRange(index)) return;
|
|
10411
|
+
if ((_a = this._resizeBatch) == null ? void 0 : _a.sync) this.getMeasurements();
|
|
10412
|
+
let cachedSize;
|
|
10413
|
+
let itemStart;
|
|
10414
|
+
let key;
|
|
10415
|
+
const flat = (_b = this._singleLaneMeasurements) == null ? void 0 : _b.flat;
|
|
10416
|
+
if (this.options.lanes === 1 && flat != null) {
|
|
10417
|
+
key = this.options.getItemKey(index);
|
|
10418
|
+
itemStart = flat[index * 2];
|
|
10419
|
+
cachedSize = flat[index * 2 + 1];
|
|
10420
|
+
} else {
|
|
10421
|
+
const item = this.measurementsCache[index];
|
|
10422
|
+
if (!item) return;
|
|
10423
|
+
key = item.key;
|
|
10424
|
+
itemStart = item.start;
|
|
10425
|
+
cachedSize = item.size;
|
|
10426
|
+
}
|
|
10427
|
+
const itemSize = this.itemSizeCache.get(key) ?? cachedSize;
|
|
10428
|
+
const delta = size - itemSize;
|
|
10429
|
+
if (delta !== 0) {
|
|
10430
|
+
const wasAtEnd = this.options.anchorTo === "end" && !isSmoothScroll(this.scrollState) && this.getVirtualDistanceFromEnd() <= this.options.scrollEndThreshold;
|
|
10431
|
+
const prevTotalSize = wasAtEnd ? this._getLayoutTotalSize() : 0;
|
|
10432
|
+
const scrollOffset = this.getScrollOffset();
|
|
10433
|
+
const defaultShouldAdjust = !this.itemSizeCache.has(key) ? itemStart < scrollOffset : itemStart + itemSize <= scrollOffset && this.scrollDirection !== "backward";
|
|
10434
|
+
const shouldAdjustScroll = !isSmoothScroll(this.scrollState) && (this.shouldAdjustScrollPositionOnItemSizeChange !== void 0 ? this.shouldAdjustScrollPositionOnItemSizeChange(this.measurementsCache[index] ?? {
|
|
10435
|
+
index,
|
|
10436
|
+
key,
|
|
10437
|
+
start: itemStart,
|
|
10438
|
+
size: cachedSize,
|
|
10439
|
+
end: itemStart + cachedSize,
|
|
10440
|
+
lane: 0
|
|
10441
|
+
}, delta, this) : defaultShouldAdjust);
|
|
10442
|
+
if (this.pendingMin === null || index < this.pendingMin) this.pendingMin = index;
|
|
10443
|
+
this.itemSizeCache.set(key, size);
|
|
10444
|
+
this.itemSizeCacheVersion++;
|
|
10445
|
+
let adjustedSync = false;
|
|
10446
|
+
if (!this._awaitingCommandReadBack()) {
|
|
10447
|
+
if (wasAtEnd) adjustedSync = this.applyScrollAdjustment(this._getLayoutTotalSize() - prevTotalSize);
|
|
10448
|
+
else if (shouldAdjustScroll) adjustedSync = this.applyScrollAdjustment(delta);
|
|
10449
|
+
}
|
|
10450
|
+
if (this._resizeBatch) {
|
|
10451
|
+
this._resizeBatch.notify = true;
|
|
10452
|
+
(_c = this._resizeBatch).sync || (_c.sync = adjustedSync);
|
|
10453
|
+
return;
|
|
10454
|
+
}
|
|
10455
|
+
this.notify(adjustedSync);
|
|
10456
|
+
this._noteClampMax();
|
|
10457
|
+
this._flushHoldIfReady(true);
|
|
10458
|
+
this._retryClampedAdjustment();
|
|
10459
|
+
}
|
|
10460
|
+
};
|
|
10461
|
+
this.getVirtualItems = memo(() => [
|
|
10462
|
+
this.getVirtualIndexes(),
|
|
10463
|
+
this.getMeasurements(),
|
|
10464
|
+
this._holdOffset
|
|
10465
|
+
], (indexes, measurements, hold) => {
|
|
10466
|
+
const virtualItems = [];
|
|
10467
|
+
for (let k = 0, len = indexes.length; k < len; k++) {
|
|
10468
|
+
const measurement = measurements[indexes[k]];
|
|
10469
|
+
virtualItems.push(hold === 0 ? measurement : {
|
|
10470
|
+
...measurement,
|
|
10471
|
+
start: measurement.start - hold,
|
|
10472
|
+
end: measurement.end - hold
|
|
10473
|
+
});
|
|
10474
|
+
}
|
|
10475
|
+
return virtualItems;
|
|
10476
|
+
}, {
|
|
10477
|
+
key: "getVirtualItems",
|
|
10478
|
+
debug: () => this.options.debug
|
|
10479
|
+
});
|
|
10480
|
+
this.getVirtualItemForOffset = (offset) => {
|
|
10481
|
+
var _a;
|
|
10482
|
+
const measurements = this.getMeasurements();
|
|
10483
|
+
if (measurements.length === 0) return;
|
|
10484
|
+
const flat = (_a = this._singleLaneMeasurements) == null ? void 0 : _a.flat;
|
|
10485
|
+
const useFlat = this.options.lanes === 1 && flat != null;
|
|
10486
|
+
return notUndefined(measurements[findNearestBinarySearch(0, measurements.length - 1, useFlat ? (i) => flat[i * 2] : (i) => notUndefined(measurements[i]).start, offset)]);
|
|
10487
|
+
};
|
|
10488
|
+
this._noteClampMax = () => {
|
|
10489
|
+
if (!this._awaitingCommandReadBack()) return;
|
|
10490
|
+
const elementMax = this._elementMaxScrollOffset();
|
|
10491
|
+
if (elementMax === null) return;
|
|
10492
|
+
const write = this.pendingWrite;
|
|
10493
|
+
const max = Math.max(elementMax, 0) + this._holdOffset;
|
|
10494
|
+
if (max >= write.target) return;
|
|
10495
|
+
const lowMaxes = write.lowMaxes ?? (write.lowMaxes = []);
|
|
10496
|
+
if (lowMaxes[lowMaxes.length - 1] !== max) lowMaxes.push(max);
|
|
10497
|
+
};
|
|
10498
|
+
this.getMaxScrollOffset = () => (this._elementMaxScrollOffset() ?? 0) + this._holdOffset;
|
|
10499
|
+
this._toLayoutOffset = (elementOffset) => {
|
|
10500
|
+
var _a;
|
|
10501
|
+
let offset = elementOffset + this._holdOffset;
|
|
10502
|
+
if (((_a = this.pendingScrollAnchor) == null ? void 0 : _a.kind) === "anchor") offset += this.pendingScrollAnchor.delta;
|
|
10503
|
+
return offset;
|
|
10504
|
+
};
|
|
10505
|
+
this._elementMaxScrollOffset = () => {
|
|
10506
|
+
const el = this.scrollElement;
|
|
10507
|
+
if (el === null) return null;
|
|
10508
|
+
if ("scrollHeight" in el) return this.options.horizontal ? el.scrollWidth - el.clientWidth : el.scrollHeight - el.clientHeight;
|
|
10509
|
+
if ("document" in el) {
|
|
10510
|
+
const doc = el.document.documentElement;
|
|
10511
|
+
return this.options.horizontal ? doc.scrollWidth - el.innerWidth : doc.scrollHeight - el.innerHeight;
|
|
10512
|
+
}
|
|
10513
|
+
return null;
|
|
10514
|
+
};
|
|
10515
|
+
this._momentumStop = null;
|
|
10516
|
+
this._stopMomentum = (done) => {
|
|
10517
|
+
const el = this.scrollElement;
|
|
10518
|
+
const win = this.targetWindow;
|
|
10519
|
+
if (el === null || win === null) return;
|
|
10520
|
+
const scroller = "document" in el ? el.document.scrollingElement : el;
|
|
10521
|
+
if (!(scroller == null ? void 0 : scroller.style)) return;
|
|
10522
|
+
if (this._momentumStop) {
|
|
10523
|
+
this._momentumStop.done = done;
|
|
10524
|
+
return;
|
|
10525
|
+
}
|
|
10526
|
+
const { style } = scroller;
|
|
10527
|
+
const property = this.options.horizontal ? "overflow-x" : "overflow-y";
|
|
10528
|
+
const value = style.getPropertyValue(property);
|
|
10529
|
+
const priority = style.getPropertyPriority(property);
|
|
10530
|
+
const crossSize = () => this.options.horizontal ? scroller.clientHeight : scroller.clientWidth;
|
|
10531
|
+
const crossSizeBefore = crossSize();
|
|
10532
|
+
style.setProperty(property, "hidden", "important");
|
|
10533
|
+
if (crossSize() !== crossSizeBefore) {
|
|
10534
|
+
style.setProperty(property, value, priority);
|
|
10535
|
+
return;
|
|
10536
|
+
}
|
|
10537
|
+
const stop = {
|
|
10538
|
+
restore: () => {
|
|
10539
|
+
if (style.getPropertyValue(property) !== "hidden" || style.getPropertyPriority(property) !== "important") return false;
|
|
10540
|
+
style.setProperty(property, value, priority);
|
|
10541
|
+
return true;
|
|
10542
|
+
},
|
|
10543
|
+
done
|
|
10544
|
+
};
|
|
10545
|
+
this._momentumStop = stop;
|
|
10546
|
+
win.requestAnimationFrame(() => win.requestAnimationFrame(() => {
|
|
10547
|
+
if (this._momentumStop !== stop) return;
|
|
10548
|
+
this._momentumStop = null;
|
|
10549
|
+
if (stop.restore()) stop.done();
|
|
10550
|
+
}));
|
|
10551
|
+
};
|
|
10552
|
+
this._clampedBy = (target) => {
|
|
10553
|
+
const elementMax = this._elementMaxScrollOffset();
|
|
10554
|
+
if (elementMax === null) return null;
|
|
10555
|
+
const maxAtWrite = elementMax + this._holdOffset;
|
|
10556
|
+
return target > maxAtWrite + .5 ? {
|
|
10557
|
+
target,
|
|
10558
|
+
maxAtWrite
|
|
10559
|
+
} : null;
|
|
10560
|
+
};
|
|
10561
|
+
this.getVirtualDistanceFromEnd = () => {
|
|
10562
|
+
return Math.max(this._getLayoutTotalSize() + this.options.scrollMargin - this.getSize() - this.getScrollOffset(), 0);
|
|
10563
|
+
};
|
|
10564
|
+
this.getDistanceFromEnd = () => {
|
|
10565
|
+
return Math.max(this.getMaxScrollOffset() - this.getScrollOffset(), 0);
|
|
10566
|
+
};
|
|
10567
|
+
this.isAtEnd = (threshold = this.options.scrollEndThreshold) => {
|
|
10568
|
+
return this.getDistanceFromEnd() <= threshold;
|
|
10569
|
+
};
|
|
10570
|
+
this.getOffsetForAlignment = (toOffset, align, itemSize = 0) => {
|
|
10571
|
+
if (!this.scrollElement) return 0;
|
|
10572
|
+
const size = this.getSize();
|
|
10573
|
+
const scrollOffset = this.getScrollOffset();
|
|
10574
|
+
if (align === "auto") align = toOffset >= scrollOffset + size ? "end" : "start";
|
|
10575
|
+
if (align === "center") toOffset += (itemSize - size) / 2;
|
|
10576
|
+
else if (align === "end") toOffset -= size;
|
|
10577
|
+
const maxOffset = this.getMaxScrollOffset();
|
|
10578
|
+
return Math.max(Math.min(maxOffset, toOffset), 0);
|
|
10579
|
+
};
|
|
10580
|
+
this.getOffsetForIndex = (index, align = "auto") => {
|
|
10581
|
+
index = Math.max(0, Math.min(index, this.options.count - 1));
|
|
10582
|
+
const size = this.getSize();
|
|
10583
|
+
const scrollOffset = this.getScrollOffset();
|
|
10584
|
+
const item = this.measurementsCache[index];
|
|
10585
|
+
if (!item) return;
|
|
10586
|
+
if (align === "auto") {
|
|
10587
|
+
if (item.end >= scrollOffset + size - this.options.scrollPaddingEnd) align = "end";
|
|
10588
|
+
else if (item.start <= scrollOffset + this.options.scrollPaddingStart) align = "start";
|
|
10589
|
+
else return [scrollOffset, align];
|
|
10590
|
+
}
|
|
10591
|
+
if (align === "end" && index === this.options.count - 1) {
|
|
10592
|
+
const maxOffset = this.getMaxScrollOffset();
|
|
10593
|
+
const toOffset2 = maxOffset - this.options.paddingEnd + this.options.scrollPaddingEnd;
|
|
10594
|
+
return [Math.max(Math.min(toOffset2, maxOffset), 0), align];
|
|
10595
|
+
}
|
|
10596
|
+
const toOffset = align === "end" ? item.end + this.options.scrollPaddingEnd : item.start - this.options.scrollPaddingStart;
|
|
10597
|
+
return [this.getOffsetForAlignment(toOffset, align, item.size), align];
|
|
10598
|
+
};
|
|
10599
|
+
this.scrollToOffset = (toOffset, { align = "start", behavior = "auto" } = {}) => {
|
|
10600
|
+
this._startScroll({
|
|
10601
|
+
index: null,
|
|
10602
|
+
align
|
|
10603
|
+
}, this.getOffsetForAlignment(toOffset, align), behavior, "absolute");
|
|
10604
|
+
};
|
|
10605
|
+
this.scrollToIndex = (index, { align: initialAlign = "auto", behavior = "auto" } = {}) => {
|
|
10606
|
+
index = Math.max(0, Math.min(index, this.options.count - 1));
|
|
10607
|
+
const offsetInfo = this.getOffsetForIndex(index, initialAlign);
|
|
10608
|
+
if (!offsetInfo) return;
|
|
10609
|
+
const [offset, align] = offsetInfo;
|
|
10610
|
+
this._startScroll({
|
|
10611
|
+
index,
|
|
10612
|
+
align
|
|
10613
|
+
}, offset, behavior, "absolute");
|
|
10614
|
+
};
|
|
10615
|
+
this.scrollBy = (delta, { behavior = "auto" } = {}) => {
|
|
10616
|
+
const offset = this.getOffsetForAlignment((this.getCommandWrittenOffset() ?? this.getScrollOffset()) + delta, "start");
|
|
10617
|
+
this._startScroll({
|
|
10618
|
+
index: null,
|
|
10619
|
+
align: "start"
|
|
10620
|
+
}, offset, behavior, "relative");
|
|
10621
|
+
};
|
|
10622
|
+
this.scrollToEnd = ({ behavior = "auto" } = {}) => {
|
|
10623
|
+
if (this.options.count > 0) {
|
|
10624
|
+
this._startScroll({
|
|
10625
|
+
index: this.options.count - 1,
|
|
10626
|
+
align: "end",
|
|
10627
|
+
toEnd: true
|
|
10628
|
+
}, Math.max(this.getMaxScrollOffset(), 0), behavior, "absolute");
|
|
10629
|
+
return;
|
|
10630
|
+
}
|
|
10631
|
+
this.scrollToOffset(Math.max(this.getTotalSize() - this.getSize(), 0), { behavior });
|
|
10632
|
+
};
|
|
10633
|
+
this.cancelScroll = () => {
|
|
10634
|
+
if (this.rafId != null && this.targetWindow) {
|
|
10635
|
+
this.targetWindow.cancelAnimationFrame(this.rafId);
|
|
10636
|
+
this.rafId = null;
|
|
10637
|
+
}
|
|
10638
|
+
this.scrollState = null;
|
|
10639
|
+
};
|
|
10640
|
+
this.getTotalSize = () => Math.max(this._getLayoutTotalSize() - this._holdOffset, 0);
|
|
10641
|
+
this._getLayoutTotalSize = () => {
|
|
10642
|
+
var _a, _b;
|
|
10643
|
+
const measurements = this.getMeasurements();
|
|
10644
|
+
let end;
|
|
10645
|
+
if (measurements.length === 0) end = this.options.paddingStart;
|
|
10646
|
+
else if (this.options.lanes === 1) {
|
|
10647
|
+
const lastIdx = measurements.length - 1;
|
|
10648
|
+
const flat = (_a = this._singleLaneMeasurements) == null ? void 0 : _a.flat;
|
|
10649
|
+
if (flat != null) end = flat[lastIdx * 2] + flat[lastIdx * 2 + 1];
|
|
10650
|
+
else end = ((_b = measurements[lastIdx]) == null ? void 0 : _b.end) ?? 0;
|
|
10651
|
+
} else {
|
|
10652
|
+
const endByLane = Array(this.options.lanes).fill(null);
|
|
10653
|
+
let endIndex = measurements.length - 1;
|
|
10654
|
+
while (endIndex >= 0 && endByLane.some((val) => val === null)) {
|
|
10655
|
+
const item = measurements[endIndex];
|
|
10656
|
+
if (endByLane[item.lane] === null) endByLane[item.lane] = item.end;
|
|
10657
|
+
endIndex--;
|
|
10658
|
+
}
|
|
10659
|
+
end = Math.max(...endByLane.filter((val) => val !== null));
|
|
10660
|
+
}
|
|
10661
|
+
return Math.max(end - this.options.scrollMargin + this.options.paddingEnd, 0);
|
|
10662
|
+
};
|
|
10663
|
+
this.takeSnapshot = () => {
|
|
10664
|
+
const snapshot = [];
|
|
10665
|
+
if (this.itemSizeCache.size === 0) return snapshot;
|
|
10666
|
+
const m = this.getMeasurements();
|
|
10667
|
+
for (const item of m) if (item && this.itemSizeCache.has(item.key)) snapshot.push({
|
|
10668
|
+
index: item.index,
|
|
10669
|
+
key: item.key,
|
|
10670
|
+
start: item.start,
|
|
10671
|
+
size: item.size,
|
|
10672
|
+
end: item.end,
|
|
10673
|
+
lane: item.lane
|
|
10674
|
+
});
|
|
10675
|
+
return snapshot;
|
|
10676
|
+
};
|
|
10677
|
+
this._scrollToOffset = (offset, { adjustments, behavior } = {}) => {
|
|
10678
|
+
const write = {
|
|
10679
|
+
target: offset + (adjustments ?? 0),
|
|
10680
|
+
smooth: behavior === "smooth"
|
|
10681
|
+
};
|
|
10682
|
+
this.pendingWrite = write;
|
|
10683
|
+
this.options.scrollToFn(offset - this._holdOffset, {
|
|
10684
|
+
behavior,
|
|
10685
|
+
adjustments
|
|
10686
|
+
}, this);
|
|
10687
|
+
return write;
|
|
10688
|
+
};
|
|
10689
|
+
this.getCommandWrittenOffset = () => this.scrollState !== null && this.pendingWrite !== null && !this.pendingWrite.smooth ? this.pendingWrite.target : null;
|
|
10690
|
+
this._awaitingCommandReadBack = () => {
|
|
10691
|
+
const writtenOffset = this.getCommandWrittenOffset();
|
|
10692
|
+
return !(isIOSWebKit() && this._iosGesture.dragging()) && writtenOffset !== null && !approxEqual(writtenOffset, this.getScrollOffset());
|
|
10693
|
+
};
|
|
10694
|
+
this._followOffsetTarget = (delta) => {
|
|
10695
|
+
if (this.scrollState !== null && this.scrollState.index == null) this.scrollState.lastTargetOffset += delta;
|
|
10696
|
+
};
|
|
10697
|
+
this.measure = () => {
|
|
10698
|
+
this.pendingMin = null;
|
|
10699
|
+
this.itemSizeCache.clear();
|
|
10700
|
+
this.laneAssignments.clear();
|
|
10701
|
+
this.itemSizeCacheVersion++;
|
|
10702
|
+
this.notify(false);
|
|
10703
|
+
};
|
|
10704
|
+
this.setOptions(opts);
|
|
10705
|
+
}
|
|
10706
|
+
/**
|
|
10707
|
+
* @deprecated Always 0: a scroll correction is folded into `scrollOffset`
|
|
10708
|
+
* at once, so there is never an outstanding adjustment to add to it. Read
|
|
10709
|
+
* `scrollOffset` alone.
|
|
10710
|
+
*/
|
|
10711
|
+
get scrollAdjustments() {
|
|
10712
|
+
return 0;
|
|
10713
|
+
}
|
|
10714
|
+
applyScrollAdjustment(delta, behavior) {
|
|
10715
|
+
if (delta === 0) return false;
|
|
10716
|
+
if (this.options.debug) console.info("correction", delta);
|
|
10717
|
+
this._followOffsetTarget(delta);
|
|
10718
|
+
if (!this._canWriteScroll()) {
|
|
10719
|
+
this._holdOffset += delta;
|
|
10720
|
+
if (this.scrollOffset !== null) this.scrollOffset += delta;
|
|
10721
|
+
return true;
|
|
10722
|
+
} else {
|
|
10723
|
+
const offset = this.getScrollOffset();
|
|
10724
|
+
this._clampedAdjustment = this._clampedBy(offset + delta);
|
|
10725
|
+
const write = this._scrollToOffset(offset, {
|
|
10726
|
+
adjustments: delta,
|
|
10727
|
+
behavior
|
|
10728
|
+
});
|
|
10729
|
+
if (this.scrollOffset !== null) {
|
|
10730
|
+
if (this.pendingWrite === write) this.scrollOffset += delta;
|
|
10731
|
+
if (this.scrollOffset < 0) this.scrollOffset = 0;
|
|
10732
|
+
}
|
|
10733
|
+
return true;
|
|
10734
|
+
}
|
|
10735
|
+
}
|
|
10736
|
+
scheduleScrollReconcile() {
|
|
10737
|
+
if (!this.targetWindow) {
|
|
10738
|
+
this.scrollState = null;
|
|
10739
|
+
return;
|
|
10740
|
+
}
|
|
10741
|
+
if (this.rafId != null) return;
|
|
10742
|
+
this.rafId = this.targetWindow.requestAnimationFrame(() => {
|
|
10743
|
+
this.rafId = null;
|
|
10744
|
+
this.reconcileScroll();
|
|
10745
|
+
});
|
|
10746
|
+
}
|
|
10747
|
+
getScrollStateTarget(state) {
|
|
10748
|
+
const offsetInfo = state.toEnd ? [Math.max(this.getMaxScrollOffset(), 0)] : state.index != null ? this.getOffsetForIndex(state.index, state.align) : void 0;
|
|
10749
|
+
return offsetInfo ? offsetInfo[0] : state.lastTargetOffset;
|
|
10750
|
+
}
|
|
10751
|
+
reconcileScroll() {
|
|
10752
|
+
if (!this.scrollState) return;
|
|
10753
|
+
if (!this.scrollElement) return;
|
|
10754
|
+
if (this.now() - this.scrollState.startedAt > 5e3) {
|
|
10755
|
+
this.scrollState = null;
|
|
10756
|
+
return;
|
|
10757
|
+
}
|
|
10758
|
+
if (this.scrollState.phase === "queued") {
|
|
10759
|
+
this.scheduleScrollReconcile();
|
|
10760
|
+
return;
|
|
10761
|
+
}
|
|
10762
|
+
this.getMeasurements();
|
|
10763
|
+
const targetOffset = this.getScrollStateTarget(this.scrollState);
|
|
10764
|
+
const STABLE_FRAMES = this.scrollState.index == null ? 1 : this.options.useAnimationFrameWithResizeObserver ? 3 : 2;
|
|
10765
|
+
const targetChanged = targetOffset !== this.scrollState.lastTargetOffset;
|
|
10766
|
+
if (!targetChanged && approxEqual(targetOffset, this.getScrollOffset())) {
|
|
10767
|
+
if (this.scrollState.phase === "smooth") this.scrollState.phase = "smoothLanded";
|
|
10768
|
+
else if (this.scrollState.phase === "smoothFinishing") this.scrollState.phase = "instant";
|
|
10769
|
+
this.scrollState.stableFrames++;
|
|
10770
|
+
if (this.scrollState.stableFrames >= STABLE_FRAMES) {
|
|
10771
|
+
if (this.getScrollOffset() !== targetOffset) this._scrollToOffset(targetOffset, { behavior: "auto" });
|
|
10772
|
+
this.scrollState = null;
|
|
10773
|
+
return;
|
|
10774
|
+
}
|
|
10775
|
+
} else {
|
|
10776
|
+
this.scrollState.stableFrames = 0;
|
|
10777
|
+
if (targetChanged) {
|
|
10778
|
+
const viewport = this.getSize() || 600;
|
|
10779
|
+
const distance = Math.abs(targetOffset - this.getScrollOffset());
|
|
10780
|
+
const keepSmooth = isSmoothScroll(this.scrollState) && distance > viewport;
|
|
10781
|
+
this.scrollState.lastTargetOffset = targetOffset;
|
|
10782
|
+
if (keepSmooth) this.scrollState.phase = "smooth";
|
|
10783
|
+
else if (this.scrollState.phase === "smooth") this.scrollState.phase = "smoothFinishing";
|
|
10784
|
+
else if (this.scrollState.phase === "smoothLanded") this.scrollState.phase = "instant";
|
|
10785
|
+
this._scrollToOffset(targetOffset, { behavior: keepSmooth ? "smooth" : "auto" });
|
|
10786
|
+
}
|
|
10787
|
+
}
|
|
10788
|
+
this.scheduleScrollReconcile();
|
|
10789
|
+
}
|
|
10790
|
+
_startScroll(target, offset, behavior, kind) {
|
|
10791
|
+
this.pendingScrollAnchor = null;
|
|
10792
|
+
this._clampedAdjustment = null;
|
|
10793
|
+
const tail = this._iosGesture.tail();
|
|
10794
|
+
if (kind === "absolute" && tail !== null) {
|
|
10795
|
+
if (tail === "fling" && momentumOverridesWrites()) {
|
|
10796
|
+
this._stopMomentum(() => {
|
|
10797
|
+
const state = this.scrollState;
|
|
10798
|
+
if ((state == null ? void 0 : state.phase) !== "queued" || this._iosGesture.tail() !== "fling" || this._reportedOverscroll) return;
|
|
10799
|
+
this._iosGesture.end();
|
|
10800
|
+
this._flushHoldIfReady(true);
|
|
10801
|
+
this._writeAwaitingCommand();
|
|
10802
|
+
});
|
|
10803
|
+
this.scrollState = {
|
|
10804
|
+
...target,
|
|
10805
|
+
startedAt: this.now(),
|
|
10806
|
+
lastTargetOffset: offset,
|
|
10807
|
+
stableFrames: 0,
|
|
10808
|
+
phase: "queued",
|
|
10809
|
+
behavior,
|
|
10810
|
+
samples: []
|
|
10811
|
+
};
|
|
10812
|
+
this.scheduleScrollReconcile();
|
|
10813
|
+
return;
|
|
10814
|
+
}
|
|
10815
|
+
this._iosGesture.end();
|
|
10816
|
+
}
|
|
10817
|
+
this.scrollState = {
|
|
10818
|
+
...target,
|
|
10819
|
+
startedAt: this.now(),
|
|
10820
|
+
lastTargetOffset: offset,
|
|
10821
|
+
stableFrames: 0,
|
|
10822
|
+
behavior,
|
|
10823
|
+
phase: initialScrollPhase(behavior, target.index != null && approxEqual(offset, this.getScrollOffset()))
|
|
10824
|
+
};
|
|
10825
|
+
this._scrollToOffset(offset, { behavior });
|
|
10826
|
+
this.scheduleScrollReconcile();
|
|
10827
|
+
}
|
|
10828
|
+
};
|
|
10829
|
+
const findNearestBinarySearch = (low, high, getCurrentValue, value) => {
|
|
10830
|
+
while (low <= high) {
|
|
10831
|
+
const middle = (low + high) / 2 | 0;
|
|
10832
|
+
const currentValue = getCurrentValue(middle);
|
|
10833
|
+
if (currentValue < value) low = middle + 1;
|
|
10834
|
+
else if (currentValue > value) high = middle - 1;
|
|
10835
|
+
else return middle;
|
|
10836
|
+
}
|
|
10837
|
+
if (low > 0) return low - 1;
|
|
10838
|
+
else return 0;
|
|
10839
|
+
};
|
|
10840
|
+
function findNearestBinarySearchFlat(flat, high, value) {
|
|
10841
|
+
let low = 0;
|
|
10842
|
+
while (low <= high) {
|
|
10843
|
+
const middle = (low + high) / 2 | 0;
|
|
10844
|
+
const currentValue = flat[middle * 2];
|
|
10845
|
+
if (currentValue < value) low = middle + 1;
|
|
10846
|
+
else if (currentValue > value) high = middle - 1;
|
|
10847
|
+
else return middle;
|
|
10848
|
+
}
|
|
10849
|
+
return low > 0 ? low - 1 : 0;
|
|
10850
|
+
}
|
|
10851
|
+
function calculateRangeImpl(measurements, outerSize, scrollOffset, lanes, flat) {
|
|
10852
|
+
const lastIndex = measurements.length - 1;
|
|
10853
|
+
if (measurements.length <= lanes) return {
|
|
10854
|
+
startIndex: 0,
|
|
10855
|
+
endIndex: lastIndex
|
|
10856
|
+
};
|
|
10857
|
+
if (lanes === 1 && flat !== null) {
|
|
10858
|
+
const startIndex2 = findNearestBinarySearchFlat(flat, lastIndex, scrollOffset);
|
|
10859
|
+
let endIndex2 = startIndex2;
|
|
10860
|
+
const limit = scrollOffset + outerSize;
|
|
10861
|
+
while (endIndex2 < lastIndex && flat[endIndex2 * 2] + flat[endIndex2 * 2 + 1] < limit) endIndex2++;
|
|
10862
|
+
return {
|
|
10863
|
+
startIndex: startIndex2,
|
|
10864
|
+
endIndex: endIndex2
|
|
10865
|
+
};
|
|
10866
|
+
}
|
|
10867
|
+
const getStart = (index) => measurements[index].start;
|
|
10868
|
+
let startIndex = findNearestBinarySearch(0, lastIndex, getStart, scrollOffset);
|
|
10869
|
+
let endIndex = startIndex;
|
|
10870
|
+
if (lanes === 1) while (endIndex < lastIndex && measurements[endIndex].end < scrollOffset + outerSize) endIndex++;
|
|
10871
|
+
else if (lanes > 1) {
|
|
10872
|
+
const endPerLane = Array(lanes).fill(0);
|
|
10873
|
+
while (endIndex < lastIndex && endPerLane.some((pos) => pos < scrollOffset + outerSize)) {
|
|
10874
|
+
const item = measurements[endIndex];
|
|
10875
|
+
endPerLane[item.lane] = item.end;
|
|
10876
|
+
endIndex++;
|
|
10877
|
+
}
|
|
10878
|
+
const startPerLane = Array(lanes).fill(scrollOffset + outerSize);
|
|
10879
|
+
while (startIndex >= 0 && startPerLane.some((pos) => pos >= scrollOffset)) {
|
|
10880
|
+
const item = measurements[startIndex];
|
|
10881
|
+
startPerLane[item.lane] = item.start;
|
|
10882
|
+
startIndex--;
|
|
10883
|
+
}
|
|
10884
|
+
startIndex = Math.max(0, startIndex - startIndex % lanes);
|
|
10885
|
+
endIndex = Math.min(lastIndex, endIndex + (lanes - 1 - endIndex % lanes));
|
|
10886
|
+
}
|
|
10887
|
+
return {
|
|
10888
|
+
startIndex,
|
|
10889
|
+
endIndex
|
|
10890
|
+
};
|
|
10891
|
+
}
|
|
10892
|
+
// ../../node_modules/.pnpm/@tanstack+solid-virtual@3.13.52_solid-js@1.9.18/node_modules/@tanstack/solid-virtual/dist/esm/index.js
|
|
10893
|
+
function createVirtualizerBase(options) {
|
|
10894
|
+
const resolvedOptions = mergeProps(options);
|
|
10895
|
+
const instance = new Virtualizer(resolvedOptions);
|
|
10896
|
+
const [virtualItems, setVirtualItems] = createStore(instance.getVirtualItems());
|
|
10897
|
+
const [totalSize, setTotalSize] = createSignal(instance.getTotalSize());
|
|
10898
|
+
const virtualizer = new Proxy(instance, { get(target, prop) {
|
|
10899
|
+
switch (prop) {
|
|
10900
|
+
case "getVirtualItems": return () => virtualItems;
|
|
10901
|
+
case "getTotalSize": return () => totalSize();
|
|
10902
|
+
default: return Reflect.get(target, prop);
|
|
10903
|
+
}
|
|
10904
|
+
} });
|
|
10905
|
+
virtualizer.setOptions(resolvedOptions);
|
|
10906
|
+
onMount(() => {
|
|
10907
|
+
const cleanup = virtualizer._didMount();
|
|
10908
|
+
virtualizer._willUpdate();
|
|
10909
|
+
onCleanup(cleanup);
|
|
10910
|
+
});
|
|
10911
|
+
createComputed(() => {
|
|
10912
|
+
virtualizer.setOptions(mergeProps(resolvedOptions, options, { onChange: (instance2, sync) => {
|
|
10913
|
+
var _a;
|
|
10914
|
+
instance2._willUpdate();
|
|
10915
|
+
setVirtualItems(reconcile(instance2.getVirtualItems(), { key: "index" }));
|
|
10916
|
+
setTotalSize(instance2.getTotalSize());
|
|
10917
|
+
(_a = options.onChange) == null || _a.call(options, instance2, sync);
|
|
10918
|
+
} }));
|
|
10919
|
+
virtualizer._willUpdate();
|
|
10920
|
+
setVirtualItems(reconcile(instance.getVirtualItems(), { key: "index" }));
|
|
10921
|
+
setTotalSize(instance.getTotalSize());
|
|
10922
|
+
});
|
|
10923
|
+
return virtualizer;
|
|
10924
|
+
}
|
|
10925
|
+
function createVirtualizer(options) {
|
|
10926
|
+
return createVirtualizerBase(mergeProps({
|
|
10927
|
+
observeElementRect,
|
|
10928
|
+
observeElementOffset,
|
|
10929
|
+
scrollToFn: elementScroll
|
|
10930
|
+
}, options));
|
|
10931
|
+
}
|
|
10932
|
+
// src/VirtualList.tsx
|
|
10933
|
+
var _tmpl$$1 = /*#__PURE__*/ template(`<div><div style=position:relative;width:100%>`);
|
|
10934
|
+
var _tmpl$2$1 = /*#__PURE__*/ template(`<div style=position:absolute;top:0;left:0;width:100%>`);
|
|
10935
|
+
/**
|
|
10936
|
+
* Renders measured rows for the visible portion of an ordered list.
|
|
10937
|
+
* @param props - The items, stable keys, classes, and row content.
|
|
10938
|
+
* @returns The scroll viewport and its visible rows.
|
|
10939
|
+
*/
|
|
10940
|
+
function VirtualList(props) {
|
|
10941
|
+
let scrollElement;
|
|
10942
|
+
const keyForIndex = createMemo(() => {
|
|
10943
|
+
const keys = props.each.map(props.getKey);
|
|
10944
|
+
return (index) => keys[index] ?? index;
|
|
10945
|
+
});
|
|
10946
|
+
const virtualizer = createVirtualizer({
|
|
10947
|
+
get count() {
|
|
10948
|
+
return props.each.length;
|
|
10949
|
+
},
|
|
10950
|
+
getScrollElement: () => scrollElement,
|
|
10951
|
+
get getItemKey() {
|
|
10952
|
+
return keyForIndex();
|
|
10953
|
+
},
|
|
10954
|
+
estimateSize: () => 28,
|
|
10955
|
+
overscan: 5,
|
|
10956
|
+
useAnimationFrameWithResizeObserver: true
|
|
10957
|
+
});
|
|
10958
|
+
const rows = createMemo(() => {
|
|
10959
|
+
const items = props.each;
|
|
10960
|
+
const visible = [];
|
|
10961
|
+
for (const entry of virtualizer.getVirtualItems()) {
|
|
10962
|
+
const item = items[entry.index];
|
|
10963
|
+
if (item !== void 0) visible.push({
|
|
10964
|
+
item,
|
|
10965
|
+
key: props.getKey(item),
|
|
10966
|
+
index: entry.index,
|
|
10967
|
+
start: entry.start
|
|
10968
|
+
});
|
|
10969
|
+
}
|
|
10970
|
+
return visible;
|
|
10971
|
+
});
|
|
10972
|
+
return (() => {
|
|
10973
|
+
var _el$ = _tmpl$$1(), _el$2 = _el$.firstChild;
|
|
10974
|
+
var _ref$ = scrollElement;
|
|
10975
|
+
typeof _ref$ === "function" ? use(_ref$, _el$) : scrollElement = _el$;
|
|
10976
|
+
insert(_el$2, createComponent(Key, {
|
|
10977
|
+
get each() {
|
|
10978
|
+
return rows();
|
|
10979
|
+
},
|
|
10980
|
+
by: (row) => row.key,
|
|
10981
|
+
children: (row) => {
|
|
10982
|
+
let element;
|
|
10983
|
+
createEffect(on(() => row().index, (index) => {
|
|
10984
|
+
element.setAttribute("data-index", String(index));
|
|
10985
|
+
virtualizer.measureElement(element);
|
|
10986
|
+
}));
|
|
10987
|
+
onCleanup(() => virtualizer.measureElement(null));
|
|
10988
|
+
return (() => {
|
|
10989
|
+
var _el$3 = _tmpl$2$1();
|
|
10990
|
+
var _ref$2 = element;
|
|
10991
|
+
typeof _ref$2 === "function" ? use(_ref$2, _el$3) : element = _el$3;
|
|
10992
|
+
insert(_el$3, () => props.children(() => row().item));
|
|
10993
|
+
createRenderEffect((_p$) => {
|
|
10994
|
+
var _v$4 = row().index, _v$5 = `translateY(${row().start}px)`;
|
|
10995
|
+
_v$4 !== _p$.e && setAttribute(_el$3, "data-index", _p$.e = _v$4);
|
|
10996
|
+
_v$5 !== _p$.t && setStyleProperty(_el$3, "transform", _p$.t = _v$5);
|
|
10997
|
+
return _p$;
|
|
10998
|
+
}, {
|
|
10999
|
+
e: void 0,
|
|
11000
|
+
t: void 0
|
|
11001
|
+
});
|
|
11002
|
+
return _el$3;
|
|
11003
|
+
})();
|
|
11004
|
+
}
|
|
11005
|
+
}));
|
|
11006
|
+
createRenderEffect((_p$) => {
|
|
11007
|
+
var _v$ = props.class, _v$2 = props.contentClass, _v$3 = `${virtualizer.getTotalSize()}px`;
|
|
11008
|
+
_v$ !== _p$.e && className(_el$, _p$.e = _v$);
|
|
11009
|
+
_v$2 !== _p$.t && className(_el$2, _p$.t = _v$2);
|
|
11010
|
+
_v$3 !== _p$.a && setStyleProperty(_el$2, "height", _p$.a = _v$3);
|
|
11011
|
+
return _p$;
|
|
11012
|
+
}, {
|
|
11013
|
+
e: void 0,
|
|
11014
|
+
t: void 0,
|
|
11015
|
+
a: void 0
|
|
11016
|
+
});
|
|
11017
|
+
return _el$;
|
|
11018
|
+
})();
|
|
11019
|
+
}
|
|
8691
11020
|
// src/Devtools.tsx
|
|
8692
11021
|
var _tmpl$ = /*#__PURE__*/ template(`<div><div aria-hidden=true></div><button type=button aria-label="Open Tanstack query devtools"class=tsqd-open-btn>`);
|
|
8693
11022
|
var _tmpl$2 = /*#__PURE__*/ template(`<div>`);
|
|
@@ -8712,23 +11041,21 @@ var _tmpl$18 = /*#__PURE__*/ template(`<span>System`);
|
|
|
8712
11041
|
var _tmpl$19 = /*#__PURE__*/ template(`<span>Disabled Queries`);
|
|
8713
11042
|
var _tmpl$20 = /*#__PURE__*/ template(`<span>Show`);
|
|
8714
11043
|
var _tmpl$21 = /*#__PURE__*/ template(`<span>Hide`);
|
|
8715
|
-
var _tmpl$22 = /*#__PURE__*/ template(`<div><div class=tsqd-
|
|
8716
|
-
var _tmpl$23 = /*#__PURE__*/ template(`<
|
|
8717
|
-
var _tmpl$24 = /*#__PURE__*/ template(`<div
|
|
8718
|
-
var _tmpl$25 = /*#__PURE__*/ template(`<
|
|
8719
|
-
var _tmpl$26 = /*#__PURE__*/ template(`<div class=tsqd-query-
|
|
8720
|
-
var _tmpl$27 = /*#__PURE__*/ template(`<div
|
|
8721
|
-
var _tmpl$28 = /*#__PURE__*/ template(`<
|
|
8722
|
-
var _tmpl$29 = /*#__PURE__*/ template(`<
|
|
8723
|
-
var _tmpl$30 = /*#__PURE__*/ template(`<span
|
|
8724
|
-
var _tmpl$31 = /*#__PURE__*/ template(`<
|
|
8725
|
-
var _tmpl$32 = /*#__PURE__*/ template(`<
|
|
8726
|
-
var _tmpl$33 = /*#__PURE__*/ template(`<
|
|
8727
|
-
var _tmpl$34 = /*#__PURE__*/ template(`<div class="tsqd-query-details-explorer-container tsqd-query-details-
|
|
8728
|
-
var _tmpl$35 = /*#__PURE__*/ template(`<
|
|
8729
|
-
var _tmpl$36 = /*#__PURE__*/ template(`<div><div role=heading aria-level=2>
|
|
8730
|
-
var _tmpl$37 = /*#__PURE__*/ template(`<option>`);
|
|
8731
|
-
var _tmpl$38 = /*#__PURE__*/ template(`<div><div role=heading aria-level=2>Mutation Details</div><div><div class=tsqd-query-details-summary><pre><code></code></pre><span role=status aria-live=polite></span></div><div class=tsqd-query-details-last-updated><span>Submitted At:</span><span></span></div></div><div role=heading aria-level=2>Variables Details</div><div class="tsqd-query-details-explorer-container tsqd-query-details-query-explorer"></div><div role=heading aria-level=2>Context Details</div><div class="tsqd-query-details-explorer-container tsqd-query-details-query-explorer"></div><div role=heading aria-level=2>Data Explorer</div><div class="tsqd-query-details-explorer-container tsqd-query-details-query-explorer"></div><div role=heading aria-level=2>Mutations Explorer</div><div class="tsqd-query-details-explorer-container tsqd-query-details-query-explorer">`);
|
|
11044
|
+
var _tmpl$22 = /*#__PURE__*/ template(`<div><div><div><button aria-label="Close Tanstack query devtools"><span>TANSTACK</span><span> v</span></button></div></div><div><div><div><input aria-label="Filter queries by query key"type=text placeholder=Filter name=tsqd-query-filter-input></div><div></div><button class=tsqd-query-filter-sort-order-btn></button></div><div><button aria-label="Clear query cache"></button><button>`);
|
|
11045
|
+
var _tmpl$23 = /*#__PURE__*/ template(`<option>Sort by `);
|
|
11046
|
+
var _tmpl$24 = /*#__PURE__*/ template(`<div class=tsqd-query-disabled-indicator aria-hidden=true>disabled`);
|
|
11047
|
+
var _tmpl$25 = /*#__PURE__*/ template(`<div class=tsqd-query-static-indicator aria-hidden=true>static`);
|
|
11048
|
+
var _tmpl$26 = /*#__PURE__*/ template(`<button><div></div><code class=tsqd-query-hash>`);
|
|
11049
|
+
var _tmpl$27 = /*#__PURE__*/ template(`<div role=tooltip id=tsqd-status-tooltip>`);
|
|
11050
|
+
var _tmpl$28 = /*#__PURE__*/ template(`<span>`);
|
|
11051
|
+
var _tmpl$29 = /*#__PURE__*/ template(`<button><span aria-hidden=true></span><span>`);
|
|
11052
|
+
var _tmpl$30 = /*#__PURE__*/ template(`<button><span aria-hidden=true></span> Error`);
|
|
11053
|
+
var _tmpl$31 = /*#__PURE__*/ template(`<div><span aria-hidden=true></span>Trigger Error<select aria-label="Select error type to trigger"><option value disabled selected>`);
|
|
11054
|
+
var _tmpl$32 = /*#__PURE__*/ template(`<div class="tsqd-query-details-explorer-container tsqd-query-details-data-explorer">`);
|
|
11055
|
+
var _tmpl$33 = /*#__PURE__*/ template(`<form><textarea name=data aria-label="Edit query data as JSON"></textarea><div><span></span><div><button type=button>Cancel</button><button>Save`);
|
|
11056
|
+
var _tmpl$34 = /*#__PURE__*/ template(`<div><div role=heading aria-level=2>Query Details</div><div><div class=tsqd-query-details-summary><pre><code></code></pre><span role=status aria-live=polite></span></div><div class=tsqd-query-details-observers-count><span>Observers:</span><span></span></div><div class=tsqd-query-details-last-updated><span>Last Updated:</span><span></span></div></div><div role=heading aria-level=2>Actions</div><div><button><span aria-hidden=true></span>Refetch</button><button><span aria-hidden=true></span>Invalidate</button><button><span aria-hidden=true></span>Reset</button><button><span aria-hidden=true></span>Remove</button><button><span aria-hidden=true></span> Loading</button></div><div role=heading aria-level=2>Data </div><div role=heading aria-level=2>Query Explorer</div><div class="tsqd-query-details-explorer-container tsqd-query-details-query-explorer">`);
|
|
11057
|
+
var _tmpl$35 = /*#__PURE__*/ template(`<option>`);
|
|
11058
|
+
var _tmpl$36 = /*#__PURE__*/ template(`<div><div role=heading aria-level=2>Mutation Details</div><div><div class=tsqd-query-details-summary><pre><code></code></pre><span role=status aria-live=polite></span></div><div class=tsqd-query-details-last-updated><span>Submitted At:</span><span></span></div></div><div role=heading aria-level=2>Variables Details</div><div class="tsqd-query-details-explorer-container tsqd-query-details-query-explorer"></div><div role=heading aria-level=2>Context Details</div><div class="tsqd-query-details-explorer-container tsqd-query-details-query-explorer"></div><div role=heading aria-level=2>Data Explorer</div><div class="tsqd-query-details-explorer-container tsqd-query-details-query-explorer"></div><div role=heading aria-level=2>Mutations Explorer</div><div class="tsqd-query-details-explorer-container tsqd-query-details-query-explorer">`);
|
|
8732
11059
|
/**
|
|
8733
11060
|
* The floating devtools: a toggle button that opens a resizable panel, or the
|
|
8734
11061
|
* panel in a picture-in-picture window when one is open.
|
|
@@ -8776,7 +11103,7 @@ const Devtools = (props) => {
|
|
|
8776
11103
|
const pip_open = createMemo(() => props.localStore.pip_open ?? "false");
|
|
8777
11104
|
return [createComponent(Show, {
|
|
8778
11105
|
get when() {
|
|
8779
|
-
return memo(() => !!pip().pipWindow)() && pip_open() == "true";
|
|
11106
|
+
return memo$1(() => !!pip().pipWindow)() && pip_open() == "true";
|
|
8780
11107
|
},
|
|
8781
11108
|
get children() {
|
|
8782
11109
|
return createComponent(Portal, {
|
|
@@ -8799,7 +11126,7 @@ const Devtools = (props) => {
|
|
|
8799
11126
|
get children() {
|
|
8800
11127
|
return createComponent(Show, {
|
|
8801
11128
|
get when() {
|
|
8802
|
-
return memo(() => !!(isOpen() && !pip().pipWindow))() && pip_open() == "false";
|
|
11129
|
+
return memo$1(() => !!(isOpen() && !pip().pipWindow))() && pip_open() == "false";
|
|
8803
11130
|
},
|
|
8804
11131
|
get children() {
|
|
8805
11132
|
return createComponent(DraggablePanel, {
|
|
@@ -9166,7 +11493,7 @@ const ContentView = (props) => {
|
|
|
9166
11493
|
};
|
|
9167
11494
|
return [
|
|
9168
11495
|
(() => {
|
|
9169
|
-
var _el$0 = _tmpl$
|
|
11496
|
+
var _el$0 = _tmpl$22(), _el$1 = _el$0.firstChild, _el$10 = _el$1.firstChild, _el$11 = _el$10.firstChild, _el$12 = _el$11.firstChild, _el$13 = _el$12.nextSibling, _el$14 = _el$13.firstChild, _el$15 = _el$1.nextSibling, _el$16 = _el$15.firstChild, _el$17 = _el$16.firstChild, _el$18 = _el$17.firstChild, _el$19 = _el$17.nextSibling, _el$22 = _el$19.nextSibling, _el$25 = _el$16.nextSibling, _el$26 = _el$25.firstChild, _el$27 = _el$26.nextSibling;
|
|
9170
11497
|
var _ref$5 = containerRef;
|
|
9171
11498
|
typeof _ref$5 === "function" ? use(_ref$5, _el$0) : containerRef = _el$0;
|
|
9172
11499
|
_el$11.$$click = () => {
|
|
@@ -9256,11 +11583,11 @@ const ContentView = (props) => {
|
|
|
9256
11583
|
props.setLocalStore("sort", e.currentTarget.value);
|
|
9257
11584
|
});
|
|
9258
11585
|
insert(_el$20, () => Object.keys(sortFns).map((key) => (() => {
|
|
9259
|
-
var _el$
|
|
9260
|
-
_el$
|
|
9261
|
-
_el$
|
|
9262
|
-
insert(_el$
|
|
9263
|
-
return _el$
|
|
11586
|
+
var _el$42 = _tmpl$23();
|
|
11587
|
+
_el$42.firstChild;
|
|
11588
|
+
_el$42.value = key;
|
|
11589
|
+
insert(_el$42, key, null);
|
|
11590
|
+
return _el$42;
|
|
9264
11591
|
})()));
|
|
9265
11592
|
createRenderEffect(() => _el$20.value = sort());
|
|
9266
11593
|
return _el$20;
|
|
@@ -9276,11 +11603,11 @@ const ContentView = (props) => {
|
|
|
9276
11603
|
props.setLocalStore("mutationSort", e.currentTarget.value);
|
|
9277
11604
|
});
|
|
9278
11605
|
insert(_el$21, () => Object.keys(mutationSortFns).map((key) => (() => {
|
|
9279
|
-
var _el$
|
|
9280
|
-
_el$
|
|
9281
|
-
_el$
|
|
9282
|
-
insert(_el$
|
|
9283
|
-
return _el$
|
|
11606
|
+
var _el$44 = _tmpl$23();
|
|
11607
|
+
_el$44.firstChild;
|
|
11608
|
+
_el$44.value = key;
|
|
11609
|
+
insert(_el$44, key, null);
|
|
11610
|
+
return _el$44;
|
|
9284
11611
|
})()));
|
|
9285
11612
|
createRenderEffect(() => _el$21.value = mutationSort());
|
|
9286
11613
|
return _el$21;
|
|
@@ -9319,12 +11646,12 @@ const ContentView = (props) => {
|
|
|
9319
11646
|
insert(_el$26, createComponent(Trash, {}));
|
|
9320
11647
|
addEventListener(_el$27, "click", toggleOffline, true);
|
|
9321
11648
|
insert(_el$27, (() => {
|
|
9322
|
-
var _c$ = memo(() => !!offline());
|
|
11649
|
+
var _c$ = memo$1(() => !!offline());
|
|
9323
11650
|
return () => _c$() ? createComponent(Offline, {}) : createComponent(Wifi, {});
|
|
9324
11651
|
})());
|
|
9325
11652
|
insert(_el$25, createComponent(Show, {
|
|
9326
11653
|
get when() {
|
|
9327
|
-
return memo(() => !!!pip().pipWindow)() && !pip().disabled;
|
|
11654
|
+
return memo$1(() => !!!pip().pipWindow)() && !pip().disabled;
|
|
9328
11655
|
},
|
|
9329
11656
|
get children() {
|
|
9330
11657
|
var _el$28 = _tmpl$0();
|
|
@@ -9351,7 +11678,7 @@ const ContentView = (props) => {
|
|
|
9351
11678
|
}), createComponent(dropdown_menu_exports.Portal, {
|
|
9352
11679
|
ref: (el) => setComputedVariables(el),
|
|
9353
11680
|
get mount() {
|
|
9354
|
-
return memo(() => !!pip().pipWindow)() ? pip().pipWindow.document.body : document.body;
|
|
11681
|
+
return memo$1(() => !!pip().pipWindow)() ? pip().pipWindow.document.body : document.body;
|
|
9355
11682
|
},
|
|
9356
11683
|
get children() {
|
|
9357
11684
|
return createComponent(dropdown_menu_exports.Content, {
|
|
@@ -9385,7 +11712,7 @@ const ContentView = (props) => {
|
|
|
9385
11712
|
}), createComponent(dropdown_menu_exports.Portal, {
|
|
9386
11713
|
ref: (el) => setComputedVariables(el),
|
|
9387
11714
|
get mount() {
|
|
9388
|
-
return memo(() => !!pip().pipWindow)() ? pip().pipWindow.document.body : document.body;
|
|
11715
|
+
return memo$1(() => !!pip().pipWindow)() ? pip().pipWindow.document.body : document.body;
|
|
9389
11716
|
},
|
|
9390
11717
|
get children() {
|
|
9391
11718
|
return createComponent(dropdown_menu_exports.SubContent, {
|
|
@@ -9463,7 +11790,7 @@ const ContentView = (props) => {
|
|
|
9463
11790
|
}), createComponent(dropdown_menu_exports.Portal, {
|
|
9464
11791
|
ref: (el) => setComputedVariables(el),
|
|
9465
11792
|
get mount() {
|
|
9466
|
-
return memo(() => !!pip().pipWindow)() ? pip().pipWindow.document.body : document.body;
|
|
11793
|
+
return memo$1(() => !!pip().pipWindow)() ? pip().pipWindow.document.body : document.body;
|
|
9467
11794
|
},
|
|
9468
11795
|
get children() {
|
|
9469
11796
|
return createComponent(dropdown_menu_exports.SubContent, {
|
|
@@ -9532,7 +11859,7 @@ const ContentView = (props) => {
|
|
|
9532
11859
|
}), createComponent(dropdown_menu_exports.Portal, {
|
|
9533
11860
|
ref: (el) => setComputedVariables(el),
|
|
9534
11861
|
get mount() {
|
|
9535
|
-
return memo(() => !!pip().pipWindow)() ? pip().pipWindow.document.body : document.body;
|
|
11862
|
+
return memo$1(() => !!pip().pipWindow)() ? pip().pipWindow.document.body : document.body;
|
|
9536
11863
|
},
|
|
9537
11864
|
get children() {
|
|
9538
11865
|
return createComponent(dropdown_menu_exports.SubContent, {
|
|
@@ -9598,18 +11925,25 @@ const ContentView = (props) => {
|
|
|
9598
11925
|
return selectedView() === "queries";
|
|
9599
11926
|
},
|
|
9600
11927
|
get children() {
|
|
9601
|
-
|
|
9602
|
-
|
|
9603
|
-
|
|
9604
|
-
get each() {
|
|
9605
|
-
return queries();
|
|
11928
|
+
return createComponent(Show, {
|
|
11929
|
+
get when() {
|
|
11930
|
+
return query_cache();
|
|
9606
11931
|
},
|
|
9607
|
-
|
|
9608
|
-
|
|
9609
|
-
|
|
9610
|
-
|
|
9611
|
-
|
|
9612
|
-
|
|
11932
|
+
keyed: true,
|
|
11933
|
+
children: (_cache) => createComponent(VirtualList, {
|
|
11934
|
+
get each() {
|
|
11935
|
+
return queries();
|
|
11936
|
+
},
|
|
11937
|
+
getKey: (query) => query.queryHash,
|
|
11938
|
+
get ["class"]() {
|
|
11939
|
+
return clsx(styles().overflowQueryContainer, "tsqd-queries-overflow-container");
|
|
11940
|
+
},
|
|
11941
|
+
contentClass: "tsqd-queries-container",
|
|
11942
|
+
children: (query) => createComponent(QueryRow, { get query() {
|
|
11943
|
+
return query();
|
|
11944
|
+
} })
|
|
11945
|
+
})
|
|
11946
|
+
});
|
|
9613
11947
|
}
|
|
9614
11948
|
}), null);
|
|
9615
11949
|
insert(_el$0, createComponent(Show, {
|
|
@@ -9617,18 +11951,25 @@ const ContentView = (props) => {
|
|
|
9617
11951
|
return selectedView() === "mutations";
|
|
9618
11952
|
},
|
|
9619
11953
|
get children() {
|
|
9620
|
-
|
|
9621
|
-
|
|
9622
|
-
|
|
9623
|
-
get each() {
|
|
9624
|
-
return mutations();
|
|
11954
|
+
return createComponent(Show, {
|
|
11955
|
+
get when() {
|
|
11956
|
+
return mutation_cache();
|
|
9625
11957
|
},
|
|
9626
|
-
|
|
9627
|
-
|
|
9628
|
-
|
|
9629
|
-
|
|
9630
|
-
|
|
9631
|
-
|
|
11958
|
+
keyed: true,
|
|
11959
|
+
children: (_cache) => createComponent(VirtualList, {
|
|
11960
|
+
get each() {
|
|
11961
|
+
return mutations();
|
|
11962
|
+
},
|
|
11963
|
+
getKey: (mutation) => mutation.mutationId,
|
|
11964
|
+
get ["class"]() {
|
|
11965
|
+
return clsx(styles().overflowQueryContainer, "tsqd-mutations-overflow-container");
|
|
11966
|
+
},
|
|
11967
|
+
contentClass: "tsqd-mutations-container",
|
|
11968
|
+
children: (mutation) => createComponent(MutationRow, { get mutation() {
|
|
11969
|
+
return mutation();
|
|
11970
|
+
} })
|
|
11971
|
+
})
|
|
11972
|
+
});
|
|
9632
11973
|
}
|
|
9633
11974
|
}), null);
|
|
9634
11975
|
createRenderEffect((_p$) => {
|
|
@@ -9687,7 +12028,7 @@ const ContentView = (props) => {
|
|
|
9687
12028
|
})(),
|
|
9688
12029
|
createComponent(Show, {
|
|
9689
12030
|
get when() {
|
|
9690
|
-
return memo(() => selectedView() === "queries")() && selectedQueryHash();
|
|
12031
|
+
return memo$1(() => selectedView() === "queries")() && selectedQueryHash();
|
|
9691
12032
|
},
|
|
9692
12033
|
get children() {
|
|
9693
12034
|
return createComponent(QueryDetails, {});
|
|
@@ -9695,7 +12036,7 @@ const ContentView = (props) => {
|
|
|
9695
12036
|
}),
|
|
9696
12037
|
createComponent(Show, {
|
|
9697
12038
|
get when() {
|
|
9698
|
-
return memo(() => selectedView() === "mutations")() && selectedMutationId();
|
|
12039
|
+
return memo$1(() => selectedView() === "mutations")() && selectedMutationId();
|
|
9699
12040
|
},
|
|
9700
12041
|
get children() {
|
|
9701
12042
|
return createComponent(MutationDetails, {});
|
|
@@ -9737,38 +12078,38 @@ const QueryRow = (props) => {
|
|
|
9737
12078
|
return queryState();
|
|
9738
12079
|
},
|
|
9739
12080
|
get children() {
|
|
9740
|
-
var _el$
|
|
9741
|
-
_el$
|
|
9742
|
-
insert(_el$
|
|
9743
|
-
insert(_el$
|
|
9744
|
-
insert(_el$
|
|
12081
|
+
var _el$46 = _tmpl$26(), _el$47 = _el$46.firstChild, _el$48 = _el$47.nextSibling;
|
|
12082
|
+
_el$46.$$click = () => setSelectedQueryHash(props.query.queryHash === selectedQueryHash() ? null : props.query.queryHash);
|
|
12083
|
+
insert(_el$47, observers);
|
|
12084
|
+
insert(_el$48, () => props.query.queryHash);
|
|
12085
|
+
insert(_el$46, createComponent(Show, {
|
|
9745
12086
|
get when() {
|
|
9746
12087
|
return isDisabled();
|
|
9747
12088
|
},
|
|
9748
12089
|
get children() {
|
|
9749
|
-
return _tmpl$
|
|
12090
|
+
return _tmpl$24();
|
|
9750
12091
|
}
|
|
9751
12092
|
}), null);
|
|
9752
|
-
insert(_el$
|
|
12093
|
+
insert(_el$46, createComponent(Show, {
|
|
9753
12094
|
get when() {
|
|
9754
12095
|
return isStatic();
|
|
9755
12096
|
},
|
|
9756
12097
|
get children() {
|
|
9757
|
-
return _tmpl$
|
|
12098
|
+
return _tmpl$25();
|
|
9758
12099
|
}
|
|
9759
12100
|
}), null);
|
|
9760
12101
|
createRenderEffect((_p$) => {
|
|
9761
12102
|
var _v$27 = clsx(styles().queryRow, selectedQueryHash() === props.query.queryHash && styles().selectedQueryRow, "tsqd-query-row"), _v$28 = `Query key ${props.query.queryHash}${isDisabled() ? ", disabled" : ""}${isStatic() ? ", static" : ""}`, _v$29 = clsx(getObserverCountColorStyles(), "tsqd-query-observer-count");
|
|
9762
|
-
_v$27 !== _p$.e && className(_el$
|
|
9763
|
-
_v$28 !== _p$.t && setAttribute(_el$
|
|
9764
|
-
_v$29 !== _p$.a && className(_el$
|
|
12103
|
+
_v$27 !== _p$.e && className(_el$46, _p$.e = _v$27);
|
|
12104
|
+
_v$28 !== _p$.t && setAttribute(_el$46, "aria-label", _p$.t = _v$28);
|
|
12105
|
+
_v$29 !== _p$.a && className(_el$47, _p$.a = _v$29);
|
|
9765
12106
|
return _p$;
|
|
9766
12107
|
}, {
|
|
9767
12108
|
e: void 0,
|
|
9768
12109
|
t: void 0,
|
|
9769
12110
|
a: void 0
|
|
9770
12111
|
});
|
|
9771
|
-
return _el$
|
|
12112
|
+
return _el$46;
|
|
9772
12113
|
}
|
|
9773
12114
|
});
|
|
9774
12115
|
};
|
|
@@ -9781,19 +12122,9 @@ const MutationRow = (props) => {
|
|
|
9781
12122
|
});
|
|
9782
12123
|
const { colors, alpha } = tokens;
|
|
9783
12124
|
const t = (light, dark) => theme() === "dark" ? dark : light;
|
|
9784
|
-
const mutationState = createSubscribeToMutationCacheBatcher((
|
|
9785
|
-
|
|
9786
|
-
|
|
9787
|
-
const isPaused = createSubscribeToMutationCacheBatcher((mutationCache) => {
|
|
9788
|
-
const mutation = mutationCache().getAll().find((m) => m.mutationId === props.mutation.mutationId);
|
|
9789
|
-
if (!mutation) return false;
|
|
9790
|
-
return mutation.state.isPaused;
|
|
9791
|
-
});
|
|
9792
|
-
const status = createSubscribeToMutationCacheBatcher((mutationCache) => {
|
|
9793
|
-
const mutation = mutationCache().getAll().find((m) => m.mutationId === props.mutation.mutationId);
|
|
9794
|
-
if (!mutation) return "idle";
|
|
9795
|
-
return mutation.state.status;
|
|
9796
|
-
});
|
|
12125
|
+
const mutationState = createSubscribeToMutationCacheBatcher(() => props.mutation.state);
|
|
12126
|
+
const isPaused = createSubscribeToMutationCacheBatcher(() => props.mutation.state.isPaused);
|
|
12127
|
+
const status = createSubscribeToMutationCacheBatcher(() => props.mutation.state.status);
|
|
9797
12128
|
const color = createMemo(() => getMutationStatusColor({
|
|
9798
12129
|
isPaused: isPaused(),
|
|
9799
12130
|
status: status()
|
|
@@ -9813,11 +12144,11 @@ const MutationRow = (props) => {
|
|
|
9813
12144
|
return mutationState();
|
|
9814
12145
|
},
|
|
9815
12146
|
get children() {
|
|
9816
|
-
var _el$
|
|
9817
|
-
_el$
|
|
12147
|
+
var _el$51 = _tmpl$26(), _el$52 = _el$51.firstChild, _el$53 = _el$52.nextSibling;
|
|
12148
|
+
_el$51.$$click = () => {
|
|
9818
12149
|
setSelectedMutationId(props.mutation.mutationId === selectedMutationId() ? null : props.mutation.mutationId);
|
|
9819
12150
|
};
|
|
9820
|
-
insert(_el$
|
|
12151
|
+
insert(_el$52, createComponent(Show, {
|
|
9821
12152
|
get when() {
|
|
9822
12153
|
return color() === "purple";
|
|
9823
12154
|
},
|
|
@@ -9825,7 +12156,7 @@ const MutationRow = (props) => {
|
|
|
9825
12156
|
return createComponent(PauseCircle, {});
|
|
9826
12157
|
}
|
|
9827
12158
|
}), null);
|
|
9828
|
-
insert(_el$
|
|
12159
|
+
insert(_el$52, createComponent(Show, {
|
|
9829
12160
|
get when() {
|
|
9830
12161
|
return color() === "green";
|
|
9831
12162
|
},
|
|
@@ -9833,7 +12164,7 @@ const MutationRow = (props) => {
|
|
|
9833
12164
|
return createComponent(CheckCircle, {});
|
|
9834
12165
|
}
|
|
9835
12166
|
}), null);
|
|
9836
|
-
insert(_el$
|
|
12167
|
+
insert(_el$52, createComponent(Show, {
|
|
9837
12168
|
get when() {
|
|
9838
12169
|
return color() === "red";
|
|
9839
12170
|
},
|
|
@@ -9841,7 +12172,7 @@ const MutationRow = (props) => {
|
|
|
9841
12172
|
return createComponent(XCircle, {});
|
|
9842
12173
|
}
|
|
9843
12174
|
}), null);
|
|
9844
|
-
insert(_el$
|
|
12175
|
+
insert(_el$52, createComponent(Show, {
|
|
9845
12176
|
get when() {
|
|
9846
12177
|
return color() === "yellow";
|
|
9847
12178
|
},
|
|
@@ -9849,140 +12180,141 @@ const MutationRow = (props) => {
|
|
|
9849
12180
|
return createComponent(LoadingCircle, {});
|
|
9850
12181
|
}
|
|
9851
12182
|
}), null);
|
|
9852
|
-
insert(_el$
|
|
12183
|
+
insert(_el$53, createComponent(Show, {
|
|
9853
12184
|
get when() {
|
|
9854
12185
|
return props.mutation.options.mutationKey;
|
|
9855
12186
|
},
|
|
9856
12187
|
get children() {
|
|
9857
12188
|
return [
|
|
9858
|
-
memo(() => JSON.stringify(props.mutation.options.mutationKey)),
|
|
12189
|
+
memo$1(() => JSON.stringify(props.mutation.options.mutationKey)),
|
|
9859
12190
|
" -",
|
|
9860
12191
|
" "
|
|
9861
12192
|
];
|
|
9862
12193
|
}
|
|
9863
12194
|
}), null);
|
|
9864
|
-
insert(_el$
|
|
12195
|
+
insert(_el$53, () => new Date(props.mutation.state.submittedAt).toLocaleString(), null);
|
|
9865
12196
|
createRenderEffect((_p$) => {
|
|
9866
12197
|
var _v$30 = clsx(styles().queryRow, selectedMutationId() === props.mutation.mutationId && styles().selectedQueryRow, "tsqd-query-row"), _v$31 = `Mutation submitted at ${new Date(props.mutation.state.submittedAt).toLocaleString()}`, _v$32 = clsx(getObserverCountColorStyles(), "tsqd-query-observer-count");
|
|
9867
|
-
_v$30 !== _p$.e && className(_el$
|
|
9868
|
-
_v$31 !== _p$.t && setAttribute(_el$
|
|
9869
|
-
_v$32 !== _p$.a && className(_el$
|
|
12198
|
+
_v$30 !== _p$.e && className(_el$51, _p$.e = _v$30);
|
|
12199
|
+
_v$31 !== _p$.t && setAttribute(_el$51, "aria-label", _p$.t = _v$31);
|
|
12200
|
+
_v$32 !== _p$.a && className(_el$52, _p$.a = _v$32);
|
|
9870
12201
|
return _p$;
|
|
9871
12202
|
}, {
|
|
9872
12203
|
e: void 0,
|
|
9873
12204
|
t: void 0,
|
|
9874
12205
|
a: void 0
|
|
9875
12206
|
});
|
|
9876
|
-
return _el$
|
|
12207
|
+
return _el$51;
|
|
9877
12208
|
}
|
|
9878
12209
|
});
|
|
9879
12210
|
};
|
|
9880
12211
|
const QueryStatusCount = () => {
|
|
9881
|
-
const
|
|
9882
|
-
|
|
9883
|
-
|
|
9884
|
-
|
|
9885
|
-
|
|
12212
|
+
const counts = createSubscribeToQueryCacheBatcher((queryCache) => {
|
|
12213
|
+
const tally = {
|
|
12214
|
+
fresh: 0,
|
|
12215
|
+
fetching: 0,
|
|
12216
|
+
paused: 0,
|
|
12217
|
+
stale: 0,
|
|
12218
|
+
inactive: 0
|
|
12219
|
+
};
|
|
12220
|
+
for (const query of queryCache().getAll()) tally[getQueryStatusLabel(query)]++;
|
|
12221
|
+
return tally;
|
|
12222
|
+
});
|
|
9886
12223
|
const theme = useTheme();
|
|
9887
12224
|
const css = useQueryDevtoolsContext().shadowDOMTarget ? u.bind({ target: useQueryDevtoolsContext().shadowDOMTarget }) : u;
|
|
9888
12225
|
const styles = createMemo(() => {
|
|
9889
12226
|
return theme() === "dark" ? darkStyles(css) : lightStyles(css);
|
|
9890
12227
|
});
|
|
9891
12228
|
return (() => {
|
|
9892
|
-
var _el$
|
|
9893
|
-
insert(_el$
|
|
12229
|
+
var _el$54 = _tmpl$2();
|
|
12230
|
+
insert(_el$54, createComponent(QueryStatus, {
|
|
9894
12231
|
label: "Fresh",
|
|
9895
12232
|
color: "green",
|
|
9896
12233
|
get count() {
|
|
9897
|
-
return
|
|
12234
|
+
return counts().fresh;
|
|
9898
12235
|
}
|
|
9899
12236
|
}), null);
|
|
9900
|
-
insert(_el$
|
|
12237
|
+
insert(_el$54, createComponent(QueryStatus, {
|
|
9901
12238
|
label: "Fetching",
|
|
9902
12239
|
color: "blue",
|
|
9903
12240
|
get count() {
|
|
9904
|
-
return
|
|
12241
|
+
return counts().fetching;
|
|
9905
12242
|
}
|
|
9906
12243
|
}), null);
|
|
9907
|
-
insert(_el$
|
|
12244
|
+
insert(_el$54, createComponent(QueryStatus, {
|
|
9908
12245
|
label: "Paused",
|
|
9909
12246
|
color: "purple",
|
|
9910
12247
|
get count() {
|
|
9911
|
-
return
|
|
12248
|
+
return counts().paused;
|
|
9912
12249
|
}
|
|
9913
12250
|
}), null);
|
|
9914
|
-
insert(_el$
|
|
12251
|
+
insert(_el$54, createComponent(QueryStatus, {
|
|
9915
12252
|
label: "Stale",
|
|
9916
12253
|
color: "yellow",
|
|
9917
12254
|
get count() {
|
|
9918
|
-
return
|
|
12255
|
+
return counts().stale;
|
|
9919
12256
|
}
|
|
9920
12257
|
}), null);
|
|
9921
|
-
insert(_el$
|
|
12258
|
+
insert(_el$54, createComponent(QueryStatus, {
|
|
9922
12259
|
label: "Inactive",
|
|
9923
12260
|
color: "gray",
|
|
9924
12261
|
get count() {
|
|
9925
|
-
return
|
|
12262
|
+
return counts().inactive;
|
|
9926
12263
|
}
|
|
9927
12264
|
}), null);
|
|
9928
|
-
createRenderEffect(() => className(_el$
|
|
9929
|
-
return _el$
|
|
12265
|
+
createRenderEffect(() => className(_el$54, clsx(styles().queryStatusContainer, "tsqd-query-status-container")));
|
|
12266
|
+
return _el$54;
|
|
9930
12267
|
})();
|
|
9931
12268
|
};
|
|
9932
12269
|
const MutationStatusCount = () => {
|
|
9933
|
-
const
|
|
9934
|
-
|
|
9935
|
-
|
|
9936
|
-
|
|
9937
|
-
|
|
9938
|
-
|
|
9939
|
-
|
|
9940
|
-
|
|
9941
|
-
|
|
9942
|
-
|
|
9943
|
-
|
|
9944
|
-
}) === "purple").length);
|
|
9945
|
-
const error = createSubscribeToMutationCacheBatcher((mutationCache) => mutationCache().getAll().filter((m) => getMutationStatusColor({
|
|
9946
|
-
isPaused: m.state.isPaused,
|
|
9947
|
-
status: m.state.status
|
|
9948
|
-
}) === "red").length);
|
|
12270
|
+
const counts = createSubscribeToMutationCacheBatcher((mutationCache) => {
|
|
12271
|
+
const tally = {
|
|
12272
|
+
green: 0,
|
|
12273
|
+
yellow: 0,
|
|
12274
|
+
purple: 0,
|
|
12275
|
+
red: 0,
|
|
12276
|
+
gray: 0
|
|
12277
|
+
};
|
|
12278
|
+
for (const mutation of mutationCache().getAll()) tally[getMutationStatusColor(mutation.state)]++;
|
|
12279
|
+
return tally;
|
|
12280
|
+
});
|
|
9949
12281
|
const theme = useTheme();
|
|
9950
12282
|
const css = useQueryDevtoolsContext().shadowDOMTarget ? u.bind({ target: useQueryDevtoolsContext().shadowDOMTarget }) : u;
|
|
9951
12283
|
const styles = createMemo(() => {
|
|
9952
12284
|
return theme() === "dark" ? darkStyles(css) : lightStyles(css);
|
|
9953
12285
|
});
|
|
9954
12286
|
return (() => {
|
|
9955
|
-
var _el$
|
|
9956
|
-
insert(_el$
|
|
12287
|
+
var _el$55 = _tmpl$2();
|
|
12288
|
+
insert(_el$55, createComponent(QueryStatus, {
|
|
9957
12289
|
label: "Paused",
|
|
9958
12290
|
color: "purple",
|
|
9959
12291
|
get count() {
|
|
9960
|
-
return
|
|
12292
|
+
return counts().purple;
|
|
9961
12293
|
}
|
|
9962
12294
|
}), null);
|
|
9963
|
-
insert(_el$
|
|
12295
|
+
insert(_el$55, createComponent(QueryStatus, {
|
|
9964
12296
|
label: "Pending",
|
|
9965
12297
|
color: "yellow",
|
|
9966
12298
|
get count() {
|
|
9967
|
-
return
|
|
12299
|
+
return counts().yellow;
|
|
9968
12300
|
}
|
|
9969
12301
|
}), null);
|
|
9970
|
-
insert(_el$
|
|
12302
|
+
insert(_el$55, createComponent(QueryStatus, {
|
|
9971
12303
|
label: "Success",
|
|
9972
12304
|
color: "green",
|
|
9973
12305
|
get count() {
|
|
9974
|
-
return
|
|
12306
|
+
return counts().green;
|
|
9975
12307
|
}
|
|
9976
12308
|
}), null);
|
|
9977
|
-
insert(_el$
|
|
12309
|
+
insert(_el$55, createComponent(QueryStatus, {
|
|
9978
12310
|
label: "Error",
|
|
9979
12311
|
color: "red",
|
|
9980
12312
|
get count() {
|
|
9981
|
-
return
|
|
12313
|
+
return counts().red;
|
|
9982
12314
|
}
|
|
9983
12315
|
}), null);
|
|
9984
|
-
createRenderEffect(() => className(_el$
|
|
9985
|
-
return _el$
|
|
12316
|
+
createRenderEffect(() => className(_el$55, clsx(styles().queryStatusContainer, "tsqd-query-status-container")));
|
|
12317
|
+
return _el$55;
|
|
9986
12318
|
})();
|
|
9987
12319
|
};
|
|
9988
12320
|
const QueryStatus = (props) => {
|
|
@@ -10005,17 +12337,17 @@ const QueryStatus = (props) => {
|
|
|
10005
12337
|
return true;
|
|
10006
12338
|
});
|
|
10007
12339
|
return (() => {
|
|
10008
|
-
var _el$
|
|
12340
|
+
var _el$56 = _tmpl$29(), _el$58 = _el$56.firstChild, _el$60 = _el$58.nextSibling;
|
|
10009
12341
|
var _ref$6 = tagRef;
|
|
10010
|
-
typeof _ref$6 === "function" ? use(_ref$6, _el$
|
|
10011
|
-
_el$
|
|
12342
|
+
typeof _ref$6 === "function" ? use(_ref$6, _el$56) : tagRef = _el$56;
|
|
12343
|
+
_el$56.addEventListener("mouseleave", () => {
|
|
10012
12344
|
setMouseOver(false);
|
|
10013
12345
|
setFocused(false);
|
|
10014
12346
|
});
|
|
10015
|
-
_el$
|
|
10016
|
-
_el$
|
|
10017
|
-
_el$
|
|
10018
|
-
spread(_el$
|
|
12347
|
+
_el$56.addEventListener("mouseenter", () => setMouseOver(true));
|
|
12348
|
+
_el$56.addEventListener("blur", () => setFocused(false));
|
|
12349
|
+
_el$56.addEventListener("focus", () => setFocused(true));
|
|
12350
|
+
spread(_el$56, mergeProps({
|
|
10019
12351
|
get disabled() {
|
|
10020
12352
|
return showLabel();
|
|
10021
12353
|
},
|
|
@@ -10031,29 +12363,29 @@ const QueryStatus = (props) => {
|
|
|
10031
12363
|
`, "tsqd-query-status-tag", `tsqd-query-status-tag-${props.label.toLowerCase()}`);
|
|
10032
12364
|
}
|
|
10033
12365
|
}, () => mouseOver() || focused() ? { "aria-describedby": "tsqd-status-tooltip" } : {}), false, true);
|
|
10034
|
-
insert(_el$
|
|
12366
|
+
insert(_el$56, createComponent(Show, {
|
|
10035
12367
|
get when() {
|
|
10036
|
-
return memo(() => !!!showLabel())() && (mouseOver() || focused());
|
|
12368
|
+
return memo$1(() => !!!showLabel())() && (mouseOver() || focused());
|
|
10037
12369
|
},
|
|
10038
12370
|
get children() {
|
|
10039
|
-
var _el$
|
|
10040
|
-
insert(_el$
|
|
10041
|
-
createRenderEffect(() => className(_el$
|
|
10042
|
-
return _el$
|
|
12371
|
+
var _el$57 = _tmpl$27();
|
|
12372
|
+
insert(_el$57, () => props.label);
|
|
12373
|
+
createRenderEffect(() => className(_el$57, clsx(styles().statusTooltip, "tsqd-query-status-tooltip")));
|
|
12374
|
+
return _el$57;
|
|
10043
12375
|
}
|
|
10044
|
-
}), _el$
|
|
10045
|
-
insert(_el$
|
|
12376
|
+
}), _el$58);
|
|
12377
|
+
insert(_el$56, createComponent(Show, {
|
|
10046
12378
|
get when() {
|
|
10047
12379
|
return showLabel();
|
|
10048
12380
|
},
|
|
10049
12381
|
get children() {
|
|
10050
|
-
var _el$
|
|
10051
|
-
insert(_el$
|
|
10052
|
-
createRenderEffect(() => className(_el$
|
|
10053
|
-
return _el$
|
|
12382
|
+
var _el$59 = _tmpl$28();
|
|
12383
|
+
insert(_el$59, () => props.label);
|
|
12384
|
+
createRenderEffect(() => className(_el$59, clsx(styles().queryStatusTagLabel, "tsqd-query-status-tag-label")));
|
|
12385
|
+
return _el$59;
|
|
10054
12386
|
}
|
|
10055
|
-
}), _el$
|
|
10056
|
-
insert(_el$
|
|
12387
|
+
}), _el$60);
|
|
12388
|
+
insert(_el$60, () => props.count);
|
|
10057
12389
|
createRenderEffect((_p$) => {
|
|
10058
12390
|
var _v$33 = clsx(css`
|
|
10059
12391
|
width: ${tokens.size[1.5]};
|
|
@@ -10064,14 +12396,14 @@ const QueryStatus = (props) => {
|
|
|
10064
12396
|
background-color: ${t(colors[props.color][100], colors[props.color][900])};
|
|
10065
12397
|
color: ${t(colors[props.color][700], colors[props.color][300])};
|
|
10066
12398
|
`, "tsqd-query-status-tag-count");
|
|
10067
|
-
_v$33 !== _p$.e && className(_el$
|
|
10068
|
-
_v$34 !== _p$.t && className(_el$
|
|
12399
|
+
_v$33 !== _p$.e && className(_el$58, _p$.e = _v$33);
|
|
12400
|
+
_v$34 !== _p$.t && className(_el$60, _p$.t = _v$34);
|
|
10069
12401
|
return _p$;
|
|
10070
12402
|
}, {
|
|
10071
12403
|
e: void 0,
|
|
10072
12404
|
t: void 0
|
|
10073
12405
|
});
|
|
10074
|
-
return _el$
|
|
12406
|
+
return _el$56;
|
|
10075
12407
|
})();
|
|
10076
12408
|
};
|
|
10077
12409
|
const QueryDetails = () => {
|
|
@@ -10090,25 +12422,25 @@ const QueryDetails = () => {
|
|
|
10090
12422
|
const errorTypes = createMemo(() => {
|
|
10091
12423
|
return useQueryDevtoolsContext().errorTypes || [];
|
|
10092
12424
|
});
|
|
10093
|
-
const activeQuery = createSubscribeToQueryCacheBatcher((queryCache) => queryCache().
|
|
12425
|
+
const activeQuery = createSubscribeToQueryCacheBatcher((queryCache) => queryCache().get(selectedQueryHash() ?? ""), false);
|
|
10094
12426
|
const activeQueryFresh = createSubscribeToQueryCacheBatcher((queryCache) => {
|
|
10095
|
-
return queryCache().
|
|
12427
|
+
return queryCache().get(selectedQueryHash() ?? "");
|
|
10096
12428
|
}, false);
|
|
10097
|
-
const activeQueryState = createSubscribeToQueryCacheBatcher((queryCache) => queryCache().
|
|
12429
|
+
const activeQueryState = createSubscribeToQueryCacheBatcher((queryCache) => queryCache().get(selectedQueryHash() ?? "")?.state, false);
|
|
10098
12430
|
const activeQueryStateData = createSubscribeToQueryCacheBatcher((queryCache) => {
|
|
10099
|
-
return queryCache().
|
|
12431
|
+
return queryCache().get(selectedQueryHash() ?? "")?.state.data;
|
|
10100
12432
|
}, false);
|
|
10101
12433
|
const statusLabel = createSubscribeToQueryCacheBatcher((queryCache) => {
|
|
10102
|
-
const query = queryCache().
|
|
12434
|
+
const query = queryCache().get(selectedQueryHash() ?? "");
|
|
10103
12435
|
if (!query) return "inactive";
|
|
10104
12436
|
return getQueryStatusLabel(query);
|
|
10105
12437
|
});
|
|
10106
12438
|
const queryStatus = createSubscribeToQueryCacheBatcher((queryCache) => {
|
|
10107
|
-
const query = queryCache().
|
|
12439
|
+
const query = queryCache().get(selectedQueryHash() ?? "");
|
|
10108
12440
|
if (!query) return "pending";
|
|
10109
12441
|
return query.state.status;
|
|
10110
12442
|
});
|
|
10111
|
-
const observerCount = createSubscribeToQueryCacheBatcher((queryCache) => queryCache().
|
|
12443
|
+
const observerCount = createSubscribeToQueryCacheBatcher((queryCache) => queryCache().get(selectedQueryHash() ?? "")?.getObserversCount() ?? 0);
|
|
10112
12444
|
const color = createMemo(() => getQueryStatusColorByLabel(statusLabel()));
|
|
10113
12445
|
const handleRefetch = () => {
|
|
10114
12446
|
sendDevToolsEvent({
|
|
@@ -10171,18 +12503,18 @@ const QueryDetails = () => {
|
|
|
10171
12503
|
};
|
|
10172
12504
|
return createComponent(Show, {
|
|
10173
12505
|
get when() {
|
|
10174
|
-
return memo(() => !!activeQuery())() && activeQueryState();
|
|
12506
|
+
return memo$1(() => !!activeQuery())() && activeQueryState();
|
|
10175
12507
|
},
|
|
10176
12508
|
get children() {
|
|
10177
|
-
var _el$
|
|
10178
|
-
_el$
|
|
10179
|
-
var _el$
|
|
10180
|
-
insert(_el$
|
|
10181
|
-
insert(_el$
|
|
10182
|
-
insert(_el$
|
|
10183
|
-
insert(_el$
|
|
10184
|
-
_el$
|
|
10185
|
-
_el$
|
|
12509
|
+
var _el$61 = _tmpl$34(), _el$62 = _el$61.firstChild, _el$63 = _el$62.nextSibling, _el$64 = _el$63.firstChild, _el$65 = _el$64.firstChild, _el$66 = _el$65.firstChild, _el$67 = _el$65.nextSibling, _el$68 = _el$64.nextSibling, _el$70 = _el$68.firstChild.nextSibling, _el$73 = _el$68.nextSibling.firstChild.nextSibling, _el$74 = _el$63.nextSibling, _el$75 = _el$74.nextSibling, _el$76 = _el$75.firstChild, _el$77 = _el$76.firstChild, _el$78 = _el$76.nextSibling, _el$79 = _el$78.firstChild, _el$80 = _el$78.nextSibling, _el$81 = _el$80.firstChild, _el$82 = _el$80.nextSibling, _el$83 = _el$82.firstChild, _el$84 = _el$82.nextSibling, _el$85 = _el$84.firstChild, _el$86 = _el$85.nextSibling, _el$95 = _el$75.nextSibling;
|
|
12510
|
+
_el$95.firstChild;
|
|
12511
|
+
var _el$105 = _el$95.nextSibling, _el$106 = _el$105.nextSibling;
|
|
12512
|
+
insert(_el$66, () => displayValue(activeQuery().queryKey, true));
|
|
12513
|
+
insert(_el$67, statusLabel);
|
|
12514
|
+
insert(_el$70, observerCount);
|
|
12515
|
+
insert(_el$73, () => new Date(activeQueryState().dataUpdatedAt).toLocaleTimeString());
|
|
12516
|
+
_el$76.$$click = handleRefetch;
|
|
12517
|
+
_el$78.$$click = () => {
|
|
10186
12518
|
sendDevToolsEvent({
|
|
10187
12519
|
type: "INVALIDATE",
|
|
10188
12520
|
queryHash: activeQuery()?.queryHash
|
|
@@ -10192,7 +12524,7 @@ const QueryDetails = () => {
|
|
|
10192
12524
|
exact: true
|
|
10193
12525
|
});
|
|
10194
12526
|
};
|
|
10195
|
-
_el$
|
|
12527
|
+
_el$80.$$click = () => {
|
|
10196
12528
|
sendDevToolsEvent({
|
|
10197
12529
|
type: "RESET",
|
|
10198
12530
|
queryHash: activeQuery()?.queryHash
|
|
@@ -10202,7 +12534,7 @@ const QueryDetails = () => {
|
|
|
10202
12534
|
exact: true
|
|
10203
12535
|
});
|
|
10204
12536
|
};
|
|
10205
|
-
_el$
|
|
12537
|
+
_el$82.$$click = () => {
|
|
10206
12538
|
sendDevToolsEvent({
|
|
10207
12539
|
type: "REMOVE",
|
|
10208
12540
|
queryHash: activeQuery()?.queryHash
|
|
@@ -10213,7 +12545,7 @@ const QueryDetails = () => {
|
|
|
10213
12545
|
});
|
|
10214
12546
|
setSelectedQueryHash(null);
|
|
10215
12547
|
};
|
|
10216
|
-
_el$
|
|
12548
|
+
_el$84.$$click = () => {
|
|
10217
12549
|
if (activeQuery()?.state.data === void 0) {
|
|
10218
12550
|
setRestoringLoading(true);
|
|
10219
12551
|
restoreQueryAfterLoadingOrError();
|
|
@@ -10242,14 +12574,14 @@ const QueryDetails = () => {
|
|
|
10242
12574
|
});
|
|
10243
12575
|
}
|
|
10244
12576
|
};
|
|
10245
|
-
insert(_el$
|
|
10246
|
-
insert(_el$
|
|
12577
|
+
insert(_el$84, () => queryStatus() === "pending" ? "Restore" : "Trigger", _el$86);
|
|
12578
|
+
insert(_el$75, createComponent(Show, {
|
|
10247
12579
|
get when() {
|
|
10248
12580
|
return errorTypes().length === 0 || queryStatus() === "error";
|
|
10249
12581
|
},
|
|
10250
12582
|
get children() {
|
|
10251
|
-
var _el$
|
|
10252
|
-
_el$
|
|
12583
|
+
var _el$87 = _tmpl$30(), _el$88 = _el$87.firstChild, _el$89 = _el$88.nextSibling;
|
|
12584
|
+
_el$87.$$click = () => {
|
|
10253
12585
|
if (!activeQuery().state.error) triggerError();
|
|
10254
12586
|
else {
|
|
10255
12587
|
sendDevToolsEvent({
|
|
@@ -10259,72 +12591,75 @@ const QueryDetails = () => {
|
|
|
10259
12591
|
queryClient.resetQueries({ queryKey: activeQuery()?.queryKey });
|
|
10260
12592
|
}
|
|
10261
12593
|
};
|
|
10262
|
-
insert(_el$
|
|
12594
|
+
insert(_el$87, () => queryStatus() === "error" ? "Restore" : "Trigger", _el$89);
|
|
10263
12595
|
createRenderEffect((_p$) => {
|
|
10264
12596
|
var _v$35 = clsx(css`
|
|
10265
12597
|
color: ${t(colors.red[500], colors.red[400])};
|
|
10266
12598
|
`, "tsqd-query-details-actions-btn", "tsqd-query-details-action-error"), _v$36 = queryStatus() === "pending", _v$37 = css`
|
|
10267
12599
|
background-color: ${t(colors.red[500], colors.red[400])};
|
|
10268
12600
|
`;
|
|
10269
|
-
_v$35 !== _p$.e && className(_el$
|
|
10270
|
-
_v$36 !== _p$.t && (_el$
|
|
10271
|
-
_v$37 !== _p$.a && className(_el$
|
|
12601
|
+
_v$35 !== _p$.e && className(_el$87, _p$.e = _v$35);
|
|
12602
|
+
_v$36 !== _p$.t && (_el$87.disabled = _p$.t = _v$36);
|
|
12603
|
+
_v$37 !== _p$.a && className(_el$88, _p$.a = _v$37);
|
|
10272
12604
|
return _p$;
|
|
10273
12605
|
}, {
|
|
10274
12606
|
e: void 0,
|
|
10275
12607
|
t: void 0,
|
|
10276
12608
|
a: void 0
|
|
10277
12609
|
});
|
|
10278
|
-
return _el$
|
|
12610
|
+
return _el$87;
|
|
10279
12611
|
}
|
|
10280
12612
|
}), null);
|
|
10281
|
-
insert(_el$
|
|
12613
|
+
insert(_el$75, createComponent(Show, {
|
|
10282
12614
|
get when() {
|
|
10283
12615
|
return !(errorTypes().length === 0 || queryStatus() === "error");
|
|
10284
12616
|
},
|
|
10285
12617
|
get children() {
|
|
10286
|
-
var _el$
|
|
10287
|
-
_el$
|
|
10288
|
-
_el$
|
|
12618
|
+
var _el$90 = _tmpl$31(), _el$91 = _el$90.firstChild, _el$93 = _el$91.nextSibling.nextSibling;
|
|
12619
|
+
_el$93.firstChild;
|
|
12620
|
+
_el$93.addEventListener("change", (e) => {
|
|
10289
12621
|
const errorType = errorTypes().find((et) => et.name === e.currentTarget.value);
|
|
10290
12622
|
triggerError(errorType);
|
|
10291
12623
|
});
|
|
10292
|
-
insert(_el$
|
|
12624
|
+
insert(_el$93, createComponent(For, {
|
|
10293
12625
|
get each() {
|
|
10294
12626
|
return errorTypes();
|
|
10295
12627
|
},
|
|
10296
12628
|
children: (errorType) => (() => {
|
|
10297
|
-
var _el$
|
|
10298
|
-
insert(_el$
|
|
10299
|
-
createRenderEffect(() => _el$
|
|
10300
|
-
return _el$
|
|
12629
|
+
var _el$107 = _tmpl$35();
|
|
12630
|
+
insert(_el$107, () => errorType.name);
|
|
12631
|
+
createRenderEffect(() => _el$107.value = errorType.name);
|
|
12632
|
+
return _el$107;
|
|
10301
12633
|
})()
|
|
10302
12634
|
}), null);
|
|
10303
|
-
insert(_el$
|
|
12635
|
+
insert(_el$90, createComponent(ChevronDown, {}), null);
|
|
10304
12636
|
createRenderEffect((_p$) => {
|
|
10305
12637
|
var _v$38 = clsx(styles().actionsSelect, "tsqd-query-details-actions-btn", "tsqd-query-details-action-error-multiple"), _v$39 = css`
|
|
10306
12638
|
background-color: ${tokens.colors.red[400]};
|
|
10307
12639
|
`, _v$40 = queryStatus() === "pending";
|
|
10308
|
-
_v$38 !== _p$.e && className(_el$
|
|
10309
|
-
_v$39 !== _p$.t && className(_el$
|
|
10310
|
-
_v$40 !== _p$.a && (_el$
|
|
12640
|
+
_v$38 !== _p$.e && className(_el$90, _p$.e = _v$38);
|
|
12641
|
+
_v$39 !== _p$.t && className(_el$91, _p$.t = _v$39);
|
|
12642
|
+
_v$40 !== _p$.a && (_el$93.disabled = _p$.a = _v$40);
|
|
10311
12643
|
return _p$;
|
|
10312
12644
|
}, {
|
|
10313
12645
|
e: void 0,
|
|
10314
12646
|
t: void 0,
|
|
10315
12647
|
a: void 0
|
|
10316
12648
|
});
|
|
10317
|
-
return _el$
|
|
12649
|
+
return _el$90;
|
|
10318
12650
|
}
|
|
10319
12651
|
}), null);
|
|
10320
|
-
insert(_el$
|
|
10321
|
-
insert(_el$
|
|
12652
|
+
insert(_el$95, () => dataMode() === "view" ? "Explorer" : "Editor", null);
|
|
12653
|
+
insert(_el$61, createComponent(Show, {
|
|
10322
12654
|
get when() {
|
|
10323
12655
|
return dataMode() === "view";
|
|
10324
12656
|
},
|
|
10325
12657
|
get children() {
|
|
10326
|
-
var _el$
|
|
10327
|
-
insert(_el$
|
|
12658
|
+
var _el$97 = _tmpl$32();
|
|
12659
|
+
insert(_el$97, createComponent(SearchableExplorer, {
|
|
12660
|
+
get searchKey() {
|
|
12661
|
+
return activeQuery();
|
|
12662
|
+
},
|
|
10328
12663
|
label: "Data",
|
|
10329
12664
|
defaultExpanded: ["Data"],
|
|
10330
12665
|
get value() {
|
|
@@ -10336,17 +12671,17 @@ const QueryDetails = () => {
|
|
|
10336
12671
|
return activeQuery();
|
|
10337
12672
|
}
|
|
10338
12673
|
}));
|
|
10339
|
-
createRenderEffect((_$p) => setStyleProperty(_el$
|
|
10340
|
-
return _el$
|
|
12674
|
+
createRenderEffect((_$p) => setStyleProperty(_el$97, "padding", tokens.size[2]));
|
|
12675
|
+
return _el$97;
|
|
10341
12676
|
}
|
|
10342
|
-
}), _el$
|
|
10343
|
-
insert(_el$
|
|
12677
|
+
}), _el$105);
|
|
12678
|
+
insert(_el$61, createComponent(Show, {
|
|
10344
12679
|
get when() {
|
|
10345
12680
|
return dataMode() === "edit";
|
|
10346
12681
|
},
|
|
10347
12682
|
get children() {
|
|
10348
|
-
var _el$
|
|
10349
|
-
_el$
|
|
12683
|
+
var _el$98 = _tmpl$33(), _el$99 = _el$98.firstChild, _el$100 = _el$99.nextSibling, _el$101 = _el$100.firstChild, _el$102 = _el$101.nextSibling, _el$103 = _el$102.firstChild, _el$104 = _el$103.nextSibling;
|
|
12684
|
+
_el$98.addEventListener("submit", (e) => {
|
|
10350
12685
|
e.preventDefault();
|
|
10351
12686
|
const data = new FormData(e.currentTarget).get("data");
|
|
10352
12687
|
try {
|
|
@@ -10360,23 +12695,23 @@ const QueryDetails = () => {
|
|
|
10360
12695
|
setDataEditError(true);
|
|
10361
12696
|
}
|
|
10362
12697
|
});
|
|
10363
|
-
_el$
|
|
10364
|
-
insert(_el$
|
|
10365
|
-
_el$
|
|
12698
|
+
_el$99.addEventListener("focus", () => setDataEditError(false));
|
|
12699
|
+
insert(_el$101, () => dataEditError() ? "Invalid Value" : "");
|
|
12700
|
+
_el$103.$$click = () => setDataMode("view");
|
|
10366
12701
|
createRenderEffect((_p$) => {
|
|
10367
12702
|
var _v$41 = clsx(styles().devtoolsEditForm, "tsqd-query-details-data-editor"), _v$42 = styles().devtoolsEditTextarea, _v$43 = dataEditError(), _v$44 = styles().devtoolsEditFormActions, _v$45 = styles().devtoolsEditFormError, _v$46 = styles().devtoolsEditFormActionContainer, _v$47 = clsx(styles().devtoolsEditFormAction, css`
|
|
10368
12703
|
color: ${t(colors.gray[600], colors.gray[300])};
|
|
10369
12704
|
`), _v$48 = clsx(styles().devtoolsEditFormAction, css`
|
|
10370
12705
|
color: ${t(colors.blue[600], colors.blue[400])};
|
|
10371
12706
|
`);
|
|
10372
|
-
_v$41 !== _p$.e && className(_el$
|
|
10373
|
-
_v$42 !== _p$.t && className(_el$
|
|
10374
|
-
_v$43 !== _p$.a && setAttribute(_el$
|
|
10375
|
-
_v$44 !== _p$.o && className(_el$
|
|
10376
|
-
_v$45 !== _p$.i && className(_el$
|
|
10377
|
-
_v$46 !== _p$.n && className(_el$
|
|
10378
|
-
_v$47 !== _p$.s && className(_el$
|
|
10379
|
-
_v$48 !== _p$.h && className(_el$
|
|
12707
|
+
_v$41 !== _p$.e && className(_el$98, _p$.e = _v$41);
|
|
12708
|
+
_v$42 !== _p$.t && className(_el$99, _p$.t = _v$42);
|
|
12709
|
+
_v$43 !== _p$.a && setAttribute(_el$99, "data-error", _p$.a = _v$43);
|
|
12710
|
+
_v$44 !== _p$.o && className(_el$100, _p$.o = _v$44);
|
|
12711
|
+
_v$45 !== _p$.i && className(_el$101, _p$.i = _v$45);
|
|
12712
|
+
_v$46 !== _p$.n && className(_el$102, _p$.n = _v$46);
|
|
12713
|
+
_v$47 !== _p$.s && className(_el$103, _p$.s = _v$47);
|
|
12714
|
+
_v$48 !== _p$.h && className(_el$104, _p$.h = _v$48);
|
|
10380
12715
|
return _p$;
|
|
10381
12716
|
}, {
|
|
10382
12717
|
e: void 0,
|
|
@@ -10388,11 +12723,11 @@ const QueryDetails = () => {
|
|
|
10388
12723
|
s: void 0,
|
|
10389
12724
|
h: void 0
|
|
10390
12725
|
});
|
|
10391
|
-
createRenderEffect(() => _el$
|
|
10392
|
-
return _el$
|
|
12726
|
+
createRenderEffect(() => _el$99.value = JSON.stringify(activeQueryStateData(), null, 2));
|
|
12727
|
+
return _el$98;
|
|
10393
12728
|
}
|
|
10394
|
-
}), _el$
|
|
10395
|
-
insert(_el$
|
|
12729
|
+
}), _el$105);
|
|
12730
|
+
insert(_el$106, createComponent(Explorer, {
|
|
10396
12731
|
label: "Query",
|
|
10397
12732
|
defaultExpanded: ["Query", "queryKey"],
|
|
10398
12733
|
get value() {
|
|
@@ -10421,30 +12756,30 @@ const QueryDetails = () => {
|
|
|
10421
12756
|
`, "tsqd-query-details-actions-btn", "tsqd-query-details-action-loading"), _v$68 = restoringLoading(), _v$69 = css`
|
|
10422
12757
|
background-color: ${t(colors.cyan[500], colors.cyan[400])};
|
|
10423
12758
|
`, _v$70 = clsx(styles().detailsHeader, "tsqd-query-details-header"), _v$71 = clsx(styles().detailsHeader, "tsqd-query-details-header"), _v$72 = tokens.size[2];
|
|
10424
|
-
_v$49 !== _p$.e && className(_el$
|
|
10425
|
-
_v$50 !== _p$.t && className(_el$
|
|
10426
|
-
_v$51 !== _p$.a && className(_el$
|
|
10427
|
-
_v$52 !== _p$.o && className(_el$
|
|
10428
|
-
_v$53 !== _p$.i && className(_el$
|
|
10429
|
-
_v$54 !== _p$.n && className(_el$
|
|
10430
|
-
_v$55 !== _p$.s && className(_el$
|
|
10431
|
-
_v$56 !== _p$.h && (_el$
|
|
10432
|
-
_v$57 !== _p$.r && className(_el$
|
|
10433
|
-
_v$58 !== _p$.d && className(_el$
|
|
10434
|
-
_v$59 !== _p$.l && (_el$
|
|
10435
|
-
_v$60 !== _p$.u && className(_el$
|
|
10436
|
-
_v$61 !== _p$.c && className(_el$
|
|
10437
|
-
_v$62 !== _p$.w && (_el$
|
|
10438
|
-
_v$63 !== _p$.m && className(_el$
|
|
10439
|
-
_v$64 !== _p$.f && className(_el$
|
|
10440
|
-
_v$65 !== _p$.y && (_el$
|
|
10441
|
-
_v$66 !== _p$.g && className(_el$
|
|
10442
|
-
_v$67 !== _p$.p && className(_el$
|
|
10443
|
-
_v$68 !== _p$.b && (_el$
|
|
10444
|
-
_v$69 !== _p$.T && className(_el$
|
|
10445
|
-
_v$70 !== _p$.A && className(_el$
|
|
10446
|
-
_v$71 !== _p$.O && className(_el$
|
|
10447
|
-
_v$72 !== _p$.I && setStyleProperty(_el$
|
|
12759
|
+
_v$49 !== _p$.e && className(_el$61, _p$.e = _v$49);
|
|
12760
|
+
_v$50 !== _p$.t && className(_el$62, _p$.t = _v$50);
|
|
12761
|
+
_v$51 !== _p$.a && className(_el$63, _p$.a = _v$51);
|
|
12762
|
+
_v$52 !== _p$.o && className(_el$67, _p$.o = _v$52);
|
|
12763
|
+
_v$53 !== _p$.i && className(_el$74, _p$.i = _v$53);
|
|
12764
|
+
_v$54 !== _p$.n && className(_el$75, _p$.n = _v$54);
|
|
12765
|
+
_v$55 !== _p$.s && className(_el$76, _p$.s = _v$55);
|
|
12766
|
+
_v$56 !== _p$.h && (_el$76.disabled = _p$.h = _v$56);
|
|
12767
|
+
_v$57 !== _p$.r && className(_el$77, _p$.r = _v$57);
|
|
12768
|
+
_v$58 !== _p$.d && className(_el$78, _p$.d = _v$58);
|
|
12769
|
+
_v$59 !== _p$.l && (_el$78.disabled = _p$.l = _v$59);
|
|
12770
|
+
_v$60 !== _p$.u && className(_el$79, _p$.u = _v$60);
|
|
12771
|
+
_v$61 !== _p$.c && className(_el$80, _p$.c = _v$61);
|
|
12772
|
+
_v$62 !== _p$.w && (_el$80.disabled = _p$.w = _v$62);
|
|
12773
|
+
_v$63 !== _p$.m && className(_el$81, _p$.m = _v$63);
|
|
12774
|
+
_v$64 !== _p$.f && className(_el$82, _p$.f = _v$64);
|
|
12775
|
+
_v$65 !== _p$.y && (_el$82.disabled = _p$.y = _v$65);
|
|
12776
|
+
_v$66 !== _p$.g && className(_el$83, _p$.g = _v$66);
|
|
12777
|
+
_v$67 !== _p$.p && className(_el$84, _p$.p = _v$67);
|
|
12778
|
+
_v$68 !== _p$.b && (_el$84.disabled = _p$.b = _v$68);
|
|
12779
|
+
_v$69 !== _p$.T && className(_el$85, _p$.T = _v$69);
|
|
12780
|
+
_v$70 !== _p$.A && className(_el$95, _p$.A = _v$70);
|
|
12781
|
+
_v$71 !== _p$.O && className(_el$105, _p$.O = _v$71);
|
|
12782
|
+
_v$72 !== _p$.I && setStyleProperty(_el$106, "padding", _p$.I = _v$72);
|
|
10448
12783
|
return _p$;
|
|
10449
12784
|
}, {
|
|
10450
12785
|
e: void 0,
|
|
@@ -10472,7 +12807,7 @@ const QueryDetails = () => {
|
|
|
10472
12807
|
O: void 0,
|
|
10473
12808
|
I: void 0
|
|
10474
12809
|
});
|
|
10475
|
-
return _el$
|
|
12810
|
+
return _el$61;
|
|
10476
12811
|
}
|
|
10477
12812
|
});
|
|
10478
12813
|
};
|
|
@@ -10517,8 +12852,8 @@ const MutationDetails = () => {
|
|
|
10517
12852
|
return activeMutation();
|
|
10518
12853
|
},
|
|
10519
12854
|
get children() {
|
|
10520
|
-
var _el$
|
|
10521
|
-
insert(_el$
|
|
12855
|
+
var _el$108 = _tmpl$36(), _el$109 = _el$108.firstChild, _el$110 = _el$109.nextSibling, _el$111 = _el$110.firstChild, _el$112 = _el$111.firstChild, _el$113 = _el$112.firstChild, _el$114 = _el$112.nextSibling, _el$117 = _el$111.nextSibling.firstChild.nextSibling, _el$118 = _el$110.nextSibling, _el$119 = _el$118.nextSibling, _el$120 = _el$119.nextSibling, _el$121 = _el$120.nextSibling, _el$122 = _el$121.nextSibling, _el$123 = _el$122.nextSibling, _el$124 = _el$123.nextSibling, _el$125 = _el$124.nextSibling;
|
|
12856
|
+
insert(_el$113, createComponent(Show, {
|
|
10522
12857
|
get when() {
|
|
10523
12858
|
return activeMutation().options.mutationKey;
|
|
10524
12859
|
},
|
|
@@ -10527,13 +12862,13 @@ const MutationDetails = () => {
|
|
|
10527
12862
|
return displayValue(activeMutation().options.mutationKey, true);
|
|
10528
12863
|
}
|
|
10529
12864
|
}));
|
|
10530
|
-
insert(_el$
|
|
12865
|
+
insert(_el$114, createComponent(Show, {
|
|
10531
12866
|
get when() {
|
|
10532
12867
|
return color() === "purple";
|
|
10533
12868
|
},
|
|
10534
12869
|
children: "pending"
|
|
10535
12870
|
}), null);
|
|
10536
|
-
insert(_el$
|
|
12871
|
+
insert(_el$114, createComponent(Show, {
|
|
10537
12872
|
get when() {
|
|
10538
12873
|
return color() !== "purple";
|
|
10539
12874
|
},
|
|
@@ -10541,29 +12876,32 @@ const MutationDetails = () => {
|
|
|
10541
12876
|
return status();
|
|
10542
12877
|
}
|
|
10543
12878
|
}), null);
|
|
10544
|
-
insert(_el$
|
|
10545
|
-
insert(_el$
|
|
12879
|
+
insert(_el$117, () => new Date(activeMutation().state.submittedAt).toLocaleTimeString());
|
|
12880
|
+
insert(_el$119, createComponent(Explorer, {
|
|
10546
12881
|
label: "Variables",
|
|
10547
12882
|
defaultExpanded: ["Variables"],
|
|
10548
12883
|
get value() {
|
|
10549
12884
|
return activeMutation().state.variables;
|
|
10550
12885
|
}
|
|
10551
12886
|
}));
|
|
10552
|
-
insert(_el$
|
|
12887
|
+
insert(_el$121, createComponent(Explorer, {
|
|
10553
12888
|
label: "Context",
|
|
10554
12889
|
defaultExpanded: ["Context"],
|
|
10555
12890
|
get value() {
|
|
10556
12891
|
return activeMutation().state.context;
|
|
10557
12892
|
}
|
|
10558
12893
|
}));
|
|
10559
|
-
insert(_el$
|
|
12894
|
+
insert(_el$123, createComponent(SearchableExplorer, {
|
|
12895
|
+
get searchKey() {
|
|
12896
|
+
return activeMutation();
|
|
12897
|
+
},
|
|
10560
12898
|
label: "Data",
|
|
10561
12899
|
defaultExpanded: ["Data"],
|
|
10562
12900
|
get value() {
|
|
10563
12901
|
return activeMutation().state.data;
|
|
10564
12902
|
}
|
|
10565
12903
|
}));
|
|
10566
|
-
insert(_el$
|
|
12904
|
+
insert(_el$125, createComponent(Explorer, {
|
|
10567
12905
|
label: "Mutation",
|
|
10568
12906
|
defaultExpanded: ["Mutation"],
|
|
10569
12907
|
get value() {
|
|
@@ -10572,18 +12910,18 @@ const MutationDetails = () => {
|
|
|
10572
12910
|
}));
|
|
10573
12911
|
createRenderEffect((_p$) => {
|
|
10574
12912
|
var _v$73 = clsx(styles().detailsContainer, "tsqd-query-details-container"), _v$74 = clsx(styles().detailsHeader, "tsqd-query-details-header"), _v$75 = clsx(styles().detailsBody, "tsqd-query-details-summary-container"), _v$76 = clsx(styles().queryDetailsStatus, getQueryStatusColors()), _v$77 = clsx(styles().detailsHeader, "tsqd-query-details-header"), _v$78 = tokens.size[2], _v$79 = clsx(styles().detailsHeader, "tsqd-query-details-header"), _v$80 = tokens.size[2], _v$81 = clsx(styles().detailsHeader, "tsqd-query-details-header"), _v$82 = tokens.size[2], _v$83 = clsx(styles().detailsHeader, "tsqd-query-details-header"), _v$84 = tokens.size[2];
|
|
10575
|
-
_v$73 !== _p$.e && className(_el$
|
|
10576
|
-
_v$74 !== _p$.t && className(_el$
|
|
10577
|
-
_v$75 !== _p$.a && className(_el$
|
|
10578
|
-
_v$76 !== _p$.o && className(_el$
|
|
10579
|
-
_v$77 !== _p$.i && className(_el$
|
|
10580
|
-
_v$78 !== _p$.n && setStyleProperty(_el$
|
|
10581
|
-
_v$79 !== _p$.s && className(_el$
|
|
10582
|
-
_v$80 !== _p$.h && setStyleProperty(_el$
|
|
10583
|
-
_v$81 !== _p$.r && className(_el$
|
|
10584
|
-
_v$82 !== _p$.d && setStyleProperty(_el$
|
|
10585
|
-
_v$83 !== _p$.l && className(_el$
|
|
10586
|
-
_v$84 !== _p$.u && setStyleProperty(_el$
|
|
12913
|
+
_v$73 !== _p$.e && className(_el$108, _p$.e = _v$73);
|
|
12914
|
+
_v$74 !== _p$.t && className(_el$109, _p$.t = _v$74);
|
|
12915
|
+
_v$75 !== _p$.a && className(_el$110, _p$.a = _v$75);
|
|
12916
|
+
_v$76 !== _p$.o && className(_el$114, _p$.o = _v$76);
|
|
12917
|
+
_v$77 !== _p$.i && className(_el$118, _p$.i = _v$77);
|
|
12918
|
+
_v$78 !== _p$.n && setStyleProperty(_el$119, "padding", _p$.n = _v$78);
|
|
12919
|
+
_v$79 !== _p$.s && className(_el$120, _p$.s = _v$79);
|
|
12920
|
+
_v$80 !== _p$.h && setStyleProperty(_el$121, "padding", _p$.h = _v$80);
|
|
12921
|
+
_v$81 !== _p$.r && className(_el$122, _p$.r = _v$81);
|
|
12922
|
+
_v$82 !== _p$.d && setStyleProperty(_el$123, "padding", _p$.d = _v$82);
|
|
12923
|
+
_v$83 !== _p$.l && className(_el$124, _p$.l = _v$83);
|
|
12924
|
+
_v$84 !== _p$.u && setStyleProperty(_el$125, "padding", _p$.u = _v$84);
|
|
10587
12925
|
return _p$;
|
|
10588
12926
|
}, {
|
|
10589
12927
|
e: void 0,
|
|
@@ -10599,7 +12937,7 @@ const MutationDetails = () => {
|
|
|
10599
12937
|
l: void 0,
|
|
10600
12938
|
u: void 0
|
|
10601
12939
|
});
|
|
10602
|
-
return _el$
|
|
12940
|
+
return _el$108;
|
|
10603
12941
|
}
|
|
10604
12942
|
});
|
|
10605
12943
|
};
|
|
@@ -10766,6 +13104,8 @@ const stylesFactory = (theme, css) => {
|
|
|
10766
13104
|
z-index: 9999;
|
|
10767
13105
|
display: flex;
|
|
10768
13106
|
height: 100%;
|
|
13107
|
+
flex: 1 1 500px;
|
|
13108
|
+
min-height: 0;
|
|
10769
13109
|
gap: ${tokens.size[.5]};
|
|
10770
13110
|
& * {
|
|
10771
13111
|
box-sizing: border-box;
|
|
@@ -11279,6 +13619,7 @@ const stylesFactory = (theme, css) => {
|
|
|
11279
13619
|
`,
|
|
11280
13620
|
overflowQueryContainer: css`
|
|
11281
13621
|
flex: 1;
|
|
13622
|
+
min-height: 0;
|
|
11282
13623
|
overflow-y: auto;
|
|
11283
13624
|
& > div {
|
|
11284
13625
|
display: flex;
|
|
@@ -11287,6 +13628,7 @@ const stylesFactory = (theme, css) => {
|
|
|
11287
13628
|
`,
|
|
11288
13629
|
queryRow: css`
|
|
11289
13630
|
display: flex;
|
|
13631
|
+
width: 100%;
|
|
11290
13632
|
align-items: center;
|
|
11291
13633
|
padding: 0;
|
|
11292
13634
|
border: none;
|