@vue/shared 3.6.0-rc.13 → 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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/shared v3.6.0-rc.13
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
  **/
@@ -712,7 +712,9 @@ const VaporBlockShape = {
712
712
  "SINGLE_ROOT": 1,
713
713
  "1": "SINGLE_ROOT",
714
714
  "MULTI_ROOT": 2,
715
- "2": "MULTI_ROOT"
715
+ "2": "MULTI_ROOT",
716
+ "ELSE_IF": 3,
717
+ "3": "ELSE_IF"
716
718
  };
717
719
  /**
718
720
  * Bit layout for vapor `createIf` flags.
@@ -768,6 +770,19 @@ const VaporSlotFlags = {
768
770
  function isForwardedSlot(flags) {
769
771
  return !!(flags & 4);
770
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
+ }
771
786
  function slotNotifiesBoundary(flags) {
772
787
  return isForwardedSlot(flags) && !(flags & 2);
773
788
  }
@@ -873,6 +888,7 @@ exports.isSet = isSet;
873
888
  exports.isSpecialBooleanAttr = isSpecialBooleanAttr;
874
889
  exports.isString = isString;
875
890
  exports.isSymbol = isSymbol;
891
+ exports.isVaporBranchStart = isVaporBranchStart;
876
892
  exports.isVoidTag = isVoidTag;
877
893
  exports.looseEqual = looseEqual;
878
894
  exports.looseIndexOf = looseIndexOf;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/shared v3.6.0-rc.13
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
  **/
@@ -712,7 +712,9 @@ const VaporBlockShape = {
712
712
  "SINGLE_ROOT": 1,
713
713
  "1": "SINGLE_ROOT",
714
714
  "MULTI_ROOT": 2,
715
- "2": "MULTI_ROOT"
715
+ "2": "MULTI_ROOT",
716
+ "ELSE_IF": 3,
717
+ "3": "ELSE_IF"
716
718
  };
717
719
  /**
718
720
  * Bit layout for vapor `createIf` flags.
@@ -768,6 +770,19 @@ const VaporSlotFlags = {
768
770
  function isForwardedSlot(flags) {
769
771
  return !!(flags & 4);
770
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
+ }
771
786
  function slotNotifiesBoundary(flags) {
772
787
  return isForwardedSlot(flags) && !(flags & 2);
773
788
  }
@@ -873,6 +888,7 @@ exports.isSet = isSet;
873
888
  exports.isSpecialBooleanAttr = isSpecialBooleanAttr;
874
889
  exports.isString = isString;
875
890
  exports.isSymbol = isSymbol;
891
+ exports.isVaporBranchStart = isVaporBranchStart;
876
892
  exports.isVoidTag = isVoidTag;
877
893
  exports.looseEqual = looseEqual;
878
894
  exports.looseIndexOf = looseIndexOf;
package/dist/shared.d.ts CHANGED
@@ -428,7 +428,12 @@ export declare enum VaporVForFlags {
428
428
  export declare enum VaporBlockShape {
429
429
  EMPTY = 0,
430
430
  SINGLE_ROOT = 1,
431
- 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
432
437
  }
433
438
  /**
434
439
  * Bit layout for vapor `createIf` flags.
@@ -498,6 +503,12 @@ export declare enum VaporSlotFlags {
498
503
  FORWARDED = 4
499
504
  }
500
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;
501
512
  export declare function slotNotifiesBoundary(flags: number): boolean;
502
513
  /**
503
514
  * Per-slot-function metadata attached by the compiler as `fn._`.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/shared v3.6.0-rc.13
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
  **/
@@ -710,7 +710,9 @@ const VaporBlockShape = {
710
710
  "SINGLE_ROOT": 1,
711
711
  "1": "SINGLE_ROOT",
712
712
  "MULTI_ROOT": 2,
713
- "2": "MULTI_ROOT"
713
+ "2": "MULTI_ROOT",
714
+ "ELSE_IF": 3,
715
+ "3": "ELSE_IF"
714
716
  };
715
717
  /**
716
718
  * Bit layout for vapor `createIf` flags.
@@ -766,6 +768,19 @@ const VaporSlotFlags = {
766
768
  function isForwardedSlot(flags) {
767
769
  return !!(flags & 4);
768
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
+ }
769
784
  function slotNotifiesBoundary(flags) {
770
785
  return isForwardedSlot(flags) && !(flags & 2);
771
786
  }
@@ -800,4 +815,4 @@ const VaporSingleRoot = {
800
815
  "2": "SLOT"
801
816
  };
802
817
  //#endregion
803
- 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, isVoidTag, looseEqual, looseIndexOf, looseToNumber, makeMap, normalizeClass, normalizeCssVarValue, normalizeProps, normalizeStyle, objectToString, parseStringStyle, propsToAttrMap, remove, shouldSetAsAttr, slotFlagsText, slotNotifiesBoundary, stringifyStyle, toDisplayString, toHandlerKey, toNumber, toRawType, toTypeString };
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 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vue/shared",
3
- "version": "3.6.0-rc.13",
3
+ "version": "3.6.0-rc.14",
4
4
  "description": "internal utils shared across @vue packages",
5
5
  "main": "index.js",
6
6
  "module": "dist/shared.esm-bundler.js",