@vue/runtime-core 3.5.6 → 3.5.8
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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-core v3.5.
|
|
2
|
+
* @vue/runtime-core v3.5.8
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -354,7 +354,9 @@ function flushPreFlushCbs(instance, seen, i = isFlushing ? flushIndex + 1 : 0) {
|
|
|
354
354
|
cb.flags &= ~1;
|
|
355
355
|
}
|
|
356
356
|
cb();
|
|
357
|
-
cb.flags
|
|
357
|
+
if (!(cb.flags & 4)) {
|
|
358
|
+
cb.flags &= ~1;
|
|
359
|
+
}
|
|
358
360
|
}
|
|
359
361
|
}
|
|
360
362
|
}
|
|
@@ -410,7 +412,9 @@ function flushJobs(seen) {
|
|
|
410
412
|
job.i,
|
|
411
413
|
job.i ? 15 : 14
|
|
412
414
|
);
|
|
413
|
-
job.flags
|
|
415
|
+
if (!(job.flags & 4)) {
|
|
416
|
+
job.flags &= ~1;
|
|
417
|
+
}
|
|
414
418
|
}
|
|
415
419
|
}
|
|
416
420
|
} finally {
|
|
@@ -2209,6 +2213,11 @@ const hydrateOnIdle = (timeout = 1e4) => (hydrate) => {
|
|
|
2209
2213
|
const id = requestIdleCallback(hydrate, { timeout });
|
|
2210
2214
|
return () => cancelIdleCallback(id);
|
|
2211
2215
|
};
|
|
2216
|
+
function elementIsVisibleInViewport(el) {
|
|
2217
|
+
const { top, left, bottom, right } = el.getBoundingClientRect();
|
|
2218
|
+
const { innerHeight, innerWidth } = window;
|
|
2219
|
+
return (top > 0 && top < innerHeight || bottom > 0 && bottom < innerHeight) && (left > 0 && left < innerWidth || right > 0 && right < innerWidth);
|
|
2220
|
+
}
|
|
2212
2221
|
const hydrateOnVisible = (opts) => (hydrate, forEach) => {
|
|
2213
2222
|
const ob = new IntersectionObserver((entries) => {
|
|
2214
2223
|
for (const e of entries) {
|
|
@@ -2218,7 +2227,15 @@ const hydrateOnVisible = (opts) => (hydrate, forEach) => {
|
|
|
2218
2227
|
break;
|
|
2219
2228
|
}
|
|
2220
2229
|
}, opts);
|
|
2221
|
-
forEach((el) =>
|
|
2230
|
+
forEach((el) => {
|
|
2231
|
+
if (!(el instanceof Element)) return;
|
|
2232
|
+
if (elementIsVisibleInViewport(el)) {
|
|
2233
|
+
hydrate();
|
|
2234
|
+
ob.disconnect();
|
|
2235
|
+
return false;
|
|
2236
|
+
}
|
|
2237
|
+
ob.observe(el);
|
|
2238
|
+
});
|
|
2222
2239
|
return () => ob.disconnect();
|
|
2223
2240
|
};
|
|
2224
2241
|
const hydrateOnMediaQuery = (query) => (hydrate) => {
|
|
@@ -2263,7 +2280,10 @@ function forEachElement(node, cb) {
|
|
|
2263
2280
|
let next = node.nextSibling;
|
|
2264
2281
|
while (next) {
|
|
2265
2282
|
if (next.nodeType === 1) {
|
|
2266
|
-
cb(next);
|
|
2283
|
+
const result = cb(next);
|
|
2284
|
+
if (result === false) {
|
|
2285
|
+
break;
|
|
2286
|
+
}
|
|
2267
2287
|
} else if (isComment(next)) {
|
|
2268
2288
|
if (next.data === "]") {
|
|
2269
2289
|
if (--depth === 0) break;
|
|
@@ -8240,7 +8260,7 @@ function isMemoSame(cached, memo) {
|
|
|
8240
8260
|
return true;
|
|
8241
8261
|
}
|
|
8242
8262
|
|
|
8243
|
-
const version = "3.5.
|
|
8263
|
+
const version = "3.5.8";
|
|
8244
8264
|
const warn = warn$1 ;
|
|
8245
8265
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
8246
8266
|
const devtools = devtools$1 ;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-core v3.5.
|
|
2
|
+
* @vue/runtime-core v3.5.8
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -219,7 +219,9 @@ function flushPreFlushCbs(instance, seen, i = isFlushing ? flushIndex + 1 : 0) {
|
|
|
219
219
|
cb.flags &= ~1;
|
|
220
220
|
}
|
|
221
221
|
cb();
|
|
222
|
-
cb.flags
|
|
222
|
+
if (!(cb.flags & 4)) {
|
|
223
|
+
cb.flags &= ~1;
|
|
224
|
+
}
|
|
223
225
|
}
|
|
224
226
|
}
|
|
225
227
|
}
|
|
@@ -263,7 +265,9 @@ function flushJobs(seen) {
|
|
|
263
265
|
job.i,
|
|
264
266
|
job.i ? 15 : 14
|
|
265
267
|
);
|
|
266
|
-
job.flags
|
|
268
|
+
if (!(job.flags & 4)) {
|
|
269
|
+
job.flags &= ~1;
|
|
270
|
+
}
|
|
267
271
|
}
|
|
268
272
|
}
|
|
269
273
|
} finally {
|
|
@@ -1587,6 +1591,11 @@ const hydrateOnIdle = (timeout = 1e4) => (hydrate) => {
|
|
|
1587
1591
|
const id = requestIdleCallback(hydrate, { timeout });
|
|
1588
1592
|
return () => cancelIdleCallback(id);
|
|
1589
1593
|
};
|
|
1594
|
+
function elementIsVisibleInViewport(el) {
|
|
1595
|
+
const { top, left, bottom, right } = el.getBoundingClientRect();
|
|
1596
|
+
const { innerHeight, innerWidth } = window;
|
|
1597
|
+
return (top > 0 && top < innerHeight || bottom > 0 && bottom < innerHeight) && (left > 0 && left < innerWidth || right > 0 && right < innerWidth);
|
|
1598
|
+
}
|
|
1590
1599
|
const hydrateOnVisible = (opts) => (hydrate, forEach) => {
|
|
1591
1600
|
const ob = new IntersectionObserver((entries) => {
|
|
1592
1601
|
for (const e of entries) {
|
|
@@ -1596,7 +1605,15 @@ const hydrateOnVisible = (opts) => (hydrate, forEach) => {
|
|
|
1596
1605
|
break;
|
|
1597
1606
|
}
|
|
1598
1607
|
}, opts);
|
|
1599
|
-
forEach((el) =>
|
|
1608
|
+
forEach((el) => {
|
|
1609
|
+
if (!(el instanceof Element)) return;
|
|
1610
|
+
if (elementIsVisibleInViewport(el)) {
|
|
1611
|
+
hydrate();
|
|
1612
|
+
ob.disconnect();
|
|
1613
|
+
return false;
|
|
1614
|
+
}
|
|
1615
|
+
ob.observe(el);
|
|
1616
|
+
});
|
|
1600
1617
|
return () => ob.disconnect();
|
|
1601
1618
|
};
|
|
1602
1619
|
const hydrateOnMediaQuery = (query) => (hydrate) => {
|
|
@@ -1641,7 +1658,10 @@ function forEachElement(node, cb) {
|
|
|
1641
1658
|
let next = node.nextSibling;
|
|
1642
1659
|
while (next) {
|
|
1643
1660
|
if (next.nodeType === 1) {
|
|
1644
|
-
cb(next);
|
|
1661
|
+
const result = cb(next);
|
|
1662
|
+
if (result === false) {
|
|
1663
|
+
break;
|
|
1664
|
+
}
|
|
1645
1665
|
} else if (isComment(next)) {
|
|
1646
1666
|
if (next.data === "]") {
|
|
1647
1667
|
if (--depth === 0) break;
|
|
@@ -6409,7 +6429,7 @@ function isMemoSame(cached, memo) {
|
|
|
6409
6429
|
return true;
|
|
6410
6430
|
}
|
|
6411
6431
|
|
|
6412
|
-
const version = "3.5.
|
|
6432
|
+
const version = "3.5.8";
|
|
6413
6433
|
const warn$1 = shared.NOOP;
|
|
6414
6434
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
6415
6435
|
const devtools = void 0;
|
package/dist/runtime-core.d.ts
CHANGED
|
@@ -118,7 +118,7 @@ type InferPropType<T, NullAsAny = true> = [T] extends [null] ? NullAsAny extends
|
|
|
118
118
|
type: DateConstructor;
|
|
119
119
|
}] ? Date : [T] extends [(infer U)[] | {
|
|
120
120
|
type: (infer U)[];
|
|
121
|
-
}] ? U extends DateConstructor ? Date | InferPropType<U, false> : InferPropType<U, false> : [T] extends [Prop<infer V, infer D>] ? unknown extends V ? IfAny<V, V, D> : V : T;
|
|
121
|
+
}] ? U extends DateConstructor ? Date | InferPropType<U, false> : InferPropType<U, false> : [T] extends [Prop<infer V, infer D>] ? unknown extends V ? keyof V extends never ? IfAny<V, V, D> : V : V : T;
|
|
122
122
|
/**
|
|
123
123
|
* Extract prop types from a runtime props options object.
|
|
124
124
|
* The extracted types are **internal** - i.e. the resolved props received by
|
|
@@ -990,9 +990,9 @@ export declare function defineComponent<Props extends Record<string, any>, E ext
|
|
|
990
990
|
emits?: E | EE[];
|
|
991
991
|
slots?: S;
|
|
992
992
|
}): DefineSetupFnComponent<Props, E, S>;
|
|
993
|
-
export declare function defineComponent<TypeProps, RuntimePropsOptions extends ComponentObjectPropsOptions = ComponentObjectPropsOptions, RuntimePropsKeys extends string = string, TypeEmits extends ComponentTypeEmits = {}, RuntimeEmitsOptions extends EmitsOptions = {}, RuntimeEmitsKeys extends string = string, Data = {}, SetupBindings = {}, Computed extends ComputedOptions = {}, Methods extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, InjectOptions extends ComponentInjectOptions = {}, InjectKeys extends string = string, Slots extends SlotsType = {}, LocalComponents extends Record<string, Component> = {}, Directives extends Record<string, Directive> = {}, Exposed extends string = string, Provide extends ComponentProvideOptions = ComponentProvideOptions, ResolvedEmits extends EmitsOptions = {} extends RuntimeEmitsOptions ? TypeEmitsToOptions<TypeEmits> : RuntimeEmitsOptions, InferredProps = unknown extends TypeProps ? string extends RuntimePropsKeys ? ComponentObjectPropsOptions extends RuntimePropsOptions ? {} : ExtractPropTypes<RuntimePropsOptions> : {
|
|
993
|
+
export declare function defineComponent<TypeProps, RuntimePropsOptions extends ComponentObjectPropsOptions = ComponentObjectPropsOptions, RuntimePropsKeys extends string = string, TypeEmits extends ComponentTypeEmits = {}, RuntimeEmitsOptions extends EmitsOptions = {}, RuntimeEmitsKeys extends string = string, Data = {}, SetupBindings = {}, Computed extends ComputedOptions = {}, Methods extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, InjectOptions extends ComponentInjectOptions = {}, InjectKeys extends string = string, Slots extends SlotsType = {}, LocalComponents extends Record<string, Component> = {}, Directives extends Record<string, Directive> = {}, Exposed extends string = string, Provide extends ComponentProvideOptions = ComponentProvideOptions, ResolvedEmits extends EmitsOptions = {} extends RuntimeEmitsOptions ? TypeEmitsToOptions<TypeEmits> : RuntimeEmitsOptions, InferredProps = unknown extends TypeProps ? keyof TypeProps extends never ? string extends RuntimePropsKeys ? ComponentObjectPropsOptions extends RuntimePropsOptions ? {} : ExtractPropTypes<RuntimePropsOptions> : {
|
|
994
994
|
[key in RuntimePropsKeys]?: any;
|
|
995
|
-
} : TypeProps, TypeRefs extends Record<string, unknown> = {}, TypeEl extends Element = any>(options: {
|
|
995
|
+
} : TypeProps : TypeProps, TypeRefs extends Record<string, unknown> = {}, TypeEl extends Element = any>(options: {
|
|
996
996
|
props?: (RuntimePropsOptions & ThisType<void>) | RuntimePropsKeys[];
|
|
997
997
|
/**
|
|
998
998
|
* @private for language-tools use only
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-core v3.5.
|
|
2
|
+
* @vue/runtime-core v3.5.8
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -357,7 +357,9 @@ function flushPreFlushCbs(instance, seen, i = isFlushing ? flushIndex + 1 : 0) {
|
|
|
357
357
|
cb.flags &= ~1;
|
|
358
358
|
}
|
|
359
359
|
cb();
|
|
360
|
-
cb.flags
|
|
360
|
+
if (!(cb.flags & 4)) {
|
|
361
|
+
cb.flags &= ~1;
|
|
362
|
+
}
|
|
361
363
|
}
|
|
362
364
|
}
|
|
363
365
|
}
|
|
@@ -413,7 +415,9 @@ function flushJobs(seen) {
|
|
|
413
415
|
job.i,
|
|
414
416
|
job.i ? 15 : 14
|
|
415
417
|
);
|
|
416
|
-
job.flags
|
|
418
|
+
if (!(job.flags & 4)) {
|
|
419
|
+
job.flags &= ~1;
|
|
420
|
+
}
|
|
417
421
|
}
|
|
418
422
|
}
|
|
419
423
|
} finally {
|
|
@@ -2224,6 +2228,11 @@ const hydrateOnIdle = (timeout = 1e4) => (hydrate) => {
|
|
|
2224
2228
|
const id = requestIdleCallback(hydrate, { timeout });
|
|
2225
2229
|
return () => cancelIdleCallback(id);
|
|
2226
2230
|
};
|
|
2231
|
+
function elementIsVisibleInViewport(el) {
|
|
2232
|
+
const { top, left, bottom, right } = el.getBoundingClientRect();
|
|
2233
|
+
const { innerHeight, innerWidth } = window;
|
|
2234
|
+
return (top > 0 && top < innerHeight || bottom > 0 && bottom < innerHeight) && (left > 0 && left < innerWidth || right > 0 && right < innerWidth);
|
|
2235
|
+
}
|
|
2227
2236
|
const hydrateOnVisible = (opts) => (hydrate, forEach) => {
|
|
2228
2237
|
const ob = new IntersectionObserver((entries) => {
|
|
2229
2238
|
for (const e of entries) {
|
|
@@ -2233,7 +2242,15 @@ const hydrateOnVisible = (opts) => (hydrate, forEach) => {
|
|
|
2233
2242
|
break;
|
|
2234
2243
|
}
|
|
2235
2244
|
}, opts);
|
|
2236
|
-
forEach((el) =>
|
|
2245
|
+
forEach((el) => {
|
|
2246
|
+
if (!(el instanceof Element)) return;
|
|
2247
|
+
if (elementIsVisibleInViewport(el)) {
|
|
2248
|
+
hydrate();
|
|
2249
|
+
ob.disconnect();
|
|
2250
|
+
return false;
|
|
2251
|
+
}
|
|
2252
|
+
ob.observe(el);
|
|
2253
|
+
});
|
|
2237
2254
|
return () => ob.disconnect();
|
|
2238
2255
|
};
|
|
2239
2256
|
const hydrateOnMediaQuery = (query) => (hydrate) => {
|
|
@@ -2278,7 +2295,10 @@ function forEachElement(node, cb) {
|
|
|
2278
2295
|
let next = node.nextSibling;
|
|
2279
2296
|
while (next) {
|
|
2280
2297
|
if (next.nodeType === 1) {
|
|
2281
|
-
cb(next);
|
|
2298
|
+
const result = cb(next);
|
|
2299
|
+
if (result === false) {
|
|
2300
|
+
break;
|
|
2301
|
+
}
|
|
2282
2302
|
} else if (isComment(next)) {
|
|
2283
2303
|
if (next.data === "]") {
|
|
2284
2304
|
if (--depth === 0) break;
|
|
@@ -8311,7 +8331,7 @@ function isMemoSame(cached, memo) {
|
|
|
8311
8331
|
return true;
|
|
8312
8332
|
}
|
|
8313
8333
|
|
|
8314
|
-
const version = "3.5.
|
|
8334
|
+
const version = "3.5.8";
|
|
8315
8335
|
const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
|
|
8316
8336
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
8317
8337
|
const devtools = !!(process.env.NODE_ENV !== "production") || true ? devtools$1 : void 0;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue/runtime-core",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.8",
|
|
4
4
|
"description": "@vue/runtime-core",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "dist/runtime-core.esm-bundler.js",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
},
|
|
47
47
|
"homepage": "https://github.com/vuejs/core/tree/main/packages/runtime-core#readme",
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@vue/shared": "3.5.
|
|
50
|
-
"@vue/reactivity": "3.5.
|
|
49
|
+
"@vue/shared": "3.5.8",
|
|
50
|
+
"@vue/reactivity": "3.5.8"
|
|
51
51
|
}
|
|
52
52
|
}
|