@funhub/platform 0.2.4 → 0.2.6
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 +6 -10
- package/dist/biz.mjs +1 -1
- package/dist/common.d.mts +2 -5
- package/dist/common.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/business/advertisement/ad-match.d.mts +3 -7
- 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 +2 -2
- package/dist/components/biz/business/advertisement/banner-ad/material.mjs +1 -1
- package/dist/components/biz/business/advertisement/banner-ad/schema.d.mts +4 -9
- 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.d.mts +3 -4
- package/dist/components/biz/business/advertisement/floating-ad/client.mjs +1 -1
- package/dist/components/biz/business/advertisement/floating-ad/index.d.mts +1 -1
- package/dist/components/biz/business/advertisement/floating-ad/material.d.mts +0 -5
- package/dist/components/biz/business/advertisement/floating-ad/schema.d.mts +6 -21
- package/dist/components/biz/business/advertisement/floating-ad/schema.mjs +1 -1
- package/dist/components/biz/business/advertisement/icon-ad/client.mjs +1 -1
- package/dist/components/biz/business/advertisement/icon-ad/material.d.mts +1 -1
- package/dist/components/biz/business/advertisement/icon-ad/material.mjs +1 -1
- package/dist/components/biz/business/advertisement/icon-ad/schema.d.mts +1 -7
- package/dist/components/biz/business/advertisement/icon-ad/schema.mjs +1 -1
- package/dist/components/biz/business/advertisement/index.d.mts +4 -4
- 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/schema.d.mts +15 -14
- 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.d.mts +1 -1
- package/dist/components/biz/business/advertisement/text-ad/material.mjs +1 -1
- package/dist/components/biz/business/advertisement/text-ad/schema.d.mts +1 -5
- package/dist/components/biz/business/advertisement/text-ad/schema.mjs +1 -1
- package/dist/components/biz/business/banner/variants/basic-banner/runtime/client.mjs +1 -1
- package/dist/components/biz/business/banner-carousel/client.d.mts +1 -2
- package/dist/components/biz/business/banner-carousel/client.mjs +1 -1
- package/dist/components/biz/business/banner-carousel/default-props.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/editor-preview.mjs +1 -1
- package/dist/components/biz/business/detail/shared/runtime-context-provider.mjs +1 -1
- package/dist/components/biz/business/detail/shared/video-hero.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/detail/video-detail-recommend/material.mjs +1 -1
- package/dist/components/biz/business/detail/video-detail-recommend/schema.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 +5 -10
- 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/nav-bar/variants/basic-nav-bar/runtime/client.mjs +1 -1
- 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.d.mts +2 -0
- 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 -8
- 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/common/video-player/index.d.mts +2 -1
- package/dist/components/common/video-player/video-blind-ad-overlay.mjs +2 -0
- package/dist/components/common/video-player/video-player-ref-context.mjs +2 -0
- package/dist/components/pages/collection-detail/detail.mjs +1 -1
- package/dist/components/pages/edit/page.mjs +1 -1
- package/dist/components/pages/feedback/_components/feedback-form.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/publish/components/collection.mjs +1 -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 +2 -2
- package/dist/components/pages/settings/_components/settings.mjs +1 -1
- package/dist/components/pages/user-follow/_components/follow-no-login.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/image.d.mts +4 -4
- package/dist/components/ui/input-group.d.mts +1 -1
- package/dist/components/ui/item.d.mts +1 -1
- package/dist/hooks/use-is-client.d.mts +10 -0
- package/dist/hooks/use-is-client.mjs +2 -0
- package/dist/hooks.d.mts +2 -1
- package/dist/hooks.mjs +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 -3
- package/dist/materials.mjs +1 -1
- package/dist/service/generated/client.d.mts +10 -2
- package/dist/service/generated/client.mjs +1 -1
- package/dist/service/generated/tanstack.d.mts +12 -2
- package/dist/service/generated/tanstack.mjs +1 -1
- package/dist/service.d.mts +3 -3
- package/dist/service.mjs +1 -1
- package/dist/store/modules/blind-spot-ad-store.d.mts +116 -0
- package/dist/store/modules/blind-spot-ad-store.mjs +2 -0
- package/dist/store/modules/video-player-ref-store.d.mts +21 -0
- package/dist/store/modules/video-player-ref-store.mjs +2 -0
- package/dist/store.d.mts +3 -1
- package/dist/store.mjs +1 -1
- package/dist/types.d.mts +171 -33
- package/dist/utils/helper.d.mts +1 -1
- package/dist/utils/helper.mjs +1 -1
- package/dist/utils/schema/inspector.d.mts +2 -2
- package/package.json +2 -8
- 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/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/empty-state.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 -17
- package/dist/components/biz/business/ranking-recommend/client.mjs +0 -70
- package/dist/components/biz/business/ranking-recommend/material.d.mts +0 -35
- package/dist/components/biz/business/ranking-recommend/material.mjs +0 -2
- package/dist/components/biz/business/ranking-recommend/schema.d.mts +0 -35
- 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/query.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/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 -116
- 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,2 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import*as e from"react";const t=t=>e.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 16 16`,fill:`none`,width:`1em`,height:`1em`,...t},e.createElement(`path`,{d:`M8.94894 8.36398L3.99914 13.3137L5.41334 14.7279L11.7773 8.36398L5.41334 2L3.99914 3.41421L8.94894 8.36398Z`,fill:`currentColor`}));export{t as default};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import*as e from"react";const t=t=>e.createElement(`svg`,{preserveAspectRatio:`none`,width:`1em`,height:`1em`,overflow:`visible`,style:{display:`block`},viewBox:`0 0 20 20`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...t},e.createElement(`g`,{id:`Group 91`},e.createElement(`rect`,{id:`Rectangle 63`,opacity:0,width:20,height:20,fill:`var(--fill-0, white)`,fillOpacity:.5}),e.createElement(`path`,{id:`Vector`,d:`M9.99998 8.61116L14.8611 3.75L16.25 5.13889L11.3889 10L16.25 14.8611L14.8611 16.25L9.99998 11.3889L5.13889 16.25L3.75 14.8611L8.61111 10L3.75 5.13889L5.13889 3.75L9.99998 8.61116Z`,fill:`var(--fill-0, white)`,fillOpacity:.5})));export{t as default};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import*as e from"react";const t=t=>e.createElement(`svg`,{preserveAspectRatio:`none`,width:`1em`,height:`1em`,overflow:`visible`,style:{display:`block`},viewBox:`0 0 16.6667 16.6667`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...t},e.createElement(`g`,{id:`Group 76`},e.createElement(`g`,{id:`Rectangle 49`}),e.createElement(`path`,{id:`Vector`,d:`M1.73609 11.1112H4.43671L8.11345 14.1194C8.17547 14.1701 8.25317 14.1978 8.33331 14.1978C8.52505 14.1978 8.68054 14.0424 8.68054 13.8506V2.81608C8.68054 2.73593 8.65283 2.65824 8.60206 2.59621C8.4806 2.44779 8.26186 2.42592 8.11345 2.54735L4.43671 5.55558H1.73609C1.35256 5.55558 1.04165 5.86649 1.04165 6.25003V10.4167C1.04165 10.8003 1.35256 11.1112 1.73609 11.1112ZM16.3194 8.33331C16.3194 10.6194 15.3152 12.671 13.7237 14.071L12.7392 13.0864C14.0804 11.94 14.9305 10.236 14.9305 8.33331C14.9305 6.43065 14.0804 4.72657 12.7392 3.58024L13.7237 2.59567C15.3152 3.99559 16.3194 6.04717 16.3194 8.33331ZM12.8472 8.33331C12.8472 7.00574 12.2264 5.82323 11.2592 5.06021L10.2668 6.05265C10.987 6.55453 11.4583 7.38887 11.4583 8.33331C11.4583 9.27776 10.987 10.1121 10.2668 10.6139L11.2592 11.6064C12.2264 10.8434 12.8472 9.66081 12.8472 8.33331Z`,fill:`var(--fill-0, white)`,fillOpacity:.9})));export{t as default};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import*as e from"react";const t=t=>e.createElement(`svg`,{preserveAspectRatio:`none`,viewBox:`0 0 77 63`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,...t},e.createElement(`path`,{d:`M0 8C0 3.58172 3.58172 0 8 0H36.279C37.7322 0 39.1579 0.395804 40.4031 1.14491L55.3968 10.1652C56.9219 11.0827 58.7095 11.4654 60.4765 11.2528L68.0443 10.3423C72.8072 9.76919 77 13.4878 77 18.285V55C77 59.4183 73.4183 63 69 63H8C3.58172 63 0 59.4183 0 55V8Z`,fill:`url(#paint0_linear)`,fillOpacity:.3}),e.createElement(`defs`,null,e.createElement(`linearGradient`,{id:`paint0_linear`,x1:38.5,y1:0,x2:38.5,y2:63,gradientUnits:`userSpaceOnUse`},e.createElement(`stop`,{stopColor:`#6B30B9`}),e.createElement(`stop`,{offset:1,stopColor:`#2B1943`}))));export{t as default};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
"use client";import{gContentGetGuessYouLikeVideos as e,pContentBatchGetVideoDetail as t}from"../../../../../service/generated/client.mjs";import{useRequest as n}from"../../../../../hooks/query/use-query.mjs";import{useKeepAliveState as r}from"../../../../common/keep-scroll-position/index.mjs";import{useCardDecoration as i}from"../../../../../hooks/use-card-decoration.mjs";import{buildEditorPreviewRecommendList as a}from"../shared/editor-preview.mjs";import{useVideoDetailMaterialRuntimeContext as o}from"../shared/runtime-context-provider.mjs";import{applyPlayCountDelta as s,clampColumns as c,mergeManualAndPool as ee,normalizeRecommendRuntimeProps as te,resolveRows as ne}from"./utils.mjs";import{useCallback as re,useEffect as l,useMemo as u,useState as ie}from"react";function d({rows:d,columns:f,smartTagEnabled:h,smartTagIds:g,title:fe,showPlayCount:pe,playCountDelta:me,showEpisode:he,enableInfinite:ge,items:v,mode:y=`renderer`}){let b=o()?.detailId||``,x=y===`editor`,S=x,{getVerticalHoCoverImageUrl:C,getTitleText:w}=i(),T=u(()=>te({smartTagEnabled:h,smartTagIds:g,enableInfinite:ge,items:v}),[ge,v,h,g]),E=T.smartTagEnabled,D=T.smartTagIds,O=u(()=>T.items??[],[T.items]),k=T.enableInfinite&&!x,A=!E,j=k&&E&&!S,_e=ne(d,k),M=c(f),N=_e*M,P=Math.max(1,N),F=u(()=>[`video-detail-recommend`,b||`unknown`,P,D.join(`,`)].join(`:`),[b,P,D]),[ve,I]=r(`${F}:pool`,[]),[L,R]=r(`${F}:has-more`,!1),[z,B]=ie(!1),V=u(()=>a(N),[N]),{data:H,isFetching:ye,isPending:be}=n([`video-detail-recommend`,b,j?`paged`:`all`,P,D.join(`,`)],async()=>S?null:await e({page_size:P,tags:D}),{enabled:!S&&E,refetchOnMount:`always`}),U=u(()=>S?V:p(H?.data?.videos),[H?.data?.videos,V,S]);l(()=>{if(!j){B(!1);return}I(e=>{if(!U.length)return e;if(!e.length)return U;let t=[...U],n=new Set(U.map(e=>e.id).filter(Boolean));return e.forEach(e=>{(!e.id||!n.has(e.id))&&(t.push(e),e.id&&n.add(e.id))}),t});let e=m(H?.data?.videos,P);R(t=>t||e),B(!1)},[H?.data?.videos,U,P,R,I,j]);let W=j?ve:U,G=u(()=>A?Array.from(new Set(O.map(e=>_(e.contentId)).filter(Boolean))):[],[O,A]),{data:K,isFetching:xe,isPending:Se}=n([`video-detail-recommend-manual-details`,G.join(`,`)],async()=>{if(!G.length)return[];let e=await t({ids:G});return(Array.isArray(e.data?.videos)?e.data.videos:[]).map(e=>ae(e))},{enabled:G.length>0,refetchOnMount:`always`}),q=u(()=>A?new Set(O.map(e=>_(e.contentId)).filter(Boolean)):new Set,[O,A]),J=u(()=>S?W:W.filter(e=>!q.has(e.id)),[W,S,q]),Y=u(()=>{if(!A||!O.length)return[];let e=new Map;return W.forEach(t=>{let n=_(t.id);n&&e.set(n,t)}),(K||[]).forEach(t=>{let n=_(t.id);n&&e.set(n,t)}),O.map((t,n)=>{let r=S?V[n%Math.max(1,V.length)]:le(t,n),i=_(t.contentId),a=typeof t.coverUrl==`string`?t.coverUrl.trim():``,o=e.get(i)??{...r,id:i||r.id||`preview-manual-${n+1}`,name:r.name||`猜你喜欢 ${n+1}`,img_y:a||r.img_y,img_x:a||r.img_x},s=t.titleMode===`custom`?t.title:w(o),c=t.coverMode===`content`?C(o)||a:a||C(o);return{info:{...o,name:s||o.name,img_y:c||o.img_y,img_x:c||o.img_x},config:{showPlayCount:t.showPlayCount,playCountDelta:t.playCountDelta,showEpisode:t.showEpisode}}}).filter(Boolean)},[V,W,w,C,S,K,O,A]),X=u(()=>J.map(e=>({info:e})),[J]),Ce=A&&O.length>0,we=u(()=>Ce?Y:ee(Y,X,N),[Ce,Y,N,X]),Z=u(()=>{if(j||k){if(!Y.length)return X;let e=new Set(Y.map(e=>e.info.id).filter(Boolean));return Y.concat(X.filter(t=>!e.has(t.info.id)))}return we},[we,Y,X,k,j]),Q=L&&Z.length>0?Math.max(0,Z.length-4):-1,$=Q>=0?`${F}:${Q}`:``,Te=String(fe||``).trim(),Ee=re(async()=>{if(!(!j||!L||z)){B(!0);try{let t=await e({page_size:P,tags:D}),n=Array.isArray(t.data?.videos)?t.data.videos:[],r=p(n),i=0;I(e=>{let t=new Set(e.map(e=>e.id).filter(Boolean)),n=[...e];return r.forEach(e=>{(!e.id||!t.has(e.id))&&(n.push(e),e.id&&t.add(e.id))}),i=n.length-e.length,n}),R(m(n,P)&&i>0)}catch(e){console.error(`猜你喜欢分页加载失败`,e),R(!1)}finally{B(!1)}}},[L,z,P,D,R,I,j]);l(()=>{if(!$||!L||z||!j)return;let e=document.querySelector(`[data-detail-recommend-trigger="${$}"]`);if(!(e instanceof HTMLElement))return;let t=new IntersectionObserver(e=>{e[0]?.isIntersecting&&!z&&Ee()});return t.observe(e),()=>{t.disconnect()}},[Ee,L,z,j,$]);let De=!S&&(z||E&&(ye||be)||G.length>0&&(xe||Se));return{uiItems:u(()=>Z.map((e,t)=>{let n=pe!==!1&&(e.config?.showPlayCount??!0),r=Number(e.config?.playCountDelta??me??0),i=e.config?.showEpisode??he;return{sourceIndex:t,info:e.info,title:w(e.info),coverUrl:C(e.info),detailPath:y===`renderer`?ce(e.info):``,playCountText:se(s(e.info.play_count||0,r)),videoInfoText:oe(e.info),showPlayCount:n,showEpisode:i,score:ue(e.info.score),cardKind:de(e.info)}}),[Z,w,C,y,me,he,pe]),shouldShowLoading:De,isPreview:S,resolvedColumns:M,resolvedModuleTitle:Te,triggerIndex:Q,triggerMarker:$}}function f(e){let t=e.is_more_link?`y`:`n`;return{id:e.video_id||``,mid:``,name:e.name||``,cat_id:``,cat_name:``,status:`1`,status_text:``,create_time:``,content_type:e.content_type,episode_cnt:e.episode_count||0,show_at:e.show_at??``,position:``,img_type:e.img_type??``,img_x:e.img_x??``,img_y:e.img_y??``,img_width:``,img_height:``,play_count:e.play_count,preview_images:[],duration:String(e.duration??``),score:String(e.score??``),is_more_link:t,update_status:String(e.update_status??``),description:e.description??``,language:``,director:``,actor:``,area:``,issue_date:``,publisher:``,series:``,number:``,tags:[],source_tags:e.source_tags??``,source_actor:[],links:Array.isArray(e.episodes)?e.episodes.map(e=>({id:e.id??``,name:e.name??``,preview_m3u8_url:e.preview_m3u8_url??``,m3u8_url:e.m3u8_url??``})):[],money:``,up_user:``,source_username:``,task_id:``,file_status:``}}function p(e){return Array.isArray(e)?e.map(e=>f(e)):[]}function ae(e){let t=String(e?.id||e?.mid||e?.video_id||``),n=e?.is_more_link===`y`?`y`:`n`,r=Array.isArray(e?.links)?e.links.map(e=>({id:String(e?.id||``),name:String(e?.name||``),preview_m3u8_url:String(e?.preview_m3u8_url||``),m3u8_url:String(e?.m3u8_url||``)})):[],i=Array.isArray(e?.video_episodes)?e.video_episodes.length:0,a=Number(e?.episode_cnt||i||r.length||0);return{id:t,mid:String(e?.mid||t),name:String(e?.name||``),cat_id:String(e?.cat_id||``),cat_name:String(e?.cat_name||``),status:String(e?.status||`1`),status_text:String(e?.status_text||``),create_time:String(e?.create_time||``),content_type:e?.content_type,episode_cnt:Number.isFinite(a)?a:0,show_at:String(e?.show_at||``),position:String(e?.position||``),img_type:String(e?.img_type||``),img_x:String(e?.img_x||``),img_y:String(e?.img_y||``),img_width:String(e?.img_width||``),img_height:String(e?.img_height||``),play_count:Number(e?.play_count??e?.browse_count??0),preview_images:Array.isArray(e?.preview_images)?e.preview_images:[],duration:String(e?.duration||``),score:String(e?.score||``),is_more_link:n,update_status:String(e?.update_status||``),description:String(e?.description||``),language:String(e?.language||``),director:String(e?.director||``),actor:String(e?.actor||``),area:String(e?.area||``),issue_date:String(e?.issue_date||``),publisher:String(e?.publisher||``),series:String(e?.series||``),number:String(e?.number||``),tags:Array.isArray(e?.tags)?e.tags:[],source_tags:String(e?.source_tags||``),source_actor:Array.isArray(e?.source_actor)?e.source_actor:[],links:r,money:String(e?.money||``),up_user:String(e?.up_user||``),source_username:String(e?.source_username||``),task_id:String(e?.task_id||``),file_status:String(e?.file_status||``)}}function m(e,t){if(!Array.isArray(e)||e.length===0)return!1;let n=e[0];if(typeof n?.has_more==`boolean`)return n.has_more;let r=Number(n?.total??0);return Number.isFinite(r)&&r>0?r>t:e.length>=t}function oe(e){if(h(e)){let t=Number(e.episode_cnt||e.links?.length||0);return t>0?`全${t}集`:``}return g(Number(e.duration||0))}function h(e){return e.is_more_link===`y`}function g(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 se(e){let t=Number(e||`0`);return Number.isNaN(t)||t<=0?`0`:t>=1e4?`${(t/1e4).toFixed(1)}w`:t>=1e3?`${(t/1e3).toFixed(1)}k`:String(t)}function ce(e){let t=encodeURIComponent(e.name||``);return`/video/${e.id}/${t}/episode/1`}function _(e){return typeof e==`string`?e.trim():``}function le(e,t){let n=_(e.contentId)||`manual-${t+1}`,r=typeof e.coverUrl==`string`?e.coverUrl.trim():``,i=typeof e.title==`string`?e.title.trim():``,a=typeof e.description==`string`?e.description.trim():``;return{id:n,mid:n,name:i||`猜你喜欢 ${t+1}`,cat_id:``,cat_name:``,status:`1`,status_text:``,create_time:``,content_type:1,episode_cnt:0,show_at:``,position:``,img_type:``,img_x:r,img_y:r,img_width:``,img_height:``,play_count:0,preview_images:[],duration:``,score:``,is_more_link:`n`,update_status:``,description:a,language:``,director:``,actor:``,area:``,issue_date:``,publisher:``,series:``,number:``,tags:[],source_tags:``,source_actor:[],links:[],money:``,up_user:``,source_username:``,task_id:``,file_status:``}}function ue(e){let t=Number(e);if(!(!Number.isFinite(t)||t<=0))return t>10&&t<=100?t/10:Math.min(t,10)}function de(e){return String(e.img_type??``).trim().toLowerCase()===`long`?`short`:`tall`}export{d as useVideoDetailRecommendData};
|
|
@@ -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{jsx as n}from"react/jsx-runtime";import r from"next/link";function i(i){let{ariaLabel:a,fallbackIcon:o,href:s,imageAlt:c=`header-action`,imageClassName:l,imageSrc:u,className:d}=i;return n(r,{href:s,"aria-label":a,className:e(`relative flex shrink-0 items-center justify-center text-text1`,d),children:u?n(t,{src:u,alt:c,fill:!0,sizes:`40px`,className:e(`object-cover`,l)}):o})}export{i as HeaderAction};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
"use client";import{cn as e}from"../../../../../utils/cn.mjs";import t from"../../../../../assets/icons/common/header-search-icon.mjs";import{jsx as n}from"react/jsx-runtime";import r from"next/link";function i(i){let{ariaLabel:a=`打开搜索页`,href:o=`/search`,className:s,iconClassName:c}=i;return n(r,{href:o,"aria-label":a,className:e(`flex h-[24px] w-[24px] shrink-0 items-center justify-center text-text1`,s),children:n(t,{className:e(`h-[24px] w-[24px]`,c),"aria-hidden":!0})})}export{i as HeaderSearchIcon};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
"use client";import{cn as e}from"../../../../../utils/cn.mjs";import{Box as t}from"../../../../ui/box.mjs";import{jsx as n}from"react/jsx-runtime";function r(r){let{children:i,className:a,mode:o=`renderer`}=r;return n(t,{as:`header`,className:e(`flex items-center px-[16px] pt-[8px] pb-[16px]`,o===`editor`&&`pointer-events-none`,a),children:i})}export{r as HeaderShell};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { InferSchemaProps } from "../../../../utils/schema/schema.mjs";
|
|
3
|
-
import "../../../../utils.mjs";
|
|
4
|
-
import { hotRecommendInspectorPropsSchema } from "./schema.mjs";
|
|
5
|
-
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
6
|
-
|
|
7
|
-
//#region components/biz/business/hot-recommend/client.d.ts
|
|
8
|
-
type HotRecommendProps = InferSchemaProps<typeof hotRecommendInspectorPropsSchema>;
|
|
9
|
-
interface ClientProps extends HotRecommendProps {
|
|
10
|
-
onItemClick?: (keyword: string) => void;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* 热门推荐物料组件 - 客户端部分
|
|
14
|
-
*/
|
|
15
|
-
declare function HotRecommendClient(props: ClientProps): react_jsx_runtime0.JSX.Element | null;
|
|
16
|
-
//#endregion
|
|
17
|
-
export { HotRecommendClient, HotRecommendProps };
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
"use client";import{useRouter as e}from"../../../../utils/use-compatible-router.mjs";import{Box as t}from"../../../ui/box.mjs";import{Text as n}from"../../../ui/text.mjs";import{useCallback as r,useId as i,useMemo as a,useRef as o,useState as s}from"react";import{jsx as c,jsxs as l}from"react/jsx-runtime";import{usePathname as u,useSearchParams as d}from"next/navigation";const f=[];function p(e,t){if(e.length<=t)return[...e];let n=[...e];for(let e=0;e<t;e++){let t=e+Math.floor(Math.random()*(n.length-e));[n[e],n[t]]=[n[t],n[e]]}return n.slice(0,t)}function m({className:e=``}){let t=i().replace(/:/g,``);return l(`svg`,{viewBox:`0 0 62.4481 14.192`,fill:`none`,"aria-hidden":!0,className:e,children:[l(`g`,{children:[c(`path`,{d:`M50.7201 4V3.04H47.9841V0.768H50.7201V0H53.3281V0.768H57.1201V0H59.7441V0.768H62.4481V3.04H59.7441V4H57.1201V3.04H53.3281V4H50.7201ZM48.1281 8.32C48.4587 8.32 48.8054 8.27733 49.1681 8.192C49.5307 8.096 49.8934 7.968 50.2561 7.808C50.6294 7.63733 50.9867 7.43467 51.3281 7.2C51.6801 6.95467 52.0054 6.688 52.3041 6.4H48.3041V4.464H53.5681C53.7067 4.112 53.7761 3.72267 53.7761 3.296H56.4641C56.4641 3.68 56.4107 4.06933 56.3041 4.464H62.1121V6.4H55.5041C55.4401 6.51733 55.3707 6.62933 55.2961 6.736C55.2321 6.832 55.1574 6.93867 55.0721 7.056H61.1841V7.536C61.1841 7.94133 61.1147 8.33067 60.9761 8.704C60.8481 9.07733 60.5921 9.39733 60.2081 9.664H62.3041V11.488H59.2801V11.696C59.2801 12.1653 59.2267 12.5547 59.1201 12.864C59.0134 13.1733 58.8534 13.4187 58.6401 13.6C58.4267 13.792 58.1601 13.9253 57.8401 14C57.5201 14.0747 57.1521 14.112 56.7361 14.112H54.7361V12.432H55.2481C55.5894 12.4213 55.8561 12.4 56.0481 12.368C56.2507 12.336 56.4001 12.288 56.4961 12.224C56.6027 12.16 56.6721 12.0853 56.7041 12C56.7361 11.9147 56.7521 11.8133 56.7521 11.696V11.488H53.2161V9.664H56.7521V9.44C57.2321 9.44 57.6267 9.39733 57.9361 9.312C58.2454 9.216 58.4747 9.04 58.6241 8.784H54.4641V7.856C54.1547 8.208 53.8187 8.544 53.4561 8.864C53.1041 9.17333 52.7254 9.456 52.3201 9.712V14.176H49.7761V10.784C49.2534 10.912 48.7041 10.976 48.1281 10.976V8.32Z`,fill:`url(#${t})`}),c(`path`,{d:`M40.3361 0.0159912C40.3361 0.805325 40.2614 1.53066 40.1121 2.19199H46.3841V4.28799H44.3361V5.45599H46.1601V7.31199H44.3361V8.47999H46.1601V10.352H44.3361V11.648H46.4961V13.968H40.1121V14.192H37.5681V5.63199C37.3441 5.69599 37.1201 5.72799 36.8961 5.72799V2.92799C37.2694 2.92799 37.5361 2.68799 37.6961 2.20799C37.8561 1.72799 37.9361 0.997325 37.9361 0.0159912H40.3361ZM33.2641 0.0159912H35.6641V2.20799H36.6721V4.57599H35.6641V6.20799L36.6881 6.09599V8.47999L35.6641 8.62399V10.992C35.6641 11.408 35.6427 11.8027 35.6001 12.176C35.5574 12.56 35.4507 12.8907 35.2801 13.168C35.1201 13.456 34.8801 13.68 34.5601 13.84C34.2401 14.0107 33.8081 14.096 33.2641 14.096H32.1921V11.872H32.6241C32.9014 11.872 33.0774 11.7973 33.1521 11.648C33.2267 11.488 33.2641 11.184 33.2641 10.736V8.97599L31.9841 9.15199V6.63999L33.2641 6.49599V4.57599H32.0641V2.20799H33.2641V0.0159912ZM41.6001 0.0159912H44.4161L44.4641 1.90399H41.6481L41.6001 0.0159912ZM40.1121 5.45599H41.8881V4.28799H40.1121V5.45599ZM40.1121 8.47999H41.8881V7.31199H40.1121V8.47999ZM40.1121 11.648H41.8881V10.352H40.1121V11.648Z`,fill:`url(#${t})`}),c(`path`,{d:`M16.6721 2.49599L16.6081 0.0159912H19.8401L19.9041 2.49599H16.6721ZM24.9601 14.192V11.68H25.7121C26.0427 11.68 26.2987 11.6587 26.4801 11.616C26.6721 11.5733 26.8161 11.4987 26.9121 11.392C27.0081 11.2747 27.0667 11.12 27.0881 10.928C27.1094 10.736 27.1201 10.4907 27.1201 10.192V2.68799H20.8001V0.175991H29.9521V10.448C29.9521 11.2267 29.8827 11.8613 29.7441 12.352C29.6161 12.8427 29.3921 13.2213 29.0721 13.488C28.7521 13.7653 28.3201 13.952 27.7761 14.048C27.2321 14.144 26.5494 14.192 25.7281 14.192H24.9601ZM16.5441 14.192V3.23199H19.3761V14.192H16.5441Z`,fill:`url(#${t})`}),c(`path`,{d:`M6.48499e-05 7.18399V5.10399L1.87206 5.02399V3.82399H0.176065V1.45599H1.87206V0.0159912H4.25607V1.45599H6.00007V3.82399H4.25607V4.91199L5.84007 4.84799V6.92799L4.25607 6.99199V8.36799C4.25607 8.73066 4.22407 9.06132 4.16007 9.35999C4.09607 9.65866 3.97873 9.91466 3.80806 10.128C3.64807 10.3413 3.41873 10.5067 3.12007 10.624C2.83207 10.7413 2.45873 10.8 2.00006 10.8H0.592065V8.68799H1.05606C1.24806 8.68799 1.3974 8.66666 1.50406 8.62399C1.6214 8.58132 1.70673 8.52266 1.76006 8.44799C1.8134 8.36266 1.8454 8.26666 1.85606 8.15999C1.86673 8.04266 1.87206 7.91999 1.87206 7.79199V7.10399L6.48499e-05 7.18399ZM13.8081 10.864C12.7627 10.864 12.0054 10.624 11.5361 10.144C11.0774 9.66399 10.8481 8.86933 10.8481 7.75999V3.82399H9.84007V4.87999V5.02399H10.5121V6.68799H9.76007C9.6854 7.46666 9.55206 8.12266 9.36006 8.65599C9.17873 9.18932 8.9174 9.62133 8.57607 9.95199C8.2454 10.2827 7.8294 10.5227 7.32807 10.672C6.82673 10.8213 6.2294 10.896 5.53607 10.896V8.79999C5.8774 8.79999 6.1654 8.76799 6.40007 8.70399C6.6454 8.63999 6.84273 8.52799 6.99207 8.36799C7.1414 8.20799 7.25873 7.99466 7.34407 7.72799C7.4294 7.45066 7.48807 7.10399 7.52007 6.68799H6.35207V5.02399H7.58406V4.84799V3.82399H6.44807V1.45599H7.60007V0.0159912H9.85606V1.45599H13.2321V7.24799C13.2321 7.66399 13.2747 7.92533 13.3601 8.03199C13.4561 8.13866 13.6321 8.19199 13.8881 8.19199H14.3521V10.864H13.8081ZM0.144065 14.192L0.256065 11.232H3.21606L3.10406 14.192H0.144065ZM11.3921 14.192L11.2481 11.232H14.2241L14.3681 14.192H11.3921ZM4.17606 14.192L4.03207 11.296H6.73607L6.86407 14.192H4.17606ZM7.77607 14.192L7.63207 11.296H10.3841L10.5121 14.192H7.77607Z`,fill:`url(#${t})`})]}),c(`defs`,{children:l(`linearGradient`,{id:t,x1:`33.7161`,y1:`-4.59601`,x2:`60.7161`,y2:`18.404`,gradientUnits:`userSpaceOnUse`,children:[c(`stop`,{stopColor:`#E914E9`}),c(`stop`,{offset:`1`,stopColor:`#6C43EE`})]})})]})}function h({className:e=``}){return c(`svg`,{viewBox:`0 0 16.6667 16.6667`,fill:`none`,"aria-hidden":!0,className:e,children:c(`path`,{d:`M8.33333 1.66667C6.04287 1.66667 4.0209 2.82188 2.82036 4.58333H5V6.25H0V1.25H1.66667V3.3328C3.18651 1.30972 5.60637 0 8.33333 0C12.9357 0 16.6667 3.73096 16.6667 8.33333H15C15 4.65143 12.0152 1.66667 8.33333 1.66667ZM1.66667 8.33333C1.66667 12.0152 4.65143 15 8.33333 15C10.6238 15 12.6458 13.8447 13.8463 12.0833H11.6667V10.4167H16.6667V15.4167H15V13.3338C13.4802 15.3569 11.0603 16.6667 8.33333 16.6667C3.73096 16.6667 0 12.9357 0 8.33333H1.66667Z`,fill:`currentColor`})})}function g({variant:e,className:t=``}){let n=i().replace(/:/g,``),r=e===`gold`?`#FFF047`:`#D7D7D7`;return l(`svg`,{viewBox:`0 0 10 8`,fill:`none`,"aria-hidden":!0,className:t,children:[c(`path`,{d:`M0.72289 1.44405L2.67531 2.6057L4.62168 0.173795C4.77092 -0.0126857 5.06132 -0.0558774 5.27027 0.0773202C5.31202 0.103935 5.34852 0.136533 5.37837 0.173795L7.32476 2.6057L9.27714 1.44405C9.49083 1.31693 9.77946 1.36845 9.92192 1.55913C9.98315 1.64113 10.0097 1.73991 9.99682 1.83779L9.23283 7.63352C9.20526 7.84249 9.00682 8 8.77105 8H1.22899C0.99323 8 0.794784 7.84249 0.767236 7.63352L0.00322932 1.83779C-0.0267734 1.61019 0.155642 1.40398 0.410663 1.3772C0.520333 1.36569 0.631013 1.38938 0.72289 1.44405ZM5.00005 5.51033C5.51357 5.51033 5.92993 5.13878 5.92993 4.68043C5.92993 4.22209 5.51357 3.85054 5.00005 3.85054C4.48647 3.85054 4.07016 4.22209 4.07016 4.68043C4.07016 5.13878 4.48647 5.51033 5.00005 5.51033Z`,fill:`url(#${n})`}),c(`defs`,{children:l(`linearGradient`,{id:n,x1:`5`,y1:`0`,x2:`5`,y2:`8`,gradientUnits:`userSpaceOnUse`,children:[c(`stop`,{stopColor:r}),c(`stop`,{offset:`1`,stopColor:r,stopOpacity:`0`})]})})]})}function _(i){let{title:_,displayCount:v=4,items:y=f,onItemClick:b,mode:x=`renderer`}=i,S=x===`editor`,C=e(),w=u(),T=d(),E=_.trim()||`热门推荐`,D=Math.max(1,v||0),[O,k]=s(0),[A,j]=s(!1),M=o(null),N=r(()=>{A||(j(!0),M.current&&clearTimeout(M.current),M.current=setTimeout(()=>{k(e=>e+1),j(!1),M.current=null},500))},[A]),P=a(()=>p(y,D),[D,y,O]);if(y.length===0)return null;let F=e=>{if(b){b(e);return}let t=new URLSearchParams(T.toString());t.set(`q`,e);let n=w.includes(`/search-result`)?w:`/search-result`;C.push(`${n}?${t.toString()}`)};return l(t,{className:`relative mx-[16px] mt-[24px] overflow-hidden rounded-[12px] bg-black${S?` pointer-events-none`:``}`,children:[c(t,{className:`pointer-events-none absolute inset-0 rounded-[12px]`,style:{background:`linear-gradient(180deg, #9756E3 0%, #6C43EE 100%), linear-gradient(180deg, rgba(255,30,255,0.7) 0%, rgba(108,67,238,0) 100%)`,padding:`0.5px`,WebkitMask:`linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0)`,WebkitMaskComposite:`xor`,mask:`linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0)`,maskComposite:`exclude`}}),c(t,{className:`pointer-events-none absolute inset-x-0 top-0 rounded-t-[12px] mix-blend-plus-lighter`,style:{height:`259px`,background:`linear-gradient(180deg, rgba(151,86,227,0.4) 0%, rgba(151,86,227,0) 85%)`}}),l(t,{className:`relative px-[24px] pb-[18px] pt-[22px]`,children:[l(t,{className:`flex items-center justify-between`,children:[E===`热门推荐`?c(m,{className:`h-[14.192px] w-[62.448px] shrink-0`}):c(n,{className:`shrink-0 bg-[linear-gradient(90deg,#E914E9_0%,#6C43EE_100%)] bg-clip-text font-["PingFang_SC"] text-[16px] font-semibold leading-none text-transparent`,children:E}),c(`button`,{type:`button`,"aria-label":`刷新`,className:`flex h-[20px] w-[20px] shrink-0 items-center justify-center text-white/40 transition-opacity active:opacity-70`,onClick:N,children:c(h,{className:`h-[16.6667px] w-[16.6667px] ${A?`animate-spin`:``}`})})]}),c(t,{className:`mt-[7px]`,children:P.map((e,r)=>{let i=r<3,a=r<2,o=i?`text-[#C922EF]`:`text-white/70`,s=i?`text-white/90`:`text-white/70`;return l(t,{children:[l(`button`,{type:`button`,className:`flex h-[48px] w-full items-center gap-[4px] text-left transition-opacity active:opacity-70`,onClick:()=>F(e.label),children:[l(t,{className:`relative flex h-[24px] w-[20px] shrink-0 items-end justify-center`,children:[a?c(g,{variant:r===0?`gold`:`silver`,className:`absolute left-1/2 top-0 h-[8px] w-[10px] -translate-x-1/2`}):null,c(n,{className:`font-['DIN_Black'] text-[14px] font-normal not-italic leading-[24px] ${o}`,children:r+1})]}),c(n,{className:`min-w-0 flex-1 truncate font-['PingFang_SC'] text-[14px] font-normal not-italic leading-[24px] ${s}`,children:e.label})]}),r<P.length-1?c(t,{className:`h-px w-full bg-white/[0.08]`}):null]},`${e.label}-${r}`)})})]})]})}export{_ as HotRecommendClient};
|
|
@@ -1,24 +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 { HotRecommendClient } from "./client.mjs";
|
|
6
|
-
import { HotRecommendServer } 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/hot-recommend/material.d.ts
|
|
11
|
-
declare const hotRecommendMaterial: DefineMaterialOption<typeof HotRecommendServer, typeof HotRecommendClient, zod.ZodObject<{
|
|
12
|
-
readonly title: zod.ZodString & SchemaHasDefaultValue;
|
|
13
|
-
readonly displayCount: zod.ZodNumber & SchemaHasDefaultValue;
|
|
14
|
-
readonly items: zod.ZodArray<zod.ZodObject<{
|
|
15
|
-
label: zod.ZodString & SchemaHasDefaultValue;
|
|
16
|
-
}, zod_v4_core0.$strip>> & SchemaHasDefaultValue;
|
|
17
|
-
} & {
|
|
18
|
-
mode: zod.ZodOptional<zod.ZodEnum<{
|
|
19
|
-
renderer: "renderer";
|
|
20
|
-
editor: "editor";
|
|
21
|
-
}>>;
|
|
22
|
-
}, zod_v4_core0.$strip>, "hot-recommend", "内容组件">;
|
|
23
|
-
//#endregion
|
|
24
|
-
export { hotRecommendMaterial };
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import{defineMaterial as e}from"../../../../utils/schema/material.mjs";import{HotRecommendClient as t}from"./client.mjs";import{hotRecommendInspectorPropsSchema as n}from"./schema.mjs";import{HotRecommendServer as r}from"./server.mjs";const i=e({type:`hot-recommend`,name:`热门推荐`,icon:`/static/components-thumb/search_recommend_text.png`,category:`内容组件`,serverComponent:r,clientComponent:t,propsSchema:n});export{i as hotRecommendMaterial};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { SchemaHasDefaultValue } from "../../../../utils/schema/schema.mjs";
|
|
3
|
-
import "../../../../utils.mjs";
|
|
4
|
-
import { z } from "zod";
|
|
5
|
-
|
|
6
|
-
//#region components/biz/business/hot-recommend/schema.d.ts
|
|
7
|
-
/**
|
|
8
|
-
* 热门推荐物料属性定义
|
|
9
|
-
*/
|
|
10
|
-
declare const hotRecommendInspectorPropsSchema: z.ZodObject<{
|
|
11
|
-
readonly title: z.ZodString & SchemaHasDefaultValue;
|
|
12
|
-
readonly displayCount: z.ZodNumber & SchemaHasDefaultValue;
|
|
13
|
-
readonly items: z.ZodArray<z.ZodObject<{
|
|
14
|
-
label: z.ZodString & SchemaHasDefaultValue;
|
|
15
|
-
}, z.core.$strip>> & SchemaHasDefaultValue;
|
|
16
|
-
} & {
|
|
17
|
-
mode: z.ZodOptional<z.ZodEnum<{
|
|
18
|
-
renderer: "renderer";
|
|
19
|
-
editor: "editor";
|
|
20
|
-
}>>;
|
|
21
|
-
}, z.core.$strip>;
|
|
22
|
-
//#endregion
|
|
23
|
-
export { hotRecommendInspectorPropsSchema };
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import{defineComponentPropsSchema as e}from"../../../../utils/schema/schema.mjs";import{z as t}from"zod";const n=e(e=>({title:e.string(`热门推荐`,{label:`标题名称`,description:`支持输入,中/英/数/符,6个字符`}),displayCount:e.number(4,{label:`展示数`}),items:e.array(t.object({label:e.string(`东野圭吾作品:11字迷案`,{label:`热词`})}),{label:`推荐位模块`,defaultValue:[{label:`东野圭吾作品:11字迷案`},{label:`嫌疑人X的献身:高智商博弈`},{label:`白夜行:原著同名悬疑改编`},{label:`神探伽利略:校园连环谜案`},{label:`假面饭店:密室追凶夜`},{label:`恶意:东野圭吾高分作品`}]})}));export{n as hotRecommendInspectorPropsSchema};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { HotRecommendProps } from "./client.mjs";
|
|
3
|
-
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
|
-
|
|
5
|
-
//#region components/biz/business/hot-recommend/server.d.ts
|
|
6
|
-
/**
|
|
7
|
-
* 热门推荐物料组件 - 服务端部分
|
|
8
|
-
*/
|
|
9
|
-
declare function HotRecommendServer(props: HotRecommendProps): Promise<react_jsx_runtime0.JSX.Element>;
|
|
10
|
-
//#endregion
|
|
11
|
-
export { HotRecommendServer };
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
"use client";import{cn as e}from"../../../../../utils/cn.mjs";import{Box as t}from"../../../../ui/box.mjs";import{Text as n}from"../../../../ui/text.mjs";import{jsx as r,jsxs as i}from"react/jsx-runtime";function a(a){let{text:o,className:s}=a;return i(t,{className:e(`flex min-h-[360px] w-full flex-col items-center pt-[132px]`,s),children:[i(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`68`,height:`58`,viewBox:`0 0 68 58`,fill:`none`,className:`h-[58px] w-[68px]`,children:[r(`rect`,{x:`0.5`,y:`0.5`,width:`67`,height:`57`,rx:`7.5`,fill:`#1B1829`,stroke:`#322F3E`}),r(`path`,{d:`M27.1175 33.8211L27.118 23.9652C27.1182 21.7159 29.502 20.2667 31.4989 21.3021L40.5835 26.0125C42.6976 27.1086 42.7531 30.1126 40.681 31.2861L31.5959 36.4317C29.596 37.5644 27.1173 36.1195 27.1175 33.8211Z`,fill:`#54525E`})]}),r(n,{className:`mt-[16px] text-center text-[15px] leading-[normal] text-[#54525E]`,children:o})]})}export{a as ProfileMainEmptyState};
|
package/dist/components/biz/business/profile/profile-main/tabs/collect-tab/video-waterfall.mjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
"use client";import{Box as e}from"../../../../../../ui/box.mjs";import{EmptyState as t}from"../../../../../../ui/empty.mjs";import{InfiniteScroll as n}from"../../../../../../ui/infinite-scroll.mjs";import{Skeleton as r}from"../../../../../../ui/skeleton.mjs";import{WaterfallRecommend as i}from"../../../../../../common/list/waterfall-recommend/waterfall-recommend.mjs";import{useMemo as a}from"react";import{jsx as o,jsxs as s}from"react/jsx-runtime";function c(e){let t=Number.isFinite(e)?Math.max(0,e):0;return t<=0?``:t>=1e8?`${(t/1e8).toFixed(1).replace(/\.0$/,``)}亿`:t>=1e4?`${(t/1e4).toFixed(1).replace(/\.0$/,``)}W`:`${Math.floor(t)}`}function l(e){let t=Number(e);if(!(!Number.isFinite(t)||t<=0))return t>10&&t<=100?t/10:Math.min(t,10)}function u(e,t){let n=String(e.imgType||``).trim().toLowerCase();return n===`long`?`short`:n===`short`?`tall`:t%3==1?`short`:`tall`}function d(e){return e.map((e,t)=>({key:e.id?`collect-video-waterfall-${e.id}-${t}`:`collect-video-waterfall-${t}`,sourceIndex:t,selectionId:e.id||``,href:`/video/${e.id}/${e.title}`,cardKind:u(e,t),coverUrl:e.coverImage,title:e.title,metaPrimaryText:e.metaPrimaryText||``,heatText:c(e.viewCount),score:l(e.score)}))}function f(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 p(){return s(e,{className:`flex w-full gap-[15px]`,children:[s(e,{className:`flex min-w-0 flex-1 flex-col gap-[16px]`,children:[o(r,{className:`h-[218px] w-full rounded-[8px] bg-white/8`}),o(r,{className:`h-[120px] w-full rounded-[8px] bg-white/8`}),o(r,{className:`h-[218px] w-full rounded-[8px] bg-white/8`})]}),s(e,{className:`flex min-w-0 flex-1 flex-col gap-[16px]`,children:[o(r,{className:`h-[120px] w-full rounded-[8px] bg-white/8`}),o(r,{className:`h-[218px] w-full rounded-[8px] bg-white/8`}),o(r,{className:`h-[120px] w-full rounded-[8px] bg-white/8`})]})]})}function m({list:e,loading:r=!1,hasMore:s=!1,loadMore:c,emptyText:l=``,isEditMode:u=!1,selectedIds:m,onToggleSelection:h}){let g=a(()=>d(e),[e]),_=a(()=>f(g),[g]);return r&&e.length===0?o(p,{}):g.length===0?o(t,{type:`no-content`,text:l,className:`!pt-[72px]`}):o(n,{loadMore:async()=>{await c?.()},hasMore:!!c&&s,noMoreText:`没有更多了`,className:`w-full`,children:o(i,{title:``,columns:_,sectionClassName:`w-full`,headerClassName:`hidden`,containerClassName:`relative flex w-full gap-[15px]`,selectionMode:u,selectedIds:m,onToggleSelection:h})})}export{m as CollectVideoWaterfall};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { RankingRecommendInspectorProps } from "./schema.mjs";
|
|
3
|
-
import { RankingCardItem } from "./shared.mjs";
|
|
4
|
-
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
5
|
-
|
|
6
|
-
//#region components/biz/business/ranking-recommend/client.d.ts
|
|
7
|
-
type RankingRecommendProps = RankingRecommendInspectorProps & {
|
|
8
|
-
prefetchItems?: RankingCardItem[];
|
|
9
|
-
};
|
|
10
|
-
/**
|
|
11
|
-
* 推荐榜物料组件 - 客户端部分
|
|
12
|
-
* - 智能铺设开启:按标签调用热门列表接口,随机铺设推荐位
|
|
13
|
-
* - 智能铺设关闭:按配置的内容 ID 取数
|
|
14
|
-
*/
|
|
15
|
-
declare function RankingRecommendClient(props: RankingRecommendProps): react_jsx_runtime0.JSX.Element | null;
|
|
16
|
-
//#endregion
|
|
17
|
-
export { RankingRecommendClient, RankingRecommendProps };
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
"use client";import{isClient as e}from"../../../../utils/common.mjs";import{pContentBatchGetVideoDetail as t,pContentGetPopularVideoList as n}from"../../../../service/generated/client.mjs";import{pContentGetPopularVideoListKey as r}from"../../../../service/generated/tanstack.mjs";import{Box as i}from"../../../ui/box.mjs";import{Text as a}from"../../../ui/text.mjs";import o from"../../../ui/link.mjs";import{buildImageTextRecommendSmartPicked as s,getImageTextRecommendLayoutTags as c}from"../../../../hooks/image-text-recommend.mjs";import{useRequest as l}from"../../../../hooks/query/use-query.mjs";import u from"../../../../assets/icons/common/right_arrow_thin.mjs";import{buildRankingCardList as d,buildSmartRankingCardList as f,normalizeContentId as p,resolveCoverDisplaySrc as m,resolveOrderedContentIds as h}from"./shared.mjs";import{buildSmartPopularQuery as g,buildStableChosenTags as _}from"./shared/query.mjs";import{useEffect as v,useMemo as y,useRef as b,useState as x}from"react";import{jsx as S,jsxs as C}from"react/jsx-runtime";function w(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 T=w(`nebula`),E=w(`crimson`),D=T,O={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`},k={background:`rgba(83, 83, 83, 0.2)`},A={backdropFilter:`blur(4px)`,WebkitBackdropFilter:`blur(4px)`,maskImage:`linear-gradient(180deg, transparent 58.3%, black 100%)`,WebkitMaskImage:`linear-gradient(180deg, transparent 58.3%, black 100%)`},j=[{contentId:`mock-1`,title:`东野圭吾作品:11字谜案`,cover:T,category:`烧脑悬疑`,heatText:`2242万热度`,score:8.9,statusText:`完结`,href:`#`},{contentId:`mock-2`,title:`东野圭吾作品:11字谜案`,cover:E,category:`烧脑悬疑`,heatText:`2242万热度`,score:8.9,statusText:`完结`,href:`#`}];function M(e){return Array.from({length:e},(e,t)=>({...j[t%j.length],contentId:`mock-${t+1}`}))}function N({filled:e,className:t=``}){return S(`svg`,{viewBox:`0 0 14 14`,fill:`none`,"aria-hidden":!0,className:t,children:S(`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 P({score:e}){let t=Math.ceil(e/2);return C(i,{className:`flex items-center gap-[8px]`,children:[S(i,{className:`flex items-center gap-[4px]`,children:Array.from({length:5},(e,n)=>S(N,{filled:n<t,className:`size-[14px]`},n))}),S(a,{className:`font-['DIN'] text-[12px] font-bold leading-normal text-[#FFC039]`,children:e.toFixed(1)})]})}function F({item:e,isEditor:t}){let n=m(e.cover,D),r=C(i,{className:`relative h-[158px] w-full`,children:[C(i,{className:`absolute left-0 top-[28px] h-[130px] w-full overflow-hidden rounded-[8px]`,children:[S(i,{className:`absolute inset-0 rounded-[8px]`,style:k}),S(i,{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)`}}),S(i,{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)`}}),S(i,{className:`pointer-events-none absolute inset-0 rounded-[8px]`,style:O})]}),C(i,{className:`absolute left-[16px] top-0 z-10 h-[138px] w-[100px] overflow-hidden rounded-[4px]`,children:[S(`img`,{src:n,alt:e.title,className:`absolute inset-0 size-full object-cover`}),S(i,{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%)`}}),S(i,{className:`pointer-events-none absolute inset-0 rounded-[4px]`,style:A}),e.statusText&&S(i,{className:`absolute bottom-[9px] right-[8px] flex h-[18px] w-[32px] items-center justify-center rounded-[4px] bg-white/20 p-[2px]`,children:S(a,{className:`font-['PingFang_SC'] text-[12px] leading-[14px] text-white`,children:e.statusText})})]}),C(i,{className:`absolute left-[132px] top-[58px] z-10 flex w-[210px] items-start justify-between`,children:[C(i,{className:`flex h-[71px] w-[152px] flex-col justify-between`,children:[C(i,{className:`flex flex-col gap-[4px]`,children:[S(a,{className:`line-clamp-1 font-['PingFang_SC'] text-[14px] font-medium leading-[20px] text-white`,children:e.title}),C(i,{className:`flex items-center gap-[10px] font-['PingFang_SC'] text-[14px] leading-[20px] text-white/60`,children:[e.category&&S(a,{className:`shrink-0 whitespace-nowrap`,children:e.category}),e.heatText&&S(a,{className:`shrink-0 whitespace-nowrap`,children:e.heatText})]})]}),e.score>0&&S(P,{score:e.score})]}),S(i,{"aria-hidden":!0,className:`size-[22px] shrink-0 opacity-0`})]})]});return t||!e.href||e.href===`#`?r:S(o,{href:e.href,className:`block`,children:r})}function I(o){let{title:m,items:w,layout:T,prefetchItems:E,mode:D=`renderer`}=o,O=D===`editor`,k=D===`renderer`,A=(m??``).trim()||`推荐榜`,j=!!T?.enabled,N=y(()=>c(T),[T]),P=w?.length??2,I=y(()=>_(N,P),[N,P]),L=y(()=>g(I,P),[I,P]),{data:R}=l(r(L),()=>n(L),{enabled:k&&!O&&j,staleTime:1/0}),[z,B]=x([]);v(()=>{O||!j||B(f(s(R?.data?.videos??[],I,P)))},[O,j,R,I,P]);let V=y(()=>O||j?[]:h(w),[w,O,j]),H=y(()=>Array.from(new Set(V)),[V]),U=y(()=>V.join(`,`),[V]),W=y(()=>Array.isArray(E)?E.map(e=>p(e.contentId)).join(`,`):``,[E]),[G,K]=x(()=>E??[]),q=b(``);v(()=>{O||j||(K(E??[]),q.current=W&&W===U?U:``)},[O,j,U,W,E]),v(()=>{if(O||j||!e()||!U||q.current===U)return;q.current=U;let n=!1;async function r(){try{let e=await t({ids:H},{cache:`no-store`}),r=Array.isArray(e.data?.videos)?e.data.videos:[];if(n)return;K(d(r,w??[]))}catch(e){console.error(`推荐榜数据获取失败`,e)}}return r(),()=>{n=!0}},[O,j,V,U,H,w]);let J=j?z:G,Y=y(()=>O?M(w?.length??2):[],[O,w?.length]),X=O?Y:J;return!O&&X.length===0?null:C(i,{className:`mt-[24px] w-full px-[16px]${O?` pointer-events-none`:``}`,children:[C(i,{className:`flex items-center justify-between`,children:[S(a,{className:`font-['PingFang_SC'] text-[18px] font-medium leading-[24px] text-white/90`,style:O?{textShadow:`0 1px 4px rgba(0,0,0,0.45)`}:void 0,children:A}),S(i,{className:`flex shrink-0 items-center justify-end gap-[2px] opacity-50`,style:O?{filter:`drop-shadow(0 1px 3px rgba(0,0,0,0.45))`}:void 0,children:S(i,{className:`overflow-hidden`,children:S(u,{className:`size-[24px] text-white`})})})]}),S(i,{className:`mt-[16px] flex flex-col gap-[16px]`,children:X.map((e,t)=>S(F,{item:e,isEditor:O},`${e.contentId}-${t}`))})]})}export{I as RankingRecommendClient};
|
|
@@ -1,35 +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 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 items: zod.ZodArray<zod.ZodObject<{
|
|
22
|
-
id: zod.ZodString & SchemaHasDefaultValue;
|
|
23
|
-
contentName: zod.ZodString & SchemaHasDefaultValue;
|
|
24
|
-
title: zod.ZodString & SchemaHasDefaultValue;
|
|
25
|
-
cover: zod.ZodString & SchemaHasDefaultValue;
|
|
26
|
-
useVideoPoster: zod.ZodBoolean & SchemaHasDefaultValue;
|
|
27
|
-
}, zod_v4_core0.$strip>> & SchemaHasDefaultValue;
|
|
28
|
-
} & {
|
|
29
|
-
mode: zod.ZodOptional<zod.ZodEnum<{
|
|
30
|
-
renderer: "renderer";
|
|
31
|
-
editor: "editor";
|
|
32
|
-
}>>;
|
|
33
|
-
}, zod_v4_core0.$strip>, "ranking-recommend", "内容组件">;
|
|
34
|
-
//#endregion
|
|
35
|
-
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,35 +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 moduleCount: z.ZodNumber & SchemaHasDefaultValue;
|
|
13
|
-
readonly layout: z.ZodObject<{
|
|
14
|
-
readonly enabled: z.ZodBoolean & SchemaHasDefaultValue;
|
|
15
|
-
readonly tags: z.ZodArray<z.ZodString> & SchemaHasDefaultValue;
|
|
16
|
-
}, z.core.$strip> | z.ZodOptional<z.ZodObject<{
|
|
17
|
-
readonly enabled: z.ZodBoolean & SchemaHasDefaultValue;
|
|
18
|
-
readonly tags: z.ZodArray<z.ZodString> & SchemaHasDefaultValue;
|
|
19
|
-
}, z.core.$strip>>;
|
|
20
|
-
readonly items: z.ZodArray<z.ZodObject<{
|
|
21
|
-
id: z.ZodString & SchemaHasDefaultValue;
|
|
22
|
-
contentName: z.ZodString & SchemaHasDefaultValue;
|
|
23
|
-
title: z.ZodString & SchemaHasDefaultValue;
|
|
24
|
-
cover: z.ZodString & SchemaHasDefaultValue;
|
|
25
|
-
useVideoPoster: z.ZodBoolean & SchemaHasDefaultValue;
|
|
26
|
-
}, z.core.$strip>> & SchemaHasDefaultValue;
|
|
27
|
-
} & {
|
|
28
|
-
mode: z.ZodOptional<z.ZodEnum<{
|
|
29
|
-
renderer: "renderer";
|
|
30
|
-
editor: "editor";
|
|
31
|
-
}>>;
|
|
32
|
-
}, z.core.$strip>;
|
|
33
|
-
type RankingRecommendInspectorProps = InferSchemaProps<typeof rankingRecommendInspectorPropsSchema>;
|
|
34
|
-
//#endregion
|
|
35
|
-
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个字符`}),moduleCount:e.number(2,{label:`推荐模块数`}),layout:e.object({enabled:e.boolean(!1,{fieldType:`switch`,label:`智能铺设`}),tags:e.array(n.string(),{label:`取数范围标签`,defaultValue:[`电影`]})},{label:`智能铺设`,defaultValue:{enabled:!1,tags:[`电影`]}}),items:e.array(n.object({id:e.string(``,{label:`内容ID`}),contentName:e.string(``,{label:`内容名称`}),title:e.string(``,{label:`推荐位内容名称`}),cover:e.string(``,{label:`推荐位封面`}),useVideoPoster:e.boolean(!0,{fieldType:`switch`,label:`沿用视频海报`})}),{label:`推荐榜内容`,defaultValue:[{id:`22edc8693ebbdaf1`,contentName:``,title:``,cover:``,useVideoPoster:!0},{id:`22edc8693ebbdaf1`,contentName:``,title:``,cover:``,useVideoPoster:!0}]})}));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,pContentGetPopularVideoList as t}from"../../../../service/generated/client.mjs";import{pContentGetPopularVideoListKey as n}from"../../../../service/generated/tanstack.mjs";import{getImageTextRecommendLayoutTags as r}from"../../../../hooks/image-text-recommend.mjs";import{HydrationBoundary as i}from"../../../../hooks/query/hydration-boundary.mjs";import{buildRankingCardList as a,resolveOrderedContentIds as o}from"./shared.mjs";import{buildSmartPopularQuery as s,buildStableChosenTags as c}from"./shared/query.mjs";import{RankingRecommendClient as l}from"./client.mjs";import{jsx as u}from"react/jsx-runtime";const d=[];async function f(f){let{mode:p=`renderer`,items:m=d,layout:h,...g}=f,_=!!h?.enabled,v=[],y=f.prefetchItems;if(p===`renderer`)try{if(_){let e=r(h),i=m?.length??2,a=s(c(e,i),i),o=await t(a);v.push({queryKey:n(a),queryFn:()=>Promise.resolve(o)})}else{let t=o(m),n=Array.from(new Set(t));if(n.length>0){let t=await e({ids:n},{cache:`no-store`});y=a(Array.isArray(t.data?.videos)?t.data.videos:[],m)}}}catch(e){console.warn(`[ranking-recommend] server prefetch failed:`,e)}return u(i,{prefetch:v,children:u(l,{...g,items:m,layout:h,mode:p,prefetchItems:y})})}export{f as RankingRecommendServer};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
function e(e,t){let n=e.map(e=>String(e).trim()).filter(Boolean);if(!n.length||t<=0)return[];if(n.length>=t)return n.slice(0,t);let r=[...n];for(;r.length<t;)r.push(n[r.length%n.length]);return r}function t(e,t){return{page_size:Math.max(20,t*10),tags:e.length?Array.from(new Set(e)):void 0}}export{t as buildSmartPopularQuery,e as buildStableChosenTags};
|
|
@@ -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 t=Number(e);return!Number.isFinite(t)||t<=0?0:t>10&&t<=100?t/10:Math.min(t,10)}function c(e){let r=n(e.id||e.mid||e.video_id),i=Number(e.play_count??e.browse_count??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:s(e.score),statusText:o(e),href:r?t({id:r,contentType:0}):`#`}}function l(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=>{let t=n(e.id),i=t?r.get(t):void 0;if(!i)return null;let a=c(i),o=(e.title??``).trim();o&&(a.title=o);let s=(e.cover??``).trim();return s&&e.useVideoPoster===!1&&(a.cover=s),a}).filter(e=>!!e)}function u(e){let r=n(e.id||e.mid),i=Number(e.static?.browse_cnt??0),o=n(e.update_status);return{contentId:r,title:n(e.name),cover:n(e.img_y||e.img_x),category:n(e.cat_name),heatText:a(i),score:s(e.score),statusText:o===`1`?`完结`:o===`0`?`连载中`:``,href:r?t({id:r,contentType:0}):`#`}}function d(e){return e.map(u)}export{l as buildRankingCardList,d as buildSmartRankingCardList,n as normalizeContentId,i as resolveCoverDisplaySrc,r as resolveOrderedContentIds};
|
|
@@ -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};
|