@tanstack/router-devtools-core 1.132.47 → 1.132.50
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{packages/router-devtools-core/src/AgeTicker.cjs → AgeTicker.cjs} +2 -3
- package/dist/cjs/AgeTicker.cjs.map +1 -0
- package/dist/cjs/{packages/router-devtools-core/src/BaseTanStackRouterDevtoolsPanel.cjs → BaseTanStackRouterDevtoolsPanel.cjs} +66 -66
- package/dist/cjs/BaseTanStackRouterDevtoolsPanel.cjs.map +1 -0
- package/dist/cjs/{packages/router-devtools-core/src/Explorer.cjs → Explorer.cjs} +27 -27
- package/dist/cjs/Explorer.cjs.map +1 -0
- package/dist/cjs/{packages/router-devtools-core/src/FloatingTanStackRouterDevtools.cjs → FloatingTanStackRouterDevtools.cjs} +19 -19
- package/dist/cjs/FloatingTanStackRouterDevtools.cjs.map +1 -0
- package/dist/cjs/{packages/router-devtools-core/src/NavigateButton.cjs → NavigateButton.cjs} +2 -3
- package/dist/cjs/NavigateButton.cjs.map +1 -0
- package/dist/cjs/{packages/router-devtools-core/src/TanStackRouterDevtoolsCore.cjs → TanStackRouterDevtoolsCore.cjs} +7 -7
- package/dist/cjs/TanStackRouterDevtoolsCore.cjs.map +1 -0
- package/dist/cjs/{packages/router-devtools-core/src/TanStackRouterDevtoolsPanelCore.cjs → TanStackRouterDevtoolsPanelCore.cjs} +10 -10
- package/dist/cjs/TanStackRouterDevtoolsPanelCore.cjs.map +1 -0
- package/dist/cjs/{packages/router-devtools-core/src/context.cjs → context.cjs} +4 -4
- package/dist/cjs/context.cjs.map +1 -0
- package/dist/cjs/{packages/router-devtools-core/src/logo.cjs → logo.cjs} +3 -3
- package/dist/cjs/logo.cjs.map +1 -0
- package/dist/cjs/tokens.cjs.map +1 -0
- package/dist/cjs/{packages/router-devtools-core/src/useLocalStorage.cjs → useLocalStorage.cjs} +3 -3
- package/dist/cjs/useLocalStorage.cjs.map +1 -0
- package/dist/cjs/{packages/router-devtools-core/src/useStyles.cjs → useStyles.cjs} +3 -3
- package/dist/cjs/useStyles.cjs.map +1 -0
- package/dist/cjs/{packages/router-devtools-core/src/utils.cjs → utils.cjs} +4 -3
- package/dist/cjs/utils.cjs.map +1 -0
- package/dist/esm/{packages/router-devtools-core/src/AgeTicker.js → AgeTicker.js} +2 -3
- package/dist/esm/AgeTicker.js.map +1 -0
- package/dist/esm/{packages/router-devtools-core/src/BaseTanStackRouterDevtoolsPanel.js → BaseTanStackRouterDevtoolsPanel.js} +33 -33
- package/dist/esm/BaseTanStackRouterDevtoolsPanel.js.map +1 -0
- package/dist/esm/{packages/router-devtools-core/src/Explorer.js → Explorer.js} +15 -15
- package/dist/esm/Explorer.js.map +1 -0
- package/dist/esm/{packages/router-devtools-core/src/FloatingTanStackRouterDevtools.js → FloatingTanStackRouterDevtools.js} +3 -3
- package/dist/esm/FloatingTanStackRouterDevtools.js.map +1 -0
- package/dist/esm/{packages/router-devtools-core/src/NavigateButton.js → NavigateButton.js} +2 -3
- package/dist/esm/NavigateButton.js.map +1 -0
- package/dist/esm/{packages/router-devtools-core/src/TanStackRouterDevtoolsCore.js → TanStackRouterDevtoolsCore.js} +2 -2
- package/dist/esm/TanStackRouterDevtoolsCore.js.map +1 -0
- package/dist/esm/{packages/router-devtools-core/src/TanStackRouterDevtoolsPanelCore.js → TanStackRouterDevtoolsPanelCore.js} +3 -3
- package/dist/esm/TanStackRouterDevtoolsPanelCore.js.map +1 -0
- package/dist/esm/{packages/router-devtools-core/src/context.js → context.js} +1 -1
- package/dist/esm/context.js.map +1 -0
- package/dist/esm/{packages/router-devtools-core/src/logo.js → logo.js} +2 -2
- package/dist/esm/logo.js.map +1 -0
- package/dist/esm/tokens.js.map +1 -0
- package/dist/esm/{packages/router-devtools-core/src/useLocalStorage.js → useLocalStorage.js} +1 -1
- package/dist/esm/useLocalStorage.js.map +1 -0
- package/dist/esm/{packages/router-devtools-core/src/useStyles.js → useStyles.js} +1 -1
- package/dist/esm/useStyles.js.map +1 -0
- package/dist/esm/{packages/router-devtools-core/src/utils.js → utils.js} +2 -1
- package/dist/esm/utils.js.map +1 -0
- package/package.json +7 -6
- package/dist/cjs/node_modules/.pnpm/solid-js@1.9.5/node_modules/solid-js/dist/solid.cjs +0 -792
- package/dist/cjs/node_modules/.pnpm/solid-js@1.9.5/node_modules/solid-js/dist/solid.cjs.map +0 -1
- package/dist/cjs/node_modules/.pnpm/solid-js@1.9.5/node_modules/solid-js/web/dist/web.cjs +0 -675
- package/dist/cjs/node_modules/.pnpm/solid-js@1.9.5/node_modules/solid-js/web/dist/web.cjs.map +0 -1
- package/dist/cjs/packages/router-devtools-core/src/AgeTicker.cjs.map +0 -1
- package/dist/cjs/packages/router-devtools-core/src/BaseTanStackRouterDevtoolsPanel.cjs.map +0 -1
- package/dist/cjs/packages/router-devtools-core/src/Explorer.cjs.map +0 -1
- package/dist/cjs/packages/router-devtools-core/src/FloatingTanStackRouterDevtools.cjs.map +0 -1
- package/dist/cjs/packages/router-devtools-core/src/NavigateButton.cjs.map +0 -1
- package/dist/cjs/packages/router-devtools-core/src/TanStackRouterDevtoolsCore.cjs.map +0 -1
- package/dist/cjs/packages/router-devtools-core/src/TanStackRouterDevtoolsPanelCore.cjs.map +0 -1
- package/dist/cjs/packages/router-devtools-core/src/context.cjs.map +0 -1
- package/dist/cjs/packages/router-devtools-core/src/logo.cjs.map +0 -1
- package/dist/cjs/packages/router-devtools-core/src/tokens.cjs.map +0 -1
- package/dist/cjs/packages/router-devtools-core/src/useLocalStorage.cjs.map +0 -1
- package/dist/cjs/packages/router-devtools-core/src/useStyles.cjs.map +0 -1
- package/dist/cjs/packages/router-devtools-core/src/utils.cjs.map +0 -1
- package/dist/esm/node_modules/.pnpm/solid-js@1.9.5/node_modules/solid-js/dist/solid.js +0 -792
- package/dist/esm/node_modules/.pnpm/solid-js@1.9.5/node_modules/solid-js/dist/solid.js.map +0 -1
- package/dist/esm/node_modules/.pnpm/solid-js@1.9.5/node_modules/solid-js/web/dist/web.js +0 -676
- package/dist/esm/node_modules/.pnpm/solid-js@1.9.5/node_modules/solid-js/web/dist/web.js.map +0 -1
- package/dist/esm/packages/router-devtools-core/src/AgeTicker.js.map +0 -1
- package/dist/esm/packages/router-devtools-core/src/BaseTanStackRouterDevtoolsPanel.js.map +0 -1
- package/dist/esm/packages/router-devtools-core/src/Explorer.js.map +0 -1
- package/dist/esm/packages/router-devtools-core/src/FloatingTanStackRouterDevtools.js.map +0 -1
- package/dist/esm/packages/router-devtools-core/src/NavigateButton.js.map +0 -1
- package/dist/esm/packages/router-devtools-core/src/TanStackRouterDevtoolsCore.js.map +0 -1
- package/dist/esm/packages/router-devtools-core/src/TanStackRouterDevtoolsPanelCore.js.map +0 -1
- package/dist/esm/packages/router-devtools-core/src/context.js.map +0 -1
- package/dist/esm/packages/router-devtools-core/src/logo.js.map +0 -1
- package/dist/esm/packages/router-devtools-core/src/tokens.js.map +0 -1
- package/dist/esm/packages/router-devtools-core/src/useLocalStorage.js.map +0 -1
- package/dist/esm/packages/router-devtools-core/src/useStyles.js.map +0 -1
- package/dist/esm/packages/router-devtools-core/src/utils.js.map +0 -1
- /package/dist/cjs/{packages/router-devtools-core/src/index.cjs → index.cjs} +0 -0
- /package/dist/cjs/{packages/router-devtools-core/src/index.cjs.map → index.cjs.map} +0 -0
- /package/dist/cjs/{packages/router-devtools-core/src/tokens.cjs → tokens.cjs} +0 -0
- /package/dist/esm/{packages/router-devtools-core/src/index.js → index.js} +0 -0
- /package/dist/esm/{packages/router-devtools-core/src/index.js.map → index.js.map} +0 -0
- /package/dist/esm/{packages/router-devtools-core/src/tokens.js → tokens.js} +0 -0
|
@@ -1,676 +0,0 @@
|
|
|
1
|
-
import { createRoot, createRenderEffect, untrack, sharedConfig, splitProps, createMemo } from "../../dist/solid.js";
|
|
2
|
-
import { Show, createComponent, mergeProps } from "../../dist/solid.js";
|
|
3
|
-
const booleans = [
|
|
4
|
-
"allowfullscreen",
|
|
5
|
-
"async",
|
|
6
|
-
"autofocus",
|
|
7
|
-
"autoplay",
|
|
8
|
-
"checked",
|
|
9
|
-
"controls",
|
|
10
|
-
"default",
|
|
11
|
-
"disabled",
|
|
12
|
-
"formnovalidate",
|
|
13
|
-
"hidden",
|
|
14
|
-
"indeterminate",
|
|
15
|
-
"inert",
|
|
16
|
-
"ismap",
|
|
17
|
-
"loop",
|
|
18
|
-
"multiple",
|
|
19
|
-
"muted",
|
|
20
|
-
"nomodule",
|
|
21
|
-
"novalidate",
|
|
22
|
-
"open",
|
|
23
|
-
"playsinline",
|
|
24
|
-
"readonly",
|
|
25
|
-
"required",
|
|
26
|
-
"reversed",
|
|
27
|
-
"seamless",
|
|
28
|
-
"selected"
|
|
29
|
-
];
|
|
30
|
-
const Properties = /* @__PURE__ */ new Set([
|
|
31
|
-
"className",
|
|
32
|
-
"value",
|
|
33
|
-
"readOnly",
|
|
34
|
-
"formNoValidate",
|
|
35
|
-
"isMap",
|
|
36
|
-
"noModule",
|
|
37
|
-
"playsInline",
|
|
38
|
-
...booleans
|
|
39
|
-
]);
|
|
40
|
-
const ChildProperties = /* @__PURE__ */ new Set([
|
|
41
|
-
"innerHTML",
|
|
42
|
-
"textContent",
|
|
43
|
-
"innerText",
|
|
44
|
-
"children"
|
|
45
|
-
]);
|
|
46
|
-
const Aliases = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
|
|
47
|
-
className: "class",
|
|
48
|
-
htmlFor: "for"
|
|
49
|
-
});
|
|
50
|
-
const PropAliases = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
|
|
51
|
-
class: "className",
|
|
52
|
-
formnovalidate: {
|
|
53
|
-
$: "formNoValidate",
|
|
54
|
-
BUTTON: 1,
|
|
55
|
-
INPUT: 1
|
|
56
|
-
},
|
|
57
|
-
ismap: {
|
|
58
|
-
$: "isMap",
|
|
59
|
-
IMG: 1
|
|
60
|
-
},
|
|
61
|
-
nomodule: {
|
|
62
|
-
$: "noModule",
|
|
63
|
-
SCRIPT: 1
|
|
64
|
-
},
|
|
65
|
-
playsinline: {
|
|
66
|
-
$: "playsInline",
|
|
67
|
-
VIDEO: 1
|
|
68
|
-
},
|
|
69
|
-
readonly: {
|
|
70
|
-
$: "readOnly",
|
|
71
|
-
INPUT: 1,
|
|
72
|
-
TEXTAREA: 1
|
|
73
|
-
}
|
|
74
|
-
});
|
|
75
|
-
function getPropAlias(prop, tagName) {
|
|
76
|
-
const a = PropAliases[prop];
|
|
77
|
-
return typeof a === "object" ? a[tagName] ? a["$"] : void 0 : a;
|
|
78
|
-
}
|
|
79
|
-
const DelegatedEvents = /* @__PURE__ */ new Set([
|
|
80
|
-
"beforeinput",
|
|
81
|
-
"click",
|
|
82
|
-
"dblclick",
|
|
83
|
-
"contextmenu",
|
|
84
|
-
"focusin",
|
|
85
|
-
"focusout",
|
|
86
|
-
"input",
|
|
87
|
-
"keydown",
|
|
88
|
-
"keyup",
|
|
89
|
-
"mousedown",
|
|
90
|
-
"mousemove",
|
|
91
|
-
"mouseout",
|
|
92
|
-
"mouseover",
|
|
93
|
-
"mouseup",
|
|
94
|
-
"pointerdown",
|
|
95
|
-
"pointermove",
|
|
96
|
-
"pointerout",
|
|
97
|
-
"pointerover",
|
|
98
|
-
"pointerup",
|
|
99
|
-
"touchend",
|
|
100
|
-
"touchmove",
|
|
101
|
-
"touchstart"
|
|
102
|
-
]);
|
|
103
|
-
const SVGElements = /* @__PURE__ */ new Set([
|
|
104
|
-
"altGlyph",
|
|
105
|
-
"altGlyphDef",
|
|
106
|
-
"altGlyphItem",
|
|
107
|
-
"animate",
|
|
108
|
-
"animateColor",
|
|
109
|
-
"animateMotion",
|
|
110
|
-
"animateTransform",
|
|
111
|
-
"circle",
|
|
112
|
-
"clipPath",
|
|
113
|
-
"color-profile",
|
|
114
|
-
"cursor",
|
|
115
|
-
"defs",
|
|
116
|
-
"desc",
|
|
117
|
-
"ellipse",
|
|
118
|
-
"feBlend",
|
|
119
|
-
"feColorMatrix",
|
|
120
|
-
"feComponentTransfer",
|
|
121
|
-
"feComposite",
|
|
122
|
-
"feConvolveMatrix",
|
|
123
|
-
"feDiffuseLighting",
|
|
124
|
-
"feDisplacementMap",
|
|
125
|
-
"feDistantLight",
|
|
126
|
-
"feDropShadow",
|
|
127
|
-
"feFlood",
|
|
128
|
-
"feFuncA",
|
|
129
|
-
"feFuncB",
|
|
130
|
-
"feFuncG",
|
|
131
|
-
"feFuncR",
|
|
132
|
-
"feGaussianBlur",
|
|
133
|
-
"feImage",
|
|
134
|
-
"feMerge",
|
|
135
|
-
"feMergeNode",
|
|
136
|
-
"feMorphology",
|
|
137
|
-
"feOffset",
|
|
138
|
-
"fePointLight",
|
|
139
|
-
"feSpecularLighting",
|
|
140
|
-
"feSpotLight",
|
|
141
|
-
"feTile",
|
|
142
|
-
"feTurbulence",
|
|
143
|
-
"filter",
|
|
144
|
-
"font",
|
|
145
|
-
"font-face",
|
|
146
|
-
"font-face-format",
|
|
147
|
-
"font-face-name",
|
|
148
|
-
"font-face-src",
|
|
149
|
-
"font-face-uri",
|
|
150
|
-
"foreignObject",
|
|
151
|
-
"g",
|
|
152
|
-
"glyph",
|
|
153
|
-
"glyphRef",
|
|
154
|
-
"hkern",
|
|
155
|
-
"image",
|
|
156
|
-
"line",
|
|
157
|
-
"linearGradient",
|
|
158
|
-
"marker",
|
|
159
|
-
"mask",
|
|
160
|
-
"metadata",
|
|
161
|
-
"missing-glyph",
|
|
162
|
-
"mpath",
|
|
163
|
-
"path",
|
|
164
|
-
"pattern",
|
|
165
|
-
"polygon",
|
|
166
|
-
"polyline",
|
|
167
|
-
"radialGradient",
|
|
168
|
-
"rect",
|
|
169
|
-
"set",
|
|
170
|
-
"stop",
|
|
171
|
-
"svg",
|
|
172
|
-
"switch",
|
|
173
|
-
"symbol",
|
|
174
|
-
"text",
|
|
175
|
-
"textPath",
|
|
176
|
-
"tref",
|
|
177
|
-
"tspan",
|
|
178
|
-
"use",
|
|
179
|
-
"view",
|
|
180
|
-
"vkern"
|
|
181
|
-
]);
|
|
182
|
-
const SVGNamespace = {
|
|
183
|
-
xlink: "http://www.w3.org/1999/xlink",
|
|
184
|
-
xml: "http://www.w3.org/XML/1998/namespace"
|
|
185
|
-
};
|
|
186
|
-
function reconcileArrays(parentNode, a, b) {
|
|
187
|
-
let bLength = b.length, aEnd = a.length, bEnd = bLength, aStart = 0, bStart = 0, after = a[aEnd - 1].nextSibling, map = null;
|
|
188
|
-
while (aStart < aEnd || bStart < bEnd) {
|
|
189
|
-
if (a[aStart] === b[bStart]) {
|
|
190
|
-
aStart++;
|
|
191
|
-
bStart++;
|
|
192
|
-
continue;
|
|
193
|
-
}
|
|
194
|
-
while (a[aEnd - 1] === b[bEnd - 1]) {
|
|
195
|
-
aEnd--;
|
|
196
|
-
bEnd--;
|
|
197
|
-
}
|
|
198
|
-
if (aEnd === aStart) {
|
|
199
|
-
const node = bEnd < bLength ? bStart ? b[bStart - 1].nextSibling : b[bEnd - bStart] : after;
|
|
200
|
-
while (bStart < bEnd) parentNode.insertBefore(b[bStart++], node);
|
|
201
|
-
} else if (bEnd === bStart) {
|
|
202
|
-
while (aStart < aEnd) {
|
|
203
|
-
if (!map || !map.has(a[aStart])) a[aStart].remove();
|
|
204
|
-
aStart++;
|
|
205
|
-
}
|
|
206
|
-
} else if (a[aStart] === b[bEnd - 1] && b[bStart] === a[aEnd - 1]) {
|
|
207
|
-
const node = a[--aEnd].nextSibling;
|
|
208
|
-
parentNode.insertBefore(b[bStart++], a[aStart++].nextSibling);
|
|
209
|
-
parentNode.insertBefore(b[--bEnd], node);
|
|
210
|
-
a[aEnd] = b[bEnd];
|
|
211
|
-
} else {
|
|
212
|
-
if (!map) {
|
|
213
|
-
map = /* @__PURE__ */ new Map();
|
|
214
|
-
let i = bStart;
|
|
215
|
-
while (i < bEnd) map.set(b[i], i++);
|
|
216
|
-
}
|
|
217
|
-
const index = map.get(a[aStart]);
|
|
218
|
-
if (index != null) {
|
|
219
|
-
if (bStart < index && index < bEnd) {
|
|
220
|
-
let i = aStart, sequence = 1, t;
|
|
221
|
-
while (++i < aEnd && i < bEnd) {
|
|
222
|
-
if ((t = map.get(a[i])) == null || t !== index + sequence) break;
|
|
223
|
-
sequence++;
|
|
224
|
-
}
|
|
225
|
-
if (sequence > index - bStart) {
|
|
226
|
-
const node = a[aStart];
|
|
227
|
-
while (bStart < index) parentNode.insertBefore(b[bStart++], node);
|
|
228
|
-
} else parentNode.replaceChild(b[bStart++], a[aStart++]);
|
|
229
|
-
} else aStart++;
|
|
230
|
-
} else a[aStart++].remove();
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
const $$EVENTS = "_$DX_DELEGATE";
|
|
235
|
-
function render(code, element, init, options = {}) {
|
|
236
|
-
let disposer;
|
|
237
|
-
createRoot((dispose) => {
|
|
238
|
-
disposer = dispose;
|
|
239
|
-
element === document ? code() : insert(element, code(), element.firstChild ? null : void 0, init);
|
|
240
|
-
}, options.owner);
|
|
241
|
-
return () => {
|
|
242
|
-
disposer();
|
|
243
|
-
element.textContent = "";
|
|
244
|
-
};
|
|
245
|
-
}
|
|
246
|
-
function template(html, isImportNode, isSVG, isMathML) {
|
|
247
|
-
let node;
|
|
248
|
-
const create = () => {
|
|
249
|
-
const t = document.createElement("template");
|
|
250
|
-
t.innerHTML = html;
|
|
251
|
-
return t.content.firstChild;
|
|
252
|
-
};
|
|
253
|
-
const fn = isImportNode ? () => untrack(() => document.importNode(node || (node = create()), true)) : () => (node || (node = create())).cloneNode(true);
|
|
254
|
-
fn.cloneNode = fn;
|
|
255
|
-
return fn;
|
|
256
|
-
}
|
|
257
|
-
function delegateEvents(eventNames, document2 = window.document) {
|
|
258
|
-
const e = document2[$$EVENTS] || (document2[$$EVENTS] = /* @__PURE__ */ new Set());
|
|
259
|
-
for (let i = 0, l = eventNames.length; i < l; i++) {
|
|
260
|
-
const name = eventNames[i];
|
|
261
|
-
if (!e.has(name)) {
|
|
262
|
-
e.add(name);
|
|
263
|
-
document2.addEventListener(name, eventHandler);
|
|
264
|
-
}
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
function setAttribute(node, name, value) {
|
|
268
|
-
if (isHydrating(node)) return;
|
|
269
|
-
if (value == null) node.removeAttribute(name);
|
|
270
|
-
else node.setAttribute(name, value);
|
|
271
|
-
}
|
|
272
|
-
function setAttributeNS(node, namespace, name, value) {
|
|
273
|
-
if (isHydrating(node)) return;
|
|
274
|
-
if (value == null) node.removeAttributeNS(namespace, name);
|
|
275
|
-
else node.setAttributeNS(namespace, name, value);
|
|
276
|
-
}
|
|
277
|
-
function setBoolAttribute(node, name, value) {
|
|
278
|
-
if (isHydrating(node)) return;
|
|
279
|
-
value ? node.setAttribute(name, "") : node.removeAttribute(name);
|
|
280
|
-
}
|
|
281
|
-
function className(node, value) {
|
|
282
|
-
if (isHydrating(node)) return;
|
|
283
|
-
if (value == null) node.removeAttribute("class");
|
|
284
|
-
else node.className = value;
|
|
285
|
-
}
|
|
286
|
-
function addEventListener(node, name, handler, delegate) {
|
|
287
|
-
if (delegate) {
|
|
288
|
-
if (Array.isArray(handler)) {
|
|
289
|
-
node[`$$${name}`] = handler[0];
|
|
290
|
-
node[`$$${name}Data`] = handler[1];
|
|
291
|
-
} else node[`$$${name}`] = handler;
|
|
292
|
-
} else if (Array.isArray(handler)) {
|
|
293
|
-
const handlerFn = handler[0];
|
|
294
|
-
node.addEventListener(name, handler[0] = (e) => handlerFn.call(node, handler[1], e));
|
|
295
|
-
} else node.addEventListener(name, handler, typeof handler !== "function" && handler);
|
|
296
|
-
}
|
|
297
|
-
function classList(node, value, prev = {}) {
|
|
298
|
-
const classKeys = Object.keys(value || {}), prevKeys = Object.keys(prev);
|
|
299
|
-
let i, len;
|
|
300
|
-
for (i = 0, len = prevKeys.length; i < len; i++) {
|
|
301
|
-
const key = prevKeys[i];
|
|
302
|
-
if (!key || key === "undefined" || value[key]) continue;
|
|
303
|
-
toggleClassKey(node, key, false);
|
|
304
|
-
delete prev[key];
|
|
305
|
-
}
|
|
306
|
-
for (i = 0, len = classKeys.length; i < len; i++) {
|
|
307
|
-
const key = classKeys[i], classValue = !!value[key];
|
|
308
|
-
if (!key || key === "undefined" || prev[key] === classValue || !classValue) continue;
|
|
309
|
-
toggleClassKey(node, key, true);
|
|
310
|
-
prev[key] = classValue;
|
|
311
|
-
}
|
|
312
|
-
return prev;
|
|
313
|
-
}
|
|
314
|
-
function style(node, value, prev) {
|
|
315
|
-
if (!value) return prev ? setAttribute(node, "style") : value;
|
|
316
|
-
const nodeStyle = node.style;
|
|
317
|
-
if (typeof value === "string") return nodeStyle.cssText = value;
|
|
318
|
-
typeof prev === "string" && (nodeStyle.cssText = prev = void 0);
|
|
319
|
-
prev || (prev = {});
|
|
320
|
-
value || (value = {});
|
|
321
|
-
let v, s;
|
|
322
|
-
for (s in prev) {
|
|
323
|
-
value[s] == null && nodeStyle.removeProperty(s);
|
|
324
|
-
delete prev[s];
|
|
325
|
-
}
|
|
326
|
-
for (s in value) {
|
|
327
|
-
v = value[s];
|
|
328
|
-
if (v !== prev[s]) {
|
|
329
|
-
nodeStyle.setProperty(s, v);
|
|
330
|
-
prev[s] = v;
|
|
331
|
-
}
|
|
332
|
-
}
|
|
333
|
-
return prev;
|
|
334
|
-
}
|
|
335
|
-
function spread(node, props = {}, isSVG, skipChildren) {
|
|
336
|
-
const prevProps = {};
|
|
337
|
-
if (!skipChildren) {
|
|
338
|
-
createRenderEffect(
|
|
339
|
-
() => prevProps.children = insertExpression(node, props.children, prevProps.children)
|
|
340
|
-
);
|
|
341
|
-
}
|
|
342
|
-
createRenderEffect(() => typeof props.ref === "function" && use(props.ref, node));
|
|
343
|
-
createRenderEffect(() => assign(node, props, isSVG, true, prevProps, true));
|
|
344
|
-
return prevProps;
|
|
345
|
-
}
|
|
346
|
-
function use(fn, element, arg) {
|
|
347
|
-
return untrack(() => fn(element, arg));
|
|
348
|
-
}
|
|
349
|
-
function insert(parent, accessor, marker, initial) {
|
|
350
|
-
if (marker !== void 0 && !initial) initial = [];
|
|
351
|
-
if (typeof accessor !== "function") return insertExpression(parent, accessor, initial, marker);
|
|
352
|
-
createRenderEffect((current) => insertExpression(parent, accessor(), current, marker), initial);
|
|
353
|
-
}
|
|
354
|
-
function assign(node, props, isSVG, skipChildren, prevProps = {}, skipRef = false) {
|
|
355
|
-
props || (props = {});
|
|
356
|
-
for (const prop in prevProps) {
|
|
357
|
-
if (!(prop in props)) {
|
|
358
|
-
if (prop === "children") continue;
|
|
359
|
-
prevProps[prop] = assignProp(node, prop, null, prevProps[prop], isSVG, skipRef, props);
|
|
360
|
-
}
|
|
361
|
-
}
|
|
362
|
-
for (const prop in props) {
|
|
363
|
-
if (prop === "children") {
|
|
364
|
-
continue;
|
|
365
|
-
}
|
|
366
|
-
const value = props[prop];
|
|
367
|
-
prevProps[prop] = assignProp(node, prop, value, prevProps[prop], isSVG, skipRef, props);
|
|
368
|
-
}
|
|
369
|
-
}
|
|
370
|
-
function getNextElement(template2) {
|
|
371
|
-
let node, key, hydrating = isHydrating();
|
|
372
|
-
if (!hydrating || !(node = sharedConfig.registry.get(key = getHydrationKey()))) {
|
|
373
|
-
return template2();
|
|
374
|
-
}
|
|
375
|
-
if (sharedConfig.completed) sharedConfig.completed.add(node);
|
|
376
|
-
sharedConfig.registry.delete(key);
|
|
377
|
-
return node;
|
|
378
|
-
}
|
|
379
|
-
function isHydrating(node) {
|
|
380
|
-
return !!sharedConfig.context && !sharedConfig.done && (!node || node.isConnected);
|
|
381
|
-
}
|
|
382
|
-
function toPropertyName(name) {
|
|
383
|
-
return name.toLowerCase().replace(/-([a-z])/g, (_, w) => w.toUpperCase());
|
|
384
|
-
}
|
|
385
|
-
function toggleClassKey(node, key, value) {
|
|
386
|
-
const classNames = key.trim().split(/\s+/);
|
|
387
|
-
for (let i = 0, nameLen = classNames.length; i < nameLen; i++)
|
|
388
|
-
node.classList.toggle(classNames[i], value);
|
|
389
|
-
}
|
|
390
|
-
function assignProp(node, prop, value, prev, isSVG, skipRef, props) {
|
|
391
|
-
let isCE, isProp, isChildProp, propAlias, forceProp;
|
|
392
|
-
if (prop === "style") return style(node, value, prev);
|
|
393
|
-
if (prop === "classList") return classList(node, value, prev);
|
|
394
|
-
if (value === prev) return prev;
|
|
395
|
-
if (prop === "ref") {
|
|
396
|
-
if (!skipRef) value(node);
|
|
397
|
-
} else if (prop.slice(0, 3) === "on:") {
|
|
398
|
-
const e = prop.slice(3);
|
|
399
|
-
prev && node.removeEventListener(e, prev, typeof prev !== "function" && prev);
|
|
400
|
-
value && node.addEventListener(e, value, typeof value !== "function" && value);
|
|
401
|
-
} else if (prop.slice(0, 10) === "oncapture:") {
|
|
402
|
-
const e = prop.slice(10);
|
|
403
|
-
prev && node.removeEventListener(e, prev, true);
|
|
404
|
-
value && node.addEventListener(e, value, true);
|
|
405
|
-
} else if (prop.slice(0, 2) === "on") {
|
|
406
|
-
const name = prop.slice(2).toLowerCase();
|
|
407
|
-
const delegate = DelegatedEvents.has(name);
|
|
408
|
-
if (!delegate && prev) {
|
|
409
|
-
const h = Array.isArray(prev) ? prev[0] : prev;
|
|
410
|
-
node.removeEventListener(name, h);
|
|
411
|
-
}
|
|
412
|
-
if (delegate || value) {
|
|
413
|
-
addEventListener(node, name, value, delegate);
|
|
414
|
-
delegate && delegateEvents([name]);
|
|
415
|
-
}
|
|
416
|
-
} else if (prop.slice(0, 5) === "attr:") {
|
|
417
|
-
setAttribute(node, prop.slice(5), value);
|
|
418
|
-
} else if (prop.slice(0, 5) === "bool:") {
|
|
419
|
-
setBoolAttribute(node, prop.slice(5), value);
|
|
420
|
-
} 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("-") || "is" in props)) {
|
|
421
|
-
if (forceProp) {
|
|
422
|
-
prop = prop.slice(5);
|
|
423
|
-
isProp = true;
|
|
424
|
-
} else if (isHydrating(node)) return value;
|
|
425
|
-
if (prop === "class" || prop === "className") className(node, value);
|
|
426
|
-
else if (isCE && !isProp && !isChildProp) node[toPropertyName(prop)] = value;
|
|
427
|
-
else node[propAlias || prop] = value;
|
|
428
|
-
} else {
|
|
429
|
-
const ns = isSVG && prop.indexOf(":") > -1 && SVGNamespace[prop.split(":")[0]];
|
|
430
|
-
if (ns) setAttributeNS(node, ns, prop, value);
|
|
431
|
-
else setAttribute(node, Aliases[prop] || prop, value);
|
|
432
|
-
}
|
|
433
|
-
return value;
|
|
434
|
-
}
|
|
435
|
-
function eventHandler(e) {
|
|
436
|
-
if (sharedConfig.registry && sharedConfig.events) {
|
|
437
|
-
if (sharedConfig.events.find(([el, ev]) => ev === e)) return;
|
|
438
|
-
}
|
|
439
|
-
let node = e.target;
|
|
440
|
-
const key = `$$${e.type}`;
|
|
441
|
-
const oriTarget = e.target;
|
|
442
|
-
const oriCurrentTarget = e.currentTarget;
|
|
443
|
-
const retarget = (value) => Object.defineProperty(e, "target", {
|
|
444
|
-
configurable: true,
|
|
445
|
-
value
|
|
446
|
-
});
|
|
447
|
-
const handleNode = () => {
|
|
448
|
-
const handler = node[key];
|
|
449
|
-
if (handler && !node.disabled) {
|
|
450
|
-
const data = node[`${key}Data`];
|
|
451
|
-
data !== void 0 ? handler.call(node, data, e) : handler.call(node, e);
|
|
452
|
-
if (e.cancelBubble) return;
|
|
453
|
-
}
|
|
454
|
-
node.host && typeof node.host !== "string" && !node.host._$host && node.contains(e.target) && retarget(node.host);
|
|
455
|
-
return true;
|
|
456
|
-
};
|
|
457
|
-
const walkUpTree = () => {
|
|
458
|
-
while (handleNode() && (node = node._$host || node.parentNode || node.host)) ;
|
|
459
|
-
};
|
|
460
|
-
Object.defineProperty(e, "currentTarget", {
|
|
461
|
-
configurable: true,
|
|
462
|
-
get() {
|
|
463
|
-
return node || document;
|
|
464
|
-
}
|
|
465
|
-
});
|
|
466
|
-
if (sharedConfig.registry && !sharedConfig.done) sharedConfig.done = _$HY.done = true;
|
|
467
|
-
if (e.composedPath) {
|
|
468
|
-
const path = e.composedPath();
|
|
469
|
-
retarget(path[0]);
|
|
470
|
-
for (let i = 0; i < path.length - 2; i++) {
|
|
471
|
-
node = path[i];
|
|
472
|
-
if (!handleNode()) break;
|
|
473
|
-
if (node._$host) {
|
|
474
|
-
node = node._$host;
|
|
475
|
-
walkUpTree();
|
|
476
|
-
break;
|
|
477
|
-
}
|
|
478
|
-
if (node.parentNode === oriCurrentTarget) {
|
|
479
|
-
break;
|
|
480
|
-
}
|
|
481
|
-
}
|
|
482
|
-
} else walkUpTree();
|
|
483
|
-
retarget(oriTarget);
|
|
484
|
-
}
|
|
485
|
-
function insertExpression(parent, value, current, marker, unwrapArray) {
|
|
486
|
-
const hydrating = isHydrating(parent);
|
|
487
|
-
if (hydrating) {
|
|
488
|
-
!current && (current = [...parent.childNodes]);
|
|
489
|
-
let cleaned = [];
|
|
490
|
-
for (let i = 0; i < current.length; i++) {
|
|
491
|
-
const node = current[i];
|
|
492
|
-
if (node.nodeType === 8 && node.data.slice(0, 2) === "!$") node.remove();
|
|
493
|
-
else cleaned.push(node);
|
|
494
|
-
}
|
|
495
|
-
current = cleaned;
|
|
496
|
-
}
|
|
497
|
-
while (typeof current === "function") current = current();
|
|
498
|
-
if (value === current) return current;
|
|
499
|
-
const t = typeof value, multi = marker !== void 0;
|
|
500
|
-
parent = multi && current[0] && current[0].parentNode || parent;
|
|
501
|
-
if (t === "string" || t === "number") {
|
|
502
|
-
if (hydrating) return current;
|
|
503
|
-
if (t === "number") {
|
|
504
|
-
value = value.toString();
|
|
505
|
-
if (value === current) return current;
|
|
506
|
-
}
|
|
507
|
-
if (multi) {
|
|
508
|
-
let node = current[0];
|
|
509
|
-
if (node && node.nodeType === 3) {
|
|
510
|
-
node.data !== value && (node.data = value);
|
|
511
|
-
} else node = document.createTextNode(value);
|
|
512
|
-
current = cleanChildren(parent, current, marker, node);
|
|
513
|
-
} else {
|
|
514
|
-
if (current !== "" && typeof current === "string") {
|
|
515
|
-
current = parent.firstChild.data = value;
|
|
516
|
-
} else current = parent.textContent = value;
|
|
517
|
-
}
|
|
518
|
-
} else if (value == null || t === "boolean") {
|
|
519
|
-
if (hydrating) return current;
|
|
520
|
-
current = cleanChildren(parent, current, marker);
|
|
521
|
-
} else if (t === "function") {
|
|
522
|
-
createRenderEffect(() => {
|
|
523
|
-
let v = value();
|
|
524
|
-
while (typeof v === "function") v = v();
|
|
525
|
-
current = insertExpression(parent, v, current, marker);
|
|
526
|
-
});
|
|
527
|
-
return () => current;
|
|
528
|
-
} else if (Array.isArray(value)) {
|
|
529
|
-
const array = [];
|
|
530
|
-
const currentArray = current && Array.isArray(current);
|
|
531
|
-
if (normalizeIncomingArray(array, value, current, unwrapArray)) {
|
|
532
|
-
createRenderEffect(() => current = insertExpression(parent, array, current, marker, true));
|
|
533
|
-
return () => current;
|
|
534
|
-
}
|
|
535
|
-
if (hydrating) {
|
|
536
|
-
if (!array.length) return current;
|
|
537
|
-
if (marker === void 0) return current = [...parent.childNodes];
|
|
538
|
-
let node = array[0];
|
|
539
|
-
if (node.parentNode !== parent) return current;
|
|
540
|
-
const nodes = [node];
|
|
541
|
-
while ((node = node.nextSibling) !== marker) nodes.push(node);
|
|
542
|
-
return current = nodes;
|
|
543
|
-
}
|
|
544
|
-
if (array.length === 0) {
|
|
545
|
-
current = cleanChildren(parent, current, marker);
|
|
546
|
-
if (multi) return current;
|
|
547
|
-
} else if (currentArray) {
|
|
548
|
-
if (current.length === 0) {
|
|
549
|
-
appendNodes(parent, array, marker);
|
|
550
|
-
} else reconcileArrays(parent, current, array);
|
|
551
|
-
} else {
|
|
552
|
-
current && cleanChildren(parent);
|
|
553
|
-
appendNodes(parent, array);
|
|
554
|
-
}
|
|
555
|
-
current = array;
|
|
556
|
-
} else if (value.nodeType) {
|
|
557
|
-
if (hydrating && value.parentNode) return current = multi ? [value] : value;
|
|
558
|
-
if (Array.isArray(current)) {
|
|
559
|
-
if (multi) return current = cleanChildren(parent, current, marker, value);
|
|
560
|
-
cleanChildren(parent, current, null, value);
|
|
561
|
-
} else if (current == null || current === "" || !parent.firstChild) {
|
|
562
|
-
parent.appendChild(value);
|
|
563
|
-
} else parent.replaceChild(value, parent.firstChild);
|
|
564
|
-
current = value;
|
|
565
|
-
} else ;
|
|
566
|
-
return current;
|
|
567
|
-
}
|
|
568
|
-
function normalizeIncomingArray(normalized, array, current, unwrap) {
|
|
569
|
-
let dynamic = false;
|
|
570
|
-
for (let i = 0, len = array.length; i < len; i++) {
|
|
571
|
-
let item = array[i], prev = current && current[normalized.length], t;
|
|
572
|
-
if (item == null || item === true || item === false) ;
|
|
573
|
-
else if ((t = typeof item) === "object" && item.nodeType) {
|
|
574
|
-
normalized.push(item);
|
|
575
|
-
} else if (Array.isArray(item)) {
|
|
576
|
-
dynamic = normalizeIncomingArray(normalized, item, prev) || dynamic;
|
|
577
|
-
} else if (t === "function") {
|
|
578
|
-
if (unwrap) {
|
|
579
|
-
while (typeof item === "function") item = item();
|
|
580
|
-
dynamic = normalizeIncomingArray(
|
|
581
|
-
normalized,
|
|
582
|
-
Array.isArray(item) ? item : [item],
|
|
583
|
-
Array.isArray(prev) ? prev : [prev]
|
|
584
|
-
) || dynamic;
|
|
585
|
-
} else {
|
|
586
|
-
normalized.push(item);
|
|
587
|
-
dynamic = true;
|
|
588
|
-
}
|
|
589
|
-
} else {
|
|
590
|
-
const value = String(item);
|
|
591
|
-
if (prev && prev.nodeType === 3 && prev.data === value) normalized.push(prev);
|
|
592
|
-
else normalized.push(document.createTextNode(value));
|
|
593
|
-
}
|
|
594
|
-
}
|
|
595
|
-
return dynamic;
|
|
596
|
-
}
|
|
597
|
-
function appendNodes(parent, array, marker = null) {
|
|
598
|
-
for (let i = 0, len = array.length; i < len; i++) parent.insertBefore(array[i], marker);
|
|
599
|
-
}
|
|
600
|
-
function cleanChildren(parent, current, marker, replacement) {
|
|
601
|
-
if (marker === void 0) return parent.textContent = "";
|
|
602
|
-
const node = replacement || document.createTextNode("");
|
|
603
|
-
if (current.length) {
|
|
604
|
-
let inserted = false;
|
|
605
|
-
for (let i = current.length - 1; i >= 0; i--) {
|
|
606
|
-
const el = current[i];
|
|
607
|
-
if (node !== el) {
|
|
608
|
-
const isParent = el.parentNode === parent;
|
|
609
|
-
if (!inserted && !i)
|
|
610
|
-
isParent ? parent.replaceChild(node, el) : parent.insertBefore(node, marker);
|
|
611
|
-
else isParent && el.remove();
|
|
612
|
-
} else inserted = true;
|
|
613
|
-
}
|
|
614
|
-
} else parent.insertBefore(node, marker);
|
|
615
|
-
return [node];
|
|
616
|
-
}
|
|
617
|
-
function getHydrationKey() {
|
|
618
|
-
return sharedConfig.getNextContextId();
|
|
619
|
-
}
|
|
620
|
-
const SVG_NAMESPACE = "http://www.w3.org/2000/svg";
|
|
621
|
-
function createElement(tagName, isSVG = false) {
|
|
622
|
-
return isSVG ? document.createElementNS(SVG_NAMESPACE, tagName) : document.createElement(tagName);
|
|
623
|
-
}
|
|
624
|
-
function createDynamic(component, props) {
|
|
625
|
-
const cached = createMemo(component);
|
|
626
|
-
return createMemo(() => {
|
|
627
|
-
const component2 = cached();
|
|
628
|
-
switch (typeof component2) {
|
|
629
|
-
case "function":
|
|
630
|
-
return untrack(() => component2(props));
|
|
631
|
-
case "string":
|
|
632
|
-
const isSvg = SVGElements.has(component2);
|
|
633
|
-
const el = sharedConfig.context ? getNextElement() : createElement(component2, isSvg);
|
|
634
|
-
spread(el, props, isSvg);
|
|
635
|
-
return el;
|
|
636
|
-
}
|
|
637
|
-
});
|
|
638
|
-
}
|
|
639
|
-
function Dynamic(props) {
|
|
640
|
-
const [, others] = splitProps(props, ["component"]);
|
|
641
|
-
return createDynamic(() => props.component, others);
|
|
642
|
-
}
|
|
643
|
-
export {
|
|
644
|
-
Aliases,
|
|
645
|
-
ChildProperties,
|
|
646
|
-
DelegatedEvents,
|
|
647
|
-
Dynamic,
|
|
648
|
-
Properties,
|
|
649
|
-
SVGElements,
|
|
650
|
-
SVGNamespace,
|
|
651
|
-
Show,
|
|
652
|
-
addEventListener,
|
|
653
|
-
assign,
|
|
654
|
-
classList,
|
|
655
|
-
className,
|
|
656
|
-
createComponent,
|
|
657
|
-
createDynamic,
|
|
658
|
-
delegateEvents,
|
|
659
|
-
createRenderEffect as effect,
|
|
660
|
-
getHydrationKey,
|
|
661
|
-
getNextElement,
|
|
662
|
-
getPropAlias,
|
|
663
|
-
insert,
|
|
664
|
-
createMemo as memo,
|
|
665
|
-
mergeProps,
|
|
666
|
-
render,
|
|
667
|
-
setAttribute,
|
|
668
|
-
setAttributeNS,
|
|
669
|
-
setBoolAttribute,
|
|
670
|
-
spread,
|
|
671
|
-
style,
|
|
672
|
-
template,
|
|
673
|
-
untrack,
|
|
674
|
-
use
|
|
675
|
-
};
|
|
676
|
-
//# sourceMappingURL=web.js.map
|