@vue/shared
Advanced tools
Comparing version 3.4.0-alpha.3 to 3.4.0-alpha.4
@@ -15,4 +15,4 @@ 'use strict'; | ||
const NO = () => false; | ||
const onRE = /^on[^a-z]/; | ||
const isOn = (key) => onRE.test(key); | ||
const isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // uppercase letter | ||
(key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97); | ||
const isModelListener = (key) => key.startsWith("onUpdate:"); | ||
@@ -106,2 +106,32 @@ const extend = Object.assign; | ||
const PatchFlags = { | ||
"TEXT": 1, | ||
"1": "TEXT", | ||
"CLASS": 2, | ||
"2": "CLASS", | ||
"STYLE": 4, | ||
"4": "STYLE", | ||
"PROPS": 8, | ||
"8": "PROPS", | ||
"FULL_PROPS": 16, | ||
"16": "FULL_PROPS", | ||
"NEED_HYDRATION": 32, | ||
"32": "NEED_HYDRATION", | ||
"STABLE_FRAGMENT": 64, | ||
"64": "STABLE_FRAGMENT", | ||
"KEYED_FRAGMENT": 128, | ||
"128": "KEYED_FRAGMENT", | ||
"UNKEYED_FRAGMENT": 256, | ||
"256": "UNKEYED_FRAGMENT", | ||
"NEED_PATCH": 512, | ||
"512": "NEED_PATCH", | ||
"DYNAMIC_SLOTS": 1024, | ||
"1024": "DYNAMIC_SLOTS", | ||
"DEV_ROOT_FRAGMENT": 2048, | ||
"2048": "DEV_ROOT_FRAGMENT", | ||
"HOISTED": -1, | ||
"-1": "HOISTED", | ||
"BAIL": -2, | ||
"-2": "BAIL" | ||
}; | ||
const PatchFlagNames = { | ||
@@ -124,2 +154,35 @@ [1]: `TEXT`, | ||
const ShapeFlags = { | ||
"ELEMENT": 1, | ||
"1": "ELEMENT", | ||
"FUNCTIONAL_COMPONENT": 2, | ||
"2": "FUNCTIONAL_COMPONENT", | ||
"STATEFUL_COMPONENT": 4, | ||
"4": "STATEFUL_COMPONENT", | ||
"TEXT_CHILDREN": 8, | ||
"8": "TEXT_CHILDREN", | ||
"ARRAY_CHILDREN": 16, | ||
"16": "ARRAY_CHILDREN", | ||
"SLOTS_CHILDREN": 32, | ||
"32": "SLOTS_CHILDREN", | ||
"TELEPORT": 64, | ||
"64": "TELEPORT", | ||
"SUSPENSE": 128, | ||
"128": "SUSPENSE", | ||
"COMPONENT_SHOULD_KEEP_ALIVE": 256, | ||
"256": "COMPONENT_SHOULD_KEEP_ALIVE", | ||
"COMPONENT_KEPT_ALIVE": 512, | ||
"512": "COMPONENT_KEPT_ALIVE", | ||
"COMPONENT": 6, | ||
"6": "COMPONENT" | ||
}; | ||
const SlotFlags = { | ||
"STABLE": 1, | ||
"1": "STABLE", | ||
"DYNAMIC": 2, | ||
"2": "DYNAMIC", | ||
"FORWARDED": 3, | ||
"3": "FORWARDED" | ||
}; | ||
const slotFlagsText = { | ||
@@ -131,3 +194,3 @@ [1]: "STABLE", | ||
const GLOBALS_ALLOWED = "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"; | ||
const GLOBALS_ALLOWED = "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"; | ||
const isGloballyAllowed = /* @__PURE__ */ makeMap(GLOBALS_ALLOWED); | ||
@@ -417,2 +480,5 @@ const isGloballyWhitelisted = isGloballyAllowed; | ||
exports.PatchFlagNames = PatchFlagNames; | ||
exports.PatchFlags = PatchFlags; | ||
exports.ShapeFlags = ShapeFlags; | ||
exports.SlotFlags = SlotFlags; | ||
exports.camelize = camelize; | ||
@@ -419,0 +485,0 @@ exports.capitalize = capitalize; |
@@ -15,4 +15,4 @@ 'use strict'; | ||
const NO = () => false; | ||
const onRE = /^on[^a-z]/; | ||
const isOn = (key) => onRE.test(key); | ||
const isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // uppercase letter | ||
(key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97); | ||
const isModelListener = (key) => key.startsWith("onUpdate:"); | ||
@@ -106,2 +106,32 @@ const extend = Object.assign; | ||
const PatchFlags = { | ||
"TEXT": 1, | ||
"1": "TEXT", | ||
"CLASS": 2, | ||
"2": "CLASS", | ||
"STYLE": 4, | ||
"4": "STYLE", | ||
"PROPS": 8, | ||
"8": "PROPS", | ||
"FULL_PROPS": 16, | ||
"16": "FULL_PROPS", | ||
"NEED_HYDRATION": 32, | ||
"32": "NEED_HYDRATION", | ||
"STABLE_FRAGMENT": 64, | ||
"64": "STABLE_FRAGMENT", | ||
"KEYED_FRAGMENT": 128, | ||
"128": "KEYED_FRAGMENT", | ||
"UNKEYED_FRAGMENT": 256, | ||
"256": "UNKEYED_FRAGMENT", | ||
"NEED_PATCH": 512, | ||
"512": "NEED_PATCH", | ||
"DYNAMIC_SLOTS": 1024, | ||
"1024": "DYNAMIC_SLOTS", | ||
"DEV_ROOT_FRAGMENT": 2048, | ||
"2048": "DEV_ROOT_FRAGMENT", | ||
"HOISTED": -1, | ||
"-1": "HOISTED", | ||
"BAIL": -2, | ||
"-2": "BAIL" | ||
}; | ||
const PatchFlagNames = { | ||
@@ -124,2 +154,35 @@ [1]: `TEXT`, | ||
const ShapeFlags = { | ||
"ELEMENT": 1, | ||
"1": "ELEMENT", | ||
"FUNCTIONAL_COMPONENT": 2, | ||
"2": "FUNCTIONAL_COMPONENT", | ||
"STATEFUL_COMPONENT": 4, | ||
"4": "STATEFUL_COMPONENT", | ||
"TEXT_CHILDREN": 8, | ||
"8": "TEXT_CHILDREN", | ||
"ARRAY_CHILDREN": 16, | ||
"16": "ARRAY_CHILDREN", | ||
"SLOTS_CHILDREN": 32, | ||
"32": "SLOTS_CHILDREN", | ||
"TELEPORT": 64, | ||
"64": "TELEPORT", | ||
"SUSPENSE": 128, | ||
"128": "SUSPENSE", | ||
"COMPONENT_SHOULD_KEEP_ALIVE": 256, | ||
"256": "COMPONENT_SHOULD_KEEP_ALIVE", | ||
"COMPONENT_KEPT_ALIVE": 512, | ||
"512": "COMPONENT_KEPT_ALIVE", | ||
"COMPONENT": 6, | ||
"6": "COMPONENT" | ||
}; | ||
const SlotFlags = { | ||
"STABLE": 1, | ||
"1": "STABLE", | ||
"DYNAMIC": 2, | ||
"2": "DYNAMIC", | ||
"FORWARDED": 3, | ||
"3": "FORWARDED" | ||
}; | ||
const slotFlagsText = { | ||
@@ -131,3 +194,3 @@ [1]: "STABLE", | ||
const GLOBALS_ALLOWED = "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"; | ||
const GLOBALS_ALLOWED = "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"; | ||
const isGloballyAllowed = /* @__PURE__ */ makeMap(GLOBALS_ALLOWED); | ||
@@ -417,2 +480,5 @@ const isGloballyWhitelisted = isGloballyAllowed; | ||
exports.PatchFlagNames = PatchFlagNames; | ||
exports.PatchFlags = PatchFlags; | ||
exports.ShapeFlags = ShapeFlags; | ||
exports.SlotFlags = SlotFlags; | ||
exports.camelize = camelize; | ||
@@ -419,0 +485,0 @@ exports.capitalize = capitalize; |
@@ -96,3 +96,3 @@ /** | ||
*/ | ||
export declare const enum PatchFlags { | ||
export declare enum PatchFlags { | ||
/** | ||
@@ -195,3 +195,3 @@ * Indicates an element with dynamic textContent (children fast path) | ||
export declare const enum ShapeFlags { | ||
export declare enum ShapeFlags { | ||
ELEMENT = 1, | ||
@@ -210,3 +210,3 @@ FUNCTIONAL_COMPONENT = 2, | ||
export declare const enum SlotFlags { | ||
export declare enum SlotFlags { | ||
/** | ||
@@ -213,0 +213,0 @@ * Stable slots that only reference slot props or context state. The slot |
@@ -11,4 +11,4 @@ function makeMap(str, expectsLowerCase) { | ||
const NO = () => false; | ||
const onRE = /^on[^a-z]/; | ||
const isOn = (key) => onRE.test(key); | ||
const isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // uppercase letter | ||
(key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97); | ||
const isModelListener = (key) => key.startsWith("onUpdate:"); | ||
@@ -102,2 +102,32 @@ const extend = Object.assign; | ||
const PatchFlags = { | ||
"TEXT": 1, | ||
"1": "TEXT", | ||
"CLASS": 2, | ||
"2": "CLASS", | ||
"STYLE": 4, | ||
"4": "STYLE", | ||
"PROPS": 8, | ||
"8": "PROPS", | ||
"FULL_PROPS": 16, | ||
"16": "FULL_PROPS", | ||
"NEED_HYDRATION": 32, | ||
"32": "NEED_HYDRATION", | ||
"STABLE_FRAGMENT": 64, | ||
"64": "STABLE_FRAGMENT", | ||
"KEYED_FRAGMENT": 128, | ||
"128": "KEYED_FRAGMENT", | ||
"UNKEYED_FRAGMENT": 256, | ||
"256": "UNKEYED_FRAGMENT", | ||
"NEED_PATCH": 512, | ||
"512": "NEED_PATCH", | ||
"DYNAMIC_SLOTS": 1024, | ||
"1024": "DYNAMIC_SLOTS", | ||
"DEV_ROOT_FRAGMENT": 2048, | ||
"2048": "DEV_ROOT_FRAGMENT", | ||
"HOISTED": -1, | ||
"-1": "HOISTED", | ||
"BAIL": -2, | ||
"-2": "BAIL" | ||
}; | ||
const PatchFlagNames = { | ||
@@ -120,2 +150,35 @@ [1]: `TEXT`, | ||
const ShapeFlags = { | ||
"ELEMENT": 1, | ||
"1": "ELEMENT", | ||
"FUNCTIONAL_COMPONENT": 2, | ||
"2": "FUNCTIONAL_COMPONENT", | ||
"STATEFUL_COMPONENT": 4, | ||
"4": "STATEFUL_COMPONENT", | ||
"TEXT_CHILDREN": 8, | ||
"8": "TEXT_CHILDREN", | ||
"ARRAY_CHILDREN": 16, | ||
"16": "ARRAY_CHILDREN", | ||
"SLOTS_CHILDREN": 32, | ||
"32": "SLOTS_CHILDREN", | ||
"TELEPORT": 64, | ||
"64": "TELEPORT", | ||
"SUSPENSE": 128, | ||
"128": "SUSPENSE", | ||
"COMPONENT_SHOULD_KEEP_ALIVE": 256, | ||
"256": "COMPONENT_SHOULD_KEEP_ALIVE", | ||
"COMPONENT_KEPT_ALIVE": 512, | ||
"512": "COMPONENT_KEPT_ALIVE", | ||
"COMPONENT": 6, | ||
"6": "COMPONENT" | ||
}; | ||
const SlotFlags = { | ||
"STABLE": 1, | ||
"1": "STABLE", | ||
"DYNAMIC": 2, | ||
"2": "DYNAMIC", | ||
"FORWARDED": 3, | ||
"3": "FORWARDED" | ||
}; | ||
const slotFlagsText = { | ||
@@ -127,3 +190,3 @@ [1]: "STABLE", | ||
const GLOBALS_ALLOWED = "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"; | ||
const GLOBALS_ALLOWED = "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"; | ||
const isGloballyAllowed = /* @__PURE__ */ makeMap(GLOBALS_ALLOWED); | ||
@@ -408,2 +471,2 @@ const isGloballyWhitelisted = isGloballyAllowed; | ||
export { EMPTY_ARR, EMPTY_OBJ, NO, NOOP, PatchFlagNames, camelize, capitalize, def, escapeHtml, escapeHtmlComment, extend, genPropsAccessExp, generateCodeFrame, getGlobalThis, hasChanged, hasOwn, hyphenate, includeBooleanAttr, invokeArrayFns, isArray, isBooleanAttr, isBuiltInDirective, isDate, isFunction, isGloballyAllowed, isGloballyWhitelisted, isHTMLTag, isIntegerKey, isKnownHtmlAttr, isKnownSvgAttr, isMap, isModelListener, isObject, isOn, isPlainObject, isPromise, isRegExp, isReservedProp, isSSRSafeAttrName, isSVGTag, isSet, isSpecialBooleanAttr, isString, isSymbol, isVoidTag, looseEqual, looseIndexOf, looseToNumber, makeMap, normalizeClass, normalizeProps, normalizeStyle, objectToString, parseStringStyle, propsToAttrMap, remove, slotFlagsText, stringifyStyle, toDisplayString, toHandlerKey, toNumber, toRawType, toTypeString }; | ||
export { EMPTY_ARR, EMPTY_OBJ, NO, NOOP, PatchFlagNames, PatchFlags, ShapeFlags, SlotFlags, camelize, capitalize, def, escapeHtml, escapeHtmlComment, extend, genPropsAccessExp, generateCodeFrame, getGlobalThis, hasChanged, hasOwn, hyphenate, includeBooleanAttr, invokeArrayFns, isArray, isBooleanAttr, isBuiltInDirective, isDate, isFunction, isGloballyAllowed, isGloballyWhitelisted, isHTMLTag, isIntegerKey, isKnownHtmlAttr, isKnownSvgAttr, isMap, isModelListener, isObject, isOn, isPlainObject, isPromise, isRegExp, isReservedProp, isSSRSafeAttrName, isSVGTag, isSet, isSpecialBooleanAttr, isString, isSymbol, isVoidTag, looseEqual, looseIndexOf, looseToNumber, makeMap, normalizeClass, normalizeProps, normalizeStyle, objectToString, parseStringStyle, propsToAttrMap, remove, slotFlagsText, stringifyStyle, toDisplayString, toHandlerKey, toNumber, toRawType, toTypeString }; |
{ | ||
"name": "@vue/shared", | ||
"version": "3.4.0-alpha.3", | ||
"version": "3.4.0-alpha.4", | ||
"description": "internal utils shared across @vue packages", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
76126
1856