nhanh-pure-function 3.0.6-beta.11 → 3.0.6-beta.13
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/Browser/index.d.ts +31 -40
- package/dist/Valid/index.d.ts +2 -2
- package/dist/index.cjs.js +3 -3
- package/dist/index.es.js +2677 -2642
- package/package.json +1 -1
package/dist/Browser/index.d.ts
CHANGED
|
@@ -10,46 +10,6 @@ export declare function _Browser_GetFrameRate(callback: (fps: number, frameTime:
|
|
|
10
10
|
* @param {string} text
|
|
11
11
|
*/
|
|
12
12
|
export declare function _Browser_CopyToClipboard(text: string): Promise<void>;
|
|
13
|
-
/**
|
|
14
|
-
* 管理通过键值对打开的窗口
|
|
15
|
-
*/
|
|
16
|
-
export declare class _Browser_KeyedWindowManager {
|
|
17
|
-
private static keys;
|
|
18
|
-
/** 请使用静态方法 */
|
|
19
|
-
private constructor();
|
|
20
|
-
/** 添加已有窗口 */
|
|
21
|
-
static add(key: string, win: Window): void;
|
|
22
|
-
/**
|
|
23
|
-
* 根据键打开或聚焦窗口
|
|
24
|
-
* @param key 窗口的唯一键
|
|
25
|
-
* @param url 要打开的URL
|
|
26
|
-
* @param target 窗口的目标
|
|
27
|
-
* @param windowFeatures 新窗口的特性
|
|
28
|
-
* @returns 返回已打开或新打开的窗口
|
|
29
|
-
*/
|
|
30
|
-
static open(key: string, url?: string | URL, target?: WindowTarget, windowFeatures?: string): Window | undefined;
|
|
31
|
-
/**
|
|
32
|
-
* 检查指定键的窗口是否打开
|
|
33
|
-
* @param key 窗口的唯一键
|
|
34
|
-
* @returns 如果窗口打开则返回true,否则返回false
|
|
35
|
-
*/
|
|
36
|
-
static isOpen(key: string): boolean;
|
|
37
|
-
/**
|
|
38
|
-
* 获取与指定键关联的窗口
|
|
39
|
-
* @param key 窗口的唯一键
|
|
40
|
-
* @returns 返回对应的窗口,如果窗口已关闭则返回undefined
|
|
41
|
-
*/
|
|
42
|
-
static getWindow(key: string): Window | undefined;
|
|
43
|
-
/**
|
|
44
|
-
* 关闭与指定键关联的窗口
|
|
45
|
-
* @param key 窗口的唯一键
|
|
46
|
-
*/
|
|
47
|
-
static close(key: string): void;
|
|
48
|
-
/**
|
|
49
|
-
* 关闭所有打开的窗口并清空Map
|
|
50
|
-
*/
|
|
51
|
-
static closeAll(): void;
|
|
52
|
-
}
|
|
53
13
|
/**
|
|
54
14
|
* 计算纸张内容可用宽高及边距(考虑设备DPI)
|
|
55
15
|
* 确保:contentWidth + 2*paddingPx = 纸张宽度像素
|
|
@@ -75,3 +35,34 @@ export declare function _Browser_CalculatePrintableArea(type: PaperType, padding
|
|
|
75
35
|
/** 纸张高度(像素) */
|
|
76
36
|
paperHeightPx: number;
|
|
77
37
|
};
|
|
38
|
+
/** 同源标签页管理器类 */
|
|
39
|
+
export declare class _Browser_SameOriginTabManager {
|
|
40
|
+
/** 初始化完成标志 */
|
|
41
|
+
private static initFinish;
|
|
42
|
+
/** 频道 */
|
|
43
|
+
private static channel;
|
|
44
|
+
/** 等待回执消息时间上限(上限) */
|
|
45
|
+
static timeout: number;
|
|
46
|
+
/**
|
|
47
|
+
* 待处理查询
|
|
48
|
+
* @param key 回执消息key
|
|
49
|
+
* @param callback 匹配标签页的回调函数
|
|
50
|
+
*/
|
|
51
|
+
private static pendingQueries;
|
|
52
|
+
private constructor();
|
|
53
|
+
/** 初始化标签页管理器 */
|
|
54
|
+
static init(name: string): void;
|
|
55
|
+
/** 设置事件监听器 */
|
|
56
|
+
private static setupEventListeners;
|
|
57
|
+
/** 处理BroadcastChannel消息 */
|
|
58
|
+
private static handleChannelMessage;
|
|
59
|
+
/**
|
|
60
|
+
* 获取已经打开的指定名称的标签页
|
|
61
|
+
* @param name 标签页名称
|
|
62
|
+
*/
|
|
63
|
+
static getWindow(name: string): Promise<number>;
|
|
64
|
+
/** 打开标签页 */
|
|
65
|
+
static openWindow(name: string, url: string, target?: WindowTarget, windowFeatures?: string): Promise<Window | null>;
|
|
66
|
+
/** 获取所有已经打开的标签页 */
|
|
67
|
+
static getAllWindows(): Promise<string[]>;
|
|
68
|
+
}
|
package/dist/Valid/index.d.ts
CHANGED
|
@@ -91,7 +91,7 @@ export declare class _Valid_FileTypeChecker {
|
|
|
91
91
|
static parseAddresses(url: string): {
|
|
92
92
|
url: string;
|
|
93
93
|
name: string;
|
|
94
|
-
type: "
|
|
94
|
+
type: "image" | "ppt" | "word" | "excel" | "pdf" | "text" | "audio" | "video" | "archive" | "code" | "font" | "database" | "markup" | "configuration" | "logs" | "script" | "unknown";
|
|
95
95
|
}[];
|
|
96
96
|
/**
|
|
97
97
|
* 检查 MIME 类型是否与指定的模式匹配
|
|
@@ -121,5 +121,5 @@ export declare class _Valid_FileTypeChecker {
|
|
|
121
121
|
* @param {string} url - 文件的URL
|
|
122
122
|
* @returns {string} - 如果URL与任何已知类型匹配,则返回文件类型,否则返回"unknown"
|
|
123
123
|
*/
|
|
124
|
-
static _detectFileType(url: string): "
|
|
124
|
+
static _detectFileType(url: string): "image" | "ppt" | "word" | "excel" | "pdf" | "text" | "audio" | "video" | "archive" | "code" | "font" | "database" | "markup" | "configuration" | "logs" | "script" | "unknown";
|
|
125
125
|
}
|