solid-js 1.9.6 → 1.9.8
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 +26 -15
- package/dist/dev.js +334 -564
- package/dist/server.cjs +3 -1
- package/dist/server.js +83 -178
- package/dist/solid.cjs +26 -15
- package/dist/solid.js +290 -493
- 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 +246 -234
- package/h/types/hyperscript.d.ts +11 -11
- package/html/dist/html.js +94 -219
- package/html/types/lit.d.ts +33 -52
- package/package.json +3 -3
- package/store/dist/dev.cjs +9 -5
- package/store/dist/dev.js +50 -126
- package/store/dist/server.js +8 -20
- package/store/dist/store.cjs +9 -5
- package/store/dist/store.js +47 -117
- 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 +245 -229
- 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.js +12 -28
- package/universal/dist/universal.js +12 -28
- package/universal/types/index.d.ts +2 -3
- package/universal/types/universal.d.ts +3 -2
- package/web/dist/dev.cjs +89 -6
- package/web/dist/dev.js +174 -646
- package/web/dist/server.cjs +90 -5
- package/web/dist/server.js +194 -647
- package/web/dist/web.cjs +89 -6
- package/web/dist/web.js +172 -634
- package/web/storage/dist/storage.js +3 -3
- package/web/types/core.d.ts +1 -9
- package/web/types/index.d.ts +11 -31
- package/web/types/server-mock.d.ts +32 -47
package/web/dist/dev.js
CHANGED
|
@@ -1,83 +1,33 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
createRoot,
|
|
4
|
-
createRenderEffect,
|
|
5
|
-
untrack,
|
|
6
|
-
sharedConfig,
|
|
7
|
-
enableHydration,
|
|
8
|
-
getOwner,
|
|
9
|
-
createEffect,
|
|
10
|
-
runWithOwner,
|
|
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
|
-
mergeProps,
|
|
29
|
-
untrack
|
|
30
|
-
} 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';
|
|
31
3
|
|
|
32
|
-
const booleans = [
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
"inert",
|
|
45
|
-
"ismap",
|
|
46
|
-
"loop",
|
|
47
|
-
"multiple",
|
|
48
|
-
"muted",
|
|
49
|
-
"nomodule",
|
|
50
|
-
"novalidate",
|
|
51
|
-
"open",
|
|
52
|
-
"playsinline",
|
|
53
|
-
"readonly",
|
|
54
|
-
"required",
|
|
55
|
-
"reversed",
|
|
56
|
-
"seamless",
|
|
57
|
-
"selected"
|
|
4
|
+
const booleans = ["allowfullscreen", "async", "alpha",
|
|
5
|
+
"autofocus",
|
|
6
|
+
"autoplay", "checked", "controls", "default", "disabled", "formnovalidate", "hidden",
|
|
7
|
+
"indeterminate", "inert",
|
|
8
|
+
"ismap", "loop", "multiple", "muted", "nomodule", "novalidate", "open", "playsinline", "readonly", "required", "reversed", "seamless",
|
|
9
|
+
"selected", "adauctionheaders",
|
|
10
|
+
"browsingtopics",
|
|
11
|
+
"credentialless",
|
|
12
|
+
"defaultchecked", "defaultmuted", "defaultselected", "defer", "disablepictureinpicture", "disableremoteplayback", "preservespitch",
|
|
13
|
+
"shadowrootclonable", "shadowrootcustomelementregistry",
|
|
14
|
+
"shadowrootdelegatesfocus", "shadowrootserializable",
|
|
15
|
+
"sharedstoragewritable"
|
|
58
16
|
];
|
|
59
|
-
const Properties = /*#__PURE__*/
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
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), {
|
|
17
|
+
const Properties = /*#__PURE__*/new Set([
|
|
18
|
+
"className", "value",
|
|
19
|
+
"readOnly", "noValidate", "formNoValidate", "isMap", "noModule", "playsInline", "adAuctionHeaders",
|
|
20
|
+
"allowFullscreen", "browsingTopics",
|
|
21
|
+
"defaultChecked", "defaultMuted", "defaultSelected", "disablePictureInPicture", "disableRemotePlayback", "preservesPitch", "shadowRootClonable", "shadowRootCustomElementRegistry",
|
|
22
|
+
"shadowRootDelegatesFocus", "shadowRootSerializable",
|
|
23
|
+
"sharedStorageWritable",
|
|
24
|
+
...booleans]);
|
|
25
|
+
const ChildProperties = /*#__PURE__*/new Set(["innerHTML", "textContent", "innerText", "children"]);
|
|
26
|
+
const Aliases = /*#__PURE__*/Object.assign(Object.create(null), {
|
|
77
27
|
className: "class",
|
|
78
28
|
htmlFor: "for"
|
|
79
29
|
});
|
|
80
|
-
const PropAliases = /*#__PURE__*/
|
|
30
|
+
const PropAliases = /*#__PURE__*/Object.assign(Object.create(null), {
|
|
81
31
|
class: "className",
|
|
82
32
|
novalidate: {
|
|
83
33
|
$: "noValidate",
|
|
@@ -104,400 +54,81 @@ const PropAliases = /*#__PURE__*/ Object.assign(Object.create(null), {
|
|
|
104
54
|
$: "readOnly",
|
|
105
55
|
INPUT: 1,
|
|
106
56
|
TEXTAREA: 1
|
|
57
|
+
},
|
|
58
|
+
adauctionheaders: {
|
|
59
|
+
$: "adAuctionHeaders",
|
|
60
|
+
IFRAME: 1
|
|
61
|
+
},
|
|
62
|
+
allowfullscreen: {
|
|
63
|
+
$: "allowFullscreen",
|
|
64
|
+
IFRAME: 1
|
|
65
|
+
},
|
|
66
|
+
browsingtopics: {
|
|
67
|
+
$: "browsingTopics",
|
|
68
|
+
IMG: 1
|
|
69
|
+
},
|
|
70
|
+
defaultchecked: {
|
|
71
|
+
$: "defaultChecked",
|
|
72
|
+
INPUT: 1
|
|
73
|
+
},
|
|
74
|
+
defaultmuted: {
|
|
75
|
+
$: "defaultMuted",
|
|
76
|
+
AUDIO: 1,
|
|
77
|
+
VIDEO: 1
|
|
78
|
+
},
|
|
79
|
+
defaultselected: {
|
|
80
|
+
$: "defaultSelected",
|
|
81
|
+
OPTION: 1
|
|
82
|
+
},
|
|
83
|
+
disablepictureinpicture: {
|
|
84
|
+
$: "disablePictureInPicture",
|
|
85
|
+
VIDEO: 1
|
|
86
|
+
},
|
|
87
|
+
disableremoteplayback: {
|
|
88
|
+
$: "disableRemotePlayback",
|
|
89
|
+
AUDIO: 1,
|
|
90
|
+
VIDEO: 1
|
|
91
|
+
},
|
|
92
|
+
preservespitch: {
|
|
93
|
+
$: "preservesPitch",
|
|
94
|
+
AUDIO: 1,
|
|
95
|
+
VIDEO: 1
|
|
96
|
+
},
|
|
97
|
+
shadowrootclonable: {
|
|
98
|
+
$: "shadowRootClonable",
|
|
99
|
+
TEMPLATE: 1
|
|
100
|
+
},
|
|
101
|
+
shadowrootdelegatesfocus: {
|
|
102
|
+
$: "shadowRootDelegatesFocus",
|
|
103
|
+
TEMPLATE: 1
|
|
104
|
+
},
|
|
105
|
+
shadowrootserializable: {
|
|
106
|
+
$: "shadowRootSerializable",
|
|
107
|
+
TEMPLATE: 1
|
|
108
|
+
},
|
|
109
|
+
sharedstoragewritable: {
|
|
110
|
+
$: "sharedStorageWritable",
|
|
111
|
+
IFRAME: 1,
|
|
112
|
+
IMG: 1
|
|
107
113
|
}
|
|
108
114
|
});
|
|
109
115
|
function getPropAlias(prop, tagName) {
|
|
110
116
|
const a = PropAliases[prop];
|
|
111
|
-
return typeof a === "object" ?
|
|
112
|
-
}
|
|
113
|
-
const DelegatedEvents = /*#__PURE__*/
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
"focusout",
|
|
120
|
-
"input",
|
|
121
|
-
"keydown",
|
|
122
|
-
"keyup",
|
|
123
|
-
"mousedown",
|
|
124
|
-
"mousemove",
|
|
125
|
-
"mouseout",
|
|
126
|
-
"mouseover",
|
|
127
|
-
"mouseup",
|
|
128
|
-
"pointerdown",
|
|
129
|
-
"pointermove",
|
|
130
|
-
"pointerout",
|
|
131
|
-
"pointerover",
|
|
132
|
-
"pointerup",
|
|
133
|
-
"touchend",
|
|
134
|
-
"touchmove",
|
|
135
|
-
"touchstart"
|
|
136
|
-
]);
|
|
137
|
-
const SVGElements = /*#__PURE__*/ new Set([
|
|
138
|
-
"altGlyph",
|
|
139
|
-
"altGlyphDef",
|
|
140
|
-
"altGlyphItem",
|
|
141
|
-
"animate",
|
|
142
|
-
"animateColor",
|
|
143
|
-
"animateMotion",
|
|
144
|
-
"animateTransform",
|
|
145
|
-
"circle",
|
|
146
|
-
"clipPath",
|
|
147
|
-
"color-profile",
|
|
148
|
-
"cursor",
|
|
149
|
-
"defs",
|
|
150
|
-
"desc",
|
|
151
|
-
"ellipse",
|
|
152
|
-
"feBlend",
|
|
153
|
-
"feColorMatrix",
|
|
154
|
-
"feComponentTransfer",
|
|
155
|
-
"feComposite",
|
|
156
|
-
"feConvolveMatrix",
|
|
157
|
-
"feDiffuseLighting",
|
|
158
|
-
"feDisplacementMap",
|
|
159
|
-
"feDistantLight",
|
|
160
|
-
"feDropShadow",
|
|
161
|
-
"feFlood",
|
|
162
|
-
"feFuncA",
|
|
163
|
-
"feFuncB",
|
|
164
|
-
"feFuncG",
|
|
165
|
-
"feFuncR",
|
|
166
|
-
"feGaussianBlur",
|
|
167
|
-
"feImage",
|
|
168
|
-
"feMerge",
|
|
169
|
-
"feMergeNode",
|
|
170
|
-
"feMorphology",
|
|
171
|
-
"feOffset",
|
|
172
|
-
"fePointLight",
|
|
173
|
-
"feSpecularLighting",
|
|
174
|
-
"feSpotLight",
|
|
175
|
-
"feTile",
|
|
176
|
-
"feTurbulence",
|
|
177
|
-
"filter",
|
|
178
|
-
"font",
|
|
179
|
-
"font-face",
|
|
180
|
-
"font-face-format",
|
|
181
|
-
"font-face-name",
|
|
182
|
-
"font-face-src",
|
|
183
|
-
"font-face-uri",
|
|
184
|
-
"foreignObject",
|
|
185
|
-
"g",
|
|
186
|
-
"glyph",
|
|
187
|
-
"glyphRef",
|
|
188
|
-
"hkern",
|
|
189
|
-
"image",
|
|
190
|
-
"line",
|
|
191
|
-
"linearGradient",
|
|
192
|
-
"marker",
|
|
193
|
-
"mask",
|
|
194
|
-
"metadata",
|
|
195
|
-
"missing-glyph",
|
|
196
|
-
"mpath",
|
|
197
|
-
"path",
|
|
198
|
-
"pattern",
|
|
199
|
-
"polygon",
|
|
200
|
-
"polyline",
|
|
201
|
-
"radialGradient",
|
|
202
|
-
"rect",
|
|
203
|
-
"set",
|
|
204
|
-
"stop",
|
|
205
|
-
"svg",
|
|
206
|
-
"switch",
|
|
207
|
-
"symbol",
|
|
208
|
-
"text",
|
|
209
|
-
"textPath",
|
|
210
|
-
"tref",
|
|
211
|
-
"tspan",
|
|
212
|
-
"use",
|
|
213
|
-
"view",
|
|
214
|
-
"vkern"
|
|
215
|
-
]);
|
|
117
|
+
return typeof a === "object" ? a[tagName] ? a["$"] : undefined : a;
|
|
118
|
+
}
|
|
119
|
+
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"]);
|
|
120
|
+
const SVGElements = /*#__PURE__*/new Set([
|
|
121
|
+
"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",
|
|
122
|
+
"set", "stop",
|
|
123
|
+
"svg", "switch", "symbol", "text", "textPath",
|
|
124
|
+
"tref", "tspan", "use", "view", "vkern"]);
|
|
216
125
|
const SVGNamespace = {
|
|
217
126
|
xlink: "http://www.w3.org/1999/xlink",
|
|
218
127
|
xml: "http://www.w3.org/XML/1998/namespace"
|
|
219
128
|
};
|
|
220
|
-
const DOMElements = /*#__PURE__*/
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
"head",
|
|
224
|
-
"link",
|
|
225
|
-
"meta",
|
|
226
|
-
"style",
|
|
227
|
-
"title",
|
|
228
|
-
"body",
|
|
229
|
-
"address",
|
|
230
|
-
"article",
|
|
231
|
-
"aside",
|
|
232
|
-
"footer",
|
|
233
|
-
"header",
|
|
234
|
-
"main",
|
|
235
|
-
"nav",
|
|
236
|
-
"section",
|
|
237
|
-
"body",
|
|
238
|
-
"blockquote",
|
|
239
|
-
"dd",
|
|
240
|
-
"div",
|
|
241
|
-
"dl",
|
|
242
|
-
"dt",
|
|
243
|
-
"figcaption",
|
|
244
|
-
"figure",
|
|
245
|
-
"hr",
|
|
246
|
-
"li",
|
|
247
|
-
"ol",
|
|
248
|
-
"p",
|
|
249
|
-
"pre",
|
|
250
|
-
"ul",
|
|
251
|
-
"a",
|
|
252
|
-
"abbr",
|
|
253
|
-
"b",
|
|
254
|
-
"bdi",
|
|
255
|
-
"bdo",
|
|
256
|
-
"br",
|
|
257
|
-
"cite",
|
|
258
|
-
"code",
|
|
259
|
-
"data",
|
|
260
|
-
"dfn",
|
|
261
|
-
"em",
|
|
262
|
-
"i",
|
|
263
|
-
"kbd",
|
|
264
|
-
"mark",
|
|
265
|
-
"q",
|
|
266
|
-
"rp",
|
|
267
|
-
"rt",
|
|
268
|
-
"ruby",
|
|
269
|
-
"s",
|
|
270
|
-
"samp",
|
|
271
|
-
"small",
|
|
272
|
-
"span",
|
|
273
|
-
"strong",
|
|
274
|
-
"sub",
|
|
275
|
-
"sup",
|
|
276
|
-
"time",
|
|
277
|
-
"u",
|
|
278
|
-
"var",
|
|
279
|
-
"wbr",
|
|
280
|
-
"area",
|
|
281
|
-
"audio",
|
|
282
|
-
"img",
|
|
283
|
-
"map",
|
|
284
|
-
"track",
|
|
285
|
-
"video",
|
|
286
|
-
"embed",
|
|
287
|
-
"iframe",
|
|
288
|
-
"object",
|
|
289
|
-
"param",
|
|
290
|
-
"picture",
|
|
291
|
-
"portal",
|
|
292
|
-
"source",
|
|
293
|
-
"svg",
|
|
294
|
-
"math",
|
|
295
|
-
"canvas",
|
|
296
|
-
"noscript",
|
|
297
|
-
"script",
|
|
298
|
-
"del",
|
|
299
|
-
"ins",
|
|
300
|
-
"caption",
|
|
301
|
-
"col",
|
|
302
|
-
"colgroup",
|
|
303
|
-
"table",
|
|
304
|
-
"tbody",
|
|
305
|
-
"td",
|
|
306
|
-
"tfoot",
|
|
307
|
-
"th",
|
|
308
|
-
"thead",
|
|
309
|
-
"tr",
|
|
310
|
-
"button",
|
|
311
|
-
"datalist",
|
|
312
|
-
"fieldset",
|
|
313
|
-
"form",
|
|
314
|
-
"input",
|
|
315
|
-
"label",
|
|
316
|
-
"legend",
|
|
317
|
-
"meter",
|
|
318
|
-
"optgroup",
|
|
319
|
-
"option",
|
|
320
|
-
"output",
|
|
321
|
-
"progress",
|
|
322
|
-
"select",
|
|
323
|
-
"textarea",
|
|
324
|
-
"details",
|
|
325
|
-
"dialog",
|
|
326
|
-
"menu",
|
|
327
|
-
"summary",
|
|
328
|
-
"details",
|
|
329
|
-
"slot",
|
|
330
|
-
"template",
|
|
331
|
-
"acronym",
|
|
332
|
-
"applet",
|
|
333
|
-
"basefont",
|
|
334
|
-
"bgsound",
|
|
335
|
-
"big",
|
|
336
|
-
"blink",
|
|
337
|
-
"center",
|
|
338
|
-
"content",
|
|
339
|
-
"dir",
|
|
340
|
-
"font",
|
|
341
|
-
"frame",
|
|
342
|
-
"frameset",
|
|
343
|
-
"hgroup",
|
|
344
|
-
"image",
|
|
345
|
-
"keygen",
|
|
346
|
-
"marquee",
|
|
347
|
-
"menuitem",
|
|
348
|
-
"nobr",
|
|
349
|
-
"noembed",
|
|
350
|
-
"noframes",
|
|
351
|
-
"plaintext",
|
|
352
|
-
"rb",
|
|
353
|
-
"rtc",
|
|
354
|
-
"shadow",
|
|
355
|
-
"spacer",
|
|
356
|
-
"strike",
|
|
357
|
-
"tt",
|
|
358
|
-
"xmp",
|
|
359
|
-
"a",
|
|
360
|
-
"abbr",
|
|
361
|
-
"acronym",
|
|
362
|
-
"address",
|
|
363
|
-
"applet",
|
|
364
|
-
"area",
|
|
365
|
-
"article",
|
|
366
|
-
"aside",
|
|
367
|
-
"audio",
|
|
368
|
-
"b",
|
|
369
|
-
"base",
|
|
370
|
-
"basefont",
|
|
371
|
-
"bdi",
|
|
372
|
-
"bdo",
|
|
373
|
-
"bgsound",
|
|
374
|
-
"big",
|
|
375
|
-
"blink",
|
|
376
|
-
"blockquote",
|
|
377
|
-
"body",
|
|
378
|
-
"br",
|
|
379
|
-
"button",
|
|
380
|
-
"canvas",
|
|
381
|
-
"caption",
|
|
382
|
-
"center",
|
|
383
|
-
"cite",
|
|
384
|
-
"code",
|
|
385
|
-
"col",
|
|
386
|
-
"colgroup",
|
|
387
|
-
"content",
|
|
388
|
-
"data",
|
|
389
|
-
"datalist",
|
|
390
|
-
"dd",
|
|
391
|
-
"del",
|
|
392
|
-
"details",
|
|
393
|
-
"dfn",
|
|
394
|
-
"dialog",
|
|
395
|
-
"dir",
|
|
396
|
-
"div",
|
|
397
|
-
"dl",
|
|
398
|
-
"dt",
|
|
399
|
-
"em",
|
|
400
|
-
"embed",
|
|
401
|
-
"fieldset",
|
|
402
|
-
"figcaption",
|
|
403
|
-
"figure",
|
|
404
|
-
"font",
|
|
405
|
-
"footer",
|
|
406
|
-
"form",
|
|
407
|
-
"frame",
|
|
408
|
-
"frameset",
|
|
409
|
-
"head",
|
|
410
|
-
"header",
|
|
411
|
-
"hgroup",
|
|
412
|
-
"hr",
|
|
413
|
-
"html",
|
|
414
|
-
"i",
|
|
415
|
-
"iframe",
|
|
416
|
-
"image",
|
|
417
|
-
"img",
|
|
418
|
-
"input",
|
|
419
|
-
"ins",
|
|
420
|
-
"kbd",
|
|
421
|
-
"keygen",
|
|
422
|
-
"label",
|
|
423
|
-
"legend",
|
|
424
|
-
"li",
|
|
425
|
-
"link",
|
|
426
|
-
"main",
|
|
427
|
-
"map",
|
|
428
|
-
"mark",
|
|
429
|
-
"marquee",
|
|
430
|
-
"menu",
|
|
431
|
-
"menuitem",
|
|
432
|
-
"meta",
|
|
433
|
-
"meter",
|
|
434
|
-
"nav",
|
|
435
|
-
"nobr",
|
|
436
|
-
"noembed",
|
|
437
|
-
"noframes",
|
|
438
|
-
"noscript",
|
|
439
|
-
"object",
|
|
440
|
-
"ol",
|
|
441
|
-
"optgroup",
|
|
442
|
-
"option",
|
|
443
|
-
"output",
|
|
444
|
-
"p",
|
|
445
|
-
"param",
|
|
446
|
-
"picture",
|
|
447
|
-
"plaintext",
|
|
448
|
-
"portal",
|
|
449
|
-
"pre",
|
|
450
|
-
"progress",
|
|
451
|
-
"q",
|
|
452
|
-
"rb",
|
|
453
|
-
"rp",
|
|
454
|
-
"rt",
|
|
455
|
-
"rtc",
|
|
456
|
-
"ruby",
|
|
457
|
-
"s",
|
|
458
|
-
"samp",
|
|
459
|
-
"script",
|
|
460
|
-
"section",
|
|
461
|
-
"select",
|
|
462
|
-
"shadow",
|
|
463
|
-
"slot",
|
|
464
|
-
"small",
|
|
465
|
-
"source",
|
|
466
|
-
"spacer",
|
|
467
|
-
"span",
|
|
468
|
-
"strike",
|
|
469
|
-
"strong",
|
|
470
|
-
"style",
|
|
471
|
-
"sub",
|
|
472
|
-
"summary",
|
|
473
|
-
"sup",
|
|
474
|
-
"table",
|
|
475
|
-
"tbody",
|
|
476
|
-
"td",
|
|
477
|
-
"template",
|
|
478
|
-
"textarea",
|
|
479
|
-
"tfoot",
|
|
480
|
-
"th",
|
|
481
|
-
"thead",
|
|
482
|
-
"time",
|
|
483
|
-
"title",
|
|
484
|
-
"tr",
|
|
485
|
-
"track",
|
|
486
|
-
"tt",
|
|
487
|
-
"u",
|
|
488
|
-
"ul",
|
|
489
|
-
"var",
|
|
490
|
-
"video",
|
|
491
|
-
"wbr",
|
|
492
|
-
"xmp",
|
|
493
|
-
"input",
|
|
494
|
-
"h1",
|
|
495
|
-
"h2",
|
|
496
|
-
"h3",
|
|
497
|
-
"h4",
|
|
498
|
-
"h5",
|
|
499
|
-
"h6"
|
|
500
|
-
]);
|
|
129
|
+
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",
|
|
130
|
+
"webview",
|
|
131
|
+
"isindex", "listing", "multicol", "nextid", "noindex", "search"]);
|
|
501
132
|
|
|
502
133
|
const memo = fn => createMemo(() => fn());
|
|
503
134
|
|
|
@@ -520,7 +151,7 @@ function reconcileArrays(parentNode, a, b) {
|
|
|
520
151
|
bEnd--;
|
|
521
152
|
}
|
|
522
153
|
if (aEnd === aStart) {
|
|
523
|
-
const node = bEnd < bLength ?
|
|
154
|
+
const node = bEnd < bLength ? bStart ? b[bStart - 1].nextSibling : b[bEnd - bStart] : after;
|
|
524
155
|
while (bStart < bEnd) parentNode.insertBefore(b[bStart++], node);
|
|
525
156
|
} else if (bEnd === bStart) {
|
|
526
157
|
while (aStart < aEnd) {
|
|
@@ -561,16 +192,12 @@ function reconcileArrays(parentNode, a, b) {
|
|
|
561
192
|
const $$EVENTS = "_$DX_DELEGATE";
|
|
562
193
|
function render(code, element, init, options = {}) {
|
|
563
194
|
if (!element) {
|
|
564
|
-
throw new Error(
|
|
565
|
-
"The `element` passed to `render(..., element)` doesn't exist. Make sure `element` exists in the document."
|
|
566
|
-
);
|
|
195
|
+
throw new Error("The `element` passed to `render(..., element)` doesn't exist. Make sure `element` exists in the document.");
|
|
567
196
|
}
|
|
568
197
|
let disposer;
|
|
569
198
|
createRoot(dispose => {
|
|
570
199
|
disposer = dispose;
|
|
571
|
-
element === document
|
|
572
|
-
? code()
|
|
573
|
-
: insert(element, code(), element.firstChild ? null : undefined, init);
|
|
200
|
+
element === document ? code() : insert(element, code(), element.firstChild ? null : undefined, init);
|
|
574
201
|
}, options.owner);
|
|
575
202
|
return () => {
|
|
576
203
|
disposer();
|
|
@@ -580,19 +207,12 @@ function render(code, element, init, options = {}) {
|
|
|
580
207
|
function template(html, isImportNode, isSVG, isMathML) {
|
|
581
208
|
let node;
|
|
582
209
|
const create = () => {
|
|
583
|
-
if (isHydrating())
|
|
584
|
-
|
|
585
|
-
"Failed attempt to create new DOM elements during hydration. Check that the libraries you are using support hydration."
|
|
586
|
-
);
|
|
587
|
-
const t = isMathML
|
|
588
|
-
? document.createElementNS("http://www.w3.org/1998/Math/MathML", "template")
|
|
589
|
-
: document.createElement("template");
|
|
210
|
+
if (isHydrating()) throw new Error("Failed attempt to create new DOM elements during hydration. Check that the libraries you are using support hydration.");
|
|
211
|
+
const t = isMathML ? document.createElementNS("http://www.w3.org/1998/Math/MathML", "template") : document.createElement("template");
|
|
590
212
|
t.innerHTML = html;
|
|
591
213
|
return isSVG ? t.content.firstChild.firstChild : isMathML ? t.firstChild : t.content.firstChild;
|
|
592
214
|
};
|
|
593
|
-
const fn = isImportNode
|
|
594
|
-
? () => untrack(() => document.importNode(node || (node = create()), true))
|
|
595
|
-
: () => (node || (node = create())).cloneNode(true);
|
|
215
|
+
const fn = isImportNode ? () => untrack(() => document.importNode(node || (node = create()), true)) : () => (node || (node = create())).cloneNode(true);
|
|
596
216
|
fn.cloneNode = fn;
|
|
597
217
|
return fn;
|
|
598
218
|
}
|
|
@@ -618,13 +238,11 @@ function setProperty(node, name, value) {
|
|
|
618
238
|
}
|
|
619
239
|
function setAttribute(node, name, value) {
|
|
620
240
|
if (isHydrating(node)) return;
|
|
621
|
-
if (value == null) node.removeAttribute(name);
|
|
622
|
-
else node.setAttribute(name, value);
|
|
241
|
+
if (value == null) node.removeAttribute(name);else node.setAttribute(name, value);
|
|
623
242
|
}
|
|
624
243
|
function setAttributeNS(node, namespace, name, value) {
|
|
625
244
|
if (isHydrating(node)) return;
|
|
626
|
-
if (value == null) node.removeAttributeNS(namespace, name);
|
|
627
|
-
else node.setAttributeNS(namespace, name, value);
|
|
245
|
+
if (value == null) node.removeAttributeNS(namespace, name);else node.setAttributeNS(namespace, name, value);
|
|
628
246
|
}
|
|
629
247
|
function setBoolAttribute(node, name, value) {
|
|
630
248
|
if (isHydrating(node)) return;
|
|
@@ -632,8 +250,7 @@ function setBoolAttribute(node, name, value) {
|
|
|
632
250
|
}
|
|
633
251
|
function className(node, value) {
|
|
634
252
|
if (isHydrating(node)) return;
|
|
635
|
-
if (value == null) node.removeAttribute("class");
|
|
636
|
-
else node.className = value;
|
|
253
|
+
if (value == null) node.removeAttribute("class");else node.className = value;
|
|
637
254
|
}
|
|
638
255
|
function addEventListener(node, name, handler, delegate) {
|
|
639
256
|
if (delegate) {
|
|
@@ -643,7 +260,7 @@ function addEventListener(node, name, handler, delegate) {
|
|
|
643
260
|
} else node[`$$${name}`] = handler;
|
|
644
261
|
} else if (Array.isArray(handler)) {
|
|
645
262
|
const handlerFn = handler[0];
|
|
646
|
-
node.addEventListener(name,
|
|
263
|
+
node.addEventListener(name, handler[0] = e => handlerFn.call(node, handler[1], e));
|
|
647
264
|
} else node.addEventListener(name, handler, typeof handler !== "function" && handler);
|
|
648
265
|
}
|
|
649
266
|
function classList(node, value, prev = {}) {
|
|
@@ -668,7 +285,7 @@ function classList(node, value, prev = {}) {
|
|
|
668
285
|
function style(node, value, prev) {
|
|
669
286
|
if (!value) return prev ? setAttribute(node, "style") : value;
|
|
670
287
|
const nodeStyle = node.style;
|
|
671
|
-
if (typeof value === "string") return
|
|
288
|
+
if (typeof value === "string") return nodeStyle.cssText = value;
|
|
672
289
|
typeof prev === "string" && (nodeStyle.cssText = prev = undefined);
|
|
673
290
|
prev || (prev = {});
|
|
674
291
|
value || (value = {});
|
|
@@ -686,12 +303,13 @@ function style(node, value, prev) {
|
|
|
686
303
|
}
|
|
687
304
|
return prev;
|
|
688
305
|
}
|
|
306
|
+
function setStyleProperty(node, name, value) {
|
|
307
|
+
value != null ? node.style.setProperty(name, value) : node.style.removeProperty(name);
|
|
308
|
+
}
|
|
689
309
|
function spread(node, props = {}, isSVG, skipChildren) {
|
|
690
310
|
const prevProps = {};
|
|
691
311
|
if (!skipChildren) {
|
|
692
|
-
createRenderEffect(
|
|
693
|
-
() => (prevProps.children = insertExpression(node, props.children, prevProps.children))
|
|
694
|
-
);
|
|
312
|
+
createRenderEffect(() => prevProps.children = insertExpression(node, props.children, prevProps.children));
|
|
695
313
|
}
|
|
696
314
|
createRenderEffect(() => typeof props.ref === "function" && use(props.ref, node));
|
|
697
315
|
createRenderEffect(() => assign(node, props, isSVG, true, prevProps, true));
|
|
@@ -755,14 +373,10 @@ function getNextElement(template) {
|
|
|
755
373
|
let node,
|
|
756
374
|
key,
|
|
757
375
|
hydrating = isHydrating();
|
|
758
|
-
if (!hydrating || !(node = sharedConfig.registry.get(
|
|
376
|
+
if (!hydrating || !(node = sharedConfig.registry.get(key = getHydrationKey()))) {
|
|
759
377
|
if (hydrating) {
|
|
760
378
|
sharedConfig.done = true;
|
|
761
|
-
throw new Error(
|
|
762
|
-
`Hydration Mismatch. Unable to find DOM nodes for hydration key: ${key}\n${
|
|
763
|
-
template ? template().outerHTML : ""
|
|
764
|
-
}`
|
|
765
|
-
);
|
|
379
|
+
throw new Error(`Hydration Mismatch. Unable to find DOM nodes for hydration key: ${key}\n${template ? template().outerHTML : ""}`);
|
|
766
380
|
}
|
|
767
381
|
return template();
|
|
768
382
|
}
|
|
@@ -782,8 +396,7 @@ function getNextMarker(start) {
|
|
|
782
396
|
while (end) {
|
|
783
397
|
if (end.nodeType === 8) {
|
|
784
398
|
const v = end.nodeValue;
|
|
785
|
-
if (v === "$") count++;
|
|
786
|
-
else if (v === "/") {
|
|
399
|
+
if (v === "$") count++;else if (v === "/") {
|
|
787
400
|
if (count === 0) return [end, current];
|
|
788
401
|
count--;
|
|
789
402
|
}
|
|
@@ -797,7 +410,10 @@ function getNextMarker(start) {
|
|
|
797
410
|
function runHydrationEvents() {
|
|
798
411
|
if (sharedConfig.events && !sharedConfig.events.queued) {
|
|
799
412
|
queueMicrotask(() => {
|
|
800
|
-
const {
|
|
413
|
+
const {
|
|
414
|
+
completed,
|
|
415
|
+
events
|
|
416
|
+
} = sharedConfig;
|
|
801
417
|
if (!events) return;
|
|
802
418
|
events.queued = false;
|
|
803
419
|
while (events.length) {
|
|
@@ -822,8 +438,7 @@ function toPropertyName(name) {
|
|
|
822
438
|
}
|
|
823
439
|
function toggleClassKey(node, key, value) {
|
|
824
440
|
const classNames = key.trim().split(/\s+/);
|
|
825
|
-
for (let i = 0, nameLen = classNames.length; i < nameLen; i++)
|
|
826
|
-
node.classList.toggle(classNames[i], value);
|
|
441
|
+
for (let i = 0, nameLen = classNames.length; i < nameLen; i++) node.classList.toggle(classNames[i], value);
|
|
827
442
|
}
|
|
828
443
|
function assignProp(node, prop, value, prev, isSVG, skipRef, props) {
|
|
829
444
|
let isCE, isProp, isChildProp, propAlias, forceProp;
|
|
@@ -855,24 +470,15 @@ function assignProp(node, prop, value, prev, isSVG, skipRef, props) {
|
|
|
855
470
|
setAttribute(node, prop.slice(5), value);
|
|
856
471
|
} else if (prop.slice(0, 5) === "bool:") {
|
|
857
472
|
setBoolAttribute(node, prop.slice(5), value);
|
|
858
|
-
} else if (
|
|
859
|
-
(forceProp = prop.slice(0, 5) === "prop:") ||
|
|
860
|
-
(isChildProp = ChildProperties.has(prop)) ||
|
|
861
|
-
(!isSVG &&
|
|
862
|
-
((propAlias = getPropAlias(prop, node.tagName)) || (isProp = Properties.has(prop)))) ||
|
|
863
|
-
(isCE = node.nodeName.includes("-") || "is" in props)
|
|
864
|
-
) {
|
|
473
|
+
} 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)) {
|
|
865
474
|
if (forceProp) {
|
|
866
475
|
prop = prop.slice(5);
|
|
867
476
|
isProp = true;
|
|
868
477
|
} else if (isHydrating(node)) return value;
|
|
869
|
-
if (prop === "class" || prop === "className") className(node, value);
|
|
870
|
-
else if (isCE && !isProp && !isChildProp) node[toPropertyName(prop)] = value;
|
|
871
|
-
else node[propAlias || prop] = value;
|
|
478
|
+
if (prop === "class" || prop === "className") className(node, value);else if (isCE && !isProp && !isChildProp) node[toPropertyName(prop)] = value;else node[propAlias || prop] = value;
|
|
872
479
|
} else {
|
|
873
480
|
const ns = isSVG && prop.indexOf(":") > -1 && SVGNamespace[prop.split(":")[0]];
|
|
874
|
-
if (ns) setAttributeNS(node, ns, prop, value);
|
|
875
|
-
else setAttribute(node, Aliases[prop] || prop, value);
|
|
481
|
+
if (ns) setAttributeNS(node, ns, prop, value);else setAttribute(node, Aliases[prop] || prop, value);
|
|
876
482
|
}
|
|
877
483
|
return value;
|
|
878
484
|
}
|
|
@@ -884,11 +490,10 @@ function eventHandler(e) {
|
|
|
884
490
|
const key = `$$${e.type}`;
|
|
885
491
|
const oriTarget = e.target;
|
|
886
492
|
const oriCurrentTarget = e.currentTarget;
|
|
887
|
-
const retarget = value =>
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
});
|
|
493
|
+
const retarget = value => Object.defineProperty(e, "target", {
|
|
494
|
+
configurable: true,
|
|
495
|
+
value
|
|
496
|
+
});
|
|
892
497
|
const handleNode = () => {
|
|
893
498
|
const handler = node[key];
|
|
894
499
|
if (handler && !node.disabled) {
|
|
@@ -896,11 +501,7 @@ function eventHandler(e) {
|
|
|
896
501
|
data !== undefined ? handler.call(node, data, e) : handler.call(node, e);
|
|
897
502
|
if (e.cancelBubble) return;
|
|
898
503
|
}
|
|
899
|
-
node.host &&
|
|
900
|
-
typeof node.host !== "string" &&
|
|
901
|
-
!node.host._$host &&
|
|
902
|
-
node.contains(e.target) &&
|
|
903
|
-
retarget(node.host);
|
|
504
|
+
node.host && typeof node.host !== "string" && !node.host._$host && node.contains(e.target) && retarget(node.host);
|
|
904
505
|
return true;
|
|
905
506
|
};
|
|
906
507
|
const walkUpTree = () => {
|
|
@@ -928,7 +529,8 @@ function eventHandler(e) {
|
|
|
928
529
|
break;
|
|
929
530
|
}
|
|
930
531
|
}
|
|
931
|
-
}
|
|
532
|
+
}
|
|
533
|
+
else walkUpTree();
|
|
932
534
|
retarget(oriTarget);
|
|
933
535
|
}
|
|
934
536
|
function insertExpression(parent, value, current, marker, unwrapArray) {
|
|
@@ -938,8 +540,7 @@ function insertExpression(parent, value, current, marker, unwrapArray) {
|
|
|
938
540
|
let cleaned = [];
|
|
939
541
|
for (let i = 0; i < current.length; i++) {
|
|
940
542
|
const node = current[i];
|
|
941
|
-
if (node.nodeType === 8 && node.data.slice(0, 2) === "!$") node.remove();
|
|
942
|
-
else cleaned.push(node);
|
|
543
|
+
if (node.nodeType === 8 && node.data.slice(0, 2) === "!$") node.remove();else cleaned.push(node);
|
|
943
544
|
}
|
|
944
545
|
current = cleaned;
|
|
945
546
|
}
|
|
@@ -947,7 +548,7 @@ function insertExpression(parent, value, current, marker, unwrapArray) {
|
|
|
947
548
|
if (value === current) return current;
|
|
948
549
|
const t = typeof value,
|
|
949
550
|
multi = marker !== undefined;
|
|
950
|
-
parent =
|
|
551
|
+
parent = multi && current[0] && current[0].parentNode || parent;
|
|
951
552
|
if (t === "string" || t === "number") {
|
|
952
553
|
if (hydrating) return current;
|
|
953
554
|
if (t === "number") {
|
|
@@ -979,17 +580,17 @@ function insertExpression(parent, value, current, marker, unwrapArray) {
|
|
|
979
580
|
const array = [];
|
|
980
581
|
const currentArray = current && Array.isArray(current);
|
|
981
582
|
if (normalizeIncomingArray(array, value, current, unwrapArray)) {
|
|
982
|
-
createRenderEffect(() =>
|
|
583
|
+
createRenderEffect(() => current = insertExpression(parent, array, current, marker, true));
|
|
983
584
|
return () => current;
|
|
984
585
|
}
|
|
985
586
|
if (hydrating) {
|
|
986
587
|
if (!array.length) return current;
|
|
987
|
-
if (marker === undefined) return
|
|
588
|
+
if (marker === undefined) return current = [...parent.childNodes];
|
|
988
589
|
let node = array[0];
|
|
989
590
|
if (node.parentNode !== parent) return current;
|
|
990
591
|
const nodes = [node];
|
|
991
592
|
while ((node = node.nextSibling) !== marker) nodes.push(node);
|
|
992
|
-
return
|
|
593
|
+
return current = nodes;
|
|
993
594
|
}
|
|
994
595
|
if (array.length === 0) {
|
|
995
596
|
current = cleanChildren(parent, current, marker);
|
|
@@ -1004,9 +605,9 @@ function insertExpression(parent, value, current, marker, unwrapArray) {
|
|
|
1004
605
|
}
|
|
1005
606
|
current = array;
|
|
1006
607
|
} else if (value.nodeType) {
|
|
1007
|
-
if (hydrating && value.parentNode) return
|
|
608
|
+
if (hydrating && value.parentNode) return current = multi ? [value] : value;
|
|
1008
609
|
if (Array.isArray(current)) {
|
|
1009
|
-
if (multi) return
|
|
610
|
+
if (multi) return current = cleanChildren(parent, current, marker, value);
|
|
1010
611
|
cleanChildren(parent, current, null, value);
|
|
1011
612
|
} else if (current == null || current === "" || !parent.firstChild) {
|
|
1012
613
|
parent.appendChild(value);
|
|
@@ -1021,28 +622,21 @@ function normalizeIncomingArray(normalized, array, current, unwrap) {
|
|
|
1021
622
|
let item = array[i],
|
|
1022
623
|
prev = current && current[normalized.length],
|
|
1023
624
|
t;
|
|
1024
|
-
if (item == null || item === true || item === false);
|
|
1025
|
-
else if ((t = typeof item) === "object" && item.nodeType) {
|
|
625
|
+
if (item == null || item === true || item === false) ; else if ((t = typeof item) === "object" && item.nodeType) {
|
|
1026
626
|
normalized.push(item);
|
|
1027
627
|
} else if (Array.isArray(item)) {
|
|
1028
628
|
dynamic = normalizeIncomingArray(normalized, item, prev) || dynamic;
|
|
1029
629
|
} else if (t === "function") {
|
|
1030
630
|
if (unwrap) {
|
|
1031
631
|
while (typeof item === "function") item = item();
|
|
1032
|
-
dynamic =
|
|
1033
|
-
normalizeIncomingArray(
|
|
1034
|
-
normalized,
|
|
1035
|
-
Array.isArray(item) ? item : [item],
|
|
1036
|
-
Array.isArray(prev) ? prev : [prev]
|
|
1037
|
-
) || dynamic;
|
|
632
|
+
dynamic = normalizeIncomingArray(normalized, Array.isArray(item) ? item : [item], Array.isArray(prev) ? prev : [prev]) || dynamic;
|
|
1038
633
|
} else {
|
|
1039
634
|
normalized.push(item);
|
|
1040
635
|
dynamic = true;
|
|
1041
636
|
}
|
|
1042
637
|
} else {
|
|
1043
638
|
const value = String(item);
|
|
1044
|
-
if (prev && prev.nodeType === 3 && prev.data === value) normalized.push(prev);
|
|
1045
|
-
else normalized.push(document.createTextNode(value));
|
|
639
|
+
if (prev && prev.nodeType === 3 && prev.data === value) normalized.push(prev);else normalized.push(document.createTextNode(value));
|
|
1046
640
|
}
|
|
1047
641
|
}
|
|
1048
642
|
return dynamic;
|
|
@@ -1051,7 +645,7 @@ function appendNodes(parent, array, marker = null) {
|
|
|
1051
645
|
for (let i = 0, len = array.length; i < len; i++) parent.insertBefore(array[i], marker);
|
|
1052
646
|
}
|
|
1053
647
|
function cleanChildren(parent, current, marker, replacement) {
|
|
1054
|
-
if (marker === undefined) return
|
|
648
|
+
if (marker === undefined) return parent.textContent = "";
|
|
1055
649
|
const node = replacement || document.createTextNode("");
|
|
1056
650
|
if (current.length) {
|
|
1057
651
|
let inserted = false;
|
|
@@ -1059,9 +653,7 @@ function cleanChildren(parent, current, marker, replacement) {
|
|
|
1059
653
|
const el = current[i];
|
|
1060
654
|
if (node !== el) {
|
|
1061
655
|
const isParent = el.parentNode === parent;
|
|
1062
|
-
if (!inserted && !i)
|
|
1063
|
-
isParent ? parent.replaceChild(node, el) : parent.insertBefore(node, marker);
|
|
1064
|
-
else isParent && el.remove();
|
|
656
|
+
if (!inserted && !i) isParent ? parent.replaceChild(node, el) : parent.insertBefore(node, marker);else isParent && el.remove();
|
|
1065
657
|
} else inserted = true;
|
|
1066
658
|
}
|
|
1067
659
|
} else parent.insertBefore(node, marker);
|
|
@@ -1072,8 +664,7 @@ function gatherHydratable(element, root) {
|
|
|
1072
664
|
for (let i = 0; i < templates.length; i++) {
|
|
1073
665
|
const node = templates[i];
|
|
1074
666
|
const key = node.getAttribute("data-hk");
|
|
1075
|
-
if ((!root || key.startsWith(root)) && !sharedConfig.registry.has(key))
|
|
1076
|
-
sharedConfig.registry.set(key, node);
|
|
667
|
+
if ((!root || key.startsWith(root)) && !sharedConfig.registry.has(key)) sharedConfig.registry.set(key, node);
|
|
1077
668
|
}
|
|
1078
669
|
}
|
|
1079
670
|
function getHydrationKey() {
|
|
@@ -1117,55 +708,52 @@ function ssrSpread(props, isSVG, skipChildren) {}
|
|
|
1117
708
|
const isServer = false;
|
|
1118
709
|
const isDev = true;
|
|
1119
710
|
const SVG_NAMESPACE = "http://www.w3.org/2000/svg";
|
|
1120
|
-
function createElement(tagName, isSVG = false) {
|
|
1121
|
-
return isSVG ? document.createElementNS(SVG_NAMESPACE, tagName) : document.createElement(tagName
|
|
711
|
+
function createElement(tagName, isSVG = false, is = undefined) {
|
|
712
|
+
return isSVG ? document.createElementNS(SVG_NAMESPACE, tagName) : document.createElement(tagName, {
|
|
713
|
+
is
|
|
714
|
+
});
|
|
1122
715
|
}
|
|
1123
716
|
const hydrate = (...args) => {
|
|
1124
717
|
enableHydration();
|
|
1125
718
|
return hydrate$1(...args);
|
|
1126
719
|
};
|
|
1127
720
|
function Portal(props) {
|
|
1128
|
-
const {
|
|
721
|
+
const {
|
|
722
|
+
useShadow
|
|
723
|
+
} = props,
|
|
1129
724
|
marker = document.createTextNode(""),
|
|
1130
725
|
mount = () => props.mount || document.body,
|
|
1131
726
|
owner = getOwner();
|
|
1132
727
|
let content;
|
|
1133
728
|
let hydrating = !!sharedConfig.context;
|
|
1134
|
-
createEffect(
|
|
1135
|
-
()
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
insert(renderRoot, content);
|
|
1159
|
-
el.appendChild(container);
|
|
1160
|
-
props.ref && props.ref(container);
|
|
1161
|
-
onCleanup(() => el.removeChild(container));
|
|
1162
|
-
}
|
|
1163
|
-
},
|
|
1164
|
-
undefined,
|
|
1165
|
-
{
|
|
1166
|
-
render: !hydrating
|
|
729
|
+
createEffect(() => {
|
|
730
|
+
if (hydrating) getOwner().user = hydrating = false;
|
|
731
|
+
content || (content = runWithOwner(owner, () => createMemo(() => props.children)));
|
|
732
|
+
const el = mount();
|
|
733
|
+
if (el instanceof HTMLHeadElement) {
|
|
734
|
+
const [clean, setClean] = createSignal(false);
|
|
735
|
+
const cleanup = () => setClean(true);
|
|
736
|
+
createRoot(dispose => insert(el, () => !clean() ? content() : dispose(), null));
|
|
737
|
+
onCleanup(cleanup);
|
|
738
|
+
} else {
|
|
739
|
+
const container = createElement(props.isSVG ? "g" : "div", props.isSVG),
|
|
740
|
+
renderRoot = useShadow && container.attachShadow ? container.attachShadow({
|
|
741
|
+
mode: "open"
|
|
742
|
+
}) : container;
|
|
743
|
+
Object.defineProperty(container, "_$host", {
|
|
744
|
+
get() {
|
|
745
|
+
return marker.parentNode;
|
|
746
|
+
},
|
|
747
|
+
configurable: true
|
|
748
|
+
});
|
|
749
|
+
insert(renderRoot, content);
|
|
750
|
+
el.appendChild(container);
|
|
751
|
+
props.ref && props.ref(container);
|
|
752
|
+
onCleanup(() => el.removeChild(container));
|
|
1167
753
|
}
|
|
1168
|
-
|
|
754
|
+
}, undefined, {
|
|
755
|
+
render: !hydrating
|
|
756
|
+
});
|
|
1169
757
|
return marker;
|
|
1170
758
|
}
|
|
1171
759
|
function createDynamic(component, props) {
|
|
@@ -1180,7 +768,7 @@ function createDynamic(component, props) {
|
|
|
1180
768
|
return untrack(() => component(props));
|
|
1181
769
|
case "string":
|
|
1182
770
|
const isSvg = SVGElements.has(component);
|
|
1183
|
-
const el = sharedConfig.context ? getNextElement() : createElement(component, isSvg);
|
|
771
|
+
const el = sharedConfig.context ? getNextElement() : createElement(component, isSvg, props.is);
|
|
1184
772
|
spread(el, props, isSvg);
|
|
1185
773
|
return el;
|
|
1186
774
|
}
|
|
@@ -1191,64 +779,4 @@ function Dynamic(props) {
|
|
|
1191
779
|
return createDynamic(() => props.component, others);
|
|
1192
780
|
}
|
|
1193
781
|
|
|
1194
|
-
export {
|
|
1195
|
-
Aliases,
|
|
1196
|
-
voidFn as Assets,
|
|
1197
|
-
ChildProperties,
|
|
1198
|
-
DOMElements,
|
|
1199
|
-
DelegatedEvents,
|
|
1200
|
-
Dynamic,
|
|
1201
|
-
Hydration,
|
|
1202
|
-
voidFn as HydrationScript,
|
|
1203
|
-
NoHydration,
|
|
1204
|
-
Portal,
|
|
1205
|
-
Properties,
|
|
1206
|
-
RequestContext,
|
|
1207
|
-
SVGElements,
|
|
1208
|
-
SVGNamespace,
|
|
1209
|
-
addEventListener,
|
|
1210
|
-
assign,
|
|
1211
|
-
classList,
|
|
1212
|
-
className,
|
|
1213
|
-
clearDelegatedEvents,
|
|
1214
|
-
createDynamic,
|
|
1215
|
-
delegateEvents,
|
|
1216
|
-
dynamicProperty,
|
|
1217
|
-
escape,
|
|
1218
|
-
voidFn as generateHydrationScript,
|
|
1219
|
-
voidFn as getAssets,
|
|
1220
|
-
getHydrationKey,
|
|
1221
|
-
getNextElement,
|
|
1222
|
-
getNextMarker,
|
|
1223
|
-
getNextMatch,
|
|
1224
|
-
getPropAlias,
|
|
1225
|
-
voidFn as getRequestEvent,
|
|
1226
|
-
hydrate,
|
|
1227
|
-
innerHTML,
|
|
1228
|
-
insert,
|
|
1229
|
-
isDev,
|
|
1230
|
-
isServer,
|
|
1231
|
-
memo,
|
|
1232
|
-
render,
|
|
1233
|
-
renderToStream,
|
|
1234
|
-
renderToString,
|
|
1235
|
-
renderToStringAsync,
|
|
1236
|
-
resolveSSRNode,
|
|
1237
|
-
runHydrationEvents,
|
|
1238
|
-
setAttribute,
|
|
1239
|
-
setAttributeNS,
|
|
1240
|
-
setBoolAttribute,
|
|
1241
|
-
setProperty,
|
|
1242
|
-
spread,
|
|
1243
|
-
ssr,
|
|
1244
|
-
ssrAttribute,
|
|
1245
|
-
ssrClassList,
|
|
1246
|
-
ssrElement,
|
|
1247
|
-
ssrHydrationKey,
|
|
1248
|
-
ssrSpread,
|
|
1249
|
-
ssrStyle,
|
|
1250
|
-
style,
|
|
1251
|
-
template,
|
|
1252
|
-
use,
|
|
1253
|
-
voidFn as useAssets
|
|
1254
|
-
};
|
|
782
|
+
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, setStyleProperty, spread, ssr, ssrAttribute, ssrClassList, ssrElement, ssrHydrationKey, ssrSpread, ssrStyle, style, template, use, voidFn as useAssets };
|