@cabloy/vue-runtime-core 3.5.9 → 3.5.11
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/runtime-core.cjs.js
CHANGED
|
@@ -2296,6 +2296,12 @@ function forEachElement(node, cb) {
|
|
|
2296
2296
|
}
|
|
2297
2297
|
|
|
2298
2298
|
const isAsyncWrapper = (i) => !!i.type.__asyncLoader;
|
|
2299
|
+
function _getValidZova(instance) {
|
|
2300
|
+
while (instance) {
|
|
2301
|
+
if (instance.zova) return instance.zova;
|
|
2302
|
+
instance = instance.parent;
|
|
2303
|
+
}
|
|
2304
|
+
}
|
|
2299
2305
|
/*! #__NO_SIDE_EFFECTS__ */
|
|
2300
2306
|
// @__NO_SIDE_EFFECTS__
|
|
2301
2307
|
function defineAsyncComponent(source) {
|
|
@@ -2313,19 +2319,17 @@ function defineAsyncComponent(source) {
|
|
|
2313
2319
|
suspensible = true,
|
|
2314
2320
|
onError: userOnError
|
|
2315
2321
|
} = source;
|
|
2316
|
-
let instanceAttrs = void 0;
|
|
2317
2322
|
let pendingRequest = null;
|
|
2318
2323
|
let resolvedComp;
|
|
2319
2324
|
let retries = 0;
|
|
2320
2325
|
const retry = () => {
|
|
2321
2326
|
retries++;
|
|
2322
2327
|
pendingRequest = null;
|
|
2323
|
-
return load(
|
|
2328
|
+
return load();
|
|
2324
2329
|
};
|
|
2325
|
-
const load = (
|
|
2326
|
-
instanceAttrs = attrs;
|
|
2330
|
+
const load = () => {
|
|
2327
2331
|
let thisRequest;
|
|
2328
|
-
return pendingRequest || (thisRequest = pendingRequest = loader(
|
|
2332
|
+
return pendingRequest || (thisRequest = pendingRequest = loader().catch((err) => {
|
|
2329
2333
|
err = err instanceof Error ? err : new Error(String(err));
|
|
2330
2334
|
if (userOnError) {
|
|
2331
2335
|
return new Promise((resolve, reject) => {
|
|
@@ -2371,7 +2375,12 @@ function defineAsyncComponent(source) {
|
|
|
2371
2375
|
if (resolvedComp) {
|
|
2372
2376
|
doHydrate();
|
|
2373
2377
|
} else {
|
|
2374
|
-
|
|
2378
|
+
const zova = _getValidZova(instance);
|
|
2379
|
+
zova.meta.ssr._hydratingInc();
|
|
2380
|
+
load().then(() => {
|
|
2381
|
+
!instance.isUnmounted && doHydrate();
|
|
2382
|
+
zova.meta.ssr._hydratingDec();
|
|
2383
|
+
});
|
|
2375
2384
|
}
|
|
2376
2385
|
},
|
|
2377
2386
|
get __asyncResolved() {
|
|
@@ -2393,7 +2402,7 @@ function defineAsyncComponent(source) {
|
|
|
2393
2402
|
);
|
|
2394
2403
|
};
|
|
2395
2404
|
if (suspensible && instance.suspense || isInSSRComponentSetup) {
|
|
2396
|
-
return load(
|
|
2405
|
+
return load().then((comp) => {
|
|
2397
2406
|
return () => createInnerComp(comp, instance);
|
|
2398
2407
|
}).catch((err) => {
|
|
2399
2408
|
onError(err);
|
|
@@ -2421,7 +2430,7 @@ function defineAsyncComponent(source) {
|
|
|
2421
2430
|
}
|
|
2422
2431
|
}, timeout);
|
|
2423
2432
|
}
|
|
2424
|
-
load(
|
|
2433
|
+
load().then(() => {
|
|
2425
2434
|
loaded.value = true;
|
|
2426
2435
|
if (instance.parent && isKeepAlive(instance.parent.vnode)) {
|
|
2427
2436
|
instance.parent.update();
|
|
@@ -1676,6 +1676,12 @@ function forEachElement(node, cb) {
|
|
|
1676
1676
|
}
|
|
1677
1677
|
|
|
1678
1678
|
const isAsyncWrapper = (i) => !!i.type.__asyncLoader;
|
|
1679
|
+
function _getValidZova(instance) {
|
|
1680
|
+
while (instance) {
|
|
1681
|
+
if (instance.zova) return instance.zova;
|
|
1682
|
+
instance = instance.parent;
|
|
1683
|
+
}
|
|
1684
|
+
}
|
|
1679
1685
|
/*! #__NO_SIDE_EFFECTS__ */
|
|
1680
1686
|
// @__NO_SIDE_EFFECTS__
|
|
1681
1687
|
function defineAsyncComponent(source) {
|
|
@@ -1693,19 +1699,17 @@ function defineAsyncComponent(source) {
|
|
|
1693
1699
|
suspensible = true,
|
|
1694
1700
|
onError: userOnError
|
|
1695
1701
|
} = source;
|
|
1696
|
-
let instanceAttrs = void 0;
|
|
1697
1702
|
let pendingRequest = null;
|
|
1698
1703
|
let resolvedComp;
|
|
1699
1704
|
let retries = 0;
|
|
1700
1705
|
const retry = () => {
|
|
1701
1706
|
retries++;
|
|
1702
1707
|
pendingRequest = null;
|
|
1703
|
-
return load(
|
|
1708
|
+
return load();
|
|
1704
1709
|
};
|
|
1705
|
-
const load = (
|
|
1706
|
-
instanceAttrs = attrs;
|
|
1710
|
+
const load = () => {
|
|
1707
1711
|
let thisRequest;
|
|
1708
|
-
return pendingRequest || (thisRequest = pendingRequest = loader(
|
|
1712
|
+
return pendingRequest || (thisRequest = pendingRequest = loader().catch((err) => {
|
|
1709
1713
|
err = err instanceof Error ? err : new Error(String(err));
|
|
1710
1714
|
if (userOnError) {
|
|
1711
1715
|
return new Promise((resolve, reject) => {
|
|
@@ -1743,7 +1747,12 @@ function defineAsyncComponent(source) {
|
|
|
1743
1747
|
if (resolvedComp) {
|
|
1744
1748
|
doHydrate();
|
|
1745
1749
|
} else {
|
|
1746
|
-
|
|
1750
|
+
const zova = _getValidZova(instance);
|
|
1751
|
+
zova.meta.ssr._hydratingInc();
|
|
1752
|
+
load().then(() => {
|
|
1753
|
+
!instance.isUnmounted && doHydrate();
|
|
1754
|
+
zova.meta.ssr._hydratingDec();
|
|
1755
|
+
});
|
|
1747
1756
|
}
|
|
1748
1757
|
},
|
|
1749
1758
|
get __asyncResolved() {
|
|
@@ -1765,7 +1774,7 @@ function defineAsyncComponent(source) {
|
|
|
1765
1774
|
);
|
|
1766
1775
|
};
|
|
1767
1776
|
if (suspensible && instance.suspense || isInSSRComponentSetup) {
|
|
1768
|
-
return load(
|
|
1777
|
+
return load().then((comp) => {
|
|
1769
1778
|
return () => createInnerComp(comp, instance);
|
|
1770
1779
|
}).catch((err) => {
|
|
1771
1780
|
onError(err);
|
|
@@ -1793,7 +1802,7 @@ function defineAsyncComponent(source) {
|
|
|
1793
1802
|
}
|
|
1794
1803
|
}, timeout);
|
|
1795
1804
|
}
|
|
1796
|
-
load(
|
|
1805
|
+
load().then(() => {
|
|
1797
1806
|
loaded.value = true;
|
|
1798
1807
|
if (instance.parent && isKeepAlive(instance.parent.vnode)) {
|
|
1799
1808
|
instance.parent.update();
|
package/dist/runtime-core.d.ts
CHANGED
|
@@ -1507,7 +1507,7 @@ export declare const hydrateOnInteraction: HydrationStrategyFactory<keyof HTMLEl
|
|
|
1507
1507
|
type AsyncComponentResolveResult<T = Component> = T | {
|
|
1508
1508
|
default: T;
|
|
1509
1509
|
};
|
|
1510
|
-
export type AsyncComponentLoader<T = any> = (
|
|
1510
|
+
export type AsyncComponentLoader<T = any> = () => Promise<AsyncComponentResolveResult<T>>;
|
|
1511
1511
|
export interface AsyncComponentOptions<T = any> {
|
|
1512
1512
|
loader: AsyncComponentLoader<T>;
|
|
1513
1513
|
loadingComponent?: Component;
|
|
@@ -2311,6 +2311,12 @@ function forEachElement(node, cb) {
|
|
|
2311
2311
|
}
|
|
2312
2312
|
|
|
2313
2313
|
const isAsyncWrapper = (i) => !!i.type.__asyncLoader;
|
|
2314
|
+
function _getValidZova(instance) {
|
|
2315
|
+
while (instance) {
|
|
2316
|
+
if (instance.zova) return instance.zova;
|
|
2317
|
+
instance = instance.parent;
|
|
2318
|
+
}
|
|
2319
|
+
}
|
|
2314
2320
|
/*! #__NO_SIDE_EFFECTS__ */
|
|
2315
2321
|
// @__NO_SIDE_EFFECTS__
|
|
2316
2322
|
function defineAsyncComponent(source) {
|
|
@@ -2328,19 +2334,17 @@ function defineAsyncComponent(source) {
|
|
|
2328
2334
|
suspensible = true,
|
|
2329
2335
|
onError: userOnError
|
|
2330
2336
|
} = source;
|
|
2331
|
-
let instanceAttrs = void 0;
|
|
2332
2337
|
let pendingRequest = null;
|
|
2333
2338
|
let resolvedComp;
|
|
2334
2339
|
let retries = 0;
|
|
2335
2340
|
const retry = () => {
|
|
2336
2341
|
retries++;
|
|
2337
2342
|
pendingRequest = null;
|
|
2338
|
-
return load(
|
|
2343
|
+
return load();
|
|
2339
2344
|
};
|
|
2340
|
-
const load = (
|
|
2341
|
-
instanceAttrs = attrs;
|
|
2345
|
+
const load = () => {
|
|
2342
2346
|
let thisRequest;
|
|
2343
|
-
return pendingRequest || (thisRequest = pendingRequest = loader(
|
|
2347
|
+
return pendingRequest || (thisRequest = pendingRequest = loader().catch((err) => {
|
|
2344
2348
|
err = err instanceof Error ? err : new Error(String(err));
|
|
2345
2349
|
if (userOnError) {
|
|
2346
2350
|
return new Promise((resolve, reject) => {
|
|
@@ -2386,7 +2390,12 @@ function defineAsyncComponent(source) {
|
|
|
2386
2390
|
if (resolvedComp) {
|
|
2387
2391
|
doHydrate();
|
|
2388
2392
|
} else {
|
|
2389
|
-
|
|
2393
|
+
const zova = _getValidZova(instance);
|
|
2394
|
+
zova.meta.ssr._hydratingInc();
|
|
2395
|
+
load().then(() => {
|
|
2396
|
+
!instance.isUnmounted && doHydrate();
|
|
2397
|
+
zova.meta.ssr._hydratingDec();
|
|
2398
|
+
});
|
|
2390
2399
|
}
|
|
2391
2400
|
},
|
|
2392
2401
|
get __asyncResolved() {
|
|
@@ -2408,7 +2417,7 @@ function defineAsyncComponent(source) {
|
|
|
2408
2417
|
);
|
|
2409
2418
|
};
|
|
2410
2419
|
if (suspensible && instance.suspense || isInSSRComponentSetup) {
|
|
2411
|
-
return load(
|
|
2420
|
+
return load().then((comp) => {
|
|
2412
2421
|
return () => createInnerComp(comp, instance);
|
|
2413
2422
|
}).catch((err) => {
|
|
2414
2423
|
onError(err);
|
|
@@ -2436,7 +2445,7 @@ function defineAsyncComponent(source) {
|
|
|
2436
2445
|
}
|
|
2437
2446
|
}, timeout);
|
|
2438
2447
|
}
|
|
2439
|
-
load(
|
|
2448
|
+
load().then(() => {
|
|
2440
2449
|
loaded.value = true;
|
|
2441
2450
|
if (instance.parent && isKeepAlive(instance.parent.vnode)) {
|
|
2442
2451
|
instance.parent.update();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cabloy/vue-runtime-core",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.11",
|
|
4
4
|
"description": "@vue/runtime-core",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "dist/runtime-core.esm-bundler.js",
|
|
@@ -47,6 +47,6 @@
|
|
|
47
47
|
"homepage": "https://github.com/vuejs/core/tree/main/packages/runtime-core#readme",
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"@vue/shared": "3.5.6",
|
|
50
|
-
"@vue/reactivity": "npm:@cabloy/vue-reactivity@3.5.
|
|
50
|
+
"@vue/reactivity": "npm:@cabloy/vue-reactivity@3.5.11"
|
|
51
51
|
}
|
|
52
52
|
}
|