@funhub/platform 0.2.1 → 0.2.3-beta.0
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/detail/collect_nor.mjs +2 -0
- package/dist/assets/icons/detail/collect_sel.mjs +2 -0
- package/dist/assets/icons/detail/share.mjs +2 -0
- package/dist/assets/icons/eye-off-icon.mjs +1 -1
- package/dist/assets/icons/marquee-enter.mjs +2 -0
- package/dist/assets/icons/right_arrow.mjs +2 -0
- package/dist/assets/icons/search/avatar.mjs +2 -0
- package/dist/assets/images/marquee.mjs +2 -0
- package/dist/biz.d.mts +4 -11
- package/dist/biz.mjs +1 -1
- package/dist/common.d.mts +2 -5
- package/dist/common.mjs +1 -1
- package/dist/components/biz/business/advertisement/ad-match.mjs +1 -1
- package/dist/components/biz/business/advertisement/banner-ad/client.mjs +1 -1
- package/dist/components/biz/business/advertisement/banner-ad/material.d.mts +1 -1
- package/dist/components/biz/business/advertisement/banner-ad/material.mjs +1 -1
- package/dist/components/biz/business/advertisement/banner-ad/schema.d.mts +3 -3
- package/dist/components/biz/business/advertisement/banner-ad/schema.mjs +1 -1
- package/dist/components/biz/business/advertisement/feed-ad/index.d.mts +31 -1
- package/dist/components/biz/business/advertisement/feed-ad/index.mjs +1 -1
- package/dist/components/biz/business/advertisement/floating-ad/client.mjs +1 -1
- package/dist/components/biz/business/advertisement/floating-ad/material.mjs +1 -1
- package/dist/components/biz/business/advertisement/icon-ad/client.mjs +1 -1
- package/dist/components/biz/business/advertisement/icon-ad/material.mjs +1 -1
- package/dist/components/biz/business/advertisement/icon-ad/schema.mjs +1 -1
- package/dist/components/biz/business/advertisement/index.d.mts +2 -2
- package/dist/components/biz/business/advertisement/popup-ad/client.mjs +2 -2
- package/dist/components/biz/business/advertisement/popup-ad/index.d.mts +1 -1
- package/dist/components/biz/business/advertisement/popup-ad/material.d.mts +2 -2
- package/dist/components/biz/business/advertisement/popup-ad/material.mjs +1 -1
- package/dist/components/biz/business/advertisement/popup-ad/schema.d.mts +14 -5
- package/dist/components/biz/business/advertisement/popup-ad/schema.mjs +1 -1
- package/dist/components/biz/business/advertisement/text-ad/client.mjs +1 -1
- package/dist/components/biz/business/advertisement/text-ad/material.mjs +1 -1
- package/dist/components/biz/business/banner-carousel/client.d.mts +2 -2
- package/dist/components/biz/business/banner-carousel/client.mjs +1 -1
- package/dist/components/biz/business/channel-list/client.mjs +1 -1
- package/dist/components/biz/business/channel-list/default-props.mjs +1 -1
- package/dist/components/biz/business/detail/shared/detail-introduction.mjs +2 -0
- package/dist/components/biz/business/detail/shared/detail-operate.mjs +1 -1
- package/dist/components/biz/business/detail/shared/registry.d.mts +1 -36
- package/dist/components/biz/business/detail/shared/registry.mjs +1 -1
- package/dist/components/biz/business/detail/video-detail-actions/client.mjs +1 -1
- package/dist/components/biz/business/detail/video-detail-info/client.mjs +1 -1
- package/dist/components/biz/business/detail/video-detail-recommend/client.d.mts +13 -1
- package/dist/components/biz/business/detail/video-detail-recommend/client.mjs +1 -1
- package/dist/components/biz/business/header-search/header-avatar-icon/client.mjs +1 -1
- package/dist/components/biz/business/header-search/header-avatar-logo-search/client.d.mts +1 -1
- package/dist/components/biz/business/header-search/header-avatar-logo-search/client.mjs +1 -1
- package/dist/components/biz/business/header-search/header-avatar-logo-search/schema.d.mts +3 -4
- package/dist/components/biz/business/header-search/header-avatar-logo-search/schema.mjs +1 -1
- package/dist/components/biz/business/header-search/header-avatar-logo-search-icon/client.mjs +1 -1
- package/dist/components/biz/business/header-search/header-logo-search/client.mjs +1 -1
- package/dist/components/biz/business/header-search/header-search/client.mjs +1 -1
- package/dist/components/biz/business/header-search/shared/avatar.mjs +1 -1
- package/dist/components/biz/business/header-search/shared/logo.mjs +1 -1
- package/dist/components/biz/business/header-search/shared/search.mjs +1 -1
- package/dist/components/biz/business/home-recommend/home-recommend-grid/inspector-schema.d.mts +8 -0
- package/dist/components/biz/business/home-recommend/home-recommend-grid/inspector-schema.mjs +1 -1
- package/dist/components/biz/business/home-recommend/home-recommend-grid/material.d.mts +8 -0
- package/dist/components/biz/business/home-recommend/home-recommend-waterfall/inspector-schema.d.mts +8 -0
- package/dist/components/biz/business/home-recommend/home-recommend-waterfall/inspector-schema.mjs +1 -1
- package/dist/components/biz/business/home-recommend/home-recommend-waterfall/material.d.mts +8 -0
- package/dist/components/biz/business/home-recommend/shared/home-recommend-base.mjs +1 -1
- package/dist/components/biz/business/home-recommend/shared/home-recommend-preview.mjs +1 -1
- package/dist/components/biz/business/index.d.mts +3 -12
- package/dist/components/biz/business/large-feature-grid/card-item.mjs +1 -1
- package/dist/components/biz/business/large-feature-grid/client.mjs +1 -1
- package/dist/components/biz/business/large-feature-grid/schema.mjs +1 -1
- package/dist/components/biz/business/marquee/client.mjs +1 -1
- package/dist/components/biz/business/marquee/marquee.module.mjs +6 -2
- package/dist/components/biz/business/profile/index.d.mts +1 -1
- package/dist/components/biz/business/profile/profile-header/client.d.mts +1 -2
- package/dist/components/biz/business/profile/profile-header/client.mjs +1 -1
- package/dist/components/biz/business/profile/profile-header/index.d.mts +1 -1
- package/dist/components/biz/business/profile/profile-header/user-profile-avatar.mjs +1 -1
- package/dist/components/biz/business/profile/profile-header/user-profile-cover-background.mjs +1 -1
- package/dist/components/biz/business/profile/profile-main/client.mjs +1 -1
- package/dist/components/biz/business/profile/profile-main/shell.mjs +1 -1
- package/dist/components/biz/business/profile/profile-main/tabs/collect-tab/client.mjs +1 -1
- package/dist/components/biz/business/profile/profile-main/tabs/history-tab/client.mjs +1 -1
- package/dist/components/biz/business/profile/profile-main/tabs/like-tab/client.d.mts +1 -5
- package/dist/components/biz/business/profile/profile-main/tabs/like-tab/client.mjs +1 -1
- package/dist/components/biz/business/profile/profile-main/utils.mjs +1 -1
- package/dist/components/biz/business/search-history/client.mjs +1 -1
- package/dist/components/biz/business/search-history/schema.mjs +1 -1
- package/dist/components/biz/business/search-input/client.mjs +1 -1
- package/dist/components/biz/business/shortcut-grid/client.mjs +1 -1
- package/dist/components/biz/business/tab-bar/client.mjs +1 -1
- package/dist/components/common/collection-popup/collection-create-modal.mjs +2 -0
- package/dist/components/common/collection-popup/index.d.mts +0 -1
- package/dist/components/common/collection-popup/index.mjs +1 -1
- package/dist/components/common/icons/setting.mjs +1 -1
- package/dist/components/common/list/collection-list/collection-list-item.d.mts +0 -6
- package/dist/components/common/list/collection-list/collection-list-item.mjs +1 -1
- package/dist/components/common/list/collection-list/collection-list.d.mts +0 -6
- package/dist/components/common/list/collection-list/collection-list.mjs +1 -1
- package/dist/components/common/series-episodes/index.d.mts +1 -3
- package/dist/components/common/series-episodes/index.mjs +1 -1
- package/dist/components/common/skeleton/search-video-card-skeleton.mjs +2 -0
- package/dist/components/common/tab-bar/index.mjs +1 -1
- package/dist/components/pages/collection-detail/detail.mjs +1 -1
- package/dist/components/pages/edit/page.mjs +1 -1
- package/dist/components/pages/home/client.mjs +1 -1
- package/dist/components/pages/login/login-client.mjs +1 -1
- package/dist/components/pages/login/register.mjs +1 -1
- package/dist/components/pages/login/verify.mjs +4 -1
- package/dist/components/pages/search/page-client.mjs +1 -1
- package/dist/components/pages/search/search-result/index.mjs +1 -1
- package/dist/components/pages/search/search-result/search-all.mjs +1 -1
- package/dist/components/pages/search/search-result/search-user.mjs +1 -1
- package/dist/components/pages/search/search-result/search-video-info.mjs +1 -1
- package/dist/components/pages/search/search-utils.mjs +2 -0
- package/dist/components/pages/search/top-header.mjs +1 -1
- package/dist/components/pages/search-result/page-client.mjs +1 -1
- package/dist/components/pages/search-result/search-all.mjs +1 -1
- package/dist/components/pages/search-result/search-result-skeleton.mjs +2 -0
- package/dist/components/pages/search-result/search-tab.mjs +1 -1
- package/dist/components/pages/search-result/search-user.mjs +1 -1
- package/dist/components/pages/search-result/search-video.mjs +2 -0
- package/dist/components/pages/settings/_components/reset-password-drawer.mjs +3 -3
- package/dist/components/pages/settings/_components/settings.mjs +1 -1
- package/dist/components/pages/video-list/video-list-client.mjs +1 -1
- package/dist/components/pages/video-list/video-list-item.mjs +2 -0
- package/dist/components/pages/video-list/video-list-skeleton.d.mts +3 -2
- package/dist/components/pages/video-list/video-list-skeleton.mjs +1 -1
- package/dist/components/ui/badge.d.mts +1 -1
- package/dist/components/ui/box.d.mts +1 -1
- package/dist/components/ui/button.d.mts +2 -2
- package/dist/components/ui/empty.d.mts +1 -1
- package/dist/components/ui/image.d.mts +4 -4
- package/dist/components/ui/item.d.mts +1 -1
- package/dist/i18n/locales/en.mjs +2 -2
- package/dist/i18n/locales/zh-CN.mjs +2 -2
- package/dist/materials.d.mts +1 -6
- package/dist/materials.mjs +1 -1
- package/dist/service/generated/client.d.mts +2 -30
- package/dist/service/generated/client.mjs +1 -1
- package/dist/service/generated/tanstack.d.mts +2 -37
- package/dist/service/generated/tanstack.mjs +1 -1
- package/dist/service.d.mts +3 -3
- package/dist/service.mjs +1 -1
- package/dist/types.d.mts +7 -437
- package/dist/utils/helper.d.mts +1 -1
- package/dist/utils/helper.mjs +1 -1
- package/package.json +2 -7
- package/theme.css +59 -170
- package/dist/assets/icons/channel-list/channel-active-indicator.mjs +0 -2
- package/dist/assets/icons/common/header-menu.mjs +0 -2
- package/dist/assets/icons/common/header-search-icon.mjs +0 -2
- package/dist/assets/icons/common/right_arrow_thin.mjs +0 -2
- package/dist/assets/icons/marquee-close.mjs +0 -2
- package/dist/assets/icons/marquee-speaker.mjs +0 -2
- package/dist/assets/images/shortcut-grid/shortcut-grid-card-bg-primary.mjs +0 -2
- package/dist/components/biz/business/detail/video-detail-recommend/shared.mjs +0 -2
- package/dist/components/biz/business/detail/video-detail-waterfall-recommend/client.d.mts +0 -8
- package/dist/components/biz/business/detail/video-detail-waterfall-recommend/client.mjs +0 -2
- package/dist/components/biz/business/detail/video-detail-waterfall-recommend/index.d.mts +0 -5
- package/dist/components/biz/business/detail/video-detail-waterfall-recommend/material.d.mts +0 -45
- package/dist/components/biz/business/detail/video-detail-waterfall-recommend/material.mjs +0 -2
- package/dist/components/biz/business/detail/video-detail-waterfall-recommend/schema.d.mts +0 -9
- package/dist/components/biz/business/detail/video-detail-waterfall-recommend/schema.mjs +0 -2
- package/dist/components/biz/business/detail/video-detail-waterfall-recommend/server.d.mts +0 -11
- package/dist/components/biz/business/detail/video-detail-waterfall-recommend/server.mjs +0 -2
- package/dist/components/biz/business/header-search/shared/header-action.mjs +0 -2
- package/dist/components/biz/business/header-search/shared/header-search-icon.mjs +0 -2
- package/dist/components/biz/business/header-search/shared/header-shell.mjs +0 -2
- package/dist/components/biz/business/hot-recommend/client.d.mts +0 -17
- package/dist/components/biz/business/hot-recommend/client.mjs +0 -2
- package/dist/components/biz/business/hot-recommend/index.d.mts +0 -5
- package/dist/components/biz/business/hot-recommend/material.d.mts +0 -24
- package/dist/components/biz/business/hot-recommend/material.mjs +0 -2
- package/dist/components/biz/business/hot-recommend/schema.d.mts +0 -23
- package/dist/components/biz/business/hot-recommend/schema.mjs +0 -2
- package/dist/components/biz/business/hot-recommend/server.d.mts +0 -11
- package/dist/components/biz/business/hot-recommend/server.mjs +0 -2
- package/dist/components/biz/business/profile/profile-main/tabs/collect-tab/video-waterfall.mjs +0 -2
- package/dist/components/biz/business/ranking-recommend/client.d.mts +0 -15
- package/dist/components/biz/business/ranking-recommend/client.mjs +0 -70
- package/dist/components/biz/business/ranking-recommend/material.d.mts +0 -23
- package/dist/components/biz/business/ranking-recommend/material.mjs +0 -2
- package/dist/components/biz/business/ranking-recommend/schema.d.mts +0 -23
- package/dist/components/biz/business/ranking-recommend/schema.mjs +0 -2
- package/dist/components/biz/business/ranking-recommend/server.d.mts +0 -11
- package/dist/components/biz/business/ranking-recommend/server.mjs +0 -2
- package/dist/components/biz/business/ranking-recommend/shared.d.mts +0 -15
- package/dist/components/biz/business/ranking-recommend/shared.mjs +0 -2
- package/dist/components/biz/business/search-waterfall-recommend/client.d.mts +0 -9
- package/dist/components/biz/business/search-waterfall-recommend/client.mjs +0 -2
- package/dist/components/biz/business/search-waterfall-recommend/index.d.mts +0 -4
- package/dist/components/biz/business/search-waterfall-recommend/material.d.mts +0 -40
- package/dist/components/biz/business/search-waterfall-recommend/material.mjs +0 -2
- package/dist/components/biz/business/search-waterfall-recommend/server.d.mts +0 -8
- package/dist/components/biz/business/search-waterfall-recommend/server.mjs +0 -2
- package/dist/components/common/collection-popup/create-collection-sheet.d.mts +0 -41
- package/dist/components/common/collection-popup/create-collection-sheet.mjs +0 -2
- package/dist/components/common/list/collection-list/collection-select-icon.mjs +0 -2
- package/dist/components/common/list/waterfall-recommend/index.d.mts +0 -2
- package/dist/components/common/list/waterfall-recommend/waterfall-recommend.d.mts +0 -99
- package/dist/components/common/list/waterfall-recommend/waterfall-recommend.mjs +0 -2
- package/dist/components/pages/collection-detail/_components/collection-detail-video-card.mjs +0 -2
- package/dist/components/pages/login/auth-page-styles.mjs +0 -6
- package/dist/components/pages/search/search-result/shared.mjs +0 -2
- package/dist/components/pages/search-result/search-empty.mjs +0 -2
- package/dist/components/pages/search-result/search-video-info.mjs +0 -2
- package/dist/components/pages/search-result/shared.mjs +0 -2
- package/dist/components/pages/search-result/top-header.mjs +0 -2
- package/dist/components/pages/video-list/video-list-recommend-item.mjs +0 -2
- package/dist/theme-tokens.d.mts +0 -9
- package/dist/theme-tokens.mjs +0 -2
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
"use client";import{isClient as e}from"../../../../utils/common.mjs";import{pContentBatchGetVideoDetail as t}from"../../../../service/generated/client.mjs";import{Box as n}from"../../../ui/box.mjs";import{Text as r}from"../../../ui/text.mjs";import i from"../../../ui/link.mjs";import a from"../../../../assets/icons/common/right_arrow_thin.mjs";import{buildRankingCardList as o,normalizeContentId as s,resolveCoverDisplaySrc as c,resolveOrderedContentIds as l}from"./shared.mjs";import{useEffect as u,useMemo as d,useRef as f,useState as p}from"react";import{jsx as m,jsxs as h}from"react/jsx-runtime";function g(e){let t=e===`nebula`?`
|
|
3
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 138" fill="none">
|
|
4
|
-
<defs>
|
|
5
|
-
<linearGradient id="bg" x1="10" y1="6" x2="84" y2="132" gradientUnits="userSpaceOnUse">
|
|
6
|
-
<stop stop-color="#120B25"/>
|
|
7
|
-
<stop offset="0.45" stop-color="#28306D"/>
|
|
8
|
-
<stop offset="1" stop-color="#05030D"/>
|
|
9
|
-
</linearGradient>
|
|
10
|
-
<radialGradient id="cyan" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(33 34) rotate(62) scale(39 30)">
|
|
11
|
-
<stop stop-color="#74DEFF"/>
|
|
12
|
-
<stop offset="1" stop-color="#74DEFF" stop-opacity="0"/>
|
|
13
|
-
</radialGradient>
|
|
14
|
-
<radialGradient id="pink" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(72 28) rotate(118) scale(48 37)">
|
|
15
|
-
<stop stop-color="#FF51D7"/>
|
|
16
|
-
<stop offset="1" stop-color="#FF51D7" stop-opacity="0"/>
|
|
17
|
-
</radialGradient>
|
|
18
|
-
<linearGradient id="hair" x1="21" y1="30" x2="69" y2="109" gradientUnits="userSpaceOnUse">
|
|
19
|
-
<stop stop-color="#1E2A77"/>
|
|
20
|
-
<stop offset="1" stop-color="#5A1B6F"/>
|
|
21
|
-
</linearGradient>
|
|
22
|
-
</defs>
|
|
23
|
-
<rect width="100" height="138" rx="4" fill="url(#bg)"/>
|
|
24
|
-
<rect width="100" height="138" rx="4" fill="url(#cyan)"/>
|
|
25
|
-
<rect width="100" height="138" rx="4" fill="url(#pink)"/>
|
|
26
|
-
<path d="M12 47C20 28 34 18 49 18C67 18 82 31 85 53C79 46 71 42 60 42C48 42 39 47 30 58L12 47Z" fill="url(#hair)" opacity="0.95"/>
|
|
27
|
-
<path d="M28 70C28 50 38 36 52 36C64 36 73 46 73 62C73 82 62 100 50 100C38 100 28 89 28 70Z" fill="#F0E7FF"/>
|
|
28
|
-
<path d="M25 48C32 38 39 34 47 34C38 44 34 58 34 72C34 87 39 98 49 105C32 102 20 84 20 64C20 58 22 52 25 48Z" fill="#0E0D1A" opacity="0.9"/>
|
|
29
|
-
<path d="M53 43C63 44 71 54 71 67C71 75 68 82 63 87C60 81 58 73 58 64C58 56 60 49 63 44L53 43Z" fill="#EAE6FF" opacity="0.65"/>
|
|
30
|
-
<path d="M21 21L35 11L49 19L46 39L32 43L16 34L21 21Z" fill="#EFF4FF" opacity="0.82"/>
|
|
31
|
-
<path d="M20 20L35 11L41 18L29 28L21 21Z" fill="#74DEFF" opacity="0.8"/>
|
|
32
|
-
<circle cx="44" cy="63" r="4" fill="#2A2C63"/>
|
|
33
|
-
<circle cx="44.5" cy="62.5" r="1.5" fill="#D9ECFF"/>
|
|
34
|
-
<path d="M52 83C56 86 61 86 65 83" stroke="#C3B8F6" stroke-width="2" stroke-linecap="round"/>
|
|
35
|
-
<path d="M61 58L72 52" stroke="#7ED7FF" stroke-width="2.5" stroke-linecap="round" opacity="0.7"/>
|
|
36
|
-
<path d="M22 96C32 86 47 81 65 80" stroke="#FF7AE0" stroke-width="3" stroke-linecap="round" opacity="0.45"/>
|
|
37
|
-
</svg>
|
|
38
|
-
`:`
|
|
39
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 138" fill="none">
|
|
40
|
-
<defs>
|
|
41
|
-
<linearGradient id="bg" x1="17" y1="7" x2="83" y2="132" gradientUnits="userSpaceOnUse">
|
|
42
|
-
<stop stop-color="#12080D"/>
|
|
43
|
-
<stop offset="0.5" stop-color="#34111C"/>
|
|
44
|
-
<stop offset="1" stop-color="#04060D"/>
|
|
45
|
-
</linearGradient>
|
|
46
|
-
<radialGradient id="red" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(42 33) rotate(52) scale(34 30)">
|
|
47
|
-
<stop stop-color="#FF516E"/>
|
|
48
|
-
<stop offset="1" stop-color="#FF516E" stop-opacity="0"/>
|
|
49
|
-
</radialGradient>
|
|
50
|
-
<radialGradient id="cyan" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(70 79) rotate(118) scale(44 31)">
|
|
51
|
-
<stop stop-color="#3CC8FF"/>
|
|
52
|
-
<stop offset="1" stop-color="#3CC8FF" stop-opacity="0"/>
|
|
53
|
-
</radialGradient>
|
|
54
|
-
</defs>
|
|
55
|
-
<rect width="100" height="138" rx="4" fill="url(#bg)"/>
|
|
56
|
-
<rect width="100" height="138" rx="4" fill="url(#red)"/>
|
|
57
|
-
<rect width="100" height="138" rx="4" fill="url(#cyan)"/>
|
|
58
|
-
<path d="M7 74C9 46 24 26 46 24C68 22 84 40 87 69C80 62 71 57 58 57C40 57 25 64 7 74Z" fill="#080B13" opacity="0.86"/>
|
|
59
|
-
<path d="M33 39C40 31 48 27 56 27C69 27 79 40 79 58C79 84 64 105 48 105C34 105 23 90 23 69C23 57 27 47 33 39Z" fill="#F6F5FA"/>
|
|
60
|
-
<path d="M16 71C18 54 24 42 33 34C31 42 30 48 30 55C30 75 38 92 50 104C43 105 35 103 28 97C18 88 14 79 16 71Z" fill="#07090F"/>
|
|
61
|
-
<path d="M61 35L75 48L73 66L59 67L49 51L61 35Z" fill="#FFF7F4" opacity="0.95"/>
|
|
62
|
-
<path d="M55 44L66 40L72 46L66 54L57 54L55 44Z" fill="#FF5D6F"/>
|
|
63
|
-
<path d="M38 60C42 55 46 53 52 53C57 53 61 55 64 59" stroke="#141A2B" stroke-width="2.2" stroke-linecap="round"/>
|
|
64
|
-
<circle cx="43" cy="67" r="4" fill="#121624"/>
|
|
65
|
-
<circle cx="43.5" cy="66.5" r="1.5" fill="#DDF0FF"/>
|
|
66
|
-
<path d="M51 86C55 88 60 88 65 84" stroke="#C9C1D8" stroke-width="2" stroke-linecap="round"/>
|
|
67
|
-
<path d="M19 31L31 20L49 23L42 39L24 40L19 31Z" fill="#F8FCFF" opacity="0.82"/>
|
|
68
|
-
<path d="M14 99C31 84 49 77 70 77" stroke="#FF6773" stroke-width="3" stroke-linecap="round" opacity="0.45"/>
|
|
69
|
-
</svg>
|
|
70
|
-
`;return`data:image/svg+xml;charset=UTF-8,${encodeURIComponent(t)}`}const _=g(`nebula`),v=g(`crimson`),y=_,b={padding:`0.5px`,background:`linear-gradient(180deg, rgba(230,42,255,0.9) 5%, rgba(239,255,69,0.5) 30%, rgba(233,69,255,0.8) 55%, rgba(233,69,255,0.9) 100%)`,WebkitMask:`linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0)`,WebkitMaskComposite:`xor`,maskComposite:`exclude`},x={background:`rgba(83, 83, 83, 0.2)`},S={backdropFilter:`blur(4px)`,WebkitBackdropFilter:`blur(4px)`,maskImage:`linear-gradient(180deg, transparent 58.3%, black 100%)`,WebkitMaskImage:`linear-gradient(180deg, transparent 58.3%, black 100%)`},C=[{contentId:`mock-1`,title:`东野圭吾作品:11字谜案`,cover:_,category:`烧脑悬疑`,heatText:`2242万热度`,score:8.9,statusText:`完结`,href:`#`},{contentId:`mock-2`,title:`东野圭吾作品:11字谜案`,cover:v,category:`烧脑悬疑`,heatText:`2242万热度`,score:8.9,statusText:`完结`,href:`#`}];function w({filled:e,className:t=``}){return m(`svg`,{viewBox:`0 0 14 14`,fill:`none`,"aria-hidden":!0,className:t,children:m(`path`,{d:`M7 0.5L8.76 4.94L13.5 5.39L9.91 8.57L10.94 13.2L7 10.77L3.06 13.2L4.09 8.57L0.5 5.39L5.24 4.94L7 0.5Z`,fill:e?`#FFC039`:`rgba(255,255,255,0.3)`})})}function T({score:e}){let t=Math.ceil(e/2);return h(n,{className:`flex items-center gap-[8px]`,children:[m(n,{className:`flex items-center gap-[4px]`,children:Array.from({length:5},(e,n)=>m(w,{filled:n<t,className:`size-[14px]`},n))}),m(r,{className:`font-['DIN'] text-[12px] font-bold leading-normal text-[#FFC039]`,children:e.toFixed(1)})]})}function E({item:e,isEditor:t}){let a=c(e.cover,y),o=h(n,{className:`relative h-[158px] w-full`,children:[h(n,{className:`absolute left-0 top-[28px] h-[130px] w-full overflow-hidden rounded-[8px]`,children:[m(n,{className:`absolute inset-0 rounded-[8px]`,style:x}),m(n,{className:`pointer-events-none absolute rounded-full`,style:{left:`34px`,top:`-238px`,width:`385.969px`,height:`385.969px`,background:`radial-gradient(25.17% 25.17% at 64.27% 57.53%, #4F8DFF 0%, rgba(255,255,255,0) 100%)`,mixBlendMode:`overlay`,filter:`blur(50px)`}}),m(n,{className:`pointer-events-none absolute rounded-full`,style:{left:`210px`,top:`-75px`,width:`189px`,height:`187px`,background:`radial-gradient(50.27% 50.39% at 65.31% 48.07%, #FF5DEF 0%, rgba(255,255,255,0) 100%)`,mixBlendMode:`overlay`,filter:`blur(50px)`}}),m(n,{className:`pointer-events-none absolute inset-0 rounded-[8px]`,style:b})]}),h(n,{className:`absolute left-[16px] top-0 z-10 h-[138px] w-[100px] overflow-hidden rounded-[4px]`,children:[m(`img`,{src:a,alt:e.title,className:`absolute inset-0 size-full object-cover`}),m(n,{className:`pointer-events-none absolute inset-0 rounded-[4px]`,style:{background:`linear-gradient(180deg, rgba(8, 2, 17, 0) 44.64%, rgba(8, 2, 17, 0.7) 82.7%)`}}),m(n,{className:`pointer-events-none absolute inset-0 rounded-[4px]`,style:S}),e.statusText&&m(n,{className:`absolute bottom-[9px] right-[8px] flex h-[18px] w-[32px] items-center justify-center rounded-[4px] bg-white/20 p-[2px]`,children:m(r,{className:`font-['PingFang_SC'] text-[12px] leading-[14px] text-white`,children:e.statusText})})]}),h(n,{className:`absolute left-[132px] top-[58px] z-10 flex w-[210px] items-start justify-between`,children:[h(n,{className:`flex h-[71px] w-[152px] flex-col justify-between`,children:[h(n,{className:`flex flex-col gap-[4px]`,children:[m(r,{className:`line-clamp-1 font-['PingFang_SC'] text-[14px] font-medium leading-[20px] text-white`,children:e.title}),h(n,{className:`flex items-center gap-[10px] font-['PingFang_SC'] text-[14px] leading-[20px] text-white/60`,children:[e.category&&m(r,{className:`shrink-0 whitespace-nowrap`,children:e.category}),e.heatText&&m(r,{className:`shrink-0 whitespace-nowrap`,children:e.heatText})]})]}),e.score>0&&m(T,{score:e.score})]}),m(n,{"aria-hidden":!0,className:`size-[22px] shrink-0 opacity-0`})]})]});return t||!e.href||e.href===`#`?o:m(i,{href:e.href,className:`block`,children:o})}function D(i){let{title:c,items:g,prefetchItems:_,mode:v=`renderer`}=i,y=v===`editor`,b=(c??``).trim()||`推荐榜`,x=d(()=>y?[]:l(g),[g,y]),S=d(()=>Array.from(new Set(x)),[x]),w=d(()=>x.join(`,`),[x]),T=d(()=>Array.isArray(_)?_.map(e=>s(e.contentId)).join(`,`):``,[_]),[D,O]=p(()=>_??[]),k=f(``);u(()=>{y||(O(_??[]),k.current=T&&T===w?w:``)},[y,w,T,_]),u(()=>{if(y||!e()||!w||k.current===w)return;k.current=w;let n=!1;async function r(){try{let e=await t({ids:S},{cache:`no-store`}),r=Array.isArray(e.data?.videos)?e.data.videos:[];if(n)return;O(o(r,x))}catch(e){console.error(`推荐榜数据获取失败`,e)}}return r(),()=>{n=!0}},[y,x,w,S]);let A=y?C:D;return!y&&A.length===0?null:h(n,{className:`mt-[24px] w-full px-[16px]${y?` pointer-events-none`:``}`,children:[h(n,{className:`flex items-center justify-between`,children:[m(r,{className:`font-['PingFang_SC'] text-[18px] font-medium leading-[24px] text-white/90`,style:y?{textShadow:`0 1px 4px rgba(0,0,0,0.45)`}:void 0,children:b}),m(n,{className:`flex shrink-0 items-center justify-end gap-[2px] opacity-50`,style:y?{filter:`drop-shadow(0 1px 3px rgba(0,0,0,0.45))`}:void 0,children:m(n,{className:`overflow-hidden`,children:m(a,{className:`size-[24px] text-white`})})})]}),m(n,{className:`mt-[16px] flex flex-col gap-[16px]`,children:A.map((e,t)=>m(E,{item:e,isEditor:y},`${e.contentId}-${t}`))})]})}export{D as RankingRecommendClient};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { SchemaHasDefaultValue } from "../../../../utils/schema/schema.mjs";
|
|
3
|
-
import { DefineMaterialOption } from "../../../../utils/schema/material.mjs";
|
|
4
|
-
import "../../../../utils.mjs";
|
|
5
|
-
import { RankingRecommendClient } from "./client.mjs";
|
|
6
|
-
import { RankingRecommendServer } from "./server.mjs";
|
|
7
|
-
import * as zod from "zod";
|
|
8
|
-
import * as zod_v4_core0 from "zod/v4/core";
|
|
9
|
-
|
|
10
|
-
//#region components/biz/business/ranking-recommend/material.d.ts
|
|
11
|
-
declare const rankingRecommendMaterial: DefineMaterialOption<typeof RankingRecommendServer, typeof RankingRecommendClient, zod.ZodObject<{
|
|
12
|
-
readonly title: zod.ZodString & SchemaHasDefaultValue;
|
|
13
|
-
readonly items: zod.ZodArray<zod.ZodObject<{
|
|
14
|
-
id: zod.ZodString & SchemaHasDefaultValue;
|
|
15
|
-
}, zod_v4_core0.$strip>> & SchemaHasDefaultValue;
|
|
16
|
-
} & {
|
|
17
|
-
mode: zod.ZodOptional<zod.ZodEnum<{
|
|
18
|
-
renderer: "renderer";
|
|
19
|
-
editor: "editor";
|
|
20
|
-
}>>;
|
|
21
|
-
}, zod_v4_core0.$strip>, "ranking-recommend", "内容组件">;
|
|
22
|
-
//#endregion
|
|
23
|
-
export { rankingRecommendMaterial };
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import{defineMaterial as e}from"../../../../utils/schema/material.mjs";import{RankingRecommendClient as t}from"./client.mjs";import{rankingRecommendInspectorPropsSchema as n}from"./schema.mjs";import{RankingRecommendServer as r}from"./server.mjs";const i=e({type:`ranking-recommend`,name:`推荐榜`,icon:`/static/components-thumb/search_recommend_text.png`,category:`内容组件`,serverComponent:r,clientComponent:t,propsSchema:n});export{i as rankingRecommendMaterial};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { InferSchemaProps, SchemaHasDefaultValue } from "../../../../utils/schema/schema.mjs";
|
|
3
|
-
import "../../../../utils.mjs";
|
|
4
|
-
import { z } from "zod";
|
|
5
|
-
|
|
6
|
-
//#region components/biz/business/ranking-recommend/schema.d.ts
|
|
7
|
-
/**
|
|
8
|
-
* 推荐榜物料属性定义
|
|
9
|
-
*/
|
|
10
|
-
declare const rankingRecommendInspectorPropsSchema: z.ZodObject<{
|
|
11
|
-
readonly title: z.ZodString & SchemaHasDefaultValue;
|
|
12
|
-
readonly items: z.ZodArray<z.ZodObject<{
|
|
13
|
-
id: z.ZodString & SchemaHasDefaultValue;
|
|
14
|
-
}, z.core.$strip>> & SchemaHasDefaultValue;
|
|
15
|
-
} & {
|
|
16
|
-
mode: z.ZodOptional<z.ZodEnum<{
|
|
17
|
-
renderer: "renderer";
|
|
18
|
-
editor: "editor";
|
|
19
|
-
}>>;
|
|
20
|
-
}, z.core.$strip>;
|
|
21
|
-
type RankingRecommendInspectorProps = InferSchemaProps<typeof rankingRecommendInspectorPropsSchema>;
|
|
22
|
-
//#endregion
|
|
23
|
-
export { RankingRecommendInspectorProps };
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import{defineComponentPropsSchema as e,getSchemaDefaultProps as t}from"../../../../utils/schema/schema.mjs";import{z as n}from"zod";const r=e(e=>({title:e.string(`推荐榜`,{label:`标题名称`,description:`支持输入,中/英/数/符,6个字符`}),items:e.array(n.object({id:e.string(``,{label:`内容ID`})}),{label:`推荐榜内容`,defaultValue:[{id:`22edc8693ebbdaf1`},{id:`22edc8693ebbdaf1`}]})}));t(r);export{r as rankingRecommendInspectorPropsSchema};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { RankingRecommendProps } from "./client.mjs";
|
|
3
|
-
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
|
-
|
|
5
|
-
//#region components/biz/business/ranking-recommend/server.d.ts
|
|
6
|
-
/**
|
|
7
|
-
* 推荐榜物料组件 - 服务端部分
|
|
8
|
-
*/
|
|
9
|
-
declare function RankingRecommendServer(props: RankingRecommendProps): Promise<react_jsx_runtime0.JSX.Element>;
|
|
10
|
-
//#endregion
|
|
11
|
-
export { RankingRecommendServer };
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import{pContentBatchGetVideoDetail as e}from"../../../../service/generated/client.mjs";import{buildRankingCardList as t,resolveOrderedContentIds as n}from"./shared.mjs";import{RankingRecommendClient as r}from"./client.mjs";import{jsx as i}from"react/jsx-runtime";const a=[];async function o(o){let{mode:s=`renderer`,items:c=a,...l}=o,u=o.prefetchItems;if(s===`renderer`){let r=n(c),i=Array.from(new Set(r));if(i.length>0)try{let n=await e({ids:i},{cache:`no-store`});u=t(Array.isArray(n.data?.videos)?n.data.videos:[],r)}catch(e){console.warn(`[ranking-recommend] server prefetch failed:`,e)}}return i(r,{...l,items:c,mode:s,prefetchItems:u})}export{o as RankingRecommendServer};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
//#region components/biz/business/ranking-recommend/shared.d.ts
|
|
3
|
-
/** 推荐榜卡片渲染数据。 */
|
|
4
|
-
interface RankingCardItem {
|
|
5
|
-
contentId: string;
|
|
6
|
-
title: string;
|
|
7
|
-
cover: string;
|
|
8
|
-
category: string;
|
|
9
|
-
heatText: string;
|
|
10
|
-
score: number;
|
|
11
|
-
statusText: string;
|
|
12
|
-
href: string;
|
|
13
|
-
}
|
|
14
|
-
//#endregion
|
|
15
|
-
export { RankingCardItem };
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import e from"../../../../utils/get-res-url.mjs";import{getPostDetailPagePath as t}from"../../../../utils/tools.mjs";function n(e){return typeof e==`string`?e.trim():String(e??``).trim()}function r(e){return Array.isArray(e)?e.map(e=>n(e?.id)).filter(Boolean):[]}function i(t,n=``){let r=typeof t==`string`?t.trim():``;if(!r)return n;if(r.startsWith(`http`)||r.startsWith(`//`)||r.startsWith(`data:`))return r;let i=e();return i?`${i}${r.startsWith(`/`)?r:`/${r}`}`:r}function a(e){return!e||!Number.isFinite(e)||e<=0?``:e>=1e4?`${(e/1e4).toFixed(e>=1e5?0:1).replace(/\.0$/,``)}万热度`:e>=1e3?`${(e/1e3).toFixed(1).replace(/\.0$/,``)}K热度`:`${Math.floor(e)}热度`}function o(e){let t=n(e.update_status);return t===`1`?`完结`:t===`0`?`连载中`:``}function s(e){let r=n(e.id||e.mid||e.video_id),i=Number(e.play_count??e.browse_count??0),s=Number(e.score??0);return{contentId:r,title:n(e.name),cover:n(e.img_y||e.img_x),category:n(e.cat_name),heatText:a(i),score:Number.isFinite(s)?s:0,statusText:o(e),href:r?t({id:r,contentType:0}):`#`}}function c(e,t){let r=new Map;return e.forEach(e=>{let t=n(e.id||e.mid||e.video_id);t&&r.set(t,e)}),t.map(e=>r.get(e)).filter(e=>!!e).map(s)}export{c as buildRankingCardList,n as normalizeContentId,i as resolveCoverDisplaySrc,r as resolveOrderedContentIds};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { ImageTextRecommendProps } from "../image-text-recommend/client.mjs";
|
|
3
|
-
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
|
-
|
|
5
|
-
//#region components/biz/business/search-waterfall-recommend/client.d.ts
|
|
6
|
-
type SearchWaterfallRecommendProps = ImageTextRecommendProps;
|
|
7
|
-
declare function SearchWaterfallRecommendClient(props: SearchWaterfallRecommendProps): react_jsx_runtime0.JSX.Element | null;
|
|
8
|
-
//#endregion
|
|
9
|
-
export { SearchWaterfallRecommendClient, SearchWaterfallRecommendProps };
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
"use client";import e from"../../../../utils/get-res-url.mjs";import{pContentBatchGetVideoDetail as t,pContentGetPopularVideoList as n}from"../../../../service/generated/client.mjs";import{pContentBatchGetVideoDetailKey as r,pContentGetPopularVideoListKey as i}from"../../../../service/generated/tanstack.mjs";import{IMAGE_TEXT_RECOMMEND_FIXED_BATCH_SIZE as a,buildImageTextRecommendChosenTags as o,buildImageTextRecommendRemoteMap as s,buildImageTextRecommendSmartPicked as c,getImageTextRecommendFixedIds as l,getImageTextRecommendLayoutTags as u,resolveImageTextRecommendVideoId as ee}from"../../../../hooks/image-text-recommend.mjs";import{useRequest as d}from"../../../../hooks/query/use-query.mjs";import{WaterfallRecommend as f}from"../../../common/list/waterfall-recommend/waterfall-recommend.mjs";import te from"../../../../assets/images/frame.mjs";import{buildSmartPopularQuery as ne,buildStableChosenTags as re}from"../image-text-recommend/shared/query.mjs";import{useCallback as p,useEffect as m,useMemo as h,useRef as ie,useState as g}from"react";import{jsx as ae}from"react/jsx-runtime";import{useTranslations as oe}from"next-intl";const _=[],se=[{contentId:`mock-1`,title:`热门视频标题 1`,cover:``,badge:``,episodeOrDurationText:`更新至12集`,playCountText:`12.5k`,showPlayCount:!0,showEpisodes:!0,detailPath:``,score:8.5,cardKind:`tall`},{contentId:`mock-2`,title:`热门视频标题 2`,cover:``,badge:``,episodeOrDurationText:`02:35`,playCountText:`3.2k`,showPlayCount:!0,showEpisodes:!0,detailPath:``,score:7.2,cardKind:`short`},{contentId:`mock-3`,title:`热门视频标题 3`,cover:``,badge:``,episodeOrDurationText:`全24集`,playCountText:`45.8k`,showPlayCount:!0,showEpisodes:!0,detailPath:``,score:9.1,cardKind:`short`},{contentId:`mock-4`,title:`热门视频标题 4`,cover:``,badge:``,episodeOrDurationText:`01:20:00`,playCountText:`8.7k`,showPlayCount:!0,showEpisodes:!0,detailPath:``,score:6.8,cardKind:`tall`},{contentId:`mock-5`,title:`热门视频标题 5`,cover:``,badge:``,episodeOrDurationText:`更新至6集`,playCountText:`1.1k`,showPlayCount:!0,showEpisodes:!0,detailPath:``,cardKind:`tall`},{contentId:`mock-6`,title:`热门视频标题 6`,cover:``,badge:``,episodeOrDurationText:`05:42`,playCountText:`520`,showPlayCount:!0,showEpisodes:!0,detailPath:``,score:7.9,cardKind:`short`}];function ce(e){return typeof e==`string`?e:e.src}function v(t,n){let r=typeof t==`string`?t.trim():``;if(!r)return n||``;if(r.startsWith(`http`)||r.startsWith(`//`)||r.startsWith(`data:`)||r.startsWith(`/`))return r;let i=e();return i?`${i}/${r.replace(/^\/+/,``)}`:r}function y(e){if(e==null)return``;let t=e;return t.img_y||t.media?.img_y||t.img_x||t.media?.img_x||``}function b(e){if(e==null)return``;let t=e;return String(t.name||``).trim()}function x(e,t=!1){let n=e,r=t?n.type:n.content_type;return typeof r==`number`?r:n.is_more_link===!0||Number(n.episode_cnt||n.episode_count||n.episodes?.length||n.links?.length||0)>1?2:1}function S(e){if(!Number.isFinite(e)||e<=0)return``;let t=Math.floor(e),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 C(e,t){let n=e,r=n?.links?.length??0;if(!Number.isFinite(r)||r<=0)return``;let i=n.update_status;return t(r,i===0||i===`0`)}function le(e,t,n){return e?x(e,n)===2&&t?C(e,t):S(Number(e.duration??e.detail?.duration??0)):``}function ue(e,t){if(!(e??``).trim())return``;let n=encodeURIComponent((t??``).trim()||``);return`/video/${e.trim()}/${n}/episode/1`}function de(e,t){if(!e)return``;let n=e,r=t?Number(n.static?.browse_count??0):Number(n.browse_count??0);if(!Number.isFinite(r)||r<=0)return``;if(r>=1e6){let e=(r/1e6).toFixed(1);return e.endsWith(`.0`)?`${e.slice(0,-2)}M`:`${e}M`}if(r>=1e3){let e=(r/1e3).toFixed(1);return e.endsWith(`.0`)?`${e.slice(0,-2)}k`:`${e}k`}return Math.floor(r).toString()}function fe(){let e=new Date,t=new Date(e);return t.setHours(24,0,0,0),t.getTime()-e.getTime()}function pe(e){return String(e?.img_type??``).trim().toLowerCase()===`long`?`short`:`tall`}function me(e){let t=Number(e);if(!(!Number.isFinite(t)||t<=0))return t>10&&t<=100?t/10:Math.min(t,10)}function he(e){let t=[],n=[],r=0,i=0;return e.forEach(e=>{let a=(e.cardKind===`short`?120:218)+16;r<=i?(t.push(e),r+=a):(n.push(e),i+=a)}),{left:t,right:n}}function w(e){let{title:x,items:S=_,commonPlayCount:C,commonEpisodes:w,layout:T,mode:E=`renderer`}=e,D=oe(`components.biz.business.imageTextRecommend`),O=E===`renderer`,k=E===`editor`,[A,j]=g({}),[M,N]=g([]),[P,F]=g(0),[I,L]=g(void 0),R=ie(null),z=!!T?.enabled,B=h(()=>u(T),[T]),V=S?.length??0,H=h(()=>l(S,z),[z,S]),U=h(()=>H.slice(0,a),[H]),W=h(()=>re(B,V),[B,V]),G=h(()=>ne(W,V),[W,V]),{data:K}=d(i(G),()=>n(G),{enabled:O&&!k&&z&&S.length>0,staleTime:1/0}),{data:q}=d(r({ids:U}),()=>t({ids:U}),{enabled:O&&!k&&!z&&U.length>0,staleTime:1/0}),J=h(()=>z&&V>a?Math.ceil(V/a):H.length>0?Math.ceil(H.length/a):0,[z,V,H.length]),Y=p((e,t)=>D(t?`updatedTo`:`allEpisodes`,{count:e}),[D]),ge=p(async(e,n)=>{if(e.length===0)return;let r=s((await t({ids:e})).data?.videos??[]);j(e=>n?{...e,...r}:r)},[]);m(()=>{if(k)return;if(z){let e=K?.data?.videos??[];V>a?(N(e.slice(0,a)),L(K?.data?.cursor),F(e.length>0?1:0)):(N(c(e,W,V)),F(0)),j({});return}if(U.length===0){j({}),N([]),F(0),L(void 0);return}let e=q?.data?.videos??[];j(s(e)),N([]),L(void 0),F(e.length>0?1:0)},[k,z,K,q,W,U,V]),m(()=>{if(k||J<1||P<1||P>=J)return;let e=R.current;if(!e)return;let t=new IntersectionObserver(e=>{let[t]=e;if(!t?.isIntersecting)return;let r=P;if(z){let e=o(B,V);n({page_size:a,cursor:I,tags:e.length?Array.from(new Set(e)):void 0}).then(e=>{let t=e.data?.videos??[];N(e=>[...e,...t.slice(0,a)]),L(e.data?.cursor),F(r+1)}).catch(()=>{})}else{let e=r*a,t=H.slice(e,e+a);t.length>0&&(ge(t,!0),F(r+1))}},{root:null,rootMargin:`0px`,threshold:0});return t.observe(e),()=>t.disconnect()},[k,z,H,P,J,B,V,I,ge]),m(()=>{if(k||!z||V<=0)return;let e,t=!1;function r(){e=window.setTimeout(()=>{let e=o(B,V);n({page_size:Math.max(20,V*10),tags:e.length?Array.from(new Set(e)):void 0}).then(n=>{t||N(c(n.data?.videos??[],e,V))}).catch(()=>{t||N([])}).finally(()=>{t||r()})},fe())}return r(),()=>{t=!0,e!==void 0&&window.clearTimeout(e)}},[k,z,B,V]);let X=h(()=>!S||S.length===0?_:k?S:z&&V>a?S.slice(0,M.length):S,[S,k,z,V,M.length]),Z=h(()=>X.length?k?se.slice(0,X.length):X.map((e,t)=>{let n=String(e?.contentId??``).trim(),r=z?M[t]:n?A[n]:void 0,i=n||(r?ee(r):``),a=z?r?b(r):String(e?.title??``).trim():String(e?.title??``).trim()||(r?b(r):``),o=String(e?.cover??``).trim(),s=z?y(r)||o:o||(e?.useVideoPoster?y(r):``),c=le(r,Y,z),l=de(r,z),u=E===`renderer`?ue(i,a):``,d=z?!!C:!!e.showPlayCount,f=z?!!w:!!e.showEpisodes;return{contentId:i,title:a,cover:s,badge:z?``:String(e?.badge??``).trim(),episodeOrDurationText:c,playCountText:l,showPlayCount:d,showEpisodes:f,detailPath:u,score:me(r?.score),cardKind:pe(r)}}):[],[w,C,Y,k,z,X,E,A,M]),Q=P>=1&&P<J?z?M.length-2:P*a-2:-1;m(()=>{Q<0&&(R.current=null)},[Q]);let $=h(()=>{let e=ce(te);return Z.map((t,n)=>{let r=t.showEpisodes?t.episodeOrDurationText.trim():``,i=t.showPlayCount?t.playCountText.trim():``;return{key:t.contentId?`search-waterfall-${t.contentId}-${n}`:`search-waterfall-${n}`,sourceIndex:n,href:t.detailPath||`#`,cardKind:t.cardKind,coverUrl:v(t.cover,e),title:t.title,badgeImageUrl:v(t.badge),metaPrimaryText:r,heatText:i,score:t.score}})},[Z]),_e=h(()=>he($),[$]),ve=(x??``).trim(),ye=`flex-1 min-w-0 text-[18px] leading-[24px] font-medium line-clamp-1 ${k?`text-[#1F1F1F]`:`text-text2`}`,be=p(({item:e})=>{if(e.sourceIndex===Q)return e=>{R.current=e}},[Q]);return!S||S.length===0?null:ae(f,{title:ve,columns:_e,sectionClassName:k?`mt-[24px] w-full pointer-events-none`:`mt-[24px] w-full`,titleClassName:ye,containerClassName:`relative flex w-full gap-[15px] px-[16px]`,getItemRef:be})}export{w as default};
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { SchemaHasDefaultValue } from "../../../../utils/schema/schema.mjs";
|
|
3
|
-
import { DefineMaterialOption } from "../../../../utils/schema/material.mjs";
|
|
4
|
-
import "../../../../utils.mjs";
|
|
5
|
-
import { SearchWaterfallRecommendClient } from "./client.mjs";
|
|
6
|
-
import { SearchWaterfallRecommendServer } from "./server.mjs";
|
|
7
|
-
import * as zod from "zod";
|
|
8
|
-
import * as zod_v4_core0 from "zod/v4/core";
|
|
9
|
-
|
|
10
|
-
//#region components/biz/business/search-waterfall-recommend/material.d.ts
|
|
11
|
-
declare const searchWaterfallRecommendMaterial: DefineMaterialOption<typeof SearchWaterfallRecommendServer, typeof SearchWaterfallRecommendClient, zod.ZodObject<{
|
|
12
|
-
readonly title: zod.ZodString & SchemaHasDefaultValue;
|
|
13
|
-
readonly moduleCount: zod.ZodNumber & SchemaHasDefaultValue;
|
|
14
|
-
readonly layout: zod.ZodObject<{
|
|
15
|
-
readonly enabled: zod.ZodBoolean & SchemaHasDefaultValue;
|
|
16
|
-
readonly tags: zod.ZodArray<zod.ZodString> & SchemaHasDefaultValue;
|
|
17
|
-
}, zod_v4_core0.$strip> | zod.ZodOptional<zod.ZodObject<{
|
|
18
|
-
readonly enabled: zod.ZodBoolean & SchemaHasDefaultValue;
|
|
19
|
-
readonly tags: zod.ZodArray<zod.ZodString> & SchemaHasDefaultValue;
|
|
20
|
-
}, zod_v4_core0.$strip>>;
|
|
21
|
-
readonly commonPlayCount: zod.ZodBoolean & SchemaHasDefaultValue;
|
|
22
|
-
readonly commonEpisodes: zod.ZodBoolean & SchemaHasDefaultValue;
|
|
23
|
-
readonly items: zod.ZodArray<zod.ZodObject<{
|
|
24
|
-
readonly contentId: zod.ZodString & SchemaHasDefaultValue;
|
|
25
|
-
readonly title: zod.ZodString & SchemaHasDefaultValue;
|
|
26
|
-
readonly contentDescription: zod.ZodString & SchemaHasDefaultValue;
|
|
27
|
-
readonly cover: zod.ZodString & SchemaHasDefaultValue;
|
|
28
|
-
readonly useVideoPoster: zod.ZodBoolean & SchemaHasDefaultValue;
|
|
29
|
-
readonly showPlayCount: zod.ZodBoolean & SchemaHasDefaultValue;
|
|
30
|
-
readonly showEpisodes: zod.ZodBoolean & SchemaHasDefaultValue;
|
|
31
|
-
readonly badge: zod.ZodString & SchemaHasDefaultValue;
|
|
32
|
-
}, zod_v4_core0.$strip>> & SchemaHasDefaultValue;
|
|
33
|
-
} & {
|
|
34
|
-
mode: zod.ZodOptional<zod.ZodEnum<{
|
|
35
|
-
renderer: "renderer";
|
|
36
|
-
editor: "editor";
|
|
37
|
-
}>>;
|
|
38
|
-
}, zod_v4_core0.$strip>, "search-waterfall-recommend", "内容组件">;
|
|
39
|
-
//#endregion
|
|
40
|
-
export { searchWaterfallRecommendMaterial };
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import{defineMaterial as e}from"../../../../utils/schema/material.mjs";import{imageTextRecommendInspectorPropsSchema as t}from"../image-text-recommend/schema.mjs";import n from"./client.mjs";import{SearchWaterfallRecommendServer as r}from"./server.mjs";const i=e({type:`search-waterfall-recommend`,name:`瀑布流`,icon:`/static/components-thumb/grid_waterfall_two_column.png`,category:`内容组件`,serverComponent:r,clientComponent:n,propsSchema:t});export{i as searchWaterfallRecommendMaterial};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { SearchWaterfallRecommendProps } from "./client.mjs";
|
|
3
|
-
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
|
-
|
|
5
|
-
//#region components/biz/business/search-waterfall-recommend/server.d.ts
|
|
6
|
-
declare function SearchWaterfallRecommendServer(props: SearchWaterfallRecommendProps): Promise<react_jsx_runtime0.JSX.Element>;
|
|
7
|
-
//#endregion
|
|
8
|
-
export { SearchWaterfallRecommendServer };
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import{pContentBatchGetVideoDetail as e,pContentGetPopularVideoList as t}from"../../../../service/generated/client.mjs";import{pContentBatchGetVideoDetailKey as n,pContentGetPopularVideoListKey as r}from"../../../../service/generated/tanstack.mjs";import{IMAGE_TEXT_RECOMMEND_FIXED_BATCH_SIZE as i,getImageTextRecommendFixedIds as a,getImageTextRecommendLayoutTags as o}from"../../../../hooks/image-text-recommend.mjs";import{HydrationBoundary as s}from"../../../../hooks/query/hydration-boundary.mjs";import{buildSmartPopularQuery as c,buildStableChosenTags as l}from"../image-text-recommend/shared/query.mjs";import u from"./client.mjs";import{jsx as d}from"react/jsx-runtime";const f=[];async function p(p){let{mode:m=`renderer`,...h}=p,g=h.items??f,_=h.layout,v=[],y=!!_?.enabled,b=a(g,y),x=o(_),S=g?.length??0;if(m===`renderer`&&g?.length)try{if(y){let e=c(l(x,S),S),n=await t(e);v.push({queryKey:r(e),queryFn:()=>Promise.resolve(n)})}else if(b.length>0){let t={ids:b.length<=i?b:b.slice(0,i)},r=await e(t);v.push({queryKey:n(t),queryFn:()=>Promise.resolve(r)})}}catch(e){console.warn(`[search-waterfall-recommend] server prefetch failed:`,e)}return d(s,{prefetch:v,children:d(u,{...h,mode:m})})}export{p as SearchWaterfallRecommendServer};
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
|
-
|
|
4
|
-
//#region components/common/collection-popup/create-collection-sheet.d.ts
|
|
5
|
-
interface CollectionSheetFormState {
|
|
6
|
-
title: string;
|
|
7
|
-
description: string;
|
|
8
|
-
}
|
|
9
|
-
interface CreateCollectionSheetProps {
|
|
10
|
-
/** 是否显示弹窗。 */
|
|
11
|
-
visible: boolean;
|
|
12
|
-
/** 弹窗模式。 */
|
|
13
|
-
mode?: 'create' | 'edit';
|
|
14
|
-
/** 编辑模式下的收藏夹 ID。 */
|
|
15
|
-
collectionId?: string;
|
|
16
|
-
/** 编辑模式的初始值。 */
|
|
17
|
-
initialValues?: Partial<CollectionSheetFormState>;
|
|
18
|
-
/** 弹窗关闭回调。 */
|
|
19
|
-
onClose?: () => void;
|
|
20
|
-
/** 创建成功回调。 */
|
|
21
|
-
onCreated?: () => void;
|
|
22
|
-
/** 编辑成功回调。 */
|
|
23
|
-
onUpdated?: () => void;
|
|
24
|
-
/** 通用成功回调。 */
|
|
25
|
-
onSuccess?: () => void;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* 创建/编辑收藏夹底部抽屉弹窗。
|
|
29
|
-
*/
|
|
30
|
-
declare function CreateCollectionSheet({
|
|
31
|
-
visible,
|
|
32
|
-
mode,
|
|
33
|
-
collectionId,
|
|
34
|
-
initialValues,
|
|
35
|
-
onClose,
|
|
36
|
-
onCreated,
|
|
37
|
-
onUpdated,
|
|
38
|
-
onSuccess
|
|
39
|
-
}: CreateCollectionSheetProps): react_jsx_runtime0.JSX.Element;
|
|
40
|
-
//#endregion
|
|
41
|
-
export { CreateCollectionSheet };
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
"use client";import{cn as e}from"../../../utils/cn.mjs";import{useUserStore as t}from"../../../store/modules/user-store.mjs";import{gCommunityGetCollectionInfo as n,pCommunityCreateCollection as r,pCommunityUpdateCollection as i}from"../../../service/generated/client.mjs";import{Box as a}from"../../ui/box.mjs";import{InputGroup as o,InputGroupAddon as s,InputGroupTextarea as c}from"../../ui/input-group.mjs";import{useDeleteRequest as l,useRequest as u}from"../../../hooks/query/use-query.mjs";import d from"../../ui/popup.mjs";import{useCallback as f,useEffect as p,useMemo as m,useRef as h,useState as g}from"react";import{XIcon as _}from"lucide-react";import{jsx as v,jsxs as y}from"react/jsx-runtime";import{toast as b}from"sonner";import{useTranslations as x}from"next-intl";const S=2e3;function C(e){return{title:e?.title??``,description:e?.description??``}}function w({visible:w,mode:T=`create`,collectionId:E,initialValues:D,onClose:O,onCreated:k,onUpdated:A,onSuccess:j}){let M=x(`components.pages.collectionCreate`),N=x(`components.common.collectionPopup`),{userId:P}=t(),F=l(),I=T===`edit`,L=D?.title!==void 0||D?.description!==void 0,R=w&&I&&!!E&&!L,z=typeof document>`u`?void 0:document.body,B=h(!1),[V,H]=g(!1),[U,W]=g(()=>C()),G=u([`collection-detail`,E,`sheet`],()=>n({collection_id:E}),{enabled:R}),K=G.data?.data?.data?.collection;p(()=>{w||(B.current=!1,H(!1))},[w]),p(()=>{if(!(!w||B.current)){if(!I){W(C()),B.current=!0;return}if(L){W(C(D)),B.current=!0;return}K&&(W(C({title:K.title,description:K.description})),B.current=!0)}},[K,L,D,I,w]);let q=f((e,t)=>{W(n=>({...n,[e]:t}))},[]),J=m(()=>R&&!B.current&&G.isLoading,[G.isLoading,R]),Y=M(I?`form.editTitle`:`form.createTitle`),X=I?M(`form.save`):N(`createModalAction`),Z=M(I?`form.saving`:`form.creating`);function Q(e){e||O?.()}function $(e){P&&(F([`user-profile`,`mine`]),F([`user-profile`,`mine`,P]),F([`user-profile`,`mine`,P,`user-collection-created`,P])),e&&F([`collection-detail`,e])}async function ee(){if(V)return;let e=U.title.trim(),t=U.description.trim();if(!e){b.error(M(`form.titleRequired`));return}if(!t){b.error(M(`form.descriptionRequired`));return}if(I&&!E){b.error(M(`form.collectionNotFound`));return}let n=b.loading(Z);try{H(!0);let a=I?await i({collection_id:E,title:e,description:t,cover_image:``}):await r({title:e,description:t,cover_image:``});if(a.code!==0){b.error(a.message||M(I?`form.saveFailed`:`form.createFailed`),{id:n});return}$(E),b.success(I?N(`updateSuccess`):M(`form.createSuccess`),{id:n}),j?.(),I?A?.():k?.(),O?.()}catch(e){console.error(I?`编辑收藏夹失败`:`创建收藏夹失败`,e),b.error(M(I?`form.saveFailed`:`form.createFailed`),{id:n})}finally{H(!1)}}return v(d,{open:w,onOpenChange:Q,showCloseButton:!1,className:`!z-[1210] max-h-[85vh] rounded-t-[24px] bg-[var(--color-surface-panel-dark)] p-0 text-[var(--color-text-primary)] backdrop-blur-[50px]`,overlayClassName:`!z-[1200] overlay-create-collection`,overlayForceRender:!0,portalContainer:z,children:y(`div`,{className:`flex flex-col pb-[34px]`,children:[y(`div`,{className:`flex h-14 items-center justify-between px-4`,children:[v(`span`,{className:`text-lg font-medium text-[var(--color-text-primary)]`,children:Y}),v(`button`,{type:`button`,className:`flex h-6 w-6 items-center justify-center rounded text-[var(--color-text-primary)] opacity-60 hover:opacity-100`,onClick:()=>O?.(),"aria-label":`关闭`,children:v(_,{size:24})})]}),y(`div`,{className:`flex flex-col gap-4 px-4`,children:[y(a,{className:`flex flex-col gap-2`,children:[y(`label`,{className:`text-sm text-[var(--color-text-dimmed)]`,children:[v(`span`,{className:`text-[var(--color-border-required)]`,children:`* `}),M(`form.label`)]}),y(o,{className:e(`min-h-[160px] rounded-2xl border border-transparent bg-[var(--color-surface-field-bg)] px-4 py-3`,`focus-within:!border-[var(--color-border-danger)] focus-within:!ring-0`,J?`opacity-60`:``),children:[v(c,{maxLength:S,className:`min-h-[120px] resize-none bg-transparent text-sm text-[var(--color-text-primary)] placeholder:text-[var(--color-text-quaternary)] focus-visible:ring-0 focus-visible:ring-offset-0`,placeholder:M(`form.titlePlaceholder`),value:U.title,onChange:e=>q(`title`,e.target.value),disabled:V||J}),y(s,{align:`block-end`,className:`flex items-center justify-end gap-2 bg-transparent px-0`,children:[y(`span`,{className:`text-sm text-[var(--color-text-disabled)]`,children:[U.title.length,`/`,S]}),v(`button`,{type:`button`,className:`text-sm text-[var(--color-text-disabled)] hover:text-[var(--color-text-primary)] disabled:opacity-50`,onClick:()=>q(`title`,``),disabled:V||J,children:M(`form.clear`)})]})]})]}),y(a,{className:`flex flex-col gap-2`,children:[y(`label`,{className:`text-sm text-[var(--color-text-dimmed)]`,children:[v(`span`,{className:`text-[var(--color-border-required)]`,children:`* `}),M(`form.descriptionLabel`)]}),y(o,{className:e(`min-h-[160px] rounded-2xl border border-transparent bg-[var(--color-surface-field-bg)] px-4 py-3 focus-within:ring-0`,`focus-within:!border-[var(--color-border-danger)]`,J?`opacity-60`:``),children:[v(c,{maxLength:S,className:`min-h-[120px] resize-none bg-transparent text-sm text-[var(--color-text-primary)] placeholder:text-[var(--color-text-quaternary)] focus-visible:ring-0 focus-visible:ring-offset-0`,placeholder:M(`form.descriptionPlaceholder`),value:U.description,onChange:e=>q(`description`,e.target.value),disabled:V||J}),y(s,{align:`block-end`,className:`flex items-center justify-end gap-2 bg-transparent px-0`,children:[y(`span`,{className:`text-sm text-[var(--color-text-disabled)]`,children:[U.description.length,`/`,S]}),v(`button`,{type:`button`,className:`text-sm text-[var(--color-text-disabled)] hover:text-[var(--color-text-primary)] disabled:opacity-50`,onClick:()=>q(`description`,``),disabled:V||J,children:M(`form.clear`)})]})]})]}),v(`button`,{type:`button`,className:`h-12 w-full max-w-[358px] self-center rounded-[var(--radius-pill)] text-base font-medium text-[var(--color-text-primary)] transition-opacity hover:opacity-90 disabled:pointer-events-none disabled:opacity-50`,style:{background:`var(--gradient-action-button)`},onClick:ee,disabled:V||J,children:V?Z:X})]})]})})}export{w as CreateCollectionSheet};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
"use client";import{jsx as e,jsxs as t}from"react/jsx-runtime";function n(){return e(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,children:e(`circle`,{cx:`12`,cy:`12`,r:`10`,fill:`var(--color-neutral-white)`,fillOpacity:`0.3`,stroke:`var(--color-neutral-white)`,strokeOpacity:`0.7`,strokeWidth:`2`})})}function r(){return t(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,children:[e(`circle`,{cx:`12`,cy:`12`,r:`10`,fill:`var(--color-brand-tag-gradient-start)`,stroke:`var(--color-brand-tag-gradient-start)`,strokeWidth:`2`}),e(`path`,{d:`M16.2929 8.29289C16.6834 7.90237 17.3164 7.90237 17.707 8.29289C18.0975 8.68342 18.0975 9.31643 17.707 9.70696L11.707 15.707C11.3164 16.0975 10.6834 16.0975 10.2929 15.707L7.29289 12.707C6.90237 12.3164 6.90237 11.6834 7.29289 11.2929C7.68342 10.9024 8.31643 10.9024 8.70696 11.2929L10.9999 13.5859L16.2929 8.29289Z`,fill:`var(--color-neutral-white)`})]})}export{n as CollectionSelectIcon,r as CollectionSelectedIcon};
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { ReactNode } from "react";
|
|
3
|
-
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
|
-
|
|
5
|
-
//#region components/common/list/waterfall-recommend/waterfall-recommend.d.ts
|
|
6
|
-
type WaterfallRecommendCardKind = 'tall' | 'short';
|
|
7
|
-
type WaterfallRecommendColumnName = 'left' | 'right';
|
|
8
|
-
/**
|
|
9
|
-
* 瀑布流卡片纯 UI 数据。
|
|
10
|
-
* 外部负责把业务数据组织成这个结构后传入。
|
|
11
|
-
*/
|
|
12
|
-
interface WaterfallRecommendItem {
|
|
13
|
-
/** 唯一 key。 */
|
|
14
|
-
key: string;
|
|
15
|
-
/** 原始序号,便于外部做曝光/分页触发。 */
|
|
16
|
-
sourceIndex: number;
|
|
17
|
-
/** 卡片跳转链接。 */
|
|
18
|
-
href: string;
|
|
19
|
-
/** 卡片高度类型。 */
|
|
20
|
-
cardKind: WaterfallRecommendCardKind;
|
|
21
|
-
/** 封面地址。 */
|
|
22
|
-
coverUrl?: string;
|
|
23
|
-
/** 标题。 */
|
|
24
|
-
title: string;
|
|
25
|
-
/** 左上角角标。 */
|
|
26
|
-
badgeImageUrl?: string;
|
|
27
|
-
/** 左上角文字标签(如"独播")。 */
|
|
28
|
-
badgeText?: string;
|
|
29
|
-
/** 右上角集数文字(如"24集全")。 */
|
|
30
|
-
episodeText?: string;
|
|
31
|
-
/** 标题下第一行辅助文案。 */
|
|
32
|
-
metaPrimaryText?: string;
|
|
33
|
-
/** 热度文案。 */
|
|
34
|
-
heatText?: string;
|
|
35
|
-
/** 评分,0-10。 */
|
|
36
|
-
score?: number;
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* 瀑布流左右列数据。
|
|
40
|
-
* 外部负责完成分列后传入。
|
|
41
|
-
*/
|
|
42
|
-
interface WaterfallRecommendColumns {
|
|
43
|
-
left: WaterfallRecommendItem[];
|
|
44
|
-
right: WaterfallRecommendItem[];
|
|
45
|
-
}
|
|
46
|
-
interface WaterfallRecommendProps {
|
|
47
|
-
/** 区块标题。 */
|
|
48
|
-
title: string;
|
|
49
|
-
/** 右上角“更多”链接。 */
|
|
50
|
-
moreHref?: string;
|
|
51
|
-
/** 右上角“更多”点击事件。 */
|
|
52
|
-
onMoreClick?: () => void;
|
|
53
|
-
/** 右上角“更多”图标。 */
|
|
54
|
-
moreIcon?: ReactNode;
|
|
55
|
-
/** 区块数据。 */
|
|
56
|
-
columns: WaterfallRecommendColumns;
|
|
57
|
-
/** 外层区块样式类。 */
|
|
58
|
-
sectionClassName?: string;
|
|
59
|
-
/** 标题行样式类。 */
|
|
60
|
-
headerClassName?: string;
|
|
61
|
-
/** 标题样式类。 */
|
|
62
|
-
titleClassName?: string;
|
|
63
|
-
/** 更多入口样式类。 */
|
|
64
|
-
moreLinkClassName?: string;
|
|
65
|
-
/** 内容区样式类。 */
|
|
66
|
-
containerClassName?: string;
|
|
67
|
-
/** 容器内覆盖层。 */
|
|
68
|
-
overlay?: ReactNode;
|
|
69
|
-
/** 底部附加内容。 */
|
|
70
|
-
footer?: ReactNode;
|
|
71
|
-
/**
|
|
72
|
-
* 外部注入 item ref,用于分页触发、首行测量等逻辑。
|
|
73
|
-
*/
|
|
74
|
-
getItemRef?: (params: {
|
|
75
|
-
item: WaterfallRecommendItem;
|
|
76
|
-
column: WaterfallRecommendColumnName;
|
|
77
|
-
columnIndex: number;
|
|
78
|
-
}) => ((node: HTMLDivElement | null) => void) | undefined;
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* 纯 UI 瀑布流组件。
|
|
82
|
-
*/
|
|
83
|
-
declare function WaterfallRecommend({
|
|
84
|
-
title,
|
|
85
|
-
moreHref,
|
|
86
|
-
onMoreClick,
|
|
87
|
-
moreIcon,
|
|
88
|
-
columns,
|
|
89
|
-
sectionClassName,
|
|
90
|
-
headerClassName,
|
|
91
|
-
titleClassName,
|
|
92
|
-
moreLinkClassName,
|
|
93
|
-
containerClassName,
|
|
94
|
-
overlay,
|
|
95
|
-
footer,
|
|
96
|
-
getItemRef
|
|
97
|
-
}: WaterfallRecommendProps): react_jsx_runtime0.JSX.Element;
|
|
98
|
-
//#endregion
|
|
99
|
-
export { WaterfallRecommend, WaterfallRecommendCardKind, WaterfallRecommendColumnName, WaterfallRecommendColumns, WaterfallRecommendItem, WaterfallRecommendProps };
|
|
@@ -1,2 +0,0 @@
|
|
|
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 r from"../../../ui/link.mjs";import{jsx as i,jsxs as a}from"react/jsx-runtime";const o={backgroundImage:`var(--gradient-card-mask-strong)`},s={color:`var(--color-brand-rating)`};function c({title:e,moreHref:o,onMoreClick:s,moreIcon:c,columns:u,sectionClassName:d=`w-full`,headerClassName:f=`mb-[16px] flex items-center justify-between px-[16px]`,titleClassName:p=`flex-1 min-w-0 text-[18px] leading-[24px] font-medium line-clamp-1 text-text2`,moreLinkClassName:m=`ml-[8px] flex size-[24px] shrink-0 items-center justify-center opacity-50`,containerClassName:h=`relative flex w-full gap-[15px] px-[16px]`,overlay:g,footer:_,getItemRef:v}){return a(t,{className:d,children:[a(t,{className:f,children:[i(n,{className:p,children:e}),c&&o&&i(r,{href:o,"aria-label":`更多`,className:m,children:c}),c&&!o&&s&&i(`button`,{type:`button`,"aria-label":`更多`,className:m,onClick:s,children:c})]}),a(t,{className:h,children:[i(t,{className:`flex-1 min-w-0 flex flex-col`,children:u.left.map((e,t)=>i(`div`,{ref:v?.({item:e,column:`left`,columnIndex:t}),children:i(l,{item:e})},e.key))}),i(t,{className:`flex-1 min-w-0 flex flex-col`,children:u.right.map((e,t)=>i(`div`,{ref:v?.({item:e,column:`right`,columnIndex:t}),children:i(l,{item:e})},e.key))}),g]}),_]})}function l({item:s}){let c=s.cardKind===`short`?120:218,l=!!s.metaPrimaryText||!!s.heatText,f=s.cardKind===`short`?`absolute inset-x-0 bottom-0 z-10 flex flex-col justify-end px-[10px] pb-[14px]`:`absolute inset-x-0 bottom-0 z-10 flex flex-col justify-end px-[9px] pb-[14px]`;return i(r,{href:s.href,className:`mb-[16px] block w-full`,children:a(t,{className:`relative w-full overflow-hidden rounded-[8px] bg-[#18111f]`,style:{height:`${c}px`},children:[s.coverUrl&&i(e,{src:s.coverUrl,alt:s.title||`推荐封面`,fill:!0,objectFit:`cover`,className:`object-cover`}),i(t,{className:`pointer-events-none absolute inset-0 rounded-[8px]`,style:o,"aria-hidden":!0}),(s.badgeImageUrl||s.badgeText||s.episodeText)&&a(t,{className:`absolute left-[8px] right-[8px] top-[8px] z-10 flex items-center justify-between`,children:[a(t,{className:`flex items-center`,children:[s.badgeImageUrl&&i(u,{url:s.badgeImageUrl}),!s.badgeImageUrl&&s.badgeText&&i(t,{className:`flex items-center justify-center rounded-[4px] px-[4px] py-[2px]`,style:{backgroundImage:`linear-gradient(90deg, #CA3FE9 0%, #9756E3 100%)`},children:i(n,{className:`text-[10px] font-semibold leading-[14px] text-white`,children:s.badgeText})})]}),s.episodeText&&i(n,{className:`text-[14px] leading-[18px] text-white`,children:s.episodeText})]}),i(t,{className:f,children:a(t,{className:`flex flex-col gap-[4px]`,children:[a(t,{className:`flex min-w-0 flex-col gap-[2px]`,children:[i(n,{as:`h3`,className:`line-clamp-1 text-[14px] leading-[20px] font-medium text-text1`,children:s.title}),l&&a(t,{className:`flex min-w-0 items-center gap-[10px] text-[14px] leading-[20px] font-normal text-text3`,children:[s.metaPrimaryText&&i(n,{as:`span`,className:`min-w-0 truncate text-[14px] leading-[20px] font-normal text-text3`,children:s.metaPrimaryText}),s.heatText&&i(n,{as:`span`,className:`shrink-0 text-[14px] leading-[20px] font-normal text-text3`,children:s.heatText})]})]}),s.score!==void 0&&i(d,{score:s.score})]})})]})})}function u({url:t}){return i(e,{src:t,alt:`角标`,width:96,height:18,className:`h-[18px] w-auto max-w-[96px] object-contain`})}function d({score:e}){let r=Math.max(0,Math.min(e,10)),o=Math.ceil(r/2);return a(t,{className:`flex items-center gap-[8px]`,children:[i(t,{className:`flex h-[14px] w-[86px] items-center gap-[4px]`,children:Array.from({length:5},(e,t)=>i(f,{active:t<o},`waterfall-star-${t}`))}),i(n,{as:`span`,className:`font-mono font-bold text-[12px] leading-[15px]`,style:s,children:e.toFixed(1)})]})}function f({active:e}){return i(t,{className:`size-[14px] shrink-0`,children:i(p,{className:e?``:`opacity-25`,style:s})})}function p({className:e,style:t}){return i(`svg`,{viewBox:`0 0 14 14`,fill:`currentColor`,"aria-hidden":!0,className:`size-full ${e||``}`.trim(),style:t,children:i(`path`,{d:`M7 0.75L8.775 4.348L12.75 4.926L9.875 7.728L10.554 11.686L7 9.818L3.446 11.686L4.125 7.728L1.25 4.926L5.225 4.348L7 0.75Z`})})}export{c as WaterfallRecommend};
|
package/dist/components/pages/collection-detail/_components/collection-detail-video-card.mjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
"use client";import{cn as e}from"../../../../utils/cn.mjs";import{Image as t}from"../../../ui/image.mjs";import{Text as n}from"../../../ui/text.mjs";import{CollectionSelectIcon as r,CollectionSelectedIcon as i}from"../../../common/list/collection-list/collection-select-icon.mjs";import{jsx as a,jsxs as o}from"react/jsx-runtime";import{useTranslations as s}from"next-intl";import c from"next/link";function l(e){return a(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`18`,height:`14`,viewBox:`0 0 18 14`,fill:`none`,...e,children:a(`path`,{d:`M11.34 6.138L7.5195 4.0635C7.3395 3.9645 7.1415 3.9105 6.957 3.9105C6.4035 3.9105 6.003 4.3335 6.003 4.9185V8.991C6.003 9.576 6.4035 9.999 6.957 9.999C7.146 9.999 7.3395 9.945 7.5195 9.8505L11.358 7.776C11.7045 7.587 11.907 7.29 11.907 6.966C11.907 6.6375 11.7 6.3315 11.34 6.138ZM14.7105 0L3.1995 1.1205C1.431 1.1205 0 2.5515 0 4.32V9.7155C0 11.484 1.431 12.915 3.1995 12.915L14.715 13.914C16.4835 13.914 17.9145 12.483 17.9145 10.7145V3.1995C17.9133 2.35053 17.5752 1.53673 16.9745 0.936838C16.3737 0.336945 15.5595 -8.37344e-07 14.7105 0ZM16.3125 10.7145C16.3125 10.9243 16.2712 11.132 16.1909 11.3258C16.1106 11.5197 15.9929 11.6958 15.8446 11.8441C15.6963 11.9924 15.5202 12.1101 15.3263 12.1904C15.1325 12.2707 14.9248 12.312 14.715 12.312L3.1995 11.313C2.98971 11.313 2.78198 11.2717 2.58816 11.1914C2.39435 11.1111 2.21824 10.9934 2.0699 10.8451C1.92156 10.6968 1.80388 10.5207 1.7236 10.3268C1.64332 10.133 1.602 9.92529 1.602 9.7155V4.32C1.602 3.89632 1.77031 3.48999 2.0699 3.1904C2.36949 2.89081 2.77582 2.7225 3.1995 2.7225L14.7105 1.602C14.9203 1.602 15.128 1.64332 15.3218 1.7236C15.5157 1.80388 15.6918 1.92156 15.8401 2.0699C15.9884 2.21824 16.1061 2.39435 16.1864 2.58816C16.2667 2.78198 16.308 2.98971 16.308 3.1995V10.7145H16.3125Z`,fill:`currentColor`})})}function u(e){let t=Number.isFinite(e)?Math.max(0,Math.floor(e||0)):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 d(e){let t=Number.isFinite(e)?Math.max(0,Math.floor(e||0)):0;return t>=1e8?`${(t/1e8).toFixed(1).replace(/\.0$/,``)}亿`:t>=1e4?`${(t/1e4).toFixed(1).replace(/\.0$/,``)}w`:`${t}`}function f({id:f,title:p,coverImage:m,duration:h=0,episodeCount:g=0,viewCount:_=0,is_more_link:v=!1,isEditMode:y=!1,isSelected:b=!1,onToggleSelection:x}){let S=s(`components.ui.list.videoList`),C=`/video/${f}/${p}`,w=S(v?`videoListItem.series`:`videoListItem.movie`),T=v?g>0?`${g}集全`:``:u(h),E=d(_);function D(){x?.(f)}function O(e){(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),D())}return o(`div`,{className:`relative w-full`,children:[o(`div`,{className:`relative h-[228px] w-full overflow-hidden rounded-[8px]`,children:[a(t,{src:m||`/empty/default-cover.png`,alt:p||S(`videoListItem.coverAlt`),fill:!0,className:`object-cover`}),a(`div`,{className:`pointer-events-none absolute inset-0 rounded-[8px] bg-[linear-gradient(180deg,rgba(8,2,17,0.56)_3.289%,rgba(8,2,17,0)_27.697%,rgba(8,2,17,0.8)_74.178%)]`}),y&&a(`div`,{className:`absolute left-3 top-3 z-20`,children:a(b?i:r,{})}),!y&&o(`div`,{className:e(`absolute left-2 right-2 top-3 z-10 flex items-start justify-between gap-2`),children:[a(`div`,{className:`inline-flex h-5 items-center justify-center rounded-[4px] bg-white/20 px-1 text-center text-[12px] leading-[14px] text-white`,children:a(n,{className:`text-[12px] leading-[14px] text-white`,children:w})}),T?a(n,{className:`shrink-0 text-[14px] leading-4 text-white`,children:T}):null]}),o(`div`,{className:`absolute bottom-3 left-[10px] right-[10px] z-10 flex items-end gap-2`,children:[a(n,{className:`min-w-0 flex-1 line-clamp-2 text-[16px] font-normal leading-6 text-[var(--color-text-white80)]`,dangerouslySetInnerHTML:{__html:p}}),o(`div`,{className:`mb-1 flex shrink-0 items-center gap-1 text-[12px] leading-5 text-white`,children:[a(l,{className:`h-[14px] w-[18px] opacity-80`}),a(n,{className:`text-[12px] leading-5 text-white`,children:E})]})]})]}),y?a(`button`,{type:`button`,className:`absolute inset-0 z-30 block w-full rounded-[8px] text-left`,onClick:D,onKeyDown:O,"aria-pressed":b,children:a(`span`,{className:`sr-only`,children:p||S(`videoListItem.coverAlt`)})}):a(c,{href:C,className:`absolute inset-0 z-30 block rounded-[8px]`,"aria-label":p||S(`videoListItem.coverAlt`)})]})}export{f as CollectionDetailVideoCard};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
const e={backgroundColor:`var(--color-surface-panel-dark)`,backgroundImage:`
|
|
3
|
-
radial-gradient(88% 52% at 8% 3%, rgba(144, 18, 255, 0.32) 0%, rgba(144, 18, 255, 0.14) 32%, rgba(6, 3, 21, 0) 70%),
|
|
4
|
-
radial-gradient(72% 48% at 100% 100%, rgba(108, 67, 238, 0.16) 0%, rgba(6, 3, 21, 0) 70%),
|
|
5
|
-
linear-gradient(180deg, #080211 0%, #060315 100%)
|
|
6
|
-
`},t={backgroundImage:`var(--gradient-brand-tag)`,backgroundClip:`text`,WebkitBackgroundClip:`text`,color:`transparent`};export{t as authGradientTextStyle,e as authPanelBackgroundStyle};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import{getPostDetailPagePath as e}from"../../../../utils/tools.mjs";const t=[{label:`综合`,value:1},{label:`最新`,value:2},{label:`最热`,value:3}];function n(e){return!Number.isFinite(e)||e<=0?``:e>=1e8?`${(e/1e8).toFixed(1).replace(/\.0$/,``)}亿热度`:e>=1e4?`${(e/1e4).toFixed(1).replace(/\.0$/,``)}万热度`:`${Math.floor(e)}热度`}function r(e){let t=Number(e);if(!(!Number.isFinite(t)||t<=0))return t>10&&t<=100?t/10:Math.min(t,10)}function i(e){return String(e.img_type??``).trim().toLowerCase()===`long`?`short`:`tall`}function a(e){let t=[],n=[],r=0,i=0;return e.forEach(e=>{let a=(e.cardKind===`short`?120:218)+16;if(r<=i){t.push(e),r+=a;return}n.push(e),i+=a}),{left:t,right:n}}function o(e){return String(e.name||``).trim()}function s(e){return e.img_y||e.img_x||``}function c(e){return String(e.group_name||e.description||``).trim()}function l(t){let n=String(t.video_id||``).trim();return n?e({id:n,contentType:0}):`#`}function u(e){return a(e.filter(e=>String(e.video_id||``).trim()).map((e,t)=>({key:`${e.video_id??`video`}-${t}`,sourceIndex:t,href:l(e),cardKind:i(e),coverUrl:s(e),title:o(e),metaPrimaryText:c(e),heatText:n(Number(e.play_count||0)),score:r(e.score)})))}function d(e){for(let t of e)if(typeof t==`string`&&t.trim())return t.trim();return``}function f(e){return d([e.nick_name,e.nickname,e.display_id,e.user_id])}function p(e){return d([e.signature,e.description,e.text,e.introduce,e.bio])}function m(e){let t=Number(e||0);return!Number.isFinite(t)||t<=0?`0`:t>=1e8?`${(t/1e8).toFixed(1).replace(/\.0$/,``)}亿`:t>=1e4?`${(t/1e4).toFixed(1).replace(/\.0$/,``)}万`:`${Math.floor(t)}`}export{t as SEARCH_RESULT_SORT_OPTIONS,u as buildSearchVideoWaterfallColumns,m as formatSearchFollowerCount,p as resolveSearchUserDescription,f as resolveSearchUserName};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
"use client";import{Box as e}from"../../ui/box.mjs";import{Text as t}from"../../ui/text.mjs";import{jsx as n,jsxs as r}from"react/jsx-runtime";function i(){return r(`svg`,{width:`64`,height:`64`,viewBox:`0 0 64 64`,fill:`none`,"aria-hidden":!0,children:[n(`path`,{d:`M0 56V8C0 3.58172 3.58172 0 8 0H44.1975L63.9564 19.1496V56C63.9564 60.4183 60.3747 64 55.9564 64H8C3.58172 64 0 60.4183 0 56Z`,fill:`#1B1829`,stroke:`#322F3E`}),n(`path`,{d:`M44.198 11.2184V0L63.9996 19.2184H52.198C47.7797 19.2184 44.198 15.6367 44.198 11.2184Z`,fill:`#302D3E`}),n(`path`,{transform:`translate(20.982, 21.076)`,d:`M10.0632 0C15.621 0 20.1265 4.50548 20.1265 10.0632C20.1265 12.2975 19.3968 14.3606 18.1649 16.0304L21.5505 19.415C22.1398 20.0045 22.1399 20.961 21.5505 21.5505C20.961 22.1399 20.0045 22.1398 19.415 21.5505L16.0304 18.1649C14.3606 19.3968 12.2975 20.1265 10.0632 20.1265C4.50548 20.1265 0 15.621 0 10.0632C0 4.50548 4.50548 0 10.0632 0ZM10.0632 3.01897C6.17282 3.01897 3.01897 6.17282 3.01897 10.0632C3.01897 13.9537 6.17282 17.1075 10.0632 17.1075C13.9537 17.1075 17.1075 13.9537 17.1075 10.0632C17.1075 6.17282 13.9537 3.01897 10.0632 3.01897Z`,fill:`#54525E`})]})}function a({text:a}){return r(e,{className:`flex flex-1 flex-col items-center pt-[72px]`,children:[n(i,{}),n(t,{className:`mt-[16px] text-center text-[15px] font-normal text-[#54525E]`,children:a})]})}export{a as SearchResultEmpty};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
"use client";import{gContentGetRecommendVideoList as e}from"../../../service/generated/client.mjs";import{Box as t}from"../../ui/box.mjs";import{InfiniteScroll as n}from"../../ui/infinite-scroll.mjs";import{Skeleton as r}from"../../ui/skeleton.mjs";import{usePaginated as i}from"../../../hooks/query/use-query.mjs";import{getPostDetailPagePath as a}from"../../../utils/tools.mjs";import o from"../../../assets/icons/common/right_arrow_thin.mjs";import{WaterfallRecommend as s}from"../../common/list/waterfall-recommend/waterfall-recommend.mjs";import{SearchResultEmpty as c}from"./search-empty.mjs";import{memo as l,useCallback as u,useMemo as d}from"react";import{jsx as f,jsxs as p}from"react/jsx-runtime";import{useTranslations as m}from"next-intl";function h(){return p(t,{className:`flex w-full justify-between gap-[16px] px-[16px]`,children:[p(t,{className:`flex w-[171px] shrink-0 flex-col gap-[16px]`,children:[f(r,{className:`h-[218px] w-[171px] rounded-[8px] bg-white/8`}),f(r,{className:`h-[120px] w-[171px] rounded-[8px] bg-white/8`}),f(r,{className:`h-[218px] w-[171px] rounded-[8px] bg-white/8`})]}),p(t,{className:`flex w-[171px] shrink-0 flex-col gap-[16px]`,children:[f(r,{className:`h-[120px] w-[171px] rounded-[8px] bg-white/8`}),f(r,{className:`h-[218px] w-[171px] rounded-[8px] bg-white/8`}),f(r,{className:`h-[120px] w-[171px] rounded-[8px] bg-white/8`})]})]})}function g(e){let t=Number(e);if(!(!Number.isFinite(t)||t<=0))return t>10&&t<=100?t/10:Math.min(t,10)}function _(e){return String(e.img_type??``).trim().toLowerCase()===`long`?`short`:`tall`}function v(e){let t=String(e.source_tags||``).trim();if(t)return t.split(`,`)[0]?.trim()||void 0}function y(e){let t=Number(e.episode_count||0);if(!t||t<=0)return;let n=Number(e.update_status??-1);return n===1?`${t}集全`:n===0?`更新中`:`${t}集`}function b(e){let t=Number(e||0);return!Number.isFinite(t)||t<=0?``:t>=1e4?`${(t/1e4).toFixed(t>=1e5?0:1).replace(/\.0$/,``)}W`:t>=1e3?`${(t/1e3).toFixed(1).replace(/\.0$/,``)}K`:`${Math.floor(t)}`}function x(e){let t=e.filter(e=>String(e.video_id||``).trim()).map((e,t)=>{let n=String(e.video_id||``).trim(),r=String(e.name||``).trim(),i=String(e.group_name||e.description||``).trim();return{key:`${n}-${t}`,sourceIndex:t,href:n?a({id:n,contentType:0}):`#`,cardKind:_(e),coverUrl:String(e.img_y||e.img_x||``).trim(),title:r,badgeText:v(e),episodeText:y(e),metaPrimaryText:i||void 0,heatText:b(e.play_count)||void 0,score:g(e.score)}}),n=[],r=[],i=0,o=0;return t.forEach(e=>{let t=(e.cardKind===`short`?120:218)+16;i<=o?(n.push(e),i+=t):(r.push(e),o+=t)}),{left:n,right:r}}function S(){return f(o,{className:`size-[16px]`})}const C=l(({list:e,title:t,onMoreClick:n,sectionClassName:r=`w-full`})=>{let i=d(()=>x(e),[e]);return e.length===0?null:f(s,{title:t||``,columns:i,sectionClassName:r,titleClassName:`min-w-0 flex-1 text-[18px] leading-[24px] font-medium line-clamp-1 text-white`,moreLinkClassName:`ml-[8px] flex size-[24px] shrink-0 items-center justify-center text-white/50`,moreIcon:n?f(S,{}):void 0,onMoreClick:n})});C.displayName=`SearchVideoWaterfall`;const w=l(({inputVal:r,sort:a,refreshVersion:o})=>{let s=m(`components.pages.search.searchResult`),l=u(async t=>await e({data_type:2,extra_params:JSON.stringify({type:3,keywords:r,sort:a}),page:t||1,page_size:20}),[r,a]),g=i({key:d(()=>[`search-result`,`video`,r,a,o],[r,o,a]),initialPageParam:1,async queryFn(e){return(await l(e))?.data?.videos??{has_more:!1,total:0,list:[]}},getNextPageParam(e,t){if(e.has_more)return t.length+1}}),_=d(()=>(g.data?.pages??[]).flatMap(e=>e.list??[]),[g.data?.pages]),v=!!((g.isPending||g.isFetching)&&_.length===0),y=u(async()=>{try{await g.fetchNextPage()}catch(e){console.error(`获取视频搜索结果失败`,e)}},[g]);return v?f(h,{}):_.length===0?f(c,{text:s(`searchVideoInfo.noRelevantContent`)}):p(t,{className:`w-full pb-[24px]`,children:[f(C,{list:_}),g.hasNextPage&&f(n,{loadMore:async e=>y(),hasMore:g.hasNextPage,className:`w-full`})]})});w.displayName=`SearchVideoInfo`;export{C as SearchVideoWaterfall,w as default};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
const e=[{label:`综合`,value:1},{label:`最新`,value:2},{label:`最热`,value:3}];function t(e){for(let t of e)if(typeof t==`string`&&t.trim())return t.trim();return``}function n(e){return t([e.nick_name,e.nickname,e.display_id,e.user_id])}function r(e){return t([e.signature,e.description,e.text,e.introduce,e.bio])}function i(e){let t=Number(e||0);return!Number.isFinite(t)||t<=0?`0`:t>=1e8?`${(t/1e8).toFixed(1).replace(/\.0$/,``)}亿`:t>=1e4?`${(t/1e4).toFixed(1).replace(/\.0$/,``)}万`:`${Math.floor(t)}`}export{e as SEARCH_RESULT_SORT_OPTIONS,i as formatSearchFollowerCount,r as resolveSearchUserDescription,n as resolveSearchUserName};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
"use client";import{useRouter as e}from"../../../utils/use-compatible-router.mjs";import{Input as t}from"../../ui/input.mjs";import{toast as n}from"../../../ui.mjs";import{useKeepAliveEffect as r,useKeepAliveState as i}from"../../common/keep-scroll-position/index.mjs";import{LeftArrowIcon as a}from"../../common/icons/left-arrow.mjs";import{memo as o,useCallback as s}from"react";import{jsx as c,jsxs as l}from"react/jsx-runtime";import{useSearchParams as u}from"next/navigation";import{useTranslations as d}from"next-intl";const f=o(({setSearchInputVal:o,initInputVal:f,initInputVersion:p,addSearchHistory:m})=>{let h=d(`components.pages.search`),g=e(),[_,v]=i(`search-input-val`,``),y=u().get(`q`),b=e=>{v(e.target.value)},x=s(e=>{o(e),m(e)},[m,o]);r(()=>{f&&(v(f),x(f))},[x,f,p,v],`search-init-input-effect`),r(()=>{y&&(v(y),x(y))},[x,v,y],`search-url-params-effect`);function S(){if(n.dismiss(),window.location.search.split(`from_code=`)[1]){g.push(`/`);return}g.back()}return c(`div`,{className:`app-top-nav w-full`,children:l(`header`,{className:`flex h-[60px] items-center gap-[8px] px-[16px] pb-[10px] pt-[16px]`,children:[c(`button`,{type:`button`,"aria-label":`返回`,className:`flex size-[24px] shrink-0 items-center justify-center text-white`,onClick:S,children:c(a,{className:`h-[16px] w-[16px]`})}),c(`div`,{className:`relative h-[34px] min-w-0 flex-1`,children:l(`div`,{className:`flex h-full min-w-0 flex-1 items-center overflow-hidden rounded-[100px] border-[0.5px] border-[rgba(230,42,255,0.9)] bg-black/40 backdrop-blur-[2px]`,children:[c(`div`,{className:`flex h-full min-w-0 flex-1 items-center pl-[20px] pr-[8px]`,children:c(t,{placeholder:h(`topHeader.placeholder`),maxLength:20,value:_,className:`!h-[24px] !w-full !rounded-none !border-0 !bg-transparent !px-0 !py-0 !text-[14px] !leading-[24px] !text-white/90 placeholder:!text-white/90`,onChange:b,onKeyDown:e=>{if(e.key===`Enter`){if(e.preventDefault(),!_.trim())return;x(_.trim())}}})}),c(`button`,{type:`button`,className:`mx-[2px] flex h-[30px] w-[56px] shrink-0 items-center justify-center rounded-[100px] bg-[linear-gradient(90deg,#9756E3_0%,#6C43EE_100%)] text-[14px] leading-[20px] text-white`,onClick:()=>{_.trim()&&x(_.trim())},children:h(`topHeader.search`)})]})})]})})});f.displayName=`SearchTopHeader`;export{f as default};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
"use client";import{useRouter as e}from"../../../utils/use-compatible-router.mjs";import{Image as t}from"../../ui/image.mjs";import{Box as n}from"../../ui/box.mjs";import{Text as r}from"../../ui/text.mjs";import{memo as i}from"react";import{jsx as a,jsxs as o}from"react/jsx-runtime";function s(e){return e.img_x??e.img_y??``}function c(e){return e.img_y??e.img_x??``}function l(e){return!Number.isFinite(e)||e==null||e<=0?``:(e>10?e/10:e).toFixed(1)}function u(e){let t=[...Array.isArray(e.tags)?e.tags.map(e=>e?.name?.trim()??``):[],e.cat_name?.trim()??``,e.status_text?.trim()??``,e.language?.trim()??``];return Array.from(new Set(t.filter(Boolean))).slice(0,5)}function d(e){return e?.trim()||`暂无简介`}function f({item:i,href:f=``}){let p=e(),m=i.name??i.id??`未命名视频`,h=s(i),g=c(i),_=l(i.score),v=u(i),y=d(i.description);function b(){f&&p.push(f)}return o(n,{as:`article`,className:`cursor-pointer rounded-[16px] border border-[#8d44ff]/60 bg-[rgba(255,255,255,0.1)] p-[16px] shadow-[0_20px_40px_rgba(0,0,0,0.18)] backdrop-blur-[12px]`,onClick:b,children:[a(n,{className:`relative aspect-[326/207] overflow-hidden rounded-[8px] bg-[linear-gradient(180deg,#2d1147_0%,#13031f_100%)]`,children:h?a(t,{src:h,alt:m,fill:!0,className:`object-cover`}):null}),o(n,{className:`mt-[16px] flex gap-[16px]`,children:[a(n,{className:`relative h-[88px] w-[64px] shrink-0 overflow-hidden rounded-[4px] border border-white/20 bg-white/5`,children:g?a(t,{src:g,alt:`${m} 海报`,fill:!0,className:`object-cover`}):null}),o(n,{className:`min-w-0 flex-1`,children:[o(n,{className:`flex items-start justify-between gap-[12px]`,children:[a(r,{as:`h3`,className:`min-w-0 flex-1 line-clamp-1 text-[18px] font-medium leading-[25px] text-white`,children:m}),_?a(r,{className:`shrink-0 text-[18px] font-semibold leading-[20px] text-[#ffc039] tabular-nums`,children:_}):null]}),v.length>0?a(n,{className:`mt-[8px] flex flex-wrap gap-[6px]`,children:v.map(e=>a(n,{className:`flex h-[18px] items-center justify-center rounded-[4px] bg-white/20 px-[4px] py-[2px]`,children:a(r,{className:`text-[12px] leading-[14px] text-white`,children:e})},e))}):null]})]}),a(r,{as:`p`,className:`mt-[12px] line-clamp-3 text-[14px] leading-[24px] text-white/[0.55]`,children:y})]})}const p=i(f);p.displayName=`VideoListRecommendItem`;export{p as VideoListRecommendItem};
|
package/dist/theme-tokens.d.mts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { CSSProperties } from "react";
|
|
3
|
-
|
|
4
|
-
//#region theme-tokens.d.ts
|
|
5
|
-
declare const FUNHUB_THEME_COLOR_TOKENS: ReadonlyArray<readonly [string, string]>;
|
|
6
|
-
declare const FUNHUB_THEME_COLOR_TOKEN_STYLE: CSSProperties;
|
|
7
|
-
declare function applyFunhubThemeColorTokens(node: HTMLElement | null): void;
|
|
8
|
-
//#endregion
|
|
9
|
-
export { FUNHUB_THEME_COLOR_TOKENS, FUNHUB_THEME_COLOR_TOKEN_STYLE, applyFunhubThemeColorTokens };
|
package/dist/theme-tokens.mjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
const e=[[`--color-brand-primary`,`#c043e8`],[`--color-brand-accent-purple`,`#9012ff`],[`--color-brand-tag-gradient-start`,`#ca3fe9`],[`--color-brand-tag-gradient-end`,`#9756e3`],[`--color-brand-action-gradient-end`,`#6c43ee`],[`--color-brand-rating`,`#ffc039`],[`--color-brand-hot-ranking`,`#c922ef`],[`--color-brand-link`,`#9054e5`],[`--color-text-primary`,`#ffffff`],[`--color-text-secondary`,`rgba(255, 255, 255, 0.9)`],[`--color-text-white80`,`rgba(255, 255, 255, 0.8)`],[`--color-text-tertiary`,`rgba(255, 255, 255, 0.6)`],[`--color-text-quaternary`,`rgba(255, 255, 255, 0.5)`],[`--color-text-dimmed`,`rgba(255, 255, 255, 0.7)`],[`--color-text-disabled`,`rgba(255, 255, 255, 0.3)`],[`--color-text-inactive`,`#bfbfbf`],[`--color-text-muted`,`#747474`],[`--color-surface-tab-bg`,`#121212`],[`--color-surface-card-fallback`,`#282129`],[`--color-surface-chip-bg`,`#1b1b1b`],[`--color-surface-chip-gray20`,`rgba(217, 217, 217, 0.2)`],[`--color-surface-white20`,`rgba(255, 255, 255, 0.2)`],[`--color-surface-white10`,`rgba(255, 255, 255, 0.1)`],[`--color-surface-mask-black40`,`rgba(0, 0, 0, 0.4)`],[`--color-surface-mask-black60`,`rgba(0, 0, 0, 0.6)`],[`--color-surface-panel-dark`,`#060315`],[`--color-surface-field-bg`,`rgba(173, 163, 191, 0.1)`],[`--color-border-search-highlight`,`rgba(230, 42, 255, 0.9)`],[`--color-border-panel-glow`,`rgba(219, 55, 255, 0.4)`],[`--color-border-danger`,`#ff1eff`],[`--color-border-required`,`rgba(255, 0, 0, 0.7)`],[`--color-neutral-black`,`#000000`],[`--color-neutral-white`,`#ffffff`],[`--color-overlay-mask-start`,`rgba(8, 2, 17, 0)`],[`--color-overlay-mask-end70`,`rgba(8, 2, 17, 0.7)`],[`--color-overlay-mask-end80`,`rgba(8, 2, 17, 0.8)`],[`--color-overlay-top-bar-black30`,`rgba(0, 0, 0, 0.3)`],[`--color-overlay-create-top-black50`,`rgba(0, 0, 0, 0.5)`],[`--color-overlay-create-mid-purple27`,`rgba(116, 18, 131, 0.27)`],[`--color-overlay-create-bottom-purple0`,`rgba(75, 24, 87, 0)`],[`--color-overlay-panel-fade-start90`,`rgba(6, 3, 21, 0.9)`],[`--color-overlay-panel-fade-end0`,`rgba(6, 3, 21, 0)`],[`--color-cover-text-primary`,`#ffffff`],[`--color-cover-text-secondary`,`#747474`],[`--color-cover-gray-11`,`#121212`],[`--color-cover-gray-6`,`#d9d9d9`],[`--color-cover-light-gray-6`,`#e0e0e0`],[`--color-cover-surface-dark`,`#1b1b1b`],[`--color-cover-gray11`,`var(--color-cover-gray-11)`],[`--color-cover-gray6`,`var(--color-cover-gray-6)`],[`--color-cover-light-gray6`,`var(--color-cover-light-gray-6)`],[`--color-bg1`,`var(--color-surface-tab-bg)`],[`--color-bg2`,`var(--color-surface-chip-bg)`],[`--color-bg3`,`var(--color-surface-card-fallback)`],[`--color-bg4`,`var(--color-surface-white20)`],[`--color-text1`,`var(--color-text-primary)`],[`--color-text2`,`var(--color-text-secondary)`],[`--color-text3`,`var(--color-text-tertiary)`],[`--color-text4`,`var(--color-brand-primary)`],[`--color-line1`,`var(--color-surface-chip-gray20)`],[`--color-line2`,`var(--color-border-panel-glow)`],[`--color-theme1`,`var(--color-brand-accent-purple)`],[`--color-theme2`,`var(--gradient-action-button)`],[`--color-theme3`,`var(--color-surface-chip-gray20)`],[`--color-theme4`,`var(--color-brand-link)`],[`--color-theme5`,`var(--color-brand-primary)`],[`--color-theme6`,`var(--color-brand-tag-gradient-start)`],[`--color-overlay`,`var(--color-overlay-mask-end70)`]],t=Object.fromEntries(e);function n(t){t&&e.forEach(([e,n])=>{t.style.setProperty(e,n)})}export{e as FUNHUB_THEME_COLOR_TOKENS,t as FUNHUB_THEME_COLOR_TOKEN_STYLE,n as applyFunhubThemeColorTokens};
|