@funhub/platform 0.1.153 → 0.1.155

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.
Files changed (143) hide show
  1. package/dist/assets/icons/marquee-enter.mjs +2 -0
  2. package/dist/components/biz/basics/search/shared/components/search-box.mjs +1 -1
  3. package/dist/components/biz/basics/search/variants/basic-search/runtime/client.mjs +1 -1
  4. package/dist/components/biz/business/banner/variants/basic-banner/inspector-schema.d.mts +5 -4
  5. package/dist/components/biz/business/banner/variants/basic-banner/inspector-schema.mjs +1 -1
  6. package/dist/components/biz/business/banner/variants/basic-banner/material.d.mts +3 -2
  7. package/dist/components/biz/business/banner-carousel/material.d.mts +3 -2
  8. package/dist/components/biz/business/banner-carousel/schema.d.mts +3 -2
  9. package/dist/components/biz/business/banner-carousel/schema.mjs +1 -1
  10. package/dist/components/biz/business/channel-list/material.d.mts +3 -2
  11. package/dist/components/biz/business/channel-list/schema.d.mts +3 -2
  12. package/dist/components/biz/business/channel-list/schema.mjs +1 -1
  13. package/dist/components/biz/business/detail/shared/detail-operate.mjs +1 -1
  14. package/dist/components/biz/business/detail/shared/registry.d.mts +17 -14
  15. package/dist/components/biz/business/detail/shared/runtime-context-provider.mjs +1 -1
  16. package/dist/components/biz/business/detail/shared/use-video-detail-webview-bridge.mjs +1 -1
  17. package/dist/components/biz/business/detail/video-detail-actions/schema.mjs +1 -1
  18. package/dist/components/biz/business/detail/video-detail-info/material.d.mts +3 -2
  19. package/dist/components/biz/business/detail/video-detail-info/schema.d.mts +3 -2
  20. package/dist/components/biz/business/detail/video-detail-info/schema.mjs +1 -1
  21. package/dist/components/biz/business/detail/video-detail-info/server.mjs +1 -1
  22. package/dist/components/biz/business/detail/video-detail-info-title-tags-episodes/material.d.mts +3 -2
  23. package/dist/components/biz/business/detail/video-detail-info-title-tags-episodes/schema.d.mts +3 -2
  24. package/dist/components/biz/business/detail/video-detail-info-title-tags-episodes/schema.mjs +1 -1
  25. package/dist/components/biz/business/detail/video-detail-player/schema.mjs +1 -1
  26. package/dist/components/biz/business/detail/video-detail-player-bridge-only/client.d.mts +1 -1
  27. package/dist/components/biz/business/detail/video-detail-player-bridge-only/client.mjs +1 -1
  28. package/dist/components/biz/business/detail/video-detail-player-bridge-only/schema.mjs +1 -1
  29. package/dist/components/biz/business/detail/video-detail-recommend/client.mjs +1 -1
  30. package/dist/components/biz/business/detail/video-detail-recommend/material.d.mts +11 -10
  31. package/dist/components/biz/business/detail/video-detail-recommend/schema.d.mts +11 -10
  32. package/dist/components/biz/business/detail/video-detail-recommend/schema.mjs +1 -1
  33. package/dist/components/biz/business/floating-ball/material.d.mts +3 -2
  34. package/dist/components/biz/business/floating-ball/schema.d.mts +5 -4
  35. package/dist/components/biz/business/floating-ball/schema.mjs +1 -1
  36. package/dist/components/biz/business/header-search/header-avatar-icon/schema.mjs +1 -1
  37. package/dist/components/biz/business/header-search/header-avatar-logo-search/material.d.mts +3 -2
  38. package/dist/components/biz/business/header-search/header-avatar-logo-search/schema.d.mts +3 -2
  39. package/dist/components/biz/business/header-search/header-avatar-logo-search/schema.mjs +1 -1
  40. package/dist/components/biz/business/header-search/header-avatar-logo-search-icon/material.d.mts +3 -2
  41. package/dist/components/biz/business/header-search/header-avatar-logo-search-icon/schema.d.mts +3 -2
  42. package/dist/components/biz/business/header-search/header-avatar-logo-search-icon/schema.mjs +1 -1
  43. package/dist/components/biz/business/header-search/header-logo-search/material.d.mts +3 -2
  44. package/dist/components/biz/business/header-search/header-logo-search/schema.d.mts +3 -2
  45. package/dist/components/biz/business/header-search/header-logo-search/schema.mjs +1 -1
  46. package/dist/components/biz/business/header-search/header-search/schema.mjs +1 -1
  47. package/dist/components/biz/business/home-recommend/home-recommend-grid/inspector-schema.d.mts +13 -12
  48. package/dist/components/biz/business/home-recommend/home-recommend-grid/inspector-schema.mjs +1 -1
  49. package/dist/components/biz/business/home-recommend/home-recommend-grid/material.d.mts +13 -12
  50. package/dist/components/biz/business/home-recommend/home-recommend-waterfall/inspector-schema.d.mts +11 -10
  51. package/dist/components/biz/business/home-recommend/home-recommend-waterfall/inspector-schema.mjs +1 -1
  52. package/dist/components/biz/business/home-recommend/home-recommend-waterfall/material.d.mts +11 -10
  53. package/dist/components/biz/business/home-recommend/shared/home-recommend-base.mjs +1 -1
  54. package/dist/components/biz/business/home-recommend/shared/home-recommend-server-data.mjs +1 -1
  55. package/dist/components/biz/business/home-recommend/shared/home-recommend-video-detail.mjs +1 -1
  56. package/dist/components/biz/business/image-text-recommend/material.d.mts +15 -14
  57. package/dist/components/biz/business/image-text-recommend/schema.d.mts +15 -14
  58. package/dist/components/biz/business/image-text-recommend/schema.mjs +1 -1
  59. package/dist/components/biz/business/large-feature-grid/client.mjs +1 -1
  60. package/dist/components/biz/business/large-feature-grid/schema.mjs +1 -1
  61. package/dist/components/biz/business/marquee/client.mjs +1 -1
  62. package/dist/components/biz/business/marquee/material.d.mts +8 -7
  63. package/dist/components/biz/business/marquee/schema.d.mts +26 -24
  64. package/dist/components/biz/business/marquee/schema.mjs +1 -1
  65. package/dist/components/biz/business/profile/profile-header/client.mjs +1 -1
  66. package/dist/components/biz/business/profile/profile-header/schema.mjs +1 -1
  67. package/dist/components/biz/business/profile/profile-header/user-profile-avatar.mjs +1 -1
  68. package/dist/components/biz/business/profile/profile-header/user-profile-cover-background.mjs +1 -1
  69. package/dist/components/biz/business/profile/profile-main/schema.mjs +1 -1
  70. package/dist/components/biz/business/profile/profile-main/shell.mjs +1 -1
  71. package/dist/components/biz/business/profile/profile-main/tabs/collect-tab/client.mjs +1 -1
  72. package/dist/components/biz/business/profile/profile-main/tabs/like-tab/client.d.mts +1 -1
  73. package/dist/components/biz/business/search-bar/variants/basic-search-bar/runtime/client.mjs +1 -1
  74. package/dist/components/biz/business/search-history/client.mjs +1 -1
  75. package/dist/components/biz/business/search-history/material.d.mts +3 -2
  76. package/dist/components/biz/business/search-history/schema.d.mts +3 -2
  77. package/dist/components/biz/business/search-history/schema.mjs +1 -1
  78. package/dist/components/biz/business/search-input/schema.mjs +1 -1
  79. package/dist/components/biz/business/shortcut-grid/material.d.mts +5 -4
  80. package/dist/components/biz/business/shortcut-grid/schema.d.mts +5 -4
  81. package/dist/components/biz/business/shortcut-grid/schema.mjs +1 -1
  82. package/dist/components/biz/business/tab-bar/schema.mjs +1 -1
  83. package/dist/components/biz/business/text-recommend/material.d.mts +4 -3
  84. package/dist/components/biz/business/text-recommend/schema.d.mts +4 -3
  85. package/dist/components/biz/business/text-recommend/schema.mjs +1 -1
  86. package/dist/components/biz/example/button/material.d.mts +9 -8
  87. package/dist/components/biz/example/button/schema.d.mts +21 -19
  88. package/dist/components/biz/example/button/schema.mjs +1 -1
  89. package/dist/components/common/image-crop-modal/image-crop-modal.mjs +2 -2
  90. package/dist/components/common/series-episodes/index.mjs +1 -1
  91. package/dist/components/common/video-player/process-m3u8-cache.mjs +1 -1
  92. package/dist/components/pages/collection-add/page.mjs +1 -1
  93. package/dist/components/pages/collection-create/form.mjs +1 -1
  94. package/dist/components/pages/collection-detail/detail.mjs +1 -1
  95. package/dist/components/pages/login/verify.mjs +1 -1
  96. package/dist/components/pages/publish/components/upload-progress.mjs +1 -1
  97. package/dist/components/pages/search/hot-recommend.mjs +1 -1
  98. package/dist/components/pages/search/style.module.mjs +3 -31
  99. package/dist/components/pages/search/top-header.mjs +1 -1
  100. package/dist/components/pages/search-result/search-all.mjs +1 -1
  101. package/dist/components/pages/search-result/search-tab.mjs +1 -1
  102. package/dist/components/pages/search-result/search-user.mjs +1 -1
  103. package/dist/components/pages/search-result/search-video.mjs +1 -1
  104. package/dist/components/pages/video-detail/video-detail-client.mjs +1 -1
  105. package/dist/components/pages/video-list/index.mjs +1 -1
  106. package/dist/components/pages/video-list/video-list-client.mjs +1 -1
  107. package/dist/components/ui/badge.d.mts +1 -1
  108. package/dist/components/ui/button.d.mts +1 -1
  109. package/dist/components/ui/image.d.mts +4 -4
  110. package/dist/components/ui/item.mjs +1 -1
  111. package/dist/components/ui/loading.d.mts +42 -0
  112. package/dist/hooks/use-first-row-height.d.mts +69 -0
  113. package/dist/hooks/use-first-row-height.mjs +2 -0
  114. package/dist/hooks/use-min-duration-loading.d.mts +18 -0
  115. package/dist/hooks/use-min-duration-loading.mjs +2 -0
  116. package/dist/hooks.d.mts +3 -1
  117. package/dist/hooks.mjs +1 -1
  118. package/dist/pages.mjs +1 -1
  119. package/dist/service/generated/client.d.mts +12 -4
  120. package/dist/service/generated/client.mjs +1 -1
  121. package/dist/service/generated/tanstack.d.mts +14 -4
  122. package/dist/service/generated/tanstack.mjs +1 -1
  123. package/dist/service/register-by-verify-email-code.d.mts +2 -2
  124. package/dist/service/register-by-verify-email-code.mjs +1 -1
  125. package/dist/service.d.mts +4 -4
  126. package/dist/service.mjs +1 -1
  127. package/dist/types.d.mts +548 -57
  128. package/dist/ui.d.mts +2 -1
  129. package/dist/ui.mjs +1 -1
  130. package/dist/utils/device-id.d.mts +14 -0
  131. package/dist/utils/device-id.mjs +2 -0
  132. package/dist/utils/http.mjs +1 -1
  133. package/dist/utils/image-crop.mjs +1 -1
  134. package/dist/utils/schema/index.d.mts +1 -1
  135. package/dist/utils/schema/inspector.d.mts +43 -71
  136. package/dist/utils/schema/schema.d.mts +59 -53
  137. package/dist/utils/schema/schema.mjs +1 -1
  138. package/dist/utils/tools.mjs +1 -1
  139. package/dist/utils.d.mts +3 -2
  140. package/dist/utils.mjs +1 -1
  141. package/package.json +1 -1
  142. package/dist/components/common/image-crop/image-crop.mjs +0 -2
  143. package/dist/components/common/image-crop/show-image-crop.mjs +0 -2
@@ -0,0 +1,2 @@
1
+
2
+ import*as e from"react";const t=t=>e.createElement(`svg`,{preserveAspectRatio:`none`,width:`1em`,height:`1em`,overflow:`visible`,style:{display:`block`},viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...t},e.createElement(`path`,{id:`Subtract`,d:`M8 0C12.4183 6.44256e-08 16 3.58172 16 8C16 12.4183 12.4183 16 8 16C3.58172 16 1.28855e-07 12.4183 0 8C0 3.58172 3.58172 0 8 0ZM6.77148 4.34668C6.54772 4.16153 6.21731 4.17499 6.00879 4.38672C5.80047 4.5985 5.78833 4.93303 5.9707 5.16016L6.00879 5.20508L9.02441 8.2666L6.00879 11.3281C5.78643 11.554 5.78652 11.9206 6.00879 12.1465C6.23121 12.3723 6.59195 12.3722 6.81445 12.1465L10.2334 8.67578C10.4558 8.44989 10.4558 8.08333 10.2334 7.85742L6.81445 4.38672L6.77148 4.34668Z`,fill:`var(--fill-0, #F59E0B)`}));export{t as default};
@@ -1,2 +1,2 @@
1
1
 
2
- "use client";import{pxToVw as e}from"../../../../../../utils/helper.mjs";import{Box as t}from"../../../../../ui/box.mjs";import{Text as n}from"../../../../../ui/text.mjs";import r from"../../../../../ui/link.mjs";import i from"../../../../../../assets/icons/search.mjs";import"react";import{jsx as a,jsxs as o}from"react/jsx-runtime";function s({placeholder:s,searchUrl:c,iconSize:l,showPlaceholderText:u,borderColor:d,onClick:f,marginRight:p=16,className:m=`flex-1`,wrapperStyle:h}){let g=a(r,{className:m,href:c,onClick:()=>{f?.()},children:o(t,{className:`h-[38px] flex px-[12px] items-center rounded-[19px] cursor-pointer transition-colors text-text3 relative`,style:{border:`1px solid ${d}`,marginRight:p>0?e(p):void 0},children:[a(i,{width:e(l),height:e(l)}),u&&a(n,{className:`ml-[4px] text-text3 text-[16px] leading-none select-none flex-1`,children:s})]})});return h?a(t,{style:h,children:g}):g}export{s as SearchBox};
2
+ "use client";import{cn as e}from"../../../../../../utils/cn.mjs";import{pxToVw as t}from"../../../../../../utils/helper.mjs";import{Box as n}from"../../../../../ui/box.mjs";import{Text as r}from"../../../../../ui/text.mjs";import i from"../../../../../ui/link.mjs";import a from"../../../../../../assets/icons/search.mjs";import"react";import{jsx as o,jsxs as s}from"react/jsx-runtime";function c({placeholder:c,searchUrl:l,iconSize:u,showPlaceholderText:d,borderColor:f,onClick:p,marginRight:m=16,className:h=`flex-1`,boxClassName:g,textClassName:_,wrapperStyle:v}){let y={border:`1px solid ${f}`,marginRight:m>0?t(m):void 0},b=o(i,{className:h,href:l,onClick:()=>{p?.()},children:s(n,{className:e(`h-[38px] flex px-[12px] items-center rounded-[19px] cursor-pointer transition-colors text-text3 relative`,g),style:y,children:[o(a,{width:t(u),height:t(u)}),d&&o(r,{className:e(`ml-[4px] text-text3 text-[16px] leading-none select-none flex-1`,_),children:c})]})});return v?o(n,{style:v,children:b}):b}export{c as SearchBox};
@@ -1,2 +1,2 @@
1
1
 
2
- "use client";import{mergeStyles as e}from"../../../../../utils/styles/helpers.mjs";import{defaultProps as t}from"../defaults/default-props.mjs";import{SearchBox as n}from"../../../shared/components/search-box.mjs";import{jsx as r}from"react/jsx-runtime";const i={};function a({props:a=i,styles:o,events:s}){let{placeholder:c,searchUrl:l=t.searchUrl,iconSize:u=t.iconSize,showPlaceholderText:d=t.showPlaceholderText,borderColor:f=t.borderColor}={...t,...a};return r(n,{placeholder:c,searchUrl:l,iconSize:u,showPlaceholderText:d,borderColor:f,onClick:()=>{s?.onClick?.()},marginRight:0,wrapperStyle:o?e(o,{}):void 0})}export{a as default};
2
+ "use client";import{mergeStyles as e}from"../../../../../utils/styles/helpers.mjs";import{defaultProps as t}from"../defaults/default-props.mjs";import{SearchBox as n}from"../../../shared/components/search-box.mjs";import{jsx as r}from"react/jsx-runtime";const i={};function a({props:a=i,styles:o,events:s}){let{placeholder:c,searchUrl:l=t.searchUrl,iconSize:u=t.iconSize,showPlaceholderText:d=t.showPlaceholderText,borderColor:f=t.borderColor}={...t,...a};return r(n,{placeholder:c,searchUrl:l,iconSize:u,showPlaceholderText:d,borderColor:f,boxClassName:`h-[40px] rounded-[20px] bg-bg2 py-[8px]`,textClassName:`ml-[8px] text-[16px] leading-[24px]`,onClick:()=>{s?.onClick?.()},marginRight:0,wrapperStyle:o?e(o,{}):void 0})}export{a as default};
@@ -8,21 +8,22 @@ import z$1 from "zod";
8
8
  * 定义可以被低代码右侧 inspector 编辑的 props
9
9
  */
10
10
  declare const basicBannerInspectorPropsSchema: z$1.ZodObject<{
11
- interval: z$1.ZodNumber & SchemaHasDefaultValue;
12
- list: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
11
+ readonly interval: z$1.ZodNumber & SchemaHasDefaultValue;
12
+ readonly list: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
13
13
  contentId: z$1.ZodOptional<z$1.ZodNumber>;
14
14
  title: z$1.ZodOptional<z$1.ZodString>;
15
15
  coverUrl: z$1.ZodOptional<z$1.ZodString>;
16
16
  showViewCount: z$1.ZodOptional<z$1.ZodBoolean>;
17
17
  }, z$1.core.$strip>>> & SchemaHasDefaultValue;
18
+ } & {
18
19
  mode: z$1.ZodOptional<z$1.ZodEnum<{
19
20
  renderer: "renderer";
20
21
  editor: "editor";
21
22
  }>>;
22
23
  }, z$1.core.$strip>;
23
24
  declare const basicBannerInspectorDefaultProps: {
24
- interval: number;
25
- list: {
25
+ readonly interval: number;
26
+ readonly list: {
26
27
  contentId?: number | undefined;
27
28
  title?: string | undefined;
28
29
  coverUrl?: string | undefined;
@@ -1,2 +1,2 @@
1
1
 
2
- import{defineArrayItemPropSchema as e,defineComponentPropsSchema as t,defineNumberPropSchema as n,defineSwitchPropSchema as r,defineTextPropSchema as i,getSchemaDefaultProps as a}from"../../../../../../utils/schema/schema.mjs";import{defaultProps as o}from"./defaults/default-props.mjs";import s from"zod";const c=t({interval:n({label:`播放间隔`,defaultValue:o.interval}),list:e(s.object({contentId:n({label:`内容ID`,required:!1}),title:i({label:`内容标题`,required:!1}),coverUrl:i({label:`封面`,required:!1}),showViewCount:r({label:`角标`,required:!1})}),{required:!1,label:`list`,defaultValue:[{contentId:1,title:`视频标题一`,desc:`视频描述`,coverUrl:`/static/components-resource/banner.png`,showViewCount:!1},{contentId:2,title:`视频标题二`,coverUrl:`/static/components-resource/banner.png`,showViewCount:!1},{contentId:3,title:`视频标题三`,coverUrl:`/static/components-resource/banner.png`,showViewCount:!1}]})}),l=a(c);export{l as basicBannerInspectorDefaultProps,c as basicBannerInspectorPropsSchema};
2
+ import{defineComponentPropsSchema as e,getSchemaDefaultProps as t}from"../../../../../../utils/schema/schema.mjs";import{defaultProps as n}from"./defaults/default-props.mjs";import r from"zod";const i=e(e=>({interval:e.number(n.interval,{label:`播放间隔`}),list:e.array(r.object({contentId:e.number(void 0,{label:`内容ID`,required:!1}),title:e.string(void 0,{label:`内容标题`,required:!1}),coverUrl:e.string(void 0,{label:`封面`,required:!1}),showViewCount:e.boolean(void 0,{fieldType:`switch`,label:`角标`,required:!1})}),{required:!1,label:`list`,defaultValue:[{contentId:1,title:`视频标题一`,desc:`视频描述`,coverUrl:`/static/components-resource/banner.png`,showViewCount:!1},{contentId:2,title:`视频标题二`,coverUrl:`/static/components-resource/banner.png`,showViewCount:!1},{contentId:3,title:`视频标题三`,coverUrl:`/static/components-resource/banner.png`,showViewCount:!1}]})})),a=t(i);export{a as basicBannerInspectorDefaultProps,i as basicBannerInspectorPropsSchema};
@@ -8,13 +8,14 @@ import * as zod_v4_core0 from "zod/v4/core";
8
8
 
9
9
  //#region components/biz/business/banner/variants/basic-banner/material.d.ts
10
10
  declare const basicBannerMaterial: DefineMaterialOption<typeof BasicBanner, typeof BasicBanner, zod.ZodObject<{
11
- interval: zod.ZodNumber & SchemaHasDefaultValue;
12
- list: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
11
+ readonly interval: zod.ZodNumber & SchemaHasDefaultValue;
12
+ readonly list: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
13
13
  contentId: zod.ZodOptional<zod.ZodNumber>;
14
14
  title: zod.ZodOptional<zod.ZodString>;
15
15
  coverUrl: zod.ZodOptional<zod.ZodString>;
16
16
  showViewCount: zod.ZodOptional<zod.ZodBoolean>;
17
17
  }, zod_v4_core0.$strip>>> & SchemaHasDefaultValue;
18
+ } & {
18
19
  mode: zod.ZodOptional<zod.ZodEnum<{
19
20
  renderer: "renderer";
20
21
  editor: "editor";
@@ -8,8 +8,8 @@ import * as zod_v4_core0 from "zod/v4/core";
8
8
 
9
9
  //#region components/biz/business/banner-carousel/material.d.ts
10
10
  declare const BannerCarouselMaterial: DefineMaterialOption<typeof BannerCarousel, typeof BannerCarousel, zod.ZodObject<{
11
- interval: zod.ZodNumber & SchemaHasDefaultValue;
12
- list: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
11
+ readonly interval: zod.ZodNumber & SchemaHasDefaultValue;
12
+ readonly list: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
13
13
  contentId: zod.ZodOptional<zod.ZodNumber>;
14
14
  title: zod.ZodOptional<zod.ZodString>;
15
15
  coverUrl: zod.ZodOptional<zod.ZodString>;
@@ -18,6 +18,7 @@ declare const BannerCarouselMaterial: DefineMaterialOption<typeof BannerCarousel
18
18
  showEpisodeCount: zod.ZodOptional<zod.ZodBoolean>;
19
19
  target: zod.ZodOptional<zod.ZodString>;
20
20
  }, zod_v4_core0.$strip>>> & SchemaHasDefaultValue;
21
+ } & {
21
22
  mode: zod.ZodOptional<zod.ZodEnum<{
22
23
  renderer: "renderer";
23
24
  editor: "editor";
@@ -8,8 +8,8 @@ import z$1 from "zod";
8
8
  * 定义可以被低代码右侧 inspector 编辑的 props
9
9
  */
10
10
  declare const basicBannerInspectorPropsSchema: z$1.ZodObject<{
11
- interval: z$1.ZodNumber & SchemaHasDefaultValue;
12
- list: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
11
+ readonly interval: z$1.ZodNumber & SchemaHasDefaultValue;
12
+ readonly list: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
13
13
  contentId: z$1.ZodOptional<z$1.ZodNumber>;
14
14
  title: z$1.ZodOptional<z$1.ZodString>;
15
15
  coverUrl: z$1.ZodOptional<z$1.ZodString>;
@@ -18,6 +18,7 @@ declare const basicBannerInspectorPropsSchema: z$1.ZodObject<{
18
18
  showEpisodeCount: z$1.ZodOptional<z$1.ZodBoolean>;
19
19
  target: z$1.ZodOptional<z$1.ZodString>;
20
20
  }, z$1.core.$strip>>> & SchemaHasDefaultValue;
21
+ } & {
21
22
  mode: z$1.ZodOptional<z$1.ZodEnum<{
22
23
  renderer: "renderer";
23
24
  editor: "editor";
@@ -1,2 +1,2 @@
1
1
 
2
- import{defineArrayItemPropSchema as e,defineComponentPropsSchema as t,defineNumberPropSchema as n,defineSwitchPropSchema as r,defineTextPropSchema as i,getSchemaDefaultProps as a}from"../../../../utils/schema/schema.mjs";import{defaultProps as o}from"./default-props.mjs";import s from"zod";const c=t({interval:n({label:`播放间隔`,defaultValue:o.interval}),list:e(s.object({contentId:n({label:`内容ID`,required:!1}),title:i({label:`内容标题`,required:!1}),coverUrl:i({label:`封面`,required:!1}),badgeUrl:i({label:`角标`,required:!1}),showPlayCount:r({label:`展示播放量`,required:!1}),showEpisodeCount:r({label:`展示集数`,required:!1}),target:i({label:`跳转地址`,required:!1})}),{required:!1,label:`list`,defaultValue:[{contentId:1,title:`视频标题一`,desc:`视频描述`,coverUrl:`/static/components-resource/banner.png`,badgeUrl:``,showPlayCount:!1,showEpisodeCount:!1,target:``},{contentId:2,title:`视频标题二`,coverUrl:`/static/components-resource/banner.png`,badgeUrl:``,showPlayCount:!1,showEpisodeCount:!1,target:``},{contentId:3,title:`视频标题三`,coverUrl:`/static/components-resource/banner.png`,badgeUrl:``,showPlayCount:!1,showEpisodeCount:!1,target:``}]})});a(c);export{c as basicBannerInspectorPropsSchema};
2
+ import{defineComponentPropsSchema as e,getSchemaDefaultProps as t}from"../../../../utils/schema/schema.mjs";import{defaultProps as n}from"./default-props.mjs";import r from"zod";const i=e(e=>({interval:e.number(n.interval,{label:`播放间隔`}),list:e.array(r.object({contentId:e.number(void 0,{label:`内容ID`,required:!1}),title:e.string(void 0,{label:`内容标题`,required:!1}),coverUrl:e.string(void 0,{label:`封面`,required:!1}),badgeUrl:e.string(void 0,{label:`角标`,required:!1}),showPlayCount:e.boolean(void 0,{fieldType:`switch`,label:`展示播放量`,required:!1}),showEpisodeCount:e.boolean(void 0,{fieldType:`switch`,label:`展示集数`,required:!1}),target:e.string(void 0,{label:`跳转地址`,required:!1})}),{required:!1,label:`list`,defaultValue:[{contentId:1,title:`视频标题一`,desc:`视频描述`,coverUrl:`/static/components-resource/banner.png`,badgeUrl:``,showPlayCount:!1,showEpisodeCount:!1,target:``},{contentId:2,title:`视频标题二`,coverUrl:`/static/components-resource/banner.png`,badgeUrl:``,showPlayCount:!1,showEpisodeCount:!1,target:``},{contentId:3,title:`视频标题三`,coverUrl:`/static/components-resource/banner.png`,badgeUrl:``,showPlayCount:!1,showEpisodeCount:!1,target:``}]})}));t(i);export{i as basicBannerInspectorPropsSchema};
@@ -8,12 +8,13 @@ import * as zod_v4_core0 from "zod/v4/core";
8
8
 
9
9
  //#region components/biz/business/channel-list/material.d.ts
10
10
  declare const channelListMaterial: DefineMaterialOption<typeof BasicChannelListClient, typeof BasicChannelListClient, zod.ZodObject<{
11
- modifiable: zod.ZodBoolean & SchemaHasDefaultValue;
12
- list: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
11
+ readonly modifiable: zod.ZodBoolean & SchemaHasDefaultValue;
12
+ readonly list: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
13
13
  name: zod.ZodOptional<zod.ZodString>;
14
14
  icon: zod.ZodOptional<zod.ZodString>;
15
15
  isDefault: zod.ZodOptional<zod.ZodBoolean>;
16
16
  }, zod_v4_core0.$strip>>> & SchemaHasDefaultValue;
17
+ } & {
17
18
  mode: zod.ZodOptional<zod.ZodEnum<{
18
19
  renderer: "renderer";
19
20
  editor: "editor";
@@ -10,12 +10,13 @@ import z$1 from "zod";
10
10
  * 定义可以被低代码右侧inspector编辑的props
11
11
  */
12
12
  declare const channelListInspectorPropsSchema: z$1.ZodObject<{
13
- modifiable: z$1.ZodBoolean & SchemaHasDefaultValue;
14
- list: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
13
+ readonly modifiable: z$1.ZodBoolean & SchemaHasDefaultValue;
14
+ readonly list: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
15
15
  name: z$1.ZodOptional<z$1.ZodString>;
16
16
  icon: z$1.ZodOptional<z$1.ZodString>;
17
17
  isDefault: z$1.ZodOptional<z$1.ZodBoolean>;
18
18
  }, z$1.core.$strip>>> & SchemaHasDefaultValue;
19
+ } & {
19
20
  mode: z$1.ZodOptional<z$1.ZodEnum<{
20
21
  renderer: "renderer";
21
22
  editor: "editor";
@@ -1,2 +1,2 @@
1
1
 
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({modifiable:n({label:`自定义频道`,defaultValue:!0}),list:e(a.object({name:r({label:`内容标题`,required:!1}),icon:r({label:`图标`,required:!1}),isDefault:n({label:`是否默认频道`,required:!1})}),{required:!1,label:`list`,defaultValue:[{name:`频道名称`,icon:``,isDefault:!0}]})});i(o);export{o as channelListInspectorPropsSchema};
2
+ import{defineComponentPropsSchema as e,getSchemaDefaultProps as t}from"../../../../utils/schema/schema.mjs";import n from"zod";const r=e(e=>({modifiable:e.boolean(!0,{fieldType:`switch`,label:`自定义频道`}),list:e.array(n.object({name:e.string(void 0,{label:`内容标题`,required:!1}),icon:e.string(void 0,{label:`图标`,required:!1}),isDefault:e.boolean(void 0,{fieldType:`switch`,label:`是否默认频道`,required:!1})}),{required:!1,label:`list`,defaultValue:[{name:`频道名称`,icon:``,isDefault:!0}]})}));t(r);export{r as channelListInspectorPropsSchema};
@@ -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{debounceFun as o}from"../../../../../utils/tools.mjs";import s from"../../../../common/interaction-animations.module.mjs";import c from"../../../../common/collection-popup/index.mjs";import l from"../../../../common/share-popup/share-popup.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 w}from"next/navigation";import{useTranslations as ne}from"next-intl";function T({mode:T=`renderer`,information:O,onUpdate:k}){let A=T===`editor`||!O?.id||O.id.startsWith(`preview-`),j=`${C()}?${w()?.toString()||``}`,M=v(j),N=ne(`components.biz.business.detail`),[P,F]=y(!1),[I,L]=y(!1),R=v(0),z=e(e=>e.userId),B=e(e=>e.isLogin),V=a();g(()=>{M.current!==j&&(l.clear(),M.current=j)},[j]),g(()=>()=>{l.clear()},[]);let H=h(()=>{z&&(V([`user-profile`,`mine`,z,`user-like-video`]),V([`user-profile`,`mine`,z,`user-like-post`]),V([`user-profile`,`mine`,z,`user-collect-video`,z]),V([`user-profile`,`mine`,z,`user-collect-post`,z]))},[V,z]),{likeAnimation:U,handleLikeOperate:W,handleDefaultCollectionOperate:G,handleShareOperate:K}=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:s.likeShakeAnimation,dislike:s.dislikeShakeAnimation}}),q=h(e=>{k?.({...e})},[k]),J=h(async()=>{if(P)return;if(!B){i.getState().open();return}let e=Date.now();if(e-R.current<300)return;R.current=e,F(!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;q({like:o,dislike:c,static:{...O.static,like_cnt:s,dislike_cnt:l}});try{let e=await W();if(!e){q({like:t,dislike:n,static:{...O.static,like_cnt:r,dislike_cnt:a}});return}q({like:e.isLike,dislike:e.isDislike??c,static:{...O.static,like_cnt:e.likeCnt,dislike_cnt:e.dislikeCnt??l}}),H(),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{F(!1)}},[W,O,H,P,B,N,q]),Y=_(()=>O.id,[O.id]),X=h(()=>{K(({isCollect:e})=>{q({collect:e})},Y)},[K,Y,q]),Z=h(()=>{c.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`));q({collect:!0}),H(),S.success(N(`detailOperate.modifyCollectionSuccess`))}catch(e){console.error(`修改收藏夹失败:`,e),S.error(N(`detailOperate.collectFailed`))}}})},[O.id,H,N,q]),Q=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),Z()},children:N(`detailOperate.modifyCollection`)})]}))},[Z,N]),$=h(async()=>{if(I)return;if(!B){i.getState().open();return}let e=O.collect||!1;L(!0),window.sensors?.track?.(`detail_fav_click`,{object_id:O.id,action:e?`取消收藏`:`收藏`});try{let t=await G({currentCollect:e,onUpdate:({isCollect:e})=>{q({collect:e})}});if(!t?.success){S.error(t?.message||N(`detailOperate.collectFailed`));return}H(),window.sensors?.track?.(`detail_fav_click`,{object_id:O.id,action:t.isCollect?`收藏`:`取消收藏`}),!e&&t.isCollect&&Q(t.collectionTitle),e&&t.isCollect===!1&&S.success(N(`detailOperate.uncollectSuccess`))}catch(e){console.error(`收藏操作失败:`,e),S.error(e?.message||N(`detailOperate.collectFailed`))}finally{L(!1)}},[G,O.collect,O.id,H,I,B,Q,N,q]),re=_(()=>o($,300),[$]);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 ${P?`opacity-50 cursor-not-allowed`:`cursor-pointer`}`,onClick:J,children:[O.like?b(m,{className:`w-[20px] h-[20px] ${U.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 ${I?`opacity-50 cursor-not-allowed`:`cursor-pointer`}`,onClick:re,children:[O.collect?b(p,{className:`w-[20px] h-[20px]`}):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:X,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};
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};
@@ -35,15 +35,17 @@ declare const videoDetailMaterials: MaterialMap<readonly [DefineMaterialOption<t
35
35
  editor: "editor";
36
36
  }>>;
37
37
  }, z$1.core.$strip>, "video-detail-player-bridge-only", "视频模块">, DefineMaterialOption<typeof VideoDetailInfo, typeof VideoDetailInfoClient, z$1.ZodObject<{
38
- showTags: z$1.ZodBoolean & SchemaHasDefaultValue;
39
- showEpisodes: z$1.ZodBoolean & SchemaHasDefaultValue;
38
+ readonly showTags: z$1.ZodBoolean & SchemaHasDefaultValue;
39
+ readonly showEpisodes: z$1.ZodBoolean & SchemaHasDefaultValue;
40
+ } & {
40
41
  mode: z$1.ZodOptional<z$1.ZodEnum<{
41
42
  renderer: "renderer";
42
43
  editor: "editor";
43
44
  }>>;
44
45
  }, z$1.core.$strip>, "video-detail-info", "内容组件">, DefineMaterialOption<typeof VideoDetailInfoTitleTagsEpisodes, typeof VideoDetailInfoTitleTagsEpisodesClient, z$1.ZodObject<{
45
- showTags: z$1.ZodBoolean & SchemaHasDefaultValue;
46
- showEpisodes: z$1.ZodBoolean & SchemaHasDefaultValue;
46
+ readonly showTags: z$1.ZodBoolean & SchemaHasDefaultValue;
47
+ readonly showEpisodes: z$1.ZodBoolean & SchemaHasDefaultValue;
48
+ } & {
47
49
  mode: z$1.ZodOptional<z$1.ZodEnum<{
48
50
  renderer: "renderer";
49
51
  editor: "editor";
@@ -54,16 +56,16 @@ declare const videoDetailMaterials: MaterialMap<readonly [DefineMaterialOption<t
54
56
  editor: "editor";
55
57
  }>>;
56
58
  }, z$1.core.$strip>, "video-detail-actions", "行为组件">, DefineMaterialOption<typeof VideoDetailRecommend, typeof VideoDetailRecommendClient, z$1.ZodObject<{
57
- rows: z$1.ZodNumber & SchemaHasDefaultValue;
58
- columns: z$1.ZodNumber & SchemaHasDefaultValue;
59
- smartTagEnabled: z$1.ZodBoolean & SchemaHasDefaultValue;
60
- title: z$1.ZodString & SchemaHasDefaultValue;
61
- showPlayCount: z$1.ZodBoolean & SchemaHasDefaultValue;
62
- playCountDelta: z$1.ZodNumber & SchemaHasDefaultValue;
63
- showEpisode: z$1.ZodBoolean & SchemaHasDefaultValue;
64
- enableInfinite: z$1.ZodBoolean & SchemaHasDefaultValue;
65
- smartTagIds: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
66
- items: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
59
+ readonly rows: z$1.ZodNumber & SchemaHasDefaultValue;
60
+ readonly columns: z$1.ZodNumber & SchemaHasDefaultValue;
61
+ readonly smartTagEnabled: z$1.ZodBoolean & SchemaHasDefaultValue;
62
+ readonly title: z$1.ZodString & SchemaHasDefaultValue;
63
+ readonly showPlayCount: z$1.ZodBoolean & SchemaHasDefaultValue;
64
+ readonly playCountDelta: z$1.ZodNumber & SchemaHasDefaultValue;
65
+ readonly showEpisode: z$1.ZodBoolean & SchemaHasDefaultValue;
66
+ readonly enableInfinite: z$1.ZodBoolean & SchemaHasDefaultValue;
67
+ readonly smartTagIds: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
68
+ readonly items: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
67
69
  contentId: z$1.ZodString;
68
70
  coverMode: z$1.ZodOptional<z$1.ZodEnum<{
69
71
  content: "content";
@@ -80,6 +82,7 @@ declare const videoDetailMaterials: MaterialMap<readonly [DefineMaterialOption<t
80
82
  playCountDelta: z$1.ZodOptional<z$1.ZodNumber>;
81
83
  showEpisode: z$1.ZodOptional<z$1.ZodBoolean>;
82
84
  }, z$1.core.$strip>>>;
85
+ } & {
83
86
  mode: z$1.ZodOptional<z$1.ZodEnum<{
84
87
  renderer: "renderer";
85
88
  editor: "editor";
@@ -1,2 +1,2 @@
1
1
 
2
- "use client";import{gContentGetVideoDetail as e}from"../../../../../service/generated/client.mjs";import{useRouter as t}from"../../../../../utils/use-compatible-router.mjs";import{notifyBridgeEpisodeChanged as n}from"../../../../../utils/login-modal-bridge.mjs";import{useRequest as r}from"../../../../../hooks/query/use-query.mjs";import{useKeepAliveState as i}from"../../../../common/keep-scroll-position/index.mjs";import{createContext as a,use as o,useCallback as s,useEffect as c,useMemo as l}from"react";import{jsx as u}from"react/jsx-runtime";import{useParams as d}from"next/navigation";const f=a(void 0),p=`funhub:video-detail-episode-sync`;function m(e,t){let n=String(e||``).split(`/`).filter(Boolean),r=n.findIndex(e=>e===`video`||e===`webview`);return r<0?!1:n[r+1]===t}function h(e){let t=Math.floor(Number(e)||1);return t>0?t:1}function g(e){typeof window>`u`||window.dispatchEvent(new CustomEvent(p,{detail:e}))}function _(e){return e.type===p&&e instanceof CustomEvent}function v(e,t){if(!(!e&&!t))return{information:e?.information??t?.information,currentSeriesNum:e?.currentSeriesNum??t?.currentSeriesNum,onEpisodeChange:e?.onEpisodeChange??t?.onEpisodeChange,onUpdateInformation:e?.onUpdateInformation??t?.onUpdateInformation,detailId:e?.detailId??t?.detailId,episodeIndex:e?.episodeIndex??t?.episodeIndex,resumeProgressSeconds:e?.resumeProgressSeconds??t?.resumeProgressSeconds,isShow:e?.isShow??t?.isShow,isWebView:e?.isWebView??t?.isWebView,isInformationLoading:e?.isInformationLoading??t?.isInformationLoading,isInformationResolved:e?.isInformationResolved??t?.isInformationResolved}}function y({value:e,children:t}){let n=o(f);return u(f,{value:l(()=>v(n,e)??e,[n,e]),children:t})}function b(){let e=o(f),t=x({enabled:e===void 0||e.onEpisodeChange===void 0||e.detailId===void 0||e.currentSeriesNum===void 0||e.episodeIndex===void 0||e.isInformationLoading===void 0||e.isInformationResolved===void 0,shouldRequestInformation:!e?.information});return l(()=>{let n=v(e,t);return n&&(e&&t&&e.onEpisodeChange===void 0?{...n,currentSeriesNum:t.currentSeriesNum??n.currentSeriesNum,episodeIndex:t.episodeIndex??n.episodeIndex,onEpisodeChange:t.onEpisodeChange??n.onEpisodeChange}:n)},[e,t])}function x(a){let{enabled:o,shouldRequestInformation:u}=a,f=d(),v=t(),y=f.level,b=Array.isArray(y)?y:typeof y==`string`?[y]:[],x=b[0]||``,S=b.findIndex(e=>e===`episode`),C=S>=0?b[S+1]:b[2],w=Math.max(1,Number(C)||1),[T,E]=i(`video-detail-material-series-num-${x}`,w);c(()=>{E(w)},[w,E]),c(()=>{if(!x||typeof window>`u`)return;let e=e=>{if(!_(e))return;let t=e.detail;if(!t||t.detailId!==x)return;let n=h(t.seriesNum);E(e=>e===n?e:n)};return window.addEventListener(p,e),()=>{window.removeEventListener(p,e)}},[x,E]);let D=s(e=>{if(!x)return;let t=h(e);E(t),g({detailId:x,seriesNum:t})},[x,E]),O=Math.max(1,Number(T)||1),k=Math.max(0,O-1),A=b[1]||``,j=typeof window<`u`&&window.isWebView===!0,{data:M,isPending:N,isFetching:P,isError:F,isSuccess:I}=r([`video-detail-material-fallback`,x],async()=>x?await e({id:x}):null,{enabled:o&&u&&!!x}),L=l(()=>{let e=M?.data?.video;if(!(!e||typeof e!=`object`))return{...e,content_type:1,episode_cnt:e.links?.length||0}},[M?.data?.video]),R=s(e=>{let t=Math.max(1,Math.floor(Number(e)||1));if(!x||typeof window>`u`)return;let r=`/video/${x}/${encodeURIComponent(A)}/episode/${t}`,{search:i,hash:a,pathname:o}=window.location,s=`${o}${i}${a}`,c=`${r}${i}${a}`,l=m(o,x);if(s!==c){j&&n({detailId:x,seriesNum:t,nextPath:r}),l&&typeof window.history?.replaceState==`function`?(window.history.replaceState(window.history.state,``,c),D(t)):v.replace(c,{scroll:!1});return}O!==t&&D(t)},[O,x,j,A,v,D]);if(o)return{information:L,currentSeriesNum:O,onEpisodeChange:R,detailId:x,episodeIndex:k,resumeProgressSeconds:0,isShow:!0,isWebView:j,isInformationLoading:u?!!x&&!L&&(N||P):!1,isInformationResolved:!x||!!L||!u||F||I}}export{y as VideoDetailMaterialRuntimeProvider,b as useVideoDetailMaterialRuntimeContext};
2
+ "use client";import{gContentGetVideoDetail as e}from"../../../../../service/generated/client.mjs";import{useRouter as t}from"../../../../../utils/use-compatible-router.mjs";import{notifyBridgeEpisodeChanged as n}from"../../../../../utils/login-modal-bridge.mjs";import{useRequest as r}from"../../../../../hooks/query/use-query.mjs";import{useKeepAliveState as i}from"../../../../common/keep-scroll-position/index.mjs";import{createContext as a,use as o,useCallback as s,useEffect as c,useMemo as l}from"react";import{jsx as u}from"react/jsx-runtime";import{useParams as d}from"next/navigation";const f=a(void 0),p=`funhub:video-detail-episode-sync`;function m(e,t){let n=String(e||``).split(`/`).filter(Boolean),r=n.findIndex(e=>e===`video`||e===`webview`);return r<0?!1:n[r+1]===t}function h(e){let t=Math.floor(Number(e)||1);return t>0?t:1}function g(e){typeof window>`u`||window.dispatchEvent(new CustomEvent(p,{detail:e}))}function _(e){return e.type===p&&e instanceof CustomEvent}function v(e,t){if(!(!e&&!t))return{information:e?.information??t?.information,currentSeriesNum:e?.currentSeriesNum??t?.currentSeriesNum,onEpisodeChange:e?.onEpisodeChange??t?.onEpisodeChange,onUpdateInformation:e?.onUpdateInformation??t?.onUpdateInformation,detailId:e?.detailId??t?.detailId,episodeIndex:e?.episodeIndex??t?.episodeIndex,resumeProgressSeconds:e?.resumeProgressSeconds??t?.resumeProgressSeconds,isShow:e?.isShow??t?.isShow,isWebView:e?.isWebView??t?.isWebView,isInformationLoading:e?.isInformationLoading??t?.isInformationLoading,isInformationResolved:e?.isInformationResolved??t?.isInformationResolved}}function y({value:e,children:t}){let n=o(f);return u(f,{value:l(()=>v(n,e)??e,[n,e]),children:t})}function b(){let e=o(f),t=x({enabled:e===void 0||e.onEpisodeChange===void 0||e.detailId===void 0||e.currentSeriesNum===void 0||e.episodeIndex===void 0||e.isInformationLoading===void 0||e.isInformationResolved===void 0,shouldRequestInformation:!e?.information});return l(()=>{let n=v(e,t);return n&&(e&&t&&e.onEpisodeChange===void 0?{...n,currentSeriesNum:t.currentSeriesNum??n.currentSeriesNum,episodeIndex:t.episodeIndex??n.episodeIndex,onEpisodeChange:t.onEpisodeChange??n.onEpisodeChange}:n)},[e,t])}function x(a){let{enabled:o,shouldRequestInformation:u}=a,f=d(),v=t(),y=f.level,b=Array.isArray(y)?y:typeof y==`string`?[y]:[],x=b[0]||``,S=b.findIndex(e=>e===`episode`),C=S>=0?b[S+1]:b[2],w=Math.max(1,Number(C)||1),[T,E]=i(`video-detail-material-series-num-${x}`,w);c(()=>{E(w)},[w,E]),c(()=>{if(!x||typeof window>`u`)return;let e=e=>{if(!_(e))return;let t=e.detail;if(!t||t.detailId!==x)return;let n=h(t.seriesNum);E(e=>e===n?e:n)};return window.addEventListener(p,e),()=>{window.removeEventListener(p,e)}},[x,E]);let D=s(e=>{if(!x)return;let t=h(e);E(t),g({detailId:x,seriesNum:t})},[x,E]),O=Math.max(1,Number(T)||1),k=Math.max(0,O-1),A=b[1]||``,j=typeof window<`u`&&window.isWebView===!0,{data:M,isPending:N,isFetching:P,isError:F,isSuccess:I}=r([`video-detail-material-fallback`,x],async()=>x?await e({id:x}):null,{enabled:o&&u&&!!x}),L=l(()=>{let e=M?.data?.video;if(!(!e||typeof e!=`object`))return{...e,content_type:1,episode_cnt:e.links?.length||0}},[M?.data?.video]),R=s(e=>{let t=Math.max(1,Math.floor(Number(e)||1));if(!x||typeof window>`u`)return;let r=`/video/${x}/${encodeURIComponent(A)}/episode/${t}`,{search:i,hash:a,pathname:o}=window.location,s=`${o}${i}${a}`,c=`${r}${i}${a}`,l=m(o,x);if(s!==c){j&&n({title:L?.title||``,detailId:x,seriesNum:t,nextPath:r}),l&&typeof window.history?.replaceState==`function`?(window.history.replaceState(window.history.state,``,c),D(t)):v.replace(c,{scroll:!1});return}O!==t&&D(t)},[O,x,L?.title,j,A,v,D]);if(o)return{information:L,currentSeriesNum:O,onEpisodeChange:R,detailId:x,episodeIndex:k,resumeProgressSeconds:0,isShow:!0,isWebView:j,isInformationLoading:u?!!x&&!L&&(N||P):!1,isInformationResolved:!x||!!L||!u||F||I}}export{y as VideoDetailMaterialRuntimeProvider,b as useVideoDetailMaterialRuntimeContext};
@@ -1,2 +1,2 @@
1
1
 
2
- "use client";import e from"../../../../../utils/get-res-url.mjs";import{decryptImageToUint8Array as t}from"../../../../../utils/decrypt-image-client.mjs";import{pInteractionBrowse as n}from"../../../../../service/generated/client.mjs";import{uint8ArrayToBase64 as r}from"../../../../../utils/uint8.mjs";import{batchQueryContentInteractions as i}from"../../../../../hooks/use-content-operate.mjs";import{useCallback as a,useEffect as o,useMemo as s}from"react";function c(e){let t=String(e||``).split(`/`).filter(Boolean),n=t.findIndex(e=>e===`video`||e===`webview`);if(n<0)return``;try{return decodeURIComponent(t[n+1]||``)}catch{return t[n+1]||``}}function l(l){let{enabled:u=!0,detailId:d=``,information:f,episodeIndex:p=0,currentSeriesNum:m=1}=l,h=s(()=>String(d||f?.id||``).trim()||(typeof window<`u`?c(window.location.pathname):``),[d,f?.id]),g=a(()=>{let t=f?.links?.[p]?.m3u8_url||``,n=process.env.NEXT_PUBLIC_API_BASE||(typeof window<`u`?window.location.origin:``),r=t?`${e()}/m3f/${t}`:``,i=t&&n?`${n}/api/content/processM3u8?url=${encodeURIComponent(r)}`:``,a=f?.name||``;return{posterUrl:f?.img_y||f?.img_x||f?.preview_images?.[0]||``,src:i,title:a}},[p,f]),_=a(async()=>{let{src:e,title:n,posterUrl:i}=g(),a=``;if(i)try{let e=await t(i);e&&(a=r(e.bytes))}catch(e){console.warn(`[webview bridge] getVideoInfoAsync poster failed:`,e)}return{poster:a,src:e,title:n}},[g]),v=a(async()=>{if(!h)return null;let e=await i([h],1);return e?.interaction_list?.[0]?e.interaction_list[0].browse_record:null},[h]),y=a(async e=>{if(!h)return;let t=e.browse_episode||m,r=Date.now(),i=String(e.browse_key||r);try{await n({app_id:0,content_type:1,content_id:h,browse_duration:Number(e.browse_duration||0),browse_episode:String(t),browse_key:i,browse_page_ts:r})}catch(e){console.error(`上报播放进度失败:`,e)}},[m,h]);o(()=>{if(!u||typeof window>`u`)return;let e=window;return e.__funhubWebViewBridgeReady=!0,e.__funhubWebViewBridgeDetailId=h,e.video=h?{[h]:f}:{},e.getVideoInfo=g,e.getVideoInfoAsync=_,e.getVideoBrowseRecordAsync=v,e.reportVideoBrowse=y,window.dispatchEvent(new CustomEvent(`funhub:webview-bridge-ready`,{detail:{detailId:h}})),()=>{e.getVideoInfoAsync===_&&delete e.getVideoInfoAsync,e.getVideoInfo===g&&delete e.getVideoInfo,e.getVideoBrowseRecordAsync===v&&delete e.getVideoBrowseRecordAsync,e.reportVideoBrowse===y&&delete e.reportVideoBrowse}},[g,v,_,u,f,y,h])}export{l as useVideoDetailWebViewBridge};
2
+ "use client";import{decryptImageToUint8Array as e}from"../../../../../utils/decrypt-image-client.mjs";import{gContentGetVideoDetail as t,pInteractionBrowse as n}from"../../../../../service/generated/client.mjs";import{uint8ArrayToBase64 as r}from"../../../../../utils/uint8.mjs";import{resolveM3u8Urls as i,resolveVideoPlayerSrc as a}from"../../../../common/video-player/process-m3u8-cache.mjs";import{batchQueryContentInteractions as o}from"../../../../../hooks/use-content-operate.mjs";import{useCallback as s,useEffect as c,useRef as l}from"react";import{usePathname as u}from"next/navigation";function d(e){let t=Math.floor(Number(e)||1);return t>0?t:1}function f(e){let t=typeof e==`string`?e:typeof window>`u`?``:window.location.pathname,n=String(t||``).split(`/`).filter(Boolean),r=n.findIndex(e=>e===`video`||e===`webview`);if(r<0)return{detailId:``,currentSeriesNum:1,episodeIndex:0};let i=n[r+1]||``;try{let e=decodeURIComponent(i),t=n.slice(r+1),a=t.findIndex(e=>e===`episode`),o=d(a>=0?t[a+1]:t[2]);return{detailId:e,currentSeriesNum:o,episodeIndex:Math.max(0,o-1)}}catch{let e=n.slice(r+1),t=e.findIndex(e=>e===`episode`),a=d(t>=0?e[t+1]:e[2]);return{detailId:i,currentSeriesNum:a,episodeIndex:Math.max(0,a-1)}}}function p(d){let{enabled:p=!0}=d,m=f(u()).detailId,h=l({detailId:``}),g=l(null);c(()=>{h.current={detailId:m},g.current=null},[m]);let _=s(async e=>{let n=String(e||``).trim();if(!n)return;if(h.current.detailId===n&&h.current.information)return h.current.information;if(g.current?.detailId===n)return await g.current.promise;let r=t({id:n}).then(e=>{let t=e?.data?.video;if(!t||typeof t!=`object`)return;let r={...t,content_type:1,episode_cnt:t.links?.length||0};return h.current={detailId:n,information:r},r});g.current={detailId:n,promise:r};try{return await r}finally{g.current?.detailId===n&&(g.current=null)}},[]),v=s(async()=>{let t;for(let e=0;e<2;e++){let e=f();if(t=await _(e.detailId),f().detailId===e.detailId)break}let n=f(),o=i(Array.isArray(t?.links)?t.links:[],n.currentSeriesNum),s=o[0]?await a(o[0]):``,c=t?.name||``,l=t?.img_y||t?.img_x||t?.preview_images?.[0]||``,u=``;if(l)try{let t=await e(l);t&&(u=r(t.bytes))}catch(e){console.warn(`[webview bridge] getVideoInfoAsync poster failed:`,e)}return{poster:u,src:s,title:c}},[_]),y=s(async()=>{let e=f();if(!e.detailId)return null;let t=await o([e.detailId],1);return t?.interaction_list?.[0]?t.interaction_list[0].browse_record:null},[]),b=s(async e=>{let t=f();if(!t.detailId)return;let r=e.browse_episode||t.currentSeriesNum,i=Date.now(),a=String(e.browse_key||i);try{await n({app_id:0,content_type:1,content_id:t.detailId,browse_duration:Number(e.browse_duration||0),browse_episode:String(r),browse_key:a,browse_page_ts:i})}catch(e){console.error(`上报播放进度失败:`,e)}},[]);c(()=>{if(!p||typeof window>`u`)return;let e=window;return e.getVideoInfoAsync=v,e.getVideoBrowseRecordAsync=y,e.reportVideoBrowse=b,()=>{e.getVideoInfoAsync===v&&delete e.getVideoInfoAsync,e.getVideoBrowseRecordAsync===y&&delete e.getVideoBrowseRecordAsync,e.reportVideoBrowse===b&&delete e.reportVideoBrowse}},[y,v,p,b])}export{p as useVideoDetailWebViewBridge};
@@ -1,2 +1,2 @@
1
1
 
2
- import{defineComponentPropsSchema as e,getSchemaDefaultProps as t}from"../../../../../utils/schema/schema.mjs";const n=e({});t(n);export{n as videoDetailActionsInspectorPropsSchema};
2
+ import{defineComponentPropsSchema as e,getSchemaDefaultProps as t}from"../../../../../utils/schema/schema.mjs";const n=e(e=>({}));t(n);export{n as videoDetailActionsInspectorPropsSchema};
@@ -9,8 +9,9 @@ import * as zod_v4_core0 from "zod/v4/core";
9
9
 
10
10
  //#region components/biz/business/detail/video-detail-info/material.d.ts
11
11
  declare const videoDetailInfoMaterial: DefineMaterialOption<typeof VideoDetailInfo, typeof VideoDetailInfoClient, zod.ZodObject<{
12
- showTags: zod.ZodBoolean & SchemaHasDefaultValue;
13
- showEpisodes: zod.ZodBoolean & SchemaHasDefaultValue;
12
+ readonly showTags: zod.ZodBoolean & SchemaHasDefaultValue;
13
+ readonly showEpisodes: zod.ZodBoolean & SchemaHasDefaultValue;
14
+ } & {
14
15
  mode: zod.ZodOptional<zod.ZodEnum<{
15
16
  renderer: "renderer";
16
17
  editor: "editor";
@@ -9,8 +9,9 @@ import * as zod_v4_core0 from "zod/v4/core";
9
9
  * 媒体信息-简介&选集物料暂不对外开放配置。
10
10
  */
11
11
  declare const videoDetailInfoInspectorPropsSchema: zod.ZodObject<{
12
- showTags: zod.ZodBoolean & SchemaHasDefaultValue;
13
- showEpisodes: zod.ZodBoolean & SchemaHasDefaultValue;
12
+ readonly showTags: zod.ZodBoolean & SchemaHasDefaultValue;
13
+ readonly showEpisodes: zod.ZodBoolean & SchemaHasDefaultValue;
14
+ } & {
14
15
  mode: zod.ZodOptional<zod.ZodEnum<{
15
16
  renderer: "renderer";
16
17
  editor: "editor";
@@ -1,2 +1,2 @@
1
1
 
2
- import{defineComponentPropsSchema as e,defineSwitchPropSchema as t,getSchemaDefaultProps as n}from"../../../../../utils/schema/schema.mjs";const r=e({showTags:t({label:`显示标签`,defaultValue:!1}),showEpisodes:t({label:`显示选集`,defaultValue:!0})});n(r);export{r as videoDetailInfoInspectorPropsSchema};
2
+ import{defineComponentPropsSchema as e,getSchemaDefaultProps as t}from"../../../../../utils/schema/schema.mjs";const n=e(e=>({showTags:e.boolean(!0,{label:`显示标签`}),showEpisodes:e.boolean(!0,{label:`显示选集`})}));t(n);export{n as videoDetailInfoInspectorPropsSchema};
@@ -1,2 +1,2 @@
1
1
 
2
- import{VideoDetailMaterialRuntimeProvider as e}from"../shared/runtime-context-provider.mjs";import{VideoDetailInfoClient as t}from"./client.mjs";import{resolveVideoDetailRouteFromMaterialContext as n}from"../shared/material-route-context.mjs";import{getVideoDetailServerInformation as r}from"../shared/video-detail-server-data.mjs";import{jsx as i,jsxs as a}from"react/jsx-runtime";import o from"next/link";async function s(s){let{mode:l=`renderer`,showEpisodes:d=!0,detailId:f,currentSeriesNum:p,__route:m,...h}=s;if(l!==`renderer`)return i(t,{...h,showEpisodes:d,mode:l});let g=n(m),_=String(f||g.detailId||``).trim();if(!_)return i(t,{...h,showEpisodes:d,mode:l});let v=await r(_);if(!v)return i(t,{...h,showEpisodes:d,mode:l});let y=Math.max(1,Number(p||g.currentSeriesNum||1)),b=c(v),x=d&&v.is_more_link===`y`&&b.length>1;return a(e,{value:{information:v,detailId:_,currentSeriesNum:y,episodeIndex:Math.max(0,y-1),isShow:!0,isInformationLoading:!1,isInformationResolved:!0},children:[i(t,{...h,showEpisodes:!1,mode:l}),x&&i(`div`,{className:`w-full px-[12px] mt-[12px]`,children:i(`div`,{className:`flex flex-wrap gap-[8px]`,children:b.map(e=>{let t=e.seriesNum===y;return i(o,{href:u(_,v.name||``,e.seriesNum),className:`h-[28px] min-w-[40px] rounded-[6px] border px-[8px] text-[12px] leading-[26px] text-center ${t?`border-theme5 text-theme5 bg-theme5/10`:`border-line1 text-text2 bg-bg1`}`,children:e.label},e.key)})})})]})}function c(e){return(Array.isArray(e.links)?e.links:[]).map((e,t)=>{let n=e||{},r=typeof n.id==`string`?n.id:``,i=l(n.id,n.name,t+1);return{key:r||`episode-${i}-${t+1}`,seriesNum:i,label:`第${i}集`}})}function l(e,t,n){let r=Number(e);if(Number.isFinite(r)&&r>0)return Math.floor(r);let i=Number(t);return Number.isFinite(i)&&i>0?Math.floor(i):n}function u(e,t,n){return`/video/${e}/${encodeURIComponent(t||``)}/episode/${n}`}export{s as VideoDetailInfo};
2
+ import{VideoDetailMaterialRuntimeProvider as e}from"../shared/runtime-context-provider.mjs";import{VideoDetailInfoClient as t}from"./client.mjs";import{resolveVideoDetailRouteFromMaterialContext as n}from"../shared/material-route-context.mjs";import{getVideoDetailServerInformation as r}from"../shared/video-detail-server-data.mjs";import{jsx as i}from"react/jsx-runtime";async function a(a){let{mode:o=`renderer`,detailId:s,currentSeriesNum:c,__route:l,...u}=a;if(o!==`renderer`)return i(t,{...u,mode:o});let d=n(l),f=String(s||d.detailId||``).trim();if(!f)return i(t,{...u,mode:o});let p=await r(f);return p?i(e,{value:{information:p,detailId:f,currentSeriesNum:Math.max(1,Number(c||d.currentSeriesNum||1)),isShow:!0,isInformationLoading:!1,isInformationResolved:!0},children:i(t,{...u,mode:o})}):i(t,{...u,mode:o})}export{a as VideoDetailInfo};
@@ -9,8 +9,9 @@ import * as zod_v4_core0 from "zod/v4/core";
9
9
 
10
10
  //#region components/biz/business/detail/video-detail-info-title-tags-episodes/material.d.ts
11
11
  declare const videoDetailInfoTitleTagsEpisodesMaterial: DefineMaterialOption<typeof VideoDetailInfoTitleTagsEpisodes, typeof VideoDetailInfoTitleTagsEpisodesClient, zod.ZodObject<{
12
- showTags: zod.ZodBoolean & SchemaHasDefaultValue;
13
- showEpisodes: zod.ZodBoolean & SchemaHasDefaultValue;
12
+ readonly showTags: zod.ZodBoolean & SchemaHasDefaultValue;
13
+ readonly showEpisodes: zod.ZodBoolean & SchemaHasDefaultValue;
14
+ } & {
14
15
  mode: zod.ZodOptional<zod.ZodEnum<{
15
16
  renderer: "renderer";
16
17
  editor: "editor";
@@ -9,8 +9,9 @@ import * as zod_v4_core0 from "zod/v4/core";
9
9
  * 媒体信息-选集物料暂不对外开放配置。
10
10
  */
11
11
  declare const videoDetailInfoTitleTagsEpisodesInspectorPropsSchema: zod.ZodObject<{
12
- showTags: zod.ZodBoolean & SchemaHasDefaultValue;
13
- showEpisodes: zod.ZodBoolean & SchemaHasDefaultValue;
12
+ readonly showTags: zod.ZodBoolean & SchemaHasDefaultValue;
13
+ readonly showEpisodes: zod.ZodBoolean & SchemaHasDefaultValue;
14
+ } & {
14
15
  mode: zod.ZodOptional<zod.ZodEnum<{
15
16
  renderer: "renderer";
16
17
  editor: "editor";
@@ -1,2 +1,2 @@
1
1
 
2
- import{defineComponentPropsSchema as e,defineSwitchPropSchema as t,getSchemaDefaultProps as n}from"../../../../../utils/schema/schema.mjs";const r=e({showTags:t({label:`显示标签`,defaultValue:!0}),showEpisodes:t({label:`显示选集`,defaultValue:!0})});n(r);export{r as videoDetailInfoTitleTagsEpisodesInspectorPropsSchema};
2
+ import{defineComponentPropsSchema as e,getSchemaDefaultProps as t}from"../../../../../utils/schema/schema.mjs";const n=e(e=>({showTags:e.boolean(!0,{label:`显示标签`}),showEpisodes:e.boolean(!0,{label:`显示选集`})}));t(n);export{n as videoDetailInfoTitleTagsEpisodesInspectorPropsSchema};
@@ -1,2 +1,2 @@
1
1
 
2
- import{defineComponentPropsSchema as e,getSchemaDefaultProps as t}from"../../../../../utils/schema/schema.mjs";const n=e({});t(n);export{n as videoDetailPlayerInspectorPropsSchema};
2
+ import{defineComponentPropsSchema as e,getSchemaDefaultProps as t}from"../../../../../utils/schema/schema.mjs";const n=e(e=>({}));t(n);export{n as videoDetailPlayerInspectorPropsSchema};
@@ -7,6 +7,6 @@ import { VideoDetailPlayerBridgeOnlyProps } from "./schema.mjs";
7
7
  * - 仅注入 Bridge 所需全局方法
8
8
  * - 不渲染 UI(return null)
9
9
  */
10
- declare function VideoDetailPlayerBridgeOnlyClient(props: VideoDetailPlayerBridgeOnlyProps): null;
10
+ declare function VideoDetailPlayerBridgeOnlyClient(_props: VideoDetailPlayerBridgeOnlyProps): null;
11
11
  //#endregion
12
12
  export { VideoDetailPlayerBridgeOnlyClient };
@@ -1,2 +1,2 @@
1
1
 
2
- "use client";import{useVideoDetailMaterialRuntimeContext as e}from"../shared/runtime-context-provider.mjs";import{useVideoDetailWebViewBridge as t}from"../shared/use-video-detail-webview-bridge.mjs";function n(n){let r=e();return t({enabled:!0,detailId:r?.detailId||r?.information?.id||``,information:r?.information??null,episodeIndex:r?.episodeIndex??0,currentSeriesNum:r?.currentSeriesNum??1}),null}export{n as VideoDetailPlayerBridgeOnlyClient};
2
+ "use client";import{useVideoDetailWebViewBridge as e}from"../shared/use-video-detail-webview-bridge.mjs";function t(t){return e({enabled:!0}),null}export{t as VideoDetailPlayerBridgeOnlyClient};
@@ -1,2 +1,2 @@
1
1
 
2
- import{defineComponentPropsSchema as e,getSchemaDefaultProps as t}from"../../../../../utils/schema/schema.mjs";const n=e({});t(n);export{n as videoDetailPlayerBridgeOnlyInspectorPropsSchema};
2
+ import{defineComponentPropsSchema as e,getSchemaDefaultProps as t}from"../../../../../utils/schema/schema.mjs";const n=e(e=>({}));t(n);export{n as videoDetailPlayerBridgeOnlyInspectorPropsSchema};
@@ -1,2 +1,2 @@
1
1
 
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{useRequest as i}from"../../../../../hooks/query/use-query.mjs";import{useKeepAliveState as a}from"../../../../common/keep-scroll-position/index.mjs";import o 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 ee,clampColumns as d,mergeManualAndPool as f,normalizeRecommendRuntimeProps as p,resolveRows as m}from"./utils.mjs";import{useCallback as te,useEffect as h,useMemo as g,useRef as ne,useState as re}from"react";import{jsx as _,jsxs as ie}from"react/jsx-runtime";function v({rows:v,columns:ae,smartTagEnabled:y,smartTagIds:b,title:pe,showPlayCount:me,playCountDelta:he,showEpisode:ge,enableInfinite:S,items:C,mode:_e=`renderer`}){let w=u()?.detailId||``,ve=_e===`editor`,T=ve,{getVerticalHoCoverImageUrl:E,getTitleText:D}=c(),O=ne(null),k=g(()=>p({smartTagEnabled:y,smartTagIds:b,enableInfinite:S,items:C}),[S,C,y,b]),A=k.smartTagEnabled,j=k.smartTagIds,M=g(()=>k.items??[],[k.items]),N=k.enableInfinite&&!ve,P=!A,F=N&&A&&!T,ye=m(v,N),I=d(ae),L=ye*I,R=Math.max(1,L),z=g(()=>[`video-detail-recommend`,w||`unknown`,R,j.join(`,`)].join(`:`),[w,R,j]),[be,B]=a(`${z}:pool`,[]),[V,H]=a(`${z}:has-more`,!1),[U,W]=re(!1),G=g(()=>l(L),[L]),{data:K}=i([`video-detail-recommend`,w,F?`paged`:`all`,R,j.join(`,`)],async()=>T?null:await e({page_size:R,tags:j}),{enabled:!T&&A}),q=g(()=>T?G:oe(K?.data?.videos),[K?.data?.videos,G,T]);h(()=>{if(!F){W(!1);return}B(e=>{if(!q.length)return e;if(!e.length)return q;let t=[...q],n=new Set(q.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=ce(K?.data?.videos,R);H(t=>t||e),W(!1)},[K?.data?.videos,q,R,H,B,F]);let J=F?be:q,Y=g(()=>P?Array.from(new Set(M.map(e=>x(e.contentId)).filter(Boolean))):[],[M,P]),{data:xe}=i([`video-detail-recommend-manual-details`,Y.join(`,`)],async()=>{if(!Y.length)return[];let e=await t({ids:Y});return(Array.isArray(e.data?.videos)?e.data.videos:[]).map(e=>se(e))},{enabled:Y.length>0}),Se=g(()=>P?new Set(M.map(e=>x(e.contentId)).filter(Boolean)):new Set,[M,P]),Ce=g(()=>T?J:J.filter(e=>!Se.has(e.id)),[J,T,Se]),X=g(()=>{if(!P||!M.length)return[];let e=new Map;return J.forEach(t=>{let n=x(t.id);n&&e.set(n,t)}),(xe||[]).forEach(t=>{let n=x(t.id);n&&e.set(n,t)}),M.map((t,n)=>{let r=T?G[n%Math.max(1,G.length)]:fe(t,n),i=x(t.contentId),a=typeof t.coverUrl==`string`?t.coverUrl.trim():``,o=e.get(i)??{...r,id:i||r.id||`preview-manual-${n+1}`,name:r.name||`猜你喜欢 ${n+1}`,img_y:a||r.img_y,img_x:a||r.img_x},s=t.titleMode===`custom`?t.title:D(o),c=t.coverMode===`content`?E(o)||a:a||E(o);return{info:{...o,name:s||o.name,img_y:c||o.img_y,img_x:c||o.img_x},config:{showPlayCount:t.showPlayCount,playCountDelta:t.playCountDelta,showEpisode:t.showEpisode}}}).filter(Boolean)},[G,J,D,E,T,xe,M,P]),Z=g(()=>Ce.map(e=>({info:e})),[Ce]),we=P&&M.length>0,Te=g(()=>we?X:f(X,Z,L),[we,X,L,Z]),Q=g(()=>{if(F){if(!X.length)return Z;let e=new Set(X.map(e=>e.info.id).filter(Boolean));return X.concat(Z.filter(t=>!e.has(t.info.id)))}if(N){if(!X.length)return Z;let e=new Set(X.map(e=>e.info.id).filter(Boolean));return X.concat(Z.filter(t=>!e.has(t.info.id)))}return Te},[Te,X,Z,N,F]),Ee=V&&Q.length>0?Math.max(0,Q.length-4):-1,De=String(pe||``).trim(),$=te(async()=>{if(!(!F||!V||U)){W(!0);try{let t=await e({page_size:R,tags:j}),n=Array.isArray(t.data?.videos)?t.data.videos:[],r=oe(n),i=0;B(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}),H(ce(n,R)&&i>0)}catch(e){console.error(`猜你喜欢分页加载失败`,e),H(!1)}finally{W(!1)}}},[V,U,R,j,H,B,F]);return h(()=>{if(!F)return;let e=O.current;if(!e||!V)return;let t=new IntersectionObserver(e=>{e[0]?.isIntersecting&&!U&&$()});return t.observe(e),()=>{t.disconnect()}},[$,V,U,F,Ee]),Q.length?ie(n,{className:`w-full mt-[16px] ${T?`pointer-events-none`:``}`,children:[De?_(r,{className:`block pl-[12px] mb-[8px] text-text1 text-[18px] leading-[26px] font-bold`,children:De}):null,_(n,{className:`w-full flex flex-wrap px-[12px]`,children:Q.map((e,t)=>{let n=D(e.info),i=me!==!1&&(e.config?.showPlayCount??!0),a=Number(e.config?.playCountDelta??he??0),c=e.config?.showEpisode??ge,l=ue(ee(e.info.play_count||0,a)),u=le(e.info),d=Number.isFinite(I)&&I>0?I:3,f=`${100/d}%`,p=t%d,m=d>1?{paddingLeft:8*p/d,paddingRight:8*(d-p-1)/d}:null;return _(`div`,{ref:t===Ee?O:void 0,style:{width:f,...m||{}},children:_(s,{url:E(e.info),text:n,textChild:_(r,{as:`h3`,className:`text-text1 text-[16px] h-[24px] leading-[24px] my-[4px] line-clamp-1`,children:n}),style:{width:`100%`},bottomLeftChild:i?ie(`div`,{className:`h-[20px] leading-[20px] text-[#fff] text-[12px] px-[4px] rounded-[4px] bg-[#333] ml-[4px] flex items-center`,children:[_(o,{className:`w-[16px] h-[auto] text-[#fff] mr-[4px]`}),l]}):null,bottomRightChild:c&&u?_(`div`,{className:`text-[#fff] text-[12px] leading-[20px] pr-2`,children:u}):null,linkPath:T?``:de(e.info)})},`guess-like-${t}`)})})]}):null}function ae(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 oe(e){return Array.isArray(e)?e.map(e=>ae(e)):[]}function se(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 ce(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(y(e)){let t=Number(e.episode_cnt||e.links?.length||0);return t>0?`全${t}集`:``}return b(Number(e.duration||0))}function y(e){return e.is_more_link===`y`}function b(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 x(e){return typeof e==`string`?e.trim():``}function fe(e,t){let n=x(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{v 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};
@@ -9,16 +9,16 @@ import * as zod_v4_core0 from "zod/v4/core";
9
9
 
10
10
  //#region components/biz/business/detail/video-detail-recommend/material.d.ts
11
11
  declare const videoDetailRecommendMaterial: DefineMaterialOption<typeof VideoDetailRecommend, typeof VideoDetailRecommendClient, zod.ZodObject<{
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.ZodBoolean & SchemaHasDefaultValue;
20
- smartTagIds: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
21
- items: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
12
+ readonly rows: zod.ZodNumber & SchemaHasDefaultValue;
13
+ readonly columns: zod.ZodNumber & SchemaHasDefaultValue;
14
+ readonly smartTagEnabled: zod.ZodBoolean & SchemaHasDefaultValue;
15
+ readonly title: zod.ZodString & SchemaHasDefaultValue;
16
+ readonly showPlayCount: zod.ZodBoolean & SchemaHasDefaultValue;
17
+ readonly playCountDelta: zod.ZodNumber & SchemaHasDefaultValue;
18
+ readonly showEpisode: zod.ZodBoolean & SchemaHasDefaultValue;
19
+ readonly enableInfinite: zod.ZodBoolean & SchemaHasDefaultValue;
20
+ readonly smartTagIds: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
21
+ readonly items: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
22
22
  contentId: zod.ZodString;
23
23
  coverMode: zod.ZodOptional<zod.ZodEnum<{
24
24
  content: "content";
@@ -35,6 +35,7 @@ declare const videoDetailRecommendMaterial: DefineMaterialOption<typeof VideoDet
35
35
  playCountDelta: zod.ZodOptional<zod.ZodNumber>;
36
36
  showEpisode: zod.ZodOptional<zod.ZodBoolean>;
37
37
  }, zod_v4_core0.$strip>>>;
38
+ } & {
38
39
  mode: zod.ZodOptional<zod.ZodEnum<{
39
40
  renderer: "renderer";
40
41
  editor: "editor";
@@ -5,16 +5,16 @@ import z$1 from "zod";
5
5
 
6
6
  //#region components/biz/business/detail/video-detail-recommend/schema.d.ts
7
7
  declare const videoDetailRecommendInspectorPropsSchema: z$1.ZodObject<{
8
- rows: z$1.ZodNumber & SchemaHasDefaultValue;
9
- columns: z$1.ZodNumber & SchemaHasDefaultValue;
10
- smartTagEnabled: z$1.ZodBoolean & SchemaHasDefaultValue;
11
- title: z$1.ZodString & SchemaHasDefaultValue;
12
- showPlayCount: z$1.ZodBoolean & SchemaHasDefaultValue;
13
- playCountDelta: z$1.ZodNumber & SchemaHasDefaultValue;
14
- showEpisode: z$1.ZodBoolean & SchemaHasDefaultValue;
15
- enableInfinite: z$1.ZodBoolean & SchemaHasDefaultValue;
16
- smartTagIds: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
17
- items: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
8
+ readonly rows: z$1.ZodNumber & SchemaHasDefaultValue;
9
+ readonly columns: z$1.ZodNumber & SchemaHasDefaultValue;
10
+ readonly smartTagEnabled: z$1.ZodBoolean & SchemaHasDefaultValue;
11
+ readonly title: z$1.ZodString & SchemaHasDefaultValue;
12
+ readonly showPlayCount: z$1.ZodBoolean & SchemaHasDefaultValue;
13
+ readonly playCountDelta: z$1.ZodNumber & SchemaHasDefaultValue;
14
+ readonly showEpisode: z$1.ZodBoolean & SchemaHasDefaultValue;
15
+ readonly enableInfinite: z$1.ZodBoolean & SchemaHasDefaultValue;
16
+ readonly smartTagIds: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
17
+ readonly items: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
18
18
  contentId: z$1.ZodString;
19
19
  coverMode: z$1.ZodOptional<z$1.ZodEnum<{
20
20
  content: "content";
@@ -31,6 +31,7 @@ declare const videoDetailRecommendInspectorPropsSchema: z$1.ZodObject<{
31
31
  playCountDelta: z$1.ZodOptional<z$1.ZodNumber>;
32
32
  showEpisode: z$1.ZodOptional<z$1.ZodBoolean>;
33
33
  }, z$1.core.$strip>>>;
34
+ } & {
34
35
  mode: z$1.ZodOptional<z$1.ZodEnum<{
35
36
  renderer: "renderer";
36
37
  editor: "editor";
@@ -1,2 +1,2 @@
1
1
 
2
- import{defineComponentPropsSchema as e,defineNumberPropSchema as t,defineSwitchPropSchema as n,defineTextPropSchema as r,getSchemaDefaultProps as i}from"../../../../../utils/schema/schema.mjs";import a from"zod";const o=e({rows:t({label:`行数`,defaultValue:1}),columns:t({label:`列数`,defaultValue:2}),smartTagEnabled:n({label:`智能铺设`,defaultValue:!1}),title:r({label:`推荐位名称`,defaultValue:`猜你喜欢`}),showPlayCount:n({label:`显示播放量`,defaultValue:!0}),playCountDelta:t({label:`播放量浮动`,defaultValue:0}),showEpisode:n({label:`显示集数`,defaultValue:!0}),enableInfinite:n({label:`无限下拉`,defaultValue:!1}),smartTagIds:a.array(a.string()).optional(),items:a.array(a.object({contentId:a.string(),coverMode:a.enum([`upload`,`content`]).optional(),coverUrl:a.string().optional(),titleMode:a.enum([`custom`,`content`]).optional(),title:a.string().optional(),description:a.string().optional(),showPlayCount:a.boolean().optional(),playCountDelta:a.number().optional(),showEpisode:a.boolean().optional()})).optional()});({...i(o)});export{o as videoDetailRecommendInspectorPropsSchema};
2
+ import{defineComponentPropsSchema as e,getSchemaDefaultProps as t}from"../../../../../utils/schema/schema.mjs";import n from"zod";const r=e(e=>({rows:e.number(1,{label:`行数`}),columns:e.number(2,{label:`列数`}),smartTagEnabled:e.boolean(!1,{label:`智能铺设`}),title:e.string(`猜你喜欢`,{label:`推荐位名称`}),showPlayCount:e.boolean(!0,{label:`显示播放量`}),playCountDelta:e.number(0,{label:`播放量浮动`}),showEpisode:e.boolean(!0,{label:`显示集数`}),enableInfinite:e.boolean(!1,{label:`无限下拉`}),smartTagIds:n.array(n.string()).optional(),items:n.array(n.object({contentId:n.string(),coverMode:n.enum([`upload`,`content`]).optional(),coverUrl:n.string().optional(),titleMode:n.enum([`custom`,`content`]).optional(),title:n.string().optional(),description:n.string().optional(),showPlayCount:n.boolean().optional(),playCountDelta:n.number().optional(),showEpisode:n.boolean().optional()})).optional()}));({...t(r)});export{r as videoDetailRecommendInspectorPropsSchema};
@@ -9,8 +9,9 @@ import * as zod_v4_core0 from "zod/v4/core";
9
9
 
10
10
  //#region components/biz/business/floating-ball/material.d.ts
11
11
  declare const floatingBallMaterial: DefineMaterialOption<typeof FloatingBall, typeof FloatingBallClient, zod.ZodObject<{
12
- icon: zod.ZodString & SchemaHasDefaultValue;
13
- href: zod.ZodString & SchemaHasDefaultValue;
12
+ readonly icon: zod.ZodString & SchemaHasDefaultValue;
13
+ readonly href: zod.ZodString & SchemaHasDefaultValue;
14
+ } & {
14
15
  mode: zod.ZodOptional<zod.ZodEnum<{
15
16
  renderer: "renderer";
16
17
  editor: "editor";