@vue/shared 3.6.0-rc.1 → 3.6.0-rc.10

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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/shared v3.6.0-rc.1
2
+ * @vue/shared v3.6.0-rc.10
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -11,7 +11,7 @@
11
11
  * \/\*#\_\_PURE\_\_\*\/
12
12
  * So that they can be tree-shaken if necessary.
13
13
  */
14
- /* @__NO_SIDE_EFFECTS__ */
14
+ /*@__NO_SIDE_EFFECTS__*/
15
15
  function makeMap(str) {
16
16
  const map = Object.create(null);
17
17
  for (const key of str.split(",")) map[key] = 1;
@@ -59,9 +59,9 @@ const toRawType = (value) => {
59
59
  };
60
60
  const isPlainObject = (val) => toTypeString(val) === "[object Object]";
61
61
  const isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key;
62
- const isReservedProp = /* @__PURE__ */ makeMap(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted");
63
- const isBuiltInTag = /* @__PURE__ */ makeMap("slot,component");
64
- const isBuiltInDirective = /* @__PURE__ */ makeMap("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo");
62
+ const isReservedProp = /*@__PURE__*/ makeMap(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted");
63
+ const isBuiltInTag = /*#__PURE__*/ makeMap("slot,component");
64
+ const isBuiltInDirective = /*@__PURE__*/ makeMap("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo");
65
65
  const cacheStringFunction = (fn) => {
66
66
  const cache = Object.create(null);
67
67
  return ((str) => {
@@ -234,6 +234,8 @@ const ShapeFlags = {
234
234
  "256": "COMPONENT_SHOULD_KEEP_ALIVE",
235
235
  "COMPONENT_KEPT_ALIVE": 512,
236
236
  "512": "COMPONENT_KEPT_ALIVE",
237
+ "SLOT_FALLBACK": 1024,
238
+ "1024": "SLOT_FALLBACK",
237
239
  "COMPONENT": 6,
238
240
  "6": "COMPONENT"
239
241
  };
@@ -255,7 +257,7 @@ const slotFlagsText = {
255
257
  [2]: "DYNAMIC",
256
258
  [3]: "FORWARDED"
257
259
  };
258
- const isGloballyAllowed = /* @__PURE__ */ makeMap("Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol");
260
+ const isGloballyAllowed = /*@__PURE__*/ makeMap("Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol");
259
261
  /** @deprecated use `isGloballyAllowed` instead */
260
262
  const isGloballyWhitelisted = isGloballyAllowed;
261
263
  //#endregion
@@ -311,10 +313,10 @@ function normalizeStyle(value) {
311
313
  }
312
314
  const listDelimiterRE = /;(?![^(]*\))/g;
313
315
  const propertyDelimiterRE = /:([^]+)/;
314
- const styleCommentRE = /\/\*[^]*?\*\//g;
316
+ const styleCommentRE = /"(?:[^"\\]|\\[^])*"|'(?:[^'\\]|\\[^])*'|\\[^]|\/\*[^]*?\*\//g;
315
317
  function parseStringStyle(cssText) {
316
318
  const ret = {};
317
- cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => {
319
+ cssText.replace(styleCommentRE, (match) => match.startsWith("/*") ? "" : match).split(listDelimiterRE).forEach((item) => {
318
320
  if (item) {
319
321
  const tmp = item.split(propertyDelimiterRE);
320
322
  tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim());
@@ -361,49 +363,49 @@ const SVG_TAGS = "svg,animate,animateMotion,animateTransform,circle,clipPath,col
361
363
  const MATH_TAGS = "annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics";
362
364
  const VOID_TAGS = "area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr";
363
365
  const FORMATTING_TAGS = "a,b,big,code,em,font,i,nobr,s,small,strike,strong,tt,u";
364
- const ALWAYS_CLOSE_TAGS = "title,style,script,noscript,template,object,table,button,textarea,select,iframe,fieldset";
366
+ const ALWAYS_CLOSE_TAGS = "title,style,script,noscript,template,object,table,button,textarea,select,iframe,fieldset,form,foreignObject,desc,mi,mo,mn,ms,mtext,annotation-xml";
365
367
  const INLINE_TAGS = "a,abbr,acronym,b,bdi,bdo,big,br,button,canvas,cite,code,data,datalist,del,dfn,em,embed,i,iframe,img,input,ins,kbd,label,map,mark,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,small,span,strong,sub,sup,svg,textarea,time,u,tt,var,video";
366
368
  const BLOCK_TAGS = "address,article,aside,blockquote,dd,details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,li,main,menu,nav,ol,p,pre,section,table,ul";
367
369
  /**
368
370
  * Compiler only.
369
371
  * Do NOT use in runtime code paths unless behind `!!(process.env.NODE_ENV !== 'production')` flag.
370
372
  */
371
- const isHTMLTag = /* @__PURE__ */ makeMap(HTML_TAGS);
373
+ const isHTMLTag = /*@__PURE__*/ makeMap(HTML_TAGS);
372
374
  /**
373
375
  * Compiler only.
374
376
  * Do NOT use in runtime code paths unless behind `!!(process.env.NODE_ENV !== 'production')` flag.
375
377
  */
376
- const isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS);
378
+ const isSVGTag = /*@__PURE__*/ makeMap(SVG_TAGS);
377
379
  /**
378
380
  * Compiler only.
379
381
  * Do NOT use in runtime code paths unless behind `!!(process.env.NODE_ENV !== 'production')` flag.
380
382
  */
381
- const isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS);
383
+ const isMathMLTag = /*@__PURE__*/ makeMap(MATH_TAGS);
382
384
  /**
383
385
  * Compiler only.
384
386
  * Do NOT use in runtime code paths unless behind `!!(process.env.NODE_ENV !== 'production')` flag.
385
387
  */
386
- const isVoidTag = /* @__PURE__ */ makeMap(VOID_TAGS);
388
+ const isVoidTag = /*@__PURE__*/ makeMap(VOID_TAGS);
387
389
  /**
388
390
  * Compiler only.
389
391
  * Do NOT use in runtime code paths unless behind `!!(process.env.NODE_ENV !== 'production')` flag.
390
392
  */
391
- const isFormattingTag = /* @__PURE__ */ makeMap(FORMATTING_TAGS);
393
+ const isFormattingTag = /*@__PURE__*/ makeMap(FORMATTING_TAGS);
392
394
  /**
393
395
  * Compiler only.
394
396
  * Do NOT use in runtime code paths unless behind `!!(process.env.NODE_ENV !== 'production')` flag.
395
397
  */
396
- const isAlwaysCloseTag = /* @__PURE__ */ makeMap(ALWAYS_CLOSE_TAGS);
398
+ const isAlwaysCloseTag = /*@__PURE__*/ makeMap(ALWAYS_CLOSE_TAGS);
397
399
  /**
398
400
  * Compiler only.
399
401
  * Do NOT use in runtime code paths unless behind `!!(process.env.NODE_ENV !== 'production')` flag.
400
402
  */
401
- const isInlineTag = /* @__PURE__ */ makeMap(INLINE_TAGS);
403
+ const isInlineTag = /*@__PURE__*/ makeMap(INLINE_TAGS);
402
404
  /**
403
405
  * Compiler only.
404
406
  * Do NOT use in runtime code paths unless behind `!!(process.env.NODE_ENV !== 'production')` flag.
405
407
  */
406
- const isBlockTag = /* @__PURE__ */ makeMap(BLOCK_TAGS);
408
+ const isBlockTag = /*@__PURE__*/ makeMap(BLOCK_TAGS);
407
409
  //#endregion
408
410
  //#region packages/shared/src/domAttrConfig.ts
409
411
  /**
@@ -418,11 +420,11 @@ const isBlockTag = /* @__PURE__ */ makeMap(BLOCK_TAGS);
418
420
  * - readonly -> readOnly
419
421
  */
420
422
  const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;
421
- const isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs);
423
+ const isSpecialBooleanAttr = /*@__PURE__*/ makeMap(specialBooleanAttrs);
422
424
  /**
423
425
  * The full list is needed during SSR to produce the correct initial markup.
424
426
  */
425
- const isBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs + ",async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");
427
+ const isBooleanAttr = /*@__PURE__*/ makeMap(specialBooleanAttrs + ",async,autofocus,autoplay,controls,default,defer,disabled,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");
426
428
  /**
427
429
  * Boolean attributes should be included if the value is truthy or ''.
428
430
  * e.g. `<select multiple>` compiles to `{ multiple: '' }`
@@ -430,7 +432,7 @@ const isBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs + ",async,auto
430
432
  function includeBooleanAttr(value) {
431
433
  return !!value || value === "";
432
434
  }
433
- const unsafeAttrCharRE = /[>/="'\u0009\u000a\u000c\u0020]/;
435
+ const unsafeAttrCharRE = /[>/="'\u0009\u000a\u000c\u000d\u0020]/;
434
436
  const attrValidationCache = {};
435
437
  function isSSRSafeAttrName(name) {
436
438
  if (attrValidationCache.hasOwnProperty(name)) return attrValidationCache[name];
@@ -450,15 +452,15 @@ const propsToAttrMap = {
450
452
  * Don't also forget to allow `data-*` and `aria-*`!
451
453
  * Generated from https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes
452
454
  */
453
- const isKnownHtmlAttr = /* @__PURE__ */ makeMap("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");
455
+ const isKnownHtmlAttr = /*@__PURE__*/ makeMap("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");
454
456
  /**
455
457
  * Generated from https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute
456
458
  */
457
- const isKnownSvgAttr = /* @__PURE__ */ makeMap("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");
459
+ const isKnownSvgAttr = /*@__PURE__*/ makeMap("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");
458
460
  /**
459
461
  * Generated from https://developer.mozilla.org/en-US/docs/Web/MathML/Attribute
460
462
  */
461
- const isKnownMathMLAttr = /* @__PURE__ */ makeMap("accent,accentunder,actiontype,align,alignmentscope,altimg,altimg-height,altimg-valign,altimg-width,alttext,bevelled,close,columnsalign,columnlines,columnspan,denomalign,depth,dir,display,displaystyle,encoding,equalcolumns,equalrows,fence,fontstyle,fontweight,form,frame,framespacing,groupalign,height,href,id,indentalign,indentalignfirst,indentalignlast,indentshift,indentshiftfirst,indentshiftlast,indextype,justify,largetop,largeop,lquote,lspace,mathbackground,mathcolor,mathsize,mathvariant,maxsize,minlabelspacing,mode,other,overflow,position,rowalign,rowlines,rowspan,rquote,rspace,scriptlevel,scriptminsize,scriptsizemultiplier,selection,separator,separators,shift,side,src,stackalign,stretchy,subscriptshift,superscriptshift,symmetric,voffset,width,widths,xlink:href,xlink:show,xlink:type,xmlns");
463
+ const isKnownMathMLAttr = /*@__PURE__*/ makeMap("accent,accentunder,actiontype,align,alignmentscope,altimg,altimg-height,altimg-valign,altimg-width,alttext,bevelled,close,columnsalign,columnlines,columnspan,denomalign,depth,dir,display,displaystyle,encoding,equalcolumns,equalrows,fence,fontstyle,fontweight,form,frame,framespacing,groupalign,height,href,id,indentalign,indentalignfirst,indentalignlast,indentshift,indentshiftfirst,indentshiftlast,indextype,justify,largetop,largeop,lquote,lspace,mathbackground,mathcolor,mathsize,mathvariant,maxsize,minlabelspacing,mode,other,overflow,position,rowalign,rowlines,rowspan,rquote,rspace,scriptlevel,scriptminsize,scriptsizemultiplier,selection,separator,separators,shift,side,src,stackalign,stretchy,subscriptshift,superscriptshift,symmetric,voffset,width,widths,xlink:href,xlink:show,xlink:type,xmlns");
462
464
  /**
463
465
  * Shared between server-renderer and runtime-core hydration logic
464
466
  */
@@ -537,13 +539,54 @@ function getEscapedCssVarName(key, doubleEscape) {
537
539
  }
538
540
  //#endregion
539
541
  //#region packages/shared/src/looseEqual.ts
540
- function looseCompareArrays(a, b) {
542
+ function looseCompareArrays(a, b, seen) {
541
543
  if (a.length !== b.length) return false;
542
544
  let equal = true;
543
- for (let i = 0; equal && i < a.length; i++) equal = looseEqual(a[i], b[i]);
545
+ for (let i = 0; equal && i < a.length; i++) equal = looseEqual(a[i], b[i], seen);
544
546
  return equal;
545
547
  }
546
- function looseEqual(a, b) {
548
+ function looseCompareCollections(a, b, seen) {
549
+ if (a.size !== b.size) return false;
550
+ const candidates = Array.from(b);
551
+ const matched = new Uint8Array(candidates.length);
552
+ for (const item of a) {
553
+ let index = -1;
554
+ for (let i = 0; i < candidates.length; i++) if (!matched[i] && looseEqual(item, candidates[i], seen)) {
555
+ index = i;
556
+ break;
557
+ }
558
+ if (index < 0) return false;
559
+ matched[index] = 1;
560
+ }
561
+ return true;
562
+ }
563
+ function looseCompareObjects(a, b, seen) {
564
+ let aValidType = isMap(a);
565
+ let bValidType = isMap(b);
566
+ if (aValidType || bValidType) return aValidType && bValidType ? looseCompareCollections(a, b, seen) : false;
567
+ aValidType = isSet(a);
568
+ bValidType = isSet(b);
569
+ if (aValidType || bValidType) return aValidType && bValidType ? looseCompareCollections(a, b, seen) : false;
570
+ if (Object.keys(a).length !== Object.keys(b).length) return false;
571
+ for (const key in a) {
572
+ const aHasKey = a.hasOwnProperty(key);
573
+ const bHasKey = b.hasOwnProperty(key);
574
+ if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key], seen)) return false;
575
+ }
576
+ return String(a) === String(b);
577
+ }
578
+ function looseCompareNested(a, b, seen, compare) {
579
+ if (!seen) seen = [/* @__PURE__ */ new Map(), /* @__PURE__ */ new Map()];
580
+ const [seenA, seenB] = seen;
581
+ if (seenA.has(a) || seenB.has(b)) return seenA.get(a) === b && seenB.get(b) === a;
582
+ seenA.set(a, b);
583
+ seenB.set(b, a);
584
+ const equal = compare(a, b, seen);
585
+ seenA.delete(a);
586
+ seenB.delete(b);
587
+ return equal;
588
+ }
589
+ function looseEqual(a, b, seen) {
547
590
  if (a === b) return true;
548
591
  let aValidType = isDate(a);
549
592
  let bValidType = isDate(b);
@@ -553,17 +596,12 @@ function looseEqual(a, b) {
553
596
  if (aValidType || bValidType) return a === b;
554
597
  aValidType = isArray(a);
555
598
  bValidType = isArray(b);
556
- if (aValidType || bValidType) return aValidType && bValidType ? looseCompareArrays(a, b) : false;
599
+ if (aValidType || bValidType) return aValidType && bValidType ? looseCompareNested(a, b, seen, looseCompareArrays) : false;
557
600
  aValidType = isObject(a);
558
601
  bValidType = isObject(b);
559
602
  if (aValidType || bValidType) {
560
603
  if (!aValidType || !bValidType) return false;
561
- if (Object.keys(a).length !== Object.keys(b).length) return false;
562
- for (const key in a) {
563
- const aHasKey = a.hasOwnProperty(key);
564
- const bHasKey = b.hasOwnProperty(key);
565
- if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key])) return false;
566
- }
604
+ return looseCompareNested(a, b, seen, looseCompareObjects);
567
605
  }
568
606
  return String(a) === String(b);
569
607
  }
@@ -673,7 +711,9 @@ const VaporVForFlags = {
673
711
  "IS_FRAGMENT": 16,
674
712
  "16": "IS_FRAGMENT",
675
713
  "SLOT_ROOT": 32,
676
- "32": "SLOT_ROOT"
714
+ "32": "SLOT_ROOT",
715
+ "WRAPPED_ROWS": 64,
716
+ "64": "WRAPPED_ROWS"
677
717
  };
678
718
  const VaporBlockShape = {
679
719
  "EMPTY": 0,
@@ -731,10 +771,26 @@ const VaporSlotFlags = {
731
771
  "1": "NO_SLOTTED",
732
772
  "ONCE": 2,
733
773
  "2": "ONCE",
734
- "SLOT_ROOT": 4,
735
- "4": "SLOT_ROOT",
736
- "NON_STABLE": 8,
737
- "8": "NON_STABLE"
774
+ "FORWARDED": 4,
775
+ "4": "FORWARDED",
776
+ "SHARED_FALLBACK": 8,
777
+ "8": "SHARED_FALLBACK"
778
+ };
779
+ function isForwardedSlot(flags) {
780
+ return !!(flags & 12);
781
+ }
782
+ function slotInheritsFallback(flags) {
783
+ return isForwardedSlot(flags) && !(flags & 8);
784
+ }
785
+ function slotNotifiesBoundary(flags) {
786
+ return isForwardedSlot(flags) && !(flags & 2);
787
+ }
788
+ /**
789
+ * Per-slot-function metadata attached by the compiler as `fn._`.
790
+ */
791
+ const VaporSlotStability = {
792
+ "NON_STABLE": 1,
793
+ "1": "NON_STABLE"
738
794
  };
739
795
  const VaporDynamicComponentFlags = {
740
796
  "SINGLE_ROOT": 1,
@@ -742,7 +798,11 @@ const VaporDynamicComponentFlags = {
742
798
  "ONCE": 2,
743
799
  "2": "ONCE",
744
800
  "SLOT_ROOT": 4,
745
- "4": "SLOT_ROOT"
801
+ "4": "SLOT_ROOT",
802
+ "NS_SVG": 8,
803
+ "8": "NS_SVG",
804
+ "NS_MATHML": 16,
805
+ "16": "NS_MATHML"
746
806
  };
747
807
  //#endregion
748
- export { EMPTY_ARR, EMPTY_OBJ, NO, NOOP, Namespaces, PatchFlagNames, PatchFlags, ShapeFlags, SlotFlags, TemplateFlags, VaporBlockShape, VaporDynamicComponentFlags, VaporIfFlags, VaporSlotFlags, VaporVForFlags, YES, camelize, canSetValueDirectly, capitalize, cssVarNameEscapeSymbolsRE, def, escapeHtml, escapeHtmlComment, extend, genCacheKey, genPropsAccessExp, generateCodeFrame, getEscapedCssVarName, getGlobalThis, getModifierPropName, getSequence, hasChanged, hasOwn, hyphenate, includeBooleanAttr, invokeArrayFns, isAlwaysCloseTag, isArray, isBlockTag, isBooleanAttr, isBuiltInDirective, isBuiltInTag, isDate, isFormattingTag, isFunction, isGloballyAllowed, isGloballyWhitelisted, isHTMLTag, isInlineTag, isIntegerKey, isKnownHtmlAttr, isKnownMathMLAttr, isKnownSvgAttr, isMap, isMathMLTag, isModelListener, isNativeOn, isObject, isOn, isPlainObject, isPromise, isRegExp, isRenderableAttrValue, isReservedProp, isSSRSafeAttrName, isSVGTag, isSet, isSpecialBooleanAttr, isString, isSymbol, isVoidTag, looseEqual, looseIndexOf, looseToNumber, makeMap, normalizeClass, normalizeCssVarValue, normalizeProps, normalizeStyle, objectToString, parseStringStyle, propsToAttrMap, remove, shouldSetAsAttr, slotFlagsText, stringifyStyle, toDisplayString, toHandlerKey, toNumber, toRawType, toTypeString };
808
+ export { EMPTY_ARR, EMPTY_OBJ, NO, NOOP, Namespaces, PatchFlagNames, PatchFlags, ShapeFlags, SlotFlags, TemplateFlags, VaporBlockShape, VaporDynamicComponentFlags, VaporIfFlags, VaporSlotFlags, VaporSlotStability, VaporVForFlags, YES, camelize, canSetValueDirectly, capitalize, cssVarNameEscapeSymbolsRE, def, escapeHtml, escapeHtmlComment, extend, genCacheKey, genPropsAccessExp, generateCodeFrame, getEscapedCssVarName, getGlobalThis, getModifierPropName, getSequence, hasChanged, hasOwn, hyphenate, includeBooleanAttr, invokeArrayFns, isAlwaysCloseTag, isArray, isBlockTag, isBooleanAttr, isBuiltInDirective, isBuiltInTag, isDate, isFormattingTag, isForwardedSlot, isFunction, isGloballyAllowed, isGloballyWhitelisted, isHTMLTag, isInlineTag, isIntegerKey, isKnownHtmlAttr, isKnownMathMLAttr, isKnownSvgAttr, isMap, isMathMLTag, isModelListener, isNativeOn, isObject, isOn, isPlainObject, isPromise, isRegExp, isRenderableAttrValue, isReservedProp, isSSRSafeAttrName, isSVGTag, isSet, isSpecialBooleanAttr, isString, isSymbol, isVoidTag, looseEqual, looseIndexOf, looseToNumber, makeMap, normalizeClass, normalizeCssVarValue, normalizeProps, normalizeStyle, objectToString, parseStringStyle, propsToAttrMap, remove, shouldSetAsAttr, slotFlagsText, slotInheritsFallback, slotNotifiesBoundary, stringifyStyle, toDisplayString, toHandlerKey, toNumber, toRawType, toTypeString };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vue/shared",
3
- "version": "3.6.0-rc.1",
3
+ "version": "3.6.0-rc.10",
4
4
  "description": "internal utils shared across @vue packages",
5
5
  "main": "index.js",
6
6
  "module": "dist/shared.esm-bundler.js",