@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,156 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import { useUserStore } from "../../../store/modules/user-store.mjs";
|
|
5
|
-
import { pContentMatchAds } from "../../../service/generated/client.mjs";
|
|
6
|
-
import { pContentMatchAdsKey } from "../../../service/generated/tanstack.mjs";
|
|
7
|
-
import { trackAdClick, trackAdImpression } from "../../../utils/tracking.mjs";
|
|
8
|
-
import { useRequest } from "../../../hooks/query/use-query.mjs";
|
|
9
|
-
import { useVideoPlayerRef } from "./video-player-ref-context.mjs";
|
|
10
|
-
import { create } from "zustand";
|
|
11
|
-
import { createJSONStorage, persist } from "zustand/middleware";
|
|
12
|
-
import { useEffect, useRef, useState } from "react";
|
|
13
|
-
import { useIsClient } from "foxact/use-is-client";
|
|
14
|
-
import { jsx } from "react/jsx-runtime";
|
|
15
|
-
import { createPortal } from "react-dom";
|
|
16
|
-
|
|
17
|
-
//#region components/common/video-player/video-blind-ad-overlay.tsx
|
|
18
|
-
const useVideoBlindAdStore = create()(persist((set, get) => ({
|
|
19
|
-
shownVideoIds: /* @__PURE__ */ new Set(),
|
|
20
|
-
hasShown: (videoId) => {
|
|
21
|
-
return get().shownVideoIds.has(videoId);
|
|
22
|
-
},
|
|
23
|
-
markAsShown: (videoId) => {
|
|
24
|
-
const currentSet = get().shownVideoIds;
|
|
25
|
-
if (!currentSet.has(videoId)) {
|
|
26
|
-
const newSet = new Set(currentSet);
|
|
27
|
-
newSet.add(videoId);
|
|
28
|
-
set({ shownVideoIds: newSet });
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}), {
|
|
32
|
-
name: "video-blind-ad-storage",
|
|
33
|
-
storage: typeof window !== "undefined" ? createJSONStorage(() => sessionStorage) : void 0,
|
|
34
|
-
partialize: (state) => ({ shownVideoIds: Array.from(state.shownVideoIds) }),
|
|
35
|
-
merge: (persistedState, currentState) => {
|
|
36
|
-
return {
|
|
37
|
-
...currentState,
|
|
38
|
-
shownVideoIds: new Set(persistedState.shownVideoIds || [])
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
}));
|
|
42
|
-
const AD_SLOT_KEY = "video_blind";
|
|
43
|
-
function buildVideoSessionKey(videoId, episode) {
|
|
44
|
-
return `${videoId}:${Math.max(1, Math.floor(Number(episode) || 1))}`;
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* 视频盲点广告覆盖层组件
|
|
48
|
-
* 每个视频在会话中只会显示一次盲点广告。
|
|
49
|
-
* 当前播放进度达到 trigger_video_progress_min 分钟后立即展示。
|
|
50
|
-
*/
|
|
51
|
-
function VideoBlindAdOverlay({ videoId, episode }) {
|
|
52
|
-
const playerRef = useVideoPlayerRef();
|
|
53
|
-
const isClient = useIsClient();
|
|
54
|
-
const userId = useUserStore((s) => s.userId);
|
|
55
|
-
const { hasShown, markAsShown } = useVideoBlindAdStore();
|
|
56
|
-
/** 是否已达到触发阈值 */
|
|
57
|
-
const [triggered, setTriggered] = useState(false);
|
|
58
|
-
const triggeredRef = useRef(false);
|
|
59
|
-
const reqBody = {
|
|
60
|
-
user_id: userId,
|
|
61
|
-
ad_type: "blind"
|
|
62
|
-
};
|
|
63
|
-
const { data, isLoading } = useRequest(pContentMatchAdsKey(reqBody), () => {
|
|
64
|
-
return pContentMatchAds(reqBody);
|
|
65
|
-
});
|
|
66
|
-
const videoSessionKey = buildVideoSessionKey(videoId, episode);
|
|
67
|
-
const hasAdShown = hasShown(videoSessionKey);
|
|
68
|
-
const adId = data?.data?.materials?.[0]?.advertise_code || "";
|
|
69
|
-
/** 盲点广告曝光上报(overlay 首次可见时触发)。 */
|
|
70
|
-
const isOverlayVisible = !hasAdShown && triggered;
|
|
71
|
-
useEffect(() => {
|
|
72
|
-
if (!isOverlayVisible || !adId) return;
|
|
73
|
-
trackAdImpression({
|
|
74
|
-
page_key: "detail",
|
|
75
|
-
page_name: "详情页",
|
|
76
|
-
ad_slot_key: AD_SLOT_KEY,
|
|
77
|
-
ad_slot_name: "盲点广告",
|
|
78
|
-
ad_id: adId,
|
|
79
|
-
ad_type: "blind"
|
|
80
|
-
});
|
|
81
|
-
}, [isOverlayVisible, adId]);
|
|
82
|
-
/** 监听 xgplayer TIME_UPDATE,当前播放进度达到阈值后立即触发。 */
|
|
83
|
-
useEffect(() => {
|
|
84
|
-
if (!data || hasAdShown) return;
|
|
85
|
-
const triggerTimeSeconds = (data.data?.settings?.trigger_video_progress_min ?? 0) * 60;
|
|
86
|
-
let playerInstance = null;
|
|
87
|
-
let pollTimer = null;
|
|
88
|
-
function onTimeUpdate(e) {
|
|
89
|
-
if (triggeredRef.current) {
|
|
90
|
-
playerInstance?.off("timeupdate", onTimeUpdate);
|
|
91
|
-
return;
|
|
92
|
-
}
|
|
93
|
-
if (Number(e?.currentTime || playerInstance?.currentTime || 0) >= triggerTimeSeconds) {
|
|
94
|
-
triggeredRef.current = true;
|
|
95
|
-
setTriggered(true);
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
function bindPlayerListener() {
|
|
99
|
-
const player = playerRef?.current?.getPlayer?.();
|
|
100
|
-
if (!player) return false;
|
|
101
|
-
playerInstance = player;
|
|
102
|
-
if (Number(player.currentTime || 0) >= triggerTimeSeconds) {
|
|
103
|
-
triggeredRef.current = true;
|
|
104
|
-
setTriggered(true);
|
|
105
|
-
return true;
|
|
106
|
-
}
|
|
107
|
-
player.on("timeupdate", onTimeUpdate);
|
|
108
|
-
return true;
|
|
109
|
-
}
|
|
110
|
-
if (!bindPlayerListener()) pollTimer = window.setInterval(() => {
|
|
111
|
-
if (bindPlayerListener() && pollTimer !== null) {
|
|
112
|
-
window.clearInterval(pollTimer);
|
|
113
|
-
pollTimer = null;
|
|
114
|
-
}
|
|
115
|
-
}, 200);
|
|
116
|
-
return () => {
|
|
117
|
-
if (pollTimer !== null) window.clearInterval(pollTimer);
|
|
118
|
-
playerInstance?.off("timeupdate", onTimeUpdate);
|
|
119
|
-
};
|
|
120
|
-
}, [
|
|
121
|
-
playerRef,
|
|
122
|
-
data,
|
|
123
|
-
hasAdShown
|
|
124
|
-
]);
|
|
125
|
-
/** 遮罩可见时锁定页面滚动 */
|
|
126
|
-
useEffect(() => {
|
|
127
|
-
if (!isOverlayVisible) return;
|
|
128
|
-
document.body.style.overflow = "hidden";
|
|
129
|
-
return () => {
|
|
130
|
-
document.body.style.overflow = "";
|
|
131
|
-
};
|
|
132
|
-
}, [isOverlayVisible]);
|
|
133
|
-
/** 处理广告点击。 */
|
|
134
|
-
function handleADClick() {
|
|
135
|
-
if (hasAdShown) return;
|
|
136
|
-
if (adId) trackAdClick({
|
|
137
|
-
page_key: "detail",
|
|
138
|
-
page_name: "详情页",
|
|
139
|
-
ad_slot_key: AD_SLOT_KEY,
|
|
140
|
-
ad_slot_name: "盲点广告",
|
|
141
|
-
ad_id: adId,
|
|
142
|
-
ad_type: "blind"
|
|
143
|
-
});
|
|
144
|
-
markAsShown(videoSessionKey);
|
|
145
|
-
window.open(data?.data.materials?.[0].advertise_url);
|
|
146
|
-
}
|
|
147
|
-
if (!isClient || typeof document === "undefined" || isLoading || data?.data?.hit === false) return null;
|
|
148
|
-
if (hasAdShown || !triggered) return null;
|
|
149
|
-
return createPortal(/* @__PURE__ */ jsx("div", {
|
|
150
|
-
className: "blind-ad-overlay fixed inset-0 h-screen w-screen z-[99999]",
|
|
151
|
-
onClick: handleADClick
|
|
152
|
-
}), document.body);
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
//#endregion
|
|
156
|
-
export { VideoBlindAdOverlay };
|
|
2
|
+
"use client";import{useUserStore as e}from"../../../store/modules/user-store.mjs";import{pContentMatchAds as t}from"../../../service/generated/client.mjs";import{pContentMatchAdsKey as n}from"../../../service/generated/tanstack.mjs";import{trackAdClick as r,trackAdImpression as i}from"../../../utils/tracking.mjs";import{useRequest as a}from"../../../hooks/query/use-query.mjs";import{useVideoPlayerRef as o}from"./video-player-ref-context.mjs";import{create as s}from"zustand";import{createJSONStorage as c,persist as l}from"zustand/middleware";import{useEffect as u,useRef as d,useState as f}from"react";import{useIsClient as p}from"foxact/use-is-client";import{jsx as m}from"react/jsx-runtime";import{createPortal as h}from"react-dom";const g=s()(l((e,t)=>({shownVideoIds:new Set,hasShown:e=>t().shownVideoIds.has(e),markAsShown:n=>{let r=t().shownVideoIds;if(!r.has(n)){let t=new Set(r);t.add(n),e({shownVideoIds:t})}}}),{name:`video-blind-ad-storage`,storage:typeof window<`u`?c(()=>sessionStorage):void 0,partialize:e=>({shownVideoIds:Array.from(e.shownVideoIds)}),merge:(e,t)=>({...t,shownVideoIds:new Set(e.shownVideoIds||[])})})),_=`video_blind`;function v(e,t){return`${e}:${Math.max(1,Math.floor(Number(t)||1))}`}function y({videoId:s,episode:c}){let l=o(),y=p(),b=e(e=>e.userId),{hasShown:x,markAsShown:S}=g(),[C,w]=f(!1),T=d(!1),E={user_id:b,ad_type:`blind`},{data:D,isLoading:O}=a(n(E),()=>t(E)),k=v(s,c),A=x(k),j=D?.data?.materials?.[0]?.advertise_code||``,M=!A&&C;u(()=>{!M||!j||i({page_key:`detail`,page_name:`详情页`,ad_slot_key:_,ad_slot_name:`盲点广告`,ad_id:j,ad_type:`blind`})},[M,j]),u(()=>{if(!D||A)return;let e=(D.data?.settings?.trigger_video_progress_min??0)*60,t=null,n=null;function r(n){if(T.current){t?.off(`timeupdate`,r);return}Number(n?.currentTime||t?.currentTime||0)>=e&&(T.current=!0,w(!0))}function i(){let n=l?.current?.getPlayer?.();return n?(t=n,Number(n.currentTime||0)>=e?(T.current=!0,w(!0),!0):(n.on(`timeupdate`,r),!0)):!1}return i()||(n=window.setInterval(()=>{i()&&n!==null&&(window.clearInterval(n),n=null)},200)),()=>{n!==null&&window.clearInterval(n),t?.off(`timeupdate`,r)}},[l,D,A]),u(()=>{if(M)return document.body.style.overflow=`hidden`,()=>{document.body.style.overflow=``}},[M]);function N(){A||(j&&r({page_key:`detail`,page_name:`详情页`,ad_slot_key:_,ad_slot_name:`盲点广告`,ad_id:j,ad_type:`blind`}),S(k),window.open(D?.data.materials?.[0].advertise_url))}return!y||typeof document>`u`||O||D?.data?.hit===!1||A||!C?null:h(m(`div`,{className:`blind-ad-overlay fixed inset-0 h-screen w-screen z-[99999]`,onClick:N}),document.body)}export{y as VideoBlindAdOverlay};
|
|
@@ -1,19 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import { createContext, use } from "react";
|
|
5
|
-
|
|
6
|
-
//#region components/common/video-player/video-player-ref-context.tsx
|
|
7
|
-
/**
|
|
8
|
-
* 视频播放器 Ref Context
|
|
9
|
-
*/
|
|
10
|
-
const VideoPlayerRefContext = createContext(null);
|
|
11
|
-
/**
|
|
12
|
-
* 使用视频播放器 Ref Hook
|
|
13
|
-
*/
|
|
14
|
-
function useVideoPlayerRef() {
|
|
15
|
-
return use(VideoPlayerRefContext);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
//#endregion
|
|
19
|
-
export { VideoPlayerRefContext, useVideoPlayerRef };
|
|
2
|
+
"use client";import{createContext as e,use as t}from"react";const n=e(null);function r(){return t(n)}export{n as VideoPlayerRefContext,r as useVideoPlayerRef};
|
|
@@ -1,168 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import { useUserStore } from "../../../store/modules/user-store.mjs";
|
|
5
|
-
import { pContentMatchAds } from "../../../service/generated/client.mjs";
|
|
6
|
-
import { pContentMatchAdsKey } from "../../../service/generated/tanstack.mjs";
|
|
7
|
-
import { trackAdClick, trackAdImpression, trackAdvertising } from "../../../utils/tracking.mjs";
|
|
8
|
-
import { useRequest } from "../../../hooks/query/use-query.mjs";
|
|
9
|
-
import { useVideoPlayerRef } from "./video-player-ref-context.mjs";
|
|
10
|
-
import { PrerollSkipButtonContent } from "./preroll-skip-button-content.mjs";
|
|
11
|
-
import { useCallback, useEffect, useRef, useState } from "react";
|
|
12
|
-
import { useIsClient } from "foxact/use-is-client";
|
|
13
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
14
|
-
import { createPortal } from "react-dom";
|
|
15
|
-
|
|
16
|
-
//#region components/common/video-player/video-preroll-ad-overlay.tsx
|
|
17
|
-
const AD_SLOT_KEY = "video_preroll";
|
|
18
|
-
function buildVideoSessionKey(videoId, episode) {
|
|
19
|
-
return `${videoId}:${Math.max(1, Math.floor(Number(episode) || 1))}`;
|
|
20
|
-
}
|
|
21
|
-
/** 会话级去重:记录本次会话已展示过贴片广告的视频 ID。 */
|
|
22
|
-
const shownPrerollVideoIds = /* @__PURE__ */ new Set();
|
|
23
|
-
/**
|
|
24
|
-
* 视频贴片广告覆盖层组件。
|
|
25
|
-
* 视频就绪后即展示,展示期间暂停视频,用户跳过后恢复播放。
|
|
26
|
-
* 同一视频每次会话只展示一次。
|
|
27
|
-
*/
|
|
28
|
-
function VideoPrerollAdOverlay({ videoId, episode }) {
|
|
29
|
-
const playerRef = useVideoPlayerRef();
|
|
30
|
-
const isClient = useIsClient();
|
|
31
|
-
const userId = useUserStore((s) => s.userId);
|
|
32
|
-
const [isVisible, setIsVisible] = useState(false);
|
|
33
|
-
const [skipCountdown, setSkipCountdown] = useState(0);
|
|
34
|
-
const countdownTimerRef = useRef(null);
|
|
35
|
-
const hasTriggeredRef = useRef(false);
|
|
36
|
-
const reqBody = {
|
|
37
|
-
user_id: userId,
|
|
38
|
-
ad_type: "preroll"
|
|
39
|
-
};
|
|
40
|
-
const { data, isLoading } = useRequest(pContentMatchAdsKey(reqBody), () => {
|
|
41
|
-
return pContentMatchAds(reqBody);
|
|
42
|
-
});
|
|
43
|
-
const material = data?.data?.materials?.[0];
|
|
44
|
-
const skipSeconds = data?.data?.settings?.skip_seconds ?? 5;
|
|
45
|
-
const adId = material?.advertise_code || "";
|
|
46
|
-
const videoSessionKey = buildVideoSessionKey(videoId, episode);
|
|
47
|
-
const hasShown = shownPrerollVideoIds.has(videoSessionKey);
|
|
48
|
-
/** 数据就绪后触发贴片广告展示,并暂停播放器。 */
|
|
49
|
-
useEffect(() => {
|
|
50
|
-
if (data?.data?.hit !== true || !material || hasTriggeredRef.current || hasShown) return;
|
|
51
|
-
function showAd() {
|
|
52
|
-
if (hasTriggeredRef.current) return;
|
|
53
|
-
hasTriggeredRef.current = true;
|
|
54
|
-
setIsVisible(true);
|
|
55
|
-
setSkipCountdown(skipSeconds);
|
|
56
|
-
try {
|
|
57
|
-
playerRef?.current?.getPlayer()?.pause?.();
|
|
58
|
-
} catch {}
|
|
59
|
-
}
|
|
60
|
-
const player = playerRef?.current?.getPlayer();
|
|
61
|
-
if (!player) return;
|
|
62
|
-
if (playerRef?.current?.isPlayerReady()) showAd();
|
|
63
|
-
else {
|
|
64
|
-
player.once?.("ready", showAd);
|
|
65
|
-
return () => {
|
|
66
|
-
player.off?.("ready", showAd);
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
}, [
|
|
70
|
-
data,
|
|
71
|
-
hasShown,
|
|
72
|
-
material,
|
|
73
|
-
playerRef,
|
|
74
|
-
skipSeconds
|
|
75
|
-
]);
|
|
76
|
-
/** 贴片广告可见时启动跳过倒计时。 */
|
|
77
|
-
useEffect(() => {
|
|
78
|
-
if (!isVisible || skipSeconds <= 0) return;
|
|
79
|
-
countdownTimerRef.current = setInterval(() => {
|
|
80
|
-
setSkipCountdown((prev) => {
|
|
81
|
-
if (prev <= 1) {
|
|
82
|
-
if (countdownTimerRef.current) {
|
|
83
|
-
clearInterval(countdownTimerRef.current);
|
|
84
|
-
countdownTimerRef.current = null;
|
|
85
|
-
}
|
|
86
|
-
return 0;
|
|
87
|
-
}
|
|
88
|
-
return prev - 1;
|
|
89
|
-
});
|
|
90
|
-
}, 1e3);
|
|
91
|
-
return () => {
|
|
92
|
-
if (countdownTimerRef.current) {
|
|
93
|
-
clearInterval(countdownTimerRef.current);
|
|
94
|
-
countdownTimerRef.current = null;
|
|
95
|
-
}
|
|
96
|
-
};
|
|
97
|
-
}, [isVisible, skipSeconds]);
|
|
98
|
-
/** 贴片广告曝光上报。 */
|
|
99
|
-
useEffect(() => {
|
|
100
|
-
if (!isVisible || !adId) return;
|
|
101
|
-
trackAdImpression({
|
|
102
|
-
page_key: "detail",
|
|
103
|
-
page_name: "详情页",
|
|
104
|
-
ad_slot_key: AD_SLOT_KEY,
|
|
105
|
-
ad_slot_name: "视频贴片广告",
|
|
106
|
-
ad_id: adId,
|
|
107
|
-
ad_type: "preroll"
|
|
108
|
-
});
|
|
109
|
-
}, [isVisible, adId]);
|
|
110
|
-
/** 跳过贴片广告,恢复视频播放并上报。 */
|
|
111
|
-
const handleSkip = useCallback(() => {
|
|
112
|
-
if (countdownTimerRef.current) {
|
|
113
|
-
clearInterval(countdownTimerRef.current);
|
|
114
|
-
countdownTimerRef.current = null;
|
|
115
|
-
}
|
|
116
|
-
setIsVisible(false);
|
|
117
|
-
shownPrerollVideoIds.add(videoSessionKey);
|
|
118
|
-
try {
|
|
119
|
-
playerRef?.current?.getPlayer()?.play?.().catch?.(() => {});
|
|
120
|
-
} catch {}
|
|
121
|
-
if (adId) trackAdvertising({
|
|
122
|
-
event_type: "close",
|
|
123
|
-
advertising_key: AD_SLOT_KEY,
|
|
124
|
-
advertising_name: "视频贴片广告",
|
|
125
|
-
advertising_id: adId
|
|
126
|
-
});
|
|
127
|
-
}, [
|
|
128
|
-
adId,
|
|
129
|
-
playerRef,
|
|
130
|
-
videoSessionKey
|
|
131
|
-
]);
|
|
132
|
-
/** 点击贴片广告,上报并跳转落地页。 */
|
|
133
|
-
function handleAdClick() {
|
|
134
|
-
if (adId) trackAdClick({
|
|
135
|
-
page_key: "detail",
|
|
136
|
-
page_name: "详情页",
|
|
137
|
-
ad_slot_key: AD_SLOT_KEY,
|
|
138
|
-
ad_slot_name: "视频贴片广告",
|
|
139
|
-
ad_id: adId,
|
|
140
|
-
ad_type: "preroll"
|
|
141
|
-
});
|
|
142
|
-
if (material?.advertise_url) window.open(material.advertise_url);
|
|
143
|
-
}
|
|
144
|
-
if (!isClient || typeof document === "undefined" || isLoading || !isVisible) return null;
|
|
145
|
-
return createPortal(/* @__PURE__ */ jsxs("div", {
|
|
146
|
-
className: "fixed inset-0 z-[99998] bg-black",
|
|
147
|
-
children: [material?.advertise_icon && /* @__PURE__ */ jsx("img", {
|
|
148
|
-
src: material.advertise_icon,
|
|
149
|
-
alt: material.advertise_name || "视频贴片广告",
|
|
150
|
-
className: "h-full w-full cursor-pointer object-cover",
|
|
151
|
-
onClick: handleAdClick
|
|
152
|
-
}), /* @__PURE__ */ jsx("div", {
|
|
153
|
-
className: "absolute right-4 top-4 z-10",
|
|
154
|
-
children: skipCountdown <= 0 ? /* @__PURE__ */ jsx("button", {
|
|
155
|
-
type: "button",
|
|
156
|
-
className: "cursor-pointer rounded-lg bg-black/60 px-3 py-1 text-sm text-white",
|
|
157
|
-
onClick: handleSkip,
|
|
158
|
-
children: /* @__PURE__ */ jsx(PrerollSkipButtonContent, { label: "跳过广告" })
|
|
159
|
-
}) : /* @__PURE__ */ jsxs("div", {
|
|
160
|
-
className: "rounded-lg bg-black/60 px-3 py-1 text-sm text-white",
|
|
161
|
-
children: [skipCountdown, "秒后可跳过"]
|
|
162
|
-
})
|
|
163
|
-
})]
|
|
164
|
-
}), document.body);
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
//#endregion
|
|
168
|
-
export { VideoPrerollAdOverlay };
|
|
2
|
+
"use client";import{useUserStore as e}from"../../../store/modules/user-store.mjs";import{pContentMatchAds as t}from"../../../service/generated/client.mjs";import{pContentMatchAdsKey as n}from"../../../service/generated/tanstack.mjs";import{trackAdClick as r,trackAdImpression as i,trackAdvertising as a}from"../../../utils/tracking.mjs";import{useRequest as o}from"../../../hooks/query/use-query.mjs";import{useVideoPlayerRef as s}from"./video-player-ref-context.mjs";import{PrerollSkipButtonContent as c}from"./preroll-skip-button-content.mjs";import{useCallback as l,useEffect as u,useRef as d,useState as f}from"react";import{useIsClient as p}from"foxact/use-is-client";import{jsx as m,jsxs as h}from"react/jsx-runtime";import{createPortal as g}from"react-dom";const _=`video_preroll`;function v(e,t){return`${e}:${Math.max(1,Math.floor(Number(t)||1))}`}const y=new Set;function b({videoId:b,episode:x}){let S=s(),C=p(),w=e(e=>e.userId),[T,E]=f(!1),[D,O]=f(0),k=d(null),A=d(!1),j={user_id:w,ad_type:`preroll`},{data:M,isLoading:N}=o(n(j),()=>t(j)),P=M?.data?.materials?.[0],F=M?.data?.settings?.skip_seconds??5,I=P?.advertise_code||``,L=v(b,x),R=y.has(L);u(()=>{if(M?.data?.hit!==!0||!P||A.current||R)return;function e(){if(!A.current){A.current=!0,E(!0),O(F);try{S?.current?.getPlayer()?.pause?.()}catch{}}}let t=S?.current?.getPlayer();if(t)if(S?.current?.isPlayerReady())e();else return t.once?.(`ready`,e),()=>{t.off?.(`ready`,e)}},[M,R,P,S,F]),u(()=>{if(!(!T||F<=0))return k.current=setInterval(()=>{O(e=>e<=1?(k.current&&=(clearInterval(k.current),null),0):e-1)},1e3),()=>{k.current&&=(clearInterval(k.current),null)}},[T,F]),u(()=>{!T||!I||i({page_key:`detail`,page_name:`详情页`,ad_slot_key:_,ad_slot_name:`视频贴片广告`,ad_id:I,ad_type:`preroll`})},[T,I]);let z=l(()=>{k.current&&=(clearInterval(k.current),null),E(!1),y.add(L);try{S?.current?.getPlayer()?.play?.().catch?.(()=>{})}catch{}I&&a({event_type:`close`,advertising_key:_,advertising_name:`视频贴片广告`,advertising_id:I})},[I,S,L]);function B(){I&&r({page_key:`detail`,page_name:`详情页`,ad_slot_key:_,ad_slot_name:`视频贴片广告`,ad_id:I,ad_type:`preroll`}),P?.advertise_url&&window.open(P.advertise_url)}return!C||typeof document>`u`||N||!T?null:g(h(`div`,{className:`fixed inset-0 z-[99998] bg-black`,children:[P?.advertise_icon&&m(`img`,{src:P.advertise_icon,alt:P.advertise_name||`视频贴片广告`,className:`h-full w-full cursor-pointer object-cover`,onClick:B}),m(`div`,{className:`absolute right-4 top-4 z-10`,children:D<=0?m(`button`,{type:`button`,className:`cursor-pointer rounded-lg bg-black/60 px-3 py-1 text-sm text-white`,onClick:z,children:m(c,{label:`跳过广告`})}):h(`div`,{className:`rounded-lg bg-black/60 px-3 py-1 text-sm text-white`,children:[D,`秒后可跳过`]})})]}),document.body)}export{b as VideoPrerollAdOverlay};
|
|
@@ -1,188 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import getResUrl from "../../../utils/get-res-url.mjs";
|
|
5
|
-
import { useIsClient } from "../../../hooks/use-is-client.mjs";
|
|
6
|
-
import SvgVideoPlay from "../../../assets/icons/detail/video_play.mjs";
|
|
7
|
-
import { PrerollSkipButtonContent } from "./preroll-skip-button-content.mjs";
|
|
8
|
-
import { useEffect, useImperativeHandle, useMemo, useRef, useState } from "react";
|
|
9
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
-
|
|
11
|
-
//#region components/common/video-player/video-preroll-ad.tsx
|
|
12
|
-
/**
|
|
13
|
-
* 视频前贴片广告组件。
|
|
14
|
-
* 由外层负责请求广告数据与编排展示时机。
|
|
15
|
-
*/
|
|
16
|
-
function VideoPrerollAd({ ref, adData = null, visible = false, autoStart = false, sessionKey = "default", onAutoplayBlocked, onFinish, onSkip, onOpenLink }) {
|
|
17
|
-
const adPlayerRef = useRef(null);
|
|
18
|
-
const [remainingSeconds, setRemainingSeconds] = useState(0);
|
|
19
|
-
const [adStarted, setAdStarted] = useState(false);
|
|
20
|
-
const isClient = useIsClient();
|
|
21
|
-
const autoplayAttemptedRef = useRef(false);
|
|
22
|
-
const skipSeconds = Number(adData?.settings?.skip_seconds || 0);
|
|
23
|
-
const adMaterial = useMemo(() => {
|
|
24
|
-
return adData?.materials?.[0];
|
|
25
|
-
}, [adData?.materials]);
|
|
26
|
-
const adVideoUrl = String(adMaterial?.advertise_video || "").trim();
|
|
27
|
-
const adVideoSrc = useMemo(() => {
|
|
28
|
-
if (!adVideoUrl) return "";
|
|
29
|
-
if (adVideoUrl.startsWith("/m3f")) return `${getResUrl()}/${adVideoUrl}`;
|
|
30
|
-
return `${getResUrl()}/m3f${adVideoUrl}`;
|
|
31
|
-
}, [adVideoUrl]);
|
|
32
|
-
const hasAdVideo = Boolean(adVideoUrl);
|
|
33
|
-
const hasCountdownStarted = hasAdVideo ? adStarted : visible;
|
|
34
|
-
const canSkip = remainingSeconds <= 0;
|
|
35
|
-
/**
|
|
36
|
-
* 会话切换或素材变更后,重置贴片倒计时与底层 video 播放状态。
|
|
37
|
-
*/
|
|
38
|
-
useEffect(() => {
|
|
39
|
-
setAdStarted(false);
|
|
40
|
-
setRemainingSeconds(skipSeconds);
|
|
41
|
-
autoplayAttemptedRef.current = false;
|
|
42
|
-
const player = adPlayerRef.current;
|
|
43
|
-
if (!player) return;
|
|
44
|
-
try {
|
|
45
|
-
player.pause();
|
|
46
|
-
player.currentTime = 0;
|
|
47
|
-
player.load();
|
|
48
|
-
} catch (error) {
|
|
49
|
-
console.warn("重置前贴片播放状态失败:", error);
|
|
50
|
-
}
|
|
51
|
-
}, [
|
|
52
|
-
adVideoSrc,
|
|
53
|
-
sessionKey,
|
|
54
|
-
skipSeconds
|
|
55
|
-
]);
|
|
56
|
-
useEffect(() => {
|
|
57
|
-
if (!visible || !adMaterial) return;
|
|
58
|
-
if (skipSeconds <= 0) {
|
|
59
|
-
setRemainingSeconds(0);
|
|
60
|
-
return;
|
|
61
|
-
}
|
|
62
|
-
if (!hasCountdownStarted) return;
|
|
63
|
-
const timer = window.setInterval(() => {
|
|
64
|
-
setRemainingSeconds((currentSeconds) => {
|
|
65
|
-
if (currentSeconds <= 1) {
|
|
66
|
-
window.clearInterval(timer);
|
|
67
|
-
return 0;
|
|
68
|
-
}
|
|
69
|
-
return currentSeconds - 1;
|
|
70
|
-
});
|
|
71
|
-
}, 1e3);
|
|
72
|
-
return () => {
|
|
73
|
-
window.clearInterval(timer);
|
|
74
|
-
};
|
|
75
|
-
}, [
|
|
76
|
-
adMaterial,
|
|
77
|
-
hasCountdownStarted,
|
|
78
|
-
sessionKey,
|
|
79
|
-
skipSeconds,
|
|
80
|
-
visible
|
|
81
|
-
]);
|
|
82
|
-
/**
|
|
83
|
-
* 自动播放模式下尝试直接启动贴片;若失败则交给外层切回用户手势流程。
|
|
84
|
-
*/
|
|
85
|
-
useEffect(() => {
|
|
86
|
-
if (!visible || !autoStart || !hasAdVideo || !adPlayerRef.current || autoplayAttemptedRef.current) return;
|
|
87
|
-
autoplayAttemptedRef.current = true;
|
|
88
|
-
adPlayerRef.current.play().catch((error) => {
|
|
89
|
-
console.warn("自动启动前贴片播放失败:", error);
|
|
90
|
-
onAutoplayBlocked?.();
|
|
91
|
-
});
|
|
92
|
-
}, [
|
|
93
|
-
autoStart,
|
|
94
|
-
hasAdVideo,
|
|
95
|
-
onAutoplayBlocked,
|
|
96
|
-
sessionKey,
|
|
97
|
-
visible
|
|
98
|
-
]);
|
|
99
|
-
useImperativeHandle(ref, () => ({ async play() {
|
|
100
|
-
if (!adPlayerRef.current) return false;
|
|
101
|
-
try {
|
|
102
|
-
await adPlayerRef.current.play();
|
|
103
|
-
return true;
|
|
104
|
-
} catch (error) {
|
|
105
|
-
console.warn("手动启动前贴片播放失败:", error);
|
|
106
|
-
return false;
|
|
107
|
-
}
|
|
108
|
-
} }), []);
|
|
109
|
-
/**
|
|
110
|
-
* 处理跳过广告。
|
|
111
|
-
*/
|
|
112
|
-
function handleSkip() {
|
|
113
|
-
if (!canSkip) return;
|
|
114
|
-
onSkip?.();
|
|
115
|
-
}
|
|
116
|
-
/**
|
|
117
|
-
* 广告未开始时,首次点击用于触发广告播放;开始后再允许点击跳转。
|
|
118
|
-
*/
|
|
119
|
-
function handleAdClick() {
|
|
120
|
-
if (hasAdVideo && !adStarted) {
|
|
121
|
-
const player = adPlayerRef.current;
|
|
122
|
-
if (!player) return;
|
|
123
|
-
player.play().catch((error) => {
|
|
124
|
-
console.warn("手动启动前贴片播放失败:", error);
|
|
125
|
-
});
|
|
126
|
-
return;
|
|
127
|
-
}
|
|
128
|
-
const advertiseUrl = adMaterial?.advertise_url;
|
|
129
|
-
if (!advertiseUrl) return;
|
|
130
|
-
onOpenLink?.(advertiseUrl);
|
|
131
|
-
window.open(advertiseUrl, "_blank", "noopener,noreferrer");
|
|
132
|
-
}
|
|
133
|
-
if (!isClient || typeof window === "undefined" || !adData?.hit || !adMaterial || !hasAdVideo) return null;
|
|
134
|
-
const adContent = /* @__PURE__ */ jsx("video", {
|
|
135
|
-
ref: adPlayerRef,
|
|
136
|
-
src: adVideoSrc,
|
|
137
|
-
poster: adMaterial?.advertise_icon || "",
|
|
138
|
-
className: "pointer-events-none w-full h-full object-cover bg-black",
|
|
139
|
-
autoPlay: autoStart,
|
|
140
|
-
muted: true,
|
|
141
|
-
playsInline: true,
|
|
142
|
-
preload: "none",
|
|
143
|
-
onEnded: () => {
|
|
144
|
-
onFinish?.();
|
|
145
|
-
},
|
|
146
|
-
onPlaying: () => {
|
|
147
|
-
setAdStarted(true);
|
|
148
|
-
},
|
|
149
|
-
onError: (event) => {
|
|
150
|
-
console.warn("[video-preroll-ad][error]", {
|
|
151
|
-
sessionKey,
|
|
152
|
-
error: event.currentTarget?.error
|
|
153
|
-
});
|
|
154
|
-
}
|
|
155
|
-
});
|
|
156
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
157
|
-
className: `video-preroll-ad absolute top-0 left-0 w-full h-full z-[9999] ${visible ? "" : "pointer-events-none opacity-0"}`,
|
|
158
|
-
"aria-hidden": !visible,
|
|
159
|
-
children: [/* @__PURE__ */ jsx("button", {
|
|
160
|
-
type: "button",
|
|
161
|
-
disabled: !canSkip,
|
|
162
|
-
onClick: handleSkip,
|
|
163
|
-
className: "absolute z-[10] text-sm top-6 right-6 bg-black/30 text-white rounded-full px-6 py-1.5 flex items-center justify-center disabled:opacity-60 disabled:cursor-not-allowed",
|
|
164
|
-
children: canSkip ? /* @__PURE__ */ jsx(PrerollSkipButtonContent, { label: "跳过" }) : `跳过 ${remainingSeconds}s`
|
|
165
|
-
}), /* @__PURE__ */ jsxs("div", {
|
|
166
|
-
role: "button",
|
|
167
|
-
tabIndex: 0,
|
|
168
|
-
onClick: handleAdClick,
|
|
169
|
-
className: "relative block w-full h-full",
|
|
170
|
-
onKeyDown: (event) => {
|
|
171
|
-
if (event.key === "Enter" || event.key === " ") {
|
|
172
|
-
event.preventDefault();
|
|
173
|
-
handleAdClick();
|
|
174
|
-
}
|
|
175
|
-
},
|
|
176
|
-
children: [adContent, hasAdVideo && !adStarted && /* @__PURE__ */ jsx("div", {
|
|
177
|
-
className: "absolute inset-0 z-[2] flex items-center justify-center bg-black/20 pointer-events-none",
|
|
178
|
-
children: /* @__PURE__ */ jsx("div", {
|
|
179
|
-
className: "flex items-center justify-center w-12 h-12 rounded-full bg-[rgba(0,0,0,0.45)]",
|
|
180
|
-
children: /* @__PURE__ */ jsx(SvgVideoPlay, { className: "w-[16px] h-[22px] text-white" })
|
|
181
|
-
})
|
|
182
|
-
})]
|
|
183
|
-
})]
|
|
184
|
-
});
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
//#endregion
|
|
188
|
-
export { VideoPrerollAd };
|
|
2
|
+
"use client";import e from"../../../utils/get-res-url.mjs";import{useIsClient as t}from"../../../hooks/use-is-client.mjs";import n from"../../../assets/icons/detail/video_play.mjs";import{PrerollSkipButtonContent as r}from"./preroll-skip-button-content.mjs";import{useEffect as i,useImperativeHandle as a,useMemo as o,useRef as s,useState as c}from"react";import{jsx as l,jsxs as u}from"react/jsx-runtime";function d({ref:d,adData:f=null,visible:p=!1,autoStart:m=!1,sessionKey:h=`default`,onAutoplayBlocked:g,onFinish:_,onSkip:v,onOpenLink:y}){let b=s(null),[x,S]=c(0),[C,w]=c(!1),T=t(),E=s(!1),D=Number(f?.settings?.skip_seconds||0),O=o(()=>f?.materials?.[0],[f?.materials]),k=String(O?.advertise_video||``).trim(),A=o(()=>k?k.startsWith(`/m3f`)?`${e()}/${k}`:`${e()}/m3f${k}`:``,[k]),j=!!k,M=j?C:p,N=x<=0;i(()=>{w(!1),S(D),E.current=!1;let e=b.current;if(e)try{e.pause(),e.currentTime=0,e.load()}catch(e){console.warn(`重置前贴片播放状态失败:`,e)}},[A,h,D]),i(()=>{if(!p||!O)return;if(D<=0){S(0);return}if(!M)return;let e=window.setInterval(()=>{S(t=>t<=1?(window.clearInterval(e),0):t-1)},1e3);return()=>{window.clearInterval(e)}},[O,M,h,D,p]),i(()=>{!p||!m||!j||!b.current||E.current||(E.current=!0,b.current.play().catch(e=>{console.warn(`自动启动前贴片播放失败:`,e),g?.()}))},[m,j,g,h,p]),a(d,()=>({async play(){if(!b.current)return!1;try{return await b.current.play(),!0}catch(e){return console.warn(`手动启动前贴片播放失败:`,e),!1}}}),[]);function P(){N&&v?.()}function F(){if(j&&!C){let e=b.current;if(!e)return;e.play().catch(e=>{console.warn(`手动启动前贴片播放失败:`,e)});return}let e=O?.advertise_url;e&&(y?.(e),window.open(e,`_blank`,`noopener,noreferrer`))}if(!T||typeof window>`u`||!f?.hit||!O||!j)return null;let I=l(`video`,{ref:b,src:A,poster:O?.advertise_icon||``,className:`pointer-events-none w-full h-full object-cover bg-black`,autoPlay:m,muted:!0,playsInline:!0,preload:`none`,onEnded:()=>{_?.()},onPlaying:()=>{w(!0)},onError:e=>{console.warn(`[video-preroll-ad][error]`,{sessionKey:h,error:e.currentTarget?.error})}});return u(`div`,{className:`video-preroll-ad absolute top-0 left-0 w-full h-full z-[9999] ${p?``:`pointer-events-none opacity-0`}`,"aria-hidden":!p,children:[l(`button`,{type:`button`,disabled:!N,onClick:P,className:`absolute z-[10] text-sm top-6 right-6 bg-black/30 text-white rounded-full px-6 py-1.5 flex items-center justify-center disabled:opacity-60 disabled:cursor-not-allowed`,children:N?l(r,{label:`跳过`}):`跳过 ${x}s`}),u(`div`,{role:`button`,tabIndex:0,onClick:F,className:`relative block w-full h-full`,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),F())},children:[I,j&&!C&&l(`div`,{className:`absolute inset-0 z-[2] flex items-center justify-center bg-black/20 pointer-events-none`,children:l(`div`,{className:`flex items-center justify-center w-12 h-12 rounded-full bg-[rgba(0,0,0,0.45)]`,children:l(n,{className:`w-[16px] h-[22px] text-white`})})})]})]})}export{d as VideoPrerollAd};
|
|
@@ -1,120 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import eventBus from "../../utils/event-bus.mjs";
|
|
5
|
-
import { eventKey } from "../../constants/event-key.mjs";
|
|
6
|
-
import { useEffect, useRef, useState } from "react";
|
|
7
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
-
|
|
9
|
-
//#region components/common/wait-loading.tsx
|
|
10
|
-
const MAX_AUTO_PROGRESS = 95;
|
|
11
|
-
const PROGRESS_FULL_TIME = 5;
|
|
12
|
-
/**
|
|
13
|
-
* 规范化进度数值,支持 [0,1] 或 [0,100] 输入。
|
|
14
|
-
* @param value 进度值
|
|
15
|
-
* @returns 百分比进度
|
|
16
|
-
*/
|
|
17
|
-
function normalizeProgress(value) {
|
|
18
|
-
if (!Number.isFinite(value)) return 0;
|
|
19
|
-
const ratio = value > 1 ? value / 100 : value;
|
|
20
|
-
return Math.max(0, Math.min(100, ratio * 100));
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* 全局上传等待提示(迁移自旧项目 wait-loading)。
|
|
24
|
-
* @returns 组件渲染结果
|
|
25
|
-
*/
|
|
26
|
-
function WaitLoading(props) {
|
|
27
|
-
const { className } = props;
|
|
28
|
-
const [visible, setVisible] = useState(false);
|
|
29
|
-
const [tipText, setTipText] = useState("上传中");
|
|
30
|
-
const [progress, setProgress] = useState(0);
|
|
31
|
-
const progressTimerRef = useRef(null);
|
|
32
|
-
useEffect(() => {
|
|
33
|
-
/**
|
|
34
|
-
* 清理自动进度定时器。
|
|
35
|
-
*/
|
|
36
|
-
function clearProgressTimer() {
|
|
37
|
-
if (progressTimerRef.current === null) return;
|
|
38
|
-
window.clearInterval(progressTimerRef.current);
|
|
39
|
-
progressTimerRef.current = null;
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* 启动自动进度动画(保持旧项目的 5 秒填充逻辑)。
|
|
43
|
-
*/
|
|
44
|
-
function startAutoProgress() {
|
|
45
|
-
clearProgressTimer();
|
|
46
|
-
progressTimerRef.current = window.setInterval(() => {
|
|
47
|
-
setProgress((prev) => {
|
|
48
|
-
if (prev >= MAX_AUTO_PROGRESS) {
|
|
49
|
-
clearProgressTimer();
|
|
50
|
-
return MAX_AUTO_PROGRESS;
|
|
51
|
-
}
|
|
52
|
-
return prev + MAX_AUTO_PROGRESS / PROGRESS_FULL_TIME;
|
|
53
|
-
});
|
|
54
|
-
}, 1e3);
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* 处理全局等待弹窗事件。
|
|
58
|
-
* @param payload 弹窗控制参数
|
|
59
|
-
*/
|
|
60
|
-
function handleShow(payload = {}) {
|
|
61
|
-
const { show = false, text = "上传中", progress: nextProgress } = payload;
|
|
62
|
-
if (!show) {
|
|
63
|
-
clearProgressTimer();
|
|
64
|
-
setVisible(false);
|
|
65
|
-
setProgress(0);
|
|
66
|
-
return;
|
|
67
|
-
}
|
|
68
|
-
setVisible(true);
|
|
69
|
-
setTipText(text);
|
|
70
|
-
if (typeof nextProgress === "number") {
|
|
71
|
-
clearProgressTimer();
|
|
72
|
-
setProgress(normalizeProgress(nextProgress));
|
|
73
|
-
return;
|
|
74
|
-
}
|
|
75
|
-
setProgress(0);
|
|
76
|
-
startAutoProgress();
|
|
77
|
-
}
|
|
78
|
-
eventBus.on(eventKey.WAIT_LOADING_SHOW, handleShow);
|
|
79
|
-
return () => {
|
|
80
|
-
eventBus.off(eventKey.WAIT_LOADING_SHOW, handleShow);
|
|
81
|
-
clearProgressTimer();
|
|
82
|
-
};
|
|
83
|
-
}, []);
|
|
84
|
-
if (!visible) return null;
|
|
85
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
86
|
-
className: `fixed inset-0 z-[99999] flex items-center justify-center ${className || ""}`,
|
|
87
|
-
children: [/* @__PURE__ */ jsx("div", { className: "absolute inset-0 bg-black/0" }), /* @__PURE__ */ jsxs("div", {
|
|
88
|
-
className: "relative w-44 h-14 px-4 rounded-md bg-bg2 flex flex-col items-center justify-center",
|
|
89
|
-
children: [/* @__PURE__ */ jsx("div", {
|
|
90
|
-
className: "w-full h-2 rounded-full bg-line1/20 overflow-hidden",
|
|
91
|
-
children: /* @__PURE__ */ jsx("div", {
|
|
92
|
-
className: "h-full rounded-full bg-theme5 transition-all duration-300",
|
|
93
|
-
style: { width: `${progress}%` }
|
|
94
|
-
})
|
|
95
|
-
}), /* @__PURE__ */ jsxs("div", {
|
|
96
|
-
className: "mt-3 h-3 text-xs leading-3 text-theme5 flex items-center",
|
|
97
|
-
children: [tipText, /* @__PURE__ */ jsxs("span", {
|
|
98
|
-
className: "ml-1.5 flex items-center gap-0.5",
|
|
99
|
-
children: [
|
|
100
|
-
/* @__PURE__ */ jsx("span", {
|
|
101
|
-
className: "h-1 w-1 rounded-full bg-theme5 animate-bounce",
|
|
102
|
-
style: { animationDelay: "0ms" }
|
|
103
|
-
}),
|
|
104
|
-
/* @__PURE__ */ jsx("span", {
|
|
105
|
-
className: "h-1 w-1 rounded-full bg-theme5 animate-bounce",
|
|
106
|
-
style: { animationDelay: "150ms" }
|
|
107
|
-
}),
|
|
108
|
-
/* @__PURE__ */ jsx("span", {
|
|
109
|
-
className: "h-1 w-1 rounded-full bg-theme5 animate-bounce",
|
|
110
|
-
style: { animationDelay: "300ms" }
|
|
111
|
-
})
|
|
112
|
-
]
|
|
113
|
-
})]
|
|
114
|
-
})]
|
|
115
|
-
})]
|
|
116
|
-
});
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
//#endregion
|
|
120
|
-
export { WaitLoading };
|
|
2
|
+
"use client";import e from"../../utils/event-bus.mjs";import{eventKey as t}from"../../constants/event-key.mjs";import{useEffect as n,useRef as r,useState as i}from"react";import{jsx as a,jsxs as o}from"react/jsx-runtime";function s(e){if(!Number.isFinite(e))return 0;let t=e>1?e/100:e;return Math.max(0,Math.min(100,t*100))}function c(c){let{className:l}=c,[u,d]=i(!1),[f,p]=i(`上传中`),[m,h]=i(0),g=r(null);return n(()=>{function n(){g.current!==null&&(window.clearInterval(g.current),g.current=null)}function r(){n(),g.current=window.setInterval(()=>{h(e=>e>=95?(n(),95):e+95/5)},1e3)}function i(e={}){let{show:t=!1,text:i=`上传中`,progress:a}=e;if(!t){n(),d(!1),h(0);return}if(d(!0),p(i),typeof a==`number`){n(),h(s(a));return}h(0),r()}return e.on(t.WAIT_LOADING_SHOW,i),()=>{e.off(t.WAIT_LOADING_SHOW,i),n()}},[]),u?o(`div`,{className:`fixed inset-0 z-[99999] flex items-center justify-center ${l||``}`,children:[a(`div`,{className:`absolute inset-0 bg-black/0`}),o(`div`,{className:`relative w-44 h-14 px-4 rounded-md bg-bg2 flex flex-col items-center justify-center`,children:[a(`div`,{className:`w-full h-2 rounded-full bg-line1/20 overflow-hidden`,children:a(`div`,{className:`h-full rounded-full bg-theme5 transition-all duration-300`,style:{width:`${m}%`}})}),o(`div`,{className:`mt-3 h-3 text-xs leading-3 text-theme5 flex items-center`,children:[f,o(`span`,{className:`ml-1.5 flex items-center gap-0.5`,children:[a(`span`,{className:`h-1 w-1 rounded-full bg-theme5 animate-bounce`,style:{animationDelay:`0ms`}}),a(`span`,{className:`h-1 w-1 rounded-full bg-theme5 animate-bounce`,style:{animationDelay:`150ms`}}),a(`span`,{className:`h-1 w-1 rounded-full bg-theme5 animate-bounce`,style:{animationDelay:`300ms`}})]})]})]})]}):null}export{c as WaitLoading};
|