@vue/compat 3.4.0-beta.2 → 3.4.0-beta.3

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/vue.cjs.js CHANGED
@@ -250,7 +250,7 @@ function normalizeProps(props) {
250
250
 
251
251
  const HTML_TAGS = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot";
252
252
  const SVG_TAGS = "svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view";
253
- const MATH_TAGS = "math,maction,annotation,annotation-xml,menclose,merror,mfenced,mfrac,mi,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,semantics,mspace,msqrt,mstyle,msub,msup,msubsup,mtable,mtd,mtext,mtr,munder,munderover";
253
+ const MATH_TAGS = "annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics";
254
254
  const VOID_TAGS = "area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr";
255
255
  const isHTMLTag = /* @__PURE__ */ makeMap(HTML_TAGS);
256
256
  const isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS);
@@ -3205,6 +3205,8 @@ function hasPropsChanged(prevProps, nextProps, emitsOptions) {
3205
3205
  return false;
3206
3206
  }
3207
3207
  function updateHOCHostEl({ vnode, parent }, el) {
3208
+ if (!el)
3209
+ return;
3208
3210
  while (parent) {
3209
3211
  const root = parent.subTree;
3210
3212
  if (root.suspense && root.suspense.activeBranch === vnode) {
@@ -5956,24 +5958,30 @@ function useModel(props, name) {
5956
5958
  warn(`useModel() called with prop "${name}" which is not declared.`);
5957
5959
  return ref();
5958
5960
  }
5959
- let localValue;
5960
- watchSyncEffect(() => {
5961
- localValue = props[name];
5962
- });
5963
- return customRef((track, trigger) => ({
5964
- get() {
5965
- track();
5966
- return localValue;
5967
- },
5968
- set(value) {
5969
- const rawProps = i.vnode.props;
5970
- if (!(rawProps && name in rawProps) && hasChanged(value, localValue)) {
5971
- localValue = value;
5961
+ return customRef((track, trigger) => {
5962
+ let localValue;
5963
+ watchSyncEffect(() => {
5964
+ const propValue = props[name];
5965
+ if (hasChanged(localValue, propValue)) {
5966
+ localValue = propValue;
5972
5967
  trigger();
5973
5968
  }
5974
- i.emit(`update:${name}`, value);
5975
- }
5976
- }));
5969
+ });
5970
+ return {
5971
+ get() {
5972
+ track();
5973
+ return localValue;
5974
+ },
5975
+ set(value) {
5976
+ const rawProps = i.vnode.props;
5977
+ if (!(rawProps && name in rawProps) && hasChanged(value, localValue)) {
5978
+ localValue = value;
5979
+ trigger();
5980
+ }
5981
+ i.emit(`update:${name}`, value);
5982
+ }
5983
+ };
5984
+ });
5977
5985
  }
5978
5986
  function getContext() {
5979
5987
  const i = getCurrentInstance();
@@ -6547,7 +6555,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
6547
6555
  return vm;
6548
6556
  }
6549
6557
  }
6550
- Vue.version = `2.6.14-compat:${"3.4.0-beta.2"}`;
6558
+ Vue.version = `2.6.14-compat:${"3.4.0-beta.3"}`;
6551
6559
  Vue.config = singletonApp.config;
6552
6560
  Vue.use = (p, ...options) => {
6553
6561
  if (p && isFunction(p.install)) {
@@ -11268,7 +11276,7 @@ function isMemoSame(cached, memo) {
11268
11276
  return true;
11269
11277
  }
11270
11278
 
11271
- const version = "3.4.0-beta.2";
11279
+ const version = "3.4.0-beta.3";
11272
11280
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
11273
11281
  const _ssrUtils = {
11274
11282
  createComponentInstance,
@@ -11725,6 +11733,11 @@ function initVShowForSSR() {
11725
11733
  };
11726
11734
  }
11727
11735
 
11736
+ const CSS_VAR_TEXT = Symbol("CSS_VAR_TEXT" );
11737
+ function useCssVars(getter) {
11738
+ return;
11739
+ }
11740
+
11728
11741
  function patchStyle(el, prev, next) {
11729
11742
  const style = el.style;
11730
11743
  const isCssString = isString(next);
@@ -11743,6 +11756,10 @@ function patchStyle(el, prev, next) {
11743
11756
  const currentDisplay = style.display;
11744
11757
  if (isCssString) {
11745
11758
  if (prev !== next) {
11759
+ const cssVarText = style[CSS_VAR_TEXT];
11760
+ if (cssVarText) {
11761
+ next += ";" + cssVarText;
11762
+ }
11746
11763
  style.cssText = next;
11747
11764
  }
11748
11765
  } else if (prev) {
@@ -12293,10 +12310,6 @@ function useCssModule(name = "$style") {
12293
12310
  }
12294
12311
  }
12295
12312
 
12296
- function useCssVars(getter) {
12297
- return;
12298
- }
12299
-
12300
12313
  const positionMap = /* @__PURE__ */ new WeakMap();
12301
12314
  const newPositionMap = /* @__PURE__ */ new WeakMap();
12302
12315
  const moveCbKey = Symbol("_moveCb");
@@ -14330,7 +14343,7 @@ const errorMessages = {
14330
14343
  Use a v-bind binding combined with a v-on listener that emits update:x event instead.`,
14331
14344
  [45]: `Error parsing JavaScript expression: `,
14332
14345
  [46]: `<KeepAlive> expects exactly one child component.`,
14333
- [51]: `@vnode-* hooks in templates are deprecated. Use the vue: prefix instead. For example, @vnode-mounted should be changed to @vue:mounted. @vnode-* hooks support will be removed in 3.4.`,
14346
+ [51]: `@vnode-* hooks in templates are no longer supported. Use the vue: prefix instead. For example, @vnode-mounted should be changed to @vue:mounted. @vnode-* hooks support has been removed in 3.4.`,
14334
14347
  // generic errors
14335
14348
  [47]: `"prefixIdentifiers" option is not supported in this build of compiler.`,
14336
14349
  [48]: `ES module mode is not supported in this build of compiler.`,
@@ -187,7 +187,7 @@ function normalizeProps(props) {
187
187
 
188
188
  const HTML_TAGS = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot";
189
189
  const SVG_TAGS = "svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view";
190
- const MATH_TAGS = "math,maction,annotation,annotation-xml,menclose,merror,mfenced,mfrac,mi,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,semantics,mspace,msqrt,mstyle,msub,msup,msubsup,mtable,mtd,mtext,mtr,munder,munderover";
190
+ const MATH_TAGS = "annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics";
191
191
  const VOID_TAGS = "area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr";
192
192
  const isHTMLTag = /* @__PURE__ */ makeMap(HTML_TAGS);
193
193
  const isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS);
@@ -2285,6 +2285,8 @@ function hasPropsChanged(prevProps, nextProps, emitsOptions) {
2285
2285
  return false;
2286
2286
  }
2287
2287
  function updateHOCHostEl({ vnode, parent }, el) {
2288
+ if (!el)
2289
+ return;
2288
2290
  while (parent) {
2289
2291
  const root = parent.subTree;
2290
2292
  if (root.suspense && root.suspense.activeBranch === vnode) {
@@ -4768,24 +4770,30 @@ function useAttrs() {
4768
4770
  }
4769
4771
  function useModel(props, name) {
4770
4772
  const i = getCurrentInstance();
4771
- let localValue;
4772
- watchSyncEffect(() => {
4773
- localValue = props[name];
4774
- });
4775
- return customRef((track, trigger) => ({
4776
- get() {
4777
- track();
4778
- return localValue;
4779
- },
4780
- set(value) {
4781
- const rawProps = i.vnode.props;
4782
- if (!(rawProps && name in rawProps) && hasChanged(value, localValue)) {
4783
- localValue = value;
4773
+ return customRef((track, trigger) => {
4774
+ let localValue;
4775
+ watchSyncEffect(() => {
4776
+ const propValue = props[name];
4777
+ if (hasChanged(localValue, propValue)) {
4778
+ localValue = propValue;
4784
4779
  trigger();
4785
4780
  }
4786
- i.emit(`update:${name}`, value);
4787
- }
4788
- }));
4781
+ });
4782
+ return {
4783
+ get() {
4784
+ track();
4785
+ return localValue;
4786
+ },
4787
+ set(value) {
4788
+ const rawProps = i.vnode.props;
4789
+ if (!(rawProps && name in rawProps) && hasChanged(value, localValue)) {
4790
+ localValue = value;
4791
+ trigger();
4792
+ }
4793
+ i.emit(`update:${name}`, value);
4794
+ }
4795
+ };
4796
+ });
4789
4797
  }
4790
4798
  function getContext() {
4791
4799
  const i = getCurrentInstance();
@@ -5246,7 +5254,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
5246
5254
  return vm;
5247
5255
  }
5248
5256
  }
5249
- Vue.version = `2.6.14-compat:${"3.4.0-beta.2"}`;
5257
+ Vue.version = `2.6.14-compat:${"3.4.0-beta.3"}`;
5250
5258
  Vue.config = singletonApp.config;
5251
5259
  Vue.use = (p, ...options) => {
5252
5260
  if (p && isFunction(p.install)) {
@@ -9055,7 +9063,7 @@ function isMemoSame(cached, memo) {
9055
9063
  return true;
9056
9064
  }
9057
9065
 
9058
- const version = "3.4.0-beta.2";
9066
+ const version = "3.4.0-beta.3";
9059
9067
  const ErrorTypeStrings = null;
9060
9068
  const _ssrUtils = {
9061
9069
  createComponentInstance,
@@ -9509,6 +9517,11 @@ function initVShowForSSR() {
9509
9517
  };
9510
9518
  }
9511
9519
 
9520
+ const CSS_VAR_TEXT = Symbol("");
9521
+ function useCssVars(getter) {
9522
+ return;
9523
+ }
9524
+
9512
9525
  function patchStyle(el, prev, next) {
9513
9526
  const style = el.style;
9514
9527
  const isCssString = isString(next);
@@ -9527,6 +9540,10 @@ function patchStyle(el, prev, next) {
9527
9540
  const currentDisplay = style.display;
9528
9541
  if (isCssString) {
9529
9542
  if (prev !== next) {
9543
+ const cssVarText = style[CSS_VAR_TEXT];
9544
+ if (cssVarText) {
9545
+ next += ";" + cssVarText;
9546
+ }
9530
9547
  style.cssText = next;
9531
9548
  }
9532
9549
  } else if (prev) {
@@ -10036,10 +10053,6 @@ function useCssModule(name = "$style") {
10036
10053
  }
10037
10054
  }
10038
10055
 
10039
- function useCssVars(getter) {
10040
- return;
10041
- }
10042
-
10043
10056
  const positionMap = /* @__PURE__ */ new WeakMap();
10044
10057
  const newPositionMap = /* @__PURE__ */ new WeakMap();
10045
10058
  const moveCbKey = Symbol("_moveCb");
@@ -11946,7 +11959,7 @@ const errorMessages = {
11946
11959
  Use a v-bind binding combined with a v-on listener that emits update:x event instead.`,
11947
11960
  [45]: `Error parsing JavaScript expression: `,
11948
11961
  [46]: `<KeepAlive> expects exactly one child component.`,
11949
- [51]: `@vnode-* hooks in templates are deprecated. Use the vue: prefix instead. For example, @vnode-mounted should be changed to @vue:mounted. @vnode-* hooks support will be removed in 3.4.`,
11962
+ [51]: `@vnode-* hooks in templates are no longer supported. Use the vue: prefix instead. For example, @vnode-mounted should be changed to @vue:mounted. @vnode-* hooks support has been removed in 3.4.`,
11950
11963
  // generic errors
11951
11964
  [47]: `"prefixIdentifiers" option is not supported in this build of compiler.`,
11952
11965
  [48]: `ES module mode is not supported in this build of compiler.`,
@@ -239,7 +239,7 @@ function normalizeProps(props) {
239
239
 
240
240
  const HTML_TAGS = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot";
241
241
  const SVG_TAGS = "svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view";
242
- const MATH_TAGS = "math,maction,annotation,annotation-xml,menclose,merror,mfenced,mfrac,mi,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,semantics,mspace,msqrt,mstyle,msub,msup,msubsup,mtable,mtd,mtext,mtr,munder,munderover";
242
+ const MATH_TAGS = "annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics";
243
243
  const VOID_TAGS = "area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr";
244
244
  const isHTMLTag = /* @__PURE__ */ makeMap(HTML_TAGS);
245
245
  const isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS);
@@ -3154,6 +3154,8 @@ function hasPropsChanged(prevProps, nextProps, emitsOptions) {
3154
3154
  return false;
3155
3155
  }
3156
3156
  function updateHOCHostEl({ vnode, parent }, el) {
3157
+ if (!el)
3158
+ return;
3157
3159
  while (parent) {
3158
3160
  const root = parent.subTree;
3159
3161
  if (root.suspense && root.suspense.activeBranch === vnode) {
@@ -5878,24 +5880,30 @@ function useModel(props, name) {
5878
5880
  warn(`useModel() called with prop "${name}" which is not declared.`);
5879
5881
  return ref();
5880
5882
  }
5881
- let localValue;
5882
- watchSyncEffect(() => {
5883
- localValue = props[name];
5884
- });
5885
- return customRef((track, trigger) => ({
5886
- get() {
5887
- track();
5888
- return localValue;
5889
- },
5890
- set(value) {
5891
- const rawProps = i.vnode.props;
5892
- if (!(rawProps && name in rawProps) && hasChanged(value, localValue)) {
5893
- localValue = value;
5883
+ return customRef((track, trigger) => {
5884
+ let localValue;
5885
+ watchSyncEffect(() => {
5886
+ const propValue = props[name];
5887
+ if (hasChanged(localValue, propValue)) {
5888
+ localValue = propValue;
5894
5889
  trigger();
5895
5890
  }
5896
- i.emit(`update:${name}`, value);
5897
- }
5898
- }));
5891
+ });
5892
+ return {
5893
+ get() {
5894
+ track();
5895
+ return localValue;
5896
+ },
5897
+ set(value) {
5898
+ const rawProps = i.vnode.props;
5899
+ if (!(rawProps && name in rawProps) && hasChanged(value, localValue)) {
5900
+ localValue = value;
5901
+ trigger();
5902
+ }
5903
+ i.emit(`update:${name}`, value);
5904
+ }
5905
+ };
5906
+ });
5899
5907
  }
5900
5908
  function getContext() {
5901
5909
  const i = getCurrentInstance();
@@ -6469,7 +6477,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
6469
6477
  return vm;
6470
6478
  }
6471
6479
  }
6472
- Vue.version = `2.6.14-compat:${"3.4.0-beta.2"}`;
6480
+ Vue.version = `2.6.14-compat:${"3.4.0-beta.3"}`;
6473
6481
  Vue.config = singletonApp.config;
6474
6482
  Vue.use = (p, ...options) => {
6475
6483
  if (p && isFunction(p.install)) {
@@ -11173,7 +11181,7 @@ function isMemoSame(cached, memo) {
11173
11181
  return true;
11174
11182
  }
11175
11183
 
11176
- const version = "3.4.0-beta.2";
11184
+ const version = "3.4.0-beta.3";
11177
11185
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
11178
11186
  const ssrUtils = null;
11179
11187
  const resolveFilter = resolveFilter$1 ;
@@ -11615,6 +11623,69 @@ function setDisplay(el, value) {
11615
11623
  el.style.display = value ? el[vShowOldKey] : "none";
11616
11624
  }
11617
11625
 
11626
+ const CSS_VAR_TEXT = Symbol("CSS_VAR_TEXT" );
11627
+ function useCssVars(getter) {
11628
+ const instance = getCurrentInstance();
11629
+ if (!instance) {
11630
+ warn(`useCssVars is called without current active component instance.`);
11631
+ return;
11632
+ }
11633
+ const updateTeleports = instance.ut = (vars = getter(instance.proxy)) => {
11634
+ Array.from(
11635
+ document.querySelectorAll(`[data-v-owner="${instance.uid}"]`)
11636
+ ).forEach((node) => setVarsOnNode(node, vars));
11637
+ };
11638
+ const setVars = () => {
11639
+ const vars = getter(instance.proxy);
11640
+ setVarsOnVNode(instance.subTree, vars);
11641
+ updateTeleports(vars);
11642
+ };
11643
+ watchPostEffect(setVars);
11644
+ onMounted(() => {
11645
+ const ob = new MutationObserver(setVars);
11646
+ ob.observe(instance.subTree.el.parentNode, { childList: true });
11647
+ onUnmounted(() => ob.disconnect());
11648
+ });
11649
+ }
11650
+ function setVarsOnVNode(vnode, vars) {
11651
+ if (vnode.shapeFlag & 128) {
11652
+ const suspense = vnode.suspense;
11653
+ vnode = suspense.activeBranch;
11654
+ if (suspense.pendingBranch && !suspense.isHydrating) {
11655
+ suspense.effects.push(() => {
11656
+ setVarsOnVNode(suspense.activeBranch, vars);
11657
+ });
11658
+ }
11659
+ }
11660
+ while (vnode.component) {
11661
+ vnode = vnode.component.subTree;
11662
+ }
11663
+ if (vnode.shapeFlag & 1 && vnode.el) {
11664
+ setVarsOnNode(vnode.el, vars);
11665
+ } else if (vnode.type === Fragment) {
11666
+ vnode.children.forEach((c) => setVarsOnVNode(c, vars));
11667
+ } else if (vnode.type === Static) {
11668
+ let { el, anchor } = vnode;
11669
+ while (el) {
11670
+ setVarsOnNode(el, vars);
11671
+ if (el === anchor)
11672
+ break;
11673
+ el = el.nextSibling;
11674
+ }
11675
+ }
11676
+ }
11677
+ function setVarsOnNode(el, vars) {
11678
+ if (el.nodeType === 1) {
11679
+ const style = el.style;
11680
+ let cssText = "";
11681
+ for (const key in vars) {
11682
+ style.setProperty(`--${key}`, vars[key]);
11683
+ cssText += `--${key}: ${vars[key]};`;
11684
+ }
11685
+ style[CSS_VAR_TEXT] = cssText;
11686
+ }
11687
+ }
11688
+
11618
11689
  function patchStyle(el, prev, next) {
11619
11690
  const style = el.style;
11620
11691
  const isCssString = isString(next);
@@ -11633,6 +11704,10 @@ function patchStyle(el, prev, next) {
11633
11704
  const currentDisplay = style.display;
11634
11705
  if (isCssString) {
11635
11706
  if (prev !== next) {
11707
+ const cssVarText = style[CSS_VAR_TEXT];
11708
+ if (cssVarText) {
11709
+ next += ";" + cssVarText;
11710
+ }
11636
11711
  style.cssText = next;
11637
11712
  }
11638
11713
  } else if (prev) {
@@ -12183,65 +12258,6 @@ function useCssModule(name = "$style") {
12183
12258
  }
12184
12259
  }
12185
12260
 
12186
- function useCssVars(getter) {
12187
- const instance = getCurrentInstance();
12188
- if (!instance) {
12189
- warn(`useCssVars is called without current active component instance.`);
12190
- return;
12191
- }
12192
- const updateTeleports = instance.ut = (vars = getter(instance.proxy)) => {
12193
- Array.from(
12194
- document.querySelectorAll(`[data-v-owner="${instance.uid}"]`)
12195
- ).forEach((node) => setVarsOnNode(node, vars));
12196
- };
12197
- const setVars = () => {
12198
- const vars = getter(instance.proxy);
12199
- setVarsOnVNode(instance.subTree, vars);
12200
- updateTeleports(vars);
12201
- };
12202
- watchPostEffect(setVars);
12203
- onMounted(() => {
12204
- const ob = new MutationObserver(setVars);
12205
- ob.observe(instance.subTree.el.parentNode, { childList: true });
12206
- onUnmounted(() => ob.disconnect());
12207
- });
12208
- }
12209
- function setVarsOnVNode(vnode, vars) {
12210
- if (vnode.shapeFlag & 128) {
12211
- const suspense = vnode.suspense;
12212
- vnode = suspense.activeBranch;
12213
- if (suspense.pendingBranch && !suspense.isHydrating) {
12214
- suspense.effects.push(() => {
12215
- setVarsOnVNode(suspense.activeBranch, vars);
12216
- });
12217
- }
12218
- }
12219
- while (vnode.component) {
12220
- vnode = vnode.component.subTree;
12221
- }
12222
- if (vnode.shapeFlag & 1 && vnode.el) {
12223
- setVarsOnNode(vnode.el, vars);
12224
- } else if (vnode.type === Fragment) {
12225
- vnode.children.forEach((c) => setVarsOnVNode(c, vars));
12226
- } else if (vnode.type === Static) {
12227
- let { el, anchor } = vnode;
12228
- while (el) {
12229
- setVarsOnNode(el, vars);
12230
- if (el === anchor)
12231
- break;
12232
- el = el.nextSibling;
12233
- }
12234
- }
12235
- }
12236
- function setVarsOnNode(el, vars) {
12237
- if (el.nodeType === 1) {
12238
- const style = el.style;
12239
- for (const key in vars) {
12240
- style.setProperty(`--${key}`, vars[key]);
12241
- }
12242
- }
12243
- }
12244
-
12245
12261
  const positionMap = /* @__PURE__ */ new WeakMap();
12246
12262
  const newPositionMap = /* @__PURE__ */ new WeakMap();
12247
12263
  const moveCbKey = Symbol("_moveCb");
@@ -14187,7 +14203,7 @@ const errorMessages = {
14187
14203
  Use a v-bind binding combined with a v-on listener that emits update:x event instead.`,
14188
14204
  [45]: `Error parsing JavaScript expression: `,
14189
14205
  [46]: `<KeepAlive> expects exactly one child component.`,
14190
- [51]: `@vnode-* hooks in templates are deprecated. Use the vue: prefix instead. For example, @vnode-mounted should be changed to @vue:mounted. @vnode-* hooks support will be removed in 3.4.`,
14206
+ [51]: `@vnode-* hooks in templates are no longer supported. Use the vue: prefix instead. For example, @vnode-mounted should be changed to @vue:mounted. @vnode-* hooks support has been removed in 3.4.`,
14191
14207
  // generic errors
14192
14208
  [47]: `"prefixIdentifiers" option is not supported in this build of compiler.`,
14193
14209
  [48]: `ES module mode is not supported in this build of compiler.`,