@funhub/platform 0.2.31 → 0.2.32
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/channel-list/channel-active-indicator.mjs +1 -31
- 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/header-menu.mjs +1 -29
- package/dist/assets/icons/common/header-search-icon.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/right_arrow_thin.mjs +1 -17
- 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/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/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 -24
- 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/marquee-close.mjs +1 -29
- package/dist/assets/icons/marquee-enter.mjs +1 -17
- package/dist/assets/icons/marquee-speaker.mjs +1 -22
- 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/search/filter.mjs +1 -17
- 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/shortcut-grid/shortcut-grid-card-bg-primary.mjs +1 -29
- package/dist/assets/images/subscript.mjs +1 -5
- package/dist/assets/images/user/default_avatar.mjs +1 -5
- package/dist/biz.mjs +1 -169
- package/dist/cli/init/create-client.mjs +1 -12
- package/dist/cli/init/create-sdk.mjs +1 -12
- package/dist/cli/init/shared/command.mjs +1 -31
- package/dist/cli/init/shared/constants.mjs +1 -24
- package/dist/cli/init/shared/create-project.mjs +2 -58
- package/dist/cli/init/shared/file.mjs +1 -21
- package/dist/cli/init/shared/package-manager.mjs +1 -42
- package/dist/cli/init/shared/prompts.mjs +1 -107
- package/dist/cli/init/shared/template.mjs +1 -66
- package/dist/cli.mjs +2 -128
- package/dist/common.mjs +1 -51
- 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 -270
- package/dist/components/biz/basics/fullscreen-feed/runtime/video-slide.mjs +1 -376
- 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 -171
- 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 -56
- 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 -33
- 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/advertisement/ad-match.mjs +1 -142
- package/dist/components/biz/business/advertisement/ad-provider.mjs +1 -50
- package/dist/components/biz/business/advertisement/ad-query.mjs +1 -39
- package/dist/components/biz/business/advertisement/ad-runtime-provider.mjs +1 -21
- package/dist/components/biz/business/advertisement/banner-ad/client.mjs +1 -274
- package/dist/components/biz/business/advertisement/banner-ad/material.mjs +1 -21
- package/dist/components/biz/business/advertisement/banner-ad/schema.mjs +1 -55
- package/dist/components/biz/business/advertisement/banner-ad/server.mjs +1 -24
- package/dist/components/biz/business/advertisement/feed-ad/index.mjs +1 -36
- package/dist/components/biz/business/advertisement/floating-ad/client.mjs +1 -109
- package/dist/components/biz/business/advertisement/floating-ad/material.mjs +1 -21
- package/dist/components/biz/business/advertisement/floating-ad/schema.mjs +1 -11
- package/dist/components/biz/business/advertisement/floating-ad/server.mjs +1 -24
- package/dist/components/biz/business/advertisement/icon-ad/client.mjs +1 -187
- package/dist/components/biz/business/advertisement/icon-ad/material.mjs +1 -21
- package/dist/components/biz/business/advertisement/icon-ad/schema.mjs +1 -42
- package/dist/components/biz/business/advertisement/icon-ad/server.mjs +1 -24
- package/dist/components/biz/business/advertisement/popup-ad/client.mjs +2 -203
- package/dist/components/biz/business/advertisement/popup-ad/material.mjs +1 -21
- package/dist/components/biz/business/advertisement/popup-ad/schema.mjs +1 -48
- package/dist/components/biz/business/advertisement/popup-ad/server.mjs +1 -24
- package/dist/components/biz/business/advertisement/text-ad/client.mjs +1 -370
- package/dist/components/biz/business/advertisement/text-ad/material.mjs +1 -21
- package/dist/components/biz/business/advertisement/text-ad/schema.mjs +1 -34
- package/dist/components/biz/business/advertisement/text-ad/server.mjs +1 -24
- 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 -62
- 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 -140
- 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 -133
- package/dist/components/biz/business/banner-carousel/default-props.mjs +1 -15
- package/dist/components/biz/business/banner-carousel/material.mjs +1 -22
- package/dist/components/biz/business/banner-carousel/schema.mjs +1 -94
- package/dist/components/biz/business/banner-carousel/server.mjs +1 -87
- 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 -157
- package/dist/components/biz/business/channel-list/default-props.mjs +1 -13
- package/dist/components/biz/business/channel-list/material.mjs +1 -21
- package/dist/components/biz/business/channel-list/schema.mjs +1 -40
- package/dist/components/biz/business/comment/comment-input.mjs +5 -772
- package/dist/components/biz/business/comment/comment-item.mjs +1 -182
- 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 -969
- 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 -114
- package/dist/components/biz/business/detail/shared/detail-info-tags.mjs +1 -33
- package/dist/components/biz/business/detail/shared/detail-info-title.mjs +1 -84
- package/dist/components/biz/business/detail/shared/detail-operate.mjs +1 -432
- 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 -55
- package/dist/components/biz/business/detail/shared/runtime-context-provider.mjs +1 -225
- 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 -320
- 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 -902
- package/dist/components/biz/business/detail/video-detail-actions/client.mjs +1 -97
- 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 -201
- 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 -14
- package/dist/components/biz/business/detail/video-detail-info/server.mjs +1 -45
- 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 -14
- 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 -136
- 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-player-bridge-only/client.mjs +1 -17
- package/dist/components/biz/business/detail/video-detail-player-bridge-only/material.mjs +1 -18
- package/dist/components/biz/business/detail/video-detail-player-bridge-only/schema.mjs +1 -13
- package/dist/components/biz/business/detail/video-detail-player-bridge-only/server.mjs +1 -17
- package/dist/components/biz/business/detail/video-detail-recommend/client.mjs +1 -89
- 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 -35
- package/dist/components/biz/business/detail/video-detail-recommend/server.mjs +1 -35
- package/dist/components/biz/business/detail/video-detail-recommend/shared.mjs +1 -548
- package/dist/components/biz/business/detail/video-detail-recommend/utils.mjs +1 -60
- 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 -20
- 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 -21
- 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 -142
- 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 -23
- 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 -38
- 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 -20
- 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 -32
- 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 -22
- 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 -19
- 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 -53
- package/dist/components/biz/business/header-search/shared/header-action.mjs +1 -29
- package/dist/components/biz/business/header-search/shared/header-search-icon.mjs +1 -26
- package/dist/components/biz/business/header-search/shared/header-shell.mjs +1 -21
- package/dist/components/biz/business/header-search/shared/logo.mjs +1 -25
- package/dist/components/biz/business/header-search/shared/search.mjs +1 -47
- 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 -229
- 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 -48
- package/dist/components/biz/business/home-recommend/home-recommend-waterfall/client.mjs +1 -47
- 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 -211
- 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 -42
- package/dist/components/biz/business/home-recommend/shared/home-recommend-base.mjs +1 -890
- package/dist/components/biz/business/home-recommend/shared/home-recommend-default-config.mjs +1 -24
- package/dist/components/biz/business/home-recommend/shared/home-recommend-play-count.mjs +1 -31
- package/dist/components/biz/business/home-recommend/shared/home-recommend-preview.mjs +1 -178
- package/dist/components/biz/business/home-recommend/shared/home-recommend-runtime-props.mjs +1 -47
- package/dist/components/biz/business/home-recommend/shared/home-recommend-server-data.mjs +1 -336
- package/dist/components/biz/business/home-recommend/shared/home-recommend-smart-layout.mjs +1 -73
- package/dist/components/biz/business/home-recommend/shared/home-recommend-smart-tag.mjs +1 -21
- package/dist/components/biz/business/home-recommend/shared/home-recommend-video-detail.mjs +1 -73
- package/dist/components/biz/business/image-text-recommend/client.mjs +1 -436
- package/dist/components/biz/business/image-text-recommend/material.mjs +1 -21
- package/dist/components/biz/business/image-text-recommend/schema.mjs +1 -79
- package/dist/components/biz/business/image-text-recommend/server.mjs +1 -53
- package/dist/components/biz/business/image-text-recommend/shared/query.mjs +1 -33
- package/dist/components/biz/business/large-feature-grid/card-item.mjs +1 -106
- package/dist/components/biz/business/large-feature-grid/client.mjs +1 -256
- package/dist/components/biz/business/large-feature-grid/material.mjs +1 -21
- package/dist/components/biz/business/large-feature-grid/schema.mjs +1 -127
- package/dist/components/biz/business/large-feature-grid/server.mjs +1 -16
- package/dist/components/biz/business/marquee/client.mjs +1 -303
- package/dist/components/biz/business/marquee/material.mjs +1 -21
- package/dist/components/biz/business/marquee/schema.mjs +1 -86
- 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 -159
- 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 -343
- 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 -262
- package/dist/components/biz/business/profile/profile-header/user-profile-cover-background.mjs +1 -182
- package/dist/components/biz/business/profile/profile-main/client.mjs +1 -235
- package/dist/components/biz/business/profile/profile-main/empty-state.mjs +1 -43
- 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 -275
- package/dist/components/biz/business/profile/profile-main/tabs/collect-tab/client.mjs +1 -747
- package/dist/components/biz/business/profile/profile-main/tabs/collect-tab/server.mjs +1 -13
- package/dist/components/biz/business/profile/profile-main/tabs/collect-tab/video-waterfall.mjs +1 -178
- package/dist/components/biz/business/profile/profile-main/tabs/history-tab/client.mjs +1 -259
- 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 -258
- 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 -266
- package/dist/components/biz/business/profile/profile-main/variants.mjs +1 -40
- package/dist/components/biz/business/profile/tracking.mjs +1 -19
- 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 -54
- 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 -182
- package/dist/components/biz/business/search-history/material.mjs +1 -18
- package/dist/components/biz/business/search-history/schema.mjs +1 -16
- package/dist/components/biz/business/search-history/server.mjs +1 -17
- package/dist/components/biz/business/search-input/client.mjs +1 -115
- 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 -86
- package/dist/components/biz/business/shortcut-grid/material.mjs +1 -18
- package/dist/components/biz/business/shortcut-grid/schema.mjs +1 -65
- package/dist/components/biz/business/shortcut-grid/server.mjs +1 -17
- package/dist/components/biz/business/tab-bar/client.mjs +1 -157
- 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 -104
- package/dist/components/biz/business/text-recommend/material.mjs +1 -18
- package/dist/components/biz/business/text-recommend/schema.mjs +1 -25
- 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 -44
- 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 -67
- package/dist/components/biz/utils/transformers/data.mjs +1 -171
- package/dist/components/common/analytics-init/analytics-init.mjs +1 -75
- package/dist/components/common/analytics-init/page-lifecycle-tracker.mjs +1 -248
- package/dist/components/common/analytics-init/sensor-init.mjs +1 -126
- 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/create-collection-sheet.mjs +1 -271
- package/dist/components/common/collection-popup/index.mjs +1 -293
- 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 -50
- 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 -27
- package/dist/components/common/icons/share.mjs +1 -20
- package/dist/components/common/icons/video.mjs +1 -22
- package/dist/components/common/image-crop-modal/image-crop-modal.mjs +2 -128
- package/dist/components/common/info-card/card-header.mjs +1 -71
- 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 -139
- package/dist/components/common/list/collection-list/collection-list.mjs +1 -27
- package/dist/components/common/list/collection-list/collection-select-icon.mjs +1 -53
- 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 -469
- package/dist/components/common/list/user-activity-list/user-activity-list.mjs +1 -143
- package/dist/components/common/list/video-list/video-list-item.mjs +1 -100
- package/dist/components/common/list/video-list/video-list.mjs +1 -152
- package/dist/components/common/list/waterfall-recommend/recommend-badge-style.mjs +1 -18
- package/dist/components/common/list/waterfall-recommend/waterfall-recommend-display.mjs +1 -26
- package/dist/components/common/list/waterfall-recommend/waterfall-recommend.mjs +1 -183
- package/dist/components/common/locale-sync/locale-sync.mjs +1 -62
- package/dist/components/common/login-dialog/login-dialog.mjs +1 -46
- 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.mjs +1 -321
- package/dist/components/common/photo-grid/index.mjs +1 -226
- package/dist/components/common/photo-preview/common-photo-preview.mjs +1 -97
- package/dist/components/common/photo-preview/decrypt-loading.mjs +2 -66
- package/dist/components/common/photo-preview/index.mjs +1 -64
- 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 -98
- package/dist/components/common/popup-video/popup-video.module.mjs +16 -7
- package/dist/components/common/series-episodes/index.mjs +1 -826
- 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/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 -150
- package/dist/components/common/theme-sync/index.mjs +1 -22
- package/dist/components/common/top-nav-bar/client.mjs +1 -70
- 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/user-info-initializer/index.mjs +1 -37
- package/dist/components/common/video-player/create-video.mjs +2 -27
- package/dist/components/common/video-player/index.mjs +5 -700
- package/dist/components/common/video-player/playing-videos.mjs +1 -73
- package/dist/components/common/video-player/preroll-skip-button-content.mjs +1 -20
- package/dist/components/common/video-player/process-m3u8-cache.mjs +1 -281
- package/dist/components/common/video-player/style.module.mjs +260 -7
- package/dist/components/common/video-player/video-blind-ad-overlay.mjs +1 -155
- package/dist/components/common/video-player/video-player-ref-context.mjs +1 -18
- package/dist/components/common/video-player/video-preroll-ad-overlay.mjs +1 -167
- package/dist/components/common/video-player/video-preroll-ad.mjs +1 -187
- 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 -44
- 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 -164
- package/dist/components/pages/collection-create/form.mjs +1 -164
- 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/_components/collection-detail-video-card.mjs +1 -135
- package/dist/components/pages/collection-detail/detail.mjs +1 -539
- 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 -683
- package/dist/components/pages/feed-series/feed-series-client.mjs +1 -383
- package/dist/components/pages/feed-series/page.mjs +1 -97
- package/dist/components/pages/feedback/_components/feedback-form.mjs +1 -271
- 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 -105
- package/dist/components/pages/home/channel-matcher.mjs +1 -30
- package/dist/components/pages/home/client.mjs +1 -149
- package/dist/components/pages/home/index.mjs +1 -59
- 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/auth-page-styles.mjs +2 -17
- package/dist/components/pages/login/forgot.mjs +1 -136
- package/dist/components/pages/login/index.mjs +1 -107
- package/dist/components/pages/login/login-client.mjs +1 -233
- package/dist/components/pages/login/password.mjs +1 -186
- package/dist/components/pages/login/register.mjs +1 -204
- package/dist/components/pages/login/reset-password.mjs +1 -193
- package/dist/components/pages/login/tracking.mjs +1 -32
- package/dist/components/pages/login/verify.mjs +1 -243
- 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 -192
- 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 -211
- package/dist/components/pages/search/search-result/index.mjs +1 -31
- package/dist/components/pages/search/search-result/search-all.mjs +1 -167
- package/dist/components/pages/search/search-result/search-user.mjs +1 -306
- package/dist/components/pages/search/search-result/search-video-info.mjs +1 -134
- package/dist/components/pages/search/search-result/shared.mjs +1 -114
- package/dist/components/pages/search/style.module.mjs +85 -12
- package/dist/components/pages/search/top-header.mjs +1 -131
- package/dist/components/pages/search/tracking.mjs +1 -51
- package/dist/components/pages/search-result/page-client.mjs +1 -130
- package/dist/components/pages/search-result/search-all.mjs +1 -180
- package/dist/components/pages/search-result/search-empty.mjs +1 -52
- package/dist/components/pages/search-result/search-tab.mjs +1 -95
- package/dist/components/pages/search-result/search-user.mjs +1 -315
- package/dist/components/pages/search-result/search-video-info.mjs +1 -195
- package/dist/components/pages/search-result/shared.mjs +1 -46
- package/dist/components/pages/search-result/top-header.mjs +1 -105
- package/dist/components/pages/search-result/tracking.mjs +1 -39
- package/dist/components/pages/settings/_components/reset-password-drawer.mjs +1 -381
- package/dist/components/pages/settings/_components/settings.mjs +1 -192
- 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 -395
- package/dist/components/pages/video-list/index.mjs +1 -61
- package/dist/components/pages/video-list/types.mjs +1 -16
- package/dist/components/pages/video-list/video-list-client.mjs +1 -144
- package/dist/components/pages/video-list/video-list-recommend-item.mjs +1 -94
- package/dist/components/pages/video-list/video-list-skeleton.mjs +1 -91
- 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 -107
- 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.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.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 -52
- 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 -489
- package/dist/hooks/use-card-decoration.mjs +1 -96
- package/dist/hooks/use-content-operate.mjs +1 -526
- package/dist/hooks/use-first-row-height.mjs +1 -105
- 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-is-client.mjs +1 -20
- package/dist/hooks/use-keyboard-open.mjs +1 -56
- package/dist/hooks/use-like-dislike.mjs +1 -40
- package/dist/hooks/use-min-duration-loading.mjs +1 -63
- package/dist/hooks/use-search-history.mjs +1 -53
- package/dist/hooks/use-sticky.mjs +1 -50
- package/dist/hooks.mjs +1 -17
- package/dist/i18n/locales/en.mjs +3 -836
- package/dist/i18n/locales/zh-CN.mjs +3 -836
- 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 -73
- 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/advertisement.mjs +1 -88
- package/dist/service/generated/client.mjs +1 -1281
- package/dist/service/generated/tanstack.mjs +1 -1179
- package/dist/service/register-by-verify-email-code.mjs +1 -17
- package/dist/service.mjs +1 -6
- package/dist/store/create-store.mjs +1 -25
- package/dist/store/modules/app-config-store.mjs +1 -28
- package/dist/store/modules/blind-spot-ad-store.mjs +1 -95
- 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 -133
- package/dist/store/modules/video-player-ref-store.mjs +1 -13
- package/dist/store.mjs +1 -12
- package/dist/theme-tokens.mjs +1 -82
- 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 -58
- package/dist/utils/api-collect.mjs +1 -14
- package/dist/utils/browser-fingerprint.mjs +1 -53
- package/dist/utils/channel-storage.mjs +1 -57
- package/dist/utils/cn.mjs +1 -15
- package/dist/utils/common.mjs +1 -311
- 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/device-id.mjs +1 -20
- package/dist/utils/email-validator.mjs +1 -108
- 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 -202
- package/dist/utils/image-compression.mjs +1 -59
- package/dist/utils/image-crop.mjs +1 -63
- 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/request-user-id.mjs +1 -16
- package/dist/utils/s3-uploader.mjs +1 -40
- package/dist/utils/schema/material.mjs +1 -24
- package/dist/utils/schema/schema.mjs +1 -207
- package/dist/utils/schema/utils.mjs +1 -27
- package/dist/utils/share-manager.mjs +1 -183
- package/dist/utils/tools.mjs +1 -92
- package/dist/utils/tracking.mjs +1 -183
- package/dist/utils/uint8.mjs +1 -46
- package/dist/utils/upload-file.mjs +1 -429
- package/dist/utils/use-compatible-router.mjs +1 -84
- package/dist/utils.mjs +1 -27
- package/package.json +1 -1
- package/theme.css +1 -1
|
@@ -1,748 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
'use client';
|
|
3
|
-
|
|
4
|
-
import { cn } from "../../../../../../../utils/cn.mjs";
|
|
5
|
-
import { useUserStore } from "../../../../../../../store/modules/user-store.mjs";
|
|
6
|
-
import { gCommunityGetSubscribedCollections, gCommunityGetUserCollections, gInteractionListCollects, pCommunityBatchDeleteCollection, pInteractionBatchDeleteCollects } from "../../../../../../../service/generated/client.mjs";
|
|
7
|
-
import { Button } from "../../../../../../ui/button.mjs";
|
|
8
|
-
import { Box } from "../../../../../../ui/box.mjs";
|
|
9
|
-
import { Text } from "../../../../../../ui/text.mjs";
|
|
10
|
-
import { Tabs, TabsList, TabsTrigger } from "../../../../../../ui/tabs.mjs";
|
|
11
|
-
import { useMutation, usePaginated, useUpdateRequest } from "../../../../../../../hooks/query/use-query.mjs";
|
|
12
|
-
import { CreateCollectionSheet } from "../../../../../../common/collection-popup/create-collection-sheet.mjs";
|
|
13
|
-
import { DeleteConfirmDialog } from "../../../../../../common/delete-confirm-dialog/delete-confirm-dialog.mjs";
|
|
14
|
-
import { CollectionList } from "../../../../../../common/list/collection-list/collection-list.mjs";
|
|
15
|
-
import { PostList } from "../../../../../../common/list/post-list/post-list.mjs";
|
|
16
|
-
import { trackProfilePageClick } from "../../../tracking.mjs";
|
|
17
|
-
import { ProfileMainEmptyState } from "../../empty-state.mjs";
|
|
18
|
-
import { CollectVideoWaterfall } from "./video-waterfall.mjs";
|
|
19
|
-
import { toast } from "sonner";
|
|
20
|
-
import { useEffect, useMemo, useState } from "react";
|
|
21
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
22
|
-
import { useTranslations } from "next-intl";
|
|
23
|
-
import dayjs from "dayjs";
|
|
24
|
-
import { parseAsString, useQueryState } from "nuqs";
|
|
25
|
-
|
|
26
|
-
//#region components/biz/business/profile/profile-main/tabs/collect-tab/client.tsx
|
|
27
|
-
const collectContentType = {
|
|
28
|
-
video: 1,
|
|
29
|
-
post: 2
|
|
30
|
-
};
|
|
31
|
-
const defaultCollectionPageSize = 10;
|
|
32
|
-
/**
|
|
33
|
-
* 从分页缓存中移除指定的内容项。
|
|
34
|
-
*/
|
|
35
|
-
function removeItemsFromPaginatedList(data, ids) {
|
|
36
|
-
if (!data) return data;
|
|
37
|
-
let removedCount = 0;
|
|
38
|
-
const nextPages = data.pages.map((page) => {
|
|
39
|
-
return {
|
|
40
|
-
page,
|
|
41
|
-
filteredList: (page.data?.list ?? emptyList).filter((item) => {
|
|
42
|
-
const itemId = item?.id ?? "";
|
|
43
|
-
const shouldRemove = ids.has(itemId);
|
|
44
|
-
if (shouldRemove) removedCount += 1;
|
|
45
|
-
return !shouldRemove;
|
|
46
|
-
})
|
|
47
|
-
};
|
|
48
|
-
});
|
|
49
|
-
return {
|
|
50
|
-
...data,
|
|
51
|
-
pages: nextPages.map(({ page, filteredList }) => {
|
|
52
|
-
if (!page.data) return page;
|
|
53
|
-
const nextTotal = typeof page.data.total === "number" ? Math.max(0, page.data.total - removedCount) : page.data.total;
|
|
54
|
-
return {
|
|
55
|
-
...page,
|
|
56
|
-
data: {
|
|
57
|
-
...page.data,
|
|
58
|
-
list: filteredList,
|
|
59
|
-
total: nextTotal
|
|
60
|
-
}
|
|
61
|
-
};
|
|
62
|
-
})
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* 获取帖子封面图,优先 cover_image,兜底使用首张图片媒体。
|
|
67
|
-
*/
|
|
68
|
-
function resolveCollectPostCoverImage(info) {
|
|
69
|
-
if (info.cover_image) return info.cover_image;
|
|
70
|
-
let fallbackImageUrl = "";
|
|
71
|
-
return (info.medias?.find((item) => {
|
|
72
|
-
if (!item) return false;
|
|
73
|
-
if (!item.is_video && !fallbackImageUrl && item.media_url) fallbackImageUrl = item.media_url;
|
|
74
|
-
return Boolean(item.cover_image);
|
|
75
|
-
}))?.cover_image || fallbackImageUrl;
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* 将 CommunityPostInfo 转换为 PostListItemProps
|
|
79
|
-
*/
|
|
80
|
-
function buildPostItemFromCommunityPostInfo(info, collectInfoMap) {
|
|
81
|
-
const collectCreateDate = collectInfoMap[info.content_id || ""]?.create_time;
|
|
82
|
-
const resolvedCoverImage = resolveCollectPostCoverImage(info);
|
|
83
|
-
return {
|
|
84
|
-
id: info.content_id || "",
|
|
85
|
-
title: info.content || "",
|
|
86
|
-
coverImage: resolvedCoverImage,
|
|
87
|
-
publishTime: dayjs(collectCreateDate).toDate().getTime()
|
|
88
|
-
};
|
|
89
|
-
}
|
|
90
|
-
/**
|
|
91
|
-
* 解析收藏视频列表简介
|
|
92
|
-
*/
|
|
93
|
-
function resolveCollectVideoDescription(info) {
|
|
94
|
-
const fromApi = String(info.description || info.detail?.description || "").trim();
|
|
95
|
-
if (fromApi) return fromApi;
|
|
96
|
-
return "";
|
|
97
|
-
}
|
|
98
|
-
/**
|
|
99
|
-
* 解析收藏视频瀑布流封面。
|
|
100
|
-
*/
|
|
101
|
-
function resolveCollectVideoCover(info) {
|
|
102
|
-
const normalizedImgType = String(info.img_type || "").trim().toLowerCase();
|
|
103
|
-
if (normalizedImgType === "short") return info.img_y || info.img_x || "";
|
|
104
|
-
if (normalizedImgType === "long") return info.img_x || info.img_y || "";
|
|
105
|
-
return info.img_y || info.img_x || "";
|
|
106
|
-
}
|
|
107
|
-
/**
|
|
108
|
-
* 将收藏视频信息转换为瀑布流卡片数据。
|
|
109
|
-
*/
|
|
110
|
-
function buildCollectVideoWaterfallItem(info, collectInfoMap) {
|
|
111
|
-
const collectCreateDate = collectInfoMap[info.id || ""]?.create_time;
|
|
112
|
-
return {
|
|
113
|
-
is_more_link: info.is_more_link,
|
|
114
|
-
id: info.id || "",
|
|
115
|
-
title: info.name || "",
|
|
116
|
-
coverImage: resolveCollectVideoCover(info),
|
|
117
|
-
duration: Number(info.duration ?? info.detail?.duration ?? 0),
|
|
118
|
-
authorName: info.up_user || info.source_username || "",
|
|
119
|
-
viewCount: info.play_count ?? 0,
|
|
120
|
-
publishTime: dayjs(collectCreateDate).toDate().getTime(),
|
|
121
|
-
imgType: info.img_type || info.media?.img_type || "",
|
|
122
|
-
score: info.score ?? info.detail?.score,
|
|
123
|
-
description: resolveCollectVideoDescription(info)
|
|
124
|
-
};
|
|
125
|
-
}
|
|
126
|
-
/**
|
|
127
|
-
* 将 CommunityContentBrief 转换为 CollectionListMediaItem
|
|
128
|
-
*/
|
|
129
|
-
function transformContentBriefToMediaItem(content) {
|
|
130
|
-
const resolvedCoverImage = resolveCollectPostCoverImage(content);
|
|
131
|
-
return {
|
|
132
|
-
contentType: content.source_type,
|
|
133
|
-
id: content.content_id,
|
|
134
|
-
title: content.title || content.content,
|
|
135
|
-
coverImage: resolvedCoverImage,
|
|
136
|
-
isVideo: false,
|
|
137
|
-
isMovie: false
|
|
138
|
-
};
|
|
139
|
-
}
|
|
140
|
-
/**
|
|
141
|
-
* 构建合集预览空状态占位卡片。
|
|
142
|
-
*/
|
|
143
|
-
function buildCollectionPlaceholderItems(collectionId) {
|
|
144
|
-
return Array.from({ length: 3 }, (_, index) => ({
|
|
145
|
-
id: `${collectionId}-placeholder-${index}`,
|
|
146
|
-
isPlaceholder: true
|
|
147
|
-
}));
|
|
148
|
-
}
|
|
149
|
-
/**
|
|
150
|
-
* 将 CommunityCollectionInfo 转换为 CollectionListItemProps
|
|
151
|
-
*/
|
|
152
|
-
function transformCollectionInfoToItem(info) {
|
|
153
|
-
const rawContents = info.contents ?? [];
|
|
154
|
-
const contents = (Array.isArray(rawContents) ? rawContents : []).slice(0, 3).map(transformContentBriefToMediaItem);
|
|
155
|
-
const contentCount = info.content_count ?? contents.length;
|
|
156
|
-
return {
|
|
157
|
-
id: info.collection_id || "",
|
|
158
|
-
title: info.title || "",
|
|
159
|
-
contentCount,
|
|
160
|
-
isDefaultCollection: Boolean(info.is_default),
|
|
161
|
-
contents: contentCount === 0 ? buildCollectionPlaceholderItems(info.collection_id || "collection") : contents
|
|
162
|
-
};
|
|
163
|
-
}
|
|
164
|
-
const emptyList = [];
|
|
165
|
-
const tabOptions = [
|
|
166
|
-
"video",
|
|
167
|
-
"post",
|
|
168
|
-
"collection"
|
|
169
|
-
];
|
|
170
|
-
const collectionTabOptions = ["created", "subscribed"];
|
|
171
|
-
const collectSubTabListClassName = "!h-6 !gap-4 !p-0";
|
|
172
|
-
/**
|
|
173
|
-
* 创建图标。
|
|
174
|
-
*/
|
|
175
|
-
function CreateCollectionIcon({ className }) {
|
|
176
|
-
return /* @__PURE__ */ jsx("svg", {
|
|
177
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
178
|
-
width: "16",
|
|
179
|
-
height: "16",
|
|
180
|
-
viewBox: "0 0 16 16",
|
|
181
|
-
fill: "none",
|
|
182
|
-
className: cn("text-[var(--color-text-secondary)] opacity-60", className),
|
|
183
|
-
children: /* @__PURE__ */ jsx("path", {
|
|
184
|
-
d: "M7.33398 7.3335V4.66683H8.66732V7.3335H11.334V8.66683H8.66732V11.3335H7.33398V8.66683H4.66732V7.3335H7.33398ZM8.00065 14.6668C4.31875 14.6668 1.33398 11.682 1.33398 8.00016C1.33398 4.31826 4.31875 1.3335 8.00065 1.3335C11.6825 1.3335 14.6673 4.31826 14.6673 8.00016C14.6673 11.682 11.6825 14.6668 8.00065 14.6668ZM8.00065 13.3335C10.9462 13.3335 13.334 10.9457 13.334 8.00016C13.334 5.05464 10.9462 2.66683 8.00065 2.66683C5.05513 2.66683 2.66732 5.05464 2.66732 8.00016C2.66732 10.9457 5.05513 13.3335 8.00065 13.3335Z",
|
|
185
|
-
fill: "currentColor"
|
|
186
|
-
})
|
|
187
|
-
});
|
|
188
|
-
}
|
|
189
|
-
/**
|
|
190
|
-
* 编辑图标。
|
|
191
|
-
*/
|
|
192
|
-
function EditCollectionIcon({ className }) {
|
|
193
|
-
return /* @__PURE__ */ jsx("svg", {
|
|
194
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
195
|
-
width: "16",
|
|
196
|
-
height: "16",
|
|
197
|
-
viewBox: "0 0 16 16",
|
|
198
|
-
fill: "none",
|
|
199
|
-
className: cn("text-[var(--color-text-secondary)] opacity-60", className),
|
|
200
|
-
children: /* @__PURE__ */ jsx("g", { children: /* @__PURE__ */ jsx("path", {
|
|
201
|
-
fillRule: "evenodd",
|
|
202
|
-
clipRule: "evenodd",
|
|
203
|
-
d: "M10.7666 2.12385C10.9828 1.94731 11.3023 1.95935 11.5039 2.16096L13.8389 4.49592C13.942 4.5991 13.9999 4.73966 14 4.88557C14 5.03152 13.942 5.17199 13.8389 5.27522L11.5078 7.6053C11.5063 7.60688 11.5055 7.60959 11.5039 7.61116C11.5023 7.61279 11.4997 7.61345 11.498 7.61506L5.27539 13.8387C5.17216 13.9418 5.03168 13.9998 4.88574 13.9998H2.55078C2.24679 13.9998 2.00001 13.753 2 13.449V11.1141C2 10.9681 2.05794 10.8277 2.16113 10.7244L10.7246 2.16096L10.7666 2.12385ZM3.10059 11.3416V12.8992H4.6582L10.335 7.22151L8.77734 5.66389L3.10059 11.3416ZM9.55664 4.88459L11.1143 6.44221L12.6709 4.88557L11.1133 3.32893L9.55664 4.88459Z",
|
|
204
|
-
fill: "currentColor"
|
|
205
|
-
}) })
|
|
206
|
-
});
|
|
207
|
-
}
|
|
208
|
-
const collectTopActionClassName = "flex items-center gap-[2px] text-[14px] leading-6 text-[var(--color-text-secondary)]";
|
|
209
|
-
/**
|
|
210
|
-
* 获取收藏二级 Tab 的样式。
|
|
211
|
-
*/
|
|
212
|
-
function getCollectSubTabTriggerClassName() {
|
|
213
|
-
return cn("!flex !items-center !flex-none !h-6 !w-auto !rounded-[4px] !bg-[var(--color-surface-chip-gray20)] !text-[12px] !font-normal !leading-[14px] !text-text1 hover:!text-text1", "data-[active]:!text-text1 data-[state=active]:!text-text1", "data-[active]:!bg-[image:var(--gradient-action-button)]", "data-[state=active]:!bg-[image:var(--gradient-action-button)]");
|
|
214
|
-
}
|
|
215
|
-
/**
|
|
216
|
-
* 收藏 Tab
|
|
217
|
-
*/
|
|
218
|
-
function CollectTab({ mode = "renderer", userId, showCreateAction = false, queryKeyPrefix, isMine = false }) {
|
|
219
|
-
const ct = useTranslations();
|
|
220
|
-
const tCollectionDetail = useTranslations("components.pages.collectionDetail");
|
|
221
|
-
const t = useTranslations("components.pages.profile.components.tabs");
|
|
222
|
-
const isRenderer = mode === "renderer";
|
|
223
|
-
const resolvedQueryKeyPrefix = queryKeyPrefix ?? [];
|
|
224
|
-
const [tabQuery, setTabQuery] = useQueryState("collectTab", parseAsString.withDefault("video"));
|
|
225
|
-
const [collectionTabQuery, setCollectionTabQuery] = useQueryState("collectCollectionTab", parseAsString.withDefault("created"));
|
|
226
|
-
const tab = useMemo(() => {
|
|
227
|
-
return tabOptions.includes(tabQuery) ? tabQuery : "video";
|
|
228
|
-
}, [tabQuery]);
|
|
229
|
-
const collectionTab = useMemo(() => {
|
|
230
|
-
return collectionTabOptions.includes(collectionTabQuery) ? collectionTabQuery : "created";
|
|
231
|
-
}, [collectionTabQuery]);
|
|
232
|
-
const [isEditMode, setIsEditMode] = useState(false);
|
|
233
|
-
const [isCollectionEditMode, setIsCollectionEditMode] = useState(false);
|
|
234
|
-
const [deleteConfirmOpen, setDeleteConfirmOpen] = useState(false);
|
|
235
|
-
const [deleteCollectionConfirmOpen, setDeleteCollectionConfirmOpen] = useState(false);
|
|
236
|
-
const [createSheetOpen, setCreateSheetOpen] = useState(false);
|
|
237
|
-
const [selectedIds, setSelectedIds] = useState(() => /* @__PURE__ */ new Set());
|
|
238
|
-
const [selectedCollectionIds, setSelectedCollectionIds] = useState(() => /* @__PURE__ */ new Set());
|
|
239
|
-
const { userId: storeUserId, userInfo } = useUserStore();
|
|
240
|
-
const resolvedUserId = userId || storeUserId || userInfo?.userId || "";
|
|
241
|
-
const updateRequest = useUpdateRequest();
|
|
242
|
-
/**
|
|
243
|
-
* 获取收藏内容数据
|
|
244
|
-
*/
|
|
245
|
-
async function getCollectContentData(page, contentType) {
|
|
246
|
-
if (!resolvedUserId) return { data: {
|
|
247
|
-
list: [],
|
|
248
|
-
total: 0
|
|
249
|
-
} };
|
|
250
|
-
const response = await gInteractionListCollects({
|
|
251
|
-
user_id: resolvedUserId,
|
|
252
|
-
folder_id: "",
|
|
253
|
-
content_type: contentType,
|
|
254
|
-
page,
|
|
255
|
-
page_size: defaultCollectionPageSize
|
|
256
|
-
});
|
|
257
|
-
const collectInfoMap = response.data.collect_infos?.reduce((acc, cur) => {
|
|
258
|
-
if (cur.content_id) acc[cur.content_id] = cur;
|
|
259
|
-
return acc;
|
|
260
|
-
}, {}) || {};
|
|
261
|
-
const list = response.data?.collect_items?.map((item) => {
|
|
262
|
-
return contentType === collectContentType.video ? buildCollectVideoWaterfallItem(item.video_info, collectInfoMap) : buildPostItemFromCommunityPostInfo(item.post_info, collectInfoMap);
|
|
263
|
-
}) ?? [];
|
|
264
|
-
return { data: {
|
|
265
|
-
list,
|
|
266
|
-
total: response.data?.total ?? list.length
|
|
267
|
-
} };
|
|
268
|
-
}
|
|
269
|
-
const videoData = usePaginated({
|
|
270
|
-
key: [
|
|
271
|
-
...resolvedQueryKeyPrefix,
|
|
272
|
-
"user-collect-video",
|
|
273
|
-
resolvedUserId
|
|
274
|
-
],
|
|
275
|
-
initialPageParam: 1,
|
|
276
|
-
async queryFn(pageParam) {
|
|
277
|
-
return getCollectContentData(pageParam, collectContentType.video);
|
|
278
|
-
},
|
|
279
|
-
options: {
|
|
280
|
-
staleTime: 0,
|
|
281
|
-
enabled: isRenderer
|
|
282
|
-
},
|
|
283
|
-
getNextPageParam(lastPage, allPages) {
|
|
284
|
-
if ((lastPage?.data?.list || []).length === 0) return;
|
|
285
|
-
return allPages.length + 1;
|
|
286
|
-
}
|
|
287
|
-
});
|
|
288
|
-
const postData = usePaginated({
|
|
289
|
-
key: [
|
|
290
|
-
...resolvedQueryKeyPrefix,
|
|
291
|
-
"user-collect-post",
|
|
292
|
-
resolvedUserId
|
|
293
|
-
],
|
|
294
|
-
initialPageParam: 1,
|
|
295
|
-
options: {
|
|
296
|
-
staleTime: 0,
|
|
297
|
-
enabled: isRenderer
|
|
298
|
-
},
|
|
299
|
-
async queryFn(_pageParam) {
|
|
300
|
-
return { data: {
|
|
301
|
-
list: [],
|
|
302
|
-
total: 0,
|
|
303
|
-
has_more: false
|
|
304
|
-
} };
|
|
305
|
-
},
|
|
306
|
-
getNextPageParam(lastPage, allPages) {
|
|
307
|
-
if ((lastPage?.data?.list || []).length === 0) return;
|
|
308
|
-
return allPages.length + 1;
|
|
309
|
-
}
|
|
310
|
-
});
|
|
311
|
-
/**
|
|
312
|
-
* 获取用户创建的合集列表
|
|
313
|
-
*/
|
|
314
|
-
async function getUserCollectionsData(page) {
|
|
315
|
-
if (!resolvedUserId) return { data: {
|
|
316
|
-
list: [],
|
|
317
|
-
total: 0
|
|
318
|
-
} };
|
|
319
|
-
const response = await gCommunityGetUserCollections({
|
|
320
|
-
page,
|
|
321
|
-
user_id: userId,
|
|
322
|
-
page_size: defaultCollectionPageSize
|
|
323
|
-
});
|
|
324
|
-
const collections = response.data?.data?.collections ?? [];
|
|
325
|
-
return { data: {
|
|
326
|
-
list: collections.map(transformCollectionInfoToItem),
|
|
327
|
-
total: response.data?.data?.total ?? collections.length
|
|
328
|
-
} };
|
|
329
|
-
}
|
|
330
|
-
/**
|
|
331
|
-
* 获取用户订阅的合集列表
|
|
332
|
-
*/
|
|
333
|
-
async function getSubscribedCollectionsData(page) {
|
|
334
|
-
if (!resolvedUserId) return { data: {
|
|
335
|
-
list: [],
|
|
336
|
-
total: 0
|
|
337
|
-
} };
|
|
338
|
-
const responseData = (await gCommunityGetSubscribedCollections({
|
|
339
|
-
page,
|
|
340
|
-
user_id: userId,
|
|
341
|
-
page_size: defaultCollectionPageSize
|
|
342
|
-
})).data?.data;
|
|
343
|
-
const collections = responseData?.collections ?? [];
|
|
344
|
-
return { data: {
|
|
345
|
-
list: collections.map(transformCollectionInfoToItem),
|
|
346
|
-
total: responseData?.total ?? collections.length
|
|
347
|
-
} };
|
|
348
|
-
}
|
|
349
|
-
const collectionCreateData = usePaginated({
|
|
350
|
-
key: [
|
|
351
|
-
...resolvedQueryKeyPrefix,
|
|
352
|
-
"user-collection-created",
|
|
353
|
-
resolvedUserId
|
|
354
|
-
],
|
|
355
|
-
initialPageParam: 1,
|
|
356
|
-
options: {
|
|
357
|
-
staleTime: 0,
|
|
358
|
-
enabled: isRenderer
|
|
359
|
-
},
|
|
360
|
-
async queryFn(pageParam) {
|
|
361
|
-
return getUserCollectionsData(pageParam);
|
|
362
|
-
},
|
|
363
|
-
getNextPageParam(lastPage, allPages) {
|
|
364
|
-
if ((lastPage?.data?.list || []).length === 0) return;
|
|
365
|
-
return allPages.length + 1;
|
|
366
|
-
}
|
|
367
|
-
});
|
|
368
|
-
const collectionSubscribeData = usePaginated({
|
|
369
|
-
key: [
|
|
370
|
-
...resolvedQueryKeyPrefix,
|
|
371
|
-
"user-collection-subscribed",
|
|
372
|
-
resolvedUserId
|
|
373
|
-
],
|
|
374
|
-
initialPageParam: 1,
|
|
375
|
-
options: {
|
|
376
|
-
staleTime: 0,
|
|
377
|
-
enabled: isRenderer
|
|
378
|
-
},
|
|
379
|
-
async queryFn(pageParam) {
|
|
380
|
-
return getSubscribedCollectionsData(pageParam);
|
|
381
|
-
},
|
|
382
|
-
getNextPageParam(lastPage, allPages) {
|
|
383
|
-
if ((lastPage?.data?.list || []).length === 0) return;
|
|
384
|
-
return allPages.length + 1;
|
|
385
|
-
}
|
|
386
|
-
});
|
|
387
|
-
const videoList = useMemo(() => videoData.data?.pages.flatMap((page) => page.data?.list ?? emptyList) ?? emptyList, [videoData.data]);
|
|
388
|
-
const postList = useMemo(() => postData.data?.pages.flatMap((page) => page.data?.list ?? emptyList) ?? emptyList, [postData.data]);
|
|
389
|
-
const collectionCreateList = useMemo(() => collectionCreateData.data?.pages.flatMap((page) => page.data?.list ?? emptyList) ?? emptyList, [collectionCreateData.data]);
|
|
390
|
-
const collectionSubscribeList = useMemo(() => collectionSubscribeData.data?.pages.flatMap((page) => page.data?.list ?? emptyList) ?? emptyList, [collectionSubscribeData.data]);
|
|
391
|
-
const currentList = tab === "video" ? videoList : tab === "post" ? postList : emptyList;
|
|
392
|
-
const availableIds = new Set(currentList.map((item) => item.id));
|
|
393
|
-
const availableCount = availableIds.size;
|
|
394
|
-
/** 当前列表是否已全选(随分页加载更新)。 */
|
|
395
|
-
const isAllCurrentSelected = availableCount > 0 && selectedIds.size === availableCount;
|
|
396
|
-
const currentData = tab === "video" ? videoData : postData;
|
|
397
|
-
const currentCollectionData = collectionTab === "created" ? collectionCreateData : collectionSubscribeData;
|
|
398
|
-
const currentCollectionList = collectionTab === "created" ? collectionCreateList : collectionSubscribeList;
|
|
399
|
-
const isCurrentContentEmpty = tab === "video" ? videoList.length === 0 && !currentData.isFetching : tab === "post" ? postList.length === 0 && !currentData.isFetching : currentCollectionList.length === 0 && !currentCollectionData.isFetching;
|
|
400
|
-
/** 批量操作中可选中的收藏夹(排除系统默认收藏夹)。 */
|
|
401
|
-
const selectableCollectionIds = useMemo(() => {
|
|
402
|
-
return new Set(currentCollectionList.filter((item) => !item.isDefaultCollection).map((item) => item.id));
|
|
403
|
-
}, [currentCollectionList]);
|
|
404
|
-
const isAllCollectionsSelected = selectableCollectionIds.size > 0 && [...selectableCollectionIds].every((id) => selectedCollectionIds.has(id));
|
|
405
|
-
const isVideoTab = tab === "video";
|
|
406
|
-
const canEditCollectionList = showCreateAction && collectionTab === "created";
|
|
407
|
-
const videoQueryKey = [
|
|
408
|
-
...resolvedQueryKeyPrefix,
|
|
409
|
-
"user-collect-video",
|
|
410
|
-
resolvedUserId
|
|
411
|
-
];
|
|
412
|
-
const postQueryKey = [
|
|
413
|
-
...resolvedQueryKeyPrefix,
|
|
414
|
-
"user-collect-post",
|
|
415
|
-
resolvedUserId
|
|
416
|
-
];
|
|
417
|
-
const { mutateAsync: batchDeleteCollects, isPending: isDeleting } = useMutation(async (contentIds) => {
|
|
418
|
-
return await pInteractionBatchDeleteCollects({
|
|
419
|
-
app_id: 0,
|
|
420
|
-
user_id: resolvedUserId,
|
|
421
|
-
folder_id: "",
|
|
422
|
-
content_type: isVideoTab ? 1 : 2,
|
|
423
|
-
content_ids: contentIds
|
|
424
|
-
});
|
|
425
|
-
});
|
|
426
|
-
const { mutateAsync: batchDeleteCollections, isPending: isDeletingCollections } = useMutation(async (folderIds) => {
|
|
427
|
-
return await pCommunityBatchDeleteCollection({ collection_ids: folderIds });
|
|
428
|
-
});
|
|
429
|
-
const toggleEditMode = () => {
|
|
430
|
-
setIsEditMode(!isEditMode);
|
|
431
|
-
setSelectedIds(/* @__PURE__ */ new Set());
|
|
432
|
-
};
|
|
433
|
-
/**
|
|
434
|
-
* 切换收藏夹编辑模式。
|
|
435
|
-
*/
|
|
436
|
-
function toggleCollectionEditMode() {
|
|
437
|
-
if (!canEditCollectionList) return;
|
|
438
|
-
setIsCollectionEditMode((prev) => !prev);
|
|
439
|
-
setSelectedCollectionIds(/* @__PURE__ */ new Set());
|
|
440
|
-
}
|
|
441
|
-
useEffect(() => {
|
|
442
|
-
setSelectedIds(/* @__PURE__ */ new Set());
|
|
443
|
-
if (tab === "collection") {
|
|
444
|
-
setIsEditMode(false);
|
|
445
|
-
setDeleteConfirmOpen(false);
|
|
446
|
-
return;
|
|
447
|
-
}
|
|
448
|
-
setIsEditMode(false);
|
|
449
|
-
setSelectedCollectionIds(/* @__PURE__ */ new Set());
|
|
450
|
-
setIsCollectionEditMode(false);
|
|
451
|
-
setDeleteCollectionConfirmOpen(false);
|
|
452
|
-
}, [tab]);
|
|
453
|
-
useEffect(() => {
|
|
454
|
-
setSelectedCollectionIds(/* @__PURE__ */ new Set());
|
|
455
|
-
setIsCollectionEditMode(false);
|
|
456
|
-
setDeleteCollectionConfirmOpen(false);
|
|
457
|
-
}, [collectionTab]);
|
|
458
|
-
useEffect(() => {
|
|
459
|
-
if (tabQuery !== tab) setTabQuery(tab);
|
|
460
|
-
}, [
|
|
461
|
-
tab,
|
|
462
|
-
tabQuery,
|
|
463
|
-
setTabQuery
|
|
464
|
-
]);
|
|
465
|
-
useEffect(() => {
|
|
466
|
-
if (collectionTabQuery !== collectionTab) setCollectionTabQuery(collectionTab);
|
|
467
|
-
}, [
|
|
468
|
-
collectionTab,
|
|
469
|
-
collectionTabQuery,
|
|
470
|
-
setCollectionTabQuery
|
|
471
|
-
]);
|
|
472
|
-
const toggleItemSelection = (id) => {
|
|
473
|
-
setSelectedIds((prev) => {
|
|
474
|
-
const newSet = new Set(prev);
|
|
475
|
-
if (newSet.has(id)) newSet.delete(id);
|
|
476
|
-
else newSet.add(id);
|
|
477
|
-
return newSet;
|
|
478
|
-
});
|
|
479
|
-
};
|
|
480
|
-
const handleToggleAll = () => {
|
|
481
|
-
if (selectedIds.size === availableIds.size && availableIds.size > 0) setSelectedIds(/* @__PURE__ */ new Set());
|
|
482
|
-
else setSelectedIds(new Set(availableIds));
|
|
483
|
-
};
|
|
484
|
-
/**
|
|
485
|
-
* 切换收藏夹选中状态。
|
|
486
|
-
*/
|
|
487
|
-
function toggleCollectionSelection(id) {
|
|
488
|
-
if (currentCollectionList.find((row) => row.id === id)?.isDefaultCollection) {
|
|
489
|
-
toast.error(tCollectionDetail("detail.defaultCollectionDeleteNotSupported"));
|
|
490
|
-
return;
|
|
491
|
-
}
|
|
492
|
-
setSelectedCollectionIds((prev) => {
|
|
493
|
-
const next = new Set(prev);
|
|
494
|
-
if (next.has(id)) next.delete(id);
|
|
495
|
-
else next.add(id);
|
|
496
|
-
return next;
|
|
497
|
-
});
|
|
498
|
-
}
|
|
499
|
-
/**
|
|
500
|
-
* 收藏夹全选 / 取消全选。
|
|
501
|
-
*/
|
|
502
|
-
function handleToggleAllCollections() {
|
|
503
|
-
if (isAllCollectionsSelected) {
|
|
504
|
-
setSelectedCollectionIds(/* @__PURE__ */ new Set());
|
|
505
|
-
return;
|
|
506
|
-
}
|
|
507
|
-
setSelectedCollectionIds(new Set(selectableCollectionIds));
|
|
508
|
-
}
|
|
509
|
-
/**
|
|
510
|
-
* 打开删除确认弹窗。
|
|
511
|
-
*/
|
|
512
|
-
function handleOpenDeleteConfirm() {
|
|
513
|
-
if (selectedIds.size === 0 || isDeleting) return;
|
|
514
|
-
setDeleteConfirmOpen(true);
|
|
515
|
-
}
|
|
516
|
-
/**
|
|
517
|
-
* 关闭删除确认弹窗。
|
|
518
|
-
*/
|
|
519
|
-
function handleCloseDeleteConfirm() {
|
|
520
|
-
if (isDeleting) return;
|
|
521
|
-
setDeleteConfirmOpen(false);
|
|
522
|
-
}
|
|
523
|
-
/**
|
|
524
|
-
* 关闭收藏夹删除确认弹窗。
|
|
525
|
-
*/
|
|
526
|
-
function handleCloseDeleteCollectionConfirm() {
|
|
527
|
-
if (isDeletingCollections) return;
|
|
528
|
-
setDeleteCollectionConfirmOpen(false);
|
|
529
|
-
}
|
|
530
|
-
/**
|
|
531
|
-
* 确认删除选中的收藏内容。
|
|
532
|
-
*/
|
|
533
|
-
async function handleDelete() {
|
|
534
|
-
if (selectedIds.size === 0 || isDeleting) return;
|
|
535
|
-
if (!resolvedUserId) {
|
|
536
|
-
toast.error(t("collectTab.pleaseLogin"));
|
|
537
|
-
return;
|
|
538
|
-
}
|
|
539
|
-
try {
|
|
540
|
-
const contentIds = Array.from(selectedIds);
|
|
541
|
-
const response = await batchDeleteCollects(contentIds);
|
|
542
|
-
if (response.code === 0) {
|
|
543
|
-
toast.success(t("collectTab.uncollectedSuccess"));
|
|
544
|
-
const deleteIds = new Set(contentIds);
|
|
545
|
-
updateRequest(isVideoTab ? videoQueryKey : postQueryKey, (old) => {
|
|
546
|
-
return removeItemsFromPaginatedList(old, deleteIds);
|
|
547
|
-
});
|
|
548
|
-
setDeleteConfirmOpen(false);
|
|
549
|
-
setSelectedIds(/* @__PURE__ */ new Set());
|
|
550
|
-
setIsEditMode(false);
|
|
551
|
-
} else toast.error(response.message || t("collectTab.uncollectFailed"));
|
|
552
|
-
} catch (error) {
|
|
553
|
-
console.error("取消收藏失败", error);
|
|
554
|
-
toast.error(t("collectTab.operationFailed"));
|
|
555
|
-
}
|
|
556
|
-
}
|
|
557
|
-
/**
|
|
558
|
-
* 打开收藏夹删除确认弹窗。
|
|
559
|
-
*/
|
|
560
|
-
function handleOpenDeleteCollectionConfirm() {
|
|
561
|
-
if (selectedCollectionIds.size === 0 || isDeletingCollections) return;
|
|
562
|
-
setDeleteCollectionConfirmOpen(true);
|
|
563
|
-
}
|
|
564
|
-
/**
|
|
565
|
-
* 确认删除所选收藏夹。
|
|
566
|
-
*/
|
|
567
|
-
async function handleDeleteCollections() {
|
|
568
|
-
if (selectedCollectionIds.size === 0 || isDeletingCollections) return;
|
|
569
|
-
if (!resolvedUserId) {
|
|
570
|
-
toast.error(t("collectTab.pleaseLogin"));
|
|
571
|
-
return;
|
|
572
|
-
}
|
|
573
|
-
try {
|
|
574
|
-
const response = await batchDeleteCollections(Array.from(selectedCollectionIds));
|
|
575
|
-
if (response.code === 0) {
|
|
576
|
-
toast.success(tCollectionDetail("detail.deleteSuccess"));
|
|
577
|
-
await currentCollectionData.refetch();
|
|
578
|
-
setDeleteCollectionConfirmOpen(false);
|
|
579
|
-
setSelectedCollectionIds(/* @__PURE__ */ new Set());
|
|
580
|
-
setIsCollectionEditMode(false);
|
|
581
|
-
return;
|
|
582
|
-
}
|
|
583
|
-
toast.error(response.message || tCollectionDetail("detail.deleteFailed"));
|
|
584
|
-
} catch (error) {
|
|
585
|
-
console.error("删除收藏夹失败", error);
|
|
586
|
-
toast.error(tCollectionDetail("detail.deleteFailed"));
|
|
587
|
-
}
|
|
588
|
-
}
|
|
589
|
-
const loadMore = async () => {
|
|
590
|
-
if (!isRenderer) return;
|
|
591
|
-
if (tab === "collection") {
|
|
592
|
-
await currentCollectionData.fetchNextPage();
|
|
593
|
-
return;
|
|
594
|
-
}
|
|
595
|
-
await currentData.fetchNextPage();
|
|
596
|
-
};
|
|
597
|
-
return /* @__PURE__ */ jsxs(Box, { children: [
|
|
598
|
-
/* @__PURE__ */ jsxs(Box, {
|
|
599
|
-
className: "flex items-center justify-between",
|
|
600
|
-
children: [/* @__PURE__ */ jsx(Tabs, {
|
|
601
|
-
value: tab,
|
|
602
|
-
onValueChange: (value) => {
|
|
603
|
-
setTabQuery(value);
|
|
604
|
-
},
|
|
605
|
-
children: /* @__PURE__ */ jsxs(TabsList, {
|
|
606
|
-
variant: "tag",
|
|
607
|
-
className: collectSubTabListClassName,
|
|
608
|
-
children: [/* @__PURE__ */ jsx(TabsTrigger, {
|
|
609
|
-
value: "video",
|
|
610
|
-
className: getCollectSubTabTriggerClassName(),
|
|
611
|
-
children: t("collectTab.video")
|
|
612
|
-
}), /* @__PURE__ */ jsx(TabsTrigger, {
|
|
613
|
-
value: "collection",
|
|
614
|
-
className: getCollectSubTabTriggerClassName(),
|
|
615
|
-
children: t("collectTab.collections")
|
|
616
|
-
})]
|
|
617
|
-
})
|
|
618
|
-
}), tab === "collection" ? showCreateAction && /* @__PURE__ */ jsxs(Box, {
|
|
619
|
-
className: "flex items-center gap-3",
|
|
620
|
-
children: [/* @__PURE__ */ jsxs("button", {
|
|
621
|
-
type: "button",
|
|
622
|
-
className: collectTopActionClassName,
|
|
623
|
-
onClick: () => setCreateSheetOpen(true),
|
|
624
|
-
children: [/* @__PURE__ */ jsx(CreateCollectionIcon, {}), /* @__PURE__ */ jsx(Text, {
|
|
625
|
-
className: "text-[14px] leading-6 text-[var(--color-text-secondary)]",
|
|
626
|
-
children: ct("components.pages.collectionCreate.form.create")
|
|
627
|
-
})]
|
|
628
|
-
}), canEditCollectionList && /* @__PURE__ */ jsxs("button", {
|
|
629
|
-
type: "button",
|
|
630
|
-
className: collectTopActionClassName,
|
|
631
|
-
onClick: toggleCollectionEditMode,
|
|
632
|
-
children: [!isCollectionEditMode && /* @__PURE__ */ jsx(EditCollectionIcon, {}), /* @__PURE__ */ jsx(Text, {
|
|
633
|
-
className: "text-[14px] leading-6 text-[var(--color-text-secondary)]",
|
|
634
|
-
children: isCollectionEditMode ? t("collectTab.cancel") : t("collectTab.edit")
|
|
635
|
-
})]
|
|
636
|
-
})]
|
|
637
|
-
}) : (tab === "video" || tab === "post") && isMine && /* @__PURE__ */ jsxs(Button, {
|
|
638
|
-
variant: "ghost",
|
|
639
|
-
size: "sm",
|
|
640
|
-
className: "h-6 gap-[2px] px-0 text-[14px] leading-6 text-[var(--color-text-secondary)] hover:bg-transparent hover:text-[var(--color-text-secondary)]",
|
|
641
|
-
onClick: toggleEditMode,
|
|
642
|
-
children: [isEditMode ? null : /* @__PURE__ */ jsx(EditCollectionIcon, {}), /* @__PURE__ */ jsx(Text, {
|
|
643
|
-
className: "text-[14px] leading-6 text-[var(--color-text-secondary)]",
|
|
644
|
-
children: isEditMode ? t("collectTab.cancel") : t("collectTab.edit")
|
|
645
|
-
})]
|
|
646
|
-
})]
|
|
647
|
-
}),
|
|
648
|
-
/* @__PURE__ */ jsx(Box, {
|
|
649
|
-
onClick: (e) => {
|
|
650
|
-
trackProfilePageClick(e, "content_item");
|
|
651
|
-
},
|
|
652
|
-
className: "pt-4",
|
|
653
|
-
children: tab === "video" ? isCurrentContentEmpty ? /* @__PURE__ */ jsx(ProfileMainEmptyState, { text: t("collectTab.emptyContent") }) : /* @__PURE__ */ jsx(CollectVideoWaterfall, {
|
|
654
|
-
list: videoList,
|
|
655
|
-
loading: currentData.isFetching,
|
|
656
|
-
hasMore: currentData.hasNextPage ?? false,
|
|
657
|
-
loadMore,
|
|
658
|
-
emptyText: t("collectTab.emptyContent"),
|
|
659
|
-
isEditMode,
|
|
660
|
-
selectedIds,
|
|
661
|
-
onToggleSelection: toggleItemSelection
|
|
662
|
-
}) : tab === "post" ? isCurrentContentEmpty ? /* @__PURE__ */ jsx(ProfileMainEmptyState, { text: t("collectTab.emptyContent") }) : /* @__PURE__ */ jsx(PostList, {
|
|
663
|
-
list: postList,
|
|
664
|
-
loading: currentData.isFetching,
|
|
665
|
-
hasMore: currentData.hasNextPage ?? false,
|
|
666
|
-
loadMore,
|
|
667
|
-
emptyText: t("collectTab.emptyContent"),
|
|
668
|
-
isEditMode,
|
|
669
|
-
selectedIds,
|
|
670
|
-
onToggleSelection: toggleItemSelection
|
|
671
|
-
}) : isCurrentContentEmpty ? /* @__PURE__ */ jsx(ProfileMainEmptyState, { text: t("collectTab.emptyContent") }) : /* @__PURE__ */ jsx(CollectionList, {
|
|
672
|
-
list: currentCollectionList,
|
|
673
|
-
loading: currentCollectionData.isFetching,
|
|
674
|
-
hasMore: currentCollectionData.hasNextPage ?? false,
|
|
675
|
-
loadMore,
|
|
676
|
-
emptyText: t("collectTab.emptyContent"),
|
|
677
|
-
isEditMode: isCollectionEditMode,
|
|
678
|
-
selectedIds: selectedCollectionIds,
|
|
679
|
-
onToggleSelection: toggleCollectionSelection
|
|
680
|
-
})
|
|
681
|
-
}),
|
|
682
|
-
isEditMode && tab !== "collection" && /* @__PURE__ */ jsxs(Box, {
|
|
683
|
-
className: "fixed bottom-0 left-0 right-0 z-[60] h-[98px] bg-[var(--color-overlay-panel-fade-start90)] backdrop-blur-[50px]",
|
|
684
|
-
children: [/* @__PURE__ */ jsxs(Box, {
|
|
685
|
-
className: "flex items-center gap-[2px] px-4 pt-2",
|
|
686
|
-
children: [/* @__PURE__ */ jsx("button", {
|
|
687
|
-
type: "button",
|
|
688
|
-
className: "flex h-12 w-[178px] items-center justify-center rounded-[100px] text-[16px] leading-6 text-[var(--color-text-primary)]",
|
|
689
|
-
onClick: handleToggleAll,
|
|
690
|
-
children: isAllCurrentSelected ? t("collectTab.cancelSelectAll") : t("collectTab.selectAll")
|
|
691
|
-
}), /* @__PURE__ */ jsx("button", {
|
|
692
|
-
type: "button",
|
|
693
|
-
className: "flex h-12 w-[178px] items-center justify-center rounded-[100px] bg-[var(--color-surface-white10)] text-[16px] leading-6 text-[var(--color-border-required)] disabled:opacity-40",
|
|
694
|
-
disabled: selectedIds.size === 0 || isDeleting,
|
|
695
|
-
onClick: handleOpenDeleteConfirm,
|
|
696
|
-
children: isDeleting ? t("collectTab.processing") : t("collectTab.delete")
|
|
697
|
-
})]
|
|
698
|
-
}), /* @__PURE__ */ jsx(Box, { className: "pointer-events-none absolute bottom-2 left-1/2 h-[5px] w-[134px] -translate-x-1/2 rounded-[100px] bg-[var(--color-neutral-black)]" })]
|
|
699
|
-
}),
|
|
700
|
-
isCollectionEditMode && /* @__PURE__ */ jsxs(Box, {
|
|
701
|
-
className: "fixed bottom-0 left-0 right-0 z-[60] h-[98px] bg-[var(--color-overlay-panel-fade-start90)] backdrop-blur-[50px]",
|
|
702
|
-
children: [/* @__PURE__ */ jsxs(Box, {
|
|
703
|
-
className: "flex items-center gap-[2px] px-4 pt-2",
|
|
704
|
-
children: [/* @__PURE__ */ jsx("button", {
|
|
705
|
-
type: "button",
|
|
706
|
-
className: "flex h-12 w-[178px] items-center justify-center rounded-[100px] text-[16px] leading-6 text-[var(--color-text-primary)]",
|
|
707
|
-
onClick: handleToggleAllCollections,
|
|
708
|
-
children: isAllCollectionsSelected ? t("collectTab.cancelSelectAll") : t("collectTab.selectAll")
|
|
709
|
-
}), /* @__PURE__ */ jsx("button", {
|
|
710
|
-
type: "button",
|
|
711
|
-
className: "flex h-12 w-[178px] items-center justify-center rounded-[100px] bg-[var(--color-surface-white10)] text-[16px] leading-6 text-[var(--color-border-required)] disabled:opacity-40",
|
|
712
|
-
disabled: selectedCollectionIds.size === 0 || isDeletingCollections,
|
|
713
|
-
onClick: handleOpenDeleteCollectionConfirm,
|
|
714
|
-
children: isDeletingCollections ? t("collectTab.processing") : t("collectTab.delete")
|
|
715
|
-
})]
|
|
716
|
-
}), /* @__PURE__ */ jsx(Box, { className: "pointer-events-none absolute bottom-2 left-1/2 h-[5px] w-[134px] -translate-x-1/2 rounded-[100px] bg-[var(--color-neutral-black)]" })]
|
|
717
|
-
}),
|
|
718
|
-
/* @__PURE__ */ jsx(DeleteConfirmDialog, {
|
|
719
|
-
open: deleteConfirmOpen,
|
|
720
|
-
onOpenChange: setDeleteConfirmOpen,
|
|
721
|
-
onCancel: handleCloseDeleteConfirm,
|
|
722
|
-
onConfirm: handleDelete,
|
|
723
|
-
title: "",
|
|
724
|
-
description: t("collectTab.deleteConfirmDescription"),
|
|
725
|
-
confirmText: t("collectTab.delete"),
|
|
726
|
-
cancelText: t("collectTab.cancel"),
|
|
727
|
-
isConfirming: isDeleting
|
|
728
|
-
}),
|
|
729
|
-
/* @__PURE__ */ jsx(DeleteConfirmDialog, {
|
|
730
|
-
open: deleteCollectionConfirmOpen,
|
|
731
|
-
onOpenChange: setDeleteCollectionConfirmOpen,
|
|
732
|
-
onCancel: handleCloseDeleteCollectionConfirm,
|
|
733
|
-
onConfirm: handleDeleteCollections,
|
|
734
|
-
title: tCollectionDetail("detail.deleteCollection"),
|
|
735
|
-
isConfirming: isDeletingCollections
|
|
736
|
-
}),
|
|
737
|
-
/* @__PURE__ */ jsx(CreateCollectionSheet, {
|
|
738
|
-
visible: createSheetOpen,
|
|
739
|
-
onClose: () => setCreateSheetOpen(false),
|
|
740
|
-
onCreated: () => {
|
|
741
|
-
collectionCreateData.refetch();
|
|
742
|
-
}
|
|
743
|
-
})
|
|
744
|
-
] });
|
|
745
|
-
}
|
|
746
|
-
|
|
747
|
-
//#endregion
|
|
748
|
-
export { CollectTab };
|
|
2
|
+
"use client";import{cn as e}from"../../../../../../../utils/cn.mjs";import{useUserStore as t}from"../../../../../../../store/modules/user-store.mjs";import{gCommunityGetSubscribedCollections as n,gCommunityGetUserCollections as r,gInteractionListCollects as i,pCommunityBatchDeleteCollection as a,pInteractionBatchDeleteCollects as ee}from"../../../../../../../service/generated/client.mjs";import{Button as te}from"../../../../../../ui/button.mjs";import{Box as o}from"../../../../../../ui/box.mjs";import{Text as s}from"../../../../../../ui/text.mjs";import{Tabs as ne,TabsList as re,TabsTrigger as ie}from"../../../../../../ui/tabs.mjs";import{useMutation as ae,usePaginated as c,useUpdateRequest as oe}from"../../../../../../../hooks/query/use-query.mjs";import{CreateCollectionSheet as se}from"../../../../../../common/collection-popup/create-collection-sheet.mjs";import{DeleteConfirmDialog as ce}from"../../../../../../common/delete-confirm-dialog/delete-confirm-dialog.mjs";import{CollectionList as le}from"../../../../../../common/list/collection-list/collection-list.mjs";import{PostList as ue}from"../../../../../../common/list/post-list/post-list.mjs";import{trackProfilePageClick as de}from"../../../tracking.mjs";import{ProfileMainEmptyState as l}from"../../empty-state.mjs";import{CollectVideoWaterfall as fe}from"./video-waterfall.mjs";import{toast as u}from"sonner";import{useEffect as d,useMemo as f,useState as p}from"react";import{jsx as m,jsxs as h}from"react/jsx-runtime";import{useTranslations as g}from"next-intl";import _ from"dayjs";import{parseAsString as pe,useQueryState as me}from"nuqs";const he={video:1,post:2};function ge(e,t){if(!e)return e;let n=0,r=e.pages.map(e=>({page:e,filteredList:(e.data?.list??b).filter(e=>{let r=e?.id??``,i=t.has(r);return i&&(n+=1),!i})}));return{...e,pages:r.map(({page:e,filteredList:t})=>{if(!e.data)return e;let r=typeof e.data.total==`number`?Math.max(0,e.data.total-n):e.data.total;return{...e,data:{...e.data,list:t,total:r}}})}}function v(e){if(e.cover_image)return e.cover_image;let t=``;return e.medias?.find(e=>e?(!e.is_video&&!t&&e.media_url&&(t=e.media_url),!!e.cover_image):!1)?.cover_image||t}function _e(e,t){let n=t[e.content_id||``]?.create_time,r=v(e);return{id:e.content_id||``,title:e.content||``,coverImage:r,publishTime:_(n).toDate().getTime()}}function ve(e){return String(e.description||e.detail?.description||``).trim()||``}function ye(e){let t=String(e.img_type||``).trim().toLowerCase();return t===`short`?e.img_y||e.img_x||``:t===`long`?e.img_x||e.img_y||``:e.img_y||e.img_x||``}function be(e,t){let n=t[e.id||``]?.create_time;return{is_more_link:e.is_more_link,id:e.id||``,title:e.name||``,coverImage:ye(e),duration:Number(e.duration??e.detail?.duration??0),authorName:e.up_user||e.source_username||``,viewCount:e.play_count??0,publishTime:_(n).toDate().getTime(),imgType:e.img_type||e.media?.img_type||``,score:e.score??e.detail?.score,description:ve(e)}}function xe(e){let t=v(e);return{contentType:e.source_type,id:e.content_id,title:e.title||e.content,coverImage:t,isVideo:!1,isMovie:!1}}function y(e){return Array.from({length:3},(t,n)=>({id:`${e}-placeholder-${n}`,isPlaceholder:!0}))}function Se(e){let t=e.contents??[],n=(Array.isArray(t)?t:[]).slice(0,3).map(xe),r=e.content_count??n.length;return{id:e.collection_id||``,title:e.title||``,contentCount:r,isDefaultCollection:!!e.is_default,contents:r===0?y(e.collection_id||`collection`):n}}const b=[],Ce=[`video`,`post`,`collection`],we=[`created`,`subscribed`];function Te({className:t}){return m(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`none`,className:e(`text-[var(--color-text-secondary)] opacity-60`,t),children:m(`path`,{d:`M7.33398 7.3335V4.66683H8.66732V7.3335H11.334V8.66683H8.66732V11.3335H7.33398V8.66683H4.66732V7.3335H7.33398ZM8.00065 14.6668C4.31875 14.6668 1.33398 11.682 1.33398 8.00016C1.33398 4.31826 4.31875 1.3335 8.00065 1.3335C11.6825 1.3335 14.6673 4.31826 14.6673 8.00016C14.6673 11.682 11.6825 14.6668 8.00065 14.6668ZM8.00065 13.3335C10.9462 13.3335 13.334 10.9457 13.334 8.00016C13.334 5.05464 10.9462 2.66683 8.00065 2.66683C5.05513 2.66683 2.66732 5.05464 2.66732 8.00016C2.66732 10.9457 5.05513 13.3335 8.00065 13.3335Z`,fill:`currentColor`})})}function Ee({className:t}){return m(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`none`,className:e(`text-[var(--color-text-secondary)] opacity-60`,t),children:m(`g`,{children:m(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M10.7666 2.12385C10.9828 1.94731 11.3023 1.95935 11.5039 2.16096L13.8389 4.49592C13.942 4.5991 13.9999 4.73966 14 4.88557C14 5.03152 13.942 5.17199 13.8389 5.27522L11.5078 7.6053C11.5063 7.60688 11.5055 7.60959 11.5039 7.61116C11.5023 7.61279 11.4997 7.61345 11.498 7.61506L5.27539 13.8387C5.17216 13.9418 5.03168 13.9998 4.88574 13.9998H2.55078C2.24679 13.9998 2.00001 13.753 2 13.449V11.1141C2 10.9681 2.05794 10.8277 2.16113 10.7244L10.7246 2.16096L10.7666 2.12385ZM3.10059 11.3416V12.8992H4.6582L10.335 7.22151L8.77734 5.66389L3.10059 11.3416ZM9.55664 4.88459L11.1143 6.44221L12.6709 4.88557L11.1133 3.32893L9.55664 4.88459Z`,fill:`currentColor`})})})}const De=`flex items-center gap-[2px] text-[14px] leading-6 text-[var(--color-text-secondary)]`;function Oe(){return e(`!flex !items-center !flex-none !h-6 !w-auto !rounded-[4px] !bg-[var(--color-surface-chip-gray20)] !text-[12px] !font-normal !leading-[14px] !text-text1 hover:!text-text1`,`data-[active]:!text-text1 data-[state=active]:!text-text1`,`data-[active]:!bg-[image:var(--gradient-action-button)]`,`data-[state=active]:!bg-[image:var(--gradient-action-button)]`)}function x({mode:e=`renderer`,userId:_,showCreateAction:v=!1,queryKeyPrefix:ve,isMine:ye=!1}){let xe=g(),y=g(`components.pages.collectionDetail`),x=g(`components.pages.profile.components.tabs`),S=e===`renderer`,C=ve??[],[w,T]=me(`collectTab`,pe.withDefault(`video`)),[E,ke]=me(`collectCollectionTab`,pe.withDefault(`created`)),D=f(()=>Ce.includes(w)?w:`video`,[w]),O=f(()=>we.includes(E)?E:`created`,[E]),[k,A]=p(!1),[j,M]=p(!1),[Ae,N]=p(!1),[je,P]=p(!1),[Me,Ne]=p(!1),[F,I]=p(()=>new Set),[L,R]=p(()=>new Set),{userId:Pe,userInfo:Fe}=t(),z=_||Pe||Fe?.userId||``,Ie=oe();async function Le(e,t){if(!z)return{data:{list:[],total:0}};let n=await i({user_id:z,folder_id:``,content_type:t,page:e,page_size:10}),r=n.data.collect_infos?.reduce((e,t)=>(t.content_id&&(e[t.content_id]=t),e),{})||{},a=n.data?.collect_items?.map(e=>t===he.video?be(e.video_info,r):_e(e.post_info,r))??[];return{data:{list:a,total:n.data?.total??a.length}}}let B=c({key:[...C,`user-collect-video`,z],initialPageParam:1,async queryFn(e){return Le(e,he.video)},options:{staleTime:0,enabled:S},getNextPageParam(e,t){if((e?.data?.list||[]).length!==0)return t.length+1}}),V=c({key:[...C,`user-collect-post`,z],initialPageParam:1,options:{staleTime:0,enabled:S},async queryFn(e){return{data:{list:[],total:0,has_more:!1}}},getNextPageParam(e,t){if((e?.data?.list||[]).length!==0)return t.length+1}});async function Re(e){if(!z)return{data:{list:[],total:0}};let t=await r({page:e,user_id:_,page_size:10}),n=t.data?.data?.collections??[];return{data:{list:n.map(Se),total:t.data?.data?.total??n.length}}}async function ze(e){if(!z)return{data:{list:[],total:0}};let t=(await n({page:e,user_id:_,page_size:10})).data?.data,r=t?.collections??[];return{data:{list:r.map(Se),total:t?.total??r.length}}}let H=c({key:[...C,`user-collection-created`,z],initialPageParam:1,options:{staleTime:0,enabled:S},async queryFn(e){return Re(e)},getNextPageParam(e,t){if((e?.data?.list||[]).length!==0)return t.length+1}}),U=c({key:[...C,`user-collection-subscribed`,z],initialPageParam:1,options:{staleTime:0,enabled:S},async queryFn(e){return ze(e)},getNextPageParam(e,t){if((e?.data?.list||[]).length!==0)return t.length+1}}),W=f(()=>B.data?.pages.flatMap(e=>e.data?.list??b)??b,[B.data]),G=f(()=>V.data?.pages.flatMap(e=>e.data?.list??b)??b,[V.data]),Be=f(()=>H.data?.pages.flatMap(e=>e.data?.list??b)??b,[H.data]),Ve=f(()=>U.data?.pages.flatMap(e=>e.data?.list??b)??b,[U.data]),He=D===`video`?W:D===`post`?G:b,K=new Set(He.map(e=>e.id)),Ue=K.size,We=Ue>0&&F.size===Ue,q=D===`video`?B:V,J=O===`created`?H:U,Y=O===`created`?Be:Ve,X=D===`video`?W.length===0&&!q.isFetching:D===`post`?G.length===0&&!q.isFetching:Y.length===0&&!J.isFetching,Z=f(()=>new Set(Y.filter(e=>!e.isDefaultCollection).map(e=>e.id)),[Y]),Ge=Z.size>0&&[...Z].every(e=>L.has(e)),Ke=D===`video`,qe=v&&O===`created`,Je=[...C,`user-collect-video`,z],Ye=[...C,`user-collect-post`,z],{mutateAsync:Xe,isPending:Q}=ae(async e=>await ee({app_id:0,user_id:z,folder_id:``,content_type:Ke?1:2,content_ids:e})),{mutateAsync:Ze,isPending:$}=ae(async e=>await a({collection_ids:e})),Qe=()=>{A(!k),I(new Set)};function $e(){qe&&(M(e=>!e),R(new Set))}d(()=>{if(I(new Set),D===`collection`){A(!1),N(!1);return}A(!1),R(new Set),M(!1),P(!1)},[D]),d(()=>{R(new Set),M(!1),P(!1)},[O]),d(()=>{w!==D&&T(D)},[D,w,T]),d(()=>{E!==O&&ke(O)},[O,E,ke]);let et=e=>{I(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},tt=()=>{F.size===K.size&&K.size>0?I(new Set):I(new Set(K))};function nt(e){if(Y.find(t=>t.id===e)?.isDefaultCollection){u.error(y(`detail.defaultCollectionDeleteNotSupported`));return}R(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})}function rt(){if(Ge){R(new Set);return}R(new Set(Z))}function it(){F.size===0||Q||N(!0)}function at(){Q||N(!1)}function ot(){$||P(!1)}async function st(){if(!(F.size===0||Q)){if(!z){u.error(x(`collectTab.pleaseLogin`));return}try{let e=Array.from(F),t=await Xe(e);if(t.code===0){u.success(x(`collectTab.uncollectedSuccess`));let t=new Set(e);Ie(Ke?Je:Ye,e=>ge(e,t)),N(!1),I(new Set),A(!1)}else u.error(t.message||x(`collectTab.uncollectFailed`))}catch(e){console.error(`取消收藏失败`,e),u.error(x(`collectTab.operationFailed`))}}}function ct(){L.size===0||$||P(!0)}async function lt(){if(!(L.size===0||$)){if(!z){u.error(x(`collectTab.pleaseLogin`));return}try{let e=await Ze(Array.from(L));if(e.code===0){u.success(y(`detail.deleteSuccess`)),await J.refetch(),P(!1),R(new Set),M(!1);return}u.error(e.message||y(`detail.deleteFailed`))}catch(e){console.error(`删除收藏夹失败`,e),u.error(y(`detail.deleteFailed`))}}}let ut=async()=>{if(S){if(D===`collection`){await J.fetchNextPage();return}await q.fetchNextPage()}};return h(o,{children:[h(o,{className:`flex items-center justify-between`,children:[m(ne,{value:D,onValueChange:e=>{T(e)},children:h(re,{variant:`tag`,className:`!h-6 !gap-4 !p-0`,children:[m(ie,{value:`video`,className:Oe(),children:x(`collectTab.video`)}),m(ie,{value:`collection`,className:Oe(),children:x(`collectTab.collections`)})]})}),D===`collection`?v&&h(o,{className:`flex items-center gap-3`,children:[h(`button`,{type:`button`,className:De,onClick:()=>Ne(!0),children:[m(Te,{}),m(s,{className:`text-[14px] leading-6 text-[var(--color-text-secondary)]`,children:xe(`components.pages.collectionCreate.form.create`)})]}),qe&&h(`button`,{type:`button`,className:De,onClick:$e,children:[!j&&m(Ee,{}),m(s,{className:`text-[14px] leading-6 text-[var(--color-text-secondary)]`,children:x(j?`collectTab.cancel`:`collectTab.edit`)})]})]}):(D===`video`||D===`post`)&&ye&&h(te,{variant:`ghost`,size:`sm`,className:`h-6 gap-[2px] px-0 text-[14px] leading-6 text-[var(--color-text-secondary)] hover:bg-transparent hover:text-[var(--color-text-secondary)]`,onClick:Qe,children:[k?null:m(Ee,{}),m(s,{className:`text-[14px] leading-6 text-[var(--color-text-secondary)]`,children:x(k?`collectTab.cancel`:`collectTab.edit`)})]})]}),m(o,{onClick:e=>{de(e,`content_item`)},className:`pt-4`,children:D===`video`?X?m(l,{text:x(`collectTab.emptyContent`)}):m(fe,{list:W,loading:q.isFetching,hasMore:q.hasNextPage??!1,loadMore:ut,emptyText:x(`collectTab.emptyContent`),isEditMode:k,selectedIds:F,onToggleSelection:et}):D===`post`?X?m(l,{text:x(`collectTab.emptyContent`)}):m(ue,{list:G,loading:q.isFetching,hasMore:q.hasNextPage??!1,loadMore:ut,emptyText:x(`collectTab.emptyContent`),isEditMode:k,selectedIds:F,onToggleSelection:et}):X?m(l,{text:x(`collectTab.emptyContent`)}):m(le,{list:Y,loading:J.isFetching,hasMore:J.hasNextPage??!1,loadMore:ut,emptyText:x(`collectTab.emptyContent`),isEditMode:j,selectedIds:L,onToggleSelection:nt})}),k&&D!==`collection`&&h(o,{className:`fixed bottom-0 left-0 right-0 z-[60] h-[98px] bg-[var(--color-overlay-panel-fade-start90)] backdrop-blur-[50px]`,children:[h(o,{className:`flex items-center gap-[2px] px-4 pt-2`,children:[m(`button`,{type:`button`,className:`flex h-12 w-[178px] items-center justify-center rounded-[100px] text-[16px] leading-6 text-[var(--color-text-primary)]`,onClick:tt,children:x(We?`collectTab.cancelSelectAll`:`collectTab.selectAll`)}),m(`button`,{type:`button`,className:`flex h-12 w-[178px] items-center justify-center rounded-[100px] bg-[var(--color-surface-white10)] text-[16px] leading-6 text-[var(--color-border-required)] disabled:opacity-40`,disabled:F.size===0||Q,onClick:it,children:x(Q?`collectTab.processing`:`collectTab.delete`)})]}),m(o,{className:`pointer-events-none absolute bottom-2 left-1/2 h-[5px] w-[134px] -translate-x-1/2 rounded-[100px] bg-[var(--color-neutral-black)]`})]}),j&&h(o,{className:`fixed bottom-0 left-0 right-0 z-[60] h-[98px] bg-[var(--color-overlay-panel-fade-start90)] backdrop-blur-[50px]`,children:[h(o,{className:`flex items-center gap-[2px] px-4 pt-2`,children:[m(`button`,{type:`button`,className:`flex h-12 w-[178px] items-center justify-center rounded-[100px] text-[16px] leading-6 text-[var(--color-text-primary)]`,onClick:rt,children:x(Ge?`collectTab.cancelSelectAll`:`collectTab.selectAll`)}),m(`button`,{type:`button`,className:`flex h-12 w-[178px] items-center justify-center rounded-[100px] bg-[var(--color-surface-white10)] text-[16px] leading-6 text-[var(--color-border-required)] disabled:opacity-40`,disabled:L.size===0||$,onClick:ct,children:x($?`collectTab.processing`:`collectTab.delete`)})]}),m(o,{className:`pointer-events-none absolute bottom-2 left-1/2 h-[5px] w-[134px] -translate-x-1/2 rounded-[100px] bg-[var(--color-neutral-black)]`})]}),m(ce,{open:Ae,onOpenChange:N,onCancel:at,onConfirm:st,title:``,description:x(`collectTab.deleteConfirmDescription`),confirmText:x(`collectTab.delete`),cancelText:x(`collectTab.cancel`),isConfirming:Q}),m(ce,{open:je,onOpenChange:P,onCancel:ot,onConfirm:lt,title:y(`detail.deleteCollection`),isConfirming:$}),m(se,{visible:Me,onClose:()=>Ne(!1),onCreated:()=>{H.refetch()}})]})}export{x as CollectTab};
|