solid-js 1.9.1 → 1.9.2
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/README.md +1 -1
- package/dist/dev.cjs +1 -1
- package/dist/dev.js +318 -559
- package/dist/server.js +74 -168
- package/dist/solid.cjs +1 -1
- package/dist/solid.js +276 -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 +196 -59
- package/h/types/hyperscript.d.ts +11 -11
- package/html/dist/html.cjs +1 -1
- package/html/dist/html.js +94 -219
- package/html/types/lit.d.ts +33 -52
- package/package.json +1 -1
- 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 +10 -75
- package/types/jsx.d.ts +195 -47
- package/types/reactive/array.d.ts +4 -12
- package/types/reactive/observable.d.ts +17 -25
- package/types/reactive/scheduler.d.ts +6 -9
- package/types/reactive/signal.d.ts +142 -233
- package/types/render/Suspense.d.ts +5 -5
- package/types/render/component.d.ts +35 -71
- 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 +42 -73
- package/types/server/rendering.d.ts +98 -169
- package/universal/dist/dev.js +12 -28
- package/universal/dist/universal.js +12 -28
- package/universal/types/index.d.ts +1 -3
- package/universal/types/universal.d.ts +1 -0
- package/web/dist/dev.cjs +14 -14
- package/web/dist/dev.js +89 -639
- package/web/dist/server.cjs +14 -14
- package/web/dist/server.js +108 -635
- package/web/dist/web.cjs +14 -14
- package/web/dist/web.js +87 -627
- package/web/storage/dist/storage.js +3 -3
- package/web/types/core.d.ts +1 -10
- package/web/types/index.d.ts +10 -27
- package/web/types/server-mock.d.ts +32 -47
package/web/dist/dev.js
CHANGED
|
@@ -1,83 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
createRenderEffect,
|
|
4
|
-
untrack,
|
|
5
|
-
sharedConfig,
|
|
6
|
-
enableHydration,
|
|
7
|
-
getOwner,
|
|
8
|
-
createEffect,
|
|
9
|
-
runWithOwner,
|
|
10
|
-
createMemo,
|
|
11
|
-
createSignal,
|
|
12
|
-
onCleanup,
|
|
13
|
-
splitProps,
|
|
14
|
-
$DEVCOMP
|
|
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 { createRoot, createRenderEffect, untrack, sharedConfig, enableHydration, getOwner, createEffect, runWithOwner, createMemo, createSignal, onCleanup, splitProps, $DEVCOMP } from 'solid-js';
|
|
2
|
+
export { ErrorBoundary, For, Index, Match, Show, Suspense, SuspenseList, Switch, createComponent, createRenderEffect as effect, getOwner, createMemo as memo, 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", "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",
|
|
82
13
|
formnovalidate: {
|
|
83
14
|
$: "formNoValidate",
|
|
@@ -104,396 +35,19 @@ const PropAliases = /*#__PURE__*/ Object.assign(Object.create(null), {
|
|
|
104
35
|
});
|
|
105
36
|
function getPropAlias(prop, tagName) {
|
|
106
37
|
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
|
-
]);
|
|
38
|
+
return typeof a === "object" ? a[tagName] ? a["$"] : undefined : a;
|
|
39
|
+
}
|
|
40
|
+
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"]);
|
|
41
|
+
const SVGElements = /*#__PURE__*/new Set([
|
|
42
|
+
"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",
|
|
43
|
+
"set", "stop",
|
|
44
|
+
"svg", "switch", "symbol", "text", "textPath",
|
|
45
|
+
"tref", "tspan", "use", "view", "vkern"]);
|
|
212
46
|
const SVGNamespace = {
|
|
213
47
|
xlink: "http://www.w3.org/1999/xlink",
|
|
214
48
|
xml: "http://www.w3.org/XML/1998/namespace"
|
|
215
49
|
};
|
|
216
|
-
const DOMElements = /*#__PURE__*/
|
|
217
|
-
"html",
|
|
218
|
-
"base",
|
|
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
|
-
]);
|
|
50
|
+
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"]);
|
|
497
51
|
|
|
498
52
|
function reconcileArrays(parentNode, a, b) {
|
|
499
53
|
let bLength = b.length,
|
|
@@ -514,7 +68,7 @@ function reconcileArrays(parentNode, a, b) {
|
|
|
514
68
|
bEnd--;
|
|
515
69
|
}
|
|
516
70
|
if (aEnd === aStart) {
|
|
517
|
-
const node = bEnd < bLength ?
|
|
71
|
+
const node = bEnd < bLength ? bStart ? b[bStart - 1].nextSibling : b[bEnd - bStart] : after;
|
|
518
72
|
while (bStart < bEnd) parentNode.insertBefore(b[bStart++], node);
|
|
519
73
|
} else if (bEnd === bStart) {
|
|
520
74
|
while (aStart < aEnd) {
|
|
@@ -555,16 +109,12 @@ function reconcileArrays(parentNode, a, b) {
|
|
|
555
109
|
const $$EVENTS = "_$DX_DELEGATE";
|
|
556
110
|
function render(code, element, init, options = {}) {
|
|
557
111
|
if (!element) {
|
|
558
|
-
throw new Error(
|
|
559
|
-
"The `element` passed to `render(..., element)` doesn't exist. Make sure `element` exists in the document."
|
|
560
|
-
);
|
|
112
|
+
throw new Error("The `element` passed to `render(..., element)` doesn't exist. Make sure `element` exists in the document.");
|
|
561
113
|
}
|
|
562
114
|
let disposer;
|
|
563
115
|
createRoot(dispose => {
|
|
564
116
|
disposer = dispose;
|
|
565
|
-
element === document
|
|
566
|
-
? code()
|
|
567
|
-
: insert(element, code(), element.firstChild ? null : undefined, init);
|
|
117
|
+
element === document ? code() : insert(element, code(), element.firstChild ? null : undefined, init);
|
|
568
118
|
}, options.owner);
|
|
569
119
|
return () => {
|
|
570
120
|
disposer();
|
|
@@ -574,17 +124,12 @@ function render(code, element, init, options = {}) {
|
|
|
574
124
|
function template(html, isImportNode, isSVG) {
|
|
575
125
|
let node;
|
|
576
126
|
const create = () => {
|
|
577
|
-
if (isHydrating())
|
|
578
|
-
throw new Error(
|
|
579
|
-
"Failed attempt to create new DOM elements during hydration. Check that the libraries you are using support hydration."
|
|
580
|
-
);
|
|
127
|
+
if (isHydrating()) throw new Error("Failed attempt to create new DOM elements during hydration. Check that the libraries you are using support hydration.");
|
|
581
128
|
const t = document.createElement("template");
|
|
582
129
|
t.innerHTML = html;
|
|
583
130
|
return isSVG ? t.content.firstChild.firstChild : t.content.firstChild;
|
|
584
131
|
};
|
|
585
|
-
const fn = isImportNode
|
|
586
|
-
? () => untrack(() => document.importNode(node || (node = create()), true))
|
|
587
|
-
: () => (node || (node = create())).cloneNode(true);
|
|
132
|
+
const fn = isImportNode ? () => untrack(() => document.importNode(node || (node = create()), true)) : () => (node || (node = create())).cloneNode(true);
|
|
588
133
|
fn.cloneNode = fn;
|
|
589
134
|
return fn;
|
|
590
135
|
}
|
|
@@ -610,13 +155,11 @@ function setProperty(node, name, value) {
|
|
|
610
155
|
}
|
|
611
156
|
function setAttribute(node, name, value) {
|
|
612
157
|
if (isHydrating(node)) return;
|
|
613
|
-
if (value == null) node.removeAttribute(name);
|
|
614
|
-
else node.setAttribute(name, value);
|
|
158
|
+
if (value == null) node.removeAttribute(name);else node.setAttribute(name, value);
|
|
615
159
|
}
|
|
616
160
|
function setAttributeNS(node, namespace, name, value) {
|
|
617
161
|
if (isHydrating(node)) return;
|
|
618
|
-
if (value == null) node.removeAttributeNS(namespace, name);
|
|
619
|
-
else node.setAttributeNS(namespace, name, value);
|
|
162
|
+
if (value == null) node.removeAttributeNS(namespace, name);else node.setAttributeNS(namespace, name, value);
|
|
620
163
|
}
|
|
621
164
|
function setBoolAttribute(node, name, value) {
|
|
622
165
|
if (isHydrating(node)) return;
|
|
@@ -624,8 +167,7 @@ function setBoolAttribute(node, name, value) {
|
|
|
624
167
|
}
|
|
625
168
|
function className(node, value) {
|
|
626
169
|
if (isHydrating(node)) return;
|
|
627
|
-
if (value == null) node.removeAttribute("class");
|
|
628
|
-
else node.className = value;
|
|
170
|
+
if (value == null) node.removeAttribute("class");else node.className = value;
|
|
629
171
|
}
|
|
630
172
|
function addEventListener(node, name, handler, delegate) {
|
|
631
173
|
if (delegate) {
|
|
@@ -635,7 +177,7 @@ function addEventListener(node, name, handler, delegate) {
|
|
|
635
177
|
} else node[`$$${name}`] = handler;
|
|
636
178
|
} else if (Array.isArray(handler)) {
|
|
637
179
|
const handlerFn = handler[0];
|
|
638
|
-
node.addEventListener(name,
|
|
180
|
+
node.addEventListener(name, handler[0] = e => handlerFn.call(node, handler[1], e));
|
|
639
181
|
} else node.addEventListener(name, handler, typeof handler !== "function" && handler);
|
|
640
182
|
}
|
|
641
183
|
function classList(node, value, prev = {}) {
|
|
@@ -660,7 +202,7 @@ function classList(node, value, prev = {}) {
|
|
|
660
202
|
function style(node, value, prev) {
|
|
661
203
|
if (!value) return prev ? setAttribute(node, "style") : value;
|
|
662
204
|
const nodeStyle = node.style;
|
|
663
|
-
if (typeof value === "string") return
|
|
205
|
+
if (typeof value === "string") return nodeStyle.cssText = value;
|
|
664
206
|
typeof prev === "string" && (nodeStyle.cssText = prev = undefined);
|
|
665
207
|
prev || (prev = {});
|
|
666
208
|
value || (value = {});
|
|
@@ -681,9 +223,7 @@ function style(node, value, prev) {
|
|
|
681
223
|
function spread(node, props = {}, isSVG, skipChildren) {
|
|
682
224
|
const prevProps = {};
|
|
683
225
|
if (!skipChildren) {
|
|
684
|
-
createRenderEffect(
|
|
685
|
-
() => (prevProps.children = insertExpression(node, props.children, prevProps.children))
|
|
686
|
-
);
|
|
226
|
+
createRenderEffect(() => prevProps.children = insertExpression(node, props.children, prevProps.children));
|
|
687
227
|
}
|
|
688
228
|
createRenderEffect(() => typeof props.ref === "function" && use(props.ref, node));
|
|
689
229
|
createRenderEffect(() => assign(node, props, isSVG, true, prevProps, true));
|
|
@@ -747,14 +287,10 @@ function getNextElement(template) {
|
|
|
747
287
|
let node,
|
|
748
288
|
key,
|
|
749
289
|
hydrating = isHydrating();
|
|
750
|
-
if (!hydrating || !(node = sharedConfig.registry.get(
|
|
290
|
+
if (!hydrating || !(node = sharedConfig.registry.get(key = getHydrationKey()))) {
|
|
751
291
|
if (hydrating) {
|
|
752
292
|
sharedConfig.done = true;
|
|
753
|
-
throw new Error(
|
|
754
|
-
`Hydration Mismatch. Unable to find DOM nodes for hydration key: ${key}\n${
|
|
755
|
-
template ? template().outerHTML : ""
|
|
756
|
-
}`
|
|
757
|
-
);
|
|
293
|
+
throw new Error(`Hydration Mismatch. Unable to find DOM nodes for hydration key: ${key}\n${template ? template().outerHTML : ""}`);
|
|
758
294
|
}
|
|
759
295
|
return template();
|
|
760
296
|
}
|
|
@@ -774,8 +310,7 @@ function getNextMarker(start) {
|
|
|
774
310
|
while (end) {
|
|
775
311
|
if (end.nodeType === 8) {
|
|
776
312
|
const v = end.nodeValue;
|
|
777
|
-
if (v === "$") count++;
|
|
778
|
-
else if (v === "/") {
|
|
313
|
+
if (v === "$") count++;else if (v === "/") {
|
|
779
314
|
if (count === 0) return [end, current];
|
|
780
315
|
count--;
|
|
781
316
|
}
|
|
@@ -789,7 +324,10 @@ function getNextMarker(start) {
|
|
|
789
324
|
function runHydrationEvents() {
|
|
790
325
|
if (sharedConfig.events && !sharedConfig.events.queued) {
|
|
791
326
|
queueMicrotask(() => {
|
|
792
|
-
const {
|
|
327
|
+
const {
|
|
328
|
+
completed,
|
|
329
|
+
events
|
|
330
|
+
} = sharedConfig;
|
|
793
331
|
if (!events) return;
|
|
794
332
|
events.queued = false;
|
|
795
333
|
while (events.length) {
|
|
@@ -814,8 +352,7 @@ function toPropertyName(name) {
|
|
|
814
352
|
}
|
|
815
353
|
function toggleClassKey(node, key, value) {
|
|
816
354
|
const classNames = key.trim().split(/\s+/);
|
|
817
|
-
for (let i = 0, nameLen = classNames.length; i < nameLen; i++)
|
|
818
|
-
node.classList.toggle(classNames[i], value);
|
|
355
|
+
for (let i = 0, nameLen = classNames.length; i < nameLen; i++) node.classList.toggle(classNames[i], value);
|
|
819
356
|
}
|
|
820
357
|
function assignProp(node, prop, value, prev, isSVG, skipRef, props) {
|
|
821
358
|
let isCE, isProp, isChildProp, propAlias, forceProp;
|
|
@@ -847,24 +384,15 @@ function assignProp(node, prop, value, prev, isSVG, skipRef, props) {
|
|
|
847
384
|
setAttribute(node, prop.slice(5), value);
|
|
848
385
|
} else if (prop.slice(0, 5) === "bool:") {
|
|
849
386
|
setBoolAttribute(node, prop.slice(5), value);
|
|
850
|
-
} else if (
|
|
851
|
-
(forceProp = prop.slice(0, 5) === "prop:") ||
|
|
852
|
-
(isChildProp = ChildProperties.has(prop)) ||
|
|
853
|
-
(!isSVG &&
|
|
854
|
-
((propAlias = getPropAlias(prop, node.tagName)) || (isProp = Properties.has(prop)))) ||
|
|
855
|
-
(isCE = node.nodeName.includes("-") || "is" in props)
|
|
856
|
-
) {
|
|
387
|
+
} 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)) {
|
|
857
388
|
if (forceProp) {
|
|
858
389
|
prop = prop.slice(5);
|
|
859
390
|
isProp = true;
|
|
860
391
|
} else if (isHydrating(node)) return value;
|
|
861
|
-
if (prop === "class" || prop === "className") className(node, value);
|
|
862
|
-
else if (isCE && !isProp && !isChildProp) node[toPropertyName(prop)] = value;
|
|
863
|
-
else node[propAlias || prop] = value;
|
|
392
|
+
if (prop === "class" || prop === "className") className(node, value);else if (isCE && !isProp && !isChildProp) node[toPropertyName(prop)] = value;else node[propAlias || prop] = value;
|
|
864
393
|
} else {
|
|
865
394
|
const ns = isSVG && prop.indexOf(":") > -1 && SVGNamespace[prop.split(":")[0]];
|
|
866
|
-
if (ns) setAttributeNS(node, ns, prop, value);
|
|
867
|
-
else setAttribute(node, Aliases[prop] || prop, value);
|
|
395
|
+
if (ns) setAttributeNS(node, ns, prop, value);else setAttribute(node, Aliases[prop] || prop, value);
|
|
868
396
|
}
|
|
869
397
|
return value;
|
|
870
398
|
}
|
|
@@ -876,11 +404,10 @@ function eventHandler(e) {
|
|
|
876
404
|
const key = `$$${e.type}`;
|
|
877
405
|
const oriTarget = e.target;
|
|
878
406
|
const oriCurrentTarget = e.currentTarget;
|
|
879
|
-
const retarget = value =>
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
});
|
|
407
|
+
const retarget = value => Object.defineProperty(e, "target", {
|
|
408
|
+
configurable: true,
|
|
409
|
+
value
|
|
410
|
+
});
|
|
884
411
|
const handleNode = () => {
|
|
885
412
|
const handler = node[key];
|
|
886
413
|
if (handler && !node.disabled) {
|
|
@@ -888,11 +415,7 @@ function eventHandler(e) {
|
|
|
888
415
|
data !== undefined ? handler.call(node, data, e) : handler.call(node, e);
|
|
889
416
|
if (e.cancelBubble) return;
|
|
890
417
|
}
|
|
891
|
-
node.host &&
|
|
892
|
-
typeof node.host !== "string" &&
|
|
893
|
-
!node.host._$host &&
|
|
894
|
-
node.contains(e.target) &&
|
|
895
|
-
retarget(node.host);
|
|
418
|
+
node.host && typeof node.host !== "string" && !node.host._$host && node.contains(e.target) && retarget(node.host);
|
|
896
419
|
return true;
|
|
897
420
|
};
|
|
898
421
|
const walkUpTree = () => {
|
|
@@ -920,7 +443,8 @@ function eventHandler(e) {
|
|
|
920
443
|
break;
|
|
921
444
|
}
|
|
922
445
|
}
|
|
923
|
-
}
|
|
446
|
+
}
|
|
447
|
+
else walkUpTree();
|
|
924
448
|
retarget(oriTarget);
|
|
925
449
|
}
|
|
926
450
|
function insertExpression(parent, value, current, marker, unwrapArray) {
|
|
@@ -930,8 +454,7 @@ function insertExpression(parent, value, current, marker, unwrapArray) {
|
|
|
930
454
|
let cleaned = [];
|
|
931
455
|
for (let i = 0; i < current.length; i++) {
|
|
932
456
|
const node = current[i];
|
|
933
|
-
if (node.nodeType === 8 && node.data.slice(0, 2) === "!$") node.remove();
|
|
934
|
-
else cleaned.push(node);
|
|
457
|
+
if (node.nodeType === 8 && node.data.slice(0, 2) === "!$") node.remove();else cleaned.push(node);
|
|
935
458
|
}
|
|
936
459
|
current = cleaned;
|
|
937
460
|
}
|
|
@@ -939,7 +462,7 @@ function insertExpression(parent, value, current, marker, unwrapArray) {
|
|
|
939
462
|
if (value === current) return current;
|
|
940
463
|
const t = typeof value,
|
|
941
464
|
multi = marker !== undefined;
|
|
942
|
-
parent =
|
|
465
|
+
parent = multi && current[0] && current[0].parentNode || parent;
|
|
943
466
|
if (t === "string" || t === "number") {
|
|
944
467
|
if (hydrating) return current;
|
|
945
468
|
if (t === "number") {
|
|
@@ -971,17 +494,17 @@ function insertExpression(parent, value, current, marker, unwrapArray) {
|
|
|
971
494
|
const array = [];
|
|
972
495
|
const currentArray = current && Array.isArray(current);
|
|
973
496
|
if (normalizeIncomingArray(array, value, current, unwrapArray)) {
|
|
974
|
-
createRenderEffect(() =>
|
|
497
|
+
createRenderEffect(() => current = insertExpression(parent, array, current, marker, true));
|
|
975
498
|
return () => current;
|
|
976
499
|
}
|
|
977
500
|
if (hydrating) {
|
|
978
501
|
if (!array.length) return current;
|
|
979
|
-
if (marker === undefined) return
|
|
502
|
+
if (marker === undefined) return current = [...parent.childNodes];
|
|
980
503
|
let node = array[0];
|
|
981
504
|
if (node.parentNode !== parent) return current;
|
|
982
505
|
const nodes = [node];
|
|
983
506
|
while ((node = node.nextSibling) !== marker) nodes.push(node);
|
|
984
|
-
return
|
|
507
|
+
return current = nodes;
|
|
985
508
|
}
|
|
986
509
|
if (array.length === 0) {
|
|
987
510
|
current = cleanChildren(parent, current, marker);
|
|
@@ -996,9 +519,9 @@ function insertExpression(parent, value, current, marker, unwrapArray) {
|
|
|
996
519
|
}
|
|
997
520
|
current = array;
|
|
998
521
|
} else if (value.nodeType) {
|
|
999
|
-
if (hydrating && value.parentNode) return
|
|
522
|
+
if (hydrating && value.parentNode) return current = multi ? [value] : value;
|
|
1000
523
|
if (Array.isArray(current)) {
|
|
1001
|
-
if (multi) return
|
|
524
|
+
if (multi) return current = cleanChildren(parent, current, marker, value);
|
|
1002
525
|
cleanChildren(parent, current, null, value);
|
|
1003
526
|
} else if (current == null || current === "" || !parent.firstChild) {
|
|
1004
527
|
parent.appendChild(value);
|
|
@@ -1013,28 +536,21 @@ function normalizeIncomingArray(normalized, array, current, unwrap) {
|
|
|
1013
536
|
let item = array[i],
|
|
1014
537
|
prev = current && current[normalized.length],
|
|
1015
538
|
t;
|
|
1016
|
-
if (item == null || item === true || item === false);
|
|
1017
|
-
else if ((t = typeof item) === "object" && item.nodeType) {
|
|
539
|
+
if (item == null || item === true || item === false) ; else if ((t = typeof item) === "object" && item.nodeType) {
|
|
1018
540
|
normalized.push(item);
|
|
1019
541
|
} else if (Array.isArray(item)) {
|
|
1020
542
|
dynamic = normalizeIncomingArray(normalized, item, prev) || dynamic;
|
|
1021
543
|
} else if (t === "function") {
|
|
1022
544
|
if (unwrap) {
|
|
1023
545
|
while (typeof item === "function") item = item();
|
|
1024
|
-
dynamic =
|
|
1025
|
-
normalizeIncomingArray(
|
|
1026
|
-
normalized,
|
|
1027
|
-
Array.isArray(item) ? item : [item],
|
|
1028
|
-
Array.isArray(prev) ? prev : [prev]
|
|
1029
|
-
) || dynamic;
|
|
546
|
+
dynamic = normalizeIncomingArray(normalized, Array.isArray(item) ? item : [item], Array.isArray(prev) ? prev : [prev]) || dynamic;
|
|
1030
547
|
} else {
|
|
1031
548
|
normalized.push(item);
|
|
1032
549
|
dynamic = true;
|
|
1033
550
|
}
|
|
1034
551
|
} else {
|
|
1035
552
|
const value = String(item);
|
|
1036
|
-
if (prev && prev.nodeType === 3 && prev.data === value) normalized.push(prev);
|
|
1037
|
-
else normalized.push(document.createTextNode(value));
|
|
553
|
+
if (prev && prev.nodeType === 3 && prev.data === value) normalized.push(prev);else normalized.push(document.createTextNode(value));
|
|
1038
554
|
}
|
|
1039
555
|
}
|
|
1040
556
|
return dynamic;
|
|
@@ -1043,7 +559,7 @@ function appendNodes(parent, array, marker = null) {
|
|
|
1043
559
|
for (let i = 0, len = array.length; i < len; i++) parent.insertBefore(array[i], marker);
|
|
1044
560
|
}
|
|
1045
561
|
function cleanChildren(parent, current, marker, replacement) {
|
|
1046
|
-
if (marker === undefined) return
|
|
562
|
+
if (marker === undefined) return parent.textContent = "";
|
|
1047
563
|
const node = replacement || document.createTextNode("");
|
|
1048
564
|
if (current.length) {
|
|
1049
565
|
let inserted = false;
|
|
@@ -1051,9 +567,7 @@ function cleanChildren(parent, current, marker, replacement) {
|
|
|
1051
567
|
const el = current[i];
|
|
1052
568
|
if (node !== el) {
|
|
1053
569
|
const isParent = el.parentNode === parent;
|
|
1054
|
-
if (!inserted && !i)
|
|
1055
|
-
isParent ? parent.replaceChild(node, el) : parent.insertBefore(node, marker);
|
|
1056
|
-
else isParent && el.remove();
|
|
570
|
+
if (!inserted && !i) isParent ? parent.replaceChild(node, el) : parent.insertBefore(node, marker);else isParent && el.remove();
|
|
1057
571
|
} else inserted = true;
|
|
1058
572
|
}
|
|
1059
573
|
} else parent.insertBefore(node, marker);
|
|
@@ -1064,8 +578,7 @@ function gatherHydratable(element, root) {
|
|
|
1064
578
|
for (let i = 0; i < templates.length; i++) {
|
|
1065
579
|
const node = templates[i];
|
|
1066
580
|
const key = node.getAttribute("data-hk");
|
|
1067
|
-
if ((!root || key.startsWith(root)) && !sharedConfig.registry.has(key))
|
|
1068
|
-
sharedConfig.registry.set(key, node);
|
|
581
|
+
if ((!root || key.startsWith(root)) && !sharedConfig.registry.has(key)) sharedConfig.registry.set(key, node);
|
|
1069
582
|
}
|
|
1070
583
|
}
|
|
1071
584
|
function getHydrationKey() {
|
|
@@ -1117,47 +630,42 @@ const hydrate = (...args) => {
|
|
|
1117
630
|
return hydrate$1(...args);
|
|
1118
631
|
};
|
|
1119
632
|
function Portal(props) {
|
|
1120
|
-
const {
|
|
633
|
+
const {
|
|
634
|
+
useShadow
|
|
635
|
+
} = props,
|
|
1121
636
|
marker = document.createTextNode(""),
|
|
1122
637
|
mount = () => props.mount || document.body,
|
|
1123
638
|
owner = getOwner();
|
|
1124
639
|
let content;
|
|
1125
640
|
let hydrating = !!sharedConfig.context;
|
|
1126
|
-
createEffect(
|
|
1127
|
-
()
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
insert(renderRoot, content);
|
|
1151
|
-
el.appendChild(container);
|
|
1152
|
-
props.ref && props.ref(container);
|
|
1153
|
-
onCleanup(() => el.removeChild(container));
|
|
1154
|
-
}
|
|
1155
|
-
},
|
|
1156
|
-
undefined,
|
|
1157
|
-
{
|
|
1158
|
-
render: !hydrating
|
|
641
|
+
createEffect(() => {
|
|
642
|
+
if (hydrating) getOwner().user = hydrating = false;
|
|
643
|
+
content || (content = runWithOwner(owner, () => createMemo(() => props.children)));
|
|
644
|
+
const el = mount();
|
|
645
|
+
if (el instanceof HTMLHeadElement) {
|
|
646
|
+
const [clean, setClean] = createSignal(false);
|
|
647
|
+
const cleanup = () => setClean(true);
|
|
648
|
+
createRoot(dispose => insert(el, () => !clean() ? content() : dispose(), null));
|
|
649
|
+
onCleanup(cleanup);
|
|
650
|
+
} else {
|
|
651
|
+
const container = createElement(props.isSVG ? "g" : "div", props.isSVG),
|
|
652
|
+
renderRoot = useShadow && container.attachShadow ? container.attachShadow({
|
|
653
|
+
mode: "open"
|
|
654
|
+
}) : container;
|
|
655
|
+
Object.defineProperty(container, "_$host", {
|
|
656
|
+
get() {
|
|
657
|
+
return marker.parentNode;
|
|
658
|
+
},
|
|
659
|
+
configurable: true
|
|
660
|
+
});
|
|
661
|
+
insert(renderRoot, content);
|
|
662
|
+
el.appendChild(container);
|
|
663
|
+
props.ref && props.ref(container);
|
|
664
|
+
onCleanup(() => el.removeChild(container));
|
|
1159
665
|
}
|
|
1160
|
-
|
|
666
|
+
}, undefined, {
|
|
667
|
+
render: !hydrating
|
|
668
|
+
});
|
|
1161
669
|
return marker;
|
|
1162
670
|
}
|
|
1163
671
|
function Dynamic(props) {
|
|
@@ -1180,62 +688,4 @@ function Dynamic(props) {
|
|
|
1180
688
|
});
|
|
1181
689
|
}
|
|
1182
690
|
|
|
1183
|
-
export {
|
|
1184
|
-
Aliases,
|
|
1185
|
-
voidFn as Assets,
|
|
1186
|
-
ChildProperties,
|
|
1187
|
-
DOMElements,
|
|
1188
|
-
DelegatedEvents,
|
|
1189
|
-
Dynamic,
|
|
1190
|
-
Hydration,
|
|
1191
|
-
voidFn as HydrationScript,
|
|
1192
|
-
NoHydration,
|
|
1193
|
-
Portal,
|
|
1194
|
-
Properties,
|
|
1195
|
-
RequestContext,
|
|
1196
|
-
SVGElements,
|
|
1197
|
-
SVGNamespace,
|
|
1198
|
-
addEventListener,
|
|
1199
|
-
assign,
|
|
1200
|
-
classList,
|
|
1201
|
-
className,
|
|
1202
|
-
clearDelegatedEvents,
|
|
1203
|
-
delegateEvents,
|
|
1204
|
-
dynamicProperty,
|
|
1205
|
-
escape,
|
|
1206
|
-
voidFn as generateHydrationScript,
|
|
1207
|
-
voidFn as getAssets,
|
|
1208
|
-
getHydrationKey,
|
|
1209
|
-
getNextElement,
|
|
1210
|
-
getNextMarker,
|
|
1211
|
-
getNextMatch,
|
|
1212
|
-
getPropAlias,
|
|
1213
|
-
voidFn as getRequestEvent,
|
|
1214
|
-
hydrate,
|
|
1215
|
-
innerHTML,
|
|
1216
|
-
insert,
|
|
1217
|
-
isDev,
|
|
1218
|
-
isServer,
|
|
1219
|
-
render,
|
|
1220
|
-
renderToStream,
|
|
1221
|
-
renderToString,
|
|
1222
|
-
renderToStringAsync,
|
|
1223
|
-
resolveSSRNode,
|
|
1224
|
-
runHydrationEvents,
|
|
1225
|
-
setAttribute,
|
|
1226
|
-
setAttributeNS,
|
|
1227
|
-
setBoolAttribute,
|
|
1228
|
-
setProperty,
|
|
1229
|
-
spread,
|
|
1230
|
-
ssr,
|
|
1231
|
-
ssrAttribute,
|
|
1232
|
-
ssrClassList,
|
|
1233
|
-
ssrElement,
|
|
1234
|
-
ssrHydrationKey,
|
|
1235
|
-
ssrSpread,
|
|
1236
|
-
ssrStyle,
|
|
1237
|
-
style,
|
|
1238
|
-
template,
|
|
1239
|
-
use,
|
|
1240
|
-
voidFn as useAssets
|
|
1241
|
-
};
|
|
691
|
+
export { Aliases, voidFn as Assets, ChildProperties, DOMElements, DelegatedEvents, Dynamic, Hydration, voidFn as HydrationScript, NoHydration, Portal, Properties, RequestContext, SVGElements, SVGNamespace, addEventListener, assign, classList, className, clearDelegatedEvents, delegateEvents, dynamicProperty, escape, voidFn as generateHydrationScript, voidFn as getAssets, getHydrationKey, getNextElement, getNextMarker, getNextMatch, getPropAlias, voidFn as getRequestEvent, hydrate, innerHTML, insert, isDev, isServer, render, renderToStream, renderToString, renderToStringAsync, resolveSSRNode, runHydrationEvents, setAttribute, setAttributeNS, setBoolAttribute, setProperty, spread, ssr, ssrAttribute, ssrClassList, ssrElement, ssrHydrationKey, ssrSpread, ssrStyle, style, template, use, voidFn as useAssets };
|