clickgo 5.20.0 → 6.0.0

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.
@@ -227,10 +227,29 @@ export interface IApp {
227
227
  'type': 'app';
228
228
  /** --- 控件对象配置文件 --- */
229
229
  'config': IAppConfig;
230
- /** --- 所有已加载的文件内容 --- */
231
- 'files': Record<string, Blob | string>;
232
230
  /** --- 应用图标 --- */
233
231
  'icon': string;
232
+ /** --- 新 CGA 的按需解密包读取器 --- */
233
+ 'package': IAppPackage;
234
+ }
235
+ /** --- CGA 包内项目 --- */
236
+ export interface IAppPackageEntry {
237
+ 'isDirectory': boolean;
238
+ 'isFile': boolean;
239
+ 'name': string;
240
+ }
241
+ /** --- CGA 包内项目属性 --- */
242
+ export interface IAppPackageStats {
243
+ 'isDirectory': boolean;
244
+ 'isFile': boolean;
245
+ 'size': number;
246
+ }
247
+ /** --- CGA 按需解密包读取器 --- */
248
+ export interface IAppPackage {
249
+ getContent(path: string): Promise<Blob | string | null>;
250
+ stats(path: string): IAppPackageStats | null;
251
+ readDir(path: string): IAppPackageEntry[];
252
+ clear(): void;
234
253
  }
235
254
  /** --- 应用文件包 config --- */
236
255
  export interface IAppConfig {
@@ -100,9 +100,9 @@ export declare function match(str: string, regs: RegExp[]): boolean;
100
100
  * --- 将 style 中的 url 转换成 base64 data url ---
101
101
  * @param path 路径基准或以文件的路径为基准,以 / 结尾
102
102
  * @param style 样式表
103
- * @param files 在此文件列表中查找
103
+ * @param files 在此文件列表或读取器中查找
104
104
  */
105
- export declare function styleUrl2DataUrl(path: string, style: string, files: Record<string, Blob | string>): Promise<string>;
105
+ export declare function styleUrl2DataUrl(path: string, style: string, files: Record<string, Blob | string> | ((path: string) => Promise<Blob | string | null>)): Promise<string>;
106
106
  /**
107
107
  * --- 给标签增加 tag-tagname 的 class,同时给标签增加 cg- 前导(仅字符串,不是操作真实 dom) ---
108
108
  * @param layout layout
Binary file
Binary file