nhanh-pure-function 4.2.2 → 4.2.4
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/Canvas/Axis/OverlayGroup/billboard.d.ts +1 -1
- package/dist/File/index.d.ts +9 -0
- package/dist/Utility/index.d.ts +83 -0
- package/dist/index.cjs.js +3 -3
- package/dist/index.es.js +607 -412
- package/package.json +1 -1
|
@@ -32,7 +32,7 @@ declare abstract class BillboardBase extends Overlay<BillboardStyleType, [
|
|
|
32
32
|
sw?: number;
|
|
33
33
|
sh?: number;
|
|
34
34
|
};
|
|
35
|
-
|
|
35
|
+
constructor(option: ConstructorOption);
|
|
36
36
|
protected updateBaseData(): void;
|
|
37
37
|
}
|
|
38
38
|
export default class Billboard extends BillboardBase {
|
package/dist/File/index.d.ts
CHANGED
|
@@ -4,6 +4,15 @@
|
|
|
4
4
|
* @returns 文件的字符串内容
|
|
5
5
|
*/
|
|
6
6
|
export declare function _File_Read(src: string): Promise<string>;
|
|
7
|
+
/**
|
|
8
|
+
* 选择文件
|
|
9
|
+
* @param options 选择文件的配置
|
|
10
|
+
* @returns 选择的文件列表
|
|
11
|
+
*/
|
|
12
|
+
export declare function _File_Select(options?: {
|
|
13
|
+
accept?: string;
|
|
14
|
+
multiple?: boolean;
|
|
15
|
+
}): Promise<File[]>;
|
|
7
16
|
/**
|
|
8
17
|
* 下载文件并支持进度监控、超时控制和主动中止
|
|
9
18
|
*
|
package/dist/Utility/index.d.ts
CHANGED
|
@@ -99,3 +99,86 @@ export declare function _Utility_TimeConsumption<T extends Function>(func: T, co
|
|
|
99
99
|
* @returns 实际暂停的毫秒数
|
|
100
100
|
*/
|
|
101
101
|
export declare function _Utility_Sleep(ms: number): number;
|
|
102
|
+
/**
|
|
103
|
+
* 颜色转换工具。
|
|
104
|
+
* 支持输入:hex/rgb/hsl/hsv,统一解析后输出指定格式。
|
|
105
|
+
*/
|
|
106
|
+
export declare class _Utility_ColorConverter {
|
|
107
|
+
private constructor();
|
|
108
|
+
private static readonly DEFAULT_ALPHA;
|
|
109
|
+
/**
|
|
110
|
+
* 数值钳制,确保在合法区间内。
|
|
111
|
+
*/
|
|
112
|
+
private static clamp;
|
|
113
|
+
private static normalizeHue;
|
|
114
|
+
/**
|
|
115
|
+
* 根据色相分段与色度参数生成 RGB(0-255)。
|
|
116
|
+
*/
|
|
117
|
+
private static chromaToRgb;
|
|
118
|
+
private static resolveAlpha;
|
|
119
|
+
private static toRoundedRgbString;
|
|
120
|
+
/**
|
|
121
|
+
* HSL 转 RGB。
|
|
122
|
+
* h: 0-360, s/l: 0-100
|
|
123
|
+
*/
|
|
124
|
+
private static hslToRgb;
|
|
125
|
+
/**
|
|
126
|
+
* HSV 转 RGB。
|
|
127
|
+
* h: 0-360, s/v: 0-100
|
|
128
|
+
*/
|
|
129
|
+
private static hsvToRgb;
|
|
130
|
+
/**
|
|
131
|
+
* 解析任意受支持的颜色格式并标准化为 RGBA。
|
|
132
|
+
*/
|
|
133
|
+
private static parseColor;
|
|
134
|
+
/**
|
|
135
|
+
* 十进制颜色分量转两位十六进制字符串。
|
|
136
|
+
*/
|
|
137
|
+
private static toHexPart;
|
|
138
|
+
/**
|
|
139
|
+
* RGB 转 HSL。
|
|
140
|
+
* 返回 h:0-360, s/l:0-100
|
|
141
|
+
*/
|
|
142
|
+
private static rgbToHsl;
|
|
143
|
+
/**
|
|
144
|
+
* RGB 转 HSV。
|
|
145
|
+
* 返回 h:0-360, s/v:0-100
|
|
146
|
+
*/
|
|
147
|
+
private static rgbToHsv;
|
|
148
|
+
/**
|
|
149
|
+
* 转换为 HEX(#RRGGBB)。
|
|
150
|
+
*/
|
|
151
|
+
static toHex(color: string): string;
|
|
152
|
+
/**
|
|
153
|
+
* 转换为 HEXA(#RRGGBBAA)。
|
|
154
|
+
* alpha 不传时保留输入颜色中的透明度(默认 1)。
|
|
155
|
+
*/
|
|
156
|
+
static toHexa(color: string, alpha?: number): string;
|
|
157
|
+
/**
|
|
158
|
+
* 转换为 RGB(rgb(r, g, b))。
|
|
159
|
+
*/
|
|
160
|
+
static toRgb(color: string): string;
|
|
161
|
+
/**
|
|
162
|
+
* 转换为 RGBA(rgba(r, g, b, a))。
|
|
163
|
+
* alpha 不传时保留输入颜色中的透明度(默认 1)。
|
|
164
|
+
*/
|
|
165
|
+
static toRgba(color: string, alpha?: number): string;
|
|
166
|
+
/**
|
|
167
|
+
* 转换为 HSL(hsl(h, s%, l%))。
|
|
168
|
+
*/
|
|
169
|
+
static toHsl(color: string): string;
|
|
170
|
+
/**
|
|
171
|
+
* 转换为 HSLA(hsla(h, s%, l%, a))。
|
|
172
|
+
* alpha 不传时保留输入颜色中的透明度(默认 1)。
|
|
173
|
+
*/
|
|
174
|
+
static toHsla(color: string, alpha?: number): string;
|
|
175
|
+
/**
|
|
176
|
+
* 转换为 HSV(hsv(h, s%, v%))。
|
|
177
|
+
*/
|
|
178
|
+
static toHsv(color: string): string;
|
|
179
|
+
/**
|
|
180
|
+
* 转换为 HSVA(hsva(h, s%, v%, a))。
|
|
181
|
+
* alpha 不传时保留输入颜色中的透明度(默认 1)。
|
|
182
|
+
*/
|
|
183
|
+
static toHsva(color: string, alpha?: number): string;
|
|
184
|
+
}
|