@vue/compat 3.4.0 → 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.
@@ -3787,6 +3787,19 @@ function mapCompatDirectiveHook(name, dir, instance) {
3787
3787
  }
3788
3788
  }
3789
3789
 
3790
+ const ssrContextKey = Symbol.for("v-scx");
3791
+ const useSSRContext = () => {
3792
+ {
3793
+ const ctx = inject(ssrContextKey);
3794
+ if (!ctx) {
3795
+ warn$1(
3796
+ `Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build.`
3797
+ );
3798
+ }
3799
+ return ctx;
3800
+ }
3801
+ };
3802
+
3790
3803
  function watchEffect(effect, options) {
3791
3804
  return doWatch(effect, null, options);
3792
3805
  }
@@ -5821,6 +5834,7 @@ function useModel(props, name, options = EMPTY_OBJ) {
5821
5834
  warn$1(`useModel() called with prop "${name}" which is not declared.`);
5822
5835
  return ref();
5823
5836
  }
5837
+ const camelizedName = camelize(name);
5824
5838
  const res = customRef((track, trigger) => {
5825
5839
  let localValue;
5826
5840
  watchSyncEffect(() => {
@@ -5837,7 +5851,8 @@ function useModel(props, name, options = EMPTY_OBJ) {
5837
5851
  },
5838
5852
  set(value) {
5839
5853
  const rawProps = i.vnode.props;
5840
- if (!(rawProps && name in rawProps) && hasChanged(value, localValue)) {
5854
+ if (!(rawProps && // check if parent has passed v-model
5855
+ (name in rawProps || camelizedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps)) && hasChanged(value, localValue)) {
5841
5856
  localValue = value;
5842
5857
  trigger();
5843
5858
  }
@@ -5851,7 +5866,7 @@ function useModel(props, name, options = EMPTY_OBJ) {
5851
5866
  return {
5852
5867
  next() {
5853
5868
  if (i2 < 2) {
5854
- return { value: i2++ ? props[modifierKey] : res, done: false };
5869
+ return { value: i2++ ? props[modifierKey] || {} : res, done: false };
5855
5870
  } else {
5856
5871
  return { done: true };
5857
5872
  }
@@ -6431,7 +6446,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
6431
6446
  return vm;
6432
6447
  }
6433
6448
  }
6434
- Vue.version = `2.6.14-compat:${"3.4.0"}`;
6449
+ Vue.version = `2.6.14-compat:${"3.4.1"}`;
6435
6450
  Vue.config = singletonApp.config;
6436
6451
  Vue.use = (p, ...options) => {
6437
6452
  if (p && isFunction(p.install)) {
@@ -10933,19 +10948,6 @@ function h(type, propsOrChildren, children) {
10933
10948
  }
10934
10949
  }
10935
10950
 
10936
- const ssrContextKey = Symbol.for("v-scx");
10937
- const useSSRContext = () => {
10938
- {
10939
- const ctx = inject(ssrContextKey);
10940
- if (!ctx) {
10941
- warn$1(
10942
- `Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build.`
10943
- );
10944
- }
10945
- return ctx;
10946
- }
10947
- };
10948
-
10949
10951
  function initCustomFormatter() {
10950
10952
  if (typeof window === "undefined") {
10951
10953
  return;
@@ -11147,7 +11149,7 @@ function isMemoSame(cached, memo) {
11147
11149
  return true;
11148
11150
  }
11149
11151
 
11150
- const version = "3.4.0";
11152
+ const version = "3.4.1";
11151
11153
  const warn = warn$1 ;
11152
11154
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
11153
11155
  const devtools = devtools$1 ;