clickgo 3.16.16 → 3.16.18
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/README.md +1 -1
- package/dist/app/demo/form/method/native/native.js +26 -0
- package/dist/app/demo/form/method/native/native.xml +2 -0
- package/dist/clickgo.d.ts +17 -0
- package/dist/clickgo.js +1 -1
- package/dist/control/arteditor.cgc +0 -0
- package/dist/control/box.cgc +0 -0
- package/dist/control/captcha.cgc +0 -0
- package/dist/control/common.cgc +0 -0
- package/dist/control/desc.cgc +0 -0
- package/dist/control/drawer.cgc +0 -0
- package/dist/control/echarts.cgc +0 -0
- package/dist/control/form.cgc +0 -0
- package/dist/control/iconview.cgc +0 -0
- package/dist/control/jodit.cgc +0 -0
- package/dist/control/map.cgc +0 -0
- package/dist/control/monaco.cgc +0 -0
- package/dist/control/mpegts.cgc +0 -0
- package/dist/control/nav.cgc +0 -0
- package/dist/control/page.cgc +0 -0
- package/dist/control/pdf.cgc +0 -0
- package/dist/control/property.cgc +0 -0
- package/dist/control/qrcode.cgc +0 -0
- package/dist/control/table.cgc +0 -0
- package/dist/control/task.cgc +0 -0
- package/dist/control/tplink.cgc +0 -0
- package/dist/control/tuieditor.cgc +0 -0
- package/dist/control/tuiviewer.cgc +0 -0
- package/dist/control/xterm.cgc +0 -0
- package/dist/index.d.ts +51 -0
- package/dist/lib/control.d.ts +53 -0
- package/dist/lib/core.d.ts +47 -0
- package/dist/lib/dom.d.ts +74 -0
- package/dist/lib/dom.js +7 -7
- package/dist/lib/form.d.ts +222 -0
- package/dist/lib/fs.d.ts +35 -0
- package/dist/lib/fs.js +2 -2
- package/dist/lib/native.d.ts +36 -0
- package/dist/lib/native.js +8 -0
- package/dist/lib/storage.d.ts +6 -0
- package/dist/lib/task.d.ts +32 -0
- package/dist/lib/task.js +7 -1
- package/dist/lib/theme.d.ts +8 -0
- package/dist/lib/tool.d.ts +120 -0
- package/dist/lib/zip.d.ts +40 -0
- package/dist/theme/blue.cgt +0 -0
- package/dist/theme/byterun.cgt +0 -0
- package/dist/theme/light.cgt +0 -0
- package/package.json +7 -5
- package/dist/clickgo.ts +0 -68
- package/dist/index.ts +0 -282
- package/dist/lib/control.ts +0 -751
- package/dist/lib/core.ts +0 -1145
- package/dist/lib/dom.ts +0 -2728
- package/dist/lib/form.ts +0 -3829
- package/dist/lib/fs.ts +0 -1324
- package/dist/lib/native.ts +0 -236
- package/dist/lib/storage.ts +0 -229
- package/dist/lib/task.ts +0 -2160
- package/dist/lib/theme.ts +0 -199
- package/dist/lib/tool.ts +0 -1278
- package/dist/lib/zip.ts +0 -444
- package/eslint.config.js +0 -22
package/dist/lib/fs.d.ts
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import * as types from '../../types';
|
|
2
|
+
export declare function mount(name: string, handler: types.IMountHandler, taskId?: number): boolean;
|
|
3
|
+
export declare function unmount(name: string): Promise<boolean>;
|
|
4
|
+
export declare function getContent(path: string, options?: {
|
|
5
|
+
'start'?: number;
|
|
6
|
+
'end'?: number;
|
|
7
|
+
'progress'?: (loaded: number, total: number) => void | Promise<void>;
|
|
8
|
+
'cache'?: string;
|
|
9
|
+
}, taskId?: number): Promise<string | Blob | null>;
|
|
10
|
+
export declare function getContent(path: string, options: BufferEncoding | {
|
|
11
|
+
'encoding': BufferEncoding;
|
|
12
|
+
'start'?: number;
|
|
13
|
+
'end'?: number;
|
|
14
|
+
'progress'?: (loaded: number, total: number) => void | Promise<void>;
|
|
15
|
+
'cache'?: string;
|
|
16
|
+
}, taskId?: number): Promise<string | null>;
|
|
17
|
+
export declare function putContent(path: string, data: string | Blob, options?: {
|
|
18
|
+
'encoding'?: BufferEncoding | null;
|
|
19
|
+
'mode'?: string | number;
|
|
20
|
+
'flag'?: string | number;
|
|
21
|
+
}, taskId?: number): Promise<boolean>;
|
|
22
|
+
export declare function readLink(path: string, encoding?: BufferEncoding, taskId?: number): Promise<string | null>;
|
|
23
|
+
export declare function symlink(filePath: string, linkPath: string, type?: 'dir' | 'file' | 'junction', taskId?: number): Promise<boolean>;
|
|
24
|
+
export declare function unlink(path: string, taskId?: number): Promise<boolean>;
|
|
25
|
+
export declare function stats(path: string, taskId?: number): Promise<types.IStats | null>;
|
|
26
|
+
export declare function isDir(path: string, taskId?: number): Promise<types.IStats | false>;
|
|
27
|
+
export declare function isFile(path: string, taskId?: number): Promise<types.IStats | false>;
|
|
28
|
+
export declare function mkdir(path: string, mode?: number, taskId?: number): Promise<boolean>;
|
|
29
|
+
export declare function rmdir(path: string, taskId?: number): Promise<boolean>;
|
|
30
|
+
export declare function rmdirDeep(path: string, taskId?: number): Promise<boolean>;
|
|
31
|
+
export declare function chmod(path: string, mod: string | number, taskId?: number): Promise<boolean>;
|
|
32
|
+
export declare function rename(oldPath: string, newPath: string, taskId?: number): Promise<boolean>;
|
|
33
|
+
export declare function readDir(path: string, encoding?: BufferEncoding, taskId?: number): Promise<types.IDirent[]>;
|
|
34
|
+
export declare function copyFolder(from: string, to: string, ignore?: RegExp[], taskId?: number): Promise<number>;
|
|
35
|
+
export declare function copyFile(src: string, dest: string, taskId?: number): Promise<boolean>;
|
package/dist/lib/fs.js
CHANGED
|
@@ -153,8 +153,8 @@ function getContent(path, options, taskId) {
|
|
|
153
153
|
'encoding': options
|
|
154
154
|
};
|
|
155
155
|
}
|
|
156
|
-
else
|
|
157
|
-
options = {};
|
|
156
|
+
else {
|
|
157
|
+
options !== null && options !== void 0 ? options : (options = {});
|
|
158
158
|
}
|
|
159
159
|
const encoding = options.encoding;
|
|
160
160
|
const start = options.start;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export declare function getToken(): string;
|
|
2
|
+
export declare function on(name: string, handler: (...param: any[]) => any | Promise<any>, once?: boolean, formId?: number, taskId?: number): void;
|
|
3
|
+
export declare function once(name: string, handler: (...param: any[]) => any | Promise<any>, formId?: number, taskId?: number): void;
|
|
4
|
+
export declare function off(name: string, formId?: number, taskId?: number): void;
|
|
5
|
+
export declare function clear(formId?: number, taskId?: number): void;
|
|
6
|
+
export declare function getListenerList(taskId?: number): Record<string, Record<string, Record<string, number>>>;
|
|
7
|
+
export declare function invoke(name: string, ...param: any[]): Promise<any>;
|
|
8
|
+
export declare function quit(): Promise<void>;
|
|
9
|
+
export declare function size(width: number, height: number): Promise<void>;
|
|
10
|
+
export declare function max(): Promise<void>;
|
|
11
|
+
export declare function min(): Promise<void>;
|
|
12
|
+
export declare function restore(): Promise<void>;
|
|
13
|
+
export declare function activate(): Promise<void>;
|
|
14
|
+
export declare function close(): Promise<void>;
|
|
15
|
+
export declare function maximizable(val: boolean): Promise<void>;
|
|
16
|
+
export declare function open(options?: {
|
|
17
|
+
'path'?: string;
|
|
18
|
+
'filters'?: Array<{
|
|
19
|
+
'name': string;
|
|
20
|
+
'accept': string[];
|
|
21
|
+
}>;
|
|
22
|
+
'props'?: {
|
|
23
|
+
'file'?: boolean;
|
|
24
|
+
'directory'?: boolean;
|
|
25
|
+
'multi'?: boolean;
|
|
26
|
+
};
|
|
27
|
+
}): Promise<string[] | null>;
|
|
28
|
+
export declare function save(options?: {
|
|
29
|
+
'path'?: string;
|
|
30
|
+
'filters'?: Array<{
|
|
31
|
+
'name': string;
|
|
32
|
+
'accept': string[];
|
|
33
|
+
}>;
|
|
34
|
+
}): Promise<string | null>;
|
|
35
|
+
export declare function ping(val: string): Promise<string>;
|
|
36
|
+
export declare function isMax(): Promise<boolean>;
|
package/dist/lib/native.js
CHANGED
|
@@ -57,6 +57,8 @@ exports.restore = restore;
|
|
|
57
57
|
exports.activate = activate;
|
|
58
58
|
exports.close = close;
|
|
59
59
|
exports.maximizable = maximizable;
|
|
60
|
+
exports.open = open;
|
|
61
|
+
exports.save = save;
|
|
60
62
|
exports.ping = ping;
|
|
61
63
|
exports.isMax = isMax;
|
|
62
64
|
const clickgo = __importStar(require("../clickgo"));
|
|
@@ -204,6 +206,12 @@ function maximizable(val) {
|
|
|
204
206
|
yield invoke('cg-maximizable', token, val);
|
|
205
207
|
});
|
|
206
208
|
}
|
|
209
|
+
function open(options = {}) {
|
|
210
|
+
return invoke('cg-form-open', token, options);
|
|
211
|
+
}
|
|
212
|
+
function save(options = {}) {
|
|
213
|
+
return invoke('cg-form-save', token, options);
|
|
214
|
+
}
|
|
207
215
|
function ping(val) {
|
|
208
216
|
return __awaiter(this, void 0, void 0, function* () {
|
|
209
217
|
return invoke('cg-ping', val);
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare function get(key: string, taskId?: number): any;
|
|
2
|
+
export declare function set(key: string, val: string | number | any[] | Record<string, any>, taskId?: number): boolean;
|
|
3
|
+
export declare function remove(key: string, taskId?: number): boolean;
|
|
4
|
+
export declare function list(taskId?: number): Record<string, number>;
|
|
5
|
+
export declare function all(): Record<string, number>;
|
|
6
|
+
export declare function clear(path: string): Promise<number>;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import * as types from '../../types';
|
|
2
|
+
export declare const list: Record<number, types.ITask>;
|
|
3
|
+
export declare let lastId: number;
|
|
4
|
+
export declare function setFocus(id?: number): void;
|
|
5
|
+
export declare function getFocus(): number | null;
|
|
6
|
+
export declare function onFrame(fun: () => void | Promise<void>, opt?: {
|
|
7
|
+
'count'?: number;
|
|
8
|
+
'taskId'?: number;
|
|
9
|
+
'formId'?: number;
|
|
10
|
+
}): number;
|
|
11
|
+
export declare function offFrame(ft: number, opt?: {
|
|
12
|
+
'taskId'?: number;
|
|
13
|
+
}): void;
|
|
14
|
+
export declare function get(tid: number): types.ITaskInfo | null;
|
|
15
|
+
export declare function getPermissions(tid: number): string[];
|
|
16
|
+
export declare function getList(): Record<string, types.ITaskInfo>;
|
|
17
|
+
export declare function run(url: string | types.IApp, opt?: types.ITaskRunOptions, ntid?: number): Promise<number>;
|
|
18
|
+
export declare function checkPermission(vals: string | string[], apply?: boolean, applyHandler?: (list: string[]) => void | Promise<void>, taskId?: number): Promise<boolean[]>;
|
|
19
|
+
export declare function end(taskId: number | string): boolean;
|
|
20
|
+
export declare function loadLocaleData(lang: string, data: Record<string, any>, pre?: string, taskId?: number): void;
|
|
21
|
+
export declare function loadLocale(lang: string, path: string, taskId?: number): Promise<boolean>;
|
|
22
|
+
export declare function clearLocale(taskId?: number): void;
|
|
23
|
+
export declare function setLocale(lang: string, path: string, taskId?: number): Promise<boolean>;
|
|
24
|
+
export declare function setLocaleLang(lang: string, taskId?: number): void;
|
|
25
|
+
export declare function clearLocaleLang(taskId?: number): void;
|
|
26
|
+
export declare function createTimer(fun: () => void | Promise<void>, delay: number, opt?: types.ICreateTimerOptions): number;
|
|
27
|
+
export declare function removeTimer(timer: number, taskId?: number): void;
|
|
28
|
+
export declare function sleep(fun: () => void | Promise<void>, delay: number, taskId?: number): number;
|
|
29
|
+
export declare const systemTaskInfo: types.ISystemTaskInfo;
|
|
30
|
+
export declare function setSystem(formId: number, taskId?: number): boolean;
|
|
31
|
+
export declare function clearSystem(taskId?: number | string): boolean;
|
|
32
|
+
export declare function refreshSystemPosition(): void;
|
package/dist/lib/task.js
CHANGED
|
@@ -859,7 +859,13 @@ function run(url_1) {
|
|
|
859
859
|
},
|
|
860
860
|
isMax: function () {
|
|
861
861
|
return native.isMax();
|
|
862
|
-
}
|
|
862
|
+
},
|
|
863
|
+
open: function (options) {
|
|
864
|
+
return native.open(options);
|
|
865
|
+
},
|
|
866
|
+
save: function (options) {
|
|
867
|
+
return native.save(options);
|
|
868
|
+
},
|
|
863
869
|
},
|
|
864
870
|
'storage': {
|
|
865
871
|
get: function (key) {
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as types from '../../types';
|
|
2
|
+
export declare let global: types.ITheme | null;
|
|
3
|
+
export declare function read(blob: Blob): Promise<types.ITheme | false>;
|
|
4
|
+
export declare function load(theme?: types.ITheme, taskId?: number): Promise<boolean>;
|
|
5
|
+
export declare function remove(name: string, taskId?: number): Promise<void>;
|
|
6
|
+
export declare function clear(taskId?: number): Promise<void>;
|
|
7
|
+
export declare function setGlobal(theme: types.ITheme): Promise<void>;
|
|
8
|
+
export declare function clearGlobal(): void;
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import * as types from '../../types';
|
|
2
|
+
export declare function compressor<T extends File | Blob>(file: T, options?: {
|
|
3
|
+
'maxWidth'?: number;
|
|
4
|
+
'maxHeight'?: number;
|
|
5
|
+
'quality'?: number;
|
|
6
|
+
}): Promise<File | Blob | false>;
|
|
7
|
+
interface IClassPrototype {
|
|
8
|
+
'method': Record<string, any>;
|
|
9
|
+
'access': Record<string, {
|
|
10
|
+
'get'?: any;
|
|
11
|
+
'set'?: any;
|
|
12
|
+
}>;
|
|
13
|
+
}
|
|
14
|
+
export declare function getClassPrototype(obj: object, over?: string[], level?: number): IClassPrototype;
|
|
15
|
+
export declare function blob2ArrayBuffer(blob: Blob): Promise<ArrayBuffer>;
|
|
16
|
+
export declare function sizeFormat(size: number, spliter?: string): string;
|
|
17
|
+
export declare function weightFormat(weight: number, spliter?: string): string;
|
|
18
|
+
export declare function clone(obj: Record<string, any> | any[]): any[] | any;
|
|
19
|
+
export declare function sleep(ms?: number): Promise<boolean>;
|
|
20
|
+
export declare function nextFrame(): Promise<void>;
|
|
21
|
+
export declare function sleepFrame(count: number): Promise<void>;
|
|
22
|
+
export declare function purify(text: string): string;
|
|
23
|
+
export declare function match(str: string, regs: RegExp[]): boolean;
|
|
24
|
+
export declare function styleUrl2DataUrl(path: string, style: string, files: Record<string, Blob | string>): Promise<string>;
|
|
25
|
+
export declare function layoutAddTagClassAndReTagName(layout: string, retagname: boolean): string;
|
|
26
|
+
export declare function layoutInsertAttr(layout: string, insert: string, opt?: {
|
|
27
|
+
'ignore'?: RegExp[];
|
|
28
|
+
'include'?: RegExp[];
|
|
29
|
+
}): string;
|
|
30
|
+
export declare function layoutClassPrepend(layout: string, preps: string[]): string;
|
|
31
|
+
export declare function eventsAttrWrap(layout: string): string;
|
|
32
|
+
export declare function teleportGlue(layout: string, formId: number | string): string;
|
|
33
|
+
export declare function stylePrepend(style: string, prep?: string): {
|
|
34
|
+
'style': string;
|
|
35
|
+
'prep': string;
|
|
36
|
+
};
|
|
37
|
+
export declare function getMimeByPath(path: string): {
|
|
38
|
+
'mime': string;
|
|
39
|
+
'ext': string;
|
|
40
|
+
};
|
|
41
|
+
export declare function rand(min: number, max: number): number;
|
|
42
|
+
export declare const RANDOM_N = "0123456789";
|
|
43
|
+
export declare const RANDOM_U = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
|
44
|
+
export declare const RANDOM_L = "abcdefghijklmnopqrstuvwxyz";
|
|
45
|
+
export declare const RANDOM_UN: string;
|
|
46
|
+
export declare const RANDOM_LN: string;
|
|
47
|
+
export declare const RANDOM_LU: string;
|
|
48
|
+
export declare const RANDOM_LUN: string;
|
|
49
|
+
export declare const RANDOM_V = "ACEFGHJKLMNPRSTWXY34567";
|
|
50
|
+
export declare const RANDOM_LUNS: string;
|
|
51
|
+
export declare function random(length?: number, source?: string, block?: string): string;
|
|
52
|
+
export declare function getBoolean(param: boolean | string | number | undefined): boolean;
|
|
53
|
+
export declare function getNumber(param: string | number): number;
|
|
54
|
+
export declare function getArray(param: string | any[]): any[];
|
|
55
|
+
export declare function escapeHTML(html: string): string;
|
|
56
|
+
export declare function formatColor(color: string): number[];
|
|
57
|
+
export declare function rgb2hex(r: string | number, g?: string | number, b?: string | number, a?: string | number): string;
|
|
58
|
+
export declare function hex2rgb(hex: string): {
|
|
59
|
+
'r': number;
|
|
60
|
+
'g': number;
|
|
61
|
+
'b': number;
|
|
62
|
+
'a': number;
|
|
63
|
+
'rgb': string;
|
|
64
|
+
};
|
|
65
|
+
export declare function rgb2hsl(r: string | number, g?: string | number, b?: string | number, a?: string | number, decimal?: boolean): {
|
|
66
|
+
'h': number;
|
|
67
|
+
's': number;
|
|
68
|
+
'l': number;
|
|
69
|
+
'a': number;
|
|
70
|
+
'hsl': string;
|
|
71
|
+
};
|
|
72
|
+
export declare function hsl2rgb(h: string | number, s?: string | number, l?: string | number, a?: string | number, decimal?: boolean): {
|
|
73
|
+
'r': number;
|
|
74
|
+
'g': number;
|
|
75
|
+
'b': number;
|
|
76
|
+
'a': number;
|
|
77
|
+
'rgb': string;
|
|
78
|
+
};
|
|
79
|
+
export declare function request(url: string, opt: types.IRequestOptions): Promise<null | any>;
|
|
80
|
+
export declare function fetch(url: string, init?: RequestInit): Promise<string | Blob | null>;
|
|
81
|
+
export declare function get(url: string, opt?: {
|
|
82
|
+
'credentials'?: 'include' | 'same-origin' | 'omit';
|
|
83
|
+
'headers'?: HeadersInit;
|
|
84
|
+
}): Promise<Response | null>;
|
|
85
|
+
export declare function post(url: string, data: Record<string, any> | FormData, opt?: {
|
|
86
|
+
'credentials'?: 'include' | 'same-origin' | 'omit';
|
|
87
|
+
'headers'?: HeadersInit;
|
|
88
|
+
}): Promise<Response | null>;
|
|
89
|
+
export declare function getResponseJson(url: string, opt?: {
|
|
90
|
+
'credentials'?: 'include' | 'same-origin' | 'omit';
|
|
91
|
+
'headers'?: HeadersInit;
|
|
92
|
+
}): Promise<any | null>;
|
|
93
|
+
export declare function postResponseJson(url: string, data: Record<string, any> | FormData, opt?: {
|
|
94
|
+
'credentials'?: 'include' | 'same-origin' | 'omit';
|
|
95
|
+
'headers'?: HeadersInit;
|
|
96
|
+
}): Promise<any | null>;
|
|
97
|
+
export declare function parseUrl(url: string): ILoaderUrl;
|
|
98
|
+
export declare function urlResolve(from: string, to: string): string;
|
|
99
|
+
export declare function urlAtom(url: string): string;
|
|
100
|
+
export declare function blob2Text(blob: Blob): Promise<string>;
|
|
101
|
+
export declare function blob2DataUrl(blob: Blob): Promise<string>;
|
|
102
|
+
export declare function execCommand(ac: string): void;
|
|
103
|
+
export declare function compar(before: Array<string | number>, after: Array<string | number>): {
|
|
104
|
+
'remove': Record<string, number>;
|
|
105
|
+
'add': Record<string, number>;
|
|
106
|
+
'length': {
|
|
107
|
+
'remove': number;
|
|
108
|
+
'add': number;
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
export declare function formatSecond(second: number): string;
|
|
112
|
+
export declare function formatTime(ts: number | Date, tz?: number): {
|
|
113
|
+
'date': string;
|
|
114
|
+
'time': string;
|
|
115
|
+
'zone': string;
|
|
116
|
+
};
|
|
117
|
+
export declare function isMs(time: number): boolean;
|
|
118
|
+
export declare function queryStringify(query: Record<string, any>): string;
|
|
119
|
+
export declare function queryParse(query: string): Record<string, string | string[]>;
|
|
120
|
+
export {};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import jszip from 'jszip';
|
|
2
|
+
import * as types from '../../types';
|
|
3
|
+
export declare class Zip {
|
|
4
|
+
private readonly _zip;
|
|
5
|
+
private _path;
|
|
6
|
+
constructor(zip: jszip);
|
|
7
|
+
getContent(path: string): Promise<string | null>;
|
|
8
|
+
getContent<T extends types.TZipOutputType>(path: string, type: T): Promise<types.IZipOutputByType[T] | null>;
|
|
9
|
+
putContent<T extends types.TZipInputType>(path: string, data: types.IZipInputByType[T], options?: {
|
|
10
|
+
'base64'?: boolean;
|
|
11
|
+
'binary'?: boolean;
|
|
12
|
+
'date'?: Date;
|
|
13
|
+
}): void;
|
|
14
|
+
unlink(path: string): void;
|
|
15
|
+
stats(path: string): types.IZipStats | null;
|
|
16
|
+
isDir(path: string): types.IZipStats | false;
|
|
17
|
+
isFile(path: string): types.IZipStats | false;
|
|
18
|
+
readDir(path?: string, opt?: {
|
|
19
|
+
'hasChildren'?: boolean;
|
|
20
|
+
'hasDir'?: boolean;
|
|
21
|
+
'pathAsKey'?: false;
|
|
22
|
+
}): types.IZipItem[];
|
|
23
|
+
readDir(path?: string, opt?: {
|
|
24
|
+
'hasChildren'?: boolean;
|
|
25
|
+
'hasDir'?: boolean;
|
|
26
|
+
'pathAsKey': true;
|
|
27
|
+
}): Record<string, types.IZipItem>;
|
|
28
|
+
private _readDir;
|
|
29
|
+
private _list;
|
|
30
|
+
private _refreshList;
|
|
31
|
+
pwd(): string;
|
|
32
|
+
cd(dir: string): string;
|
|
33
|
+
generate<T extends types.TZipOutputType>(options?: {
|
|
34
|
+
'type'?: T;
|
|
35
|
+
'level'?: number;
|
|
36
|
+
'onUpdate'?: (percent: number, currentFile: string | null) => void;
|
|
37
|
+
}): Promise<types.IZipOutputByType[T]>;
|
|
38
|
+
getList(): Promise<Record<string, Blob | string>>;
|
|
39
|
+
}
|
|
40
|
+
export declare function get(data?: types.TZipInputFileFormat): Promise<Zip | null>;
|
package/dist/theme/blue.cgt
CHANGED
|
Binary file
|
package/dist/theme/byterun.cgt
CHANGED
|
Binary file
|
package/dist/theme/light.cgt
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clickgo",
|
|
3
|
-
"version": "3.16.
|
|
3
|
+
"version": "3.16.18",
|
|
4
4
|
"description": "Background interface, software interface, mobile phone APP interface operation library.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"deskrt",
|
|
@@ -19,11 +19,13 @@
|
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"@litert/eslint-plugin-rules": "^0.3.1",
|
|
22
|
-
"@
|
|
23
|
-
"@types/node": "^24.0.1",
|
|
22
|
+
"@types/node": "^24.0.3",
|
|
24
23
|
"electron": "^36.4.0",
|
|
25
|
-
"
|
|
26
|
-
"terser": "^5.42.0",
|
|
24
|
+
"terser": "^5.43.0",
|
|
27
25
|
"typescript": "^5.8.3"
|
|
26
|
+
},
|
|
27
|
+
"dependencies": {
|
|
28
|
+
"@litert/loader": "^3.5.9",
|
|
29
|
+
"jszip": "^3.10.1"
|
|
28
30
|
}
|
|
29
31
|
}
|
package/dist/clickgo.ts
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright 2024 Han Guoshuai <zohegs@gmail.com>
|
|
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
|
-
const version = '3.16.16';
|
|
17
|
-
export function getVersion(): string {
|
|
18
|
-
return version;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
const native = navigator.userAgent.includes('electron') ? true : false;
|
|
22
|
-
export function isNative(): boolean {
|
|
23
|
-
return native;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
let platform: NodeJS.Platform | 'web' = 'web';
|
|
27
|
-
let immersion: boolean = false;
|
|
28
|
-
let frame: boolean = false;
|
|
29
|
-
|
|
30
|
-
if (native) {
|
|
31
|
-
const reg = /electron\/(.+?) (.+?)\/(.+?) immersion\/([0-9]) frame\/([0-9])/.exec(navigator.userAgent);
|
|
32
|
-
if (reg) {
|
|
33
|
-
platform = reg[2] as any;
|
|
34
|
-
immersion = reg[4] === '0' ? false : true;
|
|
35
|
-
frame = reg[5] === '0' ? false : true;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
export function getPlatform(): NodeJS.Platform | 'web' {
|
|
39
|
-
return platform;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* --- 获取当前 native 是否是沉浸式 ---
|
|
44
|
-
*/
|
|
45
|
-
export function isImmersion(): boolean {
|
|
46
|
-
return immersion;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* --- 是否含有窗体外边框 ---
|
|
51
|
-
*/
|
|
52
|
-
export function hasFrame(): boolean {
|
|
53
|
-
return frame;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
export const vue: import('../types/index').IVueObject = (window as any).Vue;
|
|
57
|
-
|
|
58
|
-
export * as control from './lib/control';
|
|
59
|
-
export * as core from './lib/core';
|
|
60
|
-
export * as dom from './lib/dom';
|
|
61
|
-
export * as form from './lib/form';
|
|
62
|
-
export * as fs from './lib/fs';
|
|
63
|
-
export * as native from './lib/native';
|
|
64
|
-
export * as storage from './lib/storage';
|
|
65
|
-
export * as task from './lib/task';
|
|
66
|
-
export * as theme from './lib/theme';
|
|
67
|
-
export * as tool from './lib/tool';
|
|
68
|
-
export * as zip from './lib/zip';
|