@solidjs/web 2.0.0-experimental.9 → 2.0.0-rc.1
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 +1588 -224
- package/dist/dev.js +1513 -200
- package/dist/server.cjs +2722 -254
- package/dist/server.js +2659 -245
- package/dist/web.cjs +1524 -218
- package/dist/web.js +1449 -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 +3756 -0
- package/frames/dist/server.js +3743 -0
- package/frames/package.json +30 -0
- package/package.json +350 -37
- package/serialization/decode/package.json +20 -0
- package/serialization/dist/decode.cjs +122 -0
- package/serialization/dist/decode.js +116 -0
- package/serialization/dist/serialization.cjs +244 -0
- package/serialization/dist/serialization.js +227 -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 +793 -0
- package/server-functions/dist/client.js +763 -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 +1171 -0
- package/server-functions/dist/server.dev.cjs +1171 -0
- package/server-functions/dist/server.dev.js +1137 -0
- package/server-functions/dist/server.js +1137 -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 +223 -24
- package/types/jsx-properties.d.ts +93 -0
- package/types/jsx.d.ts +4159 -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 +231 -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 +616 -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 +244 -0
- package/types-cjs/jsx-properties.d.cts +93 -0
- package/types-cjs/jsx.d.cts +4159 -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 +231 -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 +616 -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,35 @@ 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
|
+
if (owner && owner === resumeNode) return;
|
|
1365
|
+
e[$$EVENT_OWNER] = owner || true;
|
|
1366
|
+
let node = resumeNode || e.target;
|
|
383
1367
|
const key = `$$${e.type}`;
|
|
384
1368
|
const oriTarget = e.target;
|
|
385
|
-
const
|
|
1369
|
+
const boundary = owner || container || e.currentTarget;
|
|
386
1370
|
const retarget = value => Object.defineProperty(e, "target", {
|
|
387
1371
|
configurable: true,
|
|
388
1372
|
value
|
|
@@ -398,52 +1382,72 @@ function eventHandler(e) {
|
|
|
398
1382
|
return true;
|
|
399
1383
|
};
|
|
400
1384
|
const walkUpTree = () => {
|
|
401
|
-
while (
|
|
1385
|
+
while (node && handleNode()) {
|
|
1386
|
+
if (node === boundary || node.parentNode === boundary) break;
|
|
1387
|
+
node = node._$host || node.parentNode || node.host;
|
|
1388
|
+
}
|
|
402
1389
|
};
|
|
403
1390
|
Object.defineProperty(e, "currentTarget", {
|
|
404
1391
|
configurable: true,
|
|
405
1392
|
get() {
|
|
406
|
-
return node || document;
|
|
1393
|
+
return node || boundary || document;
|
|
407
1394
|
}
|
|
408
1395
|
});
|
|
409
|
-
if (
|
|
410
|
-
|
|
1396
|
+
if (resumeNode) {
|
|
1397
|
+
if (resumeNode === e.target) node = resumeNode._$host || resumeNode.parentNode || resumeNode.host;
|
|
1398
|
+
if (node && node !== boundary) walkUpTree();
|
|
1399
|
+
} else if (e.composedPath) {
|
|
411
1400
|
const path = e.composedPath();
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
1401
|
+
if (path.length) {
|
|
1402
|
+
retarget(path[0]);
|
|
1403
|
+
for (let i = 0; i < path.length; i++) {
|
|
1404
|
+
node = path[i];
|
|
1405
|
+
if (!handleNode()) break;
|
|
1406
|
+
if (node._$host) {
|
|
1407
|
+
node = node._$host;
|
|
1408
|
+
walkUpTree();
|
|
1409
|
+
break;
|
|
1410
|
+
}
|
|
1411
|
+
if (node === boundary || node.parentNode === boundary) {
|
|
1412
|
+
break;
|
|
1413
|
+
}
|
|
423
1414
|
}
|
|
424
|
-
}
|
|
1415
|
+
} else walkUpTree();
|
|
425
1416
|
}
|
|
426
1417
|
else walkUpTree();
|
|
427
1418
|
retarget(oriTarget);
|
|
428
1419
|
}
|
|
429
1420
|
function insertExpression(parent, value, current, marker) {
|
|
430
|
-
if (isHydrating(parent))
|
|
431
|
-
|
|
1421
|
+
if (hydrationRt !== null && isHydrating(parent)) {
|
|
1422
|
+
if (value && value !== current) for (const n of Array.isArray(value) ? value : [value]) if (n && n.nodeType && !isHydrating(n)) return current;
|
|
1423
|
+
return value;
|
|
1424
|
+
}
|
|
1425
|
+
if (value === current) return value;
|
|
432
1426
|
const t = typeof value,
|
|
433
1427
|
multi = marker !== undefined;
|
|
434
1428
|
if (t === "string" || t === "number") {
|
|
435
1429
|
const tc = typeof current;
|
|
436
1430
|
if (tc === "string" || tc === "number") {
|
|
437
1431
|
parent.firstChild.data = value;
|
|
438
|
-
} else
|
|
1432
|
+
} else {
|
|
1433
|
+
if (ownsAllChildren(parent, current)) parent.textContent = value;else {
|
|
1434
|
+
removeOwnedChildren(parent, current);
|
|
1435
|
+
parent.insertBefore(document.createTextNode(value), parent.firstChild);
|
|
1436
|
+
}
|
|
1437
|
+
}
|
|
439
1438
|
} else if (value === undefined) {
|
|
440
1439
|
cleanChildren(parent, current, marker);
|
|
441
1440
|
} else if (value.nodeType) {
|
|
442
1441
|
if (Array.isArray(current)) {
|
|
443
1442
|
cleanChildren(parent, current, multi ? marker : null, value);
|
|
444
|
-
} else if (current
|
|
1443
|
+
} else if (current && current.nodeType) {
|
|
1444
|
+
current.parentNode === parent ? parent.replaceChild(value, current) : parent.appendChild(value);
|
|
1445
|
+
} else if (current && parent.firstChild) {
|
|
1446
|
+
parent.replaceChild(value, parent.firstChild);
|
|
1447
|
+
} else {
|
|
445
1448
|
parent.appendChild(value);
|
|
446
|
-
}
|
|
1449
|
+
}
|
|
1450
|
+
if (marker) value[$$SLOT] = marker;
|
|
447
1451
|
} else if (Array.isArray(value)) {
|
|
448
1452
|
const currentArray = current && Array.isArray(current);
|
|
449
1453
|
if (value.length === 0) {
|
|
@@ -451,12 +1455,13 @@ function insertExpression(parent, value, current, marker) {
|
|
|
451
1455
|
} else if (currentArray) {
|
|
452
1456
|
if (current.length === 0) {
|
|
453
1457
|
appendNodes(parent, value, marker);
|
|
454
|
-
} else reconcileArrays(parent, current, value);
|
|
1458
|
+
} else reconcileArrays(parent, current, value, marker);
|
|
455
1459
|
} else {
|
|
456
|
-
current && cleanChildren(parent);
|
|
1460
|
+
current && cleanChildren(parent, current);
|
|
457
1461
|
appendNodes(parent, value);
|
|
458
1462
|
}
|
|
459
1463
|
} else ;
|
|
1464
|
+
return value;
|
|
460
1465
|
}
|
|
461
1466
|
function normalize(value, current, multi, doNotUnwrap) {
|
|
462
1467
|
value = solidJs.flatten(value, {
|
|
@@ -470,44 +1475,87 @@ function normalize(value, current, multi, doNotUnwrap) {
|
|
|
470
1475
|
const item = value[i],
|
|
471
1476
|
prev = current && current[i],
|
|
472
1477
|
t = typeof item;
|
|
473
|
-
if (t === "string" || t === "number") value[i] = prev && prev.nodeType === 3 && prev.data === item ? prev : document.createTextNode(item);
|
|
1478
|
+
if (t === "string" || t === "number") value[i] = prev && prev.nodeType === 3 && (solidJs.sharedConfig.hydrating || prev.data === "" + item) ? prev : document.createTextNode(item);
|
|
474
1479
|
}
|
|
475
1480
|
}
|
|
476
1481
|
return value;
|
|
477
1482
|
}
|
|
1483
|
+
function tagHost(value, host) {
|
|
1484
|
+
if (Array.isArray(value)) {
|
|
1485
|
+
for (let i = 0, len = value.length; i < len; i++) tagHost(value[i], host);
|
|
1486
|
+
} else if (value && value.nodeType && value[$$HOST] !== host) {
|
|
1487
|
+
value[$$HOST] = host;
|
|
1488
|
+
Object.defineProperty(value, "_$host", {
|
|
1489
|
+
get: host,
|
|
1490
|
+
configurable: true
|
|
1491
|
+
});
|
|
1492
|
+
}
|
|
1493
|
+
}
|
|
478
1494
|
function appendNodes(parent, array, marker = null) {
|
|
479
|
-
for (let i = 0, len = array.length; i < len; i++)
|
|
1495
|
+
for (let i = 0, len = array.length; i < len; i++) {
|
|
1496
|
+
const n = array[i];
|
|
1497
|
+
parent.insertBefore(n, marker);
|
|
1498
|
+
if (marker) n[$$SLOT] = marker;
|
|
1499
|
+
}
|
|
1500
|
+
}
|
|
1501
|
+
function ownsAllChildren(parent, current) {
|
|
1502
|
+
if (current == null) return true;
|
|
1503
|
+
if (Array.isArray(current)) {
|
|
1504
|
+
return current.length ? parent.firstChild === current[0] && parent.lastChild === current[current.length - 1] : parent.firstChild === null;
|
|
1505
|
+
}
|
|
1506
|
+
if (current === "") return parent.firstChild === null;
|
|
1507
|
+
if (current.nodeType) return parent.firstChild === current && parent.lastChild === current;
|
|
1508
|
+
const first = parent.firstChild;
|
|
1509
|
+
return first !== null && first.nodeType === 3 && parent.lastChild === first;
|
|
1510
|
+
}
|
|
1511
|
+
function removeOwnedChildren(parent, current) {
|
|
1512
|
+
if (Array.isArray(current)) {
|
|
1513
|
+
for (let i = 0; i < current.length; i++) {
|
|
1514
|
+
const el = current[i];
|
|
1515
|
+
if (el.parentNode === parent) el.remove();
|
|
1516
|
+
}
|
|
1517
|
+
} else if (current.nodeType) {
|
|
1518
|
+
if (current.parentNode === parent) current.remove();
|
|
1519
|
+
} else {
|
|
1520
|
+
const first = parent.firstChild;
|
|
1521
|
+
if (first && first.nodeType === 3) first.remove();
|
|
1522
|
+
}
|
|
480
1523
|
}
|
|
481
1524
|
function cleanChildren(parent, current, marker, replacement) {
|
|
482
|
-
if (marker === undefined)
|
|
1525
|
+
if (marker === undefined) {
|
|
1526
|
+
if (ownsAllChildren(parent, current)) return parent.textContent = "";
|
|
1527
|
+
return removeOwnedChildren(parent, current);
|
|
1528
|
+
}
|
|
483
1529
|
if (current.length) {
|
|
484
1530
|
let inserted = false;
|
|
485
1531
|
for (let i = current.length - 1; i >= 0; i--) {
|
|
486
1532
|
const el = current[i];
|
|
487
1533
|
if (replacement !== el) {
|
|
488
|
-
const
|
|
489
|
-
|
|
1534
|
+
const tag = el[$$SLOT];
|
|
1535
|
+
const owns = el.parentNode === parent && (!tag || tag === marker);
|
|
1536
|
+
if (replacement && !inserted && !i) owns ? parent.replaceChild(replacement, el) : parent.insertBefore(replacement, marker);else if (owns) el.remove();
|
|
490
1537
|
} else inserted = true;
|
|
491
1538
|
}
|
|
492
1539
|
} else if (replacement) parent.insertBefore(replacement, marker);
|
|
1540
|
+
if (replacement && marker) replacement[$$SLOT] = marker;
|
|
493
1541
|
}
|
|
494
1542
|
function gatherHydratable(element, root) {
|
|
495
1543
|
const templates = element.querySelectorAll(`*[_hk]`);
|
|
496
1544
|
for (let i = 0; i < templates.length; i++) {
|
|
497
1545
|
const node = templates[i];
|
|
498
1546
|
const key = node.getAttribute("_hk");
|
|
499
|
-
if (
|
|
1547
|
+
if (root) {
|
|
1548
|
+
if (!key.startsWith(root)) continue;
|
|
1549
|
+
} else {
|
|
1550
|
+
const frame = node.closest("[data-fid]");
|
|
1551
|
+
if (frame && frame !== element && element.contains(frame)) continue;
|
|
1552
|
+
}
|
|
1553
|
+
if (!solidJs.sharedConfig.registry.has(key)) solidJs.sharedConfig.registry.set(key, node);
|
|
500
1554
|
}
|
|
501
1555
|
}
|
|
502
1556
|
function getHydrationKey() {
|
|
503
1557
|
return solidJs.sharedConfig.getNextContextId();
|
|
504
1558
|
}
|
|
505
|
-
function NoHydration(props) {
|
|
506
|
-
return solidJs.sharedConfig.hydrating ? undefined : props.children;
|
|
507
|
-
}
|
|
508
|
-
function Hydration(props) {
|
|
509
|
-
return props.children;
|
|
510
|
-
}
|
|
511
1559
|
const voidFn = () => undefined;
|
|
512
1560
|
const RequestContext = Symbol();
|
|
513
1561
|
|
|
@@ -518,109 +1566,332 @@ function throwInBrowser(func) {
|
|
|
518
1566
|
function renderToString(fn, options) {
|
|
519
1567
|
throwInBrowser(renderToString);
|
|
520
1568
|
}
|
|
521
|
-
function renderToStringAsync(fn, options) {
|
|
522
|
-
throwInBrowser(renderToStringAsync);
|
|
523
|
-
}
|
|
524
1569
|
function renderToStream(fn, options) {
|
|
525
1570
|
throwInBrowser(renderToStream);
|
|
526
1571
|
}
|
|
1572
|
+
function createResponseStub() {
|
|
1573
|
+
throwInBrowser(createResponseStub);
|
|
1574
|
+
}
|
|
1575
|
+
function createRequestEvent(request, init) {
|
|
1576
|
+
throwInBrowser(createRequestEvent);
|
|
1577
|
+
}
|
|
1578
|
+
function getExpectedRedirectStatus(response) {
|
|
1579
|
+
throwInBrowser(getExpectedRedirectStatus);
|
|
1580
|
+
}
|
|
1581
|
+
function createSSRResponse() {
|
|
1582
|
+
throwInBrowser(createSSRResponse);
|
|
1583
|
+
}
|
|
1584
|
+
function commitEventResponse(response, event) {
|
|
1585
|
+
throwInBrowser(commitEventResponse);
|
|
1586
|
+
}
|
|
1587
|
+
function composeMiddleware(middlewares) {
|
|
1588
|
+
throwInBrowser(composeMiddleware);
|
|
1589
|
+
}
|
|
527
1590
|
function ssr(template, ...nodes) {}
|
|
528
1591
|
function ssrElement(name, props, children, needsId) {}
|
|
529
|
-
function
|
|
1592
|
+
function ssrClassName(value) {}
|
|
530
1593
|
function ssrStyle(value) {}
|
|
1594
|
+
function ssrStyleProperty(name, value) {}
|
|
531
1595
|
function ssrAttribute(key, value) {}
|
|
1596
|
+
function ssrGroup(fn, n) {}
|
|
532
1597
|
function ssrHydrationKey() {}
|
|
533
|
-
function resolveSSRNode(node) {}
|
|
534
|
-
function escape(
|
|
1598
|
+
function resolveSSRNode(node, result, top) {}
|
|
1599
|
+
function escape(s, attr) {}
|
|
1600
|
+
|
|
1601
|
+
const ENVELOPE = Symbol.for("solid.ResponseEnvelope");
|
|
1602
|
+
// PURE-annotated factory (same convention as solid's MockPromise): the brand
|
|
1603
|
+
const ResponseEnvelope = /* @__PURE__ */(() => {
|
|
1604
|
+
class ResponseEnvelope {
|
|
1605
|
+
constructor(response, value) {
|
|
1606
|
+
this.response = response;
|
|
1607
|
+
this.value = value;
|
|
1608
|
+
}
|
|
1609
|
+
}
|
|
1610
|
+
ResponseEnvelope.prototype[ENVELOPE] = true;
|
|
1611
|
+
return ResponseEnvelope;
|
|
1612
|
+
})();
|
|
1613
|
+
function isResponseEnvelope(value) {
|
|
1614
|
+
return !!(value && typeof value === "object" && value[ENVELOPE]);
|
|
1615
|
+
}
|
|
1616
|
+
const HREF = Symbol.for("solid.Href");
|
|
1617
|
+
function isHref(value) {
|
|
1618
|
+
return !!(value && (typeof value === "object" || typeof value === "function") && value[HREF]);
|
|
1619
|
+
}
|
|
1620
|
+
const SAFE_ERROR = Symbol.for("solid.SafeError");
|
|
1621
|
+
function markSafeError(error) {
|
|
1622
|
+
if (error && (typeof error === "object" || typeof error === "function")) {
|
|
1623
|
+
Object.defineProperty(error, SAFE_ERROR, {
|
|
1624
|
+
value: true,
|
|
1625
|
+
enumerable: false,
|
|
1626
|
+
configurable: true
|
|
1627
|
+
});
|
|
1628
|
+
}
|
|
1629
|
+
return error;
|
|
1630
|
+
}
|
|
1631
|
+
function isSafeError(value) {
|
|
1632
|
+
return !!(value && (typeof value === "object" || typeof value === "function") && value[SAFE_ERROR]);
|
|
1633
|
+
}
|
|
1634
|
+
const REVALIDATE_HEADER = "X-Revalidate";
|
|
1635
|
+
function initWithRevalidate(init) {
|
|
1636
|
+
const {
|
|
1637
|
+
revalidate,
|
|
1638
|
+
...responseInit
|
|
1639
|
+
} = init;
|
|
1640
|
+
let headers;
|
|
1641
|
+
if (responseInit.headers && responseInit.headers.getSetCookie) {
|
|
1642
|
+
headers = new Headers();
|
|
1643
|
+
responseInit.headers.forEach((value, key) => {
|
|
1644
|
+
if (key !== "set-cookie") headers.append(key, value);
|
|
1645
|
+
});
|
|
1646
|
+
for (const cookie of responseInit.headers.getSetCookie()) {
|
|
1647
|
+
headers.append("Set-Cookie", cookie);
|
|
1648
|
+
}
|
|
1649
|
+
} else {
|
|
1650
|
+
headers = new Headers(responseInit.headers);
|
|
1651
|
+
}
|
|
1652
|
+
revalidate !== undefined && headers.set(REVALIDATE_HEADER, revalidate.toString());
|
|
1653
|
+
return {
|
|
1654
|
+
responseInit,
|
|
1655
|
+
headers
|
|
1656
|
+
};
|
|
1657
|
+
}
|
|
1658
|
+
function redirect(url, init = 302) {
|
|
1659
|
+
if (typeof url !== "string" && !isHref(url)) {
|
|
1660
|
+
throw new TypeError("redirect() expects a string URL or an Href-branded value (Symbol.for('solid.Href')).");
|
|
1661
|
+
}
|
|
1662
|
+
const {
|
|
1663
|
+
responseInit,
|
|
1664
|
+
headers
|
|
1665
|
+
} = initWithRevalidate(typeof init === "number" ? {
|
|
1666
|
+
status: init
|
|
1667
|
+
} : init);
|
|
1668
|
+
if (responseInit.status === undefined) {
|
|
1669
|
+
responseInit.status = 302;
|
|
1670
|
+
}
|
|
1671
|
+
headers.set("Location", String(url));
|
|
1672
|
+
return new Response(null, {
|
|
1673
|
+
...responseInit,
|
|
1674
|
+
headers
|
|
1675
|
+
});
|
|
1676
|
+
}
|
|
1677
|
+
function reload(init = {}) {
|
|
1678
|
+
const {
|
|
1679
|
+
responseInit,
|
|
1680
|
+
headers
|
|
1681
|
+
} = initWithRevalidate(init);
|
|
1682
|
+
return new Response(null, {
|
|
1683
|
+
...responseInit,
|
|
1684
|
+
headers
|
|
1685
|
+
});
|
|
1686
|
+
}
|
|
1687
|
+
function respond(value, init = {}) {
|
|
1688
|
+
const {
|
|
1689
|
+
responseInit,
|
|
1690
|
+
headers
|
|
1691
|
+
} = initWithRevalidate(init);
|
|
1692
|
+
headers.set("Content-Type", "application/json");
|
|
1693
|
+
return new ResponseEnvelope(new Response(JSON.stringify(value), {
|
|
1694
|
+
...responseInit,
|
|
1695
|
+
headers
|
|
1696
|
+
}), value);
|
|
1697
|
+
}
|
|
535
1698
|
|
|
1699
|
+
const mergeProps = solidJs.merge;
|
|
536
1700
|
const isServer = false;
|
|
537
1701
|
const isDev = false;
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
1702
|
+
function render(code, element, init, options = {}) {
|
|
1703
|
+
try {
|
|
1704
|
+
const dispose = render$1(code, element, init, {
|
|
1705
|
+
...options,
|
|
1706
|
+
insertOptions: {
|
|
1707
|
+
schedule: true
|
|
1708
|
+
}
|
|
1709
|
+
});
|
|
1710
|
+
solidJs.flush();
|
|
1711
|
+
return dispose;
|
|
1712
|
+
} finally {
|
|
1713
|
+
}
|
|
543
1714
|
}
|
|
544
1715
|
const hydrate = (...args) => {
|
|
545
1716
|
solidJs.enableHydration();
|
|
546
1717
|
return hydrate$1(...args);
|
|
547
1718
|
};
|
|
548
1719
|
function Portal(props) {
|
|
1720
|
+
return solidJs.runWithOwner(solidJs.createOwner(), () => portalImpl(props));
|
|
1721
|
+
}
|
|
1722
|
+
function portalImpl(props) {
|
|
549
1723
|
const treeMarker = document.createTextNode(""),
|
|
550
1724
|
startMarker = document.createTextNode(""),
|
|
551
1725
|
endMarker = document.createTextNode(""),
|
|
552
|
-
mount = () =>
|
|
553
|
-
|
|
554
|
-
|
|
1726
|
+
mount = () => props.mount || document.body,
|
|
1727
|
+
content = solidJs.createMemo(() => [startMarker, props.children], {
|
|
1728
|
+
ssrSource: "client",
|
|
1729
|
+
loadingValue: undefined
|
|
1730
|
+
});
|
|
1731
|
+
solidJs.createRenderEffect(
|
|
1732
|
+
() => [mount(), content(), solidJs.getOwner()], ([, c, owner]) => {
|
|
1733
|
+
const m = solidJs.untrack(mount);
|
|
555
1734
|
m.appendChild(endMarker);
|
|
556
|
-
|
|
1735
|
+
const dispose = solidJs.runWithOwner(owner, () => solidJs.createRoot(d => {
|
|
1736
|
+
insert(m, c, endMarker, undefined, {
|
|
1737
|
+
host: () => treeMarker.parentNode
|
|
1738
|
+
});
|
|
1739
|
+
return d;
|
|
1740
|
+
}));
|
|
557
1741
|
return () => {
|
|
1742
|
+
dispose();
|
|
558
1743
|
let c = startMarker;
|
|
559
|
-
while (c
|
|
1744
|
+
while (c) {
|
|
560
1745
|
const n = c.nextSibling;
|
|
561
1746
|
m.removeChild(c);
|
|
1747
|
+
if (c === endMarker) break;
|
|
562
1748
|
c = n;
|
|
563
1749
|
}
|
|
564
1750
|
};
|
|
1751
|
+
},
|
|
1752
|
+
{
|
|
1753
|
+
schedule: true,
|
|
1754
|
+
ssrSource: "client"
|
|
1755
|
+
});
|
|
1756
|
+
solidJs.createEffect(mount, () => {
|
|
1757
|
+
const m = solidJs.untrack(mount);
|
|
1758
|
+
const ownerRoot = getDelegatedRoot(treeMarker);
|
|
1759
|
+
if (!ownerRoot || ownerRoot.contains(m)) return;
|
|
1760
|
+
registerDelegatedContainer(m, ownerRoot);
|
|
1761
|
+
return () => unregisterDelegatedContainer(m, ownerRoot);
|
|
1762
|
+
}, {
|
|
1763
|
+
ssrSource: "client"
|
|
1764
|
+
});
|
|
1765
|
+
if (solidJs.sharedConfig.hydrating) return solidJs.createMemo(() => treeMarker, {
|
|
1766
|
+
ssrSource: "client",
|
|
1767
|
+
loadingValue: undefined
|
|
565
1768
|
});
|
|
566
1769
|
return treeMarker;
|
|
567
1770
|
}
|
|
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
|
-
});
|
|
1771
|
+
const COMPONENT_BINDING = Symbol.for("dom-expressions.component-binding");
|
|
1772
|
+
function bindingOf(value) {
|
|
1773
|
+
return value !== null && (typeof value === "function" || typeof value === "object") && value[COMPONENT_BINDING] || undefined;
|
|
584
1774
|
}
|
|
585
|
-
function
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
1775
|
+
function dynamic(source) {
|
|
1776
|
+
let latest = 0;
|
|
1777
|
+
const sites = new Set();
|
|
1778
|
+
let deliveredAddress;
|
|
1779
|
+
const resolveBinding = (next, prev) => {
|
|
1780
|
+
const binding = bindingOf(next);
|
|
1781
|
+
if (!binding) return next;
|
|
1782
|
+
deliveredAddress = binding.address;
|
|
1783
|
+
const prevBinding = bindingOf(prev);
|
|
1784
|
+
if (prevBinding && prevBinding.component === binding.component) {
|
|
1785
|
+
for (const deliver of sites) deliver(binding.address);
|
|
1786
|
+
return prev;
|
|
597
1787
|
}
|
|
1788
|
+
return next;
|
|
1789
|
+
};
|
|
1790
|
+
const cached = solidJs.createMemo(prev => {
|
|
1791
|
+
const next = source();
|
|
1792
|
+
if (!next || typeof next.then !== "function") return resolveBinding(next, prev);
|
|
1793
|
+
const token = ++latest;
|
|
1794
|
+
return {
|
|
1795
|
+
then: (onFulfilled, onRejected) => next.then(resolved => onFulfilled(token === latest ? resolveBinding(resolved, prev) : resolved), onRejected)
|
|
1796
|
+
};
|
|
1797
|
+
}, {
|
|
1798
|
+
lazy: true
|
|
598
1799
|
});
|
|
1800
|
+
return props => {
|
|
1801
|
+
return solidJs.createMemo(() => {
|
|
1802
|
+
const component = cached();
|
|
1803
|
+
switch (typeof component) {
|
|
1804
|
+
case "function":
|
|
1805
|
+
{
|
|
1806
|
+
const binding = bindingOf(component);
|
|
1807
|
+
if (binding) {
|
|
1808
|
+
const [address, setAddress] = solidJs.createSignal(deliveredAddress ?? binding.address);
|
|
1809
|
+
sites.add(setAddress);
|
|
1810
|
+
solidJs.onCleanup(() => sites.delete(setAddress));
|
|
1811
|
+
return solidJs.untrack(() => binding.component(props, address));
|
|
1812
|
+
}
|
|
1813
|
+
return solidJs.untrack(() => component(props));
|
|
1814
|
+
}
|
|
1815
|
+
case "string":
|
|
1816
|
+
const el = solidJs.sharedConfig.hydrating ? getNextElement() : createElement(component, solidJs.untrack(() => props.is));
|
|
1817
|
+
spread(el, props);
|
|
1818
|
+
return el;
|
|
1819
|
+
}
|
|
1820
|
+
});
|
|
1821
|
+
};
|
|
599
1822
|
}
|
|
600
1823
|
function Dynamic(props) {
|
|
601
|
-
const
|
|
602
|
-
return
|
|
1824
|
+
const Comp = dynamic(() => props.component);
|
|
1825
|
+
return solidJs.createComponent(Comp, solidJs.omit(props, "component"));
|
|
1826
|
+
}
|
|
1827
|
+
function createElement(tagName, is = undefined) {
|
|
1828
|
+
return SVGElements.has(tagName) ? document.createElementNS(Namespaces.svg, tagName) : MathMLElements.has(tagName) ? document.createElementNS(Namespaces.mathml, tagName) : document.createElement(tagName, {
|
|
1829
|
+
is
|
|
1830
|
+
});
|
|
1831
|
+
}
|
|
1832
|
+
function loadClientOnly(fn, setComp, exportName) {
|
|
1833
|
+
fn().then(m => setComp(() => exportName ? m[exportName] : m.default));
|
|
603
1834
|
}
|
|
1835
|
+
function clientOnly(fn, options = {},
|
|
1836
|
+
_moduleUrl) {
|
|
1837
|
+
const [comp, setComp] = solidJs.createSignal();
|
|
1838
|
+
let started = !options.lazy;
|
|
1839
|
+
started && loadClientOnly(fn, setComp, options.export);
|
|
1840
|
+
return props => {
|
|
1841
|
+
let Comp;
|
|
1842
|
+
let m;
|
|
1843
|
+
const rest = solidJs.omit(props, "fallback");
|
|
1844
|
+
if (!started) {
|
|
1845
|
+
started = true;
|
|
1846
|
+
loadClientOnly(fn, setComp, options.export);
|
|
1847
|
+
}
|
|
1848
|
+
if ((Comp = solidJs.untrack(comp)) && !solidJs.sharedConfig.hydrating) return Comp(rest);
|
|
1849
|
+
const [mounted, setMounted] = solidJs.createSignal(!solidJs.sharedConfig.hydrating);
|
|
1850
|
+
const gate = solidJs.createMemo(() => (Comp = comp(), m = mounted(), solidJs.untrack(() => Comp && m ? Comp(rest) : props.fallback)));
|
|
1851
|
+
const onHydrationEnd = solidJs.sharedConfig.onHydrationEnd;
|
|
1852
|
+
const release = () => setMounted(true);
|
|
1853
|
+
onHydrationEnd ? onHydrationEnd(release) : queueMicrotask(release);
|
|
1854
|
+
return gate;
|
|
1855
|
+
};
|
|
1856
|
+
}
|
|
1857
|
+
function httpStatus(_code, _text) {}
|
|
1858
|
+
function httpHeader(_name, _value, _options) {}
|
|
604
1859
|
|
|
605
|
-
Object.defineProperty(exports, "
|
|
1860
|
+
Object.defineProperty(exports, "Errored", {
|
|
606
1861
|
enumerable: true,
|
|
607
|
-
get: function () { return solidJs.
|
|
1862
|
+
get: function () { return solidJs.Errored; }
|
|
608
1863
|
});
|
|
609
1864
|
Object.defineProperty(exports, "For", {
|
|
610
1865
|
enumerable: true,
|
|
611
1866
|
get: function () { return solidJs.For; }
|
|
612
1867
|
});
|
|
1868
|
+
Object.defineProperty(exports, "Hydration", {
|
|
1869
|
+
enumerable: true,
|
|
1870
|
+
get: function () { return solidJs.Hydration; }
|
|
1871
|
+
});
|
|
1872
|
+
Object.defineProperty(exports, "Loading", {
|
|
1873
|
+
enumerable: true,
|
|
1874
|
+
get: function () { return solidJs.Loading; }
|
|
1875
|
+
});
|
|
613
1876
|
Object.defineProperty(exports, "Match", {
|
|
614
1877
|
enumerable: true,
|
|
615
1878
|
get: function () { return solidJs.Match; }
|
|
616
1879
|
});
|
|
617
|
-
Object.defineProperty(exports, "
|
|
1880
|
+
Object.defineProperty(exports, "NoHydration", {
|
|
618
1881
|
enumerable: true,
|
|
619
|
-
get: function () { return solidJs.
|
|
1882
|
+
get: function () { return solidJs.NoHydration; }
|
|
620
1883
|
});
|
|
621
|
-
Object.defineProperty(exports, "
|
|
1884
|
+
Object.defineProperty(exports, "Repeat", {
|
|
622
1885
|
enumerable: true,
|
|
623
|
-
get: function () { return solidJs.
|
|
1886
|
+
get: function () { return solidJs.Repeat; }
|
|
1887
|
+
});
|
|
1888
|
+
Object.defineProperty(exports, "Reveal", {
|
|
1889
|
+
enumerable: true,
|
|
1890
|
+
get: function () { return solidJs.Reveal; }
|
|
1891
|
+
});
|
|
1892
|
+
Object.defineProperty(exports, "Show", {
|
|
1893
|
+
enumerable: true,
|
|
1894
|
+
get: function () { return solidJs.Show; }
|
|
624
1895
|
});
|
|
625
1896
|
Object.defineProperty(exports, "Switch", {
|
|
626
1897
|
enumerable: true,
|
|
@@ -630,61 +1901,92 @@ Object.defineProperty(exports, "createComponent", {
|
|
|
630
1901
|
enumerable: true,
|
|
631
1902
|
get: function () { return solidJs.createComponent; }
|
|
632
1903
|
});
|
|
633
|
-
Object.defineProperty(exports, "effect", {
|
|
634
|
-
enumerable: true,
|
|
635
|
-
get: function () { return solidJs.createRenderEffect; }
|
|
636
|
-
});
|
|
637
1904
|
Object.defineProperty(exports, "getOwner", {
|
|
638
1905
|
enumerable: true,
|
|
639
1906
|
get: function () { return solidJs.getOwner; }
|
|
640
1907
|
});
|
|
641
|
-
Object.defineProperty(exports, "mergeProps", {
|
|
642
|
-
enumerable: true,
|
|
643
|
-
get: function () { return solidJs.merge; }
|
|
644
|
-
});
|
|
645
1908
|
Object.defineProperty(exports, "untrack", {
|
|
646
1909
|
enumerable: true,
|
|
647
1910
|
get: function () { return solidJs.untrack; }
|
|
648
1911
|
});
|
|
649
|
-
exports.Assets = voidFn;
|
|
650
1912
|
exports.ChildProperties = ChildProperties;
|
|
651
1913
|
exports.DOMElements = DOMElements;
|
|
1914
|
+
exports.DOMWithState = DOMWithState;
|
|
652
1915
|
exports.DelegatedEvents = DelegatedEvents;
|
|
653
1916
|
exports.Dynamic = Dynamic;
|
|
654
|
-
exports.
|
|
1917
|
+
exports.HREF = HREF;
|
|
655
1918
|
exports.HydrationScript = voidFn;
|
|
656
|
-
exports.
|
|
1919
|
+
exports.MathMLElements = MathMLElements;
|
|
1920
|
+
exports.Namespaces = Namespaces;
|
|
657
1921
|
exports.Portal = Portal;
|
|
658
|
-
exports.
|
|
1922
|
+
exports.REVALIDATE_HEADER = REVALIDATE_HEADER;
|
|
1923
|
+
exports.RawTextElements = RawTextElements;
|
|
659
1924
|
exports.RequestContext = RequestContext;
|
|
1925
|
+
exports.ResponseEnvelope = ResponseEnvelope;
|
|
1926
|
+
exports.SAFE_ERROR = SAFE_ERROR;
|
|
660
1927
|
exports.SVGElements = SVGElements;
|
|
661
|
-
exports.
|
|
662
|
-
exports.
|
|
1928
|
+
exports.VoidElements = VoidElements;
|
|
1929
|
+
exports.acquireAsset = acquireAsset;
|
|
1930
|
+
exports.addEvent = addEvent;
|
|
1931
|
+
exports.applyRef = applyRef;
|
|
663
1932
|
exports.assign = assign;
|
|
1933
|
+
exports.claimElement = claimElement;
|
|
1934
|
+
exports.claimElementTree = claimElementTree;
|
|
664
1935
|
exports.className = className;
|
|
665
|
-
exports.
|
|
666
|
-
exports.
|
|
1936
|
+
exports.clearFlashCookie = clearFlashCookie;
|
|
1937
|
+
exports.clientOnly = clientOnly;
|
|
1938
|
+
exports.commitEventResponse = commitEventResponse;
|
|
1939
|
+
exports.composeMiddleware = composeMiddleware;
|
|
1940
|
+
exports.createRequestEvent = createRequestEvent;
|
|
1941
|
+
exports.createResponseStub = createResponseStub;
|
|
1942
|
+
exports.createSSRResponse = createSSRResponse;
|
|
667
1943
|
exports.delegateEvents = delegateEvents;
|
|
1944
|
+
exports.dynamic = dynamic;
|
|
668
1945
|
exports.dynamicProperty = dynamicProperty;
|
|
1946
|
+
exports.effect = effect;
|
|
669
1947
|
exports.escape = escape;
|
|
670
1948
|
exports.generateHydrationScript = voidFn;
|
|
671
|
-
exports.
|
|
1949
|
+
exports.getDelegatedRoot = getDelegatedRoot;
|
|
1950
|
+
exports.getExpectedRedirectStatus = getExpectedRedirectStatus;
|
|
1951
|
+
exports.getFirstChild = getFirstChild;
|
|
672
1952
|
exports.getHydrationKey = getHydrationKey;
|
|
673
1953
|
exports.getNextElement = getNextElement;
|
|
674
1954
|
exports.getNextMarker = getNextMarker;
|
|
675
1955
|
exports.getNextMatch = getNextMatch;
|
|
1956
|
+
exports.getNextSibling = getNextSibling;
|
|
676
1957
|
exports.getRequestEvent = voidFn;
|
|
1958
|
+
exports.getServerFunctionMetadata = getServerFunctionMetadata;
|
|
1959
|
+
exports.getServerFunctionRPC = getServerFunctionRPC;
|
|
1960
|
+
exports.hasFlashCookie = hasFlashCookie;
|
|
1961
|
+
exports.httpHeader = httpHeader;
|
|
1962
|
+
exports.httpStatus = httpStatus;
|
|
677
1963
|
exports.hydrate = hydrate;
|
|
678
1964
|
exports.insert = insert;
|
|
1965
|
+
exports.installHydrationRuntime = installHydrationRuntime;
|
|
679
1966
|
exports.isDev = isDev;
|
|
1967
|
+
exports.isHref = isHref;
|
|
1968
|
+
exports.isResponseEnvelope = isResponseEnvelope;
|
|
1969
|
+
exports.isSafeError = isSafeError;
|
|
680
1970
|
exports.isServer = isServer;
|
|
1971
|
+
exports.isServerFunction = isServerFunction;
|
|
1972
|
+
exports.markSafeError = markSafeError;
|
|
681
1973
|
exports.memo = memo;
|
|
1974
|
+
exports.mergeProps = mergeProps;
|
|
1975
|
+
exports.parseCookieHeader = parseCookieHeader;
|
|
1976
|
+
exports.redirect = redirect;
|
|
1977
|
+
exports.ref = ref;
|
|
1978
|
+
exports.registerDelegatedContainer = registerDelegatedContainer;
|
|
1979
|
+
exports.registerDelegatedRoot = registerDelegatedRoot;
|
|
1980
|
+
exports.registerElementClaim = registerElementClaim;
|
|
1981
|
+
exports.reload = reload;
|
|
682
1982
|
exports.render = render;
|
|
683
1983
|
exports.renderToStream = renderToStream;
|
|
684
1984
|
exports.renderToString = renderToString;
|
|
685
|
-
exports.renderToStringAsync = renderToStringAsync;
|
|
686
1985
|
exports.resolveSSRNode = resolveSSRNode;
|
|
1986
|
+
exports.respond = respond;
|
|
687
1987
|
exports.runHydrationEvents = runHydrationEvents;
|
|
1988
|
+
exports.scope = scope;
|
|
1989
|
+
exports.serializeCookie = serializeCookie;
|
|
688
1990
|
exports.setAttribute = setAttribute;
|
|
689
1991
|
exports.setAttributeNS = setAttributeNS;
|
|
690
1992
|
exports.setProperty = setProperty;
|
|
@@ -692,11 +1994,15 @@ exports.setStyleProperty = setStyleProperty;
|
|
|
692
1994
|
exports.spread = spread;
|
|
693
1995
|
exports.ssr = ssr;
|
|
694
1996
|
exports.ssrAttribute = ssrAttribute;
|
|
695
|
-
exports.
|
|
1997
|
+
exports.ssrClassName = ssrClassName;
|
|
696
1998
|
exports.ssrElement = ssrElement;
|
|
1999
|
+
exports.ssrGroup = ssrGroup;
|
|
697
2000
|
exports.ssrHydrationKey = ssrHydrationKey;
|
|
698
2001
|
exports.ssrStyle = ssrStyle;
|
|
2002
|
+
exports.ssrStyleProperty = ssrStyleProperty;
|
|
699
2003
|
exports.style = style;
|
|
700
2004
|
exports.template = template;
|
|
701
|
-
exports.
|
|
702
|
-
exports.
|
|
2005
|
+
exports.unregisterDelegatedContainer = unregisterDelegatedContainer;
|
|
2006
|
+
exports.unregisterDelegatedRoot = unregisterDelegatedRoot;
|
|
2007
|
+
exports.useHead = useHead;
|
|
2008
|
+
exports.warmAsset = warmAsset;
|