@funhub/platform 0.1.130 → 0.1.131
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/dist/_virtual/_rolldown/runtime.mjs +1 -18
- package/dist/assets/icons/clear.mjs +1 -17
- package/dist/assets/icons/close-icon.mjs +1 -18
- package/dist/assets/icons/close.mjs +1 -14
- package/dist/assets/icons/common/collect_nor.mjs +1 -21
- package/dist/assets/icons/common/collect_sel.mjs +1 -21
- package/dist/assets/icons/common/follow_sel.mjs +1 -17
- package/dist/assets/icons/common/follow_user.mjs +1 -17
- package/dist/assets/icons/common/full_screen.mjs +1 -17
- package/dist/assets/icons/common/god_comment.mjs +1 -17
- package/dist/assets/icons/common/heart-like.mjs +1 -31
- package/dist/assets/icons/common/heart-unlike.mjs +1 -18
- package/dist/assets/icons/common/qq.mjs +1 -32
- package/dist/assets/icons/common/right_arrow.mjs +1 -14
- package/dist/assets/icons/common/share.mjs +1 -17
- package/dist/assets/icons/common/solid-arrow.mjs +1 -17
- package/dist/assets/icons/common/video_play.mjs +1 -18
- package/dist/assets/icons/common/wechat-friends.mjs +1 -40
- package/dist/assets/icons/common/wechat.mjs +1 -39
- package/dist/assets/icons/detail/check-ok.mjs +1 -17
- package/dist/assets/icons/detail/collect_nor.mjs +1 -21
- package/dist/assets/icons/detail/collect_sel.mjs +1 -21
- package/dist/assets/icons/detail/comment.mjs +1 -19
- package/dist/assets/icons/detail/commet_at.mjs +1 -53
- package/dist/assets/icons/detail/give_like.mjs +1 -20
- package/dist/assets/icons/detail/give_like_sel.mjs +1 -27
- package/dist/assets/icons/detail/min-collection.mjs +1 -38
- package/dist/assets/icons/detail/publish_pic.mjs +1 -27
- package/dist/assets/icons/detail/publish_video.mjs +1 -30
- package/dist/assets/icons/detail/share.mjs +1 -17
- package/dist/assets/icons/detail/un_like.mjs +1 -20
- package/dist/assets/icons/detail/un_like_sel.mjs +1 -27
- package/dist/assets/icons/detail/video_flag.mjs +1 -17
- package/dist/assets/icons/detail/video_play.mjs +1 -18
- package/dist/assets/icons/dislike.mjs +1 -20
- package/dist/assets/icons/dislike_sel.mjs +1 -27
- package/dist/assets/icons/empty/img-empty-adduser.mjs +1 -463
- package/dist/assets/icons/empty/img-empty-nodata.mjs +1 -194
- package/dist/assets/icons/eye-icon.mjs +1 -21
- package/dist/assets/icons/eye-off-icon.mjs +1 -21
- package/dist/assets/icons/filter_dark.mjs +1 -17
- package/dist/assets/icons/follow_nor.mjs +1 -44
- package/dist/assets/icons/follow_sel.mjs +1 -31
- package/dist/assets/icons/left-arrow-icon.mjs +1 -18
- package/dist/assets/icons/left_arrow.mjs +1 -14
- package/dist/assets/icons/like.mjs +1 -20
- package/dist/assets/icons/like_sel.mjs +1 -27
- package/dist/assets/icons/publish/publish_add.mjs +1 -17
- package/dist/assets/icons/publish/publish_at.mjs +1 -53
- package/dist/assets/icons/publish/publish_collection.mjs +1 -28
- package/dist/assets/icons/publish/publish_pic.mjs +1 -27
- package/dist/assets/icons/publish/publish_video.mjs +1 -30
- package/dist/assets/icons/refresh.mjs +1 -18
- package/dist/assets/icons/right_arrow.mjs +1 -14
- package/dist/assets/icons/search/avatar.mjs +1 -36
- package/dist/assets/icons/search/filter.mjs +1 -17
- package/dist/assets/icons/search/video.mjs +1 -27
- package/dist/assets/icons/search.mjs +1 -23
- package/dist/assets/icons/share/share-link.mjs +1 -39
- package/dist/assets/icons/tabs/follow.mjs +1 -20
- package/dist/assets/icons/tabs/follow_active.mjs +1 -17
- package/dist/assets/icons/tabs/home.mjs +1 -17
- package/dist/assets/icons/tabs/home_active.mjs +1 -17
- package/dist/assets/icons/tabs/mine.mjs +1 -26
- package/dist/assets/icons/tabs/mine_active.mjs +1 -17
- package/dist/assets/icons/view.mjs +1 -17
- package/dist/assets/images/add.mjs +1 -5
- package/dist/assets/images/default_avatar.mjs +1 -5
- package/dist/assets/images/default_collection_cover.mjs +1 -5
- package/dist/assets/images/empty/img_empty_adduser.mjs +1 -463
- package/dist/assets/images/empty/img_empty_message.mjs +1 -408
- package/dist/assets/images/empty/img_empty_network.mjs +1 -168
- package/dist/assets/images/empty/img_empty_nodata.mjs +1 -194
- package/dist/assets/images/empty/img_empty_picture.mjs +1 -59
- package/dist/assets/images/empty/img_empty_search.mjs +1 -250
- package/dist/assets/images/frame.mjs +1 -5
- package/dist/assets/images/less.mjs +1 -5
- package/dist/assets/images/logo.mjs +1 -5
- package/dist/assets/images/marquee.mjs +1 -5
- package/dist/assets/images/subscript.mjs +1 -5
- package/dist/assets/images/user/default_avatar.mjs +1 -5
- package/dist/biz.mjs +1 -144
- package/dist/common.mjs +1 -44
- package/dist/components/biz/basics/card-item/defaults/default-props.mjs +1 -10
- package/dist/components/biz/basics/card-item/runtime/client.mjs +1 -83
- package/dist/components/biz/basics/card-item/runtime/corners.mjs +1 -33
- package/dist/components/biz/basics/card-item/schema/component.mjs +1 -14
- package/dist/components/biz/basics/card-item/schema/data.schema.mjs +1 -8
- package/dist/components/biz/basics/card-item/schema/event.schema.mjs +1 -8
- package/dist/components/biz/basics/card-item/schema/index.mjs +1 -17
- package/dist/components/biz/basics/card-item/schema/props.schema.mjs +1 -18
- package/dist/components/biz/basics/card-item/schema/style.schema.mjs +1 -7
- package/dist/components/biz/basics/card-layout/defaults/default-props.mjs +1 -13
- package/dist/components/biz/basics/card-layout/runtime/client.mjs +1 -38
- package/dist/components/biz/basics/card-layout/schema/component.mjs +1 -14
- package/dist/components/biz/basics/card-layout/schema/data.schema.mjs +1 -8
- package/dist/components/biz/basics/card-layout/schema/event.schema.mjs +1 -5
- package/dist/components/biz/basics/card-layout/schema/index.mjs +1 -17
- package/dist/components/biz/basics/card-layout/schema/props.schema.mjs +1 -28
- package/dist/components/biz/basics/card-layout/schema/style.schema.mjs +1 -7
- package/dist/components/biz/basics/fullscreen-feed/basic-fullscreen.mjs +1 -268
- package/dist/components/biz/basics/fullscreen-feed/defaults/default-props.mjs +1 -11
- package/dist/components/biz/basics/fullscreen-feed/index.mjs +1 -12
- package/dist/components/biz/basics/fullscreen-feed/runtime/adapters.mjs +1 -97
- package/dist/components/biz/basics/fullscreen-feed/runtime/bottom-info.mjs +1 -125
- package/dist/components/biz/basics/fullscreen-feed/runtime/client.mjs +1 -390
- package/dist/components/biz/basics/fullscreen-feed/runtime/comment-modal.mjs +1 -107
- package/dist/components/biz/basics/fullscreen-feed/runtime/interaction-sync.mjs +1 -134
- package/dist/components/biz/basics/fullscreen-feed/runtime/post-slide.mjs +1 -232
- package/dist/components/biz/basics/fullscreen-feed/runtime/styles.module.mjs +152 -25
- package/dist/components/biz/basics/fullscreen-feed/runtime/use-mixed-feed-controller.mjs +1 -193
- package/dist/components/biz/basics/fullscreen-feed/runtime/use-series-feed-controller.mjs +1 -212
- package/dist/components/biz/basics/fullscreen-feed/runtime/user-action.mjs +1 -273
- package/dist/components/biz/basics/fullscreen-feed/runtime/video-slide.mjs +1 -373
- package/dist/components/biz/basics/fullscreen-feed/schema/component.mjs +1 -14
- package/dist/components/biz/basics/fullscreen-feed/schema/data.schema.mjs +1 -11
- package/dist/components/biz/basics/fullscreen-feed/schema/event.schema.mjs +1 -13
- package/dist/components/biz/basics/fullscreen-feed/schema/index.mjs +1 -17
- package/dist/components/biz/basics/fullscreen-feed/schema/props.schema.mjs +1 -20
- package/dist/components/biz/basics/fullscreen-feed/schema/style.schema.mjs +1 -5
- package/dist/components/biz/basics/logo/variants/basic-logo/defaults/default-props.mjs +1 -19
- package/dist/components/biz/basics/logo/variants/basic-logo/index.mjs +1 -9
- package/dist/components/biz/basics/logo/variants/basic-logo/runtime/client.mjs +1 -169
- package/dist/components/biz/basics/logo/variants/basic-logo/schema/component.mjs +1 -14
- package/dist/components/biz/basics/logo/variants/basic-logo/schema/data.schema.mjs +1 -9
- package/dist/components/biz/basics/logo/variants/basic-logo/schema/event.schema.mjs +1 -23
- package/dist/components/biz/basics/logo/variants/basic-logo/schema/index.mjs +1 -17
- package/dist/components/biz/basics/logo/variants/basic-logo/schema/props.schema.mjs +1 -78
- package/dist/components/biz/basics/logo/variants/basic-logo/schema/style.schema.mjs +1 -7
- package/dist/components/biz/basics/search/shared/components/search-box.mjs +1 -55
- package/dist/components/biz/basics/search/shared/config/default-data.mjs +1 -15
- package/dist/components/biz/basics/search/shared/config/schema.mjs +1 -50
- package/dist/components/biz/basics/search/variants/basic-search/defaults/default-props.mjs +1 -10
- package/dist/components/biz/basics/search/variants/basic-search/index.mjs +1 -12
- package/dist/components/biz/basics/search/variants/basic-search/runtime/client.mjs +1 -31
- package/dist/components/biz/basics/search/variants/basic-search/schema/component.mjs +1 -14
- package/dist/components/biz/basics/search/variants/basic-search/schema/data.schema.mjs +1 -8
- package/dist/components/biz/basics/search/variants/basic-search/schema/event.schema.mjs +1 -7
- package/dist/components/biz/basics/search/variants/basic-search/schema/index.mjs +1 -17
- package/dist/components/biz/basics/search/variants/basic-search/schema/props.schema.mjs +1 -7
- package/dist/components/biz/basics/search/variants/basic-search/schema/style.schema.mjs +1 -7
- package/dist/components/biz/basics/search/variants/filter-search/defaults/default-props.mjs +1 -14
- package/dist/components/biz/basics/search/variants/filter-search/index.mjs +1 -12
- package/dist/components/biz/basics/search/variants/filter-search/runtime/client.mjs +1 -63
- package/dist/components/biz/basics/search/variants/filter-search/schema/component.mjs +1 -14
- package/dist/components/biz/basics/search/variants/filter-search/schema/data.schema.mjs +1 -8
- package/dist/components/biz/basics/search/variants/filter-search/schema/event.schema.mjs +1 -7
- package/dist/components/biz/basics/search/variants/filter-search/schema/index.mjs +1 -17
- package/dist/components/biz/basics/search/variants/filter-search/schema/props.schema.mjs +1 -22
- package/dist/components/biz/basics/search/variants/filter-search/schema/style.schema.mjs +1 -7
- package/dist/components/biz/basics/search/variants/simple-search/defaults/default-props.mjs +1 -10
- package/dist/components/biz/basics/search/variants/simple-search/index.mjs +1 -9
- package/dist/components/biz/basics/search/variants/simple-search/runtime/client.mjs +1 -37
- package/dist/components/biz/basics/search/variants/simple-search/schema/component.mjs +1 -14
- package/dist/components/biz/basics/search/variants/simple-search/schema/data.schema.mjs +1 -8
- package/dist/components/biz/basics/search/variants/simple-search/schema/event.schema.mjs +1 -7
- package/dist/components/biz/basics/search/variants/simple-search/schema/index.mjs +1 -17
- package/dist/components/biz/basics/search/variants/simple-search/schema/props.schema.mjs +1 -7
- package/dist/components/biz/basics/search/variants/simple-search/schema/style.schema.mjs +1 -7
- package/dist/components/biz/basics/search/variants/tag-search/defaults/default-props.mjs +1 -18
- package/dist/components/biz/basics/search/variants/tag-search/index.mjs +1 -9
- package/dist/components/biz/basics/search/variants/tag-search/runtime/client.mjs +1 -67
- package/dist/components/biz/basics/search/variants/tag-search/schema/component.mjs +1 -14
- package/dist/components/biz/basics/search/variants/tag-search/schema/data.schema.mjs +1 -8
- package/dist/components/biz/basics/search/variants/tag-search/schema/event.schema.mjs +1 -7
- package/dist/components/biz/basics/search/variants/tag-search/schema/index.mjs +1 -17
- package/dist/components/biz/basics/search/variants/tag-search/schema/props.schema.mjs +1 -37
- package/dist/components/biz/basics/search/variants/tag-search/schema/style.schema.mjs +1 -7
- package/dist/components/biz/business/banner/variants/basic-banner/defaults/default-props.mjs +1 -15
- package/dist/components/biz/business/banner/variants/basic-banner/index.mjs +1 -12
- package/dist/components/biz/business/banner/variants/basic-banner/inspector-schema.mjs +1 -64
- package/dist/components/biz/business/banner/variants/basic-banner/material.mjs +1 -21
- package/dist/components/biz/business/banner/variants/basic-banner/runtime/client.mjs +1 -126
- package/dist/components/biz/business/banner/variants/basic-banner/schema/component.mjs +1 -14
- package/dist/components/biz/business/banner/variants/basic-banner/schema/data.schema.mjs +1 -53
- package/dist/components/biz/business/banner/variants/basic-banner/schema/event.schema.mjs +1 -5
- package/dist/components/biz/business/banner/variants/basic-banner/schema/index.mjs +1 -17
- package/dist/components/biz/business/banner/variants/basic-banner/schema/props.schema.mjs +1 -40
- package/dist/components/biz/business/banner/variants/basic-banner/schema/style.schema.mjs +1 -7
- package/dist/components/biz/business/banner/variants/basic-banner/server.mjs +1 -25
- package/dist/components/biz/business/banner-carousel/client.mjs +1 -122
- package/dist/components/biz/business/banner-carousel/default-props.mjs +1 -15
- package/dist/components/biz/business/banner-carousel/material.mjs +1 -21
- package/dist/components/biz/business/banner-carousel/schema.mjs +1 -85
- package/dist/components/biz/business/banner-carousel/server.mjs +1 -22
- package/dist/components/biz/business/card-grid/variants/card-grid-2x3/defaults/default-props.mjs +1 -8
- package/dist/components/biz/business/card-grid/variants/card-grid-2x3/index.mjs +1 -9
- package/dist/components/biz/business/card-grid/variants/card-grid-2x3/runtime/client.mjs +1 -41
- package/dist/components/biz/business/card-grid/variants/card-grid-2x3/schema/component.mjs +1 -14
- package/dist/components/biz/business/card-grid/variants/card-grid-2x3/schema/data.schema.mjs +1 -8
- package/dist/components/biz/business/card-grid/variants/card-grid-2x3/schema/event.schema.mjs +1 -5
- package/dist/components/biz/business/card-grid/variants/card-grid-2x3/schema/index.mjs +1 -17
- package/dist/components/biz/business/card-grid/variants/card-grid-2x3/schema/props.schema.mjs +1 -12
- package/dist/components/biz/business/card-grid/variants/card-grid-2x3/schema/style.schema.mjs +1 -7
- package/dist/components/biz/business/card-grid/variants/card-grid-2x3-infinite/defaults/default-props.mjs +1 -8
- package/dist/components/biz/business/card-grid/variants/card-grid-2x3-infinite/index.mjs +1 -9
- package/dist/components/biz/business/card-grid/variants/card-grid-2x3-infinite/runtime/client.mjs +1 -106
- package/dist/components/biz/business/card-grid/variants/card-grid-2x3-infinite/schema/component.mjs +1 -14
- package/dist/components/biz/business/card-grid/variants/card-grid-2x3-infinite/schema/data.schema.mjs +1 -8
- package/dist/components/biz/business/card-grid/variants/card-grid-2x3-infinite/schema/event.schema.mjs +1 -5
- package/dist/components/biz/business/card-grid/variants/card-grid-2x3-infinite/schema/index.mjs +1 -17
- package/dist/components/biz/business/card-grid/variants/card-grid-2x3-infinite/schema/props.schema.mjs +1 -12
- package/dist/components/biz/business/card-grid/variants/card-grid-2x3-infinite/schema/style.schema.mjs +1 -7
- package/dist/components/biz/business/card-grid/variants/card-grid-2x4/defaults/default-props.mjs +1 -8
- package/dist/components/biz/business/card-grid/variants/card-grid-2x4/index.mjs +1 -9
- package/dist/components/biz/business/card-grid/variants/card-grid-2x4/runtime/client.mjs +1 -41
- package/dist/components/biz/business/card-grid/variants/card-grid-2x4/schema/component.mjs +1 -14
- package/dist/components/biz/business/card-grid/variants/card-grid-2x4/schema/data.schema.mjs +1 -8
- package/dist/components/biz/business/card-grid/variants/card-grid-2x4/schema/event.schema.mjs +1 -5
- package/dist/components/biz/business/card-grid/variants/card-grid-2x4/schema/index.mjs +1 -17
- package/dist/components/biz/business/card-grid/variants/card-grid-2x4/schema/props.schema.mjs +1 -12
- package/dist/components/biz/business/card-grid/variants/card-grid-2x4/schema/style.schema.mjs +1 -7
- package/dist/components/biz/business/card-grid/variants/card-grid-3x3/defaults/default-props.mjs +1 -8
- package/dist/components/biz/business/card-grid/variants/card-grid-3x3/index.mjs +1 -9
- package/dist/components/biz/business/card-grid/variants/card-grid-3x3/runtime/client.mjs +1 -41
- package/dist/components/biz/business/card-grid/variants/card-grid-3x3/schema/component.mjs +1 -14
- package/dist/components/biz/business/card-grid/variants/card-grid-3x3/schema/data.schema.mjs +1 -8
- package/dist/components/biz/business/card-grid/variants/card-grid-3x3/schema/event.schema.mjs +1 -5
- package/dist/components/biz/business/card-grid/variants/card-grid-3x3/schema/index.mjs +1 -17
- package/dist/components/biz/business/card-grid/variants/card-grid-3x3/schema/props.schema.mjs +1 -12
- package/dist/components/biz/business/card-grid/variants/card-grid-3x3/schema/style.schema.mjs +1 -7
- package/dist/components/biz/business/card-grid/variants/card-grid-3x3-infinite/defaults/default-props.mjs +1 -8
- package/dist/components/biz/business/card-grid/variants/card-grid-3x3-infinite/index.mjs +1 -9
- package/dist/components/biz/business/card-grid/variants/card-grid-3x3-infinite/runtime/client.mjs +1 -106
- package/dist/components/biz/business/card-grid/variants/card-grid-3x3-infinite/schema/component.mjs +1 -14
- package/dist/components/biz/business/card-grid/variants/card-grid-3x3-infinite/schema/data.schema.mjs +1 -8
- package/dist/components/biz/business/card-grid/variants/card-grid-3x3-infinite/schema/event.schema.mjs +1 -5
- package/dist/components/biz/business/card-grid/variants/card-grid-3x3-infinite/schema/index.mjs +1 -17
- package/dist/components/biz/business/card-grid/variants/card-grid-3x3-infinite/schema/props.schema.mjs +1 -12
- package/dist/components/biz/business/card-grid/variants/card-grid-3x3-infinite/schema/style.schema.mjs +1 -7
- package/dist/components/biz/business/channel-list/channel-filter-dialog.mjs +1 -190
- package/dist/components/biz/business/channel-list/client.mjs +1 -136
- package/dist/components/biz/business/channel-list/default-props.mjs +1 -12
- package/dist/components/biz/business/channel-list/material.mjs +1 -21
- package/dist/components/biz/business/channel-list/schema.mjs +1 -39
- package/dist/components/biz/business/comment/comment-input.mjs +5 -772
- package/dist/components/biz/business/comment/comment-item.mjs +1 -190
- package/dist/components/biz/business/comment/comment-list.mjs +1 -722
- package/dist/components/biz/business/comment/comment-media.mjs +1 -57
- package/dist/components/biz/business/comment/comment-rich-text.mjs +1 -69
- package/dist/components/biz/business/comment/reply-detail.mjs +1 -978
- package/dist/components/biz/business/comment/time-display.mjs +1 -20
- package/dist/components/biz/business/comment/use-keyboard-handler.mjs +1 -142
- package/dist/components/biz/business/contact/contact-item.mjs +1 -45
- package/dist/components/biz/business/contact/contact-list.mjs +1 -212
- package/dist/components/biz/business/contact/contact-search.mjs +1 -128
- package/dist/components/biz/business/detail/shared/detail-follow-action.mjs +1 -105
- package/dist/components/biz/business/detail/shared/detail-info-tags.mjs +1 -24
- package/dist/components/biz/business/detail/shared/detail-info-title.mjs +1 -82
- package/dist/components/biz/business/detail/shared/detail-introduction.mjs +1 -109
- package/dist/components/biz/business/detail/shared/detail-operate.mjs +1 -340
- package/dist/components/biz/business/detail/shared/detail-structured-data.mjs +1 -63
- package/dist/components/biz/business/detail/shared/editor-preview.mjs +1 -67
- package/dist/components/biz/business/detail/shared/material-route-context.mjs +1 -44
- package/dist/components/biz/business/detail/shared/metadata-utils.mjs +1 -21
- package/dist/components/biz/business/detail/shared/post-recommend-list.mjs +1 -184
- package/dist/components/biz/business/detail/shared/registry.mjs +1 -52
- package/dist/components/biz/business/detail/shared/runtime-context-provider.mjs +1 -191
- package/dist/components/biz/business/detail/shared/seo-config.mjs +1 -28
- package/dist/components/biz/business/detail/shared/use-video-detail-webview-bridge.mjs +1 -89
- package/dist/components/biz/business/detail/shared/video-detail-server-data.mjs +1 -46
- package/dist/components/biz/business/detail/shared/video-hero.mjs +1 -395
- package/dist/components/biz/business/detail/video-detail-actions/client.mjs +1 -106
- package/dist/components/biz/business/detail/video-detail-actions/material.mjs +1 -18
- package/dist/components/biz/business/detail/video-detail-actions/schema.mjs +1 -11
- package/dist/components/biz/business/detail/video-detail-actions/server.mjs +1 -47
- package/dist/components/biz/business/detail/video-detail-info/client.mjs +1 -41
- package/dist/components/biz/business/detail/video-detail-info/material.mjs +1 -18
- package/dist/components/biz/business/detail/video-detail-info/schema.mjs +1 -20
- package/dist/components/biz/business/detail/video-detail-info/server.mjs +1 -98
- package/dist/components/biz/business/detail/video-detail-info-title-tags-episodes/client.mjs +1 -51
- package/dist/components/biz/business/detail/video-detail-info-title-tags-episodes/material.mjs +1 -18
- package/dist/components/biz/business/detail/video-detail-info-title-tags-episodes/schema.mjs +1 -20
- package/dist/components/biz/business/detail/video-detail-info-title-tags-episodes/server.mjs +1 -45
- package/dist/components/biz/business/detail/video-detail-player/client.mjs +1 -144
- package/dist/components/biz/business/detail/video-detail-player/material.mjs +1 -18
- package/dist/components/biz/business/detail/video-detail-player/schema.mjs +1 -11
- package/dist/components/biz/business/detail/video-detail-player/server.mjs +1 -17
- package/dist/components/biz/business/detail/video-detail-recommend/client.mjs +1 -552
- package/dist/components/biz/business/detail/video-detail-recommend/material.mjs +1 -18
- package/dist/components/biz/business/detail/video-detail-recommend/schema.mjs +1 -58
- package/dist/components/biz/business/detail/video-detail-recommend/server.mjs +1 -18
- package/dist/components/biz/business/detail/video-detail-recommend/utils.mjs +1 -68
- package/dist/components/biz/business/feature-grid/variants/basic-feature-grid/defaults/default-props.mjs +1 -12
- package/dist/components/biz/business/feature-grid/variants/basic-feature-grid/index.mjs +1 -9
- package/dist/components/biz/business/feature-grid/variants/basic-feature-grid/runtime/client.mjs +1 -66
- package/dist/components/biz/business/feature-grid/variants/basic-feature-grid/schema/component.mjs +1 -14
- package/dist/components/biz/business/feature-grid/variants/basic-feature-grid/schema/data.schema.mjs +1 -43
- package/dist/components/biz/business/feature-grid/variants/basic-feature-grid/schema/event.schema.mjs +1 -5
- package/dist/components/biz/business/feature-grid/variants/basic-feature-grid/schema/index.mjs +1 -17
- package/dist/components/biz/business/feature-grid/variants/basic-feature-grid/schema/props.schema.mjs +1 -32
- package/dist/components/biz/business/feature-grid/variants/basic-feature-grid/schema/style.schema.mjs +1 -7
- package/dist/components/biz/business/floating-ball/client.mjs +1 -31
- package/dist/components/biz/business/floating-ball/material.mjs +1 -18
- package/dist/components/biz/business/floating-ball/schema.mjs +1 -22
- package/dist/components/biz/business/floating-ball/server.mjs +1 -17
- package/dist/components/biz/business/fullscreen-feed/variants/fullscreen-post-feed/defaults/default-props.mjs +1 -11
- package/dist/components/biz/business/fullscreen-feed/variants/fullscreen-post-feed/index.mjs +1 -9
- package/dist/components/biz/business/fullscreen-feed/variants/fullscreen-post-feed/runtime/client.mjs +1 -71
- package/dist/components/biz/business/fullscreen-feed/variants/fullscreen-post-feed/schema/component.mjs +1 -14
- package/dist/components/biz/business/fullscreen-feed/variants/fullscreen-post-feed/schema/data.schema.mjs +1 -11
- package/dist/components/biz/business/fullscreen-feed/variants/fullscreen-post-feed/schema/index.mjs +1 -17
- package/dist/components/biz/business/fullscreen-feed/variants/fullscreen-video-feed/defaults/default-props.mjs +1 -11
- package/dist/components/biz/business/fullscreen-feed/variants/fullscreen-video-feed/index.mjs +1 -9
- package/dist/components/biz/business/fullscreen-feed/variants/fullscreen-video-feed/runtime/client.mjs +1 -64
- package/dist/components/biz/business/fullscreen-feed/variants/fullscreen-video-feed/schema/component.mjs +1 -14
- package/dist/components/biz/business/fullscreen-feed/variants/fullscreen-video-feed/schema/data.schema.mjs +1 -11
- package/dist/components/biz/business/fullscreen-feed/variants/fullscreen-video-feed/schema/index.mjs +1 -17
- package/dist/components/biz/business/fullscreen-feed/variants/shared/runtime-compat.mjs +1 -522
- package/dist/components/biz/business/header-search/header-avatar-icon/client.mjs +1 -29
- package/dist/components/biz/business/header-search/header-avatar-icon/material.mjs +1 -18
- package/dist/components/biz/business/header-search/header-avatar-icon/schema.mjs +1 -11
- package/dist/components/biz/business/header-search/header-avatar-icon/server.mjs +1 -17
- package/dist/components/biz/business/header-search/header-avatar-logo-search/client.mjs +1 -36
- package/dist/components/biz/business/header-search/header-avatar-logo-search/material.mjs +1 -18
- package/dist/components/biz/business/header-search/header-avatar-logo-search/schema.mjs +1 -24
- package/dist/components/biz/business/header-search/header-avatar-logo-search/server.mjs +1 -17
- package/dist/components/biz/business/header-search/header-avatar-logo-search-icon/client.mjs +1 -45
- package/dist/components/biz/business/header-search/header-avatar-logo-search-icon/material.mjs +1 -18
- package/dist/components/biz/business/header-search/header-avatar-logo-search-icon/schema.mjs +1 -22
- package/dist/components/biz/business/header-search/header-avatar-logo-search-icon/server.mjs +1 -17
- package/dist/components/biz/business/header-search/header-logo-search/client.mjs +1 -33
- package/dist/components/biz/business/header-search/header-logo-search/material.mjs +1 -18
- package/dist/components/biz/business/header-search/header-logo-search/schema.mjs +1 -24
- package/dist/components/biz/business/header-search/header-logo-search/server.mjs +1 -17
- package/dist/components/biz/business/header-search/header-search/client.mjs +1 -20
- package/dist/components/biz/business/header-search/header-search/material.mjs +1 -18
- package/dist/components/biz/business/header-search/header-search/schema.mjs +1 -11
- package/dist/components/biz/business/header-search/header-search/server.mjs +1 -17
- package/dist/components/biz/business/header-search/shared/avatar.mjs +1 -44
- package/dist/components/biz/business/header-search/shared/logo.mjs +1 -28
- package/dist/components/biz/business/header-search/shared/search.mjs +1 -28
- package/dist/components/biz/business/home-recommend/home-recommend-grid/client.mjs +1 -48
- package/dist/components/biz/business/home-recommend/home-recommend-grid/index.mjs +1 -14
- package/dist/components/biz/business/home-recommend/home-recommend-grid/inspector-schema.mjs +1 -193
- package/dist/components/biz/business/home-recommend/home-recommend-grid/material.mjs +1 -18
- package/dist/components/biz/business/home-recommend/home-recommend-grid/schema.mjs +1 -24
- package/dist/components/biz/business/home-recommend/home-recommend-grid/server.mjs +1 -49
- package/dist/components/biz/business/home-recommend/home-recommend-waterfall/client.mjs +1 -44
- package/dist/components/biz/business/home-recommend/home-recommend-waterfall/index.mjs +1 -14
- package/dist/components/biz/business/home-recommend/home-recommend-waterfall/inspector-schema.mjs +1 -169
- package/dist/components/biz/business/home-recommend/home-recommend-waterfall/material.mjs +1 -18
- package/dist/components/biz/business/home-recommend/home-recommend-waterfall/schema.mjs +1 -24
- package/dist/components/biz/business/home-recommend/home-recommend-waterfall/server.mjs +1 -44
- package/dist/components/biz/business/home-recommend/shared/home-recommend-base.mjs +1 -498
- package/dist/components/biz/business/home-recommend/shared/home-recommend-default-config.mjs +1 -25
- package/dist/components/biz/business/home-recommend/shared/home-recommend-preview.mjs +1 -130
- package/dist/components/biz/business/home-recommend/shared/home-recommend-runtime-props.mjs +1 -34
- package/dist/components/biz/business/home-recommend/shared/home-recommend-server-data.mjs +1 -288
- package/dist/components/biz/business/home-recommend/shared/home-recommend-video-detail.mjs +1 -38
- package/dist/components/biz/business/image-text-recommend/client.mjs +1 -423
- package/dist/components/biz/business/image-text-recommend/material.mjs +1 -21
- package/dist/components/biz/business/image-text-recommend/schema.mjs +1 -117
- package/dist/components/biz/business/image-text-recommend/server.mjs +1 -53
- package/dist/components/biz/business/image-text-recommend/shared/query.mjs +1 -32
- package/dist/components/biz/business/large-feature-grid/card-item.mjs +1 -91
- package/dist/components/biz/business/large-feature-grid/client.mjs +1 -88
- package/dist/components/biz/business/large-feature-grid/material.mjs +1 -21
- package/dist/components/biz/business/large-feature-grid/schema.mjs +1 -81
- package/dist/components/biz/business/large-feature-grid/server.mjs +1 -16
- package/dist/components/biz/business/marquee/client.mjs +1 -230
- package/dist/components/biz/business/marquee/marquee.module.mjs +25 -13
- package/dist/components/biz/business/marquee/material.mjs +1 -21
- package/dist/components/biz/business/marquee/schema.mjs +1 -97
- package/dist/components/biz/business/marquee/server.mjs +1 -17
- package/dist/components/biz/business/nav-bar/variants/basic-nav-bar/defaults/default-props.mjs +1 -21
- package/dist/components/biz/business/nav-bar/variants/basic-nav-bar/index.mjs +1 -9
- package/dist/components/biz/business/nav-bar/variants/basic-nav-bar/runtime/channel-filter-dialog.mjs +1 -180
- package/dist/components/biz/business/nav-bar/variants/basic-nav-bar/runtime/client.mjs +1 -148
- package/dist/components/biz/business/nav-bar/variants/basic-nav-bar/schema/component.mjs +1 -14
- package/dist/components/biz/business/nav-bar/variants/basic-nav-bar/schema/data.schema.mjs +1 -9
- package/dist/components/biz/business/nav-bar/variants/basic-nav-bar/schema/event.schema.mjs +1 -27
- package/dist/components/biz/business/nav-bar/variants/basic-nav-bar/schema/index.mjs +1 -17
- package/dist/components/biz/business/nav-bar/variants/basic-nav-bar/schema/props.schema.mjs +1 -92
- package/dist/components/biz/business/nav-bar/variants/basic-nav-bar/schema/style.schema.mjs +1 -7
- package/dist/components/biz/business/post-card/variants/basic-post-card/defaults/default-props.mjs +1 -8
- package/dist/components/biz/business/post-card/variants/basic-post-card/index.mjs +1 -9
- package/dist/components/biz/business/post-card/variants/basic-post-card/runtime/client.mjs +1 -119
- package/dist/components/biz/business/post-card/variants/basic-post-card/schema/component.mjs +1 -14
- package/dist/components/biz/business/post-card/variants/basic-post-card/schema/data.schema.mjs +1 -8
- package/dist/components/biz/business/post-card/variants/basic-post-card/schema/event.schema.mjs +1 -5
- package/dist/components/biz/business/post-card/variants/basic-post-card/schema/index.mjs +1 -17
- package/dist/components/biz/business/post-card/variants/basic-post-card/schema/props.schema.mjs +1 -5
- package/dist/components/biz/business/post-card/variants/basic-post-card/schema/style.schema.mjs +1 -7
- package/dist/components/biz/business/profile/profile-header/client.mjs +1 -243
- package/dist/components/biz/business/profile/profile-header/material.mjs +1 -59
- package/dist/components/biz/business/profile/profile-header/schema.mjs +1 -11
- package/dist/components/biz/business/profile/profile-header/user-profile-avatar.mjs +1 -235
- package/dist/components/biz/business/profile/profile-header/user-profile-cover-background.mjs +1 -135
- package/dist/components/biz/business/profile/profile-main/client.mjs +1 -234
- package/dist/components/biz/business/profile/profile-main/material.mjs +1 -18
- package/dist/components/biz/business/profile/profile-main/schema.mjs +1 -11
- package/dist/components/biz/business/profile/profile-main/server.mjs +1 -13
- package/dist/components/biz/business/profile/profile-main/shell.mjs +1 -187
- package/dist/components/biz/business/profile/profile-main/tabs/collect-tab/client.mjs +1 -519
- package/dist/components/biz/business/profile/profile-main/tabs/collect-tab/server.mjs +1 -13
- package/dist/components/biz/business/profile/profile-main/tabs/history-tab/client.mjs +1 -250
- package/dist/components/biz/business/profile/profile-main/tabs/history-tab/server.mjs +1 -13
- package/dist/components/biz/business/profile/profile-main/tabs/like-tab/client.mjs +1 -250
- package/dist/components/biz/business/profile/profile-main/tabs/like-tab/server.mjs +1 -13
- package/dist/components/biz/business/profile/profile-main/tabs/publish-tab/client.mjs +1 -149
- package/dist/components/biz/business/profile/profile-main/tabs/publish-tab/server.mjs +1 -13
- package/dist/components/biz/business/profile/profile-main/utils.mjs +1 -248
- package/dist/components/biz/business/profile/profile-main/variants.mjs +1 -40
- package/dist/components/biz/business/recommended-users/variants/basic-recommended-users/defaults/default-props.mjs +1 -15
- package/dist/components/biz/business/recommended-users/variants/basic-recommended-users/index.mjs +1 -9
- package/dist/components/biz/business/recommended-users/variants/basic-recommended-users/runtime/client.mjs +1 -168
- package/dist/components/biz/business/recommended-users/variants/basic-recommended-users/runtime/recommended-users-skeleton.mjs +1 -119
- package/dist/components/biz/business/recommended-users/variants/basic-recommended-users/schema/component.mjs +1 -14
- package/dist/components/biz/business/recommended-users/variants/basic-recommended-users/schema/data.schema.mjs +1 -9
- package/dist/components/biz/business/recommended-users/variants/basic-recommended-users/schema/event.schema.mjs +1 -17
- package/dist/components/biz/business/recommended-users/variants/basic-recommended-users/schema/index.mjs +1 -17
- package/dist/components/biz/business/recommended-users/variants/basic-recommended-users/schema/props.schema.mjs +1 -54
- package/dist/components/biz/business/recommended-users/variants/basic-recommended-users/schema/style.schema.mjs +1 -7
- package/dist/components/biz/business/search-bar/variants/basic-search-bar/defaults/default-props.mjs +1 -15
- package/dist/components/biz/business/search-bar/variants/basic-search-bar/index.mjs +1 -9
- package/dist/components/biz/business/search-bar/variants/basic-search-bar/runtime/client.mjs +1 -52
- package/dist/components/biz/business/search-bar/variants/basic-search-bar/schema/component.mjs +1 -14
- package/dist/components/biz/business/search-bar/variants/basic-search-bar/schema/data.schema.mjs +1 -9
- package/dist/components/biz/business/search-bar/variants/basic-search-bar/schema/event.schema.mjs +1 -5
- package/dist/components/biz/business/search-bar/variants/basic-search-bar/schema/index.mjs +1 -17
- package/dist/components/biz/business/search-bar/variants/basic-search-bar/schema/props.schema.mjs +1 -117
- package/dist/components/biz/business/search-bar/variants/basic-search-bar/schema/style.schema.mjs +1 -7
- package/dist/components/biz/business/search-bar/variants/detail-search-bar/defaults/default-props.mjs +1 -22
- package/dist/components/biz/business/search-bar/variants/detail-search-bar/index.mjs +1 -9
- package/dist/components/biz/business/search-bar/variants/detail-search-bar/runtime/client.mjs +1 -53
- package/dist/components/biz/business/search-bar/variants/detail-search-bar/schema/component.mjs +1 -14
- package/dist/components/biz/business/search-bar/variants/detail-search-bar/schema/data.schema.mjs +1 -9
- package/dist/components/biz/business/search-bar/variants/detail-search-bar/schema/event.schema.mjs +1 -5
- package/dist/components/biz/business/search-bar/variants/detail-search-bar/schema/index.mjs +1 -17
- package/dist/components/biz/business/search-bar/variants/detail-search-bar/schema/props.schema.mjs +1 -117
- package/dist/components/biz/business/search-bar/variants/detail-search-bar/schema/style.schema.mjs +1 -7
- package/dist/components/biz/business/search-bar/variants/filter-search-bar/defaults/default-props.mjs +1 -15
- package/dist/components/biz/business/search-bar/variants/filter-search-bar/index.mjs +1 -9
- package/dist/components/biz/business/search-bar/variants/filter-search-bar/runtime/client.mjs +1 -52
- package/dist/components/biz/business/search-bar/variants/filter-search-bar/schema/component.mjs +1 -14
- package/dist/components/biz/business/search-bar/variants/filter-search-bar/schema/data.schema.mjs +1 -9
- package/dist/components/biz/business/search-bar/variants/filter-search-bar/schema/event.schema.mjs +1 -25
- package/dist/components/biz/business/search-bar/variants/filter-search-bar/schema/index.mjs +1 -17
- package/dist/components/biz/business/search-bar/variants/filter-search-bar/schema/props.schema.mjs +1 -128
- package/dist/components/biz/business/search-bar/variants/filter-search-bar/schema/style.schema.mjs +1 -7
- package/dist/components/biz/business/search-bar/variants/tag-search-bar/defaults/default-props.mjs +1 -15
- package/dist/components/biz/business/search-bar/variants/tag-search-bar/index.mjs +1 -12
- package/dist/components/biz/business/search-bar/variants/tag-search-bar/runtime/client.mjs +1 -58
- package/dist/components/biz/business/search-bar/variants/tag-search-bar/schema/component.mjs +1 -14
- package/dist/components/biz/business/search-bar/variants/tag-search-bar/schema/data.schema.mjs +1 -9
- package/dist/components/biz/business/search-bar/variants/tag-search-bar/schema/event.schema.mjs +1 -38
- package/dist/components/biz/business/search-bar/variants/tag-search-bar/schema/index.mjs +1 -17
- package/dist/components/biz/business/search-bar/variants/tag-search-bar/schema/props.schema.mjs +1 -144
- package/dist/components/biz/business/search-bar/variants/tag-search-bar/schema/style.schema.mjs +1 -7
- package/dist/components/biz/business/search-history/client.mjs +1 -121
- package/dist/components/biz/business/search-history/material.mjs +1 -18
- package/dist/components/biz/business/search-history/schema.mjs +1 -20
- package/dist/components/biz/business/search-history/server.mjs +1 -17
- package/dist/components/biz/business/search-input/client.mjs +1 -108
- package/dist/components/biz/business/search-input/material.mjs +1 -18
- package/dist/components/biz/business/search-input/schema.mjs +1 -11
- package/dist/components/biz/business/search-input/server.mjs +1 -17
- package/dist/components/biz/business/shortcut-grid/client.mjs +1 -64
- package/dist/components/biz/business/shortcut-grid/material.mjs +1 -18
- package/dist/components/biz/business/shortcut-grid/schema.mjs +1 -70
- package/dist/components/biz/business/shortcut-grid/server.mjs +1 -17
- package/dist/components/biz/business/tab-bar/client.mjs +1 -102
- package/dist/components/biz/business/tab-bar/material.mjs +1 -21
- package/dist/components/biz/business/tab-bar/schema.mjs +1 -11
- package/dist/components/biz/business/tab-bar/server.mjs +1 -17
- package/dist/components/biz/business/text-recommend/client.mjs +1 -69
- package/dist/components/biz/business/text-recommend/material.mjs +1 -18
- package/dist/components/biz/business/text-recommend/schema.mjs +1 -28
- package/dist/components/biz/business/text-recommend/server.mjs +1 -18
- package/dist/components/biz/example/button/client.mjs +1 -43
- package/dist/components/biz/example/button/material.mjs +1 -18
- package/dist/components/biz/example/button/schema.mjs +1 -47
- package/dist/components/biz/example/button/server.mjs +1 -32
- package/dist/components/biz/example/button/variants.mjs +1 -22
- package/dist/components/biz/renderer/renderer.mjs +1 -73
- package/dist/components/biz/utils/constants/card-spec.mjs +1 -48
- package/dist/components/biz/utils/helpers/get-channel-list.mjs +1 -14
- package/dist/components/biz/utils/helpers/url.mjs +1 -16
- package/dist/components/biz/utils/schema/data.mjs +1 -22
- package/dist/components/biz/utils/styles/helpers.mjs +1 -84
- package/dist/components/biz/utils/styles/schema.mjs +1 -306
- package/dist/components/biz/utils/transformers/card-grid.mjs +1 -71
- package/dist/components/biz/utils/transformers/data.mjs +1 -171
- package/dist/components/common/at-element/index.mjs +1 -47
- package/dist/components/common/background-preview-modal/background-preview-modal.mjs +1 -73
- package/dist/components/common/blocked-dialog/blocked-dialog.mjs +1 -54
- package/dist/components/common/cards/mini-three-card.mjs +1 -55
- package/dist/components/common/cards/style.module.mjs +24 -12
- package/dist/components/common/collection-popup/collection-create-modal.mjs +1 -130
- package/dist/components/common/collection-popup/index.mjs +1 -292
- package/dist/components/common/debug-locale-switcher/index.mjs +1 -59
- package/dist/components/common/delete-confirm-dialog/delete-confirm-dialog.mjs +1 -66
- package/dist/components/common/empty/index.mjs +1 -51
- package/dist/components/common/follow-button/index.mjs +1 -133
- package/dist/components/common/follow-button/unfollow-confirm-dialog.mjs +1 -23
- package/dist/components/common/funhub-provider/funhub-provider.mjs +1 -85
- package/dist/components/common/header-nav/client.mjs +1 -51
- package/dist/components/common/icons/add.mjs +1 -21
- package/dist/components/common/icons/comment.mjs +1 -30
- package/dist/components/common/icons/delete.mjs +1 -32
- package/dist/components/common/icons/left-arrow.mjs +1 -15
- package/dist/components/common/icons/more.mjs +1 -30
- package/dist/components/common/icons/right-arrow.mjs +1 -19
- package/dist/components/common/icons/setting.mjs +1 -45
- package/dist/components/common/icons/share.mjs +1 -20
- package/dist/components/common/icons/video.mjs +1 -22
- package/dist/components/common/image-crop/image-crop.mjs +1 -182
- package/dist/components/common/image-crop/show-image-crop.mjs +1 -102
- package/dist/components/common/image-crop-modal/image-crop-modal.mjs +2 -128
- package/dist/components/common/info-card/card-header.mjs +1 -70
- package/dist/components/common/info-card/card-text.mjs +1 -49
- package/dist/components/common/interaction-animations.module.mjs +84 -14
- package/dist/components/common/intl-provider/intl-provider.mjs +1 -21
- package/dist/components/common/keep-scroll-position/index.mjs +1 -39
- package/dist/components/common/list/collection-list/collection-list-item.mjs +1 -93
- package/dist/components/common/list/collection-list/collection-list.mjs +1 -21
- package/dist/components/common/list/post-list/post-list-item.mjs +1 -54
- package/dist/components/common/list/post-list/post-list.mjs +1 -143
- package/dist/components/common/list/user-activity-list/user-activity-list-actions.mjs +1 -269
- package/dist/components/common/list/user-activity-list/user-activity-list-item.mjs +1 -468
- package/dist/components/common/list/user-activity-list/user-activity-list.mjs +1 -139
- package/dist/components/common/list/video-list/video-list-item.mjs +1 -104
- package/dist/components/common/list/video-list/video-list.mjs +1 -152
- package/dist/components/common/locale-sync/locale-sync.mjs +1 -62
- package/dist/components/common/login-dialog/login-dialog.mjs +1 -29
- package/dist/components/common/media-preview/index.mjs +1 -162
- package/dist/components/common/media-preview/video-play.mjs +1 -237
- package/dist/components/common/page-loading/index.mjs +1 -20
- package/dist/components/common/page-skeleton/page-skeleton.mjs +1 -7
- package/dist/components/common/photo-grid/common-photo-grid.d.mts +1 -0
- package/dist/components/common/photo-grid/common-photo-grid.mjs +1 -320
- package/dist/components/common/photo-grid/index.mjs +1 -226
- package/dist/components/common/photo-preview/common-photo-preview.mjs +1 -96
- package/dist/components/common/photo-preview/decrypt-loading.mjs +2 -66
- package/dist/components/common/photo-preview/index.d.mts +2 -0
- package/dist/components/common/photo-preview/index.mjs +1 -63
- package/dist/components/common/photo-preview/style.mjs +19 -7
- package/dist/components/common/picker/gender-picker/gender-picker.mjs +1 -66
- package/dist/components/common/picker/picker-drawer/picker-drawer.mjs +1 -78
- package/dist/components/common/popup-video/index.mjs +1 -76
- package/dist/components/common/popup-video/popup-video.module.mjs +16 -7
- package/dist/components/common/series-episodes/index.mjs +1 -555
- package/dist/components/common/share-popup/share-content.mjs +1 -155
- package/dist/components/common/share-popup/share-drawer.mjs +1 -100
- package/dist/components/common/share-popup/share-popup.mjs +1 -326
- package/dist/components/common/skeleton/post-list-item-skeleton.mjs +1 -99
- package/dist/components/common/skeleton/search-video-card-skeleton.mjs +2 -0
- package/dist/components/common/skeleton/user-activity-list-item-skeleton.mjs +1 -146
- package/dist/components/common/skeleton/video-list-item-skeleton.mjs +1 -110
- package/dist/components/common/tab-bar/index.mjs +1 -120
- package/dist/components/common/theme-sync/index.mjs +1 -22
- package/dist/components/common/top-nav-bar/client.mjs +1 -63
- package/dist/components/common/top-nav-bar/fullscreen.mjs +1 -27
- package/dist/components/common/top-nav-bar/index.mjs +1 -29
- package/dist/components/common/top-nav-bar/normal.mjs +1 -20
- package/dist/components/common/video-player/create-video.mjs +2 -27
- package/dist/components/common/video-player/index.mjs +5 -710
- package/dist/components/common/video-player/playing-videos.mjs +1 -73
- package/dist/components/common/video-player/process-m3u8-cache.mjs +1 -282
- package/dist/components/common/video-player/style.module.mjs +257 -7
- package/dist/components/common/wait-loading.mjs +1 -119
- package/dist/components/pages/(follow)/_components/follow-button/index.mjs +1 -80
- package/dist/components/pages/(follow)/_components/header-nav/index.mjs +1 -13
- package/dist/components/pages/(follow)/_components/interaction-tabs/index.mjs +1 -43
- package/dist/components/pages/(follow)/_components/user-list/index.mjs +1 -139
- package/dist/components/pages/(follow)/_components/user-list/user-list-item.mjs +1 -46
- package/dist/components/pages/(follow)/fans/index.mjs +1 -10
- package/dist/components/pages/(follow)/fans/page.mjs +1 -95
- package/dist/components/pages/(follow)/followed/index.mjs +1 -10
- package/dist/components/pages/(follow)/followed/page.mjs +1 -95
- package/dist/components/pages/collection-add/index.mjs +1 -10
- package/dist/components/pages/collection-add/page.mjs +1 -161
- package/dist/components/pages/collection-create/form.mjs +1 -163
- package/dist/components/pages/collection-create/index.mjs +1 -10
- package/dist/components/pages/collection-create/page.mjs +1 -28
- package/dist/components/pages/collection-detail/_components/collection-detail-card.mjs +1 -183
- package/dist/components/pages/collection-detail/detail.mjs +1 -538
- package/dist/components/pages/collection-detail/index.mjs +1 -10
- package/dist/components/pages/collection-detail/page.mjs +1 -18
- package/dist/components/pages/edit/index.mjs +1 -10
- package/dist/components/pages/edit/page.mjs +1 -655
- package/dist/components/pages/feed-series/feed-series-client.mjs +1 -382
- package/dist/components/pages/feed-series/page.mjs +1 -97
- package/dist/components/pages/feedback/_components/feedback-form.mjs +1 -256
- package/dist/components/pages/feedback/index.mjs +1 -10
- package/dist/components/pages/feedback/page.mjs +1 -10
- package/dist/components/pages/fullscreen-feed/index.mjs +1 -10
- package/dist/components/pages/fullscreen-feed/page.mjs +1 -104
- package/dist/components/pages/home/channel-matcher.mjs +1 -30
- package/dist/components/pages/home/client.mjs +1 -155
- package/dist/components/pages/home/index.mjs +1 -56
- package/dist/components/pages/login/agreement-dialog.mjs +1 -104
- package/dist/components/pages/login/auth-guard.mjs +1 -37
- package/dist/components/pages/login/forgot.mjs +1 -130
- package/dist/components/pages/login/index.mjs +1 -107
- package/dist/components/pages/login/login-client.mjs +1 -214
- package/dist/components/pages/login/password.mjs +1 -186
- package/dist/components/pages/login/register.mjs +1 -189
- package/dist/components/pages/login/reset-password.mjs +1 -193
- package/dist/components/pages/login/verify.mjs +3 -212
- package/dist/components/pages/post-detail/page.mjs +1 -28
- package/dist/components/pages/post-detail/post-detail-client.mjs +1 -516
- package/dist/components/pages/profile/index.mjs +1 -10
- package/dist/components/pages/profile/page.mjs +1 -28
- package/dist/components/pages/publish/components/collection-card.mjs +1 -49
- package/dist/components/pages/publish/components/collection-popup.mjs +1 -81
- package/dist/components/pages/publish/components/collection.mjs +1 -97
- package/dist/components/pages/publish/components/cover-item.mjs +1 -46
- package/dist/components/pages/publish/components/editor.mjs +1 -208
- package/dist/components/pages/publish/components/header.mjs +1 -31
- package/dist/components/pages/publish/components/material-grid.mjs +1 -52
- package/dist/components/pages/publish/components/material-item.mjs +1 -68
- package/dist/components/pages/publish/components/toolbar.mjs +1 -39
- package/dist/components/pages/publish/components/upload-progress.mjs +1 -53
- package/dist/components/pages/publish/components/video-item.mjs +1 -36
- package/dist/components/pages/publish/constants.mjs +1 -8
- package/dist/components/pages/publish/hooks/use-file-upload.mjs +1 -162
- package/dist/components/pages/publish/page-client.mjs +1 -345
- package/dist/components/pages/publish/page.mjs +1 -11
- package/dist/components/pages/publish/utils/file-upload.mjs +1 -155
- package/dist/components/pages/publish/utils/publish-utils.mjs +1 -11
- package/dist/components/pages/search/hot-recommend.mjs +1 -185
- package/dist/components/pages/search/hot-search.mjs +1 -70
- package/dist/components/pages/search/index.mjs +1 -17
- package/dist/components/pages/search/page-client.mjs +1 -159
- package/dist/components/pages/search/search-result/index.mjs +1 -22
- package/dist/components/pages/search/search-result/search-all.mjs +1 -223
- package/dist/components/pages/search/search-result/search-user.mjs +1 -203
- package/dist/components/pages/search/search-result/search-video-info.mjs +1 -324
- package/dist/components/pages/search/search-utils.mjs +1 -48
- package/dist/components/pages/search/style.module.mjs +113 -13
- package/dist/components/pages/search/top-header.mjs +1 -91
- package/dist/components/pages/search-result/page-client.mjs +1 -117
- package/dist/components/pages/search-result/search-all.mjs +1 -82
- package/dist/components/pages/search-result/search-result-skeleton.mjs +1 -22
- package/dist/components/pages/search-result/search-tab.mjs +1 -89
- package/dist/components/pages/search-result/search-user.mjs +1 -253
- package/dist/components/pages/search-result/search-video.mjs +1 -226
- package/dist/components/pages/settings/_components/reset-password-drawer.mjs +4 -256
- package/dist/components/pages/settings/_components/settings.mjs +1 -183
- package/dist/components/pages/settings/index.mjs +1 -10
- package/dist/components/pages/settings/page.mjs +1 -13
- package/dist/components/pages/user-follow/_components/follow-no-login.mjs +1 -34
- package/dist/components/pages/user-follow/_components/follow-top-header.mjs +1 -25
- package/dist/components/pages/user-follow/_components/post-tab.mjs +1 -96
- package/dist/components/pages/user-follow/index.mjs +1 -10
- package/dist/components/pages/user-follow/page.mjs +1 -106
- package/dist/components/pages/user-follow/skeleton.mjs +1 -62
- package/dist/components/pages/video-detail/page.mjs +1 -47
- package/dist/components/pages/video-detail/video-detail-client.mjs +1 -357
- package/dist/components/pages/video-list/index.mjs +1 -59
- package/dist/components/pages/video-list/types.mjs +1 -16
- package/dist/components/pages/video-list/video-list-client.mjs +1 -106
- package/dist/components/pages/video-list/video-list-item.mjs +1 -92
- package/dist/components/pages/video-list/video-list-skeleton.mjs +1 -62
- package/dist/components/ui/accordion.mjs +1 -62
- package/dist/components/ui/alert-dialog.mjs +1 -114
- package/dist/components/ui/alert.mjs +1 -50
- package/dist/components/ui/aspect-ratio.mjs +1 -17
- package/dist/components/ui/avatar.mjs +1 -106
- package/dist/components/ui/badge.d.mts +1 -1
- package/dist/components/ui/badge.mjs +1 -38
- package/dist/components/ui/box.mjs +1 -17
- package/dist/components/ui/breadcrumb.mjs +1 -84
- package/dist/components/ui/button-group.d.mts +1 -1
- package/dist/components/ui/button-group.mjs +1 -49
- package/dist/components/ui/button.d.mts +1 -1
- package/dist/components/ui/button.mjs +1 -50
- package/dist/components/ui/card.mjs +1 -65
- package/dist/components/ui/carousel.mjs +1 -142
- package/dist/components/ui/checkbox.mjs +1 -25
- package/dist/components/ui/collapsible.mjs +1 -31
- package/dist/components/ui/combobox.mjs +1 -185
- package/dist/components/ui/context-menu.mjs +1 -150
- package/dist/components/ui/dialog.mjs +1 -109
- package/dist/components/ui/drawer.mjs +1 -91
- package/dist/components/ui/dropdown-menu.mjs +1 -154
- package/dist/components/ui/empty-icons.mjs +7 -96
- package/dist/components/ui/empty.mjs +1 -95
- package/dist/components/ui/field.d.mts +1 -1
- package/dist/components/ui/field.mjs +1 -131
- package/dist/components/ui/hover-card.mjs +1 -43
- package/dist/components/ui/image.mjs +1 -257
- package/dist/components/ui/infinite-scroll.mjs +1 -168
- package/dist/components/ui/input-group.mjs +1 -90
- package/dist/components/ui/input.mjs +1 -19
- package/dist/components/ui/item.mjs +1 -137
- package/dist/components/ui/kbd.mjs +1 -24
- package/dist/components/ui/label.mjs +1 -18
- package/dist/components/ui/legacy/badge.mjs +1 -80
- package/dist/components/ui/legacy/button.mjs +1 -55
- package/dist/components/ui/legacy/input.mjs +1 -22
- package/dist/components/ui/legacy/popover.mjs +1 -69
- package/dist/components/ui/link.mjs +1 -32
- package/dist/components/ui/list.mjs +5 -221
- package/dist/components/ui/loading.mjs +1 -44
- package/dist/components/ui/mask.mjs +1 -17
- package/dist/components/ui/menubar.mjs +1 -154
- package/dist/components/ui/native-select.mjs +1 -43
- package/dist/components/ui/pagination.mjs +1 -90
- package/dist/components/ui/popover.mjs +1 -73
- package/dist/components/ui/popup.mjs +1 -44
- package/dist/components/ui/progress.mjs +1 -53
- package/dist/components/ui/radio-group.mjs +1 -34
- package/dist/components/ui/rate.mjs +1 -69
- package/dist/components/ui/scroll-area.mjs +1 -43
- package/dist/components/ui/select.mjs +1 -113
- package/dist/components/ui/separator.mjs +1 -20
- package/dist/components/ui/sheet.mjs +1 -109
- package/dist/components/ui/skeleton.mjs +1 -16
- package/dist/components/ui/slider.mjs +1 -46
- package/dist/components/ui/sonner.mjs +1 -34
- package/dist/components/ui/spinner.mjs +1 -18
- package/dist/components/ui/switch.mjs +1 -65
- package/dist/components/ui/table.mjs +1 -78
- package/dist/components/ui/tabs.mjs +1 -54
- package/dist/components/ui/text.mjs +1 -20
- package/dist/components/ui/textarea.mjs +1 -16
- package/dist/components/ui/time.mjs +1 -91
- package/dist/components/ui/toggle-group.mjs +1 -59
- package/dist/components/ui/toggle.mjs +1 -41
- package/dist/components/ui/tooltip.mjs +1 -49
- package/dist/components/ui/wheel-picker.mjs +1 -28
- package/dist/constants/event-key.mjs +1 -18
- package/dist/constants/query-key.mjs +1 -32
- package/dist/constants/revalidate.mjs +1 -9
- package/dist/constants/site.mjs +1 -11
- package/dist/constants/url-prefix.mjs +1 -11
- package/dist/hooks/image-text-recommend.mjs +1 -71
- package/dist/hooks/query/hydration-boundary.mjs +1 -34
- package/dist/hooks/query/use-query.mjs +1 -114
- package/dist/hooks/use-auth.mjs +1 -198
- package/dist/hooks/use-browse-report.mjs +1 -466
- package/dist/hooks/use-card-decoration.mjs +1 -92
- package/dist/hooks/use-content-operate.mjs +1 -525
- package/dist/hooks/use-follow.mjs +1 -69
- package/dist/hooks/use-fullscreen-gestures.mjs +1 -144
- package/dist/hooks/use-interaction-animation.mjs +1 -26
- package/dist/hooks/use-keyboard-open.mjs +1 -56
- package/dist/hooks/use-like-dislike.mjs +1 -40
- package/dist/hooks/use-search-history.mjs +1 -53
- package/dist/hooks/use-sticky.mjs +1 -50
- package/dist/hooks.mjs +1 -14
- package/dist/i18n/locales/en.mjs +3 -820
- package/dist/i18n/locales/zh-CN.mjs +3 -820
- package/dist/i18n/messages.mjs +1 -20
- package/dist/i18n/translator.mjs +1 -38
- package/dist/i18n.mjs +1 -165
- package/dist/materials.mjs +1 -61
- package/dist/node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.mjs +1 -17
- package/dist/pages.mjs +1 -23
- package/dist/seo/build-metadata.mjs +1 -163
- package/dist/seo/config/index.mjs +1 -22
- package/dist/seo/config/page.mjs +6 -301
- package/dist/seo/config/site.mjs +1 -25
- package/dist/seo/constants.mjs +1 -31
- package/dist/seo/helpers.mjs +1 -120
- package/dist/seo/resource-hints.mjs +1 -60
- package/dist/seo/robots.mjs +1 -36
- package/dist/seo/sitemap.mjs +1 -44
- package/dist/seo/structured-data/article.mjs +1 -51
- package/dist/seo/structured-data/common.mjs +1 -60
- package/dist/seo/structured-data/video.mjs +1 -41
- package/dist/seo/viewport.mjs +1 -31
- package/dist/seo.mjs +1 -15
- package/dist/service/generated/client.mjs +1 -1138
- package/dist/service/generated/tanstack.mjs +1 -1049
- package/dist/service/register-by-verify-email-code.d.mts +15 -0
- package/dist/service/register-by-verify-email-code.mjs +2 -0
- package/dist/service.d.mts +2 -1
- package/dist/service.mjs +1 -4
- package/dist/store/create-store.mjs +1 -25
- package/dist/store/modules/app-config-store.mjs +1 -28
- package/dist/store/modules/blocked-modal-store.mjs +1 -30
- package/dist/store/modules/follow-ids-store.mjs +1 -12
- package/dist/store/modules/login-modal-store.mjs +1 -155
- package/dist/store/modules/media-preview-store.mjs +1 -54
- package/dist/store/modules/publish-store.mjs +1 -31
- package/dist/store/modules/use-demo-store.mjs +1 -17
- package/dist/store/modules/user-store.mjs +1 -113
- package/dist/store.mjs +1 -10
- package/dist/types/safe-at-user.mjs +1 -15
- package/dist/types/safe-comment.mjs +1 -30
- package/dist/types/safe-grid.mjs +1 -36
- package/dist/types/safe-replay.mjs +1 -43
- package/dist/types/share.mjs +1 -16
- package/dist/ui.mjs +1 -57
- package/dist/utils/api-collect.mjs +1 -14
- package/dist/utils/channel-storage.mjs +1 -57
- package/dist/utils/cn.mjs +1 -15
- package/dist/utils/common.mjs +1 -296
- package/dist/utils/db.mjs +1 -80
- package/dist/utils/decrypt-image-client.mjs +1 -325
- package/dist/utils/decrypt.worker.mjs +2 -20
- package/dist/utils/event-bus.mjs +1 -33
- package/dist/utils/follow-service.mjs +1 -87
- package/dist/utils/get-res-url.mjs +1 -94
- package/dist/utils/helper.mjs +1 -33
- package/dist/utils/http.mjs +1 -194
- package/dist/utils/image-compression.mjs +1 -59
- package/dist/utils/image-crop.mjs +1 -110
- package/dist/utils/loaders.mjs +1 -51
- package/dist/utils/login-modal-bridge.mjs +1 -65
- package/dist/utils/media.mjs +1 -128
- package/dist/utils/password-validator.mjs +1 -86
- package/dist/utils/s3-uploader.mjs +1 -40
- package/dist/utils/schema/material.mjs +1 -24
- package/dist/utils/schema/schema.mjs +1 -147
- package/dist/utils/schema/utils.mjs +1 -27
- package/dist/utils/share-manager.mjs +1 -183
- package/dist/utils/tools.mjs +1 -105
- package/dist/utils/uint8.mjs +1 -46
- package/dist/utils/upload-file.mjs +1 -429
- package/dist/utils.mjs +1 -21
- package/package.json +1 -1
|
@@ -1,12 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
//#region components/biz/business/profile/profile-header/schema.ts
|
|
5
|
-
/**
|
|
6
|
-
* 用户资料头部物料 inspector 配置。
|
|
7
|
-
*/
|
|
8
|
-
const profileHeaderInspectorPropsSchema = defineComponentPropsSchema({});
|
|
9
|
-
const profileHeaderInspectorDefaultProps = getSchemaDefaultProps(profileHeaderInspectorPropsSchema);
|
|
10
|
-
|
|
11
|
-
//#endregion
|
|
12
|
-
export { profileHeaderInspectorDefaultProps, profileHeaderInspectorPropsSchema };
|
|
2
|
+
import{defineComponentPropsSchema as e,getSchemaDefaultProps as t}from"create-funhub/sdk";const n=e({}),r=t(n);export{r as profileHeaderInspectorDefaultProps,n as profileHeaderInspectorPropsSchema};
|
|
@@ -1,236 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import { cn } from "../../../../../utils/cn.mjs";
|
|
5
|
-
import { Button } from "../../../../ui/button.mjs";
|
|
6
|
-
import { useUserStore } from "../../../../../store/modules/user-store.mjs";
|
|
7
|
-
import { pUserEditUserInfo } from "../../../../../service/generated/client.mjs";
|
|
8
|
-
import { uploadFile } from "../../../../../utils/upload-file.mjs";
|
|
9
|
-
import { Avatar, AvatarFallback, AvatarImage } from "../../../../ui/avatar.mjs";
|
|
10
|
-
import { Box } from "../../../../ui/box.mjs";
|
|
11
|
-
import { Input } from "../../../../ui/input.mjs";
|
|
12
|
-
import { Dialog, DialogContent } from "../../../../ui/dialog.mjs";
|
|
13
|
-
import { Text } from "../../../../ui/text.mjs";
|
|
14
|
-
import { useDeleteRequest } from "../../../../../hooks/query/use-query.mjs";
|
|
15
|
-
import { ImageCropModal } from "../../../../common/image-crop-modal/image-crop-modal.mjs";
|
|
16
|
-
import { useRef, useState } from "react";
|
|
17
|
-
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
18
|
-
import { toast } from "sonner";
|
|
19
|
-
import { useTranslations } from "next-intl";
|
|
20
|
-
|
|
21
|
-
//#region components/biz/business/profile/profile-header/user-profile-avatar.tsx
|
|
22
|
-
const defaultAvatar = "https://guadd-sg-ccs-sing-dev.s3.ap-southeast-1.amazonaws.com/default/default_avatar.png";
|
|
23
|
-
const acceptedAvatarFileTypes = ".jpg,.jpeg,.png,image/jpeg,image/png";
|
|
24
|
-
const allowedAvatarMimeTypes = ["image/jpeg", "image/png"];
|
|
25
|
-
const maxAvatarFileSize = 5 * 1024 * 1024;
|
|
26
|
-
/**
|
|
27
|
-
* 校验头像文件格式是否受支持。
|
|
28
|
-
*/
|
|
29
|
-
function isSupportedAvatarFile(file) {
|
|
30
|
-
const fileName = file.name.toLowerCase();
|
|
31
|
-
const fileType = file.type.toLowerCase();
|
|
32
|
-
return allowedAvatarMimeTypes.includes(fileType) || /\.(?:jpg|jpeg|png)$/i.test(fileName);
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* 用户资料页头像,支持本人预览与更换。
|
|
36
|
-
*/
|
|
37
|
-
function UserProfileAvatar({ isMine, src, alt, onUnauthorizedClick }) {
|
|
38
|
-
const t = useTranslations("components.pages.profile");
|
|
39
|
-
const fileInputRef = useRef(null);
|
|
40
|
-
const { userId, setUserInfo, userInfo } = useUserStore();
|
|
41
|
-
const invalidateRequest = useDeleteRequest();
|
|
42
|
-
const [previewOpen, setPreviewOpen] = useState(false);
|
|
43
|
-
const [cropModalOpen, setCropModalOpen] = useState(false);
|
|
44
|
-
const [selectedImage, setSelectedImage] = useState("");
|
|
45
|
-
const [isUploading, setIsUploading] = useState(false);
|
|
46
|
-
/**
|
|
47
|
-
* 处理头像点击。
|
|
48
|
-
*/
|
|
49
|
-
function handleAvatarClick() {
|
|
50
|
-
if (isUploading) return;
|
|
51
|
-
if (isMine) {
|
|
52
|
-
setPreviewOpen(true);
|
|
53
|
-
return;
|
|
54
|
-
}
|
|
55
|
-
onUnauthorizedClick?.();
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* 清理当前待裁剪图片。
|
|
59
|
-
*/
|
|
60
|
-
function clearSelectedImage() {
|
|
61
|
-
if (!selectedImage) return;
|
|
62
|
-
URL.revokeObjectURL(selectedImage);
|
|
63
|
-
setSelectedImage("");
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* 处理头像预览弹窗关闭。
|
|
67
|
-
*/
|
|
68
|
-
function handlePreviewClose() {
|
|
69
|
-
setPreviewOpen(false);
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* 触发头像文件选择。
|
|
73
|
-
*/
|
|
74
|
-
function handleSelectAvatar() {
|
|
75
|
-
if (isUploading) return;
|
|
76
|
-
fileInputRef.current?.click();
|
|
77
|
-
}
|
|
78
|
-
/**
|
|
79
|
-
* 处理头像文件变更。
|
|
80
|
-
*/
|
|
81
|
-
function handleAvatarFileChange(event) {
|
|
82
|
-
const file = event.target.files?.[0];
|
|
83
|
-
if (!file) return;
|
|
84
|
-
if (!isSupportedAvatarFile(file)) {
|
|
85
|
-
toast.error(t("client.imageTypeInvalid"));
|
|
86
|
-
if (event.target) event.target.value = "";
|
|
87
|
-
return;
|
|
88
|
-
}
|
|
89
|
-
if (file.size > maxAvatarFileSize) {
|
|
90
|
-
toast.error(t("client.imageTooLarge"));
|
|
91
|
-
if (event.target) event.target.value = "";
|
|
92
|
-
return;
|
|
93
|
-
}
|
|
94
|
-
setSelectedImage(URL.createObjectURL(file));
|
|
95
|
-
setCropModalOpen(true);
|
|
96
|
-
if (event.target) event.target.value = "";
|
|
97
|
-
}
|
|
98
|
-
/**
|
|
99
|
-
* 处理头像裁剪确认。
|
|
100
|
-
*/
|
|
101
|
-
async function handleCropConfirm(croppedBlob) {
|
|
102
|
-
if (!userId) {
|
|
103
|
-
toast.error(t("client.loginRequiredForUpload"));
|
|
104
|
-
return;
|
|
105
|
-
}
|
|
106
|
-
try {
|
|
107
|
-
setIsUploading(true);
|
|
108
|
-
const data = await uploadFile(new File([croppedBlob], "avatar.jpg", { type: "image/jpeg" }), 1);
|
|
109
|
-
await pUserEditUserInfo({
|
|
110
|
-
user_id: String(userId),
|
|
111
|
-
avatar: data.objectKey
|
|
112
|
-
});
|
|
113
|
-
setUserInfo({
|
|
114
|
-
...userInfo,
|
|
115
|
-
avatar: data.objectKey
|
|
116
|
-
});
|
|
117
|
-
invalidateRequest(["user-profile", "mine"]);
|
|
118
|
-
invalidateRequest(["user-edit-info", String(userId)]);
|
|
119
|
-
setPreviewOpen(false);
|
|
120
|
-
setCropModalOpen(false);
|
|
121
|
-
toast.success(t("client.mediaUpdateSuccess"));
|
|
122
|
-
} catch (error) {
|
|
123
|
-
console.error("上传头像失败", error);
|
|
124
|
-
toast.error(t("client.uploadFailed"));
|
|
125
|
-
} finally {
|
|
126
|
-
clearSelectedImage();
|
|
127
|
-
setIsUploading(false);
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
/**
|
|
131
|
-
* 处理头像裁剪取消。
|
|
132
|
-
*/
|
|
133
|
-
function handleCropCancel() {
|
|
134
|
-
setCropModalOpen(false);
|
|
135
|
-
clearSelectedImage();
|
|
136
|
-
}
|
|
137
|
-
return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
138
|
-
isMine || onUnauthorizedClick ? /* @__PURE__ */ jsx(Button, {
|
|
139
|
-
variant: "ghost",
|
|
140
|
-
size: "icon",
|
|
141
|
-
className: "!absolute bottom-3 left-0 h-22 w-22 rounded-full p-0 hover:bg-transparent",
|
|
142
|
-
onClick: handleAvatarClick,
|
|
143
|
-
"aria-label": "打开头像预览",
|
|
144
|
-
children: /* @__PURE__ */ jsxs(Avatar, {
|
|
145
|
-
className: "w-22 h-22",
|
|
146
|
-
children: [/* @__PURE__ */ jsx(AvatarImage, {
|
|
147
|
-
src: src || defaultAvatar,
|
|
148
|
-
alt: alt || "avatar"
|
|
149
|
-
}), /* @__PURE__ */ jsx(AvatarFallback, {})]
|
|
150
|
-
})
|
|
151
|
-
}) : /* @__PURE__ */ jsxs(Avatar, {
|
|
152
|
-
className: "!absolute bottom-3 left-0 w-22 h-22",
|
|
153
|
-
children: [/* @__PURE__ */ jsx(AvatarImage, {
|
|
154
|
-
src: src || defaultAvatar,
|
|
155
|
-
alt: alt || "avatar"
|
|
156
|
-
}), /* @__PURE__ */ jsx(AvatarFallback, {})]
|
|
157
|
-
}),
|
|
158
|
-
/* @__PURE__ */ jsx(Dialog, {
|
|
159
|
-
open: previewOpen,
|
|
160
|
-
onOpenChange: handlePreviewClose,
|
|
161
|
-
children: /* @__PURE__ */ jsx(DialogContent, {
|
|
162
|
-
showCloseButton: false,
|
|
163
|
-
className: "bg-black !m-0 !p-0 !fixed !inset-0 !w-screen !h-screen !max-w-none !rounded-none !top-0 !left-0 !translate-x-0 !translate-y-0 !transform-none z-[9999] !pointer-events-auto",
|
|
164
|
-
children: /* @__PURE__ */ jsxs(Box, {
|
|
165
|
-
className: "relative flex h-full w-full flex-col items-center justify-center",
|
|
166
|
-
children: [
|
|
167
|
-
/* @__PURE__ */ jsx(Button, {
|
|
168
|
-
variant: "ghost",
|
|
169
|
-
size: "icon",
|
|
170
|
-
className: "absolute left-0 top-0 h-14 w-14 text-white hover:bg-transparent hover:text-white/80",
|
|
171
|
-
onClick: handlePreviewClose,
|
|
172
|
-
"aria-label": "关闭头像预览",
|
|
173
|
-
children: /* @__PURE__ */ jsx("svg", {
|
|
174
|
-
className: "w-4 h-4",
|
|
175
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
176
|
-
fill: "currentColor",
|
|
177
|
-
viewBox: "0 0 16 16",
|
|
178
|
-
children: /* @__PURE__ */ jsx("path", { d: "M14.55.2a.889.889 0 0 1 1.25 1.25l-.06.067L9.255 8l6.483 6.482.06.069a.888.888 0 0 1-1.25 1.25l-.067-.062L8 9.256l-6.482 6.483A.888.888 0 1 1 .26 14.482L6.742 8 .26 1.517.2 1.45A.888.888 0 0 1 1.45.2l.067.062 6.482 6.482L14.482.261l.068-.062Z" })
|
|
179
|
-
})
|
|
180
|
-
}),
|
|
181
|
-
/* @__PURE__ */ jsxs(Avatar, {
|
|
182
|
-
className: "w-50 h-50",
|
|
183
|
-
children: [/* @__PURE__ */ jsx(AvatarImage, {
|
|
184
|
-
src: src || defaultAvatar,
|
|
185
|
-
alt: alt || "avatar"
|
|
186
|
-
}), /* @__PURE__ */ jsx(AvatarFallback, {})]
|
|
187
|
-
}),
|
|
188
|
-
/* @__PURE__ */ jsxs(Button, {
|
|
189
|
-
variant: "ghost",
|
|
190
|
-
className: cn("absolute bottom-8 left-0 right-0 mx-auto flex w-[366px] max-w-[90%] items-center justify-between rounded-3xl bg-white/10 px-3 py-3 transition-colors hover:bg-white/20", "active:scale-95"),
|
|
191
|
-
onClick: handleSelectAvatar,
|
|
192
|
-
disabled: isUploading,
|
|
193
|
-
children: [/* @__PURE__ */ jsx(Text, {
|
|
194
|
-
as: "span",
|
|
195
|
-
className: "text-base font-medium text-white",
|
|
196
|
-
children: isUploading ? "上传中..." : "更换头像"
|
|
197
|
-
}), /* @__PURE__ */ jsxs("svg", {
|
|
198
|
-
className: "w-6 h-6 text-white",
|
|
199
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
200
|
-
fill: "none",
|
|
201
|
-
viewBox: "0 0 24 24",
|
|
202
|
-
stroke: "currentColor",
|
|
203
|
-
strokeWidth: 2,
|
|
204
|
-
children: [/* @__PURE__ */ jsx("path", {
|
|
205
|
-
strokeLinecap: "round",
|
|
206
|
-
strokeLinejoin: "round",
|
|
207
|
-
d: "M3 9a2 2 0 012-2h.93a2 2 0 001.664-.89l.812-1.22A2 2 0 0110.07 4h3.86a2 2 0 011.664.89l.812 1.22A2 2 0 0018.07 7H19a2 2 0 012 2v9a2 2 0 01-2 2H5a2 2 0 01-2-2V9z"
|
|
208
|
-
}), /* @__PURE__ */ jsx("path", {
|
|
209
|
-
strokeLinecap: "round",
|
|
210
|
-
strokeLinejoin: "round",
|
|
211
|
-
d: "M15 13a3 3 0 11-6 0 3 3 0 016 0z"
|
|
212
|
-
})]
|
|
213
|
-
})]
|
|
214
|
-
})
|
|
215
|
-
]
|
|
216
|
-
})
|
|
217
|
-
})
|
|
218
|
-
}),
|
|
219
|
-
/* @__PURE__ */ jsx(Input, {
|
|
220
|
-
ref: fileInputRef,
|
|
221
|
-
type: "file",
|
|
222
|
-
accept: acceptedAvatarFileTypes,
|
|
223
|
-
className: "hidden",
|
|
224
|
-
onChange: handleAvatarFileChange
|
|
225
|
-
}),
|
|
226
|
-
/* @__PURE__ */ jsx(ImageCropModal, {
|
|
227
|
-
open: cropModalOpen,
|
|
228
|
-
onClose: handleCropCancel,
|
|
229
|
-
imageSrc: selectedImage,
|
|
230
|
-
onConfirm: handleCropConfirm
|
|
231
|
-
})
|
|
232
|
-
] });
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
//#endregion
|
|
236
|
-
export { UserProfileAvatar };
|
|
2
|
+
"use client";import{cn as e}from"../../../../../utils/cn.mjs";import{Button as t}from"../../../../ui/button.mjs";import{useUserStore as n}from"../../../../../store/modules/user-store.mjs";import{pUserEditUserInfo as r}from"../../../../../service/generated/client.mjs";import{uploadFile as i}from"../../../../../utils/upload-file.mjs";import{Avatar as a,AvatarFallback as o,AvatarImage as s}from"../../../../ui/avatar.mjs";import{Box as c}from"../../../../ui/box.mjs";import{Input as l}from"../../../../ui/input.mjs";import{Dialog as u,DialogContent as d}from"../../../../ui/dialog.mjs";import{Text as f}from"../../../../ui/text.mjs";import{useDeleteRequest as p}from"../../../../../hooks/query/use-query.mjs";import{ImageCropModal as m}from"../../../../common/image-crop-modal/image-crop-modal.mjs";import{useRef as h,useState as g}from"react";import{Fragment as _,jsx as v,jsxs as y}from"react/jsx-runtime";import{toast as b}from"sonner";import{useTranslations as x}from"next-intl";const S=`https://guadd-sg-ccs-sing-dev.s3.ap-southeast-1.amazonaws.com/default/default_avatar.png`,C=[`image/jpeg`,`image/png`];function w(e){let t=e.name.toLowerCase(),n=e.type.toLowerCase();return C.includes(n)||/\.(?:jpg|jpeg|png)$/i.test(t)}function T({isMine:C,src:T,alt:E,onUnauthorizedClick:D}){let O=x(`components.pages.profile`),k=h(null),{userId:A,setUserInfo:j,userInfo:M}=n(),N=p(),[P,F]=g(!1),[I,L]=g(!1),[R,z]=g(``),[B,V]=g(!1);function H(){if(!B){if(C){F(!0);return}D?.()}}function U(){R&&(URL.revokeObjectURL(R),z(``))}function W(){F(!1)}function G(){B||k.current?.click()}function K(e){let t=e.target.files?.[0];if(t){if(!w(t)){b.error(O(`client.imageTypeInvalid`)),e.target&&(e.target.value=``);return}if(t.size>5242880){b.error(O(`client.imageTooLarge`)),e.target&&(e.target.value=``);return}z(URL.createObjectURL(t)),L(!0),e.target&&(e.target.value=``)}}async function q(e){if(!A){b.error(O(`client.loginRequiredForUpload`));return}try{V(!0);let t=await i(new File([e],`avatar.jpg`,{type:`image/jpeg`}),1);await r({user_id:String(A),avatar:t.objectKey}),j({...M,avatar:t.objectKey}),N([`user-profile`,`mine`]),N([`user-edit-info`,String(A)]),F(!1),L(!1),b.success(O(`client.mediaUpdateSuccess`))}catch(e){console.error(`上传头像失败`,e),b.error(O(`client.uploadFailed`))}finally{U(),V(!1)}}function J(){L(!1),U()}return y(_,{children:[C||D?v(t,{variant:`ghost`,size:`icon`,className:`!absolute bottom-3 left-0 h-22 w-22 rounded-full p-0 hover:bg-transparent`,onClick:H,"aria-label":`打开头像预览`,children:y(a,{className:`w-22 h-22`,children:[v(s,{src:T||S,alt:E||`avatar`}),v(o,{})]})}):y(a,{className:`!absolute bottom-3 left-0 w-22 h-22`,children:[v(s,{src:T||S,alt:E||`avatar`}),v(o,{})]}),v(u,{open:P,onOpenChange:W,children:v(d,{showCloseButton:!1,className:`bg-black !m-0 !p-0 !fixed !inset-0 !w-screen !h-screen !max-w-none !rounded-none !top-0 !left-0 !translate-x-0 !translate-y-0 !transform-none z-[9999] !pointer-events-auto`,children:y(c,{className:`relative flex h-full w-full flex-col items-center justify-center`,children:[v(t,{variant:`ghost`,size:`icon`,className:`absolute left-0 top-0 h-14 w-14 text-white hover:bg-transparent hover:text-white/80`,onClick:W,"aria-label":`关闭头像预览`,children:v(`svg`,{className:`w-4 h-4`,xmlns:`http://www.w3.org/2000/svg`,fill:`currentColor`,viewBox:`0 0 16 16`,children:v(`path`,{d:`M14.55.2a.889.889 0 0 1 1.25 1.25l-.06.067L9.255 8l6.483 6.482.06.069a.888.888 0 0 1-1.25 1.25l-.067-.062L8 9.256l-6.482 6.483A.888.888 0 1 1 .26 14.482L6.742 8 .26 1.517.2 1.45A.888.888 0 0 1 1.45.2l.067.062 6.482 6.482L14.482.261l.068-.062Z`})})}),y(a,{className:`w-50 h-50`,children:[v(s,{src:T||S,alt:E||`avatar`}),v(o,{})]}),y(t,{variant:`ghost`,className:e(`absolute bottom-8 left-0 right-0 mx-auto flex w-[366px] max-w-[90%] items-center justify-between rounded-3xl bg-white/10 px-3 py-3 transition-colors hover:bg-white/20`,`active:scale-95`),onClick:G,disabled:B,children:[v(f,{as:`span`,className:`text-base font-medium text-white`,children:B?`上传中...`:`更换头像`}),y(`svg`,{className:`w-6 h-6 text-white`,xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,strokeWidth:2,children:[v(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M3 9a2 2 0 012-2h.93a2 2 0 001.664-.89l.812-1.22A2 2 0 0110.07 4h3.86a2 2 0 011.664.89l.812 1.22A2 2 0 0018.07 7H19a2 2 0 012 2v9a2 2 0 01-2 2H5a2 2 0 01-2-2V9z`}),v(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M15 13a3 3 0 11-6 0 3 3 0 016 0z`})]})]})]})})}),v(l,{ref:k,type:`file`,accept:`.jpg,.jpeg,.png,image/jpeg,image/png`,className:`hidden`,onChange:K}),v(m,{open:I,onClose:J,imageSrc:R,onConfirm:q})]})}export{T as UserProfileAvatar};
|
package/dist/components/biz/business/profile/profile-header/user-profile-cover-background.mjs
CHANGED
|
@@ -1,136 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import { useUserStore } from "../../../../../store/modules/user-store.mjs";
|
|
5
|
-
import { pUserUploadUserBgImage } from "../../../../../service/generated/client.mjs";
|
|
6
|
-
import { uploadFile } from "../../../../../utils/upload-file.mjs";
|
|
7
|
-
import { Image } from "../../../../ui/image.mjs";
|
|
8
|
-
import { Box } from "../../../../ui/box.mjs";
|
|
9
|
-
import { Input } from "../../../../ui/input.mjs";
|
|
10
|
-
import { useDeleteRequest } from "../../../../../hooks/query/use-query.mjs";
|
|
11
|
-
import { BackgroundPreviewModal } from "../../../../common/background-preview-modal/background-preview-modal.mjs";
|
|
12
|
-
import { showImageCrop } from "../../../../common/image-crop/show-image-crop.mjs";
|
|
13
|
-
import { useEffect, useRef, useState } from "react";
|
|
14
|
-
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
15
|
-
import { toast } from "sonner";
|
|
16
|
-
import { useTranslations } from "next-intl";
|
|
17
|
-
|
|
18
|
-
//#region components/biz/business/profile/profile-header/user-profile-cover-background.tsx
|
|
19
|
-
const acceptedBackgroundFileTypes = ".jpg,.jpeg,.png,image/jpeg,image/png";
|
|
20
|
-
const allowedBackgroundMimeTypes = ["image/jpeg", "image/png"];
|
|
21
|
-
const maxBackgroundFileSize = 5 * 1024 * 1024;
|
|
22
|
-
/**
|
|
23
|
-
* 校验背景图文件格式是否受支持。
|
|
24
|
-
*/
|
|
25
|
-
function isSupportedBackgroundFile(file) {
|
|
26
|
-
const fileName = file.name.toLowerCase();
|
|
27
|
-
const fileType = file.type.toLowerCase();
|
|
28
|
-
return allowedBackgroundMimeTypes.includes(fileType) || /\.(?:jpg|jpeg|png)$/i.test(fileName);
|
|
29
|
-
}
|
|
30
|
-
function UserProfileCoverBackground({ isMine, enableCustomBackground = true, src, onUnauthorizedClick }) {
|
|
31
|
-
const t = useTranslations("components.pages.profile");
|
|
32
|
-
const defaultSrc = "/images/mine/img_mine_head_bg.png";
|
|
33
|
-
const fileInputRef = useRef(null);
|
|
34
|
-
const { userId, setUserInfo, userInfo } = useUserStore();
|
|
35
|
-
const invalidateRequest = useDeleteRequest();
|
|
36
|
-
const [isUploading, setIsUploading] = useState(false);
|
|
37
|
-
const [previewOpen, setPreviewOpen] = useState(false);
|
|
38
|
-
const canHandleBackgroundClick = enableCustomBackground && (Boolean(isMine) || typeof onUnauthorizedClick === "function");
|
|
39
|
-
useEffect(() => {
|
|
40
|
-
if (!enableCustomBackground) setPreviewOpen(false);
|
|
41
|
-
}, [enableCustomBackground]);
|
|
42
|
-
/**
|
|
43
|
-
* 处理背景图点击。
|
|
44
|
-
*/
|
|
45
|
-
const handleBackgroundClick = () => {
|
|
46
|
-
if (!enableCustomBackground) return;
|
|
47
|
-
if (isMine) {
|
|
48
|
-
if (!isUploading) setPreviewOpen(true);
|
|
49
|
-
return;
|
|
50
|
-
}
|
|
51
|
-
onUnauthorizedClick?.();
|
|
52
|
-
};
|
|
53
|
-
/**
|
|
54
|
-
* 处理预览弹窗关闭。
|
|
55
|
-
*/
|
|
56
|
-
const handlePreviewClose = () => {
|
|
57
|
-
setPreviewOpen(false);
|
|
58
|
-
};
|
|
59
|
-
/**
|
|
60
|
-
* 处理更换背景图。
|
|
61
|
-
*/
|
|
62
|
-
function handleUploadBackground() {
|
|
63
|
-
if (isUploading) return;
|
|
64
|
-
fileInputRef.current?.click();
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* 处理背景图文件变更。
|
|
68
|
-
*/
|
|
69
|
-
async function handleBackgroundFileChange(event) {
|
|
70
|
-
const file = event.target.files?.[0];
|
|
71
|
-
if (event.target) event.target.value = "";
|
|
72
|
-
if (!file) return;
|
|
73
|
-
try {
|
|
74
|
-
if (!isSupportedBackgroundFile(file)) {
|
|
75
|
-
toast.error(t("client.imageTypeInvalid"));
|
|
76
|
-
return;
|
|
77
|
-
}
|
|
78
|
-
if (file.size > maxBackgroundFileSize) {
|
|
79
|
-
toast.error(t("client.imageTooLarge"));
|
|
80
|
-
return;
|
|
81
|
-
}
|
|
82
|
-
setIsUploading(true);
|
|
83
|
-
const data = await uploadFile(await showImageCrop(file, {
|
|
84
|
-
aspectRatio: 430 / 256,
|
|
85
|
-
cropShape: "rect",
|
|
86
|
-
quality: .92,
|
|
87
|
-
maxWidth: 1920,
|
|
88
|
-
maxHeight: 1920
|
|
89
|
-
}), 1);
|
|
90
|
-
await pUserUploadUserBgImage({
|
|
91
|
-
user_id: String(userId),
|
|
92
|
-
bg_image: data.objectKey
|
|
93
|
-
});
|
|
94
|
-
setUserInfo({
|
|
95
|
-
...userInfo,
|
|
96
|
-
bg_image: data.objectKey
|
|
97
|
-
});
|
|
98
|
-
invalidateRequest(["user-profile", "mine"]);
|
|
99
|
-
setPreviewOpen(false);
|
|
100
|
-
toast.success(t("client.mediaUpdateSuccess"));
|
|
101
|
-
} catch (error) {
|
|
102
|
-
console.error("上传背景图失败", error);
|
|
103
|
-
if (error instanceof Error && error.message !== "用户取消") toast.error(t("client.uploadFailed"));
|
|
104
|
-
} finally {
|
|
105
|
-
setIsUploading(false);
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(Box, {
|
|
109
|
-
className: enableCustomBackground ? "h-33.75" : "h-24",
|
|
110
|
-
children: enableCustomBackground ? /* @__PURE__ */ jsx(Box, {
|
|
111
|
-
className: "relative h-full w-full",
|
|
112
|
-
onClick: canHandleBackgroundClick ? handleBackgroundClick : void 0,
|
|
113
|
-
children: /* @__PURE__ */ jsx(Image, {
|
|
114
|
-
alt: "cover background",
|
|
115
|
-
fill: true,
|
|
116
|
-
objectFit: "cover",
|
|
117
|
-
className: "pointer-events-none",
|
|
118
|
-
src: src || defaultSrc
|
|
119
|
-
})
|
|
120
|
-
}) : /* @__PURE__ */ jsx(Box, { className: "h-full w-full bg-bg1" })
|
|
121
|
-
}), enableCustomBackground && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(BackgroundPreviewModal, {
|
|
122
|
-
open: previewOpen,
|
|
123
|
-
onClose: handlePreviewClose,
|
|
124
|
-
bgUrl: src || defaultSrc,
|
|
125
|
-
onUpload: handleUploadBackground
|
|
126
|
-
}), /* @__PURE__ */ jsx(Input, {
|
|
127
|
-
ref: fileInputRef,
|
|
128
|
-
type: "file",
|
|
129
|
-
accept: acceptedBackgroundFileTypes,
|
|
130
|
-
className: "hidden",
|
|
131
|
-
onChange: handleBackgroundFileChange
|
|
132
|
-
})] })] });
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
//#endregion
|
|
136
|
-
export { UserProfileCoverBackground };
|
|
2
|
+
"use client";import{useUserStore as e}from"../../../../../store/modules/user-store.mjs";import{pUserUploadUserBgImage as t}from"../../../../../service/generated/client.mjs";import{uploadFile as n}from"../../../../../utils/upload-file.mjs";import{Image as r}from"../../../../ui/image.mjs";import{Box as i}from"../../../../ui/box.mjs";import{Input as a}from"../../../../ui/input.mjs";import{useDeleteRequest as o}from"../../../../../hooks/query/use-query.mjs";import{BackgroundPreviewModal as s}from"../../../../common/background-preview-modal/background-preview-modal.mjs";import{showImageCrop as c}from"../../../../common/image-crop/show-image-crop.mjs";import{useEffect as l,useRef as u,useState as d}from"react";import{Fragment as f,jsx as p,jsxs as m}from"react/jsx-runtime";import{toast as h}from"sonner";import{useTranslations as g}from"next-intl";const _=[`image/jpeg`,`image/png`];function v(e){let t=e.name.toLowerCase(),n=e.type.toLowerCase();return _.includes(n)||/\.(?:jpg|jpeg|png)$/i.test(t)}function y({isMine:_,enableCustomBackground:y=!0,src:b,onUnauthorizedClick:x}){let S=g(`components.pages.profile`),C=`/images/mine/img_mine_head_bg.png`,w=u(null),{userId:T,setUserInfo:E,userInfo:D}=e(),O=o(),[k,A]=d(!1),[j,M]=d(!1),N=y&&(!!_||typeof x==`function`);l(()=>{y||M(!1)},[y]);let P=()=>{if(y){if(_){k||M(!0);return}x?.()}},F=()=>{M(!1)};function I(){k||w.current?.click()}async function L(e){let r=e.target.files?.[0];if(e.target&&(e.target.value=``),r)try{if(!v(r)){h.error(S(`client.imageTypeInvalid`));return}if(r.size>5242880){h.error(S(`client.imageTooLarge`));return}A(!0);let e=await n(await c(r,{aspectRatio:430/256,cropShape:`rect`,quality:.92,maxWidth:1920,maxHeight:1920}),1);await t({user_id:String(T),bg_image:e.objectKey}),E({...D,bg_image:e.objectKey}),O([`user-profile`,`mine`]),M(!1),h.success(S(`client.mediaUpdateSuccess`))}catch(e){console.error(`上传背景图失败`,e),e instanceof Error&&e.message!==`用户取消`&&h.error(S(`client.uploadFailed`))}finally{A(!1)}}return m(f,{children:[p(i,{className:y?`h-33.75`:`h-24`,children:y?p(i,{className:`relative h-full w-full`,onClick:N?P:void 0,children:p(r,{alt:`cover background`,fill:!0,objectFit:`cover`,className:`pointer-events-none`,src:b||C})}):p(i,{className:`h-full w-full bg-bg1`})}),y&&m(f,{children:[p(s,{open:j,onClose:F,bgUrl:b||C,onUpload:I}),p(a,{ref:w,type:`file`,accept:`.jpg,.jpeg,.png,image/jpeg,image/png`,className:`hidden`,onChange:L})]})]})}export{y as UserProfileCoverBackground};
|
|
@@ -1,235 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import { useUserStore } from "../../../../../store/modules/user-store.mjs";
|
|
5
|
-
import { gUserViewUserInfo } from "../../../../../service/generated/client.mjs";
|
|
6
|
-
import { useRequest } from "../../../../../hooks/query/use-query.mjs";
|
|
7
|
-
import { VideoList } from "../../../../common/list/video-list/video-list.mjs";
|
|
8
|
-
import { profileMainMineTabOptions, profileMainProfileTabOptions } from "./variants.mjs";
|
|
9
|
-
import { UserProfileMainShell } from "./shell.mjs";
|
|
10
|
-
import { CollectTab } from "./tabs/collect-tab/client.mjs";
|
|
11
|
-
import { HistoryTab } from "./tabs/history-tab/client.mjs";
|
|
12
|
-
import { LikeTab } from "./tabs/like-tab/client.mjs";
|
|
13
|
-
import { useMemo } from "react";
|
|
14
|
-
import { jsx } from "react/jsx-runtime";
|
|
15
|
-
import { parseAsString, useQueryState } from "nuqs";
|
|
16
|
-
|
|
17
|
-
//#region components/biz/business/profile/profile-main/client.tsx
|
|
18
|
-
/**
|
|
19
|
-
* 将秒级 Unix 时间戳转换为毫秒。
|
|
20
|
-
*/
|
|
21
|
-
function toMilliseconds(unixSeconds) {
|
|
22
|
-
return unixSeconds * 1e3;
|
|
23
|
-
}
|
|
24
|
-
const mockCollectVideoList = [
|
|
25
|
-
{
|
|
26
|
-
id: "00d21b841126c976",
|
|
27
|
-
title: "朝朝暮暮都是你",
|
|
28
|
-
coverImage: "/md-204/uploads/default/other/2024-04-15/2750647625e6193940163169b77fb566.jpg",
|
|
29
|
-
duration: 192,
|
|
30
|
-
viewCount: 237,
|
|
31
|
-
createTime: 1772175066,
|
|
32
|
-
isMoreLink: true
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
id: "009f2e1820718add",
|
|
36
|
-
title: "狗哥的乡村爱情故事",
|
|
37
|
-
coverImage: "/md-204/uploads/default/other/2024-04-11/579bc5eb807d29657828945330b0ac47.jpg",
|
|
38
|
-
duration: 74,
|
|
39
|
-
viewCount: 191,
|
|
40
|
-
createTime: 1770714221,
|
|
41
|
-
isMoreLink: true
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
id: "02e2a11f78a3ffbf",
|
|
45
|
-
title: "唯爱百分之十二",
|
|
46
|
-
coverImage: "/md-204/resource/b6/b689e34f40d0e5baccb8f79630b99425.jpg",
|
|
47
|
-
duration: 3348,
|
|
48
|
-
viewCount: 214,
|
|
49
|
-
createTime: 1770347155,
|
|
50
|
-
isMoreLink: true
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
id: "2c19073cbd3c5c5a",
|
|
54
|
-
title: "疯狂磕学家",
|
|
55
|
-
coverImage: "/md-204/uploads/default/other/2024-08-23/5e174eeb8f2009dd7bb797fcabd5a649.jpg",
|
|
56
|
-
duration: 2359,
|
|
57
|
-
viewCount: 17,
|
|
58
|
-
createTime: 1769757646,
|
|
59
|
-
isMoreLink: true
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
id: "07e029915c2a9c96",
|
|
63
|
-
title: "我和祖宗做交易",
|
|
64
|
-
coverImage: "/md-204/uploads/default/other/2024-05-23/b53e50fa75986b41aac766c253a91fea.jpg",
|
|
65
|
-
duration: 194,
|
|
66
|
-
viewCount: 75,
|
|
67
|
-
createTime: 1769670600,
|
|
68
|
-
isMoreLink: true
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
id: "0ae1056a620b286f",
|
|
72
|
-
title: "识汝不识丁",
|
|
73
|
-
coverImage: "/md-204/uploads/default/other/2024-08-24/8958d46da3087a420d1d55e691dcb10a.jpg",
|
|
74
|
-
duration: 2053,
|
|
75
|
-
viewCount: 13,
|
|
76
|
-
createTime: 1769651310,
|
|
77
|
-
isMoreLink: true
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
id: "05564bf1aaf5fad6",
|
|
81
|
-
title: "我们的天空",
|
|
82
|
-
coverImage: "/md-204/resource/1a/1af6ce7117dcda390cf08db26e832684.jpg",
|
|
83
|
-
duration: 2737,
|
|
84
|
-
viewCount: 180,
|
|
85
|
-
createTime: 1769566315,
|
|
86
|
-
isMoreLink: true
|
|
87
|
-
},
|
|
88
|
-
{
|
|
89
|
-
id: "00f61e5be01409bb",
|
|
90
|
-
title: "我初初爱你",
|
|
91
|
-
coverImage: "/md-204/resource/bd/bd657a65bc6adc202a94acb8aca33f38.jpg",
|
|
92
|
-
duration: 2898,
|
|
93
|
-
viewCount: 362,
|
|
94
|
-
createTime: 1769410683,
|
|
95
|
-
isMoreLink: true
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
id: "062cd69d44fcb772",
|
|
99
|
-
title: "料理情缘",
|
|
100
|
-
coverImage: "/md-204/uploads/default/other/2023-11-27/de0491f07909b05fa012d15552e02cd0.png",
|
|
101
|
-
duration: 2726,
|
|
102
|
-
viewCount: 33,
|
|
103
|
-
createTime: 1769157580,
|
|
104
|
-
isMoreLink: true
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
id: "05751871b640b1a7",
|
|
108
|
-
title: "穷小伙被碎玻璃割伤眼睛,却因祸得福获得了一只超能神眼,人生直接开挂,之前欺负他的人统统匍匐在他脚下,征服姐妹花,走向人生巅峰!",
|
|
109
|
-
coverImage: "/md-204/dcc-file/29/29a0fdc86f0d756ad8f123e81693d233-small.jpgbnc",
|
|
110
|
-
duration: 9236,
|
|
111
|
-
viewCount: 137,
|
|
112
|
-
createTime: 1769157575,
|
|
113
|
-
isMoreLink: false
|
|
114
|
-
}
|
|
115
|
-
].map((item) => ({
|
|
116
|
-
id: item.id,
|
|
117
|
-
title: item.title,
|
|
118
|
-
coverImage: item.coverImage,
|
|
119
|
-
duration: item.duration,
|
|
120
|
-
authorName: "",
|
|
121
|
-
viewCount: item.viewCount,
|
|
122
|
-
publishTime: toMilliseconds(item.createTime),
|
|
123
|
-
is_more_link: item.isMoreLink
|
|
124
|
-
}));
|
|
125
|
-
/**
|
|
126
|
-
* 解析主 Tab,保持与现有 URL 查询参数行为一致。
|
|
127
|
-
*/
|
|
128
|
-
function resolveMainTab({ isMine, tab }) {
|
|
129
|
-
const availableTabs = isMine ? profileMainMineTabOptions : profileMainProfileTabOptions;
|
|
130
|
-
if (tab && availableTabs.includes(tab)) return tab;
|
|
131
|
-
return availableTabs[0];
|
|
132
|
-
}
|
|
133
|
-
/**
|
|
134
|
-
* 判断当前主 Tab 是否需要检查他人主页隐私配置。
|
|
135
|
-
*/
|
|
136
|
-
function shouldCheckPrivacy(isViewingOtherUser, tab) {
|
|
137
|
-
return isViewingOtherUser && (tab === "collect" || tab === "like");
|
|
138
|
-
}
|
|
139
|
-
/**
|
|
140
|
-
* 用户资料主体客户端组件。
|
|
141
|
-
*/
|
|
142
|
-
function UserProfileMainClient({ id, showCreateAction = false, requireLogin = false, className, currentUserId, mode = "renderer", tab }) {
|
|
143
|
-
const isRenderer = mode === "renderer";
|
|
144
|
-
const storeUserId = useUserStore((state) => state.userId);
|
|
145
|
-
const [tabQuery] = useQueryState("tab", parseAsString);
|
|
146
|
-
const resolvedCurrentUserId = mode === "editor" ? "" : currentUserId || storeUserId || "";
|
|
147
|
-
const isMine = id === void 0 || id === null || !!resolvedCurrentUserId && id === resolvedCurrentUserId;
|
|
148
|
-
const isViewingOtherUser = !isMine && Boolean(id);
|
|
149
|
-
const targetUserId = isMine ? resolvedCurrentUserId : id ? String(id) : void 0;
|
|
150
|
-
const queryKeyPrefix = isMine ? ["user-profile", "mine"] : [
|
|
151
|
-
"user-profile",
|
|
152
|
-
"profile",
|
|
153
|
-
id
|
|
154
|
-
];
|
|
155
|
-
const resolvedTab = useMemo(() => {
|
|
156
|
-
return resolveMainTab({
|
|
157
|
-
isMine,
|
|
158
|
-
tab: tabQuery ?? tab
|
|
159
|
-
});
|
|
160
|
-
}, [
|
|
161
|
-
isMine,
|
|
162
|
-
tab,
|
|
163
|
-
tabQuery
|
|
164
|
-
]);
|
|
165
|
-
const shouldLoadPrivacy = isRenderer && shouldCheckPrivacy(isViewingOtherUser, resolvedTab) && Boolean(id);
|
|
166
|
-
const { data: profileResponse } = useRequest([
|
|
167
|
-
"user-profile",
|
|
168
|
-
"privacy",
|
|
169
|
-
id,
|
|
170
|
-
resolvedCurrentUserId
|
|
171
|
-
], async () => {
|
|
172
|
-
return await gUserViewUserInfo({
|
|
173
|
-
target_user_id: String(id),
|
|
174
|
-
user_id: resolvedCurrentUserId || String(id)
|
|
175
|
-
});
|
|
176
|
-
}, {
|
|
177
|
-
staleTime: 0,
|
|
178
|
-
enabled: shouldLoadPrivacy
|
|
179
|
-
});
|
|
180
|
-
let renderMode = "content";
|
|
181
|
-
if (mode === "editor") renderMode = "content";
|
|
182
|
-
else if (requireLogin && isMine && !resolvedCurrentUserId) renderMode = "login-required";
|
|
183
|
-
else if (shouldLoadPrivacy && profileResponse) {
|
|
184
|
-
const profileData = profileResponse.data ?? {};
|
|
185
|
-
const collectionsOpen = Number(profileData.collections_open ?? 1) > 0;
|
|
186
|
-
const likeOpen = Number(profileData.like_open ?? 1) > 0;
|
|
187
|
-
if (resolvedTab === "collect" && !collectionsOpen) renderMode = "privacy-collect";
|
|
188
|
-
if (resolvedTab === "like" && !likeOpen) renderMode = "privacy-like";
|
|
189
|
-
}
|
|
190
|
-
const canRenderTabContent = renderMode === "content" && (!shouldLoadPrivacy || Boolean(profileResponse));
|
|
191
|
-
let content = null;
|
|
192
|
-
if (mode === "editor") content = /* @__PURE__ */ jsx(VideoList, {
|
|
193
|
-
list: mockCollectVideoList,
|
|
194
|
-
loading: false,
|
|
195
|
-
hasMore: false,
|
|
196
|
-
showVideoProgress: false
|
|
197
|
-
});
|
|
198
|
-
else if (canRenderTabContent) switch (resolvedTab) {
|
|
199
|
-
case "like":
|
|
200
|
-
content = /* @__PURE__ */ jsx(LikeTab, {
|
|
201
|
-
mode,
|
|
202
|
-
isMine,
|
|
203
|
-
targetUserId,
|
|
204
|
-
queryKeyPrefix
|
|
205
|
-
});
|
|
206
|
-
break;
|
|
207
|
-
case "history":
|
|
208
|
-
content = /* @__PURE__ */ jsx(HistoryTab, {
|
|
209
|
-
mode,
|
|
210
|
-
targetUserId,
|
|
211
|
-
queryKeyPrefix
|
|
212
|
-
});
|
|
213
|
-
break;
|
|
214
|
-
default:
|
|
215
|
-
content = /* @__PURE__ */ jsx(CollectTab, {
|
|
216
|
-
mode,
|
|
217
|
-
isMine,
|
|
218
|
-
userId: targetUserId,
|
|
219
|
-
showCreateAction: showCreateAction && isMine,
|
|
220
|
-
queryKeyPrefix
|
|
221
|
-
});
|
|
222
|
-
break;
|
|
223
|
-
}
|
|
224
|
-
return /* @__PURE__ */ jsx(UserProfileMainShell, {
|
|
225
|
-
profileId: id,
|
|
226
|
-
currentUserId: resolvedCurrentUserId,
|
|
227
|
-
isMine,
|
|
228
|
-
renderMode,
|
|
229
|
-
className,
|
|
230
|
-
children: content
|
|
231
|
-
});
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
//#endregion
|
|
235
|
-
export { UserProfileMainClient };
|
|
2
|
+
"use client";import{useUserStore as e}from"../../../../../store/modules/user-store.mjs";import{gUserViewUserInfo as t}from"../../../../../service/generated/client.mjs";import{useRequest as n}from"../../../../../hooks/query/use-query.mjs";import{VideoList as r}from"../../../../common/list/video-list/video-list.mjs";import{profileMainMineTabOptions as i,profileMainProfileTabOptions as a}from"./variants.mjs";import{UserProfileMainShell as o}from"./shell.mjs";import{CollectTab as s}from"./tabs/collect-tab/client.mjs";import{HistoryTab as c}from"./tabs/history-tab/client.mjs";import{LikeTab as l}from"./tabs/like-tab/client.mjs";import{useMemo as u}from"react";import{jsx as d}from"react/jsx-runtime";import{parseAsString as f,useQueryState as p}from"nuqs";function m(e){return e*1e3}const h=[{id:`00d21b841126c976`,title:`朝朝暮暮都是你`,coverImage:`/md-204/uploads/default/other/2024-04-15/2750647625e6193940163169b77fb566.jpg`,duration:192,viewCount:237,createTime:1772175066,isMoreLink:!0},{id:`009f2e1820718add`,title:`狗哥的乡村爱情故事`,coverImage:`/md-204/uploads/default/other/2024-04-11/579bc5eb807d29657828945330b0ac47.jpg`,duration:74,viewCount:191,createTime:1770714221,isMoreLink:!0},{id:`02e2a11f78a3ffbf`,title:`唯爱百分之十二`,coverImage:`/md-204/resource/b6/b689e34f40d0e5baccb8f79630b99425.jpg`,duration:3348,viewCount:214,createTime:1770347155,isMoreLink:!0},{id:`2c19073cbd3c5c5a`,title:`疯狂磕学家`,coverImage:`/md-204/uploads/default/other/2024-08-23/5e174eeb8f2009dd7bb797fcabd5a649.jpg`,duration:2359,viewCount:17,createTime:1769757646,isMoreLink:!0},{id:`07e029915c2a9c96`,title:`我和祖宗做交易`,coverImage:`/md-204/uploads/default/other/2024-05-23/b53e50fa75986b41aac766c253a91fea.jpg`,duration:194,viewCount:75,createTime:1769670600,isMoreLink:!0},{id:`0ae1056a620b286f`,title:`识汝不识丁`,coverImage:`/md-204/uploads/default/other/2024-08-24/8958d46da3087a420d1d55e691dcb10a.jpg`,duration:2053,viewCount:13,createTime:1769651310,isMoreLink:!0},{id:`05564bf1aaf5fad6`,title:`我们的天空`,coverImage:`/md-204/resource/1a/1af6ce7117dcda390cf08db26e832684.jpg`,duration:2737,viewCount:180,createTime:1769566315,isMoreLink:!0},{id:`00f61e5be01409bb`,title:`我初初爱你`,coverImage:`/md-204/resource/bd/bd657a65bc6adc202a94acb8aca33f38.jpg`,duration:2898,viewCount:362,createTime:1769410683,isMoreLink:!0},{id:`062cd69d44fcb772`,title:`料理情缘`,coverImage:`/md-204/uploads/default/other/2023-11-27/de0491f07909b05fa012d15552e02cd0.png`,duration:2726,viewCount:33,createTime:1769157580,isMoreLink:!0},{id:`05751871b640b1a7`,title:`穷小伙被碎玻璃割伤眼睛,却因祸得福获得了一只超能神眼,人生直接开挂,之前欺负他的人统统匍匐在他脚下,征服姐妹花,走向人生巅峰!`,coverImage:`/md-204/dcc-file/29/29a0fdc86f0d756ad8f123e81693d233-small.jpgbnc`,duration:9236,viewCount:137,createTime:1769157575,isMoreLink:!1}].map(e=>({id:e.id,title:e.title,coverImage:e.coverImage,duration:e.duration,authorName:``,viewCount:e.viewCount,publishTime:m(e.createTime),is_more_link:e.isMoreLink}));function g({isMine:e,tab:t}){let n=e?i:a;return t&&n.includes(t)?t:n[0]}function _(e,t){return e&&(t===`collect`||t===`like`)}function v({id:i,showCreateAction:a=!1,requireLogin:m=!1,className:v,currentUserId:y,mode:b=`renderer`,tab:x}){let S=b===`renderer`,C=e(e=>e.userId),[w]=p(`tab`,f),T=b===`editor`?``:y||C||``,E=i==null||!!T&&i===T,D=!E&&!!i,O=E?T:i?String(i):void 0,k=E?[`user-profile`,`mine`]:[`user-profile`,`profile`,i],A=u(()=>g({isMine:E,tab:w??x}),[E,x,w]),j=S&&_(D,A)&&!!i,{data:M}=n([`user-profile`,`privacy`,i,T],async()=>await t({target_user_id:String(i),user_id:T||String(i)}),{staleTime:0,enabled:j}),N=`content`;if(b===`editor`)N=`content`;else if(m&&E&&!T)N=`login-required`;else if(j&&M){let e=M.data??{},t=Number(e.collections_open??1)>0,n=Number(e.like_open??1)>0;A===`collect`&&!t&&(N=`privacy-collect`),A===`like`&&!n&&(N=`privacy-like`)}let P=N===`content`&&(!j||!!M),F=null;if(b===`editor`)F=d(r,{list:h,loading:!1,hasMore:!1,showVideoProgress:!1});else if(P)switch(A){case`like`:F=d(l,{mode:b,isMine:E,targetUserId:O,queryKeyPrefix:k});break;case`history`:F=d(c,{mode:b,targetUserId:O,queryKeyPrefix:k});break;default:F=d(s,{mode:b,isMine:E,userId:O,showCreateAction:a&&E,queryKeyPrefix:k});break}return d(o,{profileId:i,currentUserId:T,isMine:E,renderMode:N,className:v,children:F})}export{v as UserProfileMainClient};
|
|
@@ -1,19 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
import {
|
|
3
|
-
import { profileMainInspectorPropsSchema } from "./schema.mjs";
|
|
4
|
-
import { UserProfileMain } from "./server.mjs";
|
|
5
|
-
import { defineMaterial } from "create-funhub/sdk";
|
|
6
|
-
|
|
7
|
-
//#region components/biz/business/profile/profile-main/material.ts
|
|
8
|
-
const profileMainMaterial = defineMaterial({
|
|
9
|
-
type: "profile-main",
|
|
10
|
-
category: "内容组件",
|
|
11
|
-
name: "用户行为模块",
|
|
12
|
-
icon: "/static/components-thumb/user_profile_action.png",
|
|
13
|
-
serverComponent: UserProfileMain,
|
|
14
|
-
clientComponent: UserProfileMainClient,
|
|
15
|
-
propsSchema: profileMainInspectorPropsSchema
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
//#endregion
|
|
19
|
-
export { profileMainMaterial };
|
|
2
|
+
import{UserProfileMainClient as e}from"./client.mjs";import{profileMainInspectorPropsSchema as t}from"./schema.mjs";import{UserProfileMain as n}from"./server.mjs";import{defineMaterial as r}from"create-funhub/sdk";const i=r({type:`profile-main`,category:`内容组件`,name:`用户行为模块`,icon:`/static/components-thumb/user_profile_action.png`,serverComponent:n,clientComponent:e,propsSchema:t});export{i as profileMainMaterial};
|