@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.mjs
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
|
|
@@ -22320,8 +22320,6 @@ See https://qwik.dev/docs/components/tasks/#use-method-rules`,
|
|
|
22320
22320
|
// 43
|
|
22321
22321
|
"Materialize error: missing element: {{0}} {{1}} {{2}}",
|
|
22322
22322
|
// 44
|
|
22323
|
-
"SsrError: {{0}}",
|
|
22324
|
-
// 45
|
|
22325
22323
|
"Cannot coerce a Signal, use `.value` instead",
|
|
22326
22324
|
// 46
|
|
22327
22325
|
"useComputedSignal$ QRL {{0}} {{1}} returned a Promise",
|
|
@@ -22357,6 +22355,106 @@ var qError = (code2, errorMessageArgs = []) => {
|
|
|
22357
22355
|
|
|
22358
22356
|
// packages/qwik/src/core/shared/platform/platform.ts
|
|
22359
22357
|
import { isServer } from "@qwik.dev/core/build";
|
|
22358
|
+
|
|
22359
|
+
// packages/qwik/src/core/shared/types.ts
|
|
22360
|
+
var DEBUG_TYPE = "q:type";
|
|
22361
|
+
var START = "\x1B[34m";
|
|
22362
|
+
var END = "\x1B[0m";
|
|
22363
|
+
var VirtualTypeName = {
|
|
22364
|
+
["V" /* Virtual */]: (
|
|
22365
|
+
/* ********* */
|
|
22366
|
+
START + "Virtual" + END
|
|
22367
|
+
),
|
|
22368
|
+
//
|
|
22369
|
+
["F" /* Fragment */]: (
|
|
22370
|
+
/* ******** */
|
|
22371
|
+
START + "Fragment" + END
|
|
22372
|
+
),
|
|
22373
|
+
//
|
|
22374
|
+
["S" /* WrappedSignal */]: (
|
|
22375
|
+
/* *** */
|
|
22376
|
+
START + "Signal" + END
|
|
22377
|
+
),
|
|
22378
|
+
//
|
|
22379
|
+
["A" /* Awaited */]: (
|
|
22380
|
+
/* ********* */
|
|
22381
|
+
START + "Awaited" + END
|
|
22382
|
+
),
|
|
22383
|
+
//
|
|
22384
|
+
["C" /* Component */]: (
|
|
22385
|
+
/* ******* */
|
|
22386
|
+
START + "Component" + END
|
|
22387
|
+
),
|
|
22388
|
+
//
|
|
22389
|
+
["I" /* InlineComponent */]: (
|
|
22390
|
+
/* * */
|
|
22391
|
+
START + "InlineComponent" + END
|
|
22392
|
+
),
|
|
22393
|
+
//
|
|
22394
|
+
["P" /* Projection */]: (
|
|
22395
|
+
/* ****** */
|
|
22396
|
+
START + "Projection" + END
|
|
22397
|
+
)
|
|
22398
|
+
//
|
|
22399
|
+
};
|
|
22400
|
+
|
|
22401
|
+
// packages/qwik/src/core/shared/utils/markers.ts
|
|
22402
|
+
var OnRenderProp = "q:renderFn";
|
|
22403
|
+
var ComponentStylesPrefixContent = "\u2B50\uFE0F";
|
|
22404
|
+
var QSlot = "q:slot";
|
|
22405
|
+
var QSlotParent = ":";
|
|
22406
|
+
var QSlotRef = "q:sref";
|
|
22407
|
+
var QSlotS = "q:s";
|
|
22408
|
+
var QStyle = "q:style";
|
|
22409
|
+
var QStyleSelector = "style[q\\:style]";
|
|
22410
|
+
var QStyleSSelector = "style[q\\:sstyle]";
|
|
22411
|
+
var QStylesAllSelector = QStyleSelector + "," + QStyleSSelector;
|
|
22412
|
+
var QScopedStyle = "q:sstyle";
|
|
22413
|
+
var QCtxAttr = "q:ctx";
|
|
22414
|
+
var QSubscribers = "q:subs";
|
|
22415
|
+
var QFuncsPrefix = "qFuncs_";
|
|
22416
|
+
var getQFuncs = (document2, hash3) => {
|
|
22417
|
+
return document2[QFuncsPrefix + hash3] || [];
|
|
22418
|
+
};
|
|
22419
|
+
var QRenderAttr = "q:render";
|
|
22420
|
+
var QRuntimeAttr = "q:runtime";
|
|
22421
|
+
var QVersionAttr = "q:version";
|
|
22422
|
+
var QBaseAttr = "q:base";
|
|
22423
|
+
var QLocaleAttr = "q:locale";
|
|
22424
|
+
var QManifestHashAttr = "q:manifest-hash";
|
|
22425
|
+
var QInstanceAttr = "q:instance";
|
|
22426
|
+
var QContainerIsland = "q:container-island";
|
|
22427
|
+
var QContainerIslandEnd = "/" + QContainerIsland;
|
|
22428
|
+
var QIgnore = "q:ignore";
|
|
22429
|
+
var QIgnoreEnd = "/" + QIgnore;
|
|
22430
|
+
var QContainerAttr = "q:container";
|
|
22431
|
+
var QContainerAttrEnd = "/" + QContainerAttr;
|
|
22432
|
+
var QTemplate = "q:template";
|
|
22433
|
+
var QContainerSelector = "[q\\:container]:not([q\\:container=" + "html" /* HTML */ + "]):not([q\\:container=" + "text" /* TEXT */ + "])";
|
|
22434
|
+
var HTML_NS = "http://www.w3.org/1999/xhtml";
|
|
22435
|
+
var SVG_NS = "http://www.w3.org/2000/svg";
|
|
22436
|
+
var MATH_NS = "http://www.w3.org/1998/Math/MathML";
|
|
22437
|
+
var ResourceEvent = "qResource";
|
|
22438
|
+
var RenderEvent = "qRender";
|
|
22439
|
+
var TaskEvent = "qTask";
|
|
22440
|
+
var QDefaultSlot = "";
|
|
22441
|
+
var ELEMENT_ID = "q:id";
|
|
22442
|
+
var ELEMENT_KEY = "q:key";
|
|
22443
|
+
var ELEMENT_PROPS = "q:props";
|
|
22444
|
+
var ELEMENT_SEQ = "q:seq";
|
|
22445
|
+
var ELEMENT_SEQ_IDX = "q:seqIdx";
|
|
22446
|
+
var Q_PREFIX = "q:";
|
|
22447
|
+
var NON_SERIALIZABLE_MARKER_PREFIX = ":";
|
|
22448
|
+
var USE_ON_LOCAL = NON_SERIALIZABLE_MARKER_PREFIX + "on";
|
|
22449
|
+
var USE_ON_LOCAL_SEQ_IDX = NON_SERIALIZABLE_MARKER_PREFIX + "onIdx";
|
|
22450
|
+
var USE_ON_LOCAL_FLAGS = NON_SERIALIZABLE_MARKER_PREFIX + "onFlags";
|
|
22451
|
+
var FLUSH_COMMENT = "qkssr-f";
|
|
22452
|
+
var STREAM_BLOCK_START_COMMENT = "qkssr-pu";
|
|
22453
|
+
var STREAM_BLOCK_END_COMMENT = "qkssr-po";
|
|
22454
|
+
var Q_PROPS_SEPARATOR = ":";
|
|
22455
|
+
var dangerouslySetInnerHTML = "dangerouslySetInnerHTML";
|
|
22456
|
+
|
|
22457
|
+
// packages/qwik/src/core/shared/platform/platform.ts
|
|
22360
22458
|
var createPlatform = () => {
|
|
22361
22459
|
return {
|
|
22362
22460
|
isServer,
|
|
@@ -22406,7 +22504,7 @@ var createPlatform = () => {
|
|
|
22406
22504
|
};
|
|
22407
22505
|
var toUrl = (doc, containerEl, url) => {
|
|
22408
22506
|
const baseURI = doc.baseURI;
|
|
22409
|
-
const base = new URL(containerEl.getAttribute(
|
|
22507
|
+
const base = new URL(containerEl.getAttribute(QBaseAttr) ?? baseURI, baseURI);
|
|
22410
22508
|
return new URL(url, base);
|
|
22411
22509
|
};
|
|
22412
22510
|
var _platform = /* @__PURE__ */ createPlatform();
|
|
@@ -22461,13 +22559,20 @@ var delay = (timeout) => {
|
|
|
22461
22559
|
});
|
|
22462
22560
|
};
|
|
22463
22561
|
function retryOnPromise(fn, retryCount = 0) {
|
|
22464
|
-
|
|
22465
|
-
return fn();
|
|
22466
|
-
} catch (e) {
|
|
22562
|
+
const retryOrThrow = (e) => {
|
|
22467
22563
|
if (isPromise(e) && retryCount < MAX_RETRY_ON_PROMISE_COUNT) {
|
|
22468
22564
|
return e.then(retryOnPromise.bind(null, fn, retryCount++));
|
|
22469
22565
|
}
|
|
22470
22566
|
throw e;
|
|
22567
|
+
};
|
|
22568
|
+
try {
|
|
22569
|
+
const result = fn();
|
|
22570
|
+
if (isPromise(result)) {
|
|
22571
|
+
return result.catch((e) => retryOrThrow(e));
|
|
22572
|
+
}
|
|
22573
|
+
return result;
|
|
22574
|
+
} catch (e) {
|
|
22575
|
+
return retryOrThrow(e);
|
|
22471
22576
|
}
|
|
22472
22577
|
}
|
|
22473
22578
|
|
|
@@ -22492,104 +22597,6 @@ var isFunction = (v) => {
|
|
|
22492
22597
|
// packages/qwik/src/build/index.dev.ts
|
|
22493
22598
|
var isDev = true;
|
|
22494
22599
|
|
|
22495
|
-
// packages/qwik/src/core/shared/types.ts
|
|
22496
|
-
var DEBUG_TYPE = "q:type";
|
|
22497
|
-
var START = "\x1B[34m";
|
|
22498
|
-
var END = "\x1B[0m";
|
|
22499
|
-
var VirtualTypeName = {
|
|
22500
|
-
["V" /* Virtual */]: (
|
|
22501
|
-
/* ********* */
|
|
22502
|
-
START + "Virtual" + END
|
|
22503
|
-
),
|
|
22504
|
-
//
|
|
22505
|
-
["F" /* Fragment */]: (
|
|
22506
|
-
/* ******** */
|
|
22507
|
-
START + "Fragment" + END
|
|
22508
|
-
),
|
|
22509
|
-
//
|
|
22510
|
-
["S" /* WrappedSignal */]: (
|
|
22511
|
-
/* *** */
|
|
22512
|
-
START + "Signal" + END
|
|
22513
|
-
),
|
|
22514
|
-
//
|
|
22515
|
-
["A" /* Awaited */]: (
|
|
22516
|
-
/* ********* */
|
|
22517
|
-
START + "Awaited" + END
|
|
22518
|
-
),
|
|
22519
|
-
//
|
|
22520
|
-
["C" /* Component */]: (
|
|
22521
|
-
/* ******* */
|
|
22522
|
-
START + "Component" + END
|
|
22523
|
-
),
|
|
22524
|
-
//
|
|
22525
|
-
["I" /* InlineComponent */]: (
|
|
22526
|
-
/* * */
|
|
22527
|
-
START + "InlineComponent" + END
|
|
22528
|
-
),
|
|
22529
|
-
//
|
|
22530
|
-
["P" /* Projection */]: (
|
|
22531
|
-
/* ****** */
|
|
22532
|
-
START + "Projection" + END
|
|
22533
|
-
)
|
|
22534
|
-
//
|
|
22535
|
-
};
|
|
22536
|
-
|
|
22537
|
-
// packages/qwik/src/core/shared/utils/markers.ts
|
|
22538
|
-
var OnRenderProp = "q:renderFn";
|
|
22539
|
-
var ComponentStylesPrefixContent = "\u2B50\uFE0F";
|
|
22540
|
-
var QSlot = "q:slot";
|
|
22541
|
-
var QSlotParent = ":";
|
|
22542
|
-
var QSlotRef = "q:sref";
|
|
22543
|
-
var QSlotS = "q:s";
|
|
22544
|
-
var QStyle = "q:style";
|
|
22545
|
-
var QStyleSelector = "style[q\\:style]";
|
|
22546
|
-
var QStyleSSelector = "style[q\\:sstyle]";
|
|
22547
|
-
var QStylesAllSelector = QStyleSelector + "," + QStyleSSelector;
|
|
22548
|
-
var QScopedStyle = "q:sstyle";
|
|
22549
|
-
var QCtxAttr = "q:ctx";
|
|
22550
|
-
var QSubscribers = "q:subs";
|
|
22551
|
-
var QFuncsPrefix = "qFuncs_";
|
|
22552
|
-
var getQFuncs = (document2, hash3) => {
|
|
22553
|
-
return document2[QFuncsPrefix + hash3] || [];
|
|
22554
|
-
};
|
|
22555
|
-
var QRenderAttr = "q:render";
|
|
22556
|
-
var QRuntimeAttr = "q:runtime";
|
|
22557
|
-
var QVersionAttr = "q:version";
|
|
22558
|
-
var QBaseAttr = "q:base";
|
|
22559
|
-
var QLocaleAttr = "q:locale";
|
|
22560
|
-
var QManifestHashAttr = "q:manifest-hash";
|
|
22561
|
-
var QInstanceAttr = "q:instance";
|
|
22562
|
-
var QContainerIsland = "q:container-island";
|
|
22563
|
-
var QContainerIslandEnd = "/" + QContainerIsland;
|
|
22564
|
-
var QIgnore = "q:ignore";
|
|
22565
|
-
var QIgnoreEnd = "/" + QIgnore;
|
|
22566
|
-
var QContainerAttr = "q:container";
|
|
22567
|
-
var QContainerAttrEnd = "/" + QContainerAttr;
|
|
22568
|
-
var QTemplate = "q:template";
|
|
22569
|
-
var QContainerSelector = "[q\\:container]:not([q\\:container=" + "html" /* HTML */ + "]):not([q\\:container=" + "text" /* TEXT */ + "])";
|
|
22570
|
-
var HTML_NS = "http://www.w3.org/1999/xhtml";
|
|
22571
|
-
var SVG_NS = "http://www.w3.org/2000/svg";
|
|
22572
|
-
var MATH_NS = "http://www.w3.org/1998/Math/MathML";
|
|
22573
|
-
var ResourceEvent = "qResource";
|
|
22574
|
-
var RenderEvent = "qRender";
|
|
22575
|
-
var TaskEvent = "qTask";
|
|
22576
|
-
var QDefaultSlot = "";
|
|
22577
|
-
var ELEMENT_ID = "q:id";
|
|
22578
|
-
var ELEMENT_KEY = "q:key";
|
|
22579
|
-
var ELEMENT_PROPS = "q:props";
|
|
22580
|
-
var ELEMENT_SEQ = "q:seq";
|
|
22581
|
-
var ELEMENT_SEQ_IDX = "q:seqIdx";
|
|
22582
|
-
var Q_PREFIX = "q:";
|
|
22583
|
-
var NON_SERIALIZABLE_MARKER_PREFIX = ":";
|
|
22584
|
-
var USE_ON_LOCAL = NON_SERIALIZABLE_MARKER_PREFIX + "on";
|
|
22585
|
-
var USE_ON_LOCAL_SEQ_IDX = NON_SERIALIZABLE_MARKER_PREFIX + "onIdx";
|
|
22586
|
-
var USE_ON_LOCAL_FLAGS = NON_SERIALIZABLE_MARKER_PREFIX + "onFlags";
|
|
22587
|
-
var FLUSH_COMMENT = "qkssr-f";
|
|
22588
|
-
var STREAM_BLOCK_START_COMMENT = "qkssr-pu";
|
|
22589
|
-
var STREAM_BLOCK_END_COMMENT = "qkssr-po";
|
|
22590
|
-
var Q_PROPS_SEPARATOR = ":";
|
|
22591
|
-
var dangerouslySetInnerHTML = "dangerouslySetInnerHTML";
|
|
22592
|
-
|
|
22593
22600
|
// packages/qwik/src/core/use/use-locale.ts
|
|
22594
22601
|
var _locale = void 0;
|
|
22595
22602
|
function setLocale(locale) {
|
|
@@ -23276,6 +23283,17 @@ function clearArgEffect(arg, subscriber, seenSet) {
|
|
|
23276
23283
|
} else if (typeof arg === "object" && arg !== null) {
|
|
23277
23284
|
if (isStore(arg)) {
|
|
23278
23285
|
clearStoreEffects(getStoreHandler(arg), subscriber);
|
|
23286
|
+
} else if (isPropsProxy(arg)) {
|
|
23287
|
+
const constProps = arg[_CONST_PROPS];
|
|
23288
|
+
const varProps = arg[_VAR_PROPS];
|
|
23289
|
+
if (constProps) {
|
|
23290
|
+
for (const key in constProps) {
|
|
23291
|
+
clearArgEffect(constProps[key], subscriber, seenSet);
|
|
23292
|
+
}
|
|
23293
|
+
}
|
|
23294
|
+
for (const key in varProps) {
|
|
23295
|
+
clearArgEffect(varProps[key], subscriber, seenSet);
|
|
23296
|
+
}
|
|
23279
23297
|
} else {
|
|
23280
23298
|
for (const key in arg) {
|
|
23281
23299
|
clearArgEffect(arg[key], subscriber, seenSet);
|
|
@@ -24737,6 +24755,81 @@ var implicit$FirstArg = (fn) => {
|
|
|
24737
24755
|
};
|
|
24738
24756
|
};
|
|
24739
24757
|
|
|
24758
|
+
// packages/qwik/src/core/shared/scheduler-document-position.ts
|
|
24759
|
+
var aVNodePath = [];
|
|
24760
|
+
var bVNodePath = [];
|
|
24761
|
+
var vnode_documentPosition = (a, b, rootVNode) => {
|
|
24762
|
+
if (a === b) {
|
|
24763
|
+
return 0;
|
|
24764
|
+
}
|
|
24765
|
+
let aDepth = -1;
|
|
24766
|
+
let bDepth = -1;
|
|
24767
|
+
while (a) {
|
|
24768
|
+
const vNode = aVNodePath[++aDepth] = a;
|
|
24769
|
+
a = vNode[1 /* parent */] || rootVNode && vnode_getProp(a, QSlotParent, (id) => vnode_locate(rootVNode, id));
|
|
24770
|
+
}
|
|
24771
|
+
while (b) {
|
|
24772
|
+
const vNode = bVNodePath[++bDepth] = b;
|
|
24773
|
+
b = vNode[1 /* parent */] || rootVNode && vnode_getProp(b, QSlotParent, (id) => vnode_locate(rootVNode, id));
|
|
24774
|
+
}
|
|
24775
|
+
while (aDepth >= 0 && bDepth >= 0) {
|
|
24776
|
+
a = aVNodePath[aDepth];
|
|
24777
|
+
b = bVNodePath[bDepth];
|
|
24778
|
+
if (a === b) {
|
|
24779
|
+
aDepth--;
|
|
24780
|
+
bDepth--;
|
|
24781
|
+
} else {
|
|
24782
|
+
let cursor = b;
|
|
24783
|
+
do {
|
|
24784
|
+
cursor = vnode_getNextSibling(cursor);
|
|
24785
|
+
if (cursor === a) {
|
|
24786
|
+
return 1;
|
|
24787
|
+
}
|
|
24788
|
+
} while (cursor);
|
|
24789
|
+
cursor = b;
|
|
24790
|
+
do {
|
|
24791
|
+
cursor = vnode_getPreviousSibling(cursor);
|
|
24792
|
+
if (cursor === a) {
|
|
24793
|
+
return -1;
|
|
24794
|
+
}
|
|
24795
|
+
} while (cursor);
|
|
24796
|
+
if (rootVNode && vnode_getProp(b, QSlotParent, (id) => vnode_locate(rootVNode, id))) {
|
|
24797
|
+
return -1;
|
|
24798
|
+
}
|
|
24799
|
+
return 1;
|
|
24800
|
+
}
|
|
24801
|
+
}
|
|
24802
|
+
return aDepth < bDepth ? -1 : 1;
|
|
24803
|
+
};
|
|
24804
|
+
var aSsrNodePath = [];
|
|
24805
|
+
var bSsrNodePath = [];
|
|
24806
|
+
var ssrNodeDocumentPosition = (a, b) => {
|
|
24807
|
+
if (a === b) {
|
|
24808
|
+
return 0;
|
|
24809
|
+
}
|
|
24810
|
+
let aDepth = -1;
|
|
24811
|
+
let bDepth = -1;
|
|
24812
|
+
while (a) {
|
|
24813
|
+
const ssrNode = aSsrNodePath[++aDepth] = a;
|
|
24814
|
+
a = ssrNode.currentComponentNode;
|
|
24815
|
+
}
|
|
24816
|
+
while (b) {
|
|
24817
|
+
const ssrNode = bSsrNodePath[++bDepth] = b;
|
|
24818
|
+
b = ssrNode.currentComponentNode;
|
|
24819
|
+
}
|
|
24820
|
+
while (aDepth >= 0 && bDepth >= 0) {
|
|
24821
|
+
a = aSsrNodePath[aDepth];
|
|
24822
|
+
b = bSsrNodePath[bDepth];
|
|
24823
|
+
if (a === b) {
|
|
24824
|
+
aDepth--;
|
|
24825
|
+
bDepth--;
|
|
24826
|
+
} else {
|
|
24827
|
+
return 1;
|
|
24828
|
+
}
|
|
24829
|
+
}
|
|
24830
|
+
return aDepth < bDepth ? -1 : 1;
|
|
24831
|
+
};
|
|
24832
|
+
|
|
24740
24833
|
// packages/qwik/src/core/shared/scheduler.ts
|
|
24741
24834
|
var DEBUG2 = false;
|
|
24742
24835
|
var createScheduler = (container, scheduleDrain, journalFlush) => {
|
|
@@ -24784,7 +24877,7 @@ var createScheduler = (container, scheduleDrain, journalFlush) => {
|
|
|
24784
24877
|
}
|
|
24785
24878
|
while (choreQueue.length) {
|
|
24786
24879
|
const nextChore = choreQueue.shift();
|
|
24787
|
-
const order = choreComparator(nextChore, runUptoChore, rootVNode
|
|
24880
|
+
const order = choreComparator(nextChore, runUptoChore, rootVNode);
|
|
24788
24881
|
if (order === null) {
|
|
24789
24882
|
continue;
|
|
24790
24883
|
}
|
|
@@ -24829,11 +24922,13 @@ var createScheduler = (container, scheduleDrain, journalFlush) => {
|
|
|
24829
24922
|
(jsx5) => {
|
|
24830
24923
|
if (chore.$type$ === 7 /* COMPONENT */) {
|
|
24831
24924
|
const styleScopedId = container.getHostProp(host, QScopedStyle);
|
|
24832
|
-
return
|
|
24833
|
-
|
|
24834
|
-
|
|
24835
|
-
|
|
24836
|
-
|
|
24925
|
+
return retryOnPromise(
|
|
24926
|
+
() => vnode_diff(
|
|
24927
|
+
container,
|
|
24928
|
+
jsx5,
|
|
24929
|
+
host,
|
|
24930
|
+
addComponentStylePrefix(styleScopedId)
|
|
24931
|
+
)
|
|
24837
24932
|
);
|
|
24838
24933
|
} else {
|
|
24839
24934
|
return jsx5;
|
|
@@ -24862,7 +24957,9 @@ var createScheduler = (container, scheduleDrain, journalFlush) => {
|
|
|
24862
24957
|
if (isSignal(jsx4)) {
|
|
24863
24958
|
jsx4 = jsx4.value;
|
|
24864
24959
|
}
|
|
24865
|
-
returnValue =
|
|
24960
|
+
returnValue = retryOnPromise(
|
|
24961
|
+
() => vnode_diff(container, jsx4, parentVirtualNode, null)
|
|
24962
|
+
);
|
|
24866
24963
|
break;
|
|
24867
24964
|
case 5 /* NODE_PROP */:
|
|
24868
24965
|
const virtualNode = chore.$host$;
|
|
@@ -24924,7 +25021,7 @@ var choreUpdate = (existing, newChore) => {
|
|
|
24924
25021
|
function vNodeAlreadyDeleted(chore) {
|
|
24925
25022
|
return !!(chore.$host$ && vnode_isVNode(chore.$host$) && chore.$host$[0 /* flags */] & 32 /* Deleted */);
|
|
24926
25023
|
}
|
|
24927
|
-
function choreComparator(a, b, rootVNode
|
|
25024
|
+
function choreComparator(a, b, rootVNode) {
|
|
24928
25025
|
const macroTypeDiff = (a.$type$ & 240 /* MACRO */) - (b.$type$ & 240 /* MACRO */);
|
|
24929
25026
|
if (macroTypeDiff !== 0) {
|
|
24930
25027
|
return macroTypeDiff;
|
|
@@ -24943,11 +25040,11 @@ function choreComparator(a, b, rootVNode, shouldThrowOnHostMismatch) {
|
|
|
24943
25040
|
You are attempting to change a state that has already been streamed to the client.
|
|
24944
25041
|
This can lead to inconsistencies between Server-Side Rendering (SSR) and Client-Side Rendering (CSR).
|
|
24945
25042
|
Problematic Node: ${aHost.toString()}`;
|
|
24946
|
-
if (shouldThrowOnHostMismatch) {
|
|
24947
|
-
throw qError(45 /* serverHostMismatch */, [errorMessage]);
|
|
24948
|
-
}
|
|
24949
25043
|
logWarn(errorMessage);
|
|
24950
|
-
|
|
25044
|
+
const hostDiff = ssrNodeDocumentPosition(aHost, bHost);
|
|
25045
|
+
if (hostDiff !== 0) {
|
|
25046
|
+
return hostDiff;
|
|
25047
|
+
}
|
|
24951
25048
|
}
|
|
24952
25049
|
}
|
|
24953
25050
|
const microTypeDiff = (a.$type$ & 15 /* MICRO */) - (b.$type$ & 15 /* MICRO */);
|
|
@@ -24970,7 +25067,7 @@ function sortedFindIndex(sortedArray, value, rootVNode) {
|
|
|
24970
25067
|
while (bottom < top) {
|
|
24971
25068
|
const middle = bottom + (top - bottom >> 1);
|
|
24972
25069
|
const midChore = sortedArray[middle];
|
|
24973
|
-
const comp = choreComparator(value, midChore, rootVNode
|
|
25070
|
+
const comp = choreComparator(value, midChore, rootVNode);
|
|
24974
25071
|
if (comp < 0) {
|
|
24975
25072
|
top = middle;
|
|
24976
25073
|
} else if (comp > 0) {
|
|
@@ -25194,7 +25291,7 @@ var Signal = class {
|
|
|
25194
25291
|
// prevent accidental use as value
|
|
25195
25292
|
valueOf() {
|
|
25196
25293
|
if (qDev) {
|
|
25197
|
-
throw qError(
|
|
25294
|
+
throw qError(45 /* cannotCoerceSignal */);
|
|
25198
25295
|
}
|
|
25199
25296
|
}
|
|
25200
25297
|
toString() {
|
|
@@ -25359,7 +25456,7 @@ var ComputedSignal = class extends Signal {
|
|
|
25359
25456
|
try {
|
|
25360
25457
|
const untrackedValue = computeQrl.getFn(ctx)();
|
|
25361
25458
|
if (isPromise(untrackedValue)) {
|
|
25362
|
-
throw qError(
|
|
25459
|
+
throw qError(46 /* computedNotSync */, [
|
|
25363
25460
|
computeQrl.dev ? computeQrl.dev.file : "",
|
|
25364
25461
|
computeQrl.$hash$
|
|
25365
25462
|
]);
|
|
@@ -25382,7 +25479,7 @@ var ComputedSignal = class extends Signal {
|
|
|
25382
25479
|
return super.value;
|
|
25383
25480
|
}
|
|
25384
25481
|
set value(_) {
|
|
25385
|
-
throw qError(
|
|
25482
|
+
throw qError(47 /* computedReadOnly */);
|
|
25386
25483
|
}
|
|
25387
25484
|
};
|
|
25388
25485
|
var WrappedSignal = class extends Signal {
|
|
@@ -25448,7 +25545,7 @@ var WrappedSignal = class extends Signal {
|
|
|
25448
25545
|
return super.value;
|
|
25449
25546
|
}
|
|
25450
25547
|
set value(_) {
|
|
25451
|
-
throw qError(
|
|
25548
|
+
throw qError(48 /* wrappedReadOnly */);
|
|
25452
25549
|
}
|
|
25453
25550
|
};
|
|
25454
25551
|
|
|
@@ -27276,51 +27373,6 @@ var vnode_getType = (vnode) => {
|
|
|
27276
27373
|
};
|
|
27277
27374
|
var isElement = (node) => node && typeof node == "object" && fastNodeType(node) === /** Node.ELEMENT_NODE* */
|
|
27278
27375
|
1;
|
|
27279
|
-
var aPath = [];
|
|
27280
|
-
var bPath = [];
|
|
27281
|
-
var vnode_documentPosition = (a, b, rootVNode) => {
|
|
27282
|
-
if (a === b) {
|
|
27283
|
-
return 0;
|
|
27284
|
-
}
|
|
27285
|
-
let aDepth = -1;
|
|
27286
|
-
let bDepth = -1;
|
|
27287
|
-
while (a) {
|
|
27288
|
-
const vNode = aPath[++aDepth] = a;
|
|
27289
|
-
a = vNode[1 /* parent */] || rootVNode && vnode_getProp(a, QSlotParent, (id) => vnode_locate(rootVNode, id));
|
|
27290
|
-
}
|
|
27291
|
-
while (b) {
|
|
27292
|
-
const vNode = bPath[++bDepth] = b;
|
|
27293
|
-
b = vNode[1 /* parent */] || rootVNode && vnode_getProp(b, QSlotParent, (id) => vnode_locate(rootVNode, id));
|
|
27294
|
-
}
|
|
27295
|
-
while (aDepth >= 0 && bDepth >= 0) {
|
|
27296
|
-
a = aPath[aDepth];
|
|
27297
|
-
b = bPath[bDepth];
|
|
27298
|
-
if (a === b) {
|
|
27299
|
-
aDepth--;
|
|
27300
|
-
bDepth--;
|
|
27301
|
-
} else {
|
|
27302
|
-
let cursor = b;
|
|
27303
|
-
do {
|
|
27304
|
-
cursor = vnode_getNextSibling(cursor);
|
|
27305
|
-
if (cursor === a) {
|
|
27306
|
-
return 1;
|
|
27307
|
-
}
|
|
27308
|
-
} while (cursor);
|
|
27309
|
-
cursor = b;
|
|
27310
|
-
do {
|
|
27311
|
-
cursor = vnode_getPreviousSibling(cursor);
|
|
27312
|
-
if (cursor === a) {
|
|
27313
|
-
return -1;
|
|
27314
|
-
}
|
|
27315
|
-
} while (cursor);
|
|
27316
|
-
if (rootVNode && vnode_getProp(b, QSlotParent, (id) => vnode_locate(rootVNode, id))) {
|
|
27317
|
-
return -1;
|
|
27318
|
-
}
|
|
27319
|
-
return 1;
|
|
27320
|
-
}
|
|
27321
|
-
}
|
|
27322
|
-
return aDepth < bDepth ? -1 : 1;
|
|
27323
|
-
};
|
|
27324
27376
|
var vnode_getProjectionParentComponent = (vHost, rootVNode) => {
|
|
27325
27377
|
let projectionDepth = 1;
|
|
27326
27378
|
while (projectionDepth--) {
|
|
@@ -32176,7 +32228,7 @@ var SSRContainer = class extends _SharedContainer2 {
|
|
|
32176
32228
|
let styleScopedId = null;
|
|
32177
32229
|
if (isSSRUnsafeAttr(key)) {
|
|
32178
32230
|
if (isDev11) {
|
|
32179
|
-
throw qError(
|
|
32231
|
+
throw qError(50 /* unsafeAttr */);
|
|
32180
32232
|
}
|
|
32181
32233
|
continue;
|
|
32182
32234
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qwik.dev/core",
|
|
3
3
|
"description": "An open source framework for building instant loading web apps at any scale, without the extra effort.",
|
|
4
|
-
"version": "2.0.0-alpha.
|
|
4
|
+
"version": "2.0.0-alpha.6",
|
|
5
5
|
"author": "Qwik Team",
|
|
6
6
|
"bin": {
|
|
7
7
|
"qwik": "./qwik-cli.cjs"
|
|
@@ -11,13 +11,13 @@
|
|
|
11
11
|
"csstype": "^3.1"
|
|
12
12
|
},
|
|
13
13
|
"devDependencies": {
|
|
14
|
+
"ignore": "5.3.1",
|
|
14
15
|
"image-size": "1.1.1",
|
|
15
16
|
"kleur": "4.1.5",
|
|
16
|
-
"ignore": "5.3.1",
|
|
17
17
|
"prettier": "3.3.3",
|
|
18
18
|
"ts-morph": "23.0.0",
|
|
19
19
|
"vitest": "2.1.4",
|
|
20
|
-
"@qwik.dev/core": "2.0.0-alpha.
|
|
20
|
+
"@qwik.dev/core": "2.0.0-alpha.6",
|
|
21
21
|
"@qwik.dev/dom": "2.1.19"
|
|
22
22
|
},
|
|
23
23
|
"engines": {
|