@rsmax/toutiao 1.3.7 → 1.3.9
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/CHANGELOG.md +25 -0
- package/cjs/api/index.d.ts +1981 -1047
- package/cjs/api/index.js +313 -90
- package/cjs/hostComponents/Ad/index.d.ts +12 -0
- package/cjs/hostComponents/Ad/index.js +8 -0
- package/cjs/hostComponents/Ad/node.d.ts +10 -0
- package/cjs/hostComponents/Ad/node.js +13 -0
- package/cjs/hostComponents/Camera/index.d.ts +19 -0
- package/cjs/hostComponents/Camera/index.js +5 -0
- package/cjs/hostComponents/Camera/node.d.ts +17 -0
- package/cjs/hostComponents/Camera/node.js +20 -0
- package/cjs/hostComponents/LivePlayer/index.d.ts +28 -0
- package/cjs/hostComponents/LivePlayer/index.js +5 -0
- package/cjs/hostComponents/LivePlayer/node.d.ts +18 -0
- package/cjs/hostComponents/LivePlayer/node.js +21 -0
- package/cjs/hostComponents/LivePreview/index.d.ts +18 -0
- package/cjs/hostComponents/LivePreview/index.js +5 -0
- package/cjs/hostComponents/LivePreview/node.d.ts +16 -0
- package/cjs/hostComponents/LivePreview/node.js +19 -0
- package/cjs/hostComponents/Map/index.d.ts +115 -0
- package/cjs/hostComponents/Map/index.js +5 -0
- package/cjs/hostComponents/Map/node.d.ts +35 -0
- package/cjs/hostComponents/Map/node.js +38 -0
- package/cjs/hostComponents/Mask/index.d.ts +12 -0
- package/cjs/hostComponents/Mask/index.js +13 -0
- package/cjs/hostComponents/Mask/node.d.ts +7 -0
- package/cjs/hostComponents/Mask/node.js +10 -0
- package/cjs/hostComponents/MatchMedia/index.d.ts +18 -0
- package/cjs/hostComponents/MatchMedia/index.js +9 -0
- package/cjs/hostComponents/MatchMedia/node.d.ts +8 -0
- package/cjs/hostComponents/MatchMedia/node.js +11 -0
- package/cjs/hostComponents/MovableArea/index.d.ts +1 -1
- package/cjs/hostComponents/MovableView/index.d.ts +1 -1
- package/cjs/hostComponents/Progress/index.d.ts +1 -0
- package/cjs/hostComponents/Progress/node.d.ts +1 -0
- package/cjs/hostComponents/Progress/node.js +1 -0
- package/cjs/hostComponents/RichText/index.d.ts +1 -0
- package/cjs/hostComponents/RtcRoom/index.d.ts +10 -0
- package/cjs/hostComponents/RtcRoom/index.js +5 -0
- package/cjs/hostComponents/RtcRoom/node.d.ts +10 -0
- package/cjs/hostComponents/RtcRoom/node.js +13 -0
- package/cjs/hostComponents/index.d.ts +8 -0
- package/cjs/hostComponents/index.js +8 -0
- package/cjs/hostComponents/node.js +16 -0
- package/esm/api/index.d.ts +1981 -1047
- package/esm/api/index.js +308 -87
- package/esm/hostComponents/Ad/index.d.ts +12 -0
- package/esm/hostComponents/Ad/index.js +5 -0
- package/esm/hostComponents/Ad/node.d.ts +10 -0
- package/esm/hostComponents/Ad/node.js +10 -0
- package/esm/hostComponents/Camera/index.d.ts +19 -0
- package/esm/hostComponents/Camera/index.js +2 -0
- package/esm/hostComponents/Camera/node.d.ts +17 -0
- package/esm/hostComponents/Camera/node.js +17 -0
- package/esm/hostComponents/LivePlayer/index.d.ts +28 -0
- package/esm/hostComponents/LivePlayer/index.js +2 -0
- package/esm/hostComponents/LivePlayer/node.d.ts +18 -0
- package/esm/hostComponents/LivePlayer/node.js +18 -0
- package/esm/hostComponents/LivePreview/index.d.ts +18 -0
- package/esm/hostComponents/LivePreview/index.js +2 -0
- package/esm/hostComponents/LivePreview/node.d.ts +16 -0
- package/esm/hostComponents/LivePreview/node.js +16 -0
- package/esm/hostComponents/Map/index.d.ts +115 -0
- package/esm/hostComponents/Map/index.js +2 -0
- package/esm/hostComponents/Map/node.d.ts +35 -0
- package/esm/hostComponents/Map/node.js +35 -0
- package/esm/hostComponents/Mask/index.d.ts +12 -0
- package/esm/hostComponents/Mask/index.js +10 -0
- package/esm/hostComponents/Mask/node.d.ts +7 -0
- package/esm/hostComponents/Mask/node.js +7 -0
- package/esm/hostComponents/MatchMedia/index.d.ts +18 -0
- package/esm/hostComponents/MatchMedia/index.js +6 -0
- package/esm/hostComponents/MatchMedia/node.d.ts +8 -0
- package/esm/hostComponents/MatchMedia/node.js +8 -0
- package/esm/hostComponents/MovableArea/index.d.ts +1 -1
- package/esm/hostComponents/MovableView/index.d.ts +1 -1
- package/esm/hostComponents/Progress/index.d.ts +1 -0
- package/esm/hostComponents/Progress/node.d.ts +1 -0
- package/esm/hostComponents/Progress/node.js +1 -0
- package/esm/hostComponents/RichText/index.d.ts +1 -0
- package/esm/hostComponents/RtcRoom/index.d.ts +10 -0
- package/esm/hostComponents/RtcRoom/index.js +2 -0
- package/esm/hostComponents/RtcRoom/node.d.ts +10 -0
- package/esm/hostComponents/RtcRoom/node.js +10 -0
- package/esm/hostComponents/index.d.ts +8 -0
- package/esm/hostComponents/index.js +8 -0
- package/esm/hostComponents/node.js +16 -0
- package/package.json +7 -7
package/esm/api/index.js
CHANGED
|
@@ -1,110 +1,244 @@
|
|
|
1
1
|
import { promisify } from '@rsmax/framework-shared';
|
|
2
|
-
|
|
2
|
+
// 基础
|
|
3
3
|
export const canIUse = tt.canIUse;
|
|
4
|
-
export const
|
|
5
|
-
export const
|
|
6
|
-
export const
|
|
4
|
+
export const canIPutStuffOverComponent = tt.canIPutStuffOverComponent;
|
|
5
|
+
export const base64ToArrayBuffer = tt.base64ToArrayBuffer;
|
|
6
|
+
export const arrayBufferToBase64 = tt.arrayBufferToBase64;
|
|
7
|
+
// @ts-expect-error
|
|
8
|
+
export const setPageInfo = promisify(tt.setPageInfo);
|
|
9
|
+
// 基础 - 性能
|
|
10
|
+
export const performance = tt.performance;
|
|
11
|
+
// 基础 - 线程
|
|
12
|
+
export const createWorker = tt.createWorker;
|
|
13
|
+
// 基础 - 窗口尺寸变化
|
|
14
|
+
export const offWindowResize = tt.offWindowResize;
|
|
15
|
+
export const onWindowResize = tt.onWindowResize;
|
|
16
|
+
// 基础 - 声明周期
|
|
17
|
+
// @ts-expect-error
|
|
18
|
+
export const getEnterOptionsSync = tt.getEnterOptionsSync;
|
|
7
19
|
export const getLaunchOptionsSync = tt.getLaunchOptionsSync;
|
|
8
20
|
export const exitMiniProgram = tt.exitMiniProgram;
|
|
9
|
-
|
|
10
|
-
export const
|
|
11
|
-
|
|
12
|
-
export const
|
|
13
|
-
export const
|
|
14
|
-
export const
|
|
15
|
-
export const
|
|
16
|
-
export const
|
|
17
|
-
|
|
18
|
-
export const
|
|
19
|
-
export const
|
|
20
|
-
export const
|
|
21
|
-
export const
|
|
22
|
-
|
|
23
|
-
export const
|
|
24
|
-
|
|
25
|
-
export const
|
|
21
|
+
// 基础 - 版本更新
|
|
22
|
+
export const getUpdateManager = tt.getUpdateManager;
|
|
23
|
+
// 基础 - 应用级事件
|
|
24
|
+
export const onAppShow = tt.onAppShow;
|
|
25
|
+
export const offAppShow = tt.offAppShow;
|
|
26
|
+
export const onAppHide = tt.onAppHide;
|
|
27
|
+
export const offAppHide = tt.offAppHide;
|
|
28
|
+
export const offUnhandledRejection = tt.offUnhandledRejection;
|
|
29
|
+
export const onError = tt.onError;
|
|
30
|
+
export const offError = tt.offError;
|
|
31
|
+
export const onLazyLoadError = tt.onLazyLoadError;
|
|
32
|
+
export const offLazyLoadError = tt.offLazyLoadError;
|
|
33
|
+
export const onUnhandledRejection = tt.onUnhandledRejection;
|
|
34
|
+
// @ts-expect-error
|
|
35
|
+
export const onAppLaunch = tt.onAppLaunch;
|
|
36
|
+
// @ts-expect-error
|
|
37
|
+
export const offAppLaunch = tt.offAppLaunch;
|
|
38
|
+
// 环境变量
|
|
39
|
+
export const env = tt.env;
|
|
40
|
+
export const getEnvInfoSync = tt.getEnvInfoSync;
|
|
41
|
+
// TTML
|
|
42
|
+
export const createSelectorQuery = tt.createSelectorQuery;
|
|
43
|
+
export const createIntersectionObserver = tt.createIntersectionObserver;
|
|
44
|
+
// @ts-expect-error
|
|
45
|
+
export const matchMedia = tt.matchMedia;
|
|
46
|
+
// 网络 - HTTP
|
|
26
47
|
export const request = promisify(tt.request);
|
|
27
48
|
export const downloadFile = promisify(tt.downloadFile);
|
|
28
49
|
export const uploadFile = promisify(tt.uploadFile);
|
|
50
|
+
// 网络 - WebSocket
|
|
29
51
|
export const connectSocket = tt.connectSocket;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
export const
|
|
33
|
-
|
|
34
|
-
export const
|
|
35
|
-
export const getStorageInfoSync = tt.getStorageInfoSync;
|
|
36
|
-
export const getStorageInfo = promisify(tt.getStorageInfo);
|
|
37
|
-
export const getStorage = promisify(tt.getStorage);
|
|
38
|
-
export const clearStorageSync = tt.clearStorageSync;
|
|
39
|
-
export const clearStorage = promisify(tt.clearStorage);
|
|
52
|
+
// 网络 - EventSource
|
|
53
|
+
// @ts-expect-error
|
|
54
|
+
export const createEventSource = tt.createEventSource;
|
|
55
|
+
// 媒体 - 图片
|
|
56
|
+
export const chooseImage = promisify(tt.chooseImage);
|
|
40
57
|
export const saveImageToPhotosAlbum = promisify(tt.saveImageToPhotosAlbum);
|
|
41
58
|
export const previewImage = promisify(tt.previewImage);
|
|
42
59
|
export const getImageInfo = promisify(tt.getImageInfo);
|
|
43
|
-
export const
|
|
44
|
-
//
|
|
60
|
+
export const compressImage = promisify(tt.compressImage);
|
|
61
|
+
// 媒体 - 录音
|
|
62
|
+
export const getRecorderManager = tt.getRecorderManager;
|
|
63
|
+
// 媒体 - 音频
|
|
64
|
+
export const getBackgroundAudioManager = tt.getBackgroundAudioManager;
|
|
65
|
+
export const createInnerAudioContext = tt.createInnerAudioContext;
|
|
66
|
+
// 媒体 - 视频
|
|
67
|
+
// @ts-expect-error
|
|
68
|
+
export const chooseVideo = promisify(tt.chooseVideo);
|
|
69
|
+
// @ts-expect-error
|
|
45
70
|
export const saveVideoToPhotosAlbum = promisify(tt.saveVideoToPhotosAlbum);
|
|
71
|
+
// @ts-expect-error
|
|
72
|
+
export const canIUseVideoFormat = promisify(tt.canIUseVideoFormat);
|
|
73
|
+
export const prerenderVideo = promisify(tt.prerenderVideo);
|
|
74
|
+
// @ts-expect-error
|
|
75
|
+
export const preloadVideo = promisify(tt.preloadVideo);
|
|
76
|
+
export const chooseMedia = promisify(tt.chooseMedia);
|
|
46
77
|
export const createVideoContext = tt.createVideoContext;
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
export const
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
export const
|
|
54
|
-
|
|
78
|
+
export const createLivePlayerContext = tt.createLivePlayerContext;
|
|
79
|
+
// 媒体 - 相机
|
|
80
|
+
// @ts-expect-error
|
|
81
|
+
export const createCameraContext = tt.createCameraContext;
|
|
82
|
+
// 媒体 - 特效相机
|
|
83
|
+
// @ts-expect-error
|
|
84
|
+
export const createEffectCameraStream = tt.createEffectCameraStream;
|
|
85
|
+
// 媒体 - Canvas 录制
|
|
86
|
+
// @ts-expect-error
|
|
87
|
+
export const createMediaRecorder = tt.createMediaRecorder;
|
|
88
|
+
// 媒体 - rtc-room 实时通信
|
|
89
|
+
// @ts-expect-error
|
|
90
|
+
export const createRtcRoomContext = tt.createRtcRoomContext;
|
|
91
|
+
// 地图
|
|
92
|
+
export const createMapContext = tt.createMapContext;
|
|
93
|
+
// 文件
|
|
55
94
|
export const saveFile = promisify(tt.saveFile);
|
|
56
|
-
export const
|
|
57
|
-
// @ts-
|
|
95
|
+
export const getFileInfo = tt.getFileInfo;
|
|
96
|
+
// @ts-expect-error
|
|
58
97
|
export const openDocument = promisify(tt.openDocument);
|
|
59
98
|
export const getSavedFileList = tt.getSavedFileList;
|
|
99
|
+
export const removeSavedFile = promisify(tt.removeSavedFile);
|
|
60
100
|
export const getFileSystemManager = tt.getFileSystemManager;
|
|
61
|
-
|
|
62
|
-
export const
|
|
63
|
-
export const
|
|
64
|
-
export const
|
|
65
|
-
export const
|
|
66
|
-
export const
|
|
67
|
-
export const
|
|
68
|
-
export const
|
|
69
|
-
export const
|
|
70
|
-
export const
|
|
71
|
-
export const
|
|
72
|
-
|
|
73
|
-
export const
|
|
74
|
-
export const
|
|
75
|
-
export const
|
|
76
|
-
|
|
77
|
-
|
|
101
|
+
// 文件缓存
|
|
102
|
+
export const getStorage = promisify(tt.getStorage);
|
|
103
|
+
export const getStorageSync = tt.getStorageSync;
|
|
104
|
+
export const setStorage = promisify(tt.setStorage);
|
|
105
|
+
export const setStorageSync = tt.setStorageSync;
|
|
106
|
+
export const removeStorage = promisify(tt.removeStorage);
|
|
107
|
+
export const removeStorageSync = tt.removeStorageSync;
|
|
108
|
+
export const clearStorage = promisify(tt.clearStorage);
|
|
109
|
+
export const clearStorageSync = tt.clearStorageSync;
|
|
110
|
+
export const getStorageInfo = promisify(tt.getStorageInfo);
|
|
111
|
+
export const getStorageInfoSync = tt.getStorageInfoSync;
|
|
112
|
+
// 地理位置
|
|
113
|
+
export const getLocation = promisify(tt.getLocation);
|
|
114
|
+
export const chooseLocation = promisify(tt.chooseLocation);
|
|
115
|
+
export const openLocation = promisify(tt.openLocation);
|
|
116
|
+
// @ts-expect-error
|
|
117
|
+
export const startLocationUpdate = promisify(tt.startLocationUpdate);
|
|
118
|
+
// @ts-expect-error
|
|
119
|
+
export const stopLocationUpdate = promisify(tt.stopLocationUpdate);
|
|
120
|
+
// @ts-expect-error
|
|
121
|
+
export const onLocationChange = tt.onLocationChange;
|
|
122
|
+
// @ts-expect-error
|
|
123
|
+
export const offLocationChange = tt.offLocationChange;
|
|
124
|
+
// @ts-expect-error
|
|
125
|
+
export const onLocationChangeError = tt.onLocationChangeError;
|
|
126
|
+
// @ts-expect-error
|
|
127
|
+
export const offLocationChangeError = tt.offLocationChangeError;
|
|
128
|
+
// 设备 - 网络状态
|
|
129
|
+
// @ts-expect-error
|
|
78
130
|
export const getNetworkType = promisify(tt.getNetworkType);
|
|
79
|
-
export const
|
|
80
|
-
export const
|
|
131
|
+
export const onNetworkStatusChange = tt.onNetworkStatusChange;
|
|
132
|
+
export const offNetworkStatusChange = tt.offNetworkStatusChange;
|
|
133
|
+
export const getWifiList = promisify(tt.getWifiList);
|
|
134
|
+
export const onGetWifiList = tt.onGetWifiList;
|
|
135
|
+
// @ts-expect-error
|
|
136
|
+
export const onNetworkWeakChange = tt.onNetworkWeakChange;
|
|
137
|
+
// 设备 - 系统信息
|
|
138
|
+
export const getSystemInfo = promisify(tt.getSystemInfo);
|
|
139
|
+
// @ts-expect-error
|
|
140
|
+
export const getDeviceInfoSync = tt.getDeviceInfoSync;
|
|
141
|
+
export const getSystemInfoSync = tt.getSystemInfoSync;
|
|
142
|
+
// 设备 - WIFI
|
|
143
|
+
export const getConnectedWifi = promisify(tt.getConnectedWifi);
|
|
144
|
+
// 设备 - 加速度计
|
|
81
145
|
export const startAccelerometer = promisify(tt.startAccelerometer);
|
|
146
|
+
export const stopAccelerometer = promisify(tt.stopAccelerometer);
|
|
82
147
|
export const onAccelerometerChange = tt.onAccelerometerChange;
|
|
83
|
-
|
|
148
|
+
// @ts-expect-error
|
|
149
|
+
export const offAccelerometerChange = tt.offAccelerometerChange;
|
|
150
|
+
// 设备 - 罗盘
|
|
84
151
|
export const startCompass = promisify(tt.startCompass);
|
|
152
|
+
export const stopCompass = promisify(tt.stopCompass);
|
|
85
153
|
export const onCompassChange = tt.onCompassChange;
|
|
154
|
+
export const offCompassChange = tt.offCompassChange;
|
|
155
|
+
// 设备 - 拨打电话
|
|
156
|
+
export const makePhoneCall = promisify(tt.makePhoneCall);
|
|
157
|
+
// 设备 - 扫码
|
|
86
158
|
export const scanCode = promisify(tt.scanCode);
|
|
159
|
+
// 设备 - 剪切板
|
|
160
|
+
export const getClipboardData = promisify(tt.getClipboardData);
|
|
161
|
+
export const setClipboardData = promisify(tt.setClipboardData);
|
|
162
|
+
// 设备 - 屏幕
|
|
163
|
+
export const setKeepScreenOn = promisify(tt.setKeepScreenOn);
|
|
164
|
+
export const onUserCaptureScreen = tt.onUserCaptureScreen;
|
|
165
|
+
export const offUserCaptureScreen = tt.offUserCaptureScreen;
|
|
166
|
+
export const getScreenBrightness = tt.getScreenBrightness;
|
|
167
|
+
export const setScreenBrightness = promisify(tt.setScreenBrightness);
|
|
168
|
+
// @ts-expect-error
|
|
169
|
+
export const onUserScreenRecord = tt.onUserScreenRecord;
|
|
170
|
+
// @ts-expect-error
|
|
171
|
+
export const offUserScreenRecord = tt.offUserScreenRecord;
|
|
172
|
+
// @ts-expect-error
|
|
173
|
+
export const enableUserScreenRecord = promisify(tt.enableUserScreenRecord);
|
|
174
|
+
// @ts-expect-error
|
|
175
|
+
export const disableUserScreenRecord = promisify(tt.disableUserScreenRecord);
|
|
176
|
+
// 设备 - 陀螺仪
|
|
177
|
+
// @ts-expect-error
|
|
178
|
+
export const startGyroscope = promisify(tt.startGyroscope);
|
|
179
|
+
// @ts-expect-error
|
|
180
|
+
export const stopGyroscope = promisify(tt.stopGyroscope);
|
|
181
|
+
// @ts-expect-error
|
|
182
|
+
export const onGyroscopeChange = tt.onGyroscopeChange;
|
|
183
|
+
// @ts-expect-error
|
|
184
|
+
export const offGyroscopeChange = tt.offGyroscopeChange;
|
|
185
|
+
// 设备 - 加密
|
|
186
|
+
// @ts-expect-error
|
|
187
|
+
export const getRandomValues = promisify(tt.getRandomValues);
|
|
188
|
+
// 设备 - 短信
|
|
189
|
+
// @ts-expect-error
|
|
190
|
+
export const sendSms = promisify(tt.sendSms);
|
|
191
|
+
// 设备 - 日历
|
|
192
|
+
// @ts-expect-error
|
|
193
|
+
export const deleteCalendarEvent = promisify(tt.deleteCalendarEvent);
|
|
194
|
+
// 设备 - 振动
|
|
87
195
|
export const vibrateShort = promisify(tt.vibrateShort);
|
|
88
196
|
export const vibrateLong = promisify(tt.vibrateLong);
|
|
89
|
-
|
|
90
|
-
export const getExtConfig = promisify(tt.getExtConfig);
|
|
91
|
-
export const createSelectorQuery = tt.createSelectorQuery;
|
|
92
|
-
export const createIntersectionObserver = tt.createIntersectionObserver;
|
|
93
|
-
// @ts-ignore
|
|
94
|
-
export const createRewardedVideoAd = tt.createRewardedVideoAd;
|
|
95
|
-
export const getConnectedWifi = promisify(tt.getConnectedWifi);
|
|
96
|
-
export const setKeepScreenOn = promisify(tt.setKeepScreenOn);
|
|
97
|
-
export const getMenuButtonLayout = tt.getMenuButtonLayout;
|
|
98
|
-
export const getMenuButtonBoundingClientRect = tt.getMenuButtonBoundingClientRect;
|
|
99
|
-
export const createInnerAudioContext = tt.createInnerAudioContext;
|
|
100
|
-
export const getBackgroundAudioManager = tt.getBackgroundAudioManager;
|
|
101
|
-
export const getRecorderManager = tt.getRecorderManager;
|
|
102
|
-
export const createLivePlayerContext = tt.createLivePlayerContext;
|
|
103
|
-
export const createMapContext = tt.createMapContext;
|
|
104
|
-
// export const interactionAnalysis = promisify(tt.interactionAnalysis);
|
|
105
|
-
export const followOfficialAccount = promisify(tt.followOfficialAccount);
|
|
106
|
-
export const checkFollowState = promisify(tt.checkFollowState);
|
|
197
|
+
// 设备 - 性能
|
|
107
198
|
export const onMemoryWarning = tt.onMemoryWarning;
|
|
199
|
+
// 画布 v1
|
|
200
|
+
export const createCanvasContext = tt.createCanvasContext;
|
|
201
|
+
export const canvasToTempFilePath = tt.canvasToTempFilePath;
|
|
202
|
+
// 画布 v2
|
|
203
|
+
export const createOffscreenCanvas = tt.createOffscreenCanvas;
|
|
204
|
+
// 界面 - 交互反馈
|
|
205
|
+
// @ts-expect-error
|
|
206
|
+
export const enableAlertBeforeUnload = promisify(tt.enableAlertBeforeUnload);
|
|
207
|
+
export const showToast = promisify(tt.showToast);
|
|
208
|
+
export const showLoading = promisify(tt.showLoading);
|
|
209
|
+
export const hideToast = promisify(tt.hideToast);
|
|
210
|
+
export const hideLoading = promisify(tt.hideLoading);
|
|
211
|
+
export const showModal = promisify(tt.showModal);
|
|
212
|
+
// @ts-expect-error
|
|
213
|
+
export const showActionSheet = promisify(tt.showActionSheet);
|
|
214
|
+
export const showFavoriteGuide = promisify(tt.showFavoriteGuide);
|
|
215
|
+
export const showInteractionBar = promisify(tt.showInteractionBar);
|
|
216
|
+
export const hideInteractionBar = promisify(tt.hideInteractionBar);
|
|
217
|
+
// @ts-expect-error
|
|
218
|
+
export const disableAlertBeforeUnload = promisify(tt.disableAlertBeforeUnload);
|
|
219
|
+
// 界面 - 导航栏
|
|
220
|
+
export const showNavigationBarLoading = promisify(tt.showNavigationBarLoading);
|
|
221
|
+
export const hideNavigationBarLoading = promisify(tt.hideNavigationBarLoading);
|
|
222
|
+
export const hideHomeButton = promisify(tt.hideHomeButton);
|
|
223
|
+
export const setNavigationBarTitle = promisify(tt.setNavigationBarTitle);
|
|
224
|
+
export const setNavigationBarColor = promisify(tt.setNavigationBarColor);
|
|
225
|
+
// 界面 - 菜单
|
|
226
|
+
// @ts-expect-error
|
|
227
|
+
export const getCustomButtonBoundingClientRect = tt.getCustomButtonBoundingClientRect;
|
|
228
|
+
export const getMenuButtonBoundingClientRect = tt.getMenuButtonBoundingClientRect;
|
|
229
|
+
// 界面 - 动画
|
|
230
|
+
export const createAnimation = tt.createAnimation;
|
|
231
|
+
// 界面 - 页面位置
|
|
232
|
+
export const pageScrollTo = promisify(tt.pageScrollTo);
|
|
233
|
+
// 界面 - 滑动返回
|
|
234
|
+
// @ts-expect-error
|
|
235
|
+
export const setSwipeBackMode = tt.setSwipeBackMode;
|
|
236
|
+
// 界面 - 下拉刷新
|
|
237
|
+
export const startPullDownRefresh = tt.startPullDownRefresh;
|
|
238
|
+
export const stopPullDownRefresh = tt.stopPullDownRefresh;
|
|
239
|
+
// 界面 - 键盘
|
|
240
|
+
export const hideKeyboard = promisify(tt.hideKeyboard);
|
|
241
|
+
// 界面 - tab bar
|
|
108
242
|
export const showTabBarRedDot = promisify(tt.showTabBarRedDot);
|
|
109
243
|
export const showTabBar = promisify(tt.showTabBar);
|
|
110
244
|
export const setTabBarStyle = promisify(tt.setTabBarStyle);
|
|
@@ -113,10 +247,97 @@ export const setTabBarBadge = promisify(tt.setTabBarBadge);
|
|
|
113
247
|
export const removeTabBarBadge = promisify(tt.removeTabBarBadge);
|
|
114
248
|
export const hideTabBarRedDot = promisify(tt.hideTabBarRedDot);
|
|
115
249
|
export const hideTabBar = promisify(tt.hideTabBar);
|
|
116
|
-
//
|
|
117
|
-
|
|
250
|
+
// 页面导航
|
|
251
|
+
export const navigateTo = promisify(tt.navigateTo);
|
|
252
|
+
export const redirectTo = promisify(tt.redirectTo);
|
|
253
|
+
export const switchTab = promisify(tt.switchTab);
|
|
254
|
+
export const navigateBack = promisify(tt.navigateBack);
|
|
255
|
+
export const reLaunch = promisify(tt.reLaunch);
|
|
256
|
+
// 开放接口 - 登录
|
|
257
|
+
export const login = promisify(tt.login);
|
|
258
|
+
export const checkSession = tt.checkSession;
|
|
259
|
+
// 开放接口 - 用户信息
|
|
260
|
+
export const getUserInfo = promisify(tt.getUserInfo);
|
|
261
|
+
export const getUserProfile = promisify(tt.getUserProfile);
|
|
262
|
+
// 开放接口 - 广告
|
|
263
|
+
// @ts-expect-error
|
|
264
|
+
export const createRewardedVideoAd = tt.createRewardedVideoAd;
|
|
265
|
+
export const createInterstitialAd = tt.createInterstitialAd;
|
|
266
|
+
// @ts-expect-error
|
|
267
|
+
export const preloadDrawAd = promisify(tt.preloadDrawAd);
|
|
268
|
+
// 开放接口 - 支付
|
|
269
|
+
export const pay = promisify(tt.pay);
|
|
270
|
+
// 开放接口 - 小程序跳转
|
|
271
|
+
export const navigateToMiniProgram = promisify(tt.navigateToMiniProgram);
|
|
272
|
+
export const navigateBackMiniProgram = promisify(tt.navigateBackMiniProgram);
|
|
273
|
+
// 开放接口 - 收货地址
|
|
274
|
+
export const chooseAddress = promisify(tt.chooseAddress);
|
|
275
|
+
// 开放接口 - 设置
|
|
276
|
+
export const getSetting = promisify(tt.getSetting);
|
|
277
|
+
export const openSetting = promisify(tt.openSetting);
|
|
278
|
+
// 开放接口 - 授权
|
|
279
|
+
export const authorize = promisify(tt.authorize);
|
|
280
|
+
export const showDouyinOpenAuth = promisify(tt.showDouyinOpenAuth);
|
|
281
|
+
// 开放接口 - 评价能力
|
|
282
|
+
// @ts-expect-error
|
|
283
|
+
export const rateAwemeOrder = tt.rateAwemeOrder;
|
|
284
|
+
// @ts-expect-error
|
|
285
|
+
export const canRateAwemeOrders = promisify(tt.canRateAwemeOrders);
|
|
286
|
+
// 开放接口 - 数据分析
|
|
287
|
+
export const reportAnalytics = tt.reportAnalytics;
|
|
288
|
+
// 开放接口 - 引导关注
|
|
289
|
+
export const followOfficialAccount = promisify(tt.followOfficialAccount);
|
|
290
|
+
export const openAwemeUserProfile = promisify(tt.openAwemeUserProfile);
|
|
291
|
+
export const checkFollowState = promisify(tt.checkFollowState);
|
|
292
|
+
export const followAwemeUser = promisify(tt.followAwemeUser);
|
|
293
|
+
// @ts-expect-error
|
|
294
|
+
export const checkFollowAwemeState = promisify(tt.checkFollowAwemeState);
|
|
295
|
+
// 开放接口 - 订阅消息
|
|
296
|
+
export const requestSubscribeMessage = promisify(tt.requestSubscribeMessage);
|
|
297
|
+
// 开放接口 - 流量来源识别
|
|
298
|
+
export const getAnalysisInfo = promisify(tt.getAnalysisInfo);
|
|
299
|
+
// 开放接口 - 隐私信息授权
|
|
300
|
+
// @ts-expect-error
|
|
301
|
+
export const requirePrivacyAuthorize = promisify(tt.requirePrivacyAuthorize);
|
|
302
|
+
// @ts-expect-error
|
|
303
|
+
export const openPrivacyContract = promisify(tt.openPrivacyContract);
|
|
304
|
+
// @ts-expect-error
|
|
305
|
+
export const onNeedPrivacyAuthorization = tt.onNeedPrivacyAuthorization;
|
|
306
|
+
// @ts-expect-error
|
|
307
|
+
export const getPrivacySetting = promisify(tt.getPrivacySetting);
|
|
308
|
+
// 开放接口 - web 化
|
|
309
|
+
// 开放接口 - 转发和挂载
|
|
310
|
+
export const showShareMenu = promisify(tt.showShareMenu);
|
|
311
|
+
export const hideShareMenu = promisify(tt.hideShareMenu);
|
|
312
|
+
export const navigateToVideoView = promisify(tt.navigateToVideoView);
|
|
313
|
+
// 开放接口 - 侧边栏能力
|
|
314
|
+
export const getSidebarActivity = promisify(tt.getSidebarActivity);
|
|
315
|
+
export const navigateToScene = promisify(tt.navigateToScene);
|
|
316
|
+
export const updateSidebarActivity = promisify(tt.updateSidebarActivity);
|
|
317
|
+
// @ts-expect-error
|
|
318
|
+
export const createSceneActivityContext = tt.createSceneActivityContext;
|
|
319
|
+
// 开发接口 - AI/AR能力
|
|
320
|
+
// @ts-expect-error
|
|
118
321
|
export const getAlgorithmManager = promisify(tt.getAlgorithmManager);
|
|
119
|
-
// @ts-
|
|
120
|
-
export const
|
|
121
|
-
// @ts-
|
|
122
|
-
export const
|
|
322
|
+
// @ts-expect-error
|
|
323
|
+
export const createBytennEngineContext = tt.createBytennEngineContext;
|
|
324
|
+
// @ts-expect-error
|
|
325
|
+
export const createStickerManager = tt.createStickerManager;
|
|
326
|
+
// 开发接口 - 安全能力
|
|
327
|
+
// @ts-expect-error
|
|
328
|
+
export const getLatestUserCryptoKey = promisify(tt.getLatestUserCryptoKey);
|
|
329
|
+
// 行业开放 - 通用交易系统
|
|
330
|
+
// @ts-expect-error
|
|
331
|
+
export const requestOrder = promisify(tt.requestOrder);
|
|
332
|
+
// @ts-expect-error
|
|
333
|
+
export const getOrderPayment = promisify(tt.getOrderPayment);
|
|
334
|
+
// @ts-expect-error
|
|
335
|
+
export const confirmFulfillment = tt.confirmFulfillment;
|
|
336
|
+
// 行业开放 - 交易工具
|
|
337
|
+
// @ts-expect-error
|
|
338
|
+
export const createSignOrder = tt.createSignOrder;
|
|
339
|
+
// @ts-expect-error
|
|
340
|
+
export const sign = tt.sign;
|
|
341
|
+
// 第三方平台
|
|
342
|
+
export const getExtConfig = promisify(tt.getExtConfig);
|
|
343
|
+
export const getExtConfigSync = tt.getExtConfigSync;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BaseProps, GenericEvent } from '../../types/component';
|
|
3
|
+
export interface AdProps extends BaseProps {
|
|
4
|
+
unitId: string;
|
|
5
|
+
onLoad?: (event: GenericEvent) => any;
|
|
6
|
+
onError?: (event: GenericEvent) => any;
|
|
7
|
+
onClose?: (event: GenericEvent) => any;
|
|
8
|
+
fixed?: boolean;
|
|
9
|
+
type?: 'video' | 'large' | 'lImg' | 'rImg';
|
|
10
|
+
scale?: number;
|
|
11
|
+
}
|
|
12
|
+
export declare const Ad: React.ComponentType<AdProps>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BaseProps } from '../../types/component';
|
|
3
|
+
/**
|
|
4
|
+
* camera
|
|
5
|
+
* https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/component/media-component/camera
|
|
6
|
+
*/
|
|
7
|
+
export interface CameraProps extends BaseProps {
|
|
8
|
+
mode?: 'normal' | 'scanCode';
|
|
9
|
+
resolution?: string;
|
|
10
|
+
devicePosition?: 'front' | 'back';
|
|
11
|
+
flash?: 'on' | 'off';
|
|
12
|
+
frameSize?: 'small' | 'medium' | 'large';
|
|
13
|
+
onInitdone?: (e: any) => void;
|
|
14
|
+
onError?: (e: any) => void;
|
|
15
|
+
onStop?: (e: any) => void;
|
|
16
|
+
onScancode?: (e: any) => void;
|
|
17
|
+
onClick?: (e: any) => void;
|
|
18
|
+
}
|
|
19
|
+
export declare const Camera: React.ComponentType<CameraProps>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare const alias: {
|
|
2
|
+
className: string;
|
|
3
|
+
id: string;
|
|
4
|
+
style: string;
|
|
5
|
+
mode: string;
|
|
6
|
+
resolution: string;
|
|
7
|
+
devicePosition: string;
|
|
8
|
+
flash: string;
|
|
9
|
+
frameSize: string;
|
|
10
|
+
onInitdone: string;
|
|
11
|
+
onError: string;
|
|
12
|
+
onStop: string;
|
|
13
|
+
onScancode: string;
|
|
14
|
+
onTap: string;
|
|
15
|
+
onClick: string;
|
|
16
|
+
};
|
|
17
|
+
export declare const props: string[];
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export const alias = {
|
|
2
|
+
className: 'class',
|
|
3
|
+
id: 'id',
|
|
4
|
+
style: 'style',
|
|
5
|
+
mode: 'mode',
|
|
6
|
+
resolution: 'resolution',
|
|
7
|
+
devicePosition: 'device-position',
|
|
8
|
+
flash: 'flash',
|
|
9
|
+
frameSize: 'frame-size',
|
|
10
|
+
onInitdone: 'bindinitdone',
|
|
11
|
+
onError: 'binderror',
|
|
12
|
+
onStop: 'bindstop',
|
|
13
|
+
onScancode: 'bindscancode',
|
|
14
|
+
onTap: 'bindtap',
|
|
15
|
+
onClick: 'bindtap',
|
|
16
|
+
};
|
|
17
|
+
export const props = Object.values(alias);
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BaseProps } from '../../types/component';
|
|
3
|
+
type SignatureProps = {
|
|
4
|
+
enable: boolean;
|
|
5
|
+
content: string;
|
|
6
|
+
position: string;
|
|
7
|
+
color: string;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* live-player
|
|
11
|
+
* https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/component/media-component/live-player
|
|
12
|
+
*/
|
|
13
|
+
export interface LivePlayerProps extends BaseProps {
|
|
14
|
+
src: string;
|
|
15
|
+
autoplay?: boolean;
|
|
16
|
+
muted?: boolean;
|
|
17
|
+
orientation?: 'vertical' | 'horizontal';
|
|
18
|
+
objectFit?: 'contain' | 'fillCrop';
|
|
19
|
+
signature?: SignatureProps;
|
|
20
|
+
showCastingButton?: boolean;
|
|
21
|
+
onStatechange?: (e: any) => void;
|
|
22
|
+
onFullscreenchange?: (e: any) => void;
|
|
23
|
+
onError?: (e: any) => void;
|
|
24
|
+
onClick?: (e: any) => void;
|
|
25
|
+
children?: React.ReactNode;
|
|
26
|
+
}
|
|
27
|
+
export declare const LivePlayer: React.ComponentType<LivePlayerProps>;
|
|
28
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare const alias: {
|
|
2
|
+
className: string;
|
|
3
|
+
id: string;
|
|
4
|
+
style: string;
|
|
5
|
+
src: string;
|
|
6
|
+
autoplay: string;
|
|
7
|
+
muted: string;
|
|
8
|
+
orientation: string;
|
|
9
|
+
objectFit: string;
|
|
10
|
+
signature: string;
|
|
11
|
+
showCastingButton: string;
|
|
12
|
+
onStatechange: string;
|
|
13
|
+
onFullscreenchange: string;
|
|
14
|
+
onError: string;
|
|
15
|
+
onTap: string;
|
|
16
|
+
onClick: string;
|
|
17
|
+
};
|
|
18
|
+
export declare const props: string[];
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export const alias = {
|
|
2
|
+
className: 'class',
|
|
3
|
+
id: 'id',
|
|
4
|
+
style: 'style',
|
|
5
|
+
src: 'src',
|
|
6
|
+
autoplay: 'autoplay',
|
|
7
|
+
muted: 'muted',
|
|
8
|
+
orientation: 'orientation',
|
|
9
|
+
objectFit: 'object-fit',
|
|
10
|
+
signature: 'signature',
|
|
11
|
+
showCastingButton: 'show-casting-button',
|
|
12
|
+
onStatechange: 'bindstatechange',
|
|
13
|
+
onFullscreenchange: 'bindfullscreenchange',
|
|
14
|
+
onError: 'binderror',
|
|
15
|
+
onTap: 'bindtap',
|
|
16
|
+
onClick: 'bindtap',
|
|
17
|
+
};
|
|
18
|
+
export const props = Object.values(alias);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BaseProps } from '../../types/component';
|
|
3
|
+
/**
|
|
4
|
+
* live-preview
|
|
5
|
+
* https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/component/media-component/live-preview
|
|
6
|
+
*/
|
|
7
|
+
export interface LivePreviewProps extends BaseProps {
|
|
8
|
+
awemeId: string;
|
|
9
|
+
title?: string;
|
|
10
|
+
imageSrc?: string;
|
|
11
|
+
hideHeader?: boolean;
|
|
12
|
+
onUserPage?: (e: any) => void;
|
|
13
|
+
onLiveRoom?: (e: any) => void;
|
|
14
|
+
onLiveStatus?: (e: any) => void;
|
|
15
|
+
onError?: (e: any) => void;
|
|
16
|
+
onClick?: (e: any) => void;
|
|
17
|
+
}
|
|
18
|
+
export declare const LivePreview: React.ComponentType<LivePreviewProps>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare const alias: {
|
|
2
|
+
className: string;
|
|
3
|
+
id: string;
|
|
4
|
+
style: string;
|
|
5
|
+
awemeId: string;
|
|
6
|
+
title: string;
|
|
7
|
+
imageSrc: string;
|
|
8
|
+
hideHeader: string;
|
|
9
|
+
onUserPage: string;
|
|
10
|
+
onLiveRoom: string;
|
|
11
|
+
onLiveStatus: string;
|
|
12
|
+
onError: string;
|
|
13
|
+
onTap: string;
|
|
14
|
+
onClick: string;
|
|
15
|
+
};
|
|
16
|
+
export declare const props: string[];
|