@qwik.dev/core 2.0.0-beta.26 → 2.0.0-beta.28
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.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/package.json +1 -1
- package/dist/build/package.json +1 -1
- package/dist/cli.mjs +2 -2
- package/dist/core-internal.d.ts +29 -5
- package/dist/core.min.mjs +1 -1
- package/dist/core.mjs +624 -582
- package/dist/core.mjs.map +1 -1
- package/dist/core.prod.mjs +6105 -6063
- package/dist/insights/index.qwik.mjs +80 -57
- package/dist/loader/package.json +1 -1
- package/dist/optimizer.d.ts +26 -19
- package/dist/optimizer.mjs +1278 -1234
- package/dist/server.mjs +29 -21
- package/dist/server.prod.mjs +3263 -0
- package/dist/starters/features/csr/index.html +4 -0
- package/dist/testing/index.d.ts +10 -1
- package/dist/testing/index.mjs +560 -563
- package/dist/testing/package.json +1 -1
- package/package.json +9 -5
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.28-dev+fac55b7
|
|
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
|
|
@@ -20,12 +20,13 @@ import { isDev as isDev2 } from "@qwik.dev/core/build";
|
|
|
20
20
|
import { isDev } from "@qwik.dev/core/build";
|
|
21
21
|
|
|
22
22
|
// packages/qwik/src/core/shared/utils/qdev.ts
|
|
23
|
-
var
|
|
24
|
-
var
|
|
25
|
-
var
|
|
26
|
-
var
|
|
27
|
-
var
|
|
28
|
-
var
|
|
23
|
+
var g = globalThis;
|
|
24
|
+
var qDev = g.qDev !== false;
|
|
25
|
+
var qInspector = g.qInspector === true;
|
|
26
|
+
var qSerialize = g.qSerialize !== false;
|
|
27
|
+
var qDynamicPlatform = g.qDynamicPlatform !== false;
|
|
28
|
+
var qTest = g.qTest === true;
|
|
29
|
+
var qRuntimeQrl = g.qRuntimeQrl === true;
|
|
29
30
|
|
|
30
31
|
// packages/qwik/src/core/shared/utils/log.ts
|
|
31
32
|
var STYLE = qDev ? `background: #564CE0; color: white; padding: 2px 3px; border-radius: 2px; font-size: 0.8em;` : "";
|
|
@@ -139,7 +140,7 @@ var codeToText = (code, ...parts) => {
|
|
|
139
140
|
// 4
|
|
140
141
|
"QRL is not a function",
|
|
141
142
|
// 5
|
|
142
|
-
"Dynamic import not found",
|
|
143
|
+
"Dynamic import {{0}} not found",
|
|
143
144
|
// 6
|
|
144
145
|
"Unknown type argument",
|
|
145
146
|
// 7
|
|
@@ -1218,7 +1219,7 @@ function getBuildBase(opts) {
|
|
|
1218
1219
|
return `${import.meta.env.BASE_URL || "/"}build/`;
|
|
1219
1220
|
}
|
|
1220
1221
|
var versions = {
|
|
1221
|
-
qwik: "2.0.0-beta.
|
|
1222
|
+
qwik: "2.0.0-beta.28-dev+fac55b7",
|
|
1222
1223
|
qwikDom: "2.1.19"
|
|
1223
1224
|
};
|
|
1224
1225
|
|
|
@@ -2330,7 +2331,7 @@ var SSRContainer = class extends _SharedContainer {
|
|
|
2330
2331
|
}
|
|
2331
2332
|
$noScriptHere$ = 0;
|
|
2332
2333
|
/** Renders opening tag for DOM element */
|
|
2333
|
-
openElement(elementName, key, varAttrs, constAttrs = null, styleScopedId = null, currentFile = null) {
|
|
2334
|
+
openElement(elementName, key, varAttrs, constAttrs = null, styleScopedId = null, currentFile = null, hasMovedCaptures = true) {
|
|
2334
2335
|
const isQwikStyle = isQwikStyleElement(elementName, varAttrs) || isQwikStyleElement(elementName, constAttrs);
|
|
2335
2336
|
if (
|
|
2336
2337
|
// don't append qwik loader before qwik style elements
|
|
@@ -2357,7 +2358,14 @@ var SSRContainer = class extends _SharedContainer {
|
|
|
2357
2358
|
this.write(elementName);
|
|
2358
2359
|
const lastNode = this.getOrCreateLastNode();
|
|
2359
2360
|
if (varAttrs) {
|
|
2360
|
-
innerHTML = this.writeAttrs(
|
|
2361
|
+
innerHTML = this.writeAttrs(
|
|
2362
|
+
elementName,
|
|
2363
|
+
varAttrs,
|
|
2364
|
+
false,
|
|
2365
|
+
styleScopedId,
|
|
2366
|
+
currentFile,
|
|
2367
|
+
hasMovedCaptures
|
|
2368
|
+
);
|
|
2361
2369
|
}
|
|
2362
2370
|
this.write(" " + Q_PROPS_SEPARATOR);
|
|
2363
2371
|
if (key !== null) {
|
|
@@ -2366,7 +2374,14 @@ var SSRContainer = class extends _SharedContainer {
|
|
|
2366
2374
|
this.write(EMPTY_ATTR);
|
|
2367
2375
|
}
|
|
2368
2376
|
if (constAttrs && !isObjectEmpty(constAttrs)) {
|
|
2369
|
-
innerHTML = this.writeAttrs(
|
|
2377
|
+
innerHTML = this.writeAttrs(
|
|
2378
|
+
elementName,
|
|
2379
|
+
constAttrs,
|
|
2380
|
+
true,
|
|
2381
|
+
styleScopedId,
|
|
2382
|
+
currentFile,
|
|
2383
|
+
hasMovedCaptures
|
|
2384
|
+
) || innerHTML;
|
|
2370
2385
|
}
|
|
2371
2386
|
this.write(GT);
|
|
2372
2387
|
if (lastNode) {
|
|
@@ -2978,9 +2993,8 @@ var SSRContainer = class extends _SharedContainer {
|
|
|
2978
2993
|
this.write(element);
|
|
2979
2994
|
}
|
|
2980
2995
|
}
|
|
2981
|
-
writeAttrs(tag, attrs, isConst, styleScopedId, currentFile) {
|
|
2996
|
+
writeAttrs(tag, attrs, isConst, styleScopedId, currentFile, hasMovedCaptures) {
|
|
2982
2997
|
let innerHTML = void 0;
|
|
2983
|
-
let isLoopElement = null;
|
|
2984
2998
|
for (let key in attrs) {
|
|
2985
2999
|
let value = attrs[key];
|
|
2986
3000
|
if (isSSRUnsafeAttr(key)) {
|
|
@@ -2990,10 +3004,7 @@ var SSRContainer = class extends _SharedContainer {
|
|
|
2990
3004
|
continue;
|
|
2991
3005
|
}
|
|
2992
3006
|
if (isHtmlAttributeAnEventName(key)) {
|
|
2993
|
-
|
|
2994
|
-
isLoopElement = attributesContainsIterationProp(attrs);
|
|
2995
|
-
}
|
|
2996
|
-
value = _setEvent(this.serializationCtx, key, value, isLoopElement);
|
|
3007
|
+
value = _setEvent(this.serializationCtx, key, value, hasMovedCaptures);
|
|
2997
3008
|
} else if (key === "ref") {
|
|
2998
3009
|
const lastNode = this.getOrCreateLastNode();
|
|
2999
3010
|
if (isSignal(value)) {
|
|
@@ -3082,9 +3093,6 @@ var isQwikStyleElement = (tag, attrs) => {
|
|
|
3082
3093
|
}
|
|
3083
3094
|
return false;
|
|
3084
3095
|
};
|
|
3085
|
-
var attributesContainsIterationProp = (attrs) => {
|
|
3086
|
-
return Object.prototype.hasOwnProperty.call(attrs, ITERATION_ITEM_SINGLE) || Object.prototype.hasOwnProperty.call(attrs, ITERATION_ITEM_MULTI);
|
|
3087
|
-
};
|
|
3088
3096
|
function newTagError(text) {
|
|
3089
3097
|
return qError(12 /* tagError */, [text]);
|
|
3090
3098
|
}
|