@funhub/platform 0.1.22 → 0.1.24
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/assets/icons/right_arrow.mjs +2 -0
- package/dist/assets/images/Frame.mjs +2 -0
- package/dist/assets/images/marquee.mjs +2 -0
- package/dist/biz.d.mts +41 -10
- package/dist/biz.mjs +1 -1
- package/dist/common.d.mts +3 -1
- package/dist/common.mjs +1 -1
- package/dist/components/biz/basics/fullscreen-feed/index.mjs +1 -1
- package/dist/components/biz/basics/fullscreen-feed/runtime/client.mjs +1 -1
- package/dist/components/biz/basics/fullscreen-feed/runtime/post-slide.mjs +1 -1
- package/dist/components/biz/basics/fullscreen-feed/runtime/use-mixed-feed-controller.mjs +1 -1
- package/dist/components/biz/basics/fullscreen-feed/runtime/use-series-feed-controller.mjs +1 -1
- package/dist/components/biz/basics/fullscreen-feed/runtime/user-action.mjs +1 -1
- package/dist/components/biz/basics/logo/variants/basic-logo/runtime/client.mjs +1 -1
- package/dist/components/biz/basics/search/shared/components/search-box.mjs +1 -1
- package/dist/components/biz/basics/search/variants/simple-search/runtime/client.mjs +1 -1
- package/dist/components/biz/business/banner/variants/basic-banner/inspector-schema.d.mts +0 -2
- package/dist/components/biz/business/banner/variants/basic-banner/inspector-schema.mjs +1 -1
- package/dist/components/biz/business/banner/variants/basic-banner/material.d.mts +0 -1
- package/dist/components/biz/business/banner/variants/basic-banner/material.mjs +1 -1
- package/dist/components/biz/business/banner/variants/basic-banner/runtime/client.mjs +1 -1
- package/dist/components/biz/business/card-grid/variants/card-grid-2x3-infinite/runtime/client.mjs +1 -1
- package/dist/components/biz/business/card-grid/variants/card-grid-3x3-infinite/runtime/client.mjs +1 -1
- package/dist/components/biz/business/channel-list/channel-filter-dialog.mjs +2 -0
- package/dist/components/biz/business/channel-list/client.d.mts +8 -0
- package/dist/components/biz/business/channel-list/client.mjs +2 -0
- package/dist/components/biz/business/channel-list/default-props.mjs +2 -0
- package/dist/components/biz/business/channel-list/material.d.mts +16 -0
- package/dist/components/biz/business/channel-list/material.mjs +2 -0
- package/dist/components/biz/business/channel-list/schema.d.mts +23 -0
- package/dist/components/biz/business/channel-list/schema.mjs +2 -0
- package/dist/components/biz/business/comment/comment-item.mjs +1 -1
- package/dist/components/biz/business/comment/comment-list.mjs +1 -1
- package/dist/components/biz/business/comment/reply-detail.mjs +1 -1
- package/dist/components/biz/business/detail/detail-follow-action.mjs +1 -1
- package/dist/components/biz/business/detail/detail-info-title.mjs +1 -1
- package/dist/components/biz/business/detail/detail-introduction.mjs +1 -1
- package/dist/components/biz/business/detail/detail-operate.mjs +1 -1
- package/dist/components/biz/business/detail/materials/registry.d.mts +35 -41
- package/dist/components/biz/business/detail/materials/registry.mjs +1 -1
- package/dist/components/biz/business/detail/materials/video-detail-actions/client.d.mts +2 -9
- package/dist/components/biz/business/detail/materials/video-detail-actions/index.d.mts +3 -3
- package/dist/components/biz/business/detail/materials/video-detail-actions/material.d.mts +9 -3
- package/dist/components/biz/business/detail/materials/video-detail-actions/schema.d.mts +7 -1
- package/dist/components/biz/business/detail/materials/video-detail-actions/server.d.mts +1 -1
- package/dist/components/biz/business/detail/materials/video-detail-info/client.d.mts +2 -13
- package/dist/components/biz/business/detail/materials/video-detail-info/index.d.mts +3 -3
- package/dist/components/biz/business/detail/materials/video-detail-info/material.d.mts +13 -3
- package/dist/components/biz/business/detail/materials/video-detail-info/schema.d.mts +9 -1
- package/dist/components/biz/business/detail/materials/video-detail-info/server.d.mts +1 -1
- package/dist/components/biz/business/detail/materials/video-detail-info-title/client.d.mts +2 -7
- package/dist/components/biz/business/detail/materials/video-detail-info-title/index.d.mts +3 -3
- package/dist/components/biz/business/detail/materials/video-detail-info-title/material.d.mts +9 -3
- package/dist/components/biz/business/detail/materials/video-detail-info-title/schema.d.mts +6 -1
- package/dist/components/biz/business/detail/materials/video-detail-info-title/server.d.mts +1 -1
- package/dist/components/biz/business/detail/materials/video-detail-info-title-tags-episodes/client.d.mts +2 -11
- package/dist/components/biz/business/detail/materials/video-detail-info-title-tags-episodes/index.d.mts +3 -3
- package/dist/components/biz/business/detail/materials/video-detail-info-title-tags-episodes/material.d.mts +13 -3
- package/dist/components/biz/business/detail/materials/video-detail-info-title-tags-episodes/schema.d.mts +8 -1
- package/dist/components/biz/business/detail/materials/video-detail-info-title-tags-episodes/server.d.mts +1 -1
- package/dist/components/biz/business/detail/materials/video-detail-player/client.d.mts +2 -11
- package/dist/components/biz/business/detail/materials/video-detail-player/index.d.mts +3 -3
- package/dist/components/biz/business/detail/materials/video-detail-player/material.d.mts +9 -3
- package/dist/components/biz/business/detail/materials/video-detail-player/schema.d.mts +8 -1
- package/dist/components/biz/business/detail/materials/video-detail-player/server.d.mts +1 -1
- package/dist/components/biz/business/detail/materials/video-detail-recommend/client.d.mts +2 -6
- package/dist/components/biz/business/detail/materials/video-detail-recommend/client.mjs +1 -1
- package/dist/components/biz/business/detail/materials/video-detail-recommend/index.d.mts +3 -3
- package/dist/components/biz/business/detail/materials/video-detail-recommend/material.d.mts +36 -3
- package/dist/components/biz/business/detail/materials/video-detail-recommend/schema.d.mts +5 -1
- package/dist/components/biz/business/detail/materials/video-detail-recommend/server.d.mts +1 -1
- package/dist/components/biz/business/detail/post-recommend-list.mjs +1 -1
- package/dist/components/biz/business/detail/video-hero.mjs +1 -1
- package/dist/components/biz/business/floating-ball/client.d.mts +12 -0
- package/dist/components/biz/business/floating-ball/client.mjs +2 -0
- package/dist/components/biz/business/floating-ball/material.d.mts +10 -0
- package/dist/components/biz/business/floating-ball/material.mjs +2 -0
- package/dist/components/biz/business/floating-ball/schema.d.mts +14 -0
- package/dist/components/biz/business/floating-ball/schema.mjs +2 -0
- package/dist/components/biz/business/floating-ball/server.mjs +2 -0
- package/dist/components/biz/business/fullscreen-feed/variants/shared/runtime-compat.mjs +1 -1
- package/dist/components/biz/business/header-search/header-avatar-icon/client.d.mts +12 -0
- package/dist/components/biz/business/header-search/header-avatar-icon/client.mjs +2 -0
- package/dist/components/biz/business/header-search/header-avatar-icon/index.d.mts +5 -0
- package/dist/components/biz/business/header-search/header-avatar-icon/material.d.mts +10 -0
- package/dist/components/biz/business/header-search/header-avatar-icon/material.mjs +2 -0
- package/dist/components/biz/business/header-search/header-avatar-icon/schema.d.mts +14 -0
- package/dist/components/biz/business/header-search/header-avatar-icon/schema.mjs +2 -0
- package/dist/components/biz/business/header-search/header-avatar-icon/server.d.mts +3 -0
- package/dist/components/biz/business/header-search/header-avatar-icon/server.mjs +2 -0
- package/dist/components/biz/business/header-search/header-avatar-logo-search/client.d.mts +12 -0
- package/dist/components/biz/business/header-search/header-avatar-logo-search/client.mjs +2 -0
- package/dist/components/biz/business/header-search/header-avatar-logo-search/index.d.mts +5 -0
- package/dist/components/biz/business/header-search/header-avatar-logo-search/material.d.mts +10 -0
- package/dist/components/biz/business/header-search/header-avatar-logo-search/material.mjs +2 -0
- package/dist/components/biz/business/header-search/header-avatar-logo-search/schema.d.mts +14 -0
- package/dist/components/biz/business/header-search/header-avatar-logo-search/schema.mjs +2 -0
- package/dist/components/biz/business/header-search/header-avatar-logo-search/server.d.mts +3 -0
- package/dist/components/biz/business/header-search/header-avatar-logo-search/server.mjs +2 -0
- package/dist/components/biz/business/header-search/header-avatar-logo-search-icon/client.d.mts +12 -0
- package/dist/components/biz/business/header-search/header-avatar-logo-search-icon/client.mjs +2 -0
- package/dist/components/biz/business/header-search/header-avatar-logo-search-icon/index.d.mts +5 -0
- package/dist/components/biz/business/header-search/header-avatar-logo-search-icon/material.d.mts +10 -0
- package/dist/components/biz/business/header-search/header-avatar-logo-search-icon/material.mjs +2 -0
- package/dist/components/biz/business/header-search/header-avatar-logo-search-icon/schema.d.mts +14 -0
- package/dist/components/biz/business/header-search/header-avatar-logo-search-icon/schema.mjs +2 -0
- package/dist/components/biz/business/header-search/header-avatar-logo-search-icon/server.d.mts +3 -0
- package/dist/components/biz/business/header-search/header-avatar-logo-search-icon/server.mjs +2 -0
- package/dist/components/biz/business/header-search/header-logo-search/client.d.mts +12 -0
- package/dist/components/biz/business/header-search/header-logo-search/client.mjs +2 -0
- package/dist/components/biz/business/header-search/header-logo-search/index.d.mts +5 -0
- package/dist/components/biz/business/header-search/header-logo-search/material.d.mts +10 -0
- package/dist/components/biz/business/header-search/header-logo-search/material.mjs +2 -0
- package/dist/components/biz/business/header-search/header-logo-search/schema.d.mts +14 -0
- package/dist/components/biz/business/header-search/header-logo-search/schema.mjs +2 -0
- package/dist/components/biz/business/header-search/header-logo-search/server.d.mts +3 -0
- package/dist/components/biz/business/header-search/header-logo-search/server.mjs +2 -0
- package/dist/components/biz/business/header-search/header-search/client.d.mts +12 -0
- package/dist/components/biz/business/header-search/header-search/client.mjs +2 -0
- package/dist/components/biz/business/header-search/header-search/index.d.mts +5 -0
- package/dist/components/biz/business/header-search/header-search/material.d.mts +10 -0
- package/dist/components/biz/business/header-search/header-search/material.mjs +2 -0
- package/dist/components/biz/business/header-search/header-search/schema.d.mts +14 -0
- package/dist/components/biz/business/header-search/header-search/schema.mjs +2 -0
- package/dist/components/biz/business/header-search/header-search/server.d.mts +3 -0
- package/dist/components/biz/business/header-search/header-search/server.mjs +2 -0
- package/dist/components/biz/business/header-search/index.d.mts +11 -0
- package/dist/components/biz/business/home-recommend/index.d.mts +9 -0
- package/dist/components/biz/business/home-recommend/shared/home-recommend-base.mjs +2 -0
- package/dist/components/biz/business/home-recommend/types.d.mts +25 -0
- package/dist/components/biz/business/home-recommend/variants/home-recommend-grid/defaults/default-props.d.mts +10 -0
- package/dist/components/biz/business/home-recommend/variants/home-recommend-grid/defaults/default-props.mjs +2 -0
- package/dist/components/biz/business/home-recommend/variants/home-recommend-grid/index.d.mts +4 -0
- package/dist/components/biz/business/home-recommend/variants/home-recommend-grid/index.mjs +2 -0
- package/dist/components/biz/business/home-recommend/variants/home-recommend-grid/runtime/client.d.mts +13 -0
- package/dist/components/biz/business/home-recommend/variants/home-recommend-grid/runtime/client.mjs +2 -0
- package/dist/components/biz/business/home-recommend/variants/home-recommend-grid/schema/component.mjs +2 -0
- package/dist/components/biz/business/home-recommend/variants/home-recommend-grid/schema/data.schema.mjs +2 -0
- package/dist/components/biz/business/home-recommend/variants/home-recommend-grid/schema/event.schema.mjs +2 -0
- package/dist/components/biz/business/home-recommend/variants/home-recommend-grid/schema/index.d.mts +8 -0
- package/dist/components/biz/business/home-recommend/variants/home-recommend-grid/schema/index.mjs +2 -0
- package/dist/components/biz/business/home-recommend/variants/home-recommend-grid/schema/props.schema.mjs +2 -0
- package/dist/components/biz/business/home-recommend/variants/home-recommend-grid/schema/style.schema.mjs +2 -0
- package/dist/components/biz/business/home-recommend/variants/home-recommend-waterfall/defaults/default-props.d.mts +10 -0
- package/dist/components/biz/business/home-recommend/variants/home-recommend-waterfall/defaults/default-props.mjs +2 -0
- package/dist/components/biz/business/home-recommend/variants/home-recommend-waterfall/index.d.mts +4 -0
- package/dist/components/biz/business/home-recommend/variants/home-recommend-waterfall/index.mjs +2 -0
- package/dist/components/biz/business/home-recommend/variants/home-recommend-waterfall/runtime/client.d.mts +13 -0
- package/dist/components/biz/business/home-recommend/variants/home-recommend-waterfall/runtime/client.mjs +2 -0
- package/dist/components/biz/business/home-recommend/variants/home-recommend-waterfall/schema/component.mjs +2 -0
- package/dist/components/biz/business/home-recommend/variants/home-recommend-waterfall/schema/data.schema.mjs +2 -0
- package/dist/components/biz/business/home-recommend/variants/home-recommend-waterfall/schema/event.schema.mjs +2 -0
- package/dist/components/biz/business/home-recommend/variants/home-recommend-waterfall/schema/index.d.mts +8 -0
- package/dist/components/biz/business/home-recommend/variants/home-recommend-waterfall/schema/index.mjs +2 -0
- package/dist/components/biz/business/home-recommend/variants/home-recommend-waterfall/schema/props.schema.mjs +2 -0
- package/dist/components/biz/business/home-recommend/variants/home-recommend-waterfall/schema/style.schema.mjs +2 -0
- package/dist/components/biz/business/index.d.mts +52 -15
- package/dist/components/biz/business/index.mjs +1 -1
- package/dist/components/biz/business/large-feature-grid/client.d.mts +12 -0
- package/dist/components/biz/business/large-feature-grid/client.mjs +2 -0
- package/dist/components/biz/business/large-feature-grid/material.d.mts +10 -0
- package/dist/components/biz/business/large-feature-grid/material.mjs +2 -0
- package/dist/components/biz/business/large-feature-grid/schema.d.mts +14 -0
- package/dist/components/biz/business/large-feature-grid/schema.mjs +2 -0
- package/dist/components/biz/business/large-feature-grid/server.mjs +2 -0
- package/dist/components/biz/business/marquee/client.d.mts +16 -0
- package/dist/components/biz/business/marquee/client.mjs +2 -0
- package/dist/components/biz/business/marquee/index.d.mts +5 -0
- package/dist/components/biz/business/marquee/material.d.mts +24 -0
- package/dist/components/biz/business/marquee/material.mjs +2 -0
- package/dist/components/biz/business/marquee/schema.d.mts +33 -0
- package/dist/components/biz/business/marquee/schema.mjs +2 -0
- package/dist/components/biz/business/marquee/server.d.mts +11 -0
- package/dist/components/biz/business/marquee/server.mjs +2 -0
- package/dist/components/biz/business/nav-bar/variants/basic-nav-bar/runtime/client.mjs +1 -1
- package/dist/components/biz/business/profile/profile-header/material.d.mts +9 -0
- package/dist/components/biz/business/profile/profile-header/material.mjs +2 -0
- package/dist/components/biz/business/profile/profile-main/material.d.mts +9 -0
- package/dist/components/biz/business/profile/profile-main/material.mjs +2 -0
- package/dist/components/biz/business/recommended-users/variants/basic-recommended-users/runtime/client.mjs +1 -1
- package/dist/components/biz/business/search-bar/variants/detail-search-bar/runtime/client.mjs +1 -1
- package/dist/components/biz/business/search-history/use-search-history.mjs +1 -1
- package/dist/components/biz/business/search-history2/client.d.mts +21 -0
- package/dist/components/biz/business/search-history2/client.mjs +2 -0
- package/dist/components/biz/business/search-history2/index.d.mts +5 -0
- package/dist/components/biz/business/search-history2/material.d.mts +15 -0
- package/dist/components/biz/business/search-history2/material.mjs +2 -0
- package/dist/components/biz/business/search-history2/schema.d.mts +21 -0
- package/dist/components/biz/business/search-history2/schema.mjs +2 -0
- package/dist/components/biz/business/search-history2/server.d.mts +11 -0
- package/dist/components/biz/business/search-history2/server.mjs +2 -0
- package/dist/components/biz/business/search-input/client.d.mts +19 -0
- package/dist/components/biz/business/search-input/client.mjs +2 -0
- package/dist/components/biz/business/search-input/index.d.mts +5 -0
- package/dist/components/biz/business/search-input/material.d.mts +14 -0
- package/dist/components/biz/business/search-input/material.mjs +2 -0
- package/dist/components/biz/business/search-input/schema.d.mts +19 -0
- package/dist/components/biz/business/search-input/schema.mjs +2 -0
- package/dist/components/biz/business/search-input/server.d.mts +11 -0
- package/dist/components/biz/business/search-input/server.mjs +2 -0
- package/dist/components/biz/business/shortcut-grid/client.d.mts +12 -0
- package/dist/components/biz/business/shortcut-grid/client.mjs +2 -0
- package/dist/components/biz/business/shortcut-grid/material.d.mts +10 -0
- package/dist/components/biz/business/shortcut-grid/material.mjs +2 -0
- package/dist/components/biz/business/shortcut-grid/schema.d.mts +14 -0
- package/dist/components/biz/business/shortcut-grid/schema.mjs +2 -0
- package/dist/components/biz/business/shortcut-grid/server.mjs +2 -0
- package/dist/components/biz/business/tab-bar/client.d.mts +13 -0
- package/dist/components/biz/business/tab-bar/client.mjs +2 -0
- package/dist/components/biz/business/tab-bar/index.d.mts +5 -0
- package/dist/components/biz/business/tab-bar/material.d.mts +21 -0
- package/dist/components/biz/business/tab-bar/material.mjs +2 -0
- package/dist/components/biz/business/tab-bar/schema.d.mts +27 -0
- package/dist/components/biz/business/tab-bar/schema.mjs +2 -0
- package/dist/components/biz/business/tab-bar/server.d.mts +11 -0
- package/dist/components/biz/business/tab-bar/server.mjs +2 -0
- package/dist/components/biz/business/text-recommend/client.d.mts +22 -0
- package/dist/components/biz/business/text-recommend/client.mjs +2 -0
- package/dist/components/biz/business/text-recommend/index.d.mts +5 -0
- package/dist/components/biz/business/text-recommend/material.d.mts +15 -0
- package/dist/components/biz/business/text-recommend/material.mjs +2 -0
- package/dist/components/biz/business/text-recommend/schema.d.mts +21 -0
- package/dist/components/biz/business/text-recommend/schema.mjs +2 -0
- package/dist/components/biz/business/text-recommend/server.d.mts +12 -0
- package/dist/components/biz/business/text-recommend/server.mjs +2 -0
- package/dist/components/biz/business/video-horizontal-list/client.d.mts +25 -0
- package/dist/components/biz/business/video-horizontal-list/client.mjs +2 -0
- package/dist/components/biz/business/video-horizontal-list/index.d.mts +5 -0
- package/dist/components/biz/business/video-horizontal-list/material.d.mts +18 -0
- package/dist/components/biz/business/video-horizontal-list/material.mjs +2 -0
- package/dist/components/biz/business/video-horizontal-list/schema.d.mts +21 -0
- package/dist/components/biz/business/video-horizontal-list/schema.mjs +2 -0
- package/dist/components/biz/business/video-horizontal-list/server.d.mts +12 -0
- package/dist/components/biz/business/video-horizontal-list/server.mjs +2 -0
- package/dist/components/biz/example/button/client.mjs +1 -1
- package/dist/components/biz/renderer/renderer.d.mts +3 -2
- package/dist/components/biz/renderer/renderer.mjs +1 -1
- package/dist/components/biz/utils/helpers/get-channel-list.d.mts +20 -0
- package/dist/components/biz/utils/helpers/get-channel-list.mjs +2 -0
- package/dist/components/biz/utils/index.d.mts +5 -4
- package/dist/components/biz/utils/schema/component.d.mts +1 -1
- package/dist/components/biz/utils/transformers/data.d.mts +3 -0
- package/dist/components/biz/utils/transformers/data.mjs +1 -1
- package/dist/components/common/at-element/index.mjs +1 -1
- package/dist/components/common/blocked-dialog/blocked-dialog.d.mts +10 -0
- package/dist/components/common/blocked-dialog/blocked-dialog.mjs +2 -0
- package/dist/components/common/blocked-dialog/index.d.mts +2 -0
- package/dist/components/common/collection-popup/collection-create-modal.mjs +1 -1
- package/dist/components/common/delete-confirm-dialog/delete-confirm-dialog.mjs +1 -1
- package/dist/components/common/follow-button/index.mjs +1 -1
- package/dist/components/common/funhub-provider/funhub-provider.mjs +1 -1
- package/dist/components/common/header-nav/client.mjs +1 -1
- package/dist/components/common/icons/video.mjs +2 -0
- package/dist/components/common/info-card/card-header.mjs +1 -1
- package/dist/components/common/list/post-list/post-list.mjs +1 -1
- package/dist/components/common/list/user-activity-list/user-activity-list-actions.mjs +1 -1
- package/dist/components/common/list/user-activity-list/user-activity-list-item.mjs +1 -1
- package/dist/components/common/list/video-list/video-list-item.d.mts +1 -1
- package/dist/components/common/list/video-list/video-list-item.mjs +1 -1
- package/dist/components/common/list/video-list/video-list.mjs +1 -1
- package/dist/components/common/photo-grid/index.mjs +1 -1
- package/dist/components/common/popup-video/index.mjs +1 -1
- package/dist/components/common/series-episodes/index.mjs +1 -1
- package/dist/components/common/share-popup/share-popup.mjs +1 -1
- package/dist/components/common/tab-bar/index.mjs +1 -1
- package/dist/components/common/top-nav-bar/client.mjs +1 -1
- package/dist/components/common/top-nav-bar/index.mjs +1 -1
- package/dist/components/common/video-player/index.mjs +2 -2
- package/dist/components/pages/(follow)/_components/follow-button/index.mjs +1 -1
- package/dist/components/pages/(follow)/_components/interaction-tabs/index.mjs +1 -1
- package/dist/components/pages/(follow)/_components/user-list/index.mjs +1 -1
- package/dist/components/pages/(follow)/fans/page.mjs +1 -1
- package/dist/components/pages/(follow)/followed/page.mjs +1 -1
- package/dist/components/pages/collection-create/form.mjs +1 -1
- package/dist/components/pages/collection-detail/detail.mjs +1 -1
- package/dist/components/pages/feed-series/feed-series-client.mjs +1 -1
- package/dist/components/pages/feed-series/page.mjs +1 -1
- package/dist/components/pages/feedback/_components/feedback-form.mjs +1 -1
- package/dist/components/pages/fullscreen-feed/page.mjs +1 -1
- package/dist/components/pages/home/client.mjs +1 -1
- package/dist/components/pages/home/index.mjs +1 -1
- package/dist/components/pages/login/index.mjs +1 -1
- package/dist/components/pages/post-detail/post-detail-client.mjs +1 -1
- package/dist/components/pages/profile/_components/tabs/collect-tab/client.mjs +1 -1
- package/dist/components/pages/profile/_components/tabs/collect-tab/server.mjs +1 -1
- package/dist/components/pages/profile/_components/tabs/history-tab/client.mjs +1 -1
- package/dist/components/pages/profile/_components/tabs/like-tab/client.mjs +1 -1
- package/dist/components/pages/profile/_components/tabs/publish-tab/client.mjs +1 -1
- package/dist/components/pages/profile/_components/user-profile-container/client.mjs +1 -1
- package/dist/components/pages/profile/_components/user-profile-header/client.mjs +1 -1
- package/dist/components/pages/profile/utils.mjs +1 -1
- package/dist/components/pages/publish/components/collection-popup.mjs +1 -1
- package/dist/components/pages/publish/components/collection.mjs +1 -1
- package/dist/components/pages/publish/components/header.mjs +1 -1
- package/dist/components/pages/publish/page-client.mjs +1 -1
- package/dist/components/pages/search/hot-recommend.mjs +1 -1
- package/dist/components/pages/search/page-client.mjs +1 -1
- package/dist/components/pages/search/search-result/search-all.mjs +1 -1
- package/dist/components/pages/search/search-result/search-video-info.mjs +1 -1
- package/dist/components/pages/search/top-header.mjs +1 -1
- package/dist/components/pages/settings/_components/settings.mjs +1 -1
- package/dist/components/pages/user-follow/_components/follow-top-header.mjs +1 -1
- package/dist/components/pages/user-follow/page.mjs +1 -1
- package/dist/components/pages/video-detail/page.mjs +1 -1
- package/dist/components/pages/video-detail/video-detail-client.mjs +1 -1
- package/dist/components/pages/video-list/index.d.mts +16 -0
- package/dist/components/pages/video-list/index.mjs +2 -0
- package/dist/components/pages/video-list/types.mjs +2 -0
- package/dist/components/pages/video-list/video-list-client.mjs +2 -0
- package/dist/components/pages/video-list/video-list-item.mjs +2 -0
- package/dist/components/ui/badge.d.mts +1 -1
- package/dist/components/ui/button.d.mts +1 -1
- package/dist/components/ui/image.d.mts +4 -4
- package/dist/hooks/use-content-operate.mjs +1 -1
- package/dist/hooks.mjs +1 -1
- package/dist/i18n/locales/en.mjs +3 -1
- package/dist/i18n/locales/zh-CN.mjs +3 -1
- package/dist/i18n.d.mts +1 -1
- package/dist/i18n.mjs +1 -1
- package/dist/materials.d.mts +25 -1
- package/dist/materials.mjs +1 -1
- package/dist/pages.d.mts +2 -1
- package/dist/pages.mjs +1 -1
- package/dist/service/generated/client.d.mts +28 -12
- package/dist/service/generated/client.mjs +1 -1
- package/dist/service/generated/tanstack.d.mts +34 -14
- package/dist/service/generated/tanstack.mjs +1 -1
- package/dist/service.d.mts +3 -3
- package/dist/service.mjs +1 -1
- package/dist/store/create-store.mjs +1 -1
- package/dist/store/modules/blocked-modal-store.d.mts +26 -0
- package/dist/store/modules/blocked-modal-store.mjs +2 -0
- package/dist/store/modules/user-store.d.mts +1 -1
- package/dist/store/modules/user-store.mjs +1 -1
- package/dist/store.d.mts +2 -1
- package/dist/store.mjs +1 -1
- package/dist/types.d.mts +1348 -129
- package/dist/utils/http.mjs +1 -1
- package/dist/utils/schema/index.d.mts +1 -1
- package/dist/utils/schema/material.d.mts +6 -1
- package/dist/utils/schema/utils.d.mts +1 -1
- package/dist/utils/share-manager.mjs +1 -1
- package/dist/utils.d.mts +5 -5
- package/dist/utils.mjs +1 -1
- package/package.json +1 -1
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
|
|
2
2
|
import { CARD_SPEC_MAP, CardSpec, getCardSpecConfig } from "./constants/card-spec.mjs";
|
|
3
|
+
import { ChannelDataItem } from "./types/channel.mjs";
|
|
4
|
+
import { CommonStyleSchema, StylePropDefinition, StyleSchema } from "./schema/style.mjs";
|
|
5
|
+
import { BaseComponentProps } from "./types/component.mjs";
|
|
6
|
+
import { getChannelList } from "./helpers/get-channel-list.mjs";
|
|
3
7
|
import { buildContentUrl } from "./helpers/url.mjs";
|
|
4
8
|
import { FieldSchema, FieldType } from "./schema/field.mjs";
|
|
5
9
|
import { DataBinding, DataBindingField, DataBindingSourceType, DataBindingUIMode, DataSchema, DataSlot, DataSourceType } from "./schema/data.mjs";
|
|
6
10
|
import { PropDefinition, PropSchema } from "./schema/prop.mjs";
|
|
7
11
|
import { EventDefinition, EventSchema } from "./schema/event.mjs";
|
|
8
|
-
import { CommonStyleSchema, StylePropDefinition, StyleSchema } from "./schema/style.mjs";
|
|
9
12
|
import { ComponentMaterial, ComponentSchema, MaterialRegistry } from "./schema/component.mjs";
|
|
10
13
|
import { commonStylesToInline, customStylesToInline, mergeStyles } from "./styles/helpers.mjs";
|
|
11
14
|
import { commonStyleSchema } from "./styles/schema.mjs";
|
|
12
15
|
import { CardCornerMode, RawContentData, transformContentListToCardItems, transformContentToCardItem } from "./transformers/card-grid.mjs";
|
|
13
16
|
import { ComponentType, ContentBlockItem, ExtractedDataItem, extractDataByComponentType } from "./transformers/data.mjs";
|
|
14
|
-
import "./transformers/index.mjs";
|
|
15
|
-
import { ChannelDataItem } from "./types/channel.mjs";
|
|
16
|
-
import { BaseComponentProps } from "./types/component.mjs";
|
|
17
|
+
import "./transformers/index.mjs";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
|
+
import { StyleSchema } from "./style.mjs";
|
|
2
3
|
import { DataSchema } from "./data.mjs";
|
|
3
4
|
import { PropSchema } from "./prop.mjs";
|
|
4
5
|
import { EventSchema } from "./event.mjs";
|
|
5
|
-
import { StyleSchema } from "./style.mjs";
|
|
6
6
|
|
|
7
7
|
//#region components/biz/utils/schema/component.d.ts
|
|
8
8
|
/**
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
import{business_exports as e}from"../../business/index.mjs";let t=function(e){return e[e.Banner=1]=`Banner`,e[e.CardGrid=2]=`CardGrid`,e[e.FeatureGrid=3]=`FeatureGrid`,e[e.RecommendedUsers=4]=`RecommendedUsers`,e}({});const n={[t.Banner]:{schemaName:`BasicBannerSchema`,componentName:`BasicBanner`},[t.FeatureGrid]:{schemaName:`BasicFeatureGridSchema`,componentName:`BasicFeatureGrid`},[t.RecommendedUsers]:{schemaName:`BasicRecommendedUsersSchema`,componentName:`BasicRecommendedUsers`}},r={1:{schemaName:`
|
|
2
|
+
import{business_exports as e}from"../../business/index.mjs";let t=function(e){return e[e.Banner=1]=`Banner`,e[e.CardGrid=2]=`CardGrid`,e[e.FeatureGrid=3]=`FeatureGrid`,e[e.RecommendedUsers=4]=`RecommendedUsers`,e}({});const n={[t.Banner]:{schemaName:`BasicBannerSchema`,componentName:`BasicBanner`},[t.FeatureGrid]:{schemaName:`BasicFeatureGridSchema`,componentName:`BasicFeatureGrid`},[t.RecommendedUsers]:{schemaName:`BasicRecommendedUsersSchema`,componentName:`BasicRecommendedUsers`}},r={1:{schemaName:`HomeRecommendGridSchema`,componentName:`HomeRecommendGrid`},2:{schemaName:`HomeRecommendWaterfallSchema`,componentName:`HomeRecommendWaterfall`},3:{schemaName:`HomeRecommendGridSchema`,componentName:`HomeRecommendGrid`},4:{schemaName:`HomeRecommendGridSchema`,componentName:`HomeRecommendGrid`},5:{schemaName:`HomeRecommendWaterfallSchema`,componentName:`HomeRecommendWaterfall`},6:{schemaName:`FullscreenVideoFeedSchema`,componentName:`FullscreenVideoClient`}},i={schemaName:`HomeRecommendGridSchema`,componentName:`HomeRecommendGrid`},a={6:{schemaName:`FullscreenPostFeedSchema`,componentName:`FullscreenFeedClient`}},o={schemaName:`BasicPostCardSchema`,componentName:`BasicPostCard`};function s(){let t={};for(let n of Object.keys(e)){if(!n.endsWith(`Schema`))continue;let r=e[n];r&&typeof r==`object`&&`dataSchema`in r&&(t[n]=r)}return t}function c(){let t={};for(let n of Object.keys(e)){if(n.endsWith(`Schema`)||n.endsWith(`DefaultData`))continue;let r=e[n];typeof r==`function`&&(t[n]=r)}return t}const l=s(),u=c();function d(e,s){return e.type===t.CardGrid?s?r[e.show_style]??i:a[e.show_style]??o:n[e.type]}function f(e,t){let n=d(e,t),r=l[n.schemaName];if(!r)return console.warn(`[extractDataByComponentType] 未找到 Schema: ${n.schemaName}`),null;let i=u[n.componentName];if(!i)return console.warn(`[extractDataByComponentType] 未找到组件: ${n.componentName}`),null;let a=r.dataSchema?.dataBinding?.field;if(!a)return console.warn(`[extractDataByComponentType] Schema ${n.schemaName} 缺少 dataBinding.field`),null;let o=e.data?.[a],s=Array.isArray(o)?o:[],c={component:i,data:{title:e.cn_name,list:s,icons:e.data?.icons??[],block_id:String(e.id??``),channel_id:String(e.channel_id??``),show_style:e.show_style}};return e.data?.cursor&&(c.data.cursor=String(e.data?.cursor??``)),e.show_style===6&&(c.data.bottom=56,c.data.top=42),c}function p(e,t){return!Array.isArray(e)||e.length===0?[]:e.map(e=>f(e,t)).filter(e=>e!==null)}export{t as ComponentType,p as extractDataByComponentType};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{replaceAtUserElementHtmlStr as e}from"../../../utils/tools.mjs";import{
|
|
2
|
+
"use client";import{replaceAtUserElementHtmlStr as e}from"../../../utils/tools.mjs";import{useRouter as t}from"next/navigation";import{Fragment as n,jsx as r}from"react/jsx-runtime";import i from"html-react-parser";const a=[];function o(o){let{text:s=``,atUsers:c=a,enableNavigation:l=!0}=o,u=e({text:s,atUsers:c}),d=t();return r(n,{children:i(u,{replace:e=>{if(e.type===`tag`&&e.attribs&&e.attribs.class===`mention`){let t=e.attribs[`data-id`];if(!t)return e;let n=e.children&&e.children[0]?e.children[0].data:``;return r(`span`,{className:`mention text-theme1 transition-colors ${l?`hover:text-theme1/80 cursor-pointer`:``}`,"data-id":t,style:{pointerEvents:l?`auto`:`none`},onClick:l?e=>{e.preventDefault(),e.stopPropagation();let n=`/profile/${t}`;d.push(n)}:void 0,children:n})}return e}})})}export{o as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
|
|
2
|
+
"use client";import{AlertDialog as e,AlertDialogAction as t,AlertDialogContent as n,AlertDialogDescription as r,AlertDialogFooter as i,AlertDialogHeader as a,AlertDialogTitle as o}from"../../ui/alert-dialog.mjs";import{secondToTime as s}from"../../../utils/common.mjs";import{useBlockedModalStore as c}from"../../../store/modules/blocked-modal-store.mjs";import{useLoginModalStore as l}from"../../../store/modules/login-modal-store.mjs";import{useRouter as u}from"next/navigation";import{jsx as d,jsxs as f}from"react/jsx-runtime";import{useTranslations as p}from"next-intl";function m(){let m=u(),h=p(`components.common.blockedDialog`),{isOpen:g,blockedRemark:_,blockedEndTime:v,close:y,setOpen:b}=c(),x=v>0?s(v):h(`unblockTimePermanent`),S=_||h(`remarkDefault`);return d(e,{open:g,onOpenChange:e=>{b(e)},children:f(n,{size:`sm`,children:[f(a,{children:[d(o,{className:`text-[16px]`,children:h(`title`)}),d(r,{className:`text-center text-[14px] leading-6 whitespace-pre-line`,children:h(`description`,{remark:S,unblockTime:x})})]}),f(i,{children:[d(t,{onClick:()=>{l.getState().isOpen&&l.getState().setOpen(!1),y(),m.push(`/feedback`)},children:h(`contactSupport`)}),d(t,{onClick:y,children:h(`gotIt`)})]})]})})}export{m as BlockedDialog};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{useUserStore as e}from"../../../store/modules/user-store.mjs";import{pCommunityCreateCollection as t}from"../../../service/generated/client.mjs";import{InputGroup as n,InputGroupAddon as r,InputGroupInput as i}from"../../ui/input-group.mjs";import{useDeleteRequest as
|
|
2
|
+
"use client";import{useUserStore as e}from"../../../store/modules/user-store.mjs";import{pCommunityCreateCollection as t}from"../../../service/generated/client.mjs";import{InputGroup as n,InputGroupAddon as r,InputGroupInput as i}from"../../ui/input-group.mjs";import a from"../../ui/popup.mjs";import{useDeleteRequest as o}from"../../../hooks/query/use-query.mjs";import{useCallback as s,useEffect as c,useState as l}from"react";import{jsx as u,jsxs as d}from"react/jsx-runtime";import{toast as f}from"sonner";import{useTranslations as p}from"next-intl";function m({visible:m,onClose:h,onCreated:g}){let _=p(`components.pages.collectionCreate`),v=p(`components.common.collectionPopup`),{userId:y}=e(),b=o(),[x,S]=l(!1),[C,w]=l({title:``}),T=typeof document>`u`?void 0:document.body;c(()=>{m&&w({title:``})},[m]);let E=s((e,t)=>{w(n=>({...n,[e]:t}))},[]);function D(e){e||h?.()}async function O(){if(x)return;let e=C.title.trim();if(!e){f.error(_(`form.titleRequired`));return}try{S(!0);let n=await t({title:e,cover_image:``});if(n.code===0){f.success(_(`form.createSuccess`)),y&&b([`user-profile`,`mine`,y,`user-collection-created`,y]),g?.();return}f.error(n.message||_(`form.createFailed`))}catch(e){console.error(`创建收藏夹失败`,e),f.error(_(`form.createFailed`))}finally{S(!1)}}return u(a,{open:m,onOpenChange:D,showCloseButton:!1,className:`!z-[1210] h-[260px] rounded-t-[16px] bg-bg1 p-0 text-text1`,overlayClassName:`!z-[1200] bg-black/30`,overlayForceRender:!0,portalContainer:T,children:d(`div`,{className:`bg-bg1 h-[260px] flex flex-col`,children:[u(`div`,{className:`w-full px-[20px]`,children:d(`div`,{className:`w-full h-[56px] flex items-center justify-between`,children:[u(`div`,{className:`text-[18px] text-text1 font-medium`,children:v(`createModalTitle`)}),u(`button`,{type:`button`,className:`h-[56px] text-[16px] text-theme5 font-semibold disabled:text-text3`,onClick:O,disabled:x,children:x?_(`form.creating`):v(`createModalAction`)})]})}),u(`div`,{className:`w-full px-[20px] pt-[12px]`,children:d(n,{className:`!bg-bg2 h-[48px] rounded-[8px] px-[16px]`,children:[u(r,{className:`!text-text1 text-[16px] font-semibold pl-0 pr-2`,align:`inline-start`,children:_(`form.label`)}),u(i,{maxLength:50,className:`!text-text2 text-[16px] text-right placeholder:!text-text3`,placeholder:_(`form.titlePlaceholder`),value:C.title,onChange:e=>E(`title`,e.target.value)})]})})]})})}export{m as CollectionCreateModal};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{AlertDialog as e,AlertDialogAction as t,AlertDialogCancel as n,AlertDialogContent as r,AlertDialogDescription as i,
|
|
2
|
+
"use client";import{AlertDialog as e,AlertDialogAction as t,AlertDialogCancel as n,AlertDialogContent as r,AlertDialogDescription as i,AlertDialogHeader as a,AlertDialogTitle as o}from"../../ui/alert-dialog.mjs";import{jsx as s,jsxs as c}from"react/jsx-runtime";import{useTranslations as l}from"next-intl";function u({open:u,onOpenChange:d,onConfirm:f,onCancel:p,title:m,description:h,confirmText:g,cancelText:_,isConfirming:v=!1,children:y}){let b=l(`components.common`),x=m??b(`title`),S=h??b(`deleteConfirmDialog.description`),C=g??b(`deleteConfirmDialog.confirm`),w=_??b(`deleteConfirmDialog.cancel`);function T(e){e||p?.(),d(e)}function E(){v||f()}return s(e,{open:u,onOpenChange:T,children:c(r,{size:`sm`,className:`max-w-[330px] gap-0 p-0 overflow-hidden rounded-lg bg-bg1 shadow-2xl`,children:[c(a,{className:`flex flex-col items-center justify-center min-h-[110px] p-4 gap-2 text-center`,children:[s(o,{className:`text-[16px] font-normal leading-[24px] text-text1`,style:{fontFamily:`"Source Code Pro", sans-serif`},children:x}),S&&s(i,{className:`text-[14px] leading-[20px] text-text2`,children:S})]}),y,c(`div`,{className:`grid grid-cols-[1fr_1px_1fr] items-center h-[46px] border-t border-line1/5`,children:[s(n,{disabled:v,className:`h-full rounded-none border-none bg-transparent hover:bg-line1/10 text-[16px] font-normal text-text1 outline-none active:opacity-70 transition-opacity`,style:{fontFamily:`"Source Code Pro", sans-serif`},children:w}),s(`div`,{className:`h-[22px] w-px bg-line1/30`}),s(t,{disabled:v,onClick:E,className:`h-full rounded-none border-none bg-transparent hover:bg-line1/10 text-[16px] font-normal text-[#fd4c5e] outline-none active:opacity-70 transition-opacity`,style:{fontFamily:`"Source Code Pro", sans-serif`},children:C})]})]})})}export{u as DeleteConfirmDialog};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{
|
|
2
|
+
"use client";import{useFollowIdsState as e}from"../../../store/modules/follow-ids-store.mjs";import{useUserStore as t}from"../../../store/modules/user-store.mjs";import{pInteractionFollow as n,pInteractionUnfollow as r}from"../../../service/generated/client.mjs";import{useOpenLoginAsync as i}from"../../../hooks/use-auth.mjs";import a from"../../../assets/icons/common/follow_sel.mjs";import o from"../../../assets/icons/common/follow_user.mjs";import{UnfollowConfirmDialog as s}from"./unfollow-confirm-dialog.mjs";import{useCallback as c,useEffect as l,useMemo as u,useState as d}from"react";import{Fragment as f,jsx as p,jsxs as m}from"react/jsx-runtime";import{toast as h}from"sonner";import{useTranslations as g}from"next-intl";function _({userId:_,hasFollow:v=!1,onChange:y}){let b=g(`components.common.followButton`),[x,S]=d(v),[C,w]=d(!1),{isLogin:T,userInfo:E,userId:D}=t(),{followIds:O}=e(),k=D||E?.userId||``,A=i(),j=u(()=>E?.userId===_,[E,_]),M=u(()=>v||O.includes(_),[_,O,v]);l(()=>{S(M)},[M]);let N=c(async()=>{if(!_)return;if(!k){h.error(b(`loginRequired`));return}try{if(x){let e=await r({follower_id:k,followee_id:_});if(e.code!==0){h.error(e.message||b(`unfollowFailed`));return}}else{let e=await n({follower_id:k,followee_id:_});if(e.code!==0){h.error(e.message||b(`followFailed`));return}}window.sensors?.track(`detail_follow_click`,{object_id:``,action:x?`取消关注`:`关注`,author_id:_})}catch(e){console.error(`关注或取消关注失败:`,e),h.error(b(x?`unfollowFailed`:`followFailed`));return}let{followIds:t,setFollowIds:i}=e.getState(),a=new Set(t);x?a.delete(_):a.add(_),i(Array.from(a)),S(!x),y?.(!x)},[k,x,y,b,_]);function P(){w(!1),N()}function F(){w(!1)}let I=c(()=>{if(!T){A().then(e=>{e||h.error(b(`loginFailed`))});return}if(x){w(!0);return}N()},[N,x,T,A,b]);return j?null:m(f,{children:[p(`div`,{className:` h-[28px] rounded-[14px] px-[8px] border-[1px] border-solid cursor-pointer flex items-center justify-center ${x?`border-text3`:`border-theme5`}`,onClick:I,children:x?m(f,{children:[p(a,{className:`w-[12px] h-[12px] text-text3 shrink-0`}),p(`span`,{className:`text-text3 text-[12px] leading-[18px] ml-[4px] shrink-0`,children:b(`following`)})]}):m(f,{children:[p(o,{className:`block w-[12px] h-[12px] text-theme5 shrink-0`}),p(`span`,{className:`block text-theme5 text-[12px] leading-[18px] ml-[4px] shrink-0`,children:b(`follow`)})]})}),p(s,{open:C,onOpenChange:w,onCancel:F,onConfirm:P})]})}export{_ as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{useUserStore as e}from"../../../store/modules/user-store.mjs";import{gUserGetUserInfo as t}from"../../../service/generated/client.mjs";import{Toaster as n}from"../../ui/sonner.mjs";import{
|
|
2
|
+
"use client";import{useUserStore as e}from"../../../store/modules/user-store.mjs";import{gUserGetUserInfo as t}from"../../../service/generated/client.mjs";import{Toaster as n}from"../../ui/sonner.mjs";import{BlockedDialog as r}from"../blocked-dialog/blocked-dialog.mjs";import{useRequest as i}from"../../../hooks/query/use-query.mjs";import{CollectionPopupHost as a}from"../collection-popup/index.mjs";import{LoginDialog as o}from"../login-dialog/login-dialog.mjs";import{MediaPreview as s}from"../media-preview/index.mjs";import{useRouter as c}from"next/navigation";import{useEffect as l,useRef as u,useState as d}from"react";import{jsx as f,jsxs as p}from"react/jsx-runtime";import{QueryClient as m,QueryClientProvider as h}from"@tanstack/react-query";import{NuqsAdapter as g}from"nuqs/adapters/next/app";function _(){let{userId:n,setUserInfo:r}=e(),a={code:0,message:``,data:{}},{data:o}=i([`user-init`,n],()=>n?t({user_id:n}):Promise.resolve(a),{enabled:!!n});return l(()=>{if(!n)return;let e=o?.data;e&&r(e)},[r,n,o]),null}function v(t){let{queryClient:i,children:v}=t,[y]=d(()=>new m),b=i??y,x=c(),S=e(e=>e.isLogin&&!!e.token&&!!e.userId),C=u(S);return l(()=>{C.current&&!S&&(b.clear(),x.refresh()),C.current=S},[S,b,x]),f(h,{client:b,children:p(g,{children:[f(_,{}),v,f(r,{}),f(o,{}),f(a,{}),f(n,{position:`top-center`}),f(s,{})]})})}export{v as FunhubProvider};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{toast as e}from"../../../ui.mjs";import{LeftArrowIcon as t}from"../icons/left-arrow.mjs";import{
|
|
2
|
+
"use client";import{toast as e}from"../../../ui.mjs";import{LeftArrowIcon as t}from"../icons/left-arrow.mjs";import{useRouter as n}from"next/navigation";import{jsx as r,jsxs as i}from"react/jsx-runtime";function a({title:a,leftChild:o,centerChild:s,className:c,rightChild:l,leftIconCss:u,onBack:d}){let f=n();function p(){if(e.dismiss(),d){d?.();return}window.location.search.split(`from_code=`)[1]?f.push(`/`):f.back()}return r(`nav`,{className:`app-top-nav w-full relative ${c?.includes(`h-`)?(c.match(/h-\[?\d\w+\]?/)||[`h-12`])[0]:`h-12`}`,children:i(`div`,{className:`w-full bg-bg1 flex items-center justify-center fixed top-0 left-0 right-0 z-50 border-b border-text1/5 ${c}`,style:{willChange:`transform`,transform:`translateZ(0)`},children:[r(`div`,{className:`absolute z-[1] h-full left-0 top-0`,children:o||r(`div`,{onClick:p,className:`cursor-pointer h-full w-12 flex items-center justify-center`,children:r(t,{className:`w-4 h-4 text-text1 ${u}`})})}),s||r(`p`,{className:`text-text1 line-clamp-1 px-12 text-ellipsis text-lg`,children:a}),l&&r(`div`,{className:`absolute h-full right-2 top-0 flex items-center justify-center`,children:l})]})})}export{a as HeaderNav};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
|
|
2
|
+
import{jsx as e}from"react/jsx-runtime";function t(t){let{className:n,...r}=t;return e(`svg`,{width:`12`,height:`12`,viewBox:`0 0 12 12`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,className:n,...r,children:e(`path`,{d:`M7.59003 6.5457L5.04303 7.9287C4.92303 7.9947 4.79103 8.0307 4.66803 8.0307C4.29903 8.0307 4.03203 7.7487 4.03203 7.3587V4.6437C4.03203 4.2537 4.29903 3.97169 4.66803 3.97169C4.79403 3.97169 4.92303 4.0077 5.04303 4.0707L7.60203 5.4537C7.83303 5.5797 7.96803 5.7777 7.96803 5.9937C7.96803 6.2127 7.83003 6.4167 7.59003 6.5457ZM9.83703 10.6377L2.16303 9.8907C0.984029 9.8907 0.0300293 8.9367 0.0300293 7.7577V4.1607C0.0300293 2.9817 0.984029 2.0277 2.16303 2.0277L9.84003 1.3617C11.019 1.3617 11.973 2.31569 11.973 3.4947V8.5047C11.9722 9.07068 11.7468 9.61321 11.3463 10.0131C10.9459 10.4131 10.403 10.6377 9.83703 10.6377ZM10.905 3.4947C10.905 3.35484 10.8775 3.21635 10.824 3.08714C10.7704 2.95793 10.692 2.84052 10.5931 2.74163C10.4942 2.64273 10.3768 2.56429 10.2476 2.51076C10.1184 2.45724 9.97989 2.4297 9.84003 2.4297L2.16303 3.0957C2.02317 3.0957 1.88468 3.12324 1.75547 3.17676C1.62626 3.23028 1.50885 3.30873 1.40996 3.40763C1.31107 3.50652 1.23262 3.62393 1.1791 3.75314C1.12558 3.88235 1.09803 4.02084 1.09803 4.1607V7.7577C1.09803 8.04015 1.21023 8.31104 1.40996 8.51076C1.60969 8.71049 1.88057 8.8227 2.16303 8.8227L9.83703 9.5697C9.97689 9.5697 10.1154 9.54215 10.2446 9.48863C10.3738 9.43511 10.4912 9.35666 10.5901 9.25776C10.689 9.15887 10.7674 9.04146 10.821 8.91225C10.8745 8.78304 10.902 8.64455 10.902 8.5047V3.4947H10.905Z`,fill:`currentColor`})})}export{t as VideoIcon};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{Image as e}from"../../ui/image.mjs";import{Box as t}from"../../ui/box.mjs";import{Text as n}from"../../ui/text.mjs";import{Time as r}from"../../ui/time.mjs";import{FollowButton as i}from"../../pages/(follow)/_components/follow-button/index.mjs";import{
|
|
2
|
+
"use client";import{Image as e}from"../../ui/image.mjs";import{Box as t}from"../../ui/box.mjs";import{Text as n}from"../../ui/text.mjs";import{Time as r}from"../../ui/time.mjs";import{FollowButton as i}from"../../pages/(follow)/_components/follow-button/index.mjs";import{usePathname as a,useRouter as o}from"next/navigation";import{jsx as s,jsxs as c}from"react/jsx-runtime";function l({className:l,infoData:u,onChangeFollow:d,rightChild:f}){let p=a(),m=o(),h=u?.author?.user_id||``,g=u?.author?.nickname||``,_=u?.show_at||u?.create_time;return s(t,{className:`w-full mb-[8px] pt-[16px] px-[12px] ${l}`,children:c(t,{className:`w-full flex items-center justify-between`,children:[c(t,{className:`flex items-center cursor-pointer`,onClick:e=>{e.stopPropagation(),e.preventDefault();let t=`/profile/${h}`;p!==t&&m.push(t)},children:[s(t,{className:`w-[36px] h-[36px] mr-[8px] rounded-full bg-bg2 overflow-hidden`,children:u?.author?.avatar&&s(e,{width:36,height:36,src:u?.author?.avatar,className:`w-full h-full object-cover`,alt:`avatar`})}),c(t,{className:`flex flex-col`,children:[s(n,{className:`block text-text1 text-[14px] leading-[18px] max-w-[220px] overflow-hidden whitespace-nowrap text-ellipsis`,children:g}),s(t,{className:`mt-[4px] h-[14px] leading-[14px]`,children:s(r,{mode:`relative`,value:_,className:`text-text3 text-[12px]`})})]})]}),s(t,{onClick:e=>{e.stopPropagation(),e.preventDefault()},children:f||(h?s(i,{userId:h,hasFollow:!1,onChange:d}):null)})]})})}export{l as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{Box as e}from"../../../ui/box.mjs";import{List as t}from"../../../ui/list.mjs";import{Text as n}from"../../../ui/text.mjs";import{normalizeTimeToMilliseconds as r}from"../../../ui/time.mjs";import{PostListItemSkeleton as i}from"../../skeleton/post-list-item-skeleton.mjs";import{PostListItem as a}from"./post-list-item.mjs";import{
|
|
2
|
+
"use client";import{Box as e}from"../../../ui/box.mjs";import{List as t}from"../../../ui/list.mjs";import{Text as n}from"../../../ui/text.mjs";import{normalizeTimeToMilliseconds as r}from"../../../ui/time.mjs";import{PostListItemSkeleton as i}from"../../skeleton/post-list-item-skeleton.mjs";import{PostListItem as a}from"./post-list-item.mjs";import{useMemo as o}from"react";import{Fragment as s,jsx as c,jsxs as l}from"react/jsx-runtime";import{useTranslations as u}from"next-intl";import d from"next/link";import{useIsClient as f}from"foxact/use-is-client";import{orderBy as p}from"lodash-es";function m(e){let t=r(e);if(!t)return!1;let n=new Date(t),i=new Date;return n.getFullYear()===i.getFullYear()&&n.getMonth()===i.getMonth()&&n.getDate()===i.getDate()}function h(r){let h=u(`components.ui.list`),g=f(),{list:_,loading:v,hasMore:y=!1,loadMore:b,isEditMode:x,selectedIds:S,onToggleSelection:C}=r,w=o(()=>p(_,[`publishTime`],[`desc`]),[_]),{todayList:T,earlierList:E}=o(()=>{if(!g)return{todayList:[],earlierList:w};let e=[],t=[];for(let n of _)m(n.publishTime)?e.push(n):t.push(n);return{todayList:p(e,[`publishTime`],[`desc`]),earlierList:p(t,[`publishTime`],[`desc`])}},[g,_,w]),D=!!v&&_.length===0,O=g;return D?c(e,{className:`bg-bg1`,children:Array.from({length:6}).map((e,t)=>c(i,{isEditMode:x},`post-list-item-skeleton-${t}`))}):l(t,{loading:v,loadMore:b,hasMore:y,empty:`no-content`,emptyText:h(`postList.empty`),children:[O&&T.length>0&&l(s,{children:[c(e,{className:` `,children:c(n,{className:`text-lg text-text1`,children:h(`postList.today`)})}),T.map(e=>x?c(a,{...e,isEditMode:x,isSelected:S?.has(e.id),onToggle:()=>C?.(e.id)},e.id):c(d,{href:`/post/${e.id}`,children:c(a,{...e,isEditMode:x,isSelected:S?.has(e.id),onToggle:()=>C?.(e.id)})},e.id))]}),E.length>0&&l(s,{children:[c(e,{className:` `,children:c(n,{className:`text-lg text-text1`,children:h(`postList.earlier`)})}),E.map(e=>x?c(a,{...e,isEditMode:x,isSelected:S?.has(e.id),onToggle:()=>C?.(e.id)},e.id):c(d,{href:`/post/${e.id}`,children:c(a,{...e,isEditMode:x,isSelected:S?.has(e.id),onToggle:()=>C?.(e.id)})},e.id))]})]})}export{h as PostList};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{useUserStore as e}from"../../../../store/modules/user-store.mjs";import{pInteractionCancelDislike as t,pInteractionCancelLike as n,pInteractionDislike as r,pInteractionLike as i}from"../../../../service/generated/client.mjs";import{useRequireLogin as a}from"../../../../hooks/use-auth.mjs";import{
|
|
2
|
+
"use client";import{useUserStore as e}from"../../../../store/modules/user-store.mjs";import{pInteractionCancelDislike as t,pInteractionCancelLike as n,pInteractionDislike as r,pInteractionLike as i}from"../../../../service/generated/client.mjs";import{useRequireLogin as a}from"../../../../hooks/use-auth.mjs";import{CommentIcon as o}from"../../icons/comment.mjs";import{DeleteIcon as s}from"../../icons/delete.mjs";import{ShareIcon as c}from"../../icons/share.mjs";import{ShareDrawer as l}from"../../share-popup/share-drawer.mjs";import{SharePlatformEnum as u}from"../../../../types/share.mjs";import d from"../../../../utils/share-manager.mjs";import f from"../../../../assets/icons/dislike.mjs";import p from"../../../../assets/icons/dislike_sel.mjs";import m from"../../../../assets/icons/like.mjs";import h from"../../../../assets/icons/like_sel.mjs";import{useState as g}from"react";import{Fragment as _,jsx as v,jsxs as y}from"react/jsx-runtime";import{toast as b}from"sonner";import{useTranslations as x}from"next-intl";function S(t){let r=x(`components.ui.list.userActivityList`),{contentId:o,count:s=0,isLiked:c=!1,isDisliked:l=!1,dislikeCount:u=0,onLikeSuccess:d,onSuccess:f,className:p=``}=t,[_,S]=g(!1),C=e(e=>e.userId),w=a(),T=c?Math.max(1,s):s>0?s:r(`userActivityListActions.like`);return y(`button`,{className:`flex justify-center items-center gap-1.5 p-2 cursor-pointer ${_?`opacity-50 cursor-not-allowed`:``} ${c?`text-red-500`:`text-text3`} ${p}`,onClick:async()=>{w(async()=>{if(_)return;S(!0);let e={isLiked:c,count:s,isDisliked:l,dislikeCount:u},t=!c,a=Math.max(0,t?s+1:s-1),p=t&&l?!1:l,m=t&&l?Math.max(0,u-1):u;d?.({isLiked:t,count:a,isDisliked:p,dislikeCount:m});try{let t=c?await n({id:o,user_id:C,content_type:2}):await i({id:o,user_id:C,content_type:2});t?.code===0||t?.data?f?.():(d?.({isLiked:e.isLiked,count:e.count,isDisliked:e.isDisliked,dislikeCount:e.dislikeCount}),b.error(t?.message||r(`userActivityListActions.likeFailed`)))}catch(t){console.error(`点赞操作失败:`,t),d?.({isLiked:e.isLiked,count:e.count,isDisliked:e.isDisliked,dislikeCount:e.dislikeCount}),b.error(r(`userActivityListActions.likeFailed`))}finally{S(!1)}})},disabled:_,children:[v(c?h:m,{}),v(`span`,{className:`text-sm`,children:T})]})}function C(n){let i=x(`components.ui.list.userActivityList`),{contentId:o,count:s=0,isDisliked:c=!1,isLiked:l=!1,likeCount:u=0,onDislikeSuccess:d,onSuccess:m,className:h=``}=n,[_,b]=g(!1),S=e(e=>e.userId),C=a();return y(`button`,{className:`flex justify-center items-center gap-1.5 p-2 cursor-pointer ${_?`opacity-50 cursor-not-allowed`:``} ${c?`text-primary`:`text-text3`} ${h}`,onClick:async()=>{C(async()=>{if(_)return;b(!0);let e={isDisliked:c,count:s,isLiked:l,likeCount:u},n=!c,i=Math.max(0,n?s+1:s-1),a=n&&l?!1:l,f=n&&l?Math.max(0,u-1):u;d?.({isDisliked:n,count:i,isLiked:a,likeCount:f});try{(c?await t({id:o,user_id:S,content_type:2}):await r({id:o,user_id:S,content_type:2})).data?m?.():d?.({isDisliked:e.isDisliked,count:e.count,isLiked:e.isLiked,likeCount:e.likeCount})}catch(t){console.error(`点踩操作失败:`,t),d?.({isDisliked:e.isDisliked,count:e.count,isLiked:e.isLiked,likeCount:e.likeCount})}finally{b(!1)}})},disabled:_,children:[v(c?p:f,{}),v(`span`,{className:`text-sm`,children:s||i(`userActivityListActions.dislike`)})]})}function w(e){let t=x(`components.ui.list.userActivityList`),{count:n=0,onClick:r,className:i=``}=e,a=n>0?n:t(`userActivityListActions.comment`);return y(`button`,{className:`flex justify-center items-center gap-1.5 p-2 cursor-pointer text-text3 ${i}`,onClick:r,children:[v(o,{}),v(`span`,{className:`text-sm`,children:a})]})}function T(e){let t=x(`components.ui.list.userActivityList`),{contentId:n,userId:r,isCollected:i,onShareSuccess:a,onClick:o,className:s=``,onCollect:f,onUncollect:p}=e,[m,h]=g(!1);function b(){o?.(),h(!0)}function S(){h(!1),a?.()}function C(){d.showSharePopup({type:u.WECHAT,data:{id:n},copyUrl:`${window.location.origin}/post/${n}`}),S()}function w(){d.showSharePopup({type:u.QQ,data:{id:n},copyUrl:`${window.location.origin}/post/${n}`}),S()}function T(){d.showSharePopup({type:u.WECHAT_MOMENTS,data:{id:n},copyUrl:`${window.location.origin}/post/${n}`}),S()}return y(_,{children:[y(`button`,{className:`flex justify-center items-center gap-1.5 p-2 cursor-pointer text-text3 ${s}`,onClick:b,children:[v(c,{}),v(`span`,{className:`text-sm`,children:t(`userActivityListActions.share`)})]}),v(l,{isCollected:i,open:m,onOpenChange:h,onShareWeChat:C,onShareQQ:w,onShareMoments:T,onCollect:f,onUncollect:p})]})}function E(e){let{onClick:t,disabled:n=!1,className:r=``}=e;return v(`button`,{className:`p-1 ${n?`cursor-not-allowed text-text3 opacity-60`:`cursor-pointer text-text3`} ${r}`,onClick:n?void 0:t,disabled:n,children:v(s,{})})}export{w as ActivityCommentButton,E as ActivityDeleteButton,C as ActivityDislikeButton,S as ActivityLikeButton,T as ActivityShareButton};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{Image as e}from"../../../ui/image.mjs";import{Avatar as t,AvatarFallback as n,AvatarImage as r}from"../../../ui/avatar.mjs";import{Box as i}from"../../../ui/box.mjs";import{Checkbox as a}from"../../../ui/checkbox.mjs";import{Text as o}from"../../../ui/text.mjs";import{Time as s}from"../../../ui/time.mjs";import{useMediaPreview as c}from"../../media-preview/index.mjs";import
|
|
2
|
+
"use client";import{Image as e}from"../../../ui/image.mjs";import{Avatar as t,AvatarFallback as n,AvatarImage as r}from"../../../ui/avatar.mjs";import{Box as i}from"../../../ui/box.mjs";import{Checkbox as a}from"../../../ui/checkbox.mjs";import{Text as o}from"../../../ui/text.mjs";import{Time as s}from"../../../ui/time.mjs";import{useMediaPreview as c}from"../../media-preview/index.mjs";import l from"../../../../assets/icons/detail/video_play.mjs";import{useContentOperate as u}from"../../../../hooks/use-content-operate.mjs";import{ActivityCommentButton as d,ActivityDeleteButton as f,ActivityDislikeButton as p,ActivityLikeButton as ee,ActivityShareButton as m}from"./user-activity-list-actions.mjs";import{useRouter as te}from"next/navigation";import{useEffect as h,useRef as ne,useState as g}from"react";import{jsx as _,jsxs as v}from"react/jsx-runtime";import{toast as y}from"sonner";import{useTranslations as b}from"next-intl";const x=[],S={post:2};function C({medias:t=x,className:n=``,onItemClick:r}){let a=b(`components.ui.list.userActivityList`),o=(t||[]).filter(Boolean).slice(0,9);if(!o.length)return null;function s(e){r?.(e)}function c(t,n,o){let{is_video:c,media_url:u,cover_image:d}=t||{},f=!!c,p=f?d||u||``:u||``;return p?v(i,{className:o||`relative w-full h-full`,onClick:e=>{r&&(e.stopPropagation(),e.preventDefault(),s(n))},children:[_(e,{src:p,alt:a(`userActivityListItem.mediaAlt`),fill:!0,className:`object-cover`}),f&&_(i,{className:`absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 bg-[rgba(0,0,0,0.5)] rounded-full`,children:_(l,{width:36,height:36})})]},n):null}if(o.length===1){let{is_video:e,media_url:t,cover_image:r}=o[0]||{};return _(i,{className:n,children:_(i,{className:`w-full rounded-xl overflow-hidden`,children:c({is_video:e,media_url:t,cover_image:r,__src:e?r||t||``:t||``},0,`relative w-full aspect-square`)})})}return o.length===2?_(i,{className:n,children:_(i,{className:`w-full flex gap-0.5 rounded-xl overflow-hidden`,children:o.map((e,t)=>_(i,{className:`flex-1 aspect-square relative`,children:c(e,t)},t))})}):o.length===3?_(i,{className:n,children:v(i,{className:`w-full h-89.25 flex gap-0.5 rounded-xl overflow-hidden`,children:[_(i,{className:`w-[56.65%] h-full relative`,children:c(o[0],0)}),_(i,{className:`flex-1 flex flex-col gap-0.5`,children:o.slice(1).map((e,t)=>_(i,{className:`w-full flex-1 relative`,children:c(e,t+1)},t))})]})}):o.length===4?_(i,{className:n,children:_(i,{className:`w-full h-89.25 rounded-xl overflow-hidden grid grid-cols-2 grid-rows-2 gap-0.5`,children:o.map((e,t)=>_(i,{className:`w-full h-full relative`,children:c(e,t)},t))})}):o.length===5?_(i,{className:n,children:v(i,{className:`w-full rounded-xl overflow-hidden flex flex-col gap-0.5`,children:[_(i,{className:`w-full h-49.5 flex gap-0.5`,children:o.slice(0,2).map((e,t)=>_(i,{className:`flex-1 h-full relative`,children:c(e,t)},t))}),_(i,{className:`w-full h-33.5 flex gap-0.5`,children:o.slice(2).map((e,t)=>_(i,{className:`flex-1 h-full relative`,children:c(e,t+2)},t))})]})}):o.length===6?_(i,{className:n,children:v(i,{className:`w-full rounded-xl overflow-hidden flex flex-col gap-0.5`,children:[v(i,{className:`w-full h-67.5 flex gap-0.5`,children:[_(i,{className:`w-67.5 h-full relative`,children:c(o[0],0)}),_(i,{className:`flex-1 grid grid-cols-1 grid-rows-2 gap-0.5`,children:o.slice(1,3).map((e,t)=>_(i,{className:`w-full h-full relative`,children:c(e,t+1)},t))})]}),_(i,{className:`w-full h-33.5 grid grid-cols-3 grid-rows-1 gap-0.5`,children:o.slice(3).map((e,t)=>_(i,{className:`w-full h-full relative`,children:c(e,t+3)},t))})]})}):o.length===7?_(i,{className:n,children:v(i,{className:`w-full rounded-xl overflow-hidden flex gap-0.5`,children:[_(i,{className:`w-76 h-67.5 grid grid-cols-2 grid-rows-2 gap-0.5`,children:o.slice(0,4).map((e,t)=>_(i,{className:`w-full h-full relative`,children:c(e,t)},t))}),_(i,{className:`flex-1 grid grid-cols-1 grid-rows-3 gap-0.5`,children:o.slice(4).map((e,t)=>_(i,{className:`w-full h-full relative`,children:c(e,t+4)},t))})]})}):o.length===8?_(i,{className:n,children:v(i,{className:`w-full rounded-xl overflow-hidden flex flex-col gap-0.5`,children:[_(i,{className:`w-full h-33.5 flex gap-0.5 items-center`,children:o.slice(0,2).map((e,t)=>_(i,{className:`flex-1 h-full relative`,children:c(e,t)},t))}),_(i,{className:`w-full h-67.5 grid grid-cols-3 grid-rows-2 gap-0.5`,children:o.slice(2).map((e,t)=>_(i,{className:`w-full h-full relative`,children:c(e,t+2)},t))})]})}):_(i,{className:n,children:_(i,{className:`w-full h-101.5 rounded-xl overflow-hidden grid grid-cols-3 grid-rows-3 gap-0.5`,children:o.slice(0,9).map((e,t)=>_(i,{className:`w-full h-full relative`,children:c(e,t)},t))})})}function w(e){let l=b(`components.ui.list.userActivityList`),{content_id:x,author:w,rightSlot:T,create_time:re,content:E,medias:ie,canEdit:ae=!1,isDeleting:oe=!1,isEditMode:se=!1,isSelected:D=!1,onToggle:O,interaction:k,like_count:A=0,is_liked:j=!1,onLikeSuccess:ce,dislike_count:M=0,is_dislike:N=!1,is_collected:le,onDislikeSuccess:P,comment_count:F=0,onDelete:I,onShare:L,onShareSuccess:R,onActionSuccess:z,onCollectChange:B}=e,V=k?.is_collected??le??!1,[H,U]=g({isLiked:j,likeCount:A,isDisliked:N,dislikeCount:M,isCollected:V}),[W,G]=g(!1),[ue,K]=g(!1),q=ne(null),J=ie?.filter(Boolean)??[],Y=w?.nickname||w?.nick_name||``,de=w?.avatar||w?.avatar_url||``;h(()=>{U({isLiked:j,likeCount:A,isDisliked:N,dislikeCount:M,isCollected:V})},[M,N,j,A,V]),h(()=>{G(!1)},[E]),h(()=>()=>{q.current&&=(clearTimeout(q.current),null)},[]);function fe(e){U(t=>({...t,isLiked:e.isLiked,likeCount:e.count,isDisliked:e.isDisliked??t.isDisliked,dislikeCount:e.dislikeCount??t.dislikeCount})),ce?.(e)}function pe(e){U(t=>({...t,isDisliked:e.isDisliked,dislikeCount:e.count,isLiked:e.isLiked??t.isLiked,likeCount:e.likeCount??t.likeCount})),P?.(e)}let{handleToCollectionOperate:me}=u({id:x||``,isLike:H.isLiked,isDislike:H.isDisliked,isCollect:H.isCollected,likeCnt:H.likeCount,dislikeCnt:H.dislikeCount,contentType:S.post});function X(){q.current&&=(clearTimeout(q.current),null)}function Z(e){U(t=>({...t,isCollected:e})),z?.(),x&&B?.(x,e)}function Q(e){if(!x){y.error(l(`userActivityListItem.collectFailed`));return}if(!ue){if(K(!0),X(),!me({currentCollect:e,onUpdate:({isCollect:e})=>{X(),Z(e),K(!1)}})){y.error(l(`userActivityListItem.collectFailed`)),K(!1);return}q.current=setTimeout(()=>{K(!1),q.current=null},300)}}function he(e){return!!(e&&e.length>180)}function ge(){G(e=>!e)}let $=te(),_e=()=>{$.push(`/post/${x}`)},ve=e=>{e.stopPropagation(),e.preventDefault(),$.push(`/profile/${w?.user_id}`)},ye=()=>{$.push(`/post/${x}?tab=comment`)},be=c();function xe(e){let t=J.map(e=>({src:e.media_url,type:e.is_video?`video`:`image`,cover:e.cover_image}));t.length&&be.open(t,e)}return _(i,{className:`flex items-start gap-2 p-3`,children:v(i,{className:`flex-1 min-w-0`,children:[v(i,{className:`flex items-center gap-2 mb-3`,children:[v(i,{className:`flex items-center gap-2 shrink-0`,children:[se&&_(a,{checked:D,onCheckedChange:O}),v(t,{className:`w-10 h-10`,onClick:ve,children:[_(r,{src:de,alt:Y}),_(n,{})]})]}),v(i,{className:`flex-1 min-w-0`,children:[_(o,{as:`p`,className:`text-sm text-text1 line-clamp-1 font-medium`,children:Y}),_(i,{className:`h-[1em]`,children:_(s,{value:re,className:`text-xs text-text3`,format:`YYYY-MM-DD HH:mm`})})]}),T&&_(i,{className:`shrink-0`,onClick:e=>{e.stopPropagation(),e.preventDefault()},children:T}),ae&&_(f,{onClick:I,disabled:oe})]}),v(i,{onClick:_e,children:[v(i,{className:`mb-3`,children:[E&&v(i,{children:[_(o,{className:`text-sm text-text1 leading-5 whitespace-pre-wrap text-ellipsis ${W?`break-all`:`line-clamp-3`}`,dangerouslySetInnerHTML:{__html:E}}),he(E)&&_(i,{className:`mt-1 text-xs text-text3`,onClick:e=>{e.stopPropagation(),e.preventDefault(),ge()},children:l(W?`userActivityListItem.collapse`:`userActivityListItem.expand`)})]}),J.length>0&&_(C,{className:`mt-2`,medias:J,onItemClick:xe})]}),v(i,{className:`flex items-center justify-around text-text3 *:min-w-20`,onClick:e=>{e.stopPropagation(),e.preventDefault()},children:[_(ee,{contentId:x||``,count:H.likeCount,isLiked:H.isLiked,isDisliked:H.isDisliked,dislikeCount:H.dislikeCount,onLikeSuccess:fe,onSuccess:z}),_(p,{contentId:x||``,count:H.dislikeCount,isDisliked:H.isDisliked,isLiked:H.isLiked,likeCount:H.likeCount,onDislikeSuccess:pe,onSuccess:z}),_(d,{count:F,onClick:ye}),_(m,{isCollected:H.isCollected,contentId:x||``,userId:w?.user_id??``,onShareSuccess:R,onClick:L,onCollect:()=>Q(!1),onUncollect:()=>Q(!0)})]})]})]})})}export{w as UserActivityListItem,C as UserActivityMediaGrid};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{cn as e}from"../../../../utils/cn.mjs";import{Image as t}from"../../../ui/image.mjs";import{Box as n}from"../../../ui/box.mjs";import{Checkbox as r}from"../../../ui/checkbox.mjs";import{Text as i}from"../../../ui/text.mjs";import{
|
|
2
|
+
"use client";import{cn as e}from"../../../../utils/cn.mjs";import{Image as t}from"../../../ui/image.mjs";import{Box as n}from"../../../ui/box.mjs";import{Checkbox as r}from"../../../ui/checkbox.mjs";import{Text as i}from"../../../ui/text.mjs";import{VideoIcon as a}from"../../icons/video.mjs";import{jsx as o,jsxs as s}from"react/jsx-runtime";import{useTranslations as c}from"next-intl";import{isNil as l}from"lodash-es";function u(e){let t=Number.isFinite(e)?Math.max(0,e):0;return t<1e3?String(Math.floor(t)):t<1e6?`${(Math.floor(t/100)/10).toFixed(1)}K`:`${(Math.floor(t/1e5)/10).toFixed(1)}M`}function d(e){let t=Number.isFinite(e)?Math.max(0,Math.floor(e)):0;if(t<=0)return``;let n=Math.floor(t/3600),r=Math.floor(t%3600/60),i=t%60,a=e=>String(e).padStart(2,`0`);return n>0?`${a(n)}:${a(r)}:${a(i)}`:`${a(r)}:${a(i)}`}function f(f){let p=c(`components.ui.list.videoList`),{title:m,coverImage:h,duration:g,progress:_=0,seriesNum:v=1,authorName:y,viewCount:b,is_more_link:x,showVideoProgress:S,isEditMode:C=!1,isSelected:w=!1,onToggle:T}=f,E=p(x?`videoListItem.series`:`videoListItem.movie`),D=d(g);return s(n,{className:`flex items-start gap-2 py-1.5`,children:[C&&o(n,{className:`shrink-0 self-center `,children:o(r,{checked:w,onCheckedChange:T})}),s(n,{className:`flex-1 h-22 min-w-0 flex items-center gap-[9px]`,children:[s(n,{className:`relative w-35.5 h-20 shrink-0 rounded-lg overflow-hidden `,children:[l(x)?null:o(n,{className:`absolute z-[2] bottom-1 left-1 rounded-xs bg-black/60 px-1 text-[10px] text-white`,children:o(i,{children:E})}),D?o(n,{className:`absolute z-[2] bottom-1 right-1 rounded-xs bg-black/60 px-1 text-[10px] text-white`,children:o(i,{children:D})}):null,o(t,{src:h||`/empty/default-cover.png`,alt:m||p(`videoListItem.coverAlt`),fill:!0,className:`object-cover`})]}),s(n,{className:`flex-1 min-w-0 flex flex-col justify-between py-1.5`,children:[o(i,{className:`text-base text-text1 line-clamp-2 leading-5`,children:m}),s(n,{className:e(`flex-1`,{invisible:!S}),children:[x&&v>=1?`第${v}集 · `:``,p(`videoListItem.watchUntil`),_,`%`]}),o(n,{className:`flex text-text1/33 h-[1em] items-center justify-between text-sm `,children:s(n,{className:`flex items-center gap-1`,children:[o(a,{className:`size-3.5`,"aria-hidden":`true`}),o(i,{children:u(b)})]})})]})]})]})}export{f as VideoListItem};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{Box as e}from"../../../ui/box.mjs";import{List as t}from"../../../ui/list.mjs";import{Text as n}from"../../../ui/text.mjs";import{normalizeTimeToMilliseconds as r}from"../../../ui/time.mjs";import{VideoListItemSkeleton as i}from"../../skeleton/video-list-item-skeleton.mjs";import{VideoListItem as a}from"./video-list-item.mjs";import{
|
|
2
|
+
"use client";import{Box as e}from"../../../ui/box.mjs";import{List as t}from"../../../ui/list.mjs";import{Text as n}from"../../../ui/text.mjs";import{normalizeTimeToMilliseconds as r}from"../../../ui/time.mjs";import{VideoListItemSkeleton as i}from"../../skeleton/video-list-item-skeleton.mjs";import{VideoListItem as a}from"./video-list-item.mjs";import{useMemo as o}from"react";import{Fragment as s,jsx as c,jsxs as l}from"react/jsx-runtime";import{useTranslations as u}from"next-intl";import d from"next/link";import{useIsClient as f}from"foxact/use-is-client";import{orderBy as p}from"lodash-es";function m(e){let t=r(e);if(!t)return!1;let n=new Date(t),i=new Date;return n.getFullYear()===i.getFullYear()&&n.getMonth()===i.getMonth()&&n.getDate()===i.getDate()}function h(r){let h=u(`components.ui.list`),g=f(),{list:_,showVideoProgress:v,loading:y,hasMore:b=!1,loadMore:x,isEditMode:S,selectedIds:C,onToggleSelection:w}=r,T=o(()=>p(_,[`publishTime`],[`desc`]),[_]),{todayList:E,earlierList:D}=o(()=>{if(!g)return{todayList:[],earlierList:T};let e=[],t=[];for(let n of _)m(n.publishTime)?e.push(n):t.push(n);return{todayList:p(e,[`publishTime`],[`desc`]),earlierList:p(t,[`publishTime`],[`desc`])}},[g,_,T]),O=!!y&&_.length===0,k=g;return O?c(e,{className:`bg-bg1`,children:Array.from({length:6}).map((e,t)=>c(i,{isEditMode:S,showVideoProgress:v},`video-list-item-skeleton-${t}`))}):l(t,{loading:y,loadMore:x,hasMore:b,empty:`no-content`,emptyText:h(`videoList.empty`),children:[k&&E.length>0&&l(s,{children:[c(e,{className:` `,children:c(n,{className:`text-lg text-text1`,children:h(`videoList.today`)})}),E.map(e=>S?c(a,{showVideoProgress:v,isEditMode:S,isSelected:C?.has(e.id),...e,onToggle:()=>w?.(e.id)},e.id):c(d,{href:`/video/${e.id}/${e.title}`,children:c(a,{showVideoProgress:v,isEditMode:S,isSelected:C?.has(e.id),...e,onToggle:()=>w?.(e.id)},e.id)},e.id))]}),D.length>0&&l(s,{children:[c(e,{className:` `,children:c(n,{className:`text-lg text-text1`,children:h(`videoList.earlier`)})}),D.map(e=>S?c(a,{showVideoProgress:v,isEditMode:S,isSelected:C?.has(e.id),...e,onToggle:()=>w?.(e.id)},e.id):c(d,{href:`/video/${e.id}/${e.title}`,children:c(a,{showVideoProgress:v,isEditMode:S,isSelected:C?.has(e.id),...e,onToggle:()=>w?.(e.id)},e.id)},e.id))]})]})}export{h as VideoList};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{
|
|
2
|
+
"use client";import{useFollowIdsState as e}from"../../../store/modules/follow-ids-store.mjs";import{useUserStore as t}from"../../../store/modules/user-store.mjs";import{gContentGetVideoDetail as n}from"../../../service/generated/client.mjs";import{useLoginModalStore as r}from"../../../store/modules/login-modal-store.mjs";import{batchQueryContentInteractions as i}from"../../../hooks/use-content-operate.mjs";import a from"../../biz/business/search-bar/variants/detail-search-bar/index.mjs";import o from"../../pages/fullscreen-feed/page.mjs";import{useCallback as s,useEffect as c,useMemo as l,useState as u}from"react";import{Fragment as d,jsx as f,jsxs as p}from"react/jsx-runtime";import{useTranslations as m}from"next-intl";function h(e,t){return(e||[]).map((e,n)=>({id:e.id||`${t||`episode`}-${n+1}`,name:e.name||String(n+1),preview_m3u8_url:e.preview_m3u8url||e.preview_m3u8_url||``,m3u8_url:e.m3u8url||e.m3u8_url||``}))}function g(e){let t=e.id||``,n=h(e.links,t),r=e.static,i=e.score===void 0||e.score===null?void 0:Number(e.score),a=e.duration===void 0||e.duration===null?void 0:Number(e.duration),o={id:t,mid:e.mid||t,name:e.name||``,img_x:e.img_x||``,img_y:e.img_y||``,img_type:e.img_type||``,cat_id:e.cat_id||``,cat_name:e.cat_name||``,status:e.status||``,status_text:e.status_text||``,show_at:e.show_at||``,tags:[],update_status:e.update_status||``,description:e.description||``,language:e.language||``,director:e.director||``,issue_date:e.issue_date||``,actor:e.actor||``,up_user:e.up_user||``,money:e.money||``,source_username:e.source_username||``,task_id:e.task_id||``,file_status:e.file_status||``,score:Number.isFinite(i)?i:void 0,duration:Number.isFinite(a)?a:void 0,episode_cnt:n.length||0,links:[],static:{browse_cnt:Number(r?.browse_cnt||0),collect_cnt:Number(r?.collect_cnt||0),comment_cnt:Number(r?.comment_cnt||0),like_cnt:Number(r?.like_cnt||0),share_cnt:Number(r?.share_cnt||0),dislike_cnt:Number(r?.dislike_cnt||0)},type:e.type??e.content_type,author:e.up_user||e.source_username?{user_id:e.up_user||``,nick_name:e.source_username||``,avatar:``}:void 0};return n.length===0?[{...o,links:[]}]:n.map((e,n)=>{let r=e.id||`${t||`episode`}-${n+1}`,i=e.name||`第${n+1}集`;return{...o,id:r,mid:r,name:i,links:[e]}})}function _(e,t){let n=new Map((t||[]).filter(e=>e.content_id).map(e=>[e.content_id,e]));return e.map(e=>{let t=n.get(e.id);return t?{...e,is_liked:t.is_liked||!1,is_dislike:t.is_disliked??t.is_dislike??!1,is_collected:t.is_collected||!1,is_followed:t.is_followed||!1,author:e.author}:e})}function v({params:h,initialContents:v}){let y=m(`components.common.photoGrid`),{locale:b,seriesId:x,episodeNum:S=`1`}=h,{userInfo:C,isLogin:w}=t(),{followIds:T,setFollowIds:E}=e(),D=l(()=>v??[],[v]),[O,k]=u(D),[A,j]=u(!1),M=b?`/${b}`:``,N=f(`div`,{className:`fixed top-0 left-0 right-0 z-40`,children:f(a,{})});c(()=>{k(D)},[D]),c(()=>{if(!x||D.length>0)return;let e=!0;k([]);async function t(){j(!0);try{let t=(await n({id:x}))?.data?.video;if(!t||!e)return;k(g(t))}catch(e){console.error(`获取剧集详情失败:`,e)}finally{e&&j(!1)}}return t(),()=>{e=!1}},[x,D.length]);let P=l(()=>O.map(e=>e.id).filter(Boolean).join(`,`),[O]),F=l(()=>P?P.split(`,`):[],[P]);c(()=>{if(!w||F.length===0)return;let e=!0;async function t(){let t=await i(F,0);!e||!t?.interaction_list?.length||k(e=>_(e,t.interaction_list||[]))}return t(),()=>{e=!1}},[P,F,w]);let I=l(()=>{let e=S??`1`,t=Number.parseInt(e,10);if(Number.isNaN(t))return 0;let n=Math.max(0,t-1);return O.length>0?Math.min(n,O.length-1):n},[S,O.length]),L=s(({episodeId:e,episodeNum:t})=>{let n=`${M}/feed-series/${e}/episode/${t}`;typeof window<`u`&&window.history.replaceState(null,``,n)},[M]),R=s(()=>{r.getState().open()},[]);return x?A&&O.length===0?p(d,{children:[N,p(`div`,{className:`flex h-screen w-full items-center justify-center bg-black text-white/80`,children:[y(`episodeLoading`),`...`]})]}):!A&&O.length===0?p(d,{children:[N,f(`div`,{className:`flex h-screen w-full items-center justify-center bg-black text-white/80`,children:y(`noEpisodes`)})]}):p(d,{children:[N,f(o,{seriesId:x,initialContents:O,initialActiveIndex:I,videoConfig:{loop:!1,autoNext:!0},currentUserId:C.userId||void 0,followIds:T,onFollowIdsChange:E,onRequireLogin:R,onEpisodeNavigate:L})]}):p(d,{children:[N,p(`div`,{className:`flex h-screen w-full items-center justify-center bg-black text-white/80`,children:[y(`missingEpisode`),` `,`ID`]})]})}export{v as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{Button as e}from"../../ui/button.mjs";import{parseResolution as t}from"../../../utils/common.mjs";import n from"../../../utils/event-bus.mjs";import r
|
|
2
|
+
"use client";import{Button as e}from"../../ui/button.mjs";import{parseResolution as t}from"../../../utils/common.mjs";import n from"../../../utils/event-bus.mjs";import{eventKey as r}from"../../../constants/event-key.mjs";import i from"../video-player/index.mjs";import a from"./popup-video.module.mjs";import{usePathname as o}from"next/navigation";import{useCallback as s,useEffect as c,useState as l}from"react";import{jsx as u,jsxs as d}from"react/jsx-runtime";function f(){let f=o(),[p,m]=l(!1),[h,g]=l(null),[_,v]=l(0),y=s(e=>{if(typeof window>`u`)return 0;let{width:n,height:r}=t(e.resolution);return n<=0?0:Math.max(0,r*(window.innerWidth/n))},[]),b=s(({info:e,show:t})=>{if(!e||!t){m(!1),g(null);return}g(e),v(y(e)),m(!0)},[y]);return c(()=>(n.on(r.SHOW_POPUP_VIDEO,b),()=>{n.off(r.SHOW_POPUP_VIDEO,b)}),[b]),c(()=>{m(!1),g(null)},[f]),!p||!h?null:d(`div`,{className:`fixed inset-0 z-[9999] flex items-center justify-center bg-black/95`,children:[u(e,{variant:`ghost`,className:`absolute left-4 top-4 h-10 w-10 rounded-full border border-white/20 text-white`,onClick:()=>{m(!1),g(null)},children:`←`}),u(`div`,{className:a.popupVideo,style:{width:`100%`,maxHeight:`100%`,height:_>0?`${_}px`:`auto`},children:u(i,{plyerId:h.plyerId,resolution:h.resolution,poster:h.poster||``,videoUrl:h.videoUrl||``,hlsList:h.hlsList,mergeConfig:_>0?{}:{fitVideoSize:`fixWidth`}})})]})}export{f as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{Box as e}from"../../ui/box.mjs";import{Sheet as t,SheetContent as n,SheetHeader as r,SheetTitle as i}from"../../ui/sheet.mjs";import{Switch as a}from"../../ui/switch.mjs";import{Text as o}from"../../ui/text.mjs";import
|
|
2
|
+
"use client";import{Box as e}from"../../ui/box.mjs";import{Sheet as t,SheetContent as n,SheetHeader as r,SheetTitle as i}from"../../ui/sheet.mjs";import{Switch as a}from"../../ui/switch.mjs";import{Text as o}from"../../ui/text.mjs";import s from"../../../assets/icons/close.mjs";import c from"../../../assets/icons/common/right_arrow.mjs";import l from"../../ui/popup.mjs";import{useKeepAliveState as u}from"../keep-scroll-position/index.mjs";import{useCardDecoration as d}from"../../../hooks/use-card-decoration.mjs";import{useCallback as f,useEffect as p,useMemo as m,useRef as h,useState as g}from"react";import{Fragment as _,jsx as v,jsxs as y}from"react/jsx-runtime";import{toast as b}from"sonner";import{useTranslations as x}from"next-intl";function S(e,t,n){return(e||[]).map((e,r)=>{let i=Number.parseInt(e?.id||``,10),a=Number.isNaN(i)?r+1:i,o=e?.id||``,s=Number.isNaN(i)&&o||n(a);return{id:e?.id||`${t}-${a}`,series_num:a,title:s}})}function C(e,t,n){return(e||[]).map((e,r)=>{let i=Number(e?.id),a=Number.isNaN(i)?r+1:i,o=n(a);return{id:e?.id||`${t}-${a}`,series_num:a,title:o}})}function w(e,t,n){return e<=0?n(`singleContent`):n(t===`1`?`completedSeriesTotal`:`ongoingSeriesTotal`,{total:e})}function T(e){return e.mode===`detail`?v(D,{information:e.information,series_num:e.series_num,onEpisodeChange:e.onEpisodeChange}):v(E,{open:e.open,variant:e.variant,title:e.title,updateStatus:e.updateStatus,summaryText:e.summaryText,seriesList:e.seriesList,activeEpisodeId:e.activeEpisodeId,showEpisodeTitle:e.showEpisodeTitle,onToggleTitle:e.onToggleTitle,onClose:e.onClose,onSelectEpisode:e.onSelectEpisode,popupBodyStyle:e.popupBodyStyle})}function E({open:c,variant:u,title:d,updateStatus:f,summaryText:_,seriesList:b,activeEpisodeId:C,showEpisodeTitle:T=!1,onToggleTitle:E,onClose:D,onSelectEpisode:O,popupBodyStyle:k}){let A=x(`components.common.seriesEpisodes`),j=!!E,M=j&&T,N=h(null),P=h(null),F=m(()=>S(b,`episode`,e=>A(`episodeLabel`,{episode:e})),[b,A]),I=m(()=>{if(F.length===0)return[];let e=[];return F.forEach((t,n)=>{let r=Math.floor(n/50);e[r]||(e[r]=[]),e[r].push(t)}),e},[F]),L=m(()=>{if(!C)return 0;let e=F.findIndex(e=>e.id===C);return e<0?0:Math.floor(e/50)},[C,F]),[R,z]=g(L);p(()=>{z(L)},[L]);let B=m(()=>typeof _==`string`&&_.trim()?_:w(F.length,f,A),[F.length,_,A,f]),V=d||A(`selectorTitle`);function H(){let e=N.current;if(e){P.current&&=(window.cancelAnimationFrame(P.current),null),e.scrollTop=0;try{e.scrollTo({top:0,left:0,behavior:`auto`})}catch{}P.current=window.requestAnimationFrame(()=>{P.current=null;let e=N.current;e&&(e.scrollTop=0)})}}p(()=>{c&&H()},[c,T,R]);function U(e){E&&(E(e),H())}function W(e){O?.(e.id,e.series_num),D()}let G=M?2:5,K=I.length>1?v(`div`,{className:`w-full flex gap-[8px] overflow-x-auto`,children:I.map((e,t)=>{if(e.length===0)return null;let n=t===R,r=t*50+1,i=Math.min((t+1)*50,F.length);return y(`div`,{className:`shrink-0 px-[16px] py-[6px] rounded-[16px] text-[14px] transition-colors cursor-pointer relative overflow-hidden ${n?`text-theme5 bg-bg2`:`text-text2 bg-bg2`}`,onClick:()=>{z(t),H()},children:[r,`-`,i,n&&v(`div`,{className:`absolute w-full h-full top-0 left-0 opacity-20 bg-theme5`})]},`series-group-${t}`)})}):null,q=y(`div`,{className:`pb-[8px] flex justify-between`,children:[v(`span`,{className:`text-[16px] text-text1`,children:B}),j&&y(`div`,{className:`flex items-center gap-[4px]`,children:[v(a,{size:`sm`,className:`data-checked:bg-theme5 h-[20px] w-[33px]`,checked:T,onCheckedChange:e=>{U(!!e)}}),v(`button`,{type:`button`,className:`text-[16px] text-text1`,onClick:()=>{U(!T)},children:A(`episodeTitle`)})]})]}),J=v(`div`,{className:`grid w-full gap-2 ${G===2?`grid-cols-2`:`grid-cols-5`}`,children:(I[R]||[]).map((e,t)=>{let n=!!(C&&e.id===C);return v(`button`,{type:`button`,"data-episode-id":e.id,onClick:()=>{W(e)},className:`flex items-center justify-center w-full h-[60px] rounded-[8px] border border-line1 border-solid text-[16px] cursor-pointer select-none transition-colors relative overflow-hidden ${n?`text-theme5 bg-bg2 font-bold`:`text-text1`} ${M?`h-[72px] px-[10px] text-[14px]`:``} ${t%G===0?``:`border-l-0`}`,children:M?v(`span`,{className:`leading-[22px] line-clamp-2`,children:e.title}):e.series_num},e.id)})});return u===`sheet`?v(t,{open:c,onOpenChange:e=>!e&&D(),children:y(n,{side:`bottom`,showCloseButton:!0,className:`min-h-[50vh] max-h-[70vh] bg-bg1 text-text1 rounded-t-2xl border-t border-white/10`,children:[v(r,{className:`pt-3 pb-0`,children:v(i,{className:`flex items-center justify-between text-lg text-text1`,children:V})}),y(`div`,{className:`px-4 pb-2 flex flex-col gap-3`,children:[K,q]}),v(`div`,{ref:N,className:`flex-1 h-0 pt-[4px] pb-[12px] overflow-y-auto px-4`,children:J})]})}):v(l,{open:c,onOpenChange:e=>{e||D()},showCloseButton:!1,className:`border-0 bg-transparent p-0`,children:y(e,{className:`w-full flex flex-col bg-bg1 px-[12px] text-text1`,style:k,children:[y(e,{className:`flex justify-between items-center h-[48px]`,children:[v(o,{className:`text-[16px] font-bold text-text1`,children:V}),v(e,{className:`pl-[12px] h-full flex items-center`,onClick:D,children:v(s,{className:`w-[14px] h-[14px] text-text1 cursor-pointer`})})]}),y(e,{className:`flex-1 h-0 w-full pb-[12px] flex flex-col gap-3`,children:[K,q,v(e,{ref:N,className:`flex-1 h-0 pt-[4px] pb-[12px] overflow-y-auto`,children:J})]})]})})}function D({information:t,series_num:n,onEpisodeChange:r}){let i=x(`components.common`),{getTitleText:a}=d(),[s,l]=u(`detail-series-popup-${t.id}`,!1),[S,w]=u(`detail-series-title-toggle-${t.id}`,!1),T=m(()=>C((t.links||[]).map(e=>({id:e.id,name:e.name})),t.id||`episode`,e=>i(`seriesEpisodes.episodeLabel`,{episode:e})),[t.id,t.links,i]),D=t.update_status===`1`?i(`seriesEpisodes.completedSeriesTotal`,{total:t.links.length}):i(`seriesEpisodes.ongoingSeriesUpdatedTo`,{total:t.links.length}),O=m(()=>t.links[n-1]?.id||t.links[0]?.id||``,[t.links,n]);function k(e){if(typeof window>`u`)return;let{search:t,hash:n}=window.location;window.history.replaceState(window.history.state,``,`${e}${t}${n}`)}let A=h(null),j=f(e=>{let t=A.current?.querySelector(`[data-content-id="${e}"]`);t&&A.current&&A.current.scrollTo({left:t.offsetLeft-10,behavior:`smooth`})},[]);p(()=>{j(O)},[O,j]);let M=f(e=>{if(e!==n){if(!t.links[e-1]){b.error(i(`seriesEpisodes.episodeNotFound`));return}try{r(e);let n=a(t)||t.name||``,i=encodeURIComponent(n);k(`/video/${t.id}/${i}/episode/${e}`)}catch(e){console.error(`切换剧集失败`,e),b.error(i(`seriesEpisodes.episodeSwitchFailed`))}}},[a,t,r,n,i]),N=f(e=>{setTimeout(()=>{j(e)},200)},[j]),[P,F]=g(`auto`),I=f(()=>{if(typeof window>`u`)return;let e=document.getElementById(`selectPopupPosition`),t=window.visualViewport?.height||window.innerHeight;if(e){let n=Math.max(0,t-e.offsetTop);n>0&&F(`${n}px`)}},[]);return p(()=>{if(!s)return;I();let e=()=>{I()};return window.addEventListener(`resize`,e),window.addEventListener(`scroll`,e,!0),()=>{window.removeEventListener(`resize`,e),window.removeEventListener(`scroll`,e,!0)}},[I,s]),T.length===0?null:y(_,{children:[y(e,{className:`w-full mt-[16px] flex flex-col items-end mb-[4px]`,children:[y(e,{className:`w-fit flex items-center px-[12px] h-[28px]`,onClick:()=>l(!0),children:[v(o,{className:`text-[14px] text-text2 leading-[20px]`,children:D}),v(c,{className:`w-[11px] h-[18px] ml-[4px] text-text2`})]}),v(`div`,{ref:A,className:`w-full mt-[12px] overflow-x-auto px-[12px] flex gap-x-[8px] ${S?`h-[76px]`:`h-[60px]`}`,children:T.map((e,t)=>v(`div`,{"data-content-id":e.id,className:`shrink-0 h-[full] px-[18px] rounded-[6px] border border-line1 flex items-center ${S?`w-[162px]`:`w-[60px] !px-[0] justify-center`} ${e.id===O?`!border-theme5 bg-bg2`:``}`,onClick:()=>M(t+1),children:v(o,{className:`text-[16px] text-text1 leading-[22px] line-clamp-2 ${e.id===O?`font-bold !text-theme5`:``}`,children:S?e.title:e.series_num})},e.id))})]}),v(E,{title:i(`seriesEpisodes.selectorTitle`),variant:`popup`,open:s,updateStatus:t.update_status,summaryText:D,seriesList:(t.links||[]).map(e=>({id:e.id,name:e.name})),activeEpisodeId:O,showEpisodeTitle:S,onToggleTitle:e=>{w(e),N(O)},onClose:()=>l(!1),onSelectEpisode:(e,t)=>{l(!1),M(t),j(e)},popupBodyStyle:{height:P}})]})}export{T as SeriesEpisodes};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import e from"
|
|
2
|
+
"use client";import{defaultLocale as e,getMessages as t,isValidLocale as n}from"../../../i18n.mjs";import r from"../../ui/popup.mjs";import{IntlProvider as i}from"../intl-provider.mjs";import a from"../../../assets/icons/share/share-link.mjs";import{SharePlatformEnum as o}from"../../../types/share.mjs";import s from"../../../utils/share-manager.mjs";import{useEffect as c,useState as l}from"react";import{jsx as u,jsxs as d}from"react/jsx-runtime";import{useTranslations as f}from"next-intl";import{createRoot as p}from"react-dom/client";let m=``;const h=[{id:o.SHARE_LINK,name:``,icon:u(a,{className:`w-full h-full`}),onClick:e=>{s.showSharePopup({type:o.SHARE_LINK,data:e,copyUrl:m})}}],g=[],_={id:``,isCollect:!1};function v(e){let t=f(`components.common.sharePopup`),{visible:n,onClose:i,onCollect:a,data:s=_,platforms:p=h,actions:m=g,cancelText:v,maskClosable:y=!0}=e,[b,x]=l(s.isCollect),S=v??t(`shareDrawer.cancel`);c(()=>{x(s.isCollect)},[s.isCollect]);function C(e){return e.name?e.name:e.id===o.SHARE_LINK?t(`shareContent.copyShareLink`):``}function w(e){window.sensors?.track?.(`detail_share_click`,{object_id:s.id,channel:e.id}),e.onClick(s),i?.()}function T(e){!e&&y&&i?.()}function E(e){return function(){w(e)}}return u(r,{side:`bottom`,open:n,onOpenChange:T,showCloseButton:!1,className:`z-[2000] !gap-0 rounded-t-[16px] bg-bg2 p-0 text-text1`,children:d(`div`,{className:`bg-bg2`,children:[p.length>0&&u(`div`,{className:`p-[24px]`,children:u(`div`,{className:`w-full h-[72px] overflow-hidden`,children:u(`div`,{className:`w-full g-scroll-box-x flex items-center`,style:{height:`calc(100% + 60px)`,paddingBottom:`60px`},children:p.map((e,t)=>d(`div`,{className:`cursor-pointer h-[100%] flex flex-col items-center justify-between ${t>0?`ml-[32px]`:``}`,onClick:E(e),children:[u(`span`,{className:`w-[48px] h-[48px] flex items-center justify-center`,children:e.icon}),u(`span`,{className:`text-text1 text-[12px] leading-[12px]`,children:C(e)})]},e.id))})})}),u(`div`,{className:`bg-bg1 mt-[4px] flex items-center justify-center`,onClick:i,children:u(`span`,{className:`text-text1 text-[16px] leading-[60px]`,children:S})})]})})}function y(){if(typeof document>`u`)return e;let t=document.documentElement?.lang||``;return n(t)?t:e}function b(e){let n=y();return u(i,{locale:n,messages:t(n),children:u(v,{...e})})}let x=null,S=null,C=null;var w=class e{static async show(t){let n=await s.initShareConfig(),r=t.initPlatforms||h.filter(e=>n[e.id]),i=t.initActions||g,{data:a,...o}=t,c={platforms:r,actions:i,maskClosable:!0,...o};C={supportActions:i,supportPlatforms:r};let l=typeof window<`u`?window.location.href:``;m=t.copyUrl||t.shareUrl||l,x||(x=document.createElement(`div`),x.style.zIndex=`2001`,document.body.appendChild(x),S=p(x)),S?.render(u(b,{visible:!1,data:a,onClose:()=>{e.clear(),c.onClose?.()},...c})),requestAnimationFrame(()=>{S?.render(u(b,{visible:!0,data:a,onClose:()=>{e.clear(),c.onClose?.()},...c}))})}static clear(){S&&x&&(S.render(u(b,{visible:!1,data:{},platforms:C?.supportPlatforms,actions:C?.supportActions,maskClosable:!0})),setTimeout(()=>{S?.unmount(),S=null,x?.parentNode&&x.parentNode.removeChild(x),x=null},300))}};export{v as SharePopupComponent,w as default,g as defaultActions,h as defaultPlatforms};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{Box as e}from"../../ui/box.mjs";import{Text as t}from"../../ui/text.mjs";import n from"../../ui/link.mjs";import r from"../../../assets/icons/tabs/follow.mjs";import i from"../../../assets/icons/tabs/follow_active.mjs";import a from"../../../assets/icons/tabs/home.mjs";import o from"../../../assets/icons/tabs/home_active.mjs";import s from"../../../assets/icons/tabs/mine.mjs";import c from"../../../assets/icons/tabs/mine_active.mjs";import l from"../../ui/legacy/badge.mjs";import{useEffect as
|
|
2
|
+
"use client";import{Box as e}from"../../ui/box.mjs";import{Text as t}from"../../ui/text.mjs";import n from"../../ui/link.mjs";import r from"../../../assets/icons/tabs/follow.mjs";import i from"../../../assets/icons/tabs/follow_active.mjs";import a from"../../../assets/icons/tabs/home.mjs";import o from"../../../assets/icons/tabs/home_active.mjs";import s from"../../../assets/icons/tabs/mine.mjs";import c from"../../../assets/icons/tabs/mine_active.mjs";import l from"../../ui/legacy/badge.mjs";import{usePathname as u}from"next/navigation";import{useEffect as d,useState as f,useTransition as p}from"react";import{Fragment as m,jsx as h,jsxs as g}from"react/jsx-runtime";import{useTranslations as _}from"next-intl";function v(e,t){if(t!==`/`)return e.startsWith(t);let n=[`/user`].some(t=>e.startsWith(t)),r=e.startsWith(`/category/`);return!n&&(e===`/`||r)}const y=[`/nav-page`],b=`env(safe-area-inset-bottom, 0px)`;function x(x){let{className:S}=x,C=u(),w=_(`tabBar`),[T,E]=f(null),[,D]=p(),[O]=f(0),[k,A]=f(!1),j=[{badge:!1,id:1,labelKey:`home`,path:`/`,icon:a,activeIcon:o,width:22,height:22},{badge:!1,id:2,labelKey:`follow`,path:`/user/follow`,icon:r,activeIcon:i,width:22,height:22},{badge:!1,id:5,labelKey:`mine`,path:`/user/mine`,icon:s,activeIcon:c,width:22,height:22}],M=(e,t,n)=>{t!==C&&E(t)};return d(()=>{T&&v(C,T)&&D(()=>{E(null)})},[C,T]),d(()=>{let e=setTimeout(()=>{A(!0)},0);return()=>clearTimeout(e)},[]),C&&y.some(e=>C.includes(e))?null:h(e,{className:`fixed bottom-0 left-0 right-0 bg-bg1 border-t border-line1 flex items-center justify-around z-50 ${S||``}`,style:{height:`calc(56px + ${b})`,paddingBottom:b},children:j.map(r=>{let i=k&&C?v(T||C||``,r.path):!1,a=i?r.activeIcon:r.icon,o=g(m,{children:[r.badge&&O>0?h(l,{dot:!0,children:h(a,{width:r.width,height:r.height})}):h(a,{width:r.width,height:r.height}),h(t,{className:`text-[10px] mt-[4px] ${i?`text-theme5`:`text-text2`}`,children:w(r.labelKey)})]});return i?h(e,{className:`flex flex-col items-center justify-center flex-1 h-full`,children:o},r.id):h(n,{href:r.path,prefetch:!0,className:`flex flex-col items-center justify-center flex-1 h-full`,onClick:e=>{M(e,r.path,r.labelKey)},children:o},r.id)})})}export{x as TabBar};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{gContentGetAppChannelBlock as
|
|
2
|
+
"use client";import{getChannelList as e}from"../../biz/utils/helpers/get-channel-list.mjs";import{gContentGetAppChannelBlock as t,gContentGetAppChannels as n}from"../../../service/generated/client.mjs";import{Box as r}from"../../ui/box.mjs";import{useRequest as i}from"../../../hooks/query/use-query.mjs";import{queryKey as a}from"../../../constants/query-key.mjs";import{matchChannelByPath as o}from"../../pages/home/channel-matcher.mjs";import{TopNavBarFullscreen as s}from"./fullscreen.mjs";import{TopNavBarNormal as c}from"./normal.mjs";import{usePathname as l}from"next/navigation";import{useMemo as u}from"react";import{jsx as d}from"react/jsx-runtime";function f(e){return e===`/`?[]:e.startsWith(`/category/`)?e.replace(`/category/`,``).split(`/`).map(e=>decodeURIComponent(e)):[]}function p({categoryPath:p,currentChannelId:m}){let h=l()||`/`,{data:g}=i([a.CHANNEL],()=>n()),_=u(()=>e(g?.data),[g?.data]),v=u(()=>typeof window>`u`?p||[]:f(h),[p,h]),y=u(()=>_.length===0?null:o(v,_),[v,_])?.id??m??``,{data:b}=i(a.GET_CONTENT_LIST(y),()=>t({channel_id:y}),{enabled:!!y}),x=u(()=>b?.data?.blocks||[],[b?.data?.blocks]),S=u(()=>x.length>0&&x[0].show_style===6,[x]);return d(r,{className:`w-full`,"data-top-nav-root":`true`,children:d(S?s:c,{channelDataList:_,currentChannelId:y})})}export{p as TopNavBar};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
import{
|
|
2
|
+
import{getChannelList as e}from"../../biz/utils/helpers/get-channel-list.mjs";import{gContentGetAppChannels as t}from"../../../service/generated/client.mjs";import{HydrationBoundary as n}from"../../../hooks/query/hydration-boundary.mjs";import{queryKey as r}from"../../../constants/query-key.mjs";import{revalidate as i}from"../../../constants/revalidate.mjs";import{matchChannelByPath as a}from"../../pages/home/channel-matcher.mjs";import{TopNavBar as o}from"./client.mjs";import{jsx as s}from"react/jsx-runtime";async function c({categoryPath:c=[]}={}){let l=await t({},{revalidate:i.TIME}),u=e(l?.data),d=Array.isArray(c)?c:[],f=a(d,u)?.id||null;return s(n,{prefetch:[{queryKey:[r.CHANNEL],queryFn:()=>Promise.resolve(l)}],children:s(o,{categoryPath:d,currentChannelId:f})})}export{c as TopNavBarServer};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{generateUUID as e,parseResolution as t}from"../../../utils/common.mjs";import{decryptImageUrl as n}from"../../../utils/decrypt-image-client.mjs";import{RETRY_RECOVERED_MIN_PLAY_SECONDS as
|
|
2
|
+
"use client";import{generateUUID as e,parseResolution as t}from"../../../utils/common.mjs";import{decryptImageUrl as n}from"../../../utils/decrypt-image-client.mjs";import{apiCollectCustom as r}from"../../../utils/api-collect.mjs";import{RETRY_RECOVERED_MIN_PLAY_SECONDS as i,buildVideoPlayerSrc as a,isM3u8VideoUrl as o,resolveVideoPlayerSrc as s}from"./process-m3u8-cache.mjs";import{videoConfig as c}from"./create-video.mjs";import{RETRY_RESUME_END_GAP_SECONDS as l,pauseOtherVideos as u,prepareRetryResumeState as d,registerVideo as ee,shouldTriggerFpsStuckRecovery as te,unregisterVideo as f}from"./playing-videos.mjs";import p from"./style.module.mjs";import{useCallback as m,useEffect as h,useImperativeHandle as ne,useRef as g}from"react";import{jsx as _,jsxs as v}from"react/jsx-runtime";import y from"next/image";import{useLocale as re}from"next-intl";async function ie(){await import(`xgplayer/dist/index.min.css`)}const ae=[],oe={},b=10*1e3;function x({className:r=``,parentId:x=``,plyerId:S=``,videoUrl:C=``,poster:se=``,resolution:w,hlsList:ce=ae,mergeConfig:T=oe,onProgressUpdate:le,onVideoEnded:ue,onPlay:de,onPause:fe,onEnded:pe,onPlayerReady:me,onControlsVisibilityChange:he,ref:ge}){let _e=re()===`en`?`en`:`zh-cn`,E=g(e()).current,D=g(1),O=g(1),k=g(0),ve=g(0),A=g(null),ye=g(null),j=g(!1),M=g(!1),be=g(1),N=g(null),P=g(null),xe=g(!1),F=g(0),I=g(null),L=g(null),R=g(!1),z=g(null),B=g(null),V=g(null),H=g(!1),Se=g(!1),U=g(!1),W=g(!1),Ce=g(T),G=m(()=>{P.current&&=(window.clearTimeout(P.current),null),N.current&&=(N.current.disconnect(),null)},[]),K=m(()=>{I.current&&=(window.clearTimeout(I.current),null)},[]),q=m(()=>{L.current&&=(window.clearTimeout(L.current),null)},[]),J=m(e=>{let t=R.current||L.current!==null;if(R.current=!1,q(),!(!t||!e))try{e.removeClass?.(`xgplayer-isloading`),e.getPlugin?.(`loading`)?.hide?.()}catch{}},[q]),Y=m(e=>{if(J(e),e)try{e.addClass?.(`xgplayer-is-error`),e.getPlugin?.(`error`)?.show?.()}catch{}},[J]),we=m(e=>{if(e){R.current=!0,q();try{e.removeClass?.(`xgplayer-is-error`),e.addClass?.(`xgplayer-isloading`),e.getPlugin?.(`error`)?.hide?.(),e.getPlugin?.(`loading`)?.show?.()}catch{}L.current=window.setTimeout(()=>{L.current=null,!(H.current||!R.current)&&(K(),z.current=null,F.current=3,Y(A.current||e),console.warn(`~ 播放器加载超过 ${b}ms,已回退失败态,请手动刷新 ~`))},b)}},[q,K,Y]),Te=m(()=>{G(),q(),R.current=!1,f(E),U.current=!1,z.current=null,A.current&&=(A.current.offAll(),A.current.destroy(),null)},[G,q,E]);ne(ge,()=>({enterFullscreen:()=>{A.current.getPlugin(`fullscreen`).handleFullscreen()},isFullscreen:()=>j.current,isPlayerReady:()=>U.current&&!!A.current,getPlayer:()=>A.current}),[]);let X=g(null),Z=g(null),Ee=g(null),Q=g(null),De=g(null),Oe=.3,ke=.7,$=.045,Ae=()=>a(C);function je(e){return Math.min(4e3,500*2**(e-1))+Math.floor(Math.random()*200)}let Me=async(e,r,f)=>{let p=Ae();if(!p)return;let m=s(C),h=o(C)||(ce?.length??0)>0;try{await ie();let[o,s]=await Promise.all([import(`xgplayer`),h?import(`xgplayer-hls`):Promise.resolve(null),(async()=>{try{se=await n(se)}catch{console.warn(`解码post失败`)}})()]);if(e())return;let ne=await m;if(e())return;let g=ne||p,_=ye.current;if(!_||!_.isConnected)for(let t=0;t<10;t+=1){if(e())return;if(await new Promise(e=>{window.setTimeout(()=>e(),16)}),_=ye.current,_&&_.isConnected)break}if(!_||!_.isConnected||e())return;let v=o.default??o,y=o.Events,re=s?s.default??s:null,ae=h&&re?[...c.plugins,re]:c.plugins,oe=h?{preloadTime:15,bufferBehind:5,keepStatusAfterSwitch:!0}:void 0;A.current=new v({...c,lang:_e,el:_,videoFillMode:`contain`,url:g,poster:se,playbackRate:{list:[.75,1,1.25,1.5,1.75,2]},plugins:ae,...oe?{hls:oe}:{},miniprogress:!0,definition:{list:ce?.map(e=>({text:`${e.text}`,url:a(e.url),definition:`${e.definition}`}))},fullscreen:{useScreenOrientation:!0},...T}),A.current.on(y.REPLAY,()=>{Se.current=!1}),A.current.on(y.WAITING,()=>{console.log(`~视频缓冲中,可能出现卡顿~`)}),A.current.on(y.STALLED,()=>{console.log(`~播放停滞,网络连接问题~`)}),A.current.on(y.LOADING,()=>{console.log(`~正在加载数据~`)}),A.current.on(y.LOADED_DATA,()=>{J(A.current)}),A.current.on(y.CANPLAY,()=>{J(A.current)}),A.current.on(y.PLAYING,()=>{J(A.current)});let b=t=>{let n=A.current;if(e()||!n||F.current>=3)return!1;if(I.current)return we(n),!0;let r=d({failureType:t,player:n,renderedMediaTime:0});B.current=r.time,V.current=r.shouldPlay,z.current=null,F.current+=1;let i=F.current,a=je(i);we(n);let o=t===`fps_stuck`?`画面卡顿`:`失败`;return console.warn(`~ 播放${o},${a}ms 后进行第 ${i} 次重试加载 ~`),I.current=window.setTimeout(()=>{I.current=null,!e()&&(Te(),Me(()=>H.current,()=>Pe.current?.(),e=>Fe.current?.(e)))},a),!0};A.current.on(y.FPS_STUCK,e=>{console.log(`~检测到帧率卡顿~`,e),te(e)&&(b(`fps_stuck`)||Y(A.current))}),A.current.on(y.BUFFER_CHANGE,e=>{console.log(`~缓冲区状态变化:~`,e)}),A.current.on(y.ERROR,t=>{let n=String(t&&(t.message||t.msg||t.error?.message)||t||``),r=A.current;if(r){if(h&&/SourceBuffer is full|QuotaExceeded/i.test(n)){if(e()||xe.current)return;xe.current=!0,window.setTimeout(()=>{xe.current=!1},2e3);try{let e=Number(r?.currentTime||0);(r?.getPlugin?.(`hls`)?.core)?._bufferService?.removeBuffer?.(0,Math.max(0,e-5)).catch?.(()=>{});let t=r?.config?.url;if(typeof r?.switchURL==`function`&&typeof t==`string`&&t){we(r),r.switchURL(t,{currentTime:e,seamless:!1}).catch(()=>{b(`error`)||Y(r)});return}}catch{}}b(`error`)||Y(r)}}),A.current.on(y.PLAY,()=>{F.current>0&&(z.current=Number(A.current?.currentTime||0)),K(),J(A.current),window.sensors?.track(`player_start`,{object_id:x||S||``,play_session_id:x||S,start_type:`播放`,start_position:0,duration:A.current.duration,definition:w,playback_rate:A.current.playbackRate}),u(E,A.current),Se.current||=(Ne(),!0),de?.()}),A.current.on(y.FULLSCREEN_CHANGE,e=>{window.sensors?.track(`player_fullscreen_toggle`,{object_id:x||S||``,play_session_id:x||S||``,action:e?`全屏`:`退出全屏`}),j.current=e}),A.current.on(y.SEEKING,()=>{M.current=!0}),A.current.on(y.SEEKED,()=>{M.current=!1}),A.current.on(y.PAUSE,()=>{window.sensors?.track(`player_pause`,{object_id:x||S||``,play_session_id:x||S||``,pause_position:A.current.currentTime,cumulative_time:A.current.duration}),fe?.()}),A.current.on(y.ENDED,()=>{window.sensors?.track(`player_end`,{object_id:x||S||``,play_session_id:x||S||``,end_position:A.current.currentTime,cumulative_time:A.current.duration,end_type:`播放结束`,is_finish:A.current.currentTime===A.current.duration}),pe?.(),ue&&ue()}),A.current.on(y.RATE_CHANGE,()=>{window.sensors?.track(`player_rate_change`,{object_id:x||S||``,play_session_id:x||S||``,old_rate:be.current,new_rate:A.current.playbackRate}),be.current=A.current.playbackRate}),A.current.on(y.DEFINITION_CHANGE,()=>{window.sensors?.track(`player_definition_change`,{object_id:x||S||``,play_session_id:x||S||``,old_def:w,new_def:A.current.definition})}),A.current.on(y.TIME_UPDATE,()=>{if(A.current&&(F.current>0&&z.current!==null&&Number(A.current.currentTime||0)-z.current>=i&&(F.current=0,z.current=null),le)){let e=A.current.currentTime||0,t=A.current.duration||0;e>0&&t>0&&le(e,t)}});let C=()=>{if(!A.current)return;let e=Ce.current||{},t=Number(A.current.duration||0);if(t<=0)return;let n=B.current;if(n!==null&&n>0){let e=Math.max(0,t-l),r=Math.min(e>0?e:t,n);A.current.currentTime=r,B.current=null;return}let r=Number(e.startTimeSeconds||0);if(r>0){let e=Math.min(t,r);A.current.currentTime=e;return}if(e.startPercent!==void 0&&e.startPercent>0){let n=e.startPercent/100*t;A.current.currentTime=Math.min(t,n)}};A.current.once(`loadedmetadata`,()=>{C()}),A.current.once(`ready`,()=>{U.current=!0,A.current&&A.current.duration>0&&C();let n=V.current;V.current=null,n===!0?A.current?.play?.().catch(()=>{}):n===!1&&A.current?.pause?.(),ee(E,A.current),r&&r(),f&&(G(),P.current=window.setTimeout(()=>{if(e())return;let t=A.current?.root;if(!t)return;let n=new MutationObserver(e=>{e.forEach(e=>{e.type===`attributes`&&e.attributeName===`class`&&f(!e.target.classList.contains(`xgplayer-inactive`))})});N.current=n,n.observe(t,{attributes:!0,attributeFilter:[`class`]}),f(!t.classList.contains(`xgplayer-inactive`))},33));let i=A.current.root,a=0,o=A.current.root.querySelector(`.xgmask`),{width:s,height:c}=t(w),l=s<c?document.documentElement.clientWidth:document.documentElement.clientHeight,u=De.current;u&&A.current?.root&&!A.current.root.contains(u)&&A.current.root.appendChild(u),i.addEventListener(`touchstart`,e=>{if(!j.current)return;let t=e.touches[0];a=t.clientX,k.current=t.clientY,W.current=!1,O.current=A.current.volume;let n=window.getComputedStyle(o).backgroundColor;D.current=1-(Number.parseFloat(n.split(`,`)[3])||0)},{passive:!1}),i.addEventListener(`touchmove`,e=>{if(!j.current)return;e.preventDefault();let t=e.touches[0],n=t.clientX-a,r=t.clientY;if(Math.abs(n)>50||M.current){W.current=!0,d();return}if(W.current){d();return}if(Math.abs(r-k.current)>6){let e=Date.now();if(e-ve.current<16)return;ve.current=e;let n=r<k.current;k.current=r;let i=t.clientX,o=a<l*Oe,s=a>l*ke;if(!o&&!s){d();return}let c=i<l*Oe,u=i>l*ke;if(o&&!c){W.current=!0,d();return}if(s&&!u){W.current=!0,d();return}o&&c?te(n):s&&u?p(n):d()}},{passive:!1});function d(){X.current&&(X.current.style.visibility=`hidden`),Z.current&&(Z.current.style.visibility=`hidden`)}function te(e){let t=e?$:-$;D.current=Math.max(0,Math.min(1,D.current+t)),X.current&&(X.current.style.visibility=`visible`),Z.current&&(Z.current.style.visibility=`hidden`),Ee.current&&(Ee.current.style.transform=`scaleY(${D.current})`);let n=1-D.current;o.style.cssText=`
|
|
3
3
|
background-color: rgba(0,0,0,${n.toFixed(3)});
|
|
4
4
|
will-change: background-color;
|
|
5
5
|
transform: translateZ(0);
|
|
6
|
-
`}function p(e){let t=e?$:-$;O.current=Math.max(0,Math.min(1,O.current+t)),A.current.volume=O.current,Z.current&&(Z.current.style.visibility=`visible`),X.current&&(X.current.style.visibility=`hidden`),Q.current&&(Q.current.style.transform=`scaleY(${O.current})`)}
|
|
6
|
+
`}function p(e){let t=e?$:-$;O.current=Math.max(0,Math.min(1,O.current+t)),A.current.volume=O.current,Z.current&&(Z.current.style.visibility=`visible`),X.current&&(X.current.style.visibility=`hidden`),Q.current&&(Q.current.style.transform=`scaleY(${O.current})`)}i.addEventListener(`touchend`,()=>{j.current&&setTimeout(()=>{d()},800)})})}catch(t){e()||console.error(`初始化播放器失败`,t)}},Ne=m(()=>{},[x,S]),Pe=g(me),Fe=g(he);return Pe.current=me,Fe.current=he,Ce.current=T,h(()=>(H.current=!1,F.current=0,z.current=null,B.current=null,V.current=null,R.current=!1,K(),q(),Me(()=>H.current,()=>Pe.current?.(),e=>Fe.current?.(e)),window.webViewVideoData={resolution:w},()=>{H.current=!0,B.current=null,V.current=null,K(),q(),G(),Te()}),[_e,S,E,C]),h(()=>{let e=Number(T?.startTimeSeconds||0),t=T?.startPercent;if(!U.current||!A.current)return;let n=Number(A.current.duration||0);if(n<=0)return;let r=0;if(e>0)r=Math.min(n,e);else if(t!==void 0&&t>0)r=Math.min(n,t/100*n);else return;let i=A.current.currentTime;Math.abs(i-r)>1&&(A.current.currentTime=r)},[T?.startPercent,T?.startTimeSeconds]),Ae()?v(`div`,{className:`w-full h-full relative ${p.videoBox} ${r}`,children:[_(`div`,{ref:ye,className:`w-full h-full`}),v(`div`,{ref:De,children:[v(`div`,{ref:X,className:`w-[36px] h-[148px] bg-[rgba(51,51,51,0.5)] rounded-[50px] border border-[rgba(0,0,0,0.05)]
|
|
7
7
|
absolute left-[18px] top-[50%] translate-y-[-50%] flex flex-col items-center justify-center gap-[12px] z-50`,style:{visibility:`hidden`},children:[_(y,{src:`/svg/icon_jiazai_zhong.svg`,alt:`Icon`,width:20,height:20}),v(`div`,{className:`relative`,children:[_(`div`,{className:`h-[92px] w-[4px] bg-[#000000] rounded-[8px]`}),_(`div`,{ref:Ee,className:`h-[92px] w-[4px] bg-[#fff] rounded-[8px] absolute bottom-0`,style:{transformOrigin:`bottom`,transform:`scaleY(1)`,willChange:`transform`,backfaceVisibility:`hidden`,transition:`none`}})]})]}),v(`div`,{ref:Z,className:`w-[36px] h-[148px] bg-[rgba(51,51,51,0.5)] rounded-[50px] border border-[rgba(0,0,0,0.05)]
|
|
8
8
|
absolute right-[18px] top-[50%] translate-y-[-50%] flex flex-col items-center justify-center gap-[12px] z-50`,style:{visibility:`hidden`},children:[_(y,{src:`/svg/icon_shengyin_di.svg`,alt:`Icon`,width:20,height:20}),v(`div`,{className:`relative`,children:[_(`div`,{className:`h-[92px] w-[4px] bg-[#000000] rounded-[8px]`}),_(`div`,{ref:Q,className:`h-[92px] w-[4px] bg-[#fff] rounded-[8px] absolute bottom-0`,style:{transformOrigin:`bottom`,transform:`scaleY(1)`,willChange:`transform`,backfaceVisibility:`hidden`,transition:`none`}})]})]})]})]}):null}export{x as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{
|
|
2
|
+
"use client";import{useFollowIdsState as e}from"../../../../../store/modules/follow-ids-store.mjs";import{useUserStore as t}from"../../../../../store/modules/user-store.mjs";import{pInteractionFollow as n,pInteractionUnfollow as r}from"../../../../../service/generated/client.mjs";import{useEffect as i,useState as a}from"react";import{Fragment as o,jsx as s}from"react/jsx-runtime";import{useTranslations as c}from"next-intl";function l(l){let u=c(`components.pages.follow.components.followButton`),{userId:d,hasFollow:f,followText:p=``,onChange:m}=l,h=p||u(`follow`),[g,_]=a(f),{isLogin:v,userInfo:y,userId:b}=t(),{followIds:x}=e(),S=b||y?.userId||``,C=y?.userId===d,w=f||x.includes(d);i(()=>{_(w)},[w]);async function T(){try{g?await r({follower_id:S,followee_id:d}):await n({follower_id:S,followee_id:d}),window.sensors?.track(`detail_follow_click`,{object_id:``,action:g?`取消关注`:`关注`,author_id:d}),sessionStorage.setItem(`user_page_refresh`,`1`)}catch(e){console.error(`关注或取消关注失败:`,e)}_(!g),m?.(!g)}function E(){T(),v&&(g||T())}return C?null:s(`button`,{className:` h-7 rounded-full px-4 py-1.5 border border-solid cursor-pointer flex items-center justify-center ${g?`border-text3`:`border-theme5`}`,onClick:()=>E(),children:g?s(o,{children:s(`span`,{className:`text-text3 text-xs leading-4.5 ml-1 shrink-0`,children:u(`following`)})}):s(o,{children:s(`span`,{className:`block text-theme5 text-xs leading-4.5 ml-1 shrink-0`,children:h})})})}export{l as FollowButton};
|