@solidjs/web 2.0.0-experimental.8 → 2.0.0-rc.0
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 +22 -4
- package/dist/dev.cjs +1585 -225
- package/dist/dev.js +1510 -201
- package/dist/server.cjs +2642 -264
- package/dist/server.js +2542 -217
- package/dist/web.cjs +1523 -218
- package/dist/web.js +1448 -194
- package/frames/dist/client.cjs +1916 -0
- package/frames/dist/client.dev.cjs +1933 -0
- package/frames/dist/client.dev.js +1921 -0
- package/frames/dist/client.js +1904 -0
- package/frames/dist/server.cjs +3667 -0
- package/frames/dist/server.js +3654 -0
- package/frames/package.json +30 -0
- package/package.json +349 -37
- package/serialization/decode/package.json +20 -0
- package/serialization/dist/decode.cjs +110 -0
- package/serialization/dist/decode.js +104 -0
- package/serialization/dist/serialization.cjs +232 -0
- package/serialization/dist/serialization.js +215 -0
- package/serialization/package.json +20 -0
- package/serialization/types/index.d.ts +182 -0
- package/serialization/types/serializer-decode.d.ts +182 -0
- package/serialization/types-cjs/index.d.cts +182 -0
- package/serialization/types-cjs/package.json +3 -0
- package/serialization/types-cjs/serializer-decode.d.cts +182 -0
- package/server-functions/dist/client.cjs +646 -0
- package/server-functions/dist/client.js +617 -0
- package/server-functions/dist/rich-args.cjs +11 -0
- package/server-functions/dist/rich-args.js +9 -0
- package/server-functions/dist/server.cjs +1077 -0
- package/server-functions/dist/server.dev.cjs +1077 -0
- package/server-functions/dist/server.dev.js +1045 -0
- package/server-functions/dist/server.js +1045 -0
- package/server-functions/package.json +40 -0
- package/server-functions/rich-args/package.json +20 -0
- package/storage/package.json +8 -3
- package/storage/types/index.d.ts +26 -0
- package/storage/types-cjs/index.d.cts +28 -0
- package/storage/types-cjs/package.json +3 -0
- package/types/client.d.ts +290 -27
- package/types/cookies.d.ts +93 -0
- package/types/core.d.ts +6 -2
- package/types/frames/client.d.ts +36 -0
- package/types/frames/frame-client.d.ts +338 -0
- package/types/frames/frame-sink.d.ts +194 -0
- package/types/frames/frame-transport.d.ts +222 -0
- package/types/frames/serializer.d.ts +182 -0
- package/types/frames/server.d.ts +52 -0
- package/types/index.d.ts +209 -24
- package/types/jsx-properties.d.ts +93 -0
- package/types/jsx.d.ts +4150 -1
- package/types/response.d.ts +174 -0
- package/types/serializer-decode.d.ts +182 -0
- package/types/serializer.d.ts +182 -0
- package/types/server-functions/client.d.ts +201 -0
- package/types/server-functions/flash.d.ts +38 -0
- package/types/server-functions/rich-args.d.ts +10 -0
- package/types/server-functions/server.d.ts +588 -0
- package/types/server-functions/shared.d.ts +523 -0
- package/types/server-mock.d.ts +249 -12
- package/types/server.d.ts +424 -51
- package/types-cjs/client.d.cts +337 -0
- package/types-cjs/cookies.d.cts +93 -0
- package/types-cjs/core.d.cts +6 -0
- package/types-cjs/frames/client.d.cts +36 -0
- package/types-cjs/frames/frame-client.d.cts +338 -0
- package/types-cjs/frames/frame-sink.d.cts +194 -0
- package/types-cjs/frames/frame-transport.d.cts +222 -0
- package/types-cjs/frames/serializer.d.cts +182 -0
- package/types-cjs/frames/server.d.cts +52 -0
- package/types-cjs/index.d.cts +230 -0
- package/types-cjs/jsx-properties.d.cts +93 -0
- package/types-cjs/jsx.d.cts +4150 -0
- package/types-cjs/package.json +3 -0
- package/types-cjs/response.d.cts +174 -0
- package/types-cjs/serializer-decode.d.cts +182 -0
- package/types-cjs/serializer.d.cts +182 -0
- package/types-cjs/server-functions/client.d.cts +201 -0
- package/types-cjs/server-functions/flash.d.cts +38 -0
- package/types-cjs/server-functions/rich-args.d.cts +10 -0
- package/types-cjs/server-functions/server.d.cts +588 -0
- package/types-cjs/server-functions/shared.d.cts +523 -0
- package/types-cjs/server-mock.d.cts +277 -0
- package/types-cjs/server.d.cts +523 -0
package/dist/web.cjs
CHANGED
|
@@ -2,33 +2,91 @@
|
|
|
2
2
|
|
|
3
3
|
var solidJs = require('solid-js');
|
|
4
4
|
|
|
5
|
-
const
|
|
6
|
-
|
|
5
|
+
const DOMWithState = {
|
|
6
|
+
INPUT: {
|
|
7
|
+
value: 1,
|
|
8
|
+
defaultValue: 2,
|
|
9
|
+
checked: 1,
|
|
10
|
+
defaultChecked: 2
|
|
11
|
+
},
|
|
12
|
+
SELECT: {
|
|
13
|
+
value: 1
|
|
14
|
+
},
|
|
15
|
+
OPTION: {
|
|
16
|
+
value: 1,
|
|
17
|
+
selected: 1,
|
|
18
|
+
defaultSelected: 2
|
|
19
|
+
},
|
|
20
|
+
TEXTAREA: {
|
|
21
|
+
value: 1,
|
|
22
|
+
defaultValue: 2
|
|
23
|
+
},
|
|
24
|
+
VIDEO: {
|
|
25
|
+
muted: 1,
|
|
26
|
+
defaultMuted: 2
|
|
27
|
+
},
|
|
28
|
+
AUDIO: {
|
|
29
|
+
muted: 1,
|
|
30
|
+
defaultMuted: 2
|
|
31
|
+
}
|
|
32
|
+
};
|
|
7
33
|
const ChildProperties = /*#__PURE__*/new Set(["innerHTML", "textContent", "innerText", "children"]);
|
|
34
|
+
const $$SLOT = /*#__PURE__*/Symbol("slot");
|
|
35
|
+
const $$HOST = /*#__PURE__*/Symbol("host");
|
|
8
36
|
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"]);
|
|
9
37
|
const SVGElements = /*#__PURE__*/new Set([
|
|
10
38
|
"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",
|
|
11
39
|
"set", "stop",
|
|
12
40
|
"svg", "switch", "symbol", "text", "textPath",
|
|
13
41
|
"tref", "tspan", "use", "view", "vkern"]);
|
|
14
|
-
const
|
|
42
|
+
const MathMLElements = /*#__PURE__*/new Set(["annotation", "annotation-xml", "maction", "math", "menclose", "merror", "mfenced", "mfrac", "mi", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mprescripts", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msubsup", "msup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "semantics"]);
|
|
43
|
+
const Namespaces = {
|
|
44
|
+
svg: "http://www.w3.org/2000/svg",
|
|
45
|
+
mathml: "http://www.w3.org/1998/Math/MathML",
|
|
15
46
|
xlink: "http://www.w3.org/1999/xlink",
|
|
16
47
|
xml: "http://www.w3.org/XML/1998/namespace"
|
|
17
48
|
};
|
|
18
|
-
const
|
|
19
|
-
"
|
|
20
|
-
"isindex
|
|
49
|
+
const VoidElements = /*#__PURE__*/new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "link", "meta", "param", "source", "track", "wbr"]);
|
|
50
|
+
const RawTextElements = /*#__PURE__*/new Set(["style", "script", "noscript", "template", "textarea", "title"]);
|
|
51
|
+
const DOMElements = /*#__PURE__*/new Set(/*#__PURE__*/"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,h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,i,iframe,image,img,input,ins,isindex,kbd,keygen,label,legend,li,link,listing,main,map,mark,marquee,math,menu,menuitem,meta,meter,multicol,nav,nextid,nobr,noembed,noframes,noindex,noscript,object,ol,optgroup,option,output,p,param,picture,plaintext,portal,pre,progress,q,rb,rp,rt,rtc,ruby,s,samp,script,search,section,select,shadow,slot,small,source,spacer,span,strike,strong,style,sub,summary,sup,svg,table,tbody,td,template,textarea,tfoot,th,thead,time,title,tr,track,tt,u,ul,var,video,wbr,webview,xmp".split(","));
|
|
21
52
|
|
|
22
|
-
const
|
|
53
|
+
const transparentOptions = {
|
|
54
|
+
transparent: true,
|
|
55
|
+
sync: true
|
|
56
|
+
};
|
|
57
|
+
const syncOptions = {
|
|
58
|
+
sync: true
|
|
59
|
+
};
|
|
60
|
+
const effect = (fn, effectFn, options) => solidJs.createRenderEffect(fn, effectFn, options ? {
|
|
61
|
+
sync: true,
|
|
62
|
+
...options,
|
|
63
|
+
transparent: !options.scope
|
|
64
|
+
} : transparentOptions);
|
|
65
|
+
const memo = fn => solidJs.createMemo(() => fn(), syncOptions);
|
|
66
|
+
const assetGates = new WeakMap();
|
|
67
|
+
const waitAsset = promise => {
|
|
68
|
+
let gate = assetGates.get(promise);
|
|
69
|
+
if (!gate) {
|
|
70
|
+
solidJs.runWithOwner(null, () => {
|
|
71
|
+
gate = solidJs.createMemo(() => promise);
|
|
72
|
+
});
|
|
73
|
+
assetGates.set(promise, gate);
|
|
74
|
+
}
|
|
75
|
+
gate();
|
|
76
|
+
};
|
|
23
77
|
|
|
24
|
-
function reconcileArrays(parentNode, a, b) {
|
|
78
|
+
function reconcileArrays(parentNode, a, b, marker) {
|
|
25
79
|
let bLength = b.length,
|
|
26
80
|
aEnd = a.length,
|
|
27
81
|
bEnd = bLength,
|
|
28
82
|
aStart = 0,
|
|
29
83
|
bStart = 0,
|
|
30
|
-
|
|
31
|
-
|
|
84
|
+
tail = a[aEnd - 1],
|
|
85
|
+
tailTag = tail[$$SLOT],
|
|
86
|
+
after = tail.parentNode === parentNode && (!tailTag || tailTag === marker) ? tail.nextSibling : marker || null,
|
|
87
|
+
map = null,
|
|
88
|
+
anchor,
|
|
89
|
+
anchorTag;
|
|
32
90
|
while (aStart < aEnd || bStart < bEnd) {
|
|
33
91
|
if (a[aStart] === b[bStart]) {
|
|
34
92
|
aStart++;
|
|
@@ -40,18 +98,43 @@ function reconcileArrays(parentNode, a, b) {
|
|
|
40
98
|
bEnd--;
|
|
41
99
|
}
|
|
42
100
|
if (aEnd === aStart) {
|
|
43
|
-
|
|
44
|
-
|
|
101
|
+
let node;
|
|
102
|
+
if (bEnd < bLength) {
|
|
103
|
+
if (bStart) {
|
|
104
|
+
const prev = b[bStart - 1];
|
|
105
|
+
const prevTag = prev[$$SLOT];
|
|
106
|
+
node = prev.parentNode === parentNode && (!prevTag || prevTag === marker) ? prev.nextSibling : after;
|
|
107
|
+
} else node = b[bEnd - bStart];
|
|
108
|
+
} else node = after;
|
|
109
|
+
while (bStart < bEnd) {
|
|
110
|
+
const n = b[bStart++];
|
|
111
|
+
parentNode.insertBefore(n, node);
|
|
112
|
+
if (marker) n[$$SLOT] = marker;
|
|
113
|
+
}
|
|
45
114
|
} else if (bEnd === bStart) {
|
|
46
115
|
while (aStart < aEnd) {
|
|
47
|
-
|
|
48
|
-
|
|
116
|
+
const n = a[aStart++];
|
|
117
|
+
if (!map || !map.has(n)) {
|
|
118
|
+
const tag = n[$$SLOT];
|
|
119
|
+
if (n.parentNode === parentNode && (!tag || tag === marker)) n.remove();
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
} else if ((anchor = a[aStart]) === b[bEnd - 1] && b[bStart] === a[aEnd - 1] && anchor.parentNode === parentNode && (!(anchorTag = anchor[$$SLOT]) || anchorTag === marker)) {
|
|
123
|
+
if (marker) {
|
|
124
|
+
do {
|
|
125
|
+
const n = a[--aEnd];
|
|
126
|
+
parentNode.insertBefore(n, anchor);
|
|
127
|
+
n[$$SLOT] = marker;
|
|
128
|
+
bStart++;
|
|
129
|
+
if (aStart >= aEnd - 1 || bStart >= bEnd) break;
|
|
130
|
+
} while (a[aStart] === b[bEnd - 1] && b[bStart] === a[aEnd - 1]);
|
|
131
|
+
} else {
|
|
132
|
+
do {
|
|
133
|
+
parentNode.insertBefore(a[--aEnd], anchor);
|
|
134
|
+
bStart++;
|
|
135
|
+
if (aStart >= aEnd - 1 || bStart >= bEnd) break;
|
|
136
|
+
} while (a[aStart] === b[bEnd - 1] && b[bStart] === a[aEnd - 1]);
|
|
49
137
|
}
|
|
50
|
-
} else if (a[aStart] === b[bEnd - 1] && b[bStart] === a[aEnd - 1]) {
|
|
51
|
-
const node = a[--aEnd].nextSibling;
|
|
52
|
-
parentNode.insertBefore(b[bStart++], a[aStart++].nextSibling);
|
|
53
|
-
parentNode.insertBefore(b[--bEnd], node);
|
|
54
|
-
a[aEnd] = b[bEnd];
|
|
55
138
|
} else {
|
|
56
139
|
if (!map) {
|
|
57
140
|
map = new Map();
|
|
@@ -69,74 +152,332 @@ function reconcileArrays(parentNode, a, b) {
|
|
|
69
152
|
sequence++;
|
|
70
153
|
}
|
|
71
154
|
if (sequence > index - bStart) {
|
|
72
|
-
const
|
|
73
|
-
|
|
74
|
-
|
|
155
|
+
const head = a[aStart];
|
|
156
|
+
const headTag = head[$$SLOT];
|
|
157
|
+
const node = head.parentNode === parentNode && (!headTag || headTag === marker) ? head : after;
|
|
158
|
+
while (bStart < index) {
|
|
159
|
+
const n = b[bStart++];
|
|
160
|
+
parentNode.insertBefore(n, node);
|
|
161
|
+
if (marker) n[$$SLOT] = marker;
|
|
162
|
+
}
|
|
163
|
+
} else {
|
|
164
|
+
const oldNode = a[aStart++];
|
|
165
|
+
const newNode = b[bStart++];
|
|
166
|
+
const oldTag = oldNode[$$SLOT];
|
|
167
|
+
if (oldNode.parentNode === parentNode && (!oldTag || oldTag === marker)) {
|
|
168
|
+
parentNode.replaceChild(newNode, oldNode);
|
|
169
|
+
} else {
|
|
170
|
+
parentNode.insertBefore(newNode, after);
|
|
171
|
+
}
|
|
172
|
+
if (marker) newNode[$$SLOT] = marker;
|
|
173
|
+
}
|
|
75
174
|
} else aStart++;
|
|
76
|
-
} else
|
|
175
|
+
} else {
|
|
176
|
+
const n = a[aStart++];
|
|
177
|
+
const nTag = n[$$SLOT];
|
|
178
|
+
if (n.parentNode === parentNode && (!nTag || nTag === marker)) n.remove();
|
|
179
|
+
}
|
|
77
180
|
}
|
|
78
181
|
}
|
|
79
182
|
}
|
|
80
183
|
|
|
81
|
-
const
|
|
82
|
-
|
|
184
|
+
const HEAD_ELIGIBLE_TAGS = new Set(["title", "meta", "link", "style", "script", "base"]);
|
|
185
|
+
const HEAD_ATTR_NAME = /^[a-zA-Z_][a-zA-Z0-9_:.-]*$/;
|
|
186
|
+
const RESOURCE_LINK_RELS = new Set(["preload", "modulepreload", "prefetch", "preconnect", "dns-prefetch", "stylesheet"]);
|
|
187
|
+
const RESOURCE_QUALIFIERS = ["as", "crossorigin", "type", "media", "imagesrcset", "imagesizes"];
|
|
188
|
+
const STYLESHEET_FETCH_META = new Set(["crossorigin", "integrity", "referrerpolicy", "fetchpriority"]);
|
|
189
|
+
function evalHeadValue(v) {
|
|
190
|
+
return typeof v === "function" ? v() : v;
|
|
191
|
+
}
|
|
192
|
+
function evalHeadProps(props, presets) {
|
|
193
|
+
const out = {};
|
|
194
|
+
for (const name in props) out[name] = presets && name in presets ? presets[name] : evalHeadValue(props[name]);
|
|
195
|
+
return out;
|
|
196
|
+
}
|
|
197
|
+
function classifyHeadTag(desc) {
|
|
198
|
+
const tag = desc.tag;
|
|
199
|
+
if (tag === "link") {
|
|
200
|
+
const rel = evalHeadValue(desc.props && desc.props.rel);
|
|
201
|
+
return {
|
|
202
|
+
resource: RESOURCE_LINK_RELS.has(rel),
|
|
203
|
+
rel
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
if (tag === "style") return {
|
|
207
|
+
resource: !!(desc.props && "href" in desc.props)
|
|
208
|
+
};
|
|
209
|
+
if (tag === "script") return {
|
|
210
|
+
resource: !!(desc.props && "src" in desc.props)
|
|
211
|
+
};
|
|
212
|
+
return {
|
|
213
|
+
resource: false
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
function resourceIdentity(tag, props) {
|
|
217
|
+
let id = "res:" + tag + ":" + (props.rel || "") + ":" + (props.href || props.src || "");
|
|
218
|
+
for (let i = 0; i < RESOURCE_QUALIFIERS.length; i++) {
|
|
219
|
+
const q = RESOURCE_QUALIFIERS[i];
|
|
220
|
+
if (props[q] != null) id += ":" + q + "=" + props[q];
|
|
221
|
+
}
|
|
222
|
+
return id;
|
|
223
|
+
}
|
|
224
|
+
function replaceableIdentity(tag, props, key, unique) {
|
|
225
|
+
if (tag === "title") return "title";
|
|
226
|
+
if (tag === "base") return "base";
|
|
227
|
+
if (tag === "meta" && props.charset != null) return "charset";
|
|
228
|
+
if (key != null) return tag + ":key:" + key;
|
|
229
|
+
if (tag === "meta") {
|
|
230
|
+
for (const ns of ["name", "property", "http-equiv"]) if (props[ns] != null) return "meta:" + ns + ":" + props[ns] + (props.media != null ? ":media=" + props.media : "");
|
|
231
|
+
return unique;
|
|
232
|
+
}
|
|
233
|
+
if (tag === "link") {
|
|
234
|
+
const rel = props.rel || "";
|
|
235
|
+
if (rel === "icon" || rel === "apple-touch-icon") return "link:" + rel + (props.sizes != null ? ":sizes=" + props.sizes : "") + (props.type != null ? ":type=" + props.type : "");
|
|
236
|
+
return "link:" + rel + ":" + (props.href || "");
|
|
237
|
+
}
|
|
238
|
+
return unique;
|
|
239
|
+
}
|
|
240
|
+
function resolveHead(groups) {
|
|
241
|
+
const winners = new Map();
|
|
242
|
+
const sorted = groups.slice().sort((a, b) => a.seq - b.seq);
|
|
243
|
+
for (let i = 0; i < sorted.length; i++) {
|
|
244
|
+
const group = sorted[i];
|
|
245
|
+
const byIdentity = new Map();
|
|
246
|
+
for (let j = 0; j < group.tags.length; j++) {
|
|
247
|
+
const t = group.tags[j];
|
|
248
|
+
let list = byIdentity.get(t.identity);
|
|
249
|
+
if (!list) byIdentity.set(t.identity, list = []);
|
|
250
|
+
list.push(t);
|
|
251
|
+
}
|
|
252
|
+
for (const [identity, tags] of byIdentity) {
|
|
253
|
+
if (identity === "title") {
|
|
254
|
+
winners.set(identity, {
|
|
255
|
+
seq: group.seq,
|
|
256
|
+
tags: [tags[tags.length - 1]]
|
|
257
|
+
});
|
|
258
|
+
} else {
|
|
259
|
+
winners.set(identity, {
|
|
260
|
+
seq: group.seq,
|
|
261
|
+
tags
|
|
262
|
+
});
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
return winners;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
function parseCookieHeader(header) {
|
|
270
|
+
const cookies = {};
|
|
271
|
+
if (!header) return cookies;
|
|
272
|
+
for (const part of header.split(";")) {
|
|
273
|
+
const eq = part.indexOf("=");
|
|
274
|
+
if (eq < 0) continue;
|
|
275
|
+
const name = decodeSafe(part.slice(0, eq).trim());
|
|
276
|
+
let value = part.slice(eq + 1).trim();
|
|
277
|
+
if (value.length > 1 && value[0] === '"' && value[value.length - 1] === '"') {
|
|
278
|
+
value = value.slice(1, -1);
|
|
279
|
+
}
|
|
280
|
+
cookies[name] = decodeSafe(value);
|
|
281
|
+
}
|
|
282
|
+
return cookies;
|
|
283
|
+
}
|
|
284
|
+
function decodeSafe(text) {
|
|
285
|
+
try {
|
|
286
|
+
return decodeURIComponent(text);
|
|
287
|
+
} catch {
|
|
288
|
+
return text;
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
function serializeCookie(name, value, options = {}) {
|
|
292
|
+
let cookie = `${encodeURIComponent(name)}=${encodeURIComponent(value)}`;
|
|
293
|
+
cookie += `; Path=${options.path === undefined ? "/" : options.path}`;
|
|
294
|
+
if (options.domain) cookie += `; Domain=${options.domain}`;
|
|
295
|
+
if (options.maxAge !== undefined) cookie += `; Max-Age=${Math.trunc(options.maxAge)}`;
|
|
296
|
+
if (options.expires) cookie += `; Expires=${options.expires.toUTCString()}`;
|
|
297
|
+
if (options.httpOnly) cookie += "; HttpOnly";
|
|
298
|
+
if (options.secure) cookie += "; Secure";
|
|
299
|
+
if (options.sameSite) {
|
|
300
|
+
const sameSite = options.sameSite.toLowerCase();
|
|
301
|
+
cookie += `; SameSite=${sameSite === "none" ? "None" : sameSite === "strict" ? "Strict" : "Lax"}`;
|
|
302
|
+
}
|
|
303
|
+
return cookie;
|
|
304
|
+
}
|
|
305
|
+
const FLASH_COOKIE = "flash";
|
|
306
|
+
const FLASH_MATCHER = new RegExp(`(?:^|;\\s*)${FLASH_COOKIE}=([^;]+)`);
|
|
307
|
+
function hasFlashCookie(cookieHeader) {
|
|
308
|
+
return !!cookieHeader && FLASH_MATCHER.test(cookieHeader);
|
|
309
|
+
}
|
|
310
|
+
function clearFlashCookie() {
|
|
311
|
+
return `${FLASH_COOKIE}=; Max-Age=0; Path=/`;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
const SERVER_FUNCTION_METADATA = Symbol.for("solid.ServerFunctionMetadata");
|
|
315
|
+
function getServerFunctionMetadata(fn) {
|
|
316
|
+
if (typeof fn !== "function") return undefined;
|
|
317
|
+
return fn[SERVER_FUNCTION_METADATA] || undefined;
|
|
318
|
+
}
|
|
319
|
+
function isServerFunction(fn) {
|
|
320
|
+
return typeof fn === "function" && !!fn[SERVER_FUNCTION_METADATA];
|
|
321
|
+
}
|
|
322
|
+
const SERVER_FUNCTION_RPC = Symbol.for("solid.ServerFunctionRPC");
|
|
323
|
+
function getServerFunctionRPC() {
|
|
324
|
+
return globalThis[SERVER_FUNCTION_RPC];
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
const $$EVENT_OWNER = "_$DX_EVENT_OWNER";
|
|
328
|
+
const INNER_OWNED = {};
|
|
329
|
+
const delegatedEvents = new Set();
|
|
330
|
+
const delegatedContainers = new Map();
|
|
331
|
+
function render$1(code, element, init, options = {}) {
|
|
83
332
|
let disposer;
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
333
|
+
registerDelegatedRoot(element);
|
|
334
|
+
try {
|
|
335
|
+
solidJs.createRoot(dispose => {
|
|
336
|
+
disposer = dispose;
|
|
337
|
+
if (element === document) {
|
|
338
|
+
const tree = code();
|
|
339
|
+
effect(() => solidJs.flatten(tree), () => {});
|
|
340
|
+
} else {
|
|
341
|
+
const tree = code();
|
|
342
|
+
insert(element, () => tree, element.firstChild ? null : undefined, init, options.insertOptions);
|
|
343
|
+
}
|
|
344
|
+
}, {
|
|
345
|
+
id: options.renderId
|
|
346
|
+
});
|
|
347
|
+
} catch (err) {
|
|
348
|
+
if (disposer) disposer();
|
|
349
|
+
unregisterDelegatedRoot(element);
|
|
350
|
+
throw err;
|
|
351
|
+
}
|
|
90
352
|
return () => {
|
|
91
353
|
disposer();
|
|
354
|
+
unregisterDelegatedRoot(element);
|
|
92
355
|
element.textContent = "";
|
|
93
356
|
};
|
|
94
357
|
}
|
|
95
|
-
function
|
|
358
|
+
function create(html, bypassGuard, flag) {
|
|
359
|
+
const t = document.createElement("template");
|
|
360
|
+
t.innerHTML = html;
|
|
361
|
+
return flag === 2 ? t.content.firstChild.firstChild : t.content.firstChild;
|
|
362
|
+
}
|
|
363
|
+
function template(html, flag) {
|
|
96
364
|
let node;
|
|
97
|
-
const
|
|
98
|
-
|
|
99
|
-
t.innerHTML = html;
|
|
100
|
-
return isSVG ? t.content.firstChild.firstChild : isMathML ? t.firstChild : t.content.firstChild;
|
|
101
|
-
};
|
|
102
|
-
return isImportNode ? () => solidJs.untrack(() => document.importNode(node || (node = create()), true)) : () => (node || (node = create())).cloneNode(true);
|
|
365
|
+
const fn = flag === 1 ? bypassGuard => document.importNode(node || (node = create(html, bypassGuard, flag)), true) : bypassGuard => (node || (node = create(html, bypassGuard, flag))).cloneNode(true);
|
|
366
|
+
return fn;
|
|
103
367
|
}
|
|
104
|
-
function delegateEvents(eventNames
|
|
105
|
-
const e = document[$$EVENTS] || (document[$$EVENTS] = new Set());
|
|
368
|
+
function delegateEvents(eventNames) {
|
|
106
369
|
for (let i = 0, l = eventNames.length; i < l; i++) {
|
|
107
370
|
const name = eventNames[i];
|
|
108
|
-
if (!
|
|
109
|
-
|
|
110
|
-
|
|
371
|
+
if (!delegatedEvents.has(name)) {
|
|
372
|
+
delegatedEvents.add(name);
|
|
373
|
+
delegatedContainers.forEach((state, container) => attachDelegatedEvent(name, container, state));
|
|
111
374
|
}
|
|
112
375
|
}
|
|
113
376
|
}
|
|
114
|
-
function
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
377
|
+
function registerDelegatedRoot(root) {
|
|
378
|
+
const state = registerDelegatedContainer(root, root);
|
|
379
|
+
if (state) state.roots = (state.roots || 0) + 1;
|
|
380
|
+
}
|
|
381
|
+
function unregisterDelegatedRoot(root) {
|
|
382
|
+
const state = delegatedContainers.get(root);
|
|
383
|
+
if (state) state.roots > 1 ? state.roots-- : delete state.roots;
|
|
384
|
+
unregisterDelegatedContainer(root, root);
|
|
385
|
+
}
|
|
386
|
+
function registerDelegatedContainer(container, owner = container) {
|
|
387
|
+
if (!container || !owner) return;
|
|
388
|
+
let state = delegatedContainers.get(container);
|
|
389
|
+
if (!state) delegatedContainers.set(container, state = {
|
|
390
|
+
owners: new Map(),
|
|
391
|
+
handlers: new Map()
|
|
392
|
+
});
|
|
393
|
+
state.owners.set(owner, (state.owners.get(owner) || 0) + 1);
|
|
394
|
+
delegatedEvents.forEach(name => attachDelegatedEvent(name, container, state));
|
|
395
|
+
return state;
|
|
396
|
+
}
|
|
397
|
+
function unregisterDelegatedContainer(container, owner = container) {
|
|
398
|
+
const state = delegatedContainers.get(container);
|
|
399
|
+
if (!state) return;
|
|
400
|
+
const count = state.owners.get(owner);
|
|
401
|
+
if (count > 1) state.owners.set(owner, count - 1);else state.owners.delete(owner);
|
|
402
|
+
if (state.owners.size) return;
|
|
403
|
+
state.handlers.forEach((handler, name) => container.removeEventListener(name, handler));
|
|
404
|
+
delegatedContainers.delete(container);
|
|
405
|
+
}
|
|
406
|
+
function attachDelegatedEvent(name, container, state) {
|
|
407
|
+
if (state.handlers.has(name)) return;
|
|
408
|
+
const handler = e => eventHandler(e, container, state);
|
|
409
|
+
state.handlers.set(name, handler);
|
|
410
|
+
container.addEventListener(name, handler);
|
|
411
|
+
}
|
|
412
|
+
function getDelegatedRoot(node) {
|
|
413
|
+
while (node) {
|
|
414
|
+
if (delegatedContainers.get(node)?.roots) return node;
|
|
415
|
+
node = node._$host || node.parentNode || node.host;
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
function findOwner(target, state) {
|
|
419
|
+
let node = target;
|
|
420
|
+
let distance = 0;
|
|
421
|
+
while (node) {
|
|
422
|
+
if (state.owners.has(node)) return {
|
|
423
|
+
owner: node,
|
|
424
|
+
distance
|
|
425
|
+
};
|
|
426
|
+
distance++;
|
|
427
|
+
node = node._$host || node.parentNode || node.host;
|
|
118
428
|
}
|
|
119
429
|
}
|
|
120
430
|
function setProperty(node, name, value) {
|
|
121
431
|
if (isHydrating(node)) return;
|
|
122
432
|
node[name] = value;
|
|
123
433
|
}
|
|
434
|
+
let claimHandlers = null;
|
|
435
|
+
const CLAIM_SEAM = Symbol.for("dom-expressions.element-claims");
|
|
436
|
+
function registerElementClaim(handler) {
|
|
437
|
+
(claimHandlers || (claimHandlers = globalThis[CLAIM_SEAM] = [])).push(handler);
|
|
438
|
+
return () => {
|
|
439
|
+
const index = claimHandlers.indexOf(handler);
|
|
440
|
+
index > -1 && claimHandlers.splice(index, 1);
|
|
441
|
+
};
|
|
442
|
+
}
|
|
443
|
+
const CLAIMED_ELEMENTS = "a[href], form[action]";
|
|
444
|
+
function claimElementTree(root) {
|
|
445
|
+
const handlers = globalThis[CLAIM_SEAM];
|
|
446
|
+
if (handlers === undefined || handlers.length === 0) return root;
|
|
447
|
+
const isElement = root.nodeType === 1;
|
|
448
|
+
if (!isElement && root.nodeType !== 11) return root;
|
|
449
|
+
if (isElement && root.matches(CLAIMED_ELEMENTS)) {
|
|
450
|
+
for (let i = 0; i < handlers.length; i++) handlers[i](root);
|
|
451
|
+
}
|
|
452
|
+
const found = root.querySelectorAll(CLAIMED_ELEMENTS);
|
|
453
|
+
for (let i = 0; i < found.length; i++) {
|
|
454
|
+
for (let j = 0; j < handlers.length; j++) handlers[j](found[i]);
|
|
455
|
+
}
|
|
456
|
+
return root;
|
|
457
|
+
}
|
|
458
|
+
function claimElement(node) {
|
|
459
|
+
if (claimHandlers !== null) {
|
|
460
|
+
for (let i = 0; i < claimHandlers.length; i++) claimHandlers[i](node);
|
|
461
|
+
}
|
|
462
|
+
return node;
|
|
463
|
+
}
|
|
124
464
|
function setAttribute(node, name, value) {
|
|
125
465
|
if (isHydrating(node)) return;
|
|
126
466
|
if (value == null || value === false) node.removeAttribute(name);else node.setAttribute(name, value === true ? "" : value);
|
|
467
|
+
if (claimHandlers !== null && (name === "href" || name === "action")) claimElement(node);
|
|
127
468
|
}
|
|
128
469
|
function setAttributeNS(node, namespace, name, value) {
|
|
129
470
|
if (isHydrating(node)) return;
|
|
130
|
-
if (value == null) node.removeAttributeNS(namespace, name);else node.setAttributeNS(namespace, name, value);
|
|
471
|
+
if (value == null || value === false) node.removeAttributeNS(namespace, name.indexOf(":") > -1 ? name.split(":").pop() : name);else node.setAttributeNS(namespace, name, value === true ? "" : value);
|
|
131
472
|
}
|
|
132
|
-
function className(node, value,
|
|
473
|
+
function className(node, value, prev) {
|
|
133
474
|
if (isHydrating(node)) return;
|
|
134
475
|
if (value == null || value === false) {
|
|
135
476
|
prev && node.removeAttribute("class");
|
|
136
477
|
return;
|
|
137
478
|
}
|
|
138
479
|
if (typeof value === "string") {
|
|
139
|
-
value !== prev &&
|
|
480
|
+
value !== prev && node.setAttribute("class", value);
|
|
140
481
|
return;
|
|
141
482
|
}
|
|
142
483
|
if (typeof prev === "string") {
|
|
@@ -150,16 +491,16 @@ function className(node, value, isSVG, prev) {
|
|
|
150
491
|
for (i = 0, len = prevKeys.length; i < len; i++) {
|
|
151
492
|
const key = prevKeys[i];
|
|
152
493
|
if (!key || key === "undefined" || value[key]) continue;
|
|
153
|
-
|
|
494
|
+
node.classList.remove(key);
|
|
154
495
|
}
|
|
155
496
|
for (i = 0, len = classKeys.length; i < len; i++) {
|
|
156
497
|
const key = classKeys[i],
|
|
157
498
|
classValue = !!value[key];
|
|
158
499
|
if (!key || key === "undefined" || prev[key] === classValue || !classValue) continue;
|
|
159
|
-
|
|
500
|
+
node.classList.add(key);
|
|
160
501
|
}
|
|
161
502
|
}
|
|
162
|
-
function
|
|
503
|
+
function addEvent(node, name, handler, delegate) {
|
|
163
504
|
if (delegate) {
|
|
164
505
|
if (Array.isArray(handler)) {
|
|
165
506
|
node[`$$${name}`] = handler[0];
|
|
@@ -172,42 +513,60 @@ function addEventListener(node, name, handler, delegate) {
|
|
|
172
513
|
}
|
|
173
514
|
function style(node, value, prev) {
|
|
174
515
|
if (!value) {
|
|
175
|
-
prev
|
|
516
|
+
if (prev || node._$styles) {
|
|
517
|
+
setAttribute(node, "style");
|
|
518
|
+
node._$styles = undefined;
|
|
519
|
+
}
|
|
176
520
|
return;
|
|
177
521
|
}
|
|
178
522
|
const nodeStyle = node.style;
|
|
179
|
-
if (typeof value === "string")
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
523
|
+
if (typeof value === "string") {
|
|
524
|
+
node._$styles = undefined;
|
|
525
|
+
return nodeStyle.cssText = value;
|
|
526
|
+
}
|
|
527
|
+
if (typeof prev === "string") {
|
|
528
|
+
nodeStyle.cssText = "";
|
|
529
|
+
prev = undefined;
|
|
530
|
+
}
|
|
531
|
+
let applied = node._$styles;
|
|
532
|
+
if (!applied) {
|
|
533
|
+
applied = node._$styles = prev ? {
|
|
534
|
+
...prev
|
|
535
|
+
} : {};
|
|
536
|
+
}
|
|
183
537
|
let v, s;
|
|
538
|
+
for (s in applied) {
|
|
539
|
+
if (value[s] == null) {
|
|
540
|
+
nodeStyle.removeProperty(s);
|
|
541
|
+
delete applied[s];
|
|
542
|
+
}
|
|
543
|
+
}
|
|
184
544
|
for (s in value) {
|
|
185
545
|
v = value[s];
|
|
186
|
-
if (v !==
|
|
187
|
-
|
|
546
|
+
if (v != null && v !== applied[s]) {
|
|
547
|
+
nodeStyle.setProperty(s, v);
|
|
548
|
+
applied[s] = v;
|
|
549
|
+
}
|
|
188
550
|
}
|
|
189
|
-
for (s in prev) value[s] == null && nodeStyle.removeProperty(s);
|
|
190
551
|
}
|
|
191
552
|
function setStyleProperty(node, name, value) {
|
|
192
553
|
value != null ? node.style.setProperty(name, value) : node.style.removeProperty(name);
|
|
193
554
|
}
|
|
194
|
-
function spread(node, props = {},
|
|
555
|
+
function spread(node, props = {}, skipChildren) {
|
|
195
556
|
const prevProps = {};
|
|
196
|
-
if (!skipChildren)
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
solidJs.createRenderEffect(() => typeof props.ref === "function" && use(props.ref, node), () => {});
|
|
203
|
-
solidJs.createRenderEffect(() => {
|
|
557
|
+
if (!skipChildren) insert(node, () => props.children);
|
|
558
|
+
effect(() => {
|
|
559
|
+
const r = props.ref;
|
|
560
|
+
(typeof r === "function" || Array.isArray(r)) && ref(() => r, node);
|
|
561
|
+
}, () => {});
|
|
562
|
+
effect(() => {
|
|
204
563
|
const newProps = {};
|
|
205
564
|
for (const prop in props) {
|
|
206
565
|
if (prop === "children" || prop === "ref") continue;
|
|
207
566
|
newProps[prop] = props[prop];
|
|
208
567
|
}
|
|
209
568
|
return newProps;
|
|
210
|
-
}, props => assign(node, props,
|
|
569
|
+
}, props => assign(node, props, true, prevProps, true));
|
|
211
570
|
return prevProps;
|
|
212
571
|
}
|
|
213
572
|
function dynamicProperty(props, key) {
|
|
@@ -220,48 +579,615 @@ function dynamicProperty(props, key) {
|
|
|
220
579
|
});
|
|
221
580
|
return props;
|
|
222
581
|
}
|
|
223
|
-
function
|
|
224
|
-
|
|
582
|
+
function applyRef(r, element) {
|
|
583
|
+
Array.isArray(r) ? r.flat(Infinity).forEach(f => f && f(element)) : r(element);
|
|
584
|
+
}
|
|
585
|
+
function ref(fn, element) {
|
|
586
|
+
const resolved = solidJs.untrack(fn);
|
|
587
|
+
solidJs.runWithOwner(null, () => applyRef(resolved, element));
|
|
588
|
+
}
|
|
589
|
+
function scope(fn) {
|
|
590
|
+
fn.$s = true;
|
|
591
|
+
return fn;
|
|
592
|
+
}
|
|
593
|
+
const SCOPE_OPTIONS = {
|
|
594
|
+
scope: true
|
|
595
|
+
};
|
|
596
|
+
let hydrationRt = null;
|
|
597
|
+
function installHydrationRuntime() {
|
|
598
|
+
hydrationRt = {
|
|
599
|
+
claimInitial(parent, multi, initial) {
|
|
600
|
+
if (isHydrating(parent)) {
|
|
601
|
+
if (!multi && initial === undefined && parent) initial = [...parent.childNodes];
|
|
602
|
+
if (Array.isArray(initial)) stripTextSeparators(initial);
|
|
603
|
+
}
|
|
604
|
+
return initial;
|
|
605
|
+
},
|
|
606
|
+
reclaimRegion(current, parent, marker) {
|
|
607
|
+
if (!solidJs.sharedConfig.hydrating || !current || !parent.isConnected) return current;
|
|
608
|
+
const first = Array.isArray(current) ? current[0] : current;
|
|
609
|
+
if (!first || !first.nodeType || first.isConnected) return current;
|
|
610
|
+
let nodes;
|
|
611
|
+
if (marker) {
|
|
612
|
+
nodes = [];
|
|
613
|
+
let node = marker.previousSibling,
|
|
614
|
+
depth = 0;
|
|
615
|
+
while (node) {
|
|
616
|
+
if (node.nodeType === 8) {
|
|
617
|
+
const v = node.nodeValue;
|
|
618
|
+
if (v === "/") depth++;else if (v === "$") {
|
|
619
|
+
if (depth === 0) break;
|
|
620
|
+
depth--;
|
|
621
|
+
}
|
|
622
|
+
}
|
|
623
|
+
nodes.unshift(node);
|
|
624
|
+
node = node.previousSibling;
|
|
625
|
+
}
|
|
626
|
+
} else nodes = [...parent.childNodes];
|
|
627
|
+
return stripTextSeparators(nodes);
|
|
628
|
+
},
|
|
629
|
+
dedupEvent(e) {
|
|
630
|
+
return !!(solidJs.sharedConfig.registry && solidJs.sharedConfig.events && solidJs.sharedConfig.events.find(([el, ev]) => ev === e));
|
|
631
|
+
}
|
|
632
|
+
};
|
|
633
|
+
}
|
|
634
|
+
function stripTextSeparators(nodes) {
|
|
635
|
+
let j = 0;
|
|
636
|
+
for (let i = 0; i < nodes.length; i++) {
|
|
637
|
+
const node = nodes[i],
|
|
638
|
+
t = node.nodeType;
|
|
639
|
+
if (t === 8) {
|
|
640
|
+
const v = node.nodeValue;
|
|
641
|
+
if (v === "!$") {
|
|
642
|
+
node.remove();
|
|
643
|
+
continue;
|
|
644
|
+
}
|
|
645
|
+
if (v.startsWith("pl-")) continue;
|
|
646
|
+
} else if (t === 1 && node.localName === "template" && node.id.startsWith("pl-")) continue;
|
|
647
|
+
nodes[j++] = node;
|
|
648
|
+
}
|
|
649
|
+
nodes.length = j;
|
|
650
|
+
return nodes;
|
|
225
651
|
}
|
|
226
|
-
function insert(parent, accessor, marker, initial) {
|
|
652
|
+
function insert(parent, accessor, marker, initial, options) {
|
|
227
653
|
const multi = marker !== undefined;
|
|
654
|
+
const host = options && options.host;
|
|
228
655
|
if (multi && !initial) initial = [];
|
|
656
|
+
if (hydrationRt !== null) initial = hydrationRt.claimInitial(parent, multi, initial);
|
|
229
657
|
if (typeof accessor !== "function") {
|
|
230
658
|
accessor = normalize(accessor, initial, multi, true);
|
|
231
|
-
if (typeof accessor !== "function")
|
|
659
|
+
if (typeof accessor !== "function") {
|
|
660
|
+
insertExpression(parent, accessor, initial, marker);
|
|
661
|
+
host && tagHost(accessor, host);
|
|
662
|
+
return;
|
|
663
|
+
}
|
|
664
|
+
}
|
|
665
|
+
if (multi && initial.length === 0) {
|
|
666
|
+
const placeholder = document.createTextNode("");
|
|
667
|
+
parent.insertBefore(placeholder, marker);
|
|
668
|
+
initial = [placeholder];
|
|
232
669
|
}
|
|
233
|
-
|
|
670
|
+
let current = initial;
|
|
671
|
+
effect(prev => {
|
|
672
|
+
if (hydrationRt !== null) current = hydrationRt.reclaimRegion(current, parent, marker);
|
|
673
|
+
const value = normalize(accessor(), current, multi, true);
|
|
674
|
+
if (typeof value !== "function") return value;
|
|
675
|
+
effect(() => (hydrationRt !== null && (current = hydrationRt.reclaimRegion(current, parent, marker)), normalize(value, current, multi)), inner => {
|
|
676
|
+
current = insertExpression(parent, inner, current, marker);
|
|
677
|
+
host && tagHost(current, host);
|
|
678
|
+
}, prev !== undefined && !(options && options.schedule) ? {
|
|
679
|
+
...options,
|
|
680
|
+
schedule: true
|
|
681
|
+
} : options);
|
|
682
|
+
return INNER_OWNED;
|
|
683
|
+
}, value => {
|
|
684
|
+
if (value === INNER_OWNED) return;
|
|
685
|
+
current = insertExpression(parent, value, current, marker);
|
|
686
|
+
host && tagHost(current, host);
|
|
687
|
+
},
|
|
688
|
+
accessor.$s ? options ? {
|
|
689
|
+
...options,
|
|
690
|
+
scope: true
|
|
691
|
+
} : SCOPE_OPTIONS : options);
|
|
234
692
|
}
|
|
235
|
-
function assign(node, props,
|
|
693
|
+
function assign(node, props, skipChildren, prevProps = {}, skipRef = false) {
|
|
694
|
+
const nodeName = node.nodeName;
|
|
236
695
|
props || (props = {});
|
|
237
696
|
for (const prop in prevProps) {
|
|
238
697
|
if (!(prop in props)) {
|
|
239
698
|
if (prop === "children") continue;
|
|
240
|
-
prevProps[prop] = assignProp(node, prop, null, prevProps[prop],
|
|
699
|
+
prevProps[prop] = assignProp(node, prop, null, prevProps[prop], skipRef, nodeName);
|
|
241
700
|
}
|
|
242
701
|
}
|
|
243
702
|
for (const prop in props) {
|
|
244
703
|
if (prop === "children") {
|
|
245
|
-
if (!skipChildren) insertExpression(node, props.children);
|
|
704
|
+
if (!skipChildren) insertExpression(node, normalize(props.children, undefined, false));
|
|
246
705
|
continue;
|
|
247
706
|
}
|
|
248
|
-
|
|
249
|
-
prevProps[prop] = assignProp(node, prop, value, prevProps[prop], isSVG, skipRef);
|
|
707
|
+
prevProps[prop] = assignProp(node, prop, props[prop], prevProps[prop], skipRef, nodeName);
|
|
250
708
|
}
|
|
251
709
|
}
|
|
710
|
+
const ASSET_REMOVAL_GRACE = 100;
|
|
711
|
+
const assetRegistry = new Map();
|
|
712
|
+
function assetEntryKey(descriptor) {
|
|
713
|
+
if (descriptor.policy === "exclusive") return "x|" + descriptor.key;
|
|
714
|
+
return descriptor.type === "inline-style" ? "i|" + descriptor.id : descriptor.type + "|" + descriptor.href;
|
|
715
|
+
}
|
|
716
|
+
function findAssetElement(selector, attr, value) {
|
|
717
|
+
const nodes = document.querySelectorAll(selector);
|
|
718
|
+
for (let i = 0; i < nodes.length; i++) {
|
|
719
|
+
if (nodes[i].getAttribute(attr) === value) return nodes[i];
|
|
720
|
+
}
|
|
721
|
+
return null;
|
|
722
|
+
}
|
|
723
|
+
function setAssetAttrs(el, attrs) {
|
|
724
|
+
for (const name in attrs) el.setAttribute(name, attrs[name]);
|
|
725
|
+
}
|
|
726
|
+
function mountAssetElement(descriptor) {
|
|
727
|
+
let el;
|
|
728
|
+
if (descriptor.type === "inline-style") {
|
|
729
|
+
el = findAssetElement("style[data-asset]", "data-asset", descriptor.id);
|
|
730
|
+
if (!el) {
|
|
731
|
+
el = document.createElement("style");
|
|
732
|
+
el.setAttribute("data-asset", descriptor.id);
|
|
733
|
+
el.textContent = descriptor.content || "";
|
|
734
|
+
}
|
|
735
|
+
} else {
|
|
736
|
+
const rel = descriptor.type === "module" ? "modulepreload" : "stylesheet";
|
|
737
|
+
el = findAssetElement(`link[rel="${rel}"]`, "href", descriptor.href);
|
|
738
|
+
if (!el) {
|
|
739
|
+
el = document.createElement("link");
|
|
740
|
+
el.rel = rel;
|
|
741
|
+
el.href = descriptor.href;
|
|
742
|
+
}
|
|
743
|
+
}
|
|
744
|
+
if (descriptor.attrs) setAssetAttrs(el, descriptor.attrs);
|
|
745
|
+
if (!el.isConnected) document.head.appendChild(el);
|
|
746
|
+
return el;
|
|
747
|
+
}
|
|
748
|
+
const assetLoadSettled = /*#__PURE__*/Promise.resolve();
|
|
749
|
+
function trackAssetLoad(entry, adopted) {
|
|
750
|
+
if (entry.loadPromise) return;
|
|
751
|
+
const el = entry.element;
|
|
752
|
+
let settled = el.sheet != null;
|
|
753
|
+
if (!settled && adopted && typeof performance !== "undefined" && performance.getEntriesByName) {
|
|
754
|
+
settled = performance.getEntriesByName(el.href).length > 0;
|
|
755
|
+
}
|
|
756
|
+
if (settled) {
|
|
757
|
+
entry.loadState = "loaded";
|
|
758
|
+
entry.loadPromise = assetLoadSettled;
|
|
759
|
+
return;
|
|
760
|
+
}
|
|
761
|
+
entry.loadState = "pending";
|
|
762
|
+
entry.loadPromise = new Promise(resolve => {
|
|
763
|
+
const settle = state => {
|
|
764
|
+
entry.loadState = state;
|
|
765
|
+
resolve();
|
|
766
|
+
};
|
|
767
|
+
el.addEventListener("load", () => settle("loaded"), {
|
|
768
|
+
once: true
|
|
769
|
+
});
|
|
770
|
+
el.addEventListener("error", () => settle("errored"), {
|
|
771
|
+
once: true
|
|
772
|
+
});
|
|
773
|
+
});
|
|
774
|
+
}
|
|
775
|
+
function warmAsset(descriptor) {
|
|
776
|
+
if (descriptor.policy === "exclusive" || descriptor.type === "inline-style") return;
|
|
777
|
+
const key = assetEntryKey(descriptor);
|
|
778
|
+
let entry = assetRegistry.get(key);
|
|
779
|
+
if (!entry) {
|
|
780
|
+
entry = {
|
|
781
|
+
count: 0,
|
|
782
|
+
element: null,
|
|
783
|
+
timer: null
|
|
784
|
+
};
|
|
785
|
+
assetRegistry.set(key, entry);
|
|
786
|
+
}
|
|
787
|
+
let adopted = true;
|
|
788
|
+
if (!entry.element || !entry.element.isConnected) {
|
|
789
|
+
const rel = descriptor.type === "module" ? "modulepreload" : "stylesheet";
|
|
790
|
+
let el = findAssetElement(`link[rel="${rel}"]`, "href", descriptor.href);
|
|
791
|
+
if (!el && descriptor.type === "style") {
|
|
792
|
+
el = findAssetElement('link[rel="preload"][as="style"]', "href", descriptor.href);
|
|
793
|
+
}
|
|
794
|
+
if (!el) {
|
|
795
|
+
adopted = false;
|
|
796
|
+
el = document.createElement("link");
|
|
797
|
+
if (descriptor.type === "style") {
|
|
798
|
+
el.setAttribute("rel", "preload");
|
|
799
|
+
el.setAttribute("as", "style");
|
|
800
|
+
} else {
|
|
801
|
+
el.setAttribute("rel", "modulepreload");
|
|
802
|
+
}
|
|
803
|
+
el.setAttribute("href", descriptor.href);
|
|
804
|
+
if (!document.body) el.setAttribute("blocking", "render");
|
|
805
|
+
}
|
|
806
|
+
if (descriptor.attrs) setAssetAttrs(el, descriptor.attrs);
|
|
807
|
+
if (!el.isConnected) document.head.appendChild(el);
|
|
808
|
+
entry.element = el;
|
|
809
|
+
entry.loadState = undefined;
|
|
810
|
+
entry.loadPromise = undefined;
|
|
811
|
+
}
|
|
812
|
+
if (descriptor.type === "style") trackAssetLoad(entry, adopted);
|
|
813
|
+
return entry;
|
|
814
|
+
}
|
|
815
|
+
function acquireAsset(descriptor) {
|
|
816
|
+
const key = assetEntryKey(descriptor);
|
|
817
|
+
let entry = assetRegistry.get(key);
|
|
818
|
+
if (descriptor.policy === "exclusive") {
|
|
819
|
+
if (!entry) {
|
|
820
|
+
entry = {
|
|
821
|
+
original: descriptor.get(),
|
|
822
|
+
set: descriptor.set,
|
|
823
|
+
writers: []
|
|
824
|
+
};
|
|
825
|
+
assetRegistry.set(key, entry);
|
|
826
|
+
}
|
|
827
|
+
const writer = {
|
|
828
|
+
value: descriptor.value
|
|
829
|
+
};
|
|
830
|
+
entry.writers.push(writer);
|
|
831
|
+
entry.set(writer.value);
|
|
832
|
+
let released = false;
|
|
833
|
+
return () => {
|
|
834
|
+
if (released) return;
|
|
835
|
+
released = true;
|
|
836
|
+
const index = entry.writers.indexOf(writer);
|
|
837
|
+
const wasTop = index === entry.writers.length - 1;
|
|
838
|
+
entry.writers.splice(index, 1);
|
|
839
|
+
if (!wasTop) return;
|
|
840
|
+
if (entry.writers.length) {
|
|
841
|
+
entry.set(entry.writers[entry.writers.length - 1].value);
|
|
842
|
+
} else {
|
|
843
|
+
entry.set(entry.original);
|
|
844
|
+
assetRegistry.delete(key);
|
|
845
|
+
}
|
|
846
|
+
};
|
|
847
|
+
}
|
|
848
|
+
if (!entry) {
|
|
849
|
+
entry = {
|
|
850
|
+
count: 0,
|
|
851
|
+
element: null,
|
|
852
|
+
timer: null
|
|
853
|
+
};
|
|
854
|
+
assetRegistry.set(key, entry);
|
|
855
|
+
}
|
|
856
|
+
if (entry.timer) {
|
|
857
|
+
clearTimeout(entry.timer);
|
|
858
|
+
entry.timer = null;
|
|
859
|
+
}
|
|
860
|
+
entry.count++;
|
|
861
|
+
if (!entry.element || !entry.element.isConnected) {
|
|
862
|
+
entry.element = mountAssetElement(descriptor);
|
|
863
|
+
} else if (descriptor.type === "style" && entry.element.getAttribute("rel") === "preload") {
|
|
864
|
+
entry.element.removeAttribute("as");
|
|
865
|
+
entry.element.setAttribute("rel", "stylesheet");
|
|
866
|
+
}
|
|
867
|
+
let released = false;
|
|
868
|
+
return () => {
|
|
869
|
+
if (released) return;
|
|
870
|
+
released = true;
|
|
871
|
+
if (--entry.count > 0) return;
|
|
872
|
+
entry.timer = setTimeout(() => {
|
|
873
|
+
assetRegistry.delete(key);
|
|
874
|
+
entry.element && entry.element.remove();
|
|
875
|
+
}, ASSET_REMOVAL_GRACE);
|
|
876
|
+
};
|
|
877
|
+
}
|
|
878
|
+
let headRegistrations = null;
|
|
879
|
+
let headSeq = 0;
|
|
880
|
+
let headUid = 0;
|
|
881
|
+
let headOwned = null;
|
|
882
|
+
let headApplied = null;
|
|
883
|
+
let headFallbackTitle = null;
|
|
884
|
+
let headScheduled = false;
|
|
885
|
+
const headMountedResources = new Set();
|
|
886
|
+
function initHeadRegistry() {
|
|
887
|
+
if (headRegistrations) return;
|
|
888
|
+
headRegistrations = [];
|
|
889
|
+
headOwned = new Map();
|
|
890
|
+
headApplied = new Map();
|
|
891
|
+
const t = document.querySelector("title");
|
|
892
|
+
headFallbackTitle = t && !t.hasAttribute("data-dh") ? t.textContent : null;
|
|
893
|
+
if (globalThis._$HY) globalThis._$HY.h = applyServerHeadOps;
|
|
894
|
+
}
|
|
895
|
+
function applyServerHeadOps(ops) {
|
|
896
|
+
for (let i = 0; i < ops.length; i++) {
|
|
897
|
+
const op = ops[i];
|
|
898
|
+
const identity = op[0] === "t" ? "title" : op[1];
|
|
899
|
+
if (headOwned.has(identity)) continue;
|
|
900
|
+
if (op[0] === "t") setHeadTitle(op[1]);else if (op[0] === "r") {
|
|
901
|
+
const els = headMarkedElements(identity);
|
|
902
|
+
for (let j = 0; j < els.length; j++) els[j].remove();
|
|
903
|
+
} else {
|
|
904
|
+
const el = document.createElement(op[2]);
|
|
905
|
+
for (const name in op[3]) el.setAttribute(name, op[3][name]);
|
|
906
|
+
if (op[4] != null) el.textContent = op[4];
|
|
907
|
+
el.setAttribute("data-dh", identity);
|
|
908
|
+
document.head.appendChild(el);
|
|
909
|
+
}
|
|
910
|
+
}
|
|
911
|
+
}
|
|
912
|
+
function headMarkedElements(identity) {
|
|
913
|
+
const nodes = document.head.querySelectorAll("[data-dh]");
|
|
914
|
+
const out = [];
|
|
915
|
+
for (let i = 0; i < nodes.length; i++) {
|
|
916
|
+
if (nodes[i].getAttribute("data-dh") === identity) out.push(nodes[i]);
|
|
917
|
+
}
|
|
918
|
+
return out;
|
|
919
|
+
}
|
|
920
|
+
function setHeadTitle(text) {
|
|
921
|
+
let el = document.querySelector("title");
|
|
922
|
+
if (!el) {
|
|
923
|
+
el = document.createElement("title");
|
|
924
|
+
document.head.appendChild(el);
|
|
925
|
+
}
|
|
926
|
+
el.textContent = text;
|
|
927
|
+
el.setAttribute("data-dh", "title");
|
|
928
|
+
return el;
|
|
929
|
+
}
|
|
930
|
+
function scheduleHeadApply() {
|
|
931
|
+
if (headScheduled) return;
|
|
932
|
+
headScheduled = true;
|
|
933
|
+
queueMicrotask(flushHeadRegistry);
|
|
934
|
+
}
|
|
935
|
+
function flushHeadRegistry() {
|
|
936
|
+
if (solidJs.sharedConfig.hydrating) {
|
|
937
|
+
setTimeout(flushHeadRegistry, 0);
|
|
938
|
+
return;
|
|
939
|
+
}
|
|
940
|
+
headScheduled = false;
|
|
941
|
+
const winners = resolveHead(headRegistrations);
|
|
942
|
+
for (const [identity, els] of headOwned) {
|
|
943
|
+
if (winners.has(identity)) continue;
|
|
944
|
+
headOwned.delete(identity);
|
|
945
|
+
headApplied.delete(identity);
|
|
946
|
+
if (identity === "title") {
|
|
947
|
+
if (headFallbackTitle != null) setHeadTitle(headFallbackTitle).removeAttribute("data-dh");
|
|
948
|
+
} else {
|
|
949
|
+
for (let i = 0; i < els.length; i++) els[i].remove();
|
|
950
|
+
}
|
|
951
|
+
}
|
|
952
|
+
for (const [identity, winner] of winners) {
|
|
953
|
+
let sig = "";
|
|
954
|
+
for (let i = 0; i < winner.tags.length; i++) sig += winner.tags[i].tag + JSON.stringify(winner.tags[i].props) + "|";
|
|
955
|
+
if (headApplied.get(identity) === sig) continue;
|
|
956
|
+
headApplied.set(identity, sig);
|
|
957
|
+
if (identity === "base" || identity === "charset") {
|
|
958
|
+
continue;
|
|
959
|
+
}
|
|
960
|
+
if (identity === "title") {
|
|
961
|
+
const children = winner.tags[0].props.children;
|
|
962
|
+
setHeadTitle(children == null ? "" : String(children));
|
|
963
|
+
headOwned.set(identity, []);
|
|
964
|
+
continue;
|
|
965
|
+
}
|
|
966
|
+
const existing = headMarkedElements(identity);
|
|
967
|
+
const els = [];
|
|
968
|
+
for (let i = 0; i < winner.tags.length; i++) {
|
|
969
|
+
els.push(renderHeadElement(winner.tags[i], identity, existing));
|
|
970
|
+
}
|
|
971
|
+
for (let i = 0; i < existing.length; i++) {
|
|
972
|
+
if (els.indexOf(existing[i]) === -1) existing[i].remove();
|
|
973
|
+
}
|
|
974
|
+
headOwned.set(identity, els);
|
|
975
|
+
}
|
|
976
|
+
}
|
|
977
|
+
function createHeadElement(tag, props) {
|
|
978
|
+
const el = document.createElement(tag);
|
|
979
|
+
for (const name in props) {
|
|
980
|
+
if (name === "children" || name === "ref" || name.slice(0, 2) === "on") continue;
|
|
981
|
+
if (!HEAD_ATTR_NAME.test(name)) {
|
|
982
|
+
continue;
|
|
983
|
+
}
|
|
984
|
+
const v = props[name];
|
|
985
|
+
if (v == null || v === false) continue;
|
|
986
|
+
el.setAttribute(name, v === true ? "" : String(v));
|
|
987
|
+
}
|
|
988
|
+
if (props.children != null) el.textContent = String(props.children);
|
|
989
|
+
return el;
|
|
990
|
+
}
|
|
991
|
+
function renderHeadElement(t, identity, existing) {
|
|
992
|
+
for (let i = 0; i < existing.length; i++) {
|
|
993
|
+
if (headElementMatches(existing[i], t)) return existing.splice(i, 1)[0];
|
|
994
|
+
}
|
|
995
|
+
const el = createHeadElement(t.tag, t.props);
|
|
996
|
+
el.setAttribute("data-dh", identity);
|
|
997
|
+
document.head.appendChild(el);
|
|
998
|
+
return el;
|
|
999
|
+
}
|
|
1000
|
+
function headElementMatches(el, t) {
|
|
1001
|
+
if (el.tagName.toLowerCase() !== t.tag) return false;
|
|
1002
|
+
for (const name in t.props) {
|
|
1003
|
+
if (name === "children" || name === "ref" || name.slice(0, 2) === "on") continue;
|
|
1004
|
+
if (!HEAD_ATTR_NAME.test(name)) continue;
|
|
1005
|
+
const v = t.props[name];
|
|
1006
|
+
if (v == null || v === false) {
|
|
1007
|
+
if (el.hasAttribute(name)) return false;
|
|
1008
|
+
} else if (el.getAttribute(name) !== (v === true ? "" : String(v))) return false;
|
|
1009
|
+
}
|
|
1010
|
+
const children = t.props.children;
|
|
1011
|
+
return (children == null ? "" : String(children)) === el.textContent;
|
|
1012
|
+
}
|
|
1013
|
+
function mountHeadResource(tag, props) {
|
|
1014
|
+
const identity = resourceIdentity(tag, props);
|
|
1015
|
+
if (headMountedResources.has(identity)) return;
|
|
1016
|
+
headMountedResources.add(identity);
|
|
1017
|
+
const url = props.href || props.src;
|
|
1018
|
+
let el = null;
|
|
1019
|
+
if (url != null) {
|
|
1020
|
+
if (tag === "link") el = findAssetElement(`link[rel="${props.rel}"]`, "href", url);else if (tag === "script") el = findAssetElement("script[src]", "src", url);else el = findAssetElement("style[href]", "href", url);
|
|
1021
|
+
}
|
|
1022
|
+
if (!el) document.head.appendChild(createHeadElement(tag, props));
|
|
1023
|
+
}
|
|
1024
|
+
function gateHeadResource(props) {
|
|
1025
|
+
const descriptor = {
|
|
1026
|
+
type: props.rel === "stylesheet" ? "style" : "module",
|
|
1027
|
+
href: props.href
|
|
1028
|
+
};
|
|
1029
|
+
let gateable = props.rel === "stylesheet" && props.href != null;
|
|
1030
|
+
let attrs = null;
|
|
1031
|
+
for (const name in props) {
|
|
1032
|
+
if (name === "rel" || name === "href") continue;
|
|
1033
|
+
if (!STYLESHEET_FETCH_META.has(name)) gateable = false;
|
|
1034
|
+
if (!HEAD_ATTR_NAME.test(name)) continue;
|
|
1035
|
+
const v = props[name];
|
|
1036
|
+
if (v == null || v === false) continue;
|
|
1037
|
+
(attrs || (attrs = {}))[name] = v === true ? "" : String(v);
|
|
1038
|
+
}
|
|
1039
|
+
if (attrs) descriptor.attrs = attrs;
|
|
1040
|
+
effect(() => {
|
|
1041
|
+
const entry = warmAsset(descriptor);
|
|
1042
|
+
if (gateable && entry.loadState === "pending" && typeof waitAsset === "function") waitAsset(entry.loadPromise);
|
|
1043
|
+
}, () => acquireAsset(descriptor));
|
|
1044
|
+
}
|
|
1045
|
+
function useHead(tags) {
|
|
1046
|
+
initHeadRegistry();
|
|
1047
|
+
const reg = {
|
|
1048
|
+
seq: -1,
|
|
1049
|
+
tags: null
|
|
1050
|
+
};
|
|
1051
|
+
const uid = ++headUid;
|
|
1052
|
+
effect(() => {
|
|
1053
|
+
let list = typeof tags === "function" ? tags() : tags;
|
|
1054
|
+
if (!Array.isArray(list)) list = [list];
|
|
1055
|
+
const replaceable = [];
|
|
1056
|
+
const resources = [];
|
|
1057
|
+
for (let i = 0; i < list.length; i++) {
|
|
1058
|
+
const desc = list[i];
|
|
1059
|
+
if (!desc || !HEAD_ELIGIBLE_TAGS.has(desc.tag)) {
|
|
1060
|
+
continue;
|
|
1061
|
+
}
|
|
1062
|
+
const cls = classifyHeadTag(desc);
|
|
1063
|
+
const props = evalHeadProps(desc.props || {}, cls.rel !== undefined ? {
|
|
1064
|
+
rel: cls.rel
|
|
1065
|
+
} : undefined);
|
|
1066
|
+
if (cls.resource) {
|
|
1067
|
+
if (desc.tag === "link" && (props.rel === "stylesheet" || props.rel === "modulepreload")) {
|
|
1068
|
+
gateHeadResource(props);
|
|
1069
|
+
} else if (desc.tag === "link") {
|
|
1070
|
+
mountHeadResource(desc.tag, props);
|
|
1071
|
+
} else {
|
|
1072
|
+
resources.push({
|
|
1073
|
+
tag: desc.tag,
|
|
1074
|
+
props
|
|
1075
|
+
});
|
|
1076
|
+
}
|
|
1077
|
+
} else {
|
|
1078
|
+
const key = evalHeadValue(desc.key);
|
|
1079
|
+
replaceable.push({
|
|
1080
|
+
tag: desc.tag,
|
|
1081
|
+
props,
|
|
1082
|
+
identity: replaceableIdentity(desc.tag, props, key, "u:c" + uid + ":" + i)
|
|
1083
|
+
});
|
|
1084
|
+
}
|
|
1085
|
+
}
|
|
1086
|
+
return {
|
|
1087
|
+
replaceable,
|
|
1088
|
+
resources
|
|
1089
|
+
};
|
|
1090
|
+
}, evaluated => {
|
|
1091
|
+
for (let i = 0; i < evaluated.resources.length; i++) {
|
|
1092
|
+
mountHeadResource(evaluated.resources[i].tag, evaluated.resources[i].props);
|
|
1093
|
+
}
|
|
1094
|
+
reg.tags = evaluated.replaceable;
|
|
1095
|
+
if (reg.seq < 0) reg.seq = ++headSeq;
|
|
1096
|
+
if (headRegistrations.indexOf(reg) === -1) headRegistrations.push(reg);
|
|
1097
|
+
scheduleHeadApply();
|
|
1098
|
+
return () => {
|
|
1099
|
+
const idx = headRegistrations.indexOf(reg);
|
|
1100
|
+
if (idx > -1) headRegistrations.splice(idx, 1);
|
|
1101
|
+
scheduleHeadApply();
|
|
1102
|
+
};
|
|
1103
|
+
});
|
|
1104
|
+
}
|
|
1105
|
+
function loadModuleAssets(mapping) {
|
|
1106
|
+
const hy = globalThis._$HY;
|
|
1107
|
+
if (!hy) return;
|
|
1108
|
+
const pending = [];
|
|
1109
|
+
for (const key in mapping) {
|
|
1110
|
+
if (hy.modules[key]) continue;
|
|
1111
|
+
const entryUrl = mapping[key];
|
|
1112
|
+
if (!hy.loading[key]) {
|
|
1113
|
+
hy.loading[key] = import(entryUrl).then(mod => {
|
|
1114
|
+
hy.modules[key] = mod;
|
|
1115
|
+
}, err => {
|
|
1116
|
+
delete hy.loading[key];
|
|
1117
|
+
throw err;
|
|
1118
|
+
});
|
|
1119
|
+
}
|
|
1120
|
+
pending.push(hy.loading[key]);
|
|
1121
|
+
}
|
|
1122
|
+
return pending.length ? Promise.all(pending).then(() => {}) : undefined;
|
|
1123
|
+
}
|
|
252
1124
|
function hydrate$1(code, element, options = {}) {
|
|
253
|
-
|
|
1125
|
+
installHydrationRuntime();
|
|
1126
|
+
if (globalThis._$HY.done) return render$1(code, element, [...element.childNodes], options);
|
|
254
1127
|
options.renderId ||= "";
|
|
1128
|
+
if (!globalThis._$HY.modules) globalThis._$HY.modules = {};
|
|
1129
|
+
if (!globalThis._$HY.loading) globalThis._$HY.loading = {};
|
|
255
1130
|
solidJs.sharedConfig.completed = globalThis._$HY.completed;
|
|
256
1131
|
solidJs.sharedConfig.events = globalThis._$HY.events;
|
|
257
1132
|
solidJs.sharedConfig.load = id => globalThis._$HY.r[id];
|
|
258
1133
|
solidJs.sharedConfig.has = id => id in globalThis._$HY.r;
|
|
259
1134
|
solidJs.sharedConfig.gather = root => gatherHydratable(element, root);
|
|
1135
|
+
solidJs.sharedConfig.loadModuleAssets = loadModuleAssets;
|
|
1136
|
+
solidJs.sharedConfig.cleanupFragment = id => {
|
|
1137
|
+
const tpl = document.getElementById("pl-" + id);
|
|
1138
|
+
if (tpl) {
|
|
1139
|
+
let node = tpl.nextSibling;
|
|
1140
|
+
while (node) {
|
|
1141
|
+
const next = node.nextSibling;
|
|
1142
|
+
if (node.nodeType === 8 && node.nodeValue === "pl-" + id) {
|
|
1143
|
+
node.remove();
|
|
1144
|
+
break;
|
|
1145
|
+
}
|
|
1146
|
+
node.remove();
|
|
1147
|
+
node = next;
|
|
1148
|
+
}
|
|
1149
|
+
tpl.remove();
|
|
1150
|
+
}
|
|
1151
|
+
};
|
|
260
1152
|
solidJs.sharedConfig.registry = new Map();
|
|
1153
|
+
if (!solidJs.sharedConfig.boundaryScopes) solidJs.sharedConfig.boundaryScopes = new Map();
|
|
1154
|
+
solidJs.sharedConfig.captureBoundaryScope = id => {
|
|
1155
|
+
if (solidJs.sharedConfig.registry) solidJs.sharedConfig.boundaryScopes.set(id, {
|
|
1156
|
+
registry: solidJs.sharedConfig.registry,
|
|
1157
|
+
gather: solidJs.sharedConfig.gather
|
|
1158
|
+
});
|
|
1159
|
+
};
|
|
261
1160
|
solidJs.sharedConfig.hydrating = true;
|
|
1161
|
+
const hyr = globalThis._$HY.r;
|
|
1162
|
+
const rootMapping = hyr && (hyr[options.renderId + "_assets"] || hyr["_assets"]);
|
|
1163
|
+
if (rootMapping && typeof rootMapping === "object") {
|
|
1164
|
+
const p = loadModuleAssets(rootMapping);
|
|
1165
|
+
if (p) {
|
|
1166
|
+
gatherHydratable(element, options.renderId);
|
|
1167
|
+
const registry = solidJs.sharedConfig.registry;
|
|
1168
|
+
const gather = solidJs.sharedConfig.gather;
|
|
1169
|
+
let disposer;
|
|
1170
|
+
p.then(() => {
|
|
1171
|
+
solidJs.sharedConfig.registry = registry;
|
|
1172
|
+
solidJs.sharedConfig.gather = gather;
|
|
1173
|
+
solidJs.sharedConfig.hydrating = true;
|
|
1174
|
+
try {
|
|
1175
|
+
disposer = render$1(code, element, [...element.childNodes], options);
|
|
1176
|
+
} finally {
|
|
1177
|
+
solidJs.sharedConfig.hydrating = false;
|
|
1178
|
+
}
|
|
1179
|
+
}, err => {
|
|
1180
|
+
console.error("Hydration module preload failed, falling back to client render:", err);
|
|
1181
|
+
solidJs.sharedConfig.hydrating = false;
|
|
1182
|
+
solidJs.sharedConfig.registry = undefined;
|
|
1183
|
+
disposer = render$1(code, element, [...element.childNodes], options);
|
|
1184
|
+
});
|
|
1185
|
+
return () => disposer && disposer();
|
|
1186
|
+
}
|
|
1187
|
+
}
|
|
262
1188
|
try {
|
|
263
1189
|
gatherHydratable(element, options.renderId);
|
|
264
|
-
return render(code, element, [...element.childNodes], options);
|
|
1190
|
+
return render$1(code, element, [...element.childNodes], options);
|
|
265
1191
|
} finally {
|
|
266
1192
|
solidJs.sharedConfig.hydrating = false;
|
|
267
1193
|
}
|
|
@@ -271,7 +1197,10 @@ function getNextElement(template) {
|
|
|
271
1197
|
key,
|
|
272
1198
|
hydrating = isHydrating();
|
|
273
1199
|
if (!hydrating || !(node = solidJs.sharedConfig.registry.get(key = getHydrationKey()))) {
|
|
274
|
-
|
|
1200
|
+
if (!template) {
|
|
1201
|
+
throw new Error(`Hydration Mismatch. Unable to find DOM nodes for hydration key: ${key}`);
|
|
1202
|
+
}
|
|
1203
|
+
return template(true);
|
|
275
1204
|
}
|
|
276
1205
|
if (solidJs.sharedConfig.completed) solidJs.sharedConfig.completed.add(node);
|
|
277
1206
|
solidJs.sharedConfig.registry.delete(key);
|
|
@@ -300,6 +1229,14 @@ function getNextMarker(start) {
|
|
|
300
1229
|
}
|
|
301
1230
|
return [end, current];
|
|
302
1231
|
}
|
|
1232
|
+
function getFirstChild(node, expectedTag) {
|
|
1233
|
+
const child = node.firstChild;
|
|
1234
|
+
return child;
|
|
1235
|
+
}
|
|
1236
|
+
function getNextSibling(node, expectedTag) {
|
|
1237
|
+
const sibling = node.nextSibling;
|
|
1238
|
+
return sibling;
|
|
1239
|
+
}
|
|
303
1240
|
function runHydrationEvents() {
|
|
304
1241
|
if (solidJs.sharedConfig.events && !solidJs.sharedConfig.events.queued) {
|
|
305
1242
|
queueMicrotask(() => {
|
|
@@ -313,7 +1250,32 @@ function runHydrationEvents() {
|
|
|
313
1250
|
const [el, e] = events[0];
|
|
314
1251
|
if (!completed.has(el)) return;
|
|
315
1252
|
events.shift();
|
|
316
|
-
|
|
1253
|
+
let matchContainer, matchState, matchDistance, matches;
|
|
1254
|
+
for (const [container, state] of delegatedContainers) {
|
|
1255
|
+
if (!state.handlers.has(e.type)) continue;
|
|
1256
|
+
const entry = findOwner(e.target, state);
|
|
1257
|
+
if (!entry) continue;
|
|
1258
|
+
if (matchContainer) {
|
|
1259
|
+
if (!matches) matches = [{
|
|
1260
|
+
container: matchContainer,
|
|
1261
|
+
state: matchState,
|
|
1262
|
+
distance: matchDistance
|
|
1263
|
+
}];
|
|
1264
|
+
matches.push({
|
|
1265
|
+
container,
|
|
1266
|
+
state,
|
|
1267
|
+
distance: entry.distance
|
|
1268
|
+
});
|
|
1269
|
+
} else {
|
|
1270
|
+
matchContainer = container;
|
|
1271
|
+
matchState = state;
|
|
1272
|
+
matchDistance = entry.distance;
|
|
1273
|
+
}
|
|
1274
|
+
}
|
|
1275
|
+
if (matches) {
|
|
1276
|
+
matches.sort((a, b) => a.distance - b.distance);
|
|
1277
|
+
for (let i = 0; i < matches.length; i++) eventHandler(e, matches[i].container, matches[i].state);
|
|
1278
|
+
} else if (matchContainer) eventHandler(e, matchContainer, matchState);
|
|
317
1279
|
}
|
|
318
1280
|
if (solidJs.sharedConfig.done) {
|
|
319
1281
|
solidJs.sharedConfig.events = _$HY.events = null;
|
|
@@ -324,16 +1286,31 @@ function runHydrationEvents() {
|
|
|
324
1286
|
}
|
|
325
1287
|
}
|
|
326
1288
|
function isHydrating(node) {
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
1289
|
+
if (!solidJs.sharedConfig.hydrating) return false;
|
|
1290
|
+
if (!node || node.isConnected) return true;
|
|
1291
|
+
const roots = solidJs.sharedConfig.claimRoots;
|
|
1292
|
+
if (roots) {
|
|
1293
|
+
for (let i = 0; i < roots.length; i++) {
|
|
1294
|
+
if (roots[i].contains(node)) return true;
|
|
1295
|
+
}
|
|
1296
|
+
}
|
|
1297
|
+
return false;
|
|
332
1298
|
}
|
|
333
1299
|
function classListToObject(classList) {
|
|
334
1300
|
if (Array.isArray(classList)) {
|
|
335
1301
|
const result = {};
|
|
336
1302
|
flattenClassList(classList, result);
|
|
1303
|
+
classList = result;
|
|
1304
|
+
}
|
|
1305
|
+
if (classList && typeof classList === "object") {
|
|
1306
|
+
const result = {},
|
|
1307
|
+
keys = Object.keys(classList);
|
|
1308
|
+
for (let i = 0, len = keys.length; i < len; i++) {
|
|
1309
|
+
const key = keys[i];
|
|
1310
|
+
if (!classList[key]) continue;
|
|
1311
|
+
const classNames = key.trim().split(/\s+/);
|
|
1312
|
+
for (let j = 0, nameLen = classNames.length; j < nameLen; j++) classNames[j] && (result[classNames[j]] = true);
|
|
1313
|
+
}
|
|
337
1314
|
return result;
|
|
338
1315
|
}
|
|
339
1316
|
return classList;
|
|
@@ -344,18 +1321,16 @@ function flattenClassList(list, result) {
|
|
|
344
1321
|
if (Array.isArray(item)) flattenClassList(item, result);else if (typeof item === "object" && item != null) Object.assign(result, item);else if (item || item === 0) result[item] = true;
|
|
345
1322
|
}
|
|
346
1323
|
}
|
|
347
|
-
function assignProp(node, prop, value, prev,
|
|
348
|
-
let forceProp;
|
|
1324
|
+
function assignProp(node, prop, value, prev, skipRef, nodeName) {
|
|
349
1325
|
if (prop === "style") return style(node, value, prev), value;
|
|
350
|
-
if (prop === "class") return className(node, value,
|
|
351
|
-
if (value === prev) return prev;
|
|
1326
|
+
if (prop === "class") return className(node, value, prev), value;
|
|
1327
|
+
if (value === prev && DOMWithState[nodeName]?.[prop] !== 1) return prev;
|
|
352
1328
|
if (prop === "ref") {
|
|
353
|
-
if (!skipRef) value
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
} else if (prop.slice(0, 2) === "on") {
|
|
1329
|
+
if (!skipRef && value) ref(() => value, node);
|
|
1330
|
+
return value;
|
|
1331
|
+
}
|
|
1332
|
+
const hasNamespace = prop.indexOf(":") > -1;
|
|
1333
|
+
if (!hasNamespace && prop.slice(0, 2) === "on") {
|
|
359
1334
|
const name = prop.slice(2).toLowerCase();
|
|
360
1335
|
const delegate = DelegatedEvents.has(name);
|
|
361
1336
|
if (!delegate && prev) {
|
|
@@ -363,26 +1338,34 @@ function assignProp(node, prop, value, prev, isSVG, skipRef) {
|
|
|
363
1338
|
node.removeEventListener(name, h);
|
|
364
1339
|
}
|
|
365
1340
|
if (delegate || value) {
|
|
366
|
-
|
|
1341
|
+
addEvent(node, name, value, delegate);
|
|
367
1342
|
delegate && delegateEvents([name]);
|
|
368
1343
|
}
|
|
369
|
-
} else if (
|
|
370
|
-
if (
|
|
371
|
-
if (prop === "value" &&
|
|
1344
|
+
} else if (hasNamespace && prop.slice(0, 5) === "prop:" || ChildProperties.has(prop) || DOMWithState[nodeName]?.[prop]) {
|
|
1345
|
+
if (hasNamespace) prop = prop.slice(5);else if (isHydrating(node)) return value;
|
|
1346
|
+
if (prop === "value" && nodeName === "SELECT") queueMicrotask(() => node.value = value) || (node.value = value);else if ((prop === "value" || prop === "defaultValue") && (nodeName === "INPUT" || nodeName === "TEXTAREA"))
|
|
1347
|
+
node[prop] = value ?? "";else node[prop] = value;
|
|
372
1348
|
} else {
|
|
373
|
-
const ns =
|
|
1349
|
+
const ns = hasNamespace && Namespaces[prop.split(":")[0]];
|
|
374
1350
|
if (ns) setAttributeNS(node, ns, prop, value);else setAttribute(node, prop, value);
|
|
375
1351
|
}
|
|
376
1352
|
return value;
|
|
377
1353
|
}
|
|
378
|
-
function eventHandler(e) {
|
|
379
|
-
if (
|
|
380
|
-
|
|
1354
|
+
function eventHandler(e, container, state) {
|
|
1355
|
+
if (hydrationRt !== null && hydrationRt.dedupEvent(e)) return;
|
|
1356
|
+
const prev = e[$$EVENT_OWNER];
|
|
1357
|
+
let resumeNode;
|
|
1358
|
+
if (prev) {
|
|
1359
|
+
if (prev === true || prev === container || !container.contains(prev)) return;
|
|
1360
|
+
resumeNode = prev;
|
|
381
1361
|
}
|
|
382
|
-
|
|
1362
|
+
const owner = state && (state.owners.size === 1 && state.owners.has(container) ? container : findOwner(e.target, state)?.owner);
|
|
1363
|
+
if (state && !owner) return;
|
|
1364
|
+
e[$$EVENT_OWNER] = owner || true;
|
|
1365
|
+
let node = resumeNode || e.target;
|
|
383
1366
|
const key = `$$${e.type}`;
|
|
384
1367
|
const oriTarget = e.target;
|
|
385
|
-
const
|
|
1368
|
+
const boundary = owner || container || e.currentTarget;
|
|
386
1369
|
const retarget = value => Object.defineProperty(e, "target", {
|
|
387
1370
|
configurable: true,
|
|
388
1371
|
value
|
|
@@ -398,52 +1381,72 @@ function eventHandler(e) {
|
|
|
398
1381
|
return true;
|
|
399
1382
|
};
|
|
400
1383
|
const walkUpTree = () => {
|
|
401
|
-
while (handleNode()
|
|
1384
|
+
while (handleNode()) {
|
|
1385
|
+
if (node === boundary || node.parentNode === boundary) break;
|
|
1386
|
+
node = node._$host || node.parentNode || node.host;
|
|
1387
|
+
}
|
|
402
1388
|
};
|
|
403
1389
|
Object.defineProperty(e, "currentTarget", {
|
|
404
1390
|
configurable: true,
|
|
405
1391
|
get() {
|
|
406
|
-
return node || document;
|
|
1392
|
+
return node || boundary || document;
|
|
407
1393
|
}
|
|
408
1394
|
});
|
|
409
|
-
if (
|
|
410
|
-
|
|
1395
|
+
if (resumeNode) {
|
|
1396
|
+
if (resumeNode === e.target) node = resumeNode._$host || resumeNode.parentNode || resumeNode.host;
|
|
1397
|
+
if (node && node !== boundary) walkUpTree();
|
|
1398
|
+
} else if (e.composedPath) {
|
|
411
1399
|
const path = e.composedPath();
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
1400
|
+
if (path.length) {
|
|
1401
|
+
retarget(path[0]);
|
|
1402
|
+
for (let i = 0; i < path.length; i++) {
|
|
1403
|
+
node = path[i];
|
|
1404
|
+
if (!handleNode()) break;
|
|
1405
|
+
if (node._$host) {
|
|
1406
|
+
node = node._$host;
|
|
1407
|
+
walkUpTree();
|
|
1408
|
+
break;
|
|
1409
|
+
}
|
|
1410
|
+
if (node === boundary || node.parentNode === boundary) {
|
|
1411
|
+
break;
|
|
1412
|
+
}
|
|
423
1413
|
}
|
|
424
|
-
}
|
|
1414
|
+
} else walkUpTree();
|
|
425
1415
|
}
|
|
426
1416
|
else walkUpTree();
|
|
427
1417
|
retarget(oriTarget);
|
|
428
1418
|
}
|
|
429
1419
|
function insertExpression(parent, value, current, marker) {
|
|
430
|
-
if (isHydrating(parent))
|
|
431
|
-
|
|
1420
|
+
if (hydrationRt !== null && isHydrating(parent)) {
|
|
1421
|
+
if (value && value !== current) for (const n of Array.isArray(value) ? value : [value]) if (n && n.nodeType && !isHydrating(n)) return current;
|
|
1422
|
+
return value;
|
|
1423
|
+
}
|
|
1424
|
+
if (value === current) return value;
|
|
432
1425
|
const t = typeof value,
|
|
433
1426
|
multi = marker !== undefined;
|
|
434
1427
|
if (t === "string" || t === "number") {
|
|
435
1428
|
const tc = typeof current;
|
|
436
1429
|
if (tc === "string" || tc === "number") {
|
|
437
1430
|
parent.firstChild.data = value;
|
|
438
|
-
} else
|
|
1431
|
+
} else {
|
|
1432
|
+
if (ownsAllChildren(parent, current)) parent.textContent = value;else {
|
|
1433
|
+
removeOwnedChildren(parent, current);
|
|
1434
|
+
parent.insertBefore(document.createTextNode(value), parent.firstChild);
|
|
1435
|
+
}
|
|
1436
|
+
}
|
|
439
1437
|
} else if (value === undefined) {
|
|
440
1438
|
cleanChildren(parent, current, marker);
|
|
441
1439
|
} else if (value.nodeType) {
|
|
442
1440
|
if (Array.isArray(current)) {
|
|
443
1441
|
cleanChildren(parent, current, multi ? marker : null, value);
|
|
444
|
-
} else if (current
|
|
1442
|
+
} else if (current && current.nodeType) {
|
|
1443
|
+
current.parentNode === parent ? parent.replaceChild(value, current) : parent.appendChild(value);
|
|
1444
|
+
} else if (current && parent.firstChild) {
|
|
1445
|
+
parent.replaceChild(value, parent.firstChild);
|
|
1446
|
+
} else {
|
|
445
1447
|
parent.appendChild(value);
|
|
446
|
-
}
|
|
1448
|
+
}
|
|
1449
|
+
if (marker) value[$$SLOT] = marker;
|
|
447
1450
|
} else if (Array.isArray(value)) {
|
|
448
1451
|
const currentArray = current && Array.isArray(current);
|
|
449
1452
|
if (value.length === 0) {
|
|
@@ -451,12 +1454,13 @@ function insertExpression(parent, value, current, marker) {
|
|
|
451
1454
|
} else if (currentArray) {
|
|
452
1455
|
if (current.length === 0) {
|
|
453
1456
|
appendNodes(parent, value, marker);
|
|
454
|
-
} else reconcileArrays(parent, current, value);
|
|
1457
|
+
} else reconcileArrays(parent, current, value, marker);
|
|
455
1458
|
} else {
|
|
456
|
-
current && cleanChildren(parent);
|
|
1459
|
+
current && cleanChildren(parent, current);
|
|
457
1460
|
appendNodes(parent, value);
|
|
458
1461
|
}
|
|
459
1462
|
} else ;
|
|
1463
|
+
return value;
|
|
460
1464
|
}
|
|
461
1465
|
function normalize(value, current, multi, doNotUnwrap) {
|
|
462
1466
|
value = solidJs.flatten(value, {
|
|
@@ -470,44 +1474,87 @@ function normalize(value, current, multi, doNotUnwrap) {
|
|
|
470
1474
|
const item = value[i],
|
|
471
1475
|
prev = current && current[i],
|
|
472
1476
|
t = typeof item;
|
|
473
|
-
if (t === "string" || t === "number") value[i] = prev && prev.nodeType === 3 && prev.data === item ? prev : document.createTextNode(item);
|
|
1477
|
+
if (t === "string" || t === "number") value[i] = prev && prev.nodeType === 3 && (solidJs.sharedConfig.hydrating || prev.data === "" + item) ? prev : document.createTextNode(item);
|
|
474
1478
|
}
|
|
475
1479
|
}
|
|
476
1480
|
return value;
|
|
477
1481
|
}
|
|
1482
|
+
function tagHost(value, host) {
|
|
1483
|
+
if (Array.isArray(value)) {
|
|
1484
|
+
for (let i = 0, len = value.length; i < len; i++) tagHost(value[i], host);
|
|
1485
|
+
} else if (value && value.nodeType && value[$$HOST] !== host) {
|
|
1486
|
+
value[$$HOST] = host;
|
|
1487
|
+
Object.defineProperty(value, "_$host", {
|
|
1488
|
+
get: host,
|
|
1489
|
+
configurable: true
|
|
1490
|
+
});
|
|
1491
|
+
}
|
|
1492
|
+
}
|
|
478
1493
|
function appendNodes(parent, array, marker = null) {
|
|
479
|
-
for (let i = 0, len = array.length; i < len; i++)
|
|
1494
|
+
for (let i = 0, len = array.length; i < len; i++) {
|
|
1495
|
+
const n = array[i];
|
|
1496
|
+
parent.insertBefore(n, marker);
|
|
1497
|
+
if (marker) n[$$SLOT] = marker;
|
|
1498
|
+
}
|
|
1499
|
+
}
|
|
1500
|
+
function ownsAllChildren(parent, current) {
|
|
1501
|
+
if (current == null) return true;
|
|
1502
|
+
if (Array.isArray(current)) {
|
|
1503
|
+
return current.length ? parent.firstChild === current[0] && parent.lastChild === current[current.length - 1] : parent.firstChild === null;
|
|
1504
|
+
}
|
|
1505
|
+
if (current === "") return parent.firstChild === null;
|
|
1506
|
+
if (current.nodeType) return parent.firstChild === current && parent.lastChild === current;
|
|
1507
|
+
const first = parent.firstChild;
|
|
1508
|
+
return first !== null && first.nodeType === 3 && parent.lastChild === first;
|
|
1509
|
+
}
|
|
1510
|
+
function removeOwnedChildren(parent, current) {
|
|
1511
|
+
if (Array.isArray(current)) {
|
|
1512
|
+
for (let i = 0; i < current.length; i++) {
|
|
1513
|
+
const el = current[i];
|
|
1514
|
+
if (el.parentNode === parent) el.remove();
|
|
1515
|
+
}
|
|
1516
|
+
} else if (current.nodeType) {
|
|
1517
|
+
if (current.parentNode === parent) current.remove();
|
|
1518
|
+
} else {
|
|
1519
|
+
const first = parent.firstChild;
|
|
1520
|
+
if (first && first.nodeType === 3) first.remove();
|
|
1521
|
+
}
|
|
480
1522
|
}
|
|
481
1523
|
function cleanChildren(parent, current, marker, replacement) {
|
|
482
|
-
if (marker === undefined)
|
|
1524
|
+
if (marker === undefined) {
|
|
1525
|
+
if (ownsAllChildren(parent, current)) return parent.textContent = "";
|
|
1526
|
+
return removeOwnedChildren(parent, current);
|
|
1527
|
+
}
|
|
483
1528
|
if (current.length) {
|
|
484
1529
|
let inserted = false;
|
|
485
1530
|
for (let i = current.length - 1; i >= 0; i--) {
|
|
486
1531
|
const el = current[i];
|
|
487
1532
|
if (replacement !== el) {
|
|
488
|
-
const
|
|
489
|
-
|
|
1533
|
+
const tag = el[$$SLOT];
|
|
1534
|
+
const owns = el.parentNode === parent && (!tag || tag === marker);
|
|
1535
|
+
if (replacement && !inserted && !i) owns ? parent.replaceChild(replacement, el) : parent.insertBefore(replacement, marker);else if (owns) el.remove();
|
|
490
1536
|
} else inserted = true;
|
|
491
1537
|
}
|
|
492
1538
|
} else if (replacement) parent.insertBefore(replacement, marker);
|
|
1539
|
+
if (replacement && marker) replacement[$$SLOT] = marker;
|
|
493
1540
|
}
|
|
494
1541
|
function gatherHydratable(element, root) {
|
|
495
1542
|
const templates = element.querySelectorAll(`*[_hk]`);
|
|
496
1543
|
for (let i = 0; i < templates.length; i++) {
|
|
497
1544
|
const node = templates[i];
|
|
498
1545
|
const key = node.getAttribute("_hk");
|
|
499
|
-
if (
|
|
1546
|
+
if (root) {
|
|
1547
|
+
if (!key.startsWith(root)) continue;
|
|
1548
|
+
} else {
|
|
1549
|
+
const frame = node.closest("[data-fid]");
|
|
1550
|
+
if (frame && frame !== element && element.contains(frame)) continue;
|
|
1551
|
+
}
|
|
1552
|
+
if (!solidJs.sharedConfig.registry.has(key)) solidJs.sharedConfig.registry.set(key, node);
|
|
500
1553
|
}
|
|
501
1554
|
}
|
|
502
1555
|
function getHydrationKey() {
|
|
503
1556
|
return solidJs.sharedConfig.getNextContextId();
|
|
504
1557
|
}
|
|
505
|
-
function NoHydration(props) {
|
|
506
|
-
return solidJs.sharedConfig.hydrating ? undefined : props.children;
|
|
507
|
-
}
|
|
508
|
-
function Hydration(props) {
|
|
509
|
-
return props.children;
|
|
510
|
-
}
|
|
511
1558
|
const voidFn = () => undefined;
|
|
512
1559
|
const RequestContext = Symbol();
|
|
513
1560
|
|
|
@@ -518,109 +1565,332 @@ function throwInBrowser(func) {
|
|
|
518
1565
|
function renderToString(fn, options) {
|
|
519
1566
|
throwInBrowser(renderToString);
|
|
520
1567
|
}
|
|
521
|
-
function renderToStringAsync(fn, options) {
|
|
522
|
-
throwInBrowser(renderToStringAsync);
|
|
523
|
-
}
|
|
524
1568
|
function renderToStream(fn, options) {
|
|
525
1569
|
throwInBrowser(renderToStream);
|
|
526
1570
|
}
|
|
1571
|
+
function createResponseStub() {
|
|
1572
|
+
throwInBrowser(createResponseStub);
|
|
1573
|
+
}
|
|
1574
|
+
function createRequestEvent(request, init) {
|
|
1575
|
+
throwInBrowser(createRequestEvent);
|
|
1576
|
+
}
|
|
1577
|
+
function getExpectedRedirectStatus(response) {
|
|
1578
|
+
throwInBrowser(getExpectedRedirectStatus);
|
|
1579
|
+
}
|
|
1580
|
+
function createSSRResponse() {
|
|
1581
|
+
throwInBrowser(createSSRResponse);
|
|
1582
|
+
}
|
|
1583
|
+
function commitEventResponse(response, event) {
|
|
1584
|
+
throwInBrowser(commitEventResponse);
|
|
1585
|
+
}
|
|
1586
|
+
function composeMiddleware(middlewares) {
|
|
1587
|
+
throwInBrowser(composeMiddleware);
|
|
1588
|
+
}
|
|
527
1589
|
function ssr(template, ...nodes) {}
|
|
528
1590
|
function ssrElement(name, props, children, needsId) {}
|
|
529
|
-
function
|
|
1591
|
+
function ssrClassName(value) {}
|
|
530
1592
|
function ssrStyle(value) {}
|
|
1593
|
+
function ssrStyleProperty(name, value) {}
|
|
531
1594
|
function ssrAttribute(key, value) {}
|
|
1595
|
+
function ssrGroup(fn, n) {}
|
|
532
1596
|
function ssrHydrationKey() {}
|
|
533
|
-
function resolveSSRNode(node) {}
|
|
534
|
-
function escape(
|
|
1597
|
+
function resolveSSRNode(node, result, top) {}
|
|
1598
|
+
function escape(s, attr) {}
|
|
1599
|
+
|
|
1600
|
+
const ENVELOPE = Symbol.for("solid.ResponseEnvelope");
|
|
1601
|
+
// PURE-annotated factory (same convention as solid's MockPromise): the brand
|
|
1602
|
+
const ResponseEnvelope = /* @__PURE__ */(() => {
|
|
1603
|
+
class ResponseEnvelope {
|
|
1604
|
+
constructor(response, value) {
|
|
1605
|
+
this.response = response;
|
|
1606
|
+
this.value = value;
|
|
1607
|
+
}
|
|
1608
|
+
}
|
|
1609
|
+
ResponseEnvelope.prototype[ENVELOPE] = true;
|
|
1610
|
+
return ResponseEnvelope;
|
|
1611
|
+
})();
|
|
1612
|
+
function isResponseEnvelope(value) {
|
|
1613
|
+
return !!(value && typeof value === "object" && value[ENVELOPE]);
|
|
1614
|
+
}
|
|
1615
|
+
const HREF = Symbol.for("solid.Href");
|
|
1616
|
+
function isHref(value) {
|
|
1617
|
+
return !!(value && (typeof value === "object" || typeof value === "function") && value[HREF]);
|
|
1618
|
+
}
|
|
1619
|
+
const SAFE_ERROR = Symbol.for("solid.SafeError");
|
|
1620
|
+
function markSafeError(error) {
|
|
1621
|
+
if (error && (typeof error === "object" || typeof error === "function")) {
|
|
1622
|
+
Object.defineProperty(error, SAFE_ERROR, {
|
|
1623
|
+
value: true,
|
|
1624
|
+
enumerable: false,
|
|
1625
|
+
configurable: true
|
|
1626
|
+
});
|
|
1627
|
+
}
|
|
1628
|
+
return error;
|
|
1629
|
+
}
|
|
1630
|
+
function isSafeError(value) {
|
|
1631
|
+
return !!(value && (typeof value === "object" || typeof value === "function") && value[SAFE_ERROR]);
|
|
1632
|
+
}
|
|
1633
|
+
const REVALIDATE_HEADER = "X-Revalidate";
|
|
1634
|
+
function initWithRevalidate(init) {
|
|
1635
|
+
const {
|
|
1636
|
+
revalidate,
|
|
1637
|
+
...responseInit
|
|
1638
|
+
} = init;
|
|
1639
|
+
let headers;
|
|
1640
|
+
if (responseInit.headers && responseInit.headers.getSetCookie) {
|
|
1641
|
+
headers = new Headers();
|
|
1642
|
+
responseInit.headers.forEach((value, key) => {
|
|
1643
|
+
if (key !== "set-cookie") headers.append(key, value);
|
|
1644
|
+
});
|
|
1645
|
+
for (const cookie of responseInit.headers.getSetCookie()) {
|
|
1646
|
+
headers.append("Set-Cookie", cookie);
|
|
1647
|
+
}
|
|
1648
|
+
} else {
|
|
1649
|
+
headers = new Headers(responseInit.headers);
|
|
1650
|
+
}
|
|
1651
|
+
revalidate !== undefined && headers.set(REVALIDATE_HEADER, revalidate.toString());
|
|
1652
|
+
return {
|
|
1653
|
+
responseInit,
|
|
1654
|
+
headers
|
|
1655
|
+
};
|
|
1656
|
+
}
|
|
1657
|
+
function redirect(url, init = 302) {
|
|
1658
|
+
if (typeof url !== "string" && !isHref(url)) {
|
|
1659
|
+
throw new TypeError("redirect() expects a string URL or an Href-branded value (Symbol.for('solid.Href')).");
|
|
1660
|
+
}
|
|
1661
|
+
const {
|
|
1662
|
+
responseInit,
|
|
1663
|
+
headers
|
|
1664
|
+
} = initWithRevalidate(typeof init === "number" ? {
|
|
1665
|
+
status: init
|
|
1666
|
+
} : init);
|
|
1667
|
+
if (responseInit.status === undefined) {
|
|
1668
|
+
responseInit.status = 302;
|
|
1669
|
+
}
|
|
1670
|
+
headers.set("Location", String(url));
|
|
1671
|
+
return new Response(null, {
|
|
1672
|
+
...responseInit,
|
|
1673
|
+
headers
|
|
1674
|
+
});
|
|
1675
|
+
}
|
|
1676
|
+
function reload(init = {}) {
|
|
1677
|
+
const {
|
|
1678
|
+
responseInit,
|
|
1679
|
+
headers
|
|
1680
|
+
} = initWithRevalidate(init);
|
|
1681
|
+
return new Response(null, {
|
|
1682
|
+
...responseInit,
|
|
1683
|
+
headers
|
|
1684
|
+
});
|
|
1685
|
+
}
|
|
1686
|
+
function respond(value, init = {}) {
|
|
1687
|
+
const {
|
|
1688
|
+
responseInit,
|
|
1689
|
+
headers
|
|
1690
|
+
} = initWithRevalidate(init);
|
|
1691
|
+
headers.set("Content-Type", "application/json");
|
|
1692
|
+
return new ResponseEnvelope(new Response(JSON.stringify(value), {
|
|
1693
|
+
...responseInit,
|
|
1694
|
+
headers
|
|
1695
|
+
}), value);
|
|
1696
|
+
}
|
|
535
1697
|
|
|
1698
|
+
const mergeProps = solidJs.merge;
|
|
536
1699
|
const isServer = false;
|
|
537
1700
|
const isDev = false;
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
1701
|
+
function render(code, element, init, options = {}) {
|
|
1702
|
+
try {
|
|
1703
|
+
const dispose = render$1(code, element, init, {
|
|
1704
|
+
...options,
|
|
1705
|
+
insertOptions: {
|
|
1706
|
+
schedule: true
|
|
1707
|
+
}
|
|
1708
|
+
});
|
|
1709
|
+
solidJs.flush();
|
|
1710
|
+
return dispose;
|
|
1711
|
+
} finally {
|
|
1712
|
+
}
|
|
543
1713
|
}
|
|
544
1714
|
const hydrate = (...args) => {
|
|
545
1715
|
solidJs.enableHydration();
|
|
546
1716
|
return hydrate$1(...args);
|
|
547
1717
|
};
|
|
548
1718
|
function Portal(props) {
|
|
1719
|
+
return solidJs.runWithOwner(solidJs.createOwner(), () => portalImpl(props));
|
|
1720
|
+
}
|
|
1721
|
+
function portalImpl(props) {
|
|
549
1722
|
const treeMarker = document.createTextNode(""),
|
|
550
1723
|
startMarker = document.createTextNode(""),
|
|
551
1724
|
endMarker = document.createTextNode(""),
|
|
552
|
-
mount = () =>
|
|
553
|
-
|
|
554
|
-
|
|
1725
|
+
mount = () => props.mount || document.body,
|
|
1726
|
+
content = solidJs.createMemo(() => [startMarker, props.children], {
|
|
1727
|
+
ssrSource: "client",
|
|
1728
|
+
loadingValue: undefined
|
|
1729
|
+
});
|
|
1730
|
+
solidJs.createRenderEffect(
|
|
1731
|
+
() => [mount(), content(), solidJs.getOwner()], ([, c, owner]) => {
|
|
1732
|
+
const m = solidJs.untrack(mount);
|
|
555
1733
|
m.appendChild(endMarker);
|
|
556
|
-
|
|
1734
|
+
const dispose = solidJs.runWithOwner(owner, () => solidJs.createRoot(d => {
|
|
1735
|
+
insert(m, c, endMarker, undefined, {
|
|
1736
|
+
host: () => treeMarker.parentNode
|
|
1737
|
+
});
|
|
1738
|
+
return d;
|
|
1739
|
+
}));
|
|
557
1740
|
return () => {
|
|
1741
|
+
dispose();
|
|
558
1742
|
let c = startMarker;
|
|
559
|
-
while (c
|
|
1743
|
+
while (c) {
|
|
560
1744
|
const n = c.nextSibling;
|
|
561
1745
|
m.removeChild(c);
|
|
1746
|
+
if (c === endMarker) break;
|
|
562
1747
|
c = n;
|
|
563
1748
|
}
|
|
564
1749
|
};
|
|
1750
|
+
},
|
|
1751
|
+
{
|
|
1752
|
+
schedule: true,
|
|
1753
|
+
ssrSource: "client"
|
|
1754
|
+
});
|
|
1755
|
+
solidJs.createEffect(mount, () => {
|
|
1756
|
+
const m = solidJs.untrack(mount);
|
|
1757
|
+
const ownerRoot = getDelegatedRoot(treeMarker);
|
|
1758
|
+
if (!ownerRoot || ownerRoot.contains(m)) return;
|
|
1759
|
+
registerDelegatedContainer(m, ownerRoot);
|
|
1760
|
+
return () => unregisterDelegatedContainer(m, ownerRoot);
|
|
1761
|
+
}, {
|
|
1762
|
+
ssrSource: "client"
|
|
1763
|
+
});
|
|
1764
|
+
if (solidJs.sharedConfig.hydrating) return solidJs.createMemo(() => treeMarker, {
|
|
1765
|
+
ssrSource: "client",
|
|
1766
|
+
loadingValue: undefined
|
|
565
1767
|
});
|
|
566
1768
|
return treeMarker;
|
|
567
1769
|
}
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
if (prop === "appendChild" || prop === "insertBefore") {
|
|
572
|
-
return (...args) => {
|
|
573
|
-
Object.defineProperty(args[0], "_$host", {
|
|
574
|
-
get: () => marker.parentNode,
|
|
575
|
-
configurable: true
|
|
576
|
-
});
|
|
577
|
-
target[prop](...args);
|
|
578
|
-
};
|
|
579
|
-
}
|
|
580
|
-
const value = Reflect.get(target, prop);
|
|
581
|
-
return typeof value === "function" ? value.bind(target) : value;
|
|
582
|
-
}
|
|
583
|
-
});
|
|
1770
|
+
const COMPONENT_BINDING = Symbol.for("dom-expressions.component-binding");
|
|
1771
|
+
function bindingOf(value) {
|
|
1772
|
+
return value !== null && (typeof value === "function" || typeof value === "object") && value[COMPONENT_BINDING] || undefined;
|
|
584
1773
|
}
|
|
585
|
-
function
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
1774
|
+
function dynamic(source) {
|
|
1775
|
+
let latest = 0;
|
|
1776
|
+
const sites = new Set();
|
|
1777
|
+
let deliveredAddress;
|
|
1778
|
+
const resolveBinding = (next, prev) => {
|
|
1779
|
+
const binding = bindingOf(next);
|
|
1780
|
+
if (!binding) return next;
|
|
1781
|
+
deliveredAddress = binding.address;
|
|
1782
|
+
const prevBinding = bindingOf(prev);
|
|
1783
|
+
if (prevBinding && prevBinding.component === binding.component) {
|
|
1784
|
+
for (const deliver of sites) deliver(binding.address);
|
|
1785
|
+
return prev;
|
|
597
1786
|
}
|
|
1787
|
+
return next;
|
|
1788
|
+
};
|
|
1789
|
+
const cached = solidJs.createMemo(prev => {
|
|
1790
|
+
const next = source();
|
|
1791
|
+
if (!next || typeof next.then !== "function") return resolveBinding(next, prev);
|
|
1792
|
+
const token = ++latest;
|
|
1793
|
+
return {
|
|
1794
|
+
then: (onFulfilled, onRejected) => next.then(resolved => onFulfilled(token === latest ? resolveBinding(resolved, prev) : resolved), onRejected)
|
|
1795
|
+
};
|
|
1796
|
+
}, {
|
|
1797
|
+
lazy: true
|
|
598
1798
|
});
|
|
1799
|
+
return props => {
|
|
1800
|
+
return solidJs.createMemo(() => {
|
|
1801
|
+
const component = cached();
|
|
1802
|
+
switch (typeof component) {
|
|
1803
|
+
case "function":
|
|
1804
|
+
{
|
|
1805
|
+
const binding = bindingOf(component);
|
|
1806
|
+
if (binding) {
|
|
1807
|
+
const [address, setAddress] = solidJs.createSignal(deliveredAddress ?? binding.address);
|
|
1808
|
+
sites.add(setAddress);
|
|
1809
|
+
solidJs.onCleanup(() => sites.delete(setAddress));
|
|
1810
|
+
return solidJs.untrack(() => binding.component(props, address));
|
|
1811
|
+
}
|
|
1812
|
+
return solidJs.untrack(() => component(props));
|
|
1813
|
+
}
|
|
1814
|
+
case "string":
|
|
1815
|
+
const el = solidJs.sharedConfig.hydrating ? getNextElement() : createElement(component, solidJs.untrack(() => props.is));
|
|
1816
|
+
spread(el, props);
|
|
1817
|
+
return el;
|
|
1818
|
+
}
|
|
1819
|
+
});
|
|
1820
|
+
};
|
|
599
1821
|
}
|
|
600
1822
|
function Dynamic(props) {
|
|
601
|
-
const
|
|
602
|
-
return
|
|
1823
|
+
const Comp = dynamic(() => props.component);
|
|
1824
|
+
return solidJs.createComponent(Comp, solidJs.omit(props, "component"));
|
|
1825
|
+
}
|
|
1826
|
+
function createElement(tagName, is = undefined) {
|
|
1827
|
+
return SVGElements.has(tagName) ? document.createElementNS(Namespaces.svg, tagName) : MathMLElements.has(tagName) ? document.createElementNS(Namespaces.mathml, tagName) : document.createElement(tagName, {
|
|
1828
|
+
is
|
|
1829
|
+
});
|
|
1830
|
+
}
|
|
1831
|
+
function loadClientOnly(fn, setComp) {
|
|
1832
|
+
fn().then(m => setComp(() => m.default));
|
|
603
1833
|
}
|
|
1834
|
+
function clientOnly(fn, options = {},
|
|
1835
|
+
_moduleUrl) {
|
|
1836
|
+
const [comp, setComp] = solidJs.createSignal();
|
|
1837
|
+
let started = !options.lazy;
|
|
1838
|
+
started && loadClientOnly(fn, setComp);
|
|
1839
|
+
return props => {
|
|
1840
|
+
let Comp;
|
|
1841
|
+
let m;
|
|
1842
|
+
const rest = solidJs.omit(props, "fallback");
|
|
1843
|
+
if (!started) {
|
|
1844
|
+
started = true;
|
|
1845
|
+
loadClientOnly(fn, setComp);
|
|
1846
|
+
}
|
|
1847
|
+
if ((Comp = solidJs.untrack(comp)) && !solidJs.sharedConfig.hydrating) return Comp(rest);
|
|
1848
|
+
const [mounted, setMounted] = solidJs.createSignal(!solidJs.sharedConfig.hydrating);
|
|
1849
|
+
const gate = solidJs.createMemo(() => (Comp = comp(), m = mounted(), solidJs.untrack(() => Comp && m ? Comp(rest) : props.fallback)));
|
|
1850
|
+
const onHydrationEnd = solidJs.sharedConfig.onHydrationEnd;
|
|
1851
|
+
const release = () => setMounted(true);
|
|
1852
|
+
onHydrationEnd ? onHydrationEnd(release) : queueMicrotask(release);
|
|
1853
|
+
return gate;
|
|
1854
|
+
};
|
|
1855
|
+
}
|
|
1856
|
+
function httpStatus(_code, _text) {}
|
|
1857
|
+
function httpHeader(_name, _value, _options) {}
|
|
604
1858
|
|
|
605
|
-
Object.defineProperty(exports, "
|
|
1859
|
+
Object.defineProperty(exports, "Errored", {
|
|
606
1860
|
enumerable: true,
|
|
607
|
-
get: function () { return solidJs.
|
|
1861
|
+
get: function () { return solidJs.Errored; }
|
|
608
1862
|
});
|
|
609
1863
|
Object.defineProperty(exports, "For", {
|
|
610
1864
|
enumerable: true,
|
|
611
1865
|
get: function () { return solidJs.For; }
|
|
612
1866
|
});
|
|
1867
|
+
Object.defineProperty(exports, "Hydration", {
|
|
1868
|
+
enumerable: true,
|
|
1869
|
+
get: function () { return solidJs.Hydration; }
|
|
1870
|
+
});
|
|
1871
|
+
Object.defineProperty(exports, "Loading", {
|
|
1872
|
+
enumerable: true,
|
|
1873
|
+
get: function () { return solidJs.Loading; }
|
|
1874
|
+
});
|
|
613
1875
|
Object.defineProperty(exports, "Match", {
|
|
614
1876
|
enumerable: true,
|
|
615
1877
|
get: function () { return solidJs.Match; }
|
|
616
1878
|
});
|
|
617
|
-
Object.defineProperty(exports, "
|
|
1879
|
+
Object.defineProperty(exports, "NoHydration", {
|
|
618
1880
|
enumerable: true,
|
|
619
|
-
get: function () { return solidJs.
|
|
1881
|
+
get: function () { return solidJs.NoHydration; }
|
|
620
1882
|
});
|
|
621
|
-
Object.defineProperty(exports, "
|
|
1883
|
+
Object.defineProperty(exports, "Repeat", {
|
|
622
1884
|
enumerable: true,
|
|
623
|
-
get: function () { return solidJs.
|
|
1885
|
+
get: function () { return solidJs.Repeat; }
|
|
1886
|
+
});
|
|
1887
|
+
Object.defineProperty(exports, "Reveal", {
|
|
1888
|
+
enumerable: true,
|
|
1889
|
+
get: function () { return solidJs.Reveal; }
|
|
1890
|
+
});
|
|
1891
|
+
Object.defineProperty(exports, "Show", {
|
|
1892
|
+
enumerable: true,
|
|
1893
|
+
get: function () { return solidJs.Show; }
|
|
624
1894
|
});
|
|
625
1895
|
Object.defineProperty(exports, "Switch", {
|
|
626
1896
|
enumerable: true,
|
|
@@ -630,61 +1900,92 @@ Object.defineProperty(exports, "createComponent", {
|
|
|
630
1900
|
enumerable: true,
|
|
631
1901
|
get: function () { return solidJs.createComponent; }
|
|
632
1902
|
});
|
|
633
|
-
Object.defineProperty(exports, "effect", {
|
|
634
|
-
enumerable: true,
|
|
635
|
-
get: function () { return solidJs.createRenderEffect; }
|
|
636
|
-
});
|
|
637
1903
|
Object.defineProperty(exports, "getOwner", {
|
|
638
1904
|
enumerable: true,
|
|
639
1905
|
get: function () { return solidJs.getOwner; }
|
|
640
1906
|
});
|
|
641
|
-
Object.defineProperty(exports, "mergeProps", {
|
|
642
|
-
enumerable: true,
|
|
643
|
-
get: function () { return solidJs.merge; }
|
|
644
|
-
});
|
|
645
1907
|
Object.defineProperty(exports, "untrack", {
|
|
646
1908
|
enumerable: true,
|
|
647
1909
|
get: function () { return solidJs.untrack; }
|
|
648
1910
|
});
|
|
649
|
-
exports.Assets = voidFn;
|
|
650
1911
|
exports.ChildProperties = ChildProperties;
|
|
651
1912
|
exports.DOMElements = DOMElements;
|
|
1913
|
+
exports.DOMWithState = DOMWithState;
|
|
652
1914
|
exports.DelegatedEvents = DelegatedEvents;
|
|
653
1915
|
exports.Dynamic = Dynamic;
|
|
654
|
-
exports.
|
|
1916
|
+
exports.HREF = HREF;
|
|
655
1917
|
exports.HydrationScript = voidFn;
|
|
656
|
-
exports.
|
|
1918
|
+
exports.MathMLElements = MathMLElements;
|
|
1919
|
+
exports.Namespaces = Namespaces;
|
|
657
1920
|
exports.Portal = Portal;
|
|
658
|
-
exports.
|
|
1921
|
+
exports.REVALIDATE_HEADER = REVALIDATE_HEADER;
|
|
1922
|
+
exports.RawTextElements = RawTextElements;
|
|
659
1923
|
exports.RequestContext = RequestContext;
|
|
1924
|
+
exports.ResponseEnvelope = ResponseEnvelope;
|
|
1925
|
+
exports.SAFE_ERROR = SAFE_ERROR;
|
|
660
1926
|
exports.SVGElements = SVGElements;
|
|
661
|
-
exports.
|
|
662
|
-
exports.
|
|
1927
|
+
exports.VoidElements = VoidElements;
|
|
1928
|
+
exports.acquireAsset = acquireAsset;
|
|
1929
|
+
exports.addEvent = addEvent;
|
|
1930
|
+
exports.applyRef = applyRef;
|
|
663
1931
|
exports.assign = assign;
|
|
1932
|
+
exports.claimElement = claimElement;
|
|
1933
|
+
exports.claimElementTree = claimElementTree;
|
|
664
1934
|
exports.className = className;
|
|
665
|
-
exports.
|
|
666
|
-
exports.
|
|
1935
|
+
exports.clearFlashCookie = clearFlashCookie;
|
|
1936
|
+
exports.clientOnly = clientOnly;
|
|
1937
|
+
exports.commitEventResponse = commitEventResponse;
|
|
1938
|
+
exports.composeMiddleware = composeMiddleware;
|
|
1939
|
+
exports.createRequestEvent = createRequestEvent;
|
|
1940
|
+
exports.createResponseStub = createResponseStub;
|
|
1941
|
+
exports.createSSRResponse = createSSRResponse;
|
|
667
1942
|
exports.delegateEvents = delegateEvents;
|
|
1943
|
+
exports.dynamic = dynamic;
|
|
668
1944
|
exports.dynamicProperty = dynamicProperty;
|
|
1945
|
+
exports.effect = effect;
|
|
669
1946
|
exports.escape = escape;
|
|
670
1947
|
exports.generateHydrationScript = voidFn;
|
|
671
|
-
exports.
|
|
1948
|
+
exports.getDelegatedRoot = getDelegatedRoot;
|
|
1949
|
+
exports.getExpectedRedirectStatus = getExpectedRedirectStatus;
|
|
1950
|
+
exports.getFirstChild = getFirstChild;
|
|
672
1951
|
exports.getHydrationKey = getHydrationKey;
|
|
673
1952
|
exports.getNextElement = getNextElement;
|
|
674
1953
|
exports.getNextMarker = getNextMarker;
|
|
675
1954
|
exports.getNextMatch = getNextMatch;
|
|
1955
|
+
exports.getNextSibling = getNextSibling;
|
|
676
1956
|
exports.getRequestEvent = voidFn;
|
|
1957
|
+
exports.getServerFunctionMetadata = getServerFunctionMetadata;
|
|
1958
|
+
exports.getServerFunctionRPC = getServerFunctionRPC;
|
|
1959
|
+
exports.hasFlashCookie = hasFlashCookie;
|
|
1960
|
+
exports.httpHeader = httpHeader;
|
|
1961
|
+
exports.httpStatus = httpStatus;
|
|
677
1962
|
exports.hydrate = hydrate;
|
|
678
1963
|
exports.insert = insert;
|
|
1964
|
+
exports.installHydrationRuntime = installHydrationRuntime;
|
|
679
1965
|
exports.isDev = isDev;
|
|
1966
|
+
exports.isHref = isHref;
|
|
1967
|
+
exports.isResponseEnvelope = isResponseEnvelope;
|
|
1968
|
+
exports.isSafeError = isSafeError;
|
|
680
1969
|
exports.isServer = isServer;
|
|
1970
|
+
exports.isServerFunction = isServerFunction;
|
|
1971
|
+
exports.markSafeError = markSafeError;
|
|
681
1972
|
exports.memo = memo;
|
|
1973
|
+
exports.mergeProps = mergeProps;
|
|
1974
|
+
exports.parseCookieHeader = parseCookieHeader;
|
|
1975
|
+
exports.redirect = redirect;
|
|
1976
|
+
exports.ref = ref;
|
|
1977
|
+
exports.registerDelegatedContainer = registerDelegatedContainer;
|
|
1978
|
+
exports.registerDelegatedRoot = registerDelegatedRoot;
|
|
1979
|
+
exports.registerElementClaim = registerElementClaim;
|
|
1980
|
+
exports.reload = reload;
|
|
682
1981
|
exports.render = render;
|
|
683
1982
|
exports.renderToStream = renderToStream;
|
|
684
1983
|
exports.renderToString = renderToString;
|
|
685
|
-
exports.renderToStringAsync = renderToStringAsync;
|
|
686
1984
|
exports.resolveSSRNode = resolveSSRNode;
|
|
1985
|
+
exports.respond = respond;
|
|
687
1986
|
exports.runHydrationEvents = runHydrationEvents;
|
|
1987
|
+
exports.scope = scope;
|
|
1988
|
+
exports.serializeCookie = serializeCookie;
|
|
688
1989
|
exports.setAttribute = setAttribute;
|
|
689
1990
|
exports.setAttributeNS = setAttributeNS;
|
|
690
1991
|
exports.setProperty = setProperty;
|
|
@@ -692,11 +1993,15 @@ exports.setStyleProperty = setStyleProperty;
|
|
|
692
1993
|
exports.spread = spread;
|
|
693
1994
|
exports.ssr = ssr;
|
|
694
1995
|
exports.ssrAttribute = ssrAttribute;
|
|
695
|
-
exports.
|
|
1996
|
+
exports.ssrClassName = ssrClassName;
|
|
696
1997
|
exports.ssrElement = ssrElement;
|
|
1998
|
+
exports.ssrGroup = ssrGroup;
|
|
697
1999
|
exports.ssrHydrationKey = ssrHydrationKey;
|
|
698
2000
|
exports.ssrStyle = ssrStyle;
|
|
2001
|
+
exports.ssrStyleProperty = ssrStyleProperty;
|
|
699
2002
|
exports.style = style;
|
|
700
2003
|
exports.template = template;
|
|
701
|
-
exports.
|
|
702
|
-
exports.
|
|
2004
|
+
exports.unregisterDelegatedContainer = unregisterDelegatedContainer;
|
|
2005
|
+
exports.unregisterDelegatedRoot = unregisterDelegatedRoot;
|
|
2006
|
+
exports.useHead = useHead;
|
|
2007
|
+
exports.warmAsset = warmAsset;
|