@vue/shared 3.5.0-beta.3 → 3.5.0

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.5.0-beta.3
2
+ * @vue/shared v3.5.0
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -414,6 +414,13 @@ const commentStripRE = /^-?>|<!--|-->|--!>|<!-$/g;
414
414
  function escapeHtmlComment(src) {
415
415
  return src.replace(commentStripRE, "");
416
416
  }
417
+ const cssVarNameEscapeSymbolsRE = /[ !"#$%&'()*+,./:;<=>?@[\\\]^`{|}~]/g;
418
+ function getEscapedCssVarName(key, doubleEscape) {
419
+ return key.replace(
420
+ cssVarNameEscapeSymbolsRE,
421
+ (s) => doubleEscape ? s === '"' ? '\\\\\\"' : `\\\\${s}` : `\\${s}`
422
+ );
423
+ }
417
424
 
418
425
  function looseCompareArrays(a, b) {
419
426
  if (a.length !== b.length) return false;
@@ -514,12 +521,14 @@ exports.ShapeFlags = ShapeFlags;
514
521
  exports.SlotFlags = SlotFlags;
515
522
  exports.camelize = camelize;
516
523
  exports.capitalize = capitalize;
524
+ exports.cssVarNameEscapeSymbolsRE = cssVarNameEscapeSymbolsRE;
517
525
  exports.def = def;
518
526
  exports.escapeHtml = escapeHtml;
519
527
  exports.escapeHtmlComment = escapeHtmlComment;
520
528
  exports.extend = extend;
521
529
  exports.genPropsAccessExp = genPropsAccessExp;
522
530
  exports.generateCodeFrame = generateCodeFrame;
531
+ exports.getEscapedCssVarName = getEscapedCssVarName;
523
532
  exports.getGlobalThis = getGlobalThis;
524
533
  exports.hasChanged = hasChanged;
525
534
  exports.hasOwn = hasOwn;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/shared v3.5.0-beta.3
2
+ * @vue/shared v3.5.0
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -414,6 +414,13 @@ const commentStripRE = /^-?>|<!--|-->|--!>|<!-$/g;
414
414
  function escapeHtmlComment(src) {
415
415
  return src.replace(commentStripRE, "");
416
416
  }
417
+ const cssVarNameEscapeSymbolsRE = /[ !"#$%&'()*+,./:;<=>?@[\\\]^`{|}~]/g;
418
+ function getEscapedCssVarName(key, doubleEscape) {
419
+ return key.replace(
420
+ cssVarNameEscapeSymbolsRE,
421
+ (s) => doubleEscape ? s === '"' ? '\\\\\\"' : `\\\\${s}` : `\\${s}`
422
+ );
423
+ }
417
424
 
418
425
  function looseCompareArrays(a, b) {
419
426
  if (a.length !== b.length) return false;
@@ -514,12 +521,14 @@ exports.ShapeFlags = ShapeFlags;
514
521
  exports.SlotFlags = SlotFlags;
515
522
  exports.camelize = camelize;
516
523
  exports.capitalize = capitalize;
524
+ exports.cssVarNameEscapeSymbolsRE = cssVarNameEscapeSymbolsRE;
517
525
  exports.def = def;
518
526
  exports.escapeHtml = escapeHtml;
519
527
  exports.escapeHtmlComment = escapeHtmlComment;
520
528
  exports.extend = extend;
521
529
  exports.genPropsAccessExp = genPropsAccessExp;
522
530
  exports.generateCodeFrame = generateCodeFrame;
531
+ exports.getEscapedCssVarName = getEscapedCssVarName;
523
532
  exports.getGlobalThis = getGlobalThis;
524
533
  exports.hasChanged = hasChanged;
525
534
  exports.hasOwn = hasOwn;
package/dist/shared.d.ts CHANGED
@@ -291,6 +291,8 @@ export declare function isRenderableAttrValue(value: unknown): boolean;
291
291
 
292
292
  export declare function escapeHtml(string: unknown): string;
293
293
  export declare function escapeHtmlComment(src: string): string;
294
+ export declare const cssVarNameEscapeSymbolsRE: RegExp;
295
+ export declare function getEscapedCssVarName(key: string, doubleEscape: boolean): string;
294
296
 
295
297
  export declare function looseEqual(a: any, b: any): boolean;
296
298
  export declare function looseIndexOf(arr: any[], val: any): number;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/shared v3.5.0-beta.3
2
+ * @vue/shared v3.5.0
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -410,6 +410,13 @@ const commentStripRE = /^-?>|<!--|-->|--!>|<!-$/g;
410
410
  function escapeHtmlComment(src) {
411
411
  return src.replace(commentStripRE, "");
412
412
  }
413
+ const cssVarNameEscapeSymbolsRE = /[ !"#$%&'()*+,./:;<=>?@[\\\]^`{|}~]/g;
414
+ function getEscapedCssVarName(key, doubleEscape) {
415
+ return key.replace(
416
+ cssVarNameEscapeSymbolsRE,
417
+ (s) => doubleEscape ? s === '"' ? '\\\\\\"' : `\\\\${s}` : `\\${s}`
418
+ );
419
+ }
413
420
 
414
421
  function looseCompareArrays(a, b) {
415
422
  if (a.length !== b.length) return false;
@@ -500,4 +507,4 @@ const stringifySymbol = (v, i = "") => {
500
507
  );
501
508
  };
502
509
 
503
- 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, isMathMLTag, isModelListener, isObject, isOn, isPlainObject, isPromise, isRegExp, isRenderableAttrValue, 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 };
510
+ export { EMPTY_ARR, EMPTY_OBJ, NO, NOOP, PatchFlagNames, PatchFlags, ShapeFlags, SlotFlags, camelize, capitalize, cssVarNameEscapeSymbolsRE, def, escapeHtml, escapeHtmlComment, extend, genPropsAccessExp, generateCodeFrame, getEscapedCssVarName, getGlobalThis, hasChanged, hasOwn, hyphenate, includeBooleanAttr, invokeArrayFns, isArray, isBooleanAttr, isBuiltInDirective, isDate, isFunction, isGloballyAllowed, isGloballyWhitelisted, isHTMLTag, isIntegerKey, isKnownHtmlAttr, isKnownSvgAttr, isMap, isMathMLTag, isModelListener, isObject, isOn, isPlainObject, isPromise, isRegExp, isRenderableAttrValue, 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 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vue/shared",
3
- "version": "3.5.0-beta.3",
3
+ "version": "3.5.0",
4
4
  "description": "internal utils shared across @vue packages",
5
5
  "main": "index.js",
6
6
  "module": "dist/shared.esm-bundler.js",