@vue/shared 3.6.0-alpha.2 → 3.6.0-alpha.4
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 +20 -4
- package/dist/shared.cjs.prod.js +20 -4
- package/dist/shared.d.ts +14 -1
- package/dist/shared.esm-bundler.js +19 -5
- package/package.json +1 -1
package/dist/shared.cjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/shared v3.6.0-alpha.
|
|
2
|
+
* @vue/shared v3.6.0-alpha.4
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
|
|
8
8
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
9
9
|
|
|
10
|
-
/*! #__NO_SIDE_EFFECTS__ */
|
|
11
10
|
// @__NO_SIDE_EFFECTS__
|
|
12
11
|
function makeMap(str) {
|
|
13
12
|
const map = /* @__PURE__ */ Object.create(null);
|
|
@@ -64,10 +63,10 @@ const isBuiltInDirective = /* @__PURE__ */ makeMap(
|
|
|
64
63
|
);
|
|
65
64
|
const cacheStringFunction = (fn) => {
|
|
66
65
|
const cache = /* @__PURE__ */ Object.create(null);
|
|
67
|
-
return (str) => {
|
|
66
|
+
return ((str) => {
|
|
68
67
|
const hit = cache[str];
|
|
69
68
|
return hit || (cache[str] = fn(str));
|
|
70
|
-
};
|
|
69
|
+
});
|
|
71
70
|
};
|
|
72
71
|
const camelizeRE = /-(\w)/g;
|
|
73
72
|
const camelizeReplacer = (_, c) => c ? c.toUpperCase() : "";
|
|
@@ -87,6 +86,9 @@ const toHandlerKey = cacheStringFunction(
|
|
|
87
86
|
return s;
|
|
88
87
|
}
|
|
89
88
|
);
|
|
89
|
+
const getModifierPropName = (name) => {
|
|
90
|
+
return `${name === "modelValue" || name === "model-value" ? "model" : name}Modifiers${name === "model" ? "$" : ""}`;
|
|
91
|
+
};
|
|
90
92
|
const hasChanged = (value, oldValue) => !Object.is(value, oldValue);
|
|
91
93
|
const invokeArrayFns = (fns, ...arg) => {
|
|
92
94
|
for (let i = 0; i < fns.length; i++) {
|
|
@@ -402,9 +404,21 @@ function shouldSetAsAttr(tagName, key) {
|
|
|
402
404
|
if ((key === "width" || key === "height") && (tagName === "IMG" || tagName === "VIDEO" || tagName === "CANVAS" || tagName === "SOURCE")) {
|
|
403
405
|
return true;
|
|
404
406
|
}
|
|
407
|
+
if (key === "sandbox" && tagName === "IFRAME") {
|
|
408
|
+
return true;
|
|
409
|
+
}
|
|
405
410
|
return false;
|
|
406
411
|
}
|
|
407
412
|
|
|
413
|
+
const Namespaces = {
|
|
414
|
+
"HTML": 0,
|
|
415
|
+
"0": "HTML",
|
|
416
|
+
"SVG": 1,
|
|
417
|
+
"1": "SVG",
|
|
418
|
+
"MATH_ML": 2,
|
|
419
|
+
"2": "MATH_ML"
|
|
420
|
+
};
|
|
421
|
+
|
|
408
422
|
const escapeRE = /["'&<>]/;
|
|
409
423
|
function escapeHtml(string) {
|
|
410
424
|
const str = "" + string;
|
|
@@ -621,6 +635,7 @@ exports.EMPTY_ARR = EMPTY_ARR;
|
|
|
621
635
|
exports.EMPTY_OBJ = EMPTY_OBJ;
|
|
622
636
|
exports.NO = NO;
|
|
623
637
|
exports.NOOP = NOOP;
|
|
638
|
+
exports.Namespaces = Namespaces;
|
|
624
639
|
exports.PatchFlagNames = PatchFlagNames;
|
|
625
640
|
exports.PatchFlags = PatchFlags;
|
|
626
641
|
exports.ShapeFlags = ShapeFlags;
|
|
@@ -639,6 +654,7 @@ exports.genPropsAccessExp = genPropsAccessExp;
|
|
|
639
654
|
exports.generateCodeFrame = generateCodeFrame;
|
|
640
655
|
exports.getEscapedCssVarName = getEscapedCssVarName;
|
|
641
656
|
exports.getGlobalThis = getGlobalThis;
|
|
657
|
+
exports.getModifierPropName = getModifierPropName;
|
|
642
658
|
exports.getSequence = getSequence;
|
|
643
659
|
exports.hasChanged = hasChanged;
|
|
644
660
|
exports.hasOwn = hasOwn;
|
package/dist/shared.cjs.prod.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/shared v3.6.0-alpha.
|
|
2
|
+
* @vue/shared v3.6.0-alpha.4
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
|
|
8
8
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
9
9
|
|
|
10
|
-
/*! #__NO_SIDE_EFFECTS__ */
|
|
11
10
|
// @__NO_SIDE_EFFECTS__
|
|
12
11
|
function makeMap(str) {
|
|
13
12
|
const map = /* @__PURE__ */ Object.create(null);
|
|
@@ -64,10 +63,10 @@ const isBuiltInDirective = /* @__PURE__ */ makeMap(
|
|
|
64
63
|
);
|
|
65
64
|
const cacheStringFunction = (fn) => {
|
|
66
65
|
const cache = /* @__PURE__ */ Object.create(null);
|
|
67
|
-
return (str) => {
|
|
66
|
+
return ((str) => {
|
|
68
67
|
const hit = cache[str];
|
|
69
68
|
return hit || (cache[str] = fn(str));
|
|
70
|
-
};
|
|
69
|
+
});
|
|
71
70
|
};
|
|
72
71
|
const camelizeRE = /-(\w)/g;
|
|
73
72
|
const camelizeReplacer = (_, c) => c ? c.toUpperCase() : "";
|
|
@@ -87,6 +86,9 @@ const toHandlerKey = cacheStringFunction(
|
|
|
87
86
|
return s;
|
|
88
87
|
}
|
|
89
88
|
);
|
|
89
|
+
const getModifierPropName = (name) => {
|
|
90
|
+
return `${name === "modelValue" || name === "model-value" ? "model" : name}Modifiers${name === "model" ? "$" : ""}`;
|
|
91
|
+
};
|
|
90
92
|
const hasChanged = (value, oldValue) => !Object.is(value, oldValue);
|
|
91
93
|
const invokeArrayFns = (fns, ...arg) => {
|
|
92
94
|
for (let i = 0; i < fns.length; i++) {
|
|
@@ -402,9 +404,21 @@ function shouldSetAsAttr(tagName, key) {
|
|
|
402
404
|
if ((key === "width" || key === "height") && (tagName === "IMG" || tagName === "VIDEO" || tagName === "CANVAS" || tagName === "SOURCE")) {
|
|
403
405
|
return true;
|
|
404
406
|
}
|
|
407
|
+
if (key === "sandbox" && tagName === "IFRAME") {
|
|
408
|
+
return true;
|
|
409
|
+
}
|
|
405
410
|
return false;
|
|
406
411
|
}
|
|
407
412
|
|
|
413
|
+
const Namespaces = {
|
|
414
|
+
"HTML": 0,
|
|
415
|
+
"0": "HTML",
|
|
416
|
+
"SVG": 1,
|
|
417
|
+
"1": "SVG",
|
|
418
|
+
"MATH_ML": 2,
|
|
419
|
+
"2": "MATH_ML"
|
|
420
|
+
};
|
|
421
|
+
|
|
408
422
|
const escapeRE = /["'&<>]/;
|
|
409
423
|
function escapeHtml(string) {
|
|
410
424
|
const str = "" + string;
|
|
@@ -613,6 +627,7 @@ exports.EMPTY_ARR = EMPTY_ARR;
|
|
|
613
627
|
exports.EMPTY_OBJ = EMPTY_OBJ;
|
|
614
628
|
exports.NO = NO;
|
|
615
629
|
exports.NOOP = NOOP;
|
|
630
|
+
exports.Namespaces = Namespaces;
|
|
616
631
|
exports.PatchFlagNames = PatchFlagNames;
|
|
617
632
|
exports.PatchFlags = PatchFlags;
|
|
618
633
|
exports.ShapeFlags = ShapeFlags;
|
|
@@ -631,6 +646,7 @@ exports.genPropsAccessExp = genPropsAccessExp;
|
|
|
631
646
|
exports.generateCodeFrame = generateCodeFrame;
|
|
632
647
|
exports.getEscapedCssVarName = getEscapedCssVarName;
|
|
633
648
|
exports.getGlobalThis = getGlobalThis;
|
|
649
|
+
exports.getModifierPropName = getModifierPropName;
|
|
634
650
|
exports.getSequence = getSequence;
|
|
635
651
|
exports.hasChanged = hasChanged;
|
|
636
652
|
exports.hasOwn = hasOwn;
|
package/dist/shared.d.ts
CHANGED
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* \/\*#\_\_PURE\_\_\*\/
|
|
6
6
|
* So that rollup can tree-shake them if necessary.
|
|
7
7
|
*/
|
|
8
|
-
/*! #__NO_SIDE_EFFECTS__ */
|
|
9
8
|
export declare function makeMap(str: string): (key: string) => boolean;
|
|
10
9
|
|
|
11
10
|
export declare const EMPTY_OBJ: {
|
|
@@ -61,6 +60,13 @@ export declare const capitalize: <T extends string>(str: T) => Capitalize<T>;
|
|
|
61
60
|
* @private
|
|
62
61
|
*/
|
|
63
62
|
export declare const toHandlerKey: <T extends string>(str: T) => T extends '' ? '' : `on${Capitalize<T>}`;
|
|
63
|
+
/**
|
|
64
|
+
* #13070 When v-model and v-model:model directives are used together,
|
|
65
|
+
* they will generate the same modelModifiers prop,
|
|
66
|
+
* so a `$` suffix is added to avoid conflicts.
|
|
67
|
+
* @private
|
|
68
|
+
*/
|
|
69
|
+
export declare const getModifierPropName: (name: string) => string;
|
|
64
70
|
export declare const hasChanged: (value: any, oldValue: any) => boolean;
|
|
65
71
|
export declare const invokeArrayFns: (fns: Function[], ...arg: any[]) => void;
|
|
66
72
|
export declare const def: (obj: object, key: string | symbol, value: any, writable?: boolean) => void;
|
|
@@ -302,6 +308,13 @@ export declare const isKnownMathMLAttr: (key: string) => boolean;
|
|
|
302
308
|
export declare function isRenderableAttrValue(value: unknown): boolean;
|
|
303
309
|
export declare function shouldSetAsAttr(tagName: string, key: string): boolean;
|
|
304
310
|
|
|
311
|
+
export type Namespace = number;
|
|
312
|
+
export declare enum Namespaces {
|
|
313
|
+
HTML = 0,
|
|
314
|
+
SVG = 1,
|
|
315
|
+
MATH_ML = 2
|
|
316
|
+
}
|
|
317
|
+
|
|
305
318
|
export declare function escapeHtml(string: unknown): string;
|
|
306
319
|
export declare function escapeHtmlComment(src: string): string;
|
|
307
320
|
export declare const cssVarNameEscapeSymbolsRE: RegExp;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/shared v3.6.0-alpha.
|
|
2
|
+
* @vue/shared v3.6.0-alpha.4
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
6
|
-
/*! #__NO_SIDE_EFFECTS__ */
|
|
7
6
|
// @__NO_SIDE_EFFECTS__
|
|
8
7
|
function makeMap(str) {
|
|
9
8
|
const map = /* @__PURE__ */ Object.create(null);
|
|
@@ -60,10 +59,10 @@ const isBuiltInDirective = /* @__PURE__ */ makeMap(
|
|
|
60
59
|
);
|
|
61
60
|
const cacheStringFunction = (fn) => {
|
|
62
61
|
const cache = /* @__PURE__ */ Object.create(null);
|
|
63
|
-
return (str) => {
|
|
62
|
+
return ((str) => {
|
|
64
63
|
const hit = cache[str];
|
|
65
64
|
return hit || (cache[str] = fn(str));
|
|
66
|
-
};
|
|
65
|
+
});
|
|
67
66
|
};
|
|
68
67
|
const camelizeRE = /-(\w)/g;
|
|
69
68
|
const camelizeReplacer = (_, c) => c ? c.toUpperCase() : "";
|
|
@@ -83,6 +82,9 @@ const toHandlerKey = cacheStringFunction(
|
|
|
83
82
|
return s;
|
|
84
83
|
}
|
|
85
84
|
);
|
|
85
|
+
const getModifierPropName = (name) => {
|
|
86
|
+
return `${name === "modelValue" || name === "model-value" ? "model" : name}Modifiers${name === "model" ? "$" : ""}`;
|
|
87
|
+
};
|
|
86
88
|
const hasChanged = (value, oldValue) => !Object.is(value, oldValue);
|
|
87
89
|
const invokeArrayFns = (fns, ...arg) => {
|
|
88
90
|
for (let i = 0; i < fns.length; i++) {
|
|
@@ -398,9 +400,21 @@ function shouldSetAsAttr(tagName, key) {
|
|
|
398
400
|
if ((key === "width" || key === "height") && (tagName === "IMG" || tagName === "VIDEO" || tagName === "CANVAS" || tagName === "SOURCE")) {
|
|
399
401
|
return true;
|
|
400
402
|
}
|
|
403
|
+
if (key === "sandbox" && tagName === "IFRAME") {
|
|
404
|
+
return true;
|
|
405
|
+
}
|
|
401
406
|
return false;
|
|
402
407
|
}
|
|
403
408
|
|
|
409
|
+
const Namespaces = {
|
|
410
|
+
"HTML": 0,
|
|
411
|
+
"0": "HTML",
|
|
412
|
+
"SVG": 1,
|
|
413
|
+
"1": "SVG",
|
|
414
|
+
"MATH_ML": 2,
|
|
415
|
+
"2": "MATH_ML"
|
|
416
|
+
};
|
|
417
|
+
|
|
404
418
|
const escapeRE = /["'&<>]/;
|
|
405
419
|
function escapeHtml(string) {
|
|
406
420
|
const str = "" + string;
|
|
@@ -613,4 +627,4 @@ function normalizeCssVarValue(value) {
|
|
|
613
627
|
return String(value);
|
|
614
628
|
}
|
|
615
629
|
|
|
616
|
-
export { EMPTY_ARR, EMPTY_OBJ, NO, NOOP, PatchFlagNames, PatchFlags, ShapeFlags, SlotFlags, YES, camelize, canSetValueDirectly, capitalize, cssVarNameEscapeSymbolsRE, def, escapeHtml, escapeHtmlComment, extend, genCacheKey, genPropsAccessExp, generateCodeFrame, getEscapedCssVarName, getGlobalThis, getSequence, hasChanged, hasOwn, hyphenate, includeBooleanAttr, invokeArrayFns, isArray, isBooleanAttr, isBuiltInDirective, isBuiltInTag, isDate, 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, stringifyStyle, toDisplayString, toHandlerKey, toNumber, toRawType, toTypeString };
|
|
630
|
+
export { EMPTY_ARR, EMPTY_OBJ, NO, NOOP, Namespaces, PatchFlagNames, PatchFlags, ShapeFlags, SlotFlags, YES, camelize, canSetValueDirectly, capitalize, cssVarNameEscapeSymbolsRE, def, escapeHtml, escapeHtmlComment, extend, genCacheKey, genPropsAccessExp, generateCodeFrame, getEscapedCssVarName, getGlobalThis, getModifierPropName, getSequence, hasChanged, hasOwn, hyphenate, includeBooleanAttr, invokeArrayFns, isArray, isBooleanAttr, isBuiltInDirective, isBuiltInTag, isDate, 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, stringifyStyle, toDisplayString, toHandlerKey, toNumber, toRawType, toTypeString };
|