clickgo 6.7.2 → 6.8.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.
- package/AGENTS.md +14 -0
- package/dist/app/demo.cga +0 -0
- package/dist/app/task.cga +0 -0
- package/dist/control/common.cgc +0 -0
- package/dist/control/desktop.cgc +0 -0
- package/dist/control/form.cgc +0 -0
- package/dist/control/iconview.cgc +0 -0
- package/dist/control/property.cgc +0 -0
- package/dist/global.css +1 -1
- package/dist/index.js +1 -1
- package/dist/lib/control.d.ts +69 -0
- package/dist/lib/dom.d.ts +15 -1
- package/dist/lib/form.d.ts +4 -1
- package/dist/theme/software-dark.cgt +0 -0
- package/dist/theme/software-light.cgt +0 -0
- package/doc/clickgo-rag.md +1055 -475
- package/package.json +7 -3
- package/test/desktop.mjs +715 -0
- package/test/dom-style.mjs +261 -0
- package/test/form-launcher.mjs +102 -0
- package/test/form-native-regions.mjs +115 -0
- package/test/form-viewport.mjs +79 -2
- package/test/rtl-archive.mjs +1 -1
- package/dist/theme/compact-dark.cgt +0 -0
- package/dist/theme/compact-light.cgt +0 -0
package/dist/lib/control.d.ts
CHANGED
|
@@ -438,6 +438,8 @@ export interface IIconviewOpenEvent {
|
|
|
438
438
|
}
|
|
439
439
|
export interface IIconviewDropEvent {
|
|
440
440
|
'detail': {
|
|
441
|
+
/** --- 原始松手指针事件,可读取 Ctrl/Shift/Alt;Pointer.js 1.8.0 起提供 --- */
|
|
442
|
+
'event'?: PointerEvent;
|
|
441
443
|
'self': boolean;
|
|
442
444
|
'from': Array<{
|
|
443
445
|
'index': number;
|
|
@@ -466,6 +468,73 @@ export interface IIconviewSelectEvent {
|
|
|
466
468
|
};
|
|
467
469
|
};
|
|
468
470
|
}
|
|
471
|
+
/** --- 桌面图标;位置和选择使用稳定 ID,不依赖数据顺序 --- */
|
|
472
|
+
export interface IDesktopItem {
|
|
473
|
+
'id': string;
|
|
474
|
+
'name': string;
|
|
475
|
+
'icon'?: string;
|
|
476
|
+
/** --- 通用文件拖拽路径,由应用解释和执行操作 --- */
|
|
477
|
+
'path'?: string;
|
|
478
|
+
/** --- 0: 文件夹,1: 文件 --- */
|
|
479
|
+
'type'?: 0 | 1;
|
|
480
|
+
/** --- 禁止用户拖动;区域变化时仍可自动调整位置 --- */
|
|
481
|
+
'locked'?: boolean;
|
|
482
|
+
}
|
|
483
|
+
/** --- 相对控件内边缘的物理像素坐标,RTL 下也不镜像 --- */
|
|
484
|
+
export interface IDesktopPosition {
|
|
485
|
+
'x': number;
|
|
486
|
+
'y': number;
|
|
487
|
+
}
|
|
488
|
+
/** --- 图标 ID 到位置的映射,可独立保存和恢复 --- */
|
|
489
|
+
export type TDesktopPositions = Record<string, IDesktopPosition>;
|
|
490
|
+
/** --- 布局变化的来源 --- */
|
|
491
|
+
export type TDesktopLayoutReason = 'data' | 'positions' | 'resize' | 'options' | 'arrange' | 'drag';
|
|
492
|
+
/** --- 用户选择完成后的通知,属性同步不触发 --- */
|
|
493
|
+
export interface IDesktopSelectEvent {
|
|
494
|
+
'detail': {
|
|
495
|
+
'value': string[];
|
|
496
|
+
};
|
|
497
|
+
}
|
|
498
|
+
/** --- 双击、Enter 或溢出菜单请求打开图标 --- */
|
|
499
|
+
export interface IDesktopOpenEvent {
|
|
500
|
+
'detail': {
|
|
501
|
+
'value': string[];
|
|
502
|
+
};
|
|
503
|
+
}
|
|
504
|
+
/** --- 自动重排或用户拖动完成后的布局快照 --- */
|
|
505
|
+
export interface IDesktopLayoutEvent {
|
|
506
|
+
'detail': {
|
|
507
|
+
'positions': TDesktopPositions;
|
|
508
|
+
/** --- 持久化位置,窗口临时缩小时不被覆盖 --- */
|
|
509
|
+
'preferredPositions': TDesktopPositions;
|
|
510
|
+
'overflow': string[];
|
|
511
|
+
'reason': TDesktopLayoutReason;
|
|
512
|
+
};
|
|
513
|
+
}
|
|
514
|
+
/** --- 未放入区域的图标 ID 发生变化;数据和已有位置仍保留 --- */
|
|
515
|
+
export interface IDesktopOverflowEvent {
|
|
516
|
+
'detail': {
|
|
517
|
+
'value': string[];
|
|
518
|
+
};
|
|
519
|
+
}
|
|
520
|
+
/** --- 文件拖入桌面或目录,文件操作由应用决定 --- */
|
|
521
|
+
export interface IDesktopDropEvent {
|
|
522
|
+
'detail': {
|
|
523
|
+
/** --- 原始松手指针事件,可读取 Ctrl/Shift/Alt;Pointer.js 1.8.0 起提供 --- */
|
|
524
|
+
'event'?: PointerEvent;
|
|
525
|
+
'self': boolean;
|
|
526
|
+
'from': Array<{
|
|
527
|
+
'id'?: string;
|
|
528
|
+
'index': number;
|
|
529
|
+
'type': -1 | 0 | 1;
|
|
530
|
+
'path': string;
|
|
531
|
+
'name'?: string;
|
|
532
|
+
'icon'?: string;
|
|
533
|
+
}>;
|
|
534
|
+
'to': IDesktopItem | null;
|
|
535
|
+
'position': IDesktopPosition;
|
|
536
|
+
};
|
|
537
|
+
}
|
|
469
538
|
export interface ILevelselectLevelEvent {
|
|
470
539
|
'detail': {
|
|
471
540
|
'list': Array<{
|
package/dist/lib/dom.d.ts
CHANGED
|
@@ -199,23 +199,36 @@ export declare function isWatch(el: HTMLElement): boolean;
|
|
|
199
199
|
* @param taskId 任务 id
|
|
200
200
|
*/
|
|
201
201
|
export declare function clearWatch(taskId: lCore.TCurrent): void;
|
|
202
|
+
/** --- 样式变化通知回调 --- */
|
|
203
|
+
type TWatchStyleCallback = (name: string, value: string, old: string) => void | Promise<void>;
|
|
202
204
|
/**
|
|
203
205
|
* --- 监听一个标签的计算后样式的变化 ---
|
|
204
206
|
* @param el 对象
|
|
205
207
|
* @param name 样式名
|
|
206
208
|
* @param cb 变更回调
|
|
207
209
|
* @param immediate 是否立刻执行一次
|
|
210
|
+
* @returns 无返回值
|
|
208
211
|
*/
|
|
209
|
-
export declare function watchStyle(el: HTMLElement, name: string | string[], cb:
|
|
212
|
+
export declare function watchStyle(el: HTMLElement, name: string | string[], cb: TWatchStyleCallback, immediate?: boolean): void;
|
|
213
|
+
/**
|
|
214
|
+
* --- 取消元素的样式监听,可只移除指定属性或指定回调 ---
|
|
215
|
+
* @param el 要取消监听的元素,移出页面后仍可取消
|
|
216
|
+
* @param name 样式名,留空则匹配全部属性
|
|
217
|
+
* @param cb 只移除此回调,留空则移除匹配属性的全部回调
|
|
218
|
+
* @returns 无返回值
|
|
219
|
+
*/
|
|
220
|
+
export declare function unwatchStyle(el: HTMLElement, name?: string | string[], cb?: TWatchStyleCallback): void;
|
|
210
221
|
/**
|
|
211
222
|
* --- 检测一个标签是否正在被 watchStyle ---
|
|
212
223
|
* @param el 要检测的标签
|
|
224
|
+
* @returns 是否有属于该元素的样式监听
|
|
213
225
|
*/
|
|
214
226
|
export declare function isWatchStyle(el: HTMLElement): boolean;
|
|
215
227
|
/**
|
|
216
228
|
* --- 清除某个窗体的所有 watch style 监视 ---
|
|
217
229
|
* @param formId 窗体 id
|
|
218
230
|
* @param panelId 若指定则只清除当前窗体的某个 panel 的 watch
|
|
231
|
+
* @returns 无返回值
|
|
219
232
|
*/
|
|
220
233
|
export declare function clearWatchStyle(formId: string, panelId?: string): void;
|
|
221
234
|
/**
|
|
@@ -434,3 +447,4 @@ export interface IGetWatchInfoResult {
|
|
|
434
447
|
};
|
|
435
448
|
}>>;
|
|
436
449
|
}
|
|
450
|
+
export {};
|
package/dist/lib/form.d.ts
CHANGED
|
@@ -439,8 +439,10 @@ export declare function changeFocusMaxZIndex(): Promise<void>;
|
|
|
439
439
|
/**
|
|
440
440
|
* --- 根据 border 方向 获取理论窗体大小 ---
|
|
441
441
|
* @param border 显示的位置代号
|
|
442
|
+
* @param area 布局区域,默认避开任务栏
|
|
443
|
+
* @returns 对应区域内的窗体矩形
|
|
442
444
|
*/
|
|
443
|
-
export declare function getRectByBorder(border: lDom.TDomBorderCustom): {
|
|
445
|
+
export declare function getRectByBorder(border: lDom.TDomBorderCustom, area?: lCore.IAvailArea): {
|
|
444
446
|
'width': number;
|
|
445
447
|
'height': number;
|
|
446
448
|
'left': number;
|
|
@@ -455,6 +457,7 @@ export declare function showCircular(x: number, y: number): void;
|
|
|
455
457
|
/**
|
|
456
458
|
* --- 移动矩形到新位置 ---
|
|
457
459
|
* @param border 显示的位置代号
|
|
460
|
+
* @returns 无返回值
|
|
458
461
|
*/
|
|
459
462
|
export declare function moveRectangle(border: lDom.TDomBorderCustom): void;
|
|
460
463
|
/**
|
|
Binary file
|
|
Binary file
|