@qwik.dev/core 2.0.0-beta.34 → 2.0.0-beta.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/backpatch/package.json +1 -1
- package/dist/build/package.json +1 -1
- package/dist/cli.mjs +26 -22
- package/dist/core-internal.d.ts +67 -1
- package/dist/core.min.mjs +9 -2
- package/dist/core.mjs +578 -230
- package/dist/core.mjs.map +1 -1
- package/dist/core.prod.mjs +3054 -2906
- package/dist/loader/package.json +1 -1
- package/dist/optimizer.d.ts +2 -2
- package/dist/optimizer.mjs +2411 -1589
- package/dist/preloader.mjs +1 -268
- package/dist/server-modules.d.ts +1 -0
- package/dist/server.mjs +88 -139
- package/dist/server.prod.mjs +262 -310
- package/dist/testing/index.d.ts +1 -0
- package/dist/testing/index.mjs +427 -266
- package/dist/testing/package.json +1 -1
- package/dist/worker/index.d.mts +21 -0
- package/dist/worker/index.mjs +318 -0
- package/dist/worker/package.json +9 -0
- package/dist/worker/worker.js +13 -0
- package/dist/worker/worker.node.js +15 -0
- package/dist/worker/worker.shared.js +63 -0
- package/handlers.mjs +18 -1
- package/package.json +10 -4
- package/public.d.ts +5 -0
- package/worker.d.ts +2 -0
package/dist/testing/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* @qwik.dev/core/testing 2.0.0-beta.
|
|
3
|
+
* @qwik.dev/core/testing 2.0.0-beta.35-dev+4603135
|
|
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
|
|
@@ -21426,24 +21426,23 @@ import { _isJSXNode, _isStringifiable } from "@qwik.dev/core/internal";
|
|
|
21426
21426
|
import { expect } from "vitest";
|
|
21427
21427
|
|
|
21428
21428
|
// packages/qwik/src/core/client/vnode-utils.ts
|
|
21429
|
-
import { isDev as
|
|
21430
|
-
|
|
21431
|
-
// packages/qwik/src/core/shared/error/assert.ts
|
|
21432
|
-
import { isDev } from "@qwik.dev/core/build";
|
|
21429
|
+
import { isDev as isDev27 } from "@qwik.dev/core/build";
|
|
21433
21430
|
|
|
21434
21431
|
// packages/qwik/src/core/shared/utils/qdev.ts
|
|
21435
|
-
var
|
|
21436
|
-
var
|
|
21437
|
-
var
|
|
21438
|
-
var
|
|
21439
|
-
var
|
|
21440
|
-
var qRuntimeQrl = g.qRuntimeQrl === true;
|
|
21432
|
+
var qDev = globalThis.qDev !== false;
|
|
21433
|
+
var qInspector = globalThis.qInspector === true;
|
|
21434
|
+
var qDynamicPlatform = globalThis.qDynamicPlatform !== false;
|
|
21435
|
+
var qTest = globalThis.qTest === true;
|
|
21436
|
+
var qRuntimeQrl = globalThis.qRuntimeQrl === true;
|
|
21441
21437
|
var seal = (obj) => {
|
|
21442
21438
|
if (qDev) {
|
|
21443
21439
|
Object.seal(obj);
|
|
21444
21440
|
}
|
|
21445
21441
|
};
|
|
21446
21442
|
|
|
21443
|
+
// packages/qwik/src/core/shared/error/assert.ts
|
|
21444
|
+
import { isDev } from "@qwik.dev/core/build";
|
|
21445
|
+
|
|
21447
21446
|
// packages/qwik/src/core/shared/utils/log.ts
|
|
21448
21447
|
var STYLE = qDev ? `background: #564CE0; color: white; padding: 2px 3px; border-radius: 2px; font-size: 0.8em;` : "";
|
|
21449
21448
|
var logError = (message, ...optionalParams) => {
|
|
@@ -21529,6 +21528,9 @@ function assertNumber(value1, text, ...parts) {
|
|
|
21529
21528
|
// packages/qwik/src/core/shared/platform/platform.ts
|
|
21530
21529
|
import { isServer } from "@qwik.dev/core/build";
|
|
21531
21530
|
|
|
21531
|
+
// packages/qwik/src/core/shared/error/error.ts
|
|
21532
|
+
import { isDev as isDev2 } from "@qwik.dev/core/build";
|
|
21533
|
+
|
|
21532
21534
|
// packages/qwik/src/core/shared/utils/types.ts
|
|
21533
21535
|
var isHtmlElement = (node) => {
|
|
21534
21536
|
return node ? node.nodeType === 1 : false;
|
|
@@ -21556,7 +21558,7 @@ var isPrimitiveOrNullUndefined = (v) => {
|
|
|
21556
21558
|
// packages/qwik/src/core/shared/error/error.ts
|
|
21557
21559
|
var baseUrl = "https://qwikdev-build-v2.qwik-8nx.pages.dev/docs/errors/#q";
|
|
21558
21560
|
var codeToText = (code2, ...parts) => {
|
|
21559
|
-
if (
|
|
21561
|
+
if (isDev2) {
|
|
21560
21562
|
const MAP = [
|
|
21561
21563
|
"Error while serializing class or style attributes",
|
|
21562
21564
|
// 0
|
|
@@ -21658,7 +21660,7 @@ var qError = (code2, errorMessageArgs = []) => {
|
|
|
21658
21660
|
};
|
|
21659
21661
|
|
|
21660
21662
|
// packages/qwik/src/core/shared/qrl/qrl-utils.ts
|
|
21661
|
-
import { isDev as
|
|
21663
|
+
import { isDev as isDev3 } from "@qwik.dev/core/build";
|
|
21662
21664
|
var SYNC_QRL = "<sync>";
|
|
21663
21665
|
var isSyncQrl = (value) => {
|
|
21664
21666
|
return isQrl(value) && value.$symbol$ == SYNC_QRL;
|
|
@@ -21667,7 +21669,7 @@ var isQrl = (value) => {
|
|
|
21667
21669
|
return typeof value === "function" && typeof value.getSymbol === "function";
|
|
21668
21670
|
};
|
|
21669
21671
|
function assertQrl(qrl) {
|
|
21670
|
-
if (
|
|
21672
|
+
if (isDev3) {
|
|
21671
21673
|
if (!isQrl(qrl)) {
|
|
21672
21674
|
throw new Error("Not a QRL");
|
|
21673
21675
|
}
|
|
@@ -21765,12 +21767,15 @@ var ELEMENT_PROPS = "q:props";
|
|
|
21765
21767
|
var ELEMENT_SEQ = "q:seq";
|
|
21766
21768
|
var ELEMENT_SEQ_IDX = "q:seqIdx";
|
|
21767
21769
|
var ELEMENT_BACKPATCH_DATA = "qwik/backpatch";
|
|
21770
|
+
var Q_PREFIX = "q:";
|
|
21768
21771
|
var ITERATION_ITEM_SINGLE = "q:p";
|
|
21769
21772
|
var ITERATION_ITEM_MULTI = "q:ps";
|
|
21770
21773
|
var NON_SERIALIZABLE_MARKER_PREFIX = ":";
|
|
21771
21774
|
var USE_ON_LOCAL = NON_SERIALIZABLE_MARKER_PREFIX + "on";
|
|
21772
21775
|
var USE_ON_LOCAL_SEQ_IDX = NON_SERIALIZABLE_MARKER_PREFIX + "onIdx";
|
|
21773
21776
|
var USE_ON_LOCAL_FLAGS = NON_SERIALIZABLE_MARKER_PREFIX + "onFlags";
|
|
21777
|
+
var QCursorBoundary = Q_PREFIX + "cursorBoundary";
|
|
21778
|
+
var QNearestCursorBoundary = NON_SERIALIZABLE_MARKER_PREFIX + "nearestCursorBoundary";
|
|
21774
21779
|
var Q_PROPS_SEPARATOR = ":";
|
|
21775
21780
|
var dangerouslySetInnerHTML = "dangerouslySetInnerHTML";
|
|
21776
21781
|
var debugStyleScopeIdPrefixAttr = "__scopedStyleIdPrefix__";
|
|
@@ -21842,7 +21847,7 @@ var isText = (value) => {
|
|
|
21842
21847
|
};
|
|
21843
21848
|
|
|
21844
21849
|
// packages/qwik/src/core/shared/utils/promises.ts
|
|
21845
|
-
import { isDev as
|
|
21850
|
+
import { isDev as isDev4, isServer as isServer2 } from "@qwik.dev/core/build";
|
|
21846
21851
|
var MAX_RETRY_ON_PROMISE_COUNT = 100;
|
|
21847
21852
|
var isPromise = (value) => {
|
|
21848
21853
|
return !!value && typeof value == "object" && typeof value.then === "function";
|
|
@@ -21883,7 +21888,7 @@ function retryOnPromise(fn, onError = justThrow) {
|
|
|
21883
21888
|
if (ok) {
|
|
21884
21889
|
return result;
|
|
21885
21890
|
}
|
|
21886
|
-
|
|
21891
|
+
isDev4 && checkError(result);
|
|
21887
21892
|
return onError(result);
|
|
21888
21893
|
}
|
|
21889
21894
|
let retryCount = MAX_RETRY_ON_PROMISE_COUNT;
|
|
@@ -21906,14 +21911,14 @@ function retryOnPromise(fn, onError = justThrow) {
|
|
|
21906
21911
|
}
|
|
21907
21912
|
}
|
|
21908
21913
|
}
|
|
21909
|
-
|
|
21914
|
+
isDev4 && checkError(p);
|
|
21910
21915
|
return onError(p);
|
|
21911
21916
|
};
|
|
21912
21917
|
return ok ? result.catch(retry) : retry(result);
|
|
21913
21918
|
}
|
|
21914
21919
|
|
|
21915
21920
|
// packages/qwik/src/core/client/dom-container.ts
|
|
21916
|
-
import { isDev as
|
|
21921
|
+
import { isDev as isDev24 } from "@qwik.dev/core/build";
|
|
21917
21922
|
|
|
21918
21923
|
// packages/qwik/src/core/shared/utils/event-names.ts
|
|
21919
21924
|
var EVENT_SUFFIX = "$";
|
|
@@ -21972,9 +21977,9 @@ var getEventDataFromHtmlAttribute = (htmlKey) => {
|
|
|
21972
21977
|
};
|
|
21973
21978
|
|
|
21974
21979
|
// packages/qwik/src/core/use/use-context.ts
|
|
21975
|
-
import { isDev as
|
|
21980
|
+
import { isDev as isDev5 } from "@qwik.dev/core/build";
|
|
21976
21981
|
var createContextId = (name) => {
|
|
21977
|
-
|
|
21982
|
+
isDev5 && assertTrue(/^[\w/.-]+$/.test(name), "Context name must only contain A-Z,a-z,0-9,_,.,-", name);
|
|
21978
21983
|
return /* @__PURE__ */ Object.freeze({
|
|
21979
21984
|
id: fromCamelToKebabCase(name)
|
|
21980
21985
|
});
|
|
@@ -22019,7 +22024,7 @@ Object.freeze(EMPTY_ARRAY);
|
|
|
22019
22024
|
Object.freeze(EMPTY_OBJ);
|
|
22020
22025
|
|
|
22021
22026
|
// packages/qwik/src/core/shared/qrl/qrl-class.ts
|
|
22022
|
-
import { isBrowser as isBrowser3, isDev as
|
|
22027
|
+
import { isBrowser as isBrowser3, isDev as isDev23 } from "@qwik.dev/core/build";
|
|
22023
22028
|
|
|
22024
22029
|
// packages/qwik/src/core/shared/qrl/qrl-class-dev.ts
|
|
22025
22030
|
import { isBrowser } from "@qwik.dev/core/build";
|
|
@@ -22125,13 +22130,13 @@ import { p as preload } from "@qwik.dev/core/preloader";
|
|
|
22125
22130
|
import { isServer as isServer9 } from "@qwik.dev/core/build";
|
|
22126
22131
|
|
|
22127
22132
|
// packages/qwik/src/core/shared/serdes/qrl-to-string.ts
|
|
22128
|
-
import { isDev as
|
|
22133
|
+
import { isDev as isDev6 } from "@qwik.dev/core/build";
|
|
22129
22134
|
function qrlToString(serializationContext, qrl, raw) {
|
|
22130
22135
|
let symbol = qrl.$symbol$;
|
|
22131
22136
|
let chunk = qrl.$chunk$;
|
|
22132
22137
|
const platform = getPlatform();
|
|
22133
22138
|
if (platform) {
|
|
22134
|
-
const result =
|
|
22139
|
+
const result = isDev6 ? platform.chunkForSymbol(symbol, chunk, qrl.dev?.file) : platform.chunkForSymbol(symbol, chunk);
|
|
22135
22140
|
if (result) {
|
|
22136
22141
|
chunk = result[1];
|
|
22137
22142
|
symbol = result[0];
|
|
@@ -22142,7 +22147,7 @@ function qrlToString(serializationContext, qrl, raw) {
|
|
|
22142
22147
|
if (!chunk) {
|
|
22143
22148
|
chunk = serializationContext.$symbolToChunkResolver$(qrl.$hash$);
|
|
22144
22149
|
}
|
|
22145
|
-
if (
|
|
22150
|
+
if (isDev6) {
|
|
22146
22151
|
const backChannel = globalThis.__qrl_back_channel__ || (globalThis.__qrl_back_channel__ = /* @__PURE__ */ new Map());
|
|
22147
22152
|
const lazy = qrl.$lazy$;
|
|
22148
22153
|
backChannel.set(lazy.$symbol$, lazy.$ref$);
|
|
@@ -22177,9 +22182,9 @@ function qrlToString(serializationContext, qrl, raw) {
|
|
|
22177
22182
|
}
|
|
22178
22183
|
function createQRLWithBackChannel(chunk, symbol, captures, container) {
|
|
22179
22184
|
let qrlImporter = null;
|
|
22180
|
-
if (
|
|
22185
|
+
if (isDev6 && chunk === QRL_RUNTIME_CHUNK) {
|
|
22181
22186
|
const backChannel = globalThis.__qrl_back_channel__;
|
|
22182
|
-
|
|
22187
|
+
isDev6 && assertDefined(backChannel, "Missing QRL_RUNTIME_CHUNK");
|
|
22183
22188
|
const fn = backChannel.get(symbol);
|
|
22184
22189
|
if (fn) {
|
|
22185
22190
|
qrlImporter = () => Promise.resolve({ [symbol]: fn });
|
|
@@ -22233,9 +22238,9 @@ function runEventHandlerQRL(handler, event, element, ctx) {
|
|
|
22233
22238
|
}
|
|
22234
22239
|
|
|
22235
22240
|
// packages/qwik/src/core/client/util-mapArray.ts
|
|
22236
|
-
import { isDev as
|
|
22241
|
+
import { isDev as isDev7 } from "@qwik.dev/core/build";
|
|
22237
22242
|
var mapApp_findIndx = (array, key, start) => {
|
|
22238
|
-
|
|
22243
|
+
isDev7 && assertTrue(start % 2 === 0, "Expecting even number.");
|
|
22239
22244
|
let bottom = start >> 1;
|
|
22240
22245
|
let top = array.length - 2 >> 1;
|
|
22241
22246
|
while (bottom <= top) {
|
|
@@ -22297,7 +22302,7 @@ var BackRef = class {
|
|
|
22297
22302
|
};
|
|
22298
22303
|
|
|
22299
22304
|
// packages/qwik/src/core/reactive-primitives/impl/signal-impl.ts
|
|
22300
|
-
import { isDev as
|
|
22305
|
+
import { isDev as isDev8, isServer as isServer3 } from "@qwik.dev/core/build";
|
|
22301
22306
|
var DEBUG = false;
|
|
22302
22307
|
var log = (...args) => console.log("SIGNAL", ...args.map(qwikDebugToString));
|
|
22303
22308
|
var SignalImpl = class {
|
|
@@ -22339,7 +22344,7 @@ var SignalImpl = class {
|
|
|
22339
22344
|
if (this.$container$ === null) {
|
|
22340
22345
|
this.$container$ = ctx.$container$;
|
|
22341
22346
|
} else {
|
|
22342
|
-
|
|
22347
|
+
isDev8 && assertTrue(
|
|
22343
22348
|
!ctx.$container$ || ctx.$container$ === this.$container$,
|
|
22344
22349
|
"Do not use signals across containers"
|
|
22345
22350
|
);
|
|
@@ -22348,7 +22353,7 @@ var SignalImpl = class {
|
|
|
22348
22353
|
if (effectSubscriber) {
|
|
22349
22354
|
ensureContainsSubscription(this.$effects$ || (this.$effects$ = /* @__PURE__ */ new Set()), effectSubscriber);
|
|
22350
22355
|
ensureContainsBackRef(effectSubscriber, this);
|
|
22351
|
-
(
|
|
22356
|
+
(qTest ? !isDomContainer(this.$container$) : isServer3) && addQrlToSerializationCtx(effectSubscriber, this.$container$);
|
|
22352
22357
|
DEBUG && log("read->sub", pad("\n" + this.toString(), " "));
|
|
22353
22358
|
} else {
|
|
22354
22359
|
DEBUG && log("read no sub", pad("\n" + this.toString(), " "));
|
|
@@ -22376,7 +22381,7 @@ var SignalImpl = class {
|
|
|
22376
22381
|
}
|
|
22377
22382
|
}
|
|
22378
22383
|
toString() {
|
|
22379
|
-
if (
|
|
22384
|
+
if (isDev8) {
|
|
22380
22385
|
try {
|
|
22381
22386
|
return `[${this.constructor.name}${this.$flags$ & 1 /* INVALID */ ? " INVALID" : ""} ${this.$untrackedValue$}]` + (Array.from(this.$effects$ || []).map((e) => "\n -> " + pad(qwikDebugToString(e.consumer), " ")).join("\n") || "");
|
|
22382
22387
|
} catch (e) {
|
|
@@ -22392,7 +22397,7 @@ var SignalImpl = class {
|
|
|
22392
22397
|
};
|
|
22393
22398
|
|
|
22394
22399
|
// packages/qwik/src/core/shared/jsx/props-proxy.ts
|
|
22395
|
-
import { isDev as
|
|
22400
|
+
import { isDev as isDev9 } from "@qwik.dev/core/build";
|
|
22396
22401
|
function createPropsProxy(owner) {
|
|
22397
22402
|
return new Proxy({}, new PropsProxyHandler(owner));
|
|
22398
22403
|
}
|
|
@@ -22525,7 +22530,7 @@ var addPropsProxyEffect = (propsProxy, prop) => {
|
|
|
22525
22530
|
propsProxy.$container$ = ctx.$container$;
|
|
22526
22531
|
}
|
|
22527
22532
|
} else {
|
|
22528
|
-
|
|
22533
|
+
isDev9 && assertTrue(
|
|
22529
22534
|
!ctx.$container$ || ctx.$container$ === propsProxy.$container$,
|
|
22530
22535
|
"Do not use props across containers"
|
|
22531
22536
|
);
|
|
@@ -22569,7 +22574,7 @@ var isPropsProxy = (obj) => {
|
|
|
22569
22574
|
};
|
|
22570
22575
|
|
|
22571
22576
|
// packages/qwik/src/core/reactive-primitives/impl/async-signal-impl.ts
|
|
22572
|
-
import { isBrowser as isBrowser2, isDev as
|
|
22577
|
+
import { isBrowser as isBrowser2, isDev as isDev11, isServer as isServer5 } from "@qwik.dev/core/build";
|
|
22573
22578
|
|
|
22574
22579
|
// packages/qwik/src/core/reactive-primitives/subscriber.ts
|
|
22575
22580
|
import { isServer as isServer4 } from "@qwik.dev/core/build";
|
|
@@ -22655,7 +22660,7 @@ var cleanupFn = (target, handleError) => {
|
|
|
22655
22660
|
};
|
|
22656
22661
|
|
|
22657
22662
|
// packages/qwik/src/core/reactive-primitives/impl/computed-signal-impl.ts
|
|
22658
|
-
import { isDev as
|
|
22663
|
+
import { isDev as isDev10 } from "@qwik.dev/core/build";
|
|
22659
22664
|
var DEBUG2 = false;
|
|
22660
22665
|
var log2 = (...args) => console.log("COMPUTED SIGNAL", ...args.map(qwikDebugToString));
|
|
22661
22666
|
var _a2, _b;
|
|
@@ -22691,7 +22696,7 @@ var ComputedSignalImpl = class extends (_b = SignalImpl, _a2 = _EFFECT_BACK_REF,
|
|
|
22691
22696
|
}
|
|
22692
22697
|
get untrackedValue() {
|
|
22693
22698
|
this.$computeIfNeeded$();
|
|
22694
|
-
|
|
22699
|
+
isDev10 && assertFalse(this.$untrackedValue$ === NEEDS_COMPUTATION, "Invalid state");
|
|
22695
22700
|
return this.$untrackedValue$;
|
|
22696
22701
|
}
|
|
22697
22702
|
set untrackedValue(value) {
|
|
@@ -22755,7 +22760,7 @@ var AsyncJob = class {
|
|
|
22755
22760
|
}
|
|
22756
22761
|
/** Backward compatible cache method for resource */
|
|
22757
22762
|
cache() {
|
|
22758
|
-
|
|
22763
|
+
isDev11 && console.error(
|
|
22759
22764
|
"useResource cache() method does not do anything. Use `useAsync$` instead of `useResource$`, use the `expires` option for polling behavior."
|
|
22760
22765
|
);
|
|
22761
22766
|
}
|
|
@@ -22803,7 +22808,7 @@ var AsyncSignalImpl = class extends (_b2 = ComputedSignalImpl, _a3 = _EFFECT_BAC
|
|
|
22803
22808
|
this.$flags$ |= 64 /* CLIENT_ONLY */;
|
|
22804
22809
|
}
|
|
22805
22810
|
if (options.allowStale === false) {
|
|
22806
|
-
if (
|
|
22811
|
+
if (isDev11 && initial !== void 0) {
|
|
22807
22812
|
throw new Error(
|
|
22808
22813
|
"allowStale: false and initial cannot be used together. allowStale: false clears the value on invalidation, which conflicts with providing an initial value."
|
|
22809
22814
|
);
|
|
@@ -22821,7 +22826,7 @@ var AsyncSignalImpl = class extends (_b2 = ComputedSignalImpl, _a3 = _EFFECT_BAC
|
|
|
22821
22826
|
get untrackedValue() {
|
|
22822
22827
|
this.$computeIfNeeded$();
|
|
22823
22828
|
if (this.$current$?.$promise$) {
|
|
22824
|
-
if (this.$untrackedValue$ === NEEDS_COMPUTATION || (
|
|
22829
|
+
if (this.$untrackedValue$ === NEEDS_COMPUTATION || (qTest ? isServerPlatform() : isServer5)) {
|
|
22825
22830
|
DEBUG3 && log3("Throwing promise while computing initial value", this);
|
|
22826
22831
|
throw this.$current$?.$promise$;
|
|
22827
22832
|
}
|
|
@@ -22832,7 +22837,7 @@ var AsyncSignalImpl = class extends (_b2 = ComputedSignalImpl, _a3 = _EFFECT_BAC
|
|
|
22832
22837
|
DEBUG3 && log3("Throwing error while reading value", this);
|
|
22833
22838
|
throw this.$untrackedError$;
|
|
22834
22839
|
}
|
|
22835
|
-
if ((
|
|
22840
|
+
if ((qTest ? isServerPlatform() : isServer5) && this.$flags$ & 64 /* CLIENT_ONLY */ && this.$untrackedValue$ === NEEDS_COMPUTATION) {
|
|
22836
22841
|
throw qError(35 /* asyncClientOnlyValueDuringSSR */);
|
|
22837
22842
|
}
|
|
22838
22843
|
return this.$untrackedValue$;
|
|
@@ -22881,7 +22886,7 @@ var AsyncSignalImpl = class extends (_b2 = ComputedSignalImpl, _a3 = _EFFECT_BAC
|
|
|
22881
22886
|
const val = this.untrackedLoading;
|
|
22882
22887
|
const ctx = tryGetInvokeContext();
|
|
22883
22888
|
if (ctx && (this.$container$ || (this.$container$ = ctx.$container$ || null))) {
|
|
22884
|
-
|
|
22889
|
+
isDev11 && assertTrue(
|
|
22885
22890
|
!ctx.$container$ || ctx.$container$ === this.$container$,
|
|
22886
22891
|
"Do not use signals across containers"
|
|
22887
22892
|
);
|
|
@@ -22903,7 +22908,7 @@ var AsyncSignalImpl = class extends (_b2 = ComputedSignalImpl, _a3 = _EFFECT_BAC
|
|
|
22903
22908
|
}
|
|
22904
22909
|
get untrackedLoading() {
|
|
22905
22910
|
this.$computeIfNeeded$();
|
|
22906
|
-
if ((
|
|
22911
|
+
if ((qTest ? isServerPlatform() : isServer5) && this.$current$?.$promise$) {
|
|
22907
22912
|
DEBUG3 && log3("Throwing loading promise for SSR");
|
|
22908
22913
|
throw this.$current$?.$promise$;
|
|
22909
22914
|
}
|
|
@@ -22914,7 +22919,7 @@ var AsyncSignalImpl = class extends (_b2 = ComputedSignalImpl, _a3 = _EFFECT_BAC
|
|
|
22914
22919
|
const val = this.untrackedError;
|
|
22915
22920
|
const ctx = tryGetInvokeContext();
|
|
22916
22921
|
if (ctx && (this.$container$ || (this.$container$ = ctx.$container$ || null))) {
|
|
22917
|
-
|
|
22922
|
+
isDev11 && assertTrue(
|
|
22918
22923
|
!ctx.$container$ || ctx.$container$ === this.$container$,
|
|
22919
22924
|
"Do not use signals across containers"
|
|
22920
22925
|
);
|
|
@@ -23002,7 +23007,7 @@ var AsyncSignalImpl = class extends (_b2 = ComputedSignalImpl, _a3 = _EFFECT_BAC
|
|
|
23002
23007
|
if (!(this.$flags$ & 32 /* EAGER_CLEANUP */) || this.$hasSubscribers$()) {
|
|
23003
23008
|
return;
|
|
23004
23009
|
}
|
|
23005
|
-
if (!(
|
|
23010
|
+
if (!(qTest ? !isServerPlatform() : isBrowser2)) {
|
|
23006
23011
|
return;
|
|
23007
23012
|
}
|
|
23008
23013
|
setTimeout(() => {
|
|
@@ -23023,7 +23028,7 @@ var AsyncSignalImpl = class extends (_b2 = ComputedSignalImpl, _a3 = _EFFECT_BAC
|
|
|
23023
23028
|
if (!(this.$flags$ & 1 /* INVALID */)) {
|
|
23024
23029
|
return;
|
|
23025
23030
|
}
|
|
23026
|
-
if ((
|
|
23031
|
+
if ((qTest ? isServerPlatform() : isServer5) && this.$flags$ & 64 /* CLIENT_ONLY */) {
|
|
23027
23032
|
this.$untrackedLoading$ = true;
|
|
23028
23033
|
this.$container$?.serializationCtx.$eagerResume$.add(this);
|
|
23029
23034
|
return;
|
|
@@ -23149,7 +23154,7 @@ var AsyncSignalImpl = class extends (_b2 = ComputedSignalImpl, _a3 = _EFFECT_BAC
|
|
|
23149
23154
|
}
|
|
23150
23155
|
}
|
|
23151
23156
|
$scheduleNextPoll$() {
|
|
23152
|
-
if ((
|
|
23157
|
+
if ((qTest ? isServerPlatform() : isServer5) || !this.$expires$) {
|
|
23153
23158
|
return;
|
|
23154
23159
|
}
|
|
23155
23160
|
this.$clearNextPoll$();
|
|
@@ -23402,6 +23407,16 @@ function mergeCursors(container, newCursorData, oldCursor) {
|
|
|
23402
23407
|
newCursorData.journal = oldJournal;
|
|
23403
23408
|
}
|
|
23404
23409
|
}
|
|
23410
|
+
const oldBoundaries = oldCursorData.boundaries;
|
|
23411
|
+
if (__EXPERIMENTAL__.suspense && oldBoundaries && oldBoundaries.length > 0) {
|
|
23412
|
+
const newBoundaries = newCursorData.boundaries || (newCursorData.boundaries = []);
|
|
23413
|
+
for (let i = 0; i < oldBoundaries.length; i++) {
|
|
23414
|
+
const boundary = oldBoundaries[i];
|
|
23415
|
+
if (!newBoundaries.includes(boundary)) {
|
|
23416
|
+
newBoundaries.push(boundary);
|
|
23417
|
+
}
|
|
23418
|
+
}
|
|
23419
|
+
}
|
|
23405
23420
|
}
|
|
23406
23421
|
function getCursorData(vNode) {
|
|
23407
23422
|
return cursorDatas.get(vNode) ?? null;
|
|
@@ -23411,7 +23426,7 @@ function setCursorData(vNode, cursorData) {
|
|
|
23411
23426
|
}
|
|
23412
23427
|
|
|
23413
23428
|
// packages/qwik/src/core/client/vnode-diff.ts
|
|
23414
|
-
import { isDev as
|
|
23429
|
+
import { isDev as isDev15 } from "@qwik.dev/core/build";
|
|
23415
23430
|
|
|
23416
23431
|
// packages/qwik/src/core/reactive-primitives/subscription-data.ts
|
|
23417
23432
|
var SubscriptionData = class {
|
|
@@ -23422,14 +23437,14 @@ var SubscriptionData = class {
|
|
|
23422
23437
|
};
|
|
23423
23438
|
|
|
23424
23439
|
// packages/qwik/src/core/shared/component-execution.ts
|
|
23425
|
-
import { isDev as
|
|
23440
|
+
import { isDev as isDev13, isServer as isServer6 } from "@qwik.dev/core/build";
|
|
23426
23441
|
|
|
23427
23442
|
// packages/qwik/src/core/shared/component.public.ts
|
|
23428
|
-
import { isDev as
|
|
23443
|
+
import { isDev as isDev12 } from "@qwik.dev/core/build";
|
|
23429
23444
|
var componentQrl = (componentQrl3) => {
|
|
23430
23445
|
function QwikComponent(props, key, flags = 0) {
|
|
23431
|
-
|
|
23432
|
-
|
|
23446
|
+
isDev12 && assertQrl(componentQrl3);
|
|
23447
|
+
isDev12 && assertNumber(flags, "The Qwik Component was not invoked correctly");
|
|
23433
23448
|
const hash2 = qTest ? "sX" : componentQrl3.$hash$.slice(0, 4);
|
|
23434
23449
|
const finalKey = hash2 + ":" + (key ? key : "");
|
|
23435
23450
|
const InnerCmp = () => {
|
|
@@ -23534,7 +23549,7 @@ var executeComponent = (container, renderHost, subscriptionHost, componentQRL, p
|
|
|
23534
23549
|
let isInlineComponent = false;
|
|
23535
23550
|
if (componentQRL === null) {
|
|
23536
23551
|
componentQRL = container.getHostProp(renderHost, OnRenderProp);
|
|
23537
|
-
|
|
23552
|
+
isDev13 && assertDefined(componentQRL, "No Component found at this location");
|
|
23538
23553
|
}
|
|
23539
23554
|
if (isQrl(componentQRL)) {
|
|
23540
23555
|
props = props || container.getHostProp(renderHost, ELEMENT_PROPS) || EMPTY_OBJ;
|
|
@@ -23550,7 +23565,7 @@ var executeComponent = (container, renderHost, subscriptionHost, componentQRL, p
|
|
|
23550
23565
|
const inlineComponent = componentQRL;
|
|
23551
23566
|
componentFn = () => invokeApply(iCtx, inlineComponent, [props || EMPTY_OBJ]);
|
|
23552
23567
|
}
|
|
23553
|
-
const isSsr =
|
|
23568
|
+
const isSsr = qTest ? isServerPlatform() : isServer6;
|
|
23554
23569
|
const executeComponentWithPromiseExceptionRetry = (retryCount = 0) => safeCall(
|
|
23555
23570
|
() => {
|
|
23556
23571
|
if (!isInlineComponent) {
|
|
@@ -23613,7 +23628,7 @@ function addUseOnEvents(jsx2, useOnEvents) {
|
|
|
23613
23628
|
}
|
|
23614
23629
|
targetElement = placeholderElement;
|
|
23615
23630
|
} else {
|
|
23616
|
-
if (
|
|
23631
|
+
if (isDev13) {
|
|
23617
23632
|
const sourceLocation = getUseOnSourceLocation(useOnEvents[key].qrls);
|
|
23618
23633
|
logWarn(
|
|
23619
23634
|
'You are trying to add an event "' + key + '" using `useOn` hook, but a node to which you can add an event is not found. Please make sure that the component outputs a DOM element.' + (sourceLocation ? ` Offending \`useOn\`: ${sourceLocation}.` : "")
|
|
@@ -23625,7 +23640,7 @@ function addUseOnEvents(jsx2, useOnEvents) {
|
|
|
23625
23640
|
if (targetElement) {
|
|
23626
23641
|
if (targetElement.type === "script" && key === qVisibleEvent) {
|
|
23627
23642
|
eventKey = "q-d:qinit";
|
|
23628
|
-
if (
|
|
23643
|
+
if (isDev13) {
|
|
23629
23644
|
const sourceLocation = getUseOnSourceLocation(useOnEvents[key].qrls);
|
|
23630
23645
|
logWarn(
|
|
23631
23646
|
`You are trying to add the event "${key}" using the \`useVisibleTask$\` hook with the "intersection-observer" strategy, but this only works when the component outputs a DOM element. Falling back to "document-ready" instead.` + (sourceLocation ? ` Offending \`useVisibleTask$\`: ${sourceLocation}.` : "")
|
|
@@ -23745,9 +23760,9 @@ var SSRRaw = () => null;
|
|
|
23745
23760
|
var SSRComment = () => null;
|
|
23746
23761
|
|
|
23747
23762
|
// packages/qwik/src/core/client/vnode-namespace.ts
|
|
23748
|
-
import { isDev as
|
|
23763
|
+
import { isDev as isDev14 } from "@qwik.dev/core/build";
|
|
23749
23764
|
var isForeignObjectElement = (elementName) => {
|
|
23750
|
-
return
|
|
23765
|
+
return isDev14 ? elementName.toLowerCase() === "foreignobject" : elementName === "foreignObject";
|
|
23751
23766
|
};
|
|
23752
23767
|
var isSvgElement = (elementName) => elementName === "svg" || isForeignObjectElement(elementName);
|
|
23753
23768
|
var isMathElement = (elementName) => elementName === "math";
|
|
@@ -24530,6 +24545,82 @@ var createSetTextOperation = (target, text) => new SetTextOperation(target, text
|
|
|
24530
24545
|
var createInsertOrMoveOperation = (target, parent, beforeTarget) => new InsertOrMoveOperation(target, parent, beforeTarget);
|
|
24531
24546
|
var createSetAttributeOperation = (target, attrName, attrValue, scopedStyleIdPrefix = null, isSvg2 = false) => new SetAttributeOperation(target, attrName, attrValue, scopedStyleIdPrefix, isSvg2);
|
|
24532
24547
|
|
|
24548
|
+
// packages/qwik/src/core/use/use-cursor-boundary.ts
|
|
24549
|
+
function addCursorBoundary(cursorData, vNode) {
|
|
24550
|
+
if (!__EXPERIMENTAL__.suspense) {
|
|
24551
|
+
return;
|
|
24552
|
+
}
|
|
24553
|
+
const boundary = getNearestCursorBoundary(cursorData.container, vNode);
|
|
24554
|
+
if (!boundary) {
|
|
24555
|
+
return;
|
|
24556
|
+
}
|
|
24557
|
+
const boundaries = cursorData.boundaries || (cursorData.boundaries = []);
|
|
24558
|
+
if (!boundaries.includes(boundary)) {
|
|
24559
|
+
boundaries.push(boundary);
|
|
24560
|
+
boundary.pending.value++;
|
|
24561
|
+
}
|
|
24562
|
+
}
|
|
24563
|
+
function resolveCursorBoundaries(cursorData) {
|
|
24564
|
+
if (!__EXPERIMENTAL__.suspense) {
|
|
24565
|
+
return;
|
|
24566
|
+
}
|
|
24567
|
+
const boundaries = cursorData.boundaries;
|
|
24568
|
+
if (!boundaries) {
|
|
24569
|
+
return;
|
|
24570
|
+
}
|
|
24571
|
+
cursorData.boundaries = null;
|
|
24572
|
+
for (let i = 0; i < boundaries.length; i++) {
|
|
24573
|
+
const boundary = boundaries[i];
|
|
24574
|
+
boundary.pending.value = Math.max(0, boundary.pending.value - 1);
|
|
24575
|
+
boundary.version.value++;
|
|
24576
|
+
}
|
|
24577
|
+
}
|
|
24578
|
+
function getOwnCursorBoundary(container, vNode) {
|
|
24579
|
+
if (!__EXPERIMENTAL__.suspense) {
|
|
24580
|
+
return null;
|
|
24581
|
+
}
|
|
24582
|
+
return container.getHostProp(vNode, QCursorBoundary);
|
|
24583
|
+
}
|
|
24584
|
+
function getNearestCursorBoundaryProp(vNode) {
|
|
24585
|
+
if (!__EXPERIMENTAL__.suspense) {
|
|
24586
|
+
return null;
|
|
24587
|
+
}
|
|
24588
|
+
return vnode_getProp(vNode, QNearestCursorBoundary, null) || null;
|
|
24589
|
+
}
|
|
24590
|
+
function clearNearestCursorBoundary(vNode) {
|
|
24591
|
+
if (!__EXPERIMENTAL__.suspense) {
|
|
24592
|
+
return;
|
|
24593
|
+
}
|
|
24594
|
+
vnode_setProp(vNode, QNearestCursorBoundary, null);
|
|
24595
|
+
}
|
|
24596
|
+
function getNearestCursorBoundary(container, vNode) {
|
|
24597
|
+
if (!__EXPERIMENTAL__.suspense) {
|
|
24598
|
+
return null;
|
|
24599
|
+
}
|
|
24600
|
+
return getNearestCursorBoundaryProp(vNode) || getOwnCursorBoundary(container, vNode);
|
|
24601
|
+
}
|
|
24602
|
+
function setNearestCursorBoundary(vNode, boundary) {
|
|
24603
|
+
__EXPERIMENTAL__.suspense && vnode_setProp(vNode, QNearestCursorBoundary, boundary);
|
|
24604
|
+
}
|
|
24605
|
+
function updateDirtySubtreeCursorBoundary(container, vNode, boundary) {
|
|
24606
|
+
if (!__EXPERIMENTAL__.suspense) {
|
|
24607
|
+
return;
|
|
24608
|
+
}
|
|
24609
|
+
setNearestCursorBoundary(vNode, boundary);
|
|
24610
|
+
const dirtyChildren = vNode.dirtyChildren;
|
|
24611
|
+
if (!dirtyChildren || dirtyChildren.length === 0) {
|
|
24612
|
+
return;
|
|
24613
|
+
}
|
|
24614
|
+
for (let i = 0; i < dirtyChildren.length; i++) {
|
|
24615
|
+
const child = dirtyChildren[i];
|
|
24616
|
+
updateDirtySubtreeCursorBoundary(
|
|
24617
|
+
container,
|
|
24618
|
+
child,
|
|
24619
|
+
getOwnCursorBoundary(container, child) || boundary
|
|
24620
|
+
);
|
|
24621
|
+
}
|
|
24622
|
+
}
|
|
24623
|
+
|
|
24533
24624
|
// packages/qwik/src/core/use/utils/destroyable.ts
|
|
24534
24625
|
var cleanupDestroyable = (destroyable) => {
|
|
24535
24626
|
if (destroyable.$destroy$) {
|
|
@@ -24590,7 +24681,7 @@ function peekNextSiblingWithinBoundary(diffContext, vCurrent) {
|
|
|
24590
24681
|
}
|
|
24591
24682
|
var _hasOwnProperty2 = Object.prototype.hasOwnProperty;
|
|
24592
24683
|
function setAttribute(journal, vnode, key, value, scopedStyleIdPrefix, originalValue) {
|
|
24593
|
-
|
|
24684
|
+
qTest && scopedStyleIdPrefix && vnode_setProp(vnode, debugStyleScopeIdPrefixAttr, scopedStyleIdPrefix);
|
|
24594
24685
|
vnode_setProp(vnode, key, originalValue);
|
|
24595
24686
|
addVNodeOperation(
|
|
24596
24687
|
journal,
|
|
@@ -24683,8 +24774,8 @@ function runDiff(diffContext, jsxNode, vStartNode, vCurrent = vnode_getFirstChil
|
|
|
24683
24774
|
}
|
|
24684
24775
|
function diff(diffContext, jsxNode, vStartNode, vCurrent = vnode_getFirstChild(vStartNode), vEnd = null, forceCreationMode = false) {
|
|
24685
24776
|
const previousCreationMode = diffContext.$isCreationMode$;
|
|
24686
|
-
|
|
24687
|
-
|
|
24777
|
+
isDev15 && assertFalse(vnode_isVNode(jsxNode), "JSXNode should not be a VNode");
|
|
24778
|
+
isDev15 && assertTrue(vnode_isVNode(vStartNode), "vStartNode should be a VNode");
|
|
24688
24779
|
diffContext.$isCreationMode$ = forceCreationMode || previousCreationMode;
|
|
24689
24780
|
diffContext.$vParent$ = vStartNode;
|
|
24690
24781
|
diffContext.$vNewNode$ = null;
|
|
@@ -24698,7 +24789,7 @@ function diff(diffContext, jsxNode, vStartNode, vCurrent = vnode_getFirstChild(v
|
|
|
24698
24789
|
}
|
|
24699
24790
|
while (diffContext.$stack$.length) {
|
|
24700
24791
|
while (diffContext.$jsxIdx$ < diffContext.$jsxCount$) {
|
|
24701
|
-
|
|
24792
|
+
isDev15 && assertFalse(
|
|
24702
24793
|
diffContext.$vParent$ === diffContext.$vCurrent$,
|
|
24703
24794
|
"Parent and current can't be the same"
|
|
24704
24795
|
);
|
|
@@ -24837,7 +24928,7 @@ function descend(diffContext, children, descendVNode, shouldExpectNoChildren = t
|
|
|
24837
24928
|
}
|
|
24838
24929
|
stackPush(diffContext, children, descendVNode);
|
|
24839
24930
|
if (descendVNode) {
|
|
24840
|
-
|
|
24931
|
+
isDev15 && assertDefined(
|
|
24841
24932
|
diffContext.$vCurrent$ || diffContext.$vNewNode$,
|
|
24842
24933
|
"Expecting vCurrent to be defined."
|
|
24843
24934
|
);
|
|
@@ -24964,16 +25055,18 @@ function expectProjection(diffContext) {
|
|
|
24964
25055
|
diffContext.$vCurrent$ = diffContext.$vCurrent$ && diffContext.$vCurrent$.flags & 32 /* Deleted */ ? null : diffContext.$vCurrent$;
|
|
24965
25056
|
if (diffContext.$vCurrent$ == null) {
|
|
24966
25057
|
diffContext.$vNewNode$ = vnode_newVirtual();
|
|
24967
|
-
|
|
24968
|
-
|
|
25058
|
+
isDev15 && vnode_setProp(diffContext.$vNewNode$, DEBUG_TYPE, "P" /* Projection */);
|
|
25059
|
+
isDev15 && vnode_setProp(diffContext.$vNewNode$, "q:code", "expectProjection");
|
|
24969
25060
|
vnode_setProp(diffContext.$vNewNode$, QSlot, slotName);
|
|
24970
25061
|
diffContext.$vNewNode$.slotParent = diffContext.$vParent$;
|
|
24971
25062
|
vnode_setProp(diffContext.$vParent$, slotName, diffContext.$vNewNode$);
|
|
24972
25063
|
}
|
|
24973
25064
|
}
|
|
24974
25065
|
function expectSlot(diffContext) {
|
|
25066
|
+
const jsxNode = diffContext.$jsxValue$;
|
|
24975
25067
|
const vHost = vnode_getProjectionParentComponent(diffContext.$vParent$);
|
|
24976
25068
|
const slotNameKey = getSlotNameKey(diffContext, vHost);
|
|
25069
|
+
const cursorBoundary = directGetPropsProxyProp(jsxNode, QCursorBoundary) || null;
|
|
24977
25070
|
const vProjectedNode = vHost ? vnode_getProp(
|
|
24978
25071
|
vHost,
|
|
24979
25072
|
slotNameKey,
|
|
@@ -24985,8 +25078,14 @@ function expectSlot(diffContext) {
|
|
|
24985
25078
|
if (vProjectedNode == null) {
|
|
24986
25079
|
diffContext.$vNewNode$ = vnode_newVirtual();
|
|
24987
25080
|
vnode_setProp(diffContext.$vNewNode$, QSlot, slotNameKey);
|
|
25081
|
+
vnode_setProp(diffContext.$vNewNode$, QCursorBoundary, cursorBoundary);
|
|
25082
|
+
updateDirtySubtreeCursorBoundary(
|
|
25083
|
+
diffContext.$container$,
|
|
25084
|
+
diffContext.$vNewNode$,
|
|
25085
|
+
cursorBoundary
|
|
25086
|
+
);
|
|
24988
25087
|
vHost && vnode_setProp(vHost, slotNameKey, diffContext.$vNewNode$);
|
|
24989
|
-
|
|
25088
|
+
isDev15 && vnode_setProp(diffContext.$vNewNode$, DEBUG_TYPE, "P" /* Projection */);
|
|
24990
25089
|
vnode_insertBefore(
|
|
24991
25090
|
diffContext.$journal$,
|
|
24992
25091
|
diffContext.$vParent$,
|
|
@@ -24999,8 +25098,14 @@ function expectSlot(diffContext) {
|
|
|
24999
25098
|
const oldParent = vProjectedNode.parent;
|
|
25000
25099
|
diffContext.$vNewNode$ = vProjectedNode;
|
|
25001
25100
|
vnode_setProp(diffContext.$vNewNode$, QSlot, slotNameKey);
|
|
25101
|
+
vnode_setProp(diffContext.$vNewNode$, QCursorBoundary, cursorBoundary);
|
|
25102
|
+
updateDirtySubtreeCursorBoundary(
|
|
25103
|
+
diffContext.$container$,
|
|
25104
|
+
diffContext.$vNewNode$,
|
|
25105
|
+
cursorBoundary
|
|
25106
|
+
);
|
|
25002
25107
|
vHost && vnode_setProp(vHost, slotNameKey, diffContext.$vNewNode$);
|
|
25003
|
-
|
|
25108
|
+
isDev15 && vnode_setProp(diffContext.$vNewNode$, DEBUG_TYPE, "P" /* Projection */);
|
|
25004
25109
|
vnode_inflateProjectionTrailingText(
|
|
25005
25110
|
diffContext.$journal$,
|
|
25006
25111
|
diffContext.$vNewNode$
|
|
@@ -25098,7 +25203,7 @@ function expectNoChildren(diffContext, removeDOM = true) {
|
|
|
25098
25203
|
}
|
|
25099
25204
|
function expectNoMore(diffContext) {
|
|
25100
25205
|
const boundary = getLevelBoundary(diffContext);
|
|
25101
|
-
|
|
25206
|
+
isDev15 && assertFalse(
|
|
25102
25207
|
diffContext.$vParent$ === diffContext.$vCurrent$,
|
|
25103
25208
|
"Parent and current can't be the same"
|
|
25104
25209
|
);
|
|
@@ -25159,7 +25264,7 @@ function applyConstInnerHtml(element, value) {
|
|
|
25159
25264
|
}
|
|
25160
25265
|
function applyConstTextareaValue(element, value, currentFile) {
|
|
25161
25266
|
if (value && typeof value !== "string") {
|
|
25162
|
-
if (
|
|
25267
|
+
if (isDev15) {
|
|
25163
25268
|
throw qError(23 /* wrongTextareaValue */, [currentFile, value]);
|
|
25164
25269
|
}
|
|
25165
25270
|
return true;
|
|
@@ -25262,7 +25367,7 @@ function registerEventHandlers(key, value, element, vnode, diffContext) {
|
|
|
25262
25367
|
function createElementWithNamespace(diffContext, elementName) {
|
|
25263
25368
|
const domParentVNode = vnode_getDomParentVNode(diffContext.$vParent$, true);
|
|
25264
25369
|
const namespaceData = getNewElementNamespaceData(domParentVNode, elementName);
|
|
25265
|
-
const currentDocument =
|
|
25370
|
+
const currentDocument = qTest ? diffContext.$container$.document : document;
|
|
25266
25371
|
const element = namespaceData.elementNamespaceFlag === 0 /* NS_html */ ? currentDocument.createElement(elementName) : currentDocument.createElementNS(namespaceData.elementNamespace, elementName);
|
|
25267
25372
|
diffContext.$vNewNode$ = vnode_newElement(element, elementName);
|
|
25268
25373
|
diffContext.$vNewNode$.flags |= namespaceData.elementNamespaceFlag;
|
|
@@ -25294,7 +25399,7 @@ function expectElement(diffContext, jsx2, elementName) {
|
|
|
25294
25399
|
const jsxProps = jsx2.varProps;
|
|
25295
25400
|
const vNode = diffContext.$vNewNode$ || diffContext.$vCurrent$;
|
|
25296
25401
|
if (jsxProps) {
|
|
25297
|
-
diffProps(diffContext, vNode, jsxProps,
|
|
25402
|
+
diffProps(diffContext, vNode, jsxProps, isDev15 && getFileLocationFromJsx(jsx2.dev) || null);
|
|
25298
25403
|
}
|
|
25299
25404
|
}
|
|
25300
25405
|
function diffProps(diffContext, vnode, newAttrs, currentFile) {
|
|
@@ -25393,7 +25498,7 @@ var patchProperty = (diffContext, vnode, key, value, currentFile) => {
|
|
|
25393
25498
|
);
|
|
25394
25499
|
};
|
|
25395
25500
|
function registerQwikLoaderEvent(diffContext, eventName) {
|
|
25396
|
-
const qWindow =
|
|
25501
|
+
const qWindow = qTest ? diffContext.$container$.document.defaultView : window;
|
|
25397
25502
|
if (qWindow) {
|
|
25398
25503
|
(qWindow._qwikEv || (qWindow._qwikEv = [])).push(eventName);
|
|
25399
25504
|
}
|
|
@@ -25554,7 +25659,7 @@ function expectVirtual(diffContext, type, jsxKey) {
|
|
|
25554
25659
|
getInsertBefore(diffContext)
|
|
25555
25660
|
);
|
|
25556
25661
|
diffContext.$vNewNode$.key = jsxKey;
|
|
25557
|
-
|
|
25662
|
+
isDev15 && vnode_setProp(diffContext.$vNewNode$, DEBUG_TYPE, type);
|
|
25558
25663
|
return;
|
|
25559
25664
|
}
|
|
25560
25665
|
if (moveOrCreateKeyedNode(
|
|
@@ -25572,7 +25677,7 @@ function expectVirtual(diffContext, type, jsxKey) {
|
|
|
25572
25677
|
getInsertBefore(diffContext)
|
|
25573
25678
|
);
|
|
25574
25679
|
diffContext.$vNewNode$.key = jsxKey;
|
|
25575
|
-
|
|
25680
|
+
isDev15 && vnode_setProp(diffContext.$vNewNode$, DEBUG_TYPE, type);
|
|
25576
25681
|
}
|
|
25577
25682
|
}
|
|
25578
25683
|
function expectComponent(diffContext, component) {
|
|
@@ -25685,7 +25790,7 @@ function insertNewComponent(diffContext, host, componentQRL, jsxProps) {
|
|
|
25685
25790
|
getInsertBefore(diffContext)
|
|
25686
25791
|
);
|
|
25687
25792
|
const jsxNode = diffContext.$jsxValue$;
|
|
25688
|
-
|
|
25793
|
+
isDev15 && vnode_setProp(diffContext.$vNewNode$, DEBUG_TYPE, "C" /* Component */);
|
|
25689
25794
|
vnode_setProp(diffContext.$vNewNode$, OnRenderProp, componentQRL);
|
|
25690
25795
|
vnode_setProp(diffContext.$vNewNode$, ELEMENT_PROPS, jsxProps);
|
|
25691
25796
|
diffContext.$vNewNode$.key = jsxNode.key;
|
|
@@ -25698,7 +25803,7 @@ function insertNewInlineComponent(diffContext) {
|
|
|
25698
25803
|
getInsertBefore(diffContext)
|
|
25699
25804
|
);
|
|
25700
25805
|
const jsxNode = diffContext.$jsxValue$;
|
|
25701
|
-
|
|
25806
|
+
isDev15 && vnode_setProp(diffContext.$vNewNode$, DEBUG_TYPE, "I" /* InlineComponent */);
|
|
25702
25807
|
vnode_setProp(diffContext.$vNewNode$, ELEMENT_PROPS, jsxNode.props);
|
|
25703
25808
|
if (jsxNode.key) {
|
|
25704
25809
|
diffContext.$vNewNode$.key = jsxNode.key;
|
|
@@ -25719,7 +25824,7 @@ function expectText(diffContext, text) {
|
|
|
25719
25824
|
diffContext.$journal$,
|
|
25720
25825
|
diffContext.$vParent$,
|
|
25721
25826
|
diffContext.$vNewNode$ = vnode_newText(
|
|
25722
|
-
(
|
|
25827
|
+
(qTest ? diffContext.$container$.document : document).createTextNode(text),
|
|
25723
25828
|
text
|
|
25724
25829
|
),
|
|
25725
25830
|
getCurrentInsertBefore(diffContext)
|
|
@@ -25962,7 +26067,7 @@ function containsWrappedSignal(data, signal) {
|
|
|
25962
26067
|
}
|
|
25963
26068
|
|
|
25964
26069
|
// packages/qwik/src/core/client/reconcile-keyed-loop.ts
|
|
25965
|
-
import { isDev as
|
|
26070
|
+
import { isDev as isDev16 } from "@qwik.dev/core/build";
|
|
25966
26071
|
function collectChildren(first, last = null) {
|
|
25967
26072
|
const children = [];
|
|
25968
26073
|
let child = first;
|
|
@@ -25977,7 +26082,7 @@ function collectChildren(first, last = null) {
|
|
|
25977
26082
|
}
|
|
25978
26083
|
function renderKeyedRow(item, index, key, renderItem) {
|
|
25979
26084
|
const jsx2 = renderItem(item, index);
|
|
25980
|
-
if (
|
|
26085
|
+
if (isDev16 && !isJSXNode(jsx2)) {
|
|
25981
26086
|
throw new Error("Each item$ must return a single JSX node");
|
|
25982
26087
|
}
|
|
25983
26088
|
jsx2.key = key;
|
|
@@ -26203,7 +26308,7 @@ function reconcileKeyedLoopToParent(container, journal, parent, cursor, items, k
|
|
|
26203
26308
|
);
|
|
26204
26309
|
return maybeThen(result, () => {
|
|
26205
26310
|
const firstInserted = firstInsertedBeforeAnchor(parent, anchor, blockLength);
|
|
26206
|
-
if (
|
|
26311
|
+
if (isDev16 && !firstInserted) {
|
|
26207
26312
|
throw new Error("Failed to insert keyed loop block");
|
|
26208
26313
|
}
|
|
26209
26314
|
anchor = firstInserted;
|
|
@@ -26634,7 +26739,7 @@ var createMacroTask = (fn) => {
|
|
|
26634
26739
|
};
|
|
26635
26740
|
|
|
26636
26741
|
// packages/qwik/src/core/shared/cursor/cursor-walker.ts
|
|
26637
|
-
import { isDev as
|
|
26742
|
+
import { isDev as isDev17, isServer as isServer7 } from "@qwik.dev/core/build";
|
|
26638
26743
|
var DEBUG6 = false;
|
|
26639
26744
|
var nextMicroTask = createMicroTask(processCursorQueue);
|
|
26640
26745
|
var nextMacroTask = createMacroTask(processCursorQueue);
|
|
@@ -26664,14 +26769,14 @@ function processCursorQueue() {
|
|
|
26664
26769
|
}
|
|
26665
26770
|
}
|
|
26666
26771
|
function walkCursor(cursor, until) {
|
|
26667
|
-
const isRunningOnServer =
|
|
26772
|
+
const isRunningOnServer = qTest ? isServerPlatform() : isServer7;
|
|
26668
26773
|
const cursorData = getCursorData(cursor);
|
|
26669
26774
|
const blockingPromise = cursorData.promise;
|
|
26670
26775
|
if (blockingPromise) {
|
|
26671
26776
|
return;
|
|
26672
26777
|
}
|
|
26673
26778
|
const container = cursorData.container;
|
|
26674
|
-
|
|
26779
|
+
isDev17 && assertDefined(container, "Cursor container not found");
|
|
26675
26780
|
if (!cursor.dirty) {
|
|
26676
26781
|
finishWalk(container, cursor, cursorData, isRunningOnServer);
|
|
26677
26782
|
return;
|
|
@@ -26688,7 +26793,8 @@ function walkCursor(cursor, until) {
|
|
|
26688
26793
|
return;
|
|
26689
26794
|
}
|
|
26690
26795
|
if (!(currentVNode.dirty & 511 /* DIRTY_MASK */)) {
|
|
26691
|
-
|
|
26796
|
+
__EXPERIMENTAL__.suspense && clearNearestCursorBoundary(currentVNode);
|
|
26797
|
+
setCursorPosition(container, cursorData, getNextVNode(currentVNode, cursor, container));
|
|
26692
26798
|
continue;
|
|
26693
26799
|
}
|
|
26694
26800
|
if (currentVNode.flags & 32 /* Deleted */) {
|
|
@@ -26702,7 +26808,7 @@ function walkCursor(cursor, until) {
|
|
|
26702
26808
|
}
|
|
26703
26809
|
}
|
|
26704
26810
|
currentVNode.dirty &= ~511 /* DIRTY_MASK */;
|
|
26705
|
-
setCursorPosition(container, cursorData, getNextVNode(currentVNode, cursor));
|
|
26811
|
+
setCursorPosition(container, cursorData, getNextVNode(currentVNode, cursor, container));
|
|
26706
26812
|
continue;
|
|
26707
26813
|
}
|
|
26708
26814
|
let result;
|
|
@@ -26733,6 +26839,7 @@ function walkCursor(cursor, until) {
|
|
|
26733
26839
|
}
|
|
26734
26840
|
if (result && isPromise(result)) {
|
|
26735
26841
|
DEBUG6 && console.warn("walkCursor: blocking promise", currentVNode.toString());
|
|
26842
|
+
addCursorBoundary(cursorData, currentVNode);
|
|
26736
26843
|
cursorData.promise = result;
|
|
26737
26844
|
pauseCursor(cursor, container);
|
|
26738
26845
|
const host = currentVNode;
|
|
@@ -26749,19 +26856,20 @@ function walkCursor(cursor, until) {
|
|
|
26749
26856
|
return true;
|
|
26750
26857
|
}
|
|
26751
26858
|
}
|
|
26752
|
-
|
|
26859
|
+
isDev17 && assertFalse(
|
|
26753
26860
|
!!(cursor.dirty & 511 /* DIRTY_MASK */ && !cursorData.position),
|
|
26754
26861
|
"Cursor is still dirty and position is not set after walking"
|
|
26755
26862
|
);
|
|
26756
26863
|
finishWalk(container, cursor, cursorData, isRunningOnServer);
|
|
26757
26864
|
}
|
|
26758
|
-
function finishWalk(container, cursor, cursorData,
|
|
26865
|
+
function finishWalk(container, cursor, cursorData, isServer12) {
|
|
26759
26866
|
if (!(cursor.dirty & 511 /* DIRTY_MASK */)) {
|
|
26760
26867
|
removeCursorFromQueue(cursor, container);
|
|
26761
26868
|
DEBUG6 && console.warn("walkCursor: cursor done", cursor.toString());
|
|
26762
|
-
if (!
|
|
26869
|
+
if (!isServer12) {
|
|
26763
26870
|
executeFlushPhase(cursor, container);
|
|
26764
26871
|
}
|
|
26872
|
+
resolveCursorBoundaries(cursorData);
|
|
26765
26873
|
if (cursorData.extraPromises) {
|
|
26766
26874
|
Promise.all(cursorData.extraPromises).then(() => {
|
|
26767
26875
|
resolveCursor(container);
|
|
@@ -26779,11 +26887,12 @@ function tryDescendDirtyChildren(container, cursorData, currentVNode, cursor) {
|
|
|
26779
26887
|
const dirtyChildren = currentVNode.dirtyChildren;
|
|
26780
26888
|
if (!dirtyChildren || dirtyChildren.length === 0) {
|
|
26781
26889
|
currentVNode.dirty &= ~32 /* CHILDREN */;
|
|
26890
|
+
clearNearestCursorBoundary(currentVNode);
|
|
26782
26891
|
return null;
|
|
26783
26892
|
}
|
|
26784
26893
|
partitionDirtyChildren(dirtyChildren, currentVNode);
|
|
26785
26894
|
currentVNode.nextDirtyChildIndex = 0;
|
|
26786
|
-
const next = getNextVNode(dirtyChildren[0], cursor);
|
|
26895
|
+
const next = getNextVNode(dirtyChildren[0], cursor, container);
|
|
26787
26896
|
setCursorPosition(container, cursorData, next);
|
|
26788
26897
|
return next;
|
|
26789
26898
|
}
|
|
@@ -26801,7 +26910,7 @@ function partitionDirtyChildren(dirtyChildren, parent) {
|
|
|
26801
26910
|
}
|
|
26802
26911
|
}
|
|
26803
26912
|
}
|
|
26804
|
-
function getNextVNode(vNode, cursor) {
|
|
26913
|
+
function getNextVNode(vNode, cursor, container) {
|
|
26805
26914
|
if (vNode === cursor) {
|
|
26806
26915
|
if (cursor.dirty & 511 /* DIRTY_MASK */) {
|
|
26807
26916
|
return cursor;
|
|
@@ -26827,6 +26936,13 @@ function getNextVNode(vNode, cursor) {
|
|
|
26827
26936
|
while (count-- > 0) {
|
|
26828
26937
|
const nextVNode = dirtyChildren[index];
|
|
26829
26938
|
if (nextVNode.dirty & 511 /* DIRTY_MASK */) {
|
|
26939
|
+
if (container && splitCursorBoundary(container, nextVNode)) {
|
|
26940
|
+
index++;
|
|
26941
|
+
if (index === len) {
|
|
26942
|
+
index = 0;
|
|
26943
|
+
}
|
|
26944
|
+
continue;
|
|
26945
|
+
}
|
|
26830
26946
|
parent.nextDirtyChildIndex = (index + 1) % len;
|
|
26831
26947
|
return nextVNode;
|
|
26832
26948
|
}
|
|
@@ -26838,7 +26954,20 @@ function getNextVNode(vNode, cursor) {
|
|
|
26838
26954
|
parent.dirty &= ~32 /* CHILDREN */;
|
|
26839
26955
|
parent.dirtyChildren = null;
|
|
26840
26956
|
parent.nextDirtyChildIndex = 0;
|
|
26841
|
-
|
|
26957
|
+
__EXPERIMENTAL__.suspense && clearNearestCursorBoundary(parent);
|
|
26958
|
+
return getNextVNode(parent, cursor, container);
|
|
26959
|
+
}
|
|
26960
|
+
function splitCursorBoundary(container, vNode) {
|
|
26961
|
+
if (!__EXPERIMENTAL__.suspense) {
|
|
26962
|
+
return false;
|
|
26963
|
+
}
|
|
26964
|
+
if (!vNode.props || !(QCursorBoundary in vNode.props) || !container.getHostProp(vNode, QCursorBoundary)) {
|
|
26965
|
+
return false;
|
|
26966
|
+
}
|
|
26967
|
+
if (!isCursor(vNode)) {
|
|
26968
|
+
addCursor(container, vNode, 0);
|
|
26969
|
+
}
|
|
26970
|
+
return true;
|
|
26842
26971
|
}
|
|
26843
26972
|
|
|
26844
26973
|
// packages/qwik/src/core/shared/cursor/cursor.ts
|
|
@@ -26850,7 +26979,8 @@ function addCursor(container, root, priority) {
|
|
|
26850
26979
|
container,
|
|
26851
26980
|
position: root,
|
|
26852
26981
|
priority,
|
|
26853
|
-
promise: null
|
|
26982
|
+
promise: null,
|
|
26983
|
+
boundaries: null
|
|
26854
26984
|
};
|
|
26855
26985
|
setCursorData(root, cursorData);
|
|
26856
26986
|
const cursor = root;
|
|
@@ -26885,13 +27015,18 @@ function propagatePath(target) {
|
|
|
26885
27015
|
}
|
|
26886
27016
|
}
|
|
26887
27017
|
}
|
|
26888
|
-
function propagateToCursorRoot(vNode, cursorRoot) {
|
|
27018
|
+
function propagateToCursorRoot(container, vNode, cursorRoot) {
|
|
26889
27019
|
reusablePath.push(vNode);
|
|
27020
|
+
let cursorBoundary = getOwnCursorBoundary(container, vNode);
|
|
26890
27021
|
let current = vNode.slotParent || vNode.parent;
|
|
26891
27022
|
while (current) {
|
|
26892
27023
|
const isDirty = current.dirty & 511 /* DIRTY_MASK */;
|
|
26893
27024
|
const currentIsCursor = isCursor(current);
|
|
27025
|
+
if (__EXPERIMENTAL__.suspense) {
|
|
27026
|
+
cursorBoundary || (cursorBoundary = getOwnCursorBoundary(container, current) || (isDirty ? getNearestCursorBoundary(container, current) : null));
|
|
27027
|
+
}
|
|
26894
27028
|
if (current === cursorRoot || isDirty) {
|
|
27029
|
+
setNearestCursorBoundary(vNode, cursorBoundary);
|
|
26895
27030
|
propagatePath(current);
|
|
26896
27031
|
if (currentIsCursor) {
|
|
26897
27032
|
const cursorData = getCursorData(current);
|
|
@@ -26914,12 +27049,17 @@ function propagateToCursorRoot(vNode, cursorRoot) {
|
|
|
26914
27049
|
reusablePath.length = 0;
|
|
26915
27050
|
throwErrorAndStop("Cursor root not found in current path!");
|
|
26916
27051
|
}
|
|
26917
|
-
function findAndPropagateToBlockingCursor(vNode) {
|
|
27052
|
+
function findAndPropagateToBlockingCursor(container, vNode) {
|
|
26918
27053
|
reusablePath.push(vNode);
|
|
27054
|
+
let cursorBoundary = __EXPERIMENTAL__.suspense ? getOwnCursorBoundary(container, vNode) : null;
|
|
26919
27055
|
let current = vNode.slotParent || vNode.parent;
|
|
26920
27056
|
while (current) {
|
|
26921
27057
|
const currentIsCursor = isCursor(current);
|
|
27058
|
+
if (__EXPERIMENTAL__.suspense) {
|
|
27059
|
+
cursorBoundary || (cursorBoundary = getOwnCursorBoundary(container, current) || (currentIsCursor ? getNearestCursorBoundary(container, current) : null));
|
|
27060
|
+
}
|
|
26922
27061
|
if (currentIsCursor) {
|
|
27062
|
+
setNearestCursorBoundary(vNode, cursorBoundary);
|
|
26923
27063
|
propagatePath(current);
|
|
26924
27064
|
reusablePath.length = 0;
|
|
26925
27065
|
return true;
|
|
@@ -26927,11 +27067,12 @@ function findAndPropagateToBlockingCursor(vNode) {
|
|
|
26927
27067
|
reusablePath.push(current);
|
|
26928
27068
|
current = current.slotParent || current.parent;
|
|
26929
27069
|
}
|
|
27070
|
+
setNearestCursorBoundary(vNode, cursorBoundary);
|
|
26930
27071
|
reusablePath.length = 0;
|
|
26931
27072
|
return false;
|
|
26932
27073
|
}
|
|
26933
27074
|
function isSsrNodeGuard(_vNode) {
|
|
26934
|
-
return
|
|
27075
|
+
return qTest ? isServerPlatform() : isServer8;
|
|
26935
27076
|
}
|
|
26936
27077
|
function markVNodeDirty(container, vNode, bits, cursorRoot = null) {
|
|
26937
27078
|
const prevDirty = vNode.dirty;
|
|
@@ -26949,10 +27090,14 @@ function markVNodeDirty(container, vNode, bits, cursorRoot = null) {
|
|
|
26949
27090
|
}
|
|
26950
27091
|
const parent = vNode.slotParent || vNode.parent;
|
|
26951
27092
|
if (cursorRoot && isRealDirty && parent && !parent.dirty) {
|
|
26952
|
-
propagateToCursorRoot(vNode, cursorRoot);
|
|
27093
|
+
propagateToCursorRoot(container, vNode, cursorRoot);
|
|
26953
27094
|
return;
|
|
26954
27095
|
}
|
|
26955
27096
|
if (parent && parent.dirty & 511 /* DIRTY_MASK */) {
|
|
27097
|
+
setNearestCursorBoundary(
|
|
27098
|
+
vNode,
|
|
27099
|
+
getOwnCursorBoundary(container, vNode) || getNearestCursorBoundary(container, parent)
|
|
27100
|
+
);
|
|
26956
27101
|
if (isRealDirty) {
|
|
26957
27102
|
parent.dirty |= 32 /* CHILDREN */;
|
|
26958
27103
|
}
|
|
@@ -26977,9 +27122,11 @@ function markVNodeDirty(container, vNode, bits, cursorRoot = null) {
|
|
|
26977
27122
|
}
|
|
26978
27123
|
}
|
|
26979
27124
|
} else if (!isCursor(vNode)) {
|
|
26980
|
-
if (!findAndPropagateToBlockingCursor(vNode)) {
|
|
27125
|
+
if (!findAndPropagateToBlockingCursor(container, vNode)) {
|
|
26981
27126
|
addCursor(container, vNode, 0);
|
|
26982
27127
|
}
|
|
27128
|
+
} else {
|
|
27129
|
+
setNearestCursorBoundary(vNode, getOwnCursorBoundary(container, vNode));
|
|
26983
27130
|
}
|
|
26984
27131
|
}
|
|
26985
27132
|
function addVNodeOperation(journal, operation) {
|
|
@@ -26987,7 +27134,7 @@ function addVNodeOperation(journal, operation) {
|
|
|
26987
27134
|
}
|
|
26988
27135
|
|
|
26989
27136
|
// packages/qwik/src/core/reactive-primitives/impl/wrapped-signal-impl.ts
|
|
26990
|
-
import { isDev as
|
|
27137
|
+
import { isDev as isDev18 } from "@qwik.dev/core/build";
|
|
26991
27138
|
var _a4, _b3;
|
|
26992
27139
|
var WrappedSignalImpl = class extends (_b3 = SignalImpl, _a4 = _EFFECT_BACK_REF, _b3) {
|
|
26993
27140
|
constructor(container, fn, args, fnStr, flags = 1 /* INVALID */ | 4 /* UNWRAP */) {
|
|
@@ -27022,7 +27169,7 @@ var WrappedSignalImpl = class extends (_b3 = SignalImpl, _a4 = _EFFECT_BACK_REF,
|
|
|
27022
27169
|
}
|
|
27023
27170
|
get untrackedValue() {
|
|
27024
27171
|
this.$computeIfNeeded$();
|
|
27025
|
-
|
|
27172
|
+
isDev18 && assertFalse(this.$untrackedValue$ === NEEDS_COMPUTATION, "Invalid state");
|
|
27026
27173
|
return this.$untrackedValue$;
|
|
27027
27174
|
}
|
|
27028
27175
|
$computeIfNeeded$() {
|
|
@@ -27191,6 +27338,7 @@ var isTask = (value) => {
|
|
|
27191
27338
|
};
|
|
27192
27339
|
|
|
27193
27340
|
// packages/qwik/src/core/shared/cursor/ssr-chore-execution.ts
|
|
27341
|
+
import { isDev as isDev19 } from "@qwik.dev/core/build";
|
|
27194
27342
|
function _executeSsrChores(container, ssrNode) {
|
|
27195
27343
|
if (!(ssrNode.flags & 1 /* Updatable */)) {
|
|
27196
27344
|
if (ssrNode.dirty & 8 /* NODE_PROPS */) {
|
|
@@ -27199,7 +27347,7 @@ function _executeSsrChores(container, ssrNode) {
|
|
|
27199
27347
|
if (ssrNode.dirty & 16 /* COMPUTE */) {
|
|
27200
27348
|
executeCompute(ssrNode, container);
|
|
27201
27349
|
}
|
|
27202
|
-
if (ssrNode.dirty & 511 /* DIRTY_MASK */) {
|
|
27350
|
+
if (isDev19 && ssrNode.dirty & 511 /* DIRTY_MASK */) {
|
|
27203
27351
|
const warningMessage = `A chore was scheduled on a host element that has already been streamed to the client.
|
|
27204
27352
|
This can lead to inconsistencies between Server-Side Rendering (SSR) and Client-Side Rendering (CSR).
|
|
27205
27353
|
|
|
@@ -27291,6 +27439,12 @@ async function executeReconcileChore(container, ssrNode) {
|
|
|
27291
27439
|
});
|
|
27292
27440
|
}
|
|
27293
27441
|
|
|
27442
|
+
// packages/qwik/src/core/shared/platform/async-local-storage.ts
|
|
27443
|
+
var getAsyncLocalStorage = () => {
|
|
27444
|
+
const process = globalThis.process;
|
|
27445
|
+
return process?.getBuiltinModule?.("node:async_hooks")?.AsyncLocalStorage;
|
|
27446
|
+
};
|
|
27447
|
+
|
|
27294
27448
|
// packages/qwik/src/core/shared/jsx/bind-handlers.ts
|
|
27295
27449
|
var maybeScopeFromQL = (captureIds, element) => {
|
|
27296
27450
|
if (typeof captureIds === "string") {
|
|
@@ -27314,7 +27468,7 @@ function _chk(_, element) {
|
|
|
27314
27468
|
var version = globalThis.QWIK_VERSION;
|
|
27315
27469
|
|
|
27316
27470
|
// packages/qwik/src/core/shared/serdes/serialize.ts
|
|
27317
|
-
import { isDev as
|
|
27471
|
+
import { isDev as isDev20 } from "@qwik.dev/core/build";
|
|
27318
27472
|
|
|
27319
27473
|
// packages/qwik/src/core/shared/ssr-const.ts
|
|
27320
27474
|
var LT = "<";
|
|
@@ -27736,7 +27890,7 @@ var Serializer = class {
|
|
|
27736
27890
|
} else if (value instanceof Error) {
|
|
27737
27891
|
const out = [value.message];
|
|
27738
27892
|
out.push(...Object.entries(value).flat());
|
|
27739
|
-
if (
|
|
27893
|
+
if (isDev20) {
|
|
27740
27894
|
out.push("stack", value.stack);
|
|
27741
27895
|
}
|
|
27742
27896
|
this.output(23 /* Error */, out);
|
|
@@ -28147,6 +28301,61 @@ var _SharedContainer = class {
|
|
|
28147
28301
|
}
|
|
28148
28302
|
};
|
|
28149
28303
|
|
|
28304
|
+
// packages/qwik/src/core/shared/serdes/preprocess-state.ts
|
|
28305
|
+
function preprocessState(data, container) {
|
|
28306
|
+
const isRootDeepRef = (type, value) => {
|
|
28307
|
+
return type === 1 /* RootRef */ && typeof value === "string";
|
|
28308
|
+
};
|
|
28309
|
+
const isForwardRefsMap = (type) => {
|
|
28310
|
+
return type === 14 /* ForwardRefs */;
|
|
28311
|
+
};
|
|
28312
|
+
const processRootRef = (index) => {
|
|
28313
|
+
const rootRefPath = data[index + 1].split(" ");
|
|
28314
|
+
let object = data;
|
|
28315
|
+
let objectType = 1 /* RootRef */;
|
|
28316
|
+
let typeIndex = 0;
|
|
28317
|
+
let valueIndex = 0;
|
|
28318
|
+
let parent = null;
|
|
28319
|
+
for (let i = 0; i < rootRefPath.length; i++) {
|
|
28320
|
+
parent = object;
|
|
28321
|
+
typeIndex = parseInt(rootRefPath[i], 10) * 2;
|
|
28322
|
+
valueIndex = typeIndex + 1;
|
|
28323
|
+
objectType = object[typeIndex];
|
|
28324
|
+
object = object[valueIndex];
|
|
28325
|
+
if (objectType === 1 /* RootRef */) {
|
|
28326
|
+
const rootRef = object;
|
|
28327
|
+
const rootRefTypeIndex = rootRef * 2;
|
|
28328
|
+
objectType = data[rootRefTypeIndex];
|
|
28329
|
+
object = data[rootRefTypeIndex + 1];
|
|
28330
|
+
}
|
|
28331
|
+
}
|
|
28332
|
+
if (parent) {
|
|
28333
|
+
parent[typeIndex] = 1 /* RootRef */;
|
|
28334
|
+
parent[valueIndex] = index / 2;
|
|
28335
|
+
}
|
|
28336
|
+
data[index] = objectType;
|
|
28337
|
+
data[index + 1] = object;
|
|
28338
|
+
};
|
|
28339
|
+
for (let i = 0; i < data.length; i += 2) {
|
|
28340
|
+
if (isRootDeepRef(data[i], data[i + 1])) {
|
|
28341
|
+
processRootRef(i);
|
|
28342
|
+
} else if (isForwardRefsMap(data[i])) {
|
|
28343
|
+
container.$forwardRefs$ = data[i + 1];
|
|
28344
|
+
}
|
|
28345
|
+
}
|
|
28346
|
+
}
|
|
28347
|
+
|
|
28348
|
+
// packages/qwik/src/core/shared/serdes/serdes.public.ts
|
|
28349
|
+
import { isDev as isDev21 } from "@qwik.dev/core/build";
|
|
28350
|
+
function getObjectById(id, stateData) {
|
|
28351
|
+
if (typeof id === "string") {
|
|
28352
|
+
id = parseInt(id, 10);
|
|
28353
|
+
return stateData[id];
|
|
28354
|
+
}
|
|
28355
|
+
isDev21 && assertTrue(id < stateData.length, `Invalid reference ${id} >= ${stateData.length}`);
|
|
28356
|
+
return stateData[id];
|
|
28357
|
+
}
|
|
28358
|
+
|
|
28150
28359
|
// packages/qwik/src/core/shared/serdes/allocate.ts
|
|
28151
28360
|
var resolvers = /* @__PURE__ */ new WeakMap();
|
|
28152
28361
|
var pendingStoreTargets = /* @__PURE__ */ new Map();
|
|
@@ -28587,7 +28796,7 @@ function inflateWrappedSignalValue(signal) {
|
|
|
28587
28796
|
}
|
|
28588
28797
|
function restoreEffectBackRefForConsumer(effect) {
|
|
28589
28798
|
var _a6;
|
|
28590
|
-
const isServerSide =
|
|
28799
|
+
const isServerSide = qTest ? isServerPlatform() : isServer9;
|
|
28591
28800
|
const consumerBackRef = effect.consumer;
|
|
28592
28801
|
if (isServerSide && !consumerBackRef) {
|
|
28593
28802
|
return;
|
|
@@ -28612,7 +28821,7 @@ function restoreEffectBackRefForEffectsMap(effectsMap, consumer) {
|
|
|
28612
28821
|
}
|
|
28613
28822
|
|
|
28614
28823
|
// packages/qwik/src/core/shared/vnode/vnode.ts
|
|
28615
|
-
import { isDev as
|
|
28824
|
+
import { isDev as isDev22 } from "@qwik.dev/core/build";
|
|
28616
28825
|
var _a5;
|
|
28617
28826
|
_a5 = _EFFECT_BACK_REF;
|
|
28618
28827
|
var VNode = class {
|
|
@@ -28630,7 +28839,7 @@ var VNode = class {
|
|
|
28630
28839
|
}
|
|
28631
28840
|
// TODO: this creates debug issues
|
|
28632
28841
|
toString() {
|
|
28633
|
-
if (
|
|
28842
|
+
if (isDev22) {
|
|
28634
28843
|
return vnode_toString.call(this);
|
|
28635
28844
|
}
|
|
28636
28845
|
return Object.prototype.toString.call(this);
|
|
@@ -28700,7 +28909,7 @@ var LazyRef = class {
|
|
|
28700
28909
|
return this.$ref$;
|
|
28701
28910
|
}
|
|
28702
28911
|
if (this.$chunk$ === "") {
|
|
28703
|
-
|
|
28912
|
+
isDev23 && assertDefined(this.$container$, "Sync QRL must have container element");
|
|
28704
28913
|
const hash2 = this.$container$.$instanceHash$;
|
|
28705
28914
|
const doc = this.$container$.element?.ownerDocument || document;
|
|
28706
28915
|
const qFuncs2 = getQFuncs(doc, hash2);
|
|
@@ -29804,6 +30013,7 @@ var DomContainer = class extends _SharedContainer {
|
|
|
29804
30013
|
case OnRenderProp:
|
|
29805
30014
|
case QCtxAttr:
|
|
29806
30015
|
case QBackRefs:
|
|
30016
|
+
case QCursorBoundary:
|
|
29807
30017
|
getObjectById2 = this.$getObjectById$;
|
|
29808
30018
|
break;
|
|
29809
30019
|
case ELEMENT_SEQ_IDX:
|
|
@@ -29834,7 +30044,7 @@ var DomContainer = class extends _SharedContainer {
|
|
|
29834
30044
|
}
|
|
29835
30045
|
getSyncFn(id) {
|
|
29836
30046
|
const fn = this.$qFuncs$[id];
|
|
29837
|
-
|
|
30047
|
+
isDev24 && assertTrue(typeof fn === "function", "Invalid reference: " + id);
|
|
29838
30048
|
return fn;
|
|
29839
30049
|
}
|
|
29840
30050
|
$appendStyle$(content, styleId, host, scoped) {
|
|
@@ -29883,10 +30093,10 @@ import { isServer as isServer10 } from "@qwik.dev/core/build";
|
|
|
29883
30093
|
var _locale = void 0;
|
|
29884
30094
|
var localAsyncStore;
|
|
29885
30095
|
if (isServer10) {
|
|
29886
|
-
|
|
29887
|
-
|
|
29888
|
-
|
|
29889
|
-
}
|
|
30096
|
+
const AsyncLocalStorage = getAsyncLocalStorage();
|
|
30097
|
+
if (AsyncLocalStorage) {
|
|
30098
|
+
localAsyncStore = new AsyncLocalStorage();
|
|
30099
|
+
}
|
|
29890
30100
|
}
|
|
29891
30101
|
function setLocale(locale) {
|
|
29892
30102
|
if (localAsyncStore) {
|
|
@@ -29986,7 +30196,7 @@ var trackSignalAndAssignHost = (value, host, property, container, data) => {
|
|
|
29986
30196
|
};
|
|
29987
30197
|
|
|
29988
30198
|
// packages/qwik/src/core/reactive-primitives/impl/store.ts
|
|
29989
|
-
import { isDev as
|
|
30199
|
+
import { isDev as isDev25, isServer as isServer11 } from "@qwik.dev/core/build";
|
|
29990
30200
|
var DEBUG7 = false;
|
|
29991
30201
|
var log5 = (...args) => console.log("STORE", ...args.map(qwikDebugToString));
|
|
29992
30202
|
var getStoreHandler = (value) => {
|
|
@@ -30047,7 +30257,7 @@ var StoreHandler2 = class {
|
|
|
30047
30257
|
}
|
|
30048
30258
|
this.$container$ = ctx.$container$;
|
|
30049
30259
|
} else {
|
|
30050
|
-
|
|
30260
|
+
isDev25 && assertTrue(
|
|
30051
30261
|
!ctx.$container$ || ctx.$container$ === this.$container$,
|
|
30052
30262
|
"Do not use signals across containers"
|
|
30053
30263
|
);
|
|
@@ -30150,7 +30360,7 @@ function addStoreEffect(target, prop, store, effectSubscription) {
|
|
|
30150
30360
|
}
|
|
30151
30361
|
ensureContainsSubscription(effects, effectSubscription);
|
|
30152
30362
|
ensureContainsBackRef(effectSubscription, target);
|
|
30153
|
-
(
|
|
30363
|
+
(qTest ? !isDomContainer(store.$container$) : isServer11) && addQrlToSerializationCtx(effectSubscription, store.$container$);
|
|
30154
30364
|
DEBUG7 && log5(
|
|
30155
30365
|
"sub",
|
|
30156
30366
|
pad(
|
|
@@ -30281,61 +30491,6 @@ var canSerialize = (value, seen = /* @__PURE__ */ new WeakSet()) => {
|
|
|
30281
30491
|
return false;
|
|
30282
30492
|
};
|
|
30283
30493
|
|
|
30284
|
-
// packages/qwik/src/core/shared/serdes/preprocess-state.ts
|
|
30285
|
-
function preprocessState(data, container) {
|
|
30286
|
-
const isRootDeepRef = (type, value) => {
|
|
30287
|
-
return type === 1 /* RootRef */ && typeof value === "string";
|
|
30288
|
-
};
|
|
30289
|
-
const isForwardRefsMap = (type) => {
|
|
30290
|
-
return type === 14 /* ForwardRefs */;
|
|
30291
|
-
};
|
|
30292
|
-
const processRootRef = (index) => {
|
|
30293
|
-
const rootRefPath = data[index + 1].split(" ");
|
|
30294
|
-
let object = data;
|
|
30295
|
-
let objectType = 1 /* RootRef */;
|
|
30296
|
-
let typeIndex = 0;
|
|
30297
|
-
let valueIndex = 0;
|
|
30298
|
-
let parent = null;
|
|
30299
|
-
for (let i = 0; i < rootRefPath.length; i++) {
|
|
30300
|
-
parent = object;
|
|
30301
|
-
typeIndex = parseInt(rootRefPath[i], 10) * 2;
|
|
30302
|
-
valueIndex = typeIndex + 1;
|
|
30303
|
-
objectType = object[typeIndex];
|
|
30304
|
-
object = object[valueIndex];
|
|
30305
|
-
if (objectType === 1 /* RootRef */) {
|
|
30306
|
-
const rootRef = object;
|
|
30307
|
-
const rootRefTypeIndex = rootRef * 2;
|
|
30308
|
-
objectType = data[rootRefTypeIndex];
|
|
30309
|
-
object = data[rootRefTypeIndex + 1];
|
|
30310
|
-
}
|
|
30311
|
-
}
|
|
30312
|
-
if (parent) {
|
|
30313
|
-
parent[typeIndex] = 1 /* RootRef */;
|
|
30314
|
-
parent[valueIndex] = index / 2;
|
|
30315
|
-
}
|
|
30316
|
-
data[index] = objectType;
|
|
30317
|
-
data[index + 1] = object;
|
|
30318
|
-
};
|
|
30319
|
-
for (let i = 0; i < data.length; i += 2) {
|
|
30320
|
-
if (isRootDeepRef(data[i], data[i + 1])) {
|
|
30321
|
-
processRootRef(i);
|
|
30322
|
-
} else if (isForwardRefsMap(data[i])) {
|
|
30323
|
-
container.$forwardRefs$ = data[i + 1];
|
|
30324
|
-
}
|
|
30325
|
-
}
|
|
30326
|
-
}
|
|
30327
|
-
|
|
30328
|
-
// packages/qwik/src/core/shared/serdes/serdes.public.ts
|
|
30329
|
-
import { isDev as isDev23 } from "@qwik.dev/core/build";
|
|
30330
|
-
function getObjectById(id, stateData) {
|
|
30331
|
-
if (typeof id === "string") {
|
|
30332
|
-
id = parseInt(id, 10);
|
|
30333
|
-
return stateData[id];
|
|
30334
|
-
}
|
|
30335
|
-
isDev23 && assertTrue(id < stateData.length, `Invalid reference ${id} >= ${stateData.length}`);
|
|
30336
|
-
return stateData[id];
|
|
30337
|
-
}
|
|
30338
|
-
|
|
30339
30494
|
// packages/qwik/src/core/shared/serdes/verify.ts
|
|
30340
30495
|
var verifySerializable = (value, preMessage) => {
|
|
30341
30496
|
const seen = /* @__PURE__ */ new WeakSet();
|
|
@@ -30436,7 +30591,7 @@ var NoSerializeSymbol = /* @__PURE__ */ Symbol("noSerialize");
|
|
|
30436
30591
|
var SerializerSymbol = /* @__PURE__ */ Symbol("serialize");
|
|
30437
30592
|
|
|
30438
30593
|
// packages/qwik/src/core/reactive-primitives/utils.ts
|
|
30439
|
-
import {
|
|
30594
|
+
import { isBrowser as isBrowser4, isDev as isDev26 } from "@qwik.dev/core/build";
|
|
30440
30595
|
var DEBUG8 = false;
|
|
30441
30596
|
var log6 = (...args) => console.log("SIGNAL", ...args.map(qwikDebugToString));
|
|
30442
30597
|
var throwIfQRLNotResolved = (qrl) => {
|
|
@@ -30472,12 +30627,12 @@ var addQrlToSerializationCtx = (effectSubscriber, container) => {
|
|
|
30472
30627
|
}
|
|
30473
30628
|
};
|
|
30474
30629
|
var scheduleEffects = (container, signal, effects) => {
|
|
30475
|
-
const
|
|
30630
|
+
const isRunningOnBrowser = qTest ? !isServerPlatform() : isBrowser4;
|
|
30476
30631
|
if (effects) {
|
|
30477
30632
|
const scheduleEffect = (effectSubscription) => {
|
|
30478
30633
|
const consumer = effectSubscription.consumer;
|
|
30479
30634
|
const property = effectSubscription.property;
|
|
30480
|
-
|
|
30635
|
+
isDev26 && assertDefined(container, "Container must be defined.");
|
|
30481
30636
|
if (isTask(consumer)) {
|
|
30482
30637
|
consumer.$flags$ |= 4 /* DIRTY */;
|
|
30483
30638
|
markVNodeDirty(container, consumer.$el$, 1 /* TASKS */);
|
|
@@ -30486,7 +30641,7 @@ var scheduleEffects = (container, signal, effects) => {
|
|
|
30486
30641
|
} else if (property === ":" /* COMPONENT */) {
|
|
30487
30642
|
markVNodeDirty(container, consumer, 4 /* COMPONENT */);
|
|
30488
30643
|
} else if (property === "." /* VNODE */) {
|
|
30489
|
-
if (
|
|
30644
|
+
if (isRunningOnBrowser) {
|
|
30490
30645
|
setNodeDiffPayload(consumer, signal);
|
|
30491
30646
|
markVNodeDirty(container, consumer, 2 /* NODE_DIFF */);
|
|
30492
30647
|
}
|
|
@@ -30499,7 +30654,7 @@ var scheduleEffects = (container, signal, effects) => {
|
|
|
30499
30654
|
scopedStyleIdPrefix: data.$scopedStyleIdPrefix$,
|
|
30500
30655
|
value: signal
|
|
30501
30656
|
};
|
|
30502
|
-
if (
|
|
30657
|
+
if (isRunningOnBrowser) {
|
|
30503
30658
|
setNodePropData(consumer, property, payload);
|
|
30504
30659
|
} else {
|
|
30505
30660
|
const node = consumer;
|
|
@@ -30661,7 +30816,7 @@ var createFastGetter = (propName) => {
|
|
|
30661
30816
|
|
|
30662
30817
|
// packages/qwik/src/core/client/vnode-utils.ts
|
|
30663
30818
|
var vnode_newElement = (element, elementName, key = null) => {
|
|
30664
|
-
|
|
30819
|
+
isDev27 && assertEqual(fastNodeType(element), 1, "Expecting element node.");
|
|
30665
30820
|
const vnode = new ElementVNode(
|
|
30666
30821
|
key,
|
|
30667
30822
|
1 /* Element */ | 8 /* Inflated */ | -1 << 12 /* shift */,
|
|
@@ -30679,7 +30834,7 @@ var vnode_newElement = (element, elementName, key = null) => {
|
|
|
30679
30834
|
return vnode;
|
|
30680
30835
|
};
|
|
30681
30836
|
var vnode_newUnMaterializedElement = (element) => {
|
|
30682
|
-
|
|
30837
|
+
isDev27 && assertEqual(fastNodeType(element), 1, "Expecting element node.");
|
|
30683
30838
|
const vnode = new ElementVNode(
|
|
30684
30839
|
null,
|
|
30685
30840
|
1 /* Element */ | -1 << 12 /* shift */,
|
|
@@ -30697,7 +30852,7 @@ var vnode_newUnMaterializedElement = (element) => {
|
|
|
30697
30852
|
return vnode;
|
|
30698
30853
|
};
|
|
30699
30854
|
var vnode_newSharedText = (previousTextNode, sharedTextNode, textContent) => {
|
|
30700
|
-
|
|
30855
|
+
isDev27 && sharedTextNode && assertEqual(fastNodeType(sharedTextNode), 3, "Expecting text node.");
|
|
30701
30856
|
const vnode = new TextVNode(
|
|
30702
30857
|
4 /* Text */ | -1 << 12 /* shift */,
|
|
30703
30858
|
// Flag
|
|
@@ -30729,10 +30884,10 @@ var vnode_newText = (textNode, textContent) => {
|
|
|
30729
30884
|
textContent
|
|
30730
30885
|
// Text Content
|
|
30731
30886
|
);
|
|
30732
|
-
|
|
30733
|
-
|
|
30734
|
-
|
|
30735
|
-
|
|
30887
|
+
isDev27 && assertEqual(fastNodeType(textNode), 3, "Expecting text node.");
|
|
30888
|
+
isDev27 && assertFalse(vnode_isElementVNode(vnode), "Incorrect format of TextVNode.");
|
|
30889
|
+
isDev27 && assertTrue(vnode_isTextVNode(vnode), "Incorrect format of TextVNode.");
|
|
30890
|
+
isDev27 && assertFalse(vnode_isVirtualVNode(vnode), "Incorrect format of TextVNode.");
|
|
30736
30891
|
return vnode;
|
|
30737
30892
|
};
|
|
30738
30893
|
var vnode_newVirtual = () => {
|
|
@@ -30747,9 +30902,9 @@ var vnode_newVirtual = () => {
|
|
|
30747
30902
|
null,
|
|
30748
30903
|
null
|
|
30749
30904
|
);
|
|
30750
|
-
|
|
30751
|
-
|
|
30752
|
-
|
|
30905
|
+
isDev27 && assertFalse(vnode_isElementVNode(vnode), "Incorrect format of TextVNode.");
|
|
30906
|
+
isDev27 && assertFalse(vnode_isTextVNode(vnode), "Incorrect format of TextVNode.");
|
|
30907
|
+
isDev27 && assertTrue(vnode_isVirtualVNode(vnode), "Incorrect format of TextVNode.");
|
|
30753
30908
|
return vnode;
|
|
30754
30909
|
};
|
|
30755
30910
|
var vnode_isVNode = (vNode) => {
|
|
@@ -30759,12 +30914,12 @@ var vnode_isElementVNode = (vNode) => {
|
|
|
30759
30914
|
return (vNode.flags & 1 /* Element */) === 1 /* Element */;
|
|
30760
30915
|
};
|
|
30761
30916
|
var vnode_isElementOrTextVNode = (vNode) => {
|
|
30762
|
-
|
|
30917
|
+
isDev27 && assertDefined(vNode, "Missing vNode");
|
|
30763
30918
|
const flag = vNode.flags;
|
|
30764
30919
|
return (flag & 5 /* ELEMENT_OR_TEXT_MASK */) !== 0;
|
|
30765
30920
|
};
|
|
30766
30921
|
var vnode_isMaterialized = (vNode) => {
|
|
30767
|
-
|
|
30922
|
+
isDev27 && assertDefined(vNode, "Missing vNode");
|
|
30768
30923
|
const flag = vNode.flags;
|
|
30769
30924
|
return (flag & 1 /* Element */) === 1 /* Element */ && vNode.firstChild !== void 0 && vNode.lastChild !== void 0;
|
|
30770
30925
|
};
|
|
@@ -30775,26 +30930,26 @@ var vnode_isVirtualVNode = (vNode) => {
|
|
|
30775
30930
|
return (vNode.flags & 2 /* Virtual */) === 2 /* Virtual */;
|
|
30776
30931
|
};
|
|
30777
30932
|
var vnode_isProjection = (vNode) => {
|
|
30778
|
-
|
|
30933
|
+
isDev27 && assertDefined(vNode, "Missing vNode");
|
|
30779
30934
|
const flag = vNode.flags;
|
|
30780
30935
|
return (flag & 2 /* Virtual */) === 2 /* Virtual */ && vnode_getProp(vNode, QSlot, null) !== null;
|
|
30781
30936
|
};
|
|
30782
30937
|
var ensureTextVNode = (vNode) => {
|
|
30783
|
-
|
|
30938
|
+
isDev27 && assertTrue(
|
|
30784
30939
|
vnode_isTextVNode(vNode),
|
|
30785
30940
|
"Expecting TextVNode was: " + vnode_getNodeTypeName(vNode)
|
|
30786
30941
|
);
|
|
30787
30942
|
return vNode;
|
|
30788
30943
|
};
|
|
30789
30944
|
var ensureElementOrVirtualVNode = (vNode) => {
|
|
30790
|
-
|
|
30791
|
-
|
|
30945
|
+
isDev27 && assertDefined(vNode, "Missing vNode");
|
|
30946
|
+
isDev27 && assertTrue(
|
|
30792
30947
|
(vNode.flags & 3 /* ELEMENT_OR_VIRTUAL_MASK */) !== 0,
|
|
30793
30948
|
"Expecting ElementVNode or VirtualVNode was: " + vnode_getNodeTypeName(vNode)
|
|
30794
30949
|
);
|
|
30795
30950
|
};
|
|
30796
30951
|
var ensureElementVNode = (vNode) => {
|
|
30797
|
-
|
|
30952
|
+
isDev27 && assertTrue(
|
|
30798
30953
|
vnode_isElementVNode(vNode),
|
|
30799
30954
|
"Expecting ElementVNode was: " + vnode_getNodeTypeName(vNode)
|
|
30800
30955
|
);
|
|
@@ -30836,7 +30991,7 @@ var vnode_setProp = (vNode, key, value) => {
|
|
|
30836
30991
|
};
|
|
30837
30992
|
var vnode_setAttr = (journal, vNode, key, value, scopedStyleIdPrefix = null) => {
|
|
30838
30993
|
if (vnode_isElementVNode(vNode)) {
|
|
30839
|
-
|
|
30994
|
+
qTest && scopedStyleIdPrefix && vnode_setProp(vNode, debugStyleScopeIdPrefixAttr, scopedStyleIdPrefix);
|
|
30840
30995
|
vnode_setProp(vNode, key, value);
|
|
30841
30996
|
addVNodeOperation(
|
|
30842
30997
|
journal,
|
|
@@ -31035,7 +31190,7 @@ var vnode_ensureTextInflated = (journal, vnode) => {
|
|
|
31035
31190
|
const flags = textVNode.flags;
|
|
31036
31191
|
if ((flags & 8 /* Inflated */) === 0) {
|
|
31037
31192
|
const parentNode = vnode_getDomParent(vnode, true);
|
|
31038
|
-
|
|
31193
|
+
isDev27 && assertDefined(parentNode, "Missing parent node.");
|
|
31039
31194
|
const sharedTextNode = textVNode.node;
|
|
31040
31195
|
const doc = fastOwnerDocument(parentNode);
|
|
31041
31196
|
let vCursor = vnode_getDomSibling(vnode, false, true);
|
|
@@ -31084,7 +31239,7 @@ var vnode_locate = (rootVNode, id) => {
|
|
|
31084
31239
|
let elementOffset = -1;
|
|
31085
31240
|
let refElement;
|
|
31086
31241
|
if (typeof id === "string") {
|
|
31087
|
-
|
|
31242
|
+
isDev27 && assertDefined(qVNodeRefs, "Missing qVNodeRefs.");
|
|
31088
31243
|
elementOffset = parseInt(id);
|
|
31089
31244
|
refElement = qVNodeRefs.get(elementOffset);
|
|
31090
31245
|
} else {
|
|
@@ -31094,9 +31249,9 @@ var vnode_locate = (rootVNode, id) => {
|
|
|
31094
31249
|
return vNode2;
|
|
31095
31250
|
}
|
|
31096
31251
|
}
|
|
31097
|
-
|
|
31252
|
+
isDev27 && assertDefined(refElement, "Missing refElement.");
|
|
31098
31253
|
if (!vnode_isVNode(refElement)) {
|
|
31099
|
-
|
|
31254
|
+
isDev27 && assertTrue(
|
|
31100
31255
|
containerElement2.contains(refElement),
|
|
31101
31256
|
`Couldn't find the element inside the container while locating the VNode.`
|
|
31102
31257
|
);
|
|
@@ -31140,10 +31295,10 @@ var vnode_locate = (rootVNode, id) => {
|
|
|
31140
31295
|
};
|
|
31141
31296
|
var vnode_getChildWithIdx = (vNode, childIdx) => {
|
|
31142
31297
|
let child = vnode_getFirstChild(vNode);
|
|
31143
|
-
|
|
31298
|
+
isDev27 && assertDefined(child, "Missing child.");
|
|
31144
31299
|
while (child.flags >>> 12 /* shift */ !== childIdx) {
|
|
31145
31300
|
child = child.nextSibling;
|
|
31146
|
-
|
|
31301
|
+
isDev27 && assertDefined(child, "Missing child.");
|
|
31147
31302
|
}
|
|
31148
31303
|
return child;
|
|
31149
31304
|
};
|
|
@@ -31151,7 +31306,7 @@ var vNodeStack = [];
|
|
|
31151
31306
|
var vnode_getVNodeForChildNode = (vNode, childElement) => {
|
|
31152
31307
|
ensureElementVNode(vNode);
|
|
31153
31308
|
let child = vnode_getFirstChild(vNode);
|
|
31154
|
-
|
|
31309
|
+
isDev27 && assertDefined(child, "Missing child.");
|
|
31155
31310
|
while (child && (child instanceof ElementVNode ? child.node !== childElement : true)) {
|
|
31156
31311
|
if (vnode_isVirtualVNode(child)) {
|
|
31157
31312
|
const next = child.nextSibling;
|
|
@@ -31170,13 +31325,13 @@ var vnode_getVNodeForChildNode = (vNode, childElement) => {
|
|
|
31170
31325
|
child = next || vNodeStack.pop();
|
|
31171
31326
|
}
|
|
31172
31327
|
}
|
|
31173
|
-
|
|
31328
|
+
isDev27 && assertDefined(child, "Missing child.");
|
|
31174
31329
|
}
|
|
31175
31330
|
while (vNodeStack.length) {
|
|
31176
31331
|
vNodeStack.pop();
|
|
31177
31332
|
}
|
|
31178
31333
|
ensureElementVNode(child);
|
|
31179
|
-
|
|
31334
|
+
isDev27 && assertEqual(child.node, childElement, "Child not found.");
|
|
31180
31335
|
return child;
|
|
31181
31336
|
};
|
|
31182
31337
|
var indexOfAlphanumeric = (id, length) => {
|
|
@@ -31433,7 +31588,7 @@ var vnode_getDomParentVNode = (vnode, includeProjection) => {
|
|
|
31433
31588
|
return vnode;
|
|
31434
31589
|
};
|
|
31435
31590
|
var vnode_remove = (journal, vParent, vToRemove, removeDOM) => {
|
|
31436
|
-
|
|
31591
|
+
isDev27 && assertEqual(vParent, vToRemove.parent, "Parent mismatch.");
|
|
31437
31592
|
if (vnode_isTextVNode(vToRemove)) {
|
|
31438
31593
|
vnode_ensureTextInflated(journal, vToRemove);
|
|
31439
31594
|
}
|
|
@@ -31466,7 +31621,7 @@ var vnode_remove = (journal, vParent, vToRemove, removeDOM) => {
|
|
|
31466
31621
|
vToRemove.nextSibling = null;
|
|
31467
31622
|
};
|
|
31468
31623
|
var vnode_truncate = (journal, vParent, vDelete, removeDOM = true) => {
|
|
31469
|
-
|
|
31624
|
+
isDev27 && assertDefined(vDelete, "Missing vDelete.");
|
|
31470
31625
|
const parent = vnode_getDomParent(vParent, true);
|
|
31471
31626
|
if (parent && removeDOM) {
|
|
31472
31627
|
if (vnode_isElementOrTextVNode(vParent)) {
|
|
@@ -31565,8 +31720,8 @@ var ensureMaterialized = (vnode) => {
|
|
|
31565
31720
|
vFirstChild = vnode_materialize(vParent);
|
|
31566
31721
|
}
|
|
31567
31722
|
}
|
|
31568
|
-
|
|
31569
|
-
|
|
31723
|
+
isDev27 && assertTrue(vParent.firstChild !== void 0, "Did not materialize.");
|
|
31724
|
+
isDev27 && assertTrue(vParent.lastChild !== void 0, "Did not materialize.");
|
|
31570
31725
|
return vFirstChild;
|
|
31571
31726
|
};
|
|
31572
31727
|
var _fastHasAttribute = null;
|
|
@@ -31733,7 +31888,7 @@ var materializeFromDOM = (vParent, firstChild, vData) => {
|
|
|
31733
31888
|
}
|
|
31734
31889
|
const id = consumeValue();
|
|
31735
31890
|
container.$setRawState$(parseInt(id), vParent);
|
|
31736
|
-
|
|
31891
|
+
isDev27 && vnode_setProp(vParent, ELEMENT_ID, id);
|
|
31737
31892
|
} else if (peek() === VNodeDataChar.BACK_REFS) {
|
|
31738
31893
|
if (!container) {
|
|
31739
31894
|
container = getDomContainer(vParent.node);
|
|
@@ -32014,7 +32169,7 @@ function materializeFromVNodeData(vParent, vData, element, child) {
|
|
|
32014
32169
|
}
|
|
32015
32170
|
const id = consumeValue();
|
|
32016
32171
|
container.$setRawState$(parseInt(id), vParent);
|
|
32017
|
-
|
|
32172
|
+
isDev27 && vnode_setProp(vParent, ELEMENT_ID, id);
|
|
32018
32173
|
} else if (peek() === VNodeDataChar.PROPS) {
|
|
32019
32174
|
vnode_setProp(vParent, ELEMENT_PROPS, consumeValue());
|
|
32020
32175
|
} else if (peek() === VNodeDataChar.KEY) {
|
|
@@ -33474,10 +33629,8 @@ import { _dumpState, _preprocessState as preprocessState2 } from "@qwik.dev/core
|
|
|
33474
33629
|
import { useContextProvider } from "../core.mjs";
|
|
33475
33630
|
|
|
33476
33631
|
// packages/qwik/src/core/preloader/bundle-graph.ts
|
|
33477
|
-
import { isServer as isServer13 } from "@qwik.dev/core/build";
|
|
33478
33632
|
var base;
|
|
33479
33633
|
var graph;
|
|
33480
|
-
var isBrowser4 = import.meta.env.TEST ? !isServerPlatform() : !isServer13;
|
|
33481
33634
|
var parseBundleGraph = (serialized) => {
|
|
33482
33635
|
const graph2 = /* @__PURE__ */ new Map();
|
|
33483
33636
|
let i = 0;
|
|
@@ -33510,9 +33663,12 @@ var initPreloader = (serializedBundleGraph) => {
|
|
|
33510
33663
|
graph = parseBundleGraph(serializedBundleGraph);
|
|
33511
33664
|
};
|
|
33512
33665
|
|
|
33666
|
+
// packages/qwik/src/server/ssr-render.ts
|
|
33667
|
+
import { getClientManifest } from "../core.mjs";
|
|
33668
|
+
|
|
33513
33669
|
// packages/qwik/src/server/platform.ts
|
|
33514
33670
|
import { setPlatform } from "../core.mjs";
|
|
33515
|
-
import { isDev as
|
|
33671
|
+
import { isDev as isDev28 } from "@qwik.dev/core/build";
|
|
33516
33672
|
var getDevSegmentPath = (mapper, hash2, symbolName, parent) => {
|
|
33517
33673
|
const existing = mapper?.[hash2];
|
|
33518
33674
|
if (existing) {
|
|
@@ -33523,20 +33679,20 @@ var getDevSegmentPath = (mapper, hash2, symbolName, parent) => {
|
|
|
33523
33679
|
}
|
|
33524
33680
|
if (!parent) {
|
|
33525
33681
|
if (symbolName.startsWith("_") && symbolName.length < 6) {
|
|
33526
|
-
return [symbolName, `${import.meta.env
|
|
33682
|
+
return [symbolName, `${import.meta.env?.BASE_URL}@qwik-handlers`];
|
|
33527
33683
|
}
|
|
33528
33684
|
console.error("qwik symbolMapper: unknown qrl requested without parent:", symbolName);
|
|
33529
|
-
return [symbolName, `${import.meta.env
|
|
33685
|
+
return [symbolName, `${import.meta.env?.BASE_URL}${symbolName}.js`];
|
|
33530
33686
|
}
|
|
33531
|
-
const qrlFile = `${import.meta.env
|
|
33687
|
+
const qrlFile = `${import.meta.env?.BASE_URL}${parent.startsWith("/") ? parent.slice(1) : parent}_${symbolName}.js`;
|
|
33532
33688
|
return [symbolName, qrlFile];
|
|
33533
33689
|
};
|
|
33534
33690
|
function createPlatform3(opts, resolvedManifest) {
|
|
33535
33691
|
const mapper = resolvedManifest?.mapper;
|
|
33536
33692
|
const mapperFn = opts.symbolMapper ? opts.symbolMapper : (symbolName, _chunk, parent) => {
|
|
33537
|
-
if (mapper ||
|
|
33693
|
+
if (mapper || isDev28 && import.meta.env?.MODE !== "test") {
|
|
33538
33694
|
const hash2 = getSymbolHash2(symbolName);
|
|
33539
|
-
const result = !
|
|
33695
|
+
const result = !isDev28 ? mapper[hash2] : getDevSegmentPath(mapper, hash2, symbolName, parent);
|
|
33540
33696
|
if (!result) {
|
|
33541
33697
|
if (hash2 === SYNC_QRL) {
|
|
33542
33698
|
return [hash2, ""];
|
|
@@ -33582,38 +33738,8 @@ var getSymbolHash2 = (symbolName) => {
|
|
|
33582
33738
|
return symbolName;
|
|
33583
33739
|
};
|
|
33584
33740
|
|
|
33585
|
-
// packages/qwik/src/server/utils.ts
|
|
33586
|
-
function createTimer() {
|
|
33587
|
-
if (typeof performance === "undefined") {
|
|
33588
|
-
return () => 0;
|
|
33589
|
-
}
|
|
33590
|
-
const start = performance.now();
|
|
33591
|
-
return () => {
|
|
33592
|
-
const end = performance.now();
|
|
33593
|
-
const delta = end - start;
|
|
33594
|
-
return delta / 1e6;
|
|
33595
|
-
};
|
|
33596
|
-
}
|
|
33597
|
-
function getBuildBase(opts) {
|
|
33598
|
-
let base2 = opts.base;
|
|
33599
|
-
if (typeof opts.base === "function") {
|
|
33600
|
-
base2 = opts.base(opts);
|
|
33601
|
-
}
|
|
33602
|
-
if (typeof base2 === "string") {
|
|
33603
|
-
if (!base2.endsWith("/")) {
|
|
33604
|
-
base2 += "/";
|
|
33605
|
-
}
|
|
33606
|
-
return base2;
|
|
33607
|
-
}
|
|
33608
|
-
return `${import.meta.env.BASE_URL || "/"}build/`;
|
|
33609
|
-
}
|
|
33610
|
-
var versions = {
|
|
33611
|
-
qwik: globalThis.QWIK_VERSION,
|
|
33612
|
-
qwikDom: globalThis.QWIK_DOM_VERSION
|
|
33613
|
-
};
|
|
33614
|
-
|
|
33615
33741
|
// packages/qwik/src/server/ssr-container.ts
|
|
33616
|
-
import { isDev as
|
|
33742
|
+
import { isDev as isDev30 } from "@qwik.dev/core/build";
|
|
33617
33743
|
import {
|
|
33618
33744
|
_SubscriptionData as SubscriptionData2,
|
|
33619
33745
|
_SharedContainer as _SharedContainer2,
|
|
@@ -33646,8 +33772,8 @@ var simplifyPath = (base2, path) => {
|
|
|
33646
33772
|
};
|
|
33647
33773
|
var getBase = (container) => {
|
|
33648
33774
|
let base2 = container.$buildBase$;
|
|
33649
|
-
if (import.meta.env
|
|
33650
|
-
base2 = import.meta.env
|
|
33775
|
+
if (import.meta.env?.DEV && !qTest) {
|
|
33776
|
+
base2 = import.meta.env?.BASE_URL;
|
|
33651
33777
|
}
|
|
33652
33778
|
return base2;
|
|
33653
33779
|
};
|
|
@@ -33657,9 +33783,9 @@ var preloaderPre = (container, options, nonce) => {
|
|
|
33657
33783
|
const preloaderBundle = simplifyPath(base2, resolvedManifest?.manifest?.preloader);
|
|
33658
33784
|
let bundleGraphPath = resolvedManifest?.manifest.bundleGraphAsset;
|
|
33659
33785
|
if (bundleGraphPath) {
|
|
33660
|
-
bundleGraphPath = (import.meta.env
|
|
33786
|
+
bundleGraphPath = (import.meta.env?.BASE_URL || "/") + bundleGraphPath;
|
|
33661
33787
|
}
|
|
33662
|
-
if (preloaderBundle && bundleGraphPath && options !== false) {
|
|
33788
|
+
if (!(import.meta.env?.DEV && !qTest) && preloaderBundle && bundleGraphPath && options !== false) {
|
|
33663
33789
|
const bundleGraph = container.resolvedManifest?.manifest.bundleGraph;
|
|
33664
33790
|
initPreloader(bundleGraph);
|
|
33665
33791
|
const opts = [];
|
|
@@ -33760,6 +33886,9 @@ var includePreloader = (container, options, referencedBundles, nonce) => {
|
|
|
33760
33886
|
return null;
|
|
33761
33887
|
};
|
|
33762
33888
|
var preloaderPost = (ssrContainer, opts, nonce) => {
|
|
33889
|
+
if (import.meta.env?.DEV && !qTest) {
|
|
33890
|
+
return;
|
|
33891
|
+
}
|
|
33763
33892
|
if (opts.preloader !== false) {
|
|
33764
33893
|
const qrls = Array.from(ssrContainer.serializationCtx.$eventQrls$);
|
|
33765
33894
|
const preloadBundles = getBundles(qrls);
|
|
@@ -33807,7 +33936,7 @@ import {
|
|
|
33807
33936
|
_EMPTY_OBJ,
|
|
33808
33937
|
_EFFECT_BACK_REF as _EFFECT_BACK_REF2
|
|
33809
33938
|
} from "@qwik.dev/core/internal";
|
|
33810
|
-
import { isDev as
|
|
33939
|
+
import { isDev as isDev29 } from "@qwik.dev/core/build";
|
|
33811
33940
|
var SsrNode = class {
|
|
33812
33941
|
constructor(parentComponent, id, attributesIndex, cleanupQueue, vnodeData, currentFile) {
|
|
33813
33942
|
this.parentComponent = parentComponent;
|
|
@@ -33832,7 +33961,7 @@ var SsrNode = class {
|
|
|
33832
33961
|
this.flags = 1 /* Updatable */;
|
|
33833
33962
|
this.attrs = this.attributesIndex >= 0 ? this.vnodeData[this.attributesIndex] : _EMPTY_OBJ;
|
|
33834
33963
|
this.parentComponent?.addChild(this);
|
|
33835
|
-
if (
|
|
33964
|
+
if (isDev29 && id.indexOf("undefined") != -1) {
|
|
33836
33965
|
throw new Error(`Invalid SSR node id: ${id}`);
|
|
33837
33966
|
}
|
|
33838
33967
|
}
|
|
@@ -33897,7 +34026,7 @@ var SsrNode = class {
|
|
|
33897
34026
|
}
|
|
33898
34027
|
}
|
|
33899
34028
|
toString() {
|
|
33900
|
-
if (
|
|
34029
|
+
if (isDev29) {
|
|
33901
34030
|
let stringifiedAttrs = "";
|
|
33902
34031
|
for (const key in this.attrs) {
|
|
33903
34032
|
const value = this.attrs[key];
|
|
@@ -33980,6 +34109,36 @@ var SsrComponentFrame = class {
|
|
|
33980
34109
|
}
|
|
33981
34110
|
};
|
|
33982
34111
|
|
|
34112
|
+
// packages/qwik/src/server/utils.ts
|
|
34113
|
+
function createTimer() {
|
|
34114
|
+
if (typeof performance === "undefined") {
|
|
34115
|
+
return () => 0;
|
|
34116
|
+
}
|
|
34117
|
+
const start = performance.now();
|
|
34118
|
+
return () => {
|
|
34119
|
+
const end = performance.now();
|
|
34120
|
+
const delta = end - start;
|
|
34121
|
+
return delta / 1e6;
|
|
34122
|
+
};
|
|
34123
|
+
}
|
|
34124
|
+
function getBuildBase(opts) {
|
|
34125
|
+
let base2 = opts.base;
|
|
34126
|
+
if (typeof opts.base === "function") {
|
|
34127
|
+
base2 = opts.base(opts);
|
|
34128
|
+
}
|
|
34129
|
+
if (typeof base2 === "string") {
|
|
34130
|
+
if (!base2.endsWith("/")) {
|
|
34131
|
+
base2 += "/";
|
|
34132
|
+
}
|
|
34133
|
+
return base2;
|
|
34134
|
+
}
|
|
34135
|
+
return `${import.meta.env?.BASE_URL || "/"}build/`;
|
|
34136
|
+
}
|
|
34137
|
+
var versions = {
|
|
34138
|
+
qwik: globalThis.QWIK_VERSION,
|
|
34139
|
+
qwikDom: globalThis.QWIK_DOM_VERSION
|
|
34140
|
+
};
|
|
34141
|
+
|
|
33983
34142
|
// packages/qwik/src/server/vnode-data.ts
|
|
33984
34143
|
var OPEN_FRAGMENT = Number.MAX_SAFE_INTEGER;
|
|
33985
34144
|
var CLOSE_FRAGMENT = Number.MAX_SAFE_INTEGER - 1;
|
|
@@ -34267,7 +34426,7 @@ var SSRContainer = class extends _SharedContainer2 {
|
|
|
34267
34426
|
containerAttributes[QContainerAttr] = "paused" /* PAUSED */;
|
|
34268
34427
|
containerAttributes[QRuntimeAttr] = "2";
|
|
34269
34428
|
containerAttributes[QVersionAttr] = this.$version$ ?? "dev";
|
|
34270
|
-
containerAttributes[QRenderAttr] = (qRender ? qRender + "-" : "") + (
|
|
34429
|
+
containerAttributes[QRenderAttr] = (qRender ? qRender + "-" : "") + (isDev30 ? "ssr-dev" : "ssr");
|
|
34271
34430
|
containerAttributes[QBaseAttr] = this.$buildBase$ || "";
|
|
34272
34431
|
containerAttributes[QLocaleAttr] = this.$locale$;
|
|
34273
34432
|
containerAttributes[QManifestHashAttr] = this.resolvedManifest.manifest.manifestHash;
|
|
@@ -34323,7 +34482,7 @@ var SSRContainer = class extends _SharedContainer2 {
|
|
|
34323
34482
|
this.write(" " + Q_PROPS_SEPARATOR);
|
|
34324
34483
|
if (key !== null) {
|
|
34325
34484
|
this.write(`="${key}"`);
|
|
34326
|
-
} else if (
|
|
34485
|
+
} else if (qTest) {
|
|
34327
34486
|
this.write(EMPTY_ATTR);
|
|
34328
34487
|
}
|
|
34329
34488
|
if (constAttrs && !isObjectEmpty(constAttrs)) {
|
|
@@ -34455,7 +34614,7 @@ var SSRContainer = class extends _SharedContainer2 {
|
|
|
34455
34614
|
const slotName = componentFrame.slots[i];
|
|
34456
34615
|
const children = componentFrame.slots[i + 1];
|
|
34457
34616
|
this.openFragment(
|
|
34458
|
-
|
|
34617
|
+
isDev30 ? { [DEBUG_TYPE]: "P" /* Projection */, [QSlotParent]: componentFrame.componentNode.id } : { [QSlotParent]: componentFrame.componentNode.id }
|
|
34459
34618
|
);
|
|
34460
34619
|
const lastNode = this.getOrCreateLastNode();
|
|
34461
34620
|
if (lastNode.vnodeData) {
|
|
@@ -34558,7 +34717,9 @@ var SSRContainer = class extends _SharedContainer2 {
|
|
|
34558
34717
|
() => maybeThen(this.emitStateData(), () => {
|
|
34559
34718
|
this.$noMoreRoots$ = true;
|
|
34560
34719
|
this.emitVNodeData();
|
|
34561
|
-
|
|
34720
|
+
if (!isDev30) {
|
|
34721
|
+
preloaderPost(this, this.renderOptions, this.$serverData$?.nonce);
|
|
34722
|
+
}
|
|
34562
34723
|
this.emitSyncFnsData();
|
|
34563
34724
|
this.emitPatchDataIfNeeded();
|
|
34564
34725
|
this.emitExecutorIfNeeded();
|
|
@@ -34777,12 +34938,14 @@ var SSRContainer = class extends _SharedContainer2 {
|
|
|
34777
34938
|
scriptAttrs["nonce"] = this.renderOptions.serverData.nonce;
|
|
34778
34939
|
}
|
|
34779
34940
|
this.openElement("script", null, scriptAttrs);
|
|
34780
|
-
const backpatchScript = getQwikBackpatchExecutorScript({ debug:
|
|
34941
|
+
const backpatchScript = getQwikBackpatchExecutorScript({ debug: isDev30 });
|
|
34781
34942
|
this.write(backpatchScript);
|
|
34782
34943
|
this.closeElement();
|
|
34783
34944
|
}
|
|
34784
34945
|
emitPreloaderPre() {
|
|
34785
|
-
|
|
34946
|
+
if (!isDev30) {
|
|
34947
|
+
preloaderPre(this, this.renderOptions.preloader, this.renderOptions.serverData?.nonce);
|
|
34948
|
+
}
|
|
34786
34949
|
}
|
|
34787
34950
|
isStatic() {
|
|
34788
34951
|
return this.serializationCtx.$eventQrls$.size === 0;
|
|
@@ -34875,7 +35038,7 @@ var SSRContainer = class extends _SharedContainer2 {
|
|
|
34875
35038
|
}
|
|
34876
35039
|
createAndPushFrame(elementName, depthFirstElementIdx, currentFile) {
|
|
34877
35040
|
let tagNesting = 10 /* ANYTHING */;
|
|
34878
|
-
if (
|
|
35041
|
+
if (isDev30) {
|
|
34879
35042
|
if (!this.currentElementFrame) {
|
|
34880
35043
|
tagNesting = initialTag(elementName);
|
|
34881
35044
|
} else {
|
|
@@ -34922,7 +35085,7 @@ var SSRContainer = class extends _SharedContainer2 {
|
|
|
34922
35085
|
elementName,
|
|
34923
35086
|
depthFirstElementIdx,
|
|
34924
35087
|
vNodeData: [0 /* NONE */],
|
|
34925
|
-
currentFile:
|
|
35088
|
+
currentFile: isDev30 ? currentFile || null : null
|
|
34926
35089
|
};
|
|
34927
35090
|
this.currentElementFrame = frame;
|
|
34928
35091
|
this.vNodeDatas.push(frame.vNodeData);
|
|
@@ -34951,7 +35114,7 @@ var SSRContainer = class extends _SharedContainer2 {
|
|
|
34951
35114
|
for (let key in attrs) {
|
|
34952
35115
|
let value = attrs[key];
|
|
34953
35116
|
if (isSSRUnsafeAttr(key)) {
|
|
34954
|
-
if (
|
|
35117
|
+
if (isDev30) {
|
|
34955
35118
|
throw qError(32 /* unsafeAttr */, [key]);
|
|
34956
35119
|
}
|
|
34957
35120
|
continue;
|
|
@@ -35006,7 +35169,7 @@ var SSRContainer = class extends _SharedContainer2 {
|
|
|
35006
35169
|
}
|
|
35007
35170
|
if (tag === "textarea" && key === "value") {
|
|
35008
35171
|
if (value && typeof value !== "string") {
|
|
35009
|
-
if (
|
|
35172
|
+
if (isDev30) {
|
|
35010
35173
|
throw qError(23 /* wrongTextareaValue */, [currentFile, value]);
|
|
35011
35174
|
}
|
|
35012
35175
|
continue;
|
|
@@ -35071,9 +35234,6 @@ function addPreventDefaultEventToSerializationContext(serializationCtx, key) {
|
|
|
35071
35234
|
}
|
|
35072
35235
|
}
|
|
35073
35236
|
|
|
35074
|
-
// packages/qwik/src/server/ssr-render.ts
|
|
35075
|
-
import { manifest as builtManifest } from "@qwik-client-manifest";
|
|
35076
|
-
|
|
35077
35237
|
// packages/qwik/src/server/ssr-stream-handler.ts
|
|
35078
35238
|
var StreamHandler = class {
|
|
35079
35239
|
constructor(opts, timing) {
|
|
@@ -35285,6 +35445,7 @@ var renderToStream = async (jsx2, opts) => {
|
|
|
35285
35445
|
return result;
|
|
35286
35446
|
};
|
|
35287
35447
|
function resolveManifest(manifest) {
|
|
35448
|
+
const builtManifest = getClientManifest();
|
|
35288
35449
|
const mergedManifest = manifest ? { ...builtManifest, ...manifest } : builtManifest;
|
|
35289
35450
|
if (!mergedManifest || "mapper" in mergedManifest) {
|
|
35290
35451
|
return mergedManifest;
|