dozy 1.0.101 → 1.0.102

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
@@ -834,6 +834,8 @@ declare const $Response: {
834
834
  declare const $log: <T>(a?: T, ...x: any[]) => T | undefined;
835
835
  declare const $crypto: Crypto | undefined;
836
836
 
837
+ /** xls 横屏模式下的默认最大宽高比。 */
838
+ declare const DEFAULT_XLS_MAX_ASPECT_RATIO = 1.2;
837
839
  type ScaleComputer = undefined | ((scaler: Scaler) => number);
838
840
  type ScaleIniter = (scaler: Scaler) => void;
839
841
  type ScaleResponsiveOptions = {
@@ -846,7 +848,7 @@ type ScaleResponsiveOptions = {
846
848
  /**
847
849
  * xls 横屏模式下的最大宽高比。
848
850
  *
849
- * 默认写成 `1.2`。
851
+ * 默认 {@link DEFAULT_XLS_MAX_ASPECT_RATIO}。
850
852
  */
851
853
  xlsMaxAspectRatio?: number;
852
854
  /** xls 状态变化时触发,方便业务侧保存状态。 */
@@ -1461,6 +1463,6 @@ declare function toRgbString(input: string | Color | any): string | undefined;
1461
1463
  */
1462
1464
  declare function toHslString(input: string | Color | any): string | undefined;
1463
1465
 
1464
- declare const DOZY = "1.0.101";
1466
+ declare const DOZY = "1.0.102";
1465
1467
 
1466
- 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, 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$setPathTarget, xtrim };
1468
+ 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_MAX_ASPECT_RATIO, 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$setPathTarget, xtrim };
package/dist/index.js CHANGED
@@ -12022,6 +12022,7 @@ async function $compressImage(input, options) {
12022
12022
  }
12023
12023
 
12024
12024
  // src/modules/EnableScaler.ts
12025
+ var DEFAULT_XLS_MAX_ASPECT_RATIO = 1.2;
12025
12026
  var _base, _mainScale, _scaleComputer;
12026
12027
  var Scaler = class {
12027
12028
  /**
@@ -12148,7 +12149,7 @@ var standardIniter = ({
12148
12149
  const h = helement.clientHeight;
12149
12150
  const xls = !!responsive && w > h;
12150
12151
  const finalBase = xls ? scaler2.sourceBase * (responsive.baseMultiplier ?? 640 / 320) : scaler2.sourceBase;
12151
- const finalMaxAspectRatio = xls ? responsive.xlsMaxAspectRatio ?? 1.2 : maxAspectRatio;
12152
+ const finalMaxAspectRatio = xls ? responsive.xlsMaxAspectRatio ?? DEFAULT_XLS_MAX_ASPECT_RATIO : maxAspectRatio;
12152
12153
  document.documentElement.dataset.xadXls = xls ? "1" : "0";
12153
12154
  responsive?.setXls?.(xls);
12154
12155
  scaler2.base = finalBase;
@@ -27585,7 +27586,7 @@ var lodash_default_default = wrapperLodash_default;
27585
27586
 
27586
27587
  // src/index.ts
27587
27588
  var import_crypto_js = __toESM(require_crypto_js(), 1);
27588
- var DOZY = "1.0.101";
27589
+ var DOZY = "1.0.102";
27589
27590
  var export_Cryptojs = import_crypto_js.default;
27590
27591
  export {
27591
27592
  $Headers,
@@ -27691,6 +27692,7 @@ export {
27691
27692
  CanceledError2 as CanceledError,
27692
27693
  src_exports as ColorLib,
27693
27694
  export_Cryptojs as Cryptojs,
27695
+ DEFAULT_XLS_MAX_ASPECT_RATIO,
27694
27696
  DOZY,
27695
27697
  Gens,
27696
27698
  HttpStatusCode2 as HttpStatusCode,