@qwik.dev/core 2.0.0-alpha.5 → 2.0.0-alpha.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bindings/qwik.darwin-arm64.node +0 -0
- package/bindings/qwik.darwin-x64.node +0 -0
- package/bindings/qwik.linux-x64-gnu.node +0 -0
- package/bindings/qwik.win32-x64-msvc.node +0 -0
- package/bindings/qwik_wasm_bg.wasm +0 -0
- package/dist/build/package.json +1 -1
- package/dist/cli.cjs +2 -23
- package/dist/core-internal.d.ts +2 -2
- package/dist/core.cjs +268 -190
- package/dist/core.cjs.map +1 -1
- package/dist/core.min.mjs +1 -1
- package/dist/core.mjs +268 -190
- package/dist/core.mjs.map +1 -1
- package/dist/core.prod.cjs +119 -84
- package/dist/core.prod.mjs +206 -167
- package/dist/insights/index.qwik.cjs +8 -8
- package/dist/insights/index.qwik.mjs +8 -8
- package/dist/loader/package.json +1 -1
- package/dist/optimizer.cjs +170 -127
- package/dist/optimizer.mjs +222 -176
- package/dist/prefetch/package.json +1 -1
- package/dist/server.cjs +222 -170
- package/dist/server.mjs +222 -170
- package/dist/starters/features/turso/src/utils/turso.ts +1 -1
- package/dist/testing/index.cjs +220 -168
- package/dist/testing/index.mjs +220 -168
- package/dist/testing/package.json +1 -1
- package/package.json +3 -3
package/dist/testing/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* @qwik.dev/core/testing 2.0.0-alpha.
|
|
3
|
+
* @qwik.dev/core/testing 2.0.0-alpha.6-dev+d848ba5
|
|
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
|
|
@@ -22335,8 +22335,6 @@ See https://qwik.dev/docs/components/tasks/#use-method-rules`,
|
|
|
22335
22335
|
// 43
|
|
22336
22336
|
"Materialize error: missing element: {{0}} {{1}} {{2}}",
|
|
22337
22337
|
// 44
|
|
22338
|
-
"SsrError: {{0}}",
|
|
22339
|
-
// 45
|
|
22340
22338
|
"Cannot coerce a Signal, use `.value` instead",
|
|
22341
22339
|
// 46
|
|
22342
22340
|
"useComputedSignal$ QRL {{0}} {{1}} returned a Promise",
|
|
@@ -22372,6 +22370,106 @@ var qError = (code2, errorMessageArgs = []) => {
|
|
|
22372
22370
|
|
|
22373
22371
|
// packages/qwik/src/core/shared/platform/platform.ts
|
|
22374
22372
|
var import_build = require("@qwik.dev/core/build");
|
|
22373
|
+
|
|
22374
|
+
// packages/qwik/src/core/shared/types.ts
|
|
22375
|
+
var DEBUG_TYPE = "q:type";
|
|
22376
|
+
var START = "\x1B[34m";
|
|
22377
|
+
var END = "\x1B[0m";
|
|
22378
|
+
var VirtualTypeName = {
|
|
22379
|
+
["V" /* Virtual */]: (
|
|
22380
|
+
/* ********* */
|
|
22381
|
+
START + "Virtual" + END
|
|
22382
|
+
),
|
|
22383
|
+
//
|
|
22384
|
+
["F" /* Fragment */]: (
|
|
22385
|
+
/* ******** */
|
|
22386
|
+
START + "Fragment" + END
|
|
22387
|
+
),
|
|
22388
|
+
//
|
|
22389
|
+
["S" /* WrappedSignal */]: (
|
|
22390
|
+
/* *** */
|
|
22391
|
+
START + "Signal" + END
|
|
22392
|
+
),
|
|
22393
|
+
//
|
|
22394
|
+
["A" /* Awaited */]: (
|
|
22395
|
+
/* ********* */
|
|
22396
|
+
START + "Awaited" + END
|
|
22397
|
+
),
|
|
22398
|
+
//
|
|
22399
|
+
["C" /* Component */]: (
|
|
22400
|
+
/* ******* */
|
|
22401
|
+
START + "Component" + END
|
|
22402
|
+
),
|
|
22403
|
+
//
|
|
22404
|
+
["I" /* InlineComponent */]: (
|
|
22405
|
+
/* * */
|
|
22406
|
+
START + "InlineComponent" + END
|
|
22407
|
+
),
|
|
22408
|
+
//
|
|
22409
|
+
["P" /* Projection */]: (
|
|
22410
|
+
/* ****** */
|
|
22411
|
+
START + "Projection" + END
|
|
22412
|
+
)
|
|
22413
|
+
//
|
|
22414
|
+
};
|
|
22415
|
+
|
|
22416
|
+
// packages/qwik/src/core/shared/utils/markers.ts
|
|
22417
|
+
var OnRenderProp = "q:renderFn";
|
|
22418
|
+
var ComponentStylesPrefixContent = "\u2B50\uFE0F";
|
|
22419
|
+
var QSlot = "q:slot";
|
|
22420
|
+
var QSlotParent = ":";
|
|
22421
|
+
var QSlotRef = "q:sref";
|
|
22422
|
+
var QSlotS = "q:s";
|
|
22423
|
+
var QStyle = "q:style";
|
|
22424
|
+
var QStyleSelector = "style[q\\:style]";
|
|
22425
|
+
var QStyleSSelector = "style[q\\:sstyle]";
|
|
22426
|
+
var QStylesAllSelector = QStyleSelector + "," + QStyleSSelector;
|
|
22427
|
+
var QScopedStyle = "q:sstyle";
|
|
22428
|
+
var QCtxAttr = "q:ctx";
|
|
22429
|
+
var QSubscribers = "q:subs";
|
|
22430
|
+
var QFuncsPrefix = "qFuncs_";
|
|
22431
|
+
var getQFuncs = (document2, hash3) => {
|
|
22432
|
+
return document2[QFuncsPrefix + hash3] || [];
|
|
22433
|
+
};
|
|
22434
|
+
var QRenderAttr = "q:render";
|
|
22435
|
+
var QRuntimeAttr = "q:runtime";
|
|
22436
|
+
var QVersionAttr = "q:version";
|
|
22437
|
+
var QBaseAttr = "q:base";
|
|
22438
|
+
var QLocaleAttr = "q:locale";
|
|
22439
|
+
var QManifestHashAttr = "q:manifest-hash";
|
|
22440
|
+
var QInstanceAttr = "q:instance";
|
|
22441
|
+
var QContainerIsland = "q:container-island";
|
|
22442
|
+
var QContainerIslandEnd = "/" + QContainerIsland;
|
|
22443
|
+
var QIgnore = "q:ignore";
|
|
22444
|
+
var QIgnoreEnd = "/" + QIgnore;
|
|
22445
|
+
var QContainerAttr = "q:container";
|
|
22446
|
+
var QContainerAttrEnd = "/" + QContainerAttr;
|
|
22447
|
+
var QTemplate = "q:template";
|
|
22448
|
+
var QContainerSelector = "[q\\:container]:not([q\\:container=" + "html" /* HTML */ + "]):not([q\\:container=" + "text" /* TEXT */ + "])";
|
|
22449
|
+
var HTML_NS = "http://www.w3.org/1999/xhtml";
|
|
22450
|
+
var SVG_NS = "http://www.w3.org/2000/svg";
|
|
22451
|
+
var MATH_NS = "http://www.w3.org/1998/Math/MathML";
|
|
22452
|
+
var ResourceEvent = "qResource";
|
|
22453
|
+
var RenderEvent = "qRender";
|
|
22454
|
+
var TaskEvent = "qTask";
|
|
22455
|
+
var QDefaultSlot = "";
|
|
22456
|
+
var ELEMENT_ID = "q:id";
|
|
22457
|
+
var ELEMENT_KEY = "q:key";
|
|
22458
|
+
var ELEMENT_PROPS = "q:props";
|
|
22459
|
+
var ELEMENT_SEQ = "q:seq";
|
|
22460
|
+
var ELEMENT_SEQ_IDX = "q:seqIdx";
|
|
22461
|
+
var Q_PREFIX = "q:";
|
|
22462
|
+
var NON_SERIALIZABLE_MARKER_PREFIX = ":";
|
|
22463
|
+
var USE_ON_LOCAL = NON_SERIALIZABLE_MARKER_PREFIX + "on";
|
|
22464
|
+
var USE_ON_LOCAL_SEQ_IDX = NON_SERIALIZABLE_MARKER_PREFIX + "onIdx";
|
|
22465
|
+
var USE_ON_LOCAL_FLAGS = NON_SERIALIZABLE_MARKER_PREFIX + "onFlags";
|
|
22466
|
+
var FLUSH_COMMENT = "qkssr-f";
|
|
22467
|
+
var STREAM_BLOCK_START_COMMENT = "qkssr-pu";
|
|
22468
|
+
var STREAM_BLOCK_END_COMMENT = "qkssr-po";
|
|
22469
|
+
var Q_PROPS_SEPARATOR = ":";
|
|
22470
|
+
var dangerouslySetInnerHTML = "dangerouslySetInnerHTML";
|
|
22471
|
+
|
|
22472
|
+
// packages/qwik/src/core/shared/platform/platform.ts
|
|
22375
22473
|
var createPlatform = () => {
|
|
22376
22474
|
return {
|
|
22377
22475
|
isServer: import_build.isServer,
|
|
@@ -22422,7 +22520,7 @@ var createPlatform = () => {
|
|
|
22422
22520
|
};
|
|
22423
22521
|
var toUrl = (doc, containerEl, url) => {
|
|
22424
22522
|
const baseURI = doc.baseURI;
|
|
22425
|
-
const base = new URL(containerEl.getAttribute(
|
|
22523
|
+
const base = new URL(containerEl.getAttribute(QBaseAttr) ?? baseURI, baseURI);
|
|
22426
22524
|
return new URL(url, base);
|
|
22427
22525
|
};
|
|
22428
22526
|
var _platform = /* @__PURE__ */ createPlatform();
|
|
@@ -22477,13 +22575,20 @@ var delay = (timeout) => {
|
|
|
22477
22575
|
});
|
|
22478
22576
|
};
|
|
22479
22577
|
function retryOnPromise(fn, retryCount = 0) {
|
|
22480
|
-
|
|
22481
|
-
return fn();
|
|
22482
|
-
} catch (e) {
|
|
22578
|
+
const retryOrThrow = (e) => {
|
|
22483
22579
|
if (isPromise(e) && retryCount < MAX_RETRY_ON_PROMISE_COUNT) {
|
|
22484
22580
|
return e.then(retryOnPromise.bind(null, fn, retryCount++));
|
|
22485
22581
|
}
|
|
22486
22582
|
throw e;
|
|
22583
|
+
};
|
|
22584
|
+
try {
|
|
22585
|
+
const result = fn();
|
|
22586
|
+
if (isPromise(result)) {
|
|
22587
|
+
return result.catch((e) => retryOrThrow(e));
|
|
22588
|
+
}
|
|
22589
|
+
return result;
|
|
22590
|
+
} catch (e) {
|
|
22591
|
+
return retryOrThrow(e);
|
|
22487
22592
|
}
|
|
22488
22593
|
}
|
|
22489
22594
|
|
|
@@ -22508,104 +22613,6 @@ var isFunction = (v) => {
|
|
|
22508
22613
|
// packages/qwik/src/build/index.dev.ts
|
|
22509
22614
|
var isDev = true;
|
|
22510
22615
|
|
|
22511
|
-
// packages/qwik/src/core/shared/types.ts
|
|
22512
|
-
var DEBUG_TYPE = "q:type";
|
|
22513
|
-
var START = "\x1B[34m";
|
|
22514
|
-
var END = "\x1B[0m";
|
|
22515
|
-
var VirtualTypeName = {
|
|
22516
|
-
["V" /* Virtual */]: (
|
|
22517
|
-
/* ********* */
|
|
22518
|
-
START + "Virtual" + END
|
|
22519
|
-
),
|
|
22520
|
-
//
|
|
22521
|
-
["F" /* Fragment */]: (
|
|
22522
|
-
/* ******** */
|
|
22523
|
-
START + "Fragment" + END
|
|
22524
|
-
),
|
|
22525
|
-
//
|
|
22526
|
-
["S" /* WrappedSignal */]: (
|
|
22527
|
-
/* *** */
|
|
22528
|
-
START + "Signal" + END
|
|
22529
|
-
),
|
|
22530
|
-
//
|
|
22531
|
-
["A" /* Awaited */]: (
|
|
22532
|
-
/* ********* */
|
|
22533
|
-
START + "Awaited" + END
|
|
22534
|
-
),
|
|
22535
|
-
//
|
|
22536
|
-
["C" /* Component */]: (
|
|
22537
|
-
/* ******* */
|
|
22538
|
-
START + "Component" + END
|
|
22539
|
-
),
|
|
22540
|
-
//
|
|
22541
|
-
["I" /* InlineComponent */]: (
|
|
22542
|
-
/* * */
|
|
22543
|
-
START + "InlineComponent" + END
|
|
22544
|
-
),
|
|
22545
|
-
//
|
|
22546
|
-
["P" /* Projection */]: (
|
|
22547
|
-
/* ****** */
|
|
22548
|
-
START + "Projection" + END
|
|
22549
|
-
)
|
|
22550
|
-
//
|
|
22551
|
-
};
|
|
22552
|
-
|
|
22553
|
-
// packages/qwik/src/core/shared/utils/markers.ts
|
|
22554
|
-
var OnRenderProp = "q:renderFn";
|
|
22555
|
-
var ComponentStylesPrefixContent = "\u2B50\uFE0F";
|
|
22556
|
-
var QSlot = "q:slot";
|
|
22557
|
-
var QSlotParent = ":";
|
|
22558
|
-
var QSlotRef = "q:sref";
|
|
22559
|
-
var QSlotS = "q:s";
|
|
22560
|
-
var QStyle = "q:style";
|
|
22561
|
-
var QStyleSelector = "style[q\\:style]";
|
|
22562
|
-
var QStyleSSelector = "style[q\\:sstyle]";
|
|
22563
|
-
var QStylesAllSelector = QStyleSelector + "," + QStyleSSelector;
|
|
22564
|
-
var QScopedStyle = "q:sstyle";
|
|
22565
|
-
var QCtxAttr = "q:ctx";
|
|
22566
|
-
var QSubscribers = "q:subs";
|
|
22567
|
-
var QFuncsPrefix = "qFuncs_";
|
|
22568
|
-
var getQFuncs = (document2, hash3) => {
|
|
22569
|
-
return document2[QFuncsPrefix + hash3] || [];
|
|
22570
|
-
};
|
|
22571
|
-
var QRenderAttr = "q:render";
|
|
22572
|
-
var QRuntimeAttr = "q:runtime";
|
|
22573
|
-
var QVersionAttr = "q:version";
|
|
22574
|
-
var QBaseAttr = "q:base";
|
|
22575
|
-
var QLocaleAttr = "q:locale";
|
|
22576
|
-
var QManifestHashAttr = "q:manifest-hash";
|
|
22577
|
-
var QInstanceAttr = "q:instance";
|
|
22578
|
-
var QContainerIsland = "q:container-island";
|
|
22579
|
-
var QContainerIslandEnd = "/" + QContainerIsland;
|
|
22580
|
-
var QIgnore = "q:ignore";
|
|
22581
|
-
var QIgnoreEnd = "/" + QIgnore;
|
|
22582
|
-
var QContainerAttr = "q:container";
|
|
22583
|
-
var QContainerAttrEnd = "/" + QContainerAttr;
|
|
22584
|
-
var QTemplate = "q:template";
|
|
22585
|
-
var QContainerSelector = "[q\\:container]:not([q\\:container=" + "html" /* HTML */ + "]):not([q\\:container=" + "text" /* TEXT */ + "])";
|
|
22586
|
-
var HTML_NS = "http://www.w3.org/1999/xhtml";
|
|
22587
|
-
var SVG_NS = "http://www.w3.org/2000/svg";
|
|
22588
|
-
var MATH_NS = "http://www.w3.org/1998/Math/MathML";
|
|
22589
|
-
var ResourceEvent = "qResource";
|
|
22590
|
-
var RenderEvent = "qRender";
|
|
22591
|
-
var TaskEvent = "qTask";
|
|
22592
|
-
var QDefaultSlot = "";
|
|
22593
|
-
var ELEMENT_ID = "q:id";
|
|
22594
|
-
var ELEMENT_KEY = "q:key";
|
|
22595
|
-
var ELEMENT_PROPS = "q:props";
|
|
22596
|
-
var ELEMENT_SEQ = "q:seq";
|
|
22597
|
-
var ELEMENT_SEQ_IDX = "q:seqIdx";
|
|
22598
|
-
var Q_PREFIX = "q:";
|
|
22599
|
-
var NON_SERIALIZABLE_MARKER_PREFIX = ":";
|
|
22600
|
-
var USE_ON_LOCAL = NON_SERIALIZABLE_MARKER_PREFIX + "on";
|
|
22601
|
-
var USE_ON_LOCAL_SEQ_IDX = NON_SERIALIZABLE_MARKER_PREFIX + "onIdx";
|
|
22602
|
-
var USE_ON_LOCAL_FLAGS = NON_SERIALIZABLE_MARKER_PREFIX + "onFlags";
|
|
22603
|
-
var FLUSH_COMMENT = "qkssr-f";
|
|
22604
|
-
var STREAM_BLOCK_START_COMMENT = "qkssr-pu";
|
|
22605
|
-
var STREAM_BLOCK_END_COMMENT = "qkssr-po";
|
|
22606
|
-
var Q_PROPS_SEPARATOR = ":";
|
|
22607
|
-
var dangerouslySetInnerHTML = "dangerouslySetInnerHTML";
|
|
22608
|
-
|
|
22609
22616
|
// packages/qwik/src/core/use/use-locale.ts
|
|
22610
22617
|
var _locale = void 0;
|
|
22611
22618
|
function setLocale(locale) {
|
|
@@ -23291,6 +23298,17 @@ function clearArgEffect(arg, subscriber, seenSet) {
|
|
|
23291
23298
|
} else if (typeof arg === "object" && arg !== null) {
|
|
23292
23299
|
if (isStore(arg)) {
|
|
23293
23300
|
clearStoreEffects(getStoreHandler(arg), subscriber);
|
|
23301
|
+
} else if (isPropsProxy(arg)) {
|
|
23302
|
+
const constProps = arg[_CONST_PROPS];
|
|
23303
|
+
const varProps = arg[_VAR_PROPS];
|
|
23304
|
+
if (constProps) {
|
|
23305
|
+
for (const key in constProps) {
|
|
23306
|
+
clearArgEffect(constProps[key], subscriber, seenSet);
|
|
23307
|
+
}
|
|
23308
|
+
}
|
|
23309
|
+
for (const key in varProps) {
|
|
23310
|
+
clearArgEffect(varProps[key], subscriber, seenSet);
|
|
23311
|
+
}
|
|
23294
23312
|
} else {
|
|
23295
23313
|
for (const key in arg) {
|
|
23296
23314
|
clearArgEffect(arg[key], subscriber, seenSet);
|
|
@@ -24753,6 +24771,81 @@ var implicit$FirstArg = (fn) => {
|
|
|
24753
24771
|
};
|
|
24754
24772
|
};
|
|
24755
24773
|
|
|
24774
|
+
// packages/qwik/src/core/shared/scheduler-document-position.ts
|
|
24775
|
+
var aVNodePath = [];
|
|
24776
|
+
var bVNodePath = [];
|
|
24777
|
+
var vnode_documentPosition = (a, b, rootVNode) => {
|
|
24778
|
+
if (a === b) {
|
|
24779
|
+
return 0;
|
|
24780
|
+
}
|
|
24781
|
+
let aDepth = -1;
|
|
24782
|
+
let bDepth = -1;
|
|
24783
|
+
while (a) {
|
|
24784
|
+
const vNode = aVNodePath[++aDepth] = a;
|
|
24785
|
+
a = vNode[1 /* parent */] || rootVNode && vnode_getProp(a, QSlotParent, (id) => vnode_locate(rootVNode, id));
|
|
24786
|
+
}
|
|
24787
|
+
while (b) {
|
|
24788
|
+
const vNode = bVNodePath[++bDepth] = b;
|
|
24789
|
+
b = vNode[1 /* parent */] || rootVNode && vnode_getProp(b, QSlotParent, (id) => vnode_locate(rootVNode, id));
|
|
24790
|
+
}
|
|
24791
|
+
while (aDepth >= 0 && bDepth >= 0) {
|
|
24792
|
+
a = aVNodePath[aDepth];
|
|
24793
|
+
b = bVNodePath[bDepth];
|
|
24794
|
+
if (a === b) {
|
|
24795
|
+
aDepth--;
|
|
24796
|
+
bDepth--;
|
|
24797
|
+
} else {
|
|
24798
|
+
let cursor = b;
|
|
24799
|
+
do {
|
|
24800
|
+
cursor = vnode_getNextSibling(cursor);
|
|
24801
|
+
if (cursor === a) {
|
|
24802
|
+
return 1;
|
|
24803
|
+
}
|
|
24804
|
+
} while (cursor);
|
|
24805
|
+
cursor = b;
|
|
24806
|
+
do {
|
|
24807
|
+
cursor = vnode_getPreviousSibling(cursor);
|
|
24808
|
+
if (cursor === a) {
|
|
24809
|
+
return -1;
|
|
24810
|
+
}
|
|
24811
|
+
} while (cursor);
|
|
24812
|
+
if (rootVNode && vnode_getProp(b, QSlotParent, (id) => vnode_locate(rootVNode, id))) {
|
|
24813
|
+
return -1;
|
|
24814
|
+
}
|
|
24815
|
+
return 1;
|
|
24816
|
+
}
|
|
24817
|
+
}
|
|
24818
|
+
return aDepth < bDepth ? -1 : 1;
|
|
24819
|
+
};
|
|
24820
|
+
var aSsrNodePath = [];
|
|
24821
|
+
var bSsrNodePath = [];
|
|
24822
|
+
var ssrNodeDocumentPosition = (a, b) => {
|
|
24823
|
+
if (a === b) {
|
|
24824
|
+
return 0;
|
|
24825
|
+
}
|
|
24826
|
+
let aDepth = -1;
|
|
24827
|
+
let bDepth = -1;
|
|
24828
|
+
while (a) {
|
|
24829
|
+
const ssrNode = aSsrNodePath[++aDepth] = a;
|
|
24830
|
+
a = ssrNode.currentComponentNode;
|
|
24831
|
+
}
|
|
24832
|
+
while (b) {
|
|
24833
|
+
const ssrNode = bSsrNodePath[++bDepth] = b;
|
|
24834
|
+
b = ssrNode.currentComponentNode;
|
|
24835
|
+
}
|
|
24836
|
+
while (aDepth >= 0 && bDepth >= 0) {
|
|
24837
|
+
a = aSsrNodePath[aDepth];
|
|
24838
|
+
b = bSsrNodePath[bDepth];
|
|
24839
|
+
if (a === b) {
|
|
24840
|
+
aDepth--;
|
|
24841
|
+
bDepth--;
|
|
24842
|
+
} else {
|
|
24843
|
+
return 1;
|
|
24844
|
+
}
|
|
24845
|
+
}
|
|
24846
|
+
return aDepth < bDepth ? -1 : 1;
|
|
24847
|
+
};
|
|
24848
|
+
|
|
24756
24849
|
// packages/qwik/src/core/shared/scheduler.ts
|
|
24757
24850
|
var DEBUG2 = false;
|
|
24758
24851
|
var createScheduler = (container, scheduleDrain, journalFlush) => {
|
|
@@ -24800,7 +24893,7 @@ var createScheduler = (container, scheduleDrain, journalFlush) => {
|
|
|
24800
24893
|
}
|
|
24801
24894
|
while (choreQueue.length) {
|
|
24802
24895
|
const nextChore = choreQueue.shift();
|
|
24803
|
-
const order = choreComparator(nextChore, runUptoChore, rootVNode
|
|
24896
|
+
const order = choreComparator(nextChore, runUptoChore, rootVNode);
|
|
24804
24897
|
if (order === null) {
|
|
24805
24898
|
continue;
|
|
24806
24899
|
}
|
|
@@ -24846,11 +24939,13 @@ var createScheduler = (container, scheduleDrain, journalFlush) => {
|
|
|
24846
24939
|
(jsx5) => {
|
|
24847
24940
|
if (chore.$type$ === 7 /* COMPONENT */) {
|
|
24848
24941
|
const styleScopedId = container.getHostProp(host, QScopedStyle);
|
|
24849
|
-
return
|
|
24850
|
-
|
|
24851
|
-
|
|
24852
|
-
|
|
24853
|
-
|
|
24942
|
+
return retryOnPromise(
|
|
24943
|
+
() => vnode_diff(
|
|
24944
|
+
container,
|
|
24945
|
+
jsx5,
|
|
24946
|
+
host,
|
|
24947
|
+
addComponentStylePrefix(styleScopedId)
|
|
24948
|
+
)
|
|
24854
24949
|
);
|
|
24855
24950
|
} else {
|
|
24856
24951
|
return jsx5;
|
|
@@ -24879,7 +24974,9 @@ var createScheduler = (container, scheduleDrain, journalFlush) => {
|
|
|
24879
24974
|
if (isSignal(jsx4)) {
|
|
24880
24975
|
jsx4 = jsx4.value;
|
|
24881
24976
|
}
|
|
24882
|
-
returnValue =
|
|
24977
|
+
returnValue = retryOnPromise(
|
|
24978
|
+
() => vnode_diff(container, jsx4, parentVirtualNode, null)
|
|
24979
|
+
);
|
|
24883
24980
|
break;
|
|
24884
24981
|
case 5 /* NODE_PROP */:
|
|
24885
24982
|
const virtualNode = chore.$host$;
|
|
@@ -24942,7 +25039,7 @@ var choreUpdate = (existing, newChore) => {
|
|
|
24942
25039
|
function vNodeAlreadyDeleted(chore) {
|
|
24943
25040
|
return !!(chore.$host$ && vnode_isVNode(chore.$host$) && chore.$host$[0 /* flags */] & 32 /* Deleted */);
|
|
24944
25041
|
}
|
|
24945
|
-
function choreComparator(a, b, rootVNode
|
|
25042
|
+
function choreComparator(a, b, rootVNode) {
|
|
24946
25043
|
const macroTypeDiff = (a.$type$ & 240 /* MACRO */) - (b.$type$ & 240 /* MACRO */);
|
|
24947
25044
|
if (macroTypeDiff !== 0) {
|
|
24948
25045
|
return macroTypeDiff;
|
|
@@ -24961,11 +25058,11 @@ function choreComparator(a, b, rootVNode, shouldThrowOnHostMismatch) {
|
|
|
24961
25058
|
You are attempting to change a state that has already been streamed to the client.
|
|
24962
25059
|
This can lead to inconsistencies between Server-Side Rendering (SSR) and Client-Side Rendering (CSR).
|
|
24963
25060
|
Problematic Node: ${aHost.toString()}`;
|
|
24964
|
-
if (shouldThrowOnHostMismatch) {
|
|
24965
|
-
throw qError(45 /* serverHostMismatch */, [errorMessage]);
|
|
24966
|
-
}
|
|
24967
25061
|
logWarn(errorMessage);
|
|
24968
|
-
|
|
25062
|
+
const hostDiff = ssrNodeDocumentPosition(aHost, bHost);
|
|
25063
|
+
if (hostDiff !== 0) {
|
|
25064
|
+
return hostDiff;
|
|
25065
|
+
}
|
|
24969
25066
|
}
|
|
24970
25067
|
}
|
|
24971
25068
|
const microTypeDiff = (a.$type$ & 15 /* MICRO */) - (b.$type$ & 15 /* MICRO */);
|
|
@@ -24988,7 +25085,7 @@ function sortedFindIndex(sortedArray, value, rootVNode) {
|
|
|
24988
25085
|
while (bottom < top) {
|
|
24989
25086
|
const middle = bottom + (top - bottom >> 1);
|
|
24990
25087
|
const midChore = sortedArray[middle];
|
|
24991
|
-
const comp = choreComparator(value, midChore, rootVNode
|
|
25088
|
+
const comp = choreComparator(value, midChore, rootVNode);
|
|
24992
25089
|
if (comp < 0) {
|
|
24993
25090
|
top = middle;
|
|
24994
25091
|
} else if (comp > 0) {
|
|
@@ -25213,7 +25310,7 @@ var Signal = class {
|
|
|
25213
25310
|
// prevent accidental use as value
|
|
25214
25311
|
valueOf() {
|
|
25215
25312
|
if (qDev) {
|
|
25216
|
-
throw qError(
|
|
25313
|
+
throw qError(45 /* cannotCoerceSignal */);
|
|
25217
25314
|
}
|
|
25218
25315
|
}
|
|
25219
25316
|
toString() {
|
|
@@ -25380,7 +25477,7 @@ var ComputedSignal = class extends Signal {
|
|
|
25380
25477
|
try {
|
|
25381
25478
|
const untrackedValue = computeQrl.getFn(ctx)();
|
|
25382
25479
|
if (isPromise(untrackedValue)) {
|
|
25383
|
-
throw qError(
|
|
25480
|
+
throw qError(46 /* computedNotSync */, [
|
|
25384
25481
|
computeQrl.dev ? computeQrl.dev.file : "",
|
|
25385
25482
|
computeQrl.$hash$
|
|
25386
25483
|
]);
|
|
@@ -25403,7 +25500,7 @@ var ComputedSignal = class extends Signal {
|
|
|
25403
25500
|
return super.value;
|
|
25404
25501
|
}
|
|
25405
25502
|
set value(_) {
|
|
25406
|
-
throw qError(
|
|
25503
|
+
throw qError(47 /* computedReadOnly */);
|
|
25407
25504
|
}
|
|
25408
25505
|
};
|
|
25409
25506
|
var WrappedSignal = class extends Signal {
|
|
@@ -25470,7 +25567,7 @@ var WrappedSignal = class extends Signal {
|
|
|
25470
25567
|
return super.value;
|
|
25471
25568
|
}
|
|
25472
25569
|
set value(_) {
|
|
25473
|
-
throw qError(
|
|
25570
|
+
throw qError(48 /* wrappedReadOnly */);
|
|
25474
25571
|
}
|
|
25475
25572
|
};
|
|
25476
25573
|
|
|
@@ -27304,51 +27401,6 @@ var vnode_getType = (vnode) => {
|
|
|
27304
27401
|
};
|
|
27305
27402
|
var isElement = (node) => node && typeof node == "object" && fastNodeType(node) === /** Node.ELEMENT_NODE* */
|
|
27306
27403
|
1;
|
|
27307
|
-
var aPath = [];
|
|
27308
|
-
var bPath = [];
|
|
27309
|
-
var vnode_documentPosition = (a, b, rootVNode) => {
|
|
27310
|
-
if (a === b) {
|
|
27311
|
-
return 0;
|
|
27312
|
-
}
|
|
27313
|
-
let aDepth = -1;
|
|
27314
|
-
let bDepth = -1;
|
|
27315
|
-
while (a) {
|
|
27316
|
-
const vNode = aPath[++aDepth] = a;
|
|
27317
|
-
a = vNode[1 /* parent */] || rootVNode && vnode_getProp(a, QSlotParent, (id) => vnode_locate(rootVNode, id));
|
|
27318
|
-
}
|
|
27319
|
-
while (b) {
|
|
27320
|
-
const vNode = bPath[++bDepth] = b;
|
|
27321
|
-
b = vNode[1 /* parent */] || rootVNode && vnode_getProp(b, QSlotParent, (id) => vnode_locate(rootVNode, id));
|
|
27322
|
-
}
|
|
27323
|
-
while (aDepth >= 0 && bDepth >= 0) {
|
|
27324
|
-
a = aPath[aDepth];
|
|
27325
|
-
b = bPath[bDepth];
|
|
27326
|
-
if (a === b) {
|
|
27327
|
-
aDepth--;
|
|
27328
|
-
bDepth--;
|
|
27329
|
-
} else {
|
|
27330
|
-
let cursor = b;
|
|
27331
|
-
do {
|
|
27332
|
-
cursor = vnode_getNextSibling(cursor);
|
|
27333
|
-
if (cursor === a) {
|
|
27334
|
-
return 1;
|
|
27335
|
-
}
|
|
27336
|
-
} while (cursor);
|
|
27337
|
-
cursor = b;
|
|
27338
|
-
do {
|
|
27339
|
-
cursor = vnode_getPreviousSibling(cursor);
|
|
27340
|
-
if (cursor === a) {
|
|
27341
|
-
return -1;
|
|
27342
|
-
}
|
|
27343
|
-
} while (cursor);
|
|
27344
|
-
if (rootVNode && vnode_getProp(b, QSlotParent, (id) => vnode_locate(rootVNode, id))) {
|
|
27345
|
-
return -1;
|
|
27346
|
-
}
|
|
27347
|
-
return 1;
|
|
27348
|
-
}
|
|
27349
|
-
}
|
|
27350
|
-
return aDepth < bDepth ? -1 : 1;
|
|
27351
|
-
};
|
|
27352
27404
|
var vnode_getProjectionParentComponent = (vHost, rootVNode) => {
|
|
27353
27405
|
let projectionDepth = 1;
|
|
27354
27406
|
while (projectionDepth--) {
|
|
@@ -32209,7 +32261,7 @@ var SSRContainer = class extends import_core6._SharedContainer {
|
|
|
32209
32261
|
let styleScopedId = null;
|
|
32210
32262
|
if (isSSRUnsafeAttr(key)) {
|
|
32211
32263
|
if (import_build12.isDev) {
|
|
32212
|
-
throw qError(
|
|
32264
|
+
throw qError(50 /* unsafeAttr */);
|
|
32213
32265
|
}
|
|
32214
32266
|
continue;
|
|
32215
32267
|
}
|