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/server.js
CHANGED
|
@@ -1,83 +1,36 @@
|
|
|
1
|
-
import { createMemo, sharedConfig, createRoot, splitProps } from
|
|
2
|
-
export {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
Index,
|
|
6
|
-
Match,
|
|
7
|
-
Show,
|
|
8
|
-
Suspense,
|
|
9
|
-
SuspenseList,
|
|
10
|
-
Switch,
|
|
11
|
-
createComponent,
|
|
12
|
-
createRenderEffect as effect,
|
|
13
|
-
getOwner,
|
|
14
|
-
mergeProps,
|
|
15
|
-
untrack
|
|
16
|
-
} from "solid-js";
|
|
17
|
-
import { Feature, Serializer, getCrossReferenceHeader } from "seroval";
|
|
18
|
-
import {
|
|
19
|
-
CustomEventPlugin,
|
|
20
|
-
DOMExceptionPlugin,
|
|
21
|
-
EventPlugin,
|
|
22
|
-
FormDataPlugin,
|
|
23
|
-
HeadersPlugin,
|
|
24
|
-
ReadableStreamPlugin,
|
|
25
|
-
RequestPlugin,
|
|
26
|
-
ResponsePlugin,
|
|
27
|
-
URLSearchParamsPlugin,
|
|
28
|
-
URLPlugin
|
|
29
|
-
} from "seroval-plugins/web";
|
|
1
|
+
import { createMemo, sharedConfig, createRoot, splitProps } from 'solid-js';
|
|
2
|
+
export { ErrorBoundary, For, Index, Match, Show, Suspense, SuspenseList, Switch, createComponent, createRenderEffect as effect, getOwner, mergeProps, untrack } from 'solid-js';
|
|
3
|
+
import { Feature, Serializer, getCrossReferenceHeader } from 'seroval';
|
|
4
|
+
import { AbortSignalPlugin, CustomEventPlugin, DOMExceptionPlugin, EventPlugin, FormDataPlugin, HeadersPlugin, ReadableStreamPlugin, RequestPlugin, ResponsePlugin, URLSearchParamsPlugin, URLPlugin } from 'seroval-plugins/web';
|
|
30
5
|
|
|
31
|
-
const booleans = [
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
"inert",
|
|
44
|
-
"ismap",
|
|
45
|
-
"loop",
|
|
46
|
-
"multiple",
|
|
47
|
-
"muted",
|
|
48
|
-
"nomodule",
|
|
49
|
-
"novalidate",
|
|
50
|
-
"open",
|
|
51
|
-
"playsinline",
|
|
52
|
-
"readonly",
|
|
53
|
-
"required",
|
|
54
|
-
"reversed",
|
|
55
|
-
"seamless",
|
|
56
|
-
"selected"
|
|
6
|
+
const booleans = ["allowfullscreen", "async", "alpha",
|
|
7
|
+
"autofocus",
|
|
8
|
+
"autoplay", "checked", "controls", "default", "disabled", "formnovalidate", "hidden",
|
|
9
|
+
"indeterminate", "inert",
|
|
10
|
+
"ismap", "loop", "multiple", "muted", "nomodule", "novalidate", "open", "playsinline", "readonly", "required", "reversed", "seamless",
|
|
11
|
+
"selected", "adauctionheaders",
|
|
12
|
+
"browsingtopics",
|
|
13
|
+
"credentialless",
|
|
14
|
+
"defaultchecked", "defaultmuted", "defaultselected", "defer", "disablepictureinpicture", "disableremoteplayback", "preservespitch",
|
|
15
|
+
"shadowrootclonable", "shadowrootcustomelementregistry",
|
|
16
|
+
"shadowrootdelegatesfocus", "shadowrootserializable",
|
|
17
|
+
"sharedstoragewritable"
|
|
57
18
|
];
|
|
58
|
-
const BooleanAttributes = /*#__PURE__*/
|
|
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), {
|
|
19
|
+
const BooleanAttributes = /*#__PURE__*/new Set(booleans);
|
|
20
|
+
const Properties = /*#__PURE__*/new Set([
|
|
21
|
+
"className", "value",
|
|
22
|
+
"readOnly", "noValidate", "formNoValidate", "isMap", "noModule", "playsInline", "adAuctionHeaders",
|
|
23
|
+
"allowFullscreen", "browsingTopics",
|
|
24
|
+
"defaultChecked", "defaultMuted", "defaultSelected", "disablePictureInPicture", "disableRemotePlayback", "preservesPitch", "shadowRootClonable", "shadowRootCustomElementRegistry",
|
|
25
|
+
"shadowRootDelegatesFocus", "shadowRootSerializable",
|
|
26
|
+
"sharedStorageWritable",
|
|
27
|
+
...booleans]);
|
|
28
|
+
const ChildProperties = /*#__PURE__*/new Set(["innerHTML", "textContent", "innerText", "children"]);
|
|
29
|
+
const Aliases = /*#__PURE__*/Object.assign(Object.create(null), {
|
|
77
30
|
className: "class",
|
|
78
31
|
htmlFor: "for"
|
|
79
32
|
});
|
|
80
|
-
const PropAliases = /*#__PURE__*/
|
|
33
|
+
const PropAliases = /*#__PURE__*/Object.assign(Object.create(null), {
|
|
81
34
|
class: "className",
|
|
82
35
|
novalidate: {
|
|
83
36
|
$: "noValidate",
|
|
@@ -104,420 +57,98 @@ const PropAliases = /*#__PURE__*/ Object.assign(Object.create(null), {
|
|
|
104
57
|
$: "readOnly",
|
|
105
58
|
INPUT: 1,
|
|
106
59
|
TEXTAREA: 1
|
|
60
|
+
},
|
|
61
|
+
adauctionheaders: {
|
|
62
|
+
$: "adAuctionHeaders",
|
|
63
|
+
IFRAME: 1
|
|
64
|
+
},
|
|
65
|
+
allowfullscreen: {
|
|
66
|
+
$: "allowFullscreen",
|
|
67
|
+
IFRAME: 1
|
|
68
|
+
},
|
|
69
|
+
browsingtopics: {
|
|
70
|
+
$: "browsingTopics",
|
|
71
|
+
IMG: 1
|
|
72
|
+
},
|
|
73
|
+
defaultchecked: {
|
|
74
|
+
$: "defaultChecked",
|
|
75
|
+
INPUT: 1
|
|
76
|
+
},
|
|
77
|
+
defaultmuted: {
|
|
78
|
+
$: "defaultMuted",
|
|
79
|
+
AUDIO: 1,
|
|
80
|
+
VIDEO: 1
|
|
81
|
+
},
|
|
82
|
+
defaultselected: {
|
|
83
|
+
$: "defaultSelected",
|
|
84
|
+
OPTION: 1
|
|
85
|
+
},
|
|
86
|
+
disablepictureinpicture: {
|
|
87
|
+
$: "disablePictureInPicture",
|
|
88
|
+
VIDEO: 1
|
|
89
|
+
},
|
|
90
|
+
disableremoteplayback: {
|
|
91
|
+
$: "disableRemotePlayback",
|
|
92
|
+
AUDIO: 1,
|
|
93
|
+
VIDEO: 1
|
|
94
|
+
},
|
|
95
|
+
preservespitch: {
|
|
96
|
+
$: "preservesPitch",
|
|
97
|
+
AUDIO: 1,
|
|
98
|
+
VIDEO: 1
|
|
99
|
+
},
|
|
100
|
+
shadowrootclonable: {
|
|
101
|
+
$: "shadowRootClonable",
|
|
102
|
+
TEMPLATE: 1
|
|
103
|
+
},
|
|
104
|
+
shadowrootdelegatesfocus: {
|
|
105
|
+
$: "shadowRootDelegatesFocus",
|
|
106
|
+
TEMPLATE: 1
|
|
107
|
+
},
|
|
108
|
+
shadowrootserializable: {
|
|
109
|
+
$: "shadowRootSerializable",
|
|
110
|
+
TEMPLATE: 1
|
|
111
|
+
},
|
|
112
|
+
sharedstoragewritable: {
|
|
113
|
+
$: "sharedStorageWritable",
|
|
114
|
+
IFRAME: 1,
|
|
115
|
+
IMG: 1
|
|
107
116
|
}
|
|
108
117
|
});
|
|
109
118
|
function getPropAlias(prop, tagName) {
|
|
110
119
|
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
|
-
]);
|
|
120
|
+
return typeof a === "object" ? a[tagName] ? a["$"] : undefined : a;
|
|
121
|
+
}
|
|
122
|
+
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"]);
|
|
123
|
+
const SVGElements = /*#__PURE__*/new Set([
|
|
124
|
+
"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",
|
|
125
|
+
"set", "stop",
|
|
126
|
+
"svg", "switch", "symbol", "text", "textPath",
|
|
127
|
+
"tref", "tspan", "use", "view", "vkern"]);
|
|
216
128
|
const SVGNamespace = {
|
|
217
129
|
xlink: "http://www.w3.org/1999/xlink",
|
|
218
130
|
xml: "http://www.w3.org/XML/1998/namespace"
|
|
219
131
|
};
|
|
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
|
-
]);
|
|
132
|
+
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",
|
|
133
|
+
"webview",
|
|
134
|
+
"isindex", "listing", "multicol", "nextid", "noindex", "search"]);
|
|
501
135
|
|
|
502
136
|
const memo = fn => createMemo(() => fn());
|
|
503
137
|
|
|
504
|
-
const ES2017FLAG = Feature.AggregateError
|
|
505
|
-
|
|
506
|
-
|
|
138
|
+
const ES2017FLAG = Feature.AggregateError
|
|
139
|
+
| Feature.BigIntTypedArray;
|
|
140
|
+
const GLOBAL_IDENTIFIER = '_$HY.r';
|
|
141
|
+
function createSerializer({
|
|
142
|
+
onData,
|
|
143
|
+
onDone,
|
|
144
|
+
scopeId,
|
|
145
|
+
onError
|
|
146
|
+
}) {
|
|
507
147
|
return new Serializer({
|
|
508
148
|
scopeId,
|
|
509
|
-
plugins: [
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
EventPlugin,
|
|
513
|
-
FormDataPlugin,
|
|
514
|
-
HeadersPlugin,
|
|
515
|
-
ReadableStreamPlugin,
|
|
516
|
-
RequestPlugin,
|
|
517
|
-
ResponsePlugin,
|
|
518
|
-
URLSearchParamsPlugin,
|
|
519
|
-
URLPlugin
|
|
520
|
-
],
|
|
149
|
+
plugins: [AbortSignalPlugin,
|
|
150
|
+
CustomEventPlugin, DOMExceptionPlugin, EventPlugin,
|
|
151
|
+
FormDataPlugin, HeadersPlugin, ReadableStreamPlugin, RequestPlugin, ResponsePlugin, URLSearchParamsPlugin, URLPlugin],
|
|
521
152
|
globalIdentifier: GLOBAL_IDENTIFIER,
|
|
522
153
|
disabledFeatures: ES2017FLAG,
|
|
523
154
|
onData,
|
|
@@ -526,14 +157,15 @@ function createSerializer({ onData, onDone, scopeId, onError }) {
|
|
|
526
157
|
});
|
|
527
158
|
}
|
|
528
159
|
function getLocalHeaderScript(id) {
|
|
529
|
-
return getCrossReferenceHeader(id) +
|
|
160
|
+
return getCrossReferenceHeader(id) + ';';
|
|
530
161
|
}
|
|
531
162
|
|
|
532
|
-
const VOID_ELEMENTS =
|
|
533
|
-
/^(?:area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)$/i;
|
|
163
|
+
const VOID_ELEMENTS = /^(?:area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)$/i;
|
|
534
164
|
const REPLACE_SCRIPT = `function $df(e,n,o,t){if(n=document.getElementById(e),o=document.getElementById("pl-"+e)){for(;o&&8!==o.nodeType&&o.nodeValue!=="pl-"+e;)t=o.nextSibling,o.remove(),o=t;_$HY.done?o.remove():o.replaceWith(n.content)}n.remove(),_$HY.fe(e)}`;
|
|
535
165
|
function renderToString(code, options = {}) {
|
|
536
|
-
const {
|
|
166
|
+
const {
|
|
167
|
+
renderId
|
|
168
|
+
} = options;
|
|
537
169
|
let scripts = "";
|
|
538
170
|
const serializer = createSerializer({
|
|
539
171
|
scopeId: renderId,
|
|
@@ -571,7 +203,9 @@ function renderToString(code, options = {}) {
|
|
|
571
203
|
return html;
|
|
572
204
|
}
|
|
573
205
|
function renderToStringAsync(code, options = {}) {
|
|
574
|
-
const {
|
|
206
|
+
const {
|
|
207
|
+
timeoutMs = 30000
|
|
208
|
+
} = options;
|
|
575
209
|
let timeoutHandle;
|
|
576
210
|
const timeout = new Promise((_, reject) => {
|
|
577
211
|
timeoutHandle = setTimeout(() => reject("renderToString timed out"), timeoutMs);
|
|
@@ -582,7 +216,13 @@ function renderToStringAsync(code, options = {}) {
|
|
|
582
216
|
});
|
|
583
217
|
}
|
|
584
218
|
function renderToStream(code, options = {}) {
|
|
585
|
-
let {
|
|
219
|
+
let {
|
|
220
|
+
nonce,
|
|
221
|
+
onCompleteShell,
|
|
222
|
+
onCompleteAll,
|
|
223
|
+
renderId,
|
|
224
|
+
noScripts
|
|
225
|
+
} = options;
|
|
586
226
|
let dispose;
|
|
587
227
|
const blockingPromises = [];
|
|
588
228
|
const pushTask = task => {
|
|
@@ -598,12 +238,11 @@ function renderToStream(code, options = {}) {
|
|
|
598
238
|
const onDone = () => {
|
|
599
239
|
writeTasks();
|
|
600
240
|
doShell();
|
|
601
|
-
onCompleteAll &&
|
|
602
|
-
|
|
603
|
-
write(v)
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
});
|
|
241
|
+
onCompleteAll && onCompleteAll({
|
|
242
|
+
write(v) {
|
|
243
|
+
!completed && buffer.write(v);
|
|
244
|
+
}
|
|
245
|
+
});
|
|
607
246
|
writable && writable.end();
|
|
608
247
|
completed = true;
|
|
609
248
|
if (firstFlushed) dispose();
|
|
@@ -660,23 +299,17 @@ function renderToStream(code, options = {}) {
|
|
|
660
299
|
const first = html.indexOf(placeholder);
|
|
661
300
|
if (first === -1) return;
|
|
662
301
|
const last = html.indexOf(`<!--!$/${id}-->`, first + placeholder.length);
|
|
663
|
-
html =
|
|
664
|
-
html.slice(0, first) +
|
|
665
|
-
resolveSSRNode(escape(payloadFn())) +
|
|
666
|
-
html.slice(last + placeholder.length + 1);
|
|
302
|
+
html = html.slice(0, first) + resolveSSRNode(escape(payloadFn())) + html.slice(last + placeholder.length + 1);
|
|
667
303
|
},
|
|
668
304
|
serialize(id, p, wait) {
|
|
669
305
|
const serverOnly = sharedConfig.context.noHydrate;
|
|
670
306
|
if (!firstFlushed && wait && typeof p === "object" && "then" in p) {
|
|
671
307
|
blockingPromises.push(p);
|
|
672
|
-
!serverOnly &&
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
.catch(e => {
|
|
678
|
-
serializer.write(id, e);
|
|
679
|
-
});
|
|
308
|
+
!serverOnly && p.then(d => {
|
|
309
|
+
serializer.write(id, d);
|
|
310
|
+
}).catch(e => {
|
|
311
|
+
serializer.write(id, e);
|
|
312
|
+
});
|
|
680
313
|
} else if (!serverOnly) serializer.write(id, p);
|
|
681
314
|
},
|
|
682
315
|
roots: 0,
|
|
@@ -686,15 +319,11 @@ function renderToStream(code, options = {}) {
|
|
|
686
319
|
registerFragment(key) {
|
|
687
320
|
if (!registry.has(key)) {
|
|
688
321
|
let resolve, reject;
|
|
689
|
-
const p = new Promise((r, rej) => (
|
|
690
|
-
registry.set(key, err =>
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
queue(flushEnd);
|
|
695
|
-
})
|
|
696
|
-
)
|
|
697
|
-
);
|
|
322
|
+
const p = new Promise((r, rej) => (resolve = r, reject = rej));
|
|
323
|
+
registry.set(key, err => queue(() => queue(() => {
|
|
324
|
+
err ? reject(err) : resolve(true);
|
|
325
|
+
queue(flushEnd);
|
|
326
|
+
})));
|
|
698
327
|
serializer.write(key, p);
|
|
699
328
|
}
|
|
700
329
|
return (value, error) => {
|
|
@@ -707,7 +336,7 @@ function renderToStream(code, options = {}) {
|
|
|
707
336
|
}
|
|
708
337
|
if (!completed) {
|
|
709
338
|
if (!firstFlushed) {
|
|
710
|
-
queue(() =>
|
|
339
|
+
queue(() => html = replacePlaceholder(html, key, value !== undefined ? value : ""));
|
|
711
340
|
resolve(error);
|
|
712
341
|
} else {
|
|
713
342
|
buffer.write(`<template id="${key}">${value !== undefined ? value : " "}</template>`);
|
|
@@ -733,12 +362,11 @@ function renderToStream(code, options = {}) {
|
|
|
733
362
|
if (tasks.length) html = injectScripts(html, tasks, nonce);
|
|
734
363
|
buffer.write(html);
|
|
735
364
|
tasks = "";
|
|
736
|
-
onCompleteShell &&
|
|
737
|
-
|
|
738
|
-
write(v)
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
});
|
|
365
|
+
onCompleteShell && onCompleteShell({
|
|
366
|
+
write(v) {
|
|
367
|
+
!completed && buffer.write(v);
|
|
368
|
+
}
|
|
369
|
+
});
|
|
742
370
|
shellCompleted = true;
|
|
743
371
|
}
|
|
744
372
|
return {
|
|
@@ -773,7 +401,7 @@ function renderToStream(code, options = {}) {
|
|
|
773
401
|
pipeTo(w) {
|
|
774
402
|
return allSettled(blockingPromises).then(() => {
|
|
775
403
|
let resolve;
|
|
776
|
-
const p = new Promise(r =>
|
|
404
|
+
const p = new Promise(r => resolve = r);
|
|
777
405
|
setTimeout(() => {
|
|
778
406
|
doShell();
|
|
779
407
|
const encoder = new TextEncoder();
|
|
@@ -803,13 +431,13 @@ function renderToStream(code, options = {}) {
|
|
|
803
431
|
};
|
|
804
432
|
}
|
|
805
433
|
function HydrationScript(props) {
|
|
806
|
-
const {
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
);
|
|
434
|
+
const {
|
|
435
|
+
nonce
|
|
436
|
+
} = sharedConfig.context;
|
|
437
|
+
return ssr(generateHydrationScript({
|
|
438
|
+
nonce,
|
|
439
|
+
...props
|
|
440
|
+
}));
|
|
813
441
|
}
|
|
814
442
|
function ssr(t, ...nodes) {
|
|
815
443
|
if (nodes.length) {
|
|
@@ -848,14 +476,19 @@ function ssrStyle(value) {
|
|
|
848
476
|
const v = value[s];
|
|
849
477
|
if (v != undefined) {
|
|
850
478
|
if (i) result += ";";
|
|
851
|
-
|
|
479
|
+
const r = escape(v, true);
|
|
480
|
+
if (r != undefined && r !== "undefined") {
|
|
481
|
+
result += `${s}:${r}`;
|
|
482
|
+
}
|
|
852
483
|
}
|
|
853
484
|
}
|
|
854
485
|
return result;
|
|
855
486
|
}
|
|
487
|
+
function ssrStyleProperty(name, value) {
|
|
488
|
+
return value != null ? name + value : "";
|
|
489
|
+
}
|
|
856
490
|
function ssrElement(tag, props, children, needsId) {
|
|
857
|
-
if (props == null) props = {};
|
|
858
|
-
else if (typeof props === "function") props = props();
|
|
491
|
+
if (props == null) props = {};else if (typeof props === "function") props = props();
|
|
859
492
|
const skipChildren = VOID_ELEMENTS.test(tag);
|
|
860
493
|
const keys = Object.keys(props);
|
|
861
494
|
let result = `<${tag}${needsId ? ssrHydrationKey() : ""} `;
|
|
@@ -863,11 +496,7 @@ function ssrElement(tag, props, children, needsId) {
|
|
|
863
496
|
for (let i = 0; i < keys.length; i++) {
|
|
864
497
|
const prop = keys[i];
|
|
865
498
|
if (ChildProperties.has(prop)) {
|
|
866
|
-
if (children === undefined && !skipChildren)
|
|
867
|
-
children =
|
|
868
|
-
tag === "script" || tag === "style" || prop === "innerHTML"
|
|
869
|
-
? props[prop]
|
|
870
|
-
: escape(props[prop]);
|
|
499
|
+
if (children === undefined && !skipChildren) children = tag === "script" || tag === "style" || prop === "innerHTML" ? props[prop] : escape(props[prop]);
|
|
871
500
|
continue;
|
|
872
501
|
}
|
|
873
502
|
const value = props[prop];
|
|
@@ -876,20 +505,11 @@ function ssrElement(tag, props, children, needsId) {
|
|
|
876
505
|
} else if (prop === "class" || prop === "className" || prop === "classList") {
|
|
877
506
|
if (classResolved) continue;
|
|
878
507
|
let n;
|
|
879
|
-
result += `class="${
|
|
880
|
-
escape(((n = props.class) ? n + " " : "") + ((n = props.className) ? n + " " : ""), true) +
|
|
881
|
-
ssrClassList(props.classList)
|
|
882
|
-
}"`;
|
|
508
|
+
result += `class="${escape(((n = props.class) ? n + " " : "") + ((n = props.className) ? n + " " : ""), true) + ssrClassList(props.classList)}"`;
|
|
883
509
|
classResolved = true;
|
|
884
510
|
} else if (BooleanAttributes.has(prop)) {
|
|
885
|
-
if (value) result += prop;
|
|
886
|
-
|
|
887
|
-
} else if (
|
|
888
|
-
value == undefined ||
|
|
889
|
-
prop === "ref" ||
|
|
890
|
-
prop.slice(0, 2) === "on" ||
|
|
891
|
-
prop.slice(0, 5) === "prop:"
|
|
892
|
-
) {
|
|
511
|
+
if (value) result += prop;else continue;
|
|
512
|
+
} else if (value == undefined || prop === "ref" || prop.slice(0, 2) === "on" || prop.slice(0, 5) === "prop:") {
|
|
893
513
|
continue;
|
|
894
514
|
} else if (prop.slice(0, 5) === "bool:") {
|
|
895
515
|
if (!value) continue;
|
|
@@ -901,17 +521,16 @@ function ssrElement(tag, props, children, needsId) {
|
|
|
901
521
|
}
|
|
902
522
|
if (i !== keys.length - 1) result += " ";
|
|
903
523
|
}
|
|
904
|
-
if (skipChildren)
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
};
|
|
524
|
+
if (skipChildren) return {
|
|
525
|
+
t: result + "/>"
|
|
526
|
+
};
|
|
908
527
|
if (typeof children === "function") children = children();
|
|
909
528
|
return {
|
|
910
529
|
t: result + `>${resolveSSRNode(children, true)}</${tag}>`
|
|
911
530
|
};
|
|
912
531
|
}
|
|
913
532
|
function ssrAttribute(key, value, isBoolean) {
|
|
914
|
-
return isBoolean ?
|
|
533
|
+
return isBoolean ? value ? " " + key : "" : value != null ? ` ${key}="${value}"` : "";
|
|
915
534
|
}
|
|
916
535
|
function ssrHydrationKey() {
|
|
917
536
|
const hk = getHydrationKey();
|
|
@@ -922,6 +541,7 @@ function escape(s, attr) {
|
|
|
922
541
|
if (t !== "string") {
|
|
923
542
|
if (!attr && t === "function") return escape(s());
|
|
924
543
|
if (!attr && Array.isArray(s)) {
|
|
544
|
+
s = s.slice();
|
|
925
545
|
for (let i = 0; i < s.length; i++) s[i] = escape(s[i]);
|
|
926
546
|
return s;
|
|
927
547
|
}
|
|
@@ -955,13 +575,12 @@ function escape(s, attr) {
|
|
|
955
575
|
left = iDelim + 1;
|
|
956
576
|
iDelim = s.indexOf(delim, left);
|
|
957
577
|
} while (iDelim >= 0);
|
|
958
|
-
} else
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
}
|
|
578
|
+
} else while (iAmp >= 0) {
|
|
579
|
+
if (left < iAmp) out += s.substring(left, iAmp);
|
|
580
|
+
out += "&";
|
|
581
|
+
left = iAmp + 1;
|
|
582
|
+
iAmp = s.indexOf("&", left);
|
|
583
|
+
}
|
|
965
584
|
return left < s.length ? out + s.substring(left) : out;
|
|
966
585
|
}
|
|
967
586
|
function resolveSSRNode(node, top) {
|
|
@@ -973,7 +592,7 @@ function resolveSSRNode(node, top) {
|
|
|
973
592
|
let mapped = "";
|
|
974
593
|
for (let i = 0, len = node.length; i < len; i++) {
|
|
975
594
|
if (!top && typeof prev !== "object" && typeof node[i] !== "object") mapped += `<!--!$-->`;
|
|
976
|
-
mapped += resolveSSRNode(
|
|
595
|
+
mapped += resolveSSRNode(prev = node[i]);
|
|
977
596
|
}
|
|
978
597
|
return mapped;
|
|
979
598
|
}
|
|
@@ -994,12 +613,11 @@ function getAssets() {
|
|
|
994
613
|
for (let i = 0, len = assets.length; i < len; i++) out += assets[i]();
|
|
995
614
|
return out;
|
|
996
615
|
}
|
|
997
|
-
function generateHydrationScript({
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
)}"].forEach((o=>document.addEventListener(o,(o=>{if(!e.events)return;let s=t(o.composedPath&&o.composedPath()[0]||o.target);s&&!e.completed.has(s)&&e.events.push([s,o])}))))})(_$HY={events:[],completed:new WeakSet,r:{},fe(){}});</script><!--xs-->`;
|
|
616
|
+
function generateHydrationScript({
|
|
617
|
+
eventNames = ["click", "input"],
|
|
618
|
+
nonce
|
|
619
|
+
} = {}) {
|
|
620
|
+
return `<script${nonce ? ` nonce="${nonce}"` : ""}>window._$HY||(e=>{let t=e=>e&&e.hasAttribute&&(e.hasAttribute("data-hk")?e:t(e.host&&e.host.nodeType?e.host:e.parentNode));["${eventNames.join('", "')}"].forEach((o=>document.addEventListener(o,(o=>{if(!e.events)return;let s=t(o.composedPath&&o.composedPath()[0]||o.target);s&&!e.completed.has(s)&&e.events.push([s,o])}))))})(_$HY={events:[],completed:new WeakSet,r:{},fe(){}});</script><!--xs-->`;
|
|
1003
621
|
}
|
|
1004
622
|
function Hydration(props) {
|
|
1005
623
|
if (!sharedConfig.context.noHydrate) return props.children;
|
|
@@ -1060,20 +678,16 @@ function replacePlaceholder(html, key, value) {
|
|
|
1060
678
|
}
|
|
1061
679
|
const RequestContext = Symbol();
|
|
1062
680
|
function getRequestEvent() {
|
|
1063
|
-
return globalThis[RequestContext]
|
|
1064
|
-
? globalThis[RequestContext].getStore() ||
|
|
1065
|
-
(sharedConfig.context && sharedConfig.context.event) ||
|
|
1066
|
-
console.log(
|
|
1067
|
-
"RequestEvent is missing. This is most likely due to accessing `getRequestEvent` non-managed async scope in a partially polyfilled environment. Try moving it above all `await` calls."
|
|
1068
|
-
)
|
|
1069
|
-
: undefined;
|
|
681
|
+
return globalThis[RequestContext] ? globalThis[RequestContext].getStore() || sharedConfig.context && sharedConfig.context.event || console.log("RequestEvent is missing. This is most likely due to accessing `getRequestEvent` non-managed async scope in a partially polyfilled environment. Try moving it above all `await` calls.") : undefined;
|
|
1070
682
|
}
|
|
1071
683
|
function Assets(props) {
|
|
1072
684
|
useAssets(() => props.children);
|
|
1073
685
|
}
|
|
1074
686
|
function pipeToNodeWritable(code, writable, options = {}) {
|
|
1075
687
|
if (options.onReady) {
|
|
1076
|
-
options.onCompleteShell = ({
|
|
688
|
+
options.onCompleteShell = ({
|
|
689
|
+
write
|
|
690
|
+
}) => {
|
|
1077
691
|
options.onReady({
|
|
1078
692
|
write,
|
|
1079
693
|
startWriting() {
|
|
@@ -1087,7 +701,9 @@ function pipeToNodeWritable(code, writable, options = {}) {
|
|
|
1087
701
|
}
|
|
1088
702
|
function pipeToWritable(code, writable, options = {}) {
|
|
1089
703
|
if (options.onReady) {
|
|
1090
|
-
options.onCompleteShell = ({
|
|
704
|
+
options.onCompleteShell = ({
|
|
705
|
+
write
|
|
706
|
+
}) => {
|
|
1091
707
|
options.onReady({
|
|
1092
708
|
write,
|
|
1093
709
|
startWriting() {
|
|
@@ -1117,19 +733,11 @@ function ssrSpread(props, isSVG, skipChildren) {
|
|
|
1117
733
|
} else if (prop === "class" || prop === "className" || prop === "classList") {
|
|
1118
734
|
if (classResolved) continue;
|
|
1119
735
|
let n;
|
|
1120
|
-
result += `class="${(n = props.class) ? n + " " : ""}${
|
|
1121
|
-
(n = props.className) ? n + " " : ""
|
|
1122
|
-
}${ssrClassList(props.classList)}"`;
|
|
736
|
+
result += `class="${(n = props.class) ? n + " " : ""}${(n = props.className) ? n + " " : ""}${ssrClassList(props.classList)}"`;
|
|
1123
737
|
classResolved = true;
|
|
1124
738
|
} else if (prop !== "value" && Properties.has(prop)) {
|
|
1125
|
-
if (value) result += prop;
|
|
1126
|
-
|
|
1127
|
-
} else if (
|
|
1128
|
-
value == undefined ||
|
|
1129
|
-
prop === "ref" ||
|
|
1130
|
-
prop.slice(0, 2) === "on" ||
|
|
1131
|
-
prop.slice(0, 5) === "prop:"
|
|
1132
|
-
) {
|
|
739
|
+
if (value) result += prop;else continue;
|
|
740
|
+
} else if (value == undefined || prop === "ref" || prop.slice(0, 2) === "on" || prop.slice(0, 5) === "prop:") {
|
|
1133
741
|
continue;
|
|
1134
742
|
} else if (prop.slice(0, 5) === "bool:") {
|
|
1135
743
|
if (!value) continue;
|
|
@@ -1144,9 +752,7 @@ function ssrSpread(props, isSVG, skipChildren) {
|
|
|
1144
752
|
return result;
|
|
1145
753
|
}
|
|
1146
754
|
function notSup() {
|
|
1147
|
-
throw new Error(
|
|
1148
|
-
"Client-only API called on the server side. Run client-only code in onMount, or conditionally run client-only component with <Show>."
|
|
1149
|
-
);
|
|
755
|
+
throw new Error("Client-only API called on the server side. Run client-only code in onMount, or conditionally run client-only component with <Show>.");
|
|
1150
756
|
}
|
|
1151
757
|
|
|
1152
758
|
const isServer = true;
|
|
@@ -1155,8 +761,7 @@ function createDynamic(component, props) {
|
|
|
1155
761
|
const comp = component(),
|
|
1156
762
|
t = typeof comp;
|
|
1157
763
|
if (comp) {
|
|
1158
|
-
if (t === "function") return comp(props);
|
|
1159
|
-
else if (t === "string") {
|
|
764
|
+
if (t === "function") return comp(props);else if (t === "string") {
|
|
1160
765
|
return ssrElement(comp, props, undefined, true);
|
|
1161
766
|
}
|
|
1162
767
|
}
|
|
@@ -1169,62 +774,4 @@ function Portal(props) {
|
|
|
1169
774
|
return "";
|
|
1170
775
|
}
|
|
1171
776
|
|
|
1172
|
-
export {
|
|
1173
|
-
Aliases,
|
|
1174
|
-
Assets,
|
|
1175
|
-
ChildProperties,
|
|
1176
|
-
DOMElements,
|
|
1177
|
-
DelegatedEvents,
|
|
1178
|
-
Dynamic,
|
|
1179
|
-
Hydration,
|
|
1180
|
-
HydrationScript,
|
|
1181
|
-
NoHydration,
|
|
1182
|
-
Portal,
|
|
1183
|
-
Properties,
|
|
1184
|
-
RequestContext,
|
|
1185
|
-
SVGElements,
|
|
1186
|
-
SVGNamespace,
|
|
1187
|
-
notSup as addEventListener,
|
|
1188
|
-
notSup as assign,
|
|
1189
|
-
notSup as classList,
|
|
1190
|
-
notSup as className,
|
|
1191
|
-
createDynamic,
|
|
1192
|
-
notSup as delegateEvents,
|
|
1193
|
-
notSup as dynamicProperty,
|
|
1194
|
-
escape,
|
|
1195
|
-
generateHydrationScript,
|
|
1196
|
-
getAssets,
|
|
1197
|
-
getHydrationKey,
|
|
1198
|
-
notSup as getNextElement,
|
|
1199
|
-
notSup as getNextMarker,
|
|
1200
|
-
notSup as getNextMatch,
|
|
1201
|
-
getPropAlias,
|
|
1202
|
-
getRequestEvent,
|
|
1203
|
-
notSup as hydrate,
|
|
1204
|
-
notSup as insert,
|
|
1205
|
-
isDev,
|
|
1206
|
-
isServer,
|
|
1207
|
-
memo,
|
|
1208
|
-
pipeToNodeWritable,
|
|
1209
|
-
pipeToWritable,
|
|
1210
|
-
notSup as render,
|
|
1211
|
-
renderToStream,
|
|
1212
|
-
renderToString,
|
|
1213
|
-
renderToStringAsync,
|
|
1214
|
-
resolveSSRNode,
|
|
1215
|
-
notSup as runHydrationEvents,
|
|
1216
|
-
notSup as setAttribute,
|
|
1217
|
-
notSup as setAttributeNS,
|
|
1218
|
-
notSup as setProperty,
|
|
1219
|
-
notSup as spread,
|
|
1220
|
-
ssr,
|
|
1221
|
-
ssrAttribute,
|
|
1222
|
-
ssrClassList,
|
|
1223
|
-
ssrElement,
|
|
1224
|
-
ssrHydrationKey,
|
|
1225
|
-
ssrSpread,
|
|
1226
|
-
ssrStyle,
|
|
1227
|
-
notSup as style,
|
|
1228
|
-
notSup as template,
|
|
1229
|
-
useAssets
|
|
1230
|
-
};
|
|
777
|
+
export { Aliases, Assets, ChildProperties, DOMElements, DelegatedEvents, Dynamic, Hydration, HydrationScript, NoHydration, Portal, Properties, RequestContext, SVGElements, SVGNamespace, notSup as addEventListener, notSup as assign, notSup as classList, notSup as className, createDynamic, notSup as delegateEvents, notSup as dynamicProperty, escape, generateHydrationScript, getAssets, getHydrationKey, notSup as getNextElement, notSup as getNextMarker, notSup as getNextMatch, getPropAlias, getRequestEvent, notSup as hydrate, notSup as insert, isDev, isServer, memo, pipeToNodeWritable, pipeToWritable, notSup as render, renderToStream, renderToString, renderToStringAsync, resolveSSRNode, notSup as runHydrationEvents, notSup as setAttribute, notSup as setAttributeNS, notSup as setProperty, notSup as spread, ssr, ssrAttribute, ssrClassList, ssrElement, ssrHydrationKey, ssrSpread, ssrStyle, ssrStyleProperty, notSup as style, notSup as template, useAssets };
|