@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 +37 -24
- package/dist/vue.cjs.prod.js +37 -24
- package/dist/vue.esm-browser.js +95 -79
- package/dist/vue.esm-browser.prod.js +4 -4
- package/dist/vue.esm-bundler.js +95 -79
- package/dist/vue.global.js +95 -79
- package/dist/vue.global.prod.js +4 -4
- package/dist/vue.runtime.esm-browser.js +94 -78
- package/dist/vue.runtime.esm-browser.prod.js +4 -4
- package/dist/vue.runtime.esm-bundler.js +94 -78
- package/dist/vue.runtime.global.js +94 -78
- package/dist/vue.runtime.global.prod.js +4 -4
- package/package.json +2 -2
package/dist/vue.esm-bundler.js
CHANGED
|
@@ -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 = "
|
|
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);
|
|
@@ -3163,6 +3163,8 @@ function hasPropsChanged(prevProps, nextProps, emitsOptions) {
|
|
|
3163
3163
|
return false;
|
|
3164
3164
|
}
|
|
3165
3165
|
function updateHOCHostEl({ vnode, parent }, el) {
|
|
3166
|
+
if (!el)
|
|
3167
|
+
return;
|
|
3166
3168
|
while (parent) {
|
|
3167
3169
|
const root = parent.subTree;
|
|
3168
3170
|
if (root.suspense && root.suspense.activeBranch === vnode) {
|
|
@@ -5916,24 +5918,30 @@ function useModel(props, name) {
|
|
|
5916
5918
|
warn(`useModel() called with prop "${name}" which is not declared.`);
|
|
5917
5919
|
return ref();
|
|
5918
5920
|
}
|
|
5919
|
-
|
|
5920
|
-
|
|
5921
|
-
|
|
5922
|
-
|
|
5923
|
-
|
|
5924
|
-
|
|
5925
|
-
track();
|
|
5926
|
-
return localValue;
|
|
5927
|
-
},
|
|
5928
|
-
set(value) {
|
|
5929
|
-
const rawProps = i.vnode.props;
|
|
5930
|
-
if (!(rawProps && name in rawProps) && hasChanged(value, localValue)) {
|
|
5931
|
-
localValue = value;
|
|
5921
|
+
return customRef((track, trigger) => {
|
|
5922
|
+
let localValue;
|
|
5923
|
+
watchSyncEffect(() => {
|
|
5924
|
+
const propValue = props[name];
|
|
5925
|
+
if (hasChanged(localValue, propValue)) {
|
|
5926
|
+
localValue = propValue;
|
|
5932
5927
|
trigger();
|
|
5933
5928
|
}
|
|
5934
|
-
|
|
5935
|
-
|
|
5936
|
-
|
|
5929
|
+
});
|
|
5930
|
+
return {
|
|
5931
|
+
get() {
|
|
5932
|
+
track();
|
|
5933
|
+
return localValue;
|
|
5934
|
+
},
|
|
5935
|
+
set(value) {
|
|
5936
|
+
const rawProps = i.vnode.props;
|
|
5937
|
+
if (!(rawProps && name in rawProps) && hasChanged(value, localValue)) {
|
|
5938
|
+
localValue = value;
|
|
5939
|
+
trigger();
|
|
5940
|
+
}
|
|
5941
|
+
i.emit(`update:${name}`, value);
|
|
5942
|
+
}
|
|
5943
|
+
};
|
|
5944
|
+
});
|
|
5937
5945
|
}
|
|
5938
5946
|
function getContext() {
|
|
5939
5947
|
const i = getCurrentInstance();
|
|
@@ -6509,7 +6517,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
6509
6517
|
return vm;
|
|
6510
6518
|
}
|
|
6511
6519
|
}
|
|
6512
|
-
Vue.version = `2.6.14-compat:${"3.4.0-beta.
|
|
6520
|
+
Vue.version = `2.6.14-compat:${"3.4.0-beta.3"}`;
|
|
6513
6521
|
Vue.config = singletonApp.config;
|
|
6514
6522
|
Vue.use = (p, ...options) => {
|
|
6515
6523
|
if (p && isFunction(p.install)) {
|
|
@@ -11297,7 +11305,7 @@ function isMemoSame(cached, memo) {
|
|
|
11297
11305
|
return true;
|
|
11298
11306
|
}
|
|
11299
11307
|
|
|
11300
|
-
const version = "3.4.0-beta.
|
|
11308
|
+
const version = "3.4.0-beta.3";
|
|
11301
11309
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
11302
11310
|
const _ssrUtils = {
|
|
11303
11311
|
createComponentInstance,
|
|
@@ -11754,6 +11762,69 @@ function initVShowForSSR() {
|
|
|
11754
11762
|
};
|
|
11755
11763
|
}
|
|
11756
11764
|
|
|
11765
|
+
const CSS_VAR_TEXT = Symbol(!!(process.env.NODE_ENV !== "production") ? "CSS_VAR_TEXT" : "");
|
|
11766
|
+
function useCssVars(getter) {
|
|
11767
|
+
const instance = getCurrentInstance();
|
|
11768
|
+
if (!instance) {
|
|
11769
|
+
!!(process.env.NODE_ENV !== "production") && warn(`useCssVars is called without current active component instance.`);
|
|
11770
|
+
return;
|
|
11771
|
+
}
|
|
11772
|
+
const updateTeleports = instance.ut = (vars = getter(instance.proxy)) => {
|
|
11773
|
+
Array.from(
|
|
11774
|
+
document.querySelectorAll(`[data-v-owner="${instance.uid}"]`)
|
|
11775
|
+
).forEach((node) => setVarsOnNode(node, vars));
|
|
11776
|
+
};
|
|
11777
|
+
const setVars = () => {
|
|
11778
|
+
const vars = getter(instance.proxy);
|
|
11779
|
+
setVarsOnVNode(instance.subTree, vars);
|
|
11780
|
+
updateTeleports(vars);
|
|
11781
|
+
};
|
|
11782
|
+
watchPostEffect(setVars);
|
|
11783
|
+
onMounted(() => {
|
|
11784
|
+
const ob = new MutationObserver(setVars);
|
|
11785
|
+
ob.observe(instance.subTree.el.parentNode, { childList: true });
|
|
11786
|
+
onUnmounted(() => ob.disconnect());
|
|
11787
|
+
});
|
|
11788
|
+
}
|
|
11789
|
+
function setVarsOnVNode(vnode, vars) {
|
|
11790
|
+
if (vnode.shapeFlag & 128) {
|
|
11791
|
+
const suspense = vnode.suspense;
|
|
11792
|
+
vnode = suspense.activeBranch;
|
|
11793
|
+
if (suspense.pendingBranch && !suspense.isHydrating) {
|
|
11794
|
+
suspense.effects.push(() => {
|
|
11795
|
+
setVarsOnVNode(suspense.activeBranch, vars);
|
|
11796
|
+
});
|
|
11797
|
+
}
|
|
11798
|
+
}
|
|
11799
|
+
while (vnode.component) {
|
|
11800
|
+
vnode = vnode.component.subTree;
|
|
11801
|
+
}
|
|
11802
|
+
if (vnode.shapeFlag & 1 && vnode.el) {
|
|
11803
|
+
setVarsOnNode(vnode.el, vars);
|
|
11804
|
+
} else if (vnode.type === Fragment) {
|
|
11805
|
+
vnode.children.forEach((c) => setVarsOnVNode(c, vars));
|
|
11806
|
+
} else if (vnode.type === Static) {
|
|
11807
|
+
let { el, anchor } = vnode;
|
|
11808
|
+
while (el) {
|
|
11809
|
+
setVarsOnNode(el, vars);
|
|
11810
|
+
if (el === anchor)
|
|
11811
|
+
break;
|
|
11812
|
+
el = el.nextSibling;
|
|
11813
|
+
}
|
|
11814
|
+
}
|
|
11815
|
+
}
|
|
11816
|
+
function setVarsOnNode(el, vars) {
|
|
11817
|
+
if (el.nodeType === 1) {
|
|
11818
|
+
const style = el.style;
|
|
11819
|
+
let cssText = "";
|
|
11820
|
+
for (const key in vars) {
|
|
11821
|
+
style.setProperty(`--${key}`, vars[key]);
|
|
11822
|
+
cssText += `--${key}: ${vars[key]};`;
|
|
11823
|
+
}
|
|
11824
|
+
style[CSS_VAR_TEXT] = cssText;
|
|
11825
|
+
}
|
|
11826
|
+
}
|
|
11827
|
+
|
|
11757
11828
|
function patchStyle(el, prev, next) {
|
|
11758
11829
|
const style = el.style;
|
|
11759
11830
|
const isCssString = isString(next);
|
|
@@ -11772,6 +11843,10 @@ function patchStyle(el, prev, next) {
|
|
|
11772
11843
|
const currentDisplay = style.display;
|
|
11773
11844
|
if (isCssString) {
|
|
11774
11845
|
if (prev !== next) {
|
|
11846
|
+
const cssVarText = style[CSS_VAR_TEXT];
|
|
11847
|
+
if (cssVarText) {
|
|
11848
|
+
next += ";" + cssVarText;
|
|
11849
|
+
}
|
|
11775
11850
|
style.cssText = next;
|
|
11776
11851
|
}
|
|
11777
11852
|
} else if (prev) {
|
|
@@ -12322,65 +12397,6 @@ function useCssModule(name = "$style") {
|
|
|
12322
12397
|
}
|
|
12323
12398
|
}
|
|
12324
12399
|
|
|
12325
|
-
function useCssVars(getter) {
|
|
12326
|
-
const instance = getCurrentInstance();
|
|
12327
|
-
if (!instance) {
|
|
12328
|
-
!!(process.env.NODE_ENV !== "production") && warn(`useCssVars is called without current active component instance.`);
|
|
12329
|
-
return;
|
|
12330
|
-
}
|
|
12331
|
-
const updateTeleports = instance.ut = (vars = getter(instance.proxy)) => {
|
|
12332
|
-
Array.from(
|
|
12333
|
-
document.querySelectorAll(`[data-v-owner="${instance.uid}"]`)
|
|
12334
|
-
).forEach((node) => setVarsOnNode(node, vars));
|
|
12335
|
-
};
|
|
12336
|
-
const setVars = () => {
|
|
12337
|
-
const vars = getter(instance.proxy);
|
|
12338
|
-
setVarsOnVNode(instance.subTree, vars);
|
|
12339
|
-
updateTeleports(vars);
|
|
12340
|
-
};
|
|
12341
|
-
watchPostEffect(setVars);
|
|
12342
|
-
onMounted(() => {
|
|
12343
|
-
const ob = new MutationObserver(setVars);
|
|
12344
|
-
ob.observe(instance.subTree.el.parentNode, { childList: true });
|
|
12345
|
-
onUnmounted(() => ob.disconnect());
|
|
12346
|
-
});
|
|
12347
|
-
}
|
|
12348
|
-
function setVarsOnVNode(vnode, vars) {
|
|
12349
|
-
if (vnode.shapeFlag & 128) {
|
|
12350
|
-
const suspense = vnode.suspense;
|
|
12351
|
-
vnode = suspense.activeBranch;
|
|
12352
|
-
if (suspense.pendingBranch && !suspense.isHydrating) {
|
|
12353
|
-
suspense.effects.push(() => {
|
|
12354
|
-
setVarsOnVNode(suspense.activeBranch, vars);
|
|
12355
|
-
});
|
|
12356
|
-
}
|
|
12357
|
-
}
|
|
12358
|
-
while (vnode.component) {
|
|
12359
|
-
vnode = vnode.component.subTree;
|
|
12360
|
-
}
|
|
12361
|
-
if (vnode.shapeFlag & 1 && vnode.el) {
|
|
12362
|
-
setVarsOnNode(vnode.el, vars);
|
|
12363
|
-
} else if (vnode.type === Fragment) {
|
|
12364
|
-
vnode.children.forEach((c) => setVarsOnVNode(c, vars));
|
|
12365
|
-
} else if (vnode.type === Static) {
|
|
12366
|
-
let { el, anchor } = vnode;
|
|
12367
|
-
while (el) {
|
|
12368
|
-
setVarsOnNode(el, vars);
|
|
12369
|
-
if (el === anchor)
|
|
12370
|
-
break;
|
|
12371
|
-
el = el.nextSibling;
|
|
12372
|
-
}
|
|
12373
|
-
}
|
|
12374
|
-
}
|
|
12375
|
-
function setVarsOnNode(el, vars) {
|
|
12376
|
-
if (el.nodeType === 1) {
|
|
12377
|
-
const style = el.style;
|
|
12378
|
-
for (const key in vars) {
|
|
12379
|
-
style.setProperty(`--${key}`, vars[key]);
|
|
12380
|
-
}
|
|
12381
|
-
}
|
|
12382
|
-
}
|
|
12383
|
-
|
|
12384
12400
|
const positionMap = /* @__PURE__ */ new WeakMap();
|
|
12385
12401
|
const newPositionMap = /* @__PURE__ */ new WeakMap();
|
|
12386
12402
|
const moveCbKey = Symbol("_moveCb");
|
|
@@ -14361,7 +14377,7 @@ const errorMessages = {
|
|
|
14361
14377
|
Use a v-bind binding combined with a v-on listener that emits update:x event instead.`,
|
|
14362
14378
|
[45]: `Error parsing JavaScript expression: `,
|
|
14363
14379
|
[46]: `<KeepAlive> expects exactly one child component.`,
|
|
14364
|
-
[51]: `@vnode-* hooks in templates are
|
|
14380
|
+
[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.`,
|
|
14365
14381
|
// generic errors
|
|
14366
14382
|
[47]: `"prefixIdentifiers" option is not supported in this build of compiler.`,
|
|
14367
14383
|
[48]: `ES module mode is not supported in this build of compiler.`,
|
package/dist/vue.global.js
CHANGED
|
@@ -242,7 +242,7 @@ var Vue = (function () {
|
|
|
242
242
|
|
|
243
243
|
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";
|
|
244
244
|
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";
|
|
245
|
-
const MATH_TAGS = "
|
|
245
|
+
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";
|
|
246
246
|
const VOID_TAGS = "area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr";
|
|
247
247
|
const isHTMLTag = /* @__PURE__ */ makeMap(HTML_TAGS);
|
|
248
248
|
const isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS);
|
|
@@ -3157,6 +3157,8 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
3157
3157
|
return false;
|
|
3158
3158
|
}
|
|
3159
3159
|
function updateHOCHostEl({ vnode, parent }, el) {
|
|
3160
|
+
if (!el)
|
|
3161
|
+
return;
|
|
3160
3162
|
while (parent) {
|
|
3161
3163
|
const root = parent.subTree;
|
|
3162
3164
|
if (root.suspense && root.suspense.activeBranch === vnode) {
|
|
@@ -5881,24 +5883,30 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
5881
5883
|
warn(`useModel() called with prop "${name}" which is not declared.`);
|
|
5882
5884
|
return ref();
|
|
5883
5885
|
}
|
|
5884
|
-
|
|
5885
|
-
|
|
5886
|
-
|
|
5887
|
-
|
|
5888
|
-
|
|
5889
|
-
|
|
5890
|
-
track();
|
|
5891
|
-
return localValue;
|
|
5892
|
-
},
|
|
5893
|
-
set(value) {
|
|
5894
|
-
const rawProps = i.vnode.props;
|
|
5895
|
-
if (!(rawProps && name in rawProps) && hasChanged(value, localValue)) {
|
|
5896
|
-
localValue = value;
|
|
5886
|
+
return customRef((track, trigger) => {
|
|
5887
|
+
let localValue;
|
|
5888
|
+
watchSyncEffect(() => {
|
|
5889
|
+
const propValue = props[name];
|
|
5890
|
+
if (hasChanged(localValue, propValue)) {
|
|
5891
|
+
localValue = propValue;
|
|
5897
5892
|
trigger();
|
|
5898
5893
|
}
|
|
5899
|
-
|
|
5900
|
-
|
|
5901
|
-
|
|
5894
|
+
});
|
|
5895
|
+
return {
|
|
5896
|
+
get() {
|
|
5897
|
+
track();
|
|
5898
|
+
return localValue;
|
|
5899
|
+
},
|
|
5900
|
+
set(value) {
|
|
5901
|
+
const rawProps = i.vnode.props;
|
|
5902
|
+
if (!(rawProps && name in rawProps) && hasChanged(value, localValue)) {
|
|
5903
|
+
localValue = value;
|
|
5904
|
+
trigger();
|
|
5905
|
+
}
|
|
5906
|
+
i.emit(`update:${name}`, value);
|
|
5907
|
+
}
|
|
5908
|
+
};
|
|
5909
|
+
});
|
|
5902
5910
|
}
|
|
5903
5911
|
function getContext() {
|
|
5904
5912
|
const i = getCurrentInstance();
|
|
@@ -6472,7 +6480,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
6472
6480
|
return vm;
|
|
6473
6481
|
}
|
|
6474
6482
|
}
|
|
6475
|
-
Vue.version = `2.6.14-compat:${"3.4.0-beta.
|
|
6483
|
+
Vue.version = `2.6.14-compat:${"3.4.0-beta.3"}`;
|
|
6476
6484
|
Vue.config = singletonApp.config;
|
|
6477
6485
|
Vue.use = (p, ...options) => {
|
|
6478
6486
|
if (p && isFunction(p.install)) {
|
|
@@ -11170,7 +11178,7 @@ Component that was made reactive: `,
|
|
|
11170
11178
|
return true;
|
|
11171
11179
|
}
|
|
11172
11180
|
|
|
11173
|
-
const version = "3.4.0-beta.
|
|
11181
|
+
const version = "3.4.0-beta.3";
|
|
11174
11182
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
11175
11183
|
const ssrUtils = null;
|
|
11176
11184
|
const resolveFilter = resolveFilter$1 ;
|
|
@@ -11612,6 +11620,69 @@ Component that was made reactive: `,
|
|
|
11612
11620
|
el.style.display = value ? el[vShowOldKey] : "none";
|
|
11613
11621
|
}
|
|
11614
11622
|
|
|
11623
|
+
const CSS_VAR_TEXT = Symbol("CSS_VAR_TEXT" );
|
|
11624
|
+
function useCssVars(getter) {
|
|
11625
|
+
const instance = getCurrentInstance();
|
|
11626
|
+
if (!instance) {
|
|
11627
|
+
warn(`useCssVars is called without current active component instance.`);
|
|
11628
|
+
return;
|
|
11629
|
+
}
|
|
11630
|
+
const updateTeleports = instance.ut = (vars = getter(instance.proxy)) => {
|
|
11631
|
+
Array.from(
|
|
11632
|
+
document.querySelectorAll(`[data-v-owner="${instance.uid}"]`)
|
|
11633
|
+
).forEach((node) => setVarsOnNode(node, vars));
|
|
11634
|
+
};
|
|
11635
|
+
const setVars = () => {
|
|
11636
|
+
const vars = getter(instance.proxy);
|
|
11637
|
+
setVarsOnVNode(instance.subTree, vars);
|
|
11638
|
+
updateTeleports(vars);
|
|
11639
|
+
};
|
|
11640
|
+
watchPostEffect(setVars);
|
|
11641
|
+
onMounted(() => {
|
|
11642
|
+
const ob = new MutationObserver(setVars);
|
|
11643
|
+
ob.observe(instance.subTree.el.parentNode, { childList: true });
|
|
11644
|
+
onUnmounted(() => ob.disconnect());
|
|
11645
|
+
});
|
|
11646
|
+
}
|
|
11647
|
+
function setVarsOnVNode(vnode, vars) {
|
|
11648
|
+
if (vnode.shapeFlag & 128) {
|
|
11649
|
+
const suspense = vnode.suspense;
|
|
11650
|
+
vnode = suspense.activeBranch;
|
|
11651
|
+
if (suspense.pendingBranch && !suspense.isHydrating) {
|
|
11652
|
+
suspense.effects.push(() => {
|
|
11653
|
+
setVarsOnVNode(suspense.activeBranch, vars);
|
|
11654
|
+
});
|
|
11655
|
+
}
|
|
11656
|
+
}
|
|
11657
|
+
while (vnode.component) {
|
|
11658
|
+
vnode = vnode.component.subTree;
|
|
11659
|
+
}
|
|
11660
|
+
if (vnode.shapeFlag & 1 && vnode.el) {
|
|
11661
|
+
setVarsOnNode(vnode.el, vars);
|
|
11662
|
+
} else if (vnode.type === Fragment) {
|
|
11663
|
+
vnode.children.forEach((c) => setVarsOnVNode(c, vars));
|
|
11664
|
+
} else if (vnode.type === Static) {
|
|
11665
|
+
let { el, anchor } = vnode;
|
|
11666
|
+
while (el) {
|
|
11667
|
+
setVarsOnNode(el, vars);
|
|
11668
|
+
if (el === anchor)
|
|
11669
|
+
break;
|
|
11670
|
+
el = el.nextSibling;
|
|
11671
|
+
}
|
|
11672
|
+
}
|
|
11673
|
+
}
|
|
11674
|
+
function setVarsOnNode(el, vars) {
|
|
11675
|
+
if (el.nodeType === 1) {
|
|
11676
|
+
const style = el.style;
|
|
11677
|
+
let cssText = "";
|
|
11678
|
+
for (const key in vars) {
|
|
11679
|
+
style.setProperty(`--${key}`, vars[key]);
|
|
11680
|
+
cssText += `--${key}: ${vars[key]};`;
|
|
11681
|
+
}
|
|
11682
|
+
style[CSS_VAR_TEXT] = cssText;
|
|
11683
|
+
}
|
|
11684
|
+
}
|
|
11685
|
+
|
|
11615
11686
|
function patchStyle(el, prev, next) {
|
|
11616
11687
|
const style = el.style;
|
|
11617
11688
|
const isCssString = isString(next);
|
|
@@ -11630,6 +11701,10 @@ Component that was made reactive: `,
|
|
|
11630
11701
|
const currentDisplay = style.display;
|
|
11631
11702
|
if (isCssString) {
|
|
11632
11703
|
if (prev !== next) {
|
|
11704
|
+
const cssVarText = style[CSS_VAR_TEXT];
|
|
11705
|
+
if (cssVarText) {
|
|
11706
|
+
next += ";" + cssVarText;
|
|
11707
|
+
}
|
|
11633
11708
|
style.cssText = next;
|
|
11634
11709
|
}
|
|
11635
11710
|
} else if (prev) {
|
|
@@ -12168,65 +12243,6 @@ Component that was made reactive: `,
|
|
|
12168
12243
|
}
|
|
12169
12244
|
}
|
|
12170
12245
|
|
|
12171
|
-
function useCssVars(getter) {
|
|
12172
|
-
const instance = getCurrentInstance();
|
|
12173
|
-
if (!instance) {
|
|
12174
|
-
warn(`useCssVars is called without current active component instance.`);
|
|
12175
|
-
return;
|
|
12176
|
-
}
|
|
12177
|
-
const updateTeleports = instance.ut = (vars = getter(instance.proxy)) => {
|
|
12178
|
-
Array.from(
|
|
12179
|
-
document.querySelectorAll(`[data-v-owner="${instance.uid}"]`)
|
|
12180
|
-
).forEach((node) => setVarsOnNode(node, vars));
|
|
12181
|
-
};
|
|
12182
|
-
const setVars = () => {
|
|
12183
|
-
const vars = getter(instance.proxy);
|
|
12184
|
-
setVarsOnVNode(instance.subTree, vars);
|
|
12185
|
-
updateTeleports(vars);
|
|
12186
|
-
};
|
|
12187
|
-
watchPostEffect(setVars);
|
|
12188
|
-
onMounted(() => {
|
|
12189
|
-
const ob = new MutationObserver(setVars);
|
|
12190
|
-
ob.observe(instance.subTree.el.parentNode, { childList: true });
|
|
12191
|
-
onUnmounted(() => ob.disconnect());
|
|
12192
|
-
});
|
|
12193
|
-
}
|
|
12194
|
-
function setVarsOnVNode(vnode, vars) {
|
|
12195
|
-
if (vnode.shapeFlag & 128) {
|
|
12196
|
-
const suspense = vnode.suspense;
|
|
12197
|
-
vnode = suspense.activeBranch;
|
|
12198
|
-
if (suspense.pendingBranch && !suspense.isHydrating) {
|
|
12199
|
-
suspense.effects.push(() => {
|
|
12200
|
-
setVarsOnVNode(suspense.activeBranch, vars);
|
|
12201
|
-
});
|
|
12202
|
-
}
|
|
12203
|
-
}
|
|
12204
|
-
while (vnode.component) {
|
|
12205
|
-
vnode = vnode.component.subTree;
|
|
12206
|
-
}
|
|
12207
|
-
if (vnode.shapeFlag & 1 && vnode.el) {
|
|
12208
|
-
setVarsOnNode(vnode.el, vars);
|
|
12209
|
-
} else if (vnode.type === Fragment) {
|
|
12210
|
-
vnode.children.forEach((c) => setVarsOnVNode(c, vars));
|
|
12211
|
-
} else if (vnode.type === Static) {
|
|
12212
|
-
let { el, anchor } = vnode;
|
|
12213
|
-
while (el) {
|
|
12214
|
-
setVarsOnNode(el, vars);
|
|
12215
|
-
if (el === anchor)
|
|
12216
|
-
break;
|
|
12217
|
-
el = el.nextSibling;
|
|
12218
|
-
}
|
|
12219
|
-
}
|
|
12220
|
-
}
|
|
12221
|
-
function setVarsOnNode(el, vars) {
|
|
12222
|
-
if (el.nodeType === 1) {
|
|
12223
|
-
const style = el.style;
|
|
12224
|
-
for (const key in vars) {
|
|
12225
|
-
style.setProperty(`--${key}`, vars[key]);
|
|
12226
|
-
}
|
|
12227
|
-
}
|
|
12228
|
-
}
|
|
12229
|
-
|
|
12230
12246
|
const positionMap = /* @__PURE__ */ new WeakMap();
|
|
12231
12247
|
const newPositionMap = /* @__PURE__ */ new WeakMap();
|
|
12232
12248
|
const moveCbKey = Symbol("_moveCb");
|
|
@@ -14172,7 +14188,7 @@ Make sure to use the production build (*.prod.js) when deploying for production.
|
|
|
14172
14188
|
Use a v-bind binding combined with a v-on listener that emits update:x event instead.`,
|
|
14173
14189
|
[45]: `Error parsing JavaScript expression: `,
|
|
14174
14190
|
[46]: `<KeepAlive> expects exactly one child component.`,
|
|
14175
|
-
[51]: `@vnode-* hooks in templates are
|
|
14191
|
+
[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.`,
|
|
14176
14192
|
// generic errors
|
|
14177
14193
|
[47]: `"prefixIdentifiers" option is not supported in this build of compiler.`,
|
|
14178
14194
|
[48]: `ES module mode is not supported in this build of compiler.`,
|