dozy 1.0.49 → 1.0.50
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/assets/fonts/forthecode.ttf +0 -0
- package/dist/assets/fonts/forthecode.woff2 +0 -0
- package/dist/assets/fonts/forthefont.ttf +0 -0
- package/dist/assets/fonts/forthefont.woff2 +0 -0
- package/dist/assets/fonts/xaifont.ttf +0 -0
- package/dist/assets/fonts/xaifont.woff2 +0 -0
- package/dist/assets/reset.css +3 -3
- package/dist/chunk-UIXT2MYS.js +2 -0
- package/dist/chunk-UIXT2MYS.js.map +1 -0
- package/dist/index.d.ts +227 -229
- package/dist/index.js +57 -45
- package/dist/index.js.map +1 -7
- package/dist/nanoid.d.ts +1 -0
- package/dist/nanoid.js +2 -0
- package/dist/nanoid.js.map +1 -0
- package/package.json +10 -13
- package/dist/Dozy.d.ts +0 -9
- package/dist/Dozy.d.ts.map +0 -1
- package/dist/Functions.d.ts +0 -48
- package/dist/Functions.d.ts.map +0 -1
- package/dist/Test.d.ts +0 -2
- package/dist/Test.d.ts.map +0 -1
- package/dist/WebFunctions.d.ts +0 -20
- package/dist/WebFunctions.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/modules/Color.d.ts +0 -75
- package/dist/modules/Color.d.ts.map +0 -1
- package/dist/modules/EnableScaler.d.ts +0 -39
- package/dist/modules/EnableScaler.d.ts.map +0 -1
- package/dist/modules/Interface.d.ts +0 -4
- package/dist/modules/Interface.d.ts.map +0 -1
- package/dist/modules/Store.d.ts +0 -83
- package/dist/modules/Store.d.ts.map +0 -1
- package/dist/modules/XCode.d.ts +0 -9
- package/dist/modules/XCode.d.ts.map +0 -1
- package/dist/modules/gens/Gens.d.ts +0 -18
- package/dist/modules/gens/Gens.d.ts.map +0 -1
- package/dist/modules/gens/GensDirectives.d.ts +0 -4
- package/dist/modules/gens/GensDirectives.d.ts.map +0 -1
- package/dist/modules/gens/GensStyleIds.d.ts +0 -3
- package/dist/modules/gens/GensStyleIds.d.ts.map +0 -1
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/assets/reset.css
CHANGED
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
font-display: swap;
|
|
19
19
|
}
|
|
20
20
|
@font-face {
|
|
21
|
-
font-family: '
|
|
22
|
-
src: url('./fonts/
|
|
21
|
+
font-family: 'xaifont';
|
|
22
|
+
src: url('./fonts/xaifont.woff2') format('woff2');
|
|
23
23
|
font-display: swap;
|
|
24
24
|
}
|
|
25
25
|
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
--for-the-code:
|
|
74
74
|
forthecode, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Microsoft YaHei',
|
|
75
75
|
'Microsoft YaHei UI', 'Liberation Mono', 'Courier New', monospace;
|
|
76
|
-
--
|
|
76
|
+
--xaifont: xaifont;
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
/* HTML 基础设置
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var x=Object.create;var i=Object.defineProperty;var A=Object.getOwnPropertyDescriptor;var R=Object.getOwnPropertyNames;var w=Object.getPrototypeOf,I=Object.prototype.hasOwnProperty;var h=t=>{throw TypeError(t)};var U=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,o)=>(typeof require<"u"?require:e)[o]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var b=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),E=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},L=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let l of R(e))!I.call(t,l)&&l!==o&&i(t,l,{get:()=>e[l],enumerable:!(r=A(e,l))||r.enumerable});return t};var V=(t,e,o)=>(o=t!=null?x(w(t)):{},L(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t));var m=(t,e,o)=>e.has(t)||h("Cannot "+o);var _=(t,e,o)=>(m(t,e,"read from private field"),o?o.call(t):e.get(t)),k=(t,e,o)=>e.has(t)?h("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,o),B=(t,e,o,r)=>(m(t,e,"write to private field"),r?r.call(t,o):e.set(t,o),o);var p="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";import{webcrypto as s}from"crypto";var M=128,n,u;function d(t){!n||n.length<t?(n=Buffer.allocUnsafe(t*M),s.getRandomValues(n),u=0):u+t>n.length&&(s.getRandomValues(n),u=0),u+=t}function O(t){return d(t|=0),n.subarray(u-t,u)}function P(t,e,o){let r=(2<<31-Math.clz32(t.length-1|1))-1,l=Math.ceil(1.6*r*e/t.length);return(a=e)=>{if(!a)return"";let f="";for(;;){let g=o(l),c=l;for(;c--;)if(f+=t[g[c]&r]||"",f.length>=a)return f}}}function v(t,e=21){return P(t,e,O)}function y(t=21){d(t|=0);let e="";for(let o=u-t;o<u;o++)e+=p[n[o]&63];return e}export{U as a,b,E as c,V as d,_ as e,k as f,B as g,p as h,v as i,y as j};
|
|
2
|
+
//# sourceMappingURL=chunk-UIXT2MYS.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../node_modules/nanoid/url-alphabet/index.js","../node_modules/nanoid/index.js"],"sourcesContent":["export const urlAlphabet =\n 'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict'\n","import { webcrypto as crypto } from 'node:crypto'\nimport { urlAlphabet as scopedUrlAlphabet } from './url-alphabet/index.js'\nexport { urlAlphabet } from './url-alphabet/index.js'\nconst POOL_SIZE_MULTIPLIER = 128\nlet pool, poolOffset\nfunction fillPool(bytes) {\n if (!pool || pool.length < bytes) {\n pool = Buffer.allocUnsafe(bytes * POOL_SIZE_MULTIPLIER)\n crypto.getRandomValues(pool)\n poolOffset = 0\n } else if (poolOffset + bytes > pool.length) {\n crypto.getRandomValues(pool)\n poolOffset = 0\n }\n poolOffset += bytes\n}\nexport function random(bytes) {\n fillPool((bytes |= 0))\n return pool.subarray(poolOffset - bytes, poolOffset)\n}\nexport function customRandom(alphabet, defaultSize, getRandom) {\n let mask = (2 << (31 - Math.clz32((alphabet.length - 1) | 1))) - 1\n let step = Math.ceil((1.6 * mask * defaultSize) / alphabet.length)\n return (size = defaultSize) => {\n if (!size) return ''\n let id = ''\n while (true) {\n let bytes = getRandom(step)\n let i = step\n while (i--) {\n id += alphabet[bytes[i] & mask] || ''\n if (id.length >= size) return id\n }\n }\n }\n}\nexport function customAlphabet(alphabet, size = 21) {\n return customRandom(alphabet, size, random)\n}\nexport function nanoid(size = 21) {\n fillPool((size |= 0))\n let id = ''\n for (let i = poolOffset - size; i < poolOffset; i++) {\n id += scopedUrlAlphabet[pool[i] & 63]\n }\n return id\n}\n"],"mappings":"moCAAO,IAAMA,EACX,mECDF,OAAS,aAAaC,MAAc,SAGpC,IAAMC,EAAuB,IACzBC,EAAMC,EACV,SAASC,EAASC,EAAO,CACnB,CAACH,GAAQA,EAAK,OAASG,GACzBH,EAAO,OAAO,YAAYG,EAAQJ,CAAoB,EACtDK,EAAO,gBAAgBJ,CAAI,EAC3BC,EAAa,GACJA,EAAaE,EAAQH,EAAK,SACnCI,EAAO,gBAAgBJ,CAAI,EAC3BC,EAAa,GAEfA,GAAcE,CAChB,CACO,SAASE,EAAOF,EAAO,CAC5B,OAAAD,EAAUC,GAAS,CAAE,EACdH,EAAK,SAASC,EAAaE,EAAOF,CAAU,CACrD,CACO,SAASK,EAAaC,EAAUC,EAAaC,EAAW,CAC7D,IAAIC,GAAQ,GAAM,GAAK,KAAK,MAAOH,EAAS,OAAS,EAAK,CAAC,GAAM,EAC7DI,EAAO,KAAK,KAAM,IAAMD,EAAOF,EAAeD,EAAS,MAAM,EACjE,MAAO,CAACK,EAAOJ,IAAgB,CAC7B,GAAI,CAACI,EAAM,MAAO,GAClB,IAAIC,EAAK,GACT,OAAa,CACX,IAAIV,EAAQM,EAAUE,CAAI,EACtBG,EAAIH,EACR,KAAOG,KAEL,GADAD,GAAMN,EAASJ,EAAMW,CAAC,EAAIJ,CAAI,GAAK,GAC/BG,EAAG,QAAUD,EAAM,OAAOC,CAElC,CACF,CACF,CACO,SAASE,EAAeR,EAAUK,EAAO,GAAI,CAClD,OAAON,EAAaC,EAAUK,EAAMP,CAAM,CAC5C,CACO,SAASW,EAAOJ,EAAO,GAAI,CAChCV,EAAUU,GAAQ,CAAE,EACpB,IAAIC,EAAK,GACT,QAASC,EAAIb,EAAaW,EAAME,EAAIb,EAAYa,IAC9CD,GAAMI,EAAkBjB,EAAKc,CAAC,EAAI,EAAE,EAEtC,OAAOD,CACT","names":["urlAlphabet","crypto","POOL_SIZE_MULTIPLIER","pool","poolOffset","fillPool","bytes","crypto","random","customRandom","alphabet","defaultSize","getRandom","mask","step","size","id","i","customAlphabet","nanoid","urlAlphabet"]}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,187 +1,195 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { Options } from 'browser-image-compression';
|
|
2
|
+
export * from 'browser-image-compression';
|
|
3
|
+
export { default as imageCompression } from 'browser-image-compression';
|
|
4
4
|
import { Color } from 'culori';
|
|
5
|
-
import * as
|
|
6
|
-
|
|
5
|
+
import * as culori from 'culori';
|
|
6
|
+
export { culori as ColorLib };
|
|
7
|
+
export * from 'axios';
|
|
8
|
+
export { default as axios } from 'axios';
|
|
9
|
+
import * as lodashEs from 'lodash-es';
|
|
10
|
+
export { lodashEs as l };
|
|
11
|
+
export { default as Cryptojs } from 'crypto-js';
|
|
12
|
+
export * from 'zod';
|
|
13
|
+
export { default as z } from 'zod';
|
|
7
14
|
|
|
8
|
-
|
|
9
|
-
|
|
15
|
+
type DozyConfigItem = {};
|
|
16
|
+
type DozyConfig = Partial<DozyConfigItem>;
|
|
10
17
|
declare class Dozy {
|
|
11
|
-
|
|
12
|
-
|
|
18
|
+
loadConfig(config: DozyConfig): void;
|
|
19
|
+
config: DozyConfig;
|
|
13
20
|
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
21
|
+
declare const dozy: Dozy;
|
|
22
|
+
|
|
23
|
+
declare function $isObject(value: unknown): value is Record<string, unknown>;
|
|
24
|
+
declare function $deepClone<T>(value: T): T;
|
|
25
|
+
declare function $capitalize(s: string): string;
|
|
26
|
+
declare function $clamp(n: number, min: number, max: number): number;
|
|
27
|
+
declare function $loadOpt(thiz: Object, obj?: Object): any;
|
|
28
|
+
declare function errMsg(msg: string): void;
|
|
29
|
+
declare function $pureText(fragment: string): string;
|
|
30
|
+
declare function $oc(o: any): o is Record<string, any>;
|
|
31
|
+
declare function $s(s: any, val?: boolean): s is string;
|
|
32
|
+
declare function $sc(n: any): n is number;
|
|
33
|
+
declare function $lplus(v: number, t: number, plus?: number): number;
|
|
34
|
+
declare function $lindex(arr: Array<any>, i: number): any;
|
|
35
|
+
declare function $validName(id?: string): id is string;
|
|
36
|
+
type FileType = 'text' | 'image' | 'audio' | 'video' | 'font' | 'unknown';
|
|
37
|
+
declare function $getFileType(fileName: string): FileType;
|
|
38
|
+
declare function $isValidOrBriefURL(url?: string): boolean;
|
|
39
|
+
declare function $getTimeString(stampTicks: number, short: boolean, unitS?: boolean, exact?: boolean): string;
|
|
40
|
+
declare function $magic(start: number, end?: number): number;
|
|
41
|
+
declare function $randomByte(len?: number): string;
|
|
42
|
+
declare function $rsValue(s?: string, path?: string, def?: any): any;
|
|
43
|
+
declare function $rsetValue(obj: Object, path: string, value: any): any;
|
|
44
|
+
declare function $rvalue(obj: Object, path?: string, def?: any, sdef?: boolean, set?: boolean): any;
|
|
45
|
+
declare function $hasKey(obj: Object, key: string): boolean;
|
|
46
|
+
declare function maybeString(a: any, maxLength?: number): string;
|
|
47
|
+
declare function errToString(e: unknown): string;
|
|
48
|
+
declare function smallChance(): boolean;
|
|
49
|
+
declare function $isPlainClass(obj: any, clas?: Function): boolean;
|
|
50
|
+
declare function $encodeUnicodeToBase64(str: string): string;
|
|
51
|
+
declare function $decodeBase64ToUnicode(base64: string): string;
|
|
52
|
+
declare function $fileToBase64(file: File): Promise<string>;
|
|
53
|
+
declare function $decodeBase64ToBinary(base64: string): Uint8Array<ArrayBuffer>;
|
|
54
|
+
declare function $setRange(v: number, min?: number, max?: number): number;
|
|
55
|
+
declare function $inRange2(v: number, mid: number, range: number): boolean;
|
|
56
|
+
declare function $inRange(v: number, min?: number, max?: number): boolean;
|
|
57
|
+
declare function $strings(str: string, cut?: string): string[];
|
|
58
|
+
declare function $genSSF(f: (s1: string, s2: string) => string, gap?: string): (...args: string[]) => string;
|
|
59
|
+
declare function xtrim(s: string): string;
|
|
60
|
+
declare function $if<T extends string | number | symbol, V>(val: T, fs: Record<T, Function | V>): any;
|
|
61
|
+
declare function $lastIndex(items: Array<any> | number): number;
|
|
62
|
+
declare function $replaceHolesWithUndefined<T>(arr: Array<T | undefined>): Array<T | undefined>;
|
|
63
|
+
declare function $stringToRange(str: string, max: number): number;
|
|
64
|
+
declare function $rmvSlash(path: string): string;
|
|
65
|
+
declare function $parseParams(path: string): (string | undefined)[];
|
|
66
|
+
declare function $formatWithCommas(num: number | string): string;
|
|
67
|
+
declare function $isValidEmailWithUnicode(email?: string): boolean;
|
|
68
|
+
declare function $checkValidEmailWithUnicode(email?: string): void;
|
|
69
|
+
declare function $formatDate(dateInput: string | number | Date): string;
|
|
70
|
+
|
|
71
|
+
declare function web$setPathTarget(s: string): void;
|
|
72
|
+
declare function web$pathStartData(): {
|
|
73
|
+
href: string;
|
|
74
|
+
origin: string;
|
|
75
|
+
target: string;
|
|
76
|
+
host: string;
|
|
77
|
+
path: string;
|
|
78
|
+
search: string;
|
|
79
|
+
standardJump: boolean;
|
|
71
80
|
};
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
81
|
+
declare function web$enableProdProtector(): void;
|
|
82
|
+
declare function web$enableHttpsRedirect(): void;
|
|
83
|
+
declare function web$redirectToDomain(newDomain: string): void;
|
|
84
|
+
declare function $copy(content: string): Promise<boolean | undefined>;
|
|
85
|
+
declare function $fallbackCopy(content: string): boolean;
|
|
86
|
+
declare function web$encodeURI(hash?: string): string;
|
|
87
|
+
declare function $compressImage(file: File, options?: Options): Promise<File>;
|
|
88
|
+
declare function $compressImage(files: File[], options?: Options): Promise<File[]>;
|
|
89
|
+
|
|
90
|
+
declare const $jsonParse: (text: string, reviver?: (this: any, key: string, value: any) => any) => any;
|
|
91
|
+
declare const $jsonStringify: {
|
|
92
|
+
(value: any, replacer?: (this: any, key: string, value: any) => any, space?: string | number): string;
|
|
93
|
+
(value: any, replacer?: (number | string)[] | null, space?: string | number): string;
|
|
84
94
|
};
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
[s: string]: T;
|
|
93
|
-
} | ArrayLike<T>): T[];
|
|
94
|
-
(o: {}): any[];
|
|
95
|
+
declare const $keys: <T extends object>(obj: T) => (keyof T & string)[];
|
|
96
|
+
declare const $entries: <T extends object>(obj: T) => [keyof T & string, T[keyof T]][];
|
|
97
|
+
declare const $values: {
|
|
98
|
+
<T>(o: {
|
|
99
|
+
[s: string]: T;
|
|
100
|
+
} | ArrayLike<T>): T[];
|
|
101
|
+
(o: {}): any[];
|
|
95
102
|
};
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
103
|
+
declare const $assign: {
|
|
104
|
+
<T extends {}, U>(target: T, source: U): T & U;
|
|
105
|
+
<T extends {}, U, V>(target: T, source1: U, source2: V): T & U & V;
|
|
106
|
+
<T extends {}, U, V, W>(target: T, source1: U, source2: V, source3: W): T & U & V & W;
|
|
107
|
+
(target: object, ...sources: any[]): any;
|
|
101
108
|
};
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
+
declare const $defineProperty: <T>(o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType<any>) => T;
|
|
110
|
+
declare const $freeze: {
|
|
111
|
+
<T extends Function>(f: T): T;
|
|
112
|
+
<T extends {
|
|
113
|
+
[idx: string]: U | null | undefined | object;
|
|
114
|
+
}, U extends string | bigint | number | boolean | symbol>(o: T): Readonly<T>;
|
|
115
|
+
<T>(o: T): Readonly<T>;
|
|
109
116
|
};
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
117
|
+
declare const $is: (value1: any, value2: any) => boolean;
|
|
118
|
+
declare const $arrayFrom: {
|
|
119
|
+
<T>(arrayLike: ArrayLike<T>): T[];
|
|
120
|
+
<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
121
|
+
<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
|
|
122
|
+
<T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
116
123
|
};
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
124
|
+
declare const $arrayIsArray: (arg: any) => arg is any[];
|
|
125
|
+
declare const $stringFromCharCode: (...codes: number[]) => string;
|
|
126
|
+
declare const $stringFromCodePoint: (...codePoints: number[]) => string;
|
|
127
|
+
declare const $numberIsNaN: (number: unknown) => boolean;
|
|
128
|
+
declare const $numberIsFinite: (number: unknown) => boolean;
|
|
129
|
+
declare const $math: Math;
|
|
130
|
+
declare const $now: () => number;
|
|
131
|
+
declare const $date: DateConstructor;
|
|
132
|
+
declare const $promise: PromiseConstructor;
|
|
133
|
+
declare const $URL: {
|
|
134
|
+
new (url: string | URL, base?: string | URL): URL;
|
|
135
|
+
prototype: URL;
|
|
136
|
+
canParse(url: string | URL, base?: string | URL): boolean;
|
|
137
|
+
createObjectURL(obj: Blob | MediaSource): string;
|
|
138
|
+
parse(url: string | URL, base?: string | URL): URL | null;
|
|
139
|
+
revokeObjectURL(url: string): void;
|
|
133
140
|
};
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
141
|
+
declare const $URLSearchParams: {
|
|
142
|
+
new (init?: string[][] | Record<string, string> | string | URLSearchParams): URLSearchParams;
|
|
143
|
+
prototype: URLSearchParams;
|
|
137
144
|
};
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
145
|
+
declare const $clone: typeof structuredClone;
|
|
146
|
+
declare const $window: (Window & typeof globalThis) | undefined;
|
|
147
|
+
declare const $document: Document | undefined;
|
|
148
|
+
declare const $location: Location | undefined;
|
|
149
|
+
declare const $open: (((url?: string | URL, target?: string, features?: string) => WindowProxy | null) & typeof open) | undefined;
|
|
150
|
+
declare const $setTimeout: (((handler: TimerHandler, timeout?: number, ...arguments: any[]) => number) & typeof setTimeout) | undefined;
|
|
151
|
+
declare const $clearTimeout: (((id: number | undefined) => void) & typeof clearTimeout) | undefined;
|
|
152
|
+
declare const $setInterval: (((handler: TimerHandler, timeout?: number, ...arguments: any[]) => number) & typeof setInterval) | undefined;
|
|
153
|
+
declare const $clearInterval: (((id: number | undefined) => void) & typeof clearInterval) | undefined;
|
|
154
|
+
declare const $fetch: typeof fetch | undefined;
|
|
155
|
+
declare const $Headers: {
|
|
156
|
+
new (init?: HeadersInit): Headers;
|
|
157
|
+
prototype: Headers;
|
|
151
158
|
} | undefined;
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
159
|
+
declare const $Request: {
|
|
160
|
+
new (input: RequestInfo | URL, init?: RequestInit): Request;
|
|
161
|
+
prototype: Request;
|
|
155
162
|
} | undefined;
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
163
|
+
declare const $Response: {
|
|
164
|
+
new (body?: BodyInit | null, init?: ResponseInit): Response;
|
|
165
|
+
prototype: Response;
|
|
166
|
+
error(): Response;
|
|
167
|
+
json(data: any, init?: ResponseInit): Response;
|
|
168
|
+
redirect(url: string | URL, status?: number): Response;
|
|
162
169
|
} | undefined;
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
170
|
+
declare const $log: <T>(a?: T, ...x: any[]) => T | undefined;
|
|
171
|
+
declare const $crypto: Crypto | undefined;
|
|
172
|
+
|
|
173
|
+
type ScaleComputer = undefined | ((scaler: Scaler) => number);
|
|
174
|
+
type ScaleIniter = (scaler: Scaler) => void;
|
|
167
175
|
declare class Scaler {
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
176
|
+
#private;
|
|
177
|
+
heightElement: HTMLElement;
|
|
178
|
+
widthElement: HTMLElement;
|
|
179
|
+
set base(val: number);
|
|
180
|
+
get base(): number;
|
|
181
|
+
set mainScale(val: number);
|
|
182
|
+
get mainScale(): number;
|
|
183
|
+
get scaleComputer(): ScaleComputer;
|
|
184
|
+
set scaleComputer(val: ScaleComputer);
|
|
185
|
+
onMainScaleChange?: (scale: number) => void;
|
|
186
|
+
innerContainer: HTMLElement;
|
|
187
|
+
constructor(innerContainer: HTMLElement);
|
|
180
188
|
}
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
189
|
+
declare function enableScaler(outerContainer: HTMLElement, initer?: ScaleIniter, innerContainer?: HTMLElement): {
|
|
190
|
+
resizer: () => void;
|
|
191
|
+
clean: () => void;
|
|
192
|
+
setBase: (val: number) => void;
|
|
185
193
|
} | undefined;
|
|
186
194
|
/**
|
|
187
195
|
* Hello
|
|
@@ -190,51 +198,57 @@ export declare function enableScaler(outerContainer: HTMLElement, initer?: Scale
|
|
|
190
198
|
* @param maxAspectRatio 请输入 Number(0.57) && 0.64
|
|
191
199
|
* @returns
|
|
192
200
|
*/
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
+
declare const standardIniter: (args: {
|
|
202
|
+
maxAspectRatio?: number;
|
|
203
|
+
setFullScreenWidth?: (x: number) => void;
|
|
204
|
+
setFullContentHeight?: (x: number) => void;
|
|
205
|
+
setMainScale?: (x: number) => void;
|
|
206
|
+
heightElement?: HTMLElement;
|
|
207
|
+
widthElement?: HTMLElement;
|
|
208
|
+
base?: number;
|
|
201
209
|
}) => ScaleIniter;
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
210
|
+
|
|
211
|
+
declare class StringObfuscator {
|
|
212
|
+
key: string;
|
|
213
|
+
length: number;
|
|
214
|
+
constructor(key: string, length?: number);
|
|
215
|
+
xors(str: string, key: string): string;
|
|
216
|
+
en(input: string): string;
|
|
217
|
+
de(obfuscated: string): string;
|
|
209
218
|
}
|
|
210
|
-
|
|
211
|
-
|
|
219
|
+
|
|
220
|
+
type Items<T> = {
|
|
221
|
+
[key: string]: T;
|
|
212
222
|
};
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
223
|
+
|
|
224
|
+
declare function $escapeHTML(str: string): string;
|
|
225
|
+
declare class RainbowGen {
|
|
226
|
+
i: number;
|
|
227
|
+
ten: number;
|
|
228
|
+
static staticRainbowHTMLRaw(text: string, dark?: boolean, offset?: number): string;
|
|
229
|
+
static rainbowHTMLRaw(text: string, version?: number, offset?: number): string;
|
|
230
|
+
backAStep(): this;
|
|
231
|
+
getColorValue(): string;
|
|
232
|
+
versions: number[];
|
|
233
|
+
getStyleId(version: number): string;
|
|
234
|
+
constructor(useTimes?: number);
|
|
224
235
|
}
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
236
|
+
declare function boxShadow(color?: string): string;
|
|
237
|
+
declare function textShadow(color?: string, focus?: boolean, removeName?: boolean): string;
|
|
238
|
+
declare function s(literature: string, ...args: any[]): string;
|
|
239
|
+
declare function getColorMap(dark?: boolean): string[];
|
|
240
|
+
declare function Gens(literature: string, ...args: any[]): string;
|
|
241
|
+
|
|
242
|
+
declare let _res: (x: string) => string;
|
|
243
|
+
|
|
244
|
+
declare function __GensDirectives(): Items<(...args: string[]) => string>;
|
|
245
|
+
|
|
232
246
|
/**
|
|
233
247
|
* Register a custom color alias.
|
|
234
248
|
* @param name The name of the alias (e.g., 'abc', 'myColor')
|
|
235
249
|
* @param color The valid color string it maps to (e.g., '#ff0000', 'red')
|
|
236
250
|
*/
|
|
237
|
-
|
|
251
|
+
declare function registerCustomColor(name: string, color: string): void;
|
|
238
252
|
/**
|
|
239
253
|
* Smartly parses a color string.
|
|
240
254
|
* Supports:
|
|
@@ -247,18 +261,18 @@ export declare function registerCustomColor(name: string, color: string): void;
|
|
|
247
261
|
* @param fallback Optional fallback color string if parsing fails.
|
|
248
262
|
* @returns The parsed Color object or undefined if invalid.
|
|
249
263
|
*/
|
|
250
|
-
|
|
264
|
+
declare function smartParse(input: string | Color | any, fallback?: string): Color | undefined;
|
|
251
265
|
/**
|
|
252
266
|
* Smartly parses a color and returns a CSS string.
|
|
253
267
|
* Defaults to Hex for sRGB colors, or CSS function for others (like oklch).
|
|
254
268
|
* @param input The color string or object.
|
|
255
269
|
*/
|
|
256
|
-
|
|
270
|
+
declare function smartString(input: string | Color | any, fallback?: string): string | undefined;
|
|
257
271
|
/**
|
|
258
272
|
* Check if a color string is valid (smartly).
|
|
259
273
|
* @param input The color string or object.
|
|
260
274
|
*/
|
|
261
|
-
|
|
275
|
+
declare function isValidColor(input: string | Color | any): boolean;
|
|
262
276
|
/**
|
|
263
277
|
* Calculates the brightness of a color.
|
|
264
278
|
* Uses the Rec. 601 luma formula: (R * 299 + G * 587 + B * 114) / 1000.
|
|
@@ -267,7 +281,7 @@ export declare function isValidColor(input: string | Color | any): boolean;
|
|
|
267
281
|
* @param input The color string or object to check.
|
|
268
282
|
* @returns The brightness value (0-1), or 0 if invalid.
|
|
269
283
|
*/
|
|
270
|
-
|
|
284
|
+
declare function getBrightness(input: string | Color | any): number;
|
|
271
285
|
/**
|
|
272
286
|
* Converts a color to an RGBA array [r, g, b, a].
|
|
273
287
|
* RGB values are 0-255, Alpha is 0-1.
|
|
@@ -275,18 +289,13 @@ export declare function getBrightness(input: string | Color | any): number;
|
|
|
275
289
|
* @param input The color string or object to convert.
|
|
276
290
|
* @returns [r, g, b, a] or undefined if invalid.
|
|
277
291
|
*/
|
|
278
|
-
|
|
279
|
-
number,
|
|
280
|
-
number,
|
|
281
|
-
number,
|
|
282
|
-
number
|
|
283
|
-
] | undefined;
|
|
292
|
+
declare function toRgbaArray(input: string | Color | any): [number, number, number, number] | undefined;
|
|
284
293
|
/**
|
|
285
294
|
* Converts a color to a Hex string.
|
|
286
295
|
* @param input The color string or object.
|
|
287
296
|
* @returns Hex string (e.g. #ff0000) or undefined.
|
|
288
297
|
*/
|
|
289
|
-
|
|
298
|
+
declare function toHexString(input: string | Color | any): string | undefined;
|
|
290
299
|
/**
|
|
291
300
|
* Converts a color to an RGB/RGBA string.
|
|
292
301
|
* Uses modern comma-separated syntax for compatibility if preferred, or standard CSS.
|
|
@@ -296,7 +305,7 @@ export declare function toHexString(input: string | Color | any): string | undef
|
|
|
296
305
|
* @param input The color string or object.
|
|
297
306
|
* @returns RGB/RGBA string or undefined.
|
|
298
307
|
*/
|
|
299
|
-
|
|
308
|
+
declare function toRgbString(input: string | Color | any): string | undefined;
|
|
300
309
|
/**
|
|
301
310
|
* Converts a color to an HSL/HSLA string.
|
|
302
311
|
* Forces legacy comma-separated syntax: hsl(h, s%, l%) or hsla(h, s%, l%, a).
|
|
@@ -304,19 +313,8 @@ export declare function toRgbString(input: string | Color | any): string | undef
|
|
|
304
313
|
* @param input The color string or object.
|
|
305
314
|
* @returns HSL/HSLA string or undefined.
|
|
306
315
|
*/
|
|
307
|
-
|
|
308
|
-
export declare const DOZY = "1.0.49";
|
|
309
|
-
export * from "browser-image-compression";
|
|
310
|
-
export * from "axios";
|
|
311
|
-
export * from "zod";
|
|
316
|
+
declare function toHslString(input: string | Color | any): string | undefined;
|
|
312
317
|
|
|
313
|
-
|
|
314
|
-
ColorLib,
|
|
315
|
-
Options,
|
|
316
|
-
axios,
|
|
317
|
-
imageCompression$1 as imageCompression,
|
|
318
|
-
l,
|
|
319
|
-
z,
|
|
320
|
-
};
|
|
318
|
+
declare const DOZY = "1.0.50";
|
|
321
319
|
|
|
322
|
-
export {};
|
|
320
|
+
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 };
|