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,275 +0,0 @@
|
|
|
1
|
-
export = preact;
|
|
2
|
-
export as namespace preact;
|
|
3
|
-
|
|
4
|
-
import { JSXInternal } from './jsx';
|
|
5
|
-
|
|
6
|
-
import { JCSSProperties } from './jsx';
|
|
7
|
-
export type CSSProperties = JCSSProperties ;
|
|
8
|
-
|
|
9
|
-
declare namespace preact {
|
|
10
|
-
export import JSX = JSXInternal;
|
|
11
|
-
|
|
12
|
-
//
|
|
13
|
-
// Preact Virtual DOM
|
|
14
|
-
// -----------------------------------
|
|
15
|
-
|
|
16
|
-
interface VNode<P = {}> {
|
|
17
|
-
type: ComponentType<P> | string;
|
|
18
|
-
props: P & { children: ComponentChildren };
|
|
19
|
-
key: Key;
|
|
20
|
-
/**
|
|
21
|
-
* ref is not guaranteed by React.ReactElement, for compatiblity reasons
|
|
22
|
-
* with popular react libs we define it as optional too
|
|
23
|
-
*/
|
|
24
|
-
ref?: Ref<any> | null;
|
|
25
|
-
/**
|
|
26
|
-
* The time this `vnode` started rendering. Will only be set when
|
|
27
|
-
* the devtools are attached.
|
|
28
|
-
* Default value: `0`
|
|
29
|
-
*/
|
|
30
|
-
startTime?: number;
|
|
31
|
-
/**
|
|
32
|
-
* The time that the rendering of this `vnode` was completed. Will only be
|
|
33
|
-
* set when the devtools are attached.
|
|
34
|
-
* Default value: `-1`
|
|
35
|
-
*/
|
|
36
|
-
endTime?: number;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
//
|
|
40
|
-
// Preact Component interface
|
|
41
|
-
// -----------------------------------
|
|
42
|
-
|
|
43
|
-
type Key = string | number | any;
|
|
44
|
-
|
|
45
|
-
type RefObject<T> = { current?: T | null };
|
|
46
|
-
type RefCallback<T> = (instance: T | null) => void;
|
|
47
|
-
type Ref<T> = RefObject<T> | RefCallback<T>;
|
|
48
|
-
|
|
49
|
-
type ComponentChild = VNode<any> | object | string | number | boolean | null | undefined;
|
|
50
|
-
type ComponentChildren = ComponentChild[] | ComponentChild;
|
|
51
|
-
|
|
52
|
-
interface Attributes {
|
|
53
|
-
key?: Key;
|
|
54
|
-
jsx?: boolean;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
interface ClassAttributes<T> extends Attributes {
|
|
58
|
-
ref?: Ref<T>;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
interface PreactDOMAttributes {
|
|
62
|
-
children?: ComponentChildren;
|
|
63
|
-
dangerouslySetInnerHTML?: {
|
|
64
|
-
__html: string;
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
type RenderableProps<P, RefType = any> = P &
|
|
69
|
-
Readonly<Attributes & { children?: ComponentChildren; ref?: Ref<RefType> }>;
|
|
70
|
-
|
|
71
|
-
type ComponentType<P = {}> = ComponentClass<P> | FunctionComponent<P>;
|
|
72
|
-
type ComponentFactory<P = {}> = ComponentType<P>;
|
|
73
|
-
|
|
74
|
-
type ComponentProps<C extends ComponentType<any>> = C extends ComponentType<infer P> ? P : never;
|
|
75
|
-
|
|
76
|
-
interface FunctionComponent<P = {}> {
|
|
77
|
-
(props: RenderableProps<P>, context?: any): VNode<any> | null;
|
|
78
|
-
displayName?: string;
|
|
79
|
-
defaultProps?: Partial<P>;
|
|
80
|
-
}
|
|
81
|
-
interface FunctionalComponent<P = {}> extends FunctionComponent<P> {}
|
|
82
|
-
|
|
83
|
-
interface ComponentClass<P = {}, S = {}> {
|
|
84
|
-
new (props: P, context?: any): Component<P, S>;
|
|
85
|
-
displayName?: string;
|
|
86
|
-
defaultProps?: Partial<P>;
|
|
87
|
-
getDerivedStateFromProps?(props: Readonly<P>, state: Readonly<S>): Partial<S> | null;
|
|
88
|
-
getDerivedStateFromError?(error: any): Partial<S> | null;
|
|
89
|
-
}
|
|
90
|
-
interface ComponentConstructor<P = {}, S = {}> extends ComponentClass<P, S> {}
|
|
91
|
-
|
|
92
|
-
// Type alias for a component instance considered generally, whether stateless or stateful.
|
|
93
|
-
type AnyComponent<P = {}, S = {}> = FunctionComponent<P> | Component<P, S>;
|
|
94
|
-
|
|
95
|
-
interface Component<P = {}, S = {}> {
|
|
96
|
-
refs: { [key: string]: Component<any> | Element };
|
|
97
|
-
componentWillMount?(): void;
|
|
98
|
-
componentDidMount?(): void;
|
|
99
|
-
componentWillUnmount?(): void;
|
|
100
|
-
getChildContext?(): object;
|
|
101
|
-
componentWillReceiveProps?(nextProps: Readonly<P>, nextContext: any): void;
|
|
102
|
-
shouldComponentUpdate?(
|
|
103
|
-
nextProps: Readonly<P>,
|
|
104
|
-
nextState: Readonly<S>,
|
|
105
|
-
nextContext: any
|
|
106
|
-
): boolean;
|
|
107
|
-
componentWillUpdate?(nextProps: Readonly<P>, nextState: Readonly<S>, nextContext: any): void;
|
|
108
|
-
getSnapshotBeforeUpdate?(oldProps: Readonly<P>, oldState: Readonly<S>): any;
|
|
109
|
-
componentDidUpdate?(
|
|
110
|
-
previousProps: Readonly<P>,
|
|
111
|
-
previousState: Readonly<S>,
|
|
112
|
-
snapshot: any
|
|
113
|
-
): void;
|
|
114
|
-
componentDidCatch?(error: any, errorInfo: any): void;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
abstract class Component<P, S> {
|
|
118
|
-
constructor(props?: P, context?: any);
|
|
119
|
-
|
|
120
|
-
static displayName?: string;
|
|
121
|
-
static defaultProps?: any;
|
|
122
|
-
static contextType?: Context<any>;
|
|
123
|
-
|
|
124
|
-
// Static members cannot reference class type parameters. This is not
|
|
125
|
-
// supported in TypeScript. Reusing the same type arguments from `Component`
|
|
126
|
-
// will lead to an impossible state where one cannot satisfy the type
|
|
127
|
-
// constraint under no circumstances, see #1356.In general type arguments
|
|
128
|
-
// seem to be a bit buggy and not supported well at the time of this
|
|
129
|
-
// writing with TS 3.3.3333.
|
|
130
|
-
static getDerivedStateFromProps?(
|
|
131
|
-
props: Readonly<object>,
|
|
132
|
-
state: Readonly<object>
|
|
133
|
-
): object | null;
|
|
134
|
-
static getDerivedStateFromError?(error: any): object | null;
|
|
135
|
-
|
|
136
|
-
state: Readonly<S>;
|
|
137
|
-
props: RenderableProps<P>;
|
|
138
|
-
context: any;
|
|
139
|
-
base?: Element | Text;
|
|
140
|
-
|
|
141
|
-
// From https://github.com/DefinitelyTyped/DefinitelyTyped/blob/e836acc75a78cf0655b5dfdbe81d69fdd4d8a252/types/react/index.d.ts#L402
|
|
142
|
-
// // We MUST keep setState() as a unified signature because it allows proper checking of the method return type.
|
|
143
|
-
// // See: https://github.com/DefinitelyTyped/DefinitelyTyped/issues/18365#issuecomment-351013257
|
|
144
|
-
setState<K extends keyof S>(
|
|
145
|
-
state:
|
|
146
|
-
| ((prevState: Readonly<S>, props: Readonly<P>) => Pick<S, K> | Partial<S> | null)
|
|
147
|
-
| (Pick<S, K> | Partial<S> | null),
|
|
148
|
-
callback?: () => void
|
|
149
|
-
): void;
|
|
150
|
-
|
|
151
|
-
forceUpdate(callback?: () => void): void;
|
|
152
|
-
|
|
153
|
-
abstract render(props?: RenderableProps<P>, state?: Readonly<S>, context?: any): ComponentChild;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
//
|
|
157
|
-
// Preact createElement
|
|
158
|
-
// -----------------------------------
|
|
159
|
-
|
|
160
|
-
function createElement(
|
|
161
|
-
type: string,
|
|
162
|
-
props: (JSXInternal.HTMLAttributes & JSXInternal.SVGAttributes & Record<string, any>) | null,
|
|
163
|
-
...children: ComponentChildren[]
|
|
164
|
-
): VNode<any>;
|
|
165
|
-
function createElement<P>(
|
|
166
|
-
type: ComponentType<P>,
|
|
167
|
-
props: (Attributes & P) | null,
|
|
168
|
-
...children: ComponentChildren[]
|
|
169
|
-
): VNode<any>;
|
|
170
|
-
namespace createElement {
|
|
171
|
-
export import JSX = JSXInternal;
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
function h(
|
|
175
|
-
type: string,
|
|
176
|
-
props: (JSXInternal.HTMLAttributes & JSXInternal.SVGAttributes & Record<string, any>) | null,
|
|
177
|
-
...children: ComponentChildren[]
|
|
178
|
-
): VNode<any>;
|
|
179
|
-
function h<P>(
|
|
180
|
-
type: ComponentType<P>,
|
|
181
|
-
props: (Attributes & P) | null,
|
|
182
|
-
...children: ComponentChildren[]
|
|
183
|
-
): VNode<any>;
|
|
184
|
-
namespace h {
|
|
185
|
-
export import JSX = JSXInternal;
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
//
|
|
191
|
-
// Preact render
|
|
192
|
-
// -----------------------------------
|
|
193
|
-
|
|
194
|
-
function render(
|
|
195
|
-
vnode: ComponentChild,
|
|
196
|
-
parent: Element | Document | ShadowRoot | DocumentFragment,
|
|
197
|
-
replaceNode?: Element | Text
|
|
198
|
-
): void;
|
|
199
|
-
function hydrate(
|
|
200
|
-
vnode: ComponentChild,
|
|
201
|
-
parent: Element | Document | ShadowRoot | DocumentFragment
|
|
202
|
-
): void;
|
|
203
|
-
function cloneElement(
|
|
204
|
-
vnode: VNode<any>,
|
|
205
|
-
props?: any,
|
|
206
|
-
...children: ComponentChildren[]
|
|
207
|
-
): VNode<any>;
|
|
208
|
-
function cloneElement<P>(
|
|
209
|
-
vnode: VNode<P>,
|
|
210
|
-
props?: any,
|
|
211
|
-
...children: ComponentChildren[]
|
|
212
|
-
): VNode<P>;
|
|
213
|
-
|
|
214
|
-
//
|
|
215
|
-
// Preact Built-in Components
|
|
216
|
-
// -----------------------------------
|
|
217
|
-
|
|
218
|
-
// TODO: Revisit what the public type of this is...
|
|
219
|
-
const Fragment: ComponentClass<{}, {}>;
|
|
220
|
-
|
|
221
|
-
//
|
|
222
|
-
// Preact options
|
|
223
|
-
// -----------------------------------
|
|
224
|
-
|
|
225
|
-
/**
|
|
226
|
-
* Global options for preact
|
|
227
|
-
*/
|
|
228
|
-
interface Options {
|
|
229
|
-
/** Attach a hook that is invoked whenever a VNode is created. */
|
|
230
|
-
vnode?(vnode: VNode): void;
|
|
231
|
-
/** Attach a hook that is invoked immediately before a vnode is unmounted. */
|
|
232
|
-
unmount?(vnode: VNode): void;
|
|
233
|
-
/** Attach a hook that is invoked after a vnode has rendered. */
|
|
234
|
-
diffed?(vnode: VNode): void;
|
|
235
|
-
event?(e: Event): any;
|
|
236
|
-
requestAnimationFrame?: typeof requestAnimationFrame;
|
|
237
|
-
debounceRendering?(cb: () => void): void;
|
|
238
|
-
useDebugValue?(value: string | number): void;
|
|
239
|
-
__suspenseDidResolve?(vnode: VNode, cb: () => void): void;
|
|
240
|
-
// __canSuspenseResolve?(vnode: VNode, cb: () => void): void;
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
const options: Options;
|
|
244
|
-
|
|
245
|
-
//
|
|
246
|
-
// Preact helpers
|
|
247
|
-
// -----------------------------------
|
|
248
|
-
function createRef<T = any>(): RefObject<T>;
|
|
249
|
-
function toChildArray(children: ComponentChildren): Array<VNode | string | number>;
|
|
250
|
-
function isValidElement(vnode: any): vnode is VNode;
|
|
251
|
-
|
|
252
|
-
//
|
|
253
|
-
// Context
|
|
254
|
-
// -----------------------------------
|
|
255
|
-
interface Consumer<T>
|
|
256
|
-
extends FunctionComponent<{
|
|
257
|
-
children: (value: T) => ComponentChildren;
|
|
258
|
-
}> {}
|
|
259
|
-
interface PreactConsumer<T> extends Consumer<T> {}
|
|
260
|
-
|
|
261
|
-
interface Provider<T>
|
|
262
|
-
extends FunctionComponent<{
|
|
263
|
-
value: T;
|
|
264
|
-
children: ComponentChildren;
|
|
265
|
-
}> {}
|
|
266
|
-
interface PreactProvider<T> extends Provider<T> {}
|
|
267
|
-
|
|
268
|
-
interface Context<T> {
|
|
269
|
-
Consumer: Consumer<T>;
|
|
270
|
-
Provider: Provider<T>;
|
|
271
|
-
}
|
|
272
|
-
interface PreactContext<T> extends Context<T> {}
|
|
273
|
-
|
|
274
|
-
function createContext<T>(defaultValue: T): Context<T>;
|
|
275
|
-
}
|
package/lib/preact/src/index.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export { render, hydrate } from './render';
|
|
2
|
-
export {
|
|
3
|
-
createElement,
|
|
4
|
-
createElement as h,
|
|
5
|
-
Fragment,
|
|
6
|
-
createRef,
|
|
7
|
-
isValidElement
|
|
8
|
-
} from './create-element';
|
|
9
|
-
export { Component } from './component';
|
|
10
|
-
export { cloneElement } from './clone-element';
|
|
11
|
-
export { createContext } from './create-context';
|
|
12
|
-
export { toChildArray } from './diff/children';
|
|
13
|
-
export { unmount as _unmount } from './diff';
|
|
14
|
-
export { default as options } from './options';
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import * as preact from './index';
|
|
2
|
-
|
|
3
|
-
export interface Options extends preact.Options {
|
|
4
|
-
/** Attach a hook that is invoked before render, mainly to check the arguments. */
|
|
5
|
-
_root?(
|
|
6
|
-
vnode: preact.ComponentChild,
|
|
7
|
-
parent: Element | Document | ShadowRoot | DocumentFragment
|
|
8
|
-
): void;
|
|
9
|
-
/** Attach a hook that is invoked before a vnode is diffed. */
|
|
10
|
-
_diff?(vnode: VNode): void;
|
|
11
|
-
/** Attach a hook that is invoked after a tree was mounted or was updated. */
|
|
12
|
-
_commit?(vnode: VNode, commitQueue: Component[]): void;
|
|
13
|
-
/** Attach a hook that is invoked before a vnode has rendered. */
|
|
14
|
-
_render?(vnode: VNode): void;
|
|
15
|
-
/** Attach a hook that is invoked before a hook's state is queried. */
|
|
16
|
-
_hook?(component: Component): void;
|
|
17
|
-
/** Attach a hook that is invoked after an error is caught in a component but before calling lifecycle hooks */
|
|
18
|
-
_catchError(error: any, vnode: VNode, oldVNode: VNode | undefined): void;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export interface FunctionalComponent<P = {}>
|
|
22
|
-
extends preact.FunctionComponent<P> {
|
|
23
|
-
// Define getDerivedStateFromProps as undefined on FunctionalComponent
|
|
24
|
-
// to get rid of some errors in `diff()`
|
|
25
|
-
getDerivedStateFromProps?: undefined;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
// Redefine ComponentFactory using our new internal FunctionalComponent interface above
|
|
29
|
-
export type ComponentFactory<P> =
|
|
30
|
-
| preact.ComponentClass<P>
|
|
31
|
-
| FunctionalComponent<P>;
|
|
32
|
-
|
|
33
|
-
export interface PreactElement extends HTMLElement {
|
|
34
|
-
_children?: VNode<any> | null;
|
|
35
|
-
/** Event listeners to support event delegation */
|
|
36
|
-
_listeners: Record<string, (e: Event) => void>;
|
|
37
|
-
|
|
38
|
-
// Preact uses this attribute to detect SVG nodes
|
|
39
|
-
ownerSVGElement?: SVGElement | null;
|
|
40
|
-
|
|
41
|
-
// style: HTMLElement["style"]; // From HTMLElement
|
|
42
|
-
|
|
43
|
-
data?: string | number; // From Text node
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
export interface VNode<P = {}> extends preact.VNode<P> {
|
|
47
|
-
// Redefine type here using our internal ComponentFactory type
|
|
48
|
-
type: string | ComponentFactory<P>;
|
|
49
|
-
props: P & { children: preact.ComponentChildren };
|
|
50
|
-
_children: Array<VNode<any>> | null;
|
|
51
|
-
_parent: VNode | null;
|
|
52
|
-
_depth: number | null;
|
|
53
|
-
/**
|
|
54
|
-
* The [first (for Fragments)] DOM child of a VNode
|
|
55
|
-
*/
|
|
56
|
-
_dom: PreactElement | Text | null;
|
|
57
|
-
/**
|
|
58
|
-
* The last dom child of a Fragment, or components that return a Fragment
|
|
59
|
-
*/
|
|
60
|
-
_nextDom: PreactElement | Text | null;
|
|
61
|
-
_component: Component | null;
|
|
62
|
-
constructor: undefined;
|
|
63
|
-
_original?: VNode | null;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
export interface Component<P = {}, S = {}> extends preact.Component<P, S> {
|
|
67
|
-
// When component is functional component, this is reset to functional component
|
|
68
|
-
constructor: preact.ComponentType<P>;
|
|
69
|
-
state: S; // Override Component["state"] to not be readonly for internal use, specifically Hooks
|
|
70
|
-
base?: PreactElement;
|
|
71
|
-
|
|
72
|
-
_dirty: boolean;
|
|
73
|
-
_force?: boolean;
|
|
74
|
-
_renderCallbacks: Array<() => void>; // Only class components
|
|
75
|
-
_globalContext?: any;
|
|
76
|
-
_vnode?: VNode<P> | null;
|
|
77
|
-
_nextState?: S | null; // Only class components
|
|
78
|
-
/** Only used in the devtools to later dirty check if state has changed */
|
|
79
|
-
_prevState?: S | null;
|
|
80
|
-
/**
|
|
81
|
-
* Pointer to the parent dom node. This is only needed for top-level Fragment
|
|
82
|
-
* components or array returns.
|
|
83
|
-
*/
|
|
84
|
-
_parentDom?: PreactElement | null;
|
|
85
|
-
// Always read, set only when handling error
|
|
86
|
-
_processingException?: Component<any, any> | null;
|
|
87
|
-
// Always read, set only when handling error. This is used to indicate at diffTime to set _processingException
|
|
88
|
-
_pendingError?: Component<any, any> | null;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
export interface PreactContext extends preact.Context<any> {
|
|
92
|
-
_id: string;
|
|
93
|
-
_defaultValue: any;
|
|
94
|
-
}
|