@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
|
@@ -130,6 +130,20 @@ var Vue = (function () {
|
|
|
130
130
|
});
|
|
131
131
|
return ret;
|
|
132
132
|
}
|
|
133
|
+
function stringifyStyle(styles) {
|
|
134
|
+
let ret = "";
|
|
135
|
+
if (!styles || isString(styles)) {
|
|
136
|
+
return ret;
|
|
137
|
+
}
|
|
138
|
+
for (const key in styles) {
|
|
139
|
+
const value = styles[key];
|
|
140
|
+
const normalizedKey = key.startsWith(`--`) ? key : hyphenate(key);
|
|
141
|
+
if (isString(value) || typeof value === "number") {
|
|
142
|
+
ret += `${normalizedKey}:${value};`;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
return ret;
|
|
146
|
+
}
|
|
133
147
|
function normalizeClass(value) {
|
|
134
148
|
let res = "";
|
|
135
149
|
if (isString(value)) {
|
|
@@ -165,14 +179,25 @@ var Vue = (function () {
|
|
|
165
179
|
|
|
166
180
|
const HTML_TAGS = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot";
|
|
167
181
|
const SVG_TAGS = "svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view";
|
|
182
|
+
const MATH_TAGS = "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";
|
|
168
183
|
const isHTMLTag = /* @__PURE__ */ makeMap(HTML_TAGS);
|
|
169
184
|
const isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS);
|
|
185
|
+
const isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS);
|
|
170
186
|
|
|
171
187
|
const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;
|
|
172
188
|
const isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs);
|
|
189
|
+
const isBooleanAttr = /* @__PURE__ */ makeMap(
|
|
190
|
+
specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected`
|
|
191
|
+
);
|
|
173
192
|
function includeBooleanAttr(value) {
|
|
174
193
|
return !!value || value === "";
|
|
175
194
|
}
|
|
195
|
+
const isKnownHtmlAttr = /* @__PURE__ */ makeMap(
|
|
196
|
+
`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`
|
|
197
|
+
);
|
|
198
|
+
const isKnownSvgAttr = /* @__PURE__ */ makeMap(
|
|
199
|
+
`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`
|
|
200
|
+
);
|
|
176
201
|
|
|
177
202
|
function looseCompareArrays(a, b) {
|
|
178
203
|
if (a.length !== b.length)
|
|
@@ -234,20 +259,29 @@ var Vue = (function () {
|
|
|
234
259
|
return replacer(_key, val.value);
|
|
235
260
|
} else if (isMap(val)) {
|
|
236
261
|
return {
|
|
237
|
-
[`Map(${val.size})`]: [...val.entries()].reduce(
|
|
238
|
-
entries[
|
|
239
|
-
|
|
240
|
-
|
|
262
|
+
[`Map(${val.size})`]: [...val.entries()].reduce(
|
|
263
|
+
(entries, [key, val2], i) => {
|
|
264
|
+
entries[stringifySymbol(key, i) + " =>"] = val2;
|
|
265
|
+
return entries;
|
|
266
|
+
},
|
|
267
|
+
{}
|
|
268
|
+
)
|
|
241
269
|
};
|
|
242
270
|
} else if (isSet(val)) {
|
|
243
271
|
return {
|
|
244
|
-
[`Set(${val.size})`]: [...val.values()]
|
|
272
|
+
[`Set(${val.size})`]: [...val.values()].map((v) => stringifySymbol(v))
|
|
245
273
|
};
|
|
274
|
+
} else if (isSymbol(val)) {
|
|
275
|
+
return stringifySymbol(val);
|
|
246
276
|
} else if (isObject(val) && !isArray(val) && !isPlainObject(val)) {
|
|
247
277
|
return String(val);
|
|
248
278
|
}
|
|
249
279
|
return val;
|
|
250
280
|
};
|
|
281
|
+
const stringifySymbol = (v, i = "") => {
|
|
282
|
+
var _a;
|
|
283
|
+
return isSymbol(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v;
|
|
284
|
+
};
|
|
251
285
|
|
|
252
286
|
function warn$1(msg, ...args) {
|
|
253
287
|
console.warn(`[Vue warn] ${msg}`, ...args);
|
|
@@ -696,8 +730,13 @@ var Vue = (function () {
|
|
|
696
730
|
return isReadonly2;
|
|
697
731
|
} else if (key === "__v_isShallow") {
|
|
698
732
|
return shallow;
|
|
699
|
-
} else if (key === "__v_raw"
|
|
700
|
-
|
|
733
|
+
} else if (key === "__v_raw") {
|
|
734
|
+
if (receiver === (isReadonly2 ? shallow ? shallowReadonlyMap : readonlyMap : shallow ? shallowReactiveMap : reactiveMap).get(target) || // receiver is not the reactive proxy, but has the same prototype
|
|
735
|
+
// this means the reciever is a user proxy of the reactive proxy
|
|
736
|
+
Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) {
|
|
737
|
+
return target;
|
|
738
|
+
}
|
|
739
|
+
return;
|
|
701
740
|
}
|
|
702
741
|
const targetIsArray = isArray(target);
|
|
703
742
|
if (!isReadonly2) {
|
|
@@ -733,17 +772,19 @@ var Vue = (function () {
|
|
|
733
772
|
}
|
|
734
773
|
set(target, key, value, receiver) {
|
|
735
774
|
let oldValue = target[key];
|
|
736
|
-
if (isReadonly(oldValue) && isRef(oldValue) && !isRef(value)) {
|
|
737
|
-
return false;
|
|
738
|
-
}
|
|
739
775
|
if (!this._shallow) {
|
|
776
|
+
const isOldValueReadonly = isReadonly(oldValue);
|
|
740
777
|
if (!isShallow(value) && !isReadonly(value)) {
|
|
741
778
|
oldValue = toRaw(oldValue);
|
|
742
779
|
value = toRaw(value);
|
|
743
780
|
}
|
|
744
781
|
if (!isArray(target) && isRef(oldValue) && !isRef(value)) {
|
|
745
|
-
|
|
746
|
-
|
|
782
|
+
if (isOldValueReadonly) {
|
|
783
|
+
return false;
|
|
784
|
+
} else {
|
|
785
|
+
oldValue.value = value;
|
|
786
|
+
return true;
|
|
787
|
+
}
|
|
747
788
|
}
|
|
748
789
|
}
|
|
749
790
|
const hadKey = isArray(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn(target, key);
|
|
@@ -1765,13 +1806,16 @@ var Vue = (function () {
|
|
|
1765
1806
|
}
|
|
1766
1807
|
queueFlush();
|
|
1767
1808
|
}
|
|
1768
|
-
function flushPreFlushCbs(seen, i = isFlushing ? flushIndex + 1 : 0) {
|
|
1809
|
+
function flushPreFlushCbs(instance, seen, i = isFlushing ? flushIndex + 1 : 0) {
|
|
1769
1810
|
{
|
|
1770
1811
|
seen = seen || /* @__PURE__ */ new Map();
|
|
1771
1812
|
}
|
|
1772
1813
|
for (; i < queue.length; i++) {
|
|
1773
1814
|
const cb = queue[i];
|
|
1774
1815
|
if (cb && cb.pre) {
|
|
1816
|
+
if (instance && cb.id !== instance.uid) {
|
|
1817
|
+
continue;
|
|
1818
|
+
}
|
|
1775
1819
|
if (checkRecursiveUpdates(seen, cb)) {
|
|
1776
1820
|
continue;
|
|
1777
1821
|
}
|
|
@@ -3048,9 +3092,17 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
3048
3092
|
return false;
|
|
3049
3093
|
}
|
|
3050
3094
|
function updateHOCHostEl({ vnode, parent }, el) {
|
|
3051
|
-
while (parent
|
|
3052
|
-
|
|
3053
|
-
|
|
3095
|
+
while (parent) {
|
|
3096
|
+
const root = parent.subTree;
|
|
3097
|
+
if (root.suspense && root.suspense.activeBranch === vnode) {
|
|
3098
|
+
root.el = vnode.el;
|
|
3099
|
+
}
|
|
3100
|
+
if (root === vnode) {
|
|
3101
|
+
(vnode = parent.vnode).el = el;
|
|
3102
|
+
parent = parent.parent;
|
|
3103
|
+
} else {
|
|
3104
|
+
break;
|
|
3105
|
+
}
|
|
3054
3106
|
}
|
|
3055
3107
|
}
|
|
3056
3108
|
|
|
@@ -3114,6 +3166,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
3114
3166
|
}
|
|
3115
3167
|
|
|
3116
3168
|
const isSuspense = (type) => type.__isSuspense;
|
|
3169
|
+
let suspenseId = 0;
|
|
3117
3170
|
const SuspenseImpl = {
|
|
3118
3171
|
name: "Suspense",
|
|
3119
3172
|
// In order to make Suspense tree-shakable, we need to avoid importing it
|
|
@@ -3121,7 +3174,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
3121
3174
|
// on a vnode's type and calls the `process` method, passing in renderer
|
|
3122
3175
|
// internals.
|
|
3123
3176
|
__isSuspense: true,
|
|
3124
|
-
process(n1, n2, container, anchor, parentComponent, parentSuspense,
|
|
3177
|
+
process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) {
|
|
3125
3178
|
if (n1 == null) {
|
|
3126
3179
|
mountSuspense(
|
|
3127
3180
|
n2,
|
|
@@ -3129,7 +3182,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
3129
3182
|
anchor,
|
|
3130
3183
|
parentComponent,
|
|
3131
3184
|
parentSuspense,
|
|
3132
|
-
|
|
3185
|
+
namespace,
|
|
3133
3186
|
slotScopeIds,
|
|
3134
3187
|
optimized,
|
|
3135
3188
|
rendererInternals
|
|
@@ -3141,7 +3194,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
3141
3194
|
container,
|
|
3142
3195
|
anchor,
|
|
3143
3196
|
parentComponent,
|
|
3144
|
-
|
|
3197
|
+
namespace,
|
|
3145
3198
|
slotScopeIds,
|
|
3146
3199
|
optimized,
|
|
3147
3200
|
rendererInternals
|
|
@@ -3159,7 +3212,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
3159
3212
|
eventListener();
|
|
3160
3213
|
}
|
|
3161
3214
|
}
|
|
3162
|
-
function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense,
|
|
3215
|
+
function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) {
|
|
3163
3216
|
const {
|
|
3164
3217
|
p: patch,
|
|
3165
3218
|
o: { createElement }
|
|
@@ -3172,7 +3225,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
3172
3225
|
container,
|
|
3173
3226
|
hiddenContainer,
|
|
3174
3227
|
anchor,
|
|
3175
|
-
|
|
3228
|
+
namespace,
|
|
3176
3229
|
slotScopeIds,
|
|
3177
3230
|
optimized,
|
|
3178
3231
|
rendererInternals
|
|
@@ -3184,7 +3237,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
3184
3237
|
null,
|
|
3185
3238
|
parentComponent,
|
|
3186
3239
|
suspense,
|
|
3187
|
-
|
|
3240
|
+
namespace,
|
|
3188
3241
|
slotScopeIds
|
|
3189
3242
|
);
|
|
3190
3243
|
if (suspense.deps > 0) {
|
|
@@ -3198,7 +3251,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
3198
3251
|
parentComponent,
|
|
3199
3252
|
null,
|
|
3200
3253
|
// fallback tree will not have suspense context
|
|
3201
|
-
|
|
3254
|
+
namespace,
|
|
3202
3255
|
slotScopeIds
|
|
3203
3256
|
);
|
|
3204
3257
|
setActiveBranch(suspense, vnode.ssFallback);
|
|
@@ -3206,7 +3259,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
3206
3259
|
suspense.resolve(false, true);
|
|
3207
3260
|
}
|
|
3208
3261
|
}
|
|
3209
|
-
function patchSuspense(n1, n2, container, anchor, parentComponent,
|
|
3262
|
+
function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, slotScopeIds, optimized, { p: patch, um: unmount, o: { createElement } }) {
|
|
3210
3263
|
const suspense = n2.suspense = n1.suspense;
|
|
3211
3264
|
suspense.vnode = n2;
|
|
3212
3265
|
n2.el = n1.el;
|
|
@@ -3223,29 +3276,31 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
3223
3276
|
null,
|
|
3224
3277
|
parentComponent,
|
|
3225
3278
|
suspense,
|
|
3226
|
-
|
|
3279
|
+
namespace,
|
|
3227
3280
|
slotScopeIds,
|
|
3228
3281
|
optimized
|
|
3229
3282
|
);
|
|
3230
3283
|
if (suspense.deps <= 0) {
|
|
3231
3284
|
suspense.resolve();
|
|
3232
3285
|
} else if (isInFallback) {
|
|
3233
|
-
|
|
3234
|
-
|
|
3235
|
-
|
|
3236
|
-
|
|
3237
|
-
|
|
3238
|
-
|
|
3239
|
-
|
|
3240
|
-
|
|
3241
|
-
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
|
|
3245
|
-
|
|
3286
|
+
if (!isHydrating) {
|
|
3287
|
+
patch(
|
|
3288
|
+
activeBranch,
|
|
3289
|
+
newFallback,
|
|
3290
|
+
container,
|
|
3291
|
+
anchor,
|
|
3292
|
+
parentComponent,
|
|
3293
|
+
null,
|
|
3294
|
+
// fallback tree will not have suspense context
|
|
3295
|
+
namespace,
|
|
3296
|
+
slotScopeIds,
|
|
3297
|
+
optimized
|
|
3298
|
+
);
|
|
3299
|
+
setActiveBranch(suspense, newFallback);
|
|
3300
|
+
}
|
|
3246
3301
|
}
|
|
3247
3302
|
} else {
|
|
3248
|
-
suspense.pendingId++;
|
|
3303
|
+
suspense.pendingId = suspenseId++;
|
|
3249
3304
|
if (isHydrating) {
|
|
3250
3305
|
suspense.isHydrating = false;
|
|
3251
3306
|
suspense.activeBranch = pendingBranch;
|
|
@@ -3263,7 +3318,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
3263
3318
|
null,
|
|
3264
3319
|
parentComponent,
|
|
3265
3320
|
suspense,
|
|
3266
|
-
|
|
3321
|
+
namespace,
|
|
3267
3322
|
slotScopeIds,
|
|
3268
3323
|
optimized
|
|
3269
3324
|
);
|
|
@@ -3278,7 +3333,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
3278
3333
|
parentComponent,
|
|
3279
3334
|
null,
|
|
3280
3335
|
// fallback tree will not have suspense context
|
|
3281
|
-
|
|
3336
|
+
namespace,
|
|
3282
3337
|
slotScopeIds,
|
|
3283
3338
|
optimized
|
|
3284
3339
|
);
|
|
@@ -3292,7 +3347,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
3292
3347
|
anchor,
|
|
3293
3348
|
parentComponent,
|
|
3294
3349
|
suspense,
|
|
3295
|
-
|
|
3350
|
+
namespace,
|
|
3296
3351
|
slotScopeIds,
|
|
3297
3352
|
optimized
|
|
3298
3353
|
);
|
|
@@ -3305,7 +3360,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
3305
3360
|
null,
|
|
3306
3361
|
parentComponent,
|
|
3307
3362
|
suspense,
|
|
3308
|
-
|
|
3363
|
+
namespace,
|
|
3309
3364
|
slotScopeIds,
|
|
3310
3365
|
optimized
|
|
3311
3366
|
);
|
|
@@ -3323,7 +3378,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
3323
3378
|
anchor,
|
|
3324
3379
|
parentComponent,
|
|
3325
3380
|
suspense,
|
|
3326
|
-
|
|
3381
|
+
namespace,
|
|
3327
3382
|
slotScopeIds,
|
|
3328
3383
|
optimized
|
|
3329
3384
|
);
|
|
@@ -3331,7 +3386,11 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
3331
3386
|
} else {
|
|
3332
3387
|
triggerEvent(n2, "onPending");
|
|
3333
3388
|
suspense.pendingBranch = newBranch;
|
|
3334
|
-
|
|
3389
|
+
if (newBranch.shapeFlag & 512) {
|
|
3390
|
+
suspense.pendingId = newBranch.component.suspenseId;
|
|
3391
|
+
} else {
|
|
3392
|
+
suspense.pendingId = suspenseId++;
|
|
3393
|
+
}
|
|
3335
3394
|
patch(
|
|
3336
3395
|
null,
|
|
3337
3396
|
newBranch,
|
|
@@ -3339,7 +3398,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
3339
3398
|
null,
|
|
3340
3399
|
parentComponent,
|
|
3341
3400
|
suspense,
|
|
3342
|
-
|
|
3401
|
+
namespace,
|
|
3343
3402
|
slotScopeIds,
|
|
3344
3403
|
optimized
|
|
3345
3404
|
);
|
|
@@ -3361,7 +3420,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
3361
3420
|
}
|
|
3362
3421
|
}
|
|
3363
3422
|
let hasWarned = false;
|
|
3364
|
-
function createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor,
|
|
3423
|
+
function createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, namespace, slotScopeIds, optimized, rendererInternals, isHydrating = false) {
|
|
3365
3424
|
if (!hasWarned) {
|
|
3366
3425
|
hasWarned = true;
|
|
3367
3426
|
console[console.info ? "info" : "log"](
|
|
@@ -3391,7 +3450,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
3391
3450
|
vnode,
|
|
3392
3451
|
parent: parentSuspense,
|
|
3393
3452
|
parentComponent,
|
|
3394
|
-
|
|
3453
|
+
namespace,
|
|
3395
3454
|
container,
|
|
3396
3455
|
hiddenContainer,
|
|
3397
3456
|
anchor,
|
|
@@ -3400,7 +3459,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
3400
3459
|
timeout: typeof timeout === "number" ? timeout : -1,
|
|
3401
3460
|
activeBranch: null,
|
|
3402
3461
|
pendingBranch: null,
|
|
3403
|
-
isInFallback:
|
|
3462
|
+
isInFallback: !isHydrating,
|
|
3404
3463
|
isHydrating,
|
|
3405
3464
|
isUnmounted: false,
|
|
3406
3465
|
effects: [],
|
|
@@ -3484,8 +3543,9 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
3484
3543
|
if (!suspense.pendingBranch) {
|
|
3485
3544
|
return;
|
|
3486
3545
|
}
|
|
3487
|
-
const { vnode: vnode2, activeBranch, parentComponent: parentComponent2, container: container2,
|
|
3546
|
+
const { vnode: vnode2, activeBranch, parentComponent: parentComponent2, container: container2, namespace: namespace2 } = suspense;
|
|
3488
3547
|
triggerEvent(vnode2, "onFallback");
|
|
3548
|
+
const anchor2 = next(activeBranch);
|
|
3489
3549
|
const mountFallback = () => {
|
|
3490
3550
|
if (!suspense.isInFallback) {
|
|
3491
3551
|
return;
|
|
@@ -3494,11 +3554,11 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
3494
3554
|
null,
|
|
3495
3555
|
fallbackVNode,
|
|
3496
3556
|
container2,
|
|
3497
|
-
|
|
3557
|
+
anchor2,
|
|
3498
3558
|
parentComponent2,
|
|
3499
3559
|
null,
|
|
3500
3560
|
// fallback tree will not have suspense context
|
|
3501
|
-
|
|
3561
|
+
namespace2,
|
|
3502
3562
|
slotScopeIds,
|
|
3503
3563
|
optimized
|
|
3504
3564
|
);
|
|
@@ -3561,7 +3621,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
3561
3621
|
// consider the comment placeholder case.
|
|
3562
3622
|
hydratedEl ? null : next(instance.subTree),
|
|
3563
3623
|
suspense,
|
|
3564
|
-
|
|
3624
|
+
namespace,
|
|
3565
3625
|
optimized
|
|
3566
3626
|
);
|
|
3567
3627
|
if (placeholder) {
|
|
@@ -3598,7 +3658,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
3598
3658
|
};
|
|
3599
3659
|
return suspense;
|
|
3600
3660
|
}
|
|
3601
|
-
function hydrateSuspense(node, vnode, parentComponent, parentSuspense,
|
|
3661
|
+
function hydrateSuspense(node, vnode, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals, hydrateNode) {
|
|
3602
3662
|
const suspense = vnode.suspense = createSuspenseBoundary(
|
|
3603
3663
|
vnode,
|
|
3604
3664
|
parentSuspense,
|
|
@@ -3606,7 +3666,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
3606
3666
|
node.parentNode,
|
|
3607
3667
|
document.createElement("div"),
|
|
3608
3668
|
null,
|
|
3609
|
-
|
|
3669
|
+
namespace,
|
|
3610
3670
|
slotScopeIds,
|
|
3611
3671
|
optimized,
|
|
3612
3672
|
rendererInternals,
|
|
@@ -4548,7 +4608,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
4548
4608
|
}
|
|
4549
4609
|
} = sharedContext;
|
|
4550
4610
|
const storageContainer = createElement("div");
|
|
4551
|
-
sharedContext.activate = (vnode, container, anchor,
|
|
4611
|
+
sharedContext.activate = (vnode, container, anchor, namespace, optimized) => {
|
|
4552
4612
|
const instance2 = vnode.component;
|
|
4553
4613
|
move(vnode, container, anchor, 0, parentSuspense);
|
|
4554
4614
|
patch(
|
|
@@ -4558,7 +4618,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
4558
4618
|
anchor,
|
|
4559
4619
|
instance2,
|
|
4560
4620
|
parentSuspense,
|
|
4561
|
-
|
|
4621
|
+
namespace,
|
|
4562
4622
|
vnode.slotScopeIds,
|
|
4563
4623
|
optimized
|
|
4564
4624
|
);
|
|
@@ -5746,7 +5806,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
5746
5806
|
function useAttrs() {
|
|
5747
5807
|
return getContext().attrs;
|
|
5748
5808
|
}
|
|
5749
|
-
function useModel(props, name
|
|
5809
|
+
function useModel(props, name) {
|
|
5750
5810
|
const i = getCurrentInstance();
|
|
5751
5811
|
if (!i) {
|
|
5752
5812
|
warn(`useModel() called without active instance.`);
|
|
@@ -5756,29 +5816,24 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
5756
5816
|
warn(`useModel() called with prop "${name}" which is not declared.`);
|
|
5757
5817
|
return ref();
|
|
5758
5818
|
}
|
|
5759
|
-
|
|
5760
|
-
|
|
5761
|
-
|
|
5762
|
-
|
|
5763
|
-
|
|
5764
|
-
)
|
|
5765
|
-
|
|
5766
|
-
|
|
5767
|
-
|
|
5768
|
-
|
|
5769
|
-
|
|
5770
|
-
|
|
5771
|
-
|
|
5772
|
-
|
|
5773
|
-
__v_isRef: true,
|
|
5774
|
-
get value() {
|
|
5775
|
-
return props[name];
|
|
5776
|
-
},
|
|
5777
|
-
set value(value) {
|
|
5778
|
-
i.emit(`update:${name}`, value);
|
|
5819
|
+
let localValue;
|
|
5820
|
+
watchSyncEffect(() => {
|
|
5821
|
+
localValue = props[name];
|
|
5822
|
+
});
|
|
5823
|
+
return customRef((track, trigger) => ({
|
|
5824
|
+
get() {
|
|
5825
|
+
track();
|
|
5826
|
+
return localValue;
|
|
5827
|
+
},
|
|
5828
|
+
set(value) {
|
|
5829
|
+
const rawProps = i.vnode.props;
|
|
5830
|
+
if (!(rawProps && name in rawProps) && hasChanged(value, localValue)) {
|
|
5831
|
+
localValue = value;
|
|
5832
|
+
trigger();
|
|
5779
5833
|
}
|
|
5780
|
-
|
|
5781
|
-
|
|
5834
|
+
i.emit(`update:${name}`, value);
|
|
5835
|
+
}
|
|
5836
|
+
}));
|
|
5782
5837
|
}
|
|
5783
5838
|
function getContext() {
|
|
5784
5839
|
const i = getCurrentInstance();
|
|
@@ -6352,7 +6407,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
6352
6407
|
return vm;
|
|
6353
6408
|
}
|
|
6354
6409
|
}
|
|
6355
|
-
Vue.version = `2.6.14-compat:${"3.4.0-
|
|
6410
|
+
Vue.version = `2.6.14-compat:${"3.4.0-beta.1"}`;
|
|
6356
6411
|
Vue.config = singletonApp.config;
|
|
6357
6412
|
Vue.use = (p, ...options) => {
|
|
6358
6413
|
if (p && isFunction(p.install)) {
|
|
@@ -6597,12 +6652,16 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
6597
6652
|
} else {
|
|
6598
6653
|
container = selectorOrEl || document.createElement("div");
|
|
6599
6654
|
}
|
|
6600
|
-
|
|
6655
|
+
let namespace;
|
|
6656
|
+
if (container instanceof SVGElement)
|
|
6657
|
+
namespace = "svg";
|
|
6658
|
+
else if (typeof MathMLElement === "function" && container instanceof MathMLElement)
|
|
6659
|
+
namespace = "mathml";
|
|
6601
6660
|
{
|
|
6602
6661
|
context.reload = () => {
|
|
6603
6662
|
const cloned = cloneVNode(vnode);
|
|
6604
6663
|
cloned.component = null;
|
|
6605
|
-
render(cloned, container,
|
|
6664
|
+
render(cloned, container, namespace);
|
|
6606
6665
|
};
|
|
6607
6666
|
}
|
|
6608
6667
|
if (hasNoRender && instance.render === emptyRender) {
|
|
@@ -6625,7 +6684,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
6625
6684
|
);
|
|
6626
6685
|
}
|
|
6627
6686
|
container.innerHTML = "";
|
|
6628
|
-
render(vnode, container,
|
|
6687
|
+
render(vnode, container, namespace);
|
|
6629
6688
|
if (container instanceof Element) {
|
|
6630
6689
|
container.removeAttribute("v-cloak");
|
|
6631
6690
|
container.setAttribute("data-v-app", "");
|
|
@@ -6827,7 +6886,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
6827
6886
|
context.directives[name] = directive;
|
|
6828
6887
|
return app;
|
|
6829
6888
|
},
|
|
6830
|
-
mount(rootContainer, isHydrate,
|
|
6889
|
+
mount(rootContainer, isHydrate, namespace) {
|
|
6831
6890
|
if (!isMounted) {
|
|
6832
6891
|
if (rootContainer.__vue_app__) {
|
|
6833
6892
|
warn(
|
|
@@ -6837,15 +6896,24 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
6837
6896
|
}
|
|
6838
6897
|
const vnode = createVNode(rootComponent, rootProps);
|
|
6839
6898
|
vnode.appContext = context;
|
|
6899
|
+
if (namespace === true) {
|
|
6900
|
+
namespace = "svg";
|
|
6901
|
+
} else if (namespace === false) {
|
|
6902
|
+
namespace = void 0;
|
|
6903
|
+
}
|
|
6840
6904
|
{
|
|
6841
6905
|
context.reload = () => {
|
|
6842
|
-
render(
|
|
6906
|
+
render(
|
|
6907
|
+
cloneVNode(vnode),
|
|
6908
|
+
rootContainer,
|
|
6909
|
+
namespace
|
|
6910
|
+
);
|
|
6843
6911
|
};
|
|
6844
6912
|
}
|
|
6845
6913
|
if (isHydrate && hydrate) {
|
|
6846
6914
|
hydrate(vnode, rootContainer);
|
|
6847
6915
|
} else {
|
|
6848
|
-
render(vnode, rootContainer,
|
|
6916
|
+
render(vnode, rootContainer, namespace);
|
|
6849
6917
|
}
|
|
6850
6918
|
isMounted = true;
|
|
6851
6919
|
app._container = rootContainer;
|
|
@@ -7310,11 +7378,12 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
7310
7378
|
key,
|
|
7311
7379
|
resolvedValues[key],
|
|
7312
7380
|
opt,
|
|
7381
|
+
shallowReadonly(resolvedValues) ,
|
|
7313
7382
|
!hasOwn(rawProps, key) && !hasOwn(rawProps, hyphenate(key))
|
|
7314
7383
|
);
|
|
7315
7384
|
}
|
|
7316
7385
|
}
|
|
7317
|
-
function validateProp(name, value, prop, isAbsent) {
|
|
7386
|
+
function validateProp(name, value, prop, props, isAbsent) {
|
|
7318
7387
|
const { type, required, validator, skipCheck } = prop;
|
|
7319
7388
|
if (required && isAbsent) {
|
|
7320
7389
|
warn('Missing required prop: "' + name + '"');
|
|
@@ -7337,7 +7406,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
7337
7406
|
return;
|
|
7338
7407
|
}
|
|
7339
7408
|
}
|
|
7340
|
-
if (validator && !validator(value)) {
|
|
7409
|
+
if (validator && !validator(value, props)) {
|
|
7341
7410
|
warn('Invalid prop: custom validator check failed for prop "' + name + '".');
|
|
7342
7411
|
}
|
|
7343
7412
|
}
|
|
@@ -7595,7 +7664,15 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
7595
7664
|
}
|
|
7596
7665
|
|
|
7597
7666
|
let hasMismatch = false;
|
|
7598
|
-
const isSVGContainer = (container) =>
|
|
7667
|
+
const isSVGContainer = (container) => container.namespaceURI.includes("svg") && container.tagName !== "foreignObject";
|
|
7668
|
+
const isMathMLContainer = (container) => container.namespaceURI.includes("MathML");
|
|
7669
|
+
const getContainerType = (container) => {
|
|
7670
|
+
if (isSVGContainer(container))
|
|
7671
|
+
return "svg";
|
|
7672
|
+
if (isMathMLContainer(container))
|
|
7673
|
+
return "mathml";
|
|
7674
|
+
return void 0;
|
|
7675
|
+
};
|
|
7599
7676
|
const isComment = (node) => node.nodeType === 8 /* COMMENT */;
|
|
7600
7677
|
function createHydrationFunctions(rendererInternals) {
|
|
7601
7678
|
const {
|
|
@@ -7674,11 +7751,13 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
7674
7751
|
if (node.data !== vnode.children) {
|
|
7675
7752
|
hasMismatch = true;
|
|
7676
7753
|
warn(
|
|
7677
|
-
`Hydration text mismatch
|
|
7678
|
-
|
|
7754
|
+
`Hydration text mismatch in`,
|
|
7755
|
+
node.parentNode,
|
|
7756
|
+
`
|
|
7757
|
+
- rendered on server: ${JSON.stringify(
|
|
7679
7758
|
node.data
|
|
7680
7759
|
)}
|
|
7681
|
-
-
|
|
7760
|
+
- expected on client: ${JSON.stringify(vnode.children)}`
|
|
7682
7761
|
);
|
|
7683
7762
|
node.data = vnode.children;
|
|
7684
7763
|
}
|
|
@@ -7764,7 +7843,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
7764
7843
|
null,
|
|
7765
7844
|
parentComponent,
|
|
7766
7845
|
parentSuspense,
|
|
7767
|
-
|
|
7846
|
+
getContainerType(container),
|
|
7768
7847
|
optimized
|
|
7769
7848
|
);
|
|
7770
7849
|
if (isAsyncWrapper(vnode)) {
|
|
@@ -7799,7 +7878,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
7799
7878
|
vnode,
|
|
7800
7879
|
parentComponent,
|
|
7801
7880
|
parentSuspense,
|
|
7802
|
-
|
|
7881
|
+
getContainerType(parentNode(node)),
|
|
7803
7882
|
slotScopeIds,
|
|
7804
7883
|
optimized,
|
|
7805
7884
|
rendererInternals,
|
|
@@ -7822,38 +7901,6 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
7822
7901
|
if (dirs) {
|
|
7823
7902
|
invokeDirectiveHook(vnode, null, parentComponent, "created");
|
|
7824
7903
|
}
|
|
7825
|
-
if (props) {
|
|
7826
|
-
if (forcePatch || !optimized || patchFlag & (16 | 32)) {
|
|
7827
|
-
for (const key in props) {
|
|
7828
|
-
if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers
|
|
7829
|
-
key[0] === ".") {
|
|
7830
|
-
patchProp(
|
|
7831
|
-
el,
|
|
7832
|
-
key,
|
|
7833
|
-
null,
|
|
7834
|
-
props[key],
|
|
7835
|
-
false,
|
|
7836
|
-
void 0,
|
|
7837
|
-
parentComponent
|
|
7838
|
-
);
|
|
7839
|
-
}
|
|
7840
|
-
}
|
|
7841
|
-
} else if (props.onClick) {
|
|
7842
|
-
patchProp(
|
|
7843
|
-
el,
|
|
7844
|
-
"onClick",
|
|
7845
|
-
null,
|
|
7846
|
-
props.onClick,
|
|
7847
|
-
false,
|
|
7848
|
-
void 0,
|
|
7849
|
-
parentComponent
|
|
7850
|
-
);
|
|
7851
|
-
}
|
|
7852
|
-
}
|
|
7853
|
-
let vnodeHooks;
|
|
7854
|
-
if (vnodeHooks = props && props.onVnodeBeforeMount) {
|
|
7855
|
-
invokeVNodeHook(vnodeHooks, parentComponent, vnode);
|
|
7856
|
-
}
|
|
7857
7904
|
let needCallTransitionHooks = false;
|
|
7858
7905
|
if (isTemplateNode(el)) {
|
|
7859
7906
|
needCallTransitionHooks = needTransition(parentSuspense, transition) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear;
|
|
@@ -7864,16 +7911,6 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
7864
7911
|
replaceNode(content, el, parentComponent);
|
|
7865
7912
|
vnode.el = el = content;
|
|
7866
7913
|
}
|
|
7867
|
-
if (dirs) {
|
|
7868
|
-
invokeDirectiveHook(vnode, null, parentComponent, "beforeMount");
|
|
7869
|
-
}
|
|
7870
|
-
if ((vnodeHooks = props && props.onVnodeMounted) || dirs || needCallTransitionHooks) {
|
|
7871
|
-
queueEffectWithSuspense(() => {
|
|
7872
|
-
vnodeHooks && invokeVNodeHook(vnodeHooks, parentComponent, vnode);
|
|
7873
|
-
needCallTransitionHooks && transition.enter(el);
|
|
7874
|
-
dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted");
|
|
7875
|
-
}, parentSuspense);
|
|
7876
|
-
}
|
|
7877
7914
|
if (shapeFlag & 16 && // skip if element has innerHTML / textContent
|
|
7878
7915
|
!(props && (props.innerHTML || props.textContent))) {
|
|
7879
7916
|
let next = hydrateChildren(
|
|
@@ -7890,7 +7927,10 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
7890
7927
|
hasMismatch = true;
|
|
7891
7928
|
if (!hasWarned) {
|
|
7892
7929
|
warn(
|
|
7893
|
-
`Hydration children mismatch
|
|
7930
|
+
`Hydration children mismatch on`,
|
|
7931
|
+
el,
|
|
7932
|
+
`
|
|
7933
|
+
Server rendered element contains more child nodes than client vdom.`
|
|
7894
7934
|
);
|
|
7895
7935
|
hasWarned = true;
|
|
7896
7936
|
}
|
|
@@ -7902,13 +7942,50 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
7902
7942
|
if (el.textContent !== vnode.children) {
|
|
7903
7943
|
hasMismatch = true;
|
|
7904
7944
|
warn(
|
|
7905
|
-
`Hydration text content mismatch
|
|
7906
|
-
|
|
7907
|
-
|
|
7945
|
+
`Hydration text content mismatch on`,
|
|
7946
|
+
el,
|
|
7947
|
+
`
|
|
7948
|
+
- rendered on server: ${el.textContent}
|
|
7949
|
+
- expected on client: ${vnode.children}`
|
|
7908
7950
|
);
|
|
7909
7951
|
el.textContent = vnode.children;
|
|
7910
7952
|
}
|
|
7911
7953
|
}
|
|
7954
|
+
if (props) {
|
|
7955
|
+
{
|
|
7956
|
+
for (const key in props) {
|
|
7957
|
+
if (propHasMismatch(el, key, props[key])) {
|
|
7958
|
+
hasMismatch = true;
|
|
7959
|
+
}
|
|
7960
|
+
if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers
|
|
7961
|
+
key[0] === ".") {
|
|
7962
|
+
patchProp(
|
|
7963
|
+
el,
|
|
7964
|
+
key,
|
|
7965
|
+
null,
|
|
7966
|
+
props[key],
|
|
7967
|
+
void 0,
|
|
7968
|
+
void 0,
|
|
7969
|
+
parentComponent
|
|
7970
|
+
);
|
|
7971
|
+
}
|
|
7972
|
+
}
|
|
7973
|
+
}
|
|
7974
|
+
}
|
|
7975
|
+
let vnodeHooks;
|
|
7976
|
+
if (vnodeHooks = props && props.onVnodeBeforeMount) {
|
|
7977
|
+
invokeVNodeHook(vnodeHooks, parentComponent, vnode);
|
|
7978
|
+
}
|
|
7979
|
+
if (dirs) {
|
|
7980
|
+
invokeDirectiveHook(vnode, null, parentComponent, "beforeMount");
|
|
7981
|
+
}
|
|
7982
|
+
if ((vnodeHooks = props && props.onVnodeMounted) || dirs || needCallTransitionHooks) {
|
|
7983
|
+
queueEffectWithSuspense(() => {
|
|
7984
|
+
vnodeHooks && invokeVNodeHook(vnodeHooks, parentComponent, vnode);
|
|
7985
|
+
needCallTransitionHooks && transition.enter(el);
|
|
7986
|
+
dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted");
|
|
7987
|
+
}, parentSuspense);
|
|
7988
|
+
}
|
|
7912
7989
|
}
|
|
7913
7990
|
return el.nextSibling;
|
|
7914
7991
|
};
|
|
@@ -7934,7 +8011,10 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
7934
8011
|
hasMismatch = true;
|
|
7935
8012
|
if (!hasWarned) {
|
|
7936
8013
|
warn(
|
|
7937
|
-
`Hydration children mismatch
|
|
8014
|
+
`Hydration children mismatch on`,
|
|
8015
|
+
container,
|
|
8016
|
+
`
|
|
8017
|
+
Server rendered element contains fewer child nodes than client vdom.`
|
|
7938
8018
|
);
|
|
7939
8019
|
hasWarned = true;
|
|
7940
8020
|
}
|
|
@@ -7945,7 +8025,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
7945
8025
|
null,
|
|
7946
8026
|
parentComponent,
|
|
7947
8027
|
parentSuspense,
|
|
7948
|
-
|
|
8028
|
+
getContainerType(container),
|
|
7949
8029
|
slotScopeIds
|
|
7950
8030
|
);
|
|
7951
8031
|
}
|
|
@@ -7979,12 +8059,12 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
7979
8059
|
hasMismatch = true;
|
|
7980
8060
|
warn(
|
|
7981
8061
|
`Hydration node mismatch:
|
|
7982
|
-
-
|
|
7983
|
-
vnode.type,
|
|
7984
|
-
`
|
|
7985
|
-
- Server rendered DOM:`,
|
|
8062
|
+
- rendered on server:`,
|
|
7986
8063
|
node,
|
|
7987
|
-
node.nodeType === 3 /* TEXT */ ? `(text)` : isComment(node) && node.data === "[" ? `(start of fragment)` :
|
|
8064
|
+
node.nodeType === 3 /* TEXT */ ? `(text)` : isComment(node) && node.data === "[" ? `(start of fragment)` : ``,
|
|
8065
|
+
`
|
|
8066
|
+
- expected on client:`,
|
|
8067
|
+
vnode.type
|
|
7988
8068
|
);
|
|
7989
8069
|
vnode.el = null;
|
|
7990
8070
|
if (isFragment) {
|
|
@@ -8008,7 +8088,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
8008
8088
|
next,
|
|
8009
8089
|
parentComponent,
|
|
8010
8090
|
parentSuspense,
|
|
8011
|
-
|
|
8091
|
+
getContainerType(container),
|
|
8012
8092
|
slotScopeIds
|
|
8013
8093
|
);
|
|
8014
8094
|
return next;
|
|
@@ -8049,6 +8129,46 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
8049
8129
|
};
|
|
8050
8130
|
return [hydrate, hydrateNode];
|
|
8051
8131
|
}
|
|
8132
|
+
function propHasMismatch(el, key, clientValue) {
|
|
8133
|
+
let mismatchType;
|
|
8134
|
+
let mismatchKey;
|
|
8135
|
+
let actual;
|
|
8136
|
+
let expected;
|
|
8137
|
+
if (key === "class") {
|
|
8138
|
+
actual = el.className;
|
|
8139
|
+
expected = normalizeClass(clientValue);
|
|
8140
|
+
if (actual !== expected) {
|
|
8141
|
+
mismatchType = mismatchKey = `class`;
|
|
8142
|
+
}
|
|
8143
|
+
} else if (key === "style") {
|
|
8144
|
+
actual = el.getAttribute("style");
|
|
8145
|
+
expected = isString(clientValue) ? clientValue : stringifyStyle(normalizeStyle(clientValue));
|
|
8146
|
+
if (actual !== expected) {
|
|
8147
|
+
mismatchType = mismatchKey = "style";
|
|
8148
|
+
}
|
|
8149
|
+
} else if (el instanceof SVGElement && isKnownSvgAttr(key) || el instanceof HTMLElement && (isBooleanAttr(key) || isKnownHtmlAttr(key))) {
|
|
8150
|
+
actual = el.hasAttribute(key) && el.getAttribute(key);
|
|
8151
|
+
expected = isBooleanAttr(key) ? includeBooleanAttr(clientValue) ? "" : false : clientValue == null ? false : String(clientValue);
|
|
8152
|
+
if (actual !== expected) {
|
|
8153
|
+
mismatchType = `attribute`;
|
|
8154
|
+
mismatchKey = key;
|
|
8155
|
+
}
|
|
8156
|
+
}
|
|
8157
|
+
if (mismatchType) {
|
|
8158
|
+
const format = (v) => v === false ? `(not rendered)` : `${mismatchKey}="${v}"`;
|
|
8159
|
+
warn(
|
|
8160
|
+
`Hydration ${mismatchType} mismatch on`,
|
|
8161
|
+
el,
|
|
8162
|
+
`
|
|
8163
|
+
- rendered on server: ${format(actual)}
|
|
8164
|
+
- expected on client: ${format(expected)}
|
|
8165
|
+
Note: this mismatch is check-only. The DOM will not be rectified in production due to performance overhead.
|
|
8166
|
+
You should fix the source of the mismatch.`
|
|
8167
|
+
);
|
|
8168
|
+
return true;
|
|
8169
|
+
}
|
|
8170
|
+
return false;
|
|
8171
|
+
}
|
|
8052
8172
|
|
|
8053
8173
|
let supported;
|
|
8054
8174
|
let perf;
|
|
@@ -8117,7 +8237,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
8117
8237
|
setScopeId: hostSetScopeId = NOOP,
|
|
8118
8238
|
insertStaticContent: hostInsertStaticContent
|
|
8119
8239
|
} = options;
|
|
8120
|
-
const patch = (n1, n2, container, anchor = null, parentComponent = null, parentSuspense = null,
|
|
8240
|
+
const patch = (n1, n2, container, anchor = null, parentComponent = null, parentSuspense = null, namespace = void 0, slotScopeIds = null, optimized = isHmrUpdating ? false : !!n2.dynamicChildren) => {
|
|
8121
8241
|
if (n1 === n2) {
|
|
8122
8242
|
return;
|
|
8123
8243
|
}
|
|
@@ -8140,9 +8260,9 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
8140
8260
|
break;
|
|
8141
8261
|
case Static:
|
|
8142
8262
|
if (n1 == null) {
|
|
8143
|
-
mountStaticNode(n2, container, anchor,
|
|
8263
|
+
mountStaticNode(n2, container, anchor, namespace);
|
|
8144
8264
|
} else {
|
|
8145
|
-
patchStaticNode(n1, n2, container,
|
|
8265
|
+
patchStaticNode(n1, n2, container, namespace);
|
|
8146
8266
|
}
|
|
8147
8267
|
break;
|
|
8148
8268
|
case Fragment:
|
|
@@ -8153,7 +8273,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
8153
8273
|
anchor,
|
|
8154
8274
|
parentComponent,
|
|
8155
8275
|
parentSuspense,
|
|
8156
|
-
|
|
8276
|
+
namespace,
|
|
8157
8277
|
slotScopeIds,
|
|
8158
8278
|
optimized
|
|
8159
8279
|
);
|
|
@@ -8167,7 +8287,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
8167
8287
|
anchor,
|
|
8168
8288
|
parentComponent,
|
|
8169
8289
|
parentSuspense,
|
|
8170
|
-
|
|
8290
|
+
namespace,
|
|
8171
8291
|
slotScopeIds,
|
|
8172
8292
|
optimized
|
|
8173
8293
|
);
|
|
@@ -8179,7 +8299,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
8179
8299
|
anchor,
|
|
8180
8300
|
parentComponent,
|
|
8181
8301
|
parentSuspense,
|
|
8182
|
-
|
|
8302
|
+
namespace,
|
|
8183
8303
|
slotScopeIds,
|
|
8184
8304
|
optimized
|
|
8185
8305
|
);
|
|
@@ -8191,7 +8311,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
8191
8311
|
anchor,
|
|
8192
8312
|
parentComponent,
|
|
8193
8313
|
parentSuspense,
|
|
8194
|
-
|
|
8314
|
+
namespace,
|
|
8195
8315
|
slotScopeIds,
|
|
8196
8316
|
optimized,
|
|
8197
8317
|
internals
|
|
@@ -8204,7 +8324,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
8204
8324
|
anchor,
|
|
8205
8325
|
parentComponent,
|
|
8206
8326
|
parentSuspense,
|
|
8207
|
-
|
|
8327
|
+
namespace,
|
|
8208
8328
|
slotScopeIds,
|
|
8209
8329
|
optimized,
|
|
8210
8330
|
internals
|
|
@@ -8242,17 +8362,17 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
8242
8362
|
n2.el = n1.el;
|
|
8243
8363
|
}
|
|
8244
8364
|
};
|
|
8245
|
-
const mountStaticNode = (n2, container, anchor,
|
|
8365
|
+
const mountStaticNode = (n2, container, anchor, namespace) => {
|
|
8246
8366
|
[n2.el, n2.anchor] = hostInsertStaticContent(
|
|
8247
8367
|
n2.children,
|
|
8248
8368
|
container,
|
|
8249
8369
|
anchor,
|
|
8250
|
-
|
|
8370
|
+
namespace,
|
|
8251
8371
|
n2.el,
|
|
8252
8372
|
n2.anchor
|
|
8253
8373
|
);
|
|
8254
8374
|
};
|
|
8255
|
-
const patchStaticNode = (n1, n2, container,
|
|
8375
|
+
const patchStaticNode = (n1, n2, container, namespace) => {
|
|
8256
8376
|
if (n2.children !== n1.children) {
|
|
8257
8377
|
const anchor = hostNextSibling(n1.anchor);
|
|
8258
8378
|
removeStaticNode(n1);
|
|
@@ -8260,7 +8380,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
8260
8380
|
n2.children,
|
|
8261
8381
|
container,
|
|
8262
8382
|
anchor,
|
|
8263
|
-
|
|
8383
|
+
namespace
|
|
8264
8384
|
);
|
|
8265
8385
|
} else {
|
|
8266
8386
|
n2.el = n1.el;
|
|
@@ -8285,8 +8405,12 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
8285
8405
|
}
|
|
8286
8406
|
hostRemove(anchor);
|
|
8287
8407
|
};
|
|
8288
|
-
const processElement = (n1, n2, container, anchor, parentComponent, parentSuspense,
|
|
8289
|
-
|
|
8408
|
+
const processElement = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
|
|
8409
|
+
if (n2.type === "svg") {
|
|
8410
|
+
namespace = "svg";
|
|
8411
|
+
} else if (n2.type === "math") {
|
|
8412
|
+
namespace = "mathml";
|
|
8413
|
+
}
|
|
8290
8414
|
if (n1 == null) {
|
|
8291
8415
|
mountElement(
|
|
8292
8416
|
n2,
|
|
@@ -8294,7 +8418,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
8294
8418
|
anchor,
|
|
8295
8419
|
parentComponent,
|
|
8296
8420
|
parentSuspense,
|
|
8297
|
-
|
|
8421
|
+
namespace,
|
|
8298
8422
|
slotScopeIds,
|
|
8299
8423
|
optimized
|
|
8300
8424
|
);
|
|
@@ -8304,19 +8428,19 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
8304
8428
|
n2,
|
|
8305
8429
|
parentComponent,
|
|
8306
8430
|
parentSuspense,
|
|
8307
|
-
|
|
8431
|
+
namespace,
|
|
8308
8432
|
slotScopeIds,
|
|
8309
8433
|
optimized
|
|
8310
8434
|
);
|
|
8311
8435
|
}
|
|
8312
8436
|
};
|
|
8313
|
-
const mountElement = (vnode, container, anchor, parentComponent, parentSuspense,
|
|
8437
|
+
const mountElement = (vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
|
|
8314
8438
|
let el;
|
|
8315
8439
|
let vnodeHook;
|
|
8316
|
-
const {
|
|
8440
|
+
const { props, shapeFlag, transition, dirs } = vnode;
|
|
8317
8441
|
el = vnode.el = hostCreateElement(
|
|
8318
8442
|
vnode.type,
|
|
8319
|
-
|
|
8443
|
+
namespace,
|
|
8320
8444
|
props && props.is,
|
|
8321
8445
|
props
|
|
8322
8446
|
);
|
|
@@ -8329,7 +8453,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
8329
8453
|
null,
|
|
8330
8454
|
parentComponent,
|
|
8331
8455
|
parentSuspense,
|
|
8332
|
-
|
|
8456
|
+
resolveChildrenNamespace(vnode, namespace),
|
|
8333
8457
|
slotScopeIds,
|
|
8334
8458
|
optimized
|
|
8335
8459
|
);
|
|
@@ -8346,7 +8470,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
8346
8470
|
key,
|
|
8347
8471
|
null,
|
|
8348
8472
|
props[key],
|
|
8349
|
-
|
|
8473
|
+
namespace,
|
|
8350
8474
|
vnode.children,
|
|
8351
8475
|
parentComponent,
|
|
8352
8476
|
parentSuspense,
|
|
@@ -8355,7 +8479,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
8355
8479
|
}
|
|
8356
8480
|
}
|
|
8357
8481
|
if ("value" in props) {
|
|
8358
|
-
hostPatchProp(el, "value", null, props.value);
|
|
8482
|
+
hostPatchProp(el, "value", null, props.value, namespace);
|
|
8359
8483
|
}
|
|
8360
8484
|
if (vnodeHook = props.onVnodeBeforeMount) {
|
|
8361
8485
|
invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
@@ -8413,7 +8537,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
8413
8537
|
}
|
|
8414
8538
|
}
|
|
8415
8539
|
};
|
|
8416
|
-
const mountChildren = (children, container, anchor, parentComponent, parentSuspense,
|
|
8540
|
+
const mountChildren = (children, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, start = 0) => {
|
|
8417
8541
|
for (let i = start; i < children.length; i++) {
|
|
8418
8542
|
const child = children[i] = optimized ? cloneIfMounted(children[i]) : normalizeVNode(children[i]);
|
|
8419
8543
|
patch(
|
|
@@ -8423,13 +8547,13 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
8423
8547
|
anchor,
|
|
8424
8548
|
parentComponent,
|
|
8425
8549
|
parentSuspense,
|
|
8426
|
-
|
|
8550
|
+
namespace,
|
|
8427
8551
|
slotScopeIds,
|
|
8428
8552
|
optimized
|
|
8429
8553
|
);
|
|
8430
8554
|
}
|
|
8431
8555
|
};
|
|
8432
|
-
const patchElement = (n1, n2, parentComponent, parentSuspense,
|
|
8556
|
+
const patchElement = (n1, n2, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
|
|
8433
8557
|
const el = n2.el = n1.el;
|
|
8434
8558
|
let { patchFlag, dynamicChildren, dirs } = n2;
|
|
8435
8559
|
patchFlag |= n1.patchFlag & 16;
|
|
@@ -8449,7 +8573,6 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
8449
8573
|
optimized = false;
|
|
8450
8574
|
dynamicChildren = null;
|
|
8451
8575
|
}
|
|
8452
|
-
const areChildrenSVG = isSVG && n2.type !== "foreignObject";
|
|
8453
8576
|
if (dynamicChildren) {
|
|
8454
8577
|
patchBlockChildren(
|
|
8455
8578
|
n1.dynamicChildren,
|
|
@@ -8457,7 +8580,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
8457
8580
|
el,
|
|
8458
8581
|
parentComponent,
|
|
8459
8582
|
parentSuspense,
|
|
8460
|
-
|
|
8583
|
+
resolveChildrenNamespace(n2, namespace),
|
|
8461
8584
|
slotScopeIds
|
|
8462
8585
|
);
|
|
8463
8586
|
{
|
|
@@ -8471,7 +8594,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
8471
8594
|
null,
|
|
8472
8595
|
parentComponent,
|
|
8473
8596
|
parentSuspense,
|
|
8474
|
-
|
|
8597
|
+
resolveChildrenNamespace(n2, namespace),
|
|
8475
8598
|
slotScopeIds,
|
|
8476
8599
|
false
|
|
8477
8600
|
);
|
|
@@ -8485,16 +8608,16 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
8485
8608
|
newProps,
|
|
8486
8609
|
parentComponent,
|
|
8487
8610
|
parentSuspense,
|
|
8488
|
-
|
|
8611
|
+
namespace
|
|
8489
8612
|
);
|
|
8490
8613
|
} else {
|
|
8491
8614
|
if (patchFlag & 2) {
|
|
8492
8615
|
if (oldProps.class !== newProps.class) {
|
|
8493
|
-
hostPatchProp(el, "class", null, newProps.class,
|
|
8616
|
+
hostPatchProp(el, "class", null, newProps.class, namespace);
|
|
8494
8617
|
}
|
|
8495
8618
|
}
|
|
8496
8619
|
if (patchFlag & 4) {
|
|
8497
|
-
hostPatchProp(el, "style", oldProps.style, newProps.style,
|
|
8620
|
+
hostPatchProp(el, "style", oldProps.style, newProps.style, namespace);
|
|
8498
8621
|
}
|
|
8499
8622
|
if (patchFlag & 8) {
|
|
8500
8623
|
const propsToUpdate = n2.dynamicProps;
|
|
@@ -8508,7 +8631,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
8508
8631
|
key,
|
|
8509
8632
|
prev,
|
|
8510
8633
|
next,
|
|
8511
|
-
|
|
8634
|
+
namespace,
|
|
8512
8635
|
n1.children,
|
|
8513
8636
|
parentComponent,
|
|
8514
8637
|
parentSuspense,
|
|
@@ -8531,7 +8654,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
8531
8654
|
newProps,
|
|
8532
8655
|
parentComponent,
|
|
8533
8656
|
parentSuspense,
|
|
8534
|
-
|
|
8657
|
+
namespace
|
|
8535
8658
|
);
|
|
8536
8659
|
}
|
|
8537
8660
|
if ((vnodeHook = newProps.onVnodeUpdated) || dirs) {
|
|
@@ -8541,7 +8664,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
8541
8664
|
}, parentSuspense);
|
|
8542
8665
|
}
|
|
8543
8666
|
};
|
|
8544
|
-
const patchBlockChildren = (oldChildren, newChildren, fallbackContainer, parentComponent, parentSuspense,
|
|
8667
|
+
const patchBlockChildren = (oldChildren, newChildren, fallbackContainer, parentComponent, parentSuspense, namespace, slotScopeIds) => {
|
|
8545
8668
|
for (let i = 0; i < newChildren.length; i++) {
|
|
8546
8669
|
const oldVNode = oldChildren[i];
|
|
8547
8670
|
const newVNode = newChildren[i];
|
|
@@ -8566,13 +8689,13 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
8566
8689
|
null,
|
|
8567
8690
|
parentComponent,
|
|
8568
8691
|
parentSuspense,
|
|
8569
|
-
|
|
8692
|
+
namespace,
|
|
8570
8693
|
slotScopeIds,
|
|
8571
8694
|
true
|
|
8572
8695
|
);
|
|
8573
8696
|
}
|
|
8574
8697
|
};
|
|
8575
|
-
const patchProps = (el, vnode, oldProps, newProps, parentComponent, parentSuspense,
|
|
8698
|
+
const patchProps = (el, vnode, oldProps, newProps, parentComponent, parentSuspense, namespace) => {
|
|
8576
8699
|
if (oldProps !== newProps) {
|
|
8577
8700
|
if (oldProps !== EMPTY_OBJ) {
|
|
8578
8701
|
for (const key in oldProps) {
|
|
@@ -8582,7 +8705,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
8582
8705
|
key,
|
|
8583
8706
|
oldProps[key],
|
|
8584
8707
|
null,
|
|
8585
|
-
|
|
8708
|
+
namespace,
|
|
8586
8709
|
vnode.children,
|
|
8587
8710
|
parentComponent,
|
|
8588
8711
|
parentSuspense,
|
|
@@ -8602,7 +8725,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
8602
8725
|
key,
|
|
8603
8726
|
prev,
|
|
8604
8727
|
next,
|
|
8605
|
-
|
|
8728
|
+
namespace,
|
|
8606
8729
|
vnode.children,
|
|
8607
8730
|
parentComponent,
|
|
8608
8731
|
parentSuspense,
|
|
@@ -8611,11 +8734,11 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
8611
8734
|
}
|
|
8612
8735
|
}
|
|
8613
8736
|
if ("value" in newProps) {
|
|
8614
|
-
hostPatchProp(el, "value", oldProps.value, newProps.value);
|
|
8737
|
+
hostPatchProp(el, "value", oldProps.value, newProps.value, namespace);
|
|
8615
8738
|
}
|
|
8616
8739
|
}
|
|
8617
8740
|
};
|
|
8618
|
-
const processFragment = (n1, n2, container, anchor, parentComponent, parentSuspense,
|
|
8741
|
+
const processFragment = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
|
|
8619
8742
|
const fragmentStartAnchor = n2.el = n1 ? n1.el : hostCreateText("");
|
|
8620
8743
|
const fragmentEndAnchor = n2.anchor = n1 ? n1.anchor : hostCreateText("");
|
|
8621
8744
|
let { patchFlag, dynamicChildren, slotScopeIds: fragmentSlotScopeIds } = n2;
|
|
@@ -8639,7 +8762,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
8639
8762
|
fragmentEndAnchor,
|
|
8640
8763
|
parentComponent,
|
|
8641
8764
|
parentSuspense,
|
|
8642
|
-
|
|
8765
|
+
namespace,
|
|
8643
8766
|
slotScopeIds,
|
|
8644
8767
|
optimized
|
|
8645
8768
|
);
|
|
@@ -8653,7 +8776,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
8653
8776
|
container,
|
|
8654
8777
|
parentComponent,
|
|
8655
8778
|
parentSuspense,
|
|
8656
|
-
|
|
8779
|
+
namespace,
|
|
8657
8780
|
slotScopeIds
|
|
8658
8781
|
);
|
|
8659
8782
|
{
|
|
@@ -8667,14 +8790,14 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
8667
8790
|
fragmentEndAnchor,
|
|
8668
8791
|
parentComponent,
|
|
8669
8792
|
parentSuspense,
|
|
8670
|
-
|
|
8793
|
+
namespace,
|
|
8671
8794
|
slotScopeIds,
|
|
8672
8795
|
optimized
|
|
8673
8796
|
);
|
|
8674
8797
|
}
|
|
8675
8798
|
}
|
|
8676
8799
|
};
|
|
8677
|
-
const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense,
|
|
8800
|
+
const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
|
|
8678
8801
|
n2.slotScopeIds = slotScopeIds;
|
|
8679
8802
|
if (n1 == null) {
|
|
8680
8803
|
if (n2.shapeFlag & 512) {
|
|
@@ -8682,7 +8805,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
8682
8805
|
n2,
|
|
8683
8806
|
container,
|
|
8684
8807
|
anchor,
|
|
8685
|
-
|
|
8808
|
+
namespace,
|
|
8686
8809
|
optimized
|
|
8687
8810
|
);
|
|
8688
8811
|
} else {
|
|
@@ -8692,7 +8815,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
8692
8815
|
anchor,
|
|
8693
8816
|
parentComponent,
|
|
8694
8817
|
parentSuspense,
|
|
8695
|
-
|
|
8818
|
+
namespace,
|
|
8696
8819
|
optimized
|
|
8697
8820
|
);
|
|
8698
8821
|
}
|
|
@@ -8700,7 +8823,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
8700
8823
|
updateComponent(n1, n2, optimized);
|
|
8701
8824
|
}
|
|
8702
8825
|
};
|
|
8703
|
-
const mountComponent = (initialVNode, container, anchor, parentComponent, parentSuspense,
|
|
8826
|
+
const mountComponent = (initialVNode, container, anchor, parentComponent, parentSuspense, namespace, optimized) => {
|
|
8704
8827
|
const compatMountInstance = initialVNode.isCompatRoot && initialVNode.component;
|
|
8705
8828
|
const instance = compatMountInstance || (initialVNode.component = createComponentInstance(
|
|
8706
8829
|
initialVNode,
|
|
@@ -8732,17 +8855,17 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
8732
8855
|
const placeholder = instance.subTree = createVNode(Comment);
|
|
8733
8856
|
processCommentNode(null, placeholder, container, anchor);
|
|
8734
8857
|
}
|
|
8735
|
-
|
|
8858
|
+
} else {
|
|
8859
|
+
setupRenderEffect(
|
|
8860
|
+
instance,
|
|
8861
|
+
initialVNode,
|
|
8862
|
+
container,
|
|
8863
|
+
anchor,
|
|
8864
|
+
parentSuspense,
|
|
8865
|
+
namespace,
|
|
8866
|
+
optimized
|
|
8867
|
+
);
|
|
8736
8868
|
}
|
|
8737
|
-
setupRenderEffect(
|
|
8738
|
-
instance,
|
|
8739
|
-
initialVNode,
|
|
8740
|
-
container,
|
|
8741
|
-
anchor,
|
|
8742
|
-
parentSuspense,
|
|
8743
|
-
isSVG,
|
|
8744
|
-
optimized
|
|
8745
|
-
);
|
|
8746
8869
|
{
|
|
8747
8870
|
popWarningContext();
|
|
8748
8871
|
endMeasure(instance, `mount`);
|
|
@@ -8771,7 +8894,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
8771
8894
|
instance.vnode = n2;
|
|
8772
8895
|
}
|
|
8773
8896
|
};
|
|
8774
|
-
const setupRenderEffect = (instance, initialVNode, container, anchor, parentSuspense,
|
|
8897
|
+
const setupRenderEffect = (instance, initialVNode, container, anchor, parentSuspense, namespace, optimized) => {
|
|
8775
8898
|
const componentUpdateFn = () => {
|
|
8776
8899
|
if (!instance.isMounted) {
|
|
8777
8900
|
let vnodeHook;
|
|
@@ -8841,7 +8964,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
8841
8964
|
anchor,
|
|
8842
8965
|
instance,
|
|
8843
8966
|
parentSuspense,
|
|
8844
|
-
|
|
8967
|
+
namespace
|
|
8845
8968
|
);
|
|
8846
8969
|
{
|
|
8847
8970
|
endMeasure(instance, `patch`);
|
|
@@ -8880,6 +9003,21 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
8880
9003
|
initialVNode = container = anchor = null;
|
|
8881
9004
|
} else {
|
|
8882
9005
|
let { next, bu, u, parent, vnode } = instance;
|
|
9006
|
+
{
|
|
9007
|
+
const nonHydratedAsyncRoot = locateNonHydratedAsyncRoot(instance);
|
|
9008
|
+
if (nonHydratedAsyncRoot) {
|
|
9009
|
+
if (next) {
|
|
9010
|
+
next.el = vnode.el;
|
|
9011
|
+
updateComponentPreRender(instance, next, optimized);
|
|
9012
|
+
}
|
|
9013
|
+
nonHydratedAsyncRoot.asyncDep.then(() => {
|
|
9014
|
+
if (!instance.isUnmounted) {
|
|
9015
|
+
componentUpdateFn();
|
|
9016
|
+
}
|
|
9017
|
+
});
|
|
9018
|
+
return;
|
|
9019
|
+
}
|
|
9020
|
+
}
|
|
8883
9021
|
let originNext = next;
|
|
8884
9022
|
let vnodeHook;
|
|
8885
9023
|
{
|
|
@@ -8923,7 +9061,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
8923
9061
|
getNextHostNode(prevTree),
|
|
8924
9062
|
instance,
|
|
8925
9063
|
parentSuspense,
|
|
8926
|
-
|
|
9064
|
+
namespace
|
|
8927
9065
|
);
|
|
8928
9066
|
{
|
|
8929
9067
|
endMeasure(instance, `patch`);
|
|
@@ -8984,10 +9122,10 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
8984
9122
|
updateProps(instance, nextVNode.props, prevProps, optimized);
|
|
8985
9123
|
updateSlots(instance, nextVNode.children, optimized);
|
|
8986
9124
|
pauseTracking();
|
|
8987
|
-
flushPreFlushCbs();
|
|
9125
|
+
flushPreFlushCbs(instance);
|
|
8988
9126
|
resetTracking();
|
|
8989
9127
|
};
|
|
8990
|
-
const patchChildren = (n1, n2, container, anchor, parentComponent, parentSuspense,
|
|
9128
|
+
const patchChildren = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized = false) => {
|
|
8991
9129
|
const c1 = n1 && n1.children;
|
|
8992
9130
|
const prevShapeFlag = n1 ? n1.shapeFlag : 0;
|
|
8993
9131
|
const c2 = n2.children;
|
|
@@ -9001,7 +9139,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
9001
9139
|
anchor,
|
|
9002
9140
|
parentComponent,
|
|
9003
9141
|
parentSuspense,
|
|
9004
|
-
|
|
9142
|
+
namespace,
|
|
9005
9143
|
slotScopeIds,
|
|
9006
9144
|
optimized
|
|
9007
9145
|
);
|
|
@@ -9014,7 +9152,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
9014
9152
|
anchor,
|
|
9015
9153
|
parentComponent,
|
|
9016
9154
|
parentSuspense,
|
|
9017
|
-
|
|
9155
|
+
namespace,
|
|
9018
9156
|
slotScopeIds,
|
|
9019
9157
|
optimized
|
|
9020
9158
|
);
|
|
@@ -9038,7 +9176,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
9038
9176
|
anchor,
|
|
9039
9177
|
parentComponent,
|
|
9040
9178
|
parentSuspense,
|
|
9041
|
-
|
|
9179
|
+
namespace,
|
|
9042
9180
|
slotScopeIds,
|
|
9043
9181
|
optimized
|
|
9044
9182
|
);
|
|
@@ -9056,7 +9194,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
9056
9194
|
anchor,
|
|
9057
9195
|
parentComponent,
|
|
9058
9196
|
parentSuspense,
|
|
9059
|
-
|
|
9197
|
+
namespace,
|
|
9060
9198
|
slotScopeIds,
|
|
9061
9199
|
optimized
|
|
9062
9200
|
);
|
|
@@ -9064,7 +9202,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
9064
9202
|
}
|
|
9065
9203
|
}
|
|
9066
9204
|
};
|
|
9067
|
-
const patchUnkeyedChildren = (c1, c2, container, anchor, parentComponent, parentSuspense,
|
|
9205
|
+
const patchUnkeyedChildren = (c1, c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
|
|
9068
9206
|
c1 = c1 || EMPTY_ARR;
|
|
9069
9207
|
c2 = c2 || EMPTY_ARR;
|
|
9070
9208
|
const oldLength = c1.length;
|
|
@@ -9080,7 +9218,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
9080
9218
|
null,
|
|
9081
9219
|
parentComponent,
|
|
9082
9220
|
parentSuspense,
|
|
9083
|
-
|
|
9221
|
+
namespace,
|
|
9084
9222
|
slotScopeIds,
|
|
9085
9223
|
optimized
|
|
9086
9224
|
);
|
|
@@ -9101,14 +9239,14 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
9101
9239
|
anchor,
|
|
9102
9240
|
parentComponent,
|
|
9103
9241
|
parentSuspense,
|
|
9104
|
-
|
|
9242
|
+
namespace,
|
|
9105
9243
|
slotScopeIds,
|
|
9106
9244
|
optimized,
|
|
9107
9245
|
commonLength
|
|
9108
9246
|
);
|
|
9109
9247
|
}
|
|
9110
9248
|
};
|
|
9111
|
-
const patchKeyedChildren = (c1, c2, container, parentAnchor, parentComponent, parentSuspense,
|
|
9249
|
+
const patchKeyedChildren = (c1, c2, container, parentAnchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
|
|
9112
9250
|
let i = 0;
|
|
9113
9251
|
const l2 = c2.length;
|
|
9114
9252
|
let e1 = c1.length - 1;
|
|
@@ -9124,7 +9262,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
9124
9262
|
null,
|
|
9125
9263
|
parentComponent,
|
|
9126
9264
|
parentSuspense,
|
|
9127
|
-
|
|
9265
|
+
namespace,
|
|
9128
9266
|
slotScopeIds,
|
|
9129
9267
|
optimized
|
|
9130
9268
|
);
|
|
@@ -9144,7 +9282,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
9144
9282
|
null,
|
|
9145
9283
|
parentComponent,
|
|
9146
9284
|
parentSuspense,
|
|
9147
|
-
|
|
9285
|
+
namespace,
|
|
9148
9286
|
slotScopeIds,
|
|
9149
9287
|
optimized
|
|
9150
9288
|
);
|
|
@@ -9166,7 +9304,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
9166
9304
|
anchor,
|
|
9167
9305
|
parentComponent,
|
|
9168
9306
|
parentSuspense,
|
|
9169
|
-
|
|
9307
|
+
namespace,
|
|
9170
9308
|
slotScopeIds,
|
|
9171
9309
|
optimized
|
|
9172
9310
|
);
|
|
@@ -9236,7 +9374,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
9236
9374
|
null,
|
|
9237
9375
|
parentComponent,
|
|
9238
9376
|
parentSuspense,
|
|
9239
|
-
|
|
9377
|
+
namespace,
|
|
9240
9378
|
slotScopeIds,
|
|
9241
9379
|
optimized
|
|
9242
9380
|
);
|
|
@@ -9257,7 +9395,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
9257
9395
|
anchor,
|
|
9258
9396
|
parentComponent,
|
|
9259
9397
|
parentSuspense,
|
|
9260
|
-
|
|
9398
|
+
namespace,
|
|
9261
9399
|
slotScopeIds,
|
|
9262
9400
|
optimized
|
|
9263
9401
|
);
|
|
@@ -9487,13 +9625,21 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
9487
9625
|
}
|
|
9488
9626
|
return hostNextSibling(vnode.anchor || vnode.el);
|
|
9489
9627
|
};
|
|
9490
|
-
const render = (vnode, container,
|
|
9628
|
+
const render = (vnode, container, namespace) => {
|
|
9491
9629
|
if (vnode == null) {
|
|
9492
9630
|
if (container._vnode) {
|
|
9493
9631
|
unmount(container._vnode, null, null, true);
|
|
9494
9632
|
}
|
|
9495
9633
|
} else {
|
|
9496
|
-
patch(
|
|
9634
|
+
patch(
|
|
9635
|
+
container._vnode || null,
|
|
9636
|
+
vnode,
|
|
9637
|
+
container,
|
|
9638
|
+
null,
|
|
9639
|
+
null,
|
|
9640
|
+
null,
|
|
9641
|
+
namespace
|
|
9642
|
+
);
|
|
9497
9643
|
}
|
|
9498
9644
|
flushPreFlushCbs();
|
|
9499
9645
|
flushPostFlushCbs();
|
|
@@ -9524,6 +9670,9 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
9524
9670
|
createApp: createAppAPI(render, hydrate)
|
|
9525
9671
|
};
|
|
9526
9672
|
}
|
|
9673
|
+
function resolveChildrenNamespace({ type, props }, currentNamespace) {
|
|
9674
|
+
return currentNamespace === "svg" && type === "foreignObject" || currentNamespace === "mathml" && type === "annotation-xml" && props && props.encoding && props.encoding.includes("html") ? void 0 : currentNamespace;
|
|
9675
|
+
}
|
|
9527
9676
|
function toggleRecurse({ effect, update }, allowed) {
|
|
9528
9677
|
effect.allowRecurse = update.allowRecurse = allowed;
|
|
9529
9678
|
}
|
|
@@ -9594,10 +9743,21 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
9594
9743
|
}
|
|
9595
9744
|
return result;
|
|
9596
9745
|
}
|
|
9746
|
+
function locateNonHydratedAsyncRoot(instance) {
|
|
9747
|
+
const subComponent = instance.subTree.component;
|
|
9748
|
+
if (subComponent) {
|
|
9749
|
+
if (subComponent.asyncDep && !subComponent.asyncResolved) {
|
|
9750
|
+
return subComponent;
|
|
9751
|
+
} else {
|
|
9752
|
+
return locateNonHydratedAsyncRoot(subComponent);
|
|
9753
|
+
}
|
|
9754
|
+
}
|
|
9755
|
+
}
|
|
9597
9756
|
|
|
9598
9757
|
const isTeleport = (type) => type.__isTeleport;
|
|
9599
9758
|
const isTeleportDisabled = (props) => props && (props.disabled || props.disabled === "");
|
|
9600
9759
|
const isTargetSVG = (target) => typeof SVGElement !== "undefined" && target instanceof SVGElement;
|
|
9760
|
+
const isTargetMathML = (target) => typeof MathMLElement === "function" && target instanceof MathMLElement;
|
|
9601
9761
|
const resolveTarget = (props, select) => {
|
|
9602
9762
|
const targetSelector = props && props.to;
|
|
9603
9763
|
if (isString(targetSelector)) {
|
|
@@ -9625,7 +9785,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
9625
9785
|
const TeleportImpl = {
|
|
9626
9786
|
name: "Teleport",
|
|
9627
9787
|
__isTeleport: true,
|
|
9628
|
-
process(n1, n2, container, anchor, parentComponent, parentSuspense,
|
|
9788
|
+
process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, internals) {
|
|
9629
9789
|
const {
|
|
9630
9790
|
mc: mountChildren,
|
|
9631
9791
|
pc: patchChildren,
|
|
@@ -9647,7 +9807,11 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
9647
9807
|
const targetAnchor = n2.targetAnchor = createText("");
|
|
9648
9808
|
if (target) {
|
|
9649
9809
|
insert(targetAnchor, target);
|
|
9650
|
-
|
|
9810
|
+
if (namespace === "svg" || isTargetSVG(target)) {
|
|
9811
|
+
namespace = "svg";
|
|
9812
|
+
} else if (namespace === "mathml" || isTargetMathML(target)) {
|
|
9813
|
+
namespace = "mathml";
|
|
9814
|
+
}
|
|
9651
9815
|
} else if (!disabled) {
|
|
9652
9816
|
warn("Invalid Teleport target on mount:", target, `(${typeof target})`);
|
|
9653
9817
|
}
|
|
@@ -9659,7 +9823,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
9659
9823
|
anchor2,
|
|
9660
9824
|
parentComponent,
|
|
9661
9825
|
parentSuspense,
|
|
9662
|
-
|
|
9826
|
+
namespace,
|
|
9663
9827
|
slotScopeIds,
|
|
9664
9828
|
optimized
|
|
9665
9829
|
);
|
|
@@ -9678,7 +9842,11 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
9678
9842
|
const wasDisabled = isTeleportDisabled(n1.props);
|
|
9679
9843
|
const currentContainer = wasDisabled ? container : target;
|
|
9680
9844
|
const currentAnchor = wasDisabled ? mainAnchor : targetAnchor;
|
|
9681
|
-
|
|
9845
|
+
if (namespace === "svg" || isTargetSVG(target)) {
|
|
9846
|
+
namespace = "svg";
|
|
9847
|
+
} else if (namespace === "mathml" || isTargetMathML(target)) {
|
|
9848
|
+
namespace = "mathml";
|
|
9849
|
+
}
|
|
9682
9850
|
if (dynamicChildren) {
|
|
9683
9851
|
patchBlockChildren(
|
|
9684
9852
|
n1.dynamicChildren,
|
|
@@ -9686,7 +9854,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
9686
9854
|
currentContainer,
|
|
9687
9855
|
parentComponent,
|
|
9688
9856
|
parentSuspense,
|
|
9689
|
-
|
|
9857
|
+
namespace,
|
|
9690
9858
|
slotScopeIds
|
|
9691
9859
|
);
|
|
9692
9860
|
traverseStaticChildren(n1, n2, true);
|
|
@@ -9698,7 +9866,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
9698
9866
|
currentAnchor,
|
|
9699
9867
|
parentComponent,
|
|
9700
9868
|
parentSuspense,
|
|
9701
|
-
|
|
9869
|
+
namespace,
|
|
9702
9870
|
slotScopeIds,
|
|
9703
9871
|
false
|
|
9704
9872
|
);
|
|
@@ -10382,10 +10550,14 @@ Component that was made reactive: `,
|
|
|
10382
10550
|
let currentInstance = null;
|
|
10383
10551
|
const getCurrentInstance = () => currentInstance || currentRenderingInstance;
|
|
10384
10552
|
let internalSetCurrentInstance;
|
|
10553
|
+
let setInSSRSetupState;
|
|
10385
10554
|
{
|
|
10386
10555
|
internalSetCurrentInstance = (i) => {
|
|
10387
10556
|
currentInstance = i;
|
|
10388
10557
|
};
|
|
10558
|
+
setInSSRSetupState = (v) => {
|
|
10559
|
+
isInSSRComponentSetup = v;
|
|
10560
|
+
};
|
|
10389
10561
|
}
|
|
10390
10562
|
const setCurrentInstance = (instance) => {
|
|
10391
10563
|
internalSetCurrentInstance(instance);
|
|
@@ -10409,13 +10581,13 @@ Component that was made reactive: `,
|
|
|
10409
10581
|
}
|
|
10410
10582
|
let isInSSRComponentSetup = false;
|
|
10411
10583
|
function setupComponent(instance, isSSR = false) {
|
|
10412
|
-
|
|
10584
|
+
isSSR && setInSSRSetupState(isSSR);
|
|
10413
10585
|
const { props, children } = instance.vnode;
|
|
10414
10586
|
const isStateful = isStatefulComponent(instance);
|
|
10415
10587
|
initProps(instance, props, isStateful, isSSR);
|
|
10416
10588
|
initSlots(instance, children);
|
|
10417
10589
|
const setupResult = isStateful ? setupStatefulComponent(instance, isSSR) : void 0;
|
|
10418
|
-
|
|
10590
|
+
isSSR && setInSSRSetupState(false);
|
|
10419
10591
|
return setupResult;
|
|
10420
10592
|
}
|
|
10421
10593
|
function setupStatefulComponent(instance, isSSR) {
|
|
@@ -10933,7 +11105,7 @@ Component that was made reactive: `,
|
|
|
10933
11105
|
return true;
|
|
10934
11106
|
}
|
|
10935
11107
|
|
|
10936
|
-
const version = "3.4.0-
|
|
11108
|
+
const version = "3.4.0-beta.1";
|
|
10937
11109
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
10938
11110
|
const ssrUtils = null;
|
|
10939
11111
|
const resolveFilter = resolveFilter$1 ;
|
|
@@ -10948,6 +11120,7 @@ Component that was made reactive: `,
|
|
|
10948
11120
|
const DeprecationTypes = DeprecationTypes$1 ;
|
|
10949
11121
|
|
|
10950
11122
|
const svgNS = "http://www.w3.org/2000/svg";
|
|
11123
|
+
const mathmlNS = "http://www.w3.org/1998/Math/MathML";
|
|
10951
11124
|
const doc = typeof document !== "undefined" ? document : null;
|
|
10952
11125
|
const templateContainer = doc && /* @__PURE__ */ doc.createElement("template");
|
|
10953
11126
|
const nodeOps = {
|
|
@@ -10960,8 +11133,8 @@ Component that was made reactive: `,
|
|
|
10960
11133
|
parent.removeChild(child);
|
|
10961
11134
|
}
|
|
10962
11135
|
},
|
|
10963
|
-
createElement: (tag,
|
|
10964
|
-
const el =
|
|
11136
|
+
createElement: (tag, namespace, is, props) => {
|
|
11137
|
+
const el = namespace === "svg" ? doc.createElementNS(svgNS, tag) : namespace === "mathml" ? doc.createElementNS(mathmlNS, tag) : doc.createElement(tag, is ? { is } : void 0);
|
|
10965
11138
|
if (tag === "select" && props && props.multiple != null) {
|
|
10966
11139
|
el.setAttribute("multiple", props.multiple);
|
|
10967
11140
|
}
|
|
@@ -10985,7 +11158,7 @@ Component that was made reactive: `,
|
|
|
10985
11158
|
// Reason: innerHTML.
|
|
10986
11159
|
// Static content here can only come from compiled templates.
|
|
10987
11160
|
// As long as the user only uses trusted templates, this is safe.
|
|
10988
|
-
insertStaticContent(content, parent, anchor,
|
|
11161
|
+
insertStaticContent(content, parent, anchor, namespace, start, end) {
|
|
10989
11162
|
const before = anchor ? anchor.previousSibling : parent.lastChild;
|
|
10990
11163
|
if (start && (start === end || start.nextSibling)) {
|
|
10991
11164
|
while (true) {
|
|
@@ -10994,9 +11167,9 @@ Component that was made reactive: `,
|
|
|
10994
11167
|
break;
|
|
10995
11168
|
}
|
|
10996
11169
|
} else {
|
|
10997
|
-
templateContainer.innerHTML =
|
|
11170
|
+
templateContainer.innerHTML = namespace === "svg" ? `<svg>${content}</svg>` : namespace === "mathml" ? `<math>${content}</math>` : content;
|
|
10998
11171
|
const template = templateContainer.content;
|
|
10999
|
-
if (
|
|
11172
|
+
if (namespace === "svg" || namespace === "mathml") {
|
|
11000
11173
|
const wrapper = template.firstChild;
|
|
11001
11174
|
while (wrapper.firstChild) {
|
|
11002
11175
|
template.appendChild(wrapper.firstChild);
|
|
@@ -11636,7 +11809,8 @@ Component that was made reactive: `,
|
|
|
11636
11809
|
|
|
11637
11810
|
const isNativeOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // lowercase letter
|
|
11638
11811
|
key.charCodeAt(2) > 96 && key.charCodeAt(2) < 123;
|
|
11639
|
-
const patchProp = (el, key, prevValue, nextValue,
|
|
11812
|
+
const patchProp = (el, key, prevValue, nextValue, namespace, prevChildren, parentComponent, parentSuspense, unmountChildren) => {
|
|
11813
|
+
const isSVG = namespace === "svg";
|
|
11640
11814
|
if (key === "class") {
|
|
11641
11815
|
patchClass(el, nextValue, isSVG);
|
|
11642
11816
|
} else if (key === "style") {
|
|
@@ -11688,7 +11862,9 @@ Component that was made reactive: `,
|
|
|
11688
11862
|
}
|
|
11689
11863
|
if (key === "width" || key === "height") {
|
|
11690
11864
|
const tag = el.tagName;
|
|
11691
|
-
|
|
11865
|
+
if (tag === "IMG" || tag === "VIDEO" || tag === "CANVAS" || tag === "SOURCE") {
|
|
11866
|
+
return false;
|
|
11867
|
+
}
|
|
11692
11868
|
}
|
|
11693
11869
|
if (isNativeOn(key) && isString(value)) {
|
|
11694
11870
|
return false;
|
|
@@ -12479,7 +12655,7 @@ Component that was made reactive: `,
|
|
|
12479
12655
|
}
|
|
12480
12656
|
}
|
|
12481
12657
|
container.innerHTML = "";
|
|
12482
|
-
const proxy = mount(container, false, container
|
|
12658
|
+
const proxy = mount(container, false, resolveRootNamespace(container));
|
|
12483
12659
|
if (container instanceof Element) {
|
|
12484
12660
|
container.removeAttribute("v-cloak");
|
|
12485
12661
|
container.setAttribute("data-v-app", "");
|
|
@@ -12498,14 +12674,22 @@ Component that was made reactive: `,
|
|
|
12498
12674
|
app.mount = (containerOrSelector) => {
|
|
12499
12675
|
const container = normalizeContainer(containerOrSelector);
|
|
12500
12676
|
if (container) {
|
|
12501
|
-
return mount(container, true, container
|
|
12677
|
+
return mount(container, true, resolveRootNamespace(container));
|
|
12502
12678
|
}
|
|
12503
12679
|
};
|
|
12504
12680
|
return app;
|
|
12505
12681
|
};
|
|
12682
|
+
function resolveRootNamespace(container) {
|
|
12683
|
+
if (container instanceof SVGElement) {
|
|
12684
|
+
return "svg";
|
|
12685
|
+
}
|
|
12686
|
+
if (typeof MathMLElement === "function" && container instanceof MathMLElement) {
|
|
12687
|
+
return "mathml";
|
|
12688
|
+
}
|
|
12689
|
+
}
|
|
12506
12690
|
function injectNativeTagCheck(app) {
|
|
12507
12691
|
Object.defineProperty(app.config, "isNativeTag", {
|
|
12508
|
-
value: (tag) => isHTMLTag(tag) || isSVGTag(tag),
|
|
12692
|
+
value: (tag) => isHTMLTag(tag) || isSVGTag(tag) || isMathMLTag(tag),
|
|
12509
12693
|
writable: false
|
|
12510
12694
|
});
|
|
12511
12695
|
}
|