dozy 1.0.107 → 1.0.108

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/index.d.ts CHANGED
@@ -1375,7 +1375,10 @@ declare class RepoStore {
1375
1375
  constructor(x0: string, user: string, repo: string);
1376
1376
  }
1377
1377
 
1378
+ /** HTML 转义(' → ',兼容 HTML4/5) */
1378
1379
  declare function $escapeHTML(str?: string): string;
1380
+ /** XML 转义(' → ',符合 XML 1.0 规范) */
1381
+ declare function $escapeXML(str?: string): string;
1379
1382
  declare class RainbowGen {
1380
1383
  i: number;
1381
1384
  ten: number;
@@ -1467,6 +1470,6 @@ declare function toRgbString(input: string | Color | any): string | undefined;
1467
1470
  */
1468
1471
  declare function toHslString(input: string | Color | any): string | undefined;
1469
1472
 
1470
- declare const DOZY = "1.0.107";
1473
+ declare const DOZY = "1.0.108";
1471
1474
 
1472
- export { $Headers, $Request, $Response, $URL, $URLSearchParams, $arrayFrom, $arrayIsArray, $assign, $backgroundColor, $borderColor, $capitalize, $checkValidEmailWithUnicode, $clamp, $clearInterval, $clearTimeout, $clone, $compressImage, $compressImageBase64, $compressImageDefaultOptions, $copy, $crypto, $date, $decodeBase64ToBinary, $decodeBase64ToUnicode, $deepClone, $defineProperty, $document, $encodeUnicodeToBase64, $ensureUrl, $entries, $escapeHTML, $fallbackCopy, $fetch, $fileToBase64, $formatDate, $formatK, $formatPoints, $formatPointsWithChange, $formatWithCommas, $freeze, $genSSF, $getFileType, $getHue, $getTimeString, $hasKey, $humanizeBytes, $if, $inRange, $inRange2, $inferExtensionFormPureBase64, $inferMimeTypeFormPureBase64, $is, $isObject, $isPlainClass, $isValidEmailWithUnicode, $isValidOrBriefURL, $jsonParse, $jsonStringify, $keys, $lastIndex, $lindex, $loadOpt, $location, $log, $lplus, $magic, $math, $now, $numberIsFinite, $numberIsNaN, $oc, $open, $parseParams, $promise, $pureText, $purifyBase64, $randomByte, $replaceHolesWithUndefined, $rmvSlash, $rsValue, $rsetValue, $rvalue, $s, $sc, $setInterval, $setRange, $setTimeout, $stringFromCharCode, $stringFromCodePoint, $stringToRange, $strings, $toDataUrlFromBase64, $validName, $values, $window, type Any, type Atoa, type Coord, type Coord3, DEFAULT_XLS_BASE_MULTIPLIER, DEFAULT_XLS_MAX_ASPECT_RATIO, DEFAULT_XLS_MAX_ASPECT_RATIO_FACTOR, DOZY, type DozyConfig, type DozyConfigItem, type FileType, Gens, type Hel, type IOpt, type Items, type Null, type Nullable, RainbowGen, RepoStore, type ScaleComputer, type ScaleIniter, type ScaleResponsiveOptions, StringObfuscator, type UNumber, __GensDirectives, _res, boxShadow, dozy, enableScaler, err403, errArg, errCode, errContent, errMsg, errNotLoggedIn, errToString, getBrightness, getColorMap, isNowAroundUtcHour, isNull, isValidColor, maybeString, registerCustomColor, s, shanghaiDateFormatter, smallChance, smartParse, smartString, standardIniter, textShadow, toHexString, toHslString, toRgbString, toRgbaArray, web$enableHttpsRedirect, web$enableProdProtector, web$encodeURI, web$pathStartData, web$redirectToDomain, web$replaceHash, web$setPathTarget, xtrim };
1475
+ export { $Headers, $Request, $Response, $URL, $URLSearchParams, $arrayFrom, $arrayIsArray, $assign, $backgroundColor, $borderColor, $capitalize, $checkValidEmailWithUnicode, $clamp, $clearInterval, $clearTimeout, $clone, $compressImage, $compressImageBase64, $compressImageDefaultOptions, $copy, $crypto, $date, $decodeBase64ToBinary, $decodeBase64ToUnicode, $deepClone, $defineProperty, $document, $encodeUnicodeToBase64, $ensureUrl, $entries, $escapeHTML, $escapeXML, $fallbackCopy, $fetch, $fileToBase64, $formatDate, $formatK, $formatPoints, $formatPointsWithChange, $formatWithCommas, $freeze, $genSSF, $getFileType, $getHue, $getTimeString, $hasKey, $humanizeBytes, $if, $inRange, $inRange2, $inferExtensionFormPureBase64, $inferMimeTypeFormPureBase64, $is, $isObject, $isPlainClass, $isValidEmailWithUnicode, $isValidOrBriefURL, $jsonParse, $jsonStringify, $keys, $lastIndex, $lindex, $loadOpt, $location, $log, $lplus, $magic, $math, $now, $numberIsFinite, $numberIsNaN, $oc, $open, $parseParams, $promise, $pureText, $purifyBase64, $randomByte, $replaceHolesWithUndefined, $rmvSlash, $rsValue, $rsetValue, $rvalue, $s, $sc, $setInterval, $setRange, $setTimeout, $stringFromCharCode, $stringFromCodePoint, $stringToRange, $strings, $toDataUrlFromBase64, $validName, $values, $window, type Any, type Atoa, type Coord, type Coord3, DEFAULT_XLS_BASE_MULTIPLIER, DEFAULT_XLS_MAX_ASPECT_RATIO, DEFAULT_XLS_MAX_ASPECT_RATIO_FACTOR, DOZY, type DozyConfig, type DozyConfigItem, type FileType, Gens, type Hel, type IOpt, type Items, type Null, type Nullable, RainbowGen, RepoStore, type ScaleComputer, type ScaleIniter, type ScaleResponsiveOptions, StringObfuscator, type UNumber, __GensDirectives, _res, boxShadow, dozy, enableScaler, err403, errArg, errCode, errContent, errMsg, errNotLoggedIn, errToString, getBrightness, getColorMap, isNowAroundUtcHour, isNull, isValidColor, maybeString, registerCustomColor, s, shanghaiDateFormatter, smallChance, smartParse, smartString, standardIniter, textShadow, toHexString, toHslString, toRgbString, toRgbaArray, web$enableHttpsRedirect, web$enableProdProtector, web$encodeURI, web$pathStartData, web$redirectToDomain, web$replaceHash, web$setPathTarget, xtrim };
package/dist/index.js CHANGED
@@ -2857,18 +2857,20 @@ function __GensStyleIds() {
2857
2857
 
2858
2858
  // src/modules/gens/Gens.ts
2859
2859
  var webSide = typeof window !== "undefined";
2860
+ var _escapeBase = {
2861
+ "&": "&",
2862
+ "<": "&lt;",
2863
+ ">": "&gt;",
2864
+ '"': "&quot;"
2865
+ };
2866
+ var _escapeRegex = /[&<>"']/g;
2860
2867
  function $escapeHTML(str) {
2861
2868
  if (!str) return "";
2862
- return str.replace(/[&<>"']/g, (match) => {
2863
- const escapeMap = {
2864
- "&": "&amp;",
2865
- "<": "&lt;",
2866
- ">": "&gt;",
2867
- '"': "&quot;",
2868
- "'": "&#39;"
2869
- };
2870
- return escapeMap[match];
2871
- });
2869
+ return str.replace(_escapeRegex, (ch) => _escapeBase[ch] || "&#39;");
2870
+ }
2871
+ function $escapeXML(str) {
2872
+ if (!str) return "";
2873
+ return str.replace(_escapeRegex, (ch) => _escapeBase[ch] || "&apos;");
2872
2874
  }
2873
2875
  var RainbowGen = class _RainbowGen {
2874
2876
  constructor(useTimes = 0) {
@@ -8163,7 +8165,7 @@ function toHslString(input) {
8163
8165
  }
8164
8166
 
8165
8167
  // src/index.ts
8166
- var DOZY = "1.0.107";
8168
+ var DOZY = "1.0.108";
8167
8169
  /*! Bundled license information:
8168
8170
 
8169
8171
  @octokit/request-error/dist-src/index.js:
@@ -8174,6 +8176,6 @@ var DOZY = "1.0.107";
8174
8176
  (* v8 ignore else -- @preserve *)
8175
8177
  */
8176
8178
 
8177
- export { $Headers, $Request, $Response, $URL, $URLSearchParams, $arrayFrom, $arrayIsArray, $assign, $backgroundColor, $borderColor, $capitalize, $checkValidEmailWithUnicode, $clamp, $clearInterval, $clearTimeout, $clone, $compressImage, $compressImageBase64, $compressImageDefaultOptions, $copy, $crypto, $date, $decodeBase64ToBinary, $decodeBase64ToUnicode, $deepClone, $defineProperty, $document, $encodeUnicodeToBase64, $ensureUrl, $entries, $escapeHTML, $fallbackCopy, $fetch, $fileToBase64, $formatDate, $formatK, $formatPoints, $formatPointsWithChange, $formatWithCommas, $freeze, $genSSF, $getFileType, $getHue, $getTimeString, $hasKey, $humanizeBytes, $if, $inRange, $inRange2, $inferExtensionFormPureBase64, $inferMimeTypeFormPureBase64, $is, $isObject, $isPlainClass, $isValidEmailWithUnicode, $isValidOrBriefURL, $jsonParse, $jsonStringify, $keys, $lastIndex, $lindex, $loadOpt, $location, $log, $lplus, $magic, $math, $now, $numberIsFinite, $numberIsNaN, $oc, $open, $parseParams, $promise, $pureText, $purifyBase64, $randomByte, $replaceHolesWithUndefined, $rmvSlash, $rsValue, $rsetValue, $rvalue, $s, $sc, $setInterval, $setRange, $setTimeout, $stringFromCharCode, $stringFromCodePoint, $stringToRange, $strings, $toDataUrlFromBase64, $validName, $values, $window, src_exports as ColorLib, DEFAULT_XLS_BASE_MULTIPLIER, DEFAULT_XLS_MAX_ASPECT_RATIO, DEFAULT_XLS_MAX_ASPECT_RATIO_FACTOR, DOZY, Gens, RainbowGen, RepoStore, StringObfuscator, __GensDirectives, _res, boxShadow, customAlphabet, dozy, enableScaler, err403, errArg, errCode, errContent, errMsg, errNotLoggedIn, errToString, getBrightness, getColorMap, isNowAroundUtcHour, isNull, isValidColor, maybeString, nanoid, registerCustomColor, s, shanghaiDateFormatter, smallChance, smartParse, smartString, standardIniter, textShadow, toHexString, toHslString, toRgbString, toRgbaArray, urlAlphabet, web$enableHttpsRedirect, web$enableProdProtector, web$encodeURI, web$pathStartData, web$redirectToDomain, web$replaceHash, web$setPathTarget, xtrim };
8179
+ export { $Headers, $Request, $Response, $URL, $URLSearchParams, $arrayFrom, $arrayIsArray, $assign, $backgroundColor, $borderColor, $capitalize, $checkValidEmailWithUnicode, $clamp, $clearInterval, $clearTimeout, $clone, $compressImage, $compressImageBase64, $compressImageDefaultOptions, $copy, $crypto, $date, $decodeBase64ToBinary, $decodeBase64ToUnicode, $deepClone, $defineProperty, $document, $encodeUnicodeToBase64, $ensureUrl, $entries, $escapeHTML, $escapeXML, $fallbackCopy, $fetch, $fileToBase64, $formatDate, $formatK, $formatPoints, $formatPointsWithChange, $formatWithCommas, $freeze, $genSSF, $getFileType, $getHue, $getTimeString, $hasKey, $humanizeBytes, $if, $inRange, $inRange2, $inferExtensionFormPureBase64, $inferMimeTypeFormPureBase64, $is, $isObject, $isPlainClass, $isValidEmailWithUnicode, $isValidOrBriefURL, $jsonParse, $jsonStringify, $keys, $lastIndex, $lindex, $loadOpt, $location, $log, $lplus, $magic, $math, $now, $numberIsFinite, $numberIsNaN, $oc, $open, $parseParams, $promise, $pureText, $purifyBase64, $randomByte, $replaceHolesWithUndefined, $rmvSlash, $rsValue, $rsetValue, $rvalue, $s, $sc, $setInterval, $setRange, $setTimeout, $stringFromCharCode, $stringFromCodePoint, $stringToRange, $strings, $toDataUrlFromBase64, $validName, $values, $window, src_exports as ColorLib, DEFAULT_XLS_BASE_MULTIPLIER, DEFAULT_XLS_MAX_ASPECT_RATIO, DEFAULT_XLS_MAX_ASPECT_RATIO_FACTOR, DOZY, Gens, RainbowGen, RepoStore, StringObfuscator, __GensDirectives, _res, boxShadow, customAlphabet, dozy, enableScaler, err403, errArg, errCode, errContent, errMsg, errNotLoggedIn, errToString, getBrightness, getColorMap, isNowAroundUtcHour, isNull, isValidColor, maybeString, nanoid, registerCustomColor, s, shanghaiDateFormatter, smallChance, smartParse, smartString, standardIniter, textShadow, toHexString, toHslString, toRgbString, toRgbaArray, urlAlphabet, web$enableHttpsRedirect, web$enableProdProtector, web$encodeURI, web$pathStartData, web$redirectToDomain, web$replaceHash, web$setPathTarget, xtrim };
8178
8180
  //# sourceMappingURL=index.js.map
8179
8181
  //# sourceMappingURL=index.js.map