@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
|
@@ -176,7 +176,7 @@ function normalizeProps(props) {
|
|
|
176
176
|
|
|
177
177
|
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";
|
|
178
178
|
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";
|
|
179
|
-
const MATH_TAGS = "
|
|
179
|
+
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";
|
|
180
180
|
const isHTMLTag = /* @__PURE__ */ makeMap(HTML_TAGS);
|
|
181
181
|
const isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS);
|
|
182
182
|
const isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS);
|
|
@@ -3098,6 +3098,8 @@ function hasPropsChanged(prevProps, nextProps, emitsOptions) {
|
|
|
3098
3098
|
return false;
|
|
3099
3099
|
}
|
|
3100
3100
|
function updateHOCHostEl({ vnode, parent }, el) {
|
|
3101
|
+
if (!el)
|
|
3102
|
+
return;
|
|
3101
3103
|
while (parent) {
|
|
3102
3104
|
const root = parent.subTree;
|
|
3103
3105
|
if (root.suspense && root.suspense.activeBranch === vnode) {
|
|
@@ -5851,24 +5853,30 @@ function useModel(props, name) {
|
|
|
5851
5853
|
warn(`useModel() called with prop "${name}" which is not declared.`);
|
|
5852
5854
|
return ref();
|
|
5853
5855
|
}
|
|
5854
|
-
|
|
5855
|
-
|
|
5856
|
-
|
|
5857
|
-
|
|
5858
|
-
|
|
5859
|
-
|
|
5860
|
-
track();
|
|
5861
|
-
return localValue;
|
|
5862
|
-
},
|
|
5863
|
-
set(value) {
|
|
5864
|
-
const rawProps = i.vnode.props;
|
|
5865
|
-
if (!(rawProps && name in rawProps) && hasChanged(value, localValue)) {
|
|
5866
|
-
localValue = value;
|
|
5856
|
+
return customRef((track, trigger) => {
|
|
5857
|
+
let localValue;
|
|
5858
|
+
watchSyncEffect(() => {
|
|
5859
|
+
const propValue = props[name];
|
|
5860
|
+
if (hasChanged(localValue, propValue)) {
|
|
5861
|
+
localValue = propValue;
|
|
5867
5862
|
trigger();
|
|
5868
5863
|
}
|
|
5869
|
-
|
|
5870
|
-
|
|
5871
|
-
|
|
5864
|
+
});
|
|
5865
|
+
return {
|
|
5866
|
+
get() {
|
|
5867
|
+
track();
|
|
5868
|
+
return localValue;
|
|
5869
|
+
},
|
|
5870
|
+
set(value) {
|
|
5871
|
+
const rawProps = i.vnode.props;
|
|
5872
|
+
if (!(rawProps && name in rawProps) && hasChanged(value, localValue)) {
|
|
5873
|
+
localValue = value;
|
|
5874
|
+
trigger();
|
|
5875
|
+
}
|
|
5876
|
+
i.emit(`update:${name}`, value);
|
|
5877
|
+
}
|
|
5878
|
+
};
|
|
5879
|
+
});
|
|
5872
5880
|
}
|
|
5873
5881
|
function getContext() {
|
|
5874
5882
|
const i = getCurrentInstance();
|
|
@@ -6444,7 +6452,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
6444
6452
|
return vm;
|
|
6445
6453
|
}
|
|
6446
6454
|
}
|
|
6447
|
-
Vue.version = `2.6.14-compat:${"3.4.0-beta.
|
|
6455
|
+
Vue.version = `2.6.14-compat:${"3.4.0-beta.3"}`;
|
|
6448
6456
|
Vue.config = singletonApp.config;
|
|
6449
6457
|
Vue.use = (p, ...options) => {
|
|
6450
6458
|
if (p && isFunction(p.install)) {
|
|
@@ -11232,7 +11240,7 @@ function isMemoSame(cached, memo) {
|
|
|
11232
11240
|
return true;
|
|
11233
11241
|
}
|
|
11234
11242
|
|
|
11235
|
-
const version = "3.4.0-beta.
|
|
11243
|
+
const version = "3.4.0-beta.3";
|
|
11236
11244
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
11237
11245
|
const _ssrUtils = {
|
|
11238
11246
|
createComponentInstance,
|
|
@@ -11689,6 +11697,69 @@ function initVShowForSSR() {
|
|
|
11689
11697
|
};
|
|
11690
11698
|
}
|
|
11691
11699
|
|
|
11700
|
+
const CSS_VAR_TEXT = Symbol(!!(process.env.NODE_ENV !== "production") ? "CSS_VAR_TEXT" : "");
|
|
11701
|
+
function useCssVars(getter) {
|
|
11702
|
+
const instance = getCurrentInstance();
|
|
11703
|
+
if (!instance) {
|
|
11704
|
+
!!(process.env.NODE_ENV !== "production") && warn(`useCssVars is called without current active component instance.`);
|
|
11705
|
+
return;
|
|
11706
|
+
}
|
|
11707
|
+
const updateTeleports = instance.ut = (vars = getter(instance.proxy)) => {
|
|
11708
|
+
Array.from(
|
|
11709
|
+
document.querySelectorAll(`[data-v-owner="${instance.uid}"]`)
|
|
11710
|
+
).forEach((node) => setVarsOnNode(node, vars));
|
|
11711
|
+
};
|
|
11712
|
+
const setVars = () => {
|
|
11713
|
+
const vars = getter(instance.proxy);
|
|
11714
|
+
setVarsOnVNode(instance.subTree, vars);
|
|
11715
|
+
updateTeleports(vars);
|
|
11716
|
+
};
|
|
11717
|
+
watchPostEffect(setVars);
|
|
11718
|
+
onMounted(() => {
|
|
11719
|
+
const ob = new MutationObserver(setVars);
|
|
11720
|
+
ob.observe(instance.subTree.el.parentNode, { childList: true });
|
|
11721
|
+
onUnmounted(() => ob.disconnect());
|
|
11722
|
+
});
|
|
11723
|
+
}
|
|
11724
|
+
function setVarsOnVNode(vnode, vars) {
|
|
11725
|
+
if (vnode.shapeFlag & 128) {
|
|
11726
|
+
const suspense = vnode.suspense;
|
|
11727
|
+
vnode = suspense.activeBranch;
|
|
11728
|
+
if (suspense.pendingBranch && !suspense.isHydrating) {
|
|
11729
|
+
suspense.effects.push(() => {
|
|
11730
|
+
setVarsOnVNode(suspense.activeBranch, vars);
|
|
11731
|
+
});
|
|
11732
|
+
}
|
|
11733
|
+
}
|
|
11734
|
+
while (vnode.component) {
|
|
11735
|
+
vnode = vnode.component.subTree;
|
|
11736
|
+
}
|
|
11737
|
+
if (vnode.shapeFlag & 1 && vnode.el) {
|
|
11738
|
+
setVarsOnNode(vnode.el, vars);
|
|
11739
|
+
} else if (vnode.type === Fragment) {
|
|
11740
|
+
vnode.children.forEach((c) => setVarsOnVNode(c, vars));
|
|
11741
|
+
} else if (vnode.type === Static) {
|
|
11742
|
+
let { el, anchor } = vnode;
|
|
11743
|
+
while (el) {
|
|
11744
|
+
setVarsOnNode(el, vars);
|
|
11745
|
+
if (el === anchor)
|
|
11746
|
+
break;
|
|
11747
|
+
el = el.nextSibling;
|
|
11748
|
+
}
|
|
11749
|
+
}
|
|
11750
|
+
}
|
|
11751
|
+
function setVarsOnNode(el, vars) {
|
|
11752
|
+
if (el.nodeType === 1) {
|
|
11753
|
+
const style = el.style;
|
|
11754
|
+
let cssText = "";
|
|
11755
|
+
for (const key in vars) {
|
|
11756
|
+
style.setProperty(`--${key}`, vars[key]);
|
|
11757
|
+
cssText += `--${key}: ${vars[key]};`;
|
|
11758
|
+
}
|
|
11759
|
+
style[CSS_VAR_TEXT] = cssText;
|
|
11760
|
+
}
|
|
11761
|
+
}
|
|
11762
|
+
|
|
11692
11763
|
function patchStyle(el, prev, next) {
|
|
11693
11764
|
const style = el.style;
|
|
11694
11765
|
const isCssString = isString(next);
|
|
@@ -11707,6 +11778,10 @@ function patchStyle(el, prev, next) {
|
|
|
11707
11778
|
const currentDisplay = style.display;
|
|
11708
11779
|
if (isCssString) {
|
|
11709
11780
|
if (prev !== next) {
|
|
11781
|
+
const cssVarText = style[CSS_VAR_TEXT];
|
|
11782
|
+
if (cssVarText) {
|
|
11783
|
+
next += ";" + cssVarText;
|
|
11784
|
+
}
|
|
11710
11785
|
style.cssText = next;
|
|
11711
11786
|
}
|
|
11712
11787
|
} else if (prev) {
|
|
@@ -12257,65 +12332,6 @@ function useCssModule(name = "$style") {
|
|
|
12257
12332
|
}
|
|
12258
12333
|
}
|
|
12259
12334
|
|
|
12260
|
-
function useCssVars(getter) {
|
|
12261
|
-
const instance = getCurrentInstance();
|
|
12262
|
-
if (!instance) {
|
|
12263
|
-
!!(process.env.NODE_ENV !== "production") && warn(`useCssVars is called without current active component instance.`);
|
|
12264
|
-
return;
|
|
12265
|
-
}
|
|
12266
|
-
const updateTeleports = instance.ut = (vars = getter(instance.proxy)) => {
|
|
12267
|
-
Array.from(
|
|
12268
|
-
document.querySelectorAll(`[data-v-owner="${instance.uid}"]`)
|
|
12269
|
-
).forEach((node) => setVarsOnNode(node, vars));
|
|
12270
|
-
};
|
|
12271
|
-
const setVars = () => {
|
|
12272
|
-
const vars = getter(instance.proxy);
|
|
12273
|
-
setVarsOnVNode(instance.subTree, vars);
|
|
12274
|
-
updateTeleports(vars);
|
|
12275
|
-
};
|
|
12276
|
-
watchPostEffect(setVars);
|
|
12277
|
-
onMounted(() => {
|
|
12278
|
-
const ob = new MutationObserver(setVars);
|
|
12279
|
-
ob.observe(instance.subTree.el.parentNode, { childList: true });
|
|
12280
|
-
onUnmounted(() => ob.disconnect());
|
|
12281
|
-
});
|
|
12282
|
-
}
|
|
12283
|
-
function setVarsOnVNode(vnode, vars) {
|
|
12284
|
-
if (vnode.shapeFlag & 128) {
|
|
12285
|
-
const suspense = vnode.suspense;
|
|
12286
|
-
vnode = suspense.activeBranch;
|
|
12287
|
-
if (suspense.pendingBranch && !suspense.isHydrating) {
|
|
12288
|
-
suspense.effects.push(() => {
|
|
12289
|
-
setVarsOnVNode(suspense.activeBranch, vars);
|
|
12290
|
-
});
|
|
12291
|
-
}
|
|
12292
|
-
}
|
|
12293
|
-
while (vnode.component) {
|
|
12294
|
-
vnode = vnode.component.subTree;
|
|
12295
|
-
}
|
|
12296
|
-
if (vnode.shapeFlag & 1 && vnode.el) {
|
|
12297
|
-
setVarsOnNode(vnode.el, vars);
|
|
12298
|
-
} else if (vnode.type === Fragment) {
|
|
12299
|
-
vnode.children.forEach((c) => setVarsOnVNode(c, vars));
|
|
12300
|
-
} else if (vnode.type === Static) {
|
|
12301
|
-
let { el, anchor } = vnode;
|
|
12302
|
-
while (el) {
|
|
12303
|
-
setVarsOnNode(el, vars);
|
|
12304
|
-
if (el === anchor)
|
|
12305
|
-
break;
|
|
12306
|
-
el = el.nextSibling;
|
|
12307
|
-
}
|
|
12308
|
-
}
|
|
12309
|
-
}
|
|
12310
|
-
function setVarsOnNode(el, vars) {
|
|
12311
|
-
if (el.nodeType === 1) {
|
|
12312
|
-
const style = el.style;
|
|
12313
|
-
for (const key in vars) {
|
|
12314
|
-
style.setProperty(`--${key}`, vars[key]);
|
|
12315
|
-
}
|
|
12316
|
-
}
|
|
12317
|
-
}
|
|
12318
|
-
|
|
12319
12335
|
const positionMap = /* @__PURE__ */ new WeakMap();
|
|
12320
12336
|
const newPositionMap = /* @__PURE__ */ new WeakMap();
|
|
12321
12337
|
const moveCbKey = Symbol("_moveCb");
|
|
@@ -179,7 +179,7 @@ var Vue = (function () {
|
|
|
179
179
|
|
|
180
180
|
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";
|
|
181
181
|
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";
|
|
182
|
-
const MATH_TAGS = "
|
|
182
|
+
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";
|
|
183
183
|
const isHTMLTag = /* @__PURE__ */ makeMap(HTML_TAGS);
|
|
184
184
|
const isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS);
|
|
185
185
|
const isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS);
|
|
@@ -3092,6 +3092,8 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
3092
3092
|
return false;
|
|
3093
3093
|
}
|
|
3094
3094
|
function updateHOCHostEl({ vnode, parent }, el) {
|
|
3095
|
+
if (!el)
|
|
3096
|
+
return;
|
|
3095
3097
|
while (parent) {
|
|
3096
3098
|
const root = parent.subTree;
|
|
3097
3099
|
if (root.suspense && root.suspense.activeBranch === vnode) {
|
|
@@ -5816,24 +5818,30 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
5816
5818
|
warn(`useModel() called with prop "${name}" which is not declared.`);
|
|
5817
5819
|
return ref();
|
|
5818
5820
|
}
|
|
5819
|
-
|
|
5820
|
-
|
|
5821
|
-
|
|
5822
|
-
|
|
5823
|
-
|
|
5824
|
-
|
|
5825
|
-
track();
|
|
5826
|
-
return localValue;
|
|
5827
|
-
},
|
|
5828
|
-
set(value) {
|
|
5829
|
-
const rawProps = i.vnode.props;
|
|
5830
|
-
if (!(rawProps && name in rawProps) && hasChanged(value, localValue)) {
|
|
5831
|
-
localValue = value;
|
|
5821
|
+
return customRef((track, trigger) => {
|
|
5822
|
+
let localValue;
|
|
5823
|
+
watchSyncEffect(() => {
|
|
5824
|
+
const propValue = props[name];
|
|
5825
|
+
if (hasChanged(localValue, propValue)) {
|
|
5826
|
+
localValue = propValue;
|
|
5832
5827
|
trigger();
|
|
5833
5828
|
}
|
|
5834
|
-
|
|
5835
|
-
|
|
5836
|
-
|
|
5829
|
+
});
|
|
5830
|
+
return {
|
|
5831
|
+
get() {
|
|
5832
|
+
track();
|
|
5833
|
+
return localValue;
|
|
5834
|
+
},
|
|
5835
|
+
set(value) {
|
|
5836
|
+
const rawProps = i.vnode.props;
|
|
5837
|
+
if (!(rawProps && name in rawProps) && hasChanged(value, localValue)) {
|
|
5838
|
+
localValue = value;
|
|
5839
|
+
trigger();
|
|
5840
|
+
}
|
|
5841
|
+
i.emit(`update:${name}`, value);
|
|
5842
|
+
}
|
|
5843
|
+
};
|
|
5844
|
+
});
|
|
5837
5845
|
}
|
|
5838
5846
|
function getContext() {
|
|
5839
5847
|
const i = getCurrentInstance();
|
|
@@ -6407,7 +6415,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
6407
6415
|
return vm;
|
|
6408
6416
|
}
|
|
6409
6417
|
}
|
|
6410
|
-
Vue.version = `2.6.14-compat:${"3.4.0-beta.
|
|
6418
|
+
Vue.version = `2.6.14-compat:${"3.4.0-beta.3"}`;
|
|
6411
6419
|
Vue.config = singletonApp.config;
|
|
6412
6420
|
Vue.use = (p, ...options) => {
|
|
6413
6421
|
if (p && isFunction(p.install)) {
|
|
@@ -11105,7 +11113,7 @@ Component that was made reactive: `,
|
|
|
11105
11113
|
return true;
|
|
11106
11114
|
}
|
|
11107
11115
|
|
|
11108
|
-
const version = "3.4.0-beta.
|
|
11116
|
+
const version = "3.4.0-beta.3";
|
|
11109
11117
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
11110
11118
|
const ssrUtils = null;
|
|
11111
11119
|
const resolveFilter = resolveFilter$1 ;
|
|
@@ -11547,6 +11555,69 @@ Component that was made reactive: `,
|
|
|
11547
11555
|
el.style.display = value ? el[vShowOldKey] : "none";
|
|
11548
11556
|
}
|
|
11549
11557
|
|
|
11558
|
+
const CSS_VAR_TEXT = Symbol("CSS_VAR_TEXT" );
|
|
11559
|
+
function useCssVars(getter) {
|
|
11560
|
+
const instance = getCurrentInstance();
|
|
11561
|
+
if (!instance) {
|
|
11562
|
+
warn(`useCssVars is called without current active component instance.`);
|
|
11563
|
+
return;
|
|
11564
|
+
}
|
|
11565
|
+
const updateTeleports = instance.ut = (vars = getter(instance.proxy)) => {
|
|
11566
|
+
Array.from(
|
|
11567
|
+
document.querySelectorAll(`[data-v-owner="${instance.uid}"]`)
|
|
11568
|
+
).forEach((node) => setVarsOnNode(node, vars));
|
|
11569
|
+
};
|
|
11570
|
+
const setVars = () => {
|
|
11571
|
+
const vars = getter(instance.proxy);
|
|
11572
|
+
setVarsOnVNode(instance.subTree, vars);
|
|
11573
|
+
updateTeleports(vars);
|
|
11574
|
+
};
|
|
11575
|
+
watchPostEffect(setVars);
|
|
11576
|
+
onMounted(() => {
|
|
11577
|
+
const ob = new MutationObserver(setVars);
|
|
11578
|
+
ob.observe(instance.subTree.el.parentNode, { childList: true });
|
|
11579
|
+
onUnmounted(() => ob.disconnect());
|
|
11580
|
+
});
|
|
11581
|
+
}
|
|
11582
|
+
function setVarsOnVNode(vnode, vars) {
|
|
11583
|
+
if (vnode.shapeFlag & 128) {
|
|
11584
|
+
const suspense = vnode.suspense;
|
|
11585
|
+
vnode = suspense.activeBranch;
|
|
11586
|
+
if (suspense.pendingBranch && !suspense.isHydrating) {
|
|
11587
|
+
suspense.effects.push(() => {
|
|
11588
|
+
setVarsOnVNode(suspense.activeBranch, vars);
|
|
11589
|
+
});
|
|
11590
|
+
}
|
|
11591
|
+
}
|
|
11592
|
+
while (vnode.component) {
|
|
11593
|
+
vnode = vnode.component.subTree;
|
|
11594
|
+
}
|
|
11595
|
+
if (vnode.shapeFlag & 1 && vnode.el) {
|
|
11596
|
+
setVarsOnNode(vnode.el, vars);
|
|
11597
|
+
} else if (vnode.type === Fragment) {
|
|
11598
|
+
vnode.children.forEach((c) => setVarsOnVNode(c, vars));
|
|
11599
|
+
} else if (vnode.type === Static) {
|
|
11600
|
+
let { el, anchor } = vnode;
|
|
11601
|
+
while (el) {
|
|
11602
|
+
setVarsOnNode(el, vars);
|
|
11603
|
+
if (el === anchor)
|
|
11604
|
+
break;
|
|
11605
|
+
el = el.nextSibling;
|
|
11606
|
+
}
|
|
11607
|
+
}
|
|
11608
|
+
}
|
|
11609
|
+
function setVarsOnNode(el, vars) {
|
|
11610
|
+
if (el.nodeType === 1) {
|
|
11611
|
+
const style = el.style;
|
|
11612
|
+
let cssText = "";
|
|
11613
|
+
for (const key in vars) {
|
|
11614
|
+
style.setProperty(`--${key}`, vars[key]);
|
|
11615
|
+
cssText += `--${key}: ${vars[key]};`;
|
|
11616
|
+
}
|
|
11617
|
+
style[CSS_VAR_TEXT] = cssText;
|
|
11618
|
+
}
|
|
11619
|
+
}
|
|
11620
|
+
|
|
11550
11621
|
function patchStyle(el, prev, next) {
|
|
11551
11622
|
const style = el.style;
|
|
11552
11623
|
const isCssString = isString(next);
|
|
@@ -11565,6 +11636,10 @@ Component that was made reactive: `,
|
|
|
11565
11636
|
const currentDisplay = style.display;
|
|
11566
11637
|
if (isCssString) {
|
|
11567
11638
|
if (prev !== next) {
|
|
11639
|
+
const cssVarText = style[CSS_VAR_TEXT];
|
|
11640
|
+
if (cssVarText) {
|
|
11641
|
+
next += ";" + cssVarText;
|
|
11642
|
+
}
|
|
11568
11643
|
style.cssText = next;
|
|
11569
11644
|
}
|
|
11570
11645
|
} else if (prev) {
|
|
@@ -12103,65 +12178,6 @@ Component that was made reactive: `,
|
|
|
12103
12178
|
}
|
|
12104
12179
|
}
|
|
12105
12180
|
|
|
12106
|
-
function useCssVars(getter) {
|
|
12107
|
-
const instance = getCurrentInstance();
|
|
12108
|
-
if (!instance) {
|
|
12109
|
-
warn(`useCssVars is called without current active component instance.`);
|
|
12110
|
-
return;
|
|
12111
|
-
}
|
|
12112
|
-
const updateTeleports = instance.ut = (vars = getter(instance.proxy)) => {
|
|
12113
|
-
Array.from(
|
|
12114
|
-
document.querySelectorAll(`[data-v-owner="${instance.uid}"]`)
|
|
12115
|
-
).forEach((node) => setVarsOnNode(node, vars));
|
|
12116
|
-
};
|
|
12117
|
-
const setVars = () => {
|
|
12118
|
-
const vars = getter(instance.proxy);
|
|
12119
|
-
setVarsOnVNode(instance.subTree, vars);
|
|
12120
|
-
updateTeleports(vars);
|
|
12121
|
-
};
|
|
12122
|
-
watchPostEffect(setVars);
|
|
12123
|
-
onMounted(() => {
|
|
12124
|
-
const ob = new MutationObserver(setVars);
|
|
12125
|
-
ob.observe(instance.subTree.el.parentNode, { childList: true });
|
|
12126
|
-
onUnmounted(() => ob.disconnect());
|
|
12127
|
-
});
|
|
12128
|
-
}
|
|
12129
|
-
function setVarsOnVNode(vnode, vars) {
|
|
12130
|
-
if (vnode.shapeFlag & 128) {
|
|
12131
|
-
const suspense = vnode.suspense;
|
|
12132
|
-
vnode = suspense.activeBranch;
|
|
12133
|
-
if (suspense.pendingBranch && !suspense.isHydrating) {
|
|
12134
|
-
suspense.effects.push(() => {
|
|
12135
|
-
setVarsOnVNode(suspense.activeBranch, vars);
|
|
12136
|
-
});
|
|
12137
|
-
}
|
|
12138
|
-
}
|
|
12139
|
-
while (vnode.component) {
|
|
12140
|
-
vnode = vnode.component.subTree;
|
|
12141
|
-
}
|
|
12142
|
-
if (vnode.shapeFlag & 1 && vnode.el) {
|
|
12143
|
-
setVarsOnNode(vnode.el, vars);
|
|
12144
|
-
} else if (vnode.type === Fragment) {
|
|
12145
|
-
vnode.children.forEach((c) => setVarsOnVNode(c, vars));
|
|
12146
|
-
} else if (vnode.type === Static) {
|
|
12147
|
-
let { el, anchor } = vnode;
|
|
12148
|
-
while (el) {
|
|
12149
|
-
setVarsOnNode(el, vars);
|
|
12150
|
-
if (el === anchor)
|
|
12151
|
-
break;
|
|
12152
|
-
el = el.nextSibling;
|
|
12153
|
-
}
|
|
12154
|
-
}
|
|
12155
|
-
}
|
|
12156
|
-
function setVarsOnNode(el, vars) {
|
|
12157
|
-
if (el.nodeType === 1) {
|
|
12158
|
-
const style = el.style;
|
|
12159
|
-
for (const key in vars) {
|
|
12160
|
-
style.setProperty(`--${key}`, vars[key]);
|
|
12161
|
-
}
|
|
12162
|
-
}
|
|
12163
|
-
}
|
|
12164
|
-
|
|
12165
12181
|
const positionMap = /* @__PURE__ */ new WeakMap();
|
|
12166
12182
|
const newPositionMap = /* @__PURE__ */ new WeakMap();
|
|
12167
12183
|
const moveCbKey = Symbol("_moveCb");
|