nhanh-pure-function 3.0.6-beta.12 → 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.
@@ -10,66 +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 Get_KeyedWindowManager: symbol;
22
- /**
23
- * 初始化
24
- * @param name 窗口名称
25
- */
26
- static init(name: string): void;
27
- /**
28
- * 更新窗口管理器
29
- * @param self 最新实例
30
- */
31
- static update(self: typeof _Browser_KeyedWindowManager): void;
32
- /**
33
- * 通知所有窗口 同步所以可访问的窗口
34
- */
35
- static notify(): void;
36
- /**
37
- * 检查窗口的 opener 是否与当前页面同源
38
- * @param win 窗口对象
39
- * @returns 如果 opener 与当前页面同源则返回true,否则返回false
40
- */
41
- static isSameOrigin(url?: string | URL): boolean | "" | undefined;
42
- /**
43
- * 根据键打开或聚焦窗口
44
- * @param key 窗口的唯一键
45
- * @param url 要打开的URL
46
- * @param target 窗口的目标
47
- * @param windowFeatures 新窗口的特性
48
- * @returns 返回已打开或新打开的窗口
49
- */
50
- static open(key: string, url?: string | URL, target?: WindowTarget, windowFeatures?: string): void | Window;
51
- /**
52
- * 检查指定键的窗口是否打开
53
- * @param key 窗口的唯一键
54
- * @returns 如果窗口打开则返回true,否则返回false
55
- */
56
- static isOpen(key: string): boolean;
57
- /**
58
- * 获取与指定键关联的窗口
59
- * @param key 窗口的唯一键
60
- * @returns 返回对应的窗口,如果窗口已关闭则返回undefined
61
- */
62
- static getWindow(key: string): Window | undefined;
63
- /**
64
- * 关闭与指定键关联的窗口
65
- * @param key 窗口的唯一键
66
- */
67
- static close(key: string): void;
68
- /**
69
- * 关闭所有打开的窗口并清空Map
70
- */
71
- static closeAll(): void;
72
- }
73
13
  /**
74
14
  * 计算纸张内容可用宽高及边距(考虑设备DPI)
75
15
  * 确保:contentWidth + 2*paddingPx = 纸张宽度像素
@@ -95,3 +35,34 @@ export declare function _Browser_CalculatePrintableArea(type: PaperType, padding
95
35
  /** 纸张高度(像素) */
96
36
  paperHeightPx: number;
97
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
+ }