@vue/compat 3.4.0-beta.2 → 3.4.0-beta.4
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 +73 -40
- package/dist/vue.cjs.prod.js +68 -37
- package/dist/vue.esm-browser.js +106 -84
- package/dist/vue.esm-browser.prod.js +4 -4
- package/dist/vue.esm-bundler.js +106 -84
- package/dist/vue.global.js +106 -84
- package/dist/vue.global.prod.js +4 -4
- package/dist/vue.runtime.esm-browser.js +105 -83
- package/dist/vue.runtime.esm-browser.prod.js +4 -4
- package/dist/vue.runtime.esm-bundler.js +105 -83
- package/dist/vue.runtime.global.js +105 -83
- package/dist/vue.runtime.global.prod.js +4 -4
- package/package.json +2 -2
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 = "
|
|
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);
|
|
@@ -2009,8 +2009,10 @@ function checkRecursiveUpdates(seen, fn) {
|
|
|
2009
2009
|
if (count > RECURSION_LIMIT) {
|
|
2010
2010
|
const instance = fn.ownerInstance;
|
|
2011
2011
|
const componentName = instance && getComponentName(instance.type);
|
|
2012
|
-
|
|
2013
|
-
`Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function
|
|
2012
|
+
handleError(
|
|
2013
|
+
`Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`,
|
|
2014
|
+
null,
|
|
2015
|
+
10
|
|
2014
2016
|
);
|
|
2015
2017
|
return true;
|
|
2016
2018
|
} else {
|
|
@@ -3205,6 +3207,8 @@ function hasPropsChanged(prevProps, nextProps, emitsOptions) {
|
|
|
3205
3207
|
return false;
|
|
3206
3208
|
}
|
|
3207
3209
|
function updateHOCHostEl({ vnode, parent }, el) {
|
|
3210
|
+
if (!el)
|
|
3211
|
+
return;
|
|
3208
3212
|
while (parent) {
|
|
3209
3213
|
const root = parent.subTree;
|
|
3210
3214
|
if (root.suspense && root.suspense.activeBranch === vnode) {
|
|
@@ -5956,24 +5960,30 @@ function useModel(props, name) {
|
|
|
5956
5960
|
warn(`useModel() called with prop "${name}" which is not declared.`);
|
|
5957
5961
|
return ref();
|
|
5958
5962
|
}
|
|
5959
|
-
|
|
5960
|
-
|
|
5961
|
-
|
|
5962
|
-
|
|
5963
|
-
|
|
5964
|
-
|
|
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;
|
|
5963
|
+
return customRef((track, trigger) => {
|
|
5964
|
+
let localValue;
|
|
5965
|
+
watchSyncEffect(() => {
|
|
5966
|
+
const propValue = props[name];
|
|
5967
|
+
if (hasChanged(localValue, propValue)) {
|
|
5968
|
+
localValue = propValue;
|
|
5972
5969
|
trigger();
|
|
5973
5970
|
}
|
|
5974
|
-
|
|
5975
|
-
|
|
5976
|
-
|
|
5971
|
+
});
|
|
5972
|
+
return {
|
|
5973
|
+
get() {
|
|
5974
|
+
track();
|
|
5975
|
+
return localValue;
|
|
5976
|
+
},
|
|
5977
|
+
set(value) {
|
|
5978
|
+
const rawProps = i.vnode.props;
|
|
5979
|
+
if (!(rawProps && name in rawProps) && hasChanged(value, localValue)) {
|
|
5980
|
+
localValue = value;
|
|
5981
|
+
trigger();
|
|
5982
|
+
}
|
|
5983
|
+
i.emit(`update:${name}`, value);
|
|
5984
|
+
}
|
|
5985
|
+
};
|
|
5986
|
+
});
|
|
5977
5987
|
}
|
|
5978
5988
|
function getContext() {
|
|
5979
5989
|
const i = getCurrentInstance();
|
|
@@ -6547,7 +6557,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
6547
6557
|
return vm;
|
|
6548
6558
|
}
|
|
6549
6559
|
}
|
|
6550
|
-
Vue.version = `2.6.14-compat:${"3.4.0-beta.
|
|
6560
|
+
Vue.version = `2.6.14-compat:${"3.4.0-beta.4"}`;
|
|
6551
6561
|
Vue.config = singletonApp.config;
|
|
6552
6562
|
Vue.use = (p, ...options) => {
|
|
6553
6563
|
if (p && isFunction(p.install)) {
|
|
@@ -8275,7 +8285,7 @@ function propHasMismatch(el, key, clientValue) {
|
|
|
8275
8285
|
let actual;
|
|
8276
8286
|
let expected;
|
|
8277
8287
|
if (key === "class") {
|
|
8278
|
-
actual = el.
|
|
8288
|
+
actual = el.getAttribute("class");
|
|
8279
8289
|
expected = normalizeClass(clientValue);
|
|
8280
8290
|
if (actual !== expected) {
|
|
8281
8291
|
mismatchType = mismatchKey = `class`;
|
|
@@ -11268,7 +11278,7 @@ function isMemoSame(cached, memo) {
|
|
|
11268
11278
|
return true;
|
|
11269
11279
|
}
|
|
11270
11280
|
|
|
11271
|
-
const version = "3.4.0-beta.
|
|
11281
|
+
const version = "3.4.0-beta.4";
|
|
11272
11282
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
11273
11283
|
const _ssrUtils = {
|
|
11274
11284
|
createComponentInstance,
|
|
@@ -11725,6 +11735,11 @@ function initVShowForSSR() {
|
|
|
11725
11735
|
};
|
|
11726
11736
|
}
|
|
11727
11737
|
|
|
11738
|
+
const CSS_VAR_TEXT = Symbol("CSS_VAR_TEXT" );
|
|
11739
|
+
function useCssVars(getter) {
|
|
11740
|
+
return;
|
|
11741
|
+
}
|
|
11742
|
+
|
|
11728
11743
|
function patchStyle(el, prev, next) {
|
|
11729
11744
|
const style = el.style;
|
|
11730
11745
|
const isCssString = isString(next);
|
|
@@ -11743,6 +11758,10 @@ function patchStyle(el, prev, next) {
|
|
|
11743
11758
|
const currentDisplay = style.display;
|
|
11744
11759
|
if (isCssString) {
|
|
11745
11760
|
if (prev !== next) {
|
|
11761
|
+
const cssVarText = style[CSS_VAR_TEXT];
|
|
11762
|
+
if (cssVarText) {
|
|
11763
|
+
next += ";" + cssVarText;
|
|
11764
|
+
}
|
|
11746
11765
|
style.cssText = next;
|
|
11747
11766
|
}
|
|
11748
11767
|
} else if (prev) {
|
|
@@ -12293,10 +12312,6 @@ function useCssModule(name = "$style") {
|
|
|
12293
12312
|
}
|
|
12294
12313
|
}
|
|
12295
12314
|
|
|
12296
|
-
function useCssVars(getter) {
|
|
12297
|
-
return;
|
|
12298
|
-
}
|
|
12299
|
-
|
|
12300
12315
|
const positionMap = /* @__PURE__ */ new WeakMap();
|
|
12301
12316
|
const newPositionMap = /* @__PURE__ */ new WeakMap();
|
|
12302
12317
|
const moveCbKey = Symbol("_moveCb");
|
|
@@ -12713,7 +12728,9 @@ const modifierGuards = {
|
|
|
12713
12728
|
exact: (e, modifiers) => systemModifiers.some((m) => e[`${m}Key`] && !modifiers.includes(m))
|
|
12714
12729
|
};
|
|
12715
12730
|
const withModifiers = (fn, modifiers) => {
|
|
12716
|
-
|
|
12731
|
+
const cache = fn._withMods || (fn._withMods = {});
|
|
12732
|
+
const cacheKey = modifiers.join(".");
|
|
12733
|
+
return cache[cacheKey] || (cache[cacheKey] = (event, ...args) => {
|
|
12717
12734
|
for (let i = 0; i < modifiers.length; i++) {
|
|
12718
12735
|
const guard = modifierGuards[modifiers[i]];
|
|
12719
12736
|
if (guard && guard(event, modifiers))
|
|
@@ -12748,7 +12765,9 @@ const withKeys = (fn, modifiers) => {
|
|
|
12748
12765
|
);
|
|
12749
12766
|
}
|
|
12750
12767
|
}
|
|
12751
|
-
|
|
12768
|
+
const cache = fn._withKeys || (fn._withKeys = {});
|
|
12769
|
+
const cacheKey = modifiers.join(".");
|
|
12770
|
+
return cache[cacheKey] || (cache[cacheKey] = (event) => {
|
|
12752
12771
|
if (!("key" in event)) {
|
|
12753
12772
|
return;
|
|
12754
12773
|
}
|
|
@@ -14330,7 +14349,7 @@ const errorMessages = {
|
|
|
14330
14349
|
Use a v-bind binding combined with a v-on listener that emits update:x event instead.`,
|
|
14331
14350
|
[45]: `Error parsing JavaScript expression: `,
|
|
14332
14351
|
[46]: `<KeepAlive> expects exactly one child component.`,
|
|
14333
|
-
[51]: `@vnode-* hooks in templates are
|
|
14352
|
+
[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
14353
|
// generic errors
|
|
14335
14354
|
[47]: `"prefixIdentifiers" option is not supported in this build of compiler.`,
|
|
14336
14355
|
[48]: `ES module mode is not supported in this build of compiler.`,
|
|
@@ -14357,12 +14376,23 @@ function walkIdentifiers(root, onIdentifier, includeAll = false, parentStack = [
|
|
|
14357
14376
|
} else if (node.type === "ObjectProperty" && parent.type === "ObjectPattern") {
|
|
14358
14377
|
node.inPattern = true;
|
|
14359
14378
|
} else if (isFunctionType(node)) {
|
|
14360
|
-
|
|
14379
|
+
if (node.scopeIds) {
|
|
14380
|
+
node.scopeIds.forEach((id) => markKnownIds(id, knownIds));
|
|
14381
|
+
} else {
|
|
14382
|
+
walkFunctionParams(
|
|
14383
|
+
node,
|
|
14384
|
+
(id) => markScopeIdentifier(node, id, knownIds)
|
|
14385
|
+
);
|
|
14386
|
+
}
|
|
14361
14387
|
} else if (node.type === "BlockStatement") {
|
|
14362
|
-
|
|
14363
|
-
node,
|
|
14364
|
-
|
|
14365
|
-
|
|
14388
|
+
if (node.scopeIds) {
|
|
14389
|
+
node.scopeIds.forEach((id) => markKnownIds(id, knownIds));
|
|
14390
|
+
} else {
|
|
14391
|
+
walkBlockDeclarations(
|
|
14392
|
+
node,
|
|
14393
|
+
(id) => markScopeIdentifier(node, id, knownIds)
|
|
14394
|
+
);
|
|
14395
|
+
}
|
|
14366
14396
|
}
|
|
14367
14397
|
},
|
|
14368
14398
|
leave(node, parent) {
|
|
@@ -14481,16 +14511,19 @@ function extractIdentifiers(param, nodes = []) {
|
|
|
14481
14511
|
}
|
|
14482
14512
|
return nodes;
|
|
14483
14513
|
}
|
|
14484
|
-
function
|
|
14485
|
-
const { name } = child;
|
|
14486
|
-
if (node.scopeIds && node.scopeIds.has(name)) {
|
|
14487
|
-
return;
|
|
14488
|
-
}
|
|
14514
|
+
function markKnownIds(name, knownIds) {
|
|
14489
14515
|
if (name in knownIds) {
|
|
14490
14516
|
knownIds[name]++;
|
|
14491
14517
|
} else {
|
|
14492
14518
|
knownIds[name] = 1;
|
|
14493
14519
|
}
|
|
14520
|
+
}
|
|
14521
|
+
function markScopeIdentifier(node, child, knownIds) {
|
|
14522
|
+
const { name } = child;
|
|
14523
|
+
if (node.scopeIds && node.scopeIds.has(name)) {
|
|
14524
|
+
return;
|
|
14525
|
+
}
|
|
14526
|
+
markKnownIds(name, knownIds);
|
|
14494
14527
|
(node.scopeIds || (node.scopeIds = /* @__PURE__ */ new Set())).add(name);
|
|
14495
14528
|
}
|
|
14496
14529
|
const isFunctionType = (node) => {
|
|
@@ -14630,7 +14663,7 @@ const isMemberExpressionNode = (path, context) => {
|
|
|
14630
14663
|
plugins: context.expressionPlugins
|
|
14631
14664
|
});
|
|
14632
14665
|
ret = unwrapTSNode(ret);
|
|
14633
|
-
return ret.type === "MemberExpression" || ret.type === "OptionalMemberExpression" || ret.type === "Identifier";
|
|
14666
|
+
return ret.type === "MemberExpression" || ret.type === "OptionalMemberExpression" || ret.type === "Identifier" && ret.name !== "undefined";
|
|
14634
14667
|
} catch (e) {
|
|
14635
14668
|
return false;
|
|
14636
14669
|
}
|
package/dist/vue.cjs.prod.js
CHANGED
|
@@ -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 = "
|
|
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
|
-
|
|
4772
|
-
|
|
4773
|
-
|
|
4774
|
-
|
|
4775
|
-
|
|
4776
|
-
|
|
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
|
-
|
|
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.
|
|
5257
|
+
Vue.version = `2.6.14-compat:${"3.4.0-beta.4"}`;
|
|
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.
|
|
9066
|
+
const version = "3.4.0-beta.4";
|
|
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");
|
|
@@ -10451,7 +10464,9 @@ const modifierGuards = {
|
|
|
10451
10464
|
exact: (e, modifiers) => systemModifiers.some((m) => e[`${m}Key`] && !modifiers.includes(m))
|
|
10452
10465
|
};
|
|
10453
10466
|
const withModifiers = (fn, modifiers) => {
|
|
10454
|
-
|
|
10467
|
+
const cache = fn._withMods || (fn._withMods = {});
|
|
10468
|
+
const cacheKey = modifiers.join(".");
|
|
10469
|
+
return cache[cacheKey] || (cache[cacheKey] = (event, ...args) => {
|
|
10455
10470
|
for (let i = 0; i < modifiers.length; i++) {
|
|
10456
10471
|
const guard = modifierGuards[modifiers[i]];
|
|
10457
10472
|
if (guard && guard(event, modifiers))
|
|
@@ -10480,7 +10495,9 @@ const withKeys = (fn, modifiers) => {
|
|
|
10480
10495
|
}
|
|
10481
10496
|
}
|
|
10482
10497
|
}
|
|
10483
|
-
|
|
10498
|
+
const cache = fn._withKeys || (fn._withKeys = {});
|
|
10499
|
+
const cacheKey = modifiers.join(".");
|
|
10500
|
+
return cache[cacheKey] || (cache[cacheKey] = (event) => {
|
|
10484
10501
|
if (!("key" in event)) {
|
|
10485
10502
|
return;
|
|
10486
10503
|
}
|
|
@@ -11946,7 +11963,7 @@ const errorMessages = {
|
|
|
11946
11963
|
Use a v-bind binding combined with a v-on listener that emits update:x event instead.`,
|
|
11947
11964
|
[45]: `Error parsing JavaScript expression: `,
|
|
11948
11965
|
[46]: `<KeepAlive> expects exactly one child component.`,
|
|
11949
|
-
[51]: `@vnode-* hooks in templates are
|
|
11966
|
+
[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
11967
|
// generic errors
|
|
11951
11968
|
[47]: `"prefixIdentifiers" option is not supported in this build of compiler.`,
|
|
11952
11969
|
[48]: `ES module mode is not supported in this build of compiler.`,
|
|
@@ -11973,12 +11990,23 @@ function walkIdentifiers(root, onIdentifier, includeAll = false, parentStack = [
|
|
|
11973
11990
|
} else if (node.type === "ObjectProperty" && parent.type === "ObjectPattern") {
|
|
11974
11991
|
node.inPattern = true;
|
|
11975
11992
|
} else if (isFunctionType(node)) {
|
|
11976
|
-
|
|
11993
|
+
if (node.scopeIds) {
|
|
11994
|
+
node.scopeIds.forEach((id) => markKnownIds(id, knownIds));
|
|
11995
|
+
} else {
|
|
11996
|
+
walkFunctionParams(
|
|
11997
|
+
node,
|
|
11998
|
+
(id) => markScopeIdentifier(node, id, knownIds)
|
|
11999
|
+
);
|
|
12000
|
+
}
|
|
11977
12001
|
} else if (node.type === "BlockStatement") {
|
|
11978
|
-
|
|
11979
|
-
node,
|
|
11980
|
-
|
|
11981
|
-
|
|
12002
|
+
if (node.scopeIds) {
|
|
12003
|
+
node.scopeIds.forEach((id) => markKnownIds(id, knownIds));
|
|
12004
|
+
} else {
|
|
12005
|
+
walkBlockDeclarations(
|
|
12006
|
+
node,
|
|
12007
|
+
(id) => markScopeIdentifier(node, id, knownIds)
|
|
12008
|
+
);
|
|
12009
|
+
}
|
|
11982
12010
|
}
|
|
11983
12011
|
},
|
|
11984
12012
|
leave(node, parent) {
|
|
@@ -12097,16 +12125,19 @@ function extractIdentifiers(param, nodes = []) {
|
|
|
12097
12125
|
}
|
|
12098
12126
|
return nodes;
|
|
12099
12127
|
}
|
|
12100
|
-
function
|
|
12101
|
-
const { name } = child;
|
|
12102
|
-
if (node.scopeIds && node.scopeIds.has(name)) {
|
|
12103
|
-
return;
|
|
12104
|
-
}
|
|
12128
|
+
function markKnownIds(name, knownIds) {
|
|
12105
12129
|
if (name in knownIds) {
|
|
12106
12130
|
knownIds[name]++;
|
|
12107
12131
|
} else {
|
|
12108
12132
|
knownIds[name] = 1;
|
|
12109
12133
|
}
|
|
12134
|
+
}
|
|
12135
|
+
function markScopeIdentifier(node, child, knownIds) {
|
|
12136
|
+
const { name } = child;
|
|
12137
|
+
if (node.scopeIds && node.scopeIds.has(name)) {
|
|
12138
|
+
return;
|
|
12139
|
+
}
|
|
12140
|
+
markKnownIds(name, knownIds);
|
|
12110
12141
|
(node.scopeIds || (node.scopeIds = /* @__PURE__ */ new Set())).add(name);
|
|
12111
12142
|
}
|
|
12112
12143
|
const isFunctionType = (node) => {
|
|
@@ -12246,7 +12277,7 @@ const isMemberExpressionNode = (path, context) => {
|
|
|
12246
12277
|
plugins: context.expressionPlugins
|
|
12247
12278
|
});
|
|
12248
12279
|
ret = unwrapTSNode(ret);
|
|
12249
|
-
return ret.type === "MemberExpression" || ret.type === "OptionalMemberExpression" || ret.type === "Identifier";
|
|
12280
|
+
return ret.type === "MemberExpression" || ret.type === "OptionalMemberExpression" || ret.type === "Identifier" && ret.name !== "undefined";
|
|
12250
12281
|
} catch (e) {
|
|
12251
12282
|
return false;
|
|
12252
12283
|
}
|