@vue/shared 3.6.0-rc.12 → 3.6.0-rc.14
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/shared.cjs.js +31 -17
- package/dist/shared.cjs.prod.js +31 -17
- package/dist/shared.d.ts +26 -12
- package/dist/shared.esm-bundler.js +30 -16
- package/package.json +1 -1
package/dist/shared.cjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/shared v3.6.0-rc.
|
|
2
|
+
* @vue/shared v3.6.0-rc.14
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -368,8 +368,6 @@ const MATH_TAGS = "annotation,annotation-xml,maction,maligngroup,malignmark,math
|
|
|
368
368
|
const VOID_TAGS = "area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr";
|
|
369
369
|
const FORMATTING_TAGS = "a,b,big,code,em,font,i,nobr,s,small,strike,strong,tt,u";
|
|
370
370
|
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";
|
|
371
|
-
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";
|
|
372
|
-
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";
|
|
373
371
|
/**
|
|
374
372
|
* Compiler only.
|
|
375
373
|
* Do NOT use in runtime code paths unless behind `__DEV__` flag.
|
|
@@ -400,16 +398,6 @@ const isFormattingTag = /*@__PURE__*/ makeMap(FORMATTING_TAGS);
|
|
|
400
398
|
* Do NOT use in runtime code paths unless behind `__DEV__` flag.
|
|
401
399
|
*/
|
|
402
400
|
const isAlwaysCloseTag = /*@__PURE__*/ makeMap(ALWAYS_CLOSE_TAGS);
|
|
403
|
-
/**
|
|
404
|
-
* Compiler only.
|
|
405
|
-
* Do NOT use in runtime code paths unless behind `__DEV__` flag.
|
|
406
|
-
*/
|
|
407
|
-
const isInlineTag = /*@__PURE__*/ makeMap(INLINE_TAGS);
|
|
408
|
-
/**
|
|
409
|
-
* Compiler only.
|
|
410
|
-
* Do NOT use in runtime code paths unless behind `__DEV__` flag.
|
|
411
|
-
*/
|
|
412
|
-
const isBlockTag = /*@__PURE__*/ makeMap(BLOCK_TAGS);
|
|
413
401
|
//#endregion
|
|
414
402
|
//#region packages/shared/src/domAttrConfig.ts
|
|
415
403
|
/**
|
|
@@ -724,7 +712,9 @@ const VaporBlockShape = {
|
|
|
724
712
|
"SINGLE_ROOT": 1,
|
|
725
713
|
"1": "SINGLE_ROOT",
|
|
726
714
|
"MULTI_ROOT": 2,
|
|
727
|
-
"2": "MULTI_ROOT"
|
|
715
|
+
"2": "MULTI_ROOT",
|
|
716
|
+
"ELSE_IF": 3,
|
|
717
|
+
"3": "ELSE_IF"
|
|
728
718
|
};
|
|
729
719
|
/**
|
|
730
720
|
* Bit layout for vapor `createIf` flags.
|
|
@@ -780,6 +770,19 @@ const VaporSlotFlags = {
|
|
|
780
770
|
function isForwardedSlot(flags) {
|
|
781
771
|
return !!(flags & 4);
|
|
782
772
|
}
|
|
773
|
+
/**
|
|
774
|
+
* The data of the comment a vapor server render opens the branch of a `v-if`
|
|
775
|
+
* chain with, `<!--[1-->`: the digits are the branch's position in the chain,
|
|
776
|
+
* and `<!--]-->` closes it like a fragment.
|
|
777
|
+
*/
|
|
778
|
+
function isVaporBranchStart(data) {
|
|
779
|
+
if (data.length < 2 || data.charCodeAt(0) !== 91) return false;
|
|
780
|
+
for (let i = 1; i < data.length; i++) {
|
|
781
|
+
const c = data.charCodeAt(i);
|
|
782
|
+
if (c < 48 || c > 57) return false;
|
|
783
|
+
}
|
|
784
|
+
return true;
|
|
785
|
+
}
|
|
783
786
|
function slotNotifiesBoundary(flags) {
|
|
784
787
|
return isForwardedSlot(flags) && !(flags & 2);
|
|
785
788
|
}
|
|
@@ -800,7 +803,18 @@ const VaporDynamicComponentFlags = {
|
|
|
800
803
|
"NS_SVG": 8,
|
|
801
804
|
"8": "NS_SVG",
|
|
802
805
|
"NS_MATHML": 16,
|
|
803
|
-
"16": "NS_MATHML"
|
|
806
|
+
"16": "NS_MATHML",
|
|
807
|
+
"SLOT_SINGLE_ROOT": 32,
|
|
808
|
+
"32": "SLOT_SINGLE_ROOT"
|
|
809
|
+
};
|
|
810
|
+
/**
|
|
811
|
+
* `isSingleRoot` of a component creation call for the single root of a slot
|
|
812
|
+
* body (`true` marks the single root of a component template). See
|
|
813
|
+
* resolveFallthroughOwner in runtime-vapor.
|
|
814
|
+
*/
|
|
815
|
+
const VaporSingleRoot = {
|
|
816
|
+
"SLOT": 2,
|
|
817
|
+
"2": "SLOT"
|
|
804
818
|
};
|
|
805
819
|
//#endregion
|
|
806
820
|
exports.EMPTY_ARR = EMPTY_ARR;
|
|
@@ -816,6 +830,7 @@ exports.TemplateFlags = TemplateFlags;
|
|
|
816
830
|
exports.VaporBlockShape = VaporBlockShape;
|
|
817
831
|
exports.VaporDynamicComponentFlags = VaporDynamicComponentFlags;
|
|
818
832
|
exports.VaporIfFlags = VaporIfFlags;
|
|
833
|
+
exports.VaporSingleRoot = VaporSingleRoot;
|
|
819
834
|
exports.VaporSlotFlags = VaporSlotFlags;
|
|
820
835
|
exports.VaporSlotStability = VaporSlotStability;
|
|
821
836
|
exports.VaporVForFlags = VaporVForFlags;
|
|
@@ -842,7 +857,6 @@ exports.includeBooleanAttr = includeBooleanAttr;
|
|
|
842
857
|
exports.invokeArrayFns = invokeArrayFns;
|
|
843
858
|
exports.isAlwaysCloseTag = isAlwaysCloseTag;
|
|
844
859
|
exports.isArray = isArray;
|
|
845
|
-
exports.isBlockTag = isBlockTag;
|
|
846
860
|
exports.isBooleanAttr = isBooleanAttr;
|
|
847
861
|
exports.isBuiltInDirective = isBuiltInDirective;
|
|
848
862
|
exports.isBuiltInTag = isBuiltInTag;
|
|
@@ -853,7 +867,6 @@ exports.isFunction = isFunction;
|
|
|
853
867
|
exports.isGloballyAllowed = isGloballyAllowed;
|
|
854
868
|
exports.isGloballyWhitelisted = isGloballyWhitelisted;
|
|
855
869
|
exports.isHTMLTag = isHTMLTag;
|
|
856
|
-
exports.isInlineTag = isInlineTag;
|
|
857
870
|
exports.isIntegerKey = isIntegerKey;
|
|
858
871
|
exports.isKnownHtmlAttr = isKnownHtmlAttr;
|
|
859
872
|
exports.isKnownMathMLAttr = isKnownMathMLAttr;
|
|
@@ -875,6 +888,7 @@ exports.isSet = isSet;
|
|
|
875
888
|
exports.isSpecialBooleanAttr = isSpecialBooleanAttr;
|
|
876
889
|
exports.isString = isString;
|
|
877
890
|
exports.isSymbol = isSymbol;
|
|
891
|
+
exports.isVaporBranchStart = isVaporBranchStart;
|
|
878
892
|
exports.isVoidTag = isVoidTag;
|
|
879
893
|
exports.looseEqual = looseEqual;
|
|
880
894
|
exports.looseIndexOf = looseIndexOf;
|
package/dist/shared.cjs.prod.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/shared v3.6.0-rc.
|
|
2
|
+
* @vue/shared v3.6.0-rc.14
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -368,8 +368,6 @@ const MATH_TAGS = "annotation,annotation-xml,maction,maligngroup,malignmark,math
|
|
|
368
368
|
const VOID_TAGS = "area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr";
|
|
369
369
|
const FORMATTING_TAGS = "a,b,big,code,em,font,i,nobr,s,small,strike,strong,tt,u";
|
|
370
370
|
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";
|
|
371
|
-
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";
|
|
372
|
-
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";
|
|
373
371
|
/**
|
|
374
372
|
* Compiler only.
|
|
375
373
|
* Do NOT use in runtime code paths unless behind `__DEV__` flag.
|
|
@@ -400,16 +398,6 @@ const isFormattingTag = /*@__PURE__*/ makeMap(FORMATTING_TAGS);
|
|
|
400
398
|
* Do NOT use in runtime code paths unless behind `__DEV__` flag.
|
|
401
399
|
*/
|
|
402
400
|
const isAlwaysCloseTag = /*@__PURE__*/ makeMap(ALWAYS_CLOSE_TAGS);
|
|
403
|
-
/**
|
|
404
|
-
* Compiler only.
|
|
405
|
-
* Do NOT use in runtime code paths unless behind `__DEV__` flag.
|
|
406
|
-
*/
|
|
407
|
-
const isInlineTag = /*@__PURE__*/ makeMap(INLINE_TAGS);
|
|
408
|
-
/**
|
|
409
|
-
* Compiler only.
|
|
410
|
-
* Do NOT use in runtime code paths unless behind `__DEV__` flag.
|
|
411
|
-
*/
|
|
412
|
-
const isBlockTag = /*@__PURE__*/ makeMap(BLOCK_TAGS);
|
|
413
401
|
//#endregion
|
|
414
402
|
//#region packages/shared/src/domAttrConfig.ts
|
|
415
403
|
/**
|
|
@@ -724,7 +712,9 @@ const VaporBlockShape = {
|
|
|
724
712
|
"SINGLE_ROOT": 1,
|
|
725
713
|
"1": "SINGLE_ROOT",
|
|
726
714
|
"MULTI_ROOT": 2,
|
|
727
|
-
"2": "MULTI_ROOT"
|
|
715
|
+
"2": "MULTI_ROOT",
|
|
716
|
+
"ELSE_IF": 3,
|
|
717
|
+
"3": "ELSE_IF"
|
|
728
718
|
};
|
|
729
719
|
/**
|
|
730
720
|
* Bit layout for vapor `createIf` flags.
|
|
@@ -780,6 +770,19 @@ const VaporSlotFlags = {
|
|
|
780
770
|
function isForwardedSlot(flags) {
|
|
781
771
|
return !!(flags & 4);
|
|
782
772
|
}
|
|
773
|
+
/**
|
|
774
|
+
* The data of the comment a vapor server render opens the branch of a `v-if`
|
|
775
|
+
* chain with, `<!--[1-->`: the digits are the branch's position in the chain,
|
|
776
|
+
* and `<!--]-->` closes it like a fragment.
|
|
777
|
+
*/
|
|
778
|
+
function isVaporBranchStart(data) {
|
|
779
|
+
if (data.length < 2 || data.charCodeAt(0) !== 91) return false;
|
|
780
|
+
for (let i = 1; i < data.length; i++) {
|
|
781
|
+
const c = data.charCodeAt(i);
|
|
782
|
+
if (c < 48 || c > 57) return false;
|
|
783
|
+
}
|
|
784
|
+
return true;
|
|
785
|
+
}
|
|
783
786
|
function slotNotifiesBoundary(flags) {
|
|
784
787
|
return isForwardedSlot(flags) && !(flags & 2);
|
|
785
788
|
}
|
|
@@ -800,7 +803,18 @@ const VaporDynamicComponentFlags = {
|
|
|
800
803
|
"NS_SVG": 8,
|
|
801
804
|
"8": "NS_SVG",
|
|
802
805
|
"NS_MATHML": 16,
|
|
803
|
-
"16": "NS_MATHML"
|
|
806
|
+
"16": "NS_MATHML",
|
|
807
|
+
"SLOT_SINGLE_ROOT": 32,
|
|
808
|
+
"32": "SLOT_SINGLE_ROOT"
|
|
809
|
+
};
|
|
810
|
+
/**
|
|
811
|
+
* `isSingleRoot` of a component creation call for the single root of a slot
|
|
812
|
+
* body (`true` marks the single root of a component template). See
|
|
813
|
+
* resolveFallthroughOwner in runtime-vapor.
|
|
814
|
+
*/
|
|
815
|
+
const VaporSingleRoot = {
|
|
816
|
+
"SLOT": 2,
|
|
817
|
+
"2": "SLOT"
|
|
804
818
|
};
|
|
805
819
|
//#endregion
|
|
806
820
|
exports.EMPTY_ARR = EMPTY_ARR;
|
|
@@ -816,6 +830,7 @@ exports.TemplateFlags = TemplateFlags;
|
|
|
816
830
|
exports.VaporBlockShape = VaporBlockShape;
|
|
817
831
|
exports.VaporDynamicComponentFlags = VaporDynamicComponentFlags;
|
|
818
832
|
exports.VaporIfFlags = VaporIfFlags;
|
|
833
|
+
exports.VaporSingleRoot = VaporSingleRoot;
|
|
819
834
|
exports.VaporSlotFlags = VaporSlotFlags;
|
|
820
835
|
exports.VaporSlotStability = VaporSlotStability;
|
|
821
836
|
exports.VaporVForFlags = VaporVForFlags;
|
|
@@ -842,7 +857,6 @@ exports.includeBooleanAttr = includeBooleanAttr;
|
|
|
842
857
|
exports.invokeArrayFns = invokeArrayFns;
|
|
843
858
|
exports.isAlwaysCloseTag = isAlwaysCloseTag;
|
|
844
859
|
exports.isArray = isArray;
|
|
845
|
-
exports.isBlockTag = isBlockTag;
|
|
846
860
|
exports.isBooleanAttr = isBooleanAttr;
|
|
847
861
|
exports.isBuiltInDirective = isBuiltInDirective;
|
|
848
862
|
exports.isBuiltInTag = isBuiltInTag;
|
|
@@ -853,7 +867,6 @@ exports.isFunction = isFunction;
|
|
|
853
867
|
exports.isGloballyAllowed = isGloballyAllowed;
|
|
854
868
|
exports.isGloballyWhitelisted = isGloballyWhitelisted;
|
|
855
869
|
exports.isHTMLTag = isHTMLTag;
|
|
856
|
-
exports.isInlineTag = isInlineTag;
|
|
857
870
|
exports.isIntegerKey = isIntegerKey;
|
|
858
871
|
exports.isKnownHtmlAttr = isKnownHtmlAttr;
|
|
859
872
|
exports.isKnownMathMLAttr = isKnownMathMLAttr;
|
|
@@ -875,6 +888,7 @@ exports.isSet = isSet;
|
|
|
875
888
|
exports.isSpecialBooleanAttr = isSpecialBooleanAttr;
|
|
876
889
|
exports.isString = isString;
|
|
877
890
|
exports.isSymbol = isSymbol;
|
|
891
|
+
exports.isVaporBranchStart = isVaporBranchStart;
|
|
878
892
|
exports.isVoidTag = isVoidTag;
|
|
879
893
|
exports.looseEqual = looseEqual;
|
|
880
894
|
exports.looseIndexOf = looseIndexOf;
|
package/dist/shared.d.ts
CHANGED
|
@@ -294,16 +294,6 @@ export declare const isFormattingTag: (key: string) => boolean;
|
|
|
294
294
|
* Do NOT use in runtime code paths unless behind `__DEV__` flag.
|
|
295
295
|
*/
|
|
296
296
|
export declare const isAlwaysCloseTag: (key: string) => boolean;
|
|
297
|
-
/**
|
|
298
|
-
* Compiler only.
|
|
299
|
-
* Do NOT use in runtime code paths unless behind `__DEV__` flag.
|
|
300
|
-
*/
|
|
301
|
-
export declare const isInlineTag: (key: string) => boolean;
|
|
302
|
-
/**
|
|
303
|
-
* Compiler only.
|
|
304
|
-
* Do NOT use in runtime code paths unless behind `__DEV__` flag.
|
|
305
|
-
*/
|
|
306
|
-
export declare const isBlockTag: (key: string) => boolean;
|
|
307
297
|
//#endregion
|
|
308
298
|
//#region temp/packages/shared/src/domAttrConfig.d.ts
|
|
309
299
|
export declare const isSpecialBooleanAttr: (key: string) => boolean;
|
|
@@ -438,7 +428,12 @@ export declare enum VaporVForFlags {
|
|
|
438
428
|
export declare enum VaporBlockShape {
|
|
439
429
|
EMPTY = 0,
|
|
440
430
|
SINGLE_ROOT = 1,
|
|
441
|
-
MULTI_ROOT = 2
|
|
431
|
+
MULTI_ROOT = 2,
|
|
432
|
+
/**
|
|
433
|
+
* A `createIf` false branch that is the `v-else-if` rest of the chain: a
|
|
434
|
+
* nested `createIf` that renders the chain's later branches.
|
|
435
|
+
*/
|
|
436
|
+
ELSE_IF = 3
|
|
442
437
|
}
|
|
443
438
|
/**
|
|
444
439
|
* Bit layout for vapor `createIf` flags.
|
|
@@ -459,6 +454,10 @@ export declare enum VaporIfFlags {
|
|
|
459
454
|
/**
|
|
460
455
|
* Documents the packed true/false branch shape bits. Runtime decode shifts
|
|
461
456
|
* to the selected branch first, then masks with 0b11 for one VaporBlockShape.
|
|
457
|
+
*
|
|
458
|
+
* `createIfChain` splits the same bits across two arguments: each branch
|
|
459
|
+
* flags entry holds that branch's shape with `TRUE_NO_SCOPE`, the chain
|
|
460
|
+
* flags hold `ONCE`, `SLOT_ROOT` and the keyed index.
|
|
462
461
|
*/
|
|
463
462
|
BLOCK_SHAPE = 15,
|
|
464
463
|
/**
|
|
@@ -504,6 +503,12 @@ export declare enum VaporSlotFlags {
|
|
|
504
503
|
FORWARDED = 4
|
|
505
504
|
}
|
|
506
505
|
export declare function isForwardedSlot(flags: number): boolean;
|
|
506
|
+
/**
|
|
507
|
+
* The data of the comment a vapor server render opens the branch of a `v-if`
|
|
508
|
+
* chain with, `<!--[1-->`: the digits are the branch's position in the chain,
|
|
509
|
+
* and `<!--]-->` closes it like a fragment.
|
|
510
|
+
*/
|
|
511
|
+
export declare function isVaporBranchStart(data: string): boolean;
|
|
507
512
|
export declare function slotNotifiesBoundary(flags: number): boolean;
|
|
508
513
|
/**
|
|
509
514
|
* Per-slot-function metadata attached by the compiler as `fn._`.
|
|
@@ -516,6 +521,15 @@ export declare enum VaporDynamicComponentFlags {
|
|
|
516
521
|
ONCE = 2,
|
|
517
522
|
SLOT_ROOT = 4,
|
|
518
523
|
NS_SVG = 8,
|
|
519
|
-
NS_MATHML = 16
|
|
524
|
+
NS_MATHML = 16,
|
|
525
|
+
SLOT_SINGLE_ROOT = 32
|
|
526
|
+
}
|
|
527
|
+
/**
|
|
528
|
+
* `isSingleRoot` of a component creation call for the single root of a slot
|
|
529
|
+
* body (`true` marks the single root of a component template). See
|
|
530
|
+
* resolveFallthroughOwner in runtime-vapor.
|
|
531
|
+
*/
|
|
532
|
+
export declare enum VaporSingleRoot {
|
|
533
|
+
SLOT = 2
|
|
520
534
|
}
|
|
521
535
|
//#endregion
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/shared v3.6.0-rc.
|
|
2
|
+
* @vue/shared v3.6.0-rc.14
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -364,8 +364,6 @@ const MATH_TAGS = "annotation,annotation-xml,maction,maligngroup,malignmark,math
|
|
|
364
364
|
const VOID_TAGS = "area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr";
|
|
365
365
|
const FORMATTING_TAGS = "a,b,big,code,em,font,i,nobr,s,small,strike,strong,tt,u";
|
|
366
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";
|
|
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";
|
|
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";
|
|
369
367
|
/**
|
|
370
368
|
* Compiler only.
|
|
371
369
|
* Do NOT use in runtime code paths unless behind `!!(process.env.NODE_ENV !== 'production')` flag.
|
|
@@ -396,16 +394,6 @@ const isFormattingTag = /*@__PURE__*/ makeMap(FORMATTING_TAGS);
|
|
|
396
394
|
* Do NOT use in runtime code paths unless behind `!!(process.env.NODE_ENV !== 'production')` flag.
|
|
397
395
|
*/
|
|
398
396
|
const isAlwaysCloseTag = /*@__PURE__*/ makeMap(ALWAYS_CLOSE_TAGS);
|
|
399
|
-
/**
|
|
400
|
-
* Compiler only.
|
|
401
|
-
* Do NOT use in runtime code paths unless behind `!!(process.env.NODE_ENV !== 'production')` flag.
|
|
402
|
-
*/
|
|
403
|
-
const isInlineTag = /*@__PURE__*/ makeMap(INLINE_TAGS);
|
|
404
|
-
/**
|
|
405
|
-
* Compiler only.
|
|
406
|
-
* Do NOT use in runtime code paths unless behind `!!(process.env.NODE_ENV !== 'production')` flag.
|
|
407
|
-
*/
|
|
408
|
-
const isBlockTag = /*@__PURE__*/ makeMap(BLOCK_TAGS);
|
|
409
397
|
//#endregion
|
|
410
398
|
//#region packages/shared/src/domAttrConfig.ts
|
|
411
399
|
/**
|
|
@@ -722,7 +710,9 @@ const VaporBlockShape = {
|
|
|
722
710
|
"SINGLE_ROOT": 1,
|
|
723
711
|
"1": "SINGLE_ROOT",
|
|
724
712
|
"MULTI_ROOT": 2,
|
|
725
|
-
"2": "MULTI_ROOT"
|
|
713
|
+
"2": "MULTI_ROOT",
|
|
714
|
+
"ELSE_IF": 3,
|
|
715
|
+
"3": "ELSE_IF"
|
|
726
716
|
};
|
|
727
717
|
/**
|
|
728
718
|
* Bit layout for vapor `createIf` flags.
|
|
@@ -778,6 +768,19 @@ const VaporSlotFlags = {
|
|
|
778
768
|
function isForwardedSlot(flags) {
|
|
779
769
|
return !!(flags & 4);
|
|
780
770
|
}
|
|
771
|
+
/**
|
|
772
|
+
* The data of the comment a vapor server render opens the branch of a `v-if`
|
|
773
|
+
* chain with, `<!--[1-->`: the digits are the branch's position in the chain,
|
|
774
|
+
* and `<!--]-->` closes it like a fragment.
|
|
775
|
+
*/
|
|
776
|
+
function isVaporBranchStart(data) {
|
|
777
|
+
if (data.length < 2 || data.charCodeAt(0) !== 91) return false;
|
|
778
|
+
for (let i = 1; i < data.length; i++) {
|
|
779
|
+
const c = data.charCodeAt(i);
|
|
780
|
+
if (c < 48 || c > 57) return false;
|
|
781
|
+
}
|
|
782
|
+
return true;
|
|
783
|
+
}
|
|
781
784
|
function slotNotifiesBoundary(flags) {
|
|
782
785
|
return isForwardedSlot(flags) && !(flags & 2);
|
|
783
786
|
}
|
|
@@ -798,7 +801,18 @@ const VaporDynamicComponentFlags = {
|
|
|
798
801
|
"NS_SVG": 8,
|
|
799
802
|
"8": "NS_SVG",
|
|
800
803
|
"NS_MATHML": 16,
|
|
801
|
-
"16": "NS_MATHML"
|
|
804
|
+
"16": "NS_MATHML",
|
|
805
|
+
"SLOT_SINGLE_ROOT": 32,
|
|
806
|
+
"32": "SLOT_SINGLE_ROOT"
|
|
807
|
+
};
|
|
808
|
+
/**
|
|
809
|
+
* `isSingleRoot` of a component creation call for the single root of a slot
|
|
810
|
+
* body (`true` marks the single root of a component template). See
|
|
811
|
+
* resolveFallthroughOwner in runtime-vapor.
|
|
812
|
+
*/
|
|
813
|
+
const VaporSingleRoot = {
|
|
814
|
+
"SLOT": 2,
|
|
815
|
+
"2": "SLOT"
|
|
802
816
|
};
|
|
803
817
|
//#endregion
|
|
804
|
-
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,
|
|
818
|
+
export { EMPTY_ARR, EMPTY_OBJ, NO, NOOP, Namespaces, PatchFlagNames, PatchFlags, ShapeFlags, SlotFlags, TemplateFlags, VaporBlockShape, VaporDynamicComponentFlags, VaporIfFlags, VaporSingleRoot, 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, isBooleanAttr, isBuiltInDirective, isBuiltInTag, isDate, isFormattingTag, isForwardedSlot, isFunction, isGloballyAllowed, isGloballyWhitelisted, isHTMLTag, isIntegerKey, isKnownHtmlAttr, isKnownMathMLAttr, isKnownSvgAttr, isMap, isMathMLTag, isModelListener, isNativeOn, isObject, isOn, isPlainObject, isPromise, isRegExp, isRenderableAttrValue, isReservedProp, isSSRSafeAttrName, isSVGTag, isSet, isSpecialBooleanAttr, isString, isSymbol, isVaporBranchStart, isVoidTag, looseEqual, looseIndexOf, looseToNumber, makeMap, normalizeClass, normalizeCssVarValue, normalizeProps, normalizeStyle, objectToString, parseStringStyle, propsToAttrMap, remove, shouldSetAsAttr, slotFlagsText, slotNotifiesBoundary, stringifyStyle, toDisplayString, toHandlerKey, toNumber, toRawType, toTypeString };
|