@funhub/platform 0.2.2 → 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/editor-preview.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/detail/video-detail-recommend/material.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 -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/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 +2 -2
- 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 +1 -1
- package/dist/components/ui/image.d.mts +4 -4
- 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 -38
- package/dist/service/generated/client.mjs +1 -1
- package/dist/service/generated/tanstack.d.mts +2 -47
- 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 +9 -662
- 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/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/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
|
@@ -12,13 +12,13 @@ import * as zod_v4_core0 from "zod/v4/core";
|
|
|
12
12
|
* 弹窗广告物料定义。
|
|
13
13
|
*/
|
|
14
14
|
declare const popupAdMaterial: DefineMaterialOption<typeof PopupAdServer, typeof PopupAd, zod.ZodObject<{
|
|
15
|
-
readonly items: zod.ZodArray<zod.ZodObject<{
|
|
15
|
+
readonly items: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
|
|
16
16
|
id: zod.ZodString & SchemaHasDefaultValue;
|
|
17
17
|
title: zod.ZodOptional<zod.ZodString> & SchemaHasDefaultValue;
|
|
18
18
|
jumpUrl: zod.ZodString & SchemaHasDefaultValue;
|
|
19
19
|
materialUrl: zod.ZodString & SchemaHasDefaultValue;
|
|
20
20
|
desc: zod.ZodOptional<zod.ZodString> & SchemaHasDefaultValue;
|
|
21
|
-
}, zod_v4_core0.$strip
|
|
21
|
+
}, zod_v4_core0.$strip>>> & SchemaHasDefaultValue;
|
|
22
22
|
} & {
|
|
23
23
|
mode: zod.ZodOptional<zod.ZodEnum<{
|
|
24
24
|
renderer: "renderer";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
import{defineMaterial as e}from"../../../../../utils/schema/material.mjs";import{
|
|
2
|
+
import{defineMaterial as e}from"../../../../../utils/schema/material.mjs";import{popupAdInspectorPropsSchema as t}from"./schema.mjs";import{PopupAd as n}from"./client.mjs";import{PopupAdServer as r}from"./server.mjs";const i=e({type:`popup-ad`,name:`弹窗广告`,icon:`/static/components-thumb/carousel_banner.png`,category:`广告组件`,serverComponent:r,clientComponent:n,propsSchema:t});export{i as popupAdMaterial};
|
|
@@ -19,13 +19,13 @@ interface PopupAdItem {
|
|
|
19
19
|
* 弹窗广告物料属性。
|
|
20
20
|
*/
|
|
21
21
|
declare const popupAdInspectorPropsSchema: z$1.ZodObject<{
|
|
22
|
-
readonly items: z$1.ZodArray<z$1.ZodObject<{
|
|
22
|
+
readonly items: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
|
|
23
23
|
id: z$1.ZodString & SchemaHasDefaultValue;
|
|
24
24
|
title: z$1.ZodOptional<z$1.ZodString> & SchemaHasDefaultValue;
|
|
25
25
|
jumpUrl: z$1.ZodString & SchemaHasDefaultValue;
|
|
26
26
|
materialUrl: z$1.ZodString & SchemaHasDefaultValue;
|
|
27
27
|
desc: z$1.ZodOptional<z$1.ZodString> & SchemaHasDefaultValue;
|
|
28
|
-
}, z$1.core.$strip
|
|
28
|
+
}, z$1.core.$strip>>> & SchemaHasDefaultValue;
|
|
29
29
|
} & {
|
|
30
30
|
mode: z$1.ZodOptional<z$1.ZodEnum<{
|
|
31
31
|
renderer: "renderer";
|
|
@@ -45,10 +45,19 @@ type PopupAdInspectorProps<T extends object = object> = InferSchemaProps<typeof
|
|
|
45
45
|
/**
|
|
46
46
|
* 弹窗广告组件 props。
|
|
47
47
|
*/
|
|
48
|
-
|
|
48
|
+
interface PopupAdBaseProps {
|
|
49
|
+
/**
|
|
50
|
+
* 广告列表。
|
|
51
|
+
*/
|
|
52
|
+
items?: PopupAdItem[];
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* 弹窗广告组件 props。
|
|
56
|
+
*/
|
|
57
|
+
type PopupAdProps = Omit<PopupAdInspectorProps<{
|
|
49
58
|
mode?: MaterialComponentMode;
|
|
50
59
|
componentId?: string;
|
|
51
60
|
sceneContext?: AdsMatchSceneContext;
|
|
52
|
-
}
|
|
61
|
+
}>, 'items'> & PopupAdBaseProps;
|
|
53
62
|
//#endregion
|
|
54
|
-
export { PopupAdInspectorProps, PopupAdItem, PopupAdProps, popupAdInspectorDefaultProps, popupAdInspectorPropsSchema };
|
|
63
|
+
export { PopupAdBaseProps, PopupAdInspectorProps, PopupAdItem, PopupAdProps, popupAdInspectorDefaultProps, popupAdInspectorPropsSchema };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
import{defineComponentPropsSchema as e,getSchemaDefaultProps as t}from"../../../../../utils/schema/schema.mjs";import n from"zod";const r=e(e=>({items:e.array(n.object({id:e.string(`popup-ad-1`,{label:`广告 ID`,required:!0}),title:e.string(`弹窗广告标题`,{label:`标题`,required:!1}),jumpUrl:e.string(`/search`,{label:`跳转链接`,required:!0}),materialUrl:e.string(`/static/components-resource/banner.png`,{label:`素材地址`,required:!0}),desc:e.string(`这里是弹窗广告描述`,{label:`描述`,required:!1})}),{label:`广告列表`,required:!
|
|
2
|
+
import{defineComponentPropsSchema as e,getSchemaDefaultProps as t}from"../../../../../utils/schema/schema.mjs";import n from"zod";const r=e(e=>({items:e.array(n.object({id:e.string(`popup-ad-1`,{label:`广告 ID`,required:!0}),title:e.string(`弹窗广告标题`,{label:`标题`,required:!1}),jumpUrl:e.string(`/search`,{label:`跳转链接`,required:!0}),materialUrl:e.string(`/static/components-resource/banner.png`,{label:`素材地址`,required:!0}),desc:e.string(`这里是弹窗广告描述`,{label:`描述`,required:!1})}),{label:`广告列表`,required:!1,defaultValue:[{id:`popup-ad-1`,title:`弹窗广告标题`,jumpUrl:`/search`,materialUrl:`/static/components-resource/banner.png`,desc:`这里是弹窗广告描述`}]})})),i=t(r);export{i as popupAdInspectorDefaultProps,r as popupAdInspectorPropsSchema};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
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{adaptTextAdProps as r,hasMatchedAds as i}from"../ad-match.mjs";import{useAdProvider as a}from"../ad-provider.mjs";import{useEffect as
|
|
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{adaptTextAdProps as r,hasMatchedAds as i}from"../ad-match.mjs";import{useAdProvider as a}from"../ad-provider.mjs";import{textAdInspectorDefaultProps as o}from"./schema.mjs";import{useEffect as s,useMemo as c,useState as l}from"react";import{jsx as u,jsxs as d}from"react/jsx-runtime";const f=`text_ad_list`;let p=null;function m(e,t){return Array.isArray(e)&&e.length>0?e:t??[]}function h(e,t){return typeof e==`number`&&e>0?e:t}function g(e,t){if(!e)return!1;if(t===`once`)return!0;let n=new Date(e),r=new Date;return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()&&n.getDate()===r.getDate()}function _(e,t){return g(e.closedAt,t)}function v(){if(p)return p;if(typeof window>`u`)return{};let e=window.localStorage.getItem(f);if(!e)return p={},{};try{let t=JSON.parse(e);return p=t&&typeof t==`object`?t:{},p}catch{return p={},{}}}function y(e){p=e,!(typeof window>`u`)&&window.localStorage.setItem(f,JSON.stringify(e))}function b(e){return v()[e]??{}}function x(e,t){y({...v(),[e]:t})}function S({displayCount:f,items:p,mode:g=`renderer`}){let v=g===`editor`?{displayCount:h(f,o.displayCount),items:m(p,o.items)}:{displayCount:f,items:p},y=a(),S=e(),C=g===`editor`,[w,T]=l(!1),[E,D]=l(C),[O,k]=l(C),A=c(()=>i(y?.matchData)?r(y?.matchData):{displayCount:v.displayCount,items:v.items},[y?.matchData,v.displayCount,v.items]),j=c(()=>{let e=A.items.filter(e=>e.text?.trim());return typeof A.displayCount==`number`?e.slice(0,Math.max(A.displayCount,0)):e},[A]),M=j[0],N=c(()=>j.map(e=>`${e.text}:${e.jumpUrl||``}`).join(`|`),[j]);if(s(()=>{T(!0)},[]),s(()=>{if(w){if(C){D(!0),k(!0);return}if(!N||!M){D(!1),k(!0);return}D(!_(b(N),`daily`)),k(!0)}},[M,C,w,N]),!M||!C&&(!w||!O||!E))return null;function P(){N&&x(N,{...b(N),closedAt:Date.now()})}function F(e){e.jumpUrl&&S.push(e.jumpUrl)}function I(e){e.stopPropagation(),D(!1),P()}function L(){C||(D(!1),P(),F(M))}return u(t,{className:`w-full`,style:{backgroundColor:`#131313`,padding:`8px 16px`},children:d(t,{className:`relative flex w-full items-center justify-between overflow-hidden cursor-pointer`,style:{minHeight:`40px`,backgroundColor:`#FFE7E7`,padding:`0 8px`},onClick:L,children:[d(t,{className:`flex min-w-0 items-center`,style:{gap:`8px`,width:`280px`},children:[u(t,{className:`shrink-0`,style:{padding:`4px 8px`,borderRadius:`8px`,backgroundColor:`rgba(0, 0, 0, 0.33)`},children:u(n,{className:`flex h-full items-center justify-center text-white`,style:{fontSize:`12px`,lineHeight:`normal`,fontWeight:400},children:`广告`})}),u(n,{className:`truncate`,style:{flex:`1 0 0`,color:`#FD4C5E`,fontSize:`14px`,lineHeight:`normal`,fontWeight:400},children:M.text})]}),d(t,{className:`flex shrink-0 items-center`,style:{gap:`6px`,width:`54px`},children:[u(t,{className:`flex shrink-0 items-center justify-center`,style:{width:`20px`,height:`34px`},children:u(`svg`,{width:`10`,height:`17`,viewBox:`0 0 10 17`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,children:u(`path`,{d:`M1 1L8.5 8.5L1 16`,stroke:`#FD4C5E`,strokeWidth:`1.8`,strokeLinecap:`round`,strokeLinejoin:`round`})})}),d(`button`,{type:`button`,"aria-label":`关闭文字广告`,className:`relative shrink-0 border-none p-0`,style:{width:`17px`,height:`17px`,borderRadius:`999px`,backgroundColor:`#F9A9AE`},onClick:I,children:[u(t,{className:`absolute left-1/2 top-1/2`,style:{width:`9px`,height:`2px`,borderRadius:`999px`,backgroundColor:`#FFFFFF`,transform:`translate(-50%, -50%) rotate(45deg)`}}),u(t,{className:`absolute left-1/2 top-1/2`,style:{width:`9px`,height:`2px`,borderRadius:`999px`,backgroundColor:`#FFFFFF`,transform:`translate(-50%, -50%) rotate(-45deg)`}})]})]})]})})}export{S as TextAd};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
import{defineMaterial as e}from"../../../../../utils/schema/material.mjs";import{
|
|
2
|
+
import{defineMaterial as e}from"../../../../../utils/schema/material.mjs";import{textAdInspectorPropsSchema as t}from"./schema.mjs";import{TextAd as n}from"./client.mjs";import{TextAdServer as r}from"./server.mjs";const i=e({type:`text-ad`,name:`文字广告`,icon:`/static/components-thumb/marquee_clickable_closable.png`,category:`广告组件`,serverComponent:r,clientComponent:n,propsSchema:t});export{i as textAdMaterial};
|
|
@@ -9,9 +9,9 @@ import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
|
9
9
|
//#region components/biz/business/banner-carousel/client.d.ts
|
|
10
10
|
declare function BannerCarouselClient({
|
|
11
11
|
mode,
|
|
12
|
-
props: propsConfig,
|
|
13
12
|
styles,
|
|
14
|
-
events
|
|
13
|
+
events,
|
|
14
|
+
...componentPops
|
|
15
15
|
}: BaseComponentProps<any> & {
|
|
16
16
|
mode?: MaterialComponentMode;
|
|
17
17
|
} & BasicBannerProps): react_jsx_runtime0.JSX.Element | null;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{mergeStyles as e}from"../../utils/styles/helpers.mjs";import{Button as t}from"../../../ui/button.mjs";import{Image as n}from"../../../ui/image.mjs";import{Box as r}from"../../../ui/box.mjs";import{Carousel as i,CarouselContent as a,CarouselItem as o}from"../../../ui/carousel.mjs";import{Text as s}from"../../../ui/text.mjs";import c from"../../../ui/link.mjs";import l from"../../../../assets/icons/detail/video_flag.mjs";import{defaultProps as u}from"./default-props.mjs";import d from"clsx";import{useIsClient as f}from"foxact/use-is-client";import{useEffect as p,useRef as m,useState as h}from"react";import{jsx as g,jsxs as _}from"react/jsx-runtime";
|
|
2
|
+
"use client";import{mergeStyles as e}from"../../utils/styles/helpers.mjs";import{Button as t}from"../../../ui/button.mjs";import{Image as n}from"../../../ui/image.mjs";import{Box as r}from"../../../ui/box.mjs";import{Carousel as i,CarouselContent as a,CarouselItem as o}from"../../../ui/carousel.mjs";import{Text as s}from"../../../ui/text.mjs";import c from"../../../ui/link.mjs";import l from"../../../../assets/icons/detail/video_flag.mjs";import{defaultProps as u}from"./default-props.mjs";import d from"clsx";import{useIsClient as f}from"foxact/use-is-client";import{useEffect as p,useRef as m,useState as h}from"react";import{jsx as g,jsxs as _}from"react/jsx-runtime";function v(e){let t=Number(e||0);if(!Number.isFinite(t)||t<=0)return`0`;if(t>=1e4){let e=t/1e4;return`${e%1==0?e:e.toFixed(1)}万`}if(t>=1e3){let e=t/1e3;return`${e%1==0?e:e.toFixed(1)}千`}return String(Math.floor(t))}function y(e){let t=e.playCount;if(typeof t==`number`&&Number.isFinite(t))return t;let n=e.video;if(!n||typeof n!=`object`)return 0;let r=n;return Number(r.static?.browse_cnt??r.play_count??0)||0}function b({mode:b=`renderer`,styles:x,events:S,...C}){let w=b===`editor`,{autoplay:T=u.autoplay,interval:E=u.interval,loop:D=u.loop,showTitle:O=u.showTitle,showIndicator:k=u.showIndicator,list:A=[]}={...u,...C},[j,M]=h(),[N,P]=h(0),F=f(),I=m(null);if(p(()=>{if(!j||!F)return;let e=()=>{P(j.selectedScrollSnap())};return j.on(`select`,e),e(),()=>{j.off(`select`,e)}},[j,S,F]),p(()=>{if(!(!T||!j||A.length<=1))return I.current=setInterval(()=>{j.canScrollNext()?j.scrollNext():D&&j.scrollTo(0)},E*1e3),()=>{I.current&&=(clearInterval(I.current),null)}},[T,j,E,D,A.length]),!A||A.length===0)return null;let L=A[N],R=x?e(x,{}):void 0,z=L?.badgeUrl||``,B=L?.showPlayCount??!0,V=L?.showEpisodeCount??!0,H=y(L),U=typeof L?.episodeInfo==`string`?L.episodeInfo.trim():``;return _(r,{className:d(`relative w-full overflow-hidden`,w&&`pointer-events-none`),style:R,children:[g(i,{setApi:M,opts:{align:`start`,loop:D,skipSnaps:!1,dragFree:!1},className:`w-full`,children:g(a,{className:`ml-0`,children:A.map((e,t)=>g(o,{className:`pl-0`,children:g(c,{href:e.target,className:`block relative w-full h-[219px] overflow-hidden touch-manipulation`,children:g(n,{src:e.coverUrl,alt:e.title||`Banner ${t+1}`,fill:!0,objectFit:`cover`,unoptimized:!0})})},t))})}),g(r,{className:`absolute inset-0 pointer-events-none flex flex-col justify-end`,style:{background:`linear-gradient(to top, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0) 100%)`},children:_(r,{className:`flex items-end justify-between gap-2 p-[8px]`,children:[_(r,{className:`flex-1 min-w-0 flex flex-col gap-[4px]`,children:[O&&L?.title!=null&&g(s,{as:`p`,className:`text-white text-[16px] leading-[24px] font-bold line-clamp-1`,children:String(L.title)}),_(r,{className:`flex items-center gap-[8px]`,children:[B&&_(r,{className:`flex items-center gap-[4px] px-[4px] py-0 rounded-[4px] bg-white/10 shrink-0`,children:[g(l,{className:`w-[12px] h-[12px] text-white shrink-0`}),g(s,{as:`span`,className:`text-white text-[12px] leading-[20px]`,children:v(H)})]}),V&&U&&g(s,{as:`span`,className:`text-white text-[12px] leading-[20px] shrink-0`,children:U})]})]}),k&&A.length>1&&g(r,{className:`flex items-center gap-[4px] py-[4px] shrink-0 pointer-events-auto`,children:A.map((e,n)=>g(t,{type:`button`,size:`xs`,className:d(`transition-all duration-300 rounded-full !p-0 shrink-0`,n===N?`w-[10px] h-[6px] bg-theme5`:`w-[6px] h-[6px] bg-white/30`),style:{padding:`0 !important`},"aria-label":`跳转到第 ${n+1} 个 Banner`,onClick:()=>j?.scrollTo(n)},n))})]})}),z&&g(r,{className:`absolute top-0 right-0 overflow-hidden rounded-bl-[8px] pointer-events-none`,children:g(n,{src:z,alt:``,width:37,height:20,className:`object-contain`,unoptimized:!0})})]})}export{b as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{mergeStyles as e}from"../../utils/styles/helpers.mjs";import{Box as t}from"../../../ui/box.mjs";import n from"../../../ui/link.mjs";import{urlPrefix as r}from"../../../../constants/url-prefix.mjs";import{useSticky as i}from"../../../../hooks/use-sticky.mjs";import a from"../../../../assets/icons/
|
|
2
|
+
"use client";import{mergeStyles as e}from"../../utils/styles/helpers.mjs";import{Box as t}from"../../../ui/box.mjs";import n from"../../../ui/link.mjs";import{urlPrefix as r}from"../../../../constants/url-prefix.mjs";import{useSticky as i}from"../../../../hooks/use-sticky.mjs";import a from"../../../../assets/icons/filter_dark.mjs";import o,{loadHiddenChannelIdsFromStorage as s}from"./channel-filter-dialog.mjs";import{defaultProps as c}from"./default-props.mjs";import{clsx as l}from"clsx";import{useEffect as u,useMemo as d,useState as f}from"react";import{Fragment as p,jsx as m,jsxs as h}from"react/jsx-runtime";import{usePathname as g}from"next/navigation";const _={};function v(e,t){let n=`${r.DOMAIN}/`,i=t.indexOf(n),a=i!==-1,o=a?t.slice(i+n.length).split(`/`)[0]:void 0;return e.isDefault?a&&o?`${r.DOMAIN}/${o}`:`/`:a&&o?`${r.DOMAIN}/${o}/${encodeURIComponent(e.name)}`:`${r.CHANNEL}/${encodeURIComponent(e.name)}`}function y(r){let{mode:y=`renderer`,styles:b,events:x,...S}=r,C=g()??`/`,w=y===`editor`,T=S||_,E={...c,...T},[D,O]=f(!1),{isSticky:k,ref:A}=i(),[j,M]=f(!1),[N,P]=f(E.list),F=d(()=>E.list.find(e=>e.isDefault)?.name??null,[E.list]),I=d(()=>E.currentChannelId??F,[E.currentChannelId,F]);u(()=>{let e=s();P(e?.length?E.list.filter(t=>!e.includes(t.name)):E.list)},[E.list]);let L=e=>{P(e)},R=(e,t)=>{x?.onChannelChange?.(e,t)},z=b?e(b,{}):void 0;return u(()=>{let e=()=>{let e=window.scrollY??document.documentElement.scrollTop??0,t=window.innerHeight,n=document.documentElement.scrollHeight;M(e+t>=n-1)};return window.addEventListener(`scroll`,e,{passive:!0}),e(),()=>{window.removeEventListener(`scroll`,e)}},[]),h(p,{children:[k&&m(t,{className:`w-full h-11`}),m(t,{as:`nav`,ref:A,className:l(`w-full transition-all duration-200 bg-bg1`,w&&`pointer-events-none`,k&&`fixed top-0 left-0 right-0 z-50`),style:z,children:h(t,{className:`relative flex items-center h-[44px]`,children:[m(t,{className:`flex-1 overflow-x-auto overflow-y-hidden [&::-webkit-scrollbar]:hidden`,style:{scrollbarWidth:`none`,msOverflowStyle:`none`,WebkitOverflowScrolling:`touch`},children:m(t,{className:`flex items-center h-full pl-4 pr-4 gap-4`,children:N.map((e,t)=>{let r=I===e.name||I===null&&t===0;return m(n,{href:v(e,C),webviewNavMode:`spa`,className:l(`whitespace-nowrap cursor-pointer transition-all duration-200`,`flex items-center justify-center h-11`,`${r?`text-xl`:`text-base`}`),style:{fontWeight:r?`bold`:`normal`,color:r?`var(--color-theme5)`:`var(--color-text2)`},onClick:()=>R(e,t),children:e.name},e.name||`channel-${t}`)})})}),r.modifiable?m(t,{className:`flex items-center gap-[12px] px-[8px]`,children:m(t,{className:`flex items-center justify-center cursor-pointer w-7 h-8`,onClick:()=>{O(!0),x?.onFilterClick?.()},children:m(a,{className:`w-5 h-5`,style:{color:`var(--color-text1)`}})})}):null]})}),m(o,{open:D,onOpenChange:O,channels:E.list,currentChannelId:I,onChannelClick:R,onChannelsChange:L})]})}export{y as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
const e={currentChannelId:null,isFullfeed:!1,
|
|
2
|
+
const e={currentChannelId:null,isFullfeed:!1,list:[]};export{e as defaultProps};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
|
|
2
|
+
"use client";import{Box as e}from"../../../../ui/box.mjs";import{Text as t}from"../../../../ui/text.mjs";import{useCardDecoration as n}from"../../../../../hooks/use-card-decoration.mjs";import{DetailInfoTags as r}from"./detail-info-tags.mjs";import{DetailInfoTitle as i}from"./detail-info-title.mjs";import{useEffect as a,useMemo as o,useRef as s,useState as c}from"react";import{jsx as l,jsxs as u}from"react/jsx-runtime";import{useTranslations as d}from"next-intl";function f({information:f,isShow:m,showTags:h=!0}){let g=d(`components.biz.business.detail`),{getTitleText:_}=n(),v=o(()=>_(f),[_,f]),y=o(()=>f.description||``,[f.description]),[b,x]=c(!1),[S,C]=c(!1),w=s(null),T=o(()=>p(f.score),[f.score]),E=f.tags||[],D=h&&E.length>0;a(()=>{x(!1)},[y]),a(()=>{if(b){C(!0);return}let e=w.current;if(!y||!m||!e){C(!1);return}let t=()=>{C(e.scrollHeight>e.clientHeight+1)};t();let n=new ResizeObserver(t);return n.observe(e),()=>{n.disconnect()}},[y,b,m]);function O(){x(e=>!e)}return!v&&!y&&!D?null:u(e,{className:`w-full pt-4 px-[12px]`,children:[u(e,{className:`w-full flex items-start justify-between min-w-0`,children:[l(e,{className:`flex-1 pr-[12px] min-w-0`,children:l(i,{title:v})}),u(e,{className:`ml-4 shrink-0 flex flex-col items-center`,children:[l(e,{className:`text-[28px] leading-[36px] h-[36px] font-bold text-[#FF9F1A]`,children:T}),l(t,{className:`text-[12px] text-text2 leading-4`,children:g(`detailIntroduction.score`)})]})]}),y&&m&&u(e,{className:`mt-[12px]`,children:[l(`p`,{ref:w,className:`text-[14px] leading-[22px] text-text2 break-all ${b?``:`line-clamp-1`}`,children:y}),S&&l(`button`,{type:`button`,className:`mt-[8px] text-theme5 inline-flex items-center text-[12px] leading-[18px] text-text2`,onClick:O,children:g(b?`detailIntroduction.collapse`:`detailIntroduction.expand`)})]}),D&&l(r,{tags:E,className:`mt-[12px]`})]})}function p(e){let t=Number(e||`0`);return Number.isFinite(t)?(t>10?t/10:t).toFixed(1):`0`}export{f as DetailIntroduction};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{useUserStore as e}from"../../../../../store/modules/user-store.mjs";import{pCommunityMoveCollectionContent as t}from"../../../../../service/generated/client.mjs";import{Box as n}from"../../../../ui/box.mjs";import{Text as r}from"../../../../ui/text.mjs";import{useLoginModalStore as i}from"../../../../../store/modules/login-modal-store.mjs";import{useDeleteRequest as a}from"../../../../../hooks/query/use-query.mjs";import o from"../../../../common/interaction-animations.module.mjs";import s from"../../../../common/collection-popup/index.mjs";import c from"../../../../common/share-popup/share-popup.mjs";import{useInteractionAnimation as l}from"../../../../../hooks/use-interaction-animation.mjs";import{useContentOperate as ee}from"../../../../../hooks/use-content-operate.mjs";import te from"../../../../../assets/icons/detail/check-ok.mjs";import{useCallback as u,useEffect as d,useMemo as f,useRef as p,useState as m}from"react";import{jsx as h,jsxs as g}from"react/jsx-runtime";import{toast as _}from"sonner";import{usePathname as v,useSearchParams as y}from"next/navigation";import{useTranslations as b}from"next-intl";function x({className:e}){return h(`svg`,{viewBox:`0 0 24 21`,fill:`none`,className:e,children:h(`path`,{d:`M21.2121 6.89394C21.2121 4.25805 19.0753 2.12121 16.4394 2.12121C14.8261 2.12121 13.3991 2.92114 12.5336 4.15024C12.3349 4.4321 12.0115 4.59976 11.6667 4.59976C11.3218 4.59976 10.9984 4.4321 10.7997 4.15024C9.93421 2.92114 8.50725 2.12121 6.89394 2.12121C4.25804 2.12121 2.12121 4.25805 2.12121 6.89394C2.12121 9.40321 3.62133 11.9321 5.72562 14.0572C7.68391 16.0348 10.0088 17.5016 11.6667 18.137C13.3246 17.5016 15.6494 16.0348 17.6077 14.0572C19.712 11.9321 21.2121 9.40321 21.2121 6.89394ZM23.3333 6.89394C23.3333 10.2178 21.3863 13.2566 19.1158 15.5497C16.8347 17.8533 14.0447 19.5915 12.0012 20.2706C11.7841 20.3428 11.5493 20.3428 11.3321 20.2706C9.28858 19.5915 6.4986 17.8533 4.21757 15.5497C1.94701 13.2566 0 10.2178 0 6.89394C0 3.08654 3.08652 0 6.89394 0C8.74758 0 10.4287 0.733771 11.6667 1.92235C12.9047 0.733771 14.5858 0 16.4394 0C20.2468 0 23.3333 3.08654 23.3333 6.89394Z`,fill:`currentColor`})})}function S({className:e}){return h(`svg`,{viewBox:`0 0 24 21`,fill:`none`,className:e,children:h(`path`,{d:`M23.3333 6.89394C23.3333 10.2178 21.3863 13.2566 19.1158 15.5497C16.8347 17.8533 14.0447 19.5915 12.0012 20.2706C11.7841 20.3428 11.5493 20.3428 11.3321 20.2706C9.28858 19.5915 6.4986 17.8533 4.21757 15.5497C1.94701 13.2566 0 10.2178 0 6.89394C0 3.08654 3.08652 0 6.89394 0C8.74758 0 10.4287 0.733771 11.6667 1.92235C12.9047 0.733771 14.5858 0 16.4394 0C20.2468 0 23.3333 3.08654 23.3333 6.89394Z`,fill:`currentColor`})})}function C({className:e}){return h(`svg`,{viewBox:`0 0 24 23`,fill:`none`,className:e,children:h(`path`,{d:`M11.6636 2.65236e-06C12.0673 -0.000898131 12.437 0.227705 12.6165 0.589326L15.6522 6.70732L22.4258 7.69539C22.8246 7.75364 23.1564 8.03302 23.2813 8.41625C23.4062 8.79955 23.3021 9.22064 23.0141 9.50272L18.0882 14.3261L19.2585 21.0292C19.3281 21.4283 19.1639 21.8323 18.836 22.0701C18.5077 22.3079 18.072 22.3385 17.7143 22.1478L11.6657 18.9226L5.61917 22.1478C5.26131 22.3386 4.82579 22.3082 4.49748 22.0701C4.16923 21.832 4.00582 21.4276 4.07595 21.0282L5.25356 14.3271L0.319396 9.50376C0.0308898 9.2217 -0.0728394 8.79987 0.0521809 8.41625C0.177201 8.03266 0.509448 7.7533 0.90872 7.69539L7.71753 6.70732L10.7139 0.593469L10.7884 0.464005C10.9835 0.177012 11.3103 0.000910321 11.6636 2.65236e-06ZM9.37675 8.14386C9.22265 8.45841 8.92279 8.6767 8.57614 8.72697L3.33644 9.48615L7.1365 13.2013C7.38683 13.446 7.50059 13.799 7.43996 14.1438L6.54096 19.2509L11.1675 16.7859L11.2866 16.731C11.5714 16.6219 11.8921 16.6405 12.1649 16.7859L16.7946 19.253L15.9028 14.1427C15.8428 13.7988 15.9559 13.4467 16.2052 13.2023L20.0001 9.48511L14.7967 8.72697C14.4525 8.67672 14.155 8.46057 14.0002 8.14904L11.6719 3.45827L9.37675 8.14386Z`,fill:`currentColor`})})}function ne({className:e}){return h(`svg`,{viewBox:`0 0 24 23`,fill:`none`,className:e,children:h(`path`,{d:`M11.6636 2.65236e-06C12.0673 -0.000898131 12.437 0.227705 12.6165 0.589326L15.6522 6.70732L22.4258 7.69539C22.8246 7.75364 23.1564 8.03302 23.2813 8.41625C23.4062 8.79955 23.3021 9.22064 23.0141 9.50272L18.0882 14.3261L19.2585 21.0292C19.3281 21.4283 19.1639 21.8323 18.836 22.0701C18.5077 22.3079 18.072 22.3385 17.7143 22.1478L11.6657 18.9226L5.61917 22.1478C5.26131 22.3386 4.82579 22.3082 4.49748 22.0701C4.16923 21.832 4.00582 21.4276 4.07595 21.0282L5.25356 14.3271L0.319396 9.50376C0.0308898 9.2217 -0.0728394 8.79987 0.0521809 8.41625C0.177201 8.03266 0.509448 7.7533 0.90872 7.69539L7.71753 6.70732L10.7139 0.593469L10.7884 0.464005C10.9835 0.177012 11.3103 0.000910321 11.6636 2.65236e-06Z`,fill:`currentColor`})})}function w({className:e}){return h(`svg`,{viewBox:`0 0 24 24`,fill:`none`,className:e,children:h(`path`,{d:`M11.7968 0.0846035C12.212 -0.0873746 12.69 0.00771373 13.0078 0.325488L23.0077 10.3254C23.22 10.5377 23.3375 10.8271 23.3332 11.1273C23.3288 11.4272 23.2029 11.7123 22.9849 11.9183L12.985 21.3627C12.6625 21.6673 12.1901 21.7509 11.7827 21.5754C11.3753 21.3998 11.1111 20.9991 11.1111 20.5554V15.6216C8.22953 15.9648 6.08879 17.6095 4.58982 19.3391C3.74967 20.3085 3.13167 21.2821 2.7246 22.0148C2.52173 22.38 2.37311 22.6823 2.27646 22.8894C2.22828 22.9927 2.19344 23.0722 2.17121 23.1238C2.16011 23.1495 2.15201 23.169 2.14734 23.1802C2.1451 23.1856 2.14372 23.1893 2.143 23.191C1.94502 23.6852 1.42342 23.9699 0.900603 23.8692C0.377728 23.7684 0 23.3102 0 22.7776C0 17.9877 0.696606 13.8374 2.60632 10.8582C4.41013 8.04448 7.21019 6.40446 11.1111 6.14686V1.11107C11.1111 0.661725 11.3817 0.256615 11.7968 0.0846035ZM13.3333 7.22216C13.3333 7.8358 12.8358 8.33326 12.2222 8.33326C8.37436 8.33326 5.97849 9.71592 4.47697 12.0583C3.44269 13.6719 2.79177 15.8074 2.46852 18.4168C2.60946 18.2401 2.75584 18.061 2.91014 17.8829C4.8356 15.6613 7.89407 13.3332 12.2222 13.3332C12.8358 13.3332 13.3333 13.8307 13.3333 14.4443V17.9773L20.6282 11.0882L13.3333 3.79335V7.22216Z`,fill:`currentColor`})})}function T({mode:T=`renderer`,information:O,onUpdate:k}){let A=T===`editor`||!O?.id||O.id.startsWith(`preview-`),j=`${v()}?${y()?.toString()||``}`,M=p(j),N=b(`components.biz.business.detail`),P=l(),[F,I]=m(!1),[L,R]=m(!1),z=p(0),B=p(0),V=e(e=>e.userId),H=e(e=>e.isLogin),U=a();d(()=>{M.current!==j&&(c.clear(),M.current=j)},[j]),d(()=>()=>{c.clear()},[]);let W=u(()=>{V&&(U([`user-profile`,`mine`,V,`user-like-video`]),U([`user-profile`,`mine`,V,`user-like-post`]),U([`user-profile`,`mine`,V,`user-collect-video`,V]),U([`user-profile`,`mine`,V,`user-collect-post`,V]))},[U,V]),{likeAnimation:G,handleLikeOperate:K,handleDefaultCollectionOperate:q,handleShareOperate:J}=ee({id:O.id,isLike:O.like||!1,isDislike:O.dislike||!1,isCollect:O.collect||!1,likeCnt:D(O.static?.like_cnt),dislikeCnt:D(O.static?.dislike_cnt),contentType:1,prefetchDefaultCollection:!A,animationClasses:{like:o.likeShakeAnimation,dislike:o.dislikeShakeAnimation}}),Y=u(e=>{k?.({...e})},[k]),X=u(async()=>{if(F)return;if(!H){i.getState().open();return}let e=Date.now();if(e-z.current<300)return;z.current=e,I(!0);let t=O.like||!1,n=O.dislike||!1,r=D(O.static?.like_cnt),a=D(O.static?.dislike_cnt),o=!t,s=Math.max(0,r+(o?1:-1)),c=o?!1:n,l=o&&n?Math.max(0,a-1):a;Y({like:o,dislike:c,static:{...O.static,like_cnt:s,dislike_cnt:l}});try{let e=await K();if(!e){Y({like:t,dislike:n,static:{...O.static,like_cnt:r,dislike_cnt:a}});return}Y({like:e.isLike,dislike:e.isDislike??c,static:{...O.static,like_cnt:e.likeCnt,dislike_cnt:e.dislikeCnt??l}}),W(),window.sensors?.track?.(`detail_like_click`,{object_id:O.id,action:e.isLike?`点赞`:`取消点赞`,like_count:e.likeCnt})}catch(e){console.error(`点赞操作失败:`,e),_.error(N(`detailOperate.operateFailed`))}finally{I(!1)}},[K,O,W,F,H,N,Y]),Z=f(()=>O.id,[O.id]),re=u(()=>{J(({isCollect:e})=>{Y({collect:e})},Z)},[J,Z,Y]),Q=u(()=>{s.show({mode:`select`,onCollect:async e=>{try{let n=await t({new_collection_id:e,content_id:O.id});if(n.code!==0)throw Error(n.message||N(`detailOperate.collectFailed`));Y({collect:!0}),W(),_.success(N(`detailOperate.modifyCollectionSuccess`))}catch(e){console.error(`修改收藏夹失败:`,e),_.error(N(`detailOperate.collectFailed`))}}})},[O.id,W,N,Y]),$=u(e=>{let t=e||N(`detailOperate.defaultCollection`);_.custom(e=>g(`div`,{className:`flex items-center justify-between gap-[16px] px-[16px] py-[12px] rounded-[12px] bg-black text-white shadow-lg min-w-[280px]`,children:[g(`div`,{className:`flex items-center gap-[10px]`,children:[h(`div`,{className:`w-[24px] h-[24px] rounded-full bg-white flex items-center justify-center`,children:h(te,{className:`w-[14px] h-[14px]`})}),g(`div`,{className:`flex items-center gap-[6px]`,children:[h(`span`,{className:`text-[14px] leading-[20px]`,children:N(`detailOperate.collectAdded`)}),h(`span`,{className:`text-[14px] leading-[20px] font-semibold`,children:t})]})]}),h(`button`,{type:`button`,className:`text-[14px] text-theme5 font-semibold`,onClick:()=>{_.dismiss(e),Q()},children:N(`detailOperate.modifyCollection`)})]}))},[Q,N]),ie=u(async()=>{if(L)return;if(!H){i.getState().open();return}let e=Date.now();if(e-B.current<300)return;B.current=e;let t=O.collect||!1,n=!t;R(!0),Y({collect:n}),n&&P.trigger(o.likeShakeAnimation),window.sensors?.track?.(`detail_fav_click`,{object_id:O.id,action:t?`取消收藏`:`收藏`});try{let e=await q({currentCollect:t,onUpdate:({isCollect:e})=>{Y({collect:e})}});if(!e?.success){Y({collect:t}),_.error(e?.message||N(`detailOperate.collectFailed`));return}Y({collect:e.isCollect??n}),W(),window.sensors?.track?.(`detail_fav_click`,{object_id:O.id,action:e.isCollect?`收藏`:`取消收藏`}),!t&&e.isCollect&&$(e.collectionTitle),t&&e.isCollect===!1&&_.success(N(`detailOperate.uncollectSuccess`))}catch(e){Y({collect:t}),console.error(`收藏操作失败:`,e),_.error(e?.message||N(`detailOperate.collectFailed`))}finally{R(!1)}},[P,q,O.id,O.collect,W,L,H,$,N,Y]);return g(n,{className:`mt-[16px] flex h-[52px] w-full items-center justify-between px-[48px] ${A?`pointer-events-none`:``}`,children:[g(n,{className:`flex h-full w-[43px] flex-col items-center justify-center gap-[2px] ${F?`opacity-50 cursor-not-allowed`:`cursor-pointer`}`,onClick:X,children:[O.like?h(S,{className:`size-[28px] text-[#FF5D8F] ${G.animationClass}`}):h(x,{className:`size-[28px] text-white`}),h(r,{className:`text-center text-[14px] leading-[22px] ${O.like?`text-[#FF5D8F]`:`text-white`}`,children:O.static?O.static.like_cnt===0?N(`detailOperate.like`):E(O.static?.like_cnt):N(`detailOperate.like`)})]}),g(n,{className:`flex h-full w-[43px] flex-col items-center justify-center gap-[2px] ${L?`opacity-50 cursor-not-allowed`:`cursor-pointer`}`,onClick:ie,children:[O.collect?h(ne,{className:`size-[28px] text-[#FFC039] ${P.animationClass}`}):h(C,{className:`size-[28px] text-white`}),h(r,{className:`text-center text-[14px] leading-[22px] text-white`,children:N(`detailOperate.collection`)})]}),g(n,{className:`flex h-full w-[43px] flex-col items-center justify-center gap-[2px] cursor-pointer`,onClick:re,children:[h(w,{className:`size-[28px] text-white`}),h(r,{className:`text-center text-[14px] leading-[22px] text-white`,children:N(`detailOperate.share`)})]})]})}function E(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 D(e){if(e==null)return 0;if(typeof e==`number`)return e;let t=Number(e);return Number.isNaN(t)?0:t}export{T as DetailOperate};
|
|
2
|
+
"use client";import{useUserStore as e}from"../../../../../store/modules/user-store.mjs";import{pCommunityMoveCollectionContent as t}from"../../../../../service/generated/client.mjs";import{Box as n}from"../../../../ui/box.mjs";import{Text as r}from"../../../../ui/text.mjs";import{useLoginModalStore as i}from"../../../../../store/modules/login-modal-store.mjs";import{useDeleteRequest as a}from"../../../../../hooks/query/use-query.mjs";import o from"../../../../common/interaction-animations.module.mjs";import s from"../../../../common/collection-popup/index.mjs";import c from"../../../../common/share-popup/share-popup.mjs";import{useInteractionAnimation as l}from"../../../../../hooks/use-interaction-animation.mjs";import{useContentOperate as u}from"../../../../../hooks/use-content-operate.mjs";import d from"../../../../../assets/icons/detail/check-ok.mjs";import f from"../../../../../assets/icons/detail/collect_nor.mjs";import p from"../../../../../assets/icons/detail/collect_sel.mjs";import ee from"../../../../../assets/icons/detail/give_like.mjs";import m from"../../../../../assets/icons/detail/give_like_sel.mjs";import te from"../../../../../assets/icons/detail/share.mjs";import{useCallback as h,useEffect as g,useMemo as _,useRef as v,useState as y}from"react";import{jsx as b,jsxs as x}from"react/jsx-runtime";import{toast as S}from"sonner";import{usePathname as C,useSearchParams as ne}from"next/navigation";import{useTranslations as w}from"next-intl";function T({mode:T=`renderer`,information:O,onUpdate:k}){let A=T===`editor`||!O?.id||O.id.startsWith(`preview-`),j=`${C()}?${ne()?.toString()||``}`,M=v(j),N=w(`components.biz.business.detail`),P=l(),[F,I]=y(!1),[L,R]=y(!1),z=v(0),B=v(0),V=e(e=>e.userId),H=e(e=>e.isLogin),U=a();g(()=>{M.current!==j&&(c.clear(),M.current=j)},[j]),g(()=>()=>{c.clear()},[]);let W=h(()=>{V&&(U([`user-profile`,`mine`,V,`user-like-video`]),U([`user-profile`,`mine`,V,`user-like-post`]),U([`user-profile`,`mine`,V,`user-collect-video`,V]),U([`user-profile`,`mine`,V,`user-collect-post`,V]))},[U,V]),{likeAnimation:G,handleLikeOperate:K,handleDefaultCollectionOperate:q,handleShareOperate:J}=u({id:O.id,isLike:O.like||!1,isDislike:O.dislike||!1,isCollect:O.collect||!1,likeCnt:D(O.static?.like_cnt),dislikeCnt:D(O.static?.dislike_cnt),contentType:1,prefetchDefaultCollection:!A,animationClasses:{like:o.likeShakeAnimation,dislike:o.dislikeShakeAnimation}}),Y=h(e=>{k?.({...e})},[k]),X=h(async()=>{if(F)return;if(!H){i.getState().open();return}let e=Date.now();if(e-z.current<300)return;z.current=e,I(!0);let t=O.like||!1,n=O.dislike||!1,r=D(O.static?.like_cnt),a=D(O.static?.dislike_cnt),o=!t,s=Math.max(0,r+(o?1:-1)),c=o?!1:n,l=o&&n?Math.max(0,a-1):a;Y({like:o,dislike:c,static:{...O.static,like_cnt:s,dislike_cnt:l}});try{let e=await K();if(!e){Y({like:t,dislike:n,static:{...O.static,like_cnt:r,dislike_cnt:a}});return}Y({like:e.isLike,dislike:e.isDislike??c,static:{...O.static,like_cnt:e.likeCnt,dislike_cnt:e.dislikeCnt??l}}),W(),window.sensors?.track?.(`detail_like_click`,{object_id:O.id,action:e.isLike?`点赞`:`取消点赞`,like_count:e.likeCnt})}catch(e){console.error(`点赞操作失败:`,e),S.error(N(`detailOperate.operateFailed`))}finally{I(!1)}},[K,O,W,F,H,N,Y]),Z=_(()=>O.id,[O.id]),re=h(()=>{J(({isCollect:e})=>{Y({collect:e})},Z)},[J,Z,Y]),Q=h(()=>{s.show({mode:`select`,onCollect:async e=>{try{let n=await t({new_collection_id:e,content_id:O.id});if(n.code!==0)throw Error(n.message||N(`detailOperate.collectFailed`));Y({collect:!0}),W(),S.success(N(`detailOperate.modifyCollectionSuccess`))}catch(e){console.error(`修改收藏夹失败:`,e),S.error(N(`detailOperate.collectFailed`))}}})},[O.id,W,N,Y]),$=h(e=>{let t=e||N(`detailOperate.defaultCollection`);S.custom(e=>x(`div`,{className:`flex items-center justify-between gap-[16px] px-[16px] py-[12px] rounded-[12px] bg-black text-white shadow-lg min-w-[280px]`,children:[x(`div`,{className:`flex items-center gap-[10px]`,children:[b(`div`,{className:`w-[24px] h-[24px] rounded-full bg-white flex items-center justify-center`,children:b(d,{className:`w-[14px] h-[14px]`})}),x(`div`,{className:`flex items-center gap-[6px]`,children:[b(`span`,{className:`text-[14px] leading-[20px]`,children:N(`detailOperate.collectAdded`)}),b(`span`,{className:`text-[14px] leading-[20px] font-semibold`,children:t})]})]}),b(`button`,{type:`button`,className:`text-[14px] text-theme5 font-semibold`,onClick:()=>{S.dismiss(e),Q()},children:N(`detailOperate.modifyCollection`)})]}))},[Q,N]),ie=h(async()=>{if(L)return;if(!H){i.getState().open();return}let e=Date.now();if(e-B.current<300)return;B.current=e;let t=O.collect||!1,n=!t;R(!0),Y({collect:n}),n&&P.trigger(o.likeShakeAnimation),window.sensors?.track?.(`detail_fav_click`,{object_id:O.id,action:t?`取消收藏`:`收藏`});try{let e=await q({currentCollect:t,onUpdate:({isCollect:e})=>{Y({collect:e})}});if(!e?.success){Y({collect:t}),S.error(e?.message||N(`detailOperate.collectFailed`));return}Y({collect:e.isCollect??n}),W(),window.sensors?.track?.(`detail_fav_click`,{object_id:O.id,action:e.isCollect?`收藏`:`取消收藏`}),!t&&e.isCollect&&$(e.collectionTitle),t&&e.isCollect===!1&&S.success(N(`detailOperate.uncollectSuccess`))}catch(e){Y({collect:t}),console.error(`收藏操作失败:`,e),S.error(e?.message||N(`detailOperate.collectFailed`))}finally{R(!1)}},[P,q,O.id,O.collect,W,L,H,$,N,Y]);return x(n,{className:`w-full h-[42px] mt-[16px] flex items-center justify-between ${A?`pointer-events-none`:``}`,children:[x(n,{className:`w-[25%] h-full flex flex-col items-center justify-center ${F?`opacity-50 cursor-not-allowed`:`cursor-pointer`}`,onClick:X,children:[O.like?b(m,{className:`w-[20px] h-[20px] ${G.animationClass}`}):b(ee,{className:`w-[20px] h-[20px] text-text2`}),b(r,{className:`text-[12px] text-text2 leading-[20px]`,children:O.static?O.static.like_cnt===0?N(`detailOperate.like`):E(O.static?.like_cnt):N(`detailOperate.like`)})]}),x(n,{className:`w-[25%] h-full flex flex-col items-center justify-center ${L?`opacity-50 cursor-not-allowed`:`cursor-pointer`}`,onClick:ie,children:[O.collect?b(p,{className:`w-[20px] h-[20px] ${P.animationClass}`}):b(f,{className:`w-[20px] h-[20px] text-text2`}),b(r,{className:`text-[12px] text-text2 leading-[20px]`,children:N(`detailOperate.collection`)})]}),x(n,{className:`w-[25%] h-full flex flex-col items-center justify-center cursor-pointer`,onClick:re,children:[b(te,{className:`w-[20px] h-[20px] text-text2`}),b(r,{className:`text-[12px] text-text2 leading-[20px]`,children:N(`detailOperate.share`)})]})]})}function E(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 D(e){if(e==null)return 0;if(typeof e==`number`)return e;let t=Number(e);return Number.isNaN(t)?0:t}export{T as DetailOperate};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
const e=`/static/components-thumb/video_player.png`,t=[{id:`tag-1`,name:`标签`,group:`类型`},{id:`tag-2`,name:`标签`,group:`类型`},{id:`tag-3`,name:`标签`,group:`类型`}],n=Array.from({length:6}).map((e,t)=>({id:`episode-${t+1}`,name:`第${t+1}集`,preview_m3u8_url:``,m3u8_url:``})),r={id:`preview-detail`,mid:`preview-detail`,name:`电影名称电影名称电影名称电影名称电影名称`,img_x:e,img_y:e,preview_images:[e],description:`简介文案,简介文案简介文案简介文案简介文案简介文案简介文案简介文案简介文案简介文案简介文案简介文案简介文案简介文案。`,score:`9.6`,is_more_link:`y`,update_status:`1`,tags:t,links:n,content_type:0,play_count:123,episode_cnt:n.length,like:!1,dislike:!1,collect:!1,static:{like_cnt:0,dislike_cnt:0}};function i(e=6){let t=Math.max(1,Math.floor(e));return Array.from({length:t}).map((e,t)=>({...r,id:`preview-recommend-${t+1}`,name:`猜你喜欢 ${t+1}`,play_count:8e3+t*873
|
|
2
|
+
const e=`/static/components-thumb/video_player.png`,t=[{id:`tag-1`,name:`标签`,group:`类型`},{id:`tag-2`,name:`标签`,group:`类型`},{id:`tag-3`,name:`标签`,group:`类型`}],n=Array.from({length:6}).map((e,t)=>({id:`episode-${t+1}`,name:`第${t+1}集`,preview_m3u8_url:``,m3u8_url:``})),r={id:`preview-detail`,mid:`preview-detail`,name:`电影名称电影名称电影名称电影名称电影名称`,img_x:e,img_y:e,preview_images:[e],description:`简介文案,简介文案简介文案简介文案简介文案简介文案简介文案简介文案简介文案简介文案简介文案简介文案简介文案简介文案。`,score:`9.6`,is_more_link:`y`,update_status:`1`,tags:t,links:n,content_type:0,play_count:123,episode_cnt:n.length,like:!1,dislike:!1,collect:!1,static:{like_cnt:0,dislike_cnt:0}};function i(e=6){let t=Math.max(1,Math.floor(e));return Array.from({length:t}).map((e,t)=>({...r,id:`preview-recommend-${t+1}`,name:`猜你喜欢 ${t+1}`,play_count:8e3+t*873}))}export{i as buildEditorPreviewRecommendList,r as editorPreviewInformation};
|
|
@@ -20,9 +20,6 @@ import "../video-detail-actions/index.mjs";
|
|
|
20
20
|
import { VideoDetailRecommendClient } from "../video-detail-recommend/client.mjs";
|
|
21
21
|
import { VideoDetailRecommend } from "../video-detail-recommend/server.mjs";
|
|
22
22
|
import "../video-detail-recommend/index.mjs";
|
|
23
|
-
import { VideoDetailWaterfallRecommendClient } from "../video-detail-waterfall-recommend/client.mjs";
|
|
24
|
-
import { VideoDetailWaterfallRecommend } from "../video-detail-waterfall-recommend/server.mjs";
|
|
25
|
-
import "../video-detail-waterfall-recommend/index.mjs";
|
|
26
23
|
import "../../../../../utils.mjs";
|
|
27
24
|
import z$1 from "zod";
|
|
28
25
|
|
|
@@ -90,38 +87,6 @@ declare const videoDetailMaterials: MaterialMap<readonly [DefineMaterialOption<t
|
|
|
90
87
|
renderer: "renderer";
|
|
91
88
|
editor: "editor";
|
|
92
89
|
}>>;
|
|
93
|
-
}, z$1.core.$strip>, "video-detail-recommend", "详情页"
|
|
94
|
-
readonly rows: z$1.ZodNumber & SchemaHasDefaultValue;
|
|
95
|
-
readonly columns: z$1.ZodNumber & SchemaHasDefaultValue;
|
|
96
|
-
readonly smartTagEnabled: z$1.ZodBoolean & SchemaHasDefaultValue;
|
|
97
|
-
readonly title: z$1.ZodString & SchemaHasDefaultValue;
|
|
98
|
-
readonly showPlayCount: z$1.ZodBoolean & SchemaHasDefaultValue;
|
|
99
|
-
readonly playCountDelta: z$1.ZodNumber & SchemaHasDefaultValue;
|
|
100
|
-
readonly showEpisode: z$1.ZodBoolean & SchemaHasDefaultValue;
|
|
101
|
-
readonly enableInfinite: z$1.ZodBoolean & SchemaHasDefaultValue;
|
|
102
|
-
readonly smartTagIds: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
|
|
103
|
-
readonly items: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
|
|
104
|
-
contentId: z$1.ZodString;
|
|
105
|
-
coverMode: z$1.ZodOptional<z$1.ZodEnum<{
|
|
106
|
-
content: "content";
|
|
107
|
-
upload: "upload";
|
|
108
|
-
}>>;
|
|
109
|
-
coverUrl: z$1.ZodOptional<z$1.ZodString>;
|
|
110
|
-
titleMode: z$1.ZodOptional<z$1.ZodEnum<{
|
|
111
|
-
content: "content";
|
|
112
|
-
custom: "custom";
|
|
113
|
-
}>>;
|
|
114
|
-
title: z$1.ZodOptional<z$1.ZodString>;
|
|
115
|
-
description: z$1.ZodOptional<z$1.ZodString>;
|
|
116
|
-
showPlayCount: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
117
|
-
playCountDelta: z$1.ZodOptional<z$1.ZodNumber>;
|
|
118
|
-
showEpisode: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
119
|
-
}, z$1.core.$strip>>>;
|
|
120
|
-
} & {
|
|
121
|
-
mode: z$1.ZodOptional<z$1.ZodEnum<{
|
|
122
|
-
renderer: "renderer";
|
|
123
|
-
editor: "editor";
|
|
124
|
-
}>>;
|
|
125
|
-
}, z$1.core.$strip>, "video-detail-waterfall-recommend", "详情页">]>;
|
|
90
|
+
}, z$1.core.$strip>, "video-detail-recommend", "详情页">]>;
|
|
126
91
|
//#endregion
|
|
127
92
|
export { videoDetailMaterials };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
import{getSchemaDefaultProps as e}from"../../../../../utils/schema/schema.mjs";import{generateMaterialMap as t}from"../../../../../utils/schema/utils.mjs";import{videoDetailInfoMaterial as n}from"../video-detail-info/material.mjs";import{videoDetailInfoTitleTagsEpisodesMaterial as r}from"../video-detail-info-title-tags-episodes/material.mjs";import{videoDetailPlayerMaterial as i}from"../video-detail-player/material.mjs";import{videoDetailPlayerBridgeOnlyMaterial as a}from"../video-detail-player-bridge-only/material.mjs";import{videoDetailRecommendMaterial as o}from"../video-detail-recommend/material.mjs";import{
|
|
2
|
+
import{getSchemaDefaultProps as e}from"../../../../../utils/schema/schema.mjs";import{generateMaterialMap as t}from"../../../../../utils/schema/utils.mjs";import{videoDetailInfoMaterial as n}from"../video-detail-info/material.mjs";import{videoDetailInfoTitleTagsEpisodesMaterial as r}from"../video-detail-info-title-tags-episodes/material.mjs";import{videoDetailPlayerMaterial as i}from"../video-detail-player/material.mjs";import{videoDetailPlayerBridgeOnlyMaterial as a}from"../video-detail-player-bridge-only/material.mjs";import{videoDetailRecommendMaterial as o}from"../video-detail-recommend/material.mjs";import{videoDetailActionsMaterial as s}from"../video-detail-actions/material.mjs";function c(e){return Object.fromEntries(Object.entries(e).map(([e,t])=>typeof t==`number`&&Number.isFinite(t)?[e,String(t)]:[e,t]))}function l(t,n){let r={...e(t.propsSchema),...n??{}},i=t.propsSchema.safeParse(r);if(i.success)return{isValid:!0,props:i.data};let a=c(r),o=t.propsSchema.safeParse(a);return o.success?{isValid:!0,props:o.data}:{isValid:!1,props:r}}const u=t([i,a,n,r,s,o]);export{l as resolveMaterialProps,u as videoDetailMaterials};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{useRequest as e}from"../../../../../hooks/query/use-query.mjs";import{batchQueryContentInteractions as t}from"../../../../../hooks/use-content-operate.mjs";import{DetailOperate as n}from"../shared/detail-operate.mjs";import{editorPreviewInformation as r}from"../shared/editor-preview.mjs";import{useVideoDetailMaterialRuntimeContext as i}from"../shared/runtime-context-provider.mjs";import{useCallback as a,useEffect as o,useRef as s,useState as c}from"react";import{jsx as l}from"react/jsx-runtime";function u({mode:u=`renderer`}){let d=i(),f=d?.information,p=d?.onUpdateInformation,m=u===`editor`,h=u===`renderer`,g=m,_=g?r:f,[v,y]=c(_),b=s(_),x=s(``)
|
|
2
|
+
"use client";import{useRequest as e}from"../../../../../hooks/query/use-query.mjs";import{batchQueryContentInteractions as t}from"../../../../../hooks/use-content-operate.mjs";import{DetailOperate as n}from"../shared/detail-operate.mjs";import{editorPreviewInformation as r}from"../shared/editor-preview.mjs";import{useVideoDetailMaterialRuntimeContext as i}from"../shared/runtime-context-provider.mjs";import{useCallback as a,useEffect as o,useRef as s,useState as c}from"react";import{jsx as l}from"react/jsx-runtime";function u({mode:u=`renderer`}){let d=i(),f=d?.information,p=d?.onUpdateInformation,m=u===`editor`,h=u===`renderer`,g=m,_=g?r:f,[v,y]=c(_),b=s(_),x=s(``);o(()=>{y(_)},[_]);let S=p?_:v;o(()=>{b.current=S},[S]);let C=h&&!!_?.id,{data:w}=e([`video-detail-actions-interaction`,_?.id],async()=>_?.id?await t([_.id],1):null,{enabled:C,staleTime:0,refetchOnMount:`always`,refetchOnWindowFocus:!1}),T=a(e=>{if(!g){if(p){p(e);return}y(t=>{if(!t)return t;let n=e.static?{...t.static||{},...e.static||{}}:t.static;return{...t,...e,static:n}})}},[p,g]);return o(()=>{let e=w?.interaction_list?.[0],t=b.current;if(!e||!t)return;let n=`${e.is_liked?1:0}-${e.is_disliked?1:0}-${e.is_collected?1:0}`;if(x.current===n)return;x.current=n;let r=e.is_liked||!1,i=e.is_disliked||!1,a=e.is_collected||!1,o=!!t.like,s=!!t.dislike,c=!!t.collect,l=t.static?.like_cnt,u=typeof l==`number`?l:Number(l||0),d=u;!r&&u>0?d=Math.max(0,u-1):o===r?r&&u===0&&(d=1):d=Math.max(0,u+(r?1:-1));let f=d!==u;o===r&&s===i&&c===a&&!f||T({like:r,dislike:i,collect:a,...f?{static:{...t.static||{},like_cnt:d}}:{}})},[T,w]),S?l(`div`,{className:g?`pointer-events-none`:void 0,children:l(n,{mode:u,information:S,onUpdate:T})}):null}export{u as VideoDetailActionsClient};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import
|
|
2
|
+
"use client";import{SeriesEpisodes as e}from"../../../../common/series-episodes/index.mjs";import{DetailIntroduction as t}from"../shared/detail-introduction.mjs";import{editorPreviewInformation as n}from"../shared/editor-preview.mjs";import{useVideoDetailMaterialRuntimeContext as r}from"../shared/runtime-context-provider.mjs";import{jsx as i,jsxs as a}from"react/jsx-runtime";function o({showTags:o=!1,showEpisodes:s=!0,mode:c=`renderer`}){let l=r(),u=l?.information,d=l?.currentSeriesNum??1,f=l?.onEpisodeChange,p=l?.isShow??!0,m=c===`editor`,h=m,g=h?n:u;if(!g)return null;let _=Math.max(1,Number(d||1)),v=h?e=>{}:f??(()=>{}),y=g?.is_more_link===`y`&&(g?.links?.length??0)>1;return a(`div`,{className:h?`pointer-events-none`:void 0,children:[i(t,{information:g,isShow:p,showTags:o}),(m||s)&&y&&i(e,{mode:`detail`,series_num:_,information:g,onEpisodeChange:v})]})}export{o as VideoDetailInfoClient};
|
|
@@ -6,6 +6,18 @@ import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
|
6
6
|
/**
|
|
7
7
|
* 推荐模块客户端组件。
|
|
8
8
|
*/
|
|
9
|
-
declare function VideoDetailRecommendClient(
|
|
9
|
+
declare function VideoDetailRecommendClient({
|
|
10
|
+
rows,
|
|
11
|
+
columns,
|
|
12
|
+
smartTagEnabled,
|
|
13
|
+
smartTagIds,
|
|
14
|
+
title,
|
|
15
|
+
showPlayCount,
|
|
16
|
+
playCountDelta,
|
|
17
|
+
showEpisode,
|
|
18
|
+
enableInfinite,
|
|
19
|
+
items,
|
|
20
|
+
mode
|
|
21
|
+
}: VideoDetailRecommendProps): react_jsx_runtime0.JSX.Element | null;
|
|
10
22
|
//#endregion
|
|
11
23
|
export { VideoDetailRecommendClient };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{Box as e}from"../../../../ui/box.mjs";import t from"../../../../ui/loading.mjs";import{WaterfallRecommend as n}from"../../../../common/list/waterfall-recommend/waterfall-recommend.mjs";import{useVideoDetailRecommendData as r}from"./shared.mjs";import{useCallback as i,useMemo as a}from"react";import{jsx as o,jsxs as s}from"react/jsx-runtime";function c(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 l(l){let{uiItems:u,shouldShowLoading:d,isPreview:f,resolvedModuleTitle:p,triggerIndex:m,triggerMarker:h}=r(l),g=a(()=>u.map((e,t)=>({key:e.info.id?`detail-recommend-${e.info.id}-${t}`:`detail-recommend-${t}`,sourceIndex:e.sourceIndex,href:e.detailPath||`#`,cardKind:e.cardKind,coverUrl:e.coverUrl,title:e.title,metaPrimaryText:e.showEpisode?e.videoInfoText:``,heatText:e.showPlayCount?e.playCountText:``,score:e.score})),[u]),_=a(()=>c(g),[g]),v=!!p,y=i(({item:e})=>{if(!(e.sourceIndex!==m||!h))return e=>{e&&e.setAttribute(`data-detail-recommend-trigger`,h)}},[m,h]);return g.length?s(e,{className:f?`mt-[16px] w-full pointer-events-none`:`mt-[16px] w-full`,children:[o(n,{title:p,columns:_,sectionClassName:`w-full`,headerClassName:v?`mb-[8px] flex items-center justify-between px-[12px]`:`hidden`,titleClassName:`flex-1 min-w-0 text-[18px] leading-[26px] font-bold line-clamp-1 text-text1`,containerClassName:`relative flex w-full gap-[15px] px-[12px]`,getItemRef:y}),d&&o(e,{className:`w-full flex justify-center py-[12px]`,children:o(t,{size:`medium`,showLabel:!1,className:`text-theme5`})})]}):null}export{l as VideoDetailRecommendClient};
|
|
2
|
+
"use client";import{gContentGetGuessYouLikeVideos as e,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/loading.mjs";import{useRequest as a}from"../../../../../hooks/query/use-query.mjs";import{useKeepAliveState as o}from"../../../../common/keep-scroll-position/index.mjs";import ee from"../../../../../assets/icons/detail/video_flag.mjs";import{MiniThreeCard as s}from"../../../../common/cards/mini-three-card.mjs";import{useCardDecoration as c}from"../../../../../hooks/use-card-decoration.mjs";import{buildEditorPreviewRecommendList as l}from"../shared/editor-preview.mjs";import{useVideoDetailMaterialRuntimeContext as u}from"../shared/runtime-context-provider.mjs";import{applyPlayCountDelta as te,clampColumns as ne,mergeManualAndPool as d,normalizeRecommendRuntimeProps as re,resolveRows as ie}from"./utils.mjs";import{useCallback as ae,useEffect as f,useMemo as p,useRef as oe,useState as se}from"react";import{jsx as m,jsxs as h}from"react/jsx-runtime";function g({rows:g,columns:_,smartTagEnabled:b,smartTagIds:x,title:pe,showPlayCount:me,playCountDelta:he,showEpisode:ge,enableInfinite:_e,items:ve,mode:ye=`renderer`}){let C=u()?.detailId||``,be=ye===`editor`,w=be,{getVerticalHoCoverImageUrl:T,getTitleText:E}=c(),D=oe(null),O=p(()=>re({smartTagEnabled:b,smartTagIds:x,enableInfinite:_e,items:ve}),[_e,ve,b,x]),k=O.smartTagEnabled,A=O.smartTagIds,j=p(()=>O.items??[],[O.items]),M=O.enableInfinite&&!be,N=!k,P=M&&k&&!w,xe=ie(g,M),F=ne(_),I=xe*F,L=Math.max(1,I),R=p(()=>[`video-detail-recommend`,C||`unknown`,L,A.join(`,`)].join(`:`),[C,L,A]),[Se,z]=o(`${R}:pool`,[]),[B,V]=o(`${R}:has-more`,!1),[H,U]=se(!1),W=p(()=>l(I),[I]),{data:G,isFetching:Ce,isPending:we}=a([`video-detail-recommend`,C,P?`paged`:`all`,L,A.join(`,`)],async()=>w?null:await e({page_size:L,tags:A}),{enabled:!w&&k,refetchOnMount:`always`}),K=p(()=>w?W:v(G?.data?.videos),[G?.data?.videos,W,w]);f(()=>{if(!P){U(!1);return}z(e=>{if(!K.length)return e;if(!e.length)return K;let t=[...K],n=new Set(K.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=y(G?.data?.videos,L);V(t=>t||e),U(!1)},[G?.data?.videos,K,L,V,z,P]);let q=P?Se:K,J=p(()=>N?Array.from(new Set(j.map(e=>S(e.contentId)).filter(Boolean))):[],[j,N]),{data:Te,isFetching:Ee,isPending:De}=a([`video-detail-recommend-manual-details`,J.join(`,`)],async()=>{if(!J.length)return[];let e=await t({ids:J});return(Array.isArray(e.data?.videos)?e.data.videos:[]).map(e=>ce(e))},{enabled:J.length>0,refetchOnMount:`always`}),Oe=p(()=>N?new Set(j.map(e=>S(e.contentId)).filter(Boolean)):new Set,[j,N]),ke=p(()=>w?q:q.filter(e=>!Oe.has(e.id)),[q,w,Oe]),Y=p(()=>{if(!N||!j.length)return[];let e=new Map;return q.forEach(t=>{let n=S(t.id);n&&e.set(n,t)}),(Te||[]).forEach(t=>{let n=S(t.id);n&&e.set(n,t)}),j.map((t,n)=>{let r=w?W[n%Math.max(1,W.length)]:fe(t,n),i=S(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},ee=t.titleMode===`custom`?t.title:E(o),s=t.coverMode===`content`?T(o)||a:a||T(o);return{info:{...o,name:ee||o.name,img_y:s||o.img_y,img_x:s||o.img_x},config:{showPlayCount:t.showPlayCount,playCountDelta:t.playCountDelta,showEpisode:t.showEpisode}}}).filter(Boolean)},[W,q,E,T,w,Te,j,N]),X=p(()=>ke.map(e=>({info:e})),[ke]),Z=N&&j.length>0,Ae=p(()=>Z?Y:d(Y,X,I),[Z,Y,I,X]),Q=p(()=>{if(P){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)))}if(M){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 Ae},[Ae,Y,X,M,P]),je=B&&Q.length>0?Math.max(0,Q.length-4):-1,Me=String(pe||``).trim(),$=ae(async()=>{if(!(!P||!B||H)){U(!0);try{let t=await e({page_size:L,tags:A}),n=Array.isArray(t.data?.videos)?t.data.videos:[],r=v(n),i=0;z(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}),V(y(n,L)&&i>0)}catch(e){console.error(`猜你喜欢分页加载失败`,e),V(!1)}finally{U(!1)}}},[B,H,L,A,V,z,P]);if(f(()=>{if(!P)return;let e=D.current;if(!e||!B)return;let t=new IntersectionObserver(e=>{e[0]?.isIntersecting&&!H&&$()});return t.observe(e),()=>{t.disconnect()}},[$,B,H,P,je]),!Q.length)return null;let Ne=!w&&(H||k&&(Ce||we)||J.length>0&&(Ee||De));return h(n,{className:`w-full mt-[16px] ${w?`pointer-events-none`:``}`,children:[Me?m(r,{className:`block pl-[12px] mb-[8px] text-text1 text-[18px] leading-[26px] font-bold`,children:Me}):null,m(n,{className:`w-full flex flex-wrap px-[12px]`,children:Q.map((e,t)=>{let n=E(e.info),i=me!==!1&&(e.config?.showPlayCount??!0),a=Number(e.config?.playCountDelta??he??0),o=e.config?.showEpisode??ge,c=ue(te(e.info.play_count||0,a)),l=le(e.info),u=Number.isFinite(F)&&F>0?F:3,ne=`${100/u}%`,d=t%u,re=u>1?{paddingLeft:8*d/u,paddingRight:8*(u-d-1)/u}:null;return m(`div`,{ref:t===je?D:void 0,style:{width:ne,...re||{}},children:m(s,{url:T(e.info),text:n,textChild:m(r,{as:`h3`,className:`text-text1 text-[16px] h-[24px] leading-[24px] my-[4px] line-clamp-1`,children:n}),style:{width:`100%`},bottomLeftChild:i?h(`div`,{className:`h-[20px] leading-[20px] text-[#fff] text-[12px] px-[4px] py-0 rounded-[4px] bg-[rgba(255,255,255,0.1)] ml-[4px] flex items-center gap-[4px]`,children:[m(ee,{className:`w-[12px] h-[12px] text-[#fff] shrink-0`}),c]}):null,bottomRightChild:o&&l?m(`div`,{className:`text-[#fff] text-[12px] leading-[20px] pr-2`,children:l}):null,linkPath:w?``:de(e.info)})},`guess-like-${t}`)})}),Ne&&m(n,{className:`w-full flex justify-center py-[12px]`,children:m(i,{size:`medium`,showLabel:!1,className:`text-theme5`})})]})}function _(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 v(e){return Array.isArray(e)?e.map(e=>_(e)):[]}function ce(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 y(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 le(e){if(b(e)){let t=Number(e.episode_cnt||e.links?.length||0);return t>0?`全${t}集`:``}return x(Number(e.duration||0))}function b(e){return e.is_more_link===`y`}function x(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 ue(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 de(e){let t=encodeURIComponent(e.name||``);return`/video/${e.id}/${t}/episode/1`}function S(e){return typeof e==`string`?e.trim():``}function fe(e,t){let n=S(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:``}}export{g as VideoDetailRecommendClient};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
import{defineMaterial as e}from"../../../../../utils/schema/material.mjs";import{VideoDetailRecommendClient as t}from"./client.mjs";import{videoDetailRecommendInspectorPropsSchema as n}from"./schema.mjs";import{VideoDetailRecommend as r}from"./server.mjs";const i=e({type:`video-detail-recommend`,name:`详情页-推荐模块`,icon:`/static/components-thumb/
|
|
2
|
+
import{defineMaterial as e}from"../../../../../utils/schema/material.mjs";import{VideoDetailRecommendClient as t}from"./client.mjs";import{videoDetailRecommendInspectorPropsSchema as n}from"./schema.mjs";import{VideoDetailRecommend as r}from"./server.mjs";const i=e({type:`video-detail-recommend`,name:`详情页-推荐模块`,icon:`/static/components-thumb/video_guess_you_like.png`,category:`详情页`,serverComponent:r,clientComponent:t,propsSchema:n});export{i as videoDetailRecommendMaterial};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{
|
|
2
|
+
"use client";import{Box as e}from"../../../../ui/box.mjs";import t from"../../../../../assets/icons/search.mjs";import{UserAvatar as n}from"../shared/avatar.mjs";import{jsx as r,jsxs as i}from"react/jsx-runtime";import a from"next/link";function o({mode:o=`renderer`}){return i(e,{as:`header`,className:o===`editor`?`px-[12px] py-[8px] flex gap-[16px] items-center justify-between pointer-events-none`:`px-[12px] py-[8px] flex gap-[16px] items-center justify-between`,children:[r(n,{}),r(a,{href:`/search`,"aria-label":`打开搜索页`,children:r(t,{className:`w-[22px] h-[22px] text-text1`,"aria-hidden":!0})})]})}export{o as HeaderAvatarIconClient};
|
|
@@ -5,7 +5,7 @@ import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
|
5
5
|
//#region components/biz/business/header-search/header-avatar-logo-search/client.d.ts
|
|
6
6
|
type HeaderAvatarLogoSearchClientProps = HeaderAvatarLogoSearchInspectorProps;
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* 顶部-头像&搜索框。
|
|
9
9
|
*/
|
|
10
10
|
declare function HeaderAvatarLogoSearchClient(props: HeaderAvatarLogoSearchClientProps): react_jsx_runtime0.JSX.Element;
|
|
11
11
|
//#endregion
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{
|
|
2
|
+
"use client";import{Box as e}from"../../../../ui/box.mjs";import{UserAvatar as t}from"../shared/avatar.mjs";import{Logo as n}from"../shared/logo.mjs";import{Search as r}from"../shared/search.mjs";import{headerAvatarLogoSearchInspectorDefaultProps as i}from"./schema.mjs";import{jsx as a,jsxs as o}from"react/jsx-runtime";function s(s){let{mode:c=`renderer`,...l}=s,u=c===`editor`,{logoSrc:d,logoHref:f}={...i,...l};return o(e,{as:`header`,className:u?`px-[12px] py-[8px] flex gap-[8px] items-center pointer-events-none`:`px-[12px] py-[8px] flex gap-[8px] items-center`,children:[a(t,{}),a(r,{}),a(n,{logoSrc:d,logoHref:f})]})}export{s as HeaderAvatarLogoSearchClient};
|
|
@@ -6,10 +6,9 @@ import * as zod_v4_core0 from "zod/v4/core";
|
|
|
6
6
|
|
|
7
7
|
//#region components/biz/business/header-search/header-avatar-logo-search/schema.d.ts
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
10
|
-
* -
|
|
11
|
-
* -
|
|
12
|
-
* - logoHref:可配置右侧菜单点击跳转地址
|
|
9
|
+
* 顶部-头像&搜索框&logo:
|
|
10
|
+
* - logoSrc:可配置 logo 图片地址(为空时使用内置 SVG)
|
|
11
|
+
* - logoHref:可配置 logo 点击跳转地址
|
|
13
12
|
*/
|
|
14
13
|
declare const headerAvatarLogoSearchInspectorPropsSchema: zod.ZodObject<{
|
|
15
14
|
readonly logoSrc: zod.ZodOptional<zod.ZodString> & SchemaHasDefaultValue;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
import{defineComponentPropsSchema as e,getSchemaDefaultProps as t}from"../../../../../utils/schema/schema.mjs";const n=e(e=>({logoSrc:e.string(
|
|
2
|
+
import{defineComponentPropsSchema as e,getSchemaDefaultProps as t}from"../../../../../utils/schema/schema.mjs";const n=e(e=>({logoSrc:e.string(`/static/icons/video.svg`,{label:`LOGO 图片地址`,required:!1}),logoHref:e.string(`/`,{label:`LOGO 跳转地址`,required:!1})})),r=t(n);export{r as headerAvatarLogoSearchInspectorDefaultProps,n as headerAvatarLogoSearchInspectorPropsSchema};
|
package/dist/components/biz/business/header-search/header-avatar-logo-search-icon/client.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{Box as e}from"../../../../ui/box.mjs";import
|
|
2
|
+
"use client";import{Box as e}from"../../../../ui/box.mjs";import t from"../../../../../assets/icons/search.mjs";import{UserAvatar as n}from"../shared/avatar.mjs";import{Logo as r}from"../shared/logo.mjs";import{headerAvatarLogoSearchIconInspectorDefaultProps as i}from"./schema.mjs";import{jsx as a,jsxs as o}from"react/jsx-runtime";import s from"next/link";function c(c){let{mode:l=`renderer`,...u}=c,d=l===`editor`,{logoSrc:f,logoHref:p}={...i,...u};return o(e,{as:`header`,className:d?`px-[12px] py-[8px] flex gap-[16px] items-center pointer-events-none`:`px-[12px] py-[8px] flex gap-[16px] items-center`,children:[a(n,{}),a(e,{className:`flex-1`}),a(s,{href:`/search`,"aria-label":`打开搜索页`,children:a(t,{className:`w-[22px] h-[22px] text-text1`,"aria-hidden":!0})}),a(r,{logoSrc:f,logoHref:p})]})}export{c as HeaderAvatarLogoSearchIconClient};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{
|
|
2
|
+
"use client";import{Box as e}from"../../../../ui/box.mjs";import{Logo as t}from"../shared/logo.mjs";import{Search as n}from"../shared/search.mjs";import{headerLogoSearchInspectorDefaultProps as r}from"./schema.mjs";import{jsx as i,jsxs as a}from"react/jsx-runtime";function o(o){let{mode:s=`renderer`,...c}=o,l=s===`editor`,{logoSrc:u,logoHref:d}={...r,...c};return a(e,{as:`header`,className:l?`px-[12px] py-[8px] flex gap-[8px] pointer-events-none`:`px-[12px] py-[8px] flex gap-[8px]`,children:[i(t,{logoSrc:u,logoHref:d}),i(n,{})]})}export{o as HeaderLogoSearchClient};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{
|
|
2
|
+
"use client";import{Box as e}from"../../../../ui/box.mjs";import{Search as t}from"../shared/search.mjs";import{jsx as n}from"react/jsx-runtime";function r({mode:r=`renderer`}){return n(e,{as:`header`,className:r===`editor`?`px-[12px] py-[8px] pointer-events-none`:`px-[12px] py-[8px]`,children:n(t,{})})}export{r as HeaderSearchClient};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{Button as e}from"../../../../ui/button.mjs";import{useUserStore as t}from"../../../../../store/modules/user-store.mjs";import{Avatar as n,AvatarFallback as r,AvatarImage as i}from"../../../../ui/avatar.mjs";import{
|
|
2
|
+
"use client";import{Button as e}from"../../../../ui/button.mjs";import{useUserStore as t}from"../../../../../store/modules/user-store.mjs";import{Avatar as n,AvatarFallback as r,AvatarImage as i}from"../../../../ui/avatar.mjs";import{useLoginModalStore as a}from"../../../../../store/modules/login-modal-store.mjs";import o from"../../../../../assets/icons/search/avatar.mjs";import{jsx as s,jsxs as c}from"react/jsx-runtime";import l from"next/link";import{useShallow as u}from"zustand/react/shallow";function d(){let{isLogin:d,userInfo:f}=t(u(e=>({isLogin:e.isLogin,userInfo:e.userInfo}))),p=a(e=>e.open),m=f?.avatar_url||f?.avatar||void 0;return d?s(l,{href:`/user/mine`,children:c(n,{className:`w-[36px] h-[36px]`,children:[s(i,{src:m,alt:`用户头像`}),s(r,{})]})}):s(e,{onClick:p,"aria-label":`登录`,className:`inline-flex rounded-full w-[36px] h-[36px] bg-transparent p-0 m-0`,children:s(o,{className:`w-[36px] h-[36px]`})})}export{d as UserAvatar};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import e from"../../../../../assets/icons/search/video.mjs";import{
|
|
2
|
+
"use client";import{Image as e}from"../../../../ui/image.mjs";import t from"../../../../../assets/icons/search/video.mjs";import{jsx as n}from"react/jsx-runtime";import r from"next/link";function i(i){let{logoHref:a,logoSrc:o}=i;return n(r,{href:a,className:`flex items-center justify-center w-[40px] h-[40px] relative`,children:o?n(e,{src:o,alt:`logo`,fill:!0,sizes:`40px`,className:`h-[40px] w-[40px] object-cover`}):n(t,{className:`w-[40px] h-[40px]`})})}export{i as Logo};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{
|
|
2
|
+
"use client";import{Text as e}from"../../../../ui/text.mjs";import t from"../../../../../assets/icons/search.mjs";import{jsx as n,jsxs as r}from"react/jsx-runtime";import i from"next/link";function a(){return r(i,{href:`/search`,"aria-label":`打开搜索页`,className:`flex flex-1 items-center gap-[8px] border-[1px] border-[#FD4C5E] rounded-[20px] px-[12px] py-[8px] h-[40px]`,children:[n(t,{className:`w-[16px] h-[16px]`,"aria-hidden":!0}),n(e,{className:`flex-1 text-[16px] text-text3`,children:`请输入搜索关键字`})]})}export{a as Search};
|
package/dist/components/biz/business/home-recommend/home-recommend-grid/inspector-schema.d.mts
CHANGED
|
@@ -28,6 +28,14 @@ declare const homeRecommendGridInspectorPropsSchema: z$1.ZodObject<{
|
|
|
28
28
|
}>>;
|
|
29
29
|
coverUrl: z$1.ZodOptional<z$1.ZodString>;
|
|
30
30
|
is_ad: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
31
|
+
ad: z$1.ZodOptional<z$1.ZodObject<{
|
|
32
|
+
ad_code: z$1.ZodOptional<z$1.ZodString>;
|
|
33
|
+
ad_advertise_url: z$1.ZodOptional<z$1.ZodString>;
|
|
34
|
+
ad_advertise_icon: z$1.ZodOptional<z$1.ZodString>;
|
|
35
|
+
ad_advertise_type: z$1.ZodOptional<z$1.ZodNumber>;
|
|
36
|
+
ad_advertise_desc: z$1.ZodOptional<z$1.ZodString>;
|
|
37
|
+
ad_ext_data: z$1.ZodOptional<z$1.ZodString>;
|
|
38
|
+
}, z$1.core.$strip>>;
|
|
31
39
|
ad_advertise_url: z$1.ZodOptional<z$1.ZodString>;
|
|
32
40
|
ad_advertise_icon: z$1.ZodOptional<z$1.ZodString>;
|
|
33
41
|
badge_url: z$1.ZodOptional<z$1.ZodString>;
|
package/dist/components/biz/business/home-recommend/home-recommend-grid/inspector-schema.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
import{defineComponentPropsSchema as e,getSchemaDefaultProps as t}from"../../../../../utils/schema/schema.mjs";import{HOME_RECOMMEND_DEFAULT_ENABLE_INFINITE as n,HOME_RECOMMEND_DEFAULT_GRID_COLUMNS as r,HOME_RECOMMEND_DEFAULT_GRID_ROWS as i,HOME_RECOMMEND_DEFAULT_PLAY_COUNT_DELTA as a,HOME_RECOMMEND_DEFAULT_SHOW_EPISODE as o,HOME_RECOMMEND_DEFAULT_SHOW_PLAY_COUNT as s,HOME_RECOMMEND_DEFAULT_SMART_TAG_ENABLED as c,HOME_RECOMMEND_DEFAULT_TITLE as l}from"../shared/home-recommend-default-config.mjs";import u from"zod";const d=e(e=>({rows:e.number(i,{label:`行数`}),columns:e.number(r,{label:`列数`}),smartTagEnabled:e.boolean(c,{fieldType:`switch`,label:`智能铺设`}),title:e.string(l,{label:`推荐位名称`}),showPlayCount:e.boolean(s,{fieldType:`switch`,label:`显示播放量`}),playCountDelta:e.number(a,{label:`播放量浮动`}),showEpisode:e.boolean(o,{fieldType:`switch`,label:`显示集数`}),enableInfinite:e.boolean(n,{fieldType:`switch`,label:`无限下拉`,required:!1}),moreLink:e.string(``,{label:`更多`,description:``,required:!1}),smartTagIds:u.array(u.string()).optional(),catId:e.string(``,{label:`分类 ID`,description:`透传热门接口 cat_id`,required:!1}),items:u.array(u.object({contentId:u.string(),coverMode:u.enum([`upload`,`content`]).optional(),coverUrl:u.string().optional(),is_ad:u.boolean().optional(),ad_advertise_url:u.string().optional(),ad_advertise_icon:u.string().optional(),badge_url:u.string().optional(),titleMode:u.enum([`custom`,`content`]).optional(),title:u.string().optional(),description:u.string().optional(),showPlayCount:u.boolean().optional(),playCountDelta:u.number().optional(),showEpisode:u.boolean().optional()})).optional()})),f={...t(d),smartTagIds:[],items:[]},p={rows:{type:`number`,title:`行数`,default:f.rows},columns:{type:`number`,title:`列数`,default:f.columns},smartTagEnabled:{type:`boolean`,title:`智能铺设`,default:f.smartTagEnabled},title:{type:`string`,title:`推荐位名称`,default:f.title},showPlayCount:{type:`boolean`,title:`显示播放量`,default:f.showPlayCount},playCountDelta:{type:`number`,title:`播放量浮动`,default:f.playCountDelta},showEpisode:{type:`boolean`,title:`显示集数`,default:f.showEpisode},enableInfinite:{type:`boolean`,title:`无限下拉`,default:f.enableInfinite},moreLink:{type:`string`,title:`更多`,description:``,default:f.moreLink},smartTagIds:{type:`array`,title:`智能铺设标签`,default:f.smartTagIds,items:{type:`string`,title:`标签 ID`}},catId:{type:`string`,title:`分类 ID`,description:`透传热门接口 cat_id`,default:f.catId},items:{type:`array`,title:`推荐项`,default:f.items,items:{type:`object`,title:`推荐项`,properties:{contentId:{type:`string`,title:`内容 ID`},coverMode:{type:`string`,title:`封面模式`},coverUrl:{type:`string`,title:`封面地址`},is_ad:{type:`boolean`,title:`是否广告`},ad_advertise_url:{type:`string`,title:`广告跳转地址`},ad_advertise_icon:{type:`string`,title:`广告素材地址`},badge_url:{type:`string`,title:`角标地址`},titleMode:{type:`string`,title:`标题模式`},title:{type:`string`,title:`标题`},description:{type:`string`,title:`简介`},showPlayCount:{type:`boolean`,title:`显示播放量`},playCountDelta:{type:`number`,title:`播放量浮动`},showEpisode:{type:`boolean`,title:`显示集数`}}}}};export{f as homeRecommendGridInspectorDefaultProps,d as homeRecommendGridInspectorPropsSchema,p as homeRecommendGridPropsSchema};
|
|
2
|
+
import{defineComponentPropsSchema as e,getSchemaDefaultProps as t}from"../../../../../utils/schema/schema.mjs";import{HOME_RECOMMEND_DEFAULT_ENABLE_INFINITE as n,HOME_RECOMMEND_DEFAULT_GRID_COLUMNS as r,HOME_RECOMMEND_DEFAULT_GRID_ROWS as i,HOME_RECOMMEND_DEFAULT_PLAY_COUNT_DELTA as a,HOME_RECOMMEND_DEFAULT_SHOW_EPISODE as o,HOME_RECOMMEND_DEFAULT_SHOW_PLAY_COUNT as s,HOME_RECOMMEND_DEFAULT_SMART_TAG_ENABLED as c,HOME_RECOMMEND_DEFAULT_TITLE as l}from"../shared/home-recommend-default-config.mjs";import u from"zod";const d=e(e=>({rows:e.number(i,{label:`行数`}),columns:e.number(r,{label:`列数`}),smartTagEnabled:e.boolean(c,{fieldType:`switch`,label:`智能铺设`}),title:e.string(l,{label:`推荐位名称`}),showPlayCount:e.boolean(s,{fieldType:`switch`,label:`显示播放量`}),playCountDelta:e.number(a,{label:`播放量浮动`}),showEpisode:e.boolean(o,{fieldType:`switch`,label:`显示集数`}),enableInfinite:e.boolean(n,{fieldType:`switch`,label:`无限下拉`,required:!1}),moreLink:e.string(``,{label:`更多`,description:``,required:!1}),smartTagIds:u.array(u.string()).optional(),catId:e.string(``,{label:`分类 ID`,description:`透传热门接口 cat_id`,required:!1}),items:u.array(u.object({contentId:u.string(),coverMode:u.enum([`upload`,`content`]).optional(),coverUrl:u.string().optional(),is_ad:u.boolean().optional(),ad:u.object({ad_code:u.string().optional(),ad_advertise_url:u.string().optional(),ad_advertise_icon:u.string().optional(),ad_advertise_type:u.number().optional(),ad_advertise_desc:u.string().optional(),ad_ext_data:u.string().optional()}).optional(),ad_advertise_url:u.string().optional(),ad_advertise_icon:u.string().optional(),badge_url:u.string().optional(),titleMode:u.enum([`custom`,`content`]).optional(),title:u.string().optional(),description:u.string().optional(),showPlayCount:u.boolean().optional(),playCountDelta:u.number().optional(),showEpisode:u.boolean().optional()})).optional()})),f={...t(d),smartTagIds:[],items:[]},p={rows:{type:`number`,title:`行数`,default:f.rows},columns:{type:`number`,title:`列数`,default:f.columns},smartTagEnabled:{type:`boolean`,title:`智能铺设`,default:f.smartTagEnabled},title:{type:`string`,title:`推荐位名称`,default:f.title},showPlayCount:{type:`boolean`,title:`显示播放量`,default:f.showPlayCount},playCountDelta:{type:`number`,title:`播放量浮动`,default:f.playCountDelta},showEpisode:{type:`boolean`,title:`显示集数`,default:f.showEpisode},enableInfinite:{type:`boolean`,title:`无限下拉`,default:f.enableInfinite},moreLink:{type:`string`,title:`更多`,description:``,default:f.moreLink},smartTagIds:{type:`array`,title:`智能铺设标签`,default:f.smartTagIds,items:{type:`string`,title:`标签 ID`}},catId:{type:`string`,title:`分类 ID`,description:`透传热门接口 cat_id`,default:f.catId},items:{type:`array`,title:`推荐项`,default:f.items,items:{type:`object`,title:`推荐项`,properties:{contentId:{type:`string`,title:`内容 ID`},coverMode:{type:`string`,title:`封面模式`},coverUrl:{type:`string`,title:`封面地址`},is_ad:{type:`boolean`,title:`是否广告`},ad:{type:`object`,title:`广告对象`,properties:{ad_code:{type:`string`,title:`广告业务编码`},ad_advertise_url:{type:`string`,title:`广告跳转地址`},ad_advertise_icon:{type:`string`,title:`广告素材地址`},ad_advertise_type:{type:`number`,title:`广告类型`},ad_advertise_desc:{type:`string`,title:`广告文案描述`},ad_ext_data:{type:`string`,title:`广告扩展信息`}}},ad_advertise_url:{type:`string`,title:`广告跳转地址`},ad_advertise_icon:{type:`string`,title:`广告素材地址`},badge_url:{type:`string`,title:`角标地址`},titleMode:{type:`string`,title:`标题模式`},title:{type:`string`,title:`标题`},description:{type:`string`,title:`简介`},showPlayCount:{type:`boolean`,title:`显示播放量`},playCountDelta:{type:`number`,title:`播放量浮动`},showEpisode:{type:`boolean`,title:`显示集数`}}}}};export{f as homeRecommendGridInspectorDefaultProps,d as homeRecommendGridInspectorPropsSchema,p as homeRecommendGridPropsSchema};
|
|
@@ -28,6 +28,14 @@ declare const homeRecommendGridMaterial: DefineMaterialOption<typeof HomeRecomme
|
|
|
28
28
|
}>>;
|
|
29
29
|
coverUrl: zod.ZodOptional<zod.ZodString>;
|
|
30
30
|
is_ad: zod.ZodOptional<zod.ZodBoolean>;
|
|
31
|
+
ad: zod.ZodOptional<zod.ZodObject<{
|
|
32
|
+
ad_code: zod.ZodOptional<zod.ZodString>;
|
|
33
|
+
ad_advertise_url: zod.ZodOptional<zod.ZodString>;
|
|
34
|
+
ad_advertise_icon: zod.ZodOptional<zod.ZodString>;
|
|
35
|
+
ad_advertise_type: zod.ZodOptional<zod.ZodNumber>;
|
|
36
|
+
ad_advertise_desc: zod.ZodOptional<zod.ZodString>;
|
|
37
|
+
ad_ext_data: zod.ZodOptional<zod.ZodString>;
|
|
38
|
+
}, zod_v4_core0.$strip>>;
|
|
31
39
|
ad_advertise_url: zod.ZodOptional<zod.ZodString>;
|
|
32
40
|
ad_advertise_icon: zod.ZodOptional<zod.ZodString>;
|
|
33
41
|
badge_url: zod.ZodOptional<zod.ZodString>;
|