@funhub/platform 0.1.151 → 0.1.153
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/components/biz/business/banner/variants/basic-banner/inspector-schema.d.mts +4 -5
- package/dist/components/biz/business/banner/variants/basic-banner/inspector-schema.mjs +1 -1
- package/dist/components/biz/business/banner/variants/basic-banner/material.d.mts +2 -3
- package/dist/components/biz/business/banner-carousel/material.d.mts +2 -3
- package/dist/components/biz/business/banner-carousel/schema.d.mts +2 -3
- package/dist/components/biz/business/banner-carousel/schema.mjs +1 -1
- package/dist/components/biz/business/channel-list/material.d.mts +2 -3
- package/dist/components/biz/business/channel-list/schema.d.mts +2 -3
- package/dist/components/biz/business/channel-list/schema.mjs +1 -1
- package/dist/components/biz/business/detail/shared/registry.d.mts +14 -17
- package/dist/components/biz/business/detail/shared/runtime-context-provider.mjs +1 -1
- package/dist/components/biz/business/detail/shared/use-video-detail-webview-bridge.mjs +1 -1
- package/dist/components/biz/business/detail/video-detail-actions/schema.mjs +1 -1
- package/dist/components/biz/business/detail/video-detail-info/material.d.mts +2 -3
- package/dist/components/biz/business/detail/video-detail-info/schema.d.mts +2 -3
- package/dist/components/biz/business/detail/video-detail-info/schema.mjs +1 -1
- package/dist/components/biz/business/detail/video-detail-info/server.mjs +1 -1
- package/dist/components/biz/business/detail/video-detail-info-title-tags-episodes/material.d.mts +2 -3
- package/dist/components/biz/business/detail/video-detail-info-title-tags-episodes/schema.d.mts +2 -3
- package/dist/components/biz/business/detail/video-detail-info-title-tags-episodes/schema.mjs +1 -1
- package/dist/components/biz/business/detail/video-detail-player/schema.mjs +1 -1
- package/dist/components/biz/business/detail/video-detail-player-bridge-only/client.d.mts +1 -1
- package/dist/components/biz/business/detail/video-detail-player-bridge-only/client.mjs +1 -1
- package/dist/components/biz/business/detail/video-detail-player-bridge-only/schema.mjs +1 -1
- package/dist/components/biz/business/detail/video-detail-recommend/client.mjs +1 -1
- package/dist/components/biz/business/detail/video-detail-recommend/material.d.mts +10 -11
- package/dist/components/biz/business/detail/video-detail-recommend/schema.d.mts +10 -11
- package/dist/components/biz/business/detail/video-detail-recommend/schema.mjs +1 -1
- package/dist/components/biz/business/floating-ball/material.d.mts +2 -3
- package/dist/components/biz/business/floating-ball/schema.d.mts +4 -5
- package/dist/components/biz/business/floating-ball/schema.mjs +1 -1
- package/dist/components/biz/business/header-search/header-avatar-icon/schema.mjs +1 -1
- package/dist/components/biz/business/header-search/header-avatar-logo-search/material.d.mts +2 -3
- package/dist/components/biz/business/header-search/header-avatar-logo-search/schema.d.mts +2 -3
- 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/material.d.mts +2 -3
- package/dist/components/biz/business/header-search/header-avatar-logo-search-icon/schema.d.mts +2 -3
- package/dist/components/biz/business/header-search/header-avatar-logo-search-icon/schema.mjs +1 -1
- package/dist/components/biz/business/header-search/header-logo-search/material.d.mts +2 -3
- package/dist/components/biz/business/header-search/header-logo-search/schema.d.mts +2 -3
- package/dist/components/biz/business/header-search/header-logo-search/schema.mjs +1 -1
- package/dist/components/biz/business/header-search/header-search/schema.mjs +1 -1
- package/dist/components/biz/business/home-recommend/home-recommend-grid/inspector-schema.d.mts +12 -13
- 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 +12 -13
- package/dist/components/biz/business/home-recommend/home-recommend-waterfall/inspector-schema.d.mts +10 -11
- 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 +10 -11
- package/dist/components/biz/business/home-recommend/shared/home-recommend-base.mjs +1 -1
- package/dist/components/biz/business/home-recommend/shared/home-recommend-server-data.mjs +1 -1
- package/dist/components/biz/business/home-recommend/shared/home-recommend-video-detail.mjs +1 -1
- package/dist/components/biz/business/image-text-recommend/material.d.mts +14 -15
- package/dist/components/biz/business/image-text-recommend/schema.d.mts +14 -15
- package/dist/components/biz/business/image-text-recommend/schema.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/material.d.mts +7 -8
- package/dist/components/biz/business/marquee/schema.d.mts +24 -26
- package/dist/components/biz/business/marquee/schema.mjs +1 -1
- package/dist/components/biz/business/profile/profile-header/schema.mjs +1 -1
- package/dist/components/biz/business/profile/profile-header/user-profile-avatar.mjs +1 -1
- package/dist/components/biz/business/profile/profile-main/schema.mjs +1 -1
- package/dist/components/biz/business/profile/profile-main/tabs/like-tab/client.d.mts +1 -1
- package/dist/components/biz/business/search-history/client.mjs +1 -1
- package/dist/components/biz/business/search-history/material.d.mts +2 -3
- package/dist/components/biz/business/search-history/schema.d.mts +2 -3
- package/dist/components/biz/business/search-history/schema.mjs +1 -1
- package/dist/components/biz/business/search-input/schema.mjs +1 -1
- package/dist/components/biz/business/shortcut-grid/material.d.mts +4 -5
- package/dist/components/biz/business/shortcut-grid/schema.d.mts +4 -5
- package/dist/components/biz/business/shortcut-grid/schema.mjs +1 -1
- package/dist/components/biz/business/tab-bar/schema.mjs +1 -1
- package/dist/components/biz/business/text-recommend/material.d.mts +3 -4
- package/dist/components/biz/business/text-recommend/schema.d.mts +3 -4
- package/dist/components/biz/business/text-recommend/schema.mjs +1 -1
- package/dist/components/biz/example/button/material.d.mts +8 -9
- package/dist/components/biz/example/button/schema.d.mts +19 -21
- package/dist/components/biz/example/button/schema.mjs +1 -1
- package/dist/components/common/series-episodes/index.mjs +1 -1
- package/dist/components/common/video-player/process-m3u8-cache.mjs +1 -1
- package/dist/components/pages/collection-add/page.mjs +1 -1
- package/dist/components/pages/collection-create/form.mjs +1 -1
- package/dist/components/pages/collection-detail/detail.mjs +1 -1
- package/dist/components/pages/login/verify.mjs +1 -1
- package/dist/components/pages/video-detail/video-detail-client.mjs +1 -1
- package/dist/components/pages/video-list/video-list-client.mjs +1 -1
- package/dist/components/ui/image.d.mts +4 -4
- package/dist/hooks.d.mts +1 -3
- package/dist/hooks.mjs +1 -1
- package/dist/service/generated/client.d.mts +4 -12
- package/dist/service/generated/client.mjs +1 -1
- package/dist/service/generated/tanstack.d.mts +4 -14
- package/dist/service/generated/tanstack.mjs +1 -1
- package/dist/service/register-by-verify-email-code.d.mts +2 -2
- package/dist/service/register-by-verify-email-code.mjs +1 -1
- package/dist/service.d.mts +4 -4
- package/dist/service.mjs +1 -1
- package/dist/types.d.mts +57 -548
- package/dist/ui.d.mts +1 -2
- package/dist/ui.mjs +1 -1
- package/dist/utils/http.mjs +1 -1
- package/dist/utils/schema/index.d.mts +1 -1
- package/dist/utils/schema/inspector.d.mts +71 -43
- package/dist/utils/schema/schema.d.mts +53 -59
- package/dist/utils/schema/schema.mjs +1 -1
- package/dist/utils.d.mts +2 -3
- package/dist/utils.mjs +1 -1
- package/package.json +28 -28
- package/dist/components/ui/dots-loading.d.mts +0 -25
- package/dist/components/ui/dots-loading.mjs +0 -2
- package/dist/hooks/use-first-row-height.d.mts +0 -69
- package/dist/hooks/use-first-row-height.mjs +0 -2
- package/dist/hooks/use-min-duration-loading.d.mts +0 -18
- package/dist/hooks/use-min-duration-loading.mjs +0 -2
- package/dist/utils/device-id.d.mts +0 -14
- package/dist/utils/device-id.mjs +0 -2
package/dist/components/biz/business/header-search/header-avatar-logo-search-icon/schema.d.mts
CHANGED
|
@@ -9,9 +9,8 @@ import * as zod_v4_core0 from "zod/v4/core";
|
|
|
9
9
|
* 顶部-头像&搜索icon&logo 物料暂不对外开放配置,仅做占位展示。
|
|
10
10
|
*/
|
|
11
11
|
declare const headerAvatarLogoSearchIconInspectorPropsSchema: zod.ZodObject<{
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
} & {
|
|
12
|
+
logoSrc: zod.ZodOptional<zod.ZodString> & SchemaHasDefaultValue;
|
|
13
|
+
logoHref: zod.ZodOptional<zod.ZodString> & SchemaHasDefaultValue;
|
|
15
14
|
mode: zod.ZodOptional<zod.ZodEnum<{
|
|
16
15
|
renderer: "renderer";
|
|
17
16
|
editor: "editor";
|
package/dist/components/biz/business/header-search/header-avatar-logo-search-icon/schema.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
import{defineComponentPropsSchema as e,getSchemaDefaultProps as
|
|
2
|
+
import{defineComponentPropsSchema as e,defineTextPropSchema as t,getSchemaDefaultProps as n}from"../../../../../utils/schema/schema.mjs";const r=e({logoSrc:t({label:`LOGO 图片地址`,required:!1,defaultValue:``}),logoHref:t({label:`LOGO 跳转地址`,required:!1,defaultValue:`/`})}),i=n(r);export{i as headerAvatarLogoSearchIconInspectorDefaultProps,r as headerAvatarLogoSearchIconInspectorPropsSchema};
|
|
@@ -9,9 +9,8 @@ import * as zod_v4_core0 from "zod/v4/core";
|
|
|
9
9
|
|
|
10
10
|
//#region components/biz/business/header-search/header-logo-search/material.d.ts
|
|
11
11
|
declare const headerLogoSearchMaterial: DefineMaterialOption<typeof HeaderLogoSearch, typeof HeaderLogoSearchClient, zod.ZodObject<{
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
} & {
|
|
12
|
+
logoSrc: zod.ZodOptional<zod.ZodString> & SchemaHasDefaultValue;
|
|
13
|
+
logoHref: zod.ZodOptional<zod.ZodString> & SchemaHasDefaultValue;
|
|
15
14
|
mode: zod.ZodOptional<zod.ZodEnum<{
|
|
16
15
|
renderer: "renderer";
|
|
17
16
|
editor: "editor";
|
|
@@ -11,9 +11,8 @@ import * as zod_v4_core0 from "zod/v4/core";
|
|
|
11
11
|
* - logoHref:可配置 logo 点击跳转地址
|
|
12
12
|
*/
|
|
13
13
|
declare const headerLogoSearchInspectorPropsSchema: zod.ZodObject<{
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
} & {
|
|
14
|
+
logoSrc: zod.ZodOptional<zod.ZodString> & SchemaHasDefaultValue;
|
|
15
|
+
logoHref: zod.ZodOptional<zod.ZodString> & SchemaHasDefaultValue;
|
|
17
16
|
mode: zod.ZodOptional<zod.ZodEnum<{
|
|
18
17
|
renderer: "renderer";
|
|
19
18
|
editor: "editor";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
import{defineComponentPropsSchema as e,getSchemaDefaultProps as
|
|
2
|
+
import{defineComponentPropsSchema as e,defineTextPropSchema as t,getSchemaDefaultProps as n}from"../../../../../utils/schema/schema.mjs";const r=e({logoSrc:t({label:`LOGO 图片地址`,required:!1,defaultValue:``}),logoHref:t({label:`LOGO 跳转地址`,required:!1,defaultValue:`/`})}),i=n(r);export{i as headerLogoSearchInspectorDefaultProps,r as headerLogoSearchInspectorPropsSchema};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
import{defineComponentPropsSchema as e,getSchemaDefaultProps as t}from"../../../../../utils/schema/schema.mjs";const n=e(
|
|
2
|
+
import{defineComponentPropsSchema as e,getSchemaDefaultProps as t}from"../../../../../utils/schema/schema.mjs";const n=e({});t(n);export{n as headerSearchInspectorPropsSchema};
|
package/dist/components/biz/business/home-recommend/home-recommend-grid/inspector-schema.d.mts
CHANGED
|
@@ -9,18 +9,18 @@ import z$1 from "zod";
|
|
|
9
9
|
* HomeRecommendGrid 物料属性 schema 定义。
|
|
10
10
|
*/
|
|
11
11
|
declare const homeRecommendGridInspectorPropsSchema: z$1.ZodObject<{
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
12
|
+
rows: z$1.ZodNumber & SchemaHasDefaultValue;
|
|
13
|
+
columns: z$1.ZodNumber & SchemaHasDefaultValue;
|
|
14
|
+
smartTagEnabled: z$1.ZodBoolean & SchemaHasDefaultValue;
|
|
15
|
+
title: z$1.ZodString & SchemaHasDefaultValue;
|
|
16
|
+
showPlayCount: z$1.ZodBoolean & SchemaHasDefaultValue;
|
|
17
|
+
playCountDelta: z$1.ZodNumber & SchemaHasDefaultValue;
|
|
18
|
+
showEpisode: z$1.ZodBoolean & SchemaHasDefaultValue;
|
|
19
|
+
enableInfinite: z$1.ZodOptional<z$1.ZodBoolean> & SchemaHasDefaultValue;
|
|
20
|
+
moreLink: z$1.ZodOptional<z$1.ZodString> & SchemaHasDefaultValue;
|
|
21
|
+
smartTagIds: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
|
|
22
|
+
catId: z$1.ZodOptional<z$1.ZodString> & SchemaHasDefaultValue;
|
|
23
|
+
items: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
|
|
24
24
|
contentId: z$1.ZodString;
|
|
25
25
|
coverMode: z$1.ZodOptional<z$1.ZodEnum<{
|
|
26
26
|
content: "content";
|
|
@@ -38,7 +38,6 @@ declare const homeRecommendGridInspectorPropsSchema: z$1.ZodObject<{
|
|
|
38
38
|
playCountDelta: z$1.ZodOptional<z$1.ZodNumber>;
|
|
39
39
|
showEpisode: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
40
40
|
}, z$1.core.$strip>>>;
|
|
41
|
-
} & {
|
|
42
41
|
mode: z$1.ZodOptional<z$1.ZodEnum<{
|
|
43
42
|
renderer: "renderer";
|
|
44
43
|
editor: "editor";
|
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
|
|
2
|
+
import{defineComponentPropsSchema as e,defineNumberPropSchema as t,defineSwitchPropSchema as n,defineTextPropSchema as r,getSchemaDefaultProps as i}from"../../../../../utils/schema/schema.mjs";import{HOME_RECOMMEND_DEFAULT_ENABLE_INFINITE as a,HOME_RECOMMEND_DEFAULT_GRID_COLUMNS as o,HOME_RECOMMEND_DEFAULT_GRID_ROWS as s,HOME_RECOMMEND_DEFAULT_PLAY_COUNT_DELTA as c,HOME_RECOMMEND_DEFAULT_SHOW_EPISODE as l,HOME_RECOMMEND_DEFAULT_SHOW_PLAY_COUNT as u,HOME_RECOMMEND_DEFAULT_SMART_TAG_ENABLED as d,HOME_RECOMMEND_DEFAULT_TITLE as f}from"../shared/home-recommend-default-config.mjs";import p from"zod";const m=e({rows:t({label:`行数`,defaultValue:s}),columns:t({label:`列数`,defaultValue:o}),smartTagEnabled:n({label:`智能铺设`,defaultValue:d}),title:r({label:`推荐位名称`,defaultValue:f}),showPlayCount:n({label:`显示播放量`,defaultValue:u}),playCountDelta:t({label:`播放量浮动`,defaultValue:c}),showEpisode:n({label:`显示集数`,defaultValue:l}),enableInfinite:n({label:`无限下拉`,defaultValue:a,required:!1}),moreLink:r({label:`更多`,description:``,required:!1,defaultValue:``}),smartTagIds:p.array(p.string()).optional(),catId:r({label:`分类 ID`,description:`透传热门接口 cat_id`,required:!1,defaultValue:``}),items:p.array(p.object({contentId:p.string(),coverMode:p.enum([`upload`,`content`]).optional(),coverUrl:p.string().optional(),badge_url:p.string().optional(),titleMode:p.enum([`custom`,`content`]).optional(),title:p.string().optional(),description:p.string().optional(),showPlayCount:p.boolean().optional(),playCountDelta:p.number().optional(),showEpisode:p.boolean().optional()})).optional()}),h={...i(m),smartTagIds:[],items:[]},g={rows:{type:`number`,title:`行数`,default:h.rows},columns:{type:`number`,title:`列数`,default:h.columns},smartTagEnabled:{type:`boolean`,title:`智能铺设`,default:h.smartTagEnabled},title:{type:`string`,title:`推荐位名称`,default:h.title},showPlayCount:{type:`boolean`,title:`显示播放量`,default:h.showPlayCount},playCountDelta:{type:`number`,title:`播放量浮动`,default:h.playCountDelta},showEpisode:{type:`boolean`,title:`显示集数`,default:h.showEpisode},enableInfinite:{type:`boolean`,title:`无限下拉`,default:h.enableInfinite},moreLink:{type:`string`,title:`更多`,description:``,default:h.moreLink},smartTagIds:{type:`array`,title:`智能铺设标签`,default:h.smartTagIds,items:{type:`string`,title:`标签 ID`}},catId:{type:`string`,title:`分类 ID`,description:`透传热门接口 cat_id`,default:h.catId},items:{type:`array`,title:`推荐项`,default:h.items,items:{type:`object`,title:`推荐项`,properties:{contentId:{type:`string`,title:`内容 ID`},coverMode:{type:`string`,title:`封面模式`},coverUrl:{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{h as homeRecommendGridInspectorDefaultProps,m as homeRecommendGridInspectorPropsSchema,g as homeRecommendGridPropsSchema};
|
|
@@ -9,18 +9,18 @@ import * as zod_v4_core0 from "zod/v4/core";
|
|
|
9
9
|
|
|
10
10
|
//#region components/biz/business/home-recommend/home-recommend-grid/material.d.ts
|
|
11
11
|
declare const homeRecommendGridMaterial: DefineMaterialOption<typeof HomeRecommendGrid, typeof HomeRecommendGridClient, zod.ZodObject<{
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
12
|
+
rows: zod.ZodNumber & SchemaHasDefaultValue;
|
|
13
|
+
columns: zod.ZodNumber & SchemaHasDefaultValue;
|
|
14
|
+
smartTagEnabled: zod.ZodBoolean & SchemaHasDefaultValue;
|
|
15
|
+
title: zod.ZodString & SchemaHasDefaultValue;
|
|
16
|
+
showPlayCount: zod.ZodBoolean & SchemaHasDefaultValue;
|
|
17
|
+
playCountDelta: zod.ZodNumber & SchemaHasDefaultValue;
|
|
18
|
+
showEpisode: zod.ZodBoolean & SchemaHasDefaultValue;
|
|
19
|
+
enableInfinite: zod.ZodOptional<zod.ZodBoolean> & SchemaHasDefaultValue;
|
|
20
|
+
moreLink: zod.ZodOptional<zod.ZodString> & SchemaHasDefaultValue;
|
|
21
|
+
smartTagIds: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
|
|
22
|
+
catId: zod.ZodOptional<zod.ZodString> & SchemaHasDefaultValue;
|
|
23
|
+
items: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
|
|
24
24
|
contentId: zod.ZodString;
|
|
25
25
|
coverMode: zod.ZodOptional<zod.ZodEnum<{
|
|
26
26
|
content: "content";
|
|
@@ -38,7 +38,6 @@ declare const homeRecommendGridMaterial: DefineMaterialOption<typeof HomeRecomme
|
|
|
38
38
|
playCountDelta: zod.ZodOptional<zod.ZodNumber>;
|
|
39
39
|
showEpisode: zod.ZodOptional<zod.ZodBoolean>;
|
|
40
40
|
}, zod_v4_core0.$strip>>>;
|
|
41
|
-
} & {
|
|
42
41
|
mode: zod.ZodOptional<zod.ZodEnum<{
|
|
43
42
|
renderer: "renderer";
|
|
44
43
|
editor: "editor";
|
package/dist/components/biz/business/home-recommend/home-recommend-waterfall/inspector-schema.d.mts
CHANGED
|
@@ -9,16 +9,16 @@ import z$1 from "zod";
|
|
|
9
9
|
* HomeRecommendWaterfall 物料属性 schema 定义。
|
|
10
10
|
*/
|
|
11
11
|
declare const homeRecommendWaterfallInspectorPropsSchema: z$1.ZodObject<{
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
12
|
+
smartTagEnabled: z$1.ZodBoolean & SchemaHasDefaultValue;
|
|
13
|
+
title: z$1.ZodString & SchemaHasDefaultValue;
|
|
14
|
+
showPlayCount: z$1.ZodBoolean & SchemaHasDefaultValue;
|
|
15
|
+
playCountDelta: z$1.ZodNumber & SchemaHasDefaultValue;
|
|
16
|
+
showEpisode: z$1.ZodBoolean & SchemaHasDefaultValue;
|
|
17
|
+
enableInfinite: z$1.ZodBoolean & SchemaHasDefaultValue;
|
|
18
|
+
moreLink: z$1.ZodOptional<z$1.ZodString> & SchemaHasDefaultValue;
|
|
19
|
+
smartTagIds: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
|
|
20
|
+
catId: z$1.ZodOptional<z$1.ZodString> & SchemaHasDefaultValue;
|
|
21
|
+
items: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
|
|
22
22
|
contentId: z$1.ZodString;
|
|
23
23
|
coverMode: z$1.ZodOptional<z$1.ZodEnum<{
|
|
24
24
|
content: "content";
|
|
@@ -35,7 +35,6 @@ declare const homeRecommendWaterfallInspectorPropsSchema: z$1.ZodObject<{
|
|
|
35
35
|
playCountDelta: z$1.ZodOptional<z$1.ZodNumber>;
|
|
36
36
|
showEpisode: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
37
37
|
}, z$1.core.$strip>>>;
|
|
38
|
-
} & {
|
|
39
38
|
mode: z$1.ZodOptional<z$1.ZodEnum<{
|
|
40
39
|
renderer: "renderer";
|
|
41
40
|
editor: "editor";
|
package/dist/components/biz/business/home-recommend/home-recommend-waterfall/inspector-schema.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
import{defineComponentPropsSchema as e,getSchemaDefaultProps as
|
|
2
|
+
import{defineComponentPropsSchema as e,defineNumberPropSchema as t,defineSwitchPropSchema as n,defineTextPropSchema as r,getSchemaDefaultProps as i}from"../../../../../utils/schema/schema.mjs";import{HOME_RECOMMEND_DEFAULT_ENABLE_INFINITE as a,HOME_RECOMMEND_DEFAULT_PLAY_COUNT_DELTA as o,HOME_RECOMMEND_DEFAULT_SHOW_EPISODE as s,HOME_RECOMMEND_DEFAULT_SHOW_PLAY_COUNT as c,HOME_RECOMMEND_DEFAULT_SMART_TAG_ENABLED as l,HOME_RECOMMEND_DEFAULT_TITLE as u}from"../shared/home-recommend-default-config.mjs";import d from"zod";const f=e({smartTagEnabled:n({label:`智能铺设`,defaultValue:l}),title:r({label:`推荐位名称`,defaultValue:u}),showPlayCount:n({label:`显示播放量`,defaultValue:c}),playCountDelta:t({label:`播放量浮动`,defaultValue:o}),showEpisode:n({label:`显示集数`,defaultValue:s}),enableInfinite:n({label:`无限下拉`,defaultValue:a}),moreLink:r({label:`更多`,description:``,required:!1,defaultValue:``}),smartTagIds:d.array(d.string()).optional(),catId:r({label:`分类 ID`,description:`透传热门接口 cat_id`,required:!1,defaultValue:``}),items:d.array(d.object({contentId:d.string(),coverMode:d.enum([`upload`,`content`]).optional(),coverUrl:d.string().optional(),badge_url:d.string().optional(),titleMode:d.enum([`custom`,`content`]).optional(),title:d.string().optional(),showPlayCount:d.boolean().optional(),playCountDelta:d.number().optional(),showEpisode:d.boolean().optional()})).optional()}),p={...i(f),smartTagIds:[],items:[]},m={smartTagEnabled:{type:`boolean`,title:`智能铺设`,default:p.smartTagEnabled},title:{type:`string`,title:`推荐位名称`,default:p.title},showPlayCount:{type:`boolean`,title:`显示播放量`,default:p.showPlayCount},playCountDelta:{type:`number`,title:`播放量浮动`,default:p.playCountDelta},showEpisode:{type:`boolean`,title:`显示集数`,default:p.showEpisode},enableInfinite:{type:`boolean`,title:`无限下拉`,default:p.enableInfinite},moreLink:{type:`string`,title:`更多`,description:``,default:p.moreLink},smartTagIds:{type:`array`,title:`智能铺设标签`,default:p.smartTagIds,items:{type:`string`,title:`标签 ID`}},catId:{type:`string`,title:`分类 ID`,description:`透传热门接口 cat_id`,default:p.catId},items:{type:`array`,title:`推荐项`,default:p.items,items:{type:`object`,title:`推荐项`,properties:{contentId:{type:`string`,title:`内容 ID`},coverMode:{type:`string`,title:`封面模式`},coverUrl:{type:`string`,title:`封面地址`},badge_url:{type:`string`,title:`角标地址`},titleMode:{type:`string`,title:`标题模式`},title:{type:`string`,title:`标题`},showPlayCount:{type:`boolean`,title:`显示播放量`},playCountDelta:{type:`number`,title:`播放量浮动`},showEpisode:{type:`boolean`,title:`显示集数`}}}}};export{p as homeRecommendWaterfallInspectorDefaultProps,f as homeRecommendWaterfallInspectorPropsSchema,m as homeRecommendWaterfallPropsSchema};
|
|
@@ -9,16 +9,16 @@ import * as zod_v4_core0 from "zod/v4/core";
|
|
|
9
9
|
|
|
10
10
|
//#region components/biz/business/home-recommend/home-recommend-waterfall/material.d.ts
|
|
11
11
|
declare const homeRecommendWaterfallMaterial: DefineMaterialOption<typeof HomeRecommendWaterfall, typeof HomeRecommendWaterfallClient, zod.ZodObject<{
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
12
|
+
smartTagEnabled: zod.ZodBoolean & SchemaHasDefaultValue;
|
|
13
|
+
title: zod.ZodString & SchemaHasDefaultValue;
|
|
14
|
+
showPlayCount: zod.ZodBoolean & SchemaHasDefaultValue;
|
|
15
|
+
playCountDelta: zod.ZodNumber & SchemaHasDefaultValue;
|
|
16
|
+
showEpisode: zod.ZodBoolean & SchemaHasDefaultValue;
|
|
17
|
+
enableInfinite: zod.ZodBoolean & SchemaHasDefaultValue;
|
|
18
|
+
moreLink: zod.ZodOptional<zod.ZodString> & SchemaHasDefaultValue;
|
|
19
|
+
smartTagIds: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
|
|
20
|
+
catId: zod.ZodOptional<zod.ZodString> & SchemaHasDefaultValue;
|
|
21
|
+
items: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
|
|
22
22
|
contentId: zod.ZodString;
|
|
23
23
|
coverMode: zod.ZodOptional<zod.ZodEnum<{
|
|
24
24
|
content: "content";
|
|
@@ -35,7 +35,6 @@ declare const homeRecommendWaterfallMaterial: DefineMaterialOption<typeof HomeRe
|
|
|
35
35
|
playCountDelta: zod.ZodOptional<zod.ZodNumber>;
|
|
36
36
|
showEpisode: zod.ZodOptional<zod.ZodBoolean>;
|
|
37
37
|
}, zod_v4_core0.$strip>>>;
|
|
38
|
-
} & {
|
|
39
38
|
mode: zod.ZodOptional<zod.ZodEnum<{
|
|
40
39
|
renderer: "renderer";
|
|
41
40
|
editor: "editor";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{pContentGetPopularVideoList as e}from"../../../../../service/generated/client.mjs";import{useRouter as t}from"../../../../../utils/use-compatible-router.mjs";import{Image as n}from"../../../../ui/image.mjs";import{Box as r}from"../../../../ui/box.mjs";import{
|
|
2
|
+
"use client";import{pContentGetPopularVideoList as e}from"../../../../../service/generated/client.mjs";import{useRouter as t}from"../../../../../utils/use-compatible-router.mjs";import{Image as n}from"../../../../ui/image.mjs";import{Box as r}from"../../../../ui/box.mjs";import{Text as i}from"../../../../ui/text.mjs";import a from"../../../../../assets/icons/detail/video_flag.mjs";import{MiniThreeCard as o}from"../../../../common/cards/mini-three-card.mjs";import{HOME_RECOMMEND_DEFAULT_GRID_COLUMNS as s,HOME_RECOMMEND_DEFAULT_GRID_ROWS as c,HOME_RECOMMEND_DEFAULT_PLAY_COUNT_DELTA as l,HOME_RECOMMEND_DEFAULT_SHOW_EPISODE as u,HOME_RECOMMEND_DEFAULT_SHOW_PLAY_COUNT as ee,HOME_RECOMMEND_MAX_GRID_COLUMNS as d,HOME_RECOMMEND_MAX_GRID_ROWS as f}from"./home-recommend-default-config.mjs";import{HOME_RECOMMEND_CARD_CONFIG_FIELD as p}from"./home-recommend-preview.mjs";import{useCallback as m,useEffect as h,useLayoutEffect as te,useMemo as g,useRef as _,useState as v}from"react";import{jsx as y,jsxs as b}from"react/jsx-runtime";const ne={},re={list:[]};function x({variant:n,props:a=ne,data:o=re,mode:p=`renderer`}){let x=p===`editor`,C=t(),{list:w,title:oe,cursor:E}=o,D=g(()=>Array.isArray(w)?w:[],[w]),O=g(()=>Array.isArray(o.icons)?o.icons:[],[o.icons]),{rows:k,columns:se,moreLink:A,title:j,smartTagEnabled:M,smartTagIds:N,catId:le,showPlayCount:ue,playCountDelta:de,showEpisode:fe,enableInfinite:pe}=a,I=pe===!0&&M===!0,L=!x&&I&&D.length>=16,R=g(()=>Array.isArray(N)?N.map(e=>String(e||``).trim()).filter(Boolean):[],[N]),z=typeof le==`string`?le.trim():``,[B,me]=v(0),[he,ge]=v(D),[_e,ve]=v(O),[V,H]=v(()=>P(E)),[ye,be]=v(!1),xe=_(null),U=_(null),W=_(!1);h(()=>{ge(D),ve(O),H(P(E))},[E,O,D]);let Se=ae(k,c,f),G=ae(se,s,d),K=I?16:n===`grid`?Se*G:16,Ce=Se*G,we=x&&n===`grid`,q=we?he.slice(0,Ce):he,J=we?_e.slice(0,Ce):_e,Te=n===`waterfall`?6:4,Y=q.length>0?Math.max(0,q.length-Te):-1,Ee=!!V,De=j&&j.trim()||oe||``,X=ue??ee,Z=Number(de??l),Q=fe??u,Oe=!I,$=Oe?ie(A):``,ke=Oe&&!!$,Ae=m(async()=>{let t=V;if(!(!L||!t||W.current)){W.current=!0,be(!0);try{let n=await e({cursor:t,page_size:K,tags:R.length>0?R:void 0,cat_id:z||void 0}),r=Array.isArray(n.data?.videos)?n.data.videos:[],i=P(n.data?.cursor);r.length>0&&ge(e=>e.concat(r)),H(e=>{if(!(!r.length||!i))return i===e?void 0:i})}catch(e){console.error(`推荐位加载下一页失败(client)`,e),H(void 0)}finally{W.current=!1,be(!1)}}},[V,z,K,R,L]),je=m(()=>{if($){if($.startsWith(`http`)){window.location.href=$;return}C.push($)}},[$,C]);h(()=>{let e=U.current;if(!e||!L||!Ee)return;let t=new IntersectionObserver(e=>{!e[0]?.isIntersecting||ye||Ae()},{root:null,threshold:0});return t.observe(e),()=>{t.disconnect()}},[Ae,Ee,ye,q.length,K,L,Y]),te(()=>{let e=xe.current;if(!e||n!==`waterfall`)return;let t=()=>{let t=e.clientWidth||0;me(t>0?(t-12)/2:0)};t();let r=new ResizeObserver(t);return r.observe(e),()=>{r.disconnect()}},[n]);let Me=g(()=>n===`waterfall`?ce(q,J,B):{left:[],right:[]},[B,J,q,n]);return q.length?b(r,{className:`w-full mt-[16px]`,children:[b(r,{className:`flex items-center justify-between px-[12px] mb-[8px]`,children:[y(i,{className:`flex-1 min-w-0 text-text1 text-[18px] leading-[26px] font-bold line-clamp-1`,children:De}),ke&&y(i,{className:`text-text3 text-[12px] leading-[18px] cursor-pointer`,onClick:je,children:`更多`})]}),n===`grid`&&y(r,{className:`w-full flex flex-wrap px-[12px]`,children:q.map((e,t)=>{let r=J[t],i=T(e),a=X&&(i?.showPlayCount??!0),o=i?.playCountDelta??Z,s=i?.showEpisode??Q,c=t%G,l=G>1?{paddingLeft:12*c/G,paddingRight:12*(G-c-1)/G}:void 0;return y(`div`,{ref:t===Y?U:void 0,className:`min-w-0`,style:{width:`${100/G}%`,...l||{}},children:y(S,{variant:n,item:e,icon:r,index:t,showPlayCount:a,playCountDelta:o,showEpisode:s,widthStyle:{width:`100%`}})},F(e,t))})}),n===`waterfall`&&b(r,{ref:xe,className:`w-full px-[12px] flex gap-[12px]`,children:[y(r,{className:`flex-1 min-w-0 flex flex-col`,children:Me.left.map(e=>{let t=T(e.item),r=X&&(t?.showPlayCount??!0),i=t?.playCountDelta??Z,a=t?.showEpisode??Q;return y(`div`,{ref:e.index===Y?U:void 0,children:y(S,{variant:n,item:e.item,icon:e.icon,index:e.index,showPlayCount:r,playCountDelta:i,showEpisode:a,widthStyle:{width:`100%`}})},F(e.item,e.index))})}),y(r,{className:`flex-1 min-w-0 flex flex-col`,children:Me.right.map(e=>{let t=T(e.item),r=X&&(t?.showPlayCount??!0),i=t?.playCountDelta??Z,a=t?.showEpisode??Q;return y(`div`,{ref:e.index===Y?U:void 0,children:y(S,{variant:n,item:e.item,icon:e.icon,index:e.index,showPlayCount:r,playCountDelta:i,showEpisode:a,widthStyle:{width:`100%`}})},F(e.item,e.index))})})]})]}):null}function S({variant:e,item:t,icon:n,index:s,showPlayCount:c,playCountDelta:l,showEpisode:u,widthStyle:ee}){let d=oe(t),f=t.name||t?.title||``,p=k(se(t.static?.browse_cnt??0,l)),m=D(t,u),h=M(t,n,s);return y(o,{url:d,text:f,className:`w-full`,style:ee,topRightChild:h?y(C,{url:h}):void 0,bottomLeftChild:c?b(r,{className:`h-[20px] leading-[20px] text-[#fff] text-[12px] px-[4px] rounded-[4px] bg-[#333] ml-[4px] flex items-center`,children:[y(a,{className:`w-[16px] h-[auto] text-[#fff] mr-[4px]`}),p]}):null,bottomRightChild:u?m&&y(i,{className:`text-[#fff] text-[12px] leading-[18px] pr-2`,children:m}):null,textChild:y(r,{className:`py-[4px]`,children:y(i,{as:`h3`,className:`text-text1 text-[16px] leading-[24px] ${e===`waterfall`?`break-words line-clamp-3`:`line-clamp-1`}`,children:f})}),linkPath:w(t)})}function C({url:e}){return y(r,{className:`relative w-[40px] h-[20px]`,children:y(n,{src:e,alt:`corner`,width:40,height:20,className:`w-full h-auto`})})}function w(e){let t=encodeURIComponent(e.name||``);return`/video/${e.id||``}/${t}/episode/1`}function ie(e){return e?e.trim():``}function ae(e,t,n){let r=Number(e);return!Number.isFinite(r)||r<=0?t:Math.min(n,Math.floor(r))}function T(e){return e[p]}function oe(e){return e.img_y||e.img_x||e?.coverUrl}function E(e){return typeof e==`string`?e:``}function D(e,t){if(!t)return``;if(O(e)){let t=e.update_status===`0`,n=Number(e.episode_cnt||e.links?.length||0);return n>0?`${t?`更新至`:`全`}${n}集`:``}return j(Number(e.duration||0))}function O(e){if(Number(e.type??0)===2)return!0;let t=Number(e.episode_cnt||e.links?.length||0);return Number.isFinite(t)&&t>1}function k(e){return!Number.isFinite(e)||e<=0?`0`:e>=1e6?`${A(e/1e6)}M`:e>=1e3?`${A(e/1e3)}k`:Math.floor(e).toString()}function se(e,t){let n=Number(e||0),r=Number(t||0);return!Number.isFinite(n)||!Number.isFinite(r)?0:Math.max(0,n+r)}function A(e){let t=e.toFixed(1);return t.endsWith(`.0`)?t.slice(0,-2):t}function j(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 M(e,t,n){return E(e.badge_url)||E(t?.material_url)||``}function ce(e,t,n){let r=[],i=[],a=n<=0,o=0,s=0;return e.forEach((e,c)=>{let l=t[c];if(a){c%2==0?r.push({item:e,icon:l,index:c}):i.push({item:e,icon:l,index:c});return}let u=N(n,e);o<=s?(r.push({item:e,icon:l,index:c}),o+=u):(i.push({item:e,icon:l,index:c}),s+=u)}),{left:r,right:i}}function N(e,t){if(!e)return 0;let n=e*1.3461538461538463,r=D(t,!0)?18:0;return n+20+r+6+16}function P(e){if(typeof e==`string`)return e.trim()||void 0}function F(e,t){return e.id?`home-recommend-${e.id}`:`home-recommend-${t}`}export{x as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
import{pContentGetPopularVideoList as e}from"../../../../../service/generated/client.mjs";import{resolveHomeRecommendFeedMode as t}from"./home-recommend-default-config.mjs";import{HOME_RECOMMEND_CARD_CONFIG_FIELD as n}from"./home-recommend-preview.mjs";import{batchGetHomeRecommendVideoDetailMap as r}from"./home-recommend-video-detail.mjs";function i(e){return typeof e==`string`?e.trim():``}function a(e){return typeof e==`string`?e.trim():``}function o(e){return a(e)}function s(e){return Array.isArray(e)?e.map(e=>a(e)).filter(Boolean):[]}function c(e){let t=Number(e);if(!(!Number.isFinite(t)||t<0))return t}function l(e,t){let n=e,r=i(n.video_id||e.id||e.mid)||t,a=c(n.play_count)??c(e.browse_count),o=c(n.like_count),s=c(n.collect_count),l=(Array.isArray(n.episodes)?n.episodes.length:0)||(Array.isArray(e.video_episodes)?e.video_episodes.length:0)||(Array.isArray(e.links)?e.links.length:0),u=a!==void 0||o!==void 0||s!==void 0?{browse_cnt:a,like_cnt:o,collect_cnt:s}:void 0;return{id:r,mid:i(e.mid),name:e.name||``,img_x:e.img_x||``,img_y:e.img_y||``,img_type:e.img_type,cat_id:e.cat_id,cat_name:e.cat_name,status:e.status,status_text:e.status_text,show_at:e.show_at,update_status:e.update_status,description:e.description,language:e.language,director:e.director,issue_date:e.issue_date,actor:e.actor,up_user:e.up_user,time:e.time,money:e.money,source_username:e.source_username,task_id:e.task_id,error_msg:e.error_msg,file_status:e.file_status,score:c(e.score)??void 0,duration:c(e.duration)??void 0,episode_cnt:l>0?l:void 0,type:e.is_more_link?2:1,static:u}}function u(e){let t={showPlayCount:e.showPlayCount,playCountDelta:e.playCountDelta,showEpisode:e.showEpisode};if(!(t.showPlayCount===void 0&&t.playCountDelta===void 0&&t.showEpisode===void 0))return t}function d(e,t){let r=a(t.coverUrl),i=t.coverMode===`content`?e.img_y||e.img_x||r||``:r||e.img_y||e.img_x||``,o=a(t.title),s=t.titleMode===`custom`||o&&t.titleMode!==`content`?o:e.name||``,c=a(t.description),l=a(t.badge_url),d=u(t);return{...e,name:s||e.name,img_y:i||e.img_y||e.img_x,img_x:i||e.img_x||e.img_y,description:c||e.description,badge_url:l||e.badge_url,[n]:d}}function f(e){let t=i(e.contentId),n=a(e.coverUrl),r=a(e.title),o=a(e.description);return{id:t,mid:t,name:r||``,img_x:n,img_y:n,description:o,type:1}}async function p(e){let t=(Array.isArray(e)?e:[]).map(e=>({...e,contentId:i(e.contentId)})),n=t.filter(e=>!!e.contentId).map(e=>({id:e.contentId})),a=n.length?await r(n):new Map;return t.map(e=>{let t=e.contentId?a.get(e.contentId):void 0;return d(t?l(t,e.contentId||``):f(e),e)})}async function m(e){let t=(Array.isArray(e)?e:[]).map(e=>({...e,contentId:i(e.contentId)})).filter(e=>!!e.contentId);if(!t.length)return[];let n=await r(t.map(e=>({id:e.contentId})));return t.map(e=>{let t=n.get(e.contentId||``);return d(t?l(t,e.contentId||``):f(e),e)})}async function h(t,n,r){let a=Math.max(1,Math.floor(Number(t)||16)),c=s(n),l=o(r);try{let t=[],n=new Set,r=new Set,o=``;for(;t.length<a;){let s=o||`__first__`;if(r.has(s))break;r.add(s);let u=await e({cursor:o||void 0,page_size:a-t.length,tags:c.length>0?c:void 0,cat_id:l||void 0}),d=Array.isArray(u.data?.videos)?u.data.videos:[];d.forEach(e=>{let r=i(e?.id||e?.mid);r&&n.has(r)||(r&&n.add(r),t.push(e))});let f=u.data?.cursor
|
|
2
|
+
import{pContentGetPopularVideoList as e}from"../../../../../service/generated/client.mjs";import{resolveHomeRecommendFeedMode as t}from"./home-recommend-default-config.mjs";import{HOME_RECOMMEND_CARD_CONFIG_FIELD as n}from"./home-recommend-preview.mjs";import{batchGetHomeRecommendVideoDetailMap as r}from"./home-recommend-video-detail.mjs";function i(e){return typeof e==`string`?e.trim():``}function a(e){return typeof e==`string`?e.trim():``}function o(e){return a(e)}function s(e){return Array.isArray(e)?e.map(e=>a(e)).filter(Boolean):[]}function c(e){let t=Number(e);if(!(!Number.isFinite(t)||t<0))return t}function l(e,t){let n=e,r=i(n.video_id||e.id||e.mid)||t,a=c(n.play_count)??c(e.browse_count),o=c(n.like_count),s=c(n.collect_count),l=(Array.isArray(n.episodes)?n.episodes.length:0)||(Array.isArray(e.video_episodes)?e.video_episodes.length:0)||(Array.isArray(e.links)?e.links.length:0),u=a!==void 0||o!==void 0||s!==void 0?{browse_cnt:a,like_cnt:o,collect_cnt:s}:void 0;return{id:r,mid:i(e.mid),name:e.name||``,img_x:e.img_x||``,img_y:e.img_y||``,img_type:e.img_type,cat_id:e.cat_id,cat_name:e.cat_name,status:e.status,status_text:e.status_text,show_at:e.show_at,update_status:e.update_status,description:e.description,language:e.language,director:e.director,issue_date:e.issue_date,actor:e.actor,up_user:e.up_user,time:e.time,money:e.money,source_username:e.source_username,task_id:e.task_id,error_msg:e.error_msg,file_status:e.file_status,score:c(e.score)??void 0,duration:c(e.duration)??void 0,episode_cnt:l>0?l:void 0,type:e.is_more_link?2:1,static:u}}function u(e){let t={showPlayCount:e.showPlayCount,playCountDelta:e.playCountDelta,showEpisode:e.showEpisode};if(!(t.showPlayCount===void 0&&t.playCountDelta===void 0&&t.showEpisode===void 0))return t}function d(e,t){let r=a(t.coverUrl),i=t.coverMode===`content`?e.img_y||e.img_x||r||``:r||e.img_y||e.img_x||``,o=a(t.title),s=t.titleMode===`custom`||o&&t.titleMode!==`content`?o:e.name||``,c=a(t.description),l=a(t.badge_url),d=u(t);return{...e,name:s||e.name,img_y:i||e.img_y||e.img_x,img_x:i||e.img_x||e.img_y,description:c||e.description,badge_url:l||e.badge_url,[n]:d}}function f(e){let t=i(e.contentId),n=a(e.coverUrl),r=a(e.title),o=a(e.description);return{id:t,mid:t,name:r||``,img_x:n,img_y:n,description:o,type:1}}async function p(e){let t=(Array.isArray(e)?e:[]).map(e=>({...e,contentId:i(e.contentId)})),n=t.filter(e=>!!e.contentId).map(e=>({id:e.contentId})),a=n.length?await r(n):new Map;return t.map(e=>{let t=e.contentId?a.get(e.contentId):void 0;return d(t?l(t,e.contentId||``):f(e),e)})}async function m(e){let t=(Array.isArray(e)?e:[]).map(e=>({...e,contentId:i(e.contentId)})).filter(e=>!!e.contentId);if(!t.length)return[];let n=await r(t.map(e=>({id:e.contentId})));return t.map(e=>{let t=n.get(e.contentId||``);return d(t?l(t,e.contentId||``):f(e),e)})}async function h(t,n,r){let a=Math.max(1,Math.floor(Number(t)||16)),c=s(n),l=o(r);try{let t=[],n=new Set,r=new Set,o=``;for(;t.length<a;){let s=o||`__first__`;if(r.has(s))break;r.add(s);let u=await e({cursor:o||void 0,page_size:a-t.length,tags:c.length>0?c:void 0,cat_id:l||void 0}),d=Array.isArray(u.data?.videos)?u.data.videos:[];d.forEach(e=>{let r=i(e?.id||e?.mid);r&&n.has(r)||(r&&n.add(r),t.push(e))});let f=u.data?.cursor||``;if(!f||!d.length){o=``;break}o=f}return{videos:t.slice(0,a),nextCursor:o,loaded:!0}}catch(e){return console.error(`推荐位获取热门视频失败(server)`,e),{videos:[],nextCursor:``,loaded:!1}}}async function g({smartTagEnabled:e,smartTagIds:n,catId:r,pageSize:i=16,items:a=[]}){let c=t(e),l=e===!0?s(n):[],u=o(r),d=Array.isArray(a)&&a.length>0,f={list:[],icons:[],title:``,cursor:``,show_style:void 0};if(e!==!0)return d?{feedMode:c,data:{...f,list:await p(a),cursor:``}}:{feedMode:c,data:{...f,list:[],cursor:``}};if(c===`manual-with-video-detail`){let e=await h(i,l,u);if(e.loaded)return{feedMode:c,data:{...f,list:e.videos,cursor:e.nextCursor}};try{let e=await m(a);return{feedMode:c,data:{...f,list:e,cursor:``}}}catch(e){return console.error(`推荐位智能铺设补齐视频详情失败(server)`,e),{feedMode:c,data:{...f,list:[],cursor:``}}}}return{feedMode:c,data:f}}export{g as resolveHomeRecommendServerData};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
import{pContentBatchGetVideoDetail as e}from"../../../../../service/generated/client.mjs";function t(e){return typeof e==`string`?e.trim():``}function n(e){return t(e.id||e.mid)}
|
|
2
|
+
import{pContentBatchGetVideoDetail as e}from"../../../../../service/generated/client.mjs";function t(e){return typeof e==`string`?e.trim():``}function n(e){return t(e.id||e.mid)}async function r(r){let i=Array.from(new Set(r.map(n).filter(Boolean)));if(!i.length)return new Map;let a=[];try{let t=await e({ids:i});a=Array.isArray(t.data?.videos)?t.data.videos:[]}catch(e){console.warn(`推荐位批量获取视频详情失败,降级为空详情映射`,e)}let o=new Map;return a.forEach(e=>{let n=t(e.video_id||e.id||e.mid);n&&o.set(n,e)}),o}export{r as batchGetHomeRecommendVideoDetailMap};
|
|
@@ -12,28 +12,27 @@ import * as zod_v4_core0 from "zod/v4/core";
|
|
|
12
12
|
* 图文推荐物料定义
|
|
13
13
|
*/
|
|
14
14
|
declare const imageTextRecommendMaterial: DefineMaterialOption<typeof ImageTextRecommendServer, typeof ImageTextRecommendClient, zod.ZodObject<{
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
title: zod.ZodString & SchemaHasDefaultValue;
|
|
16
|
+
moduleCount: zod.ZodNumber & SchemaHasDefaultValue;
|
|
17
|
+
layout: zod.ZodObject<{
|
|
18
18
|
readonly enabled: zod.ZodBoolean & SchemaHasDefaultValue;
|
|
19
19
|
readonly tags: zod.ZodArray<zod.ZodString> & SchemaHasDefaultValue;
|
|
20
20
|
}, zod_v4_core0.$strip> | zod.ZodOptional<zod.ZodObject<{
|
|
21
21
|
readonly enabled: zod.ZodBoolean & SchemaHasDefaultValue;
|
|
22
22
|
readonly tags: zod.ZodArray<zod.ZodString> & SchemaHasDefaultValue;
|
|
23
23
|
}, zod_v4_core0.$strip>>;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
24
|
+
commonPlayCount: zod.ZodBoolean & SchemaHasDefaultValue;
|
|
25
|
+
commonEpisodes: zod.ZodBoolean & SchemaHasDefaultValue;
|
|
26
|
+
items: zod.ZodArray<zod.ZodObject<{
|
|
27
|
+
contentId: zod.ZodString & SchemaHasDefaultValue;
|
|
28
|
+
title: zod.ZodString & SchemaHasDefaultValue;
|
|
29
|
+
contentDescription: zod.ZodString & SchemaHasDefaultValue;
|
|
30
|
+
cover: zod.ZodString & SchemaHasDefaultValue;
|
|
31
|
+
useVideoPoster: zod.ZodBoolean & SchemaHasDefaultValue;
|
|
32
|
+
showPlayCount: zod.ZodBoolean & SchemaHasDefaultValue;
|
|
33
|
+
showEpisodes: zod.ZodBoolean & SchemaHasDefaultValue;
|
|
34
|
+
badge: zod.ZodString & SchemaHasDefaultValue;
|
|
35
35
|
}, zod_v4_core0.$strip>> & SchemaHasDefaultValue;
|
|
36
|
-
} & {
|
|
37
36
|
mode: zod.ZodOptional<zod.ZodEnum<{
|
|
38
37
|
renderer: "renderer";
|
|
39
38
|
editor: "editor";
|
|
@@ -8,28 +8,27 @@ import { z } from "zod";
|
|
|
8
8
|
* 图文推荐物料属性定义
|
|
9
9
|
*/
|
|
10
10
|
declare const imageTextRecommendInspectorPropsSchema: z.ZodObject<{
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
title: z.ZodString & SchemaHasDefaultValue;
|
|
12
|
+
moduleCount: z.ZodNumber & SchemaHasDefaultValue;
|
|
13
|
+
layout: z.ZodObject<{
|
|
14
14
|
readonly enabled: z.ZodBoolean & SchemaHasDefaultValue;
|
|
15
15
|
readonly tags: z.ZodArray<z.ZodString> & SchemaHasDefaultValue;
|
|
16
16
|
}, z.core.$strip> | z.ZodOptional<z.ZodObject<{
|
|
17
17
|
readonly enabled: z.ZodBoolean & SchemaHasDefaultValue;
|
|
18
18
|
readonly tags: z.ZodArray<z.ZodString> & SchemaHasDefaultValue;
|
|
19
19
|
}, z.core.$strip>>;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
20
|
+
commonPlayCount: z.ZodBoolean & SchemaHasDefaultValue;
|
|
21
|
+
commonEpisodes: z.ZodBoolean & SchemaHasDefaultValue;
|
|
22
|
+
items: z.ZodArray<z.ZodObject<{
|
|
23
|
+
contentId: z.ZodString & SchemaHasDefaultValue;
|
|
24
|
+
title: z.ZodString & SchemaHasDefaultValue;
|
|
25
|
+
contentDescription: z.ZodString & SchemaHasDefaultValue;
|
|
26
|
+
cover: z.ZodString & SchemaHasDefaultValue;
|
|
27
|
+
useVideoPoster: z.ZodBoolean & SchemaHasDefaultValue;
|
|
28
|
+
showPlayCount: z.ZodBoolean & SchemaHasDefaultValue;
|
|
29
|
+
showEpisodes: z.ZodBoolean & SchemaHasDefaultValue;
|
|
30
|
+
badge: z.ZodString & SchemaHasDefaultValue;
|
|
31
31
|
}, z.core.$strip>> & SchemaHasDefaultValue;
|
|
32
|
-
} & {
|
|
33
32
|
mode: z.ZodOptional<z.ZodEnum<{
|
|
34
33
|
renderer: "renderer";
|
|
35
34
|
editor: "editor";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
import{defineComponentPropsSchema as
|
|
2
|
+
import{defineArrayItemPropSchema as e,defineComponentPropsSchema as t,defineNumberPropSchema as n,defineObjectPropSchema as r,defineSwitchPropSchema as i,defineTextPropSchema as a}from"../../../../utils/schema/schema.mjs";import{z as o}from"zod";const s=o.object({contentId:a({label:`推荐位内容`,defaultValue:``}),title:a({label:`推荐位内容名称`,defaultValue:`视频标题`}),contentDescription:a({label:`内容说明简介`,defaultValue:``}),cover:a({label:`推荐位封面`,defaultValue:``}),useVideoPoster:i({label:`沿用视频海报`,defaultValue:!0}),showPlayCount:i({label:`播放量显示`,defaultValue:!1}),showEpisodes:i({label:`集数展示`,defaultValue:!0}),badge:a({label:`推荐位角标`,defaultValue:``,description:`角标图片地址,可通过低代码平台配置上传;留空则使用默认角标图`})}),c=t({title:a({label:`推荐位名称`,defaultValue:`推荐视频`}),moduleCount:n({label:`推荐模块数`,defaultValue:1}),layout:r({enabled:i({label:`智能铺设`,defaultValue:!1}),tags:e(o.string(),{label:`取数范围标签`,defaultValue:[`电影`]})},{label:`智能铺设`,defaultValue:{enabled:!1,tags:[`电影`]}}),commonPlayCount:i({label:`通用播放量`,defaultValue:!0}),commonEpisodes:i({label:`通用集数`,defaultValue:!0}),items:e(s,{label:`推荐位模块`,defaultValue:[{contentId:`d6a35ba3279e6f0d`,title:`视频标题 1`,contentDescription:``,cover:``,useVideoPoster:!0,showPlayCount:!0,showEpisodes:!0,badge:``},{contentId:`eaf60eab4938489d`,title:`视频标题 2`,contentDescription:``,cover:``,useVideoPoster:!0,showPlayCount:!0,showEpisodes:!0,badge:``},{contentId:`c45fe58f91d1c986`,title:`视频标题 3`,contentDescription:``,cover:``,useVideoPoster:!0,showPlayCount:!0,showEpisodes:!0,badge:``}]})});export{c as imageTextRecommendInspectorPropsSchema};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{
|
|
2
|
+
"use client";import{Box as e}from"../../../ui/box.mjs";import{Text as t}from"../../../ui/text.mjs";import n from"../../../ui/link.mjs";import r from"../../../../assets/icons/common/right_arrow.mjs";import{LargeGridItemClient as i}from"./card-item.mjs";import{largeFeatureGridInspectorDefaultProps as a}from"./schema.mjs";import{jsx as o,jsxs as s}from"react/jsx-runtime";const c=[],l=a.data??[];function u(e){return e==null}function d(e,t){return u(e)?t:e}function f(e,t){return t?{...e,...t,id:d(t.id,e.id),cover:d(t.cover,e.cover),title:d(t.title,e.title),desc:d(t.desc,e.desc),play_count:d(t.play_count,e.play_count),showPlayCount:t.showPlayCount??e.showPlayCount,episodeText:d(t.episodeText,e.episodeText),showEpisode:t.showEpisode??e.showEpisode,useContentCover:t.useContentCover??e.useContentCover,tagImageUrl:d(t.tagImageUrl,e.tagImageUrl)}:e}function p(e,t){if(!t)return e;let n=e.items;return{...e,...t,title:d(t.title,e.title),moreUrl:d(t.moreUrl,e.moreUrl),moreLinkType:t.moreLinkType??e.moreLinkType,items:n?f(n,t.items):t.items}}function m({mode:a=`renderer`,data:u=c}){let d=a===`editor`,f=u??c,m=Array.isArray(f)&&f.length>0?[p(l[0],f[0])]:l;if(!m||m.length===0)return null;let h=m[0],g=h?.title,_=h?.moreUrl;return s(e,{className:d?`p-3 pointer-events-none`:`p-3`,children:[s(e,{className:`flex items-center justify-between mb-[10px] h-[24px]`,children:[g&&o(t,{as:`h2`,className:`text-[18px] font-bold text-text1 line-clamp-1 flex-1 min-w-0 mr-[12px]`,children:g}),_&&s(n,{href:_,className:`flex items-center text-[14px] text-text2 ml-auto`,children:[`更多`,o(r,{className:`ml-[2px] h-[12px] w-[12px] text-text2`})]})]}),m.map((t,n)=>{let{items:r}=t;return r?o(e,{className:n>0?`mt-3`:``,children:o(i,{data:r})},`large-feature-grid-items-${n}`):null})]})}export{m as LargeFeatureGridClient};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
import{
|
|
2
|
+
import{defineArrayItemPropSchema as e,defineComponentPropsSchema as t,defineSwitchPropSchema as n,defineTextPropSchema as r,getSchemaDefaultProps as i}from"../../../../utils/schema/schema.mjs";import a from"zod";const o=t({data:e(a.object({title:r({label:`推荐位名称`,required:!1}),moreUrl:r({label:`更多链接`,required:!1}),moreLinkType:r({label:`更多链接类型`,required:!1,defaultValue:`content-list`}),items:t({id:r({label:`内容ID`}),cover:r({label:`封面`}),play_count:r({label:`播放量`,required:!1}),showPlayCount:n({label:`展示播放量`,required:!1,defaultValue:!0}),episodeText:r({label:`集数文案`,required:!1}),showEpisode:n({label:`展示集数`,required:!1,defaultValue:!0}),useContentCover:n({label:`沿用内容海报`,required:!1,defaultValue:!0}),title:r({label:`内容标题`}),desc:r({label:`内容简介`,required:!1}),tagImageUrl:r({label:`角标图`,required:!1})})}),{label:`大图推荐数据`,required:!1,defaultValue:[{title:`推荐位名称`,moreUrl:`/channel`,moreLinkType:`content-list`,items:{id:`22edc8693ebbdaf1`,cover:`https://base-resources.guadd.fun/md-204/dcc-file/f7/f70a9f9f0c17aa9aff6c3a3e03a822db-small.jpg`,play_count:`11111`,showPlayCount:!0,episodeText:`连载中`,showEpisode:!0,useContentCover:!0,title:`穷小伙一睁眼穿越古代,娶个老婆就能得到奖励,后宫3000宠都宠不过来!谁料女帝主动送上门来,征服女帝可以直接开终极宝箱,不用选择全都可以!`,desc:`穷小伙一睁眼穿越古代,娶个老婆就能得到奖励,后宫3000宠都宠不过来!谁料女帝主动送上门来,征服女帝可以直接开终极宝箱,不用选择全都可以!`}}]})}),s=i(o);export{s as largeFeatureGridInspectorDefaultProps,o as largeFeatureGridInspectorPropsSchema};
|
|
@@ -12,27 +12,26 @@ import * as zod_v4_core0 from "zod/v4/core";
|
|
|
12
12
|
* 跑马灯物料定义
|
|
13
13
|
*/
|
|
14
14
|
declare const marqueeMaterial: DefineMaterialOption<typeof MarqueeServer, typeof MarqueeClient, zod.ZodObject<{
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
marqueeKey: zod.ZodString & SchemaHasDefaultValue;
|
|
16
|
+
contents: zod.ZodArray<zod.ZodObject<{
|
|
17
|
+
text: zod.ZodString & SchemaHasDefaultValue;
|
|
18
|
+
link: zod.ZodOptional<zod.ZodString> & SchemaHasDefaultValue;
|
|
19
19
|
}, zod_v4_core0.$strip>> & SchemaHasDefaultValue;
|
|
20
|
-
|
|
20
|
+
click: zod.ZodObject<{
|
|
21
21
|
readonly enabled: zod.ZodBoolean & SchemaHasDefaultValue;
|
|
22
22
|
readonly redirectType: zod.ZodOptional<zod.ZodType<"content" | "link" | "content_list", unknown, zod_v4_core0.$ZodTypeInternals<"content" | "link" | "content_list", unknown>>> & SchemaHasDefaultValue;
|
|
23
23
|
readonly link: zod.ZodOptional<zod.ZodString> & SchemaHasDefaultValue;
|
|
24
24
|
}, zod_v4_core0.$strip> & SchemaHasDefaultValue;
|
|
25
|
-
|
|
25
|
+
close: zod.ZodObject<{
|
|
26
26
|
readonly enabled: zod.ZodBoolean & SchemaHasDefaultValue;
|
|
27
27
|
}, zod_v4_core0.$strip> & SchemaHasDefaultValue;
|
|
28
|
-
|
|
28
|
+
displayStrategy: zod.ZodObject<{
|
|
29
29
|
readonly rule: zod.ZodType<"once" | "daily", unknown, zod_v4_core0.$ZodTypeInternals<"once" | "daily", unknown>> & SchemaHasDefaultValue;
|
|
30
30
|
readonly period: zod.ZodOptional<zod.ZodObject<{
|
|
31
31
|
readonly start: zod.ZodString;
|
|
32
32
|
readonly end: zod.ZodString;
|
|
33
33
|
}, zod_v4_core0.$strip>> & SchemaHasDefaultValue;
|
|
34
34
|
}, zod_v4_core0.$strip> & SchemaHasDefaultValue;
|
|
35
|
-
} & {
|
|
36
35
|
mode: zod.ZodOptional<zod.ZodEnum<{
|
|
37
36
|
renderer: "renderer";
|
|
38
37
|
editor: "editor";
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
import { SchemaHasDefaultValue } from "../../../../utils/schema/schema.mjs";
|
|
3
3
|
import "../../../../utils.mjs";
|
|
4
|
-
import
|
|
5
|
-
import * as zod_v4_core0 from "zod/v4/core";
|
|
4
|
+
import { z } from "zod";
|
|
6
5
|
|
|
7
6
|
//#region components/biz/business/marquee/schema.d.ts
|
|
8
7
|
declare function getDefaultMarqueePeriod(): {
|
|
@@ -16,32 +15,31 @@ declare const defaultMarqueePeriod: {
|
|
|
16
15
|
/**
|
|
17
16
|
* 跑马灯物料属性定义
|
|
18
17
|
*/
|
|
19
|
-
declare const marqueeInspectorPropsSchema:
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
},
|
|
25
|
-
|
|
26
|
-
readonly enabled:
|
|
27
|
-
readonly redirectType:
|
|
28
|
-
readonly link:
|
|
29
|
-
},
|
|
30
|
-
|
|
31
|
-
readonly enabled:
|
|
32
|
-
},
|
|
33
|
-
|
|
34
|
-
readonly rule:
|
|
35
|
-
readonly period:
|
|
36
|
-
readonly start:
|
|
37
|
-
readonly end:
|
|
38
|
-
},
|
|
39
|
-
},
|
|
40
|
-
|
|
41
|
-
mode: zod.ZodOptional<zod.ZodEnum<{
|
|
18
|
+
declare const marqueeInspectorPropsSchema: z.ZodObject<{
|
|
19
|
+
marqueeKey: z.ZodString & SchemaHasDefaultValue;
|
|
20
|
+
contents: z.ZodArray<z.ZodObject<{
|
|
21
|
+
text: z.ZodString & SchemaHasDefaultValue;
|
|
22
|
+
link: z.ZodOptional<z.ZodString> & SchemaHasDefaultValue;
|
|
23
|
+
}, z.core.$strip>> & SchemaHasDefaultValue;
|
|
24
|
+
click: z.ZodObject<{
|
|
25
|
+
readonly enabled: z.ZodBoolean & SchemaHasDefaultValue;
|
|
26
|
+
readonly redirectType: z.ZodOptional<z.ZodType<"content" | "link" | "content_list", unknown, z.core.$ZodTypeInternals<"content" | "link" | "content_list", unknown>>> & SchemaHasDefaultValue;
|
|
27
|
+
readonly link: z.ZodOptional<z.ZodString> & SchemaHasDefaultValue;
|
|
28
|
+
}, z.core.$strip> & SchemaHasDefaultValue;
|
|
29
|
+
close: z.ZodObject<{
|
|
30
|
+
readonly enabled: z.ZodBoolean & SchemaHasDefaultValue;
|
|
31
|
+
}, z.core.$strip> & SchemaHasDefaultValue;
|
|
32
|
+
displayStrategy: z.ZodObject<{
|
|
33
|
+
readonly rule: z.ZodType<"once" | "daily", unknown, z.core.$ZodTypeInternals<"once" | "daily", unknown>> & SchemaHasDefaultValue;
|
|
34
|
+
readonly period: z.ZodOptional<z.ZodObject<{
|
|
35
|
+
readonly start: z.ZodString;
|
|
36
|
+
readonly end: z.ZodString;
|
|
37
|
+
}, z.core.$strip>> & SchemaHasDefaultValue;
|
|
38
|
+
}, z.core.$strip> & SchemaHasDefaultValue;
|
|
39
|
+
mode: z.ZodOptional<z.ZodEnum<{
|
|
42
40
|
renderer: "renderer";
|
|
43
41
|
editor: "editor";
|
|
44
42
|
}>>;
|
|
45
|
-
},
|
|
43
|
+
}, z.core.$strip>;
|
|
46
44
|
//#endregion
|
|
47
45
|
export { defaultMarqueePeriod, getDefaultMarqueePeriod, marqueeInspectorPropsSchema };
|