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.
- package/README.md +5 -6
- package/package.json +9 -66
- package/tsconfig.json +27 -13
- package/{src/pixUIReactComponents/ui → ui}/components/slapface/Slapface.tsx +17 -17
- package/ui/sample/Slapface/SlapfaceDemo.tsx +30 -0
- package/.eslintignore +0 -7
- package/.eslintrc.js +0 -48
- package/.pixiderc/apps.json +0 -12
- package/.pixiderc/devel-config.meta.json +0 -23
- package/.pixiderc/postinstall.js +0 -17
- package/.pixiderc/util.js +0 -136
- package/.pixiderc/webpack.js +0 -180
- package/faas/helloworld.js +0 -8
- package/gen/pbo/pandora_pb.d.ts +0 -1179
- package/gen/pbo/pandora_pb.js +0 -10475
- package/gen/pbo/pandora_pb_service.d.ts +0 -1317
- package/gen/pbo/pandora_pb_service.js +0 -2307
- package/gen/pbo/test_pb.d.ts +0 -99
- package/gen/pbo/test_pb.js +0 -889
- package/gen/pbo/test_pb_service.d.ts +0 -82
- package/gen/pbo/test_pb_service.js +0 -117
- package/lib/assets/border.png +0 -0
- package/lib/assets/check.html +0 -54
- package/lib/assets/pixui.png +0 -0
- package/lib/assets/preact.png +0 -0
- package/lib/check/main.less +0 -63
- package/lib/check/main.tsx +0 -42
- package/lib/check/tool.js +0 -3
- package/lib/check/util.tsx +0 -107
- package/lib/dom.ts +0 -16
- package/lib/ext.d.ts +0 -95
- package/lib/grpc-web/dist/ChunkParser.js +0 -115
- package/lib/grpc-web/dist/ChunkParser.js.map +0 -1
- package/lib/grpc-web/dist/Code.js +0 -58
- package/lib/grpc-web/dist/Code.js.map +0 -1
- package/lib/grpc-web/dist/client.js +0 -299
- package/lib/grpc-web/dist/client.js.map +0 -1
- package/lib/grpc-web/dist/debug.js +0 -16
- package/lib/grpc-web/dist/debug.js.map +0 -1
- package/lib/grpc-web/dist/detach.js +0 -7
- package/lib/grpc-web/dist/detach.js.map +0 -1
- package/lib/grpc-web/dist/index.js +0 -29
- package/lib/grpc-web/dist/index.js.map +0 -1
- package/lib/grpc-web/dist/invoke.js +0 -32
- package/lib/grpc-web/dist/invoke.js.map +0 -1
- package/lib/grpc-web/dist/message.js +0 -3
- package/lib/grpc-web/dist/message.js.map +0 -1
- package/lib/grpc-web/dist/metadata.js +0 -5
- package/lib/grpc-web/dist/metadata.js.map +0 -1
- package/lib/grpc-web/dist/service.js +0 -3
- package/lib/grpc-web/dist/service.js.map +0 -1
- package/lib/grpc-web/dist/transports/Transport.js +0 -13
- package/lib/grpc-web/dist/transports/Transport.js.map +0 -1
- package/lib/grpc-web/dist/transports/http/fetch.js +0 -112
- package/lib/grpc-web/dist/transports/http/fetch.js.map +0 -1
- package/lib/grpc-web/dist/transports/http/http.js +0 -15
- package/lib/grpc-web/dist/transports/http/http.js.map +0 -1
- package/lib/grpc-web/dist/transports/http/xhr.js +0 -127
- package/lib/grpc-web/dist/transports/http/xhr.js.map +0 -1
- package/lib/grpc-web/dist/transports/http/xhrUtil.js +0 -37
- package/lib/grpc-web/dist/transports/http/xhrUtil.js.map +0 -1
- package/lib/grpc-web/dist/transports/websocket/websocket.js +0 -95
- package/lib/grpc-web/dist/transports/websocket/websocket.js.map +0 -1
- package/lib/grpc-web/dist/typings/ChunkParser.d.ts +0 -17
- package/lib/grpc-web/dist/typings/Code.d.ts +0 -20
- package/lib/grpc-web/dist/typings/client.d.ts +0 -22
- package/lib/grpc-web/dist/typings/debug.d.ts +0 -1
- package/lib/grpc-web/dist/typings/detach.d.ts +0 -1
- package/lib/grpc-web/dist/typings/index.d.ts +0 -60
- package/lib/grpc-web/dist/typings/invoke.d.ts +0 -17
- package/lib/grpc-web/dist/typings/message.d.ts +0 -8
- package/lib/grpc-web/dist/typings/metadata.d.ts +0 -2
- package/lib/grpc-web/dist/typings/service.d.ts +0 -16
- package/lib/grpc-web/dist/typings/transports/Transport.d.ts +0 -22
- package/lib/grpc-web/dist/typings/transports/http/fetch.d.ts +0 -6
- package/lib/grpc-web/dist/typings/transports/http/http.d.ts +0 -5
- package/lib/grpc-web/dist/typings/transports/http/xhr.d.ts +0 -27
- package/lib/grpc-web/dist/typings/transports/http/xhrUtil.d.ts +0 -3
- package/lib/grpc-web/dist/typings/transports/websocket/websocket.d.ts +0 -2
- package/lib/grpc-web/dist/typings/unary.d.ts +0 -20
- package/lib/grpc-web/dist/typings/util.d.ts +0 -2
- package/lib/grpc-web/dist/unary.js +0 -44
- package/lib/grpc-web/dist/unary.js.map +0 -1
- package/lib/grpc-web/dist/util.js +0 -11
- package/lib/grpc-web/dist/util.js.map +0 -1
- package/lib/grpcTransport/PixHttp2Transport.ts +0 -104
- package/lib/grpcTransport/PixLuaTransport.ts +0 -80
- package/lib/pi_component/tinyList/tinyList.js +0 -573
- package/lib/pi_component/tinyList/tinyList.tsx +0 -586
- package/lib/preact/compat/src/Children.js +0 -26
- package/lib/preact/compat/src/PureComponent.js +0 -19
- package/lib/preact/compat/src/events.js +0 -36
- package/lib/preact/compat/src/forwardRef.js +0 -29
- package/lib/preact/compat/src/index.d.ts +0 -121
- package/lib/preact/compat/src/index.js +0 -159
- package/lib/preact/compat/src/internal.d.ts +0 -45
- package/lib/preact/compat/src/memo.js +0 -34
- package/lib/preact/compat/src/portals.js +0 -85
- package/lib/preact/compat/src/render.js +0 -166
- package/lib/preact/compat/src/suspense-list.d.ts +0 -14
- package/lib/preact/compat/src/suspense-list.js +0 -127
- package/lib/preact/compat/src/suspense.d.ts +0 -15
- package/lib/preact/compat/src/suspense.js +0 -165
- package/lib/preact/compat/src/util.js +0 -23
- package/lib/preact/hooks/src/index.d.ts +0 -133
- package/lib/preact/hooks/src/index.js +0 -339
- package/lib/preact/hooks/src/internal.d.ts +0 -55
- package/lib/preact/src/clone-element.js +0 -27
- package/lib/preact/src/compat.ts +0 -0
- package/lib/preact/src/component.js +0 -219
- package/lib/preact/src/constants.js +0 -3
- package/lib/preact/src/create-context.js +0 -55
- package/lib/preact/src/create-element.js +0 -102
- package/lib/preact/src/css.d.ts +0 -30341
- package/lib/preact/src/diff/catch-error.js +0 -41
- package/lib/preact/src/diff/children.js +0 -259
- package/lib/preact/src/diff/index.js +0 -445
- package/lib/preact/src/diff/props.js +0 -163
- package/lib/preact/src/index.d.ts +0 -275
- package/lib/preact/src/index.js +0 -14
- package/lib/preact/src/internal.d.ts +0 -94
- package/lib/preact/src/jsx.d.ts +0 -884
- package/lib/preact/src/options.js +0 -16
- package/lib/preact/src/render.js +0 -98
- package/lib/preact/src/util.js +0 -25
- package/lib/preact-router/.travis.yml +0 -3
- package/lib/preact-router/LICENSE +0 -21
- package/lib/preact-router/README.md +0 -254
- package/lib/preact-router/index.d.ts +0 -71
- package/lib/preact-router/match/index.d.ts +0 -16
- package/lib/preact-router/match/package.json +0 -13
- package/lib/preact-router/match/src/cjs.js +0 -4
- package/lib/preact-router/match/src/index.js +0 -36
- package/lib/preact-router/package-lock.json +0 -12330
- package/lib/preact-router/package.json +0 -78
- package/lib/preact-router/src/cjs.js +0 -11
- package/lib/preact-router/src/index.js +0 -270
- package/lib/preact-router/src/util.js +0 -87
- package/lib/react-window/src/FixedSizeGrid.js +0 -244
- package/lib/react-window/src/FixedSizeList.js +0 -130
- package/lib/react-window/src/VariableSizeGrid.js +0 -507
- package/lib/react-window/src/VariableSizeList.js +0 -316
- package/lib/react-window/src/__tests__/FixedSizeGrid.js +0 -1336
- package/lib/react-window/src/__tests__/FixedSizeList.js +0 -966
- package/lib/react-window/src/__tests__/VariableSizeGrid.js +0 -779
- package/lib/react-window/src/__tests__/VariableSizeList.js +0 -442
- package/lib/react-window/src/__tests__/__snapshots__/FixedSizeGrid.js.snap +0 -912
- package/lib/react-window/src/__tests__/__snapshots__/FixedSizeList.js.snap +0 -568
- package/lib/react-window/src/__tests__/__snapshots__/VariableSizeGrid.js.snap +0 -542
- package/lib/react-window/src/__tests__/__snapshots__/VariableSizeList.js.snap +0 -331
- package/lib/react-window/src/__tests__/areEqual.js +0 -32
- package/lib/react-window/src/__tests__/shouldComponentUpdate.js +0 -36
- package/lib/react-window/src/areEqual.js +0 -18
- package/lib/react-window/src/createGridComponent.js +0 -919
- package/lib/react-window/src/createListComponent.js +0 -729
- package/lib/react-window/src/domHelpers.js +0 -72
- package/lib/react-window/src/index.js +0 -9
- package/lib/react-window/src/shallowDiffers.js +0 -17
- package/lib/react-window/src/shouldComponentUpdate.js +0 -16
- package/lib/react-window/src/test.js.flow +0 -382
- package/lib/react-window/src/timer.js +0 -36
- package/src/app/demopage.tsx +0 -77
- package/src/app/index.html +0 -48
- package/src/app/main.tsx +0 -30
- package/src/asset/Textures/Alert/bg_tips.png +0 -0
- package/src/asset/Textures/Alert/btn_zhedie_a.png +0 -0
- package/src/asset/Textures/Alert/com_home_bg_left.png +0 -0
- package/src/asset/Textures/Alert/com_home_bg_rightbar.png +0 -0
- package/src/asset/Textures/Commons/com_home_bg_a.png +0 -0
- package/src/asset/Textures/Commons/com_home_bg_back_top.png +0 -0
- package/src/asset/Textures/Commons/com_home_bg_bottombar_sheet.png +0 -0
- package/src/asset/Textures/Commons/com_home_bg_list_xiala.png +0 -0
- package/src/asset/Textures/Commons/com_home_bg_rightbar_line.png +0 -0
- package/src/asset/Textures/Commons/com_home_bg_rightbar_selected.png +0 -0
- package/src/asset/Textures/Commons/com_home_bg_touxiang_140.png +0 -0
- package/src/asset/Textures/Commons/com_home_bg_touxiang_60.png +0 -0
- package/src/asset/Textures/Commons/com_home_bg_touxiang_80.png +0 -0
- package/src/asset/Textures/Commons/com_home_btn_back.png +0 -0
- package/src/asset/Textures/Commons/com_home_btn_bottombar.png +0 -0
- package/src/asset/Textures/Commons/com_home_btn_bottombar_fadongtai.png +0 -0
- package/src/asset/Textures/Commons/com_home_btn_close.png +0 -0
- package/src/asset/Textures/Commons/com_home_btn_guanzhu_126.png +0 -0
- package/src/asset/Textures/Commons/com_home_btn_guanzhu_86.png +0 -0
- package/src/asset/Textures/Commons/com_home_btn_left_bianji.png +0 -0
- package/src/asset/Textures/Commons/com_home_btn_left_dongtai.png +0 -0
- package/src/asset/Textures/Commons/com_home_btn_left_touxiang.png +0 -0
- package/src/asset/Textures/Commons/com_home_btn_selet.png +0 -0
- package/src/asset/Textures/Commons/com_home_btn_yiguanzhu_126.png +0 -0
- package/src/asset/Textures/Commons/com_home_btn_yiguanzhu_86.png +0 -0
- package/src/asset/Textures/Commons/com_home_icon_bottombar_fadongtai.png +0 -0
- package/src/asset/Textures/Commons/com_home_icon_bottombar_red.png +0 -0
- package/src/asset/Textures/Commons/com_home_icon_loading.png +0 -0
- package/src/asset/Textures/Commons/com_home_pic_touxiang_moren.png +0 -0
- package/src/asset/Textures/Commons/com_home_tab_left_a.png +0 -0
- package/src/asset/Textures/Commons/com_home_tab_left_b.png +0 -0
- package/src/asset/Textures/Commons/com_home_tab_left_c.png +0 -0
- package/src/asset/Textures/Commons/feedItems/gc1_huati_icon_middle_v.png +0 -0
- package/src/asset/Textures/Commons/feedItems/gc1_huati_icon_middle_yonghurenzheng.png +0 -0
- package/src/asset/Textures/Commons/feedItems/pinglun_bg.png +0 -0
- package/src/asset/Textures/Commons/feedItems/pinglun_bg_line.png +0 -0
- package/src/asset/Textures/Commons/feedItems/pinglun_bg_middle_chakan.png +0 -0
- package/src/asset/Textures/Commons/feedItems/pinglun_bg_middle_input.png +0 -0
- package/src/asset/Textures/Commons/feedItems/pinglun_bg_zan.png +0 -0
- package/src/asset/Textures/Commons/feedItems/pinglun_btn_middle_input.png +0 -0
- package/src/asset/Textures/Commons/feedItems/pinglun_btn_more.png +0 -0
- package/src/asset/Textures/Commons/feedItems/pinglun_btn_normal.png +0 -0
- package/src/asset/Textures/Commons/feedItems/pinglun_btn_photo_more.png +0 -0
- package/src/asset/Textures/Commons/feedItems/pinglun_btn_zhedie_a.png +0 -0
- package/src/asset/Textures/Commons/feedItems/pinglun_btn_zhedie_a_shadow.png +0 -0
- package/src/asset/Textures/Commons/feedItems/pinglun_btn_zhedie_b_normal.png +0 -0
- package/src/asset/Textures/Commons/feedItems/pinglun_btn_zhedie_b_pressed.png +0 -0
- package/src/asset/Textures/Commons/feedItems/pinglun_icon_a_normal.png +0 -0
- package/src/asset/Textures/Commons/feedItems/pinglun_icon_a_pressed.png +0 -0
- package/src/asset/Textures/Commons/feedItems/pinglun_icon_b_normal.png +0 -0
- package/src/asset/Textures/Commons/feedItems/pinglun_icon_c_normal.png +0 -0
- package/src/asset/Textures/Commons/feedItems/pinglun_icon_d.png +0 -0
- package/src/asset/Textures/Commons/feedItems/pinglun_icon_e.png +0 -0
- package/src/asset/Textures/Commons/feedItems/pinglun_icon_f_share.png +0 -0
- package/src/asset/Textures/Commons/feedItems/pinglun_icon_middle_input_back.png +0 -0
- package/src/asset/Textures/Commons/gc1_huati_bg_middle_topbtn.png +0 -0
- package/src/asset/Textures/Commons/gc1_huati_bg_middle_topbtn_pressd.png +0 -0
- package/src/asset/Textures/Commons/karaoke/rukou_bg_music.png +0 -0
- package/src/asset/Textures/Commons/karaoke/rukou_btn_a.png +0 -0
- package/src/asset/Textures/Commons/karaoke/rukou_btn_b.png +0 -0
- package/src/asset/Textures/Commons/karaoke/rukou_icon_b.png +0 -0
- package/src/asset/Textures/Commons/karaoke/rukou_icon_d.png +0 -0
- package/src/asset/Textures/Commons/karaoke/rukou_icon_e.png +0 -0
- package/src/asset/Textures/Commons/rukou_bg_bottombar_line.png +0 -0
- package/src/asset/Textures/Commons/rukou_icon_a.png +0 -0
- package/src/asset/Textures/Commons/tc_bianji_tab_a.png +0 -0
- package/src/asset/Textures/Commons/tc_zanshang_bg_line.png +0 -0
- package/src/asset/Textures/Commons/touxiang_bg_tishikuang.png +0 -0
- package/src/asset/Textures/Commons/video/rukou_icon_shipin.png +0 -0
- package/src/asset/Textures/Commons/video/xiangce_btn_bofang.png +0 -0
- package/src/asset/Textures/Commons/voice/rukou_icon_yuyin.png +0 -0
- package/src/asset/Textures/Commons/voice/tc_yuyin_bg.png +0 -0
- package/src/asset/Textures/Commons/voice/tc_yuyin_bg_load.png +0 -0
- package/src/asset/Textures/Commons/voice/tc_yuyin_bg_xinhao_a.png +0 -0
- package/src/asset/Textures/Commons/voice/tc_yuyin_bg_xinhao_b.png +0 -0
- package/src/asset/Textures/Commons/xiangce_icon_bottombar_gulita.png +0 -0
- package/src/asset/Textures/SocialSecond/com_tc_bg.png +0 -0
- package/src/asset/Textures/SocialSecond/com_tc_bg_bottom.png +0 -0
- package/src/asset/Textures/SocialSecond/com_tc_bg_input.png +0 -0
- package/src/asset/Textures/SocialSecond/com_tc_bg_tips.png +0 -0
- package/src/asset/Textures/SocialSecond/com_tc_bg_topbar_a.png +0 -0
- package/src/asset/Textures/SocialSecond/com_tc_bg_topbar_line.png +0 -0
- package/src/asset/Textures/SocialSecond/com_tc_bg_upload_photo.png +0 -0
- package/src/asset/Textures/SocialSecond/com_tc_bg_upload_photo_line.png +0 -0
- package/src/asset/Textures/SocialSecond/com_tc_bg_zhaopian_line.png +0 -0
- package/src/asset/Textures/SocialSecond/com_tc_btn.png +0 -0
- package/src/asset/Textures/SocialSecond/com_tc_btn_close.png +0 -0
- package/src/asset/Textures/SocialSecond/com_tc_btn_upload_photo.png +0 -0
- package/src/asset/Textures/SocialSecond/com_tc_radio_normal.png +0 -0
- package/src/asset/Textures/SocialSecond/com_tc_radio_normal_@slice_0.png +0 -0
- package/src/asset/Textures/SocialSecond/com_tc_radio_selected.png +0 -0
- package/src/asset/Textures/SocialSecond/com_tc_tab_a.png +0 -0
- package/src/asset/Textures/SocialSecond/gc1_huati_bg_middle_topbar.png +0 -0
- package/src/asset/Textures/SocialSecond/gc1_huati_bg_middle_topbar_pre.png +0 -0
- package/src/asset/Textures/SocialSecond/newmessage_bg_left_line.png +0 -0
- package/src/asset/Textures/SocialSecond/newmessage_bg_left_normal.png +0 -0
- package/src/asset/Textures/SocialSecond/newmessage_bg_left_selected.png +0 -0
- package/src/asset/Textures/SocialSecond/newmessage_bg_middle_new.png +0 -0
- package/src/asset/Textures/SocialSecond/paihang_bg_list.png +0 -0
- package/src/asset/Textures/SocialSecond/paihang_bg_list_line.png +0 -0
- package/src/asset/Textures/SocialSecond/paihang_bg_list_my.png +0 -0
- package/src/asset/Textures/SocialSecond/paihang_bg_list_top.png +0 -0
- package/src/asset/Textures/SocialSecond/paihang_bg_topbar_a.png +0 -0
- package/src/asset/Textures/SocialSecond/paihang_icon_topbar_selected.png +0 -0
- package/src/asset/Textures/SocialSecond/paihang_pic_1.png +0 -0
- package/src/asset/Textures/SocialSecond/paihang_pic_2.png +0 -0
- package/src/asset/Textures/SocialSecond/tc_fadongtai_btn_close.png +0 -0
- package/src/asset/Textures/SocialSecond/tc_guanzhu_bg_topbar.png +0 -0
- package/src/asset/Textures/SocialSecond/tc_guanzhu_bg_topbar_selected.png +0 -0
- package/src/asset/Textures/SocialSecond/tc_liwu_bg.png +0 -0
- package/src/asset/Textures/SocialSecond/tc_liwu_bg_daoju.png +0 -0
- package/src/asset/Textures/SocialSecond/tc_liwu_btn_a.png +0 -0
- package/src/asset/Textures/SocialSecond/tc_liwu_btn_b.png +0 -0
- package/src/asset/Textures/SocialSecond/tc_liwu_btn_c.png +0 -0
- package/src/asset/Textures/SocialSecond/tc_liwu_pic_daoju1.png +0 -0
- package/src/asset/Textures/SocialSecond/tc_liwu_pic_daoju2.png +0 -0
- package/src/asset/Textures/SocialSecond/tc_liwu_pic_daoju3.png +0 -0
- package/src/asset/Textures/SocialSecond/tc_pinglun_bg.png +0 -0
- package/src/asset/Textures/SocialSecond/tc_shipin_tianjiashipin.png +0 -0
- package/src/asset/Textures/SocialSecond/tc_yuyin_bg.png +0 -0
- package/src/asset/Textures/SocialSecond/tc_yuyin_bg_delete.png +0 -0
- package/src/asset/Textures/SocialSecond/tc_yuyin_bg_xinhao_a.png +0 -0
- package/src/asset/Textures/SocialSecond/tc_yuyin_bg_xinhao_b.png +0 -0
- package/src/asset/Textures/SocialSecond/tc_yuyin_star.png +0 -0
- package/src/asset/Textures/SocialSecond/tc_yuyin_stop.png +0 -0
- package/src/asset/Textures/SocialSecond/tc_zanshang_bg_line.png +0 -0
- package/src/asset/Textures/SocialSecond/touxiang_bg_tishikuang.png +0 -0
- package/src/asset/Textures/SocialSecond/xiangce_huadong.png +0 -0
- package/src/asset/Textures/SocialSecond/xiangce_huadong_xuanzhong.png +0 -0
- package/src/asset/Textures/SocialSecond/xiangce_icon_xiazai.png +0 -0
- package/src/asset/Textures/SocialVideo/com_home_btn_close.png +0 -0
- package/src/asset/Textures/SocialVideo/tc_shipin_bg_guodu.png +0 -0
- package/src/asset/Textures/SocialVideo/tc_shipin_jinduanjian.png +0 -0
- package/src/asset/Textures/SocialVideo/tc_shipin_jindutiao.png +0 -0
- package/src/asset/Textures/SocialVideo/tc_shipin_jindutiao_hui.png +0 -0
- package/src/asset/Textures/SocialVideo/tc_shipin_play.png +0 -0
- package/src/asset/Textures/SocialVideo/tc_shipin_play_big.png +0 -0
- package/src/asset/Textures/SocialVideo/tc_shipin_stop.png +0 -0
- package/src/asset/laugh.gif +0 -0
- package/src/asset/npms.png +0 -0
- package/src/asset/pixui.png +0 -0
- package/src/asset/preact.png +0 -0
- package/src/asset/template.html +0 -47
- package/src/common/frame/appsettings.js +0 -111
- package/src/common/frame/common.js +0 -17
- package/src/common/frame/platform-api-callback.js +0 -341
- package/src/common/frame/platform-api.d.ts +0 -156
- package/src/common/frame/platform-api.js +0 -479
- package/src/common/main.less +0 -119
- package/src/pixUIReactComponents/README.md +0 -8
- package/src/pixUIReactComponents/package.json +0 -11
- package/src/pixUIReactComponents/tsconfig.json +0 -45
- package/src/pixUIReactComponents/ui/sample/Slapface/SlapfaceDemo.tsx +0 -30
- package/src/pixUIReactUtils/GenerateConstructorAndGeterSeter.js +0 -227
- package/src/pixUIReactUtils/MakeImage.js +0 -207
- package/src/pixUIReactUtils/README.md +0 -124
- package/src/pixUIReactUtils/Version.js +0 -3
- package/src/pixUIReactUtils/img/makeImage.png +0 -0
- package/src/pixUIReactUtils/index.js +0 -1
- package/src/pixUIReactUtils/package.json +0 -16
- package/src/preprocess/index.html +0 -48
- package/src/preprocess/main.tsx +0 -17
- package/src/preprocess/preprocesspage.tsx +0 -41
- /package/{src/pixUIReactComponents/cmdAfterTsBuild.js → cmdAfterTsBuild.js} +0 -0
- /package/{src/pixUIReactComponents/index.js → index.js} +0 -0
- /package/{src/pixUIReactComponents/tools → tools}/EventDispatcherJs.tsx +0 -0
- /package/{src/pixUIReactComponents/tools → tools}/Logger.tsx +0 -0
- /package/{src/pixUIReactComponents/tools → tools}/img/logger.png +0 -0
- /package/{src/pixUIReactComponents/tools → tools}/tools.md +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/components/bulletscreen/BulletItemAnimation.tsx +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/components/bulletscreen/BulletScreenAnimation.tsx +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/components/bulletscreen/bullet.less +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/components/button/Button.tsx +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/components/carousel/Carousel.tsx +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/components/checkBox/CheckBox.tsx +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/components/dropdown/Dropdown.tsx +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/components/dropdown/DropdownOptionUI.tsx +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/components/dropdown/DropdownSpreadMainUI.tsx +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/components/dropdown/DropdownUnspreadMainUI.tsx +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/components/gradient/GradientText.tsx +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/components/outlinetext/OutlineText.tsx +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/components/progress/Progress.tsx +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/components/slapface/less/Slapface.less +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/components/slider/Slider.tsx +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/components/tab/Tab.tsx +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/components/tab/Tabs.tsx +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/components/togglegroup/ToggleGroup.tsx +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/components/videoplayer/VideoPlayer.tsx +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/components/waterfallcomponent/WaterfallComponent.jsx +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/components/waterfallcomponent/less/WaterfallComponent.less +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/sample/Images.tsx +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/sample/OutlineText/OutlineDemo.tsx +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/sample/asset/btn_close.png +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/sample/asset/changtai_button.jpg +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/sample/asset/checkbox0.png +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/sample/asset/checkbox1.png +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/sample/asset/data_arrow_down.png +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/sample/asset/data_arrow_up.png +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/sample/asset/dot.png +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/sample/asset/inner.png +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/sample/asset/item_reddot.png +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/sample/asset/loading.png +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/sample/asset/money_dropdown.png +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/sample/asset/money_dropdownall.png +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/sample/asset/outer.png +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/sample/asset/slapface_samplepic1.png +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/sample/asset/slapface_samplepic2.png +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/sample/asset/slapface_samplepic3.png +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/sample/asset/slapface_samplepic4.png +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/sample/asset/slapface_samplepic5.png +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/sample/asset/slapface_samplepic6.png +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/sample/asset/tab_choosed.png +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/sample/asset/tabs_bg.png +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/sample/asset/video_pause.png +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/sample/asset/video_play.png +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/sample/asset/video_reload.png +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/sample/asset/xuanfu_button.jpg +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/sample/asset/yaxia_button.jpg +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/sample/bulletscreen/BulletDemo.tsx +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/sample/button/ButtonDemo.tsx +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/sample/carousel/carouselDemo.tsx +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/sample/checkBox/checkBoxDemo.tsx +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/sample/dropdown/DropdownDemo.tsx +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/sample/dropdown/MoneyDropdownOption.tsx +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/sample/dropdown/MoneyDropdownSpreadMain.tsx +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/sample/dropdown/MoneyDropdownUnspreadMain.tsx +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/sample/gradient/GradientDemo.tsx +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/sample/less/video.less +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/sample/progress/ProgressDemo.tsx +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/sample/slider/SliderDemo.tsx +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/sample/tab/TabDemo.tsx +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/sample/tab/TopTab.tsx +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/sample/togglegroup/ToggleGroupDemo.tsx +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/sample/videoplayer/VideoPlayerDemo.tsx +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/sample/waterfallcomponent/WaterfallComponentDemo.jsx +0 -0
- /package/{src/pixUIReactComponents/ui → ui}/ui.md +0 -0
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
// package: mb
|
|
2
|
-
// file: test.proto
|
|
3
|
-
|
|
4
|
-
import * as test_pb from "./test_pb";
|
|
5
|
-
import {grpc} from "@improbable-eng/grpc-web";
|
|
6
|
-
|
|
7
|
-
type TestServicePing = {
|
|
8
|
-
readonly methodName: string;
|
|
9
|
-
readonly service: typeof TestService;
|
|
10
|
-
readonly requestStream: false;
|
|
11
|
-
readonly responseStream: false;
|
|
12
|
-
readonly requestType: typeof test_pb.PingMsg;
|
|
13
|
-
readonly responseType: typeof test_pb.PingMsg;
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
type TestServiceBiStream = {
|
|
17
|
-
readonly methodName: string;
|
|
18
|
-
readonly service: typeof TestService;
|
|
19
|
-
readonly requestStream: false;
|
|
20
|
-
readonly responseStream: true;
|
|
21
|
-
readonly requestType: typeof test_pb.StreamRequest;
|
|
22
|
-
readonly responseType: typeof test_pb.StreamResponse;
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
export class TestService {
|
|
26
|
-
static readonly serviceName: string;
|
|
27
|
-
static readonly Ping: TestServicePing;
|
|
28
|
-
static readonly BiStream: TestServiceBiStream;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export type ServiceError = { message: string, code: number; metadata: grpc.Metadata }
|
|
32
|
-
export type Status = { details: string, code: number; metadata: grpc.Metadata }
|
|
33
|
-
|
|
34
|
-
interface UnaryResponse {
|
|
35
|
-
cancel(): void;
|
|
36
|
-
}
|
|
37
|
-
interface ResponseStream<T> {
|
|
38
|
-
cancel(): void;
|
|
39
|
-
on(type: 'data', handler: (message: T) => void): ResponseStream<T>;
|
|
40
|
-
on(type: 'end', handler: (status?: Status) => void): ResponseStream<T>;
|
|
41
|
-
on(type: 'status', handler: (status: Status) => void): ResponseStream<T>;
|
|
42
|
-
}
|
|
43
|
-
interface RequestStream<T> {
|
|
44
|
-
write(message: T): RequestStream<T>;
|
|
45
|
-
end(): void;
|
|
46
|
-
cancel(): void;
|
|
47
|
-
on(type: 'end', handler: (status?: Status) => void): RequestStream<T>;
|
|
48
|
-
on(type: 'status', handler: (status: Status) => void): RequestStream<T>;
|
|
49
|
-
}
|
|
50
|
-
interface BidirectionalStream<ReqT, ResT> {
|
|
51
|
-
write(message: ReqT): BidirectionalStream<ReqT, ResT>;
|
|
52
|
-
end(): void;
|
|
53
|
-
cancel(): void;
|
|
54
|
-
on(type: 'data', handler: (message: ResT) => void): BidirectionalStream<ReqT, ResT>;
|
|
55
|
-
on(type: 'end', handler: (status?: Status) => void): BidirectionalStream<ReqT, ResT>;
|
|
56
|
-
on(type: 'status', handler: (status: Status) => void): BidirectionalStream<ReqT, ResT>;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
export class TestServiceClient {
|
|
60
|
-
readonly serviceHost: string;
|
|
61
|
-
|
|
62
|
-
constructor(serviceHost: string, options?: grpc.RpcOptions);
|
|
63
|
-
ping(
|
|
64
|
-
requestMessage: test_pb.PingMsg,
|
|
65
|
-
metadata: grpc.Metadata,
|
|
66
|
-
callback: (error: ServiceError|null, responseMessage: test_pb.PingMsg|null) => void
|
|
67
|
-
): UnaryResponse;
|
|
68
|
-
async pingAsync(
|
|
69
|
-
requestMessage: test_pb.PingMsg,
|
|
70
|
-
metadata?: grpc.Metadata,
|
|
71
|
-
): Promise<{
|
|
72
|
-
err:ServiceError|null;
|
|
73
|
-
value:test_pb.PingMsg;
|
|
74
|
-
}>;
|
|
75
|
-
|
|
76
|
-
ping(
|
|
77
|
-
requestMessage: test_pb.PingMsg,
|
|
78
|
-
callback: (error: ServiceError|null, responseMessage: test_pb.PingMsg|null) => void
|
|
79
|
-
): UnaryResponse;
|
|
80
|
-
biStream(requestMessage: test_pb.StreamRequest, metadata?: grpc.Metadata): ResponseStream<test_pb.StreamResponse>;
|
|
81
|
-
}
|
|
82
|
-
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
// package: mb
|
|
2
|
-
// file: test.proto
|
|
3
|
-
|
|
4
|
-
var test_pb = require("./test_pb");
|
|
5
|
-
var grpc = require("@improbable-eng/grpc-web").grpc;
|
|
6
|
-
|
|
7
|
-
var TestService = (function () {
|
|
8
|
-
function TestService() {}
|
|
9
|
-
TestService.serviceName = "mb.TestService";
|
|
10
|
-
return TestService;
|
|
11
|
-
}());
|
|
12
|
-
|
|
13
|
-
TestService.Ping = {
|
|
14
|
-
methodName: "Ping",
|
|
15
|
-
service: TestService,
|
|
16
|
-
requestStream: false,
|
|
17
|
-
responseStream: false,
|
|
18
|
-
requestType: test_pb.PingMsg,
|
|
19
|
-
responseType: test_pb.PingMsg
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
TestService.BiStream = {
|
|
23
|
-
methodName: "BiStream",
|
|
24
|
-
service: TestService,
|
|
25
|
-
requestStream: false,
|
|
26
|
-
responseStream: true,
|
|
27
|
-
requestType: test_pb.StreamRequest,
|
|
28
|
-
responseType: test_pb.StreamResponse
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
exports.TestService = TestService;
|
|
32
|
-
|
|
33
|
-
function TestServiceClient(serviceHost, options) {
|
|
34
|
-
this.serviceHost = serviceHost;
|
|
35
|
-
this.options = options || {};
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
TestServiceClient.prototype.pingAsync = function ping(requestMessage, metadata){
|
|
39
|
-
let self=this;
|
|
40
|
-
return new Promise(fill => {
|
|
41
|
-
TestServiceClient.prototype.ping.bind(self)(requestMessage, metadata, (err, res) => {
|
|
42
|
-
fill({ err, value: res });
|
|
43
|
-
});
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
TestServiceClient.prototype.ping = function ping(requestMessage, metadata, callback) {
|
|
47
|
-
if (arguments.length === 2) {
|
|
48
|
-
callback = arguments[1];
|
|
49
|
-
}
|
|
50
|
-
var client = grpc.unary(TestService.Ping, {
|
|
51
|
-
request: requestMessage,
|
|
52
|
-
host: this.serviceHost,
|
|
53
|
-
metadata: metadata,
|
|
54
|
-
transport: this.options.transport,
|
|
55
|
-
debug: this.options.debug,
|
|
56
|
-
onEnd: function (response) {
|
|
57
|
-
if (callback) {
|
|
58
|
-
if (response.status !== grpc.Code.OK) {
|
|
59
|
-
var err = new Error(response.statusMessage);
|
|
60
|
-
err.code = response.status;
|
|
61
|
-
err.metadata = response.trailers;
|
|
62
|
-
callback(err, null);
|
|
63
|
-
} else {
|
|
64
|
-
callback(null, response.message);
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
});
|
|
69
|
-
return {
|
|
70
|
-
cancel: function () {
|
|
71
|
-
callback = null;
|
|
72
|
-
client.close();
|
|
73
|
-
}
|
|
74
|
-
};
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
TestServiceClient.prototype.biStream = function biStream(requestMessage, metadata) {
|
|
78
|
-
var listeners = {
|
|
79
|
-
data: [],
|
|
80
|
-
end: [],
|
|
81
|
-
status: []
|
|
82
|
-
};
|
|
83
|
-
var client = grpc.invoke(TestService.BiStream, {
|
|
84
|
-
request: requestMessage,
|
|
85
|
-
host: this.serviceHost,
|
|
86
|
-
metadata: metadata,
|
|
87
|
-
transport: this.options.transport,
|
|
88
|
-
debug: this.options.debug,
|
|
89
|
-
onMessage: function (responseMessage) {
|
|
90
|
-
listeners.data.forEach(function (handler) {
|
|
91
|
-
handler(responseMessage);
|
|
92
|
-
});
|
|
93
|
-
},
|
|
94
|
-
onEnd: function (status, statusMessage, trailers) {
|
|
95
|
-
listeners.status.forEach(function (handler) {
|
|
96
|
-
handler({ code: status, details: statusMessage, metadata: trailers });
|
|
97
|
-
});
|
|
98
|
-
listeners.end.forEach(function (handler) {
|
|
99
|
-
handler({ code: status, details: statusMessage, metadata: trailers });
|
|
100
|
-
});
|
|
101
|
-
listeners = null;
|
|
102
|
-
}
|
|
103
|
-
});
|
|
104
|
-
return {
|
|
105
|
-
on: function (type, handler) {
|
|
106
|
-
listeners[type].push(handler);
|
|
107
|
-
return this;
|
|
108
|
-
},
|
|
109
|
-
cancel: function () {
|
|
110
|
-
listeners = null;
|
|
111
|
-
client.close();
|
|
112
|
-
}
|
|
113
|
-
};
|
|
114
|
-
};
|
|
115
|
-
|
|
116
|
-
exports.TestServiceClient = TestServiceClient;
|
|
117
|
-
|
package/lib/assets/border.png
DELETED
|
Binary file
|
package/lib/assets/check.html
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html>
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8"/>
|
|
5
|
-
<style>
|
|
6
|
-
body {
|
|
7
|
-
/*background-color: #0c85d0;*/
|
|
8
|
-
display: flex;
|
|
9
|
-
flex-direction: column;
|
|
10
|
-
align-items: center;
|
|
11
|
-
padding: 10pt;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
p {
|
|
15
|
-
font-size: 20pt;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.frame {
|
|
19
|
-
border: 2px solid #aa0000;
|
|
20
|
-
/*display: flex;*/
|
|
21
|
-
/*flex-direction: row;*/
|
|
22
|
-
/*justify-content: space-evenly;*/
|
|
23
|
-
width: 90%;
|
|
24
|
-
padding: 10px;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
</style>
|
|
28
|
-
<script>
|
|
29
|
-
window.self = window;
|
|
30
|
-
let onload = () => {
|
|
31
|
-
console.log('onload...');
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
toggle = function () {
|
|
35
|
-
let div = document.getElementById("timer");
|
|
36
|
-
let v = div.style.visibility;
|
|
37
|
-
console.log("visibility",v);
|
|
38
|
-
div.style.visibility = v == "hidden" ? "visible" : "hidden";
|
|
39
|
-
}
|
|
40
|
-
</script>
|
|
41
|
-
</head>
|
|
42
|
-
<body onload="onload();">
|
|
43
|
-
|
|
44
|
-
<p>container rendered by JSX:</p>
|
|
45
|
-
<div id="container" class="frame"></div>
|
|
46
|
-
<img src="https://dgss0.bdstatic.com/5bVWsj_p_tVS5dKfpU_Y_D3/res/r/image/2017-09-27/297f5edb1e984613083a2d3cc0c5bb36.png">
|
|
47
|
-
|
|
48
|
-
<div style="height:30pt"></div>
|
|
49
|
-
<p>content in static html:</p>
|
|
50
|
-
<div class="frame" onclick="toggle()">
|
|
51
|
-
<div id="timer"> I'm a timer!</div>
|
|
52
|
-
</div>
|
|
53
|
-
</body>
|
|
54
|
-
</html>
|
package/lib/assets/pixui.png
DELETED
|
Binary file
|
package/lib/assets/preact.png
DELETED
|
Binary file
|
package/lib/check/main.less
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
@baseColor: #6dffa7;
|
|
2
|
-
@spinColor: spin(@baseColor, 90);
|
|
3
|
-
|
|
4
|
-
.bottomTabBtn{
|
|
5
|
-
font-size:25px;
|
|
6
|
-
color: black;
|
|
7
|
-
}
|
|
8
|
-
.bottomTabBtnActive{
|
|
9
|
-
font-size:30px;
|
|
10
|
-
color: red;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.btn{
|
|
14
|
-
border: 1px solid black;
|
|
15
|
-
padding: 10px;
|
|
16
|
-
border-radius: 0.5rem;
|
|
17
|
-
justify-content: center;
|
|
18
|
-
cursor: pointer;
|
|
19
|
-
&:hover {
|
|
20
|
-
background-color: rgb(173, 120, 220);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
.title {
|
|
26
|
-
font-size: 1.2em;
|
|
27
|
-
vertical-align: middle;
|
|
28
|
-
//margin-top: 10px;
|
|
29
|
-
color: @spinColor;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.wp95{
|
|
33
|
-
width: 95%;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.redFont{
|
|
37
|
-
color: red;
|
|
38
|
-
display: inline-block;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.flexrow{
|
|
42
|
-
display: flex;
|
|
43
|
-
flex-direction: row;
|
|
44
|
-
justify-content: space-evenly;
|
|
45
|
-
width: 100%;
|
|
46
|
-
// font-size: 35px;
|
|
47
|
-
color: @spinColor
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
@keyframes App-logo-spin {
|
|
51
|
-
from {
|
|
52
|
-
transform: rotate(0deg);
|
|
53
|
-
}
|
|
54
|
-
to {
|
|
55
|
-
transform: rotate(360deg);
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
.bkimage{
|
|
61
|
-
font-size: 30px;
|
|
62
|
-
background-image: url(../assets/border.png);
|
|
63
|
-
}
|
package/lib/check/main.tsx
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { renderDom } from '../dom';
|
|
2
|
-
import { getView } from './util';
|
|
3
|
-
import { hello } from './tool';
|
|
4
|
-
|
|
5
|
-
let renderJSX = () => {
|
|
6
|
-
let v = getView();
|
|
7
|
-
renderDom(v, document.getElementById('container')!);
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
let setTimer = () => {
|
|
11
|
-
let div = document.getElementById('timer');
|
|
12
|
-
let x = 1;
|
|
13
|
-
setInterval(() => {
|
|
14
|
-
div!.innerHTML = `prove this page is not refresh: time:${x++}`;
|
|
15
|
-
}, 100);
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
renderJSX();
|
|
19
|
-
setTimer();
|
|
20
|
-
hello();
|
|
21
|
-
|
|
22
|
-
window.onerror = (evt) => {
|
|
23
|
-
let e = evt as ErrorEvent;
|
|
24
|
-
console.log('!!! onerror', e.message);
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
if (module.hot) {
|
|
28
|
-
console.log('setup hot reload!');
|
|
29
|
-
// prettier-ignore
|
|
30
|
-
module.hot.accept([
|
|
31
|
-
'../dom.ts',
|
|
32
|
-
'./util.tsx',
|
|
33
|
-
], (): void => {
|
|
34
|
-
console.log('***** accept App hot update 1*******');
|
|
35
|
-
renderJSX();
|
|
36
|
-
console.log('***** accept App hot update 2*******');
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
if (false) {
|
|
41
|
-
throw new Error('throw an error');
|
|
42
|
-
}
|
package/lib/check/tool.js
DELETED
package/lib/check/util.tsx
DELETED
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
import { h, Component } from 'preact';
|
|
2
|
-
import { Router } from 'preact-router';
|
|
3
|
-
import { Link } from 'preact-router/match';
|
|
4
|
-
import css from './main.less';
|
|
5
|
-
import pix from '../assets/pixui.png';
|
|
6
|
-
import preact from '../assets/preact.png';
|
|
7
|
-
import border from '../assets/border.png';
|
|
8
|
-
|
|
9
|
-
type State = {
|
|
10
|
-
value: number;
|
|
11
|
-
};
|
|
12
|
-
class Counter extends Component<any, State> {
|
|
13
|
-
state = {
|
|
14
|
-
value: 0,
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
increment = () => {
|
|
18
|
-
this.setState((prev) => ({ value: prev.value + 1 }));
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
render(props, state) {
|
|
22
|
-
return (
|
|
23
|
-
<div
|
|
24
|
-
style={{
|
|
25
|
-
display: 'flex',
|
|
26
|
-
flexDirection: 'row',
|
|
27
|
-
// color: '#f93f00',
|
|
28
|
-
backgroundColor: state.value % 2 ? '#992288' : '#33ff54',
|
|
29
|
-
}}
|
|
30
|
-
>
|
|
31
|
-
Counter: {state.value}
|
|
32
|
-
<div style={{ width: '20px' }} />
|
|
33
|
-
<div onClick={this.increment}>Increment</div>
|
|
34
|
-
</div>
|
|
35
|
-
);
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
let wp = (p) => (p ? `/check/${p}` : '/check');
|
|
40
|
-
|
|
41
|
-
class Title extends Component<any, { title: string }> {
|
|
42
|
-
state = {
|
|
43
|
-
title: 'hello,pixui',
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
render(props, state) {
|
|
47
|
-
return (
|
|
48
|
-
<div
|
|
49
|
-
style={{
|
|
50
|
-
display: 'flex',
|
|
51
|
-
flexDirection: 'column',
|
|
52
|
-
backgroundColor: '#f98833',
|
|
53
|
-
}}
|
|
54
|
-
>
|
|
55
|
-
title: {state.title}
|
|
56
|
-
<Link href={wp('')}>back home</Link>
|
|
57
|
-
</div>
|
|
58
|
-
);
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
let makeError1 = () => {
|
|
63
|
-
throw new Error('throw an error');
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
let makeError2 = (p?: any) => {
|
|
67
|
-
let b = p.name;
|
|
68
|
-
};
|
|
69
|
-
let makeError3 = async () => {
|
|
70
|
-
return JSON.parse('sdf={]');
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
export const getView = () => {
|
|
74
|
-
return (
|
|
75
|
-
<div style={{ width: '99%' }}>
|
|
76
|
-
{/* <Counter /> */}
|
|
77
|
-
<Router>
|
|
78
|
-
<Counter loggedIn={true} path={wp('')} />
|
|
79
|
-
<Title path={wp('hi')} />
|
|
80
|
-
</Router>
|
|
81
|
-
<Link href={wp('hi')}>Profile</Link>
|
|
82
|
-
<div className={css.flexrow}>
|
|
83
|
-
<img
|
|
84
|
-
src={preact}
|
|
85
|
-
onClick={() => {
|
|
86
|
-
console.log('click preact...');
|
|
87
|
-
makeError2();
|
|
88
|
-
}}
|
|
89
|
-
></img>
|
|
90
|
-
<img src={pix}></img>
|
|
91
|
-
<div style={{ width: '200px', height: '100px', borderImage: `url(${border}) 2 2 2 2 fill stretch` }} />
|
|
92
|
-
</div>
|
|
93
|
-
<div style={{ border: '1px solid black', width: 200, height: 200 }}>
|
|
94
|
-
<video autoPlay src={'https://www.runoob.com/try/demo_source/mov_bbb.mp4'} style={{ loop: 'loop', width: 200, height: 200 }} />
|
|
95
|
-
</div>
|
|
96
|
-
<div onClick={(e) => console.log('click', e)}>Pixui is a embeddable browser engine</div>
|
|
97
|
-
<div>Preact is a react-like framework</div>
|
|
98
|
-
<div>with webpack and typescript workflow</div>
|
|
99
|
-
<div className={css.flexrow}>
|
|
100
|
-
<div>easy! </div>
|
|
101
|
-
<div>beautiful!</div>
|
|
102
|
-
<div>crossplatform!</div>
|
|
103
|
-
</div>
|
|
104
|
-
<div>let's start and go further!</div>
|
|
105
|
-
</div>
|
|
106
|
-
);
|
|
107
|
-
};
|
package/lib/dom.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { h, render, Component } from 'preact';
|
|
2
|
-
|
|
3
|
-
export let makeDOM = (type, props, ...children) => {
|
|
4
|
-
console.log('==>dom', 'type', type, 'props', props, 'chlidren', children);
|
|
5
|
-
return {
|
|
6
|
-
type,
|
|
7
|
-
props,
|
|
8
|
-
children,
|
|
9
|
-
};
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export let renderDom = render;
|
|
13
|
-
|
|
14
|
-
//注:这个default是给webpack里的jsx-pragmatic插件用的,它会将所有jsx标记替换为这个函数调用
|
|
15
|
-
// export default makeDOM;
|
|
16
|
-
export default h;
|
package/lib/ext.d.ts
DELETED
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
interface NodeModule {
|
|
2
|
-
hot: any;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
declare module '*.less' {
|
|
6
|
-
const resource: { [key: string]: string };
|
|
7
|
-
export = resource;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
declare module '*.png' {
|
|
11
|
-
const value: any;
|
|
12
|
-
export default value;
|
|
13
|
-
}
|
|
14
|
-
declare module '*.gif' {
|
|
15
|
-
const value: any;
|
|
16
|
-
export default value;
|
|
17
|
-
}
|
|
18
|
-
declare module '*.jpg' {
|
|
19
|
-
const value: any;
|
|
20
|
-
export default value;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
declare module '*.lottie' {
|
|
24
|
-
const value: any;
|
|
25
|
-
export default value;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
interface Console {
|
|
29
|
-
enable_trace: (boolean) => {};
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
interface XMLHttpRequest {
|
|
33
|
-
curlCode: number;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
declare class Http2Connection {
|
|
37
|
-
constructor(url: string, metadata?: string[string], debug?: bool);
|
|
38
|
-
|
|
39
|
-
send(msg: Uint8Array): number;
|
|
40
|
-
|
|
41
|
-
close(msg: Record<string, any>): number;
|
|
42
|
-
|
|
43
|
-
setHeadersCallBack(func: Function): number;
|
|
44
|
-
|
|
45
|
-
setDataCallBack(func: Function): number;
|
|
46
|
-
|
|
47
|
-
setEndCallBack(func: Function): number;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
interface IGamelet {
|
|
51
|
-
openMessage: string | undefined;
|
|
52
|
-
entranceConfig: string | undefined;
|
|
53
|
-
appId: number;
|
|
54
|
-
appName: string;
|
|
55
|
-
env: string;
|
|
56
|
-
mainpage: string;
|
|
57
|
-
sdkInfo: string;
|
|
58
|
-
isProductEnv : boolean;
|
|
59
|
-
sdkVersion: string;
|
|
60
|
-
appVersion: string;
|
|
61
|
-
parentPath: string;
|
|
62
|
-
userdataJson: string;
|
|
63
|
-
startUpAppData: any;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
declare const gamelet: IGamelet;
|
|
67
|
-
|
|
68
|
-
interface Window {
|
|
69
|
-
Http2Connection: any;
|
|
70
|
-
noProto: any;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
interface External {
|
|
74
|
-
sendMessage: (msg: any) => void;
|
|
75
|
-
addEventListener:(type:string, handler:Function)=>void;
|
|
76
|
-
onmessage: any;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
declare function LuaProxy(): lua;
|
|
80
|
-
declare class WxCard {
|
|
81
|
-
Ping(msg: string) {}
|
|
82
|
-
}
|
|
83
|
-
declare class PandoraCommon {
|
|
84
|
-
static callLua(msg: string): any;
|
|
85
|
-
}
|
|
86
|
-
declare class PandoraSDKAdapter {
|
|
87
|
-
static external: any;
|
|
88
|
-
static getInstance();
|
|
89
|
-
static callLua(name: string, f1: Function, f2: Function, msg: string): any;
|
|
90
|
-
}
|
|
91
|
-
declare class Lua {
|
|
92
|
-
constructor();
|
|
93
|
-
callLua(name: string, f1: Function, f2: Function, msg: string): any;
|
|
94
|
-
PixWxCardRequest: WxCard;
|
|
95
|
-
}
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var metadata_1 = require("./metadata");
|
|
4
|
-
var HEADER_SIZE = 5;
|
|
5
|
-
var isAllowedControlChars = function (char) { return char === 0x9 || char === 0xa || char === 0xd; };
|
|
6
|
-
function isValidHeaderAscii(val) {
|
|
7
|
-
return isAllowedControlChars(val) || (val >= 0x20 && val <= 0x7e);
|
|
8
|
-
}
|
|
9
|
-
function decodeASCII(input) {
|
|
10
|
-
for (var i = 0; i !== input.length; ++i) {
|
|
11
|
-
if (!isValidHeaderAscii(input[i])) {
|
|
12
|
-
throw new Error("Metadata is not valid (printable) ASCII");
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
return String.fromCharCode.apply(String, Array.prototype.slice.call(input));
|
|
16
|
-
}
|
|
17
|
-
exports.decodeASCII = decodeASCII;
|
|
18
|
-
function encodeASCII(input) {
|
|
19
|
-
var encoded = new Uint8Array(input.length);
|
|
20
|
-
for (var i = 0; i !== input.length; ++i) {
|
|
21
|
-
var charCode = input.charCodeAt(i);
|
|
22
|
-
if (!isValidHeaderAscii(charCode)) {
|
|
23
|
-
throw new Error("Metadata contains invalid ASCII");
|
|
24
|
-
}
|
|
25
|
-
encoded[i] = charCode;
|
|
26
|
-
}
|
|
27
|
-
return encoded;
|
|
28
|
-
}
|
|
29
|
-
exports.encodeASCII = encodeASCII;
|
|
30
|
-
function isTrailerHeader(headerView) {
|
|
31
|
-
return (headerView.getUint8(0) & 0x80) === 0x80;
|
|
32
|
-
}
|
|
33
|
-
function parseTrailerData(msgData) {
|
|
34
|
-
return new metadata_1.Metadata(decodeASCII(msgData));
|
|
35
|
-
}
|
|
36
|
-
function readLengthFromHeader(headerView) {
|
|
37
|
-
return headerView.getUint32(1, false);
|
|
38
|
-
}
|
|
39
|
-
function hasEnoughBytes(buffer, position, byteCount) {
|
|
40
|
-
return buffer.byteLength - position >= byteCount;
|
|
41
|
-
}
|
|
42
|
-
function sliceUint8Array(buffer, from, to) {
|
|
43
|
-
if (buffer.slice) {
|
|
44
|
-
return buffer.slice(from, to);
|
|
45
|
-
}
|
|
46
|
-
var end = buffer.length;
|
|
47
|
-
if (to !== undefined) {
|
|
48
|
-
end = to;
|
|
49
|
-
}
|
|
50
|
-
var num = end - from;
|
|
51
|
-
var array = new Uint8Array(num);
|
|
52
|
-
var arrayIndex = 0;
|
|
53
|
-
for (var i = from; i < end; i++) {
|
|
54
|
-
array[arrayIndex++] = buffer[i];
|
|
55
|
-
}
|
|
56
|
-
return array;
|
|
57
|
-
}
|
|
58
|
-
var ChunkType;
|
|
59
|
-
(function (ChunkType) {
|
|
60
|
-
ChunkType[ChunkType["MESSAGE"] = 1] = "MESSAGE";
|
|
61
|
-
ChunkType[ChunkType["TRAILERS"] = 2] = "TRAILERS";
|
|
62
|
-
})(ChunkType = exports.ChunkType || (exports.ChunkType = {}));
|
|
63
|
-
var ChunkParser = (function () {
|
|
64
|
-
function ChunkParser() {
|
|
65
|
-
this.buffer = null;
|
|
66
|
-
this.position = 0;
|
|
67
|
-
}
|
|
68
|
-
ChunkParser.prototype.parse = function (bytes, flush) {
|
|
69
|
-
if (bytes.length === 0 && flush) {
|
|
70
|
-
return [];
|
|
71
|
-
}
|
|
72
|
-
var chunkData = [];
|
|
73
|
-
if (this.buffer == null) {
|
|
74
|
-
this.buffer = bytes;
|
|
75
|
-
this.position = 0;
|
|
76
|
-
}
|
|
77
|
-
else if (this.position === this.buffer.byteLength) {
|
|
78
|
-
this.buffer = bytes;
|
|
79
|
-
this.position = 0;
|
|
80
|
-
}
|
|
81
|
-
else {
|
|
82
|
-
var remaining = this.buffer.byteLength - this.position;
|
|
83
|
-
var newBuf = new Uint8Array(remaining + bytes.byteLength);
|
|
84
|
-
var fromExisting = sliceUint8Array(this.buffer, this.position);
|
|
85
|
-
newBuf.set(fromExisting, 0);
|
|
86
|
-
var latestDataBuf = new Uint8Array(bytes);
|
|
87
|
-
newBuf.set(latestDataBuf, remaining);
|
|
88
|
-
this.buffer = newBuf;
|
|
89
|
-
this.position = 0;
|
|
90
|
-
}
|
|
91
|
-
while (true) {
|
|
92
|
-
if (!hasEnoughBytes(this.buffer, this.position, HEADER_SIZE)) {
|
|
93
|
-
return chunkData;
|
|
94
|
-
}
|
|
95
|
-
var headerBuffer = sliceUint8Array(this.buffer, this.position, this.position + HEADER_SIZE);
|
|
96
|
-
var headerView = new DataView(headerBuffer.buffer, headerBuffer.byteOffset, headerBuffer.byteLength);
|
|
97
|
-
var msgLength = readLengthFromHeader(headerView);
|
|
98
|
-
if (!hasEnoughBytes(this.buffer, this.position, HEADER_SIZE + msgLength)) {
|
|
99
|
-
return chunkData;
|
|
100
|
-
}
|
|
101
|
-
var messageData = sliceUint8Array(this.buffer, this.position + HEADER_SIZE, this.position + HEADER_SIZE + msgLength);
|
|
102
|
-
this.position += HEADER_SIZE + msgLength;
|
|
103
|
-
if (isTrailerHeader(headerView)) {
|
|
104
|
-
chunkData.push({ chunkType: ChunkType.TRAILERS, trailers: parseTrailerData(messageData) });
|
|
105
|
-
return chunkData;
|
|
106
|
-
}
|
|
107
|
-
else {
|
|
108
|
-
chunkData.push({ chunkType: ChunkType.MESSAGE, data: messageData });
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
};
|
|
112
|
-
return ChunkParser;
|
|
113
|
-
}());
|
|
114
|
-
exports.ChunkParser = ChunkParser;
|
|
115
|
-
//# sourceMappingURL=ChunkParser.js.map
|