pixuireactcomponents 1.2.0 → 1.2.2

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 (400) hide show
  1. package/README.md +5 -6
  2. package/package.json +9 -66
  3. package/tsconfig.json +27 -13
  4. package/{src/pixUIReactComponents/ui → ui}/components/slapface/Slapface.tsx +17 -17
  5. package/ui/sample/Slapface/SlapfaceDemo.tsx +30 -0
  6. package/.eslintignore +0 -7
  7. package/.eslintrc.js +0 -48
  8. package/.pixiderc/apps.json +0 -12
  9. package/.pixiderc/devel-config.meta.json +0 -23
  10. package/.pixiderc/postinstall.js +0 -17
  11. package/.pixiderc/util.js +0 -136
  12. package/.pixiderc/webpack.js +0 -180
  13. package/faas/helloworld.js +0 -8
  14. package/gen/pbo/pandora_pb.d.ts +0 -1179
  15. package/gen/pbo/pandora_pb.js +0 -10475
  16. package/gen/pbo/pandora_pb_service.d.ts +0 -1317
  17. package/gen/pbo/pandora_pb_service.js +0 -2307
  18. package/gen/pbo/test_pb.d.ts +0 -99
  19. package/gen/pbo/test_pb.js +0 -889
  20. package/gen/pbo/test_pb_service.d.ts +0 -82
  21. package/gen/pbo/test_pb_service.js +0 -117
  22. package/lib/assets/border.png +0 -0
  23. package/lib/assets/check.html +0 -54
  24. package/lib/assets/pixui.png +0 -0
  25. package/lib/assets/preact.png +0 -0
  26. package/lib/check/main.less +0 -63
  27. package/lib/check/main.tsx +0 -42
  28. package/lib/check/tool.js +0 -3
  29. package/lib/check/util.tsx +0 -107
  30. package/lib/dom.ts +0 -16
  31. package/lib/ext.d.ts +0 -95
  32. package/lib/grpc-web/dist/ChunkParser.js +0 -115
  33. package/lib/grpc-web/dist/ChunkParser.js.map +0 -1
  34. package/lib/grpc-web/dist/Code.js +0 -58
  35. package/lib/grpc-web/dist/Code.js.map +0 -1
  36. package/lib/grpc-web/dist/client.js +0 -299
  37. package/lib/grpc-web/dist/client.js.map +0 -1
  38. package/lib/grpc-web/dist/debug.js +0 -16
  39. package/lib/grpc-web/dist/debug.js.map +0 -1
  40. package/lib/grpc-web/dist/detach.js +0 -7
  41. package/lib/grpc-web/dist/detach.js.map +0 -1
  42. package/lib/grpc-web/dist/index.js +0 -29
  43. package/lib/grpc-web/dist/index.js.map +0 -1
  44. package/lib/grpc-web/dist/invoke.js +0 -32
  45. package/lib/grpc-web/dist/invoke.js.map +0 -1
  46. package/lib/grpc-web/dist/message.js +0 -3
  47. package/lib/grpc-web/dist/message.js.map +0 -1
  48. package/lib/grpc-web/dist/metadata.js +0 -5
  49. package/lib/grpc-web/dist/metadata.js.map +0 -1
  50. package/lib/grpc-web/dist/service.js +0 -3
  51. package/lib/grpc-web/dist/service.js.map +0 -1
  52. package/lib/grpc-web/dist/transports/Transport.js +0 -13
  53. package/lib/grpc-web/dist/transports/Transport.js.map +0 -1
  54. package/lib/grpc-web/dist/transports/http/fetch.js +0 -112
  55. package/lib/grpc-web/dist/transports/http/fetch.js.map +0 -1
  56. package/lib/grpc-web/dist/transports/http/http.js +0 -15
  57. package/lib/grpc-web/dist/transports/http/http.js.map +0 -1
  58. package/lib/grpc-web/dist/transports/http/xhr.js +0 -127
  59. package/lib/grpc-web/dist/transports/http/xhr.js.map +0 -1
  60. package/lib/grpc-web/dist/transports/http/xhrUtil.js +0 -37
  61. package/lib/grpc-web/dist/transports/http/xhrUtil.js.map +0 -1
  62. package/lib/grpc-web/dist/transports/websocket/websocket.js +0 -95
  63. package/lib/grpc-web/dist/transports/websocket/websocket.js.map +0 -1
  64. package/lib/grpc-web/dist/typings/ChunkParser.d.ts +0 -17
  65. package/lib/grpc-web/dist/typings/Code.d.ts +0 -20
  66. package/lib/grpc-web/dist/typings/client.d.ts +0 -22
  67. package/lib/grpc-web/dist/typings/debug.d.ts +0 -1
  68. package/lib/grpc-web/dist/typings/detach.d.ts +0 -1
  69. package/lib/grpc-web/dist/typings/index.d.ts +0 -60
  70. package/lib/grpc-web/dist/typings/invoke.d.ts +0 -17
  71. package/lib/grpc-web/dist/typings/message.d.ts +0 -8
  72. package/lib/grpc-web/dist/typings/metadata.d.ts +0 -2
  73. package/lib/grpc-web/dist/typings/service.d.ts +0 -16
  74. package/lib/grpc-web/dist/typings/transports/Transport.d.ts +0 -22
  75. package/lib/grpc-web/dist/typings/transports/http/fetch.d.ts +0 -6
  76. package/lib/grpc-web/dist/typings/transports/http/http.d.ts +0 -5
  77. package/lib/grpc-web/dist/typings/transports/http/xhr.d.ts +0 -27
  78. package/lib/grpc-web/dist/typings/transports/http/xhrUtil.d.ts +0 -3
  79. package/lib/grpc-web/dist/typings/transports/websocket/websocket.d.ts +0 -2
  80. package/lib/grpc-web/dist/typings/unary.d.ts +0 -20
  81. package/lib/grpc-web/dist/typings/util.d.ts +0 -2
  82. package/lib/grpc-web/dist/unary.js +0 -44
  83. package/lib/grpc-web/dist/unary.js.map +0 -1
  84. package/lib/grpc-web/dist/util.js +0 -11
  85. package/lib/grpc-web/dist/util.js.map +0 -1
  86. package/lib/grpcTransport/PixHttp2Transport.ts +0 -104
  87. package/lib/grpcTransport/PixLuaTransport.ts +0 -80
  88. package/lib/pi_component/tinyList/tinyList.js +0 -573
  89. package/lib/pi_component/tinyList/tinyList.tsx +0 -586
  90. package/lib/preact/compat/src/Children.js +0 -26
  91. package/lib/preact/compat/src/PureComponent.js +0 -19
  92. package/lib/preact/compat/src/events.js +0 -36
  93. package/lib/preact/compat/src/forwardRef.js +0 -29
  94. package/lib/preact/compat/src/index.d.ts +0 -121
  95. package/lib/preact/compat/src/index.js +0 -159
  96. package/lib/preact/compat/src/internal.d.ts +0 -45
  97. package/lib/preact/compat/src/memo.js +0 -34
  98. package/lib/preact/compat/src/portals.js +0 -85
  99. package/lib/preact/compat/src/render.js +0 -166
  100. package/lib/preact/compat/src/suspense-list.d.ts +0 -14
  101. package/lib/preact/compat/src/suspense-list.js +0 -127
  102. package/lib/preact/compat/src/suspense.d.ts +0 -15
  103. package/lib/preact/compat/src/suspense.js +0 -165
  104. package/lib/preact/compat/src/util.js +0 -23
  105. package/lib/preact/hooks/src/index.d.ts +0 -133
  106. package/lib/preact/hooks/src/index.js +0 -339
  107. package/lib/preact/hooks/src/internal.d.ts +0 -55
  108. package/lib/preact/src/clone-element.js +0 -27
  109. package/lib/preact/src/compat.ts +0 -0
  110. package/lib/preact/src/component.js +0 -219
  111. package/lib/preact/src/constants.js +0 -3
  112. package/lib/preact/src/create-context.js +0 -55
  113. package/lib/preact/src/create-element.js +0 -102
  114. package/lib/preact/src/css.d.ts +0 -30341
  115. package/lib/preact/src/diff/catch-error.js +0 -41
  116. package/lib/preact/src/diff/children.js +0 -259
  117. package/lib/preact/src/diff/index.js +0 -445
  118. package/lib/preact/src/diff/props.js +0 -163
  119. package/lib/preact/src/index.d.ts +0 -275
  120. package/lib/preact/src/index.js +0 -14
  121. package/lib/preact/src/internal.d.ts +0 -94
  122. package/lib/preact/src/jsx.d.ts +0 -884
  123. package/lib/preact/src/options.js +0 -16
  124. package/lib/preact/src/render.js +0 -98
  125. package/lib/preact/src/util.js +0 -25
  126. package/lib/preact-router/.travis.yml +0 -3
  127. package/lib/preact-router/LICENSE +0 -21
  128. package/lib/preact-router/README.md +0 -254
  129. package/lib/preact-router/index.d.ts +0 -71
  130. package/lib/preact-router/match/index.d.ts +0 -16
  131. package/lib/preact-router/match/package.json +0 -13
  132. package/lib/preact-router/match/src/cjs.js +0 -4
  133. package/lib/preact-router/match/src/index.js +0 -36
  134. package/lib/preact-router/package-lock.json +0 -12330
  135. package/lib/preact-router/package.json +0 -78
  136. package/lib/preact-router/src/cjs.js +0 -11
  137. package/lib/preact-router/src/index.js +0 -270
  138. package/lib/preact-router/src/util.js +0 -87
  139. package/lib/react-window/src/FixedSizeGrid.js +0 -244
  140. package/lib/react-window/src/FixedSizeList.js +0 -130
  141. package/lib/react-window/src/VariableSizeGrid.js +0 -507
  142. package/lib/react-window/src/VariableSizeList.js +0 -316
  143. package/lib/react-window/src/__tests__/FixedSizeGrid.js +0 -1336
  144. package/lib/react-window/src/__tests__/FixedSizeList.js +0 -966
  145. package/lib/react-window/src/__tests__/VariableSizeGrid.js +0 -779
  146. package/lib/react-window/src/__tests__/VariableSizeList.js +0 -442
  147. package/lib/react-window/src/__tests__/__snapshots__/FixedSizeGrid.js.snap +0 -912
  148. package/lib/react-window/src/__tests__/__snapshots__/FixedSizeList.js.snap +0 -568
  149. package/lib/react-window/src/__tests__/__snapshots__/VariableSizeGrid.js.snap +0 -542
  150. package/lib/react-window/src/__tests__/__snapshots__/VariableSizeList.js.snap +0 -331
  151. package/lib/react-window/src/__tests__/areEqual.js +0 -32
  152. package/lib/react-window/src/__tests__/shouldComponentUpdate.js +0 -36
  153. package/lib/react-window/src/areEqual.js +0 -18
  154. package/lib/react-window/src/createGridComponent.js +0 -919
  155. package/lib/react-window/src/createListComponent.js +0 -729
  156. package/lib/react-window/src/domHelpers.js +0 -72
  157. package/lib/react-window/src/index.js +0 -9
  158. package/lib/react-window/src/shallowDiffers.js +0 -17
  159. package/lib/react-window/src/shouldComponentUpdate.js +0 -16
  160. package/lib/react-window/src/test.js.flow +0 -382
  161. package/lib/react-window/src/timer.js +0 -36
  162. package/src/app/demopage.tsx +0 -77
  163. package/src/app/index.html +0 -48
  164. package/src/app/main.tsx +0 -30
  165. package/src/asset/Textures/Alert/bg_tips.png +0 -0
  166. package/src/asset/Textures/Alert/btn_zhedie_a.png +0 -0
  167. package/src/asset/Textures/Alert/com_home_bg_left.png +0 -0
  168. package/src/asset/Textures/Alert/com_home_bg_rightbar.png +0 -0
  169. package/src/asset/Textures/Commons/com_home_bg_a.png +0 -0
  170. package/src/asset/Textures/Commons/com_home_bg_back_top.png +0 -0
  171. package/src/asset/Textures/Commons/com_home_bg_bottombar_sheet.png +0 -0
  172. package/src/asset/Textures/Commons/com_home_bg_list_xiala.png +0 -0
  173. package/src/asset/Textures/Commons/com_home_bg_rightbar_line.png +0 -0
  174. package/src/asset/Textures/Commons/com_home_bg_rightbar_selected.png +0 -0
  175. package/src/asset/Textures/Commons/com_home_bg_touxiang_140.png +0 -0
  176. package/src/asset/Textures/Commons/com_home_bg_touxiang_60.png +0 -0
  177. package/src/asset/Textures/Commons/com_home_bg_touxiang_80.png +0 -0
  178. package/src/asset/Textures/Commons/com_home_btn_back.png +0 -0
  179. package/src/asset/Textures/Commons/com_home_btn_bottombar.png +0 -0
  180. package/src/asset/Textures/Commons/com_home_btn_bottombar_fadongtai.png +0 -0
  181. package/src/asset/Textures/Commons/com_home_btn_close.png +0 -0
  182. package/src/asset/Textures/Commons/com_home_btn_guanzhu_126.png +0 -0
  183. package/src/asset/Textures/Commons/com_home_btn_guanzhu_86.png +0 -0
  184. package/src/asset/Textures/Commons/com_home_btn_left_bianji.png +0 -0
  185. package/src/asset/Textures/Commons/com_home_btn_left_dongtai.png +0 -0
  186. package/src/asset/Textures/Commons/com_home_btn_left_touxiang.png +0 -0
  187. package/src/asset/Textures/Commons/com_home_btn_selet.png +0 -0
  188. package/src/asset/Textures/Commons/com_home_btn_yiguanzhu_126.png +0 -0
  189. package/src/asset/Textures/Commons/com_home_btn_yiguanzhu_86.png +0 -0
  190. package/src/asset/Textures/Commons/com_home_icon_bottombar_fadongtai.png +0 -0
  191. package/src/asset/Textures/Commons/com_home_icon_bottombar_red.png +0 -0
  192. package/src/asset/Textures/Commons/com_home_icon_loading.png +0 -0
  193. package/src/asset/Textures/Commons/com_home_pic_touxiang_moren.png +0 -0
  194. package/src/asset/Textures/Commons/com_home_tab_left_a.png +0 -0
  195. package/src/asset/Textures/Commons/com_home_tab_left_b.png +0 -0
  196. package/src/asset/Textures/Commons/com_home_tab_left_c.png +0 -0
  197. package/src/asset/Textures/Commons/feedItems/gc1_huati_icon_middle_v.png +0 -0
  198. package/src/asset/Textures/Commons/feedItems/gc1_huati_icon_middle_yonghurenzheng.png +0 -0
  199. package/src/asset/Textures/Commons/feedItems/pinglun_bg.png +0 -0
  200. package/src/asset/Textures/Commons/feedItems/pinglun_bg_line.png +0 -0
  201. package/src/asset/Textures/Commons/feedItems/pinglun_bg_middle_chakan.png +0 -0
  202. package/src/asset/Textures/Commons/feedItems/pinglun_bg_middle_input.png +0 -0
  203. package/src/asset/Textures/Commons/feedItems/pinglun_bg_zan.png +0 -0
  204. package/src/asset/Textures/Commons/feedItems/pinglun_btn_middle_input.png +0 -0
  205. package/src/asset/Textures/Commons/feedItems/pinglun_btn_more.png +0 -0
  206. package/src/asset/Textures/Commons/feedItems/pinglun_btn_normal.png +0 -0
  207. package/src/asset/Textures/Commons/feedItems/pinglun_btn_photo_more.png +0 -0
  208. package/src/asset/Textures/Commons/feedItems/pinglun_btn_zhedie_a.png +0 -0
  209. package/src/asset/Textures/Commons/feedItems/pinglun_btn_zhedie_a_shadow.png +0 -0
  210. package/src/asset/Textures/Commons/feedItems/pinglun_btn_zhedie_b_normal.png +0 -0
  211. package/src/asset/Textures/Commons/feedItems/pinglun_btn_zhedie_b_pressed.png +0 -0
  212. package/src/asset/Textures/Commons/feedItems/pinglun_icon_a_normal.png +0 -0
  213. package/src/asset/Textures/Commons/feedItems/pinglun_icon_a_pressed.png +0 -0
  214. package/src/asset/Textures/Commons/feedItems/pinglun_icon_b_normal.png +0 -0
  215. package/src/asset/Textures/Commons/feedItems/pinglun_icon_c_normal.png +0 -0
  216. package/src/asset/Textures/Commons/feedItems/pinglun_icon_d.png +0 -0
  217. package/src/asset/Textures/Commons/feedItems/pinglun_icon_e.png +0 -0
  218. package/src/asset/Textures/Commons/feedItems/pinglun_icon_f_share.png +0 -0
  219. package/src/asset/Textures/Commons/feedItems/pinglun_icon_middle_input_back.png +0 -0
  220. package/src/asset/Textures/Commons/gc1_huati_bg_middle_topbtn.png +0 -0
  221. package/src/asset/Textures/Commons/gc1_huati_bg_middle_topbtn_pressd.png +0 -0
  222. package/src/asset/Textures/Commons/karaoke/rukou_bg_music.png +0 -0
  223. package/src/asset/Textures/Commons/karaoke/rukou_btn_a.png +0 -0
  224. package/src/asset/Textures/Commons/karaoke/rukou_btn_b.png +0 -0
  225. package/src/asset/Textures/Commons/karaoke/rukou_icon_b.png +0 -0
  226. package/src/asset/Textures/Commons/karaoke/rukou_icon_d.png +0 -0
  227. package/src/asset/Textures/Commons/karaoke/rukou_icon_e.png +0 -0
  228. package/src/asset/Textures/Commons/rukou_bg_bottombar_line.png +0 -0
  229. package/src/asset/Textures/Commons/rukou_icon_a.png +0 -0
  230. package/src/asset/Textures/Commons/tc_bianji_tab_a.png +0 -0
  231. package/src/asset/Textures/Commons/tc_zanshang_bg_line.png +0 -0
  232. package/src/asset/Textures/Commons/touxiang_bg_tishikuang.png +0 -0
  233. package/src/asset/Textures/Commons/video/rukou_icon_shipin.png +0 -0
  234. package/src/asset/Textures/Commons/video/xiangce_btn_bofang.png +0 -0
  235. package/src/asset/Textures/Commons/voice/rukou_icon_yuyin.png +0 -0
  236. package/src/asset/Textures/Commons/voice/tc_yuyin_bg.png +0 -0
  237. package/src/asset/Textures/Commons/voice/tc_yuyin_bg_load.png +0 -0
  238. package/src/asset/Textures/Commons/voice/tc_yuyin_bg_xinhao_a.png +0 -0
  239. package/src/asset/Textures/Commons/voice/tc_yuyin_bg_xinhao_b.png +0 -0
  240. package/src/asset/Textures/Commons/xiangce_icon_bottombar_gulita.png +0 -0
  241. package/src/asset/Textures/SocialSecond/com_tc_bg.png +0 -0
  242. package/src/asset/Textures/SocialSecond/com_tc_bg_bottom.png +0 -0
  243. package/src/asset/Textures/SocialSecond/com_tc_bg_input.png +0 -0
  244. package/src/asset/Textures/SocialSecond/com_tc_bg_tips.png +0 -0
  245. package/src/asset/Textures/SocialSecond/com_tc_bg_topbar_a.png +0 -0
  246. package/src/asset/Textures/SocialSecond/com_tc_bg_topbar_line.png +0 -0
  247. package/src/asset/Textures/SocialSecond/com_tc_bg_upload_photo.png +0 -0
  248. package/src/asset/Textures/SocialSecond/com_tc_bg_upload_photo_line.png +0 -0
  249. package/src/asset/Textures/SocialSecond/com_tc_bg_zhaopian_line.png +0 -0
  250. package/src/asset/Textures/SocialSecond/com_tc_btn.png +0 -0
  251. package/src/asset/Textures/SocialSecond/com_tc_btn_close.png +0 -0
  252. package/src/asset/Textures/SocialSecond/com_tc_btn_upload_photo.png +0 -0
  253. package/src/asset/Textures/SocialSecond/com_tc_radio_normal.png +0 -0
  254. package/src/asset/Textures/SocialSecond/com_tc_radio_normal_@slice_0.png +0 -0
  255. package/src/asset/Textures/SocialSecond/com_tc_radio_selected.png +0 -0
  256. package/src/asset/Textures/SocialSecond/com_tc_tab_a.png +0 -0
  257. package/src/asset/Textures/SocialSecond/gc1_huati_bg_middle_topbar.png +0 -0
  258. package/src/asset/Textures/SocialSecond/gc1_huati_bg_middle_topbar_pre.png +0 -0
  259. package/src/asset/Textures/SocialSecond/newmessage_bg_left_line.png +0 -0
  260. package/src/asset/Textures/SocialSecond/newmessage_bg_left_normal.png +0 -0
  261. package/src/asset/Textures/SocialSecond/newmessage_bg_left_selected.png +0 -0
  262. package/src/asset/Textures/SocialSecond/newmessage_bg_middle_new.png +0 -0
  263. package/src/asset/Textures/SocialSecond/paihang_bg_list.png +0 -0
  264. package/src/asset/Textures/SocialSecond/paihang_bg_list_line.png +0 -0
  265. package/src/asset/Textures/SocialSecond/paihang_bg_list_my.png +0 -0
  266. package/src/asset/Textures/SocialSecond/paihang_bg_list_top.png +0 -0
  267. package/src/asset/Textures/SocialSecond/paihang_bg_topbar_a.png +0 -0
  268. package/src/asset/Textures/SocialSecond/paihang_icon_topbar_selected.png +0 -0
  269. package/src/asset/Textures/SocialSecond/paihang_pic_1.png +0 -0
  270. package/src/asset/Textures/SocialSecond/paihang_pic_2.png +0 -0
  271. package/src/asset/Textures/SocialSecond/tc_fadongtai_btn_close.png +0 -0
  272. package/src/asset/Textures/SocialSecond/tc_guanzhu_bg_topbar.png +0 -0
  273. package/src/asset/Textures/SocialSecond/tc_guanzhu_bg_topbar_selected.png +0 -0
  274. package/src/asset/Textures/SocialSecond/tc_liwu_bg.png +0 -0
  275. package/src/asset/Textures/SocialSecond/tc_liwu_bg_daoju.png +0 -0
  276. package/src/asset/Textures/SocialSecond/tc_liwu_btn_a.png +0 -0
  277. package/src/asset/Textures/SocialSecond/tc_liwu_btn_b.png +0 -0
  278. package/src/asset/Textures/SocialSecond/tc_liwu_btn_c.png +0 -0
  279. package/src/asset/Textures/SocialSecond/tc_liwu_pic_daoju1.png +0 -0
  280. package/src/asset/Textures/SocialSecond/tc_liwu_pic_daoju2.png +0 -0
  281. package/src/asset/Textures/SocialSecond/tc_liwu_pic_daoju3.png +0 -0
  282. package/src/asset/Textures/SocialSecond/tc_pinglun_bg.png +0 -0
  283. package/src/asset/Textures/SocialSecond/tc_shipin_tianjiashipin.png +0 -0
  284. package/src/asset/Textures/SocialSecond/tc_yuyin_bg.png +0 -0
  285. package/src/asset/Textures/SocialSecond/tc_yuyin_bg_delete.png +0 -0
  286. package/src/asset/Textures/SocialSecond/tc_yuyin_bg_xinhao_a.png +0 -0
  287. package/src/asset/Textures/SocialSecond/tc_yuyin_bg_xinhao_b.png +0 -0
  288. package/src/asset/Textures/SocialSecond/tc_yuyin_star.png +0 -0
  289. package/src/asset/Textures/SocialSecond/tc_yuyin_stop.png +0 -0
  290. package/src/asset/Textures/SocialSecond/tc_zanshang_bg_line.png +0 -0
  291. package/src/asset/Textures/SocialSecond/touxiang_bg_tishikuang.png +0 -0
  292. package/src/asset/Textures/SocialSecond/xiangce_huadong.png +0 -0
  293. package/src/asset/Textures/SocialSecond/xiangce_huadong_xuanzhong.png +0 -0
  294. package/src/asset/Textures/SocialSecond/xiangce_icon_xiazai.png +0 -0
  295. package/src/asset/Textures/SocialVideo/com_home_btn_close.png +0 -0
  296. package/src/asset/Textures/SocialVideo/tc_shipin_bg_guodu.png +0 -0
  297. package/src/asset/Textures/SocialVideo/tc_shipin_jinduanjian.png +0 -0
  298. package/src/asset/Textures/SocialVideo/tc_shipin_jindutiao.png +0 -0
  299. package/src/asset/Textures/SocialVideo/tc_shipin_jindutiao_hui.png +0 -0
  300. package/src/asset/Textures/SocialVideo/tc_shipin_play.png +0 -0
  301. package/src/asset/Textures/SocialVideo/tc_shipin_play_big.png +0 -0
  302. package/src/asset/Textures/SocialVideo/tc_shipin_stop.png +0 -0
  303. package/src/asset/laugh.gif +0 -0
  304. package/src/asset/npms.png +0 -0
  305. package/src/asset/pixui.png +0 -0
  306. package/src/asset/preact.png +0 -0
  307. package/src/asset/template.html +0 -47
  308. package/src/common/frame/appsettings.js +0 -111
  309. package/src/common/frame/common.js +0 -17
  310. package/src/common/frame/platform-api-callback.js +0 -341
  311. package/src/common/frame/platform-api.d.ts +0 -156
  312. package/src/common/frame/platform-api.js +0 -479
  313. package/src/common/main.less +0 -119
  314. package/src/pixUIReactComponents/README.md +0 -8
  315. package/src/pixUIReactComponents/package.json +0 -11
  316. package/src/pixUIReactComponents/tsconfig.json +0 -45
  317. package/src/pixUIReactComponents/ui/sample/Slapface/SlapfaceDemo.tsx +0 -30
  318. package/src/pixUIReactUtils/GenerateConstructorAndGeterSeter.js +0 -227
  319. package/src/pixUIReactUtils/MakeImage.js +0 -207
  320. package/src/pixUIReactUtils/README.md +0 -124
  321. package/src/pixUIReactUtils/Version.js +0 -3
  322. package/src/pixUIReactUtils/img/makeImage.png +0 -0
  323. package/src/pixUIReactUtils/index.js +0 -1
  324. package/src/pixUIReactUtils/package.json +0 -16
  325. package/src/preprocess/index.html +0 -48
  326. package/src/preprocess/main.tsx +0 -17
  327. package/src/preprocess/preprocesspage.tsx +0 -41
  328. /package/{src/pixUIReactComponents/cmdAfterTsBuild.js → cmdAfterTsBuild.js} +0 -0
  329. /package/{src/pixUIReactComponents/index.js → index.js} +0 -0
  330. /package/{src/pixUIReactComponents/tools → tools}/EventDispatcherJs.tsx +0 -0
  331. /package/{src/pixUIReactComponents/tools → tools}/Logger.tsx +0 -0
  332. /package/{src/pixUIReactComponents/tools → tools}/img/logger.png +0 -0
  333. /package/{src/pixUIReactComponents/tools → tools}/tools.md +0 -0
  334. /package/{src/pixUIReactComponents/ui → ui}/components/bulletscreen/BulletItemAnimation.tsx +0 -0
  335. /package/{src/pixUIReactComponents/ui → ui}/components/bulletscreen/BulletScreenAnimation.tsx +0 -0
  336. /package/{src/pixUIReactComponents/ui → ui}/components/bulletscreen/bullet.less +0 -0
  337. /package/{src/pixUIReactComponents/ui → ui}/components/button/Button.tsx +0 -0
  338. /package/{src/pixUIReactComponents/ui → ui}/components/carousel/Carousel.tsx +0 -0
  339. /package/{src/pixUIReactComponents/ui → ui}/components/checkBox/CheckBox.tsx +0 -0
  340. /package/{src/pixUIReactComponents/ui → ui}/components/dropdown/Dropdown.tsx +0 -0
  341. /package/{src/pixUIReactComponents/ui → ui}/components/dropdown/DropdownOptionUI.tsx +0 -0
  342. /package/{src/pixUIReactComponents/ui → ui}/components/dropdown/DropdownSpreadMainUI.tsx +0 -0
  343. /package/{src/pixUIReactComponents/ui → ui}/components/dropdown/DropdownUnspreadMainUI.tsx +0 -0
  344. /package/{src/pixUIReactComponents/ui → ui}/components/gradient/GradientText.tsx +0 -0
  345. /package/{src/pixUIReactComponents/ui → ui}/components/outlinetext/OutlineText.tsx +0 -0
  346. /package/{src/pixUIReactComponents/ui → ui}/components/progress/Progress.tsx +0 -0
  347. /package/{src/pixUIReactComponents/ui → ui}/components/slapface/less/Slapface.less +0 -0
  348. /package/{src/pixUIReactComponents/ui → ui}/components/slider/Slider.tsx +0 -0
  349. /package/{src/pixUIReactComponents/ui → ui}/components/tab/Tab.tsx +0 -0
  350. /package/{src/pixUIReactComponents/ui → ui}/components/tab/Tabs.tsx +0 -0
  351. /package/{src/pixUIReactComponents/ui → ui}/components/togglegroup/ToggleGroup.tsx +0 -0
  352. /package/{src/pixUIReactComponents/ui → ui}/components/videoplayer/VideoPlayer.tsx +0 -0
  353. /package/{src/pixUIReactComponents/ui → ui}/components/waterfallcomponent/WaterfallComponent.jsx +0 -0
  354. /package/{src/pixUIReactComponents/ui → ui}/components/waterfallcomponent/less/WaterfallComponent.less +0 -0
  355. /package/{src/pixUIReactComponents/ui → ui}/sample/Images.tsx +0 -0
  356. /package/{src/pixUIReactComponents/ui → ui}/sample/OutlineText/OutlineDemo.tsx +0 -0
  357. /package/{src/pixUIReactComponents/ui → ui}/sample/asset/btn_close.png +0 -0
  358. /package/{src/pixUIReactComponents/ui → ui}/sample/asset/changtai_button.jpg +0 -0
  359. /package/{src/pixUIReactComponents/ui → ui}/sample/asset/checkbox0.png +0 -0
  360. /package/{src/pixUIReactComponents/ui → ui}/sample/asset/checkbox1.png +0 -0
  361. /package/{src/pixUIReactComponents/ui → ui}/sample/asset/data_arrow_down.png +0 -0
  362. /package/{src/pixUIReactComponents/ui → ui}/sample/asset/data_arrow_up.png +0 -0
  363. /package/{src/pixUIReactComponents/ui → ui}/sample/asset/dot.png +0 -0
  364. /package/{src/pixUIReactComponents/ui → ui}/sample/asset/inner.png +0 -0
  365. /package/{src/pixUIReactComponents/ui → ui}/sample/asset/item_reddot.png +0 -0
  366. /package/{src/pixUIReactComponents/ui → ui}/sample/asset/loading.png +0 -0
  367. /package/{src/pixUIReactComponents/ui → ui}/sample/asset/money_dropdown.png +0 -0
  368. /package/{src/pixUIReactComponents/ui → ui}/sample/asset/money_dropdownall.png +0 -0
  369. /package/{src/pixUIReactComponents/ui → ui}/sample/asset/outer.png +0 -0
  370. /package/{src/pixUIReactComponents/ui → ui}/sample/asset/slapface_samplepic1.png +0 -0
  371. /package/{src/pixUIReactComponents/ui → ui}/sample/asset/slapface_samplepic2.png +0 -0
  372. /package/{src/pixUIReactComponents/ui → ui}/sample/asset/slapface_samplepic3.png +0 -0
  373. /package/{src/pixUIReactComponents/ui → ui}/sample/asset/slapface_samplepic4.png +0 -0
  374. /package/{src/pixUIReactComponents/ui → ui}/sample/asset/slapface_samplepic5.png +0 -0
  375. /package/{src/pixUIReactComponents/ui → ui}/sample/asset/slapface_samplepic6.png +0 -0
  376. /package/{src/pixUIReactComponents/ui → ui}/sample/asset/tab_choosed.png +0 -0
  377. /package/{src/pixUIReactComponents/ui → ui}/sample/asset/tabs_bg.png +0 -0
  378. /package/{src/pixUIReactComponents/ui → ui}/sample/asset/video_pause.png +0 -0
  379. /package/{src/pixUIReactComponents/ui → ui}/sample/asset/video_play.png +0 -0
  380. /package/{src/pixUIReactComponents/ui → ui}/sample/asset/video_reload.png +0 -0
  381. /package/{src/pixUIReactComponents/ui → ui}/sample/asset/xuanfu_button.jpg +0 -0
  382. /package/{src/pixUIReactComponents/ui → ui}/sample/asset/yaxia_button.jpg +0 -0
  383. /package/{src/pixUIReactComponents/ui → ui}/sample/bulletscreen/BulletDemo.tsx +0 -0
  384. /package/{src/pixUIReactComponents/ui → ui}/sample/button/ButtonDemo.tsx +0 -0
  385. /package/{src/pixUIReactComponents/ui → ui}/sample/carousel/carouselDemo.tsx +0 -0
  386. /package/{src/pixUIReactComponents/ui → ui}/sample/checkBox/checkBoxDemo.tsx +0 -0
  387. /package/{src/pixUIReactComponents/ui → ui}/sample/dropdown/DropdownDemo.tsx +0 -0
  388. /package/{src/pixUIReactComponents/ui → ui}/sample/dropdown/MoneyDropdownOption.tsx +0 -0
  389. /package/{src/pixUIReactComponents/ui → ui}/sample/dropdown/MoneyDropdownSpreadMain.tsx +0 -0
  390. /package/{src/pixUIReactComponents/ui → ui}/sample/dropdown/MoneyDropdownUnspreadMain.tsx +0 -0
  391. /package/{src/pixUIReactComponents/ui → ui}/sample/gradient/GradientDemo.tsx +0 -0
  392. /package/{src/pixUIReactComponents/ui → ui}/sample/less/video.less +0 -0
  393. /package/{src/pixUIReactComponents/ui → ui}/sample/progress/ProgressDemo.tsx +0 -0
  394. /package/{src/pixUIReactComponents/ui → ui}/sample/slider/SliderDemo.tsx +0 -0
  395. /package/{src/pixUIReactComponents/ui → ui}/sample/tab/TabDemo.tsx +0 -0
  396. /package/{src/pixUIReactComponents/ui → ui}/sample/tab/TopTab.tsx +0 -0
  397. /package/{src/pixUIReactComponents/ui → ui}/sample/togglegroup/ToggleGroupDemo.tsx +0 -0
  398. /package/{src/pixUIReactComponents/ui → ui}/sample/videoplayer/VideoPlayerDemo.tsx +0 -0
  399. /package/{src/pixUIReactComponents/ui → ui}/sample/waterfallcomponent/WaterfallComponentDemo.jsx +0 -0
  400. /package/{src/pixUIReactComponents/ui → ui}/ui.md +0 -0
@@ -1,227 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- /* 对于一个tsx的class文件,自动生成constructor、setter 和 getter
4
- commands:
5
- fileName xxx
6
- 其中, xxx 的范围是[1, 7].
7
- xxx & 100 == 100: 生成一个默认赋值的constructor
8
- xxx & 10 == 10: 生成setter
9
- xxx & 1 == 1: 生成getter
10
-
11
-
12
- 需要你先自己预定义好这样一个class文件
13
- class RealTimeMatchInfo{
14
- bo: number // 赛制bo1, bo3, bo5
15
- location: string
16
- round: number // 当前是第几场, 从1开始
17
- matchId: number
18
- seasonId: number
19
- stageId: number
20
- status: number // 状态 0: 未开始; 1: 进行中; 2: 已结束
21
- teamA: number // 战队A id
22
- teamAScore: number // 战队A 获胜的游戏单局数
23
- teamB: number // 战队B id
24
- teamBScore: number // 战队B 获胜的游戏单局数
25
- winTeam: number // 系列赛胜利战队ID
26
- }
27
- */
28
- const fs = require('fs')
29
- const path = require('path')
30
- const child_process = require("child_process")
31
-
32
-
33
- const args = process.argv
34
- console.log("generateCode args:", args)
35
-
36
- if(args.length != 4){
37
- console.error("the num of params is wrong!")
38
- process.exit()
39
- }
40
-
41
- let _filePath = args[2]
42
- let _mode = parseInt(args[3], 2)
43
-
44
-
45
- if(!isFileExist(_filePath)){
46
- console.error("class 文件不存在!")
47
- process.exit()
48
- }
49
- if(_mode < 1 || _mode > 7){
50
- console.error("模式不正确,请重新输入")
51
- process.exit()
52
- }
53
-
54
-
55
- let isGenerateConstructor = (_mode & 0b100) == 0b100
56
- let isGenerateSetter = (_mode & 0b10) == 0b10
57
- let isGenerateGetter = (_mode & 0b1) == 0b1
58
-
59
- let lastStartSearchIndex = 0 // 开始查找的起始行,用于处理一个文件里不止一个class的情况
60
- let results = []
61
- while(true){
62
- let result = checkClassFileFormat(_filePath, lastStartSearchIndex)
63
- if(result.ret){
64
- results.push(result)
65
- lastStartSearchIndex = result.end + 1
66
- }
67
- else{
68
- break
69
- }
70
- }
71
-
72
- // console.log(results)
73
- if(results.length > 0){
74
- generateTargetFile(isGenerateConstructor, isGenerateSetter, isGenerateGetter, results)
75
- const newFilePath = _filePath + "2"
76
- child_process.execSync(`rm ${_filePath}`)
77
- child_process.execSync(`mv ${newFilePath} ${_filePath}`)
78
- console.log("generate constructor or setter or getter successfully~~~")
79
- }
80
- else{
81
- const _message = "class file's format is error!"
82
- console.error(_message)
83
- process.exit()
84
- }
85
-
86
-
87
- function generateTargetFile(hasConstructor, hasSetter, hasGetter, results){
88
- const out = _filePath + "2"
89
- fs.writeFileSync(out, "")
90
-
91
- for(let i = 0; i < results.length; i++){
92
- const result = results[i]
93
- const _copyStartIndex = i == 0 ? 0 : results[i - 1].end + 1
94
- const _copyFinalIndex = i == results.length - 1 ? result.lines.length : result.end + 1
95
-
96
- const _start = result.start
97
- const _end = result.end
98
- const _lines = result.lines
99
- const _keys = parseKeys(_start, _end, _lines)
100
-
101
-
102
- for(let i = _copyStartIndex; i < _end; i++) fs.writeFileSync(out, _lines[i] + "\n", {flag: 'a+'})
103
-
104
- if(hasConstructor) addConstructorPart(out, _keys)
105
- if(hasSetter) addSetterPart(out, _keys)
106
- if(hasGetter) addGetterPart(out, _keys)
107
-
108
- for(let i = _end; i < _copyFinalIndex; i++) fs.writeFileSync(out, _lines[i] + "\n", {flag: 'a+'})
109
- }
110
- }
111
-
112
- function parseKeys(start, end, lines){
113
- let fields = []
114
- for(let i = start; i < end ; i++){
115
- const current = lines[i]
116
- const matchResult = current.match(/^\s*(\w+): (\w+(\[\])*)/)
117
- if(matchResult != null){
118
- const fieldName = matchResult[1]
119
- const fieldType = matchResult[2]
120
- const defalutValue = getDefaultValue(fieldType)
121
- fields.push({name:fieldName, type: fieldType, value: defalutValue})
122
- }
123
- }
124
- return fields
125
- }
126
-
127
- function getDefaultValue(_type){
128
- if(_type == "string"){
129
- return '""'
130
- }
131
- else if(_type == "number"){
132
- return -1
133
- }
134
- else if(_type == "boolean"){
135
- return false
136
- }
137
- else if(_type.endsWith("[]")){
138
- return "[]"
139
- }
140
- else{
141
- return `new ${_type}()`
142
- }
143
- }
144
-
145
- function addConstructorPart(out, keys){
146
- fs.writeFileSync(out, "\n\tconstructor(){\n", {flag: 'a+'})
147
- for(let i = 0; i < keys.length; i++){
148
- const _key = keys[i]
149
- const _name = _key.name
150
- const _type = _key.type
151
- const _defaultValue = _key.value
152
- fs.writeFileSync(out, `\t\tthis.${_name} = ${_defaultValue}\n`, {flag: 'a+'})
153
- }
154
-
155
- fs.writeFileSync(out, "\t}\n\n", {flag: 'a+'})
156
- }
157
-
158
- function addSetterPart(out, keys){
159
- for(let i = 0; i < keys.length; i++){
160
- const _key = keys[i]
161
- const _name = _key.name
162
- const _type = _key.type
163
-
164
- const _funcName = "set" + _name.slice(0, 1).toUpperCase() + _name.slice(1)
165
- fs.writeFileSync(out, `\t${_funcName}(${_name}: ${_type}){\n`, {flag: 'a+'})
166
- fs.writeFileSync(out, `\t\tthis.${_name} = ${_name}\n`, {flag: 'a+'})
167
- fs.writeFileSync(out, `\t}\n\n`, {flag: 'a+'})
168
- }
169
- }
170
-
171
- function addGetterPart(out, keys){
172
- for(let i = 0; i < keys.length; i++){
173
- const _key = keys[i]
174
- const _name = _key.name
175
- const _type = _key.type
176
-
177
- const _funcName = "get" + _name.slice(0, 1).toUpperCase() + _name.slice(1)
178
- fs.writeFileSync(out, `\t${_funcName}(){\n`, {flag: 'a+'})
179
- fs.writeFileSync(out, `\t\treturn this.${_name}\n`, {flag: 'a+'})
180
- fs.writeFileSync(out, `\t}\n\n`, {flag: 'a+'})
181
- }
182
- }
183
-
184
- function checkClassFileFormat(path, searchStartIndex){
185
- const fileContent = fs.readFileSync(path, {encoding: 'utf-8'})
186
- const lines = fileContent.split("\n")
187
-
188
- let start = findStartLineIndex(lines, searchStartIndex)
189
- let end = findEndLineIndex(lines, searchStartIndex)
190
- let isOK = true
191
- if(start == -1 || end == -1) isOK = false
192
-
193
- return { ret: isOK, start: start, end: end, lines: lines}
194
- }
195
-
196
- function findStartLineIndex(lines, searchStartIndex){
197
- for(let i = searchStartIndex; i < lines.length; i++){
198
- const current = lines[i]
199
- // console.log(current)
200
- if(current.match(/class \w+{/)){
201
- return i
202
- }
203
- }
204
- return -1
205
- }
206
-
207
- function findEndLineIndex(lines, searchStartIndex){
208
- for(let i = searchStartIndex; i < lines.length; i++){
209
- const current = lines[i]
210
- if(current.match(/}/)){
211
- return i
212
- }
213
- }
214
-
215
- return -1
216
- }
217
-
218
- function isFileExist(path){
219
- let stat
220
- try{
221
- stat = fs.lstatSync(path)
222
- }
223
- catch(e){
224
- return false
225
- }
226
- return stat.isFile()
227
- }
@@ -1,207 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- // 自动生成图集, 生成一个Images.ts文件,引用目标目录下的所有图片, 方便直接使用
4
- /*
5
- commands:
6
- create imgDirectoryPath
7
- update imgDirectoryPath
8
- */
9
-
10
- const fs = require('fs');
11
- const path = require('path');
12
-
13
- // 支持的命令
14
- const Commands = {
15
- create: 'create', //创建图集
16
- update: 'update', //更新图集
17
- };
18
-
19
- const args = process.argv;
20
- console.log('makeImage args:', args);
21
- if (args.length != 4) {
22
- console.error('the num of params is wrong!');
23
- process.exit();
24
- }
25
-
26
- const command = args[2];
27
- const imgsDirectoryPath = args[3];
28
-
29
- const _unifiedPath = preProcessPath(imgsDirectoryPath);
30
- switch (command) {
31
- case Commands.create:
32
- createImages(_unifiedPath);
33
- break;
34
- case Commands.update:
35
- updateImages(_unifiedPath);
36
- break;
37
- default:
38
- console.log('unsupport this command!!!');
39
- }
40
-
41
- function preProcessPath(directoryPath) {
42
- let _path = directoryPath;
43
- if (isStartWithLetter(_path)) {
44
- _path = './' + _path;
45
- }
46
- else if (_path.startsWith('../')) {
47
- _path = './' + _path;
48
- }
49
-
50
- if (_path.endsWith('/')) _path = _path.substring(0, _path.length - 1);
51
-
52
- return _path;
53
- }
54
-
55
- function isStartWithLetter(path) {
56
- if (path.length == 0) return false;
57
-
58
- let firstChar = path.charAt(0);
59
- if ((firstChar >= 'a' && firstChar <= 'z') || (firstChar >= 'A' && firstChar <= 'Z')) return true;
60
- return false;
61
- }
62
-
63
- function createImages(directoryPath) {
64
- if (!isDirectoryExist(directoryPath)) {
65
- console.error('images directory is wrong!');
66
- return;
67
- }
68
-
69
- let imgUrls = [];
70
- collectImageUrls(directoryPath, imgUrls);
71
- console.log(imgUrls);
72
- generateImage(directoryPath, imgUrls);
73
- }
74
-
75
- function isDirectoryExist(directory) {
76
- let stat;
77
- try {
78
- stat = fs.lstatSync(directory);
79
- }
80
- catch (e) {
81
- return false;
82
- }
83
-
84
- return stat.isDirectory();
85
- }
86
-
87
- function collectImageUrls(directoryPath, imgUrls) {
88
- const files = fs.readdirSync(directoryPath);
89
- for (let i = 0; i < files.length; i++) {
90
- let current = path.join(directoryPath, files[i]).replaceAll('\\', '/');
91
-
92
- if (isDirectoryExist(current)) { // if it's a directory ,recursive
93
- collectImageUrls(current, imgUrls);
94
- }
95
- else {
96
- if (!isAnImg(current)) continue;
97
-
98
- if (isStartWithLetter(current) || current.startsWith('../')) current = './' + current;
99
- imgUrls.push(current);
100
- }
101
- }
102
- }
103
-
104
- function isAnImg(imgUrl) {
105
- if (imgUrl.endsWith('.png') || imgUrl.endsWith('.jpg') || imgUrl.endsWith('.jpeg') || imgUrl.endsWith('.gif')) return true;
106
- return false;
107
- }
108
-
109
- function generateImage(directoryPath, imgUrls, keyMap) {
110
- let out = 'Images.ts';
111
- fs.writeFileSync(out, '');
112
- // write import
113
- for (let i = 0; i < imgUrls.length; i++) {
114
- let current = imgUrls[i];
115
- let imgKey = generateImgKey(directoryPath, current);
116
- if (current.startsWith('../')) current = './' + current;
117
- // console.warn(directoryPath, current, imgKey)
118
- fs.writeFileSync(out, `import ${imgKey} from "${current}";\n`, { flag: 'a+' });
119
- }
120
- fs.writeFileSync(out, '\n\n', { flag: 'a+' });
121
-
122
- //write export
123
- fs.writeFileSync(out, '\nexport const Images = {\n', { flag: 'a+' });
124
- for (let i = 0; i < imgUrls.length; i++) {
125
- const current = imgUrls[i];
126
- let imgKey = generateImgKey(directoryPath, current);
127
- let imgNewname = keyMap == null || keyMap.get(imgKey) == undefined ? imgKey : keyMap.get(imgKey);
128
- fs.writeFileSync(out, ` ${imgNewname}: ${imgKey},\n`, { flag: 'a+' });
129
- }
130
- fs.writeFileSync(out, '}\n\n', { flag: 'a+' });
131
- console.log(keyMap == null ? 'generate' : 'update', ' Images.ts successfully!');
132
- }
133
-
134
- function generateImgKey(directoryPath, imgUrl) { // imgsDirectoryPath is prefix of imgUrl
135
- let key = imgUrl.substring(directoryPath.length);
136
-
137
- key = key.replace(/\//g, '_');
138
- if (key.startsWith('_')) key = key.substring(1);
139
-
140
- let extname = path.extname(key);
141
- key = key.substring(0, key.length - extname.length);
142
-
143
- return key;
144
- }
145
-
146
- function updateImages(directoryPath) {
147
- if (!isDirectoryExist(directoryPath)) {
148
- console.error('images directory is wrong!');
149
- return;
150
- }
151
-
152
- let imagePath = 'Images.ts';
153
- if (!isFileExist(imagePath)) {
154
- console.error("there is no Images.ts in current path, can't match update commmand!");
155
- return;
156
- }
157
-
158
- let keyMaps = readOldImagesInfo(imagePath);
159
- let imgUrls = [];
160
- collectImageUrls(directoryPath, imgUrls);
161
- console.log(imgUrls);
162
- generateImage(directoryPath, imgUrls, keyMaps);
163
- }
164
-
165
- function isFileExist(path) {
166
- let stat;
167
- try {
168
- stat = fs.lstatSync(path);
169
- }
170
- catch (e) {
171
- return false;
172
- }
173
- return stat.isFile();
174
- }
175
-
176
- function readOldImagesInfo(imagePath) {
177
- let imageContent = fs.readFileSync(imagePath, { encoding: 'utf8' });
178
- const lines = imageContent.split('\n');
179
-
180
- let importNames = [];
181
- for (let i = 0; i < lines.length; i++) {
182
- let currentLine = lines[i];
183
- if (currentLine.startsWith('import')) {
184
- const result = currentLine.match(/import (\w+) from/);
185
- let importName = result[1];
186
- importNames.push(importName);
187
- }
188
- }
189
- console.log(importNames);
190
-
191
- let importName2UseName = new Map();
192
- for (let i = 0; i < lines.length; i++) {
193
- let currentLine = lines[i];
194
- const result = currentLine.match(/(\w+): (\w+)/);
195
- if (result == null) continue;
196
- const useName = result[1];
197
- const importName = result[2];
198
- importName2UseName.set(importName, useName);
199
- }
200
-
201
- if (importName2UseName.size != importNames.length) {
202
- console.log('the Images.ts’s format is not correct!');
203
- console.log('importNames len:', importNames.length, ' useNames len:', importName2UseName.size);
204
- return;
205
- }
206
- return importName2UseName;
207
- }
@@ -1,124 +0,0 @@
1
- # 脚本工具
2
- ### 1.MakeImage.js
3
- React 里用于一键生成图集文件
4
- 用法有2个命令:
5
- * node MakeImage.js create path
6
- * node MakeImage.js update path
7
-
8
- (path: 一个文件夹的路径,可以按绝对路径写法,形如:/Users/zhengyanan/Desktop/work_git/LgameVideoGameTest/src/asset/Textures/VideoGame;也可以按相对当前位置的路径,形如../../LgameVideoGameTest/src/asset/Textures/VideoGame。)
9
-
10
- 第一条命令是创建一个Images.tsx文件,可以直接代码中使用。如图:
11
- ![](./img/makeImage.png)
12
-
13
- 第二条命令是更新Images.tsx文件,用于增加图片的时候,更新Images.tsx。如上图所示,创建之后按上面的要求,只能改Images的key值(这个已足够满足需求,因为这个key值,代码中才可能用到)。使用update可以保留这些你的改动,无需重新改代码中的引用。如果没改动的话,那就无所谓,直接重新create即可。
14
-
15
- ### 2. GenerateConstructorAndGeterSeter.js
16
- 先定义好类的字段后,一键生成该类的构造函数,getter方法 和 setter方法。
17
-
18
- 用法只有一个命令:
19
-
20
- * node GenerateConstructorAndGeterSeter.js xxx.tsx 110
21
-
22
- 其中,xxx.tsx指的是待生成的类文件;110是选项,3个bit位依次表示是否生成构造函数、setter、getter。
23
-
24
-
25
- 例如,先定义好类的字段,如下:
26
-
27
- ```
28
- class RealTimeMatchInfo{
29
- bo: number // 赛制bo1, bo3, bo5
30
- location: string
31
- round: number // 当前是第几场, 从1开始
32
- matchId: number
33
- seasonId: number
34
- stageId: number
35
- status: number // 状态 0: 未开始; 1: 进行中; 2: 已结束
36
- teamA: number // 战队A id
37
- teamAScore: number // 战队A 获胜的游戏单局数
38
- teamB: number // 战队B id
39
- teamBScore: number // 战队B 获胜的游戏单局数
40
- winTeam: number // 系列赛胜利战队ID
41
- }
42
- ```
43
-
44
- 然后执行 上述命令,即可自动生成构造函数 和 setter方法,生成的结果如下:
45
-
46
- ```
47
- class RealTimeMatchInfo{
48
- bo: number // 赛制bo1, bo3, bo5
49
- location: string
50
- round: number // 当前是第几场, 从1开始
51
- matchId: number
52
- seasonId: number
53
- stageId: number
54
- status: number // 状态 0: 未开始; 1: 进行中; 2: 已结束
55
- teamA: number // 战队A id
56
- teamAScore: number // 战队A 获胜的游戏单局数
57
- teamB: number // 战队B id
58
- teamBScore: number // 战队B 获胜的游戏单局数
59
- winTeam: number // 系列赛胜利战队ID
60
-
61
- constructor(){
62
- this.bo = -1
63
- this.location = ""
64
- this.round = -1
65
- this.matchId = -1
66
- this.seasonId = -1
67
- this.stageId = -1
68
- this.status = -1
69
- this.teamA = -1
70
- this.teamAScore = -1
71
- this.teamB = -1
72
- this.teamBScore = -1
73
- this.winTeam = -1
74
- }
75
-
76
- setBo(bo: number){
77
- this.bo = bo
78
- }
79
-
80
- setLocation(location: string){
81
- this.location = location
82
- }
83
-
84
- setRound(round: number){
85
- this.round = round
86
- }
87
-
88
- setMatchId(matchId: number){
89
- this.matchId = matchId
90
- }
91
-
92
- setSeasonId(seasonId: number){
93
- this.seasonId = seasonId
94
- }
95
-
96
- setStageId(stageId: number){
97
- this.stageId = stageId
98
- }
99
-
100
- setStatus(status: number){
101
- this.status = status
102
- }
103
-
104
- setTeamA(teamA: number){
105
- this.teamA = teamA
106
- }
107
-
108
- setTeamAScore(teamAScore: number){
109
- this.teamAScore = teamAScore
110
- }
111
-
112
- setTeamB(teamB: number){
113
- this.teamB = teamB
114
- }
115
-
116
- setTeamBScore(teamBScore: number){
117
- this.teamBScore = teamBScore
118
- }
119
-
120
- setWinTeam(winTeam: number){
121
- this.winTeam = winTeam
122
- }
123
- }
124
- ```
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- console.log("version: 1.1.8")
@@ -1 +0,0 @@
1
- console.log('welcome to use pixui react utils!')
@@ -1,16 +0,0 @@
1
- {
2
- "name": "pixuireactutils",
3
- "version": "1.1.8",
4
- "description": "pixui react script tools",
5
- "main": "index.js",
6
- "bin": {
7
- "pmakeimage": "./MakeImage.js",
8
- "pgencode": "./GenerateConstructorAndGeterSeter.js",
9
- "pversion": "./Version.js"
10
- },
11
- "scripts": {
12
- "test": "echo \"Error: no test specified\" && exit 1"
13
- },
14
- "author": "hardenzheng",
15
- "license": "ISC"
16
- }
@@ -1,48 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" flex="default"/>
5
- <style>
6
- body {
7
- /*background-color: #0c85d0;*/
8
- display: flex;
9
- /* flex-direction: column; */
10
- align-items: center;
11
- justify-content: center;
12
- width: 100%;
13
- height: 100%;
14
- overflow: hidden ;
15
- margin: 0px;
16
- padding: 0px;
17
- box-sizing: border-box;
18
- position: relative;
19
- }
20
-
21
- a{
22
- color:aliceblue;
23
-
24
- }
25
-
26
- div{
27
- display: flex;
28
- /* flex-direction: column; */
29
- box-sizing: border-box;
30
- }
31
-
32
- .frame {
33
- /* border: 2px solid #990000; */
34
- display: flex;
35
- flex-direction: column;
36
- /* flex-basis: content; */
37
- /*justify-content: space-evenly;*/
38
- width: 100%;
39
- height: 100%;
40
- }
41
-
42
- </style>
43
-
44
- </head>
45
- <body>
46
- <div id="container" class="frame"></div>
47
- </body>
48
- </html>
@@ -1,17 +0,0 @@
1
- import { h } from 'preact';
2
- import { renderDom } from 'lib/dom';
3
- import preact from '../asset/preact.png';
4
- import {PreprocessPage} from './preprocesspage'
5
-
6
- window.addEventListener('load', () => {
7
-
8
- });
9
-
10
- let render = () => {
11
- renderDom(
12
- <PreprocessPage/>,
13
- document.getElementById('container')!
14
- );
15
- };
16
-
17
- render();
@@ -1,41 +0,0 @@
1
- import { h, Component, CSSProperties } from "preact";
2
- import { platformAPI } from "../common/frame/platform-api"
3
-
4
- const bgStyle: CSSProperties = {
5
- width: '100%',
6
- height:'100%',
7
- backgroundColor: 'green',
8
- display: 'flex',
9
- flexDirection: 'column',
10
- alignItems: 'center',
11
- justifyContent: 'flex-start'
12
- }
13
-
14
- export class PreprocessPage extends Component<any, any>
15
- {
16
- constructor(props){
17
- super(props);
18
- this.state = {
19
- index : 0,
20
- }
21
- }
22
-
23
- componentWillMount(){
24
- console.log("PreprocessPage componentWillMount");
25
- console.log("appId:" + platformAPI.getAppId());
26
- console.log("appKey:" + platformAPI.getAppKey());
27
-
28
- window.onclose = () => {
29
- console.log("PreprocessPage onclose")
30
- };
31
- }
32
-
33
- render(){
34
- return (
35
- <div>
36
- <h1>PreprocessPage | appId {platformAPI.getAppId()} | appKey {platformAPI.getAppKey()}</h1>
37
- </div>
38
- );
39
- }
40
-
41
- }
File without changes