dozy 1.0.58 → 1.0.60

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.
@@ -9,17 +9,17 @@
9
9
  ======================= */
10
10
  @font-face {
11
11
  font-family: 'xaiforfont';
12
- src: url('https://cdn.jsdelivr.net/gh/xaidozy/res@main/fonts/xaiforfont.woff2') format('woff2');
12
+ src: url('https://cdn.jsdelivr.net/gh/umfe/res@main/fonts/xaiforfont.woff2') format('woff2');
13
13
  font-display: swap;
14
14
  }
15
15
  @font-face {
16
16
  font-family: 'xaiforcode';
17
- src: url('https://cdn.jsdelivr.net/gh/xaidozy/res@main/fonts/xaiforcode.woff2') format('woff2');
17
+ src: url('https://cdn.jsdelivr.net/gh/umfe/res@main/fonts/xaiforcode.woff2') format('woff2');
18
18
  font-display: swap;
19
19
  }
20
20
  @font-face {
21
21
  font-family: 'xaifont';
22
- src: url('https://cdn.jsdelivr.net/gh/xaidozy/res@main/fonts/xaifont.woff2') format('woff2');
22
+ src: url('https://cdn.jsdelivr.net/gh/umfe/res@main/fonts/xaifont.woff2') format('woff2');
23
23
  font-display: swap;
24
24
  }
25
25
 
@@ -62,41 +62,44 @@
62
62
  */
63
63
 
64
64
  :root {
65
- /* Default: 暖黄护眼风 - 类似纸张或护眼模式,柔和舒适 */
66
- --xai-primary-dark: #f9f4e0; /* 页面大背景:极淡的奶黄色,非常柔和 */
67
- --xai-primary-light: #fffdf5; /* 卡片:接近白色的淡米黄,干净且护眼 */
68
- --xai-primary: #f2ebd4; /* 输入框:深一点的淡黄,内陷感清晰 */
69
- --xai-text: #5c4b37; /* 文本:深咖啡色,比纯黑更护眼且配合暖黄背景 */
70
- --xai-text-muted: #998a76; /* 次要文本:浅咖啡色 */
71
- --xai-notable: #f4a261; /* 显眼色:温暖的沙橙色,类似 Light 主题的柔和感,但色调更暖,配合护眼背景 */
72
- --xai-border: #ded2b6; /* 边框:米灰色 */
73
- --xai-shadow: #8f826d;
74
- --xai-destructive: #d9534f;
65
+ /* Default: 暖黄护眼风 - 类似纸张或护眼模式,柔和舒适*/
66
+ --xai-primary-dark: #f9f4e0; /* 页面大背景:极淡的奶黄色,非常柔和 */
67
+ --xai-primary-light: #fffdf5; /* 卡片:接近白色的淡米黄,干净且护眼 */
68
+ --xai-primary: #fefbf6; /* 输入框:浅米色,内陷感清晰 */
69
+ --xai-text: #5c4b37; /* 文本:深咖啡色,比纯黑更护眼且配合暖黄背景 */
70
+ --xai-text-muted: #998a76; /* 次要文本:浅咖啡色 */
71
+ --xai-notable: #f4a261; /* 显眼色:温暖的棕橙色,配合护眼背景 */
72
+ --xai-border: #f0e8dd; /* 边框:淡米灰色 */
73
+ --xai-shadow: #8f826d; /* 阴影:比边框稍深的米灰色,保持柔和 */
74
+ --xai-destructive: #d9534f; /* 危险操作:暖红色,与暖黄主题协调 */
75
75
  }
76
76
 
77
- .dark {
78
- /* Dark: 高压深蓝紫 - 优雅、神秘、高级 */
79
- --xai-primary-dark: #0f172a; /* 页面大背景:深邃的午夜蓝 (Slate-900) */
80
- --xai-primary-light: #1e293b; /* 卡片:深蓝灰 (Slate-800),有质感 */
81
- --xai-primary: #334155; /* 输入框:Slate-700,层级分明 */
82
- --xai-text: #e2e8f0; /* 文本:Slate-200,冷白 */
83
- --xai-text-muted: #94a3b8; /* 次要文本:Slate-400 */
84
- --xai-notable: #8b5cf6; /* 显眼色:Violet-500,高贵的深紫色,优雅且有压迫感 */
85
- --xai-border: #475569; /* 边框:Slate-600 */
86
- --xai-shadow: #000000;
87
- --xai-destructive: #f43f5e; /* Rose-500 */
77
+ .dark,
78
+ .cl-dark {
79
+ /* 使用cl-dark切换主题 如果你想避免shadcn里dark的样式 (dark:xxx) */
80
+ /* Dark: 高压深蓝紫 - 优雅、神秘、高级 */
81
+ --xai-primary-dark: #0f172a; /* 页面大背景:深邃的午夜蓝 (Slate-900) */
82
+ --xai-primary-light: #1e293b; /* 卡片:深蓝灰 (Slate-800),有质感 */
83
+ --xai-primary: #334155; /* 输入框:Slate-700,层级分明 */
84
+ --xai-text: #e2e8f0; /* 文本:Slate-200,冷白 */
85
+ --xai-text-muted: #94a3b8; /* 次要文本:Slate-400 */
86
+ --xai-notable: #8b5cf6; /* 显眼色:Violet-500,高贵的深紫色,优雅且有压迫感 */
87
+ --xai-border: #475569; /* 边框:Slate-600 */
88
+ --xai-shadow: #000000;
89
+ --xai-destructive: #f43f5e; /* Rose-500 */
88
90
  }
89
91
 
90
- .light {
91
- /* Light: 纯白亮色 - 极致干净,高调 */
92
- --xai-primary-dark: #f1f5f9; /* 页面大背景:Slate-100,比纯白稍暗,增强辨识度 */
93
- --xai-primary-light: #ffffff; /* 卡片:纯白,极致干净 */
94
- --xai-primary: #e2e8f0; /* 输入框:Slate-200,极淡的灰 */
95
- --xai-text: #020617; /* 文本:Slate-950,极致的黑 */
96
- --xai-text-muted: #64748b; /* 次要文本 */
97
- --xai-notable: #38bdf8; /* 显眼色:明亮的淡蓝/青色,清新通透 */
98
- --xai-border: #cbd5e1; /* 边框 */
99
- /* 额外说的一下 有一个地方 是--xai-notable作为背景 --xai-primary-light作为文本前景 */
100
- --xai-shadow: #000000;
101
- --xai-destructive: #ef4444;
92
+ .light,
93
+ .cl-light {
94
+ /* Light: 纯白亮色 - 极致干净,高调 */
95
+ --xai-primary-dark: #f1f5f9; /* 页面大背景:Slate-100,比纯白稍暗,增强辨识度 */
96
+ --xai-primary-light: #ffffff; /* 卡片:纯白,极致干净 */
97
+ --xai-primary: #e2e8f0; /* 输入框:Slate-200,极淡的灰 */
98
+ --xai-text: #020617; /* 文本:Slate-950,极致的黑 */
99
+ --xai-text-muted: #64748b; /* 次要文本 */
100
+ --xai-notable: #38bdf8; /* 显眼色:明亮的淡蓝/青色,清新通透 */
101
+ --xai-border: #cbd5e1; /* 边框 */
102
+ /* 额外说的一下 有一个地方 是--xai-notable作为背景 --xai-primary-light作为文本前景 */
103
+ --xai-shadow: #000000;
104
+ --xai-destructive: #ef4444;
102
105
  }
package/dist/index.d.ts CHANGED
@@ -19,6 +19,11 @@ declare class Dozy {
19
19
  }
20
20
  declare const dozy: Dozy;
21
21
 
22
+ type Any = Items$1<any>;
23
+ type Items$1<T> = {
24
+ [x: string]: T;
25
+ };
26
+
22
27
  declare function $isObject(value: unknown): value is Record<string, unknown>;
23
28
  declare function $deepClone<T>(value: T): T;
24
29
  declare function $capitalize(s: string): string;
@@ -66,6 +71,14 @@ declare function $formatWithCommas(num: number | string): string;
66
71
  declare function $isValidEmailWithUnicode(email?: string): boolean;
67
72
  declare function $checkValidEmailWithUnicode(email?: string): void;
68
73
  declare function $formatDate(dateInput: string | number | Date): string;
74
+ declare function errCode<T extends Any>(error: any, defVal?: T): {
75
+ msg: string;
76
+ };
77
+ declare function errContent(): void;
78
+ declare function errArg(): void;
79
+ declare function errNotLoggedIn(): void;
80
+ declare function err403(): void;
81
+ declare function isNowAroundUtcHour(targetHour: number): boolean;
69
82
 
70
83
  declare function web$setPathTarget(s: string): void;
71
84
  declare function web$pathStartData(): {
@@ -314,6 +327,6 @@ declare function toRgbString(input: string | Color | any): string | undefined;
314
327
  */
315
328
  declare function toHslString(input: string | Color | any): string | undefined;
316
329
 
317
- declare const DOZY = "1.0.58";
330
+ declare const DOZY = "1.0.60";
318
331
 
319
- export { $Headers, $Request, $Response, $URL, $URLSearchParams, $arrayFrom, $arrayIsArray, $assign, $capitalize, $checkValidEmailWithUnicode, $clamp, $clearInterval, $clearTimeout, $clone, $compressImage, $copy, $crypto, $date, $decodeBase64ToBinary, $decodeBase64ToUnicode, $deepClone, $defineProperty, $document, $encodeUnicodeToBase64, $entries, $escapeHTML, $fallbackCopy, $fetch, $fileToBase64, $formatDate, $formatWithCommas, $freeze, $genSSF, $getFileType, $getTimeString, $hasKey, $if, $inRange, $inRange2, $is, $isObject, $isPlainClass, $isValidEmailWithUnicode, $isValidOrBriefURL, $jsonParse, $jsonStringify, $keys, $lastIndex, $lindex, $loadOpt, $location, $log, $lplus, $magic, $math, $now, $numberIsFinite, $numberIsNaN, $oc, $open, $parseParams, $promise, $pureText, $randomByte, $replaceHolesWithUndefined, $rmvSlash, $rsValue, $rsetValue, $rvalue, $s, $sc, $setInterval, $setRange, $setTimeout, $stringFromCharCode, $stringFromCodePoint, $stringToRange, $strings, $validName, $values, $window, DOZY, type DozyConfig, type DozyConfigItem, type FileType, Gens, type Items, RainbowGen, type ScaleComputer, type ScaleIniter, StringObfuscator, __GensDirectives, _res, boxShadow, dozy, enableScaler, errMsg, errToString, getBrightness, getColorMap, isValidColor, maybeString, registerCustomColor, s, smallChance, smartParse, smartString, standardIniter, textShadow, toHexString, toHslString, toRgbString, toRgbaArray, web$enableHttpsRedirect, web$enableProdProtector, web$encodeURI, web$pathStartData, web$redirectToDomain, web$setPathTarget, xtrim };
332
+ export { $Headers, $Request, $Response, $URL, $URLSearchParams, $arrayFrom, $arrayIsArray, $assign, $capitalize, $checkValidEmailWithUnicode, $clamp, $clearInterval, $clearTimeout, $clone, $compressImage, $copy, $crypto, $date, $decodeBase64ToBinary, $decodeBase64ToUnicode, $deepClone, $defineProperty, $document, $encodeUnicodeToBase64, $entries, $escapeHTML, $fallbackCopy, $fetch, $fileToBase64, $formatDate, $formatWithCommas, $freeze, $genSSF, $getFileType, $getTimeString, $hasKey, $if, $inRange, $inRange2, $is, $isObject, $isPlainClass, $isValidEmailWithUnicode, $isValidOrBriefURL, $jsonParse, $jsonStringify, $keys, $lastIndex, $lindex, $loadOpt, $location, $log, $lplus, $magic, $math, $now, $numberIsFinite, $numberIsNaN, $oc, $open, $parseParams, $promise, $pureText, $randomByte, $replaceHolesWithUndefined, $rmvSlash, $rsValue, $rsetValue, $rvalue, $s, $sc, $setInterval, $setRange, $setTimeout, $stringFromCharCode, $stringFromCodePoint, $stringToRange, $strings, $validName, $values, $window, DOZY, type DozyConfig, type DozyConfigItem, type FileType, Gens, type Items, RainbowGen, type ScaleComputer, type ScaleIniter, StringObfuscator, __GensDirectives, _res, boxShadow, dozy, enableScaler, err403, errArg, errCode, errContent, errMsg, errNotLoggedIn, errToString, getBrightness, getColorMap, isNowAroundUtcHour, isValidColor, maybeString, registerCustomColor, s, smallChance, smartParse, smartString, standardIniter, textShadow, toHexString, toHslString, toRgbString, toRgbaArray, web$enableHttpsRedirect, web$enableProdProtector, web$encodeURI, web$pathStartData, web$redirectToDomain, web$setPathTarget, xtrim };