@vue/shared 3.5.17 → 3.5.19
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 +22 -3
- package/dist/shared.cjs.prod.js +14 -3
- package/dist/shared.d.ts +6 -0
- package/dist/shared.esm-bundler.js +22 -4
- package/package.json +1 -1
package/dist/shared.cjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/shared v3.5.
|
|
2
|
+
* @vue/shared v3.5.19
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -60,10 +60,10 @@ const isBuiltInDirective = /* @__PURE__ */ makeMap(
|
|
|
60
60
|
);
|
|
61
61
|
const cacheStringFunction = (fn) => {
|
|
62
62
|
const cache = /* @__PURE__ */ Object.create(null);
|
|
63
|
-
return (str) => {
|
|
63
|
+
return ((str) => {
|
|
64
64
|
const hit = cache[str];
|
|
65
65
|
return hit || (cache[str] = fn(str));
|
|
66
|
-
};
|
|
66
|
+
});
|
|
67
67
|
};
|
|
68
68
|
const camelizeRE = /-(\w)/g;
|
|
69
69
|
const camelize = cacheStringFunction(
|
|
@@ -520,6 +520,24 @@ const stringifySymbol = (v, i = "") => {
|
|
|
520
520
|
);
|
|
521
521
|
};
|
|
522
522
|
|
|
523
|
+
function normalizeCssVarValue(value) {
|
|
524
|
+
if (value == null) {
|
|
525
|
+
return "initial";
|
|
526
|
+
}
|
|
527
|
+
if (typeof value === "string") {
|
|
528
|
+
return value === "" ? " " : value;
|
|
529
|
+
}
|
|
530
|
+
if (typeof value !== "number" || !Number.isFinite(value)) {
|
|
531
|
+
{
|
|
532
|
+
console.warn(
|
|
533
|
+
"[Vue warn] Invalid value used for CSS binding. Expected a string or a finite number but received:",
|
|
534
|
+
value
|
|
535
|
+
);
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
return String(value);
|
|
539
|
+
}
|
|
540
|
+
|
|
523
541
|
exports.EMPTY_ARR = EMPTY_ARR;
|
|
524
542
|
exports.EMPTY_OBJ = EMPTY_OBJ;
|
|
525
543
|
exports.NO = NO;
|
|
@@ -579,6 +597,7 @@ exports.looseIndexOf = looseIndexOf;
|
|
|
579
597
|
exports.looseToNumber = looseToNumber;
|
|
580
598
|
exports.makeMap = makeMap;
|
|
581
599
|
exports.normalizeClass = normalizeClass;
|
|
600
|
+
exports.normalizeCssVarValue = normalizeCssVarValue;
|
|
582
601
|
exports.normalizeProps = normalizeProps;
|
|
583
602
|
exports.normalizeStyle = normalizeStyle;
|
|
584
603
|
exports.objectToString = objectToString;
|
package/dist/shared.cjs.prod.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/shared v3.5.
|
|
2
|
+
* @vue/shared v3.5.19
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -60,10 +60,10 @@ const isBuiltInDirective = /* @__PURE__ */ makeMap(
|
|
|
60
60
|
);
|
|
61
61
|
const cacheStringFunction = (fn) => {
|
|
62
62
|
const cache = /* @__PURE__ */ Object.create(null);
|
|
63
|
-
return (str) => {
|
|
63
|
+
return ((str) => {
|
|
64
64
|
const hit = cache[str];
|
|
65
65
|
return hit || (cache[str] = fn(str));
|
|
66
|
-
};
|
|
66
|
+
});
|
|
67
67
|
};
|
|
68
68
|
const camelizeRE = /-(\w)/g;
|
|
69
69
|
const camelize = cacheStringFunction(
|
|
@@ -520,6 +520,16 @@ const stringifySymbol = (v, i = "") => {
|
|
|
520
520
|
);
|
|
521
521
|
};
|
|
522
522
|
|
|
523
|
+
function normalizeCssVarValue(value) {
|
|
524
|
+
if (value == null) {
|
|
525
|
+
return "initial";
|
|
526
|
+
}
|
|
527
|
+
if (typeof value === "string") {
|
|
528
|
+
return value === "" ? " " : value;
|
|
529
|
+
}
|
|
530
|
+
return String(value);
|
|
531
|
+
}
|
|
532
|
+
|
|
523
533
|
exports.EMPTY_ARR = EMPTY_ARR;
|
|
524
534
|
exports.EMPTY_OBJ = EMPTY_OBJ;
|
|
525
535
|
exports.NO = NO;
|
|
@@ -579,6 +589,7 @@ exports.looseIndexOf = looseIndexOf;
|
|
|
579
589
|
exports.looseToNumber = looseToNumber;
|
|
580
590
|
exports.makeMap = makeMap;
|
|
581
591
|
exports.normalizeClass = normalizeClass;
|
|
592
|
+
exports.normalizeCssVarValue = normalizeCssVarValue;
|
|
582
593
|
exports.normalizeProps = normalizeProps;
|
|
583
594
|
exports.normalizeStyle = normalizeStyle;
|
|
584
595
|
exports.objectToString = objectToString;
|
package/dist/shared.d.ts
CHANGED
|
@@ -326,4 +326,10 @@ type OverloadProps<TOverload> = Pick<TOverload, keyof TOverload>;
|
|
|
326
326
|
type OverloadUnionRecursive<TOverload, TPartialOverload = unknown> = TOverload extends (...args: infer TArgs) => infer TReturn ? TPartialOverload extends TOverload ? never : OverloadUnionRecursive<TPartialOverload & TOverload, TPartialOverload & ((...args: TArgs) => TReturn) & OverloadProps<TOverload>> | ((...args: TArgs) => TReturn) : never;
|
|
327
327
|
type OverloadUnion<TOverload extends (...args: any[]) => any> = Exclude<OverloadUnionRecursive<(() => never) & TOverload>, TOverload extends () => never ? never : () => never>;
|
|
328
328
|
|
|
329
|
+
/**
|
|
330
|
+
* Normalize CSS var value created by `v-bind` in `<style>` block
|
|
331
|
+
* See https://github.com/vuejs/core/pull/12461#issuecomment-2495804664
|
|
332
|
+
*/
|
|
333
|
+
export declare function normalizeCssVarValue(value: unknown): string;
|
|
334
|
+
|
|
329
335
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/shared v3.5.
|
|
2
|
+
* @vue/shared v3.5.19
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -56,10 +56,10 @@ const isBuiltInDirective = /* @__PURE__ */ makeMap(
|
|
|
56
56
|
);
|
|
57
57
|
const cacheStringFunction = (fn) => {
|
|
58
58
|
const cache = /* @__PURE__ */ Object.create(null);
|
|
59
|
-
return (str) => {
|
|
59
|
+
return ((str) => {
|
|
60
60
|
const hit = cache[str];
|
|
61
61
|
return hit || (cache[str] = fn(str));
|
|
62
|
-
};
|
|
62
|
+
});
|
|
63
63
|
};
|
|
64
64
|
const camelizeRE = /-(\w)/g;
|
|
65
65
|
const camelize = cacheStringFunction(
|
|
@@ -516,4 +516,22 @@ const stringifySymbol = (v, i = "") => {
|
|
|
516
516
|
);
|
|
517
517
|
};
|
|
518
518
|
|
|
519
|
-
|
|
519
|
+
function normalizeCssVarValue(value) {
|
|
520
|
+
if (value == null) {
|
|
521
|
+
return "initial";
|
|
522
|
+
}
|
|
523
|
+
if (typeof value === "string") {
|
|
524
|
+
return value === "" ? " " : value;
|
|
525
|
+
}
|
|
526
|
+
if (typeof value !== "number" || !Number.isFinite(value)) {
|
|
527
|
+
if (!!(process.env.NODE_ENV !== "production")) {
|
|
528
|
+
console.warn(
|
|
529
|
+
"[Vue warn] Invalid value used for CSS binding. Expected a string or a finite number but received:",
|
|
530
|
+
value
|
|
531
|
+
);
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
return String(value);
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
export { EMPTY_ARR, EMPTY_OBJ, NO, NOOP, PatchFlagNames, PatchFlags, ShapeFlags, SlotFlags, camelize, capitalize, cssVarNameEscapeSymbolsRE, def, escapeHtml, escapeHtmlComment, extend, genCacheKey, genPropsAccessExp, generateCodeFrame, getEscapedCssVarName, getGlobalThis, hasChanged, hasOwn, hyphenate, includeBooleanAttr, invokeArrayFns, isArray, isBooleanAttr, isBuiltInDirective, isDate, isFunction, isGloballyAllowed, isGloballyWhitelisted, isHTMLTag, isIntegerKey, isKnownHtmlAttr, isKnownMathMLAttr, isKnownSvgAttr, isMap, isMathMLTag, isModelListener, 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, slotFlagsText, stringifyStyle, toDisplayString, toHandlerKey, toNumber, toRawType, toTypeString };
|