@vue/shared 3.6.0-beta.12 → 3.6.0-beta.13
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 +55 -2
- package/dist/shared.cjs.prod.js +55 -2
- package/dist/shared.d.ts +69 -2
- package/dist/shared.esm-bundler.js +53 -3
- package/package.json +1 -1
package/dist/shared.cjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/shared v3.6.0-beta.
|
|
2
|
+
* @vue/shared v3.6.0-beta.13
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -664,7 +664,11 @@ const VaporVForFlags = {
|
|
|
664
664
|
"IS_COMPONENT": 2,
|
|
665
665
|
"2": "IS_COMPONENT",
|
|
666
666
|
"ONCE": 4,
|
|
667
|
-
"4": "ONCE"
|
|
667
|
+
"4": "ONCE",
|
|
668
|
+
"IS_SINGLE_NODE": 8,
|
|
669
|
+
"8": "IS_SINGLE_NODE",
|
|
670
|
+
"IS_FRAGMENT": 16,
|
|
671
|
+
"16": "IS_FRAGMENT"
|
|
668
672
|
};
|
|
669
673
|
const VaporBlockShape = {
|
|
670
674
|
"EMPTY": 0,
|
|
@@ -674,6 +678,52 @@ const VaporBlockShape = {
|
|
|
674
678
|
"MULTI_ROOT": 2,
|
|
675
679
|
"2": "MULTI_ROOT"
|
|
676
680
|
};
|
|
681
|
+
/**
|
|
682
|
+
* Bit layout for vapor `createIf` flags.
|
|
683
|
+
*
|
|
684
|
+
* - bits 0-1: true branch VaporBlockShape
|
|
685
|
+
* - bits 2-3: false branch VaporBlockShape
|
|
686
|
+
* - bit 4: v-once
|
|
687
|
+
* - bit 5: true branch does not need EffectScope
|
|
688
|
+
* - bit 6: false branch does not need EffectScope
|
|
689
|
+
* - bits 7+: branch index + 1 for keyed dynamic fragments
|
|
690
|
+
*
|
|
691
|
+
* Examples:
|
|
692
|
+
* - v-once, true single-root, no false branch: 1 | ONCE = 17
|
|
693
|
+
* - keyed index 0, true/false single-root: 1 | (1 << 2) | (1 << 7) = 133
|
|
694
|
+
*/
|
|
695
|
+
const VaporIfFlags = {
|
|
696
|
+
"BLOCK_SHAPE": 15,
|
|
697
|
+
"15": "BLOCK_SHAPE",
|
|
698
|
+
"ONCE": 16,
|
|
699
|
+
"16": "ONCE",
|
|
700
|
+
"TRUE_NO_SCOPE": 32,
|
|
701
|
+
"32": "TRUE_NO_SCOPE",
|
|
702
|
+
"FALSE_NO_SCOPE": 64,
|
|
703
|
+
"64": "FALSE_NO_SCOPE",
|
|
704
|
+
"INDEX_SHIFT": 7,
|
|
705
|
+
"7": "INDEX_SHIFT"
|
|
706
|
+
};
|
|
707
|
+
/**
|
|
708
|
+
* Flags used by vapor template factories, shared between the compiler and the
|
|
709
|
+
* runtime.
|
|
710
|
+
*/
|
|
711
|
+
const TemplateFlags = {
|
|
712
|
+
"ROOT": 1,
|
|
713
|
+
"1": "ROOT",
|
|
714
|
+
"STATIC": 2,
|
|
715
|
+
"2": "STATIC"
|
|
716
|
+
};
|
|
717
|
+
/**
|
|
718
|
+
* Flags used by vapor slot outlets, shared between the compiler and the
|
|
719
|
+
* runtime.
|
|
720
|
+
*/
|
|
721
|
+
const VaporSlotFlags = {
|
|
722
|
+
"NO_SLOTTED": 1,
|
|
723
|
+
"1": "NO_SLOTTED",
|
|
724
|
+
"ONCE": 2,
|
|
725
|
+
"2": "ONCE"
|
|
726
|
+
};
|
|
677
727
|
//#endregion
|
|
678
728
|
exports.EMPTY_ARR = EMPTY_ARR;
|
|
679
729
|
exports.EMPTY_OBJ = EMPTY_OBJ;
|
|
@@ -684,7 +734,10 @@ exports.PatchFlagNames = PatchFlagNames;
|
|
|
684
734
|
exports.PatchFlags = PatchFlags;
|
|
685
735
|
exports.ShapeFlags = ShapeFlags;
|
|
686
736
|
exports.SlotFlags = SlotFlags;
|
|
737
|
+
exports.TemplateFlags = TemplateFlags;
|
|
687
738
|
exports.VaporBlockShape = VaporBlockShape;
|
|
739
|
+
exports.VaporIfFlags = VaporIfFlags;
|
|
740
|
+
exports.VaporSlotFlags = VaporSlotFlags;
|
|
688
741
|
exports.VaporVForFlags = VaporVForFlags;
|
|
689
742
|
exports.YES = YES;
|
|
690
743
|
exports.camelize = camelize;
|
package/dist/shared.cjs.prod.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/shared v3.6.0-beta.
|
|
2
|
+
* @vue/shared v3.6.0-beta.13
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -664,7 +664,11 @@ const VaporVForFlags = {
|
|
|
664
664
|
"IS_COMPONENT": 2,
|
|
665
665
|
"2": "IS_COMPONENT",
|
|
666
666
|
"ONCE": 4,
|
|
667
|
-
"4": "ONCE"
|
|
667
|
+
"4": "ONCE",
|
|
668
|
+
"IS_SINGLE_NODE": 8,
|
|
669
|
+
"8": "IS_SINGLE_NODE",
|
|
670
|
+
"IS_FRAGMENT": 16,
|
|
671
|
+
"16": "IS_FRAGMENT"
|
|
668
672
|
};
|
|
669
673
|
const VaporBlockShape = {
|
|
670
674
|
"EMPTY": 0,
|
|
@@ -674,6 +678,52 @@ const VaporBlockShape = {
|
|
|
674
678
|
"MULTI_ROOT": 2,
|
|
675
679
|
"2": "MULTI_ROOT"
|
|
676
680
|
};
|
|
681
|
+
/**
|
|
682
|
+
* Bit layout for vapor `createIf` flags.
|
|
683
|
+
*
|
|
684
|
+
* - bits 0-1: true branch VaporBlockShape
|
|
685
|
+
* - bits 2-3: false branch VaporBlockShape
|
|
686
|
+
* - bit 4: v-once
|
|
687
|
+
* - bit 5: true branch does not need EffectScope
|
|
688
|
+
* - bit 6: false branch does not need EffectScope
|
|
689
|
+
* - bits 7+: branch index + 1 for keyed dynamic fragments
|
|
690
|
+
*
|
|
691
|
+
* Examples:
|
|
692
|
+
* - v-once, true single-root, no false branch: 1 | ONCE = 17
|
|
693
|
+
* - keyed index 0, true/false single-root: 1 | (1 << 2) | (1 << 7) = 133
|
|
694
|
+
*/
|
|
695
|
+
const VaporIfFlags = {
|
|
696
|
+
"BLOCK_SHAPE": 15,
|
|
697
|
+
"15": "BLOCK_SHAPE",
|
|
698
|
+
"ONCE": 16,
|
|
699
|
+
"16": "ONCE",
|
|
700
|
+
"TRUE_NO_SCOPE": 32,
|
|
701
|
+
"32": "TRUE_NO_SCOPE",
|
|
702
|
+
"FALSE_NO_SCOPE": 64,
|
|
703
|
+
"64": "FALSE_NO_SCOPE",
|
|
704
|
+
"INDEX_SHIFT": 7,
|
|
705
|
+
"7": "INDEX_SHIFT"
|
|
706
|
+
};
|
|
707
|
+
/**
|
|
708
|
+
* Flags used by vapor template factories, shared between the compiler and the
|
|
709
|
+
* runtime.
|
|
710
|
+
*/
|
|
711
|
+
const TemplateFlags = {
|
|
712
|
+
"ROOT": 1,
|
|
713
|
+
"1": "ROOT",
|
|
714
|
+
"STATIC": 2,
|
|
715
|
+
"2": "STATIC"
|
|
716
|
+
};
|
|
717
|
+
/**
|
|
718
|
+
* Flags used by vapor slot outlets, shared between the compiler and the
|
|
719
|
+
* runtime.
|
|
720
|
+
*/
|
|
721
|
+
const VaporSlotFlags = {
|
|
722
|
+
"NO_SLOTTED": 1,
|
|
723
|
+
"1": "NO_SLOTTED",
|
|
724
|
+
"ONCE": 2,
|
|
725
|
+
"2": "ONCE"
|
|
726
|
+
};
|
|
677
727
|
//#endregion
|
|
678
728
|
exports.EMPTY_ARR = EMPTY_ARR;
|
|
679
729
|
exports.EMPTY_OBJ = EMPTY_OBJ;
|
|
@@ -684,7 +734,10 @@ exports.PatchFlagNames = PatchFlagNames;
|
|
|
684
734
|
exports.PatchFlags = PatchFlags;
|
|
685
735
|
exports.ShapeFlags = ShapeFlags;
|
|
686
736
|
exports.SlotFlags = SlotFlags;
|
|
737
|
+
exports.TemplateFlags = TemplateFlags;
|
|
687
738
|
exports.VaporBlockShape = VaporBlockShape;
|
|
739
|
+
exports.VaporIfFlags = VaporIfFlags;
|
|
740
|
+
exports.VaporSlotFlags = VaporSlotFlags;
|
|
688
741
|
exports.VaporVForFlags = VaporVForFlags;
|
|
689
742
|
exports.YES = YES;
|
|
690
743
|
exports.camelize = camelize;
|
package/dist/shared.d.ts
CHANGED
|
@@ -401,17 +401,84 @@ export declare enum VaporVForFlags {
|
|
|
401
401
|
FAST_REMOVE = 1,
|
|
402
402
|
/**
|
|
403
403
|
* v-for used on component - we can skip creating child scopes for each block
|
|
404
|
-
* because the component itself already has a scope.
|
|
404
|
+
* because the component itself already has a scope. This does not guarantee
|
|
405
|
+
* the item block is a VaporComponentInstance: component fallback paths may
|
|
406
|
+
* still return a DOM Node.
|
|
405
407
|
*/
|
|
406
408
|
IS_COMPONENT = 2,
|
|
407
409
|
/**
|
|
408
410
|
* v-for inside v-once
|
|
409
411
|
*/
|
|
410
|
-
ONCE = 4
|
|
412
|
+
ONCE = 4,
|
|
413
|
+
/**
|
|
414
|
+
* v-for item block is a single DOM Node.
|
|
415
|
+
*/
|
|
416
|
+
IS_SINGLE_NODE = 8,
|
|
417
|
+
/**
|
|
418
|
+
* v-for item block is known to be a VaporFragment, so runtime can use
|
|
419
|
+
* fragment-specific insert/remove helpers.
|
|
420
|
+
*/
|
|
421
|
+
IS_FRAGMENT = 16
|
|
411
422
|
}
|
|
412
423
|
export declare enum VaporBlockShape {
|
|
413
424
|
EMPTY = 0,
|
|
414
425
|
SINGLE_ROOT = 1,
|
|
415
426
|
MULTI_ROOT = 2
|
|
416
427
|
}
|
|
428
|
+
/**
|
|
429
|
+
* Bit layout for vapor `createIf` flags.
|
|
430
|
+
*
|
|
431
|
+
* - bits 0-1: true branch VaporBlockShape
|
|
432
|
+
* - bits 2-3: false branch VaporBlockShape
|
|
433
|
+
* - bit 4: v-once
|
|
434
|
+
* - bit 5: true branch does not need EffectScope
|
|
435
|
+
* - bit 6: false branch does not need EffectScope
|
|
436
|
+
* - bits 7+: branch index + 1 for keyed dynamic fragments
|
|
437
|
+
*
|
|
438
|
+
* Examples:
|
|
439
|
+
* - v-once, true single-root, no false branch: 1 | ONCE = 17
|
|
440
|
+
* - keyed index 0, true/false single-root: 1 | (1 << 2) | (1 << 7) = 133
|
|
441
|
+
*/
|
|
442
|
+
export declare enum VaporIfFlags {
|
|
443
|
+
/**
|
|
444
|
+
* Documents the packed true/false branch shape bits. Runtime decode shifts
|
|
445
|
+
* to the selected branch first, then masks with 0b11 for one VaporBlockShape.
|
|
446
|
+
*/
|
|
447
|
+
BLOCK_SHAPE = 15,
|
|
448
|
+
/**
|
|
449
|
+
* Marks a branch that is created once and never updated.
|
|
450
|
+
*/
|
|
451
|
+
ONCE = 16,
|
|
452
|
+
/**
|
|
453
|
+
* The compiler proved that the true branch does not create branch-owned
|
|
454
|
+
* effects or disposers.
|
|
455
|
+
*/
|
|
456
|
+
TRUE_NO_SCOPE = 32,
|
|
457
|
+
/**
|
|
458
|
+
* The compiler proved that the false branch does not create branch-owned
|
|
459
|
+
* effects or disposers.
|
|
460
|
+
*/
|
|
461
|
+
FALSE_NO_SCOPE = 64,
|
|
462
|
+
/**
|
|
463
|
+
* Shift for keyed branch index. The encoded value is index + 1, so decoded
|
|
464
|
+
* zero means "not keyed" and source index 0 still round-trips.
|
|
465
|
+
*/
|
|
466
|
+
INDEX_SHIFT = 7
|
|
467
|
+
}
|
|
468
|
+
/**
|
|
469
|
+
* Flags used by vapor template factories, shared between the compiler and the
|
|
470
|
+
* runtime.
|
|
471
|
+
*/
|
|
472
|
+
export declare enum TemplateFlags {
|
|
473
|
+
ROOT = 1,
|
|
474
|
+
STATIC = 2
|
|
475
|
+
}
|
|
476
|
+
/**
|
|
477
|
+
* Flags used by vapor slot outlets, shared between the compiler and the
|
|
478
|
+
* runtime.
|
|
479
|
+
*/
|
|
480
|
+
export declare enum VaporSlotFlags {
|
|
481
|
+
NO_SLOTTED = 1,
|
|
482
|
+
ONCE = 2
|
|
483
|
+
}
|
|
417
484
|
//#endregion
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/shared v3.6.0-beta.
|
|
2
|
+
* @vue/shared v3.6.0-beta.13
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -662,7 +662,11 @@ const VaporVForFlags = {
|
|
|
662
662
|
"IS_COMPONENT": 2,
|
|
663
663
|
"2": "IS_COMPONENT",
|
|
664
664
|
"ONCE": 4,
|
|
665
|
-
"4": "ONCE"
|
|
665
|
+
"4": "ONCE",
|
|
666
|
+
"IS_SINGLE_NODE": 8,
|
|
667
|
+
"8": "IS_SINGLE_NODE",
|
|
668
|
+
"IS_FRAGMENT": 16,
|
|
669
|
+
"16": "IS_FRAGMENT"
|
|
666
670
|
};
|
|
667
671
|
const VaporBlockShape = {
|
|
668
672
|
"EMPTY": 0,
|
|
@@ -672,5 +676,51 @@ const VaporBlockShape = {
|
|
|
672
676
|
"MULTI_ROOT": 2,
|
|
673
677
|
"2": "MULTI_ROOT"
|
|
674
678
|
};
|
|
679
|
+
/**
|
|
680
|
+
* Bit layout for vapor `createIf` flags.
|
|
681
|
+
*
|
|
682
|
+
* - bits 0-1: true branch VaporBlockShape
|
|
683
|
+
* - bits 2-3: false branch VaporBlockShape
|
|
684
|
+
* - bit 4: v-once
|
|
685
|
+
* - bit 5: true branch does not need EffectScope
|
|
686
|
+
* - bit 6: false branch does not need EffectScope
|
|
687
|
+
* - bits 7+: branch index + 1 for keyed dynamic fragments
|
|
688
|
+
*
|
|
689
|
+
* Examples:
|
|
690
|
+
* - v-once, true single-root, no false branch: 1 | ONCE = 17
|
|
691
|
+
* - keyed index 0, true/false single-root: 1 | (1 << 2) | (1 << 7) = 133
|
|
692
|
+
*/
|
|
693
|
+
const VaporIfFlags = {
|
|
694
|
+
"BLOCK_SHAPE": 15,
|
|
695
|
+
"15": "BLOCK_SHAPE",
|
|
696
|
+
"ONCE": 16,
|
|
697
|
+
"16": "ONCE",
|
|
698
|
+
"TRUE_NO_SCOPE": 32,
|
|
699
|
+
"32": "TRUE_NO_SCOPE",
|
|
700
|
+
"FALSE_NO_SCOPE": 64,
|
|
701
|
+
"64": "FALSE_NO_SCOPE",
|
|
702
|
+
"INDEX_SHIFT": 7,
|
|
703
|
+
"7": "INDEX_SHIFT"
|
|
704
|
+
};
|
|
705
|
+
/**
|
|
706
|
+
* Flags used by vapor template factories, shared between the compiler and the
|
|
707
|
+
* runtime.
|
|
708
|
+
*/
|
|
709
|
+
const TemplateFlags = {
|
|
710
|
+
"ROOT": 1,
|
|
711
|
+
"1": "ROOT",
|
|
712
|
+
"STATIC": 2,
|
|
713
|
+
"2": "STATIC"
|
|
714
|
+
};
|
|
715
|
+
/**
|
|
716
|
+
* Flags used by vapor slot outlets, shared between the compiler and the
|
|
717
|
+
* runtime.
|
|
718
|
+
*/
|
|
719
|
+
const VaporSlotFlags = {
|
|
720
|
+
"NO_SLOTTED": 1,
|
|
721
|
+
"1": "NO_SLOTTED",
|
|
722
|
+
"ONCE": 2,
|
|
723
|
+
"2": "ONCE"
|
|
724
|
+
};
|
|
675
725
|
//#endregion
|
|
676
|
-
export { EMPTY_ARR, EMPTY_OBJ, NO, NOOP, Namespaces, PatchFlagNames, PatchFlags, ShapeFlags, SlotFlags, VaporBlockShape, 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 };
|
|
726
|
+
export { EMPTY_ARR, EMPTY_OBJ, NO, NOOP, Namespaces, PatchFlagNames, PatchFlags, ShapeFlags, SlotFlags, TemplateFlags, VaporBlockShape, 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 };
|