@tanstack/query-devtools 5.0.0-beta.36 → 5.0.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/Devtools/66PXWIOF.js +12098 -0
- package/build/Devtools/ALVY75L5.jsx +13041 -0
- package/build/Devtools/H2EROWFU.jsx +13043 -0
- package/build/Devtools/HTDVDYMT.js +12100 -0
- package/build/chunk/{C5UID3AG.js → 7MNJIXJ6.js} +235 -1
- package/build/chunk/{QGJD3TIO.js → L2WNRKEK.js} +235 -1
- package/build/chunk/{KC3COQO2.jsx → LGDS24HT.jsx} +634 -1
- package/build/chunk/{2N7SLCC6.jsx → PWC4YVZY.jsx} +634 -1
- package/build/dev.cjs +8114 -622
- package/build/dev.js +2 -2
- package/build/dev.jsx +2 -2
- package/build/index.cjs +8113 -621
- package/build/index.js +2 -2
- package/build/index.jsx +2 -2
- package/package.json +3 -2
- package/src/Devtools.tsx +257 -196
- package/src/Explorer.tsx +53 -19
- package/src/icons/index.tsx +55 -9
- package/src/theme.ts +2 -0
- package/build/Devtools/DWELN6EN.jsx +0 -5594
- package/build/Devtools/FASZSC6H.jsx +0 -5592
- package/build/Devtools/OXAQM7EL.js +0 -4839
- package/build/Devtools/PCOU65Y2.js +0 -4841
|
@@ -6,6 +6,13 @@ var sharedConfig = {
|
|
|
6
6
|
function setHydrateContext(context) {
|
|
7
7
|
sharedConfig.context = context;
|
|
8
8
|
}
|
|
9
|
+
function nextHydrateContext() {
|
|
10
|
+
return {
|
|
11
|
+
...sharedConfig.context,
|
|
12
|
+
id: `${sharedConfig.context.id}${sharedConfig.context.count++}-`,
|
|
13
|
+
count: 0
|
|
14
|
+
};
|
|
15
|
+
}
|
|
9
16
|
var equalFn = (a, b) => a === b;
|
|
10
17
|
var $PROXY = Symbol("solid-proxy");
|
|
11
18
|
var $TRACK = Symbol("solid-track");
|
|
@@ -242,6 +249,9 @@ function createResource(pSource, pFetcher, pOptions) {
|
|
|
242
249
|
mutate: setValue
|
|
243
250
|
}];
|
|
244
251
|
}
|
|
252
|
+
function batch(fn) {
|
|
253
|
+
return runUpdates(fn, false);
|
|
254
|
+
}
|
|
245
255
|
function untrack(fn) {
|
|
246
256
|
if (Listener === null)
|
|
247
257
|
return fn();
|
|
@@ -286,6 +296,26 @@ function onCleanup(fn) {
|
|
|
286
296
|
Owner.cleanups.push(fn);
|
|
287
297
|
return fn;
|
|
288
298
|
}
|
|
299
|
+
function getListener() {
|
|
300
|
+
return Listener;
|
|
301
|
+
}
|
|
302
|
+
function getOwner() {
|
|
303
|
+
return Owner;
|
|
304
|
+
}
|
|
305
|
+
function runWithOwner(o, fn) {
|
|
306
|
+
const prev = Owner;
|
|
307
|
+
const prevListener = Listener;
|
|
308
|
+
Owner = o;
|
|
309
|
+
Listener = null;
|
|
310
|
+
try {
|
|
311
|
+
return runUpdates(fn, true);
|
|
312
|
+
} catch (err) {
|
|
313
|
+
handleError(err);
|
|
314
|
+
} finally {
|
|
315
|
+
Owner = prev;
|
|
316
|
+
Listener = prevListener;
|
|
317
|
+
}
|
|
318
|
+
}
|
|
289
319
|
function startTransition(fn) {
|
|
290
320
|
if (Transition && Transition.running) {
|
|
291
321
|
fn();
|
|
@@ -960,6 +990,181 @@ function indexArray(list, mapFn, options = {}) {
|
|
|
960
990
|
}
|
|
961
991
|
};
|
|
962
992
|
}
|
|
993
|
+
var hydrationEnabled = false;
|
|
994
|
+
function createComponent(Comp, props) {
|
|
995
|
+
if (hydrationEnabled) {
|
|
996
|
+
if (sharedConfig.context) {
|
|
997
|
+
const c = sharedConfig.context;
|
|
998
|
+
setHydrateContext(nextHydrateContext());
|
|
999
|
+
const r = untrack(() => Comp(props || {}));
|
|
1000
|
+
setHydrateContext(c);
|
|
1001
|
+
return r;
|
|
1002
|
+
}
|
|
1003
|
+
}
|
|
1004
|
+
return untrack(() => Comp(props || {}));
|
|
1005
|
+
}
|
|
1006
|
+
function trueFn() {
|
|
1007
|
+
return true;
|
|
1008
|
+
}
|
|
1009
|
+
var propTraps = {
|
|
1010
|
+
get(_, property, receiver) {
|
|
1011
|
+
if (property === $PROXY)
|
|
1012
|
+
return receiver;
|
|
1013
|
+
return _.get(property);
|
|
1014
|
+
},
|
|
1015
|
+
has(_, property) {
|
|
1016
|
+
if (property === $PROXY)
|
|
1017
|
+
return true;
|
|
1018
|
+
return _.has(property);
|
|
1019
|
+
},
|
|
1020
|
+
set: trueFn,
|
|
1021
|
+
deleteProperty: trueFn,
|
|
1022
|
+
getOwnPropertyDescriptor(_, property) {
|
|
1023
|
+
return {
|
|
1024
|
+
configurable: true,
|
|
1025
|
+
enumerable: true,
|
|
1026
|
+
get() {
|
|
1027
|
+
return _.get(property);
|
|
1028
|
+
},
|
|
1029
|
+
set: trueFn,
|
|
1030
|
+
deleteProperty: trueFn
|
|
1031
|
+
};
|
|
1032
|
+
},
|
|
1033
|
+
ownKeys(_) {
|
|
1034
|
+
return _.keys();
|
|
1035
|
+
}
|
|
1036
|
+
};
|
|
1037
|
+
function resolveSource(s) {
|
|
1038
|
+
return !(s = typeof s === "function" ? s() : s) ? {} : s;
|
|
1039
|
+
}
|
|
1040
|
+
function resolveSources() {
|
|
1041
|
+
for (let i = 0, length = this.length; i < length; ++i) {
|
|
1042
|
+
const v = this[i]();
|
|
1043
|
+
if (v !== void 0)
|
|
1044
|
+
return v;
|
|
1045
|
+
}
|
|
1046
|
+
}
|
|
1047
|
+
function mergeProps(...sources) {
|
|
1048
|
+
let proxy = false;
|
|
1049
|
+
for (let i = 0; i < sources.length; i++) {
|
|
1050
|
+
const s = sources[i];
|
|
1051
|
+
proxy = proxy || !!s && $PROXY in s;
|
|
1052
|
+
sources[i] = typeof s === "function" ? (proxy = true, createMemo(s)) : s;
|
|
1053
|
+
}
|
|
1054
|
+
if (proxy) {
|
|
1055
|
+
return new Proxy({
|
|
1056
|
+
get(property) {
|
|
1057
|
+
for (let i = sources.length - 1; i >= 0; i--) {
|
|
1058
|
+
const v = resolveSource(sources[i])[property];
|
|
1059
|
+
if (v !== void 0)
|
|
1060
|
+
return v;
|
|
1061
|
+
}
|
|
1062
|
+
},
|
|
1063
|
+
has(property) {
|
|
1064
|
+
for (let i = sources.length - 1; i >= 0; i--) {
|
|
1065
|
+
if (property in resolveSource(sources[i]))
|
|
1066
|
+
return true;
|
|
1067
|
+
}
|
|
1068
|
+
return false;
|
|
1069
|
+
},
|
|
1070
|
+
keys() {
|
|
1071
|
+
const keys = [];
|
|
1072
|
+
for (let i = 0; i < sources.length; i++)
|
|
1073
|
+
keys.push(...Object.keys(resolveSource(sources[i])));
|
|
1074
|
+
return [...new Set(keys)];
|
|
1075
|
+
}
|
|
1076
|
+
}, propTraps);
|
|
1077
|
+
}
|
|
1078
|
+
const target = {};
|
|
1079
|
+
const sourcesMap = {};
|
|
1080
|
+
const defined = /* @__PURE__ */ new Set();
|
|
1081
|
+
for (let i = sources.length - 1; i >= 0; i--) {
|
|
1082
|
+
const source = sources[i];
|
|
1083
|
+
if (!source)
|
|
1084
|
+
continue;
|
|
1085
|
+
const sourceKeys = Object.getOwnPropertyNames(source);
|
|
1086
|
+
for (let i2 = 0, length = sourceKeys.length; i2 < length; i2++) {
|
|
1087
|
+
const key = sourceKeys[i2];
|
|
1088
|
+
if (key === "__proto__" || key === "constructor")
|
|
1089
|
+
continue;
|
|
1090
|
+
const desc = Object.getOwnPropertyDescriptor(source, key);
|
|
1091
|
+
if (!defined.has(key)) {
|
|
1092
|
+
if (desc.get) {
|
|
1093
|
+
defined.add(key);
|
|
1094
|
+
Object.defineProperty(target, key, {
|
|
1095
|
+
enumerable: true,
|
|
1096
|
+
configurable: true,
|
|
1097
|
+
get: resolveSources.bind(sourcesMap[key] = [desc.get.bind(source)])
|
|
1098
|
+
});
|
|
1099
|
+
} else {
|
|
1100
|
+
if (desc.value !== void 0)
|
|
1101
|
+
defined.add(key);
|
|
1102
|
+
target[key] = desc.value;
|
|
1103
|
+
}
|
|
1104
|
+
} else {
|
|
1105
|
+
const sources2 = sourcesMap[key];
|
|
1106
|
+
if (sources2) {
|
|
1107
|
+
if (desc.get) {
|
|
1108
|
+
sources2.push(desc.get.bind(source));
|
|
1109
|
+
} else if (desc.value !== void 0) {
|
|
1110
|
+
sources2.push(() => desc.value);
|
|
1111
|
+
}
|
|
1112
|
+
} else if (target[key] === void 0)
|
|
1113
|
+
target[key] = desc.value;
|
|
1114
|
+
}
|
|
1115
|
+
}
|
|
1116
|
+
}
|
|
1117
|
+
return target;
|
|
1118
|
+
}
|
|
1119
|
+
function splitProps(props, ...keys) {
|
|
1120
|
+
if ($PROXY in props) {
|
|
1121
|
+
const blocked = new Set(keys.length > 1 ? keys.flat() : keys[0]);
|
|
1122
|
+
const res = keys.map((k) => {
|
|
1123
|
+
return new Proxy({
|
|
1124
|
+
get(property) {
|
|
1125
|
+
return k.includes(property) ? props[property] : void 0;
|
|
1126
|
+
},
|
|
1127
|
+
has(property) {
|
|
1128
|
+
return k.includes(property) && property in props;
|
|
1129
|
+
},
|
|
1130
|
+
keys() {
|
|
1131
|
+
return k.filter((property) => property in props);
|
|
1132
|
+
}
|
|
1133
|
+
}, propTraps);
|
|
1134
|
+
});
|
|
1135
|
+
res.push(new Proxy({
|
|
1136
|
+
get(property) {
|
|
1137
|
+
return blocked.has(property) ? void 0 : props[property];
|
|
1138
|
+
},
|
|
1139
|
+
has(property) {
|
|
1140
|
+
return blocked.has(property) ? false : property in props;
|
|
1141
|
+
},
|
|
1142
|
+
keys() {
|
|
1143
|
+
return Object.keys(props).filter((k) => !blocked.has(k));
|
|
1144
|
+
}
|
|
1145
|
+
}, propTraps));
|
|
1146
|
+
return res;
|
|
1147
|
+
}
|
|
1148
|
+
const otherObject = {};
|
|
1149
|
+
const objects = keys.map(() => ({}));
|
|
1150
|
+
for (const propName of Object.getOwnPropertyNames(props)) {
|
|
1151
|
+
const desc = Object.getOwnPropertyDescriptor(props, propName);
|
|
1152
|
+
const isDefaultDesc = !desc.get && !desc.set && desc.enumerable && desc.writable && desc.configurable;
|
|
1153
|
+
let blocked = false;
|
|
1154
|
+
let objectIndex = 0;
|
|
1155
|
+
for (const k of keys) {
|
|
1156
|
+
if (k.includes(propName)) {
|
|
1157
|
+
blocked = true;
|
|
1158
|
+
isDefaultDesc ? objects[objectIndex][propName] = desc.value : Object.defineProperty(objects[objectIndex], propName, desc);
|
|
1159
|
+
}
|
|
1160
|
+
++objectIndex;
|
|
1161
|
+
}
|
|
1162
|
+
if (!blocked) {
|
|
1163
|
+
isDefaultDesc ? otherObject[propName] = desc.value : Object.defineProperty(otherObject, propName, desc);
|
|
1164
|
+
}
|
|
1165
|
+
}
|
|
1166
|
+
return [...objects, otherObject];
|
|
1167
|
+
}
|
|
963
1168
|
function lazy(fn) {
|
|
964
1169
|
let comp;
|
|
965
1170
|
let p;
|
|
@@ -996,6 +1201,11 @@ function lazy(fn) {
|
|
|
996
1201
|
wrap.preload = () => p || ((p = fn()).then((mod) => comp = () => mod.default), p);
|
|
997
1202
|
return wrap;
|
|
998
1203
|
}
|
|
1204
|
+
var counter = 0;
|
|
1205
|
+
function createUniqueId() {
|
|
1206
|
+
const ctx = sharedConfig.context;
|
|
1207
|
+
return ctx ? `${ctx.id}${ctx.count++}` : `cl-${counter++}`;
|
|
1208
|
+
}
|
|
999
1209
|
var narrowedError = (name) => `Stale read from <${name}>.`;
|
|
1000
1210
|
function For(props) {
|
|
1001
1211
|
const fallback = "fallback" in props && {
|
|
@@ -1063,10 +1273,128 @@ function Match(props) {
|
|
|
1063
1273
|
return props;
|
|
1064
1274
|
}
|
|
1065
1275
|
var SuspenseListContext = createContext();
|
|
1276
|
+
var DEV = void 0;
|
|
1066
1277
|
|
|
1067
1278
|
// ../../node_modules/.pnpm/solid-js@1.7.8/node_modules/solid-js/web/dist/web.js
|
|
1068
1279
|
var booleans = ["allowfullscreen", "async", "autofocus", "autoplay", "checked", "controls", "default", "disabled", "formnovalidate", "hidden", "indeterminate", "ismap", "loop", "multiple", "muted", "nomodule", "novalidate", "open", "playsinline", "readonly", "required", "reversed", "seamless", "selected"];
|
|
1069
1280
|
var Properties = /* @__PURE__ */ new Set(["className", "value", "readOnly", "formNoValidate", "isMap", "noModule", "playsInline", ...booleans]);
|
|
1281
|
+
var ChildProperties = /* @__PURE__ */ new Set(["innerHTML", "textContent", "innerText", "children"]);
|
|
1282
|
+
var Aliases = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
|
|
1283
|
+
className: "class",
|
|
1284
|
+
htmlFor: "for"
|
|
1285
|
+
});
|
|
1286
|
+
var PropAliases = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
|
|
1287
|
+
class: "className",
|
|
1288
|
+
formnovalidate: {
|
|
1289
|
+
$: "formNoValidate",
|
|
1290
|
+
BUTTON: 1,
|
|
1291
|
+
INPUT: 1
|
|
1292
|
+
},
|
|
1293
|
+
ismap: {
|
|
1294
|
+
$: "isMap",
|
|
1295
|
+
IMG: 1
|
|
1296
|
+
},
|
|
1297
|
+
nomodule: {
|
|
1298
|
+
$: "noModule",
|
|
1299
|
+
SCRIPT: 1
|
|
1300
|
+
},
|
|
1301
|
+
playsinline: {
|
|
1302
|
+
$: "playsInline",
|
|
1303
|
+
VIDEO: 1
|
|
1304
|
+
},
|
|
1305
|
+
readonly: {
|
|
1306
|
+
$: "readOnly",
|
|
1307
|
+
INPUT: 1,
|
|
1308
|
+
TEXTAREA: 1
|
|
1309
|
+
}
|
|
1310
|
+
});
|
|
1311
|
+
function getPropAlias(prop, tagName) {
|
|
1312
|
+
const a = PropAliases[prop];
|
|
1313
|
+
return typeof a === "object" ? a[tagName] ? a["$"] : void 0 : a;
|
|
1314
|
+
}
|
|
1315
|
+
var DelegatedEvents = /* @__PURE__ */ new Set(["beforeinput", "click", "dblclick", "contextmenu", "focusin", "focusout", "input", "keydown", "keyup", "mousedown", "mousemove", "mouseout", "mouseover", "mouseup", "pointerdown", "pointermove", "pointerout", "pointerover", "pointerup", "touchend", "touchmove", "touchstart"]);
|
|
1316
|
+
var SVGElements = /* @__PURE__ */ new Set([
|
|
1317
|
+
"altGlyph",
|
|
1318
|
+
"altGlyphDef",
|
|
1319
|
+
"altGlyphItem",
|
|
1320
|
+
"animate",
|
|
1321
|
+
"animateColor",
|
|
1322
|
+
"animateMotion",
|
|
1323
|
+
"animateTransform",
|
|
1324
|
+
"circle",
|
|
1325
|
+
"clipPath",
|
|
1326
|
+
"color-profile",
|
|
1327
|
+
"cursor",
|
|
1328
|
+
"defs",
|
|
1329
|
+
"desc",
|
|
1330
|
+
"ellipse",
|
|
1331
|
+
"feBlend",
|
|
1332
|
+
"feColorMatrix",
|
|
1333
|
+
"feComponentTransfer",
|
|
1334
|
+
"feComposite",
|
|
1335
|
+
"feConvolveMatrix",
|
|
1336
|
+
"feDiffuseLighting",
|
|
1337
|
+
"feDisplacementMap",
|
|
1338
|
+
"feDistantLight",
|
|
1339
|
+
"feFlood",
|
|
1340
|
+
"feFuncA",
|
|
1341
|
+
"feFuncB",
|
|
1342
|
+
"feFuncG",
|
|
1343
|
+
"feFuncR",
|
|
1344
|
+
"feGaussianBlur",
|
|
1345
|
+
"feImage",
|
|
1346
|
+
"feMerge",
|
|
1347
|
+
"feMergeNode",
|
|
1348
|
+
"feMorphology",
|
|
1349
|
+
"feOffset",
|
|
1350
|
+
"fePointLight",
|
|
1351
|
+
"feSpecularLighting",
|
|
1352
|
+
"feSpotLight",
|
|
1353
|
+
"feTile",
|
|
1354
|
+
"feTurbulence",
|
|
1355
|
+
"filter",
|
|
1356
|
+
"font",
|
|
1357
|
+
"font-face",
|
|
1358
|
+
"font-face-format",
|
|
1359
|
+
"font-face-name",
|
|
1360
|
+
"font-face-src",
|
|
1361
|
+
"font-face-uri",
|
|
1362
|
+
"foreignObject",
|
|
1363
|
+
"g",
|
|
1364
|
+
"glyph",
|
|
1365
|
+
"glyphRef",
|
|
1366
|
+
"hkern",
|
|
1367
|
+
"image",
|
|
1368
|
+
"line",
|
|
1369
|
+
"linearGradient",
|
|
1370
|
+
"marker",
|
|
1371
|
+
"mask",
|
|
1372
|
+
"metadata",
|
|
1373
|
+
"missing-glyph",
|
|
1374
|
+
"mpath",
|
|
1375
|
+
"path",
|
|
1376
|
+
"pattern",
|
|
1377
|
+
"polygon",
|
|
1378
|
+
"polyline",
|
|
1379
|
+
"radialGradient",
|
|
1380
|
+
"rect",
|
|
1381
|
+
"set",
|
|
1382
|
+
"stop",
|
|
1383
|
+
"svg",
|
|
1384
|
+
"switch",
|
|
1385
|
+
"symbol",
|
|
1386
|
+
"text",
|
|
1387
|
+
"textPath",
|
|
1388
|
+
"tref",
|
|
1389
|
+
"tspan",
|
|
1390
|
+
"use",
|
|
1391
|
+
"view",
|
|
1392
|
+
"vkern"
|
|
1393
|
+
]);
|
|
1394
|
+
var SVGNamespace = {
|
|
1395
|
+
xlink: "http://www.w3.org/1999/xlink",
|
|
1396
|
+
xml: "http://www.w3.org/XML/1998/namespace"
|
|
1397
|
+
};
|
|
1070
1398
|
function reconcileArrays(parentNode, a, b) {
|
|
1071
1399
|
let bLength = b.length, aEnd = a.length, bEnd = bLength, aStart = 0, bStart = 0, after = a[aEnd - 1].nextSibling, map = null;
|
|
1072
1400
|
while (aStart < aEnd || bStart < bEnd) {
|
|
@@ -1123,6 +1451,7 @@ function reconcileArrays(parentNode, a, b) {
|
|
|
1123
1451
|
}
|
|
1124
1452
|
}
|
|
1125
1453
|
}
|
|
1454
|
+
var $$EVENTS = "_$DX_DELEGATE";
|
|
1126
1455
|
function render(code, element, init, options = {}) {
|
|
1127
1456
|
let disposer;
|
|
1128
1457
|
createRoot((dispose2) => {
|
|
@@ -1134,6 +1463,109 @@ function render(code, element, init, options = {}) {
|
|
|
1134
1463
|
element.textContent = "";
|
|
1135
1464
|
};
|
|
1136
1465
|
}
|
|
1466
|
+
function template(html, isCE, isSVG) {
|
|
1467
|
+
let node;
|
|
1468
|
+
const create = () => {
|
|
1469
|
+
const t = document.createElement("template");
|
|
1470
|
+
t.innerHTML = html;
|
|
1471
|
+
return isSVG ? t.content.firstChild.firstChild : t.content.firstChild;
|
|
1472
|
+
};
|
|
1473
|
+
const fn = isCE ? () => untrack(() => document.importNode(node || (node = create()), true)) : () => (node || (node = create())).cloneNode(true);
|
|
1474
|
+
fn.cloneNode = fn;
|
|
1475
|
+
return fn;
|
|
1476
|
+
}
|
|
1477
|
+
function delegateEvents(eventNames, document2 = window.document) {
|
|
1478
|
+
const e = document2[$$EVENTS] || (document2[$$EVENTS] = /* @__PURE__ */ new Set());
|
|
1479
|
+
for (let i = 0, l = eventNames.length; i < l; i++) {
|
|
1480
|
+
const name = eventNames[i];
|
|
1481
|
+
if (!e.has(name)) {
|
|
1482
|
+
e.add(name);
|
|
1483
|
+
document2.addEventListener(name, eventHandler);
|
|
1484
|
+
}
|
|
1485
|
+
}
|
|
1486
|
+
}
|
|
1487
|
+
function setAttribute(node, name, value) {
|
|
1488
|
+
if (value == null)
|
|
1489
|
+
node.removeAttribute(name);
|
|
1490
|
+
else
|
|
1491
|
+
node.setAttribute(name, value);
|
|
1492
|
+
}
|
|
1493
|
+
function setAttributeNS(node, namespace, name, value) {
|
|
1494
|
+
if (value == null)
|
|
1495
|
+
node.removeAttributeNS(namespace, name);
|
|
1496
|
+
else
|
|
1497
|
+
node.setAttributeNS(namespace, name, value);
|
|
1498
|
+
}
|
|
1499
|
+
function className(node, value) {
|
|
1500
|
+
if (value == null)
|
|
1501
|
+
node.removeAttribute("class");
|
|
1502
|
+
else
|
|
1503
|
+
node.className = value;
|
|
1504
|
+
}
|
|
1505
|
+
function addEventListener(node, name, handler, delegate) {
|
|
1506
|
+
if (delegate) {
|
|
1507
|
+
if (Array.isArray(handler)) {
|
|
1508
|
+
node[`$$${name}`] = handler[0];
|
|
1509
|
+
node[`$$${name}Data`] = handler[1];
|
|
1510
|
+
} else
|
|
1511
|
+
node[`$$${name}`] = handler;
|
|
1512
|
+
} else if (Array.isArray(handler)) {
|
|
1513
|
+
const handlerFn = handler[0];
|
|
1514
|
+
node.addEventListener(name, handler[0] = (e) => handlerFn.call(node, handler[1], e));
|
|
1515
|
+
} else
|
|
1516
|
+
node.addEventListener(name, handler);
|
|
1517
|
+
}
|
|
1518
|
+
function classList(node, value, prev = {}) {
|
|
1519
|
+
const classKeys = Object.keys(value || {}), prevKeys = Object.keys(prev);
|
|
1520
|
+
let i, len;
|
|
1521
|
+
for (i = 0, len = prevKeys.length; i < len; i++) {
|
|
1522
|
+
const key = prevKeys[i];
|
|
1523
|
+
if (!key || key === "undefined" || value[key])
|
|
1524
|
+
continue;
|
|
1525
|
+
toggleClassKey(node, key, false);
|
|
1526
|
+
delete prev[key];
|
|
1527
|
+
}
|
|
1528
|
+
for (i = 0, len = classKeys.length; i < len; i++) {
|
|
1529
|
+
const key = classKeys[i], classValue = !!value[key];
|
|
1530
|
+
if (!key || key === "undefined" || prev[key] === classValue || !classValue)
|
|
1531
|
+
continue;
|
|
1532
|
+
toggleClassKey(node, key, true);
|
|
1533
|
+
prev[key] = classValue;
|
|
1534
|
+
}
|
|
1535
|
+
return prev;
|
|
1536
|
+
}
|
|
1537
|
+
function style(node, value, prev) {
|
|
1538
|
+
if (!value)
|
|
1539
|
+
return prev ? setAttribute(node, "style") : value;
|
|
1540
|
+
const nodeStyle = node.style;
|
|
1541
|
+
if (typeof value === "string")
|
|
1542
|
+
return nodeStyle.cssText = value;
|
|
1543
|
+
typeof prev === "string" && (nodeStyle.cssText = prev = void 0);
|
|
1544
|
+
prev || (prev = {});
|
|
1545
|
+
value || (value = {});
|
|
1546
|
+
let v, s;
|
|
1547
|
+
for (s in prev) {
|
|
1548
|
+
value[s] == null && nodeStyle.removeProperty(s);
|
|
1549
|
+
delete prev[s];
|
|
1550
|
+
}
|
|
1551
|
+
for (s in value) {
|
|
1552
|
+
v = value[s];
|
|
1553
|
+
if (v !== prev[s]) {
|
|
1554
|
+
nodeStyle.setProperty(s, v);
|
|
1555
|
+
prev[s] = v;
|
|
1556
|
+
}
|
|
1557
|
+
}
|
|
1558
|
+
return prev;
|
|
1559
|
+
}
|
|
1560
|
+
function spread(node, props = {}, isSVG, skipChildren) {
|
|
1561
|
+
const prevProps = {};
|
|
1562
|
+
if (!skipChildren) {
|
|
1563
|
+
createRenderEffect(() => prevProps.children = insertExpression(node, props.children, prevProps.children));
|
|
1564
|
+
}
|
|
1565
|
+
createRenderEffect(() => props.ref && props.ref(node));
|
|
1566
|
+
createRenderEffect(() => assign(node, props, isSVG, true, prevProps, true));
|
|
1567
|
+
return prevProps;
|
|
1568
|
+
}
|
|
1137
1569
|
function insert(parent, accessor, marker, initial) {
|
|
1138
1570
|
if (marker !== void 0 && !initial)
|
|
1139
1571
|
initial = [];
|
|
@@ -1141,6 +1573,127 @@ function insert(parent, accessor, marker, initial) {
|
|
|
1141
1573
|
return insertExpression(parent, accessor, initial, marker);
|
|
1142
1574
|
createRenderEffect((current) => insertExpression(parent, accessor(), current, marker), initial);
|
|
1143
1575
|
}
|
|
1576
|
+
function assign(node, props, isSVG, skipChildren, prevProps = {}, skipRef = false) {
|
|
1577
|
+
props || (props = {});
|
|
1578
|
+
for (const prop in prevProps) {
|
|
1579
|
+
if (!(prop in props)) {
|
|
1580
|
+
if (prop === "children")
|
|
1581
|
+
continue;
|
|
1582
|
+
prevProps[prop] = assignProp(node, prop, null, prevProps[prop], isSVG, skipRef);
|
|
1583
|
+
}
|
|
1584
|
+
}
|
|
1585
|
+
for (const prop in props) {
|
|
1586
|
+
if (prop === "children") {
|
|
1587
|
+
if (!skipChildren)
|
|
1588
|
+
insertExpression(node, props.children);
|
|
1589
|
+
continue;
|
|
1590
|
+
}
|
|
1591
|
+
const value = props[prop];
|
|
1592
|
+
prevProps[prop] = assignProp(node, prop, value, prevProps[prop], isSVG, skipRef);
|
|
1593
|
+
}
|
|
1594
|
+
}
|
|
1595
|
+
function getNextElement(template2) {
|
|
1596
|
+
let node, key;
|
|
1597
|
+
if (!sharedConfig.context || !(node = sharedConfig.registry.get(key = getHydrationKey()))) {
|
|
1598
|
+
if (sharedConfig.context)
|
|
1599
|
+
console.warn("Unable to find DOM nodes for hydration key:", key);
|
|
1600
|
+
if (!template2)
|
|
1601
|
+
throw new Error("Unrecoverable Hydration Mismatch. No template for key: " + key);
|
|
1602
|
+
return template2();
|
|
1603
|
+
}
|
|
1604
|
+
if (sharedConfig.completed)
|
|
1605
|
+
sharedConfig.completed.add(node);
|
|
1606
|
+
sharedConfig.registry.delete(key);
|
|
1607
|
+
return node;
|
|
1608
|
+
}
|
|
1609
|
+
function toPropertyName(name) {
|
|
1610
|
+
return name.toLowerCase().replace(/-([a-z])/g, (_, w) => w.toUpperCase());
|
|
1611
|
+
}
|
|
1612
|
+
function toggleClassKey(node, key, value) {
|
|
1613
|
+
const classNames = key.trim().split(/\s+/);
|
|
1614
|
+
for (let i = 0, nameLen = classNames.length; i < nameLen; i++)
|
|
1615
|
+
node.classList.toggle(classNames[i], value);
|
|
1616
|
+
}
|
|
1617
|
+
function assignProp(node, prop, value, prev, isSVG, skipRef) {
|
|
1618
|
+
let isCE, isProp, isChildProp, propAlias, forceProp;
|
|
1619
|
+
if (prop === "style")
|
|
1620
|
+
return style(node, value, prev);
|
|
1621
|
+
if (prop === "classList")
|
|
1622
|
+
return classList(node, value, prev);
|
|
1623
|
+
if (value === prev)
|
|
1624
|
+
return prev;
|
|
1625
|
+
if (prop === "ref") {
|
|
1626
|
+
if (!skipRef)
|
|
1627
|
+
value(node);
|
|
1628
|
+
} else if (prop.slice(0, 3) === "on:") {
|
|
1629
|
+
const e = prop.slice(3);
|
|
1630
|
+
prev && node.removeEventListener(e, prev);
|
|
1631
|
+
value && node.addEventListener(e, value);
|
|
1632
|
+
} else if (prop.slice(0, 10) === "oncapture:") {
|
|
1633
|
+
const e = prop.slice(10);
|
|
1634
|
+
prev && node.removeEventListener(e, prev, true);
|
|
1635
|
+
value && node.addEventListener(e, value, true);
|
|
1636
|
+
} else if (prop.slice(0, 2) === "on") {
|
|
1637
|
+
const name = prop.slice(2).toLowerCase();
|
|
1638
|
+
const delegate = DelegatedEvents.has(name);
|
|
1639
|
+
if (!delegate && prev) {
|
|
1640
|
+
const h = Array.isArray(prev) ? prev[0] : prev;
|
|
1641
|
+
node.removeEventListener(name, h);
|
|
1642
|
+
}
|
|
1643
|
+
if (delegate || value) {
|
|
1644
|
+
addEventListener(node, name, value, delegate);
|
|
1645
|
+
delegate && delegateEvents([name]);
|
|
1646
|
+
}
|
|
1647
|
+
} else if (prop.slice(0, 5) === "attr:") {
|
|
1648
|
+
setAttribute(node, prop.slice(5), value);
|
|
1649
|
+
} else if ((forceProp = prop.slice(0, 5) === "prop:") || (isChildProp = ChildProperties.has(prop)) || !isSVG && ((propAlias = getPropAlias(prop, node.tagName)) || (isProp = Properties.has(prop))) || (isCE = node.nodeName.includes("-"))) {
|
|
1650
|
+
if (forceProp) {
|
|
1651
|
+
prop = prop.slice(5);
|
|
1652
|
+
isProp = true;
|
|
1653
|
+
}
|
|
1654
|
+
if (prop === "class" || prop === "className")
|
|
1655
|
+
className(node, value);
|
|
1656
|
+
else if (isCE && !isProp && !isChildProp)
|
|
1657
|
+
node[toPropertyName(prop)] = value;
|
|
1658
|
+
else
|
|
1659
|
+
node[propAlias || prop] = value;
|
|
1660
|
+
} else {
|
|
1661
|
+
const ns = isSVG && prop.indexOf(":") > -1 && SVGNamespace[prop.split(":")[0]];
|
|
1662
|
+
if (ns)
|
|
1663
|
+
setAttributeNS(node, ns, prop, value);
|
|
1664
|
+
else
|
|
1665
|
+
setAttribute(node, Aliases[prop] || prop, value);
|
|
1666
|
+
}
|
|
1667
|
+
return value;
|
|
1668
|
+
}
|
|
1669
|
+
function eventHandler(e) {
|
|
1670
|
+
const key = `$$${e.type}`;
|
|
1671
|
+
let node = e.composedPath && e.composedPath()[0] || e.target;
|
|
1672
|
+
if (e.target !== node) {
|
|
1673
|
+
Object.defineProperty(e, "target", {
|
|
1674
|
+
configurable: true,
|
|
1675
|
+
value: node
|
|
1676
|
+
});
|
|
1677
|
+
}
|
|
1678
|
+
Object.defineProperty(e, "currentTarget", {
|
|
1679
|
+
configurable: true,
|
|
1680
|
+
get() {
|
|
1681
|
+
return node || document;
|
|
1682
|
+
}
|
|
1683
|
+
});
|
|
1684
|
+
if (sharedConfig.registry && !sharedConfig.done)
|
|
1685
|
+
sharedConfig.done = _$HY.done = true;
|
|
1686
|
+
while (node) {
|
|
1687
|
+
const handler = node[key];
|
|
1688
|
+
if (handler && !node.disabled) {
|
|
1689
|
+
const data = node[`${key}Data`];
|
|
1690
|
+
data !== void 0 ? handler.call(node, data, e) : handler.call(node, e);
|
|
1691
|
+
if (e.cancelBubble)
|
|
1692
|
+
return;
|
|
1693
|
+
}
|
|
1694
|
+
node = node._$host || node.parentNode || node.host;
|
|
1695
|
+
}
|
|
1696
|
+
}
|
|
1144
1697
|
function insertExpression(parent, value, current, marker, unwrapArray) {
|
|
1145
1698
|
if (sharedConfig.context) {
|
|
1146
1699
|
!current && (current = [...parent.childNodes]);
|
|
@@ -1289,27 +1842,107 @@ function cleanChildren(parent, current, marker, replacement) {
|
|
|
1289
1842
|
parent.insertBefore(node, marker);
|
|
1290
1843
|
return [node];
|
|
1291
1844
|
}
|
|
1845
|
+
function getHydrationKey() {
|
|
1846
|
+
const hydrate = sharedConfig.context;
|
|
1847
|
+
return `${hydrate.id}${hydrate.count++}`;
|
|
1848
|
+
}
|
|
1292
1849
|
var isServer = false;
|
|
1850
|
+
var SVG_NAMESPACE = "http://www.w3.org/2000/svg";
|
|
1851
|
+
function createElement(tagName, isSVG = false) {
|
|
1852
|
+
return isSVG ? document.createElementNS(SVG_NAMESPACE, tagName) : document.createElement(tagName);
|
|
1853
|
+
}
|
|
1854
|
+
function Portal(props) {
|
|
1855
|
+
const {
|
|
1856
|
+
useShadow
|
|
1857
|
+
} = props, marker = document.createTextNode(""), mount = () => props.mount || document.body, owner = getOwner();
|
|
1858
|
+
let content;
|
|
1859
|
+
let hydrating = !!sharedConfig.context;
|
|
1860
|
+
createEffect(() => {
|
|
1861
|
+
if (hydrating)
|
|
1862
|
+
getOwner().user = hydrating = false;
|
|
1863
|
+
content || (content = runWithOwner(owner, () => createMemo(() => props.children)));
|
|
1864
|
+
const el = mount();
|
|
1865
|
+
if (el instanceof HTMLHeadElement) {
|
|
1866
|
+
const [clean, setClean] = createSignal(false);
|
|
1867
|
+
const cleanup = () => setClean(true);
|
|
1868
|
+
createRoot((dispose2) => insert(el, () => !clean() ? content() : dispose2(), null));
|
|
1869
|
+
onCleanup(cleanup);
|
|
1870
|
+
} else {
|
|
1871
|
+
const container = createElement(props.isSVG ? "g" : "div", props.isSVG), renderRoot = useShadow && container.attachShadow ? container.attachShadow({
|
|
1872
|
+
mode: "open"
|
|
1873
|
+
}) : container;
|
|
1874
|
+
Object.defineProperty(container, "_$host", {
|
|
1875
|
+
get() {
|
|
1876
|
+
return marker.parentNode;
|
|
1877
|
+
},
|
|
1878
|
+
configurable: true
|
|
1879
|
+
});
|
|
1880
|
+
insert(renderRoot, content);
|
|
1881
|
+
el.appendChild(container);
|
|
1882
|
+
props.ref && props.ref(container);
|
|
1883
|
+
onCleanup(() => el.removeChild(container));
|
|
1884
|
+
}
|
|
1885
|
+
}, void 0, {
|
|
1886
|
+
render: !hydrating
|
|
1887
|
+
});
|
|
1888
|
+
return marker;
|
|
1889
|
+
}
|
|
1890
|
+
function Dynamic(props) {
|
|
1891
|
+
const [p, others] = splitProps(props, ["component"]);
|
|
1892
|
+
const cached = createMemo(() => p.component);
|
|
1893
|
+
return createMemo(() => {
|
|
1894
|
+
const component = cached();
|
|
1895
|
+
switch (typeof component) {
|
|
1896
|
+
case "function":
|
|
1897
|
+
Object.assign(component, {
|
|
1898
|
+
[$DEVCOMP]: true
|
|
1899
|
+
});
|
|
1900
|
+
return untrack(() => component(others));
|
|
1901
|
+
case "string":
|
|
1902
|
+
const isSvg = SVGElements.has(component);
|
|
1903
|
+
const el = sharedConfig.context ? getNextElement() : createElement(component, isSvg);
|
|
1904
|
+
spread(el, others, isSvg);
|
|
1905
|
+
return el;
|
|
1906
|
+
}
|
|
1907
|
+
});
|
|
1908
|
+
}
|
|
1293
1909
|
|
|
1294
1910
|
export {
|
|
1911
|
+
$PROXY,
|
|
1295
1912
|
$TRACK,
|
|
1296
1913
|
createRoot,
|
|
1297
1914
|
createSignal,
|
|
1915
|
+
createComputed,
|
|
1916
|
+
createRenderEffect,
|
|
1298
1917
|
createEffect,
|
|
1299
1918
|
createMemo,
|
|
1919
|
+
batch,
|
|
1300
1920
|
untrack,
|
|
1301
1921
|
on,
|
|
1302
1922
|
onMount,
|
|
1303
1923
|
onCleanup,
|
|
1924
|
+
getListener,
|
|
1925
|
+
getOwner,
|
|
1304
1926
|
useTransition,
|
|
1305
1927
|
createContext,
|
|
1306
1928
|
useContext,
|
|
1929
|
+
children,
|
|
1930
|
+
createComponent,
|
|
1931
|
+
mergeProps,
|
|
1932
|
+
splitProps,
|
|
1307
1933
|
lazy,
|
|
1934
|
+
createUniqueId,
|
|
1308
1935
|
For,
|
|
1309
1936
|
Index,
|
|
1310
1937
|
Show,
|
|
1311
1938
|
Switch,
|
|
1312
1939
|
Match,
|
|
1940
|
+
DEV,
|
|
1313
1941
|
render,
|
|
1314
|
-
|
|
1942
|
+
template,
|
|
1943
|
+
delegateEvents,
|
|
1944
|
+
setAttribute,
|
|
1945
|
+
isServer,
|
|
1946
|
+
Portal,
|
|
1947
|
+
Dynamic
|
|
1315
1948
|
};
|