@qwik.dev/core 2.0.0-beta.7 → 2.0.0-beta.9
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/bindings/qwik.darwin-arm64.node +0 -0
- package/bindings/qwik.darwin-x64.node +0 -0
- package/bindings/qwik.linux-x64-gnu.node +0 -0
- package/bindings/qwik.win32-x64-msvc.node +0 -0
- package/bindings/qwik_wasm_bg.wasm +0 -0
- package/dist/backpatch/index.cjs +6 -0
- package/dist/backpatch/index.d.ts +2 -0
- package/dist/backpatch/index.mjs +5 -0
- package/dist/backpatch/package.json +8 -0
- package/dist/backpatch-executor.debug.js +34 -0
- package/dist/backpatch-executor.js +1 -0
- package/dist/build/package.json +1 -1
- package/dist/cli.cjs +17 -17
- package/dist/core-internal.d.ts +112 -56
- package/dist/core.cjs +1022 -469
- package/dist/core.cjs.map +1 -1
- package/dist/core.min.mjs +1 -1
- package/dist/core.mjs +1018 -469
- package/dist/core.mjs.map +1 -1
- package/dist/core.prod.cjs +654 -361
- package/dist/core.prod.mjs +729 -373
- package/dist/loader/index.cjs +2 -2
- package/dist/loader/index.mjs +2 -2
- package/dist/loader/package.json +1 -1
- package/dist/optimizer.cjs +78 -76
- package/dist/optimizer.mjs +78 -78
- package/dist/qwikloader.debug.js +0 -13
- package/dist/qwikloader.js +1 -1
- package/dist/server.cjs +217 -63
- package/dist/server.d.ts +9 -0
- package/dist/server.mjs +213 -63
- package/dist/starters/features/auth/package.json +1 -1
- package/dist/starters/features/localize/package.json +3 -3
- package/dist/starters/features/pandacss/package.json +1 -1
- package/dist/starters/features/playwright/playwright-report/index.html +943 -903
- package/dist/starters/features/postcss/postcss.config.js +1 -1
- package/dist/starters/features/tailwind/package.json +2 -2
- package/dist/starters/features/tailwind/prettier.config.js +10 -0
- package/dist/starters/features/tailwind-v3/package.json +1 -1
- package/dist/starters/features/tailwind-v3/prettier.config.js +10 -0
- package/dist/testing/index.cjs +3826 -952
- package/dist/testing/index.d.ts +972 -1
- package/dist/testing/index.mjs +3811 -946
- package/dist/testing/package.json +1 -1
- package/package.json +8 -6
- package/dist/starters/features/tailwind/.prettierrc.js +0 -3
package/dist/server.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* @qwik.dev/core/server 2.0.0-beta.
|
|
3
|
+
* @qwik.dev/core/server 2.0.0-beta.9-dev+6b582c7
|
|
4
4
|
* Copyright QwikDev. All Rights Reserved.
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
6
|
* found in the LICENSE file at https://github.com/QwikDev/qwik/blob/main/LICENSE
|
|
@@ -81,15 +81,15 @@ var mapApp_findIndx = (array, key, start) => {
|
|
|
81
81
|
}
|
|
82
82
|
return bottom << 1 ^ -1;
|
|
83
83
|
};
|
|
84
|
-
var mapArray_set = (array, key, value, start) => {
|
|
84
|
+
var mapArray_set = (array, key, value, start, allowNullValue = false) => {
|
|
85
85
|
const indx = mapApp_findIndx(array, key, start);
|
|
86
86
|
if (indx >= 0) {
|
|
87
|
-
if (value == null) {
|
|
87
|
+
if (value == null && !allowNullValue) {
|
|
88
88
|
array.splice(indx, 2);
|
|
89
89
|
} else {
|
|
90
90
|
array[indx + 1] = value;
|
|
91
91
|
}
|
|
92
|
-
} else if (value != null) {
|
|
92
|
+
} else if (value != null || allowNullValue) {
|
|
93
93
|
array.splice(indx ^ -1, 0, key, value);
|
|
94
94
|
}
|
|
95
95
|
};
|
|
@@ -291,6 +291,7 @@ var ELEMENT_KEY = "q:key";
|
|
|
291
291
|
var ELEMENT_PROPS = "q:props";
|
|
292
292
|
var ELEMENT_SEQ = "q:seq";
|
|
293
293
|
var ELEMENT_SEQ_IDX = "q:seqIdx";
|
|
294
|
+
var ELEMENT_BACKPATCH_DATA = "qwik/backpatch";
|
|
294
295
|
var NON_SERIALIZABLE_MARKER_PREFIX = ":";
|
|
295
296
|
var USE_ON_LOCAL = NON_SERIALIZABLE_MARKER_PREFIX + "on";
|
|
296
297
|
var USE_ON_LOCAL_SEQ_IDX = NON_SERIALIZABLE_MARKER_PREFIX + "onIdx";
|
|
@@ -1090,13 +1091,6 @@ function createPlatform(opts, resolvedManifest) {
|
|
|
1090
1091
|
console.error("server can not rerender");
|
|
1091
1092
|
return Promise.resolve();
|
|
1092
1093
|
},
|
|
1093
|
-
nextTick: (fn) => {
|
|
1094
|
-
return new Promise((resolve) => {
|
|
1095
|
-
setTimeout(() => {
|
|
1096
|
-
resolve(fn());
|
|
1097
|
-
});
|
|
1098
|
-
});
|
|
1099
|
-
},
|
|
1100
1094
|
chunkForSymbol(symbolName, _chunk, parent) {
|
|
1101
1095
|
return mapperFn(symbolName, mapper, parent);
|
|
1102
1096
|
}
|
|
@@ -1141,7 +1135,7 @@ function getBuildBase(opts) {
|
|
|
1141
1135
|
return `${import.meta.env.BASE_URL || "/"}build/`;
|
|
1142
1136
|
}
|
|
1143
1137
|
var versions = {
|
|
1144
|
-
qwik: "2.0.0-beta.
|
|
1138
|
+
qwik: "2.0.0-beta.9-dev+6b582c7",
|
|
1145
1139
|
qwikDom: "2.1.19"
|
|
1146
1140
|
};
|
|
1147
1141
|
|
|
@@ -1157,8 +1151,43 @@ import {
|
|
|
1157
1151
|
import { isDev as isDev5 } from "@qwik.dev/core/build";
|
|
1158
1152
|
|
|
1159
1153
|
// packages/qwik/src/server/scripts.ts
|
|
1160
|
-
var QWIK_LOADER_DEFAULT_MINIFIED = 'const t=document,e=window,n=new Set,o=new Set([t]);let r;const s=(t,e)=>Array.from(t.querySelectorAll(e)),
|
|
1161
|
-
var QWIK_LOADER_DEFAULT_DEBUG = 'const doc = document;\nconst win = window;\nconst events = /* @__PURE__ */ new Set();\nconst roots = /* @__PURE__ */ new Set([doc]);\nlet hasInitialized;\nconst nativeQuerySelectorAll = (root, selector) => Array.from(root.querySelectorAll(selector));\nconst querySelectorAll = (query) => {\n const elements = [];\n roots.forEach((root) => elements.push(...nativeQuerySelectorAll(root, query)));\n return elements;\n};\nconst findShadowRoots = (fragment) => {\n processEventOrNode(fragment);\n nativeQuerySelectorAll(fragment, "[q\\\\:shadowroot]").forEach((parent) => {\n const shadowRoot = parent.shadowRoot;\n shadowRoot && findShadowRoots(shadowRoot);\n });\n};\nconst isPromise = (promise) => promise && typeof promise.then === "function";\
|
|
1154
|
+
var QWIK_LOADER_DEFAULT_MINIFIED = 'const t=document,e=window,n=new Set,o=new Set([t]);let r;const s=(t,e)=>Array.from(t.querySelectorAll(e)),a=t=>{const e=[];return o.forEach(n=>e.push(...s(n,t))),e},i=t=>{m(t),s(t,"[q\\\\:shadowroot]").forEach(t=>{const e=t.shadowRoot;e&&i(e)})},c=t=>t&&"function"==typeof t.then,l=(t,e,n=e.type)=>{a("[on"+t+"\\\\:"+n+"]").forEach(o=>{u(o,t,e,n)})},f=e=>{if(void 0===e._qwikjson_){let n=(e===t.documentElement?t.body:e).lastElementChild;for(;n;){if("SCRIPT"===n.tagName&&"qwik/json"===n.getAttribute("type")){e._qwikjson_=JSON.parse(n.textContent.replace(/\\\\x3C(\\/?script)/gi,"<$1"));break}n=n.previousElementSibling}}},p=(t,e)=>new CustomEvent(t,{detail:e}),u=async(e,n,o,r=o.type)=>{const s="on"+n+":"+r;e.hasAttribute("preventdefault:"+r)&&o.preventDefault(),e.hasAttribute("stoppropagation:"+r)&&o.stopPropagation();const a=e._qc_,i=a&&a.li.filter(t=>t[0]===s);if(i&&i.length>0){for(const t of i){const n=t[1].getFn([e,o],()=>e.isConnected)(o,e),r=o.cancelBubble;c(n)&&await n,r&&o.stopPropagation()}return}const l=e.getAttribute(s),p=e.qDispatchEvent;if(p)return p(o,n);if(l){const n=e.closest("[q\\\\:container]:not([q\\\\:container=html]):not([q\\\\:container=text])"),r=n.getAttribute("q:base"),s=n.getAttribute("q:version")||"unknown",a=n.getAttribute("q:manifest-hash")||"dev",i=new URL(r,t.baseURI);for(const p of l.split("\\n")){const l=new URL(p,i),u=l.href,q=l.hash.replace(/^#?([^?[|]*).*$/,"$1")||"default",h=performance.now();let _,d,y;const m=p.startsWith("#"),w={qBase:r,qManifest:a,qVersion:s,href:u,symbol:q,element:e,reqTime:h};if(m){const e=n.getAttribute("q:instance");_=(t["qFuncs_"+e]||[])[Number.parseInt(q)],_||(d="sync",y=Error("sym:"+q))}else{b("qsymbol",w);const t=l.href.split("#")[0];try{const e=import(t);f(n),_=(await e)[q],_||(d="no-symbol",y=Error(`${q} not in ${t}`))}catch(t){d||(d="async"),y=t}}if(!_){b("qerror",{importError:d,error:y,...w}),console.error(y);break}const g=t.__q_context__;if(e.isConnected)try{t.__q_context__=[e,o,l];const n=_(o,e);c(n)&&await n}catch(t){b("qerror",{error:t,...w})}finally{t.__q_context__=g}}}},b=(e,n)=>{t.dispatchEvent(p(e,n))},q=t=>t.replace(/([A-Z])/g,t=>"-"+t.toLowerCase()),h=async t=>{let e=q(t.type),n=t.target;for(l("-document",t,e);n&&n.getAttribute;){const o=u(n,"",t,e);let r=t.cancelBubble;c(o)&&await o,r||(r=r||t.cancelBubble||n.hasAttribute("stoppropagation:"+t.type)),n=t.bubbles&&!0!==r?n.parentElement:null}},_=t=>{l("-window",t,q(t.type))},d=()=>{var s;const c=t.readyState;if(!r&&("interactive"==c||"complete"==c)&&(o.forEach(i),r=1,b("qinit"),(null!=(s=e.requestIdleCallback)?s:e.setTimeout).bind(e)(()=>b("qidle")),n.has("qvisible"))){const t=a("[on\\\\:qvisible]"),e=new IntersectionObserver(t=>{for(const n of t)n.isIntersecting&&(e.unobserve(n.target),u(n.target,"",p("qvisible",n)))});t.forEach(t=>e.observe(t))}},y=(t,e,n,o=!1)=>{t.addEventListener(e,n,{capture:o,passive:!1})},m=(...t)=>{for(const r of t)"string"==typeof r?n.has(r)||(o.forEach(t=>y(t,r,h,!0)),y(e,r,_,!0),n.add(r)):o.has(r)||(n.forEach(t=>y(r,t,h,!0)),o.add(r))};if(!("__q_context__"in t)){t.__q_context__=0;const r=e.qwikevents;r&&(Array.isArray(r)?m(...r):m("click","input")),e.qwikevents={events:n,roots:o,push:m},y(t,"readystatechange",d),d()}';
|
|
1155
|
+
var QWIK_LOADER_DEFAULT_DEBUG = 'const doc = document;\nconst win = window;\nconst events = /* @__PURE__ */ new Set();\nconst roots = /* @__PURE__ */ new Set([doc]);\nlet hasInitialized;\nconst nativeQuerySelectorAll = (root, selector) => Array.from(root.querySelectorAll(selector));\nconst querySelectorAll = (query) => {\n const elements = [];\n roots.forEach((root) => elements.push(...nativeQuerySelectorAll(root, query)));\n return elements;\n};\nconst findShadowRoots = (fragment) => {\n processEventOrNode(fragment);\n nativeQuerySelectorAll(fragment, "[q\\\\:shadowroot]").forEach((parent) => {\n const shadowRoot = parent.shadowRoot;\n shadowRoot && findShadowRoots(shadowRoot);\n });\n};\nconst isPromise = (promise) => promise && typeof promise.then === "function";\nconst broadcast = (infix, ev, type = ev.type) => {\n querySelectorAll("[on" + infix + "\\\\:" + type + "]").forEach((el) => {\n dispatch(el, infix, ev, type);\n });\n};\nconst resolveContainer = (containerEl) => {\n if (containerEl._qwikjson_ === void 0) {\n const parentJSON = containerEl === doc.documentElement ? doc.body : containerEl;\n let script = parentJSON.lastElementChild;\n while (script) {\n if (script.tagName === "SCRIPT" && script.getAttribute("type") === "qwik/json") {\n containerEl._qwikjson_ = JSON.parse(\n script.textContent.replace(/\\\\x3C(\\/?script)/gi, "<$1")\n );\n break;\n }\n script = script.previousElementSibling;\n }\n }\n};\nconst createEvent = (eventName, detail) => new CustomEvent(eventName, {\n detail\n});\nconst dispatch = async (element, scope, ev, eventName = ev.type) => {\n const attrName = "on" + scope + ":" + eventName;\n if (element.hasAttribute("preventdefault:" + eventName)) {\n ev.preventDefault();\n }\n if (element.hasAttribute("stoppropagation:" + eventName)) {\n ev.stopPropagation();\n }\n const ctx = element._qc_;\n const relevantListeners = ctx && ctx.li.filter((li) => li[0] === attrName);\n if (relevantListeners && relevantListeners.length > 0) {\n for (const listener of relevantListeners) {\n const results = listener[1].getFn([element, ev], () => element.isConnected)(ev, element);\n const cancelBubble = ev.cancelBubble;\n if (isPromise(results)) {\n await results;\n }\n if (cancelBubble) {\n ev.stopPropagation();\n }\n }\n return;\n }\n const attrValue = element.getAttribute(attrName);\n const qDispatchEvent = element.qDispatchEvent;\n if (qDispatchEvent) {\n return qDispatchEvent(ev, scope);\n }\n if (attrValue) {\n const container = element.closest(\n "[q\\\\:container]:not([q\\\\:container=html]):not([q\\\\:container=text])"\n );\n const qBase = container.getAttribute("q:base");\n const qVersion = container.getAttribute("q:version") || "unknown";\n const qManifest = container.getAttribute("q:manifest-hash") || "dev";\n const base = new URL(qBase, doc.baseURI);\n for (const qrl of attrValue.split("\\n")) {\n const url = new URL(qrl, base);\n const href = url.href;\n const symbol = url.hash.replace(/^#?([^?[|]*).*$/, "$1") || "default";\n const reqTime = performance.now();\n let handler;\n let importError;\n let error;\n const isSync = qrl.startsWith("#");\n const eventData = {\n qBase,\n qManifest,\n qVersion,\n href,\n symbol,\n element,\n reqTime\n };\n if (isSync) {\n const hash = container.getAttribute("q:instance");\n handler = (doc["qFuncs_" + hash] || [])[Number.parseInt(symbol)];\n if (!handler) {\n importError = "sync";\n error = new Error("sym:" + symbol);\n }\n } else {\n emitEvent("qsymbol", eventData);\n const uri = url.href.split("#")[0];\n try {\n const module = import(\n uri\n );\n resolveContainer(container);\n handler = (await module)[symbol];\n if (!handler) {\n importError = "no-symbol";\n error = new Error(`${symbol} not in ${uri}`);\n }\n } catch (err) {\n importError || (importError = "async");\n error = err;\n }\n }\n if (!handler) {\n emitEvent("qerror", {\n importError,\n error,\n ...eventData\n });\n console.error(error);\n break;\n }\n const previousCtx = doc.__q_context__;\n if (element.isConnected) {\n try {\n doc.__q_context__ = [element, ev, url];\n const results = handler(ev, element);\n if (isPromise(results)) {\n await results;\n }\n } catch (error2) {\n emitEvent("qerror", { error: error2, ...eventData });\n } finally {\n doc.__q_context__ = previousCtx;\n }\n }\n }\n }\n};\nconst emitEvent = (eventName, detail) => {\n doc.dispatchEvent(createEvent(eventName, detail));\n};\nconst camelToKebab = (str) => str.replace(/([A-Z])/g, (a) => "-" + a.toLowerCase());\nconst processDocumentEvent = async (ev) => {\n let type = camelToKebab(ev.type);\n let element = ev.target;\n broadcast("-document", ev, type);\n while (element && element.getAttribute) {\n const results = dispatch(element, "", ev, type);\n let cancelBubble = ev.cancelBubble;\n if (isPromise(results)) {\n await results;\n }\n cancelBubble || (cancelBubble = cancelBubble || ev.cancelBubble || element.hasAttribute("stoppropagation:" + ev.type));\n element = ev.bubbles && cancelBubble !== true ? element.parentElement : null;\n }\n};\nconst processWindowEvent = (ev) => {\n broadcast("-window", ev, camelToKebab(ev.type));\n};\nconst processReadyStateChange = () => {\n var _a;\n const readyState = doc.readyState;\n if (!hasInitialized && (readyState == "interactive" || readyState == "complete")) {\n roots.forEach(findShadowRoots);\n hasInitialized = 1;\n emitEvent("qinit");\n const riC = (_a = win.requestIdleCallback) != null ? _a : win.setTimeout;\n riC.bind(win)(() => emitEvent("qidle"));\n if (events.has("qvisible")) {\n const results = querySelectorAll("[on\\\\:qvisible]");\n const observer = new IntersectionObserver((entries) => {\n for (const entry of entries) {\n if (entry.isIntersecting) {\n observer.unobserve(entry.target);\n dispatch(entry.target, "", createEvent("qvisible", entry));\n }\n }\n });\n results.forEach((el) => observer.observe(el));\n }\n }\n};\nconst addEventListener = (el, eventName, handler, capture = false) => {\n el.addEventListener(eventName, handler, { capture, passive: false });\n};\nconst processEventOrNode = (...eventNames) => {\n for (const eventNameOrNode of eventNames) {\n if (typeof eventNameOrNode === "string") {\n if (!events.has(eventNameOrNode)) {\n roots.forEach(\n (root) => addEventListener(root, eventNameOrNode, processDocumentEvent, true)\n );\n addEventListener(win, eventNameOrNode, processWindowEvent, true);\n events.add(eventNameOrNode);\n }\n } else {\n if (!roots.has(eventNameOrNode)) {\n events.forEach(\n (eventName) => addEventListener(eventNameOrNode, eventName, processDocumentEvent, true)\n );\n roots.add(eventNameOrNode);\n }\n }\n }\n};\nif (!("__q_context__" in doc)) {\n doc.__q_context__ = 0;\n const qwikevents = win.qwikevents;\n if (qwikevents) {\n if (Array.isArray(qwikevents)) {\n processEventOrNode(...qwikevents);\n } else {\n processEventOrNode("click", "input");\n }\n }\n win.qwikevents = {\n events,\n roots,\n push: processEventOrNode\n };\n addEventListener(doc, "readystatechange", processReadyStateChange);\n processReadyStateChange();\n}';
|
|
1156
|
+
var QWIK_BACKPATCH_EXECUTOR_MINIFIED = `const t='script[type="qwik/backpatch"]',e=document.currentScript;if(e){const o=e.closest("[q\\\\:container]:not([q\\\\:container=html]):not([q\\\\:container=text])");if(o){const e=o.querySelector(t);if(e){const t=JSON.parse(e.textContent||"[]"),n=document.createTreeWalker(o,NodeFilter.SHOW_ELEMENT);let r=n.currentNode,c=0;for(let e=0;e<t.length;e+=3){const o=t[e],i=t[e+1];let l=t[e+2];for(;c<o;)r=n.nextNode(),c++;const s=r;null==l||!1===l?s.removeAttribute(i):("boolean"==typeof l&&(l=""),s.setAttribute(i,l))}}}}`;
|
|
1157
|
+
var QWIK_BACKPATCH_EXECUTOR_DEBUG = `const BACKPATCH_DATA_SELECTOR = 'script[type="qwik/backpatch"]';
|
|
1158
|
+
const executorScript = document.currentScript;
|
|
1159
|
+
if (executorScript) {
|
|
1160
|
+
const container = executorScript.closest(
|
|
1161
|
+
"[q\\\\:container]:not([q\\\\:container=html]):not([q\\\\:container=text])"
|
|
1162
|
+
);
|
|
1163
|
+
if (container) {
|
|
1164
|
+
const script = container.querySelector(BACKPATCH_DATA_SELECTOR);
|
|
1165
|
+
if (script) {
|
|
1166
|
+
const data = JSON.parse(script.textContent || "[]");
|
|
1167
|
+
const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT);
|
|
1168
|
+
let currentNode = walker.currentNode;
|
|
1169
|
+
let currentNodeIdx = 0;
|
|
1170
|
+
for (let i = 0; i < data.length; i += 3) {
|
|
1171
|
+
const elementIdx = data[i];
|
|
1172
|
+
const attrName = data[i + 1];
|
|
1173
|
+
let value = data[i + 2];
|
|
1174
|
+
while (currentNodeIdx < elementIdx) {
|
|
1175
|
+
currentNode = walker.nextNode();
|
|
1176
|
+
currentNodeIdx++;
|
|
1177
|
+
}
|
|
1178
|
+
const element = currentNode;
|
|
1179
|
+
if (value == null || value === false) {
|
|
1180
|
+
element.removeAttribute(attrName);
|
|
1181
|
+
} else {
|
|
1182
|
+
if (typeof value === "boolean") {
|
|
1183
|
+
value = "";
|
|
1184
|
+
}
|
|
1185
|
+
element.setAttribute(attrName, value);
|
|
1186
|
+
}
|
|
1187
|
+
}
|
|
1188
|
+
}
|
|
1189
|
+
}
|
|
1190
|
+
}`;
|
|
1162
1191
|
function getQwikLoaderScript(opts = {}) {
|
|
1163
1192
|
return opts.debug ? QWIK_LOADER_DEFAULT_DEBUG : QWIK_LOADER_DEFAULT_MINIFIED;
|
|
1164
1193
|
}
|
|
@@ -1167,6 +1196,9 @@ var QWIK_PREFETCH_DEBUG = globalThis.QWIK_PREFETCH_DEBUG;
|
|
|
1167
1196
|
function getQwikPrefetchWorkerScript(opts = {}) {
|
|
1168
1197
|
return opts.debug ? QWIK_PREFETCH_DEBUG : QWIK_PREFETCH_MINIFIED;
|
|
1169
1198
|
}
|
|
1199
|
+
function getQwikBackpatchExecutorScript(opts = {}) {
|
|
1200
|
+
return opts.debug ? QWIK_BACKPATCH_EXECUTOR_DEBUG : QWIK_BACKPATCH_EXECUTOR_MINIFIED;
|
|
1201
|
+
}
|
|
1170
1202
|
|
|
1171
1203
|
// packages/qwik/src/server/ssr-node.ts
|
|
1172
1204
|
import {
|
|
@@ -1176,10 +1208,12 @@ import {
|
|
|
1176
1208
|
} from "@qwik.dev/core";
|
|
1177
1209
|
import { isDev as isDev4 } from "@qwik.dev/core/build";
|
|
1178
1210
|
var SsrNode = class {
|
|
1179
|
-
constructor(
|
|
1211
|
+
constructor(parentComponent, id, attributesIndex, cleanupQueue, vnodeData, currentFile) {
|
|
1212
|
+
this.parentComponent = parentComponent;
|
|
1180
1213
|
this.attributesIndex = attributesIndex;
|
|
1181
1214
|
this.cleanupQueue = cleanupQueue;
|
|
1182
1215
|
this.vnodeData = vnodeData;
|
|
1216
|
+
this.currentFile = currentFile;
|
|
1183
1217
|
__publicField(this, "__brand__", "SsrNode");
|
|
1184
1218
|
/**
|
|
1185
1219
|
* ID which the deserialize will use to retrieve the node.
|
|
@@ -1187,15 +1221,15 @@ var SsrNode = class {
|
|
|
1187
1221
|
* @param id - Unique id for the node.
|
|
1188
1222
|
*/
|
|
1189
1223
|
__publicField(this, "id");
|
|
1190
|
-
__publicField(this, "
|
|
1224
|
+
__publicField(this, "flags");
|
|
1191
1225
|
__publicField(this, "children", null);
|
|
1192
1226
|
__publicField(this, "attrs");
|
|
1193
1227
|
/** Local props which don't serialize; */
|
|
1194
1228
|
__publicField(this, "localProps", null);
|
|
1195
|
-
this.parentSsrNode = parentSsrNode;
|
|
1196
|
-
this.parentSsrNode?.addChild(this);
|
|
1197
1229
|
this.id = id;
|
|
1230
|
+
this.flags = 1 /* Updatable */;
|
|
1198
1231
|
this.attrs = this.attributesIndex >= 0 ? this.vnodeData[this.attributesIndex] : _EMPTY_ARRAY;
|
|
1232
|
+
this.parentComponent?.addChild(this);
|
|
1199
1233
|
if (isDev4 && id.indexOf("undefined") != -1) {
|
|
1200
1234
|
throw new Error(`Invalid SSR node id: ${id}`);
|
|
1201
1235
|
}
|
|
@@ -1249,18 +1283,30 @@ var SsrNode = class {
|
|
|
1249
1283
|
}
|
|
1250
1284
|
this.children.push(child);
|
|
1251
1285
|
}
|
|
1286
|
+
setTreeNonUpdatable() {
|
|
1287
|
+
this.flags &= ~1 /* Updatable */;
|
|
1288
|
+
if (this.children) {
|
|
1289
|
+
for (const child of this.children) {
|
|
1290
|
+
child.setTreeNonUpdatable();
|
|
1291
|
+
}
|
|
1292
|
+
}
|
|
1293
|
+
}
|
|
1252
1294
|
toString() {
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1295
|
+
if (isDev4) {
|
|
1296
|
+
let stringifiedAttrs = "";
|
|
1297
|
+
for (let i = 0; i < this.attrs.length; i += 2) {
|
|
1298
|
+
const key = this.attrs[i];
|
|
1299
|
+
const value = this.attrs[i + 1];
|
|
1300
|
+
stringifiedAttrs += `${key}=`;
|
|
1301
|
+
stringifiedAttrs += `${typeof value === "string" || typeof value === "number" ? JSON.stringify(value) : "*"}`;
|
|
1302
|
+
if (i < this.attrs.length - 2) {
|
|
1303
|
+
stringifiedAttrs += ", ";
|
|
1304
|
+
}
|
|
1261
1305
|
}
|
|
1306
|
+
return `<SSRNode id="${this.id}" ${stringifiedAttrs} />`;
|
|
1307
|
+
} else {
|
|
1308
|
+
return `<SSRNode id="${this.id}" />`;
|
|
1262
1309
|
}
|
|
1263
|
-
return `SSRNode [<${this.id}> ${stringifiedAttrs}]`;
|
|
1264
1310
|
}
|
|
1265
1311
|
};
|
|
1266
1312
|
var DomRef = class {
|
|
@@ -1371,6 +1417,10 @@ var allowedContent = (state) => {
|
|
|
1371
1417
|
case 514 /* PHRASING_INSIDE_INPUT */:
|
|
1372
1418
|
case 1026 /* PHRASING_CONTAINER */:
|
|
1373
1419
|
return ["phrasing content", "<a>, <b>, <img>, <input> ... (no <div>, <p> ...)"];
|
|
1420
|
+
case 2050 /* PICTURE */:
|
|
1421
|
+
return ["picture content", "<source>, <img>"];
|
|
1422
|
+
case 4098 /* BUTTON */:
|
|
1423
|
+
return ["button content", "phrasing content except interactive elements"];
|
|
1374
1424
|
case 1 /* DOCUMENT */:
|
|
1375
1425
|
return ["document", "<html>"];
|
|
1376
1426
|
}
|
|
@@ -1412,6 +1462,10 @@ function isTagAllowed(state, tag) {
|
|
|
1412
1462
|
return isInPhrasing(tag, true);
|
|
1413
1463
|
case 514 /* PHRASING_INSIDE_INPUT */:
|
|
1414
1464
|
return isInPhrasing(tag, false);
|
|
1465
|
+
case 2050 /* PICTURE */:
|
|
1466
|
+
return isInPicture(tag);
|
|
1467
|
+
case 4098 /* BUTTON */:
|
|
1468
|
+
return isInButton(tag);
|
|
1415
1469
|
case 1 /* DOCUMENT */:
|
|
1416
1470
|
if (tag === "html") {
|
|
1417
1471
|
return 32 /* HTML */;
|
|
@@ -1491,9 +1545,12 @@ function isInAnything(text) {
|
|
|
1491
1545
|
case "body":
|
|
1492
1546
|
return 0 /* NOT_ALLOWED */;
|
|
1493
1547
|
case "button":
|
|
1548
|
+
return 4098 /* BUTTON */;
|
|
1494
1549
|
case "input":
|
|
1495
1550
|
case "textarea":
|
|
1496
1551
|
return 514 /* PHRASING_INSIDE_INPUT */;
|
|
1552
|
+
case "picture":
|
|
1553
|
+
return 2050 /* PICTURE */;
|
|
1497
1554
|
default:
|
|
1498
1555
|
return 10 /* ANYTHING */;
|
|
1499
1556
|
}
|
|
@@ -1537,12 +1594,35 @@ function isInTableColGroup(text) {
|
|
|
1537
1594
|
return 0 /* NOT_ALLOWED */;
|
|
1538
1595
|
}
|
|
1539
1596
|
}
|
|
1597
|
+
function isInPicture(text) {
|
|
1598
|
+
switch (text) {
|
|
1599
|
+
case "source":
|
|
1600
|
+
return 4 /* EMPTY */;
|
|
1601
|
+
case "img":
|
|
1602
|
+
return 4 /* EMPTY */;
|
|
1603
|
+
default:
|
|
1604
|
+
return 0 /* NOT_ALLOWED */;
|
|
1605
|
+
}
|
|
1606
|
+
}
|
|
1607
|
+
function isInButton(text) {
|
|
1608
|
+
switch (text) {
|
|
1609
|
+
case "button":
|
|
1610
|
+
case "input":
|
|
1611
|
+
case "textarea":
|
|
1612
|
+
case "select":
|
|
1613
|
+
case "a":
|
|
1614
|
+
return 0 /* NOT_ALLOWED */;
|
|
1615
|
+
case "picture":
|
|
1616
|
+
return 2050 /* PICTURE */;
|
|
1617
|
+
default:
|
|
1618
|
+
return isInPhrasing(text, false);
|
|
1619
|
+
}
|
|
1620
|
+
}
|
|
1540
1621
|
function isInPhrasing(text, allowInput) {
|
|
1541
1622
|
switch (text) {
|
|
1542
1623
|
case "svg":
|
|
1543
1624
|
case "math":
|
|
1544
1625
|
return 1026 /* PHRASING_CONTAINER */;
|
|
1545
|
-
case "button":
|
|
1546
1626
|
case "input":
|
|
1547
1627
|
case "textarea":
|
|
1548
1628
|
return allowInput ? 514 /* PHRASING_INSIDE_INPUT */ : 0 /* NOT_ALLOWED */;
|
|
@@ -1554,6 +1634,7 @@ function isInPhrasing(text, allowInput) {
|
|
|
1554
1634
|
case "bdi":
|
|
1555
1635
|
case "bdo":
|
|
1556
1636
|
case "br":
|
|
1637
|
+
case "button":
|
|
1557
1638
|
case "canvas":
|
|
1558
1639
|
case "cite":
|
|
1559
1640
|
case "code":
|
|
@@ -1581,7 +1662,6 @@ function isInPhrasing(text, allowInput) {
|
|
|
1581
1662
|
case "object":
|
|
1582
1663
|
case "option":
|
|
1583
1664
|
case "output":
|
|
1584
|
-
case "picture":
|
|
1585
1665
|
case "progress":
|
|
1586
1666
|
case "q":
|
|
1587
1667
|
case "ruby":
|
|
@@ -1604,6 +1684,8 @@ function isInPhrasing(text, allowInput) {
|
|
|
1604
1684
|
return allowInput ? 258 /* PHRASING_ANY */ : 514 /* PHRASING_INSIDE_INPUT */;
|
|
1605
1685
|
case "style":
|
|
1606
1686
|
return 2 /* TEXT */;
|
|
1687
|
+
case "picture":
|
|
1688
|
+
return 2050 /* PICTURE */;
|
|
1607
1689
|
default:
|
|
1608
1690
|
return 0 /* NOT_ALLOWED */;
|
|
1609
1691
|
}
|
|
@@ -1644,7 +1726,7 @@ function vNodeData_openElement(vNodeData) {
|
|
|
1644
1726
|
vNodeData.push([], WRITE_ELEMENT_ATTRS);
|
|
1645
1727
|
vNodeData[0] |= 4 /* ELEMENT_NODE */;
|
|
1646
1728
|
}
|
|
1647
|
-
function vNodeData_createSsrNodeReference(currentComponentNode, vNodeData, depthFirstElementIdx, cleanupQueue) {
|
|
1729
|
+
function vNodeData_createSsrNodeReference(currentComponentNode, vNodeData, depthFirstElementIdx, cleanupQueue, currentFile) {
|
|
1648
1730
|
vNodeData[0] |= 8 /* REFERENCE */;
|
|
1649
1731
|
const stack = [-1];
|
|
1650
1732
|
let attributesIndex = -1;
|
|
@@ -1675,7 +1757,14 @@ function vNodeData_createSsrNodeReference(currentComponentNode, vNodeData, depth
|
|
|
1675
1757
|
}
|
|
1676
1758
|
}
|
|
1677
1759
|
}
|
|
1678
|
-
return new SsrNode(
|
|
1760
|
+
return new SsrNode(
|
|
1761
|
+
currentComponentNode,
|
|
1762
|
+
refId,
|
|
1763
|
+
attributesIndex,
|
|
1764
|
+
cleanupQueue,
|
|
1765
|
+
vNodeData,
|
|
1766
|
+
currentFile
|
|
1767
|
+
);
|
|
1679
1768
|
}
|
|
1680
1769
|
var ALPHANUMERIC = [];
|
|
1681
1770
|
function encodeAsAlphanumeric(value) {
|
|
@@ -1823,7 +1912,11 @@ var preloaderPre = (container, options, nonce) => {
|
|
|
1823
1912
|
}
|
|
1824
1913
|
}
|
|
1825
1914
|
const optsStr = opts.length ? `,{${opts.join(",")}}` : "";
|
|
1826
|
-
|
|
1915
|
+
const preloaderLinkAttrs = ["rel", "modulepreload", "href", preloaderBundle];
|
|
1916
|
+
if (nonce) {
|
|
1917
|
+
preloaderLinkAttrs.push("nonce", nonce);
|
|
1918
|
+
}
|
|
1919
|
+
container.openElement("link", null, preloaderLinkAttrs);
|
|
1827
1920
|
container.closeElement();
|
|
1828
1921
|
container.openElement("link", null, [
|
|
1829
1922
|
"rel",
|
|
@@ -1847,7 +1940,11 @@ var preloaderPre = (container, options, nonce) => {
|
|
|
1847
1940
|
}
|
|
1848
1941
|
const corePath = simplifyPath(base2, resolvedManifest?.manifest.core);
|
|
1849
1942
|
if (corePath) {
|
|
1850
|
-
|
|
1943
|
+
const linkAttrs = ["rel", "modulepreload", "href", corePath];
|
|
1944
|
+
if (nonce) {
|
|
1945
|
+
linkAttrs.push("nonce", nonce);
|
|
1946
|
+
}
|
|
1947
|
+
container.openElement("link", null, linkAttrs);
|
|
1851
1948
|
container.closeElement();
|
|
1852
1949
|
}
|
|
1853
1950
|
};
|
|
@@ -1966,18 +2063,7 @@ var StringBufferWriter = class {
|
|
|
1966
2063
|
var EMPTY_OBJ = {};
|
|
1967
2064
|
var SSRContainer = class extends _SharedContainer {
|
|
1968
2065
|
constructor(opts) {
|
|
1969
|
-
super(
|
|
1970
|
-
() => {
|
|
1971
|
-
try {
|
|
1972
|
-
return this.$scheduler$(255 /* WAIT_FOR_ALL */);
|
|
1973
|
-
} catch (e) {
|
|
1974
|
-
this.handleError(e, null);
|
|
1975
|
-
}
|
|
1976
|
-
},
|
|
1977
|
-
() => null,
|
|
1978
|
-
opts.renderOptions.serverData ?? EMPTY_OBJ,
|
|
1979
|
-
opts.locale
|
|
1980
|
-
);
|
|
2066
|
+
super(() => null, opts.renderOptions.serverData ?? EMPTY_OBJ, opts.locale);
|
|
1981
2067
|
__publicField(this, "tag");
|
|
1982
2068
|
__publicField(this, "isHtml");
|
|
1983
2069
|
__publicField(this, "writer");
|
|
@@ -2002,6 +2088,8 @@ var SSRContainer = class extends _SharedContainer {
|
|
|
2002
2088
|
__publicField(this, "lastNode", null);
|
|
2003
2089
|
__publicField(this, "currentComponentNode", null);
|
|
2004
2090
|
__publicField(this, "styleIds", /* @__PURE__ */ new Set());
|
|
2091
|
+
__publicField(this, "isBackpatchExecutorEmitted", false);
|
|
2092
|
+
__publicField(this, "backpatchMap", /* @__PURE__ */ new Map());
|
|
2005
2093
|
__publicField(this, "currentElementFrame", null);
|
|
2006
2094
|
__publicField(this, "renderTimer");
|
|
2007
2095
|
/**
|
|
@@ -2045,6 +2133,16 @@ var SSRContainer = class extends _SharedContainer {
|
|
|
2045
2133
|
handleError(err, _$host$) {
|
|
2046
2134
|
throw err;
|
|
2047
2135
|
}
|
|
2136
|
+
addBackpatchEntry(ssrNodeId, attrName, serializedValue) {
|
|
2137
|
+
const elementIndex = parseInt(ssrNodeId, 10);
|
|
2138
|
+
const entry = {
|
|
2139
|
+
attrName,
|
|
2140
|
+
value: serializedValue
|
|
2141
|
+
};
|
|
2142
|
+
const entries = this.backpatchMap.get(elementIndex) || [];
|
|
2143
|
+
entries.push(entry);
|
|
2144
|
+
this.backpatchMap.set(elementIndex, entries);
|
|
2145
|
+
}
|
|
2048
2146
|
async render(jsx) {
|
|
2049
2147
|
this.openContainer();
|
|
2050
2148
|
await _walkJSX(this, jsx, {
|
|
@@ -2056,29 +2154,26 @@ var SSRContainer = class extends _SharedContainer {
|
|
|
2056
2154
|
setContext(host, context, value) {
|
|
2057
2155
|
const ssrNode = host;
|
|
2058
2156
|
let ctx = ssrNode.getProp(QCtxAttr);
|
|
2059
|
-
if (
|
|
2157
|
+
if (ctx == null) {
|
|
2060
2158
|
ssrNode.setProp(QCtxAttr, ctx = []);
|
|
2061
2159
|
}
|
|
2062
|
-
mapArray_set(ctx, context.id, value, 0);
|
|
2160
|
+
mapArray_set(ctx, context.id, value, 0, true);
|
|
2063
2161
|
this.addRoot(ssrNode);
|
|
2064
2162
|
}
|
|
2065
2163
|
resolveContext(host, contextId) {
|
|
2066
2164
|
let ssrNode = host;
|
|
2067
2165
|
while (ssrNode) {
|
|
2068
2166
|
const ctx = ssrNode.getProp(QCtxAttr);
|
|
2069
|
-
if (ctx) {
|
|
2070
|
-
|
|
2071
|
-
if (value) {
|
|
2072
|
-
return value;
|
|
2073
|
-
}
|
|
2167
|
+
if (ctx != null && mapArray_has(ctx, contextId.id, 0)) {
|
|
2168
|
+
return mapArray_get(ctx, contextId.id, 0);
|
|
2074
2169
|
}
|
|
2075
|
-
ssrNode = ssrNode.
|
|
2170
|
+
ssrNode = ssrNode.parentComponent;
|
|
2076
2171
|
}
|
|
2077
2172
|
return void 0;
|
|
2078
2173
|
}
|
|
2079
2174
|
getParentHost(host) {
|
|
2080
2175
|
const ssrNode = host;
|
|
2081
|
-
return ssrNode.
|
|
2176
|
+
return ssrNode.parentComponent;
|
|
2082
2177
|
}
|
|
2083
2178
|
setHostProp(host, name, value) {
|
|
2084
2179
|
const ssrNode = host;
|
|
@@ -2132,6 +2227,7 @@ var SSRContainer = class extends _SharedContainer {
|
|
|
2132
2227
|
vNodeData_openElement(this.currentElementFrame.vNodeData);
|
|
2133
2228
|
this.write("<");
|
|
2134
2229
|
this.write(elementName);
|
|
2230
|
+
const lastNode = this.getOrCreateLastNode();
|
|
2135
2231
|
if (varAttrs) {
|
|
2136
2232
|
innerHTML = this.writeAttrs(elementName, varAttrs, false, currentFile);
|
|
2137
2233
|
}
|
|
@@ -2141,7 +2237,9 @@ var SSRContainer = class extends _SharedContainer {
|
|
|
2141
2237
|
innerHTML = this.writeAttrs(elementName, constAttrs, true, currentFile) || innerHTML;
|
|
2142
2238
|
}
|
|
2143
2239
|
this.write(">");
|
|
2144
|
-
|
|
2240
|
+
if (lastNode) {
|
|
2241
|
+
lastNode.setTreeNonUpdatable();
|
|
2242
|
+
}
|
|
2145
2243
|
return innerHTML;
|
|
2146
2244
|
}
|
|
2147
2245
|
/** Renders closing tag for DOM element */
|
|
@@ -2204,6 +2302,9 @@ var SSRContainer = class extends _SharedContainer {
|
|
|
2204
2302
|
/** Writes closing data to vNodeData for fragment boundaries */
|
|
2205
2303
|
closeFragment() {
|
|
2206
2304
|
vNodeData_closeFragment(this.currentElementFrame.vNodeData);
|
|
2305
|
+
if (this.currentComponentNode) {
|
|
2306
|
+
this.currentComponentNode.setTreeNonUpdatable();
|
|
2307
|
+
}
|
|
2207
2308
|
this.lastNode = null;
|
|
2208
2309
|
}
|
|
2209
2310
|
openProjection(attrs) {
|
|
@@ -2248,7 +2349,7 @@ var SSRContainer = class extends _SharedContainer {
|
|
|
2248
2349
|
const componentFrame = this.componentStack.pop();
|
|
2249
2350
|
componentFrame.releaseUnclaimedProjections(this.unclaimedProjections);
|
|
2250
2351
|
this.closeFragment();
|
|
2251
|
-
this.currentComponentNode = this.currentComponentNode?.
|
|
2352
|
+
this.currentComponentNode = this.currentComponentNode?.parentComponent || null;
|
|
2252
2353
|
}
|
|
2253
2354
|
/** Write a text node with correct escaping. Save the length of the text node in the vNodeData. */
|
|
2254
2355
|
textNode(text) {
|
|
@@ -2275,7 +2376,8 @@ var SSRContainer = class extends _SharedContainer {
|
|
|
2275
2376
|
this.currentElementFrame.vNodeData,
|
|
2276
2377
|
// we start at -1, so we need to add +1
|
|
2277
2378
|
this.currentElementFrame.depthFirstElementIdx + 1,
|
|
2278
|
-
this.cleanupQueue
|
|
2379
|
+
this.cleanupQueue,
|
|
2380
|
+
this.currentElementFrame.currentFile
|
|
2279
2381
|
);
|
|
2280
2382
|
}
|
|
2281
2383
|
return this.lastNode;
|
|
@@ -2337,6 +2439,8 @@ var SSRContainer = class extends _SharedContainer {
|
|
|
2337
2439
|
this.emitVNodeData();
|
|
2338
2440
|
preloaderPost(this, this.renderOptions, this.$serverData$?.nonce);
|
|
2339
2441
|
this.emitSyncFnsData();
|
|
2442
|
+
this.emitPatchDataIfNeeded();
|
|
2443
|
+
this.emitExecutorIfNeeded();
|
|
2340
2444
|
this.emitQwikLoaderAtBottomIfNeeded();
|
|
2341
2445
|
})
|
|
2342
2446
|
);
|
|
@@ -2506,6 +2610,38 @@ var SSRContainer = class extends _SharedContainer {
|
|
|
2506
2610
|
this.closeElement();
|
|
2507
2611
|
}
|
|
2508
2612
|
}
|
|
2613
|
+
emitPatchDataIfNeeded() {
|
|
2614
|
+
const patches = [];
|
|
2615
|
+
for (const [elementIndex, backpatchEntries] of this.backpatchMap) {
|
|
2616
|
+
for (const backpatchEntry of backpatchEntries) {
|
|
2617
|
+
patches.push(elementIndex, backpatchEntry.attrName, backpatchEntry.value);
|
|
2618
|
+
}
|
|
2619
|
+
}
|
|
2620
|
+
this.backpatchMap.clear();
|
|
2621
|
+
if (patches.length > 0) {
|
|
2622
|
+
this.isBackpatchExecutorEmitted = true;
|
|
2623
|
+
const scriptAttrs = ["type", ELEMENT_BACKPATCH_DATA];
|
|
2624
|
+
if (this.renderOptions.serverData?.nonce) {
|
|
2625
|
+
scriptAttrs.push("nonce", this.renderOptions.serverData.nonce);
|
|
2626
|
+
}
|
|
2627
|
+
this.openElement("script", scriptAttrs);
|
|
2628
|
+
this.write(JSON.stringify(patches));
|
|
2629
|
+
this.closeElement();
|
|
2630
|
+
}
|
|
2631
|
+
}
|
|
2632
|
+
emitExecutorIfNeeded() {
|
|
2633
|
+
if (!this.isBackpatchExecutorEmitted) {
|
|
2634
|
+
return;
|
|
2635
|
+
}
|
|
2636
|
+
const scriptAttrs = ["type", "text/javascript"];
|
|
2637
|
+
if (this.renderOptions.serverData?.nonce) {
|
|
2638
|
+
scriptAttrs.push("nonce", this.renderOptions.serverData.nonce);
|
|
2639
|
+
}
|
|
2640
|
+
this.openElement("script", scriptAttrs);
|
|
2641
|
+
const backpatchScript = getQwikBackpatchExecutorScript({ debug: isDev5 });
|
|
2642
|
+
this.write(backpatchScript);
|
|
2643
|
+
this.closeElement();
|
|
2644
|
+
}
|
|
2509
2645
|
emitPreloaderPre() {
|
|
2510
2646
|
preloaderPre(this, this.renderOptions.preloader, this.renderOptions.serverData?.nonce);
|
|
2511
2647
|
}
|
|
@@ -2522,9 +2658,18 @@ var SSRContainer = class extends _SharedContainer {
|
|
|
2522
2658
|
let qwikLoaderBundle = this.resolvedManifest.manifest.qwikLoader;
|
|
2523
2659
|
if (qwikLoaderBundle) {
|
|
2524
2660
|
qwikLoaderBundle = this.$buildBase$ + qwikLoaderBundle;
|
|
2525
|
-
|
|
2661
|
+
const linkAttrs = ["rel", "modulepreload", "href", qwikLoaderBundle];
|
|
2662
|
+
const nonce = this.renderOptions.serverData?.nonce;
|
|
2663
|
+
if (nonce) {
|
|
2664
|
+
linkAttrs.push("nonce", nonce);
|
|
2665
|
+
}
|
|
2666
|
+
this.openElement("link", linkAttrs);
|
|
2526
2667
|
this.closeElement();
|
|
2527
|
-
|
|
2668
|
+
const scriptAttrs = ["type", "module", "async", true, "src", qwikLoaderBundle];
|
|
2669
|
+
if (nonce) {
|
|
2670
|
+
scriptAttrs.push("nonce", nonce);
|
|
2671
|
+
}
|
|
2672
|
+
this.openElement("script", scriptAttrs);
|
|
2528
2673
|
this.closeElement();
|
|
2529
2674
|
}
|
|
2530
2675
|
}
|
|
@@ -2684,7 +2829,8 @@ var SSRContainer = class extends _SharedContainer {
|
|
|
2684
2829
|
parent: this.currentElementFrame,
|
|
2685
2830
|
elementName,
|
|
2686
2831
|
depthFirstElementIdx,
|
|
2687
|
-
vNodeData: [0 /* NONE */]
|
|
2832
|
+
vNodeData: [0 /* NONE */],
|
|
2833
|
+
currentFile: isDev5 ? currentFile || null : null
|
|
2688
2834
|
};
|
|
2689
2835
|
this.currentElementFrame = frame;
|
|
2690
2836
|
this.vNodeDatas.push(frame.vNodeData);
|
|
@@ -2748,9 +2894,11 @@ var SSRContainer = class extends _SharedContainer {
|
|
|
2748
2894
|
value = this.trackSignalValue(value, lastNode, key, signalData);
|
|
2749
2895
|
}
|
|
2750
2896
|
if (key === dangerouslySetInnerHTML) {
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2897
|
+
if (value) {
|
|
2898
|
+
innerHTML = String(value);
|
|
2899
|
+
key = QContainerAttr;
|
|
2900
|
+
value = "html" /* HTML */;
|
|
2901
|
+
}
|
|
2754
2902
|
if (tag === "style") {
|
|
2755
2903
|
continue;
|
|
2756
2904
|
}
|
|
@@ -2852,6 +3000,7 @@ var renderToStream = async (jsx, opts) => {
|
|
|
2852
3000
|
});
|
|
2853
3001
|
await setServerPlatform(opts, resolvedManifest);
|
|
2854
3002
|
await ssrContainer.render(jsx);
|
|
3003
|
+
await ssrContainer.$scheduler$(255 /* WAIT_FOR_QUEUE */).$returnValue$;
|
|
2855
3004
|
flush();
|
|
2856
3005
|
const snapshotResult = getSnapshotResult(ssrContainer);
|
|
2857
3006
|
const isDynamic = snapshotResult.resources.some((r) => r._cache !== Infinity);
|
|
@@ -2998,6 +3147,7 @@ async function setServerPlatform2(manifest) {
|
|
|
2998
3147
|
setPlatform2(platform);
|
|
2999
3148
|
}
|
|
3000
3149
|
export {
|
|
3150
|
+
getQwikBackpatchExecutorScript,
|
|
3001
3151
|
getQwikLoaderScript,
|
|
3002
3152
|
getQwikPrefetchWorkerScript,
|
|
3003
3153
|
renderToStream,
|
|
@@ -22,11 +22,11 @@
|
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@angular/localize": "^
|
|
25
|
+
"@angular/localize": "^18.2.13"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@angular/compiler": "^
|
|
29
|
-
"@angular/compiler-cli": "^
|
|
28
|
+
"@angular/compiler": "^18.2.13",
|
|
29
|
+
"@angular/compiler-cli": "^18.2.13"
|
|
30
30
|
},
|
|
31
31
|
"scripts": {
|
|
32
32
|
"build.client": "vite build && npm run i18n-translate",
|