@qwik.dev/core 2.0.0-beta.13 → 2.0.0-beta.14
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 +5633 -0
- package/dist/core-internal.d.ts +76 -50
- package/dist/core.min.mjs +1 -1
- package/dist/core.mjs +179 -82
- package/dist/core.mjs.map +1 -1
- package/dist/core.prod.mjs +125 -71
- package/dist/loader/index.mjs +2 -2
- package/dist/loader/package.json +1 -1
- package/dist/optimizer.mjs +1283 -1280
- package/dist/qwikloader.debug.js +5 -0
- package/dist/qwikloader.js +1 -1
- package/dist/server.mjs +4 -4
- package/dist/starters/adapters/aws-lambda/package.json +2 -1
- package/dist/starters/adapters/azure-swa/package.json +2 -1
- package/dist/starters/adapters/bun/package.json +2 -1
- package/dist/starters/adapters/cloud-run/package.json +2 -1
- package/dist/starters/adapters/cloudflare-pages/package.json +2 -1
- package/dist/starters/adapters/deno/package.json +2 -1
- package/dist/starters/adapters/express/package.json +2 -1
- package/dist/starters/adapters/fastify/package.json +2 -1
- package/dist/starters/adapters/firebase/package.json +2 -1
- package/dist/starters/adapters/netlify-edge/package.json +2 -1
- package/dist/starters/adapters/node-server/package.json +2 -1
- package/dist/starters/adapters/ssg/package.json +2 -1
- package/dist/starters/adapters/vercel-edge/package.json +2 -1
- package/dist/starters/features/storybook/.storybook/tsconfig.json +0 -1
- package/dist/starters/features/styled-vanilla-extract/package.json +2 -1
- package/dist/testing/index.d.ts +2 -3
- package/dist/testing/index.mjs +188 -82
- package/dist/testing/package.json +1 -1
- package/package.json +14 -48
- package/{qwik-cli.cjs → qwik-cli.mjs} +1 -1
- package/dist/backpatch/index.cjs +0 -6
- package/dist/build/index.cjs +0 -35
- package/dist/build/index.cjs.map +0 -7
- package/dist/build/index.dev.cjs +0 -37
- package/dist/build/index.dev.cjs.map +0 -7
- package/dist/build/index.prod.cjs +0 -37
- package/dist/build/index.prod.cjs.map +0 -7
- package/dist/cli.cjs +0 -12956
- package/dist/core.cjs +0 -13036
- package/dist/core.cjs.map +0 -1
- package/dist/core.prod.cjs +0 -6377
- package/dist/insights/index.qwik.cjs +0 -1
- package/dist/insights/vite/index.cjs +0 -1
- package/dist/loader/index.cjs +0 -4
- package/dist/optimizer.cjs +0 -217
- package/dist/preloader.cjs +0 -266
- package/dist/server.cjs +0 -3294
- package/dist/testing/index.cjs +0 -36225
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.14-dev+1e7496d
|
|
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
|
|
@@ -24161,21 +24161,14 @@ var PropsProxyHandler = class {
|
|
|
24161
24161
|
}
|
|
24162
24162
|
}
|
|
24163
24163
|
if (this.owner.constProps && prop in this.owner.constProps) {
|
|
24164
|
-
this.owner.constProps[prop]
|
|
24165
|
-
|
|
24166
|
-
|
|
24167
|
-
}
|
|
24168
|
-
|
|
24169
|
-
|
|
24170
|
-
if (this.owner.varProps === EMPTY_OBJ) {
|
|
24171
|
-
this.owner.varProps = {};
|
|
24172
|
-
} else {
|
|
24173
|
-
if (!(prop in this.owner.varProps)) {
|
|
24174
|
-
this.owner.toSort = true;
|
|
24175
|
-
}
|
|
24176
|
-
}
|
|
24177
|
-
this.owner.varProps[prop] = value;
|
|
24164
|
+
delete this.owner.constProps[prop];
|
|
24165
|
+
}
|
|
24166
|
+
if (this.owner.varProps === EMPTY_OBJ) {
|
|
24167
|
+
this.owner.varProps = {};
|
|
24168
|
+
} else if (!(prop in this.owner.varProps)) {
|
|
24169
|
+
this.owner.toSort = true;
|
|
24178
24170
|
}
|
|
24171
|
+
this.owner.varProps[prop] = value;
|
|
24179
24172
|
}
|
|
24180
24173
|
return true;
|
|
24181
24174
|
}
|
|
@@ -24234,6 +24227,19 @@ var isPropsProxy = (obj) => {
|
|
|
24234
24227
|
return obj && _VAR_PROPS in obj;
|
|
24235
24228
|
};
|
|
24236
24229
|
|
|
24230
|
+
// packages/qwik/src/core/use/utils/destroyable.ts
|
|
24231
|
+
var cleanupDestroyable = (destroyable) => {
|
|
24232
|
+
const destroy = destroyable.$destroy$;
|
|
24233
|
+
if (destroy) {
|
|
24234
|
+
destroyable.$destroy$ = null;
|
|
24235
|
+
try {
|
|
24236
|
+
destroy();
|
|
24237
|
+
} catch (err) {
|
|
24238
|
+
logError(err);
|
|
24239
|
+
}
|
|
24240
|
+
}
|
|
24241
|
+
};
|
|
24242
|
+
|
|
24237
24243
|
// packages/qwik/src/core/reactive-primitives/subscriber.ts
|
|
24238
24244
|
import { isServer as isServer3 } from "@qwik.dev/core/build";
|
|
24239
24245
|
function getSubscriber(effect, prop, data) {
|
|
@@ -24293,13 +24299,13 @@ var cleanupFn = (target, handleError) => {
|
|
|
24293
24299
|
cleanupFns = [];
|
|
24294
24300
|
target.$destroy$ = noSerialize(() => {
|
|
24295
24301
|
target.$destroy$ = null;
|
|
24296
|
-
|
|
24302
|
+
for (const fn2 of cleanupFns) {
|
|
24297
24303
|
try {
|
|
24298
24304
|
fn2();
|
|
24299
24305
|
} catch (err) {
|
|
24300
24306
|
handleError(err);
|
|
24301
24307
|
}
|
|
24302
|
-
}
|
|
24308
|
+
}
|
|
24303
24309
|
});
|
|
24304
24310
|
}
|
|
24305
24311
|
cleanupFns.push(fn);
|
|
@@ -24505,6 +24511,7 @@ var AsyncComputedSignalImpl = class extends (_b2 = ComputedSignalImpl, _a2 = _EF
|
|
|
24505
24511
|
__publicField(this, "$errorEffects$", null);
|
|
24506
24512
|
__publicField(this, "$destroy$");
|
|
24507
24513
|
__publicField(this, "$promiseValue$", NEEDS_COMPUTATION);
|
|
24514
|
+
__publicField(this, "$promise$", null);
|
|
24508
24515
|
__publicField(this, _a2, null);
|
|
24509
24516
|
}
|
|
24510
24517
|
/**
|
|
@@ -24556,9 +24563,10 @@ var AsyncComputedSignalImpl = class extends (_b2 = ComputedSignalImpl, _a2 = _EF
|
|
|
24556
24563
|
}
|
|
24557
24564
|
invalidate() {
|
|
24558
24565
|
super.invalidate();
|
|
24559
|
-
this.$
|
|
24566
|
+
this.$promise$ = null;
|
|
24560
24567
|
}
|
|
24561
|
-
async
|
|
24568
|
+
async promise() {
|
|
24569
|
+
this.$promise$ = null;
|
|
24562
24570
|
await retryOnPromise(() => this.$computeIfNeeded$());
|
|
24563
24571
|
return this.$untrackedValue$;
|
|
24564
24572
|
}
|
|
@@ -24566,31 +24574,62 @@ var AsyncComputedSignalImpl = class extends (_b2 = ComputedSignalImpl, _a2 = _EF
|
|
|
24566
24574
|
if (!(this.$flags$ & 1 /* INVALID */)) {
|
|
24567
24575
|
return;
|
|
24568
24576
|
}
|
|
24569
|
-
const
|
|
24570
|
-
|
|
24571
|
-
|
|
24572
|
-
|
|
24573
|
-
|
|
24577
|
+
const untrackedValue = (
|
|
24578
|
+
// first time
|
|
24579
|
+
this.$promiseValue$ === NEEDS_COMPUTATION || // or after invalidation
|
|
24580
|
+
this.$promise$ === null ? this.$promiseComputation$() : this.$promiseValue$
|
|
24581
|
+
);
|
|
24574
24582
|
if (isPromise(untrackedValue)) {
|
|
24583
|
+
const isFirstComputation = this.$promiseValue$ === NEEDS_COMPUTATION;
|
|
24575
24584
|
this.untrackedLoading = true;
|
|
24576
24585
|
this.untrackedError = null;
|
|
24577
|
-
|
|
24586
|
+
if (this.$promiseValue$ !== NEEDS_COMPUTATION) {
|
|
24587
|
+
cleanupDestroyable(this);
|
|
24588
|
+
}
|
|
24589
|
+
const promise = untrackedValue.then((promiseValue) => {
|
|
24590
|
+
DEBUG3 && log3("Promise resolved", promiseValue);
|
|
24578
24591
|
this.$promiseValue$ = promiseValue;
|
|
24579
24592
|
this.untrackedLoading = false;
|
|
24580
24593
|
this.untrackedError = null;
|
|
24594
|
+
if (this.setValue(promiseValue)) {
|
|
24595
|
+
DEBUG3 && log3("Scheduling effects for subscribers", this.$effects$?.size);
|
|
24596
|
+
scheduleEffects(this.$container$, this, this.$effects$);
|
|
24597
|
+
}
|
|
24581
24598
|
}).catch((err) => {
|
|
24599
|
+
if (isPromise(err)) {
|
|
24600
|
+
return;
|
|
24601
|
+
}
|
|
24602
|
+
DEBUG3 && log3("Error caught in promise.catch", err);
|
|
24582
24603
|
this.$promiseValue$ = err;
|
|
24583
24604
|
this.untrackedLoading = false;
|
|
24584
24605
|
this.untrackedError = err;
|
|
24585
24606
|
});
|
|
24607
|
+
if (isFirstComputation) {
|
|
24608
|
+
throw promise;
|
|
24609
|
+
} else {
|
|
24610
|
+
DEBUG3 && log3("Returning stale value", this.$untrackedValue$, "while computing", untrackedValue);
|
|
24611
|
+
return promise;
|
|
24612
|
+
}
|
|
24613
|
+
} else {
|
|
24614
|
+
this.setValue(untrackedValue);
|
|
24615
|
+
}
|
|
24616
|
+
}
|
|
24617
|
+
async $promiseComputation$() {
|
|
24618
|
+
if (!this.$promise$) {
|
|
24619
|
+
const [cleanup2] = cleanupFn(this, (err) => this.$container$?.handleError(err, null));
|
|
24620
|
+
this.$promise$ = this.$computeQrl$.getFn()({
|
|
24621
|
+
track: trackFn(this, this.$container$),
|
|
24622
|
+
cleanup: cleanup2
|
|
24623
|
+
});
|
|
24586
24624
|
}
|
|
24587
|
-
this.$
|
|
24588
|
-
|
|
24625
|
+
return this.$promise$;
|
|
24626
|
+
}
|
|
24627
|
+
setValue(value) {
|
|
24589
24628
|
this.$flags$ &= ~1 /* INVALID */;
|
|
24590
|
-
const didChange =
|
|
24629
|
+
const didChange = value !== this.$untrackedValue$;
|
|
24591
24630
|
if (didChange) {
|
|
24631
|
+
this.$untrackedValue$ = value;
|
|
24592
24632
|
this.$flags$ |= 2 /* RUN_EFFECTS */;
|
|
24593
|
-
this.$untrackedValue$ = untrackedValue;
|
|
24594
24633
|
}
|
|
24595
24634
|
return didChange;
|
|
24596
24635
|
}
|
|
@@ -25414,9 +25453,12 @@ function clearAsyncComputedSignal(producer, effect) {
|
|
|
25414
25453
|
function clearStore(producer, effect) {
|
|
25415
25454
|
const effects = producer?.$effects$;
|
|
25416
25455
|
if (effects) {
|
|
25417
|
-
for (const propEffects of effects.
|
|
25456
|
+
for (const [propKey, propEffects] of effects.entries()) {
|
|
25418
25457
|
if (propEffects.has(effect)) {
|
|
25419
25458
|
propEffects.delete(effect);
|
|
25459
|
+
if (propEffects.size === 0) {
|
|
25460
|
+
effects.delete(propKey);
|
|
25461
|
+
}
|
|
25420
25462
|
}
|
|
25421
25463
|
}
|
|
25422
25464
|
}
|
|
@@ -25479,7 +25521,7 @@ var useSequentialScope = () => {
|
|
|
25479
25521
|
// packages/qwik/src/core/use/use-task.ts
|
|
25480
25522
|
var runTask = (task, container, host) => {
|
|
25481
25523
|
task.$flags$ &= ~8 /* DIRTY */;
|
|
25482
|
-
|
|
25524
|
+
cleanupDestroyable(task);
|
|
25483
25525
|
const iCtx = newInvokeContext(container.$locale$, host, void 0, TaskEvent);
|
|
25484
25526
|
iCtx.$container$ = container;
|
|
25485
25527
|
const taskFn = task.$qrl$.getFn(iCtx, () => clearAllEffects(container, task));
|
|
@@ -25498,17 +25540,6 @@ var runTask = (task, container, host) => {
|
|
|
25498
25540
|
}
|
|
25499
25541
|
);
|
|
25500
25542
|
};
|
|
25501
|
-
var cleanupTask = (task) => {
|
|
25502
|
-
const destroy = task.$destroy$;
|
|
25503
|
-
if (destroy) {
|
|
25504
|
-
task.$destroy$ = null;
|
|
25505
|
-
try {
|
|
25506
|
-
destroy();
|
|
25507
|
-
} catch (err) {
|
|
25508
|
-
logError(err);
|
|
25509
|
-
}
|
|
25510
|
-
}
|
|
25511
|
-
};
|
|
25512
25543
|
var Task = class extends BackRef {
|
|
25513
25544
|
constructor($flags$, $index$, $el$, $qrl$, $state$, $destroy$) {
|
|
25514
25545
|
super();
|
|
@@ -26369,6 +26400,7 @@ var vnode_diff = (container, jsxNode, vStartNode, scopedStyleIdPrefix) => {
|
|
|
26369
26400
|
let journal = container.$journal$;
|
|
26370
26401
|
const stack2 = [];
|
|
26371
26402
|
const asyncQueue = [];
|
|
26403
|
+
const asyncAttributePromises = [];
|
|
26372
26404
|
let vParent = null;
|
|
26373
26405
|
let vCurrent = null;
|
|
26374
26406
|
let vNewNode = null;
|
|
@@ -26708,6 +26740,12 @@ var vnode_diff = (container, jsxNode, vStartNode, scopedStyleIdPrefix) => {
|
|
|
26708
26740
|
diff(jsxNode2, vHostNode);
|
|
26709
26741
|
}
|
|
26710
26742
|
}
|
|
26743
|
+
if (asyncAttributePromises.length) {
|
|
26744
|
+
const promises = asyncAttributePromises.splice(0);
|
|
26745
|
+
return Promise.all(promises).then(() => {
|
|
26746
|
+
return drainAsyncQueue();
|
|
26747
|
+
});
|
|
26748
|
+
}
|
|
26711
26749
|
}
|
|
26712
26750
|
function expectNoChildren() {
|
|
26713
26751
|
const vFirstChild = vCurrent && vnode_getFirstChild(vCurrent);
|
|
@@ -26749,11 +26787,11 @@ var vnode_diff = (container, jsxNode, vStartNode, scopedStyleIdPrefix) => {
|
|
|
26749
26787
|
if (vHost.flags & 64 /* NS_svg */) {
|
|
26750
26788
|
const namespace = getAttributeNamespace(key2);
|
|
26751
26789
|
if (namespace) {
|
|
26752
|
-
element.setAttributeNS(namespace, key2,
|
|
26790
|
+
element.setAttributeNS(namespace, key2, value);
|
|
26753
26791
|
return;
|
|
26754
26792
|
}
|
|
26755
26793
|
}
|
|
26756
|
-
element.setAttribute(key2,
|
|
26794
|
+
element.setAttribute(key2, value);
|
|
26757
26795
|
}
|
|
26758
26796
|
}
|
|
26759
26797
|
const { constProps } = jsx2;
|
|
@@ -26799,7 +26837,10 @@ var vnode_diff = (container, jsxNode, vStartNode, scopedStyleIdPrefix) => {
|
|
|
26799
26837
|
}
|
|
26800
26838
|
if (isPromise(value)) {
|
|
26801
26839
|
const vHost = vNewNode;
|
|
26802
|
-
value.then(
|
|
26840
|
+
const attributePromise = value.then(
|
|
26841
|
+
(resolvedValue) => setAttribute(key2, resolvedValue, vHost)
|
|
26842
|
+
);
|
|
26843
|
+
asyncAttributePromises.push(attributePromise);
|
|
26803
26844
|
continue;
|
|
26804
26845
|
}
|
|
26805
26846
|
if (key2 === dangerouslySetInnerHTML) {
|
|
@@ -26972,7 +27013,10 @@ var vnode_diff = (container, jsxNode, vStartNode, scopedStyleIdPrefix) => {
|
|
|
26972
27013
|
}
|
|
26973
27014
|
if (isPromise(value)) {
|
|
26974
27015
|
const vHost = vnode;
|
|
26975
|
-
value.then(
|
|
27016
|
+
const attributePromise = value.then(
|
|
27017
|
+
(resolvedValue) => setAttribute(key, resolvedValue, vHost)
|
|
27018
|
+
);
|
|
27019
|
+
asyncAttributePromises.push(attributePromise);
|
|
26976
27020
|
return;
|
|
26977
27021
|
}
|
|
26978
27022
|
setAttribute(key, value, vnode);
|
|
@@ -27409,25 +27453,26 @@ function cleanup(container, vNode) {
|
|
|
27409
27453
|
if (type & 3 /* ELEMENT_OR_VIRTUAL_MASK */) {
|
|
27410
27454
|
clearAllEffects(container, vCursor);
|
|
27411
27455
|
markVNodeAsDeleted(vCursor);
|
|
27412
|
-
|
|
27456
|
+
const isComponent = type & 2 /* Virtual */ && vCursor.getProp(OnRenderProp, null) !== null;
|
|
27457
|
+
if (isComponent) {
|
|
27413
27458
|
const seq = container.getHostProp(vCursor, ELEMENT_SEQ);
|
|
27414
27459
|
if (seq) {
|
|
27415
27460
|
for (let i = 0; i < seq.length; i++) {
|
|
27416
27461
|
const obj = seq[i];
|
|
27417
|
-
if (
|
|
27418
|
-
const
|
|
27419
|
-
|
|
27420
|
-
|
|
27421
|
-
|
|
27422
|
-
} else {
|
|
27423
|
-
|
|
27462
|
+
if (isObject(obj)) {
|
|
27463
|
+
const objIsTask = isTask(obj);
|
|
27464
|
+
if (objIsTask && obj.$flags$ & 1 /* VISIBLE_TASK */) {
|
|
27465
|
+
container.$scheduler$(32 /* CLEANUP_VISIBLE */, obj);
|
|
27466
|
+
continue;
|
|
27467
|
+
} else if (obj instanceof SignalImpl || isStore(obj)) {
|
|
27468
|
+
clearAllEffects(container, obj);
|
|
27469
|
+
}
|
|
27470
|
+
if (objIsTask || obj instanceof AsyncComputedSignalImpl) {
|
|
27471
|
+
cleanupDestroyable(obj);
|
|
27424
27472
|
}
|
|
27425
27473
|
}
|
|
27426
27474
|
}
|
|
27427
27475
|
}
|
|
27428
|
-
}
|
|
27429
|
-
const isComponent = type & 2 /* Virtual */ && vCursor.getProp(OnRenderProp, null) !== null;
|
|
27430
|
-
if (isComponent) {
|
|
27431
27476
|
const attrs = vnode_getProps(vCursor);
|
|
27432
27477
|
for (let i = 0; i < attrs.length; i = i + 2) {
|
|
27433
27478
|
const key = attrs[i];
|
|
@@ -27528,7 +27573,7 @@ var createResourceReturn = (container, opts, initialPromise) => {
|
|
|
27528
27573
|
};
|
|
27529
27574
|
var runResource = (task, container, host) => {
|
|
27530
27575
|
task.$flags$ &= ~8 /* DIRTY */;
|
|
27531
|
-
|
|
27576
|
+
cleanupDestroyable(task);
|
|
27532
27577
|
const iCtx = newInvokeContext(container.$locale$, host, void 0, ResourceEvent);
|
|
27533
27578
|
iCtx.$container$ = container;
|
|
27534
27579
|
const taskFn = task.$qrl$.getFn(iCtx, () => clearAllEffects(container, task));
|
|
@@ -27618,7 +27663,7 @@ var runResource = (task, container, host) => {
|
|
|
27618
27663
|
promise,
|
|
27619
27664
|
delay(timeout).then(() => {
|
|
27620
27665
|
if (setState(false, new Error("timeout"))) {
|
|
27621
|
-
|
|
27666
|
+
cleanupDestroyable(task);
|
|
27622
27667
|
}
|
|
27623
27668
|
})
|
|
27624
27669
|
]);
|
|
@@ -28003,6 +28048,8 @@ var createScheduler = (container, journalFlush, choreQueue, blockedChores, runni
|
|
|
28003
28048
|
let currentTime = performance.now();
|
|
28004
28049
|
const nextTick = createNextTick(drainChoreQueue);
|
|
28005
28050
|
let flushTimerId = null;
|
|
28051
|
+
let blockingChoresCount = 0;
|
|
28052
|
+
let currentChore = null;
|
|
28006
28053
|
function drainInNextTick() {
|
|
28007
28054
|
if (!drainScheduled) {
|
|
28008
28055
|
drainScheduled = true;
|
|
@@ -28073,6 +28120,9 @@ Problematic chore:
|
|
|
28073
28120
|
This is often caused by modifying a signal in an already rendered component during SSR.`;
|
|
28074
28121
|
logWarn(warningMessage);
|
|
28075
28122
|
DEBUG6 && debugTrace("schedule.SKIPPED host is not updatable", chore, choreQueue, blockedChores);
|
|
28123
|
+
if (isRenderBlocking(type)) {
|
|
28124
|
+
blockingChoresCount--;
|
|
28125
|
+
}
|
|
28076
28126
|
return chore;
|
|
28077
28127
|
}
|
|
28078
28128
|
}
|
|
@@ -28096,8 +28146,13 @@ This is often caused by modifying a signal in an already rendered component duri
|
|
|
28096
28146
|
return chore;
|
|
28097
28147
|
}
|
|
28098
28148
|
}
|
|
28099
|
-
|
|
28100
|
-
DEBUG6 && debugTrace(
|
|
28149
|
+
addChoreAndIncrementBlockingCounter(chore, choreQueue);
|
|
28150
|
+
DEBUG6 && debugTrace(
|
|
28151
|
+
isRenderBlocking(type) ? `schedule (blocking ${blockingChoresCount})` : "schedule",
|
|
28152
|
+
chore,
|
|
28153
|
+
choreQueue,
|
|
28154
|
+
blockedChores
|
|
28155
|
+
);
|
|
28101
28156
|
const runImmediately = isServer6 && type === 6 /* COMPONENT */ || type === 2 /* RUN_QRL */;
|
|
28102
28157
|
if (runImmediately && !isDraining) {
|
|
28103
28158
|
immediateDrain();
|
|
@@ -28139,6 +28194,15 @@ This is often caused by modifying a signal in an already rendered component duri
|
|
|
28139
28194
|
}, delay2);
|
|
28140
28195
|
}
|
|
28141
28196
|
function applyJournalFlush() {
|
|
28197
|
+
if (blockingChoresCount > 0) {
|
|
28198
|
+
DEBUG6 && debugTrace(
|
|
28199
|
+
`journalFlush.BLOCKED (${blockingChoresCount} blocking chores)`,
|
|
28200
|
+
null,
|
|
28201
|
+
choreQueue,
|
|
28202
|
+
blockedChores
|
|
28203
|
+
);
|
|
28204
|
+
return;
|
|
28205
|
+
}
|
|
28142
28206
|
if (!isJournalFlushRunning) {
|
|
28143
28207
|
isJournalFlushRunning = true;
|
|
28144
28208
|
journalFlush();
|
|
@@ -28204,7 +28268,7 @@ This is often caused by modifying a signal in an already rendered component duri
|
|
|
28204
28268
|
if (vnode_isVNode(blockedChore.$host$)) {
|
|
28205
28269
|
blockedChore.$host$.blockedChores?.delete(blockedChore);
|
|
28206
28270
|
}
|
|
28207
|
-
|
|
28271
|
+
addChoreAndIncrementBlockingCounter(blockedChore, choreQueue);
|
|
28208
28272
|
DEBUG6 && debugTrace("schedule.UNBLOCKED", blockedChore, choreQueue, blockedChores);
|
|
28209
28273
|
blockedChoresScheduled = true;
|
|
28210
28274
|
}
|
|
@@ -28215,7 +28279,6 @@ This is often caused by modifying a signal in an already rendered component duri
|
|
|
28215
28279
|
drainInNextTick();
|
|
28216
28280
|
}
|
|
28217
28281
|
};
|
|
28218
|
-
let currentChore = null;
|
|
28219
28282
|
try {
|
|
28220
28283
|
while (choreQueue.length) {
|
|
28221
28284
|
currentTime = performance.now();
|
|
@@ -28229,6 +28292,9 @@ This is often caused by modifying a signal in an already rendered component duri
|
|
|
28229
28292
|
if (vnode_isVNode(chore.$host$)) {
|
|
28230
28293
|
chore.$host$.chores?.delete(chore);
|
|
28231
28294
|
}
|
|
28295
|
+
if (isRenderBlocking(chore.$type$)) {
|
|
28296
|
+
blockingChoresCount--;
|
|
28297
|
+
}
|
|
28232
28298
|
continue;
|
|
28233
28299
|
}
|
|
28234
28300
|
if (chore.$type$ === 16 /* VISIBLE */) {
|
|
@@ -28290,12 +28356,32 @@ This is often caused by modifying a signal in an already rendered component duri
|
|
|
28290
28356
|
if (vnode_isVNode(chore.$host$)) {
|
|
28291
28357
|
chore.$host$.chores?.delete(chore);
|
|
28292
28358
|
}
|
|
28293
|
-
|
|
28359
|
+
if (isRenderBlocking(chore.$type$)) {
|
|
28360
|
+
blockingChoresCount--;
|
|
28361
|
+
DEBUG6 && debugTrace(
|
|
28362
|
+
`execute.DONE (blocking ${blockingChoresCount})`,
|
|
28363
|
+
chore,
|
|
28364
|
+
choreQueue,
|
|
28365
|
+
blockedChores
|
|
28366
|
+
);
|
|
28367
|
+
} else {
|
|
28368
|
+
DEBUG6 && debugTrace("execute.DONE", chore, choreQueue, blockedChores);
|
|
28369
|
+
}
|
|
28294
28370
|
}
|
|
28295
28371
|
function handleError(chore, e) {
|
|
28296
28372
|
chore.$endTime$ = performance.now();
|
|
28297
28373
|
chore.$state$ = 2 /* FAILED */;
|
|
28298
|
-
|
|
28374
|
+
if (isRenderBlocking(chore.$type$)) {
|
|
28375
|
+
blockingChoresCount--;
|
|
28376
|
+
DEBUG6 && debugTrace(
|
|
28377
|
+
`execute.ERROR (blocking ${blockingChoresCount})`,
|
|
28378
|
+
chore,
|
|
28379
|
+
choreQueue,
|
|
28380
|
+
blockedChores
|
|
28381
|
+
);
|
|
28382
|
+
} else {
|
|
28383
|
+
DEBUG6 && debugTrace("execute.ERROR", chore, choreQueue, blockedChores);
|
|
28384
|
+
}
|
|
28299
28385
|
chore.$reject$?.(e);
|
|
28300
28386
|
container.handleError(e, chore.$host$);
|
|
28301
28387
|
}
|
|
@@ -28354,18 +28440,21 @@ This is often caused by modifying a signal in an already rendered component duri
|
|
|
28354
28440
|
host
|
|
28355
28441
|
);
|
|
28356
28442
|
} else {
|
|
28357
|
-
|
|
28358
|
-
|
|
28359
|
-
|
|
28360
|
-
|
|
28361
|
-
|
|
28443
|
+
const task = payload;
|
|
28444
|
+
returnValue = runTask(task, container, host);
|
|
28445
|
+
if (task.$flags$ & 16 /* RENDER_BLOCKING */) {
|
|
28446
|
+
blockingChoresCount++;
|
|
28447
|
+
returnValue = maybeThen(returnValue, () => {
|
|
28448
|
+
blockingChoresCount--;
|
|
28449
|
+
});
|
|
28450
|
+
}
|
|
28362
28451
|
}
|
|
28363
28452
|
}
|
|
28364
28453
|
break;
|
|
28365
28454
|
case 32 /* CLEANUP_VISIBLE */:
|
|
28366
28455
|
{
|
|
28367
28456
|
const task = chore.$payload$;
|
|
28368
|
-
|
|
28457
|
+
cleanupDestroyable(task);
|
|
28369
28458
|
}
|
|
28370
28459
|
break;
|
|
28371
28460
|
case 4 /* NODE_DIFF */:
|
|
@@ -28468,7 +28557,23 @@ This is often caused by modifying a signal in an already rendered component duri
|
|
|
28468
28557
|
}
|
|
28469
28558
|
return null;
|
|
28470
28559
|
}
|
|
28560
|
+
function addChoreAndIncrementBlockingCounter(chore, choreArray) {
|
|
28561
|
+
if (addChore(chore, choreArray)) {
|
|
28562
|
+
blockingChoresCount++;
|
|
28563
|
+
}
|
|
28564
|
+
}
|
|
28471
28565
|
};
|
|
28566
|
+
function addChore(chore, choreArray) {
|
|
28567
|
+
var _a5;
|
|
28568
|
+
const idx = choreArray.add(chore);
|
|
28569
|
+
if (idx < 0) {
|
|
28570
|
+
if (vnode_isVNode(chore.$host$)) {
|
|
28571
|
+
((_a5 = chore.$host$).chores || (_a5.chores = new ChoreArray())).add(chore);
|
|
28572
|
+
}
|
|
28573
|
+
return isRenderBlocking(chore.$type$);
|
|
28574
|
+
}
|
|
28575
|
+
return false;
|
|
28576
|
+
}
|
|
28472
28577
|
function vNodeAlreadyDeleted(chore) {
|
|
28473
28578
|
return !!(chore.$host$ && vnode_isVNode(chore.$host$) && chore.$host$.flags & 32 /* Deleted */);
|
|
28474
28579
|
}
|
|
@@ -28486,12 +28591,8 @@ function addBlockedChore(blockedChore, blockingChore, blockedChores) {
|
|
|
28486
28591
|
((_a5 = blockedChore.$host$).blockedChores || (_a5.blockedChores = new ChoreArray())).add(blockedChore);
|
|
28487
28592
|
}
|
|
28488
28593
|
}
|
|
28489
|
-
function
|
|
28490
|
-
|
|
28491
|
-
const idx = choreArray.add(chore);
|
|
28492
|
-
if (idx < 0 && vnode_isVNode(chore.$host$)) {
|
|
28493
|
-
((_a5 = chore.$host$).chores || (_a5.chores = new ChoreArray())).add(chore);
|
|
28494
|
-
}
|
|
28594
|
+
function isRenderBlocking(type) {
|
|
28595
|
+
return type === 4 /* NODE_DIFF */ || type === 6 /* COMPONENT */;
|
|
28495
28596
|
}
|
|
28496
28597
|
function choreTypeToName(type) {
|
|
28497
28598
|
return {
|
|
@@ -28713,15 +28814,16 @@ function qrlToString(serializationContext, value, raw) {
|
|
|
28713
28814
|
chunk = "";
|
|
28714
28815
|
symbol = String(serializationContext.$addSyncFn$(null, 0, fn));
|
|
28715
28816
|
}
|
|
28716
|
-
|
|
28717
|
-
|
|
28817
|
+
let capturedIds = null;
|
|
28818
|
+
if (Array.isArray(value.$captureRef$) && value.$captureRef$.length > 0) {
|
|
28819
|
+
capturedIds = value.$captureRef$.map((ref) => `${serializationContext.$addRoot$(ref)}`);
|
|
28718
28820
|
}
|
|
28719
28821
|
if (raw) {
|
|
28720
|
-
return [chunk, symbol,
|
|
28822
|
+
return [chunk, symbol, capturedIds];
|
|
28721
28823
|
}
|
|
28722
28824
|
let qrlStringInline = `${chunk}#${symbol}`;
|
|
28723
|
-
if (
|
|
28724
|
-
qrlStringInline += `[${
|
|
28825
|
+
if (capturedIds && capturedIds.length > 0) {
|
|
28826
|
+
qrlStringInline += `[${capturedIds.join(" ")}]`;
|
|
28725
28827
|
}
|
|
28726
28828
|
return qrlStringInline;
|
|
28727
28829
|
}
|
|
@@ -29992,6 +30094,7 @@ var inflate = (container, target, typeId, data) => {
|
|
|
29992
30094
|
const hasValue = d2.length > 6;
|
|
29993
30095
|
if (hasValue) {
|
|
29994
30096
|
asyncComputed.$untrackedValue$ = d2[6];
|
|
30097
|
+
asyncComputed.$promiseValue$ = d2[6];
|
|
29995
30098
|
}
|
|
29996
30099
|
asyncComputed.$flags$ |= 1 /* INVALID */;
|
|
29997
30100
|
break;
|
|
@@ -30974,6 +31077,9 @@ var DomContainer = class extends _SharedContainer {
|
|
|
30974
31077
|
this.$setServerData$();
|
|
30975
31078
|
element.setAttribute(QContainerAttr, "resumed" /* RESUMED */);
|
|
30976
31079
|
element.qContainer = this;
|
|
31080
|
+
if (!qTest && element.isConnected) {
|
|
31081
|
+
element.dispatchEvent(new CustomEvent("qresume", { bubbles: true }));
|
|
31082
|
+
}
|
|
30977
31083
|
const qwikStates = element.querySelectorAll('script[type="qwik/state"]');
|
|
30978
31084
|
if (qwikStates.length !== 0) {
|
|
30979
31085
|
const lastState = qwikStates[qwikStates.length - 1];
|