@skillbuilder/miniapp-simulator 0.2.7 → 0.2.8
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 +18 -1
- package/docs/assets/road-king-controls.png +0 -0
- package/docs/desktop-gesture-design.redoc.xml +96 -0
- package/lib/client-C59iNO5u.mjs +1371 -0
- package/lib/{index-CqClPZVv.mjs → index-BSj1bmle.mjs} +1 -1
- package/lib/index.js +4130 -2739
- package/lib/remote-client.js +2 -2
- package/lib/types/core/simulator.d.ts +2 -0
- package/lib/types/gesture/host-bus.d.ts +27 -2
- package/lib/types/gesture/input-scheduler.d.ts +29 -0
- package/lib/types/gesture/keyboard-panel-view.d.ts +16 -0
- package/lib/types/gesture/keyboard-panel.d.ts +54 -0
- package/lib/types/gesture/plugins/index.d.ts +11 -14
- package/lib/types/gesture/plugins/keyboard-touch.d.ts +4 -0
- package/lib/types/gesture/plugins/multi-touch-hint.d.ts +1 -9
- package/lib/types/gesture/plugins/multi-touch-switch.d.ts +1 -1
- package/lib/types/gesture/plugins/touch-emitter.d.ts +1 -9
- package/lib/types/gesture/plugins/wheel-pinch.d.ts +3 -0
- package/lib/types/gesture/plugins/wheel-scroll.d.ts +1 -1
- package/lib/types/gesture/touch-cursor.d.ts +4 -0
- package/lib/types/gesture/touch-sequence.d.ts +12 -0
- package/lib/types/gesture/types.d.ts +33 -9
- package/lib/types/host/shadow-host.d.ts +14 -4
- package/lib/types/inspector/host-inspector.d.ts +1 -1
- package/lib/types/remote/audit-controller.d.ts +2 -0
- package/lib/types/remote/audit-leave-monitor.d.ts +2 -0
- package/lib/types/remote/client.d.ts +2 -0
- package/lib/types/remote/keyboard-panel-host.d.ts +19 -0
- package/lib/types/remote/protocol.d.ts +24 -1
- package/lib/types/remote/runtime-entry.d.ts +2 -1
- package/lib/types/remote/runtime.d.ts +1 -1
- package/lib/types/types/options.d.ts +4 -0
- package/lib/types/types/renderer.d.ts +8 -0
- package/lib/types/utils/screen-coordinates.d.ts +31 -0
- package/lib/workbench.js +1 -1
- package/package.json +1 -1
- package/lib/client-BjYHK9LR.mjs +0 -1220
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export type ScreenRotationDirection = "clockwise" | "counterclockwise";
|
|
2
|
+
export type ScreenRotation = 0 | -90 | -180 | -270;
|
|
3
|
+
/** 设备 CSS 旋转只改变显示方向,载体的 offset 尺寸始终属于 guest 逻辑视口。 */
|
|
4
|
+
export declare function getScreenRotation(element: Element): ScreenRotation;
|
|
5
|
+
/** host client 坐标 → guest / 元素局部 CSS 像素;保留屏幕外拖拽坐标。 */
|
|
6
|
+
export declare function hostToLocal(element: HTMLElement, hostX: number, hostY: number): {
|
|
7
|
+
x: number;
|
|
8
|
+
y: number;
|
|
9
|
+
};
|
|
10
|
+
/** guest / 元素局部 CSS 像素 → host client 坐标。 */
|
|
11
|
+
export declare function localToHost(element: HTMLElement, x: number, y: number): {
|
|
12
|
+
x: number;
|
|
13
|
+
y: number;
|
|
14
|
+
};
|
|
15
|
+
/** host 向量 → guest 向量;行/页单位传 false,只转换方向、不缩放。 */
|
|
16
|
+
export declare function hostVectorToLocal(element: HTMLElement, dx: number, dy: number, scaleToPixels?: boolean): {
|
|
17
|
+
x: number;
|
|
18
|
+
y: number;
|
|
19
|
+
};
|
|
20
|
+
/** 局部矩形在 host client 空间的轴对齐包围盒。 */
|
|
21
|
+
export declare function localRectToHost(element: HTMLElement, rect: {
|
|
22
|
+
x: number;
|
|
23
|
+
y: number;
|
|
24
|
+
width: number;
|
|
25
|
+
height: number;
|
|
26
|
+
}): {
|
|
27
|
+
x: number;
|
|
28
|
+
y: number;
|
|
29
|
+
width: number;
|
|
30
|
+
height: number;
|
|
31
|
+
};
|
package/lib/workbench.js
CHANGED