clickgo 4.0.0 → 4.0.1

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/app/demo.cga CHANGED
Binary file
package/dist/app/task.cga CHANGED
Binary file
@@ -0,0 +1,128 @@
1
+ /**
2
+ * Copyright 2025 MAIYUN.NET
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * https://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import * as lTool from './lib/tool';
17
+ import * as lControl from './lib/control';
18
+ import * as lCore from './lib/core';
19
+ import * as lDom from './lib/dom';
20
+ import * as lForm from './lib/form';
21
+ import * as lFs from './lib/fs';
22
+ import * as lNative from './lib/native';
23
+ import * as lStorage from './lib/storage';
24
+ import * as lTask from './lib/task';
25
+ import * as lTheme from './lib/theme';
26
+ import * as lZip from './lib/zip';
27
+ import * as clickgo from './clickgo';
28
+ /** --- 原生模块 --- */
29
+ export declare const modules: {
30
+ 'clickgo': typeof clickgo;
31
+ /** --- 原生 vue --- */
32
+ 'vue': typeof import('vue');
33
+ /** --- 原生 jszip --- */
34
+ 'jszip': typeof import('jszip');
35
+ /** --- 原生 tums-player 对象(在 default 里) --- */
36
+ 'tums-player': lCore.ITumsPlayer;
37
+ /** --- 其他任何模块 --- */
38
+ [key: string]: any;
39
+ };
40
+ /** --- 获取当前版本 --- */
41
+ export declare function getVersion(): string;
42
+ /** --- 是否是 native 环境 --- */
43
+ export declare function isNative(): boolean;
44
+ /** --- 获取当前 ClickGo 所在的目录,不以 / 结尾 --- */
45
+ export declare function getDirname(): string;
46
+ /** --- 用户定义的全局对象 --- */
47
+ export declare const global: any;
48
+ /** --- 获取当前 cdn 前缀 --- */
49
+ export declare function getCdn(): string;
50
+ /** --- 获取当前平台(web 则只返回 web) --- */
51
+ export declare function getPlatform(): NodeJS.Platform | 'web';
52
+ declare let device: {
53
+ 'type': 'unknown' | 'mobile' | 'desktop';
54
+ 'os': 'unknown' | 'android' | 'ios' | 'windows' | 'macos' | 'linux';
55
+ };
56
+ /** --- 获取当前设备信息(支持 native 和 web) --- */
57
+ export declare function getDevice(): typeof device;
58
+ /**
59
+ * --- 是否含有窗体外边框 ---
60
+ */
61
+ export declare function hasFrame(): boolean;
62
+ /** --- 全局类 --- */
63
+ export declare abstract class AbstractBoot {
64
+ /** --- 当前是否是 debug 模式 --- */
65
+ private readonly _debug;
66
+ /** --- 切勿传给 App --- */
67
+ protected _sysId: string;
68
+ setSysId(sysId: string): void;
69
+ /** --- 判断当前是否是 debug 模式 --- */
70
+ isDebug(): boolean;
71
+ constructor(opt?: {
72
+ 'debug'?: boolean;
73
+ });
74
+ /** --- 入口方法 --- */
75
+ abstract main(): void | Promise<void>;
76
+ /** --- 全局错误事件 --- */
77
+ onError(taskId: string, formId: string, error: Error, info: string): void | Promise<void>;
78
+ /** --- 屏幕大小改变事件 --- */
79
+ onScreenResize(): void | Promise<void>;
80
+ /** --- 系统配置变更事件 --- */
81
+ onConfigChanged<T extends lCore.IConfig, TK extends keyof T>(n: TK, v: T[TK]): void | Promise<void>;
82
+ /** --- 窗体创建事件 --- */
83
+ onFormCreated(taskId: string, formId: string, title: string, icon: string, showInSystemTask: boolean): void | Promise<void>;
84
+ /** --- 窗体销毁事件 */
85
+ onFormRemoved(taskId: string, formId: string, title: string, icon: string): void | Promise<void>;
86
+ /** --- 窗体标题改变事件 */
87
+ onFormTitleChanged(taskId: string, formId: string, title: string): void | Promise<void>;
88
+ /** --- 窗体图标改变事件 --- */
89
+ onFormIconChanged(taskId: string, formId: string, icon: string): void | Promise<void>;
90
+ /** --- 窗体最小化状态改变事件 --- */
91
+ onFormStateMinChanged(taskId: string, formId: string, state: boolean): void | Promise<void>;
92
+ /** --- 窗体最大化状态改变事件 --- */
93
+ onFormStateMaxChanged(taskId: string, formId: string, state: boolean): void | Promise<void>;
94
+ /** --- 窗体显示状态改变事件 --- */
95
+ onFormShowChanged(taskId: string, formId: string, state: boolean): void | Promise<void>;
96
+ /** --- 窗体获得焦点事件 --- */
97
+ onFormFocused(taskId: string, formId: string): void | Promise<void>;
98
+ /** --- 窗体丢失焦点事件 --- */
99
+ onFormBlurred(taskId: string, formId: string): void | Promise<void>;
100
+ /** --- 窗体闪烁事件 --- */
101
+ onFormFlash(taskId: string, formId: string): void | Promise<void>;
102
+ /** --- 窗体是否显示在任务栏属性改变事件 --- */
103
+ onFormShowInSystemTaskChange(taskId: string, formId: string, value: boolean): void | Promise<void>;
104
+ /** --- 窗体的 formHash 改变事件 --- */
105
+ onFormHashChange(taskId: string, formId: string, value: string, data: Record<string, any>): void | Promise<void>;
106
+ /** --- 任务开始事件 --- */
107
+ onTaskStarted(taskId: string): void | Promise<void>;
108
+ /** --- 任务结束事件 --- */
109
+ onTaskEnded(taskId: string): void | Promise<void>;
110
+ /** --- launcher 文件夹名称修改事件 --- */
111
+ onLauncherFolderNameChanged(id: string, name: string): void | Promise<void>;
112
+ /** --- location hash 改变事件 --- */
113
+ onHashChanged(hash: string): void | Promise<void>;
114
+ /** --- 键盘按下事件 --- */
115
+ onKeydown(e: KeyboardEvent): void | Promise<void>;
116
+ /** --- 键盘弹起事件 --- */
117
+ onKeyup(e: KeyboardEvent): void | Promise<void>;
118
+ /** --- 环境文件准备加载时的事件 --- */
119
+ onRuntimeFileLoad(url: string): void | Promise<void>;
120
+ /** --- 环境文件加载完成的事件 --- */
121
+ onRuntimeFileLoaded(url: string, state: number): void | Promise<void>;
122
+ }
123
+ /**
124
+ * --- 启动 ClickGo ---
125
+ * @param boot 启动类
126
+ */
127
+ export declare function launcher(boot: AbstractBoot): Promise<void>;
128
+ export { lControl as control, lCore as core, lDom as dom, lForm as form, lFs as fs, lNative as native, lStorage as storage, lTask as task, lTheme as theme, lTool as tool, lZip as zip };
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file