solid-js 1.9.5 → 1.9.7
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/dev.cjs +21 -10
- package/dist/dev.js +327 -557
- package/dist/server.js +81 -178
- package/dist/solid.cjs +21 -10
- package/dist/solid.js +283 -486
- package/h/dist/h.js +9 -40
- package/h/jsx-runtime/dist/jsx.js +1 -1
- package/h/jsx-runtime/types/index.d.ts +8 -11
- package/h/jsx-runtime/types/jsx.d.ts +2947 -1021
- package/h/types/hyperscript.d.ts +11 -11
- package/html/dist/html.cjs +2 -2
- package/html/dist/html.js +96 -221
- package/html/types/lit.d.ts +33 -52
- package/package.json +3 -3
- package/store/dist/dev.js +43 -123
- package/store/dist/server.js +8 -20
- package/store/dist/store.js +40 -114
- package/store/types/index.d.ts +7 -21
- package/store/types/modifiers.d.ts +3 -6
- package/store/types/mutable.d.ts +2 -5
- package/store/types/server.d.ts +5 -25
- package/store/types/store.d.ts +61 -218
- package/types/index.d.ts +11 -78
- package/types/jsx.d.ts +2091 -278
- package/types/reactive/array.d.ts +4 -12
- package/types/reactive/observable.d.ts +16 -22
- package/types/reactive/scheduler.d.ts +6 -9
- package/types/reactive/signal.d.ts +145 -236
- package/types/render/Suspense.d.ts +5 -5
- package/types/render/component.d.ts +37 -73
- package/types/render/flow.d.ts +31 -43
- package/types/render/hydration.d.ts +15 -15
- package/types/server/index.d.ts +2 -57
- package/types/server/reactive.d.ts +45 -76
- package/types/server/rendering.d.ts +98 -169
- package/universal/dist/dev.cjs +3 -1
- package/universal/dist/dev.js +15 -29
- package/universal/dist/universal.cjs +3 -1
- package/universal/dist/universal.js +15 -29
- package/universal/types/index.d.ts +1 -3
- package/universal/types/universal.d.ts +1 -0
- package/web/dist/dev.cjs +8 -5
- package/web/dist/dev.js +96 -643
- package/web/dist/server.cjs +9 -6
- package/web/dist/server.js +116 -646
- package/web/dist/web.cjs +8 -5
- package/web/dist/web.js +94 -631
- package/web/storage/dist/storage.js +3 -3
- package/web/types/core.d.ts +2 -10
- package/web/types/index.d.ts +11 -31
- package/web/types/server-mock.d.ts +32 -47
package/web/dist/dev.js
CHANGED
|
@@ -1,84 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
createRenderEffect,
|
|
4
|
-
untrack,
|
|
5
|
-
sharedConfig,
|
|
6
|
-
enableHydration,
|
|
7
|
-
getOwner,
|
|
8
|
-
createEffect,
|
|
9
|
-
runWithOwner,
|
|
10
|
-
createMemo,
|
|
11
|
-
createSignal,
|
|
12
|
-
onCleanup,
|
|
13
|
-
$DEVCOMP,
|
|
14
|
-
splitProps
|
|
15
|
-
} from "solid-js";
|
|
16
|
-
export {
|
|
17
|
-
ErrorBoundary,
|
|
18
|
-
For,
|
|
19
|
-
Index,
|
|
20
|
-
Match,
|
|
21
|
-
Show,
|
|
22
|
-
Suspense,
|
|
23
|
-
SuspenseList,
|
|
24
|
-
Switch,
|
|
25
|
-
createComponent,
|
|
26
|
-
createRenderEffect as effect,
|
|
27
|
-
getOwner,
|
|
28
|
-
createMemo as memo,
|
|
29
|
-
mergeProps,
|
|
30
|
-
untrack
|
|
31
|
-
} from "solid-js";
|
|
1
|
+
import { createMemo, createRoot, createRenderEffect, untrack, sharedConfig, enableHydration, getOwner, createEffect, runWithOwner, createSignal, onCleanup, $DEVCOMP, splitProps } from 'solid-js';
|
|
2
|
+
export { ErrorBoundary, For, Index, Match, Show, Suspense, SuspenseList, Switch, createComponent, createRenderEffect as effect, getOwner, mergeProps, untrack } from 'solid-js';
|
|
32
3
|
|
|
33
|
-
const booleans = [
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
"autoplay",
|
|
38
|
-
"checked",
|
|
39
|
-
"controls",
|
|
40
|
-
"default",
|
|
41
|
-
"disabled",
|
|
42
|
-
"formnovalidate",
|
|
43
|
-
"hidden",
|
|
44
|
-
"indeterminate",
|
|
45
|
-
"inert",
|
|
46
|
-
"ismap",
|
|
47
|
-
"loop",
|
|
48
|
-
"multiple",
|
|
49
|
-
"muted",
|
|
50
|
-
"nomodule",
|
|
51
|
-
"novalidate",
|
|
52
|
-
"open",
|
|
53
|
-
"playsinline",
|
|
54
|
-
"readonly",
|
|
55
|
-
"required",
|
|
56
|
-
"reversed",
|
|
57
|
-
"seamless",
|
|
58
|
-
"selected"
|
|
59
|
-
];
|
|
60
|
-
const Properties = /*#__PURE__*/ new Set([
|
|
61
|
-
"className",
|
|
62
|
-
"value",
|
|
63
|
-
"readOnly",
|
|
64
|
-
"formNoValidate",
|
|
65
|
-
"isMap",
|
|
66
|
-
"noModule",
|
|
67
|
-
"playsInline",
|
|
68
|
-
...booleans
|
|
69
|
-
]);
|
|
70
|
-
const ChildProperties = /*#__PURE__*/ new Set([
|
|
71
|
-
"innerHTML",
|
|
72
|
-
"textContent",
|
|
73
|
-
"innerText",
|
|
74
|
-
"children"
|
|
75
|
-
]);
|
|
76
|
-
const Aliases = /*#__PURE__*/ Object.assign(Object.create(null), {
|
|
4
|
+
const booleans = ["allowfullscreen", "async", "autofocus", "autoplay", "checked", "controls", "default", "disabled", "formnovalidate", "hidden", "indeterminate", "inert", "ismap", "loop", "multiple", "muted", "nomodule", "novalidate", "open", "playsinline", "readonly", "required", "reversed", "seamless", "selected"];
|
|
5
|
+
const Properties = /*#__PURE__*/new Set(["className", "value", "readOnly", "noValidate", "formNoValidate", "isMap", "noModule", "playsInline", ...booleans]);
|
|
6
|
+
const ChildProperties = /*#__PURE__*/new Set(["innerHTML", "textContent", "innerText", "children"]);
|
|
7
|
+
const Aliases = /*#__PURE__*/Object.assign(Object.create(null), {
|
|
77
8
|
className: "class",
|
|
78
9
|
htmlFor: "for"
|
|
79
10
|
});
|
|
80
|
-
const PropAliases = /*#__PURE__*/
|
|
11
|
+
const PropAliases = /*#__PURE__*/Object.assign(Object.create(null), {
|
|
81
12
|
class: "className",
|
|
13
|
+
novalidate: {
|
|
14
|
+
$: "noValidate",
|
|
15
|
+
FORM: 1
|
|
16
|
+
},
|
|
82
17
|
formnovalidate: {
|
|
83
18
|
$: "formNoValidate",
|
|
84
19
|
BUTTON: 1,
|
|
@@ -104,396 +39,21 @@ const PropAliases = /*#__PURE__*/ Object.assign(Object.create(null), {
|
|
|
104
39
|
});
|
|
105
40
|
function getPropAlias(prop, tagName) {
|
|
106
41
|
const a = PropAliases[prop];
|
|
107
|
-
return typeof a === "object" ?
|
|
108
|
-
}
|
|
109
|
-
const DelegatedEvents = /*#__PURE__*/
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
"focusout",
|
|
116
|
-
"input",
|
|
117
|
-
"keydown",
|
|
118
|
-
"keyup",
|
|
119
|
-
"mousedown",
|
|
120
|
-
"mousemove",
|
|
121
|
-
"mouseout",
|
|
122
|
-
"mouseover",
|
|
123
|
-
"mouseup",
|
|
124
|
-
"pointerdown",
|
|
125
|
-
"pointermove",
|
|
126
|
-
"pointerout",
|
|
127
|
-
"pointerover",
|
|
128
|
-
"pointerup",
|
|
129
|
-
"touchend",
|
|
130
|
-
"touchmove",
|
|
131
|
-
"touchstart"
|
|
132
|
-
]);
|
|
133
|
-
const SVGElements = /*#__PURE__*/ new Set([
|
|
134
|
-
"altGlyph",
|
|
135
|
-
"altGlyphDef",
|
|
136
|
-
"altGlyphItem",
|
|
137
|
-
"animate",
|
|
138
|
-
"animateColor",
|
|
139
|
-
"animateMotion",
|
|
140
|
-
"animateTransform",
|
|
141
|
-
"circle",
|
|
142
|
-
"clipPath",
|
|
143
|
-
"color-profile",
|
|
144
|
-
"cursor",
|
|
145
|
-
"defs",
|
|
146
|
-
"desc",
|
|
147
|
-
"ellipse",
|
|
148
|
-
"feBlend",
|
|
149
|
-
"feColorMatrix",
|
|
150
|
-
"feComponentTransfer",
|
|
151
|
-
"feComposite",
|
|
152
|
-
"feConvolveMatrix",
|
|
153
|
-
"feDiffuseLighting",
|
|
154
|
-
"feDisplacementMap",
|
|
155
|
-
"feDistantLight",
|
|
156
|
-
"feDropShadow",
|
|
157
|
-
"feFlood",
|
|
158
|
-
"feFuncA",
|
|
159
|
-
"feFuncB",
|
|
160
|
-
"feFuncG",
|
|
161
|
-
"feFuncR",
|
|
162
|
-
"feGaussianBlur",
|
|
163
|
-
"feImage",
|
|
164
|
-
"feMerge",
|
|
165
|
-
"feMergeNode",
|
|
166
|
-
"feMorphology",
|
|
167
|
-
"feOffset",
|
|
168
|
-
"fePointLight",
|
|
169
|
-
"feSpecularLighting",
|
|
170
|
-
"feSpotLight",
|
|
171
|
-
"feTile",
|
|
172
|
-
"feTurbulence",
|
|
173
|
-
"filter",
|
|
174
|
-
"font",
|
|
175
|
-
"font-face",
|
|
176
|
-
"font-face-format",
|
|
177
|
-
"font-face-name",
|
|
178
|
-
"font-face-src",
|
|
179
|
-
"font-face-uri",
|
|
180
|
-
"foreignObject",
|
|
181
|
-
"g",
|
|
182
|
-
"glyph",
|
|
183
|
-
"glyphRef",
|
|
184
|
-
"hkern",
|
|
185
|
-
"image",
|
|
186
|
-
"line",
|
|
187
|
-
"linearGradient",
|
|
188
|
-
"marker",
|
|
189
|
-
"mask",
|
|
190
|
-
"metadata",
|
|
191
|
-
"missing-glyph",
|
|
192
|
-
"mpath",
|
|
193
|
-
"path",
|
|
194
|
-
"pattern",
|
|
195
|
-
"polygon",
|
|
196
|
-
"polyline",
|
|
197
|
-
"radialGradient",
|
|
198
|
-
"rect",
|
|
199
|
-
"set",
|
|
200
|
-
"stop",
|
|
201
|
-
"svg",
|
|
202
|
-
"switch",
|
|
203
|
-
"symbol",
|
|
204
|
-
"text",
|
|
205
|
-
"textPath",
|
|
206
|
-
"tref",
|
|
207
|
-
"tspan",
|
|
208
|
-
"use",
|
|
209
|
-
"view",
|
|
210
|
-
"vkern"
|
|
211
|
-
]);
|
|
42
|
+
return typeof a === "object" ? a[tagName] ? a["$"] : undefined : a;
|
|
43
|
+
}
|
|
44
|
+
const 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"]);
|
|
45
|
+
const SVGElements = /*#__PURE__*/new Set([
|
|
46
|
+
"altGlyph", "altGlyphDef", "altGlyphItem", "animate", "animateColor", "animateMotion", "animateTransform", "circle", "clipPath", "color-profile", "cursor", "defs", "desc", "ellipse", "feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence", "filter", "font", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignObject", "g", "glyph", "glyphRef", "hkern", "image", "line", "linearGradient", "marker", "mask", "metadata", "missing-glyph", "mpath", "path", "pattern", "polygon", "polyline", "radialGradient", "rect",
|
|
47
|
+
"set", "stop",
|
|
48
|
+
"svg", "switch", "symbol", "text", "textPath",
|
|
49
|
+
"tref", "tspan", "use", "view", "vkern"]);
|
|
212
50
|
const SVGNamespace = {
|
|
213
51
|
xlink: "http://www.w3.org/1999/xlink",
|
|
214
52
|
xml: "http://www.w3.org/XML/1998/namespace"
|
|
215
53
|
};
|
|
216
|
-
const DOMElements = /*#__PURE__*/
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
"head",
|
|
220
|
-
"link",
|
|
221
|
-
"meta",
|
|
222
|
-
"style",
|
|
223
|
-
"title",
|
|
224
|
-
"body",
|
|
225
|
-
"address",
|
|
226
|
-
"article",
|
|
227
|
-
"aside",
|
|
228
|
-
"footer",
|
|
229
|
-
"header",
|
|
230
|
-
"main",
|
|
231
|
-
"nav",
|
|
232
|
-
"section",
|
|
233
|
-
"body",
|
|
234
|
-
"blockquote",
|
|
235
|
-
"dd",
|
|
236
|
-
"div",
|
|
237
|
-
"dl",
|
|
238
|
-
"dt",
|
|
239
|
-
"figcaption",
|
|
240
|
-
"figure",
|
|
241
|
-
"hr",
|
|
242
|
-
"li",
|
|
243
|
-
"ol",
|
|
244
|
-
"p",
|
|
245
|
-
"pre",
|
|
246
|
-
"ul",
|
|
247
|
-
"a",
|
|
248
|
-
"abbr",
|
|
249
|
-
"b",
|
|
250
|
-
"bdi",
|
|
251
|
-
"bdo",
|
|
252
|
-
"br",
|
|
253
|
-
"cite",
|
|
254
|
-
"code",
|
|
255
|
-
"data",
|
|
256
|
-
"dfn",
|
|
257
|
-
"em",
|
|
258
|
-
"i",
|
|
259
|
-
"kbd",
|
|
260
|
-
"mark",
|
|
261
|
-
"q",
|
|
262
|
-
"rp",
|
|
263
|
-
"rt",
|
|
264
|
-
"ruby",
|
|
265
|
-
"s",
|
|
266
|
-
"samp",
|
|
267
|
-
"small",
|
|
268
|
-
"span",
|
|
269
|
-
"strong",
|
|
270
|
-
"sub",
|
|
271
|
-
"sup",
|
|
272
|
-
"time",
|
|
273
|
-
"u",
|
|
274
|
-
"var",
|
|
275
|
-
"wbr",
|
|
276
|
-
"area",
|
|
277
|
-
"audio",
|
|
278
|
-
"img",
|
|
279
|
-
"map",
|
|
280
|
-
"track",
|
|
281
|
-
"video",
|
|
282
|
-
"embed",
|
|
283
|
-
"iframe",
|
|
284
|
-
"object",
|
|
285
|
-
"param",
|
|
286
|
-
"picture",
|
|
287
|
-
"portal",
|
|
288
|
-
"source",
|
|
289
|
-
"svg",
|
|
290
|
-
"math",
|
|
291
|
-
"canvas",
|
|
292
|
-
"noscript",
|
|
293
|
-
"script",
|
|
294
|
-
"del",
|
|
295
|
-
"ins",
|
|
296
|
-
"caption",
|
|
297
|
-
"col",
|
|
298
|
-
"colgroup",
|
|
299
|
-
"table",
|
|
300
|
-
"tbody",
|
|
301
|
-
"td",
|
|
302
|
-
"tfoot",
|
|
303
|
-
"th",
|
|
304
|
-
"thead",
|
|
305
|
-
"tr",
|
|
306
|
-
"button",
|
|
307
|
-
"datalist",
|
|
308
|
-
"fieldset",
|
|
309
|
-
"form",
|
|
310
|
-
"input",
|
|
311
|
-
"label",
|
|
312
|
-
"legend",
|
|
313
|
-
"meter",
|
|
314
|
-
"optgroup",
|
|
315
|
-
"option",
|
|
316
|
-
"output",
|
|
317
|
-
"progress",
|
|
318
|
-
"select",
|
|
319
|
-
"textarea",
|
|
320
|
-
"details",
|
|
321
|
-
"dialog",
|
|
322
|
-
"menu",
|
|
323
|
-
"summary",
|
|
324
|
-
"details",
|
|
325
|
-
"slot",
|
|
326
|
-
"template",
|
|
327
|
-
"acronym",
|
|
328
|
-
"applet",
|
|
329
|
-
"basefont",
|
|
330
|
-
"bgsound",
|
|
331
|
-
"big",
|
|
332
|
-
"blink",
|
|
333
|
-
"center",
|
|
334
|
-
"content",
|
|
335
|
-
"dir",
|
|
336
|
-
"font",
|
|
337
|
-
"frame",
|
|
338
|
-
"frameset",
|
|
339
|
-
"hgroup",
|
|
340
|
-
"image",
|
|
341
|
-
"keygen",
|
|
342
|
-
"marquee",
|
|
343
|
-
"menuitem",
|
|
344
|
-
"nobr",
|
|
345
|
-
"noembed",
|
|
346
|
-
"noframes",
|
|
347
|
-
"plaintext",
|
|
348
|
-
"rb",
|
|
349
|
-
"rtc",
|
|
350
|
-
"shadow",
|
|
351
|
-
"spacer",
|
|
352
|
-
"strike",
|
|
353
|
-
"tt",
|
|
354
|
-
"xmp",
|
|
355
|
-
"a",
|
|
356
|
-
"abbr",
|
|
357
|
-
"acronym",
|
|
358
|
-
"address",
|
|
359
|
-
"applet",
|
|
360
|
-
"area",
|
|
361
|
-
"article",
|
|
362
|
-
"aside",
|
|
363
|
-
"audio",
|
|
364
|
-
"b",
|
|
365
|
-
"base",
|
|
366
|
-
"basefont",
|
|
367
|
-
"bdi",
|
|
368
|
-
"bdo",
|
|
369
|
-
"bgsound",
|
|
370
|
-
"big",
|
|
371
|
-
"blink",
|
|
372
|
-
"blockquote",
|
|
373
|
-
"body",
|
|
374
|
-
"br",
|
|
375
|
-
"button",
|
|
376
|
-
"canvas",
|
|
377
|
-
"caption",
|
|
378
|
-
"center",
|
|
379
|
-
"cite",
|
|
380
|
-
"code",
|
|
381
|
-
"col",
|
|
382
|
-
"colgroup",
|
|
383
|
-
"content",
|
|
384
|
-
"data",
|
|
385
|
-
"datalist",
|
|
386
|
-
"dd",
|
|
387
|
-
"del",
|
|
388
|
-
"details",
|
|
389
|
-
"dfn",
|
|
390
|
-
"dialog",
|
|
391
|
-
"dir",
|
|
392
|
-
"div",
|
|
393
|
-
"dl",
|
|
394
|
-
"dt",
|
|
395
|
-
"em",
|
|
396
|
-
"embed",
|
|
397
|
-
"fieldset",
|
|
398
|
-
"figcaption",
|
|
399
|
-
"figure",
|
|
400
|
-
"font",
|
|
401
|
-
"footer",
|
|
402
|
-
"form",
|
|
403
|
-
"frame",
|
|
404
|
-
"frameset",
|
|
405
|
-
"head",
|
|
406
|
-
"header",
|
|
407
|
-
"hgroup",
|
|
408
|
-
"hr",
|
|
409
|
-
"html",
|
|
410
|
-
"i",
|
|
411
|
-
"iframe",
|
|
412
|
-
"image",
|
|
413
|
-
"img",
|
|
414
|
-
"input",
|
|
415
|
-
"ins",
|
|
416
|
-
"kbd",
|
|
417
|
-
"keygen",
|
|
418
|
-
"label",
|
|
419
|
-
"legend",
|
|
420
|
-
"li",
|
|
421
|
-
"link",
|
|
422
|
-
"main",
|
|
423
|
-
"map",
|
|
424
|
-
"mark",
|
|
425
|
-
"marquee",
|
|
426
|
-
"menu",
|
|
427
|
-
"menuitem",
|
|
428
|
-
"meta",
|
|
429
|
-
"meter",
|
|
430
|
-
"nav",
|
|
431
|
-
"nobr",
|
|
432
|
-
"noembed",
|
|
433
|
-
"noframes",
|
|
434
|
-
"noscript",
|
|
435
|
-
"object",
|
|
436
|
-
"ol",
|
|
437
|
-
"optgroup",
|
|
438
|
-
"option",
|
|
439
|
-
"output",
|
|
440
|
-
"p",
|
|
441
|
-
"param",
|
|
442
|
-
"picture",
|
|
443
|
-
"plaintext",
|
|
444
|
-
"portal",
|
|
445
|
-
"pre",
|
|
446
|
-
"progress",
|
|
447
|
-
"q",
|
|
448
|
-
"rb",
|
|
449
|
-
"rp",
|
|
450
|
-
"rt",
|
|
451
|
-
"rtc",
|
|
452
|
-
"ruby",
|
|
453
|
-
"s",
|
|
454
|
-
"samp",
|
|
455
|
-
"script",
|
|
456
|
-
"section",
|
|
457
|
-
"select",
|
|
458
|
-
"shadow",
|
|
459
|
-
"slot",
|
|
460
|
-
"small",
|
|
461
|
-
"source",
|
|
462
|
-
"spacer",
|
|
463
|
-
"span",
|
|
464
|
-
"strike",
|
|
465
|
-
"strong",
|
|
466
|
-
"style",
|
|
467
|
-
"sub",
|
|
468
|
-
"summary",
|
|
469
|
-
"sup",
|
|
470
|
-
"table",
|
|
471
|
-
"tbody",
|
|
472
|
-
"td",
|
|
473
|
-
"template",
|
|
474
|
-
"textarea",
|
|
475
|
-
"tfoot",
|
|
476
|
-
"th",
|
|
477
|
-
"thead",
|
|
478
|
-
"time",
|
|
479
|
-
"title",
|
|
480
|
-
"tr",
|
|
481
|
-
"track",
|
|
482
|
-
"tt",
|
|
483
|
-
"u",
|
|
484
|
-
"ul",
|
|
485
|
-
"var",
|
|
486
|
-
"video",
|
|
487
|
-
"wbr",
|
|
488
|
-
"xmp",
|
|
489
|
-
"input",
|
|
490
|
-
"h1",
|
|
491
|
-
"h2",
|
|
492
|
-
"h3",
|
|
493
|
-
"h4",
|
|
494
|
-
"h5",
|
|
495
|
-
"h6"
|
|
496
|
-
]);
|
|
54
|
+
const DOMElements = /*#__PURE__*/new Set(["html", "base", "head", "link", "meta", "style", "title", "body", "address", "article", "aside", "footer", "header", "main", "nav", "section", "body", "blockquote", "dd", "div", "dl", "dt", "figcaption", "figure", "hr", "li", "ol", "p", "pre", "ul", "a", "abbr", "b", "bdi", "bdo", "br", "cite", "code", "data", "dfn", "em", "i", "kbd", "mark", "q", "rp", "rt", "ruby", "s", "samp", "small", "span", "strong", "sub", "sup", "time", "u", "var", "wbr", "area", "audio", "img", "map", "track", "video", "embed", "iframe", "object", "param", "picture", "portal", "source", "svg", "math", "canvas", "noscript", "script", "del", "ins", "caption", "col", "colgroup", "table", "tbody", "td", "tfoot", "th", "thead", "tr", "button", "datalist", "fieldset", "form", "input", "label", "legend", "meter", "optgroup", "option", "output", "progress", "select", "textarea", "details", "dialog", "menu", "summary", "details", "slot", "template", "acronym", "applet", "basefont", "bgsound", "big", "blink", "center", "content", "dir", "font", "frame", "frameset", "hgroup", "image", "keygen", "marquee", "menuitem", "nobr", "noembed", "noframes", "plaintext", "rb", "rtc", "shadow", "spacer", "strike", "tt", "xmp", "a", "abbr", "acronym", "address", "applet", "area", "article", "aside", "audio", "b", "base", "basefont", "bdi", "bdo", "bgsound", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "em", "embed", "fieldset", "figcaption", "figure", "font", "footer", "form", "frame", "frameset", "head", "header", "hgroup", "hr", "html", "i", "iframe", "image", "img", "input", "ins", "kbd", "keygen", "label", "legend", "li", "link", "main", "map", "mark", "marquee", "menu", "menuitem", "meta", "meter", "nav", "nobr", "noembed", "noframes", "noscript", "object", "ol", "optgroup", "option", "output", "p", "param", "picture", "plaintext", "portal", "pre", "progress", "q", "rb", "rp", "rt", "rtc", "ruby", "s", "samp", "script", "section", "select", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "title", "tr", "track", "tt", "u", "ul", "var", "video", "wbr", "xmp", "input", "h1", "h2", "h3", "h4", "h5", "h6"]);
|
|
55
|
+
|
|
56
|
+
const memo = fn => createMemo(() => fn());
|
|
497
57
|
|
|
498
58
|
function reconcileArrays(parentNode, a, b) {
|
|
499
59
|
let bLength = b.length,
|
|
@@ -514,7 +74,7 @@ function reconcileArrays(parentNode, a, b) {
|
|
|
514
74
|
bEnd--;
|
|
515
75
|
}
|
|
516
76
|
if (aEnd === aStart) {
|
|
517
|
-
const node = bEnd < bLength ?
|
|
77
|
+
const node = bEnd < bLength ? bStart ? b[bStart - 1].nextSibling : b[bEnd - bStart] : after;
|
|
518
78
|
while (bStart < bEnd) parentNode.insertBefore(b[bStart++], node);
|
|
519
79
|
} else if (bEnd === bStart) {
|
|
520
80
|
while (aStart < aEnd) {
|
|
@@ -555,16 +115,12 @@ function reconcileArrays(parentNode, a, b) {
|
|
|
555
115
|
const $$EVENTS = "_$DX_DELEGATE";
|
|
556
116
|
function render(code, element, init, options = {}) {
|
|
557
117
|
if (!element) {
|
|
558
|
-
throw new Error(
|
|
559
|
-
"The `element` passed to `render(..., element)` doesn't exist. Make sure `element` exists in the document."
|
|
560
|
-
);
|
|
118
|
+
throw new Error("The `element` passed to `render(..., element)` doesn't exist. Make sure `element` exists in the document.");
|
|
561
119
|
}
|
|
562
120
|
let disposer;
|
|
563
121
|
createRoot(dispose => {
|
|
564
122
|
disposer = dispose;
|
|
565
|
-
element === document
|
|
566
|
-
? code()
|
|
567
|
-
: insert(element, code(), element.firstChild ? null : undefined, init);
|
|
123
|
+
element === document ? code() : insert(element, code(), element.firstChild ? null : undefined, init);
|
|
568
124
|
}, options.owner);
|
|
569
125
|
return () => {
|
|
570
126
|
disposer();
|
|
@@ -574,19 +130,12 @@ function render(code, element, init, options = {}) {
|
|
|
574
130
|
function template(html, isImportNode, isSVG, isMathML) {
|
|
575
131
|
let node;
|
|
576
132
|
const create = () => {
|
|
577
|
-
if (isHydrating())
|
|
578
|
-
|
|
579
|
-
"Failed attempt to create new DOM elements during hydration. Check that the libraries you are using support hydration."
|
|
580
|
-
);
|
|
581
|
-
const t = isMathML
|
|
582
|
-
? document.createElementNS("http://www.w3.org/1998/Math/MathML", "template")
|
|
583
|
-
: document.createElement("template");
|
|
133
|
+
if (isHydrating()) throw new Error("Failed attempt to create new DOM elements during hydration. Check that the libraries you are using support hydration.");
|
|
134
|
+
const t = isMathML ? document.createElementNS("http://www.w3.org/1998/Math/MathML", "template") : document.createElement("template");
|
|
584
135
|
t.innerHTML = html;
|
|
585
136
|
return isSVG ? t.content.firstChild.firstChild : isMathML ? t.firstChild : t.content.firstChild;
|
|
586
137
|
};
|
|
587
|
-
const fn = isImportNode
|
|
588
|
-
? () => untrack(() => document.importNode(node || (node = create()), true))
|
|
589
|
-
: () => (node || (node = create())).cloneNode(true);
|
|
138
|
+
const fn = isImportNode ? () => untrack(() => document.importNode(node || (node = create()), true)) : () => (node || (node = create())).cloneNode(true);
|
|
590
139
|
fn.cloneNode = fn;
|
|
591
140
|
return fn;
|
|
592
141
|
}
|
|
@@ -612,13 +161,11 @@ function setProperty(node, name, value) {
|
|
|
612
161
|
}
|
|
613
162
|
function setAttribute(node, name, value) {
|
|
614
163
|
if (isHydrating(node)) return;
|
|
615
|
-
if (value == null) node.removeAttribute(name);
|
|
616
|
-
else node.setAttribute(name, value);
|
|
164
|
+
if (value == null) node.removeAttribute(name);else node.setAttribute(name, value);
|
|
617
165
|
}
|
|
618
166
|
function setAttributeNS(node, namespace, name, value) {
|
|
619
167
|
if (isHydrating(node)) return;
|
|
620
|
-
if (value == null) node.removeAttributeNS(namespace, name);
|
|
621
|
-
else node.setAttributeNS(namespace, name, value);
|
|
168
|
+
if (value == null) node.removeAttributeNS(namespace, name);else node.setAttributeNS(namespace, name, value);
|
|
622
169
|
}
|
|
623
170
|
function setBoolAttribute(node, name, value) {
|
|
624
171
|
if (isHydrating(node)) return;
|
|
@@ -626,8 +173,7 @@ function setBoolAttribute(node, name, value) {
|
|
|
626
173
|
}
|
|
627
174
|
function className(node, value) {
|
|
628
175
|
if (isHydrating(node)) return;
|
|
629
|
-
if (value == null) node.removeAttribute("class");
|
|
630
|
-
else node.className = value;
|
|
176
|
+
if (value == null) node.removeAttribute("class");else node.className = value;
|
|
631
177
|
}
|
|
632
178
|
function addEventListener(node, name, handler, delegate) {
|
|
633
179
|
if (delegate) {
|
|
@@ -637,7 +183,7 @@ function addEventListener(node, name, handler, delegate) {
|
|
|
637
183
|
} else node[`$$${name}`] = handler;
|
|
638
184
|
} else if (Array.isArray(handler)) {
|
|
639
185
|
const handlerFn = handler[0];
|
|
640
|
-
node.addEventListener(name,
|
|
186
|
+
node.addEventListener(name, handler[0] = e => handlerFn.call(node, handler[1], e));
|
|
641
187
|
} else node.addEventListener(name, handler, typeof handler !== "function" && handler);
|
|
642
188
|
}
|
|
643
189
|
function classList(node, value, prev = {}) {
|
|
@@ -662,7 +208,7 @@ function classList(node, value, prev = {}) {
|
|
|
662
208
|
function style(node, value, prev) {
|
|
663
209
|
if (!value) return prev ? setAttribute(node, "style") : value;
|
|
664
210
|
const nodeStyle = node.style;
|
|
665
|
-
if (typeof value === "string") return
|
|
211
|
+
if (typeof value === "string") return nodeStyle.cssText = value;
|
|
666
212
|
typeof prev === "string" && (nodeStyle.cssText = prev = undefined);
|
|
667
213
|
prev || (prev = {});
|
|
668
214
|
value || (value = {});
|
|
@@ -683,9 +229,7 @@ function style(node, value, prev) {
|
|
|
683
229
|
function spread(node, props = {}, isSVG, skipChildren) {
|
|
684
230
|
const prevProps = {};
|
|
685
231
|
if (!skipChildren) {
|
|
686
|
-
createRenderEffect(
|
|
687
|
-
() => (prevProps.children = insertExpression(node, props.children, prevProps.children))
|
|
688
|
-
);
|
|
232
|
+
createRenderEffect(() => prevProps.children = insertExpression(node, props.children, prevProps.children));
|
|
689
233
|
}
|
|
690
234
|
createRenderEffect(() => typeof props.ref === "function" && use(props.ref, node));
|
|
691
235
|
createRenderEffect(() => assign(node, props, isSVG, true, prevProps, true));
|
|
@@ -749,14 +293,10 @@ function getNextElement(template) {
|
|
|
749
293
|
let node,
|
|
750
294
|
key,
|
|
751
295
|
hydrating = isHydrating();
|
|
752
|
-
if (!hydrating || !(node = sharedConfig.registry.get(
|
|
296
|
+
if (!hydrating || !(node = sharedConfig.registry.get(key = getHydrationKey()))) {
|
|
753
297
|
if (hydrating) {
|
|
754
298
|
sharedConfig.done = true;
|
|
755
|
-
throw new Error(
|
|
756
|
-
`Hydration Mismatch. Unable to find DOM nodes for hydration key: ${key}\n${
|
|
757
|
-
template ? template().outerHTML : ""
|
|
758
|
-
}`
|
|
759
|
-
);
|
|
299
|
+
throw new Error(`Hydration Mismatch. Unable to find DOM nodes for hydration key: ${key}\n${template ? template().outerHTML : ""}`);
|
|
760
300
|
}
|
|
761
301
|
return template();
|
|
762
302
|
}
|
|
@@ -776,8 +316,7 @@ function getNextMarker(start) {
|
|
|
776
316
|
while (end) {
|
|
777
317
|
if (end.nodeType === 8) {
|
|
778
318
|
const v = end.nodeValue;
|
|
779
|
-
if (v === "$") count++;
|
|
780
|
-
else if (v === "/") {
|
|
319
|
+
if (v === "$") count++;else if (v === "/") {
|
|
781
320
|
if (count === 0) return [end, current];
|
|
782
321
|
count--;
|
|
783
322
|
}
|
|
@@ -791,7 +330,10 @@ function getNextMarker(start) {
|
|
|
791
330
|
function runHydrationEvents() {
|
|
792
331
|
if (sharedConfig.events && !sharedConfig.events.queued) {
|
|
793
332
|
queueMicrotask(() => {
|
|
794
|
-
const {
|
|
333
|
+
const {
|
|
334
|
+
completed,
|
|
335
|
+
events
|
|
336
|
+
} = sharedConfig;
|
|
795
337
|
if (!events) return;
|
|
796
338
|
events.queued = false;
|
|
797
339
|
while (events.length) {
|
|
@@ -816,8 +358,7 @@ function toPropertyName(name) {
|
|
|
816
358
|
}
|
|
817
359
|
function toggleClassKey(node, key, value) {
|
|
818
360
|
const classNames = key.trim().split(/\s+/);
|
|
819
|
-
for (let i = 0, nameLen = classNames.length; i < nameLen; i++)
|
|
820
|
-
node.classList.toggle(classNames[i], value);
|
|
361
|
+
for (let i = 0, nameLen = classNames.length; i < nameLen; i++) node.classList.toggle(classNames[i], value);
|
|
821
362
|
}
|
|
822
363
|
function assignProp(node, prop, value, prev, isSVG, skipRef, props) {
|
|
823
364
|
let isCE, isProp, isChildProp, propAlias, forceProp;
|
|
@@ -849,24 +390,15 @@ function assignProp(node, prop, value, prev, isSVG, skipRef, props) {
|
|
|
849
390
|
setAttribute(node, prop.slice(5), value);
|
|
850
391
|
} else if (prop.slice(0, 5) === "bool:") {
|
|
851
392
|
setBoolAttribute(node, prop.slice(5), value);
|
|
852
|
-
} else if (
|
|
853
|
-
(forceProp = prop.slice(0, 5) === "prop:") ||
|
|
854
|
-
(isChildProp = ChildProperties.has(prop)) ||
|
|
855
|
-
(!isSVG &&
|
|
856
|
-
((propAlias = getPropAlias(prop, node.tagName)) || (isProp = Properties.has(prop)))) ||
|
|
857
|
-
(isCE = node.nodeName.includes("-") || "is" in props)
|
|
858
|
-
) {
|
|
393
|
+
} 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)) {
|
|
859
394
|
if (forceProp) {
|
|
860
395
|
prop = prop.slice(5);
|
|
861
396
|
isProp = true;
|
|
862
397
|
} else if (isHydrating(node)) return value;
|
|
863
|
-
if (prop === "class" || prop === "className") className(node, value);
|
|
864
|
-
else if (isCE && !isProp && !isChildProp) node[toPropertyName(prop)] = value;
|
|
865
|
-
else node[propAlias || prop] = value;
|
|
398
|
+
if (prop === "class" || prop === "className") className(node, value);else if (isCE && !isProp && !isChildProp) node[toPropertyName(prop)] = value;else node[propAlias || prop] = value;
|
|
866
399
|
} else {
|
|
867
400
|
const ns = isSVG && prop.indexOf(":") > -1 && SVGNamespace[prop.split(":")[0]];
|
|
868
|
-
if (ns) setAttributeNS(node, ns, prop, value);
|
|
869
|
-
else setAttribute(node, Aliases[prop] || prop, value);
|
|
401
|
+
if (ns) setAttributeNS(node, ns, prop, value);else setAttribute(node, Aliases[prop] || prop, value);
|
|
870
402
|
}
|
|
871
403
|
return value;
|
|
872
404
|
}
|
|
@@ -878,11 +410,10 @@ function eventHandler(e) {
|
|
|
878
410
|
const key = `$$${e.type}`;
|
|
879
411
|
const oriTarget = e.target;
|
|
880
412
|
const oriCurrentTarget = e.currentTarget;
|
|
881
|
-
const retarget = value =>
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
});
|
|
413
|
+
const retarget = value => Object.defineProperty(e, "target", {
|
|
414
|
+
configurable: true,
|
|
415
|
+
value
|
|
416
|
+
});
|
|
886
417
|
const handleNode = () => {
|
|
887
418
|
const handler = node[key];
|
|
888
419
|
if (handler && !node.disabled) {
|
|
@@ -890,11 +421,7 @@ function eventHandler(e) {
|
|
|
890
421
|
data !== undefined ? handler.call(node, data, e) : handler.call(node, e);
|
|
891
422
|
if (e.cancelBubble) return;
|
|
892
423
|
}
|
|
893
|
-
node.host &&
|
|
894
|
-
typeof node.host !== "string" &&
|
|
895
|
-
!node.host._$host &&
|
|
896
|
-
node.contains(e.target) &&
|
|
897
|
-
retarget(node.host);
|
|
424
|
+
node.host && typeof node.host !== "string" && !node.host._$host && node.contains(e.target) && retarget(node.host);
|
|
898
425
|
return true;
|
|
899
426
|
};
|
|
900
427
|
const walkUpTree = () => {
|
|
@@ -922,7 +449,8 @@ function eventHandler(e) {
|
|
|
922
449
|
break;
|
|
923
450
|
}
|
|
924
451
|
}
|
|
925
|
-
}
|
|
452
|
+
}
|
|
453
|
+
else walkUpTree();
|
|
926
454
|
retarget(oriTarget);
|
|
927
455
|
}
|
|
928
456
|
function insertExpression(parent, value, current, marker, unwrapArray) {
|
|
@@ -932,8 +460,7 @@ function insertExpression(parent, value, current, marker, unwrapArray) {
|
|
|
932
460
|
let cleaned = [];
|
|
933
461
|
for (let i = 0; i < current.length; i++) {
|
|
934
462
|
const node = current[i];
|
|
935
|
-
if (node.nodeType === 8 && node.data.slice(0, 2) === "!$") node.remove();
|
|
936
|
-
else cleaned.push(node);
|
|
463
|
+
if (node.nodeType === 8 && node.data.slice(0, 2) === "!$") node.remove();else cleaned.push(node);
|
|
937
464
|
}
|
|
938
465
|
current = cleaned;
|
|
939
466
|
}
|
|
@@ -941,7 +468,7 @@ function insertExpression(parent, value, current, marker, unwrapArray) {
|
|
|
941
468
|
if (value === current) return current;
|
|
942
469
|
const t = typeof value,
|
|
943
470
|
multi = marker !== undefined;
|
|
944
|
-
parent =
|
|
471
|
+
parent = multi && current[0] && current[0].parentNode || parent;
|
|
945
472
|
if (t === "string" || t === "number") {
|
|
946
473
|
if (hydrating) return current;
|
|
947
474
|
if (t === "number") {
|
|
@@ -973,17 +500,17 @@ function insertExpression(parent, value, current, marker, unwrapArray) {
|
|
|
973
500
|
const array = [];
|
|
974
501
|
const currentArray = current && Array.isArray(current);
|
|
975
502
|
if (normalizeIncomingArray(array, value, current, unwrapArray)) {
|
|
976
|
-
createRenderEffect(() =>
|
|
503
|
+
createRenderEffect(() => current = insertExpression(parent, array, current, marker, true));
|
|
977
504
|
return () => current;
|
|
978
505
|
}
|
|
979
506
|
if (hydrating) {
|
|
980
507
|
if (!array.length) return current;
|
|
981
|
-
if (marker === undefined) return
|
|
508
|
+
if (marker === undefined) return current = [...parent.childNodes];
|
|
982
509
|
let node = array[0];
|
|
983
510
|
if (node.parentNode !== parent) return current;
|
|
984
511
|
const nodes = [node];
|
|
985
512
|
while ((node = node.nextSibling) !== marker) nodes.push(node);
|
|
986
|
-
return
|
|
513
|
+
return current = nodes;
|
|
987
514
|
}
|
|
988
515
|
if (array.length === 0) {
|
|
989
516
|
current = cleanChildren(parent, current, marker);
|
|
@@ -998,9 +525,9 @@ function insertExpression(parent, value, current, marker, unwrapArray) {
|
|
|
998
525
|
}
|
|
999
526
|
current = array;
|
|
1000
527
|
} else if (value.nodeType) {
|
|
1001
|
-
if (hydrating && value.parentNode) return
|
|
528
|
+
if (hydrating && value.parentNode) return current = multi ? [value] : value;
|
|
1002
529
|
if (Array.isArray(current)) {
|
|
1003
|
-
if (multi) return
|
|
530
|
+
if (multi) return current = cleanChildren(parent, current, marker, value);
|
|
1004
531
|
cleanChildren(parent, current, null, value);
|
|
1005
532
|
} else if (current == null || current === "" || !parent.firstChild) {
|
|
1006
533
|
parent.appendChild(value);
|
|
@@ -1015,28 +542,21 @@ function normalizeIncomingArray(normalized, array, current, unwrap) {
|
|
|
1015
542
|
let item = array[i],
|
|
1016
543
|
prev = current && current[normalized.length],
|
|
1017
544
|
t;
|
|
1018
|
-
if (item == null || item === true || item === false);
|
|
1019
|
-
else if ((t = typeof item) === "object" && item.nodeType) {
|
|
545
|
+
if (item == null || item === true || item === false) ; else if ((t = typeof item) === "object" && item.nodeType) {
|
|
1020
546
|
normalized.push(item);
|
|
1021
547
|
} else if (Array.isArray(item)) {
|
|
1022
548
|
dynamic = normalizeIncomingArray(normalized, item, prev) || dynamic;
|
|
1023
549
|
} else if (t === "function") {
|
|
1024
550
|
if (unwrap) {
|
|
1025
551
|
while (typeof item === "function") item = item();
|
|
1026
|
-
dynamic =
|
|
1027
|
-
normalizeIncomingArray(
|
|
1028
|
-
normalized,
|
|
1029
|
-
Array.isArray(item) ? item : [item],
|
|
1030
|
-
Array.isArray(prev) ? prev : [prev]
|
|
1031
|
-
) || dynamic;
|
|
552
|
+
dynamic = normalizeIncomingArray(normalized, Array.isArray(item) ? item : [item], Array.isArray(prev) ? prev : [prev]) || dynamic;
|
|
1032
553
|
} else {
|
|
1033
554
|
normalized.push(item);
|
|
1034
555
|
dynamic = true;
|
|
1035
556
|
}
|
|
1036
557
|
} else {
|
|
1037
558
|
const value = String(item);
|
|
1038
|
-
if (prev && prev.nodeType === 3 && prev.data === value) normalized.push(prev);
|
|
1039
|
-
else normalized.push(document.createTextNode(value));
|
|
559
|
+
if (prev && prev.nodeType === 3 && prev.data === value) normalized.push(prev);else normalized.push(document.createTextNode(value));
|
|
1040
560
|
}
|
|
1041
561
|
}
|
|
1042
562
|
return dynamic;
|
|
@@ -1045,7 +565,7 @@ function appendNodes(parent, array, marker = null) {
|
|
|
1045
565
|
for (let i = 0, len = array.length; i < len; i++) parent.insertBefore(array[i], marker);
|
|
1046
566
|
}
|
|
1047
567
|
function cleanChildren(parent, current, marker, replacement) {
|
|
1048
|
-
if (marker === undefined) return
|
|
568
|
+
if (marker === undefined) return parent.textContent = "";
|
|
1049
569
|
const node = replacement || document.createTextNode("");
|
|
1050
570
|
if (current.length) {
|
|
1051
571
|
let inserted = false;
|
|
@@ -1053,9 +573,7 @@ function cleanChildren(parent, current, marker, replacement) {
|
|
|
1053
573
|
const el = current[i];
|
|
1054
574
|
if (node !== el) {
|
|
1055
575
|
const isParent = el.parentNode === parent;
|
|
1056
|
-
if (!inserted && !i)
|
|
1057
|
-
isParent ? parent.replaceChild(node, el) : parent.insertBefore(node, marker);
|
|
1058
|
-
else isParent && el.remove();
|
|
576
|
+
if (!inserted && !i) isParent ? parent.replaceChild(node, el) : parent.insertBefore(node, marker);else isParent && el.remove();
|
|
1059
577
|
} else inserted = true;
|
|
1060
578
|
}
|
|
1061
579
|
} else parent.insertBefore(node, marker);
|
|
@@ -1066,8 +584,7 @@ function gatherHydratable(element, root) {
|
|
|
1066
584
|
for (let i = 0; i < templates.length; i++) {
|
|
1067
585
|
const node = templates[i];
|
|
1068
586
|
const key = node.getAttribute("data-hk");
|
|
1069
|
-
if ((!root || key.startsWith(root)) && !sharedConfig.registry.has(key))
|
|
1070
|
-
sharedConfig.registry.set(key, node);
|
|
587
|
+
if ((!root || key.startsWith(root)) && !sharedConfig.registry.has(key)) sharedConfig.registry.set(key, node);
|
|
1071
588
|
}
|
|
1072
589
|
}
|
|
1073
590
|
function getHydrationKey() {
|
|
@@ -1119,47 +636,42 @@ const hydrate = (...args) => {
|
|
|
1119
636
|
return hydrate$1(...args);
|
|
1120
637
|
};
|
|
1121
638
|
function Portal(props) {
|
|
1122
|
-
const {
|
|
639
|
+
const {
|
|
640
|
+
useShadow
|
|
641
|
+
} = props,
|
|
1123
642
|
marker = document.createTextNode(""),
|
|
1124
643
|
mount = () => props.mount || document.body,
|
|
1125
644
|
owner = getOwner();
|
|
1126
645
|
let content;
|
|
1127
646
|
let hydrating = !!sharedConfig.context;
|
|
1128
|
-
createEffect(
|
|
1129
|
-
()
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
insert(renderRoot, content);
|
|
1153
|
-
el.appendChild(container);
|
|
1154
|
-
props.ref && props.ref(container);
|
|
1155
|
-
onCleanup(() => el.removeChild(container));
|
|
1156
|
-
}
|
|
1157
|
-
},
|
|
1158
|
-
undefined,
|
|
1159
|
-
{
|
|
1160
|
-
render: !hydrating
|
|
647
|
+
createEffect(() => {
|
|
648
|
+
if (hydrating) getOwner().user = hydrating = false;
|
|
649
|
+
content || (content = runWithOwner(owner, () => createMemo(() => props.children)));
|
|
650
|
+
const el = mount();
|
|
651
|
+
if (el instanceof HTMLHeadElement) {
|
|
652
|
+
const [clean, setClean] = createSignal(false);
|
|
653
|
+
const cleanup = () => setClean(true);
|
|
654
|
+
createRoot(dispose => insert(el, () => !clean() ? content() : dispose(), null));
|
|
655
|
+
onCleanup(cleanup);
|
|
656
|
+
} else {
|
|
657
|
+
const container = createElement(props.isSVG ? "g" : "div", props.isSVG),
|
|
658
|
+
renderRoot = useShadow && container.attachShadow ? container.attachShadow({
|
|
659
|
+
mode: "open"
|
|
660
|
+
}) : container;
|
|
661
|
+
Object.defineProperty(container, "_$host", {
|
|
662
|
+
get() {
|
|
663
|
+
return marker.parentNode;
|
|
664
|
+
},
|
|
665
|
+
configurable: true
|
|
666
|
+
});
|
|
667
|
+
insert(renderRoot, content);
|
|
668
|
+
el.appendChild(container);
|
|
669
|
+
props.ref && props.ref(container);
|
|
670
|
+
onCleanup(() => el.removeChild(container));
|
|
1161
671
|
}
|
|
1162
|
-
|
|
672
|
+
}, undefined, {
|
|
673
|
+
render: !hydrating
|
|
674
|
+
});
|
|
1163
675
|
return marker;
|
|
1164
676
|
}
|
|
1165
677
|
function createDynamic(component, props) {
|
|
@@ -1185,63 +697,4 @@ function Dynamic(props) {
|
|
|
1185
697
|
return createDynamic(() => props.component, others);
|
|
1186
698
|
}
|
|
1187
699
|
|
|
1188
|
-
export {
|
|
1189
|
-
Aliases,
|
|
1190
|
-
voidFn as Assets,
|
|
1191
|
-
ChildProperties,
|
|
1192
|
-
DOMElements,
|
|
1193
|
-
DelegatedEvents,
|
|
1194
|
-
Dynamic,
|
|
1195
|
-
Hydration,
|
|
1196
|
-
voidFn as HydrationScript,
|
|
1197
|
-
NoHydration,
|
|
1198
|
-
Portal,
|
|
1199
|
-
Properties,
|
|
1200
|
-
RequestContext,
|
|
1201
|
-
SVGElements,
|
|
1202
|
-
SVGNamespace,
|
|
1203
|
-
addEventListener,
|
|
1204
|
-
assign,
|
|
1205
|
-
classList,
|
|
1206
|
-
className,
|
|
1207
|
-
clearDelegatedEvents,
|
|
1208
|
-
createDynamic,
|
|
1209
|
-
delegateEvents,
|
|
1210
|
-
dynamicProperty,
|
|
1211
|
-
escape,
|
|
1212
|
-
voidFn as generateHydrationScript,
|
|
1213
|
-
voidFn as getAssets,
|
|
1214
|
-
getHydrationKey,
|
|
1215
|
-
getNextElement,
|
|
1216
|
-
getNextMarker,
|
|
1217
|
-
getNextMatch,
|
|
1218
|
-
getPropAlias,
|
|
1219
|
-
voidFn as getRequestEvent,
|
|
1220
|
-
hydrate,
|
|
1221
|
-
innerHTML,
|
|
1222
|
-
insert,
|
|
1223
|
-
isDev,
|
|
1224
|
-
isServer,
|
|
1225
|
-
render,
|
|
1226
|
-
renderToStream,
|
|
1227
|
-
renderToString,
|
|
1228
|
-
renderToStringAsync,
|
|
1229
|
-
resolveSSRNode,
|
|
1230
|
-
runHydrationEvents,
|
|
1231
|
-
setAttribute,
|
|
1232
|
-
setAttributeNS,
|
|
1233
|
-
setBoolAttribute,
|
|
1234
|
-
setProperty,
|
|
1235
|
-
spread,
|
|
1236
|
-
ssr,
|
|
1237
|
-
ssrAttribute,
|
|
1238
|
-
ssrClassList,
|
|
1239
|
-
ssrElement,
|
|
1240
|
-
ssrHydrationKey,
|
|
1241
|
-
ssrSpread,
|
|
1242
|
-
ssrStyle,
|
|
1243
|
-
style,
|
|
1244
|
-
template,
|
|
1245
|
-
use,
|
|
1246
|
-
voidFn as useAssets
|
|
1247
|
-
};
|
|
700
|
+
export { Aliases, voidFn as Assets, ChildProperties, DOMElements, DelegatedEvents, Dynamic, Hydration, voidFn as HydrationScript, NoHydration, Portal, Properties, RequestContext, SVGElements, SVGNamespace, addEventListener, assign, classList, className, clearDelegatedEvents, createDynamic, delegateEvents, dynamicProperty, escape, voidFn as generateHydrationScript, voidFn as getAssets, getHydrationKey, getNextElement, getNextMarker, getNextMatch, getPropAlias, voidFn as getRequestEvent, hydrate, innerHTML, insert, isDev, isServer, memo, render, renderToStream, renderToString, renderToStringAsync, resolveSSRNode, runHydrationEvents, setAttribute, setAttributeNS, setBoolAttribute, setProperty, spread, ssr, ssrAttribute, ssrClassList, ssrElement, ssrHydrationKey, ssrSpread, ssrStyle, style, template, use, voidFn as useAssets };
|