@vue/runtime-core 3.5.5 → 3.5.7
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 +31 -10
- package/dist/runtime-core.cjs.prod.js +31 -10
- package/dist/runtime-core.d.ts +5 -5
- package/dist/runtime-core.esm-bundler.js +31 -10
- package/package.json +3 -3
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.7
|
|
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;
|
|
@@ -6050,11 +6070,12 @@ function doWatch(source, cb, options = shared.EMPTY_OBJ) {
|
|
|
6050
6070
|
} else if (!cb || immediate) {
|
|
6051
6071
|
baseWatchOptions.once = true;
|
|
6052
6072
|
} else {
|
|
6053
|
-
|
|
6054
|
-
stop: shared.NOOP,
|
|
6055
|
-
resume: shared.NOOP,
|
|
6056
|
-
pause: shared.NOOP
|
|
6073
|
+
const watchStopHandle = () => {
|
|
6057
6074
|
};
|
|
6075
|
+
watchStopHandle.stop = shared.NOOP;
|
|
6076
|
+
watchStopHandle.resume = shared.NOOP;
|
|
6077
|
+
watchStopHandle.pause = shared.NOOP;
|
|
6078
|
+
return watchStopHandle;
|
|
6058
6079
|
}
|
|
6059
6080
|
}
|
|
6060
6081
|
const instance = currentInstance;
|
|
@@ -8239,7 +8260,7 @@ function isMemoSame(cached, memo) {
|
|
|
8239
8260
|
return true;
|
|
8240
8261
|
}
|
|
8241
8262
|
|
|
8242
|
-
const version = "3.5.
|
|
8263
|
+
const version = "3.5.7";
|
|
8243
8264
|
const warn = warn$1 ;
|
|
8244
8265
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
8245
8266
|
const devtools = devtools$1 ;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-core v3.5.
|
|
2
|
+
* @vue/runtime-core v3.5.7
|
|
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;
|
|
@@ -4732,11 +4752,12 @@ function doWatch(source, cb, options = shared.EMPTY_OBJ) {
|
|
|
4732
4752
|
} else if (!cb || immediate) {
|
|
4733
4753
|
baseWatchOptions.once = true;
|
|
4734
4754
|
} else {
|
|
4735
|
-
|
|
4736
|
-
stop: shared.NOOP,
|
|
4737
|
-
resume: shared.NOOP,
|
|
4738
|
-
pause: shared.NOOP
|
|
4755
|
+
const watchStopHandle = () => {
|
|
4739
4756
|
};
|
|
4757
|
+
watchStopHandle.stop = shared.NOOP;
|
|
4758
|
+
watchStopHandle.resume = shared.NOOP;
|
|
4759
|
+
watchStopHandle.pause = shared.NOOP;
|
|
4760
|
+
return watchStopHandle;
|
|
4740
4761
|
}
|
|
4741
4762
|
}
|
|
4742
4763
|
const instance = currentInstance;
|
|
@@ -6408,7 +6429,7 @@ function isMemoSame(cached, memo) {
|
|
|
6408
6429
|
return true;
|
|
6409
6430
|
}
|
|
6410
6431
|
|
|
6411
|
-
const version = "3.5.
|
|
6432
|
+
const version = "3.5.7";
|
|
6412
6433
|
const warn$1 = shared.NOOP;
|
|
6413
6434
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
6414
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
|
|
@@ -1021,8 +1021,8 @@ export interface App<HostElement = any> {
|
|
|
1021
1021
|
mixin(mixin: ComponentOptions): this;
|
|
1022
1022
|
component(name: string): Component | undefined;
|
|
1023
1023
|
component<T extends Component | DefineComponent>(name: string, component: T): this;
|
|
1024
|
-
directive<
|
|
1025
|
-
directive<
|
|
1024
|
+
directive<HostElement = any, Value = any, Modifiers extends string = string, Arg extends string = string>(name: string): Directive<HostElement, Value, Modifiers, Arg> | undefined;
|
|
1025
|
+
directive<HostElement = any, Value = any, Modifiers extends string = string, Arg extends string = string>(name: string, directive: Directive<HostElement, Value, Modifiers, Arg>): this;
|
|
1026
1026
|
mount(rootContainer: HostElement | string,
|
|
1027
1027
|
/**
|
|
1028
1028
|
* @internal
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-core v3.5.
|
|
2
|
+
* @vue/runtime-core v3.5.7
|
|
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;
|
|
@@ -6107,11 +6127,12 @@ function doWatch(source, cb, options = EMPTY_OBJ) {
|
|
|
6107
6127
|
} else if (!cb || immediate) {
|
|
6108
6128
|
baseWatchOptions.once = true;
|
|
6109
6129
|
} else {
|
|
6110
|
-
|
|
6111
|
-
stop: NOOP,
|
|
6112
|
-
resume: NOOP,
|
|
6113
|
-
pause: NOOP
|
|
6130
|
+
const watchStopHandle = () => {
|
|
6114
6131
|
};
|
|
6132
|
+
watchStopHandle.stop = NOOP;
|
|
6133
|
+
watchStopHandle.resume = NOOP;
|
|
6134
|
+
watchStopHandle.pause = NOOP;
|
|
6135
|
+
return watchStopHandle;
|
|
6115
6136
|
}
|
|
6116
6137
|
}
|
|
6117
6138
|
const instance = currentInstance;
|
|
@@ -8310,7 +8331,7 @@ function isMemoSame(cached, memo) {
|
|
|
8310
8331
|
return true;
|
|
8311
8332
|
}
|
|
8312
8333
|
|
|
8313
|
-
const version = "3.5.
|
|
8334
|
+
const version = "3.5.7";
|
|
8314
8335
|
const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
|
|
8315
8336
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
8316
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.7",
|
|
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.7",
|
|
50
|
+
"@vue/reactivity": "3.5.7"
|
|
51
51
|
}
|
|
52
52
|
}
|