@funhub/platform 0.2.7 → 0.2.8

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 (119) hide show
  1. package/dist/biz.d.mts +5 -5
  2. package/dist/biz.mjs +1 -1
  3. package/dist/components/biz/business/advertisement/ad-match.d.mts +4 -8
  4. package/dist/components/biz/business/advertisement/ad-match.mjs +1 -1
  5. package/dist/components/biz/business/advertisement/ad-provider.mjs +1 -1
  6. package/dist/components/biz/business/advertisement/ad-query.d.mts +2 -1
  7. package/dist/components/biz/business/advertisement/ad-query.mjs +1 -1
  8. package/dist/components/biz/business/advertisement/ad-runtime-provider.d.mts +2 -2
  9. package/dist/components/biz/business/advertisement/ad-runtime-provider.mjs +1 -1
  10. package/dist/components/biz/business/advertisement/banner-ad/client.mjs +1 -1
  11. package/dist/components/biz/business/advertisement/banner-ad/material.d.mts +3 -2
  12. package/dist/components/biz/business/advertisement/banner-ad/material.mjs +1 -1
  13. package/dist/components/biz/business/advertisement/banner-ad/schema.d.mts +6 -9
  14. package/dist/components/biz/business/advertisement/banner-ad/schema.mjs +1 -1
  15. package/dist/components/biz/business/advertisement/feed-ad/index.d.mts +31 -1
  16. package/dist/components/biz/business/advertisement/feed-ad/index.mjs +1 -1
  17. package/dist/components/biz/business/advertisement/floating-ad/client.d.mts +4 -4
  18. package/dist/components/biz/business/advertisement/floating-ad/client.mjs +1 -1
  19. package/dist/components/biz/business/advertisement/floating-ad/index.d.mts +1 -1
  20. package/dist/components/biz/business/advertisement/floating-ad/material.d.mts +0 -5
  21. package/dist/components/biz/business/advertisement/floating-ad/schema.d.mts +10 -21
  22. package/dist/components/biz/business/advertisement/floating-ad/schema.mjs +1 -1
  23. package/dist/components/biz/business/advertisement/icon-ad/client.mjs +1 -1
  24. package/dist/components/biz/business/advertisement/icon-ad/material.d.mts +2 -1
  25. package/dist/components/biz/business/advertisement/icon-ad/material.mjs +1 -1
  26. package/dist/components/biz/business/advertisement/icon-ad/schema.d.mts +2 -7
  27. package/dist/components/biz/business/advertisement/icon-ad/schema.mjs +1 -1
  28. package/dist/components/biz/business/advertisement/index.d.mts +4 -4
  29. package/dist/components/biz/business/advertisement/popup-ad/client.mjs +3 -3
  30. package/dist/components/biz/business/advertisement/popup-ad/index.d.mts +1 -1
  31. package/dist/components/biz/business/advertisement/popup-ad/material.d.mts +2 -2
  32. package/dist/components/biz/business/advertisement/popup-ad/schema.d.mts +15 -14
  33. package/dist/components/biz/business/advertisement/popup-ad/schema.mjs +1 -1
  34. package/dist/components/biz/business/advertisement/text-ad/client.mjs +1 -1
  35. package/dist/components/biz/business/advertisement/text-ad/material.d.mts +2 -1
  36. package/dist/components/biz/business/advertisement/text-ad/material.mjs +1 -1
  37. package/dist/components/biz/business/advertisement/text-ad/schema.d.mts +3 -5
  38. package/dist/components/biz/business/advertisement/text-ad/schema.mjs +1 -1
  39. package/dist/components/biz/business/detail/shared/runtime-context-provider.mjs +1 -1
  40. package/dist/components/biz/business/detail/shared/video-hero.mjs +1 -1
  41. package/dist/components/biz/business/header-search/header-avatar-logo-search/schema.mjs +1 -1
  42. package/dist/components/biz/business/header-search/shared/logo.mjs +1 -1
  43. package/dist/components/biz/business/home-recommend/home-recommend-grid/client.mjs +1 -1
  44. package/dist/components/biz/business/home-recommend/home-recommend-grid/inspector-schema.d.mts +24 -4
  45. package/dist/components/biz/business/home-recommend/home-recommend-grid/inspector-schema.mjs +1 -1
  46. package/dist/components/biz/business/home-recommend/home-recommend-grid/material.d.mts +22 -2
  47. package/dist/components/biz/business/home-recommend/home-recommend-grid/server.mjs +1 -1
  48. package/dist/components/biz/business/home-recommend/home-recommend-waterfall/client.mjs +1 -1
  49. package/dist/components/biz/business/home-recommend/home-recommend-waterfall/inspector-schema.d.mts +24 -4
  50. package/dist/components/biz/business/home-recommend/home-recommend-waterfall/inspector-schema.mjs +1 -1
  51. package/dist/components/biz/business/home-recommend/home-recommend-waterfall/material.d.mts +22 -2
  52. package/dist/components/biz/business/home-recommend/home-recommend-waterfall/server.mjs +1 -1
  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-default-config.mjs +1 -1
  55. package/dist/components/biz/business/home-recommend/shared/home-recommend-preview.mjs +1 -1
  56. package/dist/components/biz/business/home-recommend/shared/home-recommend-runtime-props.mjs +1 -1
  57. package/dist/components/biz/business/home-recommend/shared/home-recommend-server-data.mjs +1 -1
  58. package/dist/components/biz/business/home-recommend/shared/home-recommend-smart-layout.mjs +2 -0
  59. package/dist/components/biz/business/hot-recommend/client.mjs +1 -1
  60. package/dist/components/biz/business/hot-recommend/material.d.mts +1 -0
  61. package/dist/components/biz/business/hot-recommend/schema.d.mts +1 -0
  62. package/dist/components/biz/business/hot-recommend/schema.mjs +1 -1
  63. package/dist/components/biz/business/image-text-recommend/client.d.mts +1 -1
  64. package/dist/components/biz/business/image-text-recommend/client.mjs +1 -1
  65. package/dist/components/biz/business/image-text-recommend/material.d.mts +7 -7
  66. package/dist/components/biz/business/image-text-recommend/schema.d.mts +30 -25
  67. package/dist/components/biz/business/image-text-recommend/schema.mjs +1 -1
  68. package/dist/components/biz/business/image-text-recommend/server.mjs +1 -1
  69. package/dist/components/biz/business/image-text-recommend/shared/query.mjs +1 -1
  70. package/dist/components/biz/business/index.d.mts +4 -4
  71. package/dist/components/biz/business/large-feature-grid/schema.mjs +1 -1
  72. package/dist/components/biz/business/marquee/client.mjs +1 -1
  73. package/dist/components/biz/business/marquee/material.d.mts +5 -6
  74. package/dist/components/biz/business/marquee/schema.d.mts +5 -6
  75. package/dist/components/biz/business/marquee/schema.mjs +1 -1
  76. package/dist/components/biz/business/tab-bar/client.d.mts +2 -0
  77. package/dist/components/biz/business/tab-bar/client.mjs +1 -1
  78. package/dist/components/biz/business/text-recommend/client.mjs +1 -1
  79. package/dist/components/biz/business/text-recommend/material.d.mts +1 -0
  80. package/dist/components/biz/business/text-recommend/schema.d.mts +1 -0
  81. package/dist/components/biz/business/text-recommend/schema.mjs +1 -1
  82. package/dist/components/common/video-player/index.d.mts +2 -1
  83. package/dist/components/common/video-player/video-blind-ad-overlay.mjs +2 -0
  84. package/dist/components/common/video-player/video-player-ref-context.mjs +2 -0
  85. package/dist/components/ui/badge.d.mts +1 -1
  86. package/dist/components/ui/button.d.mts +1 -1
  87. package/dist/components/ui/image.d.mts +4 -4
  88. package/dist/hooks/use-is-client.d.mts +10 -0
  89. package/dist/hooks/use-is-client.mjs +2 -0
  90. package/dist/hooks.d.mts +2 -1
  91. package/dist/hooks.mjs +1 -1
  92. package/dist/service/generated/client.d.mts +10 -2
  93. package/dist/service/generated/client.mjs +1 -1
  94. package/dist/service/generated/tanstack.d.mts +12 -2
  95. package/dist/service/generated/tanstack.mjs +1 -1
  96. package/dist/service.d.mts +3 -3
  97. package/dist/service.mjs +1 -1
  98. package/dist/store/modules/blind-spot-ad-store.d.mts +116 -0
  99. package/dist/store/modules/blind-spot-ad-store.mjs +2 -0
  100. package/dist/store/modules/user-store.d.mts +1 -1
  101. package/dist/store/modules/user-store.mjs +1 -1
  102. package/dist/store/modules/video-player-ref-store.d.mts +21 -0
  103. package/dist/store/modules/video-player-ref-store.mjs +2 -0
  104. package/dist/store.d.mts +3 -1
  105. package/dist/store.mjs +1 -1
  106. package/dist/types.d.mts +171 -1
  107. package/dist/utils/browser-fingerprint.d.mts +13 -0
  108. package/dist/utils/browser-fingerprint.mjs +2 -0
  109. package/dist/utils/device-id.d.mts +2 -2
  110. package/dist/utils/device-id.mjs +1 -1
  111. package/dist/utils/http.mjs +1 -1
  112. package/dist/utils/request-user-id.d.mts +12 -0
  113. package/dist/utils/request-user-id.mjs +2 -0
  114. package/dist/utils/schema/inspector.d.mts +2 -2
  115. package/dist/utils.d.mts +3 -1
  116. package/dist/utils.mjs +1 -1
  117. package/package.json +2 -1
  118. package/dist/assets/icons/search/video.mjs +0 -2
  119. package/dist/components/biz/business/marquee/marquee.module.mjs +0 -24
@@ -1,6 +1,5 @@
1
1
 
2
- import { InferSchemaProps, MaterialComponentMode, SchemaHasDefaultValue } from "../../../../../utils/schema/schema.mjs";
3
- import "../../../../../utils.mjs";
2
+ import { MaterialComponentMode } from "../../../../../utils/schema/schema.mjs";
4
3
  import { AdsMatchSceneContext } from "../../../../../service/advertisement.mjs";
5
4
  import * as zod from "zod";
6
5
  import * as zod_v4_core0 from "zod/v4/core";
@@ -24,29 +23,23 @@ interface FloatingAdItem {
24
23
  name?: string;
25
24
  }
26
25
  /**
27
- * 悬浮广告物料属性。
26
+ * 悬浮广告物料属性(无 inspector 可配置字段,数据来自广告接口)。
28
27
  */
29
28
  declare const floatingAdInspectorPropsSchema: zod.ZodObject<{
30
- readonly materialUrl: zod.ZodString & SchemaHasDefaultValue;
31
- readonly jumpUrl: zod.ZodString & SchemaHasDefaultValue;
32
- readonly name: zod.ZodOptional<zod.ZodString> & SchemaHasDefaultValue;
33
- } & {
34
29
  mode: zod.ZodOptional<zod.ZodEnum<{
35
30
  renderer: "renderer";
36
31
  editor: "editor";
37
32
  }>>;
38
33
  }, zod_v4_core0.$strip>;
39
- declare const floatingAdInspectorDefaultProps: {
40
- readonly materialUrl: string;
41
- readonly jumpUrl: string;
42
- readonly name: string;
43
- };
44
- type FloatingAdInspectorProps<T extends object = object> = InferSchemaProps<typeof floatingAdInspectorPropsSchema> & T;
45
- type FloatingAdEditableProps = InferSchemaProps<typeof floatingAdInspectorPropsSchema>;
34
+ declare const floatingAdInspectorDefaultProps: {};
46
35
  /**
47
36
  * 悬浮广告组件 props。
48
37
  */
49
- type FloatingAdProps = Partial<FloatingAdEditableProps> & {
38
+ interface FloatingAdProps {
39
+ /**
40
+ * 显式传入的广告数据,优先于广告上下文。
41
+ */
42
+ ad?: FloatingAdItem;
50
43
  /**
51
44
  * 渲染模式。
52
45
  */
@@ -59,10 +52,6 @@ type FloatingAdProps = Partial<FloatingAdEditableProps> & {
59
52
  * 广告场景控制对象。
60
53
  */
61
54
  sceneContext?: AdsMatchSceneContext;
62
- /**
63
- * 广告数据。
64
- */
65
- ad?: FloatingAdItem;
66
55
  /**
67
56
  * 距离底部的偏移量。
68
57
  */
@@ -79,6 +68,6 @@ type FloatingAdProps = Partial<FloatingAdEditableProps> & {
79
68
  * 自定义点击事件。
80
69
  */
81
70
  onClick?: () => void;
82
- };
71
+ }
83
72
  //#endregion
84
- export { FloatingAdEditableProps, FloatingAdInspectorProps, FloatingAdItem, FloatingAdProps, floatingAdInspectorDefaultProps, floatingAdInspectorPropsSchema };
73
+ export { FloatingAdItem, FloatingAdProps, floatingAdInspectorDefaultProps, floatingAdInspectorPropsSchema };
@@ -1,2 +1,2 @@
1
1
 
2
- import{defineComponentPropsSchema as e,getSchemaDefaultProps as t}from"../../../../../utils/schema/schema.mjs";const n=e(e=>({materialUrl:e.string(``,{label:`广告素材`,required:!0}),jumpUrl:e.string(``,{label:`跳转链接`,required:!0}),name:e.string(`悬浮广告`,{label:`广告名称`,required:!1})})),r=t(n);export{r as floatingAdInspectorDefaultProps,n as floatingAdInspectorPropsSchema};
2
+ import{defineComponentPropsSchema as e,getSchemaDefaultProps as t}from"../../../../../utils/schema/schema.mjs";const n=e(()=>({})),r=t(n);export{r as floatingAdInspectorDefaultProps,n as floatingAdInspectorPropsSchema};
@@ -1,2 +1,2 @@
1
1
 
2
- "use client";import{Image as e}from"../../../../ui/image.mjs";import{Box as t}from"../../../../ui/box.mjs";import{Text as n}from"../../../../ui/text.mjs";import r from"../../../../ui/link.mjs";import{adaptIconAdProps as i,hasMatchedAds as a}from"../ad-match.mjs";import{useAdProvider as o}from"../ad-provider.mjs";import{useMemo as s}from"react";import{jsx as c,jsxs as l}from"react/jsx-runtime";function u({mode:u=`renderer`,displayCount:d,items:f,pointerEventsDisabled:p=!1}){let m=o(),h=s(()=>a(m?.matchData)?i(m?.matchData):{displayCount:d,items:f},[m?.matchData,d,f]),g=Math.min(Math.max(h.displayCount,0),Math.min(h.items.length,5)),_=h.items.slice(0,g);return _.length===0?null:c(t,{as:`section`,className:`w-full`,"aria-label":`图标广告`,style:{pointerEvents:p?`none`:void 0},children:c(t,{className:`flex overflow-x-auto`,style:{gap:`8px`,padding:`16px 24px`,backgroundColor:`#131313`,alignItems:`center`,justifyContent:_.length>=5?`space-between`:`flex-start`},children:_.map((i,a)=>c(r,{href:i.jumpUrl,className:`block shrink-0`,style:{width:`100px`},children:l(t,{className:`flex flex-col items-center`,style:{gap:`12px`},children:[c(t,{className:`relative overflow-hidden`,style:{width:`100px`,height:`61px`,borderRadius:`10px`,backgroundColor:`#616161`},children:c(e,{src:i.icon,alt:i.title||`图标广告`,fill:!0,className:`object-cover object-center`,unoptimized:!0})}),c(n,{className:`truncate text-center text-white`,style:{width:`100px`,fontSize:`12px`,lineHeight:1,fontWeight:500},children:i.title}),c(t,{className:`flex items-center justify-center`,style:{minWidth:`35px`,padding:`2px 8px`,borderRadius:`4px`,backgroundColor:`rgba(255, 255, 255, 0.33)`},children:c(n,{className:`whitespace-nowrap text-white`,style:{fontSize:`10px`,lineHeight:`normal`,fontWeight:400},children:i.badgeText||`广告`})})]})},`${i.jumpUrl}-${a}`))})})}export{u as IconAd};
2
+ "use client";import{Image as e}from"../../../../ui/image.mjs";import{Box as t}from"../../../../ui/box.mjs";import{Text as n}from"../../../../ui/text.mjs";import r from"../../../../ui/link.mjs";import{adaptIconAdProps as i,hasMatchedAds as a}from"../ad-match.mjs";import{useAdProvider as o}from"../ad-provider.mjs";import{iconAdInspectorDefaultProps as s}from"./schema.mjs";import{useMemo as c}from"react";import{jsx as l,jsxs as u}from"react/jsx-runtime";const d=[{title:`图标广告1`,icon:`/static/components-resource/banner.png`,jumpUrl:`/search`,badgeText:`广告`},{title:`图标广告2`,icon:`/static/components-resource/banner.png`,jumpUrl:`/search`,badgeText:`广告`},{title:`图标广告3`,icon:`/static/components-resource/banner.png`,jumpUrl:`/search`,badgeText:`广告`},{title:`图标广告4`,icon:`/static/components-resource/banner.png`,jumpUrl:`/search`,badgeText:`广告`},{title:`图标广告5`,icon:`/static/components-resource/banner.png`,jumpUrl:`/search`,badgeText:`广告`}];function f(e,t){return Array.isArray(e)&&e.length>0?e:t??[]}function p(e,t){return typeof e==`number`&&e>0?e:t}function m({mode:m=`renderer`,displayCount:h,items:g,pointerEventsDisabled:_=!1}){let v=m===`editor`?{displayCount:p(h,s.displayCount),items:f(g,d)}:{displayCount:h,items:g},y=o(),b=c(()=>a(y?.matchData)?i(y?.matchData):{displayCount:v.displayCount,items:v.items??[]},[y?.matchData,v.displayCount,v.items]),x=b.displayCount??b.items.length,S=Math.min(Math.max(x,0),Math.min(b.items.length,5)),C=b.items.slice(0,S);return C.length===0?null:l(t,{as:`section`,className:`w-full`,"aria-label":`图标广告`,style:{pointerEvents:_?`none`:void 0},children:l(t,{className:`flex overflow-x-auto`,style:{gap:`8px`,padding:`16px 24px`,backgroundColor:`#131313`,alignItems:`center`,justifyContent:C.length>=5?`space-between`:`flex-start`},children:C.map((i,a)=>l(r,{href:i.jumpUrl,className:`block shrink-0`,style:{width:`100px`},children:u(t,{className:`flex flex-col items-center`,style:{gap:`12px`},children:[l(t,{className:`relative overflow-hidden`,style:{width:`100px`,height:`61px`,borderRadius:`10px`,backgroundColor:`#616161`},children:l(e,{src:i.icon,alt:i.title||`图标广告`,fill:!0,className:`object-cover object-center`,unoptimized:!0})}),l(n,{className:`truncate text-center text-white`,style:{width:`100px`,fontSize:`12px`,lineHeight:1,fontWeight:500},children:i.title}),l(t,{className:`flex items-center justify-center`,style:{minWidth:`35px`,padding:`2px 8px`,borderRadius:`4px`,backgroundColor:`rgba(255, 255, 255, 0.33)`},children:l(n,{className:`whitespace-nowrap text-white`,style:{fontSize:`10px`,lineHeight:`normal`,fontWeight:400},children:i.badgeText||`广告`})})]})},`${i.jumpUrl}-${a}`))})})}export{m as IconAd};
@@ -15,10 +15,11 @@ declare const iconAdMaterial: DefineMaterialOption<typeof IconAdServer, typeof I
15
15
  readonly displayCount: zod.ZodNumber & SchemaHasDefaultValue;
16
16
  readonly items: zod.ZodArray<zod.ZodObject<{
17
17
  title: zod.ZodString & SchemaHasDefaultValue;
18
+ default_advertise_location_code: zod.ZodString & SchemaHasDefaultValue;
18
19
  icon: zod.ZodString & SchemaHasDefaultValue;
19
20
  jumpUrl: zod.ZodString & SchemaHasDefaultValue;
20
21
  badgeText: zod.ZodOptional<zod.ZodString> & SchemaHasDefaultValue;
21
- }, zod_v4_core0.$strip>> & SchemaHasDefaultValue;
22
+ }, zod_v4_core0.$strip>>;
22
23
  } & {
23
24
  mode: zod.ZodOptional<zod.ZodEnum<{
24
25
  renderer: "renderer";
@@ -1,2 +1,2 @@
1
1
 
2
- import{defineMaterial as e}from"../../../../../utils/schema/material.mjs";import{IconAd as t}from"./client.mjs";import{iconAdInspectorPropsSchema as n}from"./schema.mjs";import{IconAdServer as r}from"./server.mjs";const i=e({type:`icon-ad`,name:`图标广告`,icon:`/static/components-thumb/shortcut_grid_5.png`,category:`广告组件`,serverComponent:r,clientComponent:t,propsSchema:n});export{i as iconAdMaterial};
2
+ import{defineMaterial as e}from"../../../../../utils/schema/material.mjs";import{iconAdInspectorPropsSchema as t}from"./schema.mjs";import{IconAd as n}from"./client.mjs";import{IconAdServer as r}from"./server.mjs";const i=e({type:`icon-ad`,name:`图标广告`,icon:`/static/components-thumb/shortcut_grid_5.png`,category:`广告组件`,serverComponent:r,clientComponent:n,propsSchema:t});export{i as iconAdMaterial};
@@ -33,10 +33,11 @@ declare const iconAdInspectorPropsSchema: z$1.ZodObject<{
33
33
  readonly displayCount: z$1.ZodNumber & SchemaHasDefaultValue;
34
34
  readonly items: z$1.ZodArray<z$1.ZodObject<{
35
35
  title: z$1.ZodString & SchemaHasDefaultValue;
36
+ default_advertise_location_code: z$1.ZodString & SchemaHasDefaultValue;
36
37
  icon: z$1.ZodString & SchemaHasDefaultValue;
37
38
  jumpUrl: z$1.ZodString & SchemaHasDefaultValue;
38
39
  badgeText: z$1.ZodOptional<z$1.ZodString> & SchemaHasDefaultValue;
39
- }, z$1.core.$strip>> & SchemaHasDefaultValue;
40
+ }, z$1.core.$strip>>;
40
41
  } & {
41
42
  mode: z$1.ZodOptional<z$1.ZodEnum<{
42
43
  renderer: "renderer";
@@ -45,12 +46,6 @@ declare const iconAdInspectorPropsSchema: z$1.ZodObject<{
45
46
  }, z$1.core.$strip>;
46
47
  declare const iconAdInspectorDefaultProps: {
47
48
  readonly displayCount: number;
48
- readonly items: {
49
- title: string;
50
- icon: string;
51
- jumpUrl: string;
52
- badgeText?: string | undefined;
53
- }[];
54
49
  };
55
50
  type IconAdInspectorProps<T extends object = object> = InferSchemaProps<typeof iconAdInspectorPropsSchema> & T;
56
51
  /**
@@ -1,2 +1,2 @@
1
1
 
2
- import{defineComponentPropsSchema as e,getSchemaDefaultProps as t}from"../../../../../utils/schema/schema.mjs";import n from"zod";const r=e(e=>({displayCount:e.number(5,{label:`数量选择`,required:!0}).refine(e=>e>=1&&e<=5,`数量选择必须为 1-5`),items:e.array(n.object({title:e.string(`广告标题`,{label:`标题`,required:!0}),icon:e.string(``,{label:`素材`,required:!0}),jumpUrl:e.string(``,{label:`跳转链接`,required:!0}),badgeText:e.string(`广告`,{label:`广告标识`,required:!1})}),{label:`广告列表`,required:!0,defaultValue:[{title:`图标广告1`,icon:`/static/components-resource/banner.png`,jumpUrl:`/search`,badgeText:`广告`},{title:`图标广告2`,icon:`/static/components-resource/banner.png`,jumpUrl:`/search`,badgeText:`广告`},{title:`图标广告3`,icon:`/static/components-resource/banner.png`,jumpUrl:`/search`,badgeText:`广告`}]})})),i=t(r);export{i as iconAdInspectorDefaultProps,r as iconAdInspectorPropsSchema};
2
+ import{defineComponentPropsSchema as e,getSchemaDefaultProps as t}from"../../../../../utils/schema/schema.mjs";import n from"zod";const r=e(e=>({displayCount:e.number(5,{label:`数量选择`,required:!0}).refine(e=>e>=1&&e<=5,`数量选择必须为 1-5`),items:e.array(n.object({title:e.string(`广告标题`,{label:`标题`,required:!0}),default_advertise_location_code:e.string(``,{label:`广告标识`,required:!0}),icon:e.string(``,{label:`素材`,required:!0}),jumpUrl:e.string(``,{label:`跳转链接`,required:!0}),badgeText:e.string(`广告`,{label:`广告标识`,required:!1})}),{label:`广告列表`,required:!0})})),i=t(r);export{i as iconAdInspectorDefaultProps,r as iconAdInspectorPropsSchema};
@@ -1,9 +1,9 @@
1
1
 
2
2
  import { BannerAdInspectorProps, BannerAdItem, BannerAdProps, BannerAdStyleSize, bannerAdInspectorDefaultProps, bannerAdInspectorPropsSchema, bannerAdStyleSizeOptions } from "./banner-ad/schema.mjs";
3
- import { FloatingAdEditableProps, FloatingAdInspectorProps, FloatingAdItem, FloatingAdProps, floatingAdInspectorDefaultProps, floatingAdInspectorPropsSchema } from "./floating-ad/schema.mjs";
3
+ import { FloatingAdItem, FloatingAdProps, floatingAdInspectorDefaultProps, floatingAdInspectorPropsSchema } from "./floating-ad/schema.mjs";
4
4
  import { IconAdInspectorProps, IconAdItem, IconAdProps, iconAdInspectorDefaultProps, iconAdInspectorPropsSchema } from "./icon-ad/schema.mjs";
5
5
  import { TextAdInspectorProps, TextAdItem, TextAdProps, textAdInspectorDefaultProps, textAdInspectorPropsSchema } from "./text-ad/schema.mjs";
6
- import { AdsMatchExtData, adaptBannerAdProps, adaptFloatingAdItem, adaptIconAdProps, adaptPopupAdMaterials, adaptTextAdProps, buildAdsMatchRequest, getFirstMatchedMaterial, hasMatchedAds, parseAdsMatchExtData, resolveAdsAppCode, sortAdsMatchMaterials } from "./ad-match.mjs";
6
+ import { AdsMatchExtData, adaptBannerAdProps, adaptFloatingAdItems, adaptIconAdProps, adaptPopupAdMaterials, adaptTextAdProps, buildAdsMatchRequest, hasMatchedAds, parseAdsMatchExtData, resolveAdsAppCode, sortAdsMatchMaterials } from "./ad-match.mjs";
7
7
  import { AdProvider, AdProviderProps, AdProviderValue, useAdProvider } from "./ad-provider.mjs";
8
8
  import { AdsMatchQueryOptions, createAdsMatchPrefetchItem, createAdsMatchQueryFn, getAdsMatchQueryKey } from "./ad-query.mjs";
9
9
  import { AdRuntimeProvider, AdRuntimeProviderProps } from "./ad-runtime-provider.mjs";
@@ -11,7 +11,7 @@ import { BannerAd } from "./banner-ad/client.mjs";
11
11
  import { BannerAdServer } from "./banner-ad/server.mjs";
12
12
  import { bannerAdMaterial } from "./banner-ad/material.mjs";
13
13
  import "./banner-ad/index.mjs";
14
- import { FeedAdBadge, FeedAdItemLike, getFeedAdIcon, getFeedAdJumpUrl, isFeedAdItem } from "./feed-ad/index.mjs";
14
+ import { FeedAdBadge, FeedAdItemLike, FeedAdPayloadLike, getFeedAdIcon, getFeedAdJumpUrl, isFeedAdItem } from "./feed-ad/index.mjs";
15
15
  import { FloatingAd } from "./floating-ad/client.mjs";
16
16
  import { FloatingAdServer } from "./floating-ad/server.mjs";
17
17
  import { floatingAdMaterial } from "./floating-ad/material.mjs";
@@ -20,7 +20,7 @@ import { IconAd } from "./icon-ad/client.mjs";
20
20
  import { IconAdServer } from "./icon-ad/server.mjs";
21
21
  import { iconAdMaterial } from "./icon-ad/material.mjs";
22
22
  import "./icon-ad/index.mjs";
23
- import { PopupAdInspectorProps, PopupAdItem, PopupAdProps, popupAdInspectorDefaultProps, popupAdInspectorPropsSchema } from "./popup-ad/schema.mjs";
23
+ import { PopupAdBaseProps, PopupAdInspectorProps, PopupAdItem, PopupAdProps, popupAdInspectorDefaultProps, popupAdInspectorPropsSchema } from "./popup-ad/schema.mjs";
24
24
  import { PopupAd } from "./popup-ad/client.mjs";
25
25
  import { PopupAdServer } from "./popup-ad/server.mjs";
26
26
  import { popupAdMaterial } from "./popup-ad/material.mjs";
@@ -1,5 +1,5 @@
1
1
 
2
- "use client";import{Button as e}from"../../../../ui/button.mjs";import{Image as t}from"../../../../ui/image.mjs";import{Box as n}from"../../../../ui/box.mjs";import{Dialog as r,DialogContent as i}from"../../../../ui/dialog.mjs";import a from"../../../../ui/link.mjs";import{adaptPopupAdMaterials as o,hasMatchedAds as s}from"../ad-match.mjs";import{useAdProvider as c}from"../ad-provider.mjs";import{useEffect as l,useMemo as u,useRef as d,useState as f}from"react";import{jsx as p,jsxs as m}from"react/jsx-runtime";function h({items:h,mode:g=`renderer`}){let _=c(),v=u(()=>s(_?.matchData)?o(_?.matchData):h,[_?.matchData,h]),[y,b]=f(0),[x,S]=f(!1),C=d(null);l(()=>{b(0)},[v]),l(()=>{S(!1)},[y,v]),l(()=>()=>{C.current&&window.clearTimeout(C.current)},[]);let w=v[y];function T(){b(e=>e+1)}function E(){x||(S(!0),C.current&&window.clearTimeout(C.current),C.current=window.setTimeout(()=>{C.current=null,T()},260))}function D(e){e||E()}return w?p(r,{open:!0,onOpenChange:D,disablePointerDismissal:!0,children:m(i,{showCloseButton:!1,className:`w-[320px] max-w-[calc(100vw-32px)] border-none bg-transparent p-0 shadow-none`,children:[m(n,{className:`flex flex-col items-center gap-[24px]`,style:{animation:x?`funhub-popup-ad-exit 260ms cubic-bezier(0.4, 0, 0.2, 1) both`:`funhub-popup-ad-enter 420ms cubic-bezier(0.2, 0.9, 0.2, 1) both, funhub-popup-ad-float 3.2s ease-in-out 420ms infinite`,transformOrigin:`center bottom`},children:[p(a,{href:w.jumpUrl,className:`block w-full overflow-hidden rounded-[20px] bg-[#434343]`,style:{boxShadow:`0 18px 48px rgba(0, 0, 0, 0.26)`},children:p(n,{className:`w-full overflow-hidden bg-[#434343]`,children:p(t,{src:w.materialUrl,alt:w.title||`弹窗广告`,width:1200,height:1600,className:`block w-full h-auto`,unoptimized:!0})})}),p(e,{type:`button`,"aria-label":`关闭弹窗广告`,variant:`ghost`,size:`icon-lg`,className:`relative h-[54px] w-[54px] rounded-full border-[3px] border-white bg-transparent p-0 text-white hover:bg-white/8`,onClick:E,style:{animation:x?`funhub-popup-ad-close-exit 260ms ease-out both`:`funhub-popup-ad-close-breathe 2.4s ease-in-out 480ms infinite`},children:m(n,{className:`relative h-[24px] w-[24px]`,children:[p(n,{className:`absolute left-1/2 top-1/2 h-[4px] w-full -translate-x-1/2 -translate-y-1/2 rotate-45 rounded-full bg-current`}),p(n,{className:`absolute left-1/2 top-1/2 h-[4px] w-full -translate-x-1/2 -translate-y-1/2 -rotate-45 rounded-full bg-current`})]})})]},w.id),p(`style`,{jsx:!0,children:`
2
+ "use client";import{Button as e}from"../../../../ui/button.mjs";import{Image as t}from"../../../../ui/image.mjs";import{Box as n}from"../../../../ui/box.mjs";import{Dialog as r,DialogContent as i}from"../../../../ui/dialog.mjs";import a from"../../../../ui/link.mjs";import{adaptPopupAdMaterials as o,hasMatchedAds as s}from"../ad-match.mjs";import{useAdProvider as c}from"../ad-provider.mjs";import{useEffect as l,useMemo as u,useRef as d,useState as f}from"react";import{jsx as p,jsxs as m}from"react/jsx-runtime";const h=[{id:`popup-ad-1`,title:`弹窗广告标题`,jumpUrl:`/search`,materialUrl:`/static/components-resource/banner.png`,desc:`这里是弹窗广告描述`}];function g(e,t){return Array.isArray(e)&&e.length>0?e:t??[]}function _({items:_,mode:v=`renderer`}){let y=c(),b=u(()=>s(y?.matchData)?o(y?.matchData):v===`editor`?g(_,h):_??[],[y?.matchData,v,_]),[x,S]=f(0),[C,w]=f(!1),T=d(null);l(()=>{S(0)},[b]),l(()=>{w(!1)},[x,b]),l(()=>()=>{T.current&&window.clearTimeout(T.current)},[]);let E=b[x];function D(){S(e=>e+1)}function O(){C||(w(!0),T.current&&window.clearTimeout(T.current),T.current=window.setTimeout(()=>{T.current=null,D()},260))}function k(e){e||O()}return E?p(r,{open:!0,onOpenChange:k,disablePointerDismissal:!0,children:m(i,{showCloseButton:!1,className:`w-[320px] max-w-[calc(100vw-32px)] border-none bg-transparent p-0 shadow-none`,children:[m(n,{className:`flex flex-col items-center gap-[24px]`,style:{animation:C?`funhub-popup-ad-exit 260ms cubic-bezier(0.4, 0, 0.2, 1) both`:`funhub-popup-ad-enter 420ms cubic-bezier(0.2, 0.9, 0.2, 1) both, funhub-popup-ad-float 3.2s ease-in-out 420ms infinite`,transformOrigin:`center bottom`},children:[p(a,{href:E.jumpUrl,className:`block w-full overflow-hidden rounded-[20px] bg-[#434343]`,style:{boxShadow:`0 18px 48px rgba(0, 0, 0, 0.26)`},children:p(n,{className:`w-full overflow-hidden bg-[#434343]`,children:p(t,{src:E.materialUrl,alt:E.title||`弹窗广告`,width:1200,height:1600,className:`block w-full h-auto`,unoptimized:!0})})}),p(e,{type:`button`,"aria-label":`关闭弹窗广告`,variant:`ghost`,size:`icon-lg`,className:`relative h-[54px] w-[54px] rounded-full border-[3px] border-white bg-transparent p-0 text-white hover:bg-white/8`,onClick:O,style:{animation:C?`funhub-popup-ad-close-exit 260ms ease-out both`:`funhub-popup-ad-close-breathe 2.4s ease-in-out 480ms infinite`},children:m(n,{className:`relative h-[24px] w-[24px]`,children:[p(n,{className:`absolute left-1/2 top-1/2 h-[4px] w-full -translate-x-1/2 -translate-y-1/2 rotate-45 rounded-full bg-current`}),p(n,{className:`absolute left-1/2 top-1/2 h-[4px] w-full -translate-x-1/2 -translate-y-1/2 -rotate-45 rounded-full bg-current`})]})})]},E.id),p(`style`,{children:`
3
3
  @keyframes funhub-popup-ad-enter {
4
4
  0% {
5
5
  opacity: 0;
@@ -56,9 +56,9 @@
56
56
  }
57
57
 
58
58
  @media (prefers-reduced-motion: reduce) {
59
- :global(*) {
59
+ * {
60
60
  animation-duration: 0ms !important;
61
61
  animation-iteration-count: 1 !important;
62
62
  }
63
63
  }
64
- `})]})}):null}export{h as PopupAd};
64
+ `})]})}):null}export{_ as PopupAd};
@@ -1,5 +1,5 @@
1
1
 
2
- import { PopupAdInspectorProps, PopupAdItem, PopupAdProps, popupAdInspectorDefaultProps, popupAdInspectorPropsSchema } from "./schema.mjs";
2
+ import { PopupAdBaseProps, PopupAdInspectorProps, PopupAdItem, PopupAdProps, popupAdInspectorDefaultProps, popupAdInspectorPropsSchema } from "./schema.mjs";
3
3
  import { PopupAd } from "./client.mjs";
4
4
  import { PopupAdServer } from "./server.mjs";
5
5
  import { popupAdMaterial } from "./material.mjs";
@@ -12,13 +12,13 @@ import * as zod_v4_core0 from "zod/v4/core";
12
12
  * 弹窗广告物料定义。
13
13
  */
14
14
  declare const popupAdMaterial: DefineMaterialOption<typeof PopupAdServer, typeof PopupAd, zod.ZodObject<{
15
- readonly items: zod.ZodArray<zod.ZodObject<{
15
+ readonly items: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
16
16
  id: zod.ZodString & SchemaHasDefaultValue;
17
17
  title: zod.ZodOptional<zod.ZodString> & SchemaHasDefaultValue;
18
18
  jumpUrl: zod.ZodString & SchemaHasDefaultValue;
19
19
  materialUrl: zod.ZodString & SchemaHasDefaultValue;
20
20
  desc: zod.ZodOptional<zod.ZodString> & SchemaHasDefaultValue;
21
- }, zod_v4_core0.$strip>> & SchemaHasDefaultValue;
21
+ }, zod_v4_core0.$strip>>>;
22
22
  } & {
23
23
  mode: zod.ZodOptional<zod.ZodEnum<{
24
24
  renderer: "renderer";
@@ -19,36 +19,37 @@ interface PopupAdItem {
19
19
  * 弹窗广告物料属性。
20
20
  */
21
21
  declare const popupAdInspectorPropsSchema: z$1.ZodObject<{
22
- readonly items: z$1.ZodArray<z$1.ZodObject<{
22
+ readonly items: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
23
23
  id: z$1.ZodString & SchemaHasDefaultValue;
24
24
  title: z$1.ZodOptional<z$1.ZodString> & SchemaHasDefaultValue;
25
25
  jumpUrl: z$1.ZodString & SchemaHasDefaultValue;
26
26
  materialUrl: z$1.ZodString & SchemaHasDefaultValue;
27
27
  desc: z$1.ZodOptional<z$1.ZodString> & SchemaHasDefaultValue;
28
- }, z$1.core.$strip>> & SchemaHasDefaultValue;
28
+ }, z$1.core.$strip>>>;
29
29
  } & {
30
30
  mode: z$1.ZodOptional<z$1.ZodEnum<{
31
31
  renderer: "renderer";
32
32
  editor: "editor";
33
33
  }>>;
34
34
  }, z$1.core.$strip>;
35
- declare const popupAdInspectorDefaultProps: {
36
- readonly items: {
37
- id: string;
38
- jumpUrl: string;
39
- materialUrl: string;
40
- title?: string | undefined;
41
- desc?: string | undefined;
42
- }[];
43
- };
35
+ declare const popupAdInspectorDefaultProps: {};
44
36
  type PopupAdInspectorProps<T extends object = object> = InferSchemaProps<typeof popupAdInspectorPropsSchema> & T;
45
37
  /**
46
38
  * 弹窗广告组件 props。
47
39
  */
48
- type PopupAdProps = PopupAdInspectorProps<{
40
+ interface PopupAdBaseProps {
41
+ /**
42
+ * 广告列表。
43
+ */
44
+ items?: PopupAdItem[];
45
+ }
46
+ /**
47
+ * 弹窗广告组件 props。
48
+ */
49
+ type PopupAdProps = Omit<PopupAdInspectorProps<{
49
50
  mode?: MaterialComponentMode;
50
51
  componentId?: string;
51
52
  sceneContext?: AdsMatchSceneContext;
52
- }>;
53
+ }>, 'items'> & PopupAdBaseProps;
53
54
  //#endregion
54
- export { PopupAdInspectorProps, PopupAdItem, PopupAdProps, popupAdInspectorDefaultProps, popupAdInspectorPropsSchema };
55
+ export { PopupAdBaseProps, PopupAdInspectorProps, PopupAdItem, PopupAdProps, popupAdInspectorDefaultProps, popupAdInspectorPropsSchema };
@@ -1,2 +1,2 @@
1
1
 
2
- import{defineComponentPropsSchema as e,getSchemaDefaultProps as t}from"../../../../../utils/schema/schema.mjs";import n from"zod";const r=e(e=>({items:e.array(n.object({id:e.string(`popup-ad-1`,{label:`广告 ID`,required:!0}),title:e.string(`弹窗广告标题`,{label:`标题`,required:!1}),jumpUrl:e.string(`/search`,{label:`跳转链接`,required:!0}),materialUrl:e.string(`/static/components-resource/banner.png`,{label:`素材地址`,required:!0}),desc:e.string(`这里是弹窗广告描述`,{label:`描述`,required:!1})}),{label:`广告列表`,required:!0,defaultValue:[{id:`popup-ad-1`,title:`弹窗广告标题`,jumpUrl:`/search`,materialUrl:`/static/components-resource/banner.png`,desc:`这里是弹窗广告描述`}]})})),i=t(r);export{i as popupAdInspectorDefaultProps,r as popupAdInspectorPropsSchema};
2
+ import{defineComponentPropsSchema as e,getSchemaDefaultProps as t}from"../../../../../utils/schema/schema.mjs";import n from"zod";const r=e(e=>({items:e.array(n.object({id:e.string(`popup-ad-1`,{label:`广告 ID`,required:!0}),title:e.string(`弹窗广告标题`,{label:`标题`,required:!1}),jumpUrl:e.string(`/search`,{label:`跳转链接`,required:!0}),materialUrl:e.string(`/static/components-resource/banner.png`,{label:`素材地址`,required:!0}),desc:e.string(`这里是弹窗广告描述`,{label:`描述`,required:!1})}),{label:`广告列表`,required:!1})})),i=t(r);export{i as popupAdInspectorDefaultProps,r as popupAdInspectorPropsSchema};
@@ -1,2 +1,2 @@
1
1
 
2
- "use client";import{useRouter as e}from"../../../../../utils/use-compatible-router.mjs";import{Box as t}from"../../../../ui/box.mjs";import{Text as n}from"../../../../ui/text.mjs";import{adaptTextAdProps as r,hasMatchedAds as i}from"../ad-match.mjs";import{useAdProvider as a}from"../ad-provider.mjs";import{useEffect as o,useMemo as s,useState as c}from"react";import{jsx as l,jsxs as u}from"react/jsx-runtime";const d=`text_ad_list`;let f=null;function p(e,t){if(!e)return!1;if(t===`once`)return!0;let n=new Date(e),r=new Date;return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()&&n.getDate()===r.getDate()}function m(e,t){return p(e.closedAt,t)}function h(){if(f)return f;if(typeof window>`u`)return{};let e=window.localStorage.getItem(d);if(!e)return f={},{};try{let t=JSON.parse(e);return f=t&&typeof t==`object`?t:{},f}catch{return f={},{}}}function g(e){f=e,!(typeof window>`u`)&&window.localStorage.setItem(d,JSON.stringify(e))}function _(e){return h()[e]??{}}function v(e,t){g({...h(),[e]:t})}function y({displayCount:d,items:f,mode:p=`renderer`}){let h=a(),g=e(),y=p===`editor`,[b,x]=c(!1),[S,C]=c(y),[w,T]=c(y),E=s(()=>i(h?.matchData)?r(h?.matchData):{displayCount:d,items:f},[h?.matchData,d,f]),D=s(()=>{let e=E.items.filter(e=>e.text?.trim());return typeof E.displayCount==`number`?e.slice(0,Math.max(E.displayCount,0)):e},[E]),O=D[0],k=s(()=>D.map(e=>`${e.text}:${e.jumpUrl||``}`).join(`|`),[D]);if(o(()=>{x(!0)},[]),o(()=>{if(b){if(y){C(!0),T(!0);return}if(!k||!O){C(!1),T(!0);return}C(!m(_(k),`daily`)),T(!0)}},[O,y,b,k]),!O||!y&&(!b||!w||!S))return null;function A(){k&&v(k,{..._(k),closedAt:Date.now()})}function j(e){e.jumpUrl&&g.push(e.jumpUrl)}function M(e){e.stopPropagation(),C(!1),A()}function N(){y||(C(!1),A(),j(O))}return l(t,{className:`w-full`,style:{backgroundColor:`#131313`,padding:`8px 16px`},children:u(t,{className:`relative flex w-full items-center justify-between overflow-hidden cursor-pointer`,style:{minHeight:`40px`,backgroundColor:`#FFE7E7`,padding:`0 8px`},onClick:N,children:[u(t,{className:`flex min-w-0 items-center`,style:{gap:`8px`,width:`280px`},children:[l(t,{className:`shrink-0`,style:{padding:`4px 8px`,borderRadius:`8px`,backgroundColor:`rgba(0, 0, 0, 0.33)`},children:l(n,{className:`flex h-full items-center justify-center text-white`,style:{fontSize:`12px`,lineHeight:`normal`,fontWeight:400},children:`广告`})}),l(n,{className:`truncate`,style:{flex:`1 0 0`,color:`#FD4C5E`,fontSize:`14px`,lineHeight:`normal`,fontWeight:400},children:O.text})]}),u(t,{className:`flex shrink-0 items-center`,style:{gap:`6px`,width:`54px`},children:[l(t,{className:`flex shrink-0 items-center justify-center`,style:{width:`20px`,height:`34px`},children:l(`svg`,{width:`10`,height:`17`,viewBox:`0 0 10 17`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,children:l(`path`,{d:`M1 1L8.5 8.5L1 16`,stroke:`#FD4C5E`,strokeWidth:`1.8`,strokeLinecap:`round`,strokeLinejoin:`round`})})}),u(`button`,{type:`button`,"aria-label":`关闭文字广告`,className:`relative shrink-0 border-none p-0`,style:{width:`17px`,height:`17px`,borderRadius:`999px`,backgroundColor:`#F9A9AE`},onClick:M,children:[l(t,{className:`absolute left-1/2 top-1/2`,style:{width:`9px`,height:`2px`,borderRadius:`999px`,backgroundColor:`#FFFFFF`,transform:`translate(-50%, -50%) rotate(45deg)`}}),l(t,{className:`absolute left-1/2 top-1/2`,style:{width:`9px`,height:`2px`,borderRadius:`999px`,backgroundColor:`#FFFFFF`,transform:`translate(-50%, -50%) rotate(-45deg)`}})]})]})]})})}export{y as TextAd};
2
+ "use client";import{useRouter as e}from"../../../../../utils/use-compatible-router.mjs";import{Box as t}from"../../../../ui/box.mjs";import{Text as n}from"../../../../ui/text.mjs";import{adaptTextAdProps as r,hasMatchedAds as i}from"../ad-match.mjs";import{useAdProvider as a}from"../ad-provider.mjs";import{textAdInspectorDefaultProps as o}from"./schema.mjs";import{useEffect as s,useMemo as c,useState as l}from"react";import{jsx as u,jsxs as d}from"react/jsx-runtime";const f=`text_ad_list`,p=[{text:`这是第一条文字广告`,jumpUrl:`/search`},{text:`这是第二条文字广告`,jumpUrl:`/search`},{text:`这是第三条文字广告`,jumpUrl:`/search`},{text:`这是第四条文字广告`,jumpUrl:`/search`},{text:`这是第五条文字广告`,jumpUrl:`/search`}];let m=null;function h(e,t){return Array.isArray(e)&&e.length>0?e:t??[]}function g(e,t){return typeof e==`number`&&e>0?e:t}function _(e,t){if(!e)return!1;if(t===`once`)return!0;let n=new Date(e),r=new Date;return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()&&n.getDate()===r.getDate()}function v(e,t){return _(e.closedAt,t)}function y(){if(m)return m;if(typeof window>`u`)return{};let e=window.localStorage.getItem(f);if(!e)return m={},{};try{let t=JSON.parse(e);return m=t&&typeof t==`object`?t:{},m}catch{return m={},{}}}function b(e){m=e,!(typeof window>`u`)&&window.localStorage.setItem(f,JSON.stringify(e))}function x(e){return y()[e]??{}}function S(e,t){b({...y(),[e]:t})}function C({displayCount:f,items:m,mode:_=`renderer`}){let y=_===`editor`?{displayCount:g(f,o.displayCount),items:h(m,p)}:{displayCount:f,items:m},b=a(),C=e(),w=_===`editor`,[T,E]=l(!1),[D,O]=l(w),[k,A]=l(w),[j,M]=l(0),[N,P]=l(`idle`),F=c(()=>i(b?.matchData)?r(b?.matchData):{displayCount:y.displayCount,items:y.items??[]},[b?.matchData,y.displayCount,y.items]),I=c(()=>{let e=F.items.filter(e=>e.text?.trim());return typeof F.displayCount==`number`?e.slice(0,Math.max(F.displayCount,0)):e},[F]),L=I[j],R=(j+1)%Math.max(I.length,1),z=I.length>1?I[R]:null,B=c(()=>I.map(e=>`${e.text}:${e.jumpUrl||``}`).join(`|`),[I]);if(s(()=>{E(!0)},[]),s(()=>{if(T){if(w){O(!0),A(!0);return}if(!B||!L){O(!1),A(!0);return}O(!v(x(B),`daily`)),A(!0)}},[L,w,T,B]),s(()=>{M(0),P(`idle`)},[B]),s(()=>{if(!D||I.length<=1)return;let e=setInterval(()=>{P(`animating`)},3e3);return()=>clearInterval(e)},[D,I.length]),s(()=>{if(N!==`animating`)return;let e=setTimeout(()=>{M(e=>(e+1)%I.length),P(`idle`)},350);return()=>clearTimeout(e)},[N,I.length]),!L||!w&&(!T||!k||!D))return null;function V(){B&&S(B,{...x(B),closedAt:Date.now()})}function H(e){e.jumpUrl&&C.push(e.jumpUrl)}function U(e){e.stopPropagation(),O(!1),V()}function W(){w||(O(!1),V(),H(L))}return u(t,{className:`w-full`,style:{backgroundColor:`#131313`,padding:`8px 16px`},children:d(t,{className:`relative flex w-full items-center justify-between overflow-hidden cursor-pointer`,style:{minHeight:`40px`,backgroundColor:`#FFE7E7`,padding:`0 8px`},onClick:W,children:[d(t,{className:`flex min-w-0 items-center`,style:{gap:`8px`,width:`280px`},children:[u(t,{className:`shrink-0`,style:{padding:`4px 8px`,borderRadius:`8px`,backgroundColor:`rgba(0, 0, 0, 0.33)`},children:u(n,{className:`flex h-full items-center justify-center text-white`,style:{fontSize:`12px`,lineHeight:`normal`,fontWeight:400},children:`广告`})}),d(t,{className:`relative overflow-hidden`,style:{flex:`1 0 0`,height:`20px`},children:[u(n,{className:`absolute w-full truncate`,style:{color:`#FD4C5E`,fontSize:`14px`,lineHeight:`20px`,fontWeight:400,transform:N===`animating`?`translateY(-100%)`:`translateY(0)`,transition:N===`animating`?`transform 0.35s ease, opacity 0.35s ease`:`none`,opacity:N===`animating`?0:1},children:L.text}),z&&u(n,{className:`absolute w-full truncate`,style:{color:`#FD4C5E`,fontSize:`14px`,lineHeight:`20px`,fontWeight:400,transform:N===`animating`?`translateY(0)`:`translateY(100%)`,transition:N===`animating`?`transform 0.35s ease, opacity 0.35s ease`:`none`,opacity:N===`animating`?1:0},children:z.text})]})]}),d(t,{className:`flex shrink-0 items-center`,style:{gap:`6px`,width:`54px`},children:[u(t,{className:`flex shrink-0 items-center justify-center`,style:{width:`20px`,height:`34px`},children:u(`svg`,{width:`10`,height:`17`,viewBox:`0 0 10 17`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,children:u(`path`,{d:`M1 1L8.5 8.5L1 16`,stroke:`#FD4C5E`,strokeWidth:`1.8`,strokeLinecap:`round`,strokeLinejoin:`round`})})}),d(`button`,{type:`button`,"aria-label":`关闭文字广告`,className:`relative shrink-0 border-none p-0`,style:{width:`17px`,height:`17px`,borderRadius:`999px`,backgroundColor:`#F9A9AE`},onClick:U,children:[u(t,{className:`absolute left-1/2 top-1/2`,style:{width:`9px`,height:`2px`,borderRadius:`999px`,backgroundColor:`#FFFFFF`,transform:`translate(-50%, -50%) rotate(45deg)`}}),u(t,{className:`absolute left-1/2 top-1/2`,style:{width:`9px`,height:`2px`,borderRadius:`999px`,backgroundColor:`#FFFFFF`,transform:`translate(-50%, -50%) rotate(-45deg)`}})]})]})]})})}export{C as TextAd};
@@ -13,10 +13,11 @@ import * as zod_v4_core0 from "zod/v4/core";
13
13
  */
14
14
  declare const textAdMaterial: DefineMaterialOption<typeof TextAdServer, typeof TextAd, zod.ZodObject<{
15
15
  readonly displayCount: zod.ZodNumber & SchemaHasDefaultValue;
16
+ readonly default_advertise_location_code: zod.ZodString & SchemaHasDefaultValue;
16
17
  readonly items: zod.ZodArray<zod.ZodObject<{
17
18
  text: zod.ZodString & SchemaHasDefaultValue;
18
19
  jumpUrl: zod.ZodOptional<zod.ZodString> & SchemaHasDefaultValue;
19
- }, zod_v4_core0.$strip>> & SchemaHasDefaultValue;
20
+ }, zod_v4_core0.$strip>>;
20
21
  } & {
21
22
  mode: zod.ZodOptional<zod.ZodEnum<{
22
23
  renderer: "renderer";
@@ -1,2 +1,2 @@
1
1
 
2
- import{defineMaterial as e}from"../../../../../utils/schema/material.mjs";import{TextAd as t}from"./client.mjs";import{textAdInspectorPropsSchema as n}from"./schema.mjs";import{TextAdServer as r}from"./server.mjs";const i=e({type:`text-ad`,name:`文字广告`,icon:`/static/components-thumb/marquee_clickable_closable.png`,category:`广告组件`,serverComponent:r,clientComponent:t,propsSchema:n});export{i as textAdMaterial};
2
+ import{defineMaterial as e}from"../../../../../utils/schema/material.mjs";import{textAdInspectorPropsSchema as t}from"./schema.mjs";import{TextAd as n}from"./client.mjs";import{TextAdServer as r}from"./server.mjs";const i=e({type:`text-ad`,name:`文字广告`,icon:`/static/components-thumb/marquee_clickable_closable.png`,category:`广告组件`,serverComponent:r,clientComponent:n,propsSchema:t});export{i as textAdMaterial};
@@ -23,10 +23,11 @@ interface TextAdItem {
23
23
  */
24
24
  declare const textAdInspectorPropsSchema: z$1.ZodObject<{
25
25
  readonly displayCount: z$1.ZodNumber & SchemaHasDefaultValue;
26
+ readonly default_advertise_location_code: z$1.ZodString & SchemaHasDefaultValue;
26
27
  readonly items: z$1.ZodArray<z$1.ZodObject<{
27
28
  text: z$1.ZodString & SchemaHasDefaultValue;
28
29
  jumpUrl: z$1.ZodOptional<z$1.ZodString> & SchemaHasDefaultValue;
29
- }, z$1.core.$strip>> & SchemaHasDefaultValue;
30
+ }, z$1.core.$strip>>;
30
31
  } & {
31
32
  mode: z$1.ZodOptional<z$1.ZodEnum<{
32
33
  renderer: "renderer";
@@ -35,10 +36,7 @@ declare const textAdInspectorPropsSchema: z$1.ZodObject<{
35
36
  }, z$1.core.$strip>;
36
37
  declare const textAdInspectorDefaultProps: {
37
38
  readonly displayCount: number;
38
- readonly items: {
39
- text: string;
40
- jumpUrl?: string | undefined;
41
- }[];
39
+ readonly default_advertise_location_code: string;
42
40
  };
43
41
  type TextAdInspectorProps<T extends object = object> = InferSchemaProps<typeof textAdInspectorPropsSchema> & T;
44
42
  /**
@@ -1,2 +1,2 @@
1
1
 
2
- import{defineComponentPropsSchema as e,getSchemaDefaultProps as t}from"../../../../../utils/schema/schema.mjs";import n from"zod";const r=e(e=>({displayCount:e.number(1,{label:`广告展示数量选择`,required:!0}).refine(e=>e>=1&&e<=5,`广告展示数量必须为 1-5`),items:e.array(n.object({text:e.string(`请输入广告文案`,{label:`广告文案`,required:!0}),jumpUrl:e.string(``,{label:`跳转链接`,required:!1})}),{label:`广告列表`,required:!0,defaultValue:[{text:`这是第一条文字广告`,jumpUrl:`/search`},{text:`这是第二条文字广告`,jumpUrl:`/search`}]})})),i=t(r);export{i as textAdInspectorDefaultProps,r as textAdInspectorPropsSchema};
2
+ import{defineComponentPropsSchema as e,getSchemaDefaultProps as t}from"../../../../../utils/schema/schema.mjs";import n from"zod";const r=e(e=>({displayCount:e.number(1,{label:`广告展示数量选择`,required:!0}).refine(e=>e>=1&&e<=5,`广告展示数量必须为 1-5`),default_advertise_location_code:e.string(``,{label:`广告标识`,required:!0}),items:e.array(n.object({text:e.string(`请输入广告文案`,{label:`广告文案`,required:!0}),jumpUrl:e.string(``,{label:`跳转链接`,required:!1})}),{label:`广告列表`,required:!0})})),i=t(r);export{i as textAdInspectorDefaultProps,r as textAdInspectorPropsSchema};
@@ -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{buildVideoPlayerSrc as n}from"../../../../common/video-player/process-m3u8-cache.mjs";import{notifyBridgeEpisodeChanged as r}from"../../../../../utils/login-modal-bridge.mjs";import{useRequest as i}from"../../../../../hooks/query/use-query.mjs";import{useKeepAliveState as a}from"../../../../common/keep-scroll-position/index.mjs";import{createContext as o,use as s,useCallback as c,useEffect as l,useMemo as u}from"react";import{jsx as d}from"react/jsx-runtime";import{useParams as f}from"next/navigation";const p=o(void 0),m=`funhub:video-detail-episode-sync`;function h(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 g(e){let t=Math.floor(Number(e)||1);return t>0?t:1}function _(e){typeof window>`u`||window.dispatchEvent(new CustomEvent(m,{detail:e}))}function v(e){return e.type===m&&e instanceof CustomEvent}function y(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 b({value:e,children:t}){let n=s(p);return d(p,{value:u(()=>y(n,e)??e,[n,e]),children:t})}function x(){let e=s(p),t=e!==void 0&&e.onEpisodeChange===void 0,n=S({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:t||!e?.information});return u(()=>{let r=y(e,n);return r&&(e&&n&&t?{...r,information:n.information??r.information,currentSeriesNum:n.currentSeriesNum??r.currentSeriesNum,episodeIndex:n.episodeIndex??r.episodeIndex,onEpisodeChange:n.onEpisodeChange??r.onEpisodeChange,isInformationLoading:n.isInformationLoading??r.isInformationLoading,isInformationResolved:n.isInformationResolved??r.isInformationResolved}:r)},[e,n,t])}function S(o){let{enabled:s,shouldRequestInformation:d}=o,p=f(),y=t(),b=p.level,x=Array.isArray(b)?b:typeof b==`string`?[b]:[],S=x[0]||``,C=x.findIndex(e=>e===`episode`),w=C>=0?x[C+1]:x[2],T=Math.max(1,Number(w)||1),[E,D]=a(`video-detail-material-series-num-${S}`,T);l(()=>{D(T)},[T,D]),l(()=>{if(!S||typeof window>`u`)return;let e=e=>{if(!v(e))return;let t=e.detail;if(!t||t.detailId!==S)return;let n=g(t.seriesNum);D(e=>e===n?e:n)};return window.addEventListener(m,e),()=>{window.removeEventListener(m,e)}},[S,D]);let O=c(e=>{if(!S)return;let t=g(e);D(t),_({detailId:S,seriesNum:t})},[S,D]),k=Math.max(1,Number(E)||1),A=Math.max(0,k-1),j=x[1]||``,M=typeof window<`u`&&window.isWebView===!0,{data:N,isPending:P,isFetching:F,isError:I,isSuccess:L}=i([`video-detail`,S],async()=>S?await e({id:S}):null,{enabled:s&&d&&!!S}),R=u(()=>{let e=N?.data?.video;if(!(!e||typeof e!=`object`))return{...e,content_type:1,episode_cnt:e.links?.length||0}},[N?.data?.video]),z=c(e=>{let t=Math.max(1,Math.floor(Number(e)||1));if(!S||typeof window>`u`)return;let i=`/${M?`webview`:`video`}/${S}/${encodeURIComponent(j)}/episode/${t}`,{search:a,hash:o,pathname:s}=window.location,c=`${s}${a}${o}`,l=`${i}${a}${o}`,u=h(s,S);if(c!==l){if(M){let e=R?.links?.[Math.max(0,t-1)],i=n(String(e?.m3u8_url||e?.preview_m3u8_url||``).trim());r({poster:String(R?.img_y||R?.img_x||R?.preview_images?.[0]||``).trim(),src:i,title:String(R?.title||R?.name||``).trim(),contentId:S,episode:t}),k!==t&&O(t);return}u&&typeof window.history?.replaceState==`function`?(window.history.replaceState(window.history.state,``,l),O(t)):y.replace(l,{scroll:!1});return}k!==t&&O(t)},[k,S,R?.img_x,R?.img_y,R?.links,R?.name,R?.preview_images,R?.title,M,j,y,O]);if(l(()=>{let e=Array.isArray(R?.links)?R.links.length:0;e<=0||k<=e||z(1)},[k,R?.links,z]),s)return{information:R,currentSeriesNum:k,onEpisodeChange:z,detailId:S,episodeIndex:A,resumeProgressSeconds:0,isShow:!0,isWebView:M,isInformationLoading:d?!!S&&!R&&(P||F):!1,isInformationResolved:!S||!!R||!d||I||L}}export{b as VideoDetailMaterialRuntimeProvider,x 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{buildVideoPlayerSrc as n}from"../../../../common/video-player/process-m3u8-cache.mjs";import{notifyBridgeEpisodeChanged as r}from"../../../../../utils/login-modal-bridge.mjs";import{useRequest as i}from"../../../../../hooks/query/use-query.mjs";import{useKeepAliveState as a}from"../../../../common/keep-scroll-position/index.mjs";import{createContext as o,use as s,useCallback as c,useEffect as l,useMemo as u}from"react";import{jsx as d}from"react/jsx-runtime";import{useParams as f}from"next/navigation";const p=o(void 0),m=`funhub:video-detail-episode-sync`;function h(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 g(e){let t=Math.floor(Number(e)||1);return t>0?t:1}function _(e){typeof window>`u`||window.dispatchEvent(new CustomEvent(m,{detail:e}))}function v(e){return e.type===m&&e instanceof CustomEvent}function y(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,playerRef:e?.playerRef??t?.playerRef}}function b({value:e,children:t}){let n=s(p);return d(p,{value:u(()=>y(n,e)??e,[n,e]),children:t})}function x(){let e=s(p),t=e!==void 0&&e.onEpisodeChange===void 0,n=S({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:t||!e?.information});return u(()=>{let r=y(e,n);return r&&(e&&n&&t?{...r,information:n.information??r.information,currentSeriesNum:n.currentSeriesNum??r.currentSeriesNum,episodeIndex:n.episodeIndex??r.episodeIndex,onEpisodeChange:n.onEpisodeChange??r.onEpisodeChange,isInformationLoading:n.isInformationLoading??r.isInformationLoading,isInformationResolved:n.isInformationResolved??r.isInformationResolved}:r)},[e,n,t])}function S(o){let{enabled:s,shouldRequestInformation:d}=o,p=f(),y=t(),b=p.level,x=Array.isArray(b)?b:typeof b==`string`?[b]:[],S=x[0]||``,C=x.findIndex(e=>e===`episode`),w=C>=0?x[C+1]:x[2],T=Math.max(1,Number(w)||1),[E,D]=a(`video-detail-material-series-num-${S}`,T);l(()=>{D(T)},[T,D]),l(()=>{if(!S||typeof window>`u`)return;let e=e=>{if(!v(e))return;let t=e.detail;if(!t||t.detailId!==S)return;let n=g(t.seriesNum);D(e=>e===n?e:n)};return window.addEventListener(m,e),()=>{window.removeEventListener(m,e)}},[S,D]);let O=c(e=>{if(!S)return;let t=g(e);D(t),_({detailId:S,seriesNum:t})},[S,D]),k=Math.max(1,Number(E)||1),A=Math.max(0,k-1),j=x[1]||``,M=typeof window<`u`&&window.isWebView===!0,{data:N,isPending:P,isFetching:F,isError:I,isSuccess:L}=i([`video-detail`,S],async()=>S?await e({id:S}):null,{enabled:s&&d&&!!S}),R=u(()=>{let e=N?.data?.video;if(!(!e||typeof e!=`object`))return{...e,content_type:1,episode_cnt:e.links?.length||0}},[N?.data?.video]),z=c(e=>{let t=Math.max(1,Math.floor(Number(e)||1));if(!S||typeof window>`u`)return;let i=`/${M?`webview`:`video`}/${S}/${encodeURIComponent(j)}/episode/${t}`,{search:a,hash:o,pathname:s}=window.location,c=`${s}${a}${o}`,l=`${i}${a}${o}`,u=h(s,S);if(c!==l){if(M){let e=R?.links?.[Math.max(0,t-1)],i=n(String(e?.m3u8_url||e?.preview_m3u8_url||``).trim());r({poster:String(R?.img_y||R?.img_x||R?.preview_images?.[0]||``).trim(),src:i,title:String(R?.title||R?.name||``).trim(),contentId:S,episode:t}),k!==t&&O(t);return}u&&typeof window.history?.replaceState==`function`?(window.history.replaceState(window.history.state,``,l),O(t)):y.replace(l,{scroll:!1});return}k!==t&&O(t)},[k,S,R?.img_x,R?.img_y,R?.links,R?.name,R?.preview_images,R?.title,M,j,y,O]);if(l(()=>{let e=Array.isArray(R?.links)?R.links.length:0;e<=0||k<=e||z(1)},[k,R?.links,z]),s)return{information:R,currentSeriesNum:k,onEpisodeChange:z,detailId:S,episodeIndex:A,resumeProgressSeconds:0,isShow:!0,isWebView:M,isInformationLoading:d?!!S&&!R&&(P||F):!1,isInformationResolved:!S||!!R||!d||I||L}}export{b as VideoDetailMaterialRuntimeProvider,x as useVideoDetailMaterialRuntimeContext};
@@ -1,2 +1,2 @@
1
1
 
2
- "use client";import{cn as e}from"../../../../../utils/cn.mjs";import{pxToVw as t}from"../../../../../utils/helper.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{useBrowseReport as a}from"../../../../../hooks/use-browse-report.mjs";import{MediaPreview as o,useMediaPreview as s}from"../../../../common/media-preview/index.mjs";import c from"../../../../common/video-player/index.mjs";import{UserActivityMediaGrid as l}from"../../../../common/list/user-activity-list/user-activity-list-item.mjs";import{memo as u,useCallback as d,useEffect as f,useMemo as p,useRef as m}from"react";import{Fragment as h,jsx as g,jsxs as _}from"react/jsx-runtime";import{useTranslations as v}from"next-intl";const y=u(({mode:t=`renderer`,information:n,isVideo:a,episodeIndex:c=0,resumeProgressSeconds:u=0,className:f=``})=>{let m=t===`editor`,h=p(()=>({id:n.id,name:n.name,preview_images:n.preview_images,img_y:n.img_y,img_x:n.img_x}),[n.id,n.name,n.preview_images,n.img_y,n.img_x]),v=p(()=>{let e=n?.medias,t=Array.isArray(e)?e.filter(Boolean):[];return t.length>0?t:(h.preview_images?.length?h.preview_images:[h.img_y||h.img_x||``].filter(Boolean)).filter(Boolean).map(e=>({media_url:e,is_video:!1,cover_image:``}))},[h.img_x,h.img_y,h.preview_images,n]),y=s(),x=p(()=>v.filter(Boolean).map(e=>{let t=e?.is_video?`video`:`image`,r=String(e?.media_url||``),i=e?.cover_image||n.img_y||n.img_x;return{src:r,type:t,...i?{cover:String(i)}:{}}}).filter(e=>!!e.src),[n.img_x,n.img_y,v]),S=d(e=>{m||!x.length||y.open(x,e)},[m,y,x]);return m?g(`img`,{src:`/static/components-thumb/video_player.png`,alt:`video-preview`,className:`w-full block`}):a?g(b,{information:n,episodeIndex:c,resumeProgressSeconds:u,isEditor:m}):_(`div`,{className:e(`w-full`,f),children:[_(r,{className:`mt-3 px-[12px] space-y-1`,children:[g(i,{as:`p`,className:`break-all`,dangerouslySetInnerHTML:{__html:n.description}}),g(l,{medias:v,onItemClick:S})]}),g(o,{})]})});y.displayName=`DetailHero`;const b=u(({information:e,episodeIndex:t,resumeProgressSeconds:n,isEditor:r})=>{let i=p(()=>({id:e.id,mid:e.mid,img_width:e.img_width,img_height:e.img_height,img_y:e.img_y,img_x:e.img_x,preview_images:e.preview_images}),[e.id,e.mid,e.img_width,e.img_height,e.img_y,e.img_x,e.preview_images]);return g(x,{information:{...e,...i},episodeIndex:t,resumeProgressSeconds:n,isEditor:r})},(e,t)=>{let n=e.information,r=t.information;return n.id===r.id&&n.mid===r.mid&&n.img_width===r.img_width&&n.img_height===r.img_height&&n.img_y===r.img_y&&n.img_x===r.img_x&&e.resumeProgressSeconds===t.resumeProgressSeconds&&e.episodeIndex===t.episodeIndex&&e.isEditor===t.isEditor});b.displayName=`StableDetailPlayerBox`;function x({information:e,episodeIndex:i,resumeProgressSeconds:o,isEditor:s}){let l=v(`components.biz.business.detail`),u=m(0),y=m(0),b=Math.max(0,Number(i)||0),x=b+1,T=p(()=>e?.id,[e?.id]),E=p(()=>({id:e.id,mid:e.mid,img_width:e.img_width,img_height:e.img_height,img_y:e.img_y,img_x:e.img_x,preview_images:e.preview_images,links:e.links}),[e.id,e.mid,e.img_width,e.img_height,e.img_y,e.img_x,e.preview_images,e.links]),D=p(()=>E.mid||E.id,[E.id,E.mid]),O=p(()=>{let e=E.links?.[b]?.id;return e?String(e):`ep-${b+1}`},[b,E.links]),k=p(()=>`__reportData_detail_page__${E.id}:${O}`,[O,E.id]),A=p(()=>{if(s||typeof window>`u`)return 0;try{let e=sessionStorage.getItem(k);if(!e)return 0;let t=JSON.parse(e),n=Number(t.currentTime||0),r=Number(t.duration||0);if(!Number.isFinite(n)||!Number.isFinite(r))return 0;if(n>0&&r>0)return n}catch(e){console.error(`读取 sessionStorage 数据失败:`,e)}return 0},[s,k]),j=p(()=>{let e=Number(o||0);return Number.isFinite(e)&&e>0?e:0},[o]),M=p(()=>j>0?j:A,[j,A]),N=p(()=>{let t=w(e),n=t[t.length?Math.max(0,Math.min(b,t.length-1)):0]?.url||``,r=!!t.length;if(!r)return{hasVideo:!1,hlsList:[],videoUrl:``,width:1,height:1,resolution:`0x0`,aspectRatio:1,poster:``};let i=Number(E.img_width||0)||1,a=Number(E.img_height||0)||1;return{hasVideo:r,hlsList:t,videoUrl:n,width:i,height:a,resolution:S(i,a),aspectRatio:(i||1)/(a||1),poster:E.img_y||E.img_x||E.preview_images?.[0]||``}},[e.id,e.links,b,E.img_width,E.img_height,E.img_y,E.img_x,E.preview_images]),P=d((e,t)=>{u.current=e,y.current=t},[]),F=p(()=>N.videoUrl.endsWith(`m3u8`)?{startTimeSeconds:M,preload:`none`}:{startTimeSeconds:M},[M,N.videoUrl]);f(()=>{u.current=0,y.current=0},[T,b]);let I=a({contentId:T,browseEpisode:x,contentType:1,enabled:!s&&!!T,intervalMs:60*1e3,getCurrentTimeSeconds:()=>u.current,getDurationSeconds:()=>y.current});if(f(()=>{if(s)return;let e=()=>{if(!(typeof window>`u`)&&!(u.current<=0||y.current<=0))try{sessionStorage.setItem(k,JSON.stringify({episodeId:O,currentTime:u.current,duration:y.current}))}catch(e){console.error(`写入 sessionStorage 失败:`,e)}},t=()=>{e()},n=()=>{document.visibilityState===`hidden`&&e()},r=()=>{e()};return window.addEventListener(`beforeunload`,t),document.addEventListener(`visibilitychange`,n),window.addEventListener(`popstate`,r),()=>{window.removeEventListener(`beforeunload`,t),document.removeEventListener(`visibilitychange`,n),window.removeEventListener(`popstate`,r),e()}},[O,s,k]),!N.hasVideo)return g(`div`,{className:`mt-3 rounded-xl bg-bg1 px-3 py-10 text-center text-text3`,children:l(`videoHero.noVideos`)});let L=C(430,N.aspectRatio,242),R=L.height>0?t(L.height):`auto`,z=L.height>0?`calc(${R} + 0px)`:`auto`,B=t(242);return _(h,{children:[g(r,{suppressHydrationWarning:!0,className:`w-full`,style:{height:z,maxWidth:`100%`,maxHeight:`calc(${B} + 0px)`}}),_(r,{className:`w-full relative bg-bg2 !fixed !top-[44px] !left-0 z-[10]`,children:[N.poster&&_(`div`,{className:`w-full h-full bg-bg2 absolute top-0 left-0 z-[1] overflow-hidden`,style:{height:R},children:[g(n,{src:N.poster,alt:l(`videoHero.coverAlt`),fill:!0,className:`object-cover`,priority:!0}),g(`div`,{className:`w-full h-full absolute top-0 left-0 z-[1] bg-[rgba(255,255,255,0.2)] backdrop-blur-[4px]`})]}),g(r,{suppressHydrationWarning:!0,"data-aspect-ratio":N.resolution,className:`w-full overflow-hidden flex justify-center relative z-[2]`,style:{height:R,maxWidth:`100%`,maxHeight:B,backdropFilter:`blur(0)`,WebkitBackdropFilter:`blur(0)`},children:g(c,{plyerId:`detail-player-${E.id}-${b}`,parentId:D,resolution:N.resolution||`0x0`,videoUrl:N.videoUrl,poster:N.poster,mergeConfig:F,onProgressUpdate:s?void 0:P,onPlay:s?void 0:I.handlePlay,onPause:s?void 0:I.handlePause,onEnded:s?void 0:I.handleEnded},`stable-player-${E.id}-${b}`)})]})]})}function S(e,t){return!e||!t?``:`${e}x${t}`}function C(e,t,n){let r=e/t;return r<=n?{width:e,height:r}:{width:n*t,height:n}}function w(e){let t=e.links||[];return t.length>0?t.map((e,t)=>({text:e.name||String(t+1),url:e.m3u8_url||e.preview_m3u8_url||``,definition:``,isDefault:t===0})).filter(e=>e.url):[]}export{y as DetailHero};
2
+ "use client";import{cn as e}from"../../../../../utils/cn.mjs";import{pxToVw as t}from"../../../../../utils/helper.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{useBrowseReport as a}from"../../../../../hooks/use-browse-report.mjs";import{MediaPreview as o,useMediaPreview as s}from"../../../../common/media-preview/index.mjs";import c from"../../../../common/video-player/index.mjs";import{UserActivityMediaGrid as l}from"../../../../common/list/user-activity-list/user-activity-list-item.mjs";import{VideoPlayerRefContext as u}from"../../../../common/video-player/video-player-ref-context.mjs";import{VideoBlindAdOverlay as d}from"../../../../common/video-player/video-blind-ad-overlay.mjs";import{memo as f,useCallback as p,useEffect as m,useMemo as h,useRef as g}from"react";import{jsx as _,jsxs as v}from"react/jsx-runtime";import{useTranslations as y}from"next-intl";const b=f(({mode:t=`renderer`,information:n,isVideo:a,episodeIndex:c=0,resumeProgressSeconds:u=0,className:d=``})=>{let f=t===`editor`,m=h(()=>({id:n.id,name:n.name,preview_images:n.preview_images,img_y:n.img_y,img_x:n.img_x}),[n.id,n.name,n.preview_images,n.img_y,n.img_x]),g=h(()=>{let e=n?.medias,t=Array.isArray(e)?e.filter(Boolean):[];return t.length>0?t:(m.preview_images?.length?m.preview_images:[m.img_y||m.img_x||``].filter(Boolean)).filter(Boolean).map(e=>({media_url:e,is_video:!1,cover_image:``}))},[m.img_x,m.img_y,m.preview_images,n]),y=s(),b=h(()=>g.filter(Boolean).map(e=>{let t=e?.is_video?`video`:`image`,r=String(e?.media_url||``),i=e?.cover_image||n.img_y||n.img_x;return{src:r,type:t,...i?{cover:String(i)}:{}}}).filter(e=>!!e.src),[n.img_x,n.img_y,g]),S=p(e=>{f||!b.length||y.open(b,e)},[f,y,b]);return f?_(`img`,{src:`/static/components-thumb/video_player.png`,alt:`video-preview`,className:`w-full block`}):a?_(x,{information:n,episodeIndex:c,resumeProgressSeconds:u,isEditor:f}):v(`div`,{className:e(`w-full`,d),children:[v(r,{className:`mt-3 px-[12px] space-y-1`,children:[_(i,{as:`p`,className:`break-all`,dangerouslySetInnerHTML:{__html:n.description}}),_(l,{medias:g,onItemClick:S})]}),_(o,{})]})});b.displayName=`DetailHero`;const x=f(({information:e,episodeIndex:t,resumeProgressSeconds:n,isEditor:r})=>{let i=h(()=>({id:e.id,mid:e.mid,img_width:e.img_width,img_height:e.img_height,img_y:e.img_y,img_x:e.img_x,preview_images:e.preview_images}),[e.id,e.mid,e.img_width,e.img_height,e.img_y,e.img_x,e.preview_images]);return _(S,{information:{...e,...i},episodeIndex:t,resumeProgressSeconds:n,isEditor:r})},(e,t)=>{let n=e.information,r=t.information;return n.id===r.id&&n.mid===r.mid&&n.img_width===r.img_width&&n.img_height===r.img_height&&n.img_y===r.img_y&&n.img_x===r.img_x&&e.resumeProgressSeconds===t.resumeProgressSeconds&&e.episodeIndex===t.episodeIndex&&e.isEditor===t.isEditor});x.displayName=`StableDetailPlayerBox`;function S({information:e,episodeIndex:i,resumeProgressSeconds:o,isEditor:s}){let l=g(null);console.log(`[video-hero] 创建 playerRef:`,{ref:l,current:l.current,infoId:e.id});let f=y(`components.biz.business.detail`),b=g(0),x=g(0),S=Math.max(0,Number(i)||0),E=S+1,D=h(()=>e?.id,[e?.id]),O=h(()=>({id:e.id,mid:e.mid,img_width:e.img_width,img_height:e.img_height,img_y:e.img_y,img_x:e.img_x,preview_images:e.preview_images,links:e.links}),[e.id,e.mid,e.img_width,e.img_height,e.img_y,e.img_x,e.preview_images,e.links]),k=h(()=>O.mid||O.id,[O.id,O.mid]),A=h(()=>{let e=O.links?.[S]?.id;return e?String(e):`ep-${S+1}`},[S,O.links]),j=h(()=>`__reportData_detail_page__${O.id}:${A}`,[A,O.id]),M=h(()=>{if(s||typeof window>`u`)return 0;try{let e=sessionStorage.getItem(j);if(!e)return 0;let t=JSON.parse(e),n=Number(t.currentTime||0),r=Number(t.duration||0);if(!Number.isFinite(n)||!Number.isFinite(r))return 0;if(n>0&&r>0)return n}catch(e){console.error(`读取 sessionStorage 数据失败:`,e)}return 0},[s,j]),N=h(()=>{let e=Number(o||0);return Number.isFinite(e)&&e>0?e:0},[o]),P=h(()=>N>0?N:M,[N,M]),F=h(()=>{let t=T(e),n=t[t.length?Math.max(0,Math.min(S,t.length-1)):0]?.url||``,r=!!t.length;if(!r)return{hasVideo:!1,hlsList:[],videoUrl:``,width:1,height:1,resolution:`0x0`,aspectRatio:1,poster:``};let i=Number(O.img_width||0)||1,a=Number(O.img_height||0)||1;return{hasVideo:r,hlsList:t,videoUrl:n,width:i,height:a,resolution:C(i,a),aspectRatio:(i||1)/(a||1),poster:O.img_y||O.img_x||O.preview_images?.[0]||``}},[e.id,e.links,S,O.img_width,O.img_height,O.img_y,O.img_x,O.preview_images]),I=p((e,t)=>{b.current=e,x.current=t},[]),L=h(()=>F.videoUrl.endsWith(`m3u8`)?{startTimeSeconds:P,preload:`none`}:{startTimeSeconds:P},[P,F.videoUrl]);m(()=>{b.current=0,x.current=0},[D,S]);let R=a({contentId:D,browseEpisode:E,contentType:1,enabled:!s&&!!D,intervalMs:60*1e3,getCurrentTimeSeconds:()=>b.current,getDurationSeconds:()=>x.current});if(m(()=>{if(s)return;let e=()=>{if(!(typeof window>`u`)&&!(b.current<=0||x.current<=0))try{sessionStorage.setItem(j,JSON.stringify({episodeId:A,currentTime:b.current,duration:x.current}))}catch(e){console.error(`写入 sessionStorage 失败:`,e)}},t=()=>{e()},n=()=>{document.visibilityState===`hidden`&&e()},r=()=>{e()};return window.addEventListener(`beforeunload`,t),document.addEventListener(`visibilitychange`,n),window.addEventListener(`popstate`,r),()=>{window.removeEventListener(`beforeunload`,t),document.removeEventListener(`visibilitychange`,n),window.removeEventListener(`popstate`,r),e()}},[A,s,j]),!F.hasVideo)return _(`div`,{className:`mt-3 rounded-xl bg-bg1 px-3 py-10 text-center text-text3`,children:f(`videoHero.noVideos`)});let z=w(430,F.aspectRatio,242),B=z.height>0?t(z.height):`auto`,V=z.height>0?`calc(${B} + 0px)`:`auto`,H=t(242);return v(u,{value:l,children:[_(r,{suppressHydrationWarning:!0,className:`w-full`,style:{height:V,maxWidth:`100%`,maxHeight:`calc(${H} + 0px)`}}),v(r,{className:`w-full relative bg-bg2 !fixed !top-[44px] !left-0 z-[10]`,children:[F.poster&&v(`div`,{className:`w-full h-full bg-bg2 absolute top-0 left-0 z-[1] overflow-hidden`,style:{height:B},children:[_(n,{src:F.poster,alt:f(`videoHero.coverAlt`),fill:!0,className:`object-cover`,priority:!0}),_(`div`,{className:`w-full h-full absolute top-0 left-0 z-[1] bg-[rgba(255,255,255,0.2)] backdrop-blur-[4px]`})]}),v(r,{suppressHydrationWarning:!0,"data-aspect-ratio":F.resolution,className:`w-full overflow-hidden flex justify-center relative z-[2]`,style:{height:B,maxWidth:`100%`,maxHeight:H,backdropFilter:`blur(0)`,WebkitBackdropFilter:`blur(0)`},children:[_(c,{ref:l,plyerId:`detail-player-${O.id}-${S}`,parentId:k,resolution:F.resolution||`0x0`,videoUrl:F.videoUrl,poster:F.poster,mergeConfig:L,onProgressUpdate:s?void 0:I,onPlay:s?void 0:R.handlePlay,onPause:s?void 0:R.handlePause,onEnded:s?void 0:R.handleEnded},`stable-player-${O.id}-${S}`),_(d,{videoId:O.id})]})]})]})}function C(e,t){return!e||!t?``:`${e}x${t}`}function w(e,t,n){let r=e/t;return r<=n?{width:e,height:r}:{width:n*t,height:n}}function T(e){let t=e.links||[];return t.length>0?t.map((e,t)=>({text:e.name||String(t+1),url:e.m3u8_url||e.preview_m3u8_url||``,definition:``,isDefault:t===0})).filter(e=>e.url):[]}export{b as DetailHero};
@@ -1,2 +1,2 @@
1
1
 
2
- import{defineComponentPropsSchema as e,getSchemaDefaultProps as t}from"../../../../../utils/schema/schema.mjs";const n=e(e=>({logoSrc:e.string(``,{label:`菜单图标地址`,required:!1}),logoHref:e.string(`/`,{label:`菜单跳转地址`,required:!1})})),r=t(n);export{r as headerAvatarLogoSearchInspectorDefaultProps,n as headerAvatarLogoSearchInspectorPropsSchema};
2
+ import{defineComponentPropsSchema as e,getSchemaDefaultProps as t}from"../../../../../utils/schema/schema.mjs";const n=e(e=>({logoSrc:e.string(`/static/icons/video.svg`,{label:`菜单图标地址`,required:!1}),logoHref:e.string(`/`,{label:`菜单跳转地址`,required:!1})})),r=t(n);export{r as headerAvatarLogoSearchInspectorDefaultProps,n as headerAvatarLogoSearchInspectorPropsSchema};
@@ -1,2 +1,2 @@
1
1
 
2
- "use client";import e from"../../../../../assets/icons/search/video.mjs";import{HeaderAction as t}from"./header-action.mjs";import{jsx as n}from"react/jsx-runtime";function r(r){let{logoHref:i,logoSrc:a,variant:o=`default`}=r,s=o===`action`;return n(t,{href:i,ariaLabel:`打开 logo 入口`,imageSrc:a,imageAlt:`logo`,className:s?`h-[24px] w-[24px] text-white`:`h-[40px] w-[40px]`,imageClassName:s?`rounded-full object-cover`:`object-cover`,fallbackIcon:n(e,{className:s?`h-[24px] w-[24px]`:`h-[40px] w-[40px]`})})}export{r as Logo};
2
+ "use client";import{HeaderAction as e}from"./header-action.mjs";import{jsx as t}from"react/jsx-runtime";function n(n){let{logoHref:r,logoSrc:i,variant:a=`default`}=n,o=a===`action`;return t(e,{href:r,ariaLabel:`打开 logo 入口`,imageSrc:i,imageAlt:`logo`,className:o?`h-[24px] w-[24px] text-white`:`h-[40px] w-[40px]`,imageClassName:o?`rounded-full object-cover`:`object-cover`,fallbackIcon:null})}export{n as Logo};
@@ -1,2 +1,2 @@
1
1
 
2
- "use client";import{buildHomeRecommendEditorPreviewData as e}from"../shared/home-recommend-preview.mjs";import t from"../shared/home-recommend-base.mjs";import{useMemo as n}from"react";import{jsx as r}from"react/jsx-runtime";function i({prefetchData:i,mode:a=`renderer`,...o}){let s=a===`editor`,c=o,l=n(()=>s?e({variant:`grid`,schemaTitle:c.title,enableInfinite:c.enableInfinite,smartTagEnabled:c.smartTagEnabled,rows:c.rows,columns:c.columns,items:c.items}):i,[s,i,c.columns,c.enableInfinite,c.items,c.rows,c.smartTagEnabled,c.title]);return r(`div`,{className:s?`pointer-events-none`:void 0,children:r(t,{variant:`grid`,props:c,data:l,mode:a})})}export{i as default};
2
+ "use client";import{buildHomeRecommendEditorPreviewData as e}from"../shared/home-recommend-preview.mjs";import t from"../shared/home-recommend-base.mjs";import{useMemo as n}from"react";import{jsx as r}from"react/jsx-runtime";function i({prefetchData:i,mode:a=`renderer`,...o}){let s=a===`editor`,c=o,l=n(()=>s?e({variant:`grid`,schemaTitle:c.title,enableInfinite:c.enableInfinite,dynamicRecommendEnabled:c.smartLayout?.enabled===!0,rows:c.rows,columns:c.columns,items:c.items}):i,[s,i,c.columns,c.enableInfinite,c.items,c.rows,c.smartLayout?.enabled,c.title]);return r(`div`,{className:s?`pointer-events-none`:void 0,children:r(t,{variant:`grid`,props:c,data:l,mode:a})})}export{i as default};
@@ -11,15 +11,27 @@ import z$1 from "zod";
11
11
  declare const homeRecommendGridInspectorPropsSchema: z$1.ZodObject<{
12
12
  readonly rows: z$1.ZodNumber & SchemaHasDefaultValue;
13
13
  readonly columns: z$1.ZodNumber & SchemaHasDefaultValue;
14
- readonly smartTagEnabled: z$1.ZodBoolean & SchemaHasDefaultValue;
15
14
  readonly title: z$1.ZodString & SchemaHasDefaultValue;
16
15
  readonly showPlayCount: z$1.ZodBoolean & SchemaHasDefaultValue;
17
16
  readonly playCountDelta: z$1.ZodNumber & SchemaHasDefaultValue;
18
17
  readonly showEpisode: z$1.ZodBoolean & SchemaHasDefaultValue;
19
18
  readonly enableInfinite: z$1.ZodOptional<z$1.ZodBoolean> & SchemaHasDefaultValue;
20
19
  readonly moreLink: z$1.ZodOptional<z$1.ZodString> & SchemaHasDefaultValue;
21
- readonly smartTagIds: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
20
+ readonly recommendContentConfig: z$1.ZodOptional<z$1.ZodObject<{
21
+ enabled: z$1.ZodOptional<z$1.ZodBoolean>;
22
+ categories: z$1.ZodOptional<z$1.ZodArray<z$1.ZodAny>>;
23
+ tags: z$1.ZodOptional<z$1.ZodArray<z$1.ZodAny>>;
24
+ sortRule: z$1.ZodOptional<z$1.ZodString>;
25
+ contentForms: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
26
+ }, z$1.core.$loose>>;
22
27
  readonly catId: z$1.ZodOptional<z$1.ZodString> & SchemaHasDefaultValue;
28
+ readonly smartLayout: z$1.ZodOptional<z$1.ZodObject<{
29
+ enabled: z$1.ZodOptional<z$1.ZodBoolean>;
30
+ categories: z$1.ZodOptional<z$1.ZodArray<z$1.ZodAny>>;
31
+ tags: z$1.ZodOptional<z$1.ZodArray<z$1.ZodAny>>;
32
+ sortRule: z$1.ZodOptional<z$1.ZodString>;
33
+ contentForms: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
34
+ }, z$1.core.$loose>>;
23
35
  readonly items: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
24
36
  contentId: z$1.ZodString;
25
37
  coverMode: z$1.ZodOptional<z$1.ZodEnum<{
@@ -28,6 +40,14 @@ declare const homeRecommendGridInspectorPropsSchema: z$1.ZodObject<{
28
40
  }>>;
29
41
  coverUrl: z$1.ZodOptional<z$1.ZodString>;
30
42
  is_ad: z$1.ZodOptional<z$1.ZodBoolean>;
43
+ ad: z$1.ZodOptional<z$1.ZodObject<{
44
+ ad_code: z$1.ZodOptional<z$1.ZodString>;
45
+ ad_advertise_url: z$1.ZodOptional<z$1.ZodString>;
46
+ ad_advertise_icon: z$1.ZodOptional<z$1.ZodString>;
47
+ ad_advertise_type: z$1.ZodOptional<z$1.ZodNumber>;
48
+ ad_advertise_desc: z$1.ZodOptional<z$1.ZodString>;
49
+ ad_ext_data: z$1.ZodOptional<z$1.ZodString>;
50
+ }, z$1.core.$strip>>;
31
51
  ad_advertise_url: z$1.ZodOptional<z$1.ZodString>;
32
52
  ad_advertise_icon: z$1.ZodOptional<z$1.ZodString>;
33
53
  badge_url: z$1.ZodOptional<z$1.ZodString>;
@@ -48,11 +68,11 @@ declare const homeRecommendGridInspectorPropsSchema: z$1.ZodObject<{
48
68
  }>>;
49
69
  }, z$1.core.$strip>;
50
70
  declare const homeRecommendGridInspectorDefaultProps: {
51
- smartTagIds: never[];
52
71
  items: never[];
72
+ recommendContentConfig: undefined;
73
+ smartLayout: undefined;
53
74
  rows: number;
54
75
  columns: number;
55
- smartTagEnabled: boolean;
56
76
  title: string;
57
77
  showPlayCount: boolean;
58
78
  playCountDelta: number;
@@ -1,2 +1,2 @@
1
1
 
2
- import{defineComponentPropsSchema as e,getSchemaDefaultProps as t}from"../../../../../utils/schema/schema.mjs";import{HOME_RECOMMEND_DEFAULT_ENABLE_INFINITE as n,HOME_RECOMMEND_DEFAULT_GRID_COLUMNS as r,HOME_RECOMMEND_DEFAULT_GRID_ROWS as i,HOME_RECOMMEND_DEFAULT_PLAY_COUNT_DELTA as a,HOME_RECOMMEND_DEFAULT_SHOW_EPISODE as o,HOME_RECOMMEND_DEFAULT_SHOW_PLAY_COUNT as s,HOME_RECOMMEND_DEFAULT_SMART_TAG_ENABLED as c,HOME_RECOMMEND_DEFAULT_TITLE as l}from"../shared/home-recommend-default-config.mjs";import u from"zod";const d=e(e=>({rows:e.number(i,{label:`行数`}),columns:e.number(r,{label:`列数`}),smartTagEnabled:e.boolean(c,{fieldType:`switch`,label:`智能铺设`}),title:e.string(l,{label:`推荐位名称`}),showPlayCount:e.boolean(s,{fieldType:`switch`,label:`显示播放量`}),playCountDelta:e.number(a,{label:`播放量浮动`}),showEpisode:e.boolean(o,{fieldType:`switch`,label:`显示集数`}),enableInfinite:e.boolean(n,{fieldType:`switch`,label:`无限下拉`,required:!1}),moreLink:e.string(``,{label:`更多`,description:``,required:!1}),smartTagIds:u.array(u.string()).optional(),catId:e.string(``,{label:`分类 ID`,description:`透传热门接口 cat_id`,required:!1}),items:u.array(u.object({contentId:u.string(),coverMode:u.enum([`upload`,`content`]).optional(),coverUrl:u.string().optional(),is_ad:u.boolean().optional(),ad_advertise_url:u.string().optional(),ad_advertise_icon:u.string().optional(),badge_url:u.string().optional(),titleMode:u.enum([`custom`,`content`]).optional(),title:u.string().optional(),description:u.string().optional(),showPlayCount:u.boolean().optional(),playCountDelta:u.number().optional(),showEpisode:u.boolean().optional()})).optional()})),f={...t(d),smartTagIds:[],items:[]},p={rows:{type:`number`,title:`行数`,default:f.rows},columns:{type:`number`,title:`列数`,default:f.columns},smartTagEnabled:{type:`boolean`,title:`智能铺设`,default:f.smartTagEnabled},title:{type:`string`,title:`推荐位名称`,default:f.title},showPlayCount:{type:`boolean`,title:`显示播放量`,default:f.showPlayCount},playCountDelta:{type:`number`,title:`播放量浮动`,default:f.playCountDelta},showEpisode:{type:`boolean`,title:`显示集数`,default:f.showEpisode},enableInfinite:{type:`boolean`,title:`无限下拉`,default:f.enableInfinite},moreLink:{type:`string`,title:`更多`,description:``,default:f.moreLink},smartTagIds:{type:`array`,title:`智能铺设标签`,default:f.smartTagIds,items:{type:`string`,title:`标签 ID`}},catId:{type:`string`,title:`分类 ID`,description:`透传热门接口 cat_id`,default:f.catId},items:{type:`array`,title:`推荐项`,default:f.items,items:{type:`object`,title:`推荐项`,properties:{contentId:{type:`string`,title:`内容 ID`},coverMode:{type:`string`,title:`封面模式`},coverUrl:{type:`string`,title:`封面地址`},is_ad:{type:`boolean`,title:`是否广告`},ad_advertise_url:{type:`string`,title:`广告跳转地址`},ad_advertise_icon:{type:`string`,title:`广告素材地址`},badge_url:{type:`string`,title:`角标地址`},titleMode:{type:`string`,title:`标题模式`},title:{type:`string`,title:`标题`},description:{type:`string`,title:`简介`},showPlayCount:{type:`boolean`,title:`显示播放量`},playCountDelta:{type:`number`,title:`播放量浮动`},showEpisode:{type:`boolean`,title:`显示集数`}}}}};export{f as homeRecommendGridInspectorDefaultProps,d as homeRecommendGridInspectorPropsSchema,p as homeRecommendGridPropsSchema};
2
+ import{defineComponentPropsSchema as e,getSchemaDefaultProps as t}from"../../../../../utils/schema/schema.mjs";import{HOME_RECOMMEND_DEFAULT_ENABLE_INFINITE as n,HOME_RECOMMEND_DEFAULT_GRID_COLUMNS as r,HOME_RECOMMEND_DEFAULT_GRID_ROWS as i,HOME_RECOMMEND_DEFAULT_PLAY_COUNT_DELTA as a,HOME_RECOMMEND_DEFAULT_SHOW_EPISODE as o,HOME_RECOMMEND_DEFAULT_SHOW_PLAY_COUNT as s,HOME_RECOMMEND_DEFAULT_TITLE as c}from"../shared/home-recommend-default-config.mjs";import{homeRecommendSmartLayoutSchema as l}from"../shared/home-recommend-smart-layout.mjs";import u from"zod";const d=e(e=>({rows:e.number(i,{label:`行数`}),columns:e.number(r,{label:`列数`}),title:e.string(c,{label:`推荐位名称`}),showPlayCount:e.boolean(s,{fieldType:`switch`,label:`显示播放量`}),playCountDelta:e.number(a,{label:`播放量浮动`}),showEpisode:e.boolean(o,{fieldType:`switch`,label:`显示集数`}),enableInfinite:e.boolean(n,{fieldType:`switch`,label:`无限下拉`,required:!1}),moreLink:e.string(``,{label:`更多`,description:``,required:!1}),recommendContentConfig:l.optional(),catId:e.string(``,{label:`分类 ID`,description:`透传热门接口 cat_id`,required:!1}),smartLayout:l.optional(),items:u.array(u.object({contentId:u.string(),coverMode:u.enum([`upload`,`content`]).optional(),coverUrl:u.string().optional(),is_ad:u.boolean().optional(),ad:u.object({ad_code:u.string().optional(),ad_advertise_url:u.string().optional(),ad_advertise_icon:u.string().optional(),ad_advertise_type:u.number().optional(),ad_advertise_desc:u.string().optional(),ad_ext_data:u.string().optional()}).optional(),ad_advertise_url:u.string().optional(),ad_advertise_icon:u.string().optional(),badge_url:u.string().optional(),titleMode:u.enum([`custom`,`content`]).optional(),title:u.string().optional(),description:u.string().optional(),showPlayCount:u.boolean().optional(),playCountDelta:u.number().optional(),showEpisode:u.boolean().optional()})).optional()})),f={...t(d),items:[],recommendContentConfig:void 0,smartLayout:void 0},p={rows:{type:`number`,title:`行数`,default:f.rows},columns:{type:`number`,title:`列数`,default:f.columns},title:{type:`string`,title:`推荐位名称`,default:f.title},showPlayCount:{type:`boolean`,title:`显示播放量`,default:f.showPlayCount},playCountDelta:{type:`number`,title:`播放量浮动`,default:f.playCountDelta},showEpisode:{type:`boolean`,title:`显示集数`,default:f.showEpisode},enableInfinite:{type:`boolean`,title:`无限下拉`,default:f.enableInfinite},moreLink:{type:`string`,title:`更多`,description:``,default:f.moreLink},recommendContentConfig:{type:`object`,title:`推荐内容配置`,description:`频道下发的筛选与排序;enabled 为 true 时走动态列表`,default:f.recommendContentConfig},catId:{type:`string`,title:`分类 ID`,description:`透传热门接口 cat_id`,default:f.catId},smartLayout:{type:`object`,title:`智能筛选配置`,description:`enabled 为 true 时使用最新视频列表接口;categories/tags 取 id 透传 cat_ids、tags`,default:f.smartLayout},items:{type:`array`,title:`推荐项`,default:f.items,items:{type:`object`,title:`推荐项`,properties:{contentId:{type:`string`,title:`内容 ID`},coverMode:{type:`string`,title:`封面模式`},coverUrl:{type:`string`,title:`封面地址`},is_ad:{type:`boolean`,title:`是否广告`},ad:{type:`object`,title:`广告对象`,properties:{ad_code:{type:`string`,title:`广告业务编码`},ad_advertise_url:{type:`string`,title:`广告跳转地址`},ad_advertise_icon:{type:`string`,title:`广告素材地址`},ad_advertise_type:{type:`number`,title:`广告类型`},ad_advertise_desc:{type:`string`,title:`广告文案描述`},ad_ext_data:{type:`string`,title:`广告扩展信息`}}},ad_advertise_url:{type:`string`,title:`广告跳转地址`},ad_advertise_icon:{type:`string`,title:`广告素材地址`},badge_url:{type:`string`,title:`角标地址`},titleMode:{type:`string`,title:`标题模式`},title:{type:`string`,title:`标题`},description:{type:`string`,title:`简介`},showPlayCount:{type:`boolean`,title:`显示播放量`},playCountDelta:{type:`number`,title:`播放量浮动`},showEpisode:{type:`boolean`,title:`显示集数`}}}}};export{f as homeRecommendGridInspectorDefaultProps,d as homeRecommendGridInspectorPropsSchema,p as homeRecommendGridPropsSchema};
@@ -11,15 +11,27 @@ import * as zod_v4_core0 from "zod/v4/core";
11
11
  declare const homeRecommendGridMaterial: DefineMaterialOption<typeof HomeRecommendGrid, typeof HomeRecommendGridClient, zod.ZodObject<{
12
12
  readonly rows: zod.ZodNumber & SchemaHasDefaultValue;
13
13
  readonly columns: zod.ZodNumber & SchemaHasDefaultValue;
14
- readonly smartTagEnabled: zod.ZodBoolean & SchemaHasDefaultValue;
15
14
  readonly title: zod.ZodString & SchemaHasDefaultValue;
16
15
  readonly showPlayCount: zod.ZodBoolean & SchemaHasDefaultValue;
17
16
  readonly playCountDelta: zod.ZodNumber & SchemaHasDefaultValue;
18
17
  readonly showEpisode: zod.ZodBoolean & SchemaHasDefaultValue;
19
18
  readonly enableInfinite: zod.ZodOptional<zod.ZodBoolean> & SchemaHasDefaultValue;
20
19
  readonly moreLink: zod.ZodOptional<zod.ZodString> & SchemaHasDefaultValue;
21
- readonly smartTagIds: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
20
+ readonly recommendContentConfig: zod.ZodOptional<zod.ZodObject<{
21
+ enabled: zod.ZodOptional<zod.ZodBoolean>;
22
+ categories: zod.ZodOptional<zod.ZodArray<zod.ZodAny>>;
23
+ tags: zod.ZodOptional<zod.ZodArray<zod.ZodAny>>;
24
+ sortRule: zod.ZodOptional<zod.ZodString>;
25
+ contentForms: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
26
+ }, zod_v4_core0.$loose>>;
22
27
  readonly catId: zod.ZodOptional<zod.ZodString> & SchemaHasDefaultValue;
28
+ readonly smartLayout: zod.ZodOptional<zod.ZodObject<{
29
+ enabled: zod.ZodOptional<zod.ZodBoolean>;
30
+ categories: zod.ZodOptional<zod.ZodArray<zod.ZodAny>>;
31
+ tags: zod.ZodOptional<zod.ZodArray<zod.ZodAny>>;
32
+ sortRule: zod.ZodOptional<zod.ZodString>;
33
+ contentForms: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
34
+ }, zod_v4_core0.$loose>>;
23
35
  readonly items: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
24
36
  contentId: zod.ZodString;
25
37
  coverMode: zod.ZodOptional<zod.ZodEnum<{
@@ -28,6 +40,14 @@ declare const homeRecommendGridMaterial: DefineMaterialOption<typeof HomeRecomme
28
40
  }>>;
29
41
  coverUrl: zod.ZodOptional<zod.ZodString>;
30
42
  is_ad: zod.ZodOptional<zod.ZodBoolean>;
43
+ ad: zod.ZodOptional<zod.ZodObject<{
44
+ ad_code: zod.ZodOptional<zod.ZodString>;
45
+ ad_advertise_url: zod.ZodOptional<zod.ZodString>;
46
+ ad_advertise_icon: zod.ZodOptional<zod.ZodString>;
47
+ ad_advertise_type: zod.ZodOptional<zod.ZodNumber>;
48
+ ad_advertise_desc: zod.ZodOptional<zod.ZodString>;
49
+ ad_ext_data: zod.ZodOptional<zod.ZodString>;
50
+ }, zod_v4_core0.$strip>>;
31
51
  ad_advertise_url: zod.ZodOptional<zod.ZodString>;
32
52
  ad_advertise_icon: zod.ZodOptional<zod.ZodString>;
33
53
  badge_url: zod.ZodOptional<zod.ZodString>;