@rsmax/toutiao 1.0.1

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.
Files changed (272) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/README.md +3 -0
  3. package/cjs/api/index.d.ts +2347 -0
  4. package/cjs/api/index.js +127 -0
  5. package/cjs/hostComponents/Button/index.d.ts +18 -0
  6. package/cjs/hostComponents/Button/index.js +15 -0
  7. package/cjs/hostComponents/Button/node.d.ts +34 -0
  8. package/cjs/hostComponents/Button/node.js +37 -0
  9. package/cjs/hostComponents/Canvas/index.d.ts +6 -0
  10. package/cjs/hostComponents/Canvas/index.js +5 -0
  11. package/cjs/hostComponents/Canvas/node.d.ts +19 -0
  12. package/cjs/hostComponents/Canvas/node.js +22 -0
  13. package/cjs/hostComponents/Checkbox/index.d.ts +10 -0
  14. package/cjs/hostComponents/Checkbox/index.js +9 -0
  15. package/cjs/hostComponents/Checkbox/node.d.ts +13 -0
  16. package/cjs/hostComponents/Checkbox/node.js +16 -0
  17. package/cjs/hostComponents/CheckboxGroup/index.d.ts +7 -0
  18. package/cjs/hostComponents/CheckboxGroup/index.js +5 -0
  19. package/cjs/hostComponents/CheckboxGroup/node.d.ts +8 -0
  20. package/cjs/hostComponents/CheckboxGroup/node.js +11 -0
  21. package/cjs/hostComponents/Form/index.d.ts +10 -0
  22. package/cjs/hostComponents/Form/index.js +8 -0
  23. package/cjs/hostComponents/Form/node.d.ts +11 -0
  24. package/cjs/hostComponents/Form/node.js +14 -0
  25. package/cjs/hostComponents/Icon/index.d.ts +8 -0
  26. package/cjs/hostComponents/Icon/index.js +8 -0
  27. package/cjs/hostComponents/Icon/node.d.ts +10 -0
  28. package/cjs/hostComponents/Icon/node.js +13 -0
  29. package/cjs/hostComponents/Image/index.d.ts +17 -0
  30. package/cjs/hostComponents/Image/index.js +9 -0
  31. package/cjs/hostComponents/Image/node.d.ts +19 -0
  32. package/cjs/hostComponents/Image/node.js +22 -0
  33. package/cjs/hostComponents/Input/index.d.ts +25 -0
  34. package/cjs/hostComponents/Input/index.js +17 -0
  35. package/cjs/hostComponents/Input/node.d.ts +32 -0
  36. package/cjs/hostComponents/Input/node.js +35 -0
  37. package/cjs/hostComponents/Label/index.d.ts +6 -0
  38. package/cjs/hostComponents/Label/index.js +5 -0
  39. package/cjs/hostComponents/Label/node.d.ts +8 -0
  40. package/cjs/hostComponents/Label/node.js +11 -0
  41. package/cjs/hostComponents/MovableArea/index.d.ts +10 -0
  42. package/cjs/hostComponents/MovableArea/index.js +8 -0
  43. package/cjs/hostComponents/MovableArea/node.d.ts +8 -0
  44. package/cjs/hostComponents/MovableArea/node.js +12 -0
  45. package/cjs/hostComponents/MovableView/index.d.ts +37 -0
  46. package/cjs/hostComponents/MovableView/index.js +20 -0
  47. package/cjs/hostComponents/MovableView/node.d.ts +26 -0
  48. package/cjs/hostComponents/MovableView/node.js +30 -0
  49. package/cjs/hostComponents/Navigator/index.d.ts +12 -0
  50. package/cjs/hostComponents/Navigator/index.js +12 -0
  51. package/cjs/hostComponents/Navigator/node.d.ts +23 -0
  52. package/cjs/hostComponents/Navigator/node.js +26 -0
  53. package/cjs/hostComponents/Picker/index.d.ts +45 -0
  54. package/cjs/hostComponents/Picker/index.js +9 -0
  55. package/cjs/hostComponents/Picker/node.d.ts +20 -0
  56. package/cjs/hostComponents/Picker/node.js +23 -0
  57. package/cjs/hostComponents/PickerView/index.d.ts +10 -0
  58. package/cjs/hostComponents/PickerView/index.js +5 -0
  59. package/cjs/hostComponents/PickerView/node.d.ts +18 -0
  60. package/cjs/hostComponents/PickerView/node.js +21 -0
  61. package/cjs/hostComponents/PickerViewColumn/index.d.ts +2 -0
  62. package/cjs/hostComponents/PickerViewColumn/index.js +5 -0
  63. package/cjs/hostComponents/PickerViewColumn/node.d.ts +2 -0
  64. package/cjs/hostComponents/PickerViewColumn/node.js +5 -0
  65. package/cjs/hostComponents/Progress/index.d.ts +12 -0
  66. package/cjs/hostComponents/Progress/index.js +14 -0
  67. package/cjs/hostComponents/Progress/node.d.ts +18 -0
  68. package/cjs/hostComponents/Progress/node.js +21 -0
  69. package/cjs/hostComponents/Radio/index.d.ts +10 -0
  70. package/cjs/hostComponents/Radio/index.js +10 -0
  71. package/cjs/hostComponents/Radio/node.d.ts +12 -0
  72. package/cjs/hostComponents/Radio/node.js +15 -0
  73. package/cjs/hostComponents/RadioGroup/index.d.ts +7 -0
  74. package/cjs/hostComponents/RadioGroup/index.js +5 -0
  75. package/cjs/hostComponents/RadioGroup/node.d.ts +9 -0
  76. package/cjs/hostComponents/RadioGroup/node.js +12 -0
  77. package/cjs/hostComponents/RichText/index.d.ts +12 -0
  78. package/cjs/hostComponents/RichText/index.js +5 -0
  79. package/cjs/hostComponents/RichText/node.d.ts +17 -0
  80. package/cjs/hostComponents/RichText/node.js +20 -0
  81. package/cjs/hostComponents/ScrollView/index.d.ts +16 -0
  82. package/cjs/hostComponents/ScrollView/index.js +12 -0
  83. package/cjs/hostComponents/ScrollView/node.d.ts +22 -0
  84. package/cjs/hostComponents/ScrollView/node.js +25 -0
  85. package/cjs/hostComponents/Slider/index.d.ts +20 -0
  86. package/cjs/hostComponents/Slider/index.js +19 -0
  87. package/cjs/hostComponents/Slider/node.d.ts +23 -0
  88. package/cjs/hostComponents/Slider/node.js +26 -0
  89. package/cjs/hostComponents/Swiper/index.d.ts +21 -0
  90. package/cjs/hostComponents/Swiper/index.js +20 -0
  91. package/cjs/hostComponents/Swiper/node.d.ts +26 -0
  92. package/cjs/hostComponents/Swiper/node.js +29 -0
  93. package/cjs/hostComponents/SwiperItem/index.d.ts +6 -0
  94. package/cjs/hostComponents/SwiperItem/index.js +5 -0
  95. package/cjs/hostComponents/SwiperItem/node.d.ts +9 -0
  96. package/cjs/hostComponents/SwiperItem/node.js +12 -0
  97. package/cjs/hostComponents/Switch/index.d.ts +11 -0
  98. package/cjs/hostComponents/Switch/index.js +11 -0
  99. package/cjs/hostComponents/Switch/node.d.ts +14 -0
  100. package/cjs/hostComponents/Switch/node.js +17 -0
  101. package/cjs/hostComponents/Text/index.d.ts +9 -0
  102. package/cjs/hostComponents/Text/index.js +10 -0
  103. package/cjs/hostComponents/Text/node.d.ts +11 -0
  104. package/cjs/hostComponents/Text/node.js +14 -0
  105. package/cjs/hostComponents/Textarea/index.d.ts +22 -0
  106. package/cjs/hostComponents/Textarea/index.js +16 -0
  107. package/cjs/hostComponents/Textarea/node.d.ts +33 -0
  108. package/cjs/hostComponents/Textarea/node.js +36 -0
  109. package/cjs/hostComponents/Video/index.d.ts +37 -0
  110. package/cjs/hostComponents/Video/index.js +14 -0
  111. package/cjs/hostComponents/Video/node.d.ts +42 -0
  112. package/cjs/hostComponents/Video/node.js +45 -0
  113. package/cjs/hostComponents/View/index.d.ts +24 -0
  114. package/cjs/hostComponents/View/index.js +11 -0
  115. package/cjs/hostComponents/View/node.d.ts +26 -0
  116. package/cjs/hostComponents/View/node.js +29 -0
  117. package/cjs/hostComponents/WebView/index.d.ts +8 -0
  118. package/cjs/hostComponents/WebView/index.js +8 -0
  119. package/cjs/hostComponents/WebView/node.d.ts +8 -0
  120. package/cjs/hostComponents/WebView/node.js +11 -0
  121. package/cjs/hostComponents/index.d.ts +29 -0
  122. package/cjs/hostComponents/index.js +45 -0
  123. package/cjs/hostComponents/node.d.ts +2 -0
  124. package/cjs/hostComponents/node.js +85 -0
  125. package/cjs/index.d.ts +3 -0
  126. package/cjs/index.js +19 -0
  127. package/cjs/node/index.d.ts +3 -0
  128. package/cjs/node/index.js +51 -0
  129. package/cjs/types/component.d.ts +28 -0
  130. package/cjs/types/component.js +2 -0
  131. package/cjs/types/config.d.ts +192 -0
  132. package/cjs/types/config.js +2 -0
  133. package/cjs/types/index.d.ts +1 -0
  134. package/cjs/types/index.js +17 -0
  135. package/esm/api/index.d.ts +2347 -0
  136. package/esm/api/index.js +122 -0
  137. package/esm/hostComponents/Button/index.d.ts +18 -0
  138. package/esm/hostComponents/Button/index.js +12 -0
  139. package/esm/hostComponents/Button/node.d.ts +34 -0
  140. package/esm/hostComponents/Button/node.js +34 -0
  141. package/esm/hostComponents/Canvas/index.d.ts +6 -0
  142. package/esm/hostComponents/Canvas/index.js +2 -0
  143. package/esm/hostComponents/Canvas/node.d.ts +19 -0
  144. package/esm/hostComponents/Canvas/node.js +19 -0
  145. package/esm/hostComponents/Checkbox/index.d.ts +10 -0
  146. package/esm/hostComponents/Checkbox/index.js +6 -0
  147. package/esm/hostComponents/Checkbox/node.d.ts +13 -0
  148. package/esm/hostComponents/Checkbox/node.js +13 -0
  149. package/esm/hostComponents/CheckboxGroup/index.d.ts +7 -0
  150. package/esm/hostComponents/CheckboxGroup/index.js +2 -0
  151. package/esm/hostComponents/CheckboxGroup/node.d.ts +8 -0
  152. package/esm/hostComponents/CheckboxGroup/node.js +8 -0
  153. package/esm/hostComponents/Form/index.d.ts +10 -0
  154. package/esm/hostComponents/Form/index.js +5 -0
  155. package/esm/hostComponents/Form/node.d.ts +11 -0
  156. package/esm/hostComponents/Form/node.js +11 -0
  157. package/esm/hostComponents/Icon/index.d.ts +8 -0
  158. package/esm/hostComponents/Icon/index.js +5 -0
  159. package/esm/hostComponents/Icon/node.d.ts +10 -0
  160. package/esm/hostComponents/Icon/node.js +10 -0
  161. package/esm/hostComponents/Image/index.d.ts +17 -0
  162. package/esm/hostComponents/Image/index.js +6 -0
  163. package/esm/hostComponents/Image/node.d.ts +19 -0
  164. package/esm/hostComponents/Image/node.js +19 -0
  165. package/esm/hostComponents/Input/index.d.ts +25 -0
  166. package/esm/hostComponents/Input/index.js +14 -0
  167. package/esm/hostComponents/Input/node.d.ts +32 -0
  168. package/esm/hostComponents/Input/node.js +32 -0
  169. package/esm/hostComponents/Label/index.d.ts +6 -0
  170. package/esm/hostComponents/Label/index.js +2 -0
  171. package/esm/hostComponents/Label/node.d.ts +8 -0
  172. package/esm/hostComponents/Label/node.js +8 -0
  173. package/esm/hostComponents/MovableArea/index.d.ts +10 -0
  174. package/esm/hostComponents/MovableArea/index.js +5 -0
  175. package/esm/hostComponents/MovableArea/node.d.ts +8 -0
  176. package/esm/hostComponents/MovableArea/node.js +9 -0
  177. package/esm/hostComponents/MovableView/index.d.ts +37 -0
  178. package/esm/hostComponents/MovableView/index.js +17 -0
  179. package/esm/hostComponents/MovableView/node.d.ts +26 -0
  180. package/esm/hostComponents/MovableView/node.js +27 -0
  181. package/esm/hostComponents/Navigator/index.d.ts +12 -0
  182. package/esm/hostComponents/Navigator/index.js +9 -0
  183. package/esm/hostComponents/Navigator/node.d.ts +23 -0
  184. package/esm/hostComponents/Navigator/node.js +23 -0
  185. package/esm/hostComponents/Picker/index.d.ts +45 -0
  186. package/esm/hostComponents/Picker/index.js +6 -0
  187. package/esm/hostComponents/Picker/node.d.ts +20 -0
  188. package/esm/hostComponents/Picker/node.js +20 -0
  189. package/esm/hostComponents/PickerView/index.d.ts +10 -0
  190. package/esm/hostComponents/PickerView/index.js +2 -0
  191. package/esm/hostComponents/PickerView/node.d.ts +18 -0
  192. package/esm/hostComponents/PickerView/node.js +18 -0
  193. package/esm/hostComponents/PickerViewColumn/index.d.ts +2 -0
  194. package/esm/hostComponents/PickerViewColumn/index.js +2 -0
  195. package/esm/hostComponents/PickerViewColumn/node.d.ts +2 -0
  196. package/esm/hostComponents/PickerViewColumn/node.js +2 -0
  197. package/esm/hostComponents/Progress/index.d.ts +12 -0
  198. package/esm/hostComponents/Progress/index.js +11 -0
  199. package/esm/hostComponents/Progress/node.d.ts +18 -0
  200. package/esm/hostComponents/Progress/node.js +18 -0
  201. package/esm/hostComponents/Radio/index.d.ts +10 -0
  202. package/esm/hostComponents/Radio/index.js +7 -0
  203. package/esm/hostComponents/Radio/node.d.ts +12 -0
  204. package/esm/hostComponents/Radio/node.js +12 -0
  205. package/esm/hostComponents/RadioGroup/index.d.ts +7 -0
  206. package/esm/hostComponents/RadioGroup/index.js +2 -0
  207. package/esm/hostComponents/RadioGroup/node.d.ts +9 -0
  208. package/esm/hostComponents/RadioGroup/node.js +9 -0
  209. package/esm/hostComponents/RichText/index.d.ts +12 -0
  210. package/esm/hostComponents/RichText/index.js +2 -0
  211. package/esm/hostComponents/RichText/node.d.ts +17 -0
  212. package/esm/hostComponents/RichText/node.js +17 -0
  213. package/esm/hostComponents/ScrollView/index.d.ts +16 -0
  214. package/esm/hostComponents/ScrollView/index.js +9 -0
  215. package/esm/hostComponents/ScrollView/node.d.ts +22 -0
  216. package/esm/hostComponents/ScrollView/node.js +22 -0
  217. package/esm/hostComponents/Slider/index.d.ts +20 -0
  218. package/esm/hostComponents/Slider/index.js +16 -0
  219. package/esm/hostComponents/Slider/node.d.ts +23 -0
  220. package/esm/hostComponents/Slider/node.js +23 -0
  221. package/esm/hostComponents/Swiper/index.d.ts +21 -0
  222. package/esm/hostComponents/Swiper/index.js +17 -0
  223. package/esm/hostComponents/Swiper/node.d.ts +26 -0
  224. package/esm/hostComponents/Swiper/node.js +26 -0
  225. package/esm/hostComponents/SwiperItem/index.d.ts +6 -0
  226. package/esm/hostComponents/SwiperItem/index.js +2 -0
  227. package/esm/hostComponents/SwiperItem/node.d.ts +9 -0
  228. package/esm/hostComponents/SwiperItem/node.js +9 -0
  229. package/esm/hostComponents/Switch/index.d.ts +11 -0
  230. package/esm/hostComponents/Switch/index.js +8 -0
  231. package/esm/hostComponents/Switch/node.d.ts +14 -0
  232. package/esm/hostComponents/Switch/node.js +14 -0
  233. package/esm/hostComponents/Text/index.d.ts +9 -0
  234. package/esm/hostComponents/Text/index.js +7 -0
  235. package/esm/hostComponents/Text/node.d.ts +11 -0
  236. package/esm/hostComponents/Text/node.js +11 -0
  237. package/esm/hostComponents/Textarea/index.d.ts +22 -0
  238. package/esm/hostComponents/Textarea/index.js +13 -0
  239. package/esm/hostComponents/Textarea/node.d.ts +33 -0
  240. package/esm/hostComponents/Textarea/node.js +33 -0
  241. package/esm/hostComponents/Video/index.d.ts +37 -0
  242. package/esm/hostComponents/Video/index.js +11 -0
  243. package/esm/hostComponents/Video/node.d.ts +42 -0
  244. package/esm/hostComponents/Video/node.js +42 -0
  245. package/esm/hostComponents/View/index.d.ts +24 -0
  246. package/esm/hostComponents/View/index.js +8 -0
  247. package/esm/hostComponents/View/node.d.ts +26 -0
  248. package/esm/hostComponents/View/node.js +26 -0
  249. package/esm/hostComponents/WebView/index.d.ts +8 -0
  250. package/esm/hostComponents/WebView/index.js +5 -0
  251. package/esm/hostComponents/WebView/node.d.ts +8 -0
  252. package/esm/hostComponents/WebView/node.js +8 -0
  253. package/esm/hostComponents/index.d.ts +29 -0
  254. package/esm/hostComponents/index.js +29 -0
  255. package/esm/hostComponents/node.d.ts +2 -0
  256. package/esm/hostComponents/node.js +60 -0
  257. package/esm/index.d.ts +3 -0
  258. package/esm/index.js +3 -0
  259. package/esm/node/index.d.ts +3 -0
  260. package/esm/node/index.js +23 -0
  261. package/esm/types/component.d.ts +28 -0
  262. package/esm/types/component.js +1 -0
  263. package/esm/types/config.d.ts +192 -0
  264. package/esm/types/config.js +1 -0
  265. package/esm/types/index.d.ts +1 -0
  266. package/esm/types/index.js +1 -0
  267. package/node.js +1 -0
  268. package/package.json +37 -0
  269. package/templates/base.ejs +52 -0
  270. package/templates/component.ejs +47 -0
  271. package/templates/page.ejs +3 -0
  272. package/vitest.config.js +7 -0
@@ -0,0 +1,122 @@
1
+ import { promisify } from '@rsmax/framework-shared';
2
+ export const getAppStub = getApp;
3
+ export const canIUse = tt.canIUse;
4
+ export const getSystemInfoSync = tt.getSystemInfoSync;
5
+ export const getSystemInfo = promisify(tt.getSystemInfo);
6
+ export const getUpdateManager = tt.getUpdateManager;
7
+ export const getLaunchOptionsSync = tt.getLaunchOptionsSync;
8
+ export const exitMiniProgram = tt.exitMiniProgram;
9
+ export const switchTab = promisify(tt.switchTab);
10
+ export const reLaunch = promisify(tt.reLaunch);
11
+ export const redirectTo = promisify(tt.redirectTo);
12
+ export const navigateTo = promisify(tt.navigateTo);
13
+ export const navigateBack = promisify(tt.navigateBack);
14
+ export const showToast = promisify(tt.showToast);
15
+ export const showModal = promisify(tt.showModal);
16
+ export const showLoading = promisify(tt.showLoading);
17
+ // @ts-ignore
18
+ export const showActionSheet = promisify(tt.showActionSheet);
19
+ export const hideToast = promisify(tt.hideToast);
20
+ export const hideLoading = promisify(tt.hideLoading);
21
+ export const setNavigationBarTitle = tt.setNavigationBarTitle;
22
+ export const stopPullDownRefresh = tt.stopPullDownRefresh;
23
+ export const startPullDownRefresh = tt.startPullDownRefresh;
24
+ export const pageScrollTo = promisify(tt.pageScrollTo);
25
+ export const createAnimation = tt.createAnimation;
26
+ export const request = promisify(tt.request);
27
+ export const downloadFile = promisify(tt.downloadFile);
28
+ export const uploadFile = promisify(tt.uploadFile);
29
+ export const connectSocket = tt.connectSocket;
30
+ export const setStorageSync = tt.setStorageSync;
31
+ export const setStorage = promisify(tt.setStorage);
32
+ export const removeStorageSync = tt.removeStorageSync;
33
+ export const removeStorage = promisify(tt.removeStorage);
34
+ export const getStorageSync = tt.getStorageSync;
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);
40
+ export const saveImageToPhotosAlbum = promisify(tt.saveImageToPhotosAlbum);
41
+ export const previewImage = promisify(tt.previewImage);
42
+ export const getImageInfo = promisify(tt.getImageInfo);
43
+ export const chooseImage = promisify(tt.chooseImage);
44
+ // @ts-ignore
45
+ export const saveVideoToPhotosAlbum = promisify(tt.saveVideoToPhotosAlbum);
46
+ export const createVideoContext = tt.createVideoContext;
47
+ // @ts-ignore
48
+ export const chooseVideo = promisify(tt.chooseVideo);
49
+ export const openLocation = promisify(tt.openLocation);
50
+ export const getLocation = promisify(tt.getLocation);
51
+ export const showShareMenu = promisify(tt.showShareMenu);
52
+ export const hideShareMenu = promisify(tt.hideShareMenu);
53
+ export const navigateToVideoView = promisify(tt.navigateToVideoView);
54
+ export const createCanvasContext = tt.createCanvasContext;
55
+ export const saveFile = promisify(tt.saveFile);
56
+ export const removeSavedFile = promisify(tt.removeSavedFile);
57
+ // @ts-ignore
58
+ export const openDocument = promisify(tt.openDocument);
59
+ export const getSavedFileList = tt.getSavedFileList;
60
+ export const getFileSystemManager = tt.getFileSystemManager;
61
+ export const getFileInfo = tt.getFileInfo;
62
+ export const login = promisify(tt.login);
63
+ export const checkSession = tt.checkSession;
64
+ export const navigateToMiniProgram = tt.navigateToMiniProgram;
65
+ export const navigateBackMiniProgram = promisify(tt.navigateBackMiniProgram);
66
+ export const getUserInfo = promisify(tt.getUserInfo);
67
+ export const reportAnalytics = tt.reportAnalytics;
68
+ export const Pay = promisify(tt.pay);
69
+ export const pay = promisify(tt.pay);
70
+ export const authorize = promisify(tt.authorize);
71
+ export const openSetting = promisify(tt.openSetting);
72
+ export const getSetting = promisify(tt.getSetting);
73
+ export const chooseAddress = promisify(tt.chooseAddress);
74
+ export const setClipboardData = promisify(tt.setClipboardData);
75
+ export const getClipboardData = tt.getClipboardData;
76
+ export const onNetworkStatusChange = tt.onNetworkStatusChange;
77
+ // @ts-ignore
78
+ export const getNetworkType = promisify(tt.getNetworkType);
79
+ export const makePhoneCall = promisify(tt.makePhoneCall);
80
+ export const stopAccelerometer = promisify(tt.stopAccelerometer);
81
+ export const startAccelerometer = promisify(tt.startAccelerometer);
82
+ export const onAccelerometerChange = tt.onAccelerometerChange;
83
+ export const stopCompass = promisify(tt.stopCompass);
84
+ export const startCompass = promisify(tt.startCompass);
85
+ export const onCompassChange = tt.onCompassChange;
86
+ export const scanCode = promisify(tt.scanCode);
87
+ export const vibrateShort = promisify(tt.vibrateShort);
88
+ export const vibrateLong = promisify(tt.vibrateLong);
89
+ export const getExtConfigSync = tt.getExtConfigSync;
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);
107
+ export const onMemoryWarning = tt.onMemoryWarning;
108
+ export const showTabBarRedDot = promisify(tt.showTabBarRedDot);
109
+ export const showTabBar = promisify(tt.showTabBar);
110
+ export const setTabBarStyle = promisify(tt.setTabBarStyle);
111
+ export const setTabBarItem = promisify(tt.setTabBarItem);
112
+ export const setTabBarBadge = promisify(tt.setTabBarBadge);
113
+ export const removeTabBarBadge = promisify(tt.removeTabBarBadge);
114
+ export const hideTabBarRedDot = promisify(tt.hideTabBarRedDot);
115
+ export const hideTabBar = promisify(tt.hideTabBar);
116
+ // AI/AR能力
117
+ // @ts-ignore
118
+ export const getAlgorithmManager = promisify(tt.getAlgorithmManager);
119
+ // @ts-ignore
120
+ export const createStickerManager = promisify(tt.createStickerManager);
121
+ // @ts-ignore
122
+ export const createBytennEngineContext = promisify(tt.createBytennEngineContext);
@@ -0,0 +1,18 @@
1
+ import React from 'react';
2
+ import { BaseProps } from '../../types/component';
3
+ export interface ButtonProps extends BaseProps {
4
+ size?: 'default' | 'mini';
5
+ type?: 'primary' | 'default';
6
+ disabled?: boolean;
7
+ loading?: boolean;
8
+ hoverClassName?: string;
9
+ hoverStartTime?: number;
10
+ hoverStayTime?: number;
11
+ hoverStopPropagation?: boolean;
12
+ formType?: 'submit' | 'reset';
13
+ openType?: 'share' | 'getPhoneNumber';
14
+ onClick?: (e: any) => void;
15
+ onGetPhoneNumber?: (e: any) => void;
16
+ children?: React.ReactNode;
17
+ }
18
+ export declare const Button: React.ComponentType<ButtonProps>;
@@ -0,0 +1,12 @@
1
+ import { createHostComponent } from '@rsmax/runtime';
2
+ export const Button = createHostComponent('button');
3
+ Button.defaultProps = {
4
+ size: 'default',
5
+ type: 'default',
6
+ disabled: false,
7
+ loading: false,
8
+ hoverClassName: 'button-hover',
9
+ hoverStartTime: 20,
10
+ hoverStayTime: 70,
11
+ hoverStopPropagation: false,
12
+ };
@@ -0,0 +1,34 @@
1
+ export declare const alias: {
2
+ className: string;
3
+ id: string;
4
+ style: string;
5
+ type: string;
6
+ plain: string;
7
+ disabled: string;
8
+ loading: string;
9
+ formType: string;
10
+ openType: string;
11
+ hoverClass: string;
12
+ hoverClassName: string;
13
+ hoverStopPropagation: string;
14
+ hoverStartTime: string;
15
+ hoverStayTime: string;
16
+ lang: string;
17
+ sessionFrom: string;
18
+ sendMessageTitle: string;
19
+ sendMessagePath: string;
20
+ sendMessageImg: string;
21
+ appParameter: string;
22
+ showMessageCard: string;
23
+ onGetUserinfo: string;
24
+ onGetUserInfo: string;
25
+ onContact: string;
26
+ onGetPhoneNumber: string;
27
+ onError: string;
28
+ onOpenSetting: string;
29
+ onLaunchApp: string;
30
+ onTap: string;
31
+ onClick: string;
32
+ animation: string;
33
+ };
34
+ export declare const props: string[];
@@ -0,0 +1,34 @@
1
+ export const alias = {
2
+ className: 'class',
3
+ id: 'id',
4
+ style: 'style',
5
+ type: 'type',
6
+ plain: 'plain',
7
+ disabled: 'disabled',
8
+ loading: 'loading',
9
+ formType: 'form-type',
10
+ openType: 'open-type',
11
+ hoverClass: 'hover-class',
12
+ hoverClassName: 'hover-class',
13
+ hoverStopPropagation: 'hover-stop-propagation',
14
+ hoverStartTime: 'hover-start-time',
15
+ hoverStayTime: 'hover-stay-time',
16
+ lang: 'lang',
17
+ sessionFrom: 'session-from',
18
+ sendMessageTitle: 'send-message-title',
19
+ sendMessagePath: 'send-message-path',
20
+ sendMessageImg: 'send-message-img',
21
+ appParameter: 'app-parameter',
22
+ showMessageCard: 'show-message-card',
23
+ onGetUserinfo: 'bindgetuserinfo',
24
+ onGetUserInfo: 'bindgetuserinfo',
25
+ onContact: 'bindcontact',
26
+ onGetPhoneNumber: 'bindgetphonenumber',
27
+ onError: 'binderror',
28
+ onOpenSetting: 'bindopensetting',
29
+ onLaunchApp: 'bindlaunchapp',
30
+ onTap: 'bindtap',
31
+ onClick: 'bindtap',
32
+ animation: 'animation',
33
+ };
34
+ export const props = Object.values(alias);
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { BaseProps } from '../../types/component';
3
+ export interface CanvasProps extends BaseProps {
4
+ canvasId: string;
5
+ }
6
+ export declare const Canvas: React.ComponentType<CanvasProps>;
@@ -0,0 +1,2 @@
1
+ import { createHostComponent } from '@rsmax/runtime';
2
+ export const Canvas = createHostComponent('canvas');
@@ -0,0 +1,19 @@
1
+ export declare const alias: {
2
+ id: string;
3
+ style: string;
4
+ className: string;
5
+ width: string;
6
+ height: string;
7
+ disableScroll: string;
8
+ type: string;
9
+ canvasId: string;
10
+ onTouchStart: string;
11
+ onTouchMove: string;
12
+ onTouchEnd: string;
13
+ onTouchCancel: string;
14
+ onLongTap: string;
15
+ onLongClick: string;
16
+ onError: string;
17
+ animation: string;
18
+ };
19
+ export declare const props: string[];
@@ -0,0 +1,19 @@
1
+ export const alias = {
2
+ id: 'id',
3
+ style: 'style',
4
+ className: 'class',
5
+ width: 'width',
6
+ height: 'height',
7
+ disableScroll: 'disable-scroll',
8
+ type: 'type',
9
+ canvasId: 'canvas-id',
10
+ onTouchStart: 'bindtouchstart',
11
+ onTouchMove: 'bindtouchmove',
12
+ onTouchEnd: 'bindtouchend',
13
+ onTouchCancel: 'bindtouchcancel',
14
+ onLongTap: 'bindlongtap',
15
+ onLongClick: 'bindlongtap',
16
+ onError: 'binderror',
17
+ animation: 'animation',
18
+ };
19
+ export const props = Object.values(alias);
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { BaseProps } from '../../types/component';
3
+ export interface CheckboxProps extends BaseProps {
4
+ name?: string;
5
+ value?: string;
6
+ disabled?: boolean;
7
+ checked?: boolean;
8
+ color?: string;
9
+ }
10
+ export declare const Checkbox: React.ComponentType<CheckboxProps>;
@@ -0,0 +1,6 @@
1
+ import { createHostComponent } from '@rsmax/runtime';
2
+ export const Checkbox = createHostComponent('checkbox');
3
+ Checkbox.defaultProps = {
4
+ disabled: false,
5
+ checked: false,
6
+ };
@@ -0,0 +1,13 @@
1
+ export declare const alias: {
2
+ id: string;
3
+ name: string;
4
+ className: string;
5
+ style: string;
6
+ value: string;
7
+ checked: string;
8
+ disabled: string;
9
+ onChange: string;
10
+ color: string;
11
+ animation: string;
12
+ };
13
+ export declare const props: string[];
@@ -0,0 +1,13 @@
1
+ export const alias = {
2
+ id: 'id',
3
+ name: 'name',
4
+ className: 'class',
5
+ style: 'style',
6
+ value: 'value',
7
+ checked: 'checked',
8
+ disabled: 'disabled',
9
+ onChange: 'bindchange',
10
+ color: 'color',
11
+ animation: 'animation',
12
+ };
13
+ export const props = Object.values(alias);
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { BaseProps } from '../../types/component';
3
+ export interface CheckboxGroupProps extends BaseProps {
4
+ name?: string;
5
+ onChange?: (e: any) => void;
6
+ }
7
+ export declare const CheckboxGroup: React.ComponentType<CheckboxGroupProps>;
@@ -0,0 +1,2 @@
1
+ import { createHostComponent } from '@rsmax/runtime';
2
+ export const CheckboxGroup = createHostComponent('checkbox-group');
@@ -0,0 +1,8 @@
1
+ export declare const alias: {
2
+ id: string;
3
+ name: string;
4
+ className: string;
5
+ style: string;
6
+ onChange: string;
7
+ };
8
+ export declare const props: string[];
@@ -0,0 +1,8 @@
1
+ export const alias = {
2
+ id: 'id',
3
+ name: 'name',
4
+ className: 'class',
5
+ style: 'style',
6
+ onChange: 'bindchange',
7
+ };
8
+ export const props = Object.values(alias);
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { BaseProps } from '../../types/component';
3
+ export interface FormProps extends BaseProps {
4
+ onSubmit?: (e: any) => void;
5
+ onReset?: (e: any) => void;
6
+ reportSubmit?: boolean;
7
+ catchSubmit?: (e: any) => void;
8
+ catchReset?: (e: any) => void;
9
+ }
10
+ export declare const Form: React.ComponentType<FormProps>;
@@ -0,0 +1,5 @@
1
+ import { createHostComponent } from '@rsmax/runtime';
2
+ export const Form = createHostComponent('form');
3
+ Form.defaultProps = {
4
+ reportSubmit: false,
5
+ };
@@ -0,0 +1,11 @@
1
+ export declare const alias: {
2
+ id: string;
3
+ className: string;
4
+ style: string;
5
+ reportSubmit: string;
6
+ onSubmit: string;
7
+ onReset: string;
8
+ reportSubmitTimeout: string;
9
+ animation: string;
10
+ };
11
+ export declare const props: string[];
@@ -0,0 +1,11 @@
1
+ export const alias = {
2
+ id: 'id',
3
+ className: 'class',
4
+ style: 'style',
5
+ reportSubmit: 'report-submit',
6
+ onSubmit: 'bindsubmit',
7
+ onReset: 'bindreset',
8
+ reportSubmitTimeout: 'report-submit-timeout',
9
+ animation: 'animation',
10
+ };
11
+ export const props = Object.values(alias);
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { BaseProps } from '../../types/component';
3
+ export interface IconProps extends BaseProps {
4
+ type: 'info' | 'warn' | 'waiting' | 'cancel' | 'download' | 'search' | 'clear' | 'success' | 'success_no_circle' | 'loading';
5
+ size?: number;
6
+ color?: string;
7
+ }
8
+ export declare const Icon: React.ComponentType<IconProps>;
@@ -0,0 +1,5 @@
1
+ import { createHostComponent } from '@rsmax/runtime';
2
+ export const Icon = createHostComponent('icon');
3
+ Icon.defaultProps = {
4
+ size: 24,
5
+ };
@@ -0,0 +1,10 @@
1
+ export declare const alias: {
2
+ id: string;
3
+ className: string;
4
+ style: string;
5
+ type: string;
6
+ size: string;
7
+ color: string;
8
+ animation: string;
9
+ };
10
+ export declare const props: string[];
@@ -0,0 +1,10 @@
1
+ export const alias = {
2
+ id: 'id',
3
+ className: 'class',
4
+ style: 'style',
5
+ type: 'type',
6
+ size: 'size',
7
+ color: 'color',
8
+ animation: 'animation',
9
+ };
10
+ export const props = Object.values(alias);
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ import { BaseProps } from '../../types/component';
3
+ export interface ImageProps extends BaseProps {
4
+ src?: string;
5
+ mode?: 'scaleToFill' | 'aspectFit' | 'aspectFill' | 'widthFix' | 'top' | 'bottom' | 'center' | 'left' | 'right' | 'top left' | 'top right' | 'bottom left' | 'bottom right';
6
+ style?: React.CSSProperties;
7
+ lazyLoad?: boolean;
8
+ onLoad?: (e: any) => void;
9
+ onError?: (e: any) => void;
10
+ onTap?: (e: any) => void;
11
+ onClick?: (e: any) => void;
12
+ onTouchStart?: (e: any) => void;
13
+ onTouchMove?: (e: any) => void;
14
+ onTouchEnd?: (e: any) => void;
15
+ onTouchCancel?: (e: any) => void;
16
+ }
17
+ export declare const Image: React.ComponentType<ImageProps>;
@@ -0,0 +1,6 @@
1
+ import { createHostComponent } from '@rsmax/runtime';
2
+ export const Image = createHostComponent('image');
3
+ Image.defaultProps = {
4
+ mode: 'scaleToFill',
5
+ lazyLoad: false,
6
+ };
@@ -0,0 +1,19 @@
1
+ export declare const alias: {
2
+ id: string;
3
+ src: string;
4
+ mode: string;
5
+ className: string;
6
+ style: string;
7
+ lazyLoad: string;
8
+ onLoad: string;
9
+ onError: string;
10
+ onTap: string;
11
+ onClick: string;
12
+ onTouchStart: string;
13
+ onTouchMove: string;
14
+ onTouchEnd: string;
15
+ onTouchCancel: string;
16
+ showMenuByLongpress: string;
17
+ animation: string;
18
+ };
19
+ export declare const props: string[];
@@ -0,0 +1,19 @@
1
+ export const alias = {
2
+ id: 'id',
3
+ src: 'src',
4
+ mode: 'mode',
5
+ className: 'class',
6
+ style: 'style',
7
+ lazyLoad: 'lazy-load',
8
+ onLoad: 'bindload',
9
+ onError: 'binderror',
10
+ onTap: 'bindtap',
11
+ onClick: 'bindtap',
12
+ onTouchStart: 'bindtouchstart',
13
+ onTouchMove: 'bindtouchmove',
14
+ onTouchEnd: 'bindtouchend',
15
+ onTouchCancel: 'bindtouchcancel',
16
+ showMenuByLongpress: 'show-menu-by-longpress',
17
+ animation: 'animation',
18
+ };
19
+ export const props = Object.values(alias);
@@ -0,0 +1,25 @@
1
+ import React from 'react';
2
+ import { BaseProps } from '../../types/component';
3
+ export interface InputProps extends BaseProps {
4
+ name?: string;
5
+ focus?: boolean;
6
+ maxlength?: number;
7
+ value?: string;
8
+ password?: boolean;
9
+ type?: 'text' | 'number' | 'digit';
10
+ cursor?: number;
11
+ selectionStart?: number;
12
+ selectionEnd?: number;
13
+ adjustPosition?: boolean;
14
+ placeholder?: string;
15
+ placeholderStyle?: React.CSSProperties;
16
+ placeholderClassName?: string;
17
+ disabled?: boolean;
18
+ cursorSpacing?: number;
19
+ onInput?: (e: any) => void | string;
20
+ onClick?: (e: any) => void;
21
+ onFocus?: (e: any) => void;
22
+ onBlur?: (e: any) => void;
23
+ onConfirm?: (e: any) => void;
24
+ }
25
+ export declare const Input: React.ComponentType<InputProps>;
@@ -0,0 +1,14 @@
1
+ import { createHostComponent } from '@rsmax/runtime';
2
+ export const Input = createHostComponent('input');
3
+ Input.defaultProps = {
4
+ type: 'text',
5
+ password: false,
6
+ value: '',
7
+ disabled: false,
8
+ maxlength: 140,
9
+ focus: false,
10
+ selectionEnd: -1,
11
+ selectionStart: -1,
12
+ cursorSpacing: 0,
13
+ cursor: -1,
14
+ };
@@ -0,0 +1,32 @@
1
+ export declare const alias: {
2
+ autoFocus: string;
3
+ className: string;
4
+ focus: string;
5
+ name: string;
6
+ maxlength: string;
7
+ value: string;
8
+ style: string;
9
+ password: string;
10
+ type: string;
11
+ confirmType: string;
12
+ confirmHold: string;
13
+ cursor: string;
14
+ selectionStart: string;
15
+ selectionEnd: string;
16
+ adjustPosition: string;
17
+ placeholder: string;
18
+ placeholderStyle: string;
19
+ placeholderClass: string;
20
+ placeholderClassName: string;
21
+ disabled: string;
22
+ cursorSpacing: string;
23
+ onInput: string;
24
+ onTap: string;
25
+ onClick: string;
26
+ onFocus: string;
27
+ onBlur: string;
28
+ onConfirm: string;
29
+ onKeyboardHeightChange: string;
30
+ animation: string;
31
+ };
32
+ export declare const props: string[];
@@ -0,0 +1,32 @@
1
+ export const alias = {
2
+ autoFocus: 'auto-focus',
3
+ className: 'class',
4
+ focus: 'focus',
5
+ name: 'name',
6
+ maxlength: 'maxlength',
7
+ value: 'value',
8
+ style: 'style',
9
+ password: 'password',
10
+ type: 'type',
11
+ confirmType: 'confirm-type',
12
+ confirmHold: 'confirm-hold',
13
+ cursor: 'cursor',
14
+ selectionStart: 'selection-start',
15
+ selectionEnd: 'selection-end',
16
+ adjustPosition: 'adjust-position',
17
+ placeholder: 'placeholder',
18
+ placeholderStyle: 'placeholder-style',
19
+ placeholderClass: 'placeholder-class',
20
+ placeholderClassName: 'placeholder-class',
21
+ disabled: 'disabled',
22
+ cursorSpacing: 'cursor-spacing',
23
+ onInput: 'bindinput',
24
+ onTap: 'bindtap',
25
+ onClick: 'bindtap',
26
+ onFocus: 'bindfocus',
27
+ onBlur: 'bindblur',
28
+ onConfirm: 'bindconfirm',
29
+ onKeyboardHeightChange: 'bindkeyboardheightchange',
30
+ animation: 'animation',
31
+ };
32
+ export const props = Object.values(alias);
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { BaseProps } from '../../types/component';
3
+ export interface LabelProps extends BaseProps {
4
+ for?: string;
5
+ }
6
+ export declare const Label: React.ComponentType<LabelProps>;
@@ -0,0 +1,2 @@
1
+ import { createHostComponent } from '@rsmax/runtime';
2
+ export const Label = createHostComponent('label');
@@ -0,0 +1,8 @@
1
+ export declare const alias: {
2
+ id: string;
3
+ className: string;
4
+ style: string;
5
+ for: string;
6
+ animation: string;
7
+ };
8
+ export declare const props: string[];
@@ -0,0 +1,8 @@
1
+ export const alias = {
2
+ id: 'id',
3
+ className: 'class',
4
+ style: 'style',
5
+ for: 'for',
6
+ animation: 'animation',
7
+ };
8
+ export const props = Object.values(alias);