@vue/runtime-core 3.4.0-rc.3 → 3.4.1
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 +18 -16
- package/dist/runtime-core.cjs.prod.js +13 -11
- package/dist/runtime-core.d.ts +1 -1
- package/dist/runtime-core.esm-bundler.js +18 -16
- package/package.json +3 -3
package/dist/runtime-core.cjs.js
CHANGED
|
@@ -1747,6 +1747,19 @@ function isVNodeSuspensible(vnode) {
|
|
|
1747
1747
|
return ((_a = vnode.props) == null ? void 0 : _a.suspensible) != null && vnode.props.suspensible !== false;
|
|
1748
1748
|
}
|
|
1749
1749
|
|
|
1750
|
+
const ssrContextKey = Symbol.for("v-scx");
|
|
1751
|
+
const useSSRContext = () => {
|
|
1752
|
+
{
|
|
1753
|
+
const ctx = inject(ssrContextKey);
|
|
1754
|
+
if (!ctx) {
|
|
1755
|
+
warn$1(
|
|
1756
|
+
`Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build.`
|
|
1757
|
+
);
|
|
1758
|
+
}
|
|
1759
|
+
return ctx;
|
|
1760
|
+
}
|
|
1761
|
+
};
|
|
1762
|
+
|
|
1750
1763
|
function watchEffect(effect, options) {
|
|
1751
1764
|
return doWatch(effect, null, options);
|
|
1752
1765
|
}
|
|
@@ -3273,6 +3286,7 @@ function useModel(props, name, options = shared.EMPTY_OBJ) {
|
|
|
3273
3286
|
warn$1(`useModel() called with prop "${name}" which is not declared.`);
|
|
3274
3287
|
return reactivity.ref();
|
|
3275
3288
|
}
|
|
3289
|
+
const camelizedName = shared.camelize(name);
|
|
3276
3290
|
const res = reactivity.customRef((track, trigger) => {
|
|
3277
3291
|
let localValue;
|
|
3278
3292
|
watchSyncEffect(() => {
|
|
@@ -3289,7 +3303,8 @@ function useModel(props, name, options = shared.EMPTY_OBJ) {
|
|
|
3289
3303
|
},
|
|
3290
3304
|
set(value) {
|
|
3291
3305
|
const rawProps = i.vnode.props;
|
|
3292
|
-
if (!(rawProps &&
|
|
3306
|
+
if (!(rawProps && // check if parent has passed v-model
|
|
3307
|
+
(name in rawProps || camelizedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps)) && shared.hasChanged(value, localValue)) {
|
|
3293
3308
|
localValue = value;
|
|
3294
3309
|
trigger();
|
|
3295
3310
|
}
|
|
@@ -3303,7 +3318,7 @@ function useModel(props, name, options = shared.EMPTY_OBJ) {
|
|
|
3303
3318
|
return {
|
|
3304
3319
|
next() {
|
|
3305
3320
|
if (i2 < 2) {
|
|
3306
|
-
return { value: i2++ ? props[modifierKey] : res, done: false };
|
|
3321
|
+
return { value: i2++ ? props[modifierKey] || {} : res, done: false };
|
|
3307
3322
|
} else {
|
|
3308
3323
|
return { done: true };
|
|
3309
3324
|
}
|
|
@@ -7759,19 +7774,6 @@ function h(type, propsOrChildren, children) {
|
|
|
7759
7774
|
}
|
|
7760
7775
|
}
|
|
7761
7776
|
|
|
7762
|
-
const ssrContextKey = Symbol.for("v-scx");
|
|
7763
|
-
const useSSRContext = () => {
|
|
7764
|
-
{
|
|
7765
|
-
const ctx = inject(ssrContextKey);
|
|
7766
|
-
if (!ctx) {
|
|
7767
|
-
warn$1(
|
|
7768
|
-
`Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build.`
|
|
7769
|
-
);
|
|
7770
|
-
}
|
|
7771
|
-
return ctx;
|
|
7772
|
-
}
|
|
7773
|
-
};
|
|
7774
|
-
|
|
7775
7777
|
function isShallow(value) {
|
|
7776
7778
|
return !!(value && value["__v_isShallow"]);
|
|
7777
7779
|
}
|
|
@@ -7977,7 +7979,7 @@ function isMemoSame(cached, memo) {
|
|
|
7977
7979
|
return true;
|
|
7978
7980
|
}
|
|
7979
7981
|
|
|
7980
|
-
const version = "3.4.
|
|
7982
|
+
const version = "3.4.1";
|
|
7981
7983
|
const warn = warn$1 ;
|
|
7982
7984
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
7983
7985
|
const devtools = devtools$1 ;
|
|
@@ -1215,6 +1215,14 @@ function isVNodeSuspensible(vnode) {
|
|
|
1215
1215
|
return ((_a = vnode.props) == null ? void 0 : _a.suspensible) != null && vnode.props.suspensible !== false;
|
|
1216
1216
|
}
|
|
1217
1217
|
|
|
1218
|
+
const ssrContextKey = Symbol.for("v-scx");
|
|
1219
|
+
const useSSRContext = () => {
|
|
1220
|
+
{
|
|
1221
|
+
const ctx = inject(ssrContextKey);
|
|
1222
|
+
return ctx;
|
|
1223
|
+
}
|
|
1224
|
+
};
|
|
1225
|
+
|
|
1218
1226
|
function watchEffect(effect, options) {
|
|
1219
1227
|
return doWatch(effect, null, options);
|
|
1220
1228
|
}
|
|
@@ -2514,6 +2522,7 @@ function useAttrs() {
|
|
|
2514
2522
|
}
|
|
2515
2523
|
function useModel(props, name, options = shared.EMPTY_OBJ) {
|
|
2516
2524
|
const i = getCurrentInstance();
|
|
2525
|
+
const camelizedName = shared.camelize(name);
|
|
2517
2526
|
const res = reactivity.customRef((track, trigger) => {
|
|
2518
2527
|
let localValue;
|
|
2519
2528
|
watchSyncEffect(() => {
|
|
@@ -2530,7 +2539,8 @@ function useModel(props, name, options = shared.EMPTY_OBJ) {
|
|
|
2530
2539
|
},
|
|
2531
2540
|
set(value) {
|
|
2532
2541
|
const rawProps = i.vnode.props;
|
|
2533
|
-
if (!(rawProps &&
|
|
2542
|
+
if (!(rawProps && // check if parent has passed v-model
|
|
2543
|
+
(name in rawProps || camelizedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps)) && shared.hasChanged(value, localValue)) {
|
|
2534
2544
|
localValue = value;
|
|
2535
2545
|
trigger();
|
|
2536
2546
|
}
|
|
@@ -2544,7 +2554,7 @@ function useModel(props, name, options = shared.EMPTY_OBJ) {
|
|
|
2544
2554
|
return {
|
|
2545
2555
|
next() {
|
|
2546
2556
|
if (i2 < 2) {
|
|
2547
|
-
return { value: i2++ ? props[modifierKey] : res, done: false };
|
|
2557
|
+
return { value: i2++ ? props[modifierKey] || {} : res, done: false };
|
|
2548
2558
|
} else {
|
|
2549
2559
|
return { done: true };
|
|
2550
2560
|
}
|
|
@@ -6206,14 +6216,6 @@ function h(type, propsOrChildren, children) {
|
|
|
6206
6216
|
}
|
|
6207
6217
|
}
|
|
6208
6218
|
|
|
6209
|
-
const ssrContextKey = Symbol.for("v-scx");
|
|
6210
|
-
const useSSRContext = () => {
|
|
6211
|
-
{
|
|
6212
|
-
const ctx = inject(ssrContextKey);
|
|
6213
|
-
return ctx;
|
|
6214
|
-
}
|
|
6215
|
-
};
|
|
6216
|
-
|
|
6217
6219
|
function initCustomFormatter() {
|
|
6218
6220
|
{
|
|
6219
6221
|
return;
|
|
@@ -6245,7 +6247,7 @@ function isMemoSame(cached, memo) {
|
|
|
6245
6247
|
return true;
|
|
6246
6248
|
}
|
|
6247
6249
|
|
|
6248
|
-
const version = "3.4.
|
|
6250
|
+
const version = "3.4.1";
|
|
6249
6251
|
const warn$1 = shared.NOOP;
|
|
6250
6252
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
6251
6253
|
const devtools = void 0;
|
package/dist/runtime-core.d.ts
CHANGED
|
@@ -1153,9 +1153,9 @@ export declare function watchEffect(effect: WatchEffect, options?: WatchOptionsB
|
|
|
1153
1153
|
export declare function watchPostEffect(effect: WatchEffect, options?: DebuggerOptions): WatchStopHandle;
|
|
1154
1154
|
export declare function watchSyncEffect(effect: WatchEffect, options?: DebuggerOptions): WatchStopHandle;
|
|
1155
1155
|
type MultiWatchSources = (WatchSource<unknown> | object)[];
|
|
1156
|
+
export declare function watch<T, Immediate extends Readonly<boolean> = false>(source: WatchSource<T>, cb: WatchCallback<T, Immediate extends true ? T | undefined : T>, options?: WatchOptions<Immediate>): WatchStopHandle;
|
|
1156
1157
|
export declare function watch<T extends MultiWatchSources, Immediate extends Readonly<boolean> = false>(sources: [...T], cb: WatchCallback<MapSources<T, false>, MapSources<T, Immediate>>, options?: WatchOptions<Immediate>): WatchStopHandle;
|
|
1157
1158
|
export declare function watch<T extends Readonly<MultiWatchSources>, Immediate extends Readonly<boolean> = false>(source: T, cb: WatchCallback<MapSources<T, false>, MapSources<T, Immediate>>, options?: WatchOptions<Immediate>): WatchStopHandle;
|
|
1158
|
-
export declare function watch<T, Immediate extends Readonly<boolean> = false>(source: WatchSource<T>, cb: WatchCallback<T, Immediate extends true ? T | undefined : T>, options?: WatchOptions<Immediate>): WatchStopHandle;
|
|
1159
1159
|
export declare function watch<T extends object, Immediate extends Readonly<boolean> = false>(source: T, cb: WatchCallback<T, Immediate extends true ? T | undefined : T>, options?: WatchOptions<Immediate>): WatchStopHandle;
|
|
1160
1160
|
|
|
1161
1161
|
type AsyncComponentResolveResult<T = Component> = T | {
|
|
@@ -1749,6 +1749,19 @@ function isVNodeSuspensible(vnode) {
|
|
|
1749
1749
|
return ((_a = vnode.props) == null ? void 0 : _a.suspensible) != null && vnode.props.suspensible !== false;
|
|
1750
1750
|
}
|
|
1751
1751
|
|
|
1752
|
+
const ssrContextKey = Symbol.for("v-scx");
|
|
1753
|
+
const useSSRContext = () => {
|
|
1754
|
+
{
|
|
1755
|
+
const ctx = inject(ssrContextKey);
|
|
1756
|
+
if (!ctx) {
|
|
1757
|
+
!!(process.env.NODE_ENV !== "production") && warn$1(
|
|
1758
|
+
`Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build.`
|
|
1759
|
+
);
|
|
1760
|
+
}
|
|
1761
|
+
return ctx;
|
|
1762
|
+
}
|
|
1763
|
+
};
|
|
1764
|
+
|
|
1752
1765
|
function watchEffect(effect, options) {
|
|
1753
1766
|
return doWatch(effect, null, options);
|
|
1754
1767
|
}
|
|
@@ -3277,6 +3290,7 @@ function useModel(props, name, options = EMPTY_OBJ) {
|
|
|
3277
3290
|
warn$1(`useModel() called with prop "${name}" which is not declared.`);
|
|
3278
3291
|
return ref();
|
|
3279
3292
|
}
|
|
3293
|
+
const camelizedName = camelize(name);
|
|
3280
3294
|
const res = customRef((track, trigger) => {
|
|
3281
3295
|
let localValue;
|
|
3282
3296
|
watchSyncEffect(() => {
|
|
@@ -3293,7 +3307,8 @@ function useModel(props, name, options = EMPTY_OBJ) {
|
|
|
3293
3307
|
},
|
|
3294
3308
|
set(value) {
|
|
3295
3309
|
const rawProps = i.vnode.props;
|
|
3296
|
-
if (!(rawProps &&
|
|
3310
|
+
if (!(rawProps && // check if parent has passed v-model
|
|
3311
|
+
(name in rawProps || camelizedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps)) && hasChanged(value, localValue)) {
|
|
3297
3312
|
localValue = value;
|
|
3298
3313
|
trigger();
|
|
3299
3314
|
}
|
|
@@ -3307,7 +3322,7 @@ function useModel(props, name, options = EMPTY_OBJ) {
|
|
|
3307
3322
|
return {
|
|
3308
3323
|
next() {
|
|
3309
3324
|
if (i2 < 2) {
|
|
3310
|
-
return { value: i2++ ? props[modifierKey] : res, done: false };
|
|
3325
|
+
return { value: i2++ ? props[modifierKey] || {} : res, done: false };
|
|
3311
3326
|
} else {
|
|
3312
3327
|
return { done: true };
|
|
3313
3328
|
}
|
|
@@ -7831,19 +7846,6 @@ function h(type, propsOrChildren, children) {
|
|
|
7831
7846
|
}
|
|
7832
7847
|
}
|
|
7833
7848
|
|
|
7834
|
-
const ssrContextKey = Symbol.for("v-scx");
|
|
7835
|
-
const useSSRContext = () => {
|
|
7836
|
-
{
|
|
7837
|
-
const ctx = inject(ssrContextKey);
|
|
7838
|
-
if (!ctx) {
|
|
7839
|
-
!!(process.env.NODE_ENV !== "production") && warn$1(
|
|
7840
|
-
`Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build.`
|
|
7841
|
-
);
|
|
7842
|
-
}
|
|
7843
|
-
return ctx;
|
|
7844
|
-
}
|
|
7845
|
-
};
|
|
7846
|
-
|
|
7847
7849
|
function isShallow(value) {
|
|
7848
7850
|
return !!(value && value["__v_isShallow"]);
|
|
7849
7851
|
}
|
|
@@ -8049,7 +8051,7 @@ function isMemoSame(cached, memo) {
|
|
|
8049
8051
|
return true;
|
|
8050
8052
|
}
|
|
8051
8053
|
|
|
8052
|
-
const version = "3.4.
|
|
8054
|
+
const version = "3.4.1";
|
|
8053
8055
|
const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
|
|
8054
8056
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
8055
8057
|
const devtools = !!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__ ? devtools$1 : void 0;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue/runtime-core",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.1",
|
|
4
4
|
"description": "@vue/runtime-core",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "dist/runtime-core.esm-bundler.js",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
},
|
|
33
33
|
"homepage": "https://github.com/vuejs/core/tree/main/packages/runtime-core#readme",
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@vue/shared": "3.4.
|
|
36
|
-
"@vue/reactivity": "3.4.
|
|
35
|
+
"@vue/shared": "3.4.1",
|
|
36
|
+
"@vue/reactivity": "3.4.1"
|
|
37
37
|
}
|
|
38
38
|
}
|