@shijiu/jsview-vue 2.2.35 → 2.2.128
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/bin/browser/BrowserApic.vue.mjs +2 -1
- package/bin/browser/BrowserApic2.vue.mjs +2 -1
- package/bin/browser/BrowserApicLib.mjs +2 -1
- package/bin/browser/BrowserQrcode.vue.mjs +3 -1
- package/bin/browser/BrowserTextureAnim.vue.mjs +7 -6
- package/bin/jsview-vue.mjs +1557 -894
- package/bin/types/JsViewEngineWidget/MetroWidget/Slide.d.ts +21 -0
- package/bin/types/JsViewEngineWidget/TemplateParser/MetroTemplate.d.ts +2 -8
- package/bin/types/JsViewEngineWidget/WidgetCommon.d.ts +9 -3
- package/bin/types/JsViewVueTools/ConstSymbol.d.ts +2 -0
- package/bin/types/JsViewVueTools/ForgeConstDefine.d.ts +11 -0
- package/bin/types/JsViewVueTools/JsvRuntimeBridge.d.ts +113 -57
- package/bin/types/JsViewVueTools/JsvTextureStore/CapturedTexture/CapturedTexture.d.ts +11 -0
- package/bin/types/JsViewVueTools/JsvTextureStore/Texture.d.ts +8 -0
- package/bin/types/JsViewVueWidget/JsvConnectLine/JsvConnectLine.vue.d.ts +1 -1
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/ActionRefObject.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/ActorControl.d.ts +65 -0
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/ActorState.d.ts +6 -0
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/CallbackManager.d.ts +11 -0
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/ForgeTypeDefine.d.ts +15 -0
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/FreeMoveActor.vue.d.ts +6 -0
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/SetAction.d.ts +71 -0
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/SetCondition.d.ts +95 -0
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/SetState.d.ts +62 -0
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/index.d.ts +2 -1
- package/bin/types/JsViewVueWidget/JsvLine/JsvLine.vue.d.ts +1 -1
- package/bin/types/JsViewVueWidget/JsvNativeSharedDiv.vue.d.ts +66 -28
- package/bin/types/JsViewVueWidget/JsvNinePatch.vue.d.ts +1 -0
- package/bin/types/JsViewVueWidget/JsvScrollBox/JsvScrollBox.vue.d.ts +176 -0
- package/bin/types/JsViewVueWidget/JsvScrollBox/ScrollSymbol.d.ts +7 -0
- package/bin/types/JsViewVueWidget/JsvScrollBox/index.d.ts +1 -0
- package/bin/types/JsViewVueWidget/JsvTextBox.vue.d.ts +3 -3
- package/bin/types/JsViewVueWidget/index.d.ts +1 -0
- package/package.json +1 -1
- package/utils/JsViewEngineWidget/MetroWidget/MetroWidget.vue +10 -1
- package/utils/JsViewEngineWidget/MetroWidget/MetroWidgetSetup.js +398 -309
- package/utils/JsViewEngineWidget/MetroWidget/RenderItem.ts +2 -1
- package/utils/JsViewEngineWidget/MetroWidget/Slide.ts +56 -0
- package/utils/JsViewEngineWidget/MetroWidget/TaskManager.ts +51 -10
- package/utils/JsViewEngineWidget/MetroWidget/TokenGenerator.ts +10 -0
- package/utils/JsViewEngineWidget/TemplateParser/ListMetroTemplate.ts +9 -3
- package/utils/JsViewEngineWidget/TemplateParser/MetroTemplate.ts +25 -35
- package/utils/JsViewEngineWidget/WidgetCommon.ts +20 -7
- package/utils/JsViewPlugin/JsvPlayer/BrowserJsvPlayer.vue +13 -1
- package/utils/JsViewPlugin/JsvPlayer/JsvPlayer.vue +470 -338
- package/utils/JsViewVueTools/ConstSymbol.ts +3 -0
- package/utils/JsViewVueTools/ForgeConstDefine.ts +11 -0
- package/utils/JsViewVueTools/JsvRuntimeBridge.js +172 -50
- package/utils/JsViewVueTools/JsvTextureStore/CapturedTexture/CapturedTexture.ts +62 -0
- package/utils/JsViewVueTools/JsvTextureStore/JsvTextureStore.ts +41 -7
- package/utils/JsViewVueTools/JsvTextureStore/Texture.ts +15 -1
- package/utils/JsViewVueTools/index.js +2 -0
- package/utils/JsViewVueWidget/JsvApic/JsvApic/BrowserApic.vue +6 -6
- package/utils/JsViewVueWidget/JsvApic/JsvApic2/BrowserApic2.vue +5 -6
- package/utils/JsViewVueWidget/JsvApic/JsvBrowserApicLib/ApicDataBase.js +5 -1
- package/utils/JsViewVueWidget/JsvFreeMoveActor/ActionRefObject.ts +1 -1
- package/utils/JsViewVueWidget/JsvFreeMoveActor/ActorControl.ts +23 -1
- package/utils/JsViewVueWidget/JsvFreeMoveActor/ActorState.ts +4 -4
- package/utils/JsViewVueWidget/JsvFreeMoveActor/CallbackManager.ts +6 -6
- package/utils/JsViewVueWidget/JsvFreeMoveActor/ForgeTypeDefine.ts +1 -1
- package/utils/JsViewVueWidget/JsvFreeMoveActor/FreeMoveActor.vue +43 -9
- package/utils/JsViewVueWidget/JsvFreeMoveActor/SetAction.ts +24 -0
- package/utils/JsViewVueWidget/JsvFreeMoveActor/SetCondition.ts +50 -1
- package/utils/JsViewVueWidget/JsvFreeMoveActor/SetState.ts +56 -0
- package/utils/JsViewVueWidget/JsvFreeMoveActor/index.js +3 -0
- package/utils/JsViewVueWidget/JsvMaskClipDiv.vue +6 -1
- package/utils/JsViewVueWidget/JsvNativeSharedDiv.vue +121 -68
- package/utils/JsViewVueWidget/JsvNinePatch.vue +4 -1
- package/utils/JsViewVueWidget/JsvPosterImage.vue +22 -9
- package/utils/JsViewVueWidget/JsvQrcode/BrowserQrcode.vue +6 -2
- package/utils/JsViewVueWidget/JsvScrollBox/JsvScrollBox.vue +309 -0
- package/utils/JsViewVueWidget/JsvScrollBox/ScrollSymbol.ts +15 -0
- package/utils/JsViewVueWidget/JsvScrollBox/index.js +2 -0
- package/utils/JsViewVueWidget/JsvTextBox.vue +12 -4
- package/utils/JsViewVueWidget/JsvTextureAnim/BrowserTextureAnim.vue +9 -6
- package/utils/JsViewVueWidget/JsvTextureAnim/JsvTextureAnim.vue +2 -0
- package/utils/JsViewVueWidget/index.js +1 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export interface TargetRectInfo {
|
|
2
|
+
left: number;
|
|
3
|
+
top: number;
|
|
4
|
+
width: number;
|
|
5
|
+
height: number;
|
|
6
|
+
frameCount: number;
|
|
7
|
+
}
|
|
8
|
+
export declare class RectCache {
|
|
9
|
+
private preRect;
|
|
10
|
+
private curRect;
|
|
11
|
+
cache(rect: TargetRectInfo): void;
|
|
12
|
+
cacheManually(): void;
|
|
13
|
+
getCurRect(): TargetRectInfo | null;
|
|
14
|
+
getPreRect(): TargetRectInfo | null;
|
|
15
|
+
updatePre(key: "left" | "top" | "width" | "height", value: number): void;
|
|
16
|
+
clean(): void;
|
|
17
|
+
}
|
|
18
|
+
export declare const getDirectionByRect: (curRect: TargetRectInfo, preRect: TargetRectInfo) => {
|
|
19
|
+
horizontal: number;
|
|
20
|
+
vertical: number;
|
|
21
|
+
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { RectCache } from "../MetroWidget/Slide";
|
|
1
2
|
interface NeighborInfo {
|
|
2
3
|
left: Array<number>;
|
|
3
4
|
top: Array<number>;
|
|
@@ -33,12 +34,7 @@ interface TemplateItem {
|
|
|
33
34
|
bottom: number;
|
|
34
35
|
};
|
|
35
36
|
findNextAnchor: FindNextAnchor | null;
|
|
36
|
-
layoutCache:
|
|
37
|
-
top: number;
|
|
38
|
-
left: number;
|
|
39
|
-
width: number;
|
|
40
|
-
height: number;
|
|
41
|
-
} | null;
|
|
37
|
+
layoutCache: RectCache;
|
|
42
38
|
uid?: string;
|
|
43
39
|
}
|
|
44
40
|
interface MeasureInfo {
|
|
@@ -89,8 +85,6 @@ declare abstract class MetroTemplate {
|
|
|
89
85
|
height: number;
|
|
90
86
|
};
|
|
91
87
|
getTailItemIndex(): number;
|
|
92
|
-
cacheLayout(start: number, end: number): void;
|
|
93
|
-
cleanLayoutCache(): void;
|
|
94
88
|
protected static getTemplateItem(itemObj: MeasureInfo): TemplateItem;
|
|
95
89
|
private static checkMeasureObject;
|
|
96
90
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export declare const getCurFrameCount: () => any;
|
|
1
2
|
export declare class BaseDispatcher {
|
|
2
3
|
private _Component;
|
|
3
4
|
constructor();
|
|
@@ -31,8 +32,7 @@ export declare const SlideStyle: {
|
|
|
31
32
|
startBoundaryProtect: number;
|
|
32
33
|
endBoundaryProtect: number;
|
|
33
34
|
};
|
|
34
|
-
export
|
|
35
|
-
export declare const HORIZONTAL: unique symbol;
|
|
35
|
+
export { VERTICAL, HORIZONTAL } from "../JsViewVueTools/ConstSymbol";
|
|
36
36
|
export declare class SlideSetting {
|
|
37
37
|
static Type: {
|
|
38
38
|
WHOLE_PAGE: number;
|
|
@@ -79,6 +79,8 @@ export declare class WholePageSlide extends SlideSetting {
|
|
|
79
79
|
* endPercennt: 右/下侧触发滚动的比例 0-1
|
|
80
80
|
* headRange: 左/上按键触发滚动的区域比例 0-1
|
|
81
81
|
* tailRange: 右/下按键触发滚动的区域比例 0-1
|
|
82
|
+
* headSafeArea: 保证头部item完整显示的安全区域大小
|
|
83
|
+
* tailSafeArea: 保证尾部item完整显示的安全区域大小
|
|
82
84
|
* speed: 滚动速度, 像素/毫秒
|
|
83
85
|
* easing: 滚动动画的easing
|
|
84
86
|
* boundaryProtect: 确定滚动位置能否小于0或者大于最大长度
|
|
@@ -89,11 +91,15 @@ export declare class SeamlessSlide extends SlideSetting {
|
|
|
89
91
|
readonly StartPercent: number;
|
|
90
92
|
readonly EndPercent: number;
|
|
91
93
|
readonly FixFirstPage: boolean;
|
|
92
|
-
|
|
94
|
+
readonly HeadSafeArea: number;
|
|
95
|
+
readonly TailSafeArea: number;
|
|
96
|
+
constructor({ startPercent, endPercent, headRange, tailRange, headSafeArea, tailSafeArea, speed, duration, easing, fixFirstPage, boundaryProtect, }?: {
|
|
93
97
|
startPercent?: number | undefined;
|
|
94
98
|
endPercent?: number | undefined;
|
|
95
99
|
headRange?: undefined;
|
|
96
100
|
tailRange?: undefined;
|
|
101
|
+
headSafeArea?: number | undefined;
|
|
102
|
+
tailSafeArea?: number | undefined;
|
|
97
103
|
speed?: number | undefined;
|
|
98
104
|
duration?: null | undefined;
|
|
99
105
|
easing?: string | undefined;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare namespace ForgeConst {
|
|
2
|
+
namespace DragFlags {
|
|
3
|
+
const TOUCH_RECV_CLICK_BIT: number;
|
|
4
|
+
const TOUCH_RECV_LONGPRESS_BIT: number;
|
|
5
|
+
const TOUCH_RECV_MOVE_BIT: number;
|
|
6
|
+
const TOUCH_RECV_FLING_BIT: number;
|
|
7
|
+
const TOUCH_RECV_FIRST_START: number;
|
|
8
|
+
const TOUCH_RECV_LAST_END: number;
|
|
9
|
+
const DRAG_ANY: number;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -1,16 +1,21 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { bridge as jJsvRuntimeBridge };
|
|
2
|
+
declare namespace bridge {
|
|
2
3
|
export { getMac };
|
|
3
4
|
export { getWireMac };
|
|
4
5
|
export { getWifiMac };
|
|
5
6
|
export { getDeviceUUID };
|
|
6
7
|
export { getAndroidId };
|
|
7
8
|
export { openWindow };
|
|
9
|
+
export { startUrlInNewTab };
|
|
10
|
+
export { onWindowResult };
|
|
11
|
+
export { reloadWindow };
|
|
8
12
|
export { closePage };
|
|
9
13
|
export { getStartParams };
|
|
10
14
|
export { getSystemProperty };
|
|
11
15
|
export { getInstalledApps };
|
|
12
16
|
export { startNativeApp };
|
|
13
17
|
export { sendNativeBroadcast };
|
|
18
|
+
export { startService };
|
|
14
19
|
export { getDeviceInfo };
|
|
15
20
|
export { getAppInfo };
|
|
16
21
|
export { notifyPageLoadDone };
|
|
@@ -29,145 +34,194 @@ export namespace jJsvRuntimeBridge {
|
|
|
29
34
|
export { warmLoadView };
|
|
30
35
|
export { closeWarmedView };
|
|
31
36
|
export { preDownloadSdk };
|
|
37
|
+
export { getNetworkTypeStatusImmediate };
|
|
38
|
+
export { registerNetStateListener };
|
|
39
|
+
export { unRegisterNetStateListener };
|
|
32
40
|
}
|
|
33
|
-
|
|
41
|
+
/**
|
|
34
42
|
* 获取设备mac地址,优先获取有线mac,无则获取wifi mac
|
|
35
43
|
* @returns {string} mac address
|
|
36
44
|
*
|
|
37
45
|
*/
|
|
38
|
-
declare function getMac():
|
|
39
|
-
|
|
46
|
+
declare function getMac(): string;
|
|
47
|
+
/**
|
|
40
48
|
* 获取设备有线mac地址
|
|
41
49
|
* @returns {string} mac address
|
|
42
50
|
*
|
|
43
51
|
*/
|
|
44
|
-
declare function getWireMac():
|
|
45
|
-
|
|
52
|
+
declare function getWireMac(): string;
|
|
53
|
+
/**
|
|
46
54
|
* 获取设备wifi mac地址
|
|
47
55
|
* @returns {string} mac address
|
|
48
56
|
*
|
|
49
57
|
*/
|
|
50
|
-
declare function getWifiMac():
|
|
51
|
-
|
|
58
|
+
declare function getWifiMac(): string;
|
|
59
|
+
/**
|
|
52
60
|
* 获取设备UUID
|
|
53
61
|
* @returns {string} UUID
|
|
54
62
|
*
|
|
55
63
|
*/
|
|
56
|
-
declare function getDeviceUUID():
|
|
57
|
-
|
|
64
|
+
declare function getDeviceUUID(): string;
|
|
65
|
+
/**
|
|
58
66
|
* 获取设备Android ID
|
|
59
67
|
* @returns {string} Android ID
|
|
60
68
|
*
|
|
61
69
|
*/
|
|
62
|
-
declare function getAndroidId():
|
|
63
|
-
|
|
70
|
+
declare function getAndroidId(): string;
|
|
71
|
+
/**
|
|
64
72
|
* 打开另外一个小程序
|
|
65
73
|
* @param {string} url 小程序url
|
|
66
74
|
* @param {string} startup_image 启动图url
|
|
67
75
|
* @param {string} startup_video 启动视频url
|
|
68
76
|
* @param {int} startup_duration 启动图时长,默认0
|
|
69
77
|
* @param {int} add_history 是否添加历史,0不添加,1添加
|
|
70
|
-
*
|
|
78
|
+
* @returns {Promise} 可用于监听新的小程序返回的结果
|
|
79
|
+
*/
|
|
80
|
+
declare function openWindow(url: string, startup_image: string, startup_video: string, startup_duration: int, add_history: int): Promise<any>;
|
|
81
|
+
/**
|
|
82
|
+
* 用新的进程打开另外一个小程序
|
|
83
|
+
* @param {string} url 小程序url
|
|
84
|
+
* @param {string} startup_image 启动图url
|
|
85
|
+
* @param {string} startup_video 启动视频url
|
|
86
|
+
* @param {int} startup_duration 启动图时长,默认0
|
|
87
|
+
* @param {int} add_history 是否添加历史,0不添加,1添加
|
|
88
|
+
* @returns {Promise} 可用于监听新的小程序返回的结果
|
|
89
|
+
*/
|
|
90
|
+
declare function startUrlInNewTab(url: string, startup_image: string, startup_video: string, startup_duration: int, add_history: int): Promise<any>;
|
|
91
|
+
/**
|
|
92
|
+
* 用于给上一个小程序返回结果,通常与startUrlInNewTab和openWindow配合使用
|
|
93
|
+
* @param {string} data 返回给上一个小程序的结果
|
|
71
94
|
*/
|
|
72
|
-
declare function
|
|
73
|
-
|
|
95
|
+
declare function onWindowResult(data: string): void;
|
|
96
|
+
/**
|
|
97
|
+
* 重新加载一个小程序覆盖当前小程序
|
|
98
|
+
* @param {string} url 小程序url
|
|
99
|
+
* @param {string} startup_image 启动图url
|
|
100
|
+
* @param {string} startup_video 启动视频url
|
|
101
|
+
* @param {int} startup_duration 启动图时长,默认0
|
|
102
|
+
* @param {int} add_history 是否添加历史,0不添加,1添加
|
|
103
|
+
*/
|
|
104
|
+
declare function reloadWindow(url: string, startup_image: string, startup_video: string, startup_duration: int, add_history: int): any;
|
|
105
|
+
/**
|
|
74
106
|
* 关闭当前小程序
|
|
75
107
|
*
|
|
76
108
|
*/
|
|
77
109
|
declare function closePage(): void;
|
|
78
|
-
|
|
110
|
+
/**
|
|
79
111
|
* 获取启动内核版本和引擎
|
|
80
112
|
* @returns {Object} 包含
|
|
81
113
|
* COREVERSIONRANGE: 启动时设定的内核版本范围
|
|
82
114
|
* ENGINE: 启动时设定的Js引擎的URL
|
|
83
115
|
*/
|
|
84
|
-
declare function getStartParams():
|
|
85
|
-
|
|
86
|
-
*
|
|
87
|
-
* @param {string} key
|
|
116
|
+
declare function getStartParams(): Object;
|
|
117
|
+
/**
|
|
118
|
+
* 获取系统属性
|
|
119
|
+
* @param {string} key 属性名称,比如:ro.product.model。
|
|
88
120
|
* @returns {string} 属性值
|
|
89
121
|
*
|
|
90
122
|
*/
|
|
91
|
-
declare function getSystemProperty(key:
|
|
92
|
-
|
|
123
|
+
declare function getSystemProperty(key: string): string;
|
|
124
|
+
/**
|
|
93
125
|
* 获取已安装应用列表
|
|
94
126
|
* @returns {string} 应用列表,JSON结构的数组
|
|
95
127
|
*
|
|
96
128
|
*/
|
|
97
|
-
declare function getInstalledApps():
|
|
98
|
-
|
|
129
|
+
declare function getInstalledApps(): string;
|
|
130
|
+
/**
|
|
99
131
|
* 启动安卓APP
|
|
100
132
|
* @param {string} package_name 包名
|
|
101
133
|
* @param {string} activity Activity方式启动
|
|
102
134
|
* @param {string} action Action方式启动
|
|
103
135
|
* @param {string} uri Uri方式启动
|
|
104
136
|
* @param {Array} flags 数组,用于intent.addFlags
|
|
105
|
-
* @param {Array} param JSON
|
|
137
|
+
* @param {Array} param JSON格式数组,数组元素是 object ,object中的内容用于intent.putExtra
|
|
138
|
+
*
|
|
139
|
+
*/
|
|
140
|
+
declare function startNativeApp(package_name: string, activity: string, action: string, uri: string, flags: any[], param: any[]): void;
|
|
141
|
+
/**
|
|
142
|
+
* 发送安卓广播
|
|
143
|
+
* @param {string} package_name 包名
|
|
144
|
+
* @param {string} broadcast 广播类名,比如“com.qcode.MyBroadcastReceiver”,用于intent.setComponent()
|
|
145
|
+
* @param {string} action 对应 intent.setAction()
|
|
146
|
+
* @param {string} uri 对应intent.setData()
|
|
147
|
+
* @param {Array} flags 数组,用于intent.addFlags
|
|
148
|
+
* @param {Array} param JSON格式数组,数组元素是 object ,object中的内容用于intent.putExtra
|
|
149
|
+
*
|
|
150
|
+
*/
|
|
151
|
+
declare function sendNativeBroadcast(package_name: string, broadcast: string, action: string, uri: string, flags: any[], param: any[]): void;
|
|
152
|
+
/**
|
|
153
|
+
* 启动Android 服务
|
|
154
|
+
* @param {string} package_name 包名
|
|
155
|
+
* @param {string} services 服务类名,比如“com.qcode.MyService”,用于intent.setComponent()
|
|
156
|
+
* @param {string} action 对应 intent.setAction()
|
|
157
|
+
* @param {string} uri 对应intent.setData()
|
|
158
|
+
* @param {Array} flags 数组,用于intent.addFlags
|
|
159
|
+
* @param {Array} param JSON格式数组,数组元素是 object ,object中的内容用于intent.putExtra
|
|
160
|
+
* @param {boolean} is_foreground 是否使用startForegroundService
|
|
106
161
|
*
|
|
107
162
|
*/
|
|
108
|
-
declare function
|
|
109
|
-
|
|
110
|
-
/*
|
|
163
|
+
declare function startService(package_name: string, services: string, action: string, uri: string, flags: any[], param: any[], is_foreground: boolean): void;
|
|
164
|
+
/**
|
|
111
165
|
* 获取设备信息
|
|
112
166
|
* @returns {string} 终端设备信息,JSON数据结构
|
|
113
167
|
*
|
|
114
168
|
*/
|
|
115
|
-
declare function getDeviceInfo():
|
|
116
|
-
|
|
169
|
+
declare function getDeviceInfo(): string;
|
|
170
|
+
/**
|
|
117
171
|
* 获取自己的app信息
|
|
118
172
|
* @returns
|
|
119
173
|
*/
|
|
120
174
|
declare function getAppInfo(): any;
|
|
121
|
-
|
|
175
|
+
/**
|
|
122
176
|
* 页面加载成功后调用去除启动图
|
|
123
177
|
*
|
|
124
178
|
*/
|
|
125
179
|
declare function notifyPageLoadDone(): void;
|
|
126
180
|
declare function notifyPageLoaded(): void;
|
|
127
|
-
|
|
181
|
+
/**
|
|
128
182
|
* 是否支持收藏功能
|
|
129
183
|
* @returns {boolean} true支持,false不支持
|
|
130
184
|
*
|
|
131
185
|
*/
|
|
132
186
|
declare function hasFavouriteFunction(): boolean;
|
|
133
|
-
|
|
187
|
+
/**
|
|
134
188
|
* 添加收藏
|
|
135
189
|
* @param {string} url 收藏的url
|
|
136
190
|
* @param {function} callback 执行接口回调, 处理可能被用户否决
|
|
137
191
|
*
|
|
138
192
|
*/
|
|
139
|
-
declare function addFavourite(url:
|
|
140
|
-
|
|
193
|
+
declare function addFavourite(url: string, callback: Function): void;
|
|
194
|
+
/**
|
|
141
195
|
* 更新收藏
|
|
142
196
|
* @param {string} url 收藏的url
|
|
143
197
|
* @param {function} callback 执行接口回调, 处理可能被用户否决
|
|
144
198
|
*
|
|
145
199
|
*/
|
|
146
|
-
declare function updateFavourite(url:
|
|
147
|
-
|
|
200
|
+
declare function updateFavourite(url: string, callback: Function): void;
|
|
201
|
+
/**
|
|
148
202
|
* 删除指定收藏
|
|
149
203
|
* @param {string} app_name app name 唯一标识
|
|
150
204
|
* @param {function} callback 执行接口回调, 处理可能被用户否决
|
|
151
205
|
*
|
|
152
206
|
*/
|
|
153
|
-
declare function removeFavourite(app_name:
|
|
154
|
-
|
|
207
|
+
declare function removeFavourite(app_name: string, callback: Function): void;
|
|
208
|
+
/**
|
|
155
209
|
* 获取指定收藏
|
|
156
210
|
* @param {string} app_name app name 唯一标识
|
|
157
211
|
*/
|
|
158
|
-
declare function getFavourite(app_name:
|
|
159
|
-
|
|
212
|
+
declare function getFavourite(app_name: string): any;
|
|
213
|
+
/**
|
|
160
214
|
* 获取所有收藏
|
|
161
215
|
*
|
|
162
216
|
*/
|
|
163
217
|
declare function getFavouriteAll(): any;
|
|
164
|
-
|
|
218
|
+
/**
|
|
165
219
|
* 浮窗控制接口,设置从本浮窗界面进行预热的二级浮窗的启动默认尺寸(若不设置则为全屏)
|
|
166
220
|
* @param {string} mode 全屏模式还是需要Resize的模式。取值范围: "full" 或者 "mini"
|
|
167
221
|
* 设置成 "mini" 模式后,启动后的界面内需要调用popupResizePosition来调整尺寸才能可见
|
|
168
222
|
*/
|
|
169
|
-
declare function setPopupInitSize(mode:
|
|
170
|
-
|
|
223
|
+
declare function setPopupInitSize(mode: string): void;
|
|
224
|
+
/**
|
|
171
225
|
* 浮窗控制接口,设置浮窗显示区域,以相对定位的方式调整弹出框的位置(弹出框弹出后先以尺寸1x1的方式展现)
|
|
172
226
|
* @param {string} align 横纵对齐方式,有left, right, bottom, top, center可选择
|
|
173
227
|
* 例如: 右下角"right bottom", 居中"center center"
|
|
@@ -176,13 +230,13 @@ declare function setPopupInitSize(mode: any): void;
|
|
|
176
230
|
* @param {number} aspect 横纵比设定
|
|
177
231
|
* 显示区域根据 max_width, max_height, aspect 来计算出同时满足3个条件的最大区域
|
|
178
232
|
*/
|
|
179
|
-
declare function popupResizePosition(align:
|
|
180
|
-
|
|
233
|
+
declare function popupResizePosition(align: string, max_width: number, max_height: number, aspect: number): void;
|
|
234
|
+
/**
|
|
181
235
|
* 浮窗系统认为自己准备好后,调用此接口,获取设备的焦点。若不调用的话,默认浮窗系统捕获的焦点
|
|
182
236
|
*/
|
|
183
237
|
declare function popupGainFocus(): void;
|
|
184
238
|
declare function popupDiscardFocus(): void;
|
|
185
|
-
|
|
239
|
+
/**
|
|
186
240
|
* 页面预热接口,预热页面将会将以一个新的FrameLayout(内含JsView)的方式加载一个新的应用
|
|
187
241
|
* 但这个应用在warmLoadView之前,不会创建texture/surface的实际描画资源,也不会加载图片
|
|
188
242
|
* 仅加载所有JS代码,并正常走完所有启动逻辑(包括描画逻辑),但不会走setTimeout对应的延时逻辑,也不会显示
|
|
@@ -192,32 +246,34 @@ declare function popupDiscardFocus(): void;
|
|
|
192
246
|
* 【特别注意】warmUp起来的view,在warmLoadView调用之前,若启动者JsView关闭的话,此View应该在
|
|
193
247
|
* View管理模块被清理掉,以防泄露,但在warmLoadView完成后,就不需要进行关联清理,请管理模块务必保证此机制。
|
|
194
248
|
* [参数]
|
|
195
|
-
* int mode 预热模式,1
|
|
249
|
+
* int mode 预热模式,1:全预热,目前只支持1
|
|
196
250
|
* String app_url 要预热的app_url,当半预热时,可以为null
|
|
197
251
|
* [返回值]
|
|
198
252
|
* int: 为view_refer_id值,预热后的View的ID,用于后续的warmLoadView和closeWarmView使用
|
|
199
253
|
*/
|
|
200
254
|
declare function warmUpView(mode: any, app_url: any): any;
|
|
201
|
-
|
|
255
|
+
/**
|
|
202
256
|
* 将warmUpView后的View展示出来
|
|
203
|
-
* 若warmUpView中app_url不为null,进行了全预热,则本调用的app_url可以为null
|
|
204
257
|
* 当warmUpView中设置了app_url时,仍可以新的app_url调整history hash(#)部分进行子页面切换
|
|
205
258
|
*
|
|
206
259
|
* @param {number} view_refer_id warmUpView调用后返回来的View ID
|
|
207
|
-
* @param {string} app_url
|
|
260
|
+
* @param {string} app_url 无意义,请传固定值 null
|
|
208
261
|
* @param {boolean} add_history 启动的界面是否进访问历史列表
|
|
262
|
+
* @returns {Promise} 可用于监听新的小程序返回的结果
|
|
209
263
|
*/
|
|
210
|
-
declare function warmLoadView(view_refer_id:
|
|
211
|
-
|
|
264
|
+
declare function warmLoadView(view_refer_id: number, app_url: string, add_history: boolean): Promise<any>;
|
|
265
|
+
/**
|
|
212
266
|
* 关闭warmUp后未进行warmLoad的View,释放资源
|
|
213
267
|
* @param {number} view_refer_id warmUpView调用后返回来的View ID
|
|
214
268
|
*/
|
|
215
|
-
declare function closeWarmedView(view_refer_id:
|
|
216
|
-
|
|
269
|
+
declare function closeWarmedView(view_refer_id: number): void;
|
|
270
|
+
/**
|
|
217
271
|
* 触发预下载内核
|
|
218
272
|
* @param {string} core_version 带branch(主分支版本不带此信息)和版本信息的内核版本,
|
|
219
273
|
* 例如: 1021265_release_build_xxx
|
|
220
274
|
* @returns promise 对象,用于监听下载完成与下载失败
|
|
221
275
|
*/
|
|
222
|
-
declare function preDownloadSdk(core_version:
|
|
223
|
-
|
|
276
|
+
declare function preDownloadSdk(core_version: string): any;
|
|
277
|
+
declare function getNetworkTypeStatusImmediate(): any;
|
|
278
|
+
declare function registerNetStateListener(callback: any): any;
|
|
279
|
+
declare function unRegisterNetStateListener(callback: any): any;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { TextureBase } from "../Texture";
|
|
2
|
+
export type CapturedCallback = (textureAccessName: string, autoRecycleSet: boolean, width: number, height: number) => void;
|
|
3
|
+
export declare class CapturedTexture extends TextureBase {
|
|
4
|
+
private _AutoRecycle;
|
|
5
|
+
private _Callback;
|
|
6
|
+
private _CaptureDiv;
|
|
7
|
+
private _Canceled;
|
|
8
|
+
constructor(captureDiv: any, callback: CapturedCallback, autoRecycle: boolean);
|
|
9
|
+
cancel(): void;
|
|
10
|
+
commit(): String;
|
|
11
|
+
}
|
|
@@ -4,6 +4,7 @@ export declare class TextureBase {
|
|
|
4
4
|
storeName: String;
|
|
5
5
|
constructor(baseName: String | null);
|
|
6
6
|
protected addToStore(): void;
|
|
7
|
+
protected getStoreName(): string;
|
|
7
8
|
/**
|
|
8
9
|
* commit
|
|
9
10
|
* 完成绘制设置,出发制作目标texture
|
|
@@ -11,5 +12,12 @@ export declare class TextureBase {
|
|
|
11
12
|
* @return {String} BaseName-textureId 格式的名字,用于 jsvtexturestore:// 的访问链接
|
|
12
13
|
*/
|
|
13
14
|
commit(): String;
|
|
15
|
+
/**
|
|
16
|
+
* getTextureRef
|
|
17
|
+
* 内部接口,获取内联的Forge.ImageTexture的句柄
|
|
18
|
+
*
|
|
19
|
+
* @return {String} BaseName-textureId 格式的名字,用于 jsvtexturestore:// 的访问链接
|
|
20
|
+
*/
|
|
21
|
+
getTextureRef(): any;
|
|
14
22
|
recycle(): void;
|
|
15
23
|
}
|
|
@@ -5,9 +5,9 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
5
5
|
readonly backgroundColor?: string | undefined;
|
|
6
6
|
readonly percent?: number | undefined;
|
|
7
7
|
readonly radius?: number | undefined;
|
|
8
|
+
readonly lineWidth?: number | undefined;
|
|
8
9
|
readonly startPos?: Record<string, any> | undefined;
|
|
9
10
|
readonly endPos?: Record<string, any> | undefined;
|
|
10
|
-
readonly lineWidth?: number | undefined;
|
|
11
11
|
};
|
|
12
12
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
13
13
|
export default _default;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import ConditionPackBuilder from "./SetCondition";
|
|
2
|
+
import ActionPackBuilder from "./SetAction";
|
|
3
|
+
import StatePackBuilder from "./SetState";
|
|
4
|
+
import { NexusNode } from "./NexusNode";
|
|
5
|
+
declare class ActorControl {
|
|
6
|
+
private _BindView;
|
|
7
|
+
private _BindAnim;
|
|
8
|
+
private _Callbacks;
|
|
9
|
+
private _SelfNexusRecv;
|
|
10
|
+
private _SizeMode;
|
|
11
|
+
private _SharedQuickConditionPackBuilder;
|
|
12
|
+
private _SharedQuickActionPackBuilder;
|
|
13
|
+
private _StatePackBuilder;
|
|
14
|
+
constructor();
|
|
15
|
+
asSizeMode(): void;
|
|
16
|
+
bindForgeView(bindView: any, instantActive: boolean): void;
|
|
17
|
+
/**
|
|
18
|
+
* run 执行编排好的intent集合
|
|
19
|
+
*
|
|
20
|
+
* @param {Array} cmdPackList 内容来自 Condition(), State(), Action() 这些工厂类创建的Command pack
|
|
21
|
+
*/
|
|
22
|
+
run(cmdPackList: Array<Object>): void;
|
|
23
|
+
_WrappedRun(cmdPackList: Array<Object>): void;
|
|
24
|
+
/**
|
|
25
|
+
* Condition
|
|
26
|
+
* 获取创建 ConditionPack 的工厂对象
|
|
27
|
+
* ConditionPack对应支持 .then(cmdPackList), 可传入同 Run 的处理队列
|
|
28
|
+
* 可用方法见 ./SetCondition.js
|
|
29
|
+
* @param {int} group 可选参数,默认为0, 有效值为0~3, 对应默认组, 1组, 2组, 3组, 便于remove时,按组进行清理
|
|
30
|
+
* @param {boolean} multiTimes 可选参数,默认为false, 是否要多次执行, 若为单次,则执行后condition作废
|
|
31
|
+
* @param {string} specName 可选参数,默认null, 命名condition, 用于指定名字进行active/deactive动作的场景
|
|
32
|
+
* @param {boolean} shoudRenderBreak 可选参数,默认false, 关联的回调是否会发起RenderBreak
|
|
33
|
+
* @return {ConditionPackBuilder} ConditionPack 的工厂对象
|
|
34
|
+
*/
|
|
35
|
+
condition(group?: number, multiTimes?: boolean, specName?: string | null, shoudRenderBreak?: boolean): ConditionPackBuilder;
|
|
36
|
+
/**
|
|
37
|
+
* Action
|
|
38
|
+
* 获取创建 ActionPack 的工厂对象
|
|
39
|
+
* 注意: ActionPack 是指会改变 speed 或 accelerate 并自动生成子condition的指令,
|
|
40
|
+
* 每个新的Action会覆盖掉前一次的Action设置,包括其关联的condition,
|
|
41
|
+
* 以及上一个action中的回调,以及上一个action中规划中的ActionEvent
|
|
42
|
+
* 可用方法见 ./SetAction.js
|
|
43
|
+
*
|
|
44
|
+
* @param {int} xySpeedKeeps xy轴上的速度是否保持(与新Action不冲突的才会被保留),
|
|
45
|
+
* x轴保持为1, y轴保持为2,可"与或"让两个轴都保持
|
|
46
|
+
* @param {int} xyAccKeeps xy轴上的加速度是否保持(与新Action不冲突的才会被保留),
|
|
47
|
+
* x轴保持为1, y轴保持为2,可"与或"让两个轴都保持
|
|
48
|
+
* @param {NexusNode} nexusRecv 此动作发出的 nexusEvent 的接受者
|
|
49
|
+
* @return {ActionPackBuilder} ActionPack 的工厂对象
|
|
50
|
+
*/
|
|
51
|
+
action(xySpeedKeeps?: number, xyAccKeeps?: number, nexusRecv?: NexusNode | null): ActionPackBuilder;
|
|
52
|
+
/**
|
|
53
|
+
* State
|
|
54
|
+
* 获取创建 StatePack 的工厂对象
|
|
55
|
+
* 在下一帧运行前的设置值,例如清理condition, 或者在下一帧运动的前调整启动运动的位置
|
|
56
|
+
* 可用方法见 ./SetState.js
|
|
57
|
+
* @return {StatePackBuilder} StatePack 的工厂对象
|
|
58
|
+
*/
|
|
59
|
+
state(): StatePackBuilder;
|
|
60
|
+
getBindedAnim(): any;
|
|
61
|
+
getBindedView(): any;
|
|
62
|
+
_OnEchoEvent(retJson: string): void;
|
|
63
|
+
_EnsureAnim(): void;
|
|
64
|
+
}
|
|
65
|
+
export default ActorControl;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
declare class CallbackManager {
|
|
2
|
+
private _CallbackMap;
|
|
3
|
+
private _IdGen;
|
|
4
|
+
constructor();
|
|
5
|
+
private addCallback;
|
|
6
|
+
clearCallback(): void;
|
|
7
|
+
expiredIds(ids: Array<string>): void;
|
|
8
|
+
invokeCallback(id: string, actorState: Object, customDataStr: string | null | undefined, nexusCustomDataStr: string | null | undefined): void;
|
|
9
|
+
buildCallbackCmd(func: Function): Object;
|
|
10
|
+
}
|
|
11
|
+
export default CallbackManager;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
declare const ActEventDefine: {
|
|
2
|
+
ActFinish: any;
|
|
3
|
+
SpeedRevertX: any;
|
|
4
|
+
SpeedRevertY: any;
|
|
5
|
+
ActReject: any;
|
|
6
|
+
};
|
|
7
|
+
declare const GroupType_ActionAssoc: number;
|
|
8
|
+
declare const ConditionSetBuilder: any;
|
|
9
|
+
declare const StateCmdBuilder: any;
|
|
10
|
+
declare const ActionCmdBuilder: any;
|
|
11
|
+
declare const CmdPackBuilder: any;
|
|
12
|
+
declare const FreeMoveAnimClass: any;
|
|
13
|
+
declare const RunFreeMoveCmdPacks: Function;
|
|
14
|
+
declare const FinishRenderBreak: Function;
|
|
15
|
+
export { GroupType_ActionAssoc, ActEventDefine, ConditionSetBuilder, ActionCmdBuilder, StateCmdBuilder, CmdPackBuilder, FreeMoveAnimClass, RunFreeMoveCmdPacks, FinishRenderBreak };
|
|
@@ -23,6 +23,8 @@ declare const _default: {
|
|
|
23
23
|
readonly width?: number | undefined;
|
|
24
24
|
readonly left?: number | undefined;
|
|
25
25
|
readonly top?: number | undefined;
|
|
26
|
+
readonly style?: Record<string, any> | undefined;
|
|
27
|
+
readonly sizeMode?: boolean | undefined;
|
|
26
28
|
};
|
|
27
29
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}, {}, string> & {
|
|
28
30
|
beforeCreate?: ((() => void) | (() => void)[]) | undefined;
|
|
@@ -51,6 +53,8 @@ declare const _default: {
|
|
|
51
53
|
readonly width?: number | undefined;
|
|
52
54
|
readonly left?: number | undefined;
|
|
53
55
|
readonly top?: number | undefined;
|
|
56
|
+
readonly style?: Record<string, any> | undefined;
|
|
57
|
+
readonly sizeMode?: boolean | undefined;
|
|
54
58
|
};
|
|
55
59
|
}> & {} & import("vue").ComponentCustomProperties & {};
|
|
56
60
|
__isFragment?: undefined;
|
|
@@ -63,6 +67,8 @@ declare const _default: {
|
|
|
63
67
|
readonly width?: number | undefined;
|
|
64
68
|
readonly left?: number | undefined;
|
|
65
69
|
readonly top?: number | undefined;
|
|
70
|
+
readonly style?: Record<string, any> | undefined;
|
|
71
|
+
readonly sizeMode?: boolean | undefined;
|
|
66
72
|
};
|
|
67
73
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}, {}, string> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
68
74
|
$slots: {
|