@vue/compat 3.4.0-alpha.4 → 3.4.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/vue.cjs.js +722 -553
- package/dist/vue.cjs.prod.js +661 -540
- package/dist/vue.esm-browser.js +447 -265
- package/dist/vue.esm-browser.prod.js +5 -5
- package/dist/vue.esm-bundler.js +485 -284
- package/dist/vue.global.js +447 -265
- package/dist/vue.global.prod.js +5 -5
- package/dist/vue.runtime.esm-browser.js +429 -245
- package/dist/vue.runtime.esm-browser.prod.js +5 -5
- package/dist/vue.runtime.esm-bundler.js +467 -264
- package/dist/vue.runtime.global.js +429 -245
- package/dist/vue.runtime.global.prod.js +5 -5
- package/package.json +2 -2
|
@@ -127,6 +127,20 @@ function parseStringStyle(cssText) {
|
|
|
127
127
|
});
|
|
128
128
|
return ret;
|
|
129
129
|
}
|
|
130
|
+
function stringifyStyle(styles) {
|
|
131
|
+
let ret = "";
|
|
132
|
+
if (!styles || isString(styles)) {
|
|
133
|
+
return ret;
|
|
134
|
+
}
|
|
135
|
+
for (const key in styles) {
|
|
136
|
+
const value = styles[key];
|
|
137
|
+
const normalizedKey = key.startsWith(`--`) ? key : hyphenate(key);
|
|
138
|
+
if (isString(value) || typeof value === "number") {
|
|
139
|
+
ret += `${normalizedKey}:${value};`;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
return ret;
|
|
143
|
+
}
|
|
130
144
|
function normalizeClass(value) {
|
|
131
145
|
let res = "";
|
|
132
146
|
if (isString(value)) {
|
|
@@ -162,14 +176,25 @@ function normalizeProps(props) {
|
|
|
162
176
|
|
|
163
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";
|
|
164
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 = "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";
|
|
165
180
|
const isHTMLTag = /* @__PURE__ */ makeMap(HTML_TAGS);
|
|
166
181
|
const isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS);
|
|
182
|
+
const isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS);
|
|
167
183
|
|
|
168
184
|
const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;
|
|
169
185
|
const isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs);
|
|
186
|
+
const isBooleanAttr = /* @__PURE__ */ makeMap(
|
|
187
|
+
specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected`
|
|
188
|
+
);
|
|
170
189
|
function includeBooleanAttr(value) {
|
|
171
190
|
return !!value || value === "";
|
|
172
191
|
}
|
|
192
|
+
const isKnownHtmlAttr = /* @__PURE__ */ makeMap(
|
|
193
|
+
`accept,accept-charset,accesskey,action,align,allow,alt,async,autocapitalize,autocomplete,autofocus,autoplay,background,bgcolor,border,buffered,capture,challenge,charset,checked,cite,class,code,codebase,color,cols,colspan,content,contenteditable,contextmenu,controls,coords,crossorigin,csp,data,datetime,decoding,default,defer,dir,dirname,disabled,download,draggable,dropzone,enctype,enterkeyhint,for,form,formaction,formenctype,formmethod,formnovalidate,formtarget,headers,height,hidden,high,href,hreflang,http-equiv,icon,id,importance,inert,integrity,ismap,itemprop,keytype,kind,label,lang,language,loading,list,loop,low,manifest,max,maxlength,minlength,media,min,multiple,muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,preload,radiogroup,readonly,referrerpolicy,rel,required,reversed,rows,rowspan,sandbox,scope,scoped,selected,shape,size,sizes,slot,span,spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,target,title,translate,type,usemap,value,width,wrap`
|
|
194
|
+
);
|
|
195
|
+
const isKnownSvgAttr = /* @__PURE__ */ makeMap(
|
|
196
|
+
`xmlns,accent-height,accumulate,additive,alignment-baseline,alphabetic,amplitude,arabic-form,ascent,attributeName,attributeType,azimuth,baseFrequency,baseline-shift,baseProfile,bbox,begin,bias,by,calcMode,cap-height,class,clip,clipPathUnits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,contentScriptType,contentStyleType,crossorigin,cursor,cx,cy,d,decelerate,descent,diffuseConstant,direction,display,divisor,dominant-baseline,dur,dx,dy,edgeMode,elevation,enable-background,end,exponent,fill,fill-opacity,fill-rule,filter,filterRes,filterUnits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,format,from,fr,fx,fy,g1,g2,glyph-name,glyph-orientation-horizontal,glyph-orientation-vertical,glyphRef,gradientTransform,gradientUnits,hanging,height,href,hreflang,horiz-adv-x,horiz-origin-x,id,ideographic,image-rendering,in,in2,intercept,k,k1,k2,k3,k4,kernelMatrix,kernelUnitLength,kerning,keyPoints,keySplines,keyTimes,lang,lengthAdjust,letter-spacing,lighting-color,limitingConeAngle,local,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mask,maskContentUnits,maskUnits,mathematical,max,media,method,min,mode,name,numOctaves,offset,opacity,operator,order,orient,orientation,origin,overflow,overline-position,overline-thickness,panose-1,paint-order,path,pathLength,patternContentUnits,patternTransform,patternUnits,ping,pointer-events,points,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,preserveAspectRatio,primitiveUnits,r,radius,referrerPolicy,refX,refY,rel,rendering-intent,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,result,rotate,rx,ry,scale,seed,shape-rendering,slope,spacing,specularConstant,specularExponent,speed,spreadMethod,startOffset,stdDeviation,stemh,stemv,stitchTiles,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,string,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,style,surfaceScale,systemLanguage,tabindex,tableValues,target,targetX,targetY,text-anchor,text-decoration,text-rendering,textLength,to,transform,transform-origin,type,u1,u2,underline-position,underline-thickness,unicode,unicode-bidi,unicode-range,units-per-em,v-alphabetic,v-hanging,v-ideographic,v-mathematical,values,vector-effect,version,vert-adv-y,vert-origin-x,vert-origin-y,viewBox,viewTarget,visibility,width,widths,word-spacing,writing-mode,x,x-height,x1,x2,xChannelSelector,xlink:actuate,xlink:arcrole,xlink:href,xlink:role,xlink:show,xlink:title,xlink:type,xmlns:xlink,xml:base,xml:lang,xml:space,y,y1,y2,yChannelSelector,z,zoomAndPan`
|
|
197
|
+
);
|
|
173
198
|
|
|
174
199
|
function looseCompareArrays(a, b) {
|
|
175
200
|
if (a.length !== b.length)
|
|
@@ -231,20 +256,29 @@ const replacer = (_key, val) => {
|
|
|
231
256
|
return replacer(_key, val.value);
|
|
232
257
|
} else if (isMap(val)) {
|
|
233
258
|
return {
|
|
234
|
-
[`Map(${val.size})`]: [...val.entries()].reduce(
|
|
235
|
-
entries[
|
|
236
|
-
|
|
237
|
-
|
|
259
|
+
[`Map(${val.size})`]: [...val.entries()].reduce(
|
|
260
|
+
(entries, [key, val2], i) => {
|
|
261
|
+
entries[stringifySymbol(key, i) + " =>"] = val2;
|
|
262
|
+
return entries;
|
|
263
|
+
},
|
|
264
|
+
{}
|
|
265
|
+
)
|
|
238
266
|
};
|
|
239
267
|
} else if (isSet(val)) {
|
|
240
268
|
return {
|
|
241
|
-
[`Set(${val.size})`]: [...val.values()]
|
|
269
|
+
[`Set(${val.size})`]: [...val.values()].map((v) => stringifySymbol(v))
|
|
242
270
|
};
|
|
271
|
+
} else if (isSymbol(val)) {
|
|
272
|
+
return stringifySymbol(val);
|
|
243
273
|
} else if (isObject(val) && !isArray(val) && !isPlainObject(val)) {
|
|
244
274
|
return String(val);
|
|
245
275
|
}
|
|
246
276
|
return val;
|
|
247
277
|
};
|
|
278
|
+
const stringifySymbol = (v, i = "") => {
|
|
279
|
+
var _a;
|
|
280
|
+
return isSymbol(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v;
|
|
281
|
+
};
|
|
248
282
|
|
|
249
283
|
function warn$1(msg, ...args) {
|
|
250
284
|
console.warn(`[Vue warn] ${msg}`, ...args);
|
|
@@ -693,8 +727,13 @@ class BaseReactiveHandler {
|
|
|
693
727
|
return isReadonly2;
|
|
694
728
|
} else if (key === "__v_isShallow") {
|
|
695
729
|
return shallow;
|
|
696
|
-
} else if (key === "__v_raw"
|
|
697
|
-
|
|
730
|
+
} else if (key === "__v_raw") {
|
|
731
|
+
if (receiver === (isReadonly2 ? shallow ? shallowReadonlyMap : readonlyMap : shallow ? shallowReactiveMap : reactiveMap).get(target) || // receiver is not the reactive proxy, but has the same prototype
|
|
732
|
+
// this means the reciever is a user proxy of the reactive proxy
|
|
733
|
+
Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) {
|
|
734
|
+
return target;
|
|
735
|
+
}
|
|
736
|
+
return;
|
|
698
737
|
}
|
|
699
738
|
const targetIsArray = isArray(target);
|
|
700
739
|
if (!isReadonly2) {
|
|
@@ -730,17 +769,19 @@ class MutableReactiveHandler extends BaseReactiveHandler {
|
|
|
730
769
|
}
|
|
731
770
|
set(target, key, value, receiver) {
|
|
732
771
|
let oldValue = target[key];
|
|
733
|
-
if (isReadonly(oldValue) && isRef(oldValue) && !isRef(value)) {
|
|
734
|
-
return false;
|
|
735
|
-
}
|
|
736
772
|
if (!this._shallow) {
|
|
773
|
+
const isOldValueReadonly = isReadonly(oldValue);
|
|
737
774
|
if (!isShallow(value) && !isReadonly(value)) {
|
|
738
775
|
oldValue = toRaw(oldValue);
|
|
739
776
|
value = toRaw(value);
|
|
740
777
|
}
|
|
741
778
|
if (!isArray(target) && isRef(oldValue) && !isRef(value)) {
|
|
742
|
-
|
|
743
|
-
|
|
779
|
+
if (isOldValueReadonly) {
|
|
780
|
+
return false;
|
|
781
|
+
} else {
|
|
782
|
+
oldValue.value = value;
|
|
783
|
+
return true;
|
|
784
|
+
}
|
|
744
785
|
}
|
|
745
786
|
}
|
|
746
787
|
const hadKey = isArray(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn(target, key);
|
|
@@ -1762,13 +1803,16 @@ function queuePostFlushCb(cb) {
|
|
|
1762
1803
|
}
|
|
1763
1804
|
queueFlush();
|
|
1764
1805
|
}
|
|
1765
|
-
function flushPreFlushCbs(seen, i = isFlushing ? flushIndex + 1 : 0) {
|
|
1806
|
+
function flushPreFlushCbs(instance, seen, i = isFlushing ? flushIndex + 1 : 0) {
|
|
1766
1807
|
{
|
|
1767
1808
|
seen = seen || /* @__PURE__ */ new Map();
|
|
1768
1809
|
}
|
|
1769
1810
|
for (; i < queue.length; i++) {
|
|
1770
1811
|
const cb = queue[i];
|
|
1771
1812
|
if (cb && cb.pre) {
|
|
1813
|
+
if (instance && cb.id !== instance.uid) {
|
|
1814
|
+
continue;
|
|
1815
|
+
}
|
|
1772
1816
|
if (checkRecursiveUpdates(seen, cb)) {
|
|
1773
1817
|
continue;
|
|
1774
1818
|
}
|
|
@@ -3045,9 +3089,17 @@ function hasPropsChanged(prevProps, nextProps, emitsOptions) {
|
|
|
3045
3089
|
return false;
|
|
3046
3090
|
}
|
|
3047
3091
|
function updateHOCHostEl({ vnode, parent }, el) {
|
|
3048
|
-
while (parent
|
|
3049
|
-
|
|
3050
|
-
|
|
3092
|
+
while (parent) {
|
|
3093
|
+
const root = parent.subTree;
|
|
3094
|
+
if (root.suspense && root.suspense.activeBranch === vnode) {
|
|
3095
|
+
root.el = vnode.el;
|
|
3096
|
+
}
|
|
3097
|
+
if (root === vnode) {
|
|
3098
|
+
(vnode = parent.vnode).el = el;
|
|
3099
|
+
parent = parent.parent;
|
|
3100
|
+
} else {
|
|
3101
|
+
break;
|
|
3102
|
+
}
|
|
3051
3103
|
}
|
|
3052
3104
|
}
|
|
3053
3105
|
|
|
@@ -3111,6 +3163,7 @@ function resolve(registry, name) {
|
|
|
3111
3163
|
}
|
|
3112
3164
|
|
|
3113
3165
|
const isSuspense = (type) => type.__isSuspense;
|
|
3166
|
+
let suspenseId = 0;
|
|
3114
3167
|
const SuspenseImpl = {
|
|
3115
3168
|
name: "Suspense",
|
|
3116
3169
|
// In order to make Suspense tree-shakable, we need to avoid importing it
|
|
@@ -3118,7 +3171,7 @@ const SuspenseImpl = {
|
|
|
3118
3171
|
// on a vnode's type and calls the `process` method, passing in renderer
|
|
3119
3172
|
// internals.
|
|
3120
3173
|
__isSuspense: true,
|
|
3121
|
-
process(n1, n2, container, anchor, parentComponent, parentSuspense,
|
|
3174
|
+
process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) {
|
|
3122
3175
|
if (n1 == null) {
|
|
3123
3176
|
mountSuspense(
|
|
3124
3177
|
n2,
|
|
@@ -3126,7 +3179,7 @@ const SuspenseImpl = {
|
|
|
3126
3179
|
anchor,
|
|
3127
3180
|
parentComponent,
|
|
3128
3181
|
parentSuspense,
|
|
3129
|
-
|
|
3182
|
+
namespace,
|
|
3130
3183
|
slotScopeIds,
|
|
3131
3184
|
optimized,
|
|
3132
3185
|
rendererInternals
|
|
@@ -3138,7 +3191,7 @@ const SuspenseImpl = {
|
|
|
3138
3191
|
container,
|
|
3139
3192
|
anchor,
|
|
3140
3193
|
parentComponent,
|
|
3141
|
-
|
|
3194
|
+
namespace,
|
|
3142
3195
|
slotScopeIds,
|
|
3143
3196
|
optimized,
|
|
3144
3197
|
rendererInternals
|
|
@@ -3156,7 +3209,7 @@ function triggerEvent(vnode, name) {
|
|
|
3156
3209
|
eventListener();
|
|
3157
3210
|
}
|
|
3158
3211
|
}
|
|
3159
|
-
function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense,
|
|
3212
|
+
function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) {
|
|
3160
3213
|
const {
|
|
3161
3214
|
p: patch,
|
|
3162
3215
|
o: { createElement }
|
|
@@ -3169,7 +3222,7 @@ function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense
|
|
|
3169
3222
|
container,
|
|
3170
3223
|
hiddenContainer,
|
|
3171
3224
|
anchor,
|
|
3172
|
-
|
|
3225
|
+
namespace,
|
|
3173
3226
|
slotScopeIds,
|
|
3174
3227
|
optimized,
|
|
3175
3228
|
rendererInternals
|
|
@@ -3181,7 +3234,7 @@ function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense
|
|
|
3181
3234
|
null,
|
|
3182
3235
|
parentComponent,
|
|
3183
3236
|
suspense,
|
|
3184
|
-
|
|
3237
|
+
namespace,
|
|
3185
3238
|
slotScopeIds
|
|
3186
3239
|
);
|
|
3187
3240
|
if (suspense.deps > 0) {
|
|
@@ -3195,7 +3248,7 @@ function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense
|
|
|
3195
3248
|
parentComponent,
|
|
3196
3249
|
null,
|
|
3197
3250
|
// fallback tree will not have suspense context
|
|
3198
|
-
|
|
3251
|
+
namespace,
|
|
3199
3252
|
slotScopeIds
|
|
3200
3253
|
);
|
|
3201
3254
|
setActiveBranch(suspense, vnode.ssFallback);
|
|
@@ -3203,7 +3256,7 @@ function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense
|
|
|
3203
3256
|
suspense.resolve(false, true);
|
|
3204
3257
|
}
|
|
3205
3258
|
}
|
|
3206
|
-
function patchSuspense(n1, n2, container, anchor, parentComponent,
|
|
3259
|
+
function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, slotScopeIds, optimized, { p: patch, um: unmount, o: { createElement } }) {
|
|
3207
3260
|
const suspense = n2.suspense = n1.suspense;
|
|
3208
3261
|
suspense.vnode = n2;
|
|
3209
3262
|
n2.el = n1.el;
|
|
@@ -3220,29 +3273,31 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, isSVG, slotSc
|
|
|
3220
3273
|
null,
|
|
3221
3274
|
parentComponent,
|
|
3222
3275
|
suspense,
|
|
3223
|
-
|
|
3276
|
+
namespace,
|
|
3224
3277
|
slotScopeIds,
|
|
3225
3278
|
optimized
|
|
3226
3279
|
);
|
|
3227
3280
|
if (suspense.deps <= 0) {
|
|
3228
3281
|
suspense.resolve();
|
|
3229
3282
|
} else if (isInFallback) {
|
|
3230
|
-
|
|
3231
|
-
|
|
3232
|
-
|
|
3233
|
-
|
|
3234
|
-
|
|
3235
|
-
|
|
3236
|
-
|
|
3237
|
-
|
|
3238
|
-
|
|
3239
|
-
|
|
3240
|
-
|
|
3241
|
-
|
|
3242
|
-
|
|
3283
|
+
if (!isHydrating) {
|
|
3284
|
+
patch(
|
|
3285
|
+
activeBranch,
|
|
3286
|
+
newFallback,
|
|
3287
|
+
container,
|
|
3288
|
+
anchor,
|
|
3289
|
+
parentComponent,
|
|
3290
|
+
null,
|
|
3291
|
+
// fallback tree will not have suspense context
|
|
3292
|
+
namespace,
|
|
3293
|
+
slotScopeIds,
|
|
3294
|
+
optimized
|
|
3295
|
+
);
|
|
3296
|
+
setActiveBranch(suspense, newFallback);
|
|
3297
|
+
}
|
|
3243
3298
|
}
|
|
3244
3299
|
} else {
|
|
3245
|
-
suspense.pendingId++;
|
|
3300
|
+
suspense.pendingId = suspenseId++;
|
|
3246
3301
|
if (isHydrating) {
|
|
3247
3302
|
suspense.isHydrating = false;
|
|
3248
3303
|
suspense.activeBranch = pendingBranch;
|
|
@@ -3260,7 +3315,7 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, isSVG, slotSc
|
|
|
3260
3315
|
null,
|
|
3261
3316
|
parentComponent,
|
|
3262
3317
|
suspense,
|
|
3263
|
-
|
|
3318
|
+
namespace,
|
|
3264
3319
|
slotScopeIds,
|
|
3265
3320
|
optimized
|
|
3266
3321
|
);
|
|
@@ -3275,7 +3330,7 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, isSVG, slotSc
|
|
|
3275
3330
|
parentComponent,
|
|
3276
3331
|
null,
|
|
3277
3332
|
// fallback tree will not have suspense context
|
|
3278
|
-
|
|
3333
|
+
namespace,
|
|
3279
3334
|
slotScopeIds,
|
|
3280
3335
|
optimized
|
|
3281
3336
|
);
|
|
@@ -3289,7 +3344,7 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, isSVG, slotSc
|
|
|
3289
3344
|
anchor,
|
|
3290
3345
|
parentComponent,
|
|
3291
3346
|
suspense,
|
|
3292
|
-
|
|
3347
|
+
namespace,
|
|
3293
3348
|
slotScopeIds,
|
|
3294
3349
|
optimized
|
|
3295
3350
|
);
|
|
@@ -3302,7 +3357,7 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, isSVG, slotSc
|
|
|
3302
3357
|
null,
|
|
3303
3358
|
parentComponent,
|
|
3304
3359
|
suspense,
|
|
3305
|
-
|
|
3360
|
+
namespace,
|
|
3306
3361
|
slotScopeIds,
|
|
3307
3362
|
optimized
|
|
3308
3363
|
);
|
|
@@ -3320,7 +3375,7 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, isSVG, slotSc
|
|
|
3320
3375
|
anchor,
|
|
3321
3376
|
parentComponent,
|
|
3322
3377
|
suspense,
|
|
3323
|
-
|
|
3378
|
+
namespace,
|
|
3324
3379
|
slotScopeIds,
|
|
3325
3380
|
optimized
|
|
3326
3381
|
);
|
|
@@ -3328,7 +3383,11 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, isSVG, slotSc
|
|
|
3328
3383
|
} else {
|
|
3329
3384
|
triggerEvent(n2, "onPending");
|
|
3330
3385
|
suspense.pendingBranch = newBranch;
|
|
3331
|
-
|
|
3386
|
+
if (newBranch.shapeFlag & 512) {
|
|
3387
|
+
suspense.pendingId = newBranch.component.suspenseId;
|
|
3388
|
+
} else {
|
|
3389
|
+
suspense.pendingId = suspenseId++;
|
|
3390
|
+
}
|
|
3332
3391
|
patch(
|
|
3333
3392
|
null,
|
|
3334
3393
|
newBranch,
|
|
@@ -3336,7 +3395,7 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, isSVG, slotSc
|
|
|
3336
3395
|
null,
|
|
3337
3396
|
parentComponent,
|
|
3338
3397
|
suspense,
|
|
3339
|
-
|
|
3398
|
+
namespace,
|
|
3340
3399
|
slotScopeIds,
|
|
3341
3400
|
optimized
|
|
3342
3401
|
);
|
|
@@ -3358,7 +3417,7 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, isSVG, slotSc
|
|
|
3358
3417
|
}
|
|
3359
3418
|
}
|
|
3360
3419
|
let hasWarned = false;
|
|
3361
|
-
function createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor,
|
|
3420
|
+
function createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, namespace, slotScopeIds, optimized, rendererInternals, isHydrating = false) {
|
|
3362
3421
|
if (!hasWarned) {
|
|
3363
3422
|
hasWarned = true;
|
|
3364
3423
|
console[console.info ? "info" : "log"](
|
|
@@ -3388,7 +3447,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
3388
3447
|
vnode,
|
|
3389
3448
|
parent: parentSuspense,
|
|
3390
3449
|
parentComponent,
|
|
3391
|
-
|
|
3450
|
+
namespace,
|
|
3392
3451
|
container,
|
|
3393
3452
|
hiddenContainer,
|
|
3394
3453
|
anchor,
|
|
@@ -3397,7 +3456,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
3397
3456
|
timeout: typeof timeout === "number" ? timeout : -1,
|
|
3398
3457
|
activeBranch: null,
|
|
3399
3458
|
pendingBranch: null,
|
|
3400
|
-
isInFallback:
|
|
3459
|
+
isInFallback: !isHydrating,
|
|
3401
3460
|
isHydrating,
|
|
3402
3461
|
isUnmounted: false,
|
|
3403
3462
|
effects: [],
|
|
@@ -3481,8 +3540,9 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
3481
3540
|
if (!suspense.pendingBranch) {
|
|
3482
3541
|
return;
|
|
3483
3542
|
}
|
|
3484
|
-
const { vnode: vnode2, activeBranch, parentComponent: parentComponent2, container: container2,
|
|
3543
|
+
const { vnode: vnode2, activeBranch, parentComponent: parentComponent2, container: container2, namespace: namespace2 } = suspense;
|
|
3485
3544
|
triggerEvent(vnode2, "onFallback");
|
|
3545
|
+
const anchor2 = next(activeBranch);
|
|
3486
3546
|
const mountFallback = () => {
|
|
3487
3547
|
if (!suspense.isInFallback) {
|
|
3488
3548
|
return;
|
|
@@ -3491,11 +3551,11 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
3491
3551
|
null,
|
|
3492
3552
|
fallbackVNode,
|
|
3493
3553
|
container2,
|
|
3494
|
-
|
|
3554
|
+
anchor2,
|
|
3495
3555
|
parentComponent2,
|
|
3496
3556
|
null,
|
|
3497
3557
|
// fallback tree will not have suspense context
|
|
3498
|
-
|
|
3558
|
+
namespace2,
|
|
3499
3559
|
slotScopeIds,
|
|
3500
3560
|
optimized
|
|
3501
3561
|
);
|
|
@@ -3558,7 +3618,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
3558
3618
|
// consider the comment placeholder case.
|
|
3559
3619
|
hydratedEl ? null : next(instance.subTree),
|
|
3560
3620
|
suspense,
|
|
3561
|
-
|
|
3621
|
+
namespace,
|
|
3562
3622
|
optimized
|
|
3563
3623
|
);
|
|
3564
3624
|
if (placeholder) {
|
|
@@ -3595,7 +3655,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
3595
3655
|
};
|
|
3596
3656
|
return suspense;
|
|
3597
3657
|
}
|
|
3598
|
-
function hydrateSuspense(node, vnode, parentComponent, parentSuspense,
|
|
3658
|
+
function hydrateSuspense(node, vnode, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals, hydrateNode) {
|
|
3599
3659
|
const suspense = vnode.suspense = createSuspenseBoundary(
|
|
3600
3660
|
vnode,
|
|
3601
3661
|
parentSuspense,
|
|
@@ -3603,7 +3663,7 @@ function hydrateSuspense(node, vnode, parentComponent, parentSuspense, isSVG, sl
|
|
|
3603
3663
|
node.parentNode,
|
|
3604
3664
|
document.createElement("div"),
|
|
3605
3665
|
null,
|
|
3606
|
-
|
|
3666
|
+
namespace,
|
|
3607
3667
|
slotScopeIds,
|
|
3608
3668
|
optimized,
|
|
3609
3669
|
rendererInternals,
|
|
@@ -4545,7 +4605,7 @@ const KeepAliveImpl = {
|
|
|
4545
4605
|
}
|
|
4546
4606
|
} = sharedContext;
|
|
4547
4607
|
const storageContainer = createElement("div");
|
|
4548
|
-
sharedContext.activate = (vnode, container, anchor,
|
|
4608
|
+
sharedContext.activate = (vnode, container, anchor, namespace, optimized) => {
|
|
4549
4609
|
const instance2 = vnode.component;
|
|
4550
4610
|
move(vnode, container, anchor, 0, parentSuspense);
|
|
4551
4611
|
patch(
|
|
@@ -4555,7 +4615,7 @@ const KeepAliveImpl = {
|
|
|
4555
4615
|
anchor,
|
|
4556
4616
|
instance2,
|
|
4557
4617
|
parentSuspense,
|
|
4558
|
-
|
|
4618
|
+
namespace,
|
|
4559
4619
|
vnode.slotScopeIds,
|
|
4560
4620
|
optimized
|
|
4561
4621
|
);
|
|
@@ -5743,7 +5803,7 @@ function useSlots() {
|
|
|
5743
5803
|
function useAttrs() {
|
|
5744
5804
|
return getContext().attrs;
|
|
5745
5805
|
}
|
|
5746
|
-
function useModel(props, name
|
|
5806
|
+
function useModel(props, name) {
|
|
5747
5807
|
const i = getCurrentInstance();
|
|
5748
5808
|
if (!i) {
|
|
5749
5809
|
warn(`useModel() called without active instance.`);
|
|
@@ -5753,29 +5813,24 @@ function useModel(props, name, options) {
|
|
|
5753
5813
|
warn(`useModel() called with prop "${name}" which is not declared.`);
|
|
5754
5814
|
return ref();
|
|
5755
5815
|
}
|
|
5756
|
-
|
|
5757
|
-
|
|
5758
|
-
|
|
5759
|
-
|
|
5760
|
-
|
|
5761
|
-
)
|
|
5762
|
-
|
|
5763
|
-
|
|
5764
|
-
|
|
5765
|
-
|
|
5766
|
-
|
|
5767
|
-
|
|
5768
|
-
|
|
5769
|
-
|
|
5770
|
-
__v_isRef: true,
|
|
5771
|
-
get value() {
|
|
5772
|
-
return props[name];
|
|
5773
|
-
},
|
|
5774
|
-
set value(value) {
|
|
5775
|
-
i.emit(`update:${name}`, value);
|
|
5816
|
+
let localValue;
|
|
5817
|
+
watchSyncEffect(() => {
|
|
5818
|
+
localValue = props[name];
|
|
5819
|
+
});
|
|
5820
|
+
return customRef((track, trigger) => ({
|
|
5821
|
+
get() {
|
|
5822
|
+
track();
|
|
5823
|
+
return localValue;
|
|
5824
|
+
},
|
|
5825
|
+
set(value) {
|
|
5826
|
+
const rawProps = i.vnode.props;
|
|
5827
|
+
if (!(rawProps && name in rawProps) && hasChanged(value, localValue)) {
|
|
5828
|
+
localValue = value;
|
|
5829
|
+
trigger();
|
|
5776
5830
|
}
|
|
5777
|
-
|
|
5778
|
-
|
|
5831
|
+
i.emit(`update:${name}`, value);
|
|
5832
|
+
}
|
|
5833
|
+
}));
|
|
5779
5834
|
}
|
|
5780
5835
|
function getContext() {
|
|
5781
5836
|
const i = getCurrentInstance();
|
|
@@ -6349,7 +6404,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
6349
6404
|
return vm;
|
|
6350
6405
|
}
|
|
6351
6406
|
}
|
|
6352
|
-
Vue.version = `2.6.14-compat:${"3.4.0-
|
|
6407
|
+
Vue.version = `2.6.14-compat:${"3.4.0-beta.1"}`;
|
|
6353
6408
|
Vue.config = singletonApp.config;
|
|
6354
6409
|
Vue.use = (p, ...options) => {
|
|
6355
6410
|
if (p && isFunction(p.install)) {
|
|
@@ -6594,12 +6649,16 @@ function installCompatMount(app, context, render) {
|
|
|
6594
6649
|
} else {
|
|
6595
6650
|
container = selectorOrEl || document.createElement("div");
|
|
6596
6651
|
}
|
|
6597
|
-
|
|
6652
|
+
let namespace;
|
|
6653
|
+
if (container instanceof SVGElement)
|
|
6654
|
+
namespace = "svg";
|
|
6655
|
+
else if (typeof MathMLElement === "function" && container instanceof MathMLElement)
|
|
6656
|
+
namespace = "mathml";
|
|
6598
6657
|
{
|
|
6599
6658
|
context.reload = () => {
|
|
6600
6659
|
const cloned = cloneVNode(vnode);
|
|
6601
6660
|
cloned.component = null;
|
|
6602
|
-
render(cloned, container,
|
|
6661
|
+
render(cloned, container, namespace);
|
|
6603
6662
|
};
|
|
6604
6663
|
}
|
|
6605
6664
|
if (hasNoRender && instance.render === emptyRender) {
|
|
@@ -6622,7 +6681,7 @@ function installCompatMount(app, context, render) {
|
|
|
6622
6681
|
);
|
|
6623
6682
|
}
|
|
6624
6683
|
container.innerHTML = "";
|
|
6625
|
-
render(vnode, container,
|
|
6684
|
+
render(vnode, container, namespace);
|
|
6626
6685
|
if (container instanceof Element) {
|
|
6627
6686
|
container.removeAttribute("v-cloak");
|
|
6628
6687
|
container.setAttribute("data-v-app", "");
|
|
@@ -6824,7 +6883,7 @@ function createAppAPI(render, hydrate) {
|
|
|
6824
6883
|
context.directives[name] = directive;
|
|
6825
6884
|
return app;
|
|
6826
6885
|
},
|
|
6827
|
-
mount(rootContainer, isHydrate,
|
|
6886
|
+
mount(rootContainer, isHydrate, namespace) {
|
|
6828
6887
|
if (!isMounted) {
|
|
6829
6888
|
if (rootContainer.__vue_app__) {
|
|
6830
6889
|
warn(
|
|
@@ -6834,15 +6893,24 @@ function createAppAPI(render, hydrate) {
|
|
|
6834
6893
|
}
|
|
6835
6894
|
const vnode = createVNode(rootComponent, rootProps);
|
|
6836
6895
|
vnode.appContext = context;
|
|
6896
|
+
if (namespace === true) {
|
|
6897
|
+
namespace = "svg";
|
|
6898
|
+
} else if (namespace === false) {
|
|
6899
|
+
namespace = void 0;
|
|
6900
|
+
}
|
|
6837
6901
|
{
|
|
6838
6902
|
context.reload = () => {
|
|
6839
|
-
render(
|
|
6903
|
+
render(
|
|
6904
|
+
cloneVNode(vnode),
|
|
6905
|
+
rootContainer,
|
|
6906
|
+
namespace
|
|
6907
|
+
);
|
|
6840
6908
|
};
|
|
6841
6909
|
}
|
|
6842
6910
|
if (isHydrate && hydrate) {
|
|
6843
6911
|
hydrate(vnode, rootContainer);
|
|
6844
6912
|
} else {
|
|
6845
|
-
render(vnode, rootContainer,
|
|
6913
|
+
render(vnode, rootContainer, namespace);
|
|
6846
6914
|
}
|
|
6847
6915
|
isMounted = true;
|
|
6848
6916
|
app._container = rootContainer;
|
|
@@ -7307,11 +7375,12 @@ function validateProps(rawProps, props, instance) {
|
|
|
7307
7375
|
key,
|
|
7308
7376
|
resolvedValues[key],
|
|
7309
7377
|
opt,
|
|
7378
|
+
shallowReadonly(resolvedValues) ,
|
|
7310
7379
|
!hasOwn(rawProps, key) && !hasOwn(rawProps, hyphenate(key))
|
|
7311
7380
|
);
|
|
7312
7381
|
}
|
|
7313
7382
|
}
|
|
7314
|
-
function validateProp(name, value, prop, isAbsent) {
|
|
7383
|
+
function validateProp(name, value, prop, props, isAbsent) {
|
|
7315
7384
|
const { type, required, validator, skipCheck } = prop;
|
|
7316
7385
|
if (required && isAbsent) {
|
|
7317
7386
|
warn('Missing required prop: "' + name + '"');
|
|
@@ -7334,7 +7403,7 @@ function validateProp(name, value, prop, isAbsent) {
|
|
|
7334
7403
|
return;
|
|
7335
7404
|
}
|
|
7336
7405
|
}
|
|
7337
|
-
if (validator && !validator(value)) {
|
|
7406
|
+
if (validator && !validator(value, props)) {
|
|
7338
7407
|
warn('Invalid prop: custom validator check failed for prop "' + name + '".');
|
|
7339
7408
|
}
|
|
7340
7409
|
}
|
|
@@ -7592,7 +7661,15 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
7592
7661
|
}
|
|
7593
7662
|
|
|
7594
7663
|
let hasMismatch = false;
|
|
7595
|
-
const isSVGContainer = (container) =>
|
|
7664
|
+
const isSVGContainer = (container) => container.namespaceURI.includes("svg") && container.tagName !== "foreignObject";
|
|
7665
|
+
const isMathMLContainer = (container) => container.namespaceURI.includes("MathML");
|
|
7666
|
+
const getContainerType = (container) => {
|
|
7667
|
+
if (isSVGContainer(container))
|
|
7668
|
+
return "svg";
|
|
7669
|
+
if (isMathMLContainer(container))
|
|
7670
|
+
return "mathml";
|
|
7671
|
+
return void 0;
|
|
7672
|
+
};
|
|
7596
7673
|
const isComment = (node) => node.nodeType === 8 /* COMMENT */;
|
|
7597
7674
|
function createHydrationFunctions(rendererInternals) {
|
|
7598
7675
|
const {
|
|
@@ -7671,11 +7748,13 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
7671
7748
|
if (node.data !== vnode.children) {
|
|
7672
7749
|
hasMismatch = true;
|
|
7673
7750
|
warn(
|
|
7674
|
-
`Hydration text mismatch
|
|
7675
|
-
|
|
7751
|
+
`Hydration text mismatch in`,
|
|
7752
|
+
node.parentNode,
|
|
7753
|
+
`
|
|
7754
|
+
- rendered on server: ${JSON.stringify(
|
|
7676
7755
|
node.data
|
|
7677
7756
|
)}
|
|
7678
|
-
-
|
|
7757
|
+
- expected on client: ${JSON.stringify(vnode.children)}`
|
|
7679
7758
|
);
|
|
7680
7759
|
node.data = vnode.children;
|
|
7681
7760
|
}
|
|
@@ -7761,7 +7840,7 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
7761
7840
|
null,
|
|
7762
7841
|
parentComponent,
|
|
7763
7842
|
parentSuspense,
|
|
7764
|
-
|
|
7843
|
+
getContainerType(container),
|
|
7765
7844
|
optimized
|
|
7766
7845
|
);
|
|
7767
7846
|
if (isAsyncWrapper(vnode)) {
|
|
@@ -7796,7 +7875,7 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
7796
7875
|
vnode,
|
|
7797
7876
|
parentComponent,
|
|
7798
7877
|
parentSuspense,
|
|
7799
|
-
|
|
7878
|
+
getContainerType(parentNode(node)),
|
|
7800
7879
|
slotScopeIds,
|
|
7801
7880
|
optimized,
|
|
7802
7881
|
rendererInternals,
|
|
@@ -7819,38 +7898,6 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
7819
7898
|
if (dirs) {
|
|
7820
7899
|
invokeDirectiveHook(vnode, null, parentComponent, "created");
|
|
7821
7900
|
}
|
|
7822
|
-
if (props) {
|
|
7823
|
-
if (forcePatch || !optimized || patchFlag & (16 | 32)) {
|
|
7824
|
-
for (const key in props) {
|
|
7825
|
-
if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers
|
|
7826
|
-
key[0] === ".") {
|
|
7827
|
-
patchProp(
|
|
7828
|
-
el,
|
|
7829
|
-
key,
|
|
7830
|
-
null,
|
|
7831
|
-
props[key],
|
|
7832
|
-
false,
|
|
7833
|
-
void 0,
|
|
7834
|
-
parentComponent
|
|
7835
|
-
);
|
|
7836
|
-
}
|
|
7837
|
-
}
|
|
7838
|
-
} else if (props.onClick) {
|
|
7839
|
-
patchProp(
|
|
7840
|
-
el,
|
|
7841
|
-
"onClick",
|
|
7842
|
-
null,
|
|
7843
|
-
props.onClick,
|
|
7844
|
-
false,
|
|
7845
|
-
void 0,
|
|
7846
|
-
parentComponent
|
|
7847
|
-
);
|
|
7848
|
-
}
|
|
7849
|
-
}
|
|
7850
|
-
let vnodeHooks;
|
|
7851
|
-
if (vnodeHooks = props && props.onVnodeBeforeMount) {
|
|
7852
|
-
invokeVNodeHook(vnodeHooks, parentComponent, vnode);
|
|
7853
|
-
}
|
|
7854
7901
|
let needCallTransitionHooks = false;
|
|
7855
7902
|
if (isTemplateNode(el)) {
|
|
7856
7903
|
needCallTransitionHooks = needTransition(parentSuspense, transition) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear;
|
|
@@ -7861,16 +7908,6 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
7861
7908
|
replaceNode(content, el, parentComponent);
|
|
7862
7909
|
vnode.el = el = content;
|
|
7863
7910
|
}
|
|
7864
|
-
if (dirs) {
|
|
7865
|
-
invokeDirectiveHook(vnode, null, parentComponent, "beforeMount");
|
|
7866
|
-
}
|
|
7867
|
-
if ((vnodeHooks = props && props.onVnodeMounted) || dirs || needCallTransitionHooks) {
|
|
7868
|
-
queueEffectWithSuspense(() => {
|
|
7869
|
-
vnodeHooks && invokeVNodeHook(vnodeHooks, parentComponent, vnode);
|
|
7870
|
-
needCallTransitionHooks && transition.enter(el);
|
|
7871
|
-
dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted");
|
|
7872
|
-
}, parentSuspense);
|
|
7873
|
-
}
|
|
7874
7911
|
if (shapeFlag & 16 && // skip if element has innerHTML / textContent
|
|
7875
7912
|
!(props && (props.innerHTML || props.textContent))) {
|
|
7876
7913
|
let next = hydrateChildren(
|
|
@@ -7887,7 +7924,10 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
7887
7924
|
hasMismatch = true;
|
|
7888
7925
|
if (!hasWarned) {
|
|
7889
7926
|
warn(
|
|
7890
|
-
`Hydration children mismatch
|
|
7927
|
+
`Hydration children mismatch on`,
|
|
7928
|
+
el,
|
|
7929
|
+
`
|
|
7930
|
+
Server rendered element contains more child nodes than client vdom.`
|
|
7891
7931
|
);
|
|
7892
7932
|
hasWarned = true;
|
|
7893
7933
|
}
|
|
@@ -7899,13 +7939,50 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
7899
7939
|
if (el.textContent !== vnode.children) {
|
|
7900
7940
|
hasMismatch = true;
|
|
7901
7941
|
warn(
|
|
7902
|
-
`Hydration text content mismatch
|
|
7903
|
-
|
|
7904
|
-
|
|
7942
|
+
`Hydration text content mismatch on`,
|
|
7943
|
+
el,
|
|
7944
|
+
`
|
|
7945
|
+
- rendered on server: ${el.textContent}
|
|
7946
|
+
- expected on client: ${vnode.children}`
|
|
7905
7947
|
);
|
|
7906
7948
|
el.textContent = vnode.children;
|
|
7907
7949
|
}
|
|
7908
7950
|
}
|
|
7951
|
+
if (props) {
|
|
7952
|
+
{
|
|
7953
|
+
for (const key in props) {
|
|
7954
|
+
if (propHasMismatch(el, key, props[key])) {
|
|
7955
|
+
hasMismatch = true;
|
|
7956
|
+
}
|
|
7957
|
+
if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers
|
|
7958
|
+
key[0] === ".") {
|
|
7959
|
+
patchProp(
|
|
7960
|
+
el,
|
|
7961
|
+
key,
|
|
7962
|
+
null,
|
|
7963
|
+
props[key],
|
|
7964
|
+
void 0,
|
|
7965
|
+
void 0,
|
|
7966
|
+
parentComponent
|
|
7967
|
+
);
|
|
7968
|
+
}
|
|
7969
|
+
}
|
|
7970
|
+
}
|
|
7971
|
+
}
|
|
7972
|
+
let vnodeHooks;
|
|
7973
|
+
if (vnodeHooks = props && props.onVnodeBeforeMount) {
|
|
7974
|
+
invokeVNodeHook(vnodeHooks, parentComponent, vnode);
|
|
7975
|
+
}
|
|
7976
|
+
if (dirs) {
|
|
7977
|
+
invokeDirectiveHook(vnode, null, parentComponent, "beforeMount");
|
|
7978
|
+
}
|
|
7979
|
+
if ((vnodeHooks = props && props.onVnodeMounted) || dirs || needCallTransitionHooks) {
|
|
7980
|
+
queueEffectWithSuspense(() => {
|
|
7981
|
+
vnodeHooks && invokeVNodeHook(vnodeHooks, parentComponent, vnode);
|
|
7982
|
+
needCallTransitionHooks && transition.enter(el);
|
|
7983
|
+
dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted");
|
|
7984
|
+
}, parentSuspense);
|
|
7985
|
+
}
|
|
7909
7986
|
}
|
|
7910
7987
|
return el.nextSibling;
|
|
7911
7988
|
};
|
|
@@ -7931,7 +8008,10 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
7931
8008
|
hasMismatch = true;
|
|
7932
8009
|
if (!hasWarned) {
|
|
7933
8010
|
warn(
|
|
7934
|
-
`Hydration children mismatch
|
|
8011
|
+
`Hydration children mismatch on`,
|
|
8012
|
+
container,
|
|
8013
|
+
`
|
|
8014
|
+
Server rendered element contains fewer child nodes than client vdom.`
|
|
7935
8015
|
);
|
|
7936
8016
|
hasWarned = true;
|
|
7937
8017
|
}
|
|
@@ -7942,7 +8022,7 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
7942
8022
|
null,
|
|
7943
8023
|
parentComponent,
|
|
7944
8024
|
parentSuspense,
|
|
7945
|
-
|
|
8025
|
+
getContainerType(container),
|
|
7946
8026
|
slotScopeIds
|
|
7947
8027
|
);
|
|
7948
8028
|
}
|
|
@@ -7976,12 +8056,12 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
7976
8056
|
hasMismatch = true;
|
|
7977
8057
|
warn(
|
|
7978
8058
|
`Hydration node mismatch:
|
|
7979
|
-
-
|
|
7980
|
-
vnode.type,
|
|
7981
|
-
`
|
|
7982
|
-
- Server rendered DOM:`,
|
|
8059
|
+
- rendered on server:`,
|
|
7983
8060
|
node,
|
|
7984
|
-
node.nodeType === 3 /* TEXT */ ? `(text)` : isComment(node) && node.data === "[" ? `(start of fragment)` :
|
|
8061
|
+
node.nodeType === 3 /* TEXT */ ? `(text)` : isComment(node) && node.data === "[" ? `(start of fragment)` : ``,
|
|
8062
|
+
`
|
|
8063
|
+
- expected on client:`,
|
|
8064
|
+
vnode.type
|
|
7985
8065
|
);
|
|
7986
8066
|
vnode.el = null;
|
|
7987
8067
|
if (isFragment) {
|
|
@@ -8005,7 +8085,7 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
8005
8085
|
next,
|
|
8006
8086
|
parentComponent,
|
|
8007
8087
|
parentSuspense,
|
|
8008
|
-
|
|
8088
|
+
getContainerType(container),
|
|
8009
8089
|
slotScopeIds
|
|
8010
8090
|
);
|
|
8011
8091
|
return next;
|
|
@@ -8046,6 +8126,46 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
8046
8126
|
};
|
|
8047
8127
|
return [hydrate, hydrateNode];
|
|
8048
8128
|
}
|
|
8129
|
+
function propHasMismatch(el, key, clientValue) {
|
|
8130
|
+
let mismatchType;
|
|
8131
|
+
let mismatchKey;
|
|
8132
|
+
let actual;
|
|
8133
|
+
let expected;
|
|
8134
|
+
if (key === "class") {
|
|
8135
|
+
actual = el.className;
|
|
8136
|
+
expected = normalizeClass(clientValue);
|
|
8137
|
+
if (actual !== expected) {
|
|
8138
|
+
mismatchType = mismatchKey = `class`;
|
|
8139
|
+
}
|
|
8140
|
+
} else if (key === "style") {
|
|
8141
|
+
actual = el.getAttribute("style");
|
|
8142
|
+
expected = isString(clientValue) ? clientValue : stringifyStyle(normalizeStyle(clientValue));
|
|
8143
|
+
if (actual !== expected) {
|
|
8144
|
+
mismatchType = mismatchKey = "style";
|
|
8145
|
+
}
|
|
8146
|
+
} else if (el instanceof SVGElement && isKnownSvgAttr(key) || el instanceof HTMLElement && (isBooleanAttr(key) || isKnownHtmlAttr(key))) {
|
|
8147
|
+
actual = el.hasAttribute(key) && el.getAttribute(key);
|
|
8148
|
+
expected = isBooleanAttr(key) ? includeBooleanAttr(clientValue) ? "" : false : clientValue == null ? false : String(clientValue);
|
|
8149
|
+
if (actual !== expected) {
|
|
8150
|
+
mismatchType = `attribute`;
|
|
8151
|
+
mismatchKey = key;
|
|
8152
|
+
}
|
|
8153
|
+
}
|
|
8154
|
+
if (mismatchType) {
|
|
8155
|
+
const format = (v) => v === false ? `(not rendered)` : `${mismatchKey}="${v}"`;
|
|
8156
|
+
warn(
|
|
8157
|
+
`Hydration ${mismatchType} mismatch on`,
|
|
8158
|
+
el,
|
|
8159
|
+
`
|
|
8160
|
+
- rendered on server: ${format(actual)}
|
|
8161
|
+
- expected on client: ${format(expected)}
|
|
8162
|
+
Note: this mismatch is check-only. The DOM will not be rectified in production due to performance overhead.
|
|
8163
|
+
You should fix the source of the mismatch.`
|
|
8164
|
+
);
|
|
8165
|
+
return true;
|
|
8166
|
+
}
|
|
8167
|
+
return false;
|
|
8168
|
+
}
|
|
8049
8169
|
|
|
8050
8170
|
let supported;
|
|
8051
8171
|
let perf;
|
|
@@ -8114,7 +8234,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8114
8234
|
setScopeId: hostSetScopeId = NOOP,
|
|
8115
8235
|
insertStaticContent: hostInsertStaticContent
|
|
8116
8236
|
} = options;
|
|
8117
|
-
const patch = (n1, n2, container, anchor = null, parentComponent = null, parentSuspense = null,
|
|
8237
|
+
const patch = (n1, n2, container, anchor = null, parentComponent = null, parentSuspense = null, namespace = void 0, slotScopeIds = null, optimized = isHmrUpdating ? false : !!n2.dynamicChildren) => {
|
|
8118
8238
|
if (n1 === n2) {
|
|
8119
8239
|
return;
|
|
8120
8240
|
}
|
|
@@ -8137,9 +8257,9 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8137
8257
|
break;
|
|
8138
8258
|
case Static:
|
|
8139
8259
|
if (n1 == null) {
|
|
8140
|
-
mountStaticNode(n2, container, anchor,
|
|
8260
|
+
mountStaticNode(n2, container, anchor, namespace);
|
|
8141
8261
|
} else {
|
|
8142
|
-
patchStaticNode(n1, n2, container,
|
|
8262
|
+
patchStaticNode(n1, n2, container, namespace);
|
|
8143
8263
|
}
|
|
8144
8264
|
break;
|
|
8145
8265
|
case Fragment:
|
|
@@ -8150,7 +8270,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8150
8270
|
anchor,
|
|
8151
8271
|
parentComponent,
|
|
8152
8272
|
parentSuspense,
|
|
8153
|
-
|
|
8273
|
+
namespace,
|
|
8154
8274
|
slotScopeIds,
|
|
8155
8275
|
optimized
|
|
8156
8276
|
);
|
|
@@ -8164,7 +8284,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8164
8284
|
anchor,
|
|
8165
8285
|
parentComponent,
|
|
8166
8286
|
parentSuspense,
|
|
8167
|
-
|
|
8287
|
+
namespace,
|
|
8168
8288
|
slotScopeIds,
|
|
8169
8289
|
optimized
|
|
8170
8290
|
);
|
|
@@ -8176,7 +8296,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8176
8296
|
anchor,
|
|
8177
8297
|
parentComponent,
|
|
8178
8298
|
parentSuspense,
|
|
8179
|
-
|
|
8299
|
+
namespace,
|
|
8180
8300
|
slotScopeIds,
|
|
8181
8301
|
optimized
|
|
8182
8302
|
);
|
|
@@ -8188,7 +8308,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8188
8308
|
anchor,
|
|
8189
8309
|
parentComponent,
|
|
8190
8310
|
parentSuspense,
|
|
8191
|
-
|
|
8311
|
+
namespace,
|
|
8192
8312
|
slotScopeIds,
|
|
8193
8313
|
optimized,
|
|
8194
8314
|
internals
|
|
@@ -8201,7 +8321,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8201
8321
|
anchor,
|
|
8202
8322
|
parentComponent,
|
|
8203
8323
|
parentSuspense,
|
|
8204
|
-
|
|
8324
|
+
namespace,
|
|
8205
8325
|
slotScopeIds,
|
|
8206
8326
|
optimized,
|
|
8207
8327
|
internals
|
|
@@ -8239,17 +8359,17 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8239
8359
|
n2.el = n1.el;
|
|
8240
8360
|
}
|
|
8241
8361
|
};
|
|
8242
|
-
const mountStaticNode = (n2, container, anchor,
|
|
8362
|
+
const mountStaticNode = (n2, container, anchor, namespace) => {
|
|
8243
8363
|
[n2.el, n2.anchor] = hostInsertStaticContent(
|
|
8244
8364
|
n2.children,
|
|
8245
8365
|
container,
|
|
8246
8366
|
anchor,
|
|
8247
|
-
|
|
8367
|
+
namespace,
|
|
8248
8368
|
n2.el,
|
|
8249
8369
|
n2.anchor
|
|
8250
8370
|
);
|
|
8251
8371
|
};
|
|
8252
|
-
const patchStaticNode = (n1, n2, container,
|
|
8372
|
+
const patchStaticNode = (n1, n2, container, namespace) => {
|
|
8253
8373
|
if (n2.children !== n1.children) {
|
|
8254
8374
|
const anchor = hostNextSibling(n1.anchor);
|
|
8255
8375
|
removeStaticNode(n1);
|
|
@@ -8257,7 +8377,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8257
8377
|
n2.children,
|
|
8258
8378
|
container,
|
|
8259
8379
|
anchor,
|
|
8260
|
-
|
|
8380
|
+
namespace
|
|
8261
8381
|
);
|
|
8262
8382
|
} else {
|
|
8263
8383
|
n2.el = n1.el;
|
|
@@ -8282,8 +8402,12 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8282
8402
|
}
|
|
8283
8403
|
hostRemove(anchor);
|
|
8284
8404
|
};
|
|
8285
|
-
const processElement = (n1, n2, container, anchor, parentComponent, parentSuspense,
|
|
8286
|
-
|
|
8405
|
+
const processElement = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
|
|
8406
|
+
if (n2.type === "svg") {
|
|
8407
|
+
namespace = "svg";
|
|
8408
|
+
} else if (n2.type === "math") {
|
|
8409
|
+
namespace = "mathml";
|
|
8410
|
+
}
|
|
8287
8411
|
if (n1 == null) {
|
|
8288
8412
|
mountElement(
|
|
8289
8413
|
n2,
|
|
@@ -8291,7 +8415,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8291
8415
|
anchor,
|
|
8292
8416
|
parentComponent,
|
|
8293
8417
|
parentSuspense,
|
|
8294
|
-
|
|
8418
|
+
namespace,
|
|
8295
8419
|
slotScopeIds,
|
|
8296
8420
|
optimized
|
|
8297
8421
|
);
|
|
@@ -8301,19 +8425,19 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8301
8425
|
n2,
|
|
8302
8426
|
parentComponent,
|
|
8303
8427
|
parentSuspense,
|
|
8304
|
-
|
|
8428
|
+
namespace,
|
|
8305
8429
|
slotScopeIds,
|
|
8306
8430
|
optimized
|
|
8307
8431
|
);
|
|
8308
8432
|
}
|
|
8309
8433
|
};
|
|
8310
|
-
const mountElement = (vnode, container, anchor, parentComponent, parentSuspense,
|
|
8434
|
+
const mountElement = (vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
|
|
8311
8435
|
let el;
|
|
8312
8436
|
let vnodeHook;
|
|
8313
|
-
const {
|
|
8437
|
+
const { props, shapeFlag, transition, dirs } = vnode;
|
|
8314
8438
|
el = vnode.el = hostCreateElement(
|
|
8315
8439
|
vnode.type,
|
|
8316
|
-
|
|
8440
|
+
namespace,
|
|
8317
8441
|
props && props.is,
|
|
8318
8442
|
props
|
|
8319
8443
|
);
|
|
@@ -8326,7 +8450,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8326
8450
|
null,
|
|
8327
8451
|
parentComponent,
|
|
8328
8452
|
parentSuspense,
|
|
8329
|
-
|
|
8453
|
+
resolveChildrenNamespace(vnode, namespace),
|
|
8330
8454
|
slotScopeIds,
|
|
8331
8455
|
optimized
|
|
8332
8456
|
);
|
|
@@ -8343,7 +8467,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8343
8467
|
key,
|
|
8344
8468
|
null,
|
|
8345
8469
|
props[key],
|
|
8346
|
-
|
|
8470
|
+
namespace,
|
|
8347
8471
|
vnode.children,
|
|
8348
8472
|
parentComponent,
|
|
8349
8473
|
parentSuspense,
|
|
@@ -8352,7 +8476,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8352
8476
|
}
|
|
8353
8477
|
}
|
|
8354
8478
|
if ("value" in props) {
|
|
8355
|
-
hostPatchProp(el, "value", null, props.value);
|
|
8479
|
+
hostPatchProp(el, "value", null, props.value, namespace);
|
|
8356
8480
|
}
|
|
8357
8481
|
if (vnodeHook = props.onVnodeBeforeMount) {
|
|
8358
8482
|
invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
@@ -8410,7 +8534,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8410
8534
|
}
|
|
8411
8535
|
}
|
|
8412
8536
|
};
|
|
8413
|
-
const mountChildren = (children, container, anchor, parentComponent, parentSuspense,
|
|
8537
|
+
const mountChildren = (children, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, start = 0) => {
|
|
8414
8538
|
for (let i = start; i < children.length; i++) {
|
|
8415
8539
|
const child = children[i] = optimized ? cloneIfMounted(children[i]) : normalizeVNode(children[i]);
|
|
8416
8540
|
patch(
|
|
@@ -8420,13 +8544,13 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8420
8544
|
anchor,
|
|
8421
8545
|
parentComponent,
|
|
8422
8546
|
parentSuspense,
|
|
8423
|
-
|
|
8547
|
+
namespace,
|
|
8424
8548
|
slotScopeIds,
|
|
8425
8549
|
optimized
|
|
8426
8550
|
);
|
|
8427
8551
|
}
|
|
8428
8552
|
};
|
|
8429
|
-
const patchElement = (n1, n2, parentComponent, parentSuspense,
|
|
8553
|
+
const patchElement = (n1, n2, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
|
|
8430
8554
|
const el = n2.el = n1.el;
|
|
8431
8555
|
let { patchFlag, dynamicChildren, dirs } = n2;
|
|
8432
8556
|
patchFlag |= n1.patchFlag & 16;
|
|
@@ -8446,7 +8570,6 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8446
8570
|
optimized = false;
|
|
8447
8571
|
dynamicChildren = null;
|
|
8448
8572
|
}
|
|
8449
|
-
const areChildrenSVG = isSVG && n2.type !== "foreignObject";
|
|
8450
8573
|
if (dynamicChildren) {
|
|
8451
8574
|
patchBlockChildren(
|
|
8452
8575
|
n1.dynamicChildren,
|
|
@@ -8454,7 +8577,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8454
8577
|
el,
|
|
8455
8578
|
parentComponent,
|
|
8456
8579
|
parentSuspense,
|
|
8457
|
-
|
|
8580
|
+
resolveChildrenNamespace(n2, namespace),
|
|
8458
8581
|
slotScopeIds
|
|
8459
8582
|
);
|
|
8460
8583
|
{
|
|
@@ -8468,7 +8591,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8468
8591
|
null,
|
|
8469
8592
|
parentComponent,
|
|
8470
8593
|
parentSuspense,
|
|
8471
|
-
|
|
8594
|
+
resolveChildrenNamespace(n2, namespace),
|
|
8472
8595
|
slotScopeIds,
|
|
8473
8596
|
false
|
|
8474
8597
|
);
|
|
@@ -8482,16 +8605,16 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8482
8605
|
newProps,
|
|
8483
8606
|
parentComponent,
|
|
8484
8607
|
parentSuspense,
|
|
8485
|
-
|
|
8608
|
+
namespace
|
|
8486
8609
|
);
|
|
8487
8610
|
} else {
|
|
8488
8611
|
if (patchFlag & 2) {
|
|
8489
8612
|
if (oldProps.class !== newProps.class) {
|
|
8490
|
-
hostPatchProp(el, "class", null, newProps.class,
|
|
8613
|
+
hostPatchProp(el, "class", null, newProps.class, namespace);
|
|
8491
8614
|
}
|
|
8492
8615
|
}
|
|
8493
8616
|
if (patchFlag & 4) {
|
|
8494
|
-
hostPatchProp(el, "style", oldProps.style, newProps.style,
|
|
8617
|
+
hostPatchProp(el, "style", oldProps.style, newProps.style, namespace);
|
|
8495
8618
|
}
|
|
8496
8619
|
if (patchFlag & 8) {
|
|
8497
8620
|
const propsToUpdate = n2.dynamicProps;
|
|
@@ -8505,7 +8628,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8505
8628
|
key,
|
|
8506
8629
|
prev,
|
|
8507
8630
|
next,
|
|
8508
|
-
|
|
8631
|
+
namespace,
|
|
8509
8632
|
n1.children,
|
|
8510
8633
|
parentComponent,
|
|
8511
8634
|
parentSuspense,
|
|
@@ -8528,7 +8651,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8528
8651
|
newProps,
|
|
8529
8652
|
parentComponent,
|
|
8530
8653
|
parentSuspense,
|
|
8531
|
-
|
|
8654
|
+
namespace
|
|
8532
8655
|
);
|
|
8533
8656
|
}
|
|
8534
8657
|
if ((vnodeHook = newProps.onVnodeUpdated) || dirs) {
|
|
@@ -8538,7 +8661,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8538
8661
|
}, parentSuspense);
|
|
8539
8662
|
}
|
|
8540
8663
|
};
|
|
8541
|
-
const patchBlockChildren = (oldChildren, newChildren, fallbackContainer, parentComponent, parentSuspense,
|
|
8664
|
+
const patchBlockChildren = (oldChildren, newChildren, fallbackContainer, parentComponent, parentSuspense, namespace, slotScopeIds) => {
|
|
8542
8665
|
for (let i = 0; i < newChildren.length; i++) {
|
|
8543
8666
|
const oldVNode = oldChildren[i];
|
|
8544
8667
|
const newVNode = newChildren[i];
|
|
@@ -8563,13 +8686,13 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8563
8686
|
null,
|
|
8564
8687
|
parentComponent,
|
|
8565
8688
|
parentSuspense,
|
|
8566
|
-
|
|
8689
|
+
namespace,
|
|
8567
8690
|
slotScopeIds,
|
|
8568
8691
|
true
|
|
8569
8692
|
);
|
|
8570
8693
|
}
|
|
8571
8694
|
};
|
|
8572
|
-
const patchProps = (el, vnode, oldProps, newProps, parentComponent, parentSuspense,
|
|
8695
|
+
const patchProps = (el, vnode, oldProps, newProps, parentComponent, parentSuspense, namespace) => {
|
|
8573
8696
|
if (oldProps !== newProps) {
|
|
8574
8697
|
if (oldProps !== EMPTY_OBJ) {
|
|
8575
8698
|
for (const key in oldProps) {
|
|
@@ -8579,7 +8702,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8579
8702
|
key,
|
|
8580
8703
|
oldProps[key],
|
|
8581
8704
|
null,
|
|
8582
|
-
|
|
8705
|
+
namespace,
|
|
8583
8706
|
vnode.children,
|
|
8584
8707
|
parentComponent,
|
|
8585
8708
|
parentSuspense,
|
|
@@ -8599,7 +8722,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8599
8722
|
key,
|
|
8600
8723
|
prev,
|
|
8601
8724
|
next,
|
|
8602
|
-
|
|
8725
|
+
namespace,
|
|
8603
8726
|
vnode.children,
|
|
8604
8727
|
parentComponent,
|
|
8605
8728
|
parentSuspense,
|
|
@@ -8608,11 +8731,11 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8608
8731
|
}
|
|
8609
8732
|
}
|
|
8610
8733
|
if ("value" in newProps) {
|
|
8611
|
-
hostPatchProp(el, "value", oldProps.value, newProps.value);
|
|
8734
|
+
hostPatchProp(el, "value", oldProps.value, newProps.value, namespace);
|
|
8612
8735
|
}
|
|
8613
8736
|
}
|
|
8614
8737
|
};
|
|
8615
|
-
const processFragment = (n1, n2, container, anchor, parentComponent, parentSuspense,
|
|
8738
|
+
const processFragment = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
|
|
8616
8739
|
const fragmentStartAnchor = n2.el = n1 ? n1.el : hostCreateText("");
|
|
8617
8740
|
const fragmentEndAnchor = n2.anchor = n1 ? n1.anchor : hostCreateText("");
|
|
8618
8741
|
let { patchFlag, dynamicChildren, slotScopeIds: fragmentSlotScopeIds } = n2;
|
|
@@ -8636,7 +8759,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8636
8759
|
fragmentEndAnchor,
|
|
8637
8760
|
parentComponent,
|
|
8638
8761
|
parentSuspense,
|
|
8639
|
-
|
|
8762
|
+
namespace,
|
|
8640
8763
|
slotScopeIds,
|
|
8641
8764
|
optimized
|
|
8642
8765
|
);
|
|
@@ -8650,7 +8773,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8650
8773
|
container,
|
|
8651
8774
|
parentComponent,
|
|
8652
8775
|
parentSuspense,
|
|
8653
|
-
|
|
8776
|
+
namespace,
|
|
8654
8777
|
slotScopeIds
|
|
8655
8778
|
);
|
|
8656
8779
|
{
|
|
@@ -8664,14 +8787,14 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8664
8787
|
fragmentEndAnchor,
|
|
8665
8788
|
parentComponent,
|
|
8666
8789
|
parentSuspense,
|
|
8667
|
-
|
|
8790
|
+
namespace,
|
|
8668
8791
|
slotScopeIds,
|
|
8669
8792
|
optimized
|
|
8670
8793
|
);
|
|
8671
8794
|
}
|
|
8672
8795
|
}
|
|
8673
8796
|
};
|
|
8674
|
-
const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense,
|
|
8797
|
+
const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
|
|
8675
8798
|
n2.slotScopeIds = slotScopeIds;
|
|
8676
8799
|
if (n1 == null) {
|
|
8677
8800
|
if (n2.shapeFlag & 512) {
|
|
@@ -8679,7 +8802,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8679
8802
|
n2,
|
|
8680
8803
|
container,
|
|
8681
8804
|
anchor,
|
|
8682
|
-
|
|
8805
|
+
namespace,
|
|
8683
8806
|
optimized
|
|
8684
8807
|
);
|
|
8685
8808
|
} else {
|
|
@@ -8689,7 +8812,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8689
8812
|
anchor,
|
|
8690
8813
|
parentComponent,
|
|
8691
8814
|
parentSuspense,
|
|
8692
|
-
|
|
8815
|
+
namespace,
|
|
8693
8816
|
optimized
|
|
8694
8817
|
);
|
|
8695
8818
|
}
|
|
@@ -8697,7 +8820,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8697
8820
|
updateComponent(n1, n2, optimized);
|
|
8698
8821
|
}
|
|
8699
8822
|
};
|
|
8700
|
-
const mountComponent = (initialVNode, container, anchor, parentComponent, parentSuspense,
|
|
8823
|
+
const mountComponent = (initialVNode, container, anchor, parentComponent, parentSuspense, namespace, optimized) => {
|
|
8701
8824
|
const compatMountInstance = initialVNode.isCompatRoot && initialVNode.component;
|
|
8702
8825
|
const instance = compatMountInstance || (initialVNode.component = createComponentInstance(
|
|
8703
8826
|
initialVNode,
|
|
@@ -8729,17 +8852,17 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8729
8852
|
const placeholder = instance.subTree = createVNode(Comment);
|
|
8730
8853
|
processCommentNode(null, placeholder, container, anchor);
|
|
8731
8854
|
}
|
|
8732
|
-
|
|
8855
|
+
} else {
|
|
8856
|
+
setupRenderEffect(
|
|
8857
|
+
instance,
|
|
8858
|
+
initialVNode,
|
|
8859
|
+
container,
|
|
8860
|
+
anchor,
|
|
8861
|
+
parentSuspense,
|
|
8862
|
+
namespace,
|
|
8863
|
+
optimized
|
|
8864
|
+
);
|
|
8733
8865
|
}
|
|
8734
|
-
setupRenderEffect(
|
|
8735
|
-
instance,
|
|
8736
|
-
initialVNode,
|
|
8737
|
-
container,
|
|
8738
|
-
anchor,
|
|
8739
|
-
parentSuspense,
|
|
8740
|
-
isSVG,
|
|
8741
|
-
optimized
|
|
8742
|
-
);
|
|
8743
8866
|
{
|
|
8744
8867
|
popWarningContext();
|
|
8745
8868
|
endMeasure(instance, `mount`);
|
|
@@ -8768,7 +8891,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8768
8891
|
instance.vnode = n2;
|
|
8769
8892
|
}
|
|
8770
8893
|
};
|
|
8771
|
-
const setupRenderEffect = (instance, initialVNode, container, anchor, parentSuspense,
|
|
8894
|
+
const setupRenderEffect = (instance, initialVNode, container, anchor, parentSuspense, namespace, optimized) => {
|
|
8772
8895
|
const componentUpdateFn = () => {
|
|
8773
8896
|
if (!instance.isMounted) {
|
|
8774
8897
|
let vnodeHook;
|
|
@@ -8838,7 +8961,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8838
8961
|
anchor,
|
|
8839
8962
|
instance,
|
|
8840
8963
|
parentSuspense,
|
|
8841
|
-
|
|
8964
|
+
namespace
|
|
8842
8965
|
);
|
|
8843
8966
|
{
|
|
8844
8967
|
endMeasure(instance, `patch`);
|
|
@@ -8877,6 +9000,21 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8877
9000
|
initialVNode = container = anchor = null;
|
|
8878
9001
|
} else {
|
|
8879
9002
|
let { next, bu, u, parent, vnode } = instance;
|
|
9003
|
+
{
|
|
9004
|
+
const nonHydratedAsyncRoot = locateNonHydratedAsyncRoot(instance);
|
|
9005
|
+
if (nonHydratedAsyncRoot) {
|
|
9006
|
+
if (next) {
|
|
9007
|
+
next.el = vnode.el;
|
|
9008
|
+
updateComponentPreRender(instance, next, optimized);
|
|
9009
|
+
}
|
|
9010
|
+
nonHydratedAsyncRoot.asyncDep.then(() => {
|
|
9011
|
+
if (!instance.isUnmounted) {
|
|
9012
|
+
componentUpdateFn();
|
|
9013
|
+
}
|
|
9014
|
+
});
|
|
9015
|
+
return;
|
|
9016
|
+
}
|
|
9017
|
+
}
|
|
8880
9018
|
let originNext = next;
|
|
8881
9019
|
let vnodeHook;
|
|
8882
9020
|
{
|
|
@@ -8920,7 +9058,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8920
9058
|
getNextHostNode(prevTree),
|
|
8921
9059
|
instance,
|
|
8922
9060
|
parentSuspense,
|
|
8923
|
-
|
|
9061
|
+
namespace
|
|
8924
9062
|
);
|
|
8925
9063
|
{
|
|
8926
9064
|
endMeasure(instance, `patch`);
|
|
@@ -8981,10 +9119,10 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8981
9119
|
updateProps(instance, nextVNode.props, prevProps, optimized);
|
|
8982
9120
|
updateSlots(instance, nextVNode.children, optimized);
|
|
8983
9121
|
pauseTracking();
|
|
8984
|
-
flushPreFlushCbs();
|
|
9122
|
+
flushPreFlushCbs(instance);
|
|
8985
9123
|
resetTracking();
|
|
8986
9124
|
};
|
|
8987
|
-
const patchChildren = (n1, n2, container, anchor, parentComponent, parentSuspense,
|
|
9125
|
+
const patchChildren = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized = false) => {
|
|
8988
9126
|
const c1 = n1 && n1.children;
|
|
8989
9127
|
const prevShapeFlag = n1 ? n1.shapeFlag : 0;
|
|
8990
9128
|
const c2 = n2.children;
|
|
@@ -8998,7 +9136,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8998
9136
|
anchor,
|
|
8999
9137
|
parentComponent,
|
|
9000
9138
|
parentSuspense,
|
|
9001
|
-
|
|
9139
|
+
namespace,
|
|
9002
9140
|
slotScopeIds,
|
|
9003
9141
|
optimized
|
|
9004
9142
|
);
|
|
@@ -9011,7 +9149,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
9011
9149
|
anchor,
|
|
9012
9150
|
parentComponent,
|
|
9013
9151
|
parentSuspense,
|
|
9014
|
-
|
|
9152
|
+
namespace,
|
|
9015
9153
|
slotScopeIds,
|
|
9016
9154
|
optimized
|
|
9017
9155
|
);
|
|
@@ -9035,7 +9173,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
9035
9173
|
anchor,
|
|
9036
9174
|
parentComponent,
|
|
9037
9175
|
parentSuspense,
|
|
9038
|
-
|
|
9176
|
+
namespace,
|
|
9039
9177
|
slotScopeIds,
|
|
9040
9178
|
optimized
|
|
9041
9179
|
);
|
|
@@ -9053,7 +9191,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
9053
9191
|
anchor,
|
|
9054
9192
|
parentComponent,
|
|
9055
9193
|
parentSuspense,
|
|
9056
|
-
|
|
9194
|
+
namespace,
|
|
9057
9195
|
slotScopeIds,
|
|
9058
9196
|
optimized
|
|
9059
9197
|
);
|
|
@@ -9061,7 +9199,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
9061
9199
|
}
|
|
9062
9200
|
}
|
|
9063
9201
|
};
|
|
9064
|
-
const patchUnkeyedChildren = (c1, c2, container, anchor, parentComponent, parentSuspense,
|
|
9202
|
+
const patchUnkeyedChildren = (c1, c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
|
|
9065
9203
|
c1 = c1 || EMPTY_ARR;
|
|
9066
9204
|
c2 = c2 || EMPTY_ARR;
|
|
9067
9205
|
const oldLength = c1.length;
|
|
@@ -9077,7 +9215,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
9077
9215
|
null,
|
|
9078
9216
|
parentComponent,
|
|
9079
9217
|
parentSuspense,
|
|
9080
|
-
|
|
9218
|
+
namespace,
|
|
9081
9219
|
slotScopeIds,
|
|
9082
9220
|
optimized
|
|
9083
9221
|
);
|
|
@@ -9098,14 +9236,14 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
9098
9236
|
anchor,
|
|
9099
9237
|
parentComponent,
|
|
9100
9238
|
parentSuspense,
|
|
9101
|
-
|
|
9239
|
+
namespace,
|
|
9102
9240
|
slotScopeIds,
|
|
9103
9241
|
optimized,
|
|
9104
9242
|
commonLength
|
|
9105
9243
|
);
|
|
9106
9244
|
}
|
|
9107
9245
|
};
|
|
9108
|
-
const patchKeyedChildren = (c1, c2, container, parentAnchor, parentComponent, parentSuspense,
|
|
9246
|
+
const patchKeyedChildren = (c1, c2, container, parentAnchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
|
|
9109
9247
|
let i = 0;
|
|
9110
9248
|
const l2 = c2.length;
|
|
9111
9249
|
let e1 = c1.length - 1;
|
|
@@ -9121,7 +9259,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
9121
9259
|
null,
|
|
9122
9260
|
parentComponent,
|
|
9123
9261
|
parentSuspense,
|
|
9124
|
-
|
|
9262
|
+
namespace,
|
|
9125
9263
|
slotScopeIds,
|
|
9126
9264
|
optimized
|
|
9127
9265
|
);
|
|
@@ -9141,7 +9279,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
9141
9279
|
null,
|
|
9142
9280
|
parentComponent,
|
|
9143
9281
|
parentSuspense,
|
|
9144
|
-
|
|
9282
|
+
namespace,
|
|
9145
9283
|
slotScopeIds,
|
|
9146
9284
|
optimized
|
|
9147
9285
|
);
|
|
@@ -9163,7 +9301,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
9163
9301
|
anchor,
|
|
9164
9302
|
parentComponent,
|
|
9165
9303
|
parentSuspense,
|
|
9166
|
-
|
|
9304
|
+
namespace,
|
|
9167
9305
|
slotScopeIds,
|
|
9168
9306
|
optimized
|
|
9169
9307
|
);
|
|
@@ -9233,7 +9371,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
9233
9371
|
null,
|
|
9234
9372
|
parentComponent,
|
|
9235
9373
|
parentSuspense,
|
|
9236
|
-
|
|
9374
|
+
namespace,
|
|
9237
9375
|
slotScopeIds,
|
|
9238
9376
|
optimized
|
|
9239
9377
|
);
|
|
@@ -9254,7 +9392,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
9254
9392
|
anchor,
|
|
9255
9393
|
parentComponent,
|
|
9256
9394
|
parentSuspense,
|
|
9257
|
-
|
|
9395
|
+
namespace,
|
|
9258
9396
|
slotScopeIds,
|
|
9259
9397
|
optimized
|
|
9260
9398
|
);
|
|
@@ -9484,13 +9622,21 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
9484
9622
|
}
|
|
9485
9623
|
return hostNextSibling(vnode.anchor || vnode.el);
|
|
9486
9624
|
};
|
|
9487
|
-
const render = (vnode, container,
|
|
9625
|
+
const render = (vnode, container, namespace) => {
|
|
9488
9626
|
if (vnode == null) {
|
|
9489
9627
|
if (container._vnode) {
|
|
9490
9628
|
unmount(container._vnode, null, null, true);
|
|
9491
9629
|
}
|
|
9492
9630
|
} else {
|
|
9493
|
-
patch(
|
|
9631
|
+
patch(
|
|
9632
|
+
container._vnode || null,
|
|
9633
|
+
vnode,
|
|
9634
|
+
container,
|
|
9635
|
+
null,
|
|
9636
|
+
null,
|
|
9637
|
+
null,
|
|
9638
|
+
namespace
|
|
9639
|
+
);
|
|
9494
9640
|
}
|
|
9495
9641
|
flushPreFlushCbs();
|
|
9496
9642
|
flushPostFlushCbs();
|
|
@@ -9521,6 +9667,9 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
9521
9667
|
createApp: createAppAPI(render, hydrate)
|
|
9522
9668
|
};
|
|
9523
9669
|
}
|
|
9670
|
+
function resolveChildrenNamespace({ type, props }, currentNamespace) {
|
|
9671
|
+
return currentNamespace === "svg" && type === "foreignObject" || currentNamespace === "mathml" && type === "annotation-xml" && props && props.encoding && props.encoding.includes("html") ? void 0 : currentNamespace;
|
|
9672
|
+
}
|
|
9524
9673
|
function toggleRecurse({ effect, update }, allowed) {
|
|
9525
9674
|
effect.allowRecurse = update.allowRecurse = allowed;
|
|
9526
9675
|
}
|
|
@@ -9591,10 +9740,21 @@ function getSequence(arr) {
|
|
|
9591
9740
|
}
|
|
9592
9741
|
return result;
|
|
9593
9742
|
}
|
|
9743
|
+
function locateNonHydratedAsyncRoot(instance) {
|
|
9744
|
+
const subComponent = instance.subTree.component;
|
|
9745
|
+
if (subComponent) {
|
|
9746
|
+
if (subComponent.asyncDep && !subComponent.asyncResolved) {
|
|
9747
|
+
return subComponent;
|
|
9748
|
+
} else {
|
|
9749
|
+
return locateNonHydratedAsyncRoot(subComponent);
|
|
9750
|
+
}
|
|
9751
|
+
}
|
|
9752
|
+
}
|
|
9594
9753
|
|
|
9595
9754
|
const isTeleport = (type) => type.__isTeleport;
|
|
9596
9755
|
const isTeleportDisabled = (props) => props && (props.disabled || props.disabled === "");
|
|
9597
9756
|
const isTargetSVG = (target) => typeof SVGElement !== "undefined" && target instanceof SVGElement;
|
|
9757
|
+
const isTargetMathML = (target) => typeof MathMLElement === "function" && target instanceof MathMLElement;
|
|
9598
9758
|
const resolveTarget = (props, select) => {
|
|
9599
9759
|
const targetSelector = props && props.to;
|
|
9600
9760
|
if (isString(targetSelector)) {
|
|
@@ -9622,7 +9782,7 @@ const resolveTarget = (props, select) => {
|
|
|
9622
9782
|
const TeleportImpl = {
|
|
9623
9783
|
name: "Teleport",
|
|
9624
9784
|
__isTeleport: true,
|
|
9625
|
-
process(n1, n2, container, anchor, parentComponent, parentSuspense,
|
|
9785
|
+
process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, internals) {
|
|
9626
9786
|
const {
|
|
9627
9787
|
mc: mountChildren,
|
|
9628
9788
|
pc: patchChildren,
|
|
@@ -9644,7 +9804,11 @@ const TeleportImpl = {
|
|
|
9644
9804
|
const targetAnchor = n2.targetAnchor = createText("");
|
|
9645
9805
|
if (target) {
|
|
9646
9806
|
insert(targetAnchor, target);
|
|
9647
|
-
|
|
9807
|
+
if (namespace === "svg" || isTargetSVG(target)) {
|
|
9808
|
+
namespace = "svg";
|
|
9809
|
+
} else if (namespace === "mathml" || isTargetMathML(target)) {
|
|
9810
|
+
namespace = "mathml";
|
|
9811
|
+
}
|
|
9648
9812
|
} else if (!disabled) {
|
|
9649
9813
|
warn("Invalid Teleport target on mount:", target, `(${typeof target})`);
|
|
9650
9814
|
}
|
|
@@ -9656,7 +9820,7 @@ const TeleportImpl = {
|
|
|
9656
9820
|
anchor2,
|
|
9657
9821
|
parentComponent,
|
|
9658
9822
|
parentSuspense,
|
|
9659
|
-
|
|
9823
|
+
namespace,
|
|
9660
9824
|
slotScopeIds,
|
|
9661
9825
|
optimized
|
|
9662
9826
|
);
|
|
@@ -9675,7 +9839,11 @@ const TeleportImpl = {
|
|
|
9675
9839
|
const wasDisabled = isTeleportDisabled(n1.props);
|
|
9676
9840
|
const currentContainer = wasDisabled ? container : target;
|
|
9677
9841
|
const currentAnchor = wasDisabled ? mainAnchor : targetAnchor;
|
|
9678
|
-
|
|
9842
|
+
if (namespace === "svg" || isTargetSVG(target)) {
|
|
9843
|
+
namespace = "svg";
|
|
9844
|
+
} else if (namespace === "mathml" || isTargetMathML(target)) {
|
|
9845
|
+
namespace = "mathml";
|
|
9846
|
+
}
|
|
9679
9847
|
if (dynamicChildren) {
|
|
9680
9848
|
patchBlockChildren(
|
|
9681
9849
|
n1.dynamicChildren,
|
|
@@ -9683,7 +9851,7 @@ const TeleportImpl = {
|
|
|
9683
9851
|
currentContainer,
|
|
9684
9852
|
parentComponent,
|
|
9685
9853
|
parentSuspense,
|
|
9686
|
-
|
|
9854
|
+
namespace,
|
|
9687
9855
|
slotScopeIds
|
|
9688
9856
|
);
|
|
9689
9857
|
traverseStaticChildren(n1, n2, true);
|
|
@@ -9695,7 +9863,7 @@ const TeleportImpl = {
|
|
|
9695
9863
|
currentAnchor,
|
|
9696
9864
|
parentComponent,
|
|
9697
9865
|
parentSuspense,
|
|
9698
|
-
|
|
9866
|
+
namespace,
|
|
9699
9867
|
slotScopeIds,
|
|
9700
9868
|
false
|
|
9701
9869
|
);
|
|
@@ -10379,10 +10547,14 @@ function createComponentInstance(vnode, parent, suspense) {
|
|
|
10379
10547
|
let currentInstance = null;
|
|
10380
10548
|
const getCurrentInstance = () => currentInstance || currentRenderingInstance;
|
|
10381
10549
|
let internalSetCurrentInstance;
|
|
10550
|
+
let setInSSRSetupState;
|
|
10382
10551
|
{
|
|
10383
10552
|
internalSetCurrentInstance = (i) => {
|
|
10384
10553
|
currentInstance = i;
|
|
10385
10554
|
};
|
|
10555
|
+
setInSSRSetupState = (v) => {
|
|
10556
|
+
isInSSRComponentSetup = v;
|
|
10557
|
+
};
|
|
10386
10558
|
}
|
|
10387
10559
|
const setCurrentInstance = (instance) => {
|
|
10388
10560
|
internalSetCurrentInstance(instance);
|
|
@@ -10406,13 +10578,13 @@ function isStatefulComponent(instance) {
|
|
|
10406
10578
|
}
|
|
10407
10579
|
let isInSSRComponentSetup = false;
|
|
10408
10580
|
function setupComponent(instance, isSSR = false) {
|
|
10409
|
-
|
|
10581
|
+
isSSR && setInSSRSetupState(isSSR);
|
|
10410
10582
|
const { props, children } = instance.vnode;
|
|
10411
10583
|
const isStateful = isStatefulComponent(instance);
|
|
10412
10584
|
initProps(instance, props, isStateful, isSSR);
|
|
10413
10585
|
initSlots(instance, children);
|
|
10414
10586
|
const setupResult = isStateful ? setupStatefulComponent(instance, isSSR) : void 0;
|
|
10415
|
-
|
|
10587
|
+
isSSR && setInSSRSetupState(false);
|
|
10416
10588
|
return setupResult;
|
|
10417
10589
|
}
|
|
10418
10590
|
function setupStatefulComponent(instance, isSSR) {
|
|
@@ -10936,7 +11108,7 @@ function isMemoSame(cached, memo) {
|
|
|
10936
11108
|
return true;
|
|
10937
11109
|
}
|
|
10938
11110
|
|
|
10939
|
-
const version = "3.4.0-
|
|
11111
|
+
const version = "3.4.0-beta.1";
|
|
10940
11112
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
10941
11113
|
const ssrUtils = null;
|
|
10942
11114
|
const resolveFilter = resolveFilter$1 ;
|
|
@@ -10951,6 +11123,7 @@ const compatUtils = _compatUtils ;
|
|
|
10951
11123
|
const DeprecationTypes = DeprecationTypes$1 ;
|
|
10952
11124
|
|
|
10953
11125
|
const svgNS = "http://www.w3.org/2000/svg";
|
|
11126
|
+
const mathmlNS = "http://www.w3.org/1998/Math/MathML";
|
|
10954
11127
|
const doc = typeof document !== "undefined" ? document : null;
|
|
10955
11128
|
const templateContainer = doc && /* @__PURE__ */ doc.createElement("template");
|
|
10956
11129
|
const nodeOps = {
|
|
@@ -10963,8 +11136,8 @@ const nodeOps = {
|
|
|
10963
11136
|
parent.removeChild(child);
|
|
10964
11137
|
}
|
|
10965
11138
|
},
|
|
10966
|
-
createElement: (tag,
|
|
10967
|
-
const el =
|
|
11139
|
+
createElement: (tag, namespace, is, props) => {
|
|
11140
|
+
const el = namespace === "svg" ? doc.createElementNS(svgNS, tag) : namespace === "mathml" ? doc.createElementNS(mathmlNS, tag) : doc.createElement(tag, is ? { is } : void 0);
|
|
10968
11141
|
if (tag === "select" && props && props.multiple != null) {
|
|
10969
11142
|
el.setAttribute("multiple", props.multiple);
|
|
10970
11143
|
}
|
|
@@ -10988,7 +11161,7 @@ const nodeOps = {
|
|
|
10988
11161
|
// Reason: innerHTML.
|
|
10989
11162
|
// Static content here can only come from compiled templates.
|
|
10990
11163
|
// As long as the user only uses trusted templates, this is safe.
|
|
10991
|
-
insertStaticContent(content, parent, anchor,
|
|
11164
|
+
insertStaticContent(content, parent, anchor, namespace, start, end) {
|
|
10992
11165
|
const before = anchor ? anchor.previousSibling : parent.lastChild;
|
|
10993
11166
|
if (start && (start === end || start.nextSibling)) {
|
|
10994
11167
|
while (true) {
|
|
@@ -10997,9 +11170,9 @@ const nodeOps = {
|
|
|
10997
11170
|
break;
|
|
10998
11171
|
}
|
|
10999
11172
|
} else {
|
|
11000
|
-
templateContainer.innerHTML =
|
|
11173
|
+
templateContainer.innerHTML = namespace === "svg" ? `<svg>${content}</svg>` : namespace === "mathml" ? `<math>${content}</math>` : content;
|
|
11001
11174
|
const template = templateContainer.content;
|
|
11002
|
-
if (
|
|
11175
|
+
if (namespace === "svg" || namespace === "mathml") {
|
|
11003
11176
|
const wrapper = template.firstChild;
|
|
11004
11177
|
while (wrapper.firstChild) {
|
|
11005
11178
|
template.appendChild(wrapper.firstChild);
|
|
@@ -11639,7 +11812,8 @@ function patchStopImmediatePropagation(e, value) {
|
|
|
11639
11812
|
|
|
11640
11813
|
const isNativeOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // lowercase letter
|
|
11641
11814
|
key.charCodeAt(2) > 96 && key.charCodeAt(2) < 123;
|
|
11642
|
-
const patchProp = (el, key, prevValue, nextValue,
|
|
11815
|
+
const patchProp = (el, key, prevValue, nextValue, namespace, prevChildren, parentComponent, parentSuspense, unmountChildren) => {
|
|
11816
|
+
const isSVG = namespace === "svg";
|
|
11643
11817
|
if (key === "class") {
|
|
11644
11818
|
patchClass(el, nextValue, isSVG);
|
|
11645
11819
|
} else if (key === "style") {
|
|
@@ -11691,7 +11865,9 @@ function shouldSetAsProp(el, key, value, isSVG) {
|
|
|
11691
11865
|
}
|
|
11692
11866
|
if (key === "width" || key === "height") {
|
|
11693
11867
|
const tag = el.tagName;
|
|
11694
|
-
|
|
11868
|
+
if (tag === "IMG" || tag === "VIDEO" || tag === "CANVAS" || tag === "SOURCE") {
|
|
11869
|
+
return false;
|
|
11870
|
+
}
|
|
11695
11871
|
}
|
|
11696
11872
|
if (isNativeOn(key) && isString(value)) {
|
|
11697
11873
|
return false;
|
|
@@ -12494,7 +12670,7 @@ const createApp = (...args) => {
|
|
|
12494
12670
|
}
|
|
12495
12671
|
}
|
|
12496
12672
|
container.innerHTML = "";
|
|
12497
|
-
const proxy = mount(container, false, container
|
|
12673
|
+
const proxy = mount(container, false, resolveRootNamespace(container));
|
|
12498
12674
|
if (container instanceof Element) {
|
|
12499
12675
|
container.removeAttribute("v-cloak");
|
|
12500
12676
|
container.setAttribute("data-v-app", "");
|
|
@@ -12513,14 +12689,22 @@ const createSSRApp = (...args) => {
|
|
|
12513
12689
|
app.mount = (containerOrSelector) => {
|
|
12514
12690
|
const container = normalizeContainer(containerOrSelector);
|
|
12515
12691
|
if (container) {
|
|
12516
|
-
return mount(container, true, container
|
|
12692
|
+
return mount(container, true, resolveRootNamespace(container));
|
|
12517
12693
|
}
|
|
12518
12694
|
};
|
|
12519
12695
|
return app;
|
|
12520
12696
|
};
|
|
12697
|
+
function resolveRootNamespace(container) {
|
|
12698
|
+
if (container instanceof SVGElement) {
|
|
12699
|
+
return "svg";
|
|
12700
|
+
}
|
|
12701
|
+
if (typeof MathMLElement === "function" && container instanceof MathMLElement) {
|
|
12702
|
+
return "mathml";
|
|
12703
|
+
}
|
|
12704
|
+
}
|
|
12521
12705
|
function injectNativeTagCheck(app) {
|
|
12522
12706
|
Object.defineProperty(app.config, "isNativeTag", {
|
|
12523
|
-
value: (tag) => isHTMLTag(tag) || isSVGTag(tag),
|
|
12707
|
+
value: (tag) => isHTMLTag(tag) || isSVGTag(tag) || isMathMLTag(tag),
|
|
12524
12708
|
writable: false
|
|
12525
12709
|
});
|
|
12526
12710
|
}
|